import React from "react"; import { FieldLabel } from "src/primitives/Field"; import { Textarea as PrimitiveTextarea } from "src/primitives/Textarea"; import type { TextareaSize } from "./constants"; type TextareaResize = "vertical" | "none"; type PrimitiveTextareaProps = React.ComponentProps; export interface TextareaProps extends Omit { /** Controlled value. */ value?: string | number; /** Size of the textarea. Controls default rows: small=1, medium=3, large=4. */ size?: TextareaSize; /** Resize behavior. */ resize?: TextareaResize; /** Label displayed above the textarea. */ label?: string; /** Error message displayed below the textarea. */ error?: string; /** Help text displayed below the textarea. Accepts string or ReactNode. */ helpText?: React.ReactNode; /** Maximum character limit. Counter visible at 85% capacity. */ maxLength?: number; /** Allow typing past maxLength, show error styling on count. */ unlimitedChars?: boolean; /** Prevent trimming whitespace on blur. */ disableTrimOnBlur?: boolean; /** Content to display before the textarea. */ prefix?: React.ReactNode; /** Content to display after the textarea. */ suffix?: React.ReactNode; /** Render the textarea without borders. */ nakedTextarea?: boolean; /** Props forwarded to the Label element. */ labelProps?: React.ComponentProps; /** Additional class name for the outermost wrapper. */ className?: string; } declare const Textarea: React.ForwardRefExoticComponent & React.RefAttributes>; export { Textarea };