import { EventEmitter } from '../../stencil-public-runtime'; /** * Checkboxes allow users to select none, one, or multiple items from a list. * * Overall behavior is based on native `` * */ export declare class Checkbox { /** Host DOM element */ host: HTMLRCheckboxElement; /** Specifies the `id` of the `
` to which the element belongs */ form?: string; /** Specifies if element must be ignored during validation of the form elements */ novalidate?: boolean; /** Name of element (data) within a form */ name?: string; /** Value of element data within a form */ value?: string; /** Pass initial checked state */ checked?: boolean; /** Visually present checkbox in indeterminate state (neither checked nor unchecked) */ indeterminate?: boolean; /** Prevent user interaction and apply disabled style */ disabled?: boolean; /** Automatically focus the checkbox when the component is mounted. Note: Only one element per page should have autofocus set to true, following browser standard behavior. */ autofocus?: boolean; /** Indicate that validation is successful */ valid?: boolean; /** Indicate that validation has failed */ invalid?: boolean; /** Custom validation error message */ error?: string; /** Specifies if checkbox must be checked */ required?: boolean; /** Set custom message for `valueMissing` property of a ValidityState object (set by `required`) within Constrain Validation API */ valueMissingMessage?: string; /** Set custom message for `customError` property of a ValidityState object indicating whether the element's custom validity message has been set to a non-empty string by calling the element's setCustomValidity() method. */ customErrorMessage?: string; validityState: string; validityMessage: string; touched: boolean; /** * Emit custom `rChange` event when checkbox onChange event emitted. * Emitted `event.details` contain checkbox value and checked state. * */ rChange: EventEmitter<{ element: HTMLRCheckboxElement; value: any; checked: boolean; }>; /** Emits `rReset` when component was reset to initial state by form reset */ rReset: EventEmitter<{ element: HTMLRCheckboxElement; value: any; checked: boolean; }>; /** Emits event after each validation */ rValidate: EventEmitter<{ state: string; message: string; }>; /** * Asynchronously retrieves the validity state of the checkbox. * * This method updates the internal validity state and message by calling `getValidityStateData` * with the native element, and then returns an object containing the current validity state and message. * * @returns A promise that resolves to an object containing the validity state and message. * The object has two properties: * - `state`: A string representing the validity state. * - `message`: A string containing the validity message. */ getValidityState(): Promise<{ state: string; message: string; }>; /** * Sets focus on the checkbox element. */ setFocus(): Promise; /** * Removes focus from the checkbox element. */ setBlur(): Promise; /** * Checks the checkbox element. */ check(): Promise; /** * Unchecks the checkbox element. */ uncheck(): Promise; /** * Toggles the checked state of the checkbox element. */ toggleChecked(): Promise; /** * Sets the indeterminate state of the checkbox element. */ setIndeterminate(): Promise; /** * Sets the indeterminate state of the checkbox element. */ clearIndeterminate(): Promise; /** Validates an element, displays provided message in case value is invalid. */ setCustomValidity(message: string): Promise; /** * Validates the checkbox without triggering UI and returns a boolean indicating its validity. * @returns A boolean indicating whether the checkbox is valid. */ checkValidity(): Promise; private initial; private nativeElement?; private uniqueId; handleCheckedChange(): Promise; /** Identify wrapping form element */ private get parentFormEl(); /** Determine whether this element should be ignored during Constraint Validation API validation. */ private get isNoValidate(); private get hasErrorMessage(); private get hasCustomErrorMessage(); private get hasValidationError(); private get hasInvalidMessage(); private getValidityStateData; private validateFormElement; private handleClick; private onSubmitForm; private onResetForm; private contributeToFormData; private connectFormEventListeners; private disconnectFormEventListeners; private applyAutofocus; componentWillLoad(): void; componentDidLoad(): void; connectedCallback(): void; disconnectedCallback(): void; render(): any; }