@angular/material 17.0.0-next.0 → 17.0.0-next.1
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 +2 -2
- package/button/_button-base.scss +3 -3
- package/button/_button-theme-private.scss +3 -2
- package/button/_button-theme.scss +18 -25
- package/button/_fab-theme.scss +31 -49
- package/button/_icon-button-theme.scss +19 -26
- package/button/index.d.ts +22 -31
- package/card/_card-theme.scss +27 -38
- package/checkbox/_checkbox-theme.scss +28 -45
- package/core/_core-theme.scss +24 -39
- package/core/mdc-helpers/_mdc-helpers.scss +19 -22
- package/core/option/_optgroup-theme.scss +13 -23
- package/core/option/_option-theme.scss +23 -37
- package/core/ripple/_ripple-theme.scss +6 -10
- package/core/selection/pseudo-checkbox/_pseudo-checkbox-theme.scss +17 -24
- package/core/style/_private.scss +3 -3
- package/core/style/_sass-utils.scss +7 -0
- package/core/theming/_inspection.scss +87 -60
- package/core/theming/_m2-inspection.scss +211 -0
- package/core/theming/_theming.scss +59 -6
- package/core/tokens/m2/mat/_card.scss +15 -21
- package/core/tokens/m2/mat/_form-field.scss +21 -25
- package/core/tokens/m2/mat/_optgroup.scss +12 -17
- package/core/tokens/m2/mat/_option.scss +16 -28
- package/core/tokens/m2/mat/_paginator.scss +16 -18
- package/core/tokens/m2/mat/_radio.scss +7 -10
- package/core/tokens/m2/mat/_slide-toggle.scss +9 -17
- package/core/tokens/m2/mat/_slider.scss +5 -5
- package/core/tokens/m2/mdc/_checkbox.scss +21 -20
- package/core/tokens/m2/mdc/_elevated-card.scss +6 -9
- package/core/tokens/m2/mdc/_extended-fab.scss +8 -17
- package/core/tokens/m2/mdc/_fab.scss +6 -7
- package/core/tokens/m2/mdc/_filled-text-field.scss +16 -22
- package/core/tokens/m2/mdc/_icon-button.scss +1 -1
- package/core/tokens/m2/mdc/_linear-progress.scss +9 -10
- package/core/tokens/m2/mdc/_list.scss +44 -42
- package/core/tokens/m2/mdc/_outlined-card.scss +7 -10
- package/core/tokens/m2/mdc/_outlined-text-field.scss +14 -20
- package/core/tokens/m2/mdc/_radio.scss +11 -11
- package/core/tokens/m2/mdc/_slider.scss +16 -23
- package/core/tokens/m2/mdc/_switch.scss +16 -19
- package/core/typography/_definition.scss +258 -0
- package/core/typography/_property-getters.scss +63 -0
- package/core/typography/_typography-utils.scss +9 -69
- package/core/typography/_typography.scss +10 -343
- package/core/typography/_versioning.scss +86 -0
- package/datepicker/index.d.ts +3 -3
- package/dialog/_dialog-theme.scss +10 -0
- package/esm2022/autocomplete/autocomplete.mjs +1 -1
- package/esm2022/button/button-base.mjs +32 -27
- package/esm2022/button/button.mjs +6 -6
- package/esm2022/button/fab.mjs +23 -31
- package/esm2022/button/icon-button.mjs +6 -6
- package/esm2022/button/testing/button-harness.mjs +3 -3
- package/esm2022/core/version.mjs +1 -1
- package/esm2022/datepicker/calendar.mjs +1 -1
- package/esm2022/datepicker/datepicker-base.mjs +2 -2
- package/esm2022/datepicker/datepicker-toggle.mjs +1 -1
- package/esm2022/datepicker/month-view.mjs +2 -2
- package/esm2022/datepicker/multi-year-view.mjs +2 -2
- package/esm2022/datepicker/year-view.mjs +2 -2
- package/esm2022/dialog/dialog-container.mjs +2 -2
- package/esm2022/form-field/form-field.mjs +3 -3
- package/esm2022/paginator/paginator.mjs +1 -1
- package/esm2022/select/select.mjs +3 -3
- package/esm2022/slider/slider-input.mjs +19 -9
- package/esm2022/slider/slider.mjs +2 -2
- package/esm2022/snack-bar/simple-snack-bar.mjs +1 -1
- package/fesm2022/autocomplete.mjs.map +1 -1
- package/fesm2022/button/testing.mjs +2 -2
- package/fesm2022/button/testing.mjs.map +1 -1
- package/fesm2022/button.mjs +59 -61
- package/fesm2022/button.mjs.map +1 -1
- package/fesm2022/core.mjs +1 -1
- package/fesm2022/core.mjs.map +1 -1
- package/fesm2022/datepicker.mjs +6 -6
- package/fesm2022/datepicker.mjs.map +1 -1
- package/fesm2022/dialog.mjs +2 -2
- package/fesm2022/dialog.mjs.map +1 -1
- package/fesm2022/form-field.mjs +2 -2
- package/fesm2022/form-field.mjs.map +1 -1
- package/fesm2022/paginator.mjs +1 -1
- package/fesm2022/paginator.mjs.map +1 -1
- package/fesm2022/select.mjs +2 -2
- package/fesm2022/select.mjs.map +1 -1
- package/fesm2022/slider.mjs +20 -10
- package/fesm2022/slider.mjs.map +1 -1
- package/fesm2022/snack-bar.mjs +1 -1
- package/fesm2022/snack-bar.mjs.map +1 -1
- package/form-field/_form-field-density.scss +3 -4
- package/form-field/_form-field-focus-overlay.scss +1 -1
- package/form-field/_form-field-theme.scss +24 -34
- package/input/_input-theme.scss +11 -23
- package/list/_list-theme.scss +26 -41
- package/package.json +2 -2
- package/paginator/_paginator-theme.scss +15 -24
- 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 +17 -24
- package/progress-spinner/_progress-spinner-theme.scss +3 -3
- package/radio/_radio-theme.scss +23 -38
- package/schematics/ng-add/index.js +1 -1
- package/schematics/ng-add/index.mjs +1 -1
- package/slide-toggle/_slide-toggle-theme.scss +23 -40
- package/slider/_slider-theme.scss +25 -42
- package/snack-bar/_snack-bar-theme.scss +2 -2
- package/button-toggle/_button-toggle-variables.scss +0 -16
- package/paginator/_paginator-variables.scss +0 -15
package/list/_list-theme.scss
CHANGED
|
@@ -6,11 +6,11 @@
|
|
|
6
6
|
|
|
7
7
|
@use '../core/style/sass-utils';
|
|
8
8
|
@use '../core/theming/theming';
|
|
9
|
+
@use '../core/theming/inspection';
|
|
9
10
|
@use '../core/tokens/m2/mdc/checkbox' as tokens-mdc-checkbox;
|
|
10
11
|
@use '../core/tokens/m2/mdc/radio' as tokens-mdc-radio;
|
|
11
12
|
@use '../core/tokens/m2/mdc/list' as tokens-mdc-list;
|
|
12
13
|
@use '../core/typography/typography';
|
|
13
|
-
@use '../core/typography/typography-utils';
|
|
14
14
|
|
|
15
15
|
@mixin base($config-or-theme) {
|
|
16
16
|
// Add default values for tokens not related to color, typography, or density.
|
|
@@ -19,16 +19,8 @@
|
|
|
19
19
|
}
|
|
20
20
|
}
|
|
21
21
|
|
|
22
|
-
@mixin color($
|
|
23
|
-
$
|
|
24
|
-
$primary: map.get($config, primary);
|
|
25
|
-
$accent: map.get($config, accent);
|
|
26
|
-
$warn: map.get($config, warn);
|
|
27
|
-
$mdc-list-color-tokens: tokens-mdc-list.get-color-tokens($config);
|
|
28
|
-
$inner-control-primary: map.merge($config, (accent: $primary));
|
|
29
|
-
$inner-control-accent: map.merge($config, (accent: $accent));
|
|
30
|
-
$inner-control-warn: map.merge($config, (accent: $warn));
|
|
31
|
-
|
|
22
|
+
@mixin color($theme) {
|
|
23
|
+
$mdc-list-color-tokens: tokens-mdc-list.get-color-tokens($theme);
|
|
32
24
|
|
|
33
25
|
// Add values for MDC list tokens.
|
|
34
26
|
.mat-mdc-list-base {
|
|
@@ -37,37 +29,37 @@
|
|
|
37
29
|
|
|
38
30
|
.mdc-list-item__start,
|
|
39
31
|
.mdc-list-item__end {
|
|
40
|
-
@include mdc-radio-theme.theme(tokens-mdc-radio.get-color-tokens($
|
|
32
|
+
@include mdc-radio-theme.theme(tokens-mdc-radio.get-color-tokens($theme, primary));
|
|
41
33
|
}
|
|
42
34
|
|
|
43
35
|
.mat-accent {
|
|
44
36
|
.mdc-list-item__start,
|
|
45
37
|
.mdc-list-item__end {
|
|
46
|
-
@include mdc-radio-theme.theme(tokens-mdc-radio.get-color-tokens($
|
|
38
|
+
@include mdc-radio-theme.theme(tokens-mdc-radio.get-color-tokens($theme, accent));
|
|
47
39
|
}
|
|
48
40
|
}
|
|
49
41
|
|
|
50
42
|
.mat-warn {
|
|
51
43
|
.mdc-list-item__start,
|
|
52
44
|
.mdc-list-item__end {
|
|
53
|
-
@include mdc-radio-theme.theme(tokens-mdc-radio.get-color-tokens($
|
|
45
|
+
@include mdc-radio-theme.theme(tokens-mdc-radio.get-color-tokens($theme, warn));
|
|
54
46
|
}
|
|
55
47
|
}
|
|
56
48
|
|
|
57
49
|
.mat-mdc-list-option {
|
|
58
|
-
@include mdc-checkbox-theme.theme(tokens-mdc-checkbox.get-color-tokens($
|
|
50
|
+
@include mdc-checkbox-theme.theme(tokens-mdc-checkbox.get-color-tokens($theme, primary));
|
|
59
51
|
}
|
|
60
52
|
.mat-mdc-list-option.mat-accent {
|
|
61
|
-
@include mdc-checkbox-theme.theme(tokens-mdc-checkbox.get-color-tokens($
|
|
53
|
+
@include mdc-checkbox-theme.theme(tokens-mdc-checkbox.get-color-tokens($theme, accent));
|
|
62
54
|
}
|
|
63
55
|
.mat-mdc-list-option.mat-warn {
|
|
64
|
-
@include mdc-checkbox-theme.theme(tokens-mdc-checkbox.get-color-tokens($
|
|
56
|
+
@include mdc-checkbox-theme.theme(tokens-mdc-checkbox.get-color-tokens($theme, warn));
|
|
65
57
|
}
|
|
66
58
|
|
|
67
59
|
// There is no token for activated color on nav list.
|
|
68
60
|
// TODO(mmalerba): Add a token to MDC or make a custom one.
|
|
69
61
|
.mat-mdc-list-base.mat-mdc-list-base {
|
|
70
|
-
@include evolution-mixins.list-selected-ink-color(
|
|
62
|
+
@include evolution-mixins.list-selected-ink-color(inspection.get-theme-color($theme, primary));
|
|
71
63
|
}
|
|
72
64
|
|
|
73
65
|
// TODO(mmalerba): Leaking styles from the old MDC list mixins used in other components can cause
|
|
@@ -82,9 +74,9 @@
|
|
|
82
74
|
}
|
|
83
75
|
}
|
|
84
76
|
|
|
85
|
-
@mixin density($
|
|
86
|
-
$density-scale:
|
|
87
|
-
$mdc-list-density-tokens: tokens-mdc-list.get-density-tokens($
|
|
77
|
+
@mixin density($theme) {
|
|
78
|
+
$density-scale: inspection.get-theme-density($theme);
|
|
79
|
+
$mdc-list-density-tokens: tokens-mdc-list.get-density-tokens($theme);
|
|
88
80
|
|
|
89
81
|
// Add values for MDC list tokens.
|
|
90
82
|
.mat-mdc-list-base {
|
|
@@ -94,7 +86,6 @@
|
|
|
94
86
|
// TODO(mmalerba): This is added to maintain the same style MDC used prior to the token-based API,
|
|
95
87
|
// to avoid screenshot diffs. We should remove it in favor of following MDC's current style, or
|
|
96
88
|
// add custom tokens for it.
|
|
97
|
-
$clamped-density-scale: theming.clamp-density($density-scale, -5);
|
|
98
89
|
.mat-mdc-list-item {
|
|
99
90
|
&.mdc-list-item--with-leading-avatar,
|
|
100
91
|
&.mdc-list-item--with-leading-checkbox,
|
|
@@ -107,7 +98,7 @@
|
|
|
107
98
|
-3: 44px,
|
|
108
99
|
-4: 40px,
|
|
109
100
|
-5: 40px,
|
|
110
|
-
), $
|
|
101
|
+
), $density-scale);
|
|
111
102
|
}
|
|
112
103
|
|
|
113
104
|
&.mdc-list-item--with-two-lines {
|
|
@@ -118,16 +109,14 @@
|
|
|
118
109
|
-3: 60px,
|
|
119
110
|
-4: 56px,
|
|
120
111
|
-5: 56px,
|
|
121
|
-
), $
|
|
112
|
+
), $density-scale);
|
|
122
113
|
}
|
|
123
114
|
}
|
|
124
115
|
}
|
|
125
116
|
}
|
|
126
117
|
|
|
127
|
-
@mixin typography($
|
|
128
|
-
$
|
|
129
|
-
theming.get-typography-config($config-or-theme));
|
|
130
|
-
$mdc-list-typography-tokens: tokens-mdc-list.get-typography-tokens($config);
|
|
118
|
+
@mixin typography($theme) {
|
|
119
|
+
$mdc-list-typography-tokens: tokens-mdc-list.get-typography-tokens($theme);
|
|
131
120
|
|
|
132
121
|
// Add values for MDC list tokens.
|
|
133
122
|
.mat-mdc-list-base {
|
|
@@ -137,26 +126,22 @@
|
|
|
137
126
|
// MDC does not have tokens for the subheader.
|
|
138
127
|
// TODO(mmalerba): Discuss with MDC about adding them, or create custom tokens.
|
|
139
128
|
.mdc-list-group__subheader {
|
|
140
|
-
|
|
129
|
+
font: inspection.get-theme-typography($theme, subtitle-1, font);
|
|
130
|
+
letter-spacing: inspection.get-theme-typography($theme, subtitle-1, letter-spacing);
|
|
141
131
|
}
|
|
142
132
|
}
|
|
143
133
|
|
|
144
|
-
@mixin theme($theme
|
|
145
|
-
$theme: theming.private-legacy-get-theme($theme-or-color-config);
|
|
134
|
+
@mixin theme($theme) {
|
|
146
135
|
@include theming.private-check-duplicate-theme-styles($theme, 'mat-list') {
|
|
147
|
-
$color: theming.get-color-config($theme);
|
|
148
|
-
$density: theming.get-density-config($theme);
|
|
149
|
-
$typography: theming.get-typography-config($theme);
|
|
150
|
-
|
|
151
136
|
@include base($theme);
|
|
152
|
-
@if $color
|
|
153
|
-
@include color($
|
|
137
|
+
@if inspection.theme-has($theme, color) {
|
|
138
|
+
@include color($theme);
|
|
154
139
|
}
|
|
155
|
-
@if $density
|
|
156
|
-
@include density($
|
|
140
|
+
@if inspection.theme-has($theme, density) {
|
|
141
|
+
@include density($theme);
|
|
157
142
|
}
|
|
158
|
-
@if $typography
|
|
159
|
-
@include typography($
|
|
143
|
+
@if inspection.theme-has($theme, typography) {
|
|
144
|
+
@include typography($theme);
|
|
160
145
|
}
|
|
161
146
|
}
|
|
162
147
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@angular/material",
|
|
3
|
-
"version": "17.0.0-next.
|
|
3
|
+
"version": "17.0.0-next.1",
|
|
4
4
|
"description": "Angular Material",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -478,7 +478,7 @@
|
|
|
478
478
|
},
|
|
479
479
|
"peerDependencies": {
|
|
480
480
|
"@angular/animations": "^17.0.0-0 || ^17.1.0-0 || ^17.2.0-0 || ^17.3.0-0 || ^18.0.0-0",
|
|
481
|
-
"@angular/cdk": "17.0.0-next.
|
|
481
|
+
"@angular/cdk": "17.0.0-next.1",
|
|
482
482
|
"@angular/core": "^17.0.0-0 || ^17.1.0-0 || ^17.2.0-0 || ^17.3.0-0 || ^18.0.0-0",
|
|
483
483
|
"@angular/common": "^17.0.0-0 || ^17.1.0-0 || ^17.2.0-0 || ^17.3.0-0 || ^18.0.0-0",
|
|
484
484
|
"@angular/forms": "^17.0.0-0 || ^17.1.0-0 || ^17.2.0-0 || ^17.3.0-0 || ^18.0.0-0",
|
|
@@ -3,34 +3,30 @@
|
|
|
3
3
|
@use '../core/style/sass-utils';
|
|
4
4
|
@use '../core/typography/typography';
|
|
5
5
|
@use '../core/theming/theming';
|
|
6
|
+
@use '../core/theming/inspection';
|
|
6
7
|
@use '../core/tokens/token-utils';
|
|
7
8
|
@use '../form-field/form-field-density';
|
|
8
9
|
|
|
9
|
-
@mixin color($
|
|
10
|
-
$config: theming.get-color-config($config-or-theme);
|
|
11
|
-
|
|
10
|
+
@mixin color($theme) {
|
|
12
11
|
@include sass-utils.current-selector-or-root() {
|
|
13
12
|
@include token-utils.create-token-values(tokens-mat-paginator.$prefix,
|
|
14
|
-
tokens-mat-paginator.get-color-tokens($
|
|
13
|
+
tokens-mat-paginator.get-color-tokens($theme));
|
|
15
14
|
}
|
|
16
15
|
}
|
|
17
16
|
|
|
18
|
-
@mixin typography($
|
|
19
|
-
$config: typography.private-typography-to-2018-config(
|
|
20
|
-
theming.get-typography-config($config-or-theme));
|
|
21
|
-
|
|
17
|
+
@mixin typography($theme) {
|
|
22
18
|
@include sass-utils.current-selector-or-root() {
|
|
23
19
|
@include token-utils.create-token-values(tokens-mat-paginator.$prefix,
|
|
24
|
-
tokens-mat-paginator.get-typography-tokens($
|
|
20
|
+
tokens-mat-paginator.get-typography-tokens($theme));
|
|
25
21
|
}
|
|
26
22
|
}
|
|
27
23
|
|
|
28
|
-
@mixin density($
|
|
29
|
-
$density-scale:
|
|
24
|
+
@mixin density($theme) {
|
|
25
|
+
$density-scale: inspection.get-theme-density($theme);
|
|
30
26
|
|
|
31
27
|
@include sass-utils.current-selector-or-root() {
|
|
32
28
|
@include token-utils.create-token-values(tokens-mat-paginator.$prefix,
|
|
33
|
-
tokens-mat-paginator.get-density-tokens($
|
|
29
|
+
tokens-mat-paginator.get-density-tokens($theme));
|
|
34
30
|
}
|
|
35
31
|
|
|
36
32
|
// TODO: this should be done through tokens once the form field has been switched over.
|
|
@@ -47,21 +43,16 @@
|
|
|
47
43
|
}
|
|
48
44
|
}
|
|
49
45
|
|
|
50
|
-
@mixin theme($theme
|
|
51
|
-
$theme: theming.private-legacy-get-theme($theme-or-color-config);
|
|
46
|
+
@mixin theme($theme) {
|
|
52
47
|
@include theming.private-check-duplicate-theme-styles($theme, 'mat-paginator') {
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
$typography: theming.get-typography-config($theme);
|
|
56
|
-
|
|
57
|
-
@if $color != null {
|
|
58
|
-
@include color($color);
|
|
48
|
+
@if inspection.theme-has($theme, color) {
|
|
49
|
+
@include color($theme);
|
|
59
50
|
}
|
|
60
|
-
@if $density
|
|
61
|
-
@include density($
|
|
51
|
+
@if inspection.theme-has($theme, density) {
|
|
52
|
+
@include density($theme);
|
|
62
53
|
}
|
|
63
|
-
@if $typography
|
|
64
|
-
@include typography($
|
|
54
|
+
@if inspection.theme-has($theme, typography) {
|
|
55
|
+
@include typography($theme);
|
|
65
56
|
}
|
|
66
57
|
}
|
|
67
58
|
}
|