{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "currency-input",
  "type": "registry:ui",
  "title": "Currency input",
  "description": "Money input with a currency code prefix, decimal keypad on mobile and tabular numbers. Controlled via a string value to avoid rounding issues in React forms.",
  "dependencies": [],
  "registryDependencies": [
    "https://ui.minidev.pro/r/input.json",
    "utils"
  ],
  "files": [
    {
      "path": "registry/ui/currency-input.tsx",
      "type": "registry:ui",
      "target": "components/ui/currency-input.tsx",
      "content": "\"use client\"\nimport * as React from \"react\"\nimport { cn } from \"@/lib/utils\"\nimport { inputVariants } from \"@/components/ui/input\"\n\ntype CurrencyInputProps = {\n  value?: string\n  onChange?: (value: string) => void\n  currency?: string\n  disabled?: boolean\n  className?: string\n  id?: string\n  \"aria-label\"?: string\n}\n\nfunction CurrencyInput({\n  value,\n  onChange,\n  currency = \"USD\",\n  disabled,\n  className,\n  id,\n  ...a11y\n}: CurrencyInputProps) {\n  return (\n    <div data-slot=\"currency-input\" className={cn(\"relative w-40\", className)}>\n      <span className=\"pointer-events-none absolute top-1/2 left-3 -translate-y-1/2 text-xs font-medium text-fg-muted\">\n        {currency}\n      </span>\n      <input\n        id={id}\n        inputMode=\"decimal\"\n        disabled={disabled}\n        value={value}\n        aria-label={a11y[\"aria-label\"] ?? `Amount in ${currency}`}\n        placeholder=\"0.00\"\n        className={cn(inputVariants({ size: \"default\" }), \"pl-12 tabular-nums\")}\n        onChange={(e) => onChange?.(e.target.value)}\n      />\n    </div>\n  )\n}\nexport { CurrencyInput }\n"
    }
  ]
}
