material-inspired-component-library 6.0.7 → 7.0.1

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.
Files changed (55) hide show
  1. package/README.md +11 -2
  2. package/components/accordion/README.md +4 -6
  3. package/components/appbar/index.scss +4 -4
  4. package/components/button/README.md +16 -1
  5. package/components/button/index.scss +6 -0
  6. package/components/button/index.ts +17 -0
  7. package/components/card/README.md +84 -11
  8. package/components/card/index.scss +178 -209
  9. package/components/checkbox/index.scss +4 -0
  10. package/components/datepicker/README.md +3 -2
  11. package/components/datepicker/index.ts +0 -8
  12. package/components/dialog/README.md +7 -7
  13. package/components/iconbutton/README.md +11 -0
  14. package/components/iconbutton/index.scss +12 -0
  15. package/components/iconbutton/index.ts +15 -0
  16. package/components/navigationrail/README.md +64 -59
  17. package/components/navigationrail/index.scss +197 -300
  18. package/components/navigationrail/index.ts +55 -38
  19. package/components/radio/index.scss +4 -0
  20. package/components/select/index.scss +14 -14
  21. package/components/snackbar/README.md +126 -0
  22. package/components/snackbar/index.scss +94 -73
  23. package/components/snackbar/index.ts +90 -28
  24. package/components/textfield/index.scss +6 -0
  25. package/components/timepicker/README.md +2 -1
  26. package/components/timepicker/index.ts +0 -3
  27. package/dist/appbar.css +1 -1
  28. package/dist/button.css +1 -1
  29. package/dist/card.css +1 -1
  30. package/dist/checkbox.css +1 -1
  31. package/dist/components/navigationrail/index.d.ts +2 -1
  32. package/dist/components/snackbar/index.d.ts +1 -0
  33. package/dist/iconbutton.css +1 -1
  34. package/dist/micl.css +1 -1
  35. package/dist/micl.js +1 -1
  36. package/dist/navigationrail.css +1 -1
  37. package/dist/radio.css +1 -1
  38. package/dist/select.css +1 -1
  39. package/dist/snackbar.css +1 -1
  40. package/dist/textfield.css +1 -1
  41. package/docs/accordion.html +10 -10
  42. package/docs/button.html +43 -15
  43. package/docs/card.html +6 -5
  44. package/docs/datepicker.html +4 -4
  45. package/docs/dialog.html +17 -19
  46. package/docs/iconbutton.html +22 -8
  47. package/docs/index.html +31 -18
  48. package/docs/micl.css +1 -1
  49. package/docs/micl.js +1 -1
  50. package/docs/navigationrail.html +76 -22
  51. package/docs/snackbar.html +31 -14
  52. package/docs/timepicker.html +12 -3
  53. package/package.json +4 -4
  54. package/docs/snackbar1.html +0 -159
  55. package/docs/snackbar2.html +0 -159
@@ -31,46 +31,6 @@
31
31
  --md-comp-card-margin: 8px;
32
32
  --md-comp-card-padding-inline: 16px;
33
33
  --md-comp-card-content-padding-block: 16px;
34
- --md-comp-elevated-card-container-shape: var(--md-sys-shape-corner-medium);
35
- --md-comp-elevated-card-disabled-container-opacity: 38%;
36
- --md-comp-elevated-card-container-elevation: var(--md-sys-elevation-level1);
37
- --md-comp-elevated-card-disabled-container-elevation: var(--md-sys-elevation-level1);
38
- --md-comp-elevated-card-hover-container-elevation: var(--md-sys-elevation-level2);
39
- --md-comp-elevated-card-focus-container-elevation: var(--md-sys-elevation-level1);
40
- --md-comp-elevated-card-pressed-container-elevation: var(--md-sys-elevation-level1);
41
- --md-comp-elevated-card-dragged-container-elevation: var(--md-sys-elevation-level4);
42
- --md-comp-filled-card-container-shape: var(--md-sys-shape-corner-medium);
43
- --md-comp-filled-card-disabled-container-opacity: 38%;
44
- --md-comp-filled-card-container-elevation: var(--md-sys-elevation-level0);
45
- --md-comp-filled-card-disabled-container-elevation: var(--md-sys-elevation-level0);
46
- --md-comp-filled-card-hover-container-elevation: var(--md-sys-elevation-level1);
47
- --md-comp-filled-card-focus-container-elevation: var(--md-sys-elevation-level0);
48
- --md-comp-filled-card-pressed-container-elevation: var(--md-sys-elevation-level0);
49
- --md-comp-filled-card-dragged-container-elevation: var(--md-sys-elevation-level3);
50
- --md-comp-outlined-card-container-shape: var(--md-sys-shape-corner-medium);
51
- --md-comp-outlined-card-disabled-container-opacity: 38%;
52
- --md-comp-outlined-card-container-elevation: var(--md-sys-elevation-level0);
53
- --md-comp-outlined-card-disabled-container-elevation: var(--md-sys-elevation-level0);
54
- --md-comp-outlined-card-hover-container-elevation: var(--md-sys-elevation-level1);
55
- --md-comp-outlined-card-focus-container-elevation: var(--md-sys-elevation-level0);
56
- --md-comp-outlined-card-pressed-container-elevation: var(--md-sys-elevation-level0);
57
- --md-comp-outlined-card-dragged-container-elevation: var(--md-sys-elevation-level3);
58
- --md-comp-outlined-card-outline-width: 1px;
59
- --md-comp-outlined-card-disabled-outline-opacity: 12%;
60
- }
61
- body {
62
- --md-comp-elevated-card-container-color: var(--md-sys-color-surface-container-low);
63
- --md-comp-elevated-card-disabled-container-color: var(--md-sys-color-surface);
64
- --md-comp-filled-card-container-color: var(--md-sys-color-surface-container-highest);
65
- --md-comp-filled-card-disabled-container-color: var(--md-sys-color-surface-variant);
66
- --md-comp-outlined-card-container-color: var(--md-sys-color-surface);
67
- --md-comp-outlined-card-disabled-container-color: var(--md-sys-color-surface);
68
- --md-comp-outlined-card-outline-color: var(--md-sys-color-outline-variant);
69
- --md-comp-outlined-card-disabled-outline-color: var(--md-sys-color-outline);
70
- --md-comp-outlined-card-hover-outline-color: var(--md-sys-color-outline-variant);
71
- --md-comp-outlined-card-focus-outline-color: var(--md-sys-color-on-surface);
72
- --md-comp-outlined-card-pressed-outline-color: var(--md-sys-color-outline-variant);
73
- --md-comp-outlined-card-dragged-outline-color: var(--md-sys-color-outline-variant);
74
34
  }
75
35
 
76
36
  .micl-card-elevated,
@@ -79,6 +39,8 @@ body {
79
39
  --md-sys-card-motion-spatial: #{motion.$md-sys-motion-expressive-default-spatial};
80
40
  --md-sys-card-motion-duration: #{motion.$md-sys-motion-expressive-default-spatial-duration};
81
41
 
42
+ --_text-color: var(--md-sys-color-on-surface-variant);
43
+
82
44
  display: flex;
83
45
  flex-direction: column;
84
46
  block-size: fit-content;
@@ -87,14 +49,20 @@ body {
87
49
  overflow: hidden;
88
50
  interpolate-size: allow-keywords;
89
51
 
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
+
90
59
  &:not(.micl-card--compact):not(:has(>summary)) {
91
60
  row-gap: var(--md-comp-card-gap, 8px);
92
61
  }
93
62
 
94
- &[tabindex='0']:not(.micl-card--disabled),
95
- &:not(.micl-card--disabled) > summary {
63
+ &[tabindex='0']:not([inert]),
64
+ &:not([inert]) > summary {
96
65
  --micl-ripple: 1;
97
- --statelayer-color: var(--md-sys-color-on-surface);
98
66
 
99
67
  background-image:
100
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%),
@@ -106,35 +74,58 @@ body {
106
74
  --statelayer-opacity var(--md-sys-card-motion-duration) linear;
107
75
 
108
76
  &:hover {
109
- --statelayer-opacity: var(--md-sys-state-hover-state-layer-opacity, 8%);
110
-
77
+ --statelayer-color: var(--_hover-state-color);
78
+ --statelayer-opacity: var(--_hover-state-opacity);
79
+ --_text-color: var(--md-sys-color-on-surface);
111
80
  cursor: pointer;
112
81
  }
113
82
  &:focus-visible {
114
- --statelayer-opacity: var(--md-sys-state-focus-state-layer-opacity, 10%);
115
-
116
- outline: var(--md-sys-state-focus-indicator-thickness, 3px) solid var(--md-sys-color-secondary);
117
- 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);
118
86
  }
119
87
  &:active {
120
- --statelayer-opacity: var(--md-sys-state-pressed-state-layer-opacity, 10%);
121
-
88
+ --statelayer-color: var(--_pressed-state-color);
89
+ --statelayer-opacity: var(--_pressed-state-opacity);
90
+ --_text-color: var(--md-sys-color-on-surface);
122
91
  background-size: 0%, 100%;
123
92
  transition: background-size 0ms;
124
93
  }
125
94
  &.micl-card--dragging {
126
- --statelayer-opacity: var(--md-sys-state-dragged-state-layer-opacity, 16%);
127
-
95
+ --statelayer-color: var(--_dragged-state-color);
96
+ --statelayer-opacity: var(--_dragged-state-opacity);
97
+ --_text-color: var(--md-sys-color-on-surface);
128
98
  cursor: grabbing;
129
99
  }
100
+
130
101
  .micl-card__content {
131
102
  background-color: transparent;
132
103
  }
133
104
  }
134
- &:not([tabindex='0']):not(.micl-card--disabled):has(> summary:focus-visible) {
135
- outline: var(--md-sys-state-focus-indicator-thickness, 3px) solid var(--md-sys-color-secondary);
136
- outline-offset: var(--md-sys-state-focus-indicator-outer-offset, 2px);
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);
137
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
+
138
129
  &::details-content {
139
130
  block-size: 0;
140
131
  overflow: hidden;
@@ -170,117 +161,125 @@ body {
170
161
  block-size: 100%;
171
162
  background-size: cover;
172
163
  }
173
- .micl-card__headline-s,
174
- .micl-card__headline-m,
175
- .micl-card__headline-l {
164
+ .micl-card__headline-s, .micl-card__headline-m, .micl-card__headline-l,
165
+ .micl-card__subhead, .micl-card__supporting-text {
176
166
  grid-column: 2;
177
167
  min-inline-size: 0;
178
- margin-block-start: var(--md-comp-card-gap, 8px);
179
168
  }
180
- .micl-card__subhead,
181
- .micl-card__supporting-text {
182
- grid-column: 2;
183
- min-inline-size: 0;
169
+ .micl-card__headline-s, .micl-card__headline-m, .micl-card__headline-l, .micl-card__supporting-text {
184
170
  margin-block-start: var(--md-comp-card-gap, 8px);
185
171
  }
172
+ .micl-card__subhead {
173
+ margin-block-start: 0;
174
+ }
186
175
  .micl-card__content {
187
176
  grid-column: 1 / span 2;
188
177
  }
189
- &:not(:has(.micl-card__content)) {
190
- & > :last-child {
191
- margin-block-end: var(--md-comp-card-gap, 8px);
192
- }
193
- }
194
- }
195
- }
196
178
 
197
- .micl-card-elevated {
198
- border-radius: var(--md-comp-elevated-card-container-shape, var(--md-sys-shape-corner-medium));
199
- background-color: var(--md-comp-elevated-card-container-color, var(--md-sys-color-surface-container-low));
200
- box-shadow: var(--md-comp-elevated-card-container-elevation, var(--md-sys-elevation-level1));
201
-
202
- &[tabindex='0']:not(.micl-card--disabled),
203
- &:not(.micl-card--disabled) > summary {
204
- &:hover {
205
- box-shadow: var(--md-comp-elevated-card-hover-container-elevation, var(--md-sys-elevation-level2));
206
- }
207
- &:focus-visible {
208
- box-shadow: var(--md-comp-elevated-card-focus-container-elevation, var(--md-sys-elevation-level1));
209
- }
210
- &:active {
211
- box-shadow: var(--md-comp-elevated-card-pressed-container-elevation, var(--md-sys-elevation-level1));
212
- }
213
- &.micl-card--dragging {
214
- box-shadow: var(--md-comp-elevated-card-dragged-container-elevation, var(--md-sys-elevation-level4));
179
+ &:not(:has(.micl-card__content)) > :last-child {
180
+ margin-block-end: var(--md-comp-card-gap, 8px);
215
181
  }
216
182
  }
217
183
  }
218
- .micl-card-filled {
219
- border-radius: var(--md-comp-filled-card-container-shape, var(--md-sys-shape-corner-medium));
220
- background-color: var(--md-comp-filled-card-container-color, var(--md-sys-color-surface-container-highest));
221
- box-shadow: var(--md-comp-filled-card-container-elevation, var(--md-sys-elevation-level0));
222
184
 
223
- &[tabindex='0']:not(.micl-card--disabled),
224
- &:not(.micl-card--disabled) > summary {
225
- &:hover {
226
- box-shadow: var(--md-comp-filled-card-hover-container-elevation, var(--md-sys-elevation-level1));
227
- }
228
- &:focus-visible {
229
- box-shadow: var(--md-comp-filled-card-focus-container-elevation, var(--md-sys-elevation-level0));
230
- }
231
- &:active {
232
- box-shadow: var(--md-comp-filled-card-pressed-container-elevation, var(--md-sys-elevation-level0));
233
- }
234
- &.micl-card--dragging {
235
- box-shadow: var(--md-comp-filled-card-dragged-container-elevation, var(--md-sys-elevation-level3));
236
- }
185
+ .micl-card-elevated {
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));
189
+
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;
237
214
  }
238
215
  }
239
- .micl-card-outlined {
240
- border-radius: var(--md-comp-outlined-card-container-shape, var(--md-sys-shape-corner-medium));
241
- background-color: var(--md-comp-outlined-card-container-color, var(--md-sys-color-surface));
242
- box-shadow: var(--md-comp-outlined-card-container-elevation, var(--md-sys-elevation-level0));
243
- border: var(--md-comp-outlined-card-outline-width, 1px) solid var(--md-comp-outlined-card-outline-color, var(--md-sys-color-outline-variant));
244
216
 
245
- &[tabindex='0']:not(.micl-card--disabled),
246
- &:not(.micl-card--disabled) > summary {
247
- &:hover {
248
- border-color: var(--md-comp-outlined-card-hover-outline-color, var(--md-sys-color-outline-variant));
249
- box-shadow: var(--md-comp-outlined-card-hover-container-elevation, var(--md-sys-elevation-level1));
250
- }
251
- &:focus-visible {
252
- border-color: var(--md-comp-outlined-card-focus-outline-color, var(--md-sys-color-on-surface));
253
- box-shadow: var(--md-comp-outlined-card-focus-container-elevation, var(--md-sys-elevation-level0));
254
- }
255
- &:active {
256
- border-color: var(--md-comp-outlined-card-pressed-outline-color, var(--md-sys-color-outline-variant));
257
- box-shadow: var(--md-comp-outlined-card-pressed-container-elevation, var(--md-sys-elevation-level0));
258
- }
259
- &.micl-card--dragging {
260
- border-color: var(--md-comp-outlined-card-dragged-outline-color, var(--md-sys-color-outline-variant));
261
- box-shadow: var(--md-comp-outlined-card-dragged-container-elevation, var(--md-sys-elevation-level3));
262
- }
217
+ .micl-card-filled {
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));
221
+
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));
225
+
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));
232
+
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;
263
246
  }
264
247
  }
265
248
 
266
- .micl-card--disabled {
267
- pointer-events: none;
268
-
269
- &.micl-card-elevated {
270
- background-color: var(--md-comp-elevated-card-disabled-container-color, var(--md-sys-color-surface));
271
- box-shadow: var(--md-comp-elevated-card-disabled-container-elevation, var(--md-sys-elevation-level1));
272
- opacity: var(--md-comp-elevated-card-disabled-container-opacity, var(--md-sys-state-disabled-state-layer-opacity));
273
- }
274
- &.micl-card-filled {
275
- background-color: var(--md-comp-filled-card-disabled-container-color, var(--md-sys-color-surface-variant));
276
- box-shadow: var(--md-comp-filled-card-disabled-container-elevation, var(--md-sys-elevation-level0));
277
- opacity: var(--md-comp-filled-card-disabled-container-opacity, var(--md-sys-state-disabled-state-layer-opacity));
278
- }
279
- &.micl-card-outlined {
280
- 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%));
281
- background-color: var(--md-comp-outlined-card-disabled-container-color, var(--md-sys-color-surface));
282
- box-shadow: var(--md-comp-outlined-card-container-elevation, var(--md-sys-elevation-level0));
283
- opacity: var(--md-comp-outlined-card-disabled-container-opacity, var(--md-sys-state-disabled-state-layer-opacity));
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;
284
283
  }
285
284
  }
286
285
 
@@ -290,15 +289,7 @@ body {
290
289
  background-position: center;
291
290
  background-repeat: no-repeat;
292
291
  background-size: contain;
293
- }
294
- .micl-card-elevated .micl-card__image {
295
- border-radius: var(--md-comp-elevated-card-container-shape, var(--md-sys-shape-corner-medium));
296
- }
297
- .micl-card-filled .micl-card__image {
298
- border-radius: var(--md-comp-filled-card-container-shape, var(--md-sys-shape-corner-medium));
299
- }
300
- .micl-card-outlined .micl-card__image {
301
- border-radius: var(--md-comp-outlined-card-container-shape, var(--md-sys-shape-corner-medium));
292
+ border-radius: var(--_shape);
302
293
  }
303
294
 
304
295
  .micl-card-elevated,
@@ -320,12 +311,12 @@ body {
320
311
  display: flex;
321
312
  align-items: center;
322
313
  column-gap: var(--md-comp-card-gap, 8px);
323
- color: var(--md-sys-color-on-surface-variant);
314
+ color: var(--_text-color);
324
315
 
325
316
  h1, h2, h3, h4, h5, h6, .micl-heading {
326
317
  flex: 1 2 fit-content;
327
318
  margin: 0;
328
- padding-inline: var(--md-comp-card-padding-inline);
319
+ padding-inline: var(--md-comp-card-padding-inline, 16px);
329
320
  overflow: hidden;
330
321
  text-overflow: ellipsis;
331
322
  white-space: nowrap;
@@ -338,73 +329,51 @@ body {
338
329
  margin-block: 0;
339
330
  }
340
331
  }
341
- .micl-card__headline-s {
342
- h1, h2, h3, h4, h5, h6, .micl-heading {
343
- @include typography.headline-small;
344
- }
345
- }
346
- .micl-card__headline-m {
347
- h1, h2, h3, h4, h5, h6, .micl-heading {
348
- @include typography.headline-medium;
349
- }
350
- }
351
- .micl-card__headline-l {
352
- h1, h2, h3, h4, h5, h6, .micl-heading {
353
- @include typography.headline-large;
354
- }
355
- }
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; }
356
344
 
357
345
  .micl-card__subhead {
358
346
  @include typography.title-medium;
359
-
360
347
  display: block;
361
- margin: 0;
362
- padding: 0 var(--md-comp-card-padding-inline);
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);
363
350
  overflow: hidden;
364
351
  text-overflow: ellipsis;
365
352
  white-space: nowrap;
366
- color: var(--md-sys-color-on-surface-variant);
353
+ color: var(--_text-color);
367
354
  }
368
355
 
369
356
  .micl-card__supporting-text {
370
357
  @include typography.body-small;
371
-
372
358
  display: block;
373
359
  margin: 0;
374
- padding: 0 var(--md-comp-card-padding-inline);
375
- color: var(--md-sys-color-on-surface-variant);
376
- }
377
-
378
- .micl-card-elevated[tabindex='0']:not(.micl-card--disabled),
379
- .micl-card-filled[tabindex='0']:not(.micl-card--disabled),
380
- .micl-card-outlined[tabindex='0']:not(.micl-card--disabled),
381
- .micl-card-elevated:not(.micl-card--disabled) > summary,
382
- .micl-card-filled:not(.micl-card--disabled) > summary,
383
- .micl-card-outlined:not(.micl-card--disabled) > summary {
384
- &:hover,
385
- &:focus-visible,
386
- &:active,
387
- &.micl-card--dragging {
388
- .micl-card__headline-s,
389
- .micl-card__headline-m,
390
- .micl-card__headline-l {
391
- color: var(--md-sys-color-on-surface);
392
-
393
- button {
394
- color: var(--md-sys-color-on-surface);
395
- }
396
- }
397
- .micl-card__subhead,
398
- .micl-card__supporting-text {
399
- color: var(--md-sys-color-on-surface);
400
- }
401
- }
360
+ padding: 0 var(--md-comp-card-padding-inline, 16px);
361
+ color: var(--_text-color);
402
362
  }
403
363
 
404
364
  .micl-card__content {
405
365
  box-sizing: border-box;
406
- padding-block: var(--md-comp-card-content-padding-block);
407
- padding-inline: var(--md-comp-card-padding-inline);
366
+ padding-block: var(--md-comp-card-content-padding-block, 16px);
367
+ padding-inline: var(--md-comp-card-padding-inline, 16px);
408
368
  background-color: inherit;
409
369
  overflow: clip visible;
410
370
  }
371
+
372
+ .micl-card__actions {
373
+ box-sizing: border-box;
374
+ display: flex;
375
+ flex-shrink: 0;
376
+ column-gap: 8px;
377
+ padding-block: 0 var(--md-comp-card-content-padding-block, 16px);
378
+ padding-inline: var(--md-comp-card-padding-inline, 16px);
379
+ }
@@ -226,6 +226,10 @@ input[type=checkbox].micl-checkbox + label,
226
226
  label:has(+ input[type=checkbox].micl-checkbox) {
227
227
  color: var(--md-sys-color-on-surface);
228
228
  }
229
+ input[type=checkbox].micl-checkbox:disabled + label,
230
+ label:has(+ input[type=radio].micl-checkbox:disabled) {
231
+ opacity: var(--md-sys-state-disabled-state-layer-opacity, 38%)
232
+ }
229
233
 
230
234
  [dir=rtl] input[type=checkbox].micl-checkbox {
231
235
  &::before {
@@ -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-miclalt="calendar_today">edit</button>
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-miclalt="calendar_today"` (defines the icon to show when toggled).
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 =>
@@ -7,7 +7,7 @@ This component implements the [Material Design 3 Expressive Dialog](https://m3.m
7
7
  To create a basic dialog, use the `<dialog>` element with the `micl-dialog` class. You can open and close the dialog using JavaScript, or you can use a control element, such as a button, to open and close the dialog.
8
8
 
9
9
  ```HTML
10
- <dialog id="mydialog" class="micl-dialog" popover closedby="any" role="alertdialog" aria-labelledby="mytitle" aria-describedby="mydesc">
10
+ <dialog id="mydialog" class="micl-dialog" popover closedby="any" aria-labelledby="mytitle" aria-describedby="mydesc">
11
11
  <div class="micl-dialog__headline">
12
12
  <h2 id="mytitle">Basic dialog</h2>
13
13
  <span id="mydesc" class="micl-dialog__supporting-text">An example of a basic dialog</span>
@@ -53,8 +53,8 @@ Removing the `popover` attribute creates a more intrusive **modal** dialog. This
53
53
  </div>
54
54
  <div class="micl-dialog__actions">
55
55
  <form method="dialog">
56
- <button class="micl-button-text-s">Cancel</button>
57
- <button class="micl-button-text-s">Save</button>
56
+ <button class="micl-button-text-s" autofocus>Cancel</button>
57
+ <button class="micl-button-text-s" value="save">Save</button>
58
58
  </form>
59
59
  </div>
60
60
  </dialog>
@@ -94,9 +94,9 @@ A dialog typically consists of three main sections to organize its content:
94
94
  A full-screen dialog covers the entire viewport, primarily on smaller screens. On screens wider than 560 pixels, a full-screen dialog behaves like a basic dialog. Use the `micl-dialog--fullscreen` modifier class for this variant:
95
95
 
96
96
  ```HTML
97
- <dialog id="mydialog" class="micl-dialog micl-dialog--fullscreen" closedby="none" popover aria-labelledby="mytitle" aria-describedby="mydesc">
97
+ <dialog id="mydialog" class="micl-dialog micl-dialog--fullscreen" closedby="none" aria-labelledby="mytitle" aria-describedby="mydesc">
98
98
  <form method="dialog" class="micl-dialog__headline">
99
- <button type="button" class="micl-dialog__fullscreen micl-iconbutton-s material-symbols-outlined" popovertarget="mydialog" aria-label="Close">close</button>
99
+ <button class="micl-dialog__fullscreen micl-iconbutton-standard-s material-symbols-outlined" aria-label="Close">close</button>
100
100
  <span class="micl-dialog__icon material-symbols-outlined" aria-hidden="true">person</span>
101
101
  <h2 id="mytitle">Full-screen dialog</h2>
102
102
  <button class="micl-dialog__fullscreen micl-button-text-s" value="dosave">Save</button>
@@ -105,12 +105,12 @@ A full-screen dialog covers the entire viewport, primarily on smaller screens. O
105
105
  <span id="mydesc" class="micl-dialog__supporting-text">This dialog covers the whole screen.</span>
106
106
  </div>
107
107
  <form method="dialog" class="micl-dialog__actions">
108
- <button type="button" class="micl-button-text-s" popovertarget="mydialog">Cancel</button>
108
+ <button class="micl-button-text-s" autofocus>Cancel</button>
109
109
  <button class="micl-button-text-s" value="dosave">Save</button>
110
110
  </form>
111
111
  </dialog>
112
112
 
113
- <button type="button" popovertarget="mydialog">Open Full-Screen Dialog</button>
113
+ <button type="button" command="show-modal" commandfor="mydialog">Open Full-Screen Dialog</button>
114
114
  ```
115
115
 
116
116
  - In full-screen mode, `micl-dialog__fullscreen` buttons placed directly within the `micl-dialog__headline` become visible, while the `micl-dialog__icon` and `micl-dialog__actions` at the bottom are hidden.
@@ -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