import { JSXInterface } from '../jsx'; import { CSSResultGroup, ControlElement, PropertyValues, TemplateResult } from '@refinitiv-ui/core'; /** * Form control that can toggle between 2 states * * @attr {boolean} readonly - Set readonly state * @prop {boolean} [readonly=false] - Set readonly state * * @attr {boolean} disabled - Set disabled state * @prop {boolean} [disabled=false] - Set disabled state * * @fires checked-changed - Fired when user interacts with the control to check or uncheck. The event is not triggered if `checked` property is changed programmatically. */ export declare class Toggle extends ControlElement { /** * Element version number * @returns version number */ static get version(): string; protected readonly defaultRole: string | null; /** * Label of the checked state */ checkedLabel: string; /** * Label of toggle */ label: string; /** * Value of toggle */ checked: boolean; /** * A `CSSResultGroup` that will be used * to style the host, slotted children * and the internal template of the element. * @returns CSS template */ static get styles(): CSSResultGroup; /** * Called before update() to compute values needed during the update. * @param changedProperties Properties that has changed * @returns {void} */ protected willUpdate(changedProperties: PropertyValues): void; /** * Invoked when the element is first updated. Implement to perform one time * work on the element after update. * @param changedProperties Map of changed properties with old values * @returns {void} */ protected firstUpdated(changedProperties: PropertyValues): void; /** * Called when checked value changes and dispatch the event * @returns {void} */ private handleCheckedChange; /** * Handle keyboard event for toggle action * @param event Keyboard event * @returns {void} */ private handleKeyDown; /** * A `TemplateResult` that will be used * to render the updated internal template. * @return Render template */ protected render(): TemplateResult; } declare global { interface HTMLElementTagNameMap { 'ef-toggle': Toggle; } } declare global { interface HTMLElementTagNameMap { 'ef-toggle': Toggle; } namespace JSX { interface IntrinsicElements { 'ef-toggle': Partial | JSXInterface.ControlHTMLAttributes; } } } export {};