opui-css 5.3.0 → 5.4.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/CHANGELOG.md +4 -0
- package/core/normalize.css +24 -10
- package/core/utils.css +1 -3
- package/css/components/accordion.css +4 -5
- package/css/components/button.css +5 -4
- package/css/components/dialog.css +8 -13
- package/css/components/drawer.css +2 -1
- package/css/components/icon-button.css +8 -10
- package/css/components/progress.css +23 -27
- package/css/components/range.css +3 -6
- package/css/components/select.css +6 -7
- package/css/components/switch.css +17 -18
- package/css/components/text-field.css +3 -3
- package/dist/opui.components.css +79 -94
- package/dist/opui.components.css.map +1 -1
- package/dist/opui.css +104 -107
- package/dist/opui.css.map +1 -1
- package/package.json +1 -1
package/dist/opui.components.css
CHANGED
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
@layer components.root {
|
|
8
8
|
:where(.ui-button) {
|
|
9
|
+
--_motion: var(--motion, 1);
|
|
9
10
|
--_color: light-dark(var(--color-16), var(--color-1));
|
|
10
11
|
--_color-contrast: light-dark(var(--color-1), var(--color-16));
|
|
11
12
|
--_color-tonal: var(--surface-tonal);
|
|
@@ -60,10 +61,10 @@
|
|
|
60
61
|
text-align: center;
|
|
61
62
|
text-decoration: none;
|
|
62
63
|
transition:
|
|
63
|
-
background-color 0.1s ease,
|
|
64
|
-
color 0.1s ease,
|
|
65
|
-
border-color 0.1s ease,
|
|
66
|
-
box-shadow 0.1s ease;
|
|
64
|
+
background-color calc(0.1s * var(--_motion)) ease,
|
|
65
|
+
color calc(0.1s * var(--_motion)) ease,
|
|
66
|
+
border-color calc(0.1s * var(--_motion)) ease,
|
|
67
|
+
box-shadow calc(0.1s * var(--_motion)) ease;
|
|
67
68
|
user-select: none;
|
|
68
69
|
|
|
69
70
|
/* Colors — shared interaction model for critical and primary.
|
|
@@ -347,6 +348,7 @@
|
|
|
347
348
|
|
|
348
349
|
@layer components.root {
|
|
349
350
|
:where(.ui-icon-button) {
|
|
351
|
+
--_motion: var(--motion, 1);
|
|
350
352
|
--_color: light-dark(var(--color-16), var(--color-1));
|
|
351
353
|
--_color-contrast: light-dark(var(--color-1), var(--color-16));
|
|
352
354
|
--_color-tonal: var(--surface-tonal);
|
|
@@ -391,10 +393,10 @@
|
|
|
391
393
|
padding: 0;
|
|
392
394
|
transform-style: preserve-3d;
|
|
393
395
|
transition:
|
|
394
|
-
background-color 0.1s ease,
|
|
395
|
-
color 0.1s ease,
|
|
396
|
-
border-color 0.1s ease,
|
|
397
|
-
box-shadow 0.1s ease;
|
|
396
|
+
background-color calc(0.1s * var(--_motion)) ease,
|
|
397
|
+
color calc(0.1s * var(--_motion)) ease,
|
|
398
|
+
border-color calc(0.1s * var(--_motion)) ease,
|
|
399
|
+
box-shadow calc(0.1s * var(--_motion)) ease;
|
|
398
400
|
|
|
399
401
|
&:where([disabled]) {
|
|
400
402
|
--_text-color: light-dark(rgb(0, 0, 0/0.3), rgb(255, 255, 255/0.26));
|
|
@@ -414,12 +416,9 @@
|
|
|
414
416
|
&::before {
|
|
415
417
|
--highlight-size: 130%;
|
|
416
418
|
background-color: transparent;
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
transform 0.2s ease,
|
|
421
|
-
background-color 0.1s ease;
|
|
422
|
-
}
|
|
419
|
+
transition:
|
|
420
|
+
transform calc(0.2s * var(--_motion)) ease,
|
|
421
|
+
background-color calc(0.1s * var(--_motion)) ease;
|
|
423
422
|
}
|
|
424
423
|
|
|
425
424
|
/* Colors — shared interaction model for critical and primary.
|
|
@@ -1343,6 +1342,7 @@
|
|
|
1343
1342
|
|
|
1344
1343
|
@layer components.root {
|
|
1345
1344
|
:where(.ui-progress) {
|
|
1345
|
+
--_motion: var(--motion, 1);
|
|
1346
1346
|
--_accent-color: var(--primary);
|
|
1347
1347
|
--_bg-color: var(--surface-tonal);
|
|
1348
1348
|
|
|
@@ -1383,11 +1383,8 @@
|
|
|
1383
1383
|
|
|
1384
1384
|
&[value]::-webkit-progress-value {
|
|
1385
1385
|
background-color: var(--_accent-color);
|
|
1386
|
-
|
|
1387
|
-
|
|
1388
|
-
transition: inline-size 0.2s
|
|
1389
|
-
var(--ease-out-4, cubic-bezier(0, 0, 0.1, 1));
|
|
1390
|
-
}
|
|
1386
|
+
transition: inline-size calc(0.2s * var(--_motion))
|
|
1387
|
+
var(--ease-out-4, cubic-bezier(0, 0, 0.1, 1));
|
|
1391
1388
|
}
|
|
1392
1389
|
|
|
1393
1390
|
&::-moz-progress-bar {
|
|
@@ -1396,33 +1393,31 @@
|
|
|
1396
1393
|
}
|
|
1397
1394
|
}
|
|
1398
1395
|
|
|
1399
|
-
|
|
1400
|
-
|
|
1401
|
-
|
|
1402
|
-
|
|
1403
|
-
|
|
1404
|
-
|
|
1405
|
-
|
|
1406
|
-
|
|
1407
|
-
|
|
1408
|
-
}
|
|
1396
|
+
:where(.ui-progress):has(> progress:indeterminate) {
|
|
1397
|
+
&::after {
|
|
1398
|
+
animation: indeterminate calc(2s * var(--motion, 1)) linear infinite;
|
|
1399
|
+
background-color: var(--_accent-color);
|
|
1400
|
+
content: "";
|
|
1401
|
+
inset: 0 auto 0 0;
|
|
1402
|
+
position: absolute;
|
|
1403
|
+
will-change: inset-inline-start, inset-inline-end;
|
|
1404
|
+
}
|
|
1409
1405
|
|
|
1410
|
-
|
|
1411
|
-
|
|
1412
|
-
|
|
1413
|
-
|
|
1406
|
+
& > progress {
|
|
1407
|
+
&::-webkit-progress-value {
|
|
1408
|
+
background-color: transparent;
|
|
1409
|
+
}
|
|
1414
1410
|
|
|
1415
|
-
|
|
1416
|
-
|
|
1417
|
-
}
|
|
1411
|
+
&::-moz-progress-bar {
|
|
1412
|
+
background-color: transparent;
|
|
1418
1413
|
}
|
|
1419
1414
|
}
|
|
1415
|
+
}
|
|
1420
1416
|
|
|
1421
|
-
|
|
1422
|
-
|
|
1423
|
-
|
|
1424
|
-
|
|
1425
|
-
}
|
|
1417
|
+
[dir="rtl"] {
|
|
1418
|
+
:where(.ui-progress):has(> progress:indeterminate) {
|
|
1419
|
+
&::after {
|
|
1420
|
+
animation-direction: reverse;
|
|
1426
1421
|
}
|
|
1427
1422
|
}
|
|
1428
1423
|
}
|
|
@@ -1869,6 +1864,7 @@
|
|
|
1869
1864
|
|
|
1870
1865
|
@layer components.root {
|
|
1871
1866
|
:where(.ui-range) {
|
|
1867
|
+
--_motion: var(--motion, 1);
|
|
1872
1868
|
display: grid;
|
|
1873
1869
|
gap: var(--size-1) 0;
|
|
1874
1870
|
/* Two-column base so the optional .value cell can sit next to the
|
|
@@ -2142,9 +2138,7 @@
|
|
|
2142
2138
|
inline-size: var(--_thumb-size);
|
|
2143
2139
|
margin-block-start: var(--_thumb-offset);
|
|
2144
2140
|
|
|
2145
|
-
|
|
2146
|
-
transition: box-shadow 0.1s ease;
|
|
2147
|
-
}
|
|
2141
|
+
transition: box-shadow calc(0.1s * var(--_motion)) ease;
|
|
2148
2142
|
|
|
2149
2143
|
.ui-fieldset-item:focus-within & {
|
|
2150
2144
|
border-color: var(--gray-14);
|
|
@@ -2163,9 +2157,7 @@
|
|
|
2163
2157
|
inline-size: var(--_thumb-size);
|
|
2164
2158
|
margin-block-start: var(--_thumb-offset);
|
|
2165
2159
|
|
|
2166
|
-
|
|
2167
|
-
transition: box-shadow 0.1s ease;
|
|
2168
|
-
}
|
|
2160
|
+
transition: box-shadow calc(0.1s * var(--_motion)) ease;
|
|
2169
2161
|
|
|
2170
2162
|
.ui-fieldset-item:focus-within & {
|
|
2171
2163
|
border-color: var(--gray-14);
|
|
@@ -2212,6 +2204,7 @@
|
|
|
2212
2204
|
|
|
2213
2205
|
@layer components.root {
|
|
2214
2206
|
:where(.ui-switch) {
|
|
2207
|
+
--_motion: var(--motion, 1);
|
|
2215
2208
|
--_accent-color: var(--primary);
|
|
2216
2209
|
--_accent-contrast: var(--primary-contrast);
|
|
2217
2210
|
|
|
@@ -2224,7 +2217,7 @@
|
|
|
2224
2217
|
--_track-height: var(--size-5);
|
|
2225
2218
|
--_track-width: var(--size-8);
|
|
2226
2219
|
--_transition-tf: var(--ease-4);
|
|
2227
|
-
--_transition-time: 0.2s;
|
|
2220
|
+
--_transition-time: calc(0.2s * var(--_motion));
|
|
2228
2221
|
|
|
2229
2222
|
align-items: center;
|
|
2230
2223
|
color: var(--text-primary);
|
|
@@ -2296,28 +2289,26 @@
|
|
|
2296
2289
|
}
|
|
2297
2290
|
|
|
2298
2291
|
/* Animation */
|
|
2299
|
-
|
|
2300
|
-
|
|
2301
|
-
|
|
2302
|
-
|
|
2303
|
-
|
|
2304
|
-
|
|
2305
|
-
}
|
|
2292
|
+
/* Track */
|
|
2293
|
+
&::before {
|
|
2294
|
+
transition:
|
|
2295
|
+
background-color var(--_transition-time) var(--_transition-tf),
|
|
2296
|
+
border-color var(--_transition-time) var(--_transition-tf);
|
|
2297
|
+
}
|
|
2306
2298
|
|
|
2307
|
-
|
|
2308
|
-
|
|
2309
|
-
|
|
2310
|
-
|
|
2299
|
+
/* Dot */
|
|
2300
|
+
&::after {
|
|
2301
|
+
transition: all var(--_transition-time) var(--_transition-tf);
|
|
2302
|
+
}
|
|
2311
2303
|
|
|
2304
|
+
&:active:after {
|
|
2305
|
+
--_dot-outline-size: calc(var(--size-1) + 1px);
|
|
2306
|
+
}
|
|
2307
|
+
|
|
2308
|
+
&:checked {
|
|
2312
2309
|
&:active:after {
|
|
2313
2310
|
--_dot-outline-size: calc(var(--size-1) + 1px);
|
|
2314
2311
|
}
|
|
2315
|
-
|
|
2316
|
-
&:checked {
|
|
2317
|
-
&:active:after {
|
|
2318
|
-
--_dot-outline-size: calc(var(--size-1) + 1px);
|
|
2319
|
-
}
|
|
2320
|
-
}
|
|
2321
2312
|
}
|
|
2322
2313
|
}
|
|
2323
2314
|
|
|
@@ -3536,6 +3527,7 @@
|
|
|
3536
3527
|
|
|
3537
3528
|
@layer components.extended {
|
|
3538
3529
|
:where(details.ui-accordion) {
|
|
3530
|
+
--_motion: var(--motion, 1);
|
|
3539
3531
|
--_actions-gap: var(--size-1);
|
|
3540
3532
|
--_actions-margin-block-start: var(--size-3);
|
|
3541
3533
|
--_actions-padding-block-end: var(--size-1);
|
|
@@ -3551,8 +3543,8 @@
|
|
|
3551
3543
|
--_shadow: none;
|
|
3552
3544
|
--_summary-padding-block: var(--size-3);
|
|
3553
3545
|
--_summary-padding-inline: var(--_padding-inline);
|
|
3554
|
-
--_svg-transition: 0.2s var(--ease-1);
|
|
3555
|
-
--_transition: 0.2s;
|
|
3546
|
+
--_svg-transition: calc(0.2s * var(--_motion)) var(--ease-1);
|
|
3547
|
+
--_transition: calc(0.2s * var(--_motion));
|
|
3556
3548
|
|
|
3557
3549
|
background-color: var(--_bg-color);
|
|
3558
3550
|
border: var(--_border-width) solid var(--_border-color);
|
|
@@ -3585,9 +3577,7 @@
|
|
|
3585
3577
|
|
|
3586
3578
|
/* Accordion animation */
|
|
3587
3579
|
/* https://nerdy.dev/open-and-close-transitions-for-the-details-element */
|
|
3588
|
-
|
|
3589
|
-
interpolate-size: allow-keywords;
|
|
3590
|
-
}
|
|
3580
|
+
interpolate-size: allow-keywords;
|
|
3591
3581
|
|
|
3592
3582
|
&::details-content {
|
|
3593
3583
|
block-size: 0;
|
|
@@ -4055,6 +4045,7 @@ Lists meant to be used stand-alone or as part of Select elements
|
|
|
4055
4045
|
|
|
4056
4046
|
@layer components.extended {
|
|
4057
4047
|
:where(.ui-dialog) {
|
|
4048
|
+
--_motion: var(--motion, 1);
|
|
4058
4049
|
inline-size: 100%;
|
|
4059
4050
|
inset: 0;
|
|
4060
4051
|
margin: auto;
|
|
@@ -4075,10 +4066,6 @@ Lists meant to be used stand-alone or as part of Select elements
|
|
|
4075
4066
|
&::backdrop {
|
|
4076
4067
|
backdrop-filter: blur(1px);
|
|
4077
4068
|
background-color: rgba(0, 0, 0, 0.5);
|
|
4078
|
-
|
|
4079
|
-
@media (prefers-reduced-motion: reduce) {
|
|
4080
|
-
backdrop-filter: none;
|
|
4081
|
-
}
|
|
4082
4069
|
}
|
|
4083
4070
|
|
|
4084
4071
|
&:not([open]) {
|
|
@@ -4097,22 +4084,20 @@ Lists meant to be used stand-alone or as part of Select elements
|
|
|
4097
4084
|
&[open] {
|
|
4098
4085
|
opacity: 1;
|
|
4099
4086
|
transition:
|
|
4100
|
-
display 0.2s allow-discrete,
|
|
4101
|
-
overlay 0.2s allow-discrete,
|
|
4102
|
-
opacity 0.2s var(--ease-out-1);
|
|
4087
|
+
display calc(0.2s * var(--_motion)) allow-discrete,
|
|
4088
|
+
overlay calc(0.2s * var(--_motion)) allow-discrete,
|
|
4089
|
+
opacity calc(0.2s * var(--_motion)) var(--ease-out-1);
|
|
4103
4090
|
|
|
4104
4091
|
@starting-style {
|
|
4105
4092
|
opacity: 0;
|
|
4106
4093
|
}
|
|
4107
4094
|
}
|
|
4108
4095
|
|
|
4109
|
-
|
|
4110
|
-
|
|
4111
|
-
margin-block-start: 15%;
|
|
4096
|
+
&[open] {
|
|
4097
|
+
margin-block-start: 15%;
|
|
4112
4098
|
|
|
4113
|
-
|
|
4114
|
-
|
|
4115
|
-
}
|
|
4099
|
+
@starting-style {
|
|
4100
|
+
opacity: 0;
|
|
4116
4101
|
}
|
|
4117
4102
|
}
|
|
4118
4103
|
}
|
|
@@ -4125,6 +4110,7 @@ Lists meant to be used stand-alone or as part of Select elements
|
|
|
4125
4110
|
|
|
4126
4111
|
@layer components.root {
|
|
4127
4112
|
:where(dialog.ui-drawer) {
|
|
4113
|
+
--_motion: var(--motion, 1);
|
|
4128
4114
|
--_backdrop-bg-color: transparent;
|
|
4129
4115
|
--_backdrop-blur: blur(2px);
|
|
4130
4116
|
--_bg-color: var(--surface-default);
|
|
@@ -4139,7 +4125,7 @@ Lists meant to be used stand-alone or as part of Select elements
|
|
|
4139
4125
|
--_header-padding: var(--size-3);
|
|
4140
4126
|
--_inline-size: min(375px, 100vi);
|
|
4141
4127
|
--_shadow: var(--shadow-2);
|
|
4142
|
-
--_transition-duration: 0.2s;
|
|
4128
|
+
--_transition-duration: calc(0.2s * var(--_motion));
|
|
4143
4129
|
--_transition-timing: var(--ease-out-3);
|
|
4144
4130
|
|
|
4145
4131
|
background-color: var(--_bg-color);
|
|
@@ -4449,6 +4435,7 @@ Lists meant to be used stand-alone or as part of Select elements
|
|
|
4449
4435
|
- Form related styles such as: label, supporting text, error handling
|
|
4450
4436
|
*/
|
|
4451
4437
|
:where(.ui-text-field, .ui-textarea, .ui-select) {
|
|
4438
|
+
--_motion: var(--motion, 1);
|
|
4452
4439
|
--_accent-color: var(--primary);
|
|
4453
4440
|
--_bg-color: var(--surface-default);
|
|
4454
4441
|
--_border-color: var(--field-border-color);
|
|
@@ -4478,9 +4465,8 @@ Lists meant to be used stand-alone or as part of Select elements
|
|
|
4478
4465
|
"footer footer footer";
|
|
4479
4466
|
min-block-size: var(--_height);
|
|
4480
4467
|
|
|
4481
|
-
|
|
4482
|
-
|
|
4483
|
-
}
|
|
4468
|
+
transition: border-color calc(0.2s * var(--_motion))
|
|
4469
|
+
cubic-bezier(0.4, 0, 0.2, 1);
|
|
4484
4470
|
}
|
|
4485
4471
|
|
|
4486
4472
|
:where(.ui-field) :where(input, textarea, select) {
|
|
@@ -4895,6 +4881,7 @@ Lists meant to be used stand-alone or as part of Select elements
|
|
|
4895
4881
|
|
|
4896
4882
|
@layer components.extended {
|
|
4897
4883
|
:where(.ui-select select) {
|
|
4884
|
+
--_motion: var(--motion, 1);
|
|
4898
4885
|
position: relative;
|
|
4899
4886
|
|
|
4900
4887
|
/* Default arrow */
|
|
@@ -4932,13 +4919,11 @@ Lists meant to be used stand-alone or as part of Select elements
|
|
|
4932
4919
|
transform: scale(0.9);
|
|
4933
4920
|
}
|
|
4934
4921
|
|
|
4935
|
-
|
|
4936
|
-
|
|
4937
|
-
|
|
4938
|
-
|
|
4939
|
-
|
|
4940
|
-
scale 0.2s var(--ease-3);
|
|
4941
|
-
}
|
|
4922
|
+
transition:
|
|
4923
|
+
display calc(0.2s * var(--_motion)) allow-discrete,
|
|
4924
|
+
opacity calc(0.2s * var(--_motion)) var(--ease-3),
|
|
4925
|
+
overlay calc(0.2s * var(--_motion)) allow-discrete,
|
|
4926
|
+
scale calc(0.2s * var(--_motion)) var(--ease-3);
|
|
4942
4927
|
}
|
|
4943
4928
|
|
|
4944
4929
|
/* Animation off-stage styles */
|