import { EventEmitter } from '../../stencil-public-runtime'; import { FormControl } from '../form-control'; export type CheckboxSizeType = 'standard' | 'small'; export declare class DatacomCheckbox implements FormControl { host: HTMLElement; /** * Standard form props */ readonly?: boolean; form?: string; formaction?: string; formenctype?: string; formmethod?: string; formnovalidate?: boolean; formtarget?: string; checked: boolean; disabled: boolean; required: boolean; value?: string; name: string; autofocus: boolean; autocomplete?: boolean; /** * Checkbox is either standard size (default) or small */ variant: CheckboxSizeType; /** * Show control in indeterminate state (dash) */ indeterminate?: boolean; /** * Checkbox label (right of tickbox) */ label: string; /** * Auto-validate and display error message on form submit */ autoValidate?: boolean; /** * Custom error message if control is invalid */ message: string; /** * True if the checkbox is part of a group */ grouped: boolean; /** * True if the checkbox is a child and should be indented */ child: boolean; /** * Index of the checkbox in the group */ index: number; /** * Emit a changed event with the index number if the control changes state */ changed: EventEmitter; /** * Error mutable state will re-render the control to display error message, icon and focus border */ isInError: boolean; /** * Unique input control id */ private inputId; /** * DOM reference to input control */ private inputElement; /** * DOM reference to associated form */ private formElement; /** * Toggle checked state */ onChange: () => void; /** * Force validation on the form control to display any error messages * * @returns boolean */ validate(): Promise; /** * Check if the control is valid */ checkValidity(): Promise; /** * Watch for form submit and prevent if the input is invalid * * @param event */ onFormSubmit: (event: SubmitEvent) => Promise; /** * When the component loads for the first time find the nearest form * and watch for submit if autoValidate is true */ componentDidLoad(): void; /** * When removed from the DOM, remove any event listeners */ disconnectedCallback(): void; /** * Capture input element on render * * @param el */ private setInputElementRef; render(): any; } export type HTMLDatacomCheckboxElement = HTMLElement & DatacomCheckbox;