import type { JSX, ValidComponent } from "@solidjs/web"; import type { BaseUIComponentProps } from "../../internals/types.js"; import type { OTPFieldRootChangeEventDetails, OTPFieldRootChangeEventReason, OTPFieldRootCompleteEventDetails, OTPFieldRootInvalidEventDetails, OTPFieldRootState, OTPFieldValidationType } from "./otp-field-root-types.js"; export type { OTPFieldRootChangeEventDetails, OTPFieldRootChangeEventReason, OTPFieldRootCompleteEventDetails, OTPFieldRootInvalidEventDetails, OTPFieldRootState, OTPFieldValidationType, }; export interface OTPFieldRootProps extends Omit, "onChange" | "value"> { /** * Tag/component to render. Defaults to `"div"`. Replaces the * pre-spike `render` prop (axis G). */ as?: ValidComponent; id?: string | undefined; autoComplete?: string | undefined; form?: string | undefined; length: number; autoSubmit?: boolean | undefined; mask?: boolean | undefined; inputMode?: JSX.InputHTMLAttributes["inputmode"] | undefined; validationType?: OTPFieldValidationType | undefined; sanitizeValue?: ((value: string) => string) | undefined; required?: boolean | undefined; disabled?: boolean | undefined; readOnly?: boolean | undefined; name?: string | undefined; /** * Controlled OTP value. While not `undefined` the consumer owns the * state — pair with {@link onValueChange}. When omitted, the field * manages its own value (seeded from {@link defaultValue}), so typing * distributes digits across slots with zero wiring. */ value?: string | undefined; /** * The uncontrolled OTP value when the component is initially rendered. * Read once at mount. To render a controlled OTP field, use the `value` * prop instead. * @default "" */ defaultValue?: string | undefined; onValueChange?: ((value: string, details: OTPFieldRootChangeEventDetails) => void) | undefined; onValueInvalid?: ((value: string, details: OTPFieldRootInvalidEventDetails) => void) | undefined; onValueComplete?: ((value: string, details: OTPFieldRootCompleteEventDetails) => void) | undefined; } /** * Groups all `` slots and manages the shared OTP value, focus * coordination, clipboard distribution, validation and form integration. * Renders a `
` (or `as` override). * * §1 wave 2: replaces `renderElement` with `dynamic(() => props.as ?? "div")`. * Field-validity attrs flow through `fieldStateAttrs(state)`; OTP-specific * presence attrs (`data-complete`, `data-disabled`, `data-readonly`, * `data-required`) are emitted via inline reactive getters on the internal * slot bag. The `seedAriaLabelledBy`/`seedAriaDescribedBy` helpers and the * field-validation a11y bag compose via `mergeRootProps`. */ export declare function OTPFieldRoot(props: OTPFieldRootProps): JSX.Element; //# sourceMappingURL=otp-field-root.d.ts.map