import { EventEmitter } from "../../stencil-public-runtime"; import { FocusableComponent, OpenerComponent, ThemeableComponent } from "../../common"; import { DuetLanguage, DuetTheme } from "../../common-types"; export type DuetPopupMenuEvent = { open: boolean; component: "duet-popup-menu"; }; export declare class DuetPopupMenu implements ThemeableComponent { private teleport; private menuElement; private openButton; private autoUpdateCleanup; private filterInput?; private filterLabel; private filterResultCountLabel; private disconnectController; private eventListenerController; /** * Reference to host HTML element. */ element: HTMLElement; open: boolean; menuY: number; menuX: number; filterResultCount: number; language: DuetLanguage; /** * Adds accessible label for the menu that is only presented for users of assistive technologies. * A popup menu should always have an accessible label that describes the popup's function. */ accessibleLabel: string; /** * Accessible role. */ accessibleRole: "menu" | "listbox" | "list"; /** * Theme. */ theme: DuetTheme; /** * @internal */ skipTeleport: boolean; /** * Element, or id of an element, that controls the opening and closing of the popup menu. If id is given, * the component automatically sets the click event listener to open and close the popup-menu. */ controller: string | HTMLDuetInputElement | (HTMLElement & FocusableComponent & OpenerComponent) | HTMLElement; /** * Alias for property controller. */ get opener(): string | HTMLElement | HTMLDuetInputElement | (HTMLElement & FocusableComponent & OpenerComponent); set opener(value: string | HTMLElement | HTMLDuetInputElement | (HTMLElement & FocusableComponent & OpenerComponent)); /** * Placement of the popup menu relative to its controller. * Possible values: "top", "bottom", "left" and "right", optionally combined with "-start" or "-end". */ placement: "top" | "right" | "bottom" | "left" | "top-start" | "top-end" | "right-start" | "right-end" | "bottom-start" | "bottom-end" | "left-start" | "left-end"; /** * Set true to override automatic placement on scrolling out of viewport and force the placement set with attribute. */ forcePlacement: boolean; /** * Allow vertical flip when there is not enough space * below the controller. */ allowVerticalFlip: boolean; /** * Position. */ position: "absolute" | "fixed"; /** * Main axis positioning offset of the popup menu relative to its controller. * For "top" and "bottom" placements main axis is vertical, for "left" and "right" horizontal. */ mainAxisOffset: number; /** * Cross axis positioning offset of the popup menu relative to its controller. * For "top" and "bottom" placements cross axis is horizontal, for "left" and "right" vertical. */ crossAxisOffset: number; /** * By default Popup Menu adds "action-arrow-down-small" icon to the controller. * This can be removed with controller-icon="". */ controllerIcon: string; /** * Limit the amount of visible items in Popup Menu before showing a scroll bar. */ scrollLimit: number; /** * Show input where user can type to filter popup-menu items to those that have a match in value or text content */ showFilterInput: boolean; /** * Emitted when the popup menu is opened or closed. */ duetToggle: EventEmitter; /** * Component lifecycle events. */ componentWillLoad(): void; componentDidLoad(): void; connectedCallback(): void; disconnectedCallback(): void; /** * Component event handling. */ handleKeyUp(evt: any): void; handleKeyDown(evt: any): Promise; handleClick(evt: any): void; /** * isOpen. */ isOpen(): Promise; /** * Show. */ show(): Promise; /** * Hide. */ hide(): Promise; /** * Toggle. */ toggle(): Promise; handleOpenChange(newValue: any, oldValue: any): void; handleControllerChange(newValue: any, oldValue: any): void; private setOpenButton; private openButtonEventListener; private updatePlacement; private get itemElements(); private getAllPrecedingMatchingSiblings; private get popupMenuStyleHeight(); private getFocusedItemIndex; private getNonFilteredItems; private filterItems; private handleKeyDownOnFilter; render(): any; }