/*! * Copyright 2022 Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0 */ import { ExtendedHTMLElement } from '../../helper/dom'; import { ValidationPattern } from '../../static'; export interface TextAreaProps { classNames?: string[]; attributes?: Record; label?: HTMLElement | ExtendedHTMLElement | string; autoFocus?: boolean; description?: ExtendedHTMLElement; mandatory?: boolean; fireModifierAndEnterKeyPress?: () => void; placeholder?: string; validationPatterns?: { operator?: 'and' | 'or'; patterns: ValidationPattern[]; }; value?: string; onChange?: (value: string) => void; onKeyPress?: (event: KeyboardEvent) => void; testId?: string; } export declare abstract class TextAreaAbstract { render: ExtendedHTMLElement; setValue: (value: string) => void; getValue: () => string; setEnabled: (enabled: boolean) => void; checkValidation: () => void; } export declare class TextAreaInternal extends TextAreaAbstract { private readonly inputElement; private readonly validationErrorBlock; private readonly props; private readyToValidate; render: ExtendedHTMLElement; constructor(props: TextAreaProps); setValue: (value: string) => void; getValue: () => string; setEnabled: (enabled: boolean) => void; checkValidation: () => void; } export declare class TextArea extends TextAreaAbstract { render: ExtendedHTMLElement; constructor(props: TextAreaProps); setValue: (value: string) => void; getValue: () => string; setEnabled: (enabled: boolean) => void; checkValidation: () => void; }