@contentstudio/ui 0.1.7 → 0.1.9
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/index.d.ts +1 -0
- package/dist/index.js +315 -309
- package/dist/index.umd.cjs +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as A, computed as g, openBlock as f, createElementBlock as x, normalizeClass as v, renderSlot as O, createElementVNode as w, createCommentVNode as B, withKeys as At, withModifiers as lt, toDisplayString as V, createTextVNode as te, mergeProps as ee, createBlock as K, resolveDynamicComponent as ge, ref as _, watch as se, onMounted as He, onUnmounted as rt, withDirectives as he, vModelText as Vt, Fragment as oe, renderList as _e, vShow as Ae, normalizeStyle as E, unref as P, Transition as ke, withCtx as ae, Teleport as it, createVNode as me, shallowRef as Pt, getCurrentScope as ut, onScopeDispose as ct, shallowReadonly as ce, readonly as Rt, toValue as Dt, inject as dt, provide as pt, createStaticVNode as Tt, nextTick as Mt } from "vue";
|
|
2
2
|
const Ne = {
|
|
3
3
|
primary: {
|
|
4
4
|
base: "blue",
|
|
@@ -246,7 +246,7 @@ const Ne = {
|
|
|
246
246
|
return [(e = n == null ? void 0 : n.padding) == null ? void 0 : e.x, (o = n == null ? void 0 : n.padding) == null ? void 0 : o.y, n == null ? void 0 : n.text, n == null ? void 0 : n.gap].filter(Boolean).join(" ");
|
|
247
247
|
}
|
|
248
248
|
return t[s];
|
|
249
|
-
}, ft = (s, t) => qe[t][s].icon || "",
|
|
249
|
+
}, ft = (s, t) => qe[t][s].icon || "", Ve = (s, t) => qe[t][s].height || "", Ye = (s) => {
|
|
250
250
|
switch (s) {
|
|
251
251
|
case "xs":
|
|
252
252
|
return "cstu-text-xs";
|
|
@@ -285,7 +285,7 @@ const Ne = {
|
|
|
285
285
|
}, Ht = (s, t = "primary") => {
|
|
286
286
|
const e = [];
|
|
287
287
|
return s.hover && e.push(`hover:cstu-bg-${t}-50`), s.active && e.push(`active:cstu-bg-${t}-100`), s.focus && e.push(`focus:cstu-outline-none focus:cstu-ring-2 focus:cstu-ring-${t}-500/20 focus:cstu-border-${t}-500`), e.join(" ");
|
|
288
|
-
}, Nt = ["disabled", "type"], qt = { key: 0 }, Sn = /* @__PURE__ */
|
|
288
|
+
}, Nt = ["disabled", "type"], qt = { key: 0 }, Sn = /* @__PURE__ */ A({
|
|
289
289
|
__name: "Button",
|
|
290
290
|
props: {
|
|
291
291
|
variant: { default: "filled" },
|
|
@@ -319,8 +319,8 @@ const Ne = {
|
|
|
319
319
|
})[i] || "cstu-rounded-lg", r = (i) => {
|
|
320
320
|
if (!i)
|
|
321
321
|
return "bg-gradient-to-r";
|
|
322
|
-
const
|
|
323
|
-
return
|
|
322
|
+
const u = (i % 360 + 360) % 360;
|
|
323
|
+
return u >= 337.5 || u < 22.5 ? "cstu-bg-gradient-to-r" : u >= 22.5 && u < 67.5 ? "cstu-bg-gradient-to-tr" : u >= 67.5 && u < 112.5 ? "cstu-bg-gradient-to-t" : u >= 112.5 && u < 157.5 ? "cstu-bg-gradient-to-tl" : u >= 157.5 && u < 202.5 ? "cstu-bg-gradient-to-l" : u >= 202.5 && u < 247.5 ? "cstu-bg-gradient-to-bl" : u >= 247.5 && u < 292.5 ? "cstu-bg-gradient-to-b" : "cstu-bg-gradient-to-br";
|
|
324
324
|
}, l = g(() => {
|
|
325
325
|
const i = "cstu-inline-flex cstu-items-center cstu-justify-center cstu-font-medium cstu-transition-all cstu-duration-200";
|
|
326
326
|
if (e.variant === "gradient" && e.gradient) {
|
|
@@ -340,18 +340,18 @@ const Ne = {
|
|
|
340
340
|
}
|
|
341
341
|
];
|
|
342
342
|
}
|
|
343
|
-
const
|
|
343
|
+
const u = ne(e.color, e.variant, {
|
|
344
344
|
hover: !0,
|
|
345
345
|
active: !0,
|
|
346
346
|
focus: !0
|
|
347
|
-
}),
|
|
347
|
+
}), c = I(e.size, "button"), p = e.leftSection || e.rightSection ? ft(e.size, "button") : "", h = le({
|
|
348
348
|
disabled: e.disabled,
|
|
349
349
|
loading: e.loading
|
|
350
|
-
}), d =
|
|
350
|
+
}), d = Ve(e.size, "button"), m = a(e.radius);
|
|
351
351
|
return [
|
|
352
352
|
i,
|
|
353
|
-
c,
|
|
354
353
|
u,
|
|
354
|
+
c,
|
|
355
355
|
d,
|
|
356
356
|
p,
|
|
357
357
|
h,
|
|
@@ -362,17 +362,17 @@ const Ne = {
|
|
|
362
362
|
}
|
|
363
363
|
];
|
|
364
364
|
});
|
|
365
|
-
return (i,
|
|
365
|
+
return (i, u) => (f(), x("button", {
|
|
366
366
|
class: v(l.value),
|
|
367
367
|
disabled: i.disabled || i.loading,
|
|
368
368
|
type: i.type,
|
|
369
369
|
onClick: n
|
|
370
370
|
}, [
|
|
371
|
-
|
|
372
|
-
|
|
371
|
+
O(i.$slots, "leftSection"),
|
|
372
|
+
O(i.$slots, "default"),
|
|
373
373
|
i.loading ? (f(), x("span", qt, [
|
|
374
|
-
|
|
375
|
-
|
|
374
|
+
O(i.$slots, "loader", {}, () => [
|
|
375
|
+
u[0] || (u[0] = w("svg", {
|
|
376
376
|
class: "animate-spin h-4 w-4",
|
|
377
377
|
xmlns: "http://www.w3.org/2000/svg",
|
|
378
378
|
fill: "none",
|
|
@@ -394,7 +394,7 @@ const Ne = {
|
|
|
394
394
|
], -1))
|
|
395
395
|
])
|
|
396
396
|
])) : B("", !0),
|
|
397
|
-
|
|
397
|
+
O(i.$slots, "rightSection")
|
|
398
398
|
], 10, Nt));
|
|
399
399
|
}
|
|
400
400
|
}), ht = (s) => {
|
|
@@ -443,7 +443,7 @@ const Ne = {
|
|
|
443
443
|
class: "cstu-text-sm cstu-text-red-500 cstu-mt-0.5"
|
|
444
444
|
}, Xt = {
|
|
445
445
|
name: "Checkbox"
|
|
446
|
-
}, Ln = /* @__PURE__ */
|
|
446
|
+
}, Ln = /* @__PURE__ */ A({
|
|
447
447
|
...Xt,
|
|
448
448
|
props: {
|
|
449
449
|
modelValue: { type: [Boolean, Array], default: !1 },
|
|
@@ -475,11 +475,11 @@ const Ne = {
|
|
|
475
475
|
error: e.error
|
|
476
476
|
})), i = g(() => mt({
|
|
477
477
|
color: e.color
|
|
478
|
-
})),
|
|
478
|
+
})), u = g(() => [
|
|
479
479
|
"cstu-flex",
|
|
480
480
|
"cstu-flex-col",
|
|
481
481
|
e.labelPosition === "left" ? "cstu-order-first" : ""
|
|
482
|
-
]),
|
|
482
|
+
]), c = {
|
|
483
483
|
primary: "blue-450",
|
|
484
484
|
secondary: "gray-500",
|
|
485
485
|
success: "green-500",
|
|
@@ -501,9 +501,9 @@ const Ne = {
|
|
|
501
501
|
e.size === "md" ? "cstu-h-[16px] cstu-w-[16px] cstu-rounded-md" : "",
|
|
502
502
|
e.size === "lg" ? "cstu-h-[18px] cstu-w-[18px] cstu-rounded-md" : "",
|
|
503
503
|
e.size === "xl" ? "cstu-h-[20px] cstu-w-[20px] cstu-rounded-md" : "",
|
|
504
|
-
e.disabled ? "cstu-bg-gray-200 cstu-border cstu-border-gray-200 cstu-cursor-not-allowed" : n.value || e.indeterminate ? e.variant === "outlined" ? `cstu-bg-transparent cstu-border cstu-border-${
|
|
504
|
+
e.disabled ? "cstu-bg-gray-200 cstu-border cstu-border-gray-200 cstu-cursor-not-allowed" : n.value || e.indeterminate ? e.variant === "outlined" ? `cstu-bg-transparent cstu-border cstu-border-${c[e.color]}` : `cstu-bg-${c[e.color]} cstu-border-${c[e.color]}` : "cstu-bg-white cstu-border cstu-border-gray-400/50"
|
|
505
505
|
]), h = g(() => [
|
|
506
|
-
e.variant === "outlined" && (n.value || e.indeterminate) ? `cstu-text-${
|
|
506
|
+
e.variant === "outlined" && (n.value || e.indeterminate) ? `cstu-text-${c[e.color]}` : e.disabled ? "cstu-text-gray-300" : "cstu-text-white",
|
|
507
507
|
e.size === "xs" ? "cstu-h-[6px] cstu-w-[6px]" : "",
|
|
508
508
|
e.size === "sm" ? "cstu-h-[7px] cstu-w-[7px]" : "",
|
|
509
509
|
e.size === "md" ? "cstu-h-[8px] cstu-w-[8px]" : "",
|
|
@@ -522,7 +522,7 @@ const Ne = {
|
|
|
522
522
|
role: "checkbox",
|
|
523
523
|
"aria-disabled": m.disabled,
|
|
524
524
|
tabindex: "0",
|
|
525
|
-
onKeydown:
|
|
525
|
+
onKeydown: At(lt(r, ["prevent"]), ["space"])
|
|
526
526
|
}, [
|
|
527
527
|
n.value && !m.indeterminate ? (f(), x("svg", {
|
|
528
528
|
key: 0,
|
|
@@ -557,22 +557,22 @@ const Ne = {
|
|
|
557
557
|
], 42, Yt),
|
|
558
558
|
m.label || m.description ? (f(), x("div", {
|
|
559
559
|
key: 0,
|
|
560
|
-
class: v(
|
|
560
|
+
class: v(u.value)
|
|
561
561
|
}, [
|
|
562
562
|
m.label ? (f(), x("label", {
|
|
563
563
|
key: 0,
|
|
564
564
|
class: v([l.value, "cstu-pt-0.5"]),
|
|
565
565
|
onClick: r
|
|
566
|
-
},
|
|
566
|
+
}, V(m.label), 3)) : B("", !0),
|
|
567
567
|
m.description ? (f(), x("div", {
|
|
568
568
|
key: 1,
|
|
569
569
|
class: v(i.value)
|
|
570
|
-
},
|
|
571
|
-
m.error ? (f(), x("div", Kt,
|
|
570
|
+
}, V(m.description), 3)) : B("", !0),
|
|
571
|
+
m.error ? (f(), x("div", Kt, V(m.error), 1)) : B("", !0)
|
|
572
572
|
], 2)) : B("", !0)
|
|
573
573
|
], 2));
|
|
574
574
|
}
|
|
575
|
-
}), Gt = ["aria-checked", "aria-disabled"], Ut = ["id", "checked", "disabled", "value"], Zt = ["for"],
|
|
575
|
+
}), Gt = ["aria-checked", "aria-disabled"], Ut = ["id", "checked", "disabled", "value"], Zt = ["for"], On = /* @__PURE__ */ A({
|
|
576
576
|
__name: "Radio",
|
|
577
577
|
props: {
|
|
578
578
|
modelValue: { default: void 0 },
|
|
@@ -616,12 +616,12 @@ const Ne = {
|
|
|
616
616
|
}),
|
|
617
617
|
"cstu-flex cstu-items-center cstu-gap-2",
|
|
618
618
|
e.labelPosition === "left" ? "cstu-flex-row-reverse" : "cstu-flex-row"
|
|
619
|
-
]),
|
|
619
|
+
]), u = g(() => [
|
|
620
620
|
"cstu-relative cstu-flex cstu-items-center cstu-justify-center cstu-rounded-full cstu-transition-colors cstu-duration-200",
|
|
621
621
|
y.value,
|
|
622
622
|
r.value ? e.variant === "outlined" ? `cstu-bg-white !cstu-border-2 cstu-border-${n[e.color]}` : `cstu-bg-${o[e.color]} cstu-border cstu-border-${o[e.color]}` : e.variant === "outlined" ? `cstu-bg-white !cstu-border-2 cstu-border-${n[e.color]}` : "cstu-bg-white cstu-border cstu-border-gray-300 hover:cstu-border-gray-400",
|
|
623
623
|
e.disabled ? "cstu-opacity-50 cstu-cursor-not-allowed !cstu-bg-gray-200 !cstu-border-gray-300" : "cstu-cursor-pointer"
|
|
624
|
-
]),
|
|
624
|
+
]), c = g(() => [
|
|
625
625
|
"cstu-rounded-full",
|
|
626
626
|
C.value,
|
|
627
627
|
e.variant === "outlined" ? `cstu-bg-${o[e.color]}` : "cstu-bg-white",
|
|
@@ -668,11 +668,11 @@ const Ne = {
|
|
|
668
668
|
class: "cstu-sr-only cstu-border-2"
|
|
669
669
|
}, null, 40, Ut),
|
|
670
670
|
w("div", {
|
|
671
|
-
class: v(
|
|
671
|
+
class: v(u.value)
|
|
672
672
|
}, [
|
|
673
673
|
r.value ? (f(), x("div", {
|
|
674
674
|
key: 0,
|
|
675
|
-
class: v([
|
|
675
|
+
class: v([c.value, "cstu-absolute cstu-left-1/2 cstu-top-1/2 cstu--translate-x-1/2 cstu--translate-y-1/2 cstu-transition-transform cstu-duration-200 cstu-ease-in-out"])
|
|
676
676
|
}, null, 2)) : B("", !0)
|
|
677
677
|
], 2),
|
|
678
678
|
w("div", {
|
|
@@ -683,24 +683,24 @@ const Ne = {
|
|
|
683
683
|
for: $.id,
|
|
684
684
|
class: v(p.value)
|
|
685
685
|
}, [
|
|
686
|
-
|
|
687
|
-
te(
|
|
686
|
+
O($.$slots, "label", {}, () => [
|
|
687
|
+
te(V($.label), 1)
|
|
688
688
|
])
|
|
689
689
|
], 10, Zt)) : B("", !0),
|
|
690
690
|
$.description ? (f(), x("div", {
|
|
691
691
|
key: 1,
|
|
692
692
|
class: v(h.value)
|
|
693
693
|
}, [
|
|
694
|
-
|
|
695
|
-
te(
|
|
694
|
+
O($.$slots, "description", {}, () => [
|
|
695
|
+
te(V($.description), 1)
|
|
696
696
|
])
|
|
697
697
|
], 2)) : B("", !0),
|
|
698
698
|
$.error ? (f(), x("div", {
|
|
699
699
|
key: 2,
|
|
700
700
|
class: v(d.value)
|
|
701
701
|
}, [
|
|
702
|
-
|
|
703
|
-
te(
|
|
702
|
+
O($.$slots, "error", {}, () => [
|
|
703
|
+
te(V($.error), 1)
|
|
704
704
|
])
|
|
705
705
|
], 2)) : B("", !0)
|
|
706
706
|
], 2)
|
|
@@ -710,7 +710,7 @@ const Ne = {
|
|
|
710
710
|
key: 0,
|
|
711
711
|
class: "text-red-500",
|
|
712
712
|
"aria-hidden": "true"
|
|
713
|
-
}, es = { class: "relative" }, ts = ["id", "type", "value", "placeholder", "disabled", "required"],
|
|
713
|
+
}, es = { class: "relative" }, ts = ["id", "type", "value", "placeholder", "disabled", "required"], _n = /* @__PURE__ */ A({
|
|
714
714
|
__name: "TextInput",
|
|
715
715
|
props: {
|
|
716
716
|
id: {},
|
|
@@ -756,10 +756,10 @@ const Ne = {
|
|
|
756
756
|
], a = I(t.size, "input"), r = I(t.size, "input"), l = le({
|
|
757
757
|
disabled: t.disabled,
|
|
758
758
|
error: t.withError || !!t.error
|
|
759
|
-
}), i = e(t.radius),
|
|
759
|
+
}), i = e(t.radius), u = {
|
|
760
760
|
left: t.leftSection ? "pl-10" : "",
|
|
761
761
|
right: t.rightSection ? "pr-10" : ""
|
|
762
|
-
},
|
|
762
|
+
}, c = t.disabled ? "" : [
|
|
763
763
|
t.withError || t.error ? "focus:ring-red-500/20 focus:border-red-500" : "focus:ring-blue-500/20 focus:border-blue-500",
|
|
764
764
|
"hover:border-gray-300"
|
|
765
765
|
];
|
|
@@ -769,9 +769,9 @@ const Ne = {
|
|
|
769
769
|
r,
|
|
770
770
|
l,
|
|
771
771
|
i,
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
772
|
+
u.left,
|
|
773
|
+
u.right,
|
|
774
|
+
c
|
|
775
775
|
].filter(Boolean).join(" ");
|
|
776
776
|
});
|
|
777
777
|
return (n, a) => (f(), x("div", ee({
|
|
@@ -785,7 +785,7 @@ const Ne = {
|
|
|
785
785
|
for: n.id,
|
|
786
786
|
class: "mb-1 text-sm font-medium text-gray-700 flex items-center gap-1"
|
|
787
787
|
}, n.labelProps), [
|
|
788
|
-
te(
|
|
788
|
+
te(V(n.label) + " ", 1),
|
|
789
789
|
n.required || n.withAsterisk ? (f(), x("span", Jt, "*")) : B("", !0)
|
|
790
790
|
], 16, Qt)) : B("", !0),
|
|
791
791
|
w("div", es, [
|
|
@@ -815,11 +815,11 @@ const Ne = {
|
|
|
815
815
|
n.description ? (f(), x("p", ee({
|
|
816
816
|
key: 1,
|
|
817
817
|
class: "mt-1 text-sm text-gray-500"
|
|
818
|
-
}, n.descriptionProps),
|
|
818
|
+
}, n.descriptionProps), V(n.description), 17)) : B("", !0),
|
|
819
819
|
n.error ? (f(), x("p", ee({
|
|
820
820
|
key: 2,
|
|
821
821
|
class: "mt-1 text-sm text-red-500"
|
|
822
|
-
}, n.errorProps),
|
|
822
|
+
}, n.errorProps), V(n.error), 17)) : B("", !0)
|
|
823
823
|
], 16));
|
|
824
824
|
}
|
|
825
825
|
}), ss = ["aria-expanded", "aria-disabled"], ns = ["placeholder", "disabled"], os = {
|
|
@@ -831,7 +831,7 @@ const Ne = {
|
|
|
831
831
|
}, rs = ["onClick"], is = {
|
|
832
832
|
key: 0,
|
|
833
833
|
class: "py-3 px-4 text-gray-500 text-center text-sm"
|
|
834
|
-
},
|
|
834
|
+
}, An = /* @__PURE__ */ A({
|
|
835
835
|
__name: "Select",
|
|
836
836
|
props: {
|
|
837
837
|
modelValue: { default: null },
|
|
@@ -852,7 +852,7 @@ const Ne = {
|
|
|
852
852
|
},
|
|
853
853
|
emits: ["update:modelValue", "change"],
|
|
854
854
|
setup(s, { emit: t }) {
|
|
855
|
-
const e = s, o = t, n =
|
|
855
|
+
const e = s, o = t, n = _(!1), a = _(""), r = _(null), l = _(null), i = (b) => ({
|
|
856
856
|
none: "rounded-none",
|
|
857
857
|
xs: "rounded",
|
|
858
858
|
sm: "rounded-md",
|
|
@@ -860,23 +860,23 @@ const Ne = {
|
|
|
860
860
|
lg: "rounded-xl",
|
|
861
861
|
xl: "rounded-2xl",
|
|
862
862
|
full: "rounded-full"
|
|
863
|
-
})[b] || "rounded-lg",
|
|
863
|
+
})[b] || "rounded-lg", u = g(() => {
|
|
864
864
|
const b = "w-full flex items-center justify-between transition-colors duration-200", z = [
|
|
865
865
|
I(e.size, "input"),
|
|
866
|
-
|
|
866
|
+
Ve(e.size, "input")
|
|
867
867
|
].join(" "), k = i(e.radius), S = e.error ? "focus-within:ring-2 focus-within:ring-red-500/20 focus-within:border-red-500" : "focus-within:ring-2 focus-within:ring-blue-500/20 focus-within:border-blue-500", T = e.variant === "filled" ? `bg-gray-50 border border-transparent ${!e.disabled && `hover:bg-gray-100 focus-within:bg-white focus-within:border-gray-300 ${S}`}` : `bg-white border border-gray-300 ${!e.disabled && `hover:border-gray-400 ${S}`}`, L = le({
|
|
868
868
|
disabled: e.disabled,
|
|
869
869
|
error: e.error
|
|
870
|
-
}),
|
|
870
|
+
}), R = !e.disabled && "cursor-pointer";
|
|
871
871
|
return [
|
|
872
872
|
b,
|
|
873
873
|
z,
|
|
874
874
|
k,
|
|
875
875
|
T,
|
|
876
876
|
L,
|
|
877
|
-
|
|
877
|
+
R
|
|
878
878
|
].filter(Boolean).join(" ");
|
|
879
|
-
}),
|
|
879
|
+
}), c = g(() => e.options.find((b) => b.value === e.modelValue)), p = g(() => {
|
|
880
880
|
if (!a.value)
|
|
881
881
|
return e.options;
|
|
882
882
|
const b = a.value.toLowerCase();
|
|
@@ -899,7 +899,7 @@ const Ne = {
|
|
|
899
899
|
l.value && !l.value.contains(z) && (n.value = !1);
|
|
900
900
|
};
|
|
901
901
|
return se(() => e.modelValue, (b) => {
|
|
902
|
-
b ?
|
|
902
|
+
b ? c.value && e.searchable && (a.value = c.value.label) : a.value = "";
|
|
903
903
|
}), He(() => {
|
|
904
904
|
document.addEventListener("click", $);
|
|
905
905
|
}), rt(() => {
|
|
@@ -910,7 +910,7 @@ const Ne = {
|
|
|
910
910
|
ref: l
|
|
911
911
|
}, [
|
|
912
912
|
w("div", {
|
|
913
|
-
class: v(
|
|
913
|
+
class: v(u.value),
|
|
914
914
|
role: "combobox",
|
|
915
915
|
"aria-expanded": n.value,
|
|
916
916
|
"aria-disabled": b.disabled,
|
|
@@ -928,8 +928,8 @@ const Ne = {
|
|
|
928
928
|
onFocus: y,
|
|
929
929
|
onInput: C
|
|
930
930
|
}, null, 40, ns)), [
|
|
931
|
-
[
|
|
932
|
-
]) : (f(), x("div", os,
|
|
931
|
+
[Vt, a.value]
|
|
932
|
+
]) : (f(), x("div", os, V(c.value ? c.value.label : b.placeholder), 1)),
|
|
933
933
|
w("div", as, [
|
|
934
934
|
b.clearable && b.modelValue && !b.disabled ? (f(), x("button", {
|
|
935
935
|
key: 0,
|
|
@@ -976,7 +976,7 @@ const Ne = {
|
|
|
976
976
|
])
|
|
977
977
|
}, [
|
|
978
978
|
b.loading ? (f(), x("div", ls, [
|
|
979
|
-
|
|
979
|
+
O(b.$slots, "loader", {}, () => [
|
|
980
980
|
z[3] || (z[3] = w("svg", {
|
|
981
981
|
class: "animate-spin h-5 w-5 mx-auto",
|
|
982
982
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -999,7 +999,7 @@ const Ne = {
|
|
|
999
999
|
], -1))
|
|
1000
1000
|
])
|
|
1001
1001
|
])) : (f(), x(oe, { key: 1 }, [
|
|
1002
|
-
(f(!0), x(oe, null,
|
|
1002
|
+
(f(!0), x(oe, null, _e(p.value, (k) => (f(), x("div", {
|
|
1003
1003
|
key: k.value,
|
|
1004
1004
|
class: v([
|
|
1005
1005
|
"py-2.5 px-4 flex items-center transition-colors duration-200",
|
|
@@ -1029,12 +1029,12 @@ const Ne = {
|
|
|
1029
1029
|
]), 2)) : B("", !0),
|
|
1030
1030
|
w("span", {
|
|
1031
1031
|
class: v({ "text-gray-500": k.disabled })
|
|
1032
|
-
},
|
|
1032
|
+
}, V(k.label), 3)
|
|
1033
1033
|
], 10, rs))), 128)),
|
|
1034
|
-
p.value.length === 0 ? (f(), x("div", is,
|
|
1034
|
+
p.value.length === 0 ? (f(), x("div", is, V(b.nothingFoundMessage || "No options found"), 1)) : B("", !0)
|
|
1035
1035
|
], 64))
|
|
1036
1036
|
], 2), [
|
|
1037
|
-
[
|
|
1037
|
+
[Ae, n.value]
|
|
1038
1038
|
])
|
|
1039
1039
|
], 512));
|
|
1040
1040
|
}
|
|
@@ -1046,7 +1046,7 @@ const Ne = {
|
|
|
1046
1046
|
}, ds = {
|
|
1047
1047
|
key: 1,
|
|
1048
1048
|
class: "animate-spin"
|
|
1049
|
-
},
|
|
1049
|
+
}, Vn = /* @__PURE__ */ A({
|
|
1050
1050
|
__name: "Chip",
|
|
1051
1051
|
props: {
|
|
1052
1052
|
modelValue: { type: Boolean, default: !1 },
|
|
@@ -1068,30 +1068,30 @@ const Ne = {
|
|
|
1068
1068
|
const e = s, o = t, n = g(() => ne(e.color)), a = g(() => I(e.size, "chip")), r = g(() => le({
|
|
1069
1069
|
disabled: e.disabled,
|
|
1070
1070
|
loading: e.loading
|
|
1071
|
-
})), l = g(() => ne(e.color, "filled")), i = g(() => ne(e.color, "outline")),
|
|
1071
|
+
})), l = g(() => ne(e.color, "filled")), i = g(() => ne(e.color, "outline")), u = () => {
|
|
1072
1072
|
e.disabled || e.loading || e.modelValue && !e.allowDeselect || o("update:modelValue", !e.modelValue);
|
|
1073
1073
|
};
|
|
1074
|
-
return (
|
|
1074
|
+
return (c, p) => (f(), x("button", {
|
|
1075
1075
|
class: v([
|
|
1076
1076
|
"inline-flex items-center justify-center gap-2 rounded-full transition-colors duration-200 select-none",
|
|
1077
1077
|
"focus:outline-none",
|
|
1078
1078
|
n.value,
|
|
1079
1079
|
a.value,
|
|
1080
1080
|
r.value,
|
|
1081
|
-
|
|
1081
|
+
c.modelValue ? l.value : i.value,
|
|
1082
1082
|
"cursor-pointer"
|
|
1083
1083
|
]),
|
|
1084
|
-
disabled:
|
|
1085
|
-
onClick:
|
|
1084
|
+
disabled: c.disabled || c.loading,
|
|
1085
|
+
onClick: u
|
|
1086
1086
|
}, [
|
|
1087
|
-
|
|
1087
|
+
c.withCheckIcon && c.modelValue ? (f(), x("svg", cs, p[0] || (p[0] = [
|
|
1088
1088
|
w("path", {
|
|
1089
1089
|
"fill-rule": "evenodd",
|
|
1090
1090
|
d: "M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z",
|
|
1091
1091
|
"clip-rule": "evenodd"
|
|
1092
1092
|
}, null, -1)
|
|
1093
1093
|
]))) : B("", !0),
|
|
1094
|
-
|
|
1094
|
+
c.loading ? (f(), x("span", ds, p[1] || (p[1] = [
|
|
1095
1095
|
w("svg", {
|
|
1096
1096
|
class: "w-3.5 h-3.5",
|
|
1097
1097
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -1116,9 +1116,9 @@ const Ne = {
|
|
|
1116
1116
|
w("span", {
|
|
1117
1117
|
class: v([
|
|
1118
1118
|
"whitespace-nowrap",
|
|
1119
|
-
|
|
1119
|
+
c.loading ? "opacity-75" : ""
|
|
1120
1120
|
])
|
|
1121
|
-
},
|
|
1121
|
+
}, V(c.label), 3)
|
|
1122
1122
|
], 10, us));
|
|
1123
1123
|
}
|
|
1124
1124
|
}), ps = (s, t = 0) => {
|
|
@@ -1133,7 +1133,7 @@ const Ne = {
|
|
|
1133
1133
|
return e;
|
|
1134
1134
|
}, fs = {
|
|
1135
1135
|
name: "Indicator"
|
|
1136
|
-
}, gs = /* @__PURE__ */
|
|
1136
|
+
}, gs = /* @__PURE__ */ A({
|
|
1137
1137
|
...fs,
|
|
1138
1138
|
props: {
|
|
1139
1139
|
position: { default: "top-end" },
|
|
@@ -1162,7 +1162,7 @@ const Ne = {
|
|
|
1162
1162
|
"select-none",
|
|
1163
1163
|
"rounded-full",
|
|
1164
1164
|
// Size classes
|
|
1165
|
-
|
|
1165
|
+
Ve(t.size, "indicator"),
|
|
1166
1166
|
I(t.size, "indicator"),
|
|
1167
1167
|
// Color classes
|
|
1168
1168
|
!t.disabled && `bg-${t.color === "primary" ? "blue" : t.color}-600 text-white`,
|
|
@@ -1183,8 +1183,8 @@ const Ne = {
|
|
|
1183
1183
|
key: 0,
|
|
1184
1184
|
class: v(n.value),
|
|
1185
1185
|
style: E(a.value)
|
|
1186
|
-
},
|
|
1187
|
-
|
|
1186
|
+
}, V(r.label), 7)),
|
|
1187
|
+
O(r.$slots, "default", {}, void 0, !0)
|
|
1188
1188
|
], 6));
|
|
1189
1189
|
}
|
|
1190
1190
|
});
|
|
@@ -1193,7 +1193,7 @@ const hs = (s, t) => {
|
|
|
1193
1193
|
for (const [o, n] of t)
|
|
1194
1194
|
e[o] = n;
|
|
1195
1195
|
return e;
|
|
1196
|
-
},
|
|
1196
|
+
}, Pn = /* @__PURE__ */ hs(gs, [["__scopeId", "data-v-643e9acf"]]), ms = ["aria-valuenow"], Rn = /* @__PURE__ */ A({
|
|
1197
1197
|
__name: "Progress",
|
|
1198
1198
|
props: {
|
|
1199
1199
|
value: { default: 0 },
|
|
@@ -1208,7 +1208,7 @@ const hs = (s, t) => {
|
|
|
1208
1208
|
class: v([
|
|
1209
1209
|
"relative w-full rounded-sm overflow-hidden",
|
|
1210
1210
|
"bg-gray-100",
|
|
1211
|
-
|
|
1211
|
+
P(Ve)(t.size, "progress")
|
|
1212
1212
|
]),
|
|
1213
1213
|
role: "progressbar",
|
|
1214
1214
|
"aria-valuenow": t.value,
|
|
@@ -1218,7 +1218,7 @@ const hs = (s, t) => {
|
|
|
1218
1218
|
w("div", {
|
|
1219
1219
|
class: v([
|
|
1220
1220
|
"h-full transition-all duration-300 ease-in-out",
|
|
1221
|
-
|
|
1221
|
+
P(ne)(t.color || "primary", "filled"),
|
|
1222
1222
|
{
|
|
1223
1223
|
"bg-striped": t.striped && !t.animated,
|
|
1224
1224
|
"bg-striped animate-progress": t.animated
|
|
@@ -1230,9 +1230,9 @@ const hs = (s, t) => {
|
|
|
1230
1230
|
key: 0,
|
|
1231
1231
|
class: v([
|
|
1232
1232
|
"block px-2 py-1 text-white whitespace-nowrap font-medium leading-none",
|
|
1233
|
-
|
|
1233
|
+
P(Ye)(t.size)
|
|
1234
1234
|
])
|
|
1235
|
-
},
|
|
1235
|
+
}, V(t.label), 3)) : B("", !0)
|
|
1236
1236
|
], 6)
|
|
1237
1237
|
], 10, ms));
|
|
1238
1238
|
}
|
|
@@ -1246,7 +1246,7 @@ const xs = {
|
|
|
1246
1246
|
}, bs = {
|
|
1247
1247
|
key: 1,
|
|
1248
1248
|
class: "flex-shrink-0 ml-3"
|
|
1249
|
-
}, vs = ["disabled"], Dn = /* @__PURE__ */
|
|
1249
|
+
}, vs = ["disabled"], Dn = /* @__PURE__ */ A({
|
|
1250
1250
|
__name: "Alert",
|
|
1251
1251
|
props: {
|
|
1252
1252
|
title: {},
|
|
@@ -1269,7 +1269,7 @@ const xs = {
|
|
|
1269
1269
|
active: !1,
|
|
1270
1270
|
focus: !1,
|
|
1271
1271
|
disabled: e.disabled
|
|
1272
|
-
})), a = g(() => jt(e.variant)), r = g(() => Et(e.color, e.variant)), l = g(() => It(e.color, e.variant)), i = g(() => I(e.size, "alert")),
|
|
1272
|
+
})), a = g(() => jt(e.variant)), r = g(() => Et(e.color, e.variant)), l = g(() => It(e.color, e.variant)), i = g(() => I(e.size, "alert")), u = g(() => ft(e.size, "alert")), c = g(() => Ye(e.size)), p = g(() => gt(e.size)), h = g(() => le({
|
|
1273
1273
|
disabled: e.disabled,
|
|
1274
1274
|
loading: e.loading
|
|
1275
1275
|
})), d = g(() => Ft({
|
|
@@ -1298,7 +1298,7 @@ const xs = {
|
|
|
1298
1298
|
C.icon ? (f(), x("div", xs, [
|
|
1299
1299
|
(f(), K(ge(C.icon), {
|
|
1300
1300
|
class: v([
|
|
1301
|
-
|
|
1301
|
+
u.value,
|
|
1302
1302
|
r.value
|
|
1303
1303
|
])
|
|
1304
1304
|
}, null, 8, ["class"]))
|
|
@@ -1312,17 +1312,17 @@ const xs = {
|
|
|
1312
1312
|
"font-medium",
|
|
1313
1313
|
l.value
|
|
1314
1314
|
])
|
|
1315
|
-
},
|
|
1315
|
+
}, V(C.title), 3)
|
|
1316
1316
|
])) : B("", !0),
|
|
1317
1317
|
C.message ? (f(), x("div", {
|
|
1318
1318
|
key: 1,
|
|
1319
1319
|
class: v([
|
|
1320
1320
|
"mt-1",
|
|
1321
1321
|
C.variant === "filled" ? "text-white/90" : "text-gray-600",
|
|
1322
|
-
|
|
1322
|
+
c.value
|
|
1323
1323
|
])
|
|
1324
|
-
},
|
|
1325
|
-
|
|
1324
|
+
}, V(C.message), 3)) : B("", !0),
|
|
1325
|
+
O(C.$slots, "default")
|
|
1326
1326
|
], 2),
|
|
1327
1327
|
C.closable ? (f(), x("div", bs, [
|
|
1328
1328
|
w("button", {
|
|
@@ -1348,7 +1348,7 @@ const xs = {
|
|
|
1348
1348
|
], 2)
|
|
1349
1349
|
], 2));
|
|
1350
1350
|
}
|
|
1351
|
-
}), Tn = /* @__PURE__ */
|
|
1351
|
+
}), Tn = /* @__PURE__ */ A({
|
|
1352
1352
|
__name: "Collapse",
|
|
1353
1353
|
props: {
|
|
1354
1354
|
open: { type: Boolean, default: !1 },
|
|
@@ -1358,7 +1358,7 @@ const xs = {
|
|
|
1358
1358
|
disableTransition: { type: Boolean, default: !1 }
|
|
1359
1359
|
},
|
|
1360
1360
|
setup(s) {
|
|
1361
|
-
const t = s, e =
|
|
1361
|
+
const t = s, e = _(null), o = _(null), n = {
|
|
1362
1362
|
xs: "p-1",
|
|
1363
1363
|
sm: "p-2",
|
|
1364
1364
|
md: "p-3",
|
|
@@ -1369,9 +1369,9 @@ const xs = {
|
|
|
1369
1369
|
), i = g(() => ({
|
|
1370
1370
|
enter: t.duration,
|
|
1371
1371
|
leave: t.duration
|
|
1372
|
-
})),
|
|
1372
|
+
})), u = (y) => {
|
|
1373
1373
|
y.style.height = "0", y.style.overflow = "hidden";
|
|
1374
|
-
},
|
|
1374
|
+
}, c = (y) => {
|
|
1375
1375
|
const C = y.scrollHeight;
|
|
1376
1376
|
y.style.height = "0", y.offsetHeight, y.style.height = `${C}px`;
|
|
1377
1377
|
}, p = (y) => {
|
|
@@ -1385,8 +1385,8 @@ const xs = {
|
|
|
1385
1385
|
};
|
|
1386
1386
|
return (y, C) => (f(), K(ke, {
|
|
1387
1387
|
duration: i.value,
|
|
1388
|
-
onBeforeEnter:
|
|
1389
|
-
onEnter:
|
|
1388
|
+
onBeforeEnter: u,
|
|
1389
|
+
onEnter: c,
|
|
1390
1390
|
onAfterEnter: p,
|
|
1391
1391
|
onBeforeLeave: h,
|
|
1392
1392
|
onLeave: d,
|
|
@@ -1408,16 +1408,16 @@ const xs = {
|
|
|
1408
1408
|
ref: o,
|
|
1409
1409
|
class: v(r.value)
|
|
1410
1410
|
}, [
|
|
1411
|
-
|
|
1411
|
+
O(y.$slots, "default")
|
|
1412
1412
|
], 2)
|
|
1413
1413
|
], 2), [
|
|
1414
|
-
[
|
|
1414
|
+
[Ae, y.open]
|
|
1415
1415
|
])
|
|
1416
1416
|
]),
|
|
1417
1417
|
_: 3
|
|
1418
1418
|
}, 8, ["duration"]));
|
|
1419
1419
|
}
|
|
1420
|
-
}), ws = { class: "inline-block" }, Cs = /* @__PURE__ */
|
|
1420
|
+
}), ws = { class: "inline-block" }, Cs = /* @__PURE__ */ A({
|
|
1421
1421
|
__name: "OvalLoader",
|
|
1422
1422
|
props: {
|
|
1423
1423
|
size: { default: "md" }
|
|
@@ -1445,7 +1445,7 @@ const xs = {
|
|
|
1445
1445
|
]));
|
|
1446
1446
|
}
|
|
1447
1447
|
});
|
|
1448
|
-
const ks = /* @__PURE__ */
|
|
1448
|
+
const ks = /* @__PURE__ */ A({
|
|
1449
1449
|
__name: "DotsLoader",
|
|
1450
1450
|
props: {
|
|
1451
1451
|
size: { default: "md" }
|
|
@@ -1465,7 +1465,7 @@ const ks = /* @__PURE__ */ _({
|
|
|
1465
1465
|
height: t[e.size]
|
|
1466
1466
|
})
|
|
1467
1467
|
}, [
|
|
1468
|
-
(f(), x(oe, null,
|
|
1468
|
+
(f(), x(oe, null, _e(3, (l) => w("span", {
|
|
1469
1469
|
key: l,
|
|
1470
1470
|
class: "inline-block rounded-full animate-[dots-pulse_0.8s_infinite_linear] bg-current",
|
|
1471
1471
|
style: E({
|
|
@@ -1478,7 +1478,7 @@ const ks = /* @__PURE__ */ _({
|
|
|
1478
1478
|
], 4));
|
|
1479
1479
|
}
|
|
1480
1480
|
});
|
|
1481
|
-
const $s = /* @__PURE__ */
|
|
1481
|
+
const $s = /* @__PURE__ */ A({
|
|
1482
1482
|
__name: "BarsLoader",
|
|
1483
1483
|
props: {
|
|
1484
1484
|
size: { default: "md" }
|
|
@@ -1499,7 +1499,7 @@ const $s = /* @__PURE__ */ _({
|
|
|
1499
1499
|
height: `${parseInt(t[e.size]) / 2}px`
|
|
1500
1500
|
})
|
|
1501
1501
|
}, [
|
|
1502
|
-
(f(), x(oe, null,
|
|
1502
|
+
(f(), x(oe, null, _e(3, (r) => w("span", {
|
|
1503
1503
|
key: r,
|
|
1504
1504
|
class: "flex-1 rounded-[2px] animate-[bars-scale_1.2s_cubic-bezier(0,0.5,0.5,1)_infinite] bg-current",
|
|
1505
1505
|
style: E({
|
|
@@ -1510,7 +1510,7 @@ const $s = /* @__PURE__ */ _({
|
|
|
1510
1510
|
], 4));
|
|
1511
1511
|
}
|
|
1512
1512
|
});
|
|
1513
|
-
const Mn = /* @__PURE__ */
|
|
1513
|
+
const Mn = /* @__PURE__ */ A({
|
|
1514
1514
|
__name: "Loader",
|
|
1515
1515
|
props: {
|
|
1516
1516
|
variant: { default: "oval" },
|
|
@@ -1554,7 +1554,7 @@ const Mn = /* @__PURE__ */ _({
|
|
|
1554
1554
|
}, Ss = {
|
|
1555
1555
|
key: 1,
|
|
1556
1556
|
class: "text-lg font-medium mb-2"
|
|
1557
|
-
}, Ls = { key: 2 }, En = /* @__PURE__ */
|
|
1557
|
+
}, Ls = { key: 2 }, En = /* @__PURE__ */ A({
|
|
1558
1558
|
__name: "Dialog",
|
|
1559
1559
|
props: {
|
|
1560
1560
|
title: {},
|
|
@@ -1620,9 +1620,9 @@ const Mn = /* @__PURE__ */ _({
|
|
|
1620
1620
|
], -1)
|
|
1621
1621
|
]))
|
|
1622
1622
|
])) : B("", !0),
|
|
1623
|
-
o.title ? (f(), x("div", Ss,
|
|
1624
|
-
o.content ? (f(), x("div", Ls,
|
|
1625
|
-
|
|
1623
|
+
o.title ? (f(), x("div", Ss, V(o.title), 1)) : B("", !0),
|
|
1624
|
+
o.content ? (f(), x("div", Ls, V(o.content), 1)) : B("", !0),
|
|
1625
|
+
O(o.$slots, "default")
|
|
1626
1626
|
])
|
|
1627
1627
|
], 2)
|
|
1628
1628
|
], 4)) : B("", !0)
|
|
@@ -1634,12 +1634,12 @@ const Mn = /* @__PURE__ */ _({
|
|
|
1634
1634
|
}), we = Math.min, pe = Math.max, Se = Math.round, N = (s) => ({
|
|
1635
1635
|
x: s,
|
|
1636
1636
|
y: s
|
|
1637
|
-
}),
|
|
1637
|
+
}), Os = {
|
|
1638
1638
|
left: "right",
|
|
1639
1639
|
right: "left",
|
|
1640
1640
|
bottom: "top",
|
|
1641
1641
|
top: "bottom"
|
|
1642
|
-
},
|
|
1642
|
+
}, _s = {
|
|
1643
1643
|
start: "end",
|
|
1644
1644
|
end: "start"
|
|
1645
1645
|
};
|
|
@@ -1667,20 +1667,20 @@ function xe(s) {
|
|
|
1667
1667
|
function Ge(s) {
|
|
1668
1668
|
return xt(xe(s));
|
|
1669
1669
|
}
|
|
1670
|
-
function
|
|
1670
|
+
function As(s, t, e) {
|
|
1671
1671
|
e === void 0 && (e = !1);
|
|
1672
1672
|
const o = ze(s), n = Ge(s), a = Xe(n);
|
|
1673
1673
|
let r = n === "x" ? o === (e ? "end" : "start") ? "right" : "left" : o === "start" ? "bottom" : "top";
|
|
1674
1674
|
return t.reference[a] > t.floating[a] && (r = Le(r)), [r, Le(r)];
|
|
1675
1675
|
}
|
|
1676
|
-
function
|
|
1676
|
+
function Vs(s) {
|
|
1677
1677
|
const t = Le(s);
|
|
1678
1678
|
return [Ie(s), t, Ie(t)];
|
|
1679
1679
|
}
|
|
1680
1680
|
function Ie(s) {
|
|
1681
|
-
return s.replace(/start|end/g, (t) =>
|
|
1681
|
+
return s.replace(/start|end/g, (t) => _s[t]);
|
|
1682
1682
|
}
|
|
1683
|
-
function
|
|
1683
|
+
function Ps(s, t, e) {
|
|
1684
1684
|
const o = ["left", "right"], n = ["right", "left"], a = ["top", "bottom"], r = ["bottom", "top"];
|
|
1685
1685
|
switch (s) {
|
|
1686
1686
|
case "top":
|
|
@@ -1693,13 +1693,13 @@ function Rs(s, t, e) {
|
|
|
1693
1693
|
return [];
|
|
1694
1694
|
}
|
|
1695
1695
|
}
|
|
1696
|
-
function
|
|
1696
|
+
function Rs(s, t, e, o) {
|
|
1697
1697
|
const n = ze(s);
|
|
1698
|
-
let a =
|
|
1698
|
+
let a = Ps(re(s), e === "start", o);
|
|
1699
1699
|
return n && (a = a.map((r) => r + "-" + n), t && (a = a.concat(a.map(Ie)))), a;
|
|
1700
1700
|
}
|
|
1701
1701
|
function Le(s) {
|
|
1702
|
-
return s.replace(/left|right|bottom|top/g, (t) =>
|
|
1702
|
+
return s.replace(/left|right|bottom|top/g, (t) => Os[t]);
|
|
1703
1703
|
}
|
|
1704
1704
|
function Ds(s) {
|
|
1705
1705
|
return {
|
|
@@ -1718,7 +1718,7 @@ function yt(s) {
|
|
|
1718
1718
|
left: s
|
|
1719
1719
|
};
|
|
1720
1720
|
}
|
|
1721
|
-
function
|
|
1721
|
+
function Oe(s) {
|
|
1722
1722
|
const {
|
|
1723
1723
|
x: t,
|
|
1724
1724
|
y: e,
|
|
@@ -1741,18 +1741,18 @@ function et(s, t, e) {
|
|
|
1741
1741
|
reference: o,
|
|
1742
1742
|
floating: n
|
|
1743
1743
|
} = s;
|
|
1744
|
-
const a = xe(t), r = Ge(t), l = Xe(r), i = re(t),
|
|
1744
|
+
const a = xe(t), r = Ge(t), l = Xe(r), i = re(t), u = a === "y", c = o.x + o.width / 2 - n.width / 2, p = o.y + o.height / 2 - n.height / 2, h = o[l] / 2 - n[l] / 2;
|
|
1745
1745
|
let d;
|
|
1746
1746
|
switch (i) {
|
|
1747
1747
|
case "top":
|
|
1748
1748
|
d = {
|
|
1749
|
-
x:
|
|
1749
|
+
x: c,
|
|
1750
1750
|
y: o.y - n.height
|
|
1751
1751
|
};
|
|
1752
1752
|
break;
|
|
1753
1753
|
case "bottom":
|
|
1754
1754
|
d = {
|
|
1755
|
-
x:
|
|
1755
|
+
x: c,
|
|
1756
1756
|
y: o.y + o.height
|
|
1757
1757
|
};
|
|
1758
1758
|
break;
|
|
@@ -1776,10 +1776,10 @@ function et(s, t, e) {
|
|
|
1776
1776
|
}
|
|
1777
1777
|
switch (ze(t)) {
|
|
1778
1778
|
case "start":
|
|
1779
|
-
d[r] -= h * (e &&
|
|
1779
|
+
d[r] -= h * (e && u ? -1 : 1);
|
|
1780
1780
|
break;
|
|
1781
1781
|
case "end":
|
|
1782
|
-
d[r] += h * (e &&
|
|
1782
|
+
d[r] += h * (e && u ? -1 : 1);
|
|
1783
1783
|
break;
|
|
1784
1784
|
}
|
|
1785
1785
|
return d;
|
|
@@ -1791,14 +1791,14 @@ const Ts = async (s, t, e) => {
|
|
|
1791
1791
|
middleware: a = [],
|
|
1792
1792
|
platform: r
|
|
1793
1793
|
} = e, l = a.filter(Boolean), i = await (r.isRTL == null ? void 0 : r.isRTL(t));
|
|
1794
|
-
let
|
|
1794
|
+
let u = await r.getElementRects({
|
|
1795
1795
|
reference: s,
|
|
1796
1796
|
floating: t,
|
|
1797
1797
|
strategy: n
|
|
1798
1798
|
}), {
|
|
1799
|
-
x:
|
|
1799
|
+
x: c,
|
|
1800
1800
|
y: p
|
|
1801
|
-
} = et(
|
|
1801
|
+
} = et(u, o, i), h = o, d = {}, m = 0;
|
|
1802
1802
|
for (let y = 0; y < l.length; y++) {
|
|
1803
1803
|
const {
|
|
1804
1804
|
name: C,
|
|
@@ -1809,36 +1809,36 @@ const Ts = async (s, t, e) => {
|
|
|
1809
1809
|
data: k,
|
|
1810
1810
|
reset: S
|
|
1811
1811
|
} = await $({
|
|
1812
|
-
x:
|
|
1812
|
+
x: c,
|
|
1813
1813
|
y: p,
|
|
1814
1814
|
initialPlacement: o,
|
|
1815
1815
|
placement: h,
|
|
1816
1816
|
strategy: n,
|
|
1817
1817
|
middlewareData: d,
|
|
1818
|
-
rects:
|
|
1818
|
+
rects: u,
|
|
1819
1819
|
platform: r,
|
|
1820
1820
|
elements: {
|
|
1821
1821
|
reference: s,
|
|
1822
1822
|
floating: t
|
|
1823
1823
|
}
|
|
1824
1824
|
});
|
|
1825
|
-
|
|
1825
|
+
c = b ?? c, p = z ?? p, d = {
|
|
1826
1826
|
...d,
|
|
1827
1827
|
[C]: {
|
|
1828
1828
|
...d[C],
|
|
1829
1829
|
...k
|
|
1830
1830
|
}
|
|
1831
|
-
}, S && m <= 50 && (m++, typeof S == "object" && (S.placement && (h = S.placement), S.rects && (
|
|
1831
|
+
}, S && m <= 50 && (m++, typeof S == "object" && (S.placement && (h = S.placement), S.rects && (u = S.rects === !0 ? await r.getElementRects({
|
|
1832
1832
|
reference: s,
|
|
1833
1833
|
floating: t,
|
|
1834
1834
|
strategy: n
|
|
1835
1835
|
}) : S.rects), {
|
|
1836
|
-
x:
|
|
1836
|
+
x: c,
|
|
1837
1837
|
y: p
|
|
1838
|
-
} = et(
|
|
1838
|
+
} = et(u, h, i)), y = -1);
|
|
1839
1839
|
}
|
|
1840
1840
|
return {
|
|
1841
|
-
x:
|
|
1841
|
+
x: c,
|
|
1842
1842
|
y: p,
|
|
1843
1843
|
placement: h,
|
|
1844
1844
|
strategy: n,
|
|
@@ -1856,15 +1856,15 @@ async function bt(s, t) {
|
|
|
1856
1856
|
elements: l,
|
|
1857
1857
|
strategy: i
|
|
1858
1858
|
} = s, {
|
|
1859
|
-
boundary:
|
|
1860
|
-
rootBoundary:
|
|
1859
|
+
boundary: u = "clippingAncestors",
|
|
1860
|
+
rootBoundary: c = "viewport",
|
|
1861
1861
|
elementContext: p = "floating",
|
|
1862
1862
|
altBoundary: h = !1,
|
|
1863
1863
|
padding: d = 0
|
|
1864
|
-
} = $e(t, s), m = yt(d), C = l[h ? p === "floating" ? "reference" : "floating" : p], $ =
|
|
1864
|
+
} = $e(t, s), m = yt(d), C = l[h ? p === "floating" ? "reference" : "floating" : p], $ = Oe(await a.getClippingRect({
|
|
1865
1865
|
element: (e = await (a.isElement == null ? void 0 : a.isElement(C))) == null || e ? C : C.contextElement || await (a.getDocumentElement == null ? void 0 : a.getDocumentElement(l.floating)),
|
|
1866
|
-
boundary:
|
|
1867
|
-
rootBoundary:
|
|
1866
|
+
boundary: u,
|
|
1867
|
+
rootBoundary: c,
|
|
1868
1868
|
strategy: i
|
|
1869
1869
|
})), b = p === "floating" ? {
|
|
1870
1870
|
x: o,
|
|
@@ -1877,7 +1877,7 @@ async function bt(s, t) {
|
|
|
1877
1877
|
} : {
|
|
1878
1878
|
x: 1,
|
|
1879
1879
|
y: 1
|
|
1880
|
-
}, S =
|
|
1880
|
+
}, S = Oe(a.convertOffsetParentRelativeRectToViewportRelativeRect ? await a.convertOffsetParentRelativeRectToViewportRelativeRect({
|
|
1881
1881
|
elements: l,
|
|
1882
1882
|
rect: b,
|
|
1883
1883
|
offsetParent: z,
|
|
@@ -1903,18 +1903,18 @@ const Ms = (s) => ({
|
|
|
1903
1903
|
elements: l,
|
|
1904
1904
|
middlewareData: i
|
|
1905
1905
|
} = t, {
|
|
1906
|
-
element:
|
|
1907
|
-
padding:
|
|
1906
|
+
element: u,
|
|
1907
|
+
padding: c = 0
|
|
1908
1908
|
} = $e(s, t) || {};
|
|
1909
|
-
if (
|
|
1909
|
+
if (u == null)
|
|
1910
1910
|
return {};
|
|
1911
|
-
const p = yt(
|
|
1911
|
+
const p = yt(c), h = {
|
|
1912
1912
|
x: e,
|
|
1913
1913
|
y: o
|
|
1914
|
-
}, d = Ge(n), m = Xe(d), y = await r.getDimensions(
|
|
1914
|
+
}, d = Ge(n), m = Xe(d), y = await r.getDimensions(u), C = d === "y", $ = C ? "top" : "left", b = C ? "bottom" : "right", z = C ? "clientHeight" : "clientWidth", k = a.reference[m] + a.reference[d] - h[d] - a.floating[m], S = h[d] - a.reference[d], T = await (r.getOffsetParent == null ? void 0 : r.getOffsetParent(u));
|
|
1915
1915
|
let L = T ? T[z] : 0;
|
|
1916
1916
|
(!L || !await (r.isElement == null ? void 0 : r.isElement(T))) && (L = l.floating[z] || a.floating[m]);
|
|
1917
|
-
const
|
|
1917
|
+
const R = k / 2 - S / 2, F = L / 2 - y[m] / 2 - 1, G = we(p[$], F), be = we(p[b], F), J = G, ve = L - y[m] - be, D = L / 2 - y[m] / 2 + R, ue = Ee(J, D, ve), Y = !i.arrow && ze(n) != null && D !== ue && a.reference[m] / 2 - (D < J ? G : be) - y[m] / 2 < 0, H = Y ? D < J ? D - J : D - ve : 0;
|
|
1918
1918
|
return {
|
|
1919
1919
|
[d]: h[d] + H,
|
|
1920
1920
|
data: {
|
|
@@ -1939,9 +1939,9 @@ const Ms = (s) => ({
|
|
|
1939
1939
|
rects: r,
|
|
1940
1940
|
initialPlacement: l,
|
|
1941
1941
|
platform: i,
|
|
1942
|
-
elements:
|
|
1942
|
+
elements: u
|
|
1943
1943
|
} = t, {
|
|
1944
|
-
mainAxis:
|
|
1944
|
+
mainAxis: c = !0,
|
|
1945
1945
|
crossAxis: p = !0,
|
|
1946
1946
|
fallbackPlacements: h,
|
|
1947
1947
|
fallbackStrategy: d = "bestFit",
|
|
@@ -1951,13 +1951,13 @@ const Ms = (s) => ({
|
|
|
1951
1951
|
} = $e(s, t);
|
|
1952
1952
|
if ((e = a.arrow) != null && e.alignmentOffset)
|
|
1953
1953
|
return {};
|
|
1954
|
-
const $ = re(n), b = xe(l), z = re(l) === l, k = await (i.isRTL == null ? void 0 : i.isRTL(
|
|
1955
|
-
!h && T && S.push(...
|
|
1956
|
-
const L = [l, ...S],
|
|
1954
|
+
const $ = re(n), b = xe(l), z = re(l) === l, k = await (i.isRTL == null ? void 0 : i.isRTL(u.floating)), S = h || (z || !y ? [Le(l)] : Vs(l)), T = m !== "none";
|
|
1955
|
+
!h && T && S.push(...Rs(l, y, m, k));
|
|
1956
|
+
const L = [l, ...S], R = await bt(t, C), F = [];
|
|
1957
1957
|
let G = ((o = a.flip) == null ? void 0 : o.overflows) || [];
|
|
1958
|
-
if (
|
|
1959
|
-
const D =
|
|
1960
|
-
F.push(
|
|
1958
|
+
if (c && F.push(R[$]), p) {
|
|
1959
|
+
const D = As(n, r, k);
|
|
1960
|
+
F.push(R[D[0]], R[D[1]]);
|
|
1961
1961
|
}
|
|
1962
1962
|
if (G = [...G, {
|
|
1963
1963
|
placement: n,
|
|
@@ -1988,7 +1988,7 @@ const Ms = (s) => ({
|
|
|
1988
1988
|
Z === "y";
|
|
1989
1989
|
}
|
|
1990
1990
|
return !0;
|
|
1991
|
-
}).map((U) => [U.placement, U.overflows.filter((Z) => Z > 0).reduce((Z,
|
|
1991
|
+
}).map((U) => [U.placement, U.overflows.filter((Z) => Z > 0).reduce((Z, _t) => Z + _t, 0)]).sort((U, Z) => U[1] - Z[1])[0]) == null ? void 0 : ve[0];
|
|
1992
1992
|
H && (Y = H);
|
|
1993
1993
|
break;
|
|
1994
1994
|
}
|
|
@@ -2012,7 +2012,7 @@ async function Is(s, t) {
|
|
|
2012
2012
|
placement: e,
|
|
2013
2013
|
platform: o,
|
|
2014
2014
|
elements: n
|
|
2015
|
-
} = s, a = await (o.isRTL == null ? void 0 : o.isRTL(n.floating)), r = re(e), l = ze(e), i = xe(e) === "y",
|
|
2015
|
+
} = s, a = await (o.isRTL == null ? void 0 : o.isRTL(n.floating)), r = re(e), l = ze(e), i = xe(e) === "y", u = ["left", "top"].includes(r) ? -1 : 1, c = a && i ? -1 : 1, p = $e(t, s);
|
|
2016
2016
|
let {
|
|
2017
2017
|
mainAxis: h,
|
|
2018
2018
|
crossAxis: d,
|
|
@@ -2027,11 +2027,11 @@ async function Is(s, t) {
|
|
|
2027
2027
|
alignmentAxis: p.alignmentAxis
|
|
2028
2028
|
};
|
|
2029
2029
|
return l && typeof m == "number" && (d = l === "end" ? m * -1 : m), i ? {
|
|
2030
|
-
x: d *
|
|
2031
|
-
y: h *
|
|
2030
|
+
x: d * c,
|
|
2031
|
+
y: h * u
|
|
2032
2032
|
} : {
|
|
2033
|
-
x: h *
|
|
2034
|
-
y: d *
|
|
2033
|
+
x: h * u,
|
|
2034
|
+
y: d * c
|
|
2035
2035
|
};
|
|
2036
2036
|
}
|
|
2037
2037
|
const js = function(s) {
|
|
@@ -2081,17 +2081,17 @@ const js = function(s) {
|
|
|
2081
2081
|
}
|
|
2082
2082
|
},
|
|
2083
2083
|
...i
|
|
2084
|
-
} = $e(s, t),
|
|
2084
|
+
} = $e(s, t), u = {
|
|
2085
2085
|
x: e,
|
|
2086
2086
|
y: o
|
|
2087
|
-
},
|
|
2088
|
-
let d =
|
|
2087
|
+
}, c = await bt(t, i), p = xe(re(n)), h = xt(p);
|
|
2088
|
+
let d = u[h], m = u[p];
|
|
2089
2089
|
if (a) {
|
|
2090
|
-
const C = h === "y" ? "top" : "left", $ = h === "y" ? "bottom" : "right", b = d +
|
|
2090
|
+
const C = h === "y" ? "top" : "left", $ = h === "y" ? "bottom" : "right", b = d + c[C], z = d - c[$];
|
|
2091
2091
|
d = Ee(b, d, z);
|
|
2092
2092
|
}
|
|
2093
2093
|
if (r) {
|
|
2094
|
-
const C = p === "y" ? "top" : "left", $ = p === "y" ? "bottom" : "right", b = m +
|
|
2094
|
+
const C = p === "y" ? "top" : "left", $ = p === "y" ? "bottom" : "right", b = m + c[C], z = m - c[$];
|
|
2095
2095
|
m = Ee(b, m, z);
|
|
2096
2096
|
}
|
|
2097
2097
|
const y = l.fn({
|
|
@@ -2113,7 +2113,7 @@ const js = function(s) {
|
|
|
2113
2113
|
}
|
|
2114
2114
|
};
|
|
2115
2115
|
};
|
|
2116
|
-
function
|
|
2116
|
+
function Pe() {
|
|
2117
2117
|
return typeof window < "u";
|
|
2118
2118
|
}
|
|
2119
2119
|
function ie(s) {
|
|
@@ -2128,16 +2128,16 @@ function X(s) {
|
|
|
2128
2128
|
return (t = (Ue(s) ? s.ownerDocument : s.document) || window.document) == null ? void 0 : t.documentElement;
|
|
2129
2129
|
}
|
|
2130
2130
|
function Ue(s) {
|
|
2131
|
-
return
|
|
2131
|
+
return Pe() ? s instanceof Node || s instanceof M(s).Node : !1;
|
|
2132
2132
|
}
|
|
2133
2133
|
function j(s) {
|
|
2134
|
-
return
|
|
2134
|
+
return Pe() ? s instanceof Element || s instanceof M(s).Element : !1;
|
|
2135
2135
|
}
|
|
2136
2136
|
function q(s) {
|
|
2137
|
-
return
|
|
2137
|
+
return Pe() ? s instanceof HTMLElement || s instanceof M(s).HTMLElement : !1;
|
|
2138
2138
|
}
|
|
2139
2139
|
function tt(s) {
|
|
2140
|
-
return !
|
|
2140
|
+
return !Pe() || typeof ShadowRoot > "u" ? !1 : s instanceof ShadowRoot || s instanceof M(s).ShadowRoot;
|
|
2141
2141
|
}
|
|
2142
2142
|
function Be(s) {
|
|
2143
2143
|
const {
|
|
@@ -2151,7 +2151,7 @@ function Be(s) {
|
|
|
2151
2151
|
function Fs(s) {
|
|
2152
2152
|
return ["table", "td", "th"].includes(ie(s));
|
|
2153
2153
|
}
|
|
2154
|
-
function
|
|
2154
|
+
function Re(s) {
|
|
2155
2155
|
return [":popover-open", ":modal"].some((t) => {
|
|
2156
2156
|
try {
|
|
2157
2157
|
return s.matches(t);
|
|
@@ -2169,7 +2169,7 @@ function Hs(s) {
|
|
|
2169
2169
|
for (; q(t) && !ye(t); ) {
|
|
2170
2170
|
if (Ze(t))
|
|
2171
2171
|
return t;
|
|
2172
|
-
if (
|
|
2172
|
+
if (Re(t))
|
|
2173
2173
|
return null;
|
|
2174
2174
|
t = Q(t);
|
|
2175
2175
|
}
|
|
@@ -2267,20 +2267,20 @@ function Ce(s, t, e, o) {
|
|
|
2267
2267
|
let r = N(1);
|
|
2268
2268
|
t && (o ? j(o) && (r = fe(o)) : r = fe(s));
|
|
2269
2269
|
const l = qs(a, e, o) ? kt(a) : N(0);
|
|
2270
|
-
let i = (n.left + l.x) / r.x,
|
|
2270
|
+
let i = (n.left + l.x) / r.x, u = (n.top + l.y) / r.y, c = n.width / r.x, p = n.height / r.y;
|
|
2271
2271
|
if (a) {
|
|
2272
2272
|
const h = M(a), d = o && j(o) ? M(o) : o;
|
|
2273
2273
|
let m = h, y = We(m);
|
|
2274
2274
|
for (; y && o && d !== m; ) {
|
|
2275
2275
|
const C = fe(y), $ = y.getBoundingClientRect(), b = W(y), z = $.left + (y.clientLeft + parseFloat(b.paddingLeft)) * C.x, k = $.top + (y.clientTop + parseFloat(b.paddingTop)) * C.y;
|
|
2276
|
-
i *= C.x,
|
|
2276
|
+
i *= C.x, u *= C.y, c *= C.x, p *= C.y, i += z, u += k, m = M(y), y = We(m);
|
|
2277
2277
|
}
|
|
2278
2278
|
}
|
|
2279
|
-
return
|
|
2280
|
-
width:
|
|
2279
|
+
return Oe({
|
|
2280
|
+
width: c,
|
|
2281
2281
|
height: p,
|
|
2282
2282
|
x: i,
|
|
2283
|
-
y:
|
|
2283
|
+
y: u
|
|
2284
2284
|
});
|
|
2285
2285
|
}
|
|
2286
2286
|
function Je(s, t) {
|
|
@@ -2305,24 +2305,24 @@ function Ys(s) {
|
|
|
2305
2305
|
offsetParent: o,
|
|
2306
2306
|
strategy: n
|
|
2307
2307
|
} = s;
|
|
2308
|
-
const a = n === "fixed", r = X(o), l = t ?
|
|
2308
|
+
const a = n === "fixed", r = X(o), l = t ? Re(t.floating) : !1;
|
|
2309
2309
|
if (o === r || l && a)
|
|
2310
2310
|
return e;
|
|
2311
2311
|
let i = {
|
|
2312
2312
|
scrollLeft: 0,
|
|
2313
2313
|
scrollTop: 0
|
|
2314
|
-
},
|
|
2315
|
-
const
|
|
2314
|
+
}, u = N(1);
|
|
2315
|
+
const c = N(0), p = q(o);
|
|
2316
2316
|
if ((p || !p && !a) && ((ie(o) !== "body" || Be(r)) && (i = De(o)), q(o))) {
|
|
2317
2317
|
const d = Ce(o);
|
|
2318
|
-
|
|
2318
|
+
u = fe(o), c.x = d.x + o.clientLeft, c.y = d.y + o.clientTop;
|
|
2319
2319
|
}
|
|
2320
2320
|
const h = r && !p && !a ? $t(r, i, !0) : N(0);
|
|
2321
2321
|
return {
|
|
2322
|
-
width: e.width *
|
|
2323
|
-
height: e.height *
|
|
2324
|
-
x: e.x *
|
|
2325
|
-
y: e.y *
|
|
2322
|
+
width: e.width * u.x,
|
|
2323
|
+
height: e.height * u.y,
|
|
2324
|
+
x: e.x * u.x - i.scrollLeft * u.x + c.x + h.x,
|
|
2325
|
+
y: e.y * u.y - i.scrollTop * u.y + c.y + h.y
|
|
2326
2326
|
};
|
|
2327
2327
|
}
|
|
2328
2328
|
function Ks(s) {
|
|
@@ -2344,8 +2344,8 @@ function Gs(s, t) {
|
|
|
2344
2344
|
let a = o.clientWidth, r = o.clientHeight, l = 0, i = 0;
|
|
2345
2345
|
if (n) {
|
|
2346
2346
|
a = n.width, r = n.height;
|
|
2347
|
-
const
|
|
2348
|
-
(!
|
|
2347
|
+
const u = Qe();
|
|
2348
|
+
(!u || u && t === "fixed") && (l = n.offsetLeft, i = n.offsetTop);
|
|
2349
2349
|
}
|
|
2350
2350
|
return {
|
|
2351
2351
|
width: a,
|
|
@@ -2355,12 +2355,12 @@ function Gs(s, t) {
|
|
|
2355
2355
|
};
|
|
2356
2356
|
}
|
|
2357
2357
|
function Us(s, t) {
|
|
2358
|
-
const e = Ce(s, !0, t === "fixed"), o = e.top + s.clientTop, n = e.left + s.clientLeft, a = q(s) ? fe(s) : N(1), r = s.clientWidth * a.x, l = s.clientHeight * a.y, i = n * a.x,
|
|
2358
|
+
const e = Ce(s, !0, t === "fixed"), o = e.top + s.clientTop, n = e.left + s.clientLeft, a = q(s) ? fe(s) : N(1), r = s.clientWidth * a.x, l = s.clientHeight * a.y, i = n * a.x, u = o * a.y;
|
|
2359
2359
|
return {
|
|
2360
2360
|
width: r,
|
|
2361
2361
|
height: l,
|
|
2362
2362
|
x: i,
|
|
2363
|
-
y:
|
|
2363
|
+
y: u
|
|
2364
2364
|
};
|
|
2365
2365
|
}
|
|
2366
2366
|
function st(s, t, e) {
|
|
@@ -2380,7 +2380,7 @@ function st(s, t, e) {
|
|
|
2380
2380
|
height: t.height
|
|
2381
2381
|
};
|
|
2382
2382
|
}
|
|
2383
|
-
return
|
|
2383
|
+
return Oe(o);
|
|
2384
2384
|
}
|
|
2385
2385
|
function zt(s, t) {
|
|
2386
2386
|
const e = Q(s);
|
|
@@ -2395,7 +2395,7 @@ function Zs(s, t) {
|
|
|
2395
2395
|
let r = a ? Q(s) : s;
|
|
2396
2396
|
for (; j(r) && !ye(r); ) {
|
|
2397
2397
|
const l = W(r), i = Ze(r);
|
|
2398
|
-
!i && l.position === "fixed" && (n = null), (a ? !i && !n : !i && l.position === "static" && !!n && ["absolute", "fixed"].includes(n.position) || Be(r) && !i && zt(s, r)) ? o = o.filter((
|
|
2398
|
+
!i && l.position === "fixed" && (n = null), (a ? !i && !n : !i && l.position === "static" && !!n && ["absolute", "fixed"].includes(n.position) || Be(r) && !i && zt(s, r)) ? o = o.filter((c) => c !== r) : n = l, r = Q(r);
|
|
2399
2399
|
}
|
|
2400
2400
|
return t.set(s, o), o;
|
|
2401
2401
|
}
|
|
@@ -2406,9 +2406,9 @@ function Qs(s) {
|
|
|
2406
2406
|
rootBoundary: o,
|
|
2407
2407
|
strategy: n
|
|
2408
2408
|
} = s;
|
|
2409
|
-
const r = [...e === "clippingAncestors" ?
|
|
2410
|
-
const p = st(t,
|
|
2411
|
-
return
|
|
2409
|
+
const r = [...e === "clippingAncestors" ? Re(t) ? [] : Zs(t, this._c) : [].concat(e), o], l = r[0], i = r.reduce((u, c) => {
|
|
2410
|
+
const p = st(t, c, n);
|
|
2411
|
+
return u.top = pe(p.top, u.top), u.right = we(p.right, u.right), u.bottom = we(p.bottom, u.bottom), u.left = pe(p.left, u.left), u;
|
|
2412
2412
|
}, st(t, l, n));
|
|
2413
2413
|
return {
|
|
2414
2414
|
width: i.right - i.left,
|
|
@@ -2440,9 +2440,9 @@ function en(s, t, e) {
|
|
|
2440
2440
|
i.x = h.x + t.clientLeft, i.y = h.y + t.clientTop;
|
|
2441
2441
|
} else
|
|
2442
2442
|
n && (i.x = Je(n));
|
|
2443
|
-
const
|
|
2443
|
+
const u = n && !o && !a ? $t(n, l) : N(0), c = r.left + l.scrollLeft - i.x - u.x, p = r.top + l.scrollTop - i.y - u.y;
|
|
2444
2444
|
return {
|
|
2445
|
-
x:
|
|
2445
|
+
x: c,
|
|
2446
2446
|
y: p,
|
|
2447
2447
|
width: r.width,
|
|
2448
2448
|
height: r.height
|
|
@@ -2461,7 +2461,7 @@ function nt(s, t) {
|
|
|
2461
2461
|
}
|
|
2462
2462
|
function Bt(s, t) {
|
|
2463
2463
|
const e = M(s);
|
|
2464
|
-
if (
|
|
2464
|
+
if (Re(s))
|
|
2465
2465
|
return e;
|
|
2466
2466
|
if (!q(s)) {
|
|
2467
2467
|
let n = Q(s);
|
|
@@ -2527,7 +2527,7 @@ function Fe(s) {
|
|
|
2527
2527
|
return s;
|
|
2528
2528
|
}
|
|
2529
2529
|
function de(s) {
|
|
2530
|
-
return typeof s == "function" ? s() :
|
|
2530
|
+
return typeof s == "function" ? s() : P(s);
|
|
2531
2531
|
}
|
|
2532
2532
|
function dn(s) {
|
|
2533
2533
|
return {
|
|
@@ -2563,38 +2563,38 @@ function pn(s, t, e) {
|
|
|
2563
2563
|
}), i = g(() => {
|
|
2564
2564
|
var L;
|
|
2565
2565
|
return (L = de(e.transform)) != null ? L : !0;
|
|
2566
|
-
}),
|
|
2566
|
+
}), u = g(() => Fe(s.value)), c = g(() => Fe(t.value)), p = _(0), h = _(0), d = _(l.value), m = _(r.value), y = Pt({}), C = _(!1), $ = g(() => {
|
|
2567
2567
|
const L = {
|
|
2568
2568
|
position: d.value,
|
|
2569
2569
|
left: "0",
|
|
2570
2570
|
top: "0"
|
|
2571
2571
|
};
|
|
2572
|
-
if (!
|
|
2572
|
+
if (!c.value)
|
|
2573
2573
|
return L;
|
|
2574
|
-
const
|
|
2574
|
+
const R = ot(c.value, p.value), F = ot(c.value, h.value);
|
|
2575
2575
|
return i.value ? {
|
|
2576
2576
|
...L,
|
|
2577
|
-
transform: "translate(" +
|
|
2578
|
-
...St(
|
|
2577
|
+
transform: "translate(" + R + "px, " + F + "px)",
|
|
2578
|
+
...St(c.value) >= 1.5 && {
|
|
2579
2579
|
willChange: "transform"
|
|
2580
2580
|
}
|
|
2581
2581
|
} : {
|
|
2582
2582
|
position: d.value,
|
|
2583
|
-
left:
|
|
2583
|
+
left: R + "px",
|
|
2584
2584
|
top: F + "px"
|
|
2585
2585
|
};
|
|
2586
2586
|
});
|
|
2587
2587
|
let b;
|
|
2588
2588
|
function z() {
|
|
2589
|
-
if (
|
|
2589
|
+
if (u.value == null || c.value == null)
|
|
2590
2590
|
return;
|
|
2591
2591
|
const L = n.value;
|
|
2592
|
-
un(
|
|
2592
|
+
un(u.value, c.value, {
|
|
2593
2593
|
middleware: a.value,
|
|
2594
2594
|
placement: r.value,
|
|
2595
2595
|
strategy: l.value
|
|
2596
|
-
}).then((
|
|
2597
|
-
p.value =
|
|
2596
|
+
}).then((R) => {
|
|
2597
|
+
p.value = R.x, h.value = R.y, d.value = R.strategy, m.value = R.placement, y.value = R.middlewareData, C.value = L !== !1;
|
|
2598
2598
|
});
|
|
2599
2599
|
}
|
|
2600
2600
|
function k() {
|
|
@@ -2605,8 +2605,8 @@ function pn(s, t, e) {
|
|
|
2605
2605
|
z();
|
|
2606
2606
|
return;
|
|
2607
2607
|
}
|
|
2608
|
-
if (
|
|
2609
|
-
b = o(
|
|
2608
|
+
if (u.value != null && c.value != null) {
|
|
2609
|
+
b = o(u.value, c.value, z);
|
|
2610
2610
|
return;
|
|
2611
2611
|
}
|
|
2612
2612
|
}
|
|
@@ -2615,7 +2615,7 @@ function pn(s, t, e) {
|
|
|
2615
2615
|
}
|
|
2616
2616
|
return se([a, r, l, n], z, {
|
|
2617
2617
|
flush: "sync"
|
|
2618
|
-
}), se([
|
|
2618
|
+
}), se([u, c], S, {
|
|
2619
2619
|
flush: "sync"
|
|
2620
2620
|
}), se(n, T, {
|
|
2621
2621
|
flush: "sync"
|
|
@@ -2638,7 +2638,7 @@ typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
|
|
|
2638
2638
|
function at(s, t, e = {}) {
|
|
2639
2639
|
const {
|
|
2640
2640
|
immediate: o = !0
|
|
2641
|
-
} = e, n =
|
|
2641
|
+
} = e, n = _(!1);
|
|
2642
2642
|
let a = null;
|
|
2643
2643
|
function r() {
|
|
2644
2644
|
a && (clearTimeout(a), a = null);
|
|
@@ -2646,13 +2646,13 @@ function at(s, t, e = {}) {
|
|
|
2646
2646
|
function l() {
|
|
2647
2647
|
n.value = !1, r();
|
|
2648
2648
|
}
|
|
2649
|
-
function i(...
|
|
2649
|
+
function i(...u) {
|
|
2650
2650
|
r(), n.value = !0, a = setTimeout(() => {
|
|
2651
|
-
n.value = !1, a = null, s(...
|
|
2651
|
+
n.value = !1, a = null, s(...u);
|
|
2652
2652
|
}, Dt(t));
|
|
2653
2653
|
}
|
|
2654
2654
|
return o && (n.value = !0, gn && i()), fn(l), {
|
|
2655
|
-
isPending:
|
|
2655
|
+
isPending: Rt(n),
|
|
2656
2656
|
start: i,
|
|
2657
2657
|
stop: l
|
|
2658
2658
|
};
|
|
@@ -2664,14 +2664,14 @@ function hn(s = {}) {
|
|
|
2664
2664
|
onOpen: o,
|
|
2665
2665
|
onClose: n,
|
|
2666
2666
|
initiallyOpened: a = !1
|
|
2667
|
-
} = s, r =
|
|
2667
|
+
} = s, r = _(!1), { start: l, stop: i } = at(() => {
|
|
2668
2668
|
r.value = !0, o == null || o();
|
|
2669
|
-
}, t), { start:
|
|
2669
|
+
}, t), { start: u, stop: c } = at(() => {
|
|
2670
2670
|
r.value = !1, n == null || n();
|
|
2671
2671
|
}, e), p = () => {
|
|
2672
|
-
|
|
2672
|
+
c(), t === 0 ? (r.value = !0, o == null || o()) : l();
|
|
2673
2673
|
}, h = () => {
|
|
2674
|
-
i(), e === 0 ? (r.value = !1, n == null || n()) :
|
|
2674
|
+
i(), e === 0 ? (r.value = !1, n == null || n()) : u();
|
|
2675
2675
|
};
|
|
2676
2676
|
return a && p(), {
|
|
2677
2677
|
isOpen: r,
|
|
@@ -2679,7 +2679,7 @@ function hn(s = {}) {
|
|
|
2679
2679
|
close: h
|
|
2680
2680
|
};
|
|
2681
2681
|
}
|
|
2682
|
-
const Lt = Symbol("hover-card"),
|
|
2682
|
+
const Lt = Symbol("hover-card"), Ot = /* @__PURE__ */ A({
|
|
2683
2683
|
__name: "HoverCardTarget",
|
|
2684
2684
|
props: {
|
|
2685
2685
|
withWrapper: { type: Boolean, default: !1 },
|
|
@@ -2690,10 +2690,10 @@ const Lt = Symbol("hover-card"), At = /* @__PURE__ */ _({
|
|
|
2690
2690
|
key: 0,
|
|
2691
2691
|
class: v(t.wrapperClass)
|
|
2692
2692
|
}, [
|
|
2693
|
-
|
|
2694
|
-
], 2)) :
|
|
2693
|
+
O(t.$slots, "default")
|
|
2694
|
+
], 2)) : O(t.$slots, "default", { key: 1 });
|
|
2695
2695
|
}
|
|
2696
|
-
}), mn = { class: "rounded-lg bg-white dark:bg-gray-800 shadow-lg border border-gray-200 dark:border-gray-700 px-3 py-2" }, xn = /* @__PURE__ */
|
|
2696
|
+
}), mn = { class: "rounded-lg bg-white dark:bg-gray-800 shadow-lg border border-gray-200 dark:border-gray-700 px-3 py-2" }, xn = /* @__PURE__ */ A({
|
|
2697
2697
|
__name: "HoverCard",
|
|
2698
2698
|
props: {
|
|
2699
2699
|
initiallyOpened: { type: Boolean, default: !1 },
|
|
@@ -2711,11 +2711,11 @@ const Lt = Symbol("hover-card"), At = /* @__PURE__ */ _({
|
|
|
2711
2711
|
zIndex: { default: 1e3 }
|
|
2712
2712
|
},
|
|
2713
2713
|
setup(s) {
|
|
2714
|
-
const t = s, e =
|
|
2714
|
+
const t = s, e = _(!1);
|
|
2715
2715
|
He(() => {
|
|
2716
2716
|
e.value = !0;
|
|
2717
2717
|
});
|
|
2718
|
-
const o =
|
|
2718
|
+
const o = _(null), n = _(null), a = _(null), { isOpen: r, open: l, close: i } = hn({
|
|
2719
2719
|
openDelay: t.openDelay,
|
|
2720
2720
|
closeDelay: t.closeDelay,
|
|
2721
2721
|
initiallyOpened: t.initiallyOpened
|
|
@@ -2726,8 +2726,8 @@ const Lt = Symbol("hover-card"), At = /* @__PURE__ */ _({
|
|
|
2726
2726
|
close: i
|
|
2727
2727
|
});
|
|
2728
2728
|
const {
|
|
2729
|
-
x:
|
|
2730
|
-
y:
|
|
2729
|
+
x: u,
|
|
2730
|
+
y: c,
|
|
2731
2731
|
strategy: p,
|
|
2732
2732
|
middlewareData: h,
|
|
2733
2733
|
placement: d,
|
|
@@ -2789,12 +2789,12 @@ const Lt = Symbol("hover-card"), At = /* @__PURE__ */ _({
|
|
|
2789
2789
|
ref_key: "reference",
|
|
2790
2790
|
ref: n,
|
|
2791
2791
|
class: "relative inline-block",
|
|
2792
|
-
onMouseenter: S[2] || (S[2] = (T) => !k.disabled &&
|
|
2793
|
-
onMouseleave: S[3] || (S[3] = (T) => !k.disabled &&
|
|
2792
|
+
onMouseenter: S[2] || (S[2] = (T) => !k.disabled && P(l)()),
|
|
2793
|
+
onMouseleave: S[3] || (S[3] = (T) => !k.disabled && P(i)())
|
|
2794
2794
|
}, [
|
|
2795
|
-
me(
|
|
2795
|
+
me(Ot, null, {
|
|
2796
2796
|
default: ae(() => [
|
|
2797
|
-
|
|
2797
|
+
O(k.$slots, "target")
|
|
2798
2798
|
]),
|
|
2799
2799
|
_: 3
|
|
2800
2800
|
}),
|
|
@@ -2811,22 +2811,22 @@ const Lt = Symbol("hover-card"), At = /* @__PURE__ */ _({
|
|
|
2811
2811
|
"leave-to-class": "opacity-0 translate-y-1"
|
|
2812
2812
|
}, {
|
|
2813
2813
|
default: ae(() => [
|
|
2814
|
-
|
|
2814
|
+
P(r) ? (f(), x("div", {
|
|
2815
2815
|
key: 0,
|
|
2816
2816
|
ref_key: "floating",
|
|
2817
2817
|
ref: a,
|
|
2818
2818
|
style: E({
|
|
2819
|
-
position:
|
|
2820
|
-
top: `${
|
|
2821
|
-
left: `${
|
|
2819
|
+
position: P(p),
|
|
2820
|
+
top: `${P(c) ?? 0}px`,
|
|
2821
|
+
left: `${P(u) ?? 0}px`,
|
|
2822
2822
|
zIndex: k.zIndex || 1e3
|
|
2823
2823
|
}),
|
|
2824
2824
|
class: v(["min-w-[200px]", [z.value]]),
|
|
2825
|
-
onMouseenter: S[0] || (S[0] = (T) => !k.disabled &&
|
|
2826
|
-
onMouseleave: S[1] || (S[1] = (T) => !k.disabled &&
|
|
2825
|
+
onMouseenter: S[0] || (S[0] = (T) => !k.disabled && P(l)()),
|
|
2826
|
+
onMouseleave: S[1] || (S[1] = (T) => !k.disabled && P(i)())
|
|
2827
2827
|
}, [
|
|
2828
2828
|
w("div", mn, [
|
|
2829
|
-
|
|
2829
|
+
O(k.$slots, "dropdown")
|
|
2830
2830
|
]),
|
|
2831
2831
|
k.withArrow ? (f(), x("div", {
|
|
2832
2832
|
key: 0,
|
|
@@ -2852,7 +2852,7 @@ const Lt = Symbol("hover-card"), At = /* @__PURE__ */ _({
|
|
|
2852
2852
|
}
|
|
2853
2853
|
});
|
|
2854
2854
|
Object.assign(xn, {
|
|
2855
|
-
Target:
|
|
2855
|
+
Target: Ot
|
|
2856
2856
|
});
|
|
2857
2857
|
const In = {}, yn = {
|
|
2858
2858
|
key: 0,
|
|
@@ -2860,7 +2860,7 @@ const In = {}, yn = {
|
|
|
2860
2860
|
}, bn = { class: "badge-label" }, vn = {
|
|
2861
2861
|
key: 1,
|
|
2862
2862
|
class: "badge-section ml-2"
|
|
2863
|
-
}, jn = /* @__PURE__ */
|
|
2863
|
+
}, jn = /* @__PURE__ */ A({
|
|
2864
2864
|
__name: "Badge",
|
|
2865
2865
|
props: {
|
|
2866
2866
|
size: { default: "md" },
|
|
@@ -2884,13 +2884,13 @@ const In = {}, yn = {
|
|
|
2884
2884
|
full: "rounded-full"
|
|
2885
2885
|
})[a] || "rounded-lg", o = (a) => `relative pl-6 before:absolute before:left-2 before:top-1/2 before:-translate-y-1/2 before:w-2 before:h-2 before:rounded-full before:bg-${a}-500`, n = g(() => {
|
|
2886
2886
|
var p, h;
|
|
2887
|
-
const a = "inline-flex items-center justify-center font-medium", r = t.variant === "gradient" ? `bg-gradient-to-r from-${(p = t.gradient) == null ? void 0 : p.from} to-${(h = t.gradient) == null ? void 0 : h.to} text-white` : ne(t.color, t.variant), l = I(t.size, "badge"), i = e(t.radius),
|
|
2887
|
+
const a = "inline-flex items-center justify-center font-medium", r = t.variant === "gradient" ? `bg-gradient-to-r from-${(p = t.gradient) == null ? void 0 : p.from} to-${(h = t.gradient) == null ? void 0 : h.to} text-white` : ne(t.color, t.variant), l = I(t.size, "badge"), i = e(t.radius), u = t.variant === "dot" ? o(t.color) : "";
|
|
2888
2888
|
return [
|
|
2889
2889
|
a,
|
|
2890
2890
|
r,
|
|
2891
2891
|
l,
|
|
2892
2892
|
i,
|
|
2893
|
-
|
|
2893
|
+
u,
|
|
2894
2894
|
{
|
|
2895
2895
|
"aspect-square p-0": t.circle,
|
|
2896
2896
|
"w-full": t.fullWidth
|
|
@@ -2902,15 +2902,15 @@ const In = {}, yn = {
|
|
|
2902
2902
|
}, [
|
|
2903
2903
|
a.leftSection ? (f(), x("span", yn, [
|
|
2904
2904
|
typeof a.leftSection == "string" ? (f(), x(oe, { key: 0 }, [
|
|
2905
|
-
te(
|
|
2905
|
+
te(V(a.leftSection), 1)
|
|
2906
2906
|
], 64)) : (f(), K(ge(a.leftSection), { key: 1 }))
|
|
2907
2907
|
])) : B("", !0),
|
|
2908
2908
|
w("span", bn, [
|
|
2909
|
-
|
|
2909
|
+
O(a.$slots, "default")
|
|
2910
2910
|
]),
|
|
2911
2911
|
a.rightSection ? (f(), x("span", vn, [
|
|
2912
2912
|
typeof a.rightSection == "string" ? (f(), x(oe, { key: 0 }, [
|
|
2913
|
-
te(
|
|
2913
|
+
te(V(a.rightSection), 1)
|
|
2914
2914
|
], 64)) : (f(), K(ge(a.rightSection), { key: 1 }))
|
|
2915
2915
|
])) : B("", !0)
|
|
2916
2916
|
], 2));
|
|
@@ -2937,7 +2937,7 @@ function Cn(s) {
|
|
|
2937
2937
|
full: "cstu-rounded-full"
|
|
2938
2938
|
}[s];
|
|
2939
2939
|
}
|
|
2940
|
-
const kn = ["data-active"], Wn = /* @__PURE__ */
|
|
2940
|
+
const kn = ["data-active"], Wn = /* @__PURE__ */ A({
|
|
2941
2941
|
__name: "Dropdown",
|
|
2942
2942
|
props: {
|
|
2943
2943
|
size: { default: "md" },
|
|
@@ -2954,14 +2954,14 @@ const kn = ["data-active"], Wn = /* @__PURE__ */ _({
|
|
|
2954
2954
|
},
|
|
2955
2955
|
emits: ["close", "update:open"],
|
|
2956
2956
|
setup(s, { emit: t }) {
|
|
2957
|
-
const e = s, o = t, n =
|
|
2957
|
+
const e = s, o = t, n = _(e.open), a = _(0), r = _(null), l = g(() => I(e.size, "dropdown")), i = g(() => Cn(e.radius)), u = g(() => ({
|
|
2958
2958
|
"cstu-bottom-full cstu-mb-2": e.placement === "top",
|
|
2959
2959
|
"cstu-mt-2": e.placement === "bottom"
|
|
2960
2960
|
}));
|
|
2961
|
-
function
|
|
2961
|
+
function c() {
|
|
2962
2962
|
n.value = !1, o("close"), o("update:open", !1);
|
|
2963
2963
|
}
|
|
2964
|
-
pt("dropdownClose",
|
|
2964
|
+
pt("dropdownClose", c);
|
|
2965
2965
|
function p() {
|
|
2966
2966
|
e.disabled || (n.value ? (n.value = !1, o("close"), o("update:open", !1)) : (n.value = !0, o("update:open", !0), setTimeout(() => {
|
|
2967
2967
|
var m, y;
|
|
@@ -2986,7 +2986,6 @@ const kn = ["data-active"], Wn = /* @__PURE__ */ _({
|
|
|
2986
2986
|
class: v(["cstu-text-gray-500 cstu-inline-flex cstu-overflow-hidden cstu-text-ellipsis cstu-whitespace-pre cstu-justify-between cstu-items-center cstu-w-full focus:cstu-outline-none", [
|
|
2987
2987
|
i.value,
|
|
2988
2988
|
l.value,
|
|
2989
|
-
d.buttonClasses,
|
|
2990
2989
|
{ "cstu-pointer-events-none": d.disabled },
|
|
2991
2990
|
`${d.buttonClasses ? d.buttonClasses : "cstu-border cstu-border-gray-400/20 hover:cstu-bg-gray-100/50 hover:cstu-border-gray-400/25 "}`
|
|
2992
2991
|
]]),
|
|
@@ -2994,15 +2993,15 @@ const kn = ["data-active"], Wn = /* @__PURE__ */ _({
|
|
|
2994
2993
|
"aria-haspopup": "true",
|
|
2995
2994
|
onClick: p
|
|
2996
2995
|
}, [
|
|
2997
|
-
|
|
2998
|
-
|
|
2996
|
+
O(d.$slots, "icon"),
|
|
2997
|
+
O(d.$slots, "selected", {}, () => [
|
|
2999
2998
|
m[0] || (m[0] = te("Select"))
|
|
3000
2999
|
]),
|
|
3001
3000
|
d.showArrow ? (f(), x("span", {
|
|
3002
3001
|
key: 0,
|
|
3003
3002
|
class: v(["cstu-transition cstu-leading-none", { "cstu-rotate-180": n.value }])
|
|
3004
3003
|
}, [
|
|
3005
|
-
|
|
3004
|
+
O(d.$slots, "arrow", {}, () => [
|
|
3006
3005
|
m[1] || (m[1] = Tt('<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 12 12" fill="none"><g clip-path="url(#clip0_33663_12905)"><path d="M6 8.95312C5.91113 8.95312 5.82739 8.93604 5.74878 8.90186C5.67017 8.86768 5.6001 8.81982 5.53857 8.7583L0.93457 4.1543C0.886719 4.09961 0.845703 4.03467 0.811523 3.95947C0.777344 3.88428 0.760254 3.80225 0.760254 3.71338C0.760254 3.53564 0.823486 3.38354 0.949951 3.25708C1.07642 3.13062 1.23193 3.06738 1.4165 3.06738C1.49854 3.06738 1.57715 3.08276 1.65234 3.11353C1.72754 3.14429 1.7959 3.18701 1.85742 3.2417L6 7.40479L10.1426 3.2417C10.2041 3.18701 10.2725 3.14429 10.3477 3.11353C10.4229 3.08276 10.5015 3.06738 10.5835 3.06738C10.7681 3.06738 10.9236 3.13062 11.05 3.25708C11.1765 3.38354 11.2397 3.53564 11.2397 3.71338C11.2397 3.80225 11.2227 3.88428 11.1885 3.95947C11.1543 4.03467 11.1133 4.09961 11.0654 4.1543L6.46143 8.7583C6.3999 8.81982 6.32983 8.86768 6.25122 8.90186C6.17261 8.93604 6.08887 8.95312 6 8.95312Z" fill="#99A3A9"></path></g><defs><clipPath id="clip0_33663_12905"><rect width="10.5" height="11" fill="white" transform="matrix(1 0 0 -1 0.75 11.5)"></rect></clipPath></defs></svg>', 1))
|
|
3007
3006
|
])
|
|
3008
3007
|
], 2)) : B("", !0)
|
|
@@ -3018,7 +3017,7 @@ const kn = ["data-active"], Wn = /* @__PURE__ */ _({
|
|
|
3018
3017
|
default: ae(() => [
|
|
3019
3018
|
he(w("div", {
|
|
3020
3019
|
class: v(["cstu-max-h-72 cstu-px-[12px] cstu-py-[13px] cstu-min-w-[225px] cstu-overflow-y-auto cstu-origin-top-left cstu-absolute cstu-left-0 cstu-w-full cstu-rounded-lg cstu-shadow-custom cstu-bg-white focus:cstu-outline-none cstu-z-50", [
|
|
3021
|
-
|
|
3020
|
+
u.value,
|
|
3022
3021
|
d.dropdownClasses,
|
|
3023
3022
|
i.value
|
|
3024
3023
|
]])
|
|
@@ -3034,19 +3033,19 @@ const kn = ["data-active"], Wn = /* @__PURE__ */ _({
|
|
|
3034
3033
|
tabindex: "-1",
|
|
3035
3034
|
onKeydown: h
|
|
3036
3035
|
}, [
|
|
3037
|
-
|
|
3036
|
+
O(d.$slots, "default")
|
|
3038
3037
|
], 40, kn)
|
|
3039
3038
|
], 2), [
|
|
3040
|
-
[
|
|
3039
|
+
[Ae, n.value]
|
|
3041
3040
|
])
|
|
3042
3041
|
]),
|
|
3043
3042
|
_: 3
|
|
3044
3043
|
})
|
|
3045
3044
|
], 2)), [
|
|
3046
|
-
[
|
|
3045
|
+
[P(wn), c]
|
|
3047
3046
|
]);
|
|
3048
3047
|
}
|
|
3049
|
-
}), Fn = /* @__PURE__ */
|
|
3048
|
+
}), Fn = /* @__PURE__ */ A({
|
|
3050
3049
|
__name: "DropdownItem",
|
|
3051
3050
|
props: {
|
|
3052
3051
|
disabled: { type: Boolean, default: !1 },
|
|
@@ -3067,7 +3066,7 @@ const kn = ["data-active"], Wn = /* @__PURE__ */ _({
|
|
|
3067
3066
|
tabindex: "-1",
|
|
3068
3067
|
class: v([
|
|
3069
3068
|
"cstu-cursor-pointer hover:cstu-bg-blue-50 active:cstu-bg-blue-50 cstu-rounded-lg",
|
|
3070
|
-
|
|
3069
|
+
P(Ye)(e.size),
|
|
3071
3070
|
"cstu-py-[5.5px] cstu-pr-[13.5px] cstu-pl-[10.5px]",
|
|
3072
3071
|
{ "cstu-cursor-not-allowed cstu-bg-gray-100": l.disabled },
|
|
3073
3072
|
{ "cstu-bg-blue-50": l.selected },
|
|
@@ -3075,10 +3074,10 @@ const kn = ["data-active"], Wn = /* @__PURE__ */ _({
|
|
|
3075
3074
|
]),
|
|
3076
3075
|
onClick: r
|
|
3077
3076
|
}, [
|
|
3078
|
-
|
|
3077
|
+
O(l.$slots, "default", { selected: l.selected })
|
|
3079
3078
|
], 2));
|
|
3080
3079
|
}
|
|
3081
|
-
}), $n = /* @__PURE__ */
|
|
3080
|
+
}), $n = /* @__PURE__ */ A({
|
|
3082
3081
|
__name: "ListItem",
|
|
3083
3082
|
props: {
|
|
3084
3083
|
disabled: { type: Boolean, default: !1 },
|
|
@@ -3105,10 +3104,10 @@ const kn = ["data-active"], Wn = /* @__PURE__ */ _({
|
|
|
3105
3104
|
]),
|
|
3106
3105
|
onClick: a
|
|
3107
3106
|
}, [
|
|
3108
|
-
|
|
3107
|
+
O(r.$slots, "default", { selected: r.selected })
|
|
3109
3108
|
], 2));
|
|
3110
3109
|
}
|
|
3111
|
-
}), Hn = /* @__PURE__ */
|
|
3110
|
+
}), Hn = /* @__PURE__ */ A({
|
|
3112
3111
|
__name: "Collapsible",
|
|
3113
3112
|
props: {
|
|
3114
3113
|
defaultOpen: { type: Boolean, default: !1 },
|
|
@@ -3116,35 +3115,42 @@ const kn = ["data-active"], Wn = /* @__PURE__ */ _({
|
|
|
3116
3115
|
class: { default: "" },
|
|
3117
3116
|
hideArrow: { type: Boolean, default: !1 },
|
|
3118
3117
|
buttonClass: { default: "" },
|
|
3119
|
-
selectedClass: { default: "" }
|
|
3118
|
+
selectedClass: { default: "" },
|
|
3119
|
+
modelValue: { type: Boolean, default: void 0 }
|
|
3120
3120
|
},
|
|
3121
|
-
|
|
3122
|
-
|
|
3123
|
-
|
|
3124
|
-
|
|
3121
|
+
emits: ["update:modelValue"],
|
|
3122
|
+
setup(s, { emit: t }) {
|
|
3123
|
+
const e = s, o = t, n = g(() => e.modelValue !== void 0), a = g({
|
|
3124
|
+
get: () => n.value ? e.modelValue ?? !1 : r.value,
|
|
3125
|
+
set: (u) => {
|
|
3126
|
+
n.value ? o("update:modelValue", u) : r.value = u;
|
|
3127
|
+
}
|
|
3128
|
+
}), r = _(e.defaultOpen), l = g(() => e.class);
|
|
3129
|
+
function i() {
|
|
3130
|
+
e.disabled || (a.value = !a.value);
|
|
3125
3131
|
}
|
|
3126
|
-
return (
|
|
3127
|
-
class: v(["space-y-1 cstu-select-none",
|
|
3132
|
+
return (u, c) => (f(), x("div", {
|
|
3133
|
+
class: v(["space-y-1 cstu-select-none", l.value])
|
|
3128
3134
|
}, [
|
|
3129
3135
|
me($n, {
|
|
3130
3136
|
role: "button",
|
|
3131
|
-
disabled:
|
|
3132
|
-
class: v(["cstu-flex cstu-items-center cstu-justify-between",
|
|
3133
|
-
"selected-class":
|
|
3134
|
-
selected:
|
|
3135
|
-
onClick:
|
|
3137
|
+
disabled: u.disabled,
|
|
3138
|
+
class: v(["cstu-flex cstu-items-center cstu-justify-between", u.buttonClass].join(" ")),
|
|
3139
|
+
"selected-class": u.selectedClass,
|
|
3140
|
+
selected: a.value,
|
|
3141
|
+
onClick: i
|
|
3136
3142
|
}, {
|
|
3137
3143
|
default: ae(() => [
|
|
3138
|
-
|
|
3139
|
-
|
|
3144
|
+
O(u.$slots, "trigger", { open: a.value }),
|
|
3145
|
+
u.hideArrow ? B("", !0) : (f(), x("svg", {
|
|
3140
3146
|
key: 0,
|
|
3141
3147
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3142
3148
|
width: "10",
|
|
3143
3149
|
height: "7",
|
|
3144
3150
|
viewBox: "0 0 10 7",
|
|
3145
3151
|
fill: "none",
|
|
3146
|
-
class: v(["cstu-transform cstu-transition-transform cstu-duration-200", { "cstu-rotate-180":
|
|
3147
|
-
},
|
|
3152
|
+
class: v(["cstu-transform cstu-transition-transform cstu-duration-200", { "cstu-rotate-180": a.value }])
|
|
3153
|
+
}, c[0] || (c[0] = [
|
|
3148
3154
|
w("path", {
|
|
3149
3155
|
d: "M5.64844 0.919922L9.81641 5.08789C9.91667 5.18815 9.9668 5.3099 9.9668 5.45312C9.9668 5.59635 9.91667 5.7181 9.81641 5.81836L9.34375 6.29102C9.24349 6.39128 9.12174 6.44499 8.97852 6.45215C8.83529 6.45931 8.71354 6.41276 8.61328 6.3125L5.2832 2.98242L1.95312 6.3125C1.85286 6.41276 1.73112 6.45931 1.58789 6.45215C1.44466 6.44499 1.32292 6.39128 1.22266 6.29102L0.75 5.81836C0.649739 5.7181 0.599609 5.59635 0.599609 5.45312C0.599609 5.3099 0.649739 5.18815 0.75 5.08789L4.91797 0.919922C5.01823 0.805339 5.13997 0.748047 5.2832 0.748047C5.42643 0.748047 5.54818 0.805339 5.64844 0.919922Z",
|
|
3150
3156
|
fill: "#75797C"
|
|
@@ -3163,9 +3169,9 @@ const kn = ["data-active"], Wn = /* @__PURE__ */ _({
|
|
|
3163
3169
|
}, {
|
|
3164
3170
|
default: ae(() => [
|
|
3165
3171
|
he(w("div", null, [
|
|
3166
|
-
|
|
3172
|
+
O(u.$slots, "default")
|
|
3167
3173
|
], 512), [
|
|
3168
|
-
[
|
|
3174
|
+
[Ae, a.value]
|
|
3169
3175
|
])
|
|
3170
3176
|
]),
|
|
3171
3177
|
_: 3
|
|
@@ -3180,7 +3186,7 @@ const kn = ["data-active"], Wn = /* @__PURE__ */ _({
|
|
|
3180
3186
|
lg: "rounded-xl",
|
|
3181
3187
|
xl: "rounded-2xl",
|
|
3182
3188
|
full: "rounded-full"
|
|
3183
|
-
}, zn = ["onClick", "data-value"], Nn = /* @__PURE__ */
|
|
3189
|
+
}, zn = ["onClick", "data-value"], Nn = /* @__PURE__ */ A({
|
|
3184
3190
|
name: "SegmentedControl",
|
|
3185
3191
|
__name: "SegmentedControl",
|
|
3186
3192
|
props: {
|
|
@@ -3197,46 +3203,46 @@ const kn = ["data-active"], Wn = /* @__PURE__ */ _({
|
|
|
3197
3203
|
},
|
|
3198
3204
|
emits: ["update:modelValue"],
|
|
3199
3205
|
setup(s, { emit: t }) {
|
|
3200
|
-
const e = t, o = s, n =
|
|
3206
|
+
const e = t, o = s, n = _({}), a = _(null), r = g(() => o.data.map((c) => typeof c == "string" ? { value: c, label: c } : c)), l = g(() => o.orientation === "horizontal" ? "cstu-flex-row" : "cstu-flex-col"), i = async () => {
|
|
3201
3207
|
if (!o.modelValue)
|
|
3202
3208
|
return;
|
|
3203
3209
|
await Mt();
|
|
3204
|
-
const
|
|
3205
|
-
if (!
|
|
3210
|
+
const c = n.value[o.modelValue];
|
|
3211
|
+
if (!c)
|
|
3206
3212
|
return;
|
|
3207
|
-
const p =
|
|
3213
|
+
const p = c.getBoundingClientRect(), h = c.parentElement.getBoundingClientRect();
|
|
3208
3214
|
a.value = {
|
|
3209
3215
|
left: p.left - h.left,
|
|
3210
3216
|
top: p.top - h.top,
|
|
3211
3217
|
width: p.width,
|
|
3212
3218
|
height: p.height
|
|
3213
3219
|
};
|
|
3214
|
-
},
|
|
3215
|
-
e("update:modelValue",
|
|
3220
|
+
}, u = (c) => {
|
|
3221
|
+
e("update:modelValue", c);
|
|
3216
3222
|
};
|
|
3217
3223
|
return se(() => o.modelValue, i), se(() => o.orientation, i), He(() => {
|
|
3218
3224
|
i(), window.addEventListener("resize", i);
|
|
3219
3225
|
}), rt(() => {
|
|
3220
3226
|
window.removeEventListener("resize", i);
|
|
3221
|
-
}), (
|
|
3227
|
+
}), (c, p) => (f(), x("div", {
|
|
3222
3228
|
class: v([
|
|
3223
3229
|
"cstu-relative cstu-inline-flex",
|
|
3224
3230
|
l.value,
|
|
3225
3231
|
{
|
|
3226
|
-
"cstu-w-full":
|
|
3227
|
-
"cstu-opacity-50 cstu-pointer-events-none":
|
|
3232
|
+
"cstu-w-full": c.fullWidth,
|
|
3233
|
+
"cstu-opacity-50 cstu-pointer-events-none": c.disabled
|
|
3228
3234
|
}
|
|
3229
3235
|
]),
|
|
3230
3236
|
role: "radiogroup"
|
|
3231
3237
|
}, [
|
|
3232
3238
|
a.value ? (f(), x("div", {
|
|
3233
3239
|
key: 0,
|
|
3234
|
-
class: v(["cstu-absolute cstu-bg-white cstu-rounded-[inherit]",
|
|
3240
|
+
class: v(["cstu-absolute cstu-bg-white cstu-rounded-[inherit]", P(Me)[c.radius]]),
|
|
3235
3241
|
style: E({
|
|
3236
3242
|
transform: `translate(${a.value.left}px, ${a.value.top}px)`,
|
|
3237
3243
|
width: `${a.value.width}px`,
|
|
3238
3244
|
height: `${a.value.height}px`,
|
|
3239
|
-
transition: `transform ${
|
|
3245
|
+
transition: `transform ${c.transitionDuration}ms ease`,
|
|
3240
3246
|
boxShadow: "0 1px 2px 0 rgb(0 0 0 / 0.05)"
|
|
3241
3247
|
})
|
|
3242
3248
|
}, null, 6)) : B("", !0),
|
|
@@ -3244,40 +3250,40 @@ const kn = ["data-active"], Wn = /* @__PURE__ */ _({
|
|
|
3244
3250
|
class: v([
|
|
3245
3251
|
"cstu-relative cstu-flex",
|
|
3246
3252
|
l.value,
|
|
3247
|
-
|
|
3253
|
+
P(Me)[c.radius],
|
|
3248
3254
|
{
|
|
3249
|
-
"cstu-w-full":
|
|
3250
|
-
"cstu-divide-x cstu-divide-gray-200":
|
|
3251
|
-
"cstu-divide-y cstu-divide-gray-200":
|
|
3255
|
+
"cstu-w-full": c.fullWidth,
|
|
3256
|
+
"cstu-divide-x cstu-divide-gray-200": c.withItemsBorders && c.orientation === "horizontal",
|
|
3257
|
+
"cstu-divide-y cstu-divide-gray-200": c.withItemsBorders && c.orientation === "vertical"
|
|
3252
3258
|
},
|
|
3253
|
-
|
|
3259
|
+
P(I)(c.size, "segmentedControlContainer"),
|
|
3254
3260
|
"cstu-bg-gray-100"
|
|
3255
3261
|
])
|
|
3256
3262
|
}, [
|
|
3257
|
-
(f(!0), x(oe, null,
|
|
3263
|
+
(f(!0), x(oe, null, _e(r.value, (h) => (f(), x("div", {
|
|
3258
3264
|
key: h.value,
|
|
3259
3265
|
class: v([
|
|
3260
3266
|
"cstu-relative cstu-flex-1",
|
|
3261
3267
|
"cstu-transition-all cstu-duration-200",
|
|
3262
|
-
|
|
3268
|
+
P(Wt)(!!h.disabled),
|
|
3263
3269
|
o.modelValue === h.value ? "cstu-bg-white cstu-border-gray-500/15" : "cstu-border-transparent",
|
|
3264
|
-
|
|
3270
|
+
P(I)(c.size, "segmentedControl"),
|
|
3265
3271
|
"cstu-cursor-pointer",
|
|
3266
3272
|
"cstu-flex cstu-items-center cstu-justify-center hover:cstu-border-gray-500/15 cstu-border",
|
|
3267
|
-
|
|
3273
|
+
P(Me)[c.radius]
|
|
3268
3274
|
]),
|
|
3269
|
-
onClick: () => !h.disabled &&
|
|
3275
|
+
onClick: () => !h.disabled && u(h.value),
|
|
3270
3276
|
"data-value": h.value,
|
|
3271
3277
|
ref_for: !0,
|
|
3272
3278
|
ref: "el => segmentRefs[option.value] = el"
|
|
3273
3279
|
}, [
|
|
3274
3280
|
w("span", {
|
|
3275
3281
|
class: v([
|
|
3276
|
-
|
|
3282
|
+
P(Ke)({ size: c.size, disabled: h.disabled }),
|
|
3277
3283
|
o.modelValue === h.value ? "cstu-text-gray-500" : "cstu-text-gray-600",
|
|
3278
|
-
"cstu-select-none !cstu-mb-0 !cstu-font-normal cstu-capitalize"
|
|
3284
|
+
"cstu-select-none !cstu-mb-0 !cstu-font-normal cstu-capitalize cstu-whitespace-nowrap"
|
|
3279
3285
|
])
|
|
3280
|
-
},
|
|
3286
|
+
}, V(h.label), 3)
|
|
3281
3287
|
], 10, zn))), 128))
|
|
3282
3288
|
], 2)
|
|
3283
3289
|
], 2));
|
|
@@ -3288,22 +3294,22 @@ export {
|
|
|
3288
3294
|
jn as Badge,
|
|
3289
3295
|
Sn as Button,
|
|
3290
3296
|
Ln as Checkbox,
|
|
3291
|
-
|
|
3297
|
+
Vn as Chip,
|
|
3292
3298
|
Tn as Collapse,
|
|
3293
3299
|
Hn as Collapsible,
|
|
3294
3300
|
En as Dialog,
|
|
3295
3301
|
Wn as Dropdown,
|
|
3296
3302
|
Fn as DropdownItem,
|
|
3297
3303
|
xn as HoverCard,
|
|
3298
|
-
|
|
3299
|
-
|
|
3304
|
+
Ot as HoverCardTarget,
|
|
3305
|
+
Pn as Indicator,
|
|
3300
3306
|
$n as ListItem,
|
|
3301
3307
|
Mn as Loader,
|
|
3302
|
-
|
|
3303
|
-
|
|
3308
|
+
Rn as Progress,
|
|
3309
|
+
On as Radio,
|
|
3304
3310
|
Nn as SegmentedControl,
|
|
3305
|
-
|
|
3306
|
-
|
|
3311
|
+
An as Select,
|
|
3312
|
+
_n as TextInput,
|
|
3307
3313
|
In as composables,
|
|
3308
3314
|
Lt as hoverCardInjectionKey,
|
|
3309
3315
|
hn as useHoverCard
|