mgv-backoffice 1.36.3 → 1.38.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 +120 -3
- package/dist/components/BaseCard.vue.d.ts +33 -0
- package/dist/components/BaseDateTimePicker.vue.d.ts +49 -0
- package/dist/components/BaseField.vue.d.ts +38 -0
- package/dist/components/BaseSearchSelect.vue.d.ts +41 -0
- package/dist/components/BaseStatCard.vue.d.ts +33 -0
- package/dist/components/BaseTable.vue.d.ts +3 -0
- package/dist/index.d.ts +6 -0
- package/dist/ui-lib.css +1 -1
- package/dist/ui-lib.js +1308 -911
- package/dist/ui-lib.umd.cjs +1 -1
- package/package.json +4 -1
- package/src/components/BaseBreadcrumb.vue +68 -68
- package/src/components/BaseCard.test.ts +55 -0
- package/src/components/BaseCard.vue +48 -0
- package/src/components/BaseDateTimePicker.test.ts +49 -0
- package/src/components/BaseDateTimePicker.vue +91 -0
- package/src/components/BaseField.vue +47 -0
- package/src/components/BaseInput.test.ts +1 -1
- package/src/components/BaseInput.vue +46 -46
- package/src/components/BaseLogo.test.ts +26 -0
- package/src/components/BaseLogo.vue +7 -1
- package/src/components/BaseSearchSelect.test.ts +117 -0
- package/src/components/BaseSearchSelect.vue +318 -0
- package/src/components/BaseSelect.test.ts +3 -3
- package/src/components/BaseSelect.vue +61 -46
- package/src/components/BaseStatCard.test.ts +40 -0
- package/src/components/BaseStatCard.vue +103 -0
- package/src/components/BaseTable.test.ts +69 -55
- package/src/components/BaseTable.vue +62 -50
- package/src/index.ts +8 -0
- package/src/style.css +58 -0
package/dist/ui-lib.js
CHANGED
|
@@ -1,125 +1,126 @@
|
|
|
1
|
-
import { Fragment as e, Teleport as t, Text as n, Transition as r, computed as i, createBlock as a, createCommentVNode as o, createElementBlock as s, createElementVNode as c, createSlots as l, createStaticVNode as u, createTextVNode as d, createVNode as f, defineComponent as p, effectScope as m,
|
|
2
|
-
import { ArrowDownIcon as
|
|
3
|
-
import { HomeIcon as
|
|
4
|
-
import { useRoute as
|
|
1
|
+
import { Fragment as e, Teleport as t, Text as n, Transition as r, computed as i, createBlock as a, createCommentVNode as o, createElementBlock as s, createElementVNode as c, createSlots as l, createStaticVNode as u, createTextVNode as d, createVNode as f, defineComponent as p, effectScope as m, guardReactiveProps as h, mergeProps as g, nextTick as _, normalizeClass as v, normalizeProps as y, normalizeStyle as b, onBeforeUnmount as x, onMounted as S, onScopeDispose as C, onUnmounted as w, openBlock as T, reactive as E, readonly as D, ref as O, renderList as k, renderSlot as A, resolveComponent as j, resolveDynamicComponent as M, toDisplayString as N, unref as P, useId as ee, useSlots as F, vModelCheckbox as te, vModelDynamic as ne, vModelText as re, vShow as ie, watch as I, withCtx as L, withDirectives as R, withKeys as ae, withModifiers as z } from "vue";
|
|
2
|
+
import { ArrowDownIcon as oe, ArrowUpIcon as se, Bars3Icon as ce, BellIcon as le, CheckCircleIcon as ue, CheckIcon as de, ChevronDoubleLeftIcon as fe, ChevronDoubleRightIcon as pe, ChevronDownIcon as me, ChevronRightIcon as he, ClipboardDocumentCheckIcon as ge, ClipboardDocumentIcon as _e, DocumentDuplicateIcon as ve, ExclamationCircleIcon as ye, ExclamationTriangleIcon as be, FolderIcon as xe, InformationCircleIcon as Se, MagnifyingGlassIcon as Ce, MinusIcon as we, MoonIcon as Te, SunIcon as Ee, XMarkIcon as B } from "@heroicons/vue/24/outline";
|
|
3
|
+
import { HomeIcon as De } from "@heroicons/vue/24/solid";
|
|
4
|
+
import { RouterLink as Oe, useRoute as ke, useRouter as Ae } from "vue-router";
|
|
5
|
+
import { VueDatePicker as je } from "@vuepic/vue-datepicker";
|
|
5
6
|
//#region src/enums/AlertEnum.ts
|
|
6
|
-
var
|
|
7
|
+
var V = /* @__PURE__ */ function(e) {
|
|
7
8
|
return e.WARNING = "WARNING", e.ERROR = "ERROR", e.SUCCESS = "SUCCESS", e.INFO = "INFO", e;
|
|
8
|
-
}({}),
|
|
9
|
-
function
|
|
10
|
-
if (
|
|
11
|
-
e !==
|
|
9
|
+
}({}), H = O(!1), Me = !1, U = "mgv-theme";
|
|
10
|
+
function Ne(e) {
|
|
11
|
+
if (Me) {
|
|
12
|
+
e !== U && console.warn(`[ui-lib] useTheme: storage key "${e}" ignored — theme already initialized with "${U}". Call initTheme({ storageKey }) before mounting any component.`);
|
|
12
13
|
return;
|
|
13
14
|
}
|
|
14
|
-
if (
|
|
15
|
-
let e = window.localStorage?.getItem(
|
|
16
|
-
e ?
|
|
15
|
+
if (Me = !0, U = e, typeof window < "u") {
|
|
16
|
+
let e = window.localStorage?.getItem(U);
|
|
17
|
+
e ? H.value = e === "dark" : typeof window.matchMedia == "function" && (H.value = window.matchMedia("(prefers-color-scheme: dark)").matches);
|
|
17
18
|
}
|
|
18
19
|
typeof document < "u" && m(!0).run(() => {
|
|
19
|
-
|
|
20
|
-
document.documentElement.classList.toggle("dark", e), window.localStorage?.setItem(
|
|
20
|
+
I(H, (e) => {
|
|
21
|
+
document.documentElement.classList.toggle("dark", e), window.localStorage?.setItem(U, e ? "dark" : "light");
|
|
21
22
|
}, { immediate: !0 });
|
|
22
23
|
});
|
|
23
24
|
}
|
|
24
|
-
function
|
|
25
|
-
|
|
25
|
+
function Pe(e) {
|
|
26
|
+
Ne(e?.storageKey ?? U);
|
|
26
27
|
}
|
|
27
|
-
function
|
|
28
|
-
|
|
28
|
+
function W(e) {
|
|
29
|
+
Ne(e?.storageKey ?? U);
|
|
29
30
|
function t() {
|
|
30
|
-
|
|
31
|
+
H.value = !H.value;
|
|
31
32
|
}
|
|
32
33
|
return {
|
|
33
|
-
isDark:
|
|
34
|
+
isDark: H,
|
|
34
35
|
toggleTheme: t
|
|
35
36
|
};
|
|
36
37
|
}
|
|
37
38
|
//#endregion
|
|
38
39
|
//#region src/components/BaseAlert.vue?vue&type=script&setup=true&lang.ts
|
|
39
|
-
var
|
|
40
|
+
var Fe = { class: "min-w-0 flex-1" }, Ie = {
|
|
40
41
|
key: 0,
|
|
41
42
|
class: "font-medium"
|
|
42
|
-
},
|
|
43
|
+
}, Le = /* @__PURE__ */ p({
|
|
43
44
|
__name: "BaseAlert",
|
|
44
45
|
props: {
|
|
45
46
|
title: { default: "" },
|
|
46
|
-
color: { default:
|
|
47
|
+
color: { default: V.ERROR },
|
|
47
48
|
compact: {
|
|
48
49
|
type: Boolean,
|
|
49
50
|
default: !1
|
|
50
51
|
}
|
|
51
52
|
},
|
|
52
53
|
setup(e) {
|
|
53
|
-
let t = e, { isDark: n } =
|
|
54
|
-
[
|
|
54
|
+
let t = e, { isDark: n } = W(), r = {
|
|
55
|
+
[V.ERROR]: {
|
|
55
56
|
light: "bg-red-50 border-red-200 text-red-700",
|
|
56
57
|
dark: "bg-red-500/10 border-red-500/30 text-red-300"
|
|
57
58
|
},
|
|
58
|
-
[
|
|
59
|
+
[V.WARNING]: {
|
|
59
60
|
light: "bg-amber-50 border-amber-200 text-amber-700",
|
|
60
61
|
dark: "bg-amber-500/10 border-amber-500/30 text-amber-300"
|
|
61
62
|
},
|
|
62
|
-
[
|
|
63
|
+
[V.SUCCESS]: {
|
|
63
64
|
light: "bg-emerald-50 border-emerald-200 text-emerald-700",
|
|
64
65
|
dark: "bg-emerald-500/10 border-emerald-500/30 text-emerald-300"
|
|
65
66
|
},
|
|
66
|
-
[
|
|
67
|
+
[V.INFO]: {
|
|
67
68
|
light: "bg-sky-50 border-sky-200 text-sky-700",
|
|
68
69
|
dark: "bg-sky-500/10 border-sky-500/30 text-sky-300"
|
|
69
70
|
}
|
|
70
71
|
}, l = i(() => n.value ? r[t.color].dark : r[t.color].light), u = i(() => {
|
|
71
72
|
switch (t.color) {
|
|
72
|
-
case
|
|
73
|
-
case
|
|
74
|
-
case
|
|
75
|
-
default: return
|
|
73
|
+
case V.SUCCESS: return ue;
|
|
74
|
+
case V.WARNING: return be;
|
|
75
|
+
case V.INFO: return Se;
|
|
76
|
+
default: return ye;
|
|
76
77
|
}
|
|
77
78
|
}), d = i(() => {
|
|
78
79
|
switch (t.color) {
|
|
79
|
-
case
|
|
80
|
-
case
|
|
81
|
-
case
|
|
80
|
+
case V.SUCCESS: return "text-emerald-500";
|
|
81
|
+
case V.WARNING: return "text-amber-500";
|
|
82
|
+
case V.INFO: return "text-sky-500";
|
|
82
83
|
default: return "text-red-500";
|
|
83
84
|
}
|
|
84
85
|
});
|
|
85
|
-
return (t, n) => (
|
|
86
|
+
return (t, n) => (T(), s("div", {
|
|
86
87
|
role: "alert",
|
|
87
|
-
class:
|
|
88
|
-
}, [(
|
|
89
|
-
class:
|
|
88
|
+
class: v(["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", l.value]])
|
|
89
|
+
}, [(T(), a(M(u.value), {
|
|
90
|
+
class: v(["shrink-0", [e.compact ? "w-4 h-4 mt-px" : "w-5 h-5 mt-0.5", d.value]]),
|
|
90
91
|
"aria-hidden": "true"
|
|
91
|
-
}, null, 8, ["class"])), c("div",
|
|
92
|
+
}, null, 8, ["class"])), c("div", Fe, [e.title ? (T(), s("p", Ie, N(e.title), 1)) : o("", !0), A(t.$slots, "default")])], 2));
|
|
92
93
|
}
|
|
93
|
-
}),
|
|
94
|
+
}), G = /* @__PURE__ */ function(e) {
|
|
94
95
|
return e.NONE = "NONE", e.RED = "RED", e.YELLOW = "YELLOW", e.BLACK = "BLACK", e.GRAY = "GRAY", e.GREEN = "GREEN", e.BLUE = "BLUE", e;
|
|
95
|
-
}({}),
|
|
96
|
+
}({}), Re = "bg-red-100 text-red-700 border-red-200", ze = /* @__PURE__ */ p({
|
|
96
97
|
__name: "BaseBadge",
|
|
97
98
|
props: { color: {
|
|
98
99
|
type: String,
|
|
99
100
|
required: !1
|
|
100
101
|
} },
|
|
101
102
|
setup(e) {
|
|
102
|
-
let t =
|
|
103
|
-
[
|
|
104
|
-
[
|
|
105
|
-
[
|
|
106
|
-
[
|
|
107
|
-
[
|
|
108
|
-
[
|
|
109
|
-
[
|
|
110
|
-
}, u = i(() => `inline-flex items-center gap-1 font-semibold text-xs leading-none px-3 py-1.5 rounded-full border ${c.color && l[c.color] ||
|
|
111
|
-
return (e, t) => r.value ? (
|
|
103
|
+
let t = F(), r = i(() => !!t.default), a = () => (t.default?.() ?? []).map((e) => e.type === n && typeof e.children == "string" ? d(e.children.replace(/_/g, " ")) : e), c = e, l = {
|
|
104
|
+
[G.RED]: "bg-red-100 text-red-700 border-red-200",
|
|
105
|
+
[G.GREEN]: "bg-green-100 text-green-700 border-green-200",
|
|
106
|
+
[G.BLUE]: "bg-blue-100 text-blue-700 border-blue-200",
|
|
107
|
+
[G.YELLOW]: "bg-yellow-100 text-yellow-700 border-yellow-200",
|
|
108
|
+
[G.GRAY]: "bg-gray-100 text-gray-700 border-gray-200",
|
|
109
|
+
[G.BLACK]: "bg-gray-800 text-gray-100 border-gray-700",
|
|
110
|
+
[G.NONE]: "bg-gray-50 text-gray-600 border-gray-200"
|
|
111
|
+
}, u = i(() => `inline-flex items-center gap-1 font-semibold text-xs leading-none px-3 py-1.5 rounded-full border ${c.color && l[c.color] || Re}`);
|
|
112
|
+
return (e, t) => r.value ? (T(), s("span", {
|
|
112
113
|
key: 0,
|
|
113
|
-
class:
|
|
114
|
+
class: v(u.value)
|
|
114
115
|
}, [f(a)], 2)) : o("", !0);
|
|
115
116
|
}
|
|
116
|
-
}),
|
|
117
|
-
class: "flex px-5 py-3 text-gray-700 border border-
|
|
117
|
+
}), Be = {
|
|
118
|
+
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",
|
|
118
119
|
"aria-label": "Breadcrumb"
|
|
119
|
-
},
|
|
120
|
+
}, Ve = { class: "inline-flex items-center whitespace-nowrap space-x-1 md:space-x-3" }, He = {
|
|
120
121
|
class: "inline-flex items-center",
|
|
121
122
|
style: { "margin-left": "0" }
|
|
122
|
-
},
|
|
123
|
+
}, Ue = /* @__PURE__ */ p({
|
|
123
124
|
__name: "BaseBreadcrumb",
|
|
124
125
|
props: {
|
|
125
126
|
items: {
|
|
@@ -143,41 +144,41 @@ var je = { class: "min-w-0 flex-1" }, Me = {
|
|
|
143
144
|
}));
|
|
144
145
|
});
|
|
145
146
|
return (t, n) => {
|
|
146
|
-
let i =
|
|
147
|
-
return
|
|
147
|
+
let i = j("router-link");
|
|
148
|
+
return T(), s("nav", Be, [c("ol", Ve, [c("li", He, [f(i, {
|
|
148
149
|
to: "/",
|
|
149
150
|
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"
|
|
150
151
|
}, {
|
|
151
|
-
default:
|
|
152
|
+
default: L(() => [f(P(De), { class: "h-4 w-4 text-gray-500 mr-2" }), n[0] ||= d(" Home ", -1)]),
|
|
152
153
|
_: 1
|
|
153
|
-
})]), (
|
|
154
|
+
})]), (T(!0), s(e, null, k(r.value, (e, t) => (T(), s("li", {
|
|
154
155
|
key: t,
|
|
155
156
|
class: "inline-flex items-center",
|
|
156
157
|
style: { "margin-left": "0" }
|
|
157
|
-
}, [f(
|
|
158
|
+
}, [f(P(he), { class: "h-4 w-4 text-gray-500" }), f(i, {
|
|
158
159
|
to: e.url,
|
|
159
160
|
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"
|
|
160
161
|
}, {
|
|
161
|
-
default:
|
|
162
|
+
default: L(() => [d(N(e.name), 1)]),
|
|
162
163
|
_: 2
|
|
163
164
|
}, 1032, ["to"])]))), 128))])]);
|
|
164
165
|
};
|
|
165
166
|
}
|
|
166
|
-
}),
|
|
167
|
+
}), K = /* @__PURE__ */ function(e) {
|
|
167
168
|
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;
|
|
168
|
-
}({}),
|
|
169
|
+
}({}), q = /* @__PURE__ */ function(e) {
|
|
169
170
|
return e.EXTRA_SMALL = "EXTRA_SMALL", e.SMALL = "SMALL", e.BASE = "BASE", e.LARGE = "LARGE", e.EXTRA_LARGE = "EXTRA_LARGE", e;
|
|
170
|
-
}({}),
|
|
171
|
+
}({}), We = [
|
|
171
172
|
"type",
|
|
172
173
|
"disabled",
|
|
173
174
|
"onClick"
|
|
174
|
-
],
|
|
175
|
+
], Ge = {
|
|
175
176
|
key: 0,
|
|
176
177
|
class: "inline-flex items-center"
|
|
177
|
-
},
|
|
178
|
+
}, Ke = { key: 1 }, qe = { key: 2 }, Je = ["type", "disabled"], Ye = {
|
|
178
179
|
key: 0,
|
|
179
180
|
class: "inline-flex items-center"
|
|
180
|
-
},
|
|
181
|
+
}, Xe = { key: 1 }, Ze = { key: 2 }, Qe = /* @__PURE__ */ p({
|
|
181
182
|
__name: "BaseButton",
|
|
182
183
|
props: {
|
|
183
184
|
description: {
|
|
@@ -187,7 +188,7 @@ var je = { class: "min-w-0 flex-1" }, Me = {
|
|
|
187
188
|
color: {
|
|
188
189
|
type: String,
|
|
189
190
|
required: !1,
|
|
190
|
-
default:
|
|
191
|
+
default: K.BLUE
|
|
191
192
|
},
|
|
192
193
|
to: {
|
|
193
194
|
type: String,
|
|
@@ -231,103 +232,103 @@ var je = { class: "min-w-0 flex-1" }, Me = {
|
|
|
231
232
|
}
|
|
232
233
|
},
|
|
233
234
|
setup(e) {
|
|
234
|
-
let { isDark: t } =
|
|
235
|
+
let { isDark: t } = W(), n = e;
|
|
235
236
|
function r() {
|
|
236
237
|
let e = {
|
|
237
|
-
[
|
|
238
|
+
[K.BLUE]: {
|
|
238
239
|
light: "text-blue-700 border-blue-300 hover:bg-blue-50",
|
|
239
240
|
dark: "text-blue-400 border-blue-500/40 hover:bg-blue-500/10"
|
|
240
241
|
},
|
|
241
|
-
[
|
|
242
|
+
[K.GREEN]: {
|
|
242
243
|
light: "text-green-700 border-green-300 hover:bg-green-50",
|
|
243
244
|
dark: "text-green-400 border-green-500/40 hover:bg-green-500/10"
|
|
244
245
|
},
|
|
245
|
-
[
|
|
246
|
+
[K.EMERALD]: {
|
|
246
247
|
light: "text-emerald-700 border-emerald-300 hover:bg-emerald-50",
|
|
247
248
|
dark: "text-emerald-400 border-emerald-500/40 hover:bg-emerald-500/10"
|
|
248
249
|
},
|
|
249
|
-
[
|
|
250
|
+
[K.RED]: {
|
|
250
251
|
light: "text-red-700 border-red-300 hover:bg-red-50",
|
|
251
252
|
dark: "text-red-400 border-red-500/40 hover:bg-red-500/10"
|
|
252
253
|
},
|
|
253
|
-
[
|
|
254
|
+
[K.YELLOW]: {
|
|
254
255
|
light: "text-yellow-700 border-yellow-300 hover:bg-yellow-50",
|
|
255
256
|
dark: "text-yellow-400 border-yellow-500/40 hover:bg-yellow-500/10"
|
|
256
257
|
},
|
|
257
|
-
[
|
|
258
|
+
[K.PURPLE]: {
|
|
258
259
|
light: "text-purple-700 border-purple-300 hover:bg-purple-50",
|
|
259
260
|
dark: "text-purple-400 border-purple-500/40 hover:bg-purple-500/10"
|
|
260
261
|
},
|
|
261
|
-
[
|
|
262
|
+
[K.SKY]: {
|
|
262
263
|
light: "text-sky-700 border-sky-300 hover:bg-sky-50",
|
|
263
264
|
dark: "text-sky-400 border-sky-500/40 hover:bg-sky-500/10"
|
|
264
265
|
},
|
|
265
|
-
[
|
|
266
|
+
[K.AMBER]: {
|
|
266
267
|
light: "text-amber-700 border-amber-300 hover:bg-amber-50",
|
|
267
268
|
dark: "text-amber-400 border-amber-500/40 hover:bg-amber-500/10"
|
|
268
269
|
},
|
|
269
|
-
[
|
|
270
|
+
[K.GRAY]: {
|
|
270
271
|
light: "text-gray-700 border-gray-300 hover:bg-gray-50",
|
|
271
272
|
dark: "text-gray-300 border-gray-600 hover:bg-gray-800"
|
|
272
273
|
},
|
|
273
|
-
[
|
|
274
|
+
[K.DARK]: {
|
|
274
275
|
light: "text-gray-700 border-gray-300 hover:bg-gray-50",
|
|
275
276
|
dark: "text-gray-300 border-gray-600 hover:bg-gray-800"
|
|
276
277
|
},
|
|
277
|
-
[
|
|
278
|
+
[K.WHITE]: {
|
|
278
279
|
light: "text-gray-700 border-gray-300 hover:bg-gray-50",
|
|
279
280
|
dark: "text-gray-300 border-gray-600 hover:bg-gray-800"
|
|
280
281
|
}
|
|
281
|
-
}, r = e[n.color] ?? e[
|
|
282
|
+
}, r = e[n.color] ?? e[K.BLUE], i = t.value ? r.dark : r.light;
|
|
282
283
|
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}`;
|
|
283
284
|
}
|
|
284
285
|
function i() {
|
|
285
286
|
let e = {
|
|
286
|
-
[
|
|
287
|
+
[K.BLUE]: {
|
|
287
288
|
light: "text-blue-600 hover:bg-blue-50",
|
|
288
289
|
dark: "text-blue-400 hover:bg-blue-500/10"
|
|
289
290
|
},
|
|
290
|
-
[
|
|
291
|
+
[K.GREEN]: {
|
|
291
292
|
light: "text-green-600 hover:bg-green-50",
|
|
292
293
|
dark: "text-green-400 hover:bg-green-500/10"
|
|
293
294
|
},
|
|
294
|
-
[
|
|
295
|
+
[K.EMERALD]: {
|
|
295
296
|
light: "text-emerald-600 hover:bg-emerald-50",
|
|
296
297
|
dark: "text-emerald-400 hover:bg-emerald-500/10"
|
|
297
298
|
},
|
|
298
|
-
[
|
|
299
|
+
[K.SKY]: {
|
|
299
300
|
light: "text-sky-600 hover:bg-sky-50",
|
|
300
301
|
dark: "text-sky-400 hover:bg-sky-500/10"
|
|
301
302
|
},
|
|
302
|
-
[
|
|
303
|
+
[K.RED]: {
|
|
303
304
|
light: "text-red-500 hover:bg-red-50",
|
|
304
305
|
dark: "text-red-400 hover:bg-red-500/10"
|
|
305
306
|
},
|
|
306
|
-
[
|
|
307
|
+
[K.AMBER]: {
|
|
307
308
|
light: "text-amber-700 hover:bg-amber-50",
|
|
308
309
|
dark: "text-amber-300 hover:bg-amber-500/10"
|
|
309
310
|
},
|
|
310
|
-
[
|
|
311
|
+
[K.YELLOW]: {
|
|
311
312
|
light: "text-yellow-600 hover:bg-yellow-50",
|
|
312
313
|
dark: "text-yellow-400 hover:bg-yellow-500/10"
|
|
313
314
|
},
|
|
314
|
-
[
|
|
315
|
+
[K.PURPLE]: {
|
|
315
316
|
light: "text-purple-600 hover:bg-purple-50",
|
|
316
317
|
dark: "text-purple-400 hover:bg-purple-500/10"
|
|
317
318
|
},
|
|
318
|
-
[
|
|
319
|
+
[K.GRAY]: {
|
|
319
320
|
light: "text-gray-500 hover:bg-gray-100",
|
|
320
321
|
dark: "text-gray-400 hover:bg-gray-800"
|
|
321
322
|
},
|
|
322
|
-
[
|
|
323
|
+
[K.DARK]: {
|
|
323
324
|
light: "text-gray-500 hover:bg-gray-100",
|
|
324
325
|
dark: "text-gray-400 hover:bg-gray-800"
|
|
325
326
|
},
|
|
326
|
-
[
|
|
327
|
+
[K.WHITE]: {
|
|
327
328
|
light: "text-gray-500 hover:bg-gray-100",
|
|
328
329
|
dark: "text-gray-400 hover:bg-gray-800"
|
|
329
330
|
}
|
|
330
|
-
}, r = e[n.color] ?? e[
|
|
331
|
+
}, r = e[n.color] ?? e[K.GRAY], i = t.value ? r.dark : r.light;
|
|
331
332
|
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`;
|
|
332
333
|
}
|
|
333
334
|
function l() {
|
|
@@ -335,37 +336,37 @@ var je = { class: "min-w-0 flex-1" }, Me = {
|
|
|
335
336
|
e || (t += " cursor-pointer");
|
|
336
337
|
let a;
|
|
337
338
|
switch (n.color) {
|
|
338
|
-
case
|
|
339
|
+
case K.BLUE:
|
|
339
340
|
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";
|
|
340
341
|
break;
|
|
341
|
-
case
|
|
342
|
+
case K.WHITE:
|
|
342
343
|
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";
|
|
343
344
|
break;
|
|
344
|
-
case
|
|
345
|
+
case K.DARK:
|
|
345
346
|
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";
|
|
346
347
|
break;
|
|
347
|
-
case
|
|
348
|
+
case K.GREEN:
|
|
348
349
|
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";
|
|
349
350
|
break;
|
|
350
|
-
case
|
|
351
|
+
case K.EMERALD:
|
|
351
352
|
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";
|
|
352
353
|
break;
|
|
353
|
-
case
|
|
354
|
+
case K.RED:
|
|
354
355
|
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";
|
|
355
356
|
break;
|
|
356
|
-
case
|
|
357
|
+
case K.YELLOW:
|
|
357
358
|
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";
|
|
358
359
|
break;
|
|
359
|
-
case
|
|
360
|
+
case K.PURPLE:
|
|
360
361
|
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";
|
|
361
362
|
break;
|
|
362
|
-
case
|
|
363
|
+
case K.SKY:
|
|
363
364
|
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";
|
|
364
365
|
break;
|
|
365
|
-
case
|
|
366
|
+
case K.AMBER:
|
|
366
367
|
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";
|
|
367
368
|
break;
|
|
368
|
-
case
|
|
369
|
+
case K.GRAY:
|
|
369
370
|
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";
|
|
370
371
|
break;
|
|
371
372
|
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";
|
|
@@ -373,37 +374,37 @@ var je = { class: "min-w-0 flex-1" }, Me = {
|
|
|
373
374
|
n.outline && (a = r()), n.ghost && (a = i());
|
|
374
375
|
let o = "px-5 py-2.5 mr-2 mb-2 text-sm";
|
|
375
376
|
switch (n.size) {
|
|
376
|
-
case
|
|
377
|
+
case q.EXTRA_SMALL:
|
|
377
378
|
o = "px-3 py-2 text-xs";
|
|
378
379
|
break;
|
|
379
|
-
case
|
|
380
|
+
case q.SMALL:
|
|
380
381
|
o = "px-3 py-2 text-sm";
|
|
381
382
|
break;
|
|
382
|
-
case
|
|
383
|
+
case q.BASE:
|
|
383
384
|
o = "px-5 py-2.5 text-sm";
|
|
384
385
|
break;
|
|
385
|
-
case
|
|
386
|
+
case q.LARGE:
|
|
386
387
|
o = "px-5 py-3 text-base";
|
|
387
388
|
break;
|
|
388
|
-
case
|
|
389
|
+
case q.EXTRA_LARGE: o = "px-6 py-3.5 text-base";
|
|
389
390
|
}
|
|
390
391
|
let s = "rounded-lg";
|
|
391
392
|
return n.isRounded && (s = "rounded-full"), t + " " + o + " " + a + " font-medium " + s;
|
|
392
393
|
}
|
|
393
394
|
return (t, r) => {
|
|
394
|
-
let i =
|
|
395
|
-
return e.to ? (
|
|
395
|
+
let i = j("router-link");
|
|
396
|
+
return e.to ? (T(), a(i, {
|
|
396
397
|
key: 0,
|
|
397
398
|
to: e.to,
|
|
398
399
|
custom: ""
|
|
399
400
|
}, {
|
|
400
|
-
default:
|
|
401
|
+
default: L(({ navigate: i }) => [c("button", {
|
|
401
402
|
type: n.type,
|
|
402
|
-
class:
|
|
403
|
+
class: v(l()),
|
|
403
404
|
disabled: e.isDisable || e.isLoading,
|
|
404
405
|
onClick: i
|
|
405
406
|
}, [
|
|
406
|
-
e.isLoading ? (
|
|
407
|
+
e.isLoading ? (T(), s("div", Ge, [...r[0] ||= [c("svg", {
|
|
407
408
|
"aria-hidden": "true",
|
|
408
409
|
role: "status",
|
|
409
410
|
class: "inline w-4 h-4 me-3 animate-spin",
|
|
@@ -417,18 +418,18 @@ var je = { class: "min-w-0 flex-1" }, Me = {
|
|
|
417
418
|
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",
|
|
418
419
|
fill: "currentColor"
|
|
419
420
|
})], -1)]])) : o("", !0),
|
|
420
|
-
e.iconLeft ? o("", !0) : (
|
|
421
|
-
|
|
422
|
-
e.iconLeft ? (
|
|
423
|
-
], 10,
|
|
421
|
+
e.iconLeft ? o("", !0) : (T(), s("span", Ke, N(e.description), 1)),
|
|
422
|
+
A(t.$slots, "default"),
|
|
423
|
+
e.iconLeft ? (T(), s("span", qe, N(e.description), 1)) : o("", !0)
|
|
424
|
+
], 10, We)]),
|
|
424
425
|
_: 3
|
|
425
|
-
}, 8, ["to"])) : (
|
|
426
|
+
}, 8, ["to"])) : (T(), s("button", {
|
|
426
427
|
key: 1,
|
|
427
428
|
type: n.type,
|
|
428
|
-
class:
|
|
429
|
+
class: v(l()),
|
|
429
430
|
disabled: e.isDisable || e.isLoading
|
|
430
431
|
}, [
|
|
431
|
-
e.isLoading ? (
|
|
432
|
+
e.isLoading ? (T(), s("div", Ye, [...r[1] ||= [c("svg", {
|
|
432
433
|
"aria-hidden": "true",
|
|
433
434
|
role: "status",
|
|
434
435
|
class: "inline w-4 h-4 me-3 animate-spin",
|
|
@@ -442,234 +443,234 @@ var je = { class: "min-w-0 flex-1" }, Me = {
|
|
|
442
443
|
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",
|
|
443
444
|
fill: "currentColor"
|
|
444
445
|
})], -1)]])) : o("", !0),
|
|
445
|
-
e.iconLeft ? o("", !0) : (
|
|
446
|
-
|
|
447
|
-
e.iconLeft ? (
|
|
448
|
-
], 10,
|
|
446
|
+
e.iconLeft ? o("", !0) : (T(), s("span", Xe, N(e.description), 1)),
|
|
447
|
+
A(t.$slots, "default"),
|
|
448
|
+
e.iconLeft ? (T(), s("span", Ze, N(e.description), 1)) : o("", !0)
|
|
449
|
+
], 10, Je));
|
|
449
450
|
};
|
|
450
451
|
}
|
|
451
|
-
}),
|
|
452
|
+
}), $e = /* @__PURE__ */ function(e) {
|
|
452
453
|
return e.BASE = "BASE", e.BASE_SHORTER = "BASE_SHORTER", e.SQUARE = "SQUARE", e;
|
|
453
|
-
}({}),
|
|
454
|
+
}({}), et = {
|
|
454
455
|
key: 0,
|
|
455
456
|
class: "h-px my-8 bg-gray-200 border-0 dark:bg-gray-700"
|
|
456
|
-
},
|
|
457
|
+
}, tt = {
|
|
457
458
|
key: 1,
|
|
458
459
|
class: "w-48 h-1 mx-auto my-4 bg-gray-100 border-0 rounded md:my-10 dark:bg-gray-700"
|
|
459
|
-
},
|
|
460
|
+
}, nt = {
|
|
460
461
|
key: 2,
|
|
461
462
|
class: "w-8 h-8 mx-auto my-8 bg-gray-200 border-0 rounded md:my-12 dark:bg-gray-700"
|
|
462
|
-
},
|
|
463
|
+
}, rt = /* @__PURE__ */ p({
|
|
463
464
|
__name: "BaseLine",
|
|
464
465
|
props: { mode: {
|
|
465
466
|
type: String,
|
|
466
467
|
required: !1,
|
|
467
|
-
default:
|
|
468
|
+
default: $e.BASE
|
|
468
469
|
} },
|
|
469
470
|
setup(t) {
|
|
470
|
-
return (n, r) => (
|
|
471
|
-
t.mode ===
|
|
472
|
-
t.mode ===
|
|
473
|
-
t.mode ===
|
|
471
|
+
return (n, r) => (T(), s(e, null, [
|
|
472
|
+
t.mode === P($e).BASE ? (T(), s("hr", et)) : o("", !0),
|
|
473
|
+
t.mode === P($e).BASE_SHORTER ? (T(), s("hr", tt)) : o("", !0),
|
|
474
|
+
t.mode === P($e).SQUARE ? (T(), s("hr", nt)) : o("", !0)
|
|
474
475
|
], 64));
|
|
475
476
|
}
|
|
476
|
-
}),
|
|
477
|
+
}), J = /* @__PURE__ */ function(e) {
|
|
477
478
|
return e.SMALL = "SMALL", e.MEDIUM = "MEDIUM", e.LARGE = "LARGE", e;
|
|
478
|
-
}({}),
|
|
479
|
+
}({}), it = J, at = ["height", "width"], ot = ["id"], st = ["id", "href"], ct = ["id", "href"], lt = ["id", "href"], ut = ["id", "href"], dt = ["id", "href"], ft = ["id", "href"], pt = ["id", "href"], mt = ["id", "href"], ht = ["id", "href"], gt = ["id"], _t = ["fill"], vt = ["fill"], yt = ["fill"], bt = ["fill"], xt = ["fill"], St = ["fill"], Ct = ["fill"], wt = ["fill"], Tt = ["fill"], Et = ["fill"], Dt = /* @__PURE__ */ p({
|
|
479
480
|
__name: "BaseLogo",
|
|
480
481
|
props: { size: {
|
|
481
482
|
type: String,
|
|
482
483
|
required: !1,
|
|
483
|
-
default:
|
|
484
|
+
default: J.MEDIUM
|
|
484
485
|
} },
|
|
485
486
|
setup(e) {
|
|
486
|
-
let t = e;
|
|
487
|
-
function
|
|
487
|
+
let t = `logo-${ee()}`, n = e;
|
|
488
|
+
function r() {
|
|
488
489
|
let e = "";
|
|
489
|
-
switch (
|
|
490
|
-
case
|
|
490
|
+
switch (n.size) {
|
|
491
|
+
case J.SMALL:
|
|
491
492
|
e = "50px";
|
|
492
493
|
break;
|
|
493
|
-
case
|
|
494
|
+
case J.MEDIUM:
|
|
494
495
|
e = "100px";
|
|
495
496
|
break;
|
|
496
|
-
case
|
|
497
|
+
case J.LARGE: e = "150px";
|
|
497
498
|
}
|
|
498
499
|
return e;
|
|
499
500
|
}
|
|
500
|
-
return (e,
|
|
501
|
-
let
|
|
502
|
-
return
|
|
501
|
+
return (e, n) => {
|
|
502
|
+
let i = j("router-link");
|
|
503
|
+
return T(), a(i, {
|
|
503
504
|
to: "/",
|
|
504
505
|
class: "flex items-center mb-6 text-2xl font-semibold text-gray-900 dark:text-white"
|
|
505
506
|
}, {
|
|
506
|
-
default:
|
|
507
|
-
height:
|
|
508
|
-
width:
|
|
507
|
+
default: L(() => [(T(), s("svg", {
|
|
508
|
+
height: r(),
|
|
509
|
+
width: r(),
|
|
509
510
|
viewBox: "33.6 130.6 499.7 242.9",
|
|
510
511
|
xmlns: "http://www.w3.org/2000/svg",
|
|
511
512
|
"xmlns:xlink": "http://www.w3.org/1999/xlink"
|
|
512
|
-
}, [
|
|
513
|
-
c("linearGradient", { id:
|
|
513
|
+
}, [
|
|
514
|
+
c("linearGradient", { id: `${t}-a` }, [...n[0] ||= [c("stop", {
|
|
514
515
|
offset: ".085",
|
|
515
516
|
"stop-color": "#469e43"
|
|
516
|
-
}), c("stop", {
|
|
517
|
+
}, null, -1), c("stop", {
|
|
517
518
|
offset: "1",
|
|
518
519
|
"stop-color": "#132d13"
|
|
519
|
-
}
|
|
520
|
+
}, null, -1)]], 8, ot),
|
|
520
521
|
c("linearGradient", {
|
|
521
|
-
id:
|
|
522
|
+
id: `${t}-b`,
|
|
522
523
|
gradientUnits: "userSpaceOnUse",
|
|
523
524
|
x1: "64.863",
|
|
524
525
|
x2: "64.863",
|
|
525
|
-
|
|
526
|
+
href: `#${t}-a`,
|
|
526
527
|
y1: "288.291",
|
|
527
528
|
y2: "369.4"
|
|
528
|
-
}, null,
|
|
529
|
+
}, null, 8, st),
|
|
529
530
|
c("linearGradient", {
|
|
530
|
-
id:
|
|
531
|
+
id: `${t}-c`,
|
|
531
532
|
gradientUnits: "userSpaceOnUse",
|
|
532
533
|
x1: "138.367",
|
|
533
534
|
x2: "138.367",
|
|
534
|
-
|
|
535
|
+
href: `#${t}-a`,
|
|
535
536
|
y1: "308.454",
|
|
536
537
|
y2: "370.601"
|
|
537
|
-
}, null,
|
|
538
|
+
}, null, 8, ct),
|
|
538
539
|
c("linearGradient", {
|
|
539
|
-
id:
|
|
540
|
+
id: `${t}-d`,
|
|
540
541
|
gradientUnits: "userSpaceOnUse",
|
|
541
542
|
x1: "195.475",
|
|
542
543
|
x2: "195.475",
|
|
543
|
-
|
|
544
|
+
href: `#${t}-a`,
|
|
544
545
|
y1: "288.291",
|
|
545
546
|
y2: "369.85"
|
|
546
|
-
}, null,
|
|
547
|
+
}, null, 8, lt),
|
|
547
548
|
c("linearGradient", {
|
|
548
|
-
id:
|
|
549
|
+
id: `${t}-e`,
|
|
549
550
|
gradientUnits: "userSpaceOnUse",
|
|
550
551
|
x1: "249.634",
|
|
551
552
|
x2: "249.634",
|
|
552
|
-
|
|
553
|
+
href: `#${t}-a`,
|
|
553
554
|
y1: "307.312",
|
|
554
555
|
y2: "369.511"
|
|
555
|
-
}, null,
|
|
556
|
+
}, null, 8, ut),
|
|
556
557
|
c("linearGradient", {
|
|
557
|
-
id:
|
|
558
|
+
id: `${t}-f`,
|
|
558
559
|
gradientUnits: "userSpaceOnUse",
|
|
559
560
|
x1: "302.884",
|
|
560
561
|
x2: "302.884",
|
|
561
|
-
|
|
562
|
+
href: `#${t}-a`,
|
|
562
563
|
y1: "288.291",
|
|
563
564
|
y2: "367.857"
|
|
564
|
-
}, null,
|
|
565
|
+
}, null, 8, dt),
|
|
565
566
|
c("linearGradient", {
|
|
566
|
-
id:
|
|
567
|
+
id: `${t}-g`,
|
|
567
568
|
gradientUnits: "userSpaceOnUse",
|
|
568
569
|
x1: "354.118",
|
|
569
570
|
x2: "354.118",
|
|
570
|
-
|
|
571
|
+
href: `#${t}-a`,
|
|
571
572
|
y1: "307.312",
|
|
572
573
|
y2: "369.511"
|
|
573
|
-
}, null,
|
|
574
|
+
}, null, 8, ft),
|
|
574
575
|
c("linearGradient", {
|
|
575
|
-
id:
|
|
576
|
+
id: `${t}-h`,
|
|
576
577
|
gradientUnits: "userSpaceOnUse",
|
|
577
578
|
x1: "428.02",
|
|
578
579
|
x2: "428.02",
|
|
579
|
-
|
|
580
|
+
href: `#${t}-a`,
|
|
580
581
|
y1: "306.156",
|
|
581
582
|
y2: "367.742"
|
|
582
|
-
}, null,
|
|
583
|
+
}, null, 8, pt),
|
|
583
584
|
c("linearGradient", {
|
|
584
|
-
id:
|
|
585
|
+
id: `${t}-i`,
|
|
585
586
|
gradientUnits: "userSpaceOnUse",
|
|
586
587
|
x1: "502.066",
|
|
587
588
|
x2: "502.066",
|
|
588
|
-
|
|
589
|
+
href: `#${t}-a`,
|
|
589
590
|
y1: "288.291",
|
|
590
591
|
y2: "369.4"
|
|
591
|
-
}, null,
|
|
592
|
+
}, null, 8, mt),
|
|
592
593
|
c("linearGradient", {
|
|
593
|
-
id:
|
|
594
|
+
id: `${t}-j`,
|
|
594
595
|
gradientUnits: "userSpaceOnUse",
|
|
595
596
|
x1: "283.264",
|
|
596
597
|
x2: "283.264",
|
|
597
|
-
|
|
598
|
+
href: `#${t}-a`,
|
|
598
599
|
y1: "131.629",
|
|
599
600
|
y2: "232.559"
|
|
600
|
-
}, null,
|
|
601
|
+
}, null, 8, ht),
|
|
601
602
|
c("linearGradient", {
|
|
602
|
-
id:
|
|
603
|
+
id: `${t}-k`,
|
|
603
604
|
gradientUnits: "userSpaceOnUse",
|
|
604
605
|
x1: "283.46",
|
|
605
606
|
x2: "283.46",
|
|
606
607
|
y1: "202.275",
|
|
607
608
|
y2: "183.785"
|
|
608
|
-
}, [c("stop", {
|
|
609
|
+
}, [...n[1] ||= [c("stop", {
|
|
609
610
|
offset: "0",
|
|
610
611
|
"stop-color": "#969799",
|
|
611
612
|
"stop-opacity": "0"
|
|
612
|
-
}), c("stop", {
|
|
613
|
+
}, null, -1), c("stop", {
|
|
613
614
|
offset: "1",
|
|
614
615
|
"stop-color": "#808183"
|
|
615
|
-
}
|
|
616
|
+
}, null, -1)]], 8, gt),
|
|
616
617
|
c("path", {
|
|
617
618
|
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",
|
|
618
|
-
fill:
|
|
619
|
-
}, null,
|
|
619
|
+
fill: `url(#${t}-b)`
|
|
620
|
+
}, null, 8, _t),
|
|
620
621
|
c("path", {
|
|
621
622
|
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",
|
|
622
|
-
fill:
|
|
623
|
-
}, null,
|
|
623
|
+
fill: `url(#${t}-c)`
|
|
624
|
+
}, null, 8, vt),
|
|
624
625
|
c("path", {
|
|
625
626
|
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",
|
|
626
|
-
fill:
|
|
627
|
-
}, null,
|
|
627
|
+
fill: `url(#${t}-d)`
|
|
628
|
+
}, null, 8, yt),
|
|
628
629
|
c("path", {
|
|
629
630
|
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",
|
|
630
|
-
fill:
|
|
631
|
-
}, null,
|
|
631
|
+
fill: `url(#${t}-e)`
|
|
632
|
+
}, null, 8, bt),
|
|
632
633
|
c("path", {
|
|
633
634
|
d: "m296.4 288.3h13v79.6h-13z",
|
|
634
|
-
fill:
|
|
635
|
-
}, null,
|
|
635
|
+
fill: `url(#${t}-f)`
|
|
636
|
+
}, null, 8, xt),
|
|
636
637
|
c("path", {
|
|
637
638
|
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",
|
|
638
|
-
fill:
|
|
639
|
-
}, null,
|
|
639
|
+
fill: `url(#${t}-g)`
|
|
640
|
+
}, null, 8, St),
|
|
640
641
|
c("path", {
|
|
641
642
|
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",
|
|
642
|
-
fill:
|
|
643
|
-
}, null,
|
|
643
|
+
fill: `url(#${t}-h)`
|
|
644
|
+
}, null, 8, Ct),
|
|
644
645
|
c("path", {
|
|
645
646
|
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",
|
|
646
|
-
fill:
|
|
647
|
-
}, null,
|
|
647
|
+
fill: `url(#${t}-i)`
|
|
648
|
+
}, null, 8, wt),
|
|
648
649
|
c("path", {
|
|
649
650
|
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",
|
|
650
|
-
fill:
|
|
651
|
-
}, null,
|
|
651
|
+
fill: `url(#${t}-j)`
|
|
652
|
+
}, null, 8, Tt),
|
|
652
653
|
c("path", {
|
|
653
654
|
d: "m281.7 183.8h3.6v18.5h-3.6z",
|
|
654
|
-
fill:
|
|
655
|
-
}, null,
|
|
656
|
-
]
|
|
655
|
+
fill: `url(#${t}-k)`
|
|
656
|
+
}, null, 8, Et)
|
|
657
|
+
], 8, at))]),
|
|
657
658
|
_: 1
|
|
658
659
|
});
|
|
659
660
|
};
|
|
660
661
|
}
|
|
661
|
-
}),
|
|
662
|
+
}), Ot = /* @__PURE__ */ function(e) {
|
|
662
663
|
return e.DELETE = "DELETE", e.SUCCESS = "SUCCESS", e;
|
|
663
|
-
}({}),
|
|
664
|
+
}({}), kt = {
|
|
664
665
|
key: 0,
|
|
665
666
|
class: "p-6 text-center"
|
|
666
|
-
},
|
|
667
|
+
}, At = { class: "flex justify-center" }, jt = {
|
|
667
668
|
key: 1,
|
|
668
669
|
class: "p-6 text-center"
|
|
669
|
-
},
|
|
670
|
+
}, Mt = {
|
|
670
671
|
key: 0,
|
|
671
672
|
class: "mb-5 text-sm text-gray-500"
|
|
672
|
-
},
|
|
673
|
+
}, Nt = { class: "flex justify-center" }, Pt = /* @__PURE__ */ p({
|
|
673
674
|
__name: "BaseModal",
|
|
674
675
|
props: {
|
|
675
676
|
title: {
|
|
@@ -688,7 +689,7 @@ var je = { class: "min-w-0 flex-1" }, Me = {
|
|
|
688
689
|
mode: {
|
|
689
690
|
type: String,
|
|
690
691
|
required: !1,
|
|
691
|
-
default:
|
|
692
|
+
default: Ot.SUCCESS
|
|
692
693
|
}
|
|
693
694
|
},
|
|
694
695
|
emits: ["closeModal", "confirmModal"],
|
|
@@ -697,11 +698,11 @@ var je = { class: "min-w-0 flex-1" }, Me = {
|
|
|
697
698
|
function a(e) {
|
|
698
699
|
e.key === "Escape" && r("closeModal");
|
|
699
700
|
}
|
|
700
|
-
return
|
|
701
|
+
return S(() => {
|
|
701
702
|
document.addEventListener("keydown", a);
|
|
702
|
-
}),
|
|
703
|
+
}), w(() => {
|
|
703
704
|
document.removeEventListener("keydown", a);
|
|
704
|
-
}), (n, r) => (
|
|
705
|
+
}), (n, r) => (T(), s(e, null, [c("div", {
|
|
705
706
|
class: "fixed inset-0 w-full h-screen bg-black/75 z-40",
|
|
706
707
|
onClick: r[0] ||= (e) => n.$emit("closeModal")
|
|
707
708
|
}), c("div", {
|
|
@@ -709,37 +710,37 @@ var je = { class: "min-w-0 flex-1" }, Me = {
|
|
|
709
710
|
role: "dialog",
|
|
710
711
|
"aria-modal": "true",
|
|
711
712
|
"aria-labelledby": i
|
|
712
|
-
}, [t.mode ===
|
|
713
|
-
f(
|
|
713
|
+
}, [t.mode === P(Ot).DELETE ? (T(), s("div", kt, [
|
|
714
|
+
f(P(ye), { class: "w-12 h-12 text-gray-400 mx-auto mb-4" }),
|
|
714
715
|
c("h3", {
|
|
715
716
|
id: i,
|
|
716
717
|
class: "mb-5 text-lg font-normal text-gray-500 dark:text-gray-400"
|
|
717
|
-
}, " Are you sure you want to delete this " +
|
|
718
|
-
c("div",
|
|
719
|
-
color:
|
|
718
|
+
}, " Are you sure you want to delete this " + N(t.title) + "? ", 1),
|
|
719
|
+
c("div", At, [f(Qe, {
|
|
720
|
+
color: P(K).RED,
|
|
720
721
|
onClick: r[1] ||= (e) => n.$emit("confirmModal"),
|
|
721
722
|
description: "Yes, I'm sure"
|
|
722
|
-
}, null, 8, ["color"]), f(
|
|
723
|
-
color:
|
|
723
|
+
}, null, 8, ["color"]), f(Qe, {
|
|
724
|
+
color: P(K).WHITE,
|
|
724
725
|
onClick: r[2] ||= (e) => n.$emit("closeModal"),
|
|
725
726
|
description: "No, cancel"
|
|
726
727
|
}, null, 8, ["color"])])
|
|
727
|
-
])) : (
|
|
728
|
-
f(
|
|
728
|
+
])) : (T(), s("div", jt, [
|
|
729
|
+
f(P(ue), { class: "w-12 h-12 text-green-500 mx-auto mb-4" }),
|
|
729
730
|
c("h3", {
|
|
730
731
|
id: i,
|
|
731
732
|
class: "mb-2 text-lg font-medium text-gray-900"
|
|
732
|
-
},
|
|
733
|
-
t.description ? (
|
|
734
|
-
|
|
735
|
-
c("div",
|
|
736
|
-
color:
|
|
733
|
+
}, N(t.title), 1),
|
|
734
|
+
t.description ? (T(), s("p", Mt, N(t.description), 1)) : o("", !0),
|
|
735
|
+
A(n.$slots, "default"),
|
|
736
|
+
c("div", Nt, [f(Qe, {
|
|
737
|
+
color: P(K).BLUE,
|
|
737
738
|
onClick: r[3] ||= (e) => n.$emit("closeModal"),
|
|
738
739
|
description: "OK"
|
|
739
740
|
}, null, 8, ["color"])])
|
|
740
741
|
]))])], 64));
|
|
741
742
|
}
|
|
742
|
-
}),
|
|
743
|
+
}), Ft = /* @__PURE__ */ p({
|
|
743
744
|
__name: "BaseRow",
|
|
744
745
|
props: { bgColor: {
|
|
745
746
|
type: String,
|
|
@@ -751,9 +752,9 @@ var je = { class: "min-w-0 flex-1" }, Me = {
|
|
|
751
752
|
function n() {
|
|
752
753
|
return "block p-8 border border-gray-200 rounded-xl shadow-sm dark:bg-gray-800 dark:border-gray-700 " + t.bgColor;
|
|
753
754
|
}
|
|
754
|
-
return (e, t) => (
|
|
755
|
+
return (e, t) => (T(), s("div", { class: v(n()) }, [A(e.$slots, "default")], 2));
|
|
755
756
|
}
|
|
756
|
-
}),
|
|
757
|
+
}), It = /* @__PURE__ */ p({
|
|
757
758
|
__name: "BaseSpinner",
|
|
758
759
|
props: {
|
|
759
760
|
size: { default: "sm" },
|
|
@@ -775,17 +776,17 @@ var je = { class: "min-w-0 flex-1" }, Me = {
|
|
|
775
776
|
red: "border-t-red-500",
|
|
776
777
|
amber: "border-t-amber-500"
|
|
777
778
|
})[t.color]);
|
|
778
|
-
return (e, t) => (
|
|
779
|
-
class:
|
|
779
|
+
return (e, t) => (T(), s("div", {
|
|
780
|
+
class: v(["border-gray-200 rounded-full animate-spin", [n.value, r.value]]),
|
|
780
781
|
role: "status",
|
|
781
782
|
"aria-label": "Loading"
|
|
782
783
|
}, null, 2));
|
|
783
784
|
}
|
|
784
|
-
}),
|
|
785
|
+
}), Y = /* @__PURE__ */ function(e) {
|
|
785
786
|
return e.SUCCESS = "SUCCESS", e.WARNING = "WARNING", e.ERROR = "ERROR", e;
|
|
786
|
-
}({}),
|
|
787
|
+
}({}), X = /* @__PURE__ */ function(e) {
|
|
787
788
|
return e.TOP_LEFT = "TOP_LEFT", e.TOP_RIGHT = "TOP_RIGHT", e.BOTTOM_LEFT = "BOTTOM_LEFT", e.BOTTOM_RIGHT = "BOTTOM_RIGHT", e;
|
|
788
|
-
}({}),
|
|
789
|
+
}({}), Lt = { 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" }, Rt = { class: "ml-3 text-sm font-normal" }, zt = /* @__PURE__ */ p({
|
|
789
790
|
__name: "BaseToast",
|
|
790
791
|
props: {
|
|
791
792
|
mode: {
|
|
@@ -804,7 +805,7 @@ var je = { class: "min-w-0 flex-1" }, Me = {
|
|
|
804
805
|
positioning: {
|
|
805
806
|
type: String,
|
|
806
807
|
required: !1,
|
|
807
|
-
default:
|
|
808
|
+
default: X.TOP_RIGHT
|
|
808
809
|
},
|
|
809
810
|
duration: {
|
|
810
811
|
type: Number,
|
|
@@ -813,25 +814,25 @@ var je = { class: "min-w-0 flex-1" }, Me = {
|
|
|
813
814
|
}
|
|
814
815
|
},
|
|
815
816
|
setup(e) {
|
|
816
|
-
let t = e, n =
|
|
817
|
+
let t = e, n = O(!0), r = null;
|
|
817
818
|
function i() {
|
|
818
819
|
n.value = !1, r &&= (clearTimeout(r), null);
|
|
819
820
|
}
|
|
820
|
-
|
|
821
|
+
S(() => {
|
|
821
822
|
r = setTimeout(() => n.value = !1, t.duration);
|
|
822
|
-
}),
|
|
823
|
+
}), w(() => {
|
|
823
824
|
r && clearTimeout(r);
|
|
824
825
|
});
|
|
825
826
|
function a() {
|
|
826
827
|
let e = "";
|
|
827
828
|
switch (t.mode) {
|
|
828
|
-
case
|
|
829
|
+
case Y.ERROR:
|
|
829
830
|
e = "text-red-500 bg-red-100 dark:bg-red-800 dark:text-red-200";
|
|
830
831
|
break;
|
|
831
|
-
case
|
|
832
|
+
case Y.SUCCESS:
|
|
832
833
|
e = "text-green-500 bg-green-100 dark:bg-green-800 dark:text-green-200";
|
|
833
834
|
break;
|
|
834
|
-
case
|
|
835
|
+
case Y.WARNING:
|
|
835
836
|
e = "text-orange-500 bg-orange-100 dark:bg-orange-700 dark:text-orange-200";
|
|
836
837
|
break;
|
|
837
838
|
default: e = "text-gray-500 bg-gray-100 dark:bg-gray-800 dark:text-gray-200";
|
|
@@ -841,46 +842,46 @@ var je = { class: "min-w-0 flex-1" }, Me = {
|
|
|
841
842
|
function l() {
|
|
842
843
|
let e = "top-5 right-5";
|
|
843
844
|
switch (t.positioning) {
|
|
844
|
-
case
|
|
845
|
+
case X.BOTTOM_LEFT:
|
|
845
846
|
e = "bottom-5 left-5";
|
|
846
847
|
break;
|
|
847
|
-
case
|
|
848
|
+
case X.TOP_LEFT:
|
|
848
849
|
e = "top-5 left-5";
|
|
849
850
|
break;
|
|
850
|
-
case
|
|
851
|
+
case X.TOP_RIGHT:
|
|
851
852
|
e = "top-5 right-5";
|
|
852
853
|
break;
|
|
853
|
-
case
|
|
854
|
+
case X.BOTTOM_RIGHT: e = "bottom-5 right-5";
|
|
854
855
|
}
|
|
855
856
|
return "fixed flex items-center w-full max-w-md p-4 space-x-4 divide-x rounded-lg " + e;
|
|
856
857
|
}
|
|
857
|
-
return (t, r) => n.value ? (
|
|
858
|
+
return (t, r) => n.value ? (T(), s("div", {
|
|
858
859
|
key: 0,
|
|
859
860
|
id: "toast-top-right",
|
|
860
|
-
class:
|
|
861
|
+
class: v(l()),
|
|
861
862
|
role: "alert"
|
|
862
|
-
}, [c("div",
|
|
863
|
-
e.mode ==
|
|
863
|
+
}, [c("div", Lt, [
|
|
864
|
+
e.mode == P(Y).ERROR ? (T(), s("div", {
|
|
864
865
|
key: 0,
|
|
865
|
-
class:
|
|
866
|
-
}, [f(
|
|
866
|
+
class: v(a())
|
|
867
|
+
}, [f(P(ye), { class: "h-6 w-6 text-red-500" }), r[0] ||= c("span", { class: "sr-only" }, "Error icon", -1)], 2)) : e.mode == P(Y).SUCCESS ? (T(), s("div", {
|
|
867
868
|
key: 1,
|
|
868
|
-
class:
|
|
869
|
-
}, [f(
|
|
869
|
+
class: v(a())
|
|
870
|
+
}, [f(P(ue), { class: "h-6 w-6 text-green-500" }), r[1] ||= c("span", { class: "sr-only" }, "Check icon", -1)], 2)) : e.mode == P(Y).WARNING ? (T(), s("div", {
|
|
870
871
|
key: 2,
|
|
871
|
-
class:
|
|
872
|
-
}, [f(
|
|
873
|
-
c("div",
|
|
874
|
-
e.hasCloseIcon ? (
|
|
872
|
+
class: v(a())
|
|
873
|
+
}, [f(P(be), { class: "h-6 w-6 text-yellow-500" }), r[2] ||= c("span", { class: "sr-only" }, "Warning icon", -1)], 2)) : o("", !0),
|
|
874
|
+
c("div", Rt, N(e.description), 1),
|
|
875
|
+
e.hasCloseIcon ? (T(), s("button", {
|
|
875
876
|
key: 3,
|
|
876
877
|
type: "button",
|
|
877
878
|
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",
|
|
878
879
|
"aria-label": "Close",
|
|
879
880
|
onClick: i
|
|
880
|
-
}, [r[3] ||= c("span", { class: "sr-only" }, "Close", -1), f(
|
|
881
|
+
}, [r[3] ||= c("span", { class: "sr-only" }, "Close", -1), f(P(B), { class: "h-6 w-6 text-gray-500" })])) : o("", !0)
|
|
881
882
|
])], 2)) : o("", !0);
|
|
882
883
|
}
|
|
883
|
-
}),
|
|
884
|
+
}), Bt = { class: "w-13" }, Vt = /* @__PURE__ */ p({
|
|
884
885
|
__name: "ColoredSquares",
|
|
885
886
|
props: { color: {
|
|
886
887
|
type: String,
|
|
@@ -897,29 +898,29 @@ var je = { class: "min-w-0 flex-1" }, Me = {
|
|
|
897
898
|
"bg-yellow-300",
|
|
898
899
|
"bg-purple-300",
|
|
899
900
|
"bg-pink-300"
|
|
900
|
-
], r =
|
|
901
|
+
], r = O(n[Math.floor(Math.random() * n.length)]);
|
|
901
902
|
function i() {
|
|
902
903
|
let e = "font-bold text-xs mr-2 px-2.5 py-0.5 rounded-full", n = "gray";
|
|
903
904
|
switch (t.color) {
|
|
904
|
-
case
|
|
905
|
+
case G.GREEN:
|
|
905
906
|
n = "green";
|
|
906
907
|
break;
|
|
907
|
-
case
|
|
908
|
+
case G.RED:
|
|
908
909
|
n = "red";
|
|
909
910
|
break;
|
|
910
|
-
case
|
|
911
|
+
case G.BLUE:
|
|
911
912
|
n = "blue";
|
|
912
913
|
break;
|
|
913
|
-
case
|
|
914
|
+
case G.YELLOW:
|
|
914
915
|
n = "yellow";
|
|
915
916
|
break;
|
|
916
|
-
case
|
|
917
|
+
case G.NONE: return e;
|
|
917
918
|
}
|
|
918
919
|
return e + " bg-" + n + "-100 text-" + n + "-800";
|
|
919
920
|
}
|
|
920
|
-
return (e, t) => (
|
|
921
|
+
return (e, t) => (T(), s("div", Bt, [c("div", { class: v(["border border-gray-300 relative aspect-square rounded-lg bg-white shadow-sm overflow-hidden flex items-center justify-center text-center", i()]) }, [A(e.$slots, "default"), c("div", { class: v(["absolute bottom-0 left-0 h-1 w-full", r.value]) }, null, 2)], 2)]));
|
|
921
922
|
}
|
|
922
|
-
}),
|
|
923
|
+
}), Ht = { class: "flex items-start justify-between" }, Ut = { class: "min-w-0" }, Wt = /* @__PURE__ */ p({
|
|
923
924
|
__name: "EarningsCard",
|
|
924
925
|
props: {
|
|
925
926
|
title: { default: "TOTAL EARNINGS" },
|
|
@@ -971,27 +972,27 @@ var je = { class: "min-w-0 flex-1" }, Me = {
|
|
|
971
972
|
minimumFractionDigits: n.decimals,
|
|
972
973
|
maximumFractionDigits: n.decimals
|
|
973
974
|
}));
|
|
974
|
-
return (n, r) => (
|
|
975
|
+
return (n, r) => (T(), s("div", { class: v(["relative rounded-xl border-2 border-dashed bg-white dark:bg-slate-800", [d.value.border, t.compact ? "p-3" : "p-6"]]) }, [t.badge ? (T(), s("div", {
|
|
975
976
|
key: 0,
|
|
976
|
-
class:
|
|
977
|
-
},
|
|
978
|
-
c("p", { class:
|
|
979
|
-
c("p", { class:
|
|
980
|
-
c("p", { class:
|
|
981
|
-
]), c("div", { class:
|
|
982
|
-
class:
|
|
977
|
+
class: v(["absolute right-4 top-4 rounded-md px-3 py-1 text-xs font-bold tracking-wide", d.value.badge])
|
|
978
|
+
}, N(t.badge), 3)) : o("", !0), c("div", Ht, [c("div", Ut, [
|
|
979
|
+
c("p", { class: v(["font-bold tracking-wide text-gray-800 dark:text-slate-200", t.compact ? "pr-8 text-xs" : "text-sm"]) }, N(t.title), 3),
|
|
980
|
+
c("p", { class: v(["mt-1 font-bold truncate", [d.value.amount, t.compact ? "text-lg" : "text-4xl"]]) }, N(f.value), 3),
|
|
981
|
+
c("p", { class: v(["mt-1 font-medium", [d.value.subtitle, t.compact ? "text-xs" : "text-sm"]]) }, N(t.subtitle), 3)
|
|
982
|
+
]), c("div", { class: v(["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"]]) }, [(T(), s("svg", {
|
|
983
|
+
class: v([d.value.icon, t.compact ? "h-3.5 w-3.5" : "h-6 w-6"]),
|
|
983
984
|
viewBox: "0 0 24 24",
|
|
984
985
|
fill: "none",
|
|
985
986
|
stroke: "currentColor",
|
|
986
987
|
"stroke-width": "2.5",
|
|
987
988
|
"stroke-linecap": "round",
|
|
988
989
|
"stroke-linejoin": "round"
|
|
989
|
-
}, [l.value ? (
|
|
990
|
+
}, [l.value ? (T(), s(e, { key: 0 }, [r[0] ||= c("polyline", { points: "22 17 13.5 8.5 8.5 13.5 2 7" }, null, -1), r[1] ||= c("polyline", { points: "16 17 22 17 22 11" }, null, -1)], 64)) : (T(), s(e, { key: 1 }, [r[2] ||= c("polyline", { points: "22 7 13.5 15.5 8.5 10.5 2 17" }, null, -1), r[3] ||= c("polyline", { points: "16 7 22 7 22 13" }, null, -1)], 64))], 2))], 2)])], 2));
|
|
990
991
|
}
|
|
991
|
-
}),
|
|
992
|
+
}), Gt = {
|
|
992
993
|
key: 0,
|
|
993
994
|
class: "font-bold text-green-800 dark:text-green-400"
|
|
994
|
-
},
|
|
995
|
+
}, Kt = { key: 0 }, qt = { key: 0 }, Jt = "font-bold", Yt = /* @__PURE__ */ p({
|
|
995
996
|
__name: "EuroAmount",
|
|
996
997
|
props: {
|
|
997
998
|
amount: {
|
|
@@ -1011,20 +1012,20 @@ var je = { class: "min-w-0 flex-1" }, Me = {
|
|
|
1011
1012
|
},
|
|
1012
1013
|
setup(t) {
|
|
1013
1014
|
let n = t, r = i(() => n.amount !== null && n.amount !== void 0), a = i(() => r.value && n.amount < 0), c = i(() => n.beforeAmount === null || n.beforeAmount === void 0 ? !1 : n.amount < n.beforeAmount), l = i(() => a.value || c.value), u = i(() => !a.value && !c.value && n.beforeAmount !== null && n.beforeAmount !== void 0);
|
|
1014
|
-
return (n, i) => (
|
|
1015
|
+
return (n, i) => (T(), s(e, null, [r.value && u.value ? (T(), s("span", Gt, [d(N(t.amount) + " ", 1), t.showCurrency ? (T(), s("span", Kt, "€")) : o("", !0)])) : o("", !0), r.value && !u.value ? (T(), s("span", {
|
|
1015
1016
|
key: 1,
|
|
1016
|
-
class:
|
|
1017
|
-
}, [d(
|
|
1017
|
+
class: v([Jt, l.value ? "text-red-800 dark:text-red-400" : "text-gray-800 dark:text-gray-200"])
|
|
1018
|
+
}, [d(N(t.amount) + " ", 1), t.showCurrency ? (T(), s("span", qt, "€")) : o("", !0)], 2)) : o("", !0)], 64));
|
|
1018
1019
|
}
|
|
1019
|
-
}),
|
|
1020
|
+
}), Xt = { "aria-label": "Pagination" }, Zt = { class: "flex list-none p-0 m-0" }, Qt = [
|
|
1020
1021
|
"aria-current",
|
|
1021
1022
|
"aria-label",
|
|
1022
1023
|
"onClick"
|
|
1023
|
-
],
|
|
1024
|
+
], $t = {
|
|
1024
1025
|
key: 1,
|
|
1025
1026
|
"aria-hidden": "true",
|
|
1026
1027
|
class: "inline-block border border-gray-300 dark:border-gray-600 rounded-lg p-3 text-black dark:text-gray-200 cursor-not-allowed"
|
|
1027
|
-
},
|
|
1028
|
+
}, en = /* @__PURE__ */ p({
|
|
1028
1029
|
__name: "Pagination",
|
|
1029
1030
|
props: {
|
|
1030
1031
|
totalItems: {
|
|
@@ -1038,7 +1039,7 @@ var je = { class: "min-w-0 flex-1" }, Me = {
|
|
|
1038
1039
|
},
|
|
1039
1040
|
emits: ["page-changed"],
|
|
1040
1041
|
setup(t, { emit: n }) {
|
|
1041
|
-
let r = t, i =
|
|
1042
|
+
let r = t, i = O(1), a = O(0), o = O([]), l = n;
|
|
1042
1043
|
function u(e) {
|
|
1043
1044
|
if (a.value <= 5) {
|
|
1044
1045
|
o.value = Array.from({ length: a.value }, (e, t) => t + 1);
|
|
@@ -1052,30 +1053,30 @@ var je = { class: "min-w-0 flex-1" }, Me = {
|
|
|
1052
1053
|
function d(e) {
|
|
1053
1054
|
e === i.value || e < 1 || e > a.value || (i.value = e, u(e), l("page-changed", e));
|
|
1054
1055
|
}
|
|
1055
|
-
return
|
|
1056
|
+
return I(() => [r.totalItems, r.itemsPerPage], () => {
|
|
1056
1057
|
a.value = Math.ceil(r.totalItems / r.itemsPerPage), i.value > a.value && (i.value = Math.max(1, a.value)), u(i.value);
|
|
1057
|
-
}, { immediate: !0 }), (t, n) => (
|
|
1058
|
+
}, { immediate: !0 }), (t, n) => (T(), s("nav", Xt, [c("ul", Zt, [(T(!0), s(e, null, k(o.value, (e, t) => (T(), s("li", {
|
|
1058
1059
|
key: t,
|
|
1059
1060
|
class: "mr-1"
|
|
1060
|
-
}, [e === 0 ? (
|
|
1061
|
+
}, [e === 0 ? (T(), s("span", $t, "...")) : (T(), s("button", {
|
|
1061
1062
|
key: 0,
|
|
1062
1063
|
type: "button",
|
|
1063
1064
|
"aria-current": e === i.value ? "page" : void 0,
|
|
1064
1065
|
"aria-label": `Go to page ${e}`,
|
|
1065
1066
|
onClick: (t) => d(e),
|
|
1066
|
-
class:
|
|
1067
|
-
},
|
|
1067
|
+
class: v(["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 === i.value }])
|
|
1068
|
+
}, N(e), 11, Qt))]))), 128))])]));
|
|
1068
1069
|
}
|
|
1069
|
-
}),
|
|
1070
|
+
}), tn = { key: 0 }, nn = {
|
|
1070
1071
|
key: 0,
|
|
1071
1072
|
class: "flex items-center space-x-2"
|
|
1072
|
-
},
|
|
1073
|
+
}, rn = {
|
|
1073
1074
|
key: 1,
|
|
1074
1075
|
class: "flex items-center space-x-2"
|
|
1075
|
-
},
|
|
1076
|
+
}, an = {
|
|
1076
1077
|
key: 2,
|
|
1077
1078
|
class: "flex items-center space-x-2"
|
|
1078
|
-
},
|
|
1079
|
+
}, on = /* @__PURE__ */ p({
|
|
1079
1080
|
__name: "TrendArrow",
|
|
1080
1081
|
props: {
|
|
1081
1082
|
number: {
|
|
@@ -1089,23 +1090,23 @@ var je = { class: "min-w-0 flex-1" }, Me = {
|
|
|
1089
1090
|
},
|
|
1090
1091
|
setup(e) {
|
|
1091
1092
|
let t = e, n = i(() => t.number !== null && t.number !== void 0 && t.number < 0), r = i(() => t.number === 0);
|
|
1092
|
-
return (i, a) => e.number !== null && e.number !== void 0 ? (
|
|
1093
|
-
default:
|
|
1093
|
+
return (i, a) => e.number !== null && e.number !== void 0 ? (T(), s("div", tn, [n.value ? (T(), s("span", nn, [f(ze, { color: P(G).RED }, {
|
|
1094
|
+
default: L(() => [d(N(e.number) + N(t.icon), 1)]),
|
|
1094
1095
|
_: 1
|
|
1095
|
-
}, 8, ["color"]), f(
|
|
1096
|
-
default:
|
|
1096
|
+
}, 8, ["color"]), f(P(oe), { class: "h-5 w-5 text-red-500" })])) : r.value ? (T(), s("span", rn, [f(ze, { color: P(G).GRAY }, {
|
|
1097
|
+
default: L(() => [d(N(e.number) + N(t.icon), 1)]),
|
|
1097
1098
|
_: 1
|
|
1098
|
-
}, 8, ["color"]), f(
|
|
1099
|
-
default:
|
|
1099
|
+
}, 8, ["color"]), f(P(we), { class: "h-5 w-5 text-gray-400" })])) : (T(), s("span", an, [f(ze, { color: P(G).GREEN }, {
|
|
1100
|
+
default: L(() => [d(N(e.number) + N(t.icon), 1)]),
|
|
1100
1101
|
_: 1
|
|
1101
|
-
}, 8, ["color"]), f(
|
|
1102
|
+
}, 8, ["color"]), f(P(se), { class: "h-5 w-5 text-green-500" })]))])) : o("", !0);
|
|
1102
1103
|
}
|
|
1103
1104
|
});
|
|
1104
1105
|
//#endregion
|
|
1105
1106
|
//#region src/composables/useThemeClasses.ts
|
|
1106
|
-
function
|
|
1107
|
-
let { isDark: e } =
|
|
1108
|
-
return
|
|
1107
|
+
function Z() {
|
|
1108
|
+
let { isDark: e } = W();
|
|
1109
|
+
return E({
|
|
1109
1110
|
card: i(() => e.value ? "bg-gray-800 border-gray-700" : "bg-white border-gray-200"),
|
|
1110
1111
|
cardAlt: i(() => e.value ? "bg-gray-900 border-gray-700" : "bg-white border-gray-200"),
|
|
1111
1112
|
pageBg: i(() => e.value ? "bg-gray-900" : "bg-gray-50"),
|
|
@@ -1131,15 +1132,15 @@ function J() {
|
|
|
1131
1132
|
}
|
|
1132
1133
|
//#endregion
|
|
1133
1134
|
//#region src/composables/useEscapeKey.ts
|
|
1134
|
-
function
|
|
1135
|
+
function sn(e) {
|
|
1135
1136
|
function t(t) {
|
|
1136
1137
|
t.key === "Escape" && e();
|
|
1137
1138
|
}
|
|
1138
|
-
|
|
1139
|
+
S(() => document.addEventListener("keydown", t)), x(() => document.removeEventListener("keydown", t));
|
|
1139
1140
|
}
|
|
1140
1141
|
//#endregion
|
|
1141
1142
|
//#region src/components/BaseModalShell.vue?vue&type=script&setup=true&lang.ts
|
|
1142
|
-
var
|
|
1143
|
+
var cn = { class: "flex items-start gap-4 min-w-0" }, ln = { class: "flex-1 min-w-0" }, un = { class: "p-6 overflow-y-auto flex-1" }, dn = { class: "p-6" }, fn = { class: "flex items-start gap-4" }, pn = { class: "flex-1" }, mn = { class: "mt-4" }, hn = { class: "mt-6 flex gap-3 justify-end" }, gn = /* @__PURE__ */ p({
|
|
1143
1144
|
__name: "BaseModalShell",
|
|
1144
1145
|
props: {
|
|
1145
1146
|
title: {},
|
|
@@ -1159,55 +1160,55 @@ var It = { class: "flex items-start gap-4 min-w-0" }, Lt = { class: "flex-1 min-
|
|
|
1159
1160
|
},
|
|
1160
1161
|
emits: ["cancel", "backdrop"],
|
|
1161
1162
|
setup(e, { emit: n }) {
|
|
1162
|
-
let r = e, l = n, { isDark: u } =
|
|
1163
|
+
let r = e, l = n, { isDark: u } = W(), d = Z(), f = `modal-title-${Math.random().toString(36).slice(2, 9)}`, p = i(() => u.value ? "bg-gray-900 border border-gray-700" : "bg-white border border-gray-200"), m = i(() => r.iconBgClass || (u.value ? "bg-emerald-900/30" : "bg-emerald-50"));
|
|
1163
1164
|
function h() {
|
|
1164
1165
|
l("backdrop"), r.manualClose || l("cancel");
|
|
1165
1166
|
}
|
|
1166
|
-
return
|
|
1167
|
+
return sn(() => {
|
|
1167
1168
|
r.manualClose || l("cancel");
|
|
1168
|
-
}), (n, r) => (
|
|
1169
|
+
}), (n, r) => (T(), a(t, { to: "body" }, [c("div", {
|
|
1169
1170
|
class: "fixed inset-0 z-50 flex items-center justify-center bg-black/50",
|
|
1170
1171
|
role: "dialog",
|
|
1171
1172
|
"aria-modal": "true",
|
|
1172
1173
|
"aria-labelledby": f,
|
|
1173
1174
|
onClick: h
|
|
1174
|
-
}, [e.scrollable ? (
|
|
1175
|
+
}, [e.scrollable ? (T(), s("div", {
|
|
1175
1176
|
key: 0,
|
|
1176
|
-
class:
|
|
1177
|
-
onClick: r[0] ||=
|
|
1177
|
+
class: v(["relative w-full mx-4 rounded-lg shadow-xl max-h-[90vh] flex flex-col", [e.maxWidthClass, p.value]]),
|
|
1178
|
+
onClick: r[0] ||= z(() => {}, ["stop"])
|
|
1178
1179
|
}, [
|
|
1179
|
-
c("div", { class:
|
|
1180
|
-
class:
|
|
1180
|
+
c("div", { class: v(["flex items-start justify-between gap-4 p-6 border-b shrink-0", P(d).border]) }, [c("div", cn, [A(n.$slots, "icon", {}, () => [c("div", { class: v(["flex-shrink-0 flex h-12 w-12 items-center justify-center rounded-full", m.value]) }, [(T(), a(M(e.icon), {
|
|
1181
|
+
class: v(["h-6 w-6", e.iconClass]),
|
|
1181
1182
|
"aria-hidden": "true"
|
|
1182
|
-
}, null, 8, ["class"]))], 2)]), c("div",
|
|
1183
|
+
}, null, 8, ["class"]))], 2)]), c("div", ln, [c("h3", {
|
|
1183
1184
|
id: f,
|
|
1184
|
-
class:
|
|
1185
|
-
},
|
|
1185
|
+
class: v(["text-lg font-medium", P(d).primaryText])
|
|
1186
|
+
}, N(e.title), 3), e.subtitle ? (T(), s("p", {
|
|
1186
1187
|
key: 0,
|
|
1187
|
-
class:
|
|
1188
|
-
},
|
|
1189
|
-
c("div",
|
|
1190
|
-
n.$slots.footer ? (
|
|
1188
|
+
class: v(["text-sm mt-1 break-all", P(d).mutedText])
|
|
1189
|
+
}, N(e.subtitle), 3)) : o("", !0)])]), A(n.$slots, "header-actions")], 2),
|
|
1190
|
+
c("div", un, [A(n.$slots, "default")]),
|
|
1191
|
+
n.$slots.footer ? (T(), s("div", {
|
|
1191
1192
|
key: 0,
|
|
1192
|
-
class:
|
|
1193
|
-
}, [
|
|
1194
|
-
], 2)) : (
|
|
1193
|
+
class: v(["flex gap-3 justify-end p-6 border-t shrink-0", P(d).border])
|
|
1194
|
+
}, [A(n.$slots, "footer")], 2)) : o("", !0)
|
|
1195
|
+
], 2)) : (T(), s("div", {
|
|
1195
1196
|
key: 1,
|
|
1196
|
-
class:
|
|
1197
|
-
onClick: r[1] ||=
|
|
1198
|
-
}, [c("div",
|
|
1199
|
-
c("div",
|
|
1200
|
-
class:
|
|
1197
|
+
class: v(["relative w-full mx-4 rounded-lg shadow-xl", [e.maxWidthClass, p.value]]),
|
|
1198
|
+
onClick: r[1] ||= z(() => {}, ["stop"])
|
|
1199
|
+
}, [c("div", dn, [
|
|
1200
|
+
c("div", fn, [A(n.$slots, "icon", {}, () => [c("div", { class: v(["flex-shrink-0 flex h-12 w-12 items-center justify-center rounded-full", m.value]) }, [(T(), a(M(e.icon), {
|
|
1201
|
+
class: v(["h-6 w-6", e.iconClass]),
|
|
1201
1202
|
"aria-hidden": "true"
|
|
1202
|
-
}, null, 8, ["class"]))], 2)]), c("div",
|
|
1203
|
+
}, null, 8, ["class"]))], 2)]), c("div", pn, [c("h3", {
|
|
1203
1204
|
id: f,
|
|
1204
|
-
class:
|
|
1205
|
-
},
|
|
1206
|
-
c("div",
|
|
1207
|
-
c("div",
|
|
1205
|
+
class: v(["text-lg font-medium", P(d).primaryText])
|
|
1206
|
+
}, N(e.title), 3)])]),
|
|
1207
|
+
c("div", mn, [A(n.$slots, "default")]),
|
|
1208
|
+
c("div", hn, [A(n.$slots, "footer")])
|
|
1208
1209
|
])], 2))])]));
|
|
1209
1210
|
}
|
|
1210
|
-
}),
|
|
1211
|
+
}), _n = ["aria-expanded"], vn = { class: "flex items-center gap-3" }, yn = /* @__PURE__ */ p({
|
|
1211
1212
|
__name: "BaseCollapsibleSection",
|
|
1212
1213
|
props: {
|
|
1213
1214
|
title: {},
|
|
@@ -1217,17 +1218,17 @@ var It = { class: "flex items-start gap-4 min-w-0" }, Lt = { class: "flex-1 min-
|
|
|
1217
1218
|
},
|
|
1218
1219
|
emits: ["toggle"],
|
|
1219
1220
|
setup(e, { emit: t }) {
|
|
1220
|
-
let n = e, r = t, { isDark: a } =
|
|
1221
|
-
return (t, n) => (
|
|
1221
|
+
let n = e, r = t, { isDark: a } = W(), l = Z(), u = i(() => a.value ? "text-gray-100" : "text-gray-700"), d = i(() => a.value ? "bg-gray-800/50 hover:bg-gray-800 border-gray-700" : "bg-gray-50 hover:bg-gray-100 border-gray-200"), f = i(() => a.value ? "bg-emerald-500/15 text-emerald-400" : "bg-emerald-50 text-emerald-700"), p = i(() => n.bodyClass === void 0 ? a.value ? "bg-gray-800" : "bg-white" : n.bodyClass);
|
|
1222
|
+
return (t, n) => (T(), s("section", { class: v(["rounded-xl border transition-colors", P(l).cardAlt]) }, [c("button", {
|
|
1222
1223
|
type: "button",
|
|
1223
|
-
class:
|
|
1224
|
+
class: v(["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"]]),
|
|
1224
1225
|
"aria-expanded": !e.collapsed,
|
|
1225
1226
|
onClick: n[0] ||= (e) => r("toggle")
|
|
1226
|
-
}, [c("div",
|
|
1227
|
+
}, [c("div", vn, [c("h2", { class: v(["text-base font-semibold", u.value]) }, N(e.title), 3), e.badge ? (T(), s("span", {
|
|
1227
1228
|
key: 0,
|
|
1228
|
-
class:
|
|
1229
|
-
},
|
|
1230
|
-
class:
|
|
1229
|
+
class: v(["text-xs px-2 py-0.5 rounded-full", f.value])
|
|
1230
|
+
}, N(e.badge), 3)) : o("", !0)]), (T(), s("svg", {
|
|
1231
|
+
class: v(["w-5 h-5 transition-transform", [e.collapsed ? "" : "rotate-180", P(l).dimTextAlt]]),
|
|
1231
1232
|
fill: "none",
|
|
1232
1233
|
viewBox: "0 0 24 24",
|
|
1233
1234
|
stroke: "currentColor",
|
|
@@ -1237,15 +1238,15 @@ var It = { class: "flex items-start gap-4 min-w-0" }, Lt = { class: "flex-1 min-
|
|
|
1237
1238
|
"stroke-linecap": "round",
|
|
1238
1239
|
"stroke-linejoin": "round",
|
|
1239
1240
|
d: "M19 9l-7 7-7-7"
|
|
1240
|
-
}, null, -1)]], 2))], 10,
|
|
1241
|
+
}, null, -1)]], 2))], 10, _n), R(c("div", { class: v(["p-6 border-t rounded-b-xl", [P(l).border, p.value]]) }, [A(t.$slots, "default")], 2), [[ie, !e.collapsed]])], 2));
|
|
1241
1242
|
}
|
|
1242
|
-
}),
|
|
1243
|
+
}), bn = ["disabled"], xn = ["disabled"], Sn = {
|
|
1243
1244
|
key: 0,
|
|
1244
1245
|
class: "w-4 h-4 animate-spin",
|
|
1245
1246
|
fill: "none",
|
|
1246
1247
|
viewBox: "0 0 24 24",
|
|
1247
1248
|
"aria-hidden": "true"
|
|
1248
|
-
},
|
|
1249
|
+
}, Cn = /* @__PURE__ */ p({
|
|
1249
1250
|
__name: "BaseConfirmModal",
|
|
1250
1251
|
props: {
|
|
1251
1252
|
title: {},
|
|
@@ -1261,32 +1262,32 @@ var It = { class: "flex items-start gap-4 min-w-0" }, Lt = { class: "flex-1 min-
|
|
|
1261
1262
|
},
|
|
1262
1263
|
emits: ["confirm", "cancel"],
|
|
1263
1264
|
setup(e, { emit: t }) {
|
|
1264
|
-
let n = e, r = t, { isDark: i } =
|
|
1265
|
+
let n = e, r = t, { isDark: i } = W(), l = Z();
|
|
1265
1266
|
function u() {
|
|
1266
1267
|
n.submitting || r("confirm");
|
|
1267
1268
|
}
|
|
1268
1269
|
function f() {
|
|
1269
1270
|
n.submitting || r("cancel");
|
|
1270
1271
|
}
|
|
1271
|
-
return (t, n) => (
|
|
1272
|
+
return (t, n) => (T(), a(gn, {
|
|
1272
1273
|
title: e.title,
|
|
1273
|
-
icon:
|
|
1274
|
-
"icon-bg-class": e.variant === "danger" ?
|
|
1274
|
+
icon: P(be),
|
|
1275
|
+
"icon-bg-class": e.variant === "danger" ? P(i) ? "bg-red-900/30" : "bg-red-50" : P(i) ? "bg-amber-900/30" : "bg-amber-50",
|
|
1275
1276
|
"icon-class": e.variant === "danger" ? "text-red-600" : "text-amber-600",
|
|
1276
1277
|
"manual-close": e.submitting,
|
|
1277
1278
|
onCancel: f
|
|
1278
1279
|
}, {
|
|
1279
|
-
footer:
|
|
1280
|
+
footer: L(() => [c("button", {
|
|
1280
1281
|
type: "button",
|
|
1281
1282
|
disabled: e.submitting,
|
|
1282
|
-
class:
|
|
1283
|
+
class: v(["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", [P(l).ghostButton, e.submitting ? "opacity-60 cursor-not-allowed" : "cursor-pointer"]]),
|
|
1283
1284
|
onClick: f
|
|
1284
|
-
},
|
|
1285
|
+
}, N(e.cancelText), 11, bn), c("button", {
|
|
1285
1286
|
type: "button",
|
|
1286
1287
|
disabled: e.submitting,
|
|
1287
|
-
class:
|
|
1288
|
+
class: v(["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"]]),
|
|
1288
1289
|
onClick: u
|
|
1289
|
-
}, [e.submitting ? (
|
|
1290
|
+
}, [e.submitting ? (T(), s("svg", Sn, [...n[0] ||= [c("circle", {
|
|
1290
1291
|
class: "opacity-25",
|
|
1291
1292
|
cx: "12",
|
|
1292
1293
|
cy: "12",
|
|
@@ -1297,8 +1298,8 @@ var It = { class: "flex items-start gap-4 min-w-0" }, Lt = { class: "flex-1 min-
|
|
|
1297
1298
|
class: "opacity-75",
|
|
1298
1299
|
fill: "currentColor",
|
|
1299
1300
|
d: "M4 12a8 8 0 018-8v4a4 4 0 00-4 4H4z"
|
|
1300
|
-
}, null, -1)]])) : o("", !0), d(" " +
|
|
1301
|
-
default:
|
|
1301
|
+
}, null, -1)]])) : o("", !0), d(" " + N(e.submitting ? e.submittingText : e.confirmText), 1)], 10, xn)]),
|
|
1302
|
+
default: L(() => [A(t.$slots, "message", {}, () => [c("p", { class: v(["text-sm", P(i) ? "text-gray-300" : "text-gray-600"]) }, N(e.message), 3)]), A(t.$slots, "default")]),
|
|
1302
1303
|
_: 3
|
|
1303
1304
|
}, 8, [
|
|
1304
1305
|
"title",
|
|
@@ -1308,7 +1309,7 @@ var It = { class: "flex items-start gap-4 min-w-0" }, Lt = { class: "flex-1 min-
|
|
|
1308
1309
|
"manual-close"
|
|
1309
1310
|
]));
|
|
1310
1311
|
}
|
|
1311
|
-
}),
|
|
1312
|
+
}), wn = { class: "mt-4" }, Tn = ["placeholder"], En = ["disabled"], Dn = /* @__PURE__ */ p({
|
|
1312
1313
|
__name: "BaseTextInputModal",
|
|
1313
1314
|
props: {
|
|
1314
1315
|
title: {},
|
|
@@ -1326,9 +1327,9 @@ var It = { class: "flex items-start gap-4 min-w-0" }, Lt = { class: "flex-1 min-
|
|
|
1326
1327
|
},
|
|
1327
1328
|
emits: ["confirm", "cancel"],
|
|
1328
1329
|
setup(e, { emit: t }) {
|
|
1329
|
-
let n = e, r = t, { isDark: i } =
|
|
1330
|
-
|
|
1331
|
-
await
|
|
1330
|
+
let n = e, r = t, { isDark: i } = W(), o = Z(), s = O(n.initialValue), u = O(null);
|
|
1331
|
+
S(async () => {
|
|
1332
|
+
await _(), u.value?.focus();
|
|
1332
1333
|
});
|
|
1333
1334
|
function d() {
|
|
1334
1335
|
s.value.trim() && !n.submitting && r("confirm", s.value.trim());
|
|
@@ -1339,39 +1340,39 @@ var It = { class: "flex items-start gap-4 min-w-0" }, Lt = { class: "flex-1 min-
|
|
|
1339
1340
|
function p() {
|
|
1340
1341
|
s.value.trim() === (n.initialValue ?? "").trim() && f();
|
|
1341
1342
|
}
|
|
1342
|
-
return
|
|
1343
|
+
return sn(f), (t, n) => (T(), a(gn, {
|
|
1343
1344
|
title: e.title,
|
|
1344
|
-
icon:
|
|
1345
|
+
icon: P(ve),
|
|
1345
1346
|
"manual-close": "",
|
|
1346
1347
|
onBackdrop: p
|
|
1347
1348
|
}, l({
|
|
1348
|
-
footer:
|
|
1349
|
+
footer: L(() => [c("button", {
|
|
1349
1350
|
type: "button",
|
|
1350
|
-
class:
|
|
1351
|
+
class: v(["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", P(o).ghostButton]),
|
|
1351
1352
|
onClick: f
|
|
1352
|
-
},
|
|
1353
|
+
}, N(e.cancelText), 3), c("button", {
|
|
1353
1354
|
type: "button",
|
|
1354
1355
|
disabled: !s.value.trim() || e.submitting,
|
|
1355
|
-
class:
|
|
1356
|
+
class: v(["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"]]),
|
|
1356
1357
|
onClick: d
|
|
1357
|
-
},
|
|
1358
|
-
default:
|
|
1358
|
+
}, N(e.submitting ? e.submittingText : e.confirmText), 11, En)]),
|
|
1359
|
+
default: L(() => [c("p", { class: v(["text-sm", P(i) ? "text-gray-300" : "text-gray-600"]) }, N(e.message), 3), c("div", wn, [c("label", { class: v(["block text-sm font-medium mb-1", P(o).label]) }, N(e.inputLabel), 3), R(c("input", {
|
|
1359
1360
|
ref_key: "nameInput",
|
|
1360
1361
|
ref: u,
|
|
1361
1362
|
"onUpdate:modelValue": n[0] ||= (e) => s.value = e,
|
|
1362
1363
|
type: "text",
|
|
1363
1364
|
placeholder: e.placeholder,
|
|
1364
|
-
class:
|
|
1365
|
-
onKeyup:
|
|
1366
|
-
}, null, 42,
|
|
1365
|
+
class: v(["w-full px-3 py-2 rounded-md border text-sm transition-colors", P(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"]),
|
|
1366
|
+
onKeyup: ae(d, ["enter"])
|
|
1367
|
+
}, null, 42, Tn), [[re, s.value]])])]),
|
|
1367
1368
|
_: 2
|
|
1368
1369
|
}, [t.$slots.icon ? {
|
|
1369
1370
|
name: "icon",
|
|
1370
|
-
fn:
|
|
1371
|
+
fn: L(() => [A(t.$slots, "icon")]),
|
|
1371
1372
|
key: "0"
|
|
1372
1373
|
} : void 0]), 1032, ["title", "icon"]));
|
|
1373
1374
|
}
|
|
1374
|
-
}),
|
|
1375
|
+
}), On = { class: "flex items-center justify-center min-h-[60vh]" }, kn = { class: "text-center px-6" }, An = /* @__PURE__ */ p({
|
|
1375
1376
|
__name: "BaseNotFoundPage",
|
|
1376
1377
|
props: {
|
|
1377
1378
|
code: { default: "404" },
|
|
@@ -1380,33 +1381,33 @@ var It = { class: "flex items-start gap-4 min-w-0" }, Lt = { class: "flex-1 min-
|
|
|
1380
1381
|
homeLabel: { default: "Go home" }
|
|
1381
1382
|
},
|
|
1382
1383
|
setup(e) {
|
|
1383
|
-
let t = e, n =
|
|
1384
|
+
let t = e, n = Ae(), { isDark: r } = W(), i = Z();
|
|
1384
1385
|
function a() {
|
|
1385
1386
|
n.push({ name: t.homeRouteName });
|
|
1386
1387
|
}
|
|
1387
|
-
return (t, n) => (
|
|
1388
|
-
f(
|
|
1389
|
-
c("h1", { class:
|
|
1390
|
-
c("p", { class:
|
|
1388
|
+
return (t, n) => (T(), s("div", On, [c("div", kn, [
|
|
1389
|
+
f(P(be), { class: v(["w-16 h-16 mx-auto mb-4", P(i).illustration]) }, null, 8, ["class"]),
|
|
1390
|
+
c("h1", { class: v(["text-4xl font-bold mb-2", P(r) ? "text-gray-200" : "text-gray-800"]) }, N(e.code), 3),
|
|
1391
|
+
c("p", { class: v(["text-lg mb-6", P(i).dimTextAlt]) }, N(e.message), 3),
|
|
1391
1392
|
c("button", {
|
|
1392
1393
|
onClick: a,
|
|
1393
|
-
class:
|
|
1394
|
-
},
|
|
1394
|
+
class: v(["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", P(r) ? "bg-emerald-600 hover:bg-emerald-500" : "bg-emerald-600 hover:bg-emerald-700"])
|
|
1395
|
+
}, N(e.homeLabel), 3)
|
|
1395
1396
|
])]));
|
|
1396
1397
|
}
|
|
1397
|
-
}),
|
|
1398
|
-
function
|
|
1398
|
+
}), jn = O(!1);
|
|
1399
|
+
function Mn() {
|
|
1399
1400
|
function e() {
|
|
1400
|
-
|
|
1401
|
+
jn.value = !0;
|
|
1401
1402
|
}
|
|
1402
1403
|
function t() {
|
|
1403
|
-
|
|
1404
|
+
jn.value = !1;
|
|
1404
1405
|
}
|
|
1405
1406
|
function n() {
|
|
1406
|
-
|
|
1407
|
+
jn.value = !jn.value;
|
|
1407
1408
|
}
|
|
1408
1409
|
return {
|
|
1409
|
-
mobileOpen:
|
|
1410
|
+
mobileOpen: jn,
|
|
1410
1411
|
open: e,
|
|
1411
1412
|
close: t,
|
|
1412
1413
|
toggle: n
|
|
@@ -1414,30 +1415,30 @@ function sn() {
|
|
|
1414
1415
|
}
|
|
1415
1416
|
//#endregion
|
|
1416
1417
|
//#region src/composables/useSidebarCollapse.ts
|
|
1417
|
-
var
|
|
1418
|
-
function
|
|
1419
|
-
if (!
|
|
1420
|
-
let e = window.localStorage?.getItem(
|
|
1421
|
-
e && (
|
|
1422
|
-
|
|
1423
|
-
window.localStorage?.setItem(
|
|
1418
|
+
var Q = O(!1), Nn = !1, Pn = "mgv-sidebar-collapsed";
|
|
1419
|
+
function Fn(e) {
|
|
1420
|
+
if (!Nn && (Nn = !0, Pn = e, typeof window < "u")) {
|
|
1421
|
+
let e = window.localStorage?.getItem(Pn);
|
|
1422
|
+
e && (Q.value = e === "true"), m(!0).run(() => {
|
|
1423
|
+
I(Q, (e) => {
|
|
1424
|
+
window.localStorage?.setItem(Pn, String(e));
|
|
1424
1425
|
});
|
|
1425
1426
|
});
|
|
1426
1427
|
}
|
|
1427
1428
|
}
|
|
1428
|
-
function
|
|
1429
|
-
|
|
1429
|
+
function In(e) {
|
|
1430
|
+
Fn(e?.storageKey ?? Pn);
|
|
1430
1431
|
function t() {
|
|
1431
|
-
|
|
1432
|
+
Q.value = !0;
|
|
1432
1433
|
}
|
|
1433
1434
|
function n() {
|
|
1434
|
-
|
|
1435
|
+
Q.value = !1;
|
|
1435
1436
|
}
|
|
1436
1437
|
function r() {
|
|
1437
|
-
|
|
1438
|
+
Q.value = !Q.value;
|
|
1438
1439
|
}
|
|
1439
1440
|
return {
|
|
1440
|
-
collapsed:
|
|
1441
|
+
collapsed: Q,
|
|
1441
1442
|
collapse: t,
|
|
1442
1443
|
expand: n,
|
|
1443
1444
|
toggle: r
|
|
@@ -1445,45 +1446,45 @@ function dn(e) {
|
|
|
1445
1446
|
}
|
|
1446
1447
|
//#endregion
|
|
1447
1448
|
//#region src/composables/useNotifications.ts
|
|
1448
|
-
var
|
|
1449
|
-
function
|
|
1449
|
+
var $ = O([]), Ln = O(!1), Rn = i(() => $.value.filter((e) => !e.read).length);
|
|
1450
|
+
function zn() {
|
|
1450
1451
|
function e() {
|
|
1451
|
-
|
|
1452
|
+
Ln.value = !0;
|
|
1452
1453
|
}
|
|
1453
1454
|
function t() {
|
|
1454
|
-
|
|
1455
|
+
Ln.value = !1;
|
|
1455
1456
|
}
|
|
1456
1457
|
function n() {
|
|
1457
|
-
|
|
1458
|
+
Ln.value = !Ln.value;
|
|
1458
1459
|
}
|
|
1459
1460
|
function r(e) {
|
|
1460
|
-
|
|
1461
|
+
$.value = e;
|
|
1461
1462
|
}
|
|
1462
1463
|
function i(e) {
|
|
1463
|
-
|
|
1464
|
+
$.value = [e, ...$.value];
|
|
1464
1465
|
}
|
|
1465
1466
|
function a(e) {
|
|
1466
|
-
|
|
1467
|
+
$.value = $.value.filter((t) => t.id !== e);
|
|
1467
1468
|
}
|
|
1468
1469
|
function o(e) {
|
|
1469
|
-
|
|
1470
|
+
$.value = $.value.map((t) => t.id === e ? {
|
|
1470
1471
|
...t,
|
|
1471
1472
|
read: !0
|
|
1472
1473
|
} : t);
|
|
1473
1474
|
}
|
|
1474
1475
|
function s() {
|
|
1475
|
-
|
|
1476
|
+
$.value = $.value.map((e) => e.read ? e : {
|
|
1476
1477
|
...e,
|
|
1477
1478
|
read: !0
|
|
1478
1479
|
});
|
|
1479
1480
|
}
|
|
1480
1481
|
function c() {
|
|
1481
|
-
|
|
1482
|
+
$.value = [];
|
|
1482
1483
|
}
|
|
1483
1484
|
return {
|
|
1484
|
-
notifications:
|
|
1485
|
-
unreadCount:
|
|
1486
|
-
open:
|
|
1485
|
+
notifications: $,
|
|
1486
|
+
unreadCount: Rn,
|
|
1487
|
+
open: Ln,
|
|
1487
1488
|
openPanel: e,
|
|
1488
1489
|
closePanel: t,
|
|
1489
1490
|
togglePanel: n,
|
|
@@ -1497,22 +1498,22 @@ function pn() {
|
|
|
1497
1498
|
}
|
|
1498
1499
|
//#endregion
|
|
1499
1500
|
//#region src/components/BaseSidebar.vue?vue&type=script&setup=true&lang.ts
|
|
1500
|
-
var
|
|
1501
|
+
var Bn = ["aria-label", "aria-expanded"], Vn = { class: "flex flex-col h-full" }, Hn = { class: "flex-1 overflow-y-auto px-3 space-y-6" }, Un = { class: "space-y-0.5" }, Wn = [
|
|
1501
1502
|
"aria-current",
|
|
1502
1503
|
"title",
|
|
1503
1504
|
"onClick"
|
|
1504
|
-
],
|
|
1505
|
+
], Gn = ["aria-label"], Kn = { class: "relative shrink-0" }, qn = {
|
|
1505
1506
|
key: 0,
|
|
1506
1507
|
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"
|
|
1507
|
-
},
|
|
1508
|
+
}, Jn = [
|
|
1508
1509
|
"title",
|
|
1509
1510
|
"aria-label",
|
|
1510
1511
|
"aria-pressed"
|
|
1511
|
-
],
|
|
1512
|
+
], Yn = [
|
|
1512
1513
|
"title",
|
|
1513
1514
|
"aria-label",
|
|
1514
1515
|
"aria-pressed"
|
|
1515
|
-
],
|
|
1516
|
+
], Xn = /*#__PURE__*/ ((e, t) => {
|
|
1516
1517
|
let n = e.__vccOpts || e;
|
|
1517
1518
|
for (let [e, r] of t) n[e] = r;
|
|
1518
1519
|
return n;
|
|
@@ -1537,151 +1538,151 @@ var mn = ["aria-label", "aria-expanded"], hn = { class: "flex flex-col h-full" }
|
|
|
1537
1538
|
}
|
|
1538
1539
|
},
|
|
1539
1540
|
setup(t) {
|
|
1540
|
-
let n = t, r =
|
|
1541
|
-
|
|
1542
|
-
e ? (
|
|
1541
|
+
let n = t, r = Ae(), l = ke(), { isDark: u, toggleTheme: p } = W(), { mobileOpen: m, close: h, toggle: g } = Mn(), { collapsed: y, toggle: b } = In(), { unreadCount: x, togglePanel: S } = zn(), C = i(() => n.collapsible && y.value), w = O(null), E = null;
|
|
1542
|
+
I(m, async (e) => {
|
|
1543
|
+
e ? (E = document.activeElement instanceof HTMLElement ? document.activeElement : null, await _(), w.value?.focus()) : (E?.focus(), E = null);
|
|
1543
1544
|
});
|
|
1544
|
-
function
|
|
1545
|
-
r.push({ name: n.homeRouteName }),
|
|
1545
|
+
function D() {
|
|
1546
|
+
r.push({ name: n.homeRouteName }), h();
|
|
1546
1547
|
}
|
|
1547
|
-
function
|
|
1548
|
+
function j(e) {
|
|
1548
1549
|
return l.name === e;
|
|
1549
1550
|
}
|
|
1550
|
-
function
|
|
1551
|
-
r.push({ name: e }),
|
|
1551
|
+
function ee(e) {
|
|
1552
|
+
r.push({ name: e }), h();
|
|
1552
1553
|
}
|
|
1553
|
-
return (n, r) => (
|
|
1554
|
-
c("div", { class:
|
|
1554
|
+
return (n, r) => (T(), s("div", null, [
|
|
1555
|
+
c("div", { class: v(["mobile-topbar fixed top-0 inset-x-0 z-30 flex items-center justify-between px-4 py-3 border-b transition-colors", P(u) ? "bg-gray-900 border-gray-800" : "bg-white border-gray-200"]) }, [c("button", {
|
|
1555
1556
|
type: "button",
|
|
1556
|
-
onClick:
|
|
1557
|
+
onClick: D,
|
|
1557
1558
|
class: "cursor-pointer rounded focus:outline-none focus-visible:ring-2 focus-visible:ring-emerald-500",
|
|
1558
1559
|
"aria-label": "Go to home"
|
|
1559
|
-
}, [
|
|
1560
|
+
}, [A(n.$slots, "logo", { size: 28 }, void 0, !0)]), c("button", {
|
|
1560
1561
|
type: "button",
|
|
1561
|
-
onClick: r[0] ||= (...e) =>
|
|
1562
|
-
class:
|
|
1563
|
-
"aria-label":
|
|
1564
|
-
"aria-expanded":
|
|
1565
|
-
}, [
|
|
1562
|
+
onClick: r[0] ||= (...e) => P(g) && P(g)(...e),
|
|
1563
|
+
class: v(["p-2 rounded-lg cursor-pointer transition-colors focus:outline-none focus-visible:ring-2 focus-visible:ring-emerald-500", P(u) ? "text-gray-400 hover:bg-gray-800" : "text-gray-600 hover:bg-gray-100"]),
|
|
1564
|
+
"aria-label": P(m) ? "Close navigation menu" : "Open navigation menu",
|
|
1565
|
+
"aria-expanded": P(m)
|
|
1566
|
+
}, [P(m) ? (T(), a(P(B), {
|
|
1566
1567
|
key: 1,
|
|
1567
1568
|
class: "w-6 h-6",
|
|
1568
1569
|
"aria-hidden": "true"
|
|
1569
|
-
})) : (
|
|
1570
|
+
})) : (T(), a(P(ce), {
|
|
1570
1571
|
key: 0,
|
|
1571
1572
|
class: "w-6 h-6",
|
|
1572
1573
|
"aria-hidden": "true"
|
|
1573
|
-
}))], 10,
|
|
1574
|
-
|
|
1574
|
+
}))], 10, Bn)], 2),
|
|
1575
|
+
P(m) ? (T(), s("div", {
|
|
1575
1576
|
key: 0,
|
|
1576
1577
|
class: "mobile-overlay fixed inset-0 z-40 bg-black/50",
|
|
1577
1578
|
"aria-hidden": "true",
|
|
1578
|
-
onClick: r[1] ||= (...e) =>
|
|
1579
|
+
onClick: r[1] ||= (...e) => P(h) && P(h)(...e)
|
|
1579
1580
|
})) : o("", !0),
|
|
1580
1581
|
c("aside", {
|
|
1581
1582
|
role: "navigation",
|
|
1582
1583
|
"aria-label": "Main navigation",
|
|
1583
|
-
class:
|
|
1584
|
-
|
|
1585
|
-
|
|
1586
|
-
t.collapsible &&
|
|
1584
|
+
class: v(["fixed top-0 left-0 h-screen w-60 flex flex-col border-r transition-all duration-300 lg:pointer-events-auto", [
|
|
1585
|
+
P(u) ? "bg-gray-900 border-gray-800" : "bg-white border-gray-200",
|
|
1586
|
+
P(m) ? "translate-x-0 z-50" : "-translate-x-full max-lg:pointer-events-none lg:translate-x-0 z-50",
|
|
1587
|
+
t.collapsible && P(y) ? "lg:w-16" : "lg:w-60"
|
|
1587
1588
|
]])
|
|
1588
|
-
}, [c("div",
|
|
1589
|
-
c("div", { class:
|
|
1589
|
+
}, [c("div", Vn, [
|
|
1590
|
+
c("div", { class: v(["px-5 pt-5 pb-4 flex items-center justify-center relative", { "lg:px-2": C.value }]) }, [c("button", {
|
|
1590
1591
|
type: "button",
|
|
1591
|
-
onClick:
|
|
1592
|
+
onClick: D,
|
|
1592
1593
|
class: "cursor-pointer rounded focus:outline-none focus-visible:ring-2 focus-visible:ring-emerald-500",
|
|
1593
1594
|
"aria-label": "Go to home"
|
|
1594
|
-
}, [
|
|
1595
|
+
}, [A(n.$slots, "logo", { size: C.value ? 36 : 52 }, void 0, !0)]), c("button", {
|
|
1595
1596
|
ref_key: "closeMobileButton",
|
|
1596
|
-
ref:
|
|
1597
|
+
ref: w,
|
|
1597
1598
|
type: "button",
|
|
1598
|
-
onClick: r[2] ||= (...e) =>
|
|
1599
|
-
class:
|
|
1599
|
+
onClick: r[2] ||= (...e) => P(h) && P(h)(...e),
|
|
1600
|
+
class: v(["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", P(u) ? "text-gray-400 hover:bg-gray-800" : "text-gray-500 hover:bg-gray-100"]),
|
|
1600
1601
|
"aria-label": "Close navigation menu"
|
|
1601
|
-
}, [f(
|
|
1602
|
+
}, [f(P(B), {
|
|
1602
1603
|
class: "w-5 h-5",
|
|
1603
1604
|
"aria-hidden": "true"
|
|
1604
1605
|
})], 2)], 2),
|
|
1605
|
-
c("nav",
|
|
1606
|
+
c("nav", Hn, [(T(!0), s(e, null, k(t.sections, (t) => (T(), s("div", { key: t.title }, [c("p", { class: v(["px-2 mb-2 text-[10px] font-semibold uppercase tracking-wider text-gray-500", { "lg:hidden": C.value }]) }, N(t.title), 3), c("ul", Un, [(T(!0), s(e, null, k(t.items, (e) => (T(), s("li", { key: e.name }, [c("button", {
|
|
1606
1607
|
type: "button",
|
|
1607
|
-
"aria-current":
|
|
1608
|
-
title:
|
|
1609
|
-
onClick: (t) =>
|
|
1610
|
-
class:
|
|
1611
|
-
}, [(
|
|
1612
|
-
c("div", { class:
|
|
1613
|
-
t.showNotifications ? (
|
|
1608
|
+
"aria-current": j(e.name) ? "page" : void 0,
|
|
1609
|
+
title: C.value ? e.label : void 0,
|
|
1610
|
+
onClick: (t) => ee(e.name),
|
|
1611
|
+
class: v(["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", [j(e.name) ? P(u) ? "bg-emerald-500/15 text-emerald-300" : "bg-emerald-50 text-emerald-700" : P(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 }]])
|
|
1612
|
+
}, [(T(), a(M(e.icon), { class: "w-[18px] h-[18px] shrink-0" })), c("span", { class: v({ "lg:hidden": C.value }) }, N(e.label), 3)], 10, Wn)]))), 128))])]))), 128))]),
|
|
1613
|
+
c("div", { class: v(["px-4 py-4 border-t transition-colors space-y-3", P(u) ? "border-gray-800" : "border-gray-200"]) }, [
|
|
1614
|
+
t.showNotifications ? (T(), s("button", {
|
|
1614
1615
|
key: 0,
|
|
1615
1616
|
type: "button",
|
|
1616
|
-
onClick: r[3] ||= (...e) =>
|
|
1617
|
+
onClick: r[3] ||= (...e) => P(S) && P(S)(...e),
|
|
1617
1618
|
title: "Notifications",
|
|
1618
|
-
"aria-label":
|
|
1619
|
-
class:
|
|
1620
|
-
}, [c("span",
|
|
1619
|
+
"aria-label": P(x) > 0 ? `Notifications, ${P(x)} unread` : "Notifications",
|
|
1620
|
+
class: v(["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", [P(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 }]])
|
|
1621
|
+
}, [c("span", Kn, [f(P(le), {
|
|
1621
1622
|
class: "w-[18px] h-[18px]",
|
|
1622
1623
|
"aria-hidden": "true"
|
|
1623
|
-
}),
|
|
1624
|
-
t.showThemeToggle ? (
|
|
1624
|
+
}), P(x) > 0 ? (T(), s("span", qn, N(P(x) > 99 ? "99+" : P(x)), 1)) : o("", !0)]), c("span", { class: v({ "lg:hidden": C.value }) }, "Notifications", 2)], 10, Gn)) : o("", !0),
|
|
1625
|
+
t.showThemeToggle ? (T(), s("button", {
|
|
1625
1626
|
key: 1,
|
|
1626
1627
|
type: "button",
|
|
1627
|
-
onClick: r[4] ||= (...e) =>
|
|
1628
|
-
title:
|
|
1629
|
-
"aria-label":
|
|
1630
|
-
"aria-pressed":
|
|
1631
|
-
class:
|
|
1628
|
+
onClick: r[4] ||= (...e) => P(p) && P(p)(...e),
|
|
1629
|
+
title: P(u) ? "Switch to light mode" : "Switch to dark mode",
|
|
1630
|
+
"aria-label": P(u) ? "Switch to light mode" : "Switch to dark mode",
|
|
1631
|
+
"aria-pressed": P(u),
|
|
1632
|
+
class: v(["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", [P(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 }]])
|
|
1632
1633
|
}, [
|
|
1633
|
-
(
|
|
1634
|
-
class:
|
|
1634
|
+
(T(), a(M(P(u) ? P(Ee) : P(Te)), {
|
|
1635
|
+
class: v(["hidden w-[18px] h-[18px] shrink-0", { "lg:block": C.value }]),
|
|
1635
1636
|
"aria-hidden": "true"
|
|
1636
1637
|
}, null, 8, ["class"])),
|
|
1637
|
-
c("span", { class:
|
|
1638
|
-
c("span", { class:
|
|
1639
|
-
], 10,
|
|
1640
|
-
t.collapsible ? (
|
|
1638
|
+
c("span", { class: v({ "lg:hidden": C.value }) }, N(P(u) ? "Switch to light" : "Switch to dark"), 3),
|
|
1639
|
+
c("span", { class: v(["ml-auto relative w-9 h-5 rounded-full transition-colors", [P(u) ? "bg-emerald-600" : "bg-gray-300", { "lg:hidden": C.value }]]) }, [c("span", { class: v(["absolute top-0.5 left-0.5 w-4 h-4 rounded-full bg-white shadow-sm transition-transform duration-300", P(u) ? "translate-x-4" : "translate-x-0"]) }, null, 2)], 2)
|
|
1640
|
+
], 10, Jn)) : o("", !0),
|
|
1641
|
+
t.collapsible ? (T(), s("button", {
|
|
1641
1642
|
key: 2,
|
|
1642
1643
|
type: "button",
|
|
1643
|
-
onClick: r[5] ||= (...e) =>
|
|
1644
|
-
title:
|
|
1645
|
-
"aria-label":
|
|
1646
|
-
"aria-pressed":
|
|
1647
|
-
class:
|
|
1648
|
-
}, [(
|
|
1644
|
+
onClick: r[5] ||= (...e) => P(b) && P(b)(...e),
|
|
1645
|
+
title: P(y) ? "Expand sidebar" : "Collapse sidebar",
|
|
1646
|
+
"aria-label": P(y) ? "Expand sidebar" : "Collapse sidebar",
|
|
1647
|
+
"aria-pressed": P(y),
|
|
1648
|
+
class: v(["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", [P(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 }]])
|
|
1649
|
+
}, [(T(), a(M(P(y) ? P(pe) : P(fe)), {
|
|
1649
1650
|
class: "w-[18px] h-[18px] shrink-0",
|
|
1650
1651
|
"aria-hidden": "true"
|
|
1651
|
-
})), c("span", { class:
|
|
1652
|
-
c("div", { class:
|
|
1653
|
-
c("div", { class:
|
|
1652
|
+
})), c("span", { class: v({ "lg:hidden": C.value }) }, "Collapse", 2)], 10, Yn)) : o("", !0),
|
|
1653
|
+
c("div", { class: v({ "lg:hidden": C.value }) }, [A(n.$slots, "status", {}, void 0, !0)], 2),
|
|
1654
|
+
c("div", { class: v({ "lg:hidden": C.value }) }, [A(n.$slots, "footer", {}, () => [t.appName || t.version ? (T(), s("div", {
|
|
1654
1655
|
key: 0,
|
|
1655
|
-
class:
|
|
1656
|
+
class: v(["flex items-center justify-center gap-2 text-xs", (P(u), "text-gray-500")])
|
|
1656
1657
|
}, [c("span", null, [
|
|
1657
|
-
d(
|
|
1658
|
-
t.appName && t.version ? (
|
|
1659
|
-
t.version ? (
|
|
1658
|
+
d(N(t.appName), 1),
|
|
1659
|
+
t.appName && t.version ? (T(), s(e, { key: 0 }, [d(N(" "))], 64)) : o("", !0),
|
|
1660
|
+
t.version ? (T(), s(e, { key: 1 }, [d("v" + N(t.version), 1)], 64)) : o("", !0)
|
|
1660
1661
|
])], 2)) : o("", !0)], !0)], 2)
|
|
1661
1662
|
], 2)
|
|
1662
1663
|
])], 2)
|
|
1663
1664
|
]));
|
|
1664
1665
|
}
|
|
1665
|
-
}), [["__scopeId", "data-v-bfce9dd7"]]),
|
|
1666
|
+
}), [["__scopeId", "data-v-bfce9dd7"]]), Zn = {
|
|
1666
1667
|
key: 1,
|
|
1667
1668
|
class: "mt-4 flex justify-center py-6"
|
|
1668
|
-
},
|
|
1669
|
+
}, Qn = {
|
|
1669
1670
|
key: 2,
|
|
1670
1671
|
class: "mt-4 text-sm text-red-500",
|
|
1671
1672
|
role: "alert"
|
|
1672
|
-
},
|
|
1673
|
+
}, $n = {
|
|
1673
1674
|
key: 3,
|
|
1674
1675
|
class: "mt-4"
|
|
1675
|
-
},
|
|
1676
|
+
}, er = { class: "relative" }, tr = ["placeholder"], nr = {
|
|
1676
1677
|
key: 4,
|
|
1677
1678
|
class: "mt-3 max-h-64 overflow-y-auto"
|
|
1678
|
-
},
|
|
1679
|
+
}, rr = ["aria-pressed", "onClick"], ir = { class: "flex-1 min-w-0" }, ar = {
|
|
1679
1680
|
key: 0,
|
|
1680
1681
|
class: "text-center py-6"
|
|
1681
|
-
},
|
|
1682
|
+
}, or = {
|
|
1682
1683
|
key: 1,
|
|
1683
1684
|
class: "text-center py-6"
|
|
1684
|
-
},
|
|
1685
|
+
}, sr = ["disabled"], cr = ["disabled"], lr = /* @__PURE__ */ p({
|
|
1685
1686
|
__name: "BaseEntityPickerModal",
|
|
1686
1687
|
props: {
|
|
1687
1688
|
title: {},
|
|
@@ -1703,10 +1704,10 @@ var mn = ["aria-label", "aria-expanded"], hn = { class: "flex flex-col h-full" }
|
|
|
1703
1704
|
},
|
|
1704
1705
|
emits: ["confirm", "cancel"],
|
|
1705
1706
|
setup(t, { emit: n }) {
|
|
1706
|
-
let r = t, u = n, { isDark: d } =
|
|
1707
|
+
let r = t, u = n, { isDark: d } = W(), p = Z(), m = O([]), h = O(!1), g = O(""), y = O(null), b = O(""), x = O(null), C = i(() => {
|
|
1707
1708
|
let e = r.loader ? m.value : r.items;
|
|
1708
1709
|
return r.excludeId ? e.filter((e) => e.id !== r.excludeId) : e;
|
|
1709
|
-
}),
|
|
1710
|
+
}), w = i(() => C.value.filter((e) => e.label.toLowerCase().includes(b.value.toLowerCase()))), E = {
|
|
1710
1711
|
emerald: {
|
|
1711
1712
|
iconBg: "bg-emerald-50",
|
|
1712
1713
|
iconText: "text-emerald-600",
|
|
@@ -1752,7 +1753,7 @@ var mn = ["aria-label", "aria-expanded"], hn = { class: "flex flex-col h-full" }
|
|
|
1752
1753
|
confirmActive: "bg-amber-600 hover:bg-amber-700 cursor-pointer",
|
|
1753
1754
|
confirmDisabled: "bg-amber-400 cursor-not-allowed"
|
|
1754
1755
|
}
|
|
1755
|
-
},
|
|
1756
|
+
}, D = {
|
|
1756
1757
|
emerald: {
|
|
1757
1758
|
iconBg: "bg-emerald-900/30",
|
|
1758
1759
|
iconText: "text-emerald-400",
|
|
@@ -1798,74 +1799,74 @@ var mn = ["aria-label", "aria-expanded"], hn = { class: "flex flex-col h-full" }
|
|
|
1798
1799
|
confirmActive: "bg-amber-600 hover:bg-amber-700 cursor-pointer",
|
|
1799
1800
|
confirmDisabled: "bg-amber-400 cursor-not-allowed"
|
|
1800
1801
|
}
|
|
1801
|
-
},
|
|
1802
|
-
|
|
1802
|
+
}, j = i(() => (d.value ? D : E)[r.variant]);
|
|
1803
|
+
S(async () => {
|
|
1803
1804
|
if (r.loader) {
|
|
1804
|
-
|
|
1805
|
+
h.value = !0;
|
|
1805
1806
|
try {
|
|
1806
1807
|
m.value = await r.loader();
|
|
1807
1808
|
} catch {
|
|
1808
|
-
|
|
1809
|
+
g.value = "Failed to load items";
|
|
1809
1810
|
} finally {
|
|
1810
|
-
|
|
1811
|
+
h.value = !1;
|
|
1811
1812
|
}
|
|
1812
1813
|
}
|
|
1813
|
-
await
|
|
1814
|
+
await _(), x.value?.focus();
|
|
1814
1815
|
});
|
|
1815
|
-
function
|
|
1816
|
-
|
|
1816
|
+
function M() {
|
|
1817
|
+
y.value && !r.submitting && u("confirm", y.value);
|
|
1817
1818
|
}
|
|
1818
|
-
function
|
|
1819
|
+
function ee() {
|
|
1819
1820
|
r.submitting || u("cancel");
|
|
1820
1821
|
}
|
|
1821
|
-
return (n, r) => (
|
|
1822
|
+
return (n, r) => (T(), a(gn, {
|
|
1822
1823
|
title: t.title,
|
|
1823
|
-
icon:
|
|
1824
|
-
"icon-bg-class":
|
|
1825
|
-
"icon-class":
|
|
1824
|
+
icon: P(xe),
|
|
1825
|
+
"icon-bg-class": j.value.iconBg,
|
|
1826
|
+
"icon-class": j.value.iconText,
|
|
1826
1827
|
"manual-close": t.submitting,
|
|
1827
|
-
onCancel:
|
|
1828
|
+
onCancel: ee
|
|
1828
1829
|
}, l({
|
|
1829
|
-
footer:
|
|
1830
|
+
footer: L(() => [c("button", {
|
|
1830
1831
|
type: "button",
|
|
1831
1832
|
disabled: t.submitting,
|
|
1832
|
-
class:
|
|
1833
|
-
onClick:
|
|
1834
|
-
},
|
|
1833
|
+
class: v(["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", P(p).ghostButton]),
|
|
1834
|
+
onClick: ee
|
|
1835
|
+
}, N(t.cancelText), 11, sr), c("button", {
|
|
1835
1836
|
type: "button",
|
|
1836
|
-
disabled: !
|
|
1837
|
-
class:
|
|
1838
|
-
onClick:
|
|
1839
|
-
},
|
|
1840
|
-
default:
|
|
1841
|
-
t.message ? (
|
|
1837
|
+
disabled: !y.value || t.submitting,
|
|
1838
|
+
class: v(["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", !y.value || t.submitting ? j.value.confirmDisabled : j.value.confirmActive]),
|
|
1839
|
+
onClick: M
|
|
1840
|
+
}, N(t.submitting ? t.submittingText : t.confirmText), 11, cr)]),
|
|
1841
|
+
default: L(() => [
|
|
1842
|
+
t.message ? (T(), s("p", {
|
|
1842
1843
|
key: 0,
|
|
1843
|
-
class:
|
|
1844
|
-
},
|
|
1845
|
-
|
|
1846
|
-
!
|
|
1847
|
-
class:
|
|
1844
|
+
class: v(["text-sm", P(d) ? "text-gray-300" : "text-gray-600"])
|
|
1845
|
+
}, N(t.message), 3)) : o("", !0),
|
|
1846
|
+
h.value ? (T(), s("div", Zn, [f(It, { color: "emerald" })])) : g.value ? (T(), s("div", Qn, N(g.value), 1)) : o("", !0),
|
|
1847
|
+
!h.value && !g.value && C.value.length > 0 ? (T(), s("div", $n, [c("div", er, [f(P(Ce), {
|
|
1848
|
+
class: v(["absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4", P(p).dimText]),
|
|
1848
1849
|
"aria-hidden": "true"
|
|
1849
|
-
}, null, 8, ["class"]),
|
|
1850
|
+
}, null, 8, ["class"]), R(c("input", {
|
|
1850
1851
|
ref_key: "searchInputRef",
|
|
1851
|
-
ref:
|
|
1852
|
-
"onUpdate:modelValue": r[0] ||= (e) =>
|
|
1852
|
+
ref: x,
|
|
1853
|
+
"onUpdate:modelValue": r[0] ||= (e) => b.value = e,
|
|
1853
1854
|
type: "text",
|
|
1854
1855
|
placeholder: t.searchPlaceholder,
|
|
1855
|
-
class:
|
|
1856
|
-
}, null, 10,
|
|
1857
|
-
!
|
|
1856
|
+
class: v(["w-full pl-9 pr-3 py-2 text-sm rounded-md border outline-none transition-colors", [P(d) ? "bg-gray-800 border-gray-600 text-gray-200 placeholder-gray-500" : "bg-white border-gray-300 text-gray-700 placeholder-gray-400", j.value.inputFocus]])
|
|
1857
|
+
}, null, 10, tr), [[re, b.value]])])])) : o("", !0),
|
|
1858
|
+
!h.value && !g.value ? (T(), s("div", nr, [(T(!0), s(e, null, k(w.value, (e) => (T(), s("button", {
|
|
1858
1859
|
key: e.id,
|
|
1859
1860
|
type: "button",
|
|
1860
|
-
"aria-pressed":
|
|
1861
|
-
class:
|
|
1862
|
-
onClick: (t) =>
|
|
1861
|
+
"aria-pressed": y.value === e.id,
|
|
1862
|
+
class: v(["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", [y.value === e.id ? j.value.selectedRow : P(d) ? "hover:bg-gray-800 border border-transparent" : "hover:bg-gray-50 border border-transparent"]]),
|
|
1863
|
+
onClick: (t) => y.value = e.id
|
|
1863
1864
|
}, [
|
|
1864
|
-
f(
|
|
1865
|
-
c("div",
|
|
1866
|
-
|
|
1865
|
+
f(P(xe), { class: v(["w-5 h-5 flex-shrink-0", P(p).dimText]) }, null, 8, ["class"]),
|
|
1866
|
+
c("div", ir, [c("p", { class: v(["text-sm font-medium truncate", P(p).bodyText]) }, N(e.label), 3)]),
|
|
1867
|
+
y.value === e.id ? (T(), s("div", {
|
|
1867
1868
|
key: 0,
|
|
1868
|
-
class:
|
|
1869
|
+
class: v(["w-5 h-5 rounded-full flex items-center justify-center", j.value.checkBg])
|
|
1869
1870
|
}, [...r[1] ||= [c("svg", {
|
|
1870
1871
|
class: "w-3 h-3 text-white",
|
|
1871
1872
|
fill: "none",
|
|
@@ -1878,12 +1879,12 @@ var mn = ["aria-label", "aria-expanded"], hn = { class: "flex flex-col h-full" }
|
|
|
1878
1879
|
"stroke-linejoin": "round",
|
|
1879
1880
|
d: "M5 13l4 4L19 7"
|
|
1880
1881
|
})], -1)]], 2)) : o("", !0)
|
|
1881
|
-
], 10,
|
|
1882
|
+
], 10, rr))), 128)), C.value.length === 0 ? (T(), s("div", ar, [c("p", { class: v(["text-sm", P(p).dimText]) }, N(t.emptyMessage), 3)])) : w.value.length === 0 ? (T(), s("div", or, [c("p", { class: v(["text-sm", P(p).dimText]) }, N(t.noMatchMessage), 3)])) : o("", !0)])) : o("", !0)
|
|
1882
1883
|
]),
|
|
1883
1884
|
_: 2
|
|
1884
1885
|
}, [n.$slots.icon ? {
|
|
1885
1886
|
name: "icon",
|
|
1886
|
-
fn:
|
|
1887
|
+
fn: L(() => [A(n.$slots, "icon")]),
|
|
1887
1888
|
key: "0"
|
|
1888
1889
|
} : void 0]), 1032, [
|
|
1889
1890
|
"title",
|
|
@@ -1893,10 +1894,10 @@ var mn = ["aria-label", "aria-expanded"], hn = { class: "flex flex-col h-full" }
|
|
|
1893
1894
|
"manual-close"
|
|
1894
1895
|
]));
|
|
1895
1896
|
}
|
|
1896
|
-
}),
|
|
1897
|
+
}), ur = {
|
|
1897
1898
|
href: "#main-content",
|
|
1898
1899
|
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"
|
|
1899
|
-
},
|
|
1900
|
+
}, dr = ["inert"], fr = /* @__PURE__ */ p({
|
|
1900
1901
|
__name: "BaseAppLayout",
|
|
1901
1902
|
props: {
|
|
1902
1903
|
showSidebar: {
|
|
@@ -1906,19 +1907,19 @@ var mn = ["aria-label", "aria-expanded"], hn = { class: "flex flex-col h-full" }
|
|
|
1906
1907
|
skipLinkLabel: { default: "Skip to main content" }
|
|
1907
1908
|
},
|
|
1908
1909
|
setup(e) {
|
|
1909
|
-
let t = e, { isDark: n } =
|
|
1910
|
-
return (t, i) => (
|
|
1911
|
-
c("a",
|
|
1912
|
-
l.value ?
|
|
1910
|
+
let t = e, { isDark: n } = W(), { mobileOpen: r } = Mn(), { collapsed: a } = In(), l = i(() => t.showSidebar);
|
|
1911
|
+
return (t, i) => (T(), s("div", { class: v(["min-h-screen transition-colors duration-300", P(n) ? "bg-gray-950 text-gray-100" : "bg-gray-50 text-gray-800"]) }, [
|
|
1912
|
+
c("a", ur, N(e.skipLinkLabel), 1),
|
|
1913
|
+
l.value ? A(t.$slots, "sidebar", {}, void 0, void 0, 0) : o("", !0),
|
|
1913
1914
|
c("main", {
|
|
1914
1915
|
id: "main-content",
|
|
1915
1916
|
tabindex: "-1",
|
|
1916
|
-
inert: l.value &&
|
|
1917
|
-
class:
|
|
1918
|
-
}, [
|
|
1917
|
+
inert: l.value && P(r) ? !0 : void 0,
|
|
1918
|
+
class: v(["transition-all duration-300", l.value ? P(a) ? "pt-14 lg:pt-0 lg:ml-16" : "pt-14 lg:pt-0 lg:ml-60" : ""])
|
|
1919
|
+
}, [A(t.$slots, "default")], 10, dr)
|
|
1919
1920
|
], 2));
|
|
1920
1921
|
}
|
|
1921
|
-
}),
|
|
1922
|
+
}), pr = { class: "flex items-center gap-3 min-w-0" }, mr = { class: "flex items-center gap-2" }, hr = /* @__PURE__ */ p({
|
|
1922
1923
|
__name: "BasePageHeader",
|
|
1923
1924
|
props: {
|
|
1924
1925
|
title: {},
|
|
@@ -1929,7 +1930,7 @@ var mn = ["aria-label", "aria-expanded"], hn = { class: "flex flex-col h-full" }
|
|
|
1929
1930
|
marginClass: { default: "mb-8" }
|
|
1930
1931
|
},
|
|
1931
1932
|
setup(e) {
|
|
1932
|
-
let t = e, { isDark: n } =
|
|
1933
|
+
let t = e, { isDark: n } = W(), r = Z(), a = i(() => {
|
|
1933
1934
|
let e = {
|
|
1934
1935
|
emerald: {
|
|
1935
1936
|
dark: "bg-emerald-500/10",
|
|
@@ -1970,19 +1971,19 @@ var mn = ["aria-label", "aria-expanded"], hn = { class: "flex flex-col h-full" }
|
|
|
1970
1971
|
}[t.iconColor];
|
|
1971
1972
|
return n.value ? e.dark : e.light;
|
|
1972
1973
|
});
|
|
1973
|
-
return (t, n) => (
|
|
1974
|
+
return (t, n) => (T(), s("header", { class: v(e.maxWidthClass ? ["mx-auto px-4 sm:px-6", e.maxWidthClass] : void 0) }, [c("div", { class: v(["flex flex-wrap justify-between gap-3", [e.align === "end" ? "items-end" : "items-center", e.marginClass]]) }, [c("div", pr, [t.$slots.icon ? (T(), s("div", {
|
|
1974
1975
|
key: 0,
|
|
1975
|
-
class:
|
|
1976
|
-
}, [
|
|
1976
|
+
class: v(["w-10 h-10 rounded-lg flex items-center justify-center", a.value])
|
|
1977
|
+
}, [A(t.$slots, "icon", { iconClass: l.value })], 2)) : o("", !0), c("div", null, [c("h1", { class: v(["text-2xl font-bold", P(r).primaryTextSoft]) }, N(e.title), 3), e.subtitle || t.$slots.subtitle ? (T(), s("p", {
|
|
1977
1978
|
key: 0,
|
|
1978
|
-
class:
|
|
1979
|
-
}, [
|
|
1979
|
+
class: v(["text-sm", P(r).dimTextAlt])
|
|
1980
|
+
}, [A(t.$slots, "subtitle", {}, () => [d(N(e.subtitle), 1)])], 2)) : o("", !0)])]), c("div", mr, [A(t.$slots, "actions")])], 2)], 2));
|
|
1980
1981
|
}
|
|
1981
|
-
}),
|
|
1982
|
+
}), gr = [
|
|
1982
1983
|
"type",
|
|
1983
1984
|
"disabled",
|
|
1984
1985
|
"title"
|
|
1985
|
-
],
|
|
1986
|
+
], _r = { key: 0 }, vr = /* @__PURE__ */ p({
|
|
1986
1987
|
__name: "BaseToolbarButton",
|
|
1987
1988
|
props: {
|
|
1988
1989
|
label: { default: "" },
|
|
@@ -1996,7 +1997,7 @@ var mn = ["aria-label", "aria-expanded"], hn = { class: "flex flex-col h-full" }
|
|
|
1996
1997
|
},
|
|
1997
1998
|
emits: ["click"],
|
|
1998
1999
|
setup(e) {
|
|
1999
|
-
let t = e, { isDark: n } =
|
|
2000
|
+
let t = e, { isDark: n } = W(), r = {
|
|
2000
2001
|
neutral: "px-3 py-2 rounded-lg font-medium disabled:opacity-50",
|
|
2001
2002
|
danger: "px-3 py-2 rounded-lg font-medium disabled:opacity-50",
|
|
2002
2003
|
ghost: "h-9 px-4 rounded-md font-semibold disabled:opacity-40 disabled:hover:bg-slate-50 dark:disabled:hover:bg-slate-900"
|
|
@@ -2017,20 +2018,20 @@ var mn = ["aria-label", "aria-expanded"], hn = { class: "flex flex-col h-full" }
|
|
|
2017
2018
|
}[t.variant];
|
|
2018
2019
|
return [r[t.variant], n.value ? e.dark : e.light];
|
|
2019
2020
|
});
|
|
2020
|
-
return (t, n) => (
|
|
2021
|
+
return (t, n) => (T(), s("button", {
|
|
2021
2022
|
type: e.type,
|
|
2022
2023
|
disabled: e.disabled,
|
|
2023
2024
|
title: e.title,
|
|
2024
|
-
class:
|
|
2025
|
+
class: v(["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", a.value]),
|
|
2025
2026
|
onClick: n[0] ||= (e) => t.$emit("click", e)
|
|
2026
|
-
}, [
|
|
2027
|
+
}, [A(t.$slots, "icon", { iconClass: "w-4 h-4" }), e.label ? (T(), s("span", _r, N(e.label), 1)) : o("", !0)], 10, gr));
|
|
2027
2028
|
}
|
|
2028
|
-
}),
|
|
2029
|
+
}), yr = [
|
|
2029
2030
|
"type",
|
|
2030
2031
|
"disabled",
|
|
2031
2032
|
"title",
|
|
2032
2033
|
"aria-label"
|
|
2033
|
-
],
|
|
2034
|
+
], br = { key: 0 }, xr = /* @__PURE__ */ p({
|
|
2034
2035
|
__name: "BaseActionButton",
|
|
2035
2036
|
props: {
|
|
2036
2037
|
label: { default: "" },
|
|
@@ -2049,7 +2050,7 @@ var mn = ["aria-label", "aria-expanded"], hn = { class: "flex flex-col h-full" }
|
|
|
2049
2050
|
},
|
|
2050
2051
|
emits: ["click"],
|
|
2051
2052
|
setup(e) {
|
|
2052
|
-
let t = e, { isDark: n } =
|
|
2053
|
+
let t = e, { isDark: n } = W(), r = i(() => {
|
|
2053
2054
|
let e = {
|
|
2054
2055
|
emerald: {
|
|
2055
2056
|
dark: "text-emerald-400 hover:bg-emerald-500/10",
|
|
@@ -2122,16 +2123,16 @@ var mn = ["aria-label", "aria-expanded"], hn = { class: "flex flex-col h-full" }
|
|
|
2122
2123
|
}[t.color];
|
|
2123
2124
|
return n.value ? e.dark : e.light;
|
|
2124
2125
|
}), c = i(() => t.disabled ? `${a.value} opacity-50 cursor-not-allowed` : `${r.value} cursor-pointer`);
|
|
2125
|
-
return (t, n) => (
|
|
2126
|
+
return (t, n) => (T(), s("button", {
|
|
2126
2127
|
type: e.type,
|
|
2127
2128
|
disabled: e.disabled,
|
|
2128
2129
|
title: e.title,
|
|
2129
2130
|
"aria-label": e.ariaLabel,
|
|
2130
|
-
class:
|
|
2131
|
+
class: v(["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" : "", c.value]]),
|
|
2131
2132
|
onClick: n[0] ||= (e) => t.$emit("click", e)
|
|
2132
|
-
}, [
|
|
2133
|
+
}, [A(t.$slots, "icon", { iconClass: "w-4 h-4" }), e.label ? (T(), s("span", br, N(e.label), 1)) : o("", !0)], 10, yr));
|
|
2133
2134
|
}
|
|
2134
|
-
}),
|
|
2135
|
+
}), Sr = ["title", "aria-label"], Cr = /* @__PURE__ */ p({
|
|
2135
2136
|
__name: "BaseCopyButton",
|
|
2136
2137
|
props: {
|
|
2137
2138
|
text: {},
|
|
@@ -2142,7 +2143,7 @@ var mn = ["aria-label", "aria-expanded"], hn = { class: "flex flex-col h-full" }
|
|
|
2142
2143
|
},
|
|
2143
2144
|
emits: ["copied", "error"],
|
|
2144
2145
|
setup(e, { emit: t }) {
|
|
2145
|
-
let n = e, r = t, { isDark: o } =
|
|
2146
|
+
let n = e, r = t, { isDark: o } = W(), c = O(!1), l = null, u = i(() => c.value ? "Copied!" : n.label ? `Copy ${n.label}` : "Copy"), d = i(() => n.label ? `Copy ${n.label}` : "Copy"), f = i(() => 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 ${c.value ? o.value ? "border-emerald-500/40 bg-emerald-500/10 text-emerald-400" : "border-emerald-300 bg-emerald-50 text-emerald-600" : o.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 ${o.value ? "text-gray-400 hover:text-emerald-300 hover:bg-emerald-500/10" : "text-gray-500 hover:text-emerald-600 hover:bg-emerald-50"}`);
|
|
2146
2147
|
async function p(e) {
|
|
2147
2148
|
try {
|
|
2148
2149
|
if (navigator.clipboard?.writeText) {
|
|
@@ -2164,36 +2165,36 @@ var mn = ["aria-label", "aria-expanded"], hn = { class: "flex flex-col h-full" }
|
|
|
2164
2165
|
r("error", e);
|
|
2165
2166
|
}
|
|
2166
2167
|
}
|
|
2167
|
-
return
|
|
2168
|
+
return w(() => {
|
|
2168
2169
|
l && clearTimeout(l);
|
|
2169
|
-
}), (t, n) => (
|
|
2170
|
+
}), (t, n) => (T(), s("button", {
|
|
2170
2171
|
type: "button",
|
|
2171
2172
|
title: u.value,
|
|
2172
2173
|
"aria-label": d.value,
|
|
2173
|
-
class:
|
|
2174
|
+
class: v(f.value),
|
|
2174
2175
|
onClick: m
|
|
2175
|
-
}, [c.value ? (
|
|
2176
|
+
}, [c.value ? (T(), a(P(ge), {
|
|
2176
2177
|
key: 0,
|
|
2177
|
-
class:
|
|
2178
|
+
class: v(e.iconClass),
|
|
2178
2179
|
"aria-hidden": "true"
|
|
2179
|
-
}, null, 8, ["class"])) : (
|
|
2180
|
+
}, null, 8, ["class"])) : (T(), a(P(_e), {
|
|
2180
2181
|
key: 1,
|
|
2181
|
-
class:
|
|
2182
|
+
class: v(e.iconClass),
|
|
2182
2183
|
"aria-hidden": "true"
|
|
2183
|
-
}, null, 8, ["class"]))], 10,
|
|
2184
|
+
}, null, 8, ["class"]))], 10, Sr));
|
|
2184
2185
|
}
|
|
2185
|
-
}),
|
|
2186
|
+
}), wr = ["disabled", "aria-busy"], Tr = {
|
|
2186
2187
|
key: 0,
|
|
2187
2188
|
class: "w-5 h-5 animate-spin shrink-0",
|
|
2188
2189
|
viewBox: "0 0 24 24",
|
|
2189
2190
|
fill: "none",
|
|
2190
2191
|
"aria-hidden": "true"
|
|
2191
|
-
},
|
|
2192
|
+
}, Er = {
|
|
2192
2193
|
key: 1,
|
|
2193
2194
|
class: "w-5 h-5 shrink-0",
|
|
2194
2195
|
viewBox: "0 0 48 48",
|
|
2195
2196
|
"aria-hidden": "true"
|
|
2196
|
-
},
|
|
2197
|
+
}, Dr = /* @__PURE__ */ p({
|
|
2197
2198
|
__name: "BaseGoogleSignInButton",
|
|
2198
2199
|
props: {
|
|
2199
2200
|
label: { default: "Sign in with Google" },
|
|
@@ -2212,17 +2213,17 @@ var mn = ["aria-label", "aria-expanded"], hn = { class: "flex flex-col h-full" }
|
|
|
2212
2213
|
},
|
|
2213
2214
|
emits: ["click"],
|
|
2214
2215
|
setup(e, { emit: t }) {
|
|
2215
|
-
let n = e, r = t, { isDark: a } =
|
|
2216
|
+
let n = e, r = t, { isDark: a } = W(), o = i(() => n.disabled || n.loading);
|
|
2216
2217
|
function l() {
|
|
2217
2218
|
o.value || r("click");
|
|
2218
2219
|
}
|
|
2219
|
-
return (t, n) => (
|
|
2220
|
+
return (t, n) => (T(), s("button", {
|
|
2220
2221
|
type: "button",
|
|
2221
2222
|
disabled: o.value,
|
|
2222
2223
|
"aria-busy": e.loading,
|
|
2223
2224
|
onClick: l,
|
|
2224
|
-
class:
|
|
2225
|
-
}, [e.loading ? (
|
|
2225
|
+
class: v(["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" : "", P(a) ? "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"]])
|
|
2226
|
+
}, [e.loading ? (T(), s("svg", Tr, [...n[0] ||= [c("circle", {
|
|
2226
2227
|
class: "opacity-25",
|
|
2227
2228
|
cx: "12",
|
|
2228
2229
|
cy: "12",
|
|
@@ -2233,18 +2234,18 @@ var mn = ["aria-label", "aria-expanded"], hn = { class: "flex flex-col h-full" }
|
|
|
2233
2234
|
class: "opacity-75",
|
|
2234
2235
|
fill: "currentColor",
|
|
2235
2236
|
d: "M4 12a8 8 0 0 1 8-8V0C5.4 0 0 5.4 0 12h4z"
|
|
2236
|
-
}, null, -1)]])) : (
|
|
2237
|
+
}, null, -1)]])) : (T(), s("svg", Er, [...n[1] ||= [u("<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)]])), c("span", null, N(e.label), 1)], 10, wr));
|
|
2237
2238
|
}
|
|
2238
|
-
}),
|
|
2239
|
+
}), Or = {
|
|
2239
2240
|
key: 0,
|
|
2240
2241
|
class: "flex justify-center mb-6"
|
|
2241
|
-
},
|
|
2242
|
+
}, kr = { class: "mb-6 text-center" }, Ar = { class: "flex items-center gap-3 my-5" }, jr = ["disabled"], Mr = { class: "flex items-center justify-between mb-1.5" }, Nr = { class: "relative" }, Pr = ["type", "disabled"], Fr = ["aria-label", "aria-pressed"], Ir = ["disabled"], Lr = ["disabled", "aria-busy"], Rr = {
|
|
2242
2243
|
key: 0,
|
|
2243
2244
|
class: "w-4 h-4 animate-spin",
|
|
2244
2245
|
viewBox: "0 0 24 24",
|
|
2245
2246
|
fill: "none",
|
|
2246
2247
|
"aria-hidden": "true"
|
|
2247
|
-
},
|
|
2248
|
+
}, zr = /* @__PURE__ */ p({
|
|
2248
2249
|
__name: "BaseLoginForm",
|
|
2249
2250
|
props: {
|
|
2250
2251
|
title: { default: "Sign in" },
|
|
@@ -2270,87 +2271,87 @@ var mn = ["aria-label", "aria-expanded"], hn = { class: "flex flex-col h-full" }
|
|
|
2270
2271
|
},
|
|
2271
2272
|
emits: ["submit", "google-sign-in"],
|
|
2272
2273
|
setup(t, { emit: n }) {
|
|
2273
|
-
let r = t, a = n, { isDark: l } =
|
|
2274
|
+
let r = t, a = n, { isDark: l } = W(), u = Z(), p = O(""), m = O(""), h = O(!1), g = O(!1), _ = i(() => r.loading || r.googleLoading);
|
|
2274
2275
|
function y() {
|
|
2275
|
-
|
|
2276
|
+
_.value || a("submit", {
|
|
2276
2277
|
email: p.value,
|
|
2277
2278
|
password: m.value,
|
|
2278
2279
|
...r.showRemember ? { remember: h.value } : {}
|
|
2279
2280
|
});
|
|
2280
2281
|
}
|
|
2281
|
-
return (n, r) => (
|
|
2282
|
-
n.$slots.logo ? (
|
|
2283
|
-
c("div",
|
|
2282
|
+
return (n, r) => (T(), s("div", { class: v(["w-full max-w-sm mx-auto rounded-xl border shadow-sm p-6 sm:p-8", P(u).card]) }, [
|
|
2283
|
+
n.$slots.logo ? (T(), s("div", Or, [A(n.$slots, "logo")])) : o("", !0),
|
|
2284
|
+
c("div", kr, [c("h1", { class: v(["text-xl font-semibold", P(u).primaryText]) }, N(t.title), 3), t.subtitle ? (T(), s("p", {
|
|
2284
2285
|
key: 0,
|
|
2285
|
-
class:
|
|
2286
|
-
},
|
|
2287
|
-
t.error ? (
|
|
2286
|
+
class: v(["mt-1 text-sm", P(u).mutedText])
|
|
2287
|
+
}, N(t.subtitle), 3)) : o("", !0)]),
|
|
2288
|
+
t.error ? (T(), s("div", {
|
|
2288
2289
|
key: 1,
|
|
2289
2290
|
role: "alert",
|
|
2290
|
-
class:
|
|
2291
|
-
},
|
|
2292
|
-
t.showGoogle ? (
|
|
2291
|
+
class: v(["mb-4 rounded-lg border px-3 py-2 text-sm", P(l) ? "bg-red-500/10 border-red-500/30 text-red-300" : "bg-red-50 border-red-200 text-red-700"])
|
|
2292
|
+
}, N(t.error), 3)) : o("", !0),
|
|
2293
|
+
t.showGoogle ? (T(), s(e, { key: 2 }, [f(Dr, {
|
|
2293
2294
|
loading: t.googleLoading,
|
|
2294
2295
|
disabled: t.loading,
|
|
2295
2296
|
onClick: r[0] ||= (e) => a("google-sign-in")
|
|
2296
|
-
}, null, 8, ["loading", "disabled"]), c("div",
|
|
2297
|
-
c("span", { class:
|
|
2298
|
-
c("span", { class:
|
|
2299
|
-
c("span", { class:
|
|
2297
|
+
}, null, 8, ["loading", "disabled"]), c("div", Ar, [
|
|
2298
|
+
c("span", { class: v(["h-px flex-1", P(l) ? "bg-gray-700" : "bg-gray-200"]) }, null, 2),
|
|
2299
|
+
c("span", { class: v(["text-xs uppercase tracking-wider", P(u).dimTextAlt]) }, "or", 2),
|
|
2300
|
+
c("span", { class: v(["h-px flex-1", P(l) ? "bg-gray-700" : "bg-gray-200"]) }, null, 2)
|
|
2300
2301
|
])], 64)) : o("", !0),
|
|
2301
2302
|
c("form", {
|
|
2302
2303
|
class: "space-y-4",
|
|
2303
|
-
onSubmit:
|
|
2304
|
+
onSubmit: z(y, ["prevent"])
|
|
2304
2305
|
}, [
|
|
2305
2306
|
c("div", null, [c("label", {
|
|
2306
2307
|
for: "login-email",
|
|
2307
|
-
class:
|
|
2308
|
-
}, " Email ", 2),
|
|
2308
|
+
class: v(["block mb-1.5 text-sm font-medium", P(u).label])
|
|
2309
|
+
}, " Email ", 2), R(c("input", {
|
|
2309
2310
|
id: "login-email",
|
|
2310
2311
|
"onUpdate:modelValue": r[1] ||= (e) => p.value = e,
|
|
2311
2312
|
type: "email",
|
|
2312
2313
|
name: "email",
|
|
2313
2314
|
autocomplete: "email",
|
|
2314
2315
|
required: "",
|
|
2315
|
-
disabled:
|
|
2316
|
+
disabled: _.value,
|
|
2316
2317
|
placeholder: "you@example.com",
|
|
2317
|
-
class:
|
|
2318
|
-
}, null, 10,
|
|
2319
|
-
c("div", null, [c("div",
|
|
2318
|
+
class: v(["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", P(u).inputWithPlaceholder])
|
|
2319
|
+
}, null, 10, jr), [[re, p.value]])]),
|
|
2320
|
+
c("div", null, [c("div", Mr, [c("label", {
|
|
2320
2321
|
for: "login-password",
|
|
2321
|
-
class:
|
|
2322
|
-
}, " Password ", 2),
|
|
2322
|
+
class: v(["block text-sm font-medium", P(u).label])
|
|
2323
|
+
}, " Password ", 2), A(n.$slots, "forgot")]), c("div", Nr, [R(c("input", {
|
|
2323
2324
|
id: "login-password",
|
|
2324
2325
|
"onUpdate:modelValue": r[2] ||= (e) => m.value = e,
|
|
2325
|
-
type:
|
|
2326
|
+
type: g.value ? "text" : "password",
|
|
2326
2327
|
name: "password",
|
|
2327
2328
|
autocomplete: "current-password",
|
|
2328
2329
|
required: "",
|
|
2329
|
-
disabled:
|
|
2330
|
+
disabled: _.value,
|
|
2330
2331
|
placeholder: "••••••••",
|
|
2331
|
-
class:
|
|
2332
|
-
}, null, 10,
|
|
2332
|
+
class: v(["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", P(u).inputWithPlaceholder])
|
|
2333
|
+
}, null, 10, Pr), [[ne, m.value]]), c("button", {
|
|
2333
2334
|
type: "button",
|
|
2334
|
-
onClick: r[3] ||= (e) =>
|
|
2335
|
-
"aria-label":
|
|
2336
|
-
"aria-pressed":
|
|
2337
|
-
class:
|
|
2338
|
-
},
|
|
2339
|
-
t.showRemember ? (
|
|
2335
|
+
onClick: r[3] ||= (e) => g.value = !g.value,
|
|
2336
|
+
"aria-label": g.value ? "Hide password" : "Show password",
|
|
2337
|
+
"aria-pressed": g.value,
|
|
2338
|
+
class: v(["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", P(u).mutedText])
|
|
2339
|
+
}, N(g.value ? "Hide" : "Show"), 11, Fr)])]),
|
|
2340
|
+
t.showRemember ? (T(), s("label", {
|
|
2340
2341
|
key: 0,
|
|
2341
|
-
class:
|
|
2342
|
-
}, [
|
|
2342
|
+
class: v(["flex items-center gap-2 text-sm cursor-pointer select-none", P(u).bodyText])
|
|
2343
|
+
}, [R(c("input", {
|
|
2343
2344
|
"onUpdate:modelValue": r[4] ||= (e) => h.value = e,
|
|
2344
2345
|
type: "checkbox",
|
|
2345
|
-
disabled:
|
|
2346
|
+
disabled: _.value,
|
|
2346
2347
|
class: "w-4 h-4 rounded border-gray-300 text-emerald-600 focus:ring-emerald-500"
|
|
2347
|
-
}, null, 8,
|
|
2348
|
+
}, null, 8, Ir), [[te, h.value]]), r[5] ||= d(" Remember me ", -1)], 2)) : o("", !0),
|
|
2348
2349
|
c("button", {
|
|
2349
2350
|
type: "submit",
|
|
2350
|
-
disabled:
|
|
2351
|
+
disabled: _.value,
|
|
2351
2352
|
"aria-busy": t.loading,
|
|
2352
2353
|
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"
|
|
2353
|
-
}, [t.loading ? (
|
|
2354
|
+
}, [t.loading ? (T(), s("svg", Rr, [...r[6] ||= [c("circle", {
|
|
2354
2355
|
class: "opacity-25",
|
|
2355
2356
|
cx: "12",
|
|
2356
2357
|
cy: "12",
|
|
@@ -2361,18 +2362,18 @@ var mn = ["aria-label", "aria-expanded"], hn = { class: "flex flex-col h-full" }
|
|
|
2361
2362
|
class: "opacity-75",
|
|
2362
2363
|
fill: "currentColor",
|
|
2363
2364
|
d: "M4 12a8 8 0 0 1 8-8V0C5.4 0 0 5.4 0 12h4z"
|
|
2364
|
-
}, null, -1)]])) : o("", !0), d(" " +
|
|
2365
|
+
}, null, -1)]])) : o("", !0), d(" " + N(t.submitLabel), 1)], 8, Lr)
|
|
2365
2366
|
], 32),
|
|
2366
|
-
n.$slots.footer ? (
|
|
2367
|
+
n.$slots.footer ? (T(), s("div", {
|
|
2367
2368
|
key: 3,
|
|
2368
|
-
class:
|
|
2369
|
-
}, [
|
|
2369
|
+
class: v(["mt-6 text-center text-sm", P(u).mutedText])
|
|
2370
|
+
}, [A(n.$slots, "footer")], 2)) : o("", !0)
|
|
2370
2371
|
], 2));
|
|
2371
2372
|
}
|
|
2372
|
-
}),
|
|
2373
|
+
}), Br = ["aria-label"], Vr = { class: "flex-1 overflow-y-auto" }, Hr = {
|
|
2373
2374
|
key: 0,
|
|
2374
2375
|
class: "flex flex-col items-center justify-center text-center px-6 py-16 gap-3"
|
|
2375
|
-
},
|
|
2376
|
+
}, Ur = ["onClick"], Wr = { class: "min-w-0 flex-1" }, Gr = { class: "flex items-baseline justify-between gap-2" }, Kr = /* @__PURE__ */ p({
|
|
2376
2377
|
__name: "BaseNotificationPanel",
|
|
2377
2378
|
props: {
|
|
2378
2379
|
title: { default: "Notifications" },
|
|
@@ -2384,28 +2385,28 @@ var mn = ["aria-label", "aria-expanded"], hn = { class: "flex flex-col h-full" }
|
|
|
2384
2385
|
},
|
|
2385
2386
|
emits: ["select"],
|
|
2386
2387
|
setup(n, { emit: l }) {
|
|
2387
|
-
let u = l, { isDark: p } =
|
|
2388
|
+
let u = l, { isDark: p } = W(), m = Z(), { notifications: h, unreadCount: g, open: _, closePanel: y, markAllRead: b, markRead: x } = zn(), S = {
|
|
2388
2389
|
info: "bg-sky-500",
|
|
2389
2390
|
success: "bg-emerald-500",
|
|
2390
2391
|
warning: "bg-amber-500",
|
|
2391
2392
|
error: "bg-red-500"
|
|
2392
|
-
},
|
|
2393
|
-
function
|
|
2393
|
+
}, C = i(() => h.value.length);
|
|
2394
|
+
function w(e) {
|
|
2394
2395
|
x(e), u("select", e);
|
|
2395
2396
|
}
|
|
2396
|
-
return
|
|
2397
|
-
|
|
2398
|
-
}), (i, l) => (
|
|
2397
|
+
return sn(() => {
|
|
2398
|
+
_.value && y();
|
|
2399
|
+
}), (i, l) => (T(), a(t, { to: "body" }, [f(r, {
|
|
2399
2400
|
"enter-active-class": "transition-opacity duration-200",
|
|
2400
2401
|
"enter-from-class": "opacity-0",
|
|
2401
2402
|
"leave-active-class": "transition-opacity duration-200",
|
|
2402
2403
|
"leave-to-class": "opacity-0"
|
|
2403
2404
|
}, {
|
|
2404
|
-
default:
|
|
2405
|
+
default: L(() => [P(_) ? (T(), s("div", {
|
|
2405
2406
|
key: 0,
|
|
2406
2407
|
class: "fixed inset-0 z-[60] bg-black/50",
|
|
2407
2408
|
"aria-hidden": "true",
|
|
2408
|
-
onClick: l[0] ||= (...e) =>
|
|
2409
|
+
onClick: l[0] ||= (...e) => P(y) && P(y)(...e)
|
|
2409
2410
|
})) : o("", !0)]),
|
|
2410
2411
|
_: 1
|
|
2411
2412
|
}), f(r, {
|
|
@@ -2414,55 +2415,55 @@ var mn = ["aria-label", "aria-expanded"], hn = { class: "flex flex-col h-full" }
|
|
|
2414
2415
|
"leave-active-class": "transition-transform duration-300 ease-in",
|
|
2415
2416
|
"leave-to-class": "-translate-x-full"
|
|
2416
2417
|
}, {
|
|
2417
|
-
default:
|
|
2418
|
+
default: L(() => [P(_) ? (T(), s("aside", {
|
|
2418
2419
|
key: 0,
|
|
2419
2420
|
role: "dialog",
|
|
2420
2421
|
"aria-modal": "true",
|
|
2421
2422
|
"aria-label": n.title,
|
|
2422
|
-
class:
|
|
2423
|
+
class: v(["fixed top-0 left-0 z-[70] h-screen w-full max-w-sm flex flex-col border-r shadow-xl", P(p) ? "bg-gray-900 border-gray-800" : "bg-white border-gray-200"])
|
|
2423
2424
|
}, [
|
|
2424
|
-
c("div", { class:
|
|
2425
|
+
c("div", { class: v(["flex items-center justify-between gap-3 px-5 py-4 border-b shrink-0", P(m).border]) }, [c("h2", { class: v(["text-lg font-semibold flex items-center gap-2", P(m).primaryText]) }, [d(N(n.title) + " ", 1), c("span", { class: v(["text-sm font-normal", P(m).dimTextAlt]) }, "— " + N(C.value), 3)], 2), c("button", {
|
|
2425
2426
|
type: "button",
|
|
2426
|
-
onClick: l[1] ||= (...e) =>
|
|
2427
|
+
onClick: l[1] ||= (...e) => P(y) && P(y)(...e),
|
|
2427
2428
|
"aria-label": "Close notifications",
|
|
2428
|
-
class:
|
|
2429
|
-
}, [f(
|
|
2429
|
+
class: v(["p-1.5 rounded-lg cursor-pointer transition-colors focus:outline-none focus-visible:ring-2 focus-visible:ring-emerald-500", P(p) ? "text-gray-400 hover:bg-gray-800" : "text-gray-500 hover:bg-gray-100"])
|
|
2430
|
+
}, [f(P(B), {
|
|
2430
2431
|
class: "w-5 h-5",
|
|
2431
2432
|
"aria-hidden": "true"
|
|
2432
2433
|
})], 2)], 2),
|
|
2433
|
-
n.showMarkAllRead &&
|
|
2434
|
+
n.showMarkAllRead && P(g) > 0 ? (T(), s("div", {
|
|
2434
2435
|
key: 0,
|
|
2435
|
-
class:
|
|
2436
|
+
class: v(["px-5 py-2 border-b shrink-0 flex justify-end", P(m).border])
|
|
2436
2437
|
}, [c("button", {
|
|
2437
2438
|
type: "button",
|
|
2438
|
-
onClick: l[2] ||= (...e) =>
|
|
2439
|
-
class:
|
|
2439
|
+
onClick: l[2] ||= (...e) => P(b) && P(b)(...e),
|
|
2440
|
+
class: v(["text-xs font-medium cursor-pointer transition-colors focus:outline-none focus-visible:underline", P(m).emeraldText])
|
|
2440
2441
|
}, " Mark all as read ", 2)], 2)) : o("", !0),
|
|
2441
|
-
c("div",
|
|
2442
|
-
class:
|
|
2442
|
+
c("div", Vr, [C.value === 0 ? (T(), s("div", Hr, [f(P(le), {
|
|
2443
|
+
class: v(["w-10 h-10", P(m).illustration]),
|
|
2443
2444
|
"aria-hidden": "true"
|
|
2444
|
-
}, null, 8, ["class"]), c("p", { class:
|
|
2445
|
+
}, null, 8, ["class"]), c("p", { class: v(["text-sm", P(m).mutedText]) }, N(n.emptyText), 3)])) : (T(), s("ul", {
|
|
2445
2446
|
key: 1,
|
|
2446
|
-
class:
|
|
2447
|
-
}, [(
|
|
2447
|
+
class: v(["divide-y", P(p) ? "divide-gray-800" : "divide-gray-100"])
|
|
2448
|
+
}, [(T(!0), s(e, null, k(P(h), (e) => (T(), s("li", { key: e.id }, [c("button", {
|
|
2448
2449
|
type: "button",
|
|
2449
|
-
onClick: (t) =>
|
|
2450
|
-
class:
|
|
2450
|
+
onClick: (t) => w(e.id),
|
|
2451
|
+
class: v(["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 ? "" : P(p) ? "bg-emerald-500/5" : "bg-emerald-50/60", P(p) ? "hover:bg-gray-800" : "hover:bg-gray-50"]])
|
|
2451
2452
|
}, [c("span", {
|
|
2452
|
-
class:
|
|
2453
|
+
class: v(["mt-1.5 w-2 h-2 rounded-full shrink-0", e.read ? P(p) ? "bg-gray-700" : "bg-gray-300" : S[e.type ?? "info"]]),
|
|
2453
2454
|
"aria-hidden": "true"
|
|
2454
|
-
}, null, 2), c("span",
|
|
2455
|
+
}, null, 2), c("span", Wr, [c("span", Gr, [c("span", { class: v(["text-sm truncate", [e.read ? "font-medium" : "font-semibold", P(m).primaryTextSoft]]) }, N(e.title), 3), e.time ? (T(), s("span", {
|
|
2455
2456
|
key: 0,
|
|
2456
|
-
class:
|
|
2457
|
-
},
|
|
2457
|
+
class: v(["text-xs shrink-0", P(m).dimText])
|
|
2458
|
+
}, N(e.time), 3)) : o("", !0)]), e.message ? (T(), s("span", {
|
|
2458
2459
|
key: 0,
|
|
2459
|
-
class:
|
|
2460
|
-
},
|
|
2461
|
-
], 10,
|
|
2460
|
+
class: v(["mt-0.5 block text-sm", P(m).mutedText])
|
|
2461
|
+
}, N(e.message), 3)) : o("", !0)])], 10, Ur)]))), 128))], 2))])
|
|
2462
|
+
], 10, Br)) : o("", !0)]),
|
|
2462
2463
|
_: 1
|
|
2463
2464
|
})]));
|
|
2464
2465
|
}
|
|
2465
|
-
}),
|
|
2466
|
+
}), qr = ["disabled"], Jr = /* @__PURE__ */ p({
|
|
2466
2467
|
__name: "BaseChipButton",
|
|
2467
2468
|
props: {
|
|
2468
2469
|
size: { default: "sm" },
|
|
@@ -2473,37 +2474,37 @@ var mn = ["aria-label", "aria-expanded"], hn = { class: "flex flex-col h-full" }
|
|
|
2473
2474
|
},
|
|
2474
2475
|
emits: ["click"],
|
|
2475
2476
|
setup(e, { emit: t }) {
|
|
2476
|
-
let n = t, { isDark: r } =
|
|
2477
|
-
return (t, i) => (
|
|
2477
|
+
let n = t, { isDark: r } = W();
|
|
2478
|
+
return (t, i) => (T(), s("button", {
|
|
2478
2479
|
type: "button",
|
|
2479
2480
|
disabled: e.disabled,
|
|
2480
|
-
class:
|
|
2481
|
+
class: v(["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", P(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"]]),
|
|
2481
2482
|
onClick: i[0] ||= (e) => n("click")
|
|
2482
|
-
}, [
|
|
2483
|
+
}, [A(t.$slots, "default")], 10, qr));
|
|
2483
2484
|
}
|
|
2484
|
-
}),
|
|
2485
|
+
}), Yr = /* @__PURE__ */ p({
|
|
2485
2486
|
__name: "BaseRemoveButton",
|
|
2486
2487
|
emits: ["click"],
|
|
2487
2488
|
setup(e, { emit: t }) {
|
|
2488
2489
|
let n = t;
|
|
2489
|
-
return (e, t) => (
|
|
2490
|
+
return (e, t) => (T(), s("button", {
|
|
2490
2491
|
type: "button",
|
|
2491
2492
|
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",
|
|
2492
2493
|
onClick: t[0] ||= (e) => n("click")
|
|
2493
2494
|
}, " × "));
|
|
2494
2495
|
}
|
|
2495
|
-
}),
|
|
2496
|
+
}), Xr = { class: "relative flex h-2 w-2" }, Zr = {
|
|
2496
2497
|
key: 0,
|
|
2497
2498
|
class: "animate-ping absolute inline-flex h-full w-full rounded-full bg-emerald-400 opacity-75",
|
|
2498
2499
|
"aria-hidden": "true"
|
|
2499
|
-
},
|
|
2500
|
+
}, Qr = /* @__PURE__ */ p({
|
|
2500
2501
|
__name: "BaseStatusPill",
|
|
2501
2502
|
props: {
|
|
2502
2503
|
status: {},
|
|
2503
2504
|
label: {}
|
|
2504
2505
|
},
|
|
2505
2506
|
setup(e) {
|
|
2506
|
-
let t = e, { isDark: n } =
|
|
2507
|
+
let t = e, { isDark: n } = W(), r = i(() => {
|
|
2507
2508
|
switch (t.status) {
|
|
2508
2509
|
case "ok": return n.value ? "bg-emerald-500/10 text-emerald-400" : "bg-emerald-50 text-emerald-700";
|
|
2509
2510
|
case "error": return n.value ? "bg-red-500/10 text-red-400" : "bg-red-50 text-red-700";
|
|
@@ -2516,13 +2517,13 @@ var mn = ["aria-label", "aria-expanded"], hn = { class: "flex flex-col h-full" }
|
|
|
2516
2517
|
default: return "bg-gray-400";
|
|
2517
2518
|
}
|
|
2518
2519
|
});
|
|
2519
|
-
return (t, n) => (
|
|
2520
|
+
return (t, n) => (T(), s("div", { class: v(["flex items-center gap-2 px-3 py-1.5 rounded-lg text-xs", r.value]) }, [c("span", Xr, [e.status === "ok" ? (T(), s("span", Zr)) : o("", !0), c("span", { class: v(["relative inline-flex rounded-full h-2 w-2", a.value]) }, null, 2)]), d(" " + N(e.label), 1)], 2));
|
|
2520
2521
|
}
|
|
2521
|
-
}),
|
|
2522
|
+
}), $r = { class: "text-sm font-medium" }, ei = [
|
|
2522
2523
|
"accept",
|
|
2523
2524
|
"multiple",
|
|
2524
2525
|
"disabled"
|
|
2525
|
-
],
|
|
2526
|
+
], ti = /* @__PURE__ */ p({
|
|
2526
2527
|
__name: "BaseFileDropzone",
|
|
2527
2528
|
props: {
|
|
2528
2529
|
label: {},
|
|
@@ -2539,7 +2540,7 @@ var mn = ["aria-label", "aria-expanded"], hn = { class: "flex flex-col h-full" }
|
|
|
2539
2540
|
},
|
|
2540
2541
|
emits: ["files"],
|
|
2541
2542
|
setup(e, { emit: t }) {
|
|
2542
|
-
let n = e, r = t, { isDark: i } =
|
|
2543
|
+
let n = e, r = t, { isDark: i } = W(), a = O(!1);
|
|
2543
2544
|
function l(e) {
|
|
2544
2545
|
let t = e.target, n = Array.from(t.files ?? []);
|
|
2545
2546
|
t.value = "", n.length && r("files", n);
|
|
@@ -2552,13 +2553,13 @@ var mn = ["aria-label", "aria-expanded"], hn = { class: "flex flex-col h-full" }
|
|
|
2552
2553
|
let t = Array.from(e.dataTransfer?.files ?? []);
|
|
2553
2554
|
t.length && r("files", n.multiple ? t : t.slice(0, 1));
|
|
2554
2555
|
}
|
|
2555
|
-
return (t, n) => (
|
|
2556
|
-
class:
|
|
2557
|
-
onDragover:
|
|
2558
|
-
onDragleave: n[0] ||=
|
|
2559
|
-
onDrop:
|
|
2556
|
+
return (t, n) => (T(), s("label", {
|
|
2557
|
+
class: v(["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 ? P(i) ? "border-emerald-500 text-emerald-400" : "border-emerald-500 text-emerald-600" : P(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"]]),
|
|
2558
|
+
onDragover: z(u, ["prevent"]),
|
|
2559
|
+
onDragleave: n[0] ||= z((e) => a.value = !1, ["prevent"]),
|
|
2560
|
+
onDrop: z(d, ["prevent"])
|
|
2560
2561
|
}, [
|
|
2561
|
-
|
|
2562
|
+
A(t.$slots, "icon", {}, () => [n[1] ||= c("svg", {
|
|
2562
2563
|
class: "w-10 h-10",
|
|
2563
2564
|
fill: "none",
|
|
2564
2565
|
viewBox: "0 0 24 24",
|
|
@@ -2570,11 +2571,11 @@ var mn = ["aria-label", "aria-expanded"], hn = { class: "flex flex-col h-full" }
|
|
|
2570
2571
|
"stroke-linejoin": "round",
|
|
2571
2572
|
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"
|
|
2572
2573
|
})], -1)]),
|
|
2573
|
-
c("p",
|
|
2574
|
-
e.hint ? (
|
|
2574
|
+
c("p", $r, N(e.label), 1),
|
|
2575
|
+
e.hint ? (T(), s("p", {
|
|
2575
2576
|
key: 0,
|
|
2576
|
-
class:
|
|
2577
|
-
},
|
|
2577
|
+
class: v(["text-xs", P(i) ? "text-gray-500" : "text-gray-400"])
|
|
2578
|
+
}, N(e.hint), 3)) : o("", !0),
|
|
2578
2579
|
c("input", {
|
|
2579
2580
|
type: "file",
|
|
2580
2581
|
class: "hidden",
|
|
@@ -2582,10 +2583,10 @@ var mn = ["aria-label", "aria-expanded"], hn = { class: "flex flex-col h-full" }
|
|
|
2582
2583
|
multiple: e.multiple,
|
|
2583
2584
|
disabled: e.disabled,
|
|
2584
2585
|
onChange: l
|
|
2585
|
-
}, null, 40,
|
|
2586
|
+
}, null, 40, ei)
|
|
2586
2587
|
], 34));
|
|
2587
2588
|
}
|
|
2588
|
-
}),
|
|
2589
|
+
}), ni = /* @__PURE__ */ p({
|
|
2589
2590
|
__name: "BaseCodeBlock",
|
|
2590
2591
|
props: {
|
|
2591
2592
|
code: {},
|
|
@@ -2594,7 +2595,7 @@ var mn = ["aria-label", "aria-expanded"], hn = { class: "flex flex-col h-full" }
|
|
|
2594
2595
|
maxHeightClass: { default: "" }
|
|
2595
2596
|
},
|
|
2596
2597
|
setup(e) {
|
|
2597
|
-
let t = e, { isDark: n } =
|
|
2598
|
+
let t = e, { isDark: n } = W(), r = {
|
|
2598
2599
|
soft: {
|
|
2599
2600
|
dark: "bg-gray-800/70 text-gray-300",
|
|
2600
2601
|
light: "bg-gray-100 text-gray-700"
|
|
@@ -2610,13 +2611,13 @@ var mn = ["aria-label", "aria-expanded"], hn = { class: "flex flex-col h-full" }
|
|
|
2610
2611
|
let e = r[t.variant];
|
|
2611
2612
|
return n.value ? e.dark : e.light;
|
|
2612
2613
|
}), c = i(() => a[t.size]);
|
|
2613
|
-
return (t, n) => (
|
|
2614
|
+
return (t, n) => (T(), s("pre", { class: v(["font-mono overflow-auto", [
|
|
2614
2615
|
c.value,
|
|
2615
2616
|
o.value,
|
|
2616
2617
|
e.maxHeightClass
|
|
2617
|
-
]]) },
|
|
2618
|
+
]]) }, N(e.code), 3));
|
|
2618
2619
|
}
|
|
2619
|
-
}),
|
|
2620
|
+
}), ri = ["value", "type"], ii = /* @__PURE__ */ p({
|
|
2620
2621
|
__name: "BaseInput",
|
|
2621
2622
|
props: {
|
|
2622
2623
|
modelValue: { default: "" },
|
|
@@ -2633,14 +2634,15 @@ var mn = ["aria-label", "aria-expanded"], hn = { class: "flex flex-col h-full" }
|
|
|
2633
2634
|
function r(e) {
|
|
2634
2635
|
n("update:modelValue", e.target.value);
|
|
2635
2636
|
}
|
|
2636
|
-
return (t, n) => (
|
|
2637
|
+
return (t, n) => (T(), s("input", {
|
|
2637
2638
|
value: e.modelValue,
|
|
2638
2639
|
type: e.type,
|
|
2639
|
-
class:
|
|
2640
|
+
class: v(["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"]]),
|
|
2640
2641
|
onInput: r
|
|
2641
|
-
}, null, 42,
|
|
2642
|
+
}, null, 42, ri));
|
|
2642
2643
|
}
|
|
2643
|
-
}),
|
|
2644
|
+
}), ai = ["value"], oi = /* @__PURE__ */ p({
|
|
2645
|
+
inheritAttrs: !1,
|
|
2644
2646
|
__name: "BaseSelect",
|
|
2645
2647
|
props: {
|
|
2646
2648
|
modelValue: { default: void 0 },
|
|
@@ -2656,17 +2658,20 @@ var mn = ["aria-label", "aria-expanded"], hn = { class: "flex flex-col h-full" }
|
|
|
2656
2658
|
function r(e) {
|
|
2657
2659
|
n("update:modelValue", e.target.value);
|
|
2658
2660
|
}
|
|
2659
|
-
return (t, n) => (
|
|
2661
|
+
return (t, n) => (T(), s("div", { class: v(["relative", e.block ? "w-full" : "inline-block"]) }, [c("select", g(t.$attrs, {
|
|
2660
2662
|
value: e.modelValue,
|
|
2661
|
-
class:
|
|
2663
|
+
class: ["w-full appearance-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"],
|
|
2662
2664
|
onChange: r
|
|
2663
|
-
}, [
|
|
2665
|
+
}), [A(t.$slots, "default")], 16, ai), f(P(me), {
|
|
2666
|
+
class: v(["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"]),
|
|
2667
|
+
"aria-hidden": "true"
|
|
2668
|
+
}, null, 8, ["class"])], 2));
|
|
2664
2669
|
}
|
|
2665
|
-
}),
|
|
2670
|
+
}), si = [
|
|
2666
2671
|
"disabled",
|
|
2667
2672
|
"aria-label",
|
|
2668
2673
|
"aria-expanded"
|
|
2669
|
-
],
|
|
2674
|
+
], ci = ["aria-label"], li = ["aria-selected", "title"], ui = ["disabled", "onClick"], di = /* @__PURE__ */ p({
|
|
2670
2675
|
__name: "BaseDropdown",
|
|
2671
2676
|
props: {
|
|
2672
2677
|
options: {},
|
|
@@ -2687,7 +2692,7 @@ var mn = ["aria-label", "aria-expanded"], hn = { class: "flex flex-col h-full" }
|
|
|
2687
2692
|
},
|
|
2688
2693
|
emits: ["update:modelValue"],
|
|
2689
2694
|
setup(t, { emit: n }) {
|
|
2690
|
-
let r = t, a = n, l =
|
|
2695
|
+
let r = t, a = n, l = O(!1), u = O(null), d = i(() => r.options.find((e) => e.value === r.modelValue) ?? null), p = i(() => {
|
|
2691
2696
|
let e = "flex items-center justify-between gap-2 text-left transition-colors focus:outline-none focus-visible:ring-2 focus-visible:ring-emerald-500 cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed ";
|
|
2692
2697
|
if (r.triggerClass) return e + r.triggerClass;
|
|
2693
2698
|
let t = r.size === "sm" ? "px-3 py-2" : "px-4 py-2.5";
|
|
@@ -2699,36 +2704,36 @@ var mn = ["aria-label", "aria-expanded"], hn = { class: "flex flex-col h-full" }
|
|
|
2699
2704
|
function h() {
|
|
2700
2705
|
r.disabled || (l.value = !l.value);
|
|
2701
2706
|
}
|
|
2702
|
-
function
|
|
2707
|
+
function g(e) {
|
|
2703
2708
|
e.disabled || (a("update:modelValue", e.value), l.value = !1);
|
|
2704
2709
|
}
|
|
2705
|
-
|
|
2710
|
+
sn(() => {
|
|
2706
2711
|
l.value = !1;
|
|
2707
2712
|
});
|
|
2708
|
-
function
|
|
2713
|
+
function _(e) {
|
|
2709
2714
|
l.value && u.value && !u.value.contains(e.target) && (l.value = !1);
|
|
2710
2715
|
}
|
|
2711
|
-
return
|
|
2716
|
+
return S(() => document.addEventListener("click", _)), x(() => document.removeEventListener("click", _)), (n, r) => (T(), s("div", {
|
|
2712
2717
|
ref_key: "rootEl",
|
|
2713
2718
|
ref: u,
|
|
2714
|
-
class:
|
|
2719
|
+
class: v(t.block ? "relative w-full" : "relative inline-block")
|
|
2715
2720
|
}, [c("button", {
|
|
2716
2721
|
type: "button",
|
|
2717
|
-
class:
|
|
2722
|
+
class: v([p.value, t.block ? "w-full" : ""]),
|
|
2718
2723
|
disabled: t.disabled,
|
|
2719
2724
|
"aria-label": t.ariaLabel || void 0,
|
|
2720
2725
|
"aria-haspopup": "listbox",
|
|
2721
2726
|
"aria-expanded": l.value,
|
|
2722
2727
|
onClick: h
|
|
2723
|
-
}, [c("span", { class:
|
|
2724
|
-
class:
|
|
2728
|
+
}, [c("span", { class: v(["min-w-0 truncate", d.value ? "" : "text-slate-400 dark:text-slate-500"]) }, N(d.value ? d.value.label : t.placeholder), 3), f(P(me), {
|
|
2729
|
+
class: v(["shrink-0 transition-transform", [t.chevronClass, l.value ? "rotate-180" : ""]]),
|
|
2725
2730
|
"aria-hidden": "true"
|
|
2726
|
-
}, null, 8, ["class"])], 10,
|
|
2731
|
+
}, null, 8, ["class"])], 10, si), l.value ? (T(), s("ul", {
|
|
2727
2732
|
key: 0,
|
|
2728
2733
|
role: "listbox",
|
|
2729
2734
|
"aria-label": t.ariaLabel || t.placeholder,
|
|
2730
2735
|
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"
|
|
2731
|
-
}, [(
|
|
2736
|
+
}, [(T(!0), s(e, null, k(t.options, (e) => (T(), s("li", {
|
|
2732
2737
|
key: String(e.value),
|
|
2733
2738
|
role: "option",
|
|
2734
2739
|
"aria-selected": e.value === t.modelValue,
|
|
@@ -2736,15 +2741,15 @@ var mn = ["aria-label", "aria-expanded"], hn = { class: "flex flex-col h-full" }
|
|
|
2736
2741
|
}, [c("button", {
|
|
2737
2742
|
type: "button",
|
|
2738
2743
|
disabled: e.disabled,
|
|
2739
|
-
class:
|
|
2740
|
-
onClick: (t) =>
|
|
2741
|
-
},
|
|
2744
|
+
class: v(m(e)),
|
|
2745
|
+
onClick: (t) => g(e)
|
|
2746
|
+
}, N(e.label), 11, ui)], 8, li))), 128))], 8, ci)) : o("", !0)], 2));
|
|
2742
2747
|
}
|
|
2743
|
-
}),
|
|
2748
|
+
}), fi = ["role", "aria-label"], pi = [
|
|
2744
2749
|
"aria-pressed",
|
|
2745
2750
|
"title",
|
|
2746
2751
|
"onClick"
|
|
2747
|
-
],
|
|
2752
|
+
], mi = "bg-slate-50 dark:bg-slate-900 text-slate-600 dark:text-slate-300 hover:bg-slate-100 dark:hover:bg-slate-800", hi = /* @__PURE__ */ p({
|
|
2748
2753
|
__name: "BaseSegmentedControl",
|
|
2749
2754
|
props: {
|
|
2750
2755
|
options: {},
|
|
@@ -2761,22 +2766,22 @@ var mn = ["aria-label", "aria-expanded"], hn = { class: "flex flex-col h-full" }
|
|
|
2761
2766
|
let r = t, a = n, o = i(() => 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"), c = i(() => 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 = i(() => r.variant === "wide" ? "bg-emerald-600 text-white" : "bg-emerald-500 text-white");
|
|
2762
2767
|
function u(e) {
|
|
2763
2768
|
let t = e.value === r.modelValue;
|
|
2764
|
-
return r.optionClass ? r.optionClass(e, t) : t ? l.value :
|
|
2769
|
+
return r.optionClass ? r.optionClass(e, t) : t ? l.value : mi;
|
|
2765
2770
|
}
|
|
2766
|
-
return (n, r) => (
|
|
2771
|
+
return (n, r) => (T(), s("div", {
|
|
2767
2772
|
role: t.ariaLabel ? "group" : void 0,
|
|
2768
2773
|
"aria-label": t.ariaLabel || void 0,
|
|
2769
|
-
class:
|
|
2770
|
-
}, [(
|
|
2774
|
+
class: v(o.value)
|
|
2775
|
+
}, [(T(!0), s(e, null, k(t.options, (e) => (T(), s("button", {
|
|
2771
2776
|
key: String(e.value),
|
|
2772
2777
|
type: "button",
|
|
2773
|
-
class:
|
|
2778
|
+
class: v([c.value, u(e)]),
|
|
2774
2779
|
"aria-pressed": e.value === t.modelValue,
|
|
2775
2780
|
title: e.title,
|
|
2776
2781
|
onClick: (t) => a("update:modelValue", e.value)
|
|
2777
|
-
},
|
|
2782
|
+
}, N(e.label), 11, pi))), 128))], 10, fi));
|
|
2778
2783
|
}
|
|
2779
|
-
}),
|
|
2784
|
+
}), gi = { class: "w-full text-sm" }, _i = { class: "bg-slate-50 dark:bg-slate-800/60 text-slate-600 dark:text-slate-300" }, vi = { class: "text-left border-b border-slate-200 dark:border-slate-700" }, yi = { 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" }, bi = { key: 0 }, xi = ["colspan"], Si = "overflow-x-auto rounded-xl border border-slate-200 bg-white shadow-sm dark:border-slate-700 dark:bg-slate-900", Ci = /* @__PURE__ */ p({
|
|
2780
2785
|
__name: "BaseTable",
|
|
2781
2786
|
props: {
|
|
2782
2787
|
columns: {},
|
|
@@ -2784,27 +2789,31 @@ var mn = ["aria-label", "aria-expanded"], hn = { class: "flex flex-col h-full" }
|
|
|
2784
2789
|
type: Boolean,
|
|
2785
2790
|
default: !1
|
|
2786
2791
|
},
|
|
2787
|
-
emptyText: { default: "No rows." }
|
|
2792
|
+
emptyText: { default: "No rows." },
|
|
2793
|
+
card: {
|
|
2794
|
+
type: Boolean,
|
|
2795
|
+
default: !1
|
|
2796
|
+
}
|
|
2788
2797
|
},
|
|
2789
2798
|
setup(t) {
|
|
2790
|
-
return (n, r) => (
|
|
2799
|
+
return (n, r) => (T(), s("div", { class: v(t.card ? Si : void 0) }, [c("table", gi, [c("thead", _i, [c("tr", vi, [(T(!0), s(e, null, k(t.columns, (e, t) => (T(), s("th", {
|
|
2791
2800
|
key: t,
|
|
2792
|
-
class:
|
|
2793
|
-
},
|
|
2801
|
+
class: v(["px-4 py-3", e.align === "right" ? "text-right" : ""])
|
|
2802
|
+
}, N(e.label), 3))), 128))])]), c("tbody", yi, [t.empty ? (T(), s("tr", bi, [c("td", {
|
|
2794
2803
|
colspan: t.columns.length,
|
|
2795
2804
|
class: "px-4 py-12 text-center text-slate-500"
|
|
2796
|
-
}, [
|
|
2805
|
+
}, [A(n.$slots, "empty", {}, () => [d(N(t.emptyText), 1)])], 8, xi)])) : o("", !0), A(n.$slots, "default")])])], 2));
|
|
2797
2806
|
}
|
|
2798
|
-
}),
|
|
2807
|
+
}), wi = { class: "grid gap-3 md:grid-cols-2" }, Ti = {
|
|
2799
2808
|
key: 0,
|
|
2800
2809
|
class: "block text-[11px] uppercase tracking-wide text-slate-500 mb-1"
|
|
2801
|
-
},
|
|
2810
|
+
}, Ei = ["value"], Di = {
|
|
2802
2811
|
key: 2,
|
|
2803
2812
|
class: "flex items-center gap-2 mt-4"
|
|
2804
|
-
},
|
|
2813
|
+
}, Oi = ["checked", "onChange"], ki = { class: "text-sm text-slate-900 dark:text-slate-100" }, Ai = {
|
|
2805
2814
|
key: 4,
|
|
2806
2815
|
class: "text-[11px] text-slate-400 mt-1"
|
|
2807
|
-
},
|
|
2816
|
+
}, ji = /* @__PURE__ */ p({
|
|
2808
2817
|
__name: "BaseSpecFields",
|
|
2809
2818
|
props: {
|
|
2810
2819
|
specs: {},
|
|
@@ -2831,24 +2840,24 @@ var mn = ["aria-label", "aria-expanded"], hn = { class: "flex flex-col h-full" }
|
|
|
2831
2840
|
let t = e.clipboardData?.getData("text") ?? "";
|
|
2832
2841
|
/^-?\d*$/.test(t.trim()) || e.preventDefault();
|
|
2833
2842
|
}
|
|
2834
|
-
return (n, f) => (
|
|
2835
|
-
f.type === "boolean" ? o("", !0) : (
|
|
2836
|
-
f.type === "select" ? (
|
|
2843
|
+
return (n, f) => (T(), s("div", wi, [(T(!0), s(e, null, k(t.specs, (f) => (T(), s("div", { key: f.key }, [
|
|
2844
|
+
f.type === "boolean" ? o("", !0) : (T(), s("label", Ti, N(f.label), 1)),
|
|
2845
|
+
f.type === "select" ? (T(), a(oi, {
|
|
2837
2846
|
key: 1,
|
|
2838
2847
|
modelValue: String(t.params[f.key] ?? ""),
|
|
2839
2848
|
"onUpdate:modelValue": (e) => r("update", f.key, e)
|
|
2840
2849
|
}, {
|
|
2841
|
-
default:
|
|
2850
|
+
default: L(() => [(T(!0), s(e, null, k(f.options ?? [], (e) => (T(), s("option", {
|
|
2842
2851
|
key: e,
|
|
2843
2852
|
value: e
|
|
2844
|
-
},
|
|
2853
|
+
}, N(e), 9, Ei))), 128))]),
|
|
2845
2854
|
_: 2
|
|
2846
|
-
}, 1032, ["modelValue", "onUpdate:modelValue"])) : f.type === "boolean" ? (
|
|
2855
|
+
}, 1032, ["modelValue", "onUpdate:modelValue"])) : f.type === "boolean" ? (T(), s("label", Di, [c("input", {
|
|
2847
2856
|
checked: !!t.params[f.key],
|
|
2848
2857
|
type: "checkbox",
|
|
2849
2858
|
class: "h-4 w-4",
|
|
2850
2859
|
onChange: (e) => i(f.key, e)
|
|
2851
|
-
}, null, 40,
|
|
2860
|
+
}, null, 40, Oi), c("span", ki, N(f.label), 1)])) : (T(), a(ii, {
|
|
2852
2861
|
key: 3,
|
|
2853
2862
|
modelValue: t.params[f.key],
|
|
2854
2863
|
type: "number",
|
|
@@ -2867,11 +2876,11 @@ var mn = ["aria-label", "aria-expanded"], hn = { class: "flex flex-col h-full" }
|
|
|
2867
2876
|
"onPaste",
|
|
2868
2877
|
"onUpdate:modelValue"
|
|
2869
2878
|
])),
|
|
2870
|
-
f.help ? (
|
|
2871
|
-
|
|
2879
|
+
f.help ? (T(), s("p", Ai, N(f.help), 1)) : o("", !0),
|
|
2880
|
+
A(n.$slots, "after", { spec: f })
|
|
2872
2881
|
]))), 128))]));
|
|
2873
2882
|
}
|
|
2874
|
-
}),
|
|
2883
|
+
}), Mi = { class: "mt-1.5 space-y-0.5 px-1" }, Ni = { class: "text-slate-400 dark:text-slate-500" }, Pi = /* @__PURE__ */ p({
|
|
2875
2884
|
__name: "BaseStatBreakdown",
|
|
2876
2885
|
props: {
|
|
2877
2886
|
items: {},
|
|
@@ -2890,16 +2899,16 @@ var mn = ["aria-label", "aria-expanded"], hn = { class: "flex flex-col h-full" }
|
|
|
2890
2899
|
function i(e) {
|
|
2891
2900
|
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";
|
|
2892
2901
|
}
|
|
2893
|
-
return (n, a) => (
|
|
2902
|
+
return (n, a) => (T(), s("div", Mi, [(T(!0), s(e, null, k(t.items, (e) => (T(), s("div", {
|
|
2894
2903
|
key: e.label,
|
|
2895
2904
|
class: "flex items-center justify-between text-[11px]"
|
|
2896
|
-
}, [c("span",
|
|
2905
|
+
}, [c("span", Ni, N(e.label), 1), c("span", { class: v(["font-mono tabular-nums font-medium", i(e.value)]) }, N(r(e.value)), 3)]))), 128))]));
|
|
2897
2906
|
}
|
|
2898
|
-
}),
|
|
2907
|
+
}), Fi = [
|
|
2899
2908
|
"disabled",
|
|
2900
2909
|
"title",
|
|
2901
2910
|
"aria-pressed"
|
|
2902
|
-
],
|
|
2911
|
+
], Ii = /* @__PURE__ */ p({
|
|
2903
2912
|
__name: "BaseFilterChip",
|
|
2904
2913
|
props: {
|
|
2905
2914
|
label: { default: "" },
|
|
@@ -2928,21 +2937,21 @@ var mn = ["aria-label", "aria-expanded"], hn = { class: "flex flex-col h-full" }
|
|
|
2928
2937
|
red: "border-red-500 bg-red-500 text-white hover:bg-red-600 focus-visible:ring-red-500",
|
|
2929
2938
|
slate: "border-slate-600 bg-slate-600 text-white hover:bg-slate-700 focus-visible:ring-emerald-500"
|
|
2930
2939
|
};
|
|
2931
|
-
return (r, i) => (
|
|
2940
|
+
return (r, i) => (T(), s("button", {
|
|
2932
2941
|
type: "button",
|
|
2933
2942
|
disabled: e.disabled,
|
|
2934
2943
|
title: e.title,
|
|
2935
2944
|
"aria-pressed": e.active,
|
|
2936
|
-
class:
|
|
2937
|
-
}, [
|
|
2945
|
+
class: v(["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]])
|
|
2946
|
+
}, [A(r.$slots, "default", {}, () => [d(N(e.label), 1)])], 10, Fi));
|
|
2938
2947
|
}
|
|
2939
|
-
}),
|
|
2948
|
+
}), Li = { class: "flex items-center justify-between mb-4" }, Ri = { class: "text-lg font-semibold text-slate-900 dark:text-slate-100" }, zi = {
|
|
2940
2949
|
key: 0,
|
|
2941
2950
|
class: "text-xs text-slate-500 dark:text-slate-400"
|
|
2942
|
-
},
|
|
2951
|
+
}, Bi = {
|
|
2943
2952
|
key: 0,
|
|
2944
2953
|
class: "inline-flex items-center gap-2 text-xs text-slate-500"
|
|
2945
|
-
},
|
|
2954
|
+
}, Vi = { class: "grid gap-4 md:grid-cols-2" }, Hi = { class: "md:col-span-2" }, Ui = ["for"], Wi = { class: "md:col-span-2" }, Gi = ["for"], Ki = { class: "text-[11px] text-slate-500 mt-1" }, qi = { class: "md:col-span-2" }, Ji = ["for"], Yi = { class: "md:col-span-2" }, Xi = ["for"], Zi = { class: "md:col-span-2" }, Qi = "placeholder:text-slate-400 dark:placeholder:text-slate-500 font-mono", $i = /* @__PURE__ */ p({
|
|
2946
2955
|
__name: "BaseCredentialsForm",
|
|
2947
2956
|
props: {
|
|
2948
2957
|
title: {},
|
|
@@ -2968,7 +2977,7 @@ var mn = ["aria-label", "aria-expanded"], hn = { class: "flex flex-col h-full" }
|
|
|
2968
2977
|
"load-error"
|
|
2969
2978
|
],
|
|
2970
2979
|
setup(t, { expose: n, emit: r }) {
|
|
2971
|
-
let i = t, l = r, u =
|
|
2980
|
+
let i = t, l = r, u = O(!1), p = O(!1), m = E({
|
|
2972
2981
|
keyId: "",
|
|
2973
2982
|
secretKey: "",
|
|
2974
2983
|
baseUrl: i.defaults.baseUrl,
|
|
@@ -2982,20 +2991,20 @@ var mn = ["aria-label", "aria-expanded"], hn = { class: "flex flex-col h-full" }
|
|
|
2982
2991
|
l("load-error", e instanceof Error ? e.message : "");
|
|
2983
2992
|
}
|
|
2984
2993
|
}
|
|
2985
|
-
function
|
|
2994
|
+
function g(e) {
|
|
2986
2995
|
return !e || !e.trim();
|
|
2987
2996
|
}
|
|
2988
|
-
async function
|
|
2997
|
+
async function _() {
|
|
2989
2998
|
if (!u.value) {
|
|
2990
|
-
if (
|
|
2999
|
+
if (g(m.keyId)) {
|
|
2991
3000
|
l("error", i.requiredKeyMessage);
|
|
2992
3001
|
return;
|
|
2993
3002
|
}
|
|
2994
|
-
if (!p.value &&
|
|
3003
|
+
if (!p.value && g(m.secretKey)) {
|
|
2995
3004
|
l("error", i.requiredSecretMessage);
|
|
2996
3005
|
return;
|
|
2997
3006
|
}
|
|
2998
|
-
if (
|
|
3007
|
+
if (g(m.baseUrl) || g(m.dataUrl)) {
|
|
2999
3008
|
l("error", "Base URL and Data URL are required.");
|
|
3000
3009
|
return;
|
|
3001
3010
|
}
|
|
@@ -3003,7 +3012,7 @@ var mn = ["aria-label", "aria-expanded"], hn = { class: "flex flex-col h-full" }
|
|
|
3003
3012
|
try {
|
|
3004
3013
|
let e = await i.updateFn({
|
|
3005
3014
|
keyId: m.keyId.trim(),
|
|
3006
|
-
secretKey:
|
|
3015
|
+
secretKey: g(m.secretKey) ? void 0 : m.secretKey.trim(),
|
|
3007
3016
|
baseUrl: m.baseUrl.trim(),
|
|
3008
3017
|
dataUrl: m.dataUrl.trim()
|
|
3009
3018
|
});
|
|
@@ -3015,76 +3024,76 @@ var mn = ["aria-label", "aria-expanded"], hn = { class: "flex flex-col h-full" }
|
|
|
3015
3024
|
}
|
|
3016
3025
|
}
|
|
3017
3026
|
}
|
|
3018
|
-
return
|
|
3019
|
-
default:
|
|
3020
|
-
c("div",
|
|
3021
|
-
c("div",
|
|
3022
|
-
c("div",
|
|
3027
|
+
return S(h), n({ load: h }), (n, r) => (T(), a(Ft, { class: "!p-6" }, {
|
|
3028
|
+
default: L(() => [
|
|
3029
|
+
c("div", Li, [c("div", null, [c("h2", Ri, N(t.title), 1), t.subtitle ? (T(), s("p", zi, N(t.subtitle), 1)) : o("", !0)]), u.value ? (T(), s("span", Bi, [f(It, { class: "!h-4 !w-4" }), r[4] ||= d(" Saving… ", -1)])) : o("", !0)]),
|
|
3030
|
+
c("div", Vi, [
|
|
3031
|
+
c("div", Hi, [c("label", {
|
|
3023
3032
|
for: `${t.idPrefix}-key-id`,
|
|
3024
3033
|
class: "block text-xs uppercase tracking-wide text-slate-500 mb-1"
|
|
3025
|
-
},
|
|
3034
|
+
}, N(t.keyLabel), 9, Ui), f(ii, {
|
|
3026
3035
|
id: `${t.idPrefix}-key-id`,
|
|
3027
3036
|
modelValue: m.keyId,
|
|
3028
3037
|
"onUpdate:modelValue": r[0] ||= (e) => m.keyId = e,
|
|
3029
3038
|
type: "text",
|
|
3030
3039
|
autocomplete: "off",
|
|
3031
3040
|
placeholder: t.keyPlaceholder,
|
|
3032
|
-
class:
|
|
3041
|
+
class: v(Qi)
|
|
3033
3042
|
}, null, 8, [
|
|
3034
3043
|
"id",
|
|
3035
3044
|
"modelValue",
|
|
3036
3045
|
"placeholder"
|
|
3037
3046
|
])]),
|
|
3038
|
-
c("div",
|
|
3047
|
+
c("div", Wi, [
|
|
3039
3048
|
c("label", {
|
|
3040
3049
|
for: `${t.idPrefix}-secret`,
|
|
3041
3050
|
class: "block text-xs uppercase tracking-wide text-slate-500 mb-1"
|
|
3042
|
-
},
|
|
3043
|
-
f(
|
|
3051
|
+
}, N(t.secretLabel), 9, Gi),
|
|
3052
|
+
f(ii, {
|
|
3044
3053
|
id: `${t.idPrefix}-secret`,
|
|
3045
3054
|
modelValue: m.secretKey,
|
|
3046
3055
|
"onUpdate:modelValue": r[1] ||= (e) => m.secretKey = e,
|
|
3047
3056
|
type: "password",
|
|
3048
3057
|
autocomplete: "new-password",
|
|
3049
3058
|
placeholder: p.value ? "•••••••• (unchanged — type to replace)" : t.secretPlaceholder,
|
|
3050
|
-
class:
|
|
3059
|
+
class: v(Qi)
|
|
3051
3060
|
}, null, 8, [
|
|
3052
3061
|
"id",
|
|
3053
3062
|
"modelValue",
|
|
3054
3063
|
"placeholder"
|
|
3055
3064
|
]),
|
|
3056
|
-
c("p",
|
|
3065
|
+
c("p", Ki, [p.value ? (T(), s(e, { key: 0 }, [d(N(t.secretSetHint), 1)], 64)) : A(n.$slots, "no-secret-hint", {}, () => [d(N(t.permissionsHint), 1)], void 0, 1)])
|
|
3057
3066
|
]),
|
|
3058
|
-
c("div",
|
|
3067
|
+
c("div", qi, [
|
|
3059
3068
|
c("label", {
|
|
3060
3069
|
for: `${t.idPrefix}-base-url`,
|
|
3061
3070
|
class: "block text-xs uppercase tracking-wide text-slate-500 mb-1"
|
|
3062
|
-
}, "Base URL (trading)", 8,
|
|
3063
|
-
f(
|
|
3071
|
+
}, "Base URL (trading)", 8, Ji),
|
|
3072
|
+
f(ii, {
|
|
3064
3073
|
id: `${t.idPrefix}-base-url`,
|
|
3065
3074
|
modelValue: m.baseUrl,
|
|
3066
3075
|
"onUpdate:modelValue": r[2] ||= (e) => m.baseUrl = e,
|
|
3067
3076
|
type: "text",
|
|
3068
|
-
class:
|
|
3077
|
+
class: v(Qi)
|
|
3069
3078
|
}, null, 8, ["id", "modelValue"]),
|
|
3070
|
-
|
|
3079
|
+
A(n.$slots, "base-url-extra", { form: m })
|
|
3071
3080
|
]),
|
|
3072
|
-
c("div",
|
|
3081
|
+
c("div", Yi, [c("label", {
|
|
3073
3082
|
for: `${t.idPrefix}-data-url`,
|
|
3074
3083
|
class: "block text-xs uppercase tracking-wide text-slate-500 mb-1"
|
|
3075
|
-
}, "Data URL (market data)", 8,
|
|
3084
|
+
}, "Data URL (market data)", 8, Xi), f(ii, {
|
|
3076
3085
|
id: `${t.idPrefix}-data-url`,
|
|
3077
3086
|
modelValue: m.dataUrl,
|
|
3078
3087
|
"onUpdate:modelValue": r[3] ||= (e) => m.dataUrl = e,
|
|
3079
3088
|
type: "text",
|
|
3080
|
-
class:
|
|
3089
|
+
class: v(Qi)
|
|
3081
3090
|
}, null, 8, ["id", "modelValue"])]),
|
|
3082
|
-
c("div",
|
|
3083
|
-
color:
|
|
3091
|
+
c("div", Zi, [f(Qe, {
|
|
3092
|
+
color: P(K).GREEN,
|
|
3084
3093
|
description: t.saveLabel,
|
|
3085
3094
|
isDisable: u.value,
|
|
3086
3095
|
isLoading: u.value,
|
|
3087
|
-
onClick:
|
|
3096
|
+
onClick: _
|
|
3088
3097
|
}, null, 8, [
|
|
3089
3098
|
"color",
|
|
3090
3099
|
"description",
|
|
@@ -3092,21 +3101,21 @@ var mn = ["aria-label", "aria-expanded"], hn = { class: "flex flex-col h-full" }
|
|
|
3092
3101
|
"isLoading"
|
|
3093
3102
|
])])
|
|
3094
3103
|
]),
|
|
3095
|
-
|
|
3104
|
+
A(n.$slots, "footer")
|
|
3096
3105
|
]),
|
|
3097
3106
|
_: 3
|
|
3098
3107
|
}));
|
|
3099
3108
|
}
|
|
3100
|
-
}),
|
|
3109
|
+
}), ea = {
|
|
3101
3110
|
key: 0,
|
|
3102
3111
|
class: "text-sm text-slate-500 dark:text-slate-400"
|
|
3103
|
-
},
|
|
3112
|
+
}, ta = { class: "mb-3 flex flex-wrap items-center gap-2" }, na = { class: "relative min-w-[200px] flex-1" }, ra = ["placeholder"], ia = {
|
|
3104
3113
|
key: 0,
|
|
3105
3114
|
class: "text-sm text-slate-500 dark:text-slate-400"
|
|
3106
|
-
},
|
|
3115
|
+
}, aa = {
|
|
3107
3116
|
key: 1,
|
|
3108
3117
|
class: "flex flex-wrap gap-2"
|
|
3109
|
-
},
|
|
3118
|
+
}, oa = ["title", "onClick"], sa = "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", ca = "\0all", la = /* @__PURE__ */ p({
|
|
3110
3119
|
__name: "BasePillPickerModal",
|
|
3111
3120
|
props: {
|
|
3112
3121
|
title: {},
|
|
@@ -3128,11 +3137,11 @@ var mn = ["aria-label", "aria-expanded"], hn = { class: "flex flex-col h-full" }
|
|
|
3128
3137
|
},
|
|
3129
3138
|
emits: ["pick", "close"],
|
|
3130
3139
|
setup(t, { emit: n }) {
|
|
3131
|
-
let r = t, l = n, u = i(() => r.icon ??
|
|
3132
|
-
value:
|
|
3140
|
+
let r = t, l = n, u = i(() => r.icon ?? Ce), d = O(""), p = O(ca), m = i(() => r.groups && r.groups.length > 0 ? [{
|
|
3141
|
+
value: ca,
|
|
3133
3142
|
label: r.allLabel
|
|
3134
|
-
}, ...r.groups] : []), h = i(() => r.items.filter((e) => (p.value ===
|
|
3135
|
-
return (n, r) => (
|
|
3143
|
+
}, ...r.groups] : []), h = i(() => r.items.filter((e) => (p.value === ca || e.group === p.value) && e.label.toLowerCase().includes(d.value.trim().toLowerCase())));
|
|
3144
|
+
return (n, r) => (T(), a(gn, {
|
|
3136
3145
|
title: t.title,
|
|
3137
3146
|
icon: u.value,
|
|
3138
3147
|
subtitle: t.subtitle,
|
|
@@ -3140,32 +3149,32 @@ var mn = ["aria-label", "aria-expanded"], hn = { class: "flex flex-col h-full" }
|
|
|
3140
3149
|
"max-width-class": t.maxWidthClass,
|
|
3141
3150
|
onCancel: r[4] ||= (e) => l("close")
|
|
3142
3151
|
}, {
|
|
3143
|
-
footer:
|
|
3152
|
+
footer: L(() => [f(vr, {
|
|
3144
3153
|
variant: "ghost",
|
|
3145
3154
|
label: t.closeText,
|
|
3146
3155
|
onClick: r[3] ||= (e) => l("close")
|
|
3147
3156
|
}, null, 8, ["label"])]),
|
|
3148
|
-
default:
|
|
3149
|
-
f(
|
|
3150
|
-
|
|
3157
|
+
default: L(() => [t.items.length === 0 ? (T(), s("p", ea, N(t.emptyMessage), 1)) : (T(), s(e, { key: 1 }, [c("div", ta, [c("div", na, [
|
|
3158
|
+
f(P(Ce), { class: "pointer-events-none absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-slate-400" }),
|
|
3159
|
+
R(c("input", {
|
|
3151
3160
|
"onUpdate:modelValue": r[0] ||= (e) => d.value = e,
|
|
3152
3161
|
type: "text",
|
|
3153
3162
|
placeholder: t.searchPlaceholder,
|
|
3154
3163
|
autocomplete: "off",
|
|
3155
|
-
class:
|
|
3156
|
-
|
|
3164
|
+
class: v([
|
|
3165
|
+
sa,
|
|
3157
3166
|
"w-full pl-9 pr-8 placeholder:text-slate-400 dark:placeholder:text-slate-500",
|
|
3158
3167
|
t.mono ? "font-mono" : ""
|
|
3159
3168
|
])
|
|
3160
|
-
}, null, 10,
|
|
3161
|
-
d.value ? (
|
|
3169
|
+
}, null, 10, ra), [[re, d.value]]),
|
|
3170
|
+
d.value ? (T(), s("button", {
|
|
3162
3171
|
key: 0,
|
|
3163
3172
|
type: "button",
|
|
3164
3173
|
"aria-label": "Clear the filter",
|
|
3165
3174
|
class: "absolute right-2 top-1/2 -translate-y-1/2 text-slate-400 hover:text-slate-600 dark:hover:text-slate-200",
|
|
3166
3175
|
onClick: r[1] ||= (e) => d.value = ""
|
|
3167
3176
|
}, " ✕ ")) : o("", !0)
|
|
3168
|
-
]), m.value.length > 0 ? (
|
|
3177
|
+
]), m.value.length > 0 ? (T(), a(hi, {
|
|
3169
3178
|
key: 0,
|
|
3170
3179
|
modelValue: p.value,
|
|
3171
3180
|
"onUpdate:modelValue": r[2] ||= (e) => p.value = e,
|
|
@@ -3175,13 +3184,13 @@ var mn = ["aria-label", "aria-expanded"], hn = { class: "flex flex-col h-full" }
|
|
|
3175
3184
|
"modelValue",
|
|
3176
3185
|
"options",
|
|
3177
3186
|
"aria-label"
|
|
3178
|
-
])) : o("", !0)]), h.value.length === 0 ? (
|
|
3187
|
+
])) : o("", !0)]), h.value.length === 0 ? (T(), s("p", ia, N(t.noMatchMessage), 1)) : (T(), s("div", aa, [(T(!0), s(e, null, k(h.value, (e) => (T(), s("button", {
|
|
3179
3188
|
key: e.id,
|
|
3180
3189
|
type: "button",
|
|
3181
3190
|
title: e.title,
|
|
3182
|
-
class:
|
|
3191
|
+
class: v(["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" : ""]),
|
|
3183
3192
|
onClick: (t) => l("pick", e)
|
|
3184
|
-
},
|
|
3193
|
+
}, N(e.label), 11, oa))), 128))]))], 64))]),
|
|
3185
3194
|
_: 1
|
|
3186
3195
|
}, 8, [
|
|
3187
3196
|
"title",
|
|
@@ -3190,7 +3199,7 @@ var mn = ["aria-label", "aria-expanded"], hn = { class: "flex flex-col h-full" }
|
|
|
3190
3199
|
"max-width-class"
|
|
3191
3200
|
]));
|
|
3192
3201
|
}
|
|
3193
|
-
}),
|
|
3202
|
+
}), ua = ["aria-label"], da = ["title"], fa = { class: "text-[10px] tabular-nums text-slate-400 dark:text-slate-500" }, pa = ["title"], ma = /* @__PURE__ */ p({
|
|
3194
3203
|
__name: "BaseBarDistribution",
|
|
3195
3204
|
props: {
|
|
3196
3205
|
bars: {},
|
|
@@ -3202,52 +3211,440 @@ var mn = ["aria-label", "aria-expanded"], hn = { class: "flex flex-col h-full" }
|
|
|
3202
3211
|
},
|
|
3203
3212
|
setup(t) {
|
|
3204
3213
|
let n = t, r = i(() => Math.max(1, ...n.bars.map((e) => e.count))), a = (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"}`;
|
|
3205
|
-
return (n, r) => (
|
|
3214
|
+
return (n, r) => (T(), s("div", {
|
|
3206
3215
|
class: "flex items-end gap-1.5 overflow-x-auto pb-1",
|
|
3207
3216
|
role: "img",
|
|
3208
3217
|
"aria-label": t.ariaLabel
|
|
3209
|
-
}, [(
|
|
3218
|
+
}, [(T(!0), s(e, null, k(t.bars, (e) => (T(), s("div", {
|
|
3210
3219
|
key: e.label,
|
|
3211
3220
|
class: "flex min-w-7 flex-1 flex-col items-center gap-0.5",
|
|
3212
3221
|
title: o(e)
|
|
3213
3222
|
}, [
|
|
3214
|
-
c("span",
|
|
3223
|
+
c("span", fa, N(e.count), 1),
|
|
3215
3224
|
c("div", {
|
|
3216
|
-
class:
|
|
3217
|
-
style:
|
|
3225
|
+
class: v(["w-full max-w-8 rounded-t", t.barClass]),
|
|
3226
|
+
style: b({ height: `${a(e)}px` })
|
|
3218
3227
|
}, null, 6),
|
|
3219
3228
|
c("span", {
|
|
3220
3229
|
class: "max-w-full truncate font-mono text-[10px] text-slate-500 dark:text-slate-400",
|
|
3221
3230
|
title: e.label
|
|
3222
|
-
},
|
|
3223
|
-
], 8,
|
|
3231
|
+
}, N(e.label), 9, pa)
|
|
3232
|
+
], 8, da))), 128))], 8, ua));
|
|
3233
|
+
}
|
|
3234
|
+
}), ha = /* @__PURE__ */ p({
|
|
3235
|
+
__name: "BaseDateTimePicker",
|
|
3236
|
+
props: {
|
|
3237
|
+
modelValue: { default: null },
|
|
3238
|
+
mode: { default: "datetime" },
|
|
3239
|
+
format: { default: void 0 },
|
|
3240
|
+
is24: {
|
|
3241
|
+
type: Boolean,
|
|
3242
|
+
default: !0
|
|
3243
|
+
},
|
|
3244
|
+
autoApply: {
|
|
3245
|
+
type: Boolean,
|
|
3246
|
+
default: !1
|
|
3247
|
+
},
|
|
3248
|
+
teleport: {
|
|
3249
|
+
type: [Boolean, String],
|
|
3250
|
+
default: !0
|
|
3251
|
+
},
|
|
3252
|
+
timeConfig: { default: void 0 }
|
|
3253
|
+
},
|
|
3254
|
+
emits: ["update:modelValue"],
|
|
3255
|
+
setup(e, { emit: t }) {
|
|
3256
|
+
let n = e, r = t, { isDark: o } = W(), s = i(() => ({
|
|
3257
|
+
enableTimePicker: n.mode !== "date",
|
|
3258
|
+
is24: n.is24,
|
|
3259
|
+
...n.timeConfig
|
|
3260
|
+
})), c = i(() => {
|
|
3261
|
+
if (n.format) return { input: n.format };
|
|
3262
|
+
let e = n.is24 ? "HH:mm" : "hh:mm a";
|
|
3263
|
+
return n.mode === "date" ? { input: "dd/MM/yyyy" } : n.mode === "time" ? { input: e } : { input: `dd/MM/yyyy ${e}` };
|
|
3264
|
+
});
|
|
3265
|
+
return (t, n) => (T(), a(P(je), {
|
|
3266
|
+
"model-value": e.modelValue,
|
|
3267
|
+
dark: P(o),
|
|
3268
|
+
"time-picker": e.mode === "time",
|
|
3269
|
+
"time-config": s.value,
|
|
3270
|
+
formats: c.value,
|
|
3271
|
+
"auto-apply": e.autoApply,
|
|
3272
|
+
teleport: e.teleport,
|
|
3273
|
+
"onUpdate:modelValue": n[0] ||= (e) => r("update:modelValue", e)
|
|
3274
|
+
}, l({ _: 2 }, [k(t.$slots, (e, n) => ({
|
|
3275
|
+
name: n,
|
|
3276
|
+
fn: L((e) => [A(t.$slots, n, y(h(e ?? {})))])
|
|
3277
|
+
}))]), 1032, [
|
|
3278
|
+
"model-value",
|
|
3279
|
+
"dark",
|
|
3280
|
+
"time-picker",
|
|
3281
|
+
"time-config",
|
|
3282
|
+
"formats",
|
|
3283
|
+
"auto-apply",
|
|
3284
|
+
"teleport"
|
|
3285
|
+
]));
|
|
3286
|
+
}
|
|
3287
|
+
}), ga = { class: "flex min-w-0 flex-1 flex-wrap items-center gap-1" }, _a = { class: "truncate" }, va = [
|
|
3288
|
+
"aria-label",
|
|
3289
|
+
"disabled",
|
|
3290
|
+
"onClick"
|
|
3291
|
+
], ya = [
|
|
3292
|
+
"disabled",
|
|
3293
|
+
"readonly",
|
|
3294
|
+
"aria-label",
|
|
3295
|
+
"aria-expanded",
|
|
3296
|
+
"aria-activedescendant",
|
|
3297
|
+
"placeholder"
|
|
3298
|
+
], ba = ["aria-multiselectable"], xa = [
|
|
3299
|
+
"id",
|
|
3300
|
+
"aria-selected",
|
|
3301
|
+
"aria-disabled",
|
|
3302
|
+
"title",
|
|
3303
|
+
"onMouseenter",
|
|
3304
|
+
"onClick"
|
|
3305
|
+
], Sa = { class: "truncate" }, Ca = {
|
|
3306
|
+
key: 0,
|
|
3307
|
+
class: "px-3 py-2 text-sm text-slate-500 dark:text-slate-400"
|
|
3308
|
+
}, wa = /* @__PURE__ */ p({
|
|
3309
|
+
__name: "BaseSearchSelect",
|
|
3310
|
+
props: {
|
|
3311
|
+
options: {},
|
|
3312
|
+
modelValue: { default: null },
|
|
3313
|
+
multiple: {
|
|
3314
|
+
type: Boolean,
|
|
3315
|
+
default: !1
|
|
3316
|
+
},
|
|
3317
|
+
placeholder: { default: "Select" },
|
|
3318
|
+
searchable: {
|
|
3319
|
+
type: Boolean,
|
|
3320
|
+
default: !0
|
|
3321
|
+
},
|
|
3322
|
+
clearable: {
|
|
3323
|
+
type: Boolean,
|
|
3324
|
+
default: !0
|
|
3325
|
+
},
|
|
3326
|
+
block: {
|
|
3327
|
+
type: Boolean,
|
|
3328
|
+
default: !0
|
|
3329
|
+
},
|
|
3330
|
+
disabled: {
|
|
3331
|
+
type: Boolean,
|
|
3332
|
+
default: !1
|
|
3333
|
+
},
|
|
3334
|
+
ariaLabel: { default: "" },
|
|
3335
|
+
noResultsText: { default: "No matches." },
|
|
3336
|
+
emptyText: { default: "No options." }
|
|
3337
|
+
},
|
|
3338
|
+
emits: ["update:modelValue"],
|
|
3339
|
+
setup(t, { emit: n }) {
|
|
3340
|
+
let r = t, l = n, u = O(null), d = O(null), p = O(!1), m = O(""), h = O(-1), g = `search-select-${ee()}`, y = i(() => {
|
|
3341
|
+
let e = r.modelValue;
|
|
3342
|
+
return Array.isArray(e) ? [...e] : e == null || e === "" ? [] : [e];
|
|
3343
|
+
}), b = i(() => y.value.map((e) => r.options.find((t) => t.value === e)).filter((e) => !!e)), C = i(() => y.value.length > 0), w = i(() => !r.multiple && b.value.length > 0), E = i(() => w.value ? b.value[0].label : r.multiple && C.value ? "" : r.placeholder), D = i(() => {
|
|
3344
|
+
let e = m.value.trim().toLowerCase();
|
|
3345
|
+
return e ? r.options.filter((t) => t.label.toLowerCase().includes(e)) : [...r.options];
|
|
3346
|
+
});
|
|
3347
|
+
I(D, (e) => {
|
|
3348
|
+
h.value = e.findIndex((e) => !e.disabled);
|
|
3349
|
+
});
|
|
3350
|
+
function A(e) {
|
|
3351
|
+
return y.value.includes(e.value);
|
|
3352
|
+
}
|
|
3353
|
+
function j(e, t) {
|
|
3354
|
+
return e.disabled ? "cursor-not-allowed text-slate-400 dark:text-slate-600" : A(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";
|
|
3355
|
+
}
|
|
3356
|
+
function M() {
|
|
3357
|
+
r.disabled || p.value || (p.value = !0, h.value = D.value.findIndex((e) => !e.disabled));
|
|
3358
|
+
}
|
|
3359
|
+
function F() {
|
|
3360
|
+
p.value = !1, m.value = "";
|
|
3361
|
+
}
|
|
3362
|
+
function te(e) {
|
|
3363
|
+
r.disabled || (e.target !== d.value && e.preventDefault(), p.value && e.target !== d.value ? F() : (d.value?.focus(), M()));
|
|
3364
|
+
}
|
|
3365
|
+
function ne(e) {
|
|
3366
|
+
if (!e.disabled) {
|
|
3367
|
+
if (r.multiple) {
|
|
3368
|
+
let t = A(e) ? y.value.filter((t) => t !== e.value) : [...y.value, e.value];
|
|
3369
|
+
l("update:modelValue", t), m.value = "", _(() => d.value?.focus());
|
|
3370
|
+
} else l("update:modelValue", e.value), F(), d.value?.blur();
|
|
3371
|
+
}
|
|
3372
|
+
}
|
|
3373
|
+
function L(e) {
|
|
3374
|
+
l("update:modelValue", y.value.filter((t) => t !== e.value));
|
|
3375
|
+
}
|
|
3376
|
+
function ae() {
|
|
3377
|
+
l("update:modelValue", r.multiple ? [] : null), m.value = "";
|
|
3378
|
+
}
|
|
3379
|
+
function oe(e) {
|
|
3380
|
+
let t = D.value;
|
|
3381
|
+
if (t.length === 0) return;
|
|
3382
|
+
let n = h.value;
|
|
3383
|
+
for (let r = 0; r < t.length && (n = (n + e + t.length) % t.length, t[n].disabled); r++);
|
|
3384
|
+
h.value = n, _(() => document.getElementById(`${g}-${n}`)?.scrollIntoView?.({ block: "nearest" }));
|
|
3385
|
+
}
|
|
3386
|
+
function se(e) {
|
|
3387
|
+
switch (e.key) {
|
|
3388
|
+
case "ArrowDown":
|
|
3389
|
+
e.preventDefault(), p.value ? oe(1) : M();
|
|
3390
|
+
break;
|
|
3391
|
+
case "ArrowUp":
|
|
3392
|
+
e.preventDefault(), p.value ? oe(-1) : M();
|
|
3393
|
+
break;
|
|
3394
|
+
case "Enter":
|
|
3395
|
+
p.value && h.value >= 0 && (e.preventDefault(), ne(D.value[h.value]));
|
|
3396
|
+
break;
|
|
3397
|
+
case "Escape":
|
|
3398
|
+
p.value && (e.preventDefault(), F());
|
|
3399
|
+
break;
|
|
3400
|
+
case "Tab":
|
|
3401
|
+
F();
|
|
3402
|
+
break;
|
|
3403
|
+
case "Backspace": r.multiple && m.value === "" && b.value.length && L(b.value[b.value.length - 1]);
|
|
3404
|
+
}
|
|
3405
|
+
}
|
|
3406
|
+
function ce(e) {
|
|
3407
|
+
p.value && u.value && !u.value.contains(e.target) && F();
|
|
3408
|
+
}
|
|
3409
|
+
return S(() => document.addEventListener("mousedown", ce)), x(() => document.removeEventListener("mousedown", ce)), (n, r) => (T(), s("div", {
|
|
3410
|
+
ref_key: "rootEl",
|
|
3411
|
+
ref: u,
|
|
3412
|
+
class: v(t.block ? "relative w-full" : "relative inline-block min-w-48")
|
|
3413
|
+
}, [c("div", {
|
|
3414
|
+
class: v(["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", [p.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"]]),
|
|
3415
|
+
onMousedown: te
|
|
3416
|
+
}, [
|
|
3417
|
+
c("div", ga, [(T(!0), s(e, null, k(b.value, (e) => R((T(), s("span", {
|
|
3418
|
+
key: String(e.value),
|
|
3419
|
+
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"
|
|
3420
|
+
}, [c("span", _a, N(e.label), 1), c("button", {
|
|
3421
|
+
type: "button",
|
|
3422
|
+
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",
|
|
3423
|
+
"aria-label": `Remove ${e.label}`,
|
|
3424
|
+
disabled: t.disabled,
|
|
3425
|
+
onMousedown: r[0] ||= z(() => {}, ["stop", "prevent"]),
|
|
3426
|
+
onClick: z((t) => L(e), ["stop"])
|
|
3427
|
+
}, [f(P(B), {
|
|
3428
|
+
class: "h-3 w-3",
|
|
3429
|
+
"aria-hidden": "true"
|
|
3430
|
+
})], 40, va)])), [[ie, t.multiple]])), 128)), R(c("input", {
|
|
3431
|
+
ref_key: "inputEl",
|
|
3432
|
+
ref: d,
|
|
3433
|
+
"onUpdate:modelValue": r[1] ||= (e) => m.value = e,
|
|
3434
|
+
type: "text",
|
|
3435
|
+
role: "combobox",
|
|
3436
|
+
autocomplete: "off",
|
|
3437
|
+
disabled: t.disabled,
|
|
3438
|
+
readonly: !t.searchable,
|
|
3439
|
+
"aria-label": t.ariaLabel || t.placeholder,
|
|
3440
|
+
"aria-autocomplete": "list",
|
|
3441
|
+
"aria-expanded": p.value,
|
|
3442
|
+
"aria-controls": g,
|
|
3443
|
+
"aria-activedescendant": p.value && h.value >= 0 ? `${g}-${h.value}` : void 0,
|
|
3444
|
+
placeholder: E.value,
|
|
3445
|
+
class: v(["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", w.value ? "placeholder:text-slate-900 dark:placeholder:text-slate-100" : "placeholder:text-slate-400 dark:placeholder:text-slate-500"]),
|
|
3446
|
+
onFocus: M,
|
|
3447
|
+
onInput: M,
|
|
3448
|
+
onKeydown: se
|
|
3449
|
+
}, null, 42, ya), [[re, m.value]])]),
|
|
3450
|
+
t.clearable && C.value && !t.disabled ? (T(), s("button", {
|
|
3451
|
+
key: 0,
|
|
3452
|
+
type: "button",
|
|
3453
|
+
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",
|
|
3454
|
+
"aria-label": "Clear selection",
|
|
3455
|
+
onMousedown: r[2] ||= z(() => {}, ["stop", "prevent"]),
|
|
3456
|
+
onClick: z(ae, ["stop"])
|
|
3457
|
+
}, [f(P(B), {
|
|
3458
|
+
class: "h-4 w-4",
|
|
3459
|
+
"aria-hidden": "true"
|
|
3460
|
+
})], 32)) : o("", !0),
|
|
3461
|
+
f(P(me), {
|
|
3462
|
+
class: v(["h-4 w-4 shrink-0 text-slate-500 transition-transform dark:text-slate-400", p.value ? "rotate-180" : ""]),
|
|
3463
|
+
"aria-hidden": "true"
|
|
3464
|
+
}, null, 8, ["class"])
|
|
3465
|
+
], 34), p.value ? (T(), s("ul", {
|
|
3466
|
+
key: 0,
|
|
3467
|
+
id: g,
|
|
3468
|
+
role: "listbox",
|
|
3469
|
+
"aria-multiselectable": t.multiple || void 0,
|
|
3470
|
+
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"
|
|
3471
|
+
}, [(T(!0), s(e, null, k(D.value, (e, t) => (T(), s("li", {
|
|
3472
|
+
id: `${g}-${t}`,
|
|
3473
|
+
key: String(e.value),
|
|
3474
|
+
role: "option",
|
|
3475
|
+
"aria-selected": A(e),
|
|
3476
|
+
"aria-disabled": e.disabled || void 0,
|
|
3477
|
+
title: e.title,
|
|
3478
|
+
class: v(["flex cursor-pointer items-center justify-between gap-2 px-3 py-2 text-left text-sm", j(e, t)]),
|
|
3479
|
+
onMousedown: r[3] ||= z(() => {}, ["prevent"]),
|
|
3480
|
+
onMouseenter: (e) => h.value = t,
|
|
3481
|
+
onClick: (t) => ne(e)
|
|
3482
|
+
}, [c("span", Sa, N(e.label), 1), A(e) ? (T(), a(P(de), {
|
|
3483
|
+
key: 0,
|
|
3484
|
+
class: "h-4 w-4 shrink-0",
|
|
3485
|
+
"aria-hidden": "true"
|
|
3486
|
+
})) : o("", !0)], 42, xa))), 128)), D.value.length === 0 ? (T(), s("li", Ca, N(t.options.length === 0 ? t.emptyText : t.noResultsText), 1)) : o("", !0)], 8, ba)) : o("", !0)], 2));
|
|
3487
|
+
}
|
|
3488
|
+
}), Ta = { class: "rounded-xl border border-slate-200 bg-white text-left shadow-sm dark:border-slate-700 dark:bg-slate-900" }, Ea = {
|
|
3489
|
+
key: 0,
|
|
3490
|
+
class: "flex flex-wrap items-center justify-between gap-3 border-b border-slate-200 px-5 py-3 dark:border-slate-700"
|
|
3491
|
+
}, Da = { class: "min-w-0" }, Oa = {
|
|
3492
|
+
key: 0,
|
|
3493
|
+
class: "text-base font-semibold text-slate-900 dark:text-slate-100"
|
|
3494
|
+
}, ka = {
|
|
3495
|
+
key: 1,
|
|
3496
|
+
class: "text-sm text-slate-500 dark:text-slate-400"
|
|
3497
|
+
}, Aa = {
|
|
3498
|
+
key: 0,
|
|
3499
|
+
class: "flex items-center gap-2"
|
|
3500
|
+
}, ja = {
|
|
3501
|
+
key: 1,
|
|
3502
|
+
class: "flex flex-wrap items-center justify-end gap-2 border-t border-slate-200 px-5 py-3 dark:border-slate-700"
|
|
3503
|
+
}, Ma = /* @__PURE__ */ p({
|
|
3504
|
+
__name: "BaseCard",
|
|
3505
|
+
props: {
|
|
3506
|
+
title: { default: "" },
|
|
3507
|
+
subtitle: { default: "" },
|
|
3508
|
+
padding: { default: "md" }
|
|
3509
|
+
},
|
|
3510
|
+
setup(e) {
|
|
3511
|
+
return (t, n) => (T(), s("section", Ta, [
|
|
3512
|
+
e.title || e.subtitle || t.$slots.actions ? (T(), s("header", Ea, [c("div", Da, [e.title ? (T(), s("h2", Oa, N(e.title), 1)) : o("", !0), e.subtitle ? (T(), s("p", ka, N(e.subtitle), 1)) : o("", !0)]), t.$slots.actions ? (T(), s("div", Aa, [A(t.$slots, "actions")])) : o("", !0)])) : o("", !0),
|
|
3513
|
+
c("div", { class: v(e.padding === "sm" ? "p-4" : e.padding === "none" ? "" : "p-5") }, [A(t.$slots, "default")], 2),
|
|
3514
|
+
t.$slots.footer ? (T(), s("footer", ja, [A(t.$slots, "footer")])) : o("", !0)
|
|
3515
|
+
]));
|
|
3516
|
+
}
|
|
3517
|
+
}), Na = ["for"], Pa = {
|
|
3518
|
+
key: 0,
|
|
3519
|
+
class: "ml-0.5 text-red-500",
|
|
3520
|
+
"aria-hidden": "true"
|
|
3521
|
+
}, Fa = {
|
|
3522
|
+
key: 1,
|
|
3523
|
+
class: "mt-1 text-xs font-medium text-red-600 dark:text-red-400",
|
|
3524
|
+
role: "alert"
|
|
3525
|
+
}, Ia = {
|
|
3526
|
+
key: 2,
|
|
3527
|
+
class: "mt-1 text-xs text-slate-500 dark:text-slate-400"
|
|
3528
|
+
}, La = /* @__PURE__ */ p({
|
|
3529
|
+
__name: "BaseField",
|
|
3530
|
+
props: {
|
|
3531
|
+
label: { default: "" },
|
|
3532
|
+
labelFor: { default: "" },
|
|
3533
|
+
required: {
|
|
3534
|
+
type: Boolean,
|
|
3535
|
+
default: !1
|
|
3536
|
+
},
|
|
3537
|
+
error: { default: "" },
|
|
3538
|
+
hint: { default: "" },
|
|
3539
|
+
compact: {
|
|
3540
|
+
type: Boolean,
|
|
3541
|
+
default: !1
|
|
3542
|
+
},
|
|
3543
|
+
grow: {
|
|
3544
|
+
type: Boolean,
|
|
3545
|
+
default: !1
|
|
3546
|
+
}
|
|
3547
|
+
},
|
|
3548
|
+
setup(e) {
|
|
3549
|
+
return (t, n) => (T(), s("div", { class: v([e.grow ? "min-w-48 flex-1" : "", "text-left"]) }, [
|
|
3550
|
+
e.label ? (T(), s("label", {
|
|
3551
|
+
key: 0,
|
|
3552
|
+
for: e.labelFor || void 0,
|
|
3553
|
+
class: v(["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"])
|
|
3554
|
+
}, [d(N(e.label), 1), e.required ? (T(), s("span", Pa, "*")) : o("", !0)], 10, Na)) : o("", !0),
|
|
3555
|
+
A(t.$slots, "default"),
|
|
3556
|
+
e.error ? (T(), s("p", Fa, N(e.error), 1)) : e.hint ? (T(), s("p", Ia, N(e.hint), 1)) : o("", !0)
|
|
3557
|
+
], 2));
|
|
3558
|
+
}
|
|
3559
|
+
}), Ra = { class: "flex items-start justify-between gap-3" }, za = { class: "min-w-0 text-left" }, Ba = { class: "truncate text-sm font-bold tracking-wide text-gray-800 dark:text-slate-200" }, Va = /* @__PURE__ */ p({
|
|
3560
|
+
__name: "BaseStatCard",
|
|
3561
|
+
props: {
|
|
3562
|
+
title: {},
|
|
3563
|
+
value: { default: "" },
|
|
3564
|
+
subtitle: { default: "" },
|
|
3565
|
+
accent: { default: "emerald" },
|
|
3566
|
+
to: { default: void 0 }
|
|
3567
|
+
},
|
|
3568
|
+
setup(e) {
|
|
3569
|
+
let t = e, n = {
|
|
3570
|
+
emerald: {
|
|
3571
|
+
border: "border-emerald-300 dark:border-emerald-700",
|
|
3572
|
+
value: "text-emerald-500 dark:text-emerald-400",
|
|
3573
|
+
subtitle: "text-emerald-500 dark:text-emerald-400",
|
|
3574
|
+
iconBox: "bg-emerald-50 dark:bg-emerald-900/30",
|
|
3575
|
+
icon: "text-emerald-500"
|
|
3576
|
+
},
|
|
3577
|
+
sky: {
|
|
3578
|
+
border: "border-sky-300 dark:border-sky-700",
|
|
3579
|
+
value: "text-sky-500 dark:text-sky-400",
|
|
3580
|
+
subtitle: "text-sky-500 dark:text-sky-400",
|
|
3581
|
+
iconBox: "bg-sky-50 dark:bg-sky-900/30",
|
|
3582
|
+
icon: "text-sky-500"
|
|
3583
|
+
},
|
|
3584
|
+
amber: {
|
|
3585
|
+
border: "border-amber-300 dark:border-amber-700",
|
|
3586
|
+
value: "text-amber-500 dark:text-amber-400",
|
|
3587
|
+
subtitle: "text-amber-500 dark:text-amber-400",
|
|
3588
|
+
iconBox: "bg-amber-50 dark:bg-amber-900/30",
|
|
3589
|
+
icon: "text-amber-500"
|
|
3590
|
+
},
|
|
3591
|
+
red: {
|
|
3592
|
+
border: "border-red-300 dark:border-red-700",
|
|
3593
|
+
value: "text-red-500 dark:text-red-400",
|
|
3594
|
+
subtitle: "text-red-500 dark:text-red-400",
|
|
3595
|
+
iconBox: "bg-red-50 dark:bg-red-900/30",
|
|
3596
|
+
icon: "text-red-500"
|
|
3597
|
+
},
|
|
3598
|
+
slate: {
|
|
3599
|
+
border: "border-slate-300 dark:border-slate-600",
|
|
3600
|
+
value: "text-slate-700 dark:text-slate-200",
|
|
3601
|
+
subtitle: "text-slate-500 dark:text-slate-400",
|
|
3602
|
+
iconBox: "bg-slate-100 dark:bg-slate-700/50",
|
|
3603
|
+
icon: "text-slate-500 dark:text-slate-300"
|
|
3604
|
+
}
|
|
3605
|
+
}, r = i(() => n[t.accent]);
|
|
3606
|
+
return (t, n) => (T(), a(M(e.to ? P(Oe) : "div"), g(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" : ""]] }), {
|
|
3607
|
+
default: L(() => [c("div", Ra, [c("div", za, [
|
|
3608
|
+
c("p", Ba, N(e.title), 1),
|
|
3609
|
+
c("p", { class: v(["mt-1 truncate text-3xl font-bold", r.value.value]) }, N(e.value), 3),
|
|
3610
|
+
e.subtitle ? (T(), s("p", {
|
|
3611
|
+
key: 0,
|
|
3612
|
+
class: v(["mt-1 text-sm font-medium", r.value.subtitle])
|
|
3613
|
+
}, N(e.subtitle), 3)) : o("", !0),
|
|
3614
|
+
A(t.$slots, "default")
|
|
3615
|
+
]), t.$slots.icon ? (T(), s("div", {
|
|
3616
|
+
key: 0,
|
|
3617
|
+
class: v(["flex h-12 w-12 shrink-0 items-center justify-center rounded-xl", r.value.iconBox])
|
|
3618
|
+
}, [A(t.$slots, "icon", { iconClass: `h-6 w-6 ${r.value.icon}` })], 2)) : o("", !0)])]),
|
|
3619
|
+
_: 3
|
|
3620
|
+
}, 16, ["class"]));
|
|
3224
3621
|
}
|
|
3225
3622
|
});
|
|
3226
3623
|
//#endregion
|
|
3227
3624
|
//#region src/composables/useDebounce.ts
|
|
3228
|
-
function
|
|
3229
|
-
let n =
|
|
3230
|
-
return
|
|
3625
|
+
function Ha(e, t = 300) {
|
|
3626
|
+
let n = O(e.value), r = null;
|
|
3627
|
+
return I(e, (e) => {
|
|
3231
3628
|
r && clearTimeout(r), r = setTimeout(() => {
|
|
3232
3629
|
n.value = e, r = null;
|
|
3233
3630
|
}, t);
|
|
3234
|
-
}),
|
|
3631
|
+
}), C(() => {
|
|
3235
3632
|
r &&= (clearTimeout(r), null);
|
|
3236
3633
|
}), n;
|
|
3237
3634
|
}
|
|
3238
3635
|
//#endregion
|
|
3239
3636
|
//#region src/composables/useToast.ts
|
|
3240
|
-
function
|
|
3241
|
-
let t =
|
|
3637
|
+
function Ua(e = 3e3) {
|
|
3638
|
+
let t = O(!1), n = O(""), r = O(Y.SUCCESS), i = null;
|
|
3242
3639
|
function a() {
|
|
3243
3640
|
i &&= (clearTimeout(i), null);
|
|
3244
3641
|
}
|
|
3245
|
-
function o(o, s =
|
|
3642
|
+
function o(o, s = Y.SUCCESS, c = e) {
|
|
3246
3643
|
n.value = o, r.value = s, t.value = !0, a(), i = setTimeout(() => {
|
|
3247
3644
|
t.value = !1, i = null;
|
|
3248
3645
|
}, c);
|
|
3249
3646
|
}
|
|
3250
|
-
return
|
|
3647
|
+
return C(() => {
|
|
3251
3648
|
a();
|
|
3252
3649
|
}), {
|
|
3253
3650
|
showToast: t,
|
|
@@ -3258,8 +3655,8 @@ function Vi(e = 3e3) {
|
|
|
3258
3655
|
}
|
|
3259
3656
|
//#endregion
|
|
3260
3657
|
//#region src/composables/useQueryParamSync.ts
|
|
3261
|
-
function
|
|
3262
|
-
let e =
|
|
3658
|
+
function Wa() {
|
|
3659
|
+
let e = ke(), t = Ae();
|
|
3263
3660
|
function n(t) {
|
|
3264
3661
|
let n = e.query[t];
|
|
3265
3662
|
return typeof n == "string" ? n : "";
|
|
@@ -3280,8 +3677,8 @@ function Hi() {
|
|
|
3280
3677
|
}
|
|
3281
3678
|
//#endregion
|
|
3282
3679
|
//#region src/composables/useFieldClasses.ts
|
|
3283
|
-
function
|
|
3284
|
-
let { isDark: e } =
|
|
3680
|
+
function Ga() {
|
|
3681
|
+
let { isDark: e } = W(), t = i(() => e.value ? "text-gray-300" : "text-gray-600"), n = i(() => 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");
|
|
3285
3682
|
function r(t) {
|
|
3286
3683
|
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;
|
|
3287
3684
|
}
|
|
@@ -3293,8 +3690,8 @@ function Ui() {
|
|
|
3293
3690
|
}
|
|
3294
3691
|
//#endregion
|
|
3295
3692
|
//#region src/composables/usePolling.ts
|
|
3296
|
-
function
|
|
3297
|
-
let { immediate: r = !0, pauseWhenHidden: i = !0 } = n, a = null, o =
|
|
3693
|
+
function Ka(e, t, n = {}) {
|
|
3694
|
+
let { immediate: r = !0, pauseWhenHidden: i = !0 } = n, a = null, o = O(!1), s = !1;
|
|
3298
3695
|
function c() {
|
|
3299
3696
|
a === null && t !== null && (a = setInterval(() => void e(), t));
|
|
3300
3697
|
}
|
|
@@ -3316,74 +3713,74 @@ function Wi(e, t, n = {}) {
|
|
|
3316
3713
|
o.value = !1, l(), s = !0;
|
|
3317
3714
|
}
|
|
3318
3715
|
}
|
|
3319
|
-
return
|
|
3716
|
+
return S(() => {
|
|
3320
3717
|
u(), i && document.addEventListener("visibilitychange", f);
|
|
3321
|
-
}),
|
|
3718
|
+
}), w(() => {
|
|
3322
3719
|
d(), i && document.removeEventListener("visibilitychange", f);
|
|
3323
3720
|
}), {
|
|
3324
3721
|
start: u,
|
|
3325
3722
|
stop: d,
|
|
3326
|
-
active:
|
|
3723
|
+
active: D(o)
|
|
3327
3724
|
};
|
|
3328
3725
|
}
|
|
3329
3726
|
//#endregion
|
|
3330
3727
|
//#region src/enums/BaseBadgeEnum.ts
|
|
3331
|
-
var
|
|
3728
|
+
var qa = /* @__PURE__ */ function(e) {
|
|
3332
3729
|
return e.WIN = "WIN", e.LOSE = "LOSE", e;
|
|
3333
3730
|
}({});
|
|
3334
3731
|
//#endregion
|
|
3335
3732
|
//#region src/utils/util.ts
|
|
3336
|
-
function
|
|
3733
|
+
function Ja(e) {
|
|
3337
3734
|
let t = "red";
|
|
3338
3735
|
switch (e) {
|
|
3339
|
-
case
|
|
3736
|
+
case V.ERROR:
|
|
3340
3737
|
t = "red";
|
|
3341
3738
|
break;
|
|
3342
|
-
case
|
|
3739
|
+
case V.SUCCESS:
|
|
3343
3740
|
t = "green";
|
|
3344
3741
|
break;
|
|
3345
|
-
case
|
|
3742
|
+
case V.INFO:
|
|
3346
3743
|
t = "gray";
|
|
3347
3744
|
break;
|
|
3348
|
-
case
|
|
3745
|
+
case V.WARNING: t = "yellow";
|
|
3349
3746
|
}
|
|
3350
3747
|
return t;
|
|
3351
3748
|
}
|
|
3352
|
-
function
|
|
3749
|
+
function Ya(e) {
|
|
3353
3750
|
let t = "red";
|
|
3354
3751
|
switch (e) {
|
|
3355
|
-
case
|
|
3752
|
+
case G.GREEN:
|
|
3356
3753
|
t = "green";
|
|
3357
3754
|
break;
|
|
3358
|
-
case
|
|
3755
|
+
case G.RED:
|
|
3359
3756
|
t = "red";
|
|
3360
3757
|
break;
|
|
3361
|
-
case
|
|
3758
|
+
case G.BLUE:
|
|
3362
3759
|
t = "blue";
|
|
3363
3760
|
break;
|
|
3364
|
-
case
|
|
3761
|
+
case G.YELLOW:
|
|
3365
3762
|
t = "yellow";
|
|
3366
3763
|
break;
|
|
3367
|
-
case
|
|
3764
|
+
case G.BLACK:
|
|
3368
3765
|
t = "black";
|
|
3369
3766
|
break;
|
|
3370
|
-
case
|
|
3767
|
+
case G.GRAY:
|
|
3371
3768
|
t = "gray";
|
|
3372
3769
|
break;
|
|
3373
|
-
case
|
|
3770
|
+
case G.NONE: t = "";
|
|
3374
3771
|
}
|
|
3375
3772
|
return t;
|
|
3376
3773
|
}
|
|
3377
3774
|
//#endregion
|
|
3378
3775
|
//#region src/utils/httpColors.ts
|
|
3379
|
-
var
|
|
3776
|
+
var Xa = {
|
|
3380
3777
|
GET: "bg-blue-600",
|
|
3381
3778
|
POST: "bg-emerald-600",
|
|
3382
3779
|
PUT: "bg-amber-600",
|
|
3383
3780
|
DELETE: "bg-red-600",
|
|
3384
3781
|
PATCH: "bg-purple-600",
|
|
3385
3782
|
HEAD: "bg-gray-600"
|
|
3386
|
-
},
|
|
3783
|
+
}, Za = {
|
|
3387
3784
|
GET: "bg-blue-500",
|
|
3388
3785
|
POST: "bg-green-500",
|
|
3389
3786
|
PUT: "bg-yellow-500",
|
|
@@ -3391,39 +3788,39 @@ var Ji = {
|
|
|
3391
3788
|
PATCH: "bg-purple-500",
|
|
3392
3789
|
HEAD: "bg-gray-500"
|
|
3393
3790
|
};
|
|
3394
|
-
function
|
|
3395
|
-
return e ?
|
|
3791
|
+
function Qa(e) {
|
|
3792
|
+
return e ? Xa[e.toUpperCase()] ?? "bg-gray-600" : "bg-gray-600";
|
|
3396
3793
|
}
|
|
3397
|
-
function
|
|
3398
|
-
return e ?
|
|
3794
|
+
function $a(e) {
|
|
3795
|
+
return e ? Za[e.toUpperCase()] ?? "bg-gray-500" : "bg-gray-500";
|
|
3399
3796
|
}
|
|
3400
|
-
function
|
|
3797
|
+
function eo(e) {
|
|
3401
3798
|
let t = e ?? 0;
|
|
3402
3799
|
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";
|
|
3403
3800
|
}
|
|
3404
|
-
function
|
|
3801
|
+
function to(e, t) {
|
|
3405
3802
|
let n = (e || "ANY").toUpperCase();
|
|
3406
3803
|
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";
|
|
3407
3804
|
}
|
|
3408
|
-
function
|
|
3805
|
+
function no(e, t) {
|
|
3409
3806
|
let n = e ?? 200;
|
|
3410
3807
|
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";
|
|
3411
3808
|
}
|
|
3412
|
-
function
|
|
3809
|
+
function ro(e, t) {
|
|
3413
3810
|
let n = e ?? 200;
|
|
3414
3811
|
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";
|
|
3415
3812
|
}
|
|
3416
3813
|
//#endregion
|
|
3417
3814
|
//#region src/utils/kvRows.ts
|
|
3418
|
-
function
|
|
3815
|
+
function io(e) {
|
|
3419
3816
|
return !(e.key ?? "").trim() || e.matcherType === "absent" ? !1 : !(e.value ?? "").trim();
|
|
3420
3817
|
}
|
|
3421
|
-
function
|
|
3818
|
+
function ao(e) {
|
|
3422
3819
|
return e.matcherType === "absent" || !(e.value ?? "").trim() ? !1 : !(e.key ?? "").trim();
|
|
3423
3820
|
}
|
|
3424
3821
|
//#endregion
|
|
3425
3822
|
//#region src/utils/sanitizeHtml.ts
|
|
3426
|
-
var
|
|
3823
|
+
var oo = /* @__PURE__ */ new Set([
|
|
3427
3824
|
"A",
|
|
3428
3825
|
"B",
|
|
3429
3826
|
"STRONG",
|
|
@@ -3438,7 +3835,7 @@ var ia = /* @__PURE__ */ new Set([
|
|
|
3438
3835
|
"LI",
|
|
3439
3836
|
"SPAN",
|
|
3440
3837
|
"DIV"
|
|
3441
|
-
]),
|
|
3838
|
+
]), so = /* @__PURE__ */ new Set([
|
|
3442
3839
|
"SCRIPT",
|
|
3443
3840
|
"STYLE",
|
|
3444
3841
|
"IFRAME",
|
|
@@ -3446,53 +3843,53 @@ var ia = /* @__PURE__ */ new Set([
|
|
|
3446
3843
|
"EMBED",
|
|
3447
3844
|
"NOSCRIPT",
|
|
3448
3845
|
"TEMPLATE"
|
|
3449
|
-
]),
|
|
3450
|
-
function
|
|
3846
|
+
]), co = { A: /* @__PURE__ */ new Set(["href", "title"]) };
|
|
3847
|
+
function lo(e) {
|
|
3451
3848
|
let t = e.trim().toLowerCase();
|
|
3452
3849
|
return t.startsWith("http://") || t.startsWith("https://") || t.startsWith("mailto:") || t.startsWith("tel:") || t.startsWith("/") || t.startsWith("#") || t === "";
|
|
3453
3850
|
}
|
|
3454
|
-
function
|
|
3851
|
+
function uo(e) {
|
|
3455
3852
|
if (e.nodeType !== Node.ELEMENT_NODE) return;
|
|
3456
3853
|
let t = e, n = t.tagName.toUpperCase();
|
|
3457
|
-
if (!
|
|
3458
|
-
|
|
3854
|
+
if (!oo.has(n)) {
|
|
3855
|
+
so.has(n) ? t.remove() : t.replaceWith(document.createTextNode(t.textContent ?? ""));
|
|
3459
3856
|
return;
|
|
3460
3857
|
}
|
|
3461
|
-
let r =
|
|
3858
|
+
let r = co[n] ?? /* @__PURE__ */ new Set();
|
|
3462
3859
|
for (let e of Array.from(t.attributes)) {
|
|
3463
3860
|
if (!r.has(e.name.toLowerCase())) {
|
|
3464
3861
|
t.removeAttribute(e.name);
|
|
3465
3862
|
continue;
|
|
3466
3863
|
}
|
|
3467
|
-
n === "A" && e.name.toLowerCase() === "href" && !
|
|
3864
|
+
n === "A" && e.name.toLowerCase() === "href" && !lo(e.value) && t.removeAttribute(e.name);
|
|
3468
3865
|
}
|
|
3469
3866
|
n === "A" && t.hasAttribute("href") && (t.setAttribute("rel", "noopener noreferrer"), t.setAttribute("target", "_blank"));
|
|
3470
|
-
for (let e of Array.from(t.childNodes))
|
|
3867
|
+
for (let e of Array.from(t.childNodes)) uo(e);
|
|
3471
3868
|
}
|
|
3472
|
-
function
|
|
3869
|
+
function fo(e) {
|
|
3473
3870
|
if (!e) return "";
|
|
3474
3871
|
let t = new DOMParser().parseFromString(`<div>${e}</div>`, "text/html").body.firstElementChild;
|
|
3475
3872
|
if (!t) return "";
|
|
3476
|
-
for (let e of Array.from(t.childNodes))
|
|
3873
|
+
for (let e of Array.from(t.childNodes)) uo(e);
|
|
3477
3874
|
return t.innerHTML;
|
|
3478
3875
|
}
|
|
3479
3876
|
//#endregion
|
|
3480
3877
|
//#region src/utils/format.ts
|
|
3481
|
-
var
|
|
3482
|
-
function
|
|
3483
|
-
if (e == null || typeof e == "string" && e.trim() === "") return
|
|
3878
|
+
var po = "—";
|
|
3879
|
+
function mo(e, t = 4) {
|
|
3880
|
+
if (e == null || typeof e == "string" && e.trim() === "") return po;
|
|
3484
3881
|
let n = typeof e == "string" ? Number(e) : e;
|
|
3485
3882
|
return isFinite(n) ? n.toLocaleString(void 0, {
|
|
3486
3883
|
minimumFractionDigits: t,
|
|
3487
3884
|
maximumFractionDigits: t
|
|
3488
|
-
}) :
|
|
3885
|
+
}) : po;
|
|
3489
3886
|
}
|
|
3490
|
-
function
|
|
3491
|
-
if (e == null || e === "") return
|
|
3887
|
+
function ho(e) {
|
|
3888
|
+
if (e == null || e === "") return po;
|
|
3492
3889
|
let t = new Date(e);
|
|
3493
3890
|
return isNaN(t.getTime()) ? String(e) : t.toLocaleString();
|
|
3494
3891
|
}
|
|
3495
|
-
function
|
|
3892
|
+
function go(e) {
|
|
3496
3893
|
return new Date(e).toLocaleString(void 0, {
|
|
3497
3894
|
month: "short",
|
|
3498
3895
|
day: "numeric",
|
|
@@ -3500,13 +3897,13 @@ function fa(e) {
|
|
|
3500
3897
|
minute: "2-digit"
|
|
3501
3898
|
});
|
|
3502
3899
|
}
|
|
3503
|
-
function
|
|
3900
|
+
function _o(e) {
|
|
3504
3901
|
return new Date(e).toLocaleDateString(void 0, {
|
|
3505
3902
|
month: "short",
|
|
3506
3903
|
day: "numeric"
|
|
3507
3904
|
});
|
|
3508
3905
|
}
|
|
3509
|
-
function
|
|
3906
|
+
function vo(e) {
|
|
3510
3907
|
try {
|
|
3511
3908
|
return new Date(e).toLocaleString(void 0, {
|
|
3512
3909
|
year: "numeric",
|
|
@@ -3522,7 +3919,7 @@ function ma(e) {
|
|
|
3522
3919
|
return String(e);
|
|
3523
3920
|
}
|
|
3524
3921
|
}
|
|
3525
|
-
function
|
|
3922
|
+
function yo(e) {
|
|
3526
3923
|
if (!isFinite(e) || e === 0) return e.toFixed(2);
|
|
3527
3924
|
let t = Math.abs(e), n = 2;
|
|
3528
3925
|
return t < 1e-4 ? n = 8 : t < .01 ? n = 6 : t < 1 ? n = 4 : t < 100 && (n = 3), e.toLocaleString(void 0, {
|
|
@@ -3530,14 +3927,14 @@ function ha(e) {
|
|
|
3530
3927
|
maximumFractionDigits: n
|
|
3531
3928
|
});
|
|
3532
3929
|
}
|
|
3533
|
-
function
|
|
3930
|
+
function bo(e, t = 2) {
|
|
3534
3931
|
return `${e >= 0 ? "+" : ""}${e.toFixed(t)}%`;
|
|
3535
3932
|
}
|
|
3536
|
-
function
|
|
3933
|
+
function xo(e) {
|
|
3537
3934
|
return `${e < 0 ? "-" : "+"}$${Math.abs(e).toFixed(2)}`;
|
|
3538
3935
|
}
|
|
3539
|
-
function
|
|
3540
|
-
if (e == null || e === "") return
|
|
3936
|
+
function So(e) {
|
|
3937
|
+
if (e == null || e === "") return po;
|
|
3541
3938
|
let t = new Date(e);
|
|
3542
3939
|
return isNaN(t.getTime()) ? String(e) : t.toLocaleDateString("en-US", {
|
|
3543
3940
|
year: "numeric",
|
|
@@ -3545,8 +3942,8 @@ function va(e) {
|
|
|
3545
3942
|
day: "numeric"
|
|
3546
3943
|
});
|
|
3547
3944
|
}
|
|
3548
|
-
function
|
|
3549
|
-
if (e == null || e === "") return
|
|
3945
|
+
function Co(e) {
|
|
3946
|
+
if (e == null || e === "") return po;
|
|
3550
3947
|
let t = new Date(e);
|
|
3551
3948
|
return isNaN(t.getTime()) ? String(e) : t.toLocaleDateString("en-US", {
|
|
3552
3949
|
year: "numeric",
|
|
@@ -3556,22 +3953,22 @@ function ya(e) {
|
|
|
3556
3953
|
minute: "2-digit"
|
|
3557
3954
|
});
|
|
3558
3955
|
}
|
|
3559
|
-
function
|
|
3956
|
+
function wo(e) {
|
|
3560
3957
|
if (typeof e != "number" || !isFinite(e) || e <= 0) return "";
|
|
3561
3958
|
let t = e / 1e3, n = t < 1 ? 3 : 2;
|
|
3562
3959
|
return `= ${t.toFixed(n)} s`;
|
|
3563
3960
|
}
|
|
3564
|
-
function
|
|
3961
|
+
function To(e) {
|
|
3565
3962
|
return e ? e < 1024 ? `${e} B` : e < 1048576 ? `${(e / 1024).toFixed(1)} KB` : `${(e / 1048576).toFixed(1)} MB` : "";
|
|
3566
3963
|
}
|
|
3567
|
-
function
|
|
3964
|
+
function Eo(e) {
|
|
3568
3965
|
try {
|
|
3569
3966
|
return JSON.stringify(JSON.parse(e), null, 2);
|
|
3570
3967
|
} catch {
|
|
3571
3968
|
return e;
|
|
3572
3969
|
}
|
|
3573
3970
|
}
|
|
3574
|
-
function
|
|
3971
|
+
function Do(e) {
|
|
3575
3972
|
if (e == null) return "";
|
|
3576
3973
|
if (typeof e == "string") return e;
|
|
3577
3974
|
try {
|
|
@@ -3580,14 +3977,14 @@ function Ca(e) {
|
|
|
3580
3977
|
return String(e);
|
|
3581
3978
|
}
|
|
3582
3979
|
}
|
|
3583
|
-
function
|
|
3584
|
-
if (e == null || !isFinite(e)) return
|
|
3980
|
+
function Oo(e, t = 2) {
|
|
3981
|
+
if (e == null || !isFinite(e)) return po;
|
|
3585
3982
|
let n = Math.floor(Math.max(0, e) / 6e4), r = Math.floor(n / 1440), i = Math.floor(n % 1440 / 60), a = n % 60, o = [];
|
|
3586
3983
|
return r > 0 && o.push(`${r}d`), (r > 0 || i > 0) && o.push(`${i}h`), o.push(`${a}m`), o.slice(0, t).join(" ");
|
|
3587
3984
|
}
|
|
3588
3985
|
//#endregion
|
|
3589
3986
|
//#region src/utils/validate.ts
|
|
3590
|
-
function
|
|
3987
|
+
function ko(e) {
|
|
3591
3988
|
let t = (e ?? "").trim();
|
|
3592
3989
|
if (!t) return !1;
|
|
3593
3990
|
try {
|
|
@@ -3597,7 +3994,7 @@ function Ta(e) {
|
|
|
3597
3994
|
return !1;
|
|
3598
3995
|
}
|
|
3599
3996
|
}
|
|
3600
|
-
function
|
|
3997
|
+
function Ao(e) {
|
|
3601
3998
|
if (!e.trim()) return !0;
|
|
3602
3999
|
try {
|
|
3603
4000
|
return JSON.parse(e), !0;
|
|
@@ -3605,7 +4002,7 @@ function Ea(e) {
|
|
|
3605
4002
|
return !1;
|
|
3606
4003
|
}
|
|
3607
4004
|
}
|
|
3608
|
-
function
|
|
4005
|
+
function jo(e) {
|
|
3609
4006
|
if (!e.trim()) return !0;
|
|
3610
4007
|
try {
|
|
3611
4008
|
return !new DOMParser().parseFromString(e, "application/xml").getElementsByTagName("parsererror").length;
|
|
@@ -3613,7 +4010,7 @@ function Da(e) {
|
|
|
3613
4010
|
return !1;
|
|
3614
4011
|
}
|
|
3615
4012
|
}
|
|
3616
|
-
function
|
|
4013
|
+
function Mo(e) {
|
|
3617
4014
|
if (!e.trim()) return !0;
|
|
3618
4015
|
let t = e.replace(/\s+/g, "");
|
|
3619
4016
|
if (!t) return !0;
|
|
@@ -3626,7 +4023,7 @@ function Oa(e) {
|
|
|
3626
4023
|
}
|
|
3627
4024
|
//#endregion
|
|
3628
4025
|
//#region src/utils/specForm.ts
|
|
3629
|
-
function
|
|
4026
|
+
function No(e, t) {
|
|
3630
4027
|
let n = {};
|
|
3631
4028
|
if (!e) return n;
|
|
3632
4029
|
for (let r of e) {
|
|
@@ -3635,7 +4032,7 @@ function ka(e, t) {
|
|
|
3635
4032
|
}
|
|
3636
4033
|
return n;
|
|
3637
4034
|
}
|
|
3638
|
-
function
|
|
4035
|
+
function Po(e, t) {
|
|
3639
4036
|
if (!e) return null;
|
|
3640
4037
|
for (let n of e) if (n.type === "decimal" || n.type === "integer") {
|
|
3641
4038
|
let e = t[n.key], r = e === "" || e == null;
|
|
@@ -3646,7 +4043,7 @@ function Aa(e, t) {
|
|
|
3646
4043
|
}
|
|
3647
4044
|
//#endregion
|
|
3648
4045
|
//#region src/utils/pnl.ts
|
|
3649
|
-
function
|
|
4046
|
+
function Fo(e) {
|
|
3650
4047
|
if (e.buyPrice == null || e.lastPrice == null || e.filledQty == null) return {
|
|
3651
4048
|
pnlUsd: null,
|
|
3652
4049
|
pnlPct: null
|
|
@@ -3661,4 +4058,4 @@ function ja(e) {
|
|
|
3661
4058
|
};
|
|
3662
4059
|
}
|
|
3663
4060
|
//#endregion
|
|
3664
|
-
export {
|
|
4061
|
+
export { V as AlertEnum, xr as BaseActionButton, Le as BaseAlert, fr as BaseAppLayout, ze as BaseBadge, qa as BaseBadgeEnum, ma as BaseBarDistribution, Ue as BaseBreadcrumb, Qe as BaseButton, K as BaseButtonEnum, q as BaseButtonSizeEnum, Ma as BaseCard, Jr as BaseChipButton, ni as BaseCodeBlock, yn as BaseCollapsibleSection, Cn as BaseConfirmModal, Cr as BaseCopyButton, $i as BaseCredentialsForm, ha as BaseDateTimePicker, di as BaseDropdown, lr as BaseEntityPickerModal, La as BaseField, ti as BaseFileDropzone, Ii as BaseFilterChip, Dr as BaseGoogleSignInButton, ii as BaseInput, rt as BaseLine, it as BaseLoginEnum, zr as BaseLoginForm, Dt as BaseLogo, J as BaseLogoEnum, Pt as BaseModal, Ot as BaseModalEnum, gn as BaseModalShell, An as BaseNotFoundPage, Kr as BaseNotificationPanel, hr as BasePageHeader, la as BasePillPickerModal, Yr as BaseRemoveButton, Ft as BaseRow, wa as BaseSearchSelect, hi as BaseSegmentedControl, oi as BaseSelect, Xn as BaseSidebar, ji as BaseSpecFields, It as BaseSpinner, Pi as BaseStatBreakdown, Va as BaseStatCard, Qr as BaseStatusPill, Ci as BaseTable, Dn as BaseTextInputModal, zt as BaseToast, Y as BaseToastEnum, vr as BaseToolbarButton, Vt as ColoredSquares, G as ColorsEnums, Wt as EarningsCard, Yt as EuroAmount, $e as LineEnum, en as Pagination, X as PositioningEnum, on as TrendArrow, No as buildSpecParams, Fo as computePnL, Po as firstInvalidNumericSpec, To as fmtBytes, So as fmtCalendarDate, Co as fmtCalendarDateTime, ho as fmtDate, _o as fmtDateShort, go as fmtDateTime, vo as fmtDateTimeMs, Oo as fmtDuration, wo as fmtMsAsSeconds, mo as fmtNumber, bo as fmtPct, yo as fmtPrice, xo as fmtUsd, Eo as formatJson, Ja as getBaseColor, Ya as getBaseColorOf, Pe as initTheme, lo as isSafeHref, ko as isValidAbsoluteUrl, Mo as isValidBase64, Ao as isValidJson, jo as isValidXml, $a as methodBadgeBright, Qa as methodBadgeSolid, to as methodBadgeTinted, ao as rowKeyMissing, io as rowValueMissing, fo as sanitizeHtml, no as statusBadgeSoft, eo as statusBadgeSolid, ro as statusBadgeTinted, Do as stringifyValue, Ha as useDebouncedRef, sn as useEscapeKey, Ga as useFieldClasses, Mn as useMobileSidebar, zn as useNotifications, Ka as usePolling, Wa as useQueryParamSync, In as useSidebarCollapse, W as useTheme, Z as useThemeClasses, Ua as useToast };
|