@angular/material 19.0.0-next.8 → 19.0.0-rc.0

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 (229) hide show
  1. package/_index.scss +1 -2
  2. package/autocomplete/_autocomplete-theme.scss +37 -24
  3. package/autocomplete/index.d.ts +5 -6
  4. package/badge/_badge-theme.scss +38 -24
  5. package/bottom-sheet/_bottom-sheet-theme.scss +32 -20
  6. package/button/_button-theme.scss +229 -105
  7. package/button/_fab-theme.scss +95 -44
  8. package/button/_icon-button-theme.scss +38 -25
  9. package/button/index.d.ts +3 -3
  10. package/button-toggle/_button-toggle-theme.scss +62 -37
  11. package/card/_card-theme.scss +79 -38
  12. package/card/index.d.ts +2 -3
  13. package/checkbox/_checkbox-theme.scss +16 -10
  14. package/chips/_chips-theme.scss +64 -30
  15. package/core/_core-theme.scss +55 -37
  16. package/core/_core.scss +3 -6
  17. package/core/option/_optgroup-theme.scss +29 -18
  18. package/core/option/_option-theme.scss +34 -21
  19. package/core/ripple/_ripple-theme.scss +33 -21
  20. package/core/selection/pseudo-checkbox/_pseudo-checkbox-theme.scss +49 -23
  21. package/core/theming/_config-validation.scss +4 -4
  22. package/core/theming/_definition.scss +12 -2
  23. package/core/tokens/_m3-system.scss +86 -42
  24. package/core/tokens/_token-utils.scss +91 -34
  25. package/core/tokens/m2/mat/_badge.scss +12 -3
  26. package/core/tokens/m2/mdc/_radio.scss +1 -1
  27. package/core/tokens/m3/definitions/_md-comp-elevated-card.scss +1 -1
  28. package/core/tokens/m3/mat/_badge.scss +6 -3
  29. package/datepicker/_datepicker-theme.scss +53 -32
  30. package/datepicker/index.d.ts +33 -34
  31. package/dialog/_dialog-theme.scss +46 -23
  32. package/divider/_divider-theme.scss +28 -17
  33. package/expansion/_expansion-theme.scss +36 -24
  34. package/fesm2022/autocomplete/testing.mjs +2 -5
  35. package/fesm2022/autocomplete/testing.mjs.map +1 -1
  36. package/fesm2022/autocomplete.mjs +225 -148
  37. package/fesm2022/autocomplete.mjs.map +1 -1
  38. package/fesm2022/badge/testing.mjs +2 -5
  39. package/fesm2022/badge/testing.mjs.map +1 -1
  40. package/fesm2022/badge.mjs +45 -35
  41. package/fesm2022/badge.mjs.map +1 -1
  42. package/fesm2022/bottom-sheet/testing.mjs +1 -1
  43. package/fesm2022/bottom-sheet/testing.mjs.map +1 -1
  44. package/fesm2022/bottom-sheet.mjs +80 -58
  45. package/fesm2022/bottom-sheet.mjs.map +1 -1
  46. package/fesm2022/button/testing.mjs +2 -2
  47. package/fesm2022/button/testing.mjs.map +1 -1
  48. package/fesm2022/button-toggle/testing.mjs +4 -7
  49. package/fesm2022/button-toggle/testing.mjs.map +1 -1
  50. package/fesm2022/button-toggle.mjs +82 -45
  51. package/fesm2022/button-toggle.mjs.map +1 -1
  52. package/fesm2022/button.mjs +106 -79
  53. package/fesm2022/button.mjs.map +1 -1
  54. package/fesm2022/card/testing.mjs +3 -6
  55. package/fesm2022/card/testing.mjs.map +1 -1
  56. package/fesm2022/card.mjs +56 -69
  57. package/fesm2022/card.mjs.map +1 -1
  58. package/fesm2022/checkbox/testing.mjs +4 -7
  59. package/fesm2022/checkbox/testing.mjs.map +1 -1
  60. package/fesm2022/checkbox.mjs +104 -62
  61. package/fesm2022/checkbox.mjs.map +1 -1
  62. package/fesm2022/chips/testing.mjs +11 -14
  63. package/fesm2022/chips/testing.mjs.map +1 -1
  64. package/fesm2022/chips.mjs +322 -276
  65. package/fesm2022/chips.mjs.map +1 -1
  66. package/fesm2022/core/testing.mjs +5 -11
  67. package/fesm2022/core/testing.mjs.map +1 -1
  68. package/fesm2022/core.mjs +242 -187
  69. package/fesm2022/core.mjs.map +1 -1
  70. package/fesm2022/datepicker/testing.mjs +13 -22
  71. package/fesm2022/datepicker/testing.mjs.map +1 -1
  72. package/fesm2022/datepicker.mjs +827 -582
  73. package/fesm2022/datepicker.mjs.map +1 -1
  74. package/fesm2022/dialog/testing.mjs +15 -10
  75. package/fesm2022/dialog/testing.mjs.map +1 -1
  76. package/fesm2022/dialog.mjs +221 -156
  77. package/fesm2022/dialog.mjs.map +1 -1
  78. package/fesm2022/divider/testing.mjs +1 -1
  79. package/fesm2022/divider/testing.mjs.map +1 -1
  80. package/fesm2022/divider.mjs +10 -12
  81. package/fesm2022/divider.mjs.map +1 -1
  82. package/fesm2022/expansion/testing.mjs +7 -10
  83. package/fesm2022/expansion/testing.mjs.map +1 -1
  84. package/fesm2022/expansion.mjs +86 -80
  85. package/fesm2022/expansion.mjs.map +1 -1
  86. package/fesm2022/form-field/testing.mjs +12 -15
  87. package/fesm2022/form-field/testing.mjs.map +1 -1
  88. package/fesm2022/form-field.mjs +179 -132
  89. package/fesm2022/form-field.mjs.map +1 -1
  90. package/fesm2022/grid-list/testing.mjs +11 -17
  91. package/fesm2022/grid-list/testing.mjs.map +1 -1
  92. package/fesm2022/grid-list.mjs +75 -56
  93. package/fesm2022/grid-list.mjs.map +1 -1
  94. package/fesm2022/icon/testing.mjs +8 -8
  95. package/fesm2022/icon/testing.mjs.map +1 -1
  96. package/fesm2022/icon.mjs +66 -46
  97. package/fesm2022/icon.mjs.map +1 -1
  98. package/fesm2022/input/testing.mjs +3 -3
  99. package/fesm2022/input/testing.mjs.map +1 -1
  100. package/fesm2022/input.mjs +103 -72
  101. package/fesm2022/input.mjs.map +1 -1
  102. package/fesm2022/list/testing.mjs +21 -38
  103. package/fesm2022/list/testing.mjs.map +1 -1
  104. package/fesm2022/list.mjs +197 -195
  105. package/fesm2022/list.mjs.map +1 -1
  106. package/fesm2022/menu/testing.mjs +3 -6
  107. package/fesm2022/menu/testing.mjs.map +1 -1
  108. package/fesm2022/menu.mjs +178 -127
  109. package/fesm2022/menu.mjs.map +1 -1
  110. package/fesm2022/paginator/testing.mjs +10 -13
  111. package/fesm2022/paginator/testing.mjs.map +1 -1
  112. package/fesm2022/paginator.mjs +83 -58
  113. package/fesm2022/paginator.mjs.map +1 -1
  114. package/fesm2022/progress-bar/testing.mjs +1 -1
  115. package/fesm2022/progress-bar/testing.mjs.map +1 -1
  116. package/fesm2022/progress-bar.mjs +36 -35
  117. package/fesm2022/progress-bar.mjs.map +1 -1
  118. package/fesm2022/progress-spinner/testing.mjs +1 -1
  119. package/fesm2022/progress-spinner/testing.mjs.map +1 -1
  120. package/fesm2022/progress-spinner.mjs +28 -14
  121. package/fesm2022/progress-spinner.mjs.map +1 -1
  122. package/fesm2022/radio/testing.mjs +6 -12
  123. package/fesm2022/radio/testing.mjs.map +1 -1
  124. package/fesm2022/radio.mjs +123 -87
  125. package/fesm2022/radio.mjs.map +1 -1
  126. package/fesm2022/select/testing.mjs +6 -9
  127. package/fesm2022/select/testing.mjs.map +1 -1
  128. package/fesm2022/select.mjs +219 -182
  129. package/fesm2022/select.mjs.map +1 -1
  130. package/fesm2022/sidenav/testing.mjs +6 -6
  131. package/fesm2022/sidenav/testing.mjs.map +1 -1
  132. package/fesm2022/sidenav.mjs +136 -125
  133. package/fesm2022/sidenav.mjs.map +1 -1
  134. package/fesm2022/slide-toggle/testing.mjs +3 -6
  135. package/fesm2022/slide-toggle/testing.mjs.map +1 -1
  136. package/fesm2022/slide-toggle.mjs +77 -47
  137. package/fesm2022/slide-toggle.mjs.map +1 -1
  138. package/fesm2022/slider/testing.mjs +2 -2
  139. package/fesm2022/slider/testing.mjs.map +1 -1
  140. package/fesm2022/slider.mjs +262 -194
  141. package/fesm2022/slider.mjs.map +1 -1
  142. package/fesm2022/snack-bar/testing.mjs +4 -7
  143. package/fesm2022/snack-bar/testing.mjs.map +1 -1
  144. package/fesm2022/snack-bar.mjs +143 -111
  145. package/fesm2022/snack-bar.mjs.map +1 -1
  146. package/fesm2022/sort/testing.mjs +3 -6
  147. package/fesm2022/sort/testing.mjs.map +1 -1
  148. package/fesm2022/sort.mjs +94 -74
  149. package/fesm2022/sort.mjs.map +1 -1
  150. package/fesm2022/stepper/testing.mjs +4 -4
  151. package/fesm2022/stepper/testing.mjs.map +1 -1
  152. package/fesm2022/stepper.mjs +146 -113
  153. package/fesm2022/stepper.mjs.map +1 -1
  154. package/fesm2022/table/testing.mjs +13 -25
  155. package/fesm2022/table/testing.mjs.map +1 -1
  156. package/fesm2022/table.mjs +183 -194
  157. package/fesm2022/table.mjs.map +1 -1
  158. package/fesm2022/tabs/testing.mjs +5 -5
  159. package/fesm2022/tabs/testing.mjs.map +1 -1
  160. package/fesm2022/tabs.mjs +329 -251
  161. package/fesm2022/tabs.mjs.map +1 -1
  162. package/fesm2022/timepicker/testing.mjs +7 -16
  163. package/fesm2022/timepicker/testing.mjs.map +1 -1
  164. package/fesm2022/timepicker.mjs +160 -155
  165. package/fesm2022/timepicker.mjs.map +1 -1
  166. package/fesm2022/toolbar/testing.mjs +2 -5
  167. package/fesm2022/toolbar/testing.mjs.map +1 -1
  168. package/fesm2022/toolbar.mjs +26 -17
  169. package/fesm2022/toolbar.mjs.map +1 -1
  170. package/fesm2022/tooltip/testing.mjs +6 -9
  171. package/fesm2022/tooltip/testing.mjs.map +1 -1
  172. package/fesm2022/tooltip.mjs +97 -74
  173. package/fesm2022/tooltip.mjs.map +1 -1
  174. package/fesm2022/tree/testing.mjs +3 -6
  175. package/fesm2022/tree/testing.mjs.map +1 -1
  176. package/fesm2022/tree.mjs +57 -61
  177. package/fesm2022/tree.mjs.map +1 -1
  178. package/form-field/_form-field-theme.scss +114 -61
  179. package/form-field/index.d.ts +9 -10
  180. package/grid-list/_grid-list-theme.scss +25 -15
  181. package/icon/_icon-theme.scss +22 -14
  182. package/input/_input-theme.scss +18 -11
  183. package/list/_list-theme.scss +89 -47
  184. package/list/index.d.ts +20 -21
  185. package/menu/_menu-theme.scss +33 -21
  186. package/menu/index.d.ts +8 -9
  187. package/package.json +2 -2
  188. package/paginator/_paginator-theme.scss +39 -23
  189. package/prebuilt-themes/azure-blue.css +1 -1
  190. package/prebuilt-themes/cyan-orange.css +1 -1
  191. package/prebuilt-themes/deeppurple-amber.css +1 -1
  192. package/prebuilt-themes/indigo-pink.css +1 -1
  193. package/prebuilt-themes/magenta-violet.css +1 -1
  194. package/prebuilt-themes/pink-bluegrey.css +1 -1
  195. package/prebuilt-themes/purple-green.css +1 -1
  196. package/prebuilt-themes/rose-red.css +1 -1
  197. package/progress-bar/_progress-bar-theme.scss +20 -16
  198. package/progress-spinner/_progress-spinner-theme.scss +41 -25
  199. package/progress-spinner/index.d.ts +3 -4
  200. package/radio/_radio-theme.scss +60 -32
  201. package/radio/index.d.ts +2 -3
  202. package/schematics/collection.json +3 -3
  203. package/schematics/ng-add/index.js +1 -1
  204. package/schematics/ng-add/index.mjs +1 -1
  205. package/schematics/ng-add/theming/create-custom-theme.js +1 -6
  206. package/schematics/ng-add/theming/create-custom-theme.mjs +1 -6
  207. package/schematics/ng-generate/{m3-theme → theme-color}/index_bundled.js +480 -288
  208. package/schematics/ng-generate/theme-color/index_bundled.js.map +7 -0
  209. package/schematics/ng-generate/{m3-theme → theme-color}/schema.json +7 -13
  210. package/schematics/ng-update/index_bundled.js +6 -1
  211. package/schematics/ng-update/index_bundled.js.map +1 -1
  212. package/select/_select-theme.scss +38 -25
  213. package/select/index.d.ts +6 -7
  214. package/sidenav/_sidenav-theme.scss +28 -17
  215. package/slide-toggle/_slide-toggle-theme.scss +52 -28
  216. package/slider/_slider-theme.scss +62 -38
  217. package/snack-bar/_snack-bar-theme.scss +29 -17
  218. package/sort/_sort-theme.scss +33 -21
  219. package/stepper/_stepper-theme.scss +40 -27
  220. package/stepper/index.d.ts +14 -15
  221. package/table/_table-theme.scss +36 -23
  222. package/tabs/_tabs-theme.scss +97 -50
  223. package/tabs/index.d.ts +2 -2
  224. package/timepicker/_timepicker-theme.scss +37 -24
  225. package/toolbar/_toolbar-theme.scss +35 -22
  226. package/tooltip/_tooltip-theme.scss +18 -15
  227. package/tooltip/index.d.ts +5 -6
  228. package/tree/_tree-theme.scss +33 -21
  229. package/schematics/ng-generate/m3-theme/index_bundled.js.map +0 -7
@@ -8,27 +8,29 @@
8
8
  @use '../core/theming/inspection';
9
9
  @use '../core/theming/validation';
10
10
 
11
-
12
11
  @mixin base($theme) {
13
12
  @if inspection.get-theme-version($theme) == 1 {
14
13
  @include _theme-from-tokens(inspection.get-theme-tokens($theme, base));
15
- }
16
- @else {
14
+ } @else {
17
15
  // Add default values for tokens not related to color, typography, or density.
18
16
  @include sass-utils.current-selector-or-root() {
19
- @include token-utils.create-token-values(tokens-mdc-icon-button.$prefix,
20
- tokens-mdc-icon-button.get-unthemable-tokens());
17
+ @include token-utils.create-token-values(
18
+ tokens-mdc-icon-button.$prefix,
19
+ tokens-mdc-icon-button.get-unthemable-tokens()
20
+ );
21
21
  }
22
22
  }
23
23
  }
24
24
 
25
25
  @mixin _icon-button-variant($theme, $palette) {
26
- $mdc-tokens: if($palette,
26
+ $mdc-tokens: if(
27
+ $palette,
27
28
  tokens-mdc-icon-button.private-get-color-palette-color-tokens($theme, $palette),
28
29
  tokens-mdc-icon-button.get-color-tokens($theme)
29
30
  );
30
31
 
31
- $mat-tokens: if($palette,
32
+ $mat-tokens: if(
33
+ $palette,
32
34
  tokens-mat-icon-button.private-get-color-palette-color-tokens($theme, $palette),
33
35
  tokens-mat-icon-button.get-color-tokens($theme)
34
36
  );
@@ -44,8 +46,7 @@
44
46
  @mixin color($theme, $options...) {
45
47
  @if inspection.get-theme-version($theme) == 1 {
46
48
  @include _theme-from-tokens(inspection.get-theme-tokens($theme, color), $options...);
47
- }
48
- @else {
49
+ } @else {
49
50
  @include sass-utils.current-selector-or-root() {
50
51
  @include _icon-button-variant($theme, null);
51
52
 
@@ -69,11 +70,12 @@
69
70
  @mixin typography($theme) {
70
71
  @if inspection.get-theme-version($theme) == 1 {
71
72
  @include _theme-from-tokens(inspection.get-theme-tokens($theme, typography));
72
- }
73
- @else {
73
+ } @else {
74
74
  @include sass-utils.current-selector-or-root() {
75
- @include token-utils.create-token-values(tokens-mat-icon-button.$prefix,
76
- tokens-mat-icon-button.get-typography-tokens($theme));
75
+ @include token-utils.create-token-values(
76
+ tokens-mat-icon-button.$prefix,
77
+ tokens-mat-icon-button.get-typography-tokens($theme)
78
+ );
77
79
  }
78
80
  }
79
81
  }
@@ -81,8 +83,7 @@
81
83
  @mixin density($theme) {
82
84
  @if inspection.get-theme-version($theme) == 1 {
83
85
  @include _theme-from-tokens(inspection.get-theme-tokens($theme, density));
84
- }
85
- @else {
86
+ } @else {
86
87
  $icon-size: 24px;
87
88
  $density-scale: inspection.get-theme-density($theme);
88
89
  $size-map: (
@@ -96,8 +97,10 @@
96
97
  $calculated-size: map.get($size-map, $density-scale);
97
98
 
98
99
  @include sass-utils.current-selector-or-root() {
99
- @include token-utils.create-token-values(tokens-mat-icon-button.$prefix,
100
- tokens-mat-icon-button.get-density-tokens($theme));
100
+ @include token-utils.create-token-values(
101
+ tokens-mat-icon-button.$prefix,
102
+ tokens-mat-icon-button.get-density-tokens($theme)
103
+ );
101
104
  }
102
105
 
103
106
  // Use `mat-mdc-button-base` to increase the specificity over the button's structural styles.
@@ -118,14 +121,24 @@
118
121
  }
119
122
  }
120
123
 
121
- @mixin overrides($tokens: ()) {
122
- @include token-utils.batch-create-token-values(
123
- $tokens,
124
- (prefix: tokens-mdc-icon-button.$prefix, tokens: tokens-mdc-icon-button.get-token-slots()),
125
- (prefix: tokens-mat-icon-button.$prefix, tokens: tokens-mat-icon-button.get-token-slots()),
124
+ /// Defines the tokens that will be available in the `overrides` mixin and for docs extraction.
125
+ @function _define-overrides() {
126
+ @return (
127
+ (
128
+ namespace: tokens-mdc-icon-button.$prefix,
129
+ tokens: tokens-mdc-icon-button.get-token-slots(),
130
+ ),
131
+ (
132
+ namespace: tokens-mat-icon-button.$prefix,
133
+ tokens: tokens-mat-icon-button.get-token-slots(),
134
+ ),
126
135
  );
127
136
  }
128
137
 
138
+ @mixin overrides($tokens: ()) {
139
+ @include token-utils.batch-create-token-values($tokens, _define-overrides()...);
140
+ }
141
+
129
142
  /// Outputs all (base, color, typography, and density) theme styles for the mat-icon-button.
130
143
  /// @param {Map} $theme The theme to generate styles for.
131
144
  /// @param {ArgList} Additional optional arguments (only supported for M3 themes):
@@ -134,8 +147,7 @@
134
147
  @include theming.private-check-duplicate-theme-styles($theme, 'mat-icon-button') {
135
148
  @if inspection.get-theme-version($theme) == 1 {
136
149
  @include _theme-from-tokens(inspection.get-theme-tokens($theme), $options...);
137
- }
138
- @else {
150
+ } @else {
139
151
  @include base($theme);
140
152
  @if inspection.theme-has($theme, color) {
141
153
  @include color($theme);
@@ -152,7 +164,8 @@
152
164
 
153
165
  @mixin _theme-from-tokens($tokens, $options...) {
154
166
  @include validation.selector-defined(
155
- 'Calls to Angular Material theme mixins with an M3 theme must be wrapped in a selector');
167
+ 'Calls to Angular Material theme mixins with an M3 theme must be wrapped in a selector'
168
+ );
156
169
  @if ($tokens != ()) {
157
170
  $mdc-tokens: token-utils.get-tokens-for($tokens, tokens-mdc-icon-button.$prefix, $options...);
158
171
  $mat-tokens: token-utils.get-tokens-for($tokens, tokens-mat-icon-button.$prefix, $options...);
package/button/index.d.ts CHANGED
@@ -69,9 +69,9 @@ 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
- static ɵdir: i0.ɵɵDirectiveDeclaration<MatAnchorBase, never, never, { "tabIndex": { "alias": "tabIndex"; "required": false; }; }, {}, never, never, false, never>;
74
+ static ɵdir: i0.ɵɵDirectiveDeclaration<MatAnchorBase, never, never, { "tabIndex": { "alias": "tabIndex"; "required": false; }; }, {}, never, never, true, never>;
75
75
  static ngAcceptInputType_tabIndex: unknown;
76
76
  }
77
77
 
@@ -142,7 +142,7 @@ declare class MatButtonBase implements AfterViewInit, OnDestroy {
142
142
  protected _getDisabledAttribute(): true | null;
143
143
  private _updateRippleDisabled;
144
144
  static ɵfac: i0.ɵɵFactoryDeclaration<MatButtonBase, never>;
145
- static ɵdir: i0.ɵɵDirectiveDeclaration<MatButtonBase, never, never, { "color": { "alias": "color"; "required": false; }; "disableRipple": { "alias": "disableRipple"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "ariaDisabled": { "alias": "aria-disabled"; "required": false; }; "disabledInteractive": { "alias": "disabledInteractive"; "required": false; }; }, {}, never, never, false, never>;
145
+ static ɵdir: i0.ɵɵDirectiveDeclaration<MatButtonBase, never, never, { "color": { "alias": "color"; "required": false; }; "disableRipple": { "alias": "disableRipple"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "ariaDisabled": { "alias": "aria-disabled"; "required": false; }; "disabledInteractive": { "alias": "disabledInteractive"; "required": false; }; }, {}, never, never, true, never>;
146
146
  static ngAcceptInputType_disableRipple: unknown;
147
147
  static ngAcceptInputType_disabled: unknown;
148
148
  static ngAcceptInputType_ariaDisabled: unknown;
@@ -13,16 +13,15 @@
13
13
  @mixin base($theme) {
14
14
  @if inspection.get-theme-version($theme) == 1 {
15
15
  @include _theme-from-tokens(inspection.get-theme-tokens($theme, base));
16
- }
17
- @else {
16
+ } @else {
18
17
  @include sass-utils.current-selector-or-root() {
19
18
  @include token-utils.create-token-values(
20
- tokens-mat-legacy-button-toggle.$prefix,
21
- tokens-mat-legacy-button-toggle.get-unthemable-tokens()
19
+ tokens-mat-legacy-button-toggle.$prefix,
20
+ tokens-mat-legacy-button-toggle.get-unthemable-tokens()
22
21
  );
23
22
  @include token-utils.create-token-values(
24
- tokens-mat-standard-button-toggle.$prefix,
25
- tokens-mat-standard-button-toggle.get-unthemable-tokens()
23
+ tokens-mat-standard-button-toggle.$prefix,
24
+ tokens-mat-standard-button-toggle.get-unthemable-tokens()
26
25
  );
27
26
  }
28
27
  }
@@ -36,13 +35,16 @@
36
35
  @mixin color($theme, $options...) {
37
36
  @if inspection.get-theme-version($theme) == 1 {
38
37
  @include _theme-from-tokens(inspection.get-theme-tokens($theme, color), $options...);
39
- }
40
- @else {
38
+ } @else {
41
39
  @include sass-utils.current-selector-or-root() {
42
- @include token-utils.create-token-values(tokens-mat-legacy-button-toggle.$prefix,
43
- tokens-mat-legacy-button-toggle.get-color-tokens($theme));
44
- @include token-utils.create-token-values(tokens-mat-standard-button-toggle.$prefix,
45
- tokens-mat-standard-button-toggle.get-color-tokens($theme));
40
+ @include token-utils.create-token-values(
41
+ tokens-mat-legacy-button-toggle.$prefix,
42
+ tokens-mat-legacy-button-toggle.get-color-tokens($theme)
43
+ );
44
+ @include token-utils.create-token-values(
45
+ tokens-mat-standard-button-toggle.$prefix,
46
+ tokens-mat-standard-button-toggle.get-color-tokens($theme)
47
+ );
46
48
  }
47
49
  }
48
50
  }
@@ -52,13 +54,16 @@
52
54
  @mixin typography($theme) {
53
55
  @if inspection.get-theme-version($theme) == 1 {
54
56
  @include _theme-from-tokens(inspection.get-theme-tokens($theme, typography));
55
- }
56
- @else {
57
+ } @else {
57
58
  @include sass-utils.current-selector-or-root() {
58
- @include token-utils.create-token-values(tokens-mat-legacy-button-toggle.$prefix,
59
- tokens-mat-legacy-button-toggle.get-typography-tokens($theme));
60
- @include token-utils.create-token-values(tokens-mat-standard-button-toggle.$prefix,
61
- tokens-mat-standard-button-toggle.get-typography-tokens($theme));
59
+ @include token-utils.create-token-values(
60
+ tokens-mat-legacy-button-toggle.$prefix,
61
+ tokens-mat-legacy-button-toggle.get-typography-tokens($theme)
62
+ );
63
+ @include token-utils.create-token-values(
64
+ tokens-mat-standard-button-toggle.$prefix,
65
+ tokens-mat-standard-button-toggle.get-typography-tokens($theme)
66
+ );
62
67
  }
63
68
  }
64
69
  }
@@ -68,29 +73,44 @@
68
73
  @mixin density($theme) {
69
74
  @if inspection.get-theme-version($theme) == 1 {
70
75
  @include _theme-from-tokens(inspection.get-theme-tokens($theme, density));
71
- }
72
- @else {
76
+ } @else {
73
77
  @include sass-utils.current-selector-or-root() {
74
- @include token-utils.create-token-values(tokens-mat-legacy-button-toggle.$prefix,
75
- tokens-mat-legacy-button-toggle.get-density-tokens($theme));
76
- @include token-utils.create-token-values(tokens-mat-standard-button-toggle.$prefix,
77
- tokens-mat-standard-button-toggle.get-density-tokens($theme));
78
+ @include token-utils.create-token-values(
79
+ tokens-mat-legacy-button-toggle.$prefix,
80
+ tokens-mat-legacy-button-toggle.get-density-tokens($theme)
81
+ );
82
+ @include token-utils.create-token-values(
83
+ tokens-mat-standard-button-toggle.$prefix,
84
+ tokens-mat-standard-button-toggle.get-density-tokens($theme)
85
+ );
78
86
  }
79
87
  }
80
88
  }
81
89
 
82
- /// Outputs the CSS variable values for the given tokens.
83
- /// @param {Map} $tokens The token values to emit.
84
- @mixin overrides($tokens: ()) {
90
+ /// Defines the tokens that will be available in the `overrides` mixin and for docs extraction.
91
+ @function _define-overrides() {
85
92
  $legacy-tokens: tokens-mat-legacy-button-toggle.get-token-slots();
86
93
  $standard-tokens: tokens-mat-standard-button-toggle.get-token-slots();
87
- @include token-utils.batch-create-token-values(
88
- $tokens,
89
- (prefix: tokens-mat-legacy-button-toggle.$prefix, tokens: $legacy-tokens),
90
- (prefix: tokens-mat-standard-button-toggle.$prefix, tokens: $standard-tokens),
94
+
95
+ @return (
96
+ (
97
+ namespace: tokens-mat-legacy-button-toggle.$prefix,
98
+ tokens: $legacy-tokens,
99
+ prefix: 'legacy-',
100
+ ),
101
+ (
102
+ namespace: tokens-mat-standard-button-toggle.$prefix,
103
+ tokens: $standard-tokens,
104
+ ),
91
105
  );
92
106
  }
93
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
+
94
114
  /// Outputs all (base, color, typography, and density) theme styles for the mat-button-toggle.
95
115
  /// @param {Map} $theme The theme to generate styles for.
96
116
  /// @param {ArgList} Additional optional arguments (only supported for M3 themes):
@@ -100,8 +120,7 @@
100
120
  @include theming.private-check-duplicate-theme-styles($theme, 'mat-button-toggle') {
101
121
  @if inspection.get-theme-version($theme) == 1 {
102
122
  @include _theme-from-tokens(inspection.get-theme-tokens($theme), $options...);
103
- }
104
- @else {
123
+ } @else {
105
124
  @include base($theme);
106
125
  @if inspection.theme-has($theme, color) {
107
126
  @include color($theme);
@@ -118,9 +137,15 @@
118
137
 
119
138
  @mixin _theme-from-tokens($tokens, $options...) {
120
139
  @include validation.selector-defined(
121
- 'Calls to Angular Material theme mixins with an M3 theme must be wrapped in a selector');
122
- $mat-standard-button-toggle-tokens:
123
- token-utils.get-tokens-for($tokens, tokens-mat-standard-button-toggle.$prefix, $options...);
140
+ 'Calls to Angular Material theme mixins with an M3 theme must be wrapped in a selector'
141
+ );
142
+ $mat-standard-button-toggle-tokens: token-utils.get-tokens-for(
143
+ $tokens,
144
+ tokens-mat-standard-button-toggle.$prefix,
145
+ $options...
146
+ );
124
147
  @include token-utils.create-token-values(
125
- tokens-mat-standard-button-toggle.$prefix, $mat-standard-button-toggle-tokens);
148
+ tokens-mat-standard-button-toggle.$prefix,
149
+ $mat-standard-button-toggle-tokens
150
+ );
126
151
  }
@@ -12,15 +12,20 @@
12
12
  @mixin base($theme) {
13
13
  @if inspection.get-theme-version($theme) == 1 {
14
14
  @include _theme-from-tokens(inspection.get-theme-tokens($theme, base));
15
- }
16
- @else {
15
+ } @else {
17
16
  @include sass-utils.current-selector-or-root() {
18
17
  @include token-utils.create-token-values(
19
- tokens-mdc-elevated-card.$prefix, tokens-mdc-elevated-card.get-unthemable-tokens());
18
+ tokens-mdc-elevated-card.$prefix,
19
+ tokens-mdc-elevated-card.get-unthemable-tokens()
20
+ );
20
21
  @include token-utils.create-token-values(
21
- tokens-mdc-outlined-card.$prefix, tokens-mdc-outlined-card.get-unthemable-tokens());
22
+ tokens-mdc-outlined-card.$prefix,
23
+ tokens-mdc-outlined-card.get-unthemable-tokens()
24
+ );
22
25
  @include token-utils.create-token-values(
23
- tokens-mat-card.$prefix, tokens-mat-card.get-unthemable-tokens());
26
+ tokens-mat-card.$prefix,
27
+ tokens-mat-card.get-unthemable-tokens()
28
+ );
24
29
  }
25
30
  }
26
31
  }
@@ -28,15 +33,20 @@
28
33
  @mixin color($theme) {
29
34
  @if inspection.get-theme-version($theme) == 1 {
30
35
  @include _theme-from-tokens(inspection.get-theme-tokens($theme, color));
31
- }
32
- @else {
36
+ } @else {
33
37
  @include sass-utils.current-selector-or-root() {
34
- @include token-utils.create-token-values(tokens-mdc-elevated-card.$prefix,
35
- tokens-mdc-elevated-card.get-color-tokens($theme));
36
- @include token-utils.create-token-values(tokens-mdc-outlined-card.$prefix,
37
- tokens-mdc-outlined-card.get-color-tokens($theme));
38
- @include token-utils.create-token-values(tokens-mat-card.$prefix,
39
- tokens-mat-card.get-color-tokens($theme));
38
+ @include token-utils.create-token-values(
39
+ tokens-mdc-elevated-card.$prefix,
40
+ tokens-mdc-elevated-card.get-color-tokens($theme)
41
+ );
42
+ @include token-utils.create-token-values(
43
+ tokens-mdc-outlined-card.$prefix,
44
+ tokens-mdc-outlined-card.get-color-tokens($theme)
45
+ );
46
+ @include token-utils.create-token-values(
47
+ tokens-mat-card.$prefix,
48
+ tokens-mat-card.get-color-tokens($theme)
49
+ );
40
50
  }
41
51
  }
42
52
  }
@@ -44,15 +54,20 @@
44
54
  @mixin typography($theme) {
45
55
  @if inspection.get-theme-version($theme) == 1 {
46
56
  @include _theme-from-tokens(inspection.get-theme-tokens($theme, typography));
47
- }
48
- @else {
57
+ } @else {
49
58
  @include sass-utils.current-selector-or-root() {
50
59
  @include token-utils.create-token-values(
51
- tokens-mdc-elevated-card.$prefix, tokens-mdc-elevated-card.get-typography-tokens($theme));
60
+ tokens-mdc-elevated-card.$prefix,
61
+ tokens-mdc-elevated-card.get-typography-tokens($theme)
62
+ );
52
63
  @include token-utils.create-token-values(
53
- tokens-mdc-outlined-card.$prefix, tokens-mdc-outlined-card.get-typography-tokens($theme));
64
+ tokens-mdc-outlined-card.$prefix,
65
+ tokens-mdc-outlined-card.get-typography-tokens($theme)
66
+ );
54
67
  @include token-utils.create-token-values(
55
- tokens-mat-card.$prefix, tokens-mat-card.get-typography-tokens($theme));
68
+ tokens-mat-card.$prefix,
69
+ tokens-mat-card.get-typography-tokens($theme)
70
+ );
56
71
  }
57
72
  }
58
73
  }
@@ -60,34 +75,53 @@
60
75
  @mixin density($theme) {
61
76
  @if inspection.get-theme-version($theme) == 1 {
62
77
  @include _theme-from-tokens(inspection.get-theme-tokens($theme, density));
63
- }
64
- @else {
78
+ } @else {
65
79
  @include sass-utils.current-selector-or-root() {
66
- @include token-utils.create-token-values(tokens-mdc-elevated-card.$prefix,
67
- tokens-mdc-elevated-card.get-density-tokens($theme));
68
- @include token-utils.create-token-values(tokens-mdc-outlined-card.$prefix,
69
- tokens-mdc-outlined-card.get-density-tokens($theme));
70
- @include token-utils.create-token-values(tokens-mat-card.$prefix,
71
- tokens-mat-card.get-density-tokens($theme));
80
+ @include token-utils.create-token-values(
81
+ tokens-mdc-elevated-card.$prefix,
82
+ tokens-mdc-elevated-card.get-density-tokens($theme)
83
+ );
84
+ @include token-utils.create-token-values(
85
+ tokens-mdc-outlined-card.$prefix,
86
+ tokens-mdc-outlined-card.get-density-tokens($theme)
87
+ );
88
+ @include token-utils.create-token-values(
89
+ tokens-mat-card.$prefix,
90
+ tokens-mat-card.get-density-tokens($theme)
91
+ );
72
92
  }
73
93
  }
74
94
  }
75
95
 
76
- @mixin overrides($tokens: ()) {
77
- @include token-utils.batch-create-token-values(
78
- $tokens,
79
- (prefix: tokens-mat-card.$prefix, tokens: tokens-mat-card.get-token-slots()),
80
- (prefix: tokens-mdc-elevated-card.$prefix, tokens: tokens-mdc-elevated-card.get-token-slots()),
81
- (prefix: tokens-mdc-outlined-card.$prefix, tokens: tokens-mdc-outlined-card.get-token-slots()),
96
+ /// Defines the tokens that will be available in the `overrides` mixin and for docs extraction.
97
+ @function _define-overrides() {
98
+ @return (
99
+ (
100
+ namespace: tokens-mat-card.$prefix,
101
+ tokens: tokens-mat-card.get-token-slots(),
102
+ ),
103
+ (
104
+ namespace: tokens-mdc-elevated-card.$prefix,
105
+ tokens: tokens-mdc-elevated-card.get-token-slots(),
106
+ prefix: 'elevated-',
107
+ ),
108
+ (
109
+ namespace: tokens-mdc-outlined-card.$prefix,
110
+ tokens: tokens-mdc-outlined-card.get-token-slots(),
111
+ prefix: 'outlined-',
112
+ ),
82
113
  );
83
114
  }
84
115
 
116
+ @mixin overrides($tokens: ()) {
117
+ @include token-utils.batch-create-token-values($tokens, _define-overrides()...);
118
+ }
119
+
85
120
  @mixin theme($theme) {
86
121
  @include theming.private-check-duplicate-theme-styles($theme, 'mat-card') {
87
122
  @if inspection.get-theme-version($theme) == 1 {
88
123
  @include _theme-from-tokens(inspection.get-theme-tokens($theme));
89
- }
90
- @else {
124
+ } @else {
91
125
  @include base($theme);
92
126
  @if inspection.theme-has($theme, color) {
93
127
  @include color($theme);
@@ -104,13 +138,20 @@
104
138
 
105
139
  @mixin _theme-from-tokens($tokens) {
106
140
  @include validation.selector-defined(
107
- 'Calls to Angular Material theme mixins with an M3 theme must be wrapped in a selector');
141
+ 'Calls to Angular Material theme mixins with an M3 theme must be wrapped in a selector'
142
+ );
108
143
  @if ($tokens != ()) {
109
144
  @include token-utils.create-token-values(
110
- tokens-mdc-elevated-card.$prefix, map.get($tokens, tokens-mdc-elevated-card.$prefix));
145
+ tokens-mdc-elevated-card.$prefix,
146
+ map.get($tokens, tokens-mdc-elevated-card.$prefix)
147
+ );
111
148
  @include token-utils.create-token-values(
112
- tokens-mdc-outlined-card.$prefix, map.get($tokens, tokens-mdc-outlined-card.$prefix));
149
+ tokens-mdc-outlined-card.$prefix,
150
+ map.get($tokens, tokens-mdc-outlined-card.$prefix)
151
+ );
113
152
  @include token-utils.create-token-values(
114
- tokens-mat-card.$prefix, map.get($tokens, tokens-mat-card.$prefix));
153
+ tokens-mat-card.$prefix,
154
+ map.get($tokens, tokens-mat-card.$prefix)
155
+ );
115
156
  }
116
157
  }
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
 
@@ -51,13 +51,15 @@
51
51
  &.mat-primary {
52
52
  @include token-utils.create-token-values(
53
53
  tokens-mdc-checkbox.$prefix,
54
- tokens-mdc-checkbox.get-color-tokens($theme, primary));
54
+ tokens-mdc-checkbox.get-color-tokens($theme, primary)
55
+ );
55
56
  }
56
57
 
57
58
  &.mat-warn {
58
59
  @include token-utils.create-token-values(
59
60
  tokens-mdc-checkbox.$prefix,
60
- tokens-mdc-checkbox.get-color-tokens($theme, warn));
61
+ tokens-mdc-checkbox.get-color-tokens($theme, warn)
62
+ );
61
63
  }
62
64
  }
63
65
  }
@@ -103,22 +105,26 @@
103
105
  }
104
106
  }
105
107
 
106
- /// Outputs the CSS variable values for the given tokens.
107
- /// @param {Map} $tokens The token values to emit.
108
- @mixin overrides($tokens: ()) {
109
- @include token-utils.batch-create-token-values(
110
- $tokens,
108
+ /// Defines the tokens that will be available in the `overrides` mixin and for docs extraction.
109
+ @function _define-overrides() {
110
+ @return (
111
111
  (
112
- prefix: tokens-mat-checkbox.$prefix,
112
+ namespace: tokens-mat-checkbox.$prefix,
113
113
  tokens: tokens-mat-checkbox.get-token-slots(),
114
114
  ),
115
115
  (
116
- prefix: tokens-mdc-checkbox.$prefix,
116
+ namespace: tokens-mdc-checkbox.$prefix,
117
117
  tokens: tokens-mdc-checkbox.get-token-slots(),
118
- )
118
+ ),
119
119
  );
120
120
  }
121
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
+
122
128
  /// Outputs all (base, color, typography, and density) theme styles for the mat-checkbox.
123
129
  /// @param {Map} $theme The theme to generate styles for.
124
130
  /// @param {ArgList} Additional optional arguments (only supported for M3 themes):