@angular/material 13.2.5 → 13.3.1

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 (401) hide show
  1. package/badge/_badge-theme.scss +8 -0
  2. package/checkbox/_checkbox-theme.scss +0 -6
  3. package/core/style/_vendor-prefixes.scss +0 -16
  4. package/datepicker/calendar-body.d.ts +22 -1
  5. package/dialog/dialog-config.d.ts +2 -0
  6. package/dialog/dialog-container.d.ts +1 -4
  7. package/dialog/dialog.d.ts +12 -6
  8. package/dialog/testing/dialog-opener.d.ts +33 -0
  9. package/dialog/testing/public-api.d.ts +1 -0
  10. package/esm2020/autocomplete/autocomplete-module.mjs +4 -4
  11. package/esm2020/autocomplete/autocomplete-origin.mjs +6 -6
  12. package/esm2020/autocomplete/autocomplete-trigger.mjs +25 -20
  13. package/esm2020/autocomplete/autocomplete.mjs +6 -6
  14. package/esm2020/badge/badge-module.mjs +4 -4
  15. package/esm2020/badge/badge.mjs +3 -3
  16. package/esm2020/bottom-sheet/bottom-sheet-animations.mjs +10 -4
  17. package/esm2020/bottom-sheet/bottom-sheet-container.mjs +11 -6
  18. package/esm2020/bottom-sheet/bottom-sheet-module.mjs +4 -4
  19. package/esm2020/bottom-sheet/bottom-sheet.mjs +3 -3
  20. package/esm2020/button/button-module.mjs +4 -4
  21. package/esm2020/button/button.mjs +10 -10
  22. package/esm2020/button-toggle/button-toggle-module.mjs +4 -4
  23. package/esm2020/button-toggle/button-toggle.mjs +7 -7
  24. package/esm2020/card/card-module.mjs +4 -4
  25. package/esm2020/card/card.mjs +42 -42
  26. package/esm2020/checkbox/checkbox-module.mjs +8 -8
  27. package/esm2020/checkbox/checkbox-required-validator.mjs +3 -3
  28. package/esm2020/checkbox/checkbox.mjs +7 -6
  29. package/esm2020/chips/chip-input.mjs +3 -3
  30. package/esm2020/chips/chip-list.mjs +3 -3
  31. package/esm2020/chips/chip.mjs +12 -12
  32. package/esm2020/chips/chips-module.mjs +4 -4
  33. package/esm2020/core/common-behaviors/common-module.mjs +4 -4
  34. package/esm2020/core/datetime/index.mjs +8 -8
  35. package/esm2020/core/datetime/native-date-adapter.mjs +3 -3
  36. package/esm2020/core/error/error-options.mjs +6 -6
  37. package/esm2020/core/line/line.mjs +7 -7
  38. package/esm2020/core/option/index.mjs +4 -4
  39. package/esm2020/core/option/optgroup.mjs +7 -7
  40. package/esm2020/core/option/option.mjs +7 -7
  41. package/esm2020/core/ripple/index.mjs +4 -4
  42. package/esm2020/core/ripple/ripple.mjs +3 -3
  43. package/esm2020/core/selection/pseudo-checkbox/pseudo-checkbox-module.mjs +4 -4
  44. package/esm2020/core/selection/pseudo-checkbox/pseudo-checkbox.mjs +3 -3
  45. package/esm2020/core/version.mjs +1 -1
  46. package/esm2020/datepicker/calendar-body.mjs +35 -12
  47. package/esm2020/datepicker/calendar.mjs +6 -6
  48. package/esm2020/datepicker/date-range-input-parts.mjs +9 -9
  49. package/esm2020/datepicker/date-range-input.mjs +5 -5
  50. package/esm2020/datepicker/date-range-picker.mjs +3 -3
  51. package/esm2020/datepicker/date-range-selection-strategy.mjs +3 -3
  52. package/esm2020/datepicker/date-selection-model.mjs +9 -9
  53. package/esm2020/datepicker/datepicker-actions.mjs +9 -9
  54. package/esm2020/datepicker/datepicker-base.mjs +6 -6
  55. package/esm2020/datepicker/datepicker-input-base.mjs +3 -3
  56. package/esm2020/datepicker/datepicker-input.mjs +3 -3
  57. package/esm2020/datepicker/datepicker-intl.mjs +3 -3
  58. package/esm2020/datepicker/datepicker-module.mjs +4 -4
  59. package/esm2020/datepicker/datepicker-toggle.mjs +6 -6
  60. package/esm2020/datepicker/datepicker.mjs +3 -3
  61. package/esm2020/datepicker/month-view.mjs +5 -5
  62. package/esm2020/datepicker/multi-year-view.mjs +3 -3
  63. package/esm2020/datepicker/year-view.mjs +3 -3
  64. package/esm2020/dialog/dialog-animations.mjs +10 -4
  65. package/esm2020/dialog/dialog-config.mjs +3 -1
  66. package/esm2020/dialog/dialog-container.mjs +27 -22
  67. package/esm2020/dialog/dialog-content-directives.mjs +12 -12
  68. package/esm2020/dialog/dialog-module.mjs +4 -4
  69. package/esm2020/dialog/dialog.mjs +20 -36
  70. package/esm2020/dialog/testing/dialog-opener.mjs +67 -0
  71. package/esm2020/dialog/testing/public-api.mjs +2 -1
  72. package/esm2020/divider/divider-module.mjs +4 -4
  73. package/esm2020/divider/divider.mjs +3 -3
  74. package/esm2020/expansion/accordion.mjs +3 -3
  75. package/esm2020/expansion/expansion-module.mjs +4 -4
  76. package/esm2020/expansion/expansion-panel-content.mjs +3 -3
  77. package/esm2020/expansion/expansion-panel-header.mjs +9 -9
  78. package/esm2020/expansion/expansion-panel.mjs +9 -9
  79. package/esm2020/form-field/error.mjs +3 -3
  80. package/esm2020/form-field/form-field-control.mjs +3 -3
  81. package/esm2020/form-field/form-field-module.mjs +4 -4
  82. package/esm2020/form-field/form-field.mjs +5 -5
  83. package/esm2020/form-field/hint.mjs +3 -3
  84. package/esm2020/form-field/label.mjs +3 -3
  85. package/esm2020/form-field/placeholder.mjs +3 -3
  86. package/esm2020/form-field/prefix.mjs +3 -3
  87. package/esm2020/form-field/suffix.mjs +3 -3
  88. package/esm2020/grid-list/grid-list-module.mjs +4 -4
  89. package/esm2020/grid-list/grid-list.mjs +3 -3
  90. package/esm2020/grid-list/grid-tile.mjs +15 -15
  91. package/esm2020/icon/icon-module.mjs +4 -4
  92. package/esm2020/icon/icon-registry.mjs +3 -3
  93. package/esm2020/icon/icon.mjs +5 -12
  94. package/esm2020/icon/testing/fake-icon-registry.mjs +7 -7
  95. package/esm2020/input/input-module.mjs +4 -4
  96. package/esm2020/input/input.mjs +25 -21
  97. package/esm2020/list/list-module.mjs +4 -4
  98. package/esm2020/list/list.mjs +18 -18
  99. package/esm2020/list/selection-list.mjs +6 -6
  100. package/esm2020/menu/menu-content.mjs +6 -6
  101. package/esm2020/menu/menu-item.mjs +3 -3
  102. package/esm2020/menu/menu-module.mjs +4 -4
  103. package/esm2020/menu/menu-trigger.mjs +6 -6
  104. package/esm2020/menu/menu.mjs +8 -8
  105. package/esm2020/paginator/paginator-intl.mjs +3 -3
  106. package/esm2020/paginator/paginator-module.mjs +4 -4
  107. package/esm2020/paginator/paginator.mjs +6 -6
  108. package/esm2020/progress-bar/progress-bar-module.mjs +4 -4
  109. package/esm2020/progress-bar/progress-bar.mjs +3 -3
  110. package/esm2020/progress-spinner/progress-spinner-module.mjs +4 -4
  111. package/esm2020/progress-spinner/progress-spinner.mjs +3 -3
  112. package/esm2020/radio/radio-module.mjs +4 -4
  113. package/esm2020/radio/radio.mjs +13 -13
  114. package/esm2020/select/select-module.mjs +4 -4
  115. package/esm2020/select/select.mjs +42 -23
  116. package/esm2020/sidenav/drawer.mjs +17 -12
  117. package/esm2020/sidenav/sidenav-module.mjs +4 -4
  118. package/esm2020/sidenav/sidenav.mjs +9 -9
  119. package/esm2020/slide-toggle/slide-toggle-module.mjs +8 -8
  120. package/esm2020/slide-toggle/slide-toggle-required-validator.mjs +3 -3
  121. package/esm2020/slide-toggle/slide-toggle.mjs +6 -5
  122. package/esm2020/slider/slider-module.mjs +4 -4
  123. package/esm2020/slider/slider.mjs +4 -4
  124. package/esm2020/snack-bar/simple-snack-bar.mjs +3 -3
  125. package/esm2020/snack-bar/snack-bar-container.mjs +3 -3
  126. package/esm2020/snack-bar/snack-bar-module.mjs +4 -4
  127. package/esm2020/snack-bar/snack-bar.mjs +6 -6
  128. package/esm2020/sort/sort-header-intl.mjs +3 -3
  129. package/esm2020/sort/sort-header.mjs +3 -3
  130. package/esm2020/sort/sort-module.mjs +4 -4
  131. package/esm2020/sort/sort.mjs +3 -3
  132. package/esm2020/stepper/step-content.mjs +3 -3
  133. package/esm2020/stepper/step-header.mjs +3 -3
  134. package/esm2020/stepper/step-label.mjs +3 -3
  135. package/esm2020/stepper/stepper-button.mjs +6 -6
  136. package/esm2020/stepper/stepper-icon.mjs +3 -3
  137. package/esm2020/stepper/stepper-intl.mjs +3 -3
  138. package/esm2020/stepper/stepper-module.mjs +4 -4
  139. package/esm2020/stepper/stepper.mjs +15 -15
  140. package/esm2020/table/cell.mjs +21 -21
  141. package/esm2020/table/row.mjs +21 -21
  142. package/esm2020/table/table-module.mjs +4 -4
  143. package/esm2020/table/table.mjs +8 -8
  144. package/esm2020/table/text-column.mjs +3 -3
  145. package/esm2020/tabs/ink-bar.mjs +11 -22
  146. package/esm2020/tabs/paginated-tab-header.mjs +8 -6
  147. package/esm2020/tabs/tab-body.mjs +9 -9
  148. package/esm2020/tabs/tab-content.mjs +3 -3
  149. package/esm2020/tabs/tab-group.mjs +6 -6
  150. package/esm2020/tabs/tab-header.mjs +7 -7
  151. package/esm2020/tabs/tab-label-wrapper.mjs +3 -3
  152. package/esm2020/tabs/tab-label.mjs +3 -3
  153. package/esm2020/tabs/tab-nav-bar/tab-nav-bar.mjs +16 -16
  154. package/esm2020/tabs/tab.mjs +3 -3
  155. package/esm2020/tabs/tabs-module.mjs +4 -4
  156. package/esm2020/toolbar/toolbar-module.mjs +4 -4
  157. package/esm2020/toolbar/toolbar.mjs +6 -6
  158. package/esm2020/tooltip/testing/tooltip-harness.mjs +12 -7
  159. package/esm2020/tooltip/tooltip-module.mjs +4 -4
  160. package/esm2020/tooltip/tooltip.mjs +99 -47
  161. package/esm2020/tree/node.mjs +9 -9
  162. package/esm2020/tree/outlet.mjs +3 -3
  163. package/esm2020/tree/padding.mjs +3 -3
  164. package/esm2020/tree/toggle.mjs +3 -3
  165. package/esm2020/tree/tree-module.mjs +4 -4
  166. package/esm2020/tree/tree.mjs +3 -3
  167. package/fesm2015/autocomplete/testing.mjs.map +1 -1
  168. package/fesm2015/autocomplete.mjs +40 -35
  169. package/fesm2015/autocomplete.mjs.map +1 -1
  170. package/fesm2015/badge/testing.mjs.map +1 -1
  171. package/fesm2015/badge.mjs +7 -7
  172. package/fesm2015/badge.mjs.map +1 -1
  173. package/fesm2015/bottom-sheet/testing.mjs.map +1 -1
  174. package/fesm2015/bottom-sheet.mjs +26 -15
  175. package/fesm2015/bottom-sheet.mjs.map +1 -1
  176. package/fesm2015/button/testing.mjs.map +1 -1
  177. package/fesm2015/button-toggle/testing.mjs.map +1 -1
  178. package/fesm2015/button-toggle.mjs +11 -11
  179. package/fesm2015/button-toggle.mjs.map +1 -1
  180. package/fesm2015/button.mjs +13 -13
  181. package/fesm2015/button.mjs.map +1 -1
  182. package/fesm2015/card/testing.mjs.map +1 -1
  183. package/fesm2015/card.mjs +46 -46
  184. package/fesm2015/card.mjs.map +1 -1
  185. package/fesm2015/checkbox/testing.mjs.map +1 -1
  186. package/fesm2015/checkbox.mjs +17 -16
  187. package/fesm2015/checkbox.mjs.map +1 -1
  188. package/fesm2015/chips/testing.mjs.map +1 -1
  189. package/fesm2015/chips.mjs +22 -22
  190. package/fesm2015/chips.mjs.map +1 -1
  191. package/fesm2015/core/testing.mjs.map +1 -1
  192. package/fesm2015/core.mjs +61 -61
  193. package/fesm2015/core.mjs.map +1 -1
  194. package/fesm2015/datepicker/testing.mjs.map +1 -1
  195. package/fesm2015/datepicker.mjs +116 -93
  196. package/fesm2015/datepicker.mjs.map +1 -1
  197. package/fesm2015/dialog/testing.mjs +65 -2
  198. package/fesm2015/dialog/testing.mjs.map +1 -1
  199. package/fesm2015/dialog.mjs +72 -75
  200. package/fesm2015/dialog.mjs.map +1 -1
  201. package/fesm2015/divider/testing.mjs.map +1 -1
  202. package/fesm2015/divider.mjs +7 -7
  203. package/fesm2015/divider.mjs.map +1 -1
  204. package/fesm2015/expansion/testing.mjs.map +1 -1
  205. package/fesm2015/expansion.mjs +27 -27
  206. package/fesm2015/expansion.mjs.map +1 -1
  207. package/fesm2015/form-field/testing/control.mjs.map +1 -1
  208. package/fesm2015/form-field/testing.mjs.map +1 -1
  209. package/fesm2015/form-field.mjs +29 -29
  210. package/fesm2015/form-field.mjs.map +1 -1
  211. package/fesm2015/grid-list/testing.mjs.map +1 -1
  212. package/fesm2015/grid-list.mjs +22 -22
  213. package/fesm2015/grid-list.mjs.map +1 -1
  214. package/fesm2015/icon/testing.mjs +7 -7
  215. package/fesm2015/icon/testing.mjs.map +1 -1
  216. package/fesm2015/icon.mjs +11 -18
  217. package/fesm2015/icon.mjs.map +1 -1
  218. package/fesm2015/input/testing.mjs.map +1 -1
  219. package/fesm2015/input.mjs +28 -24
  220. package/fesm2015/input.mjs.map +1 -1
  221. package/fesm2015/list/testing.mjs.map +1 -1
  222. package/fesm2015/list.mjs +28 -28
  223. package/fesm2015/list.mjs.map +1 -1
  224. package/fesm2015/material.mjs.map +1 -1
  225. package/fesm2015/menu/testing.mjs.map +1 -1
  226. package/fesm2015/menu.mjs +26 -26
  227. package/fesm2015/menu.mjs.map +1 -1
  228. package/fesm2015/paginator/testing.mjs.map +1 -1
  229. package/fesm2015/paginator.mjs +13 -13
  230. package/fesm2015/paginator.mjs.map +1 -1
  231. package/fesm2015/progress-bar/testing.mjs.map +1 -1
  232. package/fesm2015/progress-bar.mjs +7 -7
  233. package/fesm2015/progress-bar.mjs.map +1 -1
  234. package/fesm2015/progress-spinner/testing.mjs.map +1 -1
  235. package/fesm2015/progress-spinner.mjs +7 -7
  236. package/fesm2015/progress-spinner.mjs.map +1 -1
  237. package/fesm2015/radio/testing.mjs.map +1 -1
  238. package/fesm2015/radio.mjs +17 -17
  239. package/fesm2015/radio.mjs.map +1 -1
  240. package/fesm2015/select/testing.mjs.map +1 -1
  241. package/fesm2015/select.mjs +45 -26
  242. package/fesm2015/select.mjs.map +1 -1
  243. package/fesm2015/sidenav/testing.mjs.map +1 -1
  244. package/fesm2015/sidenav.mjs +29 -24
  245. package/fesm2015/sidenav.mjs.map +1 -1
  246. package/fesm2015/slide-toggle/testing.mjs.map +1 -1
  247. package/fesm2015/slide-toggle.mjs +16 -15
  248. package/fesm2015/slide-toggle.mjs.map +1 -1
  249. package/fesm2015/slider/testing.mjs.map +1 -1
  250. package/fesm2015/slider.mjs +8 -8
  251. package/fesm2015/slider.mjs.map +1 -1
  252. package/fesm2015/snack-bar/testing.mjs.map +1 -1
  253. package/fesm2015/snack-bar.mjs +16 -16
  254. package/fesm2015/snack-bar.mjs.map +1 -1
  255. package/fesm2015/sort/testing.mjs.map +1 -1
  256. package/fesm2015/sort.mjs +13 -13
  257. package/fesm2015/sort.mjs.map +1 -1
  258. package/fesm2015/stepper/testing.mjs.map +1 -1
  259. package/fesm2015/stepper.mjs +40 -40
  260. package/fesm2015/stepper.mjs.map +1 -1
  261. package/fesm2015/table/testing.mjs.map +1 -1
  262. package/fesm2015/table.mjs +57 -57
  263. package/fesm2015/table.mjs.map +1 -1
  264. package/fesm2015/tabs/testing.mjs.map +1 -1
  265. package/fesm2015/tabs.mjs +70 -80
  266. package/fesm2015/tabs.mjs.map +1 -1
  267. package/fesm2015/toolbar/testing.mjs.map +1 -1
  268. package/fesm2015/toolbar.mjs +10 -10
  269. package/fesm2015/toolbar.mjs.map +1 -1
  270. package/fesm2015/tooltip/testing.mjs +11 -8
  271. package/fesm2015/tooltip/testing.mjs.map +1 -1
  272. package/fesm2015/tooltip.mjs +125 -75
  273. package/fesm2015/tooltip.mjs.map +1 -1
  274. package/fesm2015/tree/testing.mjs.map +1 -1
  275. package/fesm2015/tree.mjs +25 -25
  276. package/fesm2015/tree.mjs.map +1 -1
  277. package/fesm2020/autocomplete/testing.mjs.map +1 -1
  278. package/fesm2020/autocomplete.mjs +40 -35
  279. package/fesm2020/autocomplete.mjs.map +1 -1
  280. package/fesm2020/badge/testing.mjs.map +1 -1
  281. package/fesm2020/badge.mjs +7 -7
  282. package/fesm2020/badge.mjs.map +1 -1
  283. package/fesm2020/bottom-sheet/testing.mjs.map +1 -1
  284. package/fesm2020/bottom-sheet.mjs +26 -15
  285. package/fesm2020/bottom-sheet.mjs.map +1 -1
  286. package/fesm2020/button/testing.mjs.map +1 -1
  287. package/fesm2020/button-toggle/testing.mjs.map +1 -1
  288. package/fesm2020/button-toggle.mjs +11 -11
  289. package/fesm2020/button-toggle.mjs.map +1 -1
  290. package/fesm2020/button.mjs +13 -13
  291. package/fesm2020/button.mjs.map +1 -1
  292. package/fesm2020/card/testing.mjs.map +1 -1
  293. package/fesm2020/card.mjs +46 -46
  294. package/fesm2020/card.mjs.map +1 -1
  295. package/fesm2020/checkbox/testing.mjs.map +1 -1
  296. package/fesm2020/checkbox.mjs +17 -16
  297. package/fesm2020/checkbox.mjs.map +1 -1
  298. package/fesm2020/chips/testing.mjs.map +1 -1
  299. package/fesm2020/chips.mjs +22 -22
  300. package/fesm2020/chips.mjs.map +1 -1
  301. package/fesm2020/core/testing.mjs.map +1 -1
  302. package/fesm2020/core.mjs +61 -61
  303. package/fesm2020/core.mjs.map +1 -1
  304. package/fesm2020/datepicker/testing.mjs.map +1 -1
  305. package/fesm2020/datepicker.mjs +116 -93
  306. package/fesm2020/datepicker.mjs.map +1 -1
  307. package/fesm2020/dialog/testing.mjs +65 -1
  308. package/fesm2020/dialog/testing.mjs.map +1 -1
  309. package/fesm2020/dialog.mjs +72 -75
  310. package/fesm2020/dialog.mjs.map +1 -1
  311. package/fesm2020/divider/testing.mjs.map +1 -1
  312. package/fesm2020/divider.mjs +7 -7
  313. package/fesm2020/divider.mjs.map +1 -1
  314. package/fesm2020/expansion/testing.mjs.map +1 -1
  315. package/fesm2020/expansion.mjs +27 -27
  316. package/fesm2020/expansion.mjs.map +1 -1
  317. package/fesm2020/form-field/testing/control.mjs.map +1 -1
  318. package/fesm2020/form-field/testing.mjs.map +1 -1
  319. package/fesm2020/form-field.mjs +29 -29
  320. package/fesm2020/form-field.mjs.map +1 -1
  321. package/fesm2020/grid-list/testing.mjs.map +1 -1
  322. package/fesm2020/grid-list.mjs +22 -22
  323. package/fesm2020/grid-list.mjs.map +1 -1
  324. package/fesm2020/icon/testing.mjs +7 -7
  325. package/fesm2020/icon/testing.mjs.map +1 -1
  326. package/fesm2020/icon.mjs +11 -18
  327. package/fesm2020/icon.mjs.map +1 -1
  328. package/fesm2020/input/testing.mjs.map +1 -1
  329. package/fesm2020/input.mjs +28 -24
  330. package/fesm2020/input.mjs.map +1 -1
  331. package/fesm2020/list/testing.mjs.map +1 -1
  332. package/fesm2020/list.mjs +28 -28
  333. package/fesm2020/list.mjs.map +1 -1
  334. package/fesm2020/material.mjs.map +1 -1
  335. package/fesm2020/menu/testing.mjs.map +1 -1
  336. package/fesm2020/menu.mjs +26 -26
  337. package/fesm2020/menu.mjs.map +1 -1
  338. package/fesm2020/paginator/testing.mjs.map +1 -1
  339. package/fesm2020/paginator.mjs +13 -13
  340. package/fesm2020/paginator.mjs.map +1 -1
  341. package/fesm2020/progress-bar/testing.mjs.map +1 -1
  342. package/fesm2020/progress-bar.mjs +7 -7
  343. package/fesm2020/progress-bar.mjs.map +1 -1
  344. package/fesm2020/progress-spinner/testing.mjs.map +1 -1
  345. package/fesm2020/progress-spinner.mjs +7 -7
  346. package/fesm2020/progress-spinner.mjs.map +1 -1
  347. package/fesm2020/radio/testing.mjs.map +1 -1
  348. package/fesm2020/radio.mjs +17 -17
  349. package/fesm2020/radio.mjs.map +1 -1
  350. package/fesm2020/select/testing.mjs.map +1 -1
  351. package/fesm2020/select.mjs +45 -26
  352. package/fesm2020/select.mjs.map +1 -1
  353. package/fesm2020/sidenav/testing.mjs.map +1 -1
  354. package/fesm2020/sidenav.mjs +29 -24
  355. package/fesm2020/sidenav.mjs.map +1 -1
  356. package/fesm2020/slide-toggle/testing.mjs.map +1 -1
  357. package/fesm2020/slide-toggle.mjs +16 -15
  358. package/fesm2020/slide-toggle.mjs.map +1 -1
  359. package/fesm2020/slider/testing.mjs.map +1 -1
  360. package/fesm2020/slider.mjs +8 -8
  361. package/fesm2020/slider.mjs.map +1 -1
  362. package/fesm2020/snack-bar/testing.mjs.map +1 -1
  363. package/fesm2020/snack-bar.mjs +16 -16
  364. package/fesm2020/snack-bar.mjs.map +1 -1
  365. package/fesm2020/sort/testing.mjs.map +1 -1
  366. package/fesm2020/sort.mjs +13 -13
  367. package/fesm2020/sort.mjs.map +1 -1
  368. package/fesm2020/stepper/testing.mjs.map +1 -1
  369. package/fesm2020/stepper.mjs +40 -40
  370. package/fesm2020/stepper.mjs.map +1 -1
  371. package/fesm2020/table/testing.mjs.map +1 -1
  372. package/fesm2020/table.mjs +57 -57
  373. package/fesm2020/table.mjs.map +1 -1
  374. package/fesm2020/tabs/testing.mjs.map +1 -1
  375. package/fesm2020/tabs.mjs +70 -80
  376. package/fesm2020/tabs.mjs.map +1 -1
  377. package/fesm2020/toolbar/testing.mjs.map +1 -1
  378. package/fesm2020/toolbar.mjs +10 -10
  379. package/fesm2020/toolbar.mjs.map +1 -1
  380. package/fesm2020/tooltip/testing.mjs +11 -6
  381. package/fesm2020/tooltip/testing.mjs.map +1 -1
  382. package/fesm2020/tooltip.mjs +120 -67
  383. package/fesm2020/tooltip.mjs.map +1 -1
  384. package/fesm2020/tree/testing.mjs.map +1 -1
  385. package/fesm2020/tree.mjs +25 -25
  386. package/fesm2020/tree.mjs.map +1 -1
  387. package/input/input.d.ts +1 -0
  388. package/package.json +2 -2
  389. package/prebuilt-themes/deeppurple-amber.css +1 -1
  390. package/prebuilt-themes/indigo-pink.css +1 -1
  391. package/prebuilt-themes/pink-bluegrey.css +1 -1
  392. package/prebuilt-themes/purple-green.css +1 -1
  393. package/schematics/collection.json +4 -2
  394. package/schematics/ng-add/index.js +1 -1
  395. package/schematics/ng-add/index.mjs +1 -1
  396. package/schematics/ng-update/data/index.js +6 -2
  397. package/schematics/ng-update/data/index.mjs +6 -2
  398. package/select/select.d.ts +8 -1
  399. package/tabs/ink-bar.d.ts +0 -5
  400. package/tooltip/testing/tooltip-harness.d.ts +6 -0
  401. package/tooltip/tooltip.d.ts +23 -7
@@ -1 +1 @@
1
- {"version":3,"file":"testing.mjs","sources":["../../../../../../../src/material/toolbar/testing/toolbar-harness.ts","../../../../../../../src/material/toolbar/testing/toolbar-harness-filters.ts","../../../../../../../src/material/toolbar/testing/public-api.ts","../../../../../../../src/material/toolbar/testing/index.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {ContentContainerComponentHarness, HarnessPredicate, parallel} from '@angular/cdk/testing';\nimport {ToolbarHarnessFilters} from './toolbar-harness-filters';\n\n/** Selectors for different sections of the mat-toolbar that contain user content. */\nexport const enum MatToolbarSection {\n ROW = '.mat-toolbar-row',\n}\n\n/** Harness for interacting with a standard mat-toolbar in tests. */\nexport class MatToolbarHarness extends ContentContainerComponentHarness<MatToolbarSection> {\n static hostSelector = '.mat-toolbar';\n\n private _getRows = this.locatorForAll(MatToolbarSection.ROW);\n\n /**\n * Gets a `HarnessPredicate` that can be used to search for a `MatToolbarHarness` that meets\n * certain criteria.\n * @param options Options for filtering which card instances are considered a match.\n * @return a `HarnessPredicate` configured with the given options.\n */\n static with(options: ToolbarHarnessFilters = {}): HarnessPredicate<MatToolbarHarness> {\n return new HarnessPredicate(MatToolbarHarness, options).addOption(\n 'text',\n options.text,\n (harness, text) => HarnessPredicate.stringMatches(harness._getText(), text),\n );\n }\n\n /** Whether the toolbar has multiple rows. */\n async hasMultipleRows(): Promise<boolean> {\n return (await this.host()).hasClass('mat-toolbar-multiple-rows');\n }\n\n /** Gets all of the toolbar's content as text. */\n private async _getText(): Promise<string> {\n return (await this.host()).text();\n }\n\n /** Gets the text of each row in the toolbar. */\n async getRowsAsText(): Promise<string[]> {\n const rows = await this._getRows();\n return parallel(() => (rows.length ? rows.map(r => r.text()) : [this._getText()]));\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {BaseHarnessFilters} from '@angular/cdk/testing';\n\n/** A set of criteria that can be used to filter a list of `MatToolbarHarness` instances. */\nexport interface ToolbarHarnessFilters extends BaseHarnessFilters {\n /** Only find instances whose text matches the given value. */\n text?: string | RegExp;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nexport * from './toolbar-harness';\nexport * from './toolbar-harness-filters';\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;AAAA;;;;;;;AAgBA;MACa,iBAAkB,SAAQ,gCAAmD;IAA1F;;QAGU,aAAQ,GAAG,IAAI,CAAC,aAAa,8BAAuB,CAAC;KA+B9D;;;;;;;IAvBC,OAAO,IAAI,CAAC,UAAiC,EAAE;QAC7C,OAAO,IAAI,gBAAgB,CAAC,iBAAiB,EAAE,OAAO,CAAC,CAAC,SAAS,CAC/D,MAAM,EACN,OAAO,CAAC,IAAI,EACZ,CAAC,OAAO,EAAE,IAAI,KAAK,gBAAgB,CAAC,aAAa,CAAC,OAAO,CAAC,QAAQ,EAAE,EAAE,IAAI,CAAC,CAC5E,CAAC;KACH;;IAGD,MAAM,eAAe;QACnB,OAAO,CAAC,MAAM,IAAI,CAAC,IAAI,EAAE,EAAE,QAAQ,CAAC,2BAA2B,CAAC,CAAC;KAClE;;IAGO,MAAM,QAAQ;QACpB,OAAO,CAAC,MAAM,IAAI,CAAC,IAAI,EAAE,EAAE,IAAI,EAAE,CAAC;KACnC;;IAGD,MAAM,aAAa;QACjB,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,QAAQ,EAAE,CAAC;QACnC,OAAO,QAAQ,CAAC,OAAO,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,CAAC,GAAG,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC,CAAC;KACpF;;AAhCM,8BAAY,GAAG,cAAc;;AClBtC;;;;;;;;ACAA;;;;;;;;ACAA;;;;;;;;;;"}
1
+ {"version":3,"file":"testing.mjs","sources":["../../../../../../../src/material/toolbar/testing/toolbar-harness.ts","../../../../../../../src/material/toolbar/testing/toolbar-harness-filters.ts","../../../../../../../src/material/toolbar/testing/public-api.ts","../../../../../../../src/material/toolbar/testing/index.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {ContentContainerComponentHarness, HarnessPredicate, parallel} from '@angular/cdk/testing';\nimport {ToolbarHarnessFilters} from './toolbar-harness-filters';\n\n/** Selectors for different sections of the mat-toolbar that contain user content. */\nexport const enum MatToolbarSection {\n ROW = '.mat-toolbar-row',\n}\n\n/** Harness for interacting with a standard mat-toolbar in tests. */\nexport class MatToolbarHarness extends ContentContainerComponentHarness<MatToolbarSection> {\n static hostSelector = '.mat-toolbar';\n\n private _getRows = this.locatorForAll(MatToolbarSection.ROW);\n\n /**\n * Gets a `HarnessPredicate` that can be used to search for a `MatToolbarHarness` that meets\n * certain criteria.\n * @param options Options for filtering which card instances are considered a match.\n * @return a `HarnessPredicate` configured with the given options.\n */\n static with(options: ToolbarHarnessFilters = {}): HarnessPredicate<MatToolbarHarness> {\n return new HarnessPredicate(MatToolbarHarness, options).addOption(\n 'text',\n options.text,\n (harness, text) => HarnessPredicate.stringMatches(harness._getText(), text),\n );\n }\n\n /** Whether the toolbar has multiple rows. */\n async hasMultipleRows(): Promise<boolean> {\n return (await this.host()).hasClass('mat-toolbar-multiple-rows');\n }\n\n /** Gets all of the toolbar's content as text. */\n private async _getText(): Promise<string> {\n return (await this.host()).text();\n }\n\n /** Gets the text of each row in the toolbar. */\n async getRowsAsText(): Promise<string[]> {\n const rows = await this._getRows();\n return parallel(() => (rows.length ? rows.map(r => r.text()) : [this._getText()]));\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {BaseHarnessFilters} from '@angular/cdk/testing';\n\n/** A set of criteria that can be used to filter a list of `MatToolbarHarness` instances. */\nexport interface ToolbarHarnessFilters extends BaseHarnessFilters {\n /** Only find instances whose text matches the given value. */\n text?: string | RegExp;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nexport * from './toolbar-harness';\nexport * from './toolbar-harness-filters';\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;AAAA;;;;;;AAMG;AAUH;AACM,MAAO,iBAAkB,SAAQ,gCAAmD,CAAA;AAA1F,IAAA,WAAA,GAAA;;AAGU,QAAA,IAAA,CAAA,QAAQ,GAAG,IAAI,CAAC,aAAa,8BAAuB,CAAC;KA+B9D;AA7BC;;;;;AAKG;AACH,IAAA,OAAO,IAAI,CAAC,OAAA,GAAiC,EAAE,EAAA;AAC7C,QAAA,OAAO,IAAI,gBAAgB,CAAC,iBAAiB,EAAE,OAAO,CAAC,CAAC,SAAS,CAC/D,MAAM,EACN,OAAO,CAAC,IAAI,EACZ,CAAC,OAAO,EAAE,IAAI,KAAK,gBAAgB,CAAC,aAAa,CAAC,OAAO,CAAC,QAAQ,EAAE,EAAE,IAAI,CAAC,CAC5E,CAAC;KACH;;AAGD,IAAA,MAAM,eAAe,GAAA;AACnB,QAAA,OAAO,CAAC,MAAM,IAAI,CAAC,IAAI,EAAE,EAAE,QAAQ,CAAC,2BAA2B,CAAC,CAAC;KAClE;;AAGO,IAAA,MAAM,QAAQ,GAAA;QACpB,OAAO,CAAC,MAAM,IAAI,CAAC,IAAI,EAAE,EAAE,IAAI,EAAE,CAAC;KACnC;;AAGD,IAAA,MAAM,aAAa,GAAA;AACjB,QAAA,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,QAAQ,EAAE,CAAC;AACnC,QAAA,OAAO,QAAQ,CAAC,OAAO,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,CAAC,GAAG,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC,CAAC;KACpF;;AAhCM,iBAAY,CAAA,YAAA,GAAG,cAAc;;AClBtC;;;;;;AAMG;;ACNH;;;;;;AAMG;;ACNH;;;;;;AAMG;;;;"}
@@ -20,9 +20,9 @@ const _MatToolbarBase = mixinColor(class {
20
20
  });
21
21
  class MatToolbarRow {
22
22
  }
23
- MatToolbarRow.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: MatToolbarRow, deps: [], target: i0.ɵɵFactoryTarget.Directive });
24
- MatToolbarRow.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.2.0", type: MatToolbarRow, selector: "mat-toolbar-row", host: { classAttribute: "mat-toolbar-row" }, exportAs: ["matToolbarRow"], ngImport: i0 });
25
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: MatToolbarRow, decorators: [{
23
+ MatToolbarRow.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: MatToolbarRow, deps: [], target: i0.ɵɵFactoryTarget.Directive });
24
+ MatToolbarRow.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.0", type: MatToolbarRow, selector: "mat-toolbar-row", host: { classAttribute: "mat-toolbar-row" }, exportAs: ["matToolbarRow"], ngImport: i0 });
25
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: MatToolbarRow, decorators: [{
26
26
  type: Directive,
27
27
  args: [{
28
28
  selector: 'mat-toolbar-row',
@@ -60,9 +60,9 @@ class MatToolbar extends _MatToolbarBase {
60
60
  }
61
61
  }
62
62
  }
63
- MatToolbar.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: MatToolbar, deps: [{ token: i0.ElementRef }, { token: i1.Platform }, { token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Component });
64
- MatToolbar.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.0", type: MatToolbar, selector: "mat-toolbar", inputs: { color: "color" }, host: { properties: { "class.mat-toolbar-multiple-rows": "_toolbarRows.length > 0", "class.mat-toolbar-single-row": "_toolbarRows.length === 0" }, classAttribute: "mat-toolbar" }, queries: [{ propertyName: "_toolbarRows", predicate: MatToolbarRow, descendants: true }], exportAs: ["matToolbar"], usesInheritance: true, ngImport: i0, template: "<ng-content></ng-content>\n<ng-content select=\"mat-toolbar-row\"></ng-content>\n", styles: [".cdk-high-contrast-active .mat-toolbar{outline:solid 1px}.mat-toolbar-row,.mat-toolbar-single-row{display:flex;box-sizing:border-box;padding:0 16px;width:100%;flex-direction:row;align-items:center;white-space:nowrap}.mat-toolbar-multiple-rows{display:flex;box-sizing:border-box;flex-direction:column;width:100%}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
65
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: MatToolbar, decorators: [{
63
+ MatToolbar.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: MatToolbar, deps: [{ token: i0.ElementRef }, { token: i1.Platform }, { token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Component });
64
+ MatToolbar.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.0", type: MatToolbar, selector: "mat-toolbar", inputs: { color: "color" }, host: { properties: { "class.mat-toolbar-multiple-rows": "_toolbarRows.length > 0", "class.mat-toolbar-single-row": "_toolbarRows.length === 0" }, classAttribute: "mat-toolbar" }, queries: [{ propertyName: "_toolbarRows", predicate: MatToolbarRow, descendants: true }], exportAs: ["matToolbar"], usesInheritance: true, ngImport: i0, template: "<ng-content></ng-content>\n<ng-content select=\"mat-toolbar-row\"></ng-content>\n", styles: [".cdk-high-contrast-active .mat-toolbar{outline:solid 1px}.mat-toolbar-row,.mat-toolbar-single-row{display:flex;box-sizing:border-box;padding:0 16px;width:100%;flex-direction:row;align-items:center;white-space:nowrap}.mat-toolbar-multiple-rows{display:flex;box-sizing:border-box;flex-direction:column;width:100%}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
65
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: MatToolbar, decorators: [{
66
66
  type: Component,
67
67
  args: [{ selector: 'mat-toolbar', exportAs: 'matToolbar', inputs: ['color'], host: {
68
68
  'class': 'mat-toolbar',
@@ -95,10 +95,10 @@ function throwToolbarMixedModesError() {
95
95
  */
96
96
  class MatToolbarModule {
97
97
  }
98
- MatToolbarModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: MatToolbarModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
99
- MatToolbarModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: MatToolbarModule, declarations: [MatToolbar, MatToolbarRow], imports: [MatCommonModule], exports: [MatToolbar, MatToolbarRow, MatCommonModule] });
100
- MatToolbarModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: MatToolbarModule, imports: [[MatCommonModule], MatCommonModule] });
101
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: MatToolbarModule, decorators: [{
98
+ MatToolbarModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: MatToolbarModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
99
+ MatToolbarModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: MatToolbarModule, declarations: [MatToolbar, MatToolbarRow], imports: [MatCommonModule], exports: [MatToolbar, MatToolbarRow, MatCommonModule] });
100
+ MatToolbarModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: MatToolbarModule, imports: [[MatCommonModule], MatCommonModule] });
101
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: MatToolbarModule, decorators: [{
102
102
  type: NgModule,
103
103
  args: [{
104
104
  imports: [MatCommonModule],
@@ -1 +1 @@
1
- {"version":3,"file":"toolbar.mjs","sources":["../../../../../../src/material/toolbar/toolbar.ts","../../../../../../src/material/toolbar/toolbar.html","../../../../../../src/material/toolbar/toolbar-module.ts","../../../../../../src/material/toolbar/public-api.ts","../../../../../../src/material/toolbar/index.ts","../../../../../../src/material/toolbar/toolbar_public_index.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Platform} from '@angular/cdk/platform';\nimport {DOCUMENT} from '@angular/common';\nimport {\n AfterViewInit,\n ChangeDetectionStrategy,\n Component,\n ContentChildren,\n Directive,\n ElementRef,\n Inject,\n QueryList,\n ViewEncapsulation,\n} from '@angular/core';\nimport {CanColor, mixinColor} from '@angular/material/core';\n\n// Boilerplate for applying mixins to MatToolbar.\n/** @docs-private */\nconst _MatToolbarBase = mixinColor(\n class {\n constructor(public _elementRef: ElementRef) {}\n },\n);\n\n@Directive({\n selector: 'mat-toolbar-row',\n exportAs: 'matToolbarRow',\n host: {'class': 'mat-toolbar-row'},\n})\nexport class MatToolbarRow {}\n\n@Component({\n selector: 'mat-toolbar',\n exportAs: 'matToolbar',\n templateUrl: 'toolbar.html',\n styleUrls: ['toolbar.css'],\n inputs: ['color'],\n host: {\n 'class': 'mat-toolbar',\n '[class.mat-toolbar-multiple-rows]': '_toolbarRows.length > 0',\n '[class.mat-toolbar-single-row]': '_toolbarRows.length === 0',\n },\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n})\nexport class MatToolbar extends _MatToolbarBase implements CanColor, AfterViewInit {\n private _document: Document;\n\n /** Reference to all toolbar row elements that have been projected. */\n @ContentChildren(MatToolbarRow, {descendants: true}) _toolbarRows: QueryList<MatToolbarRow>;\n\n constructor(\n elementRef: ElementRef,\n private _platform: Platform,\n @Inject(DOCUMENT) document?: any,\n ) {\n super(elementRef);\n\n // TODO: make the document a required param when doing breaking changes.\n this._document = document;\n }\n\n ngAfterViewInit() {\n if (this._platform.isBrowser) {\n this._checkToolbarMixedModes();\n this._toolbarRows.changes.subscribe(() => this._checkToolbarMixedModes());\n }\n }\n\n /**\n * Throws an exception when developers are attempting to combine the different toolbar row modes.\n */\n private _checkToolbarMixedModes() {\n if (this._toolbarRows.length && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n // Check if there are any other DOM nodes that can display content but aren't inside of\n // a <mat-toolbar-row> element.\n const isCombinedUsage = Array.from<HTMLElement>(this._elementRef.nativeElement.childNodes)\n .filter(node => !(node.classList && node.classList.contains('mat-toolbar-row')))\n .filter(node => node.nodeType !== (this._document ? this._document.COMMENT_NODE : 8))\n .some(node => !!(node.textContent && node.textContent.trim()));\n\n if (isCombinedUsage) {\n throwToolbarMixedModesError();\n }\n }\n }\n}\n\n/**\n * Throws an exception when attempting to combine the different toolbar row modes.\n * @docs-private\n */\nexport function throwToolbarMixedModesError() {\n throw Error(\n 'MatToolbar: Attempting to combine different toolbar modes. ' +\n 'Either specify multiple `<mat-toolbar-row>` elements explicitly or just place content ' +\n 'inside of a `<mat-toolbar>` for a single row.',\n );\n}\n","<ng-content></ng-content>\n<ng-content select=\"mat-toolbar-row\"></ng-content>\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {NgModule} from '@angular/core';\nimport {MatCommonModule} from '@angular/material/core';\nimport {MatToolbar, MatToolbarRow} from './toolbar';\n\n@NgModule({\n imports: [MatCommonModule],\n exports: [MatToolbar, MatToolbarRow, MatCommonModule],\n declarations: [MatToolbar, MatToolbarRow],\n})\nexport class MatToolbarModule {}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nexport * from './toolbar-module';\nexport * from './toolbar';\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nexport * from './public-api';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;AAAA;;;;;;;AAuBA;AACA;AACA,MAAM,eAAe,GAAG,UAAU,CAChC;IACE,YAAmB,WAAuB;QAAvB,gBAAW,GAAX,WAAW,CAAY;KAAI;CAC/C,CACF,CAAC;MAOW,aAAa;;0GAAb,aAAa;8FAAb,aAAa;2FAAb,aAAa;kBALzB,SAAS;mBAAC;oBACT,QAAQ,EAAE,iBAAiB;oBAC3B,QAAQ,EAAE,eAAe;oBACzB,IAAI,EAAE,EAAC,OAAO,EAAE,iBAAiB,EAAC;iBACnC;;MAiBY,UAAW,SAAQ,eAAe;IAM7C,YACE,UAAsB,EACd,SAAmB,EACT,QAAc;QAEhC,KAAK,CAAC,UAAU,CAAC,CAAC;QAHV,cAAS,GAAT,SAAS,CAAU;;QAM3B,IAAI,CAAC,SAAS,GAAG,QAAQ,CAAC;KAC3B;IAED,eAAe;QACb,IAAI,IAAI,CAAC,SAAS,CAAC,SAAS,EAAE;YAC5B,IAAI,CAAC,uBAAuB,EAAE,CAAC;YAC/B,IAAI,CAAC,YAAY,CAAC,OAAO,CAAC,SA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C,CAClD,CAAC;AACJ;;AEzGA;;;;;;;MAiBa,gBAAgB;;6GAAhB,gBAAgB;8GAAhB,gBAAgB,iBAFZ,UAAU,EAAE,aAAa,aAF9B,eAAe,aACf,UAAU,EAAE,aAAa,EAAE,eAAe;8GAGzC,gBAAgB,YAJlB,CAAC,eAAe,CAAC,EACW,eAAe;2FAGzC,gBAAgB;kBAL5B,QAAQ;mBAAC;oBACR,OAAO,EAAE,CAAC,eAAe,CAAC;oBAC1B,OAAO,EAAE,CAAC,UAAU,EAAE,aAAa,EAAE,eAAe,CAAC;oBACrD,YAAY,EAAE,CAAC,UAAU,EAAE,aAAa,CAAC;iBAC1C;;;AChBD;;;;;;;;ACAA;;;;;;;;ACAA;;;;;;"}
1
+ {"version":3,"file":"toolbar.mjs","sources":["../../../../../../src/material/toolbar/toolbar.ts","../../../../../../src/material/toolbar/toolbar.html","../../../../../../src/material/toolbar/toolbar-module.ts","../../../../../../src/material/toolbar/public-api.ts","../../../../../../src/material/toolbar/index.ts","../../../../../../src/material/toolbar/toolbar_public_index.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Platform} from '@angular/cdk/platform';\nimport {DOCUMENT} from '@angular/common';\nimport {\n AfterViewInit,\n ChangeDetectionStrategy,\n Component,\n ContentChildren,\n Directive,\n ElementRef,\n Inject,\n QueryList,\n ViewEncapsulation,\n} from '@angular/core';\nimport {CanColor, mixinColor} from '@angular/material/core';\n\n// Boilerplate for applying mixins to MatToolbar.\n/** @docs-private */\nconst _MatToolbarBase = mixinColor(\n class {\n constructor(public _elementRef: ElementRef) {}\n },\n);\n\n@Directive({\n selector: 'mat-toolbar-row',\n exportAs: 'matToolbarRow',\n host: {'class': 'mat-toolbar-row'},\n})\nexport class MatToolbarRow {}\n\n@Component({\n selector: 'mat-toolbar',\n exportAs: 'matToolbar',\n templateUrl: 'toolbar.html',\n styleUrls: ['toolbar.css'],\n inputs: ['color'],\n host: {\n 'class': 'mat-toolbar',\n '[class.mat-toolbar-multiple-rows]': '_toolbarRows.length > 0',\n '[class.mat-toolbar-single-row]': '_toolbarRows.length === 0',\n },\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n})\nexport class MatToolbar extends _MatToolbarBase implements CanColor, AfterViewInit {\n private _document: Document;\n\n /** Reference to all toolbar row elements that have been projected. */\n @ContentChildren(MatToolbarRow, {descendants: true}) _toolbarRows: QueryList<MatToolbarRow>;\n\n constructor(\n elementRef: ElementRef,\n private _platform: Platform,\n @Inject(DOCUMENT) document?: any,\n ) {\n super(elementRef);\n\n // TODO: make the document a required param when doing breaking changes.\n this._document = document;\n }\n\n ngAfterViewInit() {\n if (this._platform.isBrowser) {\n this._checkToolbarMixedModes();\n this._toolbarRows.changes.subscribe(() => this._checkToolbarMixedModes());\n }\n }\n\n /**\n * Throws an exception when developers are attempting to combine the different toolbar row modes.\n */\n private _checkToolbarMixedModes() {\n if (this._toolbarRows.length && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n // Check if there are any other DOM nodes that can display content but aren't inside of\n // a <mat-toolbar-row> element.\n const isCombinedUsage = Array.from<HTMLElement>(this._elementRef.nativeElement.childNodes)\n .filter(node => !(node.classList && node.classList.contains('mat-toolbar-row')))\n .filter(node => node.nodeType !== (this._document ? this._document.COMMENT_NODE : 8))\n .some(node => !!(node.textContent && node.textContent.trim()));\n\n if (isCombinedUsage) {\n throwToolbarMixedModesError();\n }\n }\n }\n}\n\n/**\n * Throws an exception when attempting to combine the different toolbar row modes.\n * @docs-private\n */\nexport function throwToolbarMixedModesError() {\n throw Error(\n 'MatToolbar: Attempting to combine different toolbar modes. ' +\n 'Either specify multiple `<mat-toolbar-row>` elements explicitly or just place content ' +\n 'inside of a `<mat-toolbar>` for a single row.',\n );\n}\n","<ng-content></ng-content>\n<ng-content select=\"mat-toolbar-row\"></ng-content>\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {NgModule} from '@angular/core';\nimport {MatCommonModule} from '@angular/material/core';\nimport {MatToolbar, MatToolbarRow} from './toolbar';\n\n@NgModule({\n imports: [MatCommonModule],\n exports: [MatToolbar, MatToolbarRow, MatCommonModule],\n declarations: [MatToolbar, MatToolbarRow],\n})\nexport class MatToolbarModule {}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nexport * from './toolbar-module';\nexport * from './toolbar';\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nexport * from './public-api';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;AAAA;;;;;;AAMG;AAiBH;AACA;AACA,MAAM,eAAe,GAAG,UAAU,CAChC,MAAA;AACE,IAAA,WAAA,CAAmB,WAAuB,EAAA;QAAvB,IAAW,CAAA,WAAA,GAAX,WAAW,CAAY;KAAI;AAC/C,CAAA,CACF,CAAC;MAOW,aAAa,CAAA;;0GAAb,aAAa,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;8FAAb,aAAa,EAAA,QAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,cAAA,EAAA,iBAAA,EAAA,EAAA,QAAA,EAAA,CAAA,eAAA,CAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;2FAAb,aAAa,EAAA,UAAA,EAAA,CAAA;kBALzB,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,iBAAiB;AAC3B,oBAAA,QAAQ,EAAE,eAAe;AACzB,oBAAA,IAAI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23 +14,25 @@ class _MatTooltipHarnessBase extends ComponentHarness {
14
14
  // We need to dispatch both `touchstart` and a hover event, because the tooltip binds
15
15
  // different events depending on the device. The `changedTouches` is there in case the
16
16
  // element has ripples.
17
- // @breaking-change 12.0.0 Remove null assertion from `dispatchEvent`.
18
- await host.dispatchEvent?.('touchstart', { changedTouches: [] });
17
+ await host.dispatchEvent('touchstart', { changedTouches: [] });
19
18
  await host.hover();
19
+ const panel = await this._optionalPanel();
20
+ await panel?.dispatchEvent('animationend', { animationName: this._showAnimationName });
20
21
  }
21
22
  /** Hides the tooltip. */
22
23
  async hide() {
23
24
  const host = await this.host();
24
25
  // We need to dispatch both `touchstart` and a hover event, because
25
26
  // the tooltip binds different events depending on the device.
26
- // @breaking-change 12.0.0 Remove null assertion from `dispatchEvent`.
27
- await host.dispatchEvent?.('touchend');
27
+ await host.dispatchEvent('touchend');
28
28
  await host.mouseAway();
29
- await this.forceStabilize(); // Needed in order to flush the `hide` animation.
29
+ const panel = await this._optionalPanel();
30
+ await panel?.dispatchEvent('animationend', { animationName: this._hideAnimationName });
30
31
  }
31
32
  /** Gets whether the tooltip is open. */
32
33
  async isOpen() {
33
- return !!(await this._optionalPanel());
34
+ const panel = await this._optionalPanel();
35
+ return !!panel && !(await panel.hasClass(this._hiddenClass));
34
36
  }
35
37
  /** Gets a promise for the tooltip panel's text. */
36
38
  async getTooltipText() {
@@ -43,6 +45,9 @@ class MatTooltipHarness extends _MatTooltipHarnessBase {
43
45
  constructor() {
44
46
  super(...arguments);
45
47
  this._optionalPanel = this.documentRootLocatorFactory().locatorForOptional('.mat-tooltip');
48
+ this._hiddenClass = 'mat-tooltip-hide';
49
+ this._showAnimationName = 'mat-tooltip-show';
50
+ this._hideAnimationName = 'mat-tooltip-hide';
46
51
  }
47
52
  /**
48
53
  * Gets a `HarnessPredicate` that can be used to search
@@ -1 +1 @@
1
- {"version":3,"file":"testing.mjs","sources":["../../../../../../../src/material/tooltip/testing/tooltip-harness.ts","../../../../../../../src/material/tooltip/testing/tooltip-harness-filters.ts","../../../../../../../src/material/tooltip/testing/public-api.ts","../../../../../../../src/material/tooltip/testing/index.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {\n AsyncFactoryFn,\n ComponentHarness,\n HarnessPredicate,\n TestElement,\n} from '@angular/cdk/testing';\nimport {TooltipHarnessFilters} from './tooltip-harness-filters';\n\nexport abstract class _MatTooltipHarnessBase extends ComponentHarness {\n protected abstract _optionalPanel: AsyncFactoryFn<TestElement | null>;\n\n /** Shows the tooltip. */\n async show(): Promise<void> {\n const host = await this.host();\n\n // We need to dispatch both `touchstart` and a hover event, because the tooltip binds\n // different events depending on the device. The `changedTouches` is there in case the\n // element has ripples.\n // @breaking-change 12.0.0 Remove null assertion from `dispatchEvent`.\n await host.dispatchEvent?.('touchstart', {changedTouches: []});\n await host.hover();\n }\n\n /** Hides the tooltip. */\n async hide(): Promise<void> {\n const host = await this.host();\n\n // We need to dispatch both `touchstart` and a hover event, because\n // the tooltip binds different events depending on the device.\n // @breaking-change 12.0.0 Remove null assertion from `dispatchEvent`.\n await host.dispatchEvent?.('touchend');\n await host.mouseAway();\n await this.forceStabilize(); // Needed in order to flush the `hide` animation.\n }\n\n /** Gets whether the tooltip is open. */\n async isOpen(): Promise<boolean> {\n return !!(await this._optionalPanel());\n }\n\n /** Gets a promise for the tooltip panel's text. */\n async getTooltipText(): Promise<string> {\n const panel = await this._optionalPanel();\n return panel ? panel.text() : '';\n }\n}\n\n/** Harness for interacting with a standard mat-tooltip in tests. */\nexport class MatTooltipHarness extends _MatTooltipHarnessBase {\n protected _optionalPanel = this.documentRootLocatorFactory().locatorForOptional('.mat-tooltip');\n static hostSelector = '.mat-tooltip-trigger';\n\n /**\n * Gets a `HarnessPredicate` that can be used to search\n * for a tooltip trigger with specific attributes.\n * @param options Options for narrowing the search.\n * @return a `HarnessPredicate` configured with the given options.\n */\n static with(options: TooltipHarnessFilters = {}): HarnessPredicate<MatTooltipHarness> {\n return new HarnessPredicate(MatTooltipHarness, options);\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {BaseHarnessFilters} from '@angular/cdk/testing';\n\n/** A set of criteria that can be used to filter a list of `MatTooltipHarness` instances. */\nexport interface TooltipHarnessFilters extends BaseHarnessFilters {}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nexport * from './tooltip-harness';\nexport * from './tooltip-harness-filters';\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;AAAA;;;;;;;MAgBsB,sBAAuB,SAAQ,gBAAgB;;IAInE,MAAM,IAAI;QACR,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,IAAI,EAAE,CAAC;;;;;QAM/B,MAAM,IAAI,CAAC,aAAa,GAAG,YAAY,EAAE,EAAC,cAAc,EAAE,EAAE,EAAC,CAAC,CAAC;QAC/D,MAAM,IAAI,CAAC,KAAK,EAAE,CAAC;KACpB;;IAGD,MAAM,IAAI;QACR,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,IAAI,EAAE,CAAC;;;;QAK/B,MAAM,IAAI,CAAC,aAAa,GAAG,UAAU,CAAC,CAAC;QACvC,MAAM,IAAI,CAAC,SAAS,EAAE,CAAC;QACvB,MAAM,IAAI,CAAC,cAAc,EAAE,CAAC;KAC7B;;IAGD,MAAM,MAAM;QACV,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC,cAAc,EAAE,CAAC,CAAC;KACxC;;IAGD,MAAM,cAAc;QAClB,MAAM,KAAK,GAAG,MAAM,IAAI,CAAC,cAAc,EAAE,CAAC;QAC1C,OAAO,KAAK,GAAG,KAAK,CAAC,IAAI,EAAE,GAAG,EAAE,CAAC;KAClC;CACF;AAED;MACa,iBAAkB,SAAQ,sBAAsB;IAA7D;;QACY,mBAAc,GAAG,IAAI,CAAC,0BAA0B,EAAE,CAAC,kBAAkB,CAAC,cAAc,CAAC,CAAC;KAYjG;;;;;;;IAHC,OAAO,IAAI,CAAC,UAAiC,EAAE;QAC7C,OAAO,IAAI,gBAAgB,CAAC,iBAAiB,EAAE,OAAO,CAAC,CAAC;KACzD;;AAVM,8BAAY,GAAG,sBAAsB;;AC1D9C;;;;;;;;ACAA;;;;;;;;ACAA;;;;;;;;;;"}
1
+ {"version":3,"file":"testing.mjs","sources":["../../../../../../../src/material/tooltip/testing/tooltip-harness.ts","../../../../../../../src/material/tooltip/testing/tooltip-harness-filters.ts","../../../../../../../src/material/tooltip/testing/public-api.ts","../../../../../../../src/material/tooltip/testing/index.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {\n AsyncFactoryFn,\n ComponentHarness,\n HarnessPredicate,\n TestElement,\n} from '@angular/cdk/testing';\nimport {TooltipHarnessFilters} from './tooltip-harness-filters';\n\nexport abstract class _MatTooltipHarnessBase extends ComponentHarness {\n protected abstract _optionalPanel: AsyncFactoryFn<TestElement | null>;\n protected abstract _hiddenClass: string;\n protected abstract _showAnimationName: string;\n protected abstract _hideAnimationName: string;\n\n /** Shows the tooltip. */\n async show(): Promise<void> {\n const host = await this.host();\n\n // We need to dispatch both `touchstart` and a hover event, because the tooltip binds\n // different events depending on the device. The `changedTouches` is there in case the\n // element has ripples.\n await host.dispatchEvent('touchstart', {changedTouches: []});\n await host.hover();\n const panel = await this._optionalPanel();\n await panel?.dispatchEvent('animationend', {animationName: this._showAnimationName});\n }\n\n /** Hides the tooltip. */\n async hide(): Promise<void> {\n const host = await this.host();\n\n // We need to dispatch both `touchstart` and a hover event, because\n // the tooltip binds different events depending on the device.\n await host.dispatchEvent('touchend');\n await host.mouseAway();\n const panel = await this._optionalPanel();\n await panel?.dispatchEvent('animationend', {animationName: this._hideAnimationName});\n }\n\n /** Gets whether the tooltip is open. */\n async isOpen(): Promise<boolean> {\n const panel = await this._optionalPanel();\n return !!panel && !(await panel.hasClass(this._hiddenClass));\n }\n\n /** Gets a promise for the tooltip panel's text. */\n async getTooltipText(): Promise<string> {\n const panel = await this._optionalPanel();\n return panel ? panel.text() : '';\n }\n}\n\n/** Harness for interacting with a standard mat-tooltip in tests. */\nexport class MatTooltipHarness extends _MatTooltipHarnessBase {\n protected _optionalPanel = this.documentRootLocatorFactory().locatorForOptional('.mat-tooltip');\n protected _hiddenClass = 'mat-tooltip-hide';\n protected _showAnimationName = 'mat-tooltip-show';\n protected _hideAnimationName = 'mat-tooltip-hide';\n static hostSelector = '.mat-tooltip-trigger';\n\n /**\n * Gets a `HarnessPredicate` that can be used to search\n * for a tooltip trigger with specific attributes.\n * @param options Options for narrowing the search.\n * @return a `HarnessPredicate` configured with the given options.\n */\n static with(options: TooltipHarnessFilters = {}): HarnessPredicate<MatTooltipHarness> {\n return new HarnessPredicate(MatTooltipHarness, options);\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {BaseHarnessFilters} from '@angular/cdk/testing';\n\n/** A set of criteria that can be used to filter a list of `MatTooltipHarness` instances. */\nexport interface TooltipHarnessFilters extends BaseHarnessFilters {}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nexport * from './tooltip-harness';\nexport * from './tooltip-harness-filters';\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENS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AAC,cAAc,EAAE,CAAC;AAC1C,QAAA,OAAO,KAAK,GAAG,KAAK,CAAC,IAAI,EAAE,GAAG,EAAE,CAAC;KAClC;AACF,CAAA;AAED;AACM,MAAO,iBAAkB,SAAQ,sBAAsB,CAAA;AAA7D,IAAA,WAAA,GAAA;;QACY,IAAc,CAAA,cAAA,GAAG,IAAI,CAAC,0BAA0B,EAAE,CAAC,kBAAkB,CAAC,cAAc,CAAC,CAAC;QACtF,IAAY,CAAA,YAAA,GAAG,kBAAkB,CAAC;QAClC,IAAkB,CAAA,kBAAA,GAAG,kBAAkB,CAAC;QACxC,IAAkB,CAAA,kBAAA,GAAG,kBAAkB,CAAC;KAYnD;AATC;;;;;AAKG;AACH,IAAA,OAAO,IAAI,CAAC,OAAA,GAAiC,EAAE,EAAA;AAC7C,QAAA,OAAO,IAAI,gBAAgB,CAAC,iBAAiB,EAAE,OAAO,CAAC,CAAC;KACzD;;AAVM,iBAAY,CAAA,YAAA,GAAG,sBAAsB;;AClE9C;;;;;;AAMG;;ACNH;;;;;;AAMG;;ACNH;;;;;;AAMG;;;;"}
@@ -5,7 +5,7 @@ import { A11yModule } from '@angular/cdk/a11y';
5
5
  import * as i7 from '@angular/common';
6
6
  import { DOCUMENT, CommonModule } from '@angular/common';
7
7
  import * as i0 from '@angular/core';
8
- import { InjectionToken, Directive, Inject, Input, Optional, Component, ViewEncapsulation, ChangeDetectionStrategy, NgModule } from '@angular/core';
8
+ import { InjectionToken, Directive, Inject, Input, Optional, Component, ViewEncapsulation, ChangeDetectionStrategy, ViewChild, NgModule } from '@angular/core';
9
9
  import { MatCommonModule } from '@angular/material/core';
10
10
  import * as i2 from '@angular/cdk/scrolling';
11
11
  import { CdkScrollableModule } from '@angular/cdk/scrolling';
@@ -17,6 +17,7 @@ import { Breakpoints } from '@angular/cdk/layout';
17
17
  import * as i3 from '@angular/cdk/platform';
18
18
  import { normalizePassiveListenerOptions } from '@angular/cdk/platform';
19
19
  import { ComponentPortal } from '@angular/cdk/portal';
20
+ import { ANIMATION_MODULE_TYPE } from '@angular/platform-browser/animations';
20
21
  import { Subject } from 'rxjs';
21
22
  import { takeUntil, take } from 'rxjs/operators';
22
23
  import { trigger, state, style, transition, animate, keyframes } from '@angular/animations';
@@ -28,24 +29,6 @@ import { trigger, state, style, transition, animate, keyframes } from '@angular/
28
29
  * Use of this source code is governed by an MIT-style license that can be
29
30
  * found in the LICENSE file at https://angular.io/license
30
31
  */
31
- /**
32
- * Animations used by MatTooltip.
33
- * @docs-private
34
- */
35
- const matTooltipAnimations = {
36
- /** Animation that transitions a tooltip in and out. */
37
- tooltipState: trigger('state', [
38
- state('initial, void, hidden', style({ opacity: 0, transform: 'scale(0)' })),
39
- state('visible', style({ transform: 'scale(1)' })),
40
- transition('* => visible', animate('200ms cubic-bezier(0, 0, 0.2, 1)', keyframes([
41
- style({ opacity: 0, transform: 'scale(0)', offset: 0 }),
42
- style({ opacity: 0.5, transform: 'scale(0.99)', offset: 0.5 }),
43
- style({ opacity: 1, transform: 'scale(1)', offset: 1 }),
44
- ]))),
45
- transition('* => hidden', animate('100ms cubic-bezier(0, 0, 0.2, 1)', style({ opacity: 0 }))),
46
- ]),
47
- };
48
-
49
32
  /** Time in ms to throttle repositioning after scroll events. */
50
33
  const SCROLL_THROTTLE_MS = 20;
51
34
  /**
@@ -623,9 +606,9 @@ class _MatTooltipBase {
623
606
  }
624
607
  }
625
608
  }
626
- _MatTooltipBase.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: _MatTooltipBase, deps: "invalid", target: i0.ɵɵFactoryTarget.Directive });
627
- _MatTooltipBase.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.2.0", type: _MatTooltipBase, inputs: { position: ["matTooltipPosition", "position"], disabled: ["matTooltipDisabled", "disabled"], showDelay: ["matTooltipShowDelay", "showDelay"], hideDelay: ["matTooltipHideDelay", "hideDelay"], touchGestures: ["matTooltipTouchGestures", "touchGestures"], message: ["matTooltip", "message"], tooltipClass: ["matTooltipClass", "tooltipClass"] }, ngImport: i0 });
628
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: _MatTooltipBase, decorators: [{
609
+ _MatTooltipBase.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: _MatTooltipBase, deps: "invalid", target: i0.ɵɵFactoryTarget.Directive });
610
+ _MatTooltipBase.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.0", type: _MatTooltipBase, inputs: { position: ["matTooltipPosition", "position"], disabled: ["matTooltipDisabled", "disabled"], showDelay: ["matTooltipShowDelay", "showDelay"], hideDelay: ["matTooltipHideDelay", "hideDelay"], touchGestures: ["matTooltipTouchGestures", "touchGestures"], message: ["matTooltip", "message"], tooltipClass: ["matTooltipClass", "tooltipClass"] }, ngImport: i0 });
611
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: _MatTooltipBase, decorators: [{
629
612
  type: Directive
630
613
  }], ctorParameters: function () { return [{ type: i1.Overlay }, { type: i0.ElementRef }, { type: i2.ScrollDispatcher }, { type: i0.ViewContainerRef }, { type: i0.NgZone }, { type: i3.Platform }, { type: i4.AriaDescriber }, { type: i4.FocusMonitor }, { type: undefined }, { type: i5.Directionality }, { type: undefined }, { type: undefined, decorators: [{
631
614
  type: Inject,
@@ -664,9 +647,9 @@ class MatTooltip extends _MatTooltipBase {
664
647
  this._tooltipComponent = TooltipComponent;
665
648
  }
666
649
  }
667
- MatTooltip.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: MatTooltip, deps: [{ token: i1.Overlay }, { token: i0.ElementRef }, { token: i2.ScrollDispatcher }, { token: i0.ViewContainerRef }, { token: i0.NgZone }, { token: i3.Platform }, { token: i4.AriaDescriber }, { token: i4.FocusMonitor }, { token: MAT_TOOLTIP_SCROLL_STRATEGY }, { token: i5.Directionality, optional: true }, { token: MAT_TOOLTIP_DEFAULT_OPTIONS, optional: true }, { token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Directive });
668
- MatTooltip.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.2.0", type: MatTooltip, selector: "[matTooltip]", host: { classAttribute: "mat-tooltip-trigger" }, exportAs: ["matTooltip"], usesInheritance: true, ngImport: i0 });
669
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: MatTooltip, decorators: [{
650
+ MatTooltip.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: MatTooltip, deps: [{ token: i1.Overlay }, { token: i0.ElementRef }, { token: i2.ScrollDispatcher }, { token: i0.ViewContainerRef }, { token: i0.NgZone }, { token: i3.Platform }, { token: i4.AriaDescriber }, { token: i4.FocusMonitor }, { token: MAT_TOOLTIP_SCROLL_STRATEGY }, { token: i5.Directionality, optional: true }, { token: MAT_TOOLTIP_DEFAULT_OPTIONS, optional: true }, { token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Directive });
651
+ MatTooltip.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.0", type: MatTooltip, selector: "[matTooltip]", host: { classAttribute: "mat-tooltip-trigger" }, exportAs: ["matTooltip"], usesInheritance: true, ngImport: i0 });
652
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: MatTooltip, decorators: [{
670
653
  type: Directive,
671
654
  args: [{
672
655
  selector: '[matTooltip]',
@@ -690,14 +673,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.0", ngImpor
690
673
  args: [DOCUMENT]
691
674
  }] }]; } });
692
675
  class _TooltipComponentBase {
693
- constructor(_changeDetectorRef) {
676
+ constructor(_changeDetectorRef, animationMode) {
694
677
  this._changeDetectorRef = _changeDetectorRef;
695
678
  /** Property watched by the animation framework to show or hide the tooltip */
696
679
  this._visibility = 'initial';
697
680
  /** Whether interactions on the page should close the tooltip */
698
681
  this._closeOnInteraction = false;
682
+ /** Whether the tooltip is currently visible. */
683
+ this._isVisible = false;
699
684
  /** Subject for notifying that the tooltip has been hidden from the view */
700
685
  this._onHide = new Subject();
686
+ this._animationsDisabled = animationMode === 'NoopAnimations';
701
687
  }
702
688
  /**
703
689
  * Shows the tooltip with an animation originating from the provided origin
@@ -706,15 +692,9 @@ class _TooltipComponentBase {
706
692
  show(delay) {
707
693
  // Cancel the delayed hide if it is scheduled
708
694
  clearTimeout(this._hideTimeoutId);
709
- // Body interactions should cancel the tooltip if there is a delay in showing.
710
- this._closeOnInteraction = true;
711
695
  this._showTimeoutId = setTimeout(() => {
712
- this._visibility = 'visible';
696
+ this._toggleVisibility(true);
713
697
  this._showTimeoutId = undefined;
714
- this._onShow();
715
- // Mark for check so if any parent component has set the
716
- // ChangeDetectionStrategy to OnPush it will be checked anyways
717
- this._markForCheck();
718
698
  }, delay);
719
699
  }
720
700
  /**
@@ -725,11 +705,8 @@ class _TooltipComponentBase {
725
705
  // Cancel the delayed show if it is scheduled
726
706
  clearTimeout(this._showTimeoutId);
727
707
  this._hideTimeoutId = setTimeout(() => {
728
- this._visibility = 'hidden';
708
+ this._toggleVisibility(false);
729
709
  this._hideTimeoutId = undefined;
730
- // Mark for check so if any parent component has set the
731
- // ChangeDetectionStrategy to OnPush it will be checked anyways
732
- this._markForCheck();
733
710
  }, delay);
734
711
  }
735
712
  /** Returns an observable that notifies when the tooltip has been hidden from view. */
@@ -738,7 +715,7 @@ class _TooltipComponentBase {
738
715
  }
739
716
  /** Whether the tooltip is being displayed. */
740
717
  isVisible() {
741
- return this._visibility === 'visible';
718
+ return this._isVisible;
742
719
  }
743
720
  ngOnDestroy() {
744
721
  clearTimeout(this._showTimeoutId);
@@ -746,18 +723,6 @@ class _TooltipComponentBase {
746
723
  this._onHide.complete();
747
724
  this._triggerElement = null;
748
725
  }
749
- _animationStart() {
750
- this._closeOnInteraction = false;
751
- }
752
- _animationDone(event) {
753
- const toState = event.toState;
754
- if (toState === 'hidden' && !this.isVisible()) {
755
- this._onHide.next();
756
- }
757
- if (toState === 'visible' || toState === 'hidden') {
758
- this._closeOnInteraction = true;
759
- }
760
- }
761
726
  /**
762
727
  * Interactions on the HTML body should close the tooltip immediately as defined in the
763
728
  * material design spec.
@@ -787,36 +752,99 @@ class _TooltipComponentBase {
787
752
  * in the mdc-tooltip, not here.
788
753
  */
789
754
  _onShow() { }
755
+ /** Event listener dispatched when an animation on the tooltip finishes. */
756
+ _handleAnimationEnd({ animationName }) {
757
+ if (animationName === this._showAnimation || animationName === this._hideAnimation) {
758
+ this._finalizeAnimation(animationName === this._showAnimation);
759
+ }
760
+ }
761
+ /** Handles the cleanup after an animation has finished. */
762
+ _finalizeAnimation(toVisible) {
763
+ if (toVisible) {
764
+ this._closeOnInteraction = true;
765
+ }
766
+ else if (!this.isVisible()) {
767
+ this._onHide.next();
768
+ }
769
+ }
770
+ /** Toggles the visibility of the tooltip element. */
771
+ _toggleVisibility(isVisible) {
772
+ // We set the classes directly here ourselves so that toggling the tooltip state
773
+ // isn't bound by change detection. This allows us to hide it even if the
774
+ // view ref has been detached from the CD tree.
775
+ const tooltip = this._tooltip.nativeElement;
776
+ const showClass = this._showAnimation;
777
+ const hideClass = this._hideAnimation;
778
+ tooltip.classList.remove(isVisible ? hideClass : showClass);
779
+ tooltip.classList.add(isVisible ? showClass : hideClass);
780
+ this._isVisible = isVisible;
781
+ // It's common for internal apps to disable animations using `* { animation: none !important }`
782
+ // which can break the opening sequence. Try to detect such cases and work around them.
783
+ if (isVisible && !this._animationsDisabled && typeof getComputedStyle === 'function') {
784
+ const styles = getComputedStyle(tooltip);
785
+ // Use `getPropertyValue` to avoid issues with property renaming.
786
+ if (styles.getPropertyValue('animation-duration') === '0s' ||
787
+ styles.getPropertyValue('animation-name') === 'none') {
788
+ this._animationsDisabled = true;
789
+ }
790
+ }
791
+ if (isVisible) {
792
+ this._onShow();
793
+ }
794
+ if (this._animationsDisabled) {
795
+ tooltip.classList.add('_mat-animation-noopable');
796
+ this._finalizeAnimation(isVisible);
797
+ }
798
+ }
790
799
  }
791
- _TooltipComponentBase.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: _TooltipComponentBase, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Directive });
792
- _TooltipComponentBase.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.2.0", type: _TooltipComponentBase, ngImport: i0 });
793
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: _TooltipComponentBase, decorators: [{
800
+ _TooltipComponentBase.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: _TooltipComponentBase, deps: [{ token: i0.ChangeDetectorRef }, { token: ANIMATION_MODULE_TYPE, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
801
+ _TooltipComponentBase.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.0", type: _TooltipComponentBase, ngImport: i0 });
802
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: _TooltipComponentBase, decorators: [{
794
803
  type: Directive
795
- }], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }]; } });
804
+ }], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: undefined, decorators: [{
805
+ type: Optional
806
+ }, {
807
+ type: Inject,
808
+ args: [ANIMATION_MODULE_TYPE]
809
+ }] }]; } });
796
810
  /**
797
811
  * Internal component that wraps the tooltip's content.
798
812
  * @docs-private
799
813
  */
800
814
  class TooltipComponent extends _TooltipComponentBase {
801
- constructor(changeDetectorRef, _breakpointObserver) {
802
- super(changeDetectorRef);
815
+ constructor(changeDetectorRef, _breakpointObserver, animationMode) {
816
+ super(changeDetectorRef, animationMode);
803
817
  this._breakpointObserver = _breakpointObserver;
804
818
  /** Stream that emits whether the user has a handset-sized display. */
805
819
  this._isHandset = this._breakpointObserver.observe(Breakpoints.Handset);
820
+ this._showAnimation = 'mat-tooltip-show';
821
+ this._hideAnimation = 'mat-tooltip-hide';
806
822
  }
807
823
  }
808
- TooltipComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: TooltipComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i6.BreakpointObserver }], target: i0.ɵɵFactoryTarget.Component });
809
- TooltipComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.0", type: TooltipComponent, selector: "mat-tooltip-component", host: { attributes: { "aria-hidden": "true" }, listeners: { "mouseleave": "_handleMouseLeave($event)" }, properties: { "style.zoom": "_visibility === \"visible\" ? 1 : null" } }, usesInheritance: true, ngImport: i0, template: "<div class=\"mat-tooltip\"\n [ngClass]=\"tooltipClass\"\n [class.mat-tooltip-handset]=\"(_isHandset | async)?.matches\"\n [@state]=\"_visibility\"\n (@state.start)=\"_animationStart()\"\n (@state.done)=\"_animationDone($event)\">{{message}}</div>\n", styles: [".mat-tooltip{color:#fff;border-radius:4px;margin:14px;max-width:250px;padding-left:8px;padding-right:8px;overflow:hidden;text-overflow:ellipsis}.cdk-high-contrast-active .mat-tooltip{outline:solid 1px}.mat-tooltip-handset{margin:24px;padding-left:16px;padding-right:16px}.mat-tooltip-panel-non-interactive{pointer-events:none}\n"], directives: [{ type: i7.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], pipes: { "async": i7.AsyncPipe }, animations: [matTooltipAnimations.tooltipState], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
810
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: TooltipComponent, decorators: [{
824
+ TooltipComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: TooltipComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i6.BreakpointObserver }, { token: ANIMATION_MODULE_TYPE, optional: true }], target: i0.ɵɵFactoryTarget.Component });
825
+ TooltipComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.0", type: TooltipComponent, selector: "mat-tooltip-component", host: { attributes: { "aria-hidden": "true" }, listeners: { "mouseleave": "_handleMouseLeave($event)" }, properties: { "style.zoom": "isVisible() ? 1 : null" } }, viewQueries: [{ propertyName: "_tooltip", first: true, predicate: ["tooltip"], descendants: true, static: true }], usesInheritance: true, ngImport: i0, template: "<div #tooltip\n class=\"mat-tooltip\"\n (animationend)=\"_handleAnimationEnd($event)\"\n [ngClass]=\"tooltipClass\"\n [class.mat-tooltip-handset]=\"(_isHandset | async)?.matches\">{{message}}</div>\n", styles: [".mat-tooltip{color:#fff;border-radius:4px;margin:14px;max-width:250px;padding-left:8px;padding-right:8px;overflow:hidden;text-overflow:ellipsis;transform:scale(0)}.mat-tooltip._mat-animation-noopable{animation:none;transform:scale(1)}.cdk-high-contrast-active .mat-tooltip{outline:solid 1px}.mat-tooltip-handset{margin:24px;padding-left:16px;padding-right:16px}.mat-tooltip-panel-non-interactive{pointer-events:none}@keyframes mat-tooltip-show{0%{opacity:0;transform:scale(0)}50%{opacity:.5;transform:scale(0.99)}100%{opacity:1;transform:scale(1)}}@keyframes mat-tooltip-hide{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(1)}}.mat-tooltip-show{animation:mat-tooltip-show 200ms cubic-bezier(0, 0, 0.2, 1) forwards}.mat-tooltip-hide{animation:mat-tooltip-hide 100ms cubic-bezier(0, 0, 0.2, 1) forwards}\n"], directives: [{ type: i7.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], pipes: { "async": i7.AsyncPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
826
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: TooltipComponent, decorators: [{
811
827
  type: Component,
812
- args: [{ selector: 'mat-tooltip-component', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, animations: [matTooltipAnimations.tooltipState], host: {
828
+ args: [{ selector: 'mat-tooltip-component', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, host: {
813
829
  // Forces the element to have a layout in IE and Edge. This fixes issues where the element
814
830
  // won't be rendered if the animations are disabled or there is no web animations polyfill.
815
- '[style.zoom]': '_visibility === "visible" ? 1 : null',
831
+ '[style.zoom]': 'isVisible() ? 1 : null',
816
832
  '(mouseleave)': '_handleMouseLeave($event)',
817
833
  'aria-hidden': 'true',
818
- }, template: "<div class=\"mat-tooltip\"\n [ngClass]=\"tooltipClass\"\n [class.mat-tooltip-handset]=\"(_isHandset | async)?.matches\"\n [@state]=\"_visibility\"\n (@state.start)=\"_animationStart()\"\n (@state.done)=\"_animationDone($event)\">{{message}}</div>\n", styles: [".mat-tooltip{color:#fff;border-radius:4px;margin:14px;max-width:250px;padding-left:8px;padding-right:8px;overflow:hidden;text-overflow:ellipsis}.cdk-high-contrast-active .mat-tooltip{outline:solid 1px}.mat-tooltip-handset{margin:24px;padding-left:16px;padding-right:16px}.mat-tooltip-panel-non-interactive{pointer-events:none}\n"] }]
819
- }], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: i6.BreakpointObserver }]; } });
834
+ }, template: "<div #tooltip\n class=\"mat-tooltip\"\n (animationend)=\"_handleAnimationEnd($event)\"\n [ngClass]=\"tooltipClass\"\n [class.mat-tooltip-handset]=\"(_isHandset | async)?.matches\">{{message}}</div>\n", styles: [".mat-tooltip{color:#fff;border-radius:4px;margin:14px;max-width:250px;padding-left:8px;padding-right:8px;overflow:hidden;text-overflow:ellipsis;transform:scale(0)}.mat-tooltip._mat-animation-noopable{animation:none;transform:scale(1)}.cdk-high-contrast-active .mat-tooltip{outline:solid 1px}.mat-tooltip-handset{margin:24px;padding-left:16px;padding-right:16px}.mat-tooltip-panel-non-interactive{pointer-events:none}@keyframes mat-tooltip-show{0%{opacity:0;transform:scale(0)}50%{opacity:.5;transform:scale(0.99)}100%{opacity:1;transform:scale(1)}}@keyframes mat-tooltip-hide{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(1)}}.mat-tooltip-show{animation:mat-tooltip-show 200ms cubic-bezier(0, 0, 0.2, 1) forwards}.mat-tooltip-hide{animation:mat-tooltip-hide 100ms cubic-bezier(0, 0, 0.2, 1) forwards}\n"] }]
835
+ }], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: i6.BreakpointObserver }, { type: undefined, decorators: [{
836
+ type: Optional
837
+ }, {
838
+ type: Inject,
839
+ args: [ANIMATION_MODULE_TYPE]
840
+ }] }]; }, propDecorators: { _tooltip: [{
841
+ type: ViewChild,
842
+ args: ['tooltip', {
843
+ // Use a static query here since we interact directly with
844
+ // the DOM which can happen before `ngAfterViewInit`.
845
+ static: true,
846
+ }]
847
+ }] } });
820
848
 
821
849
  /**
822
850
  * @license
@@ -827,10 +855,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.0", ngImpor
827
855
  */
828
856
  class MatTooltipModule {
829
857
  }
830
- MatTooltipModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: MatTooltipModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
831
- MatTooltipModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: MatTooltipModule, declarations: [MatTooltip, TooltipComponent], imports: [A11yModule, CommonModule, OverlayModule, MatCommonModule], exports: [MatTooltip, TooltipComponent, MatCommonModule, CdkScrollableModule] });
832
- MatTooltipModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: MatTooltipModule, providers: [MAT_TOOLTIP_SCROLL_STRATEGY_FACTORY_PROVIDER], imports: [[A11yModule, CommonModule, OverlayModule, MatCommonModule], MatCommonModule, CdkScrollableModule] });
833
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: MatTooltipModule, decorators: [{
858
+ MatTooltipModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: MatTooltipModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
859
+ MatTooltipModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: MatTooltipModule, declarations: [MatTooltip, TooltipComponent], imports: [A11yModule, CommonModule, OverlayModule, MatCommonModule], exports: [MatTooltip, TooltipComponent, MatCommonModule, CdkScrollableModule] });
860
+ MatTooltipModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: MatTooltipModule, providers: [MAT_TOOLTIP_SCROLL_STRATEGY_FACTORY_PROVIDER], imports: [[A11yModule, CommonModule, OverlayModule, MatCommonModule], MatCommonModule, CdkScrollableModule] });
861
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: MatTooltipModule, decorators: [{
834
862
  type: NgModule,
835
863
  args: [{
836
864
  imports: [A11yModule, CommonModule, OverlayModule, MatCommonModule],
@@ -840,6 +868,31 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.0", ngImpor
840
868
  }]
841
869
  }] });
842
870
 
871
+ /**
872
+ * @license
873
+ * Copyright Google LLC All Rights Reserved.
874
+ *
875
+ * Use of this source code is governed by an MIT-style license that can be
876
+ * found in the LICENSE file at https://angular.io/license
877
+ */
878
+ /**
879
+ * Animations used by MatTooltip.
880
+ * @docs-private
881
+ */
882
+ const matTooltipAnimations = {
883
+ /** Animation that transitions a tooltip in and out. */
884
+ tooltipState: trigger('state', [
885
+ state('initial, void, hidden', style({ opacity: 0, transform: 'scale(0)' })),
886
+ state('visible', style({ transform: 'scale(1)' })),
887
+ transition('* => visible', animate('200ms cubic-bezier(0, 0, 0.2, 1)', keyframes([
888
+ style({ opacity: 0, transform: 'scale(0)', offset: 0 }),
889
+ style({ opacity: 0.5, transform: 'scale(0.99)', offset: 0.5 }),
890
+ style({ opacity: 1, transform: 'scale(1)', offset: 1 }),
891
+ ]))),
892
+ transition('* => hidden', animate('100ms cubic-bezier(0, 0, 0.2, 1)', style({ opacity: 0 }))),
893
+ ]),
894
+ };
895
+
843
896
  /**
844
897
  * @license
845
898
  * Copyright Google LLC All Rights Reserved.