@oscarpalmer/oui 0.8.0 → 0.10.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/dist/css/form.css CHANGED
@@ -1,68 +1,365 @@
1
1
  @charset "UTF-8";
2
+ /*! https://github.com/oscarpalmer/oui */
3
+
2
4
  :where(.oui-fieldset) {
3
5
  padding: 1em;
4
6
  border: 1px solid var(--oui-gray-3);
5
7
  border-radius: 0.25em;
6
8
  }
7
9
 
8
- :where(.oui-input) {
9
- padding: 0.5em 0.75em;
10
- outline: 3px solid transparent;
10
+ :where(.oui-input:not([type=range i])) {
11
+ outline: 4px solid transparent;
11
12
  outline-offset: 0;
12
13
  background-color: var(--oui-absolute);
13
- border-color: var(--oui-gray-3);
14
- border-radius: 0.25em;
15
14
  box-shadow: inset 0 1px 2px 0 color-mix(in oklab, var(--oui-gray-10), transparent 80%);
16
15
  transition: 0.125s ease-in-out;
16
+ padding: 0.5em 0.75em;
17
+ border-color: var(--oui-gray-3);
18
+ border-radius: 0.25em;
17
19
  }
18
- :where(.oui-input:not(textarea)) {
20
+ :where(.oui-input:not([type=range i], select[multiple], textarea)) {
19
21
  overflow: hidden;
20
22
  white-space: nowrap;
21
23
  text-overflow: ellipsis;
22
24
  }
23
- :where(.oui-input:is([type=date],
24
- [type=datetime-local],
25
- [type=month],
26
- [type=number],
27
- [type=tel],
28
- [type=time],
29
- [type=url],
30
- [type=week])) {
25
+ :where(.oui-input:is([list]))::-webkit-calendar-picker-indicator {
26
+ display: none !important;
27
+ }
28
+ :where(.oui-input:is([type=color i])) {
29
+ padding: 0;
30
+ }
31
+ :where(.oui-input:is([type=date i],
32
+ [type=datetime-local i],
33
+ [type=month i],
34
+ [type=number i],
35
+ [type=tel i],
36
+ [type=time i],
37
+ [type=url i],
38
+ [type=week i])) {
31
39
  font-variant-numeric: tabular-nums;
32
40
  }
33
- :where(.oui-input.oui-validateable:not([disabled], [aria-disabled=true]):is(:user-invalid,
34
- [aria-invalid=true])) {
41
+ :where(.oui-input:is([type=file i])) {
42
+ padding-left: 0.5em;
43
+ }
44
+ :where(.oui-input:is([type=file i]))::file-selector-button {
45
+ padding: 0.5em 0.75em;
46
+ margin: 0 0.75em 0 0;
47
+ background-color: var(--oui-gray-1);
48
+ border: 1px solid var(--oui-gray-3);
49
+ border-radius: 0.25em;
50
+ box-shadow: inset 0 1px 0 0 var(--oui-gray-0), 0 1px 2px 0 rgba(0, 0, 0, 0.125);
51
+ color: var(--oui-gray-8);
52
+ font-size: 0.75em;
53
+ line-height: 1;
54
+ transition: 0.125s ease-in-out;
55
+ cursor: pointer;
56
+ }
57
+ :where(.oui-input:is([type=range i])) {
58
+ -webkit-appearance: none;
59
+ -moz-appearance: none;
60
+ appearance: none;
61
+ outline: none;
62
+ }
63
+ :where(.oui-input:is([type=range i]))::-moz-range-track {
64
+ outline: 4px solid transparent;
65
+ outline-offset: 0;
66
+ background-color: var(--oui-absolute);
67
+ box-shadow: inset 0 1px 2px 0 color-mix(in oklab, var(--oui-gray-10), transparent 80%);
68
+ transition: 0.125s ease-in-out;
69
+ -moz-appearance: none;
70
+ appearance: none;
71
+ width: 100%;
72
+ height: 0.75em;
73
+ border: 1px solid var(--oui-gray-3);
74
+ border-radius: 0.75em;
75
+ position: relative;
76
+ }
77
+ :where(.oui-input:is([type=range i]))::-ms-track {
78
+ outline: 4px solid transparent;
79
+ outline-offset: 0;
80
+ background-color: var(--oui-absolute);
81
+ box-shadow: inset 0 1px 2px 0 color-mix(in oklab, var(--oui-gray-10), transparent 80%);
82
+ transition: 0.125s ease-in-out;
83
+ appearance: none;
84
+ width: 100%;
85
+ height: 0.75em;
86
+ border: 1px solid var(--oui-gray-3);
87
+ border-radius: 0.75em;
88
+ position: relative;
89
+ }
90
+ :where(.oui-input:is([type=range i]))::-webkit-slider-runnable-track {
91
+ outline: 4px solid transparent;
92
+ outline-offset: 0;
93
+ background-color: var(--oui-absolute);
94
+ box-shadow: inset 0 1px 2px 0 color-mix(in oklab, var(--oui-gray-10), transparent 80%);
95
+ transition: 0.125s ease-in-out;
96
+ -webkit-appearance: none;
97
+ appearance: none;
98
+ width: 100%;
99
+ height: 0.75em;
100
+ border: 1px solid var(--oui-gray-3);
101
+ border-radius: 0.75em;
102
+ position: relative;
103
+ }
104
+ :where(.oui-input:is([type=range i]))::-moz-range-thumb {
105
+ -moz-appearance: none;
106
+ appearance: none;
107
+ width: 1.25em;
108
+ height: 1.25em;
109
+ background-color: var(--oui-blue-6);
110
+ outline: 4px solid transparent;
111
+ border: 2px solid var(--oui-absolute);
112
+ border-radius: 1.25em;
113
+ box-shadow: 0 1px 2px 2px rgba(0, 0, 0, 0.125);
114
+ -moz-transition: 0.125s ease-in-out;
115
+ transition: 0.125s ease-in-out;
116
+ cursor: pointer;
117
+ }
118
+ :where(.oui-input:is([type=range i]))::-ms-thumb {
119
+ appearance: none;
120
+ width: 1.25em;
121
+ height: 1.25em;
122
+ background-color: var(--oui-blue-6);
123
+ outline: 4px solid transparent;
124
+ border: 2px solid var(--oui-absolute);
125
+ border-radius: 1.25em;
126
+ box-shadow: 0 1px 2px 2px rgba(0, 0, 0, 0.125);
127
+ -ms-transition: 0.125s ease-in-out;
128
+ transition: 0.125s ease-in-out;
129
+ cursor: pointer;
130
+ }
131
+ :where(.oui-input:is([type=range i]))::-webkit-slider-thumb {
132
+ -webkit-appearance: none;
133
+ appearance: none;
134
+ width: 1.25em;
135
+ height: 1.25em;
136
+ background-color: var(--oui-blue-6);
137
+ outline: 4px solid transparent;
138
+ border: 2px solid var(--oui-absolute);
139
+ border-radius: 1.25em;
140
+ box-shadow: 0 1px 2px 2px rgba(0, 0, 0, 0.125);
141
+ -webkit-transition: 0.125s ease-in-out;
142
+ transition: 0.125s ease-in-out;
143
+ cursor: pointer;
144
+ }
145
+ :where(.oui-input.oui-validatable:not([disabled], [aria-disabled=true i]):is(:user-invalid,
146
+ [aria-invalid=true i])) {
35
147
  outline-color: color-mix(in oklab, var(--oui-red-6), transparent 60%);
36
148
  border-color: var(--oui-red-6);
37
149
  }
38
- :where(.oui-input.oui-validateable:not([disabled], [aria-disabled=true]):is(:user-valid,
39
- [aria-invalid=false])) {
150
+ :where(.oui-input.oui-validatable:not([disabled], [aria-disabled=true i]):is(:user-invalid,
151
+ [aria-invalid=true i]))::-moz-range-track {
152
+ outline-color: color-mix(in oklab, var(--oui-red-6), transparent 60%);
153
+ border-color: var(--oui-red-6);
154
+ }
155
+ :where(.oui-input.oui-validatable:not([disabled], [aria-disabled=true i]):is(:user-invalid,
156
+ [aria-invalid=true i]))::-ms-track {
157
+ outline-color: color-mix(in oklab, var(--oui-red-6), transparent 60%);
158
+ border-color: var(--oui-red-6);
159
+ }
160
+ :where(.oui-input.oui-validatable:not([disabled], [aria-disabled=true i]):is(:user-invalid,
161
+ [aria-invalid=true i]))::-webkit-slider-runnable-track {
162
+ outline-color: color-mix(in oklab, var(--oui-red-6), transparent 60%);
163
+ border-color: var(--oui-red-6);
164
+ }
165
+ :where(.oui-input.oui-validatable:not([disabled], [aria-disabled=true i]):is(:user-invalid,
166
+ [aria-invalid=true i]))::file-selector-button {
167
+ background-color: var(--oui-red-0);
168
+ border-color: var(--oui-red-2);
169
+ color: var(--oui-red-9);
170
+ }
171
+ :where(.oui-input.oui-validatable:not([disabled], [aria-disabled=true i]):is(:user-invalid,
172
+ [aria-invalid=true i]))::-moz-range-thumb {
173
+ background-color: var(--oui-red-6);
174
+ }
175
+ :where(.oui-input.oui-validatable:not([disabled], [aria-disabled=true i]):is(:user-invalid,
176
+ [aria-invalid=true i]))::-ms-thumb {
177
+ background-color: var(--oui-red-6);
178
+ }
179
+ :where(.oui-input.oui-validatable:not([disabled], [aria-disabled=true i]):is(:user-invalid,
180
+ [aria-invalid=true i]))::-webkit-slider-thumb {
181
+ background-color: var(--oui-red-6);
182
+ }
183
+ :where(.oui-input.oui-validatable:not([disabled], [aria-disabled=true i]):is(:user-valid,
184
+ [aria-invalid=false i])) {
185
+ outline-color: color-mix(in oklab, var(--oui-green-6), transparent 60%);
186
+ border-color: var(--oui-green-6);
187
+ }
188
+ :where(.oui-input.oui-validatable:not([disabled], [aria-disabled=true i]):is(:user-valid,
189
+ [aria-invalid=false i]))::-moz-range-track {
40
190
  outline-color: color-mix(in oklab, var(--oui-green-6), transparent 60%);
41
191
  border-color: var(--oui-green-6);
42
192
  }
43
- :where(.oui-input:not([disabled], [aria-disabled=true]):focus) {
193
+ :where(.oui-input.oui-validatable:not([disabled], [aria-disabled=true i]):is(:user-valid,
194
+ [aria-invalid=false i]))::-ms-track {
195
+ outline-color: color-mix(in oklab, var(--oui-green-6), transparent 60%);
196
+ border-color: var(--oui-green-6);
197
+ }
198
+ :where(.oui-input.oui-validatable:not([disabled], [aria-disabled=true i]):is(:user-valid,
199
+ [aria-invalid=false i]))::-webkit-slider-runnable-track {
200
+ outline-color: color-mix(in oklab, var(--oui-green-6), transparent 60%);
201
+ border-color: var(--oui-green-6);
202
+ }
203
+ :where(.oui-input.oui-validatable:not([disabled], [aria-disabled=true i]):is(:user-valid,
204
+ [aria-invalid=false i]))::file-selector-button {
205
+ background-color: var(--oui-green-0);
206
+ border-color: var(--oui-green-3);
207
+ color: var(--oui-green-9);
208
+ }
209
+ :where(.oui-input.oui-validatable:not([disabled], [aria-disabled=true i]):is(:user-valid,
210
+ [aria-invalid=false i]))::-moz-range-thumb {
211
+ background-color: var(--oui-green-6);
212
+ }
213
+ :where(.oui-input.oui-validatable:not([disabled], [aria-disabled=true i]):is(:user-valid,
214
+ [aria-invalid=false i]))::-ms-thumb {
215
+ background-color: var(--oui-green-6);
216
+ }
217
+ :where(.oui-input.oui-validatable:not([disabled], [aria-disabled=true i]):is(:user-valid,
218
+ [aria-invalid=false i]))::-webkit-slider-thumb {
219
+ background-color: var(--oui-green-6);
220
+ }
221
+ :where(.oui-input:not([disabled], [aria-disabled=true i]):focus) {
44
222
  outline-color: color-mix(in oklab, var(--oui-blue-6), transparent 60%);
45
223
  border-color: var(--oui-blue-6);
46
224
  }
225
+ :where(.oui-input:not([disabled], [aria-disabled=true i]):focus)::file-selector-button {
226
+ background-color: var(--oui-blue-0);
227
+ border-color: var(--oui-blue-3);
228
+ color: var(--oui-blue-9);
229
+ }
230
+ :where(.oui-input:not([disabled], [aria-disabled=true i]):focus)::-moz-range-track {
231
+ outline-color: color-mix(in oklab, var(--oui-blue-6), transparent 60%);
232
+ }
233
+ :where(.oui-input:not([disabled], [aria-disabled=true i]):focus)::-ms-track {
234
+ outline-color: color-mix(in oklab, var(--oui-blue-6), transparent 60%);
235
+ }
236
+ :where(.oui-input:not([disabled], [aria-disabled=true i]):focus)::-webkit-slider-runnable-track {
237
+ outline-color: color-mix(in oklab, var(--oui-blue-6), transparent 60%);
238
+ }
239
+ :where(.oui-input:not([disabled], [aria-disabled=true i]):focus)::-moz-range-thumb {
240
+ outline-color: color-mix(in oklab, var(--oui-blue-6), transparent 60%);
241
+ }
242
+ :where(.oui-input:not([disabled], [aria-disabled=true i]):focus)::-ms-thumb {
243
+ outline-color: color-mix(in oklab, var(--oui-blue-6), transparent 60%);
244
+ }
245
+ :where(.oui-input:not([disabled], [aria-disabled=true i]):focus)::-webkit-slider-thumb {
246
+ outline-color: color-mix(in oklab, var(--oui-blue-6), transparent 60%);
247
+ }
248
+ :where(.oui-input:not([disabled], [aria-disabled=true i]):focus)::-moz-range-track {
249
+ border-color: var(--oui-blue-6);
250
+ }
251
+ :where(.oui-input:not([disabled], [aria-disabled=true i]):focus)::-ms-track {
252
+ border-color: var(--oui-blue-6);
253
+ }
254
+ :where(.oui-input:not([disabled], [aria-disabled=true i]):focus)::-webkit-slider-runnable-track {
255
+ border-color: var(--oui-blue-6);
256
+ }
257
+ :where(.oui-input:not([disabled], [aria-disabled=true i]):focus)::-moz-range-thumb {
258
+ background-color: var(--oui-blue-6);
259
+ box-shadow: 0 1px 2px 2px rgba(0, 0, 0, 0.25);
260
+ }
261
+ :where(.oui-input:not([disabled], [aria-disabled=true i]):focus)::-ms-thumb {
262
+ background-color: var(--oui-blue-6);
263
+ box-shadow: 0 1px 2px 2px rgba(0, 0, 0, 0.25);
264
+ }
265
+ :where(.oui-input:not([disabled], [aria-disabled=true i]):focus)::-webkit-slider-thumb {
266
+ background-color: var(--oui-blue-6);
267
+ box-shadow: 0 1px 2px 2px rgba(0, 0, 0, 0.25);
268
+ }
47
269
  @media (hover: hover) {
48
- :where(.oui-input:not([disabled], [aria-disabled=true]):hover) {
270
+ :where(.oui-input:not([disabled], [aria-disabled=true i]):hover) {
271
+ outline-color: color-mix(in oklab, var(--oui-blue-6), transparent 80%);
272
+ border-color: var(--oui-blue-6);
273
+ }
274
+ :where(.oui-input:not([disabled], [aria-disabled=true i]):hover)::-moz-range-track {
275
+ outline-color: color-mix(in oklab, var(--oui-blue-6), transparent 80%);
276
+ border-color: var(--oui-blue-6);
277
+ }
278
+ :where(.oui-input:not([disabled], [aria-disabled=true i]):hover)::-ms-track {
49
279
  outline-color: color-mix(in oklab, var(--oui-blue-6), transparent 80%);
50
280
  border-color: var(--oui-blue-6);
51
281
  }
282
+ :where(.oui-input:not([disabled], [aria-disabled=true i]):hover)::-webkit-slider-runnable-track {
283
+ outline-color: color-mix(in oklab, var(--oui-blue-6), transparent 80%);
284
+ border-color: var(--oui-blue-6);
285
+ }
286
+ :where(.oui-input:not([disabled], [aria-disabled=true i]):hover)::file-selector-button {
287
+ background-color: var(--oui-blue-0);
288
+ border-color: var(--oui-blue-3);
289
+ color: var(--oui-blue-9);
290
+ }
291
+ :where(.oui-input:not([disabled], [aria-disabled=true i]):hover)::-moz-range-thumb {
292
+ background-color: var(--oui-blue-5);
293
+ }
294
+ :where(.oui-input:not([disabled], [aria-disabled=true i]):hover)::-ms-thumb {
295
+ background-color: var(--oui-blue-5);
296
+ }
297
+ :where(.oui-input:not([disabled], [aria-disabled=true i]):hover)::-webkit-slider-thumb {
298
+ background-color: var(--oui-blue-5);
299
+ }
52
300
  }
53
301
  :where(.oui-input[readonly]) {
54
302
  color: color-mix(in oklab, currentColor, transparent 12.5%);
55
303
  }
56
- :where(.oui-input[disabled], .oui-input[aria-disabled=true]) {
304
+ :where(.oui-input[disabled], .oui-input[aria-disabled=true i]) {
305
+ background-color: color-mix(in oklab, var(--oui-gray-0), transparent 50%);
306
+ color: color-mix(in oklab, currentColor, transparent 25%);
307
+ font-style: italic;
308
+ }
309
+ :where(.oui-input[disabled], .oui-input[aria-disabled=true i])::-moz-range-track {
57
310
  background-color: color-mix(in oklab, var(--oui-gray-0), transparent 50%);
58
311
  color: color-mix(in oklab, currentColor, transparent 25%);
312
+ font-style: italic;
313
+ }
314
+ :where(.oui-input[disabled], .oui-input[aria-disabled=true i])::-ms-track {
315
+ background-color: color-mix(in oklab, var(--oui-gray-0), transparent 50%);
316
+ color: color-mix(in oklab, currentColor, transparent 25%);
317
+ font-style: italic;
318
+ }
319
+ :where(.oui-input[disabled], .oui-input[aria-disabled=true i])::-webkit-slider-runnable-track {
320
+ background-color: color-mix(in oklab, var(--oui-gray-0), transparent 50%);
321
+ color: color-mix(in oklab, currentColor, transparent 25%);
322
+ font-style: italic;
323
+ }
324
+ :where(.oui-input[disabled], .oui-input[aria-disabled=true i])::-moz-range-thumb {
325
+ background-color: var(--oui-gray-1);
326
+ }
327
+ :where(.oui-input[disabled], .oui-input[aria-disabled=true i])::-ms-thumb {
328
+ background-color: var(--oui-gray-1);
329
+ }
330
+ :where(.oui-input[disabled], .oui-input[aria-disabled=true i])::-webkit-slider-thumb {
331
+ background-color: var(--oui-gray-1);
59
332
  }
60
333
 
61
- :where(select.oui-input) {
334
+ :where(select.oui-input, .oui-input[list]) {
62
335
  padding-right: 2em;
63
336
  background-position: right 0.5em center;
64
337
  }
65
338
 
339
+ :where(select.oui-input:is([multiple])) {
340
+ --oui-off: attr(oui-off);
341
+ --oui-on: attr(oui-on, "✓");
342
+ padding: 0;
343
+ }
344
+ :where(select.oui-input:is([multiple]) > option) {
345
+ padding: 0.5em 0.75em;
346
+ }
347
+ :where(select.oui-input:is([multiple])[oui-off] > option)::before {
348
+ content: var(--oui-off);
349
+ margin: 0 0.75em 0 0;
350
+ }
351
+ :where(select.oui-input:is([multiple]) > option:nth-of-type(2n)) {
352
+ background-color: color-mix(in oklab, var(--oui-blue-0), transparent 67%);
353
+ }
354
+ :where(select.oui-input:is([multiple]) > option:checked) {
355
+ background-color: var(--oui-blue-1);
356
+ color: var(--oui-blue-9);
357
+ }
358
+ :where(select.oui-input:is([multiple]) > option:checked)::before {
359
+ content: var(--oui-on);
360
+ margin: 0 0.75em 0 0;
361
+ }
362
+
66
363
  :where(textarea.oui-input) {
67
364
  min-height: 4em;
68
365
  resize: vertical;
@@ -76,6 +373,12 @@
76
373
 
77
374
  :where(.oui-label) {
78
375
  cursor: pointer;
376
+ transition: 0.125s ease-in-out;
377
+ }
378
+ @media (hover: hover) {
379
+ :where(:where(.oui-label):hover) {
380
+ color: var(--oui-blue-8);
381
+ }
79
382
  }
80
383
 
81
384
  :where(.oui-legend) {
@@ -95,7 +398,7 @@
95
398
  pointer-events: none;
96
399
  }
97
400
  :where(.oui-switch, .oui-toggle)::before {
98
- outline: 3px solid transparent;
401
+ outline: 4px solid transparent;
99
402
  outline-offset: 0;
100
403
  }
101
404
 
@@ -113,7 +416,7 @@
113
416
  right: 0;
114
417
  }
115
418
  :where(.oui-switch)::after {
116
- content: "✕";
419
+ content: attr(oui-off, "✕");
117
420
  width: 1.5em;
118
421
  height: 1.5em;
119
422
  background-color: var(--oui-absolute);
@@ -128,7 +431,7 @@
128
431
  right: 1.5em;
129
432
  }
130
433
  :where(.oui-switch:has(input:checked))::after {
131
- content: "✓";
434
+ content: attr(oui-on, "✓");
132
435
  box-shadow: 0 1px 2px 1px rgba(0, 0, 0, 0.25);
133
436
  color: var(--oui-blue-8);
134
437
  right: 0.25em;
@@ -149,11 +452,11 @@
149
452
  :where(.oui-toggle)::after {
150
453
  opacity: 0;
151
454
  }
152
- :where(.oui-toggle:has(input[type=checkbox]))::before {
455
+ :where(.oui-toggle:has(input[type=checkbox i]))::before {
153
456
  border-radius: 0.25em;
154
457
  }
155
- :where(.oui-toggle:has(input[type=checkbox]))::after {
156
- content: "✓";
458
+ :where(.oui-toggle:has(input[type=checkbox i]))::after {
459
+ content: attr(oui-on, "✓");
157
460
  width: 1.5em;
158
461
  height: 1.5em;
159
462
  color: white;
@@ -163,10 +466,10 @@
163
466
  text-align: center;
164
467
  inset: 0 auto auto 0;
165
468
  }
166
- :where(.oui-toggle:has(input[type=radio]))::before, :where(.oui-toggle:has(input[type=radio]))::after {
469
+ :where(.oui-toggle:has(input[type=radio i]))::before, :where(.oui-toggle:has(input[type=radio i]))::after {
167
470
  border-radius: 50%;
168
471
  }
169
- :where(.oui-toggle:has(input[type=radio]))::after {
472
+ :where(.oui-toggle:has(input[type=radio i]))::after {
170
473
  content: "";
171
474
  width: 0.75em;
172
475
  height: 0.75em;
@@ -183,49 +486,46 @@
183
486
  background-color: var(--oui-blue-6);
184
487
  border-color: transparent;
185
488
  }
186
- :where(.oui-switch:has(input:not([disabled], [aria-disabled=true])):focus-within,
187
- .oui-toggle:has(input:not([disabled], [aria-disabled=true])):focus-within) {
489
+ :where(.oui-switch:has(input:not([disabled], [aria-disabled=true i])):focus-within,
490
+ .oui-toggle:has(input:not([disabled], [aria-disabled=true i])):focus-within) {
188
491
  color: var(--oui-blue-8);
189
492
  }
190
- :where(.oui-switch:has(input:not([disabled], [aria-disabled=true])):focus-within,
191
- .oui-toggle:has(input:not([disabled], [aria-disabled=true])):focus-within)::before {
493
+ :where(.oui-switch:has(input:not([disabled], [aria-disabled=true i])):focus-within,
494
+ .oui-toggle:has(input:not([disabled], [aria-disabled=true i])):focus-within)::before {
192
495
  outline-color: color-mix(in oklab, var(--oui-blue-6), transparent 60%);
193
496
  border-color: var(--oui-absolute);
194
497
  }
195
498
  @media (hover: hover) {
196
- :where(.oui-switch:has(input:not([disabled], [aria-disabled=true])):hover,
197
- .oui-toggle:has(input:not([disabled], [aria-disabled=true])):hover) {
499
+ :where(.oui-switch:has(input:not([disabled], [aria-disabled=true i])):hover,
500
+ .oui-toggle:has(input:not([disabled], [aria-disabled=true i])):hover) {
198
501
  color: var(--oui-blue-8);
199
502
  }
200
- :where(.oui-switch:has(input:not([disabled], [aria-disabled=true])):hover,
201
- .oui-toggle:has(input:not([disabled], [aria-disabled=true])):hover)::before {
503
+ :where(.oui-switch:has(input:not([disabled], [aria-disabled=true i])):hover,
504
+ .oui-toggle:has(input:not([disabled], [aria-disabled=true i])):hover)::before {
202
505
  outline-color: color-mix(in oklab, var(--oui-blue-6), transparent 80%);
203
506
  border-color: var(--oui-blue-6);
204
507
  }
205
- :where(.oui-switch:has(input:not([disabled], [aria-disabled=true]):is(:checked)):hover,
206
- .oui-toggle:has(input:not([disabled], [aria-disabled=true]):is(:checked)):hover)::before {
508
+ :where(.oui-switch:has(input:not([disabled], [aria-disabled=true i]):is(:checked)):hover,
509
+ .oui-toggle:has(input:not([disabled], [aria-disabled=true i]):is(:checked)):hover)::before {
207
510
  background-color: color-mix(in oklab, var(--oui-blue-6), transparent 40%);
208
511
  }
209
512
  }
210
- :where(.oui-switch:has(input[disabled], input[aria-disabled=true]),
211
- .oui-toggle:has(input[disabled], input[aria-disabled=true])) {
212
- cursor: default;
213
- }
214
- :where(.oui-switch:has(input[disabled], input[aria-disabled=true]),
215
- .oui-toggle:has(input[disabled], input[aria-disabled=true])) {
513
+ :where(.oui-switch:has(input[disabled], input[aria-disabled=true i]),
514
+ .oui-toggle:has(input[disabled], input[aria-disabled=true i])) {
216
515
  color: color-mix(in oklab, currentColor, transparent 25%);
516
+ cursor: default;
217
517
  }
218
- :where(.oui-switch:has(input[disabled], input[aria-disabled=true]),
219
- .oui-toggle:has(input[disabled], input[aria-disabled=true]))::after {
518
+ :where(.oui-switch:has(input[disabled], input[aria-disabled=true i]),
519
+ .oui-toggle:has(input[disabled], input[aria-disabled=true i]))::after {
220
520
  color: color-mix(in oklab, currentColor, transparent);
221
521
  }
222
- :where(.oui-switch:has(input[disabled], input[aria-disabled=true]),
223
- .oui-toggle:has(input[disabled], input[aria-disabled=true]))::before {
522
+ :where(.oui-switch:has(input[disabled], input[aria-disabled=true i]),
523
+ .oui-toggle:has(input[disabled], input[aria-disabled=true i]))::before {
224
524
  background-color: color-mix(in oklab, var(--oui-gray-0), transparent 50%);
225
525
  border-color: var(--oui-gray-3);
226
526
  }
227
- :where(.oui-switch:has(input[disabled], input[aria-disabled=true]),
228
- .oui-toggle:has(input[disabled], input[aria-disabled=true]))::after {
527
+ :where(.oui-switch:has(input[disabled], input[aria-disabled=true i]),
528
+ .oui-toggle:has(input[disabled], input[aria-disabled=true i]))::after {
229
529
  box-shadow: 0 0 0 1px var(--oui-gray-3);
230
530
  text-shadow: none;
231
531
  }
@@ -245,3 +545,5 @@
245
545
  border: 0 !important;
246
546
  white-space: nowrap !important;
247
547
  }
548
+
549
+
@@ -1,12 +1,18 @@
1
+ /*! https://github.com/oscarpalmer/oui */
1
2
  :where(.oui-message) {
3
+ --oui-shadow-value: color-mix(
4
+ in oklch,
5
+ var(--oui-shadow, var(--oui-gray-6)),
6
+ transparent 95%
7
+ );
2
8
  padding: 1em;
3
9
  display: inline-flex;
4
10
  flex-flow: column nowrap;
5
11
  gap: 1em;
6
- background-color: var(--background, var(--oui-gray-0));
7
- border: 1px solid var(--border, var(--oui-gray-2));
12
+ background-color: color-mix(in oklab, var(--oui-background, var(--oui-gray-0)), transparent 25%);
8
13
  border-radius: 0.5em;
9
- color: var(--foreground, var(--oui-gray-8));
14
+ box-shadow: 0 0 0 1px var(--oui-shadow-value), 0 1px 2px 0 var(--oui-shadow-value), 0 2px 4px 0 var(--oui-shadow-value);
15
+ color: var(--oui-foreground, var(--oui-gray-8));
10
16
  line-height: 1.25;
11
17
  }
12
18
  :where(.oui-message h2, .oui-message h3, .oui-message h4, .oui-message h5, .oui-message h6) {
@@ -16,7 +22,7 @@
16
22
  :where(.oui-message hr) {
17
23
  height: 1px;
18
24
  margin: 0 -1em;
19
- background-color: var(--border, var(--oui-gray-2));
25
+ background-color: var(--oui-shadow-value, var(--oui-gray-2));
20
26
  border: none;
21
27
  }
22
28
  :where(.oui-message p) {
@@ -25,32 +31,34 @@
25
31
  gap: 1em;
26
32
  }
27
33
  :where(.oui-message-blue, .oui-message-info) {
28
- --background: var(--oui-blue-0);
29
- --border: var(--oui-blue-2);
30
- --foreground: var(--oui-blue-8);
34
+ --oui-background: var(--oui-blue-0);
35
+ --oui-foreground: var(--oui-blue-8);
36
+ --oui-shadow: var(--oui-blue-6);
31
37
  }
32
38
  :where(.oui-message-green, .oui-message-success) {
33
- --background: var(--oui-green-0);
34
- --border: var(--oui-green-2);
35
- --foreground: var(--oui-green-8);
39
+ --oui-background: var(--oui-green-0);
40
+ --oui-foreground: var(--oui-green-8);
41
+ --oui-shadow: var(--oui-green-6);
36
42
  }
37
43
  :where(.oui-message-orange, .oui-message-warning) {
38
- --background: var(--oui-orange-0);
39
- --border: var(--oui-orange-2);
40
- --foreground: var(--oui-orange-8);
44
+ --oui-background: var(--oui-orange-0);
45
+ --oui-foreground: var(--oui-orange-8);
46
+ --oui-shadow: var(--oui-orange-6);
41
47
  }
42
48
  :where(.oui-message-purple, .oui-message-special) {
43
- --background: var(--oui-purple-0);
44
- --border: var(--oui-purple-2);
45
- --foreground: var(--oui-purple-8);
49
+ --oui-background: var(--oui-purple-0);
50
+ --oui-foreground: var(--oui-purple-8);
51
+ --oui-shadow: var(--oui-purple-6);
46
52
  }
47
53
  :where(.oui-message-red, .oui-message-error) {
48
- --background: var(--oui-red-0);
49
- --border: var(--oui-red-2);
50
- --foreground: var(--oui-red-8);
54
+ --oui-background: var(--oui-red-0);
55
+ --oui-foreground: var(--oui-red-8);
56
+ --oui-shadow: var(--oui-red-6);
51
57
  }
52
58
  :where(.oui-message-yellow, .oui-message-notice) {
53
- --background: var(--oui-yellow-0);
54
- --border: var(--oui-yellow-2);
55
- --foreground: var(--oui-yellow-8);
59
+ --oui-background: var(--oui-yellow-0);
60
+ --oui-foreground: var(--oui-yellow-8);
61
+ --oui-shadow: var(--oui-yellow-6);
56
62
  }
63
+
64
+