11@use ' sass:color' ;
22@use ' sass:meta' ;
33@use ' sass:math' ;
4- @use ' sass:map' ;
54@use ' ../core/theming/inspection' ;
65@use ' ../core/style/elevation' ;
76@use ' ../core/style/sass-utils' ;
8- @use ' ../core/tokens/m2-utils' ;
97@use ' ../core/tokens/m3-utils' ;
8+ @use ' ../core/tokens/m2-utils' ;
9+ @use ' sass:map' ;
1010
1111$_selected-fade-amount : 0.6 ;
1212$_today-fade-amount : 0.2 ;
@@ -41,11 +41,11 @@ $private-default-overlap-color: #a8dab5;
4141// Tokens that can be configured through Angular Material's color theming API.
4242@function get-color-tokens ($theme ) {
4343 $system : m2-utils .get-system ($theme );
44+
4445 $inactive-icon-color : inspection .get-theme-color ($theme , foreground , icon );
45- $secondary-text-color : inspection .get-theme-color ($theme , foreground , secondary-text );
4646 $disabled : m3-utils .color-with-opacity (map .get ($system , on-surface ), 38% );
4747 $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 );
4949 $today-disabled-outline-color : null;
5050 $is-dark : inspection .get-theme-type ($theme ) == dark ;
5151
@@ -71,32 +71,27 @@ $private-default-overlap-color: #a8dab5;
7171
7272 @return sass-utils .merge-all ($calendar-tokens , $toggle-tokens , $range-tokens , (
7373 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 ) ,
7575 datepicker- calendar- period- button- text- color:
7676 inspection .get-theme-color ($theme , foreground , base ),
7777 datepicker- calendar- period- button- icon- color: $inactive-icon-color ,
7878 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 ) ,
8181
8282 // Note: though it's not text, the border is a hint about the fact
8383 // that this is today's date, so we use the hint color.
8484 datepicker- calendar- date- today- outline- color: $hint-text-color ,
8585 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 ),
8787 datepicker- calendar- date- outline- color: transparent ,
8888 datepicker- calendar- date- disabled- state- text- color: $disabled ,
8989 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 ),
9391 datepicker- range- input- disabled- state- separator- color: $disabled ,
9492 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 ),
10095 ));
10196}
10297
0 commit comments