sprintify-ui 0.0.89 → 0.0.90
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/dist/sprintify-ui.es.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import Sl from "axios";
|
|
2
|
-
import { defineComponent as H, inject as ke, resolveComponent as _e, openBlock as b, createBlock as te, withCtx as U, createElementVNode as v, normalizeClass as N, withModifiers as Ge, renderSlot as Q, createElementBlock as T, createCommentVNode as K, toDisplayString as G, h as
|
|
2
|
+
import { defineComponent as H, inject as ke, resolveComponent as _e, openBlock as b, createBlock as te, withCtx as U, createElementVNode as v, normalizeClass as N, withModifiers as Ge, renderSlot as Q, createElementBlock as T, createCommentVNode as K, toDisplayString as G, h as Ee, unref as h, computed as C, ref as D, watch as Ae, Teleport as Et, createVNode as R, Transition as Re, TransitionGroup as Hr, Fragment as he, renderList as we, normalizeStyle as De, onMounted as xe, onBeforeMount as $l, withDirectives as Ne, vShow as tt, normalizeProps as Ze, guardReactiveProps as Xe, mergeProps as st, resolveDynamicComponent as Nt, createTextVNode as Ue, onBeforeUnmount as qt, cloneVNode as Bl, provide as ye, watchEffect as He, nextTick as qe, onUnmounted as ot, reactive as Cl, isRef as jt, withKeys as An, vModelText as Tn, useSlots as _l, createStaticVNode as Kr, getCurrentInstance as Il, pushScopeId as El, popScopeId as Al, createSlots as Tl, vModelSelect as Sn, readonly as on } from "vue";
|
|
3
3
|
import { useI18n as nt, createI18n as Ll } from "vue-i18n";
|
|
4
4
|
import { defineStore as Xn } from "pinia";
|
|
5
5
|
import xr from "qs";
|
|
@@ -1212,7 +1212,7 @@ const Fr = (e, r) => {
|
|
|
1212
1212
|
...i
|
|
1213
1213
|
}, Object.assign(l, f);
|
|
1214
1214
|
let M = 0, w = r.id;
|
|
1215
|
-
return typeof w == "string" && (w = w.replace(/-/g, "_")), l.innerHTML = ia(m.body, w ? () => w + "ID" + M++ : "iconifyVue"),
|
|
1215
|
+
return typeof w == "string" && (w = w.replace(/-/g, "_")), l.innerHTML = ia(m.body, w ? () => w + "ID" + M++ : "iconifyVue"), Ee("svg", l);
|
|
1216
1216
|
}
|
|
1217
1217
|
const { body: k, width: y, height: E } = e, L = o === "mask" || (o === "bg" ? !1 : k.indexOf("currentColor") !== -1), $ = Pa(k, {
|
|
1218
1218
|
...f,
|
|
@@ -1227,7 +1227,7 @@ const Fr = (e, r) => {
|
|
|
1227
1227
|
...za,
|
|
1228
1228
|
...L ? Vn : co,
|
|
1229
1229
|
...i
|
|
1230
|
-
},
|
|
1230
|
+
}, Ee("span", l);
|
|
1231
1231
|
};
|
|
1232
1232
|
Xr(!0);
|
|
1233
1233
|
ua("", ga);
|
|
@@ -1586,7 +1586,7 @@ var Ja = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : t
|
|
|
1586
1586
|
}), o.d(l, "addLockableTarget", function() {
|
|
1587
1587
|
return me;
|
|
1588
1588
|
}), o.d(l, "addLockableSelector", function() {
|
|
1589
|
-
return
|
|
1589
|
+
return Ie;
|
|
1590
1590
|
}), o.d(l, "setFillGapMethod", function() {
|
|
1591
1591
|
return oe;
|
|
1592
1592
|
}), o.d(l, "addFillGapTarget", function() {
|
|
@@ -1701,7 +1701,7 @@ var Ja = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : t
|
|
|
1701
1701
|
});
|
|
1702
1702
|
}), j() || x();
|
|
1703
1703
|
}
|
|
1704
|
-
},
|
|
1704
|
+
}, Ie = function(B) {
|
|
1705
1705
|
if (B) {
|
|
1706
1706
|
var Z = a(B);
|
|
1707
1707
|
Z.map(function(ae) {
|
|
@@ -1722,7 +1722,7 @@ Available fill gap methods: `).concat(Z, "."));
|
|
|
1722
1722
|
var Z = a(B);
|
|
1723
1723
|
Z.map(function(ae) {
|
|
1724
1724
|
m(ae, function(ue) {
|
|
1725
|
-
s(ue) ? (ue.setAttribute("data-scroll-lock-fill-gap", ""), d.scroll ||
|
|
1725
|
+
s(ue) ? (ue.setAttribute("data-scroll-lock-fill-gap", ""), d.scroll || Te(ue)) : f('"'.concat(ue, '" is not a Element.'));
|
|
1726
1726
|
});
|
|
1727
1727
|
});
|
|
1728
1728
|
}
|
|
@@ -1748,7 +1748,7 @@ Available fill gap methods: `).concat(Z, "."));
|
|
|
1748
1748
|
Z.map(function(ae) {
|
|
1749
1749
|
d.fillGapSelectors = d.fillGapSelectors.filter(function(ue) {
|
|
1750
1750
|
return ue !== ae;
|
|
1751
|
-
}), d.scroll ||
|
|
1751
|
+
}), d.scroll || Oe(ae);
|
|
1752
1752
|
});
|
|
1753
1753
|
}
|
|
1754
1754
|
}, u = function() {
|
|
@@ -1782,14 +1782,14 @@ Available fill gap methods: `).concat(Z, "."));
|
|
|
1782
1782
|
});
|
|
1783
1783
|
}, pe = function() {
|
|
1784
1784
|
d.fillGapSelectors.map(function(B) {
|
|
1785
|
-
|
|
1785
|
+
Oe(B);
|
|
1786
1786
|
});
|
|
1787
1787
|
}, je = function(B) {
|
|
1788
1788
|
var Z = document.querySelectorAll(B), ae = d.lockableSelectors.indexOf(B) !== -1;
|
|
1789
1789
|
m(Z, function(ue) {
|
|
1790
|
-
|
|
1790
|
+
Te(ue, ae);
|
|
1791
1791
|
});
|
|
1792
|
-
},
|
|
1792
|
+
}, Te = function(B) {
|
|
1793
1793
|
var Z = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1;
|
|
1794
1794
|
if (s(B)) {
|
|
1795
1795
|
var ae;
|
|
@@ -1813,7 +1813,7 @@ Available fill gap methods: `).concat(Z, "."));
|
|
|
1813
1813
|
B.style.paddingRight = "".concat(ut + ae, "px");
|
|
1814
1814
|
}
|
|
1815
1815
|
}
|
|
1816
|
-
},
|
|
1816
|
+
}, Oe = function(B) {
|
|
1817
1817
|
var Z = document.querySelectorAll(B);
|
|
1818
1818
|
m(Z, function(ae) {
|
|
1819
1819
|
Ce(ae);
|
|
@@ -1917,7 +1917,7 @@ Available fill gap methods: `).concat(Z, "."));
|
|
|
1917
1917
|
removeScrollableSelector: ce,
|
|
1918
1918
|
addScrollableTarget: fe,
|
|
1919
1919
|
removeScrollableTarget: ve,
|
|
1920
|
-
addLockableSelector:
|
|
1920
|
+
addLockableSelector: Ie,
|
|
1921
1921
|
addLockableTarget: me,
|
|
1922
1922
|
addFillGapSelector: Pe,
|
|
1923
1923
|
removeFillGapSelector: ee,
|
|
@@ -1960,7 +1960,7 @@ const Za = {
|
|
|
1960
1960
|
i.value[f.id] = "animate-shake";
|
|
1961
1961
|
});
|
|
1962
1962
|
}
|
|
1963
|
-
return
|
|
1963
|
+
return Ae(
|
|
1964
1964
|
() => l.value.length,
|
|
1965
1965
|
() => {
|
|
1966
1966
|
l.value.length == 0 ? ur() : ir();
|
|
@@ -2276,25 +2276,29 @@ const ds = { class: "relative" }, fs = { class: "relative" }, ms = ["value", "pl
|
|
|
2276
2276
|
C(() => l.labelKey),
|
|
2277
2277
|
C(() => l.valueKey),
|
|
2278
2278
|
C(() => !1)
|
|
2279
|
-
), M = $.isSelected, w = $.normalizedOptions, I = $.normalizedModelValue, t = C(() => {
|
|
2279
|
+
), M = $.isSelected, w = $.normalizedOptions, I = $.normalizedModelValue, t = C(() => E.value === !1 ? w.value : w.value.filter((W) => l.filter !== void 0 ? l.filter(W) : W.label ? W.label.toLowerCase().includes(i.value.toLowerCase()) : !1)), O = C(() => {
|
|
2280
2280
|
var W;
|
|
2281
|
-
return (W =
|
|
2281
|
+
return (W = t.value[Math.min(m.value, t.value.length - 1)]) != null ? W : null;
|
|
2282
2282
|
});
|
|
2283
|
-
|
|
2283
|
+
Ae(
|
|
2284
2284
|
() => I.value,
|
|
2285
2285
|
() => {
|
|
2286
2286
|
var W;
|
|
2287
|
-
l.modelValueShow !== !1
|
|
2288
|
-
(
|
|
2289
|
-
|
|
2290
|
-
|
|
2291
|
-
|
|
2292
|
-
|
|
2287
|
+
if (l.modelValueShow !== !1)
|
|
2288
|
+
if (I.value) {
|
|
2289
|
+
j((W = I.value) == null ? void 0 : W.label);
|
|
2290
|
+
const ce = t.value.findIndex(
|
|
2291
|
+
(me) => {
|
|
2292
|
+
var Ie;
|
|
2293
|
+
return me.value === ((Ie = I.value) == null ? void 0 : Ie.value);
|
|
2294
|
+
}
|
|
2295
|
+
);
|
|
2296
|
+
ce >= 0 && (m.value = ce);
|
|
2297
|
+
} else
|
|
2298
|
+
m.value = 0, j("");
|
|
2293
2299
|
},
|
|
2294
2300
|
{ immediate: !0 }
|
|
2295
|
-
)
|
|
2296
|
-
const O = C(() => E.value === !1 ? w.value : w.value.filter((W) => l.filter !== void 0 ? l.filter(W) : W.label ? W.label.toLowerCase().includes(i.value.toLowerCase()) : !1));
|
|
2297
|
-
xe(() => {
|
|
2301
|
+
), xe(() => {
|
|
2298
2302
|
window.addEventListener("mousedown", F);
|
|
2299
2303
|
}), $l(() => {
|
|
2300
2304
|
window.removeEventListener("mousedown", F);
|
|
@@ -2322,18 +2326,18 @@ const ds = { class: "relative" }, fs = { class: "relative" }, ms = ["value", "pl
|
|
|
2322
2326
|
const ce = W.key;
|
|
2323
2327
|
if (!l.loading) {
|
|
2324
2328
|
if (ce === "ArrowDown") {
|
|
2325
|
-
W.preventDefault(), m.value <
|
|
2329
|
+
W.preventDefault(), m.value < t.value.length - 1 ? m.value++ : m.value = 0;
|
|
2326
2330
|
return;
|
|
2327
2331
|
}
|
|
2328
2332
|
if (ce === "ArrowUp") {
|
|
2329
2333
|
W.preventDefault(), m.value > 0 ? m.value-- : m.value = Math.max(
|
|
2330
2334
|
0,
|
|
2331
|
-
|
|
2335
|
+
t.value.length - 1
|
|
2332
2336
|
);
|
|
2333
2337
|
return;
|
|
2334
2338
|
}
|
|
2335
2339
|
if (ce === "Enter") {
|
|
2336
|
-
W.preventDefault(),
|
|
2340
|
+
W.preventDefault(), O.value && c(O.value);
|
|
2337
2341
|
return;
|
|
2338
2342
|
}
|
|
2339
2343
|
}
|
|
@@ -2346,8 +2350,8 @@ const ds = { class: "relative" }, fs = { class: "relative" }, ms = ["value", "pl
|
|
|
2346
2350
|
function _(W) {
|
|
2347
2351
|
const ce = W ? W.option : null;
|
|
2348
2352
|
if (ce) {
|
|
2349
|
-
const me =
|
|
2350
|
-
(
|
|
2353
|
+
const me = t.value.findIndex(
|
|
2354
|
+
(Ie) => Ie.value == ce.value
|
|
2351
2355
|
);
|
|
2352
2356
|
m.value = me;
|
|
2353
2357
|
}
|
|
@@ -2364,7 +2368,7 @@ const ds = { class: "relative" }, fs = { class: "relative" }, ms = ["value", "pl
|
|
|
2364
2368
|
var W;
|
|
2365
2369
|
(W = k.value) == null || W.blur();
|
|
2366
2370
|
}
|
|
2367
|
-
const ne = (W) =>
|
|
2371
|
+
const ne = (W) => O.value && O.value.value == W.value ? "bg-slate-200" : "bg-white", Y = C(() => l.size == "xs" ? "text-xs" : (l.size == "sm", "text-sm")), se = C(() => l.size == "xs" ? "xs:text-xs xs:pl-7 text-base pl-9" : l.size == "sm" ? "xs:text-sm xs:pl-8 text-base pl-9" : "text-base pl-9"), fe = C(() => l.size == "xs" ? "xs:h-4 xs:w-4 h-5 w-5" : l.size == "sm" ? "xs:h-5 xs:w-5 h-5 w-5" : "h-5 w-5"), ve = C(() => l.size == "xs" || l.size == "sm" ? "xs:pl-2 pl-2.5" : "pl-2.5");
|
|
2368
2372
|
return xe(() => {
|
|
2369
2373
|
Qr(
|
|
2370
2374
|
y.value,
|
|
@@ -2437,13 +2441,13 @@ const ds = { class: "relative" }, fs = { class: "relative" }, ms = ["value", "pl
|
|
|
2437
2441
|
ref: y,
|
|
2438
2442
|
class: "max-h-[214px] min-h-[75px] w-full overflow-y-auto"
|
|
2439
2443
|
}, [
|
|
2440
|
-
h(
|
|
2444
|
+
h(t).length == 0 ? Q(W.$slots, "empty", { key: 0 }, () => [
|
|
2441
2445
|
v("div", vs, G(W.$t("sui.nothing_found")), 1)
|
|
2442
2446
|
]) : (b(), T("ul", {
|
|
2443
2447
|
key: 1,
|
|
2444
2448
|
class: N([e.inline ? "p-0 pt-1" : "p-1"])
|
|
2445
2449
|
}, [
|
|
2446
|
-
(b(!0), T(he, null, we(h(
|
|
2450
|
+
(b(!0), T(he, null, we(h(t), (me, Ie) => (b(), T("li", {
|
|
2447
2451
|
key: me.value,
|
|
2448
2452
|
class: "block"
|
|
2449
2453
|
}, [
|
|
@@ -2452,12 +2456,12 @@ const ds = { class: "relative" }, fs = { class: "relative" }, ms = ["value", "pl
|
|
|
2452
2456
|
type: "button",
|
|
2453
2457
|
tabindex: "-1",
|
|
2454
2458
|
onClick: (oe) => c(me),
|
|
2455
|
-
onMouseenter: (oe) => m.value =
|
|
2459
|
+
onMouseenter: (oe) => m.value = Ie
|
|
2456
2460
|
}, [
|
|
2457
2461
|
Q(W.$slots, "option", {
|
|
2458
2462
|
option: me.option,
|
|
2459
2463
|
selected: h(M)(me),
|
|
2460
|
-
active: h(
|
|
2464
|
+
active: h(O) && h(O).value == me.value
|
|
2461
2465
|
}, () => [
|
|
2462
2466
|
v("div", {
|
|
2463
2467
|
class: N(["flex items-center rounded px-2 py-1 text-sm", [ne(me), h(Y)]])
|
|
@@ -2479,7 +2483,7 @@ const ds = { class: "relative" }, fs = { class: "relative" }, ms = ["value", "pl
|
|
|
2479
2483
|
v("div", null, [
|
|
2480
2484
|
W.$slots.footer ? (b(), T("div", ws, [
|
|
2481
2485
|
Q(W.$slots, "footer", {
|
|
2482
|
-
options: h(
|
|
2486
|
+
options: h(t),
|
|
2483
2487
|
keywords: h(i)
|
|
2484
2488
|
})
|
|
2485
2489
|
])) : K("", !0)
|
|
@@ -2887,13 +2891,13 @@ const ds = { class: "relative" }, fs = { class: "relative" }, ms = ["value", "pl
|
|
|
2887
2891
|
emits: ["update:modelValue"],
|
|
2888
2892
|
setup(e, { emit: r }) {
|
|
2889
2893
|
const n = e, l = $e.http, o = D(n.currentModel);
|
|
2890
|
-
|
|
2894
|
+
Ae(
|
|
2891
2895
|
() => n.currentModel,
|
|
2892
2896
|
(s, i) => {
|
|
2893
2897
|
o.value = s;
|
|
2894
2898
|
},
|
|
2895
2899
|
{ deep: !0 }
|
|
2896
|
-
),
|
|
2900
|
+
), Ae(
|
|
2897
2901
|
() => n.modelValue,
|
|
2898
2902
|
(s, i) => {
|
|
2899
2903
|
if (s != i && n.showRouteUrl != null) {
|
|
@@ -3714,14 +3718,14 @@ Use "options.replacer" or "options.ignoreUnknown"
|
|
|
3714
3718
|
return q;
|
|
3715
3719
|
}
|
|
3716
3720
|
function I(u, x, A, V) {
|
|
3717
|
-
return w._charsWritten =
|
|
3721
|
+
return w._charsWritten = Ie(function(q) {
|
|
3718
3722
|
for (var P = [], X = 0; X < q.length; X++)
|
|
3719
3723
|
P.push(255 & q.charCodeAt(X));
|
|
3720
3724
|
return P;
|
|
3721
3725
|
}(x), u, A, V);
|
|
3722
3726
|
}
|
|
3723
3727
|
function t(u, x, A, V) {
|
|
3724
|
-
return w._charsWritten =
|
|
3728
|
+
return w._charsWritten = Ie(function(q) {
|
|
3725
3729
|
for (var P, X, ie = [], pe = 0; pe < q.length; pe++)
|
|
3726
3730
|
X = q.charCodeAt(pe), P = X >> 8, X = X % 256, ie.push(X), ie.push(P);
|
|
3727
3731
|
return ie;
|
|
@@ -3857,27 +3861,27 @@ list should be an Array.`), u.length === 0)
|
|
|
3857
3861
|
var q, P, X, ie, pe = this.length - x;
|
|
3858
3862
|
switch ((!A || pe < (A = Number(A))) && (A = pe), V = String(V || "utf8").toLowerCase()) {
|
|
3859
3863
|
case "hex":
|
|
3860
|
-
q = function(je,
|
|
3861
|
-
|
|
3862
|
-
var Be = je.length -
|
|
3863
|
-
(!Ce || Be < (Ce = Number(Ce))) && (Ce = Be), ee((Be =
|
|
3864
|
+
q = function(je, Te, Oe, Ce) {
|
|
3865
|
+
Oe = Number(Oe) || 0;
|
|
3866
|
+
var Be = je.length - Oe;
|
|
3867
|
+
(!Ce || Be < (Ce = Number(Ce))) && (Ce = Be), ee((Be = Te.length) % 2 == 0, "Invalid hex string"), Be / 2 < Ce && (Ce = Be / 2);
|
|
3864
3868
|
for (var Je = 0; Je < Ce; Je++) {
|
|
3865
|
-
var kt = parseInt(
|
|
3866
|
-
ee(!isNaN(kt), "Invalid hex string"), je[
|
|
3869
|
+
var kt = parseInt(Te.substr(2 * Je, 2), 16);
|
|
3870
|
+
ee(!isNaN(kt), "Invalid hex string"), je[Oe + Je] = kt;
|
|
3867
3871
|
}
|
|
3868
3872
|
return w._charsWritten = 2 * Je, Je;
|
|
3869
3873
|
}(this, u, x, A);
|
|
3870
3874
|
break;
|
|
3871
3875
|
case "utf8":
|
|
3872
3876
|
case "utf-8":
|
|
3873
|
-
P = this, X = x, ie = A, q = w._charsWritten =
|
|
3877
|
+
P = this, X = x, ie = A, q = w._charsWritten = Ie(ce(u), P, X, ie);
|
|
3874
3878
|
break;
|
|
3875
3879
|
case "ascii":
|
|
3876
3880
|
case "binary":
|
|
3877
3881
|
q = I(this, u, x, A);
|
|
3878
3882
|
break;
|
|
3879
3883
|
case "base64":
|
|
3880
|
-
P = this, X = x, ie = A, q = w._charsWritten =
|
|
3884
|
+
P = this, X = x, ie = A, q = w._charsWritten = Ie(me(u), P, X, ie);
|
|
3881
3885
|
break;
|
|
3882
3886
|
case "ucs2":
|
|
3883
3887
|
case "ucs-2":
|
|
@@ -3895,22 +3899,22 @@ list should be an Array.`), u.length === 0)
|
|
|
3895
3899
|
return "";
|
|
3896
3900
|
switch (u) {
|
|
3897
3901
|
case "hex":
|
|
3898
|
-
V = function(pe, je,
|
|
3899
|
-
var
|
|
3900
|
-
(!je || je < 0) && (je = 0), (!
|
|
3901
|
-
for (var Ce = "", Be = je; Be <
|
|
3902
|
+
V = function(pe, je, Te) {
|
|
3903
|
+
var Oe = pe.length;
|
|
3904
|
+
(!je || je < 0) && (je = 0), (!Te || Te < 0 || Oe < Te) && (Te = Oe);
|
|
3905
|
+
for (var Ce = "", Be = je; Be < Te; Be++)
|
|
3902
3906
|
Ce += W(pe[Be]);
|
|
3903
3907
|
return Ce;
|
|
3904
3908
|
}(ie, x, A);
|
|
3905
3909
|
break;
|
|
3906
3910
|
case "utf8":
|
|
3907
3911
|
case "utf-8":
|
|
3908
|
-
V = function(pe, je,
|
|
3909
|
-
var
|
|
3910
|
-
|
|
3911
|
-
for (var Be = je; Be <
|
|
3912
|
-
pe[Be] <= 127 ? (
|
|
3913
|
-
return
|
|
3912
|
+
V = function(pe, je, Te) {
|
|
3913
|
+
var Oe = "", Ce = "";
|
|
3914
|
+
Te = Math.min(pe.length, Te);
|
|
3915
|
+
for (var Be = je; Be < Te; Be++)
|
|
3916
|
+
pe[Be] <= 127 ? (Oe += oe(Ce) + String.fromCharCode(pe[Be]), Ce = "") : Ce += "%" + pe[Be].toString(16);
|
|
3917
|
+
return Oe + oe(Ce);
|
|
3914
3918
|
}(ie, x, A);
|
|
3915
3919
|
break;
|
|
3916
3920
|
case "ascii":
|
|
@@ -3924,9 +3928,9 @@ list should be an Array.`), u.length === 0)
|
|
|
3924
3928
|
case "ucs-2":
|
|
3925
3929
|
case "utf16le":
|
|
3926
3930
|
case "utf-16le":
|
|
3927
|
-
V = function(pe, je,
|
|
3928
|
-
for (var
|
|
3929
|
-
Ce += String.fromCharCode(
|
|
3931
|
+
V = function(pe, je, Te) {
|
|
3932
|
+
for (var Oe = pe.slice(je, Te), Ce = "", Be = 0; Be < Oe.length; Be += 2)
|
|
3933
|
+
Ce += String.fromCharCode(Oe[Be] + 256 * Oe[Be + 1]);
|
|
3930
3934
|
return Ce;
|
|
3931
3935
|
}(ie, x, A);
|
|
3932
3936
|
break;
|
|
@@ -4066,7 +4070,7 @@ list should be an Array.`), u.length === 0)
|
|
|
4066
4070
|
function me(u) {
|
|
4067
4071
|
return $.toByteArray(u);
|
|
4068
4072
|
}
|
|
4069
|
-
function
|
|
4073
|
+
function Ie(u, x, A, V) {
|
|
4070
4074
|
for (var q = 0; q < V && !(q + A >= x.length || q >= u.length); q++)
|
|
4071
4075
|
x[q + A] = u[q];
|
|
4072
4076
|
return q;
|
|
@@ -4302,7 +4306,7 @@ function Qe(e, r, ...n) {
|
|
|
4302
4306
|
throw Error.captureStackTrace && Error.captureStackTrace(l, Qe), l;
|
|
4303
4307
|
}
|
|
4304
4308
|
var It = ((e) => (e[e.None = 0] = "None", e[e.RenderStrategy = 1] = "RenderStrategy", e[e.Static = 2] = "Static", e))(It || {}), mt = ((e) => (e[e.Unmount = 0] = "Unmount", e[e.Hidden = 1] = "Hidden", e))(mt || {});
|
|
4305
|
-
function
|
|
4309
|
+
function Me({ visible: e = !0, features: r = 0, ourProps: n, theirProps: l, ...o }) {
|
|
4306
4310
|
var a;
|
|
4307
4311
|
let s = ci(l, n), i = Object.assign(o, { props: s });
|
|
4308
4312
|
if (e || r & 2 && s.static)
|
|
@@ -4338,7 +4342,7 @@ function _n({ props: e, attrs: r, slots: n, slot: l, name: o }) {
|
|
|
4338
4342
|
}
|
|
4339
4343
|
return Array.isArray(m) && m.length === 1 ? m[0] : m;
|
|
4340
4344
|
}
|
|
4341
|
-
return
|
|
4345
|
+
return Ee(s, Object.assign({}, i, f), { default: () => m });
|
|
4342
4346
|
}
|
|
4343
4347
|
function bo(e) {
|
|
4344
4348
|
return e.flatMap((r) => r.type === he ? bo(r.children) : [r]);
|
|
@@ -4387,7 +4391,7 @@ function pi() {
|
|
|
4387
4391
|
function Ye() {
|
|
4388
4392
|
return pi();
|
|
4389
4393
|
}
|
|
4390
|
-
var
|
|
4394
|
+
var Le = ((e) => (e.Space = " ", e.Enter = "Enter", e.Escape = "Escape", e.Backspace = "Backspace", e.Delete = "Delete", e.ArrowLeft = "ArrowLeft", e.ArrowUp = "ArrowUp", e.ArrowRight = "ArrowRight", e.ArrowDown = "ArrowDown", e.Home = "Home", e.End = "End", e.PageUp = "PageUp", e.PageDown = "PageDown", e.Tab = "Tab", e))(Le || {});
|
|
4391
4395
|
function hi(e) {
|
|
4392
4396
|
throw new Error("Unexpected object: " + e);
|
|
4393
4397
|
}
|
|
@@ -4596,7 +4600,7 @@ var Vt = ((e) => (e[e.None = 1] = "None", e[e.Focusable = 2] = "Focusable", e[e.
|
|
|
4596
4600
|
let cn = H({ name: "Hidden", props: { as: { type: [Object, String], default: "div" }, features: { type: Number, default: 1 } }, setup(e, { slots: r, attrs: n }) {
|
|
4597
4601
|
return () => {
|
|
4598
4602
|
let { features: l, ...o } = e, a = { "aria-hidden": (l & 2) === 2 ? !0 : void 0, style: { position: "fixed", top: 1, left: 1, width: 1, height: 0, padding: 0, margin: -1, overflow: "hidden", clip: "rect(0, 0, 0, 0)", whiteSpace: "nowrap", borderWidth: "0", ...(l & 4) === 4 && (l & 2) !== 2 && { display: "none" } } };
|
|
4599
|
-
return
|
|
4603
|
+
return Me({ ourProps: a, theirProps: o, slot: {}, attrs: n, slots: r, name: "Hidden" });
|
|
4600
4604
|
};
|
|
4601
4605
|
} });
|
|
4602
4606
|
function Si(e) {
|
|
@@ -4653,7 +4657,7 @@ let Mt = Object.assign(H({ name: "FocusTrap", props: { as: { type: [Object, Stri
|
|
|
4653
4657
|
}
|
|
4654
4658
|
return () => {
|
|
4655
4659
|
let f = {}, k = { ref: o }, { features: y, initialFocus: E, containers: L, ...$ } = e;
|
|
4656
|
-
return
|
|
4660
|
+
return Ee(he, [Boolean(y & 4) && Ee(cn, { as: "button", type: "button", onFocus: m, features: Vt.Focusable }), Me({ ourProps: k, theirProps: { ...r, ...$ }, slot: f, attrs: r, slots: n, name: "FocusTrap" }), Boolean(y & 4) && Ee(cn, { as: "button", type: "button", onFocus: m, features: Vt.Focusable })]);
|
|
4657
4661
|
};
|
|
4658
4662
|
} }), { features: Eo });
|
|
4659
4663
|
function Ii({ ownerDocument: e }, r) {
|
|
@@ -4666,7 +4670,7 @@ function Ii({ ownerDocument: e }, r) {
|
|
|
4666
4670
|
!n.value || (Bt(n.value), n.value = null);
|
|
4667
4671
|
}
|
|
4668
4672
|
xe(() => {
|
|
4669
|
-
|
|
4673
|
+
Ae(r, (a, s) => {
|
|
4670
4674
|
a !== s && (a ? l() : o());
|
|
4671
4675
|
}, { immediate: !0 });
|
|
4672
4676
|
}), ot(o);
|
|
@@ -4674,7 +4678,7 @@ function Ii({ ownerDocument: e }, r) {
|
|
|
4674
4678
|
function Ei({ ownerDocument: e, container: r, initialFocus: n }, l) {
|
|
4675
4679
|
let o = D(null), a = D(!1);
|
|
4676
4680
|
return xe(() => a.value = !0), ot(() => a.value = !1), xe(() => {
|
|
4677
|
-
|
|
4681
|
+
Ae([r, n, l], (s, i) => {
|
|
4678
4682
|
if (s.every((f, k) => (i == null ? void 0 : i[k]) === f) || !l.value)
|
|
4679
4683
|
return;
|
|
4680
4684
|
let m = Se(r);
|
|
@@ -4766,7 +4770,7 @@ function Mi() {
|
|
|
4766
4770
|
let Rn = H({ name: "ForcePortalRoot", props: { as: { type: [Object, String], default: "template" }, force: { type: Boolean, default: !1 } }, setup(e, { slots: r, attrs: n }) {
|
|
4767
4771
|
return ye(Ao, e.force), () => {
|
|
4768
4772
|
let { force: l, ...o } = e;
|
|
4769
|
-
return
|
|
4773
|
+
return Me({ theirProps: o, ourProps: {}, slot: {}, slots: r, attrs: n, name: "ForcePortalRoot" });
|
|
4770
4774
|
};
|
|
4771
4775
|
} });
|
|
4772
4776
|
function Oi(e) {
|
|
@@ -4794,7 +4798,7 @@ let To = H({ name: "Portal", props: { as: { type: [Object, String], default: "di
|
|
|
4794
4798
|
if (i.value === null)
|
|
4795
4799
|
return null;
|
|
4796
4800
|
let m = { ref: l, "data-headlessui-portal": "" };
|
|
4797
|
-
return
|
|
4801
|
+
return Ee(Et, { to: i.value }, Me({ ourProps: m, theirProps: e, slot: {}, attrs: n, slots: r, name: "Portal" }));
|
|
4798
4802
|
};
|
|
4799
4803
|
} }), Lo = Symbol("PortalGroupContext"), ji = H({ name: "PortalGroup", props: { as: { type: [Object, String], default: "template" }, target: { type: Object, default: null } }, setup(e, { attrs: r, slots: n }) {
|
|
4800
4804
|
let l = Cl({ resolveTarget() {
|
|
@@ -4802,7 +4806,7 @@ let To = H({ name: "Portal", props: { as: { type: [Object, String], default: "di
|
|
|
4802
4806
|
} });
|
|
4803
4807
|
return ye(Lo, l), () => {
|
|
4804
4808
|
let { target: o, ...a } = e;
|
|
4805
|
-
return
|
|
4809
|
+
return Me({ theirProps: a, ourProps: {}, slot: {}, attrs: r, slots: n, name: "PortalGroup" });
|
|
4806
4810
|
};
|
|
4807
4811
|
} }), Mo = Symbol("StackContext");
|
|
4808
4812
|
var Un = ((e) => (e[e.Add = 0] = "Add", e[e.Remove = 1] = "Remove", e))(Un || {});
|
|
@@ -4816,7 +4820,7 @@ function Di({ type: e, enabled: r, element: n, onUpdate: l }) {
|
|
|
4816
4820
|
l == null || l(...s), o(...s);
|
|
4817
4821
|
}
|
|
4818
4822
|
xe(() => {
|
|
4819
|
-
|
|
4823
|
+
Ae(r, (s, i) => {
|
|
4820
4824
|
s ? a(0, e, n) : i === !0 && a(1, e, n);
|
|
4821
4825
|
}, { immediate: !0, flush: "sync" });
|
|
4822
4826
|
}), ot(() => {
|
|
@@ -4844,7 +4848,7 @@ let Ch = H({ name: "Description", props: { as: { type: [Object, String], default
|
|
|
4844
4848
|
let l = Pi(), o = `headlessui-description-${Ye()}`;
|
|
4845
4849
|
return xe(() => ot(l.register(o))), () => {
|
|
4846
4850
|
let { name: a = "Description", slot: s = D({}), props: i = {} } = l, m = e, f = { ...Object.entries(i).reduce((k, [y, E]) => Object.assign(k, { [y]: h(E) }), {}), id: o };
|
|
4847
|
-
return
|
|
4851
|
+
return Me({ ourProps: f, theirProps: m, slot: s.value, attrs: r, slots: n, name: a });
|
|
4848
4852
|
};
|
|
4849
4853
|
} });
|
|
4850
4854
|
function pr() {
|
|
@@ -4917,7 +4921,7 @@ let Wt = "DC8F892D-2EBD-447C-A4C8-A03058436FF4", qi = H({ name: "Dialog", inheri
|
|
|
4917
4921
|
}, (S, p) => {
|
|
4918
4922
|
g.close(), qe(() => p == null ? void 0 : p.focus());
|
|
4919
4923
|
}, C(() => $.value === 0 && !w.value)), Io((a = L.value) == null ? void 0 : a.defaultView, "keydown", (S) => {
|
|
4920
|
-
S.defaultPrevented || S.key ===
|
|
4924
|
+
S.defaultPrevented || S.key === Le.Escape && $.value === 0 && (w.value || (S.preventDefault(), S.stopPropagation(), g.close()));
|
|
4921
4925
|
}), He((S) => {
|
|
4922
4926
|
var p;
|
|
4923
4927
|
if ($.value !== 0 || I)
|
|
@@ -4955,7 +4959,7 @@ let Wt = "DC8F892D-2EBD-447C-A4C8-A03058436FF4", qi = H({ name: "Dialog", inheri
|
|
|
4955
4959
|
d.observe(p), S(() => d.disconnect());
|
|
4956
4960
|
}), () => {
|
|
4957
4961
|
let S = { ...n, ref: y, id: F, role: "dialog", "aria-modal": $.value === 0 ? !0 : void 0, "aria-labelledby": z.value, "aria-describedby": O.value }, { open: p, initialFocus: d, ...c } = e, _ = { open: $.value === 0 };
|
|
4958
|
-
return
|
|
4962
|
+
return Ee(Rn, { force: !0 }, () => [Ee(To, () => Ee(ji, { target: y.value }, () => Ee(Rn, { force: !1 }, () => Ee(Mt, { initialFocus: d, containers: k, features: M.value ? Qe(t.value, { parent: Mt.features.RestoreFocus, leaf: Mt.features.All & ~Mt.features.FocusLock }) : Mt.features.None }, () => Me({ ourProps: S, theirProps: c, slot: _, attrs: n, slots: l, visible: $.value === 0, features: It.RenderStrategy | It.Static, name: "Dialog" }))))), Ee(cn, { features: Vt.Hidden, ref: E })]);
|
|
4959
4963
|
};
|
|
4960
4964
|
} });
|
|
4961
4965
|
H({ name: "DialogOverlay", props: { as: { type: [Object, String], default: "div" } }, setup(e, { attrs: r, slots: n }) {
|
|
@@ -4963,7 +4967,7 @@ H({ name: "DialogOverlay", props: { as: { type: [Object, String], default: "div"
|
|
|
4963
4967
|
function a(s) {
|
|
4964
4968
|
s.target === s.currentTarget && (s.preventDefault(), s.stopPropagation(), l.close());
|
|
4965
4969
|
}
|
|
4966
|
-
return () =>
|
|
4970
|
+
return () => Me({ ourProps: { id: o, "aria-hidden": !0, onClick: a }, theirProps: e, slot: { open: l.dialogState.value === 0 }, attrs: r, slots: n, name: "DialogOverlay" });
|
|
4967
4971
|
} });
|
|
4968
4972
|
H({ name: "DialogBackdrop", props: { as: { type: [Object, String], default: "div" } }, inheritAttrs: !1, setup(e, { attrs: r, slots: n, expose: l }) {
|
|
4969
4973
|
let o = Rt("DialogBackdrop"), a = `headlessui-dialog-backdrop-${Ye()}`, s = D(null);
|
|
@@ -4972,7 +4976,7 @@ H({ name: "DialogBackdrop", props: { as: { type: [Object, String], default: "div
|
|
|
4972
4976
|
throw new Error("A <DialogBackdrop /> component is being used, but a <DialogPanel /> component is missing.");
|
|
4973
4977
|
}), () => {
|
|
4974
4978
|
let i = e, m = { id: a, ref: s, "aria-hidden": !0 };
|
|
4975
|
-
return
|
|
4979
|
+
return Ee(Rn, { force: !0 }, () => Ee(To, () => Me({ ourProps: m, theirProps: { ...r, ...i }, slot: { open: o.dialogState.value === 0 }, attrs: r, slots: n, name: "DialogBackdrop" })));
|
|
4976
4980
|
};
|
|
4977
4981
|
} });
|
|
4978
4982
|
let zi = H({ name: "DialogPanel", props: { as: { type: [Object, String], default: "div" } }, setup(e, { attrs: r, slots: n, expose: l }) {
|
|
@@ -4983,14 +4987,14 @@ let zi = H({ name: "DialogPanel", props: { as: { type: [Object, String], default
|
|
|
4983
4987
|
}
|
|
4984
4988
|
return () => {
|
|
4985
4989
|
let i = { id: a, ref: o.panelRef, onClick: s };
|
|
4986
|
-
return
|
|
4990
|
+
return Me({ ourProps: i, theirProps: e, slot: { open: o.dialogState.value === 0 }, attrs: r, slots: n, name: "DialogPanel" });
|
|
4987
4991
|
};
|
|
4988
4992
|
} });
|
|
4989
4993
|
H({ name: "DialogTitle", props: { as: { type: [Object, String], default: "h2" } }, setup(e, { attrs: r, slots: n }) {
|
|
4990
4994
|
let l = Rt("DialogTitle"), o = `headlessui-dialog-title-${Ye()}`;
|
|
4991
4995
|
return xe(() => {
|
|
4992
4996
|
l.setTitleId(o), ot(() => l.setTitleId(null));
|
|
4993
|
-
}), () =>
|
|
4997
|
+
}), () => Me({ ourProps: { id: o }, theirProps: e, slot: { open: l.dialogState.value === 0 }, attrs: r, slots: n, name: "DialogTitle" });
|
|
4994
4998
|
} });
|
|
4995
4999
|
var Ri = ((e) => (e[e.Open = 0] = "Open", e[e.Closed = 1] = "Closed", e))(Ri || {}), Ui = ((e) => (e[e.Pointer = 0] = "Pointer", e[e.Other = 1] = "Other", e))(Ui || {});
|
|
4996
5000
|
function Hi(e) {
|
|
@@ -5038,22 +5042,22 @@ let Ki = H({ name: "Menu", props: { as: { type: [Object, String], default: "temp
|
|
|
5038
5042
|
y.closeMenu(), mr(L, fr.Loose) || (E.preventDefault(), ($ = Se(o)) == null || $.focus());
|
|
5039
5043
|
}, C(() => l.value === 0)), ye(Fo, y), xo(C(() => Qe(l.value, { [0]: rt.Open, [1]: rt.Closed }))), () => {
|
|
5040
5044
|
let E = { open: l.value === 0, close: y.closeMenu };
|
|
5041
|
-
return
|
|
5045
|
+
return Me({ ourProps: {}, theirProps: e, slot: E, slots: r, attrs: n, name: "Menu" });
|
|
5042
5046
|
};
|
|
5043
5047
|
} }), Gi = H({ name: "MenuButton", props: { disabled: { type: Boolean, default: !1 }, as: { type: [Object, String], default: "button" } }, setup(e, { attrs: r, slots: n, expose: l }) {
|
|
5044
5048
|
let o = wn("MenuButton"), a = `headlessui-menu-button-${Ye()}`;
|
|
5045
5049
|
l({ el: o.buttonRef, $el: o.buttonRef });
|
|
5046
5050
|
function s(k) {
|
|
5047
5051
|
switch (k.key) {
|
|
5048
|
-
case
|
|
5049
|
-
case
|
|
5050
|
-
case
|
|
5052
|
+
case Le.Space:
|
|
5053
|
+
case Le.Enter:
|
|
5054
|
+
case Le.ArrowDown:
|
|
5051
5055
|
k.preventDefault(), k.stopPropagation(), o.openMenu(), qe(() => {
|
|
5052
5056
|
var y;
|
|
5053
5057
|
(y = Se(o.itemsRef)) == null || y.focus({ preventScroll: !0 }), o.goToItem(We.First);
|
|
5054
5058
|
});
|
|
5055
5059
|
break;
|
|
5056
|
-
case
|
|
5060
|
+
case Le.ArrowUp:
|
|
5057
5061
|
k.preventDefault(), k.stopPropagation(), o.openMenu(), qe(() => {
|
|
5058
5062
|
var y;
|
|
5059
5063
|
(y = Se(o.itemsRef)) == null || y.focus({ preventScroll: !0 }), o.goToItem(We.Last);
|
|
@@ -5063,7 +5067,7 @@ let Ki = H({ name: "Menu", props: { as: { type: [Object, String], default: "temp
|
|
|
5063
5067
|
}
|
|
5064
5068
|
function i(k) {
|
|
5065
5069
|
switch (k.key) {
|
|
5066
|
-
case
|
|
5070
|
+
case Le.Space:
|
|
5067
5071
|
k.preventDefault();
|
|
5068
5072
|
break;
|
|
5069
5073
|
}
|
|
@@ -5081,7 +5085,7 @@ let Ki = H({ name: "Menu", props: { as: { type: [Object, String], default: "temp
|
|
|
5081
5085
|
return () => {
|
|
5082
5086
|
var k;
|
|
5083
5087
|
let y = { open: o.menuState.value === 0 }, E = { ref: o.buttonRef, id: a, type: f.value, "aria-haspopup": !0, "aria-controls": (k = Se(o.itemsRef)) == null ? void 0 : k.id, "aria-expanded": e.disabled ? void 0 : o.menuState.value === 0, onKeydown: s, onKeyup: i, onClick: m };
|
|
5084
|
-
return
|
|
5088
|
+
return Me({ ourProps: E, theirProps: e, slot: y, attrs: r, slots: n, name: "MenuButton" });
|
|
5085
5089
|
};
|
|
5086
5090
|
} }), Wi = H({ name: "MenuItems", props: { as: { type: [Object, String], default: "div" }, static: { type: Boolean, default: !1 }, unmount: { type: Boolean, default: !0 } }, setup(e, { attrs: r, slots: n, expose: l }) {
|
|
5087
5091
|
let o = wn("MenuItems"), a = `headlessui-menu-items-${Ye()}`, s = D(null);
|
|
@@ -5093,33 +5097,33 @@ let Ki = H({ name: "Menu", props: { as: { type: [Object, String], default: "temp
|
|
|
5093
5097
|
function i(y) {
|
|
5094
5098
|
var E;
|
|
5095
5099
|
switch (s.value && clearTimeout(s.value), y.key) {
|
|
5096
|
-
case
|
|
5100
|
+
case Le.Space:
|
|
5097
5101
|
if (o.searchQuery.value !== "")
|
|
5098
5102
|
return y.preventDefault(), y.stopPropagation(), o.search(y.key);
|
|
5099
|
-
case
|
|
5103
|
+
case Le.Enter:
|
|
5100
5104
|
if (y.preventDefault(), y.stopPropagation(), o.activeItemIndex.value !== null) {
|
|
5101
5105
|
let L = o.items.value[o.activeItemIndex.value];
|
|
5102
5106
|
(E = Se(L.dataRef.domRef)) == null || E.click();
|
|
5103
5107
|
}
|
|
5104
5108
|
o.closeMenu(), Bo(Se(o.buttonRef));
|
|
5105
5109
|
break;
|
|
5106
|
-
case
|
|
5110
|
+
case Le.ArrowDown:
|
|
5107
5111
|
return y.preventDefault(), y.stopPropagation(), o.goToItem(We.Next);
|
|
5108
|
-
case
|
|
5112
|
+
case Le.ArrowUp:
|
|
5109
5113
|
return y.preventDefault(), y.stopPropagation(), o.goToItem(We.Previous);
|
|
5110
|
-
case
|
|
5111
|
-
case
|
|
5114
|
+
case Le.Home:
|
|
5115
|
+
case Le.PageUp:
|
|
5112
5116
|
return y.preventDefault(), y.stopPropagation(), o.goToItem(We.First);
|
|
5113
|
-
case
|
|
5114
|
-
case
|
|
5117
|
+
case Le.End:
|
|
5118
|
+
case Le.PageDown:
|
|
5115
5119
|
return y.preventDefault(), y.stopPropagation(), o.goToItem(We.Last);
|
|
5116
|
-
case
|
|
5120
|
+
case Le.Escape:
|
|
5117
5121
|
y.preventDefault(), y.stopPropagation(), o.closeMenu(), qe(() => {
|
|
5118
5122
|
var L;
|
|
5119
5123
|
return (L = Se(o.buttonRef)) == null ? void 0 : L.focus({ preventScroll: !0 });
|
|
5120
5124
|
});
|
|
5121
5125
|
break;
|
|
5122
|
-
case
|
|
5126
|
+
case Le.Tab:
|
|
5123
5127
|
y.preventDefault(), y.stopPropagation(), o.closeMenu(), qe(() => ki(Se(o.buttonRef), y.shiftKey ? wt.Previous : wt.Next));
|
|
5124
5128
|
break;
|
|
5125
5129
|
default:
|
|
@@ -5129,7 +5133,7 @@ let Ki = H({ name: "Menu", props: { as: { type: [Object, String], default: "temp
|
|
|
5129
5133
|
}
|
|
5130
5134
|
function m(y) {
|
|
5131
5135
|
switch (y.key) {
|
|
5132
|
-
case
|
|
5136
|
+
case Le.Space:
|
|
5133
5137
|
y.preventDefault();
|
|
5134
5138
|
break;
|
|
5135
5139
|
}
|
|
@@ -5138,7 +5142,7 @@ let Ki = H({ name: "Menu", props: { as: { type: [Object, String], default: "temp
|
|
|
5138
5142
|
return () => {
|
|
5139
5143
|
var y, E;
|
|
5140
5144
|
let L = { open: o.menuState.value === 0 }, $ = { "aria-activedescendant": o.activeItemIndex.value === null || (y = o.items.value[o.activeItemIndex.value]) == null ? void 0 : y.id, "aria-labelledby": (E = Se(o.buttonRef)) == null ? void 0 : E.id, id: a, onKeydown: i, onKeyup: m, role: "menu", tabIndex: 0, ref: o.itemsRef };
|
|
5141
|
-
return
|
|
5145
|
+
return Me({ ourProps: $, theirProps: e, slot: L, attrs: r, slots: n, features: It.RenderStrategy | It.Static, visible: k.value, name: "MenuItems" });
|
|
5142
5146
|
};
|
|
5143
5147
|
} }), Ct = H({ name: "MenuItem", props: { as: { type: [Object, String], default: "template" }, disabled: { type: Boolean, default: !1 } }, setup(e, { slots: r, attrs: n, expose: l }) {
|
|
5144
5148
|
let o = wn("MenuItem"), a = `headlessui-menu-item-${Ye()}`, s = D(null);
|
|
@@ -5172,7 +5176,7 @@ let Ki = H({ name: "Menu", props: { as: { type: [Object, String], default: "temp
|
|
|
5172
5176
|
}
|
|
5173
5177
|
return () => {
|
|
5174
5178
|
let { disabled: L } = e, $ = { active: i.value, disabled: L, close: o.closeMenu };
|
|
5175
|
-
return
|
|
5179
|
+
return Me({ ourProps: { id: a, ref: s, role: "menuitem", tabIndex: L === !0 ? void 0 : -1, "aria-disabled": L === !0 ? !0 : void 0, onClick: f, onFocus: k, onPointermove: y, onMousemove: y, onPointerleave: E, onMouseleave: E }, theirProps: e, slot: $, attrs: n, slots: r, name: "MenuItem" });
|
|
5176
5180
|
};
|
|
5177
5181
|
} }), Do = Symbol("LabelContext");
|
|
5178
5182
|
function Po() {
|
|
@@ -5197,13 +5201,13 @@ let Yi = H({ name: "Label", props: { as: { type: [Object, String], default: "lab
|
|
|
5197
5201
|
let l = Po(), o = `headlessui-label-${Ye()}`;
|
|
5198
5202
|
return xe(() => ot(l.register(o))), () => {
|
|
5199
5203
|
let { name: a = "Label", slot: s = {}, props: i = {} } = l, { passive: m, ...f } = e, k = { ...Object.entries(i).reduce((y, [E, L]) => Object.assign(y, { [E]: h(L) }), {}), id: o };
|
|
5200
|
-
return m && (delete k.onClick, delete f.onClick),
|
|
5204
|
+
return m && (delete k.onClick, delete f.onClick), Me({ ourProps: k, theirProps: f, slot: s, attrs: n, slots: r, name: a });
|
|
5201
5205
|
};
|
|
5202
5206
|
} }), Vo = Symbol("GroupContext"), Ji = H({ name: "SwitchGroup", props: { as: { type: [Object, String], default: "template" } }, setup(e, { slots: r, attrs: n }) {
|
|
5203
5207
|
let l = D(null), o = Qi({ name: "SwitchLabel", props: { onClick() {
|
|
5204
5208
|
!l.value || (l.value.click(), l.value.focus({ preventScroll: !0 }));
|
|
5205
5209
|
} } }), a = jo({ name: "SwitchDescription" });
|
|
5206
|
-
return ye(Vo, { switchRef: l, labelledby: o, describedby: a }), () =>
|
|
5210
|
+
return ye(Vo, { switchRef: l, labelledby: o, describedby: a }), () => Me({ theirProps: e, ourProps: {}, slot: {}, slots: r, attrs: n, name: "SwitchGroup" });
|
|
5207
5211
|
} }), Zi = H({ name: "Switch", emits: { "update:modelValue": (e) => !0 }, props: { as: { type: [Object, String], default: "button" }, modelValue: { type: Boolean, default: void 0 }, defaultChecked: { type: Boolean, default: !1 }, name: { type: String, optional: !0 }, value: { type: String, optional: !0 } }, inheritAttrs: !1, setup(e, { emit: r, attrs: n, slots: l, expose: o }) {
|
|
5208
5212
|
let a = ke(Vo, null), s = `headlessui-switch-${Ye()}`, [i, m] = $i(C(() => e.modelValue), (w) => r("update:modelValue", w), C(() => e.defaultChecked));
|
|
5209
5213
|
function f() {
|
|
@@ -5215,14 +5219,14 @@ let Yi = H({ name: "Label", props: { as: { type: [Object, String], default: "lab
|
|
|
5215
5219
|
w.preventDefault(), f();
|
|
5216
5220
|
}
|
|
5217
5221
|
function $(w) {
|
|
5218
|
-
w.key ===
|
|
5222
|
+
w.key === Le.Space ? (w.preventDefault(), f()) : w.key === Le.Enter && Si(w.currentTarget);
|
|
5219
5223
|
}
|
|
5220
5224
|
function M(w) {
|
|
5221
5225
|
w.preventDefault();
|
|
5222
5226
|
}
|
|
5223
5227
|
return () => {
|
|
5224
5228
|
let { name: w, value: I, ...t } = e, O = { checked: i.value }, F = { id: s, ref: y, role: "switch", type: E.value, tabIndex: 0, "aria-checked": i.value, "aria-labelledby": a == null ? void 0 : a.labelledby.value, "aria-describedby": a == null ? void 0 : a.describedby.value, onClick: L, onKeyup: $, onKeypress: M };
|
|
5225
|
-
return
|
|
5229
|
+
return Ee(he, [w != null && i.value != null ? Ee(cn, di({ features: Vt.Hidden, as: "input", type: "checkbox", hidden: !0, readOnly: !0, checked: i.value, name: w, value: I })) : null, Me({ ourProps: F, theirProps: { ...n, ...dr(t, ["modelValue", "defaultChecked"]) }, slot: O, attrs: n, slots: l, name: "Switch" })]);
|
|
5226
5230
|
};
|
|
5227
5231
|
} }), Xi = Yi;
|
|
5228
5232
|
function eu(e) {
|
|
@@ -5299,7 +5303,7 @@ function No(e) {
|
|
|
5299
5303
|
}
|
|
5300
5304
|
let qo = It.RenderStrategy, tn = H({ props: { as: { type: [Object, String], default: "div" }, show: { type: [Boolean], default: null }, unmount: { type: [Boolean], default: !0 }, appear: { type: [Boolean], default: !1 }, enter: { type: [String], default: "" }, enterFrom: { type: [String], default: "" }, enterTo: { type: [String], default: "" }, entered: { type: [String], default: "" }, leave: { type: [String], default: "" }, leaveFrom: { type: [String], default: "" }, leaveTo: { type: [String], default: "" } }, emits: { beforeEnter: () => !0, afterEnter: () => !0, beforeLeave: () => !0, afterLeave: () => !0 }, setup(e, { emit: r, attrs: n, slots: l, expose: o }) {
|
|
5301
5305
|
if (!ru() && gi())
|
|
5302
|
-
return () =>
|
|
5306
|
+
return () => Ee(zo, { ...e, onBeforeEnter: () => r("beforeEnter"), onAfterEnter: () => r("afterEnter"), onBeforeLeave: () => r("beforeLeave"), onAfterLeave: () => r("afterLeave") }, l);
|
|
5303
5307
|
let a = D(null), s = D("visible"), i = C(() => e.unmount ? mt.Unmount : mt.Hidden);
|
|
5304
5308
|
o({ el: a, $el: a });
|
|
5305
5309
|
let { show: m, appear: f } = ou(), { register: k, unregister: y } = lu(), E = { value: !0 }, L = Ye(), $ = { value: !1 }, M = No(() => {
|
|
@@ -5336,12 +5340,12 @@ let qo = It.RenderStrategy, tn = H({ props: { as: { type: [Object, String], defa
|
|
|
5336
5340
|
})));
|
|
5337
5341
|
}
|
|
5338
5342
|
return xe(() => {
|
|
5339
|
-
|
|
5343
|
+
Ae([m], (p, d, c) => {
|
|
5340
5344
|
S(c), E.value = !1;
|
|
5341
5345
|
}, { immediate: !0 });
|
|
5342
5346
|
}), ye(vr, M), xo(C(() => Qe(s.value, { visible: rt.Open, hidden: rt.Closed }))), () => {
|
|
5343
5347
|
let { appear: p, show: d, enter: c, enterFrom: _, enterTo: j, entered: re, leave: J, leaveFrom: ne, leaveTo: Y, ...se } = e;
|
|
5344
|
-
return
|
|
5348
|
+
return Me({ theirProps: se, ourProps: { ref: a }, slot: {}, slots: l, attrs: n, features: qo, visible: s.value === "visible", name: "TransitionChild" });
|
|
5345
5349
|
};
|
|
5346
5350
|
} }), au = tn, zo = H({ inheritAttrs: !1, props: { as: { type: [Object, String], default: "div" }, show: { type: [Boolean], default: null }, unmount: { type: [Boolean], default: !0 }, appear: { type: [Boolean], default: !1 }, enter: { type: [String], default: "" }, enterFrom: { type: [String], default: "" }, enterTo: { type: [String], default: "" }, entered: { type: [String], default: "" }, leave: { type: [String], default: "" }, leaveFrom: { type: [String], default: "" }, leaveTo: { type: [String], default: "" } }, emits: { beforeEnter: () => !0, afterEnter: () => !0, beforeLeave: () => !0, afterLeave: () => !0 }, setup(e, { emit: r, attrs: n, slots: l }) {
|
|
5347
5351
|
let o = yn(), a = C(() => e.show === null && o !== null ? Qe(o.value, { [rt.Open]: !0, [rt.Closed]: !1 }) : e.show);
|
|
@@ -5358,7 +5362,7 @@ let qo = It.RenderStrategy, tn = H({ props: { as: { type: [Object, String], defa
|
|
|
5358
5362
|
});
|
|
5359
5363
|
}), ye(vr, i), ye(hr, f), () => {
|
|
5360
5364
|
let k = dr(e, ["show", "appear", "unmount", "onBeforeEnter", "onBeforeLeave", "onAfterEnter", "onAfterLeave"]), y = { unmount: e.unmount };
|
|
5361
|
-
return
|
|
5365
|
+
return Me({ ourProps: { ...y, as: "template" }, theirProps: {}, slot: {}, slots: { ...l, default: () => [Ee(au, { onBeforeEnter: () => r("beforeEnter"), onAfterEnter: () => r("afterEnter"), onBeforeLeave: () => r("beforeLeave"), onAfterLeave: () => r("afterLeave"), ...n, ...y, ...k }, l.default)] }, attrs: {}, features: qo, visible: s.value === "visible", name: "Transition" });
|
|
5362
5366
|
};
|
|
5363
5367
|
} });
|
|
5364
5368
|
const su = { class: "flex items-center" }, iu = {
|
|
@@ -5584,7 +5588,7 @@ const su = { class: "flex items-center" }, iu = {
|
|
|
5584
5588
|
emits: ["update:model-value"],
|
|
5585
5589
|
setup(e, { emit: r }) {
|
|
5586
5590
|
const n = e, l = D(null), o = D(n.modelValue);
|
|
5587
|
-
|
|
5591
|
+
Ae(
|
|
5588
5592
|
() => n.modelValue,
|
|
5589
5593
|
(S) => {
|
|
5590
5594
|
o.value = S;
|
|
@@ -5767,7 +5771,7 @@ function gr(e) {
|
|
|
5767
5771
|
}
|
|
5768
5772
|
function Uo(e, r, n) {
|
|
5769
5773
|
const l = D(!1);
|
|
5770
|
-
|
|
5774
|
+
Ae(
|
|
5771
5775
|
() => e.value,
|
|
5772
5776
|
() => {
|
|
5773
5777
|
o();
|
|
@@ -6004,7 +6008,7 @@ const Eu = { class: "flex min-h-full w-full pt-20 sm:pt-0" }, Au = { class: "min
|
|
|
6004
6008
|
childList: !0
|
|
6005
6009
|
}), xe(() => {
|
|
6006
6010
|
S();
|
|
6007
|
-
}),
|
|
6011
|
+
}), Ae(
|
|
6008
6012
|
() => O.value,
|
|
6009
6013
|
() => {
|
|
6010
6014
|
qe(() => {
|
|
@@ -6056,12 +6060,12 @@ const Eu = { class: "flex min-h-full w-full pt-20 sm:pt-0" }, Au = { class: "min
|
|
|
6056
6060
|
const X = Ve(I.value);
|
|
6057
6061
|
X.page = 1, X.search = $.value, _(X);
|
|
6058
6062
|
}, 350);
|
|
6059
|
-
|
|
6063
|
+
Ae(
|
|
6060
6064
|
() => s.query,
|
|
6061
6065
|
() => {
|
|
6062
6066
|
fe();
|
|
6063
6067
|
}
|
|
6064
|
-
),
|
|
6068
|
+
), Ae(
|
|
6065
6069
|
() => n.urlQuery,
|
|
6066
6070
|
() => {
|
|
6067
6071
|
ce();
|
|
@@ -6084,18 +6088,18 @@ const Eu = { class: "flex min-h-full w-full pt-20 sm:pt-0" }, Au = { class: "min
|
|
|
6084
6088
|
}
|
|
6085
6089
|
function ce(P = !1, X = !0) {
|
|
6086
6090
|
var Je;
|
|
6087
|
-
const ie = re.value.split(/[?#]/), pe = ie[0], je = (Je = ie[1]) != null ? Je : null,
|
|
6091
|
+
const ie = re.value.split(/[?#]/), pe = ie[0], je = (Je = ie[1]) != null ? Je : null, Te = $e.parseQueryString(je), Oe = kr(
|
|
6088
6092
|
Ve(I.value),
|
|
6089
6093
|
Ve(n.urlQuery),
|
|
6090
|
-
Ve(
|
|
6091
|
-
), Ce = $e.formatQueryString(
|
|
6094
|
+
Ve(Te)
|
|
6095
|
+
), Ce = $e.formatQueryString(Oe), Be = pe + "?" + Ce;
|
|
6092
6096
|
M == Be && !P || (X && (y.value = !0), M = Be, l.get(Be).then((kt) => {
|
|
6093
6097
|
me.value = kt.data, y.value = !1, E.value = !1, k.value = !0;
|
|
6094
6098
|
}).catch(() => {
|
|
6095
6099
|
y.value = !1, E.value = !0;
|
|
6096
6100
|
}));
|
|
6097
6101
|
}
|
|
6098
|
-
const me = D(null),
|
|
6102
|
+
const me = D(null), Ie = C(() => me.value ? et(me.value) ? me.value : me.value.data : []), oe = C(() => {
|
|
6099
6103
|
const P = {
|
|
6100
6104
|
current_page: 1,
|
|
6101
6105
|
last_page: 1,
|
|
@@ -6212,7 +6216,7 @@ const Eu = { class: "flex min-h-full w-full pt-20 sm:pt-0" }, Au = { class: "min
|
|
|
6212
6216
|
}, 8, ["items"])) : K("", !0)
|
|
6213
6217
|
]),
|
|
6214
6218
|
Q(P.$slots, "default", {
|
|
6215
|
-
items: h(
|
|
6219
|
+
items: h(Ie),
|
|
6216
6220
|
loading: h(y),
|
|
6217
6221
|
error: h(E),
|
|
6218
6222
|
firstLoad: h(k),
|
|
@@ -6352,7 +6356,7 @@ const Eu = { class: "flex min-h-full w-full pt-20 sm:pt-0" }, Au = { class: "min
|
|
|
6352
6356
|
let e = this.component.$slots;
|
|
6353
6357
|
e == null && (e = this.component.slots);
|
|
6354
6358
|
const r = e[this.name](this.props);
|
|
6355
|
-
return
|
|
6359
|
+
return Ee(this.tag, {}, r);
|
|
6356
6360
|
}
|
|
6357
6361
|
}), Wu = H({});
|
|
6358
6362
|
const Qu = {
|
|
@@ -6471,18 +6475,18 @@ const Qo = /* @__PURE__ */ ze(Wu, [["render", Zu], ["__scopeId", "data-v-945515f
|
|
|
6471
6475
|
let u = t.value.length;
|
|
6472
6476
|
return u += l.checkable ? 1 : 0, u += l.detailed ? 1 : 0, u;
|
|
6473
6477
|
}), F = C(() => l.detailed);
|
|
6474
|
-
|
|
6478
|
+
Ae(
|
|
6475
6479
|
() => l.checkedRows,
|
|
6476
6480
|
(u) => {
|
|
6477
6481
|
s.value = [...u];
|
|
6478
6482
|
},
|
|
6479
6483
|
{ deep: !0 }
|
|
6480
|
-
),
|
|
6484
|
+
), Ae(
|
|
6481
6485
|
() => l.sortField,
|
|
6482
6486
|
() => {
|
|
6483
6487
|
ce();
|
|
6484
6488
|
}
|
|
6485
|
-
),
|
|
6489
|
+
), Ae(
|
|
6486
6490
|
() => l.sortDirection,
|
|
6487
6491
|
() => {
|
|
6488
6492
|
ce();
|
|
@@ -6577,7 +6581,7 @@ const Qo = /* @__PURE__ */ ze(Wu, [["render", Zu], ["__scopeId", "data-v-945515f
|
|
|
6577
6581
|
k.value = k.value.sort((q, P) => V.indexOf(`${q.newKey}`) - V.indexOf(`${P.newKey}`));
|
|
6578
6582
|
});
|
|
6579
6583
|
}
|
|
6580
|
-
function
|
|
6584
|
+
function Ie(u) {
|
|
6581
6585
|
k.value = k.value.filter(
|
|
6582
6586
|
(x) => x.newKey !== u.newKey
|
|
6583
6587
|
);
|
|
@@ -6595,7 +6599,7 @@ const Qo = /* @__PURE__ */ ze(Wu, [["render", Zu], ["__scopeId", "data-v-945515f
|
|
|
6595
6599
|
function ee() {
|
|
6596
6600
|
return y.value++;
|
|
6597
6601
|
}
|
|
6598
|
-
return ye("addColumn", me), ye("removeColumn",
|
|
6602
|
+
return ye("addColumn", me), ye("removeColumn", Ie), ye("nextSequence", ee), r({
|
|
6599
6603
|
newColumns: I
|
|
6600
6604
|
}), (u, x) => {
|
|
6601
6605
|
const A = _e("BaseIcon");
|
|
@@ -6937,7 +6941,7 @@ const Yo = /* @__PURE__ */ ze(Ec, [["__scopeId", "data-v-9ab7d17a"]]), Jo = H({
|
|
|
6937
6941
|
this.removeColumn(this);
|
|
6938
6942
|
},
|
|
6939
6943
|
render() {
|
|
6940
|
-
return
|
|
6944
|
+
return Ee("span", { "data-id": this.newKey }, this.label);
|
|
6941
6945
|
}
|
|
6942
6946
|
}), Ac = ["checked", "value", "onChange"], Tc = { class: "text-xs text-slate-600" }, Lc = /* @__PURE__ */ H({
|
|
6943
6947
|
__name: "BaseDataTableToggleColumns",
|
|
@@ -7119,7 +7123,7 @@ const Pc = /* @__PURE__ */ ze(Mc, [["render", Dc]]), Vc = { class: "flex justify
|
|
|
7119
7123
|
localStorage.getItem(t) + ""
|
|
7120
7124
|
);
|
|
7121
7125
|
O && et(O) && O.length > 0 && (w.value = O);
|
|
7122
|
-
const F =
|
|
7126
|
+
const F = Ae(
|
|
7123
7127
|
() => m.value,
|
|
7124
7128
|
() => {
|
|
7125
7129
|
m.value && m.value.newColumns.length && w.value.length == 0 && (w.value = m.value.newColumns.filter((d) => !d.optional).map((d) => d.newKey), F());
|
|
@@ -7372,7 +7376,7 @@ const Pc = /* @__PURE__ */ ze(Mc, [["render", Dc]]), Vc = { class: "flex justify
|
|
|
7372
7376
|
var $;
|
|
7373
7377
|
return n.modelValue && ($ = at.fromISO(n.modelValue, { zone: "utc" }).toISODate()) != null ? $ : null;
|
|
7374
7378
|
});
|
|
7375
|
-
|
|
7379
|
+
Ae(
|
|
7376
7380
|
() => k.value,
|
|
7377
7381
|
() => {
|
|
7378
7382
|
n.modelValue !== k.value && o(k.value);
|
|
@@ -7523,7 +7527,7 @@ const Pc = /* @__PURE__ */ ze(Mc, [["render", Dc]]), Vc = { class: "flex justify
|
|
|
7523
7527
|
month: null,
|
|
7524
7528
|
day: null
|
|
7525
7529
|
});
|
|
7526
|
-
|
|
7530
|
+
Ae(
|
|
7527
7531
|
() => n.modelValue,
|
|
7528
7532
|
() => {
|
|
7529
7533
|
if (n.modelValue) {
|
|
@@ -8370,7 +8374,7 @@ const Kd = /* @__PURE__ */ ze(qd, [["render", Hd]]), Gd = {
|
|
|
8370
8374
|
const r = e;
|
|
8371
8375
|
let n = null;
|
|
8372
8376
|
const l = D(!1);
|
|
8373
|
-
return
|
|
8377
|
+
return Ae(
|
|
8374
8378
|
() => r.modelValue,
|
|
8375
8379
|
(o) => {
|
|
8376
8380
|
o ? n = setTimeout(() => {
|
|
@@ -8939,17 +8943,17 @@ const ef = { class: "absolute inset-0 flex h-full w-full items-center justify-ce
|
|
|
8939
8943
|
}, ce = (oe) => {
|
|
8940
8944
|
m.value = oe, r("typing", oe);
|
|
8941
8945
|
}, me = D(null);
|
|
8942
|
-
function
|
|
8946
|
+
function Ie() {
|
|
8943
8947
|
var de, ge;
|
|
8944
8948
|
const oe = (ge = (de = me.value) == null ? void 0 : de.querySelectorAll("button, a")) != null ? ge : [];
|
|
8945
8949
|
F(oe);
|
|
8946
8950
|
}
|
|
8947
8951
|
return xe(() => {
|
|
8948
|
-
|
|
8952
|
+
Ie();
|
|
8949
8953
|
}), mn(
|
|
8950
8954
|
me,
|
|
8951
8955
|
() => {
|
|
8952
|
-
|
|
8956
|
+
Ie();
|
|
8953
8957
|
},
|
|
8954
8958
|
{ attributes: !1, childList: !0 }
|
|
8955
8959
|
), (oe, de) => (b(), T("div", null, [
|
|
@@ -9211,7 +9215,7 @@ const ef = { class: "absolute inset-0 flex h-full w-full items-center justify-ce
|
|
|
9211
9215
|
emits: ["update:modelValue"],
|
|
9212
9216
|
setup(e, { emit: r }) {
|
|
9213
9217
|
const n = e, l = D(n.currentModels);
|
|
9214
|
-
|
|
9218
|
+
Ae(
|
|
9215
9219
|
() => n.currentModels,
|
|
9216
9220
|
(a, s) => {
|
|
9217
9221
|
l.value = a;
|
package/package.json
CHANGED
|
@@ -267,6 +267,21 @@ const normalizedOptions = hasOptions.normalizedOptions;
|
|
|
267
267
|
const normalizedModelValue =
|
|
268
268
|
hasOptions.normalizedModelValue as ComputedRef<NormalizedOption | null>;
|
|
269
269
|
|
|
270
|
+
const filteredNormalizedOptions = computed((): NormalizedOption[] => {
|
|
271
|
+
if (shouldFilter.value === false) {
|
|
272
|
+
return normalizedOptions.value;
|
|
273
|
+
}
|
|
274
|
+
return normalizedOptions.value.filter((option) => {
|
|
275
|
+
if (props.filter !== undefined) {
|
|
276
|
+
return props.filter(option);
|
|
277
|
+
}
|
|
278
|
+
if (!option.label) {
|
|
279
|
+
return false;
|
|
280
|
+
}
|
|
281
|
+
return option.label.toLowerCase().includes(keywords.value.toLowerCase());
|
|
282
|
+
});
|
|
283
|
+
});
|
|
284
|
+
|
|
270
285
|
const optionActive = computed(() => {
|
|
271
286
|
return (
|
|
272
287
|
filteredNormalizedOptions.value[
|
|
@@ -284,9 +299,12 @@ watch(
|
|
|
284
299
|
}
|
|
285
300
|
if (normalizedModelValue.value) {
|
|
286
301
|
setKeywords(normalizedModelValue.value?.label);
|
|
287
|
-
|
|
302
|
+
const index = filteredNormalizedOptions.value.findIndex(
|
|
288
303
|
(option) => option.value === normalizedModelValue.value?.value
|
|
289
304
|
);
|
|
305
|
+
if (index >= 0) {
|
|
306
|
+
selectionIndex.value = index;
|
|
307
|
+
}
|
|
290
308
|
} else {
|
|
291
309
|
selectionIndex.value = 0;
|
|
292
310
|
setKeywords('');
|
|
@@ -295,21 +313,6 @@ watch(
|
|
|
295
313
|
{ immediate: true }
|
|
296
314
|
);
|
|
297
315
|
|
|
298
|
-
const filteredNormalizedOptions = computed((): NormalizedOption[] => {
|
|
299
|
-
if (shouldFilter.value === false) {
|
|
300
|
-
return normalizedOptions.value;
|
|
301
|
-
}
|
|
302
|
-
return normalizedOptions.value.filter((option) => {
|
|
303
|
-
if (props.filter !== undefined) {
|
|
304
|
-
return props.filter(option);
|
|
305
|
-
}
|
|
306
|
-
if (!option.label) {
|
|
307
|
-
return false;
|
|
308
|
-
}
|
|
309
|
-
return option.label.toLowerCase().includes(keywords.value.toLowerCase());
|
|
310
|
-
});
|
|
311
|
-
});
|
|
312
|
-
|
|
313
316
|
onMounted(() => {
|
|
314
317
|
window.addEventListener('mousedown', onMouseDown);
|
|
315
318
|
});
|