import type { PasswordRequirement } from './password-input'; export interface UsePasswordRequirementsOptions { /** * Minimum password length. When set, adds a "length" requirement. * Pass `12` (or whatever the server-side regex enforces) so the * inline checklist tells users the same rule they'll bounce off * server-side. When omitted, no length row is rendered. */ minLength?: number; /** Adds an "uppercase letter" requirement when true. */ uppercase?: boolean; /** Adds a "lowercase letter" requirement when true. */ lowercase?: boolean; /** Adds a "digit" requirement when true. */ digit?: boolean; /** Adds a "symbol" requirement when true. Matches anything outside `[A-Za-z0-9\s]`. */ symbol?: boolean; /** * Adds a "no spaces" requirement when true. Fails if the value * contains any whitespace character (space, tab, non-breaking space, * narrow no-break space, etc.). Useful to catch paste-time stray * whitespace from credential managers. */ noSpaces?: boolean; /** * Which letters and digits count for the uppercase, lowercase and * digit rules. `'unicode'` (the default) accepts any script: "É" is an * uppercase letter and "٣" a digit. `'ascii'` accepts only `A-Z`, * `a-z` and `0-9`. Match the server: a rule written as `[A-Z]` or `\d` * without the Unicode flag is ASCII, and a checklist that is more * generous than the server shows green for a password it refuses. */ charset?: 'unicode' | 'ascii'; } /** * Builds the common set of password requirements with i18n-resolved * labels. Designed for the AlfaDocs platform's patient-registration * server-side regex (`/^(?=.*[a-z])(?=.*[A-Z])(?=.*\d).{12,}$/`) but * generic enough for any consumer. * * Each opt-in flag adds one row to the returned array, in a stable * visual order (length → uppercase → lowercase → digit → symbol → noSpaces). * Predicates are pure and run on every keystroke. * * @example * const requirements = usePasswordRequirements({ * minLength: 12, * uppercase: true, * lowercase: true, * digit: true, * noSpaces: true, * }); * */ export declare function usePasswordRequirements(opts?: UsePasswordRequirementsOptions): PasswordRequirement[]; //# sourceMappingURL=use-password-requirements.d.ts.map