@oscarpalmer/oui 0.11.0 → 0.13.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/badge.css +14 -7
- package/dist/css/button.css +6 -4
- package/dist/css/color.css +25 -25
- package/dist/css/content.css +193 -0
- package/dist/css/form.css +128 -66
- package/dist/css/message.css +23 -16
- package/dist/css/reset.css +3 -1
- package/dist/css/table.css +26 -9
- package/dist/css/tooltip.css +14 -0
- package/dist/js/attributable.cjs +51 -0
- package/dist/js/attributable.js +51 -0
- package/dist/js/focus-trap.cjs +19 -62
- package/dist/js/focus-trap.js +19 -62
- package/dist/js/tooltip.cjs +203 -0
- package/dist/js/tooltip.js +202 -0
- package/package.json +17 -7
- package/src/css/badge.scss +17 -10
- package/src/css/button.scss +5 -3
- package/src/css/color.scss +25 -25
- package/src/css/content.scss +156 -0
- package/src/css/form.scss +124 -56
- package/src/css/message.scss +29 -21
- package/src/css/mixins.scss +38 -6
- package/src/css/reset.scss +3 -2
- package/src/css/table.scss +32 -7
- package/src/css/tooltip.scss +14 -0
- package/src/js/attributable.ts +70 -0
- package/src/js/focus-trap.ts +16 -64
- package/src/js/tooltip.ts +289 -0
- package/types/attributable.d.cts +5 -0
- package/types/attributable.d.ts +1 -0
- package/types/tooltip.d.cts +3 -0
- package/types/tooltip.d.ts +1 -0
package/dist/css/form.css
CHANGED
|
@@ -18,8 +18,9 @@
|
|
|
18
18
|
transition: 0.125s ease-in-out;
|
|
19
19
|
background-color: color-mix(in oklab, var(--oui-background-value), transparent var(--oui-background-percentage));
|
|
20
20
|
border: 1px solid var(--oui-border-value, var(--oui-gray-3));
|
|
21
|
-
box-shadow: inset 0
|
|
21
|
+
box-shadow: inset 0 2px 4px -1px var(--oui-gray-3);
|
|
22
22
|
color: color-mix(in oklab, var(--oui-foreground-value, inherit), transparent var(--oui-foreground-percentage));
|
|
23
|
+
-webkit-text-fill-color: color-mix(in oklab, var(--oui-foreground-value, inherit), transparent var(--oui-foreground-percentage));
|
|
23
24
|
padding: 0.5em 0.75em;
|
|
24
25
|
border-radius: 0.25em;
|
|
25
26
|
}
|
|
@@ -51,12 +52,14 @@
|
|
|
51
52
|
--oui-background-percentage: 25%;
|
|
52
53
|
--oui-foreground-percentage: 0%;
|
|
53
54
|
--oui-outline-percentage: 100%;
|
|
54
|
-
--oui-shadow-
|
|
55
|
+
--oui-shadow-inset: color-mix(in oklab, white, transparent 75%);
|
|
56
|
+
--oui-shadow-percentage: 82.5%;
|
|
55
57
|
--oui-shadow-value: color-mix(
|
|
56
|
-
in
|
|
58
|
+
in oklab,
|
|
57
59
|
var(--oui-outline-value, var(--oui-gray-6)),
|
|
58
60
|
transparent var(--oui-shadow-percentage)
|
|
59
61
|
);
|
|
62
|
+
box-shadow: inset 0 1px 0 0 var(--oui-shadow-inset), 0 0 0 1px var(--oui-shadow-value), 0 1px 2px -0.5px var(--oui-shadow-value), 0 2px 4px -1px var(--oui-shadow-value);
|
|
60
63
|
padding: 0.5em 0.75em;
|
|
61
64
|
display: inline-flex;
|
|
62
65
|
flex-flow: row wrap;
|
|
@@ -66,10 +69,10 @@
|
|
|
66
69
|
background-color: color-mix(in oklab, var(--oui-background-value, var(--oui-gray-2)), transparent var(--oui-background-percentage));
|
|
67
70
|
outline: 4px solid color-mix(in oklab, var(--oui-outline-value, var(--oui-gray-6)), transparent var(--oui-outline-percentage));
|
|
68
71
|
border: none;
|
|
69
|
-
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);
|
|
70
72
|
color: color-mix(in oklab, var(--oui-foreground-value, var(--oui-gray-8)), transparent var(--oui-foreground-percentage));
|
|
71
73
|
line-height: 1.25;
|
|
72
74
|
transition: 0.125s ease-in-out;
|
|
75
|
+
--oui-background-value: var(--oui-grey-2);
|
|
73
76
|
--oui-outline-value: var(--oui-grey-6);
|
|
74
77
|
margin: 0 0.75em 0 0;
|
|
75
78
|
font-size: 0.75em;
|
|
@@ -91,8 +94,9 @@
|
|
|
91
94
|
transition: 0.125s ease-in-out;
|
|
92
95
|
background-color: color-mix(in oklab, var(--oui-background-value), transparent var(--oui-background-percentage));
|
|
93
96
|
border: 1px solid var(--oui-border-value, var(--oui-gray-3));
|
|
94
|
-
box-shadow: inset 0
|
|
97
|
+
box-shadow: inset 0 2px 4px -1px var(--oui-gray-3);
|
|
95
98
|
color: color-mix(in oklab, var(--oui-foreground-value, inherit), transparent var(--oui-foreground-percentage));
|
|
99
|
+
-webkit-text-fill-color: color-mix(in oklab, var(--oui-foreground-value, inherit), transparent var(--oui-foreground-percentage));
|
|
96
100
|
-moz-appearance: none;
|
|
97
101
|
appearance: none;
|
|
98
102
|
width: 100%;
|
|
@@ -110,8 +114,9 @@
|
|
|
110
114
|
transition: 0.125s ease-in-out;
|
|
111
115
|
background-color: color-mix(in oklab, var(--oui-background-value), transparent var(--oui-background-percentage));
|
|
112
116
|
border: 1px solid var(--oui-border-value, var(--oui-gray-3));
|
|
113
|
-
box-shadow: inset 0
|
|
117
|
+
box-shadow: inset 0 2px 4px -1px var(--oui-gray-3);
|
|
114
118
|
color: color-mix(in oklab, var(--oui-foreground-value, inherit), transparent var(--oui-foreground-percentage));
|
|
119
|
+
-webkit-text-fill-color: color-mix(in oklab, var(--oui-foreground-value, inherit), transparent var(--oui-foreground-percentage));
|
|
115
120
|
appearance: none;
|
|
116
121
|
width: 100%;
|
|
117
122
|
height: 0.75em;
|
|
@@ -128,8 +133,9 @@
|
|
|
128
133
|
transition: 0.125s ease-in-out;
|
|
129
134
|
background-color: color-mix(in oklab, var(--oui-background-value), transparent var(--oui-background-percentage));
|
|
130
135
|
border: 1px solid var(--oui-border-value, var(--oui-gray-3));
|
|
131
|
-
box-shadow: inset 0
|
|
136
|
+
box-shadow: inset 0 2px 4px -1px var(--oui-gray-3);
|
|
132
137
|
color: color-mix(in oklab, var(--oui-foreground-value, inherit), transparent var(--oui-foreground-percentage));
|
|
138
|
+
-webkit-text-fill-color: color-mix(in oklab, var(--oui-foreground-value, inherit), transparent var(--oui-foreground-percentage));
|
|
133
139
|
-webkit-appearance: none;
|
|
134
140
|
appearance: none;
|
|
135
141
|
width: 100%;
|
|
@@ -195,82 +201,135 @@
|
|
|
195
201
|
top: 50%;
|
|
196
202
|
transform: translateY(-50%);
|
|
197
203
|
}
|
|
198
|
-
:where(.oui-input.oui-validatable:not([disabled],
|
|
199
|
-
|
|
204
|
+
:where(.oui-input.oui-validatable:not([disabled],
|
|
205
|
+
[readonly],
|
|
206
|
+
[aria-disabled=true i]):is(:user-invalid:not([aria-invalid=false i]),
|
|
207
|
+
[aria-invalid=true i])) {
|
|
208
|
+
--oui-border-value: var(--oui-red-5);
|
|
200
209
|
--oui-foreground-value: var(--oui-red-9);
|
|
201
|
-
--oui-outline-percentage:
|
|
210
|
+
--oui-outline-percentage: 82.5%;
|
|
202
211
|
--oui-outline-value: var(--oui-red-6);
|
|
203
212
|
}
|
|
204
|
-
:where(.oui-input.oui-validatable:not([disabled],
|
|
205
|
-
|
|
213
|
+
:where(.oui-input.oui-validatable:not([disabled],
|
|
214
|
+
[readonly],
|
|
215
|
+
[aria-disabled=true i]):is(:user-invalid:not([aria-invalid=false i]),
|
|
216
|
+
[aria-invalid=true i]))::file-selector-button {
|
|
217
|
+
--oui-background-value: var(--oui-red-2);
|
|
206
218
|
--oui-foreground-value: var(--oui-red-8);
|
|
207
219
|
--oui-outline-value: var(--oui-red-6);
|
|
208
220
|
}
|
|
209
|
-
:where(.oui-input.oui-validatable:not([disabled],
|
|
221
|
+
:where(.oui-input.oui-validatable:not([disabled],
|
|
222
|
+
[readonly],
|
|
223
|
+
[aria-disabled=true i]):is(:user-invalid:not([aria-invalid=false i]),
|
|
224
|
+
[aria-invalid=true i]))::-moz-range-thumb {
|
|
210
225
|
--oui-background-value: var(--oui-red-6);
|
|
211
226
|
}
|
|
212
|
-
:where(.oui-input.oui-validatable:not([disabled],
|
|
227
|
+
:where(.oui-input.oui-validatable:not([disabled],
|
|
228
|
+
[readonly],
|
|
229
|
+
[aria-disabled=true i]):is(:user-invalid:not([aria-invalid=false i]),
|
|
230
|
+
[aria-invalid=true i]))::-ms-thumb {
|
|
213
231
|
--oui-background-value: var(--oui-red-6);
|
|
214
232
|
}
|
|
215
|
-
:where(.oui-input.oui-validatable:not([disabled],
|
|
233
|
+
:where(.oui-input.oui-validatable:not([disabled],
|
|
234
|
+
[readonly],
|
|
235
|
+
[aria-disabled=true i]):is(:user-invalid:not([aria-invalid=false i]),
|
|
236
|
+
[aria-invalid=true i]))::-webkit-slider-thumb {
|
|
216
237
|
--oui-background-value: var(--oui-red-6);
|
|
217
238
|
}
|
|
218
|
-
:where(.oui-input.oui-validatable:not([disabled],
|
|
219
|
-
|
|
239
|
+
:where(.oui-input.oui-validatable:not([disabled],
|
|
240
|
+
[readonly],
|
|
241
|
+
[aria-disabled=true i]):is(:user-invalid:not([aria-invalid=false i]),
|
|
242
|
+
[aria-invalid=true i]))::-moz-range-track {
|
|
243
|
+
--oui-border-value: var(--oui-red-5);
|
|
220
244
|
--oui-foreground-value: var(--oui-red-9);
|
|
221
|
-
--oui-outline-percentage:
|
|
245
|
+
--oui-outline-percentage: 82.5%;
|
|
222
246
|
--oui-outline-value: var(--oui-red-6);
|
|
223
247
|
}
|
|
224
|
-
:where(.oui-input.oui-validatable:not([disabled],
|
|
225
|
-
|
|
248
|
+
:where(.oui-input.oui-validatable:not([disabled],
|
|
249
|
+
[readonly],
|
|
250
|
+
[aria-disabled=true i]):is(:user-invalid:not([aria-invalid=false i]),
|
|
251
|
+
[aria-invalid=true i]))::-ms-track {
|
|
252
|
+
--oui-border-value: var(--oui-red-5);
|
|
226
253
|
--oui-foreground-value: var(--oui-red-9);
|
|
227
|
-
--oui-outline-percentage:
|
|
254
|
+
--oui-outline-percentage: 82.5%;
|
|
228
255
|
--oui-outline-value: var(--oui-red-6);
|
|
229
256
|
}
|
|
230
|
-
:where(.oui-input.oui-validatable:not([disabled],
|
|
231
|
-
|
|
257
|
+
:where(.oui-input.oui-validatable:not([disabled],
|
|
258
|
+
[readonly],
|
|
259
|
+
[aria-disabled=true i]):is(:user-invalid:not([aria-invalid=false i]),
|
|
260
|
+
[aria-invalid=true i]))::-webkit-slider-runnable-track {
|
|
261
|
+
--oui-border-value: var(--oui-red-5);
|
|
232
262
|
--oui-foreground-value: var(--oui-red-9);
|
|
233
|
-
--oui-outline-percentage:
|
|
263
|
+
--oui-outline-percentage: 82.5%;
|
|
234
264
|
--oui-outline-value: var(--oui-red-6);
|
|
235
265
|
}
|
|
236
|
-
:where(.oui-input.oui-validatable:not([disabled],
|
|
237
|
-
|
|
266
|
+
:where(.oui-input.oui-validatable:not([disabled],
|
|
267
|
+
[readonly],
|
|
268
|
+
[aria-disabled=true i]):is(:user-invalid:not([aria-invalid=false i]),
|
|
269
|
+
[aria-invalid=true i])) > option:checked {
|
|
270
|
+
background-color: var(--oui-red-2);
|
|
271
|
+
color: var(--oui-red-9);
|
|
272
|
+
}
|
|
273
|
+
:where(.oui-input.oui-validatable:not([disabled],
|
|
274
|
+
[readonly],
|
|
275
|
+
[aria-disabled=true i]):is(:user-valid:not([aria-invalid=true i]), [aria-invalid=false i])) {
|
|
276
|
+
--oui-border-value: var(--oui-green-5);
|
|
238
277
|
--oui-foreground-value: var(--oui-green-9);
|
|
239
|
-
--oui-outline-percentage:
|
|
278
|
+
--oui-outline-percentage: 82.5%;
|
|
240
279
|
--oui-outline-value: var(--oui-green-6);
|
|
241
280
|
}
|
|
242
|
-
:where(.oui-input.oui-validatable:not([disabled],
|
|
243
|
-
|
|
281
|
+
:where(.oui-input.oui-validatable:not([disabled],
|
|
282
|
+
[readonly],
|
|
283
|
+
[aria-disabled=true i]):is(:user-valid:not([aria-invalid=true i]), [aria-invalid=false i]))::file-selector-button {
|
|
284
|
+
--oui-background-value: var(--oui-green-2);
|
|
244
285
|
--oui-foreground-value: var(--oui-green-8);
|
|
245
286
|
--oui-outline-value: var(--oui-green-6);
|
|
246
287
|
}
|
|
247
|
-
:where(.oui-input.oui-validatable:not([disabled],
|
|
248
|
-
|
|
288
|
+
:where(.oui-input.oui-validatable:not([disabled],
|
|
289
|
+
[readonly],
|
|
290
|
+
[aria-disabled=true i]):is(:user-valid:not([aria-invalid=true i]), [aria-invalid=false i]))::-moz-range-track {
|
|
291
|
+
--oui-border-value: var(--oui-green-5);
|
|
249
292
|
--oui-foreground-value: var(--oui-green-9);
|
|
250
|
-
--oui-outline-percentage:
|
|
293
|
+
--oui-outline-percentage: 82.5%;
|
|
251
294
|
--oui-outline-value: var(--oui-green-6);
|
|
252
295
|
}
|
|
253
|
-
:where(.oui-input.oui-validatable:not([disabled],
|
|
254
|
-
|
|
296
|
+
:where(.oui-input.oui-validatable:not([disabled],
|
|
297
|
+
[readonly],
|
|
298
|
+
[aria-disabled=true i]):is(:user-valid:not([aria-invalid=true i]), [aria-invalid=false i]))::-ms-track {
|
|
299
|
+
--oui-border-value: var(--oui-green-5);
|
|
255
300
|
--oui-foreground-value: var(--oui-green-9);
|
|
256
|
-
--oui-outline-percentage:
|
|
301
|
+
--oui-outline-percentage: 82.5%;
|
|
257
302
|
--oui-outline-value: var(--oui-green-6);
|
|
258
303
|
}
|
|
259
|
-
:where(.oui-input.oui-validatable:not([disabled],
|
|
260
|
-
|
|
304
|
+
:where(.oui-input.oui-validatable:not([disabled],
|
|
305
|
+
[readonly],
|
|
306
|
+
[aria-disabled=true i]):is(:user-valid:not([aria-invalid=true i]), [aria-invalid=false i]))::-webkit-slider-runnable-track {
|
|
307
|
+
--oui-border-value: var(--oui-green-5);
|
|
261
308
|
--oui-foreground-value: var(--oui-green-9);
|
|
262
|
-
--oui-outline-percentage:
|
|
309
|
+
--oui-outline-percentage: 82.5%;
|
|
263
310
|
--oui-outline-value: var(--oui-green-6);
|
|
264
311
|
}
|
|
265
|
-
:where(.oui-input.oui-validatable:not([disabled],
|
|
312
|
+
:where(.oui-input.oui-validatable:not([disabled],
|
|
313
|
+
[readonly],
|
|
314
|
+
[aria-disabled=true i]):is(:user-valid:not([aria-invalid=true i]), [aria-invalid=false i]))::-moz-range-thumb {
|
|
266
315
|
--oui-background-value: var(--oui-green-6);
|
|
267
316
|
}
|
|
268
|
-
:where(.oui-input.oui-validatable:not([disabled],
|
|
317
|
+
:where(.oui-input.oui-validatable:not([disabled],
|
|
318
|
+
[readonly],
|
|
319
|
+
[aria-disabled=true i]):is(:user-valid:not([aria-invalid=true i]), [aria-invalid=false i]))::-ms-thumb {
|
|
269
320
|
--oui-background-value: var(--oui-green-6);
|
|
270
321
|
}
|
|
271
|
-
:where(.oui-input.oui-validatable:not([disabled],
|
|
322
|
+
:where(.oui-input.oui-validatable:not([disabled],
|
|
323
|
+
[readonly],
|
|
324
|
+
[aria-disabled=true i]):is(:user-valid:not([aria-invalid=true i]), [aria-invalid=false i]))::-webkit-slider-thumb {
|
|
272
325
|
--oui-background-value: var(--oui-green-6);
|
|
273
326
|
}
|
|
327
|
+
:where(.oui-input.oui-validatable:not([disabled],
|
|
328
|
+
[readonly],
|
|
329
|
+
[aria-disabled=true i]):is(:user-valid:not([aria-invalid=true i]), [aria-invalid=false i])) > option:checked {
|
|
330
|
+
background-color: var(--oui-green-2);
|
|
331
|
+
color: var(--oui-green-9);
|
|
332
|
+
}
|
|
274
333
|
:where(.oui-input:not([disabled], [readonly], [aria-disabled=true i]))::-webkit-calendar-picker-indicator {
|
|
275
334
|
outline: 4px solid transparent;
|
|
276
335
|
outline-offset: 2px;
|
|
@@ -288,48 +347,48 @@
|
|
|
288
347
|
outline-color: color-mix(in oklab, var(--oui-blue-6), transparent 75%);
|
|
289
348
|
}
|
|
290
349
|
:where(.oui-input:not([disabled], [readonly], [aria-disabled=true i]):focus), :where(.oui-input:not([disabled], [readonly], [aria-disabled=true i]):focus-within) {
|
|
291
|
-
--oui-border-value: var(--oui-blue-
|
|
350
|
+
--oui-border-value: var(--oui-blue-5);
|
|
292
351
|
--oui-foreground-value: inherit;
|
|
293
352
|
--oui-outline-percentage: 75%;
|
|
294
353
|
--oui-outline-value: var(--oui-blue-6);
|
|
295
354
|
}
|
|
296
355
|
:where(.oui-input:not([disabled], [readonly], [aria-disabled=true i]):focus)::file-selector-button, :where(.oui-input:not([disabled], [readonly], [aria-disabled=true i]):focus-within)::file-selector-button {
|
|
297
|
-
--oui-background-value: var(--oui-blue-
|
|
356
|
+
--oui-background-value: var(--oui-blue-2);
|
|
298
357
|
--oui-foreground-value: var(--oui-blue-8);
|
|
299
358
|
--oui-outline-value: var(--oui-blue-6);
|
|
300
359
|
}
|
|
301
360
|
:where(.oui-input:not([disabled], [readonly], [aria-disabled=true i]):focus)::-moz-range-thumb, :where(.oui-input:not([disabled], [readonly], [aria-disabled=true i]):focus-within)::-moz-range-thumb {
|
|
302
|
-
--oui-border-value: var(--oui-blue-
|
|
361
|
+
--oui-border-value: var(--oui-blue-5);
|
|
303
362
|
--oui-foreground-value: inherit;
|
|
304
363
|
--oui-outline-percentage: 75%;
|
|
305
364
|
--oui-outline-value: var(--oui-blue-6);
|
|
306
365
|
}
|
|
307
366
|
:where(.oui-input:not([disabled], [readonly], [aria-disabled=true i]):focus)::-ms-thumb, :where(.oui-input:not([disabled], [readonly], [aria-disabled=true i]):focus-within)::-ms-thumb {
|
|
308
|
-
--oui-border-value: var(--oui-blue-
|
|
367
|
+
--oui-border-value: var(--oui-blue-5);
|
|
309
368
|
--oui-foreground-value: inherit;
|
|
310
369
|
--oui-outline-percentage: 75%;
|
|
311
370
|
--oui-outline-value: var(--oui-blue-6);
|
|
312
371
|
}
|
|
313
372
|
:where(.oui-input:not([disabled], [readonly], [aria-disabled=true i]):focus)::-webkit-slider-thumb, :where(.oui-input:not([disabled], [readonly], [aria-disabled=true i]):focus-within)::-webkit-slider-thumb {
|
|
314
|
-
--oui-border-value: var(--oui-blue-
|
|
373
|
+
--oui-border-value: var(--oui-blue-5);
|
|
315
374
|
--oui-foreground-value: inherit;
|
|
316
375
|
--oui-outline-percentage: 75%;
|
|
317
376
|
--oui-outline-value: var(--oui-blue-6);
|
|
318
377
|
}
|
|
319
378
|
:where(.oui-input:not([disabled], [readonly], [aria-disabled=true i]):focus)::-moz-range-track, :where(.oui-input:not([disabled], [readonly], [aria-disabled=true i]):focus-within)::-moz-range-track {
|
|
320
|
-
--oui-border-value: var(--oui-blue-
|
|
379
|
+
--oui-border-value: var(--oui-blue-5);
|
|
321
380
|
--oui-foreground-value: inherit;
|
|
322
381
|
--oui-outline-percentage: 75%;
|
|
323
382
|
--oui-outline-value: var(--oui-blue-6);
|
|
324
383
|
}
|
|
325
384
|
:where(.oui-input:not([disabled], [readonly], [aria-disabled=true i]):focus)::-ms-track, :where(.oui-input:not([disabled], [readonly], [aria-disabled=true i]):focus-within)::-ms-track {
|
|
326
|
-
--oui-border-value: var(--oui-blue-
|
|
385
|
+
--oui-border-value: var(--oui-blue-5);
|
|
327
386
|
--oui-foreground-value: inherit;
|
|
328
387
|
--oui-outline-percentage: 75%;
|
|
329
388
|
--oui-outline-value: var(--oui-blue-6);
|
|
330
389
|
}
|
|
331
390
|
:where(.oui-input:not([disabled], [readonly], [aria-disabled=true i]):focus)::-webkit-slider-runnable-track, :where(.oui-input:not([disabled], [readonly], [aria-disabled=true i]):focus-within)::-webkit-slider-runnable-track {
|
|
332
|
-
--oui-border-value: var(--oui-blue-
|
|
391
|
+
--oui-border-value: var(--oui-blue-5);
|
|
333
392
|
--oui-foreground-value: inherit;
|
|
334
393
|
--oui-outline-percentage: 75%;
|
|
335
394
|
--oui-outline-value: var(--oui-blue-6);
|
|
@@ -347,44 +406,44 @@
|
|
|
347
406
|
box-shadow: 0 1px 2px 2px rgba(0, 0, 0, 0.25);
|
|
348
407
|
}
|
|
349
408
|
@media (hover: hover) {
|
|
350
|
-
:where(.oui-input:not([disabled], [aria-disabled=true i]):hover) {
|
|
409
|
+
:where(.oui-input:not([disabled], [readonly], [aria-disabled=true i]):hover) {
|
|
351
410
|
--oui-border-value: var(--oui-blue-4);
|
|
352
|
-
--oui-foreground-percentage:
|
|
411
|
+
--oui-foreground-percentage: 0%;
|
|
353
412
|
--oui-foreground-value: inherit;
|
|
354
413
|
--oui-outline-percentage: 90%;
|
|
355
414
|
--oui-outline-value: var(--oui-blue-6);
|
|
356
415
|
}
|
|
357
|
-
:where(.oui-input:not([disabled], [aria-disabled=true i]):hover)::file-selector-button {
|
|
358
|
-
--oui-background-value: var(--oui-blue-
|
|
416
|
+
:where(.oui-input:not([disabled], [readonly], [aria-disabled=true i]):hover)::file-selector-button {
|
|
417
|
+
--oui-background-value: var(--oui-blue-2);
|
|
359
418
|
--oui-foreground-value: var(--oui-blue-8);
|
|
360
419
|
--oui-outline-value: var(--oui-blue-6);
|
|
361
420
|
}
|
|
362
|
-
:where(.oui-input:not([disabled], [aria-disabled=true i]):hover)::-moz-range-thumb {
|
|
421
|
+
:where(.oui-input:not([disabled], [readonly], [aria-disabled=true i]):hover)::-moz-range-thumb {
|
|
363
422
|
--oui-background-value: var(--oui-blue-5);
|
|
364
423
|
}
|
|
365
|
-
:where(.oui-input:not([disabled], [aria-disabled=true i]):hover)::-ms-thumb {
|
|
424
|
+
:where(.oui-input:not([disabled], [readonly], [aria-disabled=true i]):hover)::-ms-thumb {
|
|
366
425
|
--oui-background-value: var(--oui-blue-5);
|
|
367
426
|
}
|
|
368
|
-
:where(.oui-input:not([disabled], [aria-disabled=true i]):hover)::-webkit-slider-thumb {
|
|
427
|
+
:where(.oui-input:not([disabled], [readonly], [aria-disabled=true i]):hover)::-webkit-slider-thumb {
|
|
369
428
|
--oui-background-value: var(--oui-blue-5);
|
|
370
429
|
}
|
|
371
|
-
:where(.oui-input:not([disabled], [aria-disabled=true i]):hover)::-moz-range-track {
|
|
430
|
+
:where(.oui-input:not([disabled], [readonly], [aria-disabled=true i]):hover)::-moz-range-track {
|
|
372
431
|
--oui-border-value: var(--oui-blue-4);
|
|
373
|
-
--oui-foreground-percentage:
|
|
432
|
+
--oui-foreground-percentage: 0%;
|
|
374
433
|
--oui-foreground-value: inherit;
|
|
375
434
|
--oui-outline-percentage: 90%;
|
|
376
435
|
--oui-outline-value: var(--oui-blue-6);
|
|
377
436
|
}
|
|
378
|
-
:where(.oui-input:not([disabled], [aria-disabled=true i]):hover)::-ms-track {
|
|
437
|
+
:where(.oui-input:not([disabled], [readonly], [aria-disabled=true i]):hover)::-ms-track {
|
|
379
438
|
--oui-border-value: var(--oui-blue-4);
|
|
380
|
-
--oui-foreground-percentage:
|
|
439
|
+
--oui-foreground-percentage: 0%;
|
|
381
440
|
--oui-foreground-value: inherit;
|
|
382
441
|
--oui-outline-percentage: 90%;
|
|
383
442
|
--oui-outline-value: var(--oui-blue-6);
|
|
384
443
|
}
|
|
385
|
-
:where(.oui-input:not([disabled], [aria-disabled=true i]):hover)::-webkit-slider-runnable-track {
|
|
444
|
+
:where(.oui-input:not([disabled], [readonly], [aria-disabled=true i]):hover)::-webkit-slider-runnable-track {
|
|
386
445
|
--oui-border-value: var(--oui-blue-4);
|
|
387
|
-
--oui-foreground-percentage:
|
|
446
|
+
--oui-foreground-percentage: 0%;
|
|
388
447
|
--oui-foreground-value: inherit;
|
|
389
448
|
--oui-outline-percentage: 90%;
|
|
390
449
|
--oui-outline-value: var(--oui-blue-6);
|
|
@@ -394,6 +453,10 @@
|
|
|
394
453
|
--oui-foreground-percentage: 25%;
|
|
395
454
|
font-style: italic;
|
|
396
455
|
}
|
|
456
|
+
:where(.oui-input[disabled], .oui-input[readonly], .oui-input[aria-disabled=true i])::file-selector-button {
|
|
457
|
+
--oui-background-value: var(--oui-gray-1);
|
|
458
|
+
cursor: default;
|
|
459
|
+
}
|
|
397
460
|
:where(.oui-input:is([disabled], [readonly], [aria-disabled=true i]):focus) {
|
|
398
461
|
--oui-outline-percentage: 75%;
|
|
399
462
|
}
|
|
@@ -425,8 +488,7 @@
|
|
|
425
488
|
--oui-background-value: var(--oui-gray-0);
|
|
426
489
|
}
|
|
427
490
|
:where(.oui-input[disabled], .oui-input[aria-disabled=true i])::-webkit-calendar-picker-indicator {
|
|
428
|
-
|
|
429
|
-
stroke: red;
|
|
491
|
+
opacity: 0.5;
|
|
430
492
|
}
|
|
431
493
|
|
|
432
494
|
:where(select.oui-input, .oui-input[list]) {
|
|
@@ -447,7 +509,7 @@
|
|
|
447
509
|
margin: 0 0.75em 0 0;
|
|
448
510
|
}
|
|
449
511
|
:where(select.oui-input:is([multiple]) > option:nth-of-type(2n)) {
|
|
450
|
-
background-color: color-mix(in oklab, var(--oui-blue-0), transparent
|
|
512
|
+
background-color: color-mix(in oklab, var(--oui-blue-0), transparent 50%);
|
|
451
513
|
}
|
|
452
514
|
:where(select.oui-input:is([multiple]) > option:checked) {
|
|
453
515
|
background-color: var(--oui-blue-2);
|
|
@@ -507,10 +569,10 @@
|
|
|
507
569
|
}
|
|
508
570
|
:where(.oui-switch, .oui-toggle)::before {
|
|
509
571
|
background-color: color-mix(in oklab, var(--oui-background-value), transparent var(--oui-background-percentage));
|
|
510
|
-
box-shadow: inset 0 1px 2px 0 color-mix(in oklab, var(--oui-shadow-value), transparent var(--oui-shadow-percentage));
|
|
511
572
|
outline: 4px solid color-mix(in oklab, var(--oui-outline-value), transparent var(--oui-outline-percentage));
|
|
512
573
|
outline-offset: 0;
|
|
513
574
|
border: 1px solid var(--oui-border-value);
|
|
575
|
+
box-shadow: inset 0 1px 2px 0 color-mix(in oklab, var(--oui-shadow-value), transparent var(--oui-shadow-percentage));
|
|
514
576
|
}
|
|
515
577
|
:where(.oui-switch, .oui-toggle)::after {
|
|
516
578
|
color: color-mix(in oklab, var(--oui-foreground-value), transparent var(--oui-foreground-percentage));
|
package/dist/css/message.css
CHANGED
|
@@ -1,17 +1,18 @@
|
|
|
1
1
|
/*! https://github.com/oscarpalmer/oui */
|
|
2
|
+
|
|
2
3
|
:where(.oui-message) {
|
|
3
|
-
--oui-shadow-
|
|
4
|
-
in
|
|
5
|
-
var(--oui-shadow, var(--oui-gray-6)),
|
|
6
|
-
transparent
|
|
4
|
+
--oui-shadow-mixed: color-mix(
|
|
5
|
+
in oklab,
|
|
6
|
+
var(--oui-shadow-value, var(--oui-gray-6)),
|
|
7
|
+
transparent 92.5%
|
|
7
8
|
);
|
|
8
|
-
|
|
9
|
+
box-shadow: inset 0 1px 0 0 transparent, 0 0 0 1px var(--oui-shadow-mixed), 0 1px 2px -0.5px var(--oui-shadow-mixed), 0 2px 4px -1px var(--oui-shadow-mixed);
|
|
10
|
+
padding: 1em 1.25em;
|
|
11
|
+
background-color: color-mix(in oklab, var(--oui-background, var(--oui-gray-0)), transparent 25%);
|
|
12
|
+
border-radius: 0.5em;
|
|
9
13
|
display: inline-flex;
|
|
10
14
|
flex-flow: column nowrap;
|
|
11
15
|
gap: 1em;
|
|
12
|
-
background-color: color-mix(in oklab, var(--oui-background, var(--oui-gray-0)), transparent 25%);
|
|
13
|
-
border-radius: 0.5em;
|
|
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
16
|
color: var(--oui-foreground, var(--oui-gray-8));
|
|
16
17
|
line-height: 1.25;
|
|
17
18
|
}
|
|
@@ -21,8 +22,8 @@
|
|
|
21
22
|
}
|
|
22
23
|
:where(.oui-message hr) {
|
|
23
24
|
height: 1px;
|
|
24
|
-
margin: 0 -
|
|
25
|
-
background-color: var(--oui-
|
|
25
|
+
margin: 0 -1.25em;
|
|
26
|
+
background-color: var(--oui-border, var(--oui-gray-2));
|
|
26
27
|
border: none;
|
|
27
28
|
}
|
|
28
29
|
:where(.oui-message p) {
|
|
@@ -32,33 +33,39 @@
|
|
|
32
33
|
}
|
|
33
34
|
:where(.oui-message-blue, .oui-message-info) {
|
|
34
35
|
--oui-background: var(--oui-blue-0);
|
|
36
|
+
--oui-border: var(--oui-blue-2);
|
|
35
37
|
--oui-foreground: var(--oui-blue-8);
|
|
36
|
-
--oui-shadow: var(--oui-blue-6);
|
|
38
|
+
--oui-shadow-value: var(--oui-blue-6);
|
|
37
39
|
}
|
|
38
40
|
:where(.oui-message-green, .oui-message-success) {
|
|
39
41
|
--oui-background: var(--oui-green-0);
|
|
42
|
+
--oui-border: var(--oui-green-2);
|
|
40
43
|
--oui-foreground: var(--oui-green-8);
|
|
41
|
-
--oui-shadow: var(--oui-green-6);
|
|
44
|
+
--oui-shadow-value: var(--oui-green-6);
|
|
42
45
|
}
|
|
43
46
|
:where(.oui-message-orange, .oui-message-warning) {
|
|
44
47
|
--oui-background: var(--oui-orange-0);
|
|
48
|
+
--oui-border: var(--oui-orange-2);
|
|
45
49
|
--oui-foreground: var(--oui-orange-8);
|
|
46
|
-
--oui-shadow: var(--oui-orange-6);
|
|
50
|
+
--oui-shadow-value: var(--oui-orange-6);
|
|
47
51
|
}
|
|
48
52
|
:where(.oui-message-purple, .oui-message-special) {
|
|
49
53
|
--oui-background: var(--oui-purple-0);
|
|
54
|
+
--oui-border: var(--oui-purple-2);
|
|
50
55
|
--oui-foreground: var(--oui-purple-8);
|
|
51
|
-
--oui-shadow: var(--oui-purple-6);
|
|
56
|
+
--oui-shadow-value: var(--oui-purple-6);
|
|
52
57
|
}
|
|
53
58
|
:where(.oui-message-red, .oui-message-error) {
|
|
54
59
|
--oui-background: var(--oui-red-0);
|
|
60
|
+
--oui-border: var(--oui-red-2);
|
|
55
61
|
--oui-foreground: var(--oui-red-8);
|
|
56
|
-
--oui-shadow: var(--oui-red-6);
|
|
62
|
+
--oui-shadow-value: var(--oui-red-6);
|
|
57
63
|
}
|
|
58
64
|
:where(.oui-message-yellow, .oui-message-notice) {
|
|
59
65
|
--oui-background: var(--oui-yellow-0);
|
|
66
|
+
--oui-border: var(--oui-yellow-2);
|
|
60
67
|
--oui-foreground: var(--oui-yellow-8);
|
|
61
|
-
--oui-shadow: var(--oui-yellow-6);
|
|
68
|
+
--oui-shadow-value: var(--oui-yellow-6);
|
|
62
69
|
}
|
|
63
70
|
|
|
64
71
|
|
package/dist/css/reset.css
CHANGED
|
@@ -184,7 +184,9 @@
|
|
|
184
184
|
-moz-appearance: none;
|
|
185
185
|
appearance: none; /* Change the inconsistent appearance in all browsers [SE]*/
|
|
186
186
|
padding-right: 1em; /* ditto*/
|
|
187
|
-
background: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='4'%3E%3Cpath d='M4 0h6L7 4'/%3E%3C/svg%3E")
|
|
187
|
+
background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='4'%3E%3Cpath d='M4 0h6L7 4'/%3E%3C/svg%3E");
|
|
188
|
+
background-position: right center/1em; /* ditto*/
|
|
189
|
+
background-repeat: no-repeat; /* ditto*/
|
|
188
190
|
border-radius: 0; /* ditto*/
|
|
189
191
|
}
|
|
190
192
|
|
package/dist/css/table.css
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/*! https://github.com/oscarpalmer/oui */
|
|
2
2
|
:where(.oui-table) {
|
|
3
3
|
width: 100%;
|
|
4
|
+
background-color: var(--oui-absolute);
|
|
4
5
|
}
|
|
5
6
|
:where(.oui-table-wrapper) {
|
|
6
7
|
max-height: 32em;
|
|
@@ -24,35 +25,51 @@
|
|
|
24
25
|
z-index: 2;
|
|
25
26
|
}
|
|
26
27
|
:where(.oui-table tbody tr:nth-of-type(2n)) {
|
|
27
|
-
background-color: color-mix(in oklab, var(--oui-blue-0), transparent
|
|
28
|
+
background-color: color-mix(in oklab, var(--oui-blue-0), transparent 50%);
|
|
28
29
|
}
|
|
29
30
|
:where(.oui-table th, .oui-table tfoot td) {
|
|
30
31
|
background-color: var(--oui-gray-1);
|
|
31
32
|
border: solid var(--oui-gray-3);
|
|
32
33
|
border-width: 0 1px 0 0;
|
|
34
|
+
}
|
|
35
|
+
:where(.oui-table thead th, .oui-table tfoot td) {
|
|
33
36
|
position: sticky;
|
|
34
37
|
left: 0;
|
|
35
38
|
z-index: 1;
|
|
36
39
|
}
|
|
37
|
-
:where(.oui-table th, .oui-table tfoot td)::after {
|
|
40
|
+
:where(.oui-table thead th, .oui-table tfoot td)::after {
|
|
38
41
|
content: "";
|
|
39
|
-
|
|
42
|
+
width: 100%;
|
|
43
|
+
height: 4px;
|
|
44
|
+
background-image: linear-gradient(to var(--oui-shadow-direction), rgba(0, 0, 0, 0.1), transparent);
|
|
40
45
|
position: absolute;
|
|
41
46
|
}
|
|
42
47
|
:where(.oui-table th, .oui-table td) {
|
|
43
|
-
padding: 0.5em;
|
|
48
|
+
padding: 0.5em 0.625rem;
|
|
44
49
|
}
|
|
45
|
-
:where(.oui-table th) {
|
|
46
|
-
|
|
50
|
+
:where(.oui-table thead th) {
|
|
51
|
+
font-size: 0.75rem;
|
|
52
|
+
font-weight: bold;
|
|
53
|
+
letter-spacing: 0.1em;
|
|
54
|
+
text-align: left;
|
|
55
|
+
text-transform: uppercase;
|
|
56
|
+
top: 0;
|
|
57
|
+
}
|
|
58
|
+
:where(.oui-table thead th)::after {
|
|
59
|
+
--oui-shadow-direction: bottom;
|
|
60
|
+
border-top: 1px solid var(--oui-gray-3);
|
|
61
|
+
inset: 100% 0 0 0;
|
|
47
62
|
}
|
|
48
|
-
:where(.oui-table th)
|
|
49
|
-
|
|
63
|
+
:where(.oui-table:has(caption) thead th) {
|
|
64
|
+
top: 2rem;
|
|
50
65
|
}
|
|
51
66
|
:where(.oui-table tfoot td) {
|
|
52
67
|
bottom: 0;
|
|
53
68
|
}
|
|
54
69
|
:where(.oui-table tfoot td)::after {
|
|
55
|
-
|
|
70
|
+
--oui-shadow-direction: top;
|
|
71
|
+
border-bottom: 1px solid var(--oui-gray-3);
|
|
72
|
+
inset: -4px 0 0 0;
|
|
56
73
|
}
|
|
57
74
|
:where(.oui-table tbody td) {
|
|
58
75
|
border: solid var(--oui-gray-3);
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
|
|
2
|
+
:where([oui-tooltip-content]) {
|
|
3
|
+
box-shadow: inset 0 1px 0 0 transparent, 0 0 0 1px rgba(0, 0, 0, 0.05), 0 1px 2px -0.5px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.05), 0 4px 8px -2px rgba(0, 0, 0, 0.05), 0 8px 16px -4px rgba(0, 0, 0, 0.05), 0 16px 32px -8px rgba(0, 0, 0, 0.05), 0 32px 64px -16px rgba(0, 0, 0, 0.05), 0 64px 128px -32px rgba(0, 0, 0, 0.05);
|
|
4
|
+
max-width: 48ch;
|
|
5
|
+
padding: 0.75em 1em;
|
|
6
|
+
background-color: var(--oui-absolute);
|
|
7
|
+
border-radius: 0.25rem;
|
|
8
|
+
font-size: 0.875rem;
|
|
9
|
+
position: fixed;
|
|
10
|
+
inset: 0 auto auto 0;
|
|
11
|
+
z-index: 10;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
function attributable(attribute, add, remove) {
|
|
4
|
+
const observer = new MutationObserver((entries) => {
|
|
5
|
+
const { length } = entries;
|
|
6
|
+
for (let index = 0; index < length; index += 1) {
|
|
7
|
+
const entry = entries[index];
|
|
8
|
+
if (entry.type === "attributes" && entry.target instanceof HTMLElement) {
|
|
9
|
+
if (entry.target.hasAttribute(attribute)) {
|
|
10
|
+
handleAdded(attribute, [entry.target], add);
|
|
11
|
+
} else {
|
|
12
|
+
handleRemoved([entry.target], remove);
|
|
13
|
+
}
|
|
14
|
+
} else if (entry.type === "childList") {
|
|
15
|
+
handleAdded(attribute, entry.addedNodes, add);
|
|
16
|
+
handleRemoved(entry.removedNodes, remove);
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
});
|
|
20
|
+
observer.observe(document, {
|
|
21
|
+
attributeFilter: [attribute],
|
|
22
|
+
attributes: true,
|
|
23
|
+
childList: true,
|
|
24
|
+
subtree: true
|
|
25
|
+
});
|
|
26
|
+
requestAnimationFrame(() => {
|
|
27
|
+
handleAdded(attribute, document.querySelectorAll(`[${attribute}]`), add);
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
function handleAdded(attribute, nodes, add) {
|
|
31
|
+
const elements = [...nodes].filter(
|
|
32
|
+
(node) => node instanceof HTMLElement
|
|
33
|
+
);
|
|
34
|
+
const { length } = elements;
|
|
35
|
+
for (let index = 0; index < length; index += 1) {
|
|
36
|
+
const element = elements[index];
|
|
37
|
+
if (element.hasAttribute(attribute)) {
|
|
38
|
+
add(element);
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
function handleRemoved(nodes, remove) {
|
|
43
|
+
const elements = [...nodes].filter(
|
|
44
|
+
(node) => node instanceof HTMLElement
|
|
45
|
+
);
|
|
46
|
+
const { length } = elements;
|
|
47
|
+
for (let index = 0; index < length; index += 1) {
|
|
48
|
+
remove(elements[index]);
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
exports.attributable = attributable;
|