import "./index.css"; import React, { type TextareaHTMLAttributes } from "react"; export type TextAreaResize = "auto" | "none" | "vertical"; export type TextAreaSize = "lg" | "md"; interface TextAreaBaseProps { /** Helper text displayed below the textarea. Styled as error text when `invalid`. */ description?: string; /** Whether the textarea is in an invalid state. */ invalid?: boolean; /** Controls resize behavior. */ resize?: TextAreaResize; /** Visible height in lines. */ rows?: number; /** The size of the textarea. */ size?: TextAreaSize; } interface TextAreaWithVisibleLabel extends TextAreaBaseProps { /** If true, the label is visually hidden and set as aria-label. */ hideLabel?: false; /** The label text for the textarea. */ label: React.ReactNode; } interface TextAreaWithHiddenLabel extends TextAreaBaseProps { /** If true, the label is visually hidden and set as aria-label. */ hideLabel: true; /** The label text for the textarea. Must be a string when hidden. */ label: string; } interface TextAreaWithAriaLabelledBy extends TextAreaBaseProps { /** ID of an external label element. Use instead of `label`. */ "aria-labelledby": string; hideLabel?: never; label?: never; } export type TextAreaCustomProps = TextAreaWithAriaLabelledBy | TextAreaWithHiddenLabel | TextAreaWithVisibleLabel; export type TextAreaProps = Omit, keyof TextAreaCustomProps | "rows"> & TextAreaCustomProps; export declare const TextArea: React.ForwardRefExoticComponent>; export {}; //# sourceMappingURL=TextArea.d.ts.map