{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "password-input",
  "type": "registry:ui",
  "title": "Password Input",
  "dependencies": [
    "@base-ui-next/react",
    "class-variance-authority"
  ],
  "registryDependencies": [
    "https://hamur.dev/r/react/utils.json",
    "https://hamur.dev/r/react/button.json"
  ],
  "files": [
    {
      "path": "react/password-input.tsx",
      "content": "'use client'\n\nimport type * as React from 'react' // base-ui-next/ui password-input@0.1.1\nimport { PasswordInput as PasswordInputPrimitive } from '@base-ui-next/react/password-input'\nimport type { VariantProps } from 'class-variance-authority'\nimport { cn } from '@/lib/utils'\nimport { buttonVariants } from '@/components/ui/button'\n\nconst passwordInputClassName = 'relative flex w-full items-center'\n\nconst passwordInputInputClassName =\n  'h-9 w-full min-w-0 rounded-md border border-input bg-transparent px-2.5 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 pe-10 [&::-ms-reveal]:hidden'\n\nconst passwordInputToggleClassName =\n  'absolute inset-y-0 end-2 my-auto text-muted-foreground hover:text-foreground'\n\nconst passwordInputIndicatorClassName = 'flex items-center justify-center'\n\nconst passwordInputIndicatorEyeClassName = 'size-4 [[data-visible]>&]:hidden'\n\nconst passwordInputIndicatorEyeOffClassName = 'hidden size-4 [[data-visible]>&]:block'\n\ntype ButtonVariants = VariantProps<typeof buttonVariants>\n\nfunction SvgIcon({ children, ...props }: React.ComponentProps<'svg'>) {\n  return (\n    <svg\n      xmlns=\"http://www.w3.org/2000/svg\"\n      viewBox=\"0 0 24 24\"\n      fill=\"none\"\n      stroke=\"currentColor\"\n      strokeWidth=\"2\"\n      strokeLinecap=\"round\"\n      strokeLinejoin=\"round\"\n      aria-hidden=\"true\"\n      {...props}\n    >\n      {children}\n    </svg>\n  )\n}\n\nfunction PasswordInput({ className, ...props }: PasswordInputPrimitive.Root.Props) {\n  return (\n    <PasswordInputPrimitive.Root\n      data-slot=\"password-input\"\n      className={cn(passwordInputClassName, className)}\n      {...props}\n    />\n  )\n}\n\nfunction PasswordInputInput({ className, ...props }: PasswordInputPrimitive.Input.Props) {\n  return (\n    <PasswordInputPrimitive.Input\n      data-slot=\"password-input-input\"\n      className={cn(passwordInputInputClassName, className)}\n      {...props}\n    />\n  )\n}\n\nfunction PasswordInputToggle({\n  className,\n  children,\n  variant = 'ghost',\n  size = 'icon-xs',\n  ...props\n}: PasswordInputPrimitive.Toggle.Props & ButtonVariants) {\n  return (\n    <PasswordInputPrimitive.Toggle\n      data-slot=\"password-input-toggle\"\n      className={cn(buttonVariants({ variant, size }), passwordInputToggleClassName, className)}\n      {...props}\n    >\n      {children ?? <PasswordInputIndicator />}\n    </PasswordInputPrimitive.Toggle>\n  )\n}\n\nfunction PasswordInputIndicator({\n  className,\n  children,\n  ...props\n}: PasswordInputPrimitive.Indicator.Props) {\n  return (\n    <PasswordInputPrimitive.Indicator\n      data-slot=\"password-input-indicator\"\n      className={cn(passwordInputIndicatorClassName, className)}\n      {...props}\n    >\n      {children ?? (\n        <>\n          <SvgIcon className={passwordInputIndicatorEyeClassName}>\n            <path d=\"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0\" />\n            <circle cx=\"12\" cy=\"12\" r=\"3\" />\n          </SvgIcon>\n          <SvgIcon className={passwordInputIndicatorEyeOffClassName}>\n            <path d=\"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49\" />\n            <path d=\"M14.084 14.158a3 3 0 0 1-4.242-4.242\" />\n            <path d=\"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143\" />\n            <path d=\"m2 2 20 20\" />\n          </SvgIcon>\n        </>\n      )}\n    </PasswordInputPrimitive.Indicator>\n  )\n}\n\nexport { PasswordInput, PasswordInputIndicator, PasswordInputInput, PasswordInputToggle }\n",
      "type": "registry:ui",
      "target": "@ui/password-input.tsx"
    }
  ],
  "meta": {
    "baseUiNext": {
      "version": "0.1.1",
      "hash": "088b1b5711b81c20e752478ce7fcdd9422e6cc5177fd179ea8482c5f52252a4a",
      "files": {
        "@ui/password-input.tsx": "edc89bbee8682742819ffdad7b9fc0a6281cef1c82988dedfaa1b525a7cdd77d"
      }
    }
  }
}
