import { EventEmitter } from "../../stencil-public-runtime"; import { A11yComponent, InputComponent, ThemeableComponent } from "../../common"; import { DuetMargin, DuetTheme } from "../../common-types"; export type DuetCheckboxEvent = { originalEvent?: Event; checked: boolean; value: string; component: "duet-checkbox"; }; /** * @slot after-label - Shows content seamlessly after the label. Unlike with the label, here you can have links and other markup. */ export declare class DuetCheckbox implements ThemeableComponent, InputComponent, A11yComponent { /** * Own Properties. */ private checkboxId; private afterLabelId; private errorId; private nativeInput; /** * Reference to host HTML element. */ element: HTMLElement; hasAfterLabelSlot: boolean; /** * Indicates the id of a related component’s visually focused element. */ accessibleActiveDescendant: string; /** * Controls the margin of the component. */ margin: DuetMargin; /** * Use this prop to add an aria-controls attribute. Use the attribute to indicate * the id of a component controlled by this component. */ accessibleControls: string; /** * Control the tabindex of checkbox. In most cases this should never be used! It * exists only for Duet’s internal needs. */ accessibleIndex: string; /** * Indicates the id of a component owned by the checkbox. */ accessibleOwns: string; /** * Indicates the id of a component that describes the checkbox. */ accessibleDescribedBy: string; /** * Aria Details of the component */ accessibleDetails: string; /** * String of id's that indicate alternative labels elements */ accessibleLabelledBy: string; /** * Aria description the button */ accessibleDescription: string; /** * Aria selected */ accessibleSelected: string; /** * The aria-live attribute for the error message. When the input is validated on blur, use "off", as using "polite" or "assertive" * makes the screen reader read the error message twice. When the input is validated on submit, use "polite", as "off" would leave * the messages unread by screen readers. Use "assertive" only in those rare cases when "polite" would leave the error message * unread by screen readers. */ accessibleLiveError: "off" | "polite" | "assertive"; /** * Set whether the input is required or not. Please note that this is required for * accessible inputs when the user is required to fill them. When using this property * you need to also set “novalidate” attribute to your form element to prevent * browser from displaying its own validation errors. */ required: boolean; /** * Display the checkbox in error state along with an error message (when a required choice has not been made). * Note that this should only be used for single checkbox - for multiple checkboxes, wrap them in a fieldset and use * the error property on that. */ error: string; /** * Theme of the checkbox. */ theme: DuetTheme; /** * Makes the checkbox component disabled. This prevents users from being able to * interact with the checkbox, and conveys its inactive state to assistive technologies. */ disabled: boolean; /** * Adds a unique identifier for the checkbox. */ identifier: string; /** * Label for the checkbox */ label: string; /** * Visually hide the label, but still show it to screen readers. */ labelHidden: boolean; /** * Name of the checkbox. */ name: string; /** * Defines a specific role attribute for the input. */ role: string | null; /** * Check state of the checkbox. */ checked: boolean; /** * The value of the checkbox does not mean if it's checked or not, use the checked * property for that. */ value: string; /** * Emitted when the checked property has changed. */ duetChange: EventEmitter; /** * Emitted when the checkbox has focus. */ duetFocus: EventEmitter; /** * Emitted when the checkbox loses focus. */ duetBlur: EventEmitter; /** * Component lifecycle events. */ componentWillLoad(): void; /** * Component event handling. */ private onChange; private onBlur; private onFocus; private getDescribedBy; /** * Sets focus on the specified `duet-checkbox`. Use this method instead of the global * `input.focus()`. */ setFocus(options?: FocusOptions): Promise; private getAriaDetails; /** * render() function * Always the last one in the class. */ render(): any; }