opui-css 4.1.0 → 5.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 (114) hide show
  1. package/CHANGELOG.md +282 -247
  2. package/LICENSE +21 -21
  3. package/MIGRATING.md +127 -105
  4. package/README.md +87 -87
  5. package/astro/index.ts +46 -46
  6. package/components/AGENTS.md +248 -247
  7. package/components/Accordion/Accordion.astro +42 -42
  8. package/components/Anchor/Anchor.astro +51 -51
  9. package/components/Avatar/Avatar.astro +38 -44
  10. package/components/Badge/Badge.astro +59 -54
  11. package/components/Button/Button.astro +45 -45
  12. package/components/ButtonGroup/ButtonGroup.astro +29 -29
  13. package/components/Callout/Callout.astro +75 -75
  14. package/components/Card/Card.astro +36 -36
  15. package/components/Checkbox/Checkbox.astro +76 -76
  16. package/components/Checkbox/CheckboxInput.astro +32 -32
  17. package/components/Chip/Chip.astro +37 -37
  18. package/components/ClassicSelect/ClassicSelect.astro +83 -83
  19. package/components/DescriptionList/Description.astro +12 -12
  20. package/components/DescriptionList/DescriptionList.astro +22 -22
  21. package/components/DescriptionList/Item.astro +12 -12
  22. package/components/DescriptionList/Term.astro +12 -12
  23. package/components/DescriptionList/index.ts +12 -12
  24. package/components/Dialog/Dialog.astro +41 -41
  25. package/components/Divider/Divider.astro +17 -14
  26. package/components/Drawer/Drawer.astro +49 -49
  27. package/components/Drawer/DrawerFooter.astro +14 -14
  28. package/components/Drawer/DrawerHeader.astro +31 -31
  29. package/components/FieldDescription/FieldDescription.astro +13 -13
  30. package/components/FieldGroup/FieldGroup.astro +31 -31
  31. package/components/FieldLegend/FieldLegend.astro +15 -15
  32. package/components/FieldSet/FieldSet.astro +15 -15
  33. package/components/Form/Form.astro +15 -15
  34. package/components/IconButton/IconButton.astro +26 -26
  35. package/components/List/List.astro +36 -36
  36. package/components/ListItem/ListItem.astro +118 -118
  37. package/components/Progress/Progress.astro +41 -40
  38. package/components/Radio/Radio.astro +70 -70
  39. package/components/Radio/RadioInput.astro +24 -24
  40. package/components/Range/Range.astro +136 -136
  41. package/components/Select/Select.astro +106 -106
  42. package/components/Switch/Switch.astro +101 -101
  43. package/components/Switch/SwitchInput.astro +25 -25
  44. package/components/Table/Body.astro +13 -13
  45. package/components/Table/Cell.astro +13 -13
  46. package/components/Table/Column.astro +15 -15
  47. package/components/Table/ColumnGroup.astro +13 -13
  48. package/components/Table/Head.astro +13 -13
  49. package/components/Table/HeaderCell.astro +13 -13
  50. package/components/Table/Row.astro +13 -13
  51. package/components/Table/Table.astro +18 -15
  52. package/components/Table/index.ts +20 -20
  53. package/components/Tabs/Tabs.astro +28 -28
  54. package/components/Tabs/TabsItem.astro +47 -47
  55. package/components/Tabs/TabsPanel.astro +21 -21
  56. package/components/Tabs/TabsTab.astro +19 -19
  57. package/components/Tabs/index.ts +14 -14
  58. package/components/TextField/TextField.astro +128 -128
  59. package/components/Textarea/Textarea.astro +106 -106
  60. package/components/Toast/Toast.astro +42 -42
  61. package/components/ToggleButton/ToggleButton.astro +53 -53
  62. package/components/ToggleGroup/ToggleGroup.astro +49 -49
  63. package/components/Tooltip/Tooltip.astro +30 -30
  64. package/core/normalize.css +194 -194
  65. package/core/palette.css +59 -59
  66. package/core/utils.css +71 -71
  67. package/css/components/accordion.css +174 -174
  68. package/css/components/anchor.css +27 -27
  69. package/css/components/avatar.css +65 -65
  70. package/css/components/badge.css +107 -107
  71. package/css/components/button-group.css +179 -179
  72. package/css/components/button.css +215 -215
  73. package/css/components/callout.css +109 -109
  74. package/css/components/card.css +117 -117
  75. package/css/components/checkbox.css +205 -205
  76. package/css/components/chip.css +87 -87
  77. package/css/components/description-list.css +80 -77
  78. package/css/components/dialog.css +68 -68
  79. package/css/components/divider.css +20 -20
  80. package/css/components/drawer.css +171 -171
  81. package/css/components/form.css +146 -146
  82. package/css/components/icon-button.css +139 -139
  83. package/css/components/link.css +21 -21
  84. package/css/components/list.css +345 -345
  85. package/css/components/progress.css +102 -97
  86. package/css/components/radio.css +172 -172
  87. package/css/components/range.css +337 -337
  88. package/css/components/select.css +169 -169
  89. package/css/components/spinner.css +37 -37
  90. package/css/components/switch.css +268 -268
  91. package/css/components/table.css +179 -179
  92. package/css/components/tabs.css +83 -77
  93. package/css/components/text-field.css +450 -450
  94. package/css/components/text-input.css +64 -64
  95. package/css/components/textarea.css +24 -24
  96. package/css/components/toast.css +161 -161
  97. package/css/components/toggle-button.css +87 -87
  98. package/css/components/toggle-group.css +56 -56
  99. package/css/components/tooltip.css +67 -67
  100. package/css/components/typography.css +585 -585
  101. package/css/components.css +41 -41
  102. package/css/imports.css +16 -16
  103. package/css/js/checkbox.js +21 -21
  104. package/css/js/toast.js +94 -94
  105. package/css/theme.css +132 -132
  106. package/dist/op.css +65 -65
  107. package/dist/op.css.map +1 -1
  108. package/dist/opui.components.css +5159 -5145
  109. package/dist/opui.components.css.map +1 -1
  110. package/dist/opui.css +5668 -5654
  111. package/dist/opui.css.map +1 -1
  112. package/env.d.ts +14 -14
  113. package/open-props.css +9 -9
  114. package/package.json +81 -81
@@ -1,337 +1,337 @@
1
- @layer components.root {
2
- :where(.range) {
3
- display: grid;
4
- gap: var(--size-1) 0;
5
- /* Two-column base so the optional .value cell can sit next to the
6
- label on row 1. Children that span the full width keep using
7
- `grid-column: 1/-1`, so this is backwards compatible. */
8
- grid-template-columns: 1fr auto;
9
- position: relative;
10
-
11
- .label {
12
- color: var(--text-primary);
13
- font-size: var(--font-size-05);
14
- font-weight: 600;
15
- grid-column: 1;
16
- grid-row: 1;
17
- }
18
-
19
- /* Live current-value readout. Pairs with the <output> element
20
- rendered by the Range component (or hand-written .value markup). */
21
- :where(.value) {
22
- color: var(--text-muted);
23
- font-size: var(--font-size-0);
24
- font-variant-numeric: tabular-nums;
25
- font-weight: 600;
26
- grid-column: 2;
27
- grid-row: 1;
28
- line-height: 1.5;
29
- text-align: end;
30
- }
31
-
32
- .start-text {
33
- color: var(--text-muted);
34
- font-size: var(--font-size-0);
35
- grid-column: 1/-1;
36
- grid-row: 2;
37
- line-height: 1.5;
38
- }
39
-
40
- :where(.end-text) {
41
- color: var(--text-muted);
42
- font-size: var(--font-size-0);
43
- grid-column: 1/-1;
44
- grid-row: 5;
45
- line-height: 1.5;
46
- }
47
-
48
- /* Datalist (tick mark labels) */
49
- :where(datalist) {
50
- color: var(--text-muted);
51
- display: flex;
52
- font-size: var(--font-size-0);
53
- grid-column: 1/-1;
54
- grid-row: 4;
55
- justify-content: space-between;
56
- margin-top: calc(var(--size-1) * -1);
57
- padding-inline: calc(3ex / 2);
58
-
59
- &>option {
60
- display: flex;
61
- inline-size: 0;
62
- justify-content: center;
63
- padding: 0;
64
- white-space: nowrap;
65
- }
66
- }
67
-
68
- /* Disabled */
69
- &:has([disabled]) {
70
- cursor: not-allowed;
71
- opacity: 0.64;
72
- user-select: none;
73
-
74
- .label,
75
- .value,
76
- .start-text,
77
- .end-text {
78
- cursor: not-allowed;
79
- }
80
- }
81
-
82
- /* Color */
83
- &.filled input[type="range"] {
84
- --_track-color: var(--surface-filled);
85
- }
86
-
87
- &.default input[type="range"] {
88
- --_track-color: var(--surface-default);
89
- }
90
-
91
- &.tonal input[type="range"] {
92
- --_track-color: var(--surface-tonal);
93
- }
94
-
95
- /* Orientation */
96
- &.spread {
97
- align-items: center;
98
- column-gap: var(--size-4);
99
- container-type: inline-size;
100
- grid-template-columns: 1fr auto;
101
-
102
- .label {
103
- grid-column: 1;
104
- grid-row: 1;
105
- }
106
-
107
- .start-text {
108
- color: var(--text-muted);
109
- display: block;
110
- font-size: var(--font-size-0);
111
- grid-column: 1;
112
- grid-row: 2;
113
- line-height: 1.5;
114
- }
115
-
116
- input[type="range"] {
117
- align-self: center;
118
- grid-column: 2;
119
- grid-row: 1;
120
- min-inline-size: 25ch;
121
- }
122
-
123
- /* In spread mode, the value sits below the slider in col 2
124
- (where end-text would normally land). When end-text is also
125
- present it shifts down a row to avoid collision. */
126
- :where(.value) {
127
- grid-column: 2;
128
- grid-row: 2;
129
- }
130
-
131
- :where(.end-text) {
132
- grid-column: 2;
133
- grid-row: 2;
134
- text-align: end;
135
- }
136
-
137
- datalist {
138
- grid-column: 2;
139
- grid-row: 2;
140
- }
141
-
142
- /* When both datalist and end-text exist, push end-text below the datalist
143
- so they don't collide on the same grid cell. */
144
- &:has(datalist) :where(.end-text) {
145
- grid-row: 3;
146
- }
147
-
148
- &:has(.value) :where(.end-text) {
149
- grid-row: 3;
150
- }
151
-
152
- &:has(.value):has(datalist) :where(.end-text) {
153
- grid-row: 4;
154
- }
155
-
156
- @container (width < 400px) {
157
- grid-template-columns: 1fr;
158
-
159
- * {
160
- grid-column: 1/-1;
161
- }
162
-
163
- .label {
164
- grid-row: 1;
165
- }
166
-
167
- /* Share row 1 with the label: the label's text stays left-aligned
168
- in its full-width cell, while the value shrinks to fit and
169
- right-aligns. Visually reads as a "[name ........ value]" row. */
170
- :where(.value) {
171
- grid-row: 1;
172
- justify-self: end;
173
- text-align: end;
174
- }
175
-
176
- .start-text {
177
- grid-row: 2;
178
- }
179
-
180
- input[type="range"] {
181
- grid-column: 1/-1;
182
- grid-row: 3;
183
- }
184
-
185
- datalist {
186
- grid-column: 1/-1;
187
- grid-row: 4;
188
- }
189
-
190
- :where(.end-text) {
191
- grid-row: 5;
192
- text-align: start;
193
- }
194
- }
195
- }
196
-
197
- /* Validation */
198
- &[data-invalid],
199
- &:has(:user-invalid) {
200
- --_thumb-bg: var(--color-9);
201
- --_thumb-highlight-color: oklch(from var(--color-9) 70% 100% h / 20%);
202
-
203
- .start-text,
204
- .end-text,
205
- .value {
206
- color: var(--color-9);
207
- }
208
- }
209
-
210
- /* Range input */
211
- :where(& > input[type="range"]) {
212
- --_thumb-bg: var(--primary);
213
- --_thumb-highlight-color: oklch(from var(--primary) 70% 100% h / 20%);
214
- --_thumb-highlight-size: 0px;
215
- --_thumb-offset: -1.125ex;
216
- --_thumb-size: 3ex;
217
- --_track-color: var(--field-border-color);
218
- --_track-fill: 0%;
219
- --_track-fill-color: var(--primary);
220
- --_track-height: 0.75ex;
221
- --_track-radius: 1e5px;
222
-
223
- appearance: none;
224
- background: transparent;
225
- block-size: var(--size-4);
226
- display: block;
227
- grid-column: 1/-1;
228
- grid-row: 3;
229
- inline-size: 100%;
230
- outline-offset: 1ex;
231
-
232
- @media (hover: none) {
233
- --_thumb-offset: -11.5px;
234
- --_thumb-size: 30px;
235
- }
236
-
237
- /* Track */
238
- &::-webkit-slider-runnable-track {
239
- appearance: none;
240
- background: linear-gradient(to right,
241
- var(--_track-fill-color) var(--_track-fill, 0%),
242
- var(--_track-color) 0%);
243
- block-size: var(--_track-height);
244
- border-radius: var(--_track-radius);
245
- }
246
-
247
- &::-moz-range-track {
248
- appearance: none;
249
- background: var(--_track-color);
250
- block-size: var(--_track-height);
251
- border-radius: var(--_track-radius);
252
- }
253
-
254
- &::-moz-range-progress {
255
- appearance: none;
256
- background: var(--_track-fill-color);
257
- block-size: var(--_track-height);
258
- border-radius: var(--_track-radius);
259
- }
260
-
261
- /* Ring */
262
- &::-webkit-slider-thumb {
263
- appearance: none;
264
- background: var(--_thumb-bg);
265
- block-size: var(--_thumb-size);
266
- border: 3px solid var(--surface-default);
267
- border-radius: 50%;
268
- box-shadow: 0 0 0 var(--_thumb-highlight-size) var(--_thumb-highlight-color);
269
- cursor: ew-resize;
270
- inline-size: var(--_thumb-size);
271
- margin-block-start: var(--_thumb-offset);
272
-
273
- @media (prefers-reduced-motion: no-preference) {
274
- transition: box-shadow 0.1s ease;
275
- }
276
-
277
- .fieldset-item:focus-within & {
278
- border-color: var(--gray-14);
279
- }
280
- }
281
-
282
- &::-moz-range-thumb {
283
- appearance: none;
284
- background: var(--_thumb-bg);
285
- block-size: var(--_thumb-size);
286
- border: 3px solid var(--surface-default);
287
- border-radius: 50%;
288
- box-shadow: 0 0 0 var(--_thumb-highlight-size) var(--_thumb-highlight-color);
289
- cursor: ew-resize;
290
- inline-size: var(--_thumb-size);
291
- margin-block-start: var(--_thumb-offset);
292
-
293
- @media (prefers-reduced-motion: no-preference) {
294
- transition: box-shadow 0.1s ease;
295
- }
296
-
297
- .fieldset-item:focus-within & {
298
- border-color: var(--gray-14);
299
- }
300
- }
301
-
302
- /* Element state */
303
- .range:has(:user-invalid) &,
304
- .range[data-invalid] & {
305
- --_track-fill-color: var(--color-9);
306
- }
307
-
308
- &:not([disabled]) {
309
- &:hover {
310
- --_thumb-highlight-size: var(--size-1);
311
- }
312
-
313
- &:active {
314
- --_thumb-highlight-size: var(--size-2);
315
- --_track-color: light-dark(oklch(from var(--field-border-color) calc(l * 0.9) c h),
316
- oklch(from var(--field-border-color) calc(l * 1.1) c h));
317
- }
318
- }
319
-
320
- &[disabled] {
321
- --_thumb-bg: oklch(from var(--text-primary) l c h / 50%);
322
- --_track-color: var(--field-border-color);
323
-
324
- cursor: not-allowed;
325
-
326
- &::-webkit-slider-thumb {
327
- cursor: not-allowed;
328
- }
329
-
330
- &::-moz-range-thumb {
331
- cursor: not-allowed;
332
- }
333
- }
334
- }
335
- }
336
-
337
- }
1
+ @layer components.root {
2
+ :where(.ui-range) {
3
+ display: grid;
4
+ gap: var(--size-1) 0;
5
+ /* Two-column base so the optional .value cell can sit next to the
6
+ label on row 1. Children that span the full width keep using
7
+ `grid-column: 1/-1`, so this is backwards compatible. */
8
+ grid-template-columns: 1fr auto;
9
+ position: relative;
10
+
11
+ .ui-label {
12
+ color: var(--text-primary);
13
+ font-size: var(--font-size-05);
14
+ font-weight: 600;
15
+ grid-column: 1;
16
+ grid-row: 1;
17
+ }
18
+
19
+ /* Live current-value readout. Pairs with the <output> element
20
+ rendered by the Range component (or hand-written .value markup). */
21
+ :where(.ui-value) {
22
+ color: var(--text-muted);
23
+ font-size: var(--font-size-0);
24
+ font-variant-numeric: tabular-nums;
25
+ font-weight: 600;
26
+ grid-column: 2;
27
+ grid-row: 1;
28
+ line-height: 1.5;
29
+ text-align: end;
30
+ }
31
+
32
+ .ui-start-text {
33
+ color: var(--text-muted);
34
+ font-size: var(--font-size-0);
35
+ grid-column: 1/-1;
36
+ grid-row: 2;
37
+ line-height: 1.5;
38
+ }
39
+
40
+ :where(.ui-end-text) {
41
+ color: var(--text-muted);
42
+ font-size: var(--font-size-0);
43
+ grid-column: 1/-1;
44
+ grid-row: 5;
45
+ line-height: 1.5;
46
+ }
47
+
48
+ /* Datalist (tick mark labels) */
49
+ :where(datalist) {
50
+ color: var(--text-muted);
51
+ display: flex;
52
+ font-size: var(--font-size-0);
53
+ grid-column: 1/-1;
54
+ grid-row: 4;
55
+ justify-content: space-between;
56
+ margin-top: calc(var(--size-1) * -1);
57
+ padding-inline: calc(3ex / 2);
58
+
59
+ &>option {
60
+ display: flex;
61
+ inline-size: 0;
62
+ justify-content: center;
63
+ padding: 0;
64
+ white-space: nowrap;
65
+ }
66
+ }
67
+
68
+ /* Disabled */
69
+ &:has([disabled]) {
70
+ cursor: not-allowed;
71
+ opacity: 0.64;
72
+ user-select: none;
73
+
74
+ .ui-label,
75
+ .ui-value,
76
+ .ui-start-text,
77
+ .ui-end-text {
78
+ cursor: not-allowed;
79
+ }
80
+ }
81
+
82
+ /* Color */
83
+ &.ui-filled input[type="range"] {
84
+ --_track-color: var(--surface-filled);
85
+ }
86
+
87
+ &.ui-default input[type="range"] {
88
+ --_track-color: var(--surface-default);
89
+ }
90
+
91
+ &.ui-tonal input[type="range"] {
92
+ --_track-color: var(--surface-tonal);
93
+ }
94
+
95
+ /* Orientation */
96
+ &.ui-spread {
97
+ align-items: center;
98
+ column-gap: var(--size-4);
99
+ container-type: inline-size;
100
+ grid-template-columns: 1fr auto;
101
+
102
+ .ui-label {
103
+ grid-column: 1;
104
+ grid-row: 1;
105
+ }
106
+
107
+ .ui-start-text {
108
+ color: var(--text-muted);
109
+ display: block;
110
+ font-size: var(--font-size-0);
111
+ grid-column: 1;
112
+ grid-row: 2;
113
+ line-height: 1.5;
114
+ }
115
+
116
+ input[type="range"] {
117
+ align-self: center;
118
+ grid-column: 2;
119
+ grid-row: 1;
120
+ min-inline-size: 25ch;
121
+ }
122
+
123
+ /* In spread mode, the value sits below the slider in col 2
124
+ (where end-text would normally land). When end-text is also
125
+ present it shifts down a row to avoid collision. */
126
+ :where(.ui-value) {
127
+ grid-column: 2;
128
+ grid-row: 2;
129
+ }
130
+
131
+ :where(.ui-end-text) {
132
+ grid-column: 2;
133
+ grid-row: 2;
134
+ text-align: end;
135
+ }
136
+
137
+ datalist {
138
+ grid-column: 2;
139
+ grid-row: 2;
140
+ }
141
+
142
+ /* When both datalist and end-text exist, push end-text below the datalist
143
+ so they don't collide on the same grid cell. */
144
+ &:has(datalist) :where(.ui-end-text) {
145
+ grid-row: 3;
146
+ }
147
+
148
+ &:has(.ui-value) :where(.ui-end-text) {
149
+ grid-row: 3;
150
+ }
151
+
152
+ &:has(.ui-value):has(datalist) :where(.ui-end-text) {
153
+ grid-row: 4;
154
+ }
155
+
156
+ @container (width < 400px) {
157
+ grid-template-columns: 1fr;
158
+
159
+ * {
160
+ grid-column: 1/-1;
161
+ }
162
+
163
+ .ui-label {
164
+ grid-row: 1;
165
+ }
166
+
167
+ /* Share row 1 with the label: the label's text stays left-aligned
168
+ in its full-width cell, while the value shrinks to fit and
169
+ right-aligns. Visually reads as a "[name ........ value]" row. */
170
+ :where(.ui-value) {
171
+ grid-row: 1;
172
+ justify-self: end;
173
+ text-align: end;
174
+ }
175
+
176
+ .ui-start-text {
177
+ grid-row: 2;
178
+ }
179
+
180
+ input[type="range"] {
181
+ grid-column: 1/-1;
182
+ grid-row: 3;
183
+ }
184
+
185
+ datalist {
186
+ grid-column: 1/-1;
187
+ grid-row: 4;
188
+ }
189
+
190
+ :where(.ui-end-text) {
191
+ grid-row: 5;
192
+ text-align: start;
193
+ }
194
+ }
195
+ }
196
+
197
+ /* Validation */
198
+ &[data-invalid],
199
+ &:has(:user-invalid) {
200
+ --_thumb-bg: var(--color-9);
201
+ --_thumb-highlight-color: oklch(from var(--color-9) 70% 100% h / 20%);
202
+
203
+ .ui-start-text,
204
+ .ui-end-text,
205
+ .ui-value {
206
+ color: var(--color-9);
207
+ }
208
+ }
209
+
210
+ /* Range input */
211
+ :where(& > input[type="range"]) {
212
+ --_thumb-bg: var(--primary);
213
+ --_thumb-highlight-color: oklch(from var(--primary) 70% 100% h / 20%);
214
+ --_thumb-highlight-size: 0px;
215
+ --_thumb-offset: -1.125ex;
216
+ --_thumb-size: 3ex;
217
+ --_track-color: var(--field-border-color);
218
+ --_track-fill: 0%;
219
+ --_track-fill-color: var(--primary);
220
+ --_track-height: 0.75ex;
221
+ --_track-radius: 1e5px;
222
+
223
+ appearance: none;
224
+ background: transparent;
225
+ block-size: var(--size-4);
226
+ display: block;
227
+ grid-column: 1/-1;
228
+ grid-row: 3;
229
+ inline-size: 100%;
230
+ outline-offset: 1ex;
231
+
232
+ @media (hover: none) {
233
+ --_thumb-offset: -11.5px;
234
+ --_thumb-size: 30px;
235
+ }
236
+
237
+ /* Track */
238
+ &::-webkit-slider-runnable-track {
239
+ appearance: none;
240
+ background: linear-gradient(to right,
241
+ var(--_track-fill-color) var(--_track-fill, 0%),
242
+ var(--_track-color) 0%);
243
+ block-size: var(--_track-height);
244
+ border-radius: var(--_track-radius);
245
+ }
246
+
247
+ &::-moz-range-track {
248
+ appearance: none;
249
+ background: var(--_track-color);
250
+ block-size: var(--_track-height);
251
+ border-radius: var(--_track-radius);
252
+ }
253
+
254
+ &::-moz-range-progress {
255
+ appearance: none;
256
+ background: var(--_track-fill-color);
257
+ block-size: var(--_track-height);
258
+ border-radius: var(--_track-radius);
259
+ }
260
+
261
+ /* Ring */
262
+ &::-webkit-slider-thumb {
263
+ appearance: none;
264
+ background: var(--_thumb-bg);
265
+ block-size: var(--_thumb-size);
266
+ border: 3px solid var(--surface-default);
267
+ border-radius: 50%;
268
+ box-shadow: 0 0 0 var(--_thumb-highlight-size) var(--_thumb-highlight-color);
269
+ cursor: ew-resize;
270
+ inline-size: var(--_thumb-size);
271
+ margin-block-start: var(--_thumb-offset);
272
+
273
+ @media (prefers-reduced-motion: no-preference) {
274
+ transition: box-shadow 0.1s ease;
275
+ }
276
+
277
+ .ui-fieldset-item:focus-within & {
278
+ border-color: var(--gray-14);
279
+ }
280
+ }
281
+
282
+ &::-moz-range-thumb {
283
+ appearance: none;
284
+ background: var(--_thumb-bg);
285
+ block-size: var(--_thumb-size);
286
+ border: 3px solid var(--surface-default);
287
+ border-radius: 50%;
288
+ box-shadow: 0 0 0 var(--_thumb-highlight-size) var(--_thumb-highlight-color);
289
+ cursor: ew-resize;
290
+ inline-size: var(--_thumb-size);
291
+ margin-block-start: var(--_thumb-offset);
292
+
293
+ @media (prefers-reduced-motion: no-preference) {
294
+ transition: box-shadow 0.1s ease;
295
+ }
296
+
297
+ .ui-fieldset-item:focus-within & {
298
+ border-color: var(--gray-14);
299
+ }
300
+ }
301
+
302
+ /* Element state */
303
+ .ui-range:has(:user-invalid) &,
304
+ .ui-range[data-invalid] & {
305
+ --_track-fill-color: var(--color-9);
306
+ }
307
+
308
+ &:not([disabled]) {
309
+ &:hover {
310
+ --_thumb-highlight-size: var(--size-1);
311
+ }
312
+
313
+ &:active {
314
+ --_thumb-highlight-size: var(--size-2);
315
+ --_track-color: light-dark(oklch(from var(--field-border-color) calc(l * 0.9) c h),
316
+ oklch(from var(--field-border-color) calc(l * 1.1) c h));
317
+ }
318
+ }
319
+
320
+ &[disabled] {
321
+ --_thumb-bg: oklch(from var(--text-primary) l c h / 50%);
322
+ --_track-color: var(--field-border-color);
323
+
324
+ cursor: not-allowed;
325
+
326
+ &::-webkit-slider-thumb {
327
+ cursor: not-allowed;
328
+ }
329
+
330
+ &::-moz-range-thumb {
331
+ cursor: not-allowed;
332
+ }
333
+ }
334
+ }
335
+ }
336
+
337
+ }