material-inspired-component-library 8.0.4 → 8.1.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.
- package/.claude/settings.local.json +4 -1
- package/CLAUDE.md +53 -0
- package/README.md +4 -0
- package/components/alert/index.scss +2 -2
- package/components/appbar/index.scss +2 -2
- package/components/bottomsheet/index.scss +3 -3
- package/components/button/README.md +68 -10
- package/components/button/index.scss +99 -179
- package/components/button/index.ts +4 -4
- package/components/card/index.scss +3 -3
- package/components/checkbox/index.scss +2 -2
- package/components/datepicker/index.scss +3 -3
- package/components/dialog/index.scss +3 -3
- package/components/iconbutton/README.md +55 -9
- package/components/iconbutton/index.scss +109 -167
- package/components/iconbutton/index.ts +4 -4
- package/components/list/index.scss +8 -8
- package/components/menu/index.scss +3 -3
- package/components/navigationrail/README.md +2 -1
- package/components/navigationrail/index.scss +4 -4
- package/components/radio/index.scss +2 -2
- package/components/select/index.scss +2 -2
- package/components/shapes/README.md +94 -0
- package/components/{shape → shapes}/_paths.generated.scss +0 -6
- package/components/{shape → shapes}/index.scss +10 -10
- package/components/{shape → shapes}/master.scss +3 -3
- package/components/sidesheet/index.scss +3 -3
- package/components/slider/index.scss +5 -5
- package/components/snackbar/index.scss +2 -2
- package/components/switch/index.scss +2 -2
- package/components/textfield/index.scss +2 -2
- package/components/timepicker/index.scss +3 -3
- 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/checkbox.js +1 -1
- package/dist/components/button/index.d.ts +1 -1
- package/dist/components/iconbutton/index.d.ts +1 -1
- package/dist/datepicker.js +1 -1
- package/dist/iconbutton.css +1 -1
- package/dist/iconbutton.js +1 -1
- package/dist/list.css +1 -1
- package/dist/list.js +1 -1
- package/dist/menu.js +1 -1
- package/dist/micl.css +1 -1
- package/dist/micl.js +1 -1
- package/dist/navigationrail.css +1 -1
- package/dist/navigationrail.js +1 -1
- package/dist/progressindicator.js +1 -1
- package/dist/shapes.css +1 -0
- package/dist/slider.js +1 -1
- package/dist/snackbar.js +1 -1
- package/dist/stepper.js +1 -1
- package/dist/textfield.js +1 -1
- package/dist/timepicker.js +1 -1
- package/docs/button.html +18 -17
- package/docs/iconbutton.html +12 -10
- package/docs/index.html +104 -89
- package/docs/menu.html +1 -1
- package/docs/micl.css +1 -1
- package/docs/micl.js +1 -1
- package/docs/shapes.css +1 -0
- package/docs/shapes.html +49 -40
- package/foundations/layout/index.scss +2 -2
- package/package.json +2 -1
- package/styles/elevation.scss +10 -7
- package/styles/motion.scss +12 -19
- package/styles/{shapes.scss → shape.scss} +6 -4
- package/styles/statelayer.scss +32 -45
- package/styles/typography.scss +4 -5
- package/styles.scss +1 -4
- package/tools/shapes/check.mjs +1 -1
- package/tools/shapes/generate.mjs +2 -8
- package/webpack.config.js +60 -5
- package/components/shape/README.md +0 -103
- package/dist/shape.css +0 -1
- package/docs/shape.css +0 -1
- /package/dist/{shape.js → shapes.js} +0 -0
- /package/docs/{shape.js → shapes.js} +0 -0
|
@@ -22,17 +22,17 @@
|
|
|
22
22
|
@use '../../foundations';
|
|
23
23
|
@use '../../styles/elevation';
|
|
24
24
|
@use '../../styles/motion';
|
|
25
|
-
@use '../../styles/
|
|
25
|
+
@use '../../styles/shape';
|
|
26
26
|
@use '../../styles/statelayer';
|
|
27
27
|
@use '../../styles/typography';
|
|
28
28
|
|
|
29
29
|
@include elevation.level(0);
|
|
30
30
|
@include elevation.level(1);
|
|
31
31
|
|
|
32
|
-
@include
|
|
33
|
-
@include
|
|
34
|
-
@include
|
|
35
|
-
@include
|
|
32
|
+
@include shape.corner('small');
|
|
33
|
+
@include shape.corner('medium');
|
|
34
|
+
@include shape.corner('large');
|
|
35
|
+
@include shape.corner('extra-large');
|
|
36
36
|
|
|
37
37
|
@include statelayer.token('hover-state-layer-opacity');
|
|
38
38
|
@include statelayer.token('focus-state-layer-opacity');
|
|
@@ -49,32 +49,11 @@
|
|
|
49
49
|
@include typography.scale('title-medium');
|
|
50
50
|
@include typography.scale('label-large');
|
|
51
51
|
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
.micl-button-text-xl,
|
|
58
|
-
.micl-button-elevated-xs,
|
|
59
|
-
.micl-button-elevated-s,
|
|
60
|
-
.micl-button-elevated-m,
|
|
61
|
-
.micl-button-elevated-l,
|
|
62
|
-
.micl-button-elevated-xl,
|
|
63
|
-
.micl-button-filled-xs,
|
|
64
|
-
.micl-button-filled-s,
|
|
65
|
-
.micl-button-filled-m,
|
|
66
|
-
.micl-button-filled-l,
|
|
67
|
-
.micl-button-filled-xl,
|
|
68
|
-
.micl-button-tonal-xs,
|
|
69
|
-
.micl-button-tonal-s,
|
|
70
|
-
.micl-button-tonal-m,
|
|
71
|
-
.micl-button-tonal-l,
|
|
72
|
-
.micl-button-tonal-xl,
|
|
73
|
-
.micl-button-outlined-xs,
|
|
74
|
-
.micl-button-outlined-s,
|
|
75
|
-
.micl-button-outlined-m,
|
|
76
|
-
.micl-button-outlined-l,
|
|
77
|
-
.micl-button-outlined-xl {
|
|
52
|
+
[class*="micl-button-text-"],
|
|
53
|
+
[class*="micl-button-elevated-"],
|
|
54
|
+
[class*="micl-button-filled-"],
|
|
55
|
+
[class*="micl-button-tonal-"],
|
|
56
|
+
[class*="micl-button-outlined-"] {
|
|
78
57
|
--md-sys-button-motion-effects: #{motion.$md-sys-motion-expressive-fast-spatial};
|
|
79
58
|
--md-sys-button-motion-duration: #{motion.$md-sys-motion-expressive-fast-spatial-duration};
|
|
80
59
|
--md-sys-button-motion-duration-reverse: #{motion.$md-sys-motion-expressive-fast-spatial-duration};
|
|
@@ -106,16 +85,26 @@
|
|
|
106
85
|
--statelayer-opacity var(--md-sys-button-motion-duration) linear;
|
|
107
86
|
|
|
108
87
|
&:disabled {
|
|
109
|
-
background-color: rgb(from var(--md-sys-color-on-surface) r g b / 10%);
|
|
110
|
-
color: rgb(from var(--md-sys-color-on-surface) r g b / var(--md-sys-state-disabled-state-layer-opacity, 38%));
|
|
111
88
|
box-shadow: var(--md-sys-elevation-level0);
|
|
112
89
|
cursor: default;
|
|
113
90
|
}
|
|
114
91
|
&:not(:disabled) {
|
|
92
|
+
&:hover {
|
|
93
|
+
--statelayer-opacity: var(--md-sys-state-hover-state-layer-opacity, 8%);
|
|
94
|
+
|
|
95
|
+
.micl-button__icon {
|
|
96
|
+
font-variation-settings: 'FILL' 1;
|
|
97
|
+
}
|
|
98
|
+
}
|
|
115
99
|
&:focus-visible {
|
|
100
|
+
--statelayer-opacity: var(--md-sys-state-focus-state-layer-opacity, 10%);
|
|
101
|
+
|
|
116
102
|
outline: var(--md-sys-state-focus-indicator-thickness, 3px) solid var(--md-sys-color-secondary);
|
|
117
103
|
outline-offset: 3px;
|
|
118
104
|
}
|
|
105
|
+
&:active {
|
|
106
|
+
--statelayer-opacity: var(--md-sys-state-pressed-state-layer-opacity, 10%);
|
|
107
|
+
}
|
|
119
108
|
&.micl-rippling {
|
|
120
109
|
animation: micl-ripple var(--md-sys-state-ripple-duration) motion.$md-sys-motion-easing-standard;
|
|
121
110
|
}
|
|
@@ -124,10 +113,10 @@
|
|
|
124
113
|
font-variation-settings: 'FILL' 0;
|
|
125
114
|
transition: font-variation-settings var(--md-sys-button-motion-duration) linear;
|
|
126
115
|
}
|
|
127
|
-
&.micl-button--toggle:not(
|
|
116
|
+
&.micl-button--toggle:not([aria-pressed="true"]) .micl-button__icon::before {
|
|
128
117
|
content: attr(data-miclicon);
|
|
129
118
|
}
|
|
130
|
-
&.micl-button--toggle
|
|
119
|
+
&.micl-button--toggle[aria-pressed="true"] .micl-button__icon::before {
|
|
131
120
|
content: attr(data-micliconselected);
|
|
132
121
|
}
|
|
133
122
|
}
|
|
@@ -158,18 +147,19 @@
|
|
|
158
147
|
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);
|
|
159
148
|
background-color: transparent;
|
|
160
149
|
}
|
|
161
|
-
&.micl-button--toggle
|
|
150
|
+
&.micl-button--toggle[aria-pressed="true"] {
|
|
162
151
|
border-radius: var(--md-sys-shape-corner-medium);
|
|
163
152
|
}
|
|
164
153
|
&.micl-button--square {
|
|
165
154
|
border-radius: var(--md-sys-shape-corner-medium);
|
|
166
155
|
|
|
167
|
-
&.micl-button--toggle
|
|
156
|
+
&.micl-button--toggle[aria-pressed="true"] {
|
|
168
157
|
border-radius: calc(var(--micl-height) / 2);
|
|
169
158
|
}
|
|
170
159
|
}
|
|
171
|
-
&:not(:disabled) {
|
|
172
|
-
|
|
160
|
+
&:not(:disabled):active {
|
|
161
|
+
&,
|
|
162
|
+
&.micl-button--square {
|
|
173
163
|
border-radius: var(--md-sys-shape-corner-small);
|
|
174
164
|
}
|
|
175
165
|
}
|
|
@@ -204,18 +194,19 @@
|
|
|
204
194
|
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);
|
|
205
195
|
background-color: transparent;
|
|
206
196
|
}
|
|
207
|
-
&.micl-button--toggle
|
|
197
|
+
&.micl-button--toggle[aria-pressed="true"] {
|
|
208
198
|
border-radius: var(--md-sys-shape-corner-medium);
|
|
209
199
|
}
|
|
210
200
|
&.micl-button--square {
|
|
211
201
|
border-radius: var(--md-sys-shape-corner-medium);
|
|
212
202
|
|
|
213
|
-
&.micl-button--toggle
|
|
203
|
+
&.micl-button--toggle[aria-pressed="true"] {
|
|
214
204
|
border-radius: calc(var(--micl-height) / 2);
|
|
215
205
|
}
|
|
216
206
|
}
|
|
217
|
-
&:not(:disabled) {
|
|
218
|
-
|
|
207
|
+
&:not(:disabled):active {
|
|
208
|
+
&,
|
|
209
|
+
&.micl-button--square {
|
|
219
210
|
border-radius: var(--md-sys-shape-corner-small);
|
|
220
211
|
}
|
|
221
212
|
}
|
|
@@ -241,18 +232,19 @@
|
|
|
241
232
|
column-gap: 8px;
|
|
242
233
|
padding-inline: 24px;
|
|
243
234
|
|
|
244
|
-
&.micl-button--toggle
|
|
235
|
+
&.micl-button--toggle[aria-pressed="true"] {
|
|
245
236
|
border-radius: var(--md-sys-shape-corner-large);
|
|
246
237
|
}
|
|
247
238
|
&.micl-button--square {
|
|
248
239
|
border-radius: var(--md-sys-shape-corner-large);
|
|
249
240
|
|
|
250
|
-
&.micl-button--toggle
|
|
241
|
+
&.micl-button--toggle[aria-pressed="true"] {
|
|
251
242
|
border-radius: calc(var(--micl-height) / 2);
|
|
252
243
|
}
|
|
253
244
|
}
|
|
254
|
-
&:not(:disabled) {
|
|
255
|
-
|
|
245
|
+
&:not(:disabled):active {
|
|
246
|
+
&,
|
|
247
|
+
&.micl-button--square {
|
|
256
248
|
border-radius: var(--md-sys-shape-corner-medium);
|
|
257
249
|
}
|
|
258
250
|
}
|
|
@@ -278,18 +270,19 @@
|
|
|
278
270
|
column-gap: 12px;
|
|
279
271
|
padding-inline: 48px;
|
|
280
272
|
|
|
281
|
-
&.micl-button--toggle
|
|
273
|
+
&.micl-button--toggle[aria-pressed="true"] {
|
|
282
274
|
border-radius: var(--md-sys-shape-corner-extra-large);
|
|
283
275
|
}
|
|
284
276
|
&.micl-button--square {
|
|
285
277
|
border-radius: var(--md-sys-shape-corner-extra-large);
|
|
286
278
|
|
|
287
|
-
&.micl-button--toggle
|
|
279
|
+
&.micl-button--toggle[aria-pressed="true"] {
|
|
288
280
|
border-radius: calc(var(--micl-height) / 2);
|
|
289
281
|
}
|
|
290
282
|
}
|
|
291
|
-
&:not(:disabled) {
|
|
292
|
-
|
|
283
|
+
&:not(:disabled):active {
|
|
284
|
+
&,
|
|
285
|
+
&.micl-button--square {
|
|
293
286
|
border-radius: var(--md-sys-shape-corner-large);
|
|
294
287
|
}
|
|
295
288
|
}
|
|
@@ -315,18 +308,19 @@
|
|
|
315
308
|
column-gap: 16px;
|
|
316
309
|
padding-inline: 64px;
|
|
317
310
|
|
|
318
|
-
&.micl-button--toggle
|
|
311
|
+
&.micl-button--toggle[aria-pressed="true"] {
|
|
319
312
|
border-radius: var(--md-sys-shape-corner-extra-large);
|
|
320
313
|
}
|
|
321
314
|
&.micl-button--square {
|
|
322
315
|
border-radius: var(--md-sys-shape-corner-extra-large);
|
|
323
316
|
|
|
324
|
-
&.micl-button--toggle
|
|
317
|
+
&.micl-button--toggle[aria-pressed="true"] {
|
|
325
318
|
border-radius: calc(var(--micl-height) / 2);
|
|
326
319
|
}
|
|
327
320
|
}
|
|
328
|
-
&:not(:disabled) {
|
|
329
|
-
|
|
321
|
+
&:not(:disabled):active {
|
|
322
|
+
&,
|
|
323
|
+
&.micl-button--square {
|
|
330
324
|
border-radius: var(--md-sys-shape-corner-large);
|
|
331
325
|
}
|
|
332
326
|
}
|
|
@@ -336,199 +330,125 @@
|
|
|
336
330
|
}
|
|
337
331
|
}
|
|
338
332
|
|
|
339
|
-
|
|
340
|
-
.micl-button-text-s,
|
|
341
|
-
.micl-button-text-m,
|
|
342
|
-
.micl-button-text-l,
|
|
343
|
-
.micl-button-text-xl {
|
|
333
|
+
[class*="micl-button-text-"] {
|
|
344
334
|
--statelayer-color: var(--md-sys-color-primary);
|
|
345
335
|
|
|
346
336
|
background-color: transparent;
|
|
347
|
-
color: var(--md-sys-color-primary);
|
|
337
|
+
color: var(--md-comp-text-button-label-text-color, var(--md-sys-color-primary));
|
|
348
338
|
text-decoration: none;
|
|
349
339
|
|
|
350
|
-
&:
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
.micl-button__icon {
|
|
355
|
-
font-variation-settings: 'FILL' 1;
|
|
356
|
-
}
|
|
357
|
-
}
|
|
358
|
-
&:focus-visible {
|
|
359
|
-
--statelayer-opacity: var(--md-sys-state-focus-state-layer-opacity, 10%);
|
|
360
|
-
}
|
|
361
|
-
&:active {
|
|
362
|
-
--statelayer-opacity: var(--md-sys-state-pressed-state-layer-opacity, 10%);
|
|
363
|
-
}
|
|
340
|
+
&:disabled {
|
|
341
|
+
background-color: transparent;
|
|
342
|
+
color: var(--md-comp-text-button-disabled-label-text-color, rgb(from var(--md-sys-color-on-surface) r g b / var(--md-comp-text-button-disabled-label-text-opacity, 38%)));
|
|
364
343
|
}
|
|
365
344
|
}
|
|
366
345
|
|
|
367
|
-
|
|
368
|
-
.micl-button-elevated-s,
|
|
369
|
-
.micl-button-elevated-m,
|
|
370
|
-
.micl-button-elevated-l,
|
|
371
|
-
.micl-button-elevated-xl {
|
|
346
|
+
[class*="micl-button-elevated-"] {
|
|
372
347
|
--statelayer-color: var(--md-sys-color-primary);
|
|
373
348
|
|
|
374
|
-
background-color: var(--md-sys-color-surface-container-low);
|
|
375
|
-
color: var(--md-sys-color-primary);
|
|
376
|
-
box-shadow: var(--md-sys-elevation-level1);
|
|
349
|
+
background-color: var(--md-comp-elevated-button-container-color, var(--md-sys-color-surface-container-low));
|
|
350
|
+
color: var(--md-comp-elevated-button-label-text-color, var(--md-sys-color-primary));
|
|
351
|
+
box-shadow: var(--md-comp-elevated-button-container-elevation, var(--md-sys-elevation-level1));
|
|
377
352
|
|
|
353
|
+
&:disabled {
|
|
354
|
+
background-color: var(--md-comp-elevated-button-disabled-container-color, rgb(from var(--md-sys-color-on-surface) r g b / var(--md-comp-elevated-button-disabled-container-opacity, 10%)));
|
|
355
|
+
color: var(--md-comp-elevated-button-disabled-label-text-color, rgb(from var(--md-sys-color-on-surface) r g b / var(--md-comp-elevated-button-disabled-label-text-opacity, 38%)));
|
|
356
|
+
}
|
|
378
357
|
&:not(:disabled) {
|
|
379
|
-
&.micl-button--toggle
|
|
358
|
+
&.micl-button--toggle[aria-pressed="true"] {
|
|
380
359
|
--statelayer-color: var(--md-sys-color-on-primary);
|
|
381
360
|
|
|
382
|
-
background-color: var(--md-sys-color-primary);
|
|
383
|
-
color: var(--md-sys-color-on-primary);
|
|
384
|
-
|
|
385
|
-
.micl-button__icon {
|
|
386
|
-
font-variation-settings: 'FILL' 1;
|
|
387
|
-
}
|
|
388
|
-
}
|
|
389
|
-
&:hover {
|
|
390
|
-
--statelayer-opacity: var(--md-sys-state-hover-state-layer-opacity, 8%);
|
|
361
|
+
background-color: var(--md-comp-elevated-button-selected-container-color, var(--md-sys-color-primary));
|
|
362
|
+
color: var(--md-comp-elevated-button-selected-label-text-color, var(--md-sys-color-on-primary));
|
|
391
363
|
|
|
392
364
|
.micl-button__icon {
|
|
393
365
|
font-variation-settings: 'FILL' 1;
|
|
394
366
|
}
|
|
395
367
|
}
|
|
396
|
-
&:focus-visible {
|
|
397
|
-
--statelayer-opacity: var(--md-sys-state-focus-state-layer-opacity, 10%);
|
|
398
|
-
}
|
|
399
|
-
&:active {
|
|
400
|
-
--statelayer-opacity: var(--md-sys-state-pressed-state-layer-opacity, 10%);
|
|
401
|
-
}
|
|
402
368
|
}
|
|
403
369
|
}
|
|
404
|
-
.micl-button-elevated-xs {
|
|
405
|
-
block-size: 32px;
|
|
406
|
-
border: none;
|
|
407
|
-
}
|
|
408
|
-
.micl-button-elevated-s {
|
|
409
|
-
block-size: 40px;
|
|
410
|
-
border: none;
|
|
411
|
-
}
|
|
412
370
|
|
|
413
|
-
|
|
414
|
-
.micl-button-filled-s,
|
|
415
|
-
.micl-button-filled-m,
|
|
416
|
-
.micl-button-filled-l,
|
|
417
|
-
.micl-button-filled-xl {
|
|
371
|
+
[class*="micl-button-filled-"] {
|
|
418
372
|
--statelayer-color: var(--md-sys-color-on-primary);
|
|
419
373
|
|
|
420
|
-
background-color: var(--md-sys-color-primary);
|
|
421
|
-
color: var(--md-sys-color-on-primary);
|
|
374
|
+
background-color: var(--md-comp-filled-button-container-color, var(--md-sys-color-primary));
|
|
375
|
+
color: var(--md-comp-filled-button-label-text-color, var(--md-sys-color-on-primary));
|
|
422
376
|
|
|
377
|
+
&:disabled {
|
|
378
|
+
background-color: var(--md-comp-filled-button-disabled-container-color, rgb(from var(--md-sys-color-on-surface) r g b / var(--md-comp-filled-button-disabled-container-opacity, 10%)));
|
|
379
|
+
color: var(--md-comp-filled-button-disabled-label-text-color, rgb(from var(--md-sys-color-on-surface) r g b / var(--md-comp-filled-button-disabled-label-text-opacity, 38%)));
|
|
380
|
+
}
|
|
423
381
|
&:not(:disabled) {
|
|
424
|
-
&.micl-button--toggle
|
|
382
|
+
&.micl-button--toggle[aria-pressed="true"] {
|
|
425
383
|
.micl-button__icon {
|
|
426
384
|
font-variation-settings: 'FILL' 1;
|
|
427
385
|
}
|
|
428
386
|
}
|
|
429
|
-
&.micl-button--toggle:not(
|
|
387
|
+
&.micl-button--toggle:not([aria-pressed="true"]) {
|
|
430
388
|
--statelayer-color: var(--md-sys-color-on-surface-variant);
|
|
431
389
|
|
|
432
|
-
background-color: var(--md-sys-color-surface-container);
|
|
433
|
-
color: var(--md-sys-color-on-surface-variant);
|
|
434
|
-
}
|
|
435
|
-
&:hover {
|
|
436
|
-
--statelayer-opacity: var(--md-sys-state-hover-state-layer-opacity, 8%);
|
|
437
|
-
|
|
438
|
-
.micl-button__icon {
|
|
439
|
-
font-variation-settings: 'FILL' 1;
|
|
440
|
-
}
|
|
441
|
-
}
|
|
442
|
-
&:focus-visible {
|
|
443
|
-
--statelayer-opacity: var(--md-sys-state-focus-state-layer-opacity, 10%);
|
|
444
|
-
}
|
|
445
|
-
&:active {
|
|
446
|
-
--statelayer-opacity: var(--md-sys-state-pressed-state-layer-opacity, 10%);
|
|
390
|
+
background-color: var(--md-comp-filled-button-unselected-container-color, var(--md-sys-color-surface-container));
|
|
391
|
+
color: var(--md-comp-filled-button-unselected-label-text-color, var(--md-sys-color-on-surface-variant));
|
|
447
392
|
}
|
|
448
393
|
}
|
|
449
394
|
}
|
|
450
395
|
|
|
451
|
-
|
|
452
|
-
.micl-button-tonal-s,
|
|
453
|
-
.micl-button-tonal-m,
|
|
454
|
-
.micl-button-tonal-l,
|
|
455
|
-
.micl-button-tonal-xl {
|
|
396
|
+
[class*="micl-button-tonal-"] {
|
|
456
397
|
--statelayer-color: var(--md-sys-color-on-secondary-container);
|
|
457
398
|
|
|
458
|
-
background-color: var(--md-sys-color-secondary-container);
|
|
459
|
-
color: var(--md-sys-color-on-secondary-container);
|
|
399
|
+
background-color: var(--md-comp-filled-tonal-button-container-color, var(--md-sys-color-secondary-container));
|
|
400
|
+
color: var(--md-comp-filled-tonal-button-label-text-color, var(--md-sys-color-on-secondary-container));
|
|
460
401
|
|
|
402
|
+
&:disabled {
|
|
403
|
+
background-color: var(--md-comp-filled-tonal-button-disabled-container-color, rgb(from var(--md-sys-color-on-surface) r g b / var(--md-comp-filled-tonal-button-disabled-container-opacity, 10%)));
|
|
404
|
+
color: var(--md-comp-filled-tonal-button-disabled-label-text-color, rgb(from var(--md-sys-color-on-surface) r g b / var(--md-comp-filled-tonal-button-disabled-label-text-opacity, 38%)));
|
|
405
|
+
}
|
|
461
406
|
&:not(:disabled) {
|
|
462
|
-
&.micl-button--toggle
|
|
407
|
+
&.micl-button--toggle[aria-pressed="true"] {
|
|
463
408
|
--statelayer-color: var(--md-sys-color-on-secondary);
|
|
464
409
|
|
|
465
|
-
background-color: var(--md-sys-color-secondary);
|
|
466
|
-
color: var(--md-sys-color-on-secondary);
|
|
467
|
-
|
|
468
|
-
.micl-button__icon {
|
|
469
|
-
font-variation-settings: 'FILL' 1;
|
|
470
|
-
}
|
|
471
|
-
}
|
|
472
|
-
&:hover {
|
|
473
|
-
--statelayer-opacity: var(--md-sys-state-hover-state-layer-opacity, 8%);
|
|
410
|
+
background-color: var(--md-comp-filled-tonal-button-selected-container-color, var(--md-sys-color-secondary));
|
|
411
|
+
color: var(--md-comp-filled-tonal-button-selected-label-text-color, var(--md-sys-color-on-secondary));
|
|
474
412
|
|
|
475
413
|
.micl-button__icon {
|
|
476
414
|
font-variation-settings: 'FILL' 1;
|
|
477
415
|
}
|
|
478
416
|
}
|
|
479
|
-
&:focus-visible {
|
|
480
|
-
--statelayer-opacity: var(--md-sys-state-focus-state-layer-opacity, 10%);
|
|
481
|
-
}
|
|
482
|
-
&:active {
|
|
483
|
-
--statelayer-opacity: var(--md-sys-state-pressed-state-layer-opacity, 10%);
|
|
484
|
-
}
|
|
485
417
|
}
|
|
486
418
|
}
|
|
487
419
|
|
|
488
|
-
|
|
489
|
-
.micl-button-outlined-s,
|
|
490
|
-
.micl-button-outlined-m,
|
|
491
|
-
.micl-button-outlined-l,
|
|
492
|
-
.micl-button-outlined-xl {
|
|
420
|
+
[class*="micl-button-outlined-"] {
|
|
493
421
|
--statelayer-color: var(--md-sys-color-on-surface-variant);
|
|
494
422
|
|
|
495
423
|
background-color: transparent;
|
|
496
|
-
color: var(--md-sys-color-on-surface-variant);
|
|
424
|
+
color: var(--md-comp-outlined-button-label-text-color, var(--md-sys-color-on-surface-variant));
|
|
497
425
|
|
|
426
|
+
&:disabled {
|
|
427
|
+
background-color: transparent;
|
|
428
|
+
color: var(--md-comp-outlined-button-disabled-label-text-color, rgb(from var(--md-sys-color-on-surface) r g b / var(--md-comp-outlined-button-disabled-label-text-opacity, 38%)));
|
|
429
|
+
}
|
|
498
430
|
&:not(:disabled) {
|
|
499
|
-
&.micl-button--toggle
|
|
431
|
+
&.micl-button--toggle[aria-pressed="true"] {
|
|
500
432
|
--statelayer-color: var(--md-sys-color-inverse-on-surface);
|
|
501
433
|
|
|
502
|
-
|
|
503
|
-
color: var(--md-sys-color-inverse-
|
|
504
|
-
|
|
505
|
-
.micl-button__icon {
|
|
506
|
-
font-variation-settings: 'FILL' 1;
|
|
507
|
-
}
|
|
508
|
-
}
|
|
509
|
-
&:hover {
|
|
510
|
-
--statelayer-opacity: var(--md-sys-state-hover-state-layer-opacity, 8%);
|
|
434
|
+
border: none;
|
|
435
|
+
background-color: var(--md-comp-outlined-button-selected-container-color, var(--md-sys-color-inverse-surface));
|
|
436
|
+
color: var(--md-comp-outlined-button-selected-label-text-color, var(--md-sys-color-inverse-on-surface));
|
|
511
437
|
|
|
512
438
|
.micl-button__icon {
|
|
513
439
|
font-variation-settings: 'FILL' 1;
|
|
514
440
|
}
|
|
515
441
|
}
|
|
516
|
-
&:focus-visible {
|
|
517
|
-
--statelayer-opacity: var(--md-sys-state-focus-state-layer-opacity, 10%);
|
|
518
|
-
}
|
|
519
|
-
&:active {
|
|
520
|
-
--statelayer-opacity: var(--md-sys-state-pressed-state-layer-opacity, 10%);
|
|
521
|
-
}
|
|
522
442
|
}
|
|
523
443
|
}
|
|
524
444
|
.micl-button-outlined-xs,
|
|
525
445
|
.micl-button-outlined-s,
|
|
526
446
|
.micl-button-outlined-m {
|
|
527
|
-
border: 1px solid var(--md-sys-color-outline-variant);
|
|
447
|
+
border: 1px solid var(--md-comp-outlined-button-outline-color, var(--md-sys-color-outline-variant));
|
|
528
448
|
}
|
|
529
449
|
.micl-button-outlined-l {
|
|
530
|
-
border: 2px solid var(--md-sys-color-outline-variant);
|
|
450
|
+
border: 2px solid var(--md-comp-outlined-button-outline-color, var(--md-sys-color-outline-variant));
|
|
531
451
|
}
|
|
532
452
|
.micl-button-outlined-xl {
|
|
533
|
-
border: 3px solid var(--md-sys-color-outline-variant);
|
|
453
|
+
border: 3px solid var(--md-comp-outlined-button-outline-color, var(--md-sys-color-outline-variant));
|
|
534
454
|
}
|
|
@@ -19,13 +19,13 @@
|
|
|
19
19
|
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
20
20
|
// SOFTWARE.
|
|
21
21
|
|
|
22
|
-
export const buttonSelector = '
|
|
22
|
+
export const buttonSelector = '.micl-button--toggle';
|
|
23
23
|
|
|
24
24
|
const toggleIcon = (button: HTMLButtonElement): void =>
|
|
25
25
|
{
|
|
26
26
|
const element = button.querySelector<HTMLElement>('.micl-button__icon') ?? button;
|
|
27
27
|
|
|
28
|
-
const selected = button.
|
|
28
|
+
const selected = button.getAttribute('aria-pressed') === 'true';
|
|
29
29
|
if (element.dataset.micliconselected) {
|
|
30
30
|
element.classList.toggle(element.dataset.micliconselected, selected);
|
|
31
31
|
}
|
|
@@ -47,7 +47,7 @@ export default (() =>
|
|
|
47
47
|
&& (event as any).command === '--micl-toggle'
|
|
48
48
|
) {
|
|
49
49
|
target.classList.add('micl-button--toggled');
|
|
50
|
-
target.
|
|
50
|
+
target.setAttribute('aria-pressed', String(target.getAttribute('aria-pressed') !== 'true'));
|
|
51
51
|
|
|
52
52
|
toggleIcon(target);
|
|
53
53
|
}
|
|
@@ -71,7 +71,7 @@ export default (() =>
|
|
|
71
71
|
cleanup: function(element: HTMLButtonElement): void
|
|
72
72
|
{
|
|
73
73
|
if (element.matches(buttonSelector)) {
|
|
74
|
-
|
|
74
|
+
element.removeEventListener('command', this.command);
|
|
75
75
|
delete element.dataset.miclinitialized;
|
|
76
76
|
}
|
|
77
77
|
}
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
@use '../../foundations';
|
|
24
24
|
@use '../../styles/elevation';
|
|
25
25
|
@use '../../styles/motion';
|
|
26
|
-
@use '../../styles/
|
|
26
|
+
@use '../../styles/shape';
|
|
27
27
|
@use '../../styles/statelayer';
|
|
28
28
|
@use '../../styles/typography';
|
|
29
29
|
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
@include elevation.level(3);
|
|
34
34
|
@include elevation.level(4);
|
|
35
35
|
|
|
36
|
-
@include
|
|
36
|
+
@include shape.corner('medium');
|
|
37
37
|
|
|
38
38
|
@include statelayer.token('hover-state-layer-opacity');
|
|
39
39
|
@include statelayer.token('focus-state-layer-opacity');
|
|
@@ -236,7 +236,7 @@
|
|
|
236
236
|
|
|
237
237
|
.micl-card__image {
|
|
238
238
|
grid-column: 1;
|
|
239
|
-
grid-row: 1 /
|
|
239
|
+
grid-row: 1 / span 4;
|
|
240
240
|
block-size: 100%;
|
|
241
241
|
background-size: cover;
|
|
242
242
|
}
|
|
@@ -21,11 +21,11 @@
|
|
|
21
21
|
|
|
22
22
|
@use '../../foundations';
|
|
23
23
|
@use '../../styles/motion';
|
|
24
|
-
@use '../../styles/
|
|
24
|
+
@use '../../styles/shape';
|
|
25
25
|
@use '../../styles/statelayer';
|
|
26
26
|
@use '../../styles/typography';
|
|
27
27
|
|
|
28
|
-
@include
|
|
28
|
+
@include shape.corner('full');
|
|
29
29
|
|
|
30
30
|
@include statelayer.token('layer-size');
|
|
31
31
|
@include statelayer.token('hover-state-layer-opacity');
|
|
@@ -21,12 +21,12 @@
|
|
|
21
21
|
|
|
22
22
|
@use '../../foundations';
|
|
23
23
|
@use '../../styles/motion';
|
|
24
|
-
@use '../../styles/
|
|
24
|
+
@use '../../styles/shape';
|
|
25
25
|
@use '../../styles/statelayer';
|
|
26
26
|
@use '../../styles/typography';
|
|
27
27
|
|
|
28
|
-
@include
|
|
29
|
-
@include
|
|
28
|
+
@include shape.corner('large');
|
|
29
|
+
@include shape.corner('full');
|
|
30
30
|
|
|
31
31
|
@include statelayer.token('hover-state-layer-opacity');
|
|
32
32
|
@include statelayer.token('focus-state-layer-opacity');
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
@use '../../foundations';
|
|
23
23
|
@use '../../styles/elevation';
|
|
24
24
|
@use '../../styles/motion';
|
|
25
|
-
@use '../../styles/
|
|
25
|
+
@use '../../styles/shape';
|
|
26
26
|
@use '../../styles/statelayer';
|
|
27
27
|
@use '../../styles/typography';
|
|
28
28
|
|
|
@@ -30,8 +30,8 @@
|
|
|
30
30
|
@include elevation.level(2);
|
|
31
31
|
@include elevation.level(3);
|
|
32
32
|
|
|
33
|
-
@include
|
|
34
|
-
@include
|
|
33
|
+
@include shape.corner('none');
|
|
34
|
+
@include shape.corner('extra-large');
|
|
35
35
|
|
|
36
36
|
@include statelayer.token('hover-state-layer-opacity');
|
|
37
37
|
@include statelayer.token('backdrop-opacity');
|