{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "textarea",
  "type": "registry:ui",
  "title": "Textarea",
  "description": "A multi-line text field that can grow with its content (autoResize).",
  "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/textarea.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 textareaVariants = tv({\n  base: [\n    \"block w-full rounded-card 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  ],\n  variants: {\n    size: {\n      sm: \"min-h-16 rounded-control px-2.5 py-1.5 text-[13px]\",\n      md: \"min-h-20 px-3 py-2 text-sm\",\n      lg: \"min-h-24 px-3.5 py-2.5 text-base\",\n    },\n    /** Grow with the content (CSS field-sizing; browsers without it keep a fixed height). */\n    autoResize: {\n      true: \"field-sizing-content resize-none\",\n      false: \"resize-y\",\n    },\n  },\n  defaultVariants: { size: \"md\", autoResize: false },\n});\n\nexport interface TextareaProps\n  extends React.TextareaHTMLAttributes<HTMLTextAreaElement>,\n    VariantProps<typeof textareaVariants> {\n  isInvalid?: boolean;\n}\n\n/** A multi-line text field that can grow with its content (autoResize). */\nexport const Textarea = React.forwardRef<HTMLTextAreaElement, TextareaProps>(\n  ({ className, size, autoResize, isInvalid, ...rest }, ref) => {\n    const props = useFieldControl({ ...rest, \"aria-invalid\": isInvalid || rest[\"aria-invalid\"] || undefined });\n    return <textarea ref={ref} className={cn(textareaVariants({ size, autoResize }), className)} {...props} />;\n  },\n);\nTextarea.displayName = \"Textarea\";\n"
    }
  ],
  "docs": "Docs and examples: https://junco.madebytobi.com/docs/components/textarea",
  "meta": {
    "hash": "3a885b5d1dca6830",
    "source": "packages/react/src/components/textarea.tsx",
    "exports": [
      "textareaVariants",
      "TextareaProps",
      "Textarea"
    ],
    "props": {
      "Textarea": {
        "extends": "React.TextareaHTMLAttributes<HTMLTextAreaElement>, VariantProps<typeof textareaVariants>",
        "props": [
          {
            "name": "isInvalid",
            "optional": true,
            "type": "boolean"
          }
        ]
      }
    },
    "variants": {
      "variants": {
        "size": [
          "sm",
          "md",
          "lg"
        ],
        "autoResize": [
          "true",
          "false"
        ]
      },
      "defaultVariants": {
        "size": "md",
        "autoResize": "false"
      }
    },
    "docsUrl": "https://junco.madebytobi.com/docs/components/textarea"
  }
}
