import { ID } from "../../types/index.mjs"; import { AtomProps } from "../Atom/Atom.vue.mjs"; import "../Atom/index.mjs"; import { RegistryContext, RegistryTicket, RegistryTicketInput } from "../../composables/createRegistry/index.mjs"; import { OtpContext, OtpItemDescriptor, OtpPattern } from "../../composables/createOtp/index.mjs"; import { MaybeRefOrGetter, Ref, ShallowRef } from "vue"; //#region src/components/Otp/OtpRoot.vue.d.ts type OtpItemsContext = RegistryContext, RegistryTicket>; interface OtpRootContext extends OtpContext { /** Form field name */ readonly name?: string; /** Resolved per-character pattern */ pattern: Readonly>; /** Whether interaction is disabled */ isDisabled: Readonly>; /** Whether the field is readonly */ isReadonly: Readonly>; /** ID of element that describes this group */ ariaDescribedby: Readonly>; /** * Move DOM focus to a box. Omitting `index` focuses the first empty box * (or the last box when complete). Clamped to [0, length). */ focus: (index?: number) => void; /** Roving arrow/Home/End handler. Sync `focusedId` before calling. */ onKeydown: (e: KeyboardEvent) => void; /** Roving cursor — set on pointer/tab into a box without calling `focus`. */ focusedId: ShallowRef; } declare const useOtpRoot: (key: string, defaultValue?: OtpRootContext | undefined) => OtpRootContext, provideOtpRoot: (key: string, context: OtpRootContext, app?: import("vue").App) => OtpRootContext; declare const useOtpItems: (key: string, defaultValue?: OtpItemsContext | undefined) => OtpItemsContext, provideOtpItems: (key: string, context: OtpItemsContext, app?: import("vue").App) => OtpItemsContext; interface OtpRootProps extends AtomProps { /** Joined OTP value */ modelValue?: string; /** Number of characters (default: 6) */ length?: number; /** Per-character pattern (default: 'numeric') */ pattern?: OtpPattern; /** Disable interaction */ disabled?: boolean | MaybeRefOrGetter; /** Show value, prevent changes */ readonly?: boolean | MaybeRefOrGetter; /** Accessible name for the group */ ariaLabel?: string; /** ID of element that labels this group */ ariaLabelledby?: string; /** ID of element that describes this group */ ariaDescribedby?: string; /** Form field name — triggers hidden input */ name?: string; /** Namespace for context provision */ namespace?: string; } type OtpRootEmits = { 'update:model-value': [value: string]; /** Joined value first reached `length`. Observational — return values are ignored. */ 'complete': [value: string]; }; interface OtpRootSlotProps { /** The joined OTP value */ value: string; /** Number of characters */ length: number; /** One descriptor per box — v-for this instead of `i in length` */ items: OtpItemDescriptor[]; /** Whether the value is complete and pattern-valid */ isComplete: boolean; /** Whether the field is disabled */ isDisabled: boolean; /** Whether the field is readonly */ isReadonly: boolean; /** Attributes to bind to the group element */ attrs: { 'role': 'group'; 'aria-label': string | undefined; 'aria-labelledby': string | undefined; 'aria-describedby': string | undefined; 'aria-disabled': boolean; 'data-disabled': true | undefined; 'data-readonly': true | undefined; 'data-complete': true | undefined; }; } interface OtpRootExpose { /** * Focus a box by index, or the first empty box when omitted. * Clamped to [0, length). */ focus: (index?: number) => void; } declare const _default: typeof __VLS_export; declare const __VLS_export: __VLS_WithSlots any; "update:model-value": (value: string) => any; complete: (value: string) => any; }, string, import("vue").PublicProps, Readonly & Readonly<{ "onUpdate:modelValue"?: ((value: string) => any) | undefined; "onUpdate:model-value"?: ((value: string) => any) | undefined; onComplete?: ((value: string) => any) | undefined; }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, { default: (props: OtpRootSlotProps) => any; }>; type __VLS_WithSlots = T & { new (): { $slots: S; }; }; //#endregion export { OtpItemsContext, OtpRootContext, OtpRootEmits, OtpRootExpose, OtpRootProps, OtpRootSlotProps, _default as default, provideOtpItems, provideOtpRoot, useOtpItems, useOtpRoot };