@angular/material 18.1.0-next.4 → 18.1.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/badge/index.d.ts +5 -2
- package/button/_button-base.scss +13 -6
- package/button/_button-theme.scss +26 -27
- package/button/_fab-theme.scss +16 -16
- package/button/_icon-button-theme.scss +14 -20
- package/button/index.d.ts +7 -0
- package/card/_card-theme.scss +25 -52
- package/checkbox/index.d.ts +4 -2
- package/chips/_chips-theme.scss +22 -24
- package/core/m2/_typography.scss +5 -2
- package/core/mdc-helpers/_mdc-helpers.scss +2 -2
- package/core/style/_elevation.scss +5 -0
- package/core/tokens/_token-utils.scss +2 -2
- package/core/tokens/m2/mat/_app.scss +1 -2
- package/core/tokens/m2/mat/_autocomplete.scss +2 -2
- package/core/tokens/m2/mat/_datepicker.scss +3 -3
- package/core/tokens/m2/mat/_dialog.scss +2 -2
- package/core/tokens/m2/mat/_fab-small.scss +3 -9
- package/core/tokens/m2/mat/_fab.scss +3 -9
- package/core/tokens/m2/mat/_filled-button.scss +3 -9
- package/core/tokens/m2/mat/_form-field.scss +9 -6
- package/core/tokens/m2/mat/_icon-button.scss +3 -9
- package/core/tokens/m2/mat/_outlined-button.scss +3 -9
- package/core/tokens/m2/mat/_paginator.scss +10 -6
- package/core/tokens/m2/mat/_protected-button.scss +3 -9
- package/core/tokens/m2/mat/_select.scss +2 -2
- package/core/tokens/m2/mat/_sidenav.scss +2 -2
- package/core/tokens/m2/mat/_text-button.scss +3 -9
- package/core/tokens/m2/mdc/_chip.scss +2 -14
- package/core/tokens/m2/mdc/_elevated-card.scss +3 -7
- package/core/tokens/m2/mdc/_extended-fab.scss +13 -10
- package/core/tokens/m2/mdc/_fab-small.scss +15 -13
- package/core/tokens/m2/mdc/_fab.scss +15 -13
- package/core/tokens/m2/mdc/_outlined-card.scss +2 -6
- package/core/tokens/m2/mdc/_protected-button.scss +13 -7
- package/core/tokens/m3/mat/_app.scss +2 -2
- package/core/tokens/m3/mat/_autocomplete.scss +2 -2
- package/core/tokens/m3/mat/_datepicker.scss +3 -3
- package/core/tokens/m3/mat/_select.scss +2 -2
- package/core/tokens/m3/mdc/_chip.scss +1 -4
- package/core/tokens/m3/mdc/_elevated-card.scss +9 -2
- package/core/tokens/m3/mdc/_extended-fab.scss +19 -2
- package/core/tokens/m3/mdc/_fab-small.scss +19 -2
- package/core/tokens/m3/mdc/_fab.scss +19 -2
- package/core/tokens/m3/mdc/_outlined-card.scss +9 -2
- package/core/tokens/m3/mdc/_protected-button.scss +22 -5
- package/datepicker/index.d.ts +13 -5
- package/esm2022/badge/badge.mjs +6 -3
- package/esm2022/button/button-base.mjs +3 -3
- package/esm2022/button/button.mjs +4 -4
- package/esm2022/button/fab.mjs +9 -9
- package/esm2022/button/icon-button.mjs +4 -4
- package/esm2022/card/card.mjs +2 -2
- package/esm2022/checkbox/checkbox-config.mjs +1 -1
- package/esm2022/chips/chip-grid.mjs +26 -8
- package/esm2022/chips/chip-listbox.mjs +2 -2
- package/esm2022/chips/chip-option.mjs +3 -3
- package/esm2022/chips/chip-row.mjs +3 -3
- package/esm2022/chips/chip-set.mjs +2 -2
- package/esm2022/chips/chip.mjs +3 -3
- package/esm2022/core/internal-form-field/internal-form-field.mjs +2 -2
- package/esm2022/core/ripple/ripple-renderer.mjs +21 -3
- package/esm2022/core/version.mjs +1 -1
- package/esm2022/datepicker/datepicker-base.mjs +6 -4
- package/esm2022/datepicker/datepicker-input-base.mjs +1 -1
- package/esm2022/dialog/dialog-container.mjs +3 -3
- package/esm2022/form-field/form-field.mjs +9 -18
- 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/slide-toggle/slide-toggle.mjs +3 -3
- package/esm2022/tabs/tabs-animations.mjs +2 -2
- package/fesm2022/badge.mjs +5 -2
- package/fesm2022/badge.mjs.map +1 -1
- package/fesm2022/button.mjs +18 -18
- package/fesm2022/button.mjs.map +1 -1
- package/fesm2022/card.mjs +2 -2
- package/fesm2022/card.mjs.map +1 -1
- package/fesm2022/checkbox.mjs.map +1 -1
- package/fesm2022/chips.mjs +35 -17
- package/fesm2022/chips.mjs.map +1 -1
- package/fesm2022/core.mjs +23 -5
- package/fesm2022/core.mjs.map +1 -1
- package/fesm2022/datepicker.mjs +5 -3
- 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 +8 -17
- package/fesm2022/form-field.mjs.map +1 -1
- package/fesm2022/list.mjs +32 -12
- package/fesm2022/list.mjs.map +1 -1
- package/fesm2022/slide-toggle.mjs +2 -2
- package/fesm2022/slide-toggle.mjs.map +1 -1
- package/fesm2022/tabs.mjs +1 -1
- package/fesm2022/tabs.mjs.map +1 -1
- package/form-field/_form-field-subscript.scss +2 -2
- package/form-field/_mdc-text-field-structure-overrides.scss +2 -3
- package/form-field/index.d.ts +9 -7
- 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 +7 -7
- 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 +2 -2
- package/schematics/ng-add/index.mjs +2 -2
- package/schematics/ng-generate/m3-theme/index_bundled.js +2 -2
- package/schematics/ng-update/index_bundled.js +31 -31
- package/list/_list-option-trailing-avatar-compat.scss +0 -58
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
@use '@material/typography' as mdc-typography;
|
|
2
1
|
@use '@material/textfield/variables' as mdc-textfield-variables;
|
|
3
2
|
|
|
4
3
|
@use '../core/tokens/m2/mat/form-field' as tokens-mat-form-field;
|
|
4
|
+
@use '../core/style/vendor-prefixes';
|
|
5
5
|
@use '../core/tokens/token-utils';
|
|
6
6
|
|
|
7
7
|
@mixin private-form-field-subscript() {
|
|
@@ -68,7 +68,7 @@
|
|
|
68
68
|
.mat-mdc-form-field-bottom-align::before {
|
|
69
69
|
@include token-utils.use-tokens(tokens-mat-form-field.$prefix,
|
|
70
70
|
tokens-mat-form-field.get-token-slots()) {
|
|
71
|
-
@include
|
|
71
|
+
@include vendor-prefixes.smooth-font();
|
|
72
72
|
@include token-utils.create-token-slot(font-family, subscript-text-font);
|
|
73
73
|
@include token-utils.create-token-slot(line-height, subscript-text-line-height);
|
|
74
74
|
@include token-utils.create-token-slot(font-size, subscript-text-size);
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
@use '@material/textfield/variables' as mdc-textfield-variables;
|
|
2
|
-
@use '@material/typography/typography' as mdc-typography;
|
|
3
2
|
@use '../core/tokens/m2/mat/form-field' as tokens-mat-form-field;
|
|
4
3
|
@use '../core/tokens/token-utils';
|
|
5
4
|
@use '../core/style/vendor-prefixes';
|
|
@@ -25,7 +24,7 @@ $_enable-form-field-will-change-reset: true;
|
|
|
25
24
|
// Note: We increase specificity here because the MDC textfield seems to override this,
|
|
26
25
|
// depending on the CSS order, with an affix selector joint with the input.
|
|
27
26
|
.mat-mdc-form-field-input-control.mat-mdc-form-field-input-control {
|
|
28
|
-
@include
|
|
27
|
+
@include vendor-prefixes.smooth-font();
|
|
29
28
|
font: inherit;
|
|
30
29
|
letter-spacing: inherit;
|
|
31
30
|
text-decoration: inherit;
|
|
@@ -34,7 +33,7 @@ $_enable-form-field-will-change-reset: true;
|
|
|
34
33
|
}
|
|
35
34
|
|
|
36
35
|
.mat-mdc-form-field .mat-mdc-floating-label.mdc-floating-label {
|
|
37
|
-
@include
|
|
36
|
+
@include vendor-prefixes.smooth-font();
|
|
38
37
|
|
|
39
38
|
// In order to ensure proper alignment of the floating label, we reset its line-height.
|
|
40
39
|
// The line-height is not important as the element is absolutely positioned and only has one
|
package/form-field/index.d.ts
CHANGED
|
@@ -18,6 +18,7 @@ import { Observable } from 'rxjs';
|
|
|
18
18
|
import { OnDestroy } from '@angular/core';
|
|
19
19
|
import { Platform } from '@angular/cdk/platform';
|
|
20
20
|
import { QueryList } from '@angular/core';
|
|
21
|
+
import { Signal } from '@angular/core';
|
|
21
22
|
import { ThemePalette } from '@angular/material/core';
|
|
22
23
|
|
|
23
24
|
/** An interface that the parent form-field should implement to receive resize events. */
|
|
@@ -139,13 +140,12 @@ export declare class MatFormField implements FloatingLabelParent, AfterContentIn
|
|
|
139
140
|
_floatingLabel: MatFormFieldFloatingLabel | undefined;
|
|
140
141
|
_notchedOutline: MatFormFieldNotchedOutline | undefined;
|
|
141
142
|
_lineRipple: MatFormFieldLineRipple | undefined;
|
|
142
|
-
_labelChildNonStatic: MatLabel | undefined;
|
|
143
|
-
_labelChildStatic: MatLabel | undefined;
|
|
144
143
|
_formFieldControl: MatFormFieldControl_2<any>;
|
|
145
144
|
_prefixChildren: QueryList<MatPrefix>;
|
|
146
145
|
_suffixChildren: QueryList<MatSuffix>;
|
|
147
146
|
_errorChildren: QueryList<MatError>;
|
|
148
147
|
_hintChildren: QueryList<MatHint>;
|
|
148
|
+
private readonly _labelChild;
|
|
149
149
|
/** Whether the required marker should be hidden. */
|
|
150
150
|
get hideRequiredMarker(): boolean;
|
|
151
151
|
set hideRequiredMarker(value: BooleanInput);
|
|
@@ -212,7 +212,7 @@ export declare class MatFormField implements FloatingLabelParent, AfterContentIn
|
|
|
212
212
|
/**
|
|
213
213
|
* Gets the id of the label element. If no label is present, returns `null`.
|
|
214
214
|
*/
|
|
215
|
-
getLabelId
|
|
215
|
+
getLabelId: Signal<string | null>;
|
|
216
216
|
/**
|
|
217
217
|
* Gets an ElementRef for the element that a overlay attached to the form field
|
|
218
218
|
* should be positioned relative to.
|
|
@@ -253,7 +253,7 @@ export declare class MatFormField implements FloatingLabelParent, AfterContentIn
|
|
|
253
253
|
* the label is part of the infix, the label cannot overflow the prefix content.
|
|
254
254
|
*/
|
|
255
255
|
_forceDisplayInfixLabel(): boolean | 0;
|
|
256
|
-
_hasFloatingLabel
|
|
256
|
+
_hasFloatingLabel: Signal<boolean>;
|
|
257
257
|
_shouldLabelFloat(): boolean;
|
|
258
258
|
/**
|
|
259
259
|
* Determines whether a class from the AbstractControlDirective
|
|
@@ -293,7 +293,7 @@ export declare class MatFormField implements FloatingLabelParent, AfterContentIn
|
|
|
293
293
|
/** Checks whether the form field is attached to the DOM. */
|
|
294
294
|
private _isAttachedToDom;
|
|
295
295
|
static ɵfac: i0.ɵɵFactoryDeclaration<MatFormField, [null, null, null, null, null, { optional: true; }, { optional: true; }, null]>;
|
|
296
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<MatFormField, "mat-form-field", ["matFormField"], { "hideRequiredMarker": { "alias": "hideRequiredMarker"; "required": false; }; "color": { "alias": "color"; "required": false; }; "floatLabel": { "alias": "floatLabel"; "required": false; }; "appearance": { "alias": "appearance"; "required": false; }; "subscriptSizing": { "alias": "subscriptSizing"; "required": false; }; "hintLabel": { "alias": "hintLabel"; "required": false; }; }, {}, ["
|
|
296
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<MatFormField, "mat-form-field", ["matFormField"], { "hideRequiredMarker": { "alias": "hideRequiredMarker"; "required": false; }; "color": { "alias": "color"; "required": false; }; "floatLabel": { "alias": "floatLabel"; "required": false; }; "appearance": { "alias": "appearance"; "required": false; }; "subscriptSizing": { "alias": "subscriptSizing"; "required": false; }; "hintLabel": { "alias": "hintLabel"; "required": false; }; }, {}, ["_labelChild", "_formFieldControl", "_prefixChildren", "_suffixChildren", "_errorChildren", "_hintChildren"], ["mat-label", "[matPrefix], [matIconPrefix]", "[matTextPrefix]", "*", "[matTextSuffix]", "[matSuffix], [matIconSuffix]", "mat-error, [matError]", "mat-hint:not([align='end'])", "mat-hint[align='end']"], true, never>;
|
|
297
297
|
}
|
|
298
298
|
|
|
299
299
|
/**
|
|
@@ -383,8 +383,10 @@ export declare interface MatFormFieldDefaultOptions {
|
|
|
383
383
|
/** Default form field appearance style. */
|
|
384
384
|
appearance?: MatFormFieldAppearance;
|
|
385
385
|
/**
|
|
386
|
-
* Default color of the form field. This API is supported in M2 themes only, it has no
|
|
387
|
-
*
|
|
386
|
+
* Default theme color of the form field. This API is supported in M2 themes only, it has no
|
|
387
|
+
* effect in M3 themes.
|
|
388
|
+
*
|
|
389
|
+
* For information on applying color variants in M3, see
|
|
388
390
|
* https://material.angular.io/guide/theming#using-component-color-variants
|
|
389
391
|
*/
|
|
390
392
|
color?: ThemePalette;
|
|
@@ -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
|
}
|