UNPKG

@scania/tegel

Version:
42 lines (41 loc) 1.25 kB
import { EventEmitter } from '../../stencil-public-runtime'; /** * @slot label - Slot for the label text. */ export declare class TdsToggle { host: HTMLElement; /** Sets the Toggle as checked */ checked: boolean; /** Make the Toggle required */ required: boolean; /** Size of the Toggle */ size: 'sm' | 'lg'; /** Name of the toggle's input element */ name: string; /** Headline for the Toggle */ headline: string; /** Sets the Toggle in a disabled state */ disabled: boolean; /** ID of the Toggle's input element, if not specified, it's randomly generated */ toggleId: string; /** Defines aria-label attribute for input */ tdsAriaLabel: string; private labelSlot; private inputElement; /** Toggles the Toggle. */ toggle(): Promise<{ toggleId: string; checked: boolean; }>; /** Method to programmatically focus the toggle element */ focusElement(): Promise<void>; /** Sends unique Toggle identifier and status when it is toggled. */ tdsToggle: EventEmitter<{ toggleId: string; checked: boolean; }>; handleToggle: () => void; componentWillLoad(): void; connectedCallback(): void; render(): any; }