import { LitElement } from 'lit'; import '../popout/Popout.js'; /** * Dropdown submenu nests a secondary menu within a parent dropdown. * The trigger slot contains the item that opens the submenu, and the default slot contains the submenu items. * * Supports both hover (non-touch) and click (touch-devices/accessibility) interactions. * * On small screens, uses mobile stack navigation: tapping a submenu trigger replaces the * dropdown's visible content with the submenu's items and shows a back button. * * @status ready * @category action * * @slot trigger - The element that opens the submenu (typically nord-dropdown-item). * @slot - The submenu content items. * * @fires {NordEvent} open - Forwarded from the internal nord-popout. * @fires {NordEvent} close - Forwarded from the internal nord-popout. * @fires {CustomEvent} nord-submenu-navigate - Fired when mobile stack navigation activates this submenu. */ export default class DropdownSubmenu extends LitElement { static styles: import("lit").CSSResult[]; private popout?; /** @internal */ private mobileActive; private readonly popoutId; private events; private currentTriggerElement; private popoutOpen; private readonly mobileMediaQuery; private isSmallScreen; private parentDropdownAlwaysFloating; private parentObserver?; private get shouldUseMobileStack(); private get parentDropdown(); private get isInSubmenuStack(); private get isDeepestInStack(); connectedCallback(): void; disconnectedCallback(): void; render(): import("lit").TemplateResult<1>; private handleTriggerSlotChange; private handleTriggerMouseEnter; private handleTriggerClick; private handleTriggerKeydown; private handleContentKeydown; private handlePopoutOpen; private handlePopoutClose; private handleParentDropdownMouseOver; private closeOtherSubmenus; /** * Deactivate mobile stack navigation (remove from stack). * @internal */ deactivateMobile(): void; /** * Read trigger text for back button title in Dropdown. * @internal */ get label(): string; /** * Close the submenu programmatically. * Returns a promise that resolves when the close animation completes. */ close(): Promise; /** * Navigate into this submenu using mobile stack navigation. * @internal */ private navigateIntoSubmenu; } declare global { interface HTMLElementTagNameMap { 'nord-dropdown-submenu': DropdownSubmenu; } }