material-inspired-component-library 1.2.1 → 1.3.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 +12 -2
- package/components/bottomsheet/index.scss +18 -16
- package/components/button/README.md +1 -1
- package/components/button/index.scss +57 -80
- package/components/card/index.scss +33 -31
- package/components/checkbox/index.scss +5 -9
- package/components/dialog/index.scss +38 -29
- package/components/iconbutton/README.md +1 -1
- package/components/iconbutton/index.scss +51 -81
- package/components/list/index.scss +45 -33
- package/components/list/index.ts +10 -9
- package/components/menu/README.md +67 -4
- package/components/menu/index.scss +43 -39
- package/components/menu/index.ts +47 -16
- package/components/navigationrail/README.md +99 -0
- package/components/navigationrail/index.scss +157 -0
- package/components/radio/index.scss +28 -15
- package/components/select/index.scss +4 -12
- package/components/sidesheet/index.scss +21 -19
- package/components/switch/index.scss +11 -8
- package/components/textfield/index.scss +16 -7
- package/dist/bottomsheet.css +1 -1
- package/dist/button.css +1 -1
- package/dist/card.css +1 -1
- package/dist/checkbox.css +1 -1
- package/dist/components/menu/index.d.ts +0 -11
- package/dist/dialog.css +1 -1
- package/dist/iconbutton.css +1 -1
- package/dist/list.css +1 -1
- package/dist/menu.css +1 -1
- package/dist/micl.css +1 -1
- package/dist/micl.js +1 -1
- package/dist/navigationrail.css +1 -0
- package/dist/navigationrail.js +1 -0
- package/dist/radio.css +1 -1
- package/dist/select.css +1 -1
- package/dist/sidesheet.css +1 -1
- package/dist/slider.css +1 -1
- package/dist/switch.css +1 -1
- package/dist/textfield.css +1 -1
- package/docs/dialog.html +4 -4
- package/docs/docs.js +2 -2
- package/docs/index.html +3 -1
- package/docs/menu.html +183 -3
- package/docs/micl.css +1 -1
- package/docs/micl.js +1 -1
- package/docs/navigationrail.html +75 -0
- package/micl.ts +10 -8
- package/package.json +7 -7
- package/styles/statelayer.scss +14 -0
- package/styles.scss +1 -1
- package/webpack.config.js +37 -0
- package/styles/ripple.scss +0 -50
package/README.md
CHANGED
|
@@ -88,6 +88,7 @@ The library currently consists of the following components:
|
|
|
88
88
|
- [x] [Icon button](components/iconbutton/README.md)
|
|
89
89
|
- [x] [List](components/list/README.md)
|
|
90
90
|
- [x] [Menu](components/menu/README.md)
|
|
91
|
+
- [ ] [Navigation rail](components/navigationrail/README.md)
|
|
91
92
|
- [x] [Radio button](components/radio/README.md)
|
|
92
93
|
- [x] [Select](components/select/README.md)
|
|
93
94
|
- [x] [Side sheet](components/sidesheet/README.md)
|
|
@@ -97,10 +98,19 @@ The library currently consists of the following components:
|
|
|
97
98
|
|
|
98
99
|
## Change Log
|
|
99
100
|
|
|
100
|
-
### 1.
|
|
101
|
+
### 1.3.0 (23.08.2025)
|
|
101
102
|
**Features**
|
|
102
|
-
|
|
103
|
+
|
|
104
|
+
- **Menu**: Added support for submenus.
|
|
105
|
+
- **Ripple**: The ripple-effect does not use a pseudo-element anymore.
|
|
106
|
+
- **State layer**: Rewrite for simpler styling.
|
|
103
107
|
|
|
104
108
|
### 1.2.0 (17.08.2025)
|
|
105
109
|
**Features**
|
|
110
|
+
|
|
106
111
|
- **List**: Added support for switches inside list items.
|
|
112
|
+
|
|
113
|
+
### 1.1.0 (12.08.2025)
|
|
114
|
+
**Features**
|
|
115
|
+
|
|
116
|
+
- **Text field**: Added support for multi-line text fields.
|
|
@@ -30,6 +30,9 @@ dialog.micl-bottomsheet {
|
|
|
30
30
|
--md-sys-bottomsheet-padding: 24px;
|
|
31
31
|
--md-sys-bottomsheet-handle-width: 32px;
|
|
32
32
|
--md-sys-bottomsheet-handle-height: 4px;
|
|
33
|
+
--md-sys-bottomsheet-motion-spatial: #{motion.$md-sys-motion-expressive-slow-spatial};
|
|
34
|
+
--md-sys-bottomsheet-motion-duration: #{motion.$md-sys-motion-expressive-slow-spatial-duration};
|
|
35
|
+
--md-sys-bottomsheet-motion-duration-reverse: #{motion.$md-sys-motion-expressive-default-spatial-duration};
|
|
33
36
|
|
|
34
37
|
box-sizing: border-box;
|
|
35
38
|
position: fixed;
|
|
@@ -51,10 +54,10 @@ dialog.micl-bottomsheet {
|
|
|
51
54
|
|
|
52
55
|
&:not(.micl-bottomsheet--resizing) {
|
|
53
56
|
transition:
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
57
|
+
opacity var(--md-sys-bottomsheet-motion-duration-reverse) motion.$md-sys-motion-easing-emphasized-accelerate,
|
|
58
|
+
height var(--md-sys-bottomsheet-motion-duration-reverse) var(--md-sys-bottomsheet-motion-spatial),
|
|
59
|
+
overlay var(--md-sys-bottomsheet-motion-duration-reverse) linear allow-discrete,
|
|
60
|
+
display var(--md-sys-bottomsheet-motion-duration-reverse) linear allow-discrete;
|
|
58
61
|
}
|
|
59
62
|
&.micl-bottomsheet--resizing .micl-bottomsheet__headline {
|
|
60
63
|
cursor: grabbing;
|
|
@@ -93,9 +96,9 @@ dialog.micl-bottomsheet {
|
|
|
93
96
|
&::backdrop {
|
|
94
97
|
background-color: rgba(0, 0, 0, 0);
|
|
95
98
|
transition:
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
background-color var(--md-sys-motion-duration
|
|
99
|
+
overlay var(--md-sys-bottomsheet-motion-duration) linear allow-discrete,
|
|
100
|
+
display var(--md-sys-bottomsheet-motion-duration) linear allow-discrete,
|
|
101
|
+
background-color var(--md-sys-bottomsheet-motion-duration) linear;
|
|
99
102
|
}
|
|
100
103
|
&:popover-open,
|
|
101
104
|
&[open] {
|
|
@@ -105,23 +108,22 @@ dialog.micl-bottomsheet {
|
|
|
105
108
|
|
|
106
109
|
&:not(.micl-bottomsheet--resizing) {
|
|
107
110
|
transition:
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
111
|
+
opacity var(--md-sys-bottomsheet-motion-duration) motion.$md-sys-motion-easing-emphasized-decelerate,
|
|
112
|
+
height var(--md-sys-bottomsheet-motion-duration) var(--md-sys-bottomsheet-motion-spatial),
|
|
113
|
+
overlay var(--md-sys-bottomsheet-motion-duration) linear allow-discrete,
|
|
114
|
+
display var(--md-sys-bottomsheet-motion-duration) linear allow-discrete;
|
|
112
115
|
}
|
|
113
116
|
@starting-style {
|
|
114
117
|
height: 0;
|
|
115
118
|
opacity: 0;
|
|
116
119
|
}
|
|
117
|
-
&::backdrop {
|
|
118
|
-
@starting-style {
|
|
119
|
-
background-color: rgba(0, 0, 0, 0);
|
|
120
|
-
}
|
|
121
|
-
}
|
|
122
120
|
}
|
|
123
121
|
&[open]::backdrop {
|
|
124
122
|
background-color: rgba(0, 0, 0, 0.2);
|
|
123
|
+
|
|
124
|
+
@starting-style {
|
|
125
|
+
background-color: rgba(0, 0, 0, 0);
|
|
126
|
+
}
|
|
125
127
|
}
|
|
126
128
|
}
|
|
127
129
|
|
|
@@ -18,7 +18,7 @@ Import the button styles into your project:
|
|
|
18
18
|
```
|
|
19
19
|
|
|
20
20
|
### JavaScript
|
|
21
|
-
This component requires JavaScript for interactive features like the **
|
|
21
|
+
This component requires JavaScript for interactive features like the **toggle logic**:
|
|
22
22
|
|
|
23
23
|
```JavaScript
|
|
24
24
|
import micl from "material-inspired-component-library/dist/micl";
|
|
@@ -21,7 +21,6 @@
|
|
|
21
21
|
|
|
22
22
|
@use '../../styles/elevation';
|
|
23
23
|
@use '../../styles/motion';
|
|
24
|
-
@use '../../styles/ripple';
|
|
25
24
|
@use '../../styles/shapes';
|
|
26
25
|
@use '../../styles/statelayer';
|
|
27
26
|
@use '../../styles/typography';
|
|
@@ -51,10 +50,23 @@ button.micl-button-outlined-s,
|
|
|
51
50
|
button.micl-button-outlined-m,
|
|
52
51
|
button.micl-button-outlined-l,
|
|
53
52
|
button.micl-button-outlined-xl {
|
|
53
|
+
--md-sys-button-motion-effects: #{motion.$md-sys-motion-expressive-fast-spatial};
|
|
54
|
+
--md-sys-button-motion-duration: #{motion.$md-sys-motion-expressive-fast-spatial-duration};
|
|
55
|
+
--md-sys-button-motion-duration-reverse: #{motion.$md-sys-motion-expressive-fast-spatial-duration};
|
|
56
|
+
--miclripple: 1;
|
|
57
|
+
|
|
54
58
|
padding: 0;
|
|
55
59
|
border: none;
|
|
60
|
+
background-image:
|
|
61
|
+
radial-gradient(circle at var(--x, center) var(--y, center), transparent 0%, rgb(from var(--statelayer-color) r g b / var(--statelayer-opacity)) 10%, transparent 10%),
|
|
62
|
+
linear-gradient(rgb(from var(--statelayer-color) r g b / var(--statelayer-opacity)));
|
|
63
|
+
background-repeat: no-repeat;
|
|
64
|
+
background-size: 10000%, 100%;
|
|
56
65
|
cursor: pointer;
|
|
57
|
-
transition:
|
|
66
|
+
transition:
|
|
67
|
+
border-radius var(--md-sys-button-motion-duration) var(--md-sys-button-motion-effects),
|
|
68
|
+
background-size 3000ms,
|
|
69
|
+
--statelayer-opacity var(--md-sys-button-motion-duration) linear;
|
|
58
70
|
|
|
59
71
|
&:disabled {
|
|
60
72
|
background-color: rgb(from var(--md-sys-color-on-surface) r g b / 10%);
|
|
@@ -62,13 +74,19 @@ button.micl-button-outlined-xl {
|
|
|
62
74
|
box-shadow: var(--md-sys-elevation-level0);
|
|
63
75
|
cursor: default;
|
|
64
76
|
}
|
|
65
|
-
&:not(:disabled)
|
|
66
|
-
|
|
67
|
-
|
|
77
|
+
&:not(:disabled) {
|
|
78
|
+
&:focus-visible {
|
|
79
|
+
outline: var(--md-sys-state-focus-indicator-thickness) solid var(--md-sys-color-secondary);
|
|
80
|
+
outline-offset: 3px;
|
|
81
|
+
}
|
|
82
|
+
&:active {
|
|
83
|
+
background-size: 0%, 100%;
|
|
84
|
+
transition: background-size 0ms;
|
|
85
|
+
}
|
|
68
86
|
}
|
|
69
87
|
.micl-button__icon {
|
|
70
88
|
font-variation-settings: 'FILL' 0;
|
|
71
|
-
transition: font-variation-settings
|
|
89
|
+
transition: font-variation-settings var(--md-sys-button-motion-duration) linear;
|
|
72
90
|
}
|
|
73
91
|
}
|
|
74
92
|
|
|
@@ -101,9 +119,6 @@ button.micl-button-outlined-xs {
|
|
|
101
119
|
}
|
|
102
120
|
}
|
|
103
121
|
&:not(:disabled) {
|
|
104
|
-
--miclripple: 1;
|
|
105
|
-
@include ripple.effect;
|
|
106
|
-
|
|
107
122
|
&:active {
|
|
108
123
|
&.micl-button-elevated-xs {
|
|
109
124
|
border-radius: var(--md-sys-shape-corner-small);
|
|
@@ -153,9 +168,6 @@ button.micl-button-outlined-s {
|
|
|
153
168
|
}
|
|
154
169
|
}
|
|
155
170
|
&:not(:disabled) {
|
|
156
|
-
--miclripple: 1;
|
|
157
|
-
@include ripple.effect;
|
|
158
|
-
|
|
159
171
|
&:active:not(:disabled) {
|
|
160
172
|
&.micl-button-elevated-s {
|
|
161
173
|
border-radius: var(--md-sys-shape-corner-small);
|
|
@@ -199,9 +211,6 @@ button.micl-button-outlined-m {
|
|
|
199
211
|
}
|
|
200
212
|
}
|
|
201
213
|
&:not(:disabled) {
|
|
202
|
-
--miclripple: 1;
|
|
203
|
-
@include ripple.effect;
|
|
204
|
-
|
|
205
214
|
&:active:not(:disabled) {
|
|
206
215
|
border-radius: var(--md-sys-shape-corner-medium);
|
|
207
216
|
}
|
|
@@ -237,9 +246,6 @@ button.micl-button-outlined-l {
|
|
|
237
246
|
}
|
|
238
247
|
}
|
|
239
248
|
&:not(:disabled) {
|
|
240
|
-
--miclripple: 1;
|
|
241
|
-
@include ripple.effect;
|
|
242
|
-
|
|
243
249
|
&:active:not(:disabled) {
|
|
244
250
|
border-radius: var(--md-sys-shape-corner-large);
|
|
245
251
|
}
|
|
@@ -275,9 +281,6 @@ button.micl-button-outlined-xl {
|
|
|
275
281
|
}
|
|
276
282
|
}
|
|
277
283
|
&:not(:disabled) {
|
|
278
|
-
--miclripple: 1;
|
|
279
|
-
@include ripple.effect;
|
|
280
|
-
|
|
281
284
|
&:active:not(:disabled) {
|
|
282
285
|
border-radius: var(--md-sys-shape-corner-large);
|
|
283
286
|
}
|
|
@@ -295,22 +298,24 @@ button.micl-button-text-s,
|
|
|
295
298
|
button.micl-button-text-m,
|
|
296
299
|
button.micl-button-text-l,
|
|
297
300
|
button.micl-button-text-xl {
|
|
301
|
+
--statelayer-color: var(--md-sys-color-primary);
|
|
302
|
+
|
|
298
303
|
background-color: transparent;
|
|
299
304
|
color: var(--md-sys-color-primary);
|
|
300
305
|
|
|
301
306
|
&:not(:disabled) {
|
|
302
307
|
&:hover {
|
|
303
|
-
|
|
308
|
+
--statelayer-opacity: var(--md-sys-state-hover-state-layer-opacity);
|
|
304
309
|
|
|
305
310
|
.micl-button__icon {
|
|
306
311
|
font-variation-settings: 'FILL' 1;
|
|
307
312
|
}
|
|
308
313
|
}
|
|
309
314
|
&:focus-visible {
|
|
310
|
-
|
|
315
|
+
--statelayer-opacity: var(--md-sys-state-focus-state-layer-opacity);
|
|
311
316
|
}
|
|
312
317
|
&:active {
|
|
313
|
-
|
|
318
|
+
--statelayer-opacity: var(--md-sys-state-pressed-state-layer-opacity);
|
|
314
319
|
}
|
|
315
320
|
}
|
|
316
321
|
}
|
|
@@ -320,12 +325,16 @@ button.micl-button-elevated-s,
|
|
|
320
325
|
button.micl-button-elevated-m,
|
|
321
326
|
button.micl-button-elevated-l,
|
|
322
327
|
button.micl-button-elevated-xl {
|
|
328
|
+
--statelayer-color: var(--md-sys-color-primary);
|
|
329
|
+
|
|
323
330
|
background-color: var(--md-sys-color-surface-container-low);
|
|
324
331
|
color: var(--md-sys-color-primary);
|
|
325
332
|
box-shadow: var(--md-sys-elevation-level1);
|
|
326
333
|
|
|
327
334
|
&:not(:disabled) {
|
|
328
335
|
&.micl-button--toggle.micl-button--selected {
|
|
336
|
+
--statelayer-color: var(--md-sys-color-on-primary);
|
|
337
|
+
|
|
329
338
|
background-color: var(--md-sys-color-primary);
|
|
330
339
|
color: var(--md-sys-color-on-primary);
|
|
331
340
|
|
|
@@ -334,28 +343,17 @@ button.micl-button-elevated-xl {
|
|
|
334
343
|
}
|
|
335
344
|
}
|
|
336
345
|
&:hover {
|
|
337
|
-
|
|
346
|
+
--statelayer-opacity: var(--md-sys-state-hover-state-layer-opacity);
|
|
338
347
|
|
|
339
|
-
&.micl-button--toggle.micl-button--selected {
|
|
340
|
-
background-color: color-mix(in srgb, var(--md-sys-color-primary), var(--md-sys-color-on-primary) var(--md-sys-state-hover-state-layer-opacity));
|
|
341
|
-
}
|
|
342
348
|
.micl-button__icon {
|
|
343
349
|
font-variation-settings: 'FILL' 1;
|
|
344
350
|
}
|
|
345
351
|
}
|
|
346
352
|
&:focus-visible {
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
&.micl-button--toggle.micl-button--selected {
|
|
350
|
-
background-color: color-mix(in srgb, var(--md-sys-color-primary), var(--md-sys-color-on-primary) var(--md-sys-state-focus-state-layer-opacity));
|
|
351
|
-
}
|
|
353
|
+
--statelayer-opacity: var(--md-sys-state-focus-state-layer-opacity);
|
|
352
354
|
}
|
|
353
355
|
&:active {
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
&.micl-button--toggle.micl-button--selected {
|
|
357
|
-
background-color: color-mix(in srgb, var(--md-sys-color-primary), var(--md-sys-color-on-primary) var(--md-sys-state-pressed-state-layer-opacity));
|
|
358
|
-
}
|
|
356
|
+
--statelayer-opacity: var(--md-sys-state-pressed-state-layer-opacity);
|
|
359
357
|
}
|
|
360
358
|
}
|
|
361
359
|
}
|
|
@@ -373,6 +371,8 @@ button.micl-button-filled-s,
|
|
|
373
371
|
button.micl-button-filled-m,
|
|
374
372
|
button.micl-button-filled-l,
|
|
375
373
|
button.micl-button-filled-xl {
|
|
374
|
+
--statelayer-color: var(--md-sys-color-on-primary);
|
|
375
|
+
|
|
376
376
|
background-color: var(--md-sys-color-primary);
|
|
377
377
|
color: var(--md-sys-color-on-primary);
|
|
378
378
|
|
|
@@ -383,32 +383,23 @@ button.micl-button-filled-xl {
|
|
|
383
383
|
}
|
|
384
384
|
}
|
|
385
385
|
&.micl-button--toggle:not(.micl-button--selected) {
|
|
386
|
+
--statelayer-color: var(--md-sys-color-on-surface-variant);
|
|
387
|
+
|
|
386
388
|
background-color: var(--md-sys-color-surface-container);
|
|
387
389
|
color: var(--md-sys-color-on-surface-variant);
|
|
388
390
|
}
|
|
389
391
|
&:hover {
|
|
390
|
-
|
|
392
|
+
--statelayer-opacity: var(--md-sys-state-hover-state-layer-opacity);
|
|
391
393
|
|
|
392
|
-
&.micl-button--toggle:not(.micl-button--selected) {
|
|
393
|
-
background-color: color-mix(in srgb, var(--md-sys-color-surface-container), var(--md-sys-color-on-surface-variant) var(--md-sys-state-hover-state-layer-opacity));
|
|
394
|
-
}
|
|
395
394
|
.micl-button__icon {
|
|
396
395
|
font-variation-settings: 'FILL' 1;
|
|
397
396
|
}
|
|
398
397
|
}
|
|
399
398
|
&:focus-visible {
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
&.micl-button--toggle:not(.micl-button--selected) {
|
|
403
|
-
background-color: color-mix(in srgb, var(--md-sys-color-surface-container), var(--md-sys-color-on-surface-variant) var(--md-sys-state-focus-state-layer-opacity));
|
|
404
|
-
}
|
|
399
|
+
--statelayer-opacity: var(--md-sys-state-focus-state-layer-opacity);
|
|
405
400
|
}
|
|
406
401
|
&:active {
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
&.micl-button--toggle:not(.micl-button--selected) {
|
|
410
|
-
background-color: color-mix(in srgb, var(--md-sys-color-surface-container), var(--md-sys-color-on-surface-variant) var(--md-sys-state-pressed-state-layer-opacity));
|
|
411
|
-
}
|
|
402
|
+
--statelayer-opacity: var(--md-sys-state-pressed-state-layer-opacity);
|
|
412
403
|
}
|
|
413
404
|
}
|
|
414
405
|
}
|
|
@@ -418,11 +409,15 @@ button.micl-button-tonal-s,
|
|
|
418
409
|
button.micl-button-tonal-m,
|
|
419
410
|
button.micl-button-tonal-l,
|
|
420
411
|
button.micl-button-tonal-xl {
|
|
412
|
+
--statelayer-color: var(--md-sys-color-on-secondary-container);
|
|
413
|
+
|
|
421
414
|
background-color: var(--md-sys-color-secondary-container);
|
|
422
415
|
color: var(--md-sys-color-on-secondary-container);
|
|
423
416
|
|
|
424
417
|
&:not(:disabled) {
|
|
425
418
|
&.micl-button--toggle.micl-button--selected {
|
|
419
|
+
--statelayer-color: var(--md-sys-color-on-secondary);
|
|
420
|
+
|
|
426
421
|
background-color: var(--md-sys-color-secondary);
|
|
427
422
|
color: var(--md-sys-color-on-secondary);
|
|
428
423
|
|
|
@@ -431,28 +426,17 @@ button.micl-button-tonal-xl {
|
|
|
431
426
|
}
|
|
432
427
|
}
|
|
433
428
|
&:hover {
|
|
434
|
-
|
|
429
|
+
--statelayer-opacity: var(--md-sys-state-hover-state-layer-opacity);
|
|
435
430
|
|
|
436
|
-
&.micl-button--toggle.micl-button--selected {
|
|
437
|
-
background-color: color-mix(in srgb, var(--md-sys-color-secondary), var(--md-sys-color-on-secondary) var(--md-sys-state-hover-state-layer-opacity));
|
|
438
|
-
}
|
|
439
431
|
.micl-button__icon {
|
|
440
432
|
font-variation-settings: 'FILL' 1;
|
|
441
433
|
}
|
|
442
434
|
}
|
|
443
435
|
&:focus-visible {
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
&.micl-button--toggle.micl-button--selected {
|
|
447
|
-
background-color: color-mix(in srgb, var(--md-sys-color-secondary), var(--md-sys-color-on-secondary) var(--md-sys-state-focus-state-layer-opacity));
|
|
448
|
-
}
|
|
436
|
+
--statelayer-opacity: var(--md-sys-state-focus-state-layer-opacity);
|
|
449
437
|
}
|
|
450
438
|
&:active {
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
&.micl-button--toggle.micl-button--selected {
|
|
454
|
-
background-color: color-mix(in srgb, var(--md-sys-color-secondary), var(--md-sys-color-on-secondary) var(--md-sys-state-pressed-state-layer-opacity));
|
|
455
|
-
}
|
|
439
|
+
--statelayer-opacity: var(--md-sys-state-pressed-state-layer-opacity);
|
|
456
440
|
}
|
|
457
441
|
}
|
|
458
442
|
}
|
|
@@ -462,11 +446,15 @@ button.micl-button-outlined-s,
|
|
|
462
446
|
button.micl-button-outlined-m,
|
|
463
447
|
button.micl-button-outlined-l,
|
|
464
448
|
button.micl-button-outlined-xl {
|
|
449
|
+
--statelayer-color: var(--md-sys-color-on-surface-variant);
|
|
450
|
+
|
|
465
451
|
background-color: transparent;
|
|
466
452
|
color: var(--md-sys-color-on-surface-variant);
|
|
467
453
|
|
|
468
454
|
&:not(:disabled) {
|
|
469
455
|
&.micl-button--toggle.micl-button--selected {
|
|
456
|
+
--statelayer-color: var(--md-sys-color-inverse-on-surface);
|
|
457
|
+
|
|
470
458
|
background-color: var(--md-sys-color-inverse-surface);
|
|
471
459
|
color: var(--md-sys-color-inverse-on-surface);
|
|
472
460
|
|
|
@@ -475,28 +463,17 @@ button.micl-button-outlined-xl {
|
|
|
475
463
|
}
|
|
476
464
|
}
|
|
477
465
|
&:hover {
|
|
478
|
-
|
|
466
|
+
--statelayer-opacity: var(--md-sys-state-hover-state-layer-opacity);
|
|
479
467
|
|
|
480
|
-
&.micl-button--toggle.micl-button--selected {
|
|
481
|
-
background-color: color-mix(in srgb, var(--md-sys-color-inverse-surface), var(--md-sys-color-inverse-on-surface) var(--md-sys-state-hover-state-layer-opacity));
|
|
482
|
-
}
|
|
483
468
|
.micl-button__icon {
|
|
484
469
|
font-variation-settings: 'FILL' 1;
|
|
485
470
|
}
|
|
486
471
|
}
|
|
487
472
|
&:focus-visible {
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
&.micl-button--toggle.micl-button--selected {
|
|
491
|
-
background-color: color-mix(in srgb, var(--md-sys-color-inverse-surface), var(--md-sys-color-inverse-on-surface) var(--md-sys-state-focus-state-layer-opacity));
|
|
492
|
-
}
|
|
473
|
+
--statelayer-opacity: var(--md-sys-state-focus-state-layer-opacity);
|
|
493
474
|
}
|
|
494
475
|
&:active {
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
&.micl-button--toggle.micl-button--selected {
|
|
498
|
-
background-color: color-mix(in srgb, var(--md-sys-color-inverse-surface), var(--md-sys-color-inverse-on-surface) var(--md-sys-state-pressed-state-layer-opacity));
|
|
499
|
-
}
|
|
476
|
+
--statelayer-opacity: var(--md-sys-state-pressed-state-layer-opacity);
|
|
500
477
|
}
|
|
501
478
|
}
|
|
502
479
|
}
|
|
@@ -21,7 +21,6 @@
|
|
|
21
21
|
|
|
22
22
|
@use '../../styles/elevation';
|
|
23
23
|
@use '../../styles/motion';
|
|
24
|
-
@use '../../styles/ripple';
|
|
25
24
|
@use '../../styles/shapes';
|
|
26
25
|
@use '../../styles/statelayer';
|
|
27
26
|
@use '../../styles/typography';
|
|
@@ -34,6 +33,9 @@
|
|
|
34
33
|
.micl-card-elevated,
|
|
35
34
|
.micl-card-filled,
|
|
36
35
|
.micl-card-outlined {
|
|
36
|
+
--md-sys-card-motion-spatial: #{motion.$md-sys-motion-expressive-default-spatial};
|
|
37
|
+
--md-sys-card-motion-duration: #{motion.$md-sys-motion-expressive-default-spatial-duration};
|
|
38
|
+
|
|
37
39
|
height: fit-content;
|
|
38
40
|
margin: var(--md-sys-card-margin);
|
|
39
41
|
border-radius: var(--md-sys-shape-corner-medium);
|
|
@@ -42,18 +44,45 @@
|
|
|
42
44
|
|
|
43
45
|
&[tabindex='0']:not(.micl-card--disabled) {
|
|
44
46
|
--miclripple: 1;
|
|
47
|
+
--statelayer-color: var(--md-sys-color-on-surface);
|
|
45
48
|
|
|
46
|
-
|
|
49
|
+
background-image:
|
|
50
|
+
radial-gradient(circle at var(--x, center) var(--y, center), transparent 0%, rgb(from var(--statelayer-color) r g b / var(--statelayer-opacity)) 10%, transparent 10%),
|
|
51
|
+
linear-gradient(rgb(from var(--statelayer-color) r g b / var(--statelayer-opacity)));
|
|
52
|
+
background-repeat: no-repeat;
|
|
53
|
+
background-size: 10000%, 100%;
|
|
54
|
+
transition:
|
|
55
|
+
background-size 3000ms,
|
|
56
|
+
--statelayer-opacity var(--md-sys-card-motion-duration) linear;
|
|
47
57
|
|
|
48
58
|
&:hover {
|
|
59
|
+
--statelayer-opacity: var(--md-sys-state-hover-state-layer-opacity);
|
|
60
|
+
|
|
49
61
|
box-shadow: var(--md-sys-elevation-level1);
|
|
50
62
|
cursor: pointer;
|
|
51
63
|
}
|
|
52
64
|
&:focus-visible {
|
|
65
|
+
--statelayer-opacity: var(--md-sys-state-focus-state-layer-opacity);
|
|
66
|
+
|
|
53
67
|
outline: var(--md-sys-state-focus-indicator-thickness) solid var(--md-sys-color-secondary);
|
|
54
68
|
outline-offset: var(--md-sys-state-focus-indicator-outer-offset);
|
|
55
69
|
box-shadow: var(--md-sys-elevation-level1);
|
|
56
70
|
}
|
|
71
|
+
&:active {
|
|
72
|
+
--statelayer-opacity: var(--md-sys-state-pressed-state-layer-opacity);
|
|
73
|
+
|
|
74
|
+
background-size: 0%, 100%;
|
|
75
|
+
transition: background-size 0ms;
|
|
76
|
+
}
|
|
77
|
+
&.micl-card--dragging {
|
|
78
|
+
--statelayer-opacity: var(--md-sys-state-dragged-state-layer-opacity);
|
|
79
|
+
|
|
80
|
+
box-shadow: var(--md-sys-elevation-level3);
|
|
81
|
+
cursor: grabbing;
|
|
82
|
+
}
|
|
83
|
+
.micl-card__content {
|
|
84
|
+
background-color: transparent;
|
|
85
|
+
}
|
|
57
86
|
}
|
|
58
87
|
&:not([tabindex='0']):not(.micl-card--disabled):has(> summary:focus-visible) {
|
|
59
88
|
outline: var(--md-sys-state-focus-indicator-thickness) solid var(--md-sys-color-secondary);
|
|
@@ -63,8 +92,8 @@
|
|
|
63
92
|
height: 0;
|
|
64
93
|
overflow: hidden;
|
|
65
94
|
transition:
|
|
66
|
-
|
|
67
|
-
|
|
95
|
+
height var(--md-sys-card-motion-duration) var(--md-sys-card-motion-spatial),
|
|
96
|
+
content-visibility var(--md-sys-card-motion-duration) linear allow-discrete;
|
|
68
97
|
}
|
|
69
98
|
&[open]::details-content {
|
|
70
99
|
height: auto;
|
|
@@ -83,20 +112,13 @@
|
|
|
83
112
|
|
|
84
113
|
&[tabindex='0']:not(.micl-card--disabled) {
|
|
85
114
|
&:hover {
|
|
86
|
-
background-color: color-mix(in srgb, var(--md-sys-color-surface-container-low), var(--md-sys-color-on-surface) var(--md-sys-state-hover-state-layer-opacity));
|
|
87
115
|
box-shadow: var(--md-sys-elevation-level2);
|
|
88
116
|
}
|
|
89
|
-
&:focus-visible {
|
|
90
|
-
background-color: color-mix(in srgb, var(--md-sys-color-surface-container-low), var(--md-sys-color-on-surface) var(--md-sys-state-focus-state-layer-opacity));
|
|
91
|
-
}
|
|
92
117
|
&:active {
|
|
93
|
-
background-color: color-mix(in srgb, var(--md-sys-color-surface-container-low), var(--md-sys-color-on-surface) var(--md-sys-state-pressed-state-layer-opacity));
|
|
94
118
|
box-shadow: var(--md-sys-elevation-level1);
|
|
95
119
|
}
|
|
96
120
|
&.micl-card--dragging {
|
|
97
|
-
background-color: color-mix(in srgb, var(--md-sys-color-surface-container-low), var(--md-sys-color-on-surface) var(--md-sys-state-dragged-state-layer-opacity));
|
|
98
121
|
box-shadow: var(--md-sys-elevation-level4);
|
|
99
|
-
cursor: grabbing;
|
|
100
122
|
}
|
|
101
123
|
}
|
|
102
124
|
}
|
|
@@ -105,22 +127,12 @@
|
|
|
105
127
|
box-shadow: var(--md-sys-elevation-level0);
|
|
106
128
|
|
|
107
129
|
&[tabindex='0']:not(.micl-card--disabled) {
|
|
108
|
-
&:hover {
|
|
109
|
-
background-color: color-mix(in srgb, var(--md-sys-color-surface-container-highest), var(--md-sys-color-on-surface) var(--md-sys-state-hover-state-layer-opacity));
|
|
110
|
-
}
|
|
111
130
|
&:focus-visible {
|
|
112
|
-
background-color: color-mix(in srgb, var(--md-sys-color-surface-container-highest), var(--md-sys-color-on-surface) var(--md-sys-state-focus-state-layer-opacity));
|
|
113
131
|
box-shadow: var(--md-sys-elevation-level0);
|
|
114
132
|
}
|
|
115
133
|
&:active {
|
|
116
|
-
background-color: color-mix(in srgb, var(--md-sys-color-surface-container-highest), var(--md-sys-color-on-surface) var(--md-sys-state-pressed-state-layer-opacity));
|
|
117
134
|
box-shadow: var(--md-sys-elevation-level0);
|
|
118
135
|
}
|
|
119
|
-
&.micl-card--dragging {
|
|
120
|
-
background-color: color-mix(in srgb, var(--md-sys-color-surface-container-highest), var(--md-sys-color-on-surface) var(--md-sys-state-dragged-state-layer-opacity));
|
|
121
|
-
box-shadow: var(--md-sys-elevation-level3);
|
|
122
|
-
cursor: grabbing;
|
|
123
|
-
}
|
|
124
136
|
}
|
|
125
137
|
}
|
|
126
138
|
.micl-card-outlined {
|
|
@@ -129,24 +141,14 @@
|
|
|
129
141
|
border: 1px solid var(--md-sys-color-outline-variant);
|
|
130
142
|
|
|
131
143
|
&[tabindex='0']:not(.micl-card--disabled) {
|
|
132
|
-
&:hover {
|
|
133
|
-
background-color: color-mix(in srgb, var(--md-sys-color-surface), var(--md-sys-color-on-surface) var(--md-sys-state-hover-state-layer-opacity));
|
|
134
|
-
}
|
|
135
144
|
&:focus-visible {
|
|
136
145
|
border-color: var(--md-sys-color-on-surface);
|
|
137
|
-
background-color: color-mix(in srgb, var(--md-sys-color-surface), var(--md-sys-color-on-surface) var(--md-sys-state-focus-state-layer-opacity));
|
|
138
146
|
box-shadow: var(--md-sys-elevation-level0);
|
|
139
147
|
}
|
|
140
148
|
&:active {
|
|
141
149
|
border-color: var(--md-sys-color-outline-variant);
|
|
142
|
-
background-color: color-mix(in srgb, var(--md-sys-color-surface), var(--md-sys-color-on-surface) var(--md-sys-state-pressed-state-layer-opacity));
|
|
143
150
|
box-shadow: var(--md-sys-elevation-level0);
|
|
144
151
|
}
|
|
145
|
-
&.micl-card--dragging {
|
|
146
|
-
background-color: color-mix(in srgb, var(--md-sys-color-surface), var(--md-sys-color-on-surface) var(--md-sys-state-dragged-state-layer-opacity));
|
|
147
|
-
box-shadow: var(--md-sys-elevation-level3);
|
|
148
|
-
cursor: grabbing;
|
|
149
|
-
}
|
|
150
152
|
}
|
|
151
153
|
}
|
|
152
154
|
|
|
@@ -20,7 +20,6 @@
|
|
|
20
20
|
// SOFTWARE.
|
|
21
21
|
|
|
22
22
|
@use '../../styles/motion';
|
|
23
|
-
@use '../../styles/ripple';
|
|
24
23
|
@use '../../styles/statelayer';
|
|
25
24
|
@use '../../styles/typography';
|
|
26
25
|
|
|
@@ -53,7 +52,7 @@
|
|
|
53
52
|
}
|
|
54
53
|
|
|
55
54
|
input[type=checkbox].micl-checkbox {
|
|
56
|
-
--md-sys-
|
|
55
|
+
--md-sys-checkbox-motion-duration: #{motion.$md-sys-motion-expressive-slow-effects-duration};
|
|
57
56
|
--checkbox-container-color: transparent;
|
|
58
57
|
--checkbox-container-border-color: var(--md-sys-color-on-surface-variant);
|
|
59
58
|
|
|
@@ -119,13 +118,12 @@ input[type=checkbox].micl-checkbox {
|
|
|
119
118
|
var(--md-sys-checkbox-container-size) var(--md-sys-checkbox-container-size);
|
|
120
119
|
clip-path: circle(var(--md-sys-checkbox-state-layer-radius));
|
|
121
120
|
transition:
|
|
122
|
-
--checkbox-outline-color var(--md-sys-motion-duration
|
|
123
|
-
--checkbox-state-layer-color var(--md-sys-motion-duration
|
|
124
|
-
--checkbox-container-color var(--md-sys-motion-duration
|
|
125
|
-
--checkbox-container-border-color var(--md-sys-motion-duration
|
|
121
|
+
--checkbox-outline-color var(--md-sys-checkbox-motion-duration),
|
|
122
|
+
--checkbox-state-layer-color var(--md-sys-checkbox-motion-duration),
|
|
123
|
+
--checkbox-container-color var(--md-sys-checkbox-motion-duration) var(--md-sys-motion-duration-short4),
|
|
124
|
+
--checkbox-container-border-color var(--md-sys-checkbox-motion-duration);
|
|
126
125
|
|
|
127
126
|
&.micl-checkbox--error {
|
|
128
|
-
--md-sys-ripple-background-color: var(--md-sys-color-error);
|
|
129
127
|
--checkbox-container-border-color: var(--md-sys-color-error);
|
|
130
128
|
}
|
|
131
129
|
&::after {
|
|
@@ -177,8 +175,6 @@ input[type=checkbox].micl-checkbox {
|
|
|
177
175
|
&:not(:disabled) {
|
|
178
176
|
--miclripple: 1;
|
|
179
177
|
|
|
180
|
-
@include ripple.effect;
|
|
181
|
-
|
|
182
178
|
cursor: pointer;
|
|
183
179
|
|
|
184
180
|
&:hover {
|