mgv-backoffice 1.47.0 → 1.48.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/README.md +2082 -2072
- package/dist/components/BasePageHeader.vue.d.ts +1 -1
- package/dist/ui-lib.css +1 -1
- package/dist/ui-lib.js +104 -104
- package/dist/ui-lib.umd.cjs +1 -1
- package/package.json +1 -1
- package/src/components/BasePageHeader.test.ts +29 -0
- package/src/components/BasePageHeader.vue +137 -131
- package/src/style.css +132 -36
package/dist/ui-lib.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Fragment as e, Teleport as t, Text as n, Transition as r, cloneVNode as i, computed as a, createBlock as o, createCommentVNode as s, createElementBlock as c, createElementVNode as l, createSlots as u, createStaticVNode as d, createTextVNode as f, createVNode as p, defineComponent as m, effectScope as h, getCurrentScope as g, guardReactiveProps as _, mergeProps as v, nextTick as y, normalizeClass as b, normalizeProps as x, normalizeStyle as S, onBeforeUnmount as C, onMounted as w, onScopeDispose as T, onUnmounted as E, openBlock as D, reactive as O, readonly as ee, ref as k, renderList as A, renderSlot as j, resolveComponent as M, resolveDynamicComponent as N, toDisplayString as P, unref as F, useId as te, useSlots as ne, vModelCheckbox as re, vModelDynamic as ie, vModelText as ae, vShow as oe, watch as
|
|
2
|
-
import { ArrowDownIcon as
|
|
1
|
+
import { Fragment as e, Teleport as t, Text as n, Transition as r, cloneVNode as i, computed as a, createBlock as o, createCommentVNode as s, createElementBlock as c, createElementVNode as l, createSlots as u, createStaticVNode as d, createTextVNode as f, createVNode as p, defineComponent as m, effectScope as h, getCurrentScope as g, guardReactiveProps as _, mergeProps as v, nextTick as y, normalizeClass as b, normalizeProps as x, normalizeStyle as S, onBeforeUnmount as C, onMounted as w, onScopeDispose as T, onUnmounted as E, openBlock as D, reactive as O, readonly as ee, ref as k, renderList as A, renderSlot as j, resolveComponent as M, resolveDynamicComponent as N, toDisplayString as P, unref as F, useId as te, useSlots as ne, vModelCheckbox as re, vModelDynamic as ie, vModelText as ae, vShow as oe, watch as se, withCtx as I, withDirectives as L, withKeys as ce, withModifiers as R } from "vue";
|
|
2
|
+
import { ArrowDownIcon as le, ArrowRightStartOnRectangleIcon as ue, ArrowUpIcon as de, Bars3Icon as fe, BellIcon as pe, CheckCircleIcon as me, CheckIcon as he, ChevronDoubleLeftIcon as ge, ChevronDoubleRightIcon as _e, ChevronDownIcon as ve, ChevronRightIcon as ye, ClipboardDocumentCheckIcon as be, ClipboardDocumentIcon as xe, DocumentDuplicateIcon as Se, ExclamationCircleIcon as Ce, ExclamationTriangleIcon as we, FolderIcon as Te, InformationCircleIcon as Ee, MagnifyingGlassIcon as De, MinusIcon as Oe, MoonIcon as ke, SunIcon as Ae, XMarkIcon as z } from "@heroicons/vue/24/outline";
|
|
3
3
|
import { HomeIcon as je } from "@heroicons/vue/24/solid";
|
|
4
4
|
import { RouterLink as Me, useRoute as Ne, useRouter as Pe } from "vue-router";
|
|
5
5
|
import { VueDatePicker as Fe } from "@vuepic/vue-datepicker";
|
|
@@ -17,7 +17,7 @@ function Le(e) {
|
|
|
17
17
|
e ? V.value = e === "dark" : typeof window.matchMedia == "function" && (V.value = window.matchMedia("(prefers-color-scheme: dark)").matches);
|
|
18
18
|
}
|
|
19
19
|
typeof document < "u" && h(!0).run(() => {
|
|
20
|
-
|
|
20
|
+
se(V, (e) => {
|
|
21
21
|
document.documentElement.classList.toggle("dark", e), window.localStorage?.setItem(H, e ? "dark" : "light");
|
|
22
22
|
}, { immediate: !0 });
|
|
23
23
|
});
|
|
@@ -70,10 +70,10 @@ var ze = { class: "min-w-0 flex-1" }, Be = {
|
|
|
70
70
|
}
|
|
71
71
|
}, i = a(() => n.value ? r[t.color].dark : r[t.color].light), u = a(() => {
|
|
72
72
|
switch (t.color) {
|
|
73
|
-
case B.SUCCESS: return
|
|
74
|
-
case B.WARNING: return
|
|
75
|
-
case B.INFO: return
|
|
76
|
-
default: return
|
|
73
|
+
case B.SUCCESS: return me;
|
|
74
|
+
case B.WARNING: return we;
|
|
75
|
+
case B.INFO: return Ee;
|
|
76
|
+
default: return Ce;
|
|
77
77
|
}
|
|
78
78
|
}), d = a(() => {
|
|
79
79
|
switch (t.color) {
|
|
@@ -177,17 +177,17 @@ var We = "bg-red-100 text-red-700 border-red-200", Ge = /* @__PURE__ */ m({
|
|
|
177
177
|
to: "/",
|
|
178
178
|
class: "inline-flex items-center text-sm font-medium text-gray-700 hover:text-blue-600 dark:text-gray-400 dark:hover:text-white transition-colors rounded focus:outline-none focus-visible:ring-2 focus-visible:ring-emerald-500"
|
|
179
179
|
}, {
|
|
180
|
-
default:
|
|
180
|
+
default: I(() => [p(F(je), { class: "h-4 w-4 text-gray-500 mr-2" }), n[0] ||= f(" Home ", -1)]),
|
|
181
181
|
_: 1
|
|
182
182
|
})]), (D(!0), c(e, null, A(r.value, (e, t) => (D(), c("li", {
|
|
183
183
|
key: t,
|
|
184
184
|
class: "inline-flex items-center",
|
|
185
185
|
style: { "margin-left": "0" }
|
|
186
|
-
}, [p(F(
|
|
186
|
+
}, [p(F(ye), { class: "h-4 w-4 text-gray-500" }), p(i, {
|
|
187
187
|
to: e.url,
|
|
188
188
|
class: "ml-1 text-sm font-medium text-gray-700 hover:text-blue-600 md:ml-2 dark:text-gray-400 dark:hover:text-white transition-colors rounded focus:outline-none focus-visible:ring-2 focus-visible:ring-emerald-500"
|
|
189
189
|
}, {
|
|
190
|
-
default:
|
|
190
|
+
default: I(() => [f(P(e.name), 1)]),
|
|
191
191
|
_: 2
|
|
192
192
|
}, 1032, ["to"])]))), 128))])]);
|
|
193
193
|
};
|
|
@@ -426,7 +426,7 @@ var We = "bg-red-100 text-red-700 border-red-200", Ge = /* @__PURE__ */ m({
|
|
|
426
426
|
to: e.to,
|
|
427
427
|
custom: ""
|
|
428
428
|
}, {
|
|
429
|
-
default:
|
|
429
|
+
default: I(({ navigate: i }) => [l("button", {
|
|
430
430
|
type: n.type,
|
|
431
431
|
class: b(a()),
|
|
432
432
|
disabled: e.isDisable || e.isLoading,
|
|
@@ -532,7 +532,7 @@ var We = "bg-red-100 text-red-700 border-red-200", Ge = /* @__PURE__ */ m({
|
|
|
532
532
|
to: "/",
|
|
533
533
|
class: "flex items-center mb-6 text-2xl font-semibold text-gray-900 dark:text-white"
|
|
534
534
|
}, {
|
|
535
|
-
default:
|
|
535
|
+
default: I(() => [(D(), c("svg", {
|
|
536
536
|
height: r(),
|
|
537
537
|
width: r(),
|
|
538
538
|
viewBox: "33.6 130.6 499.7 242.9",
|
|
@@ -739,7 +739,7 @@ var We = "bg-red-100 text-red-700 border-red-200", Ge = /* @__PURE__ */ m({
|
|
|
739
739
|
"aria-modal": "true",
|
|
740
740
|
"aria-labelledby": i
|
|
741
741
|
}, [t.mode === F(Nt).DELETE ? (D(), c("div", Pt, [
|
|
742
|
-
p(F(
|
|
742
|
+
p(F(Ce), { class: "w-12 h-12 text-gray-400 mx-auto mb-4" }),
|
|
743
743
|
l("h3", {
|
|
744
744
|
id: i,
|
|
745
745
|
class: "mb-5 text-lg font-normal text-gray-500 dark:text-gray-400"
|
|
@@ -754,7 +754,7 @@ var We = "bg-red-100 text-red-700 border-red-200", Ge = /* @__PURE__ */ m({
|
|
|
754
754
|
description: "No, cancel"
|
|
755
755
|
}, null, 8, ["color"])])
|
|
756
756
|
])) : (D(), c("div", It, [
|
|
757
|
-
p(F(
|
|
757
|
+
p(F(me), { class: "w-12 h-12 text-green-500 mx-auto mb-4" }),
|
|
758
758
|
l("h3", {
|
|
759
759
|
id: i,
|
|
760
760
|
class: "mb-2 text-lg font-medium text-gray-900"
|
|
@@ -892,13 +892,13 @@ var We = "bg-red-100 text-red-700 border-red-200", Ge = /* @__PURE__ */ m({
|
|
|
892
892
|
e.mode == F(Y).ERROR ? (D(), c("div", {
|
|
893
893
|
key: 0,
|
|
894
894
|
class: b(a())
|
|
895
|
-
}, [p(F(
|
|
895
|
+
}, [p(F(Ce), { class: "h-6 w-6 text-red-500" }), r[0] ||= l("span", { class: "sr-only" }, "Error icon", -1)], 2)) : e.mode == F(Y).SUCCESS ? (D(), c("div", {
|
|
896
896
|
key: 1,
|
|
897
897
|
class: b(a())
|
|
898
|
-
}, [p(F(
|
|
898
|
+
}, [p(F(me), { class: "h-6 w-6 text-green-500" }), r[1] ||= l("span", { class: "sr-only" }, "Check icon", -1)], 2)) : e.mode == F(Y).WARNING ? (D(), c("div", {
|
|
899
899
|
key: 2,
|
|
900
900
|
class: b(a())
|
|
901
|
-
}, [p(F(
|
|
901
|
+
}, [p(F(we), { class: "h-6 w-6 text-yellow-500" }), r[2] ||= l("span", { class: "sr-only" }, "Warning icon", -1)], 2)) : s("", !0),
|
|
902
902
|
l("div", Wt, P(e.description), 1),
|
|
903
903
|
e.hasCloseIcon ? (D(), c("button", {
|
|
904
904
|
key: 3,
|
|
@@ -906,7 +906,7 @@ var We = "bg-red-100 text-red-700 border-red-200", Ge = /* @__PURE__ */ m({
|
|
|
906
906
|
class: "ml-auto -mx-1.5 -my-1.5 bg-white text-gray-400 hover:text-gray-900 rounded-lg focus:ring-2 focus:ring-gray-300 p-1.5 hover:bg-gray-100 inline-flex items-center justify-center h-8 w-8 dark:text-gray-500 dark:hover:text-white dark:bg-gray-800 dark:hover:bg-gray-700 cursor-pointer",
|
|
907
907
|
"aria-label": "Close",
|
|
908
908
|
onClick: i
|
|
909
|
-
}, [r[3] ||= l("span", { class: "sr-only" }, "Close", -1), p(F(
|
|
909
|
+
}, [r[3] ||= l("span", { class: "sr-only" }, "Close", -1), p(F(z), { class: "h-6 w-6 text-gray-500" })])) : s("", !0)
|
|
910
910
|
])], 2)) : s("", !0);
|
|
911
911
|
}
|
|
912
912
|
}), Kt = { class: "w-13" }, qt = /* @__PURE__ */ m({
|
|
@@ -1079,7 +1079,7 @@ var We = "bg-red-100 text-red-700 border-red-200", Ge = /* @__PURE__ */ m({
|
|
|
1079
1079
|
return Math.min(Math.max(e, 1), Math.max(o.value, 1));
|
|
1080
1080
|
}
|
|
1081
1081
|
let u = k(1);
|
|
1082
|
-
|
|
1082
|
+
se(o, () => {
|
|
1083
1083
|
u.value = s(u.value);
|
|
1084
1084
|
});
|
|
1085
1085
|
let d = a(() => r.page != null && Number.isFinite(r.page) ? s(r.page) : u.value), f = a(() => {
|
|
@@ -1129,15 +1129,15 @@ var We = "bg-red-100 text-red-700 border-red-200", Ge = /* @__PURE__ */ m({
|
|
|
1129
1129
|
setup(e) {
|
|
1130
1130
|
let t = e, n = a(() => t.number !== null && t.number !== void 0 && t.number < 0), r = a(() => t.number === 0);
|
|
1131
1131
|
return (i, a) => e.number !== null && e.number !== void 0 ? (D(), c("div", cn, [n.value ? (D(), c("span", ln, [p(Ge, { color: F(W).RED }, {
|
|
1132
|
-
default:
|
|
1132
|
+
default: I(() => [f(P(e.number) + P(t.icon), 1)]),
|
|
1133
1133
|
_: 1
|
|
1134
|
-
}, 8, ["color"]), p(F(
|
|
1135
|
-
default:
|
|
1134
|
+
}, 8, ["color"]), p(F(le), { class: "h-5 w-5 text-red-500" })])) : r.value ? (D(), c("span", un, [p(Ge, { color: F(W).GRAY }, {
|
|
1135
|
+
default: I(() => [f(P(e.number) + P(t.icon), 1)]),
|
|
1136
1136
|
_: 1
|
|
1137
|
-
}, 8, ["color"]), p(F(
|
|
1138
|
-
default:
|
|
1137
|
+
}, 8, ["color"]), p(F(Oe), { class: "h-5 w-5 text-gray-400" })])) : (D(), c("span", dn, [p(Ge, { color: F(W).GREEN }, {
|
|
1138
|
+
default: I(() => [f(P(e.number) + P(t.icon), 1)]),
|
|
1139
1139
|
_: 1
|
|
1140
|
-
}, 8, ["color"]), p(F(
|
|
1140
|
+
}, 8, ["color"]), p(F(de), { class: "h-5 w-5 text-green-500" })]))])) : s("", !0);
|
|
1141
1141
|
}
|
|
1142
1142
|
});
|
|
1143
1143
|
//#endregion
|
|
@@ -1213,7 +1213,7 @@ var mn = { class: "flex items-start gap-4 min-w-0" }, hn = { class: "flex-1 min-
|
|
|
1213
1213
|
}, [e.scrollable ? (D(), c("div", {
|
|
1214
1214
|
key: 0,
|
|
1215
1215
|
class: b(["relative w-full mx-4 rounded-lg shadow-xl max-h-[90vh] flex flex-col", [e.maxWidthClass, p.value]]),
|
|
1216
|
-
onClick: r[0] ||=
|
|
1216
|
+
onClick: r[0] ||= R(() => {}, ["stop"])
|
|
1217
1217
|
}, [
|
|
1218
1218
|
l("div", { class: b(["flex items-start justify-between gap-4 p-6 border-b shrink-0", F(d).border]) }, [l("div", mn, [j(n.$slots, "icon", {}, () => [l("div", { class: b(["flex-shrink-0 flex h-12 w-12 items-center justify-center rounded-full", m.value]) }, [(D(), o(N(e.icon), {
|
|
1219
1219
|
class: b(["h-6 w-6", e.iconClass]),
|
|
@@ -1233,7 +1233,7 @@ var mn = { class: "flex items-start gap-4 min-w-0" }, hn = { class: "flex-1 min-
|
|
|
1233
1233
|
], 2)) : (D(), c("div", {
|
|
1234
1234
|
key: 1,
|
|
1235
1235
|
class: b(["relative w-full mx-4 rounded-lg shadow-xl", [e.maxWidthClass, p.value]]),
|
|
1236
|
-
onClick: r[1] ||=
|
|
1236
|
+
onClick: r[1] ||= R(() => {}, ["stop"])
|
|
1237
1237
|
}, [l("div", _n, [
|
|
1238
1238
|
l("div", vn, [j(n.$slots, "icon", {}, () => [l("div", { class: b(["flex-shrink-0 flex h-12 w-12 items-center justify-center rounded-full", m.value]) }, [(D(), o(N(e.icon), {
|
|
1239
1239
|
class: b(["h-6 w-6", e.iconClass]),
|
|
@@ -1276,7 +1276,7 @@ var mn = { class: "flex items-start gap-4 min-w-0" }, hn = { class: "flex-1 min-
|
|
|
1276
1276
|
"stroke-linecap": "round",
|
|
1277
1277
|
"stroke-linejoin": "round",
|
|
1278
1278
|
d: "M19 9l-7 7-7-7"
|
|
1279
|
-
}, null, -1)]], 2))], 10, Cn),
|
|
1279
|
+
}, null, -1)]], 2))], 10, Cn), L(l("div", { class: b(["p-6 border-t rounded-b-xl", [F(o).border, p.value]]) }, [j(t.$slots, "default")], 2), [[oe, !e.collapsed]])], 2));
|
|
1280
1280
|
}
|
|
1281
1281
|
}), En = ["disabled"], Dn = ["disabled"], On = {
|
|
1282
1282
|
key: 0,
|
|
@@ -1309,13 +1309,13 @@ var mn = { class: "flex items-start gap-4 min-w-0" }, hn = { class: "flex-1 min-
|
|
|
1309
1309
|
}
|
|
1310
1310
|
return (t, n) => (D(), o(Sn, {
|
|
1311
1311
|
title: e.title,
|
|
1312
|
-
icon: F(
|
|
1312
|
+
icon: F(we),
|
|
1313
1313
|
"icon-bg-class": e.variant === "danger" ? F(i) ? "bg-red-900/30" : "bg-red-50" : F(i) ? "bg-amber-900/30" : "bg-amber-50",
|
|
1314
1314
|
"icon-class": e.variant === "danger" ? "text-red-600" : "text-amber-600",
|
|
1315
1315
|
"manual-close": e.submitting,
|
|
1316
1316
|
onCancel: d
|
|
1317
1317
|
}, {
|
|
1318
|
-
footer:
|
|
1318
|
+
footer: I(() => [l("button", {
|
|
1319
1319
|
type: "button",
|
|
1320
1320
|
disabled: e.submitting,
|
|
1321
1321
|
class: b(["inline-flex items-center justify-center px-4 py-2 border rounded-md shadow-sm text-sm font-medium transition-colors duration-150 focus:outline-none focus-visible:ring-2 focus-visible:ring-emerald-500", [F(a).ghostButton, e.submitting ? "opacity-60 cursor-not-allowed" : "cursor-pointer"]]),
|
|
@@ -1337,7 +1337,7 @@ var mn = { class: "flex items-start gap-4 min-w-0" }, hn = { class: "flex-1 min-
|
|
|
1337
1337
|
fill: "currentColor",
|
|
1338
1338
|
d: "M4 12a8 8 0 018-8v4a4 4 0 00-4 4H4z"
|
|
1339
1339
|
}, null, -1)]])) : s("", !0), f(" " + P(e.submitting ? e.submittingText : e.confirmText), 1)], 10, Dn)]),
|
|
1340
|
-
default:
|
|
1340
|
+
default: I(() => [j(t.$slots, "message", {}, () => [l("p", { class: b(["text-sm", F(i) ? "text-gray-300" : "text-gray-600"]) }, P(e.message), 3)]), j(t.$slots, "default")]),
|
|
1341
1341
|
_: 3
|
|
1342
1342
|
}, 8, [
|
|
1343
1343
|
"title",
|
|
@@ -1380,11 +1380,11 @@ var mn = { class: "flex items-start gap-4 min-w-0" }, hn = { class: "flex-1 min-
|
|
|
1380
1380
|
}
|
|
1381
1381
|
return pn(f), (t, n) => (D(), o(Sn, {
|
|
1382
1382
|
title: e.title,
|
|
1383
|
-
icon: F(
|
|
1383
|
+
icon: F(Se),
|
|
1384
1384
|
"manual-close": "",
|
|
1385
1385
|
onBackdrop: p
|
|
1386
1386
|
}, u({
|
|
1387
|
-
footer:
|
|
1387
|
+
footer: I(() => [l("button", {
|
|
1388
1388
|
type: "button",
|
|
1389
1389
|
class: b(["inline-flex items-center justify-center px-4 py-2 border rounded-md shadow-sm text-sm font-medium transition-colors duration-150 cursor-pointer focus:outline-none focus-visible:ring-2 focus-visible:ring-emerald-500", F(a).ghostButton]),
|
|
1390
1390
|
onClick: f
|
|
@@ -1394,19 +1394,19 @@ var mn = { class: "flex items-start gap-4 min-w-0" }, hn = { class: "flex-1 min-
|
|
|
1394
1394
|
class: b(["inline-flex items-center justify-center px-4 py-2 border border-transparent rounded-md shadow-sm text-sm font-medium text-white transition-colors duration-150 focus:outline-none focus-visible:ring-2 focus-visible:ring-emerald-500 focus-visible:ring-offset-2", [!s.value.trim() || e.submitting ? "bg-emerald-400 cursor-not-allowed" : "bg-emerald-600 hover:bg-emerald-700 cursor-pointer"]]),
|
|
1395
1395
|
onClick: d
|
|
1396
1396
|
}, P(e.submitting ? e.submittingText : e.confirmText), 11, Mn)]),
|
|
1397
|
-
default:
|
|
1397
|
+
default: I(() => [l("p", { class: b(["text-sm", F(i) ? "text-gray-300" : "text-gray-600"]) }, P(e.message), 3), l("div", An, [l("label", { class: b(["block text-sm font-medium mb-1", F(a).label]) }, P(e.inputLabel), 3), L(l("input", {
|
|
1398
1398
|
ref_key: "nameInput",
|
|
1399
1399
|
ref: c,
|
|
1400
1400
|
"onUpdate:modelValue": n[0] ||= (e) => s.value = e,
|
|
1401
1401
|
type: "text",
|
|
1402
1402
|
placeholder: e.placeholder,
|
|
1403
1403
|
class: b(["w-full px-3 py-2 rounded-md border text-sm transition-colors", F(i) ? "bg-gray-800 border-gray-600 text-gray-100 placeholder-gray-500 focus:outline-none focus:border-emerald-500" : "bg-white border-gray-300 text-gray-900 placeholder-gray-400 focus:outline-none focus:border-emerald-500"]),
|
|
1404
|
-
onKeyup:
|
|
1404
|
+
onKeyup: ce(d, ["enter"])
|
|
1405
1405
|
}, null, 42, jn), [[ae, s.value]])])]),
|
|
1406
1406
|
_: 2
|
|
1407
1407
|
}, [t.$slots.icon ? {
|
|
1408
1408
|
name: "icon",
|
|
1409
|
-
fn:
|
|
1409
|
+
fn: I(() => [j(t.$slots, "icon")]),
|
|
1410
1410
|
key: "0"
|
|
1411
1411
|
} : void 0]), 1032, ["title", "icon"]));
|
|
1412
1412
|
}
|
|
@@ -1424,7 +1424,7 @@ var mn = { class: "flex items-start gap-4 min-w-0" }, hn = { class: "flex-1 min-
|
|
|
1424
1424
|
n.push({ name: t.homeRouteName });
|
|
1425
1425
|
}
|
|
1426
1426
|
return (t, n) => (D(), c("div", Pn, [l("div", Fn, [
|
|
1427
|
-
p(F(
|
|
1427
|
+
p(F(we), { class: b(["w-16 h-16 mx-auto mb-4", F(i).illustration]) }, null, 8, ["class"]),
|
|
1428
1428
|
l("h1", { class: b(["text-4xl font-bold mb-2", F(r) ? "text-gray-200" : "text-gray-800"]) }, P(e.code), 3),
|
|
1429
1429
|
l("p", { class: b(["text-lg mb-6", F(i).dimTextAlt]) }, P(e.message), 3),
|
|
1430
1430
|
l("button", {
|
|
@@ -1458,7 +1458,7 @@ function Vn(e) {
|
|
|
1458
1458
|
if (!zn && (zn = !0, Bn = e, typeof window < "u")) {
|
|
1459
1459
|
let e = window.localStorage?.getItem(Bn);
|
|
1460
1460
|
e && (Z.value = e === "true"), h(!0).run(() => {
|
|
1461
|
-
|
|
1461
|
+
se(Z, (e) => {
|
|
1462
1462
|
window.localStorage?.setItem(Bn, String(e));
|
|
1463
1463
|
});
|
|
1464
1464
|
});
|
|
@@ -1577,7 +1577,7 @@ var Kn = ["aria-label", "aria-expanded"], qn = { class: "flex flex-col h-full" }
|
|
|
1577
1577
|
},
|
|
1578
1578
|
setup(t) {
|
|
1579
1579
|
let n = t, r = Pe(), i = Ne(), { isDark: u, toggleTheme: d } = U(), { mobileOpen: m, close: h, toggle: g } = Rn(), { collapsed: _, toggle: v } = Hn(), { unreadCount: x, togglePanel: S } = Gn(), C = a(() => n.collapsible && _.value), w = k(null), T = null;
|
|
1580
|
-
|
|
1580
|
+
se(m, async (e) => {
|
|
1581
1581
|
e ? (T = document.activeElement instanceof HTMLElement ? document.activeElement : null, await y(), w.value?.focus()) : (T?.focus(), T = null);
|
|
1582
1582
|
});
|
|
1583
1583
|
function E() {
|
|
@@ -1601,11 +1601,11 @@ var Kn = ["aria-label", "aria-expanded"], qn = { class: "flex flex-col h-full" }
|
|
|
1601
1601
|
class: b(["p-2 rounded-lg cursor-pointer transition-colors focus:outline-none focus-visible:ring-2 focus-visible:ring-emerald-500", F(u) ? "text-gray-400 hover:bg-gray-800" : "text-gray-600 hover:bg-gray-100"]),
|
|
1602
1602
|
"aria-label": F(m) ? "Close navigation menu" : "Open navigation menu",
|
|
1603
1603
|
"aria-expanded": F(m)
|
|
1604
|
-
}, [F(m) ? (D(), o(F(
|
|
1604
|
+
}, [F(m) ? (D(), o(F(z), {
|
|
1605
1605
|
key: 1,
|
|
1606
1606
|
class: "w-6 h-6",
|
|
1607
1607
|
"aria-hidden": "true"
|
|
1608
|
-
})) : (D(), o(F(
|
|
1608
|
+
})) : (D(), o(F(fe), {
|
|
1609
1609
|
key: 0,
|
|
1610
1610
|
class: "w-6 h-6",
|
|
1611
1611
|
"aria-hidden": "true"
|
|
@@ -1637,7 +1637,7 @@ var Kn = ["aria-label", "aria-expanded"], qn = { class: "flex flex-col h-full" }
|
|
|
1637
1637
|
onClick: r[2] ||= (...e) => F(h) && F(h)(...e),
|
|
1638
1638
|
class: b(["lg:hidden p-1.5 rounded-lg cursor-pointer absolute right-3 top-4 focus:outline-none focus-visible:ring-2 focus-visible:ring-emerald-500", F(u) ? "text-gray-400 hover:bg-gray-800" : "text-gray-500 hover:bg-gray-100"]),
|
|
1639
1639
|
"aria-label": "Close navigation menu"
|
|
1640
|
-
}, [p(F(
|
|
1640
|
+
}, [p(F(z), {
|
|
1641
1641
|
class: "w-5 h-5",
|
|
1642
1642
|
"aria-hidden": "true"
|
|
1643
1643
|
})], 2)], 2),
|
|
@@ -1656,7 +1656,7 @@ var Kn = ["aria-label", "aria-expanded"], qn = { class: "flex flex-col h-full" }
|
|
|
1656
1656
|
title: "Notifications",
|
|
1657
1657
|
"aria-label": F(x) > 0 ? `Notifications, ${F(x)} unread` : "Notifications",
|
|
1658
1658
|
class: b(["relative flex items-center gap-3 w-full px-3 py-2.5 rounded-lg text-sm font-medium transition-colors cursor-pointer focus:outline-none focus-visible:ring-2 focus-visible:ring-emerald-500", [F(u) ? "text-gray-400 hover:text-gray-100 hover:bg-gray-800" : "text-gray-600 hover:text-gray-900 hover:bg-gray-100", { "lg:justify-center": C.value }]])
|
|
1659
|
-
}, [l("span", Qn, [p(F(
|
|
1659
|
+
}, [l("span", Qn, [p(F(pe), {
|
|
1660
1660
|
class: "w-[18px] h-[18px]",
|
|
1661
1661
|
"aria-hidden": "true"
|
|
1662
1662
|
}), F(x) > 0 ? (D(), c("span", $n, P(F(x) > 99 ? "99+" : F(x)), 1)) : s("", !0)]), l("span", { class: b({ "lg:hidden": C.value }) }, "Notifications", 2)], 10, Zn)) : s("", !0),
|
|
@@ -1669,7 +1669,7 @@ var Kn = ["aria-label", "aria-expanded"], qn = { class: "flex flex-col h-full" }
|
|
|
1669
1669
|
"aria-pressed": F(u),
|
|
1670
1670
|
class: b(["flex items-center gap-3 w-full px-3 py-2.5 rounded-lg text-sm font-medium transition-colors cursor-pointer focus:outline-none focus-visible:ring-2 focus-visible:ring-emerald-500", [F(u) ? "text-gray-400 hover:text-gray-100 hover:bg-gray-800" : "text-gray-600 hover:text-gray-900 hover:bg-gray-100", { "lg:justify-center": C.value }]])
|
|
1671
1671
|
}, [
|
|
1672
|
-
(D(), o(N(F(u) ? F(
|
|
1672
|
+
(D(), o(N(F(u) ? F(Ae) : F(ke)), {
|
|
1673
1673
|
class: b(["hidden w-[18px] h-[18px] shrink-0", { "lg:block": C.value }]),
|
|
1674
1674
|
"aria-hidden": "true"
|
|
1675
1675
|
}, null, 8, ["class"])),
|
|
@@ -1684,7 +1684,7 @@ var Kn = ["aria-label", "aria-expanded"], qn = { class: "flex flex-col h-full" }
|
|
|
1684
1684
|
"aria-label": F(_) ? "Expand sidebar" : "Collapse sidebar",
|
|
1685
1685
|
"aria-pressed": F(_),
|
|
1686
1686
|
class: b(["hidden lg:flex items-center gap-3 w-full px-3 py-2.5 rounded-lg text-sm font-medium transition-colors cursor-pointer focus:outline-none focus-visible:ring-2 focus-visible:ring-emerald-500", [F(u) ? "text-gray-400 hover:text-gray-100 hover:bg-gray-800" : "text-gray-600 hover:text-gray-900 hover:bg-gray-100", { "lg:justify-center": C.value }]])
|
|
1687
|
-
}, [(D(), o(N(F(_) ? F(
|
|
1687
|
+
}, [(D(), o(N(F(_) ? F(_e) : F(ge)), {
|
|
1688
1688
|
class: "w-[18px] h-[18px] shrink-0",
|
|
1689
1689
|
"aria-hidden": "true"
|
|
1690
1690
|
})), l("span", { class: b({ "lg:hidden": C.value }) }, "Collapse", 2)], 10, tr)) : s("", !0),
|
|
@@ -1859,13 +1859,13 @@ var Kn = ["aria-label", "aria-expanded"], qn = { class: "flex flex-col h-full" }
|
|
|
1859
1859
|
}
|
|
1860
1860
|
return (n, r) => (D(), o(Sn, {
|
|
1861
1861
|
title: t.title,
|
|
1862
|
-
icon: F(
|
|
1862
|
+
icon: F(Te),
|
|
1863
1863
|
"icon-bg-class": O.value.iconBg,
|
|
1864
1864
|
"icon-class": O.value.iconText,
|
|
1865
1865
|
"manual-close": t.submitting,
|
|
1866
1866
|
onCancel: M
|
|
1867
1867
|
}, u({
|
|
1868
|
-
footer:
|
|
1868
|
+
footer: I(() => [l("button", {
|
|
1869
1869
|
type: "button",
|
|
1870
1870
|
disabled: t.submitting,
|
|
1871
1871
|
class: b(["inline-flex items-center justify-center px-4 py-2 border rounded-md shadow-sm text-sm font-medium transition-colors duration-150 cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed focus:outline-none focus-visible:ring-2 focus-visible:ring-emerald-500", F(f).ghostButton]),
|
|
@@ -1876,16 +1876,16 @@ var Kn = ["aria-label", "aria-expanded"], qn = { class: "flex flex-col h-full" }
|
|
|
1876
1876
|
class: b(["inline-flex items-center justify-center px-4 py-2 border border-transparent rounded-md shadow-sm text-sm font-medium text-white transition-colors duration-150 focus:outline-none focus-visible:ring-2 focus-visible:ring-emerald-500 focus-visible:ring-offset-2", !_.value || t.submitting ? O.value.confirmDisabled : O.value.confirmActive]),
|
|
1877
1877
|
onClick: ee
|
|
1878
1878
|
}, P(t.submitting ? t.submittingText : t.confirmText), 11, mr)]),
|
|
1879
|
-
default:
|
|
1879
|
+
default: I(() => [
|
|
1880
1880
|
t.message ? (D(), c("p", {
|
|
1881
1881
|
key: 0,
|
|
1882
1882
|
class: b(["text-sm", F(d) ? "text-gray-300" : "text-gray-600"])
|
|
1883
1883
|
}, P(t.message), 3)) : s("", !0),
|
|
1884
1884
|
h.value ? (D(), c("div", rr, [p(Vt, { color: "emerald" })])) : g.value ? (D(), c("div", ir, P(g.value), 1)) : s("", !0),
|
|
1885
|
-
!h.value && !g.value && S.value.length > 0 ? (D(), c("div", ar, [l("div", or, [p(F(
|
|
1885
|
+
!h.value && !g.value && S.value.length > 0 ? (D(), c("div", ar, [l("div", or, [p(F(De), {
|
|
1886
1886
|
class: b(["absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4", F(f).dimText]),
|
|
1887
1887
|
"aria-hidden": "true"
|
|
1888
|
-
}, null, 8, ["class"]),
|
|
1888
|
+
}, null, 8, ["class"]), L(l("input", {
|
|
1889
1889
|
ref_key: "searchInputRef",
|
|
1890
1890
|
ref: x,
|
|
1891
1891
|
"onUpdate:modelValue": r[0] ||= (e) => v.value = e,
|
|
@@ -1900,7 +1900,7 @@ var Kn = ["aria-label", "aria-expanded"], qn = { class: "flex flex-col h-full" }
|
|
|
1900
1900
|
class: b(["w-full text-left flex items-center gap-3 px-3 py-2.5 rounded-lg cursor-pointer transition-colors focus:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-emerald-500", [_.value === e.id ? O.value.selectedRow : F(d) ? "hover:bg-gray-800 border border-transparent" : "hover:bg-gray-50 border border-transparent"]]),
|
|
1901
1901
|
onClick: (t) => _.value = e.id
|
|
1902
1902
|
}, [
|
|
1903
|
-
p(F(
|
|
1903
|
+
p(F(Te), { class: b(["w-5 h-5 flex-shrink-0", F(f).dimText]) }, null, 8, ["class"]),
|
|
1904
1904
|
l("div", ur, [l("p", { class: b(["text-sm font-medium truncate", F(f).bodyText]) }, P(e.label), 3)]),
|
|
1905
1905
|
_.value === e.id ? (D(), c("div", {
|
|
1906
1906
|
key: 0,
|
|
@@ -1922,7 +1922,7 @@ var Kn = ["aria-label", "aria-expanded"], qn = { class: "flex flex-col h-full" }
|
|
|
1922
1922
|
_: 2
|
|
1923
1923
|
}, [n.$slots.icon ? {
|
|
1924
1924
|
name: "icon",
|
|
1925
|
-
fn:
|
|
1925
|
+
fn: I(() => [j(n.$slots, "icon")]),
|
|
1926
1926
|
key: "0"
|
|
1927
1927
|
} : void 0]), 1032, [
|
|
1928
1928
|
"title",
|
|
@@ -1972,11 +1972,11 @@ var Kn = ["aria-label", "aria-expanded"], qn = { class: "flex flex-col h-full" }
|
|
|
1972
1972
|
marginClass: { default: "mb-8" },
|
|
1973
1973
|
accent: {
|
|
1974
1974
|
type: Boolean,
|
|
1975
|
-
default:
|
|
1975
|
+
default: void 0
|
|
1976
1976
|
}
|
|
1977
1977
|
},
|
|
1978
1978
|
setup(e) {
|
|
1979
|
-
let t = e, { isDark: n } = U(), r = X(), i = a(() => {
|
|
1979
|
+
let t = e, { isDark: n } = U(), r = X(), i = ne(), o = a(() => t.accent ?? !i.icon), u = a(() => {
|
|
1980
1980
|
let e = {
|
|
1981
1981
|
emerald: {
|
|
1982
1982
|
dark: "bg-emerald-500/10",
|
|
@@ -1996,7 +1996,7 @@ var Kn = ["aria-label", "aria-expanded"], qn = { class: "flex flex-col h-full" }
|
|
|
1996
1996
|
}
|
|
1997
1997
|
}[t.iconColor];
|
|
1998
1998
|
return n.value ? e.dark : e.light;
|
|
1999
|
-
}),
|
|
1999
|
+
}), d = a(() => {
|
|
2000
2000
|
let e = {
|
|
2001
2001
|
emerald: {
|
|
2002
2002
|
dark: "text-emerald-400",
|
|
@@ -2019,8 +2019,8 @@ var Kn = ["aria-label", "aria-expanded"], qn = { class: "flex flex-col h-full" }
|
|
|
2019
2019
|
});
|
|
2020
2020
|
return (t, n) => (D(), c("header", { class: b(e.maxWidthClass ? ["mx-auto px-4 sm:px-6", e.maxWidthClass] : void 0) }, [l("div", { class: b(["flex flex-wrap justify-between gap-3", [e.align === "end" ? "items-end" : "items-center", e.marginClass]]) }, [l("div", yr, [t.$slots.icon ? (D(), c("div", {
|
|
2021
2021
|
key: 0,
|
|
2022
|
-
class: b(["w-10 h-10 rounded-lg flex items-center justify-center",
|
|
2023
|
-
}, [j(t.$slots, "icon", { iconClass:
|
|
2022
|
+
class: b(["w-10 h-10 rounded-lg flex items-center justify-center", u.value])
|
|
2023
|
+
}, [j(t.$slots, "icon", { iconClass: d.value })], 2)) : s("", !0), l("div", null, [l("h1", { class: b(["text-2xl font-bold", [F(r).primaryTextSoft, o.value ? "relative pl-3.5 tracking-tight" : ""]]) }, [o.value ? (D(), c("span", br)) : s("", !0), f(" " + P(e.title), 1)], 2), e.subtitle || t.$slots.subtitle ? (D(), c("p", {
|
|
2024
2024
|
key: 0,
|
|
2025
2025
|
class: b(["max-w-[72ch] text-sm", F(r).dimTextAlt])
|
|
2026
2026
|
}, [j(t.$slots, "subtitle", {}, () => [f(P(e.subtitle), 1)])], 2)) : s("", !0)])]), l("div", xr, [j(t.$slots, "actions")])], 2)], 2));
|
|
@@ -2219,11 +2219,11 @@ var Kn = ["aria-label", "aria-expanded"], qn = { class: "flex flex-col h-full" }
|
|
|
2219
2219
|
"aria-label": d.value,
|
|
2220
2220
|
class: b(f.value),
|
|
2221
2221
|
onClick: m
|
|
2222
|
-
}, [s.value ? (D(), o(F(
|
|
2222
|
+
}, [s.value ? (D(), o(F(be), {
|
|
2223
2223
|
key: 0,
|
|
2224
2224
|
class: b(e.iconClass),
|
|
2225
2225
|
"aria-hidden": "true"
|
|
2226
|
-
}, null, 8, ["class"])) : (D(), o(F(
|
|
2226
|
+
}, null, 8, ["class"])) : (D(), o(F(xe), {
|
|
2227
2227
|
key: 1,
|
|
2228
2228
|
class: b(e.iconClass),
|
|
2229
2229
|
"aria-hidden": "true"
|
|
@@ -2347,12 +2347,12 @@ var Kn = ["aria-label", "aria-expanded"], qn = { class: "flex flex-col h-full" }
|
|
|
2347
2347
|
])], 64)) : s("", !0),
|
|
2348
2348
|
l("form", {
|
|
2349
2349
|
class: "space-y-4",
|
|
2350
|
-
onSubmit:
|
|
2350
|
+
onSubmit: R(v, ["prevent"])
|
|
2351
2351
|
}, [
|
|
2352
2352
|
l("div", null, [l("label", {
|
|
2353
2353
|
for: "login-email",
|
|
2354
2354
|
class: b(["block mb-1.5 text-sm font-medium", F(u).label])
|
|
2355
|
-
}, " Email ", 2),
|
|
2355
|
+
}, " Email ", 2), L(l("input", {
|
|
2356
2356
|
id: "login-email",
|
|
2357
2357
|
"onUpdate:modelValue": r[1] ||= (e) => d.value = e,
|
|
2358
2358
|
type: "email",
|
|
@@ -2366,7 +2366,7 @@ var Kn = ["aria-label", "aria-expanded"], qn = { class: "flex flex-col h-full" }
|
|
|
2366
2366
|
l("div", null, [l("div", zr, [l("label", {
|
|
2367
2367
|
for: "login-password",
|
|
2368
2368
|
class: b(["block text-sm font-medium", F(u).label])
|
|
2369
|
-
}, " Password ", 2), j(n.$slots, "forgot")]), l("div", Br, [
|
|
2369
|
+
}, " Password ", 2), j(n.$slots, "forgot")]), l("div", Br, [L(l("input", {
|
|
2370
2370
|
id: "login-password",
|
|
2371
2371
|
"onUpdate:modelValue": r[2] ||= (e) => m.value = e,
|
|
2372
2372
|
type: g.value ? "text" : "password",
|
|
@@ -2386,7 +2386,7 @@ var Kn = ["aria-label", "aria-expanded"], qn = { class: "flex flex-col h-full" }
|
|
|
2386
2386
|
t.showRemember ? (D(), c("label", {
|
|
2387
2387
|
key: 0,
|
|
2388
2388
|
class: b(["flex items-center gap-2 text-sm cursor-pointer select-none", F(u).bodyText])
|
|
2389
|
-
}, [
|
|
2389
|
+
}, [L(l("input", {
|
|
2390
2390
|
"onUpdate:modelValue": r[4] ||= (e) => h.value = e,
|
|
2391
2391
|
type: "checkbox",
|
|
2392
2392
|
disabled: _.value,
|
|
@@ -2448,7 +2448,7 @@ var Kn = ["aria-label", "aria-expanded"], qn = { class: "flex flex-col h-full" }
|
|
|
2448
2448
|
"leave-active-class": "transition-opacity duration-200",
|
|
2449
2449
|
"leave-to-class": "opacity-0"
|
|
2450
2450
|
}, {
|
|
2451
|
-
default:
|
|
2451
|
+
default: I(() => [F(_) ? (D(), c("div", {
|
|
2452
2452
|
key: 0,
|
|
2453
2453
|
class: "fixed inset-0 z-[60] bg-black/50",
|
|
2454
2454
|
"aria-hidden": "true",
|
|
@@ -2461,7 +2461,7 @@ var Kn = ["aria-label", "aria-expanded"], qn = { class: "flex flex-col h-full" }
|
|
|
2461
2461
|
"leave-active-class": "transition-transform duration-300 ease-in",
|
|
2462
2462
|
"leave-to-class": "-translate-x-full"
|
|
2463
2463
|
}, {
|
|
2464
|
-
default:
|
|
2464
|
+
default: I(() => [F(_) ? (D(), c("aside", {
|
|
2465
2465
|
key: 0,
|
|
2466
2466
|
role: "dialog",
|
|
2467
2467
|
"aria-modal": "true",
|
|
@@ -2473,7 +2473,7 @@ var Kn = ["aria-label", "aria-expanded"], qn = { class: "flex flex-col h-full" }
|
|
|
2473
2473
|
onClick: a[1] ||= (...e) => F(v) && F(v)(...e),
|
|
2474
2474
|
"aria-label": "Close notifications",
|
|
2475
2475
|
class: b(["p-1.5 rounded-lg cursor-pointer transition-colors focus:outline-none focus-visible:ring-2 focus-visible:ring-emerald-500", F(d) ? "text-gray-400 hover:bg-gray-800" : "text-gray-500 hover:bg-gray-100"])
|
|
2476
|
-
}, [p(F(
|
|
2476
|
+
}, [p(F(z), {
|
|
2477
2477
|
class: "w-5 h-5",
|
|
2478
2478
|
"aria-hidden": "true"
|
|
2479
2479
|
})], 2)], 2),
|
|
@@ -2485,7 +2485,7 @@ var Kn = ["aria-label", "aria-expanded"], qn = { class: "flex flex-col h-full" }
|
|
|
2485
2485
|
onClick: a[2] ||= (...e) => F(y) && F(y)(...e),
|
|
2486
2486
|
class: b(["text-xs font-medium cursor-pointer transition-colors focus:outline-none focus-visible:underline", F(m).emeraldText])
|
|
2487
2487
|
}, " Mark all as read ", 2)], 2)) : s("", !0),
|
|
2488
|
-
l("div", Jr, [C.value === 0 ? (D(), c("div", Yr, [p(F(
|
|
2488
|
+
l("div", Jr, [C.value === 0 ? (D(), c("div", Yr, [p(F(pe), {
|
|
2489
2489
|
class: b(["w-10 h-10", F(m).illustration]),
|
|
2490
2490
|
"aria-hidden": "true"
|
|
2491
2491
|
}, null, 8, ["class"]), l("p", { class: b(["text-sm", F(m).mutedText]) }, P(n.emptyText), 3)])) : (D(), c("ul", {
|
|
@@ -2601,9 +2601,9 @@ var Kn = ["aria-label", "aria-expanded"], qn = { class: "flex flex-col h-full" }
|
|
|
2601
2601
|
}
|
|
2602
2602
|
return (t, n) => (D(), c("label", {
|
|
2603
2603
|
class: b(["flex flex-col items-center justify-center gap-2 rounded-lg border-2 border-dashed px-6 py-10 text-center transition-colors", [e.disabled ? "opacity-50 cursor-not-allowed" : "cursor-pointer", a.value ? F(i) ? "border-emerald-500 text-emerald-400" : "border-emerald-500 text-emerald-600" : F(i) ? "border-gray-700 hover:border-emerald-500 text-gray-400 hover:text-emerald-400" : "border-gray-300 hover:border-emerald-500 text-gray-500 hover:text-emerald-600"]]),
|
|
2604
|
-
onDragover:
|
|
2605
|
-
onDragleave: n[0] ||=
|
|
2606
|
-
onDrop:
|
|
2604
|
+
onDragover: R(u, ["prevent"]),
|
|
2605
|
+
onDragleave: n[0] ||= R((e) => a.value = !1, ["prevent"]),
|
|
2606
|
+
onDrop: R(d, ["prevent"])
|
|
2607
2607
|
}, [
|
|
2608
2608
|
j(t.$slots, "icon", {}, () => [n[1] ||= l("svg", {
|
|
2609
2609
|
class: "w-10 h-10",
|
|
@@ -2715,7 +2715,7 @@ var Kn = ["aria-label", "aria-expanded"], qn = { class: "flex flex-col h-full" }
|
|
|
2715
2715
|
value: e.modelValue,
|
|
2716
2716
|
class: ["base-select w-full appearance-none bg-none rounded-lg border border-slate-300 dark:border-slate-600 bg-white dark:bg-slate-900 text-slate-900 dark:text-slate-100 text-sm cursor-pointer transition-colors hover:border-slate-400 dark:hover:border-slate-500 focus:outline-none focus-visible:ring-2 focus-visible:ring-emerald-500/40 focus-visible:border-emerald-500 disabled:opacity-60 disabled:cursor-not-allowed", e.size === "md" ? "py-2 pl-3 pr-9" : "py-1.5 pl-2.5 pr-8"],
|
|
2717
2717
|
onChange: o
|
|
2718
|
-
}), [p(i)], 16, fi), p(F(
|
|
2718
|
+
}), [p(i)], 16, fi), p(F(ve), {
|
|
2719
2719
|
class: b(["pointer-events-none absolute top-1/2 h-4 w-4 -translate-y-1/2 text-slate-500 dark:text-slate-400", e.size === "md" ? "right-3" : "right-2.5"]),
|
|
2720
2720
|
"aria-hidden": "true"
|
|
2721
2721
|
}, null, 8, ["class"])], 2));
|
|
@@ -2783,7 +2783,7 @@ var Kn = ["aria-label", "aria-expanded"], qn = { class: "flex flex-col h-full" }
|
|
|
2783
2783
|
"aria-haspopup": "listbox",
|
|
2784
2784
|
"aria-expanded": o.value,
|
|
2785
2785
|
onClick: g
|
|
2786
|
-
}, [l("span", { class: b(["min-w-0 truncate", d.value ? "" : "text-slate-400 dark:text-slate-500"]) }, P(d.value ? d.value.label : t.placeholder), 3), p(F(
|
|
2786
|
+
}, [l("span", { class: b(["min-w-0 truncate", d.value ? "" : "text-slate-400 dark:text-slate-500"]) }, P(d.value ? d.value.label : t.placeholder), 3), p(F(ve), {
|
|
2787
2787
|
class: b(["shrink-0 transition-transform", [t.chevronClass, o.value ? "rotate-180" : ""]]),
|
|
2788
2788
|
"aria-hidden": "true"
|
|
2789
2789
|
}, null, 8, ["class"])], 10, mi), o.value ? (D(), c("ul", {
|
|
@@ -2905,7 +2905,7 @@ var Kn = ["aria-label", "aria-expanded"], qn = { class: "flex flex-col h-full" }
|
|
|
2905
2905
|
modelValue: String(t.params[f.key] ?? ""),
|
|
2906
2906
|
"onUpdate:modelValue": (e) => r("update", f.key, e)
|
|
2907
2907
|
}, {
|
|
2908
|
-
default:
|
|
2908
|
+
default: I(() => [(D(!0), c(e, null, A(f.options ?? [], (e) => (D(), c("option", {
|
|
2909
2909
|
key: e,
|
|
2910
2910
|
value: e
|
|
2911
2911
|
}, P(e), 9, Ni))), 128))]),
|
|
@@ -3083,7 +3083,7 @@ var Kn = ["aria-label", "aria-expanded"], qn = { class: "flex flex-col h-full" }
|
|
|
3083
3083
|
}
|
|
3084
3084
|
}
|
|
3085
3085
|
return w(h), n({ load: h }), (n, r) => (D(), o(Bt, { class: "!p-6" }, {
|
|
3086
|
-
default:
|
|
3086
|
+
default: I(() => [
|
|
3087
3087
|
l("div", Wi, [l("div", null, [l("h2", Gi, P(t.title), 1), t.subtitle ? (D(), c("p", Ki, P(t.subtitle), 1)) : s("", !0)]), u.value ? (D(), c("span", qi, [p(Vt, { class: "!h-4 !w-4" }), r[4] ||= f(" Saving… ", -1)])) : s("", !0)]),
|
|
3088
3088
|
l("div", Ji, [
|
|
3089
3089
|
l("div", Yi, [l("label", {
|
|
@@ -3195,7 +3195,7 @@ var Kn = ["aria-label", "aria-expanded"], qn = { class: "flex flex-col h-full" }
|
|
|
3195
3195
|
},
|
|
3196
3196
|
emits: ["pick", "close"],
|
|
3197
3197
|
setup(t, { emit: n }) {
|
|
3198
|
-
let r = t, i = n, u = a(() => r.icon ??
|
|
3198
|
+
let r = t, i = n, u = a(() => r.icon ?? De), d = k(""), f = k(ha), m = a(() => r.groups && r.groups.length > 0 ? [{
|
|
3199
3199
|
value: ha,
|
|
3200
3200
|
label: r.allLabel
|
|
3201
3201
|
}, ...r.groups] : []), h = a(() => r.items.filter((e) => (f.value === ha || e.group === f.value) && e.label.toLowerCase().includes(d.value.trim().toLowerCase())));
|
|
@@ -3207,14 +3207,14 @@ var Kn = ["aria-label", "aria-expanded"], qn = { class: "flex flex-col h-full" }
|
|
|
3207
3207
|
"max-width-class": t.maxWidthClass,
|
|
3208
3208
|
onCancel: r[4] ||= (e) => i("close")
|
|
3209
3209
|
}, {
|
|
3210
|
-
footer:
|
|
3210
|
+
footer: I(() => [p(Tr, {
|
|
3211
3211
|
variant: "ghost",
|
|
3212
3212
|
label: t.closeText,
|
|
3213
3213
|
onClick: r[3] ||= (e) => i("close")
|
|
3214
3214
|
}, null, 8, ["label"])]),
|
|
3215
|
-
default:
|
|
3216
|
-
p(F(
|
|
3217
|
-
|
|
3215
|
+
default: I(() => [t.items.length === 0 ? (D(), c("p", sa, P(t.emptyMessage), 1)) : (D(), c(e, { key: 1 }, [l("div", ca, [l("div", la, [
|
|
3216
|
+
p(F(De), { class: "pointer-events-none absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-slate-400" }),
|
|
3217
|
+
L(l("input", {
|
|
3218
3218
|
"onUpdate:modelValue": r[0] ||= (e) => d.value = e,
|
|
3219
3219
|
type: "text",
|
|
3220
3220
|
placeholder: t.searchPlaceholder,
|
|
@@ -3391,7 +3391,7 @@ var Kn = ["aria-label", "aria-expanded"], qn = { class: "flex flex-col h-full" }
|
|
|
3391
3391
|
"aria-label": e.actionLabel,
|
|
3392
3392
|
class: "rounded px-0.5 text-slate-400 hover:bg-slate-100 hover:text-emerald-600 focus:outline-none focus-visible:ring-2 focus-visible:ring-emerald-500 dark:hover:bg-slate-800 dark:hover:text-emerald-400",
|
|
3393
3393
|
onClick: r[0] ||= (t) => n("action", e.value)
|
|
3394
|
-
}, [p(F(
|
|
3394
|
+
}, [p(F(De), {
|
|
3395
3395
|
class: "h-3.5 w-3.5",
|
|
3396
3396
|
"aria-hidden": "true"
|
|
3397
3397
|
})], 8, Pa)) : s("", !0)
|
|
@@ -3439,7 +3439,7 @@ var Kn = ["aria-label", "aria-expanded"], qn = { class: "flex flex-col h-full" }
|
|
|
3439
3439
|
"onUpdate:modelValue": n[0] ||= (e) => r("update:modelValue", e)
|
|
3440
3440
|
}, u({ _: 2 }, [A(t.$slots, (e, n) => ({
|
|
3441
3441
|
name: n,
|
|
3442
|
-
fn:
|
|
3442
|
+
fn: I((e) => [j(t.$slots, n, x(_(e ?? {})))])
|
|
3443
3443
|
}))]), 1032, [
|
|
3444
3444
|
"model-value",
|
|
3445
3445
|
"dark",
|
|
@@ -3510,7 +3510,7 @@ var Kn = ["aria-label", "aria-expanded"], qn = { class: "flex flex-col h-full" }
|
|
|
3510
3510
|
let e = m.value.trim().toLowerCase();
|
|
3511
3511
|
return e ? r.options.filter((t) => t.label.toLowerCase().includes(e)) : [...r.options];
|
|
3512
3512
|
});
|
|
3513
|
-
|
|
3513
|
+
se(E, (e) => {
|
|
3514
3514
|
h.value = e.findIndex((e) => !e.disabled);
|
|
3515
3515
|
});
|
|
3516
3516
|
function O(e) {
|
|
@@ -3542,20 +3542,20 @@ var Kn = ["aria-label", "aria-expanded"], qn = { class: "flex flex-col h-full" }
|
|
|
3542
3542
|
function ie() {
|
|
3543
3543
|
i("update:modelValue", r.multiple ? [] : null), m.value = "";
|
|
3544
3544
|
}
|
|
3545
|
-
function
|
|
3545
|
+
function I(e) {
|
|
3546
3546
|
let t = E.value;
|
|
3547
3547
|
if (t.length === 0) return;
|
|
3548
3548
|
let n = h.value;
|
|
3549
3549
|
for (let r = 0; r < t.length && (n = (n + e + t.length) % t.length, t[n].disabled); r++);
|
|
3550
3550
|
h.value = n, y(() => document.getElementById(`${g}-${n}`)?.scrollIntoView?.({ block: "nearest" }));
|
|
3551
3551
|
}
|
|
3552
|
-
function
|
|
3552
|
+
function ce(e) {
|
|
3553
3553
|
switch (e.key) {
|
|
3554
3554
|
case "ArrowDown":
|
|
3555
|
-
e.preventDefault(), f.value ?
|
|
3555
|
+
e.preventDefault(), f.value ? I(1) : j();
|
|
3556
3556
|
break;
|
|
3557
3557
|
case "ArrowUp":
|
|
3558
|
-
e.preventDefault(), f.value ?
|
|
3558
|
+
e.preventDefault(), f.value ? I(-1) : j();
|
|
3559
3559
|
break;
|
|
3560
3560
|
case "Enter":
|
|
3561
3561
|
f.value && h.value >= 0 && (e.preventDefault(), ne(E.value[h.value]));
|
|
@@ -3569,10 +3569,10 @@ var Kn = ["aria-label", "aria-expanded"], qn = { class: "flex flex-col h-full" }
|
|
|
3569
3569
|
case "Backspace": r.multiple && m.value === "" && v.value.length && re(v.value[v.value.length - 1]);
|
|
3570
3570
|
}
|
|
3571
3571
|
}
|
|
3572
|
-
function
|
|
3572
|
+
function le(e) {
|
|
3573
3573
|
f.value && u.value && !u.value.contains(e.target) && M();
|
|
3574
3574
|
}
|
|
3575
|
-
return w(() => document.addEventListener("mousedown",
|
|
3575
|
+
return w(() => document.addEventListener("mousedown", le)), C(() => document.removeEventListener("mousedown", le)), (n, r) => (D(), c("div", {
|
|
3576
3576
|
ref_key: "rootEl",
|
|
3577
3577
|
ref: u,
|
|
3578
3578
|
class: b(t.block ? "relative w-full" : "relative inline-block min-w-48")
|
|
@@ -3580,7 +3580,7 @@ var Kn = ["aria-label", "aria-expanded"], qn = { class: "flex flex-col h-full" }
|
|
|
3580
3580
|
class: b(["flex min-h-[38px] items-center gap-1.5 rounded-lg border bg-white px-3 py-1.5 text-sm transition-colors dark:bg-slate-900", [f.value ? "border-emerald-500 ring-2 ring-emerald-500/30" : "border-slate-300 hover:border-slate-400 dark:border-slate-600 dark:hover:border-slate-500", t.disabled ? "cursor-not-allowed opacity-60" : "cursor-text"]]),
|
|
3581
3581
|
onMousedown: N
|
|
3582
3582
|
}, [
|
|
3583
|
-
l("div", La, [(D(!0), c(e, null, A(v.value, (e) =>
|
|
3583
|
+
l("div", La, [(D(!0), c(e, null, A(v.value, (e) => L((D(), c("span", {
|
|
3584
3584
|
key: String(e.value),
|
|
3585
3585
|
class: "inline-flex max-w-full items-center gap-1 rounded-md bg-emerald-50 py-0.5 pl-2 pr-1 text-xs font-medium text-emerald-700 dark:bg-emerald-500/15 dark:text-emerald-300"
|
|
3586
3586
|
}, [l("span", Ra, P(e.label), 1), l("button", {
|
|
@@ -3588,12 +3588,12 @@ var Kn = ["aria-label", "aria-expanded"], qn = { class: "flex flex-col h-full" }
|
|
|
3588
3588
|
class: "rounded p-0.5 hover:bg-emerald-100 focus:outline-none focus-visible:ring-2 focus-visible:ring-emerald-500 dark:hover:bg-emerald-500/25",
|
|
3589
3589
|
"aria-label": `Remove ${e.label}`,
|
|
3590
3590
|
disabled: t.disabled,
|
|
3591
|
-
onMousedown: r[0] ||=
|
|
3592
|
-
onClick:
|
|
3593
|
-
}, [p(F(
|
|
3591
|
+
onMousedown: r[0] ||= R(() => {}, ["stop", "prevent"]),
|
|
3592
|
+
onClick: R((t) => re(e), ["stop"])
|
|
3593
|
+
}, [p(F(z), {
|
|
3594
3594
|
class: "h-3 w-3",
|
|
3595
3595
|
"aria-hidden": "true"
|
|
3596
|
-
})], 40, za)])), [[oe, t.multiple]])), 128)),
|
|
3596
|
+
})], 40, za)])), [[oe, t.multiple]])), 128)), L(l("input", {
|
|
3597
3597
|
ref_key: "inputEl",
|
|
3598
3598
|
ref: d,
|
|
3599
3599
|
"onUpdate:modelValue": r[1] ||= (e) => m.value = e,
|
|
@@ -3611,20 +3611,20 @@ var Kn = ["aria-label", "aria-expanded"], qn = { class: "flex flex-col h-full" }
|
|
|
3611
3611
|
class: b(["min-w-16 flex-1 border-0 bg-transparent p-0 py-0.5 text-sm text-slate-900 outline-none focus:ring-0 dark:text-slate-100 disabled:cursor-not-allowed", S.value ? "placeholder:text-slate-900 dark:placeholder:text-slate-100" : "placeholder:text-slate-400 dark:placeholder:text-slate-500"]),
|
|
3612
3612
|
onFocus: j,
|
|
3613
3613
|
onInput: j,
|
|
3614
|
-
onKeydown:
|
|
3614
|
+
onKeydown: ce
|
|
3615
3615
|
}, null, 42, Ba), [[ae, m.value]])]),
|
|
3616
3616
|
t.clearable && x.value && !t.disabled ? (D(), c("button", {
|
|
3617
3617
|
key: 0,
|
|
3618
3618
|
type: "button",
|
|
3619
3619
|
class: "shrink-0 rounded p-0.5 text-slate-400 hover:text-slate-600 focus:outline-none focus-visible:ring-2 focus-visible:ring-emerald-500 dark:hover:text-slate-200",
|
|
3620
3620
|
"aria-label": "Clear selection",
|
|
3621
|
-
onMousedown: r[2] ||=
|
|
3622
|
-
onClick:
|
|
3623
|
-
}, [p(F(
|
|
3621
|
+
onMousedown: r[2] ||= R(() => {}, ["stop", "prevent"]),
|
|
3622
|
+
onClick: R(ie, ["stop"])
|
|
3623
|
+
}, [p(F(z), {
|
|
3624
3624
|
class: "h-4 w-4",
|
|
3625
3625
|
"aria-hidden": "true"
|
|
3626
3626
|
})], 32)) : s("", !0),
|
|
3627
|
-
p(F(
|
|
3627
|
+
p(F(ve), {
|
|
3628
3628
|
class: b(["h-4 w-4 shrink-0 text-slate-500 transition-transform dark:text-slate-400", f.value ? "rotate-180" : ""]),
|
|
3629
3629
|
"aria-hidden": "true"
|
|
3630
3630
|
}, null, 8, ["class"])
|
|
@@ -3642,10 +3642,10 @@ var Kn = ["aria-label", "aria-expanded"], qn = { class: "flex flex-col h-full" }
|
|
|
3642
3642
|
"aria-disabled": e.disabled || void 0,
|
|
3643
3643
|
title: e.title,
|
|
3644
3644
|
class: b(["flex cursor-pointer items-center justify-between gap-2 px-3 py-2 text-left text-sm", ee(e, t)]),
|
|
3645
|
-
onMousedown: r[3] ||=
|
|
3645
|
+
onMousedown: r[3] ||= R(() => {}, ["prevent"]),
|
|
3646
3646
|
onMouseenter: (e) => h.value = t,
|
|
3647
3647
|
onClick: (t) => ne(e)
|
|
3648
|
-
}, [l("span", Ua, P(e.label), 1), O(e) ? (D(), o(F(
|
|
3648
|
+
}, [l("span", Ua, P(e.label), 1), O(e) ? (D(), o(F(he), {
|
|
3649
3649
|
key: 0,
|
|
3650
3650
|
class: "h-4 w-4 shrink-0",
|
|
3651
3651
|
"aria-hidden": "true"
|
|
@@ -3770,7 +3770,7 @@ var Kn = ["aria-label", "aria-expanded"], qn = { class: "flex flex-col h-full" }
|
|
|
3770
3770
|
}
|
|
3771
3771
|
}, r = a(() => n[t.accent]);
|
|
3772
3772
|
return (t, n) => (D(), o(N(e.to ? F(Me) : "div"), v(e.to ? { to: e.to } : {}, { class: ["relative block rounded-xl border-2 border-dashed bg-white p-5 transition-colors dark:bg-slate-800", [r.value.border, e.to ? "hover:bg-slate-50 dark:hover:bg-slate-700/60 focus:outline-none focus-visible:ring-2 focus-visible:ring-emerald-500" : ""]] }), {
|
|
3773
|
-
default:
|
|
3773
|
+
default: I(() => [l("div", ao, [l("div", oo, [
|
|
3774
3774
|
l("p", so, P(e.title), 1),
|
|
3775
3775
|
l("p", { class: b(["mt-1 truncate text-3xl font-bold", r.value.value]) }, P(e.value), 3),
|
|
3776
3776
|
e.subtitle ? (D(), c("p", {
|
|
@@ -3892,7 +3892,7 @@ var Kn = ["aria-label", "aria-expanded"], qn = { class: "flex flex-col h-full" }
|
|
|
3892
3892
|
class: ["flex items-center gap-3 rounded-lg p-2 transition-colors", e.to ? "hover:bg-slate-100 dark:hover:bg-slate-800 focus:outline-none focus-visible:ring-2 focus-visible:ring-emerald-500" : ""],
|
|
3893
3893
|
title: e.to ? e.profileLabel : void 0
|
|
3894
3894
|
}), {
|
|
3895
|
-
default:
|
|
3895
|
+
default: I(() => [l("span", _o, P(i.value), 1), l("span", vo, [l("span", yo, P(e.name), 1), e.email ? (D(), c("span", bo, P(e.email), 1)) : s("", !0)])]),
|
|
3896
3896
|
_: 1
|
|
3897
3897
|
}, 16, ["class", "title"])), e.showLogout ? (D(), o(q, {
|
|
3898
3898
|
key: 0,
|
|
@@ -3904,7 +3904,7 @@ var Kn = ["aria-label", "aria-expanded"], qn = { class: "flex flex-col h-full" }
|
|
|
3904
3904
|
"icon-left": "",
|
|
3905
3905
|
onClick: n[0] ||= (e) => r("logout")
|
|
3906
3906
|
}, {
|
|
3907
|
-
default:
|
|
3907
|
+
default: I(() => [p(F(ue), {
|
|
3908
3908
|
class: "mr-1.5 h-4 w-4",
|
|
3909
3909
|
"aria-hidden": "true"
|
|
3910
3910
|
})]),
|
|
@@ -4026,7 +4026,7 @@ var Ao = /* @__PURE__ */ m({
|
|
|
4026
4026
|
//#region src/composables/useDebounce.ts
|
|
4027
4027
|
function Fo(e, t = 300) {
|
|
4028
4028
|
let n = k(e.value), r = null;
|
|
4029
|
-
return
|
|
4029
|
+
return se(e, (e) => {
|
|
4030
4030
|
r && clearTimeout(r), r = setTimeout(() => {
|
|
4031
4031
|
n.value = e, r = null;
|
|
4032
4032
|
}, t);
|