/** * The `auro-checkbox` element is for the purpose of allowing users to select one or more options of a limited number of choices. * @customElement auro-checkbox * * @csspart checkbox - apply css to a specific checkbox. * @csspart checkbox-input - apply css to a specific checkbox's input. * @csspart checkbox-label - apply css to a specific checkbox's label. * * @slot default - The default slot for the checkbox label. * * @fires {CustomEvent} change - (Deprecated) Notifies when checked value is changed. * @fires {InputEvent} input - Notifies when when checked value is changed by user's interface. */ export class AuroCheckbox extends LitElement { static get styles(): import("lit").CSSResult[]; static get properties(): { /** * Defines whether the component will be on lighter or darker backgrounds. * @type {'default' | 'inverse'} * @default 'default' */ appearance: "default" | "inverse"; /** * If set to true, the checkbox will be filled with a checkmark. */ checked: { type: BooleanConstructor; reflect: boolean; }; /** * If set to true, the checkbox will not be clickable. */ disabled: { type: BooleanConstructor; reflect: boolean; }; /** * If set to true, the checkbox will be displayed with an error state. */ error: { type: BooleanConstructor; reflect: boolean; }; /** * The id global attribute defines an identifier (ID) which must be unique in the whole document. */ id: { type: StringConstructor; }; /** * The id for input node. * @private */ inputId: { type: StringConstructor; reflect: boolean; attribute: boolean; }; /** * Accepts any string and is used to identify related checkboxes when submitting form data. */ name: { type: StringConstructor; }; /** * DEPRECATED - use `appearance="inverse"` instead. */ onDark: { type: BooleanConstructor; reflect: boolean; }; /** * Indicates whether the checkbox has been interacted with. * @private */ touched: { type: BooleanConstructor; reflect: boolean; attribute: boolean; }; /** * Sets the element's input value. Must be unique within an auro-checkbox-group element. */ value: { type: StringConstructor; reflect: boolean; }; /** * The tabindex attribute for the checkbox. * @private */ tabIndex: { type: NumberConstructor; reflect: boolean; attribute: string; }; /** * The aria-checked attribute for the checkbox. * @private */ ariaChecked: { type: StringConstructor; reflect: boolean; attribute: string; }; /** * The aria-disabled attribute for the checkbox. * @private */ ariaDisabled: { type: StringConstructor; reflect: boolean; attribute: string; }; /** * The ARIA role for the element. Must remain 'checkbox' for screen readers * to correctly identify this as a checkbox control. * @private */ role: { type: StringConstructor; reflect: boolean; }; }; /** * This will register this element with the browser. * @param {string} [name="auro-checkbox"] - The name of element that you want to register to. * * @example * AuroCheckbox.register("custom-checkbox") // this will register this element to * */ static register(name?: string): void; _initializeDefaults(): void; apperance: string; checked: any; disabled: boolean; error: boolean; onDark: boolean; touched: boolean; /** * @private */ private runtimeUtils; /** * Handles the change event for the checkbox input. * Updates the checked state and dispatches a corresponding custom event. * This custom event is only for the purpose of supporting IE. * @private * @param {Event} event - The change event from the checkbox input. * @returns {void} */ private handleChange; /** * Handles the input event for the checkbox input. * Updates the checked state and dispatches a custom 'auroCheckbox-input' event. * @private * @param {Event} event - The input event from the checkbox input. * @returns {void} */ private handleInput; /** * Function to support @focusin event. * @private * @returns {void} */ private handleFocusin; /** * Function to generate checkmark svg. * @private * @returns {HTMLElement} */ private generateIconHtml; dom: Document; svg: ChildNode; /** * Resets component to initial state. * @returns {void} */ reset(): void; /** * Updates the aria-label based on slot content. * @private * @returns {void} */ private updateAriaLabel; firstUpdated(): void; inputId: string; /** * Handles keydown event to toggle the checkbox with Space key. * @private * @param {KeyboardEvent} event - The keydown event from the checkbox input. * @returns {void} */ private handleKeyDown; /** * Updates ARIA attributes when properties change. * @private * @param {Map} changedProperties - Map of changed properties. * @returns {void} */ private updated; /** * @private * @returns {HTMLElement} */ private render; } import { LitElement } from "lit";