@synergy-design-system/react
Version:
React wrappers for the Synergy Design System
91 lines (90 loc) • 5.38 kB
TypeScript
import Component from '@synergy-design-system/components/components/combobox/combobox.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';
import type { SynErrorEvent } from '@synergy-design-system/components';
/**
* @summary Comboboxes allow you to choose items from a menu of predefined options.
* @documentation https://synergy-design-system.github.io/?path=/docs/components-syn-combobox--docs
* @status stable
*
* @dependency syn-icon
* @dependency syn-popup
*
* @slot - The listbox options. Must be `<syn-option>` elements.
* You can use `<syn-optgroup>`'s to group items visually.
* @slot label - The combobox'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 combobox.
* 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 combobox's menu opens.
* @event syn-after-show - Emitted after the combobox's menu opens and all animations are complete.
* @event syn-hide - Emitted when the combobox's menu closes.
* @event syn-after-hide - Emitted after the combobox'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.
* @event syn-error - Emitted when the combobox menu fails to open.
*
* @csspart form-control - The form control that wraps the label, combobox, and help text.
* @csspart form-control-label - The label's wrapper.
* @csspart form-control-input - The combobox's wrapper.
* @csspart form-control-help-text - The help text's wrapper.
* @csspart combobox - The container the wraps the prefix, 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 the options are slotted
* and the filtered options list exists.
* @csspart filtered-listbox - The container that wraps the filtered options.
* @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.
* @csspart no-results - The container that wraps the "no results" message.
*
* @animation combobox.show - The animation to use when showing the combobox.
* @animation combobox.hide - The animation to use when hiding the combobox.
*/
export declare const SynCombobox: 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>;
onSynError: EventName<SynErrorEvent>;
}>;
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';
export type { SynErrorEvent } from '@synergy-design-system/components';