@vokril/ui-solid 0.5.0 → 0.8.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/CHANGELOG.md +65 -0
- package/README.md +20 -1
- package/dist/AttributeGrid-Bnn1w5XX.cjs +1 -0
- package/dist/AttributeGrid-DJdW32LQ.js +320 -0
- package/dist/CommandPalette-BBDBVARB.cjs +2 -0
- package/dist/CommandPalette-e6FePgys.js +3950 -0
- package/dist/{DateRangePicker-jnZfDhQA.js → DateRangePicker-BcqoUao4.js} +4 -4
- package/dist/{DateRangePicker-CHrwr34H.cjs → DateRangePicker-DHI3SNna.cjs} +1 -1
- package/dist/{GuidedTour-DHgMaTVv.js → GuidedTour-B-BXe3ul.js} +2239 -2223
- package/dist/{GuidedTour-B-67TJlO.cjs → GuidedTour-c7XiyOmE.cjs} +7 -7
- package/dist/{IconPicker-C_gAGvo0.cjs → IconPicker-D2dZK0n3.cjs} +1 -1
- package/dist/{IconPicker-BxofGXCS.js → IconPicker-Fd2IE2Dm.js} +2 -2
- package/dist/Input-BEnk4FCF.cjs +1 -0
- package/dist/Input-PZ5wRvPx.js +227 -0
- package/dist/{Modal-BmtEt5Yo.js → Modal-CsiV55WW.js} +1 -1
- package/dist/{Modal-BSSY6C3D.cjs → Modal-DpDHzCWT.cjs} +1 -1
- package/dist/{Popover-Cg8LZCYo.js → Popover-C3dFuObM.js} +49 -45
- package/dist/Popover-Dbi7L860.cjs +1 -0
- package/dist/{SearchableSelect-ByCRBEZI.js → SearchableSelect-C6KL7e42.js} +2 -2
- package/dist/{SearchableSelect-9pgcO5JS.cjs → SearchableSelect-zT8XNpmt.cjs} +1 -1
- package/dist/{StatusBarNotificationBell-DpTaPcoW.cjs → StatusBarNotificationBell-2bIRvg2s.cjs} +1 -1
- package/dist/{StatusBarNotificationBell-Czirj1Df.js → StatusBarNotificationBell-B5knnCWK.js} +5 -5
- package/dist/{Stepper-CrTxBpDL.js → Stepper-B26aF0bA.js} +1 -1
- package/dist/{Stepper-C3dnwwiV.cjs → Stepper-Bl8P6HJx.cjs} +1 -1
- package/dist/Textarea-BUxibzkR.js +42 -0
- package/dist/Textarea-BunKEY68.cjs +1 -0
- package/dist/{ToggleButton-CFvMUndy.cjs → ToggleButton-DuKoI5PE.cjs} +1 -1
- package/dist/{ToggleButton-DBWFnm_R.js → ToggleButton-DwvUV2en.js} +6 -6
- package/dist/base.css +0 -1
- package/dist/{createResizableSidebar-uf_OJsjO.js → createResizableSidebar-B22SKv9b.js} +1 -1
- package/dist/{createResizableSidebar-DVATOkMf.cjs → createResizableSidebar-C3I0HSwo.cjs} +1 -1
- package/dist/desktop/index.cjs +1 -1
- package/dist/desktop/index.js +2 -2
- package/dist/{dialogFocusRestore-DKxaV82N.js → dialogFocusRestore-B4ggeVAM.js} +1 -1
- package/dist/{dialogFocusRestore-BAF8QM6v.cjs → dialogFocusRestore-BcMPrbig.cjs} +1 -1
- package/dist/format-Dih0q9gm.cjs +1 -0
- package/dist/{format-Dd946oS-.js → format-UGlMj0HW.js} +91 -88
- package/dist/forms/formFieldContext.d.cts +15 -0
- package/dist/forms/formFieldContext.d.ts +15 -0
- package/dist/forms/index.cjs +1 -1
- package/dist/forms/index.js +41 -40
- package/dist/grid/index.cjs +1 -1
- package/dist/grid/index.d.cts +1 -0
- package/dist/grid/index.d.ts +1 -0
- package/dist/grid/index.js +7 -6
- package/dist/grid/resultTabToolbarClasses.d.cts +47 -0
- package/dist/grid/resultTabToolbarClasses.d.ts +47 -0
- package/dist/iconScale.module-C3O0bxfp.js +13 -0
- package/dist/iconScale.module-CzmKG1rf.cjs +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1106 -1008
- package/dist/layout/index.cjs +1 -1
- package/dist/layout/index.js +2 -2
- package/dist/navigation/index.cjs +1 -1
- package/dist/navigation/index.js +1 -1
- package/dist/notifications/index.cjs +1 -1
- package/dist/notifications/index.js +2 -2
- package/dist/overlay/DropdownMenu.d.cts +15 -1
- package/dist/overlay/DropdownMenu.d.ts +15 -1
- package/dist/overlay/index.cjs +1 -1
- package/dist/overlay/index.d.cts +2 -0
- package/dist/overlay/index.d.ts +2 -0
- package/dist/overlay/index.js +132 -122
- package/dist/overlay/menu/MenuParts.d.cts +121 -0
- package/dist/overlay/menu/MenuParts.d.ts +121 -0
- package/dist/overlay/menu/index.d.cts +2 -0
- package/dist/overlay/menu/index.d.ts +2 -0
- package/dist/overlay/menu/menuSurfaceClasses.d.cts +28 -0
- package/dist/overlay/menu/menuSurfaceClasses.d.ts +28 -0
- package/dist/overlay/overlayStack.d.cts +6 -0
- package/dist/overlay/overlayStack.d.ts +6 -0
- package/dist/overlay/panelClasses.d.cts +50 -0
- package/dist/overlay/panelClasses.d.ts +50 -0
- package/dist/overlay/popover/PopoverPanel.d.cts +103 -0
- package/dist/overlay/popover/PopoverPanel.d.ts +103 -0
- package/dist/overlay/popover/index.d.cts +2 -0
- package/dist/overlay/popover/index.d.ts +2 -0
- package/dist/overlay/popover/popoverFocusNavigation.d.cts +6 -2
- package/dist/overlay/popover/popoverFocusNavigation.d.ts +6 -2
- package/dist/overlay-stack/index.cjs +1 -1
- package/dist/overlay-stack/index.js +1 -1
- package/dist/overlayStack-DvGdPMdq.js +203 -0
- package/dist/overlayStack-DvKYN7SD.cjs +1 -0
- package/dist/server/AttributeGrid-BCYNwNjw.js +281 -0
- package/dist/server/AttributeGrid-BVAQshm3.cjs +1 -0
- package/dist/server/CommandPalette-4RCiBlmz.js +3210 -0
- package/dist/server/CommandPalette-Dd8AW-WZ.cjs +1 -0
- package/dist/server/{DateRangePicker-BK2Ul2uy.js → DateRangePicker-TW0Dy4u6.js} +4 -4
- package/dist/server/{DateRangePicker-s-I_rNUK.cjs → DateRangePicker-sX2m4194.cjs} +1 -1
- package/dist/server/{GuidedTour-BvDY-xaZ.js → GuidedTour-Bc7SqDXY.js} +756 -740
- package/dist/server/{GuidedTour-zesfTSmE.cjs → GuidedTour-DvMqeZIU.cjs} +8 -8
- package/dist/server/{IconPicker-Bw8tZjCl.cjs → IconPicker-Bat7VYeo.cjs} +1 -1
- package/dist/server/{IconPicker-BCUZcq-i.js → IconPicker-Dw4tbosO.js} +2 -2
- package/dist/server/Input-CjvD8w18.cjs +1 -0
- package/dist/server/Input-DaEN2JJd.js +127 -0
- package/dist/server/{Modal-CM54uXRu.js → Modal-Jf89av-C.js} +2 -2
- package/dist/server/{Modal-R86Fb2mX.cjs → Modal-W2cb3Xrx.cjs} +1 -1
- package/dist/server/{Popover-CTnX42Jq.js → Popover-BRU2E-ek.js} +17 -13
- package/dist/server/Popover-C2VwtQyu.cjs +1 -0
- package/dist/server/{SearchableSelect-Cog_rb31.js → SearchableSelect-0dP7bp0a.js} +2 -2
- package/dist/server/{SearchableSelect-fofn1Bjg.cjs → SearchableSelect-nMecJAYS.cjs} +1 -1
- package/dist/server/{StatusBarNotificationBell-Mh81s2kG.js → StatusBarNotificationBell-Bk9ETGFK.js} +5 -5
- package/dist/server/{StatusBarNotificationBell-COaYD8sz.cjs → StatusBarNotificationBell-t7B7rSrd.cjs} +1 -1
- package/dist/server/{Stepper-BdOBuNco.js → Stepper-CJIoTXSv.js} +1 -1
- package/dist/server/{Stepper-DqwKOszc.cjs → Stepper-RFkjF_fm.cjs} +1 -1
- package/dist/server/Textarea-BQf2lL59.cjs +1 -0
- package/dist/server/Textarea-BTH48NET.js +37 -0
- package/dist/server/{ToggleButton-B0YuAGY4.js → ToggleButton-BAhucFQT.js} +6 -6
- package/dist/server/{ToggleButton-CbX1kbpI.cjs → ToggleButton-D9IXRIdl.cjs} +1 -1
- package/dist/server/{createResizableSidebar-D28fY_SX.cjs → createResizableSidebar-BymQA2Fs.cjs} +1 -1
- package/dist/server/{createResizableSidebar-BfTFOM7v.js → createResizableSidebar-IcXBM-BE.js} +1 -1
- package/dist/server/desktop/index.cjs +1 -1
- package/dist/server/desktop/index.js +2 -2
- package/dist/server/{dialogFocusRestore-DKxaV82N.js → dialogFocusRestore-B4ggeVAM.js} +1 -1
- package/dist/server/{dialogFocusRestore-BAF8QM6v.cjs → dialogFocusRestore-BcMPrbig.cjs} +1 -1
- package/dist/server/format-CW_FVfq2.js +385 -0
- package/dist/server/format-x-8syaS2.cjs +1 -0
- package/dist/server/forms/index.cjs +1 -1
- package/dist/server/forms/index.js +41 -40
- package/dist/server/grid/index.cjs +1 -1
- package/dist/server/grid/index.js +7 -6
- package/dist/server/iconScale.module-C3O0bxfp.js +13 -0
- package/dist/server/iconScale.module-CzmKG1rf.cjs +1 -0
- package/dist/server/index.cjs +1 -1
- package/dist/server/index.js +1442 -1344
- package/dist/server/layout/index.cjs +1 -1
- package/dist/server/layout/index.js +2 -2
- package/dist/server/navigation/index.cjs +1 -1
- package/dist/server/navigation/index.js +1 -1
- package/dist/server/notifications/index.cjs +1 -1
- package/dist/server/notifications/index.js +2 -2
- package/dist/server/overlay/index.cjs +1 -1
- package/dist/server/overlay/index.js +131 -121
- package/dist/server/overlay-stack/index.cjs +1 -1
- package/dist/server/overlay-stack/index.js +1 -1
- package/dist/server/overlayStack-DvGdPMdq.js +203 -0
- package/dist/server/overlayStack-DvKYN7SD.cjs +1 -0
- package/dist/server/{useFloatingDropdown-HD3G-ECb.js → useFloatingDropdown-BN4J092P.js} +1 -1
- package/dist/server/{useFloatingDropdown-vYQiMh6N.cjs → useFloatingDropdown-D9OvEFAp.cjs} +1 -1
- package/dist/solid/forms/Checkbox.jsx +5 -2
- package/dist/solid/forms/Input.jsx +5 -2
- package/dist/solid/forms/Textarea.jsx +5 -2
- package/dist/solid/forms/formFieldContext.js +7 -0
- package/dist/solid/grid/index.js +1 -0
- package/dist/solid/grid/resultTabToolbarClasses.js +33 -0
- package/dist/solid/index.js +1 -0
- package/dist/solid/overlay/DropdownMenu.jsx +48 -26
- package/dist/solid/overlay/DropdownMenu.module.css.js +1 -7
- package/dist/solid/overlay/index.js +2 -0
- package/dist/solid/overlay/menu/MenuParts.jsx +140 -0
- package/dist/solid/overlay/menu/MenuParts.module.css.js +34 -0
- package/dist/solid/overlay/menu/index.js +2 -0
- package/dist/solid/overlay/menu/menuSurfaceClasses.js +16 -0
- package/dist/solid/overlay/overlayStack.js +10 -3
- package/dist/solid/overlay/panelClasses.js +29 -0
- package/dist/solid/overlay/popover/Popover.jsx +1 -1
- package/dist/solid/overlay/popover/PopoverPanel.jsx +95 -0
- package/dist/solid/overlay/popover/PopoverPanel.module.css.js +22 -0
- package/dist/solid/overlay/popover/index.js +1 -0
- package/dist/solid/overlay/popover/popoverFocusNavigation.js +7 -1
- package/dist/solid/styles/detachedLayout.module.css.js +8 -0
- package/dist/solid/styles/detachedLayoutClasses.js +8 -0
- package/dist/solid/styles/hljsTheme.module.css.js +4 -0
- package/dist/solid/styles/hljsThemeClasses.js +4 -0
- package/dist/solid/styles/iconScaleClasses.js +11 -0
- package/dist/solid/styles/index.js +5 -0
- package/dist/solid/styles/menuSurface.module.css.js +17 -0
- package/dist/solid/styles/recordTable.module.css.js +6 -0
- package/dist/solid/styles/recordTableClasses.js +6 -0
- package/dist/solid/styles/widgetChrome.module.css.js +13 -0
- package/dist/solid/styles/widgetChromeClasses.js +13 -0
- package/dist/solid/widgets/index.js +1 -0
- package/dist/solid/widgets/settingsFieldClasses.js +26 -0
- package/dist/style.css +2 -2
- package/dist/styles/detachedLayoutClasses.d.cts +17 -0
- package/dist/styles/detachedLayoutClasses.d.ts +17 -0
- package/dist/styles/hljsThemeClasses.d.cts +11 -0
- package/dist/styles/hljsThemeClasses.d.ts +11 -0
- package/dist/styles/iconScaleClasses.d.cts +19 -0
- package/dist/styles/iconScaleClasses.d.ts +19 -0
- package/dist/styles/index.d.cts +5 -0
- package/dist/styles/index.d.ts +5 -0
- package/dist/styles/recordTableClasses.d.cts +17 -0
- package/dist/styles/recordTableClasses.d.ts +17 -0
- package/dist/styles/widgetChromeClasses.d.cts +31 -0
- package/dist/styles/widgetChromeClasses.d.ts +31 -0
- package/dist/theme.css +1 -1
- package/dist/tokens/tokens.css +1 -1
- package/dist/ui.css +1 -1
- package/dist/{useFloatingDropdown-CaQNfmfZ.js → useFloatingDropdown-CfPEYRut.js} +1 -1
- package/dist/{useFloatingDropdown-BKckfuUv.cjs → useFloatingDropdown-DcU7ozDg.cjs} +1 -1
- package/dist/widgets/index.d.cts +1 -0
- package/dist/widgets/index.d.ts +1 -0
- package/dist/widgets/settingsFieldClasses.d.cts +41 -0
- package/dist/widgets/settingsFieldClasses.d.ts +41 -0
- package/package.json +1 -1
- package/dist/AttributeGrid-BUyv-hUX.js +0 -260
- package/dist/AttributeGrid-Tk8KJx8e.cjs +0 -1
- package/dist/CommandPalette-CIAqAbBE.cjs +0 -2
- package/dist/CommandPalette-l_vmlEnR.js +0 -3371
- package/dist/Input-BqiQPUxA.js +0 -215
- package/dist/Input-BrxV_Xcb.cjs +0 -1
- package/dist/Popover-B8ozGuDX.cjs +0 -1
- package/dist/Textarea-CXFZz3Oe.js +0 -36
- package/dist/Textarea-vl5fZzJa.cjs +0 -1
- package/dist/format-aHRZi12I.cjs +0 -1
- package/dist/iconScale.module-BA7n9qSH.cjs +0 -1
- package/dist/iconScale.module-Cw_Yn8O6.js +0 -10
- package/dist/overlayStack-BZR1emYS.cjs +0 -1
- package/dist/overlayStack-ND6EQZlX.js +0 -196
- package/dist/server/AttributeGrid-CSidAjfz.cjs +0 -1
- package/dist/server/AttributeGrid-D6b2qQS9.js +0 -221
- package/dist/server/CommandPalette-9dL9DSG8.js +0 -2704
- package/dist/server/CommandPalette-Q296oZjU.cjs +0 -1
- package/dist/server/Input-Cxwc5CK4.js +0 -115
- package/dist/server/Input-k-IAQ5Wp.cjs +0 -1
- package/dist/server/Popover-BkZ9n6TA.cjs +0 -1
- package/dist/server/Textarea-DAoq3wWf.cjs +0 -1
- package/dist/server/Textarea-D_1mHXTj.js +0 -31
- package/dist/server/format-BWHKiXRe.cjs +0 -1
- package/dist/server/format-BubrMUMq.js +0 -382
- package/dist/server/iconScale.module-BA7n9qSH.cjs +0 -1
- package/dist/server/iconScale.module-Cw_Yn8O6.js +0 -10
- package/dist/server/overlayStack-BZR1emYS.cjs +0 -1
- package/dist/server/overlayStack-ND6EQZlX.js +0 -196
|
@@ -0,0 +1,203 @@
|
|
|
1
|
+
import { createMemo as R, createComputed as P, onCleanup as B, createSignal as D } from "solid-js";
|
|
2
|
+
const $ = /* @__PURE__ */ new Set([
|
|
3
|
+
"modal",
|
|
4
|
+
"menu",
|
|
5
|
+
"popover",
|
|
6
|
+
"tooltip"
|
|
7
|
+
]), z = /* @__PURE__ */ new Set([
|
|
8
|
+
"tooltip"
|
|
9
|
+
]), f = /* @__PURE__ */ new Map();
|
|
10
|
+
function g(t) {
|
|
11
|
+
var o, e, n;
|
|
12
|
+
return ((e = (o = t.element) == null ? void 0 : o.call(t)) == null ? void 0 : e.ownerDocument) ?? ((n = t.document) == null ? void 0 : n.call(t));
|
|
13
|
+
}
|
|
14
|
+
const [j, k] = D(0);
|
|
15
|
+
function _() {
|
|
16
|
+
k((t) => t + 1);
|
|
17
|
+
}
|
|
18
|
+
function A() {
|
|
19
|
+
return j();
|
|
20
|
+
}
|
|
21
|
+
const M = /* @__PURE__ */ new Set(), S = /* @__PURE__ */ new Set();
|
|
22
|
+
let O = 0;
|
|
23
|
+
function F() {
|
|
24
|
+
O++;
|
|
25
|
+
for (const t of Array.from(M))
|
|
26
|
+
t();
|
|
27
|
+
}
|
|
28
|
+
function q() {
|
|
29
|
+
O = Math.max(0, O - 1);
|
|
30
|
+
for (const t of Array.from(S))
|
|
31
|
+
t();
|
|
32
|
+
}
|
|
33
|
+
function Q(t, o) {
|
|
34
|
+
return M.add(t), S.add(o), O > 0 && t(), () => {
|
|
35
|
+
M.delete(t), S.delete(o);
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
function U(t) {
|
|
39
|
+
var s;
|
|
40
|
+
A();
|
|
41
|
+
const o = t == null ? void 0 : t.getBoundingClientRect(), e = [];
|
|
42
|
+
let n = !1, r = !1, c = !1, i = !1;
|
|
43
|
+
for (const y of d()) {
|
|
44
|
+
const h = f.get(y);
|
|
45
|
+
if (!h) continue;
|
|
46
|
+
const l = h.type;
|
|
47
|
+
l === "toast" && (c = !0), l === "tooltip" && (i = !0);
|
|
48
|
+
const v = (s = h.element) == null ? void 0 : s.call(h), b = g(h);
|
|
49
|
+
if (t && b && b !== t.ownerDocument) continue;
|
|
50
|
+
const I = !!(v != null && v.isConnected);
|
|
51
|
+
let x, C = !1, m;
|
|
52
|
+
if (l === "modal")
|
|
53
|
+
n = !0, C = !0, m = "modal overlay active";
|
|
54
|
+
else if (v && I && o) {
|
|
55
|
+
const u = v.getBoundingClientRect();
|
|
56
|
+
x = {
|
|
57
|
+
x: Math.round(u.x),
|
|
58
|
+
y: Math.round(u.y),
|
|
59
|
+
width: Math.round(u.width),
|
|
60
|
+
height: Math.round(u.height)
|
|
61
|
+
}, u.width > 0 && u.height > 0 && o.left < u.right && o.right > u.left && o.top < u.bottom && o.bottom > u.top && (C = !0, l === "tooltip" || l === "toast" ? m = `nonmodal ${l} intersecting viewport; browser remains live` : (r = !0, m = `${l} overlapping view`));
|
|
62
|
+
}
|
|
63
|
+
e.push({
|
|
64
|
+
id: y,
|
|
65
|
+
type: l,
|
|
66
|
+
modal: l === "modal",
|
|
67
|
+
connected: I,
|
|
68
|
+
bounds: x,
|
|
69
|
+
overlapsBrowser: C,
|
|
70
|
+
reason: m
|
|
71
|
+
});
|
|
72
|
+
}
|
|
73
|
+
const a = t ? p().some((y) => y(t)) : p().some((y) => y());
|
|
74
|
+
return a && (n = !0), {
|
|
75
|
+
modalOccluded: n,
|
|
76
|
+
menuOccluded: r,
|
|
77
|
+
toastActive: c,
|
|
78
|
+
tooltipActive: i,
|
|
79
|
+
overlays: e,
|
|
80
|
+
customConditionActive: a
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
function V(t) {
|
|
84
|
+
if (A(), t && p().some((o) => o(t)))
|
|
85
|
+
return !0;
|
|
86
|
+
for (const o of d()) {
|
|
87
|
+
const e = f.get(o);
|
|
88
|
+
if (!e || e.type !== "modal") continue;
|
|
89
|
+
const n = g(e);
|
|
90
|
+
if (!(t && n && n !== t.ownerDocument))
|
|
91
|
+
return !0;
|
|
92
|
+
}
|
|
93
|
+
return !1;
|
|
94
|
+
}
|
|
95
|
+
function W(t) {
|
|
96
|
+
for (const o of d()) {
|
|
97
|
+
const e = f.get(o);
|
|
98
|
+
if (!e || !$.has(e.type)) continue;
|
|
99
|
+
const n = g(e);
|
|
100
|
+
if (n === void 0 || n === t) return !0;
|
|
101
|
+
}
|
|
102
|
+
return !1;
|
|
103
|
+
}
|
|
104
|
+
function G(t) {
|
|
105
|
+
var e, n;
|
|
106
|
+
let o = t;
|
|
107
|
+
for (let r = (e = f.get(o)) == null ? void 0 : e.parent; r !== void 0; r = (n = f.get(o)) == null ? void 0 : n.parent)
|
|
108
|
+
o = r.id;
|
|
109
|
+
return o;
|
|
110
|
+
}
|
|
111
|
+
function T(t, o = /* @__PURE__ */ new Set()) {
|
|
112
|
+
const e = f.get(t);
|
|
113
|
+
if (!e || !d().has(t)) return !1;
|
|
114
|
+
const n = g(e), r = [...d()];
|
|
115
|
+
for (let c = r.length - 1; c >= 0; c--) {
|
|
116
|
+
const i = r[c], a = f.get(i);
|
|
117
|
+
if (!a || !$.has(a.type) || o.has(a.type))
|
|
118
|
+
continue;
|
|
119
|
+
const s = g(a);
|
|
120
|
+
if (!(n && s && s !== n))
|
|
121
|
+
return G(i) === t;
|
|
122
|
+
}
|
|
123
|
+
return !1;
|
|
124
|
+
}
|
|
125
|
+
function X(t) {
|
|
126
|
+
var e;
|
|
127
|
+
A();
|
|
128
|
+
const o = t.getBoundingClientRect();
|
|
129
|
+
for (const n of d()) {
|
|
130
|
+
const r = f.get(n);
|
|
131
|
+
if (!r) continue;
|
|
132
|
+
const c = r.type;
|
|
133
|
+
if (c === "tooltip" || c === "toast") continue;
|
|
134
|
+
const i = (e = r.element) == null ? void 0 : e.call(r), a = g(r);
|
|
135
|
+
if (a && a !== t.ownerDocument || i != null && i.contains(t)) continue;
|
|
136
|
+
if (c === "modal") return !0;
|
|
137
|
+
if (!(i != null && i.isConnected)) continue;
|
|
138
|
+
const s = i.getBoundingClientRect();
|
|
139
|
+
if (s.width > 0 && s.height > 0 && o.left < s.right && o.right > s.left && o.top < s.bottom && o.bottom > s.top)
|
|
140
|
+
return !0;
|
|
141
|
+
}
|
|
142
|
+
return p().some((n) => n(t));
|
|
143
|
+
}
|
|
144
|
+
let H = 0;
|
|
145
|
+
const [d, N] = D(/* @__PURE__ */ new Set()), [p, E] = D([]), w = /* @__PURE__ */ new Set();
|
|
146
|
+
function J(t, o) {
|
|
147
|
+
return f.set(t, o), N((e) => {
|
|
148
|
+
if (e.has(t)) return e;
|
|
149
|
+
const n = new Set(e);
|
|
150
|
+
return n.add(t), n;
|
|
151
|
+
}), o.element && o.type !== "modal" && (w.has(t) || (w.add(t), F())), _(), t;
|
|
152
|
+
}
|
|
153
|
+
function L(t) {
|
|
154
|
+
f.delete(t), N((o) => {
|
|
155
|
+
if (!o.has(t)) return o;
|
|
156
|
+
const e = new Set(o);
|
|
157
|
+
return e.delete(t), e;
|
|
158
|
+
}), w.has(t) && (w.delete(t), q()), _();
|
|
159
|
+
}
|
|
160
|
+
function Y(t) {
|
|
161
|
+
return E((o) => [...o, t]), () => {
|
|
162
|
+
E((o) => o.filter((e) => e !== t));
|
|
163
|
+
};
|
|
164
|
+
}
|
|
165
|
+
const Z = R(
|
|
166
|
+
() => d().size
|
|
167
|
+
), tt = R(() => {
|
|
168
|
+
if (d().size > 0) return !0;
|
|
169
|
+
for (const t of p())
|
|
170
|
+
if (t()) return !0;
|
|
171
|
+
return !1;
|
|
172
|
+
});
|
|
173
|
+
function ot(t, o, e) {
|
|
174
|
+
const n = `${o}_${++H}_${Math.random().toString(36).slice(2, 7)}`, r = R(t);
|
|
175
|
+
return P(() => {
|
|
176
|
+
r() && (J(n, e), B(() => {
|
|
177
|
+
L(n);
|
|
178
|
+
}));
|
|
179
|
+
}), B(() => {
|
|
180
|
+
L(n);
|
|
181
|
+
}), {
|
|
182
|
+
id: n,
|
|
183
|
+
isTopmost: () => T(n),
|
|
184
|
+
isTopmostForPointer: () => T(n, z)
|
|
185
|
+
};
|
|
186
|
+
}
|
|
187
|
+
export {
|
|
188
|
+
V as a,
|
|
189
|
+
X as b,
|
|
190
|
+
q as c,
|
|
191
|
+
F as d,
|
|
192
|
+
Z as e,
|
|
193
|
+
L as f,
|
|
194
|
+
U as g,
|
|
195
|
+
W as h,
|
|
196
|
+
tt as i,
|
|
197
|
+
Y as j,
|
|
198
|
+
J as k,
|
|
199
|
+
_ as n,
|
|
200
|
+
Q as o,
|
|
201
|
+
A as r,
|
|
202
|
+
ot as u
|
|
203
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const d=require("solid-js"),T=new Set(["modal","menu","popover","tooltip"]),z=new Set(["tooltip"]),l=new Map;function O(t){var e,o,n;return((o=(e=t.element)==null?void 0:e.call(t))==null?void 0:o.ownerDocument)??((n=t.document)==null?void 0:n.call(t))}const[q,F]=d.createSignal(0);function I(){F(t=>t+1)}function C(){return q()}const R=new Set,D=new Set;let M=0;function $(){M++;for(const t of Array.from(R))t()}function _(){M=Math.max(0,M-1);for(const t of Array.from(D))t()}function J(t,e){return R.add(t),D.add(e),M>0&&t(),()=>{R.delete(t),D.delete(e)}}function j(t){var s;C();const e=t==null?void 0:t.getBoundingClientRect(),o=[];let n=!1,r=!1,c=!1,i=!1;for(const v of y()){const g=l.get(v);if(!g)continue;const f=g.type;f==="toast"&&(c=!0),f==="tooltip"&&(i=!0);const h=(s=g.element)==null?void 0:s.call(g),b=O(g);if(t&&b&&b!==t.ownerDocument)continue;const x=!!(h!=null&&h.isConnected);let B,S=!1,m;if(f==="modal")n=!0,S=!0,m="modal overlay active";else if(h&&x&&e){const u=h.getBoundingClientRect();B={x:Math.round(u.x),y:Math.round(u.y),width:Math.round(u.width),height:Math.round(u.height)},u.width>0&&u.height>0&&e.left<u.right&&e.right>u.left&&e.top<u.bottom&&e.bottom>u.top&&(S=!0,f==="tooltip"||f==="toast"?m=`nonmodal ${f} intersecting viewport; browser remains live`:(r=!0,m=`${f} overlapping view`))}o.push({id:v,type:f,modal:f==="modal",connected:x,bounds:B,overlapsBrowser:S,reason:m})}const a=t?p().some(v=>v(t)):p().some(v=>v());return a&&(n=!0),{modalOccluded:n,menuOccluded:r,toastActive:c,tooltipActive:i,overlays:o,customConditionActive:a}}function k(t){if(C(),t&&p().some(e=>e(t)))return!0;for(const e of y()){const o=l.get(e);if(!o||o.type!=="modal")continue;const n=O(o);if(!(t&&n&&n!==t.ownerDocument))return!0}return!1}function G(t){for(const e of y()){const o=l.get(e);if(!o||!T.has(o.type))continue;const n=O(o);if(n===void 0||n===t)return!0}return!1}function H(t){var o,n;let e=t;for(let r=(o=l.get(e))==null?void 0:o.parent;r!==void 0;r=(n=l.get(e))==null?void 0:n.parent)e=r.id;return e}function E(t,e=new Set){const o=l.get(t);if(!o||!y().has(t))return!1;const n=O(o),r=[...y()];for(let c=r.length-1;c>=0;c--){const i=r[c],a=l.get(i);if(!a||!T.has(a.type)||e.has(a.type))continue;const s=O(a);if(!(n&&s&&s!==n))return H(i)===t}return!1}function K(t){var o;C();const e=t.getBoundingClientRect();for(const n of y()){const r=l.get(n);if(!r)continue;const c=r.type;if(c==="tooltip"||c==="toast")continue;const i=(o=r.element)==null?void 0:o.call(r),a=O(r);if(a&&a!==t.ownerDocument||i!=null&&i.contains(t))continue;if(c==="modal")return!0;if(!(i!=null&&i.isConnected))continue;const s=i.getBoundingClientRect();if(s.width>0&&s.height>0&&e.left<s.right&&e.right>s.left&&e.top<s.bottom&&e.bottom>s.top)return!0}return p().some(n=>n(t))}let Q=0;const[y,N]=d.createSignal(new Set),[p,L]=d.createSignal([]),w=new Set;function P(t,e){return l.set(t,e),N(o=>{if(o.has(t))return o;const n=new Set(o);return n.add(t),n}),e.element&&e.type!=="modal"&&(w.has(t)||(w.add(t),$())),I(),t}function A(t){l.delete(t),N(e=>{if(!e.has(t))return e;const o=new Set(e);return o.delete(t),o}),w.has(t)&&(w.delete(t),_()),I()}function U(t){return L(e=>[...e,t]),()=>{L(e=>e.filter(o=>o!==t))}}const V=d.createMemo(()=>y().size),W=d.createMemo(()=>{if(y().size>0)return!0;for(const t of p())if(t())return!0;return!1});function X(t,e,o){const n=`${e}_${++Q}_${Math.random().toString(36).slice(2,7)}`,r=d.createMemo(t);return d.createComputed(()=>{r()&&(P(n,o),d.onCleanup(()=>{A(n)}))}),d.onCleanup(()=>{A(n)}),{id:n,isTopmost:()=>E(n),isTopmostForPointer:()=>E(n,z)}}exports.getOverlayDiagnostics=j;exports.hasOpenLayerIn=G;exports.isAnyOverlayOpen=W;exports.isModalOccluded=k;exports.isOverlayOverlapping=K;exports.notifyOverlayChanged=I;exports.notifyOverlayMotionEnd=_;exports.notifyOverlayMotionStart=$;exports.onOverlayMotion=J;exports.overlayDepth=V;exports.readOverlayMutationRevision=C;exports.registerOverlayClose=A;exports.registerOverlayCondition=U;exports.registerOverlayOpen=P;exports.useOverlayRegistration=X;
|
|
@@ -0,0 +1,281 @@
|
|
|
1
|
+
import { ssr as s, ssrAttribute as n, escape as a, createComponent as r, mergeProps as p } from "solid-js/web";
|
|
2
|
+
import { createMemo as k, onMount as f, Show as d, For as h } from "solid-js";
|
|
3
|
+
import { S as m } from "./SearchableSelect-0dP7bp0a.js";
|
|
4
|
+
import { B as _ } from "./Button-BhqhjFpY.js";
|
|
5
|
+
import { t as l } from "./i18n-CYq-dVvv.js";
|
|
6
|
+
import { I, P as B } from "./Input-DaEN2JJd.js";
|
|
7
|
+
import { i as S } from "./iconScale.module-C3O0bxfp.js";
|
|
8
|
+
import { i as C } from "./keys-B2nlkpqc.js";
|
|
9
|
+
import { V } from "./VpClose-1RAQ20H9.js";
|
|
10
|
+
import { V as w } from "./VpSearch-CzVlR0ue.js";
|
|
11
|
+
import { B as z } from "./bugIndicatingError-h3J5qkL6.js";
|
|
12
|
+
import { V as R } from "./VpCheck-XZpSme0g.js";
|
|
13
|
+
function P(t, e) {
|
|
14
|
+
return t <= 0 ? e : String(t);
|
|
15
|
+
}
|
|
16
|
+
const T = "vk_paginationRow_hg8fj", L = "vk_paginationMeta_rPi8N", O = "vk_paginationActions_gD2Fz", y = "vk_paginationLabel_9x9Ah", $ = "vk_paginationSelect_h5BcT", A = "vk_paginationPage_CYJRF", b = {
|
|
17
|
+
paginationRow: T,
|
|
18
|
+
paginationMeta: L,
|
|
19
|
+
paginationActions: O,
|
|
20
|
+
paginationLabel: y,
|
|
21
|
+
paginationSelect: $,
|
|
22
|
+
paginationPage: A
|
|
23
|
+
};
|
|
24
|
+
var M = ["<div", "><span", ">", "</span><div", "><label", ">", "", "</label>", "<span", ">", " / ", "</span>", "</div></div>"];
|
|
25
|
+
function Jt(t) {
|
|
26
|
+
const e = k(() => {
|
|
27
|
+
const c = l("Unlimited");
|
|
28
|
+
return t.pageSizeOptions.map((u) => ({
|
|
29
|
+
value: String(u),
|
|
30
|
+
label: P(u, c)
|
|
31
|
+
}));
|
|
32
|
+
});
|
|
33
|
+
return s(M, n("class", a(b.paginationRow, !0), !1), n("class", a(b.paginationMeta, !0), !1), a(l("Showing {shown} of {total} items", {
|
|
34
|
+
shown: t.shownCount(),
|
|
35
|
+
total: t.totalCount()
|
|
36
|
+
})), n("class", a(b.paginationActions, !0), !1), n("class", a(b.paginationLabel, !0), !1), a(l("Page size")), a(r(m, {
|
|
37
|
+
size: "sm",
|
|
38
|
+
get class() {
|
|
39
|
+
return b.paginationSelect;
|
|
40
|
+
},
|
|
41
|
+
get value() {
|
|
42
|
+
return String(t.pageSize());
|
|
43
|
+
},
|
|
44
|
+
get options() {
|
|
45
|
+
return e();
|
|
46
|
+
},
|
|
47
|
+
onChange: (c) => {
|
|
48
|
+
t.onPageSizeChange(Number(c));
|
|
49
|
+
},
|
|
50
|
+
searchable: !1,
|
|
51
|
+
get ariaLabel() {
|
|
52
|
+
return l("Page size");
|
|
53
|
+
}
|
|
54
|
+
})), a(r(_, {
|
|
55
|
+
size: "sm",
|
|
56
|
+
variant: "secondary",
|
|
57
|
+
get disabled() {
|
|
58
|
+
return t.page() <= 1;
|
|
59
|
+
},
|
|
60
|
+
onClick: () => t.onPageChange(Math.max(1, t.page() - 1)),
|
|
61
|
+
get children() {
|
|
62
|
+
return l("Previous");
|
|
63
|
+
}
|
|
64
|
+
})), n("class", a(b.paginationPage, !0), !1), a(t.page()), a(t.totalPages()), a(r(_, {
|
|
65
|
+
size: "sm",
|
|
66
|
+
variant: "secondary",
|
|
67
|
+
get disabled() {
|
|
68
|
+
return t.page() >= t.totalPages();
|
|
69
|
+
},
|
|
70
|
+
onClick: () => t.onPageChange(Math.min(t.totalPages(), t.page() + 1)),
|
|
71
|
+
get children() {
|
|
72
|
+
return l("Next");
|
|
73
|
+
}
|
|
74
|
+
})));
|
|
75
|
+
}
|
|
76
|
+
const H = "vk_toolbar_LSRmU", x = "vk_toolbarHorizontal_qHM-8", F = "vk_toolbarViewClip_Q893H", E = "vk_toolbarScrollRoot_aYbLg", N = "vk_toolbarScrollViewport_qBzjd", X = "vk_toolbarScrollTrack_Tp8TN", J = "vk_segmentedCapsule_k9EBy", K = "vk_toolbarBtn_CcyXF", U = "vk_toolbarBtnActive_UgTBV", j = "vk_toolbarBtnIconOnly_BlE-b", q = "vk_toolbarHorizontalBottom_qLzhJ", D = "vk_toolbarVertical_EjHi2", G = "vk_toolbarVerticalRight_DBgEa", Q = "vk_toolbarScrollRootVertical_VGLRy", Y = "vk_toolbarScrollViewportVertical_RLF5g", Z = "vk_toolbarScrollTrackVertical_c1rBF", W = "vk_toolbarSettingsBtn_XXfMz", tt = "vk_toolbarIcon_0FvlL", ot = "vk_toolbarSpacer_N3TbQ", at = "vk_sortBadgePill_nVrIk", et = "vk_sortBadgeBtn_Is9PS", rt = "vk_sortBadgeIcon_kw8oa", lt = "vk_sortBadgeLabel_l-p33", nt = "vk_sortBadgeClearBtn_ioOaP", ct = "vk_sortBadgeClearIcon_0e6Kd", it = "vk_filterInputContainer_kegUv", st = "vk_filterSearchIcon_gI0m2", bt = "vk_filterInput_bX9xM", gt = "vk_filterClearBtn_WerJL", ut = "vk_filterClearIcon_7fuAJ", o = {
|
|
77
|
+
toolbar: H,
|
|
78
|
+
toolbarHorizontal: x,
|
|
79
|
+
toolbarViewClip: F,
|
|
80
|
+
toolbarScrollRoot: E,
|
|
81
|
+
toolbarScrollViewport: N,
|
|
82
|
+
toolbarScrollTrack: X,
|
|
83
|
+
segmentedCapsule: J,
|
|
84
|
+
toolbarBtn: K,
|
|
85
|
+
toolbarBtnActive: U,
|
|
86
|
+
toolbarBtnIconOnly: j,
|
|
87
|
+
toolbarHorizontalBottom: q,
|
|
88
|
+
toolbarVertical: D,
|
|
89
|
+
toolbarVerticalRight: G,
|
|
90
|
+
toolbarScrollRootVertical: Q,
|
|
91
|
+
toolbarScrollViewportVertical: Y,
|
|
92
|
+
toolbarScrollTrackVertical: Z,
|
|
93
|
+
toolbarSettingsBtn: W,
|
|
94
|
+
toolbarIcon: tt,
|
|
95
|
+
toolbarSpacer: ot,
|
|
96
|
+
sortBadgePill: at,
|
|
97
|
+
sortBadgeBtn: et,
|
|
98
|
+
sortBadgeIcon: rt,
|
|
99
|
+
sortBadgeLabel: lt,
|
|
100
|
+
sortBadgeClearBtn: nt,
|
|
101
|
+
sortBadgeClearIcon: ct,
|
|
102
|
+
filterInputContainer: it,
|
|
103
|
+
filterSearchIcon: st,
|
|
104
|
+
filterInput: bt,
|
|
105
|
+
filterClearBtn: gt,
|
|
106
|
+
filterClearIcon: ut
|
|
107
|
+
}, _t = "vk_searchRow_2pwXX", vt = "vk_searchInput_PbDtG", dt = "vk_clearBtn_upa-E", g = {
|
|
108
|
+
searchRow: _t,
|
|
109
|
+
searchInput: vt,
|
|
110
|
+
clearBtn: dt
|
|
111
|
+
};
|
|
112
|
+
var Bt = ["<div", ">", "", "</div>"];
|
|
113
|
+
function Kt(t) {
|
|
114
|
+
return r(B, {
|
|
115
|
+
type: "button",
|
|
116
|
+
get class() {
|
|
117
|
+
return `${o.toolbarSettingsBtn} ${t.active ? o.toolbarBtnActive : ""}`;
|
|
118
|
+
},
|
|
119
|
+
get onClick() {
|
|
120
|
+
return t.onToggle;
|
|
121
|
+
},
|
|
122
|
+
get "aria-pressed"() {
|
|
123
|
+
return t.active;
|
|
124
|
+
},
|
|
125
|
+
get "aria-label"() {
|
|
126
|
+
return l("Search");
|
|
127
|
+
},
|
|
128
|
+
get title() {
|
|
129
|
+
return l("Search");
|
|
130
|
+
},
|
|
131
|
+
get children() {
|
|
132
|
+
return r(w, {
|
|
133
|
+
get class() {
|
|
134
|
+
return o.toolbarIcon;
|
|
135
|
+
},
|
|
136
|
+
"aria-hidden": "true"
|
|
137
|
+
});
|
|
138
|
+
}
|
|
139
|
+
});
|
|
140
|
+
}
|
|
141
|
+
function Ut(t) {
|
|
142
|
+
let e;
|
|
143
|
+
return f(() => e == null ? void 0 : e.focus()), s(Bt, n("class", a(g.searchRow, !0), !1), a(r(I, p({
|
|
144
|
+
get class() {
|
|
145
|
+
return g.searchInput;
|
|
146
|
+
},
|
|
147
|
+
type: "search",
|
|
148
|
+
size: "sm",
|
|
149
|
+
get value() {
|
|
150
|
+
return t.value;
|
|
151
|
+
},
|
|
152
|
+
onInput: (c) => t.onInput(c.currentTarget.value),
|
|
153
|
+
onKeyDown: (c) => {
|
|
154
|
+
C(c, "Escape") && t.onClose();
|
|
155
|
+
},
|
|
156
|
+
get placeholder() {
|
|
157
|
+
return t.placeholder ?? l("Search…");
|
|
158
|
+
}
|
|
159
|
+
}, () => t.disabled !== void 0 ? {
|
|
160
|
+
disabled: t.disabled
|
|
161
|
+
} : {}))), a(r(d, {
|
|
162
|
+
get when() {
|
|
163
|
+
return t.value.length > 0;
|
|
164
|
+
},
|
|
165
|
+
get children() {
|
|
166
|
+
return r(B, {
|
|
167
|
+
type: "button",
|
|
168
|
+
get class() {
|
|
169
|
+
return g.clearBtn;
|
|
170
|
+
},
|
|
171
|
+
onClick: () => t.onInput(""),
|
|
172
|
+
get "aria-label"() {
|
|
173
|
+
return l("Clear search");
|
|
174
|
+
},
|
|
175
|
+
get title() {
|
|
176
|
+
return l("Clear search");
|
|
177
|
+
},
|
|
178
|
+
get children() {
|
|
179
|
+
return r(V, {
|
|
180
|
+
get class() {
|
|
181
|
+
return S.iconSm;
|
|
182
|
+
},
|
|
183
|
+
"aria-hidden": "true"
|
|
184
|
+
});
|
|
185
|
+
}
|
|
186
|
+
});
|
|
187
|
+
}
|
|
188
|
+
})));
|
|
189
|
+
}
|
|
190
|
+
const jt = Object.freeze({
|
|
191
|
+
toolbar: o.toolbar,
|
|
192
|
+
toolbarHorizontal: o.toolbarHorizontal,
|
|
193
|
+
toolbarHorizontalBottom: o.toolbarHorizontalBottom,
|
|
194
|
+
toolbarVertical: o.toolbarVertical,
|
|
195
|
+
toolbarVerticalRight: o.toolbarVerticalRight,
|
|
196
|
+
toolbarViewClip: o.toolbarViewClip,
|
|
197
|
+
toolbarScrollRoot: o.toolbarScrollRoot,
|
|
198
|
+
toolbarScrollViewport: o.toolbarScrollViewport,
|
|
199
|
+
toolbarScrollTrack: o.toolbarScrollTrack,
|
|
200
|
+
toolbarScrollRootVertical: o.toolbarScrollRootVertical,
|
|
201
|
+
toolbarScrollViewportVertical: o.toolbarScrollViewportVertical,
|
|
202
|
+
toolbarScrollTrackVertical: o.toolbarScrollTrackVertical,
|
|
203
|
+
segmentedCapsule: o.segmentedCapsule,
|
|
204
|
+
toolbarBtn: o.toolbarBtn,
|
|
205
|
+
toolbarBtnActive: o.toolbarBtnActive,
|
|
206
|
+
toolbarBtnIconOnly: o.toolbarBtnIconOnly,
|
|
207
|
+
toolbarIcon: o.toolbarIcon,
|
|
208
|
+
toolbarSpacer: o.toolbarSpacer,
|
|
209
|
+
toolbarSettingsBtn: o.toolbarSettingsBtn,
|
|
210
|
+
sortBadgePill: o.sortBadgePill,
|
|
211
|
+
sortBadgeBtn: o.sortBadgeBtn,
|
|
212
|
+
sortBadgeIcon: o.sortBadgeIcon,
|
|
213
|
+
sortBadgeLabel: o.sortBadgeLabel,
|
|
214
|
+
sortBadgeClearBtn: o.sortBadgeClearBtn,
|
|
215
|
+
sortBadgeClearIcon: o.sortBadgeClearIcon,
|
|
216
|
+
filterInputContainer: o.filterInputContainer,
|
|
217
|
+
filterSearchIcon: o.filterSearchIcon,
|
|
218
|
+
filterInput: o.filterInput,
|
|
219
|
+
filterClearBtn: o.filterClearBtn,
|
|
220
|
+
filterClearIcon: o.filterClearIcon
|
|
221
|
+
});
|
|
222
|
+
function St(t, e) {
|
|
223
|
+
const c = `${e}: `;
|
|
224
|
+
throw new z(
|
|
225
|
+
`${c}Non-exhaustive switch: unexpected value ${JSON.stringify(t)}`
|
|
226
|
+
);
|
|
227
|
+
}
|
|
228
|
+
const pt = "vk_grid_uK6pm", kt = "vk_card_33OV3", ft = "vk_item_UeZrE", ht = "vk_label_a-LFz", mt = "vk_value_9ZQBt", It = "vk_valueMono_knknq", Ct = "vk_boolOn_5zd-H", Vt = "vk_boolOff_-6I4K", wt = "vk_stacked_2T--a", i = {
|
|
229
|
+
grid: pt,
|
|
230
|
+
card: kt,
|
|
231
|
+
item: ft,
|
|
232
|
+
label: ht,
|
|
233
|
+
value: mt,
|
|
234
|
+
valueMono: It,
|
|
235
|
+
boolOn: Ct,
|
|
236
|
+
boolOff: Vt,
|
|
237
|
+
stacked: wt
|
|
238
|
+
};
|
|
239
|
+
var v = ["<span", ">", "</span>"], zt = ['<span class="', '">', "</span>"], Rt = ['<div class="', '">', "</div>"], Pt = ["<div", "><span", ">", "</span>", "</div>"];
|
|
240
|
+
function Tt(t, e) {
|
|
241
|
+
switch (t.kind) {
|
|
242
|
+
case "text":
|
|
243
|
+
return s(v, n("class", a(i.value, !0), !1), a(t.value(e)));
|
|
244
|
+
case "mono":
|
|
245
|
+
return s(v, n("class", a(i.valueMono, !0), !1), a(t.value(e)));
|
|
246
|
+
case "bool":
|
|
247
|
+
return s(zt, `${a(i.value, !0)} ${t.on(e) ? a(i.boolOn, !0) : a(i.boolOff, !0)}`, t.on(e) ? a(r(R, {
|
|
248
|
+
get class() {
|
|
249
|
+
return S.iconSm;
|
|
250
|
+
},
|
|
251
|
+
"aria-hidden": "true"
|
|
252
|
+
})) : "—");
|
|
253
|
+
case "custom":
|
|
254
|
+
return t.render(e);
|
|
255
|
+
default:
|
|
256
|
+
return St(t, "AttributeField.kind");
|
|
257
|
+
}
|
|
258
|
+
}
|
|
259
|
+
function qt(t) {
|
|
260
|
+
return r(d, {
|
|
261
|
+
get when() {
|
|
262
|
+
return t.row() != null;
|
|
263
|
+
},
|
|
264
|
+
get children() {
|
|
265
|
+
return s(Rt, `${a(i.grid, !0)} ${a(i[t.variant] ?? "", !0)}`, a(r(h, {
|
|
266
|
+
get each() {
|
|
267
|
+
return t.fields;
|
|
268
|
+
},
|
|
269
|
+
children: (e) => s(Pt, n("class", a(i.item, !0), !1), n("class", a(i.label, !0), !1), a(e.label), a(Tt(e, t.row())))
|
|
270
|
+
})));
|
|
271
|
+
}
|
|
272
|
+
});
|
|
273
|
+
}
|
|
274
|
+
export {
|
|
275
|
+
qt as A,
|
|
276
|
+
Jt as P,
|
|
277
|
+
Ut as T,
|
|
278
|
+
Kt as a,
|
|
279
|
+
P as p,
|
|
280
|
+
jt as r
|
|
281
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const t=require("solid-js/web"),s=require("solid-js"),v=require("./SearchableSelect-nMecJAYS.cjs"),g=require("./Button-CFOM8pOv.cjs"),r=require("./i18n-B9ccWgcR.cjs"),b=require("./Input-CjvD8w18.cjs"),_=require("./iconScale.module-CzmKG1rf.cjs"),B=require("./keys-GMxY2wcl.cjs"),S=require("./VpClose-O8jHAcCB.cjs"),k=require("./VpSearch-BqIXmlaU.cjs"),h=require("./bugIndicatingError-D2X5Hfgg.cjs"),C=require("./VpCheck-CGTZXiSk.cjs");function d(e,a){return e<=0?a:String(e)}const f="vk_paginationRow_hg8fj",I="vk_paginationMeta_rPi8N",m="vk_paginationActions_gD2Fz",V="vk_paginationLabel_9x9Ah",w="vk_paginationSelect_h5BcT",T="vk_paginationPage_CYJRF",c={paginationRow:f,paginationMeta:I,paginationActions:m,paginationLabel:V,paginationSelect:w,paginationPage:T};var z=["<div","><span",">","</span><div","><label",">","","</label>","<span",">"," / ","</span>","</div></div>"];function R(e){const a=s.createMemo(()=>{const l=r.t("Unlimited");return e.pageSizeOptions.map(u=>({value:String(u),label:d(u,l)}))});return t.ssr(z,t.ssrAttribute("class",t.escape(c.paginationRow,!0),!1),t.ssrAttribute("class",t.escape(c.paginationMeta,!0),!1),t.escape(r.t("Showing {shown} of {total} items",{shown:e.shownCount(),total:e.totalCount()})),t.ssrAttribute("class",t.escape(c.paginationActions,!0),!1),t.ssrAttribute("class",t.escape(c.paginationLabel,!0),!1),t.escape(r.t("Page size")),t.escape(t.createComponent(v.SearchableSelect,{size:"sm",get class(){return c.paginationSelect},get value(){return String(e.pageSize())},get options(){return a()},onChange:l=>{e.onPageSizeChange(Number(l))},searchable:!1,get ariaLabel(){return r.t("Page size")}})),t.escape(t.createComponent(g.Button,{size:"sm",variant:"secondary",get disabled(){return e.page()<=1},onClick:()=>e.onPageChange(Math.max(1,e.page()-1)),get children(){return r.t("Previous")}})),t.ssrAttribute("class",t.escape(c.paginationPage,!0),!1),t.escape(e.page()),t.escape(e.totalPages()),t.escape(t.createComponent(g.Button,{size:"sm",variant:"secondary",get disabled(){return e.page()>=e.totalPages()},onClick:()=>e.onPageChange(Math.min(e.totalPages(),e.page()+1)),get children(){return r.t("Next")}})))}const P="vk_toolbar_LSRmU",A="vk_toolbarHorizontal_qHM-8",L="vk_toolbarViewClip_Q893H",O="vk_toolbarScrollRoot_aYbLg",y="vk_toolbarScrollViewport_qBzjd",$="vk_toolbarScrollTrack_Tp8TN",q="vk_segmentedCapsule_k9EBy",M="vk_toolbarBtn_CcyXF",H="vk_toolbarBtnActive_UgTBV",F="vk_toolbarBtnIconOnly_BlE-b",x="vk_toolbarHorizontalBottom_qLzhJ",E="vk_toolbarVertical_EjHi2",N="vk_toolbarVerticalRight_DBgEa",J="vk_toolbarScrollRootVertical_VGLRy",X="vk_toolbarScrollViewportVertical_RLF5g",K="vk_toolbarScrollTrackVertical_c1rBF",U="vk_toolbarSettingsBtn_XXfMz",j="vk_toolbarIcon_0FvlL",D="vk_toolbarSpacer_N3TbQ",G="vk_sortBadgePill_nVrIk",Q="vk_sortBadgeBtn_Is9PS",Y="vk_sortBadgeIcon_kw8oa",Z="vk_sortBadgeLabel_l-p33",W="vk_sortBadgeClearBtn_ioOaP",tt="vk_sortBadgeClearIcon_0e6Kd",et="vk_filterInputContainer_kegUv",ot="vk_filterSearchIcon_gI0m2",at="vk_filterInput_bX9xM",rt="vk_filterClearBtn_WerJL",lt="vk_filterClearIcon_7fuAJ",o={toolbar:P,toolbarHorizontal:A,toolbarViewClip:L,toolbarScrollRoot:O,toolbarScrollViewport:y,toolbarScrollTrack:$,segmentedCapsule:q,toolbarBtn:M,toolbarBtnActive:H,toolbarBtnIconOnly:F,toolbarHorizontalBottom:x,toolbarVertical:E,toolbarVerticalRight:N,toolbarScrollRootVertical:J,toolbarScrollViewportVertical:X,toolbarScrollTrackVertical:K,toolbarSettingsBtn:U,toolbarIcon:j,toolbarSpacer:D,sortBadgePill:G,sortBadgeBtn:Q,sortBadgeIcon:Y,sortBadgeLabel:Z,sortBadgeClearBtn:W,sortBadgeClearIcon:tt,filterInputContainer:et,filterSearchIcon:ot,filterInput:at,filterClearBtn:rt,filterClearIcon:lt},nt="vk_searchRow_2pwXX",ct="vk_searchInput_PbDtG",st="vk_clearBtn_upa-E",i={searchRow:nt,searchInput:ct,clearBtn:st};var it=["<div",">","","</div>"];function bt(e){return t.createComponent(b.PressableSurface,{type:"button",get class(){return`${o.toolbarSettingsBtn} ${e.active?o.toolbarBtnActive:""}`},get onClick(){return e.onToggle},get"aria-pressed"(){return e.active},get"aria-label"(){return r.t("Search")},get title(){return r.t("Search")},get children(){return t.createComponent(k.VpSearch,{get class(){return o.toolbarIcon},"aria-hidden":"true"})}})}function ut(e){let a;return s.onMount(()=>a==null?void 0:a.focus()),t.ssr(it,t.ssrAttribute("class",t.escape(i.searchRow,!0),!1),t.escape(t.createComponent(b.Input,t.mergeProps({get class(){return i.searchInput},type:"search",size:"sm",get value(){return e.value},onInput:l=>e.onInput(l.currentTarget.value),onKeyDown:l=>{B.isKey(l,"Escape")&&e.onClose()},get placeholder(){return e.placeholder??r.t("Search…")}},()=>e.disabled!==void 0?{disabled:e.disabled}:{}))),t.escape(t.createComponent(s.Show,{get when(){return e.value.length>0},get children(){return t.createComponent(b.PressableSurface,{type:"button",get class(){return i.clearBtn},onClick:()=>e.onInput(""),get"aria-label"(){return r.t("Clear search")},get title(){return r.t("Clear search")},get children(){return t.createComponent(S.VpClose,{get class(){return _.iconScale.iconSm},"aria-hidden":"true"})}})}})))}const gt=Object.freeze({toolbar:o.toolbar,toolbarHorizontal:o.toolbarHorizontal,toolbarHorizontalBottom:o.toolbarHorizontalBottom,toolbarVertical:o.toolbarVertical,toolbarVerticalRight:o.toolbarVerticalRight,toolbarViewClip:o.toolbarViewClip,toolbarScrollRoot:o.toolbarScrollRoot,toolbarScrollViewport:o.toolbarScrollViewport,toolbarScrollTrack:o.toolbarScrollTrack,toolbarScrollRootVertical:o.toolbarScrollRootVertical,toolbarScrollViewportVertical:o.toolbarScrollViewportVertical,toolbarScrollTrackVertical:o.toolbarScrollTrackVertical,segmentedCapsule:o.segmentedCapsule,toolbarBtn:o.toolbarBtn,toolbarBtnActive:o.toolbarBtnActive,toolbarBtnIconOnly:o.toolbarBtnIconOnly,toolbarIcon:o.toolbarIcon,toolbarSpacer:o.toolbarSpacer,toolbarSettingsBtn:o.toolbarSettingsBtn,sortBadgePill:o.sortBadgePill,sortBadgeBtn:o.sortBadgeBtn,sortBadgeIcon:o.sortBadgeIcon,sortBadgeLabel:o.sortBadgeLabel,sortBadgeClearBtn:o.sortBadgeClearBtn,sortBadgeClearIcon:o.sortBadgeClearIcon,filterInputContainer:o.filterInputContainer,filterSearchIcon:o.filterSearchIcon,filterInput:o.filterInput,filterClearBtn:o.filterClearBtn,filterClearIcon:o.filterClearIcon});function pt(e,a){const l=`${a}: `;throw new h.BugIndicatingError(`${l}Non-exhaustive switch: unexpected value ${JSON.stringify(e)}`)}const _t="vk_grid_uK6pm",dt="vk_card_33OV3",vt="vk_item_UeZrE",Bt="vk_label_a-LFz",St="vk_value_9ZQBt",kt="vk_valueMono_knknq",ht="vk_boolOn_5zd-H",Ct="vk_boolOff_-6I4K",ft="vk_stacked_2T--a",n={grid:_t,card:dt,item:vt,label:Bt,value:St,valueMono:kt,boolOn:ht,boolOff:Ct,stacked:ft};var p=["<span",">","</span>"],It=['<span class="','">',"</span>"],mt=['<div class="','">',"</div>"],Vt=["<div","><span",">","</span>","</div>"];function wt(e,a){switch(e.kind){case"text":return t.ssr(p,t.ssrAttribute("class",t.escape(n.value,!0),!1),t.escape(e.value(a)));case"mono":return t.ssr(p,t.ssrAttribute("class",t.escape(n.valueMono,!0),!1),t.escape(e.value(a)));case"bool":return t.ssr(It,`${t.escape(n.value,!0)} ${e.on(a)?t.escape(n.boolOn,!0):t.escape(n.boolOff,!0)}`,e.on(a)?t.escape(t.createComponent(C.VpCheck,{get class(){return _.iconScale.iconSm},"aria-hidden":"true"})):"—");case"custom":return e.render(a);default:return pt(e,"AttributeField.kind")}}function Tt(e){return t.createComponent(s.Show,{get when(){return e.row()!=null},get children(){return t.ssr(mt,`${t.escape(n.grid,!0)} ${t.escape(n[e.variant]??"",!0)}`,t.escape(t.createComponent(s.For,{get each(){return e.fields},children:a=>t.ssr(Vt,t.ssrAttribute("class",t.escape(n.item,!0),!1),t.ssrAttribute("class",t.escape(n.label,!0),!1),t.escape(a.label),t.escape(wt(a,e.row())))})))}})}exports.AttributeGrid=Tt;exports.Pagination=R;exports.ToolbarSearchRow=ut;exports.ToolbarSearchToggle=bt;exports.pageSizeOptionLabel=d;exports.resultTabToolbarClasses=gt;
|