material-inspired-component-library 6.0.6 → 7.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 +11 -2
- package/components/appbar/index.scss +4 -4
- package/components/button/README.md +16 -1
- package/components/button/index.scss +6 -0
- package/components/button/index.ts +17 -0
- package/components/card/README.md +86 -6
- package/components/card/index.scss +217 -145
- package/components/datepicker/README.md +3 -2
- package/components/datepicker/index.ts +0 -8
- package/components/iconbutton/README.md +11 -0
- package/components/iconbutton/index.scss +12 -0
- package/components/iconbutton/index.ts +15 -0
- package/components/list/index.scss +1 -1
- package/components/navigationrail/README.md +64 -59
- package/components/navigationrail/index.scss +197 -300
- package/components/navigationrail/index.ts +55 -38
- package/components/snackbar/README.md +126 -0
- package/components/snackbar/index.scss +94 -73
- package/components/snackbar/index.ts +90 -28
- package/components/timepicker/README.md +2 -1
- package/components/timepicker/index.ts +0 -3
- package/dist/appbar.css +1 -1
- package/dist/button.css +1 -1
- package/dist/card.css +1 -1
- package/dist/components/navigationrail/index.d.ts +2 -1
- package/dist/components/snackbar/index.d.ts +1 -0
- package/dist/iconbutton.css +1 -1
- package/dist/layout.css +1 -1
- package/dist/list.css +1 -1
- package/dist/micl.css +1 -1
- package/dist/micl.js +1 -1
- package/dist/navigationrail.css +1 -1
- package/dist/sidesheet.css +1 -1
- package/dist/snackbar.css +1 -1
- package/docs/button.html +43 -15
- package/docs/card.html +27 -13
- package/docs/datepicker.html +4 -4
- package/docs/docs.css +1 -1
- package/docs/iconbutton.html +22 -8
- package/docs/index.html +31 -18
- package/docs/micl.css +1 -1
- package/docs/micl.js +1 -1
- package/docs/navigationrail.html +76 -22
- package/docs/snackbar.html +31 -14
- package/docs/stepper.html +1 -1
- package/docs/timepicker.html +12 -3
- package/foundations/layout/index.scss +4 -4
- package/package.json +1 -1
- package/docs/snackbar1.html +0 -159
- package/docs/snackbar2.html +0 -159
|
@@ -27,10 +27,10 @@
|
|
|
27
27
|
@use '../../styles/typography';
|
|
28
28
|
|
|
29
29
|
:root {
|
|
30
|
-
--md-
|
|
31
|
-
--md-
|
|
32
|
-
--md-
|
|
33
|
-
--md-
|
|
30
|
+
--md-comp-card-gap: 8px;
|
|
31
|
+
--md-comp-card-margin: 8px;
|
|
32
|
+
--md-comp-card-padding-inline: 16px;
|
|
33
|
+
--md-comp-card-content-padding-block: 16px;
|
|
34
34
|
}
|
|
35
35
|
|
|
36
36
|
.micl-card-elevated,
|
|
@@ -39,17 +39,30 @@
|
|
|
39
39
|
--md-sys-card-motion-spatial: #{motion.$md-sys-motion-expressive-default-spatial};
|
|
40
40
|
--md-sys-card-motion-duration: #{motion.$md-sys-motion-expressive-default-spatial-duration};
|
|
41
41
|
|
|
42
|
-
|
|
42
|
+
--_text-color: var(--md-sys-color-on-surface-variant);
|
|
43
|
+
|
|
44
|
+
display: flex;
|
|
45
|
+
flex-direction: column;
|
|
43
46
|
block-size: fit-content;
|
|
44
47
|
margin: 0;
|
|
45
|
-
border-radius: var(--md-sys-shape-corner-medium);
|
|
46
48
|
outline: none;
|
|
47
49
|
overflow: hidden;
|
|
48
50
|
interpolate-size: allow-keywords;
|
|
49
51
|
|
|
50
|
-
|
|
52
|
+
border-radius: var(--_shape);
|
|
53
|
+
background-color: var(--_color);
|
|
54
|
+
box-shadow: var(--_elevation);
|
|
55
|
+
border: var(--_border, none);
|
|
56
|
+
opacity: var(--_opacity, 1);
|
|
57
|
+
pointer-events: var(--_pointer-events, auto);
|
|
58
|
+
|
|
59
|
+
&:not(.micl-card--compact):not(:has(>summary)) {
|
|
60
|
+
row-gap: var(--md-comp-card-gap, 8px);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
&[tabindex='0']:not([inert]),
|
|
64
|
+
&:not([inert]) > summary {
|
|
51
65
|
--micl-ripple: 1;
|
|
52
|
-
--statelayer-color: var(--md-sys-color-on-surface);
|
|
53
66
|
|
|
54
67
|
background-image:
|
|
55
68
|
radial-gradient(circle at var(--micl-x, center) var(--micl-y, center), transparent 0%, rgb(from var(--statelayer-color) r g b / calc(var(--statelayer-opacity) / 2)) 10%, transparent 10%),
|
|
@@ -61,37 +74,58 @@
|
|
|
61
74
|
--statelayer-opacity var(--md-sys-card-motion-duration) linear;
|
|
62
75
|
|
|
63
76
|
&:hover {
|
|
64
|
-
--statelayer-
|
|
65
|
-
|
|
66
|
-
|
|
77
|
+
--statelayer-color: var(--_hover-state-color);
|
|
78
|
+
--statelayer-opacity: var(--_hover-state-opacity);
|
|
79
|
+
--_text-color: var(--md-sys-color-on-surface);
|
|
67
80
|
cursor: pointer;
|
|
68
81
|
}
|
|
69
82
|
&:focus-visible {
|
|
70
|
-
--statelayer-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
outline-offset: var(--md-sys-state-focus-indicator-outer-offset, 2px);
|
|
83
|
+
--statelayer-color: var(--_focus-state-color);
|
|
84
|
+
--statelayer-opacity: var(--_focus-state-opacity);
|
|
85
|
+
--_text-color: var(--md-sys-color-on-surface);
|
|
74
86
|
}
|
|
75
87
|
&:active {
|
|
76
|
-
--statelayer-
|
|
77
|
-
|
|
88
|
+
--statelayer-color: var(--_pressed-state-color);
|
|
89
|
+
--statelayer-opacity: var(--_pressed-state-opacity);
|
|
90
|
+
--_text-color: var(--md-sys-color-on-surface);
|
|
78
91
|
background-size: 0%, 100%;
|
|
79
92
|
transition: background-size 0ms;
|
|
80
93
|
}
|
|
81
94
|
&.micl-card--dragging {
|
|
82
|
-
--statelayer-
|
|
83
|
-
|
|
84
|
-
|
|
95
|
+
--statelayer-color: var(--_dragged-state-color);
|
|
96
|
+
--statelayer-opacity: var(--_dragged-state-opacity);
|
|
97
|
+
--_text-color: var(--md-sys-color-on-surface);
|
|
85
98
|
cursor: grabbing;
|
|
86
99
|
}
|
|
100
|
+
|
|
87
101
|
.micl-card__content {
|
|
88
102
|
background-color: transparent;
|
|
89
103
|
}
|
|
90
104
|
}
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
105
|
+
|
|
106
|
+
&[tabindex='0']:not([inert]):hover,
|
|
107
|
+
&:not([tabindex='0']):not([inert]):has(> summary:hover) {
|
|
108
|
+
box-shadow: var(--_hover-elevation);
|
|
109
|
+
border-color: var(--_hover-border-color, var(--_border-color, transparent));
|
|
110
|
+
}
|
|
111
|
+
&[tabindex='0']:not([inert]):focus-visible,
|
|
112
|
+
&:not([tabindex='0']):not([inert]):has(> summary:focus-visible) {
|
|
113
|
+
box-shadow: var(--_focus-elevation);
|
|
114
|
+
border-width: var(--_focus-border-width, var(--_border-width, 0));
|
|
115
|
+
border-color: var(--_focus-border-color, transparent);
|
|
116
|
+
outline: var(--_focus-outline-thickness, 0px) solid var(--_focus-outline-color, transparent);
|
|
117
|
+
outline-offset: var(--_focus-outline-offset, 0px);
|
|
118
|
+
}
|
|
119
|
+
&[tabindex='0']:not([inert]):active,
|
|
120
|
+
&:not([tabindex='0']):not([inert]):has(> summary:active) {
|
|
121
|
+
box-shadow: var(--_pressed-elevation);
|
|
122
|
+
border-color: var(--_pressed-border-color, transparent);
|
|
94
123
|
}
|
|
124
|
+
&[tabindex='0']:not([inert]).micl-card--dragging {
|
|
125
|
+
box-shadow: var(--_dragged-elevation);
|
|
126
|
+
border-color: var(--_dragged-border-color, transparent);
|
|
127
|
+
}
|
|
128
|
+
|
|
95
129
|
&::details-content {
|
|
96
130
|
block-size: 0;
|
|
97
131
|
overflow: hidden;
|
|
@@ -103,101 +137,172 @@
|
|
|
103
137
|
block-size: auto;
|
|
104
138
|
}
|
|
105
139
|
&> summary {
|
|
140
|
+
display: flex;
|
|
141
|
+
flex-direction: column;
|
|
142
|
+
padding-block-end: var(--md-comp-card-content-padding-block, 16px);
|
|
106
143
|
outline: none;
|
|
107
144
|
list-style: none;
|
|
108
145
|
cursor: pointer;
|
|
109
146
|
-webkit-tap-highlight-color: transparent;
|
|
147
|
+
|
|
148
|
+
&:not(.micl-card--compact) {
|
|
149
|
+
row-gap: var(--md-comp-card-gap, 8px);
|
|
150
|
+
}
|
|
110
151
|
}
|
|
111
|
-
|
|
152
|
+
|
|
153
|
+
&.micl-card--compact, summary.micl-card--compact {
|
|
154
|
+
display: grid;
|
|
155
|
+
grid-template-columns: 20% 1fr;
|
|
112
156
|
padding-block-end: 0;
|
|
157
|
+
|
|
158
|
+
.micl-card__image {
|
|
159
|
+
grid-column: 1;
|
|
160
|
+
grid-row: 1 / 5;
|
|
161
|
+
block-size: 100%;
|
|
162
|
+
background-size: cover;
|
|
163
|
+
}
|
|
164
|
+
.micl-card__headline-s, .micl-card__headline-m, .micl-card__headline-l,
|
|
165
|
+
.micl-card__subhead, .micl-card__supporting-text {
|
|
166
|
+
grid-column: 2;
|
|
167
|
+
min-inline-size: 0;
|
|
168
|
+
}
|
|
169
|
+
.micl-card__headline-s, .micl-card__headline-m, .micl-card__headline-l, .micl-card__supporting-text {
|
|
170
|
+
margin-block-start: var(--md-comp-card-gap, 8px);
|
|
171
|
+
}
|
|
172
|
+
.micl-card__subhead {
|
|
173
|
+
margin-block-start: 0;
|
|
174
|
+
}
|
|
175
|
+
.micl-card__content {
|
|
176
|
+
grid-column: 1 / span 2;
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
&:not(:has(.micl-card__content)) > :last-child {
|
|
180
|
+
margin-block-end: var(--md-comp-card-gap, 8px);
|
|
181
|
+
}
|
|
113
182
|
}
|
|
114
183
|
}
|
|
115
184
|
|
|
116
185
|
.micl-card-elevated {
|
|
117
|
-
|
|
118
|
-
|
|
186
|
+
--_shape: var(--md-comp-elevated-card-container-shape, var(--md-sys-shape-corner-medium));
|
|
187
|
+
--_color: var(--md-comp-elevated-card-container-color, var(--md-sys-color-surface-container-low));
|
|
188
|
+
--_elevation: var(--md-comp-elevated-card-container-elevation, var(--md-sys-elevation-level1));
|
|
119
189
|
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
190
|
+
--_hover-state-color: var(--md-comp-elevated-card-hover-state-layer-color, var(--md-sys-color-on-surface));
|
|
191
|
+
--_hover-state-opacity: var(--md-comp-elevated-card-hover-state-layer-opacity, var(--md-sys-state-hover-state-layer-opacity));
|
|
192
|
+
--_hover-elevation: var(--md-comp-elevated-card-hover-container-elevation, var(--md-sys-elevation-level2));
|
|
193
|
+
|
|
194
|
+
--_focus-state-color: var(--md-comp-elevated-card-focus-state-layer-color, var(--md-sys-color-on-surface));
|
|
195
|
+
--_focus-state-opacity: var(--md-comp-elevated-card-focus-state-layer-opacity, var(--md-sys-state-focus-state-layer-opacity));
|
|
196
|
+
--_focus-elevation: var(--md-comp-elevated-card-focus-container-elevation, var(--md-sys-elevation-level1));
|
|
197
|
+
--_focus-outline-thickness: var(--md-comp-elevated-card-focus-indicator-thickness, var(--md-sys-state-focus-indicator-thickness));
|
|
198
|
+
--_focus-outline-color: var(--md-comp-elevated-card-focus-indicator-color, var(--md-sys-color-secondary));
|
|
199
|
+
--_focus-outline-offset: var(--md-comp-elevated-card-focus-indicator-outline-offset, var(--md-sys-state-focus-indicator-outer-offset));
|
|
200
|
+
|
|
201
|
+
--_pressed-state-color: var(--md-comp-elevated-card-pressed-state-layer-color, var(--md-sys-color-on-surface));
|
|
202
|
+
--_pressed-state-opacity: var(--md-comp-elevated-card-pressed-state-layer-opacity, var(--md-sys-state-pressed-state-layer-opacity));
|
|
203
|
+
--_pressed-elevation: var(--md-comp-elevated-card-pressed-container-elevation, var(--md-sys-elevation-level1));
|
|
204
|
+
|
|
205
|
+
--_dragged-state-color: var(--md-comp-elevated-card-dragged-state-layer-color, var(--md-sys-color-on-surface));
|
|
206
|
+
--_dragged-state-opacity: var(--md-comp-elevated-card-dragged-state-layer-opacity, var(--md-sys-state-dragged-state-layer-opacity));
|
|
207
|
+
--_dragged-elevation: var(--md-comp-elevated-card-dragged-container-elevation, var(--md-sys-elevation-level4));
|
|
208
|
+
|
|
209
|
+
&[inert] {
|
|
210
|
+
--_color: var(--md-comp-elevated-card-disabled-container-color, var(--md-sys-color-surface));
|
|
211
|
+
--_elevation: var(--md-comp-elevated-card-disabled-container-elevation, var(--md-sys-elevation-level1));
|
|
212
|
+
--_opacity: var(--md-comp-elevated-card-disabled-container-opacity, var(--md-sys-state-disabled-state-layer-opacity));
|
|
213
|
+
--_pointer-events: none;
|
|
127
214
|
}
|
|
128
215
|
}
|
|
216
|
+
|
|
129
217
|
.micl-card-filled {
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
.micl-card-outlined {
|
|
134
|
-
background-color: var(--md-sys-color-surface);
|
|
135
|
-
box-shadow: var(--md-sys-elevation-level0);
|
|
136
|
-
border: var(--md-sys-card-outlined-border-width) solid var(--md-sys-color-outline-variant);
|
|
218
|
+
--_shape: var(--md-comp-filled-card-container-shape, var(--md-sys-shape-corner-medium));
|
|
219
|
+
--_color: var(--md-comp-filled-card-container-color, var(--md-sys-color-surface-container-highest));
|
|
220
|
+
--_elevation: var(--md-comp-filled-card-container-elevation, var(--md-sys-elevation-level0));
|
|
137
221
|
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
}
|
|
142
|
-
&:active {
|
|
143
|
-
border-color: var(--md-sys-color-outline-variant);
|
|
144
|
-
}
|
|
145
|
-
}
|
|
146
|
-
}
|
|
222
|
+
--_hover-state-color: var(--md-comp-filled-card-hover-state-layer-color, var(--md-sys-color-on-surface));
|
|
223
|
+
--_hover-state-opacity: var(--md-comp-filled-card-hover-state-layer-opacity, var(--md-sys-state-hover-state-layer-opacity));
|
|
224
|
+
--_hover-elevation: var(--md-comp-filled-card-hover-container-elevation, var(--md-sys-elevation-level1));
|
|
147
225
|
|
|
148
|
-
|
|
149
|
-
opacity: var(--md-sys-state-
|
|
150
|
-
|
|
226
|
+
--_focus-state-color: var(--md-comp-filled-card-focus-state-layer-color, var(--md-sys-color-on-surface));
|
|
227
|
+
--_focus-state-opacity: var(--md-comp-filled-card-focus-state-layer-opacity, var(--md-sys-state-focus-state-layer-opacity));
|
|
228
|
+
--_focus-elevation: var(--md-comp-filled-card-focus-container-elevation, var(--md-sys-elevation-level0));
|
|
229
|
+
--_focus-outline-thickness: var(--md-comp-filled-card-focus-indicator-thickness, var(--md-sys-state-focus-indicator-thickness));
|
|
230
|
+
--_focus-outline-color: var(--md-comp-filled-card-focus-indicator-color, var(--md-sys-color-secondary));
|
|
231
|
+
--_focus-outline-offset: var(--md-comp-filled-card-focus-indicator-outline-offset, var(--md-sys-state-focus-indicator-outer-offset));
|
|
151
232
|
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
233
|
+
--_pressed-state-color: var(--md-comp-filled-card-pressed-state-layer-color, var(--md-sys-color-on-surface));
|
|
234
|
+
--_pressed-state-opacity: var(--md-comp-filled-card-pressed-state-layer-opacity, var(--md-sys-state-pressed-state-layer-opacity));
|
|
235
|
+
--_pressed-elevation: var(--md-comp-filled-card-pressed-container-elevation, var(--md-sys-elevation-level0));
|
|
236
|
+
|
|
237
|
+
--_dragged-state-color: var(--md-comp-filled-card-dragged-state-layer-color, var(--md-sys-color-on-surface));
|
|
238
|
+
--_dragged-state-opacity: var(--md-comp-filled-card-dragged-state-layer-opacity, var(--md-sys-state-dragged-state-layer-opacity));
|
|
239
|
+
--_dragged-elevation: var(--md-comp-filled-card-dragged-container-elevation, var(--md-sys-elevation-level3));
|
|
240
|
+
|
|
241
|
+
&[inert] {
|
|
242
|
+
--_color: var(--md-comp-filled-card-disabled-container-color, var(--md-sys-color-surface-variant));
|
|
243
|
+
--_elevation: var(--md-comp-filled-card-disabled-container-elevation, var(--md-sys-elevation-level0));
|
|
244
|
+
--_opacity: var(--md-comp-filled-card-disabled-container-opacity, var(--md-sys-state-disabled-state-layer-opacity));
|
|
245
|
+
--_pointer-events: none;
|
|
161
246
|
}
|
|
162
247
|
}
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
248
|
+
|
|
249
|
+
.micl-card-outlined {
|
|
250
|
+
--_shape: var(--md-comp-outlined-card-container-shape, var(--md-sys-shape-corner-medium));
|
|
251
|
+
--_color: var(--md-comp-outlined-card-container-color, var(--md-sys-color-surface));
|
|
252
|
+
--_elevation: var(--md-comp-outlined-card-container-elevation, var(--md-sys-elevation-level0));
|
|
253
|
+
--_border-width: var(--md-comp-outlined-card-outline-width, 1px);
|
|
254
|
+
--_border: var(--_border-width) solid var(--_border-color, var(--md-comp-outlined-card-outline-color, var(--md-sys-color-outline-variant)));
|
|
255
|
+
|
|
256
|
+
--_hover-state-color: var(--md-comp-outlined-card-hover-state-layer-color, var(--md-sys-color-on-surface));
|
|
257
|
+
--_hover-state-opacity: var(--md-comp-outlined-card-hover-state-layer-opacity, var(--md-sys-state-hover-state-layer-opacity));
|
|
258
|
+
--_hover-elevation: var(--md-comp-outlined-card-hover-container-elevation, var(--md-sys-elevation-level1));
|
|
259
|
+
--_hover-border-color: var(--md-comp-outlined-card-hover-outline-color, var(--md-sys-color-outline-variant));
|
|
260
|
+
|
|
261
|
+
--_focus-state-color: var(--md-comp-outlined-card-focus-state-layer-color, var(--md-sys-color-on-surface));
|
|
262
|
+
--_focus-state-opacity: var(--md-comp-outlined-card-focus-state-layer-opacity, var(--md-sys-state-focus-state-layer-opacity));
|
|
263
|
+
--_focus-elevation: var(--md-comp-outlined-card-focus-container-elevation, var(--md-sys-elevation-level0));
|
|
264
|
+
--_focus-border-color: var(--md-comp-outlined-card-focus-indicator-color, var(--md-sys-color-secondary));
|
|
265
|
+
--_focus-border-width: var(--md-comp-outlined-card-focus-indicator-thickness, --md-sys-state-focus-indicator-thickness);
|
|
266
|
+
|
|
267
|
+
--_pressed-state-color: var(--md-comp-outlined-card-pressed-state-layer-color, var(--md-sys-color-on-surface));
|
|
268
|
+
--_pressed-state-opacity: var(--md-comp-outlined-card-pressed-state-layer-opacity, var(--md-sys-state-pressed-state-layer-opacity));
|
|
269
|
+
--_pressed-elevation: var(--md-comp-outlined-card-pressed-container-elevation, var(--md-sys-elevation-level0));
|
|
270
|
+
--_pressed-border-color: var(--md-comp-outlined-card-pressed-outline-color, var(--md-sys-color-outline-variant));
|
|
271
|
+
|
|
272
|
+
--_dragged-state-color: var(--md-comp-outlined-card-dragged-state-layer-color, var(--md-sys-color-on-surface));
|
|
273
|
+
--_dragged-state-opacity: var(--md-comp-outlined-card-dragged-state-layer-opacity, var(--md-sys-state-dragged-state-layer-opacity));
|
|
274
|
+
--_dragged-elevation: var(--md-comp-outlined-card-dragged-container-elevation, var(--md-sys-elevation-level3));
|
|
275
|
+
--_dragged-border-color: var(--md-comp-outlined-card-dragged-outline-color, var(--md-sys-color-outline-variant));
|
|
276
|
+
|
|
277
|
+
&[inert] {
|
|
278
|
+
--_border-color: rgb(from var(--md-comp-outlined-card-disabled-outline-color, var(--md-sys-color-outline)) r g b / var(--md-comp-outlined-card-disabled-outline-opacity, 12%));
|
|
279
|
+
--_color: var(--md-comp-outlined-card-disabled-container-color, var(--md-sys-color-surface));
|
|
280
|
+
--_elevation: var(--md-comp-outlined-card-disabled-container-elevation, var(--md-sys-elevation-level0));
|
|
281
|
+
--_opacity: var(--md-comp-outlined-card-disabled-container-opacity, var(--md-sys-state-disabled-state-layer-opacity));
|
|
282
|
+
--_pointer-events: none;
|
|
191
283
|
}
|
|
192
284
|
}
|
|
193
285
|
|
|
194
286
|
.micl-card__image {
|
|
195
287
|
display: block;
|
|
196
288
|
inline-size: 100%;
|
|
197
|
-
border-radius: var(--md-sys-shape-corner-medium);
|
|
198
289
|
background-position: center;
|
|
199
290
|
background-repeat: no-repeat;
|
|
200
291
|
background-size: contain;
|
|
292
|
+
border-radius: var(--_shape);
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
.micl-card-elevated,
|
|
296
|
+
.micl-card-filled,
|
|
297
|
+
.micl-card-outlined,
|
|
298
|
+
.micl-card-elevated > summary,
|
|
299
|
+
.micl-card-filled > summary,
|
|
300
|
+
.micl-card-outlined > summary {
|
|
301
|
+
&> .micl-card__headline-s:first-child,
|
|
302
|
+
&> .micl-card__headline-m:first-child,
|
|
303
|
+
&> .micl-card__headline-l:first-child {
|
|
304
|
+
padding-block-start: var(--md-comp-card-content-padding-block, 16px);
|
|
305
|
+
}
|
|
201
306
|
}
|
|
202
307
|
|
|
203
308
|
.micl-card__headline-s,
|
|
@@ -205,18 +310,13 @@
|
|
|
205
310
|
.micl-card__headline-l {
|
|
206
311
|
display: flex;
|
|
207
312
|
align-items: center;
|
|
208
|
-
column-gap: 8px;
|
|
209
|
-
|
|
210
|
-
color: var(--md-sys-color-on-surface-variant);
|
|
211
|
-
|
|
212
|
-
&:first-child {
|
|
213
|
-
padding-block-start: 16px;
|
|
214
|
-
}
|
|
313
|
+
column-gap: var(--md-comp-card-gap, 8px);
|
|
314
|
+
color: var(--_text-color);
|
|
215
315
|
|
|
216
316
|
h1, h2, h3, h4, h5, h6, .micl-heading {
|
|
217
317
|
flex: 1 2 fit-content;
|
|
218
318
|
margin: 0;
|
|
219
|
-
padding-inline: var(--md-
|
|
319
|
+
padding-inline: var(--md-comp-card-padding-inline, 16px);
|
|
220
320
|
overflow: hidden;
|
|
221
321
|
text-overflow: ellipsis;
|
|
222
322
|
white-space: nowrap;
|
|
@@ -229,70 +329,42 @@
|
|
|
229
329
|
margin-block: 0;
|
|
230
330
|
}
|
|
231
331
|
}
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
.micl-card__headline-m
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
.micl-card__headline-l
|
|
243
|
-
|
|
244
|
-
@include typography.headline-large;
|
|
245
|
-
}
|
|
246
|
-
}
|
|
332
|
+
|
|
333
|
+
.micl-card__headline-s h1, .micl-card__headline-s h2, .micl-card__headline-s h3,
|
|
334
|
+
.micl-card__headline-s h4, .micl-card__headline-s h5, .micl-card__headline-s h6,
|
|
335
|
+
.micl-card__headline-s .micl-heading { @include typography.headline-small; }
|
|
336
|
+
|
|
337
|
+
.micl-card__headline-m h1, .micl-card__headline-m h2, .micl-card__headline-m h3,
|
|
338
|
+
.micl-card__headline-m h4, .micl-card__headline-m h5, .micl-card__headline-m h6,
|
|
339
|
+
.micl-card__headline-m .micl-heading { @include typography.headline-medium; }
|
|
340
|
+
|
|
341
|
+
.micl-card__headline-l h1, .micl-card__headline-l h2, .micl-card__headline-l h3,
|
|
342
|
+
.micl-card__headline-l h4, .micl-card__headline-l h5, .micl-card__headline-l h6,
|
|
343
|
+
.micl-card__headline-l .micl-heading { @include typography.headline-large; }
|
|
247
344
|
|
|
248
345
|
.micl-card__subhead {
|
|
249
346
|
@include typography.title-medium;
|
|
250
|
-
|
|
251
347
|
display: block;
|
|
252
|
-
margin: 0;
|
|
253
|
-
padding: 0 var(--md-
|
|
348
|
+
margin: calc(-1 * var(--md-comp-card-gap, 8px)) 0 var(--md-comp-card-gap, 8px) 0;
|
|
349
|
+
padding: 0 var(--md-comp-card-padding-inline, 16px);
|
|
254
350
|
overflow: hidden;
|
|
255
351
|
text-overflow: ellipsis;
|
|
256
352
|
white-space: nowrap;
|
|
257
|
-
color: var(--
|
|
353
|
+
color: var(--_text-color);
|
|
258
354
|
}
|
|
259
355
|
|
|
260
356
|
.micl-card__supporting-text {
|
|
261
357
|
@include typography.body-small;
|
|
262
|
-
|
|
263
358
|
display: block;
|
|
264
359
|
margin: 0;
|
|
265
|
-
padding: 0 var(--md-
|
|
266
|
-
color: var(--
|
|
267
|
-
}
|
|
268
|
-
|
|
269
|
-
.micl-card-elevated[tabindex='0']:not(.micl-card--disabled),
|
|
270
|
-
.micl-card-filled[tabindex='0']:not(.micl-card--disabled),
|
|
271
|
-
.micl-card-outlined[tabindex='0']:not(.micl-card--disabled) {
|
|
272
|
-
&:hover,
|
|
273
|
-
&:focus-visible,
|
|
274
|
-
&:active,
|
|
275
|
-
&.micl-card--dragging {
|
|
276
|
-
.micl-card__headline-s,
|
|
277
|
-
.micl-card__headline-m,
|
|
278
|
-
.micl-card__headline-l {
|
|
279
|
-
color: var(--md-sys-color-on-surface);
|
|
280
|
-
|
|
281
|
-
button {
|
|
282
|
-
color: var(--md-sys-color-on-surface);
|
|
283
|
-
}
|
|
284
|
-
}
|
|
285
|
-
.micl-card__subhead,
|
|
286
|
-
.micl-card__supporting-text {
|
|
287
|
-
color: var(--md-sys-color-on-surface);
|
|
288
|
-
}
|
|
289
|
-
}
|
|
360
|
+
padding: 0 var(--md-comp-card-padding-inline, 16px);
|
|
361
|
+
color: var(--_text-color);
|
|
290
362
|
}
|
|
291
363
|
|
|
292
364
|
.micl-card__content {
|
|
293
365
|
box-sizing: border-box;
|
|
294
|
-
padding-block: var(--md-
|
|
295
|
-
padding-inline: var(--md-
|
|
366
|
+
padding-block: var(--md-comp-card-content-padding-block, 16px);
|
|
367
|
+
padding-inline: var(--md-comp-card-padding-inline, 16px);
|
|
296
368
|
background-color: inherit;
|
|
297
369
|
overflow: clip visible;
|
|
298
370
|
}
|
|
@@ -12,7 +12,7 @@ The Date Picker component is an extension of the [**Dialog** component](../dialo
|
|
|
12
12
|
<div class="micl-dialog__headline">
|
|
13
13
|
<h2 id="mytitle">Enter date</h2>
|
|
14
14
|
<span class="micl-dialog__supporting-text">Select date</span>
|
|
15
|
-
<button type="button" class="micl-datepicker__inputmode micl-iconbutton-standard-s material-symbols-outlined" data-
|
|
15
|
+
<button type="button" id="btn" class="micl-datepicker__inputmode micl-iconbutton-standard-s micl-button--toggle material-symbols-outlined" commandfor="btn" command="--micl-toggle" data-miclicon="edit" data-micliconselected="calendar_today"></button>
|
|
16
16
|
<hr class="micl-divider">
|
|
17
17
|
<div class="micl-datepicker__month-selector">
|
|
18
18
|
<button type="button" class="micl-datepicker__previous micl-iconbutton-standard-xs material-symbols-outlined" aria-label="Previous month">chevron_left</button>
|
|
@@ -109,7 +109,8 @@ Any item not required for your implementation may be omitted.
|
|
|
109
109
|
To allow users to toggle between the calendar view and the manual date input, add an icon button to the `micl-dialog__headline` area:
|
|
110
110
|
|
|
111
111
|
- Class: `micl-datepicker__inputmode`
|
|
112
|
-
- Data Attribute: `data-
|
|
112
|
+
- Data Attribute: `data-miclicon="edit"` (defines the icon to show).
|
|
113
|
+
- Data Attribute: `data-micliconselected="calendar_today"` (defines the icon to show when toggled).
|
|
113
114
|
|
|
114
115
|
### Integration
|
|
115
116
|
You can trigger the Date picker component from standard input fields or buttons.
|
|
@@ -432,14 +432,6 @@ const toggleView = (dialog: HTMLDialogElement, view: 'calendars' | 'months' | 'y
|
|
|
432
432
|
period.classList.toggle('micl-datepicker__view-hidden', doHide);
|
|
433
433
|
}
|
|
434
434
|
});
|
|
435
|
-
|
|
436
|
-
const mode = dialog.querySelector<HTMLElement>('.micl-datepicker__inputmode[data-miclalt]');
|
|
437
|
-
if (mode) {
|
|
438
|
-
if (!mode.dataset.miclalticon) {
|
|
439
|
-
mode.dataset.miclalticon = mode.textContent;
|
|
440
|
-
}
|
|
441
|
-
mode.textContent = (view === 'input' ? mode.dataset.miclalt : mode.dataset.miclalticon) || '';
|
|
442
|
-
}
|
|
443
435
|
};
|
|
444
436
|
|
|
445
437
|
const changePeriod = (dialog: HTMLDialogElement, amount: number, unit: 'month' | 'year'): void =>
|
|
@@ -79,6 +79,17 @@ A toggle button has two states: **on** (selected) and **off** (unselected). To c
|
|
|
79
79
|
|
|
80
80
|
The self-targeting `command` property (`--micl-toggle`) toggles the button state whenever the user interacts with the button.
|
|
81
81
|
|
|
82
|
+
To use different icons for the **on** state and the **off** state, remove the icon name from the button and add the `data-miclicon` (the name of the **on** icon) and `data-micliconselected` (the name of the **off** icon) attributes:
|
|
83
|
+
|
|
84
|
+
```HTML
|
|
85
|
+
...
|
|
86
|
+
data-miclicon="icon_for_on"
|
|
87
|
+
data-micliconselected="icon_for_off"
|
|
88
|
+
></button>
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
Note that the name of the currently used icon is also added to the `class` attribute to support icon libraries using class names to identify icons.
|
|
92
|
+
|
|
82
93
|
## Icons
|
|
83
94
|
The examples above use [Google Material Symbols](https://fonts.google.com/icons). For buttons using these icons, a fill-style of `1` is applied when the button is active or hovered over. To enable this effect, ensure your `link` tag includes `FILL@0..1`.
|
|
84
95
|
|
|
@@ -95,6 +95,12 @@ button.micl-iconbutton-outlined-xl {
|
|
|
95
95
|
&.micl-button--toggle.micl-button--selected {
|
|
96
96
|
font-variation-settings: 'FILL' 1;
|
|
97
97
|
}
|
|
98
|
+
&.micl-button--toggle:not(.micl-button--selected)::before {
|
|
99
|
+
content: attr(data-miclicon);
|
|
100
|
+
}
|
|
101
|
+
&.micl-button--toggle.micl-button--selected::before {
|
|
102
|
+
content: attr(data-micliconselected);
|
|
103
|
+
}
|
|
98
104
|
}
|
|
99
105
|
|
|
100
106
|
button.micl-iconbutton-standard-xs,
|
|
@@ -114,6 +120,9 @@ button.micl-iconbutton-outlined-xs {
|
|
|
114
120
|
&::before {
|
|
115
121
|
content: "";
|
|
116
122
|
position: absolute;
|
|
123
|
+
display: flex;
|
|
124
|
+
align-items: center;
|
|
125
|
+
justify-content: center;
|
|
117
126
|
block-size: var(--md-sys-target-size, 48px);
|
|
118
127
|
inline-size: 100%;
|
|
119
128
|
min-inline-size: var(--md-sys-target-size, 48px);
|
|
@@ -162,6 +171,9 @@ button.micl-iconbutton-outlined-s {
|
|
|
162
171
|
&::before {
|
|
163
172
|
content: "";
|
|
164
173
|
position: absolute;
|
|
174
|
+
display: flex;
|
|
175
|
+
align-items: center;
|
|
176
|
+
justify-content: center;
|
|
165
177
|
block-size: var(--md-sys-target-size, 48px);
|
|
166
178
|
inline-size: 100%;
|
|
167
179
|
min-inline-size: var(--md-sys-target-size, 48px);
|
|
@@ -21,6 +21,17 @@
|
|
|
21
21
|
|
|
22
22
|
export const buttonSelector = 'button.micl-button--toggle';
|
|
23
23
|
|
|
24
|
+
const toggleIcon = (button: HTMLButtonElement): void =>
|
|
25
|
+
{
|
|
26
|
+
const selected = button.classList.contains('micl-button--selected');
|
|
27
|
+
if (button.dataset.micliconselected) {
|
|
28
|
+
button.classList.toggle(button.dataset.micliconselected, selected);
|
|
29
|
+
}
|
|
30
|
+
if (button.dataset.miclicon) {
|
|
31
|
+
button.classList.toggle(button.dataset.miclicon, !selected);
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
|
|
24
35
|
export default (() =>
|
|
25
36
|
{
|
|
26
37
|
return {
|
|
@@ -35,6 +46,8 @@ export default (() =>
|
|
|
35
46
|
) {
|
|
36
47
|
target.classList.add('micl-button--toggled');
|
|
37
48
|
target.classList.toggle('micl-button--selected');
|
|
49
|
+
|
|
50
|
+
toggleIcon(target);
|
|
38
51
|
}
|
|
39
52
|
},
|
|
40
53
|
|
|
@@ -48,6 +61,8 @@ export default (() =>
|
|
|
48
61
|
}
|
|
49
62
|
element.dataset.miclinitialized = '1';
|
|
50
63
|
|
|
64
|
+
toggleIcon(element);
|
|
65
|
+
|
|
51
66
|
element.addEventListener('command', this.command);
|
|
52
67
|
},
|
|
53
68
|
|
|
@@ -71,7 +71,6 @@
|
|
|
71
71
|
&> summary.micl-list-item-two,
|
|
72
72
|
&> summary.micl-list-item-three {
|
|
73
73
|
position: relative;
|
|
74
|
-
-webkit-tap-highlight-color: transparent;
|
|
75
74
|
|
|
76
75
|
&::-webkit-details-marker {
|
|
77
76
|
display: none;
|
|
@@ -153,6 +152,7 @@ select {
|
|
|
153
152
|
transition:
|
|
154
153
|
background-size 3000ms,
|
|
155
154
|
--statelayer-opacity var(--md-sys-list-motion-duration) linear;
|
|
155
|
+
-webkit-tap-highlight-color: transparent;
|
|
156
156
|
|
|
157
157
|
&:not(:has(> button)) {
|
|
158
158
|
--micl-ripple: 1;
|