@angular/material 17.0.0-next.4 → 17.0.0-next.5
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/button/_button-theme.scss +69 -50
- package/card/_card-theme.scss +1 -3
- package/core/theming/_m2-inspection.scss +1 -1
- package/core/tokens/m2/_index.scss +8 -0
- package/core/tokens/m2/mdc/_button-filled.scss +3 -3
- package/core/tokens/m2/mdc/_button-protected.scss +94 -0
- package/core/typography/_versioning.scss +1 -1
- package/esm2022/button/button.mjs +4 -4
- package/esm2022/button/fab.mjs +8 -8
- package/esm2022/chips/chip-option.mjs +2 -2
- package/esm2022/chips/chip-row.mjs +2 -2
- package/esm2022/chips/chip.mjs +2 -2
- package/esm2022/core/version.mjs +1 -1
- package/esm2022/datepicker/calendar.mjs +2 -2
- package/esm2022/datepicker/datepicker-errors.mjs +2 -2
- package/esm2022/form-field/form-field.mjs +3 -3
- package/esm2022/radio/radio.mjs +2 -2
- package/esm2022/select/select.mjs +3 -3
- package/esm2022/sort/sort-header.mjs +3 -3
- package/esm2022/tooltip/tooltip.mjs +2 -2
- package/fesm2022/button.mjs +12 -12
- package/fesm2022/button.mjs.map +1 -1
- package/fesm2022/chips.mjs +6 -6
- package/fesm2022/chips.mjs.map +1 -1
- package/fesm2022/core.mjs +1 -1
- package/fesm2022/core.mjs.map +1 -1
- package/fesm2022/datepicker.mjs +3 -3
- package/fesm2022/datepicker.mjs.map +1 -1
- package/fesm2022/form-field.mjs +2 -2
- package/fesm2022/form-field.mjs.map +1 -1
- package/fesm2022/radio.mjs +2 -2
- package/fesm2022/radio.mjs.map +1 -1
- package/fesm2022/select.mjs +2 -2
- package/fesm2022/select.mjs.map +1 -1
- package/fesm2022/sort.mjs +2 -2
- package/fesm2022/sort.mjs.map +1 -1
- package/fesm2022/tooltip.mjs +2 -2
- package/fesm2022/tooltip.mjs.map +1 -1
- package/package.json +2 -2
- 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/radio/_radio-theme.scss +9 -0
- package/schematics/ng-add/index.js +1 -1
- package/schematics/ng-add/index.mjs +1 -1
- package/schematics/ng-add/setup-project.js +2 -2
- package/schematics/ng-add/setup-project.mjs +2 -2
- package/schematics/ng-add/theming/theming.js +3 -3
- package/schematics/ng-add/theming/theming.mjs +3 -3
- package/slider/_slider-theme.scss +77 -43
- package/snack-bar/_snack-bar-theme.scss +46 -18
- package/toolbar/_toolbar-theme.scss +55 -27
- package/tooltip/_tooltip-theme.scss +56 -24
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
@use 'sass:map';
|
|
1
2
|
@use '../core/theming/theming';
|
|
2
3
|
@use '../core/theming/inspection';
|
|
3
4
|
@use '../core/typography/typography';
|
|
@@ -16,53 +17,80 @@
|
|
|
16
17
|
}
|
|
17
18
|
|
|
18
19
|
@mixin color($theme) {
|
|
19
|
-
@
|
|
20
|
-
@include
|
|
21
|
-
tokens-mat-toolbar.get-color-tokens($theme));
|
|
20
|
+
@if inspection.get-theme-version($theme) == 1 {
|
|
21
|
+
@include _theme-from-tokens(inspection.get-theme-tokens($theme, color));
|
|
22
22
|
}
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
23
|
+
@else {
|
|
24
|
+
@include sass-utils.current-selector-or-root() {
|
|
25
|
+
@include token-utils.create-token-values(tokens-mat-toolbar.$prefix,
|
|
26
|
+
tokens-mat-toolbar.get-color-tokens($theme));
|
|
27
27
|
}
|
|
28
28
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
29
|
+
.mat-toolbar {
|
|
30
|
+
&.mat-primary {
|
|
31
|
+
@include _palette-styles($theme, primary);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
&.mat-accent {
|
|
35
|
+
@include _palette-styles($theme, accent);
|
|
36
|
+
}
|
|
32
37
|
|
|
33
|
-
|
|
34
|
-
|
|
38
|
+
&.mat-warn {
|
|
39
|
+
@include _palette-styles($theme, warn);
|
|
40
|
+
}
|
|
35
41
|
}
|
|
36
42
|
}
|
|
37
43
|
}
|
|
38
44
|
|
|
39
45
|
@mixin typography($theme) {
|
|
40
|
-
|
|
41
|
-
|
|
46
|
+
@if inspection.get-theme-version($theme) == 1 {
|
|
47
|
+
@include _theme-from-tokens(inspection.get-theme-tokens($theme, typography));
|
|
48
|
+
}
|
|
49
|
+
@else {
|
|
50
|
+
// TODO(mmalerba): Stop calling this and resolve resulting screen diffs.
|
|
51
|
+
$theme: inspection.private-get-typography-back-compat-theme($theme);
|
|
42
52
|
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
53
|
+
@include sass-utils.current-selector-or-root() {
|
|
54
|
+
@include token-utils.create-token-values(tokens-mat-toolbar.$prefix,
|
|
55
|
+
tokens-mat-toolbar.get-typography-tokens($theme));
|
|
56
|
+
}
|
|
46
57
|
}
|
|
47
58
|
}
|
|
48
59
|
|
|
49
60
|
@mixin density($theme) {
|
|
50
|
-
@
|
|
51
|
-
@include
|
|
52
|
-
|
|
61
|
+
@if inspection.get-theme-version($theme) == 1 {
|
|
62
|
+
@include _theme-from-tokens(inspection.get-theme-tokens($theme, density));
|
|
63
|
+
}
|
|
64
|
+
@else {
|
|
65
|
+
@include sass-utils.current-selector-or-root() {
|
|
66
|
+
@include token-utils.create-token-values(tokens-mat-toolbar.$prefix,
|
|
67
|
+
tokens-mat-toolbar.get-density-tokens($theme));
|
|
68
|
+
}
|
|
53
69
|
}
|
|
54
70
|
}
|
|
55
71
|
|
|
56
72
|
@mixin theme($theme) {
|
|
57
73
|
@include theming.private-check-duplicate-theme-styles($theme, 'mat-toolbar') {
|
|
58
|
-
@if inspection.theme-
|
|
59
|
-
@include
|
|
74
|
+
@if inspection.get-theme-version($theme) == 1 {
|
|
75
|
+
@include _theme-from-tokens(inspection.get-theme-tokens($theme));
|
|
60
76
|
}
|
|
61
|
-
@
|
|
62
|
-
@
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
@
|
|
77
|
+
@else {
|
|
78
|
+
@if inspection.theme-has($theme, color) {
|
|
79
|
+
@include color($theme);
|
|
80
|
+
}
|
|
81
|
+
@if inspection.theme-has($theme, density) {
|
|
82
|
+
@include density($theme);
|
|
83
|
+
}
|
|
84
|
+
@if inspection.theme-has($theme, typography) {
|
|
85
|
+
@include typography($theme);
|
|
86
|
+
}
|
|
66
87
|
}
|
|
67
88
|
}
|
|
68
89
|
}
|
|
90
|
+
|
|
91
|
+
@mixin _theme-from-tokens($tokens) {
|
|
92
|
+
@if ($tokens != ()) {
|
|
93
|
+
@include token-utils.create-token-values(tokens-mat-toolbar.$prefix,
|
|
94
|
+
map.get($tokens, tokens-mat-toolbar.$prefix));
|
|
95
|
+
}
|
|
96
|
+
}
|
|
@@ -1,55 +1,87 @@
|
|
|
1
|
+
@use 'sass:map';
|
|
1
2
|
@use '@material/tooltip/plain-tooltip-theme' as mdc-plain-tooltip-theme;
|
|
2
3
|
@use '../core/style/sass-utils';
|
|
3
4
|
@use '../core/theming/theming';
|
|
4
5
|
@use '../core/theming/inspection';
|
|
5
6
|
@use '../core/typography/typography';
|
|
6
|
-
@use '../core/tokens/m2/mdc/plain-tooltip' as
|
|
7
|
+
@use '../core/tokens/m2/mdc/plain-tooltip' as tokens-mdc-plain-tooltip;
|
|
7
8
|
|
|
8
9
|
@mixin base($theme) {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
@if inspection.get-theme-version($theme) == 1 {
|
|
11
|
+
@include _theme-from-tokens(inspection.get-theme-tokens($theme, base));
|
|
12
|
+
}
|
|
13
|
+
@else {
|
|
14
|
+
// Add default values for tokens not related to color, typography, or density.
|
|
15
|
+
@include sass-utils.current-selector-or-root() {
|
|
16
|
+
@include mdc-plain-tooltip-theme.theme(tokens-mdc-plain-tooltip.get-unthemable-tokens());
|
|
17
|
+
}
|
|
12
18
|
}
|
|
13
19
|
}
|
|
14
20
|
|
|
15
21
|
@mixin color($theme) {
|
|
16
|
-
|
|
22
|
+
@if inspection.get-theme-version($theme) == 1 {
|
|
23
|
+
@include _theme-from-tokens(inspection.get-theme-tokens($theme, color));
|
|
24
|
+
}
|
|
25
|
+
@else {
|
|
26
|
+
$mdc-tooltip-color-tokens: tokens-mdc-plain-tooltip.get-color-tokens($theme);
|
|
17
27
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
28
|
+
// Add values for MDC tooltip tokens.
|
|
29
|
+
@include sass-utils.current-selector-or-root() {
|
|
30
|
+
@include mdc-plain-tooltip-theme.theme($mdc-tooltip-color-tokens);
|
|
31
|
+
}
|
|
21
32
|
}
|
|
22
33
|
}
|
|
23
34
|
|
|
24
35
|
@mixin typography($theme) {
|
|
25
|
-
|
|
36
|
+
@if inspection.get-theme-version($theme) == 1 {
|
|
37
|
+
@include _theme-from-tokens(inspection.get-theme-tokens($theme, typography));
|
|
38
|
+
}
|
|
39
|
+
@else {
|
|
40
|
+
$mdc-tooltip-typography-tokens: tokens-mdc-plain-tooltip.get-typography-tokens($theme);
|
|
26
41
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
42
|
+
// Add values for MDC tooltip tokens.
|
|
43
|
+
@include sass-utils.current-selector-or-root() {
|
|
44
|
+
@include mdc-plain-tooltip-theme.theme($mdc-tooltip-typography-tokens);
|
|
45
|
+
}
|
|
30
46
|
}
|
|
31
47
|
}
|
|
32
48
|
|
|
33
49
|
@mixin density($theme) {
|
|
34
|
-
|
|
50
|
+
@if inspection.get-theme-version($theme) == 1 {
|
|
51
|
+
@include _theme-from-tokens(inspection.get-theme-tokens($theme, density));
|
|
52
|
+
}
|
|
53
|
+
@else {
|
|
54
|
+
$mdc-tooltip-density-tokens: tokens-mdc-plain-tooltip.get-density-tokens($theme);
|
|
35
55
|
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
56
|
+
// Add values for MDC tooltip tokens.
|
|
57
|
+
@include sass-utils.current-selector-or-root() {
|
|
58
|
+
@include mdc-plain-tooltip-theme.theme($mdc-tooltip-density-tokens);
|
|
59
|
+
}
|
|
39
60
|
}
|
|
40
61
|
}
|
|
41
62
|
|
|
42
63
|
@mixin theme($theme) {
|
|
43
64
|
@include theming.private-check-duplicate-theme-styles($theme, 'mat-tooltip') {
|
|
44
|
-
@
|
|
45
|
-
|
|
46
|
-
@include color($theme);
|
|
47
|
-
}
|
|
48
|
-
@if inspection.theme-has($theme, density) {
|
|
49
|
-
@include density($theme);
|
|
65
|
+
@if inspection.get-theme-version($theme) == 1 {
|
|
66
|
+
@include _theme-from-tokens(inspection.get-theme-tokens($theme));
|
|
50
67
|
}
|
|
51
|
-
@
|
|
52
|
-
@include
|
|
68
|
+
@else {
|
|
69
|
+
@include base($theme);
|
|
70
|
+
@if inspection.theme-has($theme, color) {
|
|
71
|
+
@include color($theme);
|
|
72
|
+
}
|
|
73
|
+
@if inspection.theme-has($theme, density) {
|
|
74
|
+
@include density($theme);
|
|
75
|
+
}
|
|
76
|
+
@if inspection.theme-has($theme, typography) {
|
|
77
|
+
@include typography($theme);
|
|
78
|
+
}
|
|
53
79
|
}
|
|
54
80
|
}
|
|
55
81
|
}
|
|
82
|
+
|
|
83
|
+
@mixin _theme-from-tokens($tokens) {
|
|
84
|
+
@if $tokens != () {
|
|
85
|
+
@include mdc-plain-tooltip-theme.theme(map.get($tokens, tokens-mdc-plain-tooltip.$prefix));
|
|
86
|
+
}
|
|
87
|
+
}
|