@angular/material 18.1.0-rc.0 → 18.2.0-next.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/button/_button-base.scss +13 -6
- package/button/_button-theme.scss +26 -27
- package/core/tokens/m2/mdc/_extended-fab.scss +5 -6
- package/core/tokens/m2/mdc/_fab-small.scss +4 -4
- package/core/tokens/m2/mdc/_fab.scss +4 -4
- package/core/tokens/m2/mdc/_protected-button.scss +13 -7
- package/core/tokens/m3/mdc/_protected-button.scss +22 -5
- package/datepicker/index.d.ts +5 -1
- package/esm2022/button/button.mjs +4 -4
- package/esm2022/chips/chip-grid.mjs +24 -6
- package/esm2022/core/internal-form-field/internal-form-field.mjs +2 -2
- package/esm2022/core/version.mjs +1 -1
- package/esm2022/datepicker/datepicker-input-base.mjs +1 -1
- package/esm2022/list/action-list.mjs +2 -2
- package/esm2022/list/list-option.mjs +18 -4
- package/esm2022/list/list.mjs +10 -4
- package/esm2022/list/nav-list.mjs +2 -2
- package/esm2022/list/selection-list.mjs +2 -2
- package/esm2022/tabs/tabs-animations.mjs +2 -2
- package/esm2022/tooltip/tooltip.mjs +1 -1
- package/fesm2022/button.mjs +4 -4
- package/fesm2022/button.mjs.map +1 -1
- package/fesm2022/chips.mjs +23 -5
- package/fesm2022/chips.mjs.map +1 -1
- package/fesm2022/core.mjs +3 -3
- package/fesm2022/core.mjs.map +1 -1
- package/fesm2022/datepicker.mjs.map +1 -1
- package/fesm2022/list.mjs +32 -12
- package/fesm2022/list.mjs.map +1 -1
- package/fesm2022/tabs.mjs +1 -1
- package/fesm2022/tabs.mjs.map +1 -1
- package/fesm2022/tooltip.mjs.map +1 -1
- package/list/_list-inherited-structure.scss +516 -0
- package/list/_list-item-hcm-indicator.scss +2 -3
- package/list/_list-theme.scss +17 -18
- package/list/index.d.ts +2 -0
- package/package.json +2 -2
- package/prebuilt-themes/azure-blue.css +1 -1
- package/prebuilt-themes/cyan-orange.css +1 -1
- package/prebuilt-themes/deeppurple-amber.css +1 -1
- package/prebuilt-themes/indigo-pink.css +1 -1
- package/prebuilt-themes/magenta-violet.css +1 -1
- package/prebuilt-themes/pink-bluegrey.css +1 -1
- package/prebuilt-themes/purple-green.css +1 -1
- package/prebuilt-themes/rose-red.css +1 -1
- package/schematics/ng-add/index.js +1 -1
- package/schematics/ng-add/index.mjs +1 -1
- package/tooltip/index.d.ts +1 -1
- package/list/_list-option-trailing-avatar-compat.scss +0 -59
package/button/_button-base.scss
CHANGED
|
@@ -1,8 +1,5 @@
|
|
|
1
|
-
@use '@material/touch-target' as mdc-touch-target;
|
|
2
|
-
|
|
3
1
|
@use '../core/tokens/token-utils';
|
|
4
2
|
@use '../core/style/layout-common';
|
|
5
|
-
@use '../core/mdc-helpers/mdc-helpers';
|
|
6
3
|
|
|
7
4
|
// Adds styles necessary to provide stateful interactions with the button. This includes providing
|
|
8
5
|
// content for the state container's ::before and ::after so that they can be given a background
|
|
@@ -126,9 +123,19 @@
|
|
|
126
123
|
// the button itself would require us to wrap it in another div. See:
|
|
127
124
|
// https://github.com/material-components/material-components-web/tree/master/packages/mdc-button#making-buttons-accessible
|
|
128
125
|
.mat-mdc-button-touch-target {
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
126
|
+
position: absolute;
|
|
127
|
+
top: 50%;
|
|
128
|
+
height: 48px;
|
|
129
|
+
|
|
130
|
+
@if $is-square {
|
|
131
|
+
left: 50%;
|
|
132
|
+
width: 48px;
|
|
133
|
+
transform: translate(-50%, -50%);
|
|
134
|
+
} @else {
|
|
135
|
+
left: 0;
|
|
136
|
+
right: 0;
|
|
137
|
+
transform: translateY(-50%);
|
|
138
|
+
}
|
|
132
139
|
|
|
133
140
|
@include token-utils.use-tokens($prefix, $slots) {
|
|
134
141
|
@include token-utils.create-token-slot(display, touch-target-display);
|
|
@@ -1,8 +1,3 @@
|
|
|
1
|
-
@use '@material/button/button-text-theme' as mdc-button-text-theme;
|
|
2
|
-
@use '@material/button/button-filled-theme' as mdc-button-filled-theme;
|
|
3
|
-
@use '@material/button/button-protected-theme' as mdc-button-protected-theme;
|
|
4
|
-
@use '@material/button/button-outlined-theme' as mdc-button-outlined-theme;
|
|
5
|
-
|
|
6
1
|
@use '../core/theming/theming';
|
|
7
2
|
@use '../core/theming/inspection';
|
|
8
3
|
@use '../core/theming/validation';
|
|
@@ -29,7 +24,7 @@
|
|
|
29
24
|
tokens-mat-text-button.get-color-tokens($theme)
|
|
30
25
|
);
|
|
31
26
|
|
|
32
|
-
@include mdc-
|
|
27
|
+
@include token-utils.create-token-values(tokens-mdc-text-button.$prefix, $mdc-tokens);
|
|
33
28
|
@include token-utils.create-token-values(tokens-mat-text-button.$prefix, $mat-tokens);
|
|
34
29
|
}
|
|
35
30
|
|
|
@@ -44,7 +39,7 @@
|
|
|
44
39
|
tokens-mat-filled-button.get-color-tokens($theme)
|
|
45
40
|
);
|
|
46
41
|
|
|
47
|
-
@include mdc-
|
|
42
|
+
@include token-utils.create-token-values(tokens-mdc-filled-button.$prefix, $mdc-tokens);
|
|
48
43
|
@include token-utils.create-token-values(tokens-mat-filled-button.$prefix, $mat-tokens);
|
|
49
44
|
}
|
|
50
45
|
|
|
@@ -59,7 +54,7 @@
|
|
|
59
54
|
tokens-mat-protected-button.get-color-tokens($theme)
|
|
60
55
|
);
|
|
61
56
|
|
|
62
|
-
@include mdc-
|
|
57
|
+
@include token-utils.create-token-values(tokens-mdc-protected-button.$prefix, $mdc-tokens);
|
|
63
58
|
@include token-utils.create-token-values(tokens-mat-protected-button.$prefix, $mat-tokens);
|
|
64
59
|
}
|
|
65
60
|
|
|
@@ -74,7 +69,7 @@
|
|
|
74
69
|
tokens-mat-outlined-button.get-color-tokens($theme)
|
|
75
70
|
);
|
|
76
71
|
|
|
77
|
-
@include mdc-
|
|
72
|
+
@include token-utils.create-token-values(tokens-mdc-outlined-button.$prefix, $mdc-tokens);
|
|
78
73
|
@include token-utils.create-token-values(tokens-mat-outlined-button.$prefix, $mat-tokens);
|
|
79
74
|
}
|
|
80
75
|
|
|
@@ -97,10 +92,14 @@
|
|
|
97
92
|
token-utils.get-tokens-for($tokens, tokens-mat-filled-button.$prefix, $options...);
|
|
98
93
|
$mat-outlined-button-tokens:
|
|
99
94
|
token-utils.get-tokens-for($tokens, tokens-mat-outlined-button.$prefix, $options...);
|
|
100
|
-
|
|
101
|
-
@include
|
|
102
|
-
@include
|
|
103
|
-
|
|
95
|
+
|
|
96
|
+
@include token-utils.create-token-values(tokens-mdc-text-button.$prefix, $mdc-text-button-tokens);
|
|
97
|
+
@include token-utils.create-token-values(
|
|
98
|
+
tokens-mdc-protected-button.$prefix, $mdc-protected-button-tokens);
|
|
99
|
+
@include token-utils.create-token-values(
|
|
100
|
+
tokens-mdc-filled-button.$prefix, $mdc-filled-button-tokens);
|
|
101
|
+
@include token-utils.create-token-values(
|
|
102
|
+
tokens-mdc-outlined-button.$prefix, $mdc-outlined-button-tokens);
|
|
104
103
|
@include token-utils.create-token-values(tokens-mat-text-button.$prefix, $mat-text-button-tokens);
|
|
105
104
|
@include token-utils.create-token-values(
|
|
106
105
|
tokens-mat-protected-button.$prefix, $mat-protected-button-tokens);
|
|
@@ -119,13 +118,13 @@
|
|
|
119
118
|
}
|
|
120
119
|
@else {
|
|
121
120
|
@include sass-utils.current-selector-or-root() {
|
|
122
|
-
@include mdc-
|
|
121
|
+
@include token-utils.create-token-values(tokens-mdc-text-button.$prefix,
|
|
123
122
|
tokens-mdc-text-button.get-unthemable-tokens());
|
|
124
|
-
@include mdc-
|
|
123
|
+
@include token-utils.create-token-values(tokens-mdc-filled-button.$prefix,
|
|
125
124
|
tokens-mdc-filled-button.get-unthemable-tokens());
|
|
126
|
-
@include mdc-
|
|
125
|
+
@include token-utils.create-token-values(tokens-mdc-protected-button.$prefix,
|
|
127
126
|
tokens-mdc-protected-button.get-unthemable-tokens());
|
|
128
|
-
@include mdc-
|
|
127
|
+
@include token-utils.create-token-values(tokens-mdc-outlined-button.$prefix,
|
|
129
128
|
tokens-mdc-outlined-button.get-unthemable-tokens());
|
|
130
129
|
|
|
131
130
|
@include token-utils.create-token-values(tokens-mat-text-button.$prefix,
|
|
@@ -223,14 +222,14 @@
|
|
|
223
222
|
}
|
|
224
223
|
@else {
|
|
225
224
|
@include sass-utils.current-selector-or-root() {
|
|
226
|
-
@include mdc-
|
|
225
|
+
@include token-utils.create-token-values(tokens-mdc-text-button.$prefix,
|
|
227
226
|
tokens-mdc-text-button.get-typography-tokens($theme));
|
|
228
|
-
@include mdc-
|
|
227
|
+
@include token-utils.create-token-values(tokens-mdc-filled-button.$prefix,
|
|
229
228
|
tokens-mdc-filled-button.get-typography-tokens($theme));
|
|
230
|
-
@include
|
|
231
|
-
tokens-mdc-outlined-button.get-typography-tokens($theme));
|
|
232
|
-
@include mdc-button-protected-theme.theme(
|
|
229
|
+
@include token-utils.create-token-values(tokens-mdc-protected-button.$prefix,
|
|
233
230
|
tokens-mdc-protected-button.get-typography-tokens($theme));
|
|
231
|
+
@include token-utils.create-token-values(tokens-mdc-outlined-button.$prefix,
|
|
232
|
+
tokens-mdc-outlined-button.get-typography-tokens($theme));
|
|
234
233
|
|
|
235
234
|
@include token-utils.create-token-values(tokens-mat-text-button.$prefix,
|
|
236
235
|
tokens-mat-text-button.get-typography-tokens($theme));
|
|
@@ -252,14 +251,14 @@
|
|
|
252
251
|
}
|
|
253
252
|
@else {
|
|
254
253
|
@include sass-utils.current-selector-or-root() {
|
|
255
|
-
@include mdc-
|
|
254
|
+
@include token-utils.create-token-values(tokens-mdc-text-button.$prefix,
|
|
256
255
|
tokens-mdc-text-button.get-density-tokens($theme));
|
|
257
|
-
@include mdc-
|
|
256
|
+
@include token-utils.create-token-values(tokens-mdc-filled-button.$prefix,
|
|
258
257
|
tokens-mdc-filled-button.get-density-tokens($theme));
|
|
259
|
-
@include
|
|
260
|
-
tokens-mdc-outlined-button.get-density-tokens($theme));
|
|
261
|
-
@include mdc-button-protected-theme.theme(
|
|
258
|
+
@include token-utils.create-token-values(tokens-mdc-protected-button.$prefix,
|
|
262
259
|
tokens-mdc-protected-button.get-density-tokens($theme));
|
|
260
|
+
@include token-utils.create-token-values(tokens-mdc-outlined-button.$prefix,
|
|
261
|
+
tokens-mdc-outlined-button.get-density-tokens($theme));
|
|
263
262
|
|
|
264
263
|
@include token-utils.create-token-values(tokens-mat-text-button.$prefix,
|
|
265
264
|
tokens-mat-text-button.get-density-tokens($theme));
|
|
@@ -10,6 +10,10 @@ $prefix: (mdc, extended-fab);
|
|
|
10
10
|
@return (
|
|
11
11
|
container-height: 48px,
|
|
12
12
|
container-shape: 24px,
|
|
13
|
+
container-elevation-shadow: elevation.get-box-shadow(6),
|
|
14
|
+
focus-container-elevation-shadow: elevation.get-box-shadow(8),
|
|
15
|
+
hover-container-elevation-shadow: elevation.get-box-shadow(8),
|
|
16
|
+
pressed-container-elevation-shadow: elevation.get-box-shadow(12),
|
|
13
17
|
|
|
14
18
|
// =============================================================================================
|
|
15
19
|
// = TOKENS NOT USED IN ANGULAR MATERIAL =
|
|
@@ -49,12 +53,7 @@ $prefix: (mdc, extended-fab);
|
|
|
49
53
|
|
|
50
54
|
// Tokens that can be configured through Angular Material's color theming API.
|
|
51
55
|
@function get-color-tokens($theme) {
|
|
52
|
-
@return (
|
|
53
|
-
container-elevation-shadow: elevation.get-box-shadow(6),
|
|
54
|
-
focus-container-elevation-shadow: elevation.get-box-shadow(8),
|
|
55
|
-
hover-container-elevation-shadow: elevation.get-box-shadow(8),
|
|
56
|
-
pressed-container-elevation-shadow: elevation.get-box-shadow(12),
|
|
57
|
-
);
|
|
56
|
+
@return ();
|
|
58
57
|
}
|
|
59
58
|
|
|
60
59
|
// Tokens that can be configured through Angular Material's typography theming API.
|
|
@@ -9,6 +9,10 @@ $prefix: (mdc, fab-small);
|
|
|
9
9
|
@function get-unthemable-tokens() {
|
|
10
10
|
@return (
|
|
11
11
|
container-shape: 50%,
|
|
12
|
+
container-elevation-shadow: elevation.get-box-shadow(6),
|
|
13
|
+
focus-container-elevation-shadow: elevation.get-box-shadow(8),
|
|
14
|
+
hover-container-elevation-shadow: elevation.get-box-shadow(8),
|
|
15
|
+
pressed-container-elevation-shadow: elevation.get-box-shadow(12),
|
|
12
16
|
|
|
13
17
|
// =============================================================================================
|
|
14
18
|
// = TOKENS NOT USED IN ANGULAR MATERIAL =
|
|
@@ -52,10 +56,6 @@ $prefix: (mdc, fab-small);
|
|
|
52
56
|
@return (
|
|
53
57
|
// Background color of the FAB.
|
|
54
58
|
container-color: inspection.get-theme-color($theme, background, card),
|
|
55
|
-
container-elevation-shadow: elevation.get-box-shadow(6),
|
|
56
|
-
focus-container-elevation-shadow: elevation.get-box-shadow(8),
|
|
57
|
-
hover-container-elevation-shadow: elevation.get-box-shadow(8),
|
|
58
|
-
pressed-container-elevation-shadow: elevation.get-box-shadow(12),
|
|
59
59
|
);
|
|
60
60
|
}
|
|
61
61
|
|
|
@@ -9,6 +9,10 @@ $prefix: (mdc, fab);
|
|
|
9
9
|
@function get-unthemable-tokens() {
|
|
10
10
|
@return (
|
|
11
11
|
container-shape: 50%,
|
|
12
|
+
container-elevation-shadow: elevation.get-box-shadow(6),
|
|
13
|
+
focus-container-elevation-shadow: elevation.get-box-shadow(8),
|
|
14
|
+
hover-container-elevation-shadow: elevation.get-box-shadow(8),
|
|
15
|
+
pressed-container-elevation-shadow: elevation.get-box-shadow(12),
|
|
12
16
|
|
|
13
17
|
// =============================================================================================
|
|
14
18
|
// = TOKENS NOT USED IN ANGULAR MATERIAL =
|
|
@@ -53,10 +57,6 @@ $prefix: (mdc, fab);
|
|
|
53
57
|
@return (
|
|
54
58
|
// Background color of the FAB.
|
|
55
59
|
container-color: inspection.get-theme-color($theme, background, card),
|
|
56
|
-
container-elevation-shadow: elevation.get-box-shadow(6),
|
|
57
|
-
focus-container-elevation-shadow: elevation.get-box-shadow(8),
|
|
58
|
-
hover-container-elevation-shadow: elevation.get-box-shadow(8),
|
|
59
|
-
pressed-container-elevation-shadow: elevation.get-box-shadow(12),
|
|
60
60
|
);
|
|
61
61
|
}
|
|
62
62
|
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
@use 'sass:map';
|
|
2
2
|
@use '../../token-utils';
|
|
3
3
|
@use '../../../style/sass-utils';
|
|
4
|
+
@use '../../../style/elevation';
|
|
4
5
|
@use '../../../theming/inspection';
|
|
5
6
|
@use '../../../theming/theming';
|
|
6
7
|
@use '../../../mdc-helpers/mdc-helpers';
|
|
@@ -17,7 +18,11 @@ $prefix: (mdc, protected-button);
|
|
|
17
18
|
@function get-unthemable-tokens() {
|
|
18
19
|
@return (
|
|
19
20
|
container-shape: 4px,
|
|
20
|
-
|
|
21
|
+
container-elevation-shadow: elevation.get-box-shadow(2),
|
|
22
|
+
disabled-container-elevation-shadow: elevation.get-box-shadow(0),
|
|
23
|
+
focus-container-elevation-shadow: elevation.get-box-shadow(4),
|
|
24
|
+
hover-container-elevation-shadow: elevation.get-box-shadow(4),
|
|
25
|
+
pressed-container-elevation-shadow: elevation.get-box-shadow(8),
|
|
21
26
|
|
|
22
27
|
// =============================================================================================
|
|
23
28
|
// = TOKENS NOT USED IN ANGULAR MATERIAL =
|
|
@@ -39,6 +44,13 @@ $prefix: (mdc, protected-button);
|
|
|
39
44
|
focus-state-layer-color: null,
|
|
40
45
|
hover-state-layer-color: null,
|
|
41
46
|
pressed-state-layer-color: null,
|
|
47
|
+
keep-touch-target: null,
|
|
48
|
+
container-elevation: null,
|
|
49
|
+
disabled-container-elevation: null,
|
|
50
|
+
focus-container-elevation: null,
|
|
51
|
+
hover-container-elevation: null,
|
|
52
|
+
pressed-container-elevation: null,
|
|
53
|
+
container-shadow-color: null,
|
|
42
54
|
);
|
|
43
55
|
}
|
|
44
56
|
|
|
@@ -53,12 +65,6 @@ $prefix: (mdc, protected-button);
|
|
|
53
65
|
0.12),
|
|
54
66
|
disabled-label-text-color: inspection.get-theme-color($theme, foreground, disabled-button,
|
|
55
67
|
if($is-dark, 0.5, 0.38)),
|
|
56
|
-
container-elevation: 2,
|
|
57
|
-
disabled-container-elevation: 0,
|
|
58
|
-
focus-container-elevation: 4,
|
|
59
|
-
hover-container-elevation: 4,
|
|
60
|
-
pressed-container-elevation: 8,
|
|
61
|
-
container-shadow-color: #000,
|
|
62
68
|
);
|
|
63
69
|
}
|
|
64
70
|
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
@use 'sass:map';
|
|
2
2
|
@use 'sass:meta';
|
|
3
|
+
@use '../../../style/elevation';
|
|
3
4
|
@use '../../token-utils';
|
|
4
5
|
|
|
5
6
|
// The prefix used to generate the fully qualified name for tokens in this file.
|
|
@@ -12,7 +13,7 @@ $prefix: (mdc, protected-button);
|
|
|
12
13
|
/// @return {Map} A set of tokens for the MDC protected-button
|
|
13
14
|
@function get-tokens($systems, $exclude-hardcoded, $token-slots) {
|
|
14
15
|
// Note: in M3 the "protected" button is called "elevated".
|
|
15
|
-
$
|
|
16
|
+
$tokens: token-utils.get-mdc-tokens('elevated-button', $systems, $exclude-hardcoded);
|
|
16
17
|
$variant-tokens: (
|
|
17
18
|
primary: (), // Default, no overrides needed.
|
|
18
19
|
secondary: (
|
|
@@ -57,7 +58,7 @@ $prefix: (mdc, protected-button);
|
|
|
57
58
|
);
|
|
58
59
|
|
|
59
60
|
@return token-utils.namespace-tokens($prefix, (
|
|
60
|
-
_fix-tokens($
|
|
61
|
+
_fix-tokens($tokens),
|
|
61
62
|
token-utils.map-values($variant-tokens, meta.get-function(_fix-tokens)),
|
|
62
63
|
), $token-slots);
|
|
63
64
|
}
|
|
@@ -67,11 +68,27 @@ $prefix: (mdc, protected-button);
|
|
|
67
68
|
/// @param {Map} $initial-tokens Map of protected button tokens currently being generated.
|
|
68
69
|
/// @return {Map} The given tokens, with the invalid values replaced with valid ones.
|
|
69
70
|
@function _fix-tokens($initial-tokens) {
|
|
70
|
-
// Need to get the hardcoded values, because they include
|
|
71
|
-
// state.
|
|
71
|
+
// Need to get the hardcoded values, because they include
|
|
72
|
+
// opacities that are used for the disabled state.
|
|
72
73
|
$hardcoded-tokens: token-utils.get-mdc-tokens('elevated-button', (), false);
|
|
74
|
+
$tokens: $initial-tokens;
|
|
75
|
+
$elevation-tokens: (
|
|
76
|
+
container-elevation,
|
|
77
|
+
disabled-container-elevation,
|
|
78
|
+
focus-container-elevation,
|
|
79
|
+
hover-container-elevation,
|
|
80
|
+
pressed-container-elevation,
|
|
81
|
+
);
|
|
82
|
+
|
|
83
|
+
@each $token in $elevation-tokens {
|
|
84
|
+
$elevation: map.get($tokens, $token);
|
|
85
|
+
|
|
86
|
+
@if ($elevation != null) {
|
|
87
|
+
$tokens: map.set($tokens, $token + '-shadow', elevation.get-box-shadow($elevation));
|
|
88
|
+
}
|
|
89
|
+
}
|
|
73
90
|
|
|
74
|
-
@return token-utils.combine-color-tokens($
|
|
91
|
+
@return token-utils.combine-color-tokens($tokens, $hardcoded-tokens, (
|
|
75
92
|
(
|
|
76
93
|
color: disabled-label-text-color,
|
|
77
94
|
opacity: disabled-label-text-opacity,
|
package/datepicker/index.d.ts
CHANGED
|
@@ -52,7 +52,11 @@ import { ValidatorFn } from '@angular/forms';
|
|
|
52
52
|
import { ViewContainerRef } from '@angular/core';
|
|
53
53
|
import { WritableSignal } from '@angular/core';
|
|
54
54
|
|
|
55
|
-
/**
|
|
55
|
+
/**
|
|
56
|
+
* Function that can be used to filter out dates from a calendar.
|
|
57
|
+
* Datepicker can sometimes receive a null value as input for the date argument.
|
|
58
|
+
* This doesn't represent a "null date" but rather signifies that no date has been selected yet in the calendar.
|
|
59
|
+
*/
|
|
56
60
|
export declare type DateFilterFn<D> = (date: D | null) => boolean;
|
|
57
61
|
|
|
58
62
|
/** Possible positions for the datepicker dropdown along the X axis. */
|