@angular/material 19.0.0-next.3 → 19.0.0-next.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (210) hide show
  1. package/autocomplete/index.d.ts +5 -15
  2. package/badge/index.d.ts +3 -7
  3. package/bottom-sheet/index.d.ts +5 -15
  4. package/button/index.d.ts +20 -24
  5. package/button-toggle/index.d.ts +5 -8
  6. package/card/index.d.ts +2 -2
  7. package/checkbox/index.d.ts +16 -7
  8. package/chips/index.d.ts +13 -24
  9. package/core/_core-theme.scss +0 -22
  10. package/core/index.d.ts +30 -34
  11. package/core/tokens/m3/mat/_badge.scss +3 -3
  12. package/datepicker/index.d.ts +44 -70
  13. package/dialog/index.d.ts +10 -34
  14. package/dialog/testing/index.d.ts +1 -1
  15. package/expansion/index.d.ts +9 -13
  16. package/fesm2022/autocomplete/testing.mjs.map +1 -1
  17. package/fesm2022/autocomplete.mjs +42 -72
  18. package/fesm2022/autocomplete.mjs.map +1 -1
  19. package/fesm2022/badge/testing.mjs.map +1 -1
  20. package/fesm2022/badge.mjs +22 -29
  21. package/fesm2022/badge.mjs.map +1 -1
  22. package/fesm2022/bottom-sheet/testing.mjs.map +1 -1
  23. package/fesm2022/bottom-sheet.mjs +25 -40
  24. package/fesm2022/bottom-sheet.mjs.map +1 -1
  25. package/fesm2022/button/testing.mjs.map +1 -1
  26. package/fesm2022/button-toggle/testing.mjs.map +1 -1
  27. package/fesm2022/button-toggle.mjs +26 -42
  28. package/fesm2022/button-toggle.mjs.map +1 -1
  29. package/fesm2022/button.mjs +68 -137
  30. package/fesm2022/button.mjs.map +1 -1
  31. package/fesm2022/card/testing.mjs.map +1 -1
  32. package/fesm2022/card.mjs +50 -54
  33. package/fesm2022/card.mjs.map +1 -1
  34. package/fesm2022/checkbox/testing.mjs.map +1 -1
  35. package/fesm2022/checkbox.mjs +38 -39
  36. package/fesm2022/checkbox.mjs.map +1 -1
  37. package/fesm2022/chips/testing.mjs.map +1 -1
  38. package/fesm2022/chips.mjs +93 -144
  39. package/fesm2022/chips.mjs.map +1 -1
  40. package/fesm2022/core/testing.mjs.map +1 -1
  41. package/fesm2022/core.mjs +102 -215
  42. package/fesm2022/core.mjs.map +1 -1
  43. package/fesm2022/datepicker/testing.mjs.map +1 -1
  44. package/fesm2022/datepicker.mjs +192 -328
  45. package/fesm2022/datepicker.mjs.map +1 -1
  46. package/fesm2022/dialog/testing.mjs +3 -3
  47. package/fesm2022/dialog/testing.mjs.map +1 -1
  48. package/fesm2022/dialog.mjs +47 -105
  49. package/fesm2022/dialog.mjs.map +1 -1
  50. package/fesm2022/divider/testing.mjs.map +1 -1
  51. package/fesm2022/divider.mjs +7 -7
  52. package/fesm2022/divider.mjs.map +1 -1
  53. package/fesm2022/expansion/testing.mjs.map +1 -1
  54. package/fesm2022/expansion.mjs +54 -89
  55. package/fesm2022/expansion.mjs.map +1 -1
  56. package/fesm2022/form-field/testing/control.mjs.map +1 -1
  57. package/fesm2022/form-field/testing.mjs.map +1 -1
  58. package/fesm2022/form-field.mjs +89 -93
  59. package/fesm2022/form-field.mjs.map +1 -1
  60. package/fesm2022/grid-list/testing.mjs.map +1 -1
  61. package/fesm2022/grid-list.mjs +35 -42
  62. package/fesm2022/grid-list.mjs.map +1 -1
  63. package/fesm2022/icon/testing.mjs +7 -7
  64. package/fesm2022/icon/testing.mjs.map +1 -1
  65. package/fesm2022/icon.mjs +20 -29
  66. package/fesm2022/icon.mjs.map +1 -1
  67. package/fesm2022/input/testing.mjs.map +1 -1
  68. package/fesm2022/input.mjs +29 -53
  69. package/fesm2022/input.mjs.map +1 -1
  70. package/fesm2022/list/testing.mjs.map +1 -1
  71. package/fesm2022/list.mjs +106 -145
  72. package/fesm2022/list.mjs.map +1 -1
  73. package/fesm2022/material.mjs.map +1 -1
  74. package/fesm2022/menu/testing.mjs.map +1 -1
  75. package/fesm2022/menu.mjs +63 -111
  76. package/fesm2022/menu.mjs.map +1 -1
  77. package/fesm2022/paginator/testing.mjs.map +1 -1
  78. package/fesm2022/paginator.mjs +10 -10
  79. package/fesm2022/paginator.mjs.map +1 -1
  80. package/fesm2022/progress-bar/testing.mjs.map +1 -1
  81. package/fesm2022/progress-bar.mjs +18 -25
  82. package/fesm2022/progress-bar.mjs.map +1 -1
  83. package/fesm2022/progress-spinner/testing.mjs.map +1 -1
  84. package/fesm2022/progress-spinner.mjs +14 -20
  85. package/fesm2022/progress-spinner.mjs.map +1 -1
  86. package/fesm2022/radio/testing.mjs.map +1 -1
  87. package/fesm2022/radio.mjs +29 -42
  88. package/fesm2022/radio.mjs.map +1 -1
  89. package/fesm2022/select/testing.mjs.map +1 -1
  90. package/fesm2022/select.mjs +34 -66
  91. package/fesm2022/select.mjs.map +1 -1
  92. package/fesm2022/sidenav/testing.mjs.map +1 -1
  93. package/fesm2022/sidenav.mjs +67 -87
  94. package/fesm2022/sidenav.mjs.map +1 -1
  95. package/fesm2022/slide-toggle/testing.mjs.map +1 -1
  96. package/fesm2022/slide-toggle.mjs +26 -34
  97. package/fesm2022/slide-toggle.mjs.map +1 -1
  98. package/fesm2022/slider/testing.mjs.map +1 -1
  99. package/fesm2022/slider.mjs +61 -69
  100. package/fesm2022/slider.mjs.map +1 -1
  101. package/fesm2022/snack-bar/testing.mjs.map +1 -1
  102. package/fesm2022/snack-bar.mjs +49 -62
  103. package/fesm2022/snack-bar.mjs.map +1 -1
  104. package/fesm2022/sort/testing.mjs.map +1 -1
  105. package/fesm2022/sort.mjs +30 -49
  106. package/fesm2022/sort.mjs.map +1 -1
  107. package/fesm2022/stepper/testing.mjs.map +1 -1
  108. package/fesm2022/stepper.mjs +56 -68
  109. package/fesm2022/stepper.mjs.map +1 -1
  110. package/fesm2022/table/testing.mjs.map +1 -1
  111. package/fesm2022/table.mjs +55 -55
  112. package/fesm2022/table.mjs.map +1 -1
  113. package/fesm2022/tabs/testing.mjs.map +1 -1
  114. package/fesm2022/tabs.mjs +119 -174
  115. package/fesm2022/tabs.mjs.map +1 -1
  116. package/fesm2022/toolbar/testing.mjs.map +1 -1
  117. package/fesm2022/toolbar.mjs +17 -21
  118. package/fesm2022/toolbar.mjs.map +1 -1
  119. package/fesm2022/tooltip/testing.mjs.map +1 -1
  120. package/fesm2022/tooltip.mjs +53 -67
  121. package/fesm2022/tooltip.mjs.map +1 -1
  122. package/fesm2022/tree/testing.mjs.map +1 -1
  123. package/fesm2022/tree.mjs +35 -62
  124. package/fesm2022/tree.mjs.map +1 -1
  125. package/form-field/_mdc-text-field-structure.scss +49 -47
  126. package/form-field/index.d.ts +12 -24
  127. package/grid-list/index.d.ts +6 -8
  128. package/icon/index.d.ts +2 -2
  129. package/input/index.d.ts +3 -7
  130. package/list/_list-inherited-structure.scss +1 -13
  131. package/list/index.d.ts +10 -14
  132. package/menu/index.d.ts +15 -49
  133. package/package.json +2 -2
  134. package/prebuilt-themes/azure-blue.css +1 -1
  135. package/prebuilt-themes/cyan-orange.css +1 -1
  136. package/prebuilt-themes/deeppurple-amber.css +1 -1
  137. package/prebuilt-themes/indigo-pink.css +1 -1
  138. package/prebuilt-themes/magenta-violet.css +1 -1
  139. package/prebuilt-themes/pink-bluegrey.css +1 -1
  140. package/prebuilt-themes/purple-green.css +1 -1
  141. package/prebuilt-themes/rose-red.css +1 -1
  142. package/progress-bar/index.d.ts +3 -5
  143. package/progress-spinner/index.d.ts +2 -2
  144. package/radio/index.d.ts +5 -8
  145. package/schematics/ng-add/fonts/material-fonts.d.ts +1 -1
  146. package/schematics/ng-add/fonts/material-fonts.js +2 -2
  147. package/schematics/ng-add/fonts/material-fonts.mjs +2 -2
  148. package/schematics/ng-add/index.d.ts +1 -1
  149. package/schematics/ng-add/index.js +3 -3
  150. package/schematics/ng-add/index.mjs +3 -3
  151. package/schematics/ng-add/package-config.d.ts +1 -1
  152. package/schematics/ng-add/package-config.js +2 -2
  153. package/schematics/ng-add/package-config.mjs +2 -2
  154. package/schematics/ng-add/schema.d.ts +1 -1
  155. package/schematics/ng-add/schema.js +2 -2
  156. package/schematics/ng-add/schema.mjs +2 -2
  157. package/schematics/ng-add/setup-project.d.ts +1 -1
  158. package/schematics/ng-add/setup-project.js +3 -3
  159. package/schematics/ng-add/setup-project.mjs +3 -3
  160. package/schematics/ng-add/theming/create-custom-theme.d.ts +1 -1
  161. package/schematics/ng-add/theming/create-custom-theme.js +2 -2
  162. package/schematics/ng-add/theming/create-custom-theme.mjs +2 -2
  163. package/schematics/ng-add/theming/theming.d.ts +1 -1
  164. package/schematics/ng-add/theming/theming.js +2 -2
  165. package/schematics/ng-add/theming/theming.mjs +2 -2
  166. package/schematics/ng-generate/address-form/index.d.ts +1 -1
  167. package/schematics/ng-generate/address-form/index.js +2 -2
  168. package/schematics/ng-generate/address-form/index.mjs +2 -2
  169. package/schematics/ng-generate/address-form/schema.d.ts +1 -1
  170. package/schematics/ng-generate/address-form/schema.js +2 -2
  171. package/schematics/ng-generate/address-form/schema.mjs +2 -2
  172. package/schematics/ng-generate/dashboard/index.d.ts +1 -1
  173. package/schematics/ng-generate/dashboard/index.js +2 -2
  174. package/schematics/ng-generate/dashboard/index.mjs +2 -2
  175. package/schematics/ng-generate/dashboard/schema.d.ts +1 -1
  176. package/schematics/ng-generate/dashboard/schema.js +2 -2
  177. package/schematics/ng-generate/dashboard/schema.mjs +2 -2
  178. package/schematics/ng-generate/m3-theme/index_bundled.js +1 -1
  179. package/schematics/ng-generate/m3-theme/index_bundled.js.map +1 -1
  180. package/schematics/ng-generate/navigation/index.d.ts +1 -1
  181. package/schematics/ng-generate/navigation/index.js +2 -2
  182. package/schematics/ng-generate/navigation/index.mjs +2 -2
  183. package/schematics/ng-generate/navigation/schema.d.ts +1 -1
  184. package/schematics/ng-generate/navigation/schema.js +2 -2
  185. package/schematics/ng-generate/navigation/schema.mjs +2 -2
  186. package/schematics/ng-generate/table/index.d.ts +1 -1
  187. package/schematics/ng-generate/table/index.js +2 -2
  188. package/schematics/ng-generate/table/index.mjs +2 -2
  189. package/schematics/ng-generate/table/schema.d.ts +1 -1
  190. package/schematics/ng-generate/table/schema.js +2 -2
  191. package/schematics/ng-generate/table/schema.mjs +2 -2
  192. package/schematics/ng-generate/tree/index.d.ts +1 -1
  193. package/schematics/ng-generate/tree/index.js +2 -2
  194. package/schematics/ng-generate/tree/index.mjs +2 -2
  195. package/schematics/ng-generate/tree/schema.d.ts +1 -1
  196. package/schematics/ng-generate/tree/schema.js +2 -2
  197. package/schematics/ng-generate/tree/schema.mjs +2 -2
  198. package/schematics/ng-update/index_bundled.js +1 -1
  199. package/schematics/ng-update/index_bundled.js.map +1 -1
  200. package/select/index.d.ts +4 -14
  201. package/sidenav/index.d.ts +7 -17
  202. package/slide-toggle/index.d.ts +2 -2
  203. package/slider/index.d.ts +8 -8
  204. package/snack-bar/index.d.ts +6 -22
  205. package/sort/index.d.ts +4 -20
  206. package/stepper/index.d.ts +6 -13
  207. package/tabs/index.d.ts +21 -32
  208. package/toolbar/index.d.ts +3 -4
  209. package/tooltip/index.d.ts +5 -12
  210. package/tree/index.d.ts +5 -18
package/fesm2022/menu.mjs CHANGED
@@ -1,7 +1,6 @@
1
1
  import * as i0 from '@angular/core';
2
- import { InjectionToken, booleanAttribute, Component, ChangeDetectionStrategy, ViewEncapsulation, Inject, Optional, Input, Directive, QueryList, EventEmitter, inject, Injector, afterNextRender, TemplateRef, ContentChildren, ViewChild, ContentChild, Output, ChangeDetectorRef, Self, NgModule } from '@angular/core';
3
- import * as i1 from '@angular/cdk/a11y';
4
- import { FocusKeyManager, isFakeTouchstartFromScreenReader, isFakeMousedownFromScreenReader } from '@angular/cdk/a11y';
2
+ import { InjectionToken, inject, ElementRef, ChangeDetectorRef, booleanAttribute, Component, ChangeDetectionStrategy, ViewEncapsulation, Input, TemplateRef, ComponentFactoryResolver, ApplicationRef, Injector, ViewContainerRef, Directive, QueryList, EventEmitter, afterNextRender, ContentChildren, ViewChild, ContentChild, Output, NgZone, NgModule } from '@angular/core';
3
+ import { FocusMonitor, FocusKeyManager, isFakeTouchstartFromScreenReader, isFakeMousedownFromScreenReader } from '@angular/cdk/a11y';
5
4
  import { UP_ARROW, DOWN_ARROW, RIGHT_ARROW, LEFT_ARROW, ESCAPE, hasModifierKey, ENTER, SPACE } from '@angular/cdk/keycodes';
6
5
  import { Subject, merge, Subscription, of, asapScheduler } from 'rxjs';
7
6
  import { startWith, switchMap, takeUntil, filter, take, delay } from 'rxjs/operators';
@@ -9,8 +8,7 @@ import { DOCUMENT, CommonModule } from '@angular/common';
9
8
  import { MatRipple, MatRippleModule, MatCommonModule } from '@angular/material/core';
10
9
  import { TemplatePortal, DomPortalOutlet } from '@angular/cdk/portal';
11
10
  import { trigger, state, style, transition, animate } from '@angular/animations';
12
- import * as i3 from '@angular/cdk/bidi';
13
- import * as i1$1 from '@angular/cdk/overlay';
11
+ import { Directionality } from '@angular/cdk/bidi';
14
12
  import { Overlay, OverlayConfig, OverlayModule } from '@angular/cdk/overlay';
15
13
  import { normalizePassiveListenerOptions } from '@angular/cdk/platform';
16
14
  import { CdkScrollableModule } from '@angular/cdk/scrolling';
@@ -25,12 +23,12 @@ const MAT_MENU_PANEL = new InjectionToken('MAT_MENU_PANEL');
25
23
  * Single item inside a `mat-menu`. Provides the menu item styling and accessibility treatment.
26
24
  */
27
25
  class MatMenuItem {
28
- constructor(_elementRef, _document, _focusMonitor, _parentMenu, _changeDetectorRef) {
29
- this._elementRef = _elementRef;
30
- this._document = _document;
31
- this._focusMonitor = _focusMonitor;
32
- this._parentMenu = _parentMenu;
33
- this._changeDetectorRef = _changeDetectorRef;
26
+ constructor() {
27
+ this._elementRef = inject(ElementRef);
28
+ this._document = inject(DOCUMENT);
29
+ this._focusMonitor = inject(FocusMonitor);
30
+ this._parentMenu = inject(MAT_MENU_PANEL, { optional: true });
31
+ this._changeDetectorRef = inject(ChangeDetectorRef);
34
32
  /** ARIA role for the menu item. */
35
33
  this.role = 'menuitem';
36
34
  /** Whether the menu item is disabled. */
@@ -45,7 +43,7 @@ class MatMenuItem {
45
43
  this._highlighted = false;
46
44
  /** Whether the menu item acts as a trigger for a sub-menu. */
47
45
  this._triggersSubmenu = false;
48
- _parentMenu?.addItem?.(this);
46
+ this._parentMenu?.addItem?.(this);
49
47
  }
50
48
  /** Focuses the menu item. */
51
49
  focus(origin, options) {
@@ -108,22 +106,20 @@ class MatMenuItem {
108
106
  // We need to mark this for check for the case where the content is coming from a
109
107
  // `matMenuContent` whose change detection tree is at the declaration position,
110
108
  // not the insertion position. See #23175.
111
- // @breaking-change 12.0.0 Remove null check for `_changeDetectorRef`.
112
109
  this._highlighted = isHighlighted;
113
- this._changeDetectorRef?.markForCheck();
110
+ this._changeDetectorRef.markForCheck();
114
111
  }
115
112
  _setTriggersSubmenu(triggersSubmenu) {
116
- // @breaking-change 12.0.0 Remove null check for `_changeDetectorRef`.
117
113
  this._triggersSubmenu = triggersSubmenu;
118
- this._changeDetectorRef?.markForCheck();
114
+ this._changeDetectorRef.markForCheck();
119
115
  }
120
116
  _hasFocus() {
121
117
  return this._document && this._document.activeElement === this._getHostElement();
122
118
  }
123
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0-next.2", ngImport: i0, type: MatMenuItem, deps: [{ token: i0.ElementRef }, { token: DOCUMENT }, { token: i1.FocusMonitor }, { token: MAT_MENU_PANEL, optional: true }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
124
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.0-next.2", type: MatMenuItem, isStandalone: true, selector: "[mat-menu-item]", inputs: { role: "role", disabled: ["disabled", "disabled", booleanAttribute], disableRipple: ["disableRipple", "disableRipple", booleanAttribute] }, host: { listeners: { "click": "_checkDisabled($event)", "mouseenter": "_handleMouseEnter()" }, properties: { "attr.role": "role", "class.mat-mdc-menu-item-highlighted": "_highlighted", "class.mat-mdc-menu-item-submenu-trigger": "_triggersSubmenu", "attr.tabindex": "_getTabIndex()", "attr.aria-disabled": "disabled", "attr.disabled": "disabled || null" }, classAttribute: "mat-mdc-menu-item mat-focus-indicator" }, exportAs: ["matMenuItem"], ngImport: i0, template: "<ng-content select=\"mat-icon, [matMenuItemIcon]\"></ng-content>\n<span class=\"mat-mdc-menu-item-text\"><ng-content></ng-content></span>\n<div class=\"mat-mdc-menu-ripple\" matRipple\n [matRippleDisabled]=\"disableRipple || disabled\"\n [matRippleTrigger]=\"_getHostElement()\">\n</div>\n\n@if (_triggersSubmenu) {\n <svg\n class=\"mat-mdc-menu-submenu-icon\"\n viewBox=\"0 0 5 10\"\n focusable=\"false\"\n aria-hidden=\"true\"><polygon points=\"0,0 5,5 0,10\"/></svg>\n}\n", dependencies: [{ kind: "directive", type: MatRipple, selector: "[mat-ripple], [matRipple]", inputs: ["matRippleColor", "matRippleUnbounded", "matRippleCentered", "matRippleRadius", "matRippleAnimation", "matRippleDisabled", "matRippleTrigger"], exportAs: ["matRipple"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
119
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0-next.3", ngImport: i0, type: MatMenuItem, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
120
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.0-next.3", type: MatMenuItem, isStandalone: true, selector: "[mat-menu-item]", inputs: { role: "role", disabled: ["disabled", "disabled", booleanAttribute], disableRipple: ["disableRipple", "disableRipple", booleanAttribute] }, host: { listeners: { "click": "_checkDisabled($event)", "mouseenter": "_handleMouseEnter()" }, properties: { "attr.role": "role", "class.mat-mdc-menu-item-highlighted": "_highlighted", "class.mat-mdc-menu-item-submenu-trigger": "_triggersSubmenu", "attr.tabindex": "_getTabIndex()", "attr.aria-disabled": "disabled", "attr.disabled": "disabled || null" }, classAttribute: "mat-mdc-menu-item mat-focus-indicator" }, exportAs: ["matMenuItem"], ngImport: i0, template: "<ng-content select=\"mat-icon, [matMenuItemIcon]\"></ng-content>\n<span class=\"mat-mdc-menu-item-text\"><ng-content></ng-content></span>\n<div class=\"mat-mdc-menu-ripple\" matRipple\n [matRippleDisabled]=\"disableRipple || disabled\"\n [matRippleTrigger]=\"_getHostElement()\">\n</div>\n\n@if (_triggersSubmenu) {\n <svg\n class=\"mat-mdc-menu-submenu-icon\"\n viewBox=\"0 0 5 10\"\n focusable=\"false\"\n aria-hidden=\"true\"><polygon points=\"0,0 5,5 0,10\"/></svg>\n}\n", dependencies: [{ kind: "directive", type: MatRipple, selector: "[mat-ripple], [matRipple]", inputs: ["matRippleColor", "matRippleUnbounded", "matRippleCentered", "matRippleRadius", "matRippleAnimation", "matRippleDisabled", "matRippleTrigger"], exportAs: ["matRipple"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
125
121
  }
126
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0-next.2", ngImport: i0, type: MatMenuItem, decorators: [{
122
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0-next.3", ngImport: i0, type: MatMenuItem, decorators: [{
127
123
  type: Component,
128
124
  args: [{ selector: '[mat-menu-item]', exportAs: 'matMenuItem', host: {
129
125
  '[attr.role]': 'role',
@@ -136,15 +132,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0-next.2",
136
132
  '(click)': '_checkDisabled($event)',
137
133
  '(mouseenter)': '_handleMouseEnter()',
138
134
  }, changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, standalone: true, imports: [MatRipple], template: "<ng-content select=\"mat-icon, [matMenuItemIcon]\"></ng-content>\n<span class=\"mat-mdc-menu-item-text\"><ng-content></ng-content></span>\n<div class=\"mat-mdc-menu-ripple\" matRipple\n [matRippleDisabled]=\"disableRipple || disabled\"\n [matRippleTrigger]=\"_getHostElement()\">\n</div>\n\n@if (_triggersSubmenu) {\n <svg\n class=\"mat-mdc-menu-submenu-icon\"\n viewBox=\"0 0 5 10\"\n focusable=\"false\"\n aria-hidden=\"true\"><polygon points=\"0,0 5,5 0,10\"/></svg>\n}\n" }]
139
- }], ctorParameters: () => [{ type: i0.ElementRef }, { type: undefined, decorators: [{
140
- type: Inject,
141
- args: [DOCUMENT]
142
- }] }, { type: i1.FocusMonitor }, { type: undefined, decorators: [{
143
- type: Inject,
144
- args: [MAT_MENU_PANEL]
145
- }, {
146
- type: Optional
147
- }] }, { type: i0.ChangeDetectorRef }], propDecorators: { role: [{
135
+ }], ctorParameters: () => [], propDecorators: { role: [{
148
136
  type: Input
149
137
  }], disabled: [{
150
138
  type: Input,
@@ -190,14 +178,14 @@ function throwMatMenuRecursiveError() {
190
178
  const MAT_MENU_CONTENT = new InjectionToken('MatMenuContent');
191
179
  /** Menu content that will be rendered lazily once the menu is opened. */
192
180
  class MatMenuContent {
193
- constructor(_template, _componentFactoryResolver, _appRef, _injector, _viewContainerRef, _document, _changeDetectorRef) {
194
- this._template = _template;
195
- this._componentFactoryResolver = _componentFactoryResolver;
196
- this._appRef = _appRef;
197
- this._injector = _injector;
198
- this._viewContainerRef = _viewContainerRef;
199
- this._document = _document;
200
- this._changeDetectorRef = _changeDetectorRef;
181
+ constructor() {
182
+ this._template = inject(TemplateRef);
183
+ this._componentFactoryResolver = inject(ComponentFactoryResolver);
184
+ this._appRef = inject(ApplicationRef);
185
+ this._injector = inject(Injector);
186
+ this._viewContainerRef = inject(ViewContainerRef);
187
+ this._document = inject(DOCUMENT);
188
+ this._changeDetectorRef = inject(ChangeDetectorRef);
201
189
  /** Emits when the menu content has been attached. */
202
190
  this._attached = new Subject();
203
191
  }
@@ -223,8 +211,7 @@ class MatMenuContent {
223
211
  // by Angular. This causes the `@ContentChildren` for menu items within the menu to
224
212
  // not be updated by Angular. By explicitly marking for check here, we tell Angular that
225
213
  // it needs to check for new menu items and update the `@ContentChild` in `MatMenu`.
226
- // @breaking-change 9.0.0 Make change detector ref required
227
- this._changeDetectorRef?.markForCheck();
214
+ this._changeDetectorRef.markForCheck();
228
215
  this._portal.attach(this._outlet, context);
229
216
  this._attached.next();
230
217
  }
@@ -242,20 +229,17 @@ class MatMenuContent {
242
229
  this._outlet.dispose();
243
230
  }
244
231
  }
245
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0-next.2", ngImport: i0, type: MatMenuContent, deps: [{ token: i0.TemplateRef }, { token: i0.ComponentFactoryResolver }, { token: i0.ApplicationRef }, { token: i0.Injector }, { token: i0.ViewContainerRef }, { token: DOCUMENT }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Directive }); }
246
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.0.0-next.2", type: MatMenuContent, isStandalone: true, selector: "ng-template[matMenuContent]", providers: [{ provide: MAT_MENU_CONTENT, useExisting: MatMenuContent }], ngImport: i0 }); }
232
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0-next.3", ngImport: i0, type: MatMenuContent, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
233
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.0.0-next.3", type: MatMenuContent, isStandalone: true, selector: "ng-template[matMenuContent]", providers: [{ provide: MAT_MENU_CONTENT, useExisting: MatMenuContent }], ngImport: i0 }); }
247
234
  }
248
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0-next.2", ngImport: i0, type: MatMenuContent, decorators: [{
235
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0-next.3", ngImport: i0, type: MatMenuContent, decorators: [{
249
236
  type: Directive,
250
237
  args: [{
251
238
  selector: 'ng-template[matMenuContent]',
252
239
  providers: [{ provide: MAT_MENU_CONTENT, useExisting: MatMenuContent }],
253
240
  standalone: true,
254
241
  }]
255
- }], ctorParameters: () => [{ type: i0.TemplateRef }, { type: i0.ComponentFactoryResolver }, { type: i0.ApplicationRef }, { type: i0.Injector }, { type: i0.ViewContainerRef }, { type: undefined, decorators: [{
256
- type: Inject,
257
- args: [DOCUMENT]
258
- }] }, { type: i0.ChangeDetectorRef }] });
242
+ }], ctorParameters: () => [] });
259
243
 
260
244
  /**
261
245
  * Animations used by the mat-menu component.
@@ -386,16 +370,9 @@ class MatMenu {
386
370
  set classList(classes) {
387
371
  this.panelClass = classes;
388
372
  }
389
- constructor(_elementRef,
390
- /**
391
- * @deprecated Unused param, will be removed.
392
- * @breaking-change 19.0.0
393
- */
394
- _unusedNgZone, defaultOptions,
395
- // @breaking-change 15.0.0 `_changeDetectorRef` to become a required parameter.
396
- _changeDetectorRef) {
397
- this._elementRef = _elementRef;
398
- this._changeDetectorRef = _changeDetectorRef;
373
+ constructor() {
374
+ this._elementRef = inject(ElementRef);
375
+ this._changeDetectorRef = inject(ChangeDetectorRef);
399
376
  this._elevationPrefix = 'mat-elevation-z';
400
377
  this._baseElevation = null;
401
378
  /** Only the direct descendant menu items. */
@@ -416,6 +393,7 @@ class MatMenu {
416
393
  this.close = this.closed;
417
394
  this.panelId = `mat-menu-panel-${menuPanelUid++}`;
418
395
  this._injector = inject(Injector);
396
+ const defaultOptions = inject(MAT_MENU_DEFAULT_OPTIONS);
419
397
  this.overlayPanelClass = defaultOptions.overlayPanelClass || '';
420
398
  this._xPosition = defaultOptions.xPosition;
421
399
  this._yPosition = defaultOptions.yPosition;
@@ -596,8 +574,7 @@ class MatMenu {
596
574
  ['mat-menu-above']: posY === 'above',
597
575
  ['mat-menu-below']: posY === 'below',
598
576
  };
599
- // @breaking-change 15.0.0 Remove null check for `_changeDetectorRef`.
600
- this._changeDetectorRef?.markForCheck();
577
+ this._changeDetectorRef.markForCheck();
601
578
  }
602
579
  /** Starts the enter animation. */
603
580
  _startAnimation() {
@@ -640,20 +617,17 @@ class MatMenu {
640
617
  this._directDescendantItems.notifyOnChanges();
641
618
  });
642
619
  }
643
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0-next.2", ngImport: i0, type: MatMenu, deps: [{ token: i0.ElementRef }, { token: i0.NgZone }, { token: MAT_MENU_DEFAULT_OPTIONS }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
644
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "16.1.0", version: "19.0.0-next.2", type: MatMenu, isStandalone: true, selector: "mat-menu", inputs: { backdropClass: "backdropClass", ariaLabel: ["aria-label", "ariaLabel"], ariaLabelledby: ["aria-labelledby", "ariaLabelledby"], ariaDescribedby: ["aria-describedby", "ariaDescribedby"], xPosition: "xPosition", yPosition: "yPosition", overlapTrigger: ["overlapTrigger", "overlapTrigger", booleanAttribute], hasBackdrop: ["hasBackdrop", "hasBackdrop", (value) => (value == null ? null : booleanAttribute(value))], panelClass: ["class", "panelClass"], classList: "classList" }, outputs: { closed: "closed", close: "close" }, host: { properties: { "attr.aria-label": "null", "attr.aria-labelledby": "null", "attr.aria-describedby": "null" } }, providers: [{ provide: MAT_MENU_PANEL, useExisting: MatMenu }], queries: [{ propertyName: "lazyContent", first: true, predicate: MAT_MENU_CONTENT, descendants: true }, { propertyName: "_allItems", predicate: MatMenuItem, descendants: true }, { propertyName: "items", predicate: MatMenuItem }], viewQueries: [{ propertyName: "templateRef", first: true, predicate: TemplateRef, descendants: true }], exportAs: ["matMenu"], ngImport: i0, template: "<ng-template>\n <div\n class=\"mat-mdc-menu-panel mat-mdc-elevation-specific\"\n [id]=\"panelId\"\n [class]=\"_classList\"\n (keydown)=\"_handleKeydown($event)\"\n (click)=\"closed.emit('click')\"\n [@transformMenu]=\"_panelAnimationState\"\n (@transformMenu.start)=\"_onAnimationStart($event)\"\n (@transformMenu.done)=\"_onAnimationDone($event)\"\n tabindex=\"-1\"\n role=\"menu\"\n [attr.aria-label]=\"ariaLabel || null\"\n [attr.aria-labelledby]=\"ariaLabelledby || null\"\n [attr.aria-describedby]=\"ariaDescribedby || null\">\n <div class=\"mat-mdc-menu-content\">\n <ng-content></ng-content>\n </div>\n </div>\n</ng-template>\n", styles: ["mat-menu{display:none}.mat-mdc-menu-content{margin:0;padding:8px 0;outline:0}.mat-mdc-menu-content,.mat-mdc-menu-content .mat-mdc-menu-item .mat-mdc-menu-item-text{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;flex:1;white-space:normal;font-family:var(--mat-menu-item-label-text-font, var(--mat-app-label-large-font));line-height:var(--mat-menu-item-label-text-line-height, var(--mat-app-label-large-line-height));font-size:var(--mat-menu-item-label-text-size, var(--mat-app-label-large-size));letter-spacing:var(--mat-menu-item-label-text-tracking, var(--mat-app-label-large-tracking));font-weight:var(--mat-menu-item-label-text-weight, var(--mat-app-label-large-weight))}.mat-mdc-menu-panel{min-width:112px;max-width:280px;overflow:auto;-webkit-overflow-scrolling:touch;box-sizing:border-box;outline:0;border-radius:var(--mat-menu-container-shape, var(--mat-app-corner-extra-small));background-color:var(--mat-menu-container-color, var(--mat-app-surface-container));will-change:transform,opacity}.mat-mdc-menu-panel.ng-animating{pointer-events:none}.mat-mdc-menu-panel.ng-animating:has(.mat-mdc-menu-content:empty){display:none}@media(forced-colors: active){.mat-mdc-menu-panel{outline:solid 1px}}.mat-mdc-menu-panel .mat-divider{color:var(--mat-menu-divider-color, var(--mat-app-surface-variant));margin-bottom:var(--mat-menu-divider-bottom-spacing, 8px);margin-top:var(--mat-menu-divider-top-spacing, 8px)}.mat-mdc-menu-item{display:flex;position:relative;align-items:center;justify-content:flex-start;overflow:hidden;padding:0;cursor:pointer;width:100%;text-align:left;box-sizing:border-box;color:inherit;font-size:inherit;background:none;text-decoration:none;margin:0;min-height:48px;padding-left:var(--mat-menu-item-leading-spacing, 12px);padding-right:var(--mat-menu-item-trailing-spacing, 12px);-webkit-user-select:none;user-select:none;cursor:pointer;outline:none;border:none;-webkit-tap-highlight-color:rgba(0,0,0,0)}.mat-mdc-menu-item::-moz-focus-inner{border:0}[dir=rtl] .mat-mdc-menu-item{padding-left:var(--mat-menu-item-trailing-spacing, 12px);padding-right:var(--mat-menu-item-leading-spacing, 12px)}.mat-mdc-menu-item:has(.material-icons,mat-icon,[matButtonIcon]){padding-left:var(--mat-menu-item-with-icon-leading-spacing, 12px);padding-right:var(--mat-menu-item-with-icon-trailing-spacing, 12px)}[dir=rtl] .mat-mdc-menu-item:has(.material-icons,mat-icon,[matButtonIcon]){padding-left:var(--mat-menu-item-with-icon-trailing-spacing, 12px);padding-right:var(--mat-menu-item-with-icon-leading-spacing, 12px)}.mat-mdc-menu-item,.mat-mdc-menu-item:visited,.mat-mdc-menu-item:link{color:var(--mat-menu-item-label-text-color, var(--mat-app-on-surface))}.mat-mdc-menu-item .mat-icon-no-color,.mat-mdc-menu-item .mat-mdc-menu-submenu-icon{color:var(--mat-menu-item-icon-color, var(--mat-app-on-surface-variant))}.mat-mdc-menu-item[disabled]{cursor:default;opacity:.38}.mat-mdc-menu-item[disabled]::after{display:block;position:absolute;content:\"\";top:0;left:0;bottom:0;right:0}.mat-mdc-menu-item:focus{outline:0}.mat-mdc-menu-item .mat-icon{flex-shrink:0;margin-right:var(--mat-menu-item-spacing, 12px);height:var(--mat-menu-item-icon-size, 24px);width:var(--mat-menu-item-icon-size, 24px)}[dir=rtl] .mat-mdc-menu-item{text-align:right}[dir=rtl] .mat-mdc-menu-item .mat-icon{margin-right:0;margin-left:var(--mat-menu-item-spacing, 12px)}.mat-mdc-menu-item:not([disabled]):hover{background-color:var(--mat-menu-item-hover-state-layer-color, color-mix(in srgb, var(--mat-app-on-surface) calc(var(--mat-app-hover-state-layer-opacity) * 100%), transparent))}.mat-mdc-menu-item:not([disabled]).cdk-program-focused,.mat-mdc-menu-item:not([disabled]).cdk-keyboard-focused,.mat-mdc-menu-item:not([disabled]).mat-mdc-menu-item-highlighted{background-color:var(--mat-menu-item-focus-state-layer-color, color-mix(in srgb, var(--mat-app-on-surface) calc(var(--mat-app-focus-state-layer-opacity) * 100%), transparent))}@media(forced-colors: active){.mat-mdc-menu-item{margin-top:1px}}.mat-mdc-menu-submenu-icon{width:var(--mat-menu-item-icon-size, 24px);height:10px;fill:currentColor;padding-left:var(--mat-menu-item-spacing, 12px)}[dir=rtl] .mat-mdc-menu-submenu-icon{padding-right:var(--mat-menu-item-spacing, 12px);padding-left:0}[dir=rtl] .mat-mdc-menu-submenu-icon polygon{transform:scaleX(-1);transform-origin:center}@media(forced-colors: active){.mat-mdc-menu-submenu-icon{fill:CanvasText}}.mat-mdc-menu-item .mat-mdc-menu-ripple{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none}"], animations: [matMenuAnimations.transformMenu, matMenuAnimations.fadeInItems], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
620
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0-next.3", ngImport: i0, type: MatMenu, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
621
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "16.1.0", version: "19.0.0-next.3", type: MatMenu, isStandalone: true, selector: "mat-menu", inputs: { backdropClass: "backdropClass", ariaLabel: ["aria-label", "ariaLabel"], ariaLabelledby: ["aria-labelledby", "ariaLabelledby"], ariaDescribedby: ["aria-describedby", "ariaDescribedby"], xPosition: "xPosition", yPosition: "yPosition", overlapTrigger: ["overlapTrigger", "overlapTrigger", booleanAttribute], hasBackdrop: ["hasBackdrop", "hasBackdrop", (value) => (value == null ? null : booleanAttribute(value))], panelClass: ["class", "panelClass"], classList: "classList" }, outputs: { closed: "closed", close: "close" }, host: { properties: { "attr.aria-label": "null", "attr.aria-labelledby": "null", "attr.aria-describedby": "null" } }, providers: [{ provide: MAT_MENU_PANEL, useExisting: MatMenu }], queries: [{ propertyName: "lazyContent", first: true, predicate: MAT_MENU_CONTENT, descendants: true }, { propertyName: "_allItems", predicate: MatMenuItem, descendants: true }, { propertyName: "items", predicate: MatMenuItem }], viewQueries: [{ propertyName: "templateRef", first: true, predicate: TemplateRef, descendants: true }], exportAs: ["matMenu"], ngImport: i0, template: "<ng-template>\n <div\n class=\"mat-mdc-menu-panel mat-mdc-elevation-specific\"\n [id]=\"panelId\"\n [class]=\"_classList\"\n (keydown)=\"_handleKeydown($event)\"\n (click)=\"closed.emit('click')\"\n [@transformMenu]=\"_panelAnimationState\"\n (@transformMenu.start)=\"_onAnimationStart($event)\"\n (@transformMenu.done)=\"_onAnimationDone($event)\"\n tabindex=\"-1\"\n role=\"menu\"\n [attr.aria-label]=\"ariaLabel || null\"\n [attr.aria-labelledby]=\"ariaLabelledby || null\"\n [attr.aria-describedby]=\"ariaDescribedby || null\">\n <div class=\"mat-mdc-menu-content\">\n <ng-content></ng-content>\n </div>\n </div>\n</ng-template>\n", styles: ["mat-menu{display:none}.mat-mdc-menu-content{margin:0;padding:8px 0;outline:0}.mat-mdc-menu-content,.mat-mdc-menu-content .mat-mdc-menu-item .mat-mdc-menu-item-text{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;flex:1;white-space:normal;font-family:var(--mat-menu-item-label-text-font, var(--mat-app-label-large-font));line-height:var(--mat-menu-item-label-text-line-height, var(--mat-app-label-large-line-height));font-size:var(--mat-menu-item-label-text-size, var(--mat-app-label-large-size));letter-spacing:var(--mat-menu-item-label-text-tracking, var(--mat-app-label-large-tracking));font-weight:var(--mat-menu-item-label-text-weight, var(--mat-app-label-large-weight))}.mat-mdc-menu-panel{min-width:112px;max-width:280px;overflow:auto;-webkit-overflow-scrolling:touch;box-sizing:border-box;outline:0;border-radius:var(--mat-menu-container-shape, var(--mat-app-corner-extra-small));background-color:var(--mat-menu-container-color, var(--mat-app-surface-container));will-change:transform,opacity}.mat-mdc-menu-panel.ng-animating{pointer-events:none}.mat-mdc-menu-panel.ng-animating:has(.mat-mdc-menu-content:empty){display:none}@media(forced-colors: active){.mat-mdc-menu-panel{outline:solid 1px}}.mat-mdc-menu-panel .mat-divider{color:var(--mat-menu-divider-color, var(--mat-app-surface-variant));margin-bottom:var(--mat-menu-divider-bottom-spacing, 8px);margin-top:var(--mat-menu-divider-top-spacing, 8px)}.mat-mdc-menu-item{display:flex;position:relative;align-items:center;justify-content:flex-start;overflow:hidden;padding:0;cursor:pointer;width:100%;text-align:left;box-sizing:border-box;color:inherit;font-size:inherit;background:none;text-decoration:none;margin:0;min-height:48px;padding-left:var(--mat-menu-item-leading-spacing, 12px);padding-right:var(--mat-menu-item-trailing-spacing, 12px);-webkit-user-select:none;user-select:none;cursor:pointer;outline:none;border:none;-webkit-tap-highlight-color:rgba(0,0,0,0)}.mat-mdc-menu-item::-moz-focus-inner{border:0}[dir=rtl] .mat-mdc-menu-item{padding-left:var(--mat-menu-item-trailing-spacing, 12px);padding-right:var(--mat-menu-item-leading-spacing, 12px)}.mat-mdc-menu-item:has(.material-icons,mat-icon,[matButtonIcon]){padding-left:var(--mat-menu-item-with-icon-leading-spacing, 12px);padding-right:var(--mat-menu-item-with-icon-trailing-spacing, 12px)}[dir=rtl] .mat-mdc-menu-item:has(.material-icons,mat-icon,[matButtonIcon]){padding-left:var(--mat-menu-item-with-icon-trailing-spacing, 12px);padding-right:var(--mat-menu-item-with-icon-leading-spacing, 12px)}.mat-mdc-menu-item,.mat-mdc-menu-item:visited,.mat-mdc-menu-item:link{color:var(--mat-menu-item-label-text-color, var(--mat-app-on-surface))}.mat-mdc-menu-item .mat-icon-no-color,.mat-mdc-menu-item .mat-mdc-menu-submenu-icon{color:var(--mat-menu-item-icon-color, var(--mat-app-on-surface-variant))}.mat-mdc-menu-item[disabled]{cursor:default;opacity:.38}.mat-mdc-menu-item[disabled]::after{display:block;position:absolute;content:\"\";top:0;left:0;bottom:0;right:0}.mat-mdc-menu-item:focus{outline:0}.mat-mdc-menu-item .mat-icon{flex-shrink:0;margin-right:var(--mat-menu-item-spacing, 12px);height:var(--mat-menu-item-icon-size, 24px);width:var(--mat-menu-item-icon-size, 24px)}[dir=rtl] .mat-mdc-menu-item{text-align:right}[dir=rtl] .mat-mdc-menu-item .mat-icon{margin-right:0;margin-left:var(--mat-menu-item-spacing, 12px)}.mat-mdc-menu-item:not([disabled]):hover{background-color:var(--mat-menu-item-hover-state-layer-color, color-mix(in srgb, var(--mat-app-on-surface) calc(var(--mat-app-hover-state-layer-opacity) * 100%), transparent))}.mat-mdc-menu-item:not([disabled]).cdk-program-focused,.mat-mdc-menu-item:not([disabled]).cdk-keyboard-focused,.mat-mdc-menu-item:not([disabled]).mat-mdc-menu-item-highlighted{background-color:var(--mat-menu-item-focus-state-layer-color, color-mix(in srgb, var(--mat-app-on-surface) calc(var(--mat-app-focus-state-layer-opacity) * 100%), transparent))}@media(forced-colors: active){.mat-mdc-menu-item{margin-top:1px}}.mat-mdc-menu-submenu-icon{width:var(--mat-menu-item-icon-size, 24px);height:10px;fill:currentColor;padding-left:var(--mat-menu-item-spacing, 12px)}[dir=rtl] .mat-mdc-menu-submenu-icon{padding-right:var(--mat-menu-item-spacing, 12px);padding-left:0}[dir=rtl] .mat-mdc-menu-submenu-icon polygon{transform:scaleX(-1);transform-origin:center}@media(forced-colors: active){.mat-mdc-menu-submenu-icon{fill:CanvasText}}.mat-mdc-menu-item .mat-mdc-menu-ripple{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none}"], animations: [matMenuAnimations.transformMenu, matMenuAnimations.fadeInItems], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
645
622
  }
646
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0-next.2", ngImport: i0, type: MatMenu, decorators: [{
623
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0-next.3", ngImport: i0, type: MatMenu, decorators: [{
647
624
  type: Component,
648
625
  args: [{ selector: 'mat-menu', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, exportAs: 'matMenu', host: {
649
626
  '[attr.aria-label]': 'null',
650
627
  '[attr.aria-labelledby]': 'null',
651
628
  '[attr.aria-describedby]': 'null',
652
629
  }, animations: [matMenuAnimations.transformMenu, matMenuAnimations.fadeInItems], providers: [{ provide: MAT_MENU_PANEL, useExisting: MatMenu }], standalone: true, template: "<ng-template>\n <div\n class=\"mat-mdc-menu-panel mat-mdc-elevation-specific\"\n [id]=\"panelId\"\n [class]=\"_classList\"\n (keydown)=\"_handleKeydown($event)\"\n (click)=\"closed.emit('click')\"\n [@transformMenu]=\"_panelAnimationState\"\n (@transformMenu.start)=\"_onAnimationStart($event)\"\n (@transformMenu.done)=\"_onAnimationDone($event)\"\n tabindex=\"-1\"\n role=\"menu\"\n [attr.aria-label]=\"ariaLabel || null\"\n [attr.aria-labelledby]=\"ariaLabelledby || null\"\n [attr.aria-describedby]=\"ariaDescribedby || null\">\n <div class=\"mat-mdc-menu-content\">\n <ng-content></ng-content>\n </div>\n </div>\n</ng-template>\n", styles: ["mat-menu{display:none}.mat-mdc-menu-content{margin:0;padding:8px 0;outline:0}.mat-mdc-menu-content,.mat-mdc-menu-content .mat-mdc-menu-item .mat-mdc-menu-item-text{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;flex:1;white-space:normal;font-family:var(--mat-menu-item-label-text-font, var(--mat-app-label-large-font));line-height:var(--mat-menu-item-label-text-line-height, var(--mat-app-label-large-line-height));font-size:var(--mat-menu-item-label-text-size, var(--mat-app-label-large-size));letter-spacing:var(--mat-menu-item-label-text-tracking, var(--mat-app-label-large-tracking));font-weight:var(--mat-menu-item-label-text-weight, var(--mat-app-label-large-weight))}.mat-mdc-menu-panel{min-width:112px;max-width:280px;overflow:auto;-webkit-overflow-scrolling:touch;box-sizing:border-box;outline:0;border-radius:var(--mat-menu-container-shape, var(--mat-app-corner-extra-small));background-color:var(--mat-menu-container-color, var(--mat-app-surface-container));will-change:transform,opacity}.mat-mdc-menu-panel.ng-animating{pointer-events:none}.mat-mdc-menu-panel.ng-animating:has(.mat-mdc-menu-content:empty){display:none}@media(forced-colors: active){.mat-mdc-menu-panel{outline:solid 1px}}.mat-mdc-menu-panel .mat-divider{color:var(--mat-menu-divider-color, var(--mat-app-surface-variant));margin-bottom:var(--mat-menu-divider-bottom-spacing, 8px);margin-top:var(--mat-menu-divider-top-spacing, 8px)}.mat-mdc-menu-item{display:flex;position:relative;align-items:center;justify-content:flex-start;overflow:hidden;padding:0;cursor:pointer;width:100%;text-align:left;box-sizing:border-box;color:inherit;font-size:inherit;background:none;text-decoration:none;margin:0;min-height:48px;padding-left:var(--mat-menu-item-leading-spacing, 12px);padding-right:var(--mat-menu-item-trailing-spacing, 12px);-webkit-user-select:none;user-select:none;cursor:pointer;outline:none;border:none;-webkit-tap-highlight-color:rgba(0,0,0,0)}.mat-mdc-menu-item::-moz-focus-inner{border:0}[dir=rtl] .mat-mdc-menu-item{padding-left:var(--mat-menu-item-trailing-spacing, 12px);padding-right:var(--mat-menu-item-leading-spacing, 12px)}.mat-mdc-menu-item:has(.material-icons,mat-icon,[matButtonIcon]){padding-left:var(--mat-menu-item-with-icon-leading-spacing, 12px);padding-right:var(--mat-menu-item-with-icon-trailing-spacing, 12px)}[dir=rtl] .mat-mdc-menu-item:has(.material-icons,mat-icon,[matButtonIcon]){padding-left:var(--mat-menu-item-with-icon-trailing-spacing, 12px);padding-right:var(--mat-menu-item-with-icon-leading-spacing, 12px)}.mat-mdc-menu-item,.mat-mdc-menu-item:visited,.mat-mdc-menu-item:link{color:var(--mat-menu-item-label-text-color, var(--mat-app-on-surface))}.mat-mdc-menu-item .mat-icon-no-color,.mat-mdc-menu-item .mat-mdc-menu-submenu-icon{color:var(--mat-menu-item-icon-color, var(--mat-app-on-surface-variant))}.mat-mdc-menu-item[disabled]{cursor:default;opacity:.38}.mat-mdc-menu-item[disabled]::after{display:block;position:absolute;content:\"\";top:0;left:0;bottom:0;right:0}.mat-mdc-menu-item:focus{outline:0}.mat-mdc-menu-item .mat-icon{flex-shrink:0;margin-right:var(--mat-menu-item-spacing, 12px);height:var(--mat-menu-item-icon-size, 24px);width:var(--mat-menu-item-icon-size, 24px)}[dir=rtl] .mat-mdc-menu-item{text-align:right}[dir=rtl] .mat-mdc-menu-item .mat-icon{margin-right:0;margin-left:var(--mat-menu-item-spacing, 12px)}.mat-mdc-menu-item:not([disabled]):hover{background-color:var(--mat-menu-item-hover-state-layer-color, color-mix(in srgb, var(--mat-app-on-surface) calc(var(--mat-app-hover-state-layer-opacity) * 100%), transparent))}.mat-mdc-menu-item:not([disabled]).cdk-program-focused,.mat-mdc-menu-item:not([disabled]).cdk-keyboard-focused,.mat-mdc-menu-item:not([disabled]).mat-mdc-menu-item-highlighted{background-color:var(--mat-menu-item-focus-state-layer-color, color-mix(in srgb, var(--mat-app-on-surface) calc(var(--mat-app-focus-state-layer-opacity) * 100%), transparent))}@media(forced-colors: active){.mat-mdc-menu-item{margin-top:1px}}.mat-mdc-menu-submenu-icon{width:var(--mat-menu-item-icon-size, 24px);height:10px;fill:currentColor;padding-left:var(--mat-menu-item-spacing, 12px)}[dir=rtl] .mat-mdc-menu-submenu-icon{padding-right:var(--mat-menu-item-spacing, 12px);padding-left:0}[dir=rtl] .mat-mdc-menu-submenu-icon polygon{transform:scaleX(-1);transform-origin:center}@media(forced-colors: active){.mat-mdc-menu-submenu-icon{fill:CanvasText}}.mat-mdc-menu-item .mat-mdc-menu-ripple{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none}"] }]
653
- }], ctorParameters: () => [{ type: i0.ElementRef }, { type: i0.NgZone }, { type: undefined, decorators: [{
654
- type: Inject,
655
- args: [MAT_MENU_DEFAULT_OPTIONS]
656
- }] }, { type: i0.ChangeDetectorRef }], propDecorators: { _allItems: [{
630
+ }], ctorParameters: () => [], propDecorators: { _allItems: [{
657
631
  type: ContentChildren,
658
632
  args: [MatMenuItem, { descendants: true }]
659
633
  }], backdropClass: [{
@@ -759,23 +733,21 @@ class MatMenuTrigger {
759
733
  }
760
734
  this._menuItemInstance?._setTriggersSubmenu(this.triggersSubmenu());
761
735
  }
762
- constructor(_overlay, _element, _viewContainerRef, scrollStrategy, parentMenu,
763
- // `MatMenuTrigger` is commonly used in combination with a `MatMenuItem`.
764
- // tslint:disable-next-line: lightweight-tokens
765
- _menuItemInstance, _dir, _focusMonitor, _ngZone) {
766
- this._overlay = _overlay;
767
- this._element = _element;
768
- this._viewContainerRef = _viewContainerRef;
769
- this._menuItemInstance = _menuItemInstance;
770
- this._dir = _dir;
771
- this._focusMonitor = _focusMonitor;
772
- this._ngZone = _ngZone;
736
+ constructor() {
737
+ this._overlay = inject(Overlay);
738
+ this._element = inject(ElementRef);
739
+ this._viewContainerRef = inject(ViewContainerRef);
740
+ this._menuItemInstance = inject(MatMenuItem, { optional: true, self: true });
741
+ this._dir = inject(Directionality, { optional: true });
742
+ this._focusMonitor = inject(FocusMonitor);
743
+ this._ngZone = inject(NgZone);
744
+ this._scrollStrategy = inject(MAT_MENU_SCROLL_STRATEGY);
745
+ this._changeDetectorRef = inject(ChangeDetectorRef);
773
746
  this._overlayRef = null;
774
747
  this._menuOpen = false;
775
748
  this._closingActionsSubscription = Subscription.EMPTY;
776
749
  this._hoverSubscription = Subscription.EMPTY;
777
750
  this._menuCloseSubscription = Subscription.EMPTY;
778
- this._changeDetectorRef = inject(ChangeDetectorRef);
779
751
  /**
780
752
  * Handles touch start events on the trigger.
781
753
  * Needs to be an arrow function so we can easily use addEventListener and removeEventListener.
@@ -812,9 +784,9 @@ class MatMenuTrigger {
812
784
  */
813
785
  // tslint:disable-next-line:no-output-on-prefix
814
786
  this.onMenuClose = this.menuClosed;
815
- this._scrollStrategy = scrollStrategy;
787
+ const parentMenu = inject(MAT_MENU_PANEL, { optional: true });
816
788
  this._parentMaterialMenu = parentMenu instanceof MatMenu ? parentMenu : undefined;
817
- _element.nativeElement.addEventListener('touchstart', this._handleTouchStart, passiveEventListenerOptions);
789
+ this._element.nativeElement.addEventListener('touchstart', this._handleTouchStart, passiveEventListenerOptions);
818
790
  }
819
791
  ngAfterContentInit() {
820
792
  this._handleHover();
@@ -999,7 +971,7 @@ class MatMenuTrigger {
999
971
  backdropClass: menu.backdropClass || 'cdk-overlay-transparent-backdrop',
1000
972
  panelClass: menu.overlayPanelClass,
1001
973
  scrollStrategy: this._scrollStrategy(),
1002
- direction: this._dir,
974
+ direction: this._dir || 'ltr',
1003
975
  });
1004
976
  }
1005
977
  /**
@@ -1010,17 +982,11 @@ class MatMenuTrigger {
1010
982
  _subscribeToPositions(menu, position) {
1011
983
  if (menu.setPositionClasses) {
1012
984
  position.positionChanges.subscribe(change => {
1013
- const posX = change.connectionPair.overlayX === 'start' ? 'after' : 'before';
1014
- const posY = change.connectionPair.overlayY === 'top' ? 'below' : 'above';
1015
- // @breaking-change 15.0.0 Remove null check for `ngZone`.
1016
- // `positionChanges` fires outside of the `ngZone` and `setPositionClasses` might be
1017
- // updating something in the view so we need to bring it back in.
1018
- if (this._ngZone) {
1019
- this._ngZone.run(() => menu.setPositionClasses(posX, posY));
1020
- }
1021
- else {
985
+ this._ngZone.run(() => {
986
+ const posX = change.connectionPair.overlayX === 'start' ? 'after' : 'before';
987
+ const posY = change.connectionPair.overlayY === 'top' ? 'below' : 'above';
1022
988
  menu.setPositionClasses(posX, posY);
1023
- }
989
+ });
1024
990
  });
1025
991
  }
1026
992
  }
@@ -1159,10 +1125,10 @@ class MatMenuTrigger {
1159
1125
  }
1160
1126
  return this._portal;
1161
1127
  }
1162
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0-next.2", ngImport: i0, type: MatMenuTrigger, deps: [{ token: i1$1.Overlay }, { token: i0.ElementRef }, { token: i0.ViewContainerRef }, { token: MAT_MENU_SCROLL_STRATEGY }, { token: MAT_MENU_PANEL, optional: true }, { token: MatMenuItem, optional: true, self: true }, { token: i3.Directionality, optional: true }, { token: i1.FocusMonitor }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Directive }); }
1163
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.0.0-next.2", type: MatMenuTrigger, isStandalone: true, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", inputs: { _deprecatedMatMenuTriggerFor: ["mat-menu-trigger-for", "_deprecatedMatMenuTriggerFor"], menu: ["matMenuTriggerFor", "menu"], menuData: ["matMenuTriggerData", "menuData"], restoreFocus: ["matMenuTriggerRestoreFocus", "restoreFocus"] }, outputs: { menuOpened: "menuOpened", onMenuOpen: "onMenuOpen", menuClosed: "menuClosed", onMenuClose: "onMenuClose" }, host: { listeners: { "click": "_handleClick($event)", "mousedown": "_handleMousedown($event)", "keydown": "_handleKeydown($event)" }, properties: { "attr.aria-haspopup": "menu ? \"menu\" : null", "attr.aria-expanded": "menuOpen", "attr.aria-controls": "menuOpen ? menu.panelId : null" }, classAttribute: "mat-mdc-menu-trigger" }, exportAs: ["matMenuTrigger"], ngImport: i0 }); }
1128
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0-next.3", ngImport: i0, type: MatMenuTrigger, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
1129
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.0.0-next.3", type: MatMenuTrigger, isStandalone: true, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", inputs: { _deprecatedMatMenuTriggerFor: ["mat-menu-trigger-for", "_deprecatedMatMenuTriggerFor"], menu: ["matMenuTriggerFor", "menu"], menuData: ["matMenuTriggerData", "menuData"], restoreFocus: ["matMenuTriggerRestoreFocus", "restoreFocus"] }, outputs: { menuOpened: "menuOpened", onMenuOpen: "onMenuOpen", menuClosed: "menuClosed", onMenuClose: "onMenuClose" }, host: { listeners: { "click": "_handleClick($event)", "mousedown": "_handleMousedown($event)", "keydown": "_handleKeydown($event)" }, properties: { "attr.aria-haspopup": "menu ? \"menu\" : null", "attr.aria-expanded": "menuOpen", "attr.aria-controls": "menuOpen ? menu.panelId : null" }, classAttribute: "mat-mdc-menu-trigger" }, exportAs: ["matMenuTrigger"], ngImport: i0 }); }
1164
1130
  }
1165
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0-next.2", ngImport: i0, type: MatMenuTrigger, decorators: [{
1131
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0-next.3", ngImport: i0, type: MatMenuTrigger, decorators: [{
1166
1132
  type: Directive,
1167
1133
  args: [{
1168
1134
  selector: `[mat-menu-trigger-for], [matMenuTriggerFor]`,
@@ -1178,21 +1144,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0-next.2",
1178
1144
  exportAs: 'matMenuTrigger',
1179
1145
  standalone: true,
1180
1146
  }]
1181
- }], ctorParameters: () => [{ type: i1$1.Overlay }, { type: i0.ElementRef }, { type: i0.ViewContainerRef }, { type: undefined, decorators: [{
1182
- type: Inject,
1183
- args: [MAT_MENU_SCROLL_STRATEGY]
1184
- }] }, { type: undefined, decorators: [{
1185
- type: Inject,
1186
- args: [MAT_MENU_PANEL]
1187
- }, {
1188
- type: Optional
1189
- }] }, { type: MatMenuItem, decorators: [{
1190
- type: Optional
1191
- }, {
1192
- type: Self
1193
- }] }, { type: i3.Directionality, decorators: [{
1194
- type: Optional
1195
- }] }, { type: i1.FocusMonitor }, { type: i0.NgZone }], propDecorators: { _deprecatedMatMenuTriggerFor: [{
1147
+ }], ctorParameters: () => [], propDecorators: { _deprecatedMatMenuTriggerFor: [{
1196
1148
  type: Input,
1197
1149
  args: ['mat-menu-trigger-for']
1198
1150
  }], menu: [{
@@ -1215,8 +1167,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0-next.2",
1215
1167
  }] } });
1216
1168
 
1217
1169
  class MatMenuModule {
1218
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0-next.2", ngImport: i0, type: MatMenuModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
1219
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.0.0-next.2", ngImport: i0, type: MatMenuModule, imports: [CommonModule,
1170
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0-next.3", ngImport: i0, type: MatMenuModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
1171
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.0.0-next.3", ngImport: i0, type: MatMenuModule, imports: [CommonModule,
1220
1172
  MatRippleModule,
1221
1173
  MatCommonModule,
1222
1174
  OverlayModule,
@@ -1229,13 +1181,13 @@ class MatMenuModule {
1229
1181
  MatMenuItem,
1230
1182
  MatMenuContent,
1231
1183
  MatMenuTrigger] }); }
1232
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.0.0-next.2", ngImport: i0, type: MatMenuModule, providers: [MAT_MENU_SCROLL_STRATEGY_FACTORY_PROVIDER], imports: [CommonModule,
1184
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.0.0-next.3", ngImport: i0, type: MatMenuModule, providers: [MAT_MENU_SCROLL_STRATEGY_FACTORY_PROVIDER], imports: [CommonModule,
1233
1185
  MatRippleModule,
1234
1186
  MatCommonModule,
1235
1187
  OverlayModule, CdkScrollableModule,
1236
1188
  MatCommonModule] }); }
1237
1189
  }
1238
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0-next.2", ngImport: i0, type: MatMenuModule, decorators: [{
1190
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0-next.3", ngImport: i0, type: MatMenuModule, decorators: [{
1239
1191
  type: NgModule,
1240
1192
  args: [{
1241
1193
  imports: [