dap-design-system
Version:
Official design system for the DÁP (dap.gov.hu)
36 lines (35 loc) • 1.08 kB
TypeScript
import { InputStatus } from '../../common/types';
import { DdsElement } from '../dds-hu-element';
type Constructor<T = Record<string, unknown>> = {
new (...args: any[]): T;
prototype: T;
};
export interface FormElementInterface {
name: string;
defaultValue?: any;
form?: string;
formElement?: HTMLFormElement | null;
disabled: boolean;
required: boolean;
readonly: boolean;
invalid: boolean;
value?: any;
status?: InputStatus;
internals: ElementInternals;
validity: ValidityState;
validationMessage: string;
willValidate: boolean;
innerInput: HTMLElement;
autocomplete: string;
setValidity(): void;
checkValidity(): boolean;
reportValidity(): boolean;
onInput(event?: InputEvent): void;
onKeydown(event?: KeyboardEvent): void;
onBlur(): void;
onFocus(): void;
onChange(event?: InputEvent): void;
handleInvalid(event: Event): void;
}
export declare function FormElementMixin<T extends Constructor<DdsElement>>(constructor: T): T & Constructor<FormElementInterface>;
export {};