material-inspired-component-library 8.1.1 → 9.0.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/README.md +106 -18
- package/components/README.md +1 -1
- package/components/accordion/README.md +6 -6
- package/components/alert/README.md +10 -10
- package/components/alert/index.scss +27 -52
- package/components/appbar/README.md +19 -6
- package/components/appbar/index.scss +40 -44
- package/components/badge/README.md +12 -10
- package/components/badge/index.scss +21 -25
- package/components/bottomsheet/README.md +26 -1
- package/components/bottomsheet/index.scss +58 -44
- package/components/button/README.md +7 -5
- package/components/button/_shared.scss +210 -0
- package/components/button/index.scss +49 -283
- package/components/card/README.md +97 -85
- package/components/card/index.scss +46 -65
- package/components/checkbox/README.md +25 -14
- package/{tools/shapes/check.mjs → components/checkbox/_label.scss} +37 -42
- package/components/checkbox/index.scss +66 -66
- package/components/chip/README.md +186 -0
- package/components/chip/index.scss +285 -0
- package/components/datepicker/README.md +79 -0
- package/components/datepicker/index.scss +346 -315
- package/components/dialog/README.md +20 -10
- package/components/dialog/index.scss +55 -66
- package/components/divider/README.md +16 -15
- package/components/divider/index.scss +9 -25
- package/components/iconbutton/README.md +8 -3
- package/components/iconbutton/index.scss +83 -186
- package/components/list/README.md +89 -156
- package/components/list/index.scss +34 -36
- package/components/menu/README.md +81 -155
- package/components/menu/index.scss +52 -58
- package/components/navigationbar/README.md +108 -0
- package/components/navigationbar/index.scss +185 -0
- package/components/navigationrail/README.md +60 -36
- package/components/navigationrail/_navitem.scss +96 -0
- package/components/navigationrail/index.scss +76 -130
- package/components/progressindicator/README.md +83 -47
- package/components/progressindicator/index.scss +622 -172
- package/components/radio/README.md +11 -9
- package/components/radio/index.scss +36 -33
- package/components/select/README.md +12 -7
- package/components/select/index.scss +26 -34
- package/components/shapes/README.md +3 -3
- package/components/shapes/index.scss +0 -1
- package/components/sidesheet/README.md +21 -9
- package/components/sidesheet/index.scss +38 -46
- package/components/slider/README.md +21 -0
- package/components/slider/index.scss +108 -139
- package/components/snackbar/README.md +32 -35
- package/components/snackbar/index.scss +10 -22
- package/components/stepper/README.md +14 -7
- package/components/stepper/index.scss +58 -39
- package/components/switch/README.md +22 -15
- package/components/switch/index.scss +68 -60
- package/components/textfield/README.md +48 -5
- package/components/textfield/index.scss +192 -248
- package/components/timepicker/README.md +53 -23
- package/components/timepicker/index.scss +110 -128
- package/dist/alert.css +1 -1
- package/dist/alert.js +1 -1
- package/dist/appbar.css +1 -1
- package/dist/appbar.js +1 -1
- package/dist/badge.css +1 -1
- package/dist/badge.js +1 -1
- package/dist/base.css +1 -0
- package/dist/base.js +1 -0
- package/dist/bottomsheet.css +1 -1
- package/dist/bottomsheet.js +1 -1
- package/dist/button.css +1 -1
- package/dist/button.js +1 -1
- package/dist/card.css +1 -1
- package/dist/card.js +1 -1
- package/dist/checkbox.css +1 -1
- package/dist/checkbox.js +1 -1
- package/dist/chip.css +1 -0
- package/dist/chip.js +1 -0
- package/dist/components/iconbutton/index.d.ts +2 -7
- package/dist/components/slider/index.d.ts +1 -1
- package/dist/components/textfield/index.d.ts +2 -2
- package/dist/datepicker.css +1 -1
- package/dist/datepicker.js +1 -1
- package/dist/dialog.css +1 -1
- package/dist/dialog.js +1 -1
- package/dist/divider.css +1 -1
- package/dist/divider.js +1 -1
- package/dist/field.css +1 -0
- package/dist/field.js +1 -0
- package/dist/foundations/form/index.js +1 -1
- package/dist/foundations/runtime.d.ts +15 -0
- package/dist/foundations/runtime.js +1 -0
- package/dist/iconbutton.css +1 -1
- package/dist/iconbutton.js +1 -1
- package/dist/layout.css +1 -1
- package/dist/layout.js +1 -1
- package/dist/list.css +1 -1
- package/dist/list.js +1 -1
- package/dist/menu.css +1 -1
- package/dist/menu.js +1 -1
- package/dist/micl.css +1 -1
- package/dist/micl.d.ts +14 -5
- package/dist/micl.js +1 -1
- package/dist/navigationbar.css +1 -0
- package/dist/navigationbar.js +1 -0
- package/dist/navigationrail.css +1 -1
- package/dist/navigationrail.js +1 -1
- package/dist/progressindicator.css +1 -1
- package/dist/progressindicator.js +1 -1
- package/dist/radio.css +1 -1
- package/dist/radio.js +1 -1
- package/dist/scrollbar.js +1 -1
- package/dist/select.css +1 -1
- package/dist/select.js +1 -1
- package/dist/shapes.css +1 -1
- package/dist/shapes.js +1 -1
- package/dist/sidesheet.css +1 -1
- package/dist/sidesheet.js +1 -1
- package/dist/slider.css +1 -1
- package/dist/slider.js +1 -1
- package/dist/snackbar.css +1 -1
- package/dist/snackbar.js +1 -1
- package/dist/stepper.css +1 -1
- package/dist/stepper.js +1 -1
- package/dist/switch.css +1 -1
- package/dist/switch.js +1 -1
- package/dist/textfield.css +1 -1
- package/dist/textfield.js +1 -1
- package/dist/timepicker.css +1 -1
- package/dist/timepicker.js +1 -1
- package/foundations/_index.scss +35 -0
- package/foundations/{index.scss → base/index.scss} +21 -56
- package/foundations/field/index.scss +37 -0
- package/foundations/layout/index.scss +64 -65
- package/package.json +23 -9
- package/styles/statelayer.scss +20 -5
- package/styles.scss +5 -2
- package/.claude/settings.local.json +0 -17
- package/.editorconfig +0 -12
- package/.gitattributes +0 -9
- package/.github/ISSUE_TEMPLATE/bug_report.md +0 -35
- package/.github/ISSUE_TEMPLATE/feature_request.md +0 -20
- package/CLAUDE.md +0 -53
- package/CODE_OF_CONDUCT.md +0 -128
- package/components/bottomsheet/index.ts +0 -153
- package/components/button/index.ts +0 -79
- package/components/checkbox/index.ts +0 -148
- package/components/datepicker/index.ts +0 -693
- package/components/iconbutton/index.ts +0 -77
- package/components/list/index.ts +0 -138
- package/components/menu/index.ts +0 -145
- package/components/navigationrail/index.ts +0 -87
- package/components/progressindicator/index.ts +0 -77
- package/components/slider/index.ts +0 -149
- package/components/snackbar/index.ts +0 -118
- package/components/stepper/index.ts +0 -248
- package/components/textfield/index.ts +0 -188
- package/components/timepicker/index.ts +0 -413
- package/dist/components/progressindicator/index.d.ts +0 -6
- package/dist/foundations.css +0 -1
- package/dist/foundations.js +0 -1
- package/docs/accordion.html +0 -344
- package/docs/alert.html +0 -177
- package/docs/bottomsheet.html +0 -240
- package/docs/button.html +0 -291
- package/docs/card-awards.webp +0 -0
- package/docs/card-cabinet.webp +0 -0
- package/docs/card-city.webp +0 -0
- package/docs/card-fingerprint.webp +0 -0
- package/docs/card-holiday.webp +0 -0
- package/docs/card-names.webp +0 -0
- package/docs/card.html +0 -159
- package/docs/checkbox.html +0 -147
- package/docs/datepicker.html +0 -274
- package/docs/dialog.html +0 -195
- package/docs/divider.html +0 -139
- package/docs/docs.css +0 -26
- package/docs/docs.js +0 -139
- package/docs/iconbutton.html +0 -331
- package/docs/index.html +0 -431
- package/docs/list.html +0 -310
- package/docs/menu.html +0 -574
- package/docs/micl.css +0 -1
- package/docs/micl.js +0 -1
- package/docs/navigationrail.html +0 -138
- package/docs/progressindicator.html +0 -288
- package/docs/radio.html +0 -123
- package/docs/select.html +0 -337
- package/docs/shapes.css +0 -1
- package/docs/shapes.html +0 -159
- package/docs/shapes.js +0 -1
- package/docs/sidesheet.html +0 -149
- package/docs/slider.html +0 -141
- package/docs/snackbar.html +0 -102
- package/docs/stepper.html +0 -319
- package/docs/switch.html +0 -196
- package/docs/textfield.html +0 -208
- package/docs/themes/airblue/dark-hc.css +0 -51
- package/docs/themes/airblue/dark-mc.css +0 -51
- package/docs/themes/airblue/dark.css +0 -51
- package/docs/themes/airblue/light-hc.css +0 -51
- package/docs/themes/airblue/light-mc.css +0 -51
- package/docs/themes/airblue/light.css +0 -51
- package/docs/themes/airblue/theme.css +0 -306
- package/docs/themes/barnred/dark-hc.css +0 -51
- package/docs/themes/barnred/dark-mc.css +0 -51
- package/docs/themes/barnred/dark.css +0 -51
- package/docs/themes/barnred/light-hc.css +0 -51
- package/docs/themes/barnred/light-mc.css +0 -51
- package/docs/themes/barnred/light.css +0 -51
- package/docs/themes/barnred/theme.css +0 -306
- package/docs/themes/citrine/dark-hc.css +0 -51
- package/docs/themes/citrine/dark-mc.css +0 -51
- package/docs/themes/citrine/dark.css +0 -51
- package/docs/themes/citrine/light-hc.css +0 -51
- package/docs/themes/citrine/light-mc.css +0 -51
- package/docs/themes/citrine/light.css +0 -51
- package/docs/themes/citrine/theme.css +0 -306
- package/docs/themes/gray/dark-hc.css +0 -51
- package/docs/themes/gray/dark-mc.css +0 -51
- package/docs/themes/gray/dark.css +0 -51
- package/docs/themes/gray/light-hc.css +0 -51
- package/docs/themes/gray/light-mc.css +0 -51
- package/docs/themes/gray/light.css +0 -51
- package/docs/themes/gray/theme.css +0 -306
- package/docs/themes/greenery/dark-hc.css +0 -51
- package/docs/themes/greenery/dark-mc.css +0 -51
- package/docs/themes/greenery/dark.css +0 -51
- package/docs/themes/greenery/light-hc.css +0 -51
- package/docs/themes/greenery/light-mc.css +0 -51
- package/docs/themes/greenery/light.css +0 -51
- package/docs/themes/greenery/theme.css +0 -306
- package/docs/themes/hermana/dark-hc.css +0 -51
- package/docs/themes/hermana/dark-mc.css +0 -51
- package/docs/themes/hermana/dark.css +0 -51
- package/docs/themes/hermana/light-hc.css +0 -51
- package/docs/themes/hermana/light-mc.css +0 -51
- package/docs/themes/hermana/light.css +0 -51
- package/docs/themes/hermana/theme.css +0 -306
- package/docs/themes/illuminating/dark-hc.css +0 -51
- package/docs/themes/illuminating/dark-mc.css +0 -51
- package/docs/themes/illuminating/dark.css +0 -51
- package/docs/themes/illuminating/light-hc.css +0 -51
- package/docs/themes/illuminating/light-mc.css +0 -51
- package/docs/themes/illuminating/light.css +0 -51
- package/docs/themes/illuminating/theme.css +0 -306
- package/docs/themes/magenta/dark-hc.css +0 -51
- package/docs/themes/magenta/dark-mc.css +0 -51
- package/docs/themes/magenta/dark.css +0 -51
- package/docs/themes/magenta/light-hc.css +0 -51
- package/docs/themes/magenta/light-mc.css +0 -51
- package/docs/themes/magenta/light.css +0 -51
- package/docs/themes/magenta/theme.css +0 -306
- package/docs/themes/mocha/dark-hc.css +0 -51
- package/docs/themes/mocha/dark-mc.css +0 -51
- package/docs/themes/mocha/dark.css +0 -51
- package/docs/themes/mocha/light-hc.css +0 -51
- package/docs/themes/mocha/light-mc.css +0 -51
- package/docs/themes/mocha/light.css +0 -51
- package/docs/themes/mocha/theme.css +0 -306
- package/docs/themes/olivegreen/dark-hc.css +0 -51
- package/docs/themes/olivegreen/dark-mc.css +0 -51
- package/docs/themes/olivegreen/dark.css +0 -51
- package/docs/themes/olivegreen/light-hc.css +0 -51
- package/docs/themes/olivegreen/light-mc.css +0 -51
- package/docs/themes/olivegreen/light.css +0 -51
- package/docs/themes/olivegreen/theme.css +0 -306
- package/docs/themes/peri/dark-hc.css +0 -51
- package/docs/themes/peri/dark-mc.css +0 -51
- package/docs/themes/peri/dark.css +0 -51
- package/docs/themes/peri/light-hc.css +0 -51
- package/docs/themes/peri/light-mc.css +0 -51
- package/docs/themes/peri/light.css +0 -51
- package/docs/themes/peri/theme.css +0 -306
- package/docs/timepicker.html +0 -160
- package/foundations/form/index.ts +0 -174
- package/foundations/layout/README.md +0 -127
- package/intl.d.ts +0 -9
- package/micl.ts +0 -221
- package/styles/README.md +0 -196
- package/tools/shapes/generate.mjs +0 -828
- package/tsconfig.json +0 -116
- package/webpack.config.js +0 -159
|
@@ -19,12 +19,14 @@
|
|
|
19
19
|
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
20
20
|
// SOFTWARE.
|
|
21
21
|
|
|
22
|
-
@use '../../foundations';
|
|
23
22
|
@use '../../styles/elevation';
|
|
24
23
|
@use '../../styles/motion';
|
|
25
24
|
@use '../../styles/shape';
|
|
26
25
|
@use '../../styles/statelayer';
|
|
27
26
|
|
|
27
|
+
// Each selector group compiles to a single selector.
|
|
28
|
+
$iconbuttons: ':is([class*="micl-iconbutton-standard-"], [class*="micl-iconbutton-filled-"], [class*="micl-iconbutton-tonal-"], [class*="micl-iconbutton-outlined-"])';
|
|
29
|
+
|
|
28
30
|
@include elevation.level(0);
|
|
29
31
|
|
|
30
32
|
@include shape.corner('small');
|
|
@@ -43,18 +45,37 @@
|
|
|
43
45
|
@include statelayer.property;
|
|
44
46
|
@include statelayer.keyframes;
|
|
45
47
|
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
48
|
+
// Icon buttons smaller than the minimum touch target extend their interactive area with
|
|
49
|
+
// a transparent ::before overlay.
|
|
50
|
+
%micl-iconbutton-target {
|
|
51
|
+
position: relative;
|
|
52
|
+
|
|
53
|
+
&::before {
|
|
54
|
+
content: "";
|
|
55
|
+
position: absolute;
|
|
56
|
+
display: flex;
|
|
57
|
+
align-items: center;
|
|
58
|
+
justify-content: center;
|
|
59
|
+
block-size: var(--md-sys-target-size, 48px);
|
|
60
|
+
inline-size: 100%;
|
|
61
|
+
min-inline-size: var(--md-sys-target-size, 48px);
|
|
62
|
+
inset: calc((var(--micl-height) - var(--md-sys-target-size, 48px)) / 2) 0 0 calc((min(100%, var(--md-sys-target-size, 48px)) - var(--md-sys-target-size, 48px)) / 2);
|
|
63
|
+
background-color: transparent;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
#{$iconbuttons} {
|
|
68
|
+
--md-comp-icon-button-motion-effects: #{motion.$md-sys-motion-expressive-fast-spatial};
|
|
69
|
+
--md-comp-icon-button-motion-duration: #{motion.$md-sys-motion-expressive-fast-spatial-duration};
|
|
53
70
|
--micl-ripple: 1;
|
|
54
71
|
|
|
72
|
+
box-sizing: border-box;
|
|
55
73
|
display: inline-flex;
|
|
56
74
|
align-items: center;
|
|
57
75
|
justify-content: center;
|
|
76
|
+
inline-size: var(--micl-width);
|
|
77
|
+
min-inline-size: var(--micl-width);
|
|
78
|
+
block-size: var(--micl-height);
|
|
58
79
|
padding: 0;
|
|
59
80
|
border: none;
|
|
60
81
|
border-radius: var(--md-sys-shape-corner-full);
|
|
@@ -68,16 +89,17 @@
|
|
|
68
89
|
),
|
|
69
90
|
linear-gradient(rgb(from var(--statelayer-color) r g b / var(--statelayer-opacity)));
|
|
70
91
|
background-repeat: no-repeat;
|
|
92
|
+
background-position: var(--micl-x, center) var(--micl-y, center), 0 0;
|
|
71
93
|
background-size: 0%, 100%;
|
|
72
94
|
-webkit-tap-highlight-color: transparent;
|
|
73
95
|
color: var(--md-comp-icon-button-icon-color, var(--md-sys-color-on-surface-variant));
|
|
74
96
|
font-variation-settings: 'FILL' 0;
|
|
75
97
|
cursor: pointer;
|
|
76
98
|
transition:
|
|
77
|
-
border-radius var(--md-
|
|
78
|
-
font-variation-settings var(--md-
|
|
99
|
+
border-radius var(--md-comp-icon-button-motion-duration) var(--md-comp-icon-button-motion-effects),
|
|
100
|
+
font-variation-settings var(--md-comp-icon-button-motion-duration) linear,
|
|
79
101
|
background-size 0ms,
|
|
80
|
-
--statelayer-opacity var(--md-
|
|
102
|
+
--statelayer-opacity var(--md-comp-icon-button-motion-duration) linear;
|
|
81
103
|
|
|
82
104
|
&:disabled {
|
|
83
105
|
box-shadow: var(--md-sys-elevation-level0);
|
|
@@ -91,13 +113,13 @@
|
|
|
91
113
|
--statelayer-opacity: var(--md-sys-state-focus-state-layer-opacity, 10%);
|
|
92
114
|
|
|
93
115
|
outline: var(--md-sys-state-focus-indicator-thickness, 3px) solid var(--md-sys-color-secondary);
|
|
94
|
-
outline-offset:
|
|
116
|
+
outline-offset: 2px;
|
|
95
117
|
}
|
|
96
118
|
&:active {
|
|
97
119
|
--statelayer-opacity: var(--md-sys-state-pressed-state-layer-opacity, 10%);
|
|
98
120
|
}
|
|
99
121
|
&.micl-rippling {
|
|
100
|
-
animation: micl-ripple var(--md-sys-state-ripple-duration)
|
|
122
|
+
animation: micl-ripple var(--md-sys-state-ripple-duration);
|
|
101
123
|
}
|
|
102
124
|
}
|
|
103
125
|
&:hover:not(:disabled),
|
|
@@ -110,46 +132,23 @@
|
|
|
110
132
|
&.micl-button--toggle[aria-pressed="true"]::before {
|
|
111
133
|
content: attr(data-micliconselected);
|
|
112
134
|
}
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
.micl-iconbutton-standard-xs,
|
|
116
|
-
.micl-iconbutton-filled-xs,
|
|
117
|
-
.micl-iconbutton-tonal-xs,
|
|
118
|
-
.micl-iconbutton-outlined-xs {
|
|
119
|
-
--micl-width: 32px;
|
|
120
|
-
--micl-height: 32px;
|
|
121
|
-
|
|
122
|
-
position: relative;
|
|
123
|
-
inline-size: var(--micl-width);
|
|
124
|
-
min-inline-size: var(--micl-width);
|
|
125
|
-
block-size: var(--micl-height);
|
|
126
|
-
font-size: 20px;
|
|
127
135
|
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
display: flex;
|
|
132
|
-
align-items: center;
|
|
133
|
-
justify-content: center;
|
|
134
|
-
block-size: var(--md-sys-target-size, 48px);
|
|
135
|
-
inline-size: 100%;
|
|
136
|
-
min-inline-size: var(--md-sys-target-size, 48px);
|
|
137
|
-
inset: calc((var(--micl-height) - var(--md-sys-target-size, 48px)) / 2) 0 0 calc((min(100%, var(--md-sys-target-size, 48px)) - var(--md-sys-target-size, 48px)) / 2);
|
|
138
|
-
background-color: transparent;
|
|
139
|
-
}
|
|
136
|
+
// The corner rounding of the size modifiers resolves through the two --_shape-*
|
|
137
|
+
// custom properties that each size declares below, the narrow and wide widths
|
|
138
|
+
// through the two --_width-* custom properties.
|
|
140
139
|
&.micl-button--toggle[aria-pressed="true"] {
|
|
141
|
-
border-radius: var(--
|
|
140
|
+
border-radius: var(--_shape-toggle);
|
|
142
141
|
}
|
|
143
142
|
&.micl-iconbutton--narrow {
|
|
144
|
-
--micl-width:
|
|
143
|
+
--micl-width: var(--_width-narrow);
|
|
145
144
|
border-radius: calc(var(--micl-width) / 2);
|
|
146
145
|
}
|
|
147
146
|
&.micl-iconbutton--wide {
|
|
148
|
-
--micl-width:
|
|
147
|
+
--micl-width: var(--_width-wide);
|
|
149
148
|
border-radius: calc(var(--micl-height) / 2);
|
|
150
149
|
}
|
|
151
150
|
&.micl-button--square {
|
|
152
|
-
border-radius: var(--
|
|
151
|
+
border-radius: var(--_shape-toggle);
|
|
153
152
|
|
|
154
153
|
&.micl-button--toggle[aria-pressed="true"] {
|
|
155
154
|
border-radius: var(--md-sys-shape-corner-full);
|
|
@@ -158,174 +157,68 @@
|
|
|
158
157
|
&:not(:disabled):active {
|
|
159
158
|
&,
|
|
160
159
|
&.micl-button--square {
|
|
161
|
-
border-radius: var(--
|
|
160
|
+
border-radius: var(--_shape-pressed);
|
|
162
161
|
}
|
|
163
162
|
}
|
|
164
163
|
}
|
|
165
164
|
|
|
166
|
-
.micl-iconbutton-standard-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
165
|
+
:is(.micl-iconbutton-standard-xs, .micl-iconbutton-filled-xs, .micl-iconbutton-tonal-xs, .micl-iconbutton-outlined-xs) {
|
|
166
|
+
@extend %micl-iconbutton-target;
|
|
167
|
+
|
|
168
|
+
--micl-width: 32px;
|
|
169
|
+
--micl-height: 32px;
|
|
170
|
+
--_width-narrow: 28px;
|
|
171
|
+
--_width-wide: 40px;
|
|
172
|
+
--_shape-toggle: var(--md-sys-shape-corner-medium);
|
|
173
|
+
--_shape-pressed: var(--md-sys-shape-corner-small);
|
|
174
|
+
|
|
175
|
+
font-size: 20px;
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
:is(.micl-iconbutton-standard-s, .micl-iconbutton-filled-s, .micl-iconbutton-tonal-s, .micl-iconbutton-outlined-s) {
|
|
179
|
+
@extend %micl-iconbutton-target;
|
|
180
|
+
|
|
170
181
|
--micl-width: 40px;
|
|
171
182
|
--micl-height: 40px;
|
|
183
|
+
--_width-narrow: 32px;
|
|
184
|
+
--_width-wide: 52px;
|
|
185
|
+
--_shape-toggle: var(--md-sys-shape-corner-medium);
|
|
186
|
+
--_shape-pressed: var(--md-sys-shape-corner-small);
|
|
172
187
|
|
|
173
|
-
position: relative;
|
|
174
|
-
inline-size: var(--micl-width);
|
|
175
|
-
min-inline-size: var(--micl-width);
|
|
176
|
-
block-size: var(--micl-height);
|
|
177
188
|
font-size: var(--md-sys-icon-size, 24px);
|
|
178
|
-
|
|
179
|
-
&::before {
|
|
180
|
-
content: "";
|
|
181
|
-
position: absolute;
|
|
182
|
-
display: flex;
|
|
183
|
-
align-items: center;
|
|
184
|
-
justify-content: center;
|
|
185
|
-
block-size: var(--md-sys-target-size, 48px);
|
|
186
|
-
inline-size: 100%;
|
|
187
|
-
min-inline-size: var(--md-sys-target-size, 48px);
|
|
188
|
-
inset: calc((var(--micl-height) - var(--md-sys-target-size, 48px)) / 2) 0 0 calc((min(100%, var(--md-sys-target-size, 48px)) - var(--md-sys-target-size, 48px)) / 2);
|
|
189
|
-
background-color: transparent;
|
|
190
|
-
}
|
|
191
|
-
&.micl-button--toggle[aria-pressed="true"] {
|
|
192
|
-
border-radius: var(--md-sys-shape-corner-medium);
|
|
193
|
-
}
|
|
194
|
-
&.micl-iconbutton--narrow {
|
|
195
|
-
--micl-width: 32px;
|
|
196
|
-
border-radius: calc(var(--micl-width) / 2);
|
|
197
|
-
}
|
|
198
|
-
&.micl-iconbutton--wide {
|
|
199
|
-
--micl-width: 52px;
|
|
200
|
-
border-radius: calc(var(--micl-height) / 2);
|
|
201
|
-
}
|
|
202
|
-
&.micl-button--square {
|
|
203
|
-
border-radius: var(--md-sys-shape-corner-medium);
|
|
204
|
-
|
|
205
|
-
&.micl-button--toggle[aria-pressed="true"] {
|
|
206
|
-
border-radius: var(--md-sys-shape-corner-full);
|
|
207
|
-
}
|
|
208
|
-
}
|
|
209
|
-
&:not(:disabled):active {
|
|
210
|
-
&,
|
|
211
|
-
&.micl-button--square {
|
|
212
|
-
border-radius: var(--md-sys-shape-corner-small);
|
|
213
|
-
}
|
|
214
|
-
}
|
|
215
189
|
}
|
|
216
190
|
|
|
217
|
-
.micl-iconbutton-standard-m,
|
|
218
|
-
.micl-iconbutton-filled-m,
|
|
219
|
-
.micl-iconbutton-tonal-m,
|
|
220
|
-
.micl-iconbutton-outlined-m {
|
|
191
|
+
:is(.micl-iconbutton-standard-m, .micl-iconbutton-filled-m, .micl-iconbutton-tonal-m, .micl-iconbutton-outlined-m) {
|
|
221
192
|
--micl-width: 56px;
|
|
222
193
|
--micl-height: 56px;
|
|
194
|
+
--_width-narrow: 48px;
|
|
195
|
+
--_width-wide: 72px;
|
|
196
|
+
--_shape-toggle: var(--md-sys-shape-corner-large);
|
|
197
|
+
--_shape-pressed: var(--md-sys-shape-corner-medium);
|
|
223
198
|
|
|
224
|
-
inline-size: var(--micl-width);
|
|
225
|
-
min-inline-size: var(--micl-width);
|
|
226
|
-
block-size: var(--micl-height);
|
|
227
199
|
font-size: var(--md-sys-icon-size, 24px);
|
|
228
|
-
|
|
229
|
-
&.micl-button--toggle[aria-pressed="true"] {
|
|
230
|
-
border-radius: var(--md-sys-shape-corner-large);
|
|
231
|
-
}
|
|
232
|
-
&.micl-iconbutton--narrow {
|
|
233
|
-
--micl-width: 48px;
|
|
234
|
-
border-radius: calc(var(--micl-width) / 2);
|
|
235
|
-
}
|
|
236
|
-
&.micl-iconbutton--wide {
|
|
237
|
-
--micl-width: 72px;
|
|
238
|
-
border-radius: calc(var(--micl-height) / 2);
|
|
239
|
-
}
|
|
240
|
-
&.micl-button--square {
|
|
241
|
-
border-radius: var(--md-sys-shape-corner-large);
|
|
242
|
-
|
|
243
|
-
&.micl-button--toggle[aria-pressed="true"] {
|
|
244
|
-
border-radius: var(--md-sys-shape-corner-full);
|
|
245
|
-
}
|
|
246
|
-
}
|
|
247
|
-
&:not(:disabled):active {
|
|
248
|
-
&,
|
|
249
|
-
&.micl-button--square {
|
|
250
|
-
border-radius: var(--md-sys-shape-corner-medium);
|
|
251
|
-
}
|
|
252
|
-
}
|
|
253
200
|
}
|
|
254
201
|
|
|
255
|
-
.micl-iconbutton-standard-l,
|
|
256
|
-
.micl-iconbutton-filled-l,
|
|
257
|
-
.micl-iconbutton-tonal-l,
|
|
258
|
-
.micl-iconbutton-outlined-l {
|
|
202
|
+
:is(.micl-iconbutton-standard-l, .micl-iconbutton-filled-l, .micl-iconbutton-tonal-l, .micl-iconbutton-outlined-l) {
|
|
259
203
|
--micl-width: 96px;
|
|
260
204
|
--micl-height: 96px;
|
|
205
|
+
--_width-narrow: 64px;
|
|
206
|
+
--_width-wide: 128px;
|
|
207
|
+
--_shape-toggle: var(--md-sys-shape-corner-extra-large);
|
|
208
|
+
--_shape-pressed: var(--md-sys-shape-corner-large);
|
|
261
209
|
|
|
262
|
-
inline-size: var(--micl-width);
|
|
263
|
-
min-inline-size: var(--micl-width);
|
|
264
|
-
block-size: var(--micl-height);
|
|
265
210
|
font-size: 32px;
|
|
266
|
-
|
|
267
|
-
&.micl-button--toggle[aria-pressed="true"] {
|
|
268
|
-
border-radius: var(--md-sys-shape-corner-extra-large);
|
|
269
|
-
}
|
|
270
|
-
&.micl-iconbutton--narrow {
|
|
271
|
-
--micl-width: 64px;
|
|
272
|
-
border-radius: calc(var(--micl-width) / 2);
|
|
273
|
-
}
|
|
274
|
-
&.micl-iconbutton--wide {
|
|
275
|
-
--micl-width: 128px;
|
|
276
|
-
border-radius: calc(var(--micl-height) / 2);
|
|
277
|
-
}
|
|
278
|
-
&.micl-button--square {
|
|
279
|
-
border-radius: var(--md-sys-shape-corner-extra-large);
|
|
280
|
-
|
|
281
|
-
&.micl-button--toggle[aria-pressed="true"] {
|
|
282
|
-
border-radius: var(--md-sys-shape-corner-full);
|
|
283
|
-
}
|
|
284
|
-
}
|
|
285
|
-
&:not(:disabled):active {
|
|
286
|
-
&,
|
|
287
|
-
&.micl-button--square {
|
|
288
|
-
border-radius: var(--md-sys-shape-corner-large);
|
|
289
|
-
}
|
|
290
|
-
}
|
|
291
211
|
}
|
|
292
212
|
|
|
293
|
-
.micl-iconbutton-standard-xl,
|
|
294
|
-
.micl-iconbutton-filled-xl,
|
|
295
|
-
.micl-iconbutton-tonal-xl,
|
|
296
|
-
.micl-iconbutton-outlined-xl {
|
|
213
|
+
:is(.micl-iconbutton-standard-xl, .micl-iconbutton-filled-xl, .micl-iconbutton-tonal-xl, .micl-iconbutton-outlined-xl) {
|
|
297
214
|
--micl-width: 136px;
|
|
298
215
|
--micl-height: 136px;
|
|
216
|
+
--_width-narrow: 104px;
|
|
217
|
+
--_width-wide: 184px;
|
|
218
|
+
--_shape-toggle: var(--md-sys-shape-corner-extra-large);
|
|
219
|
+
--_shape-pressed: var(--md-sys-shape-corner-large);
|
|
299
220
|
|
|
300
|
-
inline-size: var(--micl-width);
|
|
301
|
-
min-inline-size: var(--micl-width);
|
|
302
|
-
block-size: var(--micl-height);
|
|
303
221
|
font-size: 40px;
|
|
304
|
-
|
|
305
|
-
&.micl-button--toggle[aria-pressed="true"] {
|
|
306
|
-
border-radius: var(--md-sys-shape-corner-extra-large);
|
|
307
|
-
}
|
|
308
|
-
&.micl-iconbutton--narrow {
|
|
309
|
-
--micl-width: 104px;
|
|
310
|
-
border-radius: calc(var(--micl-width) / 2);
|
|
311
|
-
}
|
|
312
|
-
&.micl-iconbutton--wide {
|
|
313
|
-
--micl-width: 184px;
|
|
314
|
-
border-radius: calc(var(--micl-height) / 2);
|
|
315
|
-
}
|
|
316
|
-
&.micl-button--square {
|
|
317
|
-
border-radius: var(--md-sys-shape-corner-extra-large);
|
|
318
|
-
|
|
319
|
-
&.micl-button--toggle[aria-pressed="true"] {
|
|
320
|
-
border-radius: var(--md-sys-shape-corner-full);
|
|
321
|
-
}
|
|
322
|
-
}
|
|
323
|
-
&:not(:disabled):active {
|
|
324
|
-
&,
|
|
325
|
-
&.micl-button--square {
|
|
326
|
-
border-radius: var(--md-sys-shape-corner-large);
|
|
327
|
-
}
|
|
328
|
-
}
|
|
329
222
|
}
|
|
330
223
|
|
|
331
224
|
[class*="micl-iconbutton-standard-"] {
|
|
@@ -346,7 +239,6 @@
|
|
|
346
239
|
}
|
|
347
240
|
}
|
|
348
241
|
|
|
349
|
-
|
|
350
242
|
[class*="micl-iconbutton-filled-"] {
|
|
351
243
|
--statelayer-color: var(--md-sys-color-on-primary);
|
|
352
244
|
|
|
@@ -396,6 +288,11 @@
|
|
|
396
288
|
&:disabled {
|
|
397
289
|
background-color: transparent;
|
|
398
290
|
color: var(--md-comp-outlined-icon-button-disabled-icon-color, rgb(from var(--md-sys-color-on-surface) r g b / var(--md-comp-outlined-icon-button-disabled-icon-opacity, 38%)));
|
|
291
|
+
|
|
292
|
+
&.micl-button--toggle[aria-pressed="true"] {
|
|
293
|
+
border: none;
|
|
294
|
+
background-color: var(--md-comp-outlined-icon-button-selected-disabled-container-color, rgb(from var(--md-sys-color-on-surface) r g b / var(--md-comp-outlined-icon-button-selected-disabled-container-opacity, 10%)));
|
|
295
|
+
}
|
|
399
296
|
}
|
|
400
297
|
&:not(:disabled) {
|
|
401
298
|
&.micl-button--toggle[aria-pressed="true"] {
|
|
@@ -209,162 +209,95 @@ To enable selection of list items, integrate a Checkbox or Switch component with
|
|
|
209
209
|
|
|
210
210
|
- The `role="listbox"` and `role="option"` are used for accessibility, indicating a selectable list. They are added automatically when a list contains a selectable item (an item with `tabindex="0"`. The example above shows these roles for clarity.
|
|
211
211
|
|
|
212
|
-
##
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
|
218
|
-
|
|
219
|
-
|
|
|
220
|
-
|
|
|
221
|
-
| |
|
|
222
|
-
|
|
|
223
|
-
|
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
|
228
|
-
|
|
229
|
-
|
|
|
230
|
-
|
|
|
231
|
-
|
|
|
232
|
-
|
|
|
233
|
-
|
|
|
234
|
-
|
|
|
235
|
-
| |
|
|
236
|
-
|
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
|
242
|
-
|
|
243
|
-
|
|
|
244
|
-
|
|
|
245
|
-
|
|
|
246
|
-
| |
|
|
247
|
-
|
|
|
248
|
-
|
|
|
249
|
-
|
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
|
256
|
-
|
|
257
|
-
|
|
|
258
|
-
|
|
|
259
|
-
|
|
|
260
|
-
|
|
|
261
|
-
| |
|
|
262
|
-
|
|
|
263
|
-
|
|
|
264
|
-
|
|
|
265
|
-
|
|
|
266
|
-
|
|
|
267
|
-
|
|
|
268
|
-
|
|
|
269
|
-
|
|
|
270
|
-
|
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
|
275
|
-
|
|
276
|
-
|
|
|
277
|
-
|
|
|
278
|
-
|
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
|
294
|
-
|
|
295
|
-
| --md-
|
|
296
|
-
| --md-
|
|
297
|
-
| --md-
|
|
298
|
-
| --md-
|
|
299
|
-
| --md-
|
|
300
|
-
| --md-
|
|
301
|
-
| --md-comp-list-item-leading-image-height |
|
|
302
|
-
| --md-comp-list-item-leading-image-expressive-shape |
|
|
303
|
-
| --md-comp-list-item-leading-image-width |
|
|
304
|
-
| --md-comp-list-item-leading-space |
|
|
305
|
-
| --md-comp-list-item-leading-video-height |
|
|
306
|
-
| --md-comp-list-item-leading-video-shape |
|
|
307
|
-
| --md-comp-list-item-leading-video-width |
|
|
308
|
-
| |
|
|
309
|
-
| --md-comp-list-item-trailing-icon-color |
|
|
310
|
-
| --md-comp-list-item-trailing-icon-expressive-size |
|
|
311
|
-
| --md-comp-list-item-trailing-space |
|
|
312
|
-
| --md-comp-list-item-trailing-supporting-text-color |
|
|
313
|
-
| |
|
|
314
|
-
| --md-comp-list-item-selected-container-color |
|
|
315
|
-
| --md-comp-list-item-selected-label-text-color |
|
|
316
|
-
| --md-comp-list-item-selected-leading-icon-color |
|
|
317
|
-
| --md-comp-list-item-selected-overline-color |
|
|
318
|
-
| --md-comp-list-item-selected-supporting-text-color |
|
|
319
|
-
| --md-comp-list-item-selected-trailing-icon-color |
|
|
320
|
-
| --md-comp-list-item-selected-trailing-supporting-text-color |
|
|
321
|
-
| |
|
|
322
|
-
| --md-comp-list-item-selected-disabled-container-color |
|
|
323
|
-
| --md-comp-list-item-selected-disabled-container-opacity |
|
|
324
|
-
| --md-comp-list-item-selected-disabled-label-text-color |
|
|
325
|
-
| --md-comp-list-item-selected-disabled-label-text-opacity |
|
|
326
|
-
| --md-comp-list-item-selected-disabled-leading-icon-color |
|
|
327
|
-
| --md-comp-list-item-selected-disabled-leading-icon-opacity |
|
|
328
|
-
| --md-comp-list-item-selected-disabled-overline-color |
|
|
329
|
-
| --md-comp-list-item-selected-disabled-overline-opacity |
|
|
330
|
-
| --md-comp-list-item-selected-disabled-state-layer-color |
|
|
331
|
-
| --md-comp-list-item-selected-disabled-state-layer-opacity |
|
|
332
|
-
| --md-comp-list-item-selected-disabled-supporting-text-color |
|
|
333
|
-
| --md-comp-list-item-selected-disabled-supporting-text-opacity |
|
|
334
|
-
| --md-comp-list-item-selected-disabled-trailing-icon-color |
|
|
335
|
-
| --md-comp-list-item-selected-disabled-trailing-icon-opacity |
|
|
336
|
-
| --md-comp-list-item-selected-disabled-trailing-supporting-text-color |
|
|
337
|
-
| --md-comp-list-item-selected-disabled-trailing-supporting-text-opacity |
|
|
338
|
-
| |
|
|
339
|
-
| --md-comp-list-item-selected-dragged-container-elevation |
|
|
340
|
-
| --md-comp-list-item-selected-dragged-label-text-color |
|
|
341
|
-
| --md-comp-list-item-selected-dragged-leading-icon-color |
|
|
342
|
-
| --md-comp-list-item-selected-dragged-state-layer-color |
|
|
343
|
-
| --md-comp-list-item-selected-dragged-state-layer-opacity |
|
|
344
|
-
| --md-comp-list-item-selected-dragged-supporting-text-color |
|
|
345
|
-
| --md-comp-list-item-selected-dragged-trailing-icon-color |
|
|
346
|
-
| --md-comp-list-item-selected-dragged-trailing-supporting-text-color |
|
|
347
|
-
| --md-comp-list-item-selected-focus-label-text-color |
|
|
348
|
-
| --md-comp-list-item-selected-focus-leading-icon-color |
|
|
349
|
-
| --md-comp-list-item-selected-focus-state-layer-color |
|
|
350
|
-
| --md-comp-list-item-selected-focus-state-layer-opacity |
|
|
351
|
-
| --md-comp-list-item-selected-focus-supporting-text-color |
|
|
352
|
-
| --md-comp-list-item-selected-focus-trailing-icon-color |
|
|
353
|
-
| --md-comp-list-item-selected-focus-trailing-supporting-text-color |
|
|
354
|
-
| --md-comp-list-item-selected-hover-label-text-color |
|
|
355
|
-
| --md-comp-list-item-selected-hover-leading-icon-color |
|
|
356
|
-
| --md-comp-list-item-selected-hover-state-layer-color |
|
|
357
|
-
| --md-comp-list-item-selected-hover-state-layer-opacity |
|
|
358
|
-
| --md-comp-list-item-selected-hover-supporting-text-color |
|
|
359
|
-
| --md-comp-list-item-selected-hover-trailing-icon-color |
|
|
360
|
-
| --md-comp-list-item-selected-hover-trailing-supporting-text-color |
|
|
361
|
-
| --md-comp-list-item-selected-pressed-label-text-color |
|
|
362
|
-
| --md-comp-list-item-selected-pressed-leading-icon-color |
|
|
363
|
-
| --md-comp-list-item-selected-pressed-state-layer-color |
|
|
364
|
-
| --md-comp-list-item-selected-pressed-state-layer-opacity |
|
|
365
|
-
| --md-comp-list-item-selected-pressed-supporting-text-color |
|
|
366
|
-
| --md-comp-list-item-selected-pressed-trailing-icon-color |
|
|
367
|
-
| --md-comp-list-item-selected-pressed-trailing-supporting-text-color |
|
|
212
|
+
## Theming
|
|
213
|
+
Each list style can be themed with CSS custom properties that follow the Material Design 3 component-token naming convention, as defined in the [Material Design 3 Expressive List Specification](https://m3.material.io/components/lists/specs). Set them on any appropriate parent element to affect its child lists.
|
|
214
|
+
|
|
215
|
+
### Container
|
|
216
|
+
|
|
217
|
+
| Custom property | Meaning | Default |
|
|
218
|
+
|---|---|---|
|
|
219
|
+
| `--md-comp-list-container-color` | The background color of the list | `transparent` |
|
|
220
|
+
| `--md-comp-list-container-shape` | The corner rounding of the list, shared by its first and last items | `--md-sys-shape-corner-large` |
|
|
221
|
+
| `--md-comp-list-container-space` | The vertical margin around the list | `0px` |
|
|
222
|
+
| `--md-comp-list-segment-gap` | The gap between the items of a segmented list | `2px` |
|
|
223
|
+
| `--md-comp-list-item-segmented-container-color` | The background color of the items of a segmented list | `--md-sys-color-surface` |
|
|
224
|
+
|
|
225
|
+
### Item layout
|
|
226
|
+
|
|
227
|
+
| Custom property | Meaning | Default |
|
|
228
|
+
|---|---|---|
|
|
229
|
+
| `--md-comp-list-item-one-line-container-height` | The minimum height of a single-line item | `56px` |
|
|
230
|
+
| `--md-comp-list-item-two-line-container-height` | The minimum height of a two-line item | `72px` |
|
|
231
|
+
| `--md-comp-list-item-three-line-container-height` | The minimum height of a three-line item | `88px` |
|
|
232
|
+
| `--md-comp-list-item-top-space` | The padding above the item content | `10px` |
|
|
233
|
+
| `--md-comp-list-item-bottom-space` | The padding below the item content | `10px` |
|
|
234
|
+
| `--md-comp-list-item-leading-space` | The padding before the item content | `16px` |
|
|
235
|
+
| `--md-comp-list-item-trailing-space` | The padding after the item content | `16px` |
|
|
236
|
+
| `--md-comp-list-item-between-space` | The gap between the elements of an item | `12px` |
|
|
237
|
+
|
|
238
|
+
### Item shapes
|
|
239
|
+
The expressive corner rounding of an item follows its interaction state:
|
|
240
|
+
|
|
241
|
+
| Custom property | Item state | Default |
|
|
242
|
+
|---|---|---|
|
|
243
|
+
| `--md-comp-list-item-container-expressive-shape` | Resting | `--md-sys-shape-corner-extra-small` |
|
|
244
|
+
| `--md-comp-list-item-container-hovered-expressive-shape` | Hovered | `--md-sys-shape-corner-medium` |
|
|
245
|
+
| `--md-comp-list-item-container-focused-expressive-shape` | Focused | `--md-sys-shape-corner-large` |
|
|
246
|
+
| `--md-comp-list-item-container-pressed-expressive-shape` | Pressed | `--md-sys-shape-corner-large` |
|
|
247
|
+
| `--md-comp-list-item-container-dragged-expressive-shape` | Dragged | `--md-sys-shape-corner-large` |
|
|
248
|
+
| `--md-comp-list-item-container-disabled-expressive-shape` | Disabled | `--md-sys-shape-corner-extra-small` |
|
|
249
|
+
| `--md-comp-list-item-container-selected-expressive-shape` | Selected | `--md-sys-shape-corner-large` |
|
|
250
|
+
|
|
251
|
+
For selected items, every state also has its own token — `--md-comp-list-item-container-selected-<state>-expressive-shape` with `<state>` one of `hovered`, `focused`, `pressed`, `dragged` or `disabled` — all defaulting to `--md-sys-shape-corner-large`.
|
|
252
|
+
|
|
253
|
+
### Leading and trailing media
|
|
254
|
+
|
|
255
|
+
| Custom property | Meaning | Default |
|
|
256
|
+
|---|---|---|
|
|
257
|
+
| `--md-comp-list-item-leading-icon-color` | The color of a leading icon | `--md-sys-color-on-surface-variant` |
|
|
258
|
+
| `--md-comp-list-item-leading-icon-expressive-size` | The size of a leading icon | `20px` |
|
|
259
|
+
| `--md-comp-list-item-trailing-icon-color` | The color of a trailing icon | `--md-sys-color-on-surface-variant` |
|
|
260
|
+
| `--md-comp-list-item-trailing-icon-expressive-size` | The size of a trailing icon | `20px` |
|
|
261
|
+
| `--md-comp-list-item-leading-avatar-color` | The background color of an avatar | `--md-sys-color-primary-container` |
|
|
262
|
+
| `--md-comp-list-item-leading-avatar-label-color` | The text color of an avatar | `--md-sys-color-on-primary-container` |
|
|
263
|
+
| `--md-comp-list-item-leading-avatar-shape` | The corner rounding of an avatar | `--md-sys-shape-corner-full` |
|
|
264
|
+
| `--md-comp-list-item-leading-avatar-size` | The size of an avatar | `40px` |
|
|
265
|
+
| `--md-comp-list-item-leading-image-width` | The width of an image | `56px` |
|
|
266
|
+
| `--md-comp-list-item-leading-image-height` | The maximum height of an image | `56px` |
|
|
267
|
+
| `--md-comp-list-item-leading-image-expressive-shape` | The corner rounding of an image | `--md-sys-shape-corner-small` |
|
|
268
|
+
| `--md-comp-list-item-leading-video-width` | The width of a video thumbnail | `100px` |
|
|
269
|
+
| `--md-comp-list-item-leading-video-height` | The maximum height of a video thumbnail | `56px` |
|
|
270
|
+
| `--md-comp-list-item-leading-video-shape` | The corner rounding of a video thumbnail | `--md-sys-shape-corner-small` |
|
|
271
|
+
|
|
272
|
+
### Focus indicator
|
|
273
|
+
|
|
274
|
+
| Custom property | Meaning | Default |
|
|
275
|
+
|---|---|---|
|
|
276
|
+
| `--md-comp-list-item-focus-indicator-color` | The color of the keyboard focus indicator | `--md-sys-color-secondary` |
|
|
277
|
+
| `--md-comp-list-item-focus-indicator-thickness` | The thickness of the keyboard focus indicator | `3px` |
|
|
278
|
+
| `--md-comp-list-item-focus-indicator-offset` | The offset of the keyboard focus indicator | `-3px` |
|
|
279
|
+
|
|
280
|
+
### Item colors
|
|
281
|
+
The colors of list items follow a naming pattern that combines the item's selection and interaction state with the colored part:
|
|
282
|
+
|
|
283
|
+
```
|
|
284
|
+
--md-comp-list-item[-selected][-<state>]-<part>-color
|
|
285
|
+
```
|
|
286
|
+
|
|
287
|
+
- `selected` targets items that are checked options, contain a checked checkbox or switch, or are the summary of an open accordion.
|
|
288
|
+
- `<state>` is one of `hover`, `focus`, `pressed`, `dragged` or `disabled`; omit it for the resting state.
|
|
289
|
+
- `<part>` is one of `container`, `overline`, `label-text`, `supporting-text`, `leading-icon`, `trailing-icon`, `trailing-supporting-text` or `state-layer`.
|
|
290
|
+
|
|
291
|
+
Every `state-layer` color has an `-opacity` companion (defaults: hover 8%, focus 10%, pressed 10%, dragged 16%, disabled 0%), and so does every color of a `disabled` state (default: --md-sys-state-disabled-state-layer-opacity, 38%). The `container` part exists for the resting, `selected` and `selected-disabled` combinations only, and the `overline` part has no interaction-state tokens. While an item is dragged, its elevation can be set with `--md-comp-list-item-dragged-container-elevation` and `--md-comp-list-item-selected-dragged-container-elevation` (default: --md-sys-elevation-level4). The defaults per part:
|
|
292
|
+
|
|
293
|
+
| Part | Resting | Hover, focus, pressed, dragged | Selected | Selected + state | Disabled |
|
|
294
|
+
|---|---|---|---|---|---|
|
|
295
|
+
| container | transparent | | --md-sys-color-secondary-container | | selected: --md-sys-color-on-surface at 38% |
|
|
296
|
+
| overline | --md-sys-color-on-surface-variant | | --md-sys-color-on-secondary-container | | --md-sys-color-on-surface at 38% |
|
|
297
|
+
| label-text | --md-sys-color-on-surface | --md-sys-color-on-surface | --md-sys-color-on-secondary-container | --md-sys-color-on-secondary-container | --md-sys-color-on-surface at 38% |
|
|
298
|
+
| supporting-text, trailing-supporting-text | --md-sys-color-on-surface-variant | --md-sys-color-on-surface-variant | --md-sys-color-on-secondary-container | --md-sys-color-on-surface | --md-sys-color-on-surface at 38% |
|
|
299
|
+
| leading-icon, trailing-icon | --md-sys-color-on-surface-variant | --md-sys-color-on-surface-variant | --md-sys-color-on-secondary-container | --md-sys-color-on-surface | --md-sys-color-on-surface at 38% |
|
|
300
|
+
| state-layer | | --md-sys-color-on-surface | | --md-sys-color-on-surface | --md-sys-color-on-surface at 0% |
|
|
368
301
|
|
|
369
302
|
**Example: Changing the height of single-line list items**
|
|
370
303
|
|