@angular/material 19.0.0-next.7 → 19.0.0-next.9

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 (163) hide show
  1. package/_index.scss +3 -2
  2. package/autocomplete/_autocomplete-theme.scss +30 -21
  3. package/badge/_badge-theme.scss +31 -21
  4. package/bottom-sheet/_bottom-sheet-theme.scss +25 -17
  5. package/button/_button-theme.scss +220 -100
  6. package/button/_fab-theme.scss +88 -41
  7. package/button/_icon-button-theme.scss +31 -22
  8. package/button/index.d.ts +2 -2
  9. package/button-toggle/_button-toggle-theme.scss +52 -32
  10. package/card/_card-theme.scss +72 -35
  11. package/checkbox/_checkbox-theme.scss +6 -4
  12. package/chips/_chips-theme.scss +57 -27
  13. package/core/_core-theme.scss +62 -33
  14. package/core/_core.scss +1 -3
  15. package/core/index.d.ts +14 -0
  16. package/core/option/_optgroup-theme.scss +22 -15
  17. package/core/option/_option-theme.scss +27 -18
  18. package/core/ripple/_ripple-theme.scss +26 -18
  19. package/core/selection/pseudo-checkbox/_pseudo-checkbox-theme.scss +40 -18
  20. package/core/theming/_all-theme.scss +3 -0
  21. package/core/tokens/_density.scss +1 -0
  22. package/core/tokens/_m3-system.scss +34 -6
  23. package/core/tokens/_token-utils.scss +91 -34
  24. package/core/tokens/m2/_index.scss +2 -0
  25. package/core/tokens/m2/mat/_badge.scss +12 -3
  26. package/core/tokens/m2/mat/_timepicker.scss +44 -0
  27. package/core/tokens/m2/mdc/_radio.scss +1 -1
  28. package/core/tokens/m3/_index.scss +2 -0
  29. package/core/tokens/m3/definitions/_md-comp-elevated-card.scss +1 -1
  30. package/core/tokens/m3/mat/_badge.scss +6 -3
  31. package/core/tokens/m3/mat/_timepicker.scss +22 -0
  32. package/core/typography/_all-typography.scss +2 -0
  33. package/datepicker/_datepicker-theme.scss +46 -29
  34. package/datepicker/index.d.ts +1 -1
  35. package/dialog/_dialog-theme.scss +39 -20
  36. package/dialog/index.d.ts +6 -3
  37. package/divider/_divider-theme.scss +21 -14
  38. package/expansion/_expansion-theme.scss +29 -21
  39. package/fesm2022/autocomplete.mjs +14 -16
  40. package/fesm2022/autocomplete.mjs.map +1 -1
  41. package/fesm2022/badge.mjs +11 -12
  42. package/fesm2022/badge.mjs.map +1 -1
  43. package/fesm2022/bottom-sheet.mjs +11 -11
  44. package/fesm2022/bottom-sheet.mjs.map +1 -1
  45. package/fesm2022/button-toggle.mjs +14 -13
  46. package/fesm2022/button-toggle.mjs.map +1 -1
  47. package/fesm2022/button.mjs +45 -43
  48. package/fesm2022/button.mjs.map +1 -1
  49. package/fesm2022/card.mjs +49 -60
  50. package/fesm2022/card.mjs.map +1 -1
  51. package/fesm2022/checkbox.mjs +19 -18
  52. package/fesm2022/checkbox.mjs.map +1 -1
  53. package/fesm2022/chips.mjs +52 -55
  54. package/fesm2022/chips.mjs.map +1 -1
  55. package/fesm2022/core.mjs +122 -116
  56. package/fesm2022/core.mjs.map +1 -1
  57. package/fesm2022/datepicker.mjs +98 -106
  58. package/fesm2022/datepicker.mjs.map +1 -1
  59. package/fesm2022/dialog/testing.mjs +0 -1
  60. package/fesm2022/dialog/testing.mjs.map +1 -1
  61. package/fesm2022/dialog.mjs +28 -33
  62. package/fesm2022/dialog.mjs.map +1 -1
  63. package/fesm2022/divider.mjs +8 -8
  64. package/fesm2022/divider.mjs.map +1 -1
  65. package/fesm2022/expansion.mjs +31 -34
  66. package/fesm2022/expansion.mjs.map +1 -1
  67. package/fesm2022/form-field.mjs +38 -45
  68. package/fesm2022/form-field.mjs.map +1 -1
  69. package/fesm2022/grid-list.mjs +26 -29
  70. package/fesm2022/grid-list.mjs.map +1 -1
  71. package/fesm2022/icon/testing.mjs +7 -7
  72. package/fesm2022/icon/testing.mjs.map +1 -1
  73. package/fesm2022/icon.mjs +12 -12
  74. package/fesm2022/icon.mjs.map +1 -1
  75. package/fesm2022/input.mjs +7 -8
  76. package/fesm2022/input.mjs.map +1 -1
  77. package/fesm2022/list.mjs +60 -67
  78. package/fesm2022/list.mjs.map +1 -1
  79. package/fesm2022/menu.mjs +23 -24
  80. package/fesm2022/menu.mjs.map +1 -1
  81. package/fesm2022/paginator/testing.mjs +2 -2
  82. package/fesm2022/paginator/testing.mjs.map +1 -1
  83. package/fesm2022/paginator.mjs +11 -11
  84. package/fesm2022/paginator.mjs.map +1 -1
  85. package/fesm2022/progress-bar.mjs +8 -8
  86. package/fesm2022/progress-bar.mjs.map +1 -1
  87. package/fesm2022/progress-spinner.mjs +8 -8
  88. package/fesm2022/progress-spinner.mjs.map +1 -1
  89. package/fesm2022/radio.mjs +14 -13
  90. package/fesm2022/radio.mjs.map +1 -1
  91. package/fesm2022/select.mjs +12 -13
  92. package/fesm2022/select.mjs.map +1 -1
  93. package/fesm2022/sidenav.mjs +28 -30
  94. package/fesm2022/sidenav.mjs.map +1 -1
  95. package/fesm2022/slide-toggle.mjs +19 -18
  96. package/fesm2022/slide-toggle.mjs.map +1 -1
  97. package/fesm2022/slider.mjs +21 -21
  98. package/fesm2022/slider.mjs.map +1 -1
  99. package/fesm2022/snack-bar.mjs +25 -28
  100. package/fesm2022/snack-bar.mjs.map +1 -1
  101. package/fesm2022/sort.mjs +17 -16
  102. package/fesm2022/sort.mjs.map +1 -1
  103. package/fesm2022/stepper.mjs +37 -40
  104. package/fesm2022/stepper.mjs.map +1 -1
  105. package/fesm2022/table.mjs +57 -73
  106. package/fesm2022/table.mjs.map +1 -1
  107. package/fesm2022/tabs.mjs +57 -63
  108. package/fesm2022/tabs.mjs.map +1 -1
  109. package/fesm2022/timepicker/testing.mjs +196 -0
  110. package/fesm2022/timepicker/testing.mjs.map +1 -0
  111. package/fesm2022/timepicker.mjs +842 -0
  112. package/fesm2022/timepicker.mjs.map +1 -0
  113. package/fesm2022/toolbar.mjs +11 -12
  114. package/fesm2022/toolbar.mjs.map +1 -1
  115. package/fesm2022/tooltip.mjs +11 -12
  116. package/fesm2022/tooltip.mjs.map +1 -1
  117. package/fesm2022/tree.mjs +26 -32
  118. package/fesm2022/tree.mjs.map +1 -1
  119. package/form-field/_form-field-theme.scss +105 -56
  120. package/form-field/index.d.ts +1 -1
  121. package/grid-list/_grid-list-theme.scss +18 -12
  122. package/icon/_icon-theme.scss +15 -11
  123. package/icon/index.d.ts +1 -1
  124. package/input/_input-theme.scss +11 -8
  125. package/list/_list-theme.scss +82 -44
  126. package/menu/_menu-theme.scss +26 -18
  127. package/menu/index.d.ts +0 -1
  128. package/package.json +10 -2
  129. package/paginator/_paginator-theme.scss +32 -20
  130. package/prebuilt-themes/azure-blue.css +1 -1
  131. package/prebuilt-themes/cyan-orange.css +1 -1
  132. package/prebuilt-themes/deeppurple-amber.css +1 -1
  133. package/prebuilt-themes/indigo-pink.css +1 -1
  134. package/prebuilt-themes/magenta-violet.css +1 -1
  135. package/prebuilt-themes/pink-bluegrey.css +1 -1
  136. package/prebuilt-themes/purple-green.css +1 -1
  137. package/prebuilt-themes/rose-red.css +1 -1
  138. package/progress-bar/_progress-bar-theme.scss +13 -11
  139. package/progress-spinner/_progress-spinner-theme.scss +34 -20
  140. package/radio/_radio-theme.scss +50 -26
  141. package/schematics/collection.json +3 -3
  142. package/schematics/ng-add/index.js +1 -1
  143. package/schematics/ng-add/index.mjs +1 -1
  144. package/schematics/ng-generate/{m3-theme → theme-color}/index_bundled.js +454 -288
  145. package/schematics/ng-generate/theme-color/index_bundled.js.map +7 -0
  146. package/schematics/ng-generate/{m3-theme → theme-color}/schema.json +7 -13
  147. package/select/_select-theme.scss +31 -22
  148. package/sidenav/_sidenav-theme.scss +21 -14
  149. package/slide-toggle/_slide-toggle-theme.scss +42 -22
  150. package/slider/_slider-theme.scss +55 -35
  151. package/snack-bar/_snack-bar-theme.scss +22 -14
  152. package/sort/_sort-theme.scss +26 -18
  153. package/stepper/_stepper-theme.scss +33 -24
  154. package/table/_table-theme.scss +29 -20
  155. package/tabs/_tabs-theme.scss +89 -46
  156. package/tabs/index.d.ts +2 -2
  157. package/timepicker/_timepicker-theme.scss +120 -0
  158. package/timepicker/index.d.ts +297 -0
  159. package/timepicker/testing/index.d.ts +113 -0
  160. package/toolbar/_toolbar-theme.scss +28 -19
  161. package/tooltip/_tooltip-theme.scss +11 -12
  162. package/tree/_tree-theme.scss +26 -18
  163. package/schematics/ng-generate/m3-theme/index_bundled.js.map +0 -7
@@ -18,15 +18,16 @@
18
18
  @mixin base($theme) {
19
19
  @if inspection.get-theme-version($theme) == 1 {
20
20
  @include _theme-from-tokens(inspection.get-theme-tokens($theme, base));
21
- }
22
- @else {
21
+ } @else {
23
22
  @include ripple-theme.base($theme);
24
23
  @include option-theme.base($theme);
25
24
  @include optgroup-theme.base($theme);
26
25
  @include pseudo-checkbox-theme.base($theme);
27
26
  @include sass-utils.current-selector-or-root() {
28
- @include token-utils.create-token-values(tokens-mat-app.$prefix,
29
- tokens-mat-app.get-unthemable-tokens());
27
+ @include token-utils.create-token-values(
28
+ tokens-mat-app.$prefix,
29
+ tokens-mat-app.get-unthemable-tokens()
30
+ );
30
31
  }
31
32
  }
32
33
  }
@@ -34,15 +35,16 @@
34
35
  @mixin color($theme) {
35
36
  @if inspection.get-theme-version($theme) == 1 {
36
37
  @include _theme-from-tokens(inspection.get-theme-tokens($theme, color));
37
- }
38
- @else {
38
+ } @else {
39
39
  @include ripple-theme.color($theme);
40
40
  @include option-theme.color($theme);
41
41
  @include optgroup-theme.color($theme);
42
42
  @include pseudo-checkbox-theme.color($theme);
43
43
  @include sass-utils.current-selector-or-root() {
44
- @include token-utils.create-token-values(tokens-mat-app.$prefix,
45
- tokens-mat-app.get-color-tokens($theme));
44
+ @include token-utils.create-token-values(
45
+ tokens-mat-app.$prefix,
46
+ tokens-mat-app.get-color-tokens($theme)
47
+ );
46
48
  }
47
49
  }
48
50
  }
@@ -50,8 +52,7 @@
50
52
  @mixin typography($theme) {
51
53
  @if inspection.get-theme-version($theme) == 1 {
52
54
  @include _theme-from-tokens(inspection.get-theme-tokens($theme, typography));
53
- }
54
- @else {
55
+ } @else {
55
56
  @include option-theme.typography($theme);
56
57
  @include optgroup-theme.typography($theme);
57
58
  @include pseudo-checkbox-theme.typography($theme);
@@ -62,8 +63,7 @@
62
63
  @mixin density($theme) {
63
64
  @if inspection.get-theme-version($theme) == 1 {
64
65
  @include _theme-from-tokens(inspection.get-theme-tokens($theme, density));
65
- }
66
- @else {
66
+ } @else {
67
67
  @include option-theme.density($theme);
68
68
  @include optgroup-theme.density($theme);
69
69
  @include pseudo-checkbox-theme.density($theme);
@@ -71,23 +71,39 @@
71
71
  }
72
72
  }
73
73
 
74
- @mixin overrides($tokens: ()) {
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() {
75
80
  $app-tokens: tokens-mat-app.get-token-slots();
76
81
  $ripple-tokens: tokens-mat-ripple.get-token-slots();
77
82
  $option-tokens: tokens-mat-option.get-token-slots();
78
83
  $full-pseudo-checkbox-tokens: tokens-mat-full-pseudo-checkbox.get-token-slots();
79
84
  $minimal-pseudo-checkbox-tokens: tokens-mat-minimal-pseudo-checkbox.get-token-slots();
80
85
 
81
- @include token-utils.batch-create-token-values(
82
- $tokens,
83
- (prefix: tokens-mat-app.$prefix, tokens: $app-tokens),
84
- (prefix: tokens-mat-ripple.$prefix, tokens: $ripple-tokens),
85
- (prefix: tokens-mat-option.$prefix, tokens: $option-tokens),
86
- (prefix: tokens-mat-full-pseudo-checkbox.$prefix, tokens: $full-pseudo-checkbox-tokens),
87
- (prefix: tokens-mat-minimal-pseudo-checkbox.$prefix, tokens: $minimal-pseudo-checkbox-tokens),
86
+ @return (
87
+ (namespace: tokens-mat-app.$prefix, tokens: $app-tokens, prefix: 'app-'),
88
+ (namespace: tokens-mat-ripple.$prefix, tokens: $ripple-tokens, prefix: 'ripple-'),
89
+ (namespace: tokens-mat-option.$prefix, tokens: $option-tokens, prefix: 'option-'),
90
+ (
91
+ namespace: tokens-mat-full-pseudo-checkbox.$prefix,
92
+ tokens: $full-pseudo-checkbox-tokens,
93
+ prefix: 'pseudo-checkbox-full-'
94
+ ),
95
+ (
96
+ namespace: tokens-mat-minimal-pseudo-checkbox.$prefix,
97
+ tokens: $minimal-pseudo-checkbox-tokens,
98
+ prefix: 'pseudo-checkbox-minimal-'
99
+ )
88
100
  );
89
101
  }
90
102
 
103
+ @mixin overrides($tokens: ()) {
104
+ @include token-utils.batch-create-token-values($tokens, _get-supported-overrides-tokens()...);
105
+ }
106
+
91
107
  // Mixin that renders all of the core styles that depend on the theme.
92
108
  @mixin theme($theme, $options...) {
93
109
  // Wrap the sub-theme includes in the duplicate theme styles mixin. This ensures that
@@ -96,8 +112,7 @@
96
112
  @include theming.private-check-duplicate-theme-styles($theme, 'mat-core') {
97
113
  @if inspection.get-theme-version($theme) == 1 {
98
114
  @include _theme-from-tokens(inspection.get-theme-tokens($theme), $options...);
99
- }
100
- @else {
115
+ } @else {
101
116
  @include base($theme);
102
117
  @if inspection.theme-has($theme, color) {
103
118
  @include color($theme);
@@ -114,23 +129,37 @@
114
129
 
115
130
  @mixin _theme-from-tokens($tokens, $options...) {
116
131
  @include validation.selector-defined(
117
- 'Calls to Angular Material theme mixins with an M3 theme must be wrapped in a selector');
132
+ 'Calls to Angular Material theme mixins with an M3 theme must be wrapped in a selector'
133
+ );
118
134
  $mat-app-tokens: token-utils.get-tokens-for($tokens, tokens-mat-app.$prefix, $options...);
119
135
  $mat-ripple-tokens: token-utils.get-tokens-for($tokens, tokens-mat-ripple.$prefix, $options...);
120
136
  $mat-option-tokens: token-utils.get-tokens-for($tokens, tokens-mat-option.$prefix, $options...);
121
- $mat-optgroup-tokens:
122
- token-utils.get-tokens-for($tokens, tokens-mat-optgroup.$prefix, $options...);
123
- $mat-full-pseudo-checkbox-tokens: token-utils.get-tokens-for($tokens,
124
- tokens-mat-full-pseudo-checkbox.$prefix, $options...);
125
- $mat-minimal-pseudo-checkbox-tokens: token-utils.get-tokens-for($tokens,
126
- tokens-mat-minimal-pseudo-checkbox.$prefix, $options...);
137
+ $mat-optgroup-tokens: token-utils.get-tokens-for(
138
+ $tokens,
139
+ tokens-mat-optgroup.$prefix,
140
+ $options...
141
+ );
142
+ $mat-full-pseudo-checkbox-tokens: token-utils.get-tokens-for(
143
+ $tokens,
144
+ tokens-mat-full-pseudo-checkbox.$prefix,
145
+ $options...
146
+ );
147
+ $mat-minimal-pseudo-checkbox-tokens: token-utils.get-tokens-for(
148
+ $tokens,
149
+ tokens-mat-minimal-pseudo-checkbox.$prefix,
150
+ $options...
151
+ );
127
152
 
128
153
  @include token-utils.create-token-values(tokens-mat-app.$prefix, $mat-app-tokens);
129
154
  @include token-utils.create-token-values(tokens-mat-ripple.$prefix, $mat-ripple-tokens);
130
155
  @include token-utils.create-token-values(tokens-mat-option.$prefix, $mat-option-tokens);
131
156
  @include token-utils.create-token-values(tokens-mat-optgroup.$prefix, $mat-optgroup-tokens);
132
- @include token-utils.create-token-values(tokens-mat-full-pseudo-checkbox.$prefix,
133
- $mat-full-pseudo-checkbox-tokens);
134
- @include token-utils.create-token-values(tokens-mat-minimal-pseudo-checkbox.$prefix,
135
- $mat-minimal-pseudo-checkbox-tokens);
157
+ @include token-utils.create-token-values(
158
+ tokens-mat-full-pseudo-checkbox.$prefix,
159
+ $mat-full-pseudo-checkbox-tokens
160
+ );
161
+ @include token-utils.create-token-values(
162
+ tokens-mat-minimal-pseudo-checkbox.$prefix,
163
+ $mat-minimal-pseudo-checkbox-tokens
164
+ );
136
165
  }
package/core/_core.scss CHANGED
@@ -2,12 +2,10 @@
2
2
  @use './tokens/m2/mat/app' as tokens-mat-app;
3
3
  @use './tokens/token-utils';
4
4
  @use './style/elevation';
5
- @use './focus-indicators/private';
6
5
 
7
6
  // Mixin that renders all of the core styles that are not theme-dependent.
8
7
  @mixin core() {
9
8
  @include cdk.a11y-visually-hidden();
10
- @include private.structural-styling();
11
9
  }
12
10
 
13
11
  // Emits the mat-app-background CSS class. This predefined class sets the
@@ -18,7 +16,7 @@
18
16
  // background color. However, if it isn't defined anywhere, then MSS
19
17
  // complains in its verification stage.
20
18
  html {
21
- --mat-app-on-surface: initial;
19
+ --mat-sys-on-surface: initial;
22
20
  }
23
21
 
24
22
  // Wrapper element that provides the theme background when the
package/core/index.d.ts CHANGED
@@ -892,6 +892,11 @@ export declare class NativeDateAdapter extends DateAdapter<Date> {
892
892
  * @returns A Date object with its UTC representation based on the passed in date info
893
893
  */
894
894
  private _format;
895
+ /**
896
+ * Attempts to parse a time string into a date object. Returns null if it cannot be parsed.
897
+ * @param value Time string to parse.
898
+ */
899
+ private _parseTimeString;
895
900
  static ɵfac: i0.ɵɵFactoryDeclaration<NativeDateAdapter, never>;
896
901
  static ɵprov: i0.ɵɵInjectableDeclaration<NativeDateAdapter>;
897
902
  }
@@ -1090,6 +1095,15 @@ export declare class ShowOnDirtyErrorStateMatcher implements ErrorStateMatcher {
1090
1095
  static ɵprov: i0.ɵɵInjectableDeclaration<ShowOnDirtyErrorStateMatcher>;
1091
1096
  }
1092
1097
 
1098
+ /**
1099
+ * Component used to load structural styles for focus indicators.
1100
+ * @docs-private
1101
+ */
1102
+ export declare class _StructuralStylesLoader {
1103
+ static ɵfac: i0.ɵɵFactoryDeclaration<_StructuralStylesLoader, never>;
1104
+ static ɵcmp: i0.ɵɵComponentDeclaration<_StructuralStylesLoader, "structural-styles", never, {}, {}, never, never, true, never>;
1105
+ }
1106
+
1093
1107
 
1094
1108
  /** Possible color palette values. */
1095
1109
  export declare type ThemePalette = 'primary' | 'accent' | 'warn' | undefined;
@@ -10,18 +10,19 @@
10
10
  @mixin base($theme) {
11
11
  @if inspection.get-theme-version($theme) == 1 {
12
12
  @include _theme-from-tokens(inspection.get-theme-tokens($theme, base));
13
+ } @else {
13
14
  }
14
- @else {}
15
15
  }
16
16
 
17
17
  @mixin color($theme) {
18
18
  @if inspection.get-theme-version($theme) == 1 {
19
19
  @include _theme-from-tokens(inspection.get-theme-tokens($theme, color));
20
- }
21
- @else {
20
+ } @else {
22
21
  @include sass-utils.current-selector-or-root() {
23
- @include token-utils.create-token-values(tokens-mat-optgroup.$prefix,
24
- tokens-mat-optgroup.get-color-tokens($theme));
22
+ @include token-utils.create-token-values(
23
+ tokens-mat-optgroup.$prefix,
24
+ tokens-mat-optgroup.get-color-tokens($theme)
25
+ );
25
26
  }
26
27
  }
27
28
  }
@@ -29,11 +30,12 @@
29
30
  @mixin typography($theme) {
30
31
  @if inspection.get-theme-version($theme) == 1 {
31
32
  @include _theme-from-tokens(inspection.get-theme-tokens($theme, typography));
32
- }
33
- @else {
33
+ } @else {
34
34
  @include sass-utils.current-selector-or-root() {
35
- @include token-utils.create-token-values(tokens-mat-optgroup.$prefix,
36
- tokens-mat-optgroup.get-typography-tokens($theme));
35
+ @include token-utils.create-token-values(
36
+ tokens-mat-optgroup.$prefix,
37
+ tokens-mat-optgroup.get-typography-tokens($theme)
38
+ );
37
39
  }
38
40
  }
39
41
  }
@@ -41,14 +43,17 @@
41
43
  @mixin density($theme) {
42
44
  @if inspection.get-theme-version($theme) == 1 {
43
45
  @include _theme-from-tokens(inspection.get-theme-tokens($theme, density));
46
+ } @else {
44
47
  }
45
- @else {}
46
48
  }
47
49
 
48
50
  @mixin overrides($tokens: ()) {
49
51
  @include token-utils.batch-create-token-values(
50
52
  $tokens,
51
- (prefix: tokens-mat-optgroup.$prefix, tokens: tokens-mat-optgroup.get-token-slots()),
53
+ (
54
+ namespace: tokens-mat-optgroup.$prefix,
55
+ tokens: tokens-mat-optgroup.get-token-slots(),
56
+ )
52
57
  );
53
58
  }
54
59
 
@@ -56,8 +61,7 @@
56
61
  @include theming.private-check-duplicate-theme-styles($theme, 'mat-optgroup') {
57
62
  @if inspection.get-theme-version($theme) == 1 {
58
63
  @include _theme-from-tokens(inspection.get-theme-tokens($theme));
59
- }
60
- @else {
64
+ } @else {
61
65
  @include base($theme);
62
66
  @if inspection.theme-has($theme, color) {
63
67
  @include color($theme);
@@ -74,9 +78,12 @@
74
78
 
75
79
  @mixin _theme-from-tokens($tokens) {
76
80
  @include validation.selector-defined(
77
- 'Calls to Angular Material theme mixins with an M3 theme must be wrapped in a selector');
81
+ 'Calls to Angular Material theme mixins with an M3 theme must be wrapped in a selector'
82
+ );
78
83
  @if ($tokens != ()) {
79
84
  @include token-utils.create-token-values(
80
- tokens-mat-optgroup.$prefix, map.get($tokens, tokens-mat-optgroup.$prefix));
85
+ tokens-mat-optgroup.$prefix,
86
+ map.get($tokens, tokens-mat-optgroup.$prefix)
87
+ );
81
88
  }
82
89
  }
@@ -12,8 +12,8 @@
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
+ } @else {
15
16
  }
16
- @else {}
17
17
  }
18
18
 
19
19
  /// Outputs color theme styles for the mat-option.
@@ -24,21 +24,26 @@
24
24
  @mixin color($theme, $options...) {
25
25
  @if inspection.get-theme-version($theme) == 1 {
26
26
  @include _theme-from-tokens(inspection.get-theme-tokens($theme, color), $options...);
27
- }
28
- @else {
27
+ } @else {
29
28
  @include sass-utils.current-selector-or-root() {
30
- @include token-utils.create-token-values(tokens-mat-option.$prefix,
31
- tokens-mat-option.get-color-tokens($theme));
29
+ @include token-utils.create-token-values(
30
+ tokens-mat-option.$prefix,
31
+ tokens-mat-option.get-color-tokens($theme)
32
+ );
32
33
  }
33
34
 
34
35
  .mat-accent {
35
- @include token-utils.create-token-values(tokens-mat-option.$prefix,
36
- tokens-mat-option.get-color-tokens($theme, accent));
36
+ @include token-utils.create-token-values(
37
+ tokens-mat-option.$prefix,
38
+ tokens-mat-option.get-color-tokens($theme, accent)
39
+ );
37
40
  }
38
41
 
39
42
  .mat-warn {
40
- @include token-utils.create-token-values(tokens-mat-option.$prefix,
41
- tokens-mat-option.get-color-tokens($theme, warn));
43
+ @include token-utils.create-token-values(
44
+ tokens-mat-option.$prefix,
45
+ tokens-mat-option.get-color-tokens($theme, warn)
46
+ );
42
47
  }
43
48
  }
44
49
  }
@@ -48,11 +53,12 @@
48
53
  @mixin typography($theme) {
49
54
  @if inspection.get-theme-version($theme) == 1 {
50
55
  @include _theme-from-tokens(inspection.get-theme-tokens($theme, typography));
51
- }
52
- @else {
56
+ } @else {
53
57
  @include sass-utils.current-selector-or-root() {
54
- @include token-utils.create-token-values(tokens-mat-option.$prefix,
55
- tokens-mat-option.get-typography-tokens($theme));
58
+ @include token-utils.create-token-values(
59
+ tokens-mat-option.$prefix,
60
+ tokens-mat-option.get-typography-tokens($theme)
61
+ );
56
62
  }
57
63
  }
58
64
  }
@@ -62,8 +68,8 @@
62
68
  @mixin density($theme) {
63
69
  @if inspection.get-theme-version($theme) == 1 {
64
70
  @include _theme-from-tokens(inspection.get-theme-tokens($theme, density));
71
+ } @else {
65
72
  }
66
- @else {}
67
73
  }
68
74
 
69
75
  /// Outputs the CSS variable values for the given tokens.
@@ -71,7 +77,10 @@
71
77
  @mixin overrides($tokens: ()) {
72
78
  @include token-utils.batch-create-token-values(
73
79
  $tokens,
74
- (prefix: tokens-mat-option.$prefix, tokens: tokens-mat-option.get-token-slots()),
80
+ (
81
+ namespace: tokens-mat-option.$prefix,
82
+ tokens: tokens-mat-option.get-token-slots(),
83
+ )
75
84
  );
76
85
  }
77
86
 
@@ -84,8 +93,7 @@
84
93
  @include theming.private-check-duplicate-theme-styles($theme, 'mat-option') {
85
94
  @if inspection.get-theme-version($theme) == 1 {
86
95
  @include _theme-from-tokens(inspection.get-theme-tokens($theme), $options...);
87
- }
88
- @else {
96
+ } @else {
89
97
  @include base($theme);
90
98
  @if inspection.theme-has($theme, color) {
91
99
  @include color($theme);
@@ -102,7 +110,8 @@
102
110
 
103
111
  @mixin _theme-from-tokens($tokens, $options...) {
104
112
  @include validation.selector-defined(
105
- 'Calls to Angular Material theme mixins with an M3 theme must be wrapped in a selector');
113
+ 'Calls to Angular Material theme mixins with an M3 theme must be wrapped in a selector'
114
+ );
106
115
  $mat-option-tokens: token-utils.get-tokens-for($tokens, tokens-mat-option.$prefix, $options...);
107
116
  @include token-utils.create-token-values(tokens-mat-option.$prefix, $mat-option-tokens);
108
117
  }
@@ -9,18 +9,19 @@
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
+ } @else {
12
13
  }
13
- @else {}
14
14
  }
15
15
 
16
16
  @mixin color($theme) {
17
17
  @if inspection.get-theme-version($theme) == 1 {
18
18
  @include _theme-from-tokens(inspection.get-theme-tokens($theme, color));
19
- }
20
- @else {
19
+ } @else {
21
20
  @include sass-utils.current-selector-or-root() {
22
- @include token-utils.create-token-values(tokens-mat-ripple.$prefix,
23
- tokens-mat-ripple.get-color-tokens($theme));
21
+ @include token-utils.create-token-values(
22
+ tokens-mat-ripple.$prefix,
23
+ tokens-mat-ripple.get-color-tokens($theme)
24
+ );
24
25
  }
25
26
  }
26
27
  }
@@ -28,11 +29,12 @@
28
29
  @mixin typography($theme) {
29
30
  @if inspection.get-theme-version($theme) == 1 {
30
31
  @include _theme-from-tokens(inspection.get-theme-tokens($theme, typography));
31
- }
32
- @else {
32
+ } @else {
33
33
  @include sass-utils.current-selector-or-root() {
34
- @include token-utils.create-token-values(tokens-mat-ripple.$prefix,
35
- tokens-mat-ripple.get-typography-tokens($theme));
34
+ @include token-utils.create-token-values(
35
+ tokens-mat-ripple.$prefix,
36
+ tokens-mat-ripple.get-typography-tokens($theme)
37
+ );
36
38
  }
37
39
  }
38
40
  }
@@ -40,11 +42,12 @@
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));
43
- }
44
- @else {
45
+ } @else {
45
46
  @include sass-utils.current-selector-or-root() {
46
- @include token-utils.create-token-values(tokens-mat-ripple.$prefix,
47
- tokens-mat-ripple.get-density-tokens($theme));
47
+ @include token-utils.create-token-values(
48
+ tokens-mat-ripple.$prefix,
49
+ tokens-mat-ripple.get-density-tokens($theme)
50
+ );
48
51
  }
49
52
  }
50
53
  }
@@ -52,7 +55,10 @@
52
55
  @mixin overrides($tokens: ()) {
53
56
  @include token-utils.batch-create-token-values(
54
57
  $tokens,
55
- (prefix: tokens-mat-ripple.$prefix, tokens: tokens-mat-ripple.get-token-slots()),
58
+ (
59
+ namespace: tokens-mat-ripple.$prefix,
60
+ tokens: tokens-mat-ripple.get-token-slots(),
61
+ )
56
62
  );
57
63
  }
58
64
 
@@ -60,8 +66,7 @@
60
66
  @include theming.private-check-duplicate-theme-styles($theme, 'mat-ripple') {
61
67
  @if inspection.get-theme-version($theme) == 1 {
62
68
  @include _theme-from-tokens(inspection.get-theme-tokens($theme));
63
- }
64
- @else {
69
+ } @else {
65
70
  @include base($theme);
66
71
  @if inspection.theme-has($theme, color) {
67
72
  @include color($theme);
@@ -78,9 +83,12 @@
78
83
 
79
84
  @mixin _theme-from-tokens($tokens) {
80
85
  @include validation.selector-defined(
81
- 'Calls to Angular Material theme mixins with an M3 theme must be wrapped in a selector');
86
+ 'Calls to Angular Material theme mixins with an M3 theme must be wrapped in a selector'
87
+ );
82
88
  @if ($tokens != ()) {
83
89
  @include token-utils.create-token-values(
84
- tokens-mat-ripple.$prefix, map.get($tokens, tokens-mat-ripple.$prefix));
90
+ tokens-mat-ripple.$prefix,
91
+ map.get($tokens, tokens-mat-ripple.$prefix)
92
+ );
85
93
  }
86
94
  }
@@ -8,30 +8,46 @@
8
8
 
9
9
  @mixin _palette-styles($theme, $palette-name) {
10
10
  @include sass-utils.current-selector-or-root() {
11
- @include token-utils.create-token-values(tokens-mat-full-pseudo-checkbox.$prefix,
12
- tokens-mat-full-pseudo-checkbox.get-color-tokens($theme, $palette-name));
13
- @include token-utils.create-token-values(tokens-mat-minimal-pseudo-checkbox.$prefix,
14
- tokens-mat-minimal-pseudo-checkbox.get-color-tokens($theme, $palette-name));
11
+ @include token-utils.create-token-values(
12
+ tokens-mat-full-pseudo-checkbox.$prefix,
13
+ tokens-mat-full-pseudo-checkbox.get-color-tokens($theme, $palette-name)
14
+ );
15
+ @include token-utils.create-token-values(
16
+ tokens-mat-minimal-pseudo-checkbox.$prefix,
17
+ tokens-mat-minimal-pseudo-checkbox.get-color-tokens($theme, $palette-name)
18
+ );
15
19
  }
16
20
  }
17
21
 
18
22
  @mixin _theme-from-tokens($tokens, $options...) {
19
23
  @include validation.selector-defined(
20
- 'Calls to Angular Material theme mixins with an M3 theme must be wrapped in a selector');
21
- $mat-full-pseudo-checkbox-tokens:
22
- token-utils.get-tokens-for($tokens, tokens-mat-full-pseudo-checkbox.$prefix, $options...);
23
- $mat-minimal-pseudo-checkbox-tokens:
24
- token-utils.get-tokens-for($tokens, tokens-mat-minimal-pseudo-checkbox.$prefix, $options...);
24
+ 'Calls to Angular Material theme mixins with an M3 theme must be wrapped in a selector'
25
+ );
26
+ $mat-full-pseudo-checkbox-tokens: token-utils.get-tokens-for(
27
+ $tokens,
28
+ tokens-mat-full-pseudo-checkbox.$prefix,
29
+ $options...
30
+ );
31
+ $mat-minimal-pseudo-checkbox-tokens: token-utils.get-tokens-for(
32
+ $tokens,
33
+ tokens-mat-minimal-pseudo-checkbox.$prefix,
34
+ $options...
35
+ );
25
36
  @include token-utils.create-token-values(
26
- tokens-mat-full-pseudo-checkbox.$prefix, $mat-full-pseudo-checkbox-tokens);
37
+ tokens-mat-full-pseudo-checkbox.$prefix,
38
+ $mat-full-pseudo-checkbox-tokens
39
+ );
27
40
  @include token-utils.create-token-values(
28
- tokens-mat-minimal-pseudo-checkbox.$prefix, $mat-minimal-pseudo-checkbox-tokens);
41
+ tokens-mat-minimal-pseudo-checkbox.$prefix,
42
+ $mat-minimal-pseudo-checkbox-tokens
43
+ );
29
44
  }
30
45
 
31
46
  /// Outputs base theme styles (styles not dependent on the color, typography, or density settings)
32
47
  /// for the mat-pseudo-checkbox.
33
48
  /// @param {Map} $theme The theme to generate base styles for.
34
- @mixin base($theme) {}
49
+ @mixin base($theme) {
50
+ }
35
51
 
36
52
  /// Outputs the CSS variable values for the given tokens.
37
53
  /// @param {Map} $tokens The token values to emit.
@@ -41,8 +57,16 @@
41
57
 
42
58
  @include token-utils.batch-create-token-values(
43
59
  $tokens,
44
- (prefix: tokens-mat-full-pseudo-checkbox.$prefix, tokens: $full-pseudo-checkbox-tokens),
45
- (prefix: tokens-mat-minimal-pseudo-checkbox.$prefix, tokens: $minimal-pseudo-checkbox-tokens),
60
+ (
61
+ namespace: tokens-mat-full-pseudo-checkbox.$prefix,
62
+ tokens: $full-pseudo-checkbox-tokens,
63
+ prefix: 'full-',
64
+ ),
65
+ (
66
+ namespace: tokens-mat-minimal-pseudo-checkbox.$prefix,
67
+ tokens: $minimal-pseudo-checkbox-tokens,
68
+ prefix: 'minimal-',
69
+ )
46
70
  );
47
71
  }
48
72
 
@@ -54,8 +78,7 @@
54
78
  @mixin color($theme, $options...) {
55
79
  @if inspection.get-theme-version($theme) == 1 {
56
80
  @include _theme-from-tokens(inspection.get-theme-tokens($theme, color), $options...);
57
- }
58
- @else {
81
+ } @else {
59
82
  // Default to the accent color. Note that the pseudo checkboxes are meant to inherit the
60
83
  // theme from their parent, rather than implementing their own theming, which is why we
61
84
  // don't attach to the `mat-*` classes. Also note that this needs to be below `.mat-primary`
@@ -96,8 +119,7 @@
96
119
  @include theming.private-check-duplicate-theme-styles($theme, 'mat-pseudo-checkbox') {
97
120
  @if inspection.get-theme-version($theme) == 1 {
98
121
  @include _theme-from-tokens(inspection.get-theme-tokens($theme), $options...);
99
- }
100
- @else {
122
+ } @else {
101
123
  @include base($theme);
102
124
  @if inspection.theme-has($theme, color) {
103
125
  @include color($theme);
@@ -36,6 +36,7 @@
36
36
  @use '../../tree/tree-theme';
37
37
  @use '../../snack-bar/snack-bar-theme';
38
38
  @use '../../form-field/form-field-theme';
39
+ @use '../../timepicker/timepicker-theme';
39
40
  @use './theming';
40
41
 
41
42
  // Create a theme.
@@ -79,6 +80,7 @@
79
80
  @include sort-theme.theme($theme);
80
81
  @include toolbar-theme.theme($theme);
81
82
  @include tree-theme.theme($theme);
83
+ @include timepicker-theme.theme($theme);
82
84
  }
83
85
  }
84
86
 
@@ -120,6 +122,7 @@
120
122
  @include sort-theme.base($theme);
121
123
  @include toolbar-theme.base($theme);
122
124
  @include tree-theme.base($theme);
125
+ @include timepicker-theme.base($theme);
123
126
  }
124
127
 
125
128
  // @deprecated Use `all-component-themes`.
@@ -138,6 +138,7 @@ $_density-tokens: (
138
138
  (mat, slider): (),
139
139
  (mat, snack-bar): (),
140
140
  (mat, sort): (),
141
+ (mat, timepicker): (),
141
142
  (mat, standard-button-toggle): (
142
143
  height: (40px, 40px, 40px, 36px, 24px),
143
144
  ),