import { Property } from 'csstype'; import { type ChangeEvent } from 'react'; import type { BehaviorTrackingProps } from '../../core/types/behavior-tracking-props.js'; import { DataTestId } from '../../core/types/data-props.js'; import type { KeyboardEvents } from '../../core/types/events.js'; import type { FormControlProps } from '../../core/types/form-control-props.js'; import { MaskingProps } from '../../core/types/masking-props.js'; import { StylingProps } from '../../core/types/styling-props.js'; import type { FormControlRef } from '../shared-types.js'; import type { MessageTarget } from '../validation/message-routing.js'; /** * @public */ export type TextAreaProps = FormControlProps) => void | never, HTMLDivElement> & StylingProps & DataTestId & MaskingProps & KeyboardEvents & BehaviorTrackingProps & { /** * Internal: associates this control with a `_Form` rendered outside its * React subtree via the native `form` attribute. Unstable. * @internal */ _form?: string; /** * Internal: routes this control's native/Strato validation messages to the * field outlet (default), the enclosing form's outlet, or both. Unstable. * @internal */ _messageTarget?: MessageTarget | MessageTarget[]; /** * Handler that is called when the element's focus status changes. * @deprecated Use onFocus/onBlur instead. */ onFocusChange?: (isFocused: boolean) => void; placeholder?: string; /** * This attribute indicates whether the textarea is resizable by the user, and, if so, in which direction. * @defaultValue 'both' */ resize?: 'both' | 'vertical' | 'horizontal' | 'none'; /** * The visible width of the text control, in average character widths. * If it is specified, it must be a positive integer. * @defaultValue 20 */ cols?: number; /** * The number of visible text lines for the control. If it is specified, it must be a positive integer. * @defaultValue 2 */ rows?: number; /** * The minimum number of characters required that the user should enter. * Doesn't stop the user from removing characters so that the number entered goes past the minimum, * but it does make the value entered into the