UNPKG

finpro

Version:
41 lines 1.55 kB
import { CSSResultGroup, TemplateResult } from "lit"; import FinproElement from "../../internals/finpro-element"; import FpMenuItem from "./fp-menu-item/fp-menu-item"; export interface MenuSelectEventDetail { item: FpMenuItem; } /** * @tag fp-menu * @summary Finpro Menu component * * @event {{ item: FpSelect }} fp-select - Emitted when a menu item is selected. */ export default class FpMenu extends FinproElement { static get styles(): CSSResultGroup; defaultSlot: HTMLSlotElement; connectedCallback(): void; private handleClick; private handleKeyDown; private handleMouseDown; private handleSlotChange; private isMenuItem; /** @internal Gets all slotted menu items, ignoring dividers, headers, and other elements. */ getAllItems(): FpMenuItem[]; /** * @internal Gets the current menu item, which is the menu item that has `tabindex="0"` within the roving tab index. * The menu item may or may not have focus, but for keyboard interaction purposes it's considered the "active" item. */ getCurrentItem(): FpMenuItem | undefined; /** * @internal Sets the current menu item to the specified element. This sets `tabindex="0"` on the target element and * `tabindex="-1"` to all other items. This method must be called prior to setting focus on a menu item. */ setCurrentItem(item: FpMenuItem): void; render(): TemplateResult; } declare global { interface HTMLElementTagNameMap { 'fp-menu': FpMenu; } } //# sourceMappingURL=fp-menu.d.ts.map