menu.d.ts 842 B

123456789101112131415161718192021222324252627
  1. import { LitElement } from 'lit';
  2. import { EventEmitter } from '../../internal/decorators';
  3. import type SlMenuItem from '../menu-item/menu-item';
  4. export default class SlMenu extends LitElement {
  5. static styles: import("lit").CSSResult;
  6. menu: HTMLElement;
  7. defaultSlot: HTMLSlotElement;
  8. private items;
  9. private typeToSelectString;
  10. private typeToSelectTimeout;
  11. slSelect: EventEmitter<{
  12. item: SlMenuItem;
  13. }>;
  14. typeToSelect(key: string): void;
  15. syncItems(): void;
  16. getActiveItem(): SlMenuItem;
  17. setActiveItem(item: SlMenuItem): void;
  18. handleClick(event: MouseEvent): void;
  19. handleKeyDown(event: KeyboardEvent): void;
  20. handleSlotChange(): void;
  21. render(): import("lit-html").TemplateResult<1>;
  22. }
  23. declare global {
  24. interface HTMLElementTagNameMap {
  25. 'sl-menu': SlMenu;
  26. }
  27. }