export type OTPMode = 'numeric' | 'alphanumeric'; /** Agent-readiness curated handle for OTPInput. */ export interface OTPInputHandle { getValue: () => string; setValue: (value: string) => void; clear: () => void; focus: (options?: FocusOptions) => void; isComplete: () => boolean; } export interface OTPInputProps { /** * Number of boxes. Default 6. Any integer in [3, 10] is honoured; * out-of-range values are clamped (with a DEV warning). */ length?: number; value?: string; defaultValue?: string; onChange?: (value: string) => void; onComplete?: (code: string) => void; disabled?: boolean; error?: boolean; label?: string; 'aria-describedby'?: string; /** Stable id, used to address this instance from the agent runtime. */ id?: string; className?: string; /** * Opt into Chrome-Android's WebOTP API for one-tap SMS autofill. When * the browser surfaces a matching SMS-bound credential, the kit spreads * the code across every digit box and fires `onComplete` automatically. * * Falls back silently to manual entry on Firefox / desktop / iOS — those * platforms either don't ship the API at all or rely on the * `autocomplete="one-time-code"` QuickType heuristic the kit already * applies to the first input. * * Prerequisites the prop can't enforce: page must be HTTPS, and the SMS * body must end with `@ #` on its last line (Chrome's * spec — without it the browser refuses to surface the message). * Default `false` so the listener stays opt-in. */ webOtp?: boolean; /** * When set, renders a hidden `` kept in sync with the * packed code so consumers can POST the OTP declaratively, e.g. * `sms_code_form[code]`. Default off — no behaviour change. */ name?: string; /** * Character set. `numeric` (default) accepts digits only (with Arabic-Indic * digit folding) — byte-identical to prior behaviour. `alphanumeric` accepts * `[A-Za-z0-9]`, uppercases the value, and switches the boxes to text input * (for SMS codes that mix letters and digits). */ mode?: OTPMode; } export declare const OTPInput: import("react").ForwardRefExoticComponent>; //# sourceMappingURL=otp-input.d.ts.map