@vokril/ui-solid 0.5.0 → 0.7.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 +48 -0
- package/README.md +1 -1
- package/dist/{AttributeGrid-BUyv-hUX.js → AttributeGrid-CX_GJHgz.js} +2 -2
- package/dist/{AttributeGrid-Tk8KJx8e.cjs → AttributeGrid-X7fHuuIb.cjs} +1 -1
- package/dist/CommandPalette-C8JJMY79.cjs +2 -0
- package/dist/CommandPalette-Ds3xf2z7.js +3921 -0
- package/dist/{DateRangePicker-jnZfDhQA.js → DateRangePicker-BSb6F_gs.js} +3 -3
- package/dist/{DateRangePicker-CHrwr34H.cjs → DateRangePicker-DUrJJjO7.cjs} +1 -1
- package/dist/{GuidedTour-DHgMaTVv.js → GuidedTour-C0Q_EEvI.js} +3 -3
- package/dist/{GuidedTour-B-67TJlO.cjs → GuidedTour-CkGOxh2p.cjs} +1 -1
- 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-Czirj1Df.js → StatusBarNotificationBell-BMmjdBvj.js} +5 -5
- package/dist/{StatusBarNotificationBell-DpTaPcoW.cjs → StatusBarNotificationBell-C8nQZh4i.cjs} +1 -1
- 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.js +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +394 -384
- 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 +1 -0
- package/dist/overlay/index.d.ts +1 -0
- package/dist/overlay/index.js +131 -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/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-D6b2qQS9.js → AttributeGrid-BkWsx39p.js} +2 -2
- package/dist/server/{AttributeGrid-CSidAjfz.cjs → AttributeGrid-PHZKkiBG.cjs} +1 -1
- package/dist/server/CommandPalette-Bfm1R0KC.js +3181 -0
- package/dist/server/CommandPalette-DIgBGmAh.cjs +1 -0
- package/dist/server/{DateRangePicker-BK2Ul2uy.js → DateRangePicker-BOsd_ZH2.js} +3 -3
- package/dist/server/{DateRangePicker-s-I_rNUK.cjs → DateRangePicker-CIKghxMx.cjs} +1 -1
- package/dist/server/{GuidedTour-zesfTSmE.cjs → GuidedTour-B4IK-M3E.cjs} +1 -1
- package/dist/server/{GuidedTour-BvDY-xaZ.js → GuidedTour-BVaym9s9.js} +4 -4
- 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-DLrvONW3.js} +5 -5
- package/dist/server/{StatusBarNotificationBell-COaYD8sz.cjs → StatusBarNotificationBell-DufUCZwN.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 +1 -1
- package/dist/server/index.cjs +1 -1
- package/dist/server/index.js +722 -712
- 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 +130 -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/overlay/DropdownMenu.jsx +48 -26
- package/dist/solid/overlay/DropdownMenu.module.css.js +1 -7
- package/dist/solid/overlay/index.js +1 -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/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/menuSurface.module.css.js +17 -0
- package/dist/style.css +2 -2
- 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/package.json +1 -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/overlayStack-BZR1emYS.cjs +0 -1
- package/dist/overlayStack-ND6EQZlX.js +0 -196
- 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/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;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { ssr as s, ssrAttribute as o, escape as t, createComponent as n, mergeProps as f } from "solid-js/web";
|
|
2
2
|
import { createMemo as p, onMount as k, Show as h, For as S } from "solid-js";
|
|
3
|
-
import { S as w } from "./SearchableSelect-
|
|
3
|
+
import { S as w } from "./SearchableSelect-0dP7bp0a.js";
|
|
4
4
|
import { B as b } from "./Button-BhqhjFpY.js";
|
|
5
5
|
import { t as r } from "./i18n-CYq-dVvv.js";
|
|
6
|
-
import { I as P, P as m } from "./Input-
|
|
6
|
+
import { I as P, P as m } from "./Input-DaEN2JJd.js";
|
|
7
7
|
import { i as _ } from "./iconScale.module-Cw_Yn8O6.js";
|
|
8
8
|
import { i as B } from "./keys-B2nlkpqc.js";
|
|
9
9
|
import { V as $ } from "./VpClose-1RAQ20H9.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const e=require("solid-js/web"),c=require("solid-js"),d=require("./SearchableSelect-
|
|
1
|
+
"use strict";const e=require("solid-js/web"),c=require("solid-js"),d=require("./SearchableSelect-nMecJAYS.cjs"),b=require("./Button-CFOM8pOv.cjs"),n=require("./i18n-B9ccWgcR.cjs"),u=require("./Input-CjvD8w18.cjs"),v=require("./iconScale.module-BA7n9qSH.cjs"),_=require("./keys-GMxY2wcl.cjs"),m=require("./VpClose-O8jHAcCB.cjs"),S=require("./VpSearch-BqIXmlaU.cjs"),k=require("./bugIndicatingError-D2X5Hfgg.cjs"),C=require("./VpCheck-CGTZXiSk.cjs");function h(t,a){return t<=0?a:String(t)}const f="vk_paginationRow_hg8fj",w="vk_paginationMeta_rPi8N",A="vk_paginationActions_gD2Fz",P="vk_paginationLabel_9x9Ah",B="vk_paginationSelect_h5BcT",$="vk_paginationPage_CYJRF",o={paginationRow:f,paginationMeta:w,paginationActions:A,paginationLabel:P,paginationSelect:B,paginationPage:$};var z=["<div","><span",">","</span><div","><label",">","","</label>","<span",">"," / ","</span>","</div></div>"];function I(t){const a=c.createMemo(()=>{const r=n.t("Unlimited");return t.pageSizeOptions.map(g=>({value:String(g),label:h(g,r)}))});return e.ssr(z,e.ssrAttribute("class",e.escape(o.paginationRow,!0),!1),e.ssrAttribute("class",e.escape(o.paginationMeta,!0),!1),e.escape(n.t("Showing {shown} of {total} items",{shown:t.shownCount(),total:t.totalCount()})),e.ssrAttribute("class",e.escape(o.paginationActions,!0),!1),e.ssrAttribute("class",e.escape(o.paginationLabel,!0),!1),e.escape(n.t("Page size")),e.escape(e.createComponent(d.SearchableSelect,{size:"sm",get class(){return o.paginationSelect},get value(){return String(t.pageSize())},get options(){return a()},onChange:r=>{t.onPageSizeChange(Number(r))},searchable:!1,get ariaLabel(){return n.t("Page size")}})),e.escape(e.createComponent(b.Button,{size:"sm",variant:"secondary",get disabled(){return t.page()<=1},onClick:()=>t.onPageChange(Math.max(1,t.page()-1)),get children(){return n.t("Previous")}})),e.ssrAttribute("class",e.escape(o.paginationPage,!0),!1),e.escape(t.page()),e.escape(t.totalPages()),e.escape(e.createComponent(b.Button,{size:"sm",variant:"secondary",get disabled(){return t.page()>=t.totalPages()},onClick:()=>t.onPageChange(Math.min(t.totalPages(),t.page()+1)),get children(){return n.t("Next")}})))}const O="vk_toolbarBtnActive_UgTBV",q="vk_toolbarSettingsBtn_XXfMz",M="vk_toolbarIcon_0FvlL",i={toolbarBtnActive:O,toolbarSettingsBtn:q,toolbarIcon:M},y="vk_searchRow_2pwXX",R="vk_searchInput_PbDtG",T="vk_clearBtn_upa-E",l={searchRow:y,searchInput:R,clearBtn:T};var L=["<div",">","","</div>"];function V(t){return e.createComponent(u.PressableSurface,{type:"button",get class(){return`${i.toolbarSettingsBtn} ${t.active?i.toolbarBtnActive:""}`},get onClick(){return t.onToggle},get"aria-pressed"(){return t.active},get"aria-label"(){return n.t("Search")},get title(){return n.t("Search")},get children(){return e.createComponent(S.VpSearch,{get class(){return i.toolbarIcon},"aria-hidden":"true"})}})}function x(t){let a;return c.onMount(()=>a==null?void 0:a.focus()),e.ssr(L,e.ssrAttribute("class",e.escape(l.searchRow,!0),!1),e.escape(e.createComponent(u.Input,e.mergeProps({get class(){return l.searchInput},type:"search",size:"sm",get value(){return t.value},onInput:r=>t.onInput(r.currentTarget.value),onKeyDown:r=>{_.isKey(r,"Escape")&&t.onClose()},get placeholder(){return t.placeholder??n.t("Search…")}},()=>t.disabled!==void 0?{disabled:t.disabled}:{}))),e.escape(e.createComponent(c.Show,{get when(){return t.value.length>0},get children(){return e.createComponent(u.PressableSurface,{type:"button",get class(){return l.clearBtn},onClick:()=>t.onInput(""),get"aria-label"(){return n.t("Clear search")},get title(){return n.t("Clear search")},get children(){return e.createComponent(m.VpClose,{get class(){return v.iconScale.iconSm},"aria-hidden":"true"})}})}})))}function F(t,a){const r=`${a}: `;throw new k.BugIndicatingError(`${r}Non-exhaustive switch: unexpected value ${JSON.stringify(t)}`)}const N="vk_grid_uK6pm",E="vk_card_33OV3",K="vk_item_UeZrE",X="vk_label_a-LFz",D="vk_value_9ZQBt",G="vk_valueMono_knknq",J="vk_boolOn_5zd-H",U="vk_boolOff_-6I4K",Z="vk_stacked_2T--a",s={grid:N,card:E,item:K,label:X,value:D,valueMono:G,boolOn:J,boolOff:U,stacked:Z};var p=["<span",">","</span>"],j=['<span class="','">',"</span>"],H=['<div class="','">',"</div>"],Q=["<div","><span",">","</span>","</div>"];function Y(t,a){switch(t.kind){case"text":return e.ssr(p,e.ssrAttribute("class",e.escape(s.value,!0),!1),e.escape(t.value(a)));case"mono":return e.ssr(p,e.ssrAttribute("class",e.escape(s.valueMono,!0),!1),e.escape(t.value(a)));case"bool":return e.ssr(j,`${e.escape(s.value,!0)} ${t.on(a)?e.escape(s.boolOn,!0):e.escape(s.boolOff,!0)}`,t.on(a)?e.escape(e.createComponent(C.VpCheck,{get class(){return v.iconScale.iconSm},"aria-hidden":"true"})):"—");case"custom":return t.render(a);default:return F(t,"AttributeField.kind")}}function W(t){return e.createComponent(c.Show,{get when(){return t.row()!=null},get children(){return e.ssr(H,`${e.escape(s.grid,!0)} ${e.escape(s[t.variant]??"",!0)}`,e.escape(e.createComponent(c.For,{get each(){return t.fields},children:a=>e.ssr(Q,e.ssrAttribute("class",e.escape(s.item,!0),!1),e.ssrAttribute("class",e.escape(s.label,!0),!1),e.escape(a.label),e.escape(Y(a,t.row())))})))}})}exports.AttributeGrid=W;exports.Pagination=I;exports.ToolbarSearchRow=x;exports.ToolbarSearchToggle=V;exports.pageSizeOptionLabel=h;
|