@vokril/ui-solid 0.40.0 → 0.42.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 +17 -0
- package/README.md +20 -0
- package/dist/{CommandPalette-1XfwrR2D.js → CommandPalette-beMCOs7C.js} +774 -786
- package/dist/CommandPalette-pFMPK8bt.cjs +2 -0
- package/dist/{DateRangePicker-DL1j6ww5.js → DateRangePicker-CYaHRpmb.js} +1 -1
- package/dist/{DateRangePicker-CZddrCVN.cjs → DateRangePicker-DBXYlp78.cjs} +1 -1
- package/dist/{GuidedTour-DzmN3Cfq.js → GuidedTour-5MdUy_iV.js} +1 -1
- package/dist/{GuidedTour-BxmPJE-B.cjs → GuidedTour-BofbTVvV.cjs} +1 -1
- package/dist/{IconPicker-BuQkoRRB.js → IconPicker-BaKZkh0b.js} +1 -1
- package/dist/{IconPicker-xydEBrKw.cjs → IconPicker-DkRBxRGe.cjs} +1 -1
- package/dist/Modal-BNQB6QJ7.cjs +1 -0
- package/dist/Modal-py2JXnwO.js +968 -0
- package/dist/{StatusBarNotificationBell-BIg-eu1Y.cjs → StatusBarNotificationBell-BY9ZiWjy.cjs} +1 -1
- package/dist/{StatusBarNotificationBell-DvKKK9jh.js → StatusBarNotificationBell-DZvIOWcY.js} +4 -4
- package/dist/{ToggleButton-CrVTb5ZP.js → ToggleButton-B2gPFNtU.js} +2 -2
- package/dist/{ToggleButton-sXKMeceC.cjs → ToggleButton-DSdpOk_r.cjs} +1 -1
- package/dist/{createDialogShellFocus-CLuQ1s0l.cjs → createDialogShellFocus--i_cKUN4.cjs} +1 -1
- package/dist/{createDialogShellFocus-GXYQh0Oh.js → createDialogShellFocus-CRX-Qo81.js} +1 -1
- package/dist/{createResizableSidebar-Beu5DVYW.cjs → createResizableSidebar-BEQGesE5.cjs} +1 -1
- package/dist/{createResizableSidebar-BGseZrMh.js → createResizableSidebar-XihHxIXV.js} +2 -2
- package/dist/forms/index.cjs +1 -1
- package/dist/forms/index.js +4 -4
- package/dist/index.cjs +1 -1
- package/dist/index.js +12 -12
- package/dist/layout/index.cjs +1 -1
- package/dist/layout/index.js +1 -1
- package/dist/notifications/index.cjs +1 -1
- package/dist/notifications/index.js +1 -1
- package/dist/overlay/Modal.d.cts +33 -0
- package/dist/overlay/Modal.d.ts +33 -0
- package/dist/overlay/index.cjs +1 -1
- package/dist/overlay/index.js +4 -4
- package/dist/overlay/modalDefaults.d.cts +5 -0
- package/dist/overlay/modalDefaults.d.ts +5 -0
- package/dist/overlay/modalResize.d.cts +50 -0
- package/dist/overlay/modalResize.d.ts +50 -0
- package/dist/server/{CommandPalette-DorJXXoB.js → CommandPalette-CW5Dp8vj.js} +2 -2
- package/dist/server/{CommandPalette-BMwxv_Yy.cjs → CommandPalette-Cr75unDS.cjs} +1 -1
- package/dist/server/{GuidedTour-DhVy485y.js → GuidedTour-Bx6CdHjo.js} +1 -1
- package/dist/server/{GuidedTour-JPHl9qAv.cjs → GuidedTour-DL7UpS21.cjs} +1 -1
- package/dist/server/{IconPicker-bUaMtcMV.js → IconPicker-B2jFVCPZ.js} +2 -2
- package/dist/server/{IconPicker-Xb9VX3Lk.cjs → IconPicker-DMnle5yy.cjs} +1 -1
- package/dist/server/Modal-B-3XihcF.js +771 -0
- package/dist/server/Modal-OLsSdDmR.cjs +1 -0
- package/dist/server/{StatusBarNotificationBell-DzrBLG0C.js → StatusBarNotificationBell-B0cK_tTc.js} +2 -2
- package/dist/server/{StatusBarNotificationBell-CyNRKMtb.cjs → StatusBarNotificationBell-CtTPByqN.cjs} +1 -1
- package/dist/server/{ToggleButton-J-cKrSwa.cjs → ToggleButton-93fdaf-H.cjs} +1 -1
- package/dist/server/{ToggleButton-BTKq5h-y.js → ToggleButton-DqNqIAC0.js} +2 -2
- package/dist/server/{createResizableSidebar-ClRpRZLh.js → createResizableSidebar-CphNgnrU.js} +2 -2
- package/dist/server/{createResizableSidebar-Bukt4w81.cjs → createResizableSidebar-D5mkTix1.cjs} +1 -1
- package/dist/server/forms/index.cjs +1 -1
- package/dist/server/forms/index.js +2 -2
- package/dist/server/{index-CxpRbGi3.cjs → index-DDkjaG5W.cjs} +1 -1
- package/dist/server/{index-BglF6V2r.js → index-cgjP4BDD.js} +2 -2
- package/dist/server/index.cjs +1 -1
- package/dist/server/index.js +8 -8
- package/dist/server/layout/index.cjs +1 -1
- package/dist/server/layout/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 +3 -3
- package/dist/solid/overlay/Modal.jsx +168 -7
- package/dist/solid/overlay/Modal.module.css.js +12 -1
- package/dist/solid/overlay/modalResize.js +49 -0
- package/dist/style.css +1 -1
- package/dist/ui.css +1 -1
- package/package.json +1 -1
- package/dist/CommandPalette-DgoP-6h9.cjs +0 -2
- package/dist/Modal-DospFxAr.js +0 -771
- package/dist/Modal-Dq7OTcoz.cjs +0 -1
- package/dist/server/Modal-CL3mMf3_.js +0 -666
- package/dist/server/Modal-J5LcYq9z.cjs +0 -1
|
@@ -1,666 +0,0 @@
|
|
|
1
|
-
import { ssr as y, ssrAttribute as u, escape as t, createComponent as m, ssrStyle as ae, memo as le, Portal as Ie } from "solid-js/web";
|
|
2
|
-
import { createSignal as W, createUniqueId as J, createMemo as B, createEffect as we, onCleanup as P, Show as $, onMount as G } from "solid-js";
|
|
3
|
-
import { O as Be } from "./Input-D128drd7.js";
|
|
4
|
-
import { b as te, g as Fe } from "./window-CUK6x8Pj.js";
|
|
5
|
-
import { K as Pe, c as Se } from "./mainRealmDom-D514acmj.js";
|
|
6
|
-
import { o as Ve } from "./ownerWindow-9mx_LD47.js";
|
|
7
|
-
import { c as qe } from "./errorHandler-BvPGW-Nm.js";
|
|
8
|
-
import { i as Te } from "./keys-B2nlkpqc.js";
|
|
9
|
-
import { p as Ye, n as je } from "./prefersReducedMotion-qcGrKv14.js";
|
|
10
|
-
import { a as Ue } from "./kitHost-BMMWpU4w.js";
|
|
11
|
-
import { B as oe } from "./Button-BHfCFxcX.js";
|
|
12
|
-
import { O as Xe } from "./OverlayScrollArea-h6G3yk6U.js";
|
|
13
|
-
import { t as R } from "./i18n-DlGM3NSR.js";
|
|
14
|
-
import { u as Ne, h as Ke } from "./overlayStack-Bj6Lg1Rm.js";
|
|
15
|
-
import { r as Ge } from "./Popover-e9JpRh11.js";
|
|
16
|
-
import { c as re } from "./base-BLohC_tW.js";
|
|
17
|
-
import { V as Je } from "./VpClose-1RAQ20H9.js";
|
|
18
|
-
const Ze = 350, _o = 0, be = 300, Qe = 6, et = 8;
|
|
19
|
-
function To(e) {
|
|
20
|
-
const { anchorRect: l, tooltipSize: o, viewport: r } = e, c = e.offset ?? Qe, n = e.margin ?? et, a = e.placement ?? "bottom", g = "bottom" in l && l.bottom !== void 0 ? l.bottom : l.top + l.height, p = "right" in l && l.right !== void 0 ? l.right : l.left + l.width;
|
|
21
|
-
let T = a, x = 0, L = 0;
|
|
22
|
-
if (a === "top" || a === "bottom") {
|
|
23
|
-
if (a === "top") {
|
|
24
|
-
const b = l.top - c - o.height;
|
|
25
|
-
b < n && g + c + o.height <= r.height - n ? (T = "bottom", x = g + c) : x = Math.max(
|
|
26
|
-
n,
|
|
27
|
-
Math.min(b, r.height - o.height - n)
|
|
28
|
-
);
|
|
29
|
-
} else {
|
|
30
|
-
const b = g + c;
|
|
31
|
-
b + o.height > r.height - n && l.top - c - o.height >= n ? (T = "top", x = l.top - c - o.height) : x = Math.max(
|
|
32
|
-
n,
|
|
33
|
-
Math.min(b, r.height - o.height - n)
|
|
34
|
-
);
|
|
35
|
-
}
|
|
36
|
-
const w = l.left + (l.width - o.width) / 2, O = Math.max(
|
|
37
|
-
n,
|
|
38
|
-
r.width - o.width - n
|
|
39
|
-
);
|
|
40
|
-
L = Math.max(n, Math.min(w, O));
|
|
41
|
-
} else {
|
|
42
|
-
if (a === "left") {
|
|
43
|
-
const b = l.left - c - o.width;
|
|
44
|
-
b < n && p + c + o.width <= r.width - n ? (T = "right", L = p + c) : L = Math.max(
|
|
45
|
-
n,
|
|
46
|
-
Math.min(b, r.width - o.width - n)
|
|
47
|
-
);
|
|
48
|
-
} else {
|
|
49
|
-
const b = p + c;
|
|
50
|
-
b + o.width > r.width - n && l.left - c - o.width >= n ? (T = "left", L = l.left - c - o.width) : L = Math.max(
|
|
51
|
-
n,
|
|
52
|
-
Math.min(b, r.width - o.width - n)
|
|
53
|
-
);
|
|
54
|
-
}
|
|
55
|
-
const w = l.top + (l.height - o.height) / 2, O = Math.max(
|
|
56
|
-
n,
|
|
57
|
-
r.height - o.height - n
|
|
58
|
-
);
|
|
59
|
-
x = Math.max(n, Math.min(w, O));
|
|
60
|
-
}
|
|
61
|
-
return { top: x, left: L, placement: T };
|
|
62
|
-
}
|
|
63
|
-
function tt() {
|
|
64
|
-
const [e, l] = W(null);
|
|
65
|
-
let o = !1, r = null, c, n, a = null;
|
|
66
|
-
const g = () => {
|
|
67
|
-
c !== void 0 && (clearTimeout(c), c = void 0);
|
|
68
|
-
}, p = () => {
|
|
69
|
-
n !== void 0 && (clearTimeout(n), n = void 0);
|
|
70
|
-
}, T = () => {
|
|
71
|
-
if (a) {
|
|
72
|
-
try {
|
|
73
|
-
a();
|
|
74
|
-
} catch (i) {
|
|
75
|
-
qe(
|
|
76
|
-
"Window context may already be destroyed or unloaded",
|
|
77
|
-
i
|
|
78
|
-
);
|
|
79
|
-
}
|
|
80
|
-
a = null;
|
|
81
|
-
}
|
|
82
|
-
}, x = (i) => {
|
|
83
|
-
T();
|
|
84
|
-
const s = () => {
|
|
85
|
-
w();
|
|
86
|
-
}, M = (V) => {
|
|
87
|
-
Te(V, "Escape") && e() !== null && (V.stopPropagation(), V.stopImmediatePropagation(), w());
|
|
88
|
-
};
|
|
89
|
-
i.addEventListener("scroll", s, !0), i.addEventListener("pointerdown", s, !0), i.addEventListener("keydown", M, !0), i.addEventListener("blur", s), a = () => {
|
|
90
|
-
i.removeEventListener("scroll", s, !0), i.removeEventListener("pointerdown", s, !0), i.removeEventListener("keydown", M, !0), i.removeEventListener("blur", s);
|
|
91
|
-
};
|
|
92
|
-
}, L = (i) => {
|
|
93
|
-
g(), p(), r = null, o = !0, l(i);
|
|
94
|
-
const s = Ve(i.target);
|
|
95
|
-
if (s === null) {
|
|
96
|
-
T();
|
|
97
|
-
return;
|
|
98
|
-
}
|
|
99
|
-
x(s);
|
|
100
|
-
}, w = () => {
|
|
101
|
-
g(), p(), r = null, o = !1, l(null), T();
|
|
102
|
-
};
|
|
103
|
-
return {
|
|
104
|
-
activeTooltip: e,
|
|
105
|
-
isWarm: () => o,
|
|
106
|
-
showTooltip: (i) => {
|
|
107
|
-
if (!i.content || typeof i.content == "function" && !i.content())
|
|
108
|
-
return;
|
|
109
|
-
p();
|
|
110
|
-
const s = e();
|
|
111
|
-
if (!(s && (s.id === i.id || s.target === i.target)))
|
|
112
|
-
if (o || s !== null)
|
|
113
|
-
L(i);
|
|
114
|
-
else {
|
|
115
|
-
g(), r = i;
|
|
116
|
-
const M = i.delayMs ?? Ze;
|
|
117
|
-
M <= 0 ? L(i) : c = setTimeout(() => {
|
|
118
|
-
r === i && L(i);
|
|
119
|
-
}, M);
|
|
120
|
-
}
|
|
121
|
-
},
|
|
122
|
-
hideTooltip: (i) => {
|
|
123
|
-
if (i !== void 0) {
|
|
124
|
-
r && (typeof i == "string" ? r.id === i : r.target === i) && (g(), r = null);
|
|
125
|
-
const s = e();
|
|
126
|
-
if (s) {
|
|
127
|
-
if (!(typeof i == "string" ? s.id === i : s.target === i))
|
|
128
|
-
return;
|
|
129
|
-
} else
|
|
130
|
-
return;
|
|
131
|
-
}
|
|
132
|
-
g(), r = null, l(null), T(), p(), n = setTimeout(() => {
|
|
133
|
-
o = !1, n = void 0;
|
|
134
|
-
}, be);
|
|
135
|
-
},
|
|
136
|
-
dismissAll: w,
|
|
137
|
-
recordTooltipShown: () => {
|
|
138
|
-
p(), o = !0;
|
|
139
|
-
},
|
|
140
|
-
recordTooltipHidden: () => {
|
|
141
|
-
p(), n = setTimeout(() => {
|
|
142
|
-
o = !1, n = void 0;
|
|
143
|
-
}, be);
|
|
144
|
-
}
|
|
145
|
-
};
|
|
146
|
-
}
|
|
147
|
-
const xe = tt();
|
|
148
|
-
var ot = '<path d="M9 4H4v5m0-5 6 6m5-6h5v5m0-5-6 6M4 15v5h5m-5 0 6-6m10 1v5h-5m5 0-6-6"></path>';
|
|
149
|
-
const nt = /* @__PURE__ */ re({
|
|
150
|
-
name: "VpArrowsMaximize",
|
|
151
|
-
a: {
|
|
152
|
-
fill: "none",
|
|
153
|
-
stroke: "currentColor",
|
|
154
|
-
"stroke-linecap": "round",
|
|
155
|
-
"stroke-linejoin": "round",
|
|
156
|
-
"stroke-width": "2",
|
|
157
|
-
viewBox: "0 0 24 24"
|
|
158
|
-
},
|
|
159
|
-
c: () => y(ot)
|
|
160
|
-
});
|
|
161
|
-
var it = '<path d="M5 10h5V5m0 5L4 4m15 6h-5V5m0 5 6-6M5 14h5v5m0-5-6 6m15-6h-5v5m0-5 6 6"></path>';
|
|
162
|
-
const at = /* @__PURE__ */ re({
|
|
163
|
-
name: "VpArrowsMinimize",
|
|
164
|
-
a: {
|
|
165
|
-
fill: "none",
|
|
166
|
-
stroke: "currentColor",
|
|
167
|
-
"stroke-linecap": "round",
|
|
168
|
-
"stroke-linejoin": "round",
|
|
169
|
-
"stroke-width": "2",
|
|
170
|
-
viewBox: "0 0 24 24"
|
|
171
|
-
},
|
|
172
|
-
c: () => y(it)
|
|
173
|
-
});
|
|
174
|
-
var lt = '<path d="M11 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-6M15 3h6v6m0-6-9 9"></path>';
|
|
175
|
-
const rt = /* @__PURE__ */ re({
|
|
176
|
-
name: "VpExternalLink",
|
|
177
|
-
a: {
|
|
178
|
-
fill: "none",
|
|
179
|
-
stroke: "currentColor",
|
|
180
|
-
"stroke-linecap": "round",
|
|
181
|
-
"stroke-linejoin": "round",
|
|
182
|
-
"stroke-width": "2",
|
|
183
|
-
viewBox: "0 0 24 24"
|
|
184
|
-
},
|
|
185
|
-
c: () => y(lt)
|
|
186
|
-
}), st = "vk_trigger_--BjF", dt = "vk_tooltip_eJQhN", ct = "vk_hostTooltip_vLrNc", mt = "vk_tooltipInner_AyPkl", ne = {
|
|
187
|
-
trigger: st,
|
|
188
|
-
tooltip: dt,
|
|
189
|
-
hostTooltip: ct,
|
|
190
|
-
tooltipInner: mt
|
|
191
|
-
}, ut = 12, _e = 16, j = 8, ht = 620;
|
|
192
|
-
function ft(e) {
|
|
193
|
-
const l = e.tooltipWidth ?? ht, o = e.tooltipWidth === void 0 ? e.viewportWidth : e.viewportWidth - j, r = Math.min(
|
|
194
|
-
e.pointerX + ut,
|
|
195
|
-
o - l
|
|
196
|
-
), c = Math.max(j, r), n = e.pointerY + _e, a = e.tooltipHeight ?? 0, g = e.viewportHeight === void 0 ? n : Math.max(
|
|
197
|
-
j,
|
|
198
|
-
e.viewportHeight - a - j
|
|
199
|
-
), p = e.aboveY === void 0 ? n : e.aboveY - a - _e, T = e.viewportHeight !== void 0 && n > g ? Math.max(j, Math.min(p, g)) : Math.max(j, Math.min(n, g));
|
|
200
|
-
return { left: c, top: T };
|
|
201
|
-
}
|
|
202
|
-
var gt = ["<span", ">", "</span>"], vt = ["<div", "><span>", "</span>", "</div>"], pt = ["<div", ' role="tooltip" style="', '">', "</div>"];
|
|
203
|
-
const wt = 1e3;
|
|
204
|
-
function yo(e) {
|
|
205
|
-
const l = J(), [o, r] = W(!1), [c, n] = W({
|
|
206
|
-
x: 0,
|
|
207
|
-
y: 0
|
|
208
|
-
}), [a, g] = W(), [p, T] = W({
|
|
209
|
-
width: 0,
|
|
210
|
-
height: 0
|
|
211
|
-
}), [x, L] = W(!1);
|
|
212
|
-
let w, O;
|
|
213
|
-
const b = () => te(w), S = B(() => e.content);
|
|
214
|
-
return B(() => e.delayMs ?? wt), we(() => {
|
|
215
|
-
xe.activeTooltip() && o() && r(!1);
|
|
216
|
-
}), we(() => {
|
|
217
|
-
if (!o()) return;
|
|
218
|
-
const D = () => {
|
|
219
|
-
r(!1);
|
|
220
|
-
}, i = (M) => {
|
|
221
|
-
Te(M, "Escape") && (M.stopPropagation(), M.stopImmediatePropagation(), r(!1), xe.dismissAll());
|
|
222
|
-
}, s = te(w);
|
|
223
|
-
s.addEventListener("scroll", D, !0), s.addEventListener("resize", D), s.addEventListener("keydown", i, !0), P(() => {
|
|
224
|
-
s.removeEventListener("scroll", D, !0), s.removeEventListener("resize", D), s.removeEventListener("keydown", i, !0);
|
|
225
|
-
});
|
|
226
|
-
}), P(() => {
|
|
227
|
-
}), [y(gt, u("class", t(ne.trigger, !0), !1) + u("tabindex", x() ? t(void 0, !0) : 0, !1) + u("aria-describedby", o() ? t(l, !0) : t(void 0, !0), !1), t(e.children)), m($, {
|
|
228
|
-
get when() {
|
|
229
|
-
return le(() => !!o())() && S();
|
|
230
|
-
},
|
|
231
|
-
get children() {
|
|
232
|
-
return m(Be, {
|
|
233
|
-
type: "tooltip",
|
|
234
|
-
get mount() {
|
|
235
|
-
return te(w).document.body;
|
|
236
|
-
},
|
|
237
|
-
element: () => O,
|
|
238
|
-
idPrefix: "hover-tooltip",
|
|
239
|
-
get children() {
|
|
240
|
-
return y(pt, u("class", t(ne.tooltip, !0), !1) + u("id", t(l, !0), !1), ae((() => {
|
|
241
|
-
const D = a(), i = ft({
|
|
242
|
-
pointerX: c().x,
|
|
243
|
-
pointerY: c().y,
|
|
244
|
-
viewportWidth: b().innerWidth,
|
|
245
|
-
viewportHeight: b().innerHeight,
|
|
246
|
-
tooltipWidth: p().width,
|
|
247
|
-
tooltipHeight: p().height,
|
|
248
|
-
...D !== void 0 ? {
|
|
249
|
-
aboveY: D
|
|
250
|
-
} : {}
|
|
251
|
-
});
|
|
252
|
-
return {
|
|
253
|
-
top: `${i.top}px`,
|
|
254
|
-
left: `${i.left}px`
|
|
255
|
-
};
|
|
256
|
-
})()), t(m($, {
|
|
257
|
-
get when() {
|
|
258
|
-
return e.shortcut;
|
|
259
|
-
},
|
|
260
|
-
get fallback() {
|
|
261
|
-
return S();
|
|
262
|
-
},
|
|
263
|
-
get children() {
|
|
264
|
-
return y(vt, u("class", t(ne.tooltipInner, !0), !1), t(S()), t(m(Pe, {
|
|
265
|
-
size: "xs",
|
|
266
|
-
get shortcut() {
|
|
267
|
-
return e.shortcut;
|
|
268
|
-
}
|
|
269
|
-
})));
|
|
270
|
-
}
|
|
271
|
-
})));
|
|
272
|
-
}
|
|
273
|
-
});
|
|
274
|
-
}
|
|
275
|
-
})];
|
|
276
|
-
}
|
|
277
|
-
const bt = "2.875rem", xt = "data-modal-titlebar-probe";
|
|
278
|
-
function _t(e, l) {
|
|
279
|
-
const o = Se("div");
|
|
280
|
-
o.setAttribute(xt, ""), o.style.cssText = `position:absolute;top:0;left:0;width:0;visibility:hidden;pointer-events:none;height:var(--modal-maximize-inset, ${bt})`, (l != null && l.isConnected ? l : e.body ?? e.documentElement).append(o);
|
|
281
|
-
try {
|
|
282
|
-
return o.getBoundingClientRect().height;
|
|
283
|
-
} finally {
|
|
284
|
-
o.remove();
|
|
285
|
-
}
|
|
286
|
-
}
|
|
287
|
-
const Tt = "vk_place_5Cs4j", yt = "vk_placeLabel_ZwMrw", Mt = "vk_placeValue_EWbq8", U = {
|
|
288
|
-
place: Tt,
|
|
289
|
-
placeLabel: yt,
|
|
290
|
-
placeValue: Mt
|
|
291
|
-
};
|
|
292
|
-
var Et = ["<dl", " data-dangerous-place><dt", ">", "</dt><dd", ' data-place="connection">', "</dd>", "</dl>"], kt = ["<dt", ">", "</dt>"], Lt = ["<dd", ' data-place="database">', "</dd>"];
|
|
293
|
-
function Ot(e) {
|
|
294
|
-
return y(Et, u("id", t(e.id, !0), !1) + u("class", t(U.place, !0), !1), u("class", t(U.placeLabel, !0), !1), t(R("Connection")), u("class", t(U.placeValue, !0), !1), t(e.place.connection), t(m($, {
|
|
295
|
-
get when() {
|
|
296
|
-
return e.place.database;
|
|
297
|
-
},
|
|
298
|
-
children: (l) => [y(kt, u("class", t(U.placeLabel, !0), !1), t(R("Database"))), y(Lt, u("class", t(U.placeValue, !0), !1), t(l()))]
|
|
299
|
-
})));
|
|
300
|
-
}
|
|
301
|
-
const Dt = "vk_modalOverlay_53kKZ", Ct = "vk_modalOverlayExiting_x-xU-", $t = "vk_modal_ZqkLW", Ht = "vk_modalEntering_hQj2V", zt = "vk_modalExiting_qiJ02", At = "vk_modalDragged_tiDIq", Wt = "vk_modalOverlayMaximized_00k68", Rt = "vk_modalMaximized_iL0gq", It = "vk_modalOverlayEmbedded_kz22G", Bt = "vk_modalEmbedded_uaq4K", Ft = "vk_modalHeader_fiwar", Pt = "vk_modalFooter_PqFE4", St = "vk_modalBodyScroll_XIHnt", Vt = "vk_modalHeaderDraggable_XVN7l", qt = "vk_modalHeaderDragging_AfuEb", Yt = "vk_modalTitle_jdWEj vk_titleLg_Iswm3", jt = "vk_modalTitleWrap_IW3-y", Ut = "vk_modalTitleContent_x5Np7", Xt = "vk_modalSubtitle_Is6W0", Nt = "vk_modalPlace_3FEgX", Kt = "vk_modalHeaderActions_uUFCL", Gt = "vk_modalBody_EJ4Kr", h = {
|
|
302
|
-
modalOverlay: Dt,
|
|
303
|
-
modalOverlayExiting: Ct,
|
|
304
|
-
modal: $t,
|
|
305
|
-
modalEntering: Ht,
|
|
306
|
-
modalExiting: zt,
|
|
307
|
-
modalDragged: At,
|
|
308
|
-
modalOverlayMaximized: Wt,
|
|
309
|
-
modalMaximized: Rt,
|
|
310
|
-
modalOverlayEmbedded: It,
|
|
311
|
-
modalEmbedded: Bt,
|
|
312
|
-
modalHeader: Ft,
|
|
313
|
-
modalFooter: Pt,
|
|
314
|
-
modalBodyScroll: St,
|
|
315
|
-
modalHeaderDraggable: Vt,
|
|
316
|
-
modalHeaderDragging: qt,
|
|
317
|
-
modalTitle: Yt,
|
|
318
|
-
modalTitleWrap: jt,
|
|
319
|
-
modalTitleContent: Ut,
|
|
320
|
-
modalSubtitle: Xt,
|
|
321
|
-
modalPlace: Nt,
|
|
322
|
-
modalHeaderActions: Kt,
|
|
323
|
-
modalBody: Gt
|
|
324
|
-
};
|
|
325
|
-
var Jt = ["<h3", ">", "</h3>"], Zt = ["<p", ">", "</p>"], ie = ["<div", ">", "</div>"], Qt = ['<div class="', '" style="', '" tabindex="-1">', '<div class="', '" style="', '" role="dialog" aria-modal="true"', ' tabindex="-1"><div class="', '"><div', ">", "", "</div><div", ">", "", "", "</div></div>", "", "", "</div></div>"];
|
|
326
|
-
function Mo(e) {
|
|
327
|
-
const l = Ue(), o = B(() => !!e.embedded), r = B(() => !!e.closeDisabled), c = B((_) => o() || !e.open() ? null : _ ?? e.hostDocument ?? Fe().document, null);
|
|
328
|
-
let n = null, a = null;
|
|
329
|
-
const g = () => a != null && a.isConnected ? a.ownerDocument : c(), p = Ne(() => !o() && e.open(), "modal", {
|
|
330
|
-
type: "modal",
|
|
331
|
-
element: () => a != null && a.isConnected ? a : null,
|
|
332
|
-
document: () => c() ?? void 0
|
|
333
|
-
}), T = () => {
|
|
334
|
-
if (!o()) return p.isTopmost();
|
|
335
|
-
const _ = g();
|
|
336
|
-
return _ !== null && !Ke(_);
|
|
337
|
-
};
|
|
338
|
-
let x;
|
|
339
|
-
const L = () => x == null ? void 0 : x();
|
|
340
|
-
let w = null, O = null;
|
|
341
|
-
const b = () => {
|
|
342
|
-
o() || a === null || (w = je(a));
|
|
343
|
-
}, S = () => {
|
|
344
|
-
var _, H;
|
|
345
|
-
w == null || w(), w = null, n != null && n.isConnected && typeof n.focus == "function" && n.focus(), e.focusFallback && O !== null && O.activeElement !== n && ((_ = e.focusFallback()) == null || _.focus()), e.focusFallback && O !== null && O.activeElement === O.body && ((H = e.focusFallback()) == null || H.focus()), n = null, O = null, a = null;
|
|
346
|
-
}, D = J(), i = J(), s = J(), M = () => {
|
|
347
|
-
const _ = [...e.subtitle ? [i] : [], ...e.place ? [s] : []];
|
|
348
|
-
return _.length > 0 ? _.join(" ") : void 0;
|
|
349
|
-
}, V = () => {
|
|
350
|
-
G(b), P(S), G(() => {
|
|
351
|
-
var f;
|
|
352
|
-
const d = (f = g()) == null ? void 0 : f.defaultView;
|
|
353
|
-
if (!d) return;
|
|
354
|
-
const A = () => {
|
|
355
|
-
T();
|
|
356
|
-
};
|
|
357
|
-
d.addEventListener("mousedown", A, !0), P(() => d.removeEventListener("mousedown", A, !0));
|
|
358
|
-
});
|
|
359
|
-
const _ = () => {
|
|
360
|
-
const d = g();
|
|
361
|
-
return d !== null && Ye(d);
|
|
362
|
-
}, [H, ye] = W(!1);
|
|
363
|
-
let q, Z = !1, se = !1;
|
|
364
|
-
const de = () => {
|
|
365
|
-
se || !Z || (se = !0, q !== void 0 && clearTimeout(q), q = void 0, e.onClose());
|
|
366
|
-
};
|
|
367
|
-
x = () => {
|
|
368
|
-
if (!(r() || Z)) {
|
|
369
|
-
if (Z = !0, ue(), X(), o() || _()) {
|
|
370
|
-
de();
|
|
371
|
-
return;
|
|
372
|
-
}
|
|
373
|
-
ye(!0), q = setTimeout(de, 120);
|
|
374
|
-
}
|
|
375
|
-
}, P(() => {
|
|
376
|
-
x = void 0, q !== void 0 && clearTimeout(q);
|
|
377
|
-
});
|
|
378
|
-
const [Q, Me] = W(!o() && !_());
|
|
379
|
-
let F;
|
|
380
|
-
const X = () => {
|
|
381
|
-
F !== void 0 && (clearTimeout(F), F = void 0), Q() && Me(!1);
|
|
382
|
-
};
|
|
383
|
-
G(() => {
|
|
384
|
-
Q() && (F = setTimeout(X, 200));
|
|
385
|
-
}), P(() => {
|
|
386
|
-
F !== void 0 && (clearTimeout(F), F = void 0);
|
|
387
|
-
});
|
|
388
|
-
const [C, Ee] = W(!1), [N, ce] = W({
|
|
389
|
-
x: 0,
|
|
390
|
-
y: 0
|
|
391
|
-
}), [me, eo] = W(!1), ee = B(() => !o() && (e.allowMaximize ?? !0)), ke = B(() => !o() && !H() && !C() && (e.allowDrag ?? !0)), Le = B(() => !o() && !H() && C() && ee() && (e.allowDrag ?? !0) && (e.allowMaximizedDrag ?? l.allowMaximizedDrag ?? !0));
|
|
392
|
-
let K = null;
|
|
393
|
-
const ue = () => {
|
|
394
|
-
K == null || K(), K = null;
|
|
395
|
-
}, Oe = () => {
|
|
396
|
-
if (!ee() || r() || H()) return;
|
|
397
|
-
X();
|
|
398
|
-
const d = C(), A = typeof (a == null ? void 0 : a.animate) == "function" && !_(), f = A && a ? a.getBoundingClientRect() : null;
|
|
399
|
-
if (Ee(!d), A && a && f && f.width > 0 && f.height > 0) {
|
|
400
|
-
const E = a;
|
|
401
|
-
Ge(E, () => {
|
|
402
|
-
if (a !== E || H()) return;
|
|
403
|
-
const v = E.getBoundingClientRect();
|
|
404
|
-
if (v.width > 0 && v.height > 0) {
|
|
405
|
-
const k = f.left - v.left, z = f.top - v.top, Y = f.width / v.width, I = f.height / v.height;
|
|
406
|
-
E.animate([{
|
|
407
|
-
transformOrigin: "top left",
|
|
408
|
-
transform: `translate(${k}px, ${z}px) scale(${Y}, ${I})`,
|
|
409
|
-
borderRadius: d ? "0px" : "var(--radius-xl)"
|
|
410
|
-
}, {
|
|
411
|
-
transformOrigin: "top left",
|
|
412
|
-
transform: "translate(0px, 0px) scale(1, 1)",
|
|
413
|
-
borderRadius: d ? "var(--radius-xl)" : "0px"
|
|
414
|
-
}], {
|
|
415
|
-
duration: d ? 240 : 280,
|
|
416
|
-
easing: "cubic-bezier(0.16, 1, 0.3, 1)",
|
|
417
|
-
fill: "none"
|
|
418
|
-
});
|
|
419
|
-
}
|
|
420
|
-
});
|
|
421
|
-
}
|
|
422
|
-
if (d && a) {
|
|
423
|
-
const E = a;
|
|
424
|
-
queueMicrotask(() => {
|
|
425
|
-
if (a !== E || C() || H()) return;
|
|
426
|
-
const v = E.ownerDocument.defaultView;
|
|
427
|
-
if (v === null) return;
|
|
428
|
-
const k = N(), z = E.getBoundingClientRect(), Y = {
|
|
429
|
-
left: z.left - k.x,
|
|
430
|
-
top: z.top - k.y,
|
|
431
|
-
width: z.width,
|
|
432
|
-
height: z.height
|
|
433
|
-
};
|
|
434
|
-
ce(fe(k.x, k.y, Y, v, 44, he(v)));
|
|
435
|
-
});
|
|
436
|
-
}
|
|
437
|
-
}, he = (d) => _t(d.document, void 0), fe = (d, A, f, E, v, k) => {
|
|
438
|
-
const z = E.innerWidth, Y = E.innerHeight, I = f.width > 0 ? f.width : 500, ge = f.width > 0 ? f.left : (z - I) / 2, ve = f.height > 0 ? f.top : k + 16, De = v, Ce = Math.min(0, z - I), $e = Math.max(0, z - I), He = ge + d, ze = Math.min(Math.max(He, Ce), $e) - ge, pe = k, Ae = Math.max(pe, Y - De), We = ve + A, Re = Math.min(Math.max(We, pe), Ae) - ve;
|
|
439
|
-
return {
|
|
440
|
-
x: ze,
|
|
441
|
-
y: Re
|
|
442
|
-
};
|
|
443
|
-
};
|
|
444
|
-
return G(() => {
|
|
445
|
-
var E;
|
|
446
|
-
const d = (E = g()) == null ? void 0 : E.defaultView;
|
|
447
|
-
if (!d) return;
|
|
448
|
-
const A = () => {
|
|
449
|
-
if (C() || H() || o() || !a) return;
|
|
450
|
-
X();
|
|
451
|
-
const v = N(), k = a.getBoundingClientRect(), z = {
|
|
452
|
-
left: k.left - v.x,
|
|
453
|
-
top: k.top - v.y,
|
|
454
|
-
width: k.width,
|
|
455
|
-
height: k.height
|
|
456
|
-
}, I = fe(v.x, v.y, z, d, 44, he(d));
|
|
457
|
-
(I.x !== v.x || I.y !== v.y) && ce(I);
|
|
458
|
-
};
|
|
459
|
-
d.addEventListener("resize", A);
|
|
460
|
-
const f = new MutationObserver(A);
|
|
461
|
-
f.observe(d.document.documentElement, {
|
|
462
|
-
attributes: !0,
|
|
463
|
-
attributeFilter: ["style", "class"]
|
|
464
|
-
}), P(() => {
|
|
465
|
-
d.removeEventListener("resize", A), f.disconnect(), ue();
|
|
466
|
-
});
|
|
467
|
-
}), y(Qt, `${o() ? t(h.modalOverlayEmbedded, !0) : t(h.modalOverlay, !0)} ${C() ? t(h.modalOverlayMaximized, !0) : ""} ${H() ? t(h.modalOverlayExiting, !0) : ""}`, ae({
|
|
468
|
-
...e.transparentBackdrop ? {
|
|
469
|
-
background: "transparent"
|
|
470
|
-
} : {},
|
|
471
|
-
...e.maximizeInset !== void 0 ? {
|
|
472
|
-
"--modal-maximize-inset": e.maximizeInset
|
|
473
|
-
} : {}
|
|
474
|
-
}), t(e.decoration), `${t(h.modal, !0)} ${o() ? t(h.modalEmbedded, !0) : ""} ${Q() && !H() ? t(h.modalEntering, !0) : ""} ${C() ? t(h.modalMaximized, !0) : ""} ${me() ? t(h.modalDragged, !0) : ""} ${H() ? t(h.modalExiting, !0) : ""}`, ae({
|
|
475
|
-
...o() ? void 0 : {
|
|
476
|
-
"max-width": C() ? "100%" : e.maxWidth ?? "32rem"
|
|
477
|
-
},
|
|
478
|
-
...e.dialogStyle,
|
|
479
|
-
"--modal-drag-x": `${C() || o() ? 0 : N().x}px`,
|
|
480
|
-
"--modal-drag-y": `${C() || o() ? 0 : N().y}px`
|
|
481
|
-
}), u("aria-labelledby", t(D, !0), !1) + u("aria-describedby", t(M(), !0), !1), `${t(h.modalHeader, !0)} ${// A header that drags the modal — restored, or maximized and pullable off the top — is a drag handle:
|
|
482
|
-
// the grab cursor, and `touch-action: none` so a touch pointer drags it instead of panning the page.
|
|
483
|
-
ke() || Le() ? me() ? t(h.modalHeaderDragging, !0) : t(h.modalHeaderDraggable, !0) : ""}`, u("class", t(h.modalTitleWrap, !0), !1), t(m($, {
|
|
484
|
-
get when() {
|
|
485
|
-
return typeof e.title == "string";
|
|
486
|
-
},
|
|
487
|
-
get fallback() {
|
|
488
|
-
return y(ie, u("id", t(D, !0), !1) + u("class", t(h.modalTitleContent, !0), !1), t(e.title));
|
|
489
|
-
},
|
|
490
|
-
get children() {
|
|
491
|
-
return y(Jt, u("id", t(D, !0), !1) + u("class", t(h.modalTitle, !0), !1), t(e.title));
|
|
492
|
-
}
|
|
493
|
-
})), t(m($, {
|
|
494
|
-
get when() {
|
|
495
|
-
return e.subtitle;
|
|
496
|
-
},
|
|
497
|
-
get children() {
|
|
498
|
-
return y(Zt, u("id", t(i, !0), !1) + u("class", t(h.modalSubtitle, !0), !1), t(e.subtitle));
|
|
499
|
-
}
|
|
500
|
-
})), u("class", t(h.modalHeaderActions, !0), !1), t(m($, {
|
|
501
|
-
get when() {
|
|
502
|
-
return e.onDetach;
|
|
503
|
-
},
|
|
504
|
-
get children() {
|
|
505
|
-
return m(oe, {
|
|
506
|
-
size: "sm",
|
|
507
|
-
variant: "ghost",
|
|
508
|
-
iconOnly: !0,
|
|
509
|
-
onClick: () => {
|
|
510
|
-
var d;
|
|
511
|
-
return (d = e.onDetach) == null ? void 0 : d.call(e);
|
|
512
|
-
},
|
|
513
|
-
get disabled() {
|
|
514
|
-
return r();
|
|
515
|
-
},
|
|
516
|
-
get title() {
|
|
517
|
-
return R("Open in new window");
|
|
518
|
-
},
|
|
519
|
-
get "aria-label"() {
|
|
520
|
-
return R("Open in new window");
|
|
521
|
-
},
|
|
522
|
-
get children() {
|
|
523
|
-
return m(rt, {});
|
|
524
|
-
}
|
|
525
|
-
});
|
|
526
|
-
}
|
|
527
|
-
})), t(m($, {
|
|
528
|
-
get when() {
|
|
529
|
-
return ee();
|
|
530
|
-
},
|
|
531
|
-
get children() {
|
|
532
|
-
return m(oe, {
|
|
533
|
-
size: "sm",
|
|
534
|
-
variant: "ghost",
|
|
535
|
-
iconOnly: !0,
|
|
536
|
-
onClick: Oe,
|
|
537
|
-
get disabled() {
|
|
538
|
-
return r();
|
|
539
|
-
},
|
|
540
|
-
get title() {
|
|
541
|
-
return le(() => !!C())() ? R("Restore") : R("Maximize");
|
|
542
|
-
},
|
|
543
|
-
get "aria-label"() {
|
|
544
|
-
return le(() => !!C())() ? R("Restore") : R("Maximize");
|
|
545
|
-
},
|
|
546
|
-
get children() {
|
|
547
|
-
return m($, {
|
|
548
|
-
get when() {
|
|
549
|
-
return C();
|
|
550
|
-
},
|
|
551
|
-
get fallback() {
|
|
552
|
-
return m(nt, {});
|
|
553
|
-
},
|
|
554
|
-
get children() {
|
|
555
|
-
return m(at, {});
|
|
556
|
-
}
|
|
557
|
-
});
|
|
558
|
-
}
|
|
559
|
-
});
|
|
560
|
-
}
|
|
561
|
-
})), t(m($, {
|
|
562
|
-
get when() {
|
|
563
|
-
return !e.hideClose;
|
|
564
|
-
},
|
|
565
|
-
get children() {
|
|
566
|
-
return m(oe, {
|
|
567
|
-
size: "sm",
|
|
568
|
-
variant: "ghost",
|
|
569
|
-
iconOnly: !0,
|
|
570
|
-
onClick: L,
|
|
571
|
-
get disabled() {
|
|
572
|
-
return r();
|
|
573
|
-
},
|
|
574
|
-
get title() {
|
|
575
|
-
return R("Close");
|
|
576
|
-
},
|
|
577
|
-
get "aria-label"() {
|
|
578
|
-
return R("Close");
|
|
579
|
-
},
|
|
580
|
-
get children() {
|
|
581
|
-
return m(Je, {});
|
|
582
|
-
}
|
|
583
|
-
});
|
|
584
|
-
}
|
|
585
|
-
})), t(m($, {
|
|
586
|
-
get when() {
|
|
587
|
-
return e.place;
|
|
588
|
-
},
|
|
589
|
-
children: (d) => y(ie, u("class", t(h.modalPlace, !0), !1), t(m(Ot, {
|
|
590
|
-
id: s,
|
|
591
|
-
get place() {
|
|
592
|
-
return d();
|
|
593
|
-
}
|
|
594
|
-
})))
|
|
595
|
-
})), t(m(Xe, {
|
|
596
|
-
get rootClass() {
|
|
597
|
-
return h.modalBodyScroll;
|
|
598
|
-
},
|
|
599
|
-
get viewportClass() {
|
|
600
|
-
return h.modalBody;
|
|
601
|
-
},
|
|
602
|
-
get children() {
|
|
603
|
-
return e.children;
|
|
604
|
-
}
|
|
605
|
-
})), t(m($, {
|
|
606
|
-
get when() {
|
|
607
|
-
return e.footer;
|
|
608
|
-
},
|
|
609
|
-
get children() {
|
|
610
|
-
return y(ie, u("class", t(h.modalFooter, !0), !1), t(e.footer));
|
|
611
|
-
}
|
|
612
|
-
})));
|
|
613
|
-
};
|
|
614
|
-
return (
|
|
615
|
-
// Embedded fills its aux-window container 1:1 — render in place. The overlay path
|
|
616
|
-
// portals to the body of the document it opened in (reference: the active container
|
|
617
|
-
// at show time), so a modal triggered while a detached / aux window is focused covers
|
|
618
|
-
// THAT window, not main.
|
|
619
|
-
m($, {
|
|
620
|
-
get when() {
|
|
621
|
-
return !o();
|
|
622
|
-
},
|
|
623
|
-
get fallback() {
|
|
624
|
-
return V();
|
|
625
|
-
},
|
|
626
|
-
get children() {
|
|
627
|
-
return m($, {
|
|
628
|
-
get when() {
|
|
629
|
-
return c();
|
|
630
|
-
},
|
|
631
|
-
children: (_) => m(Ie, {
|
|
632
|
-
get mount() {
|
|
633
|
-
return _().body;
|
|
634
|
-
},
|
|
635
|
-
get children() {
|
|
636
|
-
return V();
|
|
637
|
-
}
|
|
638
|
-
})
|
|
639
|
-
});
|
|
640
|
-
}
|
|
641
|
-
})
|
|
642
|
-
);
|
|
643
|
-
}
|
|
644
|
-
export {
|
|
645
|
-
Ot as A,
|
|
646
|
-
Ze as C,
|
|
647
|
-
et as D,
|
|
648
|
-
yo as H,
|
|
649
|
-
Mo as M,
|
|
650
|
-
ut as T,
|
|
651
|
-
at as V,
|
|
652
|
-
_o as W,
|
|
653
|
-
be as a,
|
|
654
|
-
Qe as b,
|
|
655
|
-
_e as c,
|
|
656
|
-
ht as d,
|
|
657
|
-
j as e,
|
|
658
|
-
To as f,
|
|
659
|
-
ft as g,
|
|
660
|
-
tt as h,
|
|
661
|
-
nt as i,
|
|
662
|
-
rt as j,
|
|
663
|
-
_t as m,
|
|
664
|
-
ne as s,
|
|
665
|
-
xe as t
|
|
666
|
-
};
|