{ "$schema": "https://ui.shadcn.com/schema/registry-item.json", "name": "account-change-password-01", "type": "registry:block", "description": "Change password form with validation", "registryDependencies": [ "button", "card", "input", "label" ], "files": [ { "path": "creative-tim-ui/blocks/account-change-password-01/page.tsx", "content": "\"use client\"\n\nimport * as React from \"react\"\nimport { CheckCircle2, Eye, EyeOff, Lock, Shield, XCircle } from \"lucide-react\"\n\nimport { Button } from \"@/components/ui/button\"\nimport { Card } from \"@/components/ui/card\"\nimport { Input } from \"@/components/ui/input\"\nimport { Label } from \"@/components/ui/label\"\n\nfunction PasswordField({\n id,\n label,\n ...props\n}: {\n id: string\n label: string\n} & React.InputHTMLAttributes) {\n const [showPassword, setShowPassword] = React.useState(false)\n\n return (\n
\n \n
\n \n setShowPassword(!showPassword)}\n >\n {showPassword ? (\n \n ) : (\n \n )}\n \n {showPassword ? \"Hide password\" : \"Show password\"}\n \n \n
\n
\n )\n}\n\nconst PASSWORD_REQUIREMENTS = [\n {\n label: \"At least 8 characters long\",\n regex: /.{8,}/,\n },\n {\n label: \"One uppercase letter (A-Z)\",\n regex: /[A-Z]/,\n },\n {\n label: \"One lowercase letter (a-z)\",\n regex: /[a-z]/,\n },\n {\n label: \"One number (0-9)\",\n regex: /[0-9]/,\n },\n {\n label: \"One special character (!@#$%^&*)\",\n regex: /[!@#$%^&*()_+\\-=\\[\\]{};':\"\\\\|,.<>\\/?]/,\n },\n]\n\nexport default function AccountChangePassword01() {\n const [newPassword, setNewPassword] = React.useState(\"\")\n\n return (\n
\n \n
\n
\n
\n \n
\n
\n

\n Change Password\n

\n

\n Update your password to keep your account secure\n

\n
\n
\n
\n\n
\n
\n
e.preventDefault()}>\n \n setNewPassword(e.target.value)}\n value={newPassword}\n />\n \n
\n \n \n
\n \n
\n\n
\n
\n

\n \n Password Requirements\n

\n

\n Your password must meet the following criteria for enhanced\n security:\n

\n
    \n {PASSWORD_REQUIREMENTS.map((req, index) => {\n const meetsRequirement = req.regex.test(newPassword)\n return (\n
  • \n {meetsRequirement ? (\n \n ) : (\n \n )}\n \n {req.label}\n \n
  • \n )\n })}\n
\n
\n\n
\n

\n Security Best Practices\n

\n
    \n
  • \n \n Change your password regularly (every 90 days)\n
  • \n
  • \n \n Never share your password with anyone\n
  • \n
  • \n \n Use a unique password for each account\n
  • \n
  • \n \n Consider using a password manager\n
  • \n
\n
\n
\n
\n
\n
\n )\n}\n", "type": "registry:page", "target": "app/account-change-password/page.tsx" } ], "meta": { "iframeHeight": "700px", "container": "w-full bg-surface min-h-svh flex px-4 py-12 items-center md:py-20 justify-center min-w-0", "mobile": "component" }, "categories": [ "account" ] }