@angular/material 20.1.0-next.0 → 20.1.0-next.1
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/autocomplete/_m2-autocomplete.scss +5 -2
- package/bottom-sheet/_m2-bottom-sheet.scss +6 -2
- package/button/_m2-button.scss +39 -34
- package/button/_m2-fab.scss +14 -10
- package/button/_m2-icon-button.scss +7 -5
- package/card/_m2-card.scss +1 -1
- package/checkbox/_m2-checkbox.scss +2 -3
- package/chips/_m2-chip.scss +6 -23
- package/core/m2/_theming.scss +72 -108
- package/core/option/_m2-optgroup.scss +4 -1
- package/core/option/_m2-option.scss +7 -6
- package/core/ripple/_m2-ripple.scss +6 -10
- package/core/selection/pseudo-checkbox/_m2-pseudo-checkbox.scss +2 -3
- package/core/tokens/_m2-utils.scss +1 -11
- package/core/tokens/_m3-system.scss +11 -9
- package/datepicker/_datepicker-theme.scss +16 -54
- package/datepicker/_m2-datepicker.scss +26 -109
- package/datepicker/index.d.ts +1 -1
- package/dialog/_m2-dialog.scss +6 -4
- package/divider/_m2-divider.scss +4 -2
- package/fesm2022/button.mjs +2 -2
- package/fesm2022/button.mjs.map +1 -1
- package/fesm2022/core.mjs +1 -1
- package/fesm2022/core.mjs.map +1 -1
- package/fesm2022/datepicker.mjs.map +1 -1
- package/fesm2022/slider.mjs +2 -2
- package/fesm2022/slider.mjs.map +1 -1
- package/form-field/_m2-form-field.scss +2 -2
- package/list/_m2-list.scss +5 -9
- package/menu/_m2-menu.scss +12 -9
- package/package.json +2 -2
- package/paginator/_m2-paginator.scss +2 -1
- 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/radio/_m3-radio.scss +1 -1
- package/schematics/ng-add/index.js +1 -1
- package/select/_m2-select.scss +4 -3
- package/select/_select-theme.scss +6 -3
- package/slider/_m2-slider.scss +27 -26
- package/slider/_slider-theme.scss +2 -2
- package/snack-bar/_m2-snack-bar.scss +0 -1
- package/sort/_m2-sort.scss +5 -2
- package/table/_m2-table.scss +7 -5
- package/tabs/_m2-tabs.scss +5 -11
- package/timepicker/_m2-timepicker.scss +5 -2
- package/toolbar/_m2-toolbar.scss +4 -2
- package/tree/_m2-tree.scss +5 -2
|
@@ -13,15 +13,14 @@
|
|
|
13
13
|
@function get-color-tokens($theme, $color-variant) {
|
|
14
14
|
$is-dark: inspection.get-theme-type($theme) == dark;
|
|
15
15
|
$disabled-color: if($is-dark, #686868, #b0b0b0);
|
|
16
|
-
$checkmark-color: inspection.get-theme-color($theme, system, background);
|
|
17
16
|
$system: m2-utils.get-system($theme);
|
|
18
17
|
$system: m3-utils.replace-colors-with-variant($system, secondary, $color-variant);
|
|
19
18
|
|
|
20
19
|
@return (
|
|
21
20
|
pseudo-checkbox-full-selected-icon-color: map.get($system, secondary),
|
|
22
|
-
pseudo-checkbox-full-selected-checkmark-color: $
|
|
21
|
+
pseudo-checkbox-full-selected-checkmark-color: map.get($system, background),
|
|
23
22
|
pseudo-checkbox-full-unselected-icon-color: map.get($system, on-surface-variant),
|
|
24
|
-
pseudo-checkbox-full-disabled-selected-checkmark-color: $
|
|
23
|
+
pseudo-checkbox-full-disabled-selected-checkmark-color: map.get($system, background),
|
|
25
24
|
pseudo-checkbox-full-disabled-unselected-icon-color: $disabled-color,
|
|
26
25
|
pseudo-checkbox-full-disabled-selected-icon-color: $disabled-color,
|
|
27
26
|
pseudo-checkbox-minimal-selected-checkmark-color: map.get($system, secondary),
|
|
@@ -8,17 +8,7 @@ $private-is-internal-build: false;
|
|
|
8
8
|
|
|
9
9
|
// Gets the theme's system values as a flat map.
|
|
10
10
|
@function get-system($theme) {
|
|
11
|
-
$system: map.get($theme, _mat-
|
|
12
|
-
@if $system {
|
|
13
|
-
@return $system;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
$system: map.get($theme, system);
|
|
17
|
-
@if $system {
|
|
18
|
-
@return $system;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
$system: map.get($theme, color, system);
|
|
11
|
+
$system: map.get($theme, _mat-system);
|
|
22
12
|
@if $system {
|
|
23
13
|
@return $system;
|
|
24
14
|
}
|
|
@@ -19,6 +19,7 @@
|
|
|
19
19
|
@use '../theming/config-validation';
|
|
20
20
|
@use '../theming/definition';
|
|
21
21
|
@use '../theming/palettes';
|
|
22
|
+
@use '../style/sass-utils';
|
|
22
23
|
@use './m3';
|
|
23
24
|
@use 'sass:map';
|
|
24
25
|
@use 'sass:meta';
|
|
@@ -196,7 +197,7 @@
|
|
|
196
197
|
m3.md-sys-shape-values(),
|
|
197
198
|
m3.md-sys-state-values());
|
|
198
199
|
|
|
199
|
-
|
|
200
|
+
@include sass-utils.current-selector-or-root {
|
|
200
201
|
@each $name, $value in $overrides {
|
|
201
202
|
@if (map.has-key($sys-names, $name)) {
|
|
202
203
|
--#{$prefix}-#{$name}: #{map.get($overrides, $name)};
|
|
@@ -222,7 +223,7 @@
|
|
|
222
223
|
$sys-colors: map.set($sys-colors, neutral-variant20, map.get($palettes, neutral-variant, 20));
|
|
223
224
|
$sys-colors: map.set($sys-colors, neutral10, map.get($palettes, neutral, 10));
|
|
224
225
|
|
|
225
|
-
|
|
226
|
+
@include sass-utils.current-selector-or-root {
|
|
226
227
|
@each $name, $value in $sys-colors {
|
|
227
228
|
--#{$prefix}-#{$name}: #{map.get($overrides, $name) or $value};
|
|
228
229
|
}
|
|
@@ -261,7 +262,7 @@
|
|
|
261
262
|
typography-system-variables-prefix) or definition.$system-level-prefix;
|
|
262
263
|
}
|
|
263
264
|
|
|
264
|
-
|
|
265
|
+
@include sass-utils.current-selector-or-root {
|
|
265
266
|
@each $name, $value in m3.md-sys-typescale-values($font-definition) {
|
|
266
267
|
--#{$prefix}-#{$name}: #{map.get($overrides, $name) or $value};
|
|
267
268
|
}
|
|
@@ -272,17 +273,18 @@
|
|
|
272
273
|
$shadow-color: map.get(
|
|
273
274
|
$theme, definition.$internals, palettes, neutral, 0);
|
|
274
275
|
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
$value
|
|
278
|
-
|
|
276
|
+
|
|
277
|
+
@include sass-utils.current-selector-or-root {
|
|
278
|
+
@each $name, $value in m3.md-sys-elevation-values() {
|
|
279
|
+
$level: map.get($overrides, $name) or $value;
|
|
280
|
+
$value: elevation.get-box-shadow($level, $shadow-color);
|
|
279
281
|
--#{$prefix}-#{$name}: #{$value};
|
|
280
282
|
}
|
|
281
283
|
}
|
|
282
284
|
}
|
|
283
285
|
|
|
284
286
|
@mixin system-level-shape($theme: (), $overrides: (), $prefix: definition.$system-level-prefix) {
|
|
285
|
-
|
|
287
|
+
@include sass-utils.current-selector-or-root {
|
|
286
288
|
@each $name, $value in m3.md-sys-shape-values() {
|
|
287
289
|
--#{$prefix}-#{$name}: #{map.get($overrides, $name) or $value};
|
|
288
290
|
}
|
|
@@ -290,7 +292,7 @@
|
|
|
290
292
|
}
|
|
291
293
|
|
|
292
294
|
@mixin system-level-state($theme: (), $overrides: (), $prefix: definition.$system-level-prefix) {
|
|
293
|
-
|
|
295
|
+
@include sass-utils.current-selector-or-root {
|
|
294
296
|
@each $name, $value in m3.md-sys-state-values() {
|
|
295
297
|
--#{$prefix}-#{$name}: #{map.get($overrides, $name) or $value};
|
|
296
298
|
}
|
|
@@ -8,30 +8,6 @@
|
|
|
8
8
|
@use '../core/style/sass-utils';
|
|
9
9
|
@use '../core/typography/typography';
|
|
10
10
|
@use '../button/icon-button-theme';
|
|
11
|
-
@use '../core/tokens/m2-utils';
|
|
12
|
-
@use '../core/tokens/m3-utils';
|
|
13
|
-
|
|
14
|
-
// TODO(crisbeto): these variables aren't used anymore and should be removed.
|
|
15
|
-
$selected-today-box-shadow-width: 1px;
|
|
16
|
-
$selected-fade-amount: 0.6;
|
|
17
|
-
$range-fade-amount: 0.2;
|
|
18
|
-
$today-fade-amount: 0.2;
|
|
19
|
-
$calendar-body-font-size: 13px !default;
|
|
20
|
-
$calendar-weekday-table-font-size: 11px !default;
|
|
21
|
-
|
|
22
|
-
@mixin _calendar-color($theme, $color-variant) {
|
|
23
|
-
$system: m2-utils.get-system($theme);
|
|
24
|
-
$system: m3-utils.replace-colors-with-variant($system, primary, $color-variant);
|
|
25
|
-
|
|
26
|
-
$range-color: m2-datepicker.private-get-range-background-color(map.get($system, primary));
|
|
27
|
-
$range-tokens: m2-datepicker.get-range-color-tokens($range-color);
|
|
28
|
-
$calendar-tokens: m2-datepicker.private-get-calendar-color-palette-color-tokens(
|
|
29
|
-
$theme,
|
|
30
|
-
$color-variant
|
|
31
|
-
);
|
|
32
|
-
|
|
33
|
-
@include token-utils.create-token-values-mixed(map.merge($calendar-tokens, $range-tokens));
|
|
34
|
-
}
|
|
35
11
|
|
|
36
12
|
/// Outputs base theme styles (styles not dependent on the color, typography, or density settings)
|
|
37
13
|
/// for the mat-datepicker.
|
|
@@ -55,28 +31,19 @@ $calendar-weekday-table-font-size: 11px !default;
|
|
|
55
31
|
map.get(m3-datepicker.get-tokens($theme, $color-variant), color));
|
|
56
32
|
} @else {
|
|
57
33
|
@include sass-utils.current-selector-or-root() {
|
|
58
|
-
@include token-utils.create-token-values-mixed(
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
.mat-datepicker-content {
|
|
62
|
-
&.mat-accent {
|
|
63
|
-
@include _calendar-color($theme, secondary);
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
&.mat-warn {
|
|
67
|
-
@include _calendar-color($theme, error);
|
|
68
|
-
}
|
|
34
|
+
@include token-utils.create-token-values-mixed(
|
|
35
|
+
m2-datepicker.get-color-tokens($theme, primary));
|
|
69
36
|
}
|
|
70
37
|
|
|
71
|
-
.mat-datepicker-toggle-active {
|
|
38
|
+
.mat-datepicker-content, .mat-datepicker-toggle-active {
|
|
72
39
|
&.mat-accent {
|
|
73
|
-
|
|
74
|
-
|
|
40
|
+
@include token-utils.create-token-values-mixed(
|
|
41
|
+
m2-datepicker.get-color-tokens($theme, secondary));
|
|
75
42
|
}
|
|
76
43
|
|
|
77
44
|
&.mat-warn {
|
|
78
|
-
|
|
79
|
-
|
|
45
|
+
@include token-utils.create-token-values-mixed(
|
|
46
|
+
m2-datepicker.get-color-tokens($theme, error));
|
|
80
47
|
}
|
|
81
48
|
}
|
|
82
49
|
}
|
|
@@ -96,21 +63,16 @@ $calendar-weekday-table-font-size: 11px !default;
|
|
|
96
63
|
|
|
97
64
|
@mixin date-range-colors(
|
|
98
65
|
$range-color,
|
|
99
|
-
$comparison-color:
|
|
100
|
-
$overlap-color:
|
|
101
|
-
$overlap-selected-color:
|
|
102
|
-
m2-datepicker.private-get-default-overlap-selected-color($overlap-color)
|
|
66
|
+
$comparison-color: rgba(#f9ab00, 0.2),
|
|
67
|
+
$overlap-color: #a8dab5,
|
|
68
|
+
$overlap-selected-color: color.adjust($overlap-color, $lightness: -30%)
|
|
103
69
|
) {
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
);
|
|
110
|
-
|
|
111
|
-
@include sass-utils.current-selector-or-root() {
|
|
112
|
-
@include token-utils.create-token-values-mixed($tokens);
|
|
113
|
-
}
|
|
70
|
+
@include overrides((
|
|
71
|
+
calendar-date-in-range-state-background-color: $range-color,
|
|
72
|
+
calendar-date-in-comparison-range-state-background-color: $comparison-color,
|
|
73
|
+
calendar-date-in-overlap-range-state-background-color: $overlap-color,
|
|
74
|
+
calendar-date-in-overlap-range-selected-state-background-color: $overlap-selected-color,
|
|
75
|
+
));
|
|
114
76
|
}
|
|
115
77
|
|
|
116
78
|
/// Outputs density theme styles for the mat-datepicker.
|
|
@@ -1,32 +1,10 @@
|
|
|
1
1
|
@use 'sass:color';
|
|
2
|
-
@use 'sass:meta';
|
|
3
|
-
@use 'sass:math';
|
|
4
2
|
@use '../core/theming/inspection';
|
|
5
3
|
@use '../core/style/elevation';
|
|
6
|
-
@use '../core/style/sass-utils';
|
|
7
4
|
@use '../core/tokens/m3-utils';
|
|
8
5
|
@use '../core/tokens/m2-utils';
|
|
9
6
|
@use 'sass:map';
|
|
10
7
|
|
|
11
|
-
$_selected-fade-amount: 0.6;
|
|
12
|
-
$_today-fade-amount: 0.2;
|
|
13
|
-
|
|
14
|
-
// Utility that produces a range background color from a specific color.
|
|
15
|
-
@function private-get-range-background-color($color) {
|
|
16
|
-
@return rgba($color, 0.2);
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
// Utility that produces the overlap selected color from an overlap color.
|
|
20
|
-
@function private-get-default-overlap-selected-color($overlap-color) {
|
|
21
|
-
@return color.adjust($overlap-color, $lightness: -30%);
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
// Default range comparison color.
|
|
25
|
-
$private-default-comparison-color: private-get-range-background-color(#f9ab00);
|
|
26
|
-
|
|
27
|
-
// Default range overlap color.
|
|
28
|
-
$private-default-overlap-color: #a8dab5;
|
|
29
|
-
|
|
30
8
|
// Tokens that can't be configured through Angular Material's current theming API,
|
|
31
9
|
// but may be in a future version of the theming API.
|
|
32
10
|
@function get-unthemable-tokens() {
|
|
@@ -39,61 +17,50 @@ $private-default-overlap-color: #a8dab5;
|
|
|
39
17
|
}
|
|
40
18
|
|
|
41
19
|
// Tokens that can be configured through Angular Material's color theming API.
|
|
42
|
-
@function get-color-tokens($theme) {
|
|
20
|
+
@function get-color-tokens($theme, $color-variant) {
|
|
43
21
|
$system: m2-utils.get-system($theme);
|
|
44
|
-
|
|
45
|
-
$inactive-icon-color: inspection.get-theme-color($theme, foreground, icon);
|
|
22
|
+
$system: m3-utils.replace-colors-with-variant($system, primary, $color-variant);
|
|
46
23
|
$disabled: m3-utils.color-with-opacity(map.get($system, on-surface), 38%);
|
|
47
|
-
$hint-text-color: inspection.get-theme-color($theme, foreground, hint-text);
|
|
48
|
-
$preview-outline-color: map.get($system, outline);
|
|
49
|
-
$today-disabled-outline-color: null;
|
|
50
|
-
$is-dark: inspection.get-theme-type($theme) == dark;
|
|
51
|
-
$system: m2-utils.get-system($theme);
|
|
52
|
-
|
|
53
|
-
$primary-color: map.get($system, primary);
|
|
54
|
-
$range-tokens: get-range-color-tokens(private-get-range-background-color($primary-color));
|
|
55
|
-
$calendar-tokens: private-get-calendar-color-palette-color-tokens($theme, primary);
|
|
56
|
-
$toggle-tokens: private-get-toggle-color-palette-color-tokens($theme, primary);
|
|
57
|
-
|
|
58
|
-
// The divider color is set under the assumption that it'll be used
|
|
59
|
-
// for a solid border, but because we're using a dashed border for the
|
|
60
|
-
// preview range, we need to bump its opacity to ensure that it's visible.
|
|
61
|
-
@if meta.type-of($preview-outline-color) == color {
|
|
62
|
-
$preview-outline-opacity: math.min(color.opacity($preview-outline-color) * 2, 1);
|
|
63
|
-
$preview-outline-color: rgba($preview-outline-color, $preview-outline-opacity);
|
|
64
|
-
}
|
|
65
24
|
|
|
66
|
-
@
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
25
|
+
@return (
|
|
26
|
+
datepicker-calendar-date-in-range-state-background-color:
|
|
27
|
+
m3-utils.color-with-opacity(map.get($system, primary), 20%),
|
|
28
|
+
datepicker-calendar-date-in-comparison-range-state-background-color:
|
|
29
|
+
m3-utils.color-with-opacity(map.get($system, secondary), 20%),
|
|
30
|
+
datepicker-calendar-date-in-overlap-range-state-background-color: #a8dab5,
|
|
31
|
+
datepicker-calendar-date-in-overlap-range-selected-state-background-color:
|
|
32
|
+
color.adjust(#a8dab5, $lightness: -30%),
|
|
33
|
+
datepicker-calendar-date-selected-state-text-color: map.get($system, on-primary),
|
|
34
|
+
datepicker-calendar-date-selected-state-background-color: map.get($system, primary),
|
|
35
|
+
datepicker-calendar-date-selected-disabled-state-background-color:
|
|
36
|
+
m3-utils.color-with-opacity(map.get($system, primary), 38%),
|
|
37
|
+
datepicker-calendar-date-today-selected-state-outline-color: map.get($system, on-primary),
|
|
38
|
+
datepicker-calendar-date-focus-state-background-color: m3-utils.color-with-opacity(
|
|
39
|
+
map.get($system, primary), map.get($system, focus-state-layer-opacity)),
|
|
40
|
+
datepicker-calendar-date-hover-state-background-color: m3-utils.color-with-opacity(
|
|
41
|
+
map.get($system, primary), map.get($system, hover-state-layer-opacity)),
|
|
42
|
+
|
|
43
|
+
datepicker-toggle-active-state-icon-color: map.get($system, primary),
|
|
74
44
|
datepicker-toggle-icon-color: map.get($system, on-surface-variant),
|
|
75
45
|
datepicker-calendar-body-label-text-color: map.get($system, on-surface-variant),
|
|
76
|
-
datepicker-calendar-period-button-text-color:
|
|
77
|
-
inspection.get-theme-color($theme, foreground, base),
|
|
46
|
+
datepicker-calendar-period-button-text-color: map.get($system, on-surface),
|
|
78
47
|
datepicker-calendar-period-button-icon-color: map.get($system, on-surface-variant),
|
|
79
48
|
datepicker-calendar-navigation-button-icon-color: map.get($system, on-surface-variant),
|
|
80
49
|
datepicker-calendar-header-divider-color: map.get($system, outline),
|
|
81
50
|
datepicker-calendar-header-text-color: map.get($system, on-surface-variant),
|
|
82
51
|
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
datepicker-calendar-date-today-outline-color: $hint-text-color,
|
|
86
|
-
datepicker-calendar-date-today-disabled-state-outline-color: $today-disabled-outline-color,
|
|
52
|
+
datepicker-calendar-date-today-outline-color: map.get($system, on-surface-variant),
|
|
53
|
+
datepicker-calendar-date-today-disabled-state-outline-color: $disabled,
|
|
87
54
|
datepicker-calendar-date-text-color: map.get($system, on-surface),
|
|
88
55
|
datepicker-calendar-date-outline-color: transparent,
|
|
89
56
|
datepicker-calendar-date-disabled-state-text-color: $disabled,
|
|
90
|
-
datepicker-calendar-date-preview-state-outline-color: $
|
|
57
|
+
datepicker-calendar-date-preview-state-outline-color: map.get($system, on-surface-variant),
|
|
91
58
|
datepicker-range-input-separator-color: map.get($system, on-surface),
|
|
92
59
|
datepicker-range-input-disabled-state-separator-color: $disabled,
|
|
93
60
|
datepicker-range-input-disabled-state-text-color: $disabled,
|
|
94
61
|
datepicker-calendar-container-background-color: map.get($system, surface),
|
|
95
62
|
datepicker-calendar-container-text-color: map.get($system, on-surface),
|
|
96
|
-
)
|
|
63
|
+
);
|
|
97
64
|
}
|
|
98
65
|
|
|
99
66
|
// Tokens that can be configured through Angular Material's typography theming API.
|
|
@@ -122,56 +89,6 @@ $private-default-overlap-color: #a8dab5;
|
|
|
122
89
|
);
|
|
123
90
|
}
|
|
124
91
|
|
|
125
|
-
// Gets the tokens map that can be used to override the range colors.
|
|
126
|
-
@function get-range-color-tokens(
|
|
127
|
-
$range-color,
|
|
128
|
-
$comparison-color: $private-default-comparison-color,
|
|
129
|
-
$overlap-color: $private-default-overlap-color,
|
|
130
|
-
$overlap-selected-color: private-get-default-overlap-selected-color($overlap-color)) {
|
|
131
|
-
|
|
132
|
-
@return (
|
|
133
|
-
datepicker-calendar-date-in-range-state-background-color: $range-color,
|
|
134
|
-
datepicker-calendar-date-in-comparison-range-state-background-color: $comparison-color,
|
|
135
|
-
datepicker-calendar-date-in-overlap-range-state-background-color: $overlap-color,
|
|
136
|
-
datepicker-calendar-date-in-overlap-range-selected-state-background-color:
|
|
137
|
-
$overlap-selected-color,
|
|
138
|
-
);
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
@function private-get-calendar-color-palette-color-tokens($theme, $color-variant) {
|
|
142
|
-
$system: m2-utils.get-system($theme);
|
|
143
|
-
$system: m3-utils.replace-colors-with-variant($system, primary, $color-variant);
|
|
144
|
-
|
|
145
|
-
$palette-color: map.get($system, primary);
|
|
146
|
-
$default-contrast: map.get($system, on-primary);
|
|
147
|
-
$active-background-color: m3-utils.color-with-opacity(map.get($system, primary), 30%);
|
|
148
|
-
$active-disabled-color: null;
|
|
149
|
-
|
|
150
|
-
@if (meta.type-of($palette-color) == color) {
|
|
151
|
-
$active-disabled-color: color.adjust($palette-color, $alpha: -$_selected-fade-amount);
|
|
152
|
-
}
|
|
153
|
-
@else {
|
|
154
|
-
$active-disabled-color: m3-utils.color-with-opacity(map.get($system, on-surface), 38%);
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
@return (
|
|
158
|
-
datepicker-calendar-date-selected-state-text-color: $default-contrast,
|
|
159
|
-
datepicker-calendar-date-selected-state-background-color: $palette-color,
|
|
160
|
-
datepicker-calendar-date-selected-disabled-state-background-color: $active-disabled-color,
|
|
161
|
-
datepicker-calendar-date-today-selected-state-outline-color: $default-contrast,
|
|
162
|
-
datepicker-calendar-date-focus-state-background-color: $active-background-color,
|
|
163
|
-
datepicker-calendar-date-hover-state-background-color: $active-background-color,
|
|
164
|
-
);
|
|
165
|
-
}
|
|
166
|
-
|
|
167
|
-
@function private-get-toggle-color-palette-color-tokens($theme, $palette-name) {
|
|
168
|
-
@return (
|
|
169
|
-
datepicker-toggle-active-state-icon-color:
|
|
170
|
-
inspection.get-theme-color($theme, $palette-name, text),
|
|
171
|
-
);
|
|
172
|
-
}
|
|
173
|
-
|
|
174
|
-
|
|
175
92
|
// Tokens that can be configured through Angular Material's density theming API.
|
|
176
93
|
@function get-density-tokens($theme) {
|
|
177
94
|
@return ();
|
package/datepicker/index.d.ts
CHANGED
|
@@ -1127,7 +1127,7 @@ interface MatDatepickerControl<D> {
|
|
|
1127
1127
|
getOverlayLabelId(): string | null;
|
|
1128
1128
|
stateChanges: Observable<void>;
|
|
1129
1129
|
}
|
|
1130
|
-
/** A datepicker that can be attached to a
|
|
1130
|
+
/** A datepicker that can be attached to a `MatDatepickerControl`. */
|
|
1131
1131
|
interface MatDatepickerPanel<C extends MatDatepickerControl<D>, S, D = ExtractDateTypeFromSelection<S>> {
|
|
1132
1132
|
/** Stream that emits whenever the date picker is closed. */
|
|
1133
1133
|
closedStream: EventEmitter<void>;
|
package/dialog/_m2-dialog.scss
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
@use '../core/style/elevation';
|
|
2
2
|
@use '../core/theming/inspection';
|
|
3
|
+
@use '../core/tokens/m2-utils';
|
|
4
|
+
@use 'sass:map';
|
|
3
5
|
|
|
4
6
|
// Tokens that can't be configured through Angular Material's current theming API,
|
|
5
7
|
// but may be in a future version of the theming API.
|
|
@@ -23,11 +25,11 @@
|
|
|
23
25
|
|
|
24
26
|
// Tokens that can be configured through Angular Material's color theming API.
|
|
25
27
|
@function get-color-tokens($theme) {
|
|
26
|
-
$
|
|
28
|
+
$system: m2-utils.get-system($theme);
|
|
27
29
|
@return (
|
|
28
|
-
dialog-container-color:
|
|
29
|
-
dialog-subhead-color:
|
|
30
|
-
dialog-supporting-text-color:
|
|
30
|
+
dialog-container-color: map.get($system, surface),
|
|
31
|
+
dialog-subhead-color: map.get($system, on-surface),
|
|
32
|
+
dialog-supporting-text-color: map.get($system, on-surface-variant),
|
|
31
33
|
);
|
|
32
34
|
}
|
|
33
35
|
|
package/divider/_m2-divider.scss
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
@use '../core/
|
|
1
|
+
@use '../core/tokens/m2-utils';
|
|
2
|
+
@use 'sass:map';
|
|
2
3
|
|
|
3
4
|
// Tokens that can't be configured through Angular Material's current theming API,
|
|
4
5
|
// but may be in a future version of the theming API.
|
|
@@ -10,8 +11,9 @@
|
|
|
10
11
|
|
|
11
12
|
// Tokens that can be configured through Angular Material's color theming API.
|
|
12
13
|
@function get-color-tokens($theme) {
|
|
14
|
+
$system: m2-utils.get-system($theme);
|
|
13
15
|
@return (
|
|
14
|
-
divider-color:
|
|
16
|
+
divider-color: map.get($system, outline)
|
|
15
17
|
);
|
|
16
18
|
}
|
|
17
19
|
|