import { FASTElement } from "@microsoft/fast-element"; import { CSSDesignToken } from "@microsoft/fast-foundation"; /** * # Textarea * * The Prompt Text Area control is designed for AI chat features and allows the user to enter and edit multiple lines of text. * */ export declare class Textarea extends FASTElement { svgColor: CSSDesignToken; svgColorDisabled: CSSDesignToken; /** * ## errorMessage * * For overriding the default error message. */ errorMessage: string; /** * ## disabled * * Puts the send button into a disabled state, where user input can still be inputed, but cannot be sent. */ disabled: boolean; /** * ## maxLength * * sets the max allowed character count of the text area */ maxLength: number; /** * ## placeholder * * sets a placeholder text to queue the user for typing */ placeholder?: string; /** * 33 showCharacterCount * * @public boolean */ hideCharacterCount: boolean; /** * ## name * * DOM name attribute */ name?: string; /** * ## hasMaxCharLimit * * When set to true when the max character limit has been reached */ hasMaxCharLimit?: boolean; /** * ## _characterCount * * @private * * the number of characters currently inputed into the text input */ private _characterCount; get characterCount(): number; /** * ## hasButtons * * True when buttons are slotted into the buttons slot */ hasButtons?: boolean; /** * ## buttons * * An array of html button elements slotted into the buttons slot * */ buttons: HTMLElement[]; buttonsChanged: () => void; /** * ## hasMessages * * true when messages are slotted in to the messages slot */ hasMessages?: boolean; /** * ## messages * * An array of html elements that have been slotted into the messges area. * * When messages are slotted in, the hasMessages boolean is set to true and class names are added in the html template. */ messages: HTMLElement[]; messagesChanged(): void; /** * ## hasAttachments * * True when attachments have been slotted into the attachments slot */ hasAttachments?: boolean; /** * ## attachments * * An array of html elements slotted into the attachments area */ attachments: HTMLElement[]; attachmentsChanged(): void; /** * ## inputRef * * A reference to the fluent text input. */ inputRef: HTMLTextAreaElement | null | undefined; /** * ## value * * The value of the current user input. */ _value: string | undefined; get value(): string | undefined; set value(newValue: string | undefined); /** * ## updateControlUiValues * * Sets the values for characterCount and value. Sets the data-value attribute to the textarea dom element. Resizes the textarea height to match the scroll height of the text area. * * @param value - string * @private */ private updateControlUiValues; /** * ## handleTextareaKeydown * * @param inputRef to FluentTextField which is actually FASTTextField * */ private handleTextareaInput; /** * ## handleTextareaPaste * * handles paste events for the textarea control that's nested inside the fabric-textarea */ private handleTextareaPaste; /** * ## handleTextareaKeydown * * Handles keydown events for the textarea control that's nested inside the fabric-textarea * * @param event - KeyboardEvent */ private handleTextareaKeydown; /** * ## isTextareaKeyPressed * * True when a key is pressed in the textarea control that's nested inside the fabric-textarea */ private isTextareaKeyPressed?; /** * ## handleTextareaEvents * * adds event handlers for the DOM textarea in the shadowRoot */ private handleTextareaEvents; /** * ## removeTextareaEvents */ private removeTextareaEvents; /** * ## handleTextareaHeight * * Resizes the textarea to accomodate more rows of text. Sets the height to the scroll height * * Textarea has limitations with fitting content through css, so it's required to calculate the size with javascript */ private handleTextareaHeight; /** * ## emitSubmitEvent * * Emits a TextareaSubmitEvent */ private emitSubmitEvent; /** * * ## handleSubmitButton * * called wben the submit button is pressed * * @param event */ private handleSubmitButton; /** * ## handleSubmitButtonEvent * * Adds an event listener to the submit / send button. Responds to click events. */ private handleSubmitButtonEvent; /** * ## removeSubmitButtonEvents * * removes event listeners for button events on submit button */ private removeSubmitButtonEvents; /** * ## handleKeydown * * handles keydown events for the root textarea element */ private handleKeydown; /** * ## handleKeyEvents * * A keydown event handler for the root fabric-textarea control. * * @private */ private handleKeyEvents; /** * ## removeKeyEvents * * Removes keydown events for the root fluent textarea element */ private removeKeyEvents; /** * ## andHasMaxCharLimit * * if hasMaxCharLimit is true set it to false */ private andHasMaxCharLimit; /** * ## handleClickEvents * * A click event handler for the root fabric-textarea control. * * @private */ private handleClickEvents; /** * ## removeClickEvents * * removes click events for the root fluent textarea element. */ private removeClickEvents; connectedCallback(): void; disconnectedCallback(): void; } //# sourceMappingURL=textarea.d.ts.map