UNPKG

@trimble-oss/moduswebcomponents

Version:

Modus Web Components is a modern, accessible UI library built with Stencil JS that provides reusable web components following Trimble's Modus design system. This updated version focuses on improved flexibility, enhanced theming options, comprehensive cust

44 lines (43 loc) 1.61 kB
import { EventEmitter } from '../../stencil-public-runtime'; import { ModusSize, Orientation, SelectionMode } from '../types'; /** * A customizable menu component used to display a list of li elements vertically or horizontally. * * The component supports a `<slot>` for injecting custom li elements inside the ul element. */ export declare class ModusWcMenu { private inheritedAttributes; private selectedItems; /** Reference to the host element */ el: HTMLElement; /** Indicates that the menu should have a border. */ bordered?: boolean; /** Custom CSS class to apply to the ul element. */ customClass?: string; /** The orientation of the menu. */ orientation?: Orientation; /** The selection mode of the menu. */ selectionMode?: SelectionMode; onSelectionModeChange(): void; /** The size of the menu. */ size?: ModusSize; /** Indicates that this menu is a submenu (dropdown). */ isSubMenu?: boolean; /** Event emitted when the menu loses focus. */ menuFocusout: EventEmitter<FocusEvent>; /** Event emitted when the selection changes in multiple selection mode. Emits the array of currently selected menu item elements. */ menuSelectionChange: EventEmitter<{ selectedItems: HTMLElement[]; }>; componentWillLoad(): void; private getClasses; private getMenuItems; handleItemSelect(e: CustomEvent<{ value: string; selected?: boolean; }>): void; handleKeyDown(e: KeyboardEvent): void; handleFocusout(e: FocusEvent): void; private getMenuRole; render(): any; }