@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
|
@@ -0,0 +1,516 @@
|
|
|
1
|
+
@use '@angular/cdk';
|
|
2
|
+
@use '../core/style/vendor-prefixes';
|
|
3
|
+
@use '../core/tokens/m2/mdc/list' as tokens-mdc-list;
|
|
4
|
+
@use '../core/tokens/token-utils';
|
|
5
|
+
|
|
6
|
+
// Includes the structural styles for the list that were inherited from MDC.
|
|
7
|
+
@mixin private-list-inherited-structural-styles {
|
|
8
|
+
$tokens: (tokens-mdc-list.$prefix, tokens-mdc-list.get-token-slots());
|
|
9
|
+
|
|
10
|
+
.mdc-list {
|
|
11
|
+
margin: 0;
|
|
12
|
+
padding: 8px 0;
|
|
13
|
+
list-style-type: none;
|
|
14
|
+
|
|
15
|
+
&:focus {
|
|
16
|
+
outline: none;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.mdc-list-item {
|
|
21
|
+
display: flex;
|
|
22
|
+
position: relative;
|
|
23
|
+
justify-content: flex-start;
|
|
24
|
+
overflow: hidden;
|
|
25
|
+
padding: 0;
|
|
26
|
+
align-items: stretch;
|
|
27
|
+
cursor: pointer;
|
|
28
|
+
padding-left: 16px;
|
|
29
|
+
padding-right: 16px;
|
|
30
|
+
|
|
31
|
+
@include token-utils.use-tokens($tokens...) {
|
|
32
|
+
@include token-utils.create-token-slot(background-color, list-item-container-color);
|
|
33
|
+
@include token-utils.create-token-slot(border-radius, list-item-container-shape);
|
|
34
|
+
|
|
35
|
+
&.mdc-list-item--selected {
|
|
36
|
+
@include token-utils.create-token-slot(background-color,
|
|
37
|
+
list-item-selected-container-color);
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
&:focus {
|
|
42
|
+
outline: 0;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
&.mdc-list-item--disabled {
|
|
46
|
+
cursor: auto;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
&.mdc-list-item--with-one-line {
|
|
50
|
+
@include token-utils.use-tokens($tokens...) {
|
|
51
|
+
@include token-utils.create-token-slot(height, list-item-one-line-container-height);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.mdc-list-item__start {
|
|
55
|
+
align-self: center;
|
|
56
|
+
margin-top: 0;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.mdc-list-item__end {
|
|
60
|
+
align-self: center;
|
|
61
|
+
margin-top: 0;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
&.mdc-list-item--with-two-lines {
|
|
66
|
+
@include token-utils.use-tokens($tokens...) {
|
|
67
|
+
@include token-utils.create-token-slot(height, list-item-two-line-container-height);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.mdc-list-item__start {
|
|
71
|
+
align-self: flex-start;
|
|
72
|
+
margin-top: 16px;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
.mdc-list-item__end {
|
|
76
|
+
align-self: center;
|
|
77
|
+
margin-top: 0;
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
&.mdc-list-item--with-three-lines {
|
|
82
|
+
@include token-utils.use-tokens($tokens...) {
|
|
83
|
+
@include token-utils.create-token-slot(height, list-item-three-line-container-height);
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
.mdc-list-item__start {
|
|
87
|
+
align-self: flex-start;
|
|
88
|
+
margin-top: 16px;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
.mdc-list-item__end {
|
|
92
|
+
align-self: flex-start;
|
|
93
|
+
margin-top: 16px;
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
&.mdc-list-item--selected::before,
|
|
98
|
+
&.mdc-list-item--selected:focus::before,
|
|
99
|
+
&:not(.mdc-list-item--selected):focus::before {
|
|
100
|
+
position: absolute;
|
|
101
|
+
box-sizing: border-box;
|
|
102
|
+
width: 100%;
|
|
103
|
+
height: 100%;
|
|
104
|
+
top: 0;
|
|
105
|
+
left: 0;
|
|
106
|
+
border: 1px solid transparent;
|
|
107
|
+
border-radius: inherit;
|
|
108
|
+
content: '';
|
|
109
|
+
pointer-events: none;
|
|
110
|
+
|
|
111
|
+
@include cdk.high-contrast(active, off) {
|
|
112
|
+
border-color: CanvasText;
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
&.mdc-list-item--selected:focus::before,
|
|
117
|
+
&.mdc-list-item--selected::before {
|
|
118
|
+
border-width: 3px;
|
|
119
|
+
border-style: double;
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
a.mdc-list-item {
|
|
124
|
+
color: inherit;
|
|
125
|
+
text-decoration: none;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
.mdc-list-item__start {
|
|
129
|
+
fill: currentColor;
|
|
130
|
+
flex-shrink: 0;
|
|
131
|
+
pointer-events: none;
|
|
132
|
+
|
|
133
|
+
@include token-utils.use-tokens($tokens...) {
|
|
134
|
+
.mdc-list-item--with-leading-icon & {
|
|
135
|
+
@include token-utils.create-token-slot(color, list-item-leading-icon-color);
|
|
136
|
+
@include token-utils.create-token-slot(width, list-item-leading-icon-size);
|
|
137
|
+
@include token-utils.create-token-slot(height, list-item-leading-icon-size);
|
|
138
|
+
margin-left: 16px;
|
|
139
|
+
margin-right: 32px;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
[dir='rtl'] .mdc-list-item--with-leading-icon & {
|
|
143
|
+
margin-left: 32px;
|
|
144
|
+
margin-right: 16px;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
.mdc-list-item--with-leading-icon:hover & {
|
|
148
|
+
@include token-utils.create-token-slot(color, list-item-hover-leading-icon-color);
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
// This is the same in RTL, but we need the specificity.
|
|
152
|
+
.mdc-list-item--with-leading-avatar & {
|
|
153
|
+
@include token-utils.create-token-slot(width, list-item-leading-avatar-size);
|
|
154
|
+
@include token-utils.create-token-slot(height, list-item-leading-avatar-size);
|
|
155
|
+
margin-left: 16px;
|
|
156
|
+
margin-right: 16px;
|
|
157
|
+
border-radius: 50%;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
.mdc-list-item--with-leading-avatar &,
|
|
161
|
+
[dir='rtl'] .mdc-list-item--with-leading-avatar & {
|
|
162
|
+
margin-left: 16px;
|
|
163
|
+
margin-right: 16px;
|
|
164
|
+
border-radius: 50%;
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
.mdc-list-item__end {
|
|
170
|
+
flex-shrink: 0;
|
|
171
|
+
pointer-events: none;
|
|
172
|
+
|
|
173
|
+
@include token-utils.use-tokens($tokens...) {
|
|
174
|
+
.mdc-list-item--with-trailing-meta & {
|
|
175
|
+
@include token-utils.create-token-slot(font-family,
|
|
176
|
+
list-item-trailing-supporting-text-font);
|
|
177
|
+
@include token-utils.create-token-slot(line-height,
|
|
178
|
+
list-item-trailing-supporting-text-line-height);
|
|
179
|
+
@include token-utils.create-token-slot(font-size,
|
|
180
|
+
list-item-trailing-supporting-text-size);
|
|
181
|
+
@include token-utils.create-token-slot(font-weight,
|
|
182
|
+
list-item-trailing-supporting-text-weight);
|
|
183
|
+
@include token-utils.create-token-slot(letter-spacing,
|
|
184
|
+
list-item-trailing-supporting-text-tracking);
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
.mdc-list-item--with-trailing-icon & {
|
|
188
|
+
@include token-utils.create-token-slot(color, list-item-trailing-icon-color);
|
|
189
|
+
@include token-utils.create-token-slot(width, list-item-trailing-icon-size);
|
|
190
|
+
@include token-utils.create-token-slot(height, list-item-trailing-icon-size);
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
.mdc-list-item--with-trailing-icon:hover & {
|
|
194
|
+
@include token-utils.create-token-slot(color, list-item-hover-trailing-icon-color);
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
// For some reason this has an increased specificity just for the `color`.
|
|
198
|
+
// Keeping it in place for now to reduce the amount of screenshot diffs.
|
|
199
|
+
.mdc-list-item.mdc-list-item--with-trailing-meta & {
|
|
200
|
+
@include token-utils.create-token-slot(color, list-item-trailing-supporting-text-color);
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
.mdc-list-item--selected.mdc-list-item--with-trailing-icon & {
|
|
204
|
+
@include token-utils.create-token-slot(color, list-item-selected-trailing-icon-color);
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
.mdc-list-item__content {
|
|
210
|
+
text-overflow: ellipsis;
|
|
211
|
+
white-space: nowrap;
|
|
212
|
+
overflow: hidden;
|
|
213
|
+
align-self: center;
|
|
214
|
+
flex: 1;
|
|
215
|
+
pointer-events: none;
|
|
216
|
+
|
|
217
|
+
.mdc-list-item--with-two-lines &,
|
|
218
|
+
.mdc-list-item--with-three-lines & {
|
|
219
|
+
align-self: stretch;
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
.mdc-list-item__primary-text {
|
|
224
|
+
text-overflow: ellipsis;
|
|
225
|
+
white-space: nowrap;
|
|
226
|
+
overflow: hidden;
|
|
227
|
+
|
|
228
|
+
@include token-utils.use-tokens($tokens...) {
|
|
229
|
+
@include token-utils.create-token-slot(color, list-item-label-text-color);
|
|
230
|
+
@include token-utils.create-token-slot(font-family, list-item-label-text-font);
|
|
231
|
+
@include token-utils.create-token-slot(line-height, list-item-label-text-line-height);
|
|
232
|
+
@include token-utils.create-token-slot(font-size, list-item-label-text-size);
|
|
233
|
+
@include token-utils.create-token-slot(font-weight, list-item-label-text-weight);
|
|
234
|
+
@include token-utils.create-token-slot(letter-spacing, list-item-label-text-tracking);
|
|
235
|
+
|
|
236
|
+
.mdc-list-item:hover & {
|
|
237
|
+
@include token-utils.create-token-slot(color, list-item-hover-label-text-color);
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
.mdc-list-item:focus & {
|
|
241
|
+
@include token-utils.create-token-slot(color, list-item-focus-label-text-color);
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
.mdc-list-item--with-two-lines &,
|
|
246
|
+
.mdc-list-item--with-three-lines & {
|
|
247
|
+
display: block;
|
|
248
|
+
margin-top: 0;
|
|
249
|
+
line-height: normal;
|
|
250
|
+
margin-bottom: -20px;
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
.mdc-list-item--with-two-lines &::before,
|
|
254
|
+
.mdc-list-item--with-three-lines &::before {
|
|
255
|
+
display: inline-block;
|
|
256
|
+
width: 0;
|
|
257
|
+
height: 28px;
|
|
258
|
+
content: '';
|
|
259
|
+
vertical-align: 0;
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
.mdc-list-item--with-two-lines &::after,
|
|
263
|
+
.mdc-list-item--with-three-lines &::after {
|
|
264
|
+
display: inline-block;
|
|
265
|
+
width: 0;
|
|
266
|
+
height: 20px;
|
|
267
|
+
content: '';
|
|
268
|
+
vertical-align: -20px;
|
|
269
|
+
}
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
.mdc-list-item__secondary-text {
|
|
273
|
+
text-overflow: ellipsis;
|
|
274
|
+
white-space: nowrap;
|
|
275
|
+
overflow: hidden;
|
|
276
|
+
display: block;
|
|
277
|
+
margin-top: 0;
|
|
278
|
+
|
|
279
|
+
@include token-utils.use-tokens($tokens...) {
|
|
280
|
+
@include token-utils.create-token-slot(color, list-item-supporting-text-color);
|
|
281
|
+
@include token-utils.create-token-slot(font-family, list-item-supporting-text-font);
|
|
282
|
+
@include token-utils.create-token-slot(line-height, list-item-supporting-text-line-height);
|
|
283
|
+
@include token-utils.create-token-slot(font-size, list-item-supporting-text-size);
|
|
284
|
+
@include token-utils.create-token-slot(font-weight, list-item-supporting-text-weight);
|
|
285
|
+
@include token-utils.create-token-slot(letter-spacing, list-item-supporting-text-tracking);
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
&::before {
|
|
289
|
+
display: inline-block;
|
|
290
|
+
width: 0;
|
|
291
|
+
height: 20px;
|
|
292
|
+
content: '';
|
|
293
|
+
vertical-align: 0;
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
.mdc-list-item--with-three-lines & {
|
|
297
|
+
white-space: normal;
|
|
298
|
+
line-height: 20px;
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
.mdc-list-item--with-overline & {
|
|
302
|
+
white-space: nowrap;
|
|
303
|
+
line-height: auto;
|
|
304
|
+
}
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
.mdc-list-item--with-leading-radio,
|
|
308
|
+
.mdc-list-item--with-leading-checkbox,
|
|
309
|
+
.mdc-list-item--with-leading-icon,
|
|
310
|
+
.mdc-list-item--with-leading-avatar {
|
|
311
|
+
&.mdc-list-item {
|
|
312
|
+
padding-left: 0;
|
|
313
|
+
padding-right: 16px;
|
|
314
|
+
|
|
315
|
+
[dir='rtl'] & {
|
|
316
|
+
padding-left: 16px;
|
|
317
|
+
padding-right: 0;
|
|
318
|
+
}
|
|
319
|
+
}
|
|
320
|
+
|
|
321
|
+
&.mdc-list-item--with-two-lines {
|
|
322
|
+
.mdc-list-item__primary-text {
|
|
323
|
+
display: block;
|
|
324
|
+
margin-top: 0;
|
|
325
|
+
line-height: normal;
|
|
326
|
+
margin-bottom: -20px;
|
|
327
|
+
|
|
328
|
+
// This was used by MDC to set the text baseline. We should figure out a way to
|
|
329
|
+
// remove it, because it can introduce unnecessary whitespace at the beginning
|
|
330
|
+
// of the element.
|
|
331
|
+
&::before {
|
|
332
|
+
display: inline-block;
|
|
333
|
+
width: 0;
|
|
334
|
+
height: 32px;
|
|
335
|
+
content: '';
|
|
336
|
+
vertical-align: 0;
|
|
337
|
+
}
|
|
338
|
+
|
|
339
|
+
&::after {
|
|
340
|
+
display: inline-block;
|
|
341
|
+
width: 0;
|
|
342
|
+
height: 20px;
|
|
343
|
+
content: '';
|
|
344
|
+
vertical-align: -20px;
|
|
345
|
+
}
|
|
346
|
+
}
|
|
347
|
+
|
|
348
|
+
&.mdc-list-item--with-trailing-meta {
|
|
349
|
+
.mdc-list-item__end {
|
|
350
|
+
display: block;
|
|
351
|
+
margin-top: 0;
|
|
352
|
+
line-height: normal;
|
|
353
|
+
|
|
354
|
+
&::before {
|
|
355
|
+
display: inline-block;
|
|
356
|
+
width: 0;
|
|
357
|
+
height: 32px;
|
|
358
|
+
content: '';
|
|
359
|
+
vertical-align: 0;
|
|
360
|
+
}
|
|
361
|
+
}
|
|
362
|
+
}
|
|
363
|
+
}
|
|
364
|
+
}
|
|
365
|
+
|
|
366
|
+
.mdc-list-item--with-trailing-icon {
|
|
367
|
+
&.mdc-list-item {
|
|
368
|
+
// This is the same in RTL, but we need the specificity.
|
|
369
|
+
&, [dir='rtl'] & {
|
|
370
|
+
padding-left: 0;
|
|
371
|
+
padding-right: 0;
|
|
372
|
+
}
|
|
373
|
+
}
|
|
374
|
+
|
|
375
|
+
.mdc-list-item__end {
|
|
376
|
+
margin-left: 16px;
|
|
377
|
+
margin-right: 16px;
|
|
378
|
+
}
|
|
379
|
+
}
|
|
380
|
+
|
|
381
|
+
.mdc-list-item--with-trailing-meta {
|
|
382
|
+
&.mdc-list-item {
|
|
383
|
+
padding-left: 16px;
|
|
384
|
+
padding-right: 0;
|
|
385
|
+
|
|
386
|
+
[dir='rtl'] & {
|
|
387
|
+
padding-left: 0;
|
|
388
|
+
padding-right: 16px;
|
|
389
|
+
}
|
|
390
|
+
}
|
|
391
|
+
|
|
392
|
+
.mdc-list-item__end {
|
|
393
|
+
@include vendor-prefixes.user-select(none);
|
|
394
|
+
margin-left: 28px;
|
|
395
|
+
margin-right: 16px;
|
|
396
|
+
|
|
397
|
+
[dir='rtl'] & {
|
|
398
|
+
margin-left: 16px;
|
|
399
|
+
margin-right: 28px;
|
|
400
|
+
}
|
|
401
|
+
}
|
|
402
|
+
|
|
403
|
+
&.mdc-list-item--with-three-lines .mdc-list-item__end,
|
|
404
|
+
&.mdc-list-item--with-two-lines .mdc-list-item__end {
|
|
405
|
+
display: block;
|
|
406
|
+
line-height: normal;
|
|
407
|
+
align-self: flex-start;
|
|
408
|
+
margin-top: 0;
|
|
409
|
+
|
|
410
|
+
&::before {
|
|
411
|
+
display: inline-block;
|
|
412
|
+
width: 0;
|
|
413
|
+
height: 28px;
|
|
414
|
+
content: '';
|
|
415
|
+
vertical-align: 0;
|
|
416
|
+
}
|
|
417
|
+
}
|
|
418
|
+
}
|
|
419
|
+
|
|
420
|
+
.mdc-list-item--with-leading-radio,
|
|
421
|
+
.mdc-list-item--with-leading-checkbox {
|
|
422
|
+
.mdc-list-item__start {
|
|
423
|
+
margin-left: 8px;
|
|
424
|
+
margin-right: 24px;
|
|
425
|
+
|
|
426
|
+
[dir='rtl'] & {
|
|
427
|
+
margin-left: 24px;
|
|
428
|
+
margin-right: 8px;
|
|
429
|
+
}
|
|
430
|
+
}
|
|
431
|
+
|
|
432
|
+
&.mdc-list-item--with-two-lines {
|
|
433
|
+
.mdc-list-item__start {
|
|
434
|
+
align-self: flex-start;
|
|
435
|
+
margin-top: 8px;
|
|
436
|
+
}
|
|
437
|
+
}
|
|
438
|
+
}
|
|
439
|
+
|
|
440
|
+
.mdc-list-item--with-trailing-radio,
|
|
441
|
+
.mdc-list-item--with-trailing-checkbox {
|
|
442
|
+
&.mdc-list-item {
|
|
443
|
+
padding-left: 16px;
|
|
444
|
+
padding-right: 0;
|
|
445
|
+
|
|
446
|
+
[dir='rtl'] & {
|
|
447
|
+
padding-left: 0;
|
|
448
|
+
padding-right: 16px;
|
|
449
|
+
}
|
|
450
|
+
}
|
|
451
|
+
|
|
452
|
+
&.mdc-list-item--with-leading-icon,
|
|
453
|
+
&.mdc-list-item--with-leading-avatar {
|
|
454
|
+
padding-left: 0;
|
|
455
|
+
|
|
456
|
+
[dir='rtl'] & {
|
|
457
|
+
padding-right: 0;
|
|
458
|
+
}
|
|
459
|
+
}
|
|
460
|
+
|
|
461
|
+
.mdc-list-item__end {
|
|
462
|
+
margin-left: 24px;
|
|
463
|
+
margin-right: 8px;
|
|
464
|
+
|
|
465
|
+
[dir='rtl'] & {
|
|
466
|
+
margin-left: 8px;
|
|
467
|
+
margin-right: 24px;
|
|
468
|
+
}
|
|
469
|
+
}
|
|
470
|
+
|
|
471
|
+
&.mdc-list-item--with-three-lines .mdc-list-item__end {
|
|
472
|
+
align-self: flex-start;
|
|
473
|
+
margin-top: 8px;
|
|
474
|
+
}
|
|
475
|
+
}
|
|
476
|
+
|
|
477
|
+
.mdc-list-group__subheader {
|
|
478
|
+
margin: 0.75rem 16px;
|
|
479
|
+
}
|
|
480
|
+
|
|
481
|
+
.mdc-list-item--disabled {
|
|
482
|
+
.mdc-list-item__start,
|
|
483
|
+
.mdc-list-item__content,
|
|
484
|
+
.mdc-list-item__end {
|
|
485
|
+
opacity: 1;
|
|
486
|
+
}
|
|
487
|
+
|
|
488
|
+
.mdc-list-item__primary-text,
|
|
489
|
+
.mdc-list-item__secondary-text {
|
|
490
|
+
@include token-utils.use-tokens($tokens...) {
|
|
491
|
+
@include token-utils.create-token-slot(opacity, list-item-disabled-label-text-opacity);
|
|
492
|
+
}
|
|
493
|
+
}
|
|
494
|
+
|
|
495
|
+
&.mdc-list-item--with-leading-icon .mdc-list-item__start {
|
|
496
|
+
@include token-utils.use-tokens($tokens...) {
|
|
497
|
+
@include token-utils.create-token-slot(color, list-item-disabled-leading-icon-color);
|
|
498
|
+
@include token-utils.create-token-slot(opacity, list-item-disabled-leading-icon-opacity);
|
|
499
|
+
}
|
|
500
|
+
}
|
|
501
|
+
|
|
502
|
+
&.mdc-list-item--with-trailing-icon .mdc-list-item__end {
|
|
503
|
+
@include token-utils.use-tokens($tokens...) {
|
|
504
|
+
@include token-utils.create-token-slot(color, list-item-disabled-trailing-icon-color);
|
|
505
|
+
@include token-utils.create-token-slot(opacity, list-item-disabled-trailing-icon-opacity);
|
|
506
|
+
}
|
|
507
|
+
}
|
|
508
|
+
}
|
|
509
|
+
|
|
510
|
+
.mat-mdc-list-item.mat-mdc-list-item-both-leading-and-trailing {
|
|
511
|
+
&, [dir='rtl'] & {
|
|
512
|
+
padding-left: 0;
|
|
513
|
+
padding-right: 0;
|
|
514
|
+
}
|
|
515
|
+
}
|
|
516
|
+
}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
@use '@angular/cdk';
|
|
2
|
-
@use '@material/list/evolution-variables' as mdc-list-variables;
|
|
3
2
|
|
|
4
3
|
// Renders a circle indicator when Windows Hich Constrast mode (HCM) is enabled. In some
|
|
5
4
|
// situations, such as a selected option, the list item communicates the selected state by changing
|
|
@@ -12,7 +11,7 @@
|
|
|
12
11
|
content: '';
|
|
13
12
|
position: absolute;
|
|
14
13
|
top: 50%;
|
|
15
|
-
right:
|
|
14
|
+
right: 16px;
|
|
16
15
|
transform: translateY(-50%);
|
|
17
16
|
width: $size;
|
|
18
17
|
height: 0;
|
|
@@ -23,7 +22,7 @@
|
|
|
23
22
|
[dir='rtl'] {
|
|
24
23
|
&::after {
|
|
25
24
|
right: auto;
|
|
26
|
-
left:
|
|
25
|
+
left: 16px;
|
|
27
26
|
}
|
|
28
27
|
}
|
|
29
28
|
}
|
package/list/_list-theme.scss
CHANGED
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
@use 'sass:map';
|
|
2
|
-
@use '@material/list/evolution-mixins';
|
|
3
|
-
@use '@material/list/list-theme' as mdc-list-theme;
|
|
4
2
|
|
|
5
3
|
@use '../core/style/sass-utils';
|
|
6
4
|
@use '../core/theming/theming';
|
|
@@ -20,7 +18,8 @@
|
|
|
20
18
|
}
|
|
21
19
|
@else {
|
|
22
20
|
@include sass-utils.current-selector-or-root() {
|
|
23
|
-
@include
|
|
21
|
+
@include token-utils.create-token-values(
|
|
22
|
+
tokens-mdc-list.$prefix, tokens-mdc-list.get-unthemable-tokens());
|
|
24
23
|
@include token-utils.create-token-values(
|
|
25
24
|
tokens-mat-list.$prefix, tokens-mat-list.get-unthemable-tokens());
|
|
26
25
|
}
|
|
@@ -32,11 +31,9 @@
|
|
|
32
31
|
@include _theme-from-tokens(inspection.get-theme-tokens($theme, color));
|
|
33
32
|
}
|
|
34
33
|
@else {
|
|
35
|
-
$mdc-list-color-tokens: tokens-mdc-list.get-color-tokens($theme);
|
|
36
|
-
|
|
37
|
-
// Add values for MDC list tokens.
|
|
38
34
|
@include sass-utils.current-selector-or-root() {
|
|
39
|
-
@include
|
|
35
|
+
@include token-utils.create-token-values(
|
|
36
|
+
tokens-mdc-list.$prefix, tokens-mdc-list.get-color-tokens($theme));
|
|
40
37
|
@include token-utils.create-token-values(
|
|
41
38
|
tokens-mat-list.$prefix, tokens-mat-list.get-color-tokens($theme));
|
|
42
39
|
}
|
|
@@ -79,8 +76,13 @@
|
|
|
79
76
|
// There is no token for activated color on nav list.
|
|
80
77
|
// TODO(mmalerba): Add a token to MDC or make a custom one.
|
|
81
78
|
.mat-mdc-list-base.mat-mdc-list-base {
|
|
82
|
-
|
|
83
|
-
|
|
79
|
+
.mdc-list-item--selected,
|
|
80
|
+
.mdc-list-item--activated {
|
|
81
|
+
.mdc-list-item__primary-text,
|
|
82
|
+
.mdc-list-item__start {
|
|
83
|
+
color: inspection.get-theme-color($theme, primary);
|
|
84
|
+
}
|
|
85
|
+
}
|
|
84
86
|
}
|
|
85
87
|
|
|
86
88
|
// TODO(mmalerba): Leaking styles from the old MDC list mixins used in other components can
|
|
@@ -102,11 +104,10 @@
|
|
|
102
104
|
}
|
|
103
105
|
@else {
|
|
104
106
|
$density-scale: inspection.get-theme-density($theme);
|
|
105
|
-
$mdc-list-density-tokens: tokens-mdc-list.get-density-tokens($theme);
|
|
106
107
|
|
|
107
|
-
// Add values for MDC list tokens.
|
|
108
108
|
@include sass-utils.current-selector-or-root() {
|
|
109
|
-
@include
|
|
109
|
+
@include token-utils.create-token-values(
|
|
110
|
+
tokens-mdc-list.$prefix, tokens-mdc-list.get-density-tokens($theme));
|
|
110
111
|
@include token-utils.create-token-values(
|
|
111
112
|
tokens-mat-list.$prefix, tokens-mat-list.get-density-tokens($theme));
|
|
112
113
|
}
|
|
@@ -155,11 +156,9 @@
|
|
|
155
156
|
@include _theme-from-tokens(inspection.get-theme-tokens($theme, typography));
|
|
156
157
|
}
|
|
157
158
|
@else {
|
|
158
|
-
$mdc-list-typography-tokens: tokens-mdc-list.get-typography-tokens($theme);
|
|
159
|
-
|
|
160
|
-
// Add values for MDC list tokens.
|
|
161
159
|
@include sass-utils.current-selector-or-root() {
|
|
162
|
-
@include
|
|
160
|
+
@include token-utils.create-token-values(
|
|
161
|
+
tokens-mdc-list.$prefix, tokens-mdc-list.get-typography-tokens($theme));
|
|
163
162
|
@include token-utils.create-token-values(
|
|
164
163
|
tokens-mat-list.$prefix, tokens-mat-list.get-typography-tokens($theme));
|
|
165
164
|
}
|
|
@@ -204,8 +203,8 @@
|
|
|
204
203
|
@mixin _theme-from-tokens($tokens) {
|
|
205
204
|
@include validation.selector-defined(
|
|
206
205
|
'Calls to Angular Material theme mixins with an M3 theme must be wrapped in a selector');
|
|
207
|
-
|
|
208
|
-
|
|
206
|
+
$mdc-list-tokens: token-utils.get-tokens-for($tokens, tokens-mdc-list.$prefix);
|
|
209
207
|
$mat-list-tokens: token-utils.get-tokens-for($tokens, tokens-mat-list.$prefix);
|
|
208
|
+
@include token-utils.create-token-values(tokens-mdc-list.$prefix, $mdc-list-tokens);
|
|
210
209
|
@include token-utils.create-token-values(tokens-mat-list.$prefix, $mat-list-tokens);
|
|
211
210
|
}
|
package/list/index.d.ts
CHANGED
|
@@ -156,6 +156,7 @@ export declare class MatListItem extends MatListItemBase {
|
|
|
156
156
|
* Otherwise, return `null`. This method is safe to use with server-side rendering.
|
|
157
157
|
*/
|
|
158
158
|
_getAriaCurrent(): string | null;
|
|
159
|
+
protected _hasBothLeadingAndTrailing(): boolean;
|
|
159
160
|
static ɵfac: i0.ɵɵFactoryDeclaration<MatListItem, [null, null, { optional: true; }, null, { optional: true; }, { optional: true; }]>;
|
|
160
161
|
static ɵcmp: i0.ɵɵComponentDeclaration<MatListItem, "mat-list-item, a[mat-list-item], button[mat-list-item]", ["matListItem"], { "activated": { "alias": "activated"; "required": false; }; }, {}, ["_lines", "_titles", "_meta"], ["[matListItemAvatar],[matListItemIcon]", "[matListItemTitle]", "[matListItemLine]", "*", "[matListItemMeta]", "mat-divider"], true, never>;
|
|
161
162
|
}
|
|
@@ -415,6 +416,7 @@ export declare class MatListOption extends MatListItemBase implements ListOption
|
|
|
415
416
|
_toggleOnInteraction(): void;
|
|
416
417
|
/** Sets the tabindex of the list option. */
|
|
417
418
|
_setTabindex(value: number): void;
|
|
419
|
+
protected _hasBothLeadingAndTrailing(): boolean;
|
|
418
420
|
static ɵfac: i0.ɵɵFactoryDeclaration<MatListOption, [null, null, null, null, null, { optional: true; }, { optional: true; }]>;
|
|
419
421
|
static ɵcmp: i0.ɵɵComponentDeclaration<MatListOption, "mat-list-option", ["matListOption"], { "togglePosition": { "alias": "togglePosition"; "required": false; }; "checkboxPosition": { "alias": "checkboxPosition"; "required": false; }; "color": { "alias": "color"; "required": false; }; "value": { "alias": "value"; "required": false; }; "selected": { "alias": "selected"; "required": false; }; }, { "selectedChange": "selectedChange"; }, ["_lines", "_titles"], ["[matListItemAvatar],[matListItemIcon]", "[matListItemTitle]", "[matListItemLine]", "*", "mat-divider"], true, never>;
|
|
420
422
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@angular/material",
|
|
3
|
-
"version": "18.
|
|
3
|
+
"version": "18.2.0-next.0",
|
|
4
4
|
"description": "Angular Material",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -490,7 +490,7 @@
|
|
|
490
490
|
},
|
|
491
491
|
"peerDependencies": {
|
|
492
492
|
"@angular/animations": "^18.0.0-0 || ^18.1.0-0 || ^18.2.0-0 || ^18.3.0-0 || ^19.0.0-0",
|
|
493
|
-
"@angular/cdk": "18.
|
|
493
|
+
"@angular/cdk": "18.2.0-next.0",
|
|
494
494
|
"@angular/core": "^18.0.0-0 || ^18.1.0-0 || ^18.2.0-0 || ^18.3.0-0 || ^19.0.0-0",
|
|
495
495
|
"@angular/common": "^18.0.0-0 || ^18.1.0-0 || ^18.2.0-0 || ^18.3.0-0 || ^19.0.0-0",
|
|
496
496
|
"@angular/forms": "^18.0.0-0 || ^18.1.0-0 || ^18.2.0-0 || ^18.3.0-0 || ^19.0.0-0",
|