finpro
Version:
112 lines • 2.86 kB
TypeScript
import { CSSResultGroup, LitElement, PropertyValues, TemplateResult } from 'lit';
import 'element-internals-polyfill';
export declare type TextareaSize = 'small' | 'medium' | 'large';
declare const FpTextarea_base: import("@open-wc/form-control").Constructor<import("@open-wc/form-control").FormControlInterface> & typeof LitElement;
/**
* @tag fp-textarea
* @summary Finpro Textarea component
*/
export default class FpTextarea extends FpTextarea_base {
static get styles(): CSSResultGroup;
static formControlValidators: ({
key: keyof ValidityState;
isValid(instance: HTMLElement & {
validationTarget: HTMLInputElement;
}): boolean;
} | {
isValid(instance: HTMLElement & {
validationTarget: HTMLTextAreaElement;
}): boolean;
attribute?: string | string[] | undefined;
key?: keyof ValidityState | undefined;
message: string | import("@open-wc/form-control").validationMessageCallback;
})[];
validationTarget: HTMLTextAreaElement;
/**
* Name of textarea
*/
name: string;
/**
* Makes textarea a mandatory field
*/
required: boolean;
/**
* Disables the textarea
*/
disabled: boolean;
/**
* Sets expandity
*/
expand: boolean;
/**
* Sets max row when expand is true
*/
maxRows?: number;
/**
* Sets textarea size.
*/
size?: TextareaSize;
/**
* Sets label of the textarea
*/
label?: string;
/**
* Makes label as fixed positioned
*/
labelFixed: boolean;
/**
* Sets placeholder of the textarea
*/
placeholder?: string;
/**
* Enables showing character counter.
*/
characterCounter: boolean;
/**
* Adds help text
*/
helpText?: string;
/**
* Set custom error message
*/
customInvalidText?: string;
/**
* Sets minimum length of the textarea
*/
minlength?: number;
/**
* Sets max length of textarea
*/
maxlength?: number;
/**
* Sets initial value of the textarea
*/
value: string;
/**
* Sets textarea visible row count.
*/
rows?: number;
private onInput;
private onChange;
private onInvalid;
private customScrollHeight;
connectedCallback(): void;
private onError;
private inputHandler;
private changeHandler;
firstUpdated(): void;
protected updated(changedProperties: PropertyValues): void;
reportValidity(): boolean;
valueChangedCallback(value: string): void;
validityCallback(): string | void;
private autoResize;
private dirty;
render(): TemplateResult;
}
declare global {
interface HTMLElementTagNameMap {
'fp-textarea': FpTextarea;
}
}
export {};
//# sourceMappingURL=fp-text-area.d.ts.map