@synergy-design-system/react
Version:
React wrappers for the Synergy Design System
46 lines (45 loc) • 2.54 kB
TypeScript
import Component from '@synergy-design-system/components/components/checkbox/checkbox.component.js';
import { type EventName } from '@lit/react';
import type { SynBlurEvent } from '@synergy-design-system/components';
import type { SynChangeEvent } from '@synergy-design-system/components';
import type { SynFocusEvent } from '@synergy-design-system/components';
import type { SynInputEvent } from '@synergy-design-system/components';
import type { SynInvalidEvent } from '@synergy-design-system/components';
/**
* @summary Checkboxes allow the user to toggle an option on or off.
* @documentation https://synergy-design-system.github.io/?path=/docs/components-syn-checkbox--docs
* @status stable
* @since 2.0
*
* @dependency syn-icon
*
* @slot - The checkbox's label.
* @slot help-text - Text that describes how to use the checkbox. Alternatively, you can use the `help-text` attribute.
*
* @event syn-blur - Emitted when the checkbox loses focus.
* @event syn-change - Emitted when the checked state changes.
* @event syn-focus - Emitted when the checkbox gains focus.
* @event syn-input - Emitted when the checkbox receives input.
* @event syn-invalid - Emitted when the form control has been checked for validity and its constraints aren't satisfied.
*
* @csspart base - The component's base wrapper.
* @csspart control - The square container that wraps the checkbox's checked state.
* @csspart control--checked - Matches the control part when the checkbox is checked.
* @csspart control--indeterminate - Matches the control part when the checkbox is indeterminate.
* @csspart checked-icon - The checked icon, an `<syn-icon>` element.
* @csspart indeterminate-icon - The indeterminate icon, an `<syn-icon>` element.
* @csspart label - The container that wraps the checkbox's label.
* @csspart form-control-help-text - The help text's wrapper.
*/
export declare const SynCheckbox: import("@lit/react").ReactWebComponent<Component, {
onSynBlur: EventName<SynBlurEvent>;
onSynChange: EventName<SynChangeEvent>;
onSynFocus: EventName<SynFocusEvent>;
onSynInput: EventName<SynInputEvent>;
onSynInvalid: EventName<SynInvalidEvent>;
}>;
export type { SynBlurEvent } from '@synergy-design-system/components';
export type { SynChangeEvent } from '@synergy-design-system/components';
export type { SynFocusEvent } from '@synergy-design-system/components';
export type { SynInputEvent } from '@synergy-design-system/components';
export type { SynInvalidEvent } from '@synergy-design-system/components';