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