@angular/material 16.2.0-next.5 → 16.2.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/bottom-sheet/index.d.ts +6 -0
- package/core/selection/pseudo-checkbox/_pseudo-checkbox-common.scss +1 -1
- package/core/tokens/m2/mat/_form-field.scss +44 -0
- package/core/tokens/m2/mat/_grid-list.scss +46 -0
- package/core/tokens/m2/mat/_icon.scss +45 -0
- package/core/tokens/m2/mat/_slide-toggle.scss +1 -1
- package/core/tokens/m2/mat/_tab-header.scss +1 -1
- package/core/tokens/m2/mdc/_circular-progress.scss +1 -1
- package/core/tokens/m2/mdc/_filled-text-field.scss +175 -0
- package/core/tokens/m2/mdc/_outlined-text-field.scss +158 -0
- package/core/tokens/m2/mdc/_plain-tooltip.scss +2 -2
- package/dialog/index.d.ts +6 -0
- package/esm2022/bottom-sheet/bottom-sheet-ref.mjs +8 -1
- package/esm2022/core/version.mjs +1 -1
- package/esm2022/dialog/dialog-ref.mjs +1 -1
- package/esm2022/dialog/dialog.mjs +2 -1
- package/esm2022/form-field/form-field.mjs +3 -3
- package/esm2022/grid-list/grid-list.mjs +2 -2
- package/esm2022/grid-list/grid-tile.mjs +2 -2
- package/esm2022/icon/icon.mjs +2 -2
- package/esm2022/slide-toggle/slide-toggle.mjs +2 -2
- package/esm2022/tabs/ink-bar.mjs +1 -1
- package/esm2022/tabs/tab-group.mjs +2 -2
- package/esm2022/tabs/tab-nav-bar/tab-nav-bar.mjs +2 -2
- package/fesm2022/bottom-sheet.mjs +7 -0
- package/fesm2022/bottom-sheet.mjs.map +1 -1
- package/fesm2022/core.mjs +1 -1
- package/fesm2022/core.mjs.map +1 -1
- package/fesm2022/dialog.mjs +1 -0
- package/fesm2022/dialog.mjs.map +1 -1
- package/fesm2022/form-field.mjs +2 -2
- package/fesm2022/form-field.mjs.map +1 -1
- package/fesm2022/grid-list.mjs +4 -4
- package/fesm2022/grid-list.mjs.map +1 -1
- package/fesm2022/icon.mjs +2 -2
- package/fesm2022/icon.mjs.map +1 -1
- package/fesm2022/slide-toggle.mjs +2 -2
- package/fesm2022/slide-toggle.mjs.map +1 -1
- package/fesm2022/tabs.mjs +4 -4
- package/fesm2022/tabs.mjs.map +1 -1
- package/form-field/_form-field-theme.scss +37 -44
- package/form-field/_mdc-text-field-structure-overrides.scss +18 -0
- package/grid-list/_grid-list-theme.scss +7 -6
- package/icon/_icon-theme.scss +18 -8
- package/legacy-prebuilt-themes/legacy-deeppurple-amber.css +1 -1
- package/legacy-prebuilt-themes/legacy-indigo-pink.css +1 -1
- package/legacy-prebuilt-themes/legacy-pink-bluegrey.css +1 -1
- package/legacy-prebuilt-themes/legacy-purple-green.css +1 -1
- package/package.json +49 -49
- 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/schematics/ng-add/index.js +1 -1
- package/schematics/ng-add/index.mjs +1 -1
- package/schematics/ng-generate/mdc-migration/index_bundled.js +44 -44
- package/schematics/ng-update/index_bundled.js +25 -25
- package/tabs/_tabs-common.scss +1 -1
- package/tabs/index.d.ts +1 -1
|
@@ -1,63 +1,51 @@
|
|
|
1
|
-
@use '@material/textfield' as mdc-
|
|
2
|
-
@use '@material/
|
|
3
|
-
@use '@material/notched-outline' as mdc-notched-outline;
|
|
4
|
-
@use '@material/line-ripple' as mdc-line-ripple;
|
|
5
|
-
@use '@material/theme/theme-color' as mdc-theme-color;
|
|
1
|
+
@use '@material/textfield/filled-text-field-theme' as mdc-filled-text-field-theme;
|
|
2
|
+
@use '@material/textfield/outlined-text-field-theme' as mdc-outlined-text-field-theme;
|
|
6
3
|
@use '@material/typography/typography' as mdc-typography;
|
|
7
4
|
|
|
5
|
+
@use '../core/tokens/m2/mdc/filled-text-field' as tokens-mdc-filled-text-field;
|
|
6
|
+
@use '../core/tokens/m2/mdc/outlined-text-field' as tokens-mdc-outlined-text-field;
|
|
7
|
+
@use '../core/tokens/m2/mat/form-field' as tokens-mat-form-field;
|
|
8
8
|
@use '../core/theming/theming';
|
|
9
9
|
@use '../core/typography/typography';
|
|
10
10
|
@use '../core/mdc-helpers/mdc-helpers';
|
|
11
|
+
@use '../core/style/sass-utils';
|
|
12
|
+
@use '../core/tokens/token-utils';
|
|
11
13
|
@use './form-field-density';
|
|
12
14
|
@use './form-field-subscript';
|
|
13
15
|
@use './form-field-focus-overlay';
|
|
14
16
|
@use './form-field-native-select';
|
|
15
17
|
@use './mdc-text-field-theme-variable-refresh';
|
|
16
18
|
|
|
19
|
+
@mixin color($config-or-theme) {
|
|
20
|
+
$config: theming.get-color-config($config-or-theme);
|
|
17
21
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
@include mdc-textfield.caret-color($palette-name, $query);
|
|
26
|
-
@include mdc-textfield.line-ripple-color($palette-name, $query);
|
|
27
|
-
|
|
28
|
-
.mdc-text-field--focused {
|
|
29
|
-
@include mdc-textfield.focused_($query);
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
.mdc-text-field--invalid {
|
|
33
|
-
@include mdc-textfield.invalid_($query);
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
.mdc-text-field--outlined {
|
|
37
|
-
@include mdc-textfield.focused-outline-color($palette-name, $query);
|
|
22
|
+
@include sass-utils.current-selector-or-root() {
|
|
23
|
+
@include mdc-filled-text-field-theme.theme(
|
|
24
|
+
tokens-mdc-filled-text-field.get-color-tokens($config));
|
|
25
|
+
@include mdc-outlined-text-field-theme.theme(
|
|
26
|
+
tokens-mdc-outlined-text-field.get-color-tokens($config));
|
|
27
|
+
@include token-utils.create-token-values(tokens-mat-form-field.$prefix,
|
|
28
|
+
tokens-mat-form-field.get-color-tokens($config));
|
|
38
29
|
}
|
|
39
30
|
|
|
40
|
-
mdc-textfield.$focused-label-color: $orig-focused-label-color;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
@mixin color($config-or-theme) {
|
|
44
|
-
$config: theming.get-color-config($config-or-theme);
|
|
45
31
|
@include mdc-helpers.using-mdc-theme($config) {
|
|
46
32
|
@include mdc-text-field-theme-variable-refresh.private-text-field-refresh-theme-variables() {
|
|
47
|
-
@include mdc-textfield.without-ripple($query: mdc-helpers.$mdc-theme-styles-query);
|
|
48
|
-
@include mdc-floating-label.core-styles($query: mdc-helpers.$mdc-theme-styles-query);
|
|
49
|
-
@include mdc-notched-outline.core-styles($query: mdc-helpers.$mdc-theme-styles-query);
|
|
50
|
-
@include mdc-line-ripple.core-styles($query: mdc-helpers.$mdc-theme-styles-query);
|
|
51
33
|
@include form-field-subscript.private-form-field-subscript-color();
|
|
52
34
|
@include form-field-focus-overlay.private-form-field-focus-overlay-color();
|
|
53
35
|
@include form-field-native-select.private-form-field-native-select-color($config);
|
|
54
36
|
|
|
55
37
|
.mat-mdc-form-field.mat-accent {
|
|
56
|
-
@include
|
|
38
|
+
@include mdc-filled-text-field-theme.theme(
|
|
39
|
+
tokens-mdc-filled-text-field.private-get-color-palette-color-tokens($config, accent));
|
|
40
|
+
@include mdc-outlined-text-field-theme.theme(
|
|
41
|
+
tokens-mdc-outlined-text-field.private-get-color-palette-color-tokens($config, accent));
|
|
57
42
|
}
|
|
58
43
|
|
|
59
44
|
.mat-mdc-form-field.mat-warn {
|
|
60
|
-
@include
|
|
45
|
+
@include mdc-filled-text-field-theme.theme(
|
|
46
|
+
tokens-mdc-filled-text-field.private-get-color-palette-color-tokens($config, warn));
|
|
47
|
+
@include mdc-outlined-text-field-theme.theme(
|
|
48
|
+
tokens-mdc-outlined-text-field.private-get-color-palette-color-tokens($config, warn));
|
|
61
49
|
}
|
|
62
50
|
|
|
63
51
|
// This fixes an issue where the notch appears to be thicker than the rest of the outline when
|
|
@@ -68,15 +56,16 @@
|
|
|
68
56
|
// Note: class name is repeated to achieve sufficient specificity over the various MDC states.
|
|
69
57
|
// (hover, focus, etc.)
|
|
70
58
|
// TODO(mmalerba): port this fix into MDC
|
|
59
|
+
// TODO(crisbeto): move this into the structural styles
|
|
71
60
|
.mat-mdc-form-field.mat-mdc-form-field.mat-mdc-form-field.mat-mdc-form-field {
|
|
72
|
-
&.mat-mdc-form-field .mdc-notched-outline__notch {
|
|
61
|
+
&.mat-mdc-form-field.mat-mdc-form-field .mdc-notched-outline__notch {
|
|
73
62
|
border-left: 1px solid transparent;
|
|
74
63
|
}
|
|
75
64
|
}
|
|
76
65
|
|
|
77
66
|
[dir='rtl'] {
|
|
78
67
|
.mat-mdc-form-field.mat-mdc-form-field.mat-mdc-form-field.mat-mdc-form-field {
|
|
79
|
-
&.mat-mdc-form-field .mdc-notched-outline__notch {
|
|
68
|
+
&.mat-mdc-form-field.mat-mdc-form-field .mdc-notched-outline__notch {
|
|
80
69
|
border-left: none;
|
|
81
70
|
border-right: 1px solid transparent;
|
|
82
71
|
}
|
|
@@ -89,21 +78,25 @@
|
|
|
89
78
|
@mixin typography($config-or-theme) {
|
|
90
79
|
$config: typography.private-typography-to-2018-config(
|
|
91
80
|
theming.get-typography-config($config-or-theme));
|
|
81
|
+
|
|
82
|
+
@include sass-utils.current-selector-or-root() {
|
|
83
|
+
@include mdc-filled-text-field-theme.theme(
|
|
84
|
+
tokens-mdc-filled-text-field.get-typography-tokens($config));
|
|
85
|
+
@include mdc-outlined-text-field-theme.theme(
|
|
86
|
+
tokens-mdc-outlined-text-field.get-typography-tokens($config));
|
|
87
|
+
}
|
|
88
|
+
|
|
92
89
|
@include mdc-helpers.using-mdc-typography($config) {
|
|
93
|
-
@include mdc-textfield.without-ripple($query: mdc-helpers.$mdc-typography-styles-query);
|
|
94
|
-
@include mdc-floating-label.core-styles($query: mdc-helpers.$mdc-typography-styles-query);
|
|
95
|
-
@include mdc-notched-outline.core-styles($query: mdc-helpers.$mdc-typography-styles-query);
|
|
96
|
-
@include mdc-line-ripple.core-styles($query: mdc-helpers.$mdc-typography-styles-query);
|
|
97
90
|
@include form-field-subscript.private-form-field-subscript-typography($config);
|
|
98
91
|
|
|
99
92
|
// MDC uses `subtitle1` for the input value, placeholder and floating label. The spec
|
|
100
93
|
// shows `body1` for text fields though, so we manually override the typography.
|
|
101
94
|
// Note: Form controls inherit the typography from the parent form field.
|
|
102
|
-
.mat-mdc-form-field
|
|
103
|
-
.mat-mdc-floating-label {
|
|
95
|
+
.mat-mdc-form-field {
|
|
104
96
|
@include mdc-typography.typography(body1, $query: mdc-helpers.$mdc-typography-styles-query);
|
|
105
97
|
}
|
|
106
98
|
|
|
99
|
+
// TODO(crisbeto): we may be able to set this style with the `label-text-populated-size` token.
|
|
107
100
|
// Above, we updated the floating label to use the `body1` typography level. The MDC notched
|
|
108
101
|
// outline overrides this accidentally (only when the label floats) to a `rem`-based value.
|
|
109
102
|
// This results in different label widths when floated/docked and ultimately breaks the notch
|
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
@use '@material/textfield/variables' as mdc-textfield-variables;
|
|
2
|
+
@use '@material/typography/typography' as mdc-typography;
|
|
3
|
+
@use '../core/tokens/m2/mat/form-field' as tokens-mat-form-field;
|
|
4
|
+
@use '../core/tokens/token-utils';
|
|
5
|
+
@use '../core/style/vendor-prefixes';
|
|
2
6
|
|
|
3
7
|
// Mixin that can be included to override the default MDC text-field
|
|
4
8
|
// styles to fit our needs. See individual comments for context on why
|
|
@@ -13,6 +17,7 @@
|
|
|
13
17
|
// Note: We increase specificity here because the MDC textfield seems to override this,
|
|
14
18
|
// depending on the CSS order, with an affix selector joint with the input.
|
|
15
19
|
.mat-mdc-form-field-input-control.mat-mdc-form-field-input-control {
|
|
20
|
+
@include mdc-typography.smooth-font();
|
|
16
21
|
font: inherit;
|
|
17
22
|
letter-spacing: inherit;
|
|
18
23
|
text-decoration: inherit;
|
|
@@ -21,6 +26,8 @@
|
|
|
21
26
|
}
|
|
22
27
|
|
|
23
28
|
.mat-mdc-form-field .mat-mdc-floating-label.mdc-floating-label {
|
|
29
|
+
@include mdc-typography.smooth-font();
|
|
30
|
+
|
|
24
31
|
// In order to ensure proper alignment of the floating label, we reset its line-height.
|
|
25
32
|
// The line-height is not important as the element is absolutely positioned and only has one
|
|
26
33
|
// line of text.
|
|
@@ -86,6 +93,17 @@
|
|
|
86
93
|
}
|
|
87
94
|
}
|
|
88
95
|
|
|
96
|
+
// Before the switch to the tokens MDC was setting a specific placeholder color when the input
|
|
97
|
+
// is disabled, but now there's no token for it so we need to implement it ourselves.
|
|
98
|
+
.mat-form-field-disabled .mdc-text-field__input {
|
|
99
|
+
@include vendor-prefixes.input-placeholder {
|
|
100
|
+
@include token-utils.use-tokens(
|
|
101
|
+
tokens-mat-form-field.$prefix, tokens-mat-form-field.get-token-slots()) {
|
|
102
|
+
@include token-utils.create-token-slot(color, disabled-input-text-placeholder-color);
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
|
|
89
107
|
// The default MDC text-field implementation does not support labels which always float.
|
|
90
108
|
// MDC only renders the placeholder if the input is focused. We extend this to show the
|
|
91
109
|
// placeholder if the form-field label is set to always float.
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
@use '../core/theming/theming';
|
|
2
2
|
@use '../core/typography/typography';
|
|
3
|
-
@use '../core/
|
|
4
|
-
@use '../core/style/
|
|
3
|
+
@use '../core/tokens/m2/mat/grid-list' as tokens-mat-grid-list;
|
|
4
|
+
@use '../core/style/sass-utils';
|
|
5
|
+
@use '../core/tokens/token-utils';
|
|
5
6
|
|
|
6
7
|
|
|
7
8
|
// Include this empty mixin for consistency with the other components.
|
|
@@ -10,10 +11,10 @@
|
|
|
10
11
|
@mixin typography($config-or-theme) {
|
|
11
12
|
$config: typography.private-typography-to-2014-config(
|
|
12
13
|
theming.get-typography-config($config-or-theme));
|
|
13
|
-
|
|
14
|
-
.
|
|
15
|
-
@include
|
|
16
|
-
|
|
14
|
+
|
|
15
|
+
@include sass-utils.current-selector-or-root() {
|
|
16
|
+
@include token-utils.create-token-values(tokens-mat-grid-list.$prefix,
|
|
17
|
+
tokens-mat-grid-list.get-typography-tokens($config));
|
|
17
18
|
}
|
|
18
19
|
}
|
|
19
20
|
|
package/icon/_icon-theme.scss
CHANGED
|
@@ -1,25 +1,35 @@
|
|
|
1
1
|
@use 'sass:map';
|
|
2
2
|
@use '../core/theming/theming';
|
|
3
|
+
@use '../core/tokens/m2/mat/icon' as tokens-mat-icon;
|
|
4
|
+
@use '../core/tokens/token-utils';
|
|
5
|
+
@use '../core/style/sass-utils';
|
|
6
|
+
|
|
7
|
+
@mixin _palette-colors($config, $palette-name) {
|
|
8
|
+
$palette: map.get($config, $palette-name);
|
|
9
|
+
$color: theming.get-color-from-palette($palette, text);
|
|
10
|
+
$tokens: tokens-mat-icon.private-get-icon-color-tokens($color);
|
|
11
|
+
@include token-utils.create-token-values(tokens-mat-icon.$prefix, $tokens);
|
|
12
|
+
}
|
|
3
13
|
|
|
4
14
|
@mixin color($config-or-theme) {
|
|
5
15
|
$config: theming.get-color-config($config-or-theme);
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
16
|
+
|
|
17
|
+
@include sass-utils.current-selector-or-root() {
|
|
18
|
+
@include token-utils.create-token-values(tokens-mat-icon.$prefix,
|
|
19
|
+
tokens-mat-icon.get-color-tokens($config));
|
|
20
|
+
}
|
|
11
21
|
|
|
12
22
|
.mat-icon {
|
|
13
23
|
&.mat-primary {
|
|
14
|
-
|
|
24
|
+
@include _palette-colors($config, primary);
|
|
15
25
|
}
|
|
16
26
|
|
|
17
27
|
&.mat-accent {
|
|
18
|
-
|
|
28
|
+
@include _palette-colors($config, accent);
|
|
19
29
|
}
|
|
20
30
|
|
|
21
31
|
&.mat-warn {
|
|
22
|
-
|
|
32
|
+
@include _palette-colors($config, warn);
|
|
23
33
|
}
|
|
24
34
|
}
|
|
25
35
|
}
|