{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "password-input",
  "type": "registry:component",
  "title": "Password Input",
  "description": "Password field with a built-in visibility toggle.",
  "dependencies": [
    "@vllnt/ui@^0.2.1"
  ],
  "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 = React.forwardRef<HTMLInputElement, PasswordInputProps>(\n  (\n    {\n      className,\n      hideLabel = \"Hide password\",\n      showLabel = \"Show password\",\n      ...props\n    },\n    reference,\n  ) => {\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  },\n);\nPasswordInput.displayName = \"PasswordInput\";\n\nexport { PasswordInput };\n",
      "type": "registry:component"
    }
  ],
  "version": "0.2.1",
  "stability": "stable"
}
