@voidable/ui 0.8.1 → 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/README.md +8 -0
- package/dist/base-entry.d.ts +1 -0
- package/dist/base.d.ts +2 -1
- package/dist/base.js +5 -1
- package/dist/chunks/base-BxmMM3B7.js +298 -0
- package/dist/chunks/{keyboard-MQpfTX5I.js → keyboard-CEhMSkws.js} +19 -3
- package/dist/chunks/{modal-D_YVy2vg.js → modal-CgGp_fCs.js} +3 -3
- package/dist/chunks/{overlay-BywGMcDW.js → overlay-hLJ7IQHx.js} +2 -2
- package/dist/chunks/{parts-D30c8OoG.js → parts-DI_3VpSy.js} +25 -18
- package/dist/chunks/{base-CMruMbxC.js → projection-SnR79EHI.js} +105 -389
- package/dist/chunks/secret-value-CmTtVkMg.js +14 -0
- package/dist/chunks/value-list-CH6GjYXM.js +28 -0
- package/dist/components/accordion.js +2 -2
- package/dist/components/action-input.d.ts +8 -4
- package/dist/components/action-input.js +61 -49
- package/dist/components/alert.js +2 -2
- package/dist/components/avatar.js +13 -11
- package/dist/components/badge.js +1 -1
- package/dist/components/banner.js +2 -2
- package/dist/components/bar-chart.js +31 -29
- package/dist/components/breadcrumbs.js +2 -2
- package/dist/components/button.js +1 -1
- package/dist/components/calendar.js +78 -76
- package/dist/components/card.js +1 -1
- package/dist/components/carousel.js +18 -17
- package/dist/components/checkbox-group.d.ts +10 -0
- package/dist/components/checkbox-group.js +36 -23
- package/dist/components/checkbox.d.ts +2 -2
- package/dist/components/checkbox.js +17 -16
- package/dist/components/collapsible.js +2 -2
- package/dist/components/color-picker.d.ts +2 -2
- package/dist/components/color-picker.js +26 -24
- package/dist/components/combobox.d.ts +4 -2
- package/dist/components/combobox.js +22 -18
- package/dist/components/compose-input.d.ts +1 -1
- package/dist/components/compose-input.js +15 -10
- package/dist/components/dialog.js +1 -1
- package/dist/components/divider.js +11 -9
- package/dist/components/donut-chart.js +51 -49
- package/dist/components/drawer.d.ts +2 -2
- package/dist/components/drawer.js +1 -1
- package/dist/components/dropdown-menu.js +4 -4
- package/dist/components/editable.d.ts +1 -1
- package/dist/components/editable.js +13 -12
- package/dist/components/error-fallback.js +2 -2
- package/dist/components/field.js +10 -9
- package/dist/components/file-upload.js +19 -17
- package/dist/components/gauge.js +90 -85
- package/dist/components/hamburger.js +11 -9
- package/dist/components/hover-card.js +3 -3
- package/dist/components/indicator.js +14 -12
- package/dist/components/input.d.ts +6 -2
- package/dist/components/input.js +46 -34
- package/dist/components/line-chart.js +41 -39
- package/dist/components/list.js +1 -1
- package/dist/components/menu.js +3 -3
- package/dist/components/multiselect.d.ts +9 -0
- package/dist/components/multiselect.js +64 -54
- package/dist/components/nav-bar.js +1 -1
- package/dist/components/nav-menu.js +20 -19
- package/dist/components/number-input.d.ts +2 -2
- package/dist/components/number-input.js +17 -15
- package/dist/components/pagination.js +22 -20
- package/dist/components/panel.js +2 -2
- package/dist/components/pin-input.d.ts +6 -2
- package/dist/components/pin-input.js +39 -27
- package/dist/components/popover.js +3 -3
- package/dist/components/progress.js +14 -12
- package/dist/components/radio-group.d.ts +2 -2
- package/dist/components/radio-group.js +15 -10
- package/dist/components/radio.d.ts +25 -0
- package/dist/components/radio.js +78 -29
- package/dist/components/scroll-area.js +8 -7
- package/dist/components/segmented-control.d.ts +1 -1
- package/dist/components/segmented-control.js +21 -21
- package/dist/components/select.d.ts +67 -16
- package/dist/components/select.js +183 -56
- package/dist/components/sidebar.d.ts +2 -2
- package/dist/components/sidebar.js +2 -2
- package/dist/components/skeleton.js +1 -1
- package/dist/components/slider.d.ts +2 -2
- package/dist/components/slider.js +18 -13
- package/dist/components/spinner.js +11 -9
- package/dist/components/stat.js +19 -17
- package/dist/components/status-dot.js +1 -1
- package/dist/components/stepper.js +15 -13
- package/dist/components/switch.d.ts +1 -1
- package/dist/components/switch.js +14 -12
- package/dist/components/table.js +1 -1
- package/dist/components/tabs.js +29 -29
- package/dist/components/tag.js +9 -8
- package/dist/components/tags-input.d.ts +1 -1
- package/dist/components/tags-input.js +25 -19
- package/dist/components/textarea.d.ts +2 -2
- package/dist/components/textarea.js +36 -31
- package/dist/components/toast.d.ts +19 -2
- package/dist/components/toast.js +43 -10
- package/dist/components/toggle-group.d.ts +2 -2
- package/dist/components/toggle-group.js +16 -15
- package/dist/components/toggle.js +5 -2
- package/dist/components/tooltip.js +3 -3
- package/dist/components.json +3 -3
- package/dist/custom-elements.json +133 -67
- package/dist/dev/types.d.ts +2 -3
- package/dist/dev.js +81 -55
- package/dist/index.js +1 -1
- package/dist/keyboard.d.ts +10 -0
- package/dist/llms.txt +125 -0
- package/dist/parts.d.ts +8 -1
- package/dist/projection-api.d.ts +23 -0
- package/dist/projection.d.ts +8 -2
- package/dist/reference.md +4575 -0
- package/dist/secret-value.d.ts +17 -0
- package/dist/types/elements.d.ts +2 -2
- package/dist/value-list.d.ts +14 -0
- package/dist/vscode.html-custom-data.json +46 -26
- package/dist/web-types.json +73 -53
- package/package.json +5 -3
package/dist/dev.js
CHANGED
|
@@ -122,8 +122,8 @@ function h(e, t, n) {
|
|
|
122
122
|
let e = a.map((e) => e === "" ? "\"\"" : e), r = s(o, a.filter((e) => e !== ""), !0);
|
|
123
123
|
return d("invalid-value", t.localName, n, `${l}: "${o}" is not a valid value for ${n}, so it is ignored. Valid values: ${c(e)}.${r ? ` Did you mean "${r}"?` : ""}`, t);
|
|
124
124
|
}
|
|
125
|
-
if (a === 1
|
|
126
|
-
if (a ===
|
|
125
|
+
if (a === 1) return o.toLowerCase() === "false" ? d("boolean-false", t.localName, n, `${l}: ${n} is a boolean attribute, on whenever it is present, so ${n}="false" does not turn it off. Remove the attribute to turn it off.`, t) : void 0;
|
|
126
|
+
if (a === 2 && !f(o)) return d("invalid-value", t.localName, n, `${l}: "${o}" is not a number, so ${n} is ignored. Write a plain number such as ${n}="10".`, t);
|
|
127
127
|
}
|
|
128
128
|
function g(e, t) {
|
|
129
129
|
let n = [];
|
|
@@ -358,8 +358,8 @@ var k = {
|
|
|
358
358
|
required: 1,
|
|
359
359
|
name: 0,
|
|
360
360
|
autocomplete: 0,
|
|
361
|
-
minlength:
|
|
362
|
-
maxlength:
|
|
361
|
+
minlength: 2,
|
|
362
|
+
maxlength: 2,
|
|
363
363
|
pattern: 0,
|
|
364
364
|
inputmode: [
|
|
365
365
|
"",
|
|
@@ -417,7 +417,7 @@ var k = {
|
|
|
417
417
|
],
|
|
418
418
|
icon: 0,
|
|
419
419
|
"action-label": 0,
|
|
420
|
-
"icon-side": ["
|
|
420
|
+
"icon-side": ["start", "end"],
|
|
421
421
|
"tooltip-side": [
|
|
422
422
|
"top",
|
|
423
423
|
"bottom",
|
|
@@ -441,10 +441,22 @@ var k = {
|
|
|
441
441
|
h: "wrap it in <void-field label=\"...\"> or give it aria-label",
|
|
442
442
|
p: [["void-field", "label"], ["label"]]
|
|
443
443
|
},
|
|
444
|
-
l: {
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
444
|
+
l: {
|
|
445
|
+
a: {
|
|
446
|
+
position: {
|
|
447
|
+
to: "icon-side",
|
|
448
|
+
values: {
|
|
449
|
+
left: "icon-side=\"start\"",
|
|
450
|
+
right: "icon-side=\"end\""
|
|
451
|
+
}
|
|
452
|
+
},
|
|
453
|
+
"tooltip-position": { to: "tooltip-side" }
|
|
454
|
+
},
|
|
455
|
+
v: { "icon-side": {
|
|
456
|
+
left: "start",
|
|
457
|
+
right: "end"
|
|
458
|
+
} }
|
|
459
|
+
}
|
|
448
460
|
},
|
|
449
461
|
"void-alert": {
|
|
450
462
|
m: "alert",
|
|
@@ -633,7 +645,7 @@ var k = {
|
|
|
633
645
|
"void-bar-chart": {
|
|
634
646
|
m: "bar-chart",
|
|
635
647
|
a: {
|
|
636
|
-
height:
|
|
648
|
+
height: 2,
|
|
637
649
|
"show-value": 1,
|
|
638
650
|
variant: [
|
|
639
651
|
"filled",
|
|
@@ -641,7 +653,7 @@ var k = {
|
|
|
641
653
|
"wireframe"
|
|
642
654
|
],
|
|
643
655
|
"aria-label": 0,
|
|
644
|
-
stagger:
|
|
656
|
+
stagger: 2
|
|
645
657
|
},
|
|
646
658
|
e: [],
|
|
647
659
|
l: {
|
|
@@ -741,7 +753,7 @@ var k = {
|
|
|
741
753
|
"lg"
|
|
742
754
|
],
|
|
743
755
|
locale: 0,
|
|
744
|
-
"first-day":
|
|
756
|
+
"first-day": 2,
|
|
745
757
|
required: 1,
|
|
746
758
|
name: 0
|
|
747
759
|
},
|
|
@@ -837,10 +849,10 @@ var k = {
|
|
|
837
849
|
"void-carousel": {
|
|
838
850
|
m: "carousel",
|
|
839
851
|
a: {
|
|
840
|
-
index:
|
|
852
|
+
index: 2,
|
|
841
853
|
loop: 1,
|
|
842
854
|
autoplay: 1,
|
|
843
|
-
interval:
|
|
855
|
+
interval: 2,
|
|
844
856
|
size: [
|
|
845
857
|
"sm",
|
|
846
858
|
"md",
|
|
@@ -989,6 +1001,7 @@ var k = {
|
|
|
989
1001
|
name: 0,
|
|
990
1002
|
required: 1,
|
|
991
1003
|
disabled: 1,
|
|
1004
|
+
value: 0,
|
|
992
1005
|
form: 0
|
|
993
1006
|
},
|
|
994
1007
|
e: ["void-change"],
|
|
@@ -1143,7 +1156,7 @@ var k = {
|
|
|
1143
1156
|
value: 0,
|
|
1144
1157
|
placeholder: 0,
|
|
1145
1158
|
disabled: 1,
|
|
1146
|
-
maxlength:
|
|
1159
|
+
maxlength: 2
|
|
1147
1160
|
},
|
|
1148
1161
|
e: ["void-input", "void-submit"],
|
|
1149
1162
|
n: {
|
|
@@ -1169,7 +1182,7 @@ var k = {
|
|
|
1169
1182
|
"lg"
|
|
1170
1183
|
],
|
|
1171
1184
|
locale: 0,
|
|
1172
|
-
"first-day":
|
|
1185
|
+
"first-day": 2,
|
|
1173
1186
|
open: 1,
|
|
1174
1187
|
placeholder: 0,
|
|
1175
1188
|
format: 0,
|
|
@@ -1300,8 +1313,8 @@ var k = {
|
|
|
1300
1313
|
"void-donut-chart": {
|
|
1301
1314
|
m: "donut-chart",
|
|
1302
1315
|
a: {
|
|
1303
|
-
size:
|
|
1304
|
-
inner:
|
|
1316
|
+
size: 2,
|
|
1317
|
+
inner: 2,
|
|
1305
1318
|
gaps: 0,
|
|
1306
1319
|
variant: [
|
|
1307
1320
|
"filled",
|
|
@@ -1322,6 +1335,8 @@ var k = {
|
|
|
1322
1335
|
side: [
|
|
1323
1336
|
"left",
|
|
1324
1337
|
"right",
|
|
1338
|
+
"start",
|
|
1339
|
+
"end",
|
|
1325
1340
|
"top",
|
|
1326
1341
|
"bottom"
|
|
1327
1342
|
],
|
|
@@ -1606,7 +1621,7 @@ var k = {
|
|
|
1606
1621
|
accept: 0,
|
|
1607
1622
|
multiple: 1,
|
|
1608
1623
|
disabled: 1,
|
|
1609
|
-
"max-size":
|
|
1624
|
+
"max-size": 2,
|
|
1610
1625
|
error: 0,
|
|
1611
1626
|
required: 1,
|
|
1612
1627
|
name: 0
|
|
@@ -1627,11 +1642,11 @@ var k = {
|
|
|
1627
1642
|
m: "gauge",
|
|
1628
1643
|
a: {
|
|
1629
1644
|
unit: 0,
|
|
1630
|
-
value:
|
|
1631
|
-
min:
|
|
1632
|
-
max:
|
|
1633
|
-
size:
|
|
1634
|
-
thickness:
|
|
1645
|
+
value: 2,
|
|
1646
|
+
min: 2,
|
|
1647
|
+
max: 2,
|
|
1648
|
+
size: 2,
|
|
1649
|
+
thickness: 2,
|
|
1635
1650
|
circular: [
|
|
1636
1651
|
"full",
|
|
1637
1652
|
"semi",
|
|
@@ -1644,8 +1659,8 @@ var k = {
|
|
|
1644
1659
|
],
|
|
1645
1660
|
"hide-value": 1,
|
|
1646
1661
|
"unit-inline": 1,
|
|
1647
|
-
"tick-major":
|
|
1648
|
-
"tick-minor":
|
|
1662
|
+
"tick-major": 2,
|
|
1663
|
+
"tick-minor": 2,
|
|
1649
1664
|
"hide-tick-min": 1,
|
|
1650
1665
|
"hide-tick-max": 1,
|
|
1651
1666
|
"segments-sort": ["value", "manual"],
|
|
@@ -1708,8 +1723,8 @@ var k = {
|
|
|
1708
1723
|
"center",
|
|
1709
1724
|
"end"
|
|
1710
1725
|
],
|
|
1711
|
-
"open-delay":
|
|
1712
|
-
"close-delay":
|
|
1726
|
+
"open-delay": 2,
|
|
1727
|
+
"close-delay": 2
|
|
1713
1728
|
},
|
|
1714
1729
|
e: ["void-close", "void-open"],
|
|
1715
1730
|
l: { a: { position: {
|
|
@@ -1779,7 +1794,7 @@ var k = {
|
|
|
1779
1794
|
"bottom-right",
|
|
1780
1795
|
"bottom-left"
|
|
1781
1796
|
],
|
|
1782
|
-
count:
|
|
1797
|
+
count: 2,
|
|
1783
1798
|
ping: 1,
|
|
1784
1799
|
size: [
|
|
1785
1800
|
"sm",
|
|
@@ -1820,8 +1835,8 @@ var k = {
|
|
|
1820
1835
|
],
|
|
1821
1836
|
error: 0,
|
|
1822
1837
|
autocomplete: 0,
|
|
1823
|
-
minlength:
|
|
1824
|
-
maxlength:
|
|
1838
|
+
minlength: 2,
|
|
1839
|
+
maxlength: 2,
|
|
1825
1840
|
pattern: 0,
|
|
1826
1841
|
inputmode: [
|
|
1827
1842
|
"",
|
|
@@ -1871,7 +1886,7 @@ var k = {
|
|
|
1871
1886
|
"void-line-chart": {
|
|
1872
1887
|
m: "line-chart",
|
|
1873
1888
|
a: {
|
|
1874
|
-
height:
|
|
1889
|
+
height: 2,
|
|
1875
1890
|
"show-value": 1,
|
|
1876
1891
|
variant: [
|
|
1877
1892
|
"filled",
|
|
@@ -2047,6 +2062,7 @@ var k = {
|
|
|
2047
2062
|
error: 0,
|
|
2048
2063
|
name: 0,
|
|
2049
2064
|
open: 1,
|
|
2065
|
+
value: 0,
|
|
2050
2066
|
required: 1
|
|
2051
2067
|
},
|
|
2052
2068
|
e: [
|
|
@@ -2162,11 +2178,11 @@ var k = {
|
|
|
2162
2178
|
"void-number-input": {
|
|
2163
2179
|
m: "number-input",
|
|
2164
2180
|
a: {
|
|
2165
|
-
value:
|
|
2166
|
-
min:
|
|
2167
|
-
max:
|
|
2181
|
+
value: 2,
|
|
2182
|
+
min: 2,
|
|
2183
|
+
max: 2,
|
|
2168
2184
|
step: 0,
|
|
2169
|
-
precision:
|
|
2185
|
+
precision: 2,
|
|
2170
2186
|
disabled: 1,
|
|
2171
2187
|
readonly: 1,
|
|
2172
2188
|
size: [
|
|
@@ -2223,9 +2239,9 @@ var k = {
|
|
|
2223
2239
|
"void-pagination": {
|
|
2224
2240
|
m: "pagination",
|
|
2225
2241
|
a: {
|
|
2226
|
-
total:
|
|
2227
|
-
value:
|
|
2228
|
-
siblings:
|
|
2242
|
+
total: 2,
|
|
2243
|
+
value: 2,
|
|
2244
|
+
siblings: 2,
|
|
2229
2245
|
size: [
|
|
2230
2246
|
"sm",
|
|
2231
2247
|
"md",
|
|
@@ -2303,7 +2319,7 @@ var k = {
|
|
|
2303
2319
|
"void-pin-input": {
|
|
2304
2320
|
m: "pin-input",
|
|
2305
2321
|
a: {
|
|
2306
|
-
length:
|
|
2322
|
+
length: 2,
|
|
2307
2323
|
groups: 0,
|
|
2308
2324
|
value: 0,
|
|
2309
2325
|
disabled: 1,
|
|
@@ -2412,8 +2428,8 @@ var k = {
|
|
|
2412
2428
|
"void-progress": {
|
|
2413
2429
|
m: "progress",
|
|
2414
2430
|
a: {
|
|
2415
|
-
value:
|
|
2416
|
-
max:
|
|
2431
|
+
value: 2,
|
|
2432
|
+
max: 2,
|
|
2417
2433
|
color: [
|
|
2418
2434
|
"default",
|
|
2419
2435
|
"error",
|
|
@@ -2591,11 +2607,21 @@ var k = {
|
|
|
2591
2607
|
collapsed: 1,
|
|
2592
2608
|
width: 0,
|
|
2593
2609
|
"collapsed-width": 0,
|
|
2594
|
-
side: ["
|
|
2610
|
+
side: ["start", "end"]
|
|
2595
2611
|
},
|
|
2596
2612
|
e: ["void-collapse", "void-expand"],
|
|
2597
2613
|
l: {
|
|
2598
|
-
a: { position: {
|
|
2614
|
+
a: { position: {
|
|
2615
|
+
to: "side",
|
|
2616
|
+
values: {
|
|
2617
|
+
left: "side=\"start\"",
|
|
2618
|
+
right: "side=\"end\""
|
|
2619
|
+
}
|
|
2620
|
+
} },
|
|
2621
|
+
v: { side: {
|
|
2622
|
+
left: "start",
|
|
2623
|
+
right: "end"
|
|
2624
|
+
} },
|
|
2599
2625
|
e: { "void-toggle": "listen for void-collapse and void-expand on the sidebar (they do not bubble)" }
|
|
2600
2626
|
}
|
|
2601
2627
|
},
|
|
@@ -2612,10 +2638,10 @@ var k = {
|
|
|
2612
2638
|
"void-slider": {
|
|
2613
2639
|
m: "slider",
|
|
2614
2640
|
a: {
|
|
2615
|
-
value:
|
|
2616
|
-
min:
|
|
2617
|
-
max:
|
|
2618
|
-
step:
|
|
2641
|
+
value: 2,
|
|
2642
|
+
min: 2,
|
|
2643
|
+
max: 2,
|
|
2644
|
+
step: 2,
|
|
2619
2645
|
disabled: 1,
|
|
2620
2646
|
name: 0,
|
|
2621
2647
|
"show-value": 1,
|
|
@@ -2702,7 +2728,7 @@ var k = {
|
|
|
2702
2728
|
"void-stepper": {
|
|
2703
2729
|
m: "stepper",
|
|
2704
2730
|
a: {
|
|
2705
|
-
value:
|
|
2731
|
+
value: 2,
|
|
2706
2732
|
steps: 0
|
|
2707
2733
|
},
|
|
2708
2734
|
e: []
|
|
@@ -2859,7 +2885,7 @@ var k = {
|
|
|
2859
2885
|
value: 0,
|
|
2860
2886
|
disabled: 1,
|
|
2861
2887
|
readonly: 1,
|
|
2862
|
-
max:
|
|
2888
|
+
max: 2,
|
|
2863
2889
|
placeholder: 0,
|
|
2864
2890
|
size: [
|
|
2865
2891
|
"sm",
|
|
@@ -2901,7 +2927,7 @@ var k = {
|
|
|
2901
2927
|
readonly: 1,
|
|
2902
2928
|
required: 1,
|
|
2903
2929
|
name: 0,
|
|
2904
|
-
rows:
|
|
2930
|
+
rows: 2,
|
|
2905
2931
|
resize: [
|
|
2906
2932
|
"none",
|
|
2907
2933
|
"vertical",
|
|
@@ -2914,8 +2940,8 @@ var k = {
|
|
|
2914
2940
|
],
|
|
2915
2941
|
error: 0,
|
|
2916
2942
|
autocomplete: 0,
|
|
2917
|
-
minlength:
|
|
2918
|
-
maxlength:
|
|
2943
|
+
minlength: 2,
|
|
2944
|
+
maxlength: 2,
|
|
2919
2945
|
inputmode: [
|
|
2920
2946
|
"",
|
|
2921
2947
|
"none",
|
|
@@ -2974,7 +3000,7 @@ var k = {
|
|
|
2974
3000
|
"notice",
|
|
2975
3001
|
"highlight"
|
|
2976
3002
|
],
|
|
2977
|
-
duration:
|
|
3003
|
+
duration: 2
|
|
2978
3004
|
},
|
|
2979
3005
|
e: ["void-close"],
|
|
2980
3006
|
x: {
|
|
@@ -3133,7 +3159,7 @@ var k = {
|
|
|
3133
3159
|
"center",
|
|
3134
3160
|
"end"
|
|
3135
3161
|
],
|
|
3136
|
-
delay:
|
|
3162
|
+
delay: 2,
|
|
3137
3163
|
open: 1
|
|
3138
3164
|
},
|
|
3139
3165
|
e: ["void-close", "void-open"],
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as e } from "./chunks/base-
|
|
1
|
+
import { t as e } from "./chunks/base-BxmMM3B7.js";
|
|
2
2
|
import { VoidBadge as t } from "./components/badge.js";
|
|
3
3
|
import { VoidButton as n } from "./components/button.js";
|
|
4
4
|
import { VoidDivider as r } from "./components/divider.js";
|
package/dist/keyboard.d.ts
CHANGED
|
@@ -28,5 +28,15 @@ export declare class Typeahead {
|
|
|
28
28
|
match(char: string, labels: readonly string[], disabled: readonly boolean[], current: number): number;
|
|
29
29
|
reset(): void;
|
|
30
30
|
}
|
|
31
|
+
/** True when `el` renders right-to-left (`dir`, `lang`-derived direction or CSS `direction`). */
|
|
32
|
+
export declare function isRtl(el: Element): boolean;
|
|
33
|
+
/**
|
|
34
|
+
* The keys that move along the inline axis for `el`: `next` is ArrowRight in
|
|
35
|
+
* left-to-right and ArrowLeft in right-to-left; `prev` is the opposite.
|
|
36
|
+
*/
|
|
37
|
+
export declare function inlineKeys(el: Element): {
|
|
38
|
+
next: 'ArrowLeft' | 'ArrowRight';
|
|
39
|
+
prev: 'ArrowLeft' | 'ArrowRight';
|
|
40
|
+
};
|
|
31
41
|
/** A document-unique id for ARIA relationships. */
|
|
32
42
|
export declare function uid(prefix: string): string;
|
package/dist/llms.txt
ADDED
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
# Voidable UI (@voidable/ui 0.10.0)
|
|
2
|
+
|
|
3
|
+
> Lit 3 web components in the light DOM, `<void-*>` tags with no visual CSS of their own: `@voidable/theme` supplies every look through `--void-*` custom properties. They work in plain HTML, React, Vue, Svelte, Solid, Angular, Rails/Hotwire, Phoenix LiveView and Laravel/Livewire.
|
|
4
|
+
|
|
5
|
+
## Install
|
|
6
|
+
|
|
7
|
+
```sh
|
|
8
|
+
npm install @voidable/ui @voidable/theme
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
```js
|
|
12
|
+
import '@voidable/theme'; // the look (CSS)
|
|
13
|
+
import '@voidable/ui'; // registers every element; or '@voidable/ui/components/button', or '@voidable/ui/autoloader'
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
Without the theme loaded the components are unstyled. Development warnings for misused markup: `import '@voidable/ui/dev'` (development only).
|
|
17
|
+
|
|
18
|
+
## Composition rules
|
|
19
|
+
|
|
20
|
+
- A component with regions takes explicit parts: plain `void-*` child tags named after the component (`<void-dialog-title>`, `<void-tabs-list>`). Write exactly the parts the element lists in `reference.md`, in the listed order where it says so. There is one way to write each component; the old implicit forms (`heading="..."`, `slot="trigger"`) are gone.
|
|
21
|
+
- A trigger part wraps exactly one control (`<void-popover-trigger><void-button>Open</void-button></void-popover-trigger>`).
|
|
22
|
+
- State lives on the parent as reflected attributes (`open`, `value`, `active`). Do not write wrapper `<div>`s or utility classes around parts.
|
|
23
|
+
- Only `<void-dialog>` and `<void-drawer>` have a shadow root; everything else is light DOM, so your CSS, ids and framework bindings reach every node.
|
|
24
|
+
- Some elements are CSS-only (patterns such as `<void-shell>`, and many parts): the theme styles them, no JavaScript registers them; write them as plain markup.
|
|
25
|
+
|
|
26
|
+
## Conventions
|
|
27
|
+
|
|
28
|
+
- Booleans are present or absent: `<void-button disabled>`. Never write `disabled="false"`; for a default-true boolean the reference says how to turn it off.
|
|
29
|
+
- Events are `void-*` CustomEvents; read the value from `event.detail`. `void-change` always carries `detail.value`; text controls also fire `void-input` per edit. Overlays fire `void-open` and `void-close` with `detail.reason`; they do not bubble.
|
|
30
|
+
- Only attributes listed in `reference.md` exist. A guessed attribute does nothing; the dev warnings and `voidable check` report it.
|
|
31
|
+
- Sizes, variants and colours are enumerated attributes (`size="sm|md|lg"`, `variant`, `color`); a value outside the listed set is an error.
|
|
32
|
+
|
|
33
|
+
## Where the full reference is
|
|
34
|
+
|
|
35
|
+
- `@voidable/ui/reference.md` (`node_modules/@voidable/ui/dist/reference.md`): every element in full, generated from the manifest.
|
|
36
|
+
- `@voidable/ui/custom-elements.json`: the Custom Elements Manifest it is generated from.
|
|
37
|
+
- `@voidable/ui/llms.txt`: this file. The docs site serves the same in `/llms.txt` and `/llms-full.txt`: https://voidable.dev
|
|
38
|
+
- `voidable ref <tag>` prints one element offline; `voidable check <file>` checks markup (https://voidable.dev/getting-started/for-agents/).
|
|
39
|
+
|
|
40
|
+
## Elements (78)
|
|
41
|
+
|
|
42
|
+
- `<void-accordion>`: Collapsible section container for FAQs, settings panels, and long-form content organized into expandable items.
|
|
43
|
+
- `<void-accordion-item>`: One collapsible item of a `<void-accordion>`: a `<void-accordion-trigger>` followed by a `<void-accordion-content>`.
|
|
44
|
+
- `<void-action-input>`: Input field with an attached icon button — used for copy-to-clipboard inputs, search boxes, and similar patterns.
|
|
45
|
+
- `<void-alert>`: Inline contextual message for form validation feedback, permission warnings, and system status notices.
|
|
46
|
+
- `<void-avatar>`: User identity display for comment threads, user lists, and profile cards; falls back to initials when no image is provided.
|
|
47
|
+
- `<void-badge>`: Small status chip for issue trackers, tag systems, and categorization UIs where color conveys state at a glance.
|
|
48
|
+
- `<void-banner>`: Full-width site-level announcement for maintenance windows, cookie consent, and promotional messaging.
|
|
49
|
+
- `<void-bar-chart>`: Bar chart for comparing categories and series, drawn in SVG with animated bars.
|
|
50
|
+
- `<void-breadcrumbs>`: Navigation trail for deep page hierarchies in dashboards, e-commerce category trees, and file browsers.
|
|
51
|
+
- `<void-button>`: Action trigger for forms, dialogs, and toolbars; supports semantic color variants.
|
|
52
|
+
- `<void-calendar>`: Date selection for booking flows, scheduling UIs, and form fields with locale-aware formatting and min/max constraints.
|
|
53
|
+
- `<void-card>`: Content grouping container for dashboard widgets, product listings, and media previews.
|
|
54
|
+
- `<void-carousel>`: Scrollable content gallery for product photo viewers, onboarding flows, and featured content sliders.
|
|
55
|
+
- `<void-carousel-next>`: Next-slide control of a `<void-carousel>`: a button the theme draws as an arrow over the slides.
|
|
56
|
+
- `<void-carousel-previous>`: Previous-slide control of a `<void-carousel>`: a button the theme draws as an arrow over the slides.
|
|
57
|
+
- `<void-checkbox>`: Binary or indeterminate selection for form fields, data table row selection, and toggle-able settings.
|
|
58
|
+
- `<void-checkbox-group>`: Grouped multi-option selection for preference forms, filter panels, and permission editors.
|
|
59
|
+
- `<void-collapsible>`: Simple expand/collapse panel for FAQ sections, spoiler text, and progressive disclosure of secondary content.
|
|
60
|
+
- `<void-color-picker>`: Color selection control with spectrum area, hue slider, hex input, and preset swatches for theme customization and design tools.
|
|
61
|
+
- `<void-combobox>`: Filterable dropdown for long option lists like country selectors, user assignment fields, and tag pickers.
|
|
62
|
+
- `<void-compose-input>`: Rich text entry area for messaging UIs, comment boxes, and social post composers.
|
|
63
|
+
- `<void-date-picker>`: Input-anchored date picker that combines a text field with a VoidCalendar dropdown for form date selection.
|
|
64
|
+
- `<void-dialog>`: Modal overlay for confirmations, detail views, and multi-step forms that require user attention before continuing.
|
|
65
|
+
- `<void-divider>`: Visual separator between sections in forms, sidebars, and content layouts; supports optional label text.
|
|
66
|
+
- `<void-donut-chart>`: Donut chart for part-to-whole breakdowns, drawn in SVG with animated segments and an optional total in the centre.
|
|
67
|
+
- `<void-drawer>`: Slide-out overlay panel for filters, detail views, and navigation menus; opens from any screen edge.
|
|
68
|
+
- `<void-dropdown-menu>`: Trigger-anchored action menu for table row actions, toolbar overflow menus, and context menus.
|
|
69
|
+
- `<void-dropdown-menu-item>`: An item of a `<void-dropdown-menu>`, inside its `<void-dropdown-menu-content>`.
|
|
70
|
+
- `<void-editable>`: Inline editable text for renaming items, editing headings, and click-to-edit table cells.
|
|
71
|
+
- `<void-error-fallback>`: Error state display for failed data fetches and unexpected runtime errors; includes an optional retry action.
|
|
72
|
+
- `<void-field>`: Form field wrapper that pairs an input with its label, helper text, and validation error.
|
|
73
|
+
- `<void-file-upload>`: Drag-and-drop file picker for document uploads, image attachment flows, and import wizards.
|
|
74
|
+
- `<void-gauge>`: Radial gauge for a single value within a range (capacity, score, load) or for a few segments that share it, drawn in SVG as a full, semi or three-quarter arc with optional tick marks and colour zones.
|
|
75
|
+
- `<void-hamburger>`: Animated open/close toggle for mobile navigation menus and collapsible sidebars.
|
|
76
|
+
- `<void-hover-card>`: Rich content preview card that appears on hover for user profiles, link previews, and contextual information panels.
|
|
77
|
+
- `<void-indicator>`: Badge overlay for notification counts on icons and online presence signals on avatars.
|
|
78
|
+
- `<void-input>`: Single-line text entry for login forms, search fields, and structured data capture.
|
|
79
|
+
- `<void-line-chart>`: Line chart for trends over time with one or more series, linear or stepped, drawn in SVG with an animated entry.
|
|
80
|
+
- `<void-list>`: Structured item list for menus, option sets, and content feeds with consistent spacing and optional dividers.
|
|
81
|
+
- `<void-list-item>`: Individual selectable item within a VoidList.
|
|
82
|
+
- `<void-menu>`: Always-visible menu panel for command palettes, side panels, and searchable action lists.
|
|
83
|
+
- `<void-menu-group>`: Labelled group of `void-menu-item`s inside a `void-menu`.
|
|
84
|
+
- `<void-menu-item>`: One action in a `void-menu`: activating it (click, Enter or Space) fires `void-select` with its `value`.
|
|
85
|
+
- `<void-multiselect>`: Multi-value picker for tag selection, permission assignment, and filter fields that allow several simultaneous choices.
|
|
86
|
+
- `<void-nav-bar>`: Top application navigation bar for branding, primary links, and user account controls.
|
|
87
|
+
- `<void-nav-menu>`: Horizontal navigation bar with dropdown sub-menus for site headers, application nav bars, and mega-menu layouts.
|
|
88
|
+
- `<void-nav-menu-item>`: One entry of a `<void-nav-menu>`: a `<void-nav-menu-trigger>` around one control (a `<button>` for an entry that opens a panel, an `<a href>` for one that navigates) and, for a panel, a `<void-nav-menu-content>` after it.
|
|
89
|
+
- `<void-number-input>`: Precise numeric entry for quantity selectors, price fields, and settings with increment/decrement controls.
|
|
90
|
+
- `<void-option>`: One option of a `<void-combobox>` or `<void-multiselect>`, inside its `-content` part.
|
|
91
|
+
- `<void-pagination>`: Page navigation for data tables, search result lists, and content archives.
|
|
92
|
+
- `<void-panel>`: Bordered or elevated content region for grouping related settings, dashboard sections, and detail blocks.
|
|
93
|
+
- `<void-pin-input>`: Single-character input cells for OTP verification codes, PIN entry, and multi-digit confirmation fields.
|
|
94
|
+
- `<void-popover>`: Anchored overlay for contextual detail and mini-forms that need more room than a tooltip.
|
|
95
|
+
- `<void-progress>`: Visual progress indicator for file uploads, multi-step processes, and loading states.
|
|
96
|
+
- `<void-radio>`: Single mutually exclusive option for forms and surveys; typically used inside VoidRadioGroup.
|
|
97
|
+
- `<void-radio-group>`: Mutually exclusive option group for plan pickers, survey questions, and preference settings.
|
|
98
|
+
- `<void-scroll-area>`: Scrollable container with styled scrollbars for long content areas, code blocks, and chat histories.
|
|
99
|
+
- `<void-segmented-control>`: Mutually exclusive button group for view mode toggles, time range selectors, and compact tab-like navigation.
|
|
100
|
+
- `<void-segmented-control-item>`: Individual option within a VoidSegmentedControl button group.
|
|
101
|
+
- `<void-select>`: Native dropdown for small option sets in forms where a simple pick-one is sufficient.
|
|
102
|
+
- `<void-sidebar>`: Collapsible side navigation for app shells, admin panels, and documentation sites.
|
|
103
|
+
- `<void-skeleton>`: Content placeholder during data loading for cards, lists, and profile pages to prevent layout shift.
|
|
104
|
+
- `<void-slider>`: Continuous value selection for volume controls, price range filters, and numeric range settings.
|
|
105
|
+
- `<void-spinner>`: Indeterminate loading indicator for async operations, button loading states, and inline fetching.
|
|
106
|
+
- `<void-stat>`: Key metric display for analytics dashboards and KPI summaries with label, value, delta, and trend.
|
|
107
|
+
- `<void-status-dot>`: Presence indicator for user lists and chat rosters showing online/away/offline state at a glance.
|
|
108
|
+
- `<void-stepper>`: Multi-step progress tracker for onboarding flows, checkout funnels, and guided wizards.
|
|
109
|
+
- `<void-switch>`: On/off toggle for feature flags, notification preferences, and settings that take immediate effect.
|
|
110
|
+
- `<void-table>`: Data table around a native `<table>`: sets how it looks (`striped`, `hoverable`, `compact`, `bordered`, `inset`), how it behaves when the container is narrow (`stack`) and when it is wider than its container (`scrollable`, `sticky-header`, `sticky-column`).
|
|
111
|
+
- `<void-tabs>`: Tabbed section navigation for settings pages, detail views, and parallel content categories.
|
|
112
|
+
- `<void-tag>`: Removable label chip for selected filters, applied tags, and multi-value inputs.
|
|
113
|
+
- `<void-tags-input>`: Multi-tag input field for email recipients, category labels, keyword tagging, and comma-separated value entry.
|
|
114
|
+
- `<void-textarea>`: Multi-line text entry for comment fields, description inputs, and freeform text that needs more than one line.
|
|
115
|
+
- `<void-toast>`: Temporary notification for action confirmations, error alerts, and copy-to-clipboard feedback.
|
|
116
|
+
- `<void-toast-container>`: Container that manages toast positioning and provides a static show() helper for programmatic toast display.
|
|
117
|
+
- `<void-toggle>`: Pressable toggle button for toolbar actions and editor formatting controls with binary active/inactive state.
|
|
118
|
+
- `<void-toggle-group>`: Multi-button toggle set for text editor toolbars and filter chips where one or many options can be active.
|
|
119
|
+
- `<void-tooltip>`: Hover hint for icon buttons and truncated text that need a label without cluttering the visible interface.
|
|
120
|
+
|
|
121
|
+
## CSS-only parts and patterns (86)
|
|
122
|
+
|
|
123
|
+
Styled by `@voidable/theme`, registered by no JavaScript; write them as plain markup. Each is described in `reference.md`.
|
|
124
|
+
|
|
125
|
+
`<void-accordion-content>`, `<void-accordion-trigger>`, `<void-actions>`, `<void-alert-close>`, `<void-alert-description>`, `<void-alert-title>`, `<void-banner-actions>`, `<void-banner-close>`, `<void-banner-description>`, `<void-banner-title>`, `<void-brand>`, `<void-breadcrumbs-item>`, `<void-breadcrumbs-list>`, `<void-card-body>`, `<void-card-description>`, `<void-card-footer>`, `<void-card-header>`, `<void-card-title>`, `<void-carousel-content>`, `<void-carousel-indicators>`, `<void-carousel-item>`, `<void-collapsible-content>`, `<void-collapsible-trigger>`, `<void-combobox-content>`, `<void-delta>`, `<void-description-list>`, `<void-dialog-actions>`, `<void-dialog-body>`, `<void-dialog-description>`, `<void-dialog-title>`, `<void-drawer-actions>`, `<void-drawer-body>`, `<void-drawer-description>`, `<void-drawer-title>`, `<void-dropdown-menu-content>`, `<void-dropdown-menu-separator>`, `<void-dropdown-menu-trigger>`, `<void-empty>`, `<void-error-fallback-actions>`, `<void-error-fallback-description>`, `<void-error-fallback-title>`, `<void-figure>`, `<void-figures>`, `<void-glass>`, `<void-hover-card-content>`, `<void-hover-card-trigger>`, `<void-media>`, `<void-media-content>`, `<void-menu-content>`, `<void-menu-empty>`, `<void-menu-group-label>`, `<void-menu-item-icon>`, `<void-menu-item-shortcut>`, `<void-menu-search>`, `<void-multiselect-content>`, `<void-nav-links>`, `<void-nav-menu-content>`, `<void-nav-menu-trigger>`, `<void-page>`, `<void-page-head>`, `<void-panel-body>`, `<void-panel-description>`, `<void-panel-header>`, `<void-panel-title>`, `<void-popover-content>`, `<void-popover-trigger>`, `<void-row>`, `<void-row-text>`, `<void-rows>`, `<void-section>`, `<void-section-head>`, `<void-shell>`, `<void-spacer>`, `<void-split>`, `<void-stack>`, `<void-state>`, `<void-tabs-content>`, `<void-tabs-list>`, `<void-tabs-trigger>`, `<void-toast-actions>`, `<void-toast-close>`, `<void-toast-description>`, `<void-toast-title>`, `<void-toolbar>`, `<void-tooltip-content>`, `<void-tooltip-trigger>`
|
package/dist/parts.d.ts
CHANGED
|
@@ -82,6 +82,10 @@ export declare class PartsController implements ReactiveController, MorphPartici
|
|
|
82
82
|
/** Attribute names the observer watches: every name ever owned. */
|
|
83
83
|
private readonly _names;
|
|
84
84
|
private _syncing;
|
|
85
|
+
/** The observer is registered on the host (it is after the first sync of a connection). */
|
|
86
|
+
private _observing;
|
|
87
|
+
/** A sync owned a name the registered filter does not list yet. */
|
|
88
|
+
private _namesDirty;
|
|
85
89
|
/** Counts sync passes, so a pass can sweep what the previous one wrote and this one did not. */
|
|
86
90
|
private _pass;
|
|
87
91
|
constructor(host: ReactiveControllerHost & HTMLElement, options: PartsOptions);
|
|
@@ -121,6 +125,7 @@ export declare class PartsController implements ReactiveController, MorphPartici
|
|
|
121
125
|
sync(): void;
|
|
122
126
|
/** Re-wires in a microtask (several requests in one task make one call). */
|
|
123
127
|
requestSync(): void;
|
|
128
|
+
/** `echo`: called at the end of a sync, where what is pending is only the echo of its own writes. */
|
|
124
129
|
private _observe;
|
|
125
130
|
private _tokenNames;
|
|
126
131
|
private _onMutations;
|
|
@@ -154,7 +159,9 @@ export declare class PartsController implements ReactiveController, MorphPartici
|
|
|
154
159
|
/**
|
|
155
160
|
* The control inside an overlay trigger part: the first element child of
|
|
156
161
|
* `<void-popover-trigger>` (a `<void-button>`, a `<button>`, a link), which gets
|
|
157
|
-
* the trigger ARIA. Null when the trigger holds no element.
|
|
162
|
+
* the trigger ARIA. Null when the trigger holds no element. A link button
|
|
163
|
+
* (`<void-button>` holding a direct `<a href>` or `<button>`) is presentational,
|
|
164
|
+
* so its inner element is the control, the one assistive technology sees.
|
|
158
165
|
*/
|
|
159
166
|
export declare function triggerControl(trigger: Element | null): HTMLElement | null;
|
|
160
167
|
/**
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { LitElement } from 'lit';
|
|
2
|
+
/** @internal Instance key under which a host's controller is stored (read by VoidElement's DOM overrides). */
|
|
3
|
+
export declare const PROJECTION_KEY = "__voidProjection";
|
|
4
|
+
/**
|
|
5
|
+
* @internal What `VoidElement` needs from projection.ts (about 19 kB minified, of which a button, a badge or any
|
|
6
|
+
* component with explicit parts needs none). projection.ts registers itself here when it is loaded, so a
|
|
7
|
+
* component pays for it only if it, or what it extends, imports it: the components that render or host children
|
|
8
|
+
* through a `ProjectionController` do (`useProjection()`), and so does the public `@voidable/ui/base` entry.
|
|
9
|
+
*/
|
|
10
|
+
export interface ProjectionApi {
|
|
11
|
+
/** Gives a rendering component with no controller of its own the region-less default one. */
|
|
12
|
+
create(host: LitElement): void;
|
|
13
|
+
/** Drops the chrome of a serialised copy of a rendered element; true when it was one. */
|
|
14
|
+
strip(host: Element): boolean;
|
|
15
|
+
/** Focus inside `host` is parked by a morph. */
|
|
16
|
+
isFocusParked(host: Element): boolean;
|
|
17
|
+
/** Puts back focus a morph is still holding. */
|
|
18
|
+
restoreParkedFocus(doc: Document): void;
|
|
19
|
+
}
|
|
20
|
+
/** Set by projection.ts when it loads; undefined until then. */
|
|
21
|
+
export declare const projectionApi: {
|
|
22
|
+
current?: ProjectionApi;
|
|
23
|
+
};
|
package/dist/projection.d.ts
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { LitElement, ReactiveController } from 'lit';
|
|
2
|
+
import { PROJECTION_KEY } from './projection-api.js';
|
|
3
|
+
export { PROJECTION_KEY };
|
|
2
4
|
/**
|
|
3
5
|
* Where a projection region puts its nodes.
|
|
4
6
|
*
|
|
@@ -77,8 +79,12 @@ export interface ProjectionOptions {
|
|
|
77
79
|
*/
|
|
78
80
|
onChange?: () => void;
|
|
79
81
|
}
|
|
80
|
-
/**
|
|
81
|
-
|
|
82
|
+
/**
|
|
83
|
+
* @internal Makes projection available to `VoidElement` (see projection-api.ts). Every `ProjectionController`
|
|
84
|
+
* does it when it is built; a component that renders without a controller of its own calls it at the top level
|
|
85
|
+
* of its module, so that the default controller exists for it.
|
|
86
|
+
*/
|
|
87
|
+
export declare function useProjection(): void;
|
|
82
88
|
/**
|
|
83
89
|
* @internal True while a morph holds the focus of
|
|
84
90
|
* an element inside `host` (from just before it is moved out until it is
|