import { UiElement } from '../shared/element.js'; import type { OpenDetail } from '../shared/events.js'; /** * A header menu-bar entry that opens a full-width panel of `` columns under the header (a mega * menu, as Vercel's): put it in `` next to ``s and ``s. * * - With a mouse, resting on it opens the panel after 150ms; while another one is open, moving to it switches at once; * leaving the entry and its panel closes a panel the pointer opened, after 300ms. A finger opens it by a tap. * - Click / Enter / Space toggle it (a panel the pointer opened stays open); ↓ opens it and moves to the first link. * - Escape, clicking outside, Tab out of it and following one of its links close it; Escape and a link return focus to it. * - One panel at a time: opening it closes the other menus of the bar. * - A disclosure (APG disclosure navigation): the links stay links, so the button has no `aria-haspopup`. * - In a narrow `` (and in the side nav's copy of the bar) it is an accordion row instead. * * While closed it shows the current-page bar when one of its items is `current`; `current` shows it always. * * @slot - `` elements * @fires ui-toggle - detail: { open } * @csspart trigger - The menu-bar entry * @csspart panel - The panel under the header * @csspart content - The grid of groups inside the panel * @cssprop --ui-mega-panel-background - The panel's fill (default the overlay's, `--ui-surface-1`; Kanok: the page's white) * @cssprop --ui-mega-panel-shadow - Its shadow (default Carbon's menu shadow; Kanok: a soft one) * @cssprop --ui-mega-panel-border - Its bottom edge (default none; Kanok: a hairline) * @cssprop --ui-mega-column-width - The narrowest a group column gets (default 240px) * @cssprop --ui-mega-gap - Between the columns (default 32px) * @cssprop --ui-mega-padding - Around the columns (default 24px 32px 32px) */ export declare class UiHeaderMegaMenu 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. */ current: boolean; private box; private readonly trigger; private readonly panelId; private openedBy; private openTimer?; private closeTimer?; private stopOutside?; connectedCallback(): void; disconnectedCallback(): void; private get collapsed(); private get megaState(); private apply; /** The bar's other menus (one panel at a time). */ private others; private closeOthers; private clearTimers; private readonly onPointerEnter; private readonly onPointerLeave; private onTriggerClick; private onTriggerKeydown; protected willUpdate(changed: Map): void; protected updated(changed: Map): void; /** Shows the panel in the top layer while open (not in the narrow sheet, where it is an accordion row). */ private syncPopover; private startListening; private stopListening; /** Under the header and as wide as it (the page's width without one): a header inside a host app's frame still fits. */ private readonly place; private readonly onDocumentPointerDown; private readonly onKeydown; private onFocusOut; private onPanelClick; render(): import("lit-html").TemplateResult<1>; } export interface UiHeaderMegaMenuEventMap extends HTMLElementEventMap { 'ui-toggle': CustomEvent; } /** Typed listeners for UiHeaderMegaMenu's events (declaration merging with the class). */ export interface UiHeaderMegaMenu { addEventListener(type: K, listener: (this: UiHeaderMegaMenu, event: UiHeaderMegaMenuEventMap[K]) => unknown, options?: boolean | AddEventListenerOptions): void; addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; removeEventListener(type: K, listener: (this: UiHeaderMegaMenu, event: UiHeaderMegaMenuEventMap[K]) => unknown, options?: boolean | EventListenerOptions): void; removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void; } declare global { interface HTMLElementTagNameMap { 'ui-header-mega-menu': UiHeaderMegaMenu; } }