import { CSSResultArray, PropertyValues, TemplateResult } from 'lit'; import { LuzmoElement } from '../../utils/base'; import { LuzmoMenuItem } from './menu-item'; export interface MenuChildItem { menuItem: LuzmoMenuItem; managed: boolean; active: boolean; focusable: boolean; focusRoot: LuzmoMenu; } declare const LuzmoMenu_base: typeof LuzmoElement & { new (...args: any[]): import("../..").SizedElementInterface; prototype: import("../..").SizedElementInterface; }; /** * Luzmo Menu Component * @element luzmo-menu * * @slot - menu items to be listed in the menu * @fires change - Announces that the `value` of the element has changed * @attr selects - whether the element has a specific selection algorithm that it applies * to its item descendants. `single` allows only one descendent to be selected at a time. * `multiple` allows many descendants to be selected. `inherit` will be applied dynamically * when an ancestor of this element is actively managing the selection of its descendents. * When the `selects` attribute is not present a `value` will not be maintained and the Menu * Item children of this Menu will not have their `selected` state managed. */ export declare class LuzmoMenu extends LuzmoMenu_base { static get styles(): CSSResultArray; private get isSubmenu(); label: string; ignore: boolean; variant?: 'checkmarks' | 'highlight'; selects: undefined | 'inherit' | 'single' | 'multiple'; value: string; valueSeparator: string; get selected(): string[]; set selected(selected: string[]); selectedItems: LuzmoMenuItem[]; menuSlot: HTMLSlotElement; focusedItemIndex: number; focusInItemIndex: number; protected _selected: string[]; protected childItemsUpdated: Promise; protected cacheUpdated: Promise; private childItemSet; private selectedItemsMap; get childItems(): LuzmoMenuItem[]; /** * Hide this getter from web-component-analyzer until * https://github.com/runem/web-component-analyzer/issues/131 * has been addressed. * * @private */ get childRole(): string; protected get ownRole(): string; private cachedChildItems; private resolvedSelects?; private resolvedRole?; private _hasUpdatedSelectedItemIndex; private _willUpdateItems; private pointerUpTarget; private descendentOverlays; constructor(); focus({ preventScroll }?: FocusOptions): void; handleFocusin(event: FocusEvent): void; startListeningToKeyboard(): void; handleBlur(event: FocusEvent): void; stopListeningToKeyboard(): void; handleSubmenuClosed: (event: Event) => void; handleSubmenuOpened: (event: Event) => void; selectOrToggleItem(targetItem: LuzmoMenuItem): void; handleKeydown(event: KeyboardEvent): void; focusMenuItemByOffset(offset: number): LuzmoMenuItem; updateSelectedItemIndex(): void; closeDescendentOverlays(): void; render(): TemplateResult; connectedCallback(): void; disconnectedCallback(): void; protected handleDescendentOverlayOpened(event: Event): void; protected handleDescendentOverlayClosed(event: Event): void; protected navigateWithinMenu(event: KeyboardEvent): void; protected handleTypeahead(event: KeyboardEvent): void; protected navigateBetweenRelatedMenus(event: KeyboardEvent): void; protected renderMenuItemSlot(): TemplateResult; protected firstUpdated(changed: PropertyValues): void; protected updated(changes: PropertyValues): void; protected selectsChanged(): void; protected resolveCacheUpdated: () => void; protected getUpdateComplete(): Promise; private updateCachedMenuItems; /** * When a descendant `` element is added or updated it will dispatch * this event to announce its presence in the DOM. During the CAPTURE phase the first * Menu based element that the event encounters will manage the focus state of the * dispatching `` element. * @param event */ private onFocusableItemAddedOrUpdated; /** * When a descendant `` element is added or updated it will dispatch * this event to announce its presence in the DOM. During the BUBBLE phase the first * Menu based element that the event encounters that does not inherit selection will * manage the selection state of the dispatching `` element. * @param event */ private onSelectableItemAddedOrUpdated; private addChildItem; private removeChildItem; private handleClick; private handlePointerup; private handlePointerBasedSelection; private prepareToCleanUp; private handleItemsChanged; private updateCache; private updateItemFocus; private forwardFocusVisibleToItem; private handleSlotchange; } export {};