@angular/material 18.0.0-next.6 → 18.0.0-rc.0
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 -1
- package/core/tokens/_m3-tokens.scss +8 -878
- package/core/tokens/_token-utils.scss +151 -0
- package/core/tokens/m2/mat/_switch.scss +1 -0
- package/core/tokens/m3/_index.scss +161 -0
- package/core/tokens/m3/mat/_app.scss +19 -0
- package/core/tokens/m3/mat/_autocomplete.scss +22 -0
- package/core/tokens/m3/mat/_badge.scss +77 -0
- package/core/tokens/m3/mat/_bottom-sheet.scss +24 -0
- package/core/tokens/m3/mat/_card.scss +24 -0
- package/core/tokens/m3/mat/_checkbox.scss +21 -0
- package/core/tokens/m3/mat/_chip.scss +46 -0
- package/core/tokens/m3/mat/_datepicker.scss +123 -0
- package/core/tokens/m3/mat/_dialog.scss +30 -0
- package/core/tokens/m3/mat/_divider.scss +19 -0
- package/core/tokens/m3/mat/_expansion.scss +41 -0
- package/core/tokens/m3/mat/_fab-small.scss +50 -0
- package/core/tokens/m3/mat/_fab.scss +50 -0
- package/core/tokens/m3/mat/_filled-button.scss +54 -0
- package/core/tokens/m3/mat/_form-field.scss +59 -0
- package/core/tokens/m3/mat/_full-pseudo-checkbox.scss +42 -0
- package/core/tokens/m3/mat/_grid-list.scss +21 -0
- package/core/tokens/m3/mat/_icon-button.scss +27 -0
- package/core/tokens/m3/mat/_icon.scss +33 -0
- package/core/tokens/m3/mat/_list.scss +19 -0
- package/core/tokens/m3/mat/_menu.scss +42 -0
- package/core/tokens/m3/mat/_minimal-pseudo-checkbox.scss +33 -0
- package/core/tokens/m3/mat/_optgroup.scss +22 -0
- package/core/tokens/m3/mat/_option.scss +55 -0
- package/core/tokens/m3/mat/_outlined-button.scss +54 -0
- package/core/tokens/m3/mat/_paginator.scss +27 -0
- package/core/tokens/m3/mat/_protected-button.scss +55 -0
- package/core/tokens/m3/mat/_radio.scss +34 -0
- package/core/tokens/m3/mat/_ripple.scss +19 -0
- package/core/tokens/m3/mat/_select.scss +46 -0
- package/core/tokens/m3/mat/_sidenav.scss +28 -0
- package/core/tokens/m3/mat/_slider.scss +56 -0
- package/core/tokens/m3/mat/_snack-bar.scss +18 -0
- package/core/tokens/m3/mat/_sort.scss +18 -0
- package/core/tokens/m3/mat/_standard-button-toggle.scss +57 -0
- package/core/tokens/m3/mat/_stepper.scss +79 -0
- package/core/tokens/m3/mat/_switch.scss +45 -0
- package/core/tokens/m3/mat/_tab-header.scss +51 -0
- package/core/tokens/m3/mat/_table.scss +28 -0
- package/core/tokens/m3/mat/_text-button.scss +55 -0
- package/core/tokens/m3/mat/_toolbar.scss +23 -0
- package/core/tokens/m3/mat/_tree.scss +22 -0
- package/core/tokens/m3/mdc/_checkbox.scss +110 -0
- package/core/tokens/m3/mdc/_chip.scss +91 -0
- package/core/tokens/m3/mdc/_circular-progress.scss +29 -0
- package/core/tokens/m3/mdc/_dialog.scss +39 -0
- package/core/tokens/m3/mdc/_elevated-card.scss +15 -0
- package/core/tokens/m3/mdc/_extended-fab.scss +21 -0
- package/core/tokens/m3/mdc/_fab-small.scss +21 -0
- package/core/tokens/m3/mdc/_fab.scss +21 -0
- package/core/tokens/m3/mdc/_filled-button.scss +86 -0
- package/core/tokens/m3/mdc/_filled-text-field.scss +92 -0
- package/core/tokens/m3/mdc/_form-field.scss +25 -0
- package/core/tokens/m3/mdc/_icon-button.scss +39 -0
- package/core/tokens/m3/mdc/_linear-progress.scss +32 -0
- package/core/tokens/m3/mdc/_list.scss +37 -0
- package/core/tokens/m3/mdc/_outlined-button.scss +83 -0
- package/core/tokens/m3/mdc/_outlined-card.scss +15 -0
- package/core/tokens/m3/mdc/_outlined-text-field.scss +85 -0
- package/core/tokens/m3/mdc/_plain-tooltip.scss +15 -0
- package/core/tokens/m3/mdc/_protected-button.scss +84 -0
- package/core/tokens/m3/mdc/_radio.scss +46 -0
- package/core/tokens/m3/mdc/_slider.scss +61 -0
- package/core/tokens/m3/mdc/_snack-bar.scss +15 -0
- package/core/tokens/m3/mdc/_switch.scss +70 -0
- package/core/tokens/m3/mdc/_tab-indicator.scss +33 -0
- package/core/tokens/m3/mdc/_tab.scss +15 -0
- package/core/tokens/m3/mdc/_text-button.scss +79 -0
- package/dialog/index.d.ts +4 -3
- package/esm2022/core/version.mjs +1 -1
- package/esm2022/dialog/dialog-content-directives.mjs +5 -2
- package/esm2022/slide-toggle/slide-toggle.mjs +3 -3
- package/fesm2022/core.mjs +1 -1
- package/fesm2022/core.mjs.map +1 -1
- package/fesm2022/dialog.mjs +4 -1
- package/fesm2022/dialog.mjs.map +1 -1
- package/fesm2022/slide-toggle.mjs +2 -2
- package/fesm2022/slide-toggle.mjs.map +1 -1
- package/package.json +2 -2
- 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/schematics/ng-add/index.js +1 -1
- package/schematics/ng-add/index.mjs +1 -1
- package/schematics/ng-generate/m3-theme/index_bundled.js +2 -2
- package/schematics/ng-update/index_bundled.js +29 -29
- package/core/tokens/_custom-tokens.scss +0 -1918
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
@use 'sass:map';
|
|
2
|
+
@use '../../../style/sass-utils';
|
|
3
|
+
@use '../../token-utils';
|
|
4
|
+
@use '@material/elevation' as mdc-elevation;
|
|
5
|
+
|
|
6
|
+
// The prefix used to generate the fully qualified name for tokens in this file.
|
|
7
|
+
$prefix: (mat, datepicker);
|
|
8
|
+
|
|
9
|
+
/// Generates custom tokens for the mat-datepicker.
|
|
10
|
+
/// @param {Map} $systems The MDC system tokens
|
|
11
|
+
/// @param {Boolean} $exclude-hardcoded Whether to exclude hardcoded token values
|
|
12
|
+
/// @param {Map} $token-slots Possible token slots
|
|
13
|
+
/// @return {Map} A set of custom tokens for the mat-datepicker
|
|
14
|
+
@function get-tokens($systems, $exclude-hardcoded, $token-slots) {
|
|
15
|
+
$tokens: ((
|
|
16
|
+
calendar-date-in-range-state-background-color:
|
|
17
|
+
map.get($systems, md-sys-color, primary-container),
|
|
18
|
+
calendar-date-in-comparison-range-state-background-color:
|
|
19
|
+
map.get($systems, md-sys-color, tertiary-container),
|
|
20
|
+
calendar-date-in-overlap-range-state-background-color:
|
|
21
|
+
map.get($systems, md-sys-color, secondary-container),
|
|
22
|
+
calendar-date-in-overlap-range-selected-state-background-color:
|
|
23
|
+
map.get($systems, md-sys-color, secondary),
|
|
24
|
+
calendar-date-selected-state-text-color: map.get($systems, md-sys-color, on-primary),
|
|
25
|
+
calendar-date-selected-state-background-color: map.get($systems, md-sys-color, primary),
|
|
26
|
+
calendar-date-selected-disabled-state-background-color: sass-utils.safe-color-change(
|
|
27
|
+
map.get($systems, md-sys-color, on-surface),
|
|
28
|
+
$alpha: 0.38
|
|
29
|
+
),
|
|
30
|
+
calendar-date-today-selected-state-outline-color: map.get($systems, md-sys-color, primary),
|
|
31
|
+
calendar-date-focus-state-background-color: sass-utils.safe-color-change(
|
|
32
|
+
map.get($systems, md-sys-color, on-surface),
|
|
33
|
+
$alpha: map.get($systems, md-sys-state, focus-state-layer-opacity)
|
|
34
|
+
),
|
|
35
|
+
calendar-date-hover-state-background-color: sass-utils.safe-color-change(
|
|
36
|
+
map.get($systems, md-sys-color, on-surface),
|
|
37
|
+
$alpha: map.get($systems, md-sys-state, hover-state-layer-opacity)
|
|
38
|
+
),
|
|
39
|
+
toggle-active-state-icon-color: map.get($systems, md-sys-color, on-surface-variant),
|
|
40
|
+
toggle-icon-color: map.get($systems, md-sys-color, on-surface-variant),
|
|
41
|
+
calendar-body-label-text-color: map.get($systems, md-sys-color, on-surface),
|
|
42
|
+
calendar-period-button-text-color: map.get($systems, md-sys-color, on-surface-variant),
|
|
43
|
+
calendar-period-button-icon-color: map.get($systems, md-sys-color, on-surface-variant),
|
|
44
|
+
calendar-navigation-button-icon-color: map.get($systems, md-sys-color, on-surface-variant),
|
|
45
|
+
calendar-header-divider-color: token-utils.hardcode(transparent, $exclude-hardcoded),
|
|
46
|
+
calendar-header-text-color: map.get($systems, md-sys-color, on-surface-variant),
|
|
47
|
+
calendar-date-today-outline-color: map.get($systems, md-sys-color, primary),
|
|
48
|
+
calendar-date-today-disabled-state-outline-color: sass-utils.safe-color-change(
|
|
49
|
+
map.get($systems, md-sys-color, on-surface),
|
|
50
|
+
$alpha: 0.38
|
|
51
|
+
),
|
|
52
|
+
calendar-date-text-color: map.get($systems, md-sys-color, on-surface),
|
|
53
|
+
calendar-date-outline-color: token-utils.hardcode(transparent, $exclude-hardcoded),
|
|
54
|
+
calendar-date-disabled-state-text-color: sass-utils.safe-color-change(
|
|
55
|
+
map.get($systems, md-sys-color, on-surface),
|
|
56
|
+
$alpha: 0.38
|
|
57
|
+
),
|
|
58
|
+
calendar-date-preview-state-outline-color: map.get($systems, md-sys-color, primary),
|
|
59
|
+
range-input-separator-color: map.get($systems, md-sys-color, on-surface),
|
|
60
|
+
range-input-disabled-state-separator-color: sass-utils.safe-color-change(
|
|
61
|
+
map.get($systems, md-sys-color, on-surface),
|
|
62
|
+
$alpha: 0.38
|
|
63
|
+
),
|
|
64
|
+
range-input-disabled-state-text-color: sass-utils.safe-color-change(
|
|
65
|
+
map.get($systems, md-sys-color, on-surface),
|
|
66
|
+
$alpha: 0.38
|
|
67
|
+
),
|
|
68
|
+
calendar-container-background-color: map.get($systems, md-sys-color, surface-container-high),
|
|
69
|
+
calendar-container-text-color: map.get($systems, md-sys-color, on-surface),
|
|
70
|
+
calendar-container-elevation-shadow: token-utils.hardcode(mdc-elevation.elevation-box-shadow(0),
|
|
71
|
+
$exclude-hardcoded),
|
|
72
|
+
calendar-container-touch-elevation-shadow:
|
|
73
|
+
token-utils.hardcode(mdc-elevation.elevation-box-shadow(0), $exclude-hardcoded),
|
|
74
|
+
calendar-container-shape: map.get($systems, md-sys-shape, corner-large),
|
|
75
|
+
calendar-container-touch-shape: map.get($systems, md-sys-shape, corner-extra-large),
|
|
76
|
+
calendar-text-font: map.get($systems, md-sys-typescale, body-large-font),
|
|
77
|
+
calendar-text-size: map.get($systems, md-sys-typescale, body-large-size),
|
|
78
|
+
calendar-body-label-text-size: map.get($systems, md-sys-typescale, title-small-size),
|
|
79
|
+
calendar-body-label-text-weight: map.get($systems, md-sys-typescale, title-small-weight),
|
|
80
|
+
calendar-period-button-text-size: map.get($systems, md-sys-typescale, title-small-size),
|
|
81
|
+
calendar-period-button-text-weight: map.get($systems, md-sys-typescale, title-small-weight),
|
|
82
|
+
calendar-header-text-size: map.get($systems, md-sys-typescale, title-small-size),
|
|
83
|
+
calendar-header-text-weight: map.get($systems, md-sys-typescale, title-small-weight),
|
|
84
|
+
), (
|
|
85
|
+
// Color variants:
|
|
86
|
+
primary: (), // Default, no overrides needed.
|
|
87
|
+
secondary: (
|
|
88
|
+
calendar-date-in-range-state-background-color:
|
|
89
|
+
map.get($systems, md-sys-color, secondary-container),
|
|
90
|
+
calendar-date-selected-state-text-color: map.get($systems, md-sys-color, on-secondary),
|
|
91
|
+
calendar-date-selected-state-background-color: map.get($systems, md-sys-color, secondary),
|
|
92
|
+
calendar-date-today-selected-state-outline-color: map.get($systems, md-sys-color, secondary),
|
|
93
|
+
calendar-date-today-outline-color: map.get($systems, md-sys-color, secondary),
|
|
94
|
+
calendar-date-preview-state-outline-color: map.get($systems, md-sys-color, secondary),
|
|
95
|
+
calendar-date-in-overlap-range-state-background-color:
|
|
96
|
+
map.get($systems, md-sys-color, primary-container),
|
|
97
|
+
calendar-date-in-overlap-range-selected-state-background-color:
|
|
98
|
+
map.get($systems, md-sys-color, primary),
|
|
99
|
+
),
|
|
100
|
+
tertiary: (
|
|
101
|
+
calendar-date-in-range-state-background-color:
|
|
102
|
+
map.get($systems, md-sys-color, tertiary-container),
|
|
103
|
+
calendar-date-selected-state-text-color: map.get($systems, md-sys-color, on-tertiary),
|
|
104
|
+
calendar-date-selected-state-background-color: map.get($systems, md-sys-color, tertiary),
|
|
105
|
+
calendar-date-today-selected-state-outline-color: map.get($systems, md-sys-color, tertiary),
|
|
106
|
+
calendar-date-today-outline-color: map.get($systems, md-sys-color, tertiary),
|
|
107
|
+
calendar-date-preview-state-outline-color: map.get($systems, md-sys-color, tertiary),
|
|
108
|
+
calendar-date-in-comparison-range-state-background-color:
|
|
109
|
+
map.get($systems, md-sys-color, primary-container),
|
|
110
|
+
),
|
|
111
|
+
error: (
|
|
112
|
+
calendar-date-in-range-state-background-color:
|
|
113
|
+
map.get($systems, md-sys-color, error-container),
|
|
114
|
+
calendar-date-selected-state-text-color: map.get($systems, md-sys-color, on-error),
|
|
115
|
+
calendar-date-selected-state-background-color: map.get($systems, md-sys-color, error),
|
|
116
|
+
calendar-date-today-selected-state-outline-color: map.get($systems, md-sys-color, error),
|
|
117
|
+
calendar-date-today-outline-color: map.get($systems, md-sys-color, error),
|
|
118
|
+
calendar-date-preview-state-outline-color: map.get($systems, md-sys-color, error),
|
|
119
|
+
)
|
|
120
|
+
));
|
|
121
|
+
|
|
122
|
+
@return token-utils.namespace-tokens($prefix, $tokens, $token-slots);
|
|
123
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
@use '../../token-utils';
|
|
2
|
+
|
|
3
|
+
// The prefix used to generate the fully qualified name for tokens in this file.
|
|
4
|
+
$prefix: (mat, dialog);
|
|
5
|
+
|
|
6
|
+
/// Generates custom tokens for the dialog.
|
|
7
|
+
/// @param {Map} $systems The MDC system tokens
|
|
8
|
+
/// @param {Boolean} $exclude-hardcoded Whether to exclude hardcoded token values
|
|
9
|
+
/// @param {Map} $token-slots Possible token slots
|
|
10
|
+
/// @return {Map} A set of custom tokens for the dialog
|
|
11
|
+
@function get-tokens($systems, $exclude-hardcoded, $token-slots) {
|
|
12
|
+
$tokens: (
|
|
13
|
+
container-max-width: token-utils.hardcode(560px, $exclude-hardcoded),
|
|
14
|
+
container-small-max-width: token-utils.hardcode(calc(100vw - 32px), $exclude-hardcoded),
|
|
15
|
+
container-min-width: token-utils.hardcode(280px, $exclude-hardcoded),
|
|
16
|
+
actions-alignment: token-utils.hardcode(flex-end, $exclude-hardcoded),
|
|
17
|
+
content-padding: token-utils.hardcode(20px 24px, $exclude-hardcoded),
|
|
18
|
+
with-actions-content-padding: token-utils.hardcode(20px 24px 0, $exclude-hardcoded),
|
|
19
|
+
actions-padding: token-utils.hardcode(16px 24px, $exclude-hardcoded),
|
|
20
|
+
|
|
21
|
+
// The vertical padding values are a bit weird, because MDC uses a `::before` pseudo
|
|
22
|
+
// element to size the title which in turn means that we can't set a specific padding
|
|
23
|
+
// and get the exact same space out of it. These values were determined through
|
|
24
|
+
// trial and error so that the first line of text is 24px from the top and the bottom
|
|
25
|
+
// of the text is 16px from the content under it.
|
|
26
|
+
headline-padding: token-utils.hardcode(6px 24px 13px, $exclude-hardcoded),
|
|
27
|
+
);
|
|
28
|
+
|
|
29
|
+
@return token-utils.namespace-tokens($prefix, $tokens, $token-slots);
|
|
30
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
@use 'sass:map';
|
|
2
|
+
@use '../../token-utils';
|
|
3
|
+
|
|
4
|
+
// The prefix used to generate the fully qualified name for tokens in this file.
|
|
5
|
+
$prefix: (mat, divider);
|
|
6
|
+
|
|
7
|
+
/// Generates custom tokens for the mat-divider.
|
|
8
|
+
/// @param {Map} $systems The MDC system tokens
|
|
9
|
+
/// @param {Boolean} $exclude-hardcoded Whether to exclude hardcoded token values
|
|
10
|
+
/// @param {Map} $token-slots Possible token slots
|
|
11
|
+
/// @return {Map} A set of custom tokens for the mat-divider
|
|
12
|
+
@function get-tokens($systems, $exclude-hardcoded, $token-slots) {
|
|
13
|
+
$tokens: (
|
|
14
|
+
width: token-utils.hardcode(1px, $exclude-hardcoded),
|
|
15
|
+
color: map.get($systems, md-sys-color, outline-variant),
|
|
16
|
+
);
|
|
17
|
+
|
|
18
|
+
@return token-utils.namespace-tokens($prefix, $tokens, $token-slots);
|
|
19
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
@use 'sass:map';
|
|
2
|
+
@use '../../../style/sass-utils';
|
|
3
|
+
@use '../../token-utils';
|
|
4
|
+
|
|
5
|
+
// The prefix used to generate the fully qualified name for tokens in this file.
|
|
6
|
+
$prefix: (mat, expansion);
|
|
7
|
+
|
|
8
|
+
/// Generates custom tokens for the mat-expansion.
|
|
9
|
+
/// @param {Map} $systems The MDC system tokens
|
|
10
|
+
/// @param {Boolean} $exclude-hardcoded Whether to exclude hardcoded token values
|
|
11
|
+
/// @param {Map} $token-slots Possible token slots
|
|
12
|
+
/// @return {Map} A set of custom tokens for the mat-expansion
|
|
13
|
+
@function get-tokens($systems, $exclude-hardcoded, $token-slots) {
|
|
14
|
+
$tokens: sass-utils.merge-all(
|
|
15
|
+
token-utils.generate-typography-tokens($systems, header-text, title-medium),
|
|
16
|
+
token-utils.generate-typography-tokens($systems, container-text, body-large),
|
|
17
|
+
(
|
|
18
|
+
container-shape: token-utils.hardcode(12px, $exclude-hardcoded),
|
|
19
|
+
legacy-header-indicator-display: token-utils.hardcode(none, $exclude-hardcoded),
|
|
20
|
+
header-indicator-display: token-utils.hardcode(inline-block, $exclude-hardcoded),
|
|
21
|
+
container-background-color: map.get($systems, md-sys-color, surface),
|
|
22
|
+
container-text-color: map.get($systems, md-sys-color, on-surface),
|
|
23
|
+
actions-divider-color: map.get($systems, md-sys-color, outline-variant),
|
|
24
|
+
header-hover-state-layer-color: sass-utils.safe-color-change(
|
|
25
|
+
map.get($systems, md-sys-color, on-surface),
|
|
26
|
+
$alpha: map.get($systems, md-sys-state, hover-state-layer-opacity)
|
|
27
|
+
),
|
|
28
|
+
header-focus-state-layer-color: sass-utils.safe-color-change(
|
|
29
|
+
map.get($systems, md-sys-color, on-surface),
|
|
30
|
+
$alpha: map.get($systems, md-sys-state, focus-state-layer-opacity)
|
|
31
|
+
),
|
|
32
|
+
header-disabled-state-text-color: sass-utils.safe-color-change(
|
|
33
|
+
map.get($systems, md-sys-color, on-surface), $alpha: 0.38),
|
|
34
|
+
header-text-color: map.get($systems, md-sys-color, on-surface),
|
|
35
|
+
header-description-color: map.get($systems, md-sys-color, on-surface-variant),
|
|
36
|
+
header-indicator-color: map.get($systems, md-sys-color, on-surface-variant),
|
|
37
|
+
)
|
|
38
|
+
);
|
|
39
|
+
|
|
40
|
+
@return token-utils.namespace-tokens($prefix, $tokens, $token-slots);
|
|
41
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
@use 'sass:map';
|
|
2
|
+
@use '../../../style/sass-utils';
|
|
3
|
+
@use '../../token-utils';
|
|
4
|
+
|
|
5
|
+
// The prefix used to generate the fully qualified name for tokens in this file.
|
|
6
|
+
$prefix: (mat, fab-small);
|
|
7
|
+
|
|
8
|
+
/// Generates custom tokens for the mat-mini-fab.
|
|
9
|
+
/// @param {Map} $systems The MDC system tokens
|
|
10
|
+
/// @param {Boolean} $exclude-hardcoded Whether to exclude hardcoded token values
|
|
11
|
+
/// @param {Map} $token-slots Possible token slots
|
|
12
|
+
/// @return {Map} A set of custom tokens for the mat-mini-fab
|
|
13
|
+
@function get-tokens($systems, $exclude-hardcoded, $token-slots) {
|
|
14
|
+
$tokens: ((
|
|
15
|
+
foreground-color: map.get($systems, md-sys-color, on-primary-container),
|
|
16
|
+
state-layer-color: map.get($systems, md-sys-color, on-primary-container),
|
|
17
|
+
ripple-color: sass-utils.safe-color-change(
|
|
18
|
+
map.get($systems, md-sys-color, on-primary-container),
|
|
19
|
+
$alpha: map.get($systems, md-sys-state, pressed-state-layer-opacity)
|
|
20
|
+
),
|
|
21
|
+
hover-state-layer-opacity: map.get($systems, md-sys-state, hover-state-layer-opacity),
|
|
22
|
+
focus-state-layer-opacity: map.get($systems, md-sys-state, focus-state-layer-opacity),
|
|
23
|
+
pressed-state-layer-opacity: map.get($systems, md-sys-state, pressed-state-layer-opacity),
|
|
24
|
+
disabled-state-container-color: sass-utils.safe-color-change(
|
|
25
|
+
map.get($systems, md-sys-color, on-surface), $alpha: 0.12),
|
|
26
|
+
disabled-state-foreground-color: sass-utils.safe-color-change(
|
|
27
|
+
map.get($systems, md-sys-color, on-surface), $alpha: 0.38),
|
|
28
|
+
), (
|
|
29
|
+
// Color variants
|
|
30
|
+
primary: (), // Default, no overrides needed.
|
|
31
|
+
secondary: (
|
|
32
|
+
foreground-color: map.get($systems, md-sys-color, on-secondary-container),
|
|
33
|
+
state-layer-color: map.get($systems, md-sys-color, on-secondary-container),
|
|
34
|
+
ripple-color: sass-utils.safe-color-change(
|
|
35
|
+
map.get($systems, md-sys-color, on-secondary-container),
|
|
36
|
+
$alpha: map.get($systems, md-sys-state, pressed-state-layer-opacity)
|
|
37
|
+
),
|
|
38
|
+
),
|
|
39
|
+
tertiary: (
|
|
40
|
+
foreground-color: map.get($systems, md-sys-color, on-tertiary-container),
|
|
41
|
+
state-layer-color: map.get($systems, md-sys-color, on-tertiary-container),
|
|
42
|
+
ripple-color: sass-utils.safe-color-change(
|
|
43
|
+
map.get($systems, md-sys-color, on-tertiary-container),
|
|
44
|
+
$alpha: map.get($systems, md-sys-state, pressed-state-layer-opacity)
|
|
45
|
+
),
|
|
46
|
+
)
|
|
47
|
+
));
|
|
48
|
+
|
|
49
|
+
@return token-utils.namespace-tokens($prefix, $tokens, $token-slots);
|
|
50
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
@use 'sass:map';
|
|
2
|
+
@use '../../../style/sass-utils';
|
|
3
|
+
@use '../../token-utils';
|
|
4
|
+
|
|
5
|
+
// The prefix used to generate the fully qualified name for tokens in this file.
|
|
6
|
+
$prefix: (mat, fab);
|
|
7
|
+
|
|
8
|
+
/// Generates custom tokens for the mat-fab.
|
|
9
|
+
/// @param {Map} $systems The MDC system tokens
|
|
10
|
+
/// @param {Boolean} $exclude-hardcoded Whether to exclude hardcoded token values
|
|
11
|
+
/// @param {Map} $token-slots Possible token slots
|
|
12
|
+
/// @return {Map} A set of custom tokens for the mat-fab
|
|
13
|
+
@function get-tokens($systems, $exclude-hardcoded, $token-slots) {
|
|
14
|
+
$tokens: ((
|
|
15
|
+
foreground-color: map.get($systems, md-sys-color, on-primary-container),
|
|
16
|
+
state-layer-color: map.get($systems, md-sys-color, on-primary-container),
|
|
17
|
+
ripple-color: sass-utils.safe-color-change(
|
|
18
|
+
map.get($systems, md-sys-color, on-primary-container),
|
|
19
|
+
$alpha: map.get($systems, md-sys-state, pressed-state-layer-opacity)
|
|
20
|
+
),
|
|
21
|
+
hover-state-layer-opacity: map.get($systems, md-sys-state, hover-state-layer-opacity),
|
|
22
|
+
focus-state-layer-opacity: map.get($systems, md-sys-state, focus-state-layer-opacity),
|
|
23
|
+
pressed-state-layer-opacity: map.get($systems, md-sys-state, pressed-state-layer-opacity),
|
|
24
|
+
disabled-state-container-color: sass-utils.safe-color-change(
|
|
25
|
+
map.get($systems, md-sys-color, on-surface), $alpha: 0.12),
|
|
26
|
+
disabled-state-foreground-color: sass-utils.safe-color-change(
|
|
27
|
+
map.get($systems, md-sys-color, on-surface), $alpha: 0.38),
|
|
28
|
+
), (
|
|
29
|
+
// Color variants
|
|
30
|
+
primary: (), // Default, no overrides needed.
|
|
31
|
+
secondary: (
|
|
32
|
+
foreground-color: map.get($systems, md-sys-color, on-secondary-container),
|
|
33
|
+
state-layer-color: map.get($systems, md-sys-color, on-secondary-container),
|
|
34
|
+
ripple-color: sass-utils.safe-color-change(
|
|
35
|
+
map.get($systems, md-sys-color, on-secondary-container),
|
|
36
|
+
$alpha: map.get($systems, md-sys-state, pressed-state-layer-opacity)
|
|
37
|
+
),
|
|
38
|
+
),
|
|
39
|
+
tertiary: (
|
|
40
|
+
foreground-color: map.get($systems, md-sys-color, on-tertiary-container),
|
|
41
|
+
state-layer-color: map.get($systems, md-sys-color, on-tertiary-container),
|
|
42
|
+
ripple-color: sass-utils.safe-color-change(
|
|
43
|
+
map.get($systems, md-sys-color, on-tertiary-container),
|
|
44
|
+
$alpha: map.get($systems, md-sys-state, pressed-state-layer-opacity)
|
|
45
|
+
),
|
|
46
|
+
)
|
|
47
|
+
));
|
|
48
|
+
|
|
49
|
+
@return token-utils.namespace-tokens($prefix, $tokens, $token-slots);
|
|
50
|
+
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
@use 'sass:map';
|
|
2
|
+
@use '../../../style/sass-utils';
|
|
3
|
+
@use '../../token-utils';
|
|
4
|
+
|
|
5
|
+
// The prefix used to generate the fully qualified name for tokens in this file.
|
|
6
|
+
$prefix: (mat, filled-button);
|
|
7
|
+
|
|
8
|
+
/// Generates custom tokens for the mat-flat-button.
|
|
9
|
+
/// @param {Map} $systems The MDC system tokens
|
|
10
|
+
/// @param {Boolean} $exclude-hardcoded Whether to exclude hardcoded token values
|
|
11
|
+
/// @param {Map} $token-slots Possible token slots
|
|
12
|
+
/// @return {Map} A set of custom tokens for the mat-flat-button
|
|
13
|
+
@function get-tokens($systems, $exclude-hardcoded, $token-slots) {
|
|
14
|
+
$tokens: ((
|
|
15
|
+
horizontal-padding: token-utils.hardcode(24px, $exclude-hardcoded),
|
|
16
|
+
icon-spacing: token-utils.hardcode(8px, $exclude-hardcoded),
|
|
17
|
+
icon-offset: token-utils.hardcode(-8px, $exclude-hardcoded),
|
|
18
|
+
state-layer-color: map.get($systems, md-sys-color, on-primary),
|
|
19
|
+
disabled-state-layer-color: map.get($systems, md-sys-color, on-surface-variant),
|
|
20
|
+
ripple-color: sass-utils.safe-color-change(
|
|
21
|
+
map.get($systems, md-sys-color, on-primary),
|
|
22
|
+
$alpha: map.get($systems, md-sys-state, pressed-state-layer-opacity)
|
|
23
|
+
),
|
|
24
|
+
hover-state-layer-opacity: map.get($systems, md-sys-state, hover-state-layer-opacity),
|
|
25
|
+
focus-state-layer-opacity: map.get($systems, md-sys-state, focus-state-layer-opacity),
|
|
26
|
+
pressed-state-layer-opacity: map.get($systems, md-sys-state, pressed-state-layer-opacity),
|
|
27
|
+
), (
|
|
28
|
+
// Color variants:
|
|
29
|
+
primary: (), // Default, no overrides needed.
|
|
30
|
+
secondary: (
|
|
31
|
+
state-layer-color: map.get($systems, md-sys-color, on-secondary),
|
|
32
|
+
ripple-color: sass-utils.safe-color-change(
|
|
33
|
+
map.get($systems, md-sys-color, on-secondary),
|
|
34
|
+
$alpha: map.get($systems, md-sys-state, pressed-state-layer-opacity)
|
|
35
|
+
),
|
|
36
|
+
),
|
|
37
|
+
tertiary: (
|
|
38
|
+
state-layer-color: map.get($systems, md-sys-color, on-tertiary),
|
|
39
|
+
ripple-color: sass-utils.safe-color-change(
|
|
40
|
+
map.get($systems, md-sys-color, on-tertiary),
|
|
41
|
+
$alpha: map.get($systems, md-sys-state, pressed-state-layer-opacity)
|
|
42
|
+
),
|
|
43
|
+
),
|
|
44
|
+
error: (
|
|
45
|
+
state-layer-color: map.get($systems, md-sys-color, on-error),
|
|
46
|
+
ripple-color: sass-utils.safe-color-change(
|
|
47
|
+
map.get($systems, md-sys-color, on-error),
|
|
48
|
+
$alpha: map.get($systems, md-sys-state, pressed-state-layer-opacity)
|
|
49
|
+
),
|
|
50
|
+
)
|
|
51
|
+
));
|
|
52
|
+
|
|
53
|
+
@return token-utils.namespace-tokens($prefix, $tokens, $token-slots);
|
|
54
|
+
}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
@use 'sass:map';
|
|
2
|
+
@use '../../../style/sass-utils';
|
|
3
|
+
@use '../../token-utils';
|
|
4
|
+
|
|
5
|
+
// The prefix used to generate the fully qualified name for tokens in this file.
|
|
6
|
+
$prefix: (mat, form-field);
|
|
7
|
+
|
|
8
|
+
/// Generates custom tokens for the mat-form-field.
|
|
9
|
+
/// @param {Map} $systems The MDC system tokens
|
|
10
|
+
/// @param {Boolean} $exclude-hardcoded Whether to exclude hardcoded token values
|
|
11
|
+
/// @param {Map} $token-slots Possible token slots
|
|
12
|
+
/// @return {Map} A set of custom tokens for the mat-form-field
|
|
13
|
+
@function get-tokens($systems, $exclude-hardcoded, $token-slots) {
|
|
14
|
+
$tokens: sass-utils.merge-all(
|
|
15
|
+
token-utils.generate-typography-tokens($systems, container-text, body-large),
|
|
16
|
+
token-utils.generate-typography-tokens($systems, subscript-text, body-small),
|
|
17
|
+
(
|
|
18
|
+
disabled-input-text-placeholder-color: sass-utils.safe-color-change(
|
|
19
|
+
map.get($systems, md-sys-color, on-surface), $alpha: 0.38),
|
|
20
|
+
state-layer-color: map.get($systems, md-sys-color, on-surface),
|
|
21
|
+
error-text-color: map.get($systems, md-sys-color, error),
|
|
22
|
+
select-option-text-color: map.get($systems, md-ref-palette, neutral10),
|
|
23
|
+
select-disabled-option-text-color: sass-utils.safe-color-change(
|
|
24
|
+
map.get($systems, md-ref-palette, neutral10), $alpha: 0.38),
|
|
25
|
+
enabled-select-arrow-color: map.get($systems, md-sys-color, on-surface-variant),
|
|
26
|
+
disabled-select-arrow-color: sass-utils.safe-color-change(
|
|
27
|
+
map.get($systems, md-sys-color, on-surface), $alpha: 0.38),
|
|
28
|
+
hover-state-layer-opacity: map.get($systems, md-sys-state, hover-state-layer-opacity),
|
|
29
|
+
focus-state-layer-opacity: token-utils.hardcode(0, $exclude-hardcoded),
|
|
30
|
+
focus-select-arrow-color: map.get($systems, md-sys-color, primary),
|
|
31
|
+
outlined-label-text-populated-size: map.get($systems, md-sys-typeface, body-large-size),
|
|
32
|
+
|
|
33
|
+
leading-icon-color: map.get($systems, md-sys-color, on-surface-variant),
|
|
34
|
+
disabled-leading-icon-color: sass-utils.safe-color-change(
|
|
35
|
+
map.get($systems, md-sys-color, on-surface), $alpha: 0.38),
|
|
36
|
+
|
|
37
|
+
trailing-icon-color: map.get($systems, md-sys-color, on-surface-variant),
|
|
38
|
+
disabled-trailing-icon-color: sass-utils.safe-color-change(
|
|
39
|
+
map.get($systems, md-sys-color, on-surface), $alpha: 0.38),
|
|
40
|
+
error-focus-trailing-icon-color: map.get($systems, md-sys-color, error),
|
|
41
|
+
error-hover-trailing-icon-color: map.get($systems, md-sys-color, on-error-container),
|
|
42
|
+
error-trailing-icon-color: map.get($systems, md-sys-color, error),
|
|
43
|
+
)
|
|
44
|
+
), (
|
|
45
|
+
// Color variants:
|
|
46
|
+
primary: (), // Default, no overrides needed.
|
|
47
|
+
secondary: (
|
|
48
|
+
focus-select-arrow-color: map.get($systems, md-sys-color, secondary),
|
|
49
|
+
),
|
|
50
|
+
tertiary: (
|
|
51
|
+
focus-select-arrow-color: map.get($systems, md-sys-color, tertiary),
|
|
52
|
+
),
|
|
53
|
+
error: (
|
|
54
|
+
focus-select-arrow-color: map.get($systems, md-sys-color, error),
|
|
55
|
+
)
|
|
56
|
+
);
|
|
57
|
+
|
|
58
|
+
@return token-utils.namespace-tokens($prefix, $tokens, $token-slots);
|
|
59
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
@use 'sass:map';
|
|
2
|
+
@use '../../../style/sass-utils';
|
|
3
|
+
@use '../../token-utils';
|
|
4
|
+
|
|
5
|
+
// The prefix used to generate the fully qualified name for tokens in this file.
|
|
6
|
+
$prefix: (mat, full-pseudo-checkbox);
|
|
7
|
+
|
|
8
|
+
/// Generates custom tokens for the full variant of mat-pseudo-checkbox.
|
|
9
|
+
/// @param {Map} $systems The MDC system tokens
|
|
10
|
+
/// @param {Boolean} $exclude-hardcoded Whether to exclude hardcoded token values
|
|
11
|
+
/// @param {Map} $token-slots Possible token slots
|
|
12
|
+
/// @return {Map} A set of custom tokens for the full variant of mat-pseudo-checkbox
|
|
13
|
+
@function get-tokens($systems, $exclude-hardcoded, $token-slots) {
|
|
14
|
+
$disabled-color: sass-utils.safe-color-change(
|
|
15
|
+
map.get($systems, md-sys-color, on-surface), $alpha: 0.38);
|
|
16
|
+
|
|
17
|
+
$tokens: ((
|
|
18
|
+
selected-icon-color: map.get($systems, md-sys-color, primary),
|
|
19
|
+
selected-checkmark-color: map.get($systems, md-sys-color, on-primary),
|
|
20
|
+
unselected-icon-color: map.get($systems, md-sys-color, on-surface-variant),
|
|
21
|
+
disabled-selected-checkmark-color: map.get($systems, md-sys-color, surface),
|
|
22
|
+
disabled-unselected-icon-color: $disabled-color,
|
|
23
|
+
disabled-selected-icon-color: $disabled-color,
|
|
24
|
+
), (
|
|
25
|
+
// Color variants:
|
|
26
|
+
primary: (), // Default, no overrides needed.
|
|
27
|
+
secondary: (
|
|
28
|
+
selected-icon-color: map.get($systems, md-sys-color, secondary),
|
|
29
|
+
selected-checkmark-color: map.get($systems, md-sys-color, on-secondary),
|
|
30
|
+
),
|
|
31
|
+
tertiary: (
|
|
32
|
+
selected-icon-color: map.get($systems, md-sys-color, tertiary),
|
|
33
|
+
selected-checkmark-color: map.get($systems, md-sys-color, on-tertiary),
|
|
34
|
+
),
|
|
35
|
+
error: (
|
|
36
|
+
selected-icon-color: map.get($systems, md-sys-color, error),
|
|
37
|
+
selected-checkmark-color: map.get($systems, md-sys-color, on-error),
|
|
38
|
+
)
|
|
39
|
+
));
|
|
40
|
+
|
|
41
|
+
@return token-utils.namespace-tokens($prefix, $tokens, $token-slots);
|
|
42
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
@use 'sass:map';
|
|
2
|
+
@use '../../token-utils';
|
|
3
|
+
|
|
4
|
+
// The prefix used to generate the fully qualified name for tokens in this file.
|
|
5
|
+
$prefix: (mat, grid-list);
|
|
6
|
+
|
|
7
|
+
/// Generates custom tokens for the mat-grid-list.
|
|
8
|
+
/// @param {Map} $systems The MDC system tokens
|
|
9
|
+
/// @param {Boolean} $exclude-hardcoded Whether to exclude hardcoded token values
|
|
10
|
+
/// @param {Map} $token-slots Possible token slots
|
|
11
|
+
/// @return {Map} A set of custom tokens for the mat-grid-list
|
|
12
|
+
@function get-tokens($systems, $exclude-hardcoded, $token-slots) {
|
|
13
|
+
$tokens: (
|
|
14
|
+
tile-header-primary-text-size: map.get($systems, md-sys-typescale, body-large),
|
|
15
|
+
tile-header-secondary-text-size: map.get($systems, md-sys-typescale, body-medium),
|
|
16
|
+
tile-footer-primary-text-size: map.get($systems, md-sys-typescale, body-large),
|
|
17
|
+
tile-footer-secondary-text-size: map.get($systems, md-sys-typescale, body-medium),
|
|
18
|
+
);
|
|
19
|
+
|
|
20
|
+
@return token-utils.namespace-tokens($prefix, $tokens, $token-slots);
|
|
21
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
@use 'sass:map';
|
|
2
|
+
@use '../../../style/sass-utils';
|
|
3
|
+
@use '../../token-utils';
|
|
4
|
+
|
|
5
|
+
// The prefix used to generate the fully qualified name for tokens in this file.
|
|
6
|
+
$prefix: (mat, icon-button);
|
|
7
|
+
|
|
8
|
+
/// Generates custom tokens for the mat-icon-button.
|
|
9
|
+
/// @param {Map} $systems The MDC system tokens
|
|
10
|
+
/// @param {Boolean} $exclude-hardcoded Whether to exclude hardcoded token values
|
|
11
|
+
/// @param {Map} $token-slots Possible token slots
|
|
12
|
+
/// @return {Map} A set of custom tokens for the mat-icon-button
|
|
13
|
+
@function get-tokens($systems, $exclude-hardcoded, $token-slots) {
|
|
14
|
+
$tokens: (
|
|
15
|
+
state-layer-color: map.get($systems, md-sys-color, on-surface-variant),
|
|
16
|
+
disabled-state-layer-color: map.get($systems, md-sys-color, on-surface-variant),
|
|
17
|
+
ripple-color: sass-utils.safe-color-change(
|
|
18
|
+
map.get($systems, md-sys-color, on-surface-variant),
|
|
19
|
+
$alpha: map.get($systems, md-sys-state, pressed-state-layer-opacity)
|
|
20
|
+
),
|
|
21
|
+
hover-state-layer-opacity: map.get($systems, md-sys-state, hover-state-layer-opacity),
|
|
22
|
+
focus-state-layer-opacity: map.get($systems, md-sys-state, focus-state-layer-opacity),
|
|
23
|
+
pressed-state-layer-opacity: map.get($systems, md-sys-state, pressed-state-layer-opacity),
|
|
24
|
+
);
|
|
25
|
+
|
|
26
|
+
@return token-utils.namespace-tokens($prefix, $tokens, $token-slots);
|
|
27
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
@use 'sass:map';
|
|
2
|
+
@use '../../token-utils';
|
|
3
|
+
|
|
4
|
+
// The prefix used to generate the fully qualified name for tokens in this file.
|
|
5
|
+
$prefix: (mat, icon);
|
|
6
|
+
|
|
7
|
+
/// Generates custom tokens for the mat-icon.
|
|
8
|
+
/// @param {Map} $systems The MDC system tokens
|
|
9
|
+
/// @param {Boolean} $exclude-hardcoded Whether to exclude hardcoded token values
|
|
10
|
+
/// @param {Map} $token-slots Possible token slots
|
|
11
|
+
/// @return {Map} A set of custom tokens for the mat-icon
|
|
12
|
+
@function get-tokens($systems, $exclude-hardcoded, $token-slots) {
|
|
13
|
+
$tokens: ((
|
|
14
|
+
color: token-utils.hardcode(inherit, $exclude-hardcoded),
|
|
15
|
+
), (
|
|
16
|
+
// Color variants:
|
|
17
|
+
surface: (), // Default, no overrides needed.
|
|
18
|
+
primary: (
|
|
19
|
+
color: map.get($systems, md-sys-color, primary),
|
|
20
|
+
),
|
|
21
|
+
secondary: (
|
|
22
|
+
color: map.get($systems, md-sys-color, secondary),
|
|
23
|
+
),
|
|
24
|
+
tertiary: (
|
|
25
|
+
color: map.get($systems, md-sys-color, tertiary),
|
|
26
|
+
),
|
|
27
|
+
error: (
|
|
28
|
+
color: map.get($systems, md-sys-color, error),
|
|
29
|
+
)
|
|
30
|
+
));
|
|
31
|
+
|
|
32
|
+
@return token-utils.namespace-tokens($prefix, $tokens, $token-slots);
|
|
33
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
@use 'sass:map';
|
|
2
|
+
@use '../../token-utils';
|
|
3
|
+
|
|
4
|
+
// The prefix used to generate the fully qualified name for tokens in this file.
|
|
5
|
+
$prefix: (mat, list);
|
|
6
|
+
|
|
7
|
+
/// Generates custom tokens for the mat-list.
|
|
8
|
+
/// @param {Map} $systems The MDC system tokens
|
|
9
|
+
/// @param {Boolean} $exclude-hardcoded Whether to exclude hardcoded token values
|
|
10
|
+
/// @param {Map} $token-slots Possible token slots
|
|
11
|
+
/// @return {Map} A set of custom tokens for the mat-list
|
|
12
|
+
@function get-tokens($systems, $exclude-hardcoded, $token-slots) {
|
|
13
|
+
$tokens: (
|
|
14
|
+
active-indicator-color: map.get($systems, md-sys-color, secondary-container),
|
|
15
|
+
active-indicator-shape: map.get($systems, md-sys-shape, corner-full),
|
|
16
|
+
);
|
|
17
|
+
|
|
18
|
+
@return token-utils.namespace-tokens($prefix, $tokens, $token-slots);
|
|
19
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
@use 'sass:map';
|
|
2
|
+
@use '../../../style/sass-utils';
|
|
3
|
+
@use '../../token-utils';
|
|
4
|
+
|
|
5
|
+
// The prefix used to generate the fully qualified name for tokens in this file.
|
|
6
|
+
$prefix: (mat, menu);
|
|
7
|
+
|
|
8
|
+
/// Generates custom tokens for the mat-menu.
|
|
9
|
+
/// @param {Map} $systems The MDC system tokens
|
|
10
|
+
/// @param {Boolean} $exclude-hardcoded Whether to exclude hardcoded token values
|
|
11
|
+
/// @param {Map} $token-slots Possible token slots
|
|
12
|
+
/// @return {Map} A set of custom tokens for the mat-menu
|
|
13
|
+
@function get-tokens($systems, $exclude-hardcoded, $token-slots) {
|
|
14
|
+
$tokens: sass-utils.merge-all(
|
|
15
|
+
token-utils.generate-typography-tokens($systems, item-label-text, label-large),
|
|
16
|
+
(
|
|
17
|
+
container-shape: map.get($systems, md-sys-shape, corner-extra-small),
|
|
18
|
+
divider-color: map.get($systems, md-sys-color, surface-variant),
|
|
19
|
+
divider-bottom-spacing: token-utils.hardcode(8px, $exclude-hardcoded),
|
|
20
|
+
divider-top-spacing: token-utils.hardcode(8px, $exclude-hardcoded),
|
|
21
|
+
item-label-text-color: map.get($systems, md-sys-color, on-surface),
|
|
22
|
+
item-icon-color: map.get($systems, md-sys-color, on-surface-variant),
|
|
23
|
+
item-icon-size: token-utils.hardcode(24px, $exclude-hardcoded),
|
|
24
|
+
item-hover-state-layer-color: sass-utils.safe-color-change(
|
|
25
|
+
map.get($systems, md-sys-color, on-surface),
|
|
26
|
+
$alpha: map.get($systems, md-sys-state, hover-state-layer-opacity)
|
|
27
|
+
),
|
|
28
|
+
item-focus-state-layer-color: sass-utils.safe-color-change(
|
|
29
|
+
map.get($systems, md-sys-color, on-surface),
|
|
30
|
+
$alpha: map.get($systems, md-sys-state, focus-state-layer-opacity)
|
|
31
|
+
),
|
|
32
|
+
item-spacing: token-utils.hardcode(12px, $exclude-hardcoded),
|
|
33
|
+
item-leading-spacing: token-utils.hardcode(12px, $exclude-hardcoded),
|
|
34
|
+
item-trailing-spacing: token-utils.hardcode(12px, $exclude-hardcoded),
|
|
35
|
+
item-with-icon-leading-spacing: token-utils.hardcode(12px, $exclude-hardcoded),
|
|
36
|
+
item-with-icon-trailing-spacing: token-utils.hardcode(12px, $exclude-hardcoded),
|
|
37
|
+
container-color: map.get($systems, md-sys-color, surface-container),
|
|
38
|
+
)
|
|
39
|
+
);
|
|
40
|
+
|
|
41
|
+
@return token-utils.namespace-tokens($prefix, $tokens, $token-slots);
|
|
42
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
@use 'sass:map';
|
|
2
|
+
@use '../../../style/sass-utils';
|
|
3
|
+
@use '../../token-utils';
|
|
4
|
+
|
|
5
|
+
// The prefix used to generate the fully qualified name for tokens in this file.
|
|
6
|
+
$prefix: (mat, minimal-pseudo-checkbox);
|
|
7
|
+
|
|
8
|
+
/// Generates custom tokens for the minimal variant of mat-pseudo-checkbox.
|
|
9
|
+
/// @param {Map} $systems The MDC system tokens
|
|
10
|
+
/// @param {Boolean} $exclude-hardcoded Whether to exclude hardcoded token values
|
|
11
|
+
/// @param {Map} $token-slots Possible token slots
|
|
12
|
+
/// @return {Map} A set of custom tokens for the minimal variant of mat-pseudo-checkbox
|
|
13
|
+
@function get-tokens($systems, $exclude-hardcoded, $token-slots) {
|
|
14
|
+
$tokens: ((
|
|
15
|
+
selected-checkmark-color: map.get($systems, md-sys-color, primary),
|
|
16
|
+
disabled-selected-checkmark-color: sass-utils.safe-color-change(
|
|
17
|
+
map.get($systems, md-sys-color, on-surface), $alpha: 0.38),
|
|
18
|
+
), (
|
|
19
|
+
// Color variants:
|
|
20
|
+
primary: (), // Default, no overrides needed.
|
|
21
|
+
secondary: (
|
|
22
|
+
selected-checkmark-color: map.get($systems, md-sys-color, secondary),
|
|
23
|
+
),
|
|
24
|
+
tertiary: (
|
|
25
|
+
selected-checkmark-color: map.get($systems, md-sys-color, tertiary),
|
|
26
|
+
),
|
|
27
|
+
error: (
|
|
28
|
+
selected-checkmark-color: map.get($systems, md-sys-color, error),
|
|
29
|
+
)
|
|
30
|
+
));
|
|
31
|
+
|
|
32
|
+
@return token-utils.namespace-tokens($prefix, $tokens, $token-slots);
|
|
33
|
+
}
|