@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/fesm2015/menu.mjs CHANGED
@@ -146,9 +146,9 @@ class _MatMenuContentBase {
146
146
  }
147
147
  }
148
148
  }
149
- _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 });
150
- _MatMenuContentBase.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.2.0", type: _MatMenuContentBase, ngImport: i0 });
151
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: _MatMenuContentBase, decorators: [{
149
+ _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 });
150
+ _MatMenuContentBase.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "14.0.0-next.4", type: _MatMenuContentBase, ngImport: i0 });
151
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.0-next.4", ngImport: i0, type: _MatMenuContentBase, decorators: [{
152
152
  type: Directive
153
153
  }], ctorParameters: function () {
154
154
  return [{ type: i0.TemplateRef }, { type: i0.ComponentFactoryResolver }, { type: i0.ApplicationRef }, { type: i0.Injector }, { type: i0.ViewContainerRef }, { type: undefined, decorators: [{
@@ -161,9 +161,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.0", ngImpor
161
161
  */
162
162
  class MatMenuContent extends _MatMenuContentBase {
163
163
  }
164
- MatMenuContent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: MatMenuContent, deps: null, target: i0.ɵɵFactoryTarget.Directive });
165
- 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 });
166
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: MatMenuContent, decorators: [{
164
+ MatMenuContent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.0-next.4", ngImport: i0, type: MatMenuContent, deps: null, target: i0.ɵɵFactoryTarget.Directive });
165
+ 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 });
166
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.0-next.4", ngImport: i0, type: MatMenuContent, decorators: [{
167
167
  type: Directive,
168
168
  args: [{
169
169
  selector: 'ng-template[matMenuContent]',
@@ -178,17 +178,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.0", ngImpor
178
178
  * Use of this source code is governed by an MIT-style license that can be
179
179
  * found in the LICENSE file at https://angular.io/license
180
180
  */
181
- /**
182
- * Throws an exception for the case when menu trigger doesn't have a valid mat-menu instance
183
- * @docs-private
184
- */
185
- function throwMatMenuMissingError() {
186
- throw Error(`matMenuTriggerFor: must pass in an mat-menu instance.
187
-
188
- Example:
189
- <mat-menu #menu="matMenu"></mat-menu>
190
- <button [matMenuTriggerFor]="menu"></button>`);
191
- }
192
181
  /**
193
182
  * Throws an exception for the case when menu's x-position value isn't valid.
194
183
  * In other words, it doesn't match 'before' or 'after'.
@@ -242,6 +231,7 @@ class MatMenuItem extends _MatMenuItemBase {
242
231
  var _a;
243
232
  super();
244
233
  this._elementRef = _elementRef;
234
+ this._document = _document;
245
235
  this._focusMonitor = _focusMonitor;
246
236
  this._parentMenu = _parentMenu;
247
237
  this._changeDetectorRef = _changeDetectorRef;
@@ -324,10 +314,13 @@ class MatMenuItem extends _MatMenuItemBase {
324
314
  this._highlighted = isHighlighted;
325
315
  (_a = this._changeDetectorRef) === null || _a === void 0 ? void 0 : _a.markForCheck();
326
316
  }
317
+ _hasFocus() {
318
+ return this._document && this._document.activeElement === this._getHostElement();
319
+ }
327
320
  }
328
- 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 });
329
- 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 });
330
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: MatMenuItem, decorators: [{
321
+ 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 });
322
+ 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 });
323
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.0-next.4", ngImport: i0, type: MatMenuItem, decorators: [{
331
324
  type: Component,
332
325
  args: [{ selector: '[mat-menu-item]', exportAs: 'matMenuItem', inputs: ['disabled', 'disableRipple'], host: {
333
326
  '[attr.role]': 'role',
@@ -379,10 +372,13 @@ function MAT_MENU_DEFAULT_OPTIONS_FACTORY() {
379
372
  let menuPanelUid = 0;
380
373
  /** Base class with all of the `MatMenu` functionality. */
381
374
  class _MatMenuBase {
382
- constructor(_elementRef, _ngZone, _defaultOptions) {
375
+ constructor(_elementRef, _ngZone, _defaultOptions,
376
+ // @breaking-change 15.0.0 `_changeDetectorRef` to become a required parameter.
377
+ _changeDetectorRef) {
383
378
  this._elementRef = _elementRef;
384
379
  this._ngZone = _ngZone;
385
380
  this._defaultOptions = _defaultOptions;
381
+ this._changeDetectorRef = _changeDetectorRef;
386
382
  this._xPosition = this._defaultOptions.xPosition;
387
383
  this._yPosition = this._defaultOptions.yPosition;
388
384
  /** Only the direct descendant menu items. */
@@ -499,6 +495,23 @@ class _MatMenuBase {
499
495
  this._directDescendantItems.changes
500
496
  .pipe(startWith(this._directDescendantItems), switchMap(items => merge(...items.map((item) => item._focused))))
501
497
  .subscribe(focusedItem => this._keyManager.updateActiveItem(focusedItem));
498
+ this._directDescendantItems.changes.subscribe((itemsList) => {
499
+ var _a;
500
+ // Move focus to another item, if the active item is removed from the list.
501
+ // We need to debounce the callback, because multiple items might be removed
502
+ // in quick succession.
503
+ const manager = this._keyManager;
504
+ if (this._panelAnimationState === 'enter' && ((_a = manager.activeItem) === null || _a === void 0 ? void 0 : _a._hasFocus())) {
505
+ const items = itemsList.toArray();
506
+ const index = Math.max(0, Math.min(items.length - 1, manager.activeItemIndex || 0));
507
+ if (items[index] && !items[index].disabled) {
508
+ manager.setActiveItem(index);
509
+ }
510
+ else {
511
+ manager.setNextItemActive();
512
+ }
513
+ }
514
+ });
502
515
  }
503
516
  ngOnDestroy() {
504
517
  this._directDescendantItems.destroy();
@@ -632,11 +645,14 @@ class _MatMenuBase {
632
645
  * @docs-private
633
646
  */
634
647
  setPositionClasses(posX = this.xPosition, posY = this.yPosition) {
648
+ var _a;
635
649
  const classes = this._classList;
636
650
  classes['mat-menu-before'] = posX === 'before';
637
651
  classes['mat-menu-after'] = posX === 'after';
638
652
  classes['mat-menu-above'] = posY === 'above';
639
653
  classes['mat-menu-below'] = posY === 'below';
654
+ // @breaking-change 15.0.0 Remove null check for `_changeDetectorRef`.
655
+ (_a = this._changeDetectorRef) === null || _a === void 0 ? void 0 : _a.markForCheck();
640
656
  }
641
657
  /** Starts the enter animation. */
642
658
  _startAnimation() {
@@ -680,15 +696,15 @@ class _MatMenuBase {
680
696
  });
681
697
  }
682
698
  }
683
- _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 });
684
- _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 });
685
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: _MatMenuBase, decorators: [{
699
+ _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 });
700
+ _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 });
701
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.0-next.4", ngImport: i0, type: _MatMenuBase, decorators: [{
686
702
  type: Directive
687
703
  }], ctorParameters: function () {
688
704
  return [{ type: i0.ElementRef }, { type: i0.NgZone }, { type: undefined, decorators: [{
689
705
  type: Inject,
690
706
  args: [MAT_MENU_DEFAULT_OPTIONS]
691
- }] }];
707
+ }] }, { type: i0.ChangeDetectorRef }];
692
708
  }, propDecorators: { _allItems: [{
693
709
  type: ContentChildren,
694
710
  args: [MatMenuItem, { descendants: true }]
@@ -732,26 +748,26 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.0", ngImpor
732
748
  }] } });
733
749
  /** @docs-public MatMenu */
734
750
  class MatMenu extends _MatMenuBase {
735
- constructor(elementRef, ngZone, defaultOptions) {
736
- super(elementRef, ngZone, defaultOptions);
751
+ constructor(elementRef, ngZone, defaultOptions, changeDetectorRef) {
752
+ super(elementRef, ngZone, defaultOptions, changeDetectorRef);
737
753
  this._elevationPrefix = 'mat-elevation-z';
738
754
  this._baseElevation = 4;
739
755
  }
740
756
  }
741
- 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 });
742
- 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 });
743
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: MatMenu, decorators: [{
757
+ 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 });
758
+ 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 });
759
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.0-next.4", ngImport: i0, type: MatMenu, decorators: [{
744
760
  type: Component,
745
761
  args: [{ selector: 'mat-menu', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, exportAs: 'matMenu', host: {
746
762
  '[attr.aria-label]': 'null',
747
763
  '[attr.aria-labelledby]': 'null',
748
764
  '[attr.aria-describedby]': 'null',
749
- }, 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"] }]
765
+ }, 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"] }]
750
766
  }], ctorParameters: function () {
751
767
  return [{ type: i0.ElementRef }, { type: i0.NgZone }, { type: undefined, decorators: [{
752
768
  type: Inject,
753
769
  args: [MAT_MENU_DEFAULT_OPTIONS]
754
- }] }];
770
+ }] }, { type: i0.ChangeDetectorRef }];
755
771
  } });
756
772
 
757
773
  /**
@@ -773,7 +789,11 @@ const MAT_MENU_SCROLL_STRATEGY_FACTORY_PROVIDER = {
773
789
  deps: [Overlay],
774
790
  useFactory: MAT_MENU_SCROLL_STRATEGY_FACTORY,
775
791
  };
776
- /** Default top padding of the menu panel. */
792
+ /**
793
+ * Default top padding of the menu panel.
794
+ * @deprecated No longer being used. Will be removed.
795
+ * @breaking-change 15.0.0
796
+ */
777
797
  const MENU_PANEL_TOP_PADDING = 8;
778
798
  /** Options for binding a passive event listener. */
779
799
  const passiveEventListenerOptions = normalizePassiveListenerOptions({ passive: true });
@@ -782,13 +802,14 @@ class _MatMenuTriggerBase {
782
802
  constructor(_overlay, _element, _viewContainerRef, scrollStrategy, parentMenu,
783
803
  // `MatMenuTrigger` is commonly used in combination with a `MatMenuItem`.
784
804
  // tslint:disable-next-line: lightweight-tokens
785
- _menuItemInstance, _dir, _focusMonitor) {
805
+ _menuItemInstance, _dir, _focusMonitor, _ngZone) {
786
806
  this._overlay = _overlay;
787
807
  this._element = _element;
788
808
  this._viewContainerRef = _viewContainerRef;
789
809
  this._menuItemInstance = _menuItemInstance;
790
810
  this._dir = _dir;
791
811
  this._focusMonitor = _focusMonitor;
812
+ this._ngZone = _ngZone;
792
813
  this._overlayRef = null;
793
814
  this._menuOpen = false;
794
815
  this._closingActionsSubscription = Subscription.EMPTY;
@@ -871,7 +892,6 @@ class _MatMenuTriggerBase {
871
892
  }
872
893
  }
873
894
  ngAfterContentInit() {
874
- this._checkMenu();
875
895
  this._handleHover();
876
896
  }
877
897
  ngOnDestroy() {
@@ -902,25 +922,25 @@ class _MatMenuTriggerBase {
902
922
  }
903
923
  /** Opens the menu. */
904
924
  openMenu() {
905
- if (this._menuOpen) {
925
+ const menu = this.menu;
926
+ if (this._menuOpen || !menu) {
906
927
  return;
907
928
  }
908
- this._checkMenu();
909
- const overlayRef = this._createOverlay();
929
+ const overlayRef = this._createOverlay(menu);
910
930
  const overlayConfig = overlayRef.getConfig();
911
931
  const positionStrategy = overlayConfig.positionStrategy;
912
- this._setPosition(positionStrategy);
932
+ this._setPosition(menu, positionStrategy);
913
933
  overlayConfig.hasBackdrop =
914
- this.menu.hasBackdrop == null ? !this.triggersSubmenu() : this.menu.hasBackdrop;
915
- overlayRef.attach(this._getPortal());
916
- if (this.menu.lazyContent) {
917
- this.menu.lazyContent.attach(this.menuData);
934
+ menu.hasBackdrop == null ? !this.triggersSubmenu() : menu.hasBackdrop;
935
+ overlayRef.attach(this._getPortal(menu));
936
+ if (menu.lazyContent) {
937
+ menu.lazyContent.attach(this.menuData);
918
938
  }
919
939
  this._closingActionsSubscription = this._menuClosingActions().subscribe(() => this.closeMenu());
920
- this._initMenu();
921
- if (this.menu instanceof _MatMenuBase) {
922
- this.menu._startAnimation();
923
- this.menu._directDescendantItems.changes.pipe(takeUntil(this.menu.close)).subscribe(() => {
940
+ this._initMenu(menu);
941
+ if (menu instanceof _MatMenuBase) {
942
+ menu._startAnimation();
943
+ menu._directDescendantItems.changes.pipe(takeUntil(menu.close)).subscribe(() => {
924
944
  // Re-adjust the position without locking when the amount of items
925
945
  // changes so that the overlay is allowed to pick a new optimal position.
926
946
  positionStrategy.withLockedPosition(false).reapplyLastPosition();
@@ -930,7 +950,8 @@ class _MatMenuTriggerBase {
930
950
  }
931
951
  /** Closes the menu. */
932
952
  closeMenu() {
933
- this.menu.close.emit();
953
+ var _a;
954
+ (_a = this.menu) === null || _a === void 0 ? void 0 : _a.close.emit();
934
955
  }
935
956
  /**
936
957
  * Focuses the menu trigger.
@@ -953,6 +974,7 @@ class _MatMenuTriggerBase {
953
974
  }
954
975
  /** Closes the menu and does the necessary cleanup. */
955
976
  _destroyMenu(reason) {
977
+ var _a;
956
978
  if (!this._overlayRef || !this.menuOpen) {
957
979
  return;
958
980
  }
@@ -987,32 +1009,30 @@ class _MatMenuTriggerBase {
987
1009
  }
988
1010
  else {
989
1011
  this._setIsMenuOpen(false);
990
- if (menu.lazyContent) {
991
- menu.lazyContent.detach();
992
- }
1012
+ (_a = menu === null || menu === void 0 ? void 0 : menu.lazyContent) === null || _a === void 0 ? void 0 : _a.detach();
993
1013
  }
994
1014
  }
995
1015
  /**
996
1016
  * This method sets the menu state to open and focuses the first item if
997
1017
  * the menu was opened via the keyboard.
998
1018
  */
999
- _initMenu() {
1000
- this.menu.parentMenu = this.triggersSubmenu() ? this._parentMaterialMenu : undefined;
1001
- this.menu.direction = this.dir;
1002
- this._setMenuElevation();
1003
- this.menu.focusFirstItem(this._openedBy || 'program');
1019
+ _initMenu(menu) {
1020
+ menu.parentMenu = this.triggersSubmenu() ? this._parentMaterialMenu : undefined;
1021
+ menu.direction = this.dir;
1022
+ this._setMenuElevation(menu);
1023
+ menu.focusFirstItem(this._openedBy || 'program');
1004
1024
  this._setIsMenuOpen(true);
1005
1025
  }
1006
1026
  /** Updates the menu elevation based on the amount of parent menus that it has. */
1007
- _setMenuElevation() {
1008
- if (this.menu.setElevation) {
1027
+ _setMenuElevation(menu) {
1028
+ if (menu.setElevation) {
1009
1029
  let depth = 0;
1010
- let parentMenu = this.menu.parentMenu;
1030
+ let parentMenu = menu.parentMenu;
1011
1031
  while (parentMenu) {
1012
1032
  depth++;
1013
1033
  parentMenu = parentMenu.parentMenu;
1014
1034
  }
1015
- this.menu.setElevation(depth);
1035
+ menu.setElevation(depth);
1016
1036
  }
1017
1037
  }
1018
1038
  // set state rather than toggle to support triggers sharing a menu
@@ -1023,23 +1043,14 @@ class _MatMenuTriggerBase {
1023
1043
  this._menuItemInstance._setHighlighted(isOpen);
1024
1044
  }
1025
1045
  }
1026
- /**
1027
- * This method checks that a valid instance of MatMenu has been passed into
1028
- * matMenuTriggerFor. If not, an exception is thrown.
1029
- */
1030
- _checkMenu() {
1031
- if (!this.menu && (typeof ngDevMode === 'undefined' || ngDevMode)) {
1032
- throwMatMenuMissingError();
1033
- }
1034
- }
1035
1046
  /**
1036
1047
  * This method creates the overlay from the provided menu's template and saves its
1037
1048
  * OverlayRef so that it can be attached to the DOM when openMenu is called.
1038
1049
  */
1039
- _createOverlay() {
1050
+ _createOverlay(menu) {
1040
1051
  if (!this._overlayRef) {
1041
- const config = this._getOverlayConfig();
1042
- this._subscribeToPositions(config.positionStrategy);
1052
+ const config = this._getOverlayConfig(menu);
1053
+ this._subscribeToPositions(menu, config.positionStrategy);
1043
1054
  this._overlayRef = this._overlay.create(config);
1044
1055
  // Consume the `keydownEvents` in order to prevent them from going to another overlay.
1045
1056
  // Ideally we'd also have our keyboard event logic in here, however doing so will
@@ -1052,7 +1063,7 @@ class _MatMenuTriggerBase {
1052
1063
  * This method builds the configuration object needed to create the overlay, the OverlayState.
1053
1064
  * @returns OverlayConfig
1054
1065
  */
1055
- _getOverlayConfig() {
1066
+ _getOverlayConfig(menu) {
1056
1067
  return new OverlayConfig({
1057
1068
  positionStrategy: this._overlay
1058
1069
  .position()
@@ -1060,8 +1071,8 @@ class _MatMenuTriggerBase {
1060
1071
  .withLockedPosition()
1061
1072
  .withGrowAfterOpen()
1062
1073
  .withTransformOriginOn('.mat-menu-panel, .mat-mdc-menu-panel'),
1063
- backdropClass: this.menu.backdropClass || 'cdk-overlay-transparent-backdrop',
1064
- panelClass: this.menu.overlayPanelClass,
1074
+ backdropClass: menu.backdropClass || 'cdk-overlay-transparent-backdrop',
1075
+ panelClass: menu.overlayPanelClass,
1065
1076
  scrollStrategy: this._scrollStrategy(),
1066
1077
  direction: this._dir,
1067
1078
  });
@@ -1071,12 +1082,20 @@ class _MatMenuTriggerBase {
1071
1082
  * on the menu based on the new position. This ensures the animation origin is always
1072
1083
  * correct, even if a fallback position is used for the overlay.
1073
1084
  */
1074
- _subscribeToPositions(position) {
1075
- if (this.menu.setPositionClasses) {
1085
+ _subscribeToPositions(menu, position) {
1086
+ if (menu.setPositionClasses) {
1076
1087
  position.positionChanges.subscribe(change => {
1077
1088
  const posX = change.connectionPair.overlayX === 'start' ? 'after' : 'before';
1078
1089
  const posY = change.connectionPair.overlayY === 'top' ? 'below' : 'above';
1079
- this.menu.setPositionClasses(posX, posY);
1090
+ // @breaking-change 15.0.0 Remove null check for `ngZone`.
1091
+ // `positionChanges` fires outside of the `ngZone` and `setPositionClasses` might be
1092
+ // updating something in the view so we need to bring it back in.
1093
+ if (this._ngZone) {
1094
+ this._ngZone.run(() => menu.setPositionClasses(posX, posY));
1095
+ }
1096
+ else {
1097
+ menu.setPositionClasses(posX, posY);
1098
+ }
1080
1099
  });
1081
1100
  }
1082
1101
  }
@@ -1085,20 +1104,26 @@ class _MatMenuTriggerBase {
1085
1104
  * so the overlay connects with the trigger correctly.
1086
1105
  * @param positionStrategy Strategy whose position to update.
1087
1106
  */
1088
- _setPosition(positionStrategy) {
1089
- let [originX, originFallbackX] = this.menu.xPosition === 'before' ? ['end', 'start'] : ['start', 'end'];
1090
- let [overlayY, overlayFallbackY] = this.menu.yPosition === 'above' ? ['bottom', 'top'] : ['top', 'bottom'];
1107
+ _setPosition(menu, positionStrategy) {
1108
+ let [originX, originFallbackX] = menu.xPosition === 'before' ? ['end', 'start'] : ['start', 'end'];
1109
+ let [overlayY, overlayFallbackY] = menu.yPosition === 'above' ? ['bottom', 'top'] : ['top', 'bottom'];
1091
1110
  let [originY, originFallbackY] = [overlayY, overlayFallbackY];
1092
1111
  let [overlayX, overlayFallbackX] = [originX, originFallbackX];
1093
1112
  let offsetY = 0;
1094
1113
  if (this.triggersSubmenu()) {
1095
1114
  // When the menu is a sub-menu, it should always align itself
1096
1115
  // to the edges of the trigger, instead of overlapping it.
1097
- overlayFallbackX = originX = this.menu.xPosition === 'before' ? 'start' : 'end';
1116
+ overlayFallbackX = originX = menu.xPosition === 'before' ? 'start' : 'end';
1098
1117
  originFallbackX = overlayX = originX === 'end' ? 'start' : 'end';
1099
- offsetY = overlayY === 'bottom' ? MENU_PANEL_TOP_PADDING : -MENU_PANEL_TOP_PADDING;
1118
+ if (this._parentMaterialMenu) {
1119
+ if (this._parentInnerPadding == null) {
1120
+ const firstItem = this._parentMaterialMenu.items.first;
1121
+ this._parentInnerPadding = firstItem ? firstItem._getHostElement().offsetTop : 0;
1122
+ }
1123
+ offsetY = overlayY === 'bottom' ? this._parentInnerPadding : -this._parentInnerPadding;
1124
+ }
1100
1125
  }
1101
- else if (!this.menu.overlapTrigger) {
1126
+ else if (!menu.overlapTrigger) {
1102
1127
  originY = overlayY === 'top' ? 'bottom' : 'top';
1103
1128
  originFallbackY = overlayFallbackY === 'top' ? 'bottom' : 'top';
1104
1129
  }
@@ -1200,23 +1225,23 @@ class _MatMenuTriggerBase {
1200
1225
  });
1201
1226
  }
1202
1227
  /** Gets the portal that should be attached to the overlay. */
1203
- _getPortal() {
1228
+ _getPortal(menu) {
1204
1229
  // Note that we can avoid this check by keeping the portal on the menu panel.
1205
1230
  // While it would be cleaner, we'd have to introduce another required method on
1206
1231
  // `MatMenuPanel`, making it harder to consume.
1207
- if (!this._portal || this._portal.templateRef !== this.menu.templateRef) {
1208
- this._portal = new TemplatePortal(this.menu.templateRef, this._viewContainerRef);
1232
+ if (!this._portal || this._portal.templateRef !== menu.templateRef) {
1233
+ this._portal = new TemplatePortal(menu.templateRef, this._viewContainerRef);
1209
1234
  }
1210
1235
  return this._portal;
1211
1236
  }
1212
1237
  }
1213
- _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 });
1214
- _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 });
1215
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: _MatMenuTriggerBase, decorators: [{
1238
+ _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 });
1239
+ _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 });
1240
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.0-next.4", ngImport: i0, type: _MatMenuTriggerBase, decorators: [{
1216
1241
  type: Directive,
1217
1242
  args: [{
1218
1243
  host: {
1219
- 'aria-haspopup': 'true',
1244
+ '[attr.aria-haspopup]': 'menu ? "menu" : null',
1220
1245
  '[attr.aria-expanded]': 'menuOpen || null',
1221
1246
  '[attr.aria-controls]': 'menuOpen ? menu.panelId : null',
1222
1247
  '(click)': '_handleClick($event)',
@@ -1239,7 +1264,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.0", ngImpor
1239
1264
  type: Self
1240
1265
  }] }, { type: i3$1.Directionality, decorators: [{
1241
1266
  type: Optional
1242
- }] }, { type: i1.FocusMonitor }];
1267
+ }] }, { type: i1.FocusMonitor }, { type: i0.NgZone }];
1243
1268
  }, propDecorators: { _deprecatedMatMenuTriggerFor: [{
1244
1269
  type: Input,
1245
1270
  args: ['mat-menu-trigger-for']
@@ -1264,9 +1289,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.0", ngImpor
1264
1289
  /** Directive applied to an element that should trigger a `mat-menu`. */
1265
1290
  class MatMenuTrigger extends _MatMenuTriggerBase {
1266
1291
  }
1267
- MatMenuTrigger.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: MatMenuTrigger, deps: null, target: i0.ɵɵFactoryTarget.Directive });
1268
- 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 });
1269
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: MatMenuTrigger, decorators: [{
1292
+ MatMenuTrigger.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.0-next.4", ngImport: i0, type: MatMenuTrigger, deps: null, target: i0.ɵɵFactoryTarget.Directive });
1293
+ 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 });
1294
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.0-next.4", ngImport: i0, type: MatMenuTrigger, decorators: [{
1270
1295
  type: Directive,
1271
1296
  args: [{
1272
1297
  selector: `[mat-menu-trigger-for], [matMenuTriggerFor]`,
@@ -1286,16 +1311,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.0", ngImpor
1286
1311
  */
1287
1312
  class MatMenuModule {
1288
1313
  }
1289
- MatMenuModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: MatMenuModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1290
- 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,
1314
+ MatMenuModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.0-next.4", ngImport: i0, type: MatMenuModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1315
+ 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,
1291
1316
  MatCommonModule,
1292
1317
  MatMenu,
1293
1318
  MatMenuItem,
1294
1319
  MatMenuTrigger,
1295
1320
  MatMenuContent] });
1296
- 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,
1321
+ 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,
1297
1322
  MatCommonModule] });
1298
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: MatMenuModule, decorators: [{
1323
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.0-next.4", ngImport: i0, type: MatMenuModule, decorators: [{
1299
1324
  type: NgModule,
1300
1325
  args: [{
1301
1326
  imports: [CommonModule, MatCommonModule, MatRippleModule, OverlayModule],