ui-lit
Version:
UI Elements on LIT
33 lines (32 loc) • 1.05 kB
TypeScript
import { LitElement } from 'lit';
export interface ValidityStateFlags {
badInput?: boolean;
customError?: boolean;
patternMismatch?: boolean;
rangeOverflow?: boolean;
rangeUnderflow?: boolean;
stepMismatch?: boolean;
tooLong?: boolean;
tooShort?: boolean;
typeMismatch?: boolean;
valueMissing?: boolean;
}
export interface FormAssociatedProps {
readonly: boolean;
disabled: boolean;
name: string;
required: boolean;
value: string;
}
export interface FormAssociated extends FormAssociatedProps {
readonly validationMessage: string;
validity: ValidityStateFlags;
notify(): void;
validate(): void;
checkValidity(): boolean;
reportValidity(): boolean;
validityDefault(): void;
setValidity(flags: ValidityStateFlags, message?: string, anchor?: HTMLElement): void;
}
export declare type ProxyElement = HTMLSelectElement | HTMLTextAreaElement | HTMLInputElement;
export declare type FormAssociatedElement = FormAssociated & LitElement;