{"$schema":"https://ui.shadcn.com/schema/registry-item.json","name":"textarea","type":"registry:ui","title":"Textarea","description":"A multi-line text field that grows with its content.","dependencies":[],"registryDependencies":["https://dashral.com/r/utils.json","https://dashral.com/r/field.json"],"files":[{"path":"registry/dashral/textarea.tsx","type":"registry:file","target":"components/dashral/textarea.tsx","content":"\"use client\"\n\nimport * as React from \"react\"\n\nimport { cn } from \"./lib/utils\"\nimport { FieldWrapper, splitFieldProps, useFieldControl, type FieldClassNames, type FieldOwnProps } from \"./field\"\n\ntype TextareaProps = React.ComponentProps<\"textarea\"> &\n  FieldOwnProps & {\n    classNames?: FieldClassNames & { textarea?: string }\n  }\n\n/** A text area that grows with what's typed. Give it a label, description or error and it becomes a whole field. */\nfunction Textarea(props: TextareaProps) {\n  const [field, control] = splitFieldProps(props)\n  return (\n    <FieldWrapper {...field}>\n      <TextareaControl {...control} />\n    </FieldWrapper>\n  )\n}\n\nfunction TextareaControl({ className, classNames, ...rest }: Omit<TextareaProps, keyof FieldOwnProps>) {\n  const props = useFieldControl(rest)\n  return (\n    <textarea\n      data-slot=\"textarea\"\n      className={cn(\n        \"flex field-sizing-content min-h-16 w-full rounded-md border border-input bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-2 focus-visible:ring-ring/15 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/15 md:text-sm [&[readonly]]:bg-muted/50 [&[readonly]]:text-muted-foreground\",\n        className,\n        classNames?.textarea\n      )}\n      {...props}\n    />\n  )\n}\n\nexport { Textarea, type TextareaProps }\n"}]}