import { CSSResultArray, nothing, PropertyValues, TemplateResult } from 'lit'; import { Focusable } from '../../utils/focusable'; import { LuzmoOverlay } from '../overlay'; import { LuzmoMenu } from './menu'; type MenuCascadeItem = { hadFocusRoot: boolean; ancestorWithSelects?: HTMLElement; }; export declare class MenuItemAddedOrUpdatedEvent extends Event { menuCascade: WeakMap; get item(): LuzmoMenuItem; currentAncestorWithSelects?: LuzmoMenu; private _item; constructor(item: LuzmoMenuItem); clear(item: LuzmoMenuItem): void; } export type MenuItemChildren = { icon: Element[]; content: Node[]; }; declare const LuzmoMenuItem_base: typeof Focusable & { new (...args: any[]): import("../../utils/observe-slot-presence").SlotPresenceObservingInterface; prototype: import("../../utils/observe-slot-presence").SlotPresenceObservingInterface; } & { new (...args: any[]): import("../../utils/observe-slot-text").SlotTextObservingInterface; prototype: import("../../utils/observe-slot-text").SlotTextObservingInterface; } & { new (...args: any[]): import("../../utils/like-anchor").LikeAnchorInterface; prototype: import("../../utils/like-anchor").LikeAnchorInterface; }; /** * @element luzmo-menu-item * * @slot - text content to display within the Menu Item * @slot description - description to be placed below the label of the Menu Item * @slot icon - icon element to be placed at the start of the Menu Item * @slot value - content placed at the end of the Menu Item like values, keyboard shortcuts, etc. * @slot submenu - content placed in a submenu * @fires luzmo-menu-item-added - announces the item has been added so a parent menu can take ownerships * * @attr {string} tooltip - Text to display in a tooltip with an info icon on the right side * @attr {string} tooltip-placement - Placement of the tooltip relative to the info icon (default: "top") */ export declare class LuzmoMenuItem extends LuzmoMenuItem_base { static get styles(): CSSResultArray; abortControllerSubmenu: AbortController; active: boolean; private dependencyManager; focused: boolean; selected: boolean; get value(): string; set value(value: string); private _value; /** * @private */ get itemText(): string; hasSubmenu: boolean; tooltip?: string; tooltipPlacement?: 'top' | 'top-start' | 'top-end' | 'right' | 'right-start' | 'right-end' | 'bottom' | 'bottom-start' | 'bottom-end' | 'left' | 'left-start' | 'left-end'; contentSlot: HTMLSlotElement; iconSlot: HTMLSlotElement; noWrap: boolean; private anchorElement; overlayElement: LuzmoOverlay; private submenuElement?; protected renderAngleIcon: (classes?: string[]) => TemplateResult; protected renderCheckIcon: (classes?: string[]) => TemplateResult; protected renderInfoIcon: (classes?: string[]) => TemplateResult; protected renderTooltip(): TemplateResult | typeof nothing; get focusElement(): HTMLElement; protected get hasIcon(): boolean; get itemChildren(): MenuItemChildren; private _itemChildren?; constructor(); open: boolean; click(): void; private handleClickCapture; private handleSlottableRequest; private proxyFocus; private shouldProxyClick; protected breakItemChildrenCache(): void; protected renderSubmenu(): TemplateResult; protected render(): TemplateResult; protected manageSubmenu(event: Event & { target: HTMLSlotElement; }): void; private handlePointerdown; protected firstUpdated(changes: PropertyValues): void; protected closeOverlaysForRoot(): void; protected handleSubmenuClick(event: Event): void; protected handleSubmenuFocus(): void; protected handleBeforetoggle: (event: Event) => void; protected handlePointerenter(): void; protected leaveTimeout?: ReturnType; protected recentlyLeftChild: boolean; protected handlePointerleave(): void; /** * When there is a `change` event in the submenu for this item * then we "click" this item to cascade the selection up the * menu tree allowing all submenus between the initial selection * and the root of the tree to have their selection changes and * be closed. */ protected handleSubmenuChange(event: Event): void; protected handleSubmenuPointerenter(): void; protected handleSubmenuPointerleave(): void; protected handleSubmenuOpen(event: Event): void; protected cleanup(): void; openOverlay(): void; updateAriaSelected(): void; setRole(role: string): void; protected updated(changes: PropertyValues): void; connectedCallback(): void; _parentElement: HTMLElement; disconnectedCallback(): void; private willDispatchUpdate; triggerUpdate(): Promise; dispatchUpdate(): void; menuData: { focusRoot?: LuzmoMenu; parentMenu?: LuzmoMenu; selectionRoot?: LuzmoMenu; cleanupSteps: ((item: LuzmoMenuItem) => void)[]; }; } declare global { interface GlobalEventHandlersEventMap { 'luzmo-menu-item-added-or-updated': MenuItemAddedOrUpdatedEvent; } } export {};