@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
|
@@ -18,7 +18,7 @@ const package_config_1 = require("./package-config");
|
|
|
18
18
|
* Note that the fallback version range does not use caret, but tilde because that is
|
|
19
19
|
* the default for Angular framework dependencies in CLI projects.
|
|
20
20
|
*/
|
|
21
|
-
const fallbackMaterialVersionRange = `~17.0.0-next.
|
|
21
|
+
const fallbackMaterialVersionRange = `~17.0.0-next.1`;
|
|
22
22
|
/**
|
|
23
23
|
* Schematic factory entry-point for the `ng-add` schematic. The ng-add schematic will be
|
|
24
24
|
* automatically executed if developers run `ng add @angular/material`.
|
|
@@ -18,7 +18,7 @@ const package_config_1 = require("./package-config");
|
|
|
18
18
|
* Note that the fallback version range does not use caret, but tilde because that is
|
|
19
19
|
* the default for Angular framework dependencies in CLI projects.
|
|
20
20
|
*/
|
|
21
|
-
const fallbackMaterialVersionRange = `~17.0.0-next.
|
|
21
|
+
const fallbackMaterialVersionRange = `~17.0.0-next.1`;
|
|
22
22
|
/**
|
|
23
23
|
* Schematic factory entry-point for the `ng-add` schematic. The ng-add schematic will be
|
|
24
24
|
* automatically executed if developers run `ng add @angular/material`.
|
|
@@ -1,24 +1,18 @@
|
|
|
1
|
-
@use 'sass:map';
|
|
2
1
|
@use '@material/switch/switch-theme' as mdc-switch-theme;
|
|
3
2
|
@use '@material/form-field' as mdc-form-field;
|
|
4
3
|
@use '../core/theming/theming';
|
|
4
|
+
@use '../core/theming/inspection';
|
|
5
5
|
@use '../core/mdc-helpers/mdc-helpers';
|
|
6
6
|
@use '../core/typography/typography';
|
|
7
7
|
@use '../core/tokens/m2/mdc/switch' as m2-mdc-switch;
|
|
8
8
|
@use '../core/tokens/m2/mat/slide-toggle' as m2-mat-slide-toggle;
|
|
9
9
|
@use '../core/tokens/token-utils';
|
|
10
10
|
|
|
11
|
-
@mixin color($
|
|
12
|
-
$
|
|
13
|
-
$
|
|
14
|
-
$accent: map.get($config, accent);
|
|
15
|
-
$warn: map.get($config, warn);
|
|
16
|
-
$is-dark: map.get($config, is-dark);
|
|
17
|
-
$foreground: map.get($config, foreground);
|
|
11
|
+
@mixin color($theme) {
|
|
12
|
+
$is-dark: inspection.get-theme-type($theme) == dark;
|
|
13
|
+
$mdc-switch-color-tokens: m2-mdc-switch.get-color-tokens($theme);
|
|
18
14
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
@include mdc-helpers.using-mdc-theme($config) {
|
|
15
|
+
@include mdc-helpers.using-mdc-theme($theme) {
|
|
22
16
|
// Add values for MDC slide toggles tokens
|
|
23
17
|
.mat-mdc-slide-toggle {
|
|
24
18
|
@include mdc-form-field.core-styles($query: mdc-helpers.$mdc-theme-styles-query);
|
|
@@ -26,32 +20,26 @@
|
|
|
26
20
|
|
|
27
21
|
// MDC should set the disabled color on the label, but doesn't, so we do it here instead.
|
|
28
22
|
.mdc-switch--disabled + label {
|
|
29
|
-
color:
|
|
23
|
+
color: inspection.get-theme-color($theme, foreground, disabled-text);
|
|
30
24
|
}
|
|
31
25
|
|
|
32
26
|
// Change the color palette related tokens to accent or warn if applicable
|
|
33
27
|
&.mat-accent {
|
|
34
|
-
@include mdc-switch-theme.theme(
|
|
35
|
-
|
|
36
|
-
map.get($config, is-dark)
|
|
37
|
-
));
|
|
28
|
+
@include mdc-switch-theme.theme(
|
|
29
|
+
m2-mdc-switch.private-get-color-palette-color-tokens($theme, accent));
|
|
38
30
|
}
|
|
39
31
|
|
|
40
32
|
&.mat-warn {
|
|
41
|
-
@include mdc-switch-theme.theme(
|
|
42
|
-
|
|
43
|
-
map.get($config, is-dark)
|
|
44
|
-
));
|
|
33
|
+
@include mdc-switch-theme.theme(
|
|
34
|
+
m2-mdc-switch.private-get-color-palette-color-tokens($theme, warn));
|
|
45
35
|
}
|
|
46
36
|
}
|
|
47
37
|
}
|
|
48
38
|
}
|
|
49
39
|
|
|
50
|
-
@mixin typography($
|
|
51
|
-
$
|
|
52
|
-
|
|
53
|
-
$mdc-switch-typography-tokens: m2-mdc-switch.get-typography-tokens($config);
|
|
54
|
-
$mat-slide-toggle-typography-tokens: m2-mat-slide-toggle.get-typography-tokens($config);
|
|
40
|
+
@mixin typography($theme) {
|
|
41
|
+
$mdc-switch-typography-tokens: m2-mdc-switch.get-typography-tokens($theme);
|
|
42
|
+
$mat-slide-toggle-typography-tokens: m2-mat-slide-toggle.get-typography-tokens($theme);
|
|
55
43
|
|
|
56
44
|
//Add values for MDC slide toggle tokens
|
|
57
45
|
.mat-mdc-slide-toggle {
|
|
@@ -64,29 +52,24 @@
|
|
|
64
52
|
}
|
|
65
53
|
}
|
|
66
54
|
|
|
67
|
-
@mixin density($
|
|
68
|
-
$density-scale:
|
|
55
|
+
@mixin density($theme) {
|
|
56
|
+
$density-scale: inspection.get-theme-density($theme);
|
|
57
|
+
|
|
69
58
|
.mat-mdc-slide-toggle {
|
|
70
59
|
@include mdc-switch-theme.theme(mdc-switch-theme.density($density-scale));
|
|
71
60
|
}
|
|
72
61
|
}
|
|
73
62
|
|
|
74
|
-
@mixin theme($theme
|
|
75
|
-
$theme: theming.private-legacy-get-theme($theme-or-color-config);
|
|
76
|
-
|
|
63
|
+
@mixin theme($theme) {
|
|
77
64
|
@include theming.private-check-duplicate-theme-styles($theme, 'mat-slide-toggle') {
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
$typography: theming.get-typography-config($theme);
|
|
81
|
-
|
|
82
|
-
@if $color != null {
|
|
83
|
-
@include color($color);
|
|
65
|
+
@if inspection.theme-has($theme, color) {
|
|
66
|
+
@include color($theme);
|
|
84
67
|
}
|
|
85
|
-
@if $density
|
|
86
|
-
@include density($
|
|
68
|
+
@if inspection.theme-has($theme, density) {
|
|
69
|
+
@include density($theme);
|
|
87
70
|
}
|
|
88
|
-
@if $typography
|
|
89
|
-
@include typography($
|
|
71
|
+
@if inspection.theme-has($theme, typography) {
|
|
72
|
+
@include typography($theme);
|
|
90
73
|
}
|
|
91
74
|
}
|
|
92
75
|
}
|
|
@@ -1,103 +1,86 @@
|
|
|
1
|
-
@use 'sass:map';
|
|
2
|
-
|
|
3
1
|
@use '@material/slider/slider-theme' as mdc-slider-theme;
|
|
4
2
|
@use '../core/theming/theming';
|
|
3
|
+
@use '../core/theming/inspection';
|
|
5
4
|
@use '../core/typography/typography';
|
|
6
5
|
@use '../core/style/sass-utils';
|
|
7
6
|
@use '../core/tokens/token-utils';
|
|
8
7
|
@use '../core/tokens/m2/mat/slider' as m2-mat-slider;
|
|
9
8
|
@use '../core/tokens/m2/mdc/slider' as m2-mdc-slider;
|
|
10
9
|
|
|
11
|
-
@mixin base($
|
|
10
|
+
@mixin base($theme) {
|
|
12
11
|
// Add default values for tokens not related to color, typography, or density.
|
|
13
12
|
@include sass-utils.current-selector-or-root() {
|
|
14
13
|
@include mdc-slider-theme.theme(m2-mdc-slider.get-unthemable-tokens());
|
|
15
14
|
}
|
|
16
15
|
}
|
|
17
16
|
|
|
18
|
-
@mixin color($
|
|
19
|
-
$
|
|
20
|
-
$is-dark: map.get($config, is-dark);
|
|
17
|
+
@mixin color($theme) {
|
|
18
|
+
$is-dark: inspection.get-theme-type($theme) == dark;
|
|
21
19
|
|
|
22
20
|
$mdc-color-tokens: token-utils.resolve-elevation(
|
|
23
|
-
m2-mdc-slider.get-color-tokens($
|
|
21
|
+
m2-mdc-slider.get-color-tokens($theme),
|
|
24
22
|
handle-elevation,
|
|
25
23
|
handle-shadow-color
|
|
26
24
|
);
|
|
27
25
|
|
|
28
|
-
$mat-slider-color-tokens: m2-mat-slider.get-color-tokens($
|
|
26
|
+
$mat-slider-color-tokens: m2-mat-slider.get-color-tokens($theme);
|
|
29
27
|
|
|
30
28
|
// Add values for MDC slider tokens.
|
|
31
29
|
.mat-mdc-slider {
|
|
32
30
|
@include mdc-slider-theme.theme($mdc-color-tokens);
|
|
33
|
-
@include _slider-ripple-color(
|
|
31
|
+
@include _slider-ripple-color($theme, primary);
|
|
34
32
|
@include token-utils.create-token-values(
|
|
35
33
|
m2-mat-slider.$prefix,
|
|
36
34
|
$mat-slider-color-tokens
|
|
37
35
|
);
|
|
38
36
|
|
|
39
37
|
&.mat-accent {
|
|
40
|
-
$accent: map.get($config, accent);
|
|
41
38
|
@include mdc-slider-theme.theme(
|
|
42
|
-
|
|
43
|
-
);
|
|
44
|
-
@include _slider-ripple-color($accent);
|
|
39
|
+
m2-mdc-slider.private-get-color-palette-color-tokens($theme, accent));
|
|
40
|
+
@include _slider-ripple-color($theme, accent);
|
|
45
41
|
}
|
|
46
42
|
|
|
47
43
|
&.mat-warn {
|
|
48
|
-
$warn: map.get($config, warn);
|
|
49
44
|
@include mdc-slider-theme.theme(
|
|
50
|
-
|
|
51
|
-
);
|
|
52
|
-
@include _slider-ripple-color($warn);
|
|
45
|
+
m2-mdc-slider.private-get-color-palette-color-tokens($theme, warn));
|
|
46
|
+
@include _slider-ripple-color($theme, warn);
|
|
53
47
|
}
|
|
54
48
|
}
|
|
55
49
|
}
|
|
56
50
|
|
|
57
|
-
@mixin typography($
|
|
58
|
-
$config: typography.private-typography-to-2018-config(
|
|
59
|
-
theming.get-typography-config($config-or-theme));
|
|
60
|
-
$mdc-typography-tokens: m2-mdc-slider.get-typography-tokens($config);
|
|
61
|
-
|
|
51
|
+
@mixin typography($theme) {
|
|
62
52
|
// Add values for MDC slider tokens.
|
|
63
53
|
.mat-mdc-slider {
|
|
64
|
-
@include mdc-slider-theme.theme(
|
|
54
|
+
@include mdc-slider-theme.theme(m2-mdc-slider.get-typography-tokens($theme));
|
|
65
55
|
}
|
|
66
56
|
}
|
|
67
57
|
|
|
68
|
-
@mixin density($
|
|
69
|
-
$density-scale: theming.get-density-config($config-or-theme);
|
|
70
|
-
$mdc-density-tokens: m2-mdc-slider.get-density-tokens($density-scale);
|
|
71
|
-
|
|
58
|
+
@mixin density($theme) {
|
|
72
59
|
// Add values for MDC slider tokens.
|
|
73
60
|
.mat-mdc-slider {
|
|
74
|
-
@include mdc-slider-theme.theme(
|
|
61
|
+
@include mdc-slider-theme.theme(m2-mdc-slider.get-density-tokens($theme));
|
|
75
62
|
}
|
|
76
63
|
}
|
|
77
64
|
|
|
78
|
-
@mixin theme($theme
|
|
79
|
-
$theme: theming.private-legacy-get-theme($theme-or-color-config);
|
|
65
|
+
@mixin theme($theme) {
|
|
80
66
|
@include theming.private-check-duplicate-theme-styles($theme, 'mat-slider') {
|
|
81
|
-
$color: theming.get-color-config($theme);
|
|
82
|
-
$density: theming.get-density-config($theme);
|
|
83
|
-
$typography: theming.get-typography-config($theme);
|
|
84
|
-
|
|
85
67
|
@include base($theme);
|
|
86
|
-
@if $color
|
|
87
|
-
@include color($
|
|
68
|
+
@if inspection.theme-has($theme, color) {
|
|
69
|
+
@include color($theme);
|
|
88
70
|
}
|
|
89
|
-
@if $density
|
|
90
|
-
@include density($
|
|
71
|
+
@if inspection.theme-has($theme, density) {
|
|
72
|
+
@include density($theme);
|
|
91
73
|
}
|
|
92
|
-
@if $typography
|
|
93
|
-
@include typography($
|
|
74
|
+
@if inspection.theme-has($theme, typography) {
|
|
75
|
+
@include typography($theme);
|
|
94
76
|
}
|
|
95
77
|
}
|
|
96
78
|
}
|
|
97
79
|
|
|
98
80
|
// Generated MDC ripple color tokens are not being calculated so needs to be set
|
|
99
|
-
@mixin _slider-ripple-color($
|
|
100
|
-
$color:
|
|
81
|
+
@mixin _slider-ripple-color($theme, $palette-name) {
|
|
82
|
+
$color: inspection.get-theme-color($theme, $palette-name);
|
|
83
|
+
|
|
101
84
|
--mat-mdc-slider-ripple-color: #{$color};
|
|
102
85
|
--mat-mdc-slider-hover-ripple-color: #{rgba($color, 0.05)};
|
|
103
86
|
--mat-mdc-slider-focus-ripple-color: #{rgba($color, 0.2)};
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
@mixin color($config-or-theme) {
|
|
17
17
|
$config: theming.get-color-config($config-or-theme);
|
|
18
18
|
|
|
19
|
-
.
|
|
19
|
+
@include sass-utils.current-selector-or-root() {
|
|
20
20
|
@include mdc-snackbar-theme.theme(tokens-mdc-snack-bar.get-color-tokens($config));
|
|
21
21
|
@include token-utils.create-token-values(
|
|
22
22
|
tokens-mat-snack-bar.$prefix,
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
$config: typography.private-typography-to-2018-config(
|
|
30
30
|
theming.get-typography-config($config-or-theme));
|
|
31
31
|
|
|
32
|
-
.
|
|
32
|
+
@include sass-utils.current-selector-or-root() {
|
|
33
33
|
@include mdc-snackbar-theme.theme(tokens-mdc-snack-bar.get-typography-tokens($config));
|
|
34
34
|
}
|
|
35
35
|
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
// TODO(crisbeto): this file isn't used anymore and should be removed.
|
|
2
|
-
|
|
3
|
-
$standard-height: 48px !default;
|
|
4
|
-
// Minimum height for highest density can vary based on the content that developers
|
|
5
|
-
// project into button-toggle's. We use a minimum of `24px` though because commonly
|
|
6
|
-
// icons or text are displayed. Icons by default have a size of `24px`.
|
|
7
|
-
$standard-minimum-height: 24px !default;
|
|
8
|
-
$standard-maximum-height: $standard-height !default;
|
|
9
|
-
|
|
10
|
-
$standard-density-config: (
|
|
11
|
-
height: (
|
|
12
|
-
default: $standard-height,
|
|
13
|
-
maximum: $standard-maximum-height,
|
|
14
|
-
minimum: $standard-minimum-height,
|
|
15
|
-
)
|
|
16
|
-
) !default;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
// TODO: this file isn't used, but is kept for backwards compatibility. It should be deleted in v17.
|
|
2
|
-
|
|
3
|
-
$height: 56px !default;
|
|
4
|
-
// Minimum height for paginator's in the highest density is determined based on how
|
|
5
|
-
// much the paginator can shrink until the content exceeds (i.e. navigation buttons).
|
|
6
|
-
$minimum-height: 40px !default;
|
|
7
|
-
$maximum-height: $height !default;
|
|
8
|
-
|
|
9
|
-
$density-config: (
|
|
10
|
-
height: (
|
|
11
|
-
default: $height,
|
|
12
|
-
maximum: $maximum-height,
|
|
13
|
-
minimum: $minimum-height,
|
|
14
|
-
)
|
|
15
|
-
) !default;
|