{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "input",
  "type": "registry:ui",
  "title": "Input",
  "description": "A single-line text input in three sizes, with an invalid state.",
  "categories": [
    "ui"
  ],
  "dependencies": [
    "class-variance-authority"
  ],
  "registryDependencies": [
    "@rivier-ui/theme",
    "@rivier-ui/cn"
  ],
  "files": [
    {
      "path": "registry/ui/input.tsx",
      "type": "registry:ui",
      "target": "components/ui/input.tsx",
      "content": "/**\n * @name input\n * @category ui\n * @description A single-line text input in three sizes, with an invalid state.\n * @when Short free text: a name, an email, a number. Wrap it in field for a label and an error; use textarea for several lines, select for a fixed list, input-group to add an icon or a button inside the edge.\n * @example\n * <Input type=\"email\" placeholder=\"you@example.com\" />\n * <Input size=\"sm\" defaultValue=\"Rivier\" />\n * <Input aria-invalid=\"true\" aria-label=\"Email\" defaultValue=\"not-an-email\" />\n */\nimport { cva, type VariantProps } from \"class-variance-authority\";\nimport type { ComponentProps } from \"react\";\nimport { cn } from \"@/lib/cn\";\n\nexport const inputVariants = cva(\n  \"w-full min-w-0 rounded-control border border-input bg-background text-sm text-foreground transition-[border-color,opacity] duration-instant ease-out placeholder:text-muted-foreground disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive motion-reduce:transition-none\",\n  {\n    variants: {\n      size: {\n        sm: \"h-control-sm px-2.5\",\n        md: \"h-control px-3\",\n        lg: \"h-control-lg px-4 text-base\",\n      },\n    },\n    defaultVariants: { size: \"md\" },\n  },\n);\n\n/** `size` is the control's height (sm, md, lg), not the native character-width attribute. */\nexport type InputProps = Omit<ComponentProps<\"input\">, \"size\"> & VariantProps<typeof inputVariants>;\n\nexport function Input({ className, size, type = \"text\", ...props }: InputProps) {\n  return (\n    <input\n      data-slot=\"input\"\n      type={type}\n      className={cn(\n        inputVariants({ size }),\n        \"file:me-3 file:h-full file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground\",\n        className,\n      )}\n      {...props}\n    />\n  );\n}\n"
    }
  ],
  "meta": {
    "category": "ui",
    "when": "Short free text: a name, an email, a number. Wrap it in field for a label and an error; use textarea for several lines, select for a fixed list, input-group to add an icon or a button inside the edge.",
    "example": "<Input type=\"email\" placeholder=\"you@example.com\" />\n<Input size=\"sm\" defaultValue=\"Rivier\" />\n<Input aria-invalid=\"true\" aria-label=\"Email\" defaultValue=\"not-an-email\" />",
    "client": false
  }
}
