@angular/material 19.0.0-next.8 → 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 +1 -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 +51 -30
- package/core/_core.scss +1 -1
- 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/tokens/_m3-system.scss +34 -6
- package/core/tokens/_token-utils.scss +91 -34
- package/core/tokens/m2/mat/_badge.scss +12 -3
- package/core/tokens/m2/mdc/_radio.scss +1 -1
- package/core/tokens/m3/definitions/_md-comp-elevated-card.scss +1 -1
- package/core/tokens/m3/mat/_badge.scss +6 -3
- package/datepicker/_datepicker-theme.scss +46 -29
- package/datepicker/index.d.ts +1 -1
- package/dialog/_dialog-theme.scss +39 -20
- 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 +11 -12
- package/fesm2022/button-toggle.mjs.map +1 -1
- package/fesm2022/button.mjs +42 -42
- package/fesm2022/button.mjs.map +1 -1
- package/fesm2022/card.mjs +49 -60
- package/fesm2022/card.mjs.map +1 -1
- package/fesm2022/checkbox.mjs +16 -17
- package/fesm2022/checkbox.mjs.map +1 -1
- package/fesm2022/chips.mjs +48 -54
- package/fesm2022/chips.mjs.map +1 -1
- package/fesm2022/core.mjs +71 -73
- package/fesm2022/core.mjs.map +1 -1
- package/fesm2022/datepicker.mjs +95 -105
- 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 +28 -33
- 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 +11 -11
- package/fesm2022/icon.mjs.map +1 -1
- package/fesm2022/input.mjs +7 -8
- package/fesm2022/input.mjs.map +1 -1
- package/fesm2022/list.mjs +57 -66
- package/fesm2022/list.mjs.map +1 -1
- package/fesm2022/menu.mjs +18 -20
- package/fesm2022/menu.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 +11 -12
- 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 +16 -17
- package/fesm2022/slide-toggle.mjs.map +1 -1
- package/fesm2022/slider.mjs +18 -20
- 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 +14 -15
- package/fesm2022/sort.mjs.map +1 -1
- package/fesm2022/stepper.mjs +34 -39
- package/fesm2022/stepper.mjs.map +1 -1
- package/fesm2022/table.mjs +57 -73
- package/fesm2022/table.mjs.map +1 -1
- package/fesm2022/tabs.mjs +51 -56
- package/fesm2022/tabs.mjs.map +1 -1
- package/fesm2022/timepicker.mjs +17 -18
- package/fesm2022/timepicker.mjs.map +1 -1
- 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/input/_input-theme.scss +11 -8
- package/list/_list-theme.scss +82 -44
- package/menu/_menu-theme.scss +26 -18
- package/package.json +2 -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 +30 -21
- 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
|
@@ -138,10 +138,13 @@ $_system-fallbacks: m3-system.create-system-fallbacks();
|
|
|
138
138
|
@function resolve-elevation($tokens, $elevation-token, $shadow-color-token) {
|
|
139
139
|
$elevation: map.get($tokens, $elevation-token);
|
|
140
140
|
$shadow-color: map.get($tokens, $shadow-color-token);
|
|
141
|
-
@return map.merge(
|
|
142
|
-
$
|
|
143
|
-
|
|
144
|
-
|
|
141
|
+
@return map.merge(
|
|
142
|
+
$tokens,
|
|
143
|
+
(
|
|
144
|
+
$elevation-token: elevation.get-box-shadow($elevation, $shadow-color),
|
|
145
|
+
$shadow-color-token: null,
|
|
146
|
+
)
|
|
147
|
+
);
|
|
145
148
|
}
|
|
146
149
|
|
|
147
150
|
/// Checks whether a list starts wih a given prefix
|
|
@@ -195,7 +198,8 @@ $_system-fallbacks: m3-system.create-system-fallbacks();
|
|
|
195
198
|
$overrides: map.get($tokens, list.append($prefix, $color-variant));
|
|
196
199
|
@if $overrides == null {
|
|
197
200
|
$variants: _supported-color-variants($tokens, $prefix);
|
|
198
|
-
$secondary-message: if(
|
|
201
|
+
$secondary-message: if(
|
|
202
|
+
$variants == (),
|
|
199
203
|
'Mixin does not support color variants',
|
|
200
204
|
'Supported color variants are: #{$variants}'
|
|
201
205
|
);
|
|
@@ -208,41 +212,94 @@ $_system-fallbacks: m3-system.create-system-fallbacks();
|
|
|
208
212
|
/// Emits new token values for the given token overrides.
|
|
209
213
|
/// Verifies that the overrides passed in are valid tokens.
|
|
210
214
|
/// New token values are emitted under the current selector or root.
|
|
211
|
-
@mixin batch-create-token-values($overrides: (), $
|
|
212
|
-
@include
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
$
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
$
|
|
215
|
+
@mixin batch-create-token-values($overrides: (), $namespace-configs...) {
|
|
216
|
+
@include sass-utils.current-selector-or-root() {
|
|
217
|
+
$prefixed-name-data: ();
|
|
218
|
+
$unprefixed-name-data: ();
|
|
219
|
+
$all-names: ();
|
|
220
|
+
|
|
221
|
+
@each $config in $namespace-configs {
|
|
222
|
+
$namespace: map.get($config, namespace);
|
|
223
|
+
$prefix: if(map.has-key($config, prefix), map.get($config, prefix), '');
|
|
224
|
+
$tokens: _filter-nulls(map.get($config, tokens));
|
|
225
|
+
@each $name, $value in $tokens {
|
|
226
|
+
$prefixed-name: $prefix + $name;
|
|
227
|
+
$all-names: list.append($all-names, $prefixed-name, $separator: comma);
|
|
228
|
+
@if map.has-key($prefixed-name-data, $prefixed-name) {
|
|
229
|
+
@error #{
|
|
230
|
+
'Error overriding token: Ambiguous token name `'
|
|
231
|
+
}#{
|
|
232
|
+
$prefixed-name
|
|
233
|
+
}#{
|
|
234
|
+
'` exists in multiple namespaces: `('
|
|
235
|
+
}#{
|
|
236
|
+
list.nth(map.get($prefixed-name-data, $prefixed-name), 1)
|
|
237
|
+
}#{
|
|
238
|
+
')` and `('
|
|
239
|
+
}#{
|
|
240
|
+
$namespace
|
|
241
|
+
}#{
|
|
242
|
+
')`'
|
|
243
|
+
};
|
|
244
|
+
}
|
|
245
|
+
$prefixed-name-data: map.set($prefixed-name-data, $prefixed-name, ($namespace, $name));
|
|
246
|
+
$unprefixed-data: map.has-key($unprefixed-name-data, $name) and
|
|
247
|
+
map.get($unprefixed-name-data, $name) or
|
|
248
|
+
();
|
|
249
|
+
$unprefixed-data: list.append($unprefixed-data, ($namespace, $prefixed-name));
|
|
250
|
+
$unprefixed-name-data: map.set($unprefixed-name-data, $name, $unprefixed-data);
|
|
251
|
+
}
|
|
220
252
|
}
|
|
221
253
|
|
|
222
|
-
@
|
|
223
|
-
@
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
$
|
|
254
|
+
@each $name, $value in $overrides {
|
|
255
|
+
@if map.has-key($prefixed-name-data, $name) {
|
|
256
|
+
$data: map.get($prefixed-name-data, $name);
|
|
257
|
+
$namespace: list.nth($data, 1);
|
|
258
|
+
$name: list.nth($data, 2);
|
|
259
|
+
@include create-token-values(
|
|
260
|
+
$namespace,
|
|
261
|
+
(
|
|
262
|
+
$name: $value,
|
|
263
|
+
)
|
|
264
|
+
);
|
|
265
|
+
} @else if (map.has-key($unprefixed-name-data, $name)) {
|
|
266
|
+
$datalist: map.get($unprefixed-name-data, $name);
|
|
267
|
+
$prefixed-names: ();
|
|
268
|
+
@each $data in $datalist {
|
|
269
|
+
$namespace: list.nth($data, 1);
|
|
270
|
+
$prefixed-names: list.append($prefixed-names, list.nth($data, 2), $separator: comma);
|
|
271
|
+
@include create-token-values(
|
|
272
|
+
$namespace,
|
|
273
|
+
(
|
|
274
|
+
$name: $value,
|
|
275
|
+
)
|
|
276
|
+
);
|
|
277
|
+
}
|
|
278
|
+
@warn #{
|
|
279
|
+
'Token `'
|
|
280
|
+
}#{
|
|
281
|
+
$name
|
|
282
|
+
}#{
|
|
283
|
+
'` is deprecated. Please use one of the following alternatives: '
|
|
284
|
+
}#{
|
|
285
|
+
$prefixed-names
|
|
286
|
+
};
|
|
287
|
+
} @else {
|
|
288
|
+
@error #{'Invalid token name `'}#{$name}#{'`. '}#{'Valid tokens are: '}#{$all-names};
|
|
236
289
|
}
|
|
237
290
|
}
|
|
238
291
|
}
|
|
292
|
+
}
|
|
239
293
|
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
294
|
+
/// Filters keys with a null value out of the map.
|
|
295
|
+
/// @param {Map} $map The map to filter.
|
|
296
|
+
/// @return {Map} The given map with all of the null keys filtered out.
|
|
297
|
+
@function _filter-nulls($map) {
|
|
298
|
+
$result: ();
|
|
299
|
+
@each $key, $val in $map {
|
|
300
|
+
@if $val != null {
|
|
301
|
+
$result: map.set($result, $key, $val);
|
|
246
302
|
}
|
|
247
303
|
}
|
|
304
|
+
@return $result;
|
|
248
305
|
}
|
|
@@ -6,15 +6,19 @@
|
|
|
6
6
|
@use '../../../theming/inspection';
|
|
7
7
|
@use '../../../style/sass-utils';
|
|
8
8
|
|
|
9
|
+
$_default-size: 22px;
|
|
10
|
+
$_small-size: $_default-size - 6px;
|
|
11
|
+
$_large-size: $_default-size + 6px;
|
|
12
|
+
|
|
9
13
|
// The prefix used to generate the fully qualified name for tokens in this file.
|
|
10
14
|
$prefix: (mat, badge);
|
|
11
15
|
|
|
12
16
|
// Tokens that can't be configured through Angular Material's current theming API,
|
|
13
17
|
// but may be in a future version of the theming API.
|
|
14
18
|
@function get-unthemable-tokens() {
|
|
15
|
-
$default-size:
|
|
16
|
-
$small-size: $
|
|
17
|
-
$large-size: $
|
|
19
|
+
$default-size: $_default-size;
|
|
20
|
+
$small-size: $_small-size;
|
|
21
|
+
$large-size: $_large-size;
|
|
18
22
|
|
|
19
23
|
@return (
|
|
20
24
|
container-shape: 50%,
|
|
@@ -77,10 +81,15 @@ $prefix: (mat, badge);
|
|
|
77
81
|
|
|
78
82
|
@return (
|
|
79
83
|
text-font: inspection.get-theme-typography($theme, body-2, font-family),
|
|
84
|
+
line-height: $_default-size,
|
|
80
85
|
text-size: $base-size,
|
|
81
86
|
text-weight: 600,
|
|
87
|
+
|
|
82
88
|
small-size-text-size: $base-size * 0.75,
|
|
89
|
+
small-size-line-height: $_small-size,
|
|
90
|
+
|
|
83
91
|
large-size-text-size: $base-size * 2,
|
|
92
|
+
large-size-line-height: $_large-size,
|
|
84
93
|
);
|
|
85
94
|
}
|
|
86
95
|
|
|
@@ -32,7 +32,6 @@ $prefix: (mdc, radio);
|
|
|
32
32
|
selected-hover-state-layer-opacity: null,
|
|
33
33
|
selected-pressed-state-layer-color: null,
|
|
34
34
|
selected-pressed-state-layer-opacity: null,
|
|
35
|
-
unselected-focus-icon-color: null,
|
|
36
35
|
unselected-focus-state-layer-color: null,
|
|
37
36
|
unselected-focus-state-layer-opacity: null,
|
|
38
37
|
unselected-hover-state-layer-color: null,
|
|
@@ -52,6 +51,7 @@ $prefix: (mdc, radio);
|
|
|
52
51
|
disabled-selected-icon-color: inspection.get-theme-color($theme, foreground, icon, 1),
|
|
53
52
|
disabled-unselected-icon-color: inspection.get-theme-color($theme, foreground, icon, 1),
|
|
54
53
|
unselected-hover-icon-color: $icon-color,
|
|
54
|
+
unselected-focus-icon-color: $icon-color,
|
|
55
55
|
unselected-icon-color: inspection.get-theme-color($theme, foreground, icon, 0.54),
|
|
56
56
|
unselected-pressed-icon-color: inspection.get-theme-color($theme, foreground, icon, 0.54),
|
|
57
57
|
selected-focus-icon-color: $palette-color,
|
|
@@ -22,7 +22,7 @@ $_default: (
|
|
|
22
22
|
|
|
23
23
|
@function values($deps: $_default, $exclude-hardcoded-values: false) {
|
|
24
24
|
@return (
|
|
25
|
-
'container-color': map.get($deps, 'md-sys-color', 'surface'),
|
|
25
|
+
'container-color': map.get($deps, 'md-sys-color', 'surface-container-low'),
|
|
26
26
|
'container-elevation': map.get($deps, 'md-sys-elevation', 'level1'),
|
|
27
27
|
'container-shadow-color': map.get($deps, 'md-sys-color', 'shadow'),
|
|
28
28
|
'container-shape': map.get($deps, 'md-sys-shape', 'corner-medium'),
|
|
@@ -25,9 +25,11 @@ $prefix: (mat, badge);
|
|
|
25
25
|
small-size-text-size: token-definition.hardcode(0, $exclude-hardcoded),
|
|
26
26
|
container-shape: map.get($systems, md-sys-shape, corner-full),
|
|
27
27
|
container-size: token-definition.hardcode(16px, $exclude-hardcoded),
|
|
28
|
-
|
|
29
|
-
legacy-
|
|
28
|
+
line-height: token-definition.hardcode(16px, $exclude-hardcoded),
|
|
29
|
+
legacy-container-size: token-definition.hardcode(unset, $exclude-hardcoded),
|
|
30
|
+
legacy-small-size-container-size: token-definition.hardcode(unset, $exclude-hardcoded),
|
|
30
31
|
small-size-container-size: token-definition.hardcode(6px, $exclude-hardcoded),
|
|
32
|
+
small-size-line-height: token-definition.hardcode(6px, $exclude-hardcoded),
|
|
31
33
|
container-padding: token-definition.hardcode(0 4px, $exclude-hardcoded),
|
|
32
34
|
small-size-container-padding: token-definition.hardcode(0, $exclude-hardcoded),
|
|
33
35
|
container-offset: token-definition.hardcode(-12px 0, $exclude-hardcoded),
|
|
@@ -37,11 +39,12 @@ $prefix: (mat, badge);
|
|
|
37
39
|
|
|
38
40
|
// This size isn't in the M3 spec so we emit the same values as for `medium`.
|
|
39
41
|
large-size-container-size: token-definition.hardcode(16px, $exclude-hardcoded),
|
|
42
|
+
large-size-line-height: token-definition.hardcode(16px, $exclude-hardcoded),
|
|
40
43
|
large-size-container-offset: token-definition.hardcode(-12px 0, $exclude-hardcoded),
|
|
41
44
|
large-size-container-overlap-offset: token-definition.hardcode(-12px, $exclude-hardcoded),
|
|
42
45
|
large-size-text-size: map.get($systems, md-sys-typescale, label-small-size),
|
|
43
46
|
large-size-container-padding: token-definition.hardcode(0 4px, $exclude-hardcoded),
|
|
44
|
-
legacy-large-size-container-size: token-definition.hardcode(
|
|
47
|
+
legacy-large-size-container-size: token-definition.hardcode(unset, $exclude-hardcoded),
|
|
45
48
|
), (
|
|
46
49
|
primary: (
|
|
47
50
|
background-color: map.get($systems, md-sys-color, primary),
|
|
@@ -21,11 +21,15 @@ $calendar-weekday-table-font-size: 11px !default;
|
|
|
21
21
|
$palette-color: inspection.get-theme-color($theme, $palette-name);
|
|
22
22
|
$range-color: tokens-mat-datepicker.private-get-range-background-color($palette-color);
|
|
23
23
|
$range-tokens: tokens-mat-datepicker.get-range-color-tokens($range-color);
|
|
24
|
-
$calendar-tokens:
|
|
25
|
-
|
|
24
|
+
$calendar-tokens: tokens-mat-datepicker.private-get-calendar-color-palette-color-tokens(
|
|
25
|
+
$theme,
|
|
26
|
+
$palette-name
|
|
27
|
+
);
|
|
26
28
|
|
|
27
|
-
@include token-utils.create-token-values(
|
|
28
|
-
|
|
29
|
+
@include token-utils.create-token-values(
|
|
30
|
+
tokens-mat-datepicker.$prefix,
|
|
31
|
+
map.merge($calendar-tokens, $range-tokens)
|
|
32
|
+
);
|
|
29
33
|
}
|
|
30
34
|
|
|
31
35
|
/// Outputs base theme styles (styles not dependent on the color, typography, or density settings)
|
|
@@ -34,11 +38,12 @@ $calendar-weekday-table-font-size: 11px !default;
|
|
|
34
38
|
@mixin base($theme) {
|
|
35
39
|
@if inspection.get-theme-version($theme) == 1 {
|
|
36
40
|
@include _theme-from-tokens(inspection.get-theme-tokens($theme, base));
|
|
37
|
-
}
|
|
38
|
-
@else {
|
|
41
|
+
} @else {
|
|
39
42
|
@include sass-utils.current-selector-or-root() {
|
|
40
|
-
@include token-utils.create-token-values(
|
|
41
|
-
tokens-mat-datepicker
|
|
43
|
+
@include token-utils.create-token-values(
|
|
44
|
+
tokens-mat-datepicker.$prefix,
|
|
45
|
+
tokens-mat-datepicker.get-unthemable-tokens()
|
|
46
|
+
);
|
|
42
47
|
}
|
|
43
48
|
}
|
|
44
49
|
}
|
|
@@ -51,11 +56,12 @@ $calendar-weekday-table-font-size: 11px !default;
|
|
|
51
56
|
@mixin color($theme, $options...) {
|
|
52
57
|
@if inspection.get-theme-version($theme) == 1 {
|
|
53
58
|
@include _theme-from-tokens(inspection.get-theme-tokens($theme, color), $options...);
|
|
54
|
-
}
|
|
55
|
-
@else {
|
|
59
|
+
} @else {
|
|
56
60
|
@include sass-utils.current-selector-or-root() {
|
|
57
|
-
@include token-utils.create-token-values(
|
|
58
|
-
tokens-mat-datepicker
|
|
61
|
+
@include token-utils.create-token-values(
|
|
62
|
+
tokens-mat-datepicker.$prefix,
|
|
63
|
+
tokens-mat-datepicker.get-color-tokens($theme)
|
|
64
|
+
);
|
|
59
65
|
}
|
|
60
66
|
|
|
61
67
|
.mat-datepicker-content {
|
|
@@ -70,14 +76,18 @@ $calendar-weekday-table-font-size: 11px !default;
|
|
|
70
76
|
|
|
71
77
|
.mat-datepicker-toggle-active {
|
|
72
78
|
&.mat-accent {
|
|
73
|
-
$accent-tokens:
|
|
74
|
-
|
|
79
|
+
$accent-tokens: tokens-mat-datepicker.private-get-toggle-color-palette-color-tokens(
|
|
80
|
+
$theme,
|
|
81
|
+
accent
|
|
82
|
+
);
|
|
75
83
|
@include token-utils.create-token-values(tokens-mat-datepicker.$prefix, $accent-tokens);
|
|
76
84
|
}
|
|
77
85
|
|
|
78
86
|
&.mat-warn {
|
|
79
|
-
$warn-tokens:
|
|
80
|
-
|
|
87
|
+
$warn-tokens: tokens-mat-datepicker.private-get-toggle-color-palette-color-tokens(
|
|
88
|
+
$theme,
|
|
89
|
+
warn
|
|
90
|
+
);
|
|
81
91
|
@include token-utils.create-token-values(tokens-mat-datepicker.$prefix, $warn-tokens);
|
|
82
92
|
}
|
|
83
93
|
}
|
|
@@ -89,11 +99,12 @@ $calendar-weekday-table-font-size: 11px !default;
|
|
|
89
99
|
@mixin typography($theme) {
|
|
90
100
|
@if inspection.get-theme-version($theme) == 1 {
|
|
91
101
|
@include _theme-from-tokens(inspection.get-theme-tokens($theme, typography));
|
|
92
|
-
}
|
|
93
|
-
@else {
|
|
102
|
+
} @else {
|
|
94
103
|
@include sass-utils.current-selector-or-root() {
|
|
95
|
-
@include token-utils.create-token-values(
|
|
96
|
-
tokens-mat-datepicker
|
|
104
|
+
@include token-utils.create-token-values(
|
|
105
|
+
tokens-mat-datepicker.$prefix,
|
|
106
|
+
tokens-mat-datepicker.get-typography-tokens($theme)
|
|
107
|
+
);
|
|
97
108
|
}
|
|
98
109
|
}
|
|
99
110
|
}
|
|
@@ -103,7 +114,8 @@ $calendar-weekday-table-font-size: 11px !default;
|
|
|
103
114
|
$comparison-color: tokens-mat-datepicker.$private-default-comparison-color,
|
|
104
115
|
$overlap-color: tokens-mat-datepicker.$private-default-overlap-color,
|
|
105
116
|
$overlap-selected-color:
|
|
106
|
-
tokens-mat-datepicker.private-get-default-overlap-selected-color($overlap-color)
|
|
117
|
+
tokens-mat-datepicker.private-get-default-overlap-selected-color($overlap-color)
|
|
118
|
+
) {
|
|
107
119
|
$tokens: tokens-mat-datepicker.get-range-color-tokens(
|
|
108
120
|
$range-color: $range-color,
|
|
109
121
|
$comparison-color: $comparison-color,
|
|
@@ -121,8 +133,7 @@ $calendar-weekday-table-font-size: 11px !default;
|
|
|
121
133
|
@mixin density($theme) {
|
|
122
134
|
@if inspection.get-theme-version($theme) == 1 {
|
|
123
135
|
@include _theme-from-tokens(inspection.get-theme-tokens($theme, density));
|
|
124
|
-
}
|
|
125
|
-
@else {
|
|
136
|
+
} @else {
|
|
126
137
|
// TODO(crisbeto): move this into the structural styles
|
|
127
138
|
// once the icon button density is switched to tokens.
|
|
128
139
|
|
|
@@ -139,7 +150,10 @@ $calendar-weekday-table-font-size: 11px !default;
|
|
|
139
150
|
@mixin overrides($tokens: ()) {
|
|
140
151
|
@include token-utils.batch-create-token-values(
|
|
141
152
|
$tokens,
|
|
142
|
-
(
|
|
153
|
+
(
|
|
154
|
+
namespace: tokens-mat-datepicker.$prefix,
|
|
155
|
+
tokens: tokens-mat-datepicker.get-token-slots(),
|
|
156
|
+
)
|
|
143
157
|
);
|
|
144
158
|
}
|
|
145
159
|
|
|
@@ -152,8 +166,7 @@ $calendar-weekday-table-font-size: 11px !default;
|
|
|
152
166
|
@include theming.private-check-duplicate-theme-styles($theme, 'mat-datepicker') {
|
|
153
167
|
@if inspection.get-theme-version($theme) == 1 {
|
|
154
168
|
@include _theme-from-tokens(inspection.get-theme-tokens($theme), $options...);
|
|
155
|
-
}
|
|
156
|
-
@else {
|
|
169
|
+
} @else {
|
|
157
170
|
@include base($theme);
|
|
158
171
|
@if inspection.theme-has($theme, color) {
|
|
159
172
|
@include color($theme);
|
|
@@ -170,8 +183,12 @@ $calendar-weekday-table-font-size: 11px !default;
|
|
|
170
183
|
|
|
171
184
|
@mixin _theme-from-tokens($tokens, $options...) {
|
|
172
185
|
@include validation.selector-defined(
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
186
|
+
'Calls to Angular Material theme mixins with an M3 theme must be wrapped in a selector'
|
|
187
|
+
);
|
|
188
|
+
$mat-datepicker-tokens: token-utils.get-tokens-for(
|
|
189
|
+
$tokens,
|
|
190
|
+
tokens-mat-datepicker.$prefix,
|
|
191
|
+
$options...
|
|
192
|
+
);
|
|
176
193
|
@include token-utils.create-token-values(tokens-mat-datepicker.$prefix, $mat-datepicker-tokens);
|
|
177
194
|
}
|
package/datepicker/index.d.ts
CHANGED
|
@@ -825,7 +825,7 @@ declare abstract class MatDatepickerBase<C extends MatDatepickerControl<D>, S, D
|
|
|
825
825
|
/** Gets an observable that will emit when the overlay is supposed to be closed. */
|
|
826
826
|
private _getCloseStream;
|
|
827
827
|
static ɵfac: i0.ɵɵFactoryDeclaration<MatDatepickerBase<any, any, any>, never>;
|
|
828
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<MatDatepickerBase<any, any, any>, never, never, { "calendarHeaderComponent": { "alias": "calendarHeaderComponent"; "required": false; }; "startAt": { "alias": "startAt"; "required": false; }; "startView": { "alias": "startView"; "required": false; }; "color": { "alias": "color"; "required": false; }; "touchUi": { "alias": "touchUi"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "xPosition": { "alias": "xPosition"; "required": false; }; "yPosition": { "alias": "yPosition"; "required": false; }; "restoreFocus": { "alias": "restoreFocus"; "required": false; }; "dateClass": { "alias": "dateClass"; "required": false; }; "panelClass": { "alias": "panelClass"; "required": false; }; "opened": { "alias": "opened"; "required": false; }; }, { "yearSelected": "yearSelected"; "monthSelected": "monthSelected"; "viewChanged": "viewChanged"; "openedStream": "opened"; "closedStream": "closed"; }, never, never,
|
|
828
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<MatDatepickerBase<any, any, any>, never, never, { "calendarHeaderComponent": { "alias": "calendarHeaderComponent"; "required": false; }; "startAt": { "alias": "startAt"; "required": false; }; "startView": { "alias": "startView"; "required": false; }; "color": { "alias": "color"; "required": false; }; "touchUi": { "alias": "touchUi"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "xPosition": { "alias": "xPosition"; "required": false; }; "yPosition": { "alias": "yPosition"; "required": false; }; "restoreFocus": { "alias": "restoreFocus"; "required": false; }; "dateClass": { "alias": "dateClass"; "required": false; }; "panelClass": { "alias": "panelClass"; "required": false; }; "opened": { "alias": "opened"; "required": false; }; }, { "yearSelected": "yearSelected"; "monthSelected": "monthSelected"; "viewChanged": "viewChanged"; "openedStream": "opened"; "closedStream": "closed"; }, never, never, true, never>;
|
|
829
829
|
static ngAcceptInputType_touchUi: unknown;
|
|
830
830
|
static ngAcceptInputType_disabled: unknown;
|
|
831
831
|
static ngAcceptInputType_restoreFocus: unknown;
|
|
@@ -11,14 +11,17 @@
|
|
|
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(
|
|
19
|
-
tokens-mdc-dialog.$prefix,
|
|
18
|
+
tokens-mdc-dialog.$prefix,
|
|
19
|
+
tokens-mdc-dialog.get-unthemable-tokens()
|
|
20
|
+
);
|
|
20
21
|
@include token-utils.create-token-values(
|
|
21
|
-
tokens-mat-dialog.$prefix,
|
|
22
|
+
tokens-mat-dialog.$prefix,
|
|
23
|
+
tokens-mat-dialog.get-unthemable-tokens()
|
|
24
|
+
);
|
|
22
25
|
}
|
|
23
26
|
}
|
|
24
27
|
}
|
|
@@ -26,13 +29,16 @@
|
|
|
26
29
|
@mixin color($theme) {
|
|
27
30
|
@if inspection.get-theme-version($theme) == 1 {
|
|
28
31
|
@include _theme-from-tokens(inspection.get-theme-tokens($theme, color));
|
|
29
|
-
}
|
|
30
|
-
@else {
|
|
32
|
+
} @else {
|
|
31
33
|
@include sass-utils.current-selector-or-root() {
|
|
32
34
|
@include token-utils.create-token-values(
|
|
33
|
-
tokens-mdc-dialog.$prefix,
|
|
35
|
+
tokens-mdc-dialog.$prefix,
|
|
36
|
+
tokens-mdc-dialog.get-color-tokens($theme)
|
|
37
|
+
);
|
|
34
38
|
@include token-utils.create-token-values(
|
|
35
|
-
tokens-mat-dialog.$prefix,
|
|
39
|
+
tokens-mat-dialog.$prefix,
|
|
40
|
+
tokens-mat-dialog.get-color-tokens($theme)
|
|
41
|
+
);
|
|
36
42
|
}
|
|
37
43
|
}
|
|
38
44
|
}
|
|
@@ -40,13 +46,16 @@
|
|
|
40
46
|
@mixin typography($theme) {
|
|
41
47
|
@if inspection.get-theme-version($theme) == 1 {
|
|
42
48
|
@include _theme-from-tokens(inspection.get-theme-tokens($theme, typography));
|
|
43
|
-
}
|
|
44
|
-
@else {
|
|
49
|
+
} @else {
|
|
45
50
|
@include sass-utils.current-selector-or-root() {
|
|
46
51
|
@include token-utils.create-token-values(
|
|
47
|
-
tokens-mdc-dialog.$prefix,
|
|
52
|
+
tokens-mdc-dialog.$prefix,
|
|
53
|
+
tokens-mdc-dialog.get-typography-tokens($theme)
|
|
54
|
+
);
|
|
48
55
|
@include token-utils.create-token-values(
|
|
49
|
-
tokens-mat-dialog.$prefix,
|
|
56
|
+
tokens-mat-dialog.$prefix,
|
|
57
|
+
tokens-mat-dialog.get-typography-tokens($theme)
|
|
58
|
+
);
|
|
50
59
|
}
|
|
51
60
|
}
|
|
52
61
|
}
|
|
@@ -54,15 +63,21 @@
|
|
|
54
63
|
@mixin density($theme) {
|
|
55
64
|
@if inspection.get-theme-version($theme) == 1 {
|
|
56
65
|
@include _theme-from-tokens(inspection.get-theme-tokens($theme, density));
|
|
66
|
+
} @else {
|
|
57
67
|
}
|
|
58
|
-
@else {}
|
|
59
68
|
}
|
|
60
69
|
|
|
61
70
|
@mixin overrides($tokens: ()) {
|
|
62
71
|
@include token-utils.batch-create-token-values(
|
|
63
72
|
$tokens,
|
|
64
|
-
(
|
|
65
|
-
|
|
73
|
+
(
|
|
74
|
+
namespace: tokens-mdc-dialog.$prefix,
|
|
75
|
+
tokens: tokens-mdc-dialog.get-token-slots(),
|
|
76
|
+
),
|
|
77
|
+
(
|
|
78
|
+
namespace: tokens-mat-dialog.$prefix,
|
|
79
|
+
tokens: tokens-mat-dialog.get-token-slots(),
|
|
80
|
+
)
|
|
66
81
|
);
|
|
67
82
|
}
|
|
68
83
|
|
|
@@ -70,8 +85,7 @@
|
|
|
70
85
|
@include theming.private-check-duplicate-theme-styles($theme, 'mat-dialog') {
|
|
71
86
|
@if inspection.get-theme-version($theme) == 1 {
|
|
72
87
|
@include _theme-from-tokens(inspection.get-theme-tokens($theme));
|
|
73
|
-
}
|
|
74
|
-
@else {
|
|
88
|
+
} @else {
|
|
75
89
|
@include base($theme);
|
|
76
90
|
@if inspection.theme-has($theme, color) {
|
|
77
91
|
@include color($theme);
|
|
@@ -88,11 +102,16 @@
|
|
|
88
102
|
|
|
89
103
|
@mixin _theme-from-tokens($tokens) {
|
|
90
104
|
@include validation.selector-defined(
|
|
91
|
-
|
|
105
|
+
'Calls to Angular Material theme mixins with an M3 theme must be wrapped in a selector'
|
|
106
|
+
);
|
|
92
107
|
@if ($tokens != ()) {
|
|
93
108
|
@include token-utils.create-token-values(
|
|
94
|
-
tokens-mdc-dialog.$prefix,
|
|
109
|
+
tokens-mdc-dialog.$prefix,
|
|
110
|
+
map.get($tokens, tokens-mdc-dialog.$prefix)
|
|
111
|
+
);
|
|
95
112
|
@include token-utils.create-token-values(
|
|
96
|
-
tokens-mat-dialog.$prefix,
|
|
113
|
+
tokens-mat-dialog.$prefix,
|
|
114
|
+
map.get($tokens, tokens-mat-dialog.$prefix)
|
|
115
|
+
);
|
|
97
116
|
}
|
|
98
117
|
}
|
|
@@ -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
|
-
|
|
15
|
+
tokens-mat-divider.$prefix,
|
|
16
|
+
tokens-mat-divider.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(
|
|
28
|
-
tokens-mat-divider
|
|
27
|
+
@include token-utils.create-token-values(
|
|
28
|
+
tokens-mat-divider.$prefix,
|
|
29
|
+
tokens-mat-divider.get-color-tokens($theme)
|
|
30
|
+
);
|
|
29
31
|
}
|
|
30
32
|
}
|
|
31
33
|
}
|
|
@@ -33,21 +35,24 @@
|
|
|
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
49
|
@mixin overrides($tokens: ()) {
|
|
48
50
|
@include token-utils.batch-create-token-values(
|
|
49
51
|
$tokens,
|
|
50
|
-
(
|
|
52
|
+
(
|
|
53
|
+
namespace: tokens-mat-divider.$prefix,
|
|
54
|
+
tokens: tokens-mat-divider.get-token-slots(),
|
|
55
|
+
)
|
|
51
56
|
);
|
|
52
57
|
}
|
|
53
58
|
|
|
@@ -55,8 +60,7 @@
|
|
|
55
60
|
@include theming.private-check-duplicate-theme-styles($theme, 'mat-divider') {
|
|
56
61
|
@if inspection.get-theme-version($theme) == 1 {
|
|
57
62
|
@include _theme-from-tokens(inspection.get-theme-tokens($theme));
|
|
58
|
-
}
|
|
59
|
-
@else {
|
|
63
|
+
} @else {
|
|
60
64
|
@include base($theme);
|
|
61
65
|
@if inspection.theme-has($theme, color) {
|
|
62
66
|
@include color($theme);
|
|
@@ -73,9 +77,12 @@
|
|
|
73
77
|
|
|
74
78
|
@mixin _theme-from-tokens($tokens) {
|
|
75
79
|
@include validation.selector-defined(
|
|
76
|
-
|
|
80
|
+
'Calls to Angular Material theme mixins with an M3 theme must be wrapped in a selector'
|
|
81
|
+
);
|
|
77
82
|
@if ($tokens != ()) {
|
|
78
83
|
@include token-utils.create-token-values(
|
|
79
|
-
|
|
84
|
+
tokens-mat-divider.$prefix,
|
|
85
|
+
map.get($tokens, tokens-mat-divider.$prefix)
|
|
86
|
+
);
|
|
80
87
|
}
|
|
81
88
|
}
|