|
2 | 2 | @use '../core/theming/theming';
|
3 | 3 | @use '../core/theming/inspection';
|
4 | 4 | @use '../core/tokens/m2-utils';
|
| 5 | +@use '../core/tokens/m3-utils'; |
5 | 6 |
|
6 | 7 | // Tokens that can't be configured through Angular Material's current theming API,
|
7 | 8 | // but may be in a future version of the theming API.
|
|
19 | 20 |
|
20 | 21 | // Tokens that can be configured through Angular Material's color theming API.
|
21 | 22 | @function get-color-tokens($theme) {
|
| 23 | + $system: m2-utils.get-system($theme); |
| 24 | + |
22 | 25 | @return (
|
23 |
| - button-toggle-background-color: inspection.get-theme-color($theme, system, surface), |
| 26 | + button-toggle-background-color: map.get($system, surface), |
24 | 27 | button-toggle-disabled-selected-state-background-color:
|
25 |
| - inspection.get-theme-color($theme, background, selected-disabled-button), |
| 28 | + m3-utils.color-with-opacity(map.get($system, on-surface), 12%), |
26 | 29 | button-toggle-disabled-selected-state-text-color:
|
27 |
| - inspection.get-theme-color($theme, system, on-surface), |
28 |
| - button-toggle-disabled-state-background-color: |
29 |
| - inspection.get-theme-color($theme, system, surface), |
| 30 | + m3-utils.color-with-opacity(map.get($system, on-surface), 38%), |
| 31 | + button-toggle-disabled-state-background-color: map.get($system, surface), |
30 | 32 | button-toggle-disabled-state-text-color:
|
31 |
| - inspection.get-theme-color($theme, foreground, disabled-button), |
32 |
| - button-toggle-divider-color: inspection.get-theme-color($theme, system, outline), |
| 33 | + m3-utils.color-with-opacity(map.get($system, on-surface), 38%), |
| 34 | + button-toggle-divider-color: map.get($system, outline), |
33 | 35 | button-toggle-legacy-disabled-selected-state-background-color:
|
34 |
| - inspection.get-theme-color($theme, background, selected-disabled-button), |
35 |
| - button-toggle-legacy-disabled-state-background-color: |
36 |
| - inspection.get-theme-color($theme, background, disabled-button-toggle), |
| 36 | + m3-utils.color-with-opacity(map.get($system, on-surface), 12%), |
| 37 | + button-toggle-legacy-disabled-state-background-color: map.get($system, surface), |
37 | 38 | button-toggle-legacy-disabled-state-text-color:
|
38 |
| - inspection.get-theme-color($theme, foreground, disabled-button), |
| 39 | + m3-utils.color-with-opacity(map.get($system, on-surface), 38%), |
39 | 40 | button-toggle-legacy-selected-state-background-color:
|
40 |
| - inspection.get-theme-color($theme, background, selected-button), |
41 |
| - button-toggle-legacy-selected-state-text-color: |
42 |
| - inspection.get-theme-color($theme, foreground, secondary-text), |
| 41 | + m3-utils.color-with-opacity(map.get($system, on-surface), 12%), |
| 42 | + button-toggle-legacy-selected-state-text-color: map.get($system, on-surface), |
43 | 43 | button-toggle-legacy-state-layer-color:
|
44 |
| - inspection.get-theme-color($theme, background, focused-button), |
45 |
| - button-toggle-legacy-text-color: inspection.get-theme-color($theme, foreground, hint-text), |
| 44 | + m3-utils.color-with-opacity(map.get($system, on-surface), 12%), |
| 45 | + button-toggle-legacy-text-color: map.get($system, on-surface), |
46 | 46 | button-toggle-selected-state-background-color:
|
47 |
| - inspection.get-theme-color($theme, background, selected-button), |
48 |
| - button-toggle-selected-state-text-color: inspection.get-theme-color($theme, system, on-surface), |
49 |
| - button-toggle-state-layer-color: inspection.get-theme-color($theme, background, base), |
50 |
| - button-toggle-text-color: inspection.get-theme-color($theme, system, on-surface), |
| 47 | + m3-utils.color-with-opacity(map.get($system, on-surface), 12%), |
| 48 | + button-toggle-selected-state-text-color: map.get($system, on-surface), |
| 49 | + button-toggle-state-layer-color: map.get($system, on-surface), |
| 50 | + button-toggle-text-color: map.get($system, on-surface), |
51 | 51 | );
|
52 | 52 | }
|
53 | 53 |
|
|
0 commit comments