@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.
- package/_index.scss +3 -2
- package/autocomplete/_autocomplete-theme.scss +30 -21
- package/badge/_badge-theme.scss +31 -21
- package/bottom-sheet/_bottom-sheet-theme.scss +25 -17
- package/button/_button-theme.scss +220 -100
- package/button/_fab-theme.scss +88 -41
- package/button/_icon-button-theme.scss +31 -22
- package/button/index.d.ts +2 -2
- package/button-toggle/_button-toggle-theme.scss +52 -32
- package/card/_card-theme.scss +72 -35
- package/checkbox/_checkbox-theme.scss +6 -4
- package/chips/_chips-theme.scss +57 -27
- package/core/_core-theme.scss +62 -33
- package/core/_core.scss +1 -3
- package/core/index.d.ts +14 -0
- package/core/option/_optgroup-theme.scss +22 -15
- package/core/option/_option-theme.scss +27 -18
- package/core/ripple/_ripple-theme.scss +26 -18
- package/core/selection/pseudo-checkbox/_pseudo-checkbox-theme.scss +40 -18
- package/core/theming/_all-theme.scss +3 -0
- package/core/tokens/_density.scss +1 -0
- package/core/tokens/_m3-system.scss +34 -6
- package/core/tokens/_token-utils.scss +91 -34
- package/core/tokens/m2/_index.scss +2 -0
- package/core/tokens/m2/mat/_badge.scss +12 -3
- package/core/tokens/m2/mat/_timepicker.scss +44 -0
- package/core/tokens/m2/mdc/_radio.scss +1 -1
- package/core/tokens/m3/_index.scss +2 -0
- package/core/tokens/m3/definitions/_md-comp-elevated-card.scss +1 -1
- package/core/tokens/m3/mat/_badge.scss +6 -3
- package/core/tokens/m3/mat/_timepicker.scss +22 -0
- package/core/typography/_all-typography.scss +2 -0
- package/datepicker/_datepicker-theme.scss +46 -29
- package/datepicker/index.d.ts +1 -1
- package/dialog/_dialog-theme.scss +39 -20
- package/dialog/index.d.ts +6 -3
- package/divider/_divider-theme.scss +21 -14
- package/expansion/_expansion-theme.scss +29 -21
- package/fesm2022/autocomplete.mjs +14 -16
- package/fesm2022/autocomplete.mjs.map +1 -1
- package/fesm2022/badge.mjs +11 -12
- package/fesm2022/badge.mjs.map +1 -1
- package/fesm2022/bottom-sheet.mjs +11 -11
- package/fesm2022/bottom-sheet.mjs.map +1 -1
- package/fesm2022/button-toggle.mjs +14 -13
- package/fesm2022/button-toggle.mjs.map +1 -1
- package/fesm2022/button.mjs +45 -43
- package/fesm2022/button.mjs.map +1 -1
- package/fesm2022/card.mjs +49 -60
- package/fesm2022/card.mjs.map +1 -1
- package/fesm2022/checkbox.mjs +19 -18
- package/fesm2022/checkbox.mjs.map +1 -1
- package/fesm2022/chips.mjs +52 -55
- package/fesm2022/chips.mjs.map +1 -1
- package/fesm2022/core.mjs +122 -116
- package/fesm2022/core.mjs.map +1 -1
- package/fesm2022/datepicker.mjs +98 -106
- package/fesm2022/datepicker.mjs.map +1 -1
- package/fesm2022/dialog/testing.mjs +0 -1
- package/fesm2022/dialog/testing.mjs.map +1 -1
- package/fesm2022/dialog.mjs +28 -33
- package/fesm2022/dialog.mjs.map +1 -1
- package/fesm2022/divider.mjs +8 -8
- package/fesm2022/divider.mjs.map +1 -1
- package/fesm2022/expansion.mjs +31 -34
- package/fesm2022/expansion.mjs.map +1 -1
- package/fesm2022/form-field.mjs +38 -45
- package/fesm2022/form-field.mjs.map +1 -1
- package/fesm2022/grid-list.mjs +26 -29
- package/fesm2022/grid-list.mjs.map +1 -1
- package/fesm2022/icon/testing.mjs +7 -7
- package/fesm2022/icon/testing.mjs.map +1 -1
- package/fesm2022/icon.mjs +12 -12
- package/fesm2022/icon.mjs.map +1 -1
- package/fesm2022/input.mjs +7 -8
- package/fesm2022/input.mjs.map +1 -1
- package/fesm2022/list.mjs +60 -67
- package/fesm2022/list.mjs.map +1 -1
- package/fesm2022/menu.mjs +23 -24
- package/fesm2022/menu.mjs.map +1 -1
- package/fesm2022/paginator/testing.mjs +2 -2
- package/fesm2022/paginator/testing.mjs.map +1 -1
- package/fesm2022/paginator.mjs +11 -11
- package/fesm2022/paginator.mjs.map +1 -1
- package/fesm2022/progress-bar.mjs +8 -8
- package/fesm2022/progress-bar.mjs.map +1 -1
- package/fesm2022/progress-spinner.mjs +8 -8
- package/fesm2022/progress-spinner.mjs.map +1 -1
- package/fesm2022/radio.mjs +14 -13
- package/fesm2022/radio.mjs.map +1 -1
- package/fesm2022/select.mjs +12 -13
- package/fesm2022/select.mjs.map +1 -1
- package/fesm2022/sidenav.mjs +28 -30
- package/fesm2022/sidenav.mjs.map +1 -1
- package/fesm2022/slide-toggle.mjs +19 -18
- package/fesm2022/slide-toggle.mjs.map +1 -1
- package/fesm2022/slider.mjs +21 -21
- package/fesm2022/slider.mjs.map +1 -1
- package/fesm2022/snack-bar.mjs +25 -28
- package/fesm2022/snack-bar.mjs.map +1 -1
- package/fesm2022/sort.mjs +17 -16
- package/fesm2022/sort.mjs.map +1 -1
- package/fesm2022/stepper.mjs +37 -40
- package/fesm2022/stepper.mjs.map +1 -1
- package/fesm2022/table.mjs +57 -73
- package/fesm2022/table.mjs.map +1 -1
- package/fesm2022/tabs.mjs +57 -63
- package/fesm2022/tabs.mjs.map +1 -1
- package/fesm2022/timepicker/testing.mjs +196 -0
- package/fesm2022/timepicker/testing.mjs.map +1 -0
- package/fesm2022/timepicker.mjs +842 -0
- package/fesm2022/timepicker.mjs.map +1 -0
- package/fesm2022/toolbar.mjs +11 -12
- package/fesm2022/toolbar.mjs.map +1 -1
- package/fesm2022/tooltip.mjs +11 -12
- package/fesm2022/tooltip.mjs.map +1 -1
- package/fesm2022/tree.mjs +26 -32
- package/fesm2022/tree.mjs.map +1 -1
- package/form-field/_form-field-theme.scss +105 -56
- package/form-field/index.d.ts +1 -1
- package/grid-list/_grid-list-theme.scss +18 -12
- package/icon/_icon-theme.scss +15 -11
- package/icon/index.d.ts +1 -1
- package/input/_input-theme.scss +11 -8
- package/list/_list-theme.scss +82 -44
- package/menu/_menu-theme.scss +26 -18
- package/menu/index.d.ts +0 -1
- package/package.json +10 -2
- package/paginator/_paginator-theme.scss +32 -20
- package/prebuilt-themes/azure-blue.css +1 -1
- package/prebuilt-themes/cyan-orange.css +1 -1
- package/prebuilt-themes/deeppurple-amber.css +1 -1
- package/prebuilt-themes/indigo-pink.css +1 -1
- package/prebuilt-themes/magenta-violet.css +1 -1
- package/prebuilt-themes/pink-bluegrey.css +1 -1
- package/prebuilt-themes/purple-green.css +1 -1
- package/prebuilt-themes/rose-red.css +1 -1
- package/progress-bar/_progress-bar-theme.scss +13 -11
- package/progress-spinner/_progress-spinner-theme.scss +34 -20
- package/radio/_radio-theme.scss +50 -26
- package/schematics/collection.json +3 -3
- package/schematics/ng-add/index.js +1 -1
- package/schematics/ng-add/index.mjs +1 -1
- package/schematics/ng-generate/{m3-theme → theme-color}/index_bundled.js +454 -288
- package/schematics/ng-generate/theme-color/index_bundled.js.map +7 -0
- package/schematics/ng-generate/{m3-theme → theme-color}/schema.json +7 -13
- package/select/_select-theme.scss +31 -22
- package/sidenav/_sidenav-theme.scss +21 -14
- package/slide-toggle/_slide-toggle-theme.scss +42 -22
- package/slider/_slider-theme.scss +55 -35
- package/snack-bar/_snack-bar-theme.scss +22 -14
- package/sort/_sort-theme.scss +26 -18
- package/stepper/_stepper-theme.scss +33 -24
- package/table/_table-theme.scss +29 -20
- package/tabs/_tabs-theme.scss +89 -46
- package/tabs/index.d.ts +2 -2
- package/timepicker/_timepicker-theme.scss +120 -0
- package/timepicker/index.d.ts +297 -0
- package/timepicker/testing/index.d.ts +113 -0
- package/toolbar/_toolbar-theme.scss +28 -19
- package/tooltip/_tooltip-theme.scss +11 -12
- package/tree/_tree-theme.scss +26 -18
- package/schematics/ng-generate/m3-theme/index_bundled.js.map +0 -7
|
@@ -14,12 +14,14 @@
|
|
|
14
14
|
@use '../core/style/sass-utils';
|
|
15
15
|
|
|
16
16
|
@mixin _text-button-variant($theme, $palette) {
|
|
17
|
-
$mdc-tokens: if(
|
|
17
|
+
$mdc-tokens: if(
|
|
18
|
+
$palette,
|
|
18
19
|
tokens-mdc-text-button.private-get-color-palette-color-tokens($theme, $palette),
|
|
19
20
|
tokens-mdc-text-button.get-color-tokens($theme)
|
|
20
21
|
);
|
|
21
22
|
|
|
22
|
-
$mat-tokens: if(
|
|
23
|
+
$mat-tokens: if(
|
|
24
|
+
$palette,
|
|
23
25
|
tokens-mat-text-button.private-get-color-palette-color-tokens($theme, $palette),
|
|
24
26
|
tokens-mat-text-button.get-color-tokens($theme)
|
|
25
27
|
);
|
|
@@ -29,12 +31,14 @@
|
|
|
29
31
|
}
|
|
30
32
|
|
|
31
33
|
@mixin _filled-button-variant($theme, $palette) {
|
|
32
|
-
$mdc-tokens: if(
|
|
34
|
+
$mdc-tokens: if(
|
|
35
|
+
$palette,
|
|
33
36
|
tokens-mdc-filled-button.private-get-color-palette-color-tokens($theme, $palette),
|
|
34
37
|
tokens-mdc-filled-button.get-color-tokens($theme)
|
|
35
38
|
);
|
|
36
39
|
|
|
37
|
-
$mat-tokens: if(
|
|
40
|
+
$mat-tokens: if(
|
|
41
|
+
$palette,
|
|
38
42
|
tokens-mat-filled-button.private-get-color-palette-color-tokens($theme, $palette),
|
|
39
43
|
tokens-mat-filled-button.get-color-tokens($theme)
|
|
40
44
|
);
|
|
@@ -44,12 +48,14 @@
|
|
|
44
48
|
}
|
|
45
49
|
|
|
46
50
|
@mixin _protected-button-variant($theme, $palette) {
|
|
47
|
-
$mdc-tokens: if(
|
|
51
|
+
$mdc-tokens: if(
|
|
52
|
+
$palette,
|
|
48
53
|
tokens-mdc-protected-button.private-get-color-palette-color-tokens($theme, $palette),
|
|
49
54
|
tokens-mdc-protected-button.get-color-tokens($theme)
|
|
50
55
|
);
|
|
51
56
|
|
|
52
|
-
$mat-tokens: if(
|
|
57
|
+
$mat-tokens: if(
|
|
58
|
+
$palette,
|
|
53
59
|
tokens-mat-protected-button.private-get-color-palette-color-tokens($theme, $palette),
|
|
54
60
|
tokens-mat-protected-button.get-color-tokens($theme)
|
|
55
61
|
);
|
|
@@ -59,12 +65,14 @@
|
|
|
59
65
|
}
|
|
60
66
|
|
|
61
67
|
@mixin _outlined-button-variant($theme, $palette) {
|
|
62
|
-
$mdc-tokens: if(
|
|
68
|
+
$mdc-tokens: if(
|
|
69
|
+
$palette,
|
|
63
70
|
tokens-mdc-outlined-button.private-get-color-palette-color-tokens($theme, $palette),
|
|
64
71
|
tokens-mdc-outlined-button.get-color-tokens($theme)
|
|
65
72
|
);
|
|
66
73
|
|
|
67
|
-
$mat-tokens: if(
|
|
74
|
+
$mat-tokens: if(
|
|
75
|
+
$palette,
|
|
68
76
|
tokens-mat-outlined-button.private-get-color-palette-color-tokens($theme, $palette),
|
|
69
77
|
tokens-mat-outlined-button.get-color-tokens($theme)
|
|
70
78
|
);
|
|
@@ -75,38 +83,75 @@
|
|
|
75
83
|
|
|
76
84
|
@mixin _theme-from-tokens($tokens, $options...) {
|
|
77
85
|
@include validation.selector-defined(
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
$mdc-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
86
|
+
'Calls to Angular Material theme mixins with an M3 theme must be wrapped in a selector'
|
|
87
|
+
);
|
|
88
|
+
$mdc-text-button-tokens: token-utils.get-tokens-for(
|
|
89
|
+
$tokens,
|
|
90
|
+
tokens-mdc-text-button.$prefix,
|
|
91
|
+
$options...
|
|
92
|
+
);
|
|
93
|
+
$mdc-protected-button-tokens: token-utils.get-tokens-for(
|
|
94
|
+
$tokens,
|
|
95
|
+
tokens-mdc-protected-button.$prefix,
|
|
96
|
+
$options...
|
|
97
|
+
);
|
|
98
|
+
$mdc-filled-button-tokens: token-utils.get-tokens-for(
|
|
99
|
+
$tokens,
|
|
100
|
+
tokens-mdc-filled-button.$prefix,
|
|
101
|
+
$options...
|
|
102
|
+
);
|
|
103
|
+
$mdc-outlined-button-tokens: token-utils.get-tokens-for(
|
|
104
|
+
$tokens,
|
|
105
|
+
tokens-mdc-outlined-button.$prefix,
|
|
106
|
+
$options...
|
|
107
|
+
);
|
|
108
|
+
$mat-text-button-tokens: token-utils.get-tokens-for(
|
|
109
|
+
$tokens,
|
|
110
|
+
tokens-mat-text-button.$prefix,
|
|
111
|
+
$options...
|
|
112
|
+
);
|
|
113
|
+
$mat-protected-button-tokens: token-utils.get-tokens-for(
|
|
114
|
+
$tokens,
|
|
115
|
+
tokens-mat-protected-button.$prefix,
|
|
116
|
+
$options...
|
|
117
|
+
);
|
|
118
|
+
$mat-filled-button-tokens: token-utils.get-tokens-for(
|
|
119
|
+
$tokens,
|
|
120
|
+
tokens-mat-filled-button.$prefix,
|
|
121
|
+
$options...
|
|
122
|
+
);
|
|
123
|
+
$mat-outlined-button-tokens: token-utils.get-tokens-for(
|
|
124
|
+
$tokens,
|
|
125
|
+
tokens-mat-outlined-button.$prefix,
|
|
126
|
+
$options...
|
|
127
|
+
);
|
|
95
128
|
|
|
96
129
|
@include token-utils.create-token-values(tokens-mdc-text-button.$prefix, $mdc-text-button-tokens);
|
|
97
130
|
@include token-utils.create-token-values(
|
|
98
|
-
|
|
131
|
+
tokens-mdc-protected-button.$prefix,
|
|
132
|
+
$mdc-protected-button-tokens
|
|
133
|
+
);
|
|
99
134
|
@include token-utils.create-token-values(
|
|
100
|
-
|
|
135
|
+
tokens-mdc-filled-button.$prefix,
|
|
136
|
+
$mdc-filled-button-tokens
|
|
137
|
+
);
|
|
101
138
|
@include token-utils.create-token-values(
|
|
102
|
-
tokens-mdc-outlined-button.$prefix,
|
|
139
|
+
tokens-mdc-outlined-button.$prefix,
|
|
140
|
+
$mdc-outlined-button-tokens
|
|
141
|
+
);
|
|
103
142
|
@include token-utils.create-token-values(tokens-mat-text-button.$prefix, $mat-text-button-tokens);
|
|
104
143
|
@include token-utils.create-token-values(
|
|
105
|
-
|
|
144
|
+
tokens-mat-protected-button.$prefix,
|
|
145
|
+
$mat-protected-button-tokens
|
|
146
|
+
);
|
|
106
147
|
@include token-utils.create-token-values(
|
|
107
|
-
|
|
148
|
+
tokens-mat-filled-button.$prefix,
|
|
149
|
+
$mat-filled-button-tokens
|
|
150
|
+
);
|
|
108
151
|
@include token-utils.create-token-values(
|
|
109
|
-
|
|
152
|
+
tokens-mat-outlined-button.$prefix,
|
|
153
|
+
$mat-outlined-button-tokens
|
|
154
|
+
);
|
|
110
155
|
}
|
|
111
156
|
|
|
112
157
|
/// Outputs base theme styles (styles not dependent on the color, typography, or density settings)
|
|
@@ -115,26 +160,41 @@
|
|
|
115
160
|
@mixin base($theme) {
|
|
116
161
|
@if inspection.get-theme-version($theme) == 1 {
|
|
117
162
|
@include _theme-from-tokens(inspection.get-theme-tokens($theme, base));
|
|
118
|
-
}
|
|
119
|
-
@else {
|
|
163
|
+
} @else {
|
|
120
164
|
@include sass-utils.current-selector-or-root() {
|
|
121
|
-
@include token-utils.create-token-values(
|
|
122
|
-
tokens-mdc-text-button
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
@include token-utils.create-token-values(
|
|
126
|
-
tokens-mdc-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
tokens-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
tokens-
|
|
136
|
-
|
|
137
|
-
|
|
165
|
+
@include token-utils.create-token-values(
|
|
166
|
+
tokens-mdc-text-button.$prefix,
|
|
167
|
+
tokens-mdc-text-button.get-unthemable-tokens()
|
|
168
|
+
);
|
|
169
|
+
@include token-utils.create-token-values(
|
|
170
|
+
tokens-mdc-filled-button.$prefix,
|
|
171
|
+
tokens-mdc-filled-button.get-unthemable-tokens()
|
|
172
|
+
);
|
|
173
|
+
@include token-utils.create-token-values(
|
|
174
|
+
tokens-mdc-protected-button.$prefix,
|
|
175
|
+
tokens-mdc-protected-button.get-unthemable-tokens()
|
|
176
|
+
);
|
|
177
|
+
@include token-utils.create-token-values(
|
|
178
|
+
tokens-mdc-outlined-button.$prefix,
|
|
179
|
+
tokens-mdc-outlined-button.get-unthemable-tokens()
|
|
180
|
+
);
|
|
181
|
+
|
|
182
|
+
@include token-utils.create-token-values(
|
|
183
|
+
tokens-mat-text-button.$prefix,
|
|
184
|
+
tokens-mat-text-button.get-unthemable-tokens()
|
|
185
|
+
);
|
|
186
|
+
@include token-utils.create-token-values(
|
|
187
|
+
tokens-mat-filled-button.$prefix,
|
|
188
|
+
tokens-mat-filled-button.get-unthemable-tokens()
|
|
189
|
+
);
|
|
190
|
+
@include token-utils.create-token-values(
|
|
191
|
+
tokens-mat-protected-button.$prefix,
|
|
192
|
+
tokens-mat-protected-button.get-unthemable-tokens()
|
|
193
|
+
);
|
|
194
|
+
@include token-utils.create-token-values(
|
|
195
|
+
tokens-mat-outlined-button.$prefix,
|
|
196
|
+
tokens-mat-outlined-button.get-unthemable-tokens()
|
|
197
|
+
);
|
|
138
198
|
}
|
|
139
199
|
}
|
|
140
200
|
}
|
|
@@ -147,8 +207,7 @@
|
|
|
147
207
|
@mixin color($theme, $options...) {
|
|
148
208
|
@if inspection.get-theme-version($theme) == 1 {
|
|
149
209
|
@include _theme-from-tokens(inspection.get-theme-tokens($theme, color), $options...);
|
|
150
|
-
}
|
|
151
|
-
@else {
|
|
210
|
+
} @else {
|
|
152
211
|
@include sass-utils.current-selector-or-root() {
|
|
153
212
|
@include _text-button-variant($theme, null);
|
|
154
213
|
@include _filled-button-variant($theme, null);
|
|
@@ -219,26 +278,41 @@
|
|
|
219
278
|
@mixin typography($theme) {
|
|
220
279
|
@if inspection.get-theme-version($theme) == 1 {
|
|
221
280
|
@include _theme-from-tokens(inspection.get-theme-tokens($theme, typography));
|
|
222
|
-
}
|
|
223
|
-
@else {
|
|
281
|
+
} @else {
|
|
224
282
|
@include sass-utils.current-selector-or-root() {
|
|
225
|
-
@include token-utils.create-token-values(
|
|
226
|
-
tokens-mdc-text-button
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
@include token-utils.create-token-values(
|
|
230
|
-
tokens-mdc-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
tokens-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
tokens-
|
|
240
|
-
|
|
241
|
-
|
|
283
|
+
@include token-utils.create-token-values(
|
|
284
|
+
tokens-mdc-text-button.$prefix,
|
|
285
|
+
tokens-mdc-text-button.get-typography-tokens($theme)
|
|
286
|
+
);
|
|
287
|
+
@include token-utils.create-token-values(
|
|
288
|
+
tokens-mdc-filled-button.$prefix,
|
|
289
|
+
tokens-mdc-filled-button.get-typography-tokens($theme)
|
|
290
|
+
);
|
|
291
|
+
@include token-utils.create-token-values(
|
|
292
|
+
tokens-mdc-protected-button.$prefix,
|
|
293
|
+
tokens-mdc-protected-button.get-typography-tokens($theme)
|
|
294
|
+
);
|
|
295
|
+
@include token-utils.create-token-values(
|
|
296
|
+
tokens-mdc-outlined-button.$prefix,
|
|
297
|
+
tokens-mdc-outlined-button.get-typography-tokens($theme)
|
|
298
|
+
);
|
|
299
|
+
|
|
300
|
+
@include token-utils.create-token-values(
|
|
301
|
+
tokens-mat-text-button.$prefix,
|
|
302
|
+
tokens-mat-text-button.get-typography-tokens($theme)
|
|
303
|
+
);
|
|
304
|
+
@include token-utils.create-token-values(
|
|
305
|
+
tokens-mat-filled-button.$prefix,
|
|
306
|
+
tokens-mat-filled-button.get-typography-tokens($theme)
|
|
307
|
+
);
|
|
308
|
+
@include token-utils.create-token-values(
|
|
309
|
+
tokens-mat-protected-button.$prefix,
|
|
310
|
+
tokens-mat-protected-button.get-typography-tokens($theme)
|
|
311
|
+
);
|
|
312
|
+
@include token-utils.create-token-values(
|
|
313
|
+
tokens-mat-outlined-button.$prefix,
|
|
314
|
+
tokens-mat-outlined-button.get-typography-tokens($theme)
|
|
315
|
+
);
|
|
242
316
|
}
|
|
243
317
|
}
|
|
244
318
|
}
|
|
@@ -248,26 +322,41 @@
|
|
|
248
322
|
@mixin density($theme) {
|
|
249
323
|
@if inspection.get-theme-version($theme) == 1 {
|
|
250
324
|
@include _theme-from-tokens(inspection.get-theme-tokens($theme, density));
|
|
251
|
-
}
|
|
252
|
-
@else {
|
|
325
|
+
} @else {
|
|
253
326
|
@include sass-utils.current-selector-or-root() {
|
|
254
|
-
@include token-utils.create-token-values(
|
|
255
|
-
tokens-mdc-text-button
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
@include token-utils.create-token-values(
|
|
259
|
-
tokens-mdc-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
tokens-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
tokens-
|
|
269
|
-
|
|
270
|
-
|
|
327
|
+
@include token-utils.create-token-values(
|
|
328
|
+
tokens-mdc-text-button.$prefix,
|
|
329
|
+
tokens-mdc-text-button.get-density-tokens($theme)
|
|
330
|
+
);
|
|
331
|
+
@include token-utils.create-token-values(
|
|
332
|
+
tokens-mdc-filled-button.$prefix,
|
|
333
|
+
tokens-mdc-filled-button.get-density-tokens($theme)
|
|
334
|
+
);
|
|
335
|
+
@include token-utils.create-token-values(
|
|
336
|
+
tokens-mdc-protected-button.$prefix,
|
|
337
|
+
tokens-mdc-protected-button.get-density-tokens($theme)
|
|
338
|
+
);
|
|
339
|
+
@include token-utils.create-token-values(
|
|
340
|
+
tokens-mdc-outlined-button.$prefix,
|
|
341
|
+
tokens-mdc-outlined-button.get-density-tokens($theme)
|
|
342
|
+
);
|
|
343
|
+
|
|
344
|
+
@include token-utils.create-token-values(
|
|
345
|
+
tokens-mat-text-button.$prefix,
|
|
346
|
+
tokens-mat-text-button.get-density-tokens($theme)
|
|
347
|
+
);
|
|
348
|
+
@include token-utils.create-token-values(
|
|
349
|
+
tokens-mat-filled-button.$prefix,
|
|
350
|
+
tokens-mat-filled-button.get-density-tokens($theme)
|
|
351
|
+
);
|
|
352
|
+
@include token-utils.create-token-values(
|
|
353
|
+
tokens-mat-protected-button.$prefix,
|
|
354
|
+
tokens-mat-protected-button.get-density-tokens($theme)
|
|
355
|
+
);
|
|
356
|
+
@include token-utils.create-token-values(
|
|
357
|
+
tokens-mat-outlined-button.$prefix,
|
|
358
|
+
tokens-mat-outlined-button.get-density-tokens($theme)
|
|
359
|
+
);
|
|
271
360
|
}
|
|
272
361
|
}
|
|
273
362
|
}
|
|
@@ -286,14 +375,46 @@
|
|
|
286
375
|
|
|
287
376
|
@include token-utils.batch-create-token-values(
|
|
288
377
|
$tokens,
|
|
289
|
-
(
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
(
|
|
295
|
-
|
|
296
|
-
|
|
378
|
+
(
|
|
379
|
+
namespace: tokens-mdc-filled-button.$prefix,
|
|
380
|
+
tokens: $mdc-filled-button-tokens,
|
|
381
|
+
prefix: 'filled-',
|
|
382
|
+
),
|
|
383
|
+
(
|
|
384
|
+
namespace: tokens-mat-filled-button.$prefix,
|
|
385
|
+
tokens: $mat-filled-button-tokens,
|
|
386
|
+
prefix: 'filled-',
|
|
387
|
+
),
|
|
388
|
+
(
|
|
389
|
+
namespace: tokens-mdc-outlined-button.$prefix,
|
|
390
|
+
tokens: $mdc-outlined-button-tokens,
|
|
391
|
+
prefix: 'outlined-',
|
|
392
|
+
),
|
|
393
|
+
(
|
|
394
|
+
namespace: tokens-mat-outlined-button.$prefix,
|
|
395
|
+
tokens: $mat-outlined-button-tokens,
|
|
396
|
+
prefix: 'outlined-',
|
|
397
|
+
),
|
|
398
|
+
(
|
|
399
|
+
namespace: tokens-mdc-protected-button.$prefix,
|
|
400
|
+
tokens: $mdc-protected-button-tokens,
|
|
401
|
+
prefix: 'protected-',
|
|
402
|
+
),
|
|
403
|
+
(
|
|
404
|
+
namespace: tokens-mat-protected-button.$prefix,
|
|
405
|
+
tokens: $mat-protected-button-tokens,
|
|
406
|
+
prefix: 'protected-',
|
|
407
|
+
),
|
|
408
|
+
(
|
|
409
|
+
namespace: tokens-mdc-text-button.$prefix,
|
|
410
|
+
tokens: $mdc-text-button-tokens,
|
|
411
|
+
prefix: 'text-',
|
|
412
|
+
),
|
|
413
|
+
(
|
|
414
|
+
namespace: tokens-mat-text-button.$prefix,
|
|
415
|
+
tokens: $mat-text-button-tokens,
|
|
416
|
+
prefix: 'text-',
|
|
417
|
+
)
|
|
297
418
|
);
|
|
298
419
|
}
|
|
299
420
|
|
|
@@ -306,8 +427,7 @@
|
|
|
306
427
|
@include theming.private-check-duplicate-theme-styles($theme, 'mat-button') {
|
|
307
428
|
@if inspection.get-theme-version($theme) == 1 {
|
|
308
429
|
@include _theme-from-tokens(inspection.get-theme-tokens($theme), $options...);
|
|
309
|
-
}
|
|
310
|
-
@else {
|
|
430
|
+
} @else {
|
|
311
431
|
@include base($theme);
|
|
312
432
|
@if inspection.theme-has($theme, color) {
|
|
313
433
|
@include color($theme);
|
package/button/_fab-theme.scss
CHANGED
|
@@ -16,26 +16,33 @@
|
|
|
16
16
|
@mixin base($theme) {
|
|
17
17
|
@if inspection.get-theme-version($theme) == 1 {
|
|
18
18
|
@include _theme-from-tokens(inspection.get-theme-tokens($theme, base));
|
|
19
|
-
}
|
|
20
|
-
@else {
|
|
19
|
+
} @else {
|
|
21
20
|
@include sass-utils.current-selector-or-root() {
|
|
22
21
|
@include token-utils.create-token-values(
|
|
23
|
-
tokens-mdc-fab.$prefix,
|
|
22
|
+
tokens-mdc-fab.$prefix,
|
|
23
|
+
tokens-mdc-fab.get-unthemable-tokens()
|
|
24
|
+
);
|
|
24
25
|
@include token-utils.create-token-values(
|
|
25
|
-
tokens-mdc-fab-small.$prefix,
|
|
26
|
+
tokens-mdc-fab-small.$prefix,
|
|
27
|
+
tokens-mdc-fab-small.get-unthemable-tokens()
|
|
28
|
+
);
|
|
26
29
|
@include token-utils.create-token-values(
|
|
27
|
-
tokens-mdc-extended-fab.$prefix,
|
|
30
|
+
tokens-mdc-extended-fab.$prefix,
|
|
31
|
+
tokens-mdc-extended-fab.get-unthemable-tokens()
|
|
32
|
+
);
|
|
28
33
|
}
|
|
29
34
|
}
|
|
30
35
|
}
|
|
31
36
|
|
|
32
37
|
@mixin _fab-variant($theme, $palette) {
|
|
33
|
-
$mdc-tokens: if(
|
|
38
|
+
$mdc-tokens: if(
|
|
39
|
+
$palette,
|
|
34
40
|
tokens-mdc-fab.private-get-color-palette-color-tokens($theme, $palette),
|
|
35
41
|
tokens-mdc-fab.get-color-tokens($theme)
|
|
36
42
|
);
|
|
37
43
|
|
|
38
|
-
$mat-tokens: if(
|
|
44
|
+
$mat-tokens: if(
|
|
45
|
+
$palette,
|
|
39
46
|
tokens-mat-fab.private-get-color-palette-color-tokens($theme, $palette),
|
|
40
47
|
tokens-mat-fab.get-color-tokens($theme)
|
|
41
48
|
);
|
|
@@ -45,12 +52,14 @@
|
|
|
45
52
|
}
|
|
46
53
|
|
|
47
54
|
@mixin _fab-small-variant($theme, $palette) {
|
|
48
|
-
$mdc-tokens: if(
|
|
55
|
+
$mdc-tokens: if(
|
|
56
|
+
$palette,
|
|
49
57
|
tokens-mdc-fab-small.private-get-color-palette-color-tokens($theme, $palette),
|
|
50
58
|
tokens-mdc-fab-small.get-color-tokens($theme)
|
|
51
59
|
);
|
|
52
60
|
|
|
53
|
-
$mat-tokens: if(
|
|
61
|
+
$mat-tokens: if(
|
|
62
|
+
$palette,
|
|
54
63
|
tokens-mat-fab-small.private-get-color-palette-color-tokens($theme, $palette),
|
|
55
64
|
tokens-mat-fab-small.get-color-tokens($theme)
|
|
56
65
|
);
|
|
@@ -67,13 +76,14 @@
|
|
|
67
76
|
@mixin color($theme, $options...) {
|
|
68
77
|
@if inspection.get-theme-version($theme) == 1 {
|
|
69
78
|
@include _theme-from-tokens(inspection.get-theme-tokens($theme, color), $options...);
|
|
70
|
-
}
|
|
71
|
-
@else {
|
|
79
|
+
} @else {
|
|
72
80
|
@include sass-utils.current-selector-or-root() {
|
|
73
81
|
@include _fab-variant($theme, null);
|
|
74
82
|
@include _fab-small-variant($theme, null);
|
|
75
83
|
@include token-utils.create-token-values(
|
|
76
|
-
tokens-mdc-extended-fab.$prefix,
|
|
84
|
+
tokens-mdc-extended-fab.$prefix,
|
|
85
|
+
tokens-mdc-extended-fab.get-color-tokens($theme)
|
|
86
|
+
);
|
|
77
87
|
|
|
78
88
|
.mat-mdc-fab {
|
|
79
89
|
&.mat-primary {
|
|
@@ -111,15 +121,20 @@
|
|
|
111
121
|
@mixin typography($theme) {
|
|
112
122
|
@if inspection.get-theme-version($theme) == 1 {
|
|
113
123
|
@include _theme-from-tokens(inspection.get-theme-tokens($theme, typography));
|
|
114
|
-
}
|
|
115
|
-
@else {
|
|
124
|
+
} @else {
|
|
116
125
|
@include sass-utils.current-selector-or-root() {
|
|
117
|
-
@include token-utils.create-token-values(
|
|
118
|
-
tokens-mdc-extended-fab
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
@include token-utils.create-token-values(
|
|
122
|
-
tokens-mat-fab
|
|
126
|
+
@include token-utils.create-token-values(
|
|
127
|
+
tokens-mdc-extended-fab.$prefix,
|
|
128
|
+
tokens-mdc-extended-fab.get-typography-tokens($theme)
|
|
129
|
+
);
|
|
130
|
+
@include token-utils.create-token-values(
|
|
131
|
+
tokens-mat-fab.$prefix,
|
|
132
|
+
tokens-mat-fab.get-typography-tokens($theme)
|
|
133
|
+
);
|
|
134
|
+
@include token-utils.create-token-values(
|
|
135
|
+
tokens-mat-fab-small.$prefix,
|
|
136
|
+
tokens-mat-fab-small.get-typography-tokens($theme)
|
|
137
|
+
);
|
|
123
138
|
}
|
|
124
139
|
}
|
|
125
140
|
}
|
|
@@ -129,13 +144,16 @@
|
|
|
129
144
|
@mixin density($theme) {
|
|
130
145
|
@if inspection.get-theme-version($theme) == 1 {
|
|
131
146
|
@include _theme-from-tokens(inspection.get-theme-tokens($theme, density));
|
|
132
|
-
}
|
|
133
|
-
@else {
|
|
147
|
+
} @else {
|
|
134
148
|
@include sass-utils.current-selector-or-root() {
|
|
135
|
-
@include token-utils.create-token-values(
|
|
136
|
-
tokens-mat-fab
|
|
137
|
-
|
|
138
|
-
|
|
149
|
+
@include token-utils.create-token-values(
|
|
150
|
+
tokens-mat-fab.$prefix,
|
|
151
|
+
tokens-mat-fab.get-density-tokens($theme)
|
|
152
|
+
);
|
|
153
|
+
@include token-utils.create-token-values(
|
|
154
|
+
tokens-mat-fab-small.$prefix,
|
|
155
|
+
tokens-mat-fab-small.get-density-tokens($theme)
|
|
156
|
+
);
|
|
139
157
|
}
|
|
140
158
|
}
|
|
141
159
|
}
|
|
@@ -145,11 +163,29 @@
|
|
|
145
163
|
@mixin overrides($tokens: ()) {
|
|
146
164
|
@include token-utils.batch-create-token-values(
|
|
147
165
|
$tokens,
|
|
148
|
-
(
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
(
|
|
166
|
+
(
|
|
167
|
+
namespace: tokens-mdc-fab.$prefix,
|
|
168
|
+
tokens: tokens-mdc-fab.get-token-slots(),
|
|
169
|
+
),
|
|
170
|
+
(
|
|
171
|
+
namespace: tokens-mdc-fab-small.$prefix,
|
|
172
|
+
tokens: tokens-mdc-fab-small.get-token-slots(),
|
|
173
|
+
prefix: 'small-',
|
|
174
|
+
),
|
|
175
|
+
(
|
|
176
|
+
namespace: tokens-mdc-extended-fab.$prefix,
|
|
177
|
+
tokens: tokens-mdc-extended-fab.get-token-slots(),
|
|
178
|
+
prefix: 'extended-',
|
|
179
|
+
),
|
|
180
|
+
(
|
|
181
|
+
namespace: tokens-mat-fab.$prefix,
|
|
182
|
+
tokens: tokens-mat-fab.get-token-slots(),
|
|
183
|
+
),
|
|
184
|
+
(
|
|
185
|
+
namespace: tokens-mat-fab-small.$prefix,
|
|
186
|
+
tokens: tokens-mat-fab-small.get-token-slots(),
|
|
187
|
+
prefix: 'small-',
|
|
188
|
+
)
|
|
153
189
|
);
|
|
154
190
|
}
|
|
155
191
|
|
|
@@ -162,8 +198,7 @@
|
|
|
162
198
|
@include theming.private-check-duplicate-theme-styles($theme, 'mat-fab') {
|
|
163
199
|
@if inspection.get-theme-version($theme) == 1 {
|
|
164
200
|
@include _theme-from-tokens(inspection.get-theme-tokens($theme), $options...);
|
|
165
|
-
}
|
|
166
|
-
@else {
|
|
201
|
+
} @else {
|
|
167
202
|
@include base($theme);
|
|
168
203
|
@if inspection.theme-has($theme, color) {
|
|
169
204
|
@include color($theme);
|
|
@@ -180,17 +215,29 @@
|
|
|
180
215
|
|
|
181
216
|
@mixin _theme-from-tokens($tokens, $options...) {
|
|
182
217
|
@include validation.selector-defined(
|
|
183
|
-
|
|
218
|
+
'Calls to Angular Material theme mixins with an M3 theme must be wrapped in a selector'
|
|
219
|
+
);
|
|
184
220
|
$mdc-extended-fab-tokens: token-utils.get-tokens-for(
|
|
185
|
-
|
|
221
|
+
$tokens,
|
|
222
|
+
tokens-mdc-extended-fab.$prefix,
|
|
223
|
+
$options...
|
|
224
|
+
);
|
|
186
225
|
$mdc-fab-tokens: token-utils.get-tokens-for($tokens, tokens-mdc-fab.$prefix, $options...);
|
|
187
|
-
$mdc-fab-small-tokens: token-utils.get-tokens-for(
|
|
188
|
-
$
|
|
226
|
+
$mdc-fab-small-tokens: token-utils.get-tokens-for(
|
|
227
|
+
$tokens,
|
|
228
|
+
tokens-mdc-fab-small.$prefix,
|
|
229
|
+
$options...
|
|
230
|
+
);
|
|
189
231
|
$mat-fab-tokens: token-utils.get-tokens-for($tokens, tokens-mat-fab.$prefix, $options...);
|
|
190
|
-
$mat-fab-small-tokens: token-utils.get-tokens-for(
|
|
191
|
-
$
|
|
192
|
-
|
|
193
|
-
|
|
232
|
+
$mat-fab-small-tokens: token-utils.get-tokens-for(
|
|
233
|
+
$tokens,
|
|
234
|
+
tokens-mat-fab-small.$prefix,
|
|
235
|
+
$options...
|
|
236
|
+
);
|
|
237
|
+
@include token-utils.create-token-values(
|
|
238
|
+
tokens-mdc-extended-fab.$prefix,
|
|
239
|
+
$mdc-extended-fab-tokens
|
|
240
|
+
);
|
|
194
241
|
@include token-utils.create-token-values(tokens-mdc-fab.$prefix, $mdc-fab-tokens);
|
|
195
242
|
@include token-utils.create-token-values(tokens-mdc-fab-small.$prefix, $mdc-fab-small-tokens);
|
|
196
243
|
@include token-utils.create-token-values(tokens-mat-fab.$prefix, $mat-fab-tokens);
|