mgv-backoffice 1.44.0 → 1.46.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 +2048 -2000
- package/dist/components/BaseGroupedChecklist.vue.d.ts +26 -0
- package/dist/components/Pagination.vue.d.ts +9 -0
- package/dist/composables/useDirtyState.d.ts +24 -0
- package/dist/composables/useLatestRequest.d.ts +51 -0
- package/dist/index.d.ts +6 -1
- package/dist/types/checklist.d.ts +6 -0
- package/dist/ui-lib.css +1 -1
- package/dist/ui-lib.js +1033 -899
- package/dist/ui-lib.umd.cjs +1 -1
- package/dist/utils/format.d.ts +8 -0
- package/package.json +1 -1
- package/src/components/BaseGroupedChecklist.test.ts +73 -0
- package/src/components/BaseGroupedChecklist.vue +122 -0
- package/src/components/Pagination.test.ts +39 -0
- package/src/components/Pagination.vue +102 -87
- package/src/composables/useDirtyState.test.ts +38 -0
- package/src/composables/useDirtyState.ts +44 -0
- package/src/composables/useLatestRequest.test.ts +61 -0
- package/src/composables/useLatestRequest.ts +81 -0
- package/src/index.ts +6 -0
- package/src/types/checklist.ts +6 -0
- package/src/utils/format.test.ts +26 -0
- package/src/utils/format.ts +25 -0
package/dist/ui-lib.js
CHANGED
|
@@ -1,121 +1,121 @@
|
|
|
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,
|
|
2
|
-
import { ArrowDownIcon as
|
|
3
|
-
import { HomeIcon as
|
|
4
|
-
import { RouterLink as
|
|
5
|
-
import { VueDatePicker 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 I, withCtx as L, withDirectives as R, withKeys as se, withModifiers as z } from "vue";
|
|
2
|
+
import { ArrowDownIcon as ce, ArrowRightStartOnRectangleIcon as le, ArrowUpIcon as ue, Bars3Icon as de, BellIcon as fe, CheckCircleIcon as pe, CheckIcon as me, ChevronDoubleLeftIcon as he, ChevronDoubleRightIcon as ge, ChevronDownIcon as _e, ChevronRightIcon as ve, ClipboardDocumentCheckIcon as ye, ClipboardDocumentIcon as be, DocumentDuplicateIcon as xe, ExclamationCircleIcon as Se, ExclamationTriangleIcon as Ce, FolderIcon as we, InformationCircleIcon as Te, MagnifyingGlassIcon as Ee, MinusIcon as De, MoonIcon as Oe, SunIcon as ke, XMarkIcon as Ae } from "@heroicons/vue/24/outline";
|
|
3
|
+
import { HomeIcon as je } from "@heroicons/vue/24/solid";
|
|
4
|
+
import { RouterLink as Me, useRoute as Ne, useRouter as Pe } from "vue-router";
|
|
5
|
+
import { VueDatePicker as Fe } from "@vuepic/vue-datepicker";
|
|
6
6
|
//#region src/enums/AlertEnum.ts
|
|
7
|
-
var
|
|
7
|
+
var B = /* @__PURE__ */ function(e) {
|
|
8
8
|
return e.WARNING = "WARNING", e.ERROR = "ERROR", e.SUCCESS = "SUCCESS", e.INFO = "INFO", e;
|
|
9
|
-
}({}),
|
|
10
|
-
function
|
|
11
|
-
if (
|
|
12
|
-
e !==
|
|
9
|
+
}({}), V = k(!1), Ie = !1, H = "mgv-theme";
|
|
10
|
+
function Le(e) {
|
|
11
|
+
if (Ie) {
|
|
12
|
+
e !== H && console.warn(`[ui-lib] useTheme: storage key "${e}" ignored — theme already initialized with "${H}". Call initTheme({ storageKey }) before mounting any component.`);
|
|
13
13
|
return;
|
|
14
14
|
}
|
|
15
|
-
if (
|
|
16
|
-
let e = window.localStorage?.getItem(
|
|
17
|
-
e ?
|
|
15
|
+
if (Ie = !0, H = e, typeof window < "u") {
|
|
16
|
+
let e = window.localStorage?.getItem(H);
|
|
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
|
-
I(
|
|
21
|
-
document.documentElement.classList.toggle("dark", e), window.localStorage?.setItem(
|
|
20
|
+
I(V, (e) => {
|
|
21
|
+
document.documentElement.classList.toggle("dark", e), window.localStorage?.setItem(H, e ? "dark" : "light");
|
|
22
22
|
}, { immediate: !0 });
|
|
23
23
|
});
|
|
24
24
|
}
|
|
25
|
-
function
|
|
26
|
-
|
|
25
|
+
function Re(e) {
|
|
26
|
+
Le(e?.storageKey ?? H);
|
|
27
27
|
}
|
|
28
|
-
function
|
|
29
|
-
|
|
28
|
+
function U(e) {
|
|
29
|
+
Le(e?.storageKey ?? H);
|
|
30
30
|
function t() {
|
|
31
|
-
|
|
31
|
+
V.value = !V.value;
|
|
32
32
|
}
|
|
33
33
|
return {
|
|
34
|
-
isDark:
|
|
34
|
+
isDark: V,
|
|
35
35
|
toggleTheme: t
|
|
36
36
|
};
|
|
37
37
|
}
|
|
38
38
|
//#endregion
|
|
39
39
|
//#region src/components/BaseAlert.vue?vue&type=script&setup=true&lang.ts
|
|
40
|
-
var
|
|
40
|
+
var ze = { class: "min-w-0 flex-1" }, Be = {
|
|
41
41
|
key: 0,
|
|
42
42
|
class: "font-medium"
|
|
43
|
-
},
|
|
43
|
+
}, Ve = /* @__PURE__ */ m({
|
|
44
44
|
__name: "BaseAlert",
|
|
45
45
|
props: {
|
|
46
46
|
title: { default: "" },
|
|
47
|
-
color: { default:
|
|
47
|
+
color: { default: B.ERROR },
|
|
48
48
|
compact: {
|
|
49
49
|
type: Boolean,
|
|
50
50
|
default: !1
|
|
51
51
|
}
|
|
52
52
|
},
|
|
53
53
|
setup(e) {
|
|
54
|
-
let t = e, { isDark: n } =
|
|
55
|
-
[
|
|
54
|
+
let t = e, { isDark: n } = U(), r = {
|
|
55
|
+
[B.ERROR]: {
|
|
56
56
|
light: "bg-red-50 border-red-200 text-red-700",
|
|
57
57
|
dark: "bg-red-500/10 border-red-500/30 text-red-300"
|
|
58
58
|
},
|
|
59
|
-
[
|
|
59
|
+
[B.WARNING]: {
|
|
60
60
|
light: "bg-amber-50 border-amber-200 text-amber-700",
|
|
61
61
|
dark: "bg-amber-500/10 border-amber-500/30 text-amber-300"
|
|
62
62
|
},
|
|
63
|
-
[
|
|
63
|
+
[B.SUCCESS]: {
|
|
64
64
|
light: "bg-emerald-50 border-emerald-200 text-emerald-700",
|
|
65
65
|
dark: "bg-emerald-500/10 border-emerald-500/30 text-emerald-300"
|
|
66
66
|
},
|
|
67
|
-
[
|
|
67
|
+
[B.INFO]: {
|
|
68
68
|
light: "bg-sky-50 border-sky-200 text-sky-700",
|
|
69
69
|
dark: "bg-sky-500/10 border-sky-500/30 text-sky-300"
|
|
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
|
|
74
|
-
case
|
|
75
|
-
case
|
|
76
|
-
default: return
|
|
73
|
+
case B.SUCCESS: return pe;
|
|
74
|
+
case B.WARNING: return Ce;
|
|
75
|
+
case B.INFO: return Te;
|
|
76
|
+
default: return Se;
|
|
77
77
|
}
|
|
78
78
|
}), d = a(() => {
|
|
79
79
|
switch (t.color) {
|
|
80
|
-
case
|
|
81
|
-
case
|
|
82
|
-
case
|
|
80
|
+
case B.SUCCESS: return "text-emerald-500";
|
|
81
|
+
case B.WARNING: return "text-amber-500";
|
|
82
|
+
case B.INFO: return "text-sky-500";
|
|
83
83
|
default: return "text-red-500";
|
|
84
84
|
}
|
|
85
85
|
});
|
|
86
|
-
return (t, n) => (
|
|
86
|
+
return (t, n) => (D(), c("div", {
|
|
87
87
|
role: "alert",
|
|
88
|
-
class:
|
|
89
|
-
}, [(
|
|
90
|
-
class:
|
|
88
|
+
class: b(["flex gap-3 mb-4 rounded-lg border text-sm transition-colors", [e.compact ? "items-start px-3 py-2 text-xs" : "items-start p-4", i.value]])
|
|
89
|
+
}, [(D(), o(N(u.value), {
|
|
90
|
+
class: b(["shrink-0", [e.compact ? "w-4 h-4 mt-px" : "w-5 h-5 mt-0.5", d.value]]),
|
|
91
91
|
"aria-hidden": "true"
|
|
92
|
-
}, null, 8, ["class"])), l("div",
|
|
92
|
+
}, null, 8, ["class"])), l("div", ze, [e.title ? (D(), c("p", Be, P(e.title), 1)) : s("", !0), j(t.$slots, "default")])], 2));
|
|
93
93
|
}
|
|
94
|
-
}),
|
|
94
|
+
}), W = /* @__PURE__ */ function(e) {
|
|
95
95
|
return e.NONE = "NONE", e.RED = "RED", e.YELLOW = "YELLOW", e.BLACK = "BLACK", e.GRAY = "GRAY", e.GREEN = "GREEN", e.BLUE = "BLUE", e;
|
|
96
96
|
}({});
|
|
97
97
|
//#endregion
|
|
98
98
|
//#region src/utils/humanize.ts
|
|
99
|
-
function
|
|
99
|
+
function He(e) {
|
|
100
100
|
return e == null ? "" : String(e).replace(/_/g, " ");
|
|
101
101
|
}
|
|
102
|
-
function
|
|
102
|
+
function Ue(t, r = []) {
|
|
103
103
|
return t.map((t) => {
|
|
104
|
-
if (t.type === n && typeof t.children == "string") return f(
|
|
104
|
+
if (t.type === n && typeof t.children == "string") return f(He(t.children));
|
|
105
105
|
if (t.type === e && Array.isArray(t.children)) {
|
|
106
106
|
let e = i(t);
|
|
107
|
-
return e.children =
|
|
107
|
+
return e.children = Ue(t.children, r), e;
|
|
108
108
|
}
|
|
109
109
|
if (typeof t.type == "string" && r.includes(t.type)) {
|
|
110
110
|
let e = i(t);
|
|
111
|
-
return typeof t.children == "string" ? e.children =
|
|
111
|
+
return typeof t.children == "string" ? e.children = He(t.children) : Array.isArray(t.children) && (e.children = Ue(t.children, r)), e;
|
|
112
112
|
}
|
|
113
113
|
return t;
|
|
114
114
|
});
|
|
115
115
|
}
|
|
116
116
|
//#endregion
|
|
117
117
|
//#region src/components/BaseBadge.vue?vue&type=script&setup=true&lang.ts
|
|
118
|
-
var
|
|
118
|
+
var We = "bg-red-100 text-red-700 border-red-200", Ge = /* @__PURE__ */ m({
|
|
119
119
|
__name: "BaseBadge",
|
|
120
120
|
props: {
|
|
121
121
|
color: {
|
|
@@ -128,27 +128,27 @@ var He = "bg-red-100 text-red-700 border-red-200", Ue = /* @__PURE__ */ m({
|
|
|
128
128
|
}
|
|
129
129
|
},
|
|
130
130
|
setup(e) {
|
|
131
|
-
let t =
|
|
132
|
-
[
|
|
133
|
-
[
|
|
134
|
-
[
|
|
135
|
-
[
|
|
136
|
-
[
|
|
137
|
-
[
|
|
138
|
-
[
|
|
139
|
-
}, l = a(() => `inline-flex items-center gap-1 font-semibold text-xs leading-none px-3 py-1.5 rounded-full border ${i.color && o[i.color] ||
|
|
140
|
-
return (e, t) => n.value ? (
|
|
131
|
+
let t = ne(), n = a(() => !!t.default), r = () => Ue(t.default?.() ?? []), i = e, o = {
|
|
132
|
+
[W.RED]: "bg-red-100 text-red-700 border-red-200",
|
|
133
|
+
[W.GREEN]: "bg-green-100 text-green-700 border-green-200",
|
|
134
|
+
[W.BLUE]: "bg-blue-100 text-blue-700 border-blue-200",
|
|
135
|
+
[W.YELLOW]: "bg-yellow-100 text-yellow-700 border-yellow-200",
|
|
136
|
+
[W.GRAY]: "bg-gray-100 text-gray-700 border-gray-200",
|
|
137
|
+
[W.BLACK]: "bg-gray-800 text-gray-100 border-gray-700",
|
|
138
|
+
[W.NONE]: "bg-gray-50 text-gray-600 border-gray-200"
|
|
139
|
+
}, l = a(() => `inline-flex items-center gap-1 font-semibold text-xs leading-none px-3 py-1.5 rounded-full border ${i.color && o[i.color] || We}${i.blink ? " animate-pulse motion-reduce:animate-none" : ""}`);
|
|
140
|
+
return (e, t) => n.value ? (D(), c("span", {
|
|
141
141
|
key: 0,
|
|
142
|
-
class:
|
|
142
|
+
class: b(l.value)
|
|
143
143
|
}, [p(r)], 2)) : s("", !0);
|
|
144
144
|
}
|
|
145
|
-
}),
|
|
145
|
+
}), Ke = {
|
|
146
146
|
class: "flex overflow-x-auto px-5 py-3 text-gray-700 border border-slate-200 rounded-xl bg-white shadow-sm dark:bg-slate-900 dark:border-slate-700",
|
|
147
147
|
"aria-label": "Breadcrumb"
|
|
148
|
-
},
|
|
148
|
+
}, qe = { class: "inline-flex items-center whitespace-nowrap space-x-1 md:space-x-3" }, Je = {
|
|
149
149
|
class: "inline-flex items-center",
|
|
150
150
|
style: { "margin-left": "0" }
|
|
151
|
-
},
|
|
151
|
+
}, Ye = /* @__PURE__ */ m({
|
|
152
152
|
__name: "BaseBreadcrumb",
|
|
153
153
|
props: {
|
|
154
154
|
items: {
|
|
@@ -173,17 +173,17 @@ var He = "bg-red-100 text-red-700 border-red-200", Ue = /* @__PURE__ */ m({
|
|
|
173
173
|
});
|
|
174
174
|
return (t, n) => {
|
|
175
175
|
let i = M("router-link");
|
|
176
|
-
return
|
|
176
|
+
return D(), c("nav", Ke, [l("ol", qe, [l("li", Je, [p(i, {
|
|
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: L(() => [p(F(
|
|
180
|
+
default: L(() => [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(ve), { 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
|
}, {
|
|
@@ -192,21 +192,21 @@ var He = "bg-red-100 text-red-700 border-red-200", Ue = /* @__PURE__ */ m({
|
|
|
192
192
|
}, 1032, ["to"])]))), 128))])]);
|
|
193
193
|
};
|
|
194
194
|
}
|
|
195
|
-
}),
|
|
195
|
+
}), G = /* @__PURE__ */ function(e) {
|
|
196
196
|
return e.RED = "RED", e.BLUE = "BLUE", e.WHITE = "WHITE", e.DARK = "DARK", e.GREEN = "GREEN", e.EMERALD = "EMERALD", e.YELLOW = "YELLOW", e.PURPLE = "PURPLE", e.SKY = "SKY", e.GRAY = "GRAY", e.AMBER = "AMBER", e;
|
|
197
|
-
}({}),
|
|
197
|
+
}({}), K = /* @__PURE__ */ function(e) {
|
|
198
198
|
return e.EXTRA_SMALL = "EXTRA_SMALL", e.SMALL = "SMALL", e.BASE = "BASE", e.LARGE = "LARGE", e.EXTRA_LARGE = "EXTRA_LARGE", e;
|
|
199
|
-
}({}),
|
|
199
|
+
}({}), Xe = [
|
|
200
200
|
"type",
|
|
201
201
|
"disabled",
|
|
202
202
|
"onClick"
|
|
203
|
-
],
|
|
203
|
+
], Ze = {
|
|
204
204
|
key: 0,
|
|
205
205
|
class: "inline-flex items-center"
|
|
206
|
-
},
|
|
206
|
+
}, Qe = { key: 1 }, $e = { key: 2 }, et = ["type", "disabled"], tt = {
|
|
207
207
|
key: 0,
|
|
208
208
|
class: "inline-flex items-center"
|
|
209
|
-
},
|
|
209
|
+
}, nt = { key: 1 }, rt = { key: 2 }, it = /* @__PURE__ */ m({
|
|
210
210
|
__name: "BaseButton",
|
|
211
211
|
props: {
|
|
212
212
|
description: {
|
|
@@ -216,7 +216,7 @@ var He = "bg-red-100 text-red-700 border-red-200", Ue = /* @__PURE__ */ m({
|
|
|
216
216
|
color: {
|
|
217
217
|
type: String,
|
|
218
218
|
required: !1,
|
|
219
|
-
default:
|
|
219
|
+
default: G.GREEN
|
|
220
220
|
},
|
|
221
221
|
to: {
|
|
222
222
|
type: String,
|
|
@@ -260,103 +260,103 @@ var He = "bg-red-100 text-red-700 border-red-200", Ue = /* @__PURE__ */ m({
|
|
|
260
260
|
}
|
|
261
261
|
},
|
|
262
262
|
setup(e) {
|
|
263
|
-
let { isDark: t } =
|
|
263
|
+
let { isDark: t } = U(), n = e;
|
|
264
264
|
function r() {
|
|
265
265
|
let e = {
|
|
266
|
-
[
|
|
266
|
+
[G.BLUE]: {
|
|
267
267
|
light: "text-blue-700 border-blue-300 hover:bg-blue-50",
|
|
268
268
|
dark: "text-blue-400 border-blue-500/40 hover:bg-blue-500/10"
|
|
269
269
|
},
|
|
270
|
-
[
|
|
270
|
+
[G.GREEN]: {
|
|
271
271
|
light: "text-green-700 border-green-300 hover:bg-green-50",
|
|
272
272
|
dark: "text-green-400 border-green-500/40 hover:bg-green-500/10"
|
|
273
273
|
},
|
|
274
|
-
[
|
|
274
|
+
[G.EMERALD]: {
|
|
275
275
|
light: "text-emerald-700 border-emerald-300 hover:bg-emerald-50",
|
|
276
276
|
dark: "text-emerald-400 border-emerald-500/40 hover:bg-emerald-500/10"
|
|
277
277
|
},
|
|
278
|
-
[
|
|
278
|
+
[G.RED]: {
|
|
279
279
|
light: "text-red-700 border-red-300 hover:bg-red-50",
|
|
280
280
|
dark: "text-red-400 border-red-500/40 hover:bg-red-500/10"
|
|
281
281
|
},
|
|
282
|
-
[
|
|
282
|
+
[G.YELLOW]: {
|
|
283
283
|
light: "text-yellow-700 border-yellow-300 hover:bg-yellow-50",
|
|
284
284
|
dark: "text-yellow-400 border-yellow-500/40 hover:bg-yellow-500/10"
|
|
285
285
|
},
|
|
286
|
-
[
|
|
286
|
+
[G.PURPLE]: {
|
|
287
287
|
light: "text-purple-700 border-purple-300 hover:bg-purple-50",
|
|
288
288
|
dark: "text-purple-400 border-purple-500/40 hover:bg-purple-500/10"
|
|
289
289
|
},
|
|
290
|
-
[
|
|
290
|
+
[G.SKY]: {
|
|
291
291
|
light: "text-sky-700 border-sky-300 hover:bg-sky-50",
|
|
292
292
|
dark: "text-sky-400 border-sky-500/40 hover:bg-sky-500/10"
|
|
293
293
|
},
|
|
294
|
-
[
|
|
294
|
+
[G.AMBER]: {
|
|
295
295
|
light: "text-amber-700 border-amber-300 hover:bg-amber-50",
|
|
296
296
|
dark: "text-amber-400 border-amber-500/40 hover:bg-amber-500/10"
|
|
297
297
|
},
|
|
298
|
-
[
|
|
298
|
+
[G.GRAY]: {
|
|
299
299
|
light: "text-gray-700 border-gray-300 hover:bg-gray-50",
|
|
300
300
|
dark: "text-gray-300 border-gray-600 hover:bg-gray-800"
|
|
301
301
|
},
|
|
302
|
-
[
|
|
302
|
+
[G.DARK]: {
|
|
303
303
|
light: "text-gray-700 border-gray-300 hover:bg-gray-50",
|
|
304
304
|
dark: "text-gray-300 border-gray-600 hover:bg-gray-800"
|
|
305
305
|
},
|
|
306
|
-
[
|
|
306
|
+
[G.WHITE]: {
|
|
307
307
|
light: "text-gray-700 border-gray-300 hover:bg-gray-50",
|
|
308
308
|
dark: "text-gray-300 border-gray-600 hover:bg-gray-800"
|
|
309
309
|
}
|
|
310
|
-
}, r = e[n.color] ?? e[
|
|
310
|
+
}, r = e[n.color] ?? e[G.BLUE], i = t.value ? r.dark : r.light;
|
|
311
311
|
return n.isDisable || n.isLoading ? `border bg-transparent ${i} opacity-50 cursor-not-allowed` : `focus:outline-none focus-visible:ring-2 focus-visible:ring-current border bg-transparent ${i}`;
|
|
312
312
|
}
|
|
313
313
|
function i() {
|
|
314
314
|
let e = {
|
|
315
|
-
[
|
|
315
|
+
[G.BLUE]: {
|
|
316
316
|
light: "text-blue-600 hover:bg-blue-50",
|
|
317
317
|
dark: "text-blue-400 hover:bg-blue-500/10"
|
|
318
318
|
},
|
|
319
|
-
[
|
|
319
|
+
[G.GREEN]: {
|
|
320
320
|
light: "text-green-600 hover:bg-green-50",
|
|
321
321
|
dark: "text-green-400 hover:bg-green-500/10"
|
|
322
322
|
},
|
|
323
|
-
[
|
|
323
|
+
[G.EMERALD]: {
|
|
324
324
|
light: "text-emerald-600 hover:bg-emerald-50",
|
|
325
325
|
dark: "text-emerald-400 hover:bg-emerald-500/10"
|
|
326
326
|
},
|
|
327
|
-
[
|
|
327
|
+
[G.SKY]: {
|
|
328
328
|
light: "text-sky-600 hover:bg-sky-50",
|
|
329
329
|
dark: "text-sky-400 hover:bg-sky-500/10"
|
|
330
330
|
},
|
|
331
|
-
[
|
|
331
|
+
[G.RED]: {
|
|
332
332
|
light: "text-red-500 hover:bg-red-50",
|
|
333
333
|
dark: "text-red-400 hover:bg-red-500/10"
|
|
334
334
|
},
|
|
335
|
-
[
|
|
335
|
+
[G.AMBER]: {
|
|
336
336
|
light: "text-amber-700 hover:bg-amber-50",
|
|
337
337
|
dark: "text-amber-300 hover:bg-amber-500/10"
|
|
338
338
|
},
|
|
339
|
-
[
|
|
339
|
+
[G.YELLOW]: {
|
|
340
340
|
light: "text-yellow-600 hover:bg-yellow-50",
|
|
341
341
|
dark: "text-yellow-400 hover:bg-yellow-500/10"
|
|
342
342
|
},
|
|
343
|
-
[
|
|
343
|
+
[G.PURPLE]: {
|
|
344
344
|
light: "text-purple-600 hover:bg-purple-50",
|
|
345
345
|
dark: "text-purple-400 hover:bg-purple-500/10"
|
|
346
346
|
},
|
|
347
|
-
[
|
|
347
|
+
[G.GRAY]: {
|
|
348
348
|
light: "text-gray-500 hover:bg-gray-100",
|
|
349
349
|
dark: "text-gray-400 hover:bg-gray-800"
|
|
350
350
|
},
|
|
351
|
-
[
|
|
351
|
+
[G.DARK]: {
|
|
352
352
|
light: "text-gray-500 hover:bg-gray-100",
|
|
353
353
|
dark: "text-gray-400 hover:bg-gray-800"
|
|
354
354
|
},
|
|
355
|
-
[
|
|
355
|
+
[G.WHITE]: {
|
|
356
356
|
light: "text-gray-500 hover:bg-gray-100",
|
|
357
357
|
dark: "text-gray-400 hover:bg-gray-800"
|
|
358
358
|
}
|
|
359
|
-
}, r = e[n.color] ?? e[
|
|
359
|
+
}, r = e[n.color] ?? e[G.GRAY], i = t.value ? r.dark : r.light;
|
|
360
360
|
return n.isDisable || n.isLoading ? `bg-transparent ${i} opacity-60 cursor-not-allowed` : `focus:outline-none focus-visible:ring-2 focus-visible:ring-current bg-transparent ${i} cursor-pointer`;
|
|
361
361
|
}
|
|
362
362
|
function a() {
|
|
@@ -364,37 +364,37 @@ var He = "bg-red-100 text-red-700 border-red-200", Ue = /* @__PURE__ */ m({
|
|
|
364
364
|
e || (t += " cursor-pointer");
|
|
365
365
|
let a;
|
|
366
366
|
switch (n.color) {
|
|
367
|
-
case
|
|
367
|
+
case G.BLUE:
|
|
368
368
|
a = e ? "text-white bg-blue-400 cursor-not-allowed" : "focus:outline-none text-white bg-blue-700 hover:bg-blue-800 focus:ring-4 focus:ring-blue-300";
|
|
369
369
|
break;
|
|
370
|
-
case
|
|
370
|
+
case G.WHITE:
|
|
371
371
|
a = e ? "text-gray-900 bg-gray-200 border border-gray-200 cursor-not-allowed" : "focus:outline-none text-gray-900 bg-white border border-gray-200 hover:bg-gray-100 hover:text-blue-700 focus:z-10 focus:ring-4 focus:ring-gray-200";
|
|
372
372
|
break;
|
|
373
|
-
case
|
|
373
|
+
case G.DARK:
|
|
374
374
|
a = e ? "text-white bg-gray-400 cursor-not-allowed" : "focus:outline-none text-white bg-gray-800 hover:bg-gray-900 focus:ring-4 focus:ring-gray-300";
|
|
375
375
|
break;
|
|
376
|
-
case
|
|
376
|
+
case G.GREEN:
|
|
377
377
|
a = e ? "text-white bg-green-400 cursor-not-allowed" : "focus:outline-none text-white bg-green-700 hover:bg-green-800 focus:ring-4 focus:ring-green-300";
|
|
378
378
|
break;
|
|
379
|
-
case
|
|
379
|
+
case G.EMERALD:
|
|
380
380
|
a = e ? "text-white bg-emerald-400 cursor-not-allowed" : "focus:outline-none text-white bg-emerald-600 hover:bg-emerald-700 focus:ring-4 focus:ring-emerald-300";
|
|
381
381
|
break;
|
|
382
|
-
case
|
|
382
|
+
case G.RED:
|
|
383
383
|
a = e ? "text-white bg-red-400 cursor-not-allowed" : "focus:outline-none text-white bg-red-700 hover:bg-red-800 focus:ring-4 focus:ring-red-300";
|
|
384
384
|
break;
|
|
385
|
-
case
|
|
385
|
+
case G.YELLOW:
|
|
386
386
|
a = e ? "text-white bg-yellow-300 cursor-not-allowed" : "focus:outline-none text-white bg-yellow-400 hover:bg-yellow-500 focus:ring-4 focus:ring-yellow-300";
|
|
387
387
|
break;
|
|
388
|
-
case
|
|
388
|
+
case G.PURPLE:
|
|
389
389
|
a = e ? "text-white bg-purple-400 cursor-not-allowed" : "focus:outline-none text-white bg-purple-700 hover:bg-purple-800 focus:ring-4 focus:ring-purple-300";
|
|
390
390
|
break;
|
|
391
|
-
case
|
|
391
|
+
case G.SKY:
|
|
392
392
|
a = e ? "text-white bg-sky-400 cursor-not-allowed" : "focus:outline-none text-white bg-sky-600 hover:bg-sky-700 focus:ring-4 focus:ring-sky-300";
|
|
393
393
|
break;
|
|
394
|
-
case
|
|
394
|
+
case G.AMBER:
|
|
395
395
|
a = e ? "text-white bg-amber-300 cursor-not-allowed" : "focus:outline-none text-white bg-amber-500 hover:bg-amber-600 focus:ring-4 focus:ring-amber-300";
|
|
396
396
|
break;
|
|
397
|
-
case
|
|
397
|
+
case G.GRAY:
|
|
398
398
|
a = e ? "text-white bg-gray-400 cursor-not-allowed" : "focus:outline-none text-white bg-gray-600 hover:bg-gray-700 focus:ring-4 focus:ring-gray-300";
|
|
399
399
|
break;
|
|
400
400
|
default: a = e ? "text-white bg-blue-400 cursor-not-allowed" : "focus:outline-none text-white bg-blue-700 hover:bg-blue-800 focus:ring-4 focus:ring-blue-300";
|
|
@@ -402,37 +402,37 @@ var He = "bg-red-100 text-red-700 border-red-200", Ue = /* @__PURE__ */ m({
|
|
|
402
402
|
n.outline && (a = r()), n.ghost && (a = i());
|
|
403
403
|
let o = "px-5 py-2.5 mr-2 mb-2 text-sm";
|
|
404
404
|
switch (n.size) {
|
|
405
|
-
case
|
|
405
|
+
case K.EXTRA_SMALL:
|
|
406
406
|
o = "px-3 py-2 text-xs";
|
|
407
407
|
break;
|
|
408
|
-
case
|
|
408
|
+
case K.SMALL:
|
|
409
409
|
o = "px-3 py-2 text-sm";
|
|
410
410
|
break;
|
|
411
|
-
case
|
|
411
|
+
case K.BASE:
|
|
412
412
|
o = "px-5 py-2.5 text-sm";
|
|
413
413
|
break;
|
|
414
|
-
case
|
|
414
|
+
case K.LARGE:
|
|
415
415
|
o = "px-5 py-3 text-base";
|
|
416
416
|
break;
|
|
417
|
-
case
|
|
417
|
+
case K.EXTRA_LARGE: o = "px-6 py-3.5 text-base";
|
|
418
418
|
}
|
|
419
419
|
let s = "rounded-lg";
|
|
420
420
|
return n.isRounded && (s = "rounded-full"), t + " " + o + " " + a + " font-medium " + s;
|
|
421
421
|
}
|
|
422
422
|
return (t, r) => {
|
|
423
423
|
let i = M("router-link");
|
|
424
|
-
return e.to ? (
|
|
424
|
+
return e.to ? (D(), o(i, {
|
|
425
425
|
key: 0,
|
|
426
426
|
to: e.to,
|
|
427
427
|
custom: ""
|
|
428
428
|
}, {
|
|
429
429
|
default: L(({ navigate: i }) => [l("button", {
|
|
430
430
|
type: n.type,
|
|
431
|
-
class:
|
|
431
|
+
class: b(a()),
|
|
432
432
|
disabled: e.isDisable || e.isLoading,
|
|
433
433
|
onClick: i
|
|
434
434
|
}, [
|
|
435
|
-
e.isLoading ? (
|
|
435
|
+
e.isLoading ? (D(), c("div", Ze, [...r[0] ||= [l("svg", {
|
|
436
436
|
"aria-hidden": "true",
|
|
437
437
|
role: "status",
|
|
438
438
|
class: "inline w-4 h-4 me-3 animate-spin",
|
|
@@ -446,18 +446,18 @@ var He = "bg-red-100 text-red-700 border-red-200", Ue = /* @__PURE__ */ m({
|
|
|
446
446
|
d: "M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z",
|
|
447
447
|
fill: "currentColor"
|
|
448
448
|
})], -1)]])) : s("", !0),
|
|
449
|
-
e.iconLeft ? s("", !0) : (
|
|
449
|
+
e.iconLeft ? s("", !0) : (D(), c("span", Qe, P(e.description), 1)),
|
|
450
450
|
j(t.$slots, "default"),
|
|
451
|
-
e.iconLeft ? (
|
|
452
|
-
], 10,
|
|
451
|
+
e.iconLeft ? (D(), c("span", $e, P(e.description), 1)) : s("", !0)
|
|
452
|
+
], 10, Xe)]),
|
|
453
453
|
_: 3
|
|
454
|
-
}, 8, ["to"])) : (
|
|
454
|
+
}, 8, ["to"])) : (D(), c("button", {
|
|
455
455
|
key: 1,
|
|
456
456
|
type: n.type,
|
|
457
|
-
class:
|
|
457
|
+
class: b(a()),
|
|
458
458
|
disabled: e.isDisable || e.isLoading
|
|
459
459
|
}, [
|
|
460
|
-
e.isLoading ? (
|
|
460
|
+
e.isLoading ? (D(), c("div", tt, [...r[1] ||= [l("svg", {
|
|
461
461
|
"aria-hidden": "true",
|
|
462
462
|
role: "status",
|
|
463
463
|
class: "inline w-4 h-4 me-3 animate-spin",
|
|
@@ -471,68 +471,68 @@ var He = "bg-red-100 text-red-700 border-red-200", Ue = /* @__PURE__ */ m({
|
|
|
471
471
|
d: "M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z",
|
|
472
472
|
fill: "currentColor"
|
|
473
473
|
})], -1)]])) : s("", !0),
|
|
474
|
-
e.iconLeft ? s("", !0) : (
|
|
474
|
+
e.iconLeft ? s("", !0) : (D(), c("span", nt, P(e.description), 1)),
|
|
475
475
|
j(t.$slots, "default"),
|
|
476
|
-
e.iconLeft ? (
|
|
477
|
-
], 10,
|
|
476
|
+
e.iconLeft ? (D(), c("span", rt, P(e.description), 1)) : s("", !0)
|
|
477
|
+
], 10, et));
|
|
478
478
|
};
|
|
479
479
|
}
|
|
480
|
-
}),
|
|
480
|
+
}), at = /* @__PURE__ */ function(e) {
|
|
481
481
|
return e.BASE = "BASE", e.BASE_SHORTER = "BASE_SHORTER", e.SQUARE = "SQUARE", e;
|
|
482
|
-
}({}),
|
|
482
|
+
}({}), ot = {
|
|
483
483
|
key: 0,
|
|
484
484
|
class: "h-px my-8 bg-gray-200 border-0 dark:bg-gray-700"
|
|
485
|
-
},
|
|
485
|
+
}, st = {
|
|
486
486
|
key: 1,
|
|
487
487
|
class: "w-48 h-1 mx-auto my-4 bg-gray-100 border-0 rounded md:my-10 dark:bg-gray-700"
|
|
488
|
-
},
|
|
488
|
+
}, ct = {
|
|
489
489
|
key: 2,
|
|
490
490
|
class: "w-8 h-8 mx-auto my-8 bg-gray-200 border-0 rounded md:my-12 dark:bg-gray-700"
|
|
491
|
-
},
|
|
491
|
+
}, lt = /* @__PURE__ */ m({
|
|
492
492
|
__name: "BaseLine",
|
|
493
493
|
props: { mode: {
|
|
494
494
|
type: String,
|
|
495
495
|
required: !1,
|
|
496
|
-
default:
|
|
496
|
+
default: at.BASE
|
|
497
497
|
} },
|
|
498
498
|
setup(t) {
|
|
499
|
-
return (n, r) => (
|
|
500
|
-
t.mode === F(
|
|
501
|
-
t.mode === F(
|
|
502
|
-
t.mode === F(
|
|
499
|
+
return (n, r) => (D(), c(e, null, [
|
|
500
|
+
t.mode === F(at).BASE ? (D(), c("hr", ot)) : s("", !0),
|
|
501
|
+
t.mode === F(at).BASE_SHORTER ? (D(), c("hr", st)) : s("", !0),
|
|
502
|
+
t.mode === F(at).SQUARE ? (D(), c("hr", ct)) : s("", !0)
|
|
503
503
|
], 64));
|
|
504
504
|
}
|
|
505
|
-
}),
|
|
505
|
+
}), q = /* @__PURE__ */ function(e) {
|
|
506
506
|
return e.SMALL = "SMALL", e.MEDIUM = "MEDIUM", e.LARGE = "LARGE", e;
|
|
507
|
-
}({}),
|
|
507
|
+
}({}), ut = q, dt = ["height", "width"], ft = ["id"], pt = ["id", "href"], mt = ["id", "href"], ht = ["id", "href"], gt = ["id", "href"], _t = ["id", "href"], vt = ["id", "href"], yt = ["id", "href"], bt = ["id", "href"], xt = ["id", "href"], St = ["id"], Ct = ["fill"], wt = ["fill"], Tt = ["fill"], Et = ["fill"], Dt = ["fill"], Ot = ["fill"], kt = ["fill"], At = ["fill"], jt = ["fill"], Mt = ["fill"], Nt = /* @__PURE__ */ m({
|
|
508
508
|
__name: "BaseLogo",
|
|
509
509
|
props: { size: {
|
|
510
510
|
type: String,
|
|
511
511
|
required: !1,
|
|
512
|
-
default:
|
|
512
|
+
default: q.MEDIUM
|
|
513
513
|
} },
|
|
514
514
|
setup(e) {
|
|
515
|
-
let t = `logo-${
|
|
515
|
+
let t = `logo-${te()}`, n = e;
|
|
516
516
|
function r() {
|
|
517
517
|
let e = "";
|
|
518
518
|
switch (n.size) {
|
|
519
|
-
case
|
|
519
|
+
case q.SMALL:
|
|
520
520
|
e = "50px";
|
|
521
521
|
break;
|
|
522
|
-
case
|
|
522
|
+
case q.MEDIUM:
|
|
523
523
|
e = "100px";
|
|
524
524
|
break;
|
|
525
|
-
case
|
|
525
|
+
case q.LARGE: e = "150px";
|
|
526
526
|
}
|
|
527
527
|
return e;
|
|
528
528
|
}
|
|
529
529
|
return (e, n) => {
|
|
530
530
|
let i = M("router-link");
|
|
531
|
-
return
|
|
531
|
+
return D(), o(i, {
|
|
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: L(() => [(
|
|
535
|
+
default: L(() => [(D(), c("svg", {
|
|
536
536
|
height: r(),
|
|
537
537
|
width: r(),
|
|
538
538
|
viewBox: "33.6 130.6 499.7 242.9",
|
|
@@ -545,7 +545,7 @@ var He = "bg-red-100 text-red-700 border-red-200", Ue = /* @__PURE__ */ m({
|
|
|
545
545
|
}, null, -1), l("stop", {
|
|
546
546
|
offset: "1",
|
|
547
547
|
"stop-color": "#132d13"
|
|
548
|
-
}, null, -1)]], 8,
|
|
548
|
+
}, null, -1)]], 8, ft),
|
|
549
549
|
l("linearGradient", {
|
|
550
550
|
id: `${t}-b`,
|
|
551
551
|
gradientUnits: "userSpaceOnUse",
|
|
@@ -554,7 +554,7 @@ var He = "bg-red-100 text-red-700 border-red-200", Ue = /* @__PURE__ */ m({
|
|
|
554
554
|
href: `#${t}-a`,
|
|
555
555
|
y1: "288.291",
|
|
556
556
|
y2: "369.4"
|
|
557
|
-
}, null, 8,
|
|
557
|
+
}, null, 8, pt),
|
|
558
558
|
l("linearGradient", {
|
|
559
559
|
id: `${t}-c`,
|
|
560
560
|
gradientUnits: "userSpaceOnUse",
|
|
@@ -563,7 +563,7 @@ var He = "bg-red-100 text-red-700 border-red-200", Ue = /* @__PURE__ */ m({
|
|
|
563
563
|
href: `#${t}-a`,
|
|
564
564
|
y1: "308.454",
|
|
565
565
|
y2: "370.601"
|
|
566
|
-
}, null, 8,
|
|
566
|
+
}, null, 8, mt),
|
|
567
567
|
l("linearGradient", {
|
|
568
568
|
id: `${t}-d`,
|
|
569
569
|
gradientUnits: "userSpaceOnUse",
|
|
@@ -572,7 +572,7 @@ var He = "bg-red-100 text-red-700 border-red-200", Ue = /* @__PURE__ */ m({
|
|
|
572
572
|
href: `#${t}-a`,
|
|
573
573
|
y1: "288.291",
|
|
574
574
|
y2: "369.85"
|
|
575
|
-
}, null, 8,
|
|
575
|
+
}, null, 8, ht),
|
|
576
576
|
l("linearGradient", {
|
|
577
577
|
id: `${t}-e`,
|
|
578
578
|
gradientUnits: "userSpaceOnUse",
|
|
@@ -581,7 +581,7 @@ var He = "bg-red-100 text-red-700 border-red-200", Ue = /* @__PURE__ */ m({
|
|
|
581
581
|
href: `#${t}-a`,
|
|
582
582
|
y1: "307.312",
|
|
583
583
|
y2: "369.511"
|
|
584
|
-
}, null, 8,
|
|
584
|
+
}, null, 8, gt),
|
|
585
585
|
l("linearGradient", {
|
|
586
586
|
id: `${t}-f`,
|
|
587
587
|
gradientUnits: "userSpaceOnUse",
|
|
@@ -590,7 +590,7 @@ var He = "bg-red-100 text-red-700 border-red-200", Ue = /* @__PURE__ */ m({
|
|
|
590
590
|
href: `#${t}-a`,
|
|
591
591
|
y1: "288.291",
|
|
592
592
|
y2: "367.857"
|
|
593
|
-
}, null, 8,
|
|
593
|
+
}, null, 8, _t),
|
|
594
594
|
l("linearGradient", {
|
|
595
595
|
id: `${t}-g`,
|
|
596
596
|
gradientUnits: "userSpaceOnUse",
|
|
@@ -599,7 +599,7 @@ var He = "bg-red-100 text-red-700 border-red-200", Ue = /* @__PURE__ */ m({
|
|
|
599
599
|
href: `#${t}-a`,
|
|
600
600
|
y1: "307.312",
|
|
601
601
|
y2: "369.511"
|
|
602
|
-
}, null, 8,
|
|
602
|
+
}, null, 8, vt),
|
|
603
603
|
l("linearGradient", {
|
|
604
604
|
id: `${t}-h`,
|
|
605
605
|
gradientUnits: "userSpaceOnUse",
|
|
@@ -608,7 +608,7 @@ var He = "bg-red-100 text-red-700 border-red-200", Ue = /* @__PURE__ */ m({
|
|
|
608
608
|
href: `#${t}-a`,
|
|
609
609
|
y1: "306.156",
|
|
610
610
|
y2: "367.742"
|
|
611
|
-
}, null, 8,
|
|
611
|
+
}, null, 8, yt),
|
|
612
612
|
l("linearGradient", {
|
|
613
613
|
id: `${t}-i`,
|
|
614
614
|
gradientUnits: "userSpaceOnUse",
|
|
@@ -617,7 +617,7 @@ var He = "bg-red-100 text-red-700 border-red-200", Ue = /* @__PURE__ */ m({
|
|
|
617
617
|
href: `#${t}-a`,
|
|
618
618
|
y1: "288.291",
|
|
619
619
|
y2: "369.4"
|
|
620
|
-
}, null, 8,
|
|
620
|
+
}, null, 8, bt),
|
|
621
621
|
l("linearGradient", {
|
|
622
622
|
id: `${t}-j`,
|
|
623
623
|
gradientUnits: "userSpaceOnUse",
|
|
@@ -626,7 +626,7 @@ var He = "bg-red-100 text-red-700 border-red-200", Ue = /* @__PURE__ */ m({
|
|
|
626
626
|
href: `#${t}-a`,
|
|
627
627
|
y1: "131.629",
|
|
628
628
|
y2: "232.559"
|
|
629
|
-
}, null, 8,
|
|
629
|
+
}, null, 8, xt),
|
|
630
630
|
l("linearGradient", {
|
|
631
631
|
id: `${t}-k`,
|
|
632
632
|
gradientUnits: "userSpaceOnUse",
|
|
@@ -641,64 +641,64 @@ var He = "bg-red-100 text-red-700 border-red-200", Ue = /* @__PURE__ */ m({
|
|
|
641
641
|
}, null, -1), l("stop", {
|
|
642
642
|
offset: "1",
|
|
643
643
|
"stop-color": "#808183"
|
|
644
|
-
}, null, -1)]], 8,
|
|
644
|
+
}, null, -1)]], 8, St),
|
|
645
645
|
l("path", {
|
|
646
646
|
d: "m65 307.2c-6.8 0-13.1 2.2-18.2 5.9v-24.8h-13.2v81.1h31.4c17.2 0 31.1-13.9 31.1-31.1s-13.9-31.1-31.1-31.1zm0 49.3h-18.2v-18.2c0-10.1 8.2-18.2 18.2-18.2 10.1 0 18.2 8.2 18.2 18.2.1 10.1-8.1 18.2-18.2 18.2z",
|
|
647
647
|
fill: `url(#${t}-b)`
|
|
648
|
-
}, null, 8,
|
|
648
|
+
}, null, 8, Ct),
|
|
649
649
|
l("path", {
|
|
650
650
|
d: "m168.8 343.9h-46.7c1.4 7.1 6.6 12 14.1 12.7 6.4.6 12.9.1 19.9.1v11.9c-15.2 4.9-33.3.5-42.1-10.4-3.8-4.7-17.3-34.7 11.5-47.4 39-11.4 45.3 22.4 43.3 33.1zm-14.2-12.7c-1.7-8.1-8.8-12.9-17.9-12.3-7.6.5-14 5.8-14.5 12.3z",
|
|
651
651
|
fill: `url(#${t}-c)`
|
|
652
|
-
}, null, 8,
|
|
652
|
+
}, null, 8, wt),
|
|
653
653
|
l("path", {
|
|
654
654
|
d: "m195.5 320.2c0 10.5-.2 20 .1 29.6.2 5.8 4.4 8.4 13.2 8.6v10.5c-13.8 3.9-26.2-4.5-26.4-18-.2-18.7-.1-43.9-.1-62.6h14.1l-.3 18.5 12.7-.1v13.4h-13.3z",
|
|
655
655
|
fill: `url(#${t}-d)`
|
|
656
|
-
}, null, 8,
|
|
656
|
+
}, null, 8, Tt),
|
|
657
657
|
l("path", {
|
|
658
658
|
d: "m249.6 307.3c-17.2 0-31.1 13.9-31.1 31.1s13.9 31.1 31.1 31.1h31.1v-31.1c0-17.2-13.9-31.1-31.1-31.1zm18.6 49.7h-18.5c-10.2 0-18.5-8.3-18.5-18.5s8.3-18.5 18.5-18.5 18.5 8.3 18.5 18.5z",
|
|
659
659
|
fill: `url(#${t}-e)`
|
|
660
|
-
}, null, 8,
|
|
660
|
+
}, null, 8, Et),
|
|
661
661
|
l("path", {
|
|
662
662
|
d: "m296.4 288.3h13v79.6h-13z",
|
|
663
663
|
fill: `url(#${t}-f)`
|
|
664
|
-
}, null, 8,
|
|
664
|
+
}, null, 8, Dt),
|
|
665
665
|
l("path", {
|
|
666
666
|
d: "m354.1 307.3c-17.2 0-31.1 13.9-31.1 31.1s13.9 31.1 31.1 31.1h31.1v-31.1c0-17.2-13.9-31.1-31.1-31.1zm18.6 49.7h-18.5c-10.2 0-18.5-8.3-18.5-18.5s8.3-18.5 18.5-18.5 18.5 8.3 18.5 18.5z",
|
|
667
667
|
fill: `url(#${t}-g)`
|
|
668
|
-
}, null, 8,
|
|
668
|
+
}, null, 8, Ot),
|
|
669
669
|
l("path", {
|
|
670
670
|
d: "m442.2 367.7c0-12.3.2-23.6 0-34.9-.2-3.4-3.6-13.8-14.1-13.4-10.3-.3-14.4 10-14.3 12.7.1 10.2.5 35.1.5 35.1l-13.6.1s-.3-25.7.2-36.2c.6-14.1 12.7-25 27.5-25 14.7 0 26.2 10.4 26.7 24.9.4 10.4.5 36.3.5 36.3z",
|
|
671
671
|
fill: `url(#${t}-h)`
|
|
672
|
-
}, null, 8,
|
|
672
|
+
}, null, 8, kt),
|
|
673
673
|
l("path", {
|
|
674
674
|
d: "m501.9 307.2c6.8 0 13.1 2.2 18.2 5.9v-24.8h13.2v81.1h-31.4c-17.2 0-31.1-13.9-31.1-31.1s13.9-31.1 31.1-31.1zm0 49.3h18.2v-18.2c0-10.1-8.2-18.2-18.2-18.2-10.1 0-18.2 8.2-18.2 18.2 0 10.1 8.1 18.2 18.2 18.2z",
|
|
675
675
|
fill: `url(#${t}-i)`
|
|
676
|
-
}, null, 8,
|
|
676
|
+
}, null, 8, At),
|
|
677
677
|
l("path", {
|
|
678
678
|
d: "m309.2 180.6h-24v-24c0-12.6 10.2-24.1 22.8-25 14.8-1 27.1 11.3 26.1 26.1-.8 12.7-12.3 22.9-24.9 22.9zm-50.7-48.9c-14.8-1-27.1 11.3-26.1 26.1.8 12.6 12.4 22.8 25 22.8h23.9v-24c0-12.6-10.3-24.1-22.8-24.9zm50.7 51.9h-24v23.9c0 12.6 10.2 24.1 22.8 25 14.8 1 27.1-11.3 26.1-26.1-.8-12.6-12.3-22.8-24.9-22.8zm-52.4 0c-14 0-25.3 11.8-24.4 26 .8 12.2 10.7 22.1 22.9 22.9 14.2.9 26-10.4 26-24.4v-24.5z",
|
|
679
679
|
fill: `url(#${t}-j)`
|
|
680
|
-
}, null, 8,
|
|
680
|
+
}, null, 8, jt),
|
|
681
681
|
l("path", {
|
|
682
682
|
d: "m281.7 183.8h3.6v18.5h-3.6z",
|
|
683
683
|
fill: `url(#${t}-k)`
|
|
684
|
-
}, null, 8,
|
|
685
|
-
], 8,
|
|
684
|
+
}, null, 8, Mt)
|
|
685
|
+
], 8, dt))]),
|
|
686
686
|
_: 1
|
|
687
687
|
});
|
|
688
688
|
};
|
|
689
689
|
}
|
|
690
|
-
}),
|
|
690
|
+
}), Pt = /* @__PURE__ */ function(e) {
|
|
691
691
|
return e.DELETE = "DELETE", e.SUCCESS = "SUCCESS", e;
|
|
692
|
-
}({}),
|
|
692
|
+
}({}), Ft = {
|
|
693
693
|
key: 0,
|
|
694
694
|
class: "p-6 text-center"
|
|
695
|
-
},
|
|
695
|
+
}, It = { class: "flex justify-center" }, Lt = {
|
|
696
696
|
key: 1,
|
|
697
697
|
class: "p-6 text-center"
|
|
698
|
-
},
|
|
698
|
+
}, Rt = {
|
|
699
699
|
key: 0,
|
|
700
700
|
class: "mb-5 text-sm text-gray-500"
|
|
701
|
-
},
|
|
701
|
+
}, zt = { class: "flex justify-center" }, Bt = /* @__PURE__ */ m({
|
|
702
702
|
__name: "BaseModal",
|
|
703
703
|
props: {
|
|
704
704
|
title: {
|
|
@@ -717,7 +717,7 @@ var He = "bg-red-100 text-red-700 border-red-200", Ue = /* @__PURE__ */ m({
|
|
|
717
717
|
mode: {
|
|
718
718
|
type: String,
|
|
719
719
|
required: !1,
|
|
720
|
-
default:
|
|
720
|
+
default: Pt.SUCCESS
|
|
721
721
|
}
|
|
722
722
|
},
|
|
723
723
|
emits: ["closeModal", "confirmModal"],
|
|
@@ -726,11 +726,11 @@ var He = "bg-red-100 text-red-700 border-red-200", Ue = /* @__PURE__ */ m({
|
|
|
726
726
|
function a(e) {
|
|
727
727
|
e.key === "Escape" && r("closeModal");
|
|
728
728
|
}
|
|
729
|
-
return
|
|
729
|
+
return w(() => {
|
|
730
730
|
document.addEventListener("keydown", a);
|
|
731
|
-
}),
|
|
731
|
+
}), E(() => {
|
|
732
732
|
document.removeEventListener("keydown", a);
|
|
733
|
-
}), (n, r) => (
|
|
733
|
+
}), (n, r) => (D(), c(e, null, [l("div", {
|
|
734
734
|
class: "fixed inset-0 w-full h-screen bg-black/75 z-40",
|
|
735
735
|
onClick: r[0] ||= (e) => n.$emit("closeModal")
|
|
736
736
|
}), l("div", {
|
|
@@ -738,37 +738,37 @@ var He = "bg-red-100 text-red-700 border-red-200", Ue = /* @__PURE__ */ m({
|
|
|
738
738
|
role: "dialog",
|
|
739
739
|
"aria-modal": "true",
|
|
740
740
|
"aria-labelledby": i
|
|
741
|
-
}, [t.mode === F(
|
|
742
|
-
p(F(
|
|
741
|
+
}, [t.mode === F(Pt).DELETE ? (D(), c("div", Ft, [
|
|
742
|
+
p(F(Se), { 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"
|
|
746
746
|
}, " Are you sure you want to delete this " + P(t.title) + "? ", 1),
|
|
747
|
-
l("div",
|
|
748
|
-
color: F(
|
|
747
|
+
l("div", It, [p(it, {
|
|
748
|
+
color: F(G).RED,
|
|
749
749
|
onClick: r[1] ||= (e) => n.$emit("confirmModal"),
|
|
750
750
|
description: "Yes, I'm sure"
|
|
751
|
-
}, null, 8, ["color"]), p(
|
|
752
|
-
color: F(
|
|
751
|
+
}, null, 8, ["color"]), p(it, {
|
|
752
|
+
color: F(G).WHITE,
|
|
753
753
|
onClick: r[2] ||= (e) => n.$emit("closeModal"),
|
|
754
754
|
description: "No, cancel"
|
|
755
755
|
}, null, 8, ["color"])])
|
|
756
|
-
])) : (
|
|
757
|
-
p(F(
|
|
756
|
+
])) : (D(), c("div", Lt, [
|
|
757
|
+
p(F(pe), { 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"
|
|
761
761
|
}, P(t.title), 1),
|
|
762
|
-
t.description ? (
|
|
762
|
+
t.description ? (D(), c("p", Rt, P(t.description), 1)) : s("", !0),
|
|
763
763
|
j(n.$slots, "default"),
|
|
764
|
-
l("div",
|
|
765
|
-
color: F(
|
|
764
|
+
l("div", zt, [p(it, {
|
|
765
|
+
color: F(G).BLUE,
|
|
766
766
|
onClick: r[3] ||= (e) => n.$emit("closeModal"),
|
|
767
767
|
description: "OK"
|
|
768
768
|
}, null, 8, ["color"])])
|
|
769
769
|
]))])], 64));
|
|
770
770
|
}
|
|
771
|
-
}),
|
|
771
|
+
}), Vt = /* @__PURE__ */ m({
|
|
772
772
|
__name: "BaseRow",
|
|
773
773
|
props: { bgColor: {
|
|
774
774
|
type: String,
|
|
@@ -780,9 +780,9 @@ var He = "bg-red-100 text-red-700 border-red-200", Ue = /* @__PURE__ */ m({
|
|
|
780
780
|
function n() {
|
|
781
781
|
return "block p-8 border border-gray-200 rounded-xl shadow-sm dark:bg-gray-800 dark:border-gray-700 " + t.bgColor;
|
|
782
782
|
}
|
|
783
|
-
return (e, t) => (
|
|
783
|
+
return (e, t) => (D(), c("div", { class: b(n()) }, [j(e.$slots, "default")], 2));
|
|
784
784
|
}
|
|
785
|
-
}),
|
|
785
|
+
}), Ht = /* @__PURE__ */ m({
|
|
786
786
|
__name: "BaseSpinner",
|
|
787
787
|
props: {
|
|
788
788
|
size: { default: "sm" },
|
|
@@ -804,17 +804,17 @@ var He = "bg-red-100 text-red-700 border-red-200", Ue = /* @__PURE__ */ m({
|
|
|
804
804
|
red: "border-t-red-500",
|
|
805
805
|
amber: "border-t-amber-500"
|
|
806
806
|
})[t.color]);
|
|
807
|
-
return (e, t) => (
|
|
808
|
-
class:
|
|
807
|
+
return (e, t) => (D(), c("div", {
|
|
808
|
+
class: b(["border-gray-200 dark:border-slate-700 rounded-full animate-spin", [n.value, r.value]]),
|
|
809
809
|
role: "status",
|
|
810
810
|
"aria-label": "Loading"
|
|
811
811
|
}, null, 2));
|
|
812
812
|
}
|
|
813
|
-
}),
|
|
813
|
+
}), J = /* @__PURE__ */ function(e) {
|
|
814
814
|
return e.SUCCESS = "SUCCESS", e.WARNING = "WARNING", e.ERROR = "ERROR", e;
|
|
815
|
-
}({}),
|
|
815
|
+
}({}), Y = /* @__PURE__ */ function(e) {
|
|
816
816
|
return e.TOP_LEFT = "TOP_LEFT", e.TOP_RIGHT = "TOP_RIGHT", e.BOTTOM_LEFT = "BOTTOM_LEFT", e.BOTTOM_RIGHT = "BOTTOM_RIGHT", e;
|
|
817
|
-
}({}),
|
|
817
|
+
}({}), Ut = { class: "flex items-center w-full max-w-md p-4 mb-4 text-gray-500 bg-white rounded-lg shadow dark:text-gray-400 dark:bg-gray-800" }, Wt = { class: "ml-3 text-sm font-normal" }, Gt = /* @__PURE__ */ m({
|
|
818
818
|
__name: "BaseToast",
|
|
819
819
|
props: {
|
|
820
820
|
mode: {
|
|
@@ -833,7 +833,7 @@ var He = "bg-red-100 text-red-700 border-red-200", Ue = /* @__PURE__ */ m({
|
|
|
833
833
|
positioning: {
|
|
834
834
|
type: String,
|
|
835
835
|
required: !1,
|
|
836
|
-
default:
|
|
836
|
+
default: Y.TOP_RIGHT
|
|
837
837
|
},
|
|
838
838
|
duration: {
|
|
839
839
|
type: Number,
|
|
@@ -846,21 +846,21 @@ var He = "bg-red-100 text-red-700 border-red-200", Ue = /* @__PURE__ */ m({
|
|
|
846
846
|
function i() {
|
|
847
847
|
n.value = !1, r &&= (clearTimeout(r), null);
|
|
848
848
|
}
|
|
849
|
-
|
|
849
|
+
w(() => {
|
|
850
850
|
r = setTimeout(() => n.value = !1, t.duration);
|
|
851
|
-
}),
|
|
851
|
+
}), E(() => {
|
|
852
852
|
r && clearTimeout(r);
|
|
853
853
|
});
|
|
854
854
|
function a() {
|
|
855
855
|
let e = "";
|
|
856
856
|
switch (t.mode) {
|
|
857
|
-
case
|
|
857
|
+
case J.ERROR:
|
|
858
858
|
e = "text-red-500 bg-red-100 dark:bg-red-800 dark:text-red-200";
|
|
859
859
|
break;
|
|
860
|
-
case
|
|
860
|
+
case J.SUCCESS:
|
|
861
861
|
e = "text-green-500 bg-green-100 dark:bg-green-800 dark:text-green-200";
|
|
862
862
|
break;
|
|
863
|
-
case
|
|
863
|
+
case J.WARNING:
|
|
864
864
|
e = "text-orange-500 bg-orange-100 dark:bg-orange-700 dark:text-orange-200";
|
|
865
865
|
break;
|
|
866
866
|
default: e = "text-gray-500 bg-gray-100 dark:bg-gray-800 dark:text-gray-200";
|
|
@@ -870,46 +870,46 @@ var He = "bg-red-100 text-red-700 border-red-200", Ue = /* @__PURE__ */ m({
|
|
|
870
870
|
function o() {
|
|
871
871
|
let e = "top-5 right-5";
|
|
872
872
|
switch (t.positioning) {
|
|
873
|
-
case
|
|
873
|
+
case Y.BOTTOM_LEFT:
|
|
874
874
|
e = "bottom-5 left-5";
|
|
875
875
|
break;
|
|
876
|
-
case
|
|
876
|
+
case Y.TOP_LEFT:
|
|
877
877
|
e = "top-5 left-5";
|
|
878
878
|
break;
|
|
879
|
-
case
|
|
879
|
+
case Y.TOP_RIGHT:
|
|
880
880
|
e = "top-5 right-5";
|
|
881
881
|
break;
|
|
882
|
-
case
|
|
882
|
+
case Y.BOTTOM_RIGHT: e = "bottom-5 right-5";
|
|
883
883
|
}
|
|
884
884
|
return "fixed flex items-center w-full max-w-md p-4 space-x-4 divide-x rounded-lg " + e;
|
|
885
885
|
}
|
|
886
|
-
return (t, r) => n.value ? (
|
|
886
|
+
return (t, r) => n.value ? (D(), c("div", {
|
|
887
887
|
key: 0,
|
|
888
888
|
id: "toast-top-right",
|
|
889
|
-
class:
|
|
889
|
+
class: b(o()),
|
|
890
890
|
role: "alert"
|
|
891
|
-
}, [l("div",
|
|
892
|
-
e.mode == F(
|
|
891
|
+
}, [l("div", Ut, [
|
|
892
|
+
e.mode == F(J).ERROR ? (D(), c("div", {
|
|
893
893
|
key: 0,
|
|
894
|
-
class:
|
|
895
|
-
}, [p(F(
|
|
894
|
+
class: b(a())
|
|
895
|
+
}, [p(F(Se), { class: "h-6 w-6 text-red-500" }), r[0] ||= l("span", { class: "sr-only" }, "Error icon", -1)], 2)) : e.mode == F(J).SUCCESS ? (D(), c("div", {
|
|
896
896
|
key: 1,
|
|
897
|
-
class:
|
|
898
|
-
}, [p(F(
|
|
897
|
+
class: b(a())
|
|
898
|
+
}, [p(F(pe), { class: "h-6 w-6 text-green-500" }), r[1] ||= l("span", { class: "sr-only" }, "Check icon", -1)], 2)) : e.mode == F(J).WARNING ? (D(), c("div", {
|
|
899
899
|
key: 2,
|
|
900
|
-
class:
|
|
901
|
-
}, [p(F(
|
|
902
|
-
l("div",
|
|
903
|
-
e.hasCloseIcon ? (
|
|
900
|
+
class: b(a())
|
|
901
|
+
}, [p(F(Ce), { class: "h-6 w-6 text-yellow-500" }), r[2] ||= l("span", { class: "sr-only" }, "Warning icon", -1)], 2)) : s("", !0),
|
|
902
|
+
l("div", Wt, P(e.description), 1),
|
|
903
|
+
e.hasCloseIcon ? (D(), c("button", {
|
|
904
904
|
key: 3,
|
|
905
905
|
type: "button",
|
|
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(Ae), { 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({
|
|
913
913
|
__name: "ColoredSquares",
|
|
914
914
|
props: { color: {
|
|
915
915
|
type: String,
|
|
@@ -930,25 +930,25 @@ var He = "bg-red-100 text-red-700 border-red-200", Ue = /* @__PURE__ */ m({
|
|
|
930
930
|
function i() {
|
|
931
931
|
let e = "font-bold text-xs mr-2 px-2.5 py-0.5 rounded-full", n = "gray";
|
|
932
932
|
switch (t.color) {
|
|
933
|
-
case
|
|
933
|
+
case W.GREEN:
|
|
934
934
|
n = "green";
|
|
935
935
|
break;
|
|
936
|
-
case
|
|
936
|
+
case W.RED:
|
|
937
937
|
n = "red";
|
|
938
938
|
break;
|
|
939
|
-
case
|
|
939
|
+
case W.BLUE:
|
|
940
940
|
n = "blue";
|
|
941
941
|
break;
|
|
942
|
-
case
|
|
942
|
+
case W.YELLOW:
|
|
943
943
|
n = "yellow";
|
|
944
944
|
break;
|
|
945
|
-
case
|
|
945
|
+
case W.NONE: return e;
|
|
946
946
|
}
|
|
947
947
|
return e + " bg-" + n + "-100 text-" + n + "-800";
|
|
948
948
|
}
|
|
949
|
-
return (e, t) => (
|
|
949
|
+
return (e, t) => (D(), c("div", Kt, [l("div", { class: b(["border border-gray-300 relative aspect-square rounded-lg bg-white shadow-sm overflow-hidden flex items-center justify-center text-center", i()]) }, [j(e.$slots, "default"), l("div", { class: b(["absolute bottom-0 left-0 h-1 w-full", r.value]) }, null, 2)], 2)]));
|
|
950
950
|
}
|
|
951
|
-
}),
|
|
951
|
+
}), Jt = { class: "flex items-start justify-between" }, Yt = { class: "min-w-0" }, Xt = /* @__PURE__ */ m({
|
|
952
952
|
__name: "EarningsCard",
|
|
953
953
|
props: {
|
|
954
954
|
title: { default: "TOTAL EARNINGS" },
|
|
@@ -1000,27 +1000,27 @@ var He = "bg-red-100 text-red-700 border-red-200", Ue = /* @__PURE__ */ m({
|
|
|
1000
1000
|
minimumFractionDigits: n.decimals,
|
|
1001
1001
|
maximumFractionDigits: n.decimals
|
|
1002
1002
|
}));
|
|
1003
|
-
return (n, r) => (
|
|
1003
|
+
return (n, r) => (D(), c("div", { class: b(["relative rounded-xl border-2 border-dashed bg-white dark:bg-slate-800", [d.value.border, t.compact ? "p-3" : "p-6"]]) }, [t.badge ? (D(), c("div", {
|
|
1004
1004
|
key: 0,
|
|
1005
|
-
class:
|
|
1006
|
-
}, P(t.badge), 3)) : s("", !0), l("div",
|
|
1007
|
-
l("p", { class:
|
|
1008
|
-
l("p", { class:
|
|
1009
|
-
l("p", { class:
|
|
1010
|
-
]), l("div", { class:
|
|
1011
|
-
class:
|
|
1005
|
+
class: b(["absolute right-4 top-4 rounded-md px-3 py-1 text-xs font-bold tracking-wide", d.value.badge])
|
|
1006
|
+
}, P(t.badge), 3)) : s("", !0), l("div", Jt, [l("div", Yt, [
|
|
1007
|
+
l("p", { class: b(["font-bold tracking-wide text-gray-800 dark:text-slate-200", t.compact ? "pr-8 text-xs" : "text-sm"]) }, P(t.title), 3),
|
|
1008
|
+
l("p", { class: b(["mt-1 font-bold truncate", [d.value.amount, t.compact ? "text-lg" : "text-4xl"]]) }, P(f.value), 3),
|
|
1009
|
+
l("p", { class: b(["mt-1 font-medium", [d.value.subtitle, t.compact ? "text-xs" : "text-sm"]]) }, P(t.subtitle), 3)
|
|
1010
|
+
]), l("div", { class: b(["flex items-center justify-center", [d.value.iconBox, t.compact ? "absolute right-2 top-2 h-6 w-6 rounded-lg" : "mt-6 h-12 w-12 rounded-xl"]]) }, [(D(), c("svg", {
|
|
1011
|
+
class: b([d.value.icon, t.compact ? "h-3.5 w-3.5" : "h-6 w-6"]),
|
|
1012
1012
|
viewBox: "0 0 24 24",
|
|
1013
1013
|
fill: "none",
|
|
1014
1014
|
stroke: "currentColor",
|
|
1015
1015
|
"stroke-width": "2.5",
|
|
1016
1016
|
"stroke-linecap": "round",
|
|
1017
1017
|
"stroke-linejoin": "round"
|
|
1018
|
-
}, [o.value ? (
|
|
1018
|
+
}, [o.value ? (D(), c(e, { key: 0 }, [r[0] ||= l("polyline", { points: "22 17 13.5 8.5 8.5 13.5 2 7" }, null, -1), r[1] ||= l("polyline", { points: "16 17 22 17 22 11" }, null, -1)], 64)) : (D(), c(e, { key: 1 }, [r[2] ||= l("polyline", { points: "22 7 13.5 15.5 8.5 10.5 2 17" }, null, -1), r[3] ||= l("polyline", { points: "16 7 22 7 22 13" }, null, -1)], 64))], 2))], 2)])], 2));
|
|
1019
1019
|
}
|
|
1020
|
-
}),
|
|
1020
|
+
}), Zt = {
|
|
1021
1021
|
key: 0,
|
|
1022
1022
|
class: "font-bold text-green-800 dark:text-green-400"
|
|
1023
|
-
},
|
|
1023
|
+
}, Qt = { key: 0 }, $t = { key: 0 }, en = "font-bold", tn = /* @__PURE__ */ m({
|
|
1024
1024
|
__name: "EuroAmount",
|
|
1025
1025
|
props: {
|
|
1026
1026
|
amount: {
|
|
@@ -1040,20 +1040,20 @@ var He = "bg-red-100 text-red-700 border-red-200", Ue = /* @__PURE__ */ m({
|
|
|
1040
1040
|
},
|
|
1041
1041
|
setup(t) {
|
|
1042
1042
|
let n = t, r = a(() => n.amount !== null && n.amount !== void 0), i = a(() => r.value && n.amount < 0), o = a(() => n.beforeAmount === null || n.beforeAmount === void 0 ? !1 : n.amount < n.beforeAmount), l = a(() => i.value || o.value), u = a(() => !i.value && !o.value && n.beforeAmount !== null && n.beforeAmount !== void 0);
|
|
1043
|
-
return (n, i) => (
|
|
1043
|
+
return (n, i) => (D(), c(e, null, [r.value && u.value ? (D(), c("span", Zt, [f(P(t.amount) + " ", 1), t.showCurrency ? (D(), c("span", Qt, "€")) : s("", !0)])) : s("", !0), r.value && !u.value ? (D(), c("span", {
|
|
1044
1044
|
key: 1,
|
|
1045
|
-
class:
|
|
1046
|
-
}, [f(P(t.amount) + " ", 1), t.showCurrency ? (
|
|
1045
|
+
class: b([en, l.value ? "text-red-800 dark:text-red-400" : "text-gray-800 dark:text-gray-200"])
|
|
1046
|
+
}, [f(P(t.amount) + " ", 1), t.showCurrency ? (D(), c("span", $t, "€")) : s("", !0)], 2)) : s("", !0)], 64));
|
|
1047
1047
|
}
|
|
1048
|
-
}),
|
|
1048
|
+
}), nn = { "aria-label": "Pagination" }, rn = { class: "flex list-none p-0 m-0" }, an = [
|
|
1049
1049
|
"aria-current",
|
|
1050
1050
|
"aria-label",
|
|
1051
1051
|
"onClick"
|
|
1052
|
-
],
|
|
1052
|
+
], on = {
|
|
1053
1053
|
key: 1,
|
|
1054
1054
|
"aria-hidden": "true",
|
|
1055
1055
|
class: "inline-block border border-gray-300 dark:border-gray-600 rounded-lg p-3 text-black dark:text-gray-200 cursor-not-allowed"
|
|
1056
|
-
},
|
|
1056
|
+
}, sn = /* @__PURE__ */ m({
|
|
1057
1057
|
__name: "Pagination",
|
|
1058
1058
|
props: {
|
|
1059
1059
|
totalItems: {
|
|
@@ -1063,49 +1063,58 @@ var He = "bg-red-100 text-red-700 border-red-200", Ue = /* @__PURE__ */ m({
|
|
|
1063
1063
|
itemsPerPage: {
|
|
1064
1064
|
type: Number,
|
|
1065
1065
|
default: 20
|
|
1066
|
+
},
|
|
1067
|
+
page: {
|
|
1068
|
+
type: Number,
|
|
1069
|
+
default: void 0
|
|
1066
1070
|
}
|
|
1067
1071
|
},
|
|
1068
1072
|
emits: ["page-changed"],
|
|
1069
1073
|
setup(t, { emit: n }) {
|
|
1070
|
-
let r = t, i =
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1074
|
+
let r = t, i = n, o = a(() => {
|
|
1075
|
+
let e = Number(r.itemsPerPage) > 0 ? Number(r.itemsPerPage) : 20, t = Number(r.totalItems) > 0 ? Number(r.totalItems) : 0;
|
|
1076
|
+
return Math.ceil(t / e);
|
|
1077
|
+
});
|
|
1078
|
+
function s(e) {
|
|
1079
|
+
return Math.min(Math.max(e, 1), Math.max(o.value, 1));
|
|
1080
|
+
}
|
|
1081
|
+
let u = k(1);
|
|
1082
|
+
I(o, () => {
|
|
1083
|
+
u.value = s(u.value);
|
|
1084
|
+
});
|
|
1085
|
+
let d = a(() => r.page != null && Number.isFinite(r.page) ? s(r.page) : u.value), f = a(() => {
|
|
1086
|
+
let e = o.value;
|
|
1087
|
+
if (e <= 5) return Array.from({ length: e }, (e, t) => t + 1);
|
|
1088
|
+
let t = [], n = Math.max(1, d.value - 2), r = Math.min(e, d.value + 2);
|
|
1077
1089
|
n > 1 && (t.push(1), n > 2 && t.push(0));
|
|
1078
1090
|
for (let e = n; e <= r; e++) t.push(e);
|
|
1079
|
-
r <
|
|
1080
|
-
}
|
|
1081
|
-
function
|
|
1082
|
-
e ===
|
|
1091
|
+
return r < e && (r < e - 1 && t.push(0), t.push(e)), t;
|
|
1092
|
+
});
|
|
1093
|
+
function p(e) {
|
|
1094
|
+
e === d.value || e < 1 || e > o.value || (u.value = e, i("page-changed", e));
|
|
1083
1095
|
}
|
|
1084
|
-
return
|
|
1085
|
-
let e = Number(r.itemsPerPage) > 0 ? Number(r.itemsPerPage) : 20, t = Number(r.totalItems) > 0 ? Number(r.totalItems) : 0;
|
|
1086
|
-
a.value = Math.ceil(t / e), i.value > a.value && (i.value = Math.max(1, a.value)), u(i.value);
|
|
1087
|
-
}, { immediate: !0 }), (t, n) => (E(), c("nav", en, [l("ul", tn, [(E(!0), c(e, null, A(o.value, (e, t) => (E(), c("li", {
|
|
1096
|
+
return (t, n) => (D(), c("nav", nn, [l("ul", rn, [(D(!0), c(e, null, A(f.value, (e, t) => (D(), c("li", {
|
|
1088
1097
|
key: t,
|
|
1089
1098
|
class: "mr-1"
|
|
1090
|
-
}, [e === 0 ? (
|
|
1099
|
+
}, [e === 0 ? (D(), c("span", on, "...")) : (D(), c("button", {
|
|
1091
1100
|
key: 0,
|
|
1092
1101
|
type: "button",
|
|
1093
|
-
"aria-current": e ===
|
|
1102
|
+
"aria-current": e === d.value ? "page" : void 0,
|
|
1094
1103
|
"aria-label": `Go to page ${e}`,
|
|
1095
|
-
onClick: (t) =>
|
|
1096
|
-
class:
|
|
1097
|
-
}, P(e), 11,
|
|
1104
|
+
onClick: (t) => p(e),
|
|
1105
|
+
class: b(["inline-block min-w-[44px] border border-gray-300 dark:border-gray-600 rounded-lg p-3 text-black dark:text-gray-200 cursor-pointer transition-colors hover:bg-gray-300 dark:hover:bg-gray-700 focus:outline-none focus-visible:ring-2 focus-visible:ring-emerald-500", { "active font-bold bg-gray-200 dark:bg-gray-700": e === d.value }])
|
|
1106
|
+
}, P(e), 11, an))]))), 128))])]));
|
|
1098
1107
|
}
|
|
1099
|
-
}),
|
|
1108
|
+
}), cn = { key: 0 }, ln = {
|
|
1100
1109
|
key: 0,
|
|
1101
1110
|
class: "flex items-center space-x-2"
|
|
1102
|
-
},
|
|
1111
|
+
}, un = {
|
|
1103
1112
|
key: 1,
|
|
1104
1113
|
class: "flex items-center space-x-2"
|
|
1105
|
-
},
|
|
1114
|
+
}, dn = {
|
|
1106
1115
|
key: 2,
|
|
1107
1116
|
class: "flex items-center space-x-2"
|
|
1108
|
-
},
|
|
1117
|
+
}, fn = /* @__PURE__ */ m({
|
|
1109
1118
|
__name: "TrendArrow",
|
|
1110
1119
|
props: {
|
|
1111
1120
|
number: {
|
|
@@ -1119,23 +1128,23 @@ var He = "bg-red-100 text-red-700 border-red-200", Ue = /* @__PURE__ */ m({
|
|
|
1119
1128
|
},
|
|
1120
1129
|
setup(e) {
|
|
1121
1130
|
let t = e, n = a(() => t.number !== null && t.number !== void 0 && t.number < 0), r = a(() => t.number === 0);
|
|
1122
|
-
return (i, a) => e.number !== null && e.number !== void 0 ? (
|
|
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 }, {
|
|
1123
1132
|
default: L(() => [f(P(e.number) + P(t.icon), 1)]),
|
|
1124
1133
|
_: 1
|
|
1125
|
-
}, 8, ["color"]), p(F(
|
|
1134
|
+
}, 8, ["color"]), p(F(ce), { class: "h-5 w-5 text-red-500" })])) : r.value ? (D(), c("span", un, [p(Ge, { color: F(W).GRAY }, {
|
|
1126
1135
|
default: L(() => [f(P(e.number) + P(t.icon), 1)]),
|
|
1127
1136
|
_: 1
|
|
1128
|
-
}, 8, ["color"]), p(F(
|
|
1137
|
+
}, 8, ["color"]), p(F(De), { class: "h-5 w-5 text-gray-400" })])) : (D(), c("span", dn, [p(Ge, { color: F(W).GREEN }, {
|
|
1129
1138
|
default: L(() => [f(P(e.number) + P(t.icon), 1)]),
|
|
1130
1139
|
_: 1
|
|
1131
|
-
}, 8, ["color"]), p(F(
|
|
1140
|
+
}, 8, ["color"]), p(F(ue), { class: "h-5 w-5 text-green-500" })]))])) : s("", !0);
|
|
1132
1141
|
}
|
|
1133
1142
|
});
|
|
1134
1143
|
//#endregion
|
|
1135
1144
|
//#region src/composables/useThemeClasses.ts
|
|
1136
|
-
function
|
|
1137
|
-
let { isDark: e } =
|
|
1138
|
-
return
|
|
1145
|
+
function X() {
|
|
1146
|
+
let { isDark: e } = U();
|
|
1147
|
+
return O({
|
|
1139
1148
|
card: a(() => e.value ? "bg-gray-800 border-gray-700" : "bg-white border-gray-200"),
|
|
1140
1149
|
cardAlt: a(() => e.value ? "bg-gray-900 border-gray-700" : "bg-white border-gray-200"),
|
|
1141
1150
|
pageBg: a(() => e.value ? "bg-gray-900" : "bg-gray-50"),
|
|
@@ -1161,15 +1170,15 @@ function Z() {
|
|
|
1161
1170
|
}
|
|
1162
1171
|
//#endregion
|
|
1163
1172
|
//#region src/composables/useEscapeKey.ts
|
|
1164
|
-
function
|
|
1173
|
+
function pn(e) {
|
|
1165
1174
|
function t(t) {
|
|
1166
1175
|
t.key === "Escape" && e();
|
|
1167
1176
|
}
|
|
1168
|
-
|
|
1177
|
+
w(() => document.addEventListener("keydown", t)), C(() => document.removeEventListener("keydown", t));
|
|
1169
1178
|
}
|
|
1170
1179
|
//#endregion
|
|
1171
1180
|
//#region src/components/BaseModalShell.vue?vue&type=script&setup=true&lang.ts
|
|
1172
|
-
var
|
|
1181
|
+
var mn = { class: "flex items-start gap-4 min-w-0" }, hn = { class: "flex-1 min-w-0" }, gn = { class: "p-6 overflow-y-auto flex-1" }, _n = { class: "p-6" }, vn = { class: "flex items-start gap-4" }, yn = { class: "flex-1" }, bn = { class: "mt-4" }, xn = { class: "mt-6 flex gap-3 justify-end" }, Sn = /* @__PURE__ */ m({
|
|
1173
1182
|
__name: "BaseModalShell",
|
|
1174
1183
|
props: {
|
|
1175
1184
|
title: {},
|
|
@@ -1189,55 +1198,55 @@ var fn = { class: "flex items-start gap-4 min-w-0" }, pn = { class: "flex-1 min-
|
|
|
1189
1198
|
},
|
|
1190
1199
|
emits: ["cancel", "backdrop"],
|
|
1191
1200
|
setup(e, { emit: n }) {
|
|
1192
|
-
let r = e, i = n, { isDark: u } =
|
|
1201
|
+
let r = e, i = n, { isDark: u } = U(), d = X(), f = `modal-title-${Math.random().toString(36).slice(2, 9)}`, p = a(() => u.value ? "bg-gray-900 border border-gray-700" : "bg-white border border-gray-200"), m = a(() => r.iconBgClass || (u.value ? "bg-emerald-900/30" : "bg-emerald-50"));
|
|
1193
1202
|
function h() {
|
|
1194
1203
|
i("backdrop"), r.manualClose || i("cancel");
|
|
1195
1204
|
}
|
|
1196
|
-
return
|
|
1205
|
+
return pn(() => {
|
|
1197
1206
|
r.manualClose || i("cancel");
|
|
1198
|
-
}), (n, r) => (
|
|
1207
|
+
}), (n, r) => (D(), o(t, { to: "body" }, [l("div", {
|
|
1199
1208
|
class: "fixed inset-0 z-50 flex items-center justify-center bg-black/50",
|
|
1200
1209
|
role: "dialog",
|
|
1201
1210
|
"aria-modal": "true",
|
|
1202
1211
|
"aria-labelledby": f,
|
|
1203
1212
|
onClick: h
|
|
1204
|
-
}, [e.scrollable ? (
|
|
1213
|
+
}, [e.scrollable ? (D(), c("div", {
|
|
1205
1214
|
key: 0,
|
|
1206
|
-
class:
|
|
1215
|
+
class: b(["relative w-full mx-4 rounded-lg shadow-xl max-h-[90vh] flex flex-col", [e.maxWidthClass, p.value]]),
|
|
1207
1216
|
onClick: r[0] ||= z(() => {}, ["stop"])
|
|
1208
1217
|
}, [
|
|
1209
|
-
l("div", { class:
|
|
1210
|
-
class:
|
|
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
|
+
class: b(["h-6 w-6", e.iconClass]),
|
|
1211
1220
|
"aria-hidden": "true"
|
|
1212
|
-
}, null, 8, ["class"]))], 2)]), l("div",
|
|
1221
|
+
}, null, 8, ["class"]))], 2)]), l("div", hn, [l("h3", {
|
|
1213
1222
|
id: f,
|
|
1214
|
-
class:
|
|
1215
|
-
}, P(e.title), 3), e.subtitle ? (
|
|
1223
|
+
class: b(["text-lg font-medium", F(d).primaryText])
|
|
1224
|
+
}, P(e.title), 3), e.subtitle ? (D(), c("p", {
|
|
1216
1225
|
key: 0,
|
|
1217
|
-
class:
|
|
1226
|
+
class: b(["text-sm mt-1 break-all", F(d).mutedText])
|
|
1218
1227
|
}, P(e.subtitle), 3)) : s("", !0)])]), j(n.$slots, "header-actions")], 2),
|
|
1219
|
-
l("div",
|
|
1220
|
-
n.$slots.footer ? (
|
|
1228
|
+
l("div", gn, [j(n.$slots, "default")]),
|
|
1229
|
+
n.$slots.footer ? (D(), c("div", {
|
|
1221
1230
|
key: 0,
|
|
1222
|
-
class:
|
|
1231
|
+
class: b(["flex gap-3 justify-end p-6 border-t shrink-0", F(d).border])
|
|
1223
1232
|
}, [j(n.$slots, "footer")], 2)) : s("", !0)
|
|
1224
|
-
], 2)) : (
|
|
1233
|
+
], 2)) : (D(), c("div", {
|
|
1225
1234
|
key: 1,
|
|
1226
|
-
class:
|
|
1235
|
+
class: b(["relative w-full mx-4 rounded-lg shadow-xl", [e.maxWidthClass, p.value]]),
|
|
1227
1236
|
onClick: r[1] ||= z(() => {}, ["stop"])
|
|
1228
|
-
}, [l("div",
|
|
1229
|
-
l("div",
|
|
1230
|
-
class:
|
|
1237
|
+
}, [l("div", _n, [
|
|
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
|
+
class: b(["h-6 w-6", e.iconClass]),
|
|
1231
1240
|
"aria-hidden": "true"
|
|
1232
|
-
}, null, 8, ["class"]))], 2)]), l("div",
|
|
1241
|
+
}, null, 8, ["class"]))], 2)]), l("div", yn, [l("h3", {
|
|
1233
1242
|
id: f,
|
|
1234
|
-
class:
|
|
1243
|
+
class: b(["text-lg font-medium", F(d).primaryText])
|
|
1235
1244
|
}, P(e.title), 3)])]),
|
|
1236
|
-
l("div",
|
|
1237
|
-
l("div",
|
|
1245
|
+
l("div", bn, [j(n.$slots, "default")]),
|
|
1246
|
+
l("div", xn, [j(n.$slots, "footer")])
|
|
1238
1247
|
])], 2))])]));
|
|
1239
1248
|
}
|
|
1240
|
-
}),
|
|
1249
|
+
}), Cn = ["aria-expanded"], wn = { class: "flex items-center gap-3" }, Tn = /* @__PURE__ */ m({
|
|
1241
1250
|
__name: "BaseCollapsibleSection",
|
|
1242
1251
|
props: {
|
|
1243
1252
|
title: {},
|
|
@@ -1247,17 +1256,17 @@ var fn = { class: "flex items-start gap-4 min-w-0" }, pn = { class: "flex-1 min-
|
|
|
1247
1256
|
},
|
|
1248
1257
|
emits: ["toggle"],
|
|
1249
1258
|
setup(e, { emit: t }) {
|
|
1250
|
-
let n = e, r = t, { isDark: i } =
|
|
1251
|
-
return (t, n) => (
|
|
1259
|
+
let n = e, r = t, { isDark: i } = U(), o = X(), u = a(() => i.value ? "text-gray-100" : "text-gray-700"), d = a(() => i.value ? "bg-gray-800/50 hover:bg-gray-800 border-gray-700" : "bg-gray-50 hover:bg-gray-100 border-gray-200"), f = a(() => i.value ? "bg-emerald-500/15 text-emerald-400" : "bg-emerald-50 text-emerald-700"), p = a(() => n.bodyClass === void 0 ? i.value ? "bg-gray-800" : "bg-white" : n.bodyClass);
|
|
1260
|
+
return (t, n) => (D(), c("section", { class: b(["rounded-xl border transition-colors", F(o).cardAlt]) }, [l("button", {
|
|
1252
1261
|
type: "button",
|
|
1253
|
-
class:
|
|
1262
|
+
class: b(["w-full flex items-center justify-between p-4 text-left transition-colors cursor-pointer focus:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-emerald-500", [d.value, e.collapsed ? "rounded-xl" : "rounded-t-xl"]]),
|
|
1254
1263
|
"aria-expanded": !e.collapsed,
|
|
1255
1264
|
onClick: n[0] ||= (e) => r("toggle")
|
|
1256
|
-
}, [l("div",
|
|
1265
|
+
}, [l("div", wn, [l("h2", { class: b(["text-base font-semibold", u.value]) }, P(e.title), 3), e.badge ? (D(), c("span", {
|
|
1257
1266
|
key: 0,
|
|
1258
|
-
class:
|
|
1259
|
-
}, P(e.badge), 3)) : s("", !0)]), (
|
|
1260
|
-
class:
|
|
1267
|
+
class: b(["text-xs px-2 py-0.5 rounded-full", f.value])
|
|
1268
|
+
}, P(e.badge), 3)) : s("", !0)]), (D(), c("svg", {
|
|
1269
|
+
class: b(["w-5 h-5 transition-transform", [e.collapsed ? "" : "rotate-180", F(o).dimTextAlt]]),
|
|
1261
1270
|
fill: "none",
|
|
1262
1271
|
viewBox: "0 0 24 24",
|
|
1263
1272
|
stroke: "currentColor",
|
|
@@ -1267,15 +1276,15 @@ var fn = { class: "flex items-start gap-4 min-w-0" }, pn = { class: "flex-1 min-
|
|
|
1267
1276
|
"stroke-linecap": "round",
|
|
1268
1277
|
"stroke-linejoin": "round",
|
|
1269
1278
|
d: "M19 9l-7 7-7-7"
|
|
1270
|
-
}, null, -1)]], 2))], 10,
|
|
1279
|
+
}, null, -1)]], 2))], 10, Cn), R(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));
|
|
1271
1280
|
}
|
|
1272
|
-
}),
|
|
1281
|
+
}), En = ["disabled"], Dn = ["disabled"], On = {
|
|
1273
1282
|
key: 0,
|
|
1274
1283
|
class: "w-4 h-4 animate-spin",
|
|
1275
1284
|
fill: "none",
|
|
1276
1285
|
viewBox: "0 0 24 24",
|
|
1277
1286
|
"aria-hidden": "true"
|
|
1278
|
-
},
|
|
1287
|
+
}, kn = /* @__PURE__ */ m({
|
|
1279
1288
|
__name: "BaseConfirmModal",
|
|
1280
1289
|
props: {
|
|
1281
1290
|
title: {},
|
|
@@ -1291,16 +1300,16 @@ var fn = { class: "flex items-start gap-4 min-w-0" }, pn = { class: "flex-1 min-
|
|
|
1291
1300
|
},
|
|
1292
1301
|
emits: ["confirm", "cancel"],
|
|
1293
1302
|
setup(e, { emit: t }) {
|
|
1294
|
-
let n = e, r = t, { isDark: i } =
|
|
1303
|
+
let n = e, r = t, { isDark: i } = U(), a = X();
|
|
1295
1304
|
function u() {
|
|
1296
1305
|
n.submitting || r("confirm");
|
|
1297
1306
|
}
|
|
1298
1307
|
function d() {
|
|
1299
1308
|
n.submitting || r("cancel");
|
|
1300
1309
|
}
|
|
1301
|
-
return (t, n) => (
|
|
1310
|
+
return (t, n) => (D(), o(Sn, {
|
|
1302
1311
|
title: e.title,
|
|
1303
|
-
icon: F(
|
|
1312
|
+
icon: F(Ce),
|
|
1304
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",
|
|
1305
1314
|
"icon-class": e.variant === "danger" ? "text-red-600" : "text-amber-600",
|
|
1306
1315
|
"manual-close": e.submitting,
|
|
@@ -1309,14 +1318,14 @@ var fn = { class: "flex items-start gap-4 min-w-0" }, pn = { class: "flex-1 min-
|
|
|
1309
1318
|
footer: L(() => [l("button", {
|
|
1310
1319
|
type: "button",
|
|
1311
1320
|
disabled: e.submitting,
|
|
1312
|
-
class:
|
|
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"]]),
|
|
1313
1322
|
onClick: d
|
|
1314
|
-
}, P(e.cancelText), 11,
|
|
1323
|
+
}, P(e.cancelText), 11, En), l("button", {
|
|
1315
1324
|
type: "button",
|
|
1316
1325
|
disabled: e.submitting,
|
|
1317
|
-
class:
|
|
1326
|
+
class: b(["inline-flex items-center justify-center gap-2 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-offset-2", [e.variant === "danger" ? "focus-visible:ring-red-500" : "focus-visible:ring-emerald-500", e.variant === "danger" ? e.submitting ? "bg-red-400 cursor-not-allowed" : "bg-red-600 hover:bg-red-700 cursor-pointer" : e.submitting ? "bg-emerald-400 cursor-not-allowed" : "bg-emerald-600 hover:bg-emerald-700 cursor-pointer"]]),
|
|
1318
1327
|
onClick: u
|
|
1319
|
-
}, [e.submitting ? (
|
|
1328
|
+
}, [e.submitting ? (D(), c("svg", On, [...n[0] ||= [l("circle", {
|
|
1320
1329
|
class: "opacity-25",
|
|
1321
1330
|
cx: "12",
|
|
1322
1331
|
cy: "12",
|
|
@@ -1327,8 +1336,8 @@ var fn = { class: "flex items-start gap-4 min-w-0" }, pn = { class: "flex-1 min-
|
|
|
1327
1336
|
class: "opacity-75",
|
|
1328
1337
|
fill: "currentColor",
|
|
1329
1338
|
d: "M4 12a8 8 0 018-8v4a4 4 0 00-4 4H4z"
|
|
1330
|
-
}, null, -1)]])) : s("", !0), f(" " + P(e.submitting ? e.submittingText : e.confirmText), 1)], 10,
|
|
1331
|
-
default: L(() => [j(t.$slots, "message", {}, () => [l("p", { class:
|
|
1339
|
+
}, null, -1)]])) : s("", !0), f(" " + P(e.submitting ? e.submittingText : e.confirmText), 1)], 10, Dn)]),
|
|
1340
|
+
default: L(() => [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")]),
|
|
1332
1341
|
_: 3
|
|
1333
1342
|
}, 8, [
|
|
1334
1343
|
"title",
|
|
@@ -1338,7 +1347,7 @@ var fn = { class: "flex items-start gap-4 min-w-0" }, pn = { class: "flex-1 min-
|
|
|
1338
1347
|
"manual-close"
|
|
1339
1348
|
]));
|
|
1340
1349
|
}
|
|
1341
|
-
}),
|
|
1350
|
+
}), An = { class: "mt-4" }, jn = ["placeholder"], Mn = ["disabled"], Nn = /* @__PURE__ */ m({
|
|
1342
1351
|
__name: "BaseTextInputModal",
|
|
1343
1352
|
props: {
|
|
1344
1353
|
title: {},
|
|
@@ -1356,9 +1365,9 @@ var fn = { class: "flex items-start gap-4 min-w-0" }, pn = { class: "flex-1 min-
|
|
|
1356
1365
|
},
|
|
1357
1366
|
emits: ["confirm", "cancel"],
|
|
1358
1367
|
setup(e, { emit: t }) {
|
|
1359
|
-
let n = e, r = t, { isDark: i } =
|
|
1360
|
-
|
|
1361
|
-
await
|
|
1368
|
+
let n = e, r = t, { isDark: i } = U(), a = X(), s = k(n.initialValue), c = k(null);
|
|
1369
|
+
w(async () => {
|
|
1370
|
+
await y(), c.value?.focus();
|
|
1362
1371
|
});
|
|
1363
1372
|
function d() {
|
|
1364
1373
|
s.value.trim() && !n.submitting && r("confirm", s.value.trim());
|
|
@@ -1369,31 +1378,31 @@ var fn = { class: "flex items-start gap-4 min-w-0" }, pn = { class: "flex-1 min-
|
|
|
1369
1378
|
function p() {
|
|
1370
1379
|
s.value.trim() === (n.initialValue ?? "").trim() && f();
|
|
1371
1380
|
}
|
|
1372
|
-
return
|
|
1381
|
+
return pn(f), (t, n) => (D(), o(Sn, {
|
|
1373
1382
|
title: e.title,
|
|
1374
|
-
icon: F(
|
|
1383
|
+
icon: F(xe),
|
|
1375
1384
|
"manual-close": "",
|
|
1376
1385
|
onBackdrop: p
|
|
1377
1386
|
}, u({
|
|
1378
1387
|
footer: L(() => [l("button", {
|
|
1379
1388
|
type: "button",
|
|
1380
|
-
class:
|
|
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]),
|
|
1381
1390
|
onClick: f
|
|
1382
1391
|
}, P(e.cancelText), 3), l("button", {
|
|
1383
1392
|
type: "button",
|
|
1384
1393
|
disabled: !s.value.trim() || e.submitting,
|
|
1385
|
-
class:
|
|
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"]]),
|
|
1386
1395
|
onClick: d
|
|
1387
|
-
}, P(e.submitting ? e.submittingText : e.confirmText), 11,
|
|
1388
|
-
default: L(() => [l("p", { class:
|
|
1396
|
+
}, P(e.submitting ? e.submittingText : e.confirmText), 11, Mn)]),
|
|
1397
|
+
default: L(() => [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), R(l("input", {
|
|
1389
1398
|
ref_key: "nameInput",
|
|
1390
1399
|
ref: c,
|
|
1391
1400
|
"onUpdate:modelValue": n[0] ||= (e) => s.value = e,
|
|
1392
1401
|
type: "text",
|
|
1393
1402
|
placeholder: e.placeholder,
|
|
1394
|
-
class:
|
|
1395
|
-
onKeyup:
|
|
1396
|
-
}, null, 42,
|
|
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: se(d, ["enter"])
|
|
1405
|
+
}, null, 42, jn), [[ae, s.value]])])]),
|
|
1397
1406
|
_: 2
|
|
1398
1407
|
}, [t.$slots.icon ? {
|
|
1399
1408
|
name: "icon",
|
|
@@ -1401,7 +1410,7 @@ var fn = { class: "flex items-start gap-4 min-w-0" }, pn = { class: "flex-1 min-
|
|
|
1401
1410
|
key: "0"
|
|
1402
1411
|
} : void 0]), 1032, ["title", "icon"]));
|
|
1403
1412
|
}
|
|
1404
|
-
}),
|
|
1413
|
+
}), Pn = { class: "flex items-center justify-center min-h-[60vh]" }, Fn = { class: "text-center px-6" }, In = /* @__PURE__ */ m({
|
|
1405
1414
|
__name: "BaseNotFoundPage",
|
|
1406
1415
|
props: {
|
|
1407
1416
|
code: { default: "404" },
|
|
@@ -1410,33 +1419,33 @@ var fn = { class: "flex items-start gap-4 min-w-0" }, pn = { class: "flex-1 min-
|
|
|
1410
1419
|
homeLabel: { default: "Go home" }
|
|
1411
1420
|
},
|
|
1412
1421
|
setup(e) {
|
|
1413
|
-
let t = e, n =
|
|
1422
|
+
let t = e, n = Pe(), { isDark: r } = U(), i = X();
|
|
1414
1423
|
function a() {
|
|
1415
1424
|
n.push({ name: t.homeRouteName });
|
|
1416
1425
|
}
|
|
1417
|
-
return (t, n) => (
|
|
1418
|
-
p(F(
|
|
1419
|
-
l("h1", { class:
|
|
1420
|
-
l("p", { class:
|
|
1426
|
+
return (t, n) => (D(), c("div", Pn, [l("div", Fn, [
|
|
1427
|
+
p(F(Ce), { class: b(["w-16 h-16 mx-auto mb-4", F(i).illustration]) }, null, 8, ["class"]),
|
|
1428
|
+
l("h1", { class: b(["text-4xl font-bold mb-2", F(r) ? "text-gray-200" : "text-gray-800"]) }, P(e.code), 3),
|
|
1429
|
+
l("p", { class: b(["text-lg mb-6", F(i).dimTextAlt]) }, P(e.message), 3),
|
|
1421
1430
|
l("button", {
|
|
1422
1431
|
onClick: a,
|
|
1423
|
-
class:
|
|
1432
|
+
class: b(["inline-flex items-center gap-2 px-4 py-2 rounded-lg text-sm font-medium text-white transition-colors cursor-pointer focus:outline-none focus-visible:ring-2 focus-visible:ring-emerald-500 focus-visible:ring-offset-2", F(r) ? "bg-emerald-600 hover:bg-emerald-500" : "bg-emerald-600 hover:bg-emerald-700"])
|
|
1424
1433
|
}, P(e.homeLabel), 3)
|
|
1425
1434
|
])]));
|
|
1426
1435
|
}
|
|
1427
|
-
}),
|
|
1428
|
-
function
|
|
1436
|
+
}), Ln = k(!1);
|
|
1437
|
+
function Rn() {
|
|
1429
1438
|
function e() {
|
|
1430
|
-
|
|
1439
|
+
Ln.value = !0;
|
|
1431
1440
|
}
|
|
1432
1441
|
function t() {
|
|
1433
|
-
|
|
1442
|
+
Ln.value = !1;
|
|
1434
1443
|
}
|
|
1435
1444
|
function n() {
|
|
1436
|
-
|
|
1445
|
+
Ln.value = !Ln.value;
|
|
1437
1446
|
}
|
|
1438
1447
|
return {
|
|
1439
|
-
mobileOpen:
|
|
1448
|
+
mobileOpen: Ln,
|
|
1440
1449
|
open: e,
|
|
1441
1450
|
close: t,
|
|
1442
1451
|
toggle: n
|
|
@@ -1444,30 +1453,30 @@ function In() {
|
|
|
1444
1453
|
}
|
|
1445
1454
|
//#endregion
|
|
1446
1455
|
//#region src/composables/useSidebarCollapse.ts
|
|
1447
|
-
var
|
|
1448
|
-
function
|
|
1449
|
-
if (!
|
|
1450
|
-
let e = window.localStorage?.getItem(
|
|
1451
|
-
e && (
|
|
1452
|
-
I(
|
|
1453
|
-
window.localStorage?.setItem(
|
|
1456
|
+
var Z = k(!1), zn = !1, Bn = "mgv-sidebar-collapsed";
|
|
1457
|
+
function Vn(e) {
|
|
1458
|
+
if (!zn && (zn = !0, Bn = e, typeof window < "u")) {
|
|
1459
|
+
let e = window.localStorage?.getItem(Bn);
|
|
1460
|
+
e && (Z.value = e === "true"), h(!0).run(() => {
|
|
1461
|
+
I(Z, (e) => {
|
|
1462
|
+
window.localStorage?.setItem(Bn, String(e));
|
|
1454
1463
|
});
|
|
1455
1464
|
});
|
|
1456
1465
|
}
|
|
1457
1466
|
}
|
|
1458
|
-
function
|
|
1459
|
-
|
|
1467
|
+
function Hn(e) {
|
|
1468
|
+
Vn(e?.storageKey ?? Bn);
|
|
1460
1469
|
function t() {
|
|
1461
|
-
|
|
1470
|
+
Z.value = !0;
|
|
1462
1471
|
}
|
|
1463
1472
|
function n() {
|
|
1464
|
-
|
|
1473
|
+
Z.value = !1;
|
|
1465
1474
|
}
|
|
1466
1475
|
function r() {
|
|
1467
|
-
|
|
1476
|
+
Z.value = !Z.value;
|
|
1468
1477
|
}
|
|
1469
1478
|
return {
|
|
1470
|
-
collapsed:
|
|
1479
|
+
collapsed: Z,
|
|
1471
1480
|
collapse: t,
|
|
1472
1481
|
expand: n,
|
|
1473
1482
|
toggle: r
|
|
@@ -1475,45 +1484,45 @@ function Bn(e) {
|
|
|
1475
1484
|
}
|
|
1476
1485
|
//#endregion
|
|
1477
1486
|
//#region src/composables/useNotifications.ts
|
|
1478
|
-
var
|
|
1479
|
-
function
|
|
1487
|
+
var Q = k([]), Un = k(!1), Wn = a(() => Q.value.filter((e) => !e.read).length);
|
|
1488
|
+
function Gn() {
|
|
1480
1489
|
function e() {
|
|
1481
|
-
|
|
1490
|
+
Un.value = !0;
|
|
1482
1491
|
}
|
|
1483
1492
|
function t() {
|
|
1484
|
-
|
|
1493
|
+
Un.value = !1;
|
|
1485
1494
|
}
|
|
1486
1495
|
function n() {
|
|
1487
|
-
|
|
1496
|
+
Un.value = !Un.value;
|
|
1488
1497
|
}
|
|
1489
1498
|
function r(e) {
|
|
1490
|
-
|
|
1499
|
+
Q.value = e;
|
|
1491
1500
|
}
|
|
1492
1501
|
function i(e) {
|
|
1493
|
-
|
|
1502
|
+
Q.value = [e, ...Q.value];
|
|
1494
1503
|
}
|
|
1495
1504
|
function a(e) {
|
|
1496
|
-
|
|
1505
|
+
Q.value = Q.value.filter((t) => t.id !== e);
|
|
1497
1506
|
}
|
|
1498
1507
|
function o(e) {
|
|
1499
|
-
|
|
1508
|
+
Q.value = Q.value.map((t) => t.id === e ? {
|
|
1500
1509
|
...t,
|
|
1501
1510
|
read: !0
|
|
1502
1511
|
} : t);
|
|
1503
1512
|
}
|
|
1504
1513
|
function s() {
|
|
1505
|
-
|
|
1514
|
+
Q.value = Q.value.map((e) => e.read ? e : {
|
|
1506
1515
|
...e,
|
|
1507
1516
|
read: !0
|
|
1508
1517
|
});
|
|
1509
1518
|
}
|
|
1510
1519
|
function c() {
|
|
1511
|
-
|
|
1520
|
+
Q.value = [];
|
|
1512
1521
|
}
|
|
1513
1522
|
return {
|
|
1514
|
-
notifications:
|
|
1515
|
-
unreadCount:
|
|
1516
|
-
open:
|
|
1523
|
+
notifications: Q,
|
|
1524
|
+
unreadCount: Wn,
|
|
1525
|
+
open: Un,
|
|
1517
1526
|
openPanel: e,
|
|
1518
1527
|
closePanel: t,
|
|
1519
1528
|
togglePanel: n,
|
|
@@ -1527,22 +1536,22 @@ function Un() {
|
|
|
1527
1536
|
}
|
|
1528
1537
|
//#endregion
|
|
1529
1538
|
//#region src/components/BaseSidebar.vue?vue&type=script&setup=true&lang.ts
|
|
1530
|
-
var
|
|
1539
|
+
var Kn = ["aria-label", "aria-expanded"], qn = { class: "flex flex-col h-full" }, Jn = { class: "flex-1 overflow-y-auto px-3 space-y-6" }, Yn = { class: "space-y-0.5" }, Xn = [
|
|
1531
1540
|
"aria-current",
|
|
1532
1541
|
"title",
|
|
1533
1542
|
"onClick"
|
|
1534
|
-
],
|
|
1543
|
+
], Zn = ["aria-label"], Qn = { class: "relative shrink-0" }, $n = {
|
|
1535
1544
|
key: 0,
|
|
1536
1545
|
class: "absolute -top-1.5 -right-1.5 min-w-4 h-4 px-1 rounded-full bg-red-500 text-white text-[10px] font-semibold leading-4 text-center"
|
|
1537
|
-
},
|
|
1546
|
+
}, er = [
|
|
1538
1547
|
"title",
|
|
1539
1548
|
"aria-label",
|
|
1540
1549
|
"aria-pressed"
|
|
1541
|
-
],
|
|
1550
|
+
], tr = [
|
|
1542
1551
|
"title",
|
|
1543
1552
|
"aria-label",
|
|
1544
1553
|
"aria-pressed"
|
|
1545
|
-
],
|
|
1554
|
+
], nr = /*#__PURE__*/ ((e, t) => {
|
|
1546
1555
|
let n = e.__vccOpts || e;
|
|
1547
1556
|
for (let [e, r] of t) n[e] = r;
|
|
1548
1557
|
return n;
|
|
@@ -1567,41 +1576,41 @@ var Wn = ["aria-label", "aria-expanded"], Gn = { class: "flex flex-col h-full" }
|
|
|
1567
1576
|
}
|
|
1568
1577
|
},
|
|
1569
1578
|
setup(t) {
|
|
1570
|
-
let n = t, r =
|
|
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;
|
|
1571
1580
|
I(m, async (e) => {
|
|
1572
|
-
e ? (T = document.activeElement instanceof HTMLElement ? document.activeElement : null, await
|
|
1581
|
+
e ? (T = document.activeElement instanceof HTMLElement ? document.activeElement : null, await y(), w.value?.focus()) : (T?.focus(), T = null);
|
|
1573
1582
|
});
|
|
1574
|
-
function
|
|
1583
|
+
function E() {
|
|
1575
1584
|
r.push({ name: n.homeRouteName }), h();
|
|
1576
1585
|
}
|
|
1577
1586
|
function O(e) {
|
|
1578
1587
|
return i.name === e;
|
|
1579
1588
|
}
|
|
1580
|
-
function
|
|
1589
|
+
function ee(e) {
|
|
1581
1590
|
r.push({ name: e }), h();
|
|
1582
1591
|
}
|
|
1583
|
-
return (n, r) => (
|
|
1584
|
-
l("div", { class:
|
|
1592
|
+
return (n, r) => (D(), c("div", null, [
|
|
1593
|
+
l("div", { class: b(["mobile-topbar fixed top-0 inset-x-0 z-30 flex items-center justify-between px-4 py-3 border-b transition-colors", F(u) ? "bg-gray-900 border-gray-800" : "bg-white border-gray-200"]) }, [l("button", {
|
|
1585
1594
|
type: "button",
|
|
1586
|
-
onClick:
|
|
1595
|
+
onClick: E,
|
|
1587
1596
|
class: "cursor-pointer rounded focus:outline-none focus-visible:ring-2 focus-visible:ring-emerald-500",
|
|
1588
1597
|
"aria-label": "Go to home"
|
|
1589
1598
|
}, [j(n.$slots, "logo", { size: 28 }, void 0, !0)]), l("button", {
|
|
1590
1599
|
type: "button",
|
|
1591
1600
|
onClick: r[0] ||= (...e) => F(g) && F(g)(...e),
|
|
1592
|
-
class:
|
|
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"]),
|
|
1593
1602
|
"aria-label": F(m) ? "Close navigation menu" : "Open navigation menu",
|
|
1594
1603
|
"aria-expanded": F(m)
|
|
1595
|
-
}, [F(m) ? (
|
|
1604
|
+
}, [F(m) ? (D(), o(F(Ae), {
|
|
1596
1605
|
key: 1,
|
|
1597
1606
|
class: "w-6 h-6",
|
|
1598
1607
|
"aria-hidden": "true"
|
|
1599
|
-
})) : (
|
|
1608
|
+
})) : (D(), o(F(de), {
|
|
1600
1609
|
key: 0,
|
|
1601
1610
|
class: "w-6 h-6",
|
|
1602
1611
|
"aria-hidden": "true"
|
|
1603
|
-
}))], 10,
|
|
1604
|
-
F(m) ? (
|
|
1612
|
+
}))], 10, Kn)], 2),
|
|
1613
|
+
F(m) ? (D(), c("div", {
|
|
1605
1614
|
key: 0,
|
|
1606
1615
|
class: "mobile-overlay fixed inset-0 z-40 bg-black/50",
|
|
1607
1616
|
"aria-hidden": "true",
|
|
@@ -1610,15 +1619,15 @@ var Wn = ["aria-label", "aria-expanded"], Gn = { class: "flex flex-col h-full" }
|
|
|
1610
1619
|
l("aside", {
|
|
1611
1620
|
role: "navigation",
|
|
1612
1621
|
"aria-label": "Main navigation",
|
|
1613
|
-
class:
|
|
1622
|
+
class: b(["fixed top-0 left-0 h-screen w-60 flex flex-col border-r transition-all duration-300 lg:pointer-events-auto", [
|
|
1614
1623
|
F(u) ? "bg-gray-900 border-gray-800" : "bg-white border-gray-200",
|
|
1615
1624
|
F(m) ? "translate-x-0 z-50" : "-translate-x-full max-lg:pointer-events-none lg:translate-x-0 z-50",
|
|
1616
1625
|
t.collapsible && F(_) ? "lg:w-16" : "lg:w-60"
|
|
1617
1626
|
]])
|
|
1618
|
-
}, [l("div",
|
|
1619
|
-
l("div", { class:
|
|
1627
|
+
}, [l("div", qn, [
|
|
1628
|
+
l("div", { class: b(["px-5 pt-5 pb-4 flex items-center justify-center relative", { "lg:px-2": C.value }]) }, [l("button", {
|
|
1620
1629
|
type: "button",
|
|
1621
|
-
onClick:
|
|
1630
|
+
onClick: E,
|
|
1622
1631
|
class: "cursor-pointer rounded focus:outline-none focus-visible:ring-2 focus-visible:ring-emerald-500",
|
|
1623
1632
|
"aria-label": "Go to home"
|
|
1624
1633
|
}, [j(n.$slots, "logo", { size: C.value ? 36 : 52 }, void 0, !0)]), l("button", {
|
|
@@ -1626,92 +1635,92 @@ var Wn = ["aria-label", "aria-expanded"], Gn = { class: "flex flex-col h-full" }
|
|
|
1626
1635
|
ref: w,
|
|
1627
1636
|
type: "button",
|
|
1628
1637
|
onClick: r[2] ||= (...e) => F(h) && F(h)(...e),
|
|
1629
|
-
class:
|
|
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"]),
|
|
1630
1639
|
"aria-label": "Close navigation menu"
|
|
1631
|
-
}, [p(F(
|
|
1640
|
+
}, [p(F(Ae), {
|
|
1632
1641
|
class: "w-5 h-5",
|
|
1633
1642
|
"aria-hidden": "true"
|
|
1634
1643
|
})], 2)], 2),
|
|
1635
|
-
l("nav",
|
|
1644
|
+
l("nav", Jn, [(D(!0), c(e, null, A(t.sections, (t) => (D(), c("div", { key: t.title }, [l("p", { class: b(["px-2 mb-2 text-[10px] font-semibold uppercase tracking-wider text-gray-500", { "lg:hidden": C.value }]) }, P(t.title), 3), l("ul", Yn, [(D(!0), c(e, null, A(t.items, (e) => (D(), c("li", { key: e.name }, [l("button", {
|
|
1636
1645
|
type: "button",
|
|
1637
1646
|
"aria-current": O(e.name) ? "page" : void 0,
|
|
1638
1647
|
title: C.value ? e.label : void 0,
|
|
1639
|
-
onClick: (t) =>
|
|
1640
|
-
class:
|
|
1641
|
-
}, [(
|
|
1642
|
-
l("div", { class:
|
|
1643
|
-
t.showNotifications ? (
|
|
1648
|
+
onClick: (t) => ee(e.name),
|
|
1649
|
+
class: b(["flex items-center gap-3 px-3 py-2.5 rounded-lg text-sm font-medium transition-colors w-full text-left cursor-pointer focus:outline-none focus-visible:ring-2 focus-visible:ring-emerald-500", [O(e.name) ? F(u) ? "bg-emerald-500/15 text-emerald-300" : "bg-emerald-50 text-emerald-700" : 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 }]])
|
|
1650
|
+
}, [(D(), o(N(e.icon), { class: "w-[18px] h-[18px] shrink-0" })), l("span", { class: b({ "lg:hidden": C.value }) }, P(e.label), 3)], 10, Xn)]))), 128))])]))), 128))]),
|
|
1651
|
+
l("div", { class: b(["px-4 py-4 border-t transition-colors space-y-3", F(u) ? "border-gray-800" : "border-gray-200"]) }, [
|
|
1652
|
+
t.showNotifications ? (D(), c("button", {
|
|
1644
1653
|
key: 0,
|
|
1645
1654
|
type: "button",
|
|
1646
1655
|
onClick: r[3] ||= (...e) => F(S) && F(S)(...e),
|
|
1647
1656
|
title: "Notifications",
|
|
1648
1657
|
"aria-label": F(x) > 0 ? `Notifications, ${F(x)} unread` : "Notifications",
|
|
1649
|
-
class:
|
|
1650
|
-
}, [l("span",
|
|
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(fe), {
|
|
1651
1660
|
class: "w-[18px] h-[18px]",
|
|
1652
1661
|
"aria-hidden": "true"
|
|
1653
|
-
}), F(x) > 0 ? (
|
|
1654
|
-
t.showThemeToggle ? (
|
|
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),
|
|
1663
|
+
t.showThemeToggle ? (D(), c("button", {
|
|
1655
1664
|
key: 1,
|
|
1656
1665
|
type: "button",
|
|
1657
1666
|
onClick: r[4] ||= (...e) => F(d) && F(d)(...e),
|
|
1658
1667
|
title: F(u) ? "Switch to light mode" : "Switch to dark mode",
|
|
1659
1668
|
"aria-label": F(u) ? "Switch to light mode" : "Switch to dark mode",
|
|
1660
1669
|
"aria-pressed": F(u),
|
|
1661
|
-
class:
|
|
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 }]])
|
|
1662
1671
|
}, [
|
|
1663
|
-
(
|
|
1664
|
-
class:
|
|
1672
|
+
(D(), o(N(F(u) ? F(ke) : F(Oe)), {
|
|
1673
|
+
class: b(["hidden w-[18px] h-[18px] shrink-0", { "lg:block": C.value }]),
|
|
1665
1674
|
"aria-hidden": "true"
|
|
1666
1675
|
}, null, 8, ["class"])),
|
|
1667
|
-
l("span", { class:
|
|
1668
|
-
l("span", { class:
|
|
1669
|
-
], 10,
|
|
1670
|
-
t.collapsible ? (
|
|
1676
|
+
l("span", { class: b({ "lg:hidden": C.value }) }, P(F(u) ? "Switch to light" : "Switch to dark"), 3),
|
|
1677
|
+
l("span", { class: b(["ml-auto relative w-9 h-5 rounded-full transition-colors", [F(u) ? "bg-emerald-600" : "bg-gray-300", { "lg:hidden": C.value }]]) }, [l("span", { class: b(["absolute top-0.5 left-0.5 w-4 h-4 rounded-full bg-white shadow-sm transition-transform duration-300", F(u) ? "translate-x-4" : "translate-x-0"]) }, null, 2)], 2)
|
|
1678
|
+
], 10, er)) : s("", !0),
|
|
1679
|
+
t.collapsible ? (D(), c("button", {
|
|
1671
1680
|
key: 2,
|
|
1672
1681
|
type: "button",
|
|
1673
|
-
onClick: r[5] ||= (...e) => F(
|
|
1682
|
+
onClick: r[5] ||= (...e) => F(v) && F(v)(...e),
|
|
1674
1683
|
title: F(_) ? "Expand sidebar" : "Collapse sidebar",
|
|
1675
1684
|
"aria-label": F(_) ? "Expand sidebar" : "Collapse sidebar",
|
|
1676
1685
|
"aria-pressed": F(_),
|
|
1677
|
-
class:
|
|
1678
|
-
}, [(
|
|
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(ge) : F(he)), {
|
|
1679
1688
|
class: "w-[18px] h-[18px] shrink-0",
|
|
1680
1689
|
"aria-hidden": "true"
|
|
1681
|
-
})), l("span", { class:
|
|
1682
|
-
l("div", { class:
|
|
1683
|
-
l("div", { class:
|
|
1690
|
+
})), l("span", { class: b({ "lg:hidden": C.value }) }, "Collapse", 2)], 10, tr)) : s("", !0),
|
|
1691
|
+
l("div", { class: b({ "lg:hidden": C.value }) }, [j(n.$slots, "status", {}, void 0, !0)], 2),
|
|
1692
|
+
l("div", { class: b({ "lg:hidden": C.value }) }, [j(n.$slots, "footer", {}, () => [t.appName || t.version ? (D(), c("div", {
|
|
1684
1693
|
key: 0,
|
|
1685
|
-
class:
|
|
1694
|
+
class: b(["flex items-center justify-center gap-2 text-xs", (F(u), "text-gray-500")])
|
|
1686
1695
|
}, [l("span", null, [
|
|
1687
1696
|
f(P(t.appName), 1),
|
|
1688
|
-
t.appName && t.version ? (
|
|
1689
|
-
t.version ? (
|
|
1697
|
+
t.appName && t.version ? (D(), c(e, { key: 0 }, [f(P(" "))], 64)) : s("", !0),
|
|
1698
|
+
t.version ? (D(), c(e, { key: 1 }, [f("v" + P(t.version), 1)], 64)) : s("", !0)
|
|
1690
1699
|
])], 2)) : s("", !0)], !0)], 2)
|
|
1691
1700
|
], 2)
|
|
1692
1701
|
])], 2)
|
|
1693
1702
|
]));
|
|
1694
1703
|
}
|
|
1695
|
-
}), [["__scopeId", "data-v-bfce9dd7"]]),
|
|
1704
|
+
}), [["__scopeId", "data-v-bfce9dd7"]]), rr = {
|
|
1696
1705
|
key: 1,
|
|
1697
1706
|
class: "mt-4 flex justify-center py-6"
|
|
1698
|
-
},
|
|
1707
|
+
}, ir = {
|
|
1699
1708
|
key: 2,
|
|
1700
1709
|
class: "mt-4 text-sm text-red-500",
|
|
1701
1710
|
role: "alert"
|
|
1702
|
-
},
|
|
1711
|
+
}, ar = {
|
|
1703
1712
|
key: 3,
|
|
1704
1713
|
class: "mt-4"
|
|
1705
|
-
},
|
|
1714
|
+
}, or = { class: "relative" }, sr = ["placeholder"], cr = {
|
|
1706
1715
|
key: 4,
|
|
1707
1716
|
class: "mt-3 max-h-64 overflow-y-auto"
|
|
1708
|
-
},
|
|
1717
|
+
}, lr = ["aria-pressed", "onClick"], ur = { class: "flex-1 min-w-0" }, dr = {
|
|
1709
1718
|
key: 0,
|
|
1710
1719
|
class: "text-center py-6"
|
|
1711
|
-
},
|
|
1720
|
+
}, fr = {
|
|
1712
1721
|
key: 1,
|
|
1713
1722
|
class: "text-center py-6"
|
|
1714
|
-
},
|
|
1723
|
+
}, pr = ["disabled"], mr = ["disabled"], hr = /* @__PURE__ */ m({
|
|
1715
1724
|
__name: "BaseEntityPickerModal",
|
|
1716
1725
|
props: {
|
|
1717
1726
|
title: {},
|
|
@@ -1733,10 +1742,10 @@ var Wn = ["aria-label", "aria-expanded"], Gn = { class: "flex flex-col h-full" }
|
|
|
1733
1742
|
},
|
|
1734
1743
|
emits: ["confirm", "cancel"],
|
|
1735
1744
|
setup(t, { emit: n }) {
|
|
1736
|
-
let r = t, i = n, { isDark: d } =
|
|
1745
|
+
let r = t, i = n, { isDark: d } = U(), f = X(), m = k([]), h = k(!1), g = k(""), _ = k(null), v = k(""), x = k(null), S = a(() => {
|
|
1737
1746
|
let e = r.loader ? m.value : r.items;
|
|
1738
1747
|
return r.excludeId ? e.filter((e) => e.id !== r.excludeId) : e;
|
|
1739
|
-
}),
|
|
1748
|
+
}), C = a(() => S.value.filter((e) => e.label.toLowerCase().includes(v.value.toLowerCase()))), T = {
|
|
1740
1749
|
emerald: {
|
|
1741
1750
|
iconBg: "bg-emerald-50",
|
|
1742
1751
|
iconText: "text-emerald-600",
|
|
@@ -1782,7 +1791,7 @@ var Wn = ["aria-label", "aria-expanded"], Gn = { class: "flex flex-col h-full" }
|
|
|
1782
1791
|
confirmActive: "bg-amber-600 hover:bg-amber-700 cursor-pointer",
|
|
1783
1792
|
confirmDisabled: "bg-amber-400 cursor-not-allowed"
|
|
1784
1793
|
}
|
|
1785
|
-
},
|
|
1794
|
+
}, E = {
|
|
1786
1795
|
emerald: {
|
|
1787
1796
|
iconBg: "bg-emerald-900/30",
|
|
1788
1797
|
iconText: "text-emerald-400",
|
|
@@ -1828,8 +1837,8 @@ var Wn = ["aria-label", "aria-expanded"], Gn = { class: "flex flex-col h-full" }
|
|
|
1828
1837
|
confirmActive: "bg-amber-600 hover:bg-amber-700 cursor-pointer",
|
|
1829
1838
|
confirmDisabled: "bg-amber-400 cursor-not-allowed"
|
|
1830
1839
|
}
|
|
1831
|
-
}, O = a(() => (d.value ?
|
|
1832
|
-
|
|
1840
|
+
}, O = a(() => (d.value ? E : T)[r.variant]);
|
|
1841
|
+
w(async () => {
|
|
1833
1842
|
if (r.loader) {
|
|
1834
1843
|
h.value = !0;
|
|
1835
1844
|
try {
|
|
@@ -1840,62 +1849,62 @@ var Wn = ["aria-label", "aria-expanded"], Gn = { class: "flex flex-col h-full" }
|
|
|
1840
1849
|
h.value = !1;
|
|
1841
1850
|
}
|
|
1842
1851
|
}
|
|
1843
|
-
await
|
|
1852
|
+
await y(), x.value?.focus();
|
|
1844
1853
|
});
|
|
1845
|
-
function
|
|
1854
|
+
function ee() {
|
|
1846
1855
|
_.value && !r.submitting && i("confirm", _.value);
|
|
1847
1856
|
}
|
|
1848
|
-
function
|
|
1857
|
+
function M() {
|
|
1849
1858
|
r.submitting || i("cancel");
|
|
1850
1859
|
}
|
|
1851
|
-
return (n, r) => (
|
|
1860
|
+
return (n, r) => (D(), o(Sn, {
|
|
1852
1861
|
title: t.title,
|
|
1853
|
-
icon: F(
|
|
1862
|
+
icon: F(we),
|
|
1854
1863
|
"icon-bg-class": O.value.iconBg,
|
|
1855
1864
|
"icon-class": O.value.iconText,
|
|
1856
1865
|
"manual-close": t.submitting,
|
|
1857
|
-
onCancel:
|
|
1866
|
+
onCancel: M
|
|
1858
1867
|
}, u({
|
|
1859
1868
|
footer: L(() => [l("button", {
|
|
1860
1869
|
type: "button",
|
|
1861
1870
|
disabled: t.submitting,
|
|
1862
|
-
class:
|
|
1863
|
-
onClick:
|
|
1864
|
-
}, P(t.cancelText), 11,
|
|
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]),
|
|
1872
|
+
onClick: M
|
|
1873
|
+
}, P(t.cancelText), 11, pr), l("button", {
|
|
1865
1874
|
type: "button",
|
|
1866
1875
|
disabled: !_.value || t.submitting,
|
|
1867
|
-
class:
|
|
1868
|
-
onClick:
|
|
1869
|
-
}, P(t.submitting ? t.submittingText : t.confirmText), 11,
|
|
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
|
+
onClick: ee
|
|
1878
|
+
}, P(t.submitting ? t.submittingText : t.confirmText), 11, mr)]),
|
|
1870
1879
|
default: L(() => [
|
|
1871
|
-
t.message ? (
|
|
1880
|
+
t.message ? (D(), c("p", {
|
|
1872
1881
|
key: 0,
|
|
1873
|
-
class:
|
|
1882
|
+
class: b(["text-sm", F(d) ? "text-gray-300" : "text-gray-600"])
|
|
1874
1883
|
}, P(t.message), 3)) : s("", !0),
|
|
1875
|
-
h.value ? (
|
|
1876
|
-
!h.value && !g.value && S.value.length > 0 ? (
|
|
1877
|
-
class:
|
|
1884
|
+
h.value ? (D(), c("div", rr, [p(Ht, { 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(Ee), {
|
|
1886
|
+
class: b(["absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4", F(f).dimText]),
|
|
1878
1887
|
"aria-hidden": "true"
|
|
1879
1888
|
}, null, 8, ["class"]), R(l("input", {
|
|
1880
1889
|
ref_key: "searchInputRef",
|
|
1881
1890
|
ref: x,
|
|
1882
|
-
"onUpdate:modelValue": r[0] ||= (e) =>
|
|
1891
|
+
"onUpdate:modelValue": r[0] ||= (e) => v.value = e,
|
|
1883
1892
|
type: "text",
|
|
1884
1893
|
placeholder: t.searchPlaceholder,
|
|
1885
|
-
class:
|
|
1886
|
-
}, null, 10,
|
|
1887
|
-
!h.value && !g.value ? (
|
|
1894
|
+
class: b(["w-full pl-9 pr-3 py-2 text-sm rounded-md border outline-none transition-colors", [F(d) ? "bg-gray-800 border-gray-600 text-gray-200 placeholder-gray-500" : "bg-white border-gray-300 text-gray-700 placeholder-gray-400", O.value.inputFocus]])
|
|
1895
|
+
}, null, 10, sr), [[ae, v.value]])])])) : s("", !0),
|
|
1896
|
+
!h.value && !g.value ? (D(), c("div", cr, [(D(!0), c(e, null, A(C.value, (e) => (D(), c("button", {
|
|
1888
1897
|
key: e.id,
|
|
1889
1898
|
type: "button",
|
|
1890
1899
|
"aria-pressed": _.value === e.id,
|
|
1891
|
-
class:
|
|
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"]]),
|
|
1892
1901
|
onClick: (t) => _.value = e.id
|
|
1893
1902
|
}, [
|
|
1894
|
-
p(F(
|
|
1895
|
-
l("div",
|
|
1896
|
-
_.value === e.id ? (
|
|
1903
|
+
p(F(we), { class: b(["w-5 h-5 flex-shrink-0", F(f).dimText]) }, null, 8, ["class"]),
|
|
1904
|
+
l("div", ur, [l("p", { class: b(["text-sm font-medium truncate", F(f).bodyText]) }, P(e.label), 3)]),
|
|
1905
|
+
_.value === e.id ? (D(), c("div", {
|
|
1897
1906
|
key: 0,
|
|
1898
|
-
class:
|
|
1907
|
+
class: b(["w-5 h-5 rounded-full flex items-center justify-center", O.value.checkBg])
|
|
1899
1908
|
}, [...r[1] ||= [l("svg", {
|
|
1900
1909
|
class: "w-3 h-3 text-white",
|
|
1901
1910
|
fill: "none",
|
|
@@ -1908,7 +1917,7 @@ var Wn = ["aria-label", "aria-expanded"], Gn = { class: "flex flex-col h-full" }
|
|
|
1908
1917
|
"stroke-linejoin": "round",
|
|
1909
1918
|
d: "M5 13l4 4L19 7"
|
|
1910
1919
|
})], -1)]], 2)) : s("", !0)
|
|
1911
|
-
], 10,
|
|
1920
|
+
], 10, lr))), 128)), S.value.length === 0 ? (D(), c("div", dr, [l("p", { class: b(["text-sm", F(f).dimText]) }, P(t.emptyMessage), 3)])) : C.value.length === 0 ? (D(), c("div", fr, [l("p", { class: b(["text-sm", F(f).dimText]) }, P(t.noMatchMessage), 3)])) : s("", !0)])) : s("", !0)
|
|
1912
1921
|
]),
|
|
1913
1922
|
_: 2
|
|
1914
1923
|
}, [n.$slots.icon ? {
|
|
@@ -1923,10 +1932,10 @@ var Wn = ["aria-label", "aria-expanded"], Gn = { class: "flex flex-col h-full" }
|
|
|
1923
1932
|
"manual-close"
|
|
1924
1933
|
]));
|
|
1925
1934
|
}
|
|
1926
|
-
}),
|
|
1935
|
+
}), gr = {
|
|
1927
1936
|
href: "#main-content",
|
|
1928
1937
|
class: "sr-only focus:not-sr-only focus:fixed focus:top-2 focus:left-2 focus:z-[100] focus:px-3 focus:py-2 focus:rounded-md focus:bg-emerald-600 focus:text-white focus:shadow-lg"
|
|
1929
|
-
},
|
|
1938
|
+
}, _r = ["inert"], vr = /* @__PURE__ */ m({
|
|
1930
1939
|
__name: "BaseAppLayout",
|
|
1931
1940
|
props: {
|
|
1932
1941
|
showSidebar: {
|
|
@@ -1936,23 +1945,23 @@ var Wn = ["aria-label", "aria-expanded"], Gn = { class: "flex flex-col h-full" }
|
|
|
1936
1945
|
skipLinkLabel: { default: "Skip to main content" }
|
|
1937
1946
|
},
|
|
1938
1947
|
setup(e) {
|
|
1939
|
-
let t = e, { isDark: n } =
|
|
1940
|
-
return (t, a) => (
|
|
1941
|
-
l("a",
|
|
1948
|
+
let t = e, { isDark: n } = U(), { mobileOpen: r } = Rn(), { collapsed: i } = Hn(), o = a(() => t.showSidebar);
|
|
1949
|
+
return (t, a) => (D(), c("div", { class: b(["min-h-screen transition-colors duration-300", F(n) ? "bg-gray-950 text-gray-100" : "bg-gray-50 text-gray-800"]) }, [
|
|
1950
|
+
l("a", gr, P(e.skipLinkLabel), 1),
|
|
1942
1951
|
o.value ? j(t.$slots, "sidebar", {}, void 0, void 0, 0) : s("", !0),
|
|
1943
1952
|
l("main", {
|
|
1944
1953
|
id: "main-content",
|
|
1945
1954
|
tabindex: "-1",
|
|
1946
1955
|
inert: o.value && F(r) ? !0 : void 0,
|
|
1947
|
-
class:
|
|
1948
|
-
}, [j(t.$slots, "default")], 10,
|
|
1956
|
+
class: b(["transition-all duration-300", o.value ? F(i) ? "pt-14 lg:pt-0 lg:ml-16" : "pt-14 lg:pt-0 lg:ml-60" : ""])
|
|
1957
|
+
}, [j(t.$slots, "default")], 10, _r)
|
|
1949
1958
|
], 2));
|
|
1950
1959
|
}
|
|
1951
|
-
}),
|
|
1960
|
+
}), yr = { class: "flex items-center gap-3 min-w-0" }, br = {
|
|
1952
1961
|
key: 0,
|
|
1953
1962
|
class: "absolute left-0 top-[0.14em] h-[1.1em] w-1 rounded-full bg-gradient-to-b from-emerald-400 to-emerald-600",
|
|
1954
1963
|
"aria-hidden": "true"
|
|
1955
|
-
},
|
|
1964
|
+
}, xr = { class: "flex items-center gap-2" }, Sr = /* @__PURE__ */ m({
|
|
1956
1965
|
__name: "BasePageHeader",
|
|
1957
1966
|
props: {
|
|
1958
1967
|
title: {},
|
|
@@ -1967,7 +1976,7 @@ var Wn = ["aria-label", "aria-expanded"], Gn = { class: "flex flex-col h-full" }
|
|
|
1967
1976
|
}
|
|
1968
1977
|
},
|
|
1969
1978
|
setup(e) {
|
|
1970
|
-
let t = e, { isDark: n } =
|
|
1979
|
+
let t = e, { isDark: n } = U(), r = X(), i = a(() => {
|
|
1971
1980
|
let e = {
|
|
1972
1981
|
emerald: {
|
|
1973
1982
|
dark: "bg-emerald-500/10",
|
|
@@ -2008,19 +2017,19 @@ var Wn = ["aria-label", "aria-expanded"], Gn = { class: "flex flex-col h-full" }
|
|
|
2008
2017
|
}[t.iconColor];
|
|
2009
2018
|
return n.value ? e.dark : e.light;
|
|
2010
2019
|
});
|
|
2011
|
-
return (t, n) => (
|
|
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", {
|
|
2012
2021
|
key: 0,
|
|
2013
|
-
class:
|
|
2014
|
-
}, [j(t.$slots, "icon", { iconClass: o.value })], 2)) : s("", !0), l("div", null, [l("h1", { class:
|
|
2022
|
+
class: b(["w-10 h-10 rounded-lg flex items-center justify-center", i.value])
|
|
2023
|
+
}, [j(t.$slots, "icon", { iconClass: o.value })], 2)) : s("", !0), l("div", null, [l("h1", { class: b(["text-2xl font-bold", [F(r).primaryTextSoft, e.accent ? "relative pl-3.5 tracking-tight" : ""]]) }, [e.accent ? (D(), c("span", br)) : s("", !0), f(" " + P(e.title), 1)], 2), e.subtitle || t.$slots.subtitle ? (D(), c("p", {
|
|
2015
2024
|
key: 0,
|
|
2016
|
-
class:
|
|
2017
|
-
}, [j(t.$slots, "subtitle", {}, () => [f(P(e.subtitle), 1)])], 2)) : s("", !0)])]), l("div",
|
|
2025
|
+
class: b(["max-w-[72ch] text-sm", F(r).dimTextAlt])
|
|
2026
|
+
}, [j(t.$slots, "subtitle", {}, () => [f(P(e.subtitle), 1)])], 2)) : s("", !0)])]), l("div", xr, [j(t.$slots, "actions")])], 2)], 2));
|
|
2018
2027
|
}
|
|
2019
|
-
}),
|
|
2028
|
+
}), Cr = [
|
|
2020
2029
|
"type",
|
|
2021
2030
|
"disabled",
|
|
2022
2031
|
"title"
|
|
2023
|
-
],
|
|
2032
|
+
], wr = { key: 0 }, Tr = /* @__PURE__ */ m({
|
|
2024
2033
|
__name: "BaseToolbarButton",
|
|
2025
2034
|
props: {
|
|
2026
2035
|
label: { default: "" },
|
|
@@ -2034,7 +2043,7 @@ var Wn = ["aria-label", "aria-expanded"], Gn = { class: "flex flex-col h-full" }
|
|
|
2034
2043
|
},
|
|
2035
2044
|
emits: ["click"],
|
|
2036
2045
|
setup(e) {
|
|
2037
|
-
let t = e, { isDark: n } =
|
|
2046
|
+
let t = e, { isDark: n } = U(), r = {
|
|
2038
2047
|
neutral: "px-3 py-2 rounded-lg font-medium disabled:opacity-50",
|
|
2039
2048
|
danger: "px-3 py-2 rounded-lg font-medium disabled:opacity-50",
|
|
2040
2049
|
ghost: "h-9 px-4 rounded-md font-semibold disabled:opacity-40 disabled:hover:bg-slate-50 dark:disabled:hover:bg-slate-900"
|
|
@@ -2055,20 +2064,20 @@ var Wn = ["aria-label", "aria-expanded"], Gn = { class: "flex flex-col h-full" }
|
|
|
2055
2064
|
}[t.variant];
|
|
2056
2065
|
return [r[t.variant], n.value ? e.dark : e.light];
|
|
2057
2066
|
});
|
|
2058
|
-
return (t, n) => (
|
|
2067
|
+
return (t, n) => (D(), c("button", {
|
|
2059
2068
|
type: e.type,
|
|
2060
2069
|
disabled: e.disabled,
|
|
2061
2070
|
title: e.title,
|
|
2062
|
-
class:
|
|
2071
|
+
class: b(["inline-flex shrink-0 items-center gap-2 text-sm border transition-colors cursor-pointer disabled:cursor-not-allowed whitespace-nowrap focus:outline-none focus-visible:ring-2 focus-visible:ring-emerald-500", i.value]),
|
|
2063
2072
|
onClick: n[0] ||= (e) => t.$emit("click", e)
|
|
2064
|
-
}, [j(t.$slots, "icon", { iconClass: "w-4 h-4" }), e.label ? (
|
|
2073
|
+
}, [j(t.$slots, "icon", { iconClass: "w-4 h-4" }), e.label ? (D(), c("span", wr, P(e.label), 1)) : s("", !0)], 10, Cr));
|
|
2065
2074
|
}
|
|
2066
|
-
}),
|
|
2075
|
+
}), Er = [
|
|
2067
2076
|
"type",
|
|
2068
2077
|
"disabled",
|
|
2069
2078
|
"title",
|
|
2070
2079
|
"aria-label"
|
|
2071
|
-
],
|
|
2080
|
+
], Dr = { key: 0 }, Or = /* @__PURE__ */ m({
|
|
2072
2081
|
__name: "BaseActionButton",
|
|
2073
2082
|
props: {
|
|
2074
2083
|
label: { default: "" },
|
|
@@ -2087,7 +2096,7 @@ var Wn = ["aria-label", "aria-expanded"], Gn = { class: "flex flex-col h-full" }
|
|
|
2087
2096
|
},
|
|
2088
2097
|
emits: ["click"],
|
|
2089
2098
|
setup(e) {
|
|
2090
|
-
let t = e, { isDark: n } =
|
|
2099
|
+
let t = e, { isDark: n } = U(), r = a(() => {
|
|
2091
2100
|
let e = {
|
|
2092
2101
|
emerald: {
|
|
2093
2102
|
dark: "text-emerald-400 hover:bg-emerald-500/10",
|
|
@@ -2160,16 +2169,16 @@ var Wn = ["aria-label", "aria-expanded"], Gn = { class: "flex flex-col h-full" }
|
|
|
2160
2169
|
}[t.color];
|
|
2161
2170
|
return n.value ? e.dark : e.light;
|
|
2162
2171
|
}), o = a(() => t.disabled ? `${i.value} opacity-50 cursor-not-allowed` : `${r.value} cursor-pointer`);
|
|
2163
|
-
return (t, n) => (
|
|
2172
|
+
return (t, n) => (D(), c("button", {
|
|
2164
2173
|
type: e.type,
|
|
2165
2174
|
disabled: e.disabled,
|
|
2166
2175
|
title: e.title,
|
|
2167
2176
|
"aria-label": e.ariaLabel,
|
|
2168
|
-
class:
|
|
2177
|
+
class: b(["inline-flex items-center justify-center gap-1.5 px-3 py-1.5 rounded-lg text-xs font-medium transition-colors focus:outline-none focus-visible:ring-2 focus-visible:ring-current", [e.fullWidth ? "flex-1" : "", o.value]]),
|
|
2169
2178
|
onClick: n[0] ||= (e) => t.$emit("click", e)
|
|
2170
|
-
}, [j(t.$slots, "icon", { iconClass: "w-4 h-4" }), e.label ? (
|
|
2179
|
+
}, [j(t.$slots, "icon", { iconClass: "w-4 h-4" }), e.label ? (D(), c("span", Dr, P(e.label), 1)) : s("", !0)], 10, Er));
|
|
2171
2180
|
}
|
|
2172
|
-
}),
|
|
2181
|
+
}), kr = ["title", "aria-label"], Ar = /* @__PURE__ */ m({
|
|
2173
2182
|
__name: "BaseCopyButton",
|
|
2174
2183
|
props: {
|
|
2175
2184
|
text: {},
|
|
@@ -2180,7 +2189,7 @@ var Wn = ["aria-label", "aria-expanded"], Gn = { class: "flex flex-col h-full" }
|
|
|
2180
2189
|
},
|
|
2181
2190
|
emits: ["copied", "error"],
|
|
2182
2191
|
setup(e, { emit: t }) {
|
|
2183
|
-
let n = e, r = t, { isDark: i } =
|
|
2192
|
+
let n = e, r = t, { isDark: i } = U(), s = k(!1), l = null, u = a(() => s.value ? "Copied!" : n.label ? `Copy ${n.label}` : "Copy"), d = a(() => n.label ? `Copy ${n.label}` : "Copy"), f = a(() => n.variant === "bordered" ? `inline-flex items-center justify-center w-9 h-9 rounded-lg border transition-colors cursor-pointer shrink-0 focus:outline-none focus-visible:ring-2 focus-visible:ring-emerald-500 ${s.value ? i.value ? "border-emerald-500/40 bg-emerald-500/10 text-emerald-400" : "border-emerald-300 bg-emerald-50 text-emerald-600" : i.value ? "border-gray-600 text-gray-400 hover:text-gray-200 hover:bg-gray-800" : "border-gray-300 text-gray-400 hover:text-gray-600 hover:bg-gray-50"}` : `p-1 rounded transition-colors cursor-pointer focus:outline-none focus-visible:ring-2 focus-visible:ring-emerald-500 ${i.value ? "text-gray-400 hover:text-emerald-300 hover:bg-emerald-500/10" : "text-gray-500 hover:text-emerald-600 hover:bg-emerald-50"}`);
|
|
2184
2193
|
async function p(e) {
|
|
2185
2194
|
try {
|
|
2186
2195
|
if (navigator.clipboard?.writeText) {
|
|
@@ -2202,36 +2211,36 @@ var Wn = ["aria-label", "aria-expanded"], Gn = { class: "flex flex-col h-full" }
|
|
|
2202
2211
|
r("error", e);
|
|
2203
2212
|
}
|
|
2204
2213
|
}
|
|
2205
|
-
return
|
|
2214
|
+
return E(() => {
|
|
2206
2215
|
l && clearTimeout(l);
|
|
2207
|
-
}), (t, n) => (
|
|
2216
|
+
}), (t, n) => (D(), c("button", {
|
|
2208
2217
|
type: "button",
|
|
2209
2218
|
title: u.value,
|
|
2210
2219
|
"aria-label": d.value,
|
|
2211
|
-
class:
|
|
2220
|
+
class: b(f.value),
|
|
2212
2221
|
onClick: m
|
|
2213
|
-
}, [s.value ? (
|
|
2222
|
+
}, [s.value ? (D(), o(F(ye), {
|
|
2214
2223
|
key: 0,
|
|
2215
|
-
class:
|
|
2224
|
+
class: b(e.iconClass),
|
|
2216
2225
|
"aria-hidden": "true"
|
|
2217
|
-
}, null, 8, ["class"])) : (
|
|
2226
|
+
}, null, 8, ["class"])) : (D(), o(F(be), {
|
|
2218
2227
|
key: 1,
|
|
2219
|
-
class:
|
|
2228
|
+
class: b(e.iconClass),
|
|
2220
2229
|
"aria-hidden": "true"
|
|
2221
|
-
}, null, 8, ["class"]))], 10,
|
|
2230
|
+
}, null, 8, ["class"]))], 10, kr));
|
|
2222
2231
|
}
|
|
2223
|
-
}),
|
|
2232
|
+
}), jr = ["disabled", "aria-busy"], Mr = {
|
|
2224
2233
|
key: 0,
|
|
2225
2234
|
class: "w-5 h-5 animate-spin shrink-0",
|
|
2226
2235
|
viewBox: "0 0 24 24",
|
|
2227
2236
|
fill: "none",
|
|
2228
2237
|
"aria-hidden": "true"
|
|
2229
|
-
},
|
|
2238
|
+
}, Nr = {
|
|
2230
2239
|
key: 1,
|
|
2231
2240
|
class: "w-5 h-5 shrink-0",
|
|
2232
2241
|
viewBox: "0 0 48 48",
|
|
2233
2242
|
"aria-hidden": "true"
|
|
2234
|
-
},
|
|
2243
|
+
}, Pr = /* @__PURE__ */ m({
|
|
2235
2244
|
__name: "BaseGoogleSignInButton",
|
|
2236
2245
|
props: {
|
|
2237
2246
|
label: { default: "Sign in with Google" },
|
|
@@ -2250,17 +2259,17 @@ var Wn = ["aria-label", "aria-expanded"], Gn = { class: "flex flex-col h-full" }
|
|
|
2250
2259
|
},
|
|
2251
2260
|
emits: ["click"],
|
|
2252
2261
|
setup(e, { emit: t }) {
|
|
2253
|
-
let n = e, r = t, { isDark: i } =
|
|
2262
|
+
let n = e, r = t, { isDark: i } = U(), o = a(() => n.disabled || n.loading);
|
|
2254
2263
|
function s() {
|
|
2255
2264
|
o.value || r("click");
|
|
2256
2265
|
}
|
|
2257
|
-
return (t, n) => (
|
|
2266
|
+
return (t, n) => (D(), c("button", {
|
|
2258
2267
|
type: "button",
|
|
2259
2268
|
disabled: o.value,
|
|
2260
2269
|
"aria-busy": e.loading,
|
|
2261
2270
|
onClick: s,
|
|
2262
|
-
class:
|
|
2263
|
-
}, [e.loading ? (
|
|
2271
|
+
class: b(["inline-flex items-center justify-center gap-3 h-11 px-4 rounded-lg border text-sm font-medium transition-colors cursor-pointer focus:outline-none focus-visible:ring-2 focus-visible:ring-emerald-500 disabled:opacity-60 disabled:cursor-not-allowed", [e.block ? "w-full" : "", F(i) ? "bg-gray-900 border-gray-700 text-gray-100 hover:bg-gray-800" : "bg-white border-gray-300 text-gray-700 hover:bg-gray-50"]])
|
|
2272
|
+
}, [e.loading ? (D(), c("svg", Mr, [...n[0] ||= [l("circle", {
|
|
2264
2273
|
class: "opacity-25",
|
|
2265
2274
|
cx: "12",
|
|
2266
2275
|
cy: "12",
|
|
@@ -2271,18 +2280,18 @@ var Wn = ["aria-label", "aria-expanded"], Gn = { class: "flex flex-col h-full" }
|
|
|
2271
2280
|
class: "opacity-75",
|
|
2272
2281
|
fill: "currentColor",
|
|
2273
2282
|
d: "M4 12a8 8 0 0 1 8-8V0C5.4 0 0 5.4 0 12h4z"
|
|
2274
|
-
}, null, -1)]])) : (
|
|
2283
|
+
}, null, -1)]])) : (D(), c("svg", Nr, [...n[1] ||= [d("<path fill=\"#EA4335\" d=\"M24 9.5c3.54 0 6.71 1.22 9.21 3.6l6.85-6.85C35.9 2.38 30.47 0 24 0 14.62 0 6.51 5.38 2.56 13.22l7.98 6.19C12.43 13.72 17.74 9.5 24 9.5z\"></path><path fill=\"#4285F4\" d=\"M46.98 24.55c0-1.57-.15-3.09-.38-4.55H24v9.02h12.94c-.58 2.96-2.26 5.48-4.78 7.18l7.73 6c4.51-4.18 7.09-10.36 7.09-17.65z\"></path><path fill=\"#FBBC05\" d=\"M10.53 28.59c-.48-1.45-.76-2.99-.76-4.59s.27-3.14.76-4.59l-7.98-6.19C.92 16.46 0 20.12 0 24c0 3.88.92 7.54 2.56 10.78l7.97-6.19z\"></path><path fill=\"#34A853\" d=\"M24 48c6.48 0 11.93-2.13 15.89-5.81l-7.73-6c-2.15 1.45-4.92 2.3-8.16 2.3-6.26 0-11.57-4.22-13.47-9.91l-7.98 6.19C6.51 42.62 14.62 48 24 48z\"></path><path fill=\"none\" d=\"M0 0h48v48H0z\"></path>", 5)]])), l("span", null, P(e.label), 1)], 10, jr));
|
|
2275
2284
|
}
|
|
2276
|
-
}),
|
|
2285
|
+
}), Fr = {
|
|
2277
2286
|
key: 0,
|
|
2278
2287
|
class: "flex justify-center mb-6"
|
|
2279
|
-
},
|
|
2288
|
+
}, Ir = { class: "mb-6 text-center" }, Lr = { class: "flex items-center gap-3 my-5" }, Rr = ["disabled"], zr = { class: "flex items-center justify-between mb-1.5" }, Br = { class: "relative" }, Vr = ["type", "disabled"], Hr = ["aria-label", "aria-pressed"], Ur = ["disabled"], Wr = ["disabled", "aria-busy"], Gr = {
|
|
2280
2289
|
key: 0,
|
|
2281
2290
|
class: "w-4 h-4 animate-spin",
|
|
2282
2291
|
viewBox: "0 0 24 24",
|
|
2283
2292
|
fill: "none",
|
|
2284
2293
|
"aria-hidden": "true"
|
|
2285
|
-
},
|
|
2294
|
+
}, Kr = /* @__PURE__ */ m({
|
|
2286
2295
|
__name: "BaseLoginForm",
|
|
2287
2296
|
props: {
|
|
2288
2297
|
title: { default: "Sign in" },
|
|
@@ -2308,7 +2317,7 @@ var Wn = ["aria-label", "aria-expanded"], Gn = { class: "flex flex-col h-full" }
|
|
|
2308
2317
|
},
|
|
2309
2318
|
emits: ["submit", "google-sign-in"],
|
|
2310
2319
|
setup(t, { emit: n }) {
|
|
2311
|
-
let r = t, i = n, { isDark: o } =
|
|
2320
|
+
let r = t, i = n, { isDark: o } = U(), u = X(), d = k(""), m = k(""), h = k(!1), g = k(!1), _ = a(() => r.loading || r.googleLoading);
|
|
2312
2321
|
function v() {
|
|
2313
2322
|
_.value || i("submit", {
|
|
2314
2323
|
email: d.value,
|
|
@@ -2316,25 +2325,25 @@ var Wn = ["aria-label", "aria-expanded"], Gn = { class: "flex flex-col h-full" }
|
|
|
2316
2325
|
...r.showRemember ? { remember: h.value } : {}
|
|
2317
2326
|
});
|
|
2318
2327
|
}
|
|
2319
|
-
return (n, r) => (
|
|
2320
|
-
n.$slots.logo ? (
|
|
2321
|
-
l("div",
|
|
2328
|
+
return (n, r) => (D(), c("div", { class: b(["w-full max-w-sm mx-auto rounded-xl border shadow-sm p-6 sm:p-8", F(u).card]) }, [
|
|
2329
|
+
n.$slots.logo ? (D(), c("div", Fr, [j(n.$slots, "logo")])) : s("", !0),
|
|
2330
|
+
l("div", Ir, [l("h1", { class: b(["text-xl font-semibold", F(u).primaryText]) }, P(t.title), 3), t.subtitle ? (D(), c("p", {
|
|
2322
2331
|
key: 0,
|
|
2323
|
-
class:
|
|
2332
|
+
class: b(["mt-1 text-sm", F(u).mutedText])
|
|
2324
2333
|
}, P(t.subtitle), 3)) : s("", !0)]),
|
|
2325
|
-
t.error ? (
|
|
2334
|
+
t.error ? (D(), c("div", {
|
|
2326
2335
|
key: 1,
|
|
2327
2336
|
role: "alert",
|
|
2328
|
-
class:
|
|
2337
|
+
class: b(["mb-4 rounded-lg border px-3 py-2 text-sm", F(o) ? "bg-red-500/10 border-red-500/30 text-red-300" : "bg-red-50 border-red-200 text-red-700"])
|
|
2329
2338
|
}, P(t.error), 3)) : s("", !0),
|
|
2330
|
-
t.showGoogle ? (
|
|
2339
|
+
t.showGoogle ? (D(), c(e, { key: 2 }, [p(Pr, {
|
|
2331
2340
|
loading: t.googleLoading,
|
|
2332
2341
|
disabled: t.loading,
|
|
2333
2342
|
onClick: r[0] ||= (e) => i("google-sign-in")
|
|
2334
|
-
}, null, 8, ["loading", "disabled"]), l("div",
|
|
2335
|
-
l("span", { class:
|
|
2336
|
-
l("span", { class:
|
|
2337
|
-
l("span", { class:
|
|
2343
|
+
}, null, 8, ["loading", "disabled"]), l("div", Lr, [
|
|
2344
|
+
l("span", { class: b(["h-px flex-1", F(o) ? "bg-gray-700" : "bg-gray-200"]) }, null, 2),
|
|
2345
|
+
l("span", { class: b(["text-xs uppercase tracking-wider", F(u).dimTextAlt]) }, "or", 2),
|
|
2346
|
+
l("span", { class: b(["h-px flex-1", F(o) ? "bg-gray-700" : "bg-gray-200"]) }, null, 2)
|
|
2338
2347
|
])], 64)) : s("", !0),
|
|
2339
2348
|
l("form", {
|
|
2340
2349
|
class: "space-y-4",
|
|
@@ -2342,7 +2351,7 @@ var Wn = ["aria-label", "aria-expanded"], Gn = { class: "flex flex-col h-full" }
|
|
|
2342
2351
|
}, [
|
|
2343
2352
|
l("div", null, [l("label", {
|
|
2344
2353
|
for: "login-email",
|
|
2345
|
-
class:
|
|
2354
|
+
class: b(["block mb-1.5 text-sm font-medium", F(u).label])
|
|
2346
2355
|
}, " Email ", 2), R(l("input", {
|
|
2347
2356
|
id: "login-email",
|
|
2348
2357
|
"onUpdate:modelValue": r[1] ||= (e) => d.value = e,
|
|
@@ -2352,12 +2361,12 @@ var Wn = ["aria-label", "aria-expanded"], Gn = { class: "flex flex-col h-full" }
|
|
|
2352
2361
|
required: "",
|
|
2353
2362
|
disabled: _.value,
|
|
2354
2363
|
placeholder: "you@example.com",
|
|
2355
|
-
class:
|
|
2356
|
-
}, null, 10,
|
|
2357
|
-
l("div", null, [l("div",
|
|
2364
|
+
class: b(["w-full h-11 px-3 rounded-lg border text-sm transition-colors focus:outline-none focus-visible:ring-2 focus-visible:ring-emerald-500 disabled:opacity-60", F(u).inputWithPlaceholder])
|
|
2365
|
+
}, null, 10, Rr), [[ae, d.value]])]),
|
|
2366
|
+
l("div", null, [l("div", zr, [l("label", {
|
|
2358
2367
|
for: "login-password",
|
|
2359
|
-
class:
|
|
2360
|
-
}, " Password ", 2), j(n.$slots, "forgot")]), l("div",
|
|
2368
|
+
class: b(["block text-sm font-medium", F(u).label])
|
|
2369
|
+
}, " Password ", 2), j(n.$slots, "forgot")]), l("div", Br, [R(l("input", {
|
|
2361
2370
|
id: "login-password",
|
|
2362
2371
|
"onUpdate:modelValue": r[2] ||= (e) => m.value = e,
|
|
2363
2372
|
type: g.value ? "text" : "password",
|
|
@@ -2366,29 +2375,29 @@ var Wn = ["aria-label", "aria-expanded"], Gn = { class: "flex flex-col h-full" }
|
|
|
2366
2375
|
required: "",
|
|
2367
2376
|
disabled: _.value,
|
|
2368
2377
|
placeholder: "••••••••",
|
|
2369
|
-
class:
|
|
2370
|
-
}, null, 10,
|
|
2378
|
+
class: b(["w-full h-11 pl-3 pr-16 rounded-lg border text-sm transition-colors focus:outline-none focus-visible:ring-2 focus-visible:ring-emerald-500 disabled:opacity-60", F(u).inputWithPlaceholder])
|
|
2379
|
+
}, null, 10, Vr), [[ie, m.value]]), l("button", {
|
|
2371
2380
|
type: "button",
|
|
2372
2381
|
onClick: r[3] ||= (e) => g.value = !g.value,
|
|
2373
2382
|
"aria-label": g.value ? "Hide password" : "Show password",
|
|
2374
2383
|
"aria-pressed": g.value,
|
|
2375
|
-
class:
|
|
2376
|
-
}, P(g.value ? "Hide" : "Show"), 11,
|
|
2377
|
-
t.showRemember ? (
|
|
2384
|
+
class: b(["absolute inset-y-0 right-0 px-3 text-xs font-medium cursor-pointer focus:outline-none focus-visible:ring-2 focus-visible:ring-emerald-500 rounded-r-lg", F(u).mutedText])
|
|
2385
|
+
}, P(g.value ? "Hide" : "Show"), 11, Hr)])]),
|
|
2386
|
+
t.showRemember ? (D(), c("label", {
|
|
2378
2387
|
key: 0,
|
|
2379
|
-
class:
|
|
2388
|
+
class: b(["flex items-center gap-2 text-sm cursor-pointer select-none", F(u).bodyText])
|
|
2380
2389
|
}, [R(l("input", {
|
|
2381
2390
|
"onUpdate:modelValue": r[4] ||= (e) => h.value = e,
|
|
2382
2391
|
type: "checkbox",
|
|
2383
2392
|
disabled: _.value,
|
|
2384
2393
|
class: "w-4 h-4 rounded border-gray-300 text-emerald-600 focus:ring-emerald-500"
|
|
2385
|
-
}, null, 8,
|
|
2394
|
+
}, null, 8, Ur), [[re, h.value]]), r[5] ||= f(" Remember me ", -1)], 2)) : s("", !0),
|
|
2386
2395
|
l("button", {
|
|
2387
2396
|
type: "submit",
|
|
2388
2397
|
disabled: _.value,
|
|
2389
2398
|
"aria-busy": t.loading,
|
|
2390
2399
|
class: "inline-flex items-center justify-center gap-2 w-full h-11 px-4 rounded-lg text-sm font-semibold text-white bg-emerald-600 hover:bg-emerald-700 transition-colors cursor-pointer focus:outline-none focus-visible:ring-2 focus-visible:ring-emerald-500 disabled:opacity-60 disabled:cursor-not-allowed"
|
|
2391
|
-
}, [t.loading ? (
|
|
2400
|
+
}, [t.loading ? (D(), c("svg", Gr, [...r[6] ||= [l("circle", {
|
|
2392
2401
|
class: "opacity-25",
|
|
2393
2402
|
cx: "12",
|
|
2394
2403
|
cy: "12",
|
|
@@ -2399,18 +2408,18 @@ var Wn = ["aria-label", "aria-expanded"], Gn = { class: "flex flex-col h-full" }
|
|
|
2399
2408
|
class: "opacity-75",
|
|
2400
2409
|
fill: "currentColor",
|
|
2401
2410
|
d: "M4 12a8 8 0 0 1 8-8V0C5.4 0 0 5.4 0 12h4z"
|
|
2402
|
-
}, null, -1)]])) : s("", !0), f(" " + P(t.submitLabel), 1)], 8,
|
|
2411
|
+
}, null, -1)]])) : s("", !0), f(" " + P(t.submitLabel), 1)], 8, Wr)
|
|
2403
2412
|
], 32),
|
|
2404
|
-
n.$slots.footer ? (
|
|
2413
|
+
n.$slots.footer ? (D(), c("div", {
|
|
2405
2414
|
key: 3,
|
|
2406
|
-
class:
|
|
2415
|
+
class: b(["mt-6 text-center text-sm", F(u).mutedText])
|
|
2407
2416
|
}, [j(n.$slots, "footer")], 2)) : s("", !0)
|
|
2408
2417
|
], 2));
|
|
2409
2418
|
}
|
|
2410
|
-
}),
|
|
2419
|
+
}), qr = ["aria-label"], Jr = { class: "flex-1 overflow-y-auto" }, Yr = {
|
|
2411
2420
|
key: 0,
|
|
2412
2421
|
class: "flex flex-col items-center justify-center text-center px-6 py-16 gap-3"
|
|
2413
|
-
},
|
|
2422
|
+
}, Xr = ["onClick"], Zr = { class: "min-w-0 flex-1" }, Qr = { class: "flex items-baseline justify-between gap-2" }, $r = /* @__PURE__ */ m({
|
|
2414
2423
|
__name: "BaseNotificationPanel",
|
|
2415
2424
|
props: {
|
|
2416
2425
|
title: { default: "Notifications" },
|
|
@@ -2422,7 +2431,7 @@ var Wn = ["aria-label", "aria-expanded"], Gn = { class: "flex flex-col h-full" }
|
|
|
2422
2431
|
},
|
|
2423
2432
|
emits: ["select"],
|
|
2424
2433
|
setup(n, { emit: i }) {
|
|
2425
|
-
let u = i, { isDark: d } =
|
|
2434
|
+
let u = i, { isDark: d } = U(), m = X(), { notifications: h, unreadCount: g, open: _, closePanel: v, markAllRead: y, markRead: x } = Gn(), S = {
|
|
2426
2435
|
info: "bg-sky-500",
|
|
2427
2436
|
success: "bg-emerald-500",
|
|
2428
2437
|
warning: "bg-amber-500",
|
|
@@ -2431,15 +2440,15 @@ var Wn = ["aria-label", "aria-expanded"], Gn = { class: "flex flex-col h-full" }
|
|
|
2431
2440
|
function w(e) {
|
|
2432
2441
|
x(e), u("select", e);
|
|
2433
2442
|
}
|
|
2434
|
-
return
|
|
2443
|
+
return pn(() => {
|
|
2435
2444
|
_.value && v();
|
|
2436
|
-
}), (i, a) => (
|
|
2445
|
+
}), (i, a) => (D(), o(t, { to: "body" }, [p(r, {
|
|
2437
2446
|
"enter-active-class": "transition-opacity duration-200",
|
|
2438
2447
|
"enter-from-class": "opacity-0",
|
|
2439
2448
|
"leave-active-class": "transition-opacity duration-200",
|
|
2440
2449
|
"leave-to-class": "opacity-0"
|
|
2441
2450
|
}, {
|
|
2442
|
-
default: L(() => [F(_) ? (
|
|
2451
|
+
default: L(() => [F(_) ? (D(), c("div", {
|
|
2443
2452
|
key: 0,
|
|
2444
2453
|
class: "fixed inset-0 z-[60] bg-black/50",
|
|
2445
2454
|
"aria-hidden": "true",
|
|
@@ -2452,55 +2461,55 @@ var Wn = ["aria-label", "aria-expanded"], Gn = { class: "flex flex-col h-full" }
|
|
|
2452
2461
|
"leave-active-class": "transition-transform duration-300 ease-in",
|
|
2453
2462
|
"leave-to-class": "-translate-x-full"
|
|
2454
2463
|
}, {
|
|
2455
|
-
default: L(() => [F(_) ? (
|
|
2464
|
+
default: L(() => [F(_) ? (D(), c("aside", {
|
|
2456
2465
|
key: 0,
|
|
2457
2466
|
role: "dialog",
|
|
2458
2467
|
"aria-modal": "true",
|
|
2459
2468
|
"aria-label": n.title,
|
|
2460
|
-
class:
|
|
2469
|
+
class: b(["fixed top-0 left-0 z-[70] h-screen w-full max-w-sm flex flex-col border-r shadow-xl", F(d) ? "bg-gray-900 border-gray-800" : "bg-white border-gray-200"])
|
|
2461
2470
|
}, [
|
|
2462
|
-
l("div", { class:
|
|
2471
|
+
l("div", { class: b(["flex items-center justify-between gap-3 px-5 py-4 border-b shrink-0", F(m).border]) }, [l("h2", { class: b(["text-lg font-semibold flex items-center gap-2", F(m).primaryText]) }, [f(P(n.title) + " ", 1), l("span", { class: b(["text-sm font-normal", F(m).dimTextAlt]) }, "— " + P(C.value), 3)], 2), l("button", {
|
|
2463
2472
|
type: "button",
|
|
2464
2473
|
onClick: a[1] ||= (...e) => F(v) && F(v)(...e),
|
|
2465
2474
|
"aria-label": "Close notifications",
|
|
2466
|
-
class:
|
|
2467
|
-
}, [p(F(
|
|
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(Ae), {
|
|
2468
2477
|
class: "w-5 h-5",
|
|
2469
2478
|
"aria-hidden": "true"
|
|
2470
2479
|
})], 2)], 2),
|
|
2471
|
-
n.showMarkAllRead && F(g) > 0 ? (
|
|
2480
|
+
n.showMarkAllRead && F(g) > 0 ? (D(), c("div", {
|
|
2472
2481
|
key: 0,
|
|
2473
|
-
class:
|
|
2482
|
+
class: b(["px-5 py-2 border-b shrink-0 flex justify-end", F(m).border])
|
|
2474
2483
|
}, [l("button", {
|
|
2475
2484
|
type: "button",
|
|
2476
|
-
onClick: a[2] ||= (...e) => F(
|
|
2477
|
-
class:
|
|
2485
|
+
onClick: a[2] ||= (...e) => F(y) && F(y)(...e),
|
|
2486
|
+
class: b(["text-xs font-medium cursor-pointer transition-colors focus:outline-none focus-visible:underline", F(m).emeraldText])
|
|
2478
2487
|
}, " Mark all as read ", 2)], 2)) : s("", !0),
|
|
2479
|
-
l("div",
|
|
2480
|
-
class:
|
|
2488
|
+
l("div", Jr, [C.value === 0 ? (D(), c("div", Yr, [p(F(fe), {
|
|
2489
|
+
class: b(["w-10 h-10", F(m).illustration]),
|
|
2481
2490
|
"aria-hidden": "true"
|
|
2482
|
-
}, null, 8, ["class"]), l("p", { class:
|
|
2491
|
+
}, null, 8, ["class"]), l("p", { class: b(["text-sm", F(m).mutedText]) }, P(n.emptyText), 3)])) : (D(), c("ul", {
|
|
2483
2492
|
key: 1,
|
|
2484
|
-
class:
|
|
2485
|
-
}, [(
|
|
2493
|
+
class: b(["divide-y", F(d) ? "divide-gray-800" : "divide-gray-100"])
|
|
2494
|
+
}, [(D(!0), c(e, null, A(F(h), (e) => (D(), c("li", { key: e.id }, [l("button", {
|
|
2486
2495
|
type: "button",
|
|
2487
2496
|
onClick: (t) => w(e.id),
|
|
2488
|
-
class:
|
|
2497
|
+
class: b(["w-full text-left px-5 py-4 flex gap-3 transition-colors cursor-pointer focus:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-emerald-500", [e.read ? "" : F(d) ? "bg-emerald-500/5" : "bg-emerald-50/60", F(d) ? "hover:bg-gray-800" : "hover:bg-gray-50"]])
|
|
2489
2498
|
}, [l("span", {
|
|
2490
|
-
class:
|
|
2499
|
+
class: b(["mt-1.5 w-2 h-2 rounded-full shrink-0", e.read ? F(d) ? "bg-gray-700" : "bg-gray-300" : S[e.type ?? "info"]]),
|
|
2491
2500
|
"aria-hidden": "true"
|
|
2492
|
-
}, null, 2), l("span",
|
|
2501
|
+
}, null, 2), l("span", Zr, [l("span", Qr, [l("span", { class: b(["text-sm truncate", [e.read ? "font-medium" : "font-semibold", F(m).primaryTextSoft]]) }, P(e.title), 3), e.time ? (D(), c("span", {
|
|
2493
2502
|
key: 0,
|
|
2494
|
-
class:
|
|
2495
|
-
}, P(e.time), 3)) : s("", !0)]), e.message ? (
|
|
2503
|
+
class: b(["text-xs shrink-0", F(m).dimText])
|
|
2504
|
+
}, P(e.time), 3)) : s("", !0)]), e.message ? (D(), c("span", {
|
|
2496
2505
|
key: 0,
|
|
2497
|
-
class:
|
|
2498
|
-
}, P(e.message), 3)) : s("", !0)])], 10,
|
|
2499
|
-
], 10,
|
|
2506
|
+
class: b(["mt-0.5 block text-sm", F(m).mutedText])
|
|
2507
|
+
}, P(e.message), 3)) : s("", !0)])], 10, Xr)]))), 128))], 2))])
|
|
2508
|
+
], 10, qr)) : s("", !0)]),
|
|
2500
2509
|
_: 1
|
|
2501
2510
|
})]));
|
|
2502
2511
|
}
|
|
2503
|
-
}),
|
|
2512
|
+
}), ei = ["disabled"], ti = /* @__PURE__ */ m({
|
|
2504
2513
|
__name: "BaseChipButton",
|
|
2505
2514
|
props: {
|
|
2506
2515
|
size: { default: "sm" },
|
|
@@ -2511,37 +2520,37 @@ var Wn = ["aria-label", "aria-expanded"], Gn = { class: "flex flex-col h-full" }
|
|
|
2511
2520
|
},
|
|
2512
2521
|
emits: ["click"],
|
|
2513
2522
|
setup(e, { emit: t }) {
|
|
2514
|
-
let n = t, { isDark: r } =
|
|
2515
|
-
return (t, i) => (
|
|
2523
|
+
let n = t, { isDark: r } = U();
|
|
2524
|
+
return (t, i) => (D(), c("button", {
|
|
2516
2525
|
type: "button",
|
|
2517
2526
|
disabled: e.disabled,
|
|
2518
|
-
class:
|
|
2527
|
+
class: b(["inline-flex items-center gap-1 font-medium rounded-md border transition-colors cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed focus:outline-none focus-visible:ring-2 focus-visible:ring-emerald-500", [e.size === "xs" ? "text-xs px-2 py-0.5" : "text-xs px-2.5 py-1", F(r) ? "text-emerald-300 border-emerald-700 bg-emerald-900/30 hover:bg-emerald-800/50" : "text-emerald-700 border-emerald-200 bg-emerald-50 hover:bg-emerald-100"]]),
|
|
2519
2528
|
onClick: i[0] ||= (e) => n("click")
|
|
2520
|
-
}, [j(t.$slots, "default")], 10,
|
|
2529
|
+
}, [j(t.$slots, "default")], 10, ei));
|
|
2521
2530
|
}
|
|
2522
|
-
}),
|
|
2531
|
+
}), ni = /* @__PURE__ */ m({
|
|
2523
2532
|
__name: "BaseRemoveButton",
|
|
2524
2533
|
emits: ["click"],
|
|
2525
2534
|
setup(e, { emit: t }) {
|
|
2526
2535
|
let n = t;
|
|
2527
|
-
return (e, t) => (
|
|
2536
|
+
return (e, t) => (D(), c("button", {
|
|
2528
2537
|
type: "button",
|
|
2529
2538
|
class: "px-2 text-lg leading-none text-red-400 hover:text-red-600 transition-colors cursor-pointer rounded focus:outline-none focus-visible:ring-2 focus-visible:ring-red-400 disabled:cursor-not-allowed disabled:text-gray-400 disabled:hover:text-gray-400",
|
|
2530
2539
|
onClick: t[0] ||= (e) => n("click")
|
|
2531
2540
|
}, " × "));
|
|
2532
2541
|
}
|
|
2533
|
-
}),
|
|
2542
|
+
}), ri = { class: "relative flex h-2 w-2" }, ii = {
|
|
2534
2543
|
key: 0,
|
|
2535
2544
|
class: "animate-ping absolute inline-flex h-full w-full rounded-full bg-emerald-400 opacity-75",
|
|
2536
2545
|
"aria-hidden": "true"
|
|
2537
|
-
},
|
|
2546
|
+
}, ai = /* @__PURE__ */ m({
|
|
2538
2547
|
__name: "BaseStatusPill",
|
|
2539
2548
|
props: {
|
|
2540
2549
|
status: {},
|
|
2541
2550
|
label: {}
|
|
2542
2551
|
},
|
|
2543
2552
|
setup(e) {
|
|
2544
|
-
let t = e, { isDark: n } =
|
|
2553
|
+
let t = e, { isDark: n } = U(), r = a(() => {
|
|
2545
2554
|
switch (t.status) {
|
|
2546
2555
|
case "ok": return n.value ? "bg-emerald-500/10 text-emerald-400" : "bg-emerald-50 text-emerald-700";
|
|
2547
2556
|
case "error": return n.value ? "bg-red-500/10 text-red-400" : "bg-red-50 text-red-700";
|
|
@@ -2554,13 +2563,13 @@ var Wn = ["aria-label", "aria-expanded"], Gn = { class: "flex flex-col h-full" }
|
|
|
2554
2563
|
default: return "bg-gray-400";
|
|
2555
2564
|
}
|
|
2556
2565
|
});
|
|
2557
|
-
return (t, n) => (
|
|
2566
|
+
return (t, n) => (D(), c("div", { class: b(["flex items-center gap-2 px-3 py-1.5 rounded-lg text-xs", r.value]) }, [l("span", ri, [e.status === "ok" ? (D(), c("span", ii)) : s("", !0), l("span", { class: b(["relative inline-flex rounded-full h-2 w-2", i.value]) }, null, 2)]), f(" " + P(e.label), 1)], 2));
|
|
2558
2567
|
}
|
|
2559
|
-
}),
|
|
2568
|
+
}), oi = { class: "text-sm font-medium" }, si = [
|
|
2560
2569
|
"accept",
|
|
2561
2570
|
"multiple",
|
|
2562
2571
|
"disabled"
|
|
2563
|
-
],
|
|
2572
|
+
], ci = /* @__PURE__ */ m({
|
|
2564
2573
|
__name: "BaseFileDropzone",
|
|
2565
2574
|
props: {
|
|
2566
2575
|
label: {},
|
|
@@ -2577,7 +2586,7 @@ var Wn = ["aria-label", "aria-expanded"], Gn = { class: "flex flex-col h-full" }
|
|
|
2577
2586
|
},
|
|
2578
2587
|
emits: ["files"],
|
|
2579
2588
|
setup(e, { emit: t }) {
|
|
2580
|
-
let n = e, r = t, { isDark: i } =
|
|
2589
|
+
let n = e, r = t, { isDark: i } = U(), a = k(!1);
|
|
2581
2590
|
function o(e) {
|
|
2582
2591
|
let t = e.target, n = Array.from(t.files ?? []);
|
|
2583
2592
|
t.value = "", n.length && r("files", n);
|
|
@@ -2590,8 +2599,8 @@ var Wn = ["aria-label", "aria-expanded"], Gn = { class: "flex flex-col h-full" }
|
|
|
2590
2599
|
let t = Array.from(e.dataTransfer?.files ?? []);
|
|
2591
2600
|
t.length && r("files", n.multiple ? t : t.slice(0, 1));
|
|
2592
2601
|
}
|
|
2593
|
-
return (t, n) => (
|
|
2594
|
-
class:
|
|
2602
|
+
return (t, n) => (D(), c("label", {
|
|
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"]]),
|
|
2595
2604
|
onDragover: z(u, ["prevent"]),
|
|
2596
2605
|
onDragleave: n[0] ||= z((e) => a.value = !1, ["prevent"]),
|
|
2597
2606
|
onDrop: z(d, ["prevent"])
|
|
@@ -2608,10 +2617,10 @@ var Wn = ["aria-label", "aria-expanded"], Gn = { class: "flex flex-col h-full" }
|
|
|
2608
2617
|
"stroke-linejoin": "round",
|
|
2609
2618
|
d: "M19.5 14.25v-2.625a3.375 3.375 0 0 0-3.375-3.375h-1.5A1.125 1.125 0 0 1 13.5 7.125v-1.5a3.375 3.375 0 0 0-3.375-3.375H8.25m6.75 12-3-3m0 0-3 3m3-3v6m-1.5-15H5.625c-.621 0-1.125.504-1.125 1.125v17.25c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125V11.25a9 9 0 0 0-9-9Z"
|
|
2610
2619
|
})], -1)]),
|
|
2611
|
-
l("p",
|
|
2612
|
-
e.hint ? (
|
|
2620
|
+
l("p", oi, P(e.label), 1),
|
|
2621
|
+
e.hint ? (D(), c("p", {
|
|
2613
2622
|
key: 0,
|
|
2614
|
-
class:
|
|
2623
|
+
class: b(["text-xs", F(i) ? "text-gray-500" : "text-gray-400"])
|
|
2615
2624
|
}, P(e.hint), 3)) : s("", !0),
|
|
2616
2625
|
l("input", {
|
|
2617
2626
|
type: "file",
|
|
@@ -2620,10 +2629,10 @@ var Wn = ["aria-label", "aria-expanded"], Gn = { class: "flex flex-col h-full" }
|
|
|
2620
2629
|
multiple: e.multiple,
|
|
2621
2630
|
disabled: e.disabled,
|
|
2622
2631
|
onChange: o
|
|
2623
|
-
}, null, 40,
|
|
2632
|
+
}, null, 40, si)
|
|
2624
2633
|
], 34));
|
|
2625
2634
|
}
|
|
2626
|
-
}),
|
|
2635
|
+
}), li = /* @__PURE__ */ m({
|
|
2627
2636
|
__name: "BaseCodeBlock",
|
|
2628
2637
|
props: {
|
|
2629
2638
|
code: {},
|
|
@@ -2632,7 +2641,7 @@ var Wn = ["aria-label", "aria-expanded"], Gn = { class: "flex flex-col h-full" }
|
|
|
2632
2641
|
maxHeightClass: { default: "" }
|
|
2633
2642
|
},
|
|
2634
2643
|
setup(e) {
|
|
2635
|
-
let t = e, { isDark: n } =
|
|
2644
|
+
let t = e, { isDark: n } = U(), r = {
|
|
2636
2645
|
soft: {
|
|
2637
2646
|
dark: "bg-gray-800/70 text-gray-300",
|
|
2638
2647
|
light: "bg-gray-100 text-gray-700"
|
|
@@ -2648,13 +2657,13 @@ var Wn = ["aria-label", "aria-expanded"], Gn = { class: "flex flex-col h-full" }
|
|
|
2648
2657
|
let e = r[t.variant];
|
|
2649
2658
|
return n.value ? e.dark : e.light;
|
|
2650
2659
|
}), s = a(() => i[t.size]);
|
|
2651
|
-
return (t, n) => (
|
|
2660
|
+
return (t, n) => (D(), c("pre", { class: b(["font-mono overflow-auto", [
|
|
2652
2661
|
s.value,
|
|
2653
2662
|
o.value,
|
|
2654
2663
|
e.maxHeightClass
|
|
2655
2664
|
]]) }, P(e.code), 3));
|
|
2656
2665
|
}
|
|
2657
|
-
}),
|
|
2666
|
+
}), ui = ["value", "type"], di = /* @__PURE__ */ m({
|
|
2658
2667
|
__name: "BaseInput",
|
|
2659
2668
|
props: {
|
|
2660
2669
|
modelValue: { default: "" },
|
|
@@ -2671,14 +2680,14 @@ var Wn = ["aria-label", "aria-expanded"], Gn = { class: "flex flex-col h-full" }
|
|
|
2671
2680
|
function r(e) {
|
|
2672
2681
|
n("update:modelValue", e.target.value);
|
|
2673
2682
|
}
|
|
2674
|
-
return (t, n) => (
|
|
2683
|
+
return (t, n) => (D(), c("input", {
|
|
2675
2684
|
value: e.modelValue,
|
|
2676
2685
|
type: e.type,
|
|
2677
|
-
class:
|
|
2686
|
+
class: b(["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 placeholder:text-slate-400 dark:placeholder:text-slate-500 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.block ? "w-full" : "", e.size === "sm" ? "px-2 py-1.5" : "px-3 py-2"]]),
|
|
2678
2687
|
onInput: r
|
|
2679
|
-
}, null, 42,
|
|
2688
|
+
}, null, 42, ui));
|
|
2680
2689
|
}
|
|
2681
|
-
}),
|
|
2690
|
+
}), fi = ["value"], pi = /* @__PURE__ */ m({
|
|
2682
2691
|
inheritAttrs: !1,
|
|
2683
2692
|
__name: "BaseSelect",
|
|
2684
2693
|
props: {
|
|
@@ -2695,27 +2704,27 @@ var Wn = ["aria-label", "aria-expanded"], Gn = { class: "flex flex-col h-full" }
|
|
|
2695
2704
|
},
|
|
2696
2705
|
emits: ["update:modelValue"],
|
|
2697
2706
|
setup(e, { emit: t }) {
|
|
2698
|
-
let n = e, r =
|
|
2707
|
+
let n = e, r = ne(), i = () => {
|
|
2699
2708
|
let e = r.default?.() ?? [];
|
|
2700
|
-
return n.humanize ?
|
|
2709
|
+
return n.humanize ? Ue(e, ["option", "optgroup"]) : e;
|
|
2701
2710
|
}, a = t;
|
|
2702
2711
|
function o(e) {
|
|
2703
2712
|
a("update:modelValue", e.target.value);
|
|
2704
2713
|
}
|
|
2705
|
-
return (t, n) => (
|
|
2714
|
+
return (t, n) => (D(), c("div", { class: b(["relative", e.block ? "w-full" : "inline-block"]) }, [l("select", v(t.$attrs, {
|
|
2706
2715
|
value: e.modelValue,
|
|
2707
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"],
|
|
2708
2717
|
onChange: o
|
|
2709
|
-
}), [p(i)], 16,
|
|
2710
|
-
class:
|
|
2718
|
+
}), [p(i)], 16, fi), p(F(_e), {
|
|
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"]),
|
|
2711
2720
|
"aria-hidden": "true"
|
|
2712
2721
|
}, null, 8, ["class"])], 2));
|
|
2713
2722
|
}
|
|
2714
|
-
}),
|
|
2723
|
+
}), mi = [
|
|
2715
2724
|
"disabled",
|
|
2716
2725
|
"aria-label",
|
|
2717
2726
|
"aria-expanded"
|
|
2718
|
-
],
|
|
2727
|
+
], hi = ["aria-label"], gi = ["aria-selected", "title"], _i = ["disabled", "onClick"], vi = /* @__PURE__ */ m({
|
|
2719
2728
|
__name: "BaseDropdown",
|
|
2720
2729
|
props: {
|
|
2721
2730
|
options: {},
|
|
@@ -2756,33 +2765,33 @@ var Wn = ["aria-label", "aria-expanded"], Gn = { class: "flex flex-col h-full" }
|
|
|
2756
2765
|
function _(e) {
|
|
2757
2766
|
e.disabled || (i("update:modelValue", e.value), o.value = !1);
|
|
2758
2767
|
}
|
|
2759
|
-
|
|
2768
|
+
pn(() => {
|
|
2760
2769
|
o.value = !1;
|
|
2761
2770
|
});
|
|
2762
2771
|
function v(e) {
|
|
2763
2772
|
o.value && u.value && !u.value.contains(e.target) && (o.value = !1);
|
|
2764
2773
|
}
|
|
2765
|
-
return
|
|
2774
|
+
return w(() => document.addEventListener("click", v)), C(() => document.removeEventListener("click", v)), (n, r) => (D(), c("div", {
|
|
2766
2775
|
ref_key: "rootEl",
|
|
2767
2776
|
ref: u,
|
|
2768
|
-
class:
|
|
2777
|
+
class: b(t.block ? "relative w-full" : "relative inline-block")
|
|
2769
2778
|
}, [l("button", {
|
|
2770
2779
|
type: "button",
|
|
2771
|
-
class:
|
|
2780
|
+
class: b([f.value, t.block ? "w-full" : ""]),
|
|
2772
2781
|
disabled: t.disabled,
|
|
2773
2782
|
"aria-label": t.ariaLabel || void 0,
|
|
2774
2783
|
"aria-haspopup": "listbox",
|
|
2775
2784
|
"aria-expanded": o.value,
|
|
2776
2785
|
onClick: g
|
|
2777
|
-
}, [l("span", { class:
|
|
2778
|
-
class:
|
|
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(_e), {
|
|
2787
|
+
class: b(["shrink-0 transition-transform", [t.chevronClass, o.value ? "rotate-180" : ""]]),
|
|
2779
2788
|
"aria-hidden": "true"
|
|
2780
|
-
}, null, 8, ["class"])], 10,
|
|
2789
|
+
}, null, 8, ["class"])], 10, mi), o.value ? (D(), c("ul", {
|
|
2781
2790
|
key: 0,
|
|
2782
2791
|
role: "listbox",
|
|
2783
2792
|
"aria-label": t.ariaLabel || t.placeholder,
|
|
2784
2793
|
class: "absolute z-20 mt-1 w-full min-w-max max-w-xs max-h-60 overflow-auto rounded-lg border border-slate-300 dark:border-slate-600 bg-white dark:bg-slate-900 py-1 shadow-lg focus:outline-none"
|
|
2785
|
-
}, [(
|
|
2794
|
+
}, [(D(!0), c(e, null, A(t.options, (e) => (D(), c("li", {
|
|
2786
2795
|
key: String(e.value),
|
|
2787
2796
|
role: "option",
|
|
2788
2797
|
"aria-selected": e.value === t.modelValue,
|
|
@@ -2790,15 +2799,15 @@ var Wn = ["aria-label", "aria-expanded"], Gn = { class: "flex flex-col h-full" }
|
|
|
2790
2799
|
}, [l("button", {
|
|
2791
2800
|
type: "button",
|
|
2792
2801
|
disabled: e.disabled,
|
|
2793
|
-
class:
|
|
2802
|
+
class: b(h(e)),
|
|
2794
2803
|
onClick: (t) => _(e)
|
|
2795
|
-
}, P(e.label), 11,
|
|
2804
|
+
}, P(e.label), 11, _i)], 8, gi))), 128))], 8, hi)) : s("", !0)], 2));
|
|
2796
2805
|
}
|
|
2797
|
-
}),
|
|
2806
|
+
}), yi = ["role", "aria-label"], bi = [
|
|
2798
2807
|
"aria-pressed",
|
|
2799
2808
|
"title",
|
|
2800
2809
|
"onClick"
|
|
2801
|
-
],
|
|
2810
|
+
], xi = "bg-slate-50 dark:bg-slate-900 text-slate-600 dark:text-slate-300 hover:bg-slate-100 dark:hover:bg-slate-800", Si = /* @__PURE__ */ m({
|
|
2802
2811
|
__name: "BaseSegmentedControl",
|
|
2803
2812
|
props: {
|
|
2804
2813
|
options: {},
|
|
@@ -2815,22 +2824,22 @@ var Wn = ["aria-label", "aria-expanded"], Gn = { class: "flex flex-col h-full" }
|
|
|
2815
2824
|
let r = t, i = n, o = a(() => r.variant === "toolbar" ? "inline-flex h-9 divide-x divide-slate-300 dark:divide-slate-600 rounded-md border border-slate-300 dark:border-slate-600 overflow-hidden" : "inline-flex rounded border border-slate-300 dark:border-slate-600 overflow-hidden"), s = a(() => r.variant === "toolbar" ? "flex items-center px-3.5 text-xs font-semibold uppercase tracking-wide transition-colors cursor-pointer focus:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-emerald-500" : `${r.variant === "wide" ? "px-4 py-2" : "px-3 py-2"} text-sm font-medium transition-colors cursor-pointer border-l first:border-l-0 border-slate-300 dark:border-slate-600 focus:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-emerald-500`), l = a(() => r.variant === "wide" ? "bg-emerald-600 text-white" : "bg-emerald-500 text-white");
|
|
2816
2825
|
function u(e) {
|
|
2817
2826
|
let t = e.value === r.modelValue;
|
|
2818
|
-
return r.optionClass ? r.optionClass(e, t) : t ? l.value :
|
|
2827
|
+
return r.optionClass ? r.optionClass(e, t) : t ? l.value : xi;
|
|
2819
2828
|
}
|
|
2820
|
-
return (n, r) => (
|
|
2829
|
+
return (n, r) => (D(), c("div", {
|
|
2821
2830
|
role: t.ariaLabel ? "group" : void 0,
|
|
2822
2831
|
"aria-label": t.ariaLabel || void 0,
|
|
2823
|
-
class:
|
|
2824
|
-
}, [(
|
|
2832
|
+
class: b(o.value)
|
|
2833
|
+
}, [(D(!0), c(e, null, A(t.options, (e) => (D(), c("button", {
|
|
2825
2834
|
key: String(e.value),
|
|
2826
2835
|
type: "button",
|
|
2827
|
-
class:
|
|
2836
|
+
class: b([s.value, u(e)]),
|
|
2828
2837
|
"aria-pressed": e.value === t.modelValue,
|
|
2829
2838
|
title: e.title,
|
|
2830
2839
|
onClick: (t) => i("update:modelValue", e.value)
|
|
2831
|
-
}, P(e.label), 11,
|
|
2840
|
+
}, P(e.label), 11, bi))), 128))], 10, yi));
|
|
2832
2841
|
}
|
|
2833
|
-
}),
|
|
2842
|
+
}), Ci = { class: "w-full text-sm" }, wi = { class: "bg-slate-50 dark:bg-slate-800/60 text-slate-600 dark:text-slate-300" }, Ti = { class: "text-left border-b border-slate-200 dark:border-slate-700" }, Ei = { class: "divide-y divide-slate-200 dark:divide-slate-700 [&>tr]:transition-colors [&>tr:hover]:bg-slate-50 dark:[&>tr:hover]:bg-slate-800/40" }, Di = { key: 0 }, Oi = ["colspan"], ki = "overflow-x-auto rounded-xl border border-slate-200 bg-white shadow-sm dark:border-slate-700 dark:bg-slate-900", Ai = /* @__PURE__ */ m({
|
|
2834
2843
|
__name: "BaseTable",
|
|
2835
2844
|
props: {
|
|
2836
2845
|
columns: {},
|
|
@@ -2845,24 +2854,24 @@ var Wn = ["aria-label", "aria-expanded"], Gn = { class: "flex flex-col h-full" }
|
|
|
2845
2854
|
}
|
|
2846
2855
|
},
|
|
2847
2856
|
setup(t) {
|
|
2848
|
-
return (n, r) => (
|
|
2857
|
+
return (n, r) => (D(), c("div", { class: b(t.card ? ki : void 0) }, [l("table", Ci, [l("thead", wi, [l("tr", Ti, [(D(!0), c(e, null, A(t.columns, (e, t) => (D(), c("th", {
|
|
2849
2858
|
key: t,
|
|
2850
|
-
class:
|
|
2851
|
-
}, P(e.label), 3))), 128))])]), l("tbody",
|
|
2859
|
+
class: b(["px-4 py-3", e.align === "right" ? "text-right" : ""])
|
|
2860
|
+
}, P(e.label), 3))), 128))])]), l("tbody", Ei, [t.empty ? (D(), c("tr", Di, [l("td", {
|
|
2852
2861
|
colspan: t.columns.length,
|
|
2853
2862
|
class: "px-4 py-12 text-center text-slate-500"
|
|
2854
|
-
}, [j(n.$slots, "empty", {}, () => [f(P(t.emptyText), 1)])], 8,
|
|
2863
|
+
}, [j(n.$slots, "empty", {}, () => [f(P(t.emptyText), 1)])], 8, Oi)])) : s("", !0), j(n.$slots, "default")])])], 2));
|
|
2855
2864
|
}
|
|
2856
|
-
}),
|
|
2865
|
+
}), ji = { class: "grid gap-3 md:grid-cols-[repeat(2,minmax(0,1fr))]" }, Mi = {
|
|
2857
2866
|
key: 0,
|
|
2858
2867
|
class: "block text-[11px] uppercase tracking-wide text-slate-500 mb-1"
|
|
2859
|
-
},
|
|
2868
|
+
}, Ni = ["value"], Pi = {
|
|
2860
2869
|
key: 2,
|
|
2861
2870
|
class: "flex items-center gap-2 mt-4"
|
|
2862
|
-
},
|
|
2871
|
+
}, Fi = ["checked", "onChange"], Ii = { class: "text-sm text-slate-900 dark:text-slate-100" }, Li = {
|
|
2863
2872
|
key: 4,
|
|
2864
2873
|
class: "text-[11px] text-slate-400 mt-1"
|
|
2865
|
-
},
|
|
2874
|
+
}, Ri = /* @__PURE__ */ m({
|
|
2866
2875
|
__name: "BaseSpecFields",
|
|
2867
2876
|
props: {
|
|
2868
2877
|
specs: {},
|
|
@@ -2889,24 +2898,24 @@ var Wn = ["aria-label", "aria-expanded"], Gn = { class: "flex flex-col h-full" }
|
|
|
2889
2898
|
let t = e.clipboardData?.getData("text") ?? "";
|
|
2890
2899
|
/^-?\d*$/.test(t.trim()) || e.preventDefault();
|
|
2891
2900
|
}
|
|
2892
|
-
return (n, f) => (
|
|
2893
|
-
f.type === "boolean" ? s("", !0) : (
|
|
2894
|
-
f.type === "select" ? (
|
|
2901
|
+
return (n, f) => (D(), c("div", ji, [(D(!0), c(e, null, A(t.specs, (f) => (D(), c("div", { key: f.key }, [
|
|
2902
|
+
f.type === "boolean" ? s("", !0) : (D(), c("label", Mi, P(f.label), 1)),
|
|
2903
|
+
f.type === "select" ? (D(), o(pi, {
|
|
2895
2904
|
key: 1,
|
|
2896
2905
|
modelValue: String(t.params[f.key] ?? ""),
|
|
2897
2906
|
"onUpdate:modelValue": (e) => r("update", f.key, e)
|
|
2898
2907
|
}, {
|
|
2899
|
-
default: L(() => [(
|
|
2908
|
+
default: L(() => [(D(!0), c(e, null, A(f.options ?? [], (e) => (D(), c("option", {
|
|
2900
2909
|
key: e,
|
|
2901
2910
|
value: e
|
|
2902
|
-
}, P(e), 9,
|
|
2911
|
+
}, P(e), 9, Ni))), 128))]),
|
|
2903
2912
|
_: 2
|
|
2904
|
-
}, 1032, ["modelValue", "onUpdate:modelValue"])) : f.type === "boolean" ? (
|
|
2913
|
+
}, 1032, ["modelValue", "onUpdate:modelValue"])) : f.type === "boolean" ? (D(), c("label", Pi, [l("input", {
|
|
2905
2914
|
checked: !!t.params[f.key],
|
|
2906
2915
|
type: "checkbox",
|
|
2907
2916
|
class: "h-4 w-4",
|
|
2908
2917
|
onChange: (e) => i(f.key, e)
|
|
2909
|
-
}, null, 40,
|
|
2918
|
+
}, null, 40, Fi), l("span", Ii, P(f.label), 1)])) : (D(), o(di, {
|
|
2910
2919
|
key: 3,
|
|
2911
2920
|
modelValue: t.params[f.key],
|
|
2912
2921
|
type: "number",
|
|
@@ -2925,11 +2934,11 @@ var Wn = ["aria-label", "aria-expanded"], Gn = { class: "flex flex-col h-full" }
|
|
|
2925
2934
|
"onPaste",
|
|
2926
2935
|
"onUpdate:modelValue"
|
|
2927
2936
|
])),
|
|
2928
|
-
f.help ? (
|
|
2937
|
+
f.help ? (D(), c("p", Li, P(f.help), 1)) : s("", !0),
|
|
2929
2938
|
j(n.$slots, "after", { spec: f })
|
|
2930
2939
|
]))), 128))]));
|
|
2931
2940
|
}
|
|
2932
|
-
}),
|
|
2941
|
+
}), zi = { class: "mt-1.5 space-y-0.5 px-1" }, Bi = { class: "text-slate-400 dark:text-slate-500" }, Vi = /* @__PURE__ */ m({
|
|
2933
2942
|
__name: "BaseStatBreakdown",
|
|
2934
2943
|
props: {
|
|
2935
2944
|
items: {},
|
|
@@ -2948,16 +2957,16 @@ var Wn = ["aria-label", "aria-expanded"], Gn = { class: "flex flex-col h-full" }
|
|
|
2948
2957
|
function i(e) {
|
|
2949
2958
|
return !n.signed || e == null ? "text-slate-500 dark:text-slate-400" : e >= 0 ? "text-emerald-600 dark:text-emerald-400" : "text-red-600 dark:text-red-400";
|
|
2950
2959
|
}
|
|
2951
|
-
return (n, a) => (
|
|
2960
|
+
return (n, a) => (D(), c("div", zi, [(D(!0), c(e, null, A(t.items, (e) => (D(), c("div", {
|
|
2952
2961
|
key: e.label,
|
|
2953
2962
|
class: "flex items-center justify-between text-[11px]"
|
|
2954
|
-
}, [l("span",
|
|
2963
|
+
}, [l("span", Bi, P(e.label), 1), l("span", { class: b(["font-mono tabular-nums font-medium", i(e.value)]) }, P(r(e.value)), 3)]))), 128))]));
|
|
2955
2964
|
}
|
|
2956
|
-
}),
|
|
2965
|
+
}), Hi = [
|
|
2957
2966
|
"disabled",
|
|
2958
2967
|
"title",
|
|
2959
2968
|
"aria-pressed"
|
|
2960
|
-
],
|
|
2969
|
+
], Ui = /* @__PURE__ */ m({
|
|
2961
2970
|
__name: "BaseFilterChip",
|
|
2962
2971
|
props: {
|
|
2963
2972
|
label: { default: "" },
|
|
@@ -2986,21 +2995,21 @@ var Wn = ["aria-label", "aria-expanded"], Gn = { class: "flex flex-col h-full" }
|
|
|
2986
2995
|
red: "border-red-500 bg-red-500 text-white hover:bg-red-600 focus-visible:ring-red-500",
|
|
2987
2996
|
slate: "border-slate-600 bg-slate-600 text-white hover:bg-slate-700 focus-visible:ring-emerald-500"
|
|
2988
2997
|
};
|
|
2989
|
-
return (r, i) => (
|
|
2998
|
+
return (r, i) => (D(), c("button", {
|
|
2990
2999
|
type: "button",
|
|
2991
3000
|
disabled: e.disabled,
|
|
2992
3001
|
title: e.title,
|
|
2993
3002
|
"aria-pressed": e.active,
|
|
2994
|
-
class:
|
|
2995
|
-
}, [j(r.$slots, "default", {}, () => [f(P(e.label), 1)])], 10,
|
|
3003
|
+
class: b(["whitespace-nowrap rounded-md border px-3 text-sm font-semibold text-center transition-colors focus:outline-none focus-visible:ring-2 disabled:opacity-50 disabled:cursor-not-allowed", e.active ? n[e.color] : t[e.color]])
|
|
3004
|
+
}, [j(r.$slots, "default", {}, () => [f(P(e.label), 1)])], 10, Hi));
|
|
2996
3005
|
}
|
|
2997
|
-
}),
|
|
3006
|
+
}), Wi = { class: "flex items-center justify-between mb-4" }, Gi = { class: "text-lg font-semibold text-slate-900 dark:text-slate-100" }, Ki = {
|
|
2998
3007
|
key: 0,
|
|
2999
3008
|
class: "text-xs text-slate-500 dark:text-slate-400"
|
|
3000
|
-
},
|
|
3009
|
+
}, qi = {
|
|
3001
3010
|
key: 0,
|
|
3002
3011
|
class: "inline-flex items-center gap-2 text-xs text-slate-500"
|
|
3003
|
-
},
|
|
3012
|
+
}, Ji = { class: "grid gap-4 md:grid-cols-[repeat(2,minmax(0,1fr))]" }, Yi = { class: "md:col-span-2" }, Xi = ["for"], Zi = { class: "md:col-span-2" }, Qi = ["for"], $i = { class: "text-[11px] text-slate-500 mt-1" }, ea = { class: "md:col-span-2" }, ta = ["for"], na = { class: "md:col-span-2" }, ra = ["for"], ia = { class: "md:col-span-2" }, aa = "placeholder:text-slate-400 dark:placeholder:text-slate-500 font-mono", oa = /* @__PURE__ */ m({
|
|
3004
3013
|
__name: "BaseCredentialsForm",
|
|
3005
3014
|
props: {
|
|
3006
3015
|
title: {},
|
|
@@ -3026,7 +3035,7 @@ var Wn = ["aria-label", "aria-expanded"], Gn = { class: "flex flex-col h-full" }
|
|
|
3026
3035
|
"load-error"
|
|
3027
3036
|
],
|
|
3028
3037
|
setup(t, { expose: n, emit: r }) {
|
|
3029
|
-
let i = t, a = r, u = k(!1), d = k(!1), m =
|
|
3038
|
+
let i = t, a = r, u = k(!1), d = k(!1), m = O({
|
|
3030
3039
|
keyId: "",
|
|
3031
3040
|
secretKey: "",
|
|
3032
3041
|
baseUrl: i.defaults.baseUrl,
|
|
@@ -3073,72 +3082,72 @@ var Wn = ["aria-label", "aria-expanded"], Gn = { class: "flex flex-col h-full" }
|
|
|
3073
3082
|
}
|
|
3074
3083
|
}
|
|
3075
3084
|
}
|
|
3076
|
-
return
|
|
3085
|
+
return w(h), n({ load: h }), (n, r) => (D(), o(Vt, { class: "!p-6" }, {
|
|
3077
3086
|
default: L(() => [
|
|
3078
|
-
l("div",
|
|
3079
|
-
l("div",
|
|
3080
|
-
l("div",
|
|
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(Ht, { class: "!h-4 !w-4" }), r[4] ||= f(" Saving… ", -1)])) : s("", !0)]),
|
|
3088
|
+
l("div", Ji, [
|
|
3089
|
+
l("div", Yi, [l("label", {
|
|
3081
3090
|
for: `${t.idPrefix}-key-id`,
|
|
3082
3091
|
class: "block text-xs uppercase tracking-wide text-slate-500 mb-1"
|
|
3083
|
-
}, P(t.keyLabel), 9,
|
|
3092
|
+
}, P(t.keyLabel), 9, Xi), p(di, {
|
|
3084
3093
|
id: `${t.idPrefix}-key-id`,
|
|
3085
3094
|
modelValue: m.keyId,
|
|
3086
3095
|
"onUpdate:modelValue": r[0] ||= (e) => m.keyId = e,
|
|
3087
3096
|
type: "text",
|
|
3088
3097
|
autocomplete: "off",
|
|
3089
3098
|
placeholder: t.keyPlaceholder,
|
|
3090
|
-
class:
|
|
3099
|
+
class: b(aa)
|
|
3091
3100
|
}, null, 8, [
|
|
3092
3101
|
"id",
|
|
3093
3102
|
"modelValue",
|
|
3094
3103
|
"placeholder"
|
|
3095
3104
|
])]),
|
|
3096
|
-
l("div",
|
|
3105
|
+
l("div", Zi, [
|
|
3097
3106
|
l("label", {
|
|
3098
3107
|
for: `${t.idPrefix}-secret`,
|
|
3099
3108
|
class: "block text-xs uppercase tracking-wide text-slate-500 mb-1"
|
|
3100
|
-
}, P(t.secretLabel), 9,
|
|
3101
|
-
p(
|
|
3109
|
+
}, P(t.secretLabel), 9, Qi),
|
|
3110
|
+
p(di, {
|
|
3102
3111
|
id: `${t.idPrefix}-secret`,
|
|
3103
3112
|
modelValue: m.secretKey,
|
|
3104
3113
|
"onUpdate:modelValue": r[1] ||= (e) => m.secretKey = e,
|
|
3105
3114
|
type: "password",
|
|
3106
3115
|
autocomplete: "new-password",
|
|
3107
3116
|
placeholder: d.value ? "•••••••• (unchanged — type to replace)" : t.secretPlaceholder,
|
|
3108
|
-
class:
|
|
3117
|
+
class: b(aa)
|
|
3109
3118
|
}, null, 8, [
|
|
3110
3119
|
"id",
|
|
3111
3120
|
"modelValue",
|
|
3112
3121
|
"placeholder"
|
|
3113
3122
|
]),
|
|
3114
|
-
l("p",
|
|
3123
|
+
l("p", $i, [d.value ? (D(), c(e, { key: 0 }, [f(P(t.secretSetHint), 1)], 64)) : j(n.$slots, "no-secret-hint", {}, () => [f(P(t.permissionsHint), 1)], void 0, 1)])
|
|
3115
3124
|
]),
|
|
3116
|
-
l("div",
|
|
3125
|
+
l("div", ea, [
|
|
3117
3126
|
l("label", {
|
|
3118
3127
|
for: `${t.idPrefix}-base-url`,
|
|
3119
3128
|
class: "block text-xs uppercase tracking-wide text-slate-500 mb-1"
|
|
3120
|
-
}, "Base URL (trading)", 8,
|
|
3121
|
-
p(
|
|
3129
|
+
}, "Base URL (trading)", 8, ta),
|
|
3130
|
+
p(di, {
|
|
3122
3131
|
id: `${t.idPrefix}-base-url`,
|
|
3123
3132
|
modelValue: m.baseUrl,
|
|
3124
3133
|
"onUpdate:modelValue": r[2] ||= (e) => m.baseUrl = e,
|
|
3125
3134
|
type: "text",
|
|
3126
|
-
class:
|
|
3135
|
+
class: b(aa)
|
|
3127
3136
|
}, null, 8, ["id", "modelValue"]),
|
|
3128
3137
|
j(n.$slots, "base-url-extra", { form: m })
|
|
3129
3138
|
]),
|
|
3130
|
-
l("div",
|
|
3139
|
+
l("div", na, [l("label", {
|
|
3131
3140
|
for: `${t.idPrefix}-data-url`,
|
|
3132
3141
|
class: "block text-xs uppercase tracking-wide text-slate-500 mb-1"
|
|
3133
|
-
}, "Data URL (market data)", 8,
|
|
3142
|
+
}, "Data URL (market data)", 8, ra), p(di, {
|
|
3134
3143
|
id: `${t.idPrefix}-data-url`,
|
|
3135
3144
|
modelValue: m.dataUrl,
|
|
3136
3145
|
"onUpdate:modelValue": r[3] ||= (e) => m.dataUrl = e,
|
|
3137
3146
|
type: "text",
|
|
3138
|
-
class:
|
|
3147
|
+
class: b(aa)
|
|
3139
3148
|
}, null, 8, ["id", "modelValue"])]),
|
|
3140
|
-
l("div",
|
|
3141
|
-
color: F(
|
|
3149
|
+
l("div", ia, [p(it, {
|
|
3150
|
+
color: F(G).GREEN,
|
|
3142
3151
|
description: t.saveLabel,
|
|
3143
3152
|
isDisable: u.value,
|
|
3144
3153
|
isLoading: u.value,
|
|
@@ -3155,16 +3164,16 @@ var Wn = ["aria-label", "aria-expanded"], Gn = { class: "flex flex-col h-full" }
|
|
|
3155
3164
|
_: 3
|
|
3156
3165
|
}));
|
|
3157
3166
|
}
|
|
3158
|
-
}),
|
|
3167
|
+
}), sa = {
|
|
3159
3168
|
key: 0,
|
|
3160
3169
|
class: "text-sm text-slate-500 dark:text-slate-400"
|
|
3161
|
-
},
|
|
3170
|
+
}, ca = { class: "mb-3 flex flex-wrap items-center gap-2" }, la = { class: "relative min-w-[200px] flex-1" }, ua = ["placeholder"], da = {
|
|
3162
3171
|
key: 0,
|
|
3163
3172
|
class: "text-sm text-slate-500 dark:text-slate-400"
|
|
3164
|
-
},
|
|
3173
|
+
}, fa = {
|
|
3165
3174
|
key: 1,
|
|
3166
3175
|
class: "flex flex-wrap gap-2"
|
|
3167
|
-
},
|
|
3176
|
+
}, pa = ["title", "onClick"], ma = "h-9 rounded-md border border-slate-300 dark:border-slate-600 bg-slate-50 dark:bg-slate-900 text-slate-900 dark:text-slate-100 text-sm focus:outline-none focus-visible:ring-2 focus-visible:ring-emerald-500", ha = "\0all", ga = /* @__PURE__ */ m({
|
|
3168
3177
|
__name: "BasePillPickerModal",
|
|
3169
3178
|
props: {
|
|
3170
3179
|
title: {},
|
|
@@ -3186,11 +3195,11 @@ var Wn = ["aria-label", "aria-expanded"], Gn = { class: "flex flex-col h-full" }
|
|
|
3186
3195
|
},
|
|
3187
3196
|
emits: ["pick", "close"],
|
|
3188
3197
|
setup(t, { emit: n }) {
|
|
3189
|
-
let r = t, i = n, u = a(() => r.icon ??
|
|
3190
|
-
value:
|
|
3198
|
+
let r = t, i = n, u = a(() => r.icon ?? Ee), d = k(""), f = k(ha), m = a(() => r.groups && r.groups.length > 0 ? [{
|
|
3199
|
+
value: ha,
|
|
3191
3200
|
label: r.allLabel
|
|
3192
|
-
}, ...r.groups] : []), h = a(() => r.items.filter((e) => (f.value ===
|
|
3193
|
-
return (n, r) => (
|
|
3201
|
+
}, ...r.groups] : []), h = a(() => r.items.filter((e) => (f.value === ha || e.group === f.value) && e.label.toLowerCase().includes(d.value.trim().toLowerCase())));
|
|
3202
|
+
return (n, r) => (D(), o(Sn, {
|
|
3194
3203
|
title: t.title,
|
|
3195
3204
|
icon: u.value,
|
|
3196
3205
|
subtitle: t.subtitle,
|
|
@@ -3198,32 +3207,32 @@ var Wn = ["aria-label", "aria-expanded"], Gn = { class: "flex flex-col h-full" }
|
|
|
3198
3207
|
"max-width-class": t.maxWidthClass,
|
|
3199
3208
|
onCancel: r[4] ||= (e) => i("close")
|
|
3200
3209
|
}, {
|
|
3201
|
-
footer: L(() => [p(
|
|
3210
|
+
footer: L(() => [p(Tr, {
|
|
3202
3211
|
variant: "ghost",
|
|
3203
3212
|
label: t.closeText,
|
|
3204
3213
|
onClick: r[3] ||= (e) => i("close")
|
|
3205
3214
|
}, null, 8, ["label"])]),
|
|
3206
|
-
default: L(() => [t.items.length === 0 ? (
|
|
3207
|
-
p(F(
|
|
3215
|
+
default: L(() => [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(Ee), { class: "pointer-events-none absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-slate-400" }),
|
|
3208
3217
|
R(l("input", {
|
|
3209
3218
|
"onUpdate:modelValue": r[0] ||= (e) => d.value = e,
|
|
3210
3219
|
type: "text",
|
|
3211
3220
|
placeholder: t.searchPlaceholder,
|
|
3212
3221
|
autocomplete: "off",
|
|
3213
|
-
class:
|
|
3214
|
-
|
|
3222
|
+
class: b([
|
|
3223
|
+
ma,
|
|
3215
3224
|
"w-full pl-9 pr-8 placeholder:text-slate-400 dark:placeholder:text-slate-500",
|
|
3216
3225
|
t.mono ? "font-mono" : ""
|
|
3217
3226
|
])
|
|
3218
|
-
}, null, 10,
|
|
3219
|
-
d.value ? (
|
|
3227
|
+
}, null, 10, ua), [[ae, d.value]]),
|
|
3228
|
+
d.value ? (D(), c("button", {
|
|
3220
3229
|
key: 0,
|
|
3221
3230
|
type: "button",
|
|
3222
3231
|
"aria-label": "Clear the filter",
|
|
3223
3232
|
class: "absolute right-2 top-1/2 -translate-y-1/2 text-slate-400 hover:text-slate-600 dark:hover:text-slate-200",
|
|
3224
3233
|
onClick: r[1] ||= (e) => d.value = ""
|
|
3225
3234
|
}, " ✕ ")) : s("", !0)
|
|
3226
|
-
]), m.value.length > 0 ? (
|
|
3235
|
+
]), m.value.length > 0 ? (D(), o(Si, {
|
|
3227
3236
|
key: 0,
|
|
3228
3237
|
modelValue: f.value,
|
|
3229
3238
|
"onUpdate:modelValue": r[2] ||= (e) => f.value = e,
|
|
@@ -3233,13 +3242,13 @@ var Wn = ["aria-label", "aria-expanded"], Gn = { class: "flex flex-col h-full" }
|
|
|
3233
3242
|
"modelValue",
|
|
3234
3243
|
"options",
|
|
3235
3244
|
"aria-label"
|
|
3236
|
-
])) : s("", !0)]), h.value.length === 0 ? (
|
|
3245
|
+
])) : s("", !0)]), h.value.length === 0 ? (D(), c("p", da, P(t.noMatchMessage), 1)) : (D(), c("div", fa, [(D(!0), c(e, null, A(h.value, (e) => (D(), c("button", {
|
|
3237
3246
|
key: e.id,
|
|
3238
3247
|
type: "button",
|
|
3239
3248
|
title: e.title,
|
|
3240
|
-
class:
|
|
3249
|
+
class: b(["h-8 shrink-0 rounded-md border border-slate-300 dark:border-slate-600 bg-slate-50 dark:bg-slate-900 px-3 text-sm text-slate-700 dark:text-slate-200 transition-colors hover:border-emerald-500 hover:bg-emerald-50 hover:text-emerald-700 dark:hover:bg-emerald-500/10 dark:hover:text-emerald-400 focus:outline-none focus-visible:ring-2 focus-visible:ring-emerald-500", t.mono ? "font-mono" : ""]),
|
|
3241
3250
|
onClick: (t) => i("pick", e)
|
|
3242
|
-
}, P(e.label), 11,
|
|
3251
|
+
}, P(e.label), 11, pa))), 128))]))], 64))]),
|
|
3243
3252
|
_: 1
|
|
3244
3253
|
}, 8, [
|
|
3245
3254
|
"title",
|
|
@@ -3248,7 +3257,7 @@ var Wn = ["aria-label", "aria-expanded"], Gn = { class: "flex flex-col h-full" }
|
|
|
3248
3257
|
"max-width-class"
|
|
3249
3258
|
]));
|
|
3250
3259
|
}
|
|
3251
|
-
}),
|
|
3260
|
+
}), _a = ["aria-label"], va = ["title"], ya = { class: "text-[10px] tabular-nums text-slate-400 dark:text-slate-500" }, ba = ["title"], xa = /* @__PURE__ */ m({
|
|
3252
3261
|
__name: "BaseBarDistribution",
|
|
3253
3262
|
props: {
|
|
3254
3263
|
bars: {},
|
|
@@ -3260,27 +3269,96 @@ var Wn = ["aria-label", "aria-expanded"], Gn = { class: "flex flex-col h-full" }
|
|
|
3260
3269
|
},
|
|
3261
3270
|
setup(t) {
|
|
3262
3271
|
let n = t, r = a(() => Math.max(1, ...n.bars.map((e) => e.count))), i = (e) => Math.max(3, Math.round(e.count / r.value * n.maxBarHeight)), o = (e) => `${n.titlePrefix ? `${n.titlePrefix} ` : ""}${e.label}: ${e.count} ${n.countNoun}${e.count === 1 ? "" : "s"}`;
|
|
3263
|
-
return (n, r) => (
|
|
3272
|
+
return (n, r) => (D(), c("div", {
|
|
3264
3273
|
class: "flex items-end gap-1.5 overflow-x-auto pb-1",
|
|
3265
3274
|
role: "img",
|
|
3266
3275
|
"aria-label": t.ariaLabel
|
|
3267
|
-
}, [(
|
|
3276
|
+
}, [(D(!0), c(e, null, A(t.bars, (e) => (D(), c("div", {
|
|
3268
3277
|
key: e.label,
|
|
3269
3278
|
class: "flex min-w-7 flex-1 flex-col items-center gap-0.5",
|
|
3270
3279
|
title: o(e)
|
|
3271
3280
|
}, [
|
|
3272
|
-
l("span",
|
|
3281
|
+
l("span", ya, P(e.count), 1),
|
|
3273
3282
|
l("div", {
|
|
3274
|
-
class:
|
|
3275
|
-
style:
|
|
3283
|
+
class: b(["w-full max-w-8 rounded-t", t.barClass]),
|
|
3284
|
+
style: S({ height: `${i(e)}px` })
|
|
3276
3285
|
}, null, 6),
|
|
3277
3286
|
l("span", {
|
|
3278
3287
|
class: "max-w-full truncate font-mono text-[10px] text-slate-500 dark:text-slate-400",
|
|
3279
3288
|
title: e.label
|
|
3280
|
-
}, P(e.label), 9,
|
|
3281
|
-
], 8,
|
|
3289
|
+
}, P(e.label), 9, ba)
|
|
3290
|
+
], 8, va))), 128))], 8, _a));
|
|
3291
|
+
}
|
|
3292
|
+
}), Sa = { class: "flex items-center gap-2 border-b border-slate-200 dark:border-slate-700 pb-2" }, Ca = ["checked", "aria-label"], wa = { class: "text-sm font-medium text-slate-700 dark:text-slate-200" }, Ta = { class: "flex items-center gap-2 pb-1.5" }, Ea = [
|
|
3293
|
+
"checked",
|
|
3294
|
+
"aria-label",
|
|
3295
|
+
"onChange"
|
|
3296
|
+
], Da = { class: "text-xs font-semibold uppercase tracking-wide text-slate-500 dark:text-slate-400" }, Oa = { class: "grid grid-cols-[repeat(2,minmax(0,1fr))] sm:grid-cols-[repeat(3,minmax(0,1fr))] gap-x-3 gap-y-1.5" }, ka = [
|
|
3297
|
+
"checked",
|
|
3298
|
+
"aria-label",
|
|
3299
|
+
"onChange"
|
|
3300
|
+
], Aa = /* @__PURE__ */ m({
|
|
3301
|
+
__name: "BaseGroupedChecklist",
|
|
3302
|
+
props: {
|
|
3303
|
+
groups: {},
|
|
3304
|
+
modelValue: {},
|
|
3305
|
+
allLabel: { default: "Select all" },
|
|
3306
|
+
allAriaLabel: { default: "Select all items" },
|
|
3307
|
+
itemAriaLabel: {
|
|
3308
|
+
type: Function,
|
|
3309
|
+
default: void 0
|
|
3310
|
+
},
|
|
3311
|
+
mono: {
|
|
3312
|
+
type: Boolean,
|
|
3313
|
+
default: !1
|
|
3314
|
+
},
|
|
3315
|
+
maxHeightClass: { default: "max-h-72" }
|
|
3316
|
+
},
|
|
3317
|
+
emits: ["update:modelValue"],
|
|
3318
|
+
setup(t, { emit: n }) {
|
|
3319
|
+
let r = t, i = n, o = a(() => r.groups.filter((e) => e.items.length > 0)), s = a(() => o.value.flatMap((e) => e.items)), u = a(() => new Set(r.modelValue)), d = a(() => s.value.length > 0 && s.value.every((e) => u.value.has(e)));
|
|
3320
|
+
function f(e) {
|
|
3321
|
+
return e.items.every((e) => u.value.has(e));
|
|
3322
|
+
}
|
|
3323
|
+
function p(e) {
|
|
3324
|
+
i("update:modelValue", s.value.filter((t) => e.has(t)));
|
|
3325
|
+
}
|
|
3326
|
+
function m() {
|
|
3327
|
+
p(d.value ? /* @__PURE__ */ new Set() : new Set(s.value));
|
|
3328
|
+
}
|
|
3329
|
+
function h(e) {
|
|
3330
|
+
let t = new Set(u.value), n = !f(e);
|
|
3331
|
+
for (let r of e.items) n ? t.add(r) : t.delete(r);
|
|
3332
|
+
p(t);
|
|
3333
|
+
}
|
|
3334
|
+
function g(e) {
|
|
3335
|
+
let t = new Set(u.value);
|
|
3336
|
+
t.has(e) ? t.delete(e) : t.add(e), p(t);
|
|
3337
|
+
}
|
|
3338
|
+
return (n, r) => (D(), c("div", null, [l("label", Sa, [l("input", {
|
|
3339
|
+
type: "checkbox",
|
|
3340
|
+
class: "h-4 w-4",
|
|
3341
|
+
checked: d.value,
|
|
3342
|
+
"aria-label": t.allAriaLabel,
|
|
3343
|
+
onChange: m
|
|
3344
|
+
}, null, 40, Ca), l("span", wa, P(t.allLabel) + " (" + P(s.value.length) + ") ", 1)]), l("div", { class: b(["overflow-y-auto space-y-3 mt-3", t.maxHeightClass]) }, [(D(!0), c(e, null, A(o.value, (n) => (D(), c("div", { key: n.key }, [l("label", Ta, [l("input", {
|
|
3345
|
+
type: "checkbox",
|
|
3346
|
+
class: "h-4 w-4",
|
|
3347
|
+
checked: f(n),
|
|
3348
|
+
"aria-label": `${t.allLabel} ${n.label}`,
|
|
3349
|
+
onChange: (e) => h(n)
|
|
3350
|
+
}, null, 40, Ea), l("span", Da, P(n.label) + " (" + P(n.items.length) + ") ", 1)]), l("div", Oa, [(D(!0), c(e, null, A(n.items, (e) => (D(), c("label", {
|
|
3351
|
+
key: e,
|
|
3352
|
+
class: "flex items-center gap-2"
|
|
3353
|
+
}, [l("input", {
|
|
3354
|
+
type: "checkbox",
|
|
3355
|
+
class: "h-4 w-4",
|
|
3356
|
+
checked: u.value.has(e),
|
|
3357
|
+
"aria-label": t.itemAriaLabel ? t.itemAriaLabel(e) : e,
|
|
3358
|
+
onChange: (t) => g(e)
|
|
3359
|
+
}, null, 40, ka), l("span", { class: b(["text-sm text-slate-700 dark:text-slate-200", { "font-mono": t.mono }]) }, P(e), 3)]))), 128))])]))), 128))], 2)]));
|
|
3282
3360
|
}
|
|
3283
|
-
}),
|
|
3361
|
+
}), ja = /* @__PURE__ */ m({
|
|
3284
3362
|
__name: "BaseDateTimePicker",
|
|
3285
3363
|
props: {
|
|
3286
3364
|
modelValue: { default: null },
|
|
@@ -3302,7 +3380,7 @@ var Wn = ["aria-label", "aria-expanded"], Gn = { class: "flex flex-col h-full" }
|
|
|
3302
3380
|
},
|
|
3303
3381
|
emits: ["update:modelValue"],
|
|
3304
3382
|
setup(e, { emit: t }) {
|
|
3305
|
-
let n = e, r = t, { isDark: i } =
|
|
3383
|
+
let n = e, r = t, { isDark: i } = U(), s = a(() => ({
|
|
3306
3384
|
enableTimePicker: n.mode !== "date",
|
|
3307
3385
|
is24: n.is24,
|
|
3308
3386
|
...n.timeConfig
|
|
@@ -3311,7 +3389,7 @@ var Wn = ["aria-label", "aria-expanded"], Gn = { class: "flex flex-col h-full" }
|
|
|
3311
3389
|
let e = n.is24 ? "HH:mm" : "hh:mm a";
|
|
3312
3390
|
return n.mode === "date" ? { input: "dd/MM/yyyy" } : n.mode === "time" ? { input: e } : { input: `dd/MM/yyyy ${e}` };
|
|
3313
3391
|
});
|
|
3314
|
-
return (t, n) => (
|
|
3392
|
+
return (t, n) => (D(), o(F(Fe), {
|
|
3315
3393
|
"model-value": e.modelValue,
|
|
3316
3394
|
dark: F(i),
|
|
3317
3395
|
"time-picker": e.mode === "time",
|
|
@@ -3322,7 +3400,7 @@ var Wn = ["aria-label", "aria-expanded"], Gn = { class: "flex flex-col h-full" }
|
|
|
3322
3400
|
"onUpdate:modelValue": n[0] ||= (e) => r("update:modelValue", e)
|
|
3323
3401
|
}, u({ _: 2 }, [A(t.$slots, (e, n) => ({
|
|
3324
3402
|
name: n,
|
|
3325
|
-
fn: L((e) => [j(t.$slots, n,
|
|
3403
|
+
fn: L((e) => [j(t.$slots, n, x(_(e ?? {})))])
|
|
3326
3404
|
}))]), 1032, [
|
|
3327
3405
|
"model-value",
|
|
3328
3406
|
"dark",
|
|
@@ -3333,28 +3411,28 @@ var Wn = ["aria-label", "aria-expanded"], Gn = { class: "flex flex-col h-full" }
|
|
|
3333
3411
|
"teleport"
|
|
3334
3412
|
]));
|
|
3335
3413
|
}
|
|
3336
|
-
}),
|
|
3414
|
+
}), Ma = { class: "flex min-w-0 flex-1 flex-wrap items-center gap-1" }, Na = { class: "truncate" }, Pa = [
|
|
3337
3415
|
"aria-label",
|
|
3338
3416
|
"disabled",
|
|
3339
3417
|
"onClick"
|
|
3340
|
-
],
|
|
3418
|
+
], Fa = [
|
|
3341
3419
|
"disabled",
|
|
3342
3420
|
"readonly",
|
|
3343
3421
|
"aria-label",
|
|
3344
3422
|
"aria-expanded",
|
|
3345
3423
|
"aria-activedescendant",
|
|
3346
3424
|
"placeholder"
|
|
3347
|
-
],
|
|
3425
|
+
], Ia = ["aria-multiselectable"], La = [
|
|
3348
3426
|
"id",
|
|
3349
3427
|
"aria-selected",
|
|
3350
3428
|
"aria-disabled",
|
|
3351
3429
|
"title",
|
|
3352
3430
|
"onMouseenter",
|
|
3353
3431
|
"onClick"
|
|
3354
|
-
],
|
|
3432
|
+
], Ra = { class: "truncate" }, za = {
|
|
3355
3433
|
key: 0,
|
|
3356
3434
|
class: "px-3 py-2 text-sm text-slate-500 dark:text-slate-400"
|
|
3357
|
-
},
|
|
3435
|
+
}, Ba = /* @__PURE__ */ m({
|
|
3358
3436
|
__name: "BaseSearchSelect",
|
|
3359
3437
|
props: {
|
|
3360
3438
|
options: {},
|
|
@@ -3386,97 +3464,97 @@ var Wn = ["aria-label", "aria-expanded"], Gn = { class: "flex flex-col h-full" }
|
|
|
3386
3464
|
},
|
|
3387
3465
|
emits: ["update:modelValue"],
|
|
3388
3466
|
setup(t, { emit: n }) {
|
|
3389
|
-
let r = t, i = n, u = k(null), d = k(null), f = k(!1), m = k(""), h = k(-1), g = `search-select-${
|
|
3467
|
+
let r = t, i = n, u = k(null), d = k(null), f = k(!1), m = k(""), h = k(-1), g = `search-select-${te()}`, _ = a(() => {
|
|
3390
3468
|
let e = r.modelValue;
|
|
3391
3469
|
return Array.isArray(e) ? [...e] : e == null || e === "" ? [] : [e];
|
|
3392
|
-
}),
|
|
3470
|
+
}), v = a(() => _.value.map((e) => r.options.find((t) => t.value === e)).filter((e) => !!e)), x = a(() => _.value.length > 0), S = a(() => !r.multiple && v.value.length > 0), T = a(() => S.value ? v.value[0].label : r.multiple && x.value ? "" : r.placeholder), E = a(() => {
|
|
3393
3471
|
let e = m.value.trim().toLowerCase();
|
|
3394
3472
|
return e ? r.options.filter((t) => t.label.toLowerCase().includes(e)) : [...r.options];
|
|
3395
3473
|
});
|
|
3396
|
-
I(
|
|
3474
|
+
I(E, (e) => {
|
|
3397
3475
|
h.value = e.findIndex((e) => !e.disabled);
|
|
3398
3476
|
});
|
|
3399
3477
|
function O(e) {
|
|
3400
3478
|
return _.value.includes(e.value);
|
|
3401
3479
|
}
|
|
3402
|
-
function
|
|
3480
|
+
function ee(e, t) {
|
|
3403
3481
|
return e.disabled ? "cursor-not-allowed text-slate-400 dark:text-slate-600" : O(e) ? t === h.value ? "bg-emerald-600 text-white" : "bg-emerald-500 text-white" : t === h.value ? "bg-slate-100 text-slate-900 dark:bg-slate-800 dark:text-slate-100" : "text-slate-700 dark:text-slate-200";
|
|
3404
3482
|
}
|
|
3405
|
-
function
|
|
3406
|
-
r.disabled || f.value || (f.value = !0, h.value =
|
|
3483
|
+
function j() {
|
|
3484
|
+
r.disabled || f.value || (f.value = !0, h.value = E.value.findIndex((e) => !e.disabled));
|
|
3407
3485
|
}
|
|
3408
|
-
function
|
|
3486
|
+
function M() {
|
|
3409
3487
|
f.value = !1, m.value = "";
|
|
3410
3488
|
}
|
|
3411
|
-
function
|
|
3412
|
-
r.disabled || (e.target !== d.value && e.preventDefault(), f.value && e.target !== d.value ?
|
|
3489
|
+
function N(e) {
|
|
3490
|
+
r.disabled || (e.target !== d.value && e.preventDefault(), f.value && e.target !== d.value ? M() : (d.value?.focus(), j()));
|
|
3413
3491
|
}
|
|
3414
3492
|
function ne(e) {
|
|
3415
3493
|
if (!e.disabled) {
|
|
3416
3494
|
if (r.multiple) {
|
|
3417
3495
|
let t = O(e) ? _.value.filter((t) => t !== e.value) : [..._.value, e.value];
|
|
3418
|
-
i("update:modelValue", t), m.value = "",
|
|
3419
|
-
} else i("update:modelValue", e.value),
|
|
3496
|
+
i("update:modelValue", t), m.value = "", y(() => d.value?.focus());
|
|
3497
|
+
} else i("update:modelValue", e.value), M(), d.value?.blur();
|
|
3420
3498
|
}
|
|
3421
3499
|
}
|
|
3422
3500
|
function re(e) {
|
|
3423
3501
|
i("update:modelValue", _.value.filter((t) => t !== e.value));
|
|
3424
3502
|
}
|
|
3425
|
-
function
|
|
3503
|
+
function ie() {
|
|
3426
3504
|
i("update:modelValue", r.multiple ? [] : null), m.value = "";
|
|
3427
3505
|
}
|
|
3428
|
-
function
|
|
3429
|
-
let t =
|
|
3506
|
+
function L(e) {
|
|
3507
|
+
let t = E.value;
|
|
3430
3508
|
if (t.length === 0) return;
|
|
3431
3509
|
let n = h.value;
|
|
3432
3510
|
for (let r = 0; r < t.length && (n = (n + e + t.length) % t.length, t[n].disabled); r++);
|
|
3433
|
-
h.value = n,
|
|
3511
|
+
h.value = n, y(() => document.getElementById(`${g}-${n}`)?.scrollIntoView?.({ block: "nearest" }));
|
|
3434
3512
|
}
|
|
3435
3513
|
function se(e) {
|
|
3436
3514
|
switch (e.key) {
|
|
3437
3515
|
case "ArrowDown":
|
|
3438
|
-
e.preventDefault(), f.value ?
|
|
3516
|
+
e.preventDefault(), f.value ? L(1) : j();
|
|
3439
3517
|
break;
|
|
3440
3518
|
case "ArrowUp":
|
|
3441
|
-
e.preventDefault(), f.value ?
|
|
3519
|
+
e.preventDefault(), f.value ? L(-1) : j();
|
|
3442
3520
|
break;
|
|
3443
3521
|
case "Enter":
|
|
3444
|
-
f.value && h.value >= 0 && (e.preventDefault(), ne(
|
|
3522
|
+
f.value && h.value >= 0 && (e.preventDefault(), ne(E.value[h.value]));
|
|
3445
3523
|
break;
|
|
3446
3524
|
case "Escape":
|
|
3447
|
-
f.value && (e.preventDefault(),
|
|
3525
|
+
f.value && (e.preventDefault(), M());
|
|
3448
3526
|
break;
|
|
3449
3527
|
case "Tab":
|
|
3450
|
-
|
|
3528
|
+
M();
|
|
3451
3529
|
break;
|
|
3452
|
-
case "Backspace": r.multiple && m.value === "" &&
|
|
3530
|
+
case "Backspace": r.multiple && m.value === "" && v.value.length && re(v.value[v.value.length - 1]);
|
|
3453
3531
|
}
|
|
3454
3532
|
}
|
|
3455
3533
|
function ce(e) {
|
|
3456
|
-
f.value && u.value && !u.value.contains(e.target) &&
|
|
3534
|
+
f.value && u.value && !u.value.contains(e.target) && M();
|
|
3457
3535
|
}
|
|
3458
|
-
return
|
|
3536
|
+
return w(() => document.addEventListener("mousedown", ce)), C(() => document.removeEventListener("mousedown", ce)), (n, r) => (D(), c("div", {
|
|
3459
3537
|
ref_key: "rootEl",
|
|
3460
3538
|
ref: u,
|
|
3461
|
-
class:
|
|
3539
|
+
class: b(t.block ? "relative w-full" : "relative inline-block min-w-48")
|
|
3462
3540
|
}, [l("div", {
|
|
3463
|
-
class:
|
|
3464
|
-
onMousedown:
|
|
3541
|
+
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"]]),
|
|
3542
|
+
onMousedown: N
|
|
3465
3543
|
}, [
|
|
3466
|
-
l("div",
|
|
3544
|
+
l("div", Ma, [(D(!0), c(e, null, A(v.value, (e) => R((D(), c("span", {
|
|
3467
3545
|
key: String(e.value),
|
|
3468
3546
|
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"
|
|
3469
|
-
}, [l("span",
|
|
3547
|
+
}, [l("span", Na, P(e.label), 1), l("button", {
|
|
3470
3548
|
type: "button",
|
|
3471
3549
|
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",
|
|
3472
3550
|
"aria-label": `Remove ${e.label}`,
|
|
3473
3551
|
disabled: t.disabled,
|
|
3474
3552
|
onMousedown: r[0] ||= z(() => {}, ["stop", "prevent"]),
|
|
3475
3553
|
onClick: z((t) => re(e), ["stop"])
|
|
3476
|
-
}, [p(F(
|
|
3554
|
+
}, [p(F(Ae), {
|
|
3477
3555
|
class: "h-3 w-3",
|
|
3478
3556
|
"aria-hidden": "true"
|
|
3479
|
-
})], 40,
|
|
3557
|
+
})], 40, Pa)])), [[oe, t.multiple]])), 128)), R(l("input", {
|
|
3480
3558
|
ref_key: "inputEl",
|
|
3481
3559
|
ref: d,
|
|
3482
3560
|
"onUpdate:modelValue": r[1] ||= (e) => m.value = e,
|
|
@@ -3491,65 +3569,65 @@ var Wn = ["aria-label", "aria-expanded"], Gn = { class: "flex flex-col h-full" }
|
|
|
3491
3569
|
"aria-controls": g,
|
|
3492
3570
|
"aria-activedescendant": f.value && h.value >= 0 ? `${g}-${h.value}` : void 0,
|
|
3493
3571
|
placeholder: T.value,
|
|
3494
|
-
class:
|
|
3495
|
-
onFocus:
|
|
3496
|
-
onInput:
|
|
3572
|
+
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"]),
|
|
3573
|
+
onFocus: j,
|
|
3574
|
+
onInput: j,
|
|
3497
3575
|
onKeydown: se
|
|
3498
|
-
}, null, 42,
|
|
3499
|
-
t.clearable && x.value && !t.disabled ? (
|
|
3576
|
+
}, null, 42, Fa), [[ae, m.value]])]),
|
|
3577
|
+
t.clearable && x.value && !t.disabled ? (D(), c("button", {
|
|
3500
3578
|
key: 0,
|
|
3501
3579
|
type: "button",
|
|
3502
3580
|
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",
|
|
3503
3581
|
"aria-label": "Clear selection",
|
|
3504
3582
|
onMousedown: r[2] ||= z(() => {}, ["stop", "prevent"]),
|
|
3505
|
-
onClick: z(
|
|
3506
|
-
}, [p(F(
|
|
3583
|
+
onClick: z(ie, ["stop"])
|
|
3584
|
+
}, [p(F(Ae), {
|
|
3507
3585
|
class: "h-4 w-4",
|
|
3508
3586
|
"aria-hidden": "true"
|
|
3509
3587
|
})], 32)) : s("", !0),
|
|
3510
|
-
p(F(
|
|
3511
|
-
class:
|
|
3588
|
+
p(F(_e), {
|
|
3589
|
+
class: b(["h-4 w-4 shrink-0 text-slate-500 transition-transform dark:text-slate-400", f.value ? "rotate-180" : ""]),
|
|
3512
3590
|
"aria-hidden": "true"
|
|
3513
3591
|
}, null, 8, ["class"])
|
|
3514
|
-
], 34), f.value ? (
|
|
3592
|
+
], 34), f.value ? (D(), c("ul", {
|
|
3515
3593
|
key: 0,
|
|
3516
3594
|
id: g,
|
|
3517
3595
|
role: "listbox",
|
|
3518
3596
|
"aria-multiselectable": t.multiple || void 0,
|
|
3519
3597
|
class: "absolute z-30 mt-1 max-h-60 w-full overflow-auto rounded-lg border border-slate-200 bg-white py-1 shadow-lg dark:border-slate-700 dark:bg-slate-900"
|
|
3520
|
-
}, [(
|
|
3598
|
+
}, [(D(!0), c(e, null, A(E.value, (e, t) => (D(), c("li", {
|
|
3521
3599
|
id: `${g}-${t}`,
|
|
3522
3600
|
key: String(e.value),
|
|
3523
3601
|
role: "option",
|
|
3524
3602
|
"aria-selected": O(e),
|
|
3525
3603
|
"aria-disabled": e.disabled || void 0,
|
|
3526
3604
|
title: e.title,
|
|
3527
|
-
class:
|
|
3605
|
+
class: b(["flex cursor-pointer items-center justify-between gap-2 px-3 py-2 text-left text-sm", ee(e, t)]),
|
|
3528
3606
|
onMousedown: r[3] ||= z(() => {}, ["prevent"]),
|
|
3529
3607
|
onMouseenter: (e) => h.value = t,
|
|
3530
3608
|
onClick: (t) => ne(e)
|
|
3531
|
-
}, [l("span",
|
|
3609
|
+
}, [l("span", Ra, P(e.label), 1), O(e) ? (D(), o(F(me), {
|
|
3532
3610
|
key: 0,
|
|
3533
3611
|
class: "h-4 w-4 shrink-0",
|
|
3534
3612
|
"aria-hidden": "true"
|
|
3535
|
-
})) : s("", !0)], 42,
|
|
3613
|
+
})) : s("", !0)], 42, La))), 128)), E.value.length === 0 ? (D(), c("li", za, P(t.options.length === 0 ? t.emptyText : t.noResultsText), 1)) : s("", !0)], 8, Ia)) : s("", !0)], 2));
|
|
3536
3614
|
}
|
|
3537
|
-
}),
|
|
3615
|
+
}), Va = { class: "rounded-xl border border-slate-200 bg-white text-left shadow-sm dark:border-slate-700 dark:bg-slate-900" }, Ha = {
|
|
3538
3616
|
key: 0,
|
|
3539
3617
|
class: "flex flex-wrap items-center justify-between gap-3 border-b border-slate-200 px-5 py-3 dark:border-slate-700"
|
|
3540
|
-
},
|
|
3618
|
+
}, Ua = { class: "min-w-0" }, Wa = {
|
|
3541
3619
|
key: 0,
|
|
3542
3620
|
class: "text-base font-semibold text-slate-900 dark:text-slate-100"
|
|
3543
|
-
},
|
|
3621
|
+
}, Ga = {
|
|
3544
3622
|
key: 1,
|
|
3545
3623
|
class: "text-sm text-slate-500 dark:text-slate-400"
|
|
3546
|
-
},
|
|
3624
|
+
}, Ka = {
|
|
3547
3625
|
key: 0,
|
|
3548
3626
|
class: "flex items-center gap-2"
|
|
3549
|
-
},
|
|
3627
|
+
}, qa = {
|
|
3550
3628
|
key: 1,
|
|
3551
3629
|
class: "flex flex-wrap items-center justify-end gap-2 border-t border-slate-200 px-5 py-3 dark:border-slate-700"
|
|
3552
|
-
},
|
|
3630
|
+
}, Ja = /* @__PURE__ */ m({
|
|
3553
3631
|
__name: "BaseCard",
|
|
3554
3632
|
props: {
|
|
3555
3633
|
title: { default: "" },
|
|
@@ -3557,24 +3635,24 @@ var Wn = ["aria-label", "aria-expanded"], Gn = { class: "flex flex-col h-full" }
|
|
|
3557
3635
|
padding: { default: "md" }
|
|
3558
3636
|
},
|
|
3559
3637
|
setup(e) {
|
|
3560
|
-
return (t, n) => (
|
|
3561
|
-
e.title || e.subtitle || t.$slots.actions ? (
|
|
3562
|
-
l("div", { class:
|
|
3563
|
-
t.$slots.footer ? (
|
|
3638
|
+
return (t, n) => (D(), c("section", Va, [
|
|
3639
|
+
e.title || e.subtitle || t.$slots.actions ? (D(), c("header", Ha, [l("div", Ua, [e.title ? (D(), c("h2", Wa, P(e.title), 1)) : s("", !0), e.subtitle ? (D(), c("p", Ga, P(e.subtitle), 1)) : s("", !0)]), t.$slots.actions ? (D(), c("div", Ka, [j(t.$slots, "actions")])) : s("", !0)])) : s("", !0),
|
|
3640
|
+
l("div", { class: b(e.padding === "sm" ? "p-4" : e.padding === "none" ? "" : "p-5") }, [j(t.$slots, "default")], 2),
|
|
3641
|
+
t.$slots.footer ? (D(), c("footer", qa, [j(t.$slots, "footer")])) : s("", !0)
|
|
3564
3642
|
]));
|
|
3565
3643
|
}
|
|
3566
|
-
}),
|
|
3644
|
+
}), Ya = ["for"], Xa = {
|
|
3567
3645
|
key: 0,
|
|
3568
3646
|
class: "ml-0.5 text-red-500",
|
|
3569
3647
|
"aria-hidden": "true"
|
|
3570
|
-
},
|
|
3648
|
+
}, Za = {
|
|
3571
3649
|
key: 1,
|
|
3572
3650
|
class: "mt-1 text-xs font-medium text-red-600 dark:text-red-400",
|
|
3573
3651
|
role: "alert"
|
|
3574
|
-
},
|
|
3652
|
+
}, Qa = {
|
|
3575
3653
|
key: 2,
|
|
3576
3654
|
class: "mt-1 text-xs text-slate-500 dark:text-slate-400"
|
|
3577
|
-
},
|
|
3655
|
+
}, $a = /* @__PURE__ */ m({
|
|
3578
3656
|
__name: "BaseField",
|
|
3579
3657
|
props: {
|
|
3580
3658
|
label: { default: "" },
|
|
@@ -3595,17 +3673,17 @@ var Wn = ["aria-label", "aria-expanded"], Gn = { class: "flex flex-col h-full" }
|
|
|
3595
3673
|
}
|
|
3596
3674
|
},
|
|
3597
3675
|
setup(e) {
|
|
3598
|
-
return (t, n) => (
|
|
3599
|
-
e.label ? (
|
|
3676
|
+
return (t, n) => (D(), c("div", { class: b([e.grow ? "min-w-48 flex-1" : "", "text-left"]) }, [
|
|
3677
|
+
e.label ? (D(), c("label", {
|
|
3600
3678
|
key: 0,
|
|
3601
3679
|
for: e.labelFor || void 0,
|
|
3602
|
-
class:
|
|
3603
|
-
}, [f(P(e.label), 1), e.required ? (
|
|
3680
|
+
class: b(["mb-1 block", e.compact ? "text-xs uppercase tracking-wide text-slate-500 dark:text-slate-400" : "text-sm font-medium text-slate-700 dark:text-slate-200"])
|
|
3681
|
+
}, [f(P(e.label), 1), e.required ? (D(), c("span", Xa, "*")) : s("", !0)], 10, Ya)) : s("", !0),
|
|
3604
3682
|
j(t.$slots, "default"),
|
|
3605
|
-
e.error ? (
|
|
3683
|
+
e.error ? (D(), c("p", Za, P(e.error), 1)) : e.hint ? (D(), c("p", Qa, P(e.hint), 1)) : s("", !0)
|
|
3606
3684
|
], 2));
|
|
3607
3685
|
}
|
|
3608
|
-
}),
|
|
3686
|
+
}), eo = { class: "flex items-start justify-between gap-3" }, to = { class: "min-w-0 text-left" }, no = { class: "truncate text-sm font-bold tracking-wide text-gray-800 dark:text-slate-200" }, ro = /* @__PURE__ */ m({
|
|
3609
3687
|
__name: "BaseStatCard",
|
|
3610
3688
|
props: {
|
|
3611
3689
|
title: {},
|
|
@@ -3652,30 +3730,30 @@ var Wn = ["aria-label", "aria-expanded"], Gn = { class: "flex flex-col h-full" }
|
|
|
3652
3730
|
icon: "text-slate-500 dark:text-slate-300"
|
|
3653
3731
|
}
|
|
3654
3732
|
}, r = a(() => n[t.accent]);
|
|
3655
|
-
return (t, n) => (
|
|
3656
|
-
default: L(() => [l("div",
|
|
3657
|
-
l("p",
|
|
3658
|
-
l("p", { class:
|
|
3659
|
-
e.subtitle ? (
|
|
3733
|
+
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" : ""]] }), {
|
|
3734
|
+
default: L(() => [l("div", eo, [l("div", to, [
|
|
3735
|
+
l("p", no, P(e.title), 1),
|
|
3736
|
+
l("p", { class: b(["mt-1 truncate text-3xl font-bold", r.value.value]) }, P(e.value), 3),
|
|
3737
|
+
e.subtitle ? (D(), c("p", {
|
|
3660
3738
|
key: 0,
|
|
3661
|
-
class:
|
|
3739
|
+
class: b(["mt-1 text-sm font-medium", r.value.subtitle])
|
|
3662
3740
|
}, P(e.subtitle), 3)) : s("", !0),
|
|
3663
3741
|
j(t.$slots, "default")
|
|
3664
|
-
]), t.$slots.icon ? (
|
|
3742
|
+
]), t.$slots.icon ? (D(), c("div", {
|
|
3665
3743
|
key: 0,
|
|
3666
|
-
class:
|
|
3744
|
+
class: b(["flex h-12 w-12 shrink-0 items-center justify-center rounded-xl", r.value.iconBox])
|
|
3667
3745
|
}, [j(t.$slots, "icon", { iconClass: `h-6 w-6 ${r.value.icon}` })], 2)) : s("", !0)])]),
|
|
3668
3746
|
_: 3
|
|
3669
3747
|
}, 16, ["class"]));
|
|
3670
3748
|
}
|
|
3671
|
-
}),
|
|
3749
|
+
}), io = [
|
|
3672
3750
|
"aria-checked",
|
|
3673
3751
|
"aria-label",
|
|
3674
3752
|
"disabled"
|
|
3675
|
-
],
|
|
3753
|
+
], ao = {
|
|
3676
3754
|
key: 0,
|
|
3677
3755
|
class: "text-sm font-medium text-slate-700 dark:text-slate-200"
|
|
3678
|
-
},
|
|
3756
|
+
}, oo = /* @__PURE__ */ m({
|
|
3679
3757
|
__name: "BaseToggle",
|
|
3680
3758
|
props: {
|
|
3681
3759
|
modelValue: {
|
|
@@ -3704,23 +3782,23 @@ var Wn = ["aria-label", "aria-expanded"], Gn = { class: "flex flex-col h-full" }
|
|
|
3704
3782
|
let e = !n.modelValue;
|
|
3705
3783
|
r("update:modelValue", e), r("change", e);
|
|
3706
3784
|
}
|
|
3707
|
-
return (t, n) => (
|
|
3785
|
+
return (t, n) => (D(), c("label", { class: b(["inline-flex items-center gap-3 select-none", e.disabled ? "cursor-not-allowed opacity-60" : "cursor-pointer"]) }, [l("button", {
|
|
3708
3786
|
type: "button",
|
|
3709
3787
|
role: "switch",
|
|
3710
3788
|
"aria-checked": e.modelValue,
|
|
3711
3789
|
"aria-label": e.label ? void 0 : e.ariaLabel || void 0,
|
|
3712
3790
|
disabled: e.disabled,
|
|
3713
|
-
class:
|
|
3791
|
+
class: b(["relative inline-flex h-6 w-11 shrink-0 items-center rounded-full transition-colors focus:outline-none focus-visible:ring-2 focus-visible:ring-emerald-500 focus-visible:ring-offset-2 dark:focus-visible:ring-offset-slate-900 disabled:cursor-not-allowed", e.modelValue ? i[e.color] : e.offTone === "red" ? "bg-red-200 dark:bg-red-900/50" : "bg-slate-200 dark:bg-slate-700"]),
|
|
3714
3792
|
onClick: a
|
|
3715
3793
|
}, [l("span", {
|
|
3716
|
-
class:
|
|
3794
|
+
class: b(["inline-block h-5 w-5 rounded-full bg-white shadow ring-1 ring-black/5 transition-transform", e.modelValue ? "translate-x-[22px]" : "translate-x-0.5"]),
|
|
3717
3795
|
"aria-hidden": "true"
|
|
3718
|
-
}, null, 2)], 10,
|
|
3796
|
+
}, null, 2)], 10, io), e.label ? (D(), c("span", ao, P(e.label), 1)) : s("", !0)], 2));
|
|
3719
3797
|
}
|
|
3720
|
-
}),
|
|
3798
|
+
}), so = ["checked", "disabled"], co = {
|
|
3721
3799
|
key: 0,
|
|
3722
3800
|
class: "text-sm text-slate-700 dark:text-slate-200"
|
|
3723
|
-
},
|
|
3801
|
+
}, lo = /* @__PURE__ */ m({
|
|
3724
3802
|
inheritAttrs: !1,
|
|
3725
3803
|
__name: "BaseCheckbox",
|
|
3726
3804
|
props: {
|
|
@@ -3741,21 +3819,21 @@ var Wn = ["aria-label", "aria-expanded"], Gn = { class: "flex flex-col h-full" }
|
|
|
3741
3819
|
let t = e.target.checked;
|
|
3742
3820
|
n("update:modelValue", t), n("change", t);
|
|
3743
3821
|
}
|
|
3744
|
-
return (t, n) => (
|
|
3822
|
+
return (t, n) => (D(), c("label", { class: b(["inline-flex items-center gap-2 select-none", e.disabled ? "cursor-not-allowed opacity-60" : "cursor-pointer"]) }, [l("input", v(t.$attrs, {
|
|
3745
3823
|
type: "checkbox",
|
|
3746
3824
|
checked: e.modelValue,
|
|
3747
3825
|
disabled: e.disabled,
|
|
3748
3826
|
class: "h-5 w-5 shrink-0 cursor-[inherit] rounded-md border-slate-300 bg-white text-emerald-600 accent-emerald-600 transition-colors focus:ring-2 focus:ring-emerald-500/40 focus:ring-offset-0 dark:border-slate-600 dark:bg-slate-900 dark:checked:bg-emerald-600",
|
|
3749
3827
|
onChange: r
|
|
3750
|
-
}), null, 16,
|
|
3828
|
+
}), null, 16, so), e.label || t.$slots.default ? (D(), c("span", co, [j(t.$slots, "default", {}, () => [f(P(e.label), 1)])])) : s("", !0)], 2));
|
|
3751
3829
|
}
|
|
3752
|
-
}),
|
|
3830
|
+
}), uo = { class: "flex flex-col gap-2 text-left" }, fo = {
|
|
3753
3831
|
class: "flex h-9 w-9 shrink-0 items-center justify-center rounded-full bg-emerald-100 text-sm font-semibold text-emerald-700 dark:bg-emerald-500/15 dark:text-emerald-300",
|
|
3754
3832
|
"aria-hidden": "true"
|
|
3755
|
-
},
|
|
3833
|
+
}, po = { class: "min-w-0" }, mo = { class: "block truncate text-sm font-medium text-slate-900 dark:text-slate-100" }, ho = {
|
|
3756
3834
|
key: 0,
|
|
3757
3835
|
class: "block truncate text-xs text-slate-500 dark:text-slate-400"
|
|
3758
|
-
},
|
|
3836
|
+
}, go = /* @__PURE__ */ m({
|
|
3759
3837
|
__name: "BaseSidebarUser",
|
|
3760
3838
|
props: {
|
|
3761
3839
|
name: {},
|
|
@@ -3771,23 +3849,23 @@ var Wn = ["aria-label", "aria-expanded"], Gn = { class: "flex flex-col h-full" }
|
|
|
3771
3849
|
emits: ["logout"],
|
|
3772
3850
|
setup(e, { emit: t }) {
|
|
3773
3851
|
let n = e, r = t, i = a(() => (n.name || "?").split(/[\s._-]+/).filter(Boolean).slice(0, 2).map((e) => e[0].toUpperCase()).join(""));
|
|
3774
|
-
return (t, n) => (
|
|
3852
|
+
return (t, n) => (D(), c("div", uo, [(D(), o(N(e.to ? F(Me) : "div"), v(e.to ? { to: e.to } : {}, {
|
|
3775
3853
|
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" : ""],
|
|
3776
3854
|
title: e.to ? e.profileLabel : void 0
|
|
3777
3855
|
}), {
|
|
3778
|
-
default: L(() => [l("span",
|
|
3856
|
+
default: L(() => [l("span", fo, P(i.value), 1), l("span", po, [l("span", mo, P(e.name), 1), e.email ? (D(), c("span", ho, P(e.email), 1)) : s("", !0)])]),
|
|
3779
3857
|
_: 1
|
|
3780
|
-
}, 16, ["class", "title"])), e.showLogout ? (
|
|
3858
|
+
}, 16, ["class", "title"])), e.showLogout ? (D(), o(it, {
|
|
3781
3859
|
key: 0,
|
|
3782
3860
|
class: "w-full justify-center",
|
|
3783
3861
|
description: e.logoutLabel,
|
|
3784
|
-
color: F(
|
|
3785
|
-
size: F(
|
|
3862
|
+
color: F(G).RED,
|
|
3863
|
+
size: F(K).SMALL,
|
|
3786
3864
|
outline: "",
|
|
3787
3865
|
"icon-left": "",
|
|
3788
3866
|
onClick: n[0] ||= (e) => r("logout")
|
|
3789
3867
|
}, {
|
|
3790
|
-
default: L(() => [p(F(
|
|
3868
|
+
default: L(() => [p(F(le), {
|
|
3791
3869
|
class: "mr-1.5 h-4 w-4",
|
|
3792
3870
|
"aria-hidden": "true"
|
|
3793
3871
|
})]),
|
|
@@ -3798,16 +3876,16 @@ var Wn = ["aria-label", "aria-expanded"], Gn = { class: "flex flex-col h-full" }
|
|
|
3798
3876
|
"size"
|
|
3799
3877
|
])) : s("", !0)]));
|
|
3800
3878
|
}
|
|
3801
|
-
}),
|
|
3879
|
+
}), _o = { class: "flex min-h-screen w-full flex-col items-center justify-center bg-slate-50 px-4 py-10 dark:bg-slate-950" }, vo = { class: "mb-6 flex justify-center" }, yo = {
|
|
3802
3880
|
key: 0,
|
|
3803
3881
|
class: "mb-1 text-2xl font-bold tracking-tight text-slate-900 dark:text-slate-100"
|
|
3804
|
-
},
|
|
3882
|
+
}, bo = {
|
|
3805
3883
|
key: 1,
|
|
3806
3884
|
class: "text-sm text-slate-500 dark:text-slate-400"
|
|
3807
|
-
},
|
|
3885
|
+
}, xo = {
|
|
3808
3886
|
key: 2,
|
|
3809
3887
|
class: "mt-6 border-t border-slate-200 pt-4 text-center text-sm text-slate-500 dark:border-slate-700 dark:text-slate-400"
|
|
3810
|
-
},
|
|
3888
|
+
}, So = /* @__PURE__ */ m({
|
|
3811
3889
|
__name: "BaseAuthLayout",
|
|
3812
3890
|
props: {
|
|
3813
3891
|
title: { default: "" },
|
|
@@ -3818,18 +3896,18 @@ var Wn = ["aria-label", "aria-expanded"], Gn = { class: "flex flex-col h-full" }
|
|
|
3818
3896
|
}
|
|
3819
3897
|
},
|
|
3820
3898
|
setup(e) {
|
|
3821
|
-
return (t, n) => (
|
|
3822
|
-
e.title ? (
|
|
3823
|
-
e.subtitle ? (
|
|
3824
|
-
l("div", { class:
|
|
3825
|
-
t.$slots.footer ? (
|
|
3899
|
+
return (t, n) => (D(), c("div", _o, [l("div", vo, [j(t.$slots, "logo", {}, () => [p(Nt, { size: F(q).MEDIUM }, null, 8, ["size"])])]), l("div", { class: b(["w-full rounded-xl border border-slate-200 bg-white p-6 text-left shadow-sm sm:p-8 dark:border-slate-700 dark:bg-slate-900", e.wide ? "max-w-3xl" : "max-w-md"]) }, [
|
|
3900
|
+
e.title ? (D(), c("h1", yo, P(e.title), 1)) : s("", !0),
|
|
3901
|
+
e.subtitle ? (D(), c("p", bo, P(e.subtitle), 1)) : s("", !0),
|
|
3902
|
+
l("div", { class: b(e.title || e.subtitle ? "mt-6" : "") }, [j(t.$slots, "default")], 2),
|
|
3903
|
+
t.$slots.footer ? (D(), c("div", xo, [j(t.$slots, "footer")])) : s("", !0)
|
|
3826
3904
|
], 2)]));
|
|
3827
3905
|
}
|
|
3828
3906
|
});
|
|
3829
3907
|
//#endregion
|
|
3830
3908
|
//#region node_modules/@heroicons/vue/20/solid/esm/CheckCircleIcon.js
|
|
3831
|
-
function
|
|
3832
|
-
return
|
|
3909
|
+
function Co(e, t) {
|
|
3910
|
+
return D(), c("svg", {
|
|
3833
3911
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3834
3912
|
viewBox: "0 0 20 20",
|
|
3835
3913
|
fill: "currentColor",
|
|
@@ -3843,8 +3921,8 @@ function fo(e, t) {
|
|
|
3843
3921
|
}
|
|
3844
3922
|
//#endregion
|
|
3845
3923
|
//#region node_modules/@heroicons/vue/20/solid/esm/XCircleIcon.js
|
|
3846
|
-
function
|
|
3847
|
-
return
|
|
3924
|
+
function wo(e, t) {
|
|
3925
|
+
return D(), c("svg", {
|
|
3848
3926
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3849
3927
|
viewBox: "0 0 20 20",
|
|
3850
3928
|
fill: "currentColor",
|
|
@@ -3858,7 +3936,7 @@ function po(e, t) {
|
|
|
3858
3936
|
}
|
|
3859
3937
|
//#endregion
|
|
3860
3938
|
//#region src/components/BaseBooleanBadge.vue
|
|
3861
|
-
var
|
|
3939
|
+
var To = /* @__PURE__ */ m({
|
|
3862
3940
|
__name: "BaseBooleanBadge",
|
|
3863
3941
|
props: {
|
|
3864
3942
|
value: {
|
|
@@ -3869,20 +3947,20 @@ var mo = /* @__PURE__ */ m({
|
|
|
3869
3947
|
falseLabel: { default: "No" }
|
|
3870
3948
|
},
|
|
3871
3949
|
setup(e) {
|
|
3872
|
-
return (t, n) => (
|
|
3950
|
+
return (t, n) => (D(), c("span", { class: b(["inline-flex items-center gap-1 rounded-full px-2.5 py-0.5 text-xs font-medium ring-1 ring-inset", e.value ? "bg-emerald-50 text-emerald-700 ring-emerald-600/20 dark:bg-emerald-500/10 dark:text-emerald-300 dark:ring-emerald-400/30" : "bg-red-50 text-red-700 ring-red-600/20 dark:bg-red-500/10 dark:text-red-300 dark:ring-red-400/30"]) }, [e.value ? (D(), o(F(Co), {
|
|
3873
3951
|
key: 0,
|
|
3874
3952
|
class: "h-3.5 w-3.5",
|
|
3875
3953
|
"aria-hidden": "true"
|
|
3876
|
-
})) : (
|
|
3954
|
+
})) : (D(), o(F(wo), {
|
|
3877
3955
|
key: 1,
|
|
3878
3956
|
class: "h-3.5 w-3.5",
|
|
3879
3957
|
"aria-hidden": "true"
|
|
3880
3958
|
})), f(" " + P(e.value ? e.trueLabel : e.falseLabel), 1)], 2));
|
|
3881
3959
|
}
|
|
3882
|
-
}),
|
|
3960
|
+
}), Eo = { class: "text-xs uppercase tracking-wide text-slate-500 dark:text-slate-400" }, Do = ["href"], Oo = {
|
|
3883
3961
|
key: 1,
|
|
3884
3962
|
class: "text-slate-400 dark:text-slate-500"
|
|
3885
|
-
},
|
|
3963
|
+
}, ko = /* @__PURE__ */ m({
|
|
3886
3964
|
__name: "BaseDetailList",
|
|
3887
3965
|
props: {
|
|
3888
3966
|
items: {},
|
|
@@ -3893,43 +3971,43 @@ var mo = /* @__PURE__ */ m({
|
|
|
3893
3971
|
function n(e) {
|
|
3894
3972
|
return e == null || e === "";
|
|
3895
3973
|
}
|
|
3896
|
-
return (r, i) => (
|
|
3974
|
+
return (r, i) => (D(), c("dl", { class: b(["grid grid-cols-[minmax(0,1fr)] gap-x-6 gap-y-4 text-left", t.columns === 2 ? "sm:grid-cols-[repeat(2,minmax(0,1fr))]" : t.columns === 3 ? "sm:grid-cols-[repeat(2,minmax(0,1fr))] lg:grid-cols-[repeat(3,minmax(0,1fr))]" : ""]) }, [(D(!0), c(e, null, A(t.items, (r) => (D(), c("div", {
|
|
3897
3975
|
key: r.label,
|
|
3898
3976
|
class: "min-w-0"
|
|
3899
|
-
}, [l("dt",
|
|
3977
|
+
}, [l("dt", Eo, P(r.label), 1), l("dd", { class: b(["mt-1 break-words text-sm text-slate-900 dark:text-slate-100", r.mono ? "font-mono" : ""]) }, [r.href && !n(r.value) ? (D(), c("a", {
|
|
3900
3978
|
key: 0,
|
|
3901
3979
|
href: r.href,
|
|
3902
3980
|
target: "_blank",
|
|
3903
3981
|
rel: "noopener noreferrer",
|
|
3904
3982
|
class: "text-emerald-600 hover:underline dark:text-emerald-400"
|
|
3905
|
-
}, P(r.value), 9,
|
|
3983
|
+
}, P(r.value), 9, Do)) : n(r.value) ? (D(), c("span", Oo, P(t.emptyText), 1)) : (D(), c(e, { key: 2 }, [f(P(r.value), 1)], 64))], 2)]))), 128))], 2));
|
|
3906
3984
|
}
|
|
3907
3985
|
});
|
|
3908
3986
|
//#endregion
|
|
3909
3987
|
//#region src/composables/useDebounce.ts
|
|
3910
|
-
function
|
|
3988
|
+
function Ao(e, t = 300) {
|
|
3911
3989
|
let n = k(e.value), r = null;
|
|
3912
3990
|
return I(e, (e) => {
|
|
3913
3991
|
r && clearTimeout(r), r = setTimeout(() => {
|
|
3914
3992
|
n.value = e, r = null;
|
|
3915
3993
|
}, t);
|
|
3916
|
-
}),
|
|
3994
|
+
}), T(() => {
|
|
3917
3995
|
r &&= (clearTimeout(r), null);
|
|
3918
3996
|
}), n;
|
|
3919
3997
|
}
|
|
3920
3998
|
//#endregion
|
|
3921
3999
|
//#region src/composables/useToast.ts
|
|
3922
|
-
function
|
|
3923
|
-
let t = k(!1), n = k(""), r = k(
|
|
4000
|
+
function jo(e = 3e3) {
|
|
4001
|
+
let t = k(!1), n = k(""), r = k(J.SUCCESS), i = null;
|
|
3924
4002
|
function a() {
|
|
3925
4003
|
i &&= (clearTimeout(i), null);
|
|
3926
4004
|
}
|
|
3927
|
-
function o(o, s =
|
|
4005
|
+
function o(o, s = J.SUCCESS, c = e) {
|
|
3928
4006
|
n.value = o, r.value = s, t.value = !0, a(), i = setTimeout(() => {
|
|
3929
4007
|
t.value = !1, i = null;
|
|
3930
4008
|
}, c);
|
|
3931
4009
|
}
|
|
3932
|
-
return
|
|
4010
|
+
return T(() => {
|
|
3933
4011
|
a();
|
|
3934
4012
|
}), {
|
|
3935
4013
|
showToast: t,
|
|
@@ -3940,8 +4018,8 @@ function bo(e = 3e3) {
|
|
|
3940
4018
|
}
|
|
3941
4019
|
//#endregion
|
|
3942
4020
|
//#region src/composables/useQueryParamSync.ts
|
|
3943
|
-
function
|
|
3944
|
-
let e =
|
|
4021
|
+
function Mo() {
|
|
4022
|
+
let e = Ne(), t = Pe();
|
|
3945
4023
|
function n(t) {
|
|
3946
4024
|
let n = e.query[t];
|
|
3947
4025
|
return typeof n == "string" ? n : "";
|
|
@@ -3962,8 +4040,8 @@ function xo() {
|
|
|
3962
4040
|
}
|
|
3963
4041
|
//#endregion
|
|
3964
4042
|
//#region src/composables/useFieldClasses.ts
|
|
3965
|
-
function
|
|
3966
|
-
let { isDark: e } =
|
|
4043
|
+
function No() {
|
|
4044
|
+
let { isDark: e } = U(), t = a(() => e.value ? "text-gray-300" : "text-gray-600"), n = a(() => e.value ? "bg-gray-800 border-gray-600 text-gray-100 placeholder-gray-500 focus:ring-emerald-500 focus:border-emerald-500" : "bg-white border-gray-300 text-gray-800 focus:ring-emerald-500 focus:border-emerald-500");
|
|
3967
4045
|
function r(t) {
|
|
3968
4046
|
return t == null || String(t).trim() === "" ? e.value ? "bg-gray-800 border-red-500 text-gray-100 placeholder-gray-500 focus:ring-red-500 focus:border-red-500 ring-1 ring-red-500/30" : "bg-white border-red-400 text-gray-800 focus:ring-red-500 focus:border-red-500 ring-1 ring-red-400/30" : n.value;
|
|
3969
4047
|
}
|
|
@@ -3975,7 +4053,7 @@ function So() {
|
|
|
3975
4053
|
}
|
|
3976
4054
|
//#endregion
|
|
3977
4055
|
//#region src/composables/usePolling.ts
|
|
3978
|
-
function
|
|
4056
|
+
function Po(e, t, n = {}) {
|
|
3979
4057
|
let { immediate: r = !0, pauseWhenHidden: i = !0 } = n, a = null, o = k(!1), s = !1;
|
|
3980
4058
|
function c() {
|
|
3981
4059
|
a === null && t !== null && (a = setInterval(() => void e(), t));
|
|
@@ -3998,74 +4076,120 @@ function Co(e, t, n = {}) {
|
|
|
3998
4076
|
o.value = !1, l(), s = !0;
|
|
3999
4077
|
}
|
|
4000
4078
|
}
|
|
4001
|
-
return
|
|
4079
|
+
return w(() => {
|
|
4002
4080
|
u(), i && document.addEventListener("visibilitychange", f);
|
|
4003
|
-
}),
|
|
4081
|
+
}), E(() => {
|
|
4004
4082
|
d(), i && document.removeEventListener("visibilitychange", f);
|
|
4005
4083
|
}), {
|
|
4006
4084
|
start: u,
|
|
4007
4085
|
stop: d,
|
|
4008
|
-
active:
|
|
4086
|
+
active: ee(o)
|
|
4087
|
+
};
|
|
4088
|
+
}
|
|
4089
|
+
//#endregion
|
|
4090
|
+
//#region src/composables/useLatestRequest.ts
|
|
4091
|
+
function Fo() {
|
|
4092
|
+
let e = 0, t = null;
|
|
4093
|
+
function n() {
|
|
4094
|
+
let n = ++e;
|
|
4095
|
+
t?.abort();
|
|
4096
|
+
let r = new AbortController();
|
|
4097
|
+
return t = r, {
|
|
4098
|
+
signal: r.signal,
|
|
4099
|
+
isLatest: () => n === e
|
|
4100
|
+
};
|
|
4101
|
+
}
|
|
4102
|
+
function r() {
|
|
4103
|
+
++e, t?.abort(), t = null;
|
|
4104
|
+
}
|
|
4105
|
+
return g() && T(r), {
|
|
4106
|
+
begin: n,
|
|
4107
|
+
cancel: r
|
|
4108
|
+
};
|
|
4109
|
+
}
|
|
4110
|
+
function Io(e) {
|
|
4111
|
+
return typeof DOMException < "u" && e instanceof DOMException && e.name === "AbortError" || e instanceof Error && e.name === "AbortError";
|
|
4112
|
+
}
|
|
4113
|
+
//#endregion
|
|
4114
|
+
//#region src/composables/useDirtyState.ts
|
|
4115
|
+
function Lo(e) {
|
|
4116
|
+
return JSON.stringify(e, (e, t) => {
|
|
4117
|
+
if (typeof t == "object" && t && !Array.isArray(t)) {
|
|
4118
|
+
let e = {};
|
|
4119
|
+
for (let n of Object.keys(t).sort()) e[n] = t[n];
|
|
4120
|
+
return e;
|
|
4121
|
+
}
|
|
4122
|
+
return t;
|
|
4123
|
+
});
|
|
4124
|
+
}
|
|
4125
|
+
function Ro(e) {
|
|
4126
|
+
let t = k(Lo(e())), n = a(() => Lo(e()) !== t.value);
|
|
4127
|
+
function r() {
|
|
4128
|
+
t.value = Lo(e());
|
|
4129
|
+
}
|
|
4130
|
+
return {
|
|
4131
|
+
dirty: n,
|
|
4132
|
+
markClean: r
|
|
4009
4133
|
};
|
|
4010
4134
|
}
|
|
4011
4135
|
//#endregion
|
|
4012
4136
|
//#region src/enums/BaseBadgeEnum.ts
|
|
4013
|
-
var
|
|
4137
|
+
var zo = /* @__PURE__ */ function(e) {
|
|
4014
4138
|
return e.WIN = "WIN", e.LOSE = "LOSE", e;
|
|
4015
4139
|
}({});
|
|
4016
4140
|
//#endregion
|
|
4017
4141
|
//#region src/utils/util.ts
|
|
4018
|
-
function
|
|
4142
|
+
function Bo(e) {
|
|
4019
4143
|
let t = "red";
|
|
4020
4144
|
switch (e) {
|
|
4021
|
-
case
|
|
4145
|
+
case B.ERROR:
|
|
4022
4146
|
t = "red";
|
|
4023
4147
|
break;
|
|
4024
|
-
case
|
|
4148
|
+
case B.SUCCESS:
|
|
4025
4149
|
t = "green";
|
|
4026
4150
|
break;
|
|
4027
|
-
case
|
|
4151
|
+
case B.INFO:
|
|
4028
4152
|
t = "gray";
|
|
4029
4153
|
break;
|
|
4030
|
-
case
|
|
4154
|
+
case B.WARNING: t = "yellow";
|
|
4031
4155
|
}
|
|
4032
4156
|
return t;
|
|
4033
4157
|
}
|
|
4034
|
-
function
|
|
4158
|
+
function Vo(e) {
|
|
4035
4159
|
let t = "red";
|
|
4036
4160
|
switch (e) {
|
|
4037
|
-
case
|
|
4161
|
+
case W.GREEN:
|
|
4038
4162
|
t = "green";
|
|
4039
4163
|
break;
|
|
4040
|
-
case
|
|
4164
|
+
case W.RED:
|
|
4041
4165
|
t = "red";
|
|
4042
4166
|
break;
|
|
4043
|
-
case
|
|
4167
|
+
case W.BLUE:
|
|
4044
4168
|
t = "blue";
|
|
4045
4169
|
break;
|
|
4046
|
-
case
|
|
4170
|
+
case W.YELLOW:
|
|
4047
4171
|
t = "yellow";
|
|
4048
4172
|
break;
|
|
4049
|
-
case
|
|
4173
|
+
case W.BLACK:
|
|
4050
4174
|
t = "black";
|
|
4051
4175
|
break;
|
|
4052
|
-
case
|
|
4176
|
+
case W.GRAY:
|
|
4053
4177
|
t = "gray";
|
|
4054
4178
|
break;
|
|
4055
|
-
case
|
|
4179
|
+
case W.NONE: t = "";
|
|
4056
4180
|
}
|
|
4057
4181
|
return t;
|
|
4058
4182
|
}
|
|
4059
4183
|
//#endregion
|
|
4060
4184
|
//#region src/utils/httpColors.ts
|
|
4061
|
-
var
|
|
4185
|
+
var Ho = {
|
|
4062
4186
|
GET: "bg-blue-600",
|
|
4063
4187
|
POST: "bg-emerald-600",
|
|
4064
4188
|
PUT: "bg-amber-600",
|
|
4065
4189
|
DELETE: "bg-red-600",
|
|
4066
4190
|
PATCH: "bg-purple-600",
|
|
4067
4191
|
HEAD: "bg-gray-600"
|
|
4068
|
-
},
|
|
4192
|
+
}, Uo = {
|
|
4069
4193
|
GET: "bg-blue-500",
|
|
4070
4194
|
POST: "bg-green-500",
|
|
4071
4195
|
PUT: "bg-yellow-500",
|
|
@@ -4073,39 +4197,39 @@ var Do = {
|
|
|
4073
4197
|
PATCH: "bg-purple-500",
|
|
4074
4198
|
HEAD: "bg-gray-500"
|
|
4075
4199
|
};
|
|
4076
|
-
function
|
|
4077
|
-
return e ?
|
|
4200
|
+
function Wo(e) {
|
|
4201
|
+
return e ? Ho[e.toUpperCase()] ?? "bg-gray-600" : "bg-gray-600";
|
|
4078
4202
|
}
|
|
4079
|
-
function
|
|
4080
|
-
return e ?
|
|
4203
|
+
function Go(e) {
|
|
4204
|
+
return e ? Uo[e.toUpperCase()] ?? "bg-gray-500" : "bg-gray-500";
|
|
4081
4205
|
}
|
|
4082
|
-
function
|
|
4206
|
+
function Ko(e) {
|
|
4083
4207
|
let t = e ?? 0;
|
|
4084
4208
|
return t >= 200 && t < 300 ? "bg-emerald-600" : t >= 300 && t < 400 ? "bg-blue-600" : t >= 400 && t < 500 ? "bg-amber-600" : t >= 500 ? "bg-red-600" : "bg-gray-600";
|
|
4085
4209
|
}
|
|
4086
|
-
function
|
|
4210
|
+
function qo(e, t) {
|
|
4087
4211
|
let n = (e || "ANY").toUpperCase();
|
|
4088
4212
|
return n === "GET" ? t ? "bg-blue-500/15 text-blue-400" : "bg-blue-100 text-blue-700" : n === "POST" ? t ? "bg-emerald-500/15 text-emerald-400" : "bg-emerald-100 text-emerald-700" : n === "PUT" ? t ? "bg-amber-500/15 text-amber-400" : "bg-amber-100 text-amber-700" : n === "DELETE" ? t ? "bg-red-500/15 text-red-400" : "bg-red-100 text-red-700" : n === "PATCH" ? t ? "bg-purple-500/15 text-purple-400" : "bg-purple-100 text-purple-700" : n === "HEAD" ? t ? "bg-sky-500/15 text-sky-400" : "bg-sky-100 text-sky-700" : t ? "bg-gray-500/15 text-gray-400" : "bg-gray-100 text-gray-600";
|
|
4089
4213
|
}
|
|
4090
|
-
function
|
|
4214
|
+
function Jo(e, t) {
|
|
4091
4215
|
let n = e ?? 200;
|
|
4092
4216
|
return n >= 200 && n < 300 ? t ? "bg-emerald-500/15 text-emerald-300" : "bg-emerald-100 text-emerald-700" : n >= 300 && n < 400 ? t ? "bg-sky-500/15 text-sky-300" : "bg-sky-100 text-sky-700" : n >= 400 && n < 500 ? t ? "bg-amber-500/15 text-amber-300" : "bg-amber-100 text-amber-700" : n >= 500 && n < 600 ? t ? "bg-red-500/15 text-red-300" : "bg-red-100 text-red-700" : t ? "bg-gray-800 text-gray-400" : "bg-gray-100 text-gray-600";
|
|
4093
4217
|
}
|
|
4094
|
-
function
|
|
4218
|
+
function Yo(e, t) {
|
|
4095
4219
|
let n = e ?? 200;
|
|
4096
4220
|
return t ? n >= 200 && n < 300 ? "bg-green-500/15 text-green-400" : n >= 300 && n < 400 ? "bg-blue-500/15 text-blue-400" : n >= 400 && n < 500 ? "bg-yellow-500/15 text-yellow-400" : "bg-red-500/15 text-red-400" : n >= 200 && n < 300 ? "bg-green-100 text-green-800" : n >= 300 && n < 400 ? "bg-blue-100 text-blue-800" : n >= 400 && n < 500 ? "bg-yellow-100 text-yellow-800" : "bg-red-100 text-red-800";
|
|
4097
4221
|
}
|
|
4098
4222
|
//#endregion
|
|
4099
4223
|
//#region src/utils/kvRows.ts
|
|
4100
|
-
function
|
|
4224
|
+
function Xo(e) {
|
|
4101
4225
|
return !(e.key ?? "").trim() || e.matcherType === "absent" ? !1 : !(e.value ?? "").trim();
|
|
4102
4226
|
}
|
|
4103
|
-
function
|
|
4227
|
+
function Zo(e) {
|
|
4104
4228
|
return e.matcherType === "absent" || !(e.value ?? "").trim() ? !1 : !(e.key ?? "").trim();
|
|
4105
4229
|
}
|
|
4106
4230
|
//#endregion
|
|
4107
4231
|
//#region src/utils/sanitizeHtml.ts
|
|
4108
|
-
var
|
|
4232
|
+
var Qo = /* @__PURE__ */ new Set([
|
|
4109
4233
|
"A",
|
|
4110
4234
|
"B",
|
|
4111
4235
|
"STRONG",
|
|
@@ -4120,7 +4244,7 @@ var Lo = /* @__PURE__ */ new Set([
|
|
|
4120
4244
|
"LI",
|
|
4121
4245
|
"SPAN",
|
|
4122
4246
|
"DIV"
|
|
4123
|
-
]),
|
|
4247
|
+
]), $o = /* @__PURE__ */ new Set([
|
|
4124
4248
|
"SCRIPT",
|
|
4125
4249
|
"STYLE",
|
|
4126
4250
|
"IFRAME",
|
|
@@ -4128,53 +4252,53 @@ var Lo = /* @__PURE__ */ new Set([
|
|
|
4128
4252
|
"EMBED",
|
|
4129
4253
|
"NOSCRIPT",
|
|
4130
4254
|
"TEMPLATE"
|
|
4131
|
-
]),
|
|
4132
|
-
function
|
|
4255
|
+
]), es = { A: /* @__PURE__ */ new Set(["href", "title"]) };
|
|
4256
|
+
function ts(e) {
|
|
4133
4257
|
let t = e.trim().toLowerCase();
|
|
4134
4258
|
return t.startsWith("http://") || t.startsWith("https://") || t.startsWith("mailto:") || t.startsWith("tel:") || t.startsWith("/") || t.startsWith("#") || t === "";
|
|
4135
4259
|
}
|
|
4136
|
-
function
|
|
4260
|
+
function ns(e) {
|
|
4137
4261
|
if (e.nodeType !== Node.ELEMENT_NODE) return;
|
|
4138
4262
|
let t = e, n = t.tagName.toUpperCase();
|
|
4139
|
-
if (!
|
|
4140
|
-
|
|
4263
|
+
if (!Qo.has(n)) {
|
|
4264
|
+
$o.has(n) ? t.remove() : t.replaceWith(document.createTextNode(t.textContent ?? ""));
|
|
4141
4265
|
return;
|
|
4142
4266
|
}
|
|
4143
|
-
let r =
|
|
4267
|
+
let r = es[n] ?? /* @__PURE__ */ new Set();
|
|
4144
4268
|
for (let e of Array.from(t.attributes)) {
|
|
4145
4269
|
if (!r.has(e.name.toLowerCase())) {
|
|
4146
4270
|
t.removeAttribute(e.name);
|
|
4147
4271
|
continue;
|
|
4148
4272
|
}
|
|
4149
|
-
n === "A" && e.name.toLowerCase() === "href" && !
|
|
4273
|
+
n === "A" && e.name.toLowerCase() === "href" && !ts(e.value) && t.removeAttribute(e.name);
|
|
4150
4274
|
}
|
|
4151
4275
|
n === "A" && t.hasAttribute("href") && (t.setAttribute("rel", "noopener noreferrer"), t.setAttribute("target", "_blank"));
|
|
4152
|
-
for (let e of Array.from(t.childNodes))
|
|
4276
|
+
for (let e of Array.from(t.childNodes)) ns(e);
|
|
4153
4277
|
}
|
|
4154
|
-
function
|
|
4278
|
+
function rs(e) {
|
|
4155
4279
|
if (!e) return "";
|
|
4156
4280
|
let t = new DOMParser().parseFromString(`<div>${e}</div>`, "text/html").body.firstElementChild;
|
|
4157
4281
|
if (!t) return "";
|
|
4158
|
-
for (let e of Array.from(t.childNodes))
|
|
4282
|
+
for (let e of Array.from(t.childNodes)) ns(e);
|
|
4159
4283
|
return t.innerHTML;
|
|
4160
4284
|
}
|
|
4161
4285
|
//#endregion
|
|
4162
4286
|
//#region src/utils/format.ts
|
|
4163
|
-
var
|
|
4164
|
-
function
|
|
4165
|
-
if (e == null || typeof e == "string" && e.trim() === "") return
|
|
4287
|
+
var $ = "—";
|
|
4288
|
+
function is(e, t = 4) {
|
|
4289
|
+
if (e == null || typeof e == "string" && e.trim() === "") return $;
|
|
4166
4290
|
let n = typeof e == "string" ? Number(e) : e;
|
|
4167
4291
|
return isFinite(n) ? n.toLocaleString(void 0, {
|
|
4168
4292
|
minimumFractionDigits: t,
|
|
4169
4293
|
maximumFractionDigits: t
|
|
4170
|
-
}) :
|
|
4294
|
+
}) : $;
|
|
4171
4295
|
}
|
|
4172
|
-
function
|
|
4173
|
-
if (e == null || e === "") return
|
|
4296
|
+
function as(e) {
|
|
4297
|
+
if (e == null || e === "") return $;
|
|
4174
4298
|
let t = new Date(e);
|
|
4175
4299
|
return isNaN(t.getTime()) ? String(e) : t.toLocaleString();
|
|
4176
4300
|
}
|
|
4177
|
-
function
|
|
4301
|
+
function os(e) {
|
|
4178
4302
|
return new Date(e).toLocaleString(void 0, {
|
|
4179
4303
|
month: "short",
|
|
4180
4304
|
day: "numeric",
|
|
@@ -4182,13 +4306,13 @@ function Ko(e) {
|
|
|
4182
4306
|
minute: "2-digit"
|
|
4183
4307
|
});
|
|
4184
4308
|
}
|
|
4185
|
-
function
|
|
4309
|
+
function ss(e) {
|
|
4186
4310
|
return new Date(e).toLocaleDateString(void 0, {
|
|
4187
4311
|
month: "short",
|
|
4188
4312
|
day: "numeric"
|
|
4189
4313
|
});
|
|
4190
4314
|
}
|
|
4191
|
-
function
|
|
4315
|
+
function cs(e) {
|
|
4192
4316
|
try {
|
|
4193
4317
|
return new Date(e).toLocaleString(void 0, {
|
|
4194
4318
|
year: "numeric",
|
|
@@ -4204,7 +4328,7 @@ function Jo(e) {
|
|
|
4204
4328
|
return String(e);
|
|
4205
4329
|
}
|
|
4206
4330
|
}
|
|
4207
|
-
function
|
|
4331
|
+
function ls(e) {
|
|
4208
4332
|
if (!isFinite(e) || e === 0) return e.toFixed(2);
|
|
4209
4333
|
let t = Math.abs(e), n = 2;
|
|
4210
4334
|
return t < 1e-4 ? n = 8 : t < .01 ? n = 6 : t < 1 ? n = 4 : t < 100 && (n = 3), e.toLocaleString(void 0, {
|
|
@@ -4212,14 +4336,24 @@ function Yo(e) {
|
|
|
4212
4336
|
maximumFractionDigits: n
|
|
4213
4337
|
});
|
|
4214
4338
|
}
|
|
4215
|
-
function
|
|
4339
|
+
function us(e, t = 2) {
|
|
4216
4340
|
return `${e >= 0 ? "+" : ""}${e.toFixed(t)}%`;
|
|
4217
4341
|
}
|
|
4218
|
-
function
|
|
4342
|
+
function ds(e) {
|
|
4219
4343
|
return `${e < 0 ? "-" : "+"}$${Math.abs(e).toFixed(2)}`;
|
|
4220
4344
|
}
|
|
4221
|
-
function
|
|
4222
|
-
if (e == null || e === "") return
|
|
4345
|
+
function fs(e, t = 2, n = "$") {
|
|
4346
|
+
if (e == null || typeof e == "string" && e.trim() === "") return $;
|
|
4347
|
+
let r = typeof e == "string" ? Number(e) : e;
|
|
4348
|
+
if (!isFinite(r)) return $;
|
|
4349
|
+
let i = Math.abs(r).toLocaleString(void 0, {
|
|
4350
|
+
minimumFractionDigits: t,
|
|
4351
|
+
maximumFractionDigits: t
|
|
4352
|
+
});
|
|
4353
|
+
return `${r < 0 && Number(Math.abs(r).toFixed(t)) !== 0 ? "-" : ""}${n}${i}`;
|
|
4354
|
+
}
|
|
4355
|
+
function ps(e) {
|
|
4356
|
+
if (e == null || e === "") return $;
|
|
4223
4357
|
let t = new Date(e);
|
|
4224
4358
|
return isNaN(t.getTime()) ? String(e) : t.toLocaleDateString("en-US", {
|
|
4225
4359
|
year: "numeric",
|
|
@@ -4227,8 +4361,8 @@ function Qo(e) {
|
|
|
4227
4361
|
day: "numeric"
|
|
4228
4362
|
});
|
|
4229
4363
|
}
|
|
4230
|
-
function
|
|
4231
|
-
if (e == null || e === "") return
|
|
4364
|
+
function ms(e) {
|
|
4365
|
+
if (e == null || e === "") return $;
|
|
4232
4366
|
let t = new Date(e);
|
|
4233
4367
|
return isNaN(t.getTime()) ? String(e) : t.toLocaleDateString("en-US", {
|
|
4234
4368
|
year: "numeric",
|
|
@@ -4238,22 +4372,22 @@ function $o(e) {
|
|
|
4238
4372
|
minute: "2-digit"
|
|
4239
4373
|
});
|
|
4240
4374
|
}
|
|
4241
|
-
function
|
|
4375
|
+
function hs(e) {
|
|
4242
4376
|
if (typeof e != "number" || !isFinite(e) || e <= 0) return "";
|
|
4243
4377
|
let t = e / 1e3, n = t < 1 ? 3 : 2;
|
|
4244
4378
|
return `= ${t.toFixed(n)} s`;
|
|
4245
4379
|
}
|
|
4246
|
-
function
|
|
4380
|
+
function gs(e) {
|
|
4247
4381
|
return e ? e < 1024 ? `${e} B` : e < 1048576 ? `${(e / 1024).toFixed(1)} KB` : `${(e / 1048576).toFixed(1)} MB` : "";
|
|
4248
4382
|
}
|
|
4249
|
-
function
|
|
4383
|
+
function _s(e) {
|
|
4250
4384
|
try {
|
|
4251
4385
|
return JSON.stringify(JSON.parse(e), null, 2);
|
|
4252
4386
|
} catch {
|
|
4253
4387
|
return e;
|
|
4254
4388
|
}
|
|
4255
4389
|
}
|
|
4256
|
-
function
|
|
4390
|
+
function vs(e) {
|
|
4257
4391
|
if (e == null) return "";
|
|
4258
4392
|
if (typeof e == "string") return e;
|
|
4259
4393
|
try {
|
|
@@ -4262,14 +4396,14 @@ function rs(e) {
|
|
|
4262
4396
|
return String(e);
|
|
4263
4397
|
}
|
|
4264
4398
|
}
|
|
4265
|
-
function
|
|
4266
|
-
if (e == null || !isFinite(e)) return
|
|
4399
|
+
function ys(e, t = 2) {
|
|
4400
|
+
if (e == null || !isFinite(e)) return $;
|
|
4267
4401
|
let n = Math.floor(Math.max(0, e) / 6e4), r = Math.floor(n / 1440), i = Math.floor(n % 1440 / 60), a = n % 60, o = [];
|
|
4268
4402
|
return r > 0 && o.push(`${r}d`), (r > 0 || i > 0) && o.push(`${i}h`), o.push(`${a}m`), o.slice(0, t).join(" ");
|
|
4269
4403
|
}
|
|
4270
4404
|
//#endregion
|
|
4271
4405
|
//#region src/utils/validate.ts
|
|
4272
|
-
function
|
|
4406
|
+
function bs(e) {
|
|
4273
4407
|
let t = (e ?? "").trim();
|
|
4274
4408
|
if (!t) return !1;
|
|
4275
4409
|
try {
|
|
@@ -4279,7 +4413,7 @@ function as(e) {
|
|
|
4279
4413
|
return !1;
|
|
4280
4414
|
}
|
|
4281
4415
|
}
|
|
4282
|
-
function
|
|
4416
|
+
function xs(e) {
|
|
4283
4417
|
if (!e.trim()) return !0;
|
|
4284
4418
|
try {
|
|
4285
4419
|
return JSON.parse(e), !0;
|
|
@@ -4287,7 +4421,7 @@ function os(e) {
|
|
|
4287
4421
|
return !1;
|
|
4288
4422
|
}
|
|
4289
4423
|
}
|
|
4290
|
-
function
|
|
4424
|
+
function Ss(e) {
|
|
4291
4425
|
if (!e.trim()) return !0;
|
|
4292
4426
|
try {
|
|
4293
4427
|
return !new DOMParser().parseFromString(e, "application/xml").getElementsByTagName("parsererror").length;
|
|
@@ -4295,7 +4429,7 @@ function ss(e) {
|
|
|
4295
4429
|
return !1;
|
|
4296
4430
|
}
|
|
4297
4431
|
}
|
|
4298
|
-
function
|
|
4432
|
+
function Cs(e) {
|
|
4299
4433
|
if (!e.trim()) return !0;
|
|
4300
4434
|
let t = e.replace(/\s+/g, "");
|
|
4301
4435
|
if (!t) return !0;
|
|
@@ -4308,7 +4442,7 @@ function cs(e) {
|
|
|
4308
4442
|
}
|
|
4309
4443
|
//#endregion
|
|
4310
4444
|
//#region src/utils/specForm.ts
|
|
4311
|
-
function
|
|
4445
|
+
function ws(e, t) {
|
|
4312
4446
|
let n = {};
|
|
4313
4447
|
if (!e) return n;
|
|
4314
4448
|
for (let r of e) {
|
|
@@ -4317,7 +4451,7 @@ function ls(e, t) {
|
|
|
4317
4451
|
}
|
|
4318
4452
|
return n;
|
|
4319
4453
|
}
|
|
4320
|
-
function
|
|
4454
|
+
function Ts(e, t) {
|
|
4321
4455
|
if (!e) return null;
|
|
4322
4456
|
for (let n of e) if (n.type === "decimal" || n.type === "integer") {
|
|
4323
4457
|
let e = t[n.key], r = e === "" || e == null;
|
|
@@ -4328,7 +4462,7 @@ function us(e, t) {
|
|
|
4328
4462
|
}
|
|
4329
4463
|
//#endregion
|
|
4330
4464
|
//#region src/utils/pnl.ts
|
|
4331
|
-
function
|
|
4465
|
+
function Es(e) {
|
|
4332
4466
|
if (e.buyPrice == null || e.lastPrice == null || e.filledQty == null) return {
|
|
4333
4467
|
pnlUsd: null,
|
|
4334
4468
|
pnlPct: null
|
|
@@ -4343,4 +4477,4 @@ function ds(e) {
|
|
|
4343
4477
|
};
|
|
4344
4478
|
}
|
|
4345
4479
|
//#endregion
|
|
4346
|
-
export {
|
|
4480
|
+
export { B as AlertEnum, Or as BaseActionButton, Ve as BaseAlert, vr as BaseAppLayout, So as BaseAuthLayout, Ge as BaseBadge, zo as BaseBadgeEnum, xa as BaseBarDistribution, To as BaseBooleanBadge, Ye as BaseBreadcrumb, it as BaseButton, G as BaseButtonEnum, K as BaseButtonSizeEnum, Ja as BaseCard, lo as BaseCheckbox, ti as BaseChipButton, li as BaseCodeBlock, Tn as BaseCollapsibleSection, kn as BaseConfirmModal, Ar as BaseCopyButton, oa as BaseCredentialsForm, ja as BaseDateTimePicker, ko as BaseDetailList, vi as BaseDropdown, hr as BaseEntityPickerModal, $a as BaseField, ci as BaseFileDropzone, Ui as BaseFilterChip, Pr as BaseGoogleSignInButton, Aa as BaseGroupedChecklist, di as BaseInput, lt as BaseLine, ut as BaseLoginEnum, Kr as BaseLoginForm, Nt as BaseLogo, q as BaseLogoEnum, Bt as BaseModal, Pt as BaseModalEnum, Sn as BaseModalShell, In as BaseNotFoundPage, $r as BaseNotificationPanel, Sr as BasePageHeader, ga as BasePillPickerModal, ni as BaseRemoveButton, Vt as BaseRow, Ba as BaseSearchSelect, Si as BaseSegmentedControl, pi as BaseSelect, nr as BaseSidebar, go as BaseSidebarUser, Ri as BaseSpecFields, Ht as BaseSpinner, Vi as BaseStatBreakdown, ro as BaseStatCard, ai as BaseStatusPill, Ai as BaseTable, Nn as BaseTextInputModal, Gt as BaseToast, J as BaseToastEnum, oo as BaseToggle, Tr as BaseToolbarButton, qt as ColoredSquares, W as ColorsEnums, Xt as EarningsCard, tn as EuroAmount, at as LineEnum, sn as Pagination, Y as PositioningEnum, fn as TrendArrow, ws as buildSpecParams, Es as computePnL, Ts as firstInvalidNumericSpec, gs as fmtBytes, ps as fmtCalendarDate, ms as fmtCalendarDateTime, as as fmtDate, ss as fmtDateShort, os as fmtDateTime, cs as fmtDateTimeMs, ys as fmtDuration, fs as fmtMoney, hs as fmtMsAsSeconds, is as fmtNumber, us as fmtPct, ls as fmtPrice, ds as fmtUsd, _s as formatJson, Bo as getBaseColor, Vo as getBaseColorOf, He as humanizeEnum, Ue as humanizeTextVNodes, Re as initTheme, Io as isAbortError, ts as isSafeHref, bs as isValidAbsoluteUrl, Cs as isValidBase64, xs as isValidJson, Ss as isValidXml, Go as methodBadgeBright, Wo as methodBadgeSolid, qo as methodBadgeTinted, Zo as rowKeyMissing, Xo as rowValueMissing, rs as sanitizeHtml, Lo as stableStringify, Jo as statusBadgeSoft, Ko as statusBadgeSolid, Yo as statusBadgeTinted, vs as stringifyValue, Ao as useDebouncedRef, Ro as useDirtyState, pn as useEscapeKey, No as useFieldClasses, Fo as useLatestRequest, Rn as useMobileSidebar, Gn as useNotifications, Po as usePolling, Mo as useQueryParamSync, Hn as useSidebarCollapse, U as useTheme, X as useThemeClasses, jo as useToast };
|