/** * @file PasswordRules.tsx * @description The checklist under a "new password" field the account picks * for itself (Settings → Account, the first-login password change, an admin's * own password on the Users page): each rule of `lib/passwordRules.ts`, ticked * as the password typed passes it. * @author Nguyễn Ngọc Trí Vĩ */ import { useTranslation } from "react-i18next"; import { Check, Circle } from "lucide-react"; import { PASSWORD_MIN_LENGTH, PASSWORD_RULES, passwordProblems } from "../../lib/passwordRules"; export function PasswordRules({ password, username }: { password: string; username?: string }) { const { t } = useTranslation("users"); const failed = new Set(passwordProblems(password, username)); return ( ); }