{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "color-input",
  "type": "registry:ui",
  "title": "Color Input",
  "description": "A color input component",
  "registryDependencies": [
    "https://ui.ednesdayw.com/r/color-picker.json",
    "https://ui.ednesdayw.com/r/input.json"
  ],
  "files": [
    {
      "path": "src/registry/ui/color-input.tsx",
      "content": "\"use client\";\n\nimport { cn } from \"@/lib/utils\";\nimport { ColorPicker } from \"@/components/ui/color-picker\";\nimport { Input, type InputProps } from \"@/components/ui/input\";\n\ninterface ColorInputProps\n  extends Omit<InputProps, \"value\" | \"onChange\" | \"startContent\"> {\n  type?: \"hex\" | \"hex-alpha\";\n  value: string;\n  onChange: (value: string) => void;\n}\n\nconst ColorInput = ({\n  variant,\n  className,\n  value = \"#4ec4b8\",\n  type = \"hex\",\n  onChange,\n  ...props\n}: ColorInputProps) => {\n  return (\n    <Input\n      {...props}\n      variant={variant}\n      className={cn(\"p-2\", className)}\n      value={value}\n      onChange={(e) => {\n        const value = e.target.value;\n        onChange(value);\n      }}\n      startContent={\n        <ColorPicker\n          type={type}\n          sideOffset={16}\n          alignOffset={variant === \"underline\" ? -4 : -12}\n          value={value}\n          onChange={(value) => {\n            onChange(value);\n          }}\n        />\n      }\n    />\n  );\n};\n\nexport { ColorInput, type ColorInputProps };\n",
      "type": "registry:ui",
      "target": "components/wed/color-input.tsx"
    }
  ]
}