import { CSSResultGroup, PropertyDeclaration, PropertyValues, TemplateResult } from 'lit'; import { SbbOpenCloseBaseElement } from '../core/base-elements.ts'; import { FormRestoreReason, FormRestoreState } from '../core/mixins.ts'; import { SbbOptionElement } from '../option.ts'; declare const SbbSelectElement_base: import('../core/mixins.ts').AbstractConstructor & import('../core/mixins.ts').AbstractConstructor & import('../core/mixins.ts').AbstractConstructor & import('../core/mixins.ts').AbstractConstructor & import('../core/mixins.ts').AbstractConstructor & import('../core/mixins.ts').AbstractConstructor & typeof SbbOpenCloseBaseElement; /** * It displays a panel with selectable options. * * @slot - Use the unnamed slot to add options. * @cssprop [--sbb-select-z-index=var(--sbb-overlay-default-z-index)] - To specify a custom stack order, * the `z-index` can be overridden by defining this CSS variable. The default `z-index` of the * component is set to `var(--sbb-overlay-default-z-index)` with a value of `1000`. * @cssprop [--sbb-options-panel-max-height] - Maximum height of the options panel. * If the calculated remaining space is smaller, the value gets ignored. * @overrideType value - (T = string | string[]) | null */ export declare class SbbSelectElement extends SbbSelectElement_base { static readonly elementName: string; static readonly role: string | null; static styles: CSSResultGroup; static readonly events: { readonly change: "change"; readonly input: "input"; readonly displayvaluechange: "displayvaluechange"; readonly beforeopen: "beforeopen"; readonly open: "open"; readonly beforeclose: "beforeclose"; readonly close: "close"; }; /** The placeholder used if no value has been selected. */ accessor placeholder: string; /** Whether the select allows for multiple selection. */ accessor multiple: boolean; /** Function used to compare option values. */ accessor compareWith: (v1: T | null, v2: T | null) => boolean; accessor disabled: boolean; /** Value of the form element. */ set value(value: T[] | T); get value(): T[] | T | null; private _value; /** * Size variant, either m or s. * @default 'm' / 's' (lean) */ accessor size: 'm' | 's'; /** * Form type of element. * @default 'select-one / select-multiple' */ get type(): string; /** The value displayed by the component. */ private accessor _displayValue; private _originResizeObserver; private _overlay; private _optionContainer; private _originElement; private _triggerElement; private _openPanelEventsController?; private _escapableOverlayController; private _overlayId; private _activeItemIndex; private _searchTimeout?; private _searchString; private _didLoad; private _isPointerDownEventOnMenu; private _languageController; private _isValueManuallyAssigned; /** * The 'combobox' input element * @internal */ get inputElement(): HTMLElement | null; /** Returns all SbbOptionElements from this sbb-select instance. */ get options(): SbbOptionElement[]; constructor(); private _syncAriaLabels; /** Opens the selection panel. */ open(): void; /** Closes the selection panel. */ close(): void; private _isZeroAnimationDuration; /** Gets the current displayed value. */ getDisplayValue(): string; private _selectableOptions; /** Listens to option changes. */ private _onOptionChanged; /** Listens to option changes. */ private _onOptionLabelChanged; private _updateDisplayValue; /** * The `value` property should be adapted when the `multiple` property changes: * - if it changes to true, the 'value' is set to an array; * - if it changes to false, the first available option is set as 'value' otherwise it's set to null. */ private _onMultipleChanged; /** * If the `disabled` or the `readonly` properties are set, and the panel is open, close it. */ private _closeOnDisabledReadonlyChanged; protected firstUpdated(changedProperties: PropertyValues): void; /** @internal */ focus(): void; /** @internal */ blur(): void; /** * Removes element's first attribute whose qualified name is qualifiedName. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/removeAttribute) * @internal We need to override this due to a hydration issue with Next.js. */ removeAttribute(qualifiedName: string): void; connectedCallback(): void; requestUpdate(name?: PropertyKey, oldValue?: unknown, options?: PropertyDeclaration): void; protected willUpdate(changedProperties: PropertyValues): void; disconnectedCallback(): void; /** * The reset value is the attribute value (the setup value), null otherwise. * @internal */ formResetCallback(): void; /** * @internal */ formStateRestoreCallback(state: FormRestoreState | null, _reason: FormRestoreReason): void; protected formState(): FormRestoreState; private _syncNegative; protected shouldValidate(name: PropertyKey | undefined): boolean; protected validate(): void; private _setupSelect; /** Sets the originElement; if the component is used in a sbb-form-field uses it, otherwise uses the parentElement. */ private _setupOrigin; /** * To assess screen-readers problems caused by the interaction between aria patterns and shadow DOM, * we are forced to move the 'combobox' trigger element to the light DOM */ private _setupTrigger; private _setOverlayPosition; private _onAnimationEnd; private _handleOpening; private _handleClosing; /** When an option is selected, updates the displayValue; it also closes the select if not `multiple`. */ private _onOptionSelected; /** When an option is unselected in `multiple`, removes it from value and updates displayValue. */ private _onOptionDeselected; private _dispatchInputEvents; private _attachOpenPanelEvents; private _onKeyDown; private _closedPanelKeyboardInteraction; private _openedPanelKeyboardInteraction; private _checkForLetterSelection; private _setNextActiveOptionByText; private _selectByKeyboard; private _setNextActiveOption; private _setActiveElement; private _setSelectedElement; private _resetActiveElement; private _pointerDownListener; private _closeOnBackdropClick; private _updateOptionsFromValue; private _updateValueFromOptions; private _updateValueOptionState; private _getSelected; private _toggleOpening; private _spreadDeferredDisplayValue; private _deferredDisplayValue; protected render(): TemplateResult; } declare global { interface HTMLElementTagNameMap { 'sbb-select': SbbSelectElement; } } export {}; //# sourceMappingURL=select.component.d.ts.map