import { EventEmitter } from '../../stencil-public-runtime'; import { ErrorMap } from '../cat-form-hint/cat-form-hint'; /** * Textarea specifies a control that allows user to write text over multiple * rows. Used when the expected user input is long. For shorter input, use the * input component. * * @slot hint - Optional hint element to be displayed with the textarea. * @slot label - The slotted label. If both the label property and the label slot are present, only the label slot will be displayed. * @slot counter - Custom counter element to be displayed in the top right corner of the label. * @part label - The native label element. * @part textarea - The native textarea element. */ export declare class CatTextarea { private readonly _id; private get id(); private textarea; private errorMapSrc?; hostElement: HTMLElement; hasSlottedLabel: boolean; hasSlottedHint: boolean; hasSlottedCounter: boolean; errorMap?: ErrorMap | true; internals: ElementInternals; /** * Whether the label need a marker to shown if the textarea is required or optional. */ requiredMarker?: 'none' | 'required' | 'optional' | 'none!' | 'optional!' | 'required!'; /** * Whether the label is on top or left. */ horizontal?: boolean; /** * If the horizontal value is not provided, this fallback value is used. Can be set by form-group. * @internal */ fallbackHorizontal?: boolean; /** * Hint for form autofill feature. */ autoComplete?: string; /** * Whether the textarea is disabled. */ disabled: boolean; /** * Optional hint text(s) to be displayed with the textarea. */ hint?: string | string[]; /** * A unique identifier for the input. */ identifier?: string; /** * The label for the textarea. */ label: string; /** * Visually hide the label, but still show it to assistive technologies like screen readers. */ labelHidden: boolean; /** * A maximum length (number of characters) for textual values. */ maxLength?: number; /** * A minimum length (number of characters) for textual values. */ minLength?: number; /** * The name of the form control. Submitted with the form as part of a name/value pair. */ name?: string; /** * The placeholder text to display within the input. */ placeholder?: string; /** * The value is not editable. */ readonly: boolean; /** * A value is required or must be check for the form to be submittable. */ required: boolean; /** * Specifies the initial number of lines in the textarea. */ rows: number; /** * The initial value of the control. */ value?: string; /** * The validation errors for this input. Will render a hint under the input * with the translated error message(s) `error.${key}`. If an object is * passed, the keys will be used as error keys and the values translation * parameters. * If the value is `true`, the input will be marked as invalid without any * hints under the input. */ errors?: boolean | string[] | ErrorMap; /** * Fine-grained control over when the errors are shown. Can be `false` to * never show errors, `true` to show errors on blur, or a number to show * errors change with the given delay in milliseconds or immediately on blur. */ errorUpdate: boolean | number; /** * Attributes that will be added to the native HTML textarea element. */ nativeAttributes?: { [key: string]: string; }; /** * A unique identifier for the underlying native element that is used for * testing purposes. The attribute is added as `data-test` attribute and acts * as a shorthand for `nativeAttributes={ 'data-test': 'test-Id' }`. */ testId?: string; /** * Emitted when the value is changed. */ catChange: EventEmitter; /** * Emitted when the textarea received focus. */ catFocus: EventEmitter; /** * Emitted when the textarea loses focus. */ catBlur: EventEmitter; componentWillLoad(): void; componentWillRender(): void; componentDidLoad(): void; /** * Programmatically move focus to the textarea. Use this method instead of * `textarea.focus()`. * * @param options An optional object providing options to control aspects of * the focusing process. */ doFocus(options?: FocusOptions): Promise; /** * Programmatically remove focus from the textarea. Use this method instead of * `textarea.blur()`. */ doBlur(): Promise; /** * Clear the textarea. */ clear(): Promise; onErrorsChanged(newValue?: boolean | string[] | ErrorMap, _oldValue?: unknown, update?: boolean): void; onValueChanged(): void; render(): any; private get hasHint(); private get invalid(); private onInput; private onFocus; private onBlur; private showErrors; private errorUpdateTimeoutId?; private showErrorsIfTimeout; private showErrorsIfNoFocus; }