@angular/material 14.0.0-next.2 → 14.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 (370) hide show
  1. package/autocomplete/autocomplete-trigger.d.ts +14 -3
  2. package/autocomplete/autocomplete.d.ts +7 -1
  3. package/button-toggle/_button-toggle-theme.scss +14 -2
  4. package/checkbox/_checkbox-theme.scss +7 -1
  5. package/chips/chip-list.d.ts +20 -5
  6. package/chips/chip.d.ts +3 -1
  7. package/core/common-behaviors/error-state.d.ts +1 -2
  8. package/core/datetime/index.d.ts +1 -2
  9. package/core/ripple/index.d.ts +1 -2
  10. package/core/ripple/ripple-ref.d.ts +2 -1
  11. package/core/ripple/ripple-renderer.d.ts +9 -2
  12. package/core/theming/_theming.scss +9 -0
  13. package/datepicker/calendar-body.d.ts +12 -3
  14. package/datepicker/date-range-input-parts.d.ts +4 -1
  15. package/datepicker/month-view.d.ts +18 -0
  16. package/datepicker/multi-year-view.d.ts +18 -0
  17. package/datepicker/year-view.d.ts +18 -0
  18. package/dialog/dialog-content-directives.d.ts +5 -1
  19. package/esm2020/autocomplete/autocomplete-module.mjs +5 -5
  20. package/esm2020/autocomplete/autocomplete-origin.mjs +7 -7
  21. package/esm2020/autocomplete/autocomplete-trigger.mjs +72 -38
  22. package/esm2020/autocomplete/autocomplete.mjs +18 -8
  23. package/esm2020/badge/badge-module.mjs +5 -5
  24. package/esm2020/badge/badge.mjs +4 -4
  25. package/esm2020/bottom-sheet/bottom-sheet-container.mjs +4 -4
  26. package/esm2020/bottom-sheet/bottom-sheet-module.mjs +5 -5
  27. package/esm2020/bottom-sheet/bottom-sheet.mjs +4 -4
  28. package/esm2020/button/button-module.mjs +5 -5
  29. package/esm2020/button/button.mjs +7 -7
  30. package/esm2020/button-toggle/button-toggle-module.mjs +5 -5
  31. package/esm2020/button-toggle/button-toggle.mjs +8 -8
  32. package/esm2020/card/card-module.mjs +5 -5
  33. package/esm2020/card/card.mjs +43 -43
  34. package/esm2020/checkbox/checkbox-module.mjs +9 -9
  35. package/esm2020/checkbox/checkbox-required-validator.mjs +4 -4
  36. package/esm2020/checkbox/checkbox.mjs +6 -4
  37. package/esm2020/chips/chip-input.mjs +4 -4
  38. package/esm2020/chips/chip-list.mjs +33 -8
  39. package/esm2020/chips/chip.mjs +18 -14
  40. package/esm2020/chips/chips-module.mjs +5 -5
  41. package/esm2020/core/common-behaviors/common-module.mjs +5 -5
  42. package/esm2020/core/common-behaviors/error-state.mjs +1 -8
  43. package/esm2020/core/datetime/index.mjs +9 -11
  44. package/esm2020/core/datetime/native-date-adapter.mjs +4 -4
  45. package/esm2020/core/error/error-options.mjs +7 -7
  46. package/esm2020/core/line/line.mjs +8 -8
  47. package/esm2020/core/option/index.mjs +5 -5
  48. package/esm2020/core/option/optgroup.mjs +7 -7
  49. package/esm2020/core/option/option.mjs +7 -7
  50. package/esm2020/core/ripple/index.mjs +6 -7
  51. package/esm2020/core/ripple/ripple-ref.mjs +5 -2
  52. package/esm2020/core/ripple/ripple-renderer.mjs +88 -47
  53. package/esm2020/core/ripple/ripple.mjs +4 -4
  54. package/esm2020/core/selection/pseudo-checkbox/pseudo-checkbox-module.mjs +5 -5
  55. package/esm2020/core/selection/pseudo-checkbox/pseudo-checkbox.mjs +4 -4
  56. package/esm2020/core/version.mjs +1 -1
  57. package/esm2020/datepicker/calendar-body.mjs +27 -5
  58. package/esm2020/datepicker/calendar.mjs +13 -13
  59. package/esm2020/datepicker/date-range-input-parts.mjs +10 -10
  60. package/esm2020/datepicker/date-range-input.mjs +4 -4
  61. package/esm2020/datepicker/date-range-picker.mjs +4 -4
  62. package/esm2020/datepicker/date-range-selection-strategy.mjs +4 -4
  63. package/esm2020/datepicker/date-selection-model.mjs +10 -10
  64. package/esm2020/datepicker/datepicker-actions.mjs +10 -10
  65. package/esm2020/datepicker/datepicker-base.mjs +7 -7
  66. package/esm2020/datepicker/datepicker-input-base.mjs +12 -7
  67. package/esm2020/datepicker/datepicker-input.mjs +4 -4
  68. package/esm2020/datepicker/datepicker-intl.mjs +4 -4
  69. package/esm2020/datepicker/datepicker-module.mjs +5 -5
  70. package/esm2020/datepicker/datepicker-toggle.mjs +7 -7
  71. package/esm2020/datepicker/datepicker.mjs +4 -4
  72. package/esm2020/datepicker/month-view.mjs +36 -9
  73. package/esm2020/datepicker/multi-year-view.mjs +42 -10
  74. package/esm2020/datepicker/year-view.mjs +41 -10
  75. package/esm2020/dialog/dialog-container.mjs +8 -8
  76. package/esm2020/dialog/dialog-content-directives.mjs +27 -15
  77. package/esm2020/dialog/dialog-module.mjs +5 -5
  78. package/esm2020/dialog/dialog.mjs +8 -8
  79. package/esm2020/divider/divider-module.mjs +5 -5
  80. package/esm2020/divider/divider.mjs +4 -4
  81. package/esm2020/expansion/accordion.mjs +4 -4
  82. package/esm2020/expansion/expansion-module.mjs +5 -5
  83. package/esm2020/expansion/expansion-panel-base.mjs +14 -0
  84. package/esm2020/expansion/expansion-panel-content.mjs +14 -7
  85. package/esm2020/expansion/expansion-panel-header.mjs +10 -10
  86. package/esm2020/expansion/expansion-panel.mjs +11 -8
  87. package/esm2020/expansion/public-api.mjs +2 -1
  88. package/esm2020/form-field/error.mjs +4 -4
  89. package/esm2020/form-field/form-field-control.mjs +4 -4
  90. package/esm2020/form-field/form-field-module.mjs +5 -5
  91. package/esm2020/form-field/form-field.mjs +16 -11
  92. package/esm2020/form-field/hint.mjs +4 -4
  93. package/esm2020/form-field/label.mjs +4 -4
  94. package/esm2020/form-field/placeholder.mjs +4 -4
  95. package/esm2020/form-field/prefix.mjs +4 -4
  96. package/esm2020/form-field/suffix.mjs +4 -4
  97. package/esm2020/grid-list/grid-list-module.mjs +5 -5
  98. package/esm2020/grid-list/grid-list.mjs +4 -4
  99. package/esm2020/grid-list/grid-tile.mjs +16 -16
  100. package/esm2020/icon/icon-module.mjs +5 -5
  101. package/esm2020/icon/icon-registry.mjs +12 -14
  102. package/esm2020/icon/icon.mjs +30 -20
  103. package/esm2020/icon/testing/fake-icon-registry.mjs +9 -9
  104. package/esm2020/input/input-module.mjs +5 -5
  105. package/esm2020/input/input.mjs +16 -6
  106. package/esm2020/list/list-module.mjs +5 -5
  107. package/esm2020/list/list.mjs +19 -19
  108. package/esm2020/list/selection-list.mjs +7 -7
  109. package/esm2020/menu/menu-content.mjs +7 -7
  110. package/esm2020/menu/menu-errors.mjs +1 -12
  111. package/esm2020/menu/menu-item.mjs +8 -4
  112. package/esm2020/menu/menu-module.mjs +5 -5
  113. package/esm2020/menu/menu-trigger.mjs +73 -66
  114. package/esm2020/menu/menu.mjs +35 -14
  115. package/esm2020/paginator/paginator-intl.mjs +4 -4
  116. package/esm2020/paginator/paginator-module.mjs +5 -5
  117. package/esm2020/paginator/paginator.mjs +12 -8
  118. package/esm2020/progress-bar/progress-bar-module.mjs +5 -5
  119. package/esm2020/progress-bar/progress-bar.mjs +4 -4
  120. package/esm2020/progress-spinner/progress-spinner-module.mjs +8 -8
  121. package/esm2020/progress-spinner/progress-spinner.mjs +13 -50
  122. package/esm2020/progress-spinner/public-api.mjs +10 -2
  123. package/esm2020/radio/radio-module.mjs +5 -5
  124. package/esm2020/radio/radio.mjs +14 -14
  125. package/esm2020/select/select-module.mjs +5 -5
  126. package/esm2020/select/select.mjs +25 -13
  127. package/esm2020/sidenav/drawer.mjs +12 -12
  128. package/esm2020/sidenav/sidenav-module.mjs +7 -8
  129. package/esm2020/sidenav/sidenav.mjs +12 -12
  130. package/esm2020/slide-toggle/slide-toggle-module.mjs +9 -9
  131. package/esm2020/slide-toggle/slide-toggle-required-validator.mjs +4 -4
  132. package/esm2020/slide-toggle/slide-toggle.mjs +4 -4
  133. package/esm2020/slider/slider-module.mjs +5 -5
  134. package/esm2020/slider/slider.mjs +4 -4
  135. package/esm2020/snack-bar/simple-snack-bar.mjs +4 -4
  136. package/esm2020/snack-bar/snack-bar-container.mjs +4 -4
  137. package/esm2020/snack-bar/snack-bar-module.mjs +5 -5
  138. package/esm2020/snack-bar/snack-bar.mjs +7 -7
  139. package/esm2020/sort/sort-header-intl.mjs +4 -4
  140. package/esm2020/sort/sort-header.mjs +16 -8
  141. package/esm2020/sort/sort-module.mjs +5 -5
  142. package/esm2020/sort/sort.mjs +4 -4
  143. package/esm2020/stepper/step-content.mjs +4 -4
  144. package/esm2020/stepper/step-header.mjs +4 -4
  145. package/esm2020/stepper/step-label.mjs +4 -4
  146. package/esm2020/stepper/stepper-button.mjs +7 -7
  147. package/esm2020/stepper/stepper-icon.mjs +4 -4
  148. package/esm2020/stepper/stepper-intl.mjs +4 -4
  149. package/esm2020/stepper/stepper-module.mjs +6 -10
  150. package/esm2020/stepper/stepper.mjs +12 -62
  151. package/esm2020/table/cell.mjs +22 -22
  152. package/esm2020/table/row.mjs +22 -22
  153. package/esm2020/table/table-module.mjs +5 -5
  154. package/esm2020/table/table.mjs +7 -7
  155. package/esm2020/table/text-column.mjs +4 -4
  156. package/esm2020/tabs/ink-bar.mjs +4 -4
  157. package/esm2020/tabs/paginated-tab-header.mjs +16 -10
  158. package/esm2020/tabs/tab-body.mjs +10 -10
  159. package/esm2020/tabs/tab-content.mjs +4 -4
  160. package/esm2020/tabs/tab-group.mjs +31 -7
  161. package/esm2020/tabs/tab-header.mjs +8 -8
  162. package/esm2020/tabs/tab-label-wrapper.mjs +4 -4
  163. package/esm2020/tabs/tab-label.mjs +4 -4
  164. package/esm2020/tabs/tab-nav-bar/tab-nav-bar.mjs +16 -16
  165. package/esm2020/tabs/tab.mjs +4 -4
  166. package/esm2020/tabs/tabs-module.mjs +5 -5
  167. package/esm2020/toolbar/toolbar-module.mjs +5 -5
  168. package/esm2020/toolbar/toolbar.mjs +7 -7
  169. package/esm2020/tooltip/tooltip-module.mjs +5 -5
  170. package/esm2020/tooltip/tooltip.mjs +41 -18
  171. package/esm2020/tree/node.mjs +10 -10
  172. package/esm2020/tree/outlet.mjs +4 -4
  173. package/esm2020/tree/padding.mjs +4 -4
  174. package/esm2020/tree/toggle.mjs +4 -4
  175. package/esm2020/tree/tree-module.mjs +5 -5
  176. package/esm2020/tree/tree.mjs +4 -4
  177. package/expansion/expansion-panel-base.d.ts +22 -0
  178. package/expansion/expansion-panel-content.d.ts +4 -2
  179. package/expansion/public-api.d.ts +1 -0
  180. package/fesm2015/autocomplete.mjs +100 -55
  181. package/fesm2015/autocomplete.mjs.map +1 -1
  182. package/fesm2015/badge.mjs +7 -7
  183. package/fesm2015/badge.mjs.map +1 -1
  184. package/fesm2015/bottom-sheet.mjs +10 -10
  185. package/fesm2015/bottom-sheet.mjs.map +1 -1
  186. package/fesm2015/button-toggle.mjs +11 -11
  187. package/fesm2015/button-toggle.mjs.map +1 -1
  188. package/fesm2015/button.mjs +10 -10
  189. package/fesm2015/button.mjs.map +1 -1
  190. package/fesm2015/card.mjs +46 -46
  191. package/fesm2015/card.mjs.map +1 -1
  192. package/fesm2015/checkbox.mjs +16 -14
  193. package/fesm2015/checkbox.mjs.map +1 -1
  194. package/fesm2015/chips.mjs +56 -27
  195. package/fesm2015/chips.mjs.map +1 -1
  196. package/fesm2015/core.mjs +153 -116
  197. package/fesm2015/core.mjs.map +1 -1
  198. package/fesm2015/datepicker.mjs +224 -107
  199. package/fesm2015/datepicker.mjs.map +1 -1
  200. package/fesm2015/dialog.mjs +44 -32
  201. package/fesm2015/dialog.mjs.map +1 -1
  202. package/fesm2015/divider.mjs +7 -7
  203. package/fesm2015/divider.mjs.map +1 -1
  204. package/fesm2015/expansion.mjs +53 -30
  205. package/fesm2015/expansion.mjs.map +1 -1
  206. package/fesm2015/form-field.mjs +41 -35
  207. package/fesm2015/form-field.mjs.map +1 -1
  208. package/fesm2015/grid-list.mjs +22 -22
  209. package/fesm2015/grid-list.mjs.map +1 -1
  210. package/fesm2015/icon/testing.mjs +8 -8
  211. package/fesm2015/icon/testing.mjs.map +1 -1
  212. package/fesm2015/icon.mjs +44 -36
  213. package/fesm2015/icon.mjs.map +1 -1
  214. package/fesm2015/input.mjs +19 -9
  215. package/fesm2015/input.mjs.map +1 -1
  216. package/fesm2015/list.mjs +28 -28
  217. package/fesm2015/list.mjs.map +1 -1
  218. package/fesm2015/menu.mjs +124 -99
  219. package/fesm2015/menu.mjs.map +1 -1
  220. package/fesm2015/paginator.mjs +18 -14
  221. package/fesm2015/paginator.mjs.map +1 -1
  222. package/fesm2015/progress-bar.mjs +7 -7
  223. package/fesm2015/progress-bar.mjs.map +1 -1
  224. package/fesm2015/progress-spinner.mjs +30 -62
  225. package/fesm2015/progress-spinner.mjs.map +1 -1
  226. package/fesm2015/radio.mjs +17 -17
  227. package/fesm2015/radio.mjs.map +1 -1
  228. package/fesm2015/select.mjs +28 -16
  229. package/fesm2015/select.mjs.map +1 -1
  230. package/fesm2015/sidenav.mjs +29 -30
  231. package/fesm2015/sidenav.mjs.map +1 -1
  232. package/fesm2015/slide-toggle.mjs +14 -14
  233. package/fesm2015/slide-toggle.mjs.map +1 -1
  234. package/fesm2015/slider.mjs +7 -7
  235. package/fesm2015/slider.mjs.map +1 -1
  236. package/fesm2015/snack-bar.mjs +16 -16
  237. package/fesm2015/snack-bar.mjs.map +1 -1
  238. package/fesm2015/sort.mjs +128 -120
  239. package/fesm2015/sort.mjs.map +1 -1
  240. package/fesm2015/stepper.mjs +37 -90
  241. package/fesm2015/stepper.mjs.map +1 -1
  242. package/fesm2015/table.mjs +55 -55
  243. package/fesm2015/table.mjs.map +1 -1
  244. package/fesm2015/tabs.mjs +95 -65
  245. package/fesm2015/tabs.mjs.map +1 -1
  246. package/fesm2015/toolbar.mjs +10 -10
  247. package/fesm2015/toolbar.mjs.map +1 -1
  248. package/fesm2015/tooltip.mjs +46 -21
  249. package/fesm2015/tooltip.mjs.map +1 -1
  250. package/fesm2015/tree.mjs +25 -25
  251. package/fesm2015/tree.mjs.map +1 -1
  252. package/fesm2020/autocomplete.mjs +99 -55
  253. package/fesm2020/autocomplete.mjs.map +1 -1
  254. package/fesm2020/badge.mjs +7 -7
  255. package/fesm2020/badge.mjs.map +1 -1
  256. package/fesm2020/bottom-sheet.mjs +10 -10
  257. package/fesm2020/bottom-sheet.mjs.map +1 -1
  258. package/fesm2020/button-toggle.mjs +11 -11
  259. package/fesm2020/button-toggle.mjs.map +1 -1
  260. package/fesm2020/button.mjs +10 -10
  261. package/fesm2020/button.mjs.map +1 -1
  262. package/fesm2020/card.mjs +46 -46
  263. package/fesm2020/card.mjs.map +1 -1
  264. package/fesm2020/checkbox.mjs +16 -14
  265. package/fesm2020/checkbox.mjs.map +1 -1
  266. package/fesm2020/chips.mjs +56 -27
  267. package/fesm2020/chips.mjs.map +1 -1
  268. package/fesm2020/core.mjs +153 -116
  269. package/fesm2020/core.mjs.map +1 -1
  270. package/fesm2020/datepicker.mjs +224 -107
  271. package/fesm2020/datepicker.mjs.map +1 -1
  272. package/fesm2020/dialog.mjs +44 -32
  273. package/fesm2020/dialog.mjs.map +1 -1
  274. package/fesm2020/divider.mjs +7 -7
  275. package/fesm2020/divider.mjs.map +1 -1
  276. package/fesm2020/expansion.mjs +51 -30
  277. package/fesm2020/expansion.mjs.map +1 -1
  278. package/fesm2020/form-field.mjs +40 -35
  279. package/fesm2020/form-field.mjs.map +1 -1
  280. package/fesm2020/grid-list.mjs +22 -22
  281. package/fesm2020/grid-list.mjs.map +1 -1
  282. package/fesm2020/icon/testing.mjs +8 -8
  283. package/fesm2020/icon/testing.mjs.map +1 -1
  284. package/fesm2020/icon.mjs +44 -36
  285. package/fesm2020/icon.mjs.map +1 -1
  286. package/fesm2020/input.mjs +19 -9
  287. package/fesm2020/input.mjs.map +1 -1
  288. package/fesm2020/list.mjs +28 -28
  289. package/fesm2020/list.mjs.map +1 -1
  290. package/fesm2020/menu.mjs +120 -99
  291. package/fesm2020/menu.mjs.map +1 -1
  292. package/fesm2020/paginator.mjs +18 -14
  293. package/fesm2020/paginator.mjs.map +1 -1
  294. package/fesm2020/progress-bar.mjs +7 -7
  295. package/fesm2020/progress-bar.mjs.map +1 -1
  296. package/fesm2020/progress-spinner.mjs +30 -60
  297. package/fesm2020/progress-spinner.mjs.map +1 -1
  298. package/fesm2020/radio.mjs +17 -17
  299. package/fesm2020/radio.mjs.map +1 -1
  300. package/fesm2020/select.mjs +28 -16
  301. package/fesm2020/select.mjs.map +1 -1
  302. package/fesm2020/sidenav.mjs +29 -30
  303. package/fesm2020/sidenav.mjs.map +1 -1
  304. package/fesm2020/slide-toggle.mjs +14 -14
  305. package/fesm2020/slide-toggle.mjs.map +1 -1
  306. package/fesm2020/slider.mjs +7 -7
  307. package/fesm2020/slider.mjs.map +1 -1
  308. package/fesm2020/snack-bar.mjs +16 -16
  309. package/fesm2020/snack-bar.mjs.map +1 -1
  310. package/fesm2020/sort.mjs +24 -16
  311. package/fesm2020/sort.mjs.map +1 -1
  312. package/fesm2020/stepper.mjs +37 -90
  313. package/fesm2020/stepper.mjs.map +1 -1
  314. package/fesm2020/table.mjs +55 -55
  315. package/fesm2020/table.mjs.map +1 -1
  316. package/fesm2020/tabs.mjs +95 -65
  317. package/fesm2020/tabs.mjs.map +1 -1
  318. package/fesm2020/toolbar.mjs +10 -10
  319. package/fesm2020/toolbar.mjs.map +1 -1
  320. package/fesm2020/tooltip.mjs +44 -21
  321. package/fesm2020/tooltip.mjs.map +1 -1
  322. package/fesm2020/tree.mjs +25 -25
  323. package/fesm2020/tree.mjs.map +1 -1
  324. package/form-field/form-field.d.ts +9 -5
  325. package/icon/icon-registry.d.ts +7 -9
  326. package/icon/icon.d.ts +12 -3
  327. package/icon/testing/fake-icon-registry.d.ts +1 -1
  328. package/input/input.d.ts +11 -1
  329. package/menu/menu-errors.d.ts +0 -5
  330. package/menu/menu-item.d.ts +3 -2
  331. package/menu/menu-trigger.d.ts +21 -11
  332. package/menu/menu.d.ts +7 -2
  333. package/package.json +7 -7
  334. package/paginator/paginator.d.ts +12 -1
  335. package/prebuilt-themes/deeppurple-amber.css +1 -1
  336. package/prebuilt-themes/indigo-pink.css +1 -1
  337. package/prebuilt-themes/pink-bluegrey.css +1 -1
  338. package/prebuilt-themes/purple-green.css +1 -1
  339. package/progress-spinner/progress-spinner-module.d.ts +1 -1
  340. package/progress-spinner/progress-spinner.d.ts +4 -19
  341. package/progress-spinner/public-api.d.ts +8 -1
  342. package/schematics/migration.json +5 -0
  343. package/schematics/ng-add/index.js +2 -2
  344. package/schematics/ng-add/index.mjs +2 -2
  345. package/schematics/ng-add/schema.d.ts +2 -2
  346. package/schematics/ng-add/schema.js +1 -1
  347. package/schematics/ng-add/schema.json +12 -4
  348. package/schematics/ng-add/schema.mjs +1 -1
  349. package/schematics/ng-add/setup-project.js +7 -5
  350. package/schematics/ng-add/setup-project.mjs +7 -5
  351. package/schematics/ng-update/data/constructor-checks.js +5 -1
  352. package/schematics/ng-update/data/constructor-checks.mjs +5 -1
  353. package/schematics/ng-update/index.d.ts +2 -0
  354. package/schematics/ng-update/index.js +7 -2
  355. package/schematics/ng-update/index.mjs +7 -2
  356. package/schematics/ng-update/migrations/hammer-gestures-v9/hammer-gestures-migration.js +4 -4
  357. package/schematics/ng-update/migrations/hammer-gestures-v9/hammer-gestures-migration.mjs +4 -4
  358. package/schematics/ng-update/migrations/hammer-gestures-v9/import-manager.js +13 -13
  359. package/schematics/ng-update/migrations/hammer-gestures-v9/import-manager.mjs +13 -13
  360. package/schematics/ng-update/migrations/package-imports-v8/secondary-entry-points-migration.js +2 -13
  361. package/schematics/ng-update/migrations/package-imports-v8/secondary-entry-points-migration.mjs +2 -13
  362. package/select/select.d.ts +11 -0
  363. package/sidenav/sidenav-module.d.ts +2 -3
  364. package/sort/sort-header.d.ts +4 -4
  365. package/sort/sort.d.ts +4 -0
  366. package/stepper/stepper-module.d.ts +1 -1
  367. package/stepper/stepper.d.ts +2 -35
  368. package/tabs/paginated-tab-header.d.ts +4 -2
  369. package/tabs/tab-group.d.ts +6 -2
  370. package/tooltip/tooltip.d.ts +13 -1
package/fesm2020/menu.mjs CHANGED
@@ -145,9 +145,9 @@ class _MatMenuContentBase {
145
145
  }
146
146
  }
147
147
  }
148
- _MatMenuContentBase.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: _MatMenuContentBase, 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 });
149
- _MatMenuContentBase.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.2.0", type: _MatMenuContentBase, ngImport: i0 });
150
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: _MatMenuContentBase, decorators: [{
148
+ _MatMenuContentBase.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.0-next.4", ngImport: i0, type: _MatMenuContentBase, 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 });
149
+ _MatMenuContentBase.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "14.0.0-next.4", type: _MatMenuContentBase, ngImport: i0 });
150
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.0-next.4", ngImport: i0, type: _MatMenuContentBase, decorators: [{
151
151
  type: Directive
152
152
  }], ctorParameters: function () { return [{ type: i0.TemplateRef }, { type: i0.ComponentFactoryResolver }, { type: i0.ApplicationRef }, { type: i0.Injector }, { type: i0.ViewContainerRef }, { type: undefined, decorators: [{
153
153
  type: Inject,
@@ -158,9 +158,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.0", ngImpor
158
158
  */
159
159
  class MatMenuContent extends _MatMenuContentBase {
160
160
  }
161
- MatMenuContent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: MatMenuContent, deps: null, target: i0.ɵɵFactoryTarget.Directive });
162
- MatMenuContent.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.2.0", type: MatMenuContent, selector: "ng-template[matMenuContent]", providers: [{ provide: MAT_MENU_CONTENT, useExisting: MatMenuContent }], usesInheritance: true, ngImport: i0 });
163
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: MatMenuContent, decorators: [{
161
+ MatMenuContent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.0-next.4", ngImport: i0, type: MatMenuContent, deps: null, target: i0.ɵɵFactoryTarget.Directive });
162
+ MatMenuContent.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "14.0.0-next.4", type: MatMenuContent, selector: "ng-template[matMenuContent]", providers: [{ provide: MAT_MENU_CONTENT, useExisting: MatMenuContent }], usesInheritance: true, ngImport: i0 });
163
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.0-next.4", ngImport: i0, type: MatMenuContent, decorators: [{
164
164
  type: Directive,
165
165
  args: [{
166
166
  selector: 'ng-template[matMenuContent]',
@@ -175,17 +175,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.0", ngImpor
175
175
  * Use of this source code is governed by an MIT-style license that can be
176
176
  * found in the LICENSE file at https://angular.io/license
177
177
  */
178
- /**
179
- * Throws an exception for the case when menu trigger doesn't have a valid mat-menu instance
180
- * @docs-private
181
- */
182
- function throwMatMenuMissingError() {
183
- throw Error(`matMenuTriggerFor: must pass in an mat-menu instance.
184
-
185
- Example:
186
- <mat-menu #menu="matMenu"></mat-menu>
187
- <button [matMenuTriggerFor]="menu"></button>`);
188
- }
189
178
  /**
190
179
  * Throws an exception for the case when menu's x-position value isn't valid.
191
180
  * In other words, it doesn't match 'before' or 'after'.
@@ -245,6 +234,7 @@ class MatMenuItem extends _MatMenuItemBase {
245
234
  constructor(_elementRef, _document, _focusMonitor, _parentMenu, _changeDetectorRef) {
246
235
  super();
247
236
  this._elementRef = _elementRef;
237
+ this._document = _document;
248
238
  this._focusMonitor = _focusMonitor;
249
239
  this._parentMenu = _parentMenu;
250
240
  this._changeDetectorRef = _changeDetectorRef;
@@ -325,10 +315,13 @@ class MatMenuItem extends _MatMenuItemBase {
325
315
  this._highlighted = isHighlighted;
326
316
  this._changeDetectorRef?.markForCheck();
327
317
  }
318
+ _hasFocus() {
319
+ return this._document && this._document.activeElement === this._getHostElement();
320
+ }
328
321
  }
329
- MatMenuItem.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.0", 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 });
330
- MatMenuItem.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.0", type: MatMenuItem, selector: "[mat-menu-item]", inputs: { disabled: "disabled", disableRipple: "disableRipple", role: "role" }, host: { listeners: { "click": "_checkDisabled($event)", "mouseenter": "_handleMouseEnter()" }, properties: { "attr.role": "role", "class.mat-menu-item": "true", "class.mat-menu-item-highlighted": "_highlighted", "class.mat-menu-item-submenu-trigger": "_triggersSubmenu", "attr.tabindex": "_getTabIndex()", "attr.aria-disabled": "disabled.toString()", "attr.disabled": "disabled || null" }, classAttribute: "mat-focus-indicator" }, exportAs: ["matMenuItem"], usesInheritance: true, ngImport: i0, template: "<ng-content></ng-content>\n<div class=\"mat-menu-ripple\" matRipple\n [matRippleDisabled]=\"disableRipple || disabled\"\n [matRippleTrigger]=\"_getHostElement()\">\n</div>\n\n<svg\n *ngIf=\"_triggersSubmenu\"\n class=\"mat-menu-submenu-icon\"\n viewBox=\"0 0 5 10\"\n focusable=\"false\"><polygon points=\"0,0 5,5 0,10\"/></svg>\n", directives: [{ type: i2.MatRipple, selector: "[mat-ripple], [matRipple]", inputs: ["matRippleColor", "matRippleUnbounded", "matRippleCentered", "matRippleRadius", "matRippleAnimation", "matRippleDisabled", "matRippleTrigger"], exportAs: ["matRipple"] }, { type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
331
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: MatMenuItem, decorators: [{
322
+ MatMenuItem.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.0-next.4", 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 });
323
+ MatMenuItem.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "14.0.0-next.4", type: MatMenuItem, selector: "[mat-menu-item]", inputs: { disabled: "disabled", disableRipple: "disableRipple", role: "role" }, host: { listeners: { "click": "_checkDisabled($event)", "mouseenter": "_handleMouseEnter()" }, properties: { "attr.role": "role", "class.mat-menu-item": "true", "class.mat-menu-item-highlighted": "_highlighted", "class.mat-menu-item-submenu-trigger": "_triggersSubmenu", "attr.tabindex": "_getTabIndex()", "attr.aria-disabled": "disabled.toString()", "attr.disabled": "disabled || null" }, classAttribute: "mat-focus-indicator" }, exportAs: ["matMenuItem"], usesInheritance: true, ngImport: i0, template: "<ng-content></ng-content>\n<div class=\"mat-menu-ripple\" matRipple\n [matRippleDisabled]=\"disableRipple || disabled\"\n [matRippleTrigger]=\"_getHostElement()\">\n</div>\n\n<svg\n *ngIf=\"_triggersSubmenu\"\n class=\"mat-menu-submenu-icon\"\n viewBox=\"0 0 5 10\"\n focusable=\"false\"><polygon points=\"0,0 5,5 0,10\"/></svg>\n", directives: [{ type: i2.MatRipple, selector: "[mat-ripple], [matRipple]", inputs: ["matRippleColor", "matRippleUnbounded", "matRippleCentered", "matRippleRadius", "matRippleAnimation", "matRippleDisabled", "matRippleTrigger"], exportAs: ["matRipple"] }, { type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
324
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.0-next.4", ngImport: i0, type: MatMenuItem, decorators: [{
332
325
  type: Component,
333
326
  args: [{ selector: '[mat-menu-item]', exportAs: 'matMenuItem', inputs: ['disabled', 'disableRipple'], host: {
334
327
  '[attr.role]': 'role',
@@ -378,10 +371,13 @@ function MAT_MENU_DEFAULT_OPTIONS_FACTORY() {
378
371
  let menuPanelUid = 0;
379
372
  /** Base class with all of the `MatMenu` functionality. */
380
373
  class _MatMenuBase {
381
- constructor(_elementRef, _ngZone, _defaultOptions) {
374
+ constructor(_elementRef, _ngZone, _defaultOptions,
375
+ // @breaking-change 15.0.0 `_changeDetectorRef` to become a required parameter.
376
+ _changeDetectorRef) {
382
377
  this._elementRef = _elementRef;
383
378
  this._ngZone = _ngZone;
384
379
  this._defaultOptions = _defaultOptions;
380
+ this._changeDetectorRef = _changeDetectorRef;
385
381
  this._xPosition = this._defaultOptions.xPosition;
386
382
  this._yPosition = this._defaultOptions.yPosition;
387
383
  /** Only the direct descendant menu items. */
@@ -498,6 +494,22 @@ class _MatMenuBase {
498
494
  this._directDescendantItems.changes
499
495
  .pipe(startWith(this._directDescendantItems), switchMap(items => merge(...items.map((item) => item._focused))))
500
496
  .subscribe(focusedItem => this._keyManager.updateActiveItem(focusedItem));
497
+ this._directDescendantItems.changes.subscribe((itemsList) => {
498
+ // Move focus to another item, if the active item is removed from the list.
499
+ // We need to debounce the callback, because multiple items might be removed
500
+ // in quick succession.
501
+ const manager = this._keyManager;
502
+ if (this._panelAnimationState === 'enter' && manager.activeItem?._hasFocus()) {
503
+ const items = itemsList.toArray();
504
+ const index = Math.max(0, Math.min(items.length - 1, manager.activeItemIndex || 0));
505
+ if (items[index] && !items[index].disabled) {
506
+ manager.setActiveItem(index);
507
+ }
508
+ else {
509
+ manager.setNextItemActive();
510
+ }
511
+ }
512
+ });
501
513
  }
502
514
  ngOnDestroy() {
503
515
  this._directDescendantItems.destroy();
@@ -636,6 +648,8 @@ class _MatMenuBase {
636
648
  classes['mat-menu-after'] = posX === 'after';
637
649
  classes['mat-menu-above'] = posY === 'above';
638
650
  classes['mat-menu-below'] = posY === 'below';
651
+ // @breaking-change 15.0.0 Remove null check for `_changeDetectorRef`.
652
+ this._changeDetectorRef?.markForCheck();
639
653
  }
640
654
  /** Starts the enter animation. */
641
655
  _startAnimation() {
@@ -679,14 +693,14 @@ class _MatMenuBase {
679
693
  });
680
694
  }
681
695
  }
682
- _MatMenuBase.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: _MatMenuBase, deps: [{ token: i0.ElementRef }, { token: i0.NgZone }, { token: MAT_MENU_DEFAULT_OPTIONS }], target: i0.ɵɵFactoryTarget.Directive });
683
- _MatMenuBase.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.2.0", type: _MatMenuBase, inputs: { backdropClass: "backdropClass", ariaLabel: ["aria-label", "ariaLabel"], ariaLabelledby: ["aria-labelledby", "ariaLabelledby"], ariaDescribedby: ["aria-describedby", "ariaDescribedby"], xPosition: "xPosition", yPosition: "yPosition", overlapTrigger: "overlapTrigger", hasBackdrop: "hasBackdrop", panelClass: ["class", "panelClass"], classList: "classList" }, outputs: { closed: "closed", close: "close" }, 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 }], ngImport: i0 });
684
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: _MatMenuBase, decorators: [{
696
+ _MatMenuBase.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.0-next.4", ngImport: i0, type: _MatMenuBase, deps: [{ token: i0.ElementRef }, { token: i0.NgZone }, { token: MAT_MENU_DEFAULT_OPTIONS }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Directive });
697
+ _MatMenuBase.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "14.0.0-next.4", type: _MatMenuBase, inputs: { backdropClass: "backdropClass", ariaLabel: ["aria-label", "ariaLabel"], ariaLabelledby: ["aria-labelledby", "ariaLabelledby"], ariaDescribedby: ["aria-describedby", "ariaDescribedby"], xPosition: "xPosition", yPosition: "yPosition", overlapTrigger: "overlapTrigger", hasBackdrop: "hasBackdrop", panelClass: ["class", "panelClass"], classList: "classList" }, outputs: { closed: "closed", close: "close" }, 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 }], ngImport: i0 });
698
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.0-next.4", ngImport: i0, type: _MatMenuBase, decorators: [{
685
699
  type: Directive
686
700
  }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.NgZone }, { type: undefined, decorators: [{
687
701
  type: Inject,
688
702
  args: [MAT_MENU_DEFAULT_OPTIONS]
689
- }] }]; }, propDecorators: { _allItems: [{
703
+ }] }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { _allItems: [{
690
704
  type: ContentChildren,
691
705
  args: [MatMenuItem, { descendants: true }]
692
706
  }], backdropClass: [{
@@ -729,25 +743,25 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.0", ngImpor
729
743
  }] } });
730
744
  /** @docs-public MatMenu */
731
745
  class MatMenu extends _MatMenuBase {
732
- constructor(elementRef, ngZone, defaultOptions) {
733
- super(elementRef, ngZone, defaultOptions);
746
+ constructor(elementRef, ngZone, defaultOptions, changeDetectorRef) {
747
+ super(elementRef, ngZone, defaultOptions, changeDetectorRef);
734
748
  this._elevationPrefix = 'mat-elevation-z';
735
749
  this._baseElevation = 4;
736
750
  }
737
751
  }
738
- MatMenu.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: MatMenu, deps: [{ token: i0.ElementRef }, { token: i0.NgZone }, { token: MAT_MENU_DEFAULT_OPTIONS }], target: i0.ɵɵFactoryTarget.Component });
739
- MatMenu.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.0", type: MatMenu, selector: "mat-menu", host: { properties: { "attr.aria-label": "null", "attr.aria-labelledby": "null", "attr.aria-describedby": "null" } }, providers: [{ provide: MAT_MENU_PANEL, useExisting: MatMenu }], exportAs: ["matMenu"], usesInheritance: true, ngImport: i0, template: "<ng-template>\n <div\n class=\"mat-menu-panel\"\n [id]=\"panelId\"\n [ngClass]=\"_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-menu-content\">\n <ng-content></ng-content>\n </div>\n </div>\n</ng-template>\n", styles: ["mat-menu{display:none}.mat-menu-panel{min-width:112px;max-width:280px;overflow:auto;-webkit-overflow-scrolling:touch;max-height:calc(100vh - 48px);border-radius:4px;outline:0;min-height:64px}.mat-menu-panel.ng-animating{pointer-events:none}.cdk-high-contrast-active .mat-menu-panel{outline:solid 1px}.mat-menu-content:not(:empty){padding-top:8px;padding-bottom:8px}.mat-menu-item{-webkit-user-select:none;-moz-user-select:none;user-select:none;cursor:pointer;outline:none;border:none;-webkit-tap-highlight-color:transparent;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block;line-height:48px;height:48px;padding:0 16px;text-align:left;text-decoration:none;max-width:100%;position:relative}.mat-menu-item::-moz-focus-inner{border:0}.mat-menu-item[disabled]{cursor:default}[dir=rtl] .mat-menu-item{text-align:right}.mat-menu-item .mat-icon{margin-right:16px;vertical-align:middle}.mat-menu-item .mat-icon svg{vertical-align:top}[dir=rtl] .mat-menu-item .mat-icon{margin-left:16px;margin-right:0}.mat-menu-item[disabled]{pointer-events:none}.cdk-high-contrast-active .mat-menu-item{margin-top:1px}.cdk-high-contrast-active .mat-menu-item.cdk-program-focused,.cdk-high-contrast-active .mat-menu-item.cdk-keyboard-focused,.cdk-high-contrast-active .mat-menu-item-highlighted{outline:dotted 1px}.mat-menu-item-submenu-trigger{padding-right:32px}[dir=rtl] .mat-menu-item-submenu-trigger{padding-right:16px;padding-left:32px}.mat-menu-submenu-icon{position:absolute;top:50%;right:16px;transform:translateY(-50%);width:5px;height:10px;fill:currentColor}[dir=rtl] .mat-menu-submenu-icon{right:auto;left:16px;transform:translateY(-50%) scaleX(-1)}.cdk-high-contrast-active .mat-menu-submenu-icon{fill:CanvasText}button.mat-menu-item{width:100%}.mat-menu-item .mat-menu-ripple{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none}\n"], directives: [{ type: i3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], animations: [matMenuAnimations.transformMenu, matMenuAnimations.fadeInItems], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
740
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: MatMenu, decorators: [{
752
+ MatMenu.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.0-next.4", ngImport: i0, type: MatMenu, deps: [{ token: i0.ElementRef }, { token: i0.NgZone }, { token: MAT_MENU_DEFAULT_OPTIONS }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
753
+ MatMenu.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "14.0.0-next.4", type: MatMenu, selector: "mat-menu", host: { properties: { "attr.aria-label": "null", "attr.aria-labelledby": "null", "attr.aria-describedby": "null" } }, providers: [{ provide: MAT_MENU_PANEL, useExisting: MatMenu }], exportAs: ["matMenu"], usesInheritance: true, ngImport: i0, template: "<ng-template>\n <div\n class=\"mat-menu-panel\"\n [id]=\"panelId\"\n [ngClass]=\"_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-menu-content\">\n <ng-content></ng-content>\n </div>\n </div>\n</ng-template>\n", styles: ["mat-menu{display:none}.mat-menu-panel{min-width:112px;max-width:280px;overflow:auto;-webkit-overflow-scrolling:touch;max-height:calc(100vh - 48px);border-radius:4px;outline:0;min-height:64px;position:relative}.mat-menu-panel.ng-animating{pointer-events:none}.cdk-high-contrast-active .mat-menu-panel{outline:solid 1px}.mat-menu-content:not(:empty){padding-top:8px;padding-bottom:8px}.mat-menu-item{-webkit-user-select:none;-moz-user-select:none;user-select:none;cursor:pointer;outline:none;border:none;-webkit-tap-highlight-color:transparent;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block;line-height:48px;height:48px;padding:0 16px;text-align:left;text-decoration:none;max-width:100%;position:relative}.mat-menu-item::-moz-focus-inner{border:0}.mat-menu-item[disabled]{cursor:default}[dir=rtl] .mat-menu-item{text-align:right}.mat-menu-item .mat-icon{margin-right:16px;vertical-align:middle}.mat-menu-item .mat-icon svg{vertical-align:top}[dir=rtl] .mat-menu-item .mat-icon{margin-left:16px;margin-right:0}.mat-menu-item[disabled]{pointer-events:none}.cdk-high-contrast-active .mat-menu-item{margin-top:1px}.cdk-high-contrast-active .mat-menu-item.cdk-program-focused,.cdk-high-contrast-active .mat-menu-item.cdk-keyboard-focused,.cdk-high-contrast-active .mat-menu-item-highlighted{outline:dotted 1px}.mat-menu-item-submenu-trigger{padding-right:32px}[dir=rtl] .mat-menu-item-submenu-trigger{padding-right:16px;padding-left:32px}.mat-menu-submenu-icon{position:absolute;top:50%;right:16px;transform:translateY(-50%);width:5px;height:10px;fill:currentColor}[dir=rtl] .mat-menu-submenu-icon{right:auto;left:16px;transform:translateY(-50%) scaleX(-1)}.cdk-high-contrast-active .mat-menu-submenu-icon{fill:CanvasText}button.mat-menu-item{width:100%}.mat-menu-item .mat-menu-ripple{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none}\n"], directives: [{ type: i3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], animations: [matMenuAnimations.transformMenu, matMenuAnimations.fadeInItems], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
754
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.0-next.4", ngImport: i0, type: MatMenu, decorators: [{
741
755
  type: Component,
742
756
  args: [{ selector: 'mat-menu', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, exportAs: 'matMenu', host: {
743
757
  '[attr.aria-label]': 'null',
744
758
  '[attr.aria-labelledby]': 'null',
745
759
  '[attr.aria-describedby]': 'null',
746
- }, animations: [matMenuAnimations.transformMenu, matMenuAnimations.fadeInItems], providers: [{ provide: MAT_MENU_PANEL, useExisting: MatMenu }], template: "<ng-template>\n <div\n class=\"mat-menu-panel\"\n [id]=\"panelId\"\n [ngClass]=\"_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-menu-content\">\n <ng-content></ng-content>\n </div>\n </div>\n</ng-template>\n", styles: ["mat-menu{display:none}.mat-menu-panel{min-width:112px;max-width:280px;overflow:auto;-webkit-overflow-scrolling:touch;max-height:calc(100vh - 48px);border-radius:4px;outline:0;min-height:64px}.mat-menu-panel.ng-animating{pointer-events:none}.cdk-high-contrast-active .mat-menu-panel{outline:solid 1px}.mat-menu-content:not(:empty){padding-top:8px;padding-bottom:8px}.mat-menu-item{-webkit-user-select:none;-moz-user-select:none;user-select:none;cursor:pointer;outline:none;border:none;-webkit-tap-highlight-color:transparent;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block;line-height:48px;height:48px;padding:0 16px;text-align:left;text-decoration:none;max-width:100%;position:relative}.mat-menu-item::-moz-focus-inner{border:0}.mat-menu-item[disabled]{cursor:default}[dir=rtl] .mat-menu-item{text-align:right}.mat-menu-item .mat-icon{margin-right:16px;vertical-align:middle}.mat-menu-item .mat-icon svg{vertical-align:top}[dir=rtl] .mat-menu-item .mat-icon{margin-left:16px;margin-right:0}.mat-menu-item[disabled]{pointer-events:none}.cdk-high-contrast-active .mat-menu-item{margin-top:1px}.cdk-high-contrast-active .mat-menu-item.cdk-program-focused,.cdk-high-contrast-active .mat-menu-item.cdk-keyboard-focused,.cdk-high-contrast-active .mat-menu-item-highlighted{outline:dotted 1px}.mat-menu-item-submenu-trigger{padding-right:32px}[dir=rtl] .mat-menu-item-submenu-trigger{padding-right:16px;padding-left:32px}.mat-menu-submenu-icon{position:absolute;top:50%;right:16px;transform:translateY(-50%);width:5px;height:10px;fill:currentColor}[dir=rtl] .mat-menu-submenu-icon{right:auto;left:16px;transform:translateY(-50%) scaleX(-1)}.cdk-high-contrast-active .mat-menu-submenu-icon{fill:CanvasText}button.mat-menu-item{width:100%}.mat-menu-item .mat-menu-ripple{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none}\n"] }]
760
+ }, animations: [matMenuAnimations.transformMenu, matMenuAnimations.fadeInItems], providers: [{ provide: MAT_MENU_PANEL, useExisting: MatMenu }], template: "<ng-template>\n <div\n class=\"mat-menu-panel\"\n [id]=\"panelId\"\n [ngClass]=\"_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-menu-content\">\n <ng-content></ng-content>\n </div>\n </div>\n</ng-template>\n", styles: ["mat-menu{display:none}.mat-menu-panel{min-width:112px;max-width:280px;overflow:auto;-webkit-overflow-scrolling:touch;max-height:calc(100vh - 48px);border-radius:4px;outline:0;min-height:64px;position:relative}.mat-menu-panel.ng-animating{pointer-events:none}.cdk-high-contrast-active .mat-menu-panel{outline:solid 1px}.mat-menu-content:not(:empty){padding-top:8px;padding-bottom:8px}.mat-menu-item{-webkit-user-select:none;-moz-user-select:none;user-select:none;cursor:pointer;outline:none;border:none;-webkit-tap-highlight-color:transparent;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block;line-height:48px;height:48px;padding:0 16px;text-align:left;text-decoration:none;max-width:100%;position:relative}.mat-menu-item::-moz-focus-inner{border:0}.mat-menu-item[disabled]{cursor:default}[dir=rtl] .mat-menu-item{text-align:right}.mat-menu-item .mat-icon{margin-right:16px;vertical-align:middle}.mat-menu-item .mat-icon svg{vertical-align:top}[dir=rtl] .mat-menu-item .mat-icon{margin-left:16px;margin-right:0}.mat-menu-item[disabled]{pointer-events:none}.cdk-high-contrast-active .mat-menu-item{margin-top:1px}.cdk-high-contrast-active .mat-menu-item.cdk-program-focused,.cdk-high-contrast-active .mat-menu-item.cdk-keyboard-focused,.cdk-high-contrast-active .mat-menu-item-highlighted{outline:dotted 1px}.mat-menu-item-submenu-trigger{padding-right:32px}[dir=rtl] .mat-menu-item-submenu-trigger{padding-right:16px;padding-left:32px}.mat-menu-submenu-icon{position:absolute;top:50%;right:16px;transform:translateY(-50%);width:5px;height:10px;fill:currentColor}[dir=rtl] .mat-menu-submenu-icon{right:auto;left:16px;transform:translateY(-50%) scaleX(-1)}.cdk-high-contrast-active .mat-menu-submenu-icon{fill:CanvasText}button.mat-menu-item{width:100%}.mat-menu-item .mat-menu-ripple{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none}\n"] }]
747
761
  }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.NgZone }, { type: undefined, decorators: [{
748
762
  type: Inject,
749
763
  args: [MAT_MENU_DEFAULT_OPTIONS]
750
- }] }]; } });
764
+ }] }, { type: i0.ChangeDetectorRef }]; } });
751
765
 
752
766
  /**
753
767
  * @license
@@ -768,7 +782,11 @@ const MAT_MENU_SCROLL_STRATEGY_FACTORY_PROVIDER = {
768
782
  deps: [Overlay],
769
783
  useFactory: MAT_MENU_SCROLL_STRATEGY_FACTORY,
770
784
  };
771
- /** Default top padding of the menu panel. */
785
+ /**
786
+ * Default top padding of the menu panel.
787
+ * @deprecated No longer being used. Will be removed.
788
+ * @breaking-change 15.0.0
789
+ */
772
790
  const MENU_PANEL_TOP_PADDING = 8;
773
791
  /** Options for binding a passive event listener. */
774
792
  const passiveEventListenerOptions = normalizePassiveListenerOptions({ passive: true });
@@ -777,13 +795,14 @@ class _MatMenuTriggerBase {
777
795
  constructor(_overlay, _element, _viewContainerRef, scrollStrategy, parentMenu,
778
796
  // `MatMenuTrigger` is commonly used in combination with a `MatMenuItem`.
779
797
  // tslint:disable-next-line: lightweight-tokens
780
- _menuItemInstance, _dir, _focusMonitor) {
798
+ _menuItemInstance, _dir, _focusMonitor, _ngZone) {
781
799
  this._overlay = _overlay;
782
800
  this._element = _element;
783
801
  this._viewContainerRef = _viewContainerRef;
784
802
  this._menuItemInstance = _menuItemInstance;
785
803
  this._dir = _dir;
786
804
  this._focusMonitor = _focusMonitor;
805
+ this._ngZone = _ngZone;
787
806
  this._overlayRef = null;
788
807
  this._menuOpen = false;
789
808
  this._closingActionsSubscription = Subscription.EMPTY;
@@ -866,7 +885,6 @@ class _MatMenuTriggerBase {
866
885
  }
867
886
  }
868
887
  ngAfterContentInit() {
869
- this._checkMenu();
870
888
  this._handleHover();
871
889
  }
872
890
  ngOnDestroy() {
@@ -897,25 +915,25 @@ class _MatMenuTriggerBase {
897
915
  }
898
916
  /** Opens the menu. */
899
917
  openMenu() {
900
- if (this._menuOpen) {
918
+ const menu = this.menu;
919
+ if (this._menuOpen || !menu) {
901
920
  return;
902
921
  }
903
- this._checkMenu();
904
- const overlayRef = this._createOverlay();
922
+ const overlayRef = this._createOverlay(menu);
905
923
  const overlayConfig = overlayRef.getConfig();
906
924
  const positionStrategy = overlayConfig.positionStrategy;
907
- this._setPosition(positionStrategy);
925
+ this._setPosition(menu, positionStrategy);
908
926
  overlayConfig.hasBackdrop =
909
- this.menu.hasBackdrop == null ? !this.triggersSubmenu() : this.menu.hasBackdrop;
910
- overlayRef.attach(this._getPortal());
911
- if (this.menu.lazyContent) {
912
- this.menu.lazyContent.attach(this.menuData);
927
+ menu.hasBackdrop == null ? !this.triggersSubmenu() : menu.hasBackdrop;
928
+ overlayRef.attach(this._getPortal(menu));
929
+ if (menu.lazyContent) {
930
+ menu.lazyContent.attach(this.menuData);
913
931
  }
914
932
  this._closingActionsSubscription = this._menuClosingActions().subscribe(() => this.closeMenu());
915
- this._initMenu();
916
- if (this.menu instanceof _MatMenuBase) {
917
- this.menu._startAnimation();
918
- this.menu._directDescendantItems.changes.pipe(takeUntil(this.menu.close)).subscribe(() => {
933
+ this._initMenu(menu);
934
+ if (menu instanceof _MatMenuBase) {
935
+ menu._startAnimation();
936
+ menu._directDescendantItems.changes.pipe(takeUntil(menu.close)).subscribe(() => {
919
937
  // Re-adjust the position without locking when the amount of items
920
938
  // changes so that the overlay is allowed to pick a new optimal position.
921
939
  positionStrategy.withLockedPosition(false).reapplyLastPosition();
@@ -925,7 +943,7 @@ class _MatMenuTriggerBase {
925
943
  }
926
944
  /** Closes the menu. */
927
945
  closeMenu() {
928
- this.menu.close.emit();
946
+ this.menu?.close.emit();
929
947
  }
930
948
  /**
931
949
  * Focuses the menu trigger.
@@ -981,32 +999,30 @@ class _MatMenuTriggerBase {
981
999
  }
982
1000
  else {
983
1001
  this._setIsMenuOpen(false);
984
- if (menu.lazyContent) {
985
- menu.lazyContent.detach();
986
- }
1002
+ menu?.lazyContent?.detach();
987
1003
  }
988
1004
  }
989
1005
  /**
990
1006
  * This method sets the menu state to open and focuses the first item if
991
1007
  * the menu was opened via the keyboard.
992
1008
  */
993
- _initMenu() {
994
- this.menu.parentMenu = this.triggersSubmenu() ? this._parentMaterialMenu : undefined;
995
- this.menu.direction = this.dir;
996
- this._setMenuElevation();
997
- this.menu.focusFirstItem(this._openedBy || 'program');
1009
+ _initMenu(menu) {
1010
+ menu.parentMenu = this.triggersSubmenu() ? this._parentMaterialMenu : undefined;
1011
+ menu.direction = this.dir;
1012
+ this._setMenuElevation(menu);
1013
+ menu.focusFirstItem(this._openedBy || 'program');
998
1014
  this._setIsMenuOpen(true);
999
1015
  }
1000
1016
  /** Updates the menu elevation based on the amount of parent menus that it has. */
1001
- _setMenuElevation() {
1002
- if (this.menu.setElevation) {
1017
+ _setMenuElevation(menu) {
1018
+ if (menu.setElevation) {
1003
1019
  let depth = 0;
1004
- let parentMenu = this.menu.parentMenu;
1020
+ let parentMenu = menu.parentMenu;
1005
1021
  while (parentMenu) {
1006
1022
  depth++;
1007
1023
  parentMenu = parentMenu.parentMenu;
1008
1024
  }
1009
- this.menu.setElevation(depth);
1025
+ menu.setElevation(depth);
1010
1026
  }
1011
1027
  }
1012
1028
  // set state rather than toggle to support triggers sharing a menu
@@ -1017,23 +1033,14 @@ class _MatMenuTriggerBase {
1017
1033
  this._menuItemInstance._setHighlighted(isOpen);
1018
1034
  }
1019
1035
  }
1020
- /**
1021
- * This method checks that a valid instance of MatMenu has been passed into
1022
- * matMenuTriggerFor. If not, an exception is thrown.
1023
- */
1024
- _checkMenu() {
1025
- if (!this.menu && (typeof ngDevMode === 'undefined' || ngDevMode)) {
1026
- throwMatMenuMissingError();
1027
- }
1028
- }
1029
1036
  /**
1030
1037
  * This method creates the overlay from the provided menu's template and saves its
1031
1038
  * OverlayRef so that it can be attached to the DOM when openMenu is called.
1032
1039
  */
1033
- _createOverlay() {
1040
+ _createOverlay(menu) {
1034
1041
  if (!this._overlayRef) {
1035
- const config = this._getOverlayConfig();
1036
- this._subscribeToPositions(config.positionStrategy);
1042
+ const config = this._getOverlayConfig(menu);
1043
+ this._subscribeToPositions(menu, config.positionStrategy);
1037
1044
  this._overlayRef = this._overlay.create(config);
1038
1045
  // Consume the `keydownEvents` in order to prevent them from going to another overlay.
1039
1046
  // Ideally we'd also have our keyboard event logic in here, however doing so will
@@ -1046,7 +1053,7 @@ class _MatMenuTriggerBase {
1046
1053
  * This method builds the configuration object needed to create the overlay, the OverlayState.
1047
1054
  * @returns OverlayConfig
1048
1055
  */
1049
- _getOverlayConfig() {
1056
+ _getOverlayConfig(menu) {
1050
1057
  return new OverlayConfig({
1051
1058
  positionStrategy: this._overlay
1052
1059
  .position()
@@ -1054,8 +1061,8 @@ class _MatMenuTriggerBase {
1054
1061
  .withLockedPosition()
1055
1062
  .withGrowAfterOpen()
1056
1063
  .withTransformOriginOn('.mat-menu-panel, .mat-mdc-menu-panel'),
1057
- backdropClass: this.menu.backdropClass || 'cdk-overlay-transparent-backdrop',
1058
- panelClass: this.menu.overlayPanelClass,
1064
+ backdropClass: menu.backdropClass || 'cdk-overlay-transparent-backdrop',
1065
+ panelClass: menu.overlayPanelClass,
1059
1066
  scrollStrategy: this._scrollStrategy(),
1060
1067
  direction: this._dir,
1061
1068
  });
@@ -1065,12 +1072,20 @@ class _MatMenuTriggerBase {
1065
1072
  * on the menu based on the new position. This ensures the animation origin is always
1066
1073
  * correct, even if a fallback position is used for the overlay.
1067
1074
  */
1068
- _subscribeToPositions(position) {
1069
- if (this.menu.setPositionClasses) {
1075
+ _subscribeToPositions(menu, position) {
1076
+ if (menu.setPositionClasses) {
1070
1077
  position.positionChanges.subscribe(change => {
1071
1078
  const posX = change.connectionPair.overlayX === 'start' ? 'after' : 'before';
1072
1079
  const posY = change.connectionPair.overlayY === 'top' ? 'below' : 'above';
1073
- this.menu.setPositionClasses(posX, posY);
1080
+ // @breaking-change 15.0.0 Remove null check for `ngZone`.
1081
+ // `positionChanges` fires outside of the `ngZone` and `setPositionClasses` might be
1082
+ // updating something in the view so we need to bring it back in.
1083
+ if (this._ngZone) {
1084
+ this._ngZone.run(() => menu.setPositionClasses(posX, posY));
1085
+ }
1086
+ else {
1087
+ menu.setPositionClasses(posX, posY);
1088
+ }
1074
1089
  });
1075
1090
  }
1076
1091
  }
@@ -1079,20 +1094,26 @@ class _MatMenuTriggerBase {
1079
1094
  * so the overlay connects with the trigger correctly.
1080
1095
  * @param positionStrategy Strategy whose position to update.
1081
1096
  */
1082
- _setPosition(positionStrategy) {
1083
- let [originX, originFallbackX] = this.menu.xPosition === 'before' ? ['end', 'start'] : ['start', 'end'];
1084
- let [overlayY, overlayFallbackY] = this.menu.yPosition === 'above' ? ['bottom', 'top'] : ['top', 'bottom'];
1097
+ _setPosition(menu, positionStrategy) {
1098
+ let [originX, originFallbackX] = menu.xPosition === 'before' ? ['end', 'start'] : ['start', 'end'];
1099
+ let [overlayY, overlayFallbackY] = menu.yPosition === 'above' ? ['bottom', 'top'] : ['top', 'bottom'];
1085
1100
  let [originY, originFallbackY] = [overlayY, overlayFallbackY];
1086
1101
  let [overlayX, overlayFallbackX] = [originX, originFallbackX];
1087
1102
  let offsetY = 0;
1088
1103
  if (this.triggersSubmenu()) {
1089
1104
  // When the menu is a sub-menu, it should always align itself
1090
1105
  // to the edges of the trigger, instead of overlapping it.
1091
- overlayFallbackX = originX = this.menu.xPosition === 'before' ? 'start' : 'end';
1106
+ overlayFallbackX = originX = menu.xPosition === 'before' ? 'start' : 'end';
1092
1107
  originFallbackX = overlayX = originX === 'end' ? 'start' : 'end';
1093
- offsetY = overlayY === 'bottom' ? MENU_PANEL_TOP_PADDING : -MENU_PANEL_TOP_PADDING;
1108
+ if (this._parentMaterialMenu) {
1109
+ if (this._parentInnerPadding == null) {
1110
+ const firstItem = this._parentMaterialMenu.items.first;
1111
+ this._parentInnerPadding = firstItem ? firstItem._getHostElement().offsetTop : 0;
1112
+ }
1113
+ offsetY = overlayY === 'bottom' ? this._parentInnerPadding : -this._parentInnerPadding;
1114
+ }
1094
1115
  }
1095
- else if (!this.menu.overlapTrigger) {
1116
+ else if (!menu.overlapTrigger) {
1096
1117
  originY = overlayY === 'top' ? 'bottom' : 'top';
1097
1118
  originFallbackY = overlayFallbackY === 'top' ? 'bottom' : 'top';
1098
1119
  }
@@ -1194,23 +1215,23 @@ class _MatMenuTriggerBase {
1194
1215
  });
1195
1216
  }
1196
1217
  /** Gets the portal that should be attached to the overlay. */
1197
- _getPortal() {
1218
+ _getPortal(menu) {
1198
1219
  // Note that we can avoid this check by keeping the portal on the menu panel.
1199
1220
  // While it would be cleaner, we'd have to introduce another required method on
1200
1221
  // `MatMenuPanel`, making it harder to consume.
1201
- if (!this._portal || this._portal.templateRef !== this.menu.templateRef) {
1202
- this._portal = new TemplatePortal(this.menu.templateRef, this._viewContainerRef);
1222
+ if (!this._portal || this._portal.templateRef !== menu.templateRef) {
1223
+ this._portal = new TemplatePortal(menu.templateRef, this._viewContainerRef);
1203
1224
  }
1204
1225
  return this._portal;
1205
1226
  }
1206
1227
  }
1207
- _MatMenuTriggerBase.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: _MatMenuTriggerBase, 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$1.Directionality, optional: true }, { token: i1.FocusMonitor }], target: i0.ɵɵFactoryTarget.Directive });
1208
- _MatMenuTriggerBase.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.2.0", type: _MatMenuTriggerBase, 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: { attributes: { "aria-haspopup": "true" }, listeners: { "click": "_handleClick($event)", "mousedown": "_handleMousedown($event)", "keydown": "_handleKeydown($event)" }, properties: { "attr.aria-expanded": "menuOpen || null", "attr.aria-controls": "menuOpen ? menu.panelId : null" } }, ngImport: i0 });
1209
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: _MatMenuTriggerBase, decorators: [{
1228
+ _MatMenuTriggerBase.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.0-next.4", ngImport: i0, type: _MatMenuTriggerBase, 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$1.Directionality, optional: true }, { token: i1.FocusMonitor }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Directive });
1229
+ _MatMenuTriggerBase.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "14.0.0-next.4", type: _MatMenuTriggerBase, 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 || null", "attr.aria-controls": "menuOpen ? menu.panelId : null" } }, ngImport: i0 });
1230
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.0-next.4", ngImport: i0, type: _MatMenuTriggerBase, decorators: [{
1210
1231
  type: Directive,
1211
1232
  args: [{
1212
1233
  host: {
1213
- 'aria-haspopup': 'true',
1234
+ '[attr.aria-haspopup]': 'menu ? "menu" : null',
1214
1235
  '[attr.aria-expanded]': 'menuOpen || null',
1215
1236
  '[attr.aria-controls]': 'menuOpen ? menu.panelId : null',
1216
1237
  '(click)': '_handleClick($event)',
@@ -1232,7 +1253,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.0", ngImpor
1232
1253
  type: Self
1233
1254
  }] }, { type: i3$1.Directionality, decorators: [{
1234
1255
  type: Optional
1235
- }] }, { type: i1.FocusMonitor }]; }, propDecorators: { _deprecatedMatMenuTriggerFor: [{
1256
+ }] }, { type: i1.FocusMonitor }, { type: i0.NgZone }]; }, propDecorators: { _deprecatedMatMenuTriggerFor: [{
1236
1257
  type: Input,
1237
1258
  args: ['mat-menu-trigger-for']
1238
1259
  }], menu: [{
@@ -1256,9 +1277,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.0", ngImpor
1256
1277
  /** Directive applied to an element that should trigger a `mat-menu`. */
1257
1278
  class MatMenuTrigger extends _MatMenuTriggerBase {
1258
1279
  }
1259
- MatMenuTrigger.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: MatMenuTrigger, deps: null, target: i0.ɵɵFactoryTarget.Directive });
1260
- MatMenuTrigger.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.2.0", type: MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", host: { classAttribute: "mat-menu-trigger" }, exportAs: ["matMenuTrigger"], usesInheritance: true, ngImport: i0 });
1261
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: MatMenuTrigger, decorators: [{
1280
+ MatMenuTrigger.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.0-next.4", ngImport: i0, type: MatMenuTrigger, deps: null, target: i0.ɵɵFactoryTarget.Directive });
1281
+ MatMenuTrigger.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "14.0.0-next.4", type: MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", host: { classAttribute: "mat-menu-trigger" }, exportAs: ["matMenuTrigger"], usesInheritance: true, ngImport: i0 });
1282
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.0-next.4", ngImport: i0, type: MatMenuTrigger, decorators: [{
1262
1283
  type: Directive,
1263
1284
  args: [{
1264
1285
  selector: `[mat-menu-trigger-for], [matMenuTriggerFor]`,
@@ -1278,16 +1299,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.0", ngImpor
1278
1299
  */
1279
1300
  class MatMenuModule {
1280
1301
  }
1281
- MatMenuModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: MatMenuModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1282
- MatMenuModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: MatMenuModule, declarations: [MatMenu, MatMenuItem, MatMenuTrigger, MatMenuContent], imports: [CommonModule, MatCommonModule, MatRippleModule, OverlayModule], exports: [CdkScrollableModule,
1302
+ MatMenuModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.0-next.4", ngImport: i0, type: MatMenuModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1303
+ MatMenuModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "14.0.0-next.4", ngImport: i0, type: MatMenuModule, declarations: [MatMenu, MatMenuItem, MatMenuTrigger, MatMenuContent], imports: [CommonModule, MatCommonModule, MatRippleModule, OverlayModule], exports: [CdkScrollableModule,
1283
1304
  MatCommonModule,
1284
1305
  MatMenu,
1285
1306
  MatMenuItem,
1286
1307
  MatMenuTrigger,
1287
1308
  MatMenuContent] });
1288
- MatMenuModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: MatMenuModule, providers: [MAT_MENU_SCROLL_STRATEGY_FACTORY_PROVIDER], imports: [[CommonModule, MatCommonModule, MatRippleModule, OverlayModule], CdkScrollableModule,
1309
+ MatMenuModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.0.0-next.4", ngImport: i0, type: MatMenuModule, providers: [MAT_MENU_SCROLL_STRATEGY_FACTORY_PROVIDER], imports: [[CommonModule, MatCommonModule, MatRippleModule, OverlayModule], CdkScrollableModule,
1289
1310
  MatCommonModule] });
1290
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: MatMenuModule, decorators: [{
1311
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.0-next.4", ngImport: i0, type: MatMenuModule, decorators: [{
1291
1312
  type: NgModule,
1292
1313
  args: [{
1293
1314
  imports: [CommonModule, MatCommonModule, MatRippleModule, OverlayModule],