import { OTPField } from '@base-ui/react/otp-field'; import { type FieldBoxSize } from './fieldBox.js'; export interface OneTimeCodeInputProps extends Omit { /** How many characters the code has. */ length?: number | undefined; /** `sm` for dense places such as toolbars and table cells, `lg` for a form that stands alone, * such as sign-in. */ size?: FieldBoxSize | undefined; 'aria-invalid'?: boolean | undefined; 'aria-required'?: boolean | undefined; /** Focuses the first box on mount, for a page or dialog whose only task is entering the code. */ autoFocus?: boolean | undefined; /** On the row of boxes: its margin or gap. */ className?: string | undefined; } /** * A one-time code, such as the six digits of a sign-in check, typed one character to a box. It * fills from the browser's or phone's code autofill (`autocomplete="one-time-code"`) and from a * paste of the whole code, moves on as each character is typed and back on Backspace, and opens a * number pad for a numeric code. The value is the code as one string; `onValueComplete` fires once * every box is filled, and `autoSubmit` submits the form then. * * Name it with a Field or a `