import { ComponentPropsWithoutRef, ReactNode, Ref } from 'react'; import { InputSize } from './Input.js'; interface OTPFieldOwnProps { /** OTP cells - one or more `OTPFieldInput`, with optional `OTPFieldSeparator` between. */ children?: ReactNode; /** Extra classes for the field container. */ className?: string; /** Forwarded to the field container. */ ref?: Ref; /** Controlled value. The character at index `i` populates cell `i`. */ value?: string; /** Fires whenever the OTP value changes (typing, backspace, paste, clear). */ onChange?: (value: string) => void; /** * Maximum number of characters / cells. When omitted, inferred from the count of `OTPFieldInput` children. */ maxLength?: number; /** Cell size. Default `'lg'`. */ size?: InputSize; /** * Regex source that matches a single allowed character. Default `'[0-9]'`. * * Applied as a filter for typed and pasted input. */ pattern?: string; /** * Validity state. Default `true`. When `false`, the entire field renders a single red focus ring around all cells. */ valid?: boolean; /** Render the invalid focus ring flush against the cells (`inset-0`) instead of offset outside them (`-inset-1.5`). Use when the field sits at the edge of an `overflow` container, where the offset ring would add unwanted scroll overflow. Default `false`. */ tightFocusRing?: boolean; /** Visually dim the field and disable interaction with all cells. */ disabled?: boolean; /** Make every cell non-editable but still focusable. */ readOnly?: boolean; /** Forwarded to each underlying ``. Default `'numeric'` (matches the digits-only default pattern). */ inputMode?: 'none' | 'text' | 'tel' | 'url' | 'email' | 'numeric' | 'decimal' | 'search'; } export type OTPFieldProps = OTPFieldOwnProps & Omit, keyof OTPFieldOwnProps>; /** Shape of `OTPField` defaults that can be supplied via `CladdProvider`'s `defaults` prop. */ export type OTPFieldDefaultProps = Partial>; export declare const OTPField: (props: OTPFieldProps) => import("react/jsx-runtime").JSX.Element; export {}; //# sourceMappingURL=OTPField.d.ts.map