@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
@@ -13,8 +13,7 @@
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
  $mat-tokens: tokens-mat-select.get-unthemable-tokens();
20
19
  @include token-utils.create-token-values(tokens-mat-select.$prefix, $mat-tokens);
@@ -30,20 +29,25 @@
30
29
  @mixin color($theme, $options...) {
31
30
  @if inspection.get-theme-version($theme) == 1 {
32
31
  @include _theme-from-tokens(inspection.get-theme-tokens($theme, color), $options...);
33
- }
34
- @else {
32
+ } @else {
35
33
  @include sass-utils.current-selector-or-root() {
36
- @include token-utils.create-token-values(tokens-mat-select.$prefix,
37
- tokens-mat-select.get-color-tokens($theme));
34
+ @include token-utils.create-token-values(
35
+ tokens-mat-select.$prefix,
36
+ tokens-mat-select.get-color-tokens($theme)
37
+ );
38
38
 
39
39
  .mat-mdc-form-field.mat-accent {
40
- @include token-utils.create-token-values(tokens-mat-select.$prefix,
41
- tokens-mat-select.get-color-tokens($theme, accent));
40
+ @include token-utils.create-token-values(
41
+ tokens-mat-select.$prefix,
42
+ tokens-mat-select.get-color-tokens($theme, accent)
43
+ );
42
44
  }
43
45
 
44
46
  .mat-mdc-form-field.mat-warn {
45
- @include token-utils.create-token-values(tokens-mat-select.$prefix,
46
- tokens-mat-select.get-color-tokens($theme, warn));
47
+ @include token-utils.create-token-values(
48
+ tokens-mat-select.$prefix,
49
+ tokens-mat-select.get-color-tokens($theme, warn)
50
+ );
47
51
  }
48
52
  }
49
53
  }
@@ -54,11 +58,12 @@
54
58
  @mixin typography($theme) {
55
59
  @if inspection.get-theme-version($theme) == 1 {
56
60
  @include _theme-from-tokens(inspection.get-theme-tokens($theme, typography));
57
- }
58
- @else {
61
+ } @else {
59
62
  @include sass-utils.current-selector-or-root() {
60
- @include token-utils.create-token-values(tokens-mat-select.$prefix,
61
- tokens-mat-select.get-typography-tokens($theme));
63
+ @include token-utils.create-token-values(
64
+ tokens-mat-select.$prefix,
65
+ tokens-mat-select.get-typography-tokens($theme)
66
+ );
62
67
  }
63
68
  }
64
69
  }
@@ -68,22 +73,30 @@
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-select.$prefix,
75
- tokens-mat-select.get-density-tokens($theme));
78
+ @include token-utils.create-token-values(
79
+ tokens-mat-select.$prefix,
80
+ tokens-mat-select.get-density-tokens($theme)
81
+ );
76
82
  }
77
83
  }
78
84
  }
79
85
 
86
+ /// Defines the tokens that will be available in the `overrides` mixin and for docs extraction.
87
+ @function _define-overrides() {
88
+ @return (
89
+ (
90
+ namespace: tokens-mat-select.$prefix,
91
+ tokens: tokens-mat-select.get-token-slots(),
92
+ ),
93
+ );
94
+ }
95
+
80
96
  /// Outputs the CSS variable values for the given tokens.
81
97
  /// @param {Map} $tokens The token values to emit.
82
98
  @mixin overrides($tokens: ()) {
83
- @include token-utils.batch-create-token-values(
84
- $tokens,
85
- (prefix: tokens-mat-select.$prefix, tokens: tokens-mat-select.get-token-slots()),
86
- );
99
+ @include token-utils.batch-create-token-values($tokens, _define-overrides()...);
87
100
  }
88
101
 
89
102
  /// Outputs all (base, color, typography, and density) theme styles for the mat-icon.
@@ -95,8 +108,7 @@
95
108
  @include theming.private-check-duplicate-theme-styles($theme, 'mat-select') {
96
109
  @if inspection.get-theme-version($theme) == 1 {
97
110
  @include _theme-from-tokens(inspection.get-theme-tokens($theme), $options...);
98
- }
99
- @else {
111
+ } @else {
100
112
  @include base($theme);
101
113
  @if inspection.theme-has($theme, color) {
102
114
  @include color($theme);
@@ -113,7 +125,8 @@
113
125
 
114
126
  @mixin _theme-from-tokens($tokens, $options...) {
115
127
  @include validation.selector-defined(
116
- 'Calls to Angular Material theme mixins with an M3 theme must be wrapped in a selector');
128
+ 'Calls to Angular Material theme mixins with an M3 theme must be wrapped in a selector'
129
+ );
117
130
  $mat-select-tokens: token-utils.get-tokens-for($tokens, tokens-mat-select.$prefix, $options...);
118
131
  @include token-utils.create-token-values(tokens-mat-select.$prefix, $mat-select-tokens);
119
132
  }
package/select/index.d.ts CHANGED
@@ -11,11 +11,10 @@ import { ElementRef } from '@angular/core';
11
11
  import { ErrorStateMatcher } from '@angular/material/core';
12
12
  import { EventEmitter } from '@angular/core';
13
13
  import * as i0 from '@angular/core';
14
- import * as i1 from '@angular/common';
15
- import * as i2 from '@angular/cdk/overlay';
16
- import * as i3 from '@angular/material/core';
17
- import * as i5 from '@angular/cdk/scrolling';
18
- import * as i6 from '@angular/material/form-field';
14
+ import * as i1 from '@angular/cdk/overlay';
15
+ import * as i2 from '@angular/material/core';
16
+ import * as i4 from '@angular/cdk/scrolling';
17
+ import * as i5 from '@angular/material/form-field';
19
18
  import { InjectionToken } from '@angular/core';
20
19
  import { MatError } from '@angular/material/form-field';
21
20
  import { MatFormField } from '@angular/material/form-field';
@@ -40,7 +39,7 @@ import { SimpleChanges } from '@angular/core';
40
39
  import { Subject } from 'rxjs';
41
40
  import { ViewportRuler } from '@angular/cdk/scrolling';
42
41
 
43
- declare namespace i4 {
42
+ declare namespace i3 {
44
43
  export {
45
44
  MAT_SELECT_SCROLL_STRATEGY_PROVIDER_FACTORY,
46
45
  MAT_SELECT_SCROLL_STRATEGY,
@@ -486,7 +485,7 @@ export declare interface MatSelectConfig {
486
485
 
487
486
  export declare class MatSelectModule {
488
487
  static ɵfac: i0.ɵɵFactoryDeclaration<MatSelectModule, never>;
489
- static ɵmod: i0.ɵɵNgModuleDeclaration<MatSelectModule, never, [typeof i1.CommonModule, typeof i2.OverlayModule, typeof i3.MatOptionModule, typeof i3.MatCommonModule, typeof i4.MatSelect, typeof i4.MatSelectTrigger], [typeof i5.CdkScrollableModule, typeof i6.MatFormFieldModule, typeof i4.MatSelect, typeof i4.MatSelectTrigger, typeof i3.MatOptionModule, typeof i3.MatCommonModule]>;
488
+ static ɵmod: i0.ɵɵNgModuleDeclaration<MatSelectModule, never, [typeof i1.OverlayModule, typeof i2.MatOptionModule, typeof i2.MatCommonModule, typeof i3.MatSelect, typeof i3.MatSelectTrigger], [typeof i4.CdkScrollableModule, typeof i5.MatFormFieldModule, typeof i3.MatSelect, typeof i3.MatSelectTrigger, typeof i2.MatOptionModule, typeof i2.MatCommonModule]>;
490
489
  static ɵinj: i0.ɵɵInjectorDeclaration<MatSelectModule>;
491
490
  }
492
491
 
@@ -9,11 +9,12 @@
9
9
  @mixin base($theme) {
10
10
  @if inspection.get-theme-version($theme) == 1 {
11
11
  @include _theme-from-tokens(inspection.get-theme-tokens($theme, base));
12
- }
13
- @else {
12
+ } @else {
14
13
  @include sass-utils.current-selector-or-root() {
15
14
  @include token-utils.create-token-values(
16
- tokens-mat-sidenav.$prefix, tokens-mat-sidenav.get-unthemable-tokens());
15
+ tokens-mat-sidenav.$prefix,
16
+ tokens-mat-sidenav.get-unthemable-tokens()
17
+ );
17
18
  }
18
19
  }
19
20
  }
@@ -21,11 +22,12 @@
21
22
  @mixin color($theme) {
22
23
  @if inspection.get-theme-version($theme) == 1 {
23
24
  @include _theme-from-tokens(inspection.get-theme-tokens($theme, color));
24
- }
25
- @else {
25
+ } @else {
26
26
  @include sass-utils.current-selector-or-root() {
27
- @include token-utils.create-token-values(tokens-mat-sidenav.$prefix,
28
- tokens-mat-sidenav.get-color-tokens($theme));
27
+ @include token-utils.create-token-values(
28
+ tokens-mat-sidenav.$prefix,
29
+ tokens-mat-sidenav.get-color-tokens($theme)
30
+ );
29
31
  }
30
32
  }
31
33
  }
@@ -33,30 +35,36 @@
33
35
  @mixin typography($theme) {
34
36
  @if inspection.get-theme-version($theme) == 1 {
35
37
  @include _theme-from-tokens(inspection.get-theme-tokens($theme, typography));
38
+ } @else {
36
39
  }
37
- @else {}
38
40
  }
39
41
 
40
42
  @mixin density($theme) {
41
43
  @if inspection.get-theme-version($theme) == 1 {
42
44
  @include _theme-from-tokens(inspection.get-theme-tokens($theme, density));
45
+ } @else {
43
46
  }
44
- @else {}
45
47
  }
46
48
 
47
- @mixin overrides($tokens: ()) {
48
- @include token-utils.batch-create-token-values(
49
- $tokens,
50
- (prefix: tokens-mat-sidenav.$prefix, tokens: tokens-mat-sidenav.get-token-slots()),
49
+ /// Defines the tokens that will be available in the `overrides` mixin and for docs extraction.
50
+ @function _define-overrides() {
51
+ @return (
52
+ (
53
+ namespace: tokens-mat-sidenav.$prefix,
54
+ tokens: tokens-mat-sidenav.get-token-slots(),
55
+ ),
51
56
  );
52
57
  }
53
58
 
59
+ @mixin overrides($tokens: ()) {
60
+ @include token-utils.batch-create-token-values($tokens, _define-overrides()...);
61
+ }
62
+
54
63
  @mixin theme($theme) {
55
64
  @include theming.private-check-duplicate-theme-styles($theme, 'mat-sidenav') {
56
65
  @if inspection.get-theme-version($theme) == 1 {
57
66
  @include _theme-from-tokens(inspection.get-theme-tokens($theme));
58
- }
59
- @else {
67
+ } @else {
60
68
  @include base($theme);
61
69
  @if inspection.theme-has($theme, color) {
62
70
  @include color($theme);
@@ -73,9 +81,12 @@
73
81
 
74
82
  @mixin _theme-from-tokens($tokens) {
75
83
  @include validation.selector-defined(
76
- 'Calls to Angular Material theme mixins with an M3 theme must be wrapped in a selector');
84
+ 'Calls to Angular Material theme mixins with an M3 theme must be wrapped in a selector'
85
+ );
77
86
  @if ($tokens != ()) {
78
87
  @include token-utils.create-token-values(
79
- tokens-mat-sidenav.$prefix, map.get($tokens, tokens-mat-sidenav.$prefix));
88
+ tokens-mat-sidenav.$prefix,
89
+ map.get($tokens, tokens-mat-sidenav.$prefix)
90
+ );
80
91
  }
81
92
  }
@@ -15,12 +15,16 @@
15
15
  @include _theme-from-tokens(inspection.get-theme-tokens($theme, base));
16
16
  } @else {
17
17
  @include sass-utils.current-selector-or-root() {
18
- @include token-utils.create-token-values(tokens-mdc-switch.$prefix,
19
- tokens-mdc-switch.get-unthemable-tokens());
18
+ @include token-utils.create-token-values(
19
+ tokens-mdc-switch.$prefix,
20
+ tokens-mdc-switch.get-unthemable-tokens()
21
+ );
20
22
 
21
23
  .mat-mdc-slide-toggle {
22
- @include token-utils.create-token-values(tokens-mat-switch.$prefix,
23
- tokens-mat-switch.get-unthemable-tokens());
24
+ @include token-utils.create-token-values(
25
+ tokens-mat-switch.$prefix,
26
+ tokens-mat-switch.get-unthemable-tokens()
27
+ );
24
28
  }
25
29
  }
26
30
  }
@@ -39,8 +43,10 @@
39
43
 
40
44
  // Add values for MDC slide toggles tokens
41
45
  @include sass-utils.current-selector-or-root() {
42
- @include token-utils.create-token-values(tokens-mdc-switch.$prefix,
43
- tokens-mdc-switch.get-color-tokens($theme));
46
+ @include token-utils.create-token-values(
47
+ tokens-mdc-switch.$prefix,
48
+ tokens-mdc-switch.get-color-tokens($theme)
49
+ );
44
50
 
45
51
  & {
46
52
  // TODO(wagnermaciel): Use our token system to define this css variable.
@@ -52,18 +58,24 @@
52
58
  }
53
59
 
54
60
  .mat-mdc-slide-toggle {
55
- @include token-utils.create-token-values(tokens-mat-switch.$prefix,
56
- tokens-mat-switch.get-color-tokens($theme));
61
+ @include token-utils.create-token-values(
62
+ tokens-mat-switch.$prefix,
63
+ tokens-mat-switch.get-color-tokens($theme)
64
+ );
57
65
 
58
66
  // Change the color palette related tokens to accent or warn if applicable
59
67
  &.mat-accent {
60
- @include token-utils.create-token-values(tokens-mdc-switch.$prefix,
61
- tokens-mdc-switch.private-get-color-palette-color-tokens($theme, accent));
68
+ @include token-utils.create-token-values(
69
+ tokens-mdc-switch.$prefix,
70
+ tokens-mdc-switch.private-get-color-palette-color-tokens($theme, accent)
71
+ );
62
72
  }
63
73
 
64
74
  &.mat-warn {
65
- @include token-utils.create-token-values(tokens-mdc-switch.$prefix,
66
- tokens-mdc-switch.private-get-color-palette-color-tokens($theme, warn));
75
+ @include token-utils.create-token-values(
76
+ tokens-mdc-switch.$prefix,
77
+ tokens-mdc-switch.private-get-color-palette-color-tokens($theme, warn)
78
+ );
67
79
  }
68
80
  }
69
81
  }
@@ -77,12 +89,16 @@
77
89
  @include _theme-from-tokens(inspection.get-theme-tokens($theme, typography));
78
90
  } @else {
79
91
  @include sass-utils.current-selector-or-root() {
80
- @include token-utils.create-token-values(tokens-mdc-switch.$prefix,
81
- tokens-mdc-switch.get-typography-tokens($theme));
92
+ @include token-utils.create-token-values(
93
+ tokens-mdc-switch.$prefix,
94
+ tokens-mdc-switch.get-typography-tokens($theme)
95
+ );
82
96
 
83
97
  .mat-mdc-slide-toggle {
84
- @include token-utils.create-token-values(tokens-mat-switch.$prefix,
85
- tokens-mat-switch.get-typography-tokens($theme));
98
+ @include token-utils.create-token-values(
99
+ tokens-mat-switch.$prefix,
100
+ tokens-mat-switch.get-typography-tokens($theme)
101
+ );
86
102
  }
87
103
  }
88
104
  }
@@ -95,33 +111,41 @@
95
111
  @include _theme-from-tokens(inspection.get-theme-tokens($theme, density));
96
112
  } @else {
97
113
  @include sass-utils.current-selector-or-root() {
98
- @include token-utils.create-token-values(tokens-mdc-switch.$prefix,
99
- tokens-mdc-switch.get-density-tokens($theme));
114
+ @include token-utils.create-token-values(
115
+ tokens-mdc-switch.$prefix,
116
+ tokens-mdc-switch.get-density-tokens($theme)
117
+ );
100
118
 
101
119
  .mat-mdc-slide-toggle {
102
- @include token-utils.create-token-values(tokens-mat-switch.$prefix,
103
- tokens-mat-switch.get-density-tokens($theme));
120
+ @include token-utils.create-token-values(
121
+ tokens-mat-switch.$prefix,
122
+ tokens-mat-switch.get-density-tokens($theme)
123
+ );
104
124
  }
105
125
  }
106
126
  }
107
127
  }
108
128
 
109
- /// Outputs the CSS variable values for the given tokens.
110
- /// @param {Map} $tokens The token values to emit.
111
- @mixin overrides($tokens: ()) {
112
- @include token-utils.batch-create-token-values(
113
- $tokens,
129
+ /// Defines the tokens that will be available in the `overrides` mixin and for docs extraction.
130
+ @function _define-overrides() {
131
+ @return (
114
132
  (
115
- prefix: tokens-mat-switch.$prefix,
133
+ namespace: tokens-mat-switch.$prefix,
116
134
  tokens: tokens-mat-switch.get-token-slots(),
117
135
  ),
118
136
  (
119
- prefix: tokens-mdc-switch.$prefix,
137
+ namespace: tokens-mdc-switch.$prefix,
120
138
  tokens: tokens-mdc-switch.get-token-slots(),
121
- )
139
+ ),
122
140
  );
123
141
  }
124
142
 
143
+ /// Outputs the CSS variable values for the given tokens.
144
+ /// @param {Map} $tokens The token values to emit.
145
+ @mixin overrides($tokens: ()) {
146
+ @include token-utils.batch-create-token-values($tokens, _define-overrides()...);
147
+ }
148
+
125
149
  /// Outputs all (base, color, typography, and density) theme styles for the mat-icon.
126
150
  /// @param {Map} $theme The theme to generate styles for.
127
151
  /// @param {ArgList} Additional optional arguments (only supported for M3 themes):
@@ -13,13 +13,16 @@
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
- @include token-utils.create-token-values(tokens-mdc-slider.$prefix,
20
- tokens-mdc-slider.get-unthemable-tokens());
21
- @include token-utils.create-token-values(tokens-mat-slider.$prefix,
22
- tokens-mat-slider.get-unthemable-tokens());
18
+ @include token-utils.create-token-values(
19
+ tokens-mdc-slider.$prefix,
20
+ tokens-mdc-slider.get-unthemable-tokens()
21
+ );
22
+ @include token-utils.create-token-values(
23
+ tokens-mat-slider.$prefix,
24
+ tokens-mat-slider.get-unthemable-tokens()
25
+ );
23
26
  }
24
27
  }
25
28
  }
@@ -32,69 +35,90 @@
32
35
  @mixin color($theme, $options...) {
33
36
  @if inspection.get-theme-version($theme) == 1 {
34
37
  @include _theme-from-tokens(inspection.get-theme-tokens($theme, color), $options...);
35
- }
36
- @else {
38
+ } @else {
37
39
  @include sass-utils.current-selector-or-root() {
38
- @include token-utils.create-token-values(tokens-mdc-slider.$prefix,
39
- tokens-mdc-slider.get-color-tokens($theme));
40
- @include token-utils.create-token-values(tokens-mat-slider.$prefix,
41
- tokens-mat-slider.get-color-tokens($theme));
40
+ @include token-utils.create-token-values(
41
+ tokens-mdc-slider.$prefix,
42
+ tokens-mdc-slider.get-color-tokens($theme)
43
+ );
44
+ @include token-utils.create-token-values(
45
+ tokens-mat-slider.$prefix,
46
+ tokens-mat-slider.get-color-tokens($theme)
47
+ );
42
48
 
43
49
  .mat-accent {
44
- @include token-utils.create-token-values(tokens-mdc-slider.$prefix,
45
- tokens-mdc-slider.private-get-color-palette-color-tokens($theme, accent));
46
- @include token-utils.create-token-values(tokens-mat-slider.$prefix,
47
- tokens-mat-slider.private-get-color-palette-color-tokens($theme, accent));
50
+ @include token-utils.create-token-values(
51
+ tokens-mdc-slider.$prefix,
52
+ tokens-mdc-slider.private-get-color-palette-color-tokens($theme, accent)
53
+ );
54
+ @include token-utils.create-token-values(
55
+ tokens-mat-slider.$prefix,
56
+ tokens-mat-slider.private-get-color-palette-color-tokens($theme, accent)
57
+ );
48
58
  }
49
59
 
50
60
  .mat-warn {
51
- @include token-utils.create-token-values(tokens-mdc-slider.$prefix,
52
- tokens-mdc-slider.private-get-color-palette-color-tokens($theme, warn));
53
- @include token-utils.create-token-values(tokens-mat-slider.$prefix,
54
- tokens-mat-slider.private-get-color-palette-color-tokens($theme, warn));
61
+ @include token-utils.create-token-values(
62
+ tokens-mdc-slider.$prefix,
63
+ tokens-mdc-slider.private-get-color-palette-color-tokens($theme, warn)
64
+ );
65
+ @include token-utils.create-token-values(
66
+ tokens-mat-slider.$prefix,
67
+ tokens-mat-slider.private-get-color-palette-color-tokens($theme, warn)
68
+ );
55
69
  }
56
70
  }
57
71
  }
58
72
  }
59
73
 
60
-
61
74
  /// Outputs typography theme styles for the mat-slider.
62
75
  /// @param {Map} $theme The theme to generate typography styles for.
63
76
  @mixin typography($theme) {
64
77
  @if inspection.get-theme-version($theme) == 1 {
65
78
  @include _theme-from-tokens(inspection.get-theme-tokens($theme, typography));
66
- }
67
- @else {
79
+ } @else {
68
80
  @include sass-utils.current-selector-or-root() {
69
- @include token-utils.create-token-values(tokens-mdc-slider.$prefix,
70
- tokens-mdc-slider.get-typography-tokens($theme));
81
+ @include token-utils.create-token-values(
82
+ tokens-mdc-slider.$prefix,
83
+ tokens-mdc-slider.get-typography-tokens($theme)
84
+ );
71
85
  }
72
86
  }
73
87
  }
74
88
 
75
-
76
89
  /// Outputs density theme styles for the mat-slider.
77
90
  /// @param {Map} $theme The theme to generate density styles for.
78
91
  @mixin density($theme) {
79
92
  @if inspection.get-theme-version($theme) == 1 {
80
93
  @include _theme-from-tokens(inspection.get-theme-tokens($theme, density));
81
- }
82
- @else {
94
+ } @else {
83
95
  @include sass-utils.current-selector-or-root() {
84
- @include token-utils.create-token-values(tokens-mdc-slider.$prefix,
85
- tokens-mdc-slider.get-density-tokens($theme));
96
+ @include token-utils.create-token-values(
97
+ tokens-mdc-slider.$prefix,
98
+ tokens-mdc-slider.get-density-tokens($theme)
99
+ );
86
100
  }
87
101
  }
88
102
  }
89
103
 
104
+ /// Defines the tokens that will be available in the `overrides` mixin and for docs extraction.
105
+ @function _define-overrides() {
106
+ @return (
107
+ (
108
+ namespace: tokens-mat-slider.$prefix,
109
+ tokens: tokens-mat-slider.get-token-slots(),
110
+ ),
111
+ (
112
+ namespace: tokens-mdc-slider.$prefix,
113
+ tokens: tokens-mdc-slider.get-token-slots(),
114
+ ),
115
+ );
116
+ }
117
+
90
118
  /// Outputs the CSS variable values for the given tokens.
91
119
  /// @param {Map} $tokens The token values to emit.
92
120
  @mixin overrides($tokens: ()) {
93
- @include token-utils.batch-create-token-values(
94
- $tokens,
95
- (prefix: tokens-mat-slider.$prefix, tokens: tokens-mat-slider.get-token-slots()),
96
- (prefix: tokens-mdc-slider.$prefix, tokens: tokens-mdc-slider.get-token-slots()),
97
- );
121
+ @include token-utils.batch-create-token-values($tokens, _define-overrides()...);
98
122
  }
99
123
 
100
124
  /// Outputs all (base, color, typography, and density) theme styles for the mat-option.
@@ -106,8 +130,7 @@
106
130
  @include theming.private-check-duplicate-theme-styles($theme, 'mat-slider') {
107
131
  @if inspection.get-theme-version($theme) == 1 {
108
132
  @include _theme-from-tokens(inspection.get-theme-tokens($theme), $options...);
109
- }
110
- @else {
133
+ } @else {
111
134
  @include base($theme);
112
135
  @if inspection.theme-has($theme, color) {
113
136
  @include color($theme);
@@ -124,7 +147,8 @@
124
147
 
125
148
  @mixin _theme-from-tokens($tokens, $options...) {
126
149
  @include validation.selector-defined(
127
- 'Calls to Angular Material theme mixins with an M3 theme must be wrapped in a selector');
150
+ 'Calls to Angular Material theme mixins with an M3 theme must be wrapped in a selector'
151
+ );
128
152
  $mdc-slider-tokens: token-utils.get-tokens-for($tokens, tokens-mdc-slider.$prefix, $options...);
129
153
  $mat-slider-tokens: token-utils.get-tokens-for($tokens, tokens-mat-slider.$prefix, $options...);
130
154
  @include token-utils.create-token-values(tokens-mdc-slider.$prefix, $mdc-slider-tokens);
@@ -11,8 +11,7 @@
11
11
  @mixin base($theme) {
12
12
  @if inspection.get-theme-version($theme) == 1 {
13
13
  @include _theme-from-tokens(inspection.get-theme-tokens($theme, base));
14
- }
15
- @else {
14
+ } @else {
16
15
  // Add default values for tokens not related to color, typography, or density.
17
16
  @include sass-utils.current-selector-or-root() {
18
17
  @include token-utils.create-token-values(
@@ -26,8 +25,7 @@
26
25
  @mixin color($theme) {
27
26
  @if inspection.get-theme-version($theme) == 1 {
28
27
  @include _theme-from-tokens(inspection.get-theme-tokens($theme, color));
29
- }
30
- @else {
28
+ } @else {
31
29
  @include sass-utils.current-selector-or-root() {
32
30
  @include token-utils.create-token-values(
33
31
  tokens-mdc-snack-bar.$prefix,
@@ -44,8 +42,7 @@
44
42
  @mixin typography($theme) {
45
43
  @if inspection.get-theme-version($theme) == 1 {
46
44
  @include _theme-from-tokens(inspection.get-theme-tokens($theme, typography));
47
- }
48
- @else {
45
+ } @else {
49
46
  @include sass-utils.current-selector-or-root() {
50
47
  @include token-utils.create-token-values(
51
48
  tokens-mdc-snack-bar.$prefix,
@@ -55,24 +52,34 @@
55
52
  }
56
53
  }
57
54
 
58
- @mixin density($theme) {}
55
+ @mixin density($theme) {
56
+ }
57
+
58
+ /// Defines the tokens that will be available in the `overrides` mixin and for docs extraction.
59
+ @function _define-overrides() {
60
+ @return (
61
+ (
62
+ namespace: tokens-mdc-snack-bar.$prefix,
63
+ tokens: tokens-mdc-snack-bar.get-token-slots(),
64
+ ),
65
+ (
66
+ namespace: tokens-mat-snack-bar.$prefix,
67
+ tokens: tokens-mat-snack-bar.get-token-slots(),
68
+ ),
69
+ );
70
+ }
59
71
 
60
72
  /// Outputs the CSS variable values for the given tokens.
61
73
  /// @param {Map} $tokens The token values to emit.
62
74
  @mixin overrides($tokens: ()) {
63
- @include token-utils.batch-create-token-values(
64
- $tokens,
65
- (prefix: tokens-mdc-snack-bar.$prefix, tokens: tokens-mdc-snack-bar.get-token-slots()),
66
- (prefix: tokens-mat-snack-bar.$prefix, tokens: tokens-mat-snack-bar.get-token-slots()),
67
- );
75
+ @include token-utils.batch-create-token-values($tokens, _define-overrides()...);
68
76
  }
69
77
 
70
78
  @mixin theme($theme) {
71
79
  @include theming.private-check-duplicate-theme-styles($theme, 'mat-snack-bar') {
72
80
  @if inspection.get-theme-version($theme) == 1 {
73
81
  @include _theme-from-tokens(inspection.get-theme-tokens($theme));
74
- }
75
- @else {
82
+ } @else {
76
83
  @include base($theme);
77
84
  @if inspection.theme-has($theme, color) {
78
85
  @include color($theme);
@@ -89,11 +96,16 @@
89
96
 
90
97
  @mixin _theme-from-tokens($tokens) {
91
98
  @include validation.selector-defined(
92
- 'Calls to Angular Material theme mixins with an M3 theme must be wrapped in a selector');
99
+ 'Calls to Angular Material theme mixins with an M3 theme must be wrapped in a selector'
100
+ );
93
101
  @if ($tokens != ()) {
94
102
  @include token-utils.create-token-values(
95
- tokens-mdc-snack-bar.$prefix, map.get($tokens, tokens-mdc-snack-bar.$prefix));
103
+ tokens-mdc-snack-bar.$prefix,
104
+ map.get($tokens, tokens-mdc-snack-bar.$prefix)
105
+ );
96
106
  @include token-utils.create-token-values(
97
- tokens-mat-snack-bar.$prefix, map.get($tokens, tokens-mat-snack-bar.$prefix));
107
+ tokens-mat-snack-bar.$prefix,
108
+ map.get($tokens, tokens-mat-snack-bar.$prefix)
109
+ );
98
110
  }
99
111
  }