1
1
@use ' sass:color' ;
2
2
@use ' sass:meta' ;
3
3
@use ' sass:math' ;
4
- @use ' sass:map' ;
5
4
@use ' ../core/theming/inspection' ;
6
5
@use ' ../core/style/elevation' ;
7
6
@use ' ../core/style/sass-utils' ;
8
- @use ' ../core/tokens/m2-utils' ;
9
7
@use ' ../core/tokens/m3-utils' ;
8
+ @use ' ../core/tokens/m2-utils' ;
9
+ @use ' sass:map' ;
10
10
11
11
$_selected-fade-amount : 0.6 ;
12
12
$_today-fade-amount : 0.2 ;
@@ -41,11 +41,11 @@ $private-default-overlap-color: #a8dab5;
41
41
// Tokens that can be configured through Angular Material's color theming API.
42
42
@function get-color-tokens ($theme ) {
43
43
$system : m2-utils .get-system ($theme );
44
+
44
45
$inactive-icon-color : inspection .get-theme-color ($theme , foreground , icon );
45
- $secondary-text-color : inspection .get-theme-color ($theme , foreground , secondary-text );
46
46
$disabled : m3-utils .color-with-opacity (map .get ($system , on-surface ), 38% );
47
47
$hint-text-color : inspection .get-theme-color ($theme , foreground , hint-text );
48
- $preview-outline-color : inspection .get-theme-color ( $theme , system , outline );
48
+ $preview-outline-color : map .get ( $ system , outline );
49
49
$today-disabled-outline-color : null;
50
50
$is-dark : inspection .get-theme-type ($theme ) == dark ;
51
51
@@ -71,32 +71,27 @@ $private-default-overlap-color: #a8dab5;
71
71
72
72
@return sass-utils .merge-all ($calendar-tokens , $toggle-tokens , $range-tokens , (
73
73
datepicker- toggle- icon- color: $inactive-icon-color ,
74
- datepicker- calendar- body- label- text- color: $secondary-text-color ,
74
+ datepicker- calendar- body- label- text- color: map . get ( $system , on-surface-variant ) ,
75
75
datepicker- calendar- period- button- text- color:
76
76
inspection .get-theme-color ($theme , foreground , base ),
77
77
datepicker- calendar- period- button- icon- color: $inactive-icon-color ,
78
78
datepicker- calendar- navigation- button- icon- color: $inactive-icon-color ,
79
- datepicker- calendar- header- divider- color: inspection .get-theme-color ( $theme , system , outline ),
80
- datepicker- calendar- header- text- color: $secondary-text-color ,
79
+ datepicker- calendar- header- divider- color: map .get ( $ system , outline ),
80
+ datepicker- calendar- header- text- color: map . get ( $system , on-surface-variant ) ,
81
81
82
82
// Note: though it's not text, the border is a hint about the fact
83
83
// that this is today's date, so we use the hint color.
84
84
datepicker- calendar- date- today- outline- color: $hint-text-color ,
85
85
datepicker- calendar- date- today- disabled- state- outline- color: $today-disabled-outline-color ,
86
- datepicker- calendar- date- text- color: inspection .get-theme-color ( $theme , system , on-surface ),
86
+ datepicker- calendar- date- text- color: map .get ( $ system , on-surface ),
87
87
datepicker- calendar- date- outline- color: transparent ,
88
88
datepicker- calendar- date- disabled- state- text- color: $disabled ,
89
89
datepicker- calendar- date- preview- state- outline- color: $preview-outline-color ,
90
-
91
- datepicker- range- input- separator- color:
92
- inspection .get-theme-color ($theme , system , on-surface ),
90
+ datepicker- range- input- separator- color: map .get ($system , on-surface ),
93
91
datepicker- range- input- disabled- state- separator- color: $disabled ,
94
92
datepicker- range- input- disabled- state- text- color: $disabled ,
95
-
96
- datepicker- calendar- container- background- color:
97
- inspection .get-theme-color ($theme , system , surface ),
98
- datepicker- calendar- container- text- color:
99
- inspection .get-theme-color ($theme , system , on-surface ),
93
+ datepicker- calendar- container- background- color: map .get ($system , surface ),
94
+ datepicker- calendar- container- text- color: map .get ($system , on-surface ),
100
95
));
101
96
}
102
97
0 commit comments