@vokril/ui-solid 0.18.0 → 0.19.1
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 +19 -0
- package/README.md +3 -1
- package/dist/{AttributeGrid-7cLOWtPn.cjs → AttributeGrid-Qzt5LYnu.cjs} +1 -1
- package/dist/{AttributeGrid-CVyqzT7-.js → AttributeGrid-XTVaiwLe.js} +2 -2
- package/dist/Button-U95Tz8F5.cjs +1 -0
- package/dist/Button-qtxB2SYf.js +305 -0
- package/dist/{CommandPalette-BH7c1cbU.js → CommandPalette-CBA_Shqx.js} +7 -7
- package/dist/{CommandPalette-Dfb4V-Hb.cjs → CommandPalette-CBFIo0FX.cjs} +1 -1
- package/dist/{CopyButton-BtgGbiy9.cjs → CopyButton-CsM8UeX5.cjs} +1 -1
- package/dist/{CopyButton-BF7L1TCO.js → CopyButton-NfxWzVHT.js} +1 -1
- package/dist/{DateRangePicker-Ce2tTbJ4.cjs → DateRangePicker-BKHxyHL4.cjs} +1 -1
- package/dist/{DateRangePicker-jSQBwB78.js → DateRangePicker-C8IVJRT2.js} +3 -3
- package/dist/{GuidedTour-CYaR5Ozj.cjs → GuidedTour-B61cbsdy.cjs} +1 -1
- package/dist/{GuidedTour-CWDtBRHv.js → GuidedTour-Dj41FCdE.js} +2 -2
- package/dist/{HostPortal-X1iw719T.js → HostPortal-CXGUUhP8.js} +1 -1
- package/dist/{HostPortal-B9Tzk_uN.cjs → HostPortal-CgJwxt-f.cjs} +1 -1
- package/dist/{IconPicker-4bdAeGxS.cjs → IconPicker-BZCQG8SO.cjs} +1 -1
- package/dist/{IconPicker-Df6uIUpJ.js → IconPicker-DC9E35Ou.js} +2 -2
- package/dist/{Modal-CQG8l4x7.cjs → Modal-CaurOG_K.cjs} +1 -1
- package/dist/{Modal-CUPe98-o.js → Modal-DJpQqqTJ.js} +2 -2
- package/dist/{PageSkeleton-CUTLh9Ip.js → PageSkeleton-C0eVQO20.js} +2 -2
- package/dist/{PageSkeleton-C3mo6UGh.cjs → PageSkeleton-DICmahMs.cjs} +1 -1
- package/dist/{Popover-YfzC0Tjh.cjs → Popover-CWrR51eG.cjs} +1 -1
- package/dist/{Popover-Dht1jFEy.js → Popover-Cttb6NYT.js} +1 -1
- package/dist/{SearchableSelect-pCaUie2M.cjs → SearchableSelect-ClrAX2hK.cjs} +1 -1
- package/dist/{SearchableSelect-C01brsF0.js → SearchableSelect-DayP1Qs6.js} +2 -2
- package/dist/{StatusBarNotificationBell-BwqVV09r.js → StatusBarNotificationBell-CQkhUMHX.js} +6 -6
- package/dist/{StatusBarNotificationBell-C5Zc2IvW.cjs → StatusBarNotificationBell-Dw9RRZK1.cjs} +1 -1
- package/dist/{Stepper-CtaTpnQu.cjs → Stepper-DTuchuOX.cjs} +1 -1
- package/dist/{Stepper-38IAEOyT.js → Stepper-aiuAdbkl.js} +1 -1
- package/dist/{TimeSeriesChart-_NOs_Job.cjs → TimeSeriesChart-CvU0lxar.cjs} +1 -1
- package/dist/{TimeSeriesChart-ByKG4E1G.js → TimeSeriesChart-SHx_cp8y.js} +1 -1
- package/dist/ToggleButton-BcHNAGPy.cjs +1 -0
- package/dist/{ToggleButton-D-N0C2Fu.js → ToggleButton-BhP17bvW.js} +277 -276
- package/dist/charts/index.cjs +1 -1
- package/dist/charts/index.js +1 -1
- package/dist/{createDialogShellFocus-CxRqhbRN.cjs → createDialogShellFocus-CsrZ2GDZ.cjs} +1 -1
- package/dist/{createDialogShellFocus-BBFu3Z_O.js → createDialogShellFocus-Vv3hhW-I.js} +2 -2
- package/dist/{createResizableSidebar-q7aC7SAO.cjs → createResizableSidebar-Dau7TIuH.cjs} +1 -1
- package/dist/{createResizableSidebar-CfFxQUny.js → createResizableSidebar-gvf9me4K.js} +2 -2
- package/dist/desktop/index.cjs +1 -1
- package/dist/desktop/index.js +2 -2
- package/dist/{dialogFocusRestore-BrALT8Ew.js → dialogFocusRestore--dH59ER2.js} +1 -1
- package/dist/{dialogFocusRestore-CcEsB50v.cjs → dialogFocusRestore-CL-ExfAA.cjs} +1 -1
- package/dist/feedback/index.cjs +1 -1
- package/dist/feedback/index.js +2 -2
- package/dist/fonts/inter.css +8 -0
- package/dist/fonts/jetbrains-mono.css +8 -0
- package/dist/forms/Button.d.cts +6 -1
- package/dist/forms/Button.d.ts +6 -1
- package/dist/forms/index.cjs +1 -1
- package/dist/forms/index.js +7 -7
- package/dist/grid/index.cjs +1 -1
- package/dist/grid/index.js +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +24 -24
- 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 +1 -1
- package/dist/overlay/index.cjs +1 -1
- package/dist/overlay/index.js +8 -8
- package/dist/overlay-stack/index.cjs +1 -1
- package/dist/overlay-stack/index.js +1 -1
- package/dist/overlayStack-Bj6Lg1Rm.js +209 -0
- package/dist/overlayStack-eD8AmuwY.cjs +1 -0
- package/dist/server/{AttributeGrid-C7aWbIe5.cjs → AttributeGrid-C_CvCXpC.cjs} +1 -1
- package/dist/server/{AttributeGrid-B2s_rp00.js → AttributeGrid-D8QYVZDq.js} +2 -2
- package/dist/server/{Button-Ck03cbUs.js → Button-BPNNFcHc.js} +73 -71
- package/dist/server/Button-VKl-_GaO.cjs +1 -0
- package/dist/server/{CommandPalette-VewDIghb.cjs → CommandPalette-CRT5VEoR.cjs} +1 -1
- package/dist/server/{CommandPalette-DwlWZI1s.js → CommandPalette-DE59Rq-n.js} +7 -7
- package/dist/server/{CopyButton-UvtFwOtA.js → CopyButton-HDffWzaN.js} +1 -1
- package/dist/server/{CopyButton-BOmAUQD4.cjs → CopyButton-rWDnbTBF.cjs} +1 -1
- package/dist/server/{DateRangePicker-Cr58DczM.js → DateRangePicker-Dl3zr-PD.js} +3 -3
- package/dist/server/{DateRangePicker-BJteKzOY.cjs → DateRangePicker-Dq0HGz27.cjs} +1 -1
- package/dist/server/{GuidedTour-Rlsp8rOe.cjs → GuidedTour-BoPGRyX5.cjs} +1 -1
- package/dist/server/{GuidedTour-C4msn-Ag.js → GuidedTour-CIlHyRcR.js} +2 -2
- package/dist/server/{HostPortal-X1iw719T.js → HostPortal-CXGUUhP8.js} +1 -1
- package/dist/server/{HostPortal-B9Tzk_uN.cjs → HostPortal-CgJwxt-f.cjs} +1 -1
- package/dist/server/{IconPicker-9DfOxql6.cjs → IconPicker-BDS92veL.cjs} +1 -1
- package/dist/server/{IconPicker-N0wub1Aj.js → IconPicker-CZxYKJOT.js} +3 -3
- package/dist/server/{Modal-D__GTo-n.cjs → Modal-CtJFoR96.cjs} +1 -1
- package/dist/server/{Modal-DeQjfpkG.js → Modal-j54-C2Md.js} +3 -3
- package/dist/server/{PageSkeleton-D4i-UcnI.cjs → PageSkeleton-B0V43uDV.cjs} +1 -1
- package/dist/server/{PageSkeleton-C41pXOcr.js → PageSkeleton-BfGfda9G.js} +2 -2
- package/dist/server/{Popover-AYYDbpLv.cjs → Popover-BsxIKBbl.cjs} +1 -1
- package/dist/server/{Popover-BolicH3A.js → Popover-Cg28aPUZ.js} +1 -1
- package/dist/server/{SearchableSelect-Ca9g8ztu.cjs → SearchableSelect-ClQzcYdL.cjs} +1 -1
- package/dist/server/{SearchableSelect-CEcuBnge.js → SearchableSelect-DtcMC7Xu.js} +2 -2
- package/dist/server/{StatusBarNotificationBell-DyEQF2W7.js → StatusBarNotificationBell-C7zqUWP1.js} +6 -6
- package/dist/server/{StatusBarNotificationBell-BotYny7q.cjs → StatusBarNotificationBell-SO16PL5V.cjs} +1 -1
- package/dist/server/{Stepper-B_eL85hK.js → Stepper-B7wf8h9G.js} +1 -1
- package/dist/server/{Stepper--pusyxso.cjs → Stepper-CCEItuZb.cjs} +1 -1
- package/dist/server/{TimeSeriesChart-aSHquoBv.js → TimeSeriesChart-DjNQiCn_.js} +1 -1
- package/dist/server/{TimeSeriesChart-nZeB5jtN.cjs → TimeSeriesChart-TsaZS7YU.cjs} +1 -1
- package/dist/server/{ToggleButton-DjlWwgLJ.js → ToggleButton-CHaIvApv.js} +39 -39
- package/dist/server/ToggleButton-D6Tux9wG.cjs +1 -0
- package/dist/server/charts/index.cjs +1 -1
- package/dist/server/charts/index.js +1 -1
- package/dist/server/{createDialogShellFocus-DNjzmcGj.js → createDialogShellFocus-BFo8awdj.js} +1 -1
- package/dist/server/{createDialogShellFocus-PRRfMli-.cjs → createDialogShellFocus-BiBAZOCI.cjs} +1 -1
- package/dist/server/{createResizableSidebar-DdWdAB9l.js → createResizableSidebar-BQG5elmd.js} +2 -2
- package/dist/server/{createResizableSidebar-CZtGmUnA.cjs → createResizableSidebar-tU8FO2MK.cjs} +1 -1
- package/dist/server/desktop/index.cjs +1 -1
- package/dist/server/desktop/index.js +2 -2
- package/dist/server/{dialogFocusRestore-BrALT8Ew.js → dialogFocusRestore--dH59ER2.js} +1 -1
- package/dist/server/{dialogFocusRestore-CcEsB50v.cjs → dialogFocusRestore-CL-ExfAA.cjs} +1 -1
- package/dist/server/feedback/index.cjs +1 -1
- package/dist/server/feedback/index.js +2 -2
- package/dist/server/forms/index.cjs +1 -1
- package/dist/server/forms/index.js +7 -7
- package/dist/server/grid/index.cjs +1 -1
- package/dist/server/grid/index.js +1 -1
- package/dist/server/{index-Cqod09d_.cjs → index-BfR3Xipt.cjs} +1 -1
- package/dist/server/{index-BNYr6EIW.js → index-Wv18Fcu8.js} +2 -2
- package/dist/server/index.cjs +1 -1
- package/dist/server/index.js +24 -24
- 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 +1 -1
- package/dist/server/overlay/index.cjs +1 -1
- package/dist/server/overlay/index.js +8 -8
- package/dist/server/overlay-stack/index.cjs +1 -1
- package/dist/server/overlay-stack/index.js +1 -1
- package/dist/server/overlayStack-Bj6Lg1Rm.js +209 -0
- package/dist/server/overlayStack-eD8AmuwY.cjs +1 -0
- package/dist/{useFloatingDropdown-BN4J092P.js → server/useFloatingDropdown-2Tz_es0W.js} +1 -1
- package/dist/server/{useFloatingDropdown-D9OvEFAp.cjs → useFloatingDropdown-D5UayoN6.cjs} +1 -1
- package/dist/solid/forms/Button.jsx +1 -0
- package/dist/solid/forms/Button.module.css.js +1 -0
- package/dist/solid/forms/Slider.jsx +6 -3
- package/dist/solid/overlay/overlayStack.js +10 -3
- package/dist/style.css +1 -1
- package/dist/ui.css +1 -1
- package/dist/{server/useFloatingDropdown-BN4J092P.js → useFloatingDropdown-2Tz_es0W.js} +1 -1
- package/dist/{useFloatingDropdown-D9OvEFAp.cjs → useFloatingDropdown-D5UayoN6.cjs} +1 -1
- package/package.json +4 -2
- package/dist/Button-BiKPB3cH.js +0 -303
- package/dist/Button-Nx7byQZc.cjs +0 -1
- package/dist/ToggleButton-Bz3zAtec.cjs +0 -1
- package/dist/overlayStack-DvGdPMdq.js +0 -203
- package/dist/overlayStack-DvKYN7SD.cjs +0 -1
- package/dist/server/Button-DWFMF5y0.cjs +0 -1
- package/dist/server/ToggleButton-57_0SA-V.cjs +0 -1
- package/dist/server/overlayStack-DvGdPMdq.js +0 -203
- package/dist/server/overlayStack-DvKYN7SD.cjs +0 -1
|
@@ -0,0 +1,209 @@
|
|
|
1
|
+
import { createMemo as L, createComputed as P, onCleanup as x, createSignal as R, createRoot as j } from "solid-js";
|
|
2
|
+
import { isServer as k } from "solid-js/web";
|
|
3
|
+
const $ = /* @__PURE__ */ new Set([
|
|
4
|
+
"modal",
|
|
5
|
+
"menu",
|
|
6
|
+
"popover",
|
|
7
|
+
"tooltip"
|
|
8
|
+
]), F = /* @__PURE__ */ new Set([
|
|
9
|
+
"tooltip"
|
|
10
|
+
]), f = /* @__PURE__ */ new Map();
|
|
11
|
+
function g(t) {
|
|
12
|
+
var o, e, n;
|
|
13
|
+
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));
|
|
14
|
+
}
|
|
15
|
+
const [q, G] = R(0);
|
|
16
|
+
function _() {
|
|
17
|
+
G((t) => t + 1);
|
|
18
|
+
}
|
|
19
|
+
function D() {
|
|
20
|
+
return q();
|
|
21
|
+
}
|
|
22
|
+
const S = /* @__PURE__ */ new Set(), C = /* @__PURE__ */ new Set();
|
|
23
|
+
let O = 0;
|
|
24
|
+
function H() {
|
|
25
|
+
O++;
|
|
26
|
+
for (const t of Array.from(S))
|
|
27
|
+
t();
|
|
28
|
+
}
|
|
29
|
+
function J() {
|
|
30
|
+
O = Math.max(0, O - 1);
|
|
31
|
+
for (const t of Array.from(C))
|
|
32
|
+
t();
|
|
33
|
+
}
|
|
34
|
+
function X(t, o) {
|
|
35
|
+
return S.add(t), C.add(o), O > 0 && t(), () => {
|
|
36
|
+
S.delete(t), C.delete(o);
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
function Y(t) {
|
|
40
|
+
var s;
|
|
41
|
+
D();
|
|
42
|
+
const o = t == null ? void 0 : t.getBoundingClientRect(), e = [];
|
|
43
|
+
let n = !1, r = !1, c = !1, i = !1;
|
|
44
|
+
for (const y of d()) {
|
|
45
|
+
const h = f.get(y);
|
|
46
|
+
if (!h) continue;
|
|
47
|
+
const l = h.type;
|
|
48
|
+
l === "toast" && (c = !0), l === "tooltip" && (i = !0);
|
|
49
|
+
const v = (s = h.element) == null ? void 0 : s.call(h), A = g(h);
|
|
50
|
+
if (t && A && A !== t.ownerDocument) continue;
|
|
51
|
+
const b = !!(v != null && v.isConnected);
|
|
52
|
+
let I, M = !1, p;
|
|
53
|
+
if (l === "modal")
|
|
54
|
+
n = !0, M = !0, p = "modal overlay active";
|
|
55
|
+
else if (v && b && o) {
|
|
56
|
+
const a = v.getBoundingClientRect();
|
|
57
|
+
I = {
|
|
58
|
+
x: Math.round(a.x),
|
|
59
|
+
y: Math.round(a.y),
|
|
60
|
+
width: Math.round(a.width),
|
|
61
|
+
height: Math.round(a.height)
|
|
62
|
+
}, a.width > 0 && a.height > 0 && o.left < a.right && o.right > a.left && o.top < a.bottom && o.bottom > a.top && (M = !0, l === "tooltip" || l === "toast" ? p = `nonmodal ${l} intersecting viewport; browser remains live` : (r = !0, p = `${l} overlapping view`));
|
|
63
|
+
}
|
|
64
|
+
e.push({
|
|
65
|
+
id: y,
|
|
66
|
+
type: l,
|
|
67
|
+
modal: l === "modal",
|
|
68
|
+
connected: b,
|
|
69
|
+
bounds: I,
|
|
70
|
+
overlapsBrowser: M,
|
|
71
|
+
reason: p
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
const u = t ? m().some((y) => y(t)) : m().some((y) => y());
|
|
75
|
+
return u && (n = !0), {
|
|
76
|
+
modalOccluded: n,
|
|
77
|
+
menuOccluded: r,
|
|
78
|
+
toastActive: c,
|
|
79
|
+
tooltipActive: i,
|
|
80
|
+
overlays: e,
|
|
81
|
+
customConditionActive: u
|
|
82
|
+
};
|
|
83
|
+
}
|
|
84
|
+
function Z(t) {
|
|
85
|
+
if (D(), t && m().some((o) => o(t)))
|
|
86
|
+
return !0;
|
|
87
|
+
for (const o of d()) {
|
|
88
|
+
const e = f.get(o);
|
|
89
|
+
if (!e || e.type !== "modal") continue;
|
|
90
|
+
const n = g(e);
|
|
91
|
+
if (!(t && n && n !== t.ownerDocument))
|
|
92
|
+
return !0;
|
|
93
|
+
}
|
|
94
|
+
return !1;
|
|
95
|
+
}
|
|
96
|
+
function tt(t) {
|
|
97
|
+
for (const o of d()) {
|
|
98
|
+
const e = f.get(o);
|
|
99
|
+
if (!e || !$.has(e.type)) continue;
|
|
100
|
+
const n = g(e);
|
|
101
|
+
if (n === void 0 || n === t) return !0;
|
|
102
|
+
}
|
|
103
|
+
return !1;
|
|
104
|
+
}
|
|
105
|
+
function K(t) {
|
|
106
|
+
var e, n;
|
|
107
|
+
let o = t;
|
|
108
|
+
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)
|
|
109
|
+
o = r.id;
|
|
110
|
+
return o;
|
|
111
|
+
}
|
|
112
|
+
function B(t, o = /* @__PURE__ */ new Set()) {
|
|
113
|
+
const e = f.get(t);
|
|
114
|
+
if (!e || !d().has(t)) return !1;
|
|
115
|
+
const n = g(e), r = [...d()];
|
|
116
|
+
for (let c = r.length - 1; c >= 0; c--) {
|
|
117
|
+
const i = r[c], u = f.get(i);
|
|
118
|
+
if (!u || !$.has(u.type) || o.has(u.type))
|
|
119
|
+
continue;
|
|
120
|
+
const s = g(u);
|
|
121
|
+
if (!(n && s && s !== n))
|
|
122
|
+
return K(i) === t;
|
|
123
|
+
}
|
|
124
|
+
return !1;
|
|
125
|
+
}
|
|
126
|
+
function ot(t) {
|
|
127
|
+
var e;
|
|
128
|
+
D();
|
|
129
|
+
const o = t.getBoundingClientRect();
|
|
130
|
+
for (const n of d()) {
|
|
131
|
+
const r = f.get(n);
|
|
132
|
+
if (!r) continue;
|
|
133
|
+
const c = r.type;
|
|
134
|
+
if (c === "tooltip" || c === "toast") continue;
|
|
135
|
+
const i = (e = r.element) == null ? void 0 : e.call(r), u = g(r);
|
|
136
|
+
if (u && u !== t.ownerDocument || i != null && i.contains(t)) continue;
|
|
137
|
+
if (c === "modal") return !0;
|
|
138
|
+
if (!(i != null && i.isConnected)) continue;
|
|
139
|
+
const s = i.getBoundingClientRect();
|
|
140
|
+
if (s.width > 0 && s.height > 0 && o.left < s.right && o.right > s.left && o.top < s.bottom && o.bottom > s.top)
|
|
141
|
+
return !0;
|
|
142
|
+
}
|
|
143
|
+
return m().some((n) => n(t));
|
|
144
|
+
}
|
|
145
|
+
let Q = 0;
|
|
146
|
+
const [d, z] = R(/* @__PURE__ */ new Set()), [m, T] = R([]), w = /* @__PURE__ */ new Set();
|
|
147
|
+
function U(t, o) {
|
|
148
|
+
return f.set(t, o), z((e) => {
|
|
149
|
+
if (e.has(t)) return e;
|
|
150
|
+
const n = new Set(e);
|
|
151
|
+
return n.add(t), n;
|
|
152
|
+
}), o.element && o.type !== "modal" && (w.has(t) || (w.add(t), H())), _(), t;
|
|
153
|
+
}
|
|
154
|
+
function E(t) {
|
|
155
|
+
f.delete(t), z((o) => {
|
|
156
|
+
if (!o.has(t)) return o;
|
|
157
|
+
const e = new Set(o);
|
|
158
|
+
return e.delete(t), e;
|
|
159
|
+
}), w.has(t) && (w.delete(t), J()), _();
|
|
160
|
+
}
|
|
161
|
+
function et(t) {
|
|
162
|
+
return T((o) => [...o, t]), () => {
|
|
163
|
+
T((o) => o.filter((e) => e !== t));
|
|
164
|
+
};
|
|
165
|
+
}
|
|
166
|
+
function N(t) {
|
|
167
|
+
if (k) return t;
|
|
168
|
+
let o;
|
|
169
|
+
return () => (o ?? (o = j(() => L(t))))();
|
|
170
|
+
}
|
|
171
|
+
const nt = N(
|
|
172
|
+
() => d().size
|
|
173
|
+
), rt = N(() => {
|
|
174
|
+
if (d().size > 0) return !0;
|
|
175
|
+
for (const t of m())
|
|
176
|
+
if (t()) return !0;
|
|
177
|
+
return !1;
|
|
178
|
+
});
|
|
179
|
+
function it(t, o, e) {
|
|
180
|
+
const n = `${o}_${++Q}_${Math.random().toString(36).slice(2, 7)}`, r = L(t);
|
|
181
|
+
return P(() => {
|
|
182
|
+
r() && (U(n, e), x(() => {
|
|
183
|
+
E(n);
|
|
184
|
+
}));
|
|
185
|
+
}), x(() => {
|
|
186
|
+
E(n);
|
|
187
|
+
}), {
|
|
188
|
+
id: n,
|
|
189
|
+
isTopmost: () => B(n),
|
|
190
|
+
isTopmostForPointer: () => B(n, F)
|
|
191
|
+
};
|
|
192
|
+
}
|
|
193
|
+
export {
|
|
194
|
+
Z as a,
|
|
195
|
+
ot as b,
|
|
196
|
+
J as c,
|
|
197
|
+
H as d,
|
|
198
|
+
nt as e,
|
|
199
|
+
E as f,
|
|
200
|
+
Y as g,
|
|
201
|
+
tt as h,
|
|
202
|
+
rt as i,
|
|
203
|
+
et as j,
|
|
204
|
+
U as k,
|
|
205
|
+
_ as n,
|
|
206
|
+
X as o,
|
|
207
|
+
D as r,
|
|
208
|
+
it as u
|
|
209
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const d=require("solid-js"),q=require("solid-js/web"),T=new Set(["modal","menu","popover","tooltip"]),F=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[J,j]=d.createSignal(0);function I(){j(t=>t+1)}function C(){return J()}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 k(t,e){return R.add(t),D.add(e),M>0&&t(),()=>{R.delete(t),D.delete(e)}}function G(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 H(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 K(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 Q(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 Q(i)===t}return!1}function U(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 V=0;const[y,z]=d.createSignal(new Set),[p,L]=d.createSignal([]),w=new Set;function N(t,e){return l.set(t,e),z(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),z(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 W(t){return L(e=>[...e,t]),()=>{L(e=>e.filter(o=>o!==t))}}function P(t){if(q.isServer)return t;let e;return()=>(e??(e=d.createRoot(()=>d.createMemo(t))))()}const X=P(()=>y().size),Y=P(()=>{if(y().size>0)return!0;for(const t of p())if(t())return!0;return!1});function Z(t,e,o){const n=`${e}_${++V}_${Math.random().toString(36).slice(2,7)}`,r=d.createMemo(t);return d.createComputed(()=>{r()&&(N(n,o),d.onCleanup(()=>{A(n)}))}),d.onCleanup(()=>{A(n)}),{id:n,isTopmost:()=>E(n),isTopmostForPointer:()=>E(n,F)}}exports.getOverlayDiagnostics=G;exports.hasOpenLayerIn=K;exports.isAnyOverlayOpen=Y;exports.isModalOccluded=H;exports.isOverlayOverlapping=U;exports.notifyOverlayChanged=I;exports.notifyOverlayMotionEnd=_;exports.notifyOverlayMotionStart=$;exports.onOverlayMotion=k;exports.overlayDepth=X;exports.readOverlayMutationRevision=C;exports.registerOverlayClose=A;exports.registerOverlayCondition=W;exports.registerOverlayOpen=N;exports.useOverlayRegistration=Z;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createEffect as g, onCleanup as u } from "solid-js";
|
|
2
2
|
import { o as l } from "./ownerWindow-9mx_LD47.js";
|
|
3
|
-
import { u as m, n as f } from "./overlayStack-
|
|
3
|
+
import { u as m, n as f } from "./overlayStack-Bj6Lg1Rm.js";
|
|
4
4
|
import { i as v } from "./keys-B2nlkpqc.js";
|
|
5
5
|
function L(e) {
|
|
6
6
|
const t = () => l(e.getTrigger()), a = m(e.open, "dropdown-list", {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const u=require("solid-js"),l=require("./ownerWindow-BCmJFMbR.cjs"),a=require("./overlayStack-
|
|
1
|
+
"use strict";const u=require("solid-js"),l=require("./ownerWindow-BCmJFMbR.cjs"),a=require("./overlayStack-eD8AmuwY.cjs"),w=require("./keys-GMxY2wcl.cjs");function v(e){const t=()=>l.ownerWindow(e.getTrigger()),g=a.useOverlayRegistration(e.open,"dropdown-list",{type:"popover",element:e.getDropdown,document:()=>{var n;return(n=t())==null?void 0:n.document}}),i=n=>{var d;const o=n.target,r=e.getTrigger(),c=e.getDropdown();r&&!r.contains(o)&&c&&!c.contains(o)&&(e.onClose(),e.restoreFocusOnClickOutside&&((d=e.getTrigger())==null||d.focus()))},s=n=>{var o;!w.isKey(n,"Escape")||!g.isTopmost()||(n.stopPropagation(),e.onClose(),(o=e.getTrigger())==null||o.focus())};u.createEffect(()=>{if(!e.open())return;const n=()=>e.onReposition(),o=t();if(o===null)return;const r=o.document;o.addEventListener("scroll",n,!0),o.addEventListener("resize",n),r.addEventListener("mousedown",i),r.addEventListener("keydown",s),a.notifyOverlayChanged(),u.onCleanup(()=>{o.removeEventListener("scroll",n,!0),o.removeEventListener("resize",n),r.removeEventListener("mousedown",i),r.removeEventListener("keydown",s)})})}exports.useFloatingDropdown=v;
|
|
@@ -4,6 +4,7 @@ import { tooltipCoordinator, } from '../overlay/tooltipCoordinator';
|
|
|
4
4
|
import styles from './Button.module.css.js';
|
|
5
5
|
const VARIANT_CLASS = {
|
|
6
6
|
primary: styles.variantPrimary,
|
|
7
|
+
primarySolid: styles.variantPrimarySolid,
|
|
7
8
|
tonal: styles.variantTonal,
|
|
8
9
|
secondary: styles.variantSecondary,
|
|
9
10
|
danger: styles.variantDanger,
|
|
@@ -11,6 +11,7 @@ export default {
|
|
|
11
11
|
"variantSecondary": "vk_variantSecondary_MA7xu",
|
|
12
12
|
"variantDanger": "vk_variantDanger_L30Uq",
|
|
13
13
|
"variantDangerSolid": "vk_variantDangerSolid_htqc7",
|
|
14
|
+
"variantPrimarySolid": "vk_variantPrimarySolid_14Uwi",
|
|
14
15
|
"variantLink": "vk_variantLink_3AapU",
|
|
15
16
|
"variantGhost": "vk_variantGhost_x0-j-",
|
|
16
17
|
"variantOutline": "vk_variantOutline_xGu8I",
|
|
@@ -2,14 +2,17 @@ import { useFormFieldAria } from './formFieldContext';
|
|
|
2
2
|
import styles from './Slider.module.css.js';
|
|
3
3
|
export const Slider = (props) => {
|
|
4
4
|
const fieldAria = useFormFieldAria();
|
|
5
|
-
const
|
|
5
|
+
const fillRatio = () => {
|
|
6
6
|
const span = props.max - props.min;
|
|
7
7
|
if (span <= 0)
|
|
8
8
|
return 0;
|
|
9
9
|
const clamped = Math.min(Math.max(props.value, props.min), props.max);
|
|
10
|
-
return (
|
|
10
|
+
return (clamped - props.min) / span;
|
|
11
11
|
};
|
|
12
|
-
return (<div class={`${styles.root} ${props.size === 'sm' ? styles.sm : ''} ${props.class ?? ''} ${props.disabled ? styles.disabled : ''}`} style={{
|
|
12
|
+
return (<div class={`${styles.root} ${props.size === 'sm' ? styles.sm : ''} ${props.class ?? ''} ${props.disabled ? styles.disabled : ''}`} style={{
|
|
13
|
+
'--slider-fill': `${fillRatio() * 100}%`,
|
|
14
|
+
'--slider-ratio': `${fillRatio()}`,
|
|
15
|
+
}}>
|
|
13
16
|
<input type="range" id={props.id} class={styles.input} min={props.min} max={props.max} step={props.step ?? 1} value={props.value} disabled={props.disabled} aria-describedby={fieldAria?.describedBy()} aria-label={props.ariaLabel} aria-valuetext={props.ariaValueText} onInput={(event) => props.onInput?.(Number(event.currentTarget.value))} onChange={(event) => props.onChange?.(Number(event.currentTarget.value))}/>
|
|
14
17
|
<div class={styles.track} aria-hidden="true">
|
|
15
18
|
<div class={styles.fill}/>
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { createSignal, createMemo, createComputed, onCleanup, } from 'solid-js';
|
|
1
|
+
import { createSignal, createMemo, createComputed, createRoot, onCleanup, } from 'solid-js';
|
|
2
|
+
import { isServer } from 'solid-js/web';
|
|
2
3
|
const DISMISSAL_ORDER = new Set([
|
|
3
4
|
'modal',
|
|
4
5
|
'menu',
|
|
@@ -250,8 +251,14 @@ export function registerOverlayCondition(condition) {
|
|
|
250
251
|
setCustomConditions((prev) => prev.filter((c) => c !== condition));
|
|
251
252
|
};
|
|
252
253
|
}
|
|
253
|
-
|
|
254
|
-
|
|
254
|
+
function lazyModuleMemo(fn) {
|
|
255
|
+
if (isServer)
|
|
256
|
+
return fn;
|
|
257
|
+
let memo;
|
|
258
|
+
return () => (memo ??= createRoot(() => createMemo(fn)))();
|
|
259
|
+
}
|
|
260
|
+
export const overlayDepth = lazyModuleMemo(() => activeOverlayIds().size);
|
|
261
|
+
export const isAnyOverlayOpen = lazyModuleMemo(() => {
|
|
255
262
|
if (activeOverlayIds().size > 0)
|
|
256
263
|
return true;
|
|
257
264
|
for (const condition of customConditions()) {
|