@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
49 lines (48 loc) • 1.83 kB
TypeScript
import { EventEmitter } from '../../stencil-public-runtime';
import { DaisySize, ModusSize, PopoverPlacement } from '../types';
/**
* A customizable dropdown menu component used to render a button and toggleable menu.
*
* The component supports a 'button' and 'menu' `<slot>` for injecting custom HTML content.
*/
export declare class ModusWcDropdownMenu {
private buttonRef?;
private inheritedAttributes;
private menuRef?;
/** Reference to the host element */
el: HTMLElement;
/** The color variant of the button. */
buttonColor?: 'primary' | 'secondary' | 'tertiary' | 'warning' | 'danger';
/** The size of the button. */
buttonSize?: DaisySize;
/** The variant of the button. */
buttonVariant?: 'borderless' | 'filled' | 'outlined';
/** Custom CSS class to apply to the host element. */
customClass?: string;
/** If true, the button will be disabled. */
disabled?: boolean;
/** Indicates that the menu should have a border. */
menuBordered?: boolean;
/** Distance between the button and menu in pixels. */
menuOffset?: number;
/** The placement of the menu relative to the button. */
menuPlacement?: PopoverPlacement;
/** The size of the menu. */
menuSize?: ModusSize;
/** Indicates that the menu is visible. */
menuVisible: boolean;
/** Event emitted when the menuVisible prop changes. */
menuVisibilityChange: EventEmitter<{
isVisible: boolean;
}>;
private menuPosition;
handleDocumentClick(event: Event): void;
handleKeyDown(event: KeyboardEvent): void;
onMenuVisibilityChange(newValue: boolean): Promise<void>;
componentDidLoad(): void;
componentWillLoad(): void;
private getClasses;
private handleButtonClick;
private updateMenuPosition;
render(): any;
}