import { CommonProps } from "@trackunit/react-components"; import { FormGroupProps } from "../FormGroup/FormGroup"; import { TextAreaBaseInputProps } from "./TextArea/TextAreaBaseInput"; type FormGroupExposedProps = Pick; export interface TextAreaFieldProps extends TextAreaBaseInputProps, FormGroupExposedProps, CommonProps { /** * Set the Maximal length of the value for the input. * Adds a TextLengthIndicator to the right of the helpText. */ maxLength?: number; /** * If a value is set, the field is rendered in its invalid state. */ errorMessage?: string; } /** * The `` component is used for multi-line text input. * Use when you need to allow users to enter a large amount of text, such as comments or descriptions. * * ### When to use * - Longer text inputs like comments, descriptions, or notes * - When the expected input is more than one line * - For free-form text that benefits from a larger input area * * ### When not to use * - Single-line inputs - use `TextField` instead * - Structured data like email or phone - use specialized field components * - Rich text editing - consider a rich text editor component * * @example Basic usage * ```tsx * import { TextAreaField } from "@trackunit/react-form-components"; * * const [description, setDescription] = useState(""); * * setDescription(e.target.value)} * placeholder="Enter a description..." * /> * ``` * @example With character limit * ```tsx * import { TextAreaField } from "@trackunit/react-form-components"; * * * ``` * @example With validation error * ```tsx * import { TextAreaField } from "@trackunit/react-form-components"; * * setNotes(e.target.value)} * errorMessage={notes.length < 10 ? "Notes must be at least 10 characters" : undefined} * /> * ``` * @param {TextAreaFieldProps} props - The props for the TextAreaField component * @returns {ReactElement} TextAreaField component */ export declare const TextAreaField: { ({ id, label, tip, helpText, helpAddon, errorMessage, isInvalid, maxLength, onChange, className, value, "data-testid": dataTestId, ref, disabled, readOnly, required, ...rest }: TextAreaFieldProps): import("react/jsx-runtime").JSX.Element; displayName: string; }; export {};