import { UiElement } from '../shared/element.js'; import type { OpenDetail } from '../shared/events.js'; /** * Carbon `HeaderMenu`: a menu-bar entry that opens a 200px dropdown of ``s. * Click / Enter / Space toggle; Escape and clicking outside close and return focus. Following one of * its links closes it too (Carbon toggles on any click in the menu), so a client-side route change * doesn't leave it open; focus goes back to the title rather than staying on a hidden link. * A disclosure (APG disclosure navigation): the links stay links, so the button has no `aria-haspopup`. * While closed it shows the current-page bar when one of its items is `current` (Carbon * `hasActiveDescendant`); `current` shows it always (Carbon `isActive`). * * @slot - `` elements * @fires ui-toggle - detail: { open } * @csspart trigger - The title button * @csspart menu - The dropdown list */ export declare class UiHeaderMenu extends UiElement { static readonly shadowRootOptions: ShadowRootInit; static readonly styles: import("lit").CSSResult[]; label: string; open: boolean; /** Mark the menu as the current section even while open (Carbon `isActive`). */ current: boolean; private readonly trigger; private readonly items; private readonly menuId; connectedCallback(): void; disconnectedCallback(): void; protected updated(changed: Map): void; private stopListening; private stopOutside?; private readonly onDocumentPointerDown; private readonly onKeydown; private onFocusOut; private onItemClick; render(): import("lit-html").TemplateResult<1>; } export interface UiHeaderMenuEventMap extends HTMLElementEventMap { 'ui-toggle': CustomEvent; } /** Typed listeners for UiHeaderMenu's events (declaration merging with the class). */ export interface UiHeaderMenu { addEventListener(type: K, listener: (this: UiHeaderMenu, event: UiHeaderMenuEventMap[K]) => unknown, options?: boolean | AddEventListenerOptions): void; addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; removeEventListener(type: K, listener: (this: UiHeaderMenu, event: UiHeaderMenuEventMap[K]) => unknown, options?: boolean | EventListenerOptions): void; removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void; } declare global { interface HTMLElementTagNameMap { 'ui-header-menu': UiHeaderMenu; } }