UNPKG

@synergy-design-system/react

Version:
83 lines (82 loc) 5.14 kB
import Component from '@synergy-design-system/components/components/select/select.component.js'; import { type EventName } from '@lit/react'; import type { SynChangeEvent } from '@synergy-design-system/components'; import type { SynClearEvent } from '@synergy-design-system/components'; import type { SynInputEvent } from '@synergy-design-system/components'; import type { SynFocusEvent } from '@synergy-design-system/components'; import type { SynBlurEvent } from '@synergy-design-system/components'; import type { SynShowEvent } from '@synergy-design-system/components'; import type { SynAfterShowEvent } from '@synergy-design-system/components'; import type { SynHideEvent } from '@synergy-design-system/components'; import type { SynAfterHideEvent } from '@synergy-design-system/components'; import type { SynInvalidEvent } from '@synergy-design-system/components'; /** * @summary Selects allow you to choose items from a menu of predefined options. * @documentation https://synergy-design-system.github.io/?path=/docs/components-syn-select--docs * @status stable * @since 2.0 * * @dependency syn-icon * @dependency syn-popup * @dependency syn-tag * * @slot - The listbox options. Must be `<syn-option>` elements. You can use `<syn-divider>` to group items visually. * @slot label - The input's label. Alternatively, you can use the `label` attribute. * @slot prefix - Used to prepend a presentational icon or similar element to the combobox. * @slot suffix - Used to append a presentational icon or similar element to the combobox. * @slot clear-icon - An icon to use in lieu of the default clear icon. * @slot expand-icon - The icon to show when the control is expanded and collapsed. Rotates on open and close. * @slot help-text - Text that describes how to use the input. Alternatively, you can use the `help-text` attribute. * * @event syn-change - Emitted when the control's value changes. * @event syn-clear - Emitted when the control's value is cleared. * @event syn-input - Emitted when the control receives input. * @event syn-focus - Emitted when the control gains focus. * @event syn-blur - Emitted when the control loses focus. * @event syn-show - Emitted when the select's menu opens. * @event syn-after-show - Emitted after the select's menu opens and all animations are complete. * @event syn-hide - Emitted when the select's menu closes. * @event syn-after-hide - Emitted after the select's menu closes and all animations are complete. * @event syn-invalid - Emitted when the form control has been checked for validity and its constraints aren't satisfied. * * @csspart form-control - The form control that wraps the label, input, and help text. * @csspart form-control-label - The label's wrapper. * @csspart form-control-input - The select's wrapper. * @csspart form-control-help-text - The help text's wrapper. * @csspart combobox - The container the wraps the prefix, suffix, combobox, clear icon, and expand button. * @csspart prefix - The container that wraps the prefix slot. * @csspart suffix - The container that wraps the suffix slot. * @csspart display-input - The element that displays the selected option's label, an `<input>` element. * @csspart listbox - The listbox container where options are slotted. * @csspart tags - The container that houses option tags when `multiselect` is used. * @csspart tag - The individual tags that represent each multiselect option. * @csspart tag__base - The tag's base part. * @csspart tag__content - The tag's content part. * @csspart tag__remove-button - The tag's remove button. * @csspart tag__remove-button__base - The tag's remove button base part. * @csspart clear-button - The clear button. * @csspart expand-icon - The container that wraps the expand icon. * @csspart popup - The popup's exported `popup` part. Use this to target the tooltip's popup container. */ export declare const SynSelect: import("@lit/react").ReactWebComponent<Component, { onSynChange: EventName<SynChangeEvent>; onSynClear: EventName<SynClearEvent>; onSynInput: EventName<SynInputEvent>; onSynFocus: EventName<SynFocusEvent>; onSynBlur: EventName<SynBlurEvent>; onSynShow: EventName<SynShowEvent>; onSynAfterShow: EventName<SynAfterShowEvent>; onSynHide: EventName<SynHideEvent>; onSynAfterHide: EventName<SynAfterHideEvent>; onSynInvalid: EventName<SynInvalidEvent>; }>; export type { SynChangeEvent } from '@synergy-design-system/components'; export type { SynClearEvent } from '@synergy-design-system/components'; export type { SynInputEvent } from '@synergy-design-system/components'; export type { SynFocusEvent } from '@synergy-design-system/components'; export type { SynBlurEvent } from '@synergy-design-system/components'; export type { SynShowEvent } from '@synergy-design-system/components'; export type { SynAfterShowEvent } from '@synergy-design-system/components'; export type { SynHideEvent } from '@synergy-design-system/components'; export type { SynAfterHideEvent } from '@synergy-design-system/components'; export type { SynInvalidEvent } from '@synergy-design-system/components';