@angular/material 20.0.0-next.1 → 20.0.0-next.2
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/_autocomplete-theme.scss +4 -4
- package/autocomplete/index.d.ts +4 -0
- package/badge/_badge-theme.scss +5 -5
- package/bottom-sheet/_bottom-sheet-theme.scss +3 -3
- package/button/_button-theme.scss +84 -32
- package/button/_fab-theme.scss +13 -13
- package/button/_icon-button-theme.scss +5 -5
- package/button/index.d.ts +1 -1
- package/button/testing/index.d.ts +9 -2
- package/button-toggle/_button-toggle-theme.scss +8 -8
- package/card/_card-theme.scss +12 -12
- package/checkbox/_checkbox-theme.scss +10 -10
- package/chips/_chips-theme.scss +14 -14
- package/core/_core-theme.scss +2 -2
- package/core/option/_optgroup-theme.scss +2 -2
- package/core/option/_option-theme.scss +4 -4
- package/core/ripple/_ripple-theme.scss +3 -3
- package/core/selection/pseudo-checkbox/_pseudo-checkbox-theme.scss +4 -4
- package/core/theming/_color-api-backwards-compatibility.scss +19 -8
- package/core/tokens/_density.scss +3 -0
- package/core/tokens/_token-definition.scss +1 -2
- package/core/tokens/_token-utils.scss +20 -5
- package/core/tokens/m2/_index.scss +2 -0
- package/core/tokens/m2/mat/_tonal-button.scss +110 -0
- package/core/tokens/m3/_index.scss +2 -0
- package/core/tokens/m3/definitions/_index.scss +1 -1
- package/core/tokens/m3/definitions/_md-comp-elevated-card.scss +3 -1
- package/core/tokens/m3/definitions/_md-sys-color.scss +44 -2
- package/core/tokens/m3/definitions/_md-sys-typescale.scss +20 -1
- package/core/tokens/m3/mat/_tonal-button.scss +101 -0
- package/datepicker/_datepicker-theme.scss +8 -7
- package/datepicker/index.d.ts +1 -1
- package/dialog/_dialog-theme.scss +6 -6
- package/divider/_divider-theme.scss +2 -2
- package/expansion/_expansion-theme.scss +4 -4
- package/fesm2022/autocomplete.mjs +3 -0
- package/fesm2022/autocomplete.mjs.map +1 -1
- package/fesm2022/button/testing.mjs +34 -15
- package/fesm2022/button/testing.mjs.map +1 -1
- package/fesm2022/button.mjs +2 -2
- package/fesm2022/core.mjs +1 -1
- package/fesm2022/core.mjs.map +1 -1
- package/fesm2022/{date-range-input-harness-ee47cdb0.mjs → date-range-input-harness-de70be6a.mjs} +2 -2
- package/fesm2022/{date-range-input-harness-ee47cdb0.mjs.map → date-range-input-harness-de70be6a.mjs.map} +1 -1
- package/fesm2022/datepicker/testing.mjs +3 -3
- package/fesm2022/datepicker.mjs +8 -8
- package/fesm2022/datepicker.mjs.map +1 -1
- package/fesm2022/dialog/testing.mjs.map +1 -1
- package/fesm2022/divider/testing.mjs +1 -1
- package/fesm2022/{divider-harness-3394f29a.mjs → divider-harness-8099453f.mjs} +1 -1
- package/fesm2022/divider-harness-8099453f.mjs.map +1 -0
- package/fesm2022/expansion/testing.mjs.map +1 -1
- package/fesm2022/form-field/testing/control.mjs +1 -1
- package/fesm2022/form-field/testing.mjs +4 -4
- package/fesm2022/form-field/testing.mjs.map +1 -1
- package/fesm2022/{form-field-control-harness-af6fd278.mjs → form-field-control-harness-efefd4cf.mjs} +1 -1
- package/fesm2022/form-field-control-harness-efefd4cf.mjs.map +1 -0
- package/fesm2022/grid-list/testing.mjs.map +1 -1
- package/fesm2022/icon-button-0850d958.mjs +211 -0
- package/fesm2022/icon-button-0850d958.mjs.map +1 -0
- package/fesm2022/input/testing.mjs +2 -2
- package/fesm2022/input/testing.mjs.map +1 -1
- package/fesm2022/{input-harness-ed59decc.mjs → input-harness-e68bb132.mjs} +2 -2
- package/fesm2022/input-harness-e68bb132.mjs.map +1 -0
- package/fesm2022/list/testing.mjs +1 -1
- package/fesm2022/list/testing.mjs.map +1 -1
- package/fesm2022/{module-3bf2775f.mjs → module-1c16a0a9.mjs} +3 -3
- package/fesm2022/{module-3bf2775f.mjs.map → module-1c16a0a9.mjs.map} +1 -1
- package/fesm2022/module-cf951a02.mjs +214 -0
- package/fesm2022/module-cf951a02.mjs.map +1 -0
- package/fesm2022/paginator/testing.mjs +2 -2
- package/fesm2022/paginator.mjs +5 -5
- package/fesm2022/paginator.mjs.map +1 -1
- package/fesm2022/select/testing.mjs +2 -2
- package/fesm2022/{select-harness-8c55824d.mjs → select-harness-69d47123.mjs} +2 -2
- package/fesm2022/{select-harness-8c55824d.mjs.map → select-harness-69d47123.mjs.map} +1 -1
- package/fesm2022/select.mjs +1 -1
- package/fesm2022/slider.mjs +5 -2
- package/fesm2022/slider.mjs.map +1 -1
- package/fesm2022/snack-bar.mjs +4 -4
- package/fesm2022/snack-bar.mjs.map +1 -1
- package/fesm2022/timepicker.mjs +8 -4
- package/fesm2022/timepicker.mjs.map +1 -1
- package/form-field/_form-field-theme.scss +16 -16
- package/grid-list/_grid-list-theme.scss +1 -1
- package/icon/_icon-theme.scss +2 -2
- package/list/_list-theme.scss +15 -15
- package/menu/_menu-theme.scss +3 -3
- package/{module.d-18a67f56.d.ts → module.d-792a497c.d.ts} +33 -26
- package/package.json +2 -2
- package/paginator/_paginator-theme.scss +3 -3
- package/paginator/index.d.ts +1 -1
- package/prebuilt-themes/deeppurple-amber.css +1 -1
- package/prebuilt-themes/indigo-pink.css +1 -1
- package/prebuilt-themes/pink-bluegrey.css +1 -1
- package/prebuilt-themes/purple-green.css +1 -1
- package/progress-bar/_progress-bar-theme.scss +2 -2
- package/progress-spinner/_progress-spinner-theme.scss +4 -4
- package/radio/_radio-theme.scss +12 -12
- package/schematics/ng-add/index.js +1 -1
- package/schematics/ng-add/index.mjs +1 -1
- package/schematics/ng-generate/address-form/files/__path__/__name@dasherize@if-flat__/__name@dasherize__.component.html.template +2 -2
- package/schematics/ng-generate/dashboard/files/__path__/__name@dasherize@if-flat__/__name@dasherize__.component.html.template +1 -1
- package/schematics/ng-generate/navigation/files/__path__/__name@dasherize@if-flat__/__name@dasherize__.component.html.template +1 -1
- package/schematics/ng-generate/tree/files/__path__/__name@dasherize@if-flat__/__name@dasherize__.component.html.template +2 -2
- package/select/_select-theme.scss +6 -6
- package/sidenav/_sidenav-theme.scss +2 -2
- package/slide-toggle/_slide-toggle-theme.scss +10 -10
- package/slider/_slider-theme.scss +10 -10
- package/snack-bar/_snack-bar-theme.scss +4 -4
- package/snack-bar/index.d.ts +1 -1
- package/sort/_sort-theme.scss +3 -3
- package/stepper/_stepper-theme.scss +5 -5
- package/table/_table-theme.scss +4 -4
- package/tabs/_tabs-theme.scss +16 -16
- package/timepicker/_timepicker-theme.scss +4 -4
- package/toolbar/_toolbar-theme.scss +4 -4
- package/tooltip/_tooltip-theme.scss +4 -4
- package/tree/_tree-theme.scss +3 -3
- package/fesm2022/divider-harness-3394f29a.mjs.map +0 -1
- package/fesm2022/form-field-control-harness-af6fd278.mjs.map +0 -1
- package/fesm2022/icon-button-47f1b5d9.mjs +0 -248
- package/fesm2022/icon-button-47f1b5d9.mjs.map +0 -1
- package/fesm2022/input-harness-ed59decc.mjs.map +0 -1
- package/fesm2022/module-df9f7af3.mjs +0 -152
- package/fesm2022/module-df9f7af3.mjs.map +0 -1
- /package/core/tokens/m3/definitions/{unused/_md-comp-filled-tonal-button.scss → _md-comp-filled-tonal-button.scss} +0 -0
package/card/_card-theme.scss
CHANGED
|
@@ -14,15 +14,15 @@
|
|
|
14
14
|
@include _theme-from-tokens(inspection.get-theme-tokens($theme, base));
|
|
15
15
|
} @else {
|
|
16
16
|
@include sass-utils.current-selector-or-root() {
|
|
17
|
-
@include token-utils.create-token-values(
|
|
17
|
+
@include token-utils.create-token-values-mixed(
|
|
18
18
|
tokens-mdc-elevated-card.$prefix,
|
|
19
19
|
tokens-mdc-elevated-card.get-unthemable-tokens()
|
|
20
20
|
);
|
|
21
|
-
@include token-utils.create-token-values(
|
|
21
|
+
@include token-utils.create-token-values-mixed(
|
|
22
22
|
tokens-mdc-outlined-card.$prefix,
|
|
23
23
|
tokens-mdc-outlined-card.get-unthemable-tokens()
|
|
24
24
|
);
|
|
25
|
-
@include token-utils.create-token-values(
|
|
25
|
+
@include token-utils.create-token-values-mixed(
|
|
26
26
|
tokens-mat-card.$prefix,
|
|
27
27
|
tokens-mat-card.get-unthemable-tokens()
|
|
28
28
|
);
|
|
@@ -35,15 +35,15 @@
|
|
|
35
35
|
@include _theme-from-tokens(inspection.get-theme-tokens($theme, color));
|
|
36
36
|
} @else {
|
|
37
37
|
@include sass-utils.current-selector-or-root() {
|
|
38
|
-
@include token-utils.create-token-values(
|
|
38
|
+
@include token-utils.create-token-values-mixed(
|
|
39
39
|
tokens-mdc-elevated-card.$prefix,
|
|
40
40
|
tokens-mdc-elevated-card.get-color-tokens($theme)
|
|
41
41
|
);
|
|
42
|
-
@include token-utils.create-token-values(
|
|
42
|
+
@include token-utils.create-token-values-mixed(
|
|
43
43
|
tokens-mdc-outlined-card.$prefix,
|
|
44
44
|
tokens-mdc-outlined-card.get-color-tokens($theme)
|
|
45
45
|
);
|
|
46
|
-
@include token-utils.create-token-values(
|
|
46
|
+
@include token-utils.create-token-values-mixed(
|
|
47
47
|
tokens-mat-card.$prefix,
|
|
48
48
|
tokens-mat-card.get-color-tokens($theme)
|
|
49
49
|
);
|
|
@@ -56,15 +56,15 @@
|
|
|
56
56
|
@include _theme-from-tokens(inspection.get-theme-tokens($theme, typography));
|
|
57
57
|
} @else {
|
|
58
58
|
@include sass-utils.current-selector-or-root() {
|
|
59
|
-
@include token-utils.create-token-values(
|
|
59
|
+
@include token-utils.create-token-values-mixed(
|
|
60
60
|
tokens-mdc-elevated-card.$prefix,
|
|
61
61
|
tokens-mdc-elevated-card.get-typography-tokens($theme)
|
|
62
62
|
);
|
|
63
|
-
@include token-utils.create-token-values(
|
|
63
|
+
@include token-utils.create-token-values-mixed(
|
|
64
64
|
tokens-mdc-outlined-card.$prefix,
|
|
65
65
|
tokens-mdc-outlined-card.get-typography-tokens($theme)
|
|
66
66
|
);
|
|
67
|
-
@include token-utils.create-token-values(
|
|
67
|
+
@include token-utils.create-token-values-mixed(
|
|
68
68
|
tokens-mat-card.$prefix,
|
|
69
69
|
tokens-mat-card.get-typography-tokens($theme)
|
|
70
70
|
);
|
|
@@ -77,15 +77,15 @@
|
|
|
77
77
|
@include _theme-from-tokens(inspection.get-theme-tokens($theme, density));
|
|
78
78
|
} @else {
|
|
79
79
|
@include sass-utils.current-selector-or-root() {
|
|
80
|
-
@include token-utils.create-token-values(
|
|
80
|
+
@include token-utils.create-token-values-mixed(
|
|
81
81
|
tokens-mdc-elevated-card.$prefix,
|
|
82
82
|
tokens-mdc-elevated-card.get-density-tokens($theme)
|
|
83
83
|
);
|
|
84
|
-
@include token-utils.create-token-values(
|
|
84
|
+
@include token-utils.create-token-values-mixed(
|
|
85
85
|
tokens-mdc-outlined-card.$prefix,
|
|
86
86
|
tokens-mdc-outlined-card.get-density-tokens($theme)
|
|
87
87
|
);
|
|
88
|
-
@include token-utils.create-token-values(
|
|
88
|
+
@include token-utils.create-token-values-mixed(
|
|
89
89
|
tokens-mat-card.$prefix,
|
|
90
90
|
tokens-mat-card.get-density-tokens($theme)
|
|
91
91
|
);
|
|
@@ -15,11 +15,11 @@
|
|
|
15
15
|
@include _theme-from-tokens(inspection.get-theme-tokens($theme, base));
|
|
16
16
|
} @else {
|
|
17
17
|
@include sass-utils.current-selector-or-root() {
|
|
18
|
-
@include token-utils.create-token-values(
|
|
18
|
+
@include token-utils.create-token-values-mixed(
|
|
19
19
|
tokens-mdc-checkbox.$prefix,
|
|
20
20
|
tokens-mdc-checkbox.get-unthemable-tokens()
|
|
21
21
|
);
|
|
22
|
-
@include token-utils.create-token-values(
|
|
22
|
+
@include token-utils.create-token-values-mixed(
|
|
23
23
|
tokens-mat-checkbox.$prefix,
|
|
24
24
|
tokens-mat-checkbox.get-unthemable-tokens()
|
|
25
25
|
);
|
|
@@ -37,11 +37,11 @@
|
|
|
37
37
|
@include _theme-from-tokens(inspection.get-theme-tokens($theme, color), $options...);
|
|
38
38
|
} @else {
|
|
39
39
|
@include sass-utils.current-selector-or-root() {
|
|
40
|
-
@include token-utils.create-token-values(
|
|
40
|
+
@include token-utils.create-token-values-mixed(
|
|
41
41
|
tokens-mdc-checkbox.$prefix,
|
|
42
42
|
tokens-mdc-checkbox.get-color-tokens($theme)
|
|
43
43
|
);
|
|
44
|
-
@include token-utils.create-token-values(
|
|
44
|
+
@include token-utils.create-token-values-mixed(
|
|
45
45
|
tokens-mat-checkbox.$prefix,
|
|
46
46
|
tokens-mat-checkbox.get-color-tokens($theme)
|
|
47
47
|
);
|
|
@@ -49,14 +49,14 @@
|
|
|
49
49
|
|
|
50
50
|
.mat-mdc-checkbox {
|
|
51
51
|
&.mat-primary {
|
|
52
|
-
@include token-utils.create-token-values(
|
|
52
|
+
@include token-utils.create-token-values-mixed(
|
|
53
53
|
tokens-mdc-checkbox.$prefix,
|
|
54
54
|
tokens-mdc-checkbox.get-color-tokens($theme, primary)
|
|
55
55
|
);
|
|
56
56
|
}
|
|
57
57
|
|
|
58
58
|
&.mat-warn {
|
|
59
|
-
@include token-utils.create-token-values(
|
|
59
|
+
@include token-utils.create-token-values-mixed(
|
|
60
60
|
tokens-mdc-checkbox.$prefix,
|
|
61
61
|
tokens-mdc-checkbox.get-color-tokens($theme, warn)
|
|
62
62
|
);
|
|
@@ -72,11 +72,11 @@
|
|
|
72
72
|
@include _theme-from-tokens(inspection.get-theme-tokens($theme, typography));
|
|
73
73
|
} @else {
|
|
74
74
|
@include sass-utils.current-selector-or-root() {
|
|
75
|
-
@include token-utils.create-token-values(
|
|
75
|
+
@include token-utils.create-token-values-mixed(
|
|
76
76
|
tokens-mdc-checkbox.$prefix,
|
|
77
77
|
tokens-mdc-checkbox.get-typography-tokens($theme)
|
|
78
78
|
);
|
|
79
|
-
@include token-utils.create-token-values(
|
|
79
|
+
@include token-utils.create-token-values-mixed(
|
|
80
80
|
tokens-mat-checkbox.$prefix,
|
|
81
81
|
tokens-mat-checkbox.get-typography-tokens($theme)
|
|
82
82
|
);
|
|
@@ -93,11 +93,11 @@
|
|
|
93
93
|
@include _theme-from-tokens(inspection.get-theme-tokens($theme, density));
|
|
94
94
|
} @else {
|
|
95
95
|
@include sass-utils.current-selector-or-root() {
|
|
96
|
-
@include token-utils.create-token-values(
|
|
96
|
+
@include token-utils.create-token-values-mixed(
|
|
97
97
|
tokens-mdc-checkbox.$prefix,
|
|
98
98
|
tokens-mdc-checkbox.get-density-tokens($theme)
|
|
99
99
|
);
|
|
100
|
-
@include token-utils.create-token-values(
|
|
100
|
+
@include token-utils.create-token-values-mixed(
|
|
101
101
|
tokens-mat-checkbox.$prefix,
|
|
102
102
|
tokens-mat-checkbox.get-density-tokens($theme)
|
|
103
103
|
);
|
package/chips/_chips-theme.scss
CHANGED
|
@@ -15,11 +15,11 @@
|
|
|
15
15
|
@include _theme-from-tokens(inspection.get-theme-tokens($theme, base));
|
|
16
16
|
} @else {
|
|
17
17
|
.mat-mdc-standard-chip {
|
|
18
|
-
@include token-utils.create-token-values(
|
|
18
|
+
@include token-utils.create-token-values-mixed(
|
|
19
19
|
tokens-mdc-chip.$prefix,
|
|
20
20
|
tokens-mdc-chip.get-unthemable-tokens()
|
|
21
21
|
);
|
|
22
|
-
@include token-utils.create-token-values(
|
|
22
|
+
@include token-utils.create-token-values-mixed(
|
|
23
23
|
tokens-mat-chip.$prefix,
|
|
24
24
|
tokens-mat-chip.get-unthemable-tokens()
|
|
25
25
|
);
|
|
@@ -37,11 +37,11 @@
|
|
|
37
37
|
@include _theme-from-tokens(inspection.get-theme-tokens($theme, color), $options...);
|
|
38
38
|
} @else {
|
|
39
39
|
.mat-mdc-standard-chip {
|
|
40
|
-
@include token-utils.create-token-values(
|
|
40
|
+
@include token-utils.create-token-values-mixed(
|
|
41
41
|
tokens-mdc-chip.$prefix,
|
|
42
42
|
tokens-mdc-chip.get-color-tokens($theme)
|
|
43
43
|
);
|
|
44
|
-
@include token-utils.create-token-values(
|
|
44
|
+
@include token-utils.create-token-values-mixed(
|
|
45
45
|
tokens-mat-chip.$prefix,
|
|
46
46
|
tokens-mat-chip.get-color-tokens($theme)
|
|
47
47
|
);
|
|
@@ -49,33 +49,33 @@
|
|
|
49
49
|
&.mat-mdc-chip-selected,
|
|
50
50
|
&.mat-mdc-chip-highlighted {
|
|
51
51
|
&.mat-primary {
|
|
52
|
-
@include token-utils.create-token-values(
|
|
52
|
+
@include token-utils.create-token-values-mixed(
|
|
53
53
|
tokens-mdc-chip.$prefix,
|
|
54
54
|
tokens-mdc-chip.get-color-tokens($theme, primary)
|
|
55
55
|
);
|
|
56
|
-
@include token-utils.create-token-values(
|
|
56
|
+
@include token-utils.create-token-values-mixed(
|
|
57
57
|
tokens-mat-chip.$prefix,
|
|
58
58
|
tokens-mat-chip.get-color-tokens($theme, primary)
|
|
59
59
|
);
|
|
60
60
|
}
|
|
61
61
|
|
|
62
62
|
&.mat-accent {
|
|
63
|
-
@include token-utils.create-token-values(
|
|
63
|
+
@include token-utils.create-token-values-mixed(
|
|
64
64
|
tokens-mdc-chip.$prefix,
|
|
65
65
|
tokens-mdc-chip.get-color-tokens($theme, accent)
|
|
66
66
|
);
|
|
67
|
-
@include token-utils.create-token-values(
|
|
67
|
+
@include token-utils.create-token-values-mixed(
|
|
68
68
|
tokens-mat-chip.$prefix,
|
|
69
69
|
tokens-mat-chip.get-color-tokens($theme, accent)
|
|
70
70
|
);
|
|
71
71
|
}
|
|
72
72
|
|
|
73
73
|
&.mat-warn {
|
|
74
|
-
@include token-utils.create-token-values(
|
|
74
|
+
@include token-utils.create-token-values-mixed(
|
|
75
75
|
tokens-mdc-chip.$prefix,
|
|
76
76
|
tokens-mdc-chip.get-color-tokens($theme, warn)
|
|
77
77
|
);
|
|
78
|
-
@include token-utils.create-token-values(
|
|
78
|
+
@include token-utils.create-token-values-mixed(
|
|
79
79
|
tokens-mat-chip.$prefix,
|
|
80
80
|
tokens-mat-chip.get-color-tokens($theme, warn)
|
|
81
81
|
);
|
|
@@ -92,11 +92,11 @@
|
|
|
92
92
|
@include _theme-from-tokens(inspection.get-theme-tokens($theme, typography));
|
|
93
93
|
} @else {
|
|
94
94
|
.mat-mdc-standard-chip {
|
|
95
|
-
@include token-utils.create-token-values(
|
|
95
|
+
@include token-utils.create-token-values-mixed(
|
|
96
96
|
tokens-mdc-chip.$prefix,
|
|
97
97
|
tokens-mdc-chip.get-typography-tokens($theme)
|
|
98
98
|
);
|
|
99
|
-
@include token-utils.create-token-values(
|
|
99
|
+
@include token-utils.create-token-values-mixed(
|
|
100
100
|
tokens-mat-chip.$prefix,
|
|
101
101
|
tokens-mat-chip.get-typography-tokens($theme)
|
|
102
102
|
);
|
|
@@ -111,11 +111,11 @@
|
|
|
111
111
|
@include _theme-from-tokens(inspection.get-theme-tokens($theme, density));
|
|
112
112
|
} @else {
|
|
113
113
|
.mat-mdc-chip.mat-mdc-standard-chip {
|
|
114
|
-
@include token-utils.create-token-values(
|
|
114
|
+
@include token-utils.create-token-values-mixed(
|
|
115
115
|
tokens-mdc-chip.$prefix,
|
|
116
116
|
tokens-mdc-chip.get-density-tokens($theme)
|
|
117
117
|
);
|
|
118
|
-
@include token-utils.create-token-values(
|
|
118
|
+
@include token-utils.create-token-values-mixed(
|
|
119
119
|
tokens-mat-chip.$prefix,
|
|
120
120
|
tokens-mat-chip.get-density-tokens($theme)
|
|
121
121
|
);
|
package/core/_core-theme.scss
CHANGED
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
@include optgroup-theme.base($theme);
|
|
25
25
|
@include pseudo-checkbox-theme.base($theme);
|
|
26
26
|
@include sass-utils.current-selector-or-root() {
|
|
27
|
-
@include token-utils.create-token-values(
|
|
27
|
+
@include token-utils.create-token-values-mixed(
|
|
28
28
|
tokens-mat-app.$prefix,
|
|
29
29
|
tokens-mat-app.get-unthemable-tokens()
|
|
30
30
|
);
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
@include optgroup-theme.color($theme);
|
|
42
42
|
@include pseudo-checkbox-theme.color($theme);
|
|
43
43
|
@include sass-utils.current-selector-or-root() {
|
|
44
|
-
@include token-utils.create-token-values(
|
|
44
|
+
@include token-utils.create-token-values-mixed(
|
|
45
45
|
tokens-mat-app.$prefix,
|
|
46
46
|
tokens-mat-app.get-color-tokens($theme)
|
|
47
47
|
);
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
@include _theme-from-tokens(inspection.get-theme-tokens($theme, color));
|
|
20
20
|
} @else {
|
|
21
21
|
@include sass-utils.current-selector-or-root() {
|
|
22
|
-
@include token-utils.create-token-values(
|
|
22
|
+
@include token-utils.create-token-values-mixed(
|
|
23
23
|
tokens-mat-optgroup.$prefix,
|
|
24
24
|
tokens-mat-optgroup.get-color-tokens($theme)
|
|
25
25
|
);
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
@include _theme-from-tokens(inspection.get-theme-tokens($theme, typography));
|
|
33
33
|
} @else {
|
|
34
34
|
@include sass-utils.current-selector-or-root() {
|
|
35
|
-
@include token-utils.create-token-values(
|
|
35
|
+
@include token-utils.create-token-values-mixed(
|
|
36
36
|
tokens-mat-optgroup.$prefix,
|
|
37
37
|
tokens-mat-optgroup.get-typography-tokens($theme)
|
|
38
38
|
);
|
|
@@ -26,21 +26,21 @@
|
|
|
26
26
|
@include _theme-from-tokens(inspection.get-theme-tokens($theme, color), $options...);
|
|
27
27
|
} @else {
|
|
28
28
|
@include sass-utils.current-selector-or-root() {
|
|
29
|
-
@include token-utils.create-token-values(
|
|
29
|
+
@include token-utils.create-token-values-mixed(
|
|
30
30
|
tokens-mat-option.$prefix,
|
|
31
31
|
tokens-mat-option.get-color-tokens($theme)
|
|
32
32
|
);
|
|
33
33
|
}
|
|
34
34
|
|
|
35
35
|
.mat-accent {
|
|
36
|
-
@include token-utils.create-token-values(
|
|
36
|
+
@include token-utils.create-token-values-mixed(
|
|
37
37
|
tokens-mat-option.$prefix,
|
|
38
38
|
tokens-mat-option.get-color-tokens($theme, accent)
|
|
39
39
|
);
|
|
40
40
|
}
|
|
41
41
|
|
|
42
42
|
.mat-warn {
|
|
43
|
-
@include token-utils.create-token-values(
|
|
43
|
+
@include token-utils.create-token-values-mixed(
|
|
44
44
|
tokens-mat-option.$prefix,
|
|
45
45
|
tokens-mat-option.get-color-tokens($theme, warn)
|
|
46
46
|
);
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
@include _theme-from-tokens(inspection.get-theme-tokens($theme, typography));
|
|
56
56
|
} @else {
|
|
57
57
|
@include sass-utils.current-selector-or-root() {
|
|
58
|
-
@include token-utils.create-token-values(
|
|
58
|
+
@include token-utils.create-token-values-mixed(
|
|
59
59
|
tokens-mat-option.$prefix,
|
|
60
60
|
tokens-mat-option.get-typography-tokens($theme)
|
|
61
61
|
);
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
@include _theme-from-tokens(inspection.get-theme-tokens($theme, color));
|
|
19
19
|
} @else {
|
|
20
20
|
@include sass-utils.current-selector-or-root() {
|
|
21
|
-
@include token-utils.create-token-values(
|
|
21
|
+
@include token-utils.create-token-values-mixed(
|
|
22
22
|
tokens-mat-ripple.$prefix,
|
|
23
23
|
tokens-mat-ripple.get-color-tokens($theme)
|
|
24
24
|
);
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
@include _theme-from-tokens(inspection.get-theme-tokens($theme, typography));
|
|
32
32
|
} @else {
|
|
33
33
|
@include sass-utils.current-selector-or-root() {
|
|
34
|
-
@include token-utils.create-token-values(
|
|
34
|
+
@include token-utils.create-token-values-mixed(
|
|
35
35
|
tokens-mat-ripple.$prefix,
|
|
36
36
|
tokens-mat-ripple.get-typography-tokens($theme)
|
|
37
37
|
);
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
@include _theme-from-tokens(inspection.get-theme-tokens($theme, density));
|
|
45
45
|
} @else {
|
|
46
46
|
@include sass-utils.current-selector-or-root() {
|
|
47
|
-
@include token-utils.create-token-values(
|
|
47
|
+
@include token-utils.create-token-values-mixed(
|
|
48
48
|
tokens-mat-ripple.$prefix,
|
|
49
49
|
tokens-mat-ripple.get-density-tokens($theme)
|
|
50
50
|
);
|
|
@@ -8,11 +8,11 @@
|
|
|
8
8
|
|
|
9
9
|
@mixin _palette-styles($theme, $palette-name) {
|
|
10
10
|
@include sass-utils.current-selector-or-root() {
|
|
11
|
-
@include token-utils.create-token-values(
|
|
11
|
+
@include token-utils.create-token-values-mixed(
|
|
12
12
|
tokens-mat-full-pseudo-checkbox.$prefix,
|
|
13
13
|
tokens-mat-full-pseudo-checkbox.get-color-tokens($theme, $palette-name)
|
|
14
14
|
);
|
|
15
|
-
@include token-utils.create-token-values(
|
|
15
|
+
@include token-utils.create-token-values-mixed(
|
|
16
16
|
tokens-mat-minimal-pseudo-checkbox.$prefix,
|
|
17
17
|
tokens-mat-minimal-pseudo-checkbox.get-color-tokens($theme, $palette-name)
|
|
18
18
|
);
|
|
@@ -33,11 +33,11 @@
|
|
|
33
33
|
tokens-mat-minimal-pseudo-checkbox.$prefix,
|
|
34
34
|
$options...
|
|
35
35
|
);
|
|
36
|
-
@include token-utils.create-token-values(
|
|
36
|
+
@include token-utils.create-token-values-mixed(
|
|
37
37
|
tokens-mat-full-pseudo-checkbox.$prefix,
|
|
38
38
|
$mat-full-pseudo-checkbox-tokens
|
|
39
39
|
);
|
|
40
|
-
@include token-utils.create-token-values(
|
|
40
|
+
@include token-utils.create-token-values-mixed(
|
|
41
41
|
tokens-mat-minimal-pseudo-checkbox.$prefix,
|
|
42
42
|
$mat-minimal-pseudo-checkbox-tokens
|
|
43
43
|
);
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
// from the bundle.
|
|
24
24
|
$_overrides-only: true;
|
|
25
25
|
|
|
26
|
-
@mixin
|
|
26
|
+
@mixin _color-variant-styles($theme, $color-variant) {
|
|
27
27
|
$primary-options: (color-variant: $color-variant, emit-overrides-only: $_overrides-only);
|
|
28
28
|
|
|
29
29
|
// Some components use the secondary color rather than primary color for `.mat-primary`.
|
|
@@ -33,10 +33,21 @@ $_overrides-only: true;
|
|
|
33
33
|
emit-overrides-only: $_overrides-only
|
|
34
34
|
);
|
|
35
35
|
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
36
|
+
& {
|
|
37
|
+
@include option-theme.color($theme, $secondary-options...);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
& {
|
|
41
|
+
@include progress-spinner-theme.color($theme, $primary-options...);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
& {
|
|
45
|
+
@include pseudo-checkbox-theme.color($theme, $primary-options...);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
& {
|
|
49
|
+
@include stepper-theme.color($theme, $primary-options...);
|
|
50
|
+
}
|
|
40
51
|
|
|
41
52
|
&.mat-icon {
|
|
42
53
|
@include icon-theme.color($theme, $primary-options...);
|
|
@@ -105,7 +116,7 @@ $_overrides-only: true;
|
|
|
105
116
|
|
|
106
117
|
@mixin color-variants-backwards-compatibility($theme) {
|
|
107
118
|
.mat-primary {
|
|
108
|
-
@include
|
|
119
|
+
@include _color-variant-styles($theme, primary);
|
|
109
120
|
}
|
|
110
121
|
.mat-badge {
|
|
111
122
|
@include badge-theme.color($theme, $color-variant: primary,
|
|
@@ -113,7 +124,7 @@ $_overrides-only: true;
|
|
|
113
124
|
}
|
|
114
125
|
|
|
115
126
|
.mat-accent {
|
|
116
|
-
@include
|
|
127
|
+
@include _color-variant-styles($theme, tertiary);
|
|
117
128
|
}
|
|
118
129
|
.mat-badge-accent {
|
|
119
130
|
@include badge-theme.color($theme, $color-variant: tertiary,
|
|
@@ -121,7 +132,7 @@ $_overrides-only: true;
|
|
|
121
132
|
}
|
|
122
133
|
|
|
123
134
|
.mat-warn {
|
|
124
|
-
@include
|
|
135
|
+
@include _color-variant-styles($theme, error);
|
|
125
136
|
}
|
|
126
137
|
.mat-badge-warn {
|
|
127
138
|
@include badge-theme.color($theme, $color-variant: error,
|
|
@@ -38,6 +38,9 @@ $_density-tokens: (
|
|
|
38
38
|
(mdc, filled-button): (
|
|
39
39
|
container-height: (40px, 36px, 32px, 28px),
|
|
40
40
|
),
|
|
41
|
+
(mat, tonal-button): (
|
|
42
|
+
container-height: (40px, 36px, 32px, 28px),
|
|
43
|
+
),
|
|
41
44
|
(mdc, outlined-button): (
|
|
42
45
|
container-height: (40px, 36px, 32px, 28px),
|
|
43
46
|
),
|
|
@@ -173,8 +173,7 @@ $_system-fallbacks: null;
|
|
|
173
173
|
@if(meta.type-of($color) == 'color') {
|
|
174
174
|
$result: map.remove($result, $opacity-key);
|
|
175
175
|
$result: map.set($result, $color-key, rgba($color, $opacity));
|
|
176
|
-
}
|
|
177
|
-
@else if($color != null) {
|
|
176
|
+
} @else if($color != null) {
|
|
178
177
|
$result: map.remove($result, $opacity-key);
|
|
179
178
|
$combined-color: #{color-mix(in srgb, #{$color} #{($opacity * 100) + '%'}, transparent)};
|
|
180
179
|
$result: map.set($result, $color-key, $combined-color);
|
|
@@ -118,11 +118,26 @@ $_system-fallbacks: m3-system.create-system-fallbacks();
|
|
|
118
118
|
|
|
119
119
|
// Outputs a map of tokens under a specific prefix.
|
|
120
120
|
@mixin create-token-values($prefix, $tokens) {
|
|
121
|
-
@
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
121
|
+
@include _create-token-values-internal($prefix, $tokens, false);
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
// Outputs a map of tokens under a specific prefix in scenarios where tokens may be mixed with
|
|
125
|
+
// other declarations (e.g. M2 themes). Used to avoid https://sass-lang.com/documentation/breaking-changes/mixed-decls/
|
|
126
|
+
@mixin create-token-values-mixed($prefix, $tokens) {
|
|
127
|
+
@include _create-token-values-internal($prefix, $tokens, true);
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
@mixin _create-token-values-internal($prefix, $tokens, $in-place) {
|
|
131
|
+
@if ($tokens != null) {
|
|
132
|
+
@if ($in-place) {
|
|
133
|
+
& {
|
|
134
|
+
@each $key, $value in $tokens {
|
|
135
|
+
@if $value != null {
|
|
136
|
+
#{_create-var-name($prefix, $key)}: #{$value};
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
} @else {
|
|
126
141
|
@each $key, $value in $tokens {
|
|
127
142
|
@if $value != null {
|
|
128
143
|
#{_create-var-name($prefix, $key)}: #{$value};
|
|
@@ -45,6 +45,7 @@
|
|
|
45
45
|
@use './mat/toolbar' as tokens-mat-toolbar;
|
|
46
46
|
@use './mat/tree' as tokens-mat-tree;
|
|
47
47
|
@use './mat/timepicker' as tokens-mat-timepicker;
|
|
48
|
+
@use './mat/tonal-button' as tokens-mat-tonal-button;
|
|
48
49
|
@use './mdc/checkbox' as tokens-mdc-checkbox;
|
|
49
50
|
@use './mdc/text-button' as tokens-mdc-text-button;
|
|
50
51
|
@use './mdc/protected-button' as tokens-mdc-protected-button;
|
|
@@ -158,6 +159,7 @@
|
|
|
158
159
|
_get-tokens-for-module($theme, tokens-mat-toolbar),
|
|
159
160
|
_get-tokens-for-module($theme, tokens-mat-tree),
|
|
160
161
|
_get-tokens-for-module($theme, tokens-mat-timepicker),
|
|
162
|
+
_get-tokens-for-module($theme, tokens-mat-tonal-button),
|
|
161
163
|
_get-tokens-for-module($theme, tokens-mdc-checkbox),
|
|
162
164
|
_get-tokens-for-module($theme, tokens-mdc-chip),
|
|
163
165
|
_get-tokens-for-module($theme, tokens-mdc-circular-progress),
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
@use 'sass:map';
|
|
2
|
+
@use '../../token-definition';
|
|
3
|
+
@use '../../../theming/theming';
|
|
4
|
+
@use '../../../theming/inspection';
|
|
5
|
+
@use '../../../style/sass-utils';
|
|
6
|
+
|
|
7
|
+
// The prefix used to generate the fully qualified name for tokens in this file.
|
|
8
|
+
$prefix: (mat, tonal-button);
|
|
9
|
+
|
|
10
|
+
// Tokens that can't be configured through Angular Material's current theming API,
|
|
11
|
+
// but may be in a future version of the theming API.
|
|
12
|
+
@function get-unthemable-tokens() {
|
|
13
|
+
@return (
|
|
14
|
+
// Shape of the container element.
|
|
15
|
+
container-shape: 4px,
|
|
16
|
+
|
|
17
|
+
// Start/end padding of the button.
|
|
18
|
+
horizontal-padding: 16px,
|
|
19
|
+
|
|
20
|
+
// Space between the icon and the button's main content.
|
|
21
|
+
icon-spacing: 8px,
|
|
22
|
+
|
|
23
|
+
// Amount by which to offset the icon so that its presence
|
|
24
|
+
// doesn't increase throw off the horizontal padding.
|
|
25
|
+
icon-offset: -4px,
|
|
26
|
+
);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
// Tokens that can be configured through Angular Material's color theming API.
|
|
30
|
+
@function get-color-tokens($theme) {
|
|
31
|
+
$is-dark: inspection.get-theme-type($theme) == dark;
|
|
32
|
+
|
|
33
|
+
@return (
|
|
34
|
+
container-color: inspection.get-theme-color($theme, background, card),
|
|
35
|
+
label-text-color: inspection.get-theme-color($theme, foreground, text, 1),
|
|
36
|
+
disabled-container-color: inspection.get-theme-color($theme, foreground, disabled-button,
|
|
37
|
+
0.12),
|
|
38
|
+
disabled-label-text-color: inspection.get-theme-color($theme, foreground, disabled-button,
|
|
39
|
+
if($is-dark, 0.5, 0.38)),
|
|
40
|
+
|
|
41
|
+
// Color of the element that shows the hover, focus and pressed states.
|
|
42
|
+
state-layer-color: inspection.get-theme-color($theme, foreground, base),
|
|
43
|
+
|
|
44
|
+
// Color of the element that shows the hover, focus and pressed states while disabled.
|
|
45
|
+
disabled-state-layer-color: inspection.get-theme-color($theme, foreground, base),
|
|
46
|
+
|
|
47
|
+
// Color of the ripple element.
|
|
48
|
+
ripple-color: inspection.get-theme-color($theme, foreground, base, 0.1),
|
|
49
|
+
|
|
50
|
+
// Opacity of the ripple when the button is hovered.
|
|
51
|
+
hover-state-layer-opacity: if($is-dark, 0.08, 0.04),
|
|
52
|
+
|
|
53
|
+
// Opacity of the ripple when the button is focused.
|
|
54
|
+
focus-state-layer-opacity: if($is-dark, 0.24, 0.12),
|
|
55
|
+
|
|
56
|
+
// Opacity of the ripple when the button is pressed.
|
|
57
|
+
pressed-state-layer-opacity: if($is-dark, 0.24, 0.12),
|
|
58
|
+
);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
// Generates the mapping for the properties that change based on the button palette color.
|
|
62
|
+
@function private-get-color-palette-color-tokens($theme, $palette-name) {
|
|
63
|
+
@return (
|
|
64
|
+
container-color: inspection.get-theme-color($theme, $palette-name, default),
|
|
65
|
+
label-text-color: inspection.get-theme-color($theme, $palette-name, default-contrast, 1),
|
|
66
|
+
state-layer-color: inspection.get-theme-color($theme, $palette-name, default-contrast, 1),
|
|
67
|
+
ripple-color: inspection.get-theme-color($theme, $palette-name, default-contrast, 0.1),
|
|
68
|
+
);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
// Tokens that can be configured through Angular Material's typography theming API.
|
|
72
|
+
@function get-typography-tokens($theme) {
|
|
73
|
+
@return (
|
|
74
|
+
label-text-font: inspection.get-theme-typography($theme, button, font-family),
|
|
75
|
+
label-text-size: inspection.get-theme-typography($theme, button, font-size),
|
|
76
|
+
label-text-tracking: inspection.get-theme-typography($theme, button, letter-spacing),
|
|
77
|
+
label-text-weight: inspection.get-theme-typography($theme, button, font-weight),
|
|
78
|
+
label-text-transform: none,
|
|
79
|
+
);
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
// Tokens that can be configured through Angular Material's density theming API.
|
|
83
|
+
@function get-density-tokens($theme) {
|
|
84
|
+
$scale: theming.clamp-density(inspection.get-theme-density($theme), -3);
|
|
85
|
+
|
|
86
|
+
@return (
|
|
87
|
+
touch-target-display: if($scale < -1, none, block),
|
|
88
|
+
container-height:
|
|
89
|
+
map.get(
|
|
90
|
+
(
|
|
91
|
+
0: 36px,
|
|
92
|
+
-1: 32px,
|
|
93
|
+
-2: 28px,
|
|
94
|
+
-3: 24px,
|
|
95
|
+
),
|
|
96
|
+
$scale
|
|
97
|
+
)
|
|
98
|
+
);
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
// Combines the tokens generated by the above functions into a single map with placeholder values.
|
|
102
|
+
// This is used to create token slots.
|
|
103
|
+
@function get-token-slots() {
|
|
104
|
+
@return sass-utils.deep-merge-all(
|
|
105
|
+
get-unthemable-tokens(),
|
|
106
|
+
get-color-tokens(token-definition.$placeholder-color-config),
|
|
107
|
+
get-typography-tokens(token-definition.$placeholder-typography-config),
|
|
108
|
+
get-density-tokens(token-definition.$placeholder-density-config)
|
|
109
|
+
);
|
|
110
|
+
}
|
|
@@ -43,6 +43,7 @@
|
|
|
43
43
|
@use './mat/toolbar' as tokens-mat-toolbar;
|
|
44
44
|
@use './mat/tree' as tokens-mat-tree;
|
|
45
45
|
@use './mat/timepicker' as tokens-mat-timepicker;
|
|
46
|
+
@use './mat/tonal-button' as tokens-mat-tonal-button;
|
|
46
47
|
@use './mdc/checkbox' as tokens-mdc-checkbox;
|
|
47
48
|
@use './mdc/text-button' as tokens-mdc-text-button;
|
|
48
49
|
@use './mdc/protected-button' as tokens-mdc-protected-button;
|
|
@@ -85,6 +86,7 @@ $_module-names: (
|
|
|
85
86
|
tokens-mat-fab,
|
|
86
87
|
tokens-mat-fab-small,
|
|
87
88
|
tokens-mat-filled-button,
|
|
89
|
+
tokens-mat-tonal-button,
|
|
88
90
|
tokens-mat-form-field,
|
|
89
91
|
tokens-mat-grid-list,
|
|
90
92
|
tokens-mat-icon-button,
|
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
@forward './md-comp-fab-tertiary-small' as md-comp-fab-tertiary-small-*;
|
|
15
15
|
@forward './md-comp-fab-tertiary' as md-comp-fab-tertiary-*;
|
|
16
16
|
@forward './md-comp-filled-button' as md-comp-filled-button-*;
|
|
17
|
+
@forward './md-comp-filled-tonal-button' as md-comp-filled-tonal-button-*;
|
|
17
18
|
@forward './md-comp-filled-card' as md-comp-filled-card-*;
|
|
18
19
|
@forward './md-comp-filled-icon-button' as md-comp-filled-icon-button-*;
|
|
19
20
|
@forward './md-comp-filled-text-field' as md-comp-filled-text-field-*;
|
|
@@ -63,7 +64,6 @@
|
|
|
63
64
|
// @forward './unused/md-comp-filled-autocomplete' as md-comp-filled-autocomplete-*;
|
|
64
65
|
// @forward './unused/md-comp-filled-menu-button' as md-comp-filled-menu-button-*;
|
|
65
66
|
// @forward './unused/md-comp-filled-select' as md-comp-filled-select-*;
|
|
66
|
-
// @forward './unused/md-comp-filled-tonal-button' as md-comp-filled-tonal-button-*;
|
|
67
67
|
// @forward './unused/md-comp-filled-tonal-icon-button' as md-comp-filled-tonal-icon-button-*;
|
|
68
68
|
// @forward './unused/md-comp-filter-chip' as md-comp-filter-chip-*;
|
|
69
69
|
// @forward './unused/md-comp-full-screen-dialog' as md-comp-full-screen-dialog-*;
|
|
@@ -21,7 +21,7 @@ $_default: (
|
|
|
21
21
|
);
|
|
22
22
|
|
|
23
23
|
@function values($deps: $_default, $exclude-hardcoded-values: false) {
|
|
24
|
-
|
|
24
|
+
$values: (
|
|
25
25
|
'container-color': map.get($deps, 'md-sys-color', 'surface-container-low'),
|
|
26
26
|
'container-elevation': map.get($deps, 'md-sys-elevation', 'level1'),
|
|
27
27
|
'container-shadow-color': map.get($deps, 'md-sys-color', 'shadow'),
|
|
@@ -50,4 +50,6 @@ $_default: (
|
|
|
50
50
|
'pressed-state-layer-opacity':
|
|
51
51
|
map.get($deps, 'md-sys-state', 'pressed-state-layer-opacity')
|
|
52
52
|
);
|
|
53
|
+
|
|
54
|
+
@return $values;
|
|
53
55
|
}
|