@ghentcdh/ui 0.6.9 → 0.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.css +1 -1
- package/index.esm.js +327 -314
- package/index.js +2 -2
- package/index.mjs +327 -314
- package/package.json +1 -1
package/index.esm.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { openBlock as l, createElementBlock as c, createElementVNode as r, defineComponent as w, computed as v, createBlock as y, resolveDynamicComponent as se, normalizeClass as
|
|
1
|
+
import { openBlock as l, createElementBlock as c, createElementVNode as r, defineComponent as w, computed as v, createBlock as y, resolveDynamicComponent as se, normalizeClass as _, createCommentVNode as k, toDisplayString as b, unref as g, Fragment as C, renderList as S, mergeProps as P, resolveComponent as ie, withCtx as L, createTextVNode as N, ref as M, watch as G, onMounted as ke, renderSlot as B, createVNode as V, withDirectives as Y, vModelCheckbox as xe, normalizeStyle as Z, useAttrs as Ve, getCurrentInstance as Ae, toHandlerKey as ye, camelize as je, withModifiers as ce, nextTick as _e, onUnmounted as Oe, normalizeProps as ee, guardReactiveProps as te, Transition as Re, useModel as E, mergeModels as O, onBeforeUnmount as Te, vModelDynamic as De, vModelText as $e, useSlots as Ce, toRef as we } from "vue";
|
|
2
2
|
import { RouterLink as Ne } from "vue-router";
|
|
3
3
|
import { v4 as ue } from "uuid";
|
|
4
4
|
import ze from "@tiptap/starter-kit";
|
|
@@ -382,7 +382,7 @@ const dt = {
|
|
|
382
382
|
const t = e, o = v(() => t.icon ? typeof t.icon == "string" ? dt[t.icon] : t.icon : null);
|
|
383
383
|
return (s, a) => o.value ? (l(), y(se(o.value), {
|
|
384
384
|
key: 0,
|
|
385
|
-
class:
|
|
385
|
+
class: _([
|
|
386
386
|
{
|
|
387
387
|
"w-full h-full": !s.size,
|
|
388
388
|
"w-2 h-2": s.size === "xs",
|
|
@@ -411,7 +411,7 @@ const dt = {
|
|
|
411
411
|
r("div", {
|
|
412
412
|
tabindex: "0",
|
|
413
413
|
role: "button",
|
|
414
|
-
class:
|
|
414
|
+
class: _([e.btnClass, "btn btn-ghost text-right flex-nowrap flex"])
|
|
415
415
|
}, [
|
|
416
416
|
r("span", null, b(e.label), 1),
|
|
417
417
|
e.disableArrow ? k("", !0) : (l(), y(g(I), {
|
|
@@ -452,7 +452,7 @@ const dt = {
|
|
|
452
452
|
return a.value ? (l(), y(de, P({ key: 0 }, t, { "btn-class": oe }), null, 16)) : o.value ? (l(), y(u, {
|
|
453
453
|
key: 1,
|
|
454
454
|
to: i.value,
|
|
455
|
-
class:
|
|
455
|
+
class: _(oe),
|
|
456
456
|
onClick: d
|
|
457
457
|
}, {
|
|
458
458
|
default: L(() => [
|
|
@@ -461,18 +461,18 @@ const dt = {
|
|
|
461
461
|
_: 1
|
|
462
462
|
}, 8, ["to"])) : s.value ? (l(), c("button", {
|
|
463
463
|
key: 2,
|
|
464
|
-
class:
|
|
464
|
+
class: _(oe),
|
|
465
465
|
onClick: d
|
|
466
466
|
}, b(e.label), 1)) : (l(), c("div", {
|
|
467
467
|
key: 3,
|
|
468
|
-
class:
|
|
468
|
+
class: _([oe, { "btn-disabled": e.disabled }])
|
|
469
469
|
}, b(e.label), 3));
|
|
470
470
|
};
|
|
471
471
|
}
|
|
472
472
|
}), gt = { class: "navbar bg-base-100 shadow-sm" }, vt = { class: "flex-1" }, bt = {
|
|
473
473
|
key: 0,
|
|
474
474
|
class: "breadcrumbs text-sm"
|
|
475
|
-
}, yt = { class: "flex grow justify-end px-2" }, wt = { class: "flex items-stretch" },
|
|
475
|
+
}, yt = { class: "flex grow justify-end px-2" }, wt = { class: "flex items-stretch" }, ls = /* @__PURE__ */ w({
|
|
476
476
|
__name: "menu",
|
|
477
477
|
props: {
|
|
478
478
|
menu: {},
|
|
@@ -513,7 +513,7 @@ const dt = {
|
|
|
513
513
|
]);
|
|
514
514
|
};
|
|
515
515
|
}
|
|
516
|
-
}),
|
|
516
|
+
}), as = /* @__PURE__ */ w({
|
|
517
517
|
__name: "dropdown",
|
|
518
518
|
props: {
|
|
519
519
|
items: {}
|
|
@@ -528,7 +528,7 @@ const dt = {
|
|
|
528
528
|
"disable-arrow": !0
|
|
529
529
|
}, null, 8, ["items", "open"]));
|
|
530
530
|
}
|
|
531
|
-
}), kt = { class: "font-bold" },
|
|
531
|
+
}), kt = { class: "font-bold" }, xt = { class: "pt-4" }, _t = { class: "modal-action" }, $t = /* @__PURE__ */ w({
|
|
532
532
|
__name: "modal",
|
|
533
533
|
props: {
|
|
534
534
|
modalTitle: {},
|
|
@@ -563,7 +563,7 @@ const dt = {
|
|
|
563
563
|
class: "modal"
|
|
564
564
|
}, [
|
|
565
565
|
r("div", {
|
|
566
|
-
class:
|
|
566
|
+
class: _(["modal-box bg-white", s[e.width]])
|
|
567
567
|
}, [
|
|
568
568
|
e.disableClose ? k("", !0) : (l(), c("button", {
|
|
569
569
|
key: 0,
|
|
@@ -572,22 +572,22 @@ const dt = {
|
|
|
572
572
|
onClick: f
|
|
573
573
|
}, " ✕ ")),
|
|
574
574
|
r("h3", kt, b(e.modalTitle), 1),
|
|
575
|
-
r("div",
|
|
575
|
+
r("div", xt, [
|
|
576
576
|
B(u.$slots, "content")
|
|
577
577
|
]),
|
|
578
|
-
r("div",
|
|
578
|
+
r("div", _t, [
|
|
579
579
|
B(u.$slots, "actions")
|
|
580
580
|
])
|
|
581
581
|
], 2)
|
|
582
582
|
]));
|
|
583
583
|
}
|
|
584
584
|
});
|
|
585
|
-
var pe = /* @__PURE__ */ ((e) => (e.button = "button", e.submit = "submit", e.reset = "reset", e))(pe || {}), Me = /* @__PURE__ */ ((e) => (e.a = "a", e.button = "button", e))(Me || {}),
|
|
585
|
+
var pe = /* @__PURE__ */ ((e) => (e.button = "button", e.submit = "submit", e.reset = "reset", e))(pe || {}), Me = /* @__PURE__ */ ((e) => (e.a = "a", e.button = "button", e))(Me || {}), q = /* @__PURE__ */ ((e) => (e.blank = "blank", e.primary = "primary", e.secondary = "secondary", e.error = "error", e))(q || {});
|
|
586
586
|
const Ct = {
|
|
587
587
|
blank: "btn-ghost",
|
|
588
588
|
primary: "btn-primary",
|
|
589
589
|
secondary: "btn-soft btn-primary",
|
|
590
|
-
error: "btn-error
|
|
590
|
+
error: "btn-error"
|
|
591
591
|
}, Lt = {
|
|
592
592
|
blank: "badge-ghost",
|
|
593
593
|
primary: "badge-primary",
|
|
@@ -601,7 +601,7 @@ const Ct = {
|
|
|
601
601
|
icon: { type: [String, Object, Function] },
|
|
602
602
|
type: { type: String, default: pe.button },
|
|
603
603
|
outline: { type: Boolean, default: !1 },
|
|
604
|
-
color: { type: String, default:
|
|
604
|
+
color: { type: String, default: q.primary },
|
|
605
605
|
size: { type: String, default: "sm" },
|
|
606
606
|
square: { type: Boolean, default: !1 }
|
|
607
607
|
}, St = ["click"], Bt = {
|
|
@@ -620,14 +620,14 @@ const Ct = {
|
|
|
620
620
|
sm: "badge-sm text-xs",
|
|
621
621
|
lg: "badge-sm text-xs",
|
|
622
622
|
xl: "badge text-xs"
|
|
623
|
-
},
|
|
623
|
+
}, z = /* @__PURE__ */ w({
|
|
624
624
|
__name: "btn",
|
|
625
625
|
props: Mt,
|
|
626
626
|
emits: St,
|
|
627
627
|
setup(e, { emit: t }) {
|
|
628
628
|
const o = e, s = t;
|
|
629
629
|
return (a, i) => (l(), y(se(o.as), {
|
|
630
|
-
class:
|
|
630
|
+
class: _([
|
|
631
631
|
"btn p-1 flex justify-center flex-nowrap",
|
|
632
632
|
g(Ct)[o.color],
|
|
633
633
|
g(Vt)[o.size],
|
|
@@ -650,14 +650,14 @@ const Ct = {
|
|
|
650
650
|
_: 3
|
|
651
651
|
}, 8, ["class", "href", "type", "disabled", "data-tip"]));
|
|
652
652
|
}
|
|
653
|
-
}), jt = ["type", "disabled"],
|
|
653
|
+
}), jt = ["type", "disabled"], rs = /* @__PURE__ */ w({
|
|
654
654
|
__name: "btn-badge",
|
|
655
655
|
props: Bt,
|
|
656
656
|
emits: Pt,
|
|
657
657
|
setup(e, { emit: t }) {
|
|
658
658
|
const o = e, s = t;
|
|
659
659
|
return (a, i) => (l(), c("button", {
|
|
660
|
-
class:
|
|
660
|
+
class: _(["badge gap-1", g(At)[o.size], g(Lt)[o.color]]),
|
|
661
661
|
type: o.type,
|
|
662
662
|
disabled: o.disabled,
|
|
663
663
|
onClick: i[0] || (i[0] = (d) => s("click"))
|
|
@@ -692,8 +692,8 @@ const Ct = {
|
|
|
692
692
|
N(b(e.message), 1)
|
|
693
693
|
]),
|
|
694
694
|
actions: L(() => [
|
|
695
|
-
V(g(
|
|
696
|
-
color: g(
|
|
695
|
+
V(g(z), {
|
|
696
|
+
color: g(q).secondary,
|
|
697
697
|
outline: !0,
|
|
698
698
|
onClick: i[0] || (i[0] = (d) => s(!1))
|
|
699
699
|
}, {
|
|
@@ -702,7 +702,7 @@ const Ct = {
|
|
|
702
702
|
]),
|
|
703
703
|
_: 1
|
|
704
704
|
}, 8, ["color"]),
|
|
705
|
-
V(g(
|
|
705
|
+
V(g(z), {
|
|
706
706
|
onClick: i[1] || (i[1] = (d) => s(!0))
|
|
707
707
|
}, {
|
|
708
708
|
default: L(() => [
|
|
@@ -774,7 +774,7 @@ const Rt = /* @__PURE__ */ w({
|
|
|
774
774
|
};
|
|
775
775
|
return (o, s) => (l(), c("div", {
|
|
776
776
|
role: "alert",
|
|
777
|
-
class:
|
|
777
|
+
class: _(`alert ${t[e.type]} `)
|
|
778
778
|
}, [
|
|
779
779
|
r("span", null, b(e.message), 1)
|
|
780
780
|
], 2));
|
|
@@ -827,7 +827,7 @@ const Nt = { class: "toast toast-top toast-center z-[999]" }, zt = /* @__PURE__
|
|
|
827
827
|
}, { ref_for: !0 }, a), null, 16))), 128))
|
|
828
828
|
]));
|
|
829
829
|
}
|
|
830
|
-
}), qt = { class: "flex h-screen flex-col" }, It = { class: "shrink-0" }, Et = { class: "navbar bg-primary text-primary-content w-full z-100" }, Ft = { class: "navbar-start" }, Ht = { class: "navbar-center" }, Kt = ["href"], Ut = { class: "navbar-end" }, Wt = { class: "drawer-content overflow-y-auto mb-2 mr-2 shadow-md" }, Zt = { class: "drawer-side h-full shadow-md" }, Gt = { class: "flex-grow overflow-y-auto" }, Jt = { class: "bg-base-200 p-4" },
|
|
830
|
+
}), qt = { class: "flex h-screen flex-col" }, It = { class: "shrink-0" }, Et = { class: "navbar bg-primary text-primary-content w-full z-100" }, Ft = { class: "navbar-start" }, Ht = { class: "navbar-center" }, Kt = ["href"], Ut = { class: "navbar-end" }, Wt = { class: "drawer-content overflow-y-auto mb-2 mr-2 shadow-md" }, Zt = { class: "drawer-side h-full shadow-md" }, Gt = { class: "flex-grow overflow-y-auto" }, Jt = { class: "bg-base-200 p-4" }, is = /* @__PURE__ */ w({
|
|
831
831
|
__name: "shell.component",
|
|
832
832
|
props: {
|
|
833
833
|
title: {},
|
|
@@ -880,7 +880,7 @@ const Nt = { class: "toast toast-top toast-center z-[999]" }, zt = /* @__PURE__
|
|
|
880
880
|
])
|
|
881
881
|
]),
|
|
882
882
|
r("div", {
|
|
883
|
-
class:
|
|
883
|
+
class: _(["drawer flex-1 overflow-hidden", { "drawer-open": a.value }])
|
|
884
884
|
}, [
|
|
885
885
|
Y(r("input", {
|
|
886
886
|
id: "app-drawer",
|
|
@@ -888,7 +888,7 @@ const Nt = { class: "toast toast-top toast-center z-[999]" }, zt = /* @__PURE__
|
|
|
888
888
|
type: "checkbox",
|
|
889
889
|
class: "drawer-toggle"
|
|
890
890
|
}, null, 512), [
|
|
891
|
-
[
|
|
891
|
+
[xe, a.value]
|
|
892
892
|
]),
|
|
893
893
|
r("main", Wt, [
|
|
894
894
|
B(f.$slots, "default")
|
|
@@ -937,10 +937,10 @@ const Nt = { class: "toast toast-top toast-center z-[999]" }, zt = /* @__PURE__
|
|
|
937
937
|
setup(e, { emit: t }) {
|
|
938
938
|
const o = e, s = t, a = v(
|
|
939
939
|
() => o.neverActive ? !1 : o.page === o.currentPage
|
|
940
|
-
), i = v(() => o.neverActive ?
|
|
940
|
+
), i = v(() => o.neverActive ? q.blank : a.value ? q.primary : q.secondary), d = () => {
|
|
941
941
|
s("updatePage", o.page);
|
|
942
942
|
};
|
|
943
|
-
return (p, f) => (l(), y(g(
|
|
943
|
+
return (p, f) => (l(), y(g(z), {
|
|
944
944
|
disabled: p.disabled,
|
|
945
945
|
square: !0,
|
|
946
946
|
size: "xs",
|
|
@@ -987,15 +987,15 @@ const Nt = { class: "toast toast-top toast-center z-[999]" }, zt = /* @__PURE__
|
|
|
987
987
|
}), f = v(() => {
|
|
988
988
|
let n = a.value;
|
|
989
989
|
n < 1 && (n = 1);
|
|
990
|
-
const m = o.currentPage, h = [], { min:
|
|
991
|
-
return Array.from({ length: n }, (K,
|
|
992
|
-
const $ =
|
|
993
|
-
$ !== 1 && $ !== n && ($ > R || $ <
|
|
990
|
+
const m = o.currentPage, h = [], { min: x, max: R } = d.value;
|
|
991
|
+
return Array.from({ length: n }, (K, A) => {
|
|
992
|
+
const $ = A + 1;
|
|
993
|
+
$ !== 1 && $ !== n && ($ > R || $ < x) || ($ === n && n > 1 && R < n && h.push(p(m)), h.push({
|
|
994
994
|
label: `${$}`,
|
|
995
995
|
totalPages: n,
|
|
996
996
|
currentPage: m,
|
|
997
997
|
page: $
|
|
998
|
-
}), $ === 1 && n > 1 &&
|
|
998
|
+
}), $ === 1 && n > 1 && x > 1 && h.push(p(m)));
|
|
999
999
|
}), h;
|
|
1000
1000
|
}), u = (n) => {
|
|
1001
1001
|
s("updatePage", n);
|
|
@@ -1048,7 +1048,7 @@ const Nt = { class: "toast toast-top toast-center z-[999]" }, zt = /* @__PURE__
|
|
|
1048
1048
|
data: { type: Object, required: !0 },
|
|
1049
1049
|
column: { type: Object, required: !0 },
|
|
1050
1050
|
options: { type: Object }
|
|
1051
|
-
},
|
|
1051
|
+
}, cs = /* @__PURE__ */ w({
|
|
1052
1052
|
__name: "text.cell",
|
|
1053
1053
|
props: ao,
|
|
1054
1054
|
setup(e) {
|
|
@@ -1092,7 +1092,7 @@ const Nt = { class: "toast toast-top toast-center z-[999]" }, zt = /* @__PURE__
|
|
|
1092
1092
|
displayColumns: { type: Array, required: !0 },
|
|
1093
1093
|
page: { type: Object },
|
|
1094
1094
|
sort: { type: Object }
|
|
1095
|
-
}, mo = ["updatePage", "sort"], ho = { class: "table w-full" }, go = { key: 0 }, vo = ["colspan"], bo = { class: "flex gap-2" },
|
|
1095
|
+
}, mo = ["updatePage", "sort"], ho = { class: "table w-full" }, go = { key: 0 }, vo = ["colspan"], bo = { class: "flex gap-2" }, us = /* @__PURE__ */ w({
|
|
1096
1096
|
__name: "table.component",
|
|
1097
1097
|
props: fo,
|
|
1098
1098
|
emits: mo,
|
|
@@ -1130,38 +1130,38 @@ const Nt = { class: "toast toast-top toast-center z-[999]" }, zt = /* @__PURE__
|
|
|
1130
1130
|
(l(!0), c(C, null, S(n.data, (h) => (l(), c("tr", {
|
|
1131
1131
|
key: h.id
|
|
1132
1132
|
}, [
|
|
1133
|
-
(l(!0), c(C, null, S(n.displayColumns, (
|
|
1134
|
-
key:
|
|
1133
|
+
(l(!0), c(C, null, S(n.displayColumns, (x) => (l(), c("td", {
|
|
1134
|
+
key: x.scope
|
|
1135
1135
|
}, [
|
|
1136
|
-
(l(), y(se(
|
|
1136
|
+
(l(), y(se(x.component), P({ ref_for: !0 }, x, {
|
|
1137
1137
|
data: h,
|
|
1138
|
-
column:
|
|
1138
|
+
column: x
|
|
1139
1139
|
}), null, 16, ["data", "column"]))
|
|
1140
1140
|
]))), 128)),
|
|
1141
1141
|
r("td", null, [
|
|
1142
1142
|
r("span", bo, [
|
|
1143
|
-
(l(!0), c(C, null, S(n.actions, (
|
|
1144
|
-
key:
|
|
1145
|
-
icon:
|
|
1143
|
+
(l(!0), c(C, null, S(n.actions, (x) => (l(), y(z, {
|
|
1144
|
+
key: x.label,
|
|
1145
|
+
icon: x.icon,
|
|
1146
1146
|
outline: !0,
|
|
1147
|
-
onClick: (R) =>
|
|
1147
|
+
onClick: (R) => x.action(h)
|
|
1148
1148
|
}, {
|
|
1149
1149
|
default: L(() => [
|
|
1150
|
-
N(b(
|
|
1150
|
+
N(b(x.label), 1)
|
|
1151
1151
|
]),
|
|
1152
1152
|
_: 2
|
|
1153
1153
|
}, 1032, ["icon", "onClick"]))), 128)),
|
|
1154
|
-
a.value ? (l(), y(
|
|
1154
|
+
a.value ? (l(), y(z, {
|
|
1155
1155
|
key: 0,
|
|
1156
1156
|
icon: g(D).Edit,
|
|
1157
1157
|
outline: !0,
|
|
1158
|
-
onClick: (
|
|
1158
|
+
onClick: (x) => d(h)
|
|
1159
1159
|
}, null, 8, ["icon", "onClick"])) : k("", !0),
|
|
1160
|
-
i.value ? (l(), y(
|
|
1160
|
+
i.value ? (l(), y(z, {
|
|
1161
1161
|
key: 1,
|
|
1162
1162
|
icon: g(D).Delete,
|
|
1163
1163
|
outline: !0,
|
|
1164
|
-
onClick: (
|
|
1164
|
+
onClick: (x) => p(h)
|
|
1165
1165
|
}, null, 8, ["icon", "onClick"])) : k("", !0)
|
|
1166
1166
|
])
|
|
1167
1167
|
])
|
|
@@ -1183,7 +1183,7 @@ const Nt = { class: "toast toast-top toast-center z-[999]" }, zt = /* @__PURE__
|
|
|
1183
1183
|
for (const [s, a] of t)
|
|
1184
1184
|
o[s] = a;
|
|
1185
1185
|
return o;
|
|
1186
|
-
}, wo = {}, ko = { class: "card bg-base-100 shadow-sm" },
|
|
1186
|
+
}, wo = {}, ko = { class: "card bg-base-100 shadow-sm" }, xo = { class: "card-body" }, _o = {
|
|
1187
1187
|
key: 0,
|
|
1188
1188
|
class: "card-title"
|
|
1189
1189
|
}, $o = {
|
|
@@ -1192,8 +1192,8 @@ const Nt = { class: "toast toast-top toast-center z-[999]" }, zt = /* @__PURE__
|
|
|
1192
1192
|
};
|
|
1193
1193
|
function Co(e, t) {
|
|
1194
1194
|
return l(), c("div", ko, [
|
|
1195
|
-
r("div",
|
|
1196
|
-
e.$slots.title ? (l(), c("h2",
|
|
1195
|
+
r("div", xo, [
|
|
1196
|
+
e.$slots.title ? (l(), c("h2", _o, [
|
|
1197
1197
|
B(e.$slots, "title")
|
|
1198
1198
|
])) : k("", !0),
|
|
1199
1199
|
r("p", null, [
|
|
@@ -1206,15 +1206,15 @@ function Co(e, t) {
|
|
|
1206
1206
|
])
|
|
1207
1207
|
]);
|
|
1208
1208
|
}
|
|
1209
|
-
const
|
|
1209
|
+
const ds = /* @__PURE__ */ yo(wo, [["render", Co]]), ps = (e, t) => {
|
|
1210
1210
|
if (!e) return null;
|
|
1211
1211
|
const o = (s) => {
|
|
1212
1212
|
e.contains(s.target) || t();
|
|
1213
1213
|
};
|
|
1214
1214
|
return document.addEventListener("click", o), o;
|
|
1215
|
-
},
|
|
1215
|
+
}, fs = (e) => {
|
|
1216
1216
|
document.removeEventListener("click", e);
|
|
1217
|
-
},
|
|
1217
|
+
}, ms = {
|
|
1218
1218
|
beforeMount(e, t) {
|
|
1219
1219
|
e.clickOutsideEvent = function(o) {
|
|
1220
1220
|
e === o.target || e.contains(o.target) || t.value(o);
|
|
@@ -1224,7 +1224,7 @@ const us = /* @__PURE__ */ yo(wo, [["render", Co]]), ds = (e, t) => {
|
|
|
1224
1224
|
document.removeEventListener("click", e.clickOutsideEvent);
|
|
1225
1225
|
}
|
|
1226
1226
|
};
|
|
1227
|
-
function
|
|
1227
|
+
function hs(e) {
|
|
1228
1228
|
const t = Ae();
|
|
1229
1229
|
if (!t)
|
|
1230
1230
|
return !1;
|
|
@@ -1233,7 +1233,7 @@ function ms(e) {
|
|
|
1233
1233
|
o[ye(je(e))]) : !1;
|
|
1234
1234
|
}
|
|
1235
1235
|
const Lo = ["select"], he = {
|
|
1236
|
-
options: { type: Array, required: !
|
|
1236
|
+
options: { type: Array, required: !1 },
|
|
1237
1237
|
isLoading: {
|
|
1238
1238
|
type: Boolean,
|
|
1239
1239
|
default: !1
|
|
@@ -1305,14 +1305,17 @@ const Lo = ["select"], he = {
|
|
|
1305
1305
|
labelKey: { type: String, default: "label" },
|
|
1306
1306
|
/** Key to use as the stored
|
|
1307
1307
|
value when options are objects */
|
|
1308
|
-
valueKey: { type: String, default: "value" }
|
|
1309
|
-
|
|
1308
|
+
valueKey: { type: String, default: "value" },
|
|
1309
|
+
/** add a new button next to the list*/
|
|
1310
|
+
enableCreate: { type: Boolean, default: !1 }
|
|
1311
|
+
}, Mo = ["select", "clear", "close", "create"], Se = {
|
|
1310
1312
|
...he,
|
|
1311
1313
|
...ge,
|
|
1312
1314
|
isOpen: { type: Boolean, default: !1 },
|
|
1313
1315
|
isActive: { type: Function, default: (e) => !1 }
|
|
1314
1316
|
}, So = {
|
|
1315
1317
|
key: 1,
|
|
1318
|
+
tabindex: "-1",
|
|
1316
1319
|
class: "pointer-events-none"
|
|
1317
1320
|
}, Bo = ["data-index", "aria-selected", "onMousedown", "onMousemove"], Po = ["innerHTML"], Vo = {
|
|
1318
1321
|
key: 0,
|
|
@@ -1344,7 +1347,7 @@ const jo = /* @__PURE__ */ w({
|
|
|
1344
1347
|
}
|
|
1345
1348
|
);
|
|
1346
1349
|
function p() {
|
|
1347
|
-
|
|
1350
|
+
_e(() => {
|
|
1348
1351
|
i.value?.querySelector(
|
|
1349
1352
|
`[data-index="${a.value}"]`
|
|
1350
1353
|
)?.scrollIntoView({ block: "nearest" });
|
|
@@ -1383,18 +1386,18 @@ const jo = /* @__PURE__ */ w({
|
|
|
1383
1386
|
], -1)
|
|
1384
1387
|
])])), 64)) : n.options.length === 0 ? (l(), c("li", So, [...m[1] || (m[1] = [
|
|
1385
1388
|
r("span", { class: "px-3 py-2 text-sm opacity-50 italic" }, " No results found ", -1)
|
|
1386
|
-
])])) : (l(!0), c(C, { key: 2 }, S(n.options, (h,
|
|
1389
|
+
])])) : (l(!0), c(C, { key: 2 }, S(n.options, (h, x) => (l(), c("li", {
|
|
1387
1390
|
key: h.value,
|
|
1388
|
-
"data-index":
|
|
1391
|
+
"data-index": x,
|
|
1389
1392
|
role: "option",
|
|
1390
|
-
"aria-selected":
|
|
1393
|
+
"aria-selected": x === a.value,
|
|
1391
1394
|
onMousedown: ce((R) => u(h), ["prevent"]),
|
|
1392
|
-
onMousemove: (R) => a.value =
|
|
1395
|
+
onMousemove: (R) => a.value = x
|
|
1393
1396
|
}, [
|
|
1394
1397
|
r("a", {
|
|
1395
|
-
class:
|
|
1396
|
-
"active bg-secondary text-primary-content":
|
|
1397
|
-
"hover:bg-base-200":
|
|
1398
|
+
class: _(["flex items-center justify-between gap-2 rounded-lg px-3 py-2 text-sm transition-colors duration-100", {
|
|
1399
|
+
"active bg-secondary text-primary-content": x === a.value,
|
|
1400
|
+
"hover:bg-base-200": x !== a.value
|
|
1398
1401
|
}])
|
|
1399
1402
|
}, [
|
|
1400
1403
|
r("span", {
|
|
@@ -1423,10 +1426,10 @@ const jo = /* @__PURE__ */ w({
|
|
|
1423
1426
|
!0
|
|
1424
1427
|
)), s = v(() => t.required), a = v(() => Be(t)), i = v(() => le(t.styles));
|
|
1425
1428
|
return (d, p) => (l(), c("fieldset", {
|
|
1426
|
-
class:
|
|
1429
|
+
class: _(["fieldset", [d.width, i.value.control.wrapper]])
|
|
1427
1430
|
}, [
|
|
1428
1431
|
r("legend", {
|
|
1429
|
-
class:
|
|
1432
|
+
class: _(i.value.control.label)
|
|
1430
1433
|
}, [
|
|
1431
1434
|
d.hideLabel ? k("", !0) : (l(), c(C, { key: 0 }, [
|
|
1432
1435
|
r("span", null, b(d.label), 1),
|
|
@@ -1436,11 +1439,11 @@ const jo = /* @__PURE__ */ w({
|
|
|
1436
1439
|
], 2),
|
|
1437
1440
|
B(d.$slots, "default"),
|
|
1438
1441
|
r("p", {
|
|
1439
|
-
class:
|
|
1442
|
+
class: _(["fieldset-label h-4", { "text-error": a.value }])
|
|
1440
1443
|
}, b(a.value ? d.errors : o.value ? d.description : null), 3)
|
|
1441
1444
|
], 2));
|
|
1442
1445
|
}
|
|
1443
|
-
}), To = { class: "overflow-hidden" },
|
|
1446
|
+
}), To = { class: "flex items-center w-full" }, Do = { class: "overflow-hidden w-full" }, No = { class: "absolute inset-y-0 right-0 flex items-center pr-3 gap-1 pointer-events-none" }, zo = {
|
|
1444
1447
|
key: 0,
|
|
1445
1448
|
class: "loading loading-spinner loading-xs text-primary pointer-events-none"
|
|
1446
1449
|
}, ve = /* @__PURE__ */ w({
|
|
@@ -1471,76 +1474,86 @@ const jo = /* @__PURE__ */ w({
|
|
|
1471
1474
|
}, [
|
|
1472
1475
|
V(J, ee(te(o)), {
|
|
1473
1476
|
default: L(() => [
|
|
1474
|
-
r("div",
|
|
1475
|
-
|
|
1476
|
-
|
|
1477
|
-
|
|
1478
|
-
|
|
1479
|
-
|
|
1480
|
-
|
|
1481
|
-
|
|
1482
|
-
|
|
1483
|
-
|
|
1484
|
-
|
|
1485
|
-
|
|
1486
|
-
|
|
1487
|
-
|
|
1488
|
-
|
|
1489
|
-
|
|
1490
|
-
|
|
1491
|
-
|
|
1477
|
+
r("div", To, [
|
|
1478
|
+
r("div", {
|
|
1479
|
+
class: "relative w-full",
|
|
1480
|
+
onKeydown: f
|
|
1481
|
+
}, [
|
|
1482
|
+
r("div", Do, [
|
|
1483
|
+
B(n.$slots, "default")
|
|
1484
|
+
]),
|
|
1485
|
+
r("div", No, [
|
|
1486
|
+
n.isLoading && !n.label ? (l(), c("span", zo)) : k("", !0),
|
|
1487
|
+
n.query && !n.isLoading ? (l(), c("button", {
|
|
1488
|
+
key: 1,
|
|
1489
|
+
type: "button",
|
|
1490
|
+
class: "pointer-events-auto btn btn-ghost btn-xs btn-circle opacity-60 hover:opacity-100",
|
|
1491
|
+
tabindex: "-1",
|
|
1492
|
+
"aria-label": "Clear",
|
|
1493
|
+
onMousedown: ce(d, ["prevent"])
|
|
1494
|
+
}, [...m[2] || (m[2] = [
|
|
1495
|
+
r("svg", {
|
|
1496
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1497
|
+
class: "h-3.5 w-3.5",
|
|
1498
|
+
fill: "none",
|
|
1499
|
+
viewBox: "0 0 24 24",
|
|
1500
|
+
stroke: "currentColor",
|
|
1501
|
+
"stroke-width": "2.5"
|
|
1502
|
+
}, [
|
|
1503
|
+
r("path", {
|
|
1504
|
+
"stroke-linecap": "round",
|
|
1505
|
+
"stroke-linejoin": "round",
|
|
1506
|
+
d: "M6 18L18 6M6 6l12 12"
|
|
1507
|
+
})
|
|
1508
|
+
], -1)
|
|
1509
|
+
])], 32)) : k("", !0),
|
|
1510
|
+
(l(), c("svg", {
|
|
1492
1511
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1493
|
-
class: "h-
|
|
1512
|
+
class: _(["h-4 w-4 opacity-40 transition-transform duration-200", { "rotate-180": n.isOpen }]),
|
|
1494
1513
|
fill: "none",
|
|
1495
1514
|
viewBox: "0 0 24 24",
|
|
1496
1515
|
stroke: "currentColor",
|
|
1497
|
-
"stroke-width": "2
|
|
1498
|
-
}, [
|
|
1516
|
+
"stroke-width": "2"
|
|
1517
|
+
}, [...m[3] || (m[3] = [
|
|
1499
1518
|
r("path", {
|
|
1500
1519
|
"stroke-linecap": "round",
|
|
1501
1520
|
"stroke-linejoin": "round",
|
|
1502
|
-
d: "
|
|
1503
|
-
})
|
|
1504
|
-
],
|
|
1505
|
-
])], 32)) : k("", !0),
|
|
1506
|
-
(l(), c("svg", {
|
|
1507
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
1508
|
-
class: x(["h-4 w-4 opacity-40 transition-transform duration-200", { "rotate-180": n.isOpen }]),
|
|
1509
|
-
fill: "none",
|
|
1510
|
-
viewBox: "0 0 24 24",
|
|
1511
|
-
stroke: "currentColor",
|
|
1512
|
-
"stroke-width": "2"
|
|
1513
|
-
}, [...m[2] || (m[2] = [
|
|
1514
|
-
r("path", {
|
|
1515
|
-
"stroke-linecap": "round",
|
|
1516
|
-
"stroke-linejoin": "round",
|
|
1517
|
-
d: "M19 9l-7 7-7-7"
|
|
1518
|
-
}, null, -1)
|
|
1519
|
-
])], 2))
|
|
1520
|
-
]),
|
|
1521
|
-
V(Re, {
|
|
1522
|
-
"enter-active-class": "transition-all duration-150 ease-out",
|
|
1523
|
-
"enter-from-class": "opacity-0 -translate-y-1 scale-y-95",
|
|
1524
|
-
"enter-to-class": "opacity-100 translate-y-0 scale-y-100",
|
|
1525
|
-
"leave-active-class": "transition-all duration-100 ease-in",
|
|
1526
|
-
"leave-from-class": "opacity-100 translate-y-0 scale-y-100",
|
|
1527
|
-
"leave-to-class": "opacity-0 -translate-y-1 scale-y-95"
|
|
1528
|
-
}, {
|
|
1529
|
-
default: L(() => [
|
|
1530
|
-
n.isOpen ? (l(), y(jo, {
|
|
1531
|
-
key: 0,
|
|
1532
|
-
ref_key: "listResultsRef",
|
|
1533
|
-
ref: a,
|
|
1534
|
-
query: n.query,
|
|
1535
|
-
options: n.options,
|
|
1536
|
-
"is-loading": n.isLoading,
|
|
1537
|
-
"is-active": n.isActive,
|
|
1538
|
-
onSelect: m[0] || (m[0] = (h) => i("select", h))
|
|
1539
|
-
}, null, 8, ["query", "options", "is-loading", "is-active"])) : k("", !0)
|
|
1521
|
+
d: "M19 9l-7 7-7-7"
|
|
1522
|
+
}, null, -1)
|
|
1523
|
+
])], 2))
|
|
1540
1524
|
]),
|
|
1541
|
-
|
|
1542
|
-
|
|
1543
|
-
|
|
1525
|
+
V(Re, {
|
|
1526
|
+
"enter-active-class": "transition-all duration-150 ease-out",
|
|
1527
|
+
"enter-from-class": "opacity-0 -translate-y-1 scale-y-95",
|
|
1528
|
+
"enter-to-class": "opacity-100 translate-y-0 scale-y-100",
|
|
1529
|
+
"leave-active-class": "transition-all duration-100 ease-in",
|
|
1530
|
+
"leave-from-class": "opacity-100 translate-y-0 scale-y-100",
|
|
1531
|
+
"leave-to-class": "opacity-0 -translate-y-1 scale-y-95"
|
|
1532
|
+
}, {
|
|
1533
|
+
default: L(() => [
|
|
1534
|
+
n.isOpen ? (l(), y(jo, {
|
|
1535
|
+
key: 0,
|
|
1536
|
+
ref_key: "listResultsRef",
|
|
1537
|
+
ref: a,
|
|
1538
|
+
query: n.query,
|
|
1539
|
+
options: n.options,
|
|
1540
|
+
"is-loading": n.isLoading,
|
|
1541
|
+
"is-active": n.isActive,
|
|
1542
|
+
onSelect: m[0] || (m[0] = (h) => i("select", h))
|
|
1543
|
+
}, null, 8, ["query", "options", "is-loading", "is-active"])) : k("", !0)
|
|
1544
|
+
]),
|
|
1545
|
+
_: 1
|
|
1546
|
+
})
|
|
1547
|
+
], 32),
|
|
1548
|
+
n.enableCreate ? (l(), y(z, {
|
|
1549
|
+
key: 0,
|
|
1550
|
+
icon: "Plus",
|
|
1551
|
+
color: "blank",
|
|
1552
|
+
size: "lg",
|
|
1553
|
+
tooltip: "Create new",
|
|
1554
|
+
onClick: m[1] || (m[1] = (h) => i("create"))
|
|
1555
|
+
})) : k("", !0)
|
|
1556
|
+
])
|
|
1544
1557
|
]),
|
|
1545
1558
|
_: 3
|
|
1546
1559
|
}, 16)
|
|
@@ -1552,15 +1565,15 @@ const jo = /* @__PURE__ */ w({
|
|
|
1552
1565
|
}, ae = (e, t) => {
|
|
1553
1566
|
if (e)
|
|
1554
1567
|
return typeof e == "object" ? e[t.valueKey] : e;
|
|
1555
|
-
},
|
|
1568
|
+
}, qo = (e) => {
|
|
1556
1569
|
const t = M([]), o = /* @__PURE__ */ new Map(), s = /* @__PURE__ */ new Map(), a = (n) => {
|
|
1557
1570
|
const m = [];
|
|
1558
1571
|
o.clear(), s.clear(), n?.forEach((h) => {
|
|
1559
|
-
const
|
|
1572
|
+
const x = {
|
|
1560
1573
|
value: ae(h, e),
|
|
1561
1574
|
label: re(h, e)
|
|
1562
1575
|
};
|
|
1563
|
-
o.set(
|
|
1576
|
+
o.set(x.value, h), m.push(x);
|
|
1564
1577
|
}), t.value = m;
|
|
1565
1578
|
}, i = (n) => o.get(n.value);
|
|
1566
1579
|
return {
|
|
@@ -1572,13 +1585,13 @@ const jo = /* @__PURE__ */ w({
|
|
|
1572
1585
|
getOption: (n) => s.get(ae(n, e)),
|
|
1573
1586
|
getOriginals: (...n) => n.map(i).filter(Boolean)
|
|
1574
1587
|
};
|
|
1575
|
-
}, be = (e) =>
|
|
1588
|
+
}, be = (e) => qo(e), gs = /* @__PURE__ */ w({
|
|
1576
1589
|
__name: "SelectComponent",
|
|
1577
1590
|
props: /* @__PURE__ */ O(ge, {
|
|
1578
1591
|
modelValue: {},
|
|
1579
1592
|
modelModifiers: {}
|
|
1580
1593
|
}),
|
|
1581
|
-
emits: /* @__PURE__ */ O(["change", "focus", "blur"], ["update:modelValue"]),
|
|
1594
|
+
emits: /* @__PURE__ */ O(["update:modelValue", "change", "clear", "focus", "blur"], ["update:modelValue"]),
|
|
1582
1595
|
setup(e, { emit: t }) {
|
|
1583
1596
|
const o = M(!1), s = e, a = t, i = E(e, "modelValue"), d = be(s), { options: p } = d;
|
|
1584
1597
|
G(
|
|
@@ -1588,41 +1601,41 @@ const jo = /* @__PURE__ */ w({
|
|
|
1588
1601
|
},
|
|
1589
1602
|
{ immediate: !0 }
|
|
1590
1603
|
);
|
|
1591
|
-
const f = (
|
|
1592
|
-
a("change",
|
|
1604
|
+
const f = (A) => {
|
|
1605
|
+
a("change", A);
|
|
1593
1606
|
}, u = v(
|
|
1594
1607
|
() => i.value ? d.getLabels(i.value)[0] : ""
|
|
1595
1608
|
), n = v(() => le(s.styles)), m = v(
|
|
1596
1609
|
() => H(n.value.control.select, s)
|
|
1597
|
-
), h = (
|
|
1598
|
-
const $ = d.getOriginal(
|
|
1610
|
+
), h = (A) => {
|
|
1611
|
+
const $ = d.getOriginal(A);
|
|
1599
1612
|
i.value = $, f($);
|
|
1600
|
-
},
|
|
1613
|
+
}, x = () => {
|
|
1601
1614
|
o.value = !1, i.value = null, f(void 0);
|
|
1602
|
-
}, R = (
|
|
1615
|
+
}, R = (A) => d.getValues(i.value)?.[0] === A.value, K = () => {
|
|
1603
1616
|
o.value = !1;
|
|
1604
1617
|
};
|
|
1605
|
-
return (
|
|
1618
|
+
return (A, $) => (l(), y(ve, P(s, {
|
|
1606
1619
|
options: g(p),
|
|
1607
|
-
disabled: !
|
|
1620
|
+
disabled: !A.enabled,
|
|
1608
1621
|
"is-open": o.value,
|
|
1609
1622
|
query: u.value,
|
|
1610
1623
|
"is-active": R,
|
|
1611
1624
|
onClose: K,
|
|
1612
1625
|
onSelect: h,
|
|
1613
|
-
onClear:
|
|
1626
|
+
onClear: x
|
|
1614
1627
|
}), {
|
|
1615
1628
|
default: L(() => [
|
|
1616
1629
|
r("button", {
|
|
1617
1630
|
type: "button",
|
|
1618
|
-
class:
|
|
1631
|
+
class: _(["truncate block text-left", [m.value, A.width]]),
|
|
1619
1632
|
onClick: $[0] || ($[0] = (T) => o.value = !0)
|
|
1620
1633
|
}, b(u.value ?? "Select value"), 3)
|
|
1621
1634
|
]),
|
|
1622
1635
|
_: 1
|
|
1623
1636
|
}, 16, ["options", "disabled", "is-open", "query"]));
|
|
1624
1637
|
}
|
|
1625
|
-
}),
|
|
1638
|
+
}), Io = {
|
|
1626
1639
|
...ge,
|
|
1627
1640
|
...he,
|
|
1628
1641
|
/** v-model binding */
|
|
@@ -1655,7 +1668,7 @@ const jo = /* @__PURE__ */ w({
|
|
|
1655
1668
|
default: !1
|
|
1656
1669
|
}
|
|
1657
1670
|
};
|
|
1658
|
-
function
|
|
1671
|
+
function Eo(e) {
|
|
1659
1672
|
const t = M([]), o = M(!1);
|
|
1660
1673
|
function s(i) {
|
|
1661
1674
|
if (!e.options) {
|
|
@@ -1672,7 +1685,7 @@ function Io(e) {
|
|
|
1672
1685
|
}
|
|
1673
1686
|
return { results: t, isLoading: o, search: s, clear: a };
|
|
1674
1687
|
}
|
|
1675
|
-
function
|
|
1688
|
+
function Fo(e) {
|
|
1676
1689
|
const t = M([]), o = M(!1);
|
|
1677
1690
|
let s = null, a = null;
|
|
1678
1691
|
async function i(f) {
|
|
@@ -1696,8 +1709,8 @@ function Eo(e) {
|
|
|
1696
1709
|
}
|
|
1697
1710
|
return { results: t, isLoading: o, search: d, clear: p };
|
|
1698
1711
|
}
|
|
1699
|
-
function
|
|
1700
|
-
const t = e.fetchOptions ?
|
|
1712
|
+
function Ho(e) {
|
|
1713
|
+
const t = e.fetchOptions ? Fo(e) : Eo(e);
|
|
1701
1714
|
function o(s) {
|
|
1702
1715
|
t.search(s);
|
|
1703
1716
|
}
|
|
@@ -1708,12 +1721,12 @@ function Fo(e) {
|
|
|
1708
1721
|
clear: t.clear
|
|
1709
1722
|
};
|
|
1710
1723
|
}
|
|
1711
|
-
const
|
|
1724
|
+
const Ko = ["aria-expanded", "value", "placeholder", "disabled"], vs = /* @__PURE__ */ w({
|
|
1712
1725
|
__name: "AutoComplete",
|
|
1713
|
-
props:
|
|
1714
|
-
emits: ["change", "focus", "blur"],
|
|
1726
|
+
props: Io,
|
|
1727
|
+
emits: ["update:modelValue", "change", "clear", "focus", "blur"],
|
|
1715
1728
|
setup(e, { emit: t }) {
|
|
1716
|
-
const o = e, s = t, a = M(null), i = M(""), d = M(!1), p =
|
|
1729
|
+
const o = e, s = t, a = M(null), i = M(""), d = M(!1), p = Ho(o), { isLoading: f, triggerSearch: u, clear: n } = p, m = be(o), { options: h } = m;
|
|
1717
1730
|
G(
|
|
1718
1731
|
() => p.results.value,
|
|
1719
1732
|
() => {
|
|
@@ -1722,43 +1735,43 @@ const Ho = ["aria-expanded", "value", "placeholder", "disabled"], gs = /* @__PUR
|
|
|
1722
1735
|
{ immediate: !0 }
|
|
1723
1736
|
), G(
|
|
1724
1737
|
() => o.modelValue,
|
|
1725
|
-
(
|
|
1726
|
-
if (
|
|
1738
|
+
(j) => {
|
|
1739
|
+
if (j == null || j === "") {
|
|
1727
1740
|
i.value = "";
|
|
1728
1741
|
return;
|
|
1729
1742
|
}
|
|
1730
|
-
const W = typeof
|
|
1743
|
+
const W = typeof j == "object" ? j[o.labelKey] : j;
|
|
1731
1744
|
W !== i.value && (i.value = W);
|
|
1732
1745
|
},
|
|
1733
1746
|
{ immediate: !0 }
|
|
1734
1747
|
);
|
|
1735
|
-
const
|
|
1736
|
-
i.value =
|
|
1748
|
+
const x = (j) => {
|
|
1749
|
+
i.value = j.target.value, o.freeText ? s("update:modelValue", i.value) : s("update:modelValue", ""), u(i.value), d.value = !0;
|
|
1737
1750
|
}, R = () => {
|
|
1738
1751
|
u(i.value), d.value = !0;
|
|
1739
1752
|
};
|
|
1740
1753
|
function K() {
|
|
1741
1754
|
setTimeout(() => {
|
|
1742
|
-
d.value = !1,
|
|
1755
|
+
d.value = !1, o.freeText ? s("change", i.value) : o.modelValue || (i.value = "");
|
|
1743
1756
|
}, 150);
|
|
1744
1757
|
}
|
|
1745
|
-
const
|
|
1746
|
-
const W = m.getOriginal(
|
|
1747
|
-
i.value =
|
|
1758
|
+
const A = (j) => {
|
|
1759
|
+
const W = m.getOriginal(j);
|
|
1760
|
+
i.value = j.label, d.value = !1, s("update:modelValue", W), s("change", W);
|
|
1748
1761
|
}, $ = () => {
|
|
1749
|
-
i.value = "", n(), d.value = !1, s("update:modelValue", ""), s("clear"),
|
|
1762
|
+
i.value = "", n(), d.value = !1, s("update:modelValue", ""), s("clear"), _e(() => a.value?.focus());
|
|
1750
1763
|
}, T = () => {
|
|
1751
1764
|
d.value = !1;
|
|
1752
1765
|
}, U = v(() => le(o.styles)), Pe = v(
|
|
1753
1766
|
() => H(U.value.control.select, o)
|
|
1754
1767
|
);
|
|
1755
|
-
return (
|
|
1768
|
+
return (j, W) => (l(), y(ve, P(o, {
|
|
1756
1769
|
options: g(h),
|
|
1757
1770
|
"is-loading": g(f),
|
|
1758
1771
|
"is-open": d.value,
|
|
1759
1772
|
query: i.value,
|
|
1760
1773
|
onClose: T,
|
|
1761
|
-
onSelect:
|
|
1774
|
+
onSelect: A,
|
|
1762
1775
|
onClear: $
|
|
1763
1776
|
}), {
|
|
1764
1777
|
default: L(() => [
|
|
@@ -1773,25 +1786,25 @@ const Ho = ["aria-expanded", "value", "placeholder", "disabled"], gs = /* @__PUR
|
|
|
1773
1786
|
autocomplete: "off",
|
|
1774
1787
|
autocorrect: "off",
|
|
1775
1788
|
spellcheck: "false",
|
|
1776
|
-
class:
|
|
1789
|
+
class: _([Pe.value, "w-full"]),
|
|
1777
1790
|
value: i.value,
|
|
1778
|
-
placeholder:
|
|
1779
|
-
disabled: !
|
|
1780
|
-
onInput:
|
|
1791
|
+
placeholder: j.placeholder,
|
|
1792
|
+
disabled: !j.enabled,
|
|
1793
|
+
onInput: x,
|
|
1781
1794
|
onFocus: R,
|
|
1782
1795
|
onBlur: K
|
|
1783
|
-
}, null, 42,
|
|
1796
|
+
}, null, 42, Ko)
|
|
1784
1797
|
]),
|
|
1785
1798
|
_: 1
|
|
1786
1799
|
}, 16, ["options", "is-loading", "is-open", "query"]));
|
|
1787
1800
|
}
|
|
1788
|
-
}),
|
|
1801
|
+
}), bs = /* @__PURE__ */ w({
|
|
1789
1802
|
__name: "MultiSelect",
|
|
1790
1803
|
props: /* @__PURE__ */ O(Se, {
|
|
1791
1804
|
modelValue: {},
|
|
1792
1805
|
modelModifiers: {}
|
|
1793
1806
|
}),
|
|
1794
|
-
emits: /* @__PURE__ */ O(["change", "focus", "blur"], ["update:modelValue"]),
|
|
1807
|
+
emits: /* @__PURE__ */ O(["update:modelValue", "change", "clear", "focus", "blur"], ["update:modelValue"]),
|
|
1795
1808
|
setup(e, { emit: t }) {
|
|
1796
1809
|
const o = M(!1), s = e, a = t, i = E(e, "modelValue"), d = ($) => {
|
|
1797
1810
|
a("change", $);
|
|
@@ -1820,9 +1833,9 @@ const Ho = ["aria-expanded", "value", "placeholder", "disabled"], gs = /* @__PUR
|
|
|
1820
1833
|
i.value = T, d(T);
|
|
1821
1834
|
}, h = () => {
|
|
1822
1835
|
o.value = !1, i.value = [], d([]);
|
|
1823
|
-
},
|
|
1836
|
+
}, x = () => {
|
|
1824
1837
|
o.value = !1;
|
|
1825
|
-
}, R = ($) => n.value?.includes($.value) ?? !1, K = v(() => le(s.styles)),
|
|
1838
|
+
}, R = ($) => n.value?.includes($.value) ?? !1, K = v(() => le(s.styles)), A = v(
|
|
1826
1839
|
() => H(K.value.control.select, s)
|
|
1827
1840
|
);
|
|
1828
1841
|
return ($, T) => (l(), y(ve, P(s, {
|
|
@@ -1831,21 +1844,21 @@ const Ho = ["aria-expanded", "value", "placeholder", "disabled"], gs = /* @__PUR
|
|
|
1831
1844
|
disabled: !$.enabled,
|
|
1832
1845
|
query: u.value,
|
|
1833
1846
|
"is-active": R,
|
|
1834
|
-
onClose:
|
|
1847
|
+
onClose: x,
|
|
1835
1848
|
onSelect: m,
|
|
1836
1849
|
onClear: h
|
|
1837
1850
|
}), {
|
|
1838
1851
|
default: L(() => [
|
|
1839
1852
|
r("button", {
|
|
1840
1853
|
type: "button",
|
|
1841
|
-
class:
|
|
1854
|
+
class: _(["truncate block text-left", [A.value, $.width]]),
|
|
1842
1855
|
onClick: T[0] || (T[0] = (U) => o.value = !0)
|
|
1843
1856
|
}, b(u.value ?? "Select value"), 3)
|
|
1844
1857
|
]),
|
|
1845
1858
|
_: 1
|
|
1846
1859
|
}, 16, ["options", "is-open", "disabled", "query"]));
|
|
1847
1860
|
}
|
|
1848
|
-
}),
|
|
1861
|
+
}), Uo = ["change"], Wo = {
|
|
1849
1862
|
...F,
|
|
1850
1863
|
width: { type: String, default: "w-48" },
|
|
1851
1864
|
minHeight: { type: String, default: "min-h-96" },
|
|
@@ -1864,13 +1877,13 @@ const Ho = ["aria-expanded", "value", "placeholder", "disabled"], gs = /* @__PUR
|
|
|
1864
1877
|
}
|
|
1865
1878
|
]
|
|
1866
1879
|
}
|
|
1867
|
-
},
|
|
1880
|
+
}, Zo = { class: "flex items-center gap-1 px-3 py-2 border-b border-base-300 bg-base-200" }, Go = ["title", "onClick"], Jo = ["innerHTML"], Qo = { class: "card-body p-3" }, ys = /* @__PURE__ */ w({
|
|
1868
1881
|
__name: "Markdown",
|
|
1869
|
-
props: /* @__PURE__ */ O(
|
|
1882
|
+
props: /* @__PURE__ */ O(Wo, {
|
|
1870
1883
|
modelValue: {},
|
|
1871
1884
|
modelModifiers: {}
|
|
1872
1885
|
}),
|
|
1873
|
-
emits: /* @__PURE__ */ O(
|
|
1886
|
+
emits: /* @__PURE__ */ O(Uo, ["update:modelValue"]),
|
|
1874
1887
|
setup(e, { emit: t }) {
|
|
1875
1888
|
const o = e, s = t, a = E(e, "modelValue"), i = qe({
|
|
1876
1889
|
content: a.value ?? "",
|
|
@@ -1901,23 +1914,23 @@ const Ho = ["aria-expanded", "value", "placeholder", "disabled"], gs = /* @__PUR
|
|
|
1901
1914
|
}), (d, p) => (l(), y(J, ee(te(o)), {
|
|
1902
1915
|
default: L(() => [
|
|
1903
1916
|
r("div", {
|
|
1904
|
-
class:
|
|
1917
|
+
class: _([[d.minHeight], "card bg-base-100 border border-base-300 w-full"])
|
|
1905
1918
|
}, [
|
|
1906
|
-
r("div",
|
|
1919
|
+
r("div", Zo, [
|
|
1907
1920
|
(l(!0), c(C, null, S(d.actions, (f) => (l(), c("button", {
|
|
1908
1921
|
key: f.name,
|
|
1909
1922
|
tabindex: "-1",
|
|
1910
1923
|
type: "button",
|
|
1911
|
-
class:
|
|
1924
|
+
class: _(["btn btn-sm btn-ghost", { "btn-active": g(i)?.isActive(f.name) }]),
|
|
1912
1925
|
title: f.label,
|
|
1913
1926
|
onClick: (u) => f.action(g(i))
|
|
1914
1927
|
}, [
|
|
1915
1928
|
r("span", {
|
|
1916
1929
|
innerHTML: f.label
|
|
1917
|
-
}, null, 8,
|
|
1918
|
-
], 10,
|
|
1930
|
+
}, null, 8, Jo)
|
|
1931
|
+
], 10, Go))), 128))
|
|
1919
1932
|
]),
|
|
1920
|
-
r("div",
|
|
1933
|
+
r("div", Qo, [
|
|
1921
1934
|
V(g(Ie), {
|
|
1922
1935
|
editor: g(i),
|
|
1923
1936
|
class: "prose prose-sm max-w-none h-full"
|
|
@@ -1928,15 +1941,15 @@ const Ho = ["aria-expanded", "value", "placeholder", "disabled"], gs = /* @__PUR
|
|
|
1928
1941
|
_: 1
|
|
1929
1942
|
}, 16));
|
|
1930
1943
|
}
|
|
1931
|
-
}),
|
|
1944
|
+
}), Xo = {
|
|
1932
1945
|
...F
|
|
1933
|
-
},
|
|
1946
|
+
}, Yo = ["change", "focus", "blur"], en = { class: "flex items-center justify-center h-full" }, tn = { class: "fieldset-label" }, on = ["disabled"], nn = { class: "font-bold text-gray-500 text-sm" }, ws = /* @__PURE__ */ w({
|
|
1934
1947
|
__name: "Checkbox",
|
|
1935
|
-
props: /* @__PURE__ */ O(
|
|
1948
|
+
props: /* @__PURE__ */ O(Xo, {
|
|
1936
1949
|
modelValue: {},
|
|
1937
1950
|
modelModifiers: {}
|
|
1938
1951
|
}),
|
|
1939
|
-
emits: /* @__PURE__ */ O(
|
|
1952
|
+
emits: /* @__PURE__ */ O(Yo, ["update:modelValue"]),
|
|
1940
1953
|
setup(e, { emit: t }) {
|
|
1941
1954
|
const o = e, s = t, a = E(e, "modelValue"), i = (u) => {
|
|
1942
1955
|
s("change", u);
|
|
@@ -1947,38 +1960,38 @@ const Ho = ["aria-expanded", "value", "placeholder", "disabled"], gs = /* @__PUR
|
|
|
1947
1960
|
}, f = v(
|
|
1948
1961
|
() => H(o.styles.control.checkbox, o)
|
|
1949
1962
|
);
|
|
1950
|
-
return (u, n) => (l(), c("div",
|
|
1963
|
+
return (u, n) => (l(), c("div", en, [
|
|
1951
1964
|
V(J, P(o, { "hide-label": !0 }), {
|
|
1952
1965
|
default: L(() => [
|
|
1953
|
-
r("label",
|
|
1966
|
+
r("label", tn, [
|
|
1954
1967
|
Y(r("input", {
|
|
1955
1968
|
"onUpdate:modelValue": n[0] || (n[0] = (m) => a.value = m),
|
|
1956
1969
|
type: "checkbox",
|
|
1957
|
-
class:
|
|
1970
|
+
class: _(f.value),
|
|
1958
1971
|
disabled: !u.enabled,
|
|
1959
1972
|
onChange: i,
|
|
1960
1973
|
onFocus: d,
|
|
1961
1974
|
onBlur: p
|
|
1962
|
-
}, null, 42,
|
|
1963
|
-
[
|
|
1975
|
+
}, null, 42, on), [
|
|
1976
|
+
[xe, a.value]
|
|
1964
1977
|
]),
|
|
1965
|
-
r("span",
|
|
1978
|
+
r("span", nn, b(u.label), 1)
|
|
1966
1979
|
])
|
|
1967
1980
|
]),
|
|
1968
1981
|
_: 1
|
|
1969
1982
|
}, 16)
|
|
1970
1983
|
]));
|
|
1971
1984
|
}
|
|
1972
|
-
}),
|
|
1985
|
+
}), sn = {
|
|
1973
1986
|
...F,
|
|
1974
1987
|
type: { type: String, default: "text" }
|
|
1975
|
-
},
|
|
1988
|
+
}, ln = ["change", "focus", "blur"], an = ["type", "disabled", "autofocus", "placeholder"], ks = /* @__PURE__ */ w({
|
|
1976
1989
|
__name: "Input",
|
|
1977
|
-
props: /* @__PURE__ */ O(
|
|
1990
|
+
props: /* @__PURE__ */ O(sn, {
|
|
1978
1991
|
modelValue: {},
|
|
1979
1992
|
modelModifiers: {}
|
|
1980
1993
|
}),
|
|
1981
|
-
emits: /* @__PURE__ */ O(
|
|
1994
|
+
emits: /* @__PURE__ */ O(ln, ["update:modelValue"]),
|
|
1982
1995
|
setup(e, { emit: t }) {
|
|
1983
1996
|
const o = e, s = t, a = E(e, "modelValue"), i = (u) => {
|
|
1984
1997
|
s("change", u);
|
|
@@ -1995,30 +2008,30 @@ const Ho = ["aria-expanded", "value", "placeholder", "disabled"], gs = /* @__PUR
|
|
|
1995
2008
|
"onUpdate:modelValue": n[0] || (n[0] = (m) => a.value = m),
|
|
1996
2009
|
autocomplete: "off",
|
|
1997
2010
|
type: u.type,
|
|
1998
|
-
class:
|
|
2011
|
+
class: _(["w-full", f.value]),
|
|
1999
2012
|
disabled: !u.enabled,
|
|
2000
2013
|
autofocus: u.isFocused,
|
|
2001
2014
|
placeholder: u.placeholder,
|
|
2002
2015
|
onChange: i,
|
|
2003
2016
|
onFocus: d,
|
|
2004
2017
|
onBlur: p
|
|
2005
|
-
}, null, 42,
|
|
2018
|
+
}, null, 42, an), [
|
|
2006
2019
|
[De, a.value]
|
|
2007
2020
|
])
|
|
2008
2021
|
]),
|
|
2009
2022
|
_: 1
|
|
2010
2023
|
}, 16));
|
|
2011
2024
|
}
|
|
2012
|
-
}),
|
|
2025
|
+
}), rn = {
|
|
2013
2026
|
...F,
|
|
2014
2027
|
steps: { type: Number, default: 1 }
|
|
2015
|
-
},
|
|
2028
|
+
}, cn = ["change", "focus", "blur"], un = ["disabled", "step", "autofocus", "placeholder"], xs = /* @__PURE__ */ w({
|
|
2016
2029
|
__name: "InputNumber",
|
|
2017
|
-
props: /* @__PURE__ */ O(
|
|
2030
|
+
props: /* @__PURE__ */ O(rn, {
|
|
2018
2031
|
modelValue: {},
|
|
2019
2032
|
modelModifiers: {}
|
|
2020
2033
|
}),
|
|
2021
|
-
emits: /* @__PURE__ */ O(
|
|
2034
|
+
emits: /* @__PURE__ */ O(cn, ["update:modelValue"]),
|
|
2022
2035
|
setup(e, { emit: t }) {
|
|
2023
2036
|
const o = e, s = t, a = E(e, "modelValue"), i = (u) => {
|
|
2024
2037
|
s("change", u);
|
|
@@ -2035,7 +2048,7 @@ const Ho = ["aria-expanded", "value", "placeholder", "disabled"], gs = /* @__PUR
|
|
|
2035
2048
|
"onUpdate:modelValue": n[0] || (n[0] = (m) => a.value = m),
|
|
2036
2049
|
autocomplete: "off",
|
|
2037
2050
|
type: "number",
|
|
2038
|
-
class:
|
|
2051
|
+
class: _(["w-full", [f.value]]),
|
|
2039
2052
|
disabled: !u.enabled,
|
|
2040
2053
|
step: u.steps,
|
|
2041
2054
|
autofocus: u.isFocused,
|
|
@@ -2043,23 +2056,23 @@ const Ho = ["aria-expanded", "value", "placeholder", "disabled"], gs = /* @__PUR
|
|
|
2043
2056
|
onChange: i,
|
|
2044
2057
|
onFocus: d,
|
|
2045
2058
|
onBlur: p
|
|
2046
|
-
}, null, 42,
|
|
2059
|
+
}, null, 42, un), [
|
|
2047
2060
|
[$e, a.value]
|
|
2048
2061
|
])
|
|
2049
2062
|
]),
|
|
2050
2063
|
_: 1
|
|
2051
2064
|
}, 16));
|
|
2052
2065
|
}
|
|
2053
|
-
}),
|
|
2066
|
+
}), dn = {
|
|
2054
2067
|
...F,
|
|
2055
2068
|
rows: { type: Number, default: 4 }
|
|
2056
|
-
},
|
|
2069
|
+
}, pn = ["change", "focus", "blur"], fn = ["disabled", "rows", "autofocus", "placeholder"], _s = /* @__PURE__ */ w({
|
|
2057
2070
|
__name: "Textarea",
|
|
2058
|
-
props: /* @__PURE__ */ O(
|
|
2071
|
+
props: /* @__PURE__ */ O(dn, {
|
|
2059
2072
|
modelValue: {},
|
|
2060
2073
|
modelModifiers: {}
|
|
2061
2074
|
}),
|
|
2062
|
-
emits: /* @__PURE__ */ O(
|
|
2075
|
+
emits: /* @__PURE__ */ O(pn, ["update:modelValue"]),
|
|
2063
2076
|
setup(e, { emit: t }) {
|
|
2064
2077
|
const o = e, s = t, a = E(e, "modelValue"), i = (u) => {
|
|
2065
2078
|
s("change", u);
|
|
@@ -2076,7 +2089,7 @@ const Ho = ["aria-expanded", "value", "placeholder", "disabled"], gs = /* @__PUR
|
|
|
2076
2089
|
"onUpdate:modelValue": n[0] || (n[0] = (m) => a.value = m),
|
|
2077
2090
|
autocomplete: "off",
|
|
2078
2091
|
type: "text",
|
|
2079
|
-
class:
|
|
2092
|
+
class: _(["w-full", f.value]),
|
|
2080
2093
|
disabled: !u.enabled,
|
|
2081
2094
|
rows: u.rows,
|
|
2082
2095
|
autofocus: u.isFocused,
|
|
@@ -2084,28 +2097,28 @@ const Ho = ["aria-expanded", "value", "placeholder", "disabled"], gs = /* @__PUR
|
|
|
2084
2097
|
onChange: i,
|
|
2085
2098
|
onFocus: d,
|
|
2086
2099
|
onBlur: p
|
|
2087
|
-
}, null, 42,
|
|
2100
|
+
}, null, 42, fn), [
|
|
2088
2101
|
[$e, a.value]
|
|
2089
2102
|
])
|
|
2090
2103
|
]),
|
|
2091
2104
|
_: 1
|
|
2092
2105
|
}, 16));
|
|
2093
2106
|
}
|
|
2094
|
-
}),
|
|
2107
|
+
}), mn = {
|
|
2095
2108
|
widthLeft: { type: Number, default: 200 },
|
|
2096
2109
|
widthRight: { type: Number, default: 200 },
|
|
2097
2110
|
initialLeftOpen: { type: Boolean, default: !0 },
|
|
2098
2111
|
initialRightOpen: { type: Boolean, default: !0 }
|
|
2099
|
-
},
|
|
2112
|
+
}, hn = { class: "flex h-full overflow-hidden gap-2" }, gn = {
|
|
2100
2113
|
key: 0,
|
|
2101
2114
|
id: "drawer-left",
|
|
2102
2115
|
class: "min-h-0 relative flex-shrink-0 bg-white overflow-visible flex"
|
|
2103
|
-
},
|
|
2116
|
+
}, vn = { class: "flex-1 overflow-y-auto bg-white" }, bn = {
|
|
2104
2117
|
key: 1,
|
|
2105
2118
|
class: "min-h-0 relative flex-shrink-0 bg-white overflow-visible flex"
|
|
2106
|
-
},
|
|
2119
|
+
}, $s = /* @__PURE__ */ w({
|
|
2107
2120
|
__name: "drawer",
|
|
2108
|
-
props:
|
|
2121
|
+
props: mn,
|
|
2109
2122
|
setup(e) {
|
|
2110
2123
|
const t = e, o = Ce(), s = v(() => !!o["left-drawer"]), a = v(() => !!o["right-drawer"]), i = M({
|
|
2111
2124
|
left: t.initialLeftOpen,
|
|
@@ -2113,8 +2126,8 @@ const Ho = ["aria-expanded", "value", "placeholder", "disabled"], gs = /* @__PUR
|
|
|
2113
2126
|
}), d = (p) => {
|
|
2114
2127
|
i.value[p] = !i.value[p];
|
|
2115
2128
|
};
|
|
2116
|
-
return (p, f) => (l(), c("main",
|
|
2117
|
-
s.value ? (l(), c("aside",
|
|
2129
|
+
return (p, f) => (l(), c("main", hn, [
|
|
2130
|
+
s.value ? (l(), c("aside", gn, [
|
|
2118
2131
|
r("div", {
|
|
2119
2132
|
style: Z({ width: i.value.left ? p.widthLeft + "px" : "0px" }),
|
|
2120
2133
|
class: "h-full overflow-hidden bg-white shadow-sm transition-[width] duration-300 ease-in-out"
|
|
@@ -2136,10 +2149,10 @@ const Ho = ["aria-expanded", "value", "placeholder", "disabled"], gs = /* @__PUR
|
|
|
2136
2149
|
}, null, 8, ["icon"])
|
|
2137
2150
|
])
|
|
2138
2151
|
])) : k("", !0),
|
|
2139
|
-
r("div",
|
|
2152
|
+
r("div", vn, [
|
|
2140
2153
|
B(p.$slots, "default")
|
|
2141
2154
|
]),
|
|
2142
|
-
a.value ? (l(), c("aside",
|
|
2155
|
+
a.value ? (l(), c("aside", bn, [
|
|
2143
2156
|
r("button", {
|
|
2144
2157
|
class: "hover:bg-base-300 hover:text-base-content transition-colors cursor-pointer",
|
|
2145
2158
|
onClick: f[1] || (f[1] = (u) => d("right"))
|
|
@@ -2163,10 +2176,10 @@ const Ho = ["aria-expanded", "value", "placeholder", "disabled"], gs = /* @__PUR
|
|
|
2163
2176
|
])) : k("", !0)
|
|
2164
2177
|
]));
|
|
2165
2178
|
}
|
|
2166
|
-
}),
|
|
2179
|
+
}), yn = { class: "ml-1" }, wn = { class: "truncate flex-1 min-w-0 text-left" }, kn = {
|
|
2167
2180
|
key: 0,
|
|
2168
2181
|
class: "badge badge-ghost badge-sm flex-shrink-0"
|
|
2169
|
-
},
|
|
2182
|
+
}, xn = /* @__PURE__ */ w({
|
|
2170
2183
|
__name: "TreeItem",
|
|
2171
2184
|
props: {
|
|
2172
2185
|
active: {},
|
|
@@ -2179,9 +2192,9 @@ const Ho = ["aria-expanded", "value", "placeholder", "disabled"], gs = /* @__PUR
|
|
|
2179
2192
|
const o = e, s = t, a = v(() => o.active === o.node.id);
|
|
2180
2193
|
return (i, d) => {
|
|
2181
2194
|
const p = ie("TreeItem", !0);
|
|
2182
|
-
return l(), c("li",
|
|
2195
|
+
return l(), c("li", yn, [
|
|
2183
2196
|
r("div", {
|
|
2184
|
-
class:
|
|
2197
|
+
class: _([
|
|
2185
2198
|
`flex items-center gap-1 cursor-pointer rounded-md px-1 py-0.5
|
|
2186
2199
|
hover:bg-gray-100`,
|
|
2187
2200
|
a.value ? "text-primary" : ""
|
|
@@ -2204,13 +2217,13 @@ const Ho = ["aria-expanded", "value", "placeholder", "disabled"], gs = /* @__PUR
|
|
|
2204
2217
|
class: "flex items-center gap-2 w-full min-w-0",
|
|
2205
2218
|
onClick: d[1] || (d[1] = (f) => s("select", e.node))
|
|
2206
2219
|
}, [
|
|
2207
|
-
r("div",
|
|
2208
|
-
e.node.tag ? (l(), c("div",
|
|
2220
|
+
r("div", wn, b(e.node.label), 1),
|
|
2221
|
+
e.node.tag ? (l(), c("div", kn, b(e.node.tag), 1)) : k("", !0)
|
|
2209
2222
|
])
|
|
2210
2223
|
], 2),
|
|
2211
2224
|
e.node.children && e.isExpanded(e.node.id) ? (l(), c("ul", {
|
|
2212
2225
|
key: 0,
|
|
2213
|
-
class:
|
|
2226
|
+
class: _([
|
|
2214
2227
|
"ml-4 border-l pl-2",
|
|
2215
2228
|
{ "border-gray-200": !a.value, "border-primary": a.value }
|
|
2216
2229
|
])
|
|
@@ -2228,7 +2241,7 @@ const Ho = ["aria-expanded", "value", "placeholder", "disabled"], gs = /* @__PUR
|
|
|
2228
2241
|
]);
|
|
2229
2242
|
};
|
|
2230
2243
|
}
|
|
2231
|
-
}), _n = { class: "select-none text-sm" },
|
|
2244
|
+
}), _n = { class: "select-none text-sm" }, Cs = /* @__PURE__ */ w({
|
|
2232
2245
|
__name: "TreeView",
|
|
2233
2246
|
props: {
|
|
2234
2247
|
data: {},
|
|
@@ -2247,7 +2260,7 @@ const Ho = ["aria-expanded", "value", "placeholder", "disabled"], gs = /* @__PUR
|
|
|
2247
2260
|
s("select", f), a.value.add(f.id);
|
|
2248
2261
|
}, p = (f) => a.value.has(f);
|
|
2249
2262
|
return (f, u) => (l(), c("ul", _n, [
|
|
2250
|
-
(l(!0), c(C, null, S(o.data, (n) => (l(), y(
|
|
2263
|
+
(l(!0), c(C, null, S(o.data, (n) => (l(), y(xn, {
|
|
2251
2264
|
key: n.id,
|
|
2252
2265
|
node: n,
|
|
2253
2266
|
expanded: a.value,
|
|
@@ -2258,20 +2271,20 @@ const Ho = ["aria-expanded", "value", "placeholder", "disabled"], gs = /* @__PUR
|
|
|
2258
2271
|
}, null, 8, ["node", "expanded", "active"]))), 128))
|
|
2259
2272
|
]));
|
|
2260
2273
|
}
|
|
2261
|
-
}),
|
|
2274
|
+
}), $n = {
|
|
2262
2275
|
key: 0,
|
|
2263
2276
|
class: "flex items-center justify-center h-20"
|
|
2264
|
-
},
|
|
2277
|
+
}, Ls = /* @__PURE__ */ w({
|
|
2265
2278
|
__name: "loading",
|
|
2266
2279
|
props: {
|
|
2267
2280
|
loading: { type: Boolean }
|
|
2268
2281
|
},
|
|
2269
2282
|
setup(e) {
|
|
2270
|
-
return (t, o) => e.loading ? (l(), c("div",
|
|
2283
|
+
return (t, o) => e.loading ? (l(), c("div", $n, [...o[0] || (o[0] = [
|
|
2271
2284
|
r("span", { class: "loading loading-bars loading-md text-primary" }, null, -1)
|
|
2272
2285
|
])])) : k("", !0);
|
|
2273
2286
|
}
|
|
2274
|
-
}),
|
|
2287
|
+
}), Cn = {
|
|
2275
2288
|
title: { type: String, required: !0 },
|
|
2276
2289
|
opened: { type: Boolean, default: !0 },
|
|
2277
2290
|
heightFull: { type: Boolean, default: !1 },
|
|
@@ -2280,16 +2293,16 @@ const Ho = ["aria-expanded", "value", "placeholder", "disabled"], gs = /* @__PUR
|
|
|
2280
2293
|
type: Array,
|
|
2281
2294
|
default: () => []
|
|
2282
2295
|
}
|
|
2283
|
-
},
|
|
2296
|
+
}, Ln = ["checked"], Mn = { class: "collapse-title text-gray-500 text-xs font-medium" }, Sn = { class: "flex items-center justify-between" }, Bn = {
|
|
2284
2297
|
key: 0,
|
|
2285
2298
|
class: "list bg-base-100"
|
|
2286
|
-
},
|
|
2299
|
+
}, Pn = /* @__PURE__ */ w({
|
|
2287
2300
|
__name: "Collapse",
|
|
2288
|
-
props:
|
|
2301
|
+
props: Cn,
|
|
2289
2302
|
setup(e) {
|
|
2290
2303
|
const t = Ce(), o = e, s = M(o.opened), a = M(o.opened || o.disabled);
|
|
2291
2304
|
return (i, d) => (l(), c("div", {
|
|
2292
|
-
class:
|
|
2305
|
+
class: _([
|
|
2293
2306
|
"collapse collapse-arrow bg-white w-full border border-gray-300",
|
|
2294
2307
|
i.heightFull ? "h-full" : "",
|
|
2295
2308
|
i.disabled ? "collapse-open" : "",
|
|
@@ -2302,9 +2315,9 @@ const Ho = ["aria-expanded", "value", "placeholder", "disabled"], gs = /* @__PUR
|
|
|
2302
2315
|
checked: s.value,
|
|
2303
2316
|
tabindex: "-1",
|
|
2304
2317
|
onChange: d[0] || (d[0] = (p) => a.value = p.target.checked)
|
|
2305
|
-
}, null, 40,
|
|
2306
|
-
r("div",
|
|
2307
|
-
r("div",
|
|
2318
|
+
}, null, 40, Ln)),
|
|
2319
|
+
r("div", Mn, [
|
|
2320
|
+
r("div", Sn, [
|
|
2308
2321
|
r("span", null, b(i.title), 1),
|
|
2309
2322
|
o.actions.length > 0 ? (l(), c("div", {
|
|
2310
2323
|
key: 0,
|
|
@@ -2312,9 +2325,9 @@ const Ho = ["aria-expanded", "value", "placeholder", "disabled"], gs = /* @__PUR
|
|
|
2312
2325
|
onClick: d[1] || (d[1] = ce(() => {
|
|
2313
2326
|
}, ["stop"]))
|
|
2314
2327
|
}, [
|
|
2315
|
-
(l(!0), c(C, null, S(o.actions, (p, f) => (l(), y(g(
|
|
2328
|
+
(l(!0), c(C, null, S(o.actions, (p, f) => (l(), y(g(z), {
|
|
2316
2329
|
key: f,
|
|
2317
|
-
color: g(
|
|
2330
|
+
color: g(q).blank,
|
|
2318
2331
|
size: "xs",
|
|
2319
2332
|
icon: p.icon,
|
|
2320
2333
|
tooltip: p.tooltip,
|
|
@@ -2330,53 +2343,53 @@ const Ho = ["aria-expanded", "value", "placeholder", "disabled"], gs = /* @__PUR
|
|
|
2330
2343
|
])
|
|
2331
2344
|
]),
|
|
2332
2345
|
r("div", {
|
|
2333
|
-
class:
|
|
2346
|
+
class: _(["collapse-content", g(t).list ? "p-0" : ""])
|
|
2334
2347
|
}, [
|
|
2335
2348
|
B(i.$slots, "default"),
|
|
2336
|
-
g(t).list ? (l(), c("ul",
|
|
2349
|
+
g(t).list ? (l(), c("ul", Bn, [
|
|
2337
2350
|
B(i.$slots, "list")
|
|
2338
2351
|
])) : k("", !0)
|
|
2339
2352
|
], 2)
|
|
2340
2353
|
], 2));
|
|
2341
2354
|
}
|
|
2342
|
-
}),
|
|
2355
|
+
}), Vn = {
|
|
2343
2356
|
title: { type: String },
|
|
2344
2357
|
label: { type: String },
|
|
2345
2358
|
labelLink: { type: String },
|
|
2346
2359
|
description: { type: String },
|
|
2347
2360
|
descriptionLink: { type: String }
|
|
2348
|
-
},
|
|
2361
|
+
}, An = { class: "list-row" }, jn = { class: "list-col-grow" }, On = { key: 0 }, Rn = {
|
|
2349
2362
|
key: 1,
|
|
2350
2363
|
class: "text-xs text-gray-600"
|
|
2351
|
-
},
|
|
2364
|
+
}, Tn = ["href"], Dn = { key: 1 }, Nn = {
|
|
2352
2365
|
key: 0,
|
|
2353
2366
|
class: "text-xs text-gray-500"
|
|
2354
|
-
},
|
|
2367
|
+
}, zn = ["href"], qn = { key: 1 }, Ms = /* @__PURE__ */ w({
|
|
2355
2368
|
__name: "CollapseRow",
|
|
2356
|
-
props:
|
|
2369
|
+
props: Vn,
|
|
2357
2370
|
setup(e) {
|
|
2358
|
-
return (t, o) => (l(), c("li",
|
|
2359
|
-
r("div",
|
|
2360
|
-
t.title ? (l(), c("div",
|
|
2361
|
-
t.description || t.descriptionLink ? (l(), c("div",
|
|
2371
|
+
return (t, o) => (l(), c("li", An, [
|
|
2372
|
+
r("div", jn, [
|
|
2373
|
+
t.title ? (l(), c("div", On, b(t.title), 1)) : k("", !0),
|
|
2374
|
+
t.description || t.descriptionLink ? (l(), c("div", Rn, [
|
|
2362
2375
|
t.descriptionLink ? (l(), c("a", {
|
|
2363
2376
|
key: 0,
|
|
2364
2377
|
href: t.descriptionLink,
|
|
2365
2378
|
target: "_blank"
|
|
2366
|
-
}, b(t.description ?? t.descriptionLink), 9,
|
|
2379
|
+
}, b(t.description ?? t.descriptionLink), 9, Tn)) : (l(), c("span", Dn, b(t.description), 1))
|
|
2367
2380
|
])) : k("", !0)
|
|
2368
2381
|
]),
|
|
2369
|
-
t.label ? (l(), c("div",
|
|
2382
|
+
t.label ? (l(), c("div", Nn, [
|
|
2370
2383
|
t.labelLink ? (l(), c("a", {
|
|
2371
2384
|
key: 0,
|
|
2372
2385
|
href: t.labelLink,
|
|
2373
2386
|
target: "_blank"
|
|
2374
|
-
}, b(t.label), 9,
|
|
2387
|
+
}, b(t.label), 9, zn)) : (l(), c("span", qn, b(t.label), 1))
|
|
2375
2388
|
])) : k("", !0),
|
|
2376
2389
|
B(t.$slots, "default")
|
|
2377
2390
|
]));
|
|
2378
2391
|
}
|
|
2379
|
-
}),
|
|
2392
|
+
}), In = { class: "text-gray-800" }, Ss = /* @__PURE__ */ w({
|
|
2380
2393
|
__name: "alert",
|
|
2381
2394
|
props: {
|
|
2382
2395
|
message: {},
|
|
@@ -2391,13 +2404,13 @@ const Ho = ["aria-expanded", "value", "placeholder", "disabled"], gs = /* @__PUR
|
|
|
2391
2404
|
};
|
|
2392
2405
|
return (o, s) => (l(), c("div", {
|
|
2393
2406
|
role: "alert",
|
|
2394
|
-
class:
|
|
2407
|
+
class: _(`alert alert-soft ${t[e.type]} `)
|
|
2395
2408
|
}, [
|
|
2396
|
-
r("span",
|
|
2409
|
+
r("span", In, b(e.message), 1),
|
|
2397
2410
|
B(o.$slots, "default")
|
|
2398
2411
|
], 2));
|
|
2399
2412
|
}
|
|
2400
|
-
}),
|
|
2413
|
+
}), En = {
|
|
2401
2414
|
title: { type: String, required: !0 },
|
|
2402
2415
|
items: {
|
|
2403
2416
|
type: Array,
|
|
@@ -2416,7 +2429,7 @@ const Ho = ["aria-expanded", "value", "placeholder", "disabled"], gs = /* @__PUR
|
|
|
2416
2429
|
default: void 0
|
|
2417
2430
|
},
|
|
2418
2431
|
opened: { type: Boolean, default: !0 }
|
|
2419
|
-
},
|
|
2432
|
+
}, Fn = ["update:modelValue"], Hn = (e, t, o, s) => {
|
|
2420
2433
|
const a = v(
|
|
2421
2434
|
() => e.value.map((n) => n[o.value])
|
|
2422
2435
|
), i = (n) => t.value.includes(n), d = v(() => {
|
|
@@ -2429,23 +2442,23 @@ const Ho = ["aria-expanded", "value", "placeholder", "disabled"], gs = /* @__PUR
|
|
|
2429
2442
|
t.value.filter((h) => h !== n)
|
|
2430
2443
|
);
|
|
2431
2444
|
} };
|
|
2432
|
-
},
|
|
2445
|
+
}, Kn = { class: "flex items-center justify-between mb-2" }, Un = { class: "text-xs text-base-content/50" }, Wn = { class: "flex gap-1" }, Zn = { class: "flex flex-col gap-1" }, Gn = ["checked", "onChange"], Jn = { class: "text-sm flex-1 select-none" }, Qn = {
|
|
2433
2446
|
key: 1,
|
|
2434
2447
|
class: "badge badge-sm badge-ghost"
|
|
2435
|
-
},
|
|
2448
|
+
}, Bs = /* @__PURE__ */ w({
|
|
2436
2449
|
__name: "filter",
|
|
2437
|
-
props:
|
|
2438
|
-
emits:
|
|
2450
|
+
props: En,
|
|
2451
|
+
emits: Fn,
|
|
2439
2452
|
setup(e, { emit: t }) {
|
|
2440
|
-
const o = e, s = t, a = v(() => o.items ?? []), { isSelected: i, selectedLabel: d, selectAll: p, selectNone: f, toggleItem: u } =
|
|
2441
|
-
return (n, m) => (l(), y(g(
|
|
2453
|
+
const o = e, s = t, a = v(() => o.items ?? []), { isSelected: i, selectedLabel: d, selectAll: p, selectNone: f, toggleItem: u } = Hn(a, we(o, "modelValue"), we(o, "valueKey"), s);
|
|
2454
|
+
return (n, m) => (l(), y(g(Pn), {
|
|
2442
2455
|
title: n.title,
|
|
2443
2456
|
opened: n.opened
|
|
2444
2457
|
}, {
|
|
2445
2458
|
default: L(() => [
|
|
2446
|
-
r("div",
|
|
2447
|
-
r("span",
|
|
2448
|
-
r("div",
|
|
2459
|
+
r("div", Kn, [
|
|
2460
|
+
r("span", Un, b(g(d)) + " of " + b(a.value.length) + " items ", 1),
|
|
2461
|
+
r("div", Wn, [
|
|
2449
2462
|
r("button", {
|
|
2450
2463
|
class: "btn btn-ghost btn-xs",
|
|
2451
2464
|
type: "button",
|
|
@@ -2462,27 +2475,27 @@ const Ho = ["aria-expanded", "value", "placeholder", "disabled"], gs = /* @__PUR
|
|
|
2462
2475
|
}, " None ")
|
|
2463
2476
|
])
|
|
2464
2477
|
]),
|
|
2465
|
-
r("div",
|
|
2478
|
+
r("div", Zn, [
|
|
2466
2479
|
(l(!0), c(C, null, S(a.value, (h) => (l(), c("label", {
|
|
2467
2480
|
key: h[n.valueKey],
|
|
2468
|
-
class:
|
|
2481
|
+
class: _(["flex items-center gap-3 px-2 py-1.5 rounded-lg cursor-pointer transition-colors hover:bg-base-200", { "bg-base-200/60": g(i)(h[n.valueKey]) }])
|
|
2469
2482
|
}, [
|
|
2470
2483
|
r("input", {
|
|
2471
2484
|
type: "checkbox",
|
|
2472
2485
|
class: "checkbox checkbox-sm",
|
|
2473
2486
|
checked: g(i)(h[n.valueKey]),
|
|
2474
|
-
onChange: (
|
|
2487
|
+
onChange: (x) => g(u)(
|
|
2475
2488
|
h[n.valueKey],
|
|
2476
|
-
|
|
2489
|
+
x.target.checked
|
|
2477
2490
|
)
|
|
2478
|
-
}, null, 40,
|
|
2491
|
+
}, null, 40, Gn),
|
|
2479
2492
|
n.colorKey && h[n.colorKey] ? (l(), c("span", {
|
|
2480
2493
|
key: 0,
|
|
2481
2494
|
class: "w-3 h-3 rounded-full shrink-0 ring-1 ring-black/10",
|
|
2482
2495
|
style: Z({ backgroundColor: h[n.colorKey] })
|
|
2483
2496
|
}, null, 4)) : k("", !0),
|
|
2484
|
-
r("span",
|
|
2485
|
-
h[n.countKey] > 0 ? (l(), c("span",
|
|
2497
|
+
r("span", Jn, b(h[n.labelKey]), 1),
|
|
2498
|
+
h[n.countKey] > 0 ? (l(), c("span", Qn, b(h[n.countKey]), 1)) : k("", !0)
|
|
2486
2499
|
], 2))), 128))
|
|
2487
2500
|
])
|
|
2488
2501
|
]),
|
|
@@ -2491,11 +2504,11 @@ const Ho = ["aria-expanded", "value", "placeholder", "disabled"], gs = /* @__PUR
|
|
|
2491
2504
|
}
|
|
2492
2505
|
});
|
|
2493
2506
|
export {
|
|
2494
|
-
|
|
2495
|
-
|
|
2507
|
+
Ss as Alert,
|
|
2508
|
+
vs as Autocomplete,
|
|
2496
2509
|
At as BadgeSize,
|
|
2497
|
-
|
|
2498
|
-
|
|
2510
|
+
z as Btn,
|
|
2511
|
+
rs as BtnBadge,
|
|
2499
2512
|
Pt as BtnBadgeEmits,
|
|
2500
2513
|
Bt as BtnBadgeProperties,
|
|
2501
2514
|
St as BtnEmits,
|
|
@@ -2503,51 +2516,51 @@ export {
|
|
|
2503
2516
|
Vt as ButtonSize,
|
|
2504
2517
|
Me as ButtonTag,
|
|
2505
2518
|
pe as ButtonType,
|
|
2506
|
-
|
|
2507
|
-
|
|
2508
|
-
|
|
2509
|
-
|
|
2510
|
-
|
|
2511
|
-
|
|
2519
|
+
ds as Card,
|
|
2520
|
+
ws as Checkbox,
|
|
2521
|
+
ms as ClickOutside,
|
|
2522
|
+
Pn as Collapse,
|
|
2523
|
+
Ms as CollapseRow,
|
|
2524
|
+
q as Color,
|
|
2512
2525
|
Ot as ConfirmModal,
|
|
2513
2526
|
J as ControlWrapper,
|
|
2514
|
-
|
|
2515
|
-
|
|
2516
|
-
|
|
2517
|
-
|
|
2518
|
-
|
|
2527
|
+
$s as Drawer,
|
|
2528
|
+
as as Dropdown,
|
|
2529
|
+
Bs as Filter,
|
|
2530
|
+
Fn as FilterEmits,
|
|
2531
|
+
En as FilterProperties,
|
|
2519
2532
|
I as Icon,
|
|
2520
2533
|
D as IconEnum,
|
|
2521
2534
|
dt as IconMap,
|
|
2522
2535
|
pt as IconProperties,
|
|
2523
|
-
|
|
2524
|
-
|
|
2525
|
-
|
|
2526
|
-
|
|
2527
|
-
|
|
2536
|
+
ks as Input,
|
|
2537
|
+
xs as InputNumber,
|
|
2538
|
+
Ls as Loading,
|
|
2539
|
+
ys as Markdown,
|
|
2540
|
+
ls as Menu,
|
|
2528
2541
|
$t as Modal,
|
|
2529
2542
|
fe as ModalService,
|
|
2530
2543
|
Rt as ModalWrapper,
|
|
2531
|
-
|
|
2544
|
+
bs as MultiSelect,
|
|
2532
2545
|
Tt as NotificationMessage,
|
|
2533
2546
|
me as NotificationService,
|
|
2534
2547
|
zt as Notifications,
|
|
2535
2548
|
lo as PaginationComponent,
|
|
2536
|
-
|
|
2537
|
-
|
|
2549
|
+
gs as SelectComponent,
|
|
2550
|
+
is as ShellComponent,
|
|
2538
2551
|
de as SubMenu,
|
|
2539
|
-
|
|
2540
|
-
|
|
2541
|
-
|
|
2552
|
+
us as Table,
|
|
2553
|
+
us as TableComponent,
|
|
2554
|
+
cs as TextCell,
|
|
2542
2555
|
_s as Textarea,
|
|
2543
|
-
|
|
2544
|
-
|
|
2556
|
+
Cs as TreeView,
|
|
2557
|
+
ps as addClickOutsideEventListener,
|
|
2545
2558
|
H as buildInputStyle,
|
|
2546
|
-
|
|
2559
|
+
hs as hasCustomEventListener,
|
|
2547
2560
|
Oo as isDescriptionHidden,
|
|
2548
2561
|
le as mergeStyles,
|
|
2549
2562
|
ne as myStyles,
|
|
2550
|
-
|
|
2563
|
+
fs as removeClickOutsideEventListener,
|
|
2551
2564
|
Be as showErrors,
|
|
2552
|
-
|
|
2565
|
+
Hn as useFilter
|
|
2553
2566
|
};
|