@scania/tegel
Version:
Tegel Design System
55 lines (54 loc) • 1.94 kB
TypeScript
import { EventEmitter } from '../../stencil-public-runtime';
/**
* @slot label - Slot for the label text.
*/
export declare class TdsCheckbox {
host: HTMLElement;
/** Name for the Checkbox's input element. */
name: string;
/** ID for the Checkbox's input element. Randomly generated if not specified. */
checkboxId: string;
/** Sets the Checkbox in a disabled state */
disabled: boolean;
/** Make the Checkbox required */
required: boolean;
/** Sets the Checkbox as checked */
checked: boolean;
/** Sets the Checkbox as indeterminate */
indeterminate: boolean;
/** Value for the Checkbox */
value: string;
/** Value to be used for the aria-label attribute */
tdsAriaLabel: string;
/** Value to be used for the aria-describedby attribute */
tdsAriaDescribedby: string;
private inputElement;
/** Toggles the checked value of the component. */
toggleCheckbox(): Promise<{
checkboxId: string;
checked: boolean;
}>;
/** Method to programmatically focus the checkbox element */
focusElement(): Promise<void>;
handleIndeterminateState(): void;
/** Sends unique Checkbox identifier and checked status when it is checked/unchecked. */
tdsChange: EventEmitter<{
checkboxId: string;
checked: boolean;
indeterminate: boolean;
value?: string;
}>;
handleChange: () => void;
/** Focus event for the Checkbox */
tdsFocus: EventEmitter<FocusEvent>;
/** Set the input as focus when clicking the component */
handleFocus(event: any): void;
/** Blur event for the Checkbox */
tdsBlur: EventEmitter<FocusEvent>;
/** Set the input as blur when clicking outside the component */
handleBlur(event: FocusEvent): void;
/** Listens for a reset event inside a form */
handleFormReset(event: Event): void;
connectedCallback(): void;
render(): any;
}