index.d.ts 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496
  1. import * as i0 from '@angular/core';
  2. import { InjectionToken, OnDestroy, TemplateRef, EventEmitter, AfterViewInit, AfterContentInit, OnInit, QueryList } from '@angular/core';
  3. import { FocusOrigin, FocusableOption } from '@angular/cdk/a11y';
  4. import { Direction } from '@angular/cdk/bidi';
  5. import { Subject, Observable } from 'rxjs';
  6. import * as i2 from '@angular/cdk/overlay';
  7. import { ScrollStrategy, Overlay } from '@angular/cdk/overlay';
  8. import { M as MatRippleModule } from '../index.d-DG9eDM2-.js';
  9. import { M as MatCommonModule } from '../common-module.d-C8xzHJDr.js';
  10. import * as i5 from '@angular/cdk/scrolling';
  11. import '../ripple.d-BxTUZJt7.js';
  12. import '@angular/cdk/platform';
  13. type MenuPositionX = 'before' | 'after';
  14. type MenuPositionY = 'above' | 'below';
  15. /**
  16. * Injection token that can be used to reference instances of `MatMenuContent`. It serves
  17. * as alternative token to the actual `MatMenuContent` class which could cause unnecessary
  18. * retention of the class and its directive metadata.
  19. */
  20. declare const MAT_MENU_CONTENT: InjectionToken<MatMenuContent>;
  21. /** Menu content that will be rendered lazily once the menu is opened. */
  22. declare class MatMenuContent implements OnDestroy {
  23. private _template;
  24. private _appRef;
  25. private _injector;
  26. private _viewContainerRef;
  27. private _document;
  28. private _changeDetectorRef;
  29. private _portal;
  30. private _outlet;
  31. /** Emits when the menu content has been attached. */
  32. readonly _attached: Subject<void>;
  33. constructor(...args: unknown[]);
  34. /**
  35. * Attaches the content with a particular context.
  36. * @docs-private
  37. */
  38. attach(context?: any): void;
  39. /**
  40. * Detaches the content.
  41. * @docs-private
  42. */
  43. detach(): void;
  44. ngOnDestroy(): void;
  45. static ɵfac: i0.ɵɵFactoryDeclaration<MatMenuContent, never>;
  46. static ɵdir: i0.ɵɵDirectiveDeclaration<MatMenuContent, "ng-template[matMenuContent]", never, {}, {}, never, never, true, never>;
  47. }
  48. /**
  49. * Injection token used to provide the parent menu to menu-specific components.
  50. * @docs-private
  51. */
  52. declare const MAT_MENU_PANEL: InjectionToken<MatMenuPanel<any>>;
  53. /**
  54. * Interface for a custom menu panel that can be used with `matMenuTriggerFor`.
  55. * @docs-private
  56. */
  57. interface MatMenuPanel<T = any> {
  58. xPosition: MenuPositionX;
  59. yPosition: MenuPositionY;
  60. overlapTrigger: boolean;
  61. templateRef: TemplateRef<any>;
  62. readonly close: EventEmitter<void | 'click' | 'keydown' | 'tab'>;
  63. parentMenu?: MatMenuPanel | undefined;
  64. direction?: Direction;
  65. focusFirstItem: (origin?: FocusOrigin) => void;
  66. resetActiveItem: () => void;
  67. setPositionClasses?: (x: MenuPositionX, y: MenuPositionY) => void;
  68. /**
  69. * @deprecated No longer used and will be removed.
  70. * @breaking-change 21.0.0
  71. */
  72. setElevation?(depth: number): void;
  73. lazyContent?: MatMenuContent;
  74. backdropClass?: string;
  75. overlayPanelClass?: string | string[];
  76. hasBackdrop?: boolean;
  77. readonly panelId?: string;
  78. /**
  79. * @deprecated To be removed.
  80. * @breaking-change 8.0.0
  81. */
  82. addItem?: (item: T) => void;
  83. /**
  84. * @deprecated To be removed.
  85. * @breaking-change 8.0.0
  86. */
  87. removeItem?: (item: T) => void;
  88. }
  89. /**
  90. * Single item inside a `mat-menu`. Provides the menu item styling and accessibility treatment.
  91. */
  92. declare class MatMenuItem implements FocusableOption, AfterViewInit, OnDestroy {
  93. private _elementRef;
  94. private _document;
  95. private _focusMonitor;
  96. _parentMenu?: MatMenuPanel<MatMenuItem> | null | undefined;
  97. private _changeDetectorRef;
  98. /** ARIA role for the menu item. */
  99. role: 'menuitem' | 'menuitemradio' | 'menuitemcheckbox';
  100. /** Whether the menu item is disabled. */
  101. disabled: boolean;
  102. /** Whether ripples are disabled on the menu item. */
  103. disableRipple: boolean;
  104. /** Stream that emits when the menu item is hovered. */
  105. readonly _hovered: Subject<MatMenuItem>;
  106. /** Stream that emits when the menu item is focused. */
  107. readonly _focused: Subject<MatMenuItem>;
  108. /** Whether the menu item is highlighted. */
  109. _highlighted: boolean;
  110. /** Whether the menu item acts as a trigger for a sub-menu. */
  111. _triggersSubmenu: boolean;
  112. constructor(...args: unknown[]);
  113. /** Focuses the menu item. */
  114. focus(origin?: FocusOrigin, options?: FocusOptions): void;
  115. ngAfterViewInit(): void;
  116. ngOnDestroy(): void;
  117. /** Used to set the `tabindex`. */
  118. _getTabIndex(): string;
  119. /** Returns the host DOM element. */
  120. _getHostElement(): HTMLElement;
  121. /** Prevents the default element actions if it is disabled. */
  122. _checkDisabled(event: Event): void;
  123. /** Emits to the hover stream. */
  124. _handleMouseEnter(): void;
  125. /** Gets the label to be used when determining whether the option should be focused. */
  126. getLabel(): string;
  127. _setHighlighted(isHighlighted: boolean): void;
  128. _setTriggersSubmenu(triggersSubmenu: boolean): void;
  129. _hasFocus(): boolean;
  130. static ɵfac: i0.ɵɵFactoryDeclaration<MatMenuItem, never>;
  131. static ɵcmp: i0.ɵɵComponentDeclaration<MatMenuItem, "[mat-menu-item]", ["matMenuItem"], { "role": { "alias": "role"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "disableRipple": { "alias": "disableRipple"; "required": false; }; }, {}, never, ["mat-icon, [matMenuItemIcon]", "*"], true, never>;
  132. static ngAcceptInputType_disabled: unknown;
  133. static ngAcceptInputType_disableRipple: unknown;
  134. }
  135. /** Reason why the menu was closed. */
  136. type MenuCloseReason = void | 'click' | 'keydown' | 'tab';
  137. /** Default `mat-menu` options that can be overridden. */
  138. interface MatMenuDefaultOptions {
  139. /** The x-axis position of the menu. */
  140. xPosition: MenuPositionX;
  141. /** The y-axis position of the menu. */
  142. yPosition: MenuPositionY;
  143. /** Whether the menu should overlap the menu trigger. */
  144. overlapTrigger: boolean;
  145. /** Class to be applied to the menu's backdrop. */
  146. backdropClass: string;
  147. /** Class or list of classes to be applied to the menu's overlay panel. */
  148. overlayPanelClass?: string | string[];
  149. /** Whether the menu has a backdrop. */
  150. hasBackdrop?: boolean;
  151. }
  152. /** Injection token to be used to override the default options for `mat-menu`. */
  153. declare const MAT_MENU_DEFAULT_OPTIONS: InjectionToken<MatMenuDefaultOptions>;
  154. declare class MatMenu implements AfterContentInit, MatMenuPanel<MatMenuItem>, OnInit, OnDestroy {
  155. private _elementRef;
  156. private _changeDetectorRef;
  157. private _injector;
  158. private _keyManager;
  159. private _xPosition;
  160. private _yPosition;
  161. private _firstItemFocusRef?;
  162. private _exitFallbackTimeout;
  163. /** Whether animations are currently disabled. */
  164. protected _animationsDisabled: boolean;
  165. /** All items inside the menu. Includes items nested inside another menu. */
  166. _allItems: QueryList<MatMenuItem>;
  167. /** Only the direct descendant menu items. */
  168. _directDescendantItems: QueryList<MatMenuItem>;
  169. /** Classes to be applied to the menu panel. */
  170. _classList: {
  171. [key: string]: boolean;
  172. };
  173. /** Current state of the panel animation. */
  174. _panelAnimationState: 'void' | 'enter';
  175. /** Emits whenever an animation on the menu completes. */
  176. readonly _animationDone: Subject<"void" | "enter">;
  177. /** Whether the menu is animating. */
  178. _isAnimating: boolean;
  179. /** Parent menu of the current menu panel. */
  180. parentMenu: MatMenuPanel | undefined;
  181. /** Layout direction of the menu. */
  182. direction: Direction;
  183. /** Class or list of classes to be added to the overlay panel. */
  184. overlayPanelClass: string | string[];
  185. /** Class to be added to the backdrop element. */
  186. backdropClass: string;
  187. /** aria-label for the menu panel. */
  188. ariaLabel: string;
  189. /** aria-labelledby for the menu panel. */
  190. ariaLabelledby: string;
  191. /** aria-describedby for the menu panel. */
  192. ariaDescribedby: string;
  193. /** Position of the menu in the X axis. */
  194. get xPosition(): MenuPositionX;
  195. set xPosition(value: MenuPositionX);
  196. /** Position of the menu in the Y axis. */
  197. get yPosition(): MenuPositionY;
  198. set yPosition(value: MenuPositionY);
  199. /** @docs-private */
  200. templateRef: TemplateRef<any>;
  201. /**
  202. * List of the items inside of a menu.
  203. * @deprecated
  204. * @breaking-change 8.0.0
  205. */
  206. items: QueryList<MatMenuItem>;
  207. /**
  208. * Menu content that will be rendered lazily.
  209. * @docs-private
  210. */
  211. lazyContent: MatMenuContent;
  212. /** Whether the menu should overlap its trigger. */
  213. overlapTrigger: boolean;
  214. /** Whether the menu has a backdrop. */
  215. hasBackdrop?: boolean;
  216. /**
  217. * This method takes classes set on the host mat-menu element and applies them on the
  218. * menu template that displays in the overlay container. Otherwise, it's difficult
  219. * to style the containing menu from outside the component.
  220. * @param classes list of class names
  221. */
  222. set panelClass(classes: string);
  223. private _previousPanelClass;
  224. /**
  225. * This method takes classes set on the host mat-menu element and applies them on the
  226. * menu template that displays in the overlay container. Otherwise, it's difficult
  227. * to style the containing menu from outside the component.
  228. * @deprecated Use `panelClass` instead.
  229. * @breaking-change 8.0.0
  230. */
  231. get classList(): string;
  232. set classList(classes: string);
  233. /** Event emitted when the menu is closed. */
  234. readonly closed: EventEmitter<MenuCloseReason>;
  235. /**
  236. * Event emitted when the menu is closed.
  237. * @deprecated Switch to `closed` instead
  238. * @breaking-change 8.0.0
  239. */
  240. readonly close: EventEmitter<MenuCloseReason>;
  241. readonly panelId: string;
  242. constructor(...args: unknown[]);
  243. ngOnInit(): void;
  244. ngAfterContentInit(): void;
  245. ngOnDestroy(): void;
  246. /** Stream that emits whenever the hovered menu item changes. */
  247. _hovered(): Observable<MatMenuItem>;
  248. addItem(_item: MatMenuItem): void;
  249. /**
  250. * Removes an item from the menu.
  251. * @docs-private
  252. * @deprecated No longer being used. To be removed.
  253. * @breaking-change 9.0.0
  254. */
  255. removeItem(_item: MatMenuItem): void;
  256. /** Handle a keyboard event from the menu, delegating to the appropriate action. */
  257. _handleKeydown(event: KeyboardEvent): void;
  258. /**
  259. * Focus the first item in the menu.
  260. * @param origin Action from which the focus originated. Used to set the correct styling.
  261. */
  262. focusFirstItem(origin?: FocusOrigin): void;
  263. /**
  264. * Resets the active item in the menu. This is used when the menu is opened, allowing
  265. * the user to start from the first option when pressing the down arrow.
  266. */
  267. resetActiveItem(): void;
  268. /**
  269. * @deprecated No longer used and will be removed.
  270. * @breaking-change 21.0.0
  271. */
  272. setElevation(_depth: number): void;
  273. /**
  274. * Adds classes to the menu panel based on its position. Can be used by
  275. * consumers to add specific styling based on the position.
  276. * @param posX Position of the menu along the x axis.
  277. * @param posY Position of the menu along the y axis.
  278. * @docs-private
  279. */
  280. setPositionClasses(posX?: MenuPositionX, posY?: MenuPositionY): void;
  281. /** Callback that is invoked when the panel animation completes. */
  282. protected _onAnimationDone(state: string): void;
  283. protected _onAnimationStart(state: string): void;
  284. _setIsOpen(isOpen: boolean): void;
  285. /**
  286. * Sets up a stream that will keep track of any newly-added menu items and will update the list
  287. * of direct descendants. We collect the descendants this way, because `_allItems` can include
  288. * items that are part of child menus, and using a custom way of registering items is unreliable
  289. * when it comes to maintaining the item order.
  290. */
  291. private _updateDirectDescendants;
  292. /** Gets the menu panel DOM node. */
  293. private _resolvePanel;
  294. static ɵfac: i0.ɵɵFactoryDeclaration<MatMenu, never>;
  295. static ɵcmp: i0.ɵɵComponentDeclaration<MatMenu, "mat-menu", ["matMenu"], { "backdropClass": { "alias": "backdropClass"; "required": false; }; "ariaLabel": { "alias": "aria-label"; "required": false; }; "ariaLabelledby": { "alias": "aria-labelledby"; "required": false; }; "ariaDescribedby": { "alias": "aria-describedby"; "required": false; }; "xPosition": { "alias": "xPosition"; "required": false; }; "yPosition": { "alias": "yPosition"; "required": false; }; "overlapTrigger": { "alias": "overlapTrigger"; "required": false; }; "hasBackdrop": { "alias": "hasBackdrop"; "required": false; }; "panelClass": { "alias": "class"; "required": false; }; "classList": { "alias": "classList"; "required": false; }; }, { "closed": "closed"; "close": "close"; }, ["lazyContent", "_allItems", "items"], ["*"], true, never>;
  296. static ngAcceptInputType_overlapTrigger: unknown;
  297. static ngAcceptInputType_hasBackdrop: any;
  298. }
  299. /** Injection token that determines the scroll handling while the menu is open. */
  300. declare const MAT_MENU_SCROLL_STRATEGY: InjectionToken<() => ScrollStrategy>;
  301. /**
  302. * @docs-private
  303. * @deprecated No longer used, will be removed.
  304. * @breaking-change 21.0.0
  305. */
  306. declare function MAT_MENU_SCROLL_STRATEGY_FACTORY(overlay: Overlay): () => ScrollStrategy;
  307. /**
  308. * @docs-private
  309. * @deprecated No longer used, will be removed.
  310. * @breaking-change 21.0.0
  311. */
  312. declare const MAT_MENU_SCROLL_STRATEGY_FACTORY_PROVIDER: {
  313. provide: InjectionToken<() => ScrollStrategy>;
  314. deps: (typeof Overlay)[];
  315. useFactory: typeof MAT_MENU_SCROLL_STRATEGY_FACTORY;
  316. };
  317. /**
  318. * Default top padding of the menu panel.
  319. * @deprecated No longer being used. Will be removed.
  320. * @breaking-change 15.0.0
  321. */
  322. declare const MENU_PANEL_TOP_PADDING = 8;
  323. /** Directive applied to an element that should trigger a `mat-menu`. */
  324. declare class MatMenuTrigger implements AfterContentInit, OnDestroy {
  325. private _overlay;
  326. private _element;
  327. private _viewContainerRef;
  328. private _menuItemInstance;
  329. private _dir;
  330. private _focusMonitor;
  331. private _ngZone;
  332. private _scrollStrategy;
  333. private _changeDetectorRef;
  334. private _cleanupTouchstart;
  335. private _portal;
  336. private _overlayRef;
  337. private _menuOpen;
  338. private _closingActionsSubscription;
  339. private _hoverSubscription;
  340. private _menuCloseSubscription;
  341. private _pendingRemoval;
  342. /**
  343. * We're specifically looking for a `MatMenu` here since the generic `MatMenuPanel`
  344. * interface lacks some functionality around nested menus and animations.
  345. */
  346. private _parentMaterialMenu;
  347. /**
  348. * Cached value of the padding of the parent menu panel.
  349. * Used to offset sub-menus to compensate for the padding.
  350. */
  351. private _parentInnerPadding;
  352. _openedBy: Exclude<FocusOrigin, 'program' | null> | undefined;
  353. /**
  354. * @deprecated
  355. * @breaking-change 8.0.0
  356. */
  357. get _deprecatedMatMenuTriggerFor(): MatMenuPanel | null;
  358. set _deprecatedMatMenuTriggerFor(v: MatMenuPanel | null);
  359. /** References the menu instance that the trigger is associated with. */
  360. get menu(): MatMenuPanel | null;
  361. set menu(menu: MatMenuPanel | null);
  362. private _menu;
  363. /** Data to be passed along to any lazily-rendered content. */
  364. menuData: any;
  365. /**
  366. * Whether focus should be restored when the menu is closed.
  367. * Note that disabling this option can have accessibility implications
  368. * and it's up to you to manage focus, if you decide to turn it off.
  369. */
  370. restoreFocus: boolean;
  371. /** Event emitted when the associated menu is opened. */
  372. readonly menuOpened: EventEmitter<void>;
  373. /**
  374. * Event emitted when the associated menu is opened.
  375. * @deprecated Switch to `menuOpened` instead
  376. * @breaking-change 8.0.0
  377. */
  378. readonly onMenuOpen: EventEmitter<void>;
  379. /** Event emitted when the associated menu is closed. */
  380. readonly menuClosed: EventEmitter<void>;
  381. /**
  382. * Event emitted when the associated menu is closed.
  383. * @deprecated Switch to `menuClosed` instead
  384. * @breaking-change 8.0.0
  385. */
  386. readonly onMenuClose: EventEmitter<void>;
  387. constructor(...args: unknown[]);
  388. ngAfterContentInit(): void;
  389. ngOnDestroy(): void;
  390. /** Whether the menu is open. */
  391. get menuOpen(): boolean;
  392. /** The text direction of the containing app. */
  393. get dir(): Direction;
  394. /** Whether the menu triggers a sub-menu or a top-level one. */
  395. triggersSubmenu(): boolean;
  396. /** Toggles the menu between the open and closed states. */
  397. toggleMenu(): void;
  398. /** Opens the menu. */
  399. openMenu(): void;
  400. /** Closes the menu. */
  401. closeMenu(): void;
  402. /**
  403. * Focuses the menu trigger.
  404. * @param origin Source of the menu trigger's focus.
  405. */
  406. focus(origin?: FocusOrigin, options?: FocusOptions): void;
  407. /**
  408. * Updates the position of the menu to ensure that it fits all options within the viewport.
  409. */
  410. updatePosition(): void;
  411. /** Closes the menu and does the necessary cleanup. */
  412. private _destroyMenu;
  413. private _setIsMenuOpen;
  414. /**
  415. * This method creates the overlay from the provided menu's template and saves its
  416. * OverlayRef so that it can be attached to the DOM when openMenu is called.
  417. */
  418. private _createOverlay;
  419. /**
  420. * This method builds the configuration object needed to create the overlay, the OverlayState.
  421. * @returns OverlayConfig
  422. */
  423. private _getOverlayConfig;
  424. /**
  425. * Listens to changes in the position of the overlay and sets the correct classes
  426. * on the menu based on the new position. This ensures the animation origin is always
  427. * correct, even if a fallback position is used for the overlay.
  428. */
  429. private _subscribeToPositions;
  430. /**
  431. * Sets the appropriate positions on a position strategy
  432. * so the overlay connects with the trigger correctly.
  433. * @param positionStrategy Strategy whose position to update.
  434. */
  435. private _setPosition;
  436. /** Returns a stream that emits whenever an action that should close the menu occurs. */
  437. private _menuClosingActions;
  438. /** Handles mouse presses on the trigger. */
  439. _handleMousedown(event: MouseEvent): void;
  440. /** Handles key presses on the trigger. */
  441. _handleKeydown(event: KeyboardEvent): void;
  442. /** Handles click events on the trigger. */
  443. _handleClick(event: MouseEvent): void;
  444. /** Handles the cases where the user hovers over the trigger. */
  445. private _handleHover;
  446. /** Gets the portal that should be attached to the overlay. */
  447. private _getPortal;
  448. /**
  449. * Determines whether the trigger owns a specific menu panel, at the current point in time.
  450. * This allows us to distinguish the case where the same panel is passed into multiple triggers
  451. * and multiple are open at a time.
  452. */
  453. private _ownsMenu;
  454. static ɵfac: i0.ɵɵFactoryDeclaration<MatMenuTrigger, never>;
  455. static ɵdir: i0.ɵɵDirectiveDeclaration<MatMenuTrigger, "[mat-menu-trigger-for], [matMenuTriggerFor]", ["matMenuTrigger"], { "_deprecatedMatMenuTriggerFor": { "alias": "mat-menu-trigger-for"; "required": false; }; "menu": { "alias": "matMenuTriggerFor"; "required": false; }; "menuData": { "alias": "matMenuTriggerData"; "required": false; }; "restoreFocus": { "alias": "matMenuTriggerRestoreFocus"; "required": false; }; }, { "menuOpened": "menuOpened"; "onMenuOpen": "onMenuOpen"; "menuClosed": "menuClosed"; "onMenuClose": "onMenuClose"; }, never, never, true, never>;
  456. }
  457. declare class MatMenuModule {
  458. static ɵfac: i0.ɵɵFactoryDeclaration<MatMenuModule, never>;
  459. static ɵmod: i0.ɵɵNgModuleDeclaration<MatMenuModule, never, [typeof MatRippleModule, typeof MatCommonModule, typeof i2.OverlayModule, typeof MatMenu, typeof MatMenuItem, typeof MatMenuContent, typeof MatMenuTrigger], [typeof i5.CdkScrollableModule, typeof MatMenu, typeof MatCommonModule, typeof MatMenuItem, typeof MatMenuContent, typeof MatMenuTrigger]>;
  460. static ɵinj: i0.ɵɵInjectorDeclaration<MatMenuModule>;
  461. }
  462. /**
  463. * Animations used by the mat-menu component.
  464. * Animation duration and timing values are based on:
  465. * https://material.io/guidelines/components/menus.html#menus-usage
  466. * @docs-private
  467. * @deprecated No longer used, will be removed.
  468. * @breaking-change 21.0.0
  469. */
  470. declare const matMenuAnimations: {
  471. readonly transformMenu: any;
  472. readonly fadeInItems: any;
  473. };
  474. /**
  475. * @deprecated
  476. * @breaking-change 8.0.0
  477. * @docs-private
  478. */
  479. declare const fadeInItems: any;
  480. /**
  481. * @deprecated
  482. * @breaking-change 8.0.0
  483. * @docs-private
  484. */
  485. declare const transformMenu: any;
  486. export { MAT_MENU_CONTENT, MAT_MENU_DEFAULT_OPTIONS, MAT_MENU_PANEL, MAT_MENU_SCROLL_STRATEGY, MAT_MENU_SCROLL_STRATEGY_FACTORY_PROVIDER, MENU_PANEL_TOP_PADDING, MatMenu, MatMenuContent, MatMenuItem, MatMenuModule, MatMenuTrigger, fadeInItems, matMenuAnimations, transformMenu };
  487. export type { MatMenuDefaultOptions, MatMenuPanel, MenuCloseReason, MenuPositionX, MenuPositionY };