{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "password-input",
  "title": "Password Input",
  "description": "Password field with a built-in visibility toggle.",
  "dependencies": [
    "@vllnt/ui@^0.3.0"
  ],
  "registryDependencies": [],
  "files": [
    {
      "path": "registry/default/password-input/password-input.tsx",
      "content": "\"use client\";\n\nimport * as React from \"react\";\n\nimport { Eye, EyeOff } from \"lucide-react\";\n\nimport { cn } from \"@vllnt/ui\";\n\nexport type PasswordInputProps = Omit<\n  React.ComponentPropsWithoutRef<\"input\">,\n  \"type\"\n> & {\n  hideLabel?: string;\n  showLabel?: string;\n};\n\nconst PasswordInput = ({\n  className,\n  hideLabel = \"Hide password\",\n  ref: reference,\n  showLabel = \"Show password\",\n  ...props\n}: PasswordInputProps & { ref?: React.Ref<HTMLInputElement> }) => {\n  const [visible, setVisible] = React.useState(false);\n\n  return (\n    <div className=\"relative\">\n      <input\n        className={cn(\n          \"flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 pr-10 text-base ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm\",\n          className,\n        )}\n        ref={reference}\n        type={visible ? \"text\" : \"password\"}\n        {...props}\n      />\n      <button\n        aria-label={visible ? hideLabel : showLabel}\n        className=\"absolute inset-y-0 right-0 flex items-center justify-center px-3 text-muted-foreground transition-colors hover:text-foreground\"\n        onClick={() => {\n          setVisible((previous) => !previous);\n        }}\n        type=\"button\"\n      >\n        {visible ? <EyeOff className=\"size-4\" /> : <Eye className=\"size-4\" />}\n      </button>\n    </div>\n  );\n};\nPasswordInput.displayName = \"PasswordInput\";\n\nexport { PasswordInput };\n",
      "type": "registry:component"
    }
  ],
  "type": "registry:component",
  "version": "0.3.0",
  "stability": "stable"
}
