import TerraElement, { type TerraFormControl } from '../../internal/terra-element.js'; import type { CSSResultGroup } from 'lit'; /** * @summary A textarea component with consistent styling across the design system. * @documentation https://terra-ui.netlify.app/components/textarea * @status stable * @since 1.0 * * @slot help-text - Text that describes how to use the textarea. Alternatively, you can use the `help-text` attribute. * * @event terra-input - Emitted when the textarea receives input. * @event terra-change - Emitted when an alteration to the control's value is committed by the user. * @event terra-focus - Emitted when the textarea gains focus. * @event terra-blur - Emitted when the textarea loses focus. * @event terra-invalid - Emitted when the form control has been checked for validity and its constraints aren't satisfied. * * @csspart base - The component's base wrapper. * @csspart textarea - The internal textarea control. * @csspart form-control-help-text - The help text's wrapper. */ export default class TerraTextarea extends TerraElement implements TerraFormControl { static styles: CSSResultGroup; private readonly formControlController; private readonly hasSlotController; textarea: HTMLTextAreaElement; hasFocus: boolean; name: string; value: string; placeholder: string; disabled: boolean; readonly: boolean; required: boolean; autocomplete?: string; minlength?: number; maxlength?: number; rows?: number; cols?: number; label: string; hideLabel: boolean; helpText: string; resize: 'none' | 'both' | 'horizontal' | 'vertical'; /** The default value of the form control. Primarily used for resetting the form control. */ defaultValue: string; /** * By default, form controls are associated with the nearest containing `