import type { ReactNode } from 'react'; import React from 'react'; import type { EitherInclusive, ForwardedRefComponent } from '../../util/utility-types'; import type { Status } from '../../util/variant-types'; import FieldLabel from '../FieldLabel'; type TextareaFieldProps = React.TextareaHTMLAttributes & { /** * Text content of the field upon instantiation */ children?: string; /** * CSS class names that can be appended to the component. */ className?: string; /** * Disables the field and prevents editing the contents */ disabled?: boolean; /** * Text under the textarea used to provide validation hints or error message to describe the input error. */ fieldNote?: ReactNode; /** * HTML id for the component. Can be used with a custom Label component */ id?: string; /** * Behaves similar to `maxLength` but allows the user to continue typing more text. * Should not be larger than `maxLength`, if present. */ recommendedMaxLength?: number; /** * Whether it should show the field hint or not * * **Default is `"false"`**. */ showHint?: boolean; /** * Status for the field state * * **Default is `"default"`**. */ status?: 'default' | Extract; /** * Add additional descriptive text for the field name. */ subLabel?: ReactNode; } & EitherInclusive<{ /** * Visible text label for the component. */ label: string; }, { /** * Aria-label to provide an accesible name for the text input if no visible label is provided. */ 'aria-label': string; }>; type TextareaFieldType = ForwardedRefComponent & { TextArea?: typeof TextArea; Label?: typeof FieldLabel; }; /** * Base component, applying styles to a