import { type VariantProps } from 'class-variance-authority'; import { type TextInputProps } from '../text-input'; /** Agent-readiness curated handle for PasswordInput. */ export interface PasswordInputHandle { getValue: () => string; setValue: (value: string) => void; clear: () => void; focus: () => void; isRevealed: () => boolean; toggleVisibility: () => void; } type Strength = 0 | 1 | 2 | 3; declare const strengthBarVariants: (props?: ({ level?: 0 | 2 | 1 | 3 | null | undefined; } & import("class-variance-authority/types").ClassProp) | undefined) => string; /** * One row in the live requirements checklist. Consumers either build * these inline or pull a pre-built set from `usePasswordRequirements`. */ export interface PasswordRequirement { /** Stable id — keyed render + a11y. */ id: string; /** Already-translated label. The consumer owns the wording. */ label: string; /** Predicate against the current value. Pure, runs on every keystroke. */ test: (value: string) => boolean; } export interface PasswordInputProps extends Omit, VariantProps { /** Callback when reveal state changes (for analytics). */ onRevealChange?: (revealed: boolean) => void; /** Show the strength meter below the input. */ showStrength?: boolean; /** Strength score: 0 = weak, 1 = fair, 2 = good, 3 = strong. */ strength?: Strength; /** * Live requirements checklist rendered between the input and the * strength meter / caps-lock notice. Each row's predicate runs on * every keystroke and the row's `data-state` flips between `"met"` * and `"unmet"`. The rule labels describe the input * (`aria-describedby`), so the rules are read on focus. When typing * changes a rule, a polite live region announces that whole row, rule * and state; nothing is announced on mount or when the value changes * from outside (the host or an agent). A controlled field is checked * against the `value` the host commits. * * Tip: hoist or `useMemo` the array — inlining it in JSX makes the * predicate-results memo bust every render. The kit's * `usePasswordRequirements` helper already does this. */ requirements?: ReadonlyArray; /** * When `true` AND `strength` is not provided, derive a 0–3 score * from the proportion of `requirements` satisfied. Lets consumers * get the strength bar "for free" once they declare requirements. */ deriveStrength?: boolean; /** * Autocomplete hint. Defaults to 'current-password'. * Use 'new-password' for registration/change-password forms. */ autoComplete?: 'current-password' | 'new-password' | (string & {}); } export declare const PasswordInput: import("react").ForwardRefExoticComponent>; export {}; //# sourceMappingURL=password-input.d.ts.map