@oscarpalmer/oui 0.18.0 → 0.20.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/a11y.css +0 -1
- package/dist/css/badge.css +10 -10
- package/dist/css/button.css +9 -9
- package/dist/css/color.css +99 -99
- package/dist/css/content.css +1 -1
- package/dist/css/flex.css +39 -39
- package/dist/css/form.css +29 -57
- package/dist/css/message.css +6 -6
- package/dist/css/popover.css +22 -0
- package/dist/css/reset.css +11 -10
- package/dist/css/table.css +5 -5
- package/dist/css/tooltip.css +61 -1
- package/dist/js/attributable.d.mts +4 -0
- package/dist/js/{attributable.js → attributable.mjs} +8 -1
- package/dist/js/floatable.d.mts +26 -0
- package/dist/js/{floatable.js → floatable.mjs} +73 -50
- package/dist/js/focus-trap/embedded.d.mts +26 -0
- package/dist/js/focus-trap/{embedded.js → embedded.mjs} +10 -8
- package/dist/js/focus-trap/standalone.d.mts +1 -0
- package/dist/js/focus-trap/{standalone.js → standalone.mjs} +5 -2
- package/dist/js/index.d.mts +4 -0
- package/dist/js/index.mjs +5 -0
- package/dist/js/popover.d.mts +20 -0
- package/dist/js/{popover.js → popover.mjs} +11 -9
- package/dist/js/splitter.d.mts +25 -0
- package/dist/js/{splitter.js → splitter.mjs} +60 -58
- package/dist/js/tooltip.d.mts +4 -0
- package/dist/js/{tooltip.js → tooltip.mjs} +21 -19
- package/package.json +65 -70
- package/src/css/a11y.scss +1 -1
- package/src/css/badge.scss +23 -19
- package/src/css/button.scss +9 -9
- package/src/css/color.scss +99 -99
- package/src/css/content.scss +6 -8
- package/src/css/flex.scss +21 -20
- package/src/css/form.scss +37 -60
- package/src/css/message.scss +8 -12
- package/src/css/mixins.scss +41 -13
- package/src/css/popover.scss +7 -2
- package/src/css/reset.scss +18 -18
- package/src/css/splitter.scss +15 -13
- package/src/css/table.scss +12 -12
- package/src/css/tooltip.scss +79 -4
- package/src/js/attributable.ts +14 -11
- package/src/js/floatable.ts +134 -74
- package/src/js/focus-trap/embedded.ts +7 -31
- package/src/js/popover.ts +3 -3
- package/src/js/splitter.ts +10 -43
- package/src/js/tooltip.ts +8 -20
- package/dist/css/value.css +0 -1
- package/dist/js/attributable.full.js +0 -48
- package/dist/js/floatable.full.js +0 -413
- package/dist/js/focus-trap/embedded.full.js +0 -351
- package/dist/js/focus-trap/standalone.full.js +0 -402
- package/dist/js/index.js +0 -5
- package/dist/js/oui.full.js +0 -1596
- package/dist/js/popover.full.js +0 -822
- package/dist/js/splitter.full.js +0 -605
- package/dist/js/tooltip.full.js +0 -679
- package/types/attributable.d.ts +0 -1
- package/types/floatable.d.ts +0 -24
- package/types/focus-trap/embedded.d.ts +0 -24
- package/types/focus-trap/standalone.d.ts +0 -1
- package/types/index.d.ts +0 -4
- package/types/popover.d.ts +0 -17
- package/types/splitter.d.ts +0 -23
- package/types/tooltip.d.ts +0 -2
package/dist/css/form.css
CHANGED
|
@@ -203,132 +203,105 @@
|
|
|
203
203
|
top: 50%;
|
|
204
204
|
transform: translateY(-50%);
|
|
205
205
|
}
|
|
206
|
-
:where(.oui-input.oui-validate:not([disabled],
|
|
207
|
-
[readonly],
|
|
208
|
-
[aria-disabled=true i]):is(:user-invalid:not([aria-invalid=false i]),
|
|
206
|
+
:where(.oui-input.oui-validate:not([disabled], [readonly], [aria-disabled=true i]):is(:user-invalid:not([aria-invalid=false i]),
|
|
209
207
|
[aria-invalid=true i])) {
|
|
210
208
|
--oui-border-value: var(--oui-red-5);
|
|
211
209
|
--oui-foreground-value: var(--oui-red-9);
|
|
212
210
|
--oui-outline-percentage: 82.5%;
|
|
213
211
|
--oui-outline-value: var(--oui-red-6);
|
|
214
212
|
}
|
|
215
|
-
:where(.oui-input.oui-validate:not([disabled],
|
|
216
|
-
[readonly],
|
|
217
|
-
[aria-disabled=true i]):is(:user-invalid:not([aria-invalid=false i]),
|
|
213
|
+
:where(.oui-input.oui-validate:not([disabled], [readonly], [aria-disabled=true i]):is(:user-invalid:not([aria-invalid=false i]),
|
|
218
214
|
[aria-invalid=true i]))::file-selector-button {
|
|
219
215
|
--oui-background-value: var(--oui-red-2);
|
|
220
216
|
--oui-foreground-value: var(--oui-red-8);
|
|
221
217
|
--oui-outline-value: var(--oui-red-6);
|
|
222
218
|
}
|
|
223
|
-
:where(.oui-input.oui-validate:not([disabled],
|
|
224
|
-
[readonly],
|
|
225
|
-
[aria-disabled=true i]):is(:user-invalid:not([aria-invalid=false i]),
|
|
219
|
+
:where(.oui-input.oui-validate:not([disabled], [readonly], [aria-disabled=true i]):is(:user-invalid:not([aria-invalid=false i]),
|
|
226
220
|
[aria-invalid=true i]))::-moz-range-thumb {
|
|
227
221
|
--oui-background-value: var(--oui-red-6);
|
|
228
222
|
}
|
|
229
|
-
:where(.oui-input.oui-validate:not([disabled],
|
|
230
|
-
[readonly],
|
|
231
|
-
[aria-disabled=true i]):is(:user-invalid:not([aria-invalid=false i]),
|
|
223
|
+
:where(.oui-input.oui-validate:not([disabled], [readonly], [aria-disabled=true i]):is(:user-invalid:not([aria-invalid=false i]),
|
|
232
224
|
[aria-invalid=true i]))::-ms-thumb {
|
|
233
225
|
--oui-background-value: var(--oui-red-6);
|
|
234
226
|
}
|
|
235
|
-
:where(.oui-input.oui-validate:not([disabled],
|
|
236
|
-
[readonly],
|
|
237
|
-
[aria-disabled=true i]):is(:user-invalid:not([aria-invalid=false i]),
|
|
227
|
+
:where(.oui-input.oui-validate:not([disabled], [readonly], [aria-disabled=true i]):is(:user-invalid:not([aria-invalid=false i]),
|
|
238
228
|
[aria-invalid=true i]))::-webkit-slider-thumb {
|
|
239
229
|
--oui-background-value: var(--oui-red-6);
|
|
240
230
|
}
|
|
241
|
-
:where(.oui-input.oui-validate:not([disabled],
|
|
242
|
-
[readonly],
|
|
243
|
-
[aria-disabled=true i]):is(:user-invalid:not([aria-invalid=false i]),
|
|
231
|
+
:where(.oui-input.oui-validate:not([disabled], [readonly], [aria-disabled=true i]):is(:user-invalid:not([aria-invalid=false i]),
|
|
244
232
|
[aria-invalid=true i]))::-moz-range-track {
|
|
245
233
|
--oui-border-value: var(--oui-red-5);
|
|
246
234
|
--oui-foreground-value: var(--oui-red-9);
|
|
247
235
|
--oui-outline-percentage: 82.5%;
|
|
248
236
|
--oui-outline-value: var(--oui-red-6);
|
|
249
237
|
}
|
|
250
|
-
:where(.oui-input.oui-validate:not([disabled],
|
|
251
|
-
[readonly],
|
|
252
|
-
[aria-disabled=true i]):is(:user-invalid:not([aria-invalid=false i]),
|
|
238
|
+
:where(.oui-input.oui-validate:not([disabled], [readonly], [aria-disabled=true i]):is(:user-invalid:not([aria-invalid=false i]),
|
|
253
239
|
[aria-invalid=true i]))::-ms-track {
|
|
254
240
|
--oui-border-value: var(--oui-red-5);
|
|
255
241
|
--oui-foreground-value: var(--oui-red-9);
|
|
256
242
|
--oui-outline-percentage: 82.5%;
|
|
257
243
|
--oui-outline-value: var(--oui-red-6);
|
|
258
244
|
}
|
|
259
|
-
:where(.oui-input.oui-validate:not([disabled],
|
|
260
|
-
[readonly],
|
|
261
|
-
[aria-disabled=true i]):is(:user-invalid:not([aria-invalid=false i]),
|
|
245
|
+
:where(.oui-input.oui-validate:not([disabled], [readonly], [aria-disabled=true i]):is(:user-invalid:not([aria-invalid=false i]),
|
|
262
246
|
[aria-invalid=true i]))::-webkit-slider-runnable-track {
|
|
263
247
|
--oui-border-value: var(--oui-red-5);
|
|
264
248
|
--oui-foreground-value: var(--oui-red-9);
|
|
265
249
|
--oui-outline-percentage: 82.5%;
|
|
266
250
|
--oui-outline-value: var(--oui-red-6);
|
|
267
251
|
}
|
|
268
|
-
:where(.oui-input.oui-validate:not([disabled],
|
|
269
|
-
[readonly],
|
|
270
|
-
[aria-disabled=true i]):is(:user-invalid:not([aria-invalid=false i]),
|
|
252
|
+
:where(.oui-input.oui-validate:not([disabled], [readonly], [aria-disabled=true i]):is(:user-invalid:not([aria-invalid=false i]),
|
|
271
253
|
[aria-invalid=true i])) > option:checked {
|
|
272
254
|
background-color: var(--oui-red-2);
|
|
273
255
|
color: var(--oui-red-9);
|
|
274
256
|
}
|
|
275
|
-
:where(.oui-input.oui-validate:not([disabled],
|
|
276
|
-
[
|
|
277
|
-
[aria-disabled=true i]):is(:user-valid:not([aria-invalid=true i]), [aria-invalid=false i])) {
|
|
257
|
+
:where(.oui-input.oui-validate:not([disabled], [readonly], [aria-disabled=true i]):is(:user-valid:not([aria-invalid=true i]),
|
|
258
|
+
[aria-invalid=false i])) {
|
|
278
259
|
--oui-border-value: var(--oui-green-5);
|
|
279
260
|
--oui-foreground-value: var(--oui-green-9);
|
|
280
261
|
--oui-outline-percentage: 82.5%;
|
|
281
262
|
--oui-outline-value: var(--oui-green-6);
|
|
282
263
|
}
|
|
283
|
-
:where(.oui-input.oui-validate:not([disabled],
|
|
284
|
-
[
|
|
285
|
-
[aria-disabled=true i]):is(:user-valid:not([aria-invalid=true i]), [aria-invalid=false i]))::file-selector-button {
|
|
264
|
+
:where(.oui-input.oui-validate:not([disabled], [readonly], [aria-disabled=true i]):is(:user-valid:not([aria-invalid=true i]),
|
|
265
|
+
[aria-invalid=false i]))::file-selector-button {
|
|
286
266
|
--oui-background-value: var(--oui-green-2);
|
|
287
267
|
--oui-foreground-value: var(--oui-green-8);
|
|
288
268
|
--oui-outline-value: var(--oui-green-6);
|
|
289
269
|
}
|
|
290
|
-
:where(.oui-input.oui-validate:not([disabled],
|
|
291
|
-
[
|
|
292
|
-
[aria-disabled=true i]):is(:user-valid:not([aria-invalid=true i]), [aria-invalid=false i]))::-moz-range-track {
|
|
270
|
+
:where(.oui-input.oui-validate:not([disabled], [readonly], [aria-disabled=true i]):is(:user-valid:not([aria-invalid=true i]),
|
|
271
|
+
[aria-invalid=false i]))::-moz-range-track {
|
|
293
272
|
--oui-border-value: var(--oui-green-5);
|
|
294
273
|
--oui-foreground-value: var(--oui-green-9);
|
|
295
274
|
--oui-outline-percentage: 82.5%;
|
|
296
275
|
--oui-outline-value: var(--oui-green-6);
|
|
297
276
|
}
|
|
298
|
-
:where(.oui-input.oui-validate:not([disabled],
|
|
299
|
-
[
|
|
300
|
-
[aria-disabled=true i]):is(:user-valid:not([aria-invalid=true i]), [aria-invalid=false i]))::-ms-track {
|
|
277
|
+
:where(.oui-input.oui-validate:not([disabled], [readonly], [aria-disabled=true i]):is(:user-valid:not([aria-invalid=true i]),
|
|
278
|
+
[aria-invalid=false i]))::-ms-track {
|
|
301
279
|
--oui-border-value: var(--oui-green-5);
|
|
302
280
|
--oui-foreground-value: var(--oui-green-9);
|
|
303
281
|
--oui-outline-percentage: 82.5%;
|
|
304
282
|
--oui-outline-value: var(--oui-green-6);
|
|
305
283
|
}
|
|
306
|
-
:where(.oui-input.oui-validate:not([disabled],
|
|
307
|
-
[
|
|
308
|
-
[aria-disabled=true i]):is(:user-valid:not([aria-invalid=true i]), [aria-invalid=false i]))::-webkit-slider-runnable-track {
|
|
284
|
+
:where(.oui-input.oui-validate:not([disabled], [readonly], [aria-disabled=true i]):is(:user-valid:not([aria-invalid=true i]),
|
|
285
|
+
[aria-invalid=false i]))::-webkit-slider-runnable-track {
|
|
309
286
|
--oui-border-value: var(--oui-green-5);
|
|
310
287
|
--oui-foreground-value: var(--oui-green-9);
|
|
311
288
|
--oui-outline-percentage: 82.5%;
|
|
312
289
|
--oui-outline-value: var(--oui-green-6);
|
|
313
290
|
}
|
|
314
|
-
:where(.oui-input.oui-validate:not([disabled],
|
|
315
|
-
[
|
|
316
|
-
[aria-disabled=true i]):is(:user-valid:not([aria-invalid=true i]), [aria-invalid=false i]))::-moz-range-thumb {
|
|
291
|
+
:where(.oui-input.oui-validate:not([disabled], [readonly], [aria-disabled=true i]):is(:user-valid:not([aria-invalid=true i]),
|
|
292
|
+
[aria-invalid=false i]))::-moz-range-thumb {
|
|
317
293
|
--oui-background-value: var(--oui-green-6);
|
|
318
294
|
}
|
|
319
|
-
:where(.oui-input.oui-validate:not([disabled],
|
|
320
|
-
[
|
|
321
|
-
[aria-disabled=true i]):is(:user-valid:not([aria-invalid=true i]), [aria-invalid=false i]))::-ms-thumb {
|
|
295
|
+
:where(.oui-input.oui-validate:not([disabled], [readonly], [aria-disabled=true i]):is(:user-valid:not([aria-invalid=true i]),
|
|
296
|
+
[aria-invalid=false i]))::-ms-thumb {
|
|
322
297
|
--oui-background-value: var(--oui-green-6);
|
|
323
298
|
}
|
|
324
|
-
:where(.oui-input.oui-validate:not([disabled],
|
|
325
|
-
[
|
|
326
|
-
[aria-disabled=true i]):is(:user-valid:not([aria-invalid=true i]), [aria-invalid=false i]))::-webkit-slider-thumb {
|
|
299
|
+
:where(.oui-input.oui-validate:not([disabled], [readonly], [aria-disabled=true i]):is(:user-valid:not([aria-invalid=true i]),
|
|
300
|
+
[aria-invalid=false i]))::-webkit-slider-thumb {
|
|
327
301
|
--oui-background-value: var(--oui-green-6);
|
|
328
302
|
}
|
|
329
|
-
:where(.oui-input.oui-validate:not([disabled],
|
|
330
|
-
[
|
|
331
|
-
[aria-disabled=true i]):is(:user-valid:not([aria-invalid=true i]), [aria-invalid=false i])) > option:checked {
|
|
303
|
+
:where(.oui-input.oui-validate:not([disabled], [readonly], [aria-disabled=true i]):is(:user-valid:not([aria-invalid=true i]),
|
|
304
|
+
[aria-invalid=false i])) > option:checked {
|
|
332
305
|
background-color: var(--oui-green-2);
|
|
333
306
|
color: var(--oui-green-9);
|
|
334
307
|
}
|
|
@@ -512,7 +485,7 @@
|
|
|
512
485
|
|
|
513
486
|
:where(select.oui-input:is([multiple])) {
|
|
514
487
|
--oui-off: attr(oui-off);
|
|
515
|
-
--oui-on: attr(oui-on,
|
|
488
|
+
--oui-on: attr(oui-on, '\2713');
|
|
516
489
|
padding: 0;
|
|
517
490
|
}
|
|
518
491
|
:where(select.oui-input:is([multiple]) > option) {
|
|
@@ -713,7 +686,7 @@
|
|
|
713
686
|
--oui-background-value: var(--oui-gray-0);
|
|
714
687
|
--oui-border-value: var(--oui-gray-3);
|
|
715
688
|
--oui-foreground-percentage: 25%;
|
|
716
|
-
--oui-foreground-value:
|
|
689
|
+
--oui-foreground-value: currentcolor;
|
|
717
690
|
color: color-mix(in oklab, var(--oui-foreground-value), transparent var(--oui-foreground-percentage));
|
|
718
691
|
font-style: italic;
|
|
719
692
|
cursor: default;
|
|
@@ -738,7 +711,6 @@
|
|
|
738
711
|
width: 1px !important;
|
|
739
712
|
height: 1px !important;
|
|
740
713
|
padding: 0 !important;
|
|
741
|
-
clip: rect(1px, 1px 1px, 1px) !important;
|
|
742
714
|
clip-path: inset(50%) !important;
|
|
743
715
|
overflow: hidden !important;
|
|
744
716
|
border: 0 !important;
|
package/dist/css/message.css
CHANGED
|
@@ -35,37 +35,37 @@
|
|
|
35
35
|
flex-flow: row wrap;
|
|
36
36
|
gap: 1em;
|
|
37
37
|
}
|
|
38
|
-
:where(.oui-message
|
|
38
|
+
:where(.oui-message--blue, .oui-message--info) {
|
|
39
39
|
--oui-background: var(--oui-blue-0);
|
|
40
40
|
--oui-border: var(--oui-blue-2);
|
|
41
41
|
--oui-foreground: var(--oui-blue-8);
|
|
42
42
|
--oui-shadow-value: var(--oui-blue-6);
|
|
43
43
|
}
|
|
44
|
-
:where(.oui-message
|
|
44
|
+
:where(.oui-message--green, .oui-message--success) {
|
|
45
45
|
--oui-background: var(--oui-green-0);
|
|
46
46
|
--oui-border: var(--oui-green-2);
|
|
47
47
|
--oui-foreground: var(--oui-green-8);
|
|
48
48
|
--oui-shadow-value: var(--oui-green-6);
|
|
49
49
|
}
|
|
50
|
-
:where(.oui-message
|
|
50
|
+
:where(.oui-message--orange, .oui-message--warning) {
|
|
51
51
|
--oui-background: var(--oui-orange-0);
|
|
52
52
|
--oui-border: var(--oui-orange-2);
|
|
53
53
|
--oui-foreground: var(--oui-orange-8);
|
|
54
54
|
--oui-shadow-value: var(--oui-orange-6);
|
|
55
55
|
}
|
|
56
|
-
:where(.oui-message
|
|
56
|
+
:where(.oui-message--purple, .oui-message--special) {
|
|
57
57
|
--oui-background: var(--oui-purple-0);
|
|
58
58
|
--oui-border: var(--oui-purple-2);
|
|
59
59
|
--oui-foreground: var(--oui-purple-8);
|
|
60
60
|
--oui-shadow-value: var(--oui-purple-6);
|
|
61
61
|
}
|
|
62
|
-
:where(.oui-message
|
|
62
|
+
:where(.oui-message--red, .oui-message--error) {
|
|
63
63
|
--oui-background: var(--oui-red-0);
|
|
64
64
|
--oui-border: var(--oui-red-2);
|
|
65
65
|
--oui-foreground: var(--oui-red-8);
|
|
66
66
|
--oui-shadow-value: var(--oui-red-6);
|
|
67
67
|
}
|
|
68
|
-
:where(.oui-message
|
|
68
|
+
:where(.oui-message--yellow, .oui-message--notice) {
|
|
69
69
|
--oui-background: var(--oui-yellow-0);
|
|
70
70
|
--oui-border: var(--oui-yellow-2);
|
|
71
71
|
--oui-foreground: var(--oui-yellow-8);
|
package/dist/css/popover.css
CHANGED
|
@@ -1,12 +1,34 @@
|
|
|
1
1
|
|
|
2
2
|
:where([oui-popover-content]) {
|
|
3
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
|
+
--margin-left: 0;
|
|
5
|
+
--margin-top: 0;
|
|
6
|
+
margin: var(--margin-top, 0) 0 0 var(--margin-left, 0);
|
|
7
|
+
pointer-events: all !important;
|
|
8
|
+
}
|
|
9
|
+
:where([oui-popover-content])[position^=above], :where([oui-popover-content])[position^=top] {
|
|
10
|
+
--margin-top: -0.5rem;
|
|
11
|
+
}
|
|
12
|
+
:where([oui-popover-content])[position^=below], :where([oui-popover-content])[position^=bottom] {
|
|
13
|
+
--margin-top: 0.5rem;
|
|
14
|
+
}
|
|
15
|
+
:where([oui-popover-content])[position^=end], :where([oui-popover-content])[position^=right] {
|
|
16
|
+
--margin-left: 0.5rem;
|
|
17
|
+
}
|
|
18
|
+
:where([oui-popover-content])[position^=left], :where([oui-popover-content])[position^=start] {
|
|
19
|
+
--margin-left: -0.5rem;
|
|
20
|
+
}
|
|
21
|
+
:where([oui-popover-content]) {
|
|
4
22
|
padding: 1rem;
|
|
23
|
+
overscroll-behavior: contain;
|
|
5
24
|
background-color: var(--oui-absolute);
|
|
6
25
|
border-radius: 0.5rem;
|
|
7
26
|
}
|
|
8
27
|
:where([oui-popover-content]):focus {
|
|
9
28
|
outline: none;
|
|
10
29
|
}
|
|
30
|
+
:where([oui-popover-content]) * {
|
|
31
|
+
overscroll-behavior: contain;
|
|
32
|
+
}
|
|
11
33
|
|
|
12
34
|
|
package/dist/css/reset.css
CHANGED
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
-moz-tab-size: 4;
|
|
57
57
|
-o-tab-size: 4;
|
|
58
58
|
tab-size: 4;
|
|
59
|
-
|
|
59
|
+
overflow-wrap: break-word;
|
|
60
60
|
}
|
|
61
61
|
|
|
62
62
|
:where(body) {
|
|
@@ -105,9 +105,9 @@ input[type=reset i],
|
|
|
105
105
|
input[type=submit i],
|
|
106
106
|
summary) {
|
|
107
107
|
/** Correct the inability to style clickable types in iOS [HR][RS][SE] */
|
|
108
|
-
-webkit-appearance:
|
|
109
|
-
-moz-appearance:
|
|
110
|
-
appearance:
|
|
108
|
+
-webkit-appearance: auto;
|
|
109
|
+
-moz-appearance: auto;
|
|
110
|
+
appearance: auto;
|
|
111
111
|
/** Ditto */
|
|
112
112
|
cursor: pointer;
|
|
113
113
|
}
|
|
@@ -174,7 +174,7 @@ summary) {
|
|
|
174
174
|
}
|
|
175
175
|
|
|
176
176
|
:where(small, sub, sup) {
|
|
177
|
-
font-size: 0.
|
|
177
|
+
font-size: 0.875em;
|
|
178
178
|
}
|
|
179
179
|
|
|
180
180
|
:where(sub, sup) {
|
|
@@ -194,7 +194,7 @@ summary) {
|
|
|
194
194
|
:where(table) {
|
|
195
195
|
border-collapse: collapse;
|
|
196
196
|
/** Correct table border colour in Chrome, Edge, and Safari [SE] */
|
|
197
|
-
border-color:
|
|
197
|
+
border-color: currentcolor;
|
|
198
198
|
/** Modernized border spacing [HR] */
|
|
199
199
|
border-spacing: 0;
|
|
200
200
|
/** More legible numbers [HR] */
|
|
@@ -277,9 +277,9 @@ summary) {
|
|
|
277
277
|
|
|
278
278
|
::file-selector-button {
|
|
279
279
|
/** Correct the inability to style upload buttons in iOS and Safari [RS][SE] */
|
|
280
|
-
-webkit-appearance:
|
|
281
|
-
-moz-appearance:
|
|
282
|
-
appearance:
|
|
280
|
+
-webkit-appearance: auto;
|
|
281
|
+
-moz-appearance: auto;
|
|
282
|
+
appearance: auto;
|
|
283
283
|
color: inherit;
|
|
284
284
|
font: inherit;
|
|
285
285
|
line-height: 1.25;
|
|
@@ -308,6 +308,7 @@ summary) {
|
|
|
308
308
|
::-webkit-search-decoration {
|
|
309
309
|
/** Remove the inner padding in Chrome, Edge, and Safari on macOS [SE] */
|
|
310
310
|
-webkit-appearance: none;
|
|
311
|
+
appearance: none;
|
|
311
312
|
}
|
|
312
313
|
|
|
313
314
|
/**
|
|
@@ -360,7 +361,7 @@ summary) {
|
|
|
360
361
|
}
|
|
361
362
|
|
|
362
363
|
:where(svg:not([fill])) {
|
|
363
|
-
fill:
|
|
364
|
+
fill: currentcolor;
|
|
364
365
|
}
|
|
365
366
|
|
|
366
367
|
/**
|
package/dist/css/table.css
CHANGED
|
@@ -3,20 +3,20 @@
|
|
|
3
3
|
width: 100%;
|
|
4
4
|
background-color: var(--oui-absolute);
|
|
5
5
|
}
|
|
6
|
-
:where(.oui-
|
|
6
|
+
:where(.oui-table_wrapper) {
|
|
7
7
|
max-height: 32em;
|
|
8
8
|
overflow: auto;
|
|
9
|
+
overscroll-behavior: contain;
|
|
9
10
|
border: 1px solid var(--oui-gray-3);
|
|
10
11
|
border-radius: 0.25em;
|
|
11
12
|
position: relative;
|
|
12
|
-
overscroll-behavior-y: none;
|
|
13
13
|
}
|
|
14
14
|
:where(.oui-table caption) {
|
|
15
15
|
height: 2rem;
|
|
16
16
|
align-content: center;
|
|
17
17
|
background-color: var(--oui-gray-1);
|
|
18
18
|
border: solid var(--oui-gray-3);
|
|
19
|
-
border-width: 0 0 1px
|
|
19
|
+
border-width: 0 0 1px;
|
|
20
20
|
font-size: 0.875rem;
|
|
21
21
|
text-align: left;
|
|
22
22
|
text-indent: 0.5rem;
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
:where(.oui-table thead th)::after {
|
|
59
59
|
--oui-shadow-direction: bottom;
|
|
60
60
|
border-top: 1px solid var(--oui-gray-3);
|
|
61
|
-
inset: 100
|
|
61
|
+
inset: 100%;
|
|
62
62
|
}
|
|
63
63
|
:where(.oui-table:has(caption) thead th) {
|
|
64
64
|
top: 2rem;
|
|
@@ -69,7 +69,7 @@
|
|
|
69
69
|
:where(.oui-table tfoot td)::after {
|
|
70
70
|
--oui-shadow-direction: top;
|
|
71
71
|
border-bottom: 1px solid var(--oui-gray-3);
|
|
72
|
-
inset: -4px
|
|
72
|
+
inset: -4px;
|
|
73
73
|
}
|
|
74
74
|
:where(.oui-table tbody td) {
|
|
75
75
|
border: solid var(--oui-gray-3);
|
package/dist/css/tooltip.css
CHANGED
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
|
|
2
|
-
:where([oui-tooltip]:is(abbr,
|
|
2
|
+
:where([oui-tooltip]:is(abbr,
|
|
3
|
+
b,
|
|
4
|
+
cite,
|
|
5
|
+
dfn,
|
|
6
|
+
code,
|
|
7
|
+
em,
|
|
8
|
+
i,
|
|
9
|
+
kbd,
|
|
10
|
+
mark,
|
|
11
|
+
q,
|
|
12
|
+
samp,
|
|
13
|
+
small,
|
|
14
|
+
span,
|
|
15
|
+
strong,
|
|
16
|
+
sub,
|
|
17
|
+
sup,
|
|
18
|
+
time,
|
|
19
|
+
var)) {
|
|
3
20
|
-webkit-text-decoration: underline dotted;
|
|
4
21
|
text-decoration: underline dotted;
|
|
5
22
|
-webkit-text-decoration-skip: ink;
|
|
@@ -10,6 +27,24 @@
|
|
|
10
27
|
|
|
11
28
|
:where([oui-tooltip-content]) {
|
|
12
29
|
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);
|
|
30
|
+
--margin-left: 0;
|
|
31
|
+
--margin-top: 0;
|
|
32
|
+
margin: var(--margin-top, 0) 0 0 var(--margin-left, 0);
|
|
33
|
+
pointer-events: all !important;
|
|
34
|
+
}
|
|
35
|
+
:where([oui-tooltip-content])[position^=above], :where([oui-tooltip-content])[position^=top] {
|
|
36
|
+
--margin-top: -0.5rem;
|
|
37
|
+
}
|
|
38
|
+
:where([oui-tooltip-content])[position^=below], :where([oui-tooltip-content])[position^=bottom] {
|
|
39
|
+
--margin-top: 0.5rem;
|
|
40
|
+
}
|
|
41
|
+
:where([oui-tooltip-content])[position^=end], :where([oui-tooltip-content])[position^=right] {
|
|
42
|
+
--margin-left: 0.5rem;
|
|
43
|
+
}
|
|
44
|
+
:where([oui-tooltip-content])[position^=left], :where([oui-tooltip-content])[position^=start] {
|
|
45
|
+
--margin-left: -0.5rem;
|
|
46
|
+
}
|
|
47
|
+
:where([oui-tooltip-content]) {
|
|
13
48
|
max-width: 48ch;
|
|
14
49
|
padding: 0.75em 1em;
|
|
15
50
|
opacity: 0;
|
|
@@ -19,6 +54,31 @@
|
|
|
19
54
|
transition: opacity 0.125s ease-in-out;
|
|
20
55
|
transition-delay: 0s;
|
|
21
56
|
}
|
|
57
|
+
:where([oui-tooltip-content])::after {
|
|
58
|
+
content: "";
|
|
59
|
+
opacity: 0;
|
|
60
|
+
position: absolute;
|
|
61
|
+
}
|
|
62
|
+
:where([oui-tooltip-content])[position^=above]::after, :where([oui-tooltip-content])[position^=below]::after, :where([oui-tooltip-content])[position^=bottom]::after, :where([oui-tooltip-content])[position^=top]::after {
|
|
63
|
+
width: 100%;
|
|
64
|
+
height: 0.5rem;
|
|
65
|
+
}
|
|
66
|
+
:where([oui-tooltip-content])[position^=above]::after, :where([oui-tooltip-content])[position^=top]::after {
|
|
67
|
+
inset: 100% 0 0;
|
|
68
|
+
}
|
|
69
|
+
:where([oui-tooltip-content])[position^=below]::after, :where([oui-tooltip-content])[position^=bottom]::after {
|
|
70
|
+
inset: -5rem 0 0;
|
|
71
|
+
}
|
|
72
|
+
:where([oui-tooltip-content])[position^=end]::after, :where([oui-tooltip-content])[position^=left]::after, :where([oui-tooltip-content])[position^=right]::after, :where([oui-tooltip-content])[position^=start]::after {
|
|
73
|
+
width: 0.5rem;
|
|
74
|
+
height: 100%;
|
|
75
|
+
}
|
|
76
|
+
:where([oui-tooltip-content])[position^=end]::after, :where([oui-tooltip-content])[position^=right]::after {
|
|
77
|
+
inset: 0 0 0 -0.5rem;
|
|
78
|
+
}
|
|
79
|
+
:where([oui-tooltip-content])[position^=left]::after, :where([oui-tooltip-content])[position^=start]::after {
|
|
80
|
+
inset: 0 0 0 100%;
|
|
81
|
+
}
|
|
22
82
|
|
|
23
83
|
:where([oui-tooltip-content][oui-tooltip-content-active]) {
|
|
24
84
|
opacity: 1;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
//#region src/js/attributable.ts
|
|
1
2
|
function attributable(attribute, add, remove) {
|
|
2
3
|
new MutationObserver((entries) => {
|
|
3
4
|
const { length } = entries;
|
|
@@ -26,11 +27,17 @@ function handleAdded(attribute, nodes, add) {
|
|
|
26
27
|
for (let index = 0; index < length; index += 1) {
|
|
27
28
|
const element = elements[index];
|
|
28
29
|
if (element.hasAttribute(attribute)) add(element);
|
|
30
|
+
if (element.hasChildNodes()) handleAdded(attribute, element.childNodes, add);
|
|
29
31
|
}
|
|
30
32
|
}
|
|
31
33
|
function handleRemoved(nodes, remove) {
|
|
32
34
|
const elements = [...nodes].filter((node) => node instanceof HTMLElement);
|
|
33
35
|
const { length } = elements;
|
|
34
|
-
for (let index = 0; index < length; index += 1)
|
|
36
|
+
for (let index = 0; index < length; index += 1) {
|
|
37
|
+
const element = elements[index];
|
|
38
|
+
remove(element);
|
|
39
|
+
if (element.hasChildNodes()) handleRemoved(element.childNodes, remove);
|
|
40
|
+
}
|
|
35
41
|
}
|
|
42
|
+
//#endregion
|
|
36
43
|
export { attributable };
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
//#region src/js/floatable.d.ts
|
|
2
|
+
declare class Floatable {
|
|
3
|
+
readonly options: Options;
|
|
4
|
+
active: boolean;
|
|
5
|
+
disabled: boolean;
|
|
6
|
+
frame: DOMHighResTimeStamp | undefined;
|
|
7
|
+
ignoreFocus: boolean;
|
|
8
|
+
constructor(options: Options);
|
|
9
|
+
destroy(): void;
|
|
10
|
+
disable(): void;
|
|
11
|
+
enable(): void;
|
|
12
|
+
toggle(active: boolean, ignoreFocus?: boolean): void;
|
|
13
|
+
}
|
|
14
|
+
type Options = {
|
|
15
|
+
anchor: HTMLElement;
|
|
16
|
+
content: HTMLElement;
|
|
17
|
+
defaultPosition: Position;
|
|
18
|
+
interactive: boolean;
|
|
19
|
+
positionAttribute: string;
|
|
20
|
+
preferAbove: boolean;
|
|
21
|
+
onAfter?: (active: boolean) => void;
|
|
22
|
+
};
|
|
23
|
+
type Position = 'above' | 'above-end' | 'above-start' | 'below' | 'below-end' | 'below-start' | 'end' | 'end-bottom' | 'end-top' | 'horizontal' | 'horizontal-bottom' | 'horizontal-top' | 'start' | 'start-bottom' | 'start-top' | 'vertical' | 'vertical-end' | 'vertical-start';
|
|
24
|
+
declare function deactivate(floatable: Floatable): void;
|
|
25
|
+
//#endregion
|
|
26
|
+
export { Floatable, deactivate };
|