@angular/material 19.0.0-next.9 → 19.0.0-rc.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 (232) hide show
  1. package/autocomplete/_autocomplete-theme.scss +8 -4
  2. package/autocomplete/index.d.ts +5 -6
  3. package/badge/_badge-theme.scss +10 -6
  4. package/badge/index.d.ts +1 -2
  5. package/bottom-sheet/_bottom-sheet-theme.scss +8 -4
  6. package/button/_button-theme.scss +10 -6
  7. package/button/_fab-theme.scss +10 -6
  8. package/button/_icon-button-theme.scss +8 -4
  9. package/button/index.d.ts +1 -1
  10. package/button-toggle/_button-toggle-theme.scss +11 -6
  11. package/button-toggle/index.d.ts +2 -1
  12. package/card/_card-theme.scss +8 -4
  13. package/card/index.d.ts +2 -3
  14. package/checkbox/_checkbox-theme.scss +10 -6
  15. package/chips/_chips-theme.scss +10 -6
  16. package/core/_core-theme.scss +4 -7
  17. package/core/_core.scss +2 -5
  18. package/core/m2/_theming.scss +2 -1
  19. package/core/option/_optgroup-theme.scss +8 -4
  20. package/core/option/_option-theme.scss +10 -6
  21. package/core/ripple/_ripple-theme.scss +8 -4
  22. package/core/selection/pseudo-checkbox/_pseudo-checkbox-theme.scss +10 -6
  23. package/core/theming/_config-validation.scss +4 -4
  24. package/core/theming/_definition.scss +12 -2
  25. package/core/theming/_theming.scss +2 -1
  26. package/core/tokens/_m3-system.scss +55 -39
  27. package/core/tokens/_m3-tokens.scss +3 -3
  28. package/core/tokens/_token-definition.scss +4 -3
  29. package/core/tokens/m2/mat/_badge.scss +1 -1
  30. package/core/tokens/m2/mat/_datepicker.scss +1 -1
  31. package/core/tokens/m2/mat/_menu.scss +5 -3
  32. package/core/tokens/m2/mat/_sort.scss +1 -1
  33. package/core/tokens/m3/mat/_menu.scss +6 -3
  34. package/core/tokens/m3/mdc/_filled-text-field.scss +9 -11
  35. package/datepicker/_datepicker-theme.scss +10 -6
  36. package/datepicker/index.d.ts +36 -37
  37. package/dialog/_dialog-theme.scss +8 -4
  38. package/dialog/index.d.ts +1 -0
  39. package/divider/_divider-theme.scss +8 -4
  40. package/expansion/_expansion-theme.scss +8 -4
  41. package/fesm2022/autocomplete/testing.mjs +2 -5
  42. package/fesm2022/autocomplete/testing.mjs.map +1 -1
  43. package/fesm2022/autocomplete.mjs +225 -151
  44. package/fesm2022/autocomplete.mjs.map +1 -1
  45. package/fesm2022/badge/testing.mjs +2 -5
  46. package/fesm2022/badge/testing.mjs.map +1 -1
  47. package/fesm2022/badge.mjs +45 -36
  48. package/fesm2022/badge.mjs.map +1 -1
  49. package/fesm2022/bottom-sheet/testing.mjs +1 -1
  50. package/fesm2022/bottom-sheet/testing.mjs.map +1 -1
  51. package/fesm2022/bottom-sheet.mjs +79 -57
  52. package/fesm2022/bottom-sheet.mjs.map +1 -1
  53. package/fesm2022/button/testing.mjs +2 -2
  54. package/fesm2022/button/testing.mjs.map +1 -1
  55. package/fesm2022/button-toggle/testing.mjs +4 -7
  56. package/fesm2022/button-toggle/testing.mjs.map +1 -1
  57. package/fesm2022/button-toggle.mjs +84 -47
  58. package/fesm2022/button-toggle.mjs.map +1 -1
  59. package/fesm2022/button.mjs +98 -71
  60. package/fesm2022/button.mjs.map +1 -1
  61. package/fesm2022/card/testing.mjs +3 -6
  62. package/fesm2022/card/testing.mjs.map +1 -1
  63. package/fesm2022/card.mjs +53 -55
  64. package/fesm2022/card.mjs.map +1 -1
  65. package/fesm2022/checkbox/testing.mjs +4 -7
  66. package/fesm2022/checkbox/testing.mjs.map +1 -1
  67. package/fesm2022/checkbox.mjs +105 -63
  68. package/fesm2022/checkbox.mjs.map +1 -1
  69. package/fesm2022/chips/testing.mjs +11 -14
  70. package/fesm2022/chips/testing.mjs.map +1 -1
  71. package/fesm2022/chips.mjs +317 -268
  72. package/fesm2022/chips.mjs.map +1 -1
  73. package/fesm2022/core/testing.mjs +5 -11
  74. package/fesm2022/core/testing.mjs.map +1 -1
  75. package/fesm2022/core.mjs +237 -187
  76. package/fesm2022/core.mjs.map +1 -1
  77. package/fesm2022/datepicker/testing.mjs +13 -22
  78. package/fesm2022/datepicker/testing.mjs.map +1 -1
  79. package/fesm2022/datepicker.mjs +821 -568
  80. package/fesm2022/datepicker.mjs.map +1 -1
  81. package/fesm2022/dialog/testing.mjs +15 -9
  82. package/fesm2022/dialog/testing.mjs.map +1 -1
  83. package/fesm2022/dialog.mjs +221 -153
  84. package/fesm2022/dialog.mjs.map +1 -1
  85. package/fesm2022/divider/testing.mjs +1 -1
  86. package/fesm2022/divider/testing.mjs.map +1 -1
  87. package/fesm2022/divider.mjs +9 -11
  88. package/fesm2022/divider.mjs.map +1 -1
  89. package/fesm2022/expansion/testing.mjs +7 -10
  90. package/fesm2022/expansion/testing.mjs.map +1 -1
  91. package/fesm2022/expansion.mjs +85 -76
  92. package/fesm2022/expansion.mjs.map +1 -1
  93. package/fesm2022/form-field/testing.mjs +12 -15
  94. package/fesm2022/form-field/testing.mjs.map +1 -1
  95. package/fesm2022/form-field.mjs +179 -126
  96. package/fesm2022/form-field.mjs.map +1 -1
  97. package/fesm2022/grid-list/testing.mjs +11 -17
  98. package/fesm2022/grid-list/testing.mjs.map +1 -1
  99. package/fesm2022/grid-list.mjs +72 -50
  100. package/fesm2022/grid-list.mjs.map +1 -1
  101. package/fesm2022/icon/testing.mjs +8 -8
  102. package/fesm2022/icon/testing.mjs.map +1 -1
  103. package/fesm2022/icon.mjs +65 -45
  104. package/fesm2022/icon.mjs.map +1 -1
  105. package/fesm2022/input/testing.mjs +3 -3
  106. package/fesm2022/input/testing.mjs.map +1 -1
  107. package/fesm2022/input.mjs +104 -72
  108. package/fesm2022/input.mjs.map +1 -1
  109. package/fesm2022/list/testing.mjs +21 -38
  110. package/fesm2022/list/testing.mjs.map +1 -1
  111. package/fesm2022/list.mjs +191 -180
  112. package/fesm2022/list.mjs.map +1 -1
  113. package/fesm2022/menu/testing.mjs +3 -6
  114. package/fesm2022/menu/testing.mjs.map +1 -1
  115. package/fesm2022/menu.mjs +178 -168
  116. package/fesm2022/menu.mjs.map +1 -1
  117. package/fesm2022/paginator/testing.mjs +10 -13
  118. package/fesm2022/paginator/testing.mjs.map +1 -1
  119. package/fesm2022/paginator.mjs +84 -59
  120. package/fesm2022/paginator.mjs.map +1 -1
  121. package/fesm2022/progress-bar/testing.mjs +1 -1
  122. package/fesm2022/progress-bar/testing.mjs.map +1 -1
  123. package/fesm2022/progress-bar.mjs +35 -34
  124. package/fesm2022/progress-bar.mjs.map +1 -1
  125. package/fesm2022/progress-spinner/testing.mjs +1 -1
  126. package/fesm2022/progress-spinner/testing.mjs.map +1 -1
  127. package/fesm2022/progress-spinner.mjs +27 -13
  128. package/fesm2022/progress-spinner.mjs.map +1 -1
  129. package/fesm2022/radio/testing.mjs +6 -12
  130. package/fesm2022/radio/testing.mjs.map +1 -1
  131. package/fesm2022/radio.mjs +123 -88
  132. package/fesm2022/radio.mjs.map +1 -1
  133. package/fesm2022/select/testing.mjs +6 -9
  134. package/fesm2022/select/testing.mjs.map +1 -1
  135. package/fesm2022/select.mjs +220 -182
  136. package/fesm2022/select.mjs.map +1 -1
  137. package/fesm2022/sidenav/testing.mjs +6 -6
  138. package/fesm2022/sidenav/testing.mjs.map +1 -1
  139. package/fesm2022/sidenav.mjs +132 -119
  140. package/fesm2022/sidenav.mjs.map +1 -1
  141. package/fesm2022/slide-toggle/testing.mjs +3 -6
  142. package/fesm2022/slide-toggle/testing.mjs.map +1 -1
  143. package/fesm2022/slide-toggle.mjs +78 -49
  144. package/fesm2022/slide-toggle.mjs.map +1 -1
  145. package/fesm2022/slider/testing.mjs +2 -2
  146. package/fesm2022/slider/testing.mjs.map +1 -1
  147. package/fesm2022/slider.mjs +260 -190
  148. package/fesm2022/slider.mjs.map +1 -1
  149. package/fesm2022/snack-bar/testing.mjs +4 -7
  150. package/fesm2022/snack-bar/testing.mjs.map +1 -1
  151. package/fesm2022/snack-bar.mjs +141 -107
  152. package/fesm2022/snack-bar.mjs.map +1 -1
  153. package/fesm2022/sort/testing.mjs +3 -6
  154. package/fesm2022/sort/testing.mjs.map +1 -1
  155. package/fesm2022/sort.mjs +93 -72
  156. package/fesm2022/sort.mjs.map +1 -1
  157. package/fesm2022/stepper/testing.mjs +4 -4
  158. package/fesm2022/stepper/testing.mjs.map +1 -1
  159. package/fesm2022/stepper.mjs +143 -105
  160. package/fesm2022/stepper.mjs.map +1 -1
  161. package/fesm2022/table/testing.mjs +13 -25
  162. package/fesm2022/table/testing.mjs.map +1 -1
  163. package/fesm2022/table.mjs +182 -177
  164. package/fesm2022/table.mjs.map +1 -1
  165. package/fesm2022/tabs/testing.mjs +5 -5
  166. package/fesm2022/tabs/testing.mjs.map +1 -1
  167. package/fesm2022/tabs.mjs +326 -247
  168. package/fesm2022/tabs.mjs.map +1 -1
  169. package/fesm2022/timepicker/testing.mjs +7 -16
  170. package/fesm2022/timepicker/testing.mjs.map +1 -1
  171. package/fesm2022/timepicker.mjs +157 -153
  172. package/fesm2022/timepicker.mjs.map +1 -1
  173. package/fesm2022/toolbar/testing.mjs +2 -5
  174. package/fesm2022/toolbar/testing.mjs.map +1 -1
  175. package/fesm2022/toolbar.mjs +25 -15
  176. package/fesm2022/toolbar.mjs.map +1 -1
  177. package/fesm2022/tooltip/testing.mjs +6 -9
  178. package/fesm2022/tooltip/testing.mjs.map +1 -1
  179. package/fesm2022/tooltip.mjs +96 -72
  180. package/fesm2022/tooltip.mjs.map +1 -1
  181. package/fesm2022/tree/testing.mjs +3 -6
  182. package/fesm2022/tree/testing.mjs.map +1 -1
  183. package/fesm2022/tree.mjs +56 -54
  184. package/fesm2022/tree.mjs.map +1 -1
  185. package/form-field/_form-field-theme.scss +9 -5
  186. package/form-field/index.d.ts +9 -9
  187. package/grid-list/_grid-list-theme.scss +8 -4
  188. package/icon/_icon-theme.scss +10 -6
  189. package/input/_input-theme.scss +8 -4
  190. package/list/_list-theme.scss +8 -4
  191. package/list/index.d.ts +20 -21
  192. package/menu/_menu-theme.scss +8 -4
  193. package/menu/index.d.ts +15 -17
  194. package/package.json +2 -2
  195. package/paginator/_paginator-theme.scss +8 -4
  196. package/prebuilt-themes/azure-blue.css +1 -1
  197. package/prebuilt-themes/cyan-orange.css +1 -1
  198. package/prebuilt-themes/deeppurple-amber.css +1 -1
  199. package/prebuilt-themes/indigo-pink.css +1 -1
  200. package/prebuilt-themes/magenta-violet.css +1 -1
  201. package/prebuilt-themes/pink-bluegrey.css +1 -1
  202. package/prebuilt-themes/purple-green.css +1 -1
  203. package/prebuilt-themes/rose-red.css +1 -1
  204. package/progress-bar/_progress-bar-theme.scss +11 -9
  205. package/progress-spinner/_progress-spinner-theme.scss +11 -9
  206. package/progress-spinner/index.d.ts +3 -4
  207. package/radio/_radio-theme.scss +10 -6
  208. package/radio/index.d.ts +2 -3
  209. package/schematics/ng-add/index.js +1 -1
  210. package/schematics/ng-add/index.mjs +1 -1
  211. package/schematics/ng-add/theming/create-custom-theme.js +1 -6
  212. package/schematics/ng-add/theming/create-custom-theme.mjs +1 -6
  213. package/schematics/ng-generate/theme-color/index_bundled.js +35 -9
  214. package/schematics/ng-generate/theme-color/index_bundled.js.map +2 -2
  215. package/schematics/ng-update/index_bundled.js +6 -1
  216. package/schematics/ng-update/index_bundled.js.map +1 -1
  217. package/select/_select-theme.scss +10 -6
  218. package/select/index.d.ts +7 -7
  219. package/sidenav/_sidenav-theme.scss +8 -4
  220. package/slide-toggle/_slide-toggle-theme.scss +10 -6
  221. package/slider/_slider-theme.scss +10 -6
  222. package/snack-bar/_snack-bar-theme.scss +10 -6
  223. package/sort/_sort-theme.scss +8 -4
  224. package/stepper/_stepper-theme.scss +10 -6
  225. package/stepper/index.d.ts +14 -15
  226. package/table/_table-theme.scss +8 -4
  227. package/tabs/_tabs-theme.scss +10 -6
  228. package/timepicker/_timepicker-theme.scss +10 -6
  229. package/toolbar/_toolbar-theme.scss +10 -6
  230. package/tooltip/_tooltip-theme.scss +8 -4
  231. package/tooltip/index.d.ts +5 -6
  232. package/tree/_tree-theme.scss +8 -4
@@ -59,16 +59,20 @@
59
59
  }
60
60
  }
61
61
 
62
- @mixin overrides($tokens: ()) {
63
- @include token-utils.batch-create-token-values(
64
- $tokens,
62
+ /// Defines the tokens that will be available in the `overrides` mixin and for docs extraction.
63
+ @function _define-overrides() {
64
+ @return (
65
65
  (
66
66
  namespace: tokens-mat-autocomplete.$prefix,
67
67
  tokens: tokens-mat-autocomplete.get-token-slots(),
68
- )
68
+ ),
69
69
  );
70
70
  }
71
71
 
72
+ @mixin overrides($tokens: ()) {
73
+ @include token-utils.batch-create-token-values($tokens, _define-overrides()...);
74
+ }
75
+
72
76
  @mixin theme($theme) {
73
77
  @include theming.private-check-duplicate-theme-styles($theme, 'mat-autocomplete') {
74
78
  @if inspection.get-theme-version($theme) == 1 {
@@ -8,8 +8,7 @@ import { EventEmitter } from '@angular/core';
8
8
  import * as i0 from '@angular/core';
9
9
  import * as i1 from '@angular/cdk/overlay';
10
10
  import * as i2 from '@angular/material/core';
11
- import * as i3 from '@angular/common';
12
- import * as i7 from '@angular/cdk/scrolling';
11
+ import * as i6 from '@angular/cdk/scrolling';
13
12
  import { InjectionToken } from '@angular/core';
14
13
  import { MatOptgroup } from '@angular/material/core';
15
14
  import { MatOption } from '@angular/material/core';
@@ -30,7 +29,7 @@ import { ThemePalette } from '@angular/material/core';
30
29
  */
31
30
  export declare function getMatAutocompleteMissingPanelError(): Error;
32
31
 
33
- declare namespace i4 {
32
+ declare namespace i3 {
34
33
  export {
35
34
  MAT_AUTOCOMPLETE_DEFAULT_OPTIONS_FACTORY,
36
35
  MatAutocompleteSelectedEvent,
@@ -41,7 +40,7 @@ declare namespace i4 {
41
40
  }
42
41
  }
43
42
 
44
- declare namespace i5 {
43
+ declare namespace i4 {
45
44
  export {
46
45
  getMatAutocompleteMissingPanelError,
47
46
  MAT_AUTOCOMPLETE_SCROLL_STRATEGY_FACTORY,
@@ -52,7 +51,7 @@ declare namespace i5 {
52
51
  }
53
52
  }
54
53
 
55
- declare namespace i6 {
54
+ declare namespace i5 {
56
55
  export {
57
56
  MatAutocompleteOrigin
58
57
  }
@@ -219,7 +218,7 @@ export declare interface MatAutocompleteDefaultOptions {
219
218
 
220
219
  export declare class MatAutocompleteModule {
221
220
  static ɵfac: i0.ɵɵFactoryDeclaration<MatAutocompleteModule, never>;
222
- static ɵmod: i0.ɵɵNgModuleDeclaration<MatAutocompleteModule, never, [typeof i1.OverlayModule, typeof i2.MatOptionModule, typeof i2.MatCommonModule, typeof i3.CommonModule, typeof i4.MatAutocomplete, typeof i5.MatAutocompleteTrigger, typeof i6.MatAutocompleteOrigin], [typeof i7.CdkScrollableModule, typeof i4.MatAutocomplete, typeof i2.MatOptionModule, typeof i2.MatCommonModule, typeof i5.MatAutocompleteTrigger, typeof i6.MatAutocompleteOrigin]>;
221
+ static ɵmod: i0.ɵɵNgModuleDeclaration<MatAutocompleteModule, never, [typeof i1.OverlayModule, typeof i2.MatOptionModule, typeof i2.MatCommonModule, typeof i3.MatAutocomplete, typeof i4.MatAutocompleteTrigger, typeof i5.MatAutocompleteOrigin], [typeof i6.CdkScrollableModule, typeof i3.MatAutocomplete, typeof i2.MatOptionModule, typeof i2.MatCommonModule, typeof i4.MatAutocompleteTrigger, typeof i5.MatAutocompleteOrigin]>;
223
222
  static ɵinj: i0.ɵɵInjectorDeclaration<MatAutocompleteModule>;
224
223
  }
225
224
 
@@ -79,18 +79,22 @@
79
79
  }
80
80
  }
81
81
 
82
- /// Outputs the CSS variable values for the given tokens.
83
- /// @param {Map} $tokens The token values to emit.
84
- @mixin overrides($tokens: ()) {
85
- @include token-utils.batch-create-token-values(
86
- $tokens,
82
+ /// Defines the tokens that will be available in the `overrides` mixin and for docs extraction.
83
+ @function _define-overrides() {
84
+ @return (
87
85
  (
88
86
  namespace: tokens-mat-badge.$prefix,
89
87
  tokens: tokens-mat-badge.get-token-slots(),
90
- )
88
+ ),
91
89
  );
92
90
  }
93
91
 
92
+ /// Outputs the CSS variable values for the given tokens.
93
+ /// @param {Map} $tokens The token values to emit.
94
+ @mixin overrides($tokens: ()) {
95
+ @include token-utils.batch-create-token-values($tokens, _define-overrides()...);
96
+ }
97
+
94
98
  /// Outputs all (base, color, typography, and density) theme styles for the mat-badge.
95
99
  /// @param {Map} $theme The theme to generate styles for.
96
100
  /// @param {ArgList} Additional optional arguments (only supported for M3 themes):
package/badge/index.d.ts CHANGED
@@ -21,6 +21,7 @@ export declare class MatBadge implements OnInit, OnDestroy {
21
21
  private _ariaDescriber;
22
22
  private _renderer;
23
23
  private _animationMode;
24
+ private _idGenerator;
24
25
  /**
25
26
  * Theme color of the badge. This API is supported in M2 themes only, it
26
27
  * has no effect in M3 themes.
@@ -52,8 +53,6 @@ export declare class MatBadge implements OnInit, OnDestroy {
52
53
  size: MatBadgeSize;
53
54
  /** Whether the badge is hidden. */
54
55
  hidden: boolean;
55
- /** Unique id for the badge */
56
- _id: number;
57
56
  /** Visible badge element. */
58
57
  private _badgeElement;
59
58
  /** Inline badge description. Used when the badge is applied to non-interactive host elements. */
@@ -53,16 +53,20 @@
53
53
  }
54
54
  }
55
55
 
56
- @mixin overrides($tokens: ()) {
57
- @include token-utils.batch-create-token-values(
58
- $tokens,
56
+ /// Defines the tokens that will be available in the `overrides` mixin and for docs extraction.
57
+ @function _define-overrides() {
58
+ @return (
59
59
  (
60
60
  namespace: tokens-mat-bottom-sheet.$prefix,
61
61
  tokens: tokens-mat-bottom-sheet.get-token-slots(),
62
- )
62
+ ),
63
63
  );
64
64
  }
65
65
 
66
+ @mixin overrides($tokens: ()) {
67
+ @include token-utils.batch-create-token-values($tokens, _define-overrides()...);
68
+ }
69
+
66
70
  @mixin theme($theme) {
67
71
  @include theming.private-check-duplicate-theme-styles($theme, 'mat-bottom-sheet') {
68
72
  @if inspection.get-theme-version($theme) == 1 {
@@ -361,9 +361,8 @@
361
361
  }
362
362
  }
363
363
 
364
- /// Outputs the CSS variable values for the given tokens.
365
- /// @param {Map} $tokens The token values to emit.
366
- @mixin overrides($tokens: ()) {
364
+ /// Defines the tokens that will be available in the `overrides` mixin and for docs extraction.
365
+ @function _define-overrides() {
367
366
  $mdc-filled-button-tokens: tokens-mdc-filled-button.get-token-slots();
368
367
  $mat-filled-button-tokens: tokens-mat-filled-button.get-token-slots();
369
368
  $mdc-outlined-button-tokens: tokens-mdc-outlined-button.get-token-slots();
@@ -373,8 +372,7 @@
373
372
  $mdc-text-button-tokens: tokens-mdc-text-button.get-token-slots();
374
373
  $mat-text-button-tokens: tokens-mat-text-button.get-token-slots();
375
374
 
376
- @include token-utils.batch-create-token-values(
377
- $tokens,
375
+ @return (
378
376
  (
379
377
  namespace: tokens-mdc-filled-button.$prefix,
380
378
  tokens: $mdc-filled-button-tokens,
@@ -414,10 +412,16 @@
414
412
  namespace: tokens-mat-text-button.$prefix,
415
413
  tokens: $mat-text-button-tokens,
416
414
  prefix: 'text-',
417
- )
415
+ ),
418
416
  );
419
417
  }
420
418
 
419
+ /// Outputs the CSS variable values for the given tokens.
420
+ /// @param {Map} $tokens The token values to emit.
421
+ @mixin overrides($tokens: ()) {
422
+ @include token-utils.batch-create-token-values($tokens, _define-overrides()...);
423
+ }
424
+
421
425
  /// Outputs all (base, color, typography, and density) theme styles for the mat-button.
422
426
  /// @param {Map} $theme The theme to generate styles for.
423
427
  /// @param {ArgList} Additional optional arguments (only supported for M3 themes):
@@ -158,11 +158,9 @@
158
158
  }
159
159
  }
160
160
 
161
- /// Outputs the CSS variable values for the given tokens.
162
- /// @param {Map} $tokens The token values to emit.
163
- @mixin overrides($tokens: ()) {
164
- @include token-utils.batch-create-token-values(
165
- $tokens,
161
+ /// Defines the tokens that will be available in the `overrides` mixin and for docs extraction.
162
+ @function _define-overrides() {
163
+ @return (
166
164
  (
167
165
  namespace: tokens-mdc-fab.$prefix,
168
166
  tokens: tokens-mdc-fab.get-token-slots(),
@@ -185,10 +183,16 @@
185
183
  namespace: tokens-mat-fab-small.$prefix,
186
184
  tokens: tokens-mat-fab-small.get-token-slots(),
187
185
  prefix: 'small-',
188
- )
186
+ ),
189
187
  );
190
188
  }
191
189
 
190
+ /// Outputs the CSS variable values for the given tokens.
191
+ /// @param {Map} $tokens The token values to emit.
192
+ @mixin overrides($tokens: ()) {
193
+ @include token-utils.batch-create-token-values($tokens, _define-overrides()...);
194
+ }
195
+
192
196
  /// Outputs all (base, color, typography, and density) theme styles for the mat-checkbox.
193
197
  /// @param {Map} $theme The theme to generate styles for.
194
198
  /// @param {ArgList} Additional optional arguments (only supported for M3 themes):
@@ -121,9 +121,9 @@
121
121
  }
122
122
  }
123
123
 
124
- @mixin overrides($tokens: ()) {
125
- @include token-utils.batch-create-token-values(
126
- $tokens,
124
+ /// Defines the tokens that will be available in the `overrides` mixin and for docs extraction.
125
+ @function _define-overrides() {
126
+ @return (
127
127
  (
128
128
  namespace: tokens-mdc-icon-button.$prefix,
129
129
  tokens: tokens-mdc-icon-button.get-token-slots(),
@@ -131,10 +131,14 @@
131
131
  (
132
132
  namespace: tokens-mat-icon-button.$prefix,
133
133
  tokens: tokens-mat-icon-button.get-token-slots(),
134
- )
134
+ ),
135
135
  );
136
136
  }
137
137
 
138
+ @mixin overrides($tokens: ()) {
139
+ @include token-utils.batch-create-token-values($tokens, _define-overrides()...);
140
+ }
141
+
138
142
  /// Outputs all (base, color, typography, and density) theme styles for the mat-icon-button.
139
143
  /// @param {Map} $theme The theme to generate styles for.
140
144
  /// @param {ArgList} Additional optional arguments (only supported for M3 themes):
package/button/index.d.ts CHANGED
@@ -69,7 +69,7 @@ declare class MatAnchorBase extends MatButtonBase implements OnInit, OnDestroy {
69
69
  ngOnInit(): void;
70
70
  ngOnDestroy(): void;
71
71
  _haltDisabledEvents: (event: Event) => void;
72
- protected _getAriaDisabled(): boolean;
72
+ protected _getAriaDisabled(): boolean | null;
73
73
  static ɵfac: i0.ɵɵFactoryDeclaration<MatAnchorBase, never>;
74
74
  static ɵdir: i0.ɵɵDirectiveDeclaration<MatAnchorBase, never, never, { "tabIndex": { "alias": "tabIndex"; "required": false; }; }, {}, never, never, true, never>;
75
75
  static ngAcceptInputType_tabIndex: unknown;
@@ -87,13 +87,12 @@
87
87
  }
88
88
  }
89
89
 
90
- /// Outputs the CSS variable values for the given tokens.
91
- /// @param {Map} $tokens The token values to emit.
92
- @mixin overrides($tokens: ()) {
90
+ /// Defines the tokens that will be available in the `overrides` mixin and for docs extraction.
91
+ @function _define-overrides() {
93
92
  $legacy-tokens: tokens-mat-legacy-button-toggle.get-token-slots();
94
93
  $standard-tokens: tokens-mat-standard-button-toggle.get-token-slots();
95
- @include token-utils.batch-create-token-values(
96
- $tokens,
94
+
95
+ @return (
97
96
  (
98
97
  namespace: tokens-mat-legacy-button-toggle.$prefix,
99
98
  tokens: $legacy-tokens,
@@ -102,10 +101,16 @@
102
101
  (
103
102
  namespace: tokens-mat-standard-button-toggle.$prefix,
104
103
  tokens: $standard-tokens,
105
- )
104
+ ),
106
105
  );
107
106
  }
108
107
 
108
+ /// Outputs the CSS variable values for the given tokens.
109
+ /// @param {Map} $tokens The token values to emit.
110
+ @mixin overrides($tokens: ()) {
111
+ @include token-utils.batch-create-token-values($tokens, _define-overrides()...);
112
+ }
113
+
109
114
  /// Outputs all (base, color, typography, and density) theme styles for the mat-button-toggle.
110
115
  /// @param {Map} $theme The theme to generate styles for.
111
116
  /// @param {ArgList} Additional optional arguments (only supported for M3 themes):
@@ -53,6 +53,7 @@ export declare class MatButtonToggle implements OnInit, AfterViewInit, OnDestroy
53
53
  private _changeDetectorRef;
54
54
  private _elementRef;
55
55
  private _focusMonitor;
56
+ private _idGenerator;
56
57
  private _checked;
57
58
  /**
58
59
  * Attached to the aria-label attribute of the host element. In most cases, aria-labelledby will
@@ -150,7 +151,7 @@ export declare interface MatButtonToggleDefaultOptions {
150
151
  * setting an appearance on a button toggle or group.
151
152
  */
152
153
  appearance?: MatButtonToggleAppearance;
153
- /** Whetehr icon indicators should be hidden for single-selection button toggle groups. */
154
+ /** Whether icon indicators should be hidden for single-selection button toggle groups. */
154
155
  hideSingleSelectionIndicator?: boolean;
155
156
  /** Whether icon indicators should be hidden for multiple-selection button toggle groups. */
156
157
  hideMultipleSelectionIndicator?: boolean;
@@ -93,9 +93,9 @@
93
93
  }
94
94
  }
95
95
 
96
- @mixin overrides($tokens: ()) {
97
- @include token-utils.batch-create-token-values(
98
- $tokens,
96
+ /// Defines the tokens that will be available in the `overrides` mixin and for docs extraction.
97
+ @function _define-overrides() {
98
+ @return (
99
99
  (
100
100
  namespace: tokens-mat-card.$prefix,
101
101
  tokens: tokens-mat-card.get-token-slots(),
@@ -109,10 +109,14 @@
109
109
  namespace: tokens-mdc-outlined-card.$prefix,
110
110
  tokens: tokens-mdc-outlined-card.get-token-slots(),
111
111
  prefix: 'outlined-',
112
- )
112
+ ),
113
113
  );
114
114
  }
115
115
 
116
+ @mixin overrides($tokens: ()) {
117
+ @include token-utils.batch-create-token-values($tokens, _define-overrides()...);
118
+ }
119
+
116
120
  @mixin theme($theme) {
117
121
  @include theming.private-check-duplicate-theme-styles($theme, 'mat-card') {
118
122
  @if inspection.get-theme-version($theme) == 1 {
package/card/index.d.ts CHANGED
@@ -1,9 +1,8 @@
1
1
  import * as i0 from '@angular/core';
2
2
  import * as i1 from '@angular/material/core';
3
- import * as i2 from '@angular/common';
4
3
  import { InjectionToken } from '@angular/core';
5
4
 
6
- declare namespace i3 {
5
+ declare namespace i2 {
7
6
  export {
8
7
  MatCardAppearance,
9
8
  MatCardConfig,
@@ -142,7 +141,7 @@ export declare class MatCardMdImage {
142
141
 
143
142
  export declare class MatCardModule {
144
143
  static ɵfac: i0.ɵɵFactoryDeclaration<MatCardModule, never>;
145
- static ɵmod: i0.ɵɵNgModuleDeclaration<MatCardModule, never, [typeof i1.MatCommonModule, typeof i2.CommonModule, typeof i3.MatCard, typeof i3.MatCardActions, typeof i3.MatCardAvatar, typeof i3.MatCardContent, typeof i3.MatCardFooter, typeof i3.MatCardHeader, typeof i3.MatCardImage, typeof i3.MatCardLgImage, typeof i3.MatCardMdImage, typeof i3.MatCardSmImage, typeof i3.MatCardSubtitle, typeof i3.MatCardTitle, typeof i3.MatCardTitleGroup, typeof i3.MatCardXlImage], [typeof i3.MatCard, typeof i3.MatCardActions, typeof i3.MatCardAvatar, typeof i3.MatCardContent, typeof i3.MatCardFooter, typeof i3.MatCardHeader, typeof i3.MatCardImage, typeof i3.MatCardLgImage, typeof i3.MatCardMdImage, typeof i3.MatCardSmImage, typeof i3.MatCardSubtitle, typeof i3.MatCardTitle, typeof i3.MatCardTitleGroup, typeof i3.MatCardXlImage, typeof i1.MatCommonModule]>;
144
+ static ɵmod: i0.ɵɵNgModuleDeclaration<MatCardModule, never, [typeof i1.MatCommonModule, typeof i2.MatCard, typeof i2.MatCardActions, typeof i2.MatCardAvatar, typeof i2.MatCardContent, typeof i2.MatCardFooter, typeof i2.MatCardHeader, typeof i2.MatCardImage, typeof i2.MatCardLgImage, typeof i2.MatCardMdImage, typeof i2.MatCardSmImage, typeof i2.MatCardSubtitle, typeof i2.MatCardTitle, typeof i2.MatCardTitleGroup, typeof i2.MatCardXlImage], [typeof i2.MatCard, typeof i2.MatCardActions, typeof i2.MatCardAvatar, typeof i2.MatCardContent, typeof i2.MatCardFooter, typeof i2.MatCardHeader, typeof i2.MatCardImage, typeof i2.MatCardLgImage, typeof i2.MatCardMdImage, typeof i2.MatCardSmImage, typeof i2.MatCardSubtitle, typeof i2.MatCardTitle, typeof i2.MatCardTitleGroup, typeof i2.MatCardXlImage, typeof i1.MatCommonModule]>;
146
145
  static ɵinj: i0.ɵɵInjectorDeclaration<MatCardModule>;
147
146
  }
148
147
 
@@ -105,11 +105,9 @@
105
105
  }
106
106
  }
107
107
 
108
- /// Outputs the CSS variable values for the given tokens.
109
- /// @param {Map} $tokens The token values to emit.
110
- @mixin overrides($tokens: ()) {
111
- @include token-utils.batch-create-token-values(
112
- $tokens,
108
+ /// Defines the tokens that will be available in the `overrides` mixin and for docs extraction.
109
+ @function _define-overrides() {
110
+ @return (
113
111
  (
114
112
  namespace: tokens-mat-checkbox.$prefix,
115
113
  tokens: tokens-mat-checkbox.get-token-slots(),
@@ -117,10 +115,16 @@
117
115
  (
118
116
  namespace: tokens-mdc-checkbox.$prefix,
119
117
  tokens: tokens-mdc-checkbox.get-token-slots(),
120
- )
118
+ ),
121
119
  );
122
120
  }
123
121
 
122
+ /// Outputs the CSS variable values for the given tokens.
123
+ /// @param {Map} $tokens The token values to emit.
124
+ @mixin overrides($tokens: ()) {
125
+ @include token-utils.batch-create-token-values($tokens, _define-overrides()...);
126
+ }
127
+
124
128
  /// Outputs all (base, color, typography, and density) theme styles for the mat-checkbox.
125
129
  /// @param {Map} $theme The theme to generate styles for.
126
130
  /// @param {ArgList} Additional optional arguments (only supported for M3 themes):
@@ -123,11 +123,9 @@
123
123
  }
124
124
  }
125
125
 
126
- /// Outputs the CSS variable values for the given tokens.
127
- /// @param {Map} $tokens The token values to emit.
128
- @mixin overrides($tokens: ()) {
129
- @include token-utils.batch-create-token-values(
130
- $tokens,
126
+ /// Defines the tokens that will be available in the `overrides` mixin and for docs extraction.
127
+ @function _define-overrides() {
128
+ @return (
131
129
  (
132
130
  namespace: tokens-mdc-chip.$prefix,
133
131
  tokens: tokens-mdc-chip.get-token-slots(),
@@ -135,10 +133,16 @@
135
133
  (
136
134
  namespace: tokens-mat-chip.$prefix,
137
135
  tokens: tokens-mat-chip.get-token-slots(),
138
- )
136
+ ),
139
137
  );
140
138
  }
141
139
 
140
+ /// Outputs the CSS variable values for the given tokens.
141
+ /// @param {Map} $tokens The token values to emit.
142
+ @mixin overrides($tokens: ()) {
143
+ @include token-utils.batch-create-token-values($tokens, _define-overrides()...);
144
+ }
145
+
142
146
  /// Outputs all (base, color, typography, and density) theme styles for the mat-chips.
143
147
  /// @param {Map} $theme The theme to generate styles for.
144
148
  /// @param {ArgList} Additional optional arguments (only supported for M3 themes):
@@ -71,15 +71,11 @@
71
71
  }
72
72
  }
73
73
 
74
- // This theme is a special case where not all of the imported tokens are supported in `overrides`.
75
- // To aid the docs token extraction, we have to pull the `overrides` token config out into a
76
- // separate function.
77
- // !!!Important!!! renaming or removal of this function requires the `extract-tokens.ts` script to
78
- // be updated as well.
79
- @function _get-supported-overrides-tokens() {
74
+ @function _define-overrides() {
80
75
  $app-tokens: tokens-mat-app.get-token-slots();
81
76
  $ripple-tokens: tokens-mat-ripple.get-token-slots();
82
77
  $option-tokens: tokens-mat-option.get-token-slots();
78
+ $optgroup-tokens: tokens-mat-optgroup.get-token-slots();
83
79
  $full-pseudo-checkbox-tokens: tokens-mat-full-pseudo-checkbox.get-token-slots();
84
80
  $minimal-pseudo-checkbox-tokens: tokens-mat-minimal-pseudo-checkbox.get-token-slots();
85
81
 
@@ -87,6 +83,7 @@
87
83
  (namespace: tokens-mat-app.$prefix, tokens: $app-tokens, prefix: 'app-'),
88
84
  (namespace: tokens-mat-ripple.$prefix, tokens: $ripple-tokens, prefix: 'ripple-'),
89
85
  (namespace: tokens-mat-option.$prefix, tokens: $option-tokens, prefix: 'option-'),
86
+ (namespace: tokens-mat-optgroup.$prefix, tokens: $optgroup-tokens, prefix: 'optgroup-'),
90
87
  (
91
88
  namespace: tokens-mat-full-pseudo-checkbox.$prefix,
92
89
  tokens: $full-pseudo-checkbox-tokens,
@@ -101,7 +98,7 @@
101
98
  }
102
99
 
103
100
  @mixin overrides($tokens: ()) {
104
- @include token-utils.batch-create-token-values($tokens, _get-supported-overrides-tokens()...);
101
+ @include token-utils.batch-create-token-values($tokens, _define-overrides()...);
105
102
  }
106
103
 
107
104
  // Mixin that renders all of the core styles that depend on the theme.
package/core/_core.scss CHANGED
@@ -1,12 +1,9 @@
1
- @use '@angular/cdk';
2
1
  @use './tokens/m2/mat/app' as tokens-mat-app;
3
2
  @use './tokens/token-utils';
4
3
  @use './style/elevation';
5
4
 
6
- // Mixin that renders all of the core styles that are not theme-dependent.
7
- @mixin core() {
8
- @include cdk.a11y-visually-hidden();
9
- }
5
+ /// @deprecated This mixin is a no-op and is going to be removed in v21.
6
+ @mixin core() {}
10
7
 
11
8
  // Emits the mat-app-background CSS class. This predefined class sets the
12
9
  // background color and text color of an element.
@@ -1,6 +1,7 @@
1
1
  @use 'sass:list';
2
2
  @use 'sass:map';
3
3
  @use 'sass:meta';
4
+ @use 'sass:color';
4
5
  @use '../theming/theming';
5
6
  @use './palette';
6
7
 
@@ -82,7 +83,7 @@
82
83
  @return $color;
83
84
  }
84
85
 
85
- @return rgba($color, if($opacity == null, opacity($color), $opacity));
86
+ @return rgba($color, if($opacity == null, color.opacity($color), $opacity));
86
87
  }
87
88
 
88
89
  // Validates the specified theme by ensuring that the optional color config defines
@@ -47,16 +47,20 @@
47
47
  }
48
48
  }
49
49
 
50
- @mixin overrides($tokens: ()) {
51
- @include token-utils.batch-create-token-values(
52
- $tokens,
50
+ /// Defines the tokens that will be available in the `overrides` mixin and for docs extraction.
51
+ @function _define-overrides() {
52
+ @return (
53
53
  (
54
54
  namespace: tokens-mat-optgroup.$prefix,
55
55
  tokens: tokens-mat-optgroup.get-token-slots(),
56
- )
56
+ ),
57
57
  );
58
58
  }
59
59
 
60
+ @mixin overrides($tokens: ()) {
61
+ @include token-utils.batch-create-token-values($tokens, _define-overrides()...);
62
+ }
63
+
60
64
  @mixin theme($theme) {
61
65
  @include theming.private-check-duplicate-theme-styles($theme, 'mat-optgroup') {
62
66
  @if inspection.get-theme-version($theme) == 1 {
@@ -72,18 +72,22 @@
72
72
  }
73
73
  }
74
74
 
75
- /// Outputs the CSS variable values for the given tokens.
76
- /// @param {Map} $tokens The token values to emit.
77
- @mixin overrides($tokens: ()) {
78
- @include token-utils.batch-create-token-values(
79
- $tokens,
75
+ /// Defines the tokens that will be available in the `overrides` mixin and for docs extraction.
76
+ @function _define-overrides() {
77
+ @return (
80
78
  (
81
79
  namespace: tokens-mat-option.$prefix,
82
80
  tokens: tokens-mat-option.get-token-slots(),
83
- )
81
+ ),
84
82
  );
85
83
  }
86
84
 
85
+ /// Outputs the CSS variable values for the given tokens.
86
+ /// @param {Map} $tokens The token values to emit.
87
+ @mixin overrides($tokens: ()) {
88
+ @include token-utils.batch-create-token-values($tokens, _define-overrides()...);
89
+ }
90
+
87
91
  /// Outputs all (base, color, typography, and density) theme styles for the mat-option.
88
92
  /// @param {Map} $theme The theme to generate styles for.
89
93
  /// @param {ArgList} Additional optional arguments (only supported for M3 themes):
@@ -52,16 +52,20 @@
52
52
  }
53
53
  }
54
54
 
55
- @mixin overrides($tokens: ()) {
56
- @include token-utils.batch-create-token-values(
57
- $tokens,
55
+ /// Defines the tokens that will be available in the `overrides` mixin and for docs extraction.
56
+ @function _define-overrides() {
57
+ @return (
58
58
  (
59
59
  namespace: tokens-mat-ripple.$prefix,
60
60
  tokens: tokens-mat-ripple.get-token-slots(),
61
- )
61
+ ),
62
62
  );
63
63
  }
64
64
 
65
+ @mixin overrides($tokens: ()) {
66
+ @include token-utils.batch-create-token-values($tokens, _define-overrides()...);
67
+ }
68
+
65
69
  @mixin theme($theme) {
66
70
  @include theming.private-check-duplicate-theme-styles($theme, 'mat-ripple') {
67
71
  @if inspection.get-theme-version($theme) == 1 {
@@ -49,14 +49,12 @@
49
49
  @mixin base($theme) {
50
50
  }
51
51
 
52
- /// Outputs the CSS variable values for the given tokens.
53
- /// @param {Map} $tokens The token values to emit.
54
- @mixin overrides($tokens: ()) {
52
+ /// Defines the tokens that will be available in the `overrides` mixin and for docs extraction.
53
+ @function _define-overrides() {
55
54
  $full-pseudo-checkbox-tokens: tokens-mat-full-pseudo-checkbox.get-token-slots();
56
55
  $minimal-pseudo-checkbox-tokens: tokens-mat-minimal-pseudo-checkbox.get-token-slots();
57
56
 
58
- @include token-utils.batch-create-token-values(
59
- $tokens,
57
+ @return (
60
58
  (
61
59
  namespace: tokens-mat-full-pseudo-checkbox.$prefix,
62
60
  tokens: $full-pseudo-checkbox-tokens,
@@ -66,10 +64,16 @@
66
64
  namespace: tokens-mat-minimal-pseudo-checkbox.$prefix,
67
65
  tokens: $minimal-pseudo-checkbox-tokens,
68
66
  prefix: 'minimal-',
69
- )
67
+ ),
70
68
  );
71
69
  }
72
70
 
71
+ /// Outputs the CSS variable values for the given tokens.
72
+ /// @param {Map} $tokens The token values to emit.
73
+ @mixin overrides($tokens: ()) {
74
+ @include token-utils.batch-create-token-values($tokens, _define-overrides()...);
75
+ }
76
+
73
77
  /// Outputs color theme styles for the mat-pseudo-checkbox.
74
78
  /// @param {Map} $theme The theme to generate color styles for.
75
79
  /// @param {ArgList} Additional optional arguments (only supported for M3 themes):
@@ -29,7 +29,7 @@
29
29
  /// Validates that the given object is an M3 palette.
30
30
  /// @param {*} $palette The object to test
31
31
  /// @return {Boolean|null} null if it is a valid M3 palette, else true.
32
- @function _validate-palette($palette) {
32
+ @function validate-palette($palette) {
33
33
  @if not meta.type-of($palette) == 'map' {
34
34
  @return true;
35
35
  }
@@ -100,15 +100,15 @@
100
100
  );
101
101
  }
102
102
  @if $config and map.has-key($config, theme-type) and
103
- not list.index((light, dark), map.get($config, theme-type)) {
103
+ not list.index((light, dark, color-scheme), map.get($config, theme-type)) {
104
104
  @return (
105
- #{'Expected $config.theme-type to be one of: light, dark. Got:'}
105
+ #{'Expected $config.theme-type to be one of: light, dark, color-scheme. Got:'}
106
106
  map.get($config, theme-type)
107
107
  );
108
108
  }
109
109
  @each $palette in (primary, secondary, tertiary) {
110
110
  @if $config and map.has-key($config, $palette) {
111
- $err: _validate-palette(map.get($config, $palette));
111
+ $err: validate-palette(map.get($config, $palette));
112
112
  @if $err {
113
113
  @return (
114
114
  #{'Expected $config.#{$palette} to be a valid M3 palette. Got:'}