import { FormAssociated, FoundationElement } from '@microsoft/fast-foundation'; export declare const foundationVerificationCodeInputShadowOptions: ShadowRootInit; export declare const defaultVerificationCodeInputConfig: {}; /** * Detail payload of the `change` and `complete` events. * @public */ export interface VerificationCodeInputEventDetail { value: string; } declare class _VerificationCodeInput extends FoundationElement { } interface _VerificationCodeInput extends FormAssociated { } declare const VerificationCodeInput_base: typeof _VerificationCodeInput; /** * Multi-digit verification code input for OTP / 2FA flows. * * Form-associated (FAST `FormAssociated`): host `name` / `required` / `value` participate * in native HTML form validation and submission like {@link TextField}. * * @public * @tagname %%prefix%%-verification-code-input * * @fires change - Fired when any digit changes. detail: `VerificationCodeInputEventDetail` * @fires complete - Fired when all digits are filled. detail: `VerificationCodeInputEventDetail` */ export declare class VerificationCodeInput extends VerificationCodeInput_base { /** * Proxy element for form association when ElementInternals is unavailable. * Initialized in the constructor (after `super()`) so it exists before attribute * change handlers run — same pattern as FAST `FormAssociatedTextField`. * @internal */ proxy: HTMLInputElement; /** Per-digit values indexed from `0` to `digits - 1`. */ values: string[]; /** Slotted label content; when empty the label is visually hidden. */ defaultSlottedNodes: any; private readonly controlListeners; /** Skip digit re-sync when `value` is updated from digit entry (`commitValues`). */ private syncingFromDigits; constructor(); /** * Optional host id used as a prefix for digit input ids (`{id}-0`, `{id}-1`, …) * and the associated label element. */ id: string; /** * Visual treatment applied to each digit field. * @public * @remarks * HTML Attribute: appearance * @defaultValue outline */ appearance: string; /** * Number of single-character digit fields to render. * @public * @remarks * HTML Attribute: digits * @defaultValue 6 */ digits: number; /** * When true, digit fields are non-interactive. * @public * @remarks * HTML Attribute: readonly */ readOnly: boolean; /** * When true, focuses the first digit on connect (and after SPA route commit when hosted that way). * @public * @remarks * HTML Attribute: autofocus */ autofocus: boolean; /** * When true, applies the error visual state to each digit field. * @public * @remarks * HTML Attribute: error */ error: boolean; get digitsIndexes(): number[]; get controlIdPrefix(): string; get labelId(): string; get hasLabel(): boolean; getControlId(index: number): string; /** Clears digits, emits `change`, and focuses the first field when connected. */ clear(): void; focus(): void; /** @internal */ valueChanged(previous: string, next: string): void; /** @internal */ validate(anchor?: HTMLElement): void; connectedCallback(): void; disconnectedCallback(): void; digitsChanged(): void; get digitClassnames(): string; private sanitizeCode; private bindControlListeners; private unbindControlListeners; private onKeyDown; private isBlockedCharacter; private onInput; private onPaste; private handleBackspace; private handleDelete; private getIndexFromInput; /** Maps a sanitized code string into per-digit `values` and syncs the DOM when connected. */ private syncDigitsFromValue; private updateDigit; private applyDigits; /** Pushes digit state into the form-associated `value` and emits change / complete. */ private commitValues; private syncFieldValues; private syncFieldValue; private focusDigit; private get rootNode(); private getControlElement; private isComplete; private emitChange; } /** * The Foundation Verification Code Input * * @public * @remarks * HTML Element: \ */ export declare const foundationVerificationCodeInput: (overrideDefinition?: import("@microsoft/fast-foundation").OverrideFoundationElementDefinition<{ baseName: string; template: import("@microsoft/fast-element").ViewTemplate; styles: import("@microsoft/fast-element").ElementStyles; shadowOptions: ShadowRootInit; }>) => import("@microsoft/fast-foundation").FoundationElementRegistry<{ baseName: string; template: import("@microsoft/fast-element").ViewTemplate; styles: import("@microsoft/fast-element").ElementStyles; shadowOptions: ShadowRootInit; }, typeof VerificationCodeInput>; export {}; //# sourceMappingURL=verification-code-input.d.ts.map