import { ReactNode } from 'react'; /** * Resize behavior options for TextArea */ export type TextAreaResize = 'none' | 'vertical' | 'horizontal' | 'both'; /** * Available font size options from theme typography */ export type TextAreaFontSize = 'xs' | 'sm' | 'base' | 'md' | 'lg' | 'xl'; /** * Props for the TextArea component */ export interface TextAreaProps { /** * Current value (controlled mode) */ value?: string; /** * Default value (uncontrolled mode) */ defaultValue?: string; /** * Callback when value changes */ onChange?: (event: React.ChangeEvent) => void; /** * Placeholder text */ placeholder?: string; /** * Label for the textarea */ label?: ReactNode; /** * Minimum number of rows * @default 3 */ rows?: number; /** * Maximum number of rows for auto-expansion * If provided, the textarea will auto-expand up to this number of rows */ maxRows?: number; /** * Whether the textarea is disabled */ disabled?: boolean; /** * Whether the textarea is read-only */ readOnly?: boolean; /** * Whether the field is required */ required?: boolean; /** * Whether the textarea is in error state */ error?: boolean; /** * Error message to display */ errorMessage?: ReactNode; /** * Assistive/help message to display */ assistiveMessage?: ReactNode; /** * Resize behavior for the textarea * @default 'vertical' */ resize?: TextAreaResize; /** * Whether to remove the border */ noBorder?: boolean; /** * Name attribute for the textarea */ name?: string; /** * ID attribute for the textarea */ id?: string; /** * Accessible label (required if no visible label) */ 'aria-label'?: string; /** * Custom className for the container */ className?: string; /** * Whether to take full width * @default true */ fullWidth?: boolean; /** * Test ID for testing purposes (deprecated, use dataTestId) */ 'data-testid'?: string; /** * Test identifier for automated testing */ dataTestId?: string; /** * Data identifier for ib-ui compatibility */ dataId?: string; /** * Maximum character length */ maxLength?: number; /** * Whether to show the character count below the textarea. * When true, displays the current character count aligned to the right. * When maxLength is set, shows "current / max characters" format. * @default false */ showCharCount?: boolean; /** * Callback when textarea receives focus */ onFocus?: (event: React.FocusEvent) => void; /** * Callback when textarea loses focus */ onBlur?: (event: React.FocusEvent) => void; /** * Callback when a key is pressed */ onKeyDown?: (event: React.KeyboardEvent) => void; /** * Custom color for focus state border and ring. * When provided, overrides the default focus styling. */ focusColor?: string; /** * Font size for the textarea text and placeholder. * Uses theme typography font size options. * @default 'sm' */ fontSize?: TextAreaFontSize; } //# sourceMappingURL=TextArea.types.d.ts.map