import { EventEmitter } from "../../stencil-public-runtime"; import { A11yComponent, InputComponent, ThemeableComponent } from "../../common"; import { DuetMargin, DuetTextFontWeight, DuetTheme } from "../../common-types"; export type DuetToggleChangeEvent = { component: "duet-toggle"; checked: boolean; value: string; }; export declare class DuetToggle implements ThemeableComponent, InputComponent, A11yComponent { /** * Own Properties */ private toggleId; private proxyId; private nativeInput; /** * Reference to host HTML element. */ element: HTMLElement; loadingComplete?: boolean; /** * Theme of the card. */ theme: DuetTheme; /** * Controls the margin of the component. */ margin: DuetMargin; /** * Indicates the id of a related component’s visually focused element. */ accessibleActiveDescendant: string; /** * 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; /** * Indicates the id of a component owned by the toggle. */ accessibleOwns: string; /** * Indicates the id of a component that describes the toggle. */ 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; /** * Adds accessible announcement for toggle in "loading" state * If not set, default strings are used: fi: "Ladataan", sv: "Lastning", en: "Loading" */ accessibleLabelLoading?: string; /** * Adds accessible announcement for toggle when "loading" state ends. * If not set, default strings are used: fi: "Valmis", sv: "Färdig", en: "Complete" */ accessibleLabelComplete?: string; /** * Loading state of the toggle */ loading: boolean; setLoadingState(): void; /** * Label for the toggle. */ label: string; /** * Visually hide the label, but still show it to screen readers. */ labelHidden: boolean; /** * Color of the label. */ labelColor: string; /** * Font weight of the label. */ labelWeight: DuetTextFontWeight; /** * Position of the label */ labelPosition: "top" | "right" | "left"; /** * Set whether the input is required or not. Please note that this is necessary 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; /** * Makes the input component disabled. This prevents users from being able to * interact with the input, and conveys its inactive state to assistive technologies. */ disabled: boolean; /** * Check state of the checkbox. */ checked: boolean; checkedChanged(isChecked: boolean): void; /** * The value of the checkbox does not mean if it's checked or not, use the checked * property for that. */ value: string; /** * Adds a unique identifier for the checkbox. */ identifier: string; /** * Name of the checkbox. */ name: string; /** * Defines a specific role attribute for the input. */ role: string | null; /** * Emitted when the checked property has changed. */ duetChange: EventEmitter; /** * Component lifecycle events. */ componentWillLoad(): void; connectedCallback(): void; disconnectedCallback(): void; componentDidRender(): void; /** * Component event handling. */ private onClick; /** * Sets focus on the specified `duet-toggle`. Use this method instead of the global * `input.focus()`. */ setFocus(options?: FocusOptions): Promise; /** * render() function * Always the last one in the class. */ render(): any; }