@angular/material 17.2.0-rc.0 → 17.2.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 (292) hide show
  1. package/_index.scss +3 -20
  2. package/autocomplete/_autocomplete-theme.scss +3 -0
  3. package/badge/_badge-theme.scss +3 -0
  4. package/bottom-sheet/_bottom-sheet-theme.scss +3 -0
  5. package/button/_button-theme.scss +4 -1
  6. package/button/_fab-theme.scss +3 -0
  7. package/button/_icon-button-theme.scss +3 -0
  8. package/button-toggle/_button-toggle-theme.scss +3 -0
  9. package/card/_card-theme.scss +3 -0
  10. package/checkbox/_checkbox-theme.scss +3 -0
  11. package/chips/_chips-theme.scss +3 -0
  12. package/core/_core-theme.scss +3 -0
  13. package/core/option/_optgroup-theme.scss +3 -0
  14. package/core/option/_option-theme.scss +3 -0
  15. package/core/ripple/_ripple-theme.scss +3 -0
  16. package/core/selection/pseudo-checkbox/_pseudo-checkbox-theme.scss +3 -0
  17. package/core/style/_menu-common.scss +5 -18
  18. package/core/theming/_inspection.scss +1 -0
  19. package/core/theming/_validation.scss +5 -0
  20. package/core/tokens/m2/_index.scss +2 -0
  21. package/core/tokens/m2/mat/_datepicker.scss +10 -1
  22. package/core/tokens/m2/mat/_expansion.scss +2 -0
  23. package/core/tokens/m2/mat/_legacy-button-toggle.scss +5 -5
  24. package/core/tokens/m2/mat/_list.scss +44 -0
  25. package/core/tokens/m2/mat/_menu.scss +9 -0
  26. package/core/tokens/m2/mat/_paginator.scss +22 -2
  27. package/core/tokens/m2/mat/_select.scss +11 -1
  28. package/core/tokens/m2/mat/_standard-button-toggle.scss +5 -5
  29. package/core/tokens/m2/mat/_switch.scss +8 -0
  30. package/core/tokens/m2/mdc/_switch.scss +1 -1
  31. package/core/typography/_all-typography.scss +6 -1
  32. package/datepicker/_datepicker-theme.scss +9 -1
  33. package/dialog/_dialog-theme.scss +3 -0
  34. package/divider/_divider-theme.scss +3 -0
  35. package/esm2022/autocomplete/autocomplete-origin.mjs +3 -3
  36. package/esm2022/autocomplete/autocomplete-trigger.mjs +3 -3
  37. package/esm2022/autocomplete/autocomplete.mjs +3 -3
  38. package/esm2022/autocomplete/module.mjs +4 -4
  39. package/esm2022/badge/badge-module.mjs +4 -4
  40. package/esm2022/badge/badge.mjs +6 -6
  41. package/esm2022/bottom-sheet/bottom-sheet-container.mjs +3 -3
  42. package/esm2022/bottom-sheet/bottom-sheet-module.mjs +4 -4
  43. package/esm2022/bottom-sheet/bottom-sheet.mjs +3 -3
  44. package/esm2022/button/button-base.mjs +6 -6
  45. package/esm2022/button/button.mjs +6 -6
  46. package/esm2022/button/fab.mjs +12 -12
  47. package/esm2022/button/icon-button.mjs +6 -6
  48. package/esm2022/button/module.mjs +4 -4
  49. package/esm2022/button-toggle/button-toggle-module.mjs +4 -4
  50. package/esm2022/button-toggle/button-toggle.mjs +8 -8
  51. package/esm2022/card/card.mjs +42 -42
  52. package/esm2022/card/module.mjs +4 -4
  53. package/esm2022/checkbox/checkbox-required-validator.mjs +3 -3
  54. package/esm2022/checkbox/checkbox.mjs +3 -3
  55. package/esm2022/checkbox/module.mjs +8 -8
  56. package/esm2022/chips/chip-action.mjs +3 -3
  57. package/esm2022/chips/chip-edit-input.mjs +3 -3
  58. package/esm2022/chips/chip-grid.mjs +3 -3
  59. package/esm2022/chips/chip-icons.mjs +9 -9
  60. package/esm2022/chips/chip-input.mjs +3 -3
  61. package/esm2022/chips/chip-listbox.mjs +3 -3
  62. package/esm2022/chips/chip-option.mjs +3 -3
  63. package/esm2022/chips/chip-row.mjs +3 -3
  64. package/esm2022/chips/chip-set.mjs +3 -3
  65. package/esm2022/chips/chip.mjs +3 -3
  66. package/esm2022/chips/module.mjs +4 -4
  67. package/esm2022/core/common-behaviors/common-module.mjs +4 -4
  68. package/esm2022/core/datetime/index.mjs +8 -8
  69. package/esm2022/core/datetime/native-date-adapter.mjs +3 -3
  70. package/esm2022/core/error/error-options.mjs +6 -6
  71. package/esm2022/core/internal-form-field/internal-form-field.mjs +3 -3
  72. package/esm2022/core/line/line.mjs +7 -7
  73. package/esm2022/core/option/index.mjs +4 -4
  74. package/esm2022/core/option/optgroup.mjs +3 -3
  75. package/esm2022/core/option/option.mjs +3 -3
  76. package/esm2022/core/private/ripple-loader.mjs +3 -3
  77. package/esm2022/core/ripple/index.mjs +4 -4
  78. package/esm2022/core/ripple/ripple.mjs +3 -3
  79. package/esm2022/core/selection/pseudo-checkbox/pseudo-checkbox-module.mjs +4 -4
  80. package/esm2022/core/selection/pseudo-checkbox/pseudo-checkbox.mjs +3 -3
  81. package/esm2022/core/version.mjs +1 -1
  82. package/esm2022/datepicker/calendar-body.mjs +5 -5
  83. package/esm2022/datepicker/calendar.mjs +8 -8
  84. package/esm2022/datepicker/date-range-input-parts.mjs +9 -9
  85. package/esm2022/datepicker/date-range-input.mjs +3 -3
  86. package/esm2022/datepicker/date-range-picker.mjs +3 -3
  87. package/esm2022/datepicker/date-range-selection-strategy.mjs +3 -3
  88. package/esm2022/datepicker/date-selection-model.mjs +9 -9
  89. package/esm2022/datepicker/datepicker-actions.mjs +9 -9
  90. package/esm2022/datepicker/datepicker-base.mjs +8 -8
  91. package/esm2022/datepicker/datepicker-input-base.mjs +3 -3
  92. package/esm2022/datepicker/datepicker-input.mjs +3 -3
  93. package/esm2022/datepicker/datepicker-intl.mjs +3 -3
  94. package/esm2022/datepicker/datepicker-module.mjs +4 -4
  95. package/esm2022/datepicker/datepicker-toggle.mjs +6 -6
  96. package/esm2022/datepicker/datepicker.mjs +3 -3
  97. package/esm2022/datepicker/month-view.mjs +3 -3
  98. package/esm2022/datepicker/multi-year-view.mjs +3 -3
  99. package/esm2022/datepicker/year-view.mjs +3 -3
  100. package/esm2022/dialog/dialog-container.mjs +3 -3
  101. package/esm2022/dialog/dialog-content-directives.mjs +15 -15
  102. package/esm2022/dialog/dialog.mjs +3 -3
  103. package/esm2022/dialog/module.mjs +4 -4
  104. package/esm2022/divider/divider-module.mjs +4 -4
  105. package/esm2022/divider/divider.mjs +3 -3
  106. package/esm2022/expansion/accordion.mjs +3 -3
  107. package/esm2022/expansion/expansion-module.mjs +4 -4
  108. package/esm2022/expansion/expansion-panel-content.mjs +3 -3
  109. package/esm2022/expansion/expansion-panel-header.mjs +11 -11
  110. package/esm2022/expansion/expansion-panel.mjs +6 -6
  111. package/esm2022/form-field/directives/error.mjs +3 -3
  112. package/esm2022/form-field/directives/floating-label.mjs +3 -3
  113. package/esm2022/form-field/directives/hint.mjs +3 -3
  114. package/esm2022/form-field/directives/label.mjs +3 -3
  115. package/esm2022/form-field/directives/line-ripple.mjs +3 -3
  116. package/esm2022/form-field/directives/notched-outline.mjs +3 -3
  117. package/esm2022/form-field/directives/prefix.mjs +3 -3
  118. package/esm2022/form-field/directives/suffix.mjs +3 -3
  119. package/esm2022/form-field/form-field-control.mjs +3 -3
  120. package/esm2022/form-field/form-field.mjs +6 -6
  121. package/esm2022/form-field/module.mjs +4 -4
  122. package/esm2022/grid-list/grid-list-module.mjs +4 -4
  123. package/esm2022/grid-list/grid-list.mjs +3 -3
  124. package/esm2022/grid-list/grid-tile.mjs +15 -15
  125. package/esm2022/icon/icon-module.mjs +4 -4
  126. package/esm2022/icon/icon-registry.mjs +3 -3
  127. package/esm2022/icon/icon.mjs +3 -3
  128. package/esm2022/icon/testing/fake-icon-registry.mjs +7 -7
  129. package/esm2022/input/input.mjs +3 -3
  130. package/esm2022/input/module.mjs +4 -4
  131. package/esm2022/list/action-list.mjs +4 -4
  132. package/esm2022/list/list-base.mjs +6 -6
  133. package/esm2022/list/list-item-sections.mjs +18 -18
  134. package/esm2022/list/list-module.mjs +4 -4
  135. package/esm2022/list/list-option.mjs +3 -3
  136. package/esm2022/list/list.mjs +7 -7
  137. package/esm2022/list/nav-list.mjs +4 -4
  138. package/esm2022/list/selection-list.mjs +7 -7
  139. package/esm2022/list/subheader.mjs +3 -3
  140. package/esm2022/menu/menu-content.mjs +3 -3
  141. package/esm2022/menu/menu-item.mjs +3 -3
  142. package/esm2022/menu/menu-trigger.mjs +3 -3
  143. package/esm2022/menu/menu.mjs +5 -5
  144. package/esm2022/menu/module.mjs +4 -4
  145. package/esm2022/paginator/module.mjs +4 -4
  146. package/esm2022/paginator/paginator-intl.mjs +3 -3
  147. package/esm2022/paginator/paginator.mjs +17 -16
  148. package/esm2022/progress-bar/module.mjs +4 -4
  149. package/esm2022/progress-bar/progress-bar.mjs +4 -4
  150. package/esm2022/progress-spinner/module.mjs +4 -4
  151. package/esm2022/progress-spinner/progress-spinner.mjs +3 -3
  152. package/esm2022/radio/module.mjs +4 -4
  153. package/esm2022/radio/radio.mjs +6 -6
  154. package/esm2022/select/module.mjs +4 -4
  155. package/esm2022/select/select.mjs +9 -9
  156. package/esm2022/sidenav/drawer.mjs +9 -9
  157. package/esm2022/sidenav/sidenav-module.mjs +4 -4
  158. package/esm2022/sidenav/sidenav.mjs +9 -9
  159. package/esm2022/slide-toggle/module.mjs +8 -8
  160. package/esm2022/slide-toggle/slide-toggle-required-validator.mjs +3 -3
  161. package/esm2022/slide-toggle/slide-toggle.mjs +6 -6
  162. package/esm2022/slider/module.mjs +4 -4
  163. package/esm2022/slider/slider-input.mjs +6 -6
  164. package/esm2022/slider/slider-thumb.mjs +3 -3
  165. package/esm2022/slider/slider.mjs +3 -3
  166. package/esm2022/snack-bar/module.mjs +4 -4
  167. package/esm2022/snack-bar/simple-snack-bar.mjs +3 -3
  168. package/esm2022/snack-bar/snack-bar-container.mjs +3 -3
  169. package/esm2022/snack-bar/snack-bar-content.mjs +9 -9
  170. package/esm2022/snack-bar/snack-bar.mjs +3 -3
  171. package/esm2022/sort/sort-header-intl.mjs +3 -3
  172. package/esm2022/sort/sort-header.mjs +3 -3
  173. package/esm2022/sort/sort-module.mjs +4 -4
  174. package/esm2022/sort/sort.mjs +11 -13
  175. package/esm2022/stepper/step-content.mjs +3 -3
  176. package/esm2022/stepper/step-header.mjs +3 -3
  177. package/esm2022/stepper/step-label.mjs +3 -3
  178. package/esm2022/stepper/stepper-button.mjs +6 -6
  179. package/esm2022/stepper/stepper-icon.mjs +3 -3
  180. package/esm2022/stepper/stepper-intl.mjs +3 -3
  181. package/esm2022/stepper/stepper-module.mjs +4 -4
  182. package/esm2022/stepper/stepper.mjs +6 -6
  183. package/esm2022/table/cell.mjs +21 -21
  184. package/esm2022/table/module.mjs +4 -4
  185. package/esm2022/table/row.mjs +21 -21
  186. package/esm2022/table/table.mjs +6 -6
  187. package/esm2022/table/text-column.mjs +3 -3
  188. package/esm2022/tabs/ink-bar.mjs +87 -88
  189. package/esm2022/tabs/module.mjs +4 -4
  190. package/esm2022/tabs/paginated-tab-header.mjs +3 -3
  191. package/esm2022/tabs/tab-body.mjs +6 -6
  192. package/esm2022/tabs/tab-content.mjs +3 -3
  193. package/esm2022/tabs/tab-group.mjs +3 -3
  194. package/esm2022/tabs/tab-header.mjs +3 -3
  195. package/esm2022/tabs/tab-label-wrapper.mjs +6 -10
  196. package/esm2022/tabs/tab-label.mjs +3 -3
  197. package/esm2022/tabs/tab-nav-bar/tab-nav-bar.mjs +17 -15
  198. package/esm2022/tabs/tab.mjs +3 -3
  199. package/esm2022/toolbar/toolbar-module.mjs +4 -4
  200. package/esm2022/toolbar/toolbar.mjs +6 -6
  201. package/esm2022/tooltip/module.mjs +4 -4
  202. package/esm2022/tooltip/tooltip.mjs +6 -6
  203. package/esm2022/tree/node.mjs +9 -9
  204. package/esm2022/tree/outlet.mjs +3 -3
  205. package/esm2022/tree/padding.mjs +3 -3
  206. package/esm2022/tree/toggle.mjs +3 -3
  207. package/esm2022/tree/tree-module.mjs +4 -4
  208. package/esm2022/tree/tree.mjs +3 -3
  209. package/expansion/_expansion-theme.scss +3 -0
  210. package/fesm2022/autocomplete.mjs +13 -13
  211. package/fesm2022/badge.mjs +10 -10
  212. package/fesm2022/bottom-sheet.mjs +10 -10
  213. package/fesm2022/button-toggle.mjs +11 -11
  214. package/fesm2022/button-toggle.mjs.map +1 -1
  215. package/fesm2022/button.mjs +34 -34
  216. package/fesm2022/card.mjs +46 -46
  217. package/fesm2022/checkbox.mjs +14 -14
  218. package/fesm2022/chips.mjs +40 -40
  219. package/fesm2022/core.mjs +59 -59
  220. package/fesm2022/core.mjs.map +1 -1
  221. package/fesm2022/datepicker.mjs +85 -85
  222. package/fesm2022/datepicker.mjs.map +1 -1
  223. package/fesm2022/dialog.mjs +25 -25
  224. package/fesm2022/divider.mjs +7 -7
  225. package/fesm2022/expansion.mjs +26 -26
  226. package/fesm2022/expansion.mjs.map +1 -1
  227. package/fesm2022/form-field.mjs +36 -36
  228. package/fesm2022/form-field.mjs.map +1 -1
  229. package/fesm2022/grid-list.mjs +22 -22
  230. package/fesm2022/icon/testing.mjs +7 -7
  231. package/fesm2022/icon.mjs +10 -10
  232. package/fesm2022/input.mjs +7 -7
  233. package/fesm2022/list.mjs +55 -55
  234. package/fesm2022/list.mjs.map +1 -1
  235. package/fesm2022/menu.mjs +17 -17
  236. package/fesm2022/menu.mjs.map +1 -1
  237. package/fesm2022/paginator.mjs +22 -22
  238. package/fesm2022/paginator.mjs.map +1 -1
  239. package/fesm2022/progress-bar.mjs +8 -8
  240. package/fesm2022/progress-bar.mjs.map +1 -1
  241. package/fesm2022/progress-spinner.mjs +7 -7
  242. package/fesm2022/radio.mjs +10 -10
  243. package/fesm2022/select.mjs +12 -12
  244. package/fesm2022/select.mjs.map +1 -1
  245. package/fesm2022/sidenav.mjs +22 -22
  246. package/fesm2022/slide-toggle.mjs +16 -16
  247. package/fesm2022/slide-toggle.mjs.map +1 -1
  248. package/fesm2022/slider.mjs +16 -16
  249. package/fesm2022/snack-bar.mjs +22 -22
  250. package/fesm2022/sort.mjs +21 -22
  251. package/fesm2022/sort.mjs.map +1 -1
  252. package/fesm2022/stepper.mjs +31 -31
  253. package/fesm2022/table.mjs +55 -55
  254. package/fesm2022/tabs.mjs +133 -137
  255. package/fesm2022/tabs.mjs.map +1 -1
  256. package/fesm2022/toolbar.mjs +10 -10
  257. package/fesm2022/tooltip.mjs +10 -10
  258. package/fesm2022/tree.mjs +25 -25
  259. package/form-field/_form-field-theme.scss +3 -0
  260. package/grid-list/_grid-list-theme.scss +3 -0
  261. package/icon/_icon-theme.scss +3 -0
  262. package/input/_input-theme.scss +5 -1
  263. package/list/_list-theme.scss +17 -3
  264. package/menu/_menu-theme.scss +3 -0
  265. package/package.json +7 -7
  266. package/paginator/_paginator-theme.scss +3 -7
  267. package/paginator/index.d.ts +6 -8
  268. package/prebuilt-themes/deeppurple-amber.css +1 -1
  269. package/prebuilt-themes/indigo-pink.css +1 -1
  270. package/prebuilt-themes/pink-bluegrey.css +1 -1
  271. package/prebuilt-themes/purple-green.css +1 -1
  272. package/progress-bar/_progress-bar-theme.scss +3 -0
  273. package/progress-spinner/_progress-spinner-theme.scss +3 -0
  274. package/radio/_radio-theme.scss +3 -0
  275. package/schematics/ng-add/index.js +2 -2
  276. package/schematics/ng-add/index.mjs +2 -2
  277. package/schematics/ng-generate/mdc-migration/index_bundled.js +981 -568
  278. package/schematics/ng-generate/mdc-migration/index_bundled.js.map +4 -4
  279. package/select/_select-theme.scss +3 -19
  280. package/sidenav/_sidenav-theme.scss +3 -0
  281. package/slide-toggle/_slide-toggle-theme.scss +3 -0
  282. package/slider/_slider-theme.scss +3 -0
  283. package/snack-bar/_snack-bar-theme.scss +3 -0
  284. package/sort/_sort-theme.scss +3 -0
  285. package/sort/index.d.ts +5 -7
  286. package/stepper/_stepper-theme.scss +3 -0
  287. package/table/_table-theme.scss +3 -0
  288. package/tabs/_tabs-theme.scss +3 -0
  289. package/tabs/index.d.ts +30 -15
  290. package/toolbar/_toolbar-theme.scss +3 -0
  291. package/tooltip/_tooltip-theme.scss +3 -0
  292. package/tree/_tree-theme.scss +3 -0
@@ -1,11 +1,10 @@
1
- @use '@material/density' as mdc-density;
2
- @use '@material/textfield' as mdc-textfield;
3
1
  @use '../core/tokens/m2/mat/select' as tokens-mat-select;
4
2
  @use '../core/tokens/token-utils';
5
3
  @use '../core/style/sass-utils';
6
4
 
7
5
  @use '../core/theming/theming';
8
6
  @use '../core/theming/inspection';
7
+ @use '../core/theming/validation';
9
8
  @use '../core/typography/typography';
10
9
 
11
10
  /// Outputs base theme styles (styles not dependent on the color, typography, or density settings)
@@ -71,23 +70,6 @@
71
70
  @include _theme-from-tokens(inspection.get-theme-tokens($theme, density));
72
71
  }
73
72
  @else {
74
- $density-scale: inspection.get-theme-density($theme);
75
-
76
- // Density is clamped at -5 here, because MDC's form field throws an error for anything lower.
77
- $form-field-height: mdc-density.prop-value(
78
- $density-config: mdc-textfield.$density-config,
79
- $density-scale: theming.clamp-density($density-scale, -5),
80
- $property-name: height,
81
- );
82
-
83
- // On lower densities the filled form field hides its label which causes the label to
84
- // be misaligned. Remove the additional offset that was added because of the label.
85
- @if ($form-field-height < mdc-textfield.$minimum-height-for-filled-label) {
86
- .mat-form-field-appearance-fill .mat-mdc-select-arrow-wrapper {
87
- transform: none;
88
- }
89
- }
90
-
91
73
  @include sass-utils.current-selector-or-root() {
92
74
  @include token-utils.create-token-values(tokens-mat-select.$prefix,
93
75
  tokens-mat-select.get-density-tokens($theme));
@@ -121,6 +103,8 @@
121
103
  }
122
104
 
123
105
  @mixin _theme-from-tokens($tokens, $options...) {
106
+ @include validation.selector-defined(
107
+ 'Calls to Angular Material theme mixins with an M3 theme must be wrapped in a selector');
124
108
  $mat-select-tokens: token-utils.get-tokens-for($tokens, tokens-mat-select.$prefix, $options...);
125
109
  @include token-utils.create-token-values(tokens-mat-select.$prefix, $mat-select-tokens);
126
110
  }
@@ -1,6 +1,7 @@
1
1
  @use 'sass:map';
2
2
  @use '../core/theming/theming';
3
3
  @use '../core/theming/inspection';
4
+ @use '../core/theming/validation';
4
5
  @use '../core/tokens/m2/mat/sidenav' as tokens-mat-sidenav;
5
6
  @use '../core/tokens/token-utils';
6
7
  @use '../core/style/sass-utils';
@@ -64,6 +65,8 @@
64
65
  }
65
66
 
66
67
  @mixin _theme-from-tokens($tokens) {
68
+ @include validation.selector-defined(
69
+ 'Calls to Angular Material theme mixins with an M3 theme must be wrapped in a selector');
67
70
  @if ($tokens != ()) {
68
71
  @include token-utils.create-token-values(
69
72
  tokens-mat-sidenav.$prefix, map.get($tokens, tokens-mat-sidenav.$prefix));
@@ -3,6 +3,7 @@
3
3
  @use '../core/style/sass-utils';
4
4
  @use '../core/theming/theming';
5
5
  @use '../core/theming/inspection';
6
+ @use '../core/theming/validation';
6
7
  @use '../core/tokens/token-utils';
7
8
  @use '../core/typography/typography';
8
9
  @use '../core/tokens/m2/mdc/form-field' as tokens-mdc-form-field;
@@ -133,6 +134,8 @@
133
134
  }
134
135
 
135
136
  @mixin _theme-from-tokens($tokens, $options...) {
137
+ @include validation.selector-defined(
138
+ 'Calls to Angular Material theme mixins with an M3 theme must be wrapped in a selector');
136
139
  // Don't pass $options here, since the mdc-form-field doesn't support color options,
137
140
  // only the mdc-switch does.
138
141
  $mdc-form-field-tokens: token-utils.get-tokens-for($tokens, tokens-mdc-form-field.$prefix);
@@ -1,6 +1,7 @@
1
1
  @use '@material/slider/slider-theme' as mdc-slider-theme;
2
2
  @use '../core/theming/theming';
3
3
  @use '../core/theming/inspection';
4
+ @use '../core/theming/validation';
4
5
  @use '../core/typography/typography';
5
6
  @use '../core/style/sass-utils';
6
7
  @use '../core/tokens/token-utils';
@@ -129,6 +130,8 @@
129
130
  }
130
131
 
131
132
  @mixin _theme-from-tokens($tokens, $options...) {
133
+ @include validation.selector-defined(
134
+ 'Calls to Angular Material theme mixins with an M3 theme must be wrapped in a selector');
132
135
  $mdc-slider-tokens: token-utils.get-tokens-for($tokens, tokens-mdc-slider.$prefix, $options...);
133
136
  $mat-slider-tokens: token-utils.get-tokens-for($tokens, tokens-mat-slider.$prefix, $options...);
134
137
  @include mdc-slider-theme.theme($mdc-slider-tokens);
@@ -2,6 +2,7 @@
2
2
  @use '@material/snackbar/snackbar-theme' as mdc-snackbar-theme;
3
3
  @use '../core/theming/theming';
4
4
  @use '../core/theming/inspection';
5
+ @use '../core/theming/validation';
5
6
  @use '../core/style/sass-utils';
6
7
  @use '../core/typography/typography';
7
8
  @use '../core/tokens/token-utils';
@@ -69,6 +70,8 @@
69
70
  }
70
71
 
71
72
  @mixin _theme-from-tokens($tokens) {
73
+ @include validation.selector-defined(
74
+ 'Calls to Angular Material theme mixins with an M3 theme must be wrapped in a selector');
72
75
  @if ($tokens != ()) {
73
76
  @include mdc-snackbar-theme.theme(map.get($tokens, tokens-mdc-snack-bar.$prefix));
74
77
  @include token-utils.create-token-values(
@@ -4,6 +4,7 @@
4
4
  @use '../core/typography/typography';
5
5
  @use '../core/theming/theming';
6
6
  @use '../core/theming/inspection';
7
+ @use '../core/theming/validation';
7
8
  @use '../core/tokens/token-utils';
8
9
 
9
10
  @mixin base($theme) {
@@ -70,6 +71,8 @@
70
71
  }
71
72
 
72
73
  @mixin _theme-from-tokens($tokens) {
74
+ @include validation.selector-defined(
75
+ 'Calls to Angular Material theme mixins with an M3 theme must be wrapped in a selector');
73
76
  @if ($tokens != ()) {
74
77
  @include token-utils.create-token-values(
75
78
  tokens-mat-sort.$prefix, map.get($tokens, tokens-mat-sort.$prefix));
package/sort/index.d.ts CHANGED
@@ -5,10 +5,10 @@ import { ChangeDetectorRef } from '@angular/core';
5
5
  import { ElementRef } from '@angular/core';
6
6
  import { EventEmitter } from '@angular/core';
7
7
  import { FocusMonitor } from '@angular/cdk/a11y';
8
- import { HasInitialized } from '@angular/material/core';
9
8
  import * as i0 from '@angular/core';
10
9
  import * as i1 from '@angular/material/core';
11
10
  import { InjectionToken } from '@angular/core';
11
+ import { Observable } from 'rxjs';
12
12
  import { OnChanges } from '@angular/core';
13
13
  import { OnDestroy } from '@angular/core';
14
14
  import { OnInit } from '@angular/core';
@@ -68,8 +68,9 @@ export declare const MAT_SORT_HEADER_INTL_PROVIDER: {
68
68
  export declare function MAT_SORT_HEADER_INTL_PROVIDER_FACTORY(parentIntl: MatSortHeaderIntl): MatSortHeaderIntl;
69
69
 
70
70
  /** Container for MatSortables to manage the sort state and provide default sort parameters. */
71
- export declare class MatSort extends _MatSortBase implements HasInitialized, OnChanges, OnDestroy, OnInit {
71
+ export declare class MatSort implements OnChanges, OnDestroy, OnInit {
72
72
  private _defaultOptions?;
73
+ private _initializedStream;
73
74
  /** Collection of all registered sortables that this directive manages. */
74
75
  sortables: Map<string, MatSortable>;
75
76
  /** Used to notify any child components listening to state changes. */
@@ -94,6 +95,8 @@ export declare class MatSort extends _MatSortBase implements HasInitialized, OnC
94
95
  disabled: boolean;
95
96
  /** Event emitted when the user changes either the active sort or sort direction. */
96
97
  readonly sortChange: EventEmitter<Sort>;
98
+ /** Emits when the paginator is initialized. */
99
+ initialized: Observable<void>;
97
100
  constructor(_defaultOptions?: MatSortDefaultOptions | undefined);
98
101
  /**
99
102
  * Register function to be used by the contained MatSortables. Adds the MatSortable to the
@@ -141,11 +144,6 @@ export declare const matSortAnimations: {
141
144
  readonly allowChildren: AnimationTriggerMetadata;
142
145
  };
143
146
 
144
- /** @docs-private */
145
- declare const _MatSortBase: (new (...args: any[]) => HasInitialized) & {
146
- new (): {};
147
- };
148
-
149
147
  /** Default options for `mat-sort`. */
150
148
  export declare interface MatSortDefaultOptions {
151
149
  /** Whether to disable clearing the sorting state. */
@@ -1,5 +1,6 @@
1
1
  @use '../core/theming/theming';
2
2
  @use '../core/theming/inspection';
3
+ @use '../core/theming/validation';
3
4
  @use '../core/typography/typography';
4
5
  @use '../core/style/sass-utils';
5
6
  @use '../core/tokens/token-utils';
@@ -96,6 +97,8 @@
96
97
  }
97
98
 
98
99
  @mixin _theme-from-tokens($tokens, $options...) {
100
+ @include validation.selector-defined(
101
+ 'Calls to Angular Material theme mixins with an M3 theme must be wrapped in a selector');
99
102
  @if ($tokens != ()) {
100
103
  $mat-stepper-tokens: token-utils.get-tokens-for(
101
104
  $tokens,
@@ -2,6 +2,7 @@
2
2
  @use '../core/tokens/m2/mat/table' as tokens-mat-table;
3
3
  @use '../core/theming/theming';
4
4
  @use '../core/theming/inspection';
5
+ @use '../core/theming/validation';
5
6
  @use '../core/typography/typography';
6
7
  @use '../core/tokens/token-utils';
7
8
  @use '../core/style/sass-utils';
@@ -75,6 +76,8 @@
75
76
  }
76
77
 
77
78
  @mixin _theme-from-tokens($tokens) {
79
+ @include validation.selector-defined(
80
+ 'Calls to Angular Material theme mixins with an M3 theme must be wrapped in a selector');
78
81
  @if ($tokens != ()) {
79
82
  @include token-utils.create-token-values(
80
83
  tokens-mat-table.$prefix, map.get($tokens, tokens-mat-table.$prefix));
@@ -7,6 +7,7 @@
7
7
  @use '../core/tokens/m2/mat/tab-header-with-background' as tokens-mat-tab-header-with-background;
8
8
  @use '../core/theming/theming';
9
9
  @use '../core/theming/inspection';
10
+ @use '../core/theming/validation';
10
11
  @use '../core/typography/typography';
11
12
  @use '../core/tokens/token-utils';
12
13
 
@@ -147,6 +148,8 @@
147
148
  }
148
149
 
149
150
  @mixin _theme-from-tokens($tokens, $options...) {
151
+ @include validation.selector-defined(
152
+ 'Calls to Angular Material theme mixins with an M3 theme must be wrapped in a selector');
150
153
  $mdc-tab-indicator-tokens: token-utils.get-tokens-for(
151
154
  $tokens, tokens-mdc-tab-indicator.$prefix, $options...);
152
155
  $mat-tab-header-tokens: token-utils.get-tokens-for(
package/tabs/index.d.ts CHANGED
@@ -74,6 +74,34 @@ declare namespace i6 {
74
74
  }
75
75
  }
76
76
 
77
+ declare abstract class InkBarItem implements OnInit, OnDestroy {
78
+ private _elementRef;
79
+ private _inkBarElement;
80
+ private _inkBarContentElement;
81
+ private _fitToContent;
82
+ /** Whether the ink bar should fit to the entire tab or just its content. */
83
+ get fitInkBarToContent(): boolean;
84
+ set fitInkBarToContent(newValue: boolean);
85
+ /** Aligns the ink bar to the current item. */
86
+ activateInkBar(previousIndicatorClientRect?: DOMRect): void;
87
+ /** Removes the ink bar from the current item. */
88
+ deactivateInkBar(): void;
89
+ /** Initializes the foundation. */
90
+ ngOnInit(): void;
91
+ /** Destroys the foundation. */
92
+ ngOnDestroy(): void;
93
+ /** Creates and appends the ink bar element. */
94
+ private _createInkBarElement;
95
+ /**
96
+ * Appends the ink bar to the tab host element or content, depending on whether
97
+ * the ink bar should fit to content.
98
+ */
99
+ private _appendInkBarElement;
100
+ static ɵfac: i0.ɵɵFactoryDeclaration<InkBarItem, never>;
101
+ static ɵdir: i0.ɵɵDirectiveDeclaration<InkBarItem, never, never, { "fitInkBarToContent": { "alias": "fitInkBarToContent"; "required": false; }; }, {}, never, never, false, never>;
102
+ static ngAcceptInputType_fitInkBarToContent: unknown;
103
+ }
104
+
77
105
  /** Injection token for the MatInkBar's Positioner. */
78
106
  export declare const _MAT_INK_BAR_POSITIONER: InjectionToken<_MatInkBarPositioner>;
79
107
 
@@ -714,7 +742,7 @@ export declare class MatTabLabel extends CdkPortal {
714
742
  * Used in the `mat-tab-group` view to display tab labels.
715
743
  * @docs-private
716
744
  */
717
- export declare class MatTabLabelWrapper extends _MatTabLabelWrapperMixinBase {
745
+ export declare class MatTabLabelWrapper extends InkBarItem {
718
746
  elementRef: ElementRef;
719
747
  /** Whether the tab is disabled. */
720
748
  disabled: boolean;
@@ -728,17 +756,10 @@ export declare class MatTabLabelWrapper extends _MatTabLabelWrapperMixinBase {
728
756
  static ngAcceptInputType_disabled: unknown;
729
757
  }
730
758
 
731
- /** @docs-private */
732
- declare const _MatTabLabelWrapperMixinBase: {
733
- new (): {
734
- elementRef: ElementRef;
735
- };
736
- } & (new (...args: any[]) => MatInkBarItem);
737
-
738
759
  /**
739
760
  * Link inside a `mat-tab-nav-bar`.
740
761
  */
741
- export declare class MatTabLink extends _MatTabLinkMixinBase implements AfterViewInit, OnDestroy, RippleTarget, FocusableOption {
762
+ export declare class MatTabLink extends InkBarItem implements AfterViewInit, OnDestroy, RippleTarget, FocusableOption {
742
763
  private _tabNavBar;
743
764
  /** @docs-private */ elementRef: ElementRef;
744
765
  private _focusMonitor;
@@ -788,12 +809,6 @@ export declare class MatTabLink extends _MatTabLinkMixinBase implements AfterVie
788
809
  static ngAcceptInputType_tabIndex: unknown;
789
810
  }
790
811
 
791
- declare const _MatTabLinkMixinBase: {
792
- new (): {
793
- elementRef: ElementRef;
794
- };
795
- } & (new (...args: any[]) => MatInkBarItem);
796
-
797
812
  /**
798
813
  * Navigation component matching the styles of the tab group header.
799
814
  * Provides anchored navigation with animated ink bar.
@@ -1,6 +1,7 @@
1
1
  @use 'sass:map';
2
2
  @use '../core/theming/theming';
3
3
  @use '../core/theming/inspection';
4
+ @use '../core/theming/validation';
4
5
  @use '../core/typography/typography';
5
6
  @use '../core/tokens/m2/mat/toolbar' as tokens-mat-toolbar;
6
7
  @use '../core/tokens/token-utils';
@@ -92,6 +93,8 @@
92
93
  }
93
94
 
94
95
  @mixin _theme-from-tokens($tokens) {
96
+ @include validation.selector-defined(
97
+ 'Calls to Angular Material theme mixins with an M3 theme must be wrapped in a selector');
95
98
  @if ($tokens != ()) {
96
99
  @include token-utils.create-token-values(tokens-mat-toolbar.$prefix,
97
100
  map.get($tokens, tokens-mat-toolbar.$prefix));
@@ -3,6 +3,7 @@
3
3
  @use '../core/style/sass-utils';
4
4
  @use '../core/theming/theming';
5
5
  @use '../core/theming/inspection';
6
+ @use '../core/theming/validation';
6
7
  @use '../core/typography/typography';
7
8
  @use '../core/tokens/m2/mdc/plain-tooltip' as tokens-mdc-plain-tooltip;
8
9
 
@@ -81,6 +82,8 @@
81
82
  }
82
83
 
83
84
  @mixin _theme-from-tokens($tokens) {
85
+ @include validation.selector-defined(
86
+ 'Calls to Angular Material theme mixins with an M3 theme must be wrapped in a selector');
84
87
  @if $tokens != () {
85
88
  @include mdc-plain-tooltip-theme.theme(map.get($tokens, tokens-mdc-plain-tooltip.$prefix));
86
89
  }
@@ -1,6 +1,7 @@
1
1
  @use 'sass:map';
2
2
  @use '../core/theming/theming';
3
3
  @use '../core/theming/inspection';
4
+ @use '../core/theming/validation';
4
5
  @use '../core/typography/typography';
5
6
  @use '../core/style/sass-utils';
6
7
  @use '../core/tokens/token-utils';
@@ -75,6 +76,8 @@
75
76
  }
76
77
 
77
78
  @mixin _theme-from-tokens($tokens) {
79
+ @include validation.selector-defined(
80
+ 'Calls to Angular Material theme mixins with an M3 theme must be wrapped in a selector');
78
81
  @if ($tokens != ()) {
79
82
  @include token-utils.create-token-values(
80
83
  tokens-mat-tree.$prefix, map.get($tokens, tokens-mat-tree.$prefix));