{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "auth30",
  "title": "PIN Keypad Unlock",
  "description": "Full-height numeric keypad lock screen with PIN dots, a biometric shortcut, and a backspace key. Perfect for mobile app locks and quick re-authentication.",
  "dependencies": [
    "clsx",
    "tailwind-merge",
    "lucide-react"
  ],
  "registryDependencies": [],
  "files": [
    {
      "path": "registry/auth30/auth30.tsx",
      "content": "\"use client\";\n\nimport { Delete, Fingerprint } from \"lucide-react\";\nimport Link from \"next/link\";\nimport { useState } from \"react\";\nimport { cn } from \"@/lib/utils\";\n\ninterface Auth30Props {\n  heading?: string;\n  description?: string;\n  pinLength?: number;\n  labels?: {\n    biometric?: string;\n    backspace?: string;\n  };\n  forgotPrompt?: {\n    text: string;\n    linkLabel: string;\n    href: string;\n  };\n  className?: string;\n}\n\nexport const auth30Demo: Auth30Props = {\n  heading: \"Enter your PIN\",\n  description: \"Use your 4-digit PIN to unlock your account.\",\n  pinLength: 4,\n  labels: {\n    biometric: \"Use biometrics\",\n    backspace: \"Delete\",\n  },\n  forgotPrompt: {\n    text: \"Forgot your PIN?\",\n    linkLabel: \"Reset it\",\n    href: \"https://beste.co\",\n  },\n};\n\nexport function Auth30({\n  heading,\n  description,\n  pinLength = 4,\n  labels = {},\n  forgotPrompt,\n  className,\n}: Auth30Props) {\n  const [pin, setPin] = useState(\"\");\n\n  const { biometric: biometricLabel, backspace: backspaceLabel } = labels;\n\n  const append = (digit: string) =>\n    setPin((value) => (value.length < pinLength ? value + digit : value));\n  const backspace = () => setPin((value) => value.slice(0, -1));\n\n  const digits = [\"1\", \"2\", \"3\", \"4\", \"5\", \"6\", \"7\", \"8\", \"9\"];\n\n  return (\n    <section\n      className={cn(\n        \"flex min-h-screen items-center justify-center px-4 py-16 md:py-24 w-full\",\n        className\n      )}\n    >\n      <div className=\"w-full max-w-xs text-center\">\n        {heading && (\n          <h1 className=\"text-2xl font-bold md:text-3xl\">{heading}</h1>\n        )}\n        {description && (\n          <p className=\"mt-2 text-base text-muted-foreground\">{description}</p>\n        )}\n\n        <div className=\"mt-8 flex justify-center gap-3\">\n          {Array.from({ length: pinLength }).map((_, index) => (\n            <span\n              key={index}\n              className={cn(\n                \"size-3.5 rounded-full transition-colors\",\n                index < pin.length ? \"bg-foreground\" : \"border bg-transparent\"\n              )}\n            />\n          ))}\n        </div>\n\n        <div className=\"mt-10 grid grid-cols-3 place-items-center gap-4\">\n          {digits.map((digit) => (\n            <button\n              key={digit}\n              type=\"button\"\n              onClick={() => append(digit)}\n              className=\"flex size-16 items-center justify-center rounded-full border bg-card text-2xl font-medium transition-colors hover:bg-muted focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring active:bg-muted\"\n            >\n              {digit}\n            </button>\n          ))}\n\n          {biometricLabel ? (\n            <button\n              type=\"button\"\n              aria-label={biometricLabel}\n              className=\"flex size-16 items-center justify-center rounded-full text-muted-foreground transition-colors hover:bg-muted focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring\"\n            >\n              <Fingerprint className=\"size-6\" />\n            </button>\n          ) : (\n            <span aria-hidden=\"true\" />\n          )}\n\n          <button\n            type=\"button\"\n            onClick={() => append(\"0\")}\n            className=\"flex size-16 items-center justify-center rounded-full border bg-card text-2xl font-medium transition-colors hover:bg-muted focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring active:bg-muted\"\n          >\n            0\n          </button>\n\n          <button\n            type=\"button\"\n            aria-label={backspaceLabel}\n            onClick={backspace}\n            className=\"flex size-16 items-center justify-center rounded-full text-muted-foreground transition-colors hover:bg-muted focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:opacity-40\"\n            disabled={pin.length === 0}\n          >\n            <Delete className=\"size-6\" />\n          </button>\n        </div>\n\n        {forgotPrompt && (\n          <p className=\"mt-10 text-sm text-muted-foreground\">\n            {forgotPrompt.text}{\" \"}\n            <Link\n              href={forgotPrompt.href}\n              className=\"font-medium text-foreground hover:underline\"\n            >\n              {forgotPrompt.linkLabel}\n            </Link>\n          </p>\n        )}\n      </div>\n    </section>\n  );\n}\n",
      "type": "registry:component",
      "target": "components/beste/block/auth30.tsx"
    }
  ],
  "type": "registry:block"
}