import { CSSResultGroup, PropertyValues, TemplateResult, LitElement } from 'lit'; declare const SbbAutocompleteElement_base: import('../core/mixins.js').AbstractConstructor & import('../core/mixins.js').AbstractConstructor & typeof LitElement; /** * Combined with a native input, it displays a panel with a list of available options. * * @slot - Use the unnamed slot to add `sbb-option` or `sbb-optgroup` elements to the `sbb-autocomplete`. * @event {CustomEvent} willOpen - Emits whenever the `sbb-autocomplete` starts the opening transition. Can be canceled. * @event {CustomEvent} didOpen - Emits whenever the `sbb-autocomplete` is opened. * @event {CustomEvent} willClose - Emits whenever the `sbb-autocomplete` begins the closing transition. Can be canceled. * @event {CustomEvent} didClose - Emits whenever the `sbb-autocomplete` is closed. * @cssprop [--sbb-autocomplete-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`. */ export declare class SbbAutocompleteElement extends SbbAutocompleteElement_base { static styles: CSSResultGroup; static readonly events: { readonly willOpen: "willOpen"; readonly didOpen: "didOpen"; readonly willClose: "willClose"; readonly didClose: "didClose"; }; /** * The element where the autocomplete will attach; accepts both an element's id or an HTMLElement. * If not set, will search for the first 'sbb-form-field' ancestor. */ origin?: string | HTMLElement; /** * The input element that will trigger the autocomplete opening; accepts both an element's id or an HTMLElement. * By default, the autocomplete will open on focus, click, input or `ArrowDown` keypress of the 'trigger' element. * If not set, will search for the first 'input' child of a 'sbb-form-field' ancestor. */ trigger?: string | HTMLInputElement; /** Whether the icon space is preserved when no icon is set. */ preserveIconSpace?: boolean; private set _state(value); private get _state(); /** Emits whenever the `sbb-autocomplete` starts the opening transition. */ private _willOpen; /** Emits whenever the `sbb-autocomplete` is opened. */ private _didOpen; /** Emits whenever the `sbb-autocomplete` begins the closing transition. */ private _willClose; /** Emits whenever the `sbb-autocomplete` is closed. */ private _didClose; private _overlay; private _optionContainer; /** Returns the element where autocomplete overlay is attached to. */ get originElement(): HTMLElement; private _originElement?; /** Returns the trigger element. */ get triggerElement(): HTMLInputElement | undefined; private _triggerElement; private _triggerEventsController; private _openPanelEventsController; private _overlayId; private _activeItemIndex; private _didLoad; private _isPointerDownEventOnMenu; private _abort; /** The autocomplete should inherit 'readonly' state from the trigger. */ private get _readonly(); private get _options(); /** Opens the autocomplete. */ open(): void; /** Closes the autocomplete. */ close(): void; /** Removes trigger click listener on trigger change. */ private _resetOriginClickListener; /** Removes trigger click listener on trigger change. */ private _resetTriggerClickListener; /** When an option is selected, update the input value and close the autocomplete. */ private _onOptionSelected; private _onOptionClick; connectedCallback(): void; protected willUpdate(changedProperties: PropertyValues): void; protected firstUpdated(changedProperties: PropertyValues): void; private _syncNegative; disconnectedCallback(): void; private _componentSetup; /** * Retrieve the element where the autocomplete will be attached. * @returns 'origin' or the first 'sbb-form-field' ancestor. */ private _findOriginElement; /** * Retrieve the element that will trigger the autocomplete opening. * @returns 'trigger' or the first 'input' inside the origin element. */ private _getTriggerElement; private _bindTo; private _setupTriggerEvents; private _setOverlayPosition; /** On open/close animation end. * In rare cases it can be that the animationEnd event is triggered twice. * To avoid entering a corrupt state, exit when state is not expected. */ private _onAnimationEnd; private _onOpenAnimationEnd; private _onCloseAnimationEnd; private _attachOpenPanelEvents; private _pointerDownListener; private _closeOnBackdropClick; private _closedPanelKeyboardInteraction; private _openedPanelKeyboardInteraction; private _selectByKeyboard; private _setNextActiveOption; private _resetActiveElement; /** Highlight the searched text on the options. */ private _highlightOptions; private _setTriggerAttributes; private _removeTriggerAttributes; private _handleSlotchange; protected render(): TemplateResult; } declare global { interface HTMLElementTagNameMap { 'sbb-autocomplete': SbbAutocompleteElement; } } export {}; //# sourceMappingURL=autocomplete.d.ts.map