{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "input",
  "type": "registry:ui",
  "title": "Input",
  "description": "A single-line text field. Sizes sm, md and lg; isInvalid sets aria-invalid; picks up its label and errors from a Field.",
  "dependencies": [
    "tailwind-variants@^1.0.0"
  ],
  "registryDependencies": [
    "https://junco.madebytobi.com/r/field.json",
    "https://junco.madebytobi.com/r/junco-theme.json",
    "https://junco.madebytobi.com/r/utils.json"
  ],
  "files": [
    {
      "path": "registry/junco/ui/input.tsx",
      "type": "registry:ui",
      "content": "import * as React from \"react\";\nimport { tv, type VariantProps } from \"tailwind-variants\";\nimport { cn } from \"@/lib/utils\";\nimport { useFieldControl } from \"@/components/ui/field\";\n\nexport const inputVariants = tv({\n  base: [\n    \"block w-full border border-input bg-surface text-foreground\",\n    \"placeholder:text-muted-foreground\",\n    \"transition-[border-color,box-shadow] duration-fast ease-standard\",\n    \"focus-visible:border-transparent focus-visible:outline-2 focus-visible:-outline-offset-1 focus-visible:outline-ring\",\n    \"disabled:cursor-not-allowed disabled:opacity-50\",\n    \"aria-invalid:border-destructive aria-invalid:focus-visible:outline-destructive\",\n    \"file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground\",\n  ],\n  variants: {\n    size: {\n      sm: \"h-8 rounded-control px-2.5 text-[13px]\",\n      md: \"h-9 rounded-card px-3 text-sm\",\n      lg: \"h-11 rounded-card px-3.5 text-base\",\n    },\n  },\n  defaultVariants: { size: \"md\" },\n});\n\nexport interface InputProps\n  extends Omit<React.InputHTMLAttributes<HTMLInputElement>, \"size\">,\n    VariantProps<typeof inputVariants> {\n  /** Marks the field invalid (sets aria-invalid). Pair it with an error message linked by aria-describedby. */\n  isInvalid?: boolean;\n}\n\n/** A single-line text field. Sizes sm, md and lg; isInvalid sets aria-invalid; picks up its label and errors from a Field. */\nexport const Input = React.forwardRef<HTMLInputElement, InputProps>(\n  ({ className, size, type = \"text\", isInvalid, ...rest }, ref) => {\n    const props = useFieldControl({ ...rest, \"aria-invalid\": isInvalid || rest[\"aria-invalid\"] || undefined });\n    return <input ref={ref} type={type} className={cn(inputVariants({ size }), className)} {...props} />;\n  },\n);\nInput.displayName = \"Input\";\n"
    }
  ],
  "docs": "Docs and examples: https://junco.madebytobi.com/docs/components/input",
  "meta": {
    "hash": "7b97305be9313a22",
    "source": "packages/react/src/components/input.tsx",
    "exports": [
      "inputVariants",
      "InputProps",
      "Input"
    ],
    "props": {
      "Input": {
        "extends": "Omit<React.InputHTMLAttributes<HTMLInputElement>, \"size\">, VariantProps<typeof inputVariants>",
        "props": [
          {
            "name": "isInvalid",
            "optional": true,
            "type": "boolean",
            "description": "Marks the field invalid (sets aria-invalid). Pair it with an error message linked by aria-describedby."
          }
        ]
      }
    },
    "variants": {
      "variants": {
        "size": [
          "sm",
          "md",
          "lg"
        ]
      },
      "defaultVariants": {
        "size": "md"
      }
    },
    "docsUrl": "https://junco.madebytobi.com/docs/components/input"
  }
}
