mgv-backoffice 1.22.0 → 1.24.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 +38 -5
- package/dist/components/BaseDropdown.vue.d.ts +28 -0
- package/dist/components/EarningsCard.vue.d.ts +10 -0
- package/dist/index.d.ts +2 -0
- package/dist/types/dropdown.d.ts +14 -0
- package/dist/ui-lib.css +1 -1
- package/dist/ui-lib.js +470 -395
- package/dist/ui-lib.umd.cjs +1 -1
- package/package.json +1 -1
- package/src/components/BaseDropdown.test.ts +64 -0
- package/src/components/BaseDropdown.vue +154 -0
- package/src/components/EarningsCard.test.ts +30 -0
- package/src/components/EarningsCard.vue +28 -11
- package/src/index.ts +2 -0
- package/src/types/dropdown.ts +14 -0
package/dist/ui-lib.js
CHANGED
|
@@ -1,55 +1,55 @@
|
|
|
1
1
|
import { Fragment as e, Teleport as t, Transition as n, computed as r, createBlock as i, createCommentVNode as a, createElementBlock as o, createElementVNode as s, createStaticVNode as c, createTextVNode as l, createVNode as u, defineComponent as d, effectScope as f, nextTick as p, normalizeClass as m, onBeforeUnmount as h, onMounted as g, onScopeDispose as _, onUnmounted as v, openBlock as y, ref as b, renderList as x, renderSlot as S, resolveComponent as C, resolveDynamicComponent as w, toDisplayString as T, unref as E, useSlots as D, vModelCheckbox as O, vModelDynamic as k, vModelText as A, vShow as ee, watch as j, withCtx as M, withDirectives as N, withKeys as P, withModifiers as F } from "vue";
|
|
2
|
-
import { ArrowDownIcon as te, ArrowUpIcon as ne, Bars3Icon as re, BellIcon as ie, CheckCircleIcon as ae, ChevronDoubleLeftIcon as oe, ChevronDoubleRightIcon as se,
|
|
3
|
-
import { HomeIcon as
|
|
4
|
-
import { useRoute as
|
|
2
|
+
import { ArrowDownIcon as te, ArrowUpIcon as ne, Bars3Icon as re, BellIcon as ie, CheckCircleIcon as ae, ChevronDoubleLeftIcon as oe, ChevronDoubleRightIcon as se, ChevronDownIcon as ce, ChevronRightIcon as le, ClipboardDocumentCheckIcon as ue, ClipboardDocumentIcon as de, DocumentDuplicateIcon as fe, ExclamationCircleIcon as pe, ExclamationTriangleIcon as me, FolderIcon as he, InformationCircleIcon as ge, MagnifyingGlassIcon as _e, MinusIcon as ve, MoonIcon as ye, SunIcon as be, XMarkIcon as xe } from "@heroicons/vue/24/outline";
|
|
3
|
+
import { HomeIcon as Se } from "@heroicons/vue/24/solid";
|
|
4
|
+
import { useRoute as Ce, useRouter as we } from "vue-router";
|
|
5
5
|
//#region src/enums/AlertEnum.ts
|
|
6
|
-
var
|
|
6
|
+
var I = /* @__PURE__ */ function(e) {
|
|
7
7
|
return e.WARNING = "WARNING", e.ERROR = "ERROR", e.SUCCESS = "SUCCESS", e.INFO = "INFO", e;
|
|
8
|
-
}({}),
|
|
8
|
+
}({}), L = /* @__PURE__ */ function(e) {
|
|
9
9
|
return e.NONE = "NONE", e.RED = "RED", e.YELLOW = "YELLOW", e.BLACK = "BLACK", e.GRAY = "GRAY", e.GREEN = "GREEN", e.BLUE = "BLUE", e;
|
|
10
10
|
}({});
|
|
11
11
|
//#endregion
|
|
12
12
|
//#region src/utils/util.ts
|
|
13
|
-
function
|
|
13
|
+
function Te(e) {
|
|
14
14
|
let t = "red";
|
|
15
15
|
switch (e) {
|
|
16
|
-
case
|
|
16
|
+
case I.ERROR:
|
|
17
17
|
t = "red";
|
|
18
18
|
break;
|
|
19
|
-
case
|
|
19
|
+
case I.SUCCESS:
|
|
20
20
|
t = "green";
|
|
21
21
|
break;
|
|
22
|
-
case
|
|
22
|
+
case I.INFO:
|
|
23
23
|
t = "gray";
|
|
24
24
|
break;
|
|
25
|
-
case
|
|
25
|
+
case I.WARNING:
|
|
26
26
|
t = "yellow";
|
|
27
27
|
break;
|
|
28
28
|
}
|
|
29
29
|
return t;
|
|
30
30
|
}
|
|
31
|
-
function
|
|
31
|
+
function Ee(e) {
|
|
32
32
|
let t = "red";
|
|
33
33
|
switch (e) {
|
|
34
|
-
case
|
|
34
|
+
case L.GREEN:
|
|
35
35
|
t = "green";
|
|
36
36
|
break;
|
|
37
|
-
case
|
|
37
|
+
case L.RED:
|
|
38
38
|
t = "red";
|
|
39
39
|
break;
|
|
40
|
-
case
|
|
40
|
+
case L.BLUE:
|
|
41
41
|
t = "blue";
|
|
42
42
|
break;
|
|
43
|
-
case
|
|
43
|
+
case L.YELLOW:
|
|
44
44
|
t = "yellow";
|
|
45
45
|
break;
|
|
46
|
-
case
|
|
46
|
+
case L.BLACK:
|
|
47
47
|
t = "black";
|
|
48
48
|
break;
|
|
49
|
-
case
|
|
49
|
+
case L.GRAY:
|
|
50
50
|
t = "gray";
|
|
51
51
|
break;
|
|
52
|
-
case
|
|
52
|
+
case L.NONE:
|
|
53
53
|
t = "";
|
|
54
54
|
break;
|
|
55
55
|
}
|
|
@@ -57,7 +57,7 @@ function we(e) {
|
|
|
57
57
|
}
|
|
58
58
|
//#endregion
|
|
59
59
|
//#region src/components/BaseAlert.vue?vue&type=script&setup=true&lang.ts
|
|
60
|
-
var
|
|
60
|
+
var De = { class: "font-medium pl-1" }, Oe = /* @__PURE__ */ d({
|
|
61
61
|
__name: "BaseAlert",
|
|
62
62
|
props: {
|
|
63
63
|
title: {
|
|
@@ -68,35 +68,35 @@ var Te = { class: "font-medium pl-1" }, Ee = /* @__PURE__ */ d({
|
|
|
68
68
|
color: {
|
|
69
69
|
type: String,
|
|
70
70
|
required: !1,
|
|
71
|
-
default:
|
|
71
|
+
default: I.ERROR
|
|
72
72
|
}
|
|
73
73
|
},
|
|
74
74
|
setup(e) {
|
|
75
75
|
let t = e, n = r(() => {
|
|
76
76
|
switch (t.color) {
|
|
77
|
-
case
|
|
78
|
-
case
|
|
79
|
-
case
|
|
80
|
-
default: return
|
|
77
|
+
case I.SUCCESS: return ae;
|
|
78
|
+
case I.WARNING: return me;
|
|
79
|
+
case I.INFO: return ge;
|
|
80
|
+
default: return pe;
|
|
81
81
|
}
|
|
82
82
|
}), a = r(() => {
|
|
83
83
|
switch (t.color) {
|
|
84
|
-
case
|
|
85
|
-
case
|
|
86
|
-
case
|
|
84
|
+
case I.SUCCESS: return "text-green-500";
|
|
85
|
+
case I.WARNING: return "text-yellow-500";
|
|
86
|
+
case I.INFO: return "text-gray-500";
|
|
87
87
|
default: return "text-red-500";
|
|
88
88
|
}
|
|
89
89
|
});
|
|
90
90
|
function c() {
|
|
91
|
-
let e =
|
|
91
|
+
let e = Te(t.color);
|
|
92
92
|
return "flex items-center p-4 mb-4 text-sm text-" + e + "-800 border border-" + e + "-300 rounded-lg bg-" + e + "-50 dark:bg-gray-800 dark:text-" + e + "-400 dark:border-" + e + "-800";
|
|
93
93
|
}
|
|
94
94
|
return (t, r) => (y(), o("div", {
|
|
95
95
|
class: m(c()),
|
|
96
96
|
role: "alert"
|
|
97
|
-
}, [(y(), i(w(n.value), { class: m(["w-6 h-6 flex-shrink-0", a.value]) }, null, 8, ["class"])), s("div", null, [s("span",
|
|
97
|
+
}, [(y(), i(w(n.value), { class: m(["w-6 h-6 flex-shrink-0", a.value]) }, null, 8, ["class"])), s("div", null, [s("span", De, T(e.title), 1)])], 2));
|
|
98
98
|
}
|
|
99
|
-
}),
|
|
99
|
+
}), ke = "bg-red-100 text-red-700 border-red-200", R = /* @__PURE__ */ d({
|
|
100
100
|
__name: "BaseBadge",
|
|
101
101
|
props: { color: {
|
|
102
102
|
type: String,
|
|
@@ -104,26 +104,26 @@ var Te = { class: "font-medium pl-1" }, Ee = /* @__PURE__ */ d({
|
|
|
104
104
|
} },
|
|
105
105
|
setup(e) {
|
|
106
106
|
let t = D(), n = r(() => !!t.default), i = e, s = {
|
|
107
|
-
[
|
|
108
|
-
[
|
|
109
|
-
[
|
|
110
|
-
[
|
|
111
|
-
[
|
|
112
|
-
[
|
|
113
|
-
[
|
|
114
|
-
}, c = r(() => `inline-flex items-center gap-1 font-semibold text-xs leading-none px-3 py-1.5 rounded-full border ${i.color && s[i.color] ||
|
|
107
|
+
[L.RED]: "bg-red-100 text-red-700 border-red-200",
|
|
108
|
+
[L.GREEN]: "bg-green-100 text-green-700 border-green-200",
|
|
109
|
+
[L.BLUE]: "bg-blue-100 text-blue-700 border-blue-200",
|
|
110
|
+
[L.YELLOW]: "bg-yellow-100 text-yellow-700 border-yellow-200",
|
|
111
|
+
[L.GRAY]: "bg-gray-100 text-gray-700 border-gray-200",
|
|
112
|
+
[L.BLACK]: "bg-gray-800 text-gray-100 border-gray-700",
|
|
113
|
+
[L.NONE]: "bg-gray-50 text-gray-600 border-gray-200"
|
|
114
|
+
}, c = r(() => `inline-flex items-center gap-1 font-semibold text-xs leading-none px-3 py-1.5 rounded-full border ${i.color && s[i.color] || ke}`);
|
|
115
115
|
return (e, t) => n.value ? (y(), o("span", {
|
|
116
116
|
key: 0,
|
|
117
117
|
class: m(c.value)
|
|
118
118
|
}, [S(e.$slots, "default")], 2)) : a("", !0);
|
|
119
119
|
}
|
|
120
|
-
}),
|
|
120
|
+
}), Ae = {
|
|
121
121
|
class: "flex px-5 py-3 text-gray-700 border border-gray-200 rounded-lg bg-gray-50 dark:bg-gray-800 dark:border-gray-700",
|
|
122
122
|
"aria-label": "Breadcrumb"
|
|
123
|
-
},
|
|
123
|
+
}, je = { class: "inline-flex items-center space-x-1 md:space-x-3" }, Me = {
|
|
124
124
|
class: "inline-flex items-center",
|
|
125
125
|
style: { "margin-left": "0" }
|
|
126
|
-
},
|
|
126
|
+
}, Ne = /* @__PURE__ */ d({
|
|
127
127
|
__name: "BaseBreadcrumb",
|
|
128
128
|
props: {
|
|
129
129
|
items: {
|
|
@@ -148,17 +148,17 @@ var Te = { class: "font-medium pl-1" }, Ee = /* @__PURE__ */ d({
|
|
|
148
148
|
});
|
|
149
149
|
return (t, n) => {
|
|
150
150
|
let r = C("router-link");
|
|
151
|
-
return y(), o("nav",
|
|
151
|
+
return y(), o("nav", Ae, [s("ol", je, [s("li", Me, [u(r, {
|
|
152
152
|
to: "/",
|
|
153
153
|
class: "inline-flex items-center text-sm font-medium text-gray-700 hover:text-blue-600 dark:text-gray-400 dark:hover:text-white"
|
|
154
154
|
}, {
|
|
155
|
-
default: M(() => [u(E(
|
|
155
|
+
default: M(() => [u(E(Se), { class: "h-4 w-4 text-gray-500 mr-2" }), n[0] ||= l(" Home ", -1)]),
|
|
156
156
|
_: 1
|
|
157
157
|
})]), (y(!0), o(e, null, x(i.value, (e, t) => (y(), o("li", {
|
|
158
158
|
key: t,
|
|
159
159
|
class: "inline-flex items-center",
|
|
160
160
|
style: { "margin-left": "0" }
|
|
161
|
-
}, [u(E(
|
|
161
|
+
}, [u(E(le), { class: "h-4 w-4 text-gray-500" }), u(r, {
|
|
162
162
|
to: e.url,
|
|
163
163
|
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"
|
|
164
164
|
}, {
|
|
@@ -167,52 +167,52 @@ var Te = { class: "font-medium pl-1" }, Ee = /* @__PURE__ */ d({
|
|
|
167
167
|
}, 1032, ["to"])]))), 128))])]);
|
|
168
168
|
};
|
|
169
169
|
}
|
|
170
|
-
}),
|
|
170
|
+
}), z = /* @__PURE__ */ function(e) {
|
|
171
171
|
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;
|
|
172
|
-
}({}),
|
|
172
|
+
}({}), B = /* @__PURE__ */ function(e) {
|
|
173
173
|
return e.EXTRA_SMALL = "EXTRA_SMALL", e.SMALL = "SMALL", e.BASE = "BASE", e.LARGE = "LARGE", e.EXTRA_LARGE = "EXTRA_LARGE", e;
|
|
174
|
-
}({}),
|
|
175
|
-
function
|
|
176
|
-
if (
|
|
177
|
-
e !==
|
|
174
|
+
}({}), V = b(!1), Pe = !1, H = "mgv-theme";
|
|
175
|
+
function Fe(e) {
|
|
176
|
+
if (Pe) {
|
|
177
|
+
e !== H && console.warn(`[ui-lib] useTheme: storage key "${e}" ignored — theme already initialized with "${H}". Call initTheme({ storageKey }) before mounting any component.`);
|
|
178
178
|
return;
|
|
179
179
|
}
|
|
180
|
-
if (
|
|
181
|
-
let e = window.localStorage?.getItem(
|
|
182
|
-
e ?
|
|
180
|
+
if (Pe = !0, H = e, typeof window < "u") {
|
|
181
|
+
let e = window.localStorage?.getItem(H);
|
|
182
|
+
e ? V.value = e === "dark" : typeof window.matchMedia == "function" && (V.value = window.matchMedia("(prefers-color-scheme: dark)").matches);
|
|
183
183
|
}
|
|
184
184
|
typeof document < "u" && f(!0).run(() => {
|
|
185
|
-
j(
|
|
186
|
-
document.documentElement.classList.toggle("dark", e), window.localStorage?.setItem(
|
|
185
|
+
j(V, (e) => {
|
|
186
|
+
document.documentElement.classList.toggle("dark", e), window.localStorage?.setItem(H, e ? "dark" : "light");
|
|
187
187
|
}, { immediate: !0 });
|
|
188
188
|
});
|
|
189
189
|
}
|
|
190
|
-
function
|
|
191
|
-
|
|
190
|
+
function Ie(e) {
|
|
191
|
+
Fe(e?.storageKey ?? H);
|
|
192
192
|
}
|
|
193
|
-
function
|
|
194
|
-
|
|
193
|
+
function U(e) {
|
|
194
|
+
Fe(e?.storageKey ?? H);
|
|
195
195
|
function t() {
|
|
196
|
-
|
|
196
|
+
V.value = !V.value;
|
|
197
197
|
}
|
|
198
198
|
return {
|
|
199
|
-
isDark:
|
|
199
|
+
isDark: V,
|
|
200
200
|
toggleTheme: t
|
|
201
201
|
};
|
|
202
202
|
}
|
|
203
203
|
//#endregion
|
|
204
204
|
//#region src/components/BaseButton.vue?vue&type=script&setup=true&lang.ts
|
|
205
|
-
var
|
|
205
|
+
var Le = [
|
|
206
206
|
"type",
|
|
207
207
|
"disabled",
|
|
208
208
|
"onClick"
|
|
209
|
-
],
|
|
209
|
+
], Re = {
|
|
210
210
|
key: 0,
|
|
211
211
|
class: "inline-flex items-center"
|
|
212
|
-
},
|
|
212
|
+
}, ze = { key: 1 }, Be = { key: 2 }, Ve = ["type", "disabled"], He = {
|
|
213
213
|
key: 0,
|
|
214
214
|
class: "inline-flex items-center"
|
|
215
|
-
},
|
|
215
|
+
}, Ue = { key: 1 }, We = { key: 2 }, Ge = /* @__PURE__ */ d({
|
|
216
216
|
__name: "BaseButton",
|
|
217
217
|
props: {
|
|
218
218
|
description: {
|
|
@@ -222,7 +222,7 @@ var Fe = [
|
|
|
222
222
|
color: {
|
|
223
223
|
type: String,
|
|
224
224
|
required: !1,
|
|
225
|
-
default:
|
|
225
|
+
default: z.BLUE
|
|
226
226
|
},
|
|
227
227
|
to: {
|
|
228
228
|
type: String,
|
|
@@ -266,139 +266,139 @@ var Fe = [
|
|
|
266
266
|
}
|
|
267
267
|
},
|
|
268
268
|
setup(e) {
|
|
269
|
-
let { isDark: t } =
|
|
269
|
+
let { isDark: t } = U(), n = e;
|
|
270
270
|
function r() {
|
|
271
271
|
let e = {
|
|
272
|
-
[
|
|
272
|
+
[z.BLUE]: {
|
|
273
273
|
light: "text-blue-700 border-blue-300 hover:bg-blue-50",
|
|
274
274
|
dark: "text-blue-400 border-blue-500/40 hover:bg-blue-500/10"
|
|
275
275
|
},
|
|
276
|
-
[
|
|
276
|
+
[z.GREEN]: {
|
|
277
277
|
light: "text-green-700 border-green-300 hover:bg-green-50",
|
|
278
278
|
dark: "text-green-400 border-green-500/40 hover:bg-green-500/10"
|
|
279
279
|
},
|
|
280
|
-
[
|
|
280
|
+
[z.EMERALD]: {
|
|
281
281
|
light: "text-emerald-700 border-emerald-300 hover:bg-emerald-50",
|
|
282
282
|
dark: "text-emerald-400 border-emerald-500/40 hover:bg-emerald-500/10"
|
|
283
283
|
},
|
|
284
|
-
[
|
|
284
|
+
[z.RED]: {
|
|
285
285
|
light: "text-red-700 border-red-300 hover:bg-red-50",
|
|
286
286
|
dark: "text-red-400 border-red-500/40 hover:bg-red-500/10"
|
|
287
287
|
},
|
|
288
|
-
[
|
|
288
|
+
[z.YELLOW]: {
|
|
289
289
|
light: "text-yellow-700 border-yellow-300 hover:bg-yellow-50",
|
|
290
290
|
dark: "text-yellow-400 border-yellow-500/40 hover:bg-yellow-500/10"
|
|
291
291
|
},
|
|
292
|
-
[
|
|
292
|
+
[z.PURPLE]: {
|
|
293
293
|
light: "text-purple-700 border-purple-300 hover:bg-purple-50",
|
|
294
294
|
dark: "text-purple-400 border-purple-500/40 hover:bg-purple-500/10"
|
|
295
295
|
},
|
|
296
|
-
[
|
|
296
|
+
[z.SKY]: {
|
|
297
297
|
light: "text-sky-700 border-sky-300 hover:bg-sky-50",
|
|
298
298
|
dark: "text-sky-400 border-sky-500/40 hover:bg-sky-500/10"
|
|
299
299
|
},
|
|
300
|
-
[
|
|
300
|
+
[z.AMBER]: {
|
|
301
301
|
light: "text-amber-700 border-amber-300 hover:bg-amber-50",
|
|
302
302
|
dark: "text-amber-400 border-amber-500/40 hover:bg-amber-500/10"
|
|
303
303
|
},
|
|
304
|
-
[
|
|
304
|
+
[z.GRAY]: {
|
|
305
305
|
light: "text-gray-700 border-gray-300 hover:bg-gray-50",
|
|
306
306
|
dark: "text-gray-300 border-gray-600 hover:bg-gray-800"
|
|
307
307
|
},
|
|
308
|
-
[
|
|
308
|
+
[z.DARK]: {
|
|
309
309
|
light: "text-gray-700 border-gray-300 hover:bg-gray-50",
|
|
310
310
|
dark: "text-gray-300 border-gray-600 hover:bg-gray-800"
|
|
311
311
|
},
|
|
312
|
-
[
|
|
312
|
+
[z.WHITE]: {
|
|
313
313
|
light: "text-gray-700 border-gray-300 hover:bg-gray-50",
|
|
314
314
|
dark: "text-gray-300 border-gray-600 hover:bg-gray-800"
|
|
315
315
|
}
|
|
316
|
-
}, r = e[n.color] ?? e[
|
|
316
|
+
}, r = e[n.color] ?? e[z.BLUE], i = t.value ? r.dark : r.light;
|
|
317
317
|
return n.isDisable || n.isLoading ? `border bg-transparent ${i} opacity-50 cursor-not-allowed` : `focus:outline-none border bg-transparent ${i}`;
|
|
318
318
|
}
|
|
319
319
|
function c() {
|
|
320
320
|
let e = {
|
|
321
|
-
[
|
|
321
|
+
[z.BLUE]: {
|
|
322
322
|
light: "text-blue-600 hover:bg-blue-50",
|
|
323
323
|
dark: "text-blue-400 hover:bg-blue-500/10"
|
|
324
324
|
},
|
|
325
|
-
[
|
|
325
|
+
[z.GREEN]: {
|
|
326
326
|
light: "text-green-600 hover:bg-green-50",
|
|
327
327
|
dark: "text-green-400 hover:bg-green-500/10"
|
|
328
328
|
},
|
|
329
|
-
[
|
|
329
|
+
[z.EMERALD]: {
|
|
330
330
|
light: "text-emerald-600 hover:bg-emerald-50",
|
|
331
331
|
dark: "text-emerald-400 hover:bg-emerald-500/10"
|
|
332
332
|
},
|
|
333
|
-
[
|
|
333
|
+
[z.SKY]: {
|
|
334
334
|
light: "text-sky-600 hover:bg-sky-50",
|
|
335
335
|
dark: "text-sky-400 hover:bg-sky-500/10"
|
|
336
336
|
},
|
|
337
|
-
[
|
|
337
|
+
[z.RED]: {
|
|
338
338
|
light: "text-red-500 hover:bg-red-50",
|
|
339
339
|
dark: "text-red-400 hover:bg-red-500/10"
|
|
340
340
|
},
|
|
341
|
-
[
|
|
341
|
+
[z.AMBER]: {
|
|
342
342
|
light: "text-amber-700 hover:bg-amber-50",
|
|
343
343
|
dark: "text-amber-300 hover:bg-amber-500/10"
|
|
344
344
|
},
|
|
345
|
-
[
|
|
345
|
+
[z.YELLOW]: {
|
|
346
346
|
light: "text-yellow-600 hover:bg-yellow-50",
|
|
347
347
|
dark: "text-yellow-400 hover:bg-yellow-500/10"
|
|
348
348
|
},
|
|
349
|
-
[
|
|
349
|
+
[z.PURPLE]: {
|
|
350
350
|
light: "text-purple-600 hover:bg-purple-50",
|
|
351
351
|
dark: "text-purple-400 hover:bg-purple-500/10"
|
|
352
352
|
},
|
|
353
|
-
[
|
|
353
|
+
[z.GRAY]: {
|
|
354
354
|
light: "text-gray-500 hover:bg-gray-100",
|
|
355
355
|
dark: "text-gray-400 hover:bg-gray-800"
|
|
356
356
|
},
|
|
357
|
-
[
|
|
357
|
+
[z.DARK]: {
|
|
358
358
|
light: "text-gray-500 hover:bg-gray-100",
|
|
359
359
|
dark: "text-gray-400 hover:bg-gray-800"
|
|
360
360
|
},
|
|
361
|
-
[
|
|
361
|
+
[z.WHITE]: {
|
|
362
362
|
light: "text-gray-500 hover:bg-gray-100",
|
|
363
363
|
dark: "text-gray-400 hover:bg-gray-800"
|
|
364
364
|
}
|
|
365
|
-
}, r = e[n.color] ?? e[
|
|
365
|
+
}, r = e[n.color] ?? e[z.GRAY], i = t.value ? r.dark : r.light;
|
|
366
366
|
return n.isDisable || n.isLoading ? `bg-transparent ${i} opacity-60 cursor-not-allowed` : `focus:outline-none bg-transparent ${i} cursor-pointer`;
|
|
367
367
|
}
|
|
368
368
|
function l() {
|
|
369
369
|
let e = n.isDisable || n.isLoading, t;
|
|
370
370
|
switch (n.color) {
|
|
371
|
-
case
|
|
371
|
+
case z.BLUE:
|
|
372
372
|
t = 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
373
|
break;
|
|
374
|
-
case
|
|
374
|
+
case z.WHITE:
|
|
375
375
|
t = 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";
|
|
376
376
|
break;
|
|
377
|
-
case
|
|
377
|
+
case z.DARK:
|
|
378
378
|
t = 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";
|
|
379
379
|
break;
|
|
380
|
-
case
|
|
380
|
+
case z.GREEN:
|
|
381
381
|
t = 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";
|
|
382
382
|
break;
|
|
383
|
-
case
|
|
383
|
+
case z.EMERALD:
|
|
384
384
|
t = 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";
|
|
385
385
|
break;
|
|
386
|
-
case
|
|
386
|
+
case z.RED:
|
|
387
387
|
t = 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";
|
|
388
388
|
break;
|
|
389
|
-
case
|
|
389
|
+
case z.YELLOW:
|
|
390
390
|
t = 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";
|
|
391
391
|
break;
|
|
392
|
-
case
|
|
392
|
+
case z.PURPLE:
|
|
393
393
|
t = 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";
|
|
394
394
|
break;
|
|
395
|
-
case
|
|
395
|
+
case z.SKY:
|
|
396
396
|
t = 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";
|
|
397
397
|
break;
|
|
398
|
-
case
|
|
398
|
+
case z.AMBER:
|
|
399
399
|
t = 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";
|
|
400
400
|
break;
|
|
401
|
-
case
|
|
401
|
+
case z.GRAY:
|
|
402
402
|
t = 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";
|
|
403
403
|
break;
|
|
404
404
|
default:
|
|
@@ -408,19 +408,19 @@ var Fe = [
|
|
|
408
408
|
n.outline && (t = r()), n.ghost && (t = c());
|
|
409
409
|
let i = "px-5 py-2.5 mr-2 mb-2 text-sm";
|
|
410
410
|
switch (n.size) {
|
|
411
|
-
case
|
|
411
|
+
case B.EXTRA_SMALL:
|
|
412
412
|
i = "px-3 py-2 text-xs";
|
|
413
413
|
break;
|
|
414
|
-
case
|
|
414
|
+
case B.SMALL:
|
|
415
415
|
i = "px-3 py-2 text-sm";
|
|
416
416
|
break;
|
|
417
|
-
case
|
|
417
|
+
case B.BASE:
|
|
418
418
|
i = "px-5 py-2.5 text-sm";
|
|
419
419
|
break;
|
|
420
|
-
case
|
|
420
|
+
case B.LARGE:
|
|
421
421
|
i = "px-5 py-3 text-base";
|
|
422
422
|
break;
|
|
423
|
-
case
|
|
423
|
+
case B.EXTRA_LARGE:
|
|
424
424
|
i = "px-6 py-3.5 text-base";
|
|
425
425
|
break;
|
|
426
426
|
}
|
|
@@ -440,7 +440,7 @@ var Fe = [
|
|
|
440
440
|
disabled: e.isDisable || e.isLoading,
|
|
441
441
|
onClick: i
|
|
442
442
|
}, [
|
|
443
|
-
e.isLoading ? (y(), o("div",
|
|
443
|
+
e.isLoading ? (y(), o("div", Re, [...r[0] ||= [s("svg", {
|
|
444
444
|
"aria-hidden": "true",
|
|
445
445
|
role: "status",
|
|
446
446
|
class: "inline w-4 h-4 me-3 animate-spin",
|
|
@@ -454,10 +454,10 @@ var Fe = [
|
|
|
454
454
|
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",
|
|
455
455
|
fill: "currentColor"
|
|
456
456
|
})], -1)]])) : a("", !0),
|
|
457
|
-
e.iconLeft ? a("", !0) : (y(), o("span",
|
|
457
|
+
e.iconLeft ? a("", !0) : (y(), o("span", ze, T(e.description), 1)),
|
|
458
458
|
S(t.$slots, "default"),
|
|
459
|
-
e.iconLeft ? (y(), o("span",
|
|
460
|
-
], 10,
|
|
459
|
+
e.iconLeft ? (y(), o("span", Be, T(e.description), 1)) : a("", !0)
|
|
460
|
+
], 10, Le)]),
|
|
461
461
|
_: 3
|
|
462
462
|
}, 8, ["to"])) : (y(), o("button", {
|
|
463
463
|
key: 1,
|
|
@@ -465,7 +465,7 @@ var Fe = [
|
|
|
465
465
|
class: m(l()),
|
|
466
466
|
disabled: e.isDisable || e.isLoading
|
|
467
467
|
}, [
|
|
468
|
-
e.isLoading ? (y(), o("div",
|
|
468
|
+
e.isLoading ? (y(), o("div", He, [...r[1] ||= [s("svg", {
|
|
469
469
|
"aria-hidden": "true",
|
|
470
470
|
role: "status",
|
|
471
471
|
class: "inline w-4 h-4 me-3 animate-spin",
|
|
@@ -479,58 +479,58 @@ var Fe = [
|
|
|
479
479
|
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",
|
|
480
480
|
fill: "currentColor"
|
|
481
481
|
})], -1)]])) : a("", !0),
|
|
482
|
-
e.iconLeft ? a("", !0) : (y(), o("span",
|
|
482
|
+
e.iconLeft ? a("", !0) : (y(), o("span", Ue, T(e.description), 1)),
|
|
483
483
|
S(t.$slots, "default"),
|
|
484
|
-
e.iconLeft ? (y(), o("span",
|
|
485
|
-
], 10,
|
|
484
|
+
e.iconLeft ? (y(), o("span", We, T(e.description), 1)) : a("", !0)
|
|
485
|
+
], 10, Ve));
|
|
486
486
|
};
|
|
487
487
|
}
|
|
488
|
-
}),
|
|
488
|
+
}), W = /* @__PURE__ */ function(e) {
|
|
489
489
|
return e.BASE = "BASE", e.BASE_SHORTER = "BASE_SHORTER", e.SQUARE = "SQUARE", e;
|
|
490
|
-
}({}),
|
|
490
|
+
}({}), Ke = {
|
|
491
491
|
key: 0,
|
|
492
492
|
class: "h-px my-8 bg-gray-200 border-0 dark:bg-gray-700"
|
|
493
|
-
},
|
|
493
|
+
}, qe = {
|
|
494
494
|
key: 1,
|
|
495
495
|
class: "w-48 h-1 mx-auto my-4 bg-gray-100 border-0 rounded md:my-10 dark:bg-gray-700"
|
|
496
|
-
},
|
|
496
|
+
}, Je = {
|
|
497
497
|
key: 2,
|
|
498
498
|
class: "w-8 h-8 mx-auto my-8 bg-gray-200 border-0 rounded md:my-12 dark:bg-gray-700"
|
|
499
|
-
},
|
|
499
|
+
}, Ye = /* @__PURE__ */ d({
|
|
500
500
|
__name: "BaseLine",
|
|
501
501
|
props: { mode: {
|
|
502
502
|
type: String,
|
|
503
503
|
required: !1,
|
|
504
|
-
default:
|
|
504
|
+
default: W.BASE
|
|
505
505
|
} },
|
|
506
506
|
setup(t) {
|
|
507
507
|
return (n, r) => (y(), o(e, null, [
|
|
508
|
-
t.mode === E(
|
|
509
|
-
t.mode === E(
|
|
510
|
-
t.mode === E(
|
|
508
|
+
t.mode === E(W).BASE ? (y(), o("hr", Ke)) : a("", !0),
|
|
509
|
+
t.mode === E(W).BASE_SHORTER ? (y(), o("hr", qe)) : a("", !0),
|
|
510
|
+
t.mode === E(W).SQUARE ? (y(), o("hr", Je)) : a("", !0)
|
|
511
511
|
], 64));
|
|
512
512
|
}
|
|
513
|
-
}),
|
|
513
|
+
}), G = /* @__PURE__ */ function(e) {
|
|
514
514
|
return e.SMALL = "SMALL", e.MEDIUM = "MEDIUM", e.LARGE = "LARGE", e;
|
|
515
|
-
}({}),
|
|
515
|
+
}({}), Xe = G, Ze = ["height", "width"], Qe = /* @__PURE__ */ d({
|
|
516
516
|
__name: "BaseLogo",
|
|
517
517
|
props: { size: {
|
|
518
518
|
type: String,
|
|
519
519
|
required: !1,
|
|
520
|
-
default:
|
|
520
|
+
default: G.MEDIUM
|
|
521
521
|
} },
|
|
522
522
|
setup(e) {
|
|
523
523
|
let t = e;
|
|
524
524
|
function n() {
|
|
525
525
|
let e = "";
|
|
526
526
|
switch (t.size) {
|
|
527
|
-
case
|
|
527
|
+
case G.SMALL:
|
|
528
528
|
e = "50px";
|
|
529
529
|
break;
|
|
530
|
-
case
|
|
530
|
+
case G.MEDIUM:
|
|
531
531
|
e = "100px";
|
|
532
532
|
break;
|
|
533
|
-
case
|
|
533
|
+
case G.LARGE:
|
|
534
534
|
e = "150px";
|
|
535
535
|
break;
|
|
536
536
|
}
|
|
@@ -692,23 +692,23 @@ var Fe = [
|
|
|
692
692
|
d: "m281.7 183.8h3.6v18.5h-3.6z",
|
|
693
693
|
fill: "url(#k)"
|
|
694
694
|
}, null, -1)
|
|
695
|
-
]], 8,
|
|
695
|
+
]], 8, Ze))]),
|
|
696
696
|
_: 1
|
|
697
697
|
});
|
|
698
698
|
};
|
|
699
699
|
}
|
|
700
|
-
}),
|
|
700
|
+
}), $e = /* @__PURE__ */ function(e) {
|
|
701
701
|
return e.DELETE = "DELETE", e.SUCCESS = "SUCCESS", e;
|
|
702
|
-
}({}),
|
|
702
|
+
}({}), et = {
|
|
703
703
|
key: 0,
|
|
704
704
|
class: "p-6 text-center"
|
|
705
|
-
},
|
|
705
|
+
}, tt = { class: "flex justify-center" }, nt = {
|
|
706
706
|
key: 1,
|
|
707
707
|
class: "p-6 text-center"
|
|
708
|
-
},
|
|
708
|
+
}, rt = {
|
|
709
709
|
key: 0,
|
|
710
710
|
class: "mb-5 text-sm text-gray-500"
|
|
711
|
-
},
|
|
711
|
+
}, it = { class: "flex justify-center" }, at = /* @__PURE__ */ d({
|
|
712
712
|
__name: "BaseModal",
|
|
713
713
|
props: {
|
|
714
714
|
title: {
|
|
@@ -727,7 +727,7 @@ var Fe = [
|
|
|
727
727
|
mode: {
|
|
728
728
|
type: String,
|
|
729
729
|
required: !1,
|
|
730
|
-
default:
|
|
730
|
+
default: $e.SUCCESS
|
|
731
731
|
}
|
|
732
732
|
},
|
|
733
733
|
emits: ["closeModal", "confirmModal"],
|
|
@@ -748,37 +748,37 @@ var Fe = [
|
|
|
748
748
|
role: "dialog",
|
|
749
749
|
"aria-modal": "true",
|
|
750
750
|
"aria-labelledby": i
|
|
751
|
-
}, [t.mode === E(
|
|
752
|
-
u(E(
|
|
751
|
+
}, [t.mode === E($e).DELETE ? (y(), o("div", et, [
|
|
752
|
+
u(E(pe), { class: "w-12 h-12 text-gray-400 mx-auto mb-4" }),
|
|
753
753
|
s("h3", {
|
|
754
754
|
id: i,
|
|
755
755
|
class: "mb-5 text-lg font-normal text-gray-500 dark:text-gray-400"
|
|
756
756
|
}, " Are you sure you want to delete this " + T(t.title) + "? ", 1),
|
|
757
|
-
s("div",
|
|
758
|
-
color: E(
|
|
757
|
+
s("div", tt, [u(Ge, {
|
|
758
|
+
color: E(z).RED,
|
|
759
759
|
onClick: r[1] ||= (e) => n.$emit("confirmModal"),
|
|
760
760
|
description: "Yes, I'm sure"
|
|
761
|
-
}, null, 8, ["color"]), u(
|
|
762
|
-
color: E(
|
|
761
|
+
}, null, 8, ["color"]), u(Ge, {
|
|
762
|
+
color: E(z).WHITE,
|
|
763
763
|
onClick: r[2] ||= (e) => n.$emit("closeModal"),
|
|
764
764
|
description: "No, cancel"
|
|
765
765
|
}, null, 8, ["color"])])
|
|
766
|
-
])) : (y(), o("div",
|
|
766
|
+
])) : (y(), o("div", nt, [
|
|
767
767
|
u(E(ae), { class: "w-12 h-12 text-green-500 mx-auto mb-4" }),
|
|
768
768
|
s("h3", {
|
|
769
769
|
id: i,
|
|
770
770
|
class: "mb-2 text-lg font-medium text-gray-900"
|
|
771
771
|
}, T(t.title), 1),
|
|
772
|
-
t.description ? (y(), o("p",
|
|
772
|
+
t.description ? (y(), o("p", rt, T(t.description), 1)) : a("", !0),
|
|
773
773
|
S(n.$slots, "default"),
|
|
774
|
-
s("div",
|
|
775
|
-
color: E(
|
|
774
|
+
s("div", it, [u(Ge, {
|
|
775
|
+
color: E(z).BLUE,
|
|
776
776
|
onClick: r[3] ||= (e) => n.$emit("closeModal"),
|
|
777
777
|
description: "OK"
|
|
778
778
|
}, null, 8, ["color"])])
|
|
779
779
|
]))])], 64));
|
|
780
780
|
}
|
|
781
|
-
}),
|
|
781
|
+
}), ot = /* @__PURE__ */ d({
|
|
782
782
|
__name: "BaseRow",
|
|
783
783
|
props: { bgColor: {
|
|
784
784
|
type: String,
|
|
@@ -792,7 +792,7 @@ var Fe = [
|
|
|
792
792
|
}
|
|
793
793
|
return (e, t) => (y(), o("div", { class: m(n()) }, [S(e.$slots, "default")], 2));
|
|
794
794
|
}
|
|
795
|
-
}),
|
|
795
|
+
}), st = /* @__PURE__ */ d({
|
|
796
796
|
__name: "BaseSpinner",
|
|
797
797
|
props: {
|
|
798
798
|
size: { default: "sm" },
|
|
@@ -820,11 +820,11 @@ var Fe = [
|
|
|
820
820
|
"aria-label": "Loading"
|
|
821
821
|
}, null, 2));
|
|
822
822
|
}
|
|
823
|
-
}),
|
|
823
|
+
}), K = /* @__PURE__ */ function(e) {
|
|
824
824
|
return e.SUCCESS = "SUCCESS", e.WARNING = "WARNING", e.ERROR = "ERROR", e;
|
|
825
|
-
}({}),
|
|
825
|
+
}({}), q = /* @__PURE__ */ function(e) {
|
|
826
826
|
return e.TOP_LEFT = "TOP_LEFT", e.TOP_RIGHT = "TOP_RIGHT", e.BOTTOM_LEFT = "BOTTOM_LEFT", e.BOTTOM_RIGHT = "BOTTOM_RIGHT", e;
|
|
827
|
-
}({}),
|
|
827
|
+
}({}), ct = { 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" }, lt = { class: "ml-3 text-sm font-normal" }, ut = /* @__PURE__ */ d({
|
|
828
828
|
__name: "BaseToast",
|
|
829
829
|
props: {
|
|
830
830
|
mode: {
|
|
@@ -843,7 +843,7 @@ var Fe = [
|
|
|
843
843
|
positioning: {
|
|
844
844
|
type: String,
|
|
845
845
|
required: !1,
|
|
846
|
-
default:
|
|
846
|
+
default: q.TOP_RIGHT
|
|
847
847
|
},
|
|
848
848
|
duration: {
|
|
849
849
|
type: Number,
|
|
@@ -864,13 +864,13 @@ var Fe = [
|
|
|
864
864
|
function c() {
|
|
865
865
|
let e = "";
|
|
866
866
|
switch (t.mode) {
|
|
867
|
-
case
|
|
867
|
+
case K.ERROR:
|
|
868
868
|
e = "text-red-500 bg-red-100 dark:bg-red-800 dark:text-red-200";
|
|
869
869
|
break;
|
|
870
|
-
case
|
|
870
|
+
case K.SUCCESS:
|
|
871
871
|
e = "text-green-500 bg-green-100 dark:bg-green-800 dark:text-green-200";
|
|
872
872
|
break;
|
|
873
|
-
case
|
|
873
|
+
case K.WARNING:
|
|
874
874
|
e = "text-orange-500 bg-orange-100 dark:bg-orange-700 dark:text-orange-200";
|
|
875
875
|
break;
|
|
876
876
|
default:
|
|
@@ -882,16 +882,16 @@ var Fe = [
|
|
|
882
882
|
function l() {
|
|
883
883
|
let e = "top-5 right-5";
|
|
884
884
|
switch (t.positioning) {
|
|
885
|
-
case
|
|
885
|
+
case q.BOTTOM_LEFT:
|
|
886
886
|
e = "bottom-5 left-5";
|
|
887
887
|
break;
|
|
888
|
-
case
|
|
888
|
+
case q.TOP_LEFT:
|
|
889
889
|
e = "top-5 left-5";
|
|
890
890
|
break;
|
|
891
|
-
case
|
|
891
|
+
case q.TOP_RIGHT:
|
|
892
892
|
e = "top-5 right-5";
|
|
893
893
|
break;
|
|
894
|
-
case
|
|
894
|
+
case q.BOTTOM_RIGHT:
|
|
895
895
|
e = "bottom-5 right-5";
|
|
896
896
|
break;
|
|
897
897
|
}
|
|
@@ -902,28 +902,28 @@ var Fe = [
|
|
|
902
902
|
id: "toast-top-right",
|
|
903
903
|
class: m(l()),
|
|
904
904
|
role: "alert"
|
|
905
|
-
}, [s("div",
|
|
906
|
-
e.mode == E(
|
|
905
|
+
}, [s("div", ct, [
|
|
906
|
+
e.mode == E(K).ERROR ? (y(), o("div", {
|
|
907
907
|
key: 0,
|
|
908
908
|
class: m(c())
|
|
909
|
-
}, [u(E(
|
|
909
|
+
}, [u(E(pe), { class: "h-6 w-6 text-red-500" }), r[0] ||= s("span", { class: "sr-only" }, "Error icon", -1)], 2)) : e.mode == E(K).SUCCESS ? (y(), o("div", {
|
|
910
910
|
key: 1,
|
|
911
911
|
class: m(c())
|
|
912
|
-
}, [u(E(ae), { class: "h-6 w-6 text-green-500" }), r[1] ||= s("span", { class: "sr-only" }, "Check icon", -1)], 2)) : e.mode == E(
|
|
912
|
+
}, [u(E(ae), { class: "h-6 w-6 text-green-500" }), r[1] ||= s("span", { class: "sr-only" }, "Check icon", -1)], 2)) : e.mode == E(K).WARNING ? (y(), o("div", {
|
|
913
913
|
key: 2,
|
|
914
914
|
class: m(c())
|
|
915
|
-
}, [u(E(
|
|
916
|
-
s("div",
|
|
915
|
+
}, [u(E(me), { class: "h-6 w-6 text-yellow-500" }), r[2] ||= s("span", { class: "sr-only" }, "Warning icon", -1)], 2)) : a("", !0),
|
|
916
|
+
s("div", lt, T(e.description), 1),
|
|
917
917
|
e.hasCloseIcon ? (y(), o("button", {
|
|
918
918
|
key: 3,
|
|
919
919
|
type: "button",
|
|
920
920
|
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",
|
|
921
921
|
"aria-label": "Close",
|
|
922
922
|
onClick: i
|
|
923
|
-
}, [r[3] ||= s("span", { class: "sr-only" }, "Close", -1), u(E(
|
|
923
|
+
}, [r[3] ||= s("span", { class: "sr-only" }, "Close", -1), u(E(xe), { class: "h-6 w-6 text-gray-500" })])) : a("", !0)
|
|
924
924
|
])], 2)) : a("", !0);
|
|
925
925
|
}
|
|
926
|
-
}),
|
|
926
|
+
}), dt = { class: "w-13" }, ft = /* @__PURE__ */ d({
|
|
927
927
|
__name: "ColoredSquares",
|
|
928
928
|
props: { color: {
|
|
929
929
|
type: String,
|
|
@@ -944,25 +944,25 @@ var Fe = [
|
|
|
944
944
|
function i() {
|
|
945
945
|
let e = "gray";
|
|
946
946
|
switch (t.color) {
|
|
947
|
-
case
|
|
947
|
+
case L.GREEN:
|
|
948
948
|
e = "green";
|
|
949
949
|
break;
|
|
950
|
-
case
|
|
950
|
+
case L.RED:
|
|
951
951
|
e = "red";
|
|
952
952
|
break;
|
|
953
|
-
case
|
|
953
|
+
case L.BLUE:
|
|
954
954
|
e = "blue";
|
|
955
955
|
break;
|
|
956
|
-
case
|
|
956
|
+
case L.YELLOW:
|
|
957
957
|
e = "yellow";
|
|
958
958
|
break;
|
|
959
|
-
case
|
|
959
|
+
case L.NONE: return "font-bold text-xs mr-2 px-2.5 py-0.5 rounded-full";
|
|
960
960
|
}
|
|
961
961
|
return "font-bold text-xs mr-2 px-2.5 py-0.5 rounded-full bg-" + e + "-100 text-" + e + "-800";
|
|
962
962
|
}
|
|
963
|
-
return (e, t) => (y(), o("div",
|
|
963
|
+
return (e, t) => (y(), o("div", dt, [s("div", { class: m(["border border-gray-300 relative aspect-square rounded-lg bg-white shadow-sm overflow-hidden flex items-center justify-center text-center", i()]) }, [S(e.$slots, "default"), s("div", { class: m(["absolute bottom-0 left-0 h-1 w-full", r.value]) }, null, 2)], 2)]));
|
|
964
964
|
}
|
|
965
|
-
}),
|
|
965
|
+
}), pt = { class: "flex items-start justify-between" }, mt = { class: "min-w-0" }, ht = /* @__PURE__ */ d({
|
|
966
966
|
__name: "EarningsCard",
|
|
967
967
|
props: {
|
|
968
968
|
title: { default: "TOTAL EARNINGS" },
|
|
@@ -975,6 +975,10 @@ var Fe = [
|
|
|
975
975
|
signed: {
|
|
976
976
|
type: Boolean,
|
|
977
977
|
default: !1
|
|
978
|
+
},
|
|
979
|
+
compact: {
|
|
980
|
+
type: Boolean,
|
|
981
|
+
default: !1
|
|
978
982
|
}
|
|
979
983
|
},
|
|
980
984
|
setup(t) {
|
|
@@ -1010,15 +1014,15 @@ var Fe = [
|
|
|
1010
1014
|
minimumFractionDigits: n.decimals,
|
|
1011
1015
|
maximumFractionDigits: n.decimals
|
|
1012
1016
|
}));
|
|
1013
|
-
return (n, r) => (y(), o("div", { class: m(["relative rounded-xl border-2 border-dashed bg-white
|
|
1017
|
+
return (n, r) => (y(), o("div", { class: m(["relative rounded-xl border-2 border-dashed bg-white dark:bg-slate-800", [d.value.border, t.compact ? "p-3" : "p-6"]]) }, [t.badge ? (y(), o("div", {
|
|
1014
1018
|
key: 0,
|
|
1015
1019
|
class: m(["absolute right-4 top-4 rounded-md px-3 py-1 text-xs font-bold tracking-wide", d.value.badge])
|
|
1016
|
-
}, T(t.badge), 3)) : a("", !0), s("div",
|
|
1017
|
-
s("p",
|
|
1018
|
-
s("p", { class: m(["mt-1
|
|
1019
|
-
s("p", { class: m(["mt-1
|
|
1020
|
-
]), s("div", { class: m(["
|
|
1021
|
-
class: m(["h-6 w-6"
|
|
1020
|
+
}, T(t.badge), 3)) : a("", !0), s("div", pt, [s("div", mt, [
|
|
1021
|
+
s("p", { class: m(["font-bold tracking-wide text-gray-800 dark:text-slate-200", t.compact ? "pr-8 text-xs" : "text-sm"]) }, T(t.title), 3),
|
|
1022
|
+
s("p", { class: m(["mt-1 font-bold truncate", [d.value.amount, t.compact ? "text-lg" : "text-4xl"]]) }, T(f.value), 3),
|
|
1023
|
+
s("p", { class: m(["mt-1 font-medium", [d.value.subtitle, t.compact ? "text-xs" : "text-sm"]]) }, T(t.subtitle), 3)
|
|
1024
|
+
]), s("div", { class: m(["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"]]) }, [(y(), o("svg", {
|
|
1025
|
+
class: m([d.value.icon, t.compact ? "h-3.5 w-3.5" : "h-6 w-6"]),
|
|
1022
1026
|
viewBox: "0 0 24 24",
|
|
1023
1027
|
fill: "none",
|
|
1024
1028
|
stroke: "currentColor",
|
|
@@ -1027,10 +1031,10 @@ var Fe = [
|
|
|
1027
1031
|
"stroke-linejoin": "round"
|
|
1028
1032
|
}, [l.value ? (y(), o(e, { key: 0 }, [r[0] ||= s("polyline", { points: "22 17 13.5 8.5 8.5 13.5 2 7" }, null, -1), r[1] ||= s("polyline", { points: "16 17 22 17 22 11" }, null, -1)], 64)) : (y(), o(e, { key: 1 }, [r[2] ||= s("polyline", { points: "22 7 13.5 15.5 8.5 10.5 2 17" }, null, -1), r[3] ||= s("polyline", { points: "16 7 22 7 22 13" }, null, -1)], 64))], 2))], 2)])], 2));
|
|
1029
1033
|
}
|
|
1030
|
-
}),
|
|
1034
|
+
}), gt = {
|
|
1031
1035
|
key: 0,
|
|
1032
1036
|
class: "font-bold text-green-800"
|
|
1033
|
-
},
|
|
1037
|
+
}, _t = { key: 0 }, vt = { key: 0 }, yt = "font-bold", bt = /* @__PURE__ */ d({
|
|
1034
1038
|
__name: "EuroAmount",
|
|
1035
1039
|
props: {
|
|
1036
1040
|
amount: {
|
|
@@ -1050,15 +1054,15 @@ var Fe = [
|
|
|
1050
1054
|
},
|
|
1051
1055
|
setup(t) {
|
|
1052
1056
|
let n = t, i = r(() => n.amount !== null && n.amount !== void 0), s = r(() => i.value && n.amount < 0), c = r(() => n.beforeAmount === null || n.beforeAmount === void 0 ? !1 : n.amount < n.beforeAmount), u = r(() => s.value || c.value), d = r(() => !s.value && !c.value && !(n.beforeAmount === null || n.beforeAmount === void 0));
|
|
1053
|
-
return (n, r) => (y(), o(e, null, [i.value && d.value ? (y(), o("span",
|
|
1057
|
+
return (n, r) => (y(), o(e, null, [i.value && d.value ? (y(), o("span", gt, [l(T(t.amount) + " ", 1), t.showCurrency ? (y(), o("span", _t, "€")) : a("", !0)])) : a("", !0), i.value && !d.value ? (y(), o("span", {
|
|
1054
1058
|
key: 1,
|
|
1055
|
-
class: m([
|
|
1056
|
-
}, [l(T(t.amount) + " ", 1), t.showCurrency ? (y(), o("span",
|
|
1059
|
+
class: m([yt, u.value ? "text-red-800" : "text-gray-800"])
|
|
1060
|
+
}, [l(T(t.amount) + " ", 1), t.showCurrency ? (y(), o("span", vt, "€")) : a("", !0)], 2)) : a("", !0)], 64));
|
|
1057
1061
|
}
|
|
1058
|
-
}),
|
|
1062
|
+
}), xt = { class: "flex list-none p-0 m-0" }, St = ["onClick", "onKeydown"], Ct = {
|
|
1059
1063
|
key: 1,
|
|
1060
1064
|
class: "inline-block border border-gray-300 rounded-lg p-3 text-black cursor-not-allowed"
|
|
1061
|
-
},
|
|
1065
|
+
}, wt = /* @__PURE__ */ d({
|
|
1062
1066
|
__name: "Pagination",
|
|
1063
1067
|
props: {
|
|
1064
1068
|
totalItems: {
|
|
@@ -1088,28 +1092,28 @@ var Fe = [
|
|
|
1088
1092
|
}
|
|
1089
1093
|
return j(() => [r.totalItems, r.itemsPerPage], () => {
|
|
1090
1094
|
a.value = Math.ceil(r.totalItems / r.itemsPerPage), i.value > a.value && (i.value = Math.max(1, a.value)), u(i.value);
|
|
1091
|
-
}, { immediate: !0 }), (t, n) => (y(), o("div", null, [s("ul",
|
|
1095
|
+
}, { immediate: !0 }), (t, n) => (y(), o("div", null, [s("ul", xt, [(y(!0), o(e, null, x(c.value, (e, t) => (y(), o("li", {
|
|
1092
1096
|
key: t,
|
|
1093
1097
|
class: "mr-1"
|
|
1094
|
-
}, [e === 0 ? (y(), o("span",
|
|
1098
|
+
}, [e === 0 ? (y(), o("span", Ct, "...")) : (y(), o("a", {
|
|
1095
1099
|
key: 0,
|
|
1096
1100
|
role: "button",
|
|
1097
1101
|
tabindex: "0",
|
|
1098
1102
|
onClick: (t) => d(e),
|
|
1099
1103
|
onKeydown: P((t) => d(e), ["enter"]),
|
|
1100
1104
|
class: m(["inline-block border border-gray-300 rounded-lg p-3 no-underline text-black cursor-pointer hover:bg-gray-300", { "active font-bold bg-gray-200": e === i.value }])
|
|
1101
|
-
}, T(e), 43,
|
|
1105
|
+
}, T(e), 43, St))]))), 128))])]));
|
|
1102
1106
|
}
|
|
1103
|
-
}),
|
|
1107
|
+
}), Tt = { key: 0 }, Et = {
|
|
1104
1108
|
key: 0,
|
|
1105
1109
|
class: "flex items-center space-x-2"
|
|
1106
|
-
},
|
|
1110
|
+
}, Dt = {
|
|
1107
1111
|
key: 1,
|
|
1108
1112
|
class: "flex items-center space-x-2"
|
|
1109
|
-
},
|
|
1113
|
+
}, Ot = {
|
|
1110
1114
|
key: 2,
|
|
1111
1115
|
class: "flex items-center space-x-2"
|
|
1112
|
-
},
|
|
1116
|
+
}, kt = /* @__PURE__ */ d({
|
|
1113
1117
|
__name: "TrendArrow",
|
|
1114
1118
|
props: {
|
|
1115
1119
|
number: {
|
|
@@ -1123,13 +1127,13 @@ var Fe = [
|
|
|
1123
1127
|
},
|
|
1124
1128
|
setup(e) {
|
|
1125
1129
|
let t = e, n = r(() => t.number !== null && t.number !== void 0 && t.number < 0), i = r(() => t.number === 0);
|
|
1126
|
-
return (r, s) => e.number !== null && e.number !== void 0 ? (y(), o("div",
|
|
1130
|
+
return (r, s) => e.number !== null && e.number !== void 0 ? (y(), o("div", Tt, [n.value ? (y(), o("span", Et, [u(R, { color: E(L).RED }, {
|
|
1127
1131
|
default: M(() => [l(T(e.number) + T(t.icon), 1)]),
|
|
1128
1132
|
_: 1
|
|
1129
|
-
}, 8, ["color"]), u(E(te), { class: "h-5 w-5 text-red-500" })])) : i.value ? (y(), o("span",
|
|
1133
|
+
}, 8, ["color"]), u(E(te), { class: "h-5 w-5 text-red-500" })])) : i.value ? (y(), o("span", Dt, [u(R, { color: E(L).GRAY }, {
|
|
1130
1134
|
default: M(() => [l(T(e.number) + T(t.icon), 1)]),
|
|
1131
1135
|
_: 1
|
|
1132
|
-
}, 8, ["color"]), u(E(
|
|
1136
|
+
}, 8, ["color"]), u(E(ve), { class: "h-5 w-5 text-gray-400" })])) : (y(), o("span", Ot, [u(R, { color: E(L).GREEN }, {
|
|
1133
1137
|
default: M(() => [l(T(e.number) + T(t.icon), 1)]),
|
|
1134
1138
|
_: 1
|
|
1135
1139
|
}, 8, ["color"]), u(E(ne), { class: "h-5 w-5 text-green-500" })]))])) : a("", !0);
|
|
@@ -1137,8 +1141,8 @@ var Fe = [
|
|
|
1137
1141
|
});
|
|
1138
1142
|
//#endregion
|
|
1139
1143
|
//#region src/composables/useThemeClasses.ts
|
|
1140
|
-
function
|
|
1141
|
-
let { isDark: e } =
|
|
1144
|
+
function J() {
|
|
1145
|
+
let { isDark: e } = U();
|
|
1142
1146
|
return {
|
|
1143
1147
|
card: r(() => e.value ? "bg-gray-800 border-gray-700" : "bg-white border-gray-200"),
|
|
1144
1148
|
cardAlt: r(() => e.value ? "bg-gray-900 border-gray-700" : "bg-white border-gray-200"),
|
|
@@ -1165,7 +1169,7 @@ function Y() {
|
|
|
1165
1169
|
}
|
|
1166
1170
|
//#endregion
|
|
1167
1171
|
//#region src/composables/useEscapeKey.ts
|
|
1168
|
-
function
|
|
1172
|
+
function Y(e) {
|
|
1169
1173
|
function t(t) {
|
|
1170
1174
|
t.key === "Escape" && e();
|
|
1171
1175
|
}
|
|
@@ -1173,7 +1177,7 @@ function Ot(e) {
|
|
|
1173
1177
|
}
|
|
1174
1178
|
//#endregion
|
|
1175
1179
|
//#region src/components/BaseModalShell.vue?vue&type=script&setup=true&lang.ts
|
|
1176
|
-
var
|
|
1180
|
+
var At = { class: "flex items-start gap-4 min-w-0" }, jt = { class: "flex-1 min-w-0" }, Mt = { class: "p-6 overflow-y-auto flex-1" }, Nt = { class: "p-6" }, Pt = { class: "flex items-start gap-4" }, Ft = { class: "flex-1" }, It = { class: "mt-4" }, Lt = { class: "mt-6 flex gap-3 justify-end" }, Rt = /* @__PURE__ */ d({
|
|
1177
1181
|
__name: "BaseModalShell",
|
|
1178
1182
|
props: {
|
|
1179
1183
|
title: {},
|
|
@@ -1190,11 +1194,11 @@ var kt = { class: "flex items-start gap-4 min-w-0" }, At = { class: "flex-1 min-
|
|
|
1190
1194
|
},
|
|
1191
1195
|
emits: ["cancel", "backdrop"],
|
|
1192
1196
|
setup(e, { emit: n }) {
|
|
1193
|
-
let c = e, l = n, { isDark: u } =
|
|
1197
|
+
let c = e, l = n, { isDark: u } = U(), d = J(), f = `modal-title-${Math.random().toString(36).slice(2, 9)}`, p = r(() => u.value ? "bg-gray-900 border border-gray-700" : "bg-white border border-gray-200");
|
|
1194
1198
|
function h() {
|
|
1195
1199
|
l("backdrop"), c.manualClose || l("cancel");
|
|
1196
1200
|
}
|
|
1197
|
-
return
|
|
1201
|
+
return Y(() => {
|
|
1198
1202
|
c.manualClose || l("cancel");
|
|
1199
1203
|
}), (n, r) => (y(), i(t, { to: "body" }, [s("div", {
|
|
1200
1204
|
class: "fixed inset-0 z-50 flex items-center justify-center bg-black/50",
|
|
@@ -1207,14 +1211,14 @@ var kt = { class: "flex items-start gap-4 min-w-0" }, At = { class: "flex-1 min-
|
|
|
1207
1211
|
class: m(["relative w-full mx-4 rounded-lg shadow-xl max-h-[90vh] flex flex-col", [e.maxWidthClass, p.value]]),
|
|
1208
1212
|
onClick: r[0] ||= F(() => {}, ["stop"])
|
|
1209
1213
|
}, [
|
|
1210
|
-
s("div", { class: m(["flex items-start justify-between gap-4 p-6 border-b shrink-0", E(d).border]) }, [s("div",
|
|
1214
|
+
s("div", { class: m(["flex items-start justify-between gap-4 p-6 border-b shrink-0", E(d).border]) }, [s("div", At, [S(n.$slots, "icon"), s("div", jt, [s("h3", {
|
|
1211
1215
|
id: f,
|
|
1212
1216
|
class: m(["text-lg font-medium", E(d).primaryText])
|
|
1213
1217
|
}, T(e.title), 3), e.subtitle ? (y(), o("p", {
|
|
1214
1218
|
key: 0,
|
|
1215
1219
|
class: m(["text-sm mt-1 break-all", E(d).mutedText])
|
|
1216
1220
|
}, T(e.subtitle), 3)) : a("", !0)])]), S(n.$slots, "header-actions")], 2),
|
|
1217
|
-
s("div",
|
|
1221
|
+
s("div", Mt, [S(n.$slots, "default")]),
|
|
1218
1222
|
n.$slots.footer ? (y(), o("div", {
|
|
1219
1223
|
key: 0,
|
|
1220
1224
|
class: m(["flex gap-3 justify-end p-6 border-t shrink-0", E(d).border])
|
|
@@ -1223,16 +1227,16 @@ var kt = { class: "flex items-start gap-4 min-w-0" }, At = { class: "flex-1 min-
|
|
|
1223
1227
|
key: 1,
|
|
1224
1228
|
class: m(["relative w-full mx-4 rounded-lg shadow-xl", [e.maxWidthClass, p.value]]),
|
|
1225
1229
|
onClick: r[1] ||= F(() => {}, ["stop"])
|
|
1226
|
-
}, [s("div",
|
|
1227
|
-
s("div",
|
|
1230
|
+
}, [s("div", Nt, [
|
|
1231
|
+
s("div", Pt, [S(n.$slots, "icon"), s("div", Ft, [s("h3", {
|
|
1228
1232
|
id: f,
|
|
1229
1233
|
class: m(["text-lg font-medium", E(d).primaryText])
|
|
1230
1234
|
}, T(e.title), 3)])]),
|
|
1231
|
-
s("div",
|
|
1232
|
-
s("div",
|
|
1235
|
+
s("div", It, [S(n.$slots, "default")]),
|
|
1236
|
+
s("div", Lt, [S(n.$slots, "footer")])
|
|
1233
1237
|
])], 2))])]));
|
|
1234
1238
|
}
|
|
1235
|
-
}),
|
|
1239
|
+
}), zt = ["aria-expanded"], Bt = { class: "flex items-center gap-3" }, Vt = /* @__PURE__ */ d({
|
|
1236
1240
|
__name: "BaseCollapsibleSection",
|
|
1237
1241
|
props: {
|
|
1238
1242
|
title: {},
|
|
@@ -1242,13 +1246,13 @@ var kt = { class: "flex items-start gap-4 min-w-0" }, At = { class: "flex-1 min-
|
|
|
1242
1246
|
},
|
|
1243
1247
|
emits: ["toggle"],
|
|
1244
1248
|
setup(e, { emit: t }) {
|
|
1245
|
-
let n = e, i = t, { isDark: c } =
|
|
1249
|
+
let n = e, i = t, { isDark: c } = U(), l = J(), u = r(() => c.value ? "text-gray-100" : "text-gray-700"), d = r(() => c.value ? "bg-gray-800/50 hover:bg-gray-800 border-gray-700" : "bg-gray-50 hover:bg-gray-100 border-gray-200"), f = r(() => c.value ? "bg-emerald-500/15 text-emerald-400" : "bg-emerald-50 text-emerald-700"), p = r(() => n.bodyClass === void 0 ? c.value ? "bg-gray-800" : "bg-white" : n.bodyClass);
|
|
1246
1250
|
return (t, n) => (y(), o("section", { class: m(["rounded-xl border overflow-hidden transition-colors", E(l).cardAlt]) }, [s("button", {
|
|
1247
1251
|
type: "button",
|
|
1248
1252
|
class: m(["w-full flex items-center justify-between p-4 text-left transition-colors", d.value]),
|
|
1249
1253
|
"aria-expanded": !e.collapsed,
|
|
1250
1254
|
onClick: n[0] ||= (e) => i("toggle")
|
|
1251
|
-
}, [s("div",
|
|
1255
|
+
}, [s("div", Bt, [s("h2", { class: m(["text-base font-semibold", u.value]) }, T(e.title), 3), e.badge ? (y(), o("span", {
|
|
1252
1256
|
key: 0,
|
|
1253
1257
|
class: m(["text-xs px-2 py-0.5 rounded-full", f.value])
|
|
1254
1258
|
}, T(e.badge), 3)) : a("", !0)]), (y(), o("svg", {
|
|
@@ -1262,15 +1266,15 @@ var kt = { class: "flex items-start gap-4 min-w-0" }, At = { class: "flex-1 min-
|
|
|
1262
1266
|
"stroke-linecap": "round",
|
|
1263
1267
|
"stroke-linejoin": "round",
|
|
1264
1268
|
d: "M19 9l-7 7-7-7"
|
|
1265
|
-
}, null, -1)]], 2))], 10,
|
|
1269
|
+
}, null, -1)]], 2))], 10, zt), N(s("div", { class: m(["p-6 border-t", [E(l).border, p.value]]) }, [S(t.$slots, "default")], 2), [[ee, !e.collapsed]])], 2));
|
|
1266
1270
|
}
|
|
1267
|
-
}),
|
|
1271
|
+
}), Ht = ["disabled"], Ut = ["disabled"], Wt = {
|
|
1268
1272
|
key: 0,
|
|
1269
1273
|
class: "w-4 h-4 animate-spin",
|
|
1270
1274
|
fill: "none",
|
|
1271
1275
|
viewBox: "0 0 24 24",
|
|
1272
1276
|
"aria-hidden": "true"
|
|
1273
|
-
},
|
|
1277
|
+
}, Gt = /* @__PURE__ */ d({
|
|
1274
1278
|
__name: "BaseConfirmModal",
|
|
1275
1279
|
props: {
|
|
1276
1280
|
title: {},
|
|
@@ -1286,19 +1290,19 @@ var kt = { class: "flex items-start gap-4 min-w-0" }, At = { class: "flex-1 min-
|
|
|
1286
1290
|
},
|
|
1287
1291
|
emits: ["confirm", "cancel"],
|
|
1288
1292
|
setup(e, { emit: t }) {
|
|
1289
|
-
let n = e, r = t, { isDark: c } =
|
|
1293
|
+
let n = e, r = t, { isDark: c } = U(), d = J();
|
|
1290
1294
|
function f() {
|
|
1291
1295
|
n.submitting || r("confirm");
|
|
1292
1296
|
}
|
|
1293
1297
|
function p() {
|
|
1294
1298
|
n.submitting || r("cancel");
|
|
1295
1299
|
}
|
|
1296
|
-
return (t, n) => (y(), i(
|
|
1300
|
+
return (t, n) => (y(), i(Rt, {
|
|
1297
1301
|
title: e.title,
|
|
1298
1302
|
"manual-close": e.submitting,
|
|
1299
1303
|
onCancel: p
|
|
1300
1304
|
}, {
|
|
1301
|
-
icon: M(() => [s("div", { class: m(["flex-shrink-0 flex h-12 w-12 items-center justify-center rounded-full", [e.variant === "danger" ? E(c) ? "bg-red-900/30" : "bg-red-50" : E(c) ? "bg-amber-900/30" : "bg-amber-50"]]) }, [u(E(
|
|
1305
|
+
icon: M(() => [s("div", { class: m(["flex-shrink-0 flex h-12 w-12 items-center justify-center rounded-full", [e.variant === "danger" ? E(c) ? "bg-red-900/30" : "bg-red-50" : E(c) ? "bg-amber-900/30" : "bg-amber-50"]]) }, [u(E(me), {
|
|
1302
1306
|
class: m(["h-6 w-6", e.variant === "danger" ? "text-red-600" : "text-amber-600"]),
|
|
1303
1307
|
"aria-hidden": "true"
|
|
1304
1308
|
}, null, 8, ["class"])], 2)]),
|
|
@@ -1307,12 +1311,12 @@ var kt = { class: "flex items-start gap-4 min-w-0" }, At = { class: "flex-1 min-
|
|
|
1307
1311
|
disabled: e.submitting,
|
|
1308
1312
|
class: m(["inline-flex items-center justify-center px-4 py-2 border rounded-md shadow-sm text-sm font-medium transition-colors duration-150", [E(d).ghostButton, e.submitting ? "opacity-60 cursor-not-allowed" : "cursor-pointer"]]),
|
|
1309
1313
|
onClick: p
|
|
1310
|
-
}, T(e.cancelText), 11,
|
|
1314
|
+
}, T(e.cancelText), 11, Ht), s("button", {
|
|
1311
1315
|
type: "button",
|
|
1312
1316
|
disabled: e.submitting,
|
|
1313
1317
|
class: m(["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", [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"]]),
|
|
1314
1318
|
onClick: f
|
|
1315
|
-
}, [e.submitting ? (y(), o("svg",
|
|
1319
|
+
}, [e.submitting ? (y(), o("svg", Wt, [...n[0] ||= [s("circle", {
|
|
1316
1320
|
class: "opacity-25",
|
|
1317
1321
|
cx: "12",
|
|
1318
1322
|
cy: "12",
|
|
@@ -1323,12 +1327,12 @@ var kt = { class: "flex items-start gap-4 min-w-0" }, At = { class: "flex-1 min-
|
|
|
1323
1327
|
class: "opacity-75",
|
|
1324
1328
|
fill: "currentColor",
|
|
1325
1329
|
d: "M4 12a8 8 0 018-8v4a4 4 0 00-4 4H4z"
|
|
1326
|
-
}, null, -1)]])) : a("", !0), l(" " + T(e.submitting ? e.submittingText : e.confirmText), 1)], 10,
|
|
1330
|
+
}, null, -1)]])) : a("", !0), l(" " + T(e.submitting ? e.submittingText : e.confirmText), 1)], 10, Ut)]),
|
|
1327
1331
|
default: M(() => [S(t.$slots, "message", {}, () => [s("p", { class: m(["text-sm", E(c) ? "text-gray-300" : "text-gray-600"]) }, T(e.message), 3)]), S(t.$slots, "default")]),
|
|
1328
1332
|
_: 3
|
|
1329
1333
|
}, 8, ["title", "manual-close"]));
|
|
1330
1334
|
}
|
|
1331
|
-
}),
|
|
1335
|
+
}), Kt = { class: "mt-4" }, qt = ["placeholder"], Jt = ["disabled"], Yt = /* @__PURE__ */ d({
|
|
1332
1336
|
__name: "BaseTextInputModal",
|
|
1333
1337
|
props: {
|
|
1334
1338
|
title: {},
|
|
@@ -1346,7 +1350,7 @@ var kt = { class: "flex items-start gap-4 min-w-0" }, At = { class: "flex-1 min-
|
|
|
1346
1350
|
},
|
|
1347
1351
|
emits: ["confirm", "cancel"],
|
|
1348
1352
|
setup(e, { emit: t }) {
|
|
1349
|
-
let n = e, r = t, { isDark: a } =
|
|
1353
|
+
let n = e, r = t, { isDark: a } = U(), o = J(), c = b(n.initialValue), l = b(null);
|
|
1350
1354
|
g(async () => {
|
|
1351
1355
|
await p(), l.value?.focus();
|
|
1352
1356
|
});
|
|
@@ -1359,12 +1363,12 @@ var kt = { class: "flex items-start gap-4 min-w-0" }, At = { class: "flex-1 min-
|
|
|
1359
1363
|
function h() {
|
|
1360
1364
|
c.value.trim() === (n.initialValue ?? "").trim() && f();
|
|
1361
1365
|
}
|
|
1362
|
-
return
|
|
1366
|
+
return Y(f), (t, n) => (y(), i(Rt, {
|
|
1363
1367
|
title: e.title,
|
|
1364
1368
|
"manual-close": "",
|
|
1365
1369
|
onBackdrop: h
|
|
1366
1370
|
}, {
|
|
1367
|
-
icon: M(() => [S(t.$slots, "icon", {}, () => [s("div", { class: m(["flex-shrink-0 flex h-12 w-12 items-center justify-center rounded-full", E(a) ? "bg-emerald-900/30" : "bg-emerald-50"]) }, [u(E(
|
|
1371
|
+
icon: M(() => [S(t.$slots, "icon", {}, () => [s("div", { class: m(["flex-shrink-0 flex h-12 w-12 items-center justify-center rounded-full", E(a) ? "bg-emerald-900/30" : "bg-emerald-50"]) }, [u(E(fe), {
|
|
1368
1372
|
class: "h-6 w-6 text-emerald-600",
|
|
1369
1373
|
"aria-hidden": "true"
|
|
1370
1374
|
})], 2)])]),
|
|
@@ -1377,8 +1381,8 @@ var kt = { class: "flex items-start gap-4 min-w-0" }, At = { class: "flex-1 min-
|
|
|
1377
1381
|
disabled: !c.value.trim() || e.submitting,
|
|
1378
1382
|
class: m(["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", [!c.value.trim() || e.submitting ? "bg-emerald-400 cursor-not-allowed" : "bg-emerald-600 hover:bg-emerald-700 cursor-pointer"]]),
|
|
1379
1383
|
onClick: d
|
|
1380
|
-
}, T(e.submitting ? e.submittingText : e.confirmText), 11,
|
|
1381
|
-
default: M(() => [s("p", { class: m(["text-sm", E(a) ? "text-gray-300" : "text-gray-600"]) }, T(e.message), 3), s("div",
|
|
1384
|
+
}, T(e.submitting ? e.submittingText : e.confirmText), 11, Jt)]),
|
|
1385
|
+
default: M(() => [s("p", { class: m(["text-sm", E(a) ? "text-gray-300" : "text-gray-600"]) }, T(e.message), 3), s("div", Kt, [s("label", { class: m(["block text-sm font-medium mb-1", E(o).label]) }, T(e.inputLabel), 3), N(s("input", {
|
|
1382
1386
|
ref_key: "nameInput",
|
|
1383
1387
|
ref: l,
|
|
1384
1388
|
"onUpdate:modelValue": n[0] ||= (e) => c.value = e,
|
|
@@ -1386,11 +1390,11 @@ var kt = { class: "flex items-start gap-4 min-w-0" }, At = { class: "flex-1 min-
|
|
|
1386
1390
|
placeholder: e.placeholder,
|
|
1387
1391
|
class: m(["w-full px-3 py-2 rounded-md border text-sm transition-colors", E(a) ? "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"]),
|
|
1388
1392
|
onKeyup: P(d, ["enter"])
|
|
1389
|
-
}, null, 42,
|
|
1393
|
+
}, null, 42, qt), [[A, c.value]])])]),
|
|
1390
1394
|
_: 3
|
|
1391
1395
|
}, 8, ["title"]));
|
|
1392
1396
|
}
|
|
1393
|
-
}),
|
|
1397
|
+
}), Xt = { class: "flex items-center justify-center min-h-[60vh]" }, Zt = { class: "text-center px-6" }, Qt = /* @__PURE__ */ d({
|
|
1394
1398
|
__name: "BaseNotFoundPage",
|
|
1395
1399
|
props: {
|
|
1396
1400
|
code: { default: "404" },
|
|
@@ -1399,12 +1403,12 @@ var kt = { class: "flex items-start gap-4 min-w-0" }, At = { class: "flex-1 min-
|
|
|
1399
1403
|
homeLabel: { default: "Go home" }
|
|
1400
1404
|
},
|
|
1401
1405
|
setup(e) {
|
|
1402
|
-
let t = e, n =
|
|
1406
|
+
let t = e, n = we(), { isDark: r } = U(), i = J();
|
|
1403
1407
|
function a() {
|
|
1404
1408
|
n.push({ name: t.homeRouteName });
|
|
1405
1409
|
}
|
|
1406
|
-
return (t, n) => (y(), o("div",
|
|
1407
|
-
u(E(
|
|
1410
|
+
return (t, n) => (y(), o("div", Xt, [s("div", Zt, [
|
|
1411
|
+
u(E(me), { class: m(["w-16 h-16 mx-auto mb-4", E(i).illustration]) }, null, 8, ["class"]),
|
|
1408
1412
|
s("h1", { class: m(["text-4xl font-bold mb-2", E(r) ? "text-gray-200" : "text-gray-800"]) }, T(e.code), 3),
|
|
1409
1413
|
s("p", { class: m(["text-lg mb-6", E(i).dimTextAlt]) }, T(e.message), 3),
|
|
1410
1414
|
s("button", {
|
|
@@ -1414,7 +1418,7 @@ var kt = { class: "flex items-start gap-4 min-w-0" }, At = { class: "flex-1 min-
|
|
|
1414
1418
|
])]));
|
|
1415
1419
|
}
|
|
1416
1420
|
}), X = b(!1);
|
|
1417
|
-
function
|
|
1421
|
+
function $t() {
|
|
1418
1422
|
function e() {
|
|
1419
1423
|
X.value = !0;
|
|
1420
1424
|
}
|
|
@@ -1433,19 +1437,19 @@ function Qt() {
|
|
|
1433
1437
|
}
|
|
1434
1438
|
//#endregion
|
|
1435
1439
|
//#region src/composables/useSidebarCollapse.ts
|
|
1436
|
-
var Z = b(!1),
|
|
1437
|
-
function
|
|
1438
|
-
if (
|
|
1439
|
-
let e = window.localStorage?.getItem(
|
|
1440
|
+
var Z = b(!1), en = !1, tn = "mgv-sidebar-collapsed";
|
|
1441
|
+
function nn(e) {
|
|
1442
|
+
if (!en && (en = !0, tn = e, typeof window < "u")) {
|
|
1443
|
+
let e = window.localStorage?.getItem(tn);
|
|
1440
1444
|
e && (Z.value = e === "true"), f(!0).run(() => {
|
|
1441
1445
|
j(Z, (e) => {
|
|
1442
|
-
window.localStorage?.setItem(
|
|
1446
|
+
window.localStorage?.setItem(tn, String(e));
|
|
1443
1447
|
});
|
|
1444
1448
|
});
|
|
1445
1449
|
}
|
|
1446
1450
|
}
|
|
1447
|
-
function
|
|
1448
|
-
|
|
1451
|
+
function rn(e) {
|
|
1452
|
+
nn(e?.storageKey ?? tn);
|
|
1449
1453
|
function t() {
|
|
1450
1454
|
Z.value = !0;
|
|
1451
1455
|
}
|
|
@@ -1464,8 +1468,8 @@ function nn(e) {
|
|
|
1464
1468
|
}
|
|
1465
1469
|
//#endregion
|
|
1466
1470
|
//#region src/composables/useNotifications.ts
|
|
1467
|
-
var Q = b([]), $ = b(!1),
|
|
1468
|
-
function
|
|
1471
|
+
var Q = b([]), $ = b(!1), an = r(() => Q.value.filter((e) => !e.read).length);
|
|
1472
|
+
function on() {
|
|
1469
1473
|
function e() {
|
|
1470
1474
|
$.value = !0;
|
|
1471
1475
|
}
|
|
@@ -1501,7 +1505,7 @@ function an() {
|
|
|
1501
1505
|
}
|
|
1502
1506
|
return {
|
|
1503
1507
|
notifications: Q,
|
|
1504
|
-
unreadCount:
|
|
1508
|
+
unreadCount: an,
|
|
1505
1509
|
open: $,
|
|
1506
1510
|
openPanel: e,
|
|
1507
1511
|
closePanel: t,
|
|
@@ -1516,22 +1520,22 @@ function an() {
|
|
|
1516
1520
|
}
|
|
1517
1521
|
//#endregion
|
|
1518
1522
|
//#region src/components/BaseSidebar.vue?vue&type=script&setup=true&lang.ts
|
|
1519
|
-
var
|
|
1523
|
+
var sn = ["aria-label", "aria-expanded"], cn = { class: "flex flex-col h-full" }, ln = { class: "flex-1 overflow-y-auto px-3 space-y-6" }, un = { class: "space-y-0.5" }, dn = [
|
|
1520
1524
|
"aria-current",
|
|
1521
1525
|
"title",
|
|
1522
1526
|
"onClick"
|
|
1523
|
-
],
|
|
1527
|
+
], fn = ["aria-label"], pn = { class: "relative shrink-0" }, mn = {
|
|
1524
1528
|
key: 0,
|
|
1525
1529
|
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"
|
|
1526
|
-
},
|
|
1530
|
+
}, hn = [
|
|
1527
1531
|
"title",
|
|
1528
1532
|
"aria-label",
|
|
1529
1533
|
"aria-pressed"
|
|
1530
|
-
],
|
|
1534
|
+
], gn = [
|
|
1531
1535
|
"title",
|
|
1532
1536
|
"aria-label",
|
|
1533
1537
|
"aria-pressed"
|
|
1534
|
-
],
|
|
1538
|
+
], _n = /*#__PURE__*/ ((e, t) => {
|
|
1535
1539
|
let n = e.__vccOpts || e;
|
|
1536
1540
|
for (let [e, r] of t) n[e] = r;
|
|
1537
1541
|
return n;
|
|
@@ -1556,7 +1560,7 @@ var on = ["aria-label", "aria-expanded"], sn = { class: "flex flex-col h-full" }
|
|
|
1556
1560
|
}
|
|
1557
1561
|
},
|
|
1558
1562
|
setup(t) {
|
|
1559
|
-
let n = t, c =
|
|
1563
|
+
let n = t, c = we(), d = Ce(), { isDark: f, toggleTheme: h } = U(), { mobileOpen: g, close: _, toggle: v } = $t(), { collapsed: C, toggle: D } = rn(), { unreadCount: O, togglePanel: k } = on(), A = r(() => n.collapsible && C.value), ee = b(null), M = null;
|
|
1560
1564
|
j(g, async (e) => {
|
|
1561
1565
|
e ? (M = document.activeElement instanceof HTMLElement ? document.activeElement : null, await p(), ee.value?.focus()) : (M?.focus(), M = null);
|
|
1562
1566
|
});
|
|
@@ -1581,7 +1585,7 @@ var on = ["aria-label", "aria-expanded"], sn = { class: "flex flex-col h-full" }
|
|
|
1581
1585
|
class: m(["p-2 rounded-lg cursor-pointer", E(f) ? "text-gray-400 hover:bg-gray-800" : "text-gray-600 hover:bg-gray-100"]),
|
|
1582
1586
|
"aria-label": E(g) ? "Close navigation menu" : "Open navigation menu",
|
|
1583
1587
|
"aria-expanded": E(g)
|
|
1584
|
-
}, [E(g) ? (y(), i(E(
|
|
1588
|
+
}, [E(g) ? (y(), i(E(xe), {
|
|
1585
1589
|
key: 1,
|
|
1586
1590
|
class: "w-6 h-6",
|
|
1587
1591
|
"aria-hidden": "true"
|
|
@@ -1589,7 +1593,7 @@ var on = ["aria-label", "aria-expanded"], sn = { class: "flex flex-col h-full" }
|
|
|
1589
1593
|
key: 0,
|
|
1590
1594
|
class: "w-6 h-6",
|
|
1591
1595
|
"aria-hidden": "true"
|
|
1592
|
-
}))], 10,
|
|
1596
|
+
}))], 10, sn)], 2),
|
|
1593
1597
|
E(g) ? (y(), o("div", {
|
|
1594
1598
|
key: 0,
|
|
1595
1599
|
class: "mobile-overlay fixed inset-0 z-40 bg-black/50",
|
|
@@ -1604,7 +1608,7 @@ var on = ["aria-label", "aria-expanded"], sn = { class: "flex flex-col h-full" }
|
|
|
1604
1608
|
E(g) ? "translate-x-0 z-50" : "-translate-x-full max-lg:pointer-events-none lg:translate-x-0 z-50",
|
|
1605
1609
|
t.collapsible && E(C) ? "lg:w-16" : "lg:w-60"
|
|
1606
1610
|
]])
|
|
1607
|
-
}, [s("div",
|
|
1611
|
+
}, [s("div", cn, [
|
|
1608
1612
|
s("div", { class: m(["px-5 pt-5 pb-4 flex items-center justify-center relative", { "lg:px-2": A.value }]) }, [s("button", {
|
|
1609
1613
|
type: "button",
|
|
1610
1614
|
onClick: N,
|
|
@@ -1617,17 +1621,17 @@ var on = ["aria-label", "aria-expanded"], sn = { class: "flex flex-col h-full" }
|
|
|
1617
1621
|
onClick: r[2] ||= (...e) => E(_) && E(_)(...e),
|
|
1618
1622
|
class: m(["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", E(f) ? "text-gray-400 hover:bg-gray-800" : "text-gray-500 hover:bg-gray-100"]),
|
|
1619
1623
|
"aria-label": "Close navigation menu"
|
|
1620
|
-
}, [u(E(
|
|
1624
|
+
}, [u(E(xe), {
|
|
1621
1625
|
class: "w-5 h-5",
|
|
1622
1626
|
"aria-hidden": "true"
|
|
1623
1627
|
})], 2)], 2),
|
|
1624
|
-
s("nav",
|
|
1628
|
+
s("nav", ln, [(y(!0), o(e, null, x(t.sections, (t) => (y(), o("div", { key: t.title }, [s("p", { class: m(["px-2 mb-2 text-[10px] font-semibold uppercase tracking-wider text-gray-500", { "lg:hidden": A.value }]) }, T(t.title), 3), s("ul", un, [(y(!0), o(e, null, x(t.items, (e) => (y(), o("li", { key: e.name }, [s("button", {
|
|
1625
1629
|
type: "button",
|
|
1626
1630
|
"aria-current": P(e.name) ? "page" : void 0,
|
|
1627
1631
|
title: A.value ? e.label : void 0,
|
|
1628
1632
|
onClick: (t) => F(e.name),
|
|
1629
1633
|
class: m(["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", [P(e.name) ? E(f) ? "bg-emerald-500/15 text-emerald-300" : "bg-emerald-50 text-emerald-700" : E(f) ? "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": A.value }]])
|
|
1630
|
-
}, [(y(), i(w(e.icon), { class: "w-[18px] h-[18px] shrink-0" })), s("span", { class: m({ "lg:hidden": A.value }) }, T(e.label), 3)], 10,
|
|
1634
|
+
}, [(y(), i(w(e.icon), { class: "w-[18px] h-[18px] shrink-0" })), s("span", { class: m({ "lg:hidden": A.value }) }, T(e.label), 3)], 10, dn)]))), 128))])]))), 128))]),
|
|
1631
1635
|
s("div", { class: m(["px-4 py-4 border-t transition-colors space-y-3", E(f) ? "border-gray-800" : "border-gray-200"]) }, [
|
|
1632
1636
|
t.showNotifications ? (y(), o("button", {
|
|
1633
1637
|
key: 0,
|
|
@@ -1636,10 +1640,10 @@ var on = ["aria-label", "aria-expanded"], sn = { class: "flex flex-col h-full" }
|
|
|
1636
1640
|
title: "Notifications",
|
|
1637
1641
|
"aria-label": E(O) > 0 ? `Notifications, ${E(O)} unread` : "Notifications",
|
|
1638
1642
|
class: m(["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", [E(f) ? "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": A.value }]])
|
|
1639
|
-
}, [s("span",
|
|
1643
|
+
}, [s("span", pn, [u(E(ie), {
|
|
1640
1644
|
class: "w-[18px] h-[18px]",
|
|
1641
1645
|
"aria-hidden": "true"
|
|
1642
|
-
}), E(O) > 0 ? (y(), o("span",
|
|
1646
|
+
}), E(O) > 0 ? (y(), o("span", mn, T(E(O) > 99 ? "99+" : E(O)), 1)) : a("", !0)]), s("span", { class: m({ "lg:hidden": A.value }) }, "Notifications", 2)], 10, fn)) : a("", !0),
|
|
1643
1647
|
t.showThemeToggle ? (y(), o("button", {
|
|
1644
1648
|
key: 1,
|
|
1645
1649
|
type: "button",
|
|
@@ -1649,13 +1653,13 @@ var on = ["aria-label", "aria-expanded"], sn = { class: "flex flex-col h-full" }
|
|
|
1649
1653
|
"aria-pressed": E(f),
|
|
1650
1654
|
class: m(["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", [E(f) ? "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": A.value }]])
|
|
1651
1655
|
}, [
|
|
1652
|
-
(y(), i(w(E(f) ? E(
|
|
1656
|
+
(y(), i(w(E(f) ? E(be) : E(ye)), {
|
|
1653
1657
|
class: m(["hidden w-[18px] h-[18px] shrink-0", { "lg:block": A.value }]),
|
|
1654
1658
|
"aria-hidden": "true"
|
|
1655
1659
|
}, null, 8, ["class"])),
|
|
1656
1660
|
s("span", { class: m({ "lg:hidden": A.value }) }, T(E(f) ? "Switch to light" : "Switch to dark"), 3),
|
|
1657
1661
|
s("span", { class: m(["ml-auto relative w-9 h-5 rounded-full transition-colors", [E(f) ? "bg-emerald-600" : "bg-gray-300", { "lg:hidden": A.value }]]) }, [s("span", { class: m(["absolute top-0.5 left-0.5 w-4 h-4 rounded-full bg-white shadow-sm transition-transform duration-300", E(f) ? "translate-x-4" : "translate-x-0"]) }, null, 2)], 2)
|
|
1658
|
-
], 10,
|
|
1662
|
+
], 10, hn)) : a("", !0),
|
|
1659
1663
|
t.collapsible ? (y(), o("button", {
|
|
1660
1664
|
key: 2,
|
|
1661
1665
|
type: "button",
|
|
@@ -1667,7 +1671,7 @@ var on = ["aria-label", "aria-expanded"], sn = { class: "flex flex-col h-full" }
|
|
|
1667
1671
|
}, [(y(), i(w(E(C) ? E(se) : E(oe)), {
|
|
1668
1672
|
class: "w-[18px] h-[18px] shrink-0",
|
|
1669
1673
|
"aria-hidden": "true"
|
|
1670
|
-
})), s("span", { class: m({ "lg:hidden": A.value }) }, "Collapse", 2)], 10,
|
|
1674
|
+
})), s("span", { class: m({ "lg:hidden": A.value }) }, "Collapse", 2)], 10, gn)) : a("", !0),
|
|
1671
1675
|
s("div", { class: m({ "lg:hidden": A.value }) }, [S(n.$slots, "status", {}, void 0, !0)], 2),
|
|
1672
1676
|
s("div", { class: m({ "lg:hidden": A.value }) }, [S(n.$slots, "footer", {}, () => [t.appName || t.version ? (y(), o("div", {
|
|
1673
1677
|
key: 0,
|
|
@@ -1681,26 +1685,26 @@ var on = ["aria-label", "aria-expanded"], sn = { class: "flex flex-col h-full" }
|
|
|
1681
1685
|
])], 2)
|
|
1682
1686
|
]));
|
|
1683
1687
|
}
|
|
1684
|
-
}), [["__scopeId", "data-v-6fca021f"]]),
|
|
1688
|
+
}), [["__scopeId", "data-v-6fca021f"]]), vn = {
|
|
1685
1689
|
key: 1,
|
|
1686
1690
|
class: "mt-4 flex justify-center py-6"
|
|
1687
|
-
},
|
|
1691
|
+
}, yn = {
|
|
1688
1692
|
key: 2,
|
|
1689
1693
|
class: "mt-4 text-sm text-red-500",
|
|
1690
1694
|
role: "alert"
|
|
1691
|
-
},
|
|
1695
|
+
}, bn = {
|
|
1692
1696
|
key: 3,
|
|
1693
1697
|
class: "mt-4"
|
|
1694
|
-
},
|
|
1698
|
+
}, xn = { class: "relative" }, Sn = ["placeholder"], Cn = {
|
|
1695
1699
|
key: 4,
|
|
1696
1700
|
class: "mt-3 max-h-64 overflow-y-auto"
|
|
1697
|
-
},
|
|
1701
|
+
}, wn = ["onClick"], Tn = { class: "flex-1 min-w-0" }, En = {
|
|
1698
1702
|
key: 0,
|
|
1699
1703
|
class: "text-center py-6"
|
|
1700
|
-
},
|
|
1704
|
+
}, Dn = {
|
|
1701
1705
|
key: 1,
|
|
1702
1706
|
class: "text-center py-6"
|
|
1703
|
-
},
|
|
1707
|
+
}, On = ["disabled"], kn = ["disabled"], An = /* @__PURE__ */ d({
|
|
1704
1708
|
__name: "BaseEntityPickerModal",
|
|
1705
1709
|
props: {
|
|
1706
1710
|
title: {},
|
|
@@ -1722,7 +1726,7 @@ var on = ["aria-label", "aria-expanded"], sn = { class: "flex flex-col h-full" }
|
|
|
1722
1726
|
},
|
|
1723
1727
|
emits: ["confirm", "cancel"],
|
|
1724
1728
|
setup(t, { emit: n }) {
|
|
1725
|
-
let c = t, l = n, { isDark: d } =
|
|
1729
|
+
let c = t, l = n, { isDark: d } = U(), f = J(), h = b([]), _ = b(!1), v = b(""), C = b(null), w = b(""), D = b(null), O = r(() => {
|
|
1726
1730
|
let e = c.loader ? h.value : c.items;
|
|
1727
1731
|
return c.excludeId ? e.filter((e) => e.id !== c.excludeId) : e;
|
|
1728
1732
|
}), k = r(() => O.value.filter((e) => e.label.toLowerCase().includes(w.value.toLowerCase()))), ee = {
|
|
@@ -1837,12 +1841,12 @@ var on = ["aria-label", "aria-expanded"], sn = { class: "flex flex-col h-full" }
|
|
|
1837
1841
|
function te() {
|
|
1838
1842
|
c.submitting || l("cancel");
|
|
1839
1843
|
}
|
|
1840
|
-
return (n, r) => (y(), i(
|
|
1844
|
+
return (n, r) => (y(), i(Rt, {
|
|
1841
1845
|
title: t.title,
|
|
1842
1846
|
"manual-close": t.submitting,
|
|
1843
1847
|
onCancel: te
|
|
1844
1848
|
}, {
|
|
1845
|
-
icon: M(() => [S(n.$slots, "icon", {}, () => [s("div", { class: m(["flex-shrink-0 flex h-12 w-12 items-center justify-center rounded-full", P.value.iconBg]) }, [u(E(
|
|
1849
|
+
icon: M(() => [S(n.$slots, "icon", {}, () => [s("div", { class: m(["flex-shrink-0 flex h-12 w-12 items-center justify-center rounded-full", P.value.iconBg]) }, [u(E(he), {
|
|
1846
1850
|
class: m(["h-6 w-6", P.value.iconText]),
|
|
1847
1851
|
"aria-hidden": "true"
|
|
1848
1852
|
}, null, 8, ["class"])], 2)])]),
|
|
@@ -1851,19 +1855,19 @@ var on = ["aria-label", "aria-expanded"], sn = { class: "flex flex-col h-full" }
|
|
|
1851
1855
|
disabled: t.submitting,
|
|
1852
1856
|
class: m(["inline-flex items-center justify-center px-4 py-2 border rounded-md shadow-sm text-sm font-medium transition-colors duration-150 disabled:opacity-50 disabled:cursor-not-allowed", E(f).ghostButton]),
|
|
1853
1857
|
onClick: te
|
|
1854
|
-
}, T(t.cancelText), 11,
|
|
1858
|
+
}, T(t.cancelText), 11, On), s("button", {
|
|
1855
1859
|
type: "button",
|
|
1856
1860
|
disabled: !C.value || t.submitting,
|
|
1857
1861
|
class: m(["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", !C.value || t.submitting ? P.value.confirmDisabled : P.value.confirmActive]),
|
|
1858
1862
|
onClick: F
|
|
1859
|
-
}, T(t.submitting ? t.submittingText : t.confirmText), 11,
|
|
1863
|
+
}, T(t.submitting ? t.submittingText : t.confirmText), 11, kn)]),
|
|
1860
1864
|
default: M(() => [
|
|
1861
1865
|
t.message ? (y(), o("p", {
|
|
1862
1866
|
key: 0,
|
|
1863
1867
|
class: m(["text-sm", E(d) ? "text-gray-300" : "text-gray-600"])
|
|
1864
1868
|
}, T(t.message), 3)) : a("", !0),
|
|
1865
|
-
_.value ? (y(), o("div",
|
|
1866
|
-
!_.value && !v.value && O.value.length > 0 ? (y(), o("div",
|
|
1869
|
+
_.value ? (y(), o("div", vn, [u(st, { color: "emerald" })])) : v.value ? (y(), o("div", yn, T(v.value), 1)) : a("", !0),
|
|
1870
|
+
!_.value && !v.value && O.value.length > 0 ? (y(), o("div", bn, [s("div", xn, [u(E(_e), {
|
|
1867
1871
|
class: m(["absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4", E(f).dimText]),
|
|
1868
1872
|
"aria-hidden": "true"
|
|
1869
1873
|
}, null, 8, ["class"]), N(s("input", {
|
|
@@ -1873,14 +1877,14 @@ var on = ["aria-label", "aria-expanded"], sn = { class: "flex flex-col h-full" }
|
|
|
1873
1877
|
type: "text",
|
|
1874
1878
|
placeholder: t.searchPlaceholder,
|
|
1875
1879
|
class: m(["w-full pl-9 pr-3 py-2 text-sm rounded-md border outline-none transition-colors", [E(d) ? "bg-gray-800 border-gray-600 text-gray-200 placeholder-gray-500" : "bg-white border-gray-300 text-gray-700 placeholder-gray-400", P.value.inputFocus]])
|
|
1876
|
-
}, null, 10,
|
|
1877
|
-
!_.value && !v.value ? (y(), o("div",
|
|
1880
|
+
}, null, 10, Sn), [[A, w.value]])])])) : a("", !0),
|
|
1881
|
+
!_.value && !v.value ? (y(), o("div", Cn, [(y(!0), o(e, null, x(k.value, (e) => (y(), o("div", {
|
|
1878
1882
|
key: e.id,
|
|
1879
1883
|
class: m(["flex items-center gap-3 px-3 py-2.5 rounded-lg cursor-pointer transition-colors", [C.value === e.id ? P.value.selectedRow : E(d) ? "hover:bg-gray-800 border border-transparent" : "hover:bg-gray-50 border border-transparent"]]),
|
|
1880
1884
|
onClick: (t) => C.value = e.id
|
|
1881
1885
|
}, [
|
|
1882
|
-
u(E(
|
|
1883
|
-
s("div",
|
|
1886
|
+
u(E(he), { class: m(["w-5 h-5 flex-shrink-0", E(f).dimText]) }, null, 8, ["class"]),
|
|
1887
|
+
s("div", Tn, [s("p", { class: m(["text-sm font-medium truncate", E(f).bodyText]) }, T(e.label), 3)]),
|
|
1884
1888
|
C.value === e.id ? (y(), o("div", {
|
|
1885
1889
|
key: 0,
|
|
1886
1890
|
class: m(["w-5 h-5 rounded-full flex items-center justify-center", P.value.checkBg])
|
|
@@ -1896,15 +1900,15 @@ var on = ["aria-label", "aria-expanded"], sn = { class: "flex flex-col h-full" }
|
|
|
1896
1900
|
"stroke-linejoin": "round",
|
|
1897
1901
|
d: "M5 13l4 4L19 7"
|
|
1898
1902
|
})], -1)]], 2)) : a("", !0)
|
|
1899
|
-
], 10,
|
|
1903
|
+
], 10, wn))), 128)), O.value.length === 0 ? (y(), o("div", En, [s("p", { class: m(["text-sm", E(f).dimText]) }, T(t.emptyMessage), 3)])) : k.value.length === 0 ? (y(), o("div", Dn, [s("p", { class: m(["text-sm", E(f).dimText]) }, T(t.noMatchMessage), 3)])) : a("", !0)])) : a("", !0)
|
|
1900
1904
|
]),
|
|
1901
1905
|
_: 3
|
|
1902
1906
|
}, 8, ["title", "manual-close"]));
|
|
1903
1907
|
}
|
|
1904
|
-
}),
|
|
1908
|
+
}), jn = {
|
|
1905
1909
|
href: "#main-content",
|
|
1906
1910
|
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"
|
|
1907
|
-
},
|
|
1911
|
+
}, Mn = ["inert"], Nn = /* @__PURE__ */ d({
|
|
1908
1912
|
__name: "BaseAppLayout",
|
|
1909
1913
|
props: {
|
|
1910
1914
|
showSidebar: {
|
|
@@ -1914,19 +1918,19 @@ var on = ["aria-label", "aria-expanded"], sn = { class: "flex flex-col h-full" }
|
|
|
1914
1918
|
skipLinkLabel: { default: "Skip to main content" }
|
|
1915
1919
|
},
|
|
1916
1920
|
setup(e) {
|
|
1917
|
-
let t = e, { isDark: n } =
|
|
1921
|
+
let t = e, { isDark: n } = U(), { mobileOpen: i } = $t(), { collapsed: c } = rn(), l = r(() => t.showSidebar);
|
|
1918
1922
|
return (t, r) => (y(), o("div", { class: m(["min-h-screen transition-colors duration-300", E(n) ? "bg-gray-950 text-gray-100" : "bg-gray-50 text-gray-800"]) }, [
|
|
1919
|
-
s("a",
|
|
1923
|
+
s("a", jn, T(e.skipLinkLabel), 1),
|
|
1920
1924
|
l.value ? S(t.$slots, "sidebar", { key: 0 }) : a("", !0),
|
|
1921
1925
|
s("main", {
|
|
1922
1926
|
id: "main-content",
|
|
1923
1927
|
tabindex: "-1",
|
|
1924
1928
|
inert: l.value && E(i) ? !0 : void 0,
|
|
1925
1929
|
class: m(["transition-all duration-300", l.value ? E(c) ? "pt-14 lg:pt-0 lg:ml-16" : "pt-14 lg:pt-0 lg:ml-60" : ""])
|
|
1926
|
-
}, [S(t.$slots, "default")], 10,
|
|
1930
|
+
}, [S(t.$slots, "default")], 10, Mn)
|
|
1927
1931
|
], 2));
|
|
1928
1932
|
}
|
|
1929
|
-
}),
|
|
1933
|
+
}), Pn = { class: "flex flex-wrap items-center justify-between gap-3 mb-8" }, Fn = { class: "flex items-center gap-3 min-w-0" }, In = { class: "flex items-center gap-2" }, Ln = /* @__PURE__ */ d({
|
|
1930
1934
|
__name: "BasePageHeader",
|
|
1931
1935
|
props: {
|
|
1932
1936
|
title: {},
|
|
@@ -1935,7 +1939,7 @@ var on = ["aria-label", "aria-expanded"], sn = { class: "flex flex-col h-full" }
|
|
|
1935
1939
|
maxWidthClass: { default: "max-w-4xl" }
|
|
1936
1940
|
},
|
|
1937
1941
|
setup(e) {
|
|
1938
|
-
let t = e, { isDark: n } =
|
|
1942
|
+
let t = e, { isDark: n } = U(), i = J(), c = r(() => {
|
|
1939
1943
|
let e = {
|
|
1940
1944
|
emerald: {
|
|
1941
1945
|
dark: "bg-emerald-500/10",
|
|
@@ -1976,16 +1980,16 @@ var on = ["aria-label", "aria-expanded"], sn = { class: "flex flex-col h-full" }
|
|
|
1976
1980
|
}[t.iconColor];
|
|
1977
1981
|
return n.value ? e.dark : e.light;
|
|
1978
1982
|
});
|
|
1979
|
-
return (t, n) => (y(), o("div", { class: m(["mx-auto px-4 sm:px-6", e.maxWidthClass]) }, [s("div",
|
|
1983
|
+
return (t, n) => (y(), o("div", { class: m(["mx-auto px-4 sm:px-6", e.maxWidthClass]) }, [s("div", Pn, [s("div", Fn, [s("div", { class: m(["w-10 h-10 rounded-lg flex items-center justify-center", c.value]) }, [S(t.$slots, "icon", { iconClass: l.value })], 2), s("div", null, [s("h1", { class: m(["text-2xl font-bold", E(i).primaryTextSoft]) }, T(e.title), 3), e.subtitle ? (y(), o("p", {
|
|
1980
1984
|
key: 0,
|
|
1981
1985
|
class: m(["text-sm", E(i).dimTextAlt])
|
|
1982
|
-
}, T(e.subtitle), 3)) : a("", !0)])]), s("div",
|
|
1986
|
+
}, T(e.subtitle), 3)) : a("", !0)])]), s("div", In, [S(t.$slots, "actions")])])], 2));
|
|
1983
1987
|
}
|
|
1984
|
-
}),
|
|
1988
|
+
}), Rn = [
|
|
1985
1989
|
"type",
|
|
1986
1990
|
"disabled",
|
|
1987
1991
|
"title"
|
|
1988
|
-
],
|
|
1992
|
+
], zn = { key: 0 }, Bn = /* @__PURE__ */ d({
|
|
1989
1993
|
__name: "BaseToolbarButton",
|
|
1990
1994
|
props: {
|
|
1991
1995
|
label: { default: "" },
|
|
@@ -1999,7 +2003,7 @@ var on = ["aria-label", "aria-expanded"], sn = { class: "flex flex-col h-full" }
|
|
|
1999
2003
|
},
|
|
2000
2004
|
emits: ["click"],
|
|
2001
2005
|
setup(e) {
|
|
2002
|
-
let t = e, { isDark: n } =
|
|
2006
|
+
let t = e, { isDark: n } = U(), i = r(() => {
|
|
2003
2007
|
let e = {
|
|
2004
2008
|
neutral: {
|
|
2005
2009
|
dark: "bg-gray-800 text-gray-100 border-gray-700 hover:bg-gray-700",
|
|
@@ -2018,14 +2022,14 @@ var on = ["aria-label", "aria-expanded"], sn = { class: "flex flex-col h-full" }
|
|
|
2018
2022
|
title: e.title,
|
|
2019
2023
|
class: m(["inline-flex shrink-0 items-center gap-2 px-3 py-2 rounded-lg text-sm font-medium border transition-colors cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed whitespace-nowrap", i.value]),
|
|
2020
2024
|
onClick: n[0] ||= (e) => t.$emit("click", e)
|
|
2021
|
-
}, [S(t.$slots, "icon", { iconClass: "w-4 h-4" }), e.label ? (y(), o("span",
|
|
2025
|
+
}, [S(t.$slots, "icon", { iconClass: "w-4 h-4" }), e.label ? (y(), o("span", zn, T(e.label), 1)) : a("", !0)], 10, Rn));
|
|
2022
2026
|
}
|
|
2023
|
-
}),
|
|
2027
|
+
}), Vn = [
|
|
2024
2028
|
"type",
|
|
2025
2029
|
"disabled",
|
|
2026
2030
|
"title",
|
|
2027
2031
|
"aria-label"
|
|
2028
|
-
],
|
|
2032
|
+
], Hn = { key: 0 }, Un = /* @__PURE__ */ d({
|
|
2029
2033
|
__name: "BaseActionButton",
|
|
2030
2034
|
props: {
|
|
2031
2035
|
label: { default: "" },
|
|
@@ -2044,7 +2048,7 @@ var on = ["aria-label", "aria-expanded"], sn = { class: "flex flex-col h-full" }
|
|
|
2044
2048
|
},
|
|
2045
2049
|
emits: ["click"],
|
|
2046
2050
|
setup(e) {
|
|
2047
|
-
let t = e, { isDark: n } =
|
|
2051
|
+
let t = e, { isDark: n } = U(), i = r(() => {
|
|
2048
2052
|
let e = {
|
|
2049
2053
|
emerald: {
|
|
2050
2054
|
dark: "text-emerald-400 hover:bg-emerald-500/10",
|
|
@@ -2124,9 +2128,9 @@ var on = ["aria-label", "aria-expanded"], sn = { class: "flex flex-col h-full" }
|
|
|
2124
2128
|
"aria-label": e.ariaLabel,
|
|
2125
2129
|
class: m(["inline-flex items-center justify-center gap-1.5 px-3 py-1.5 rounded-lg text-xs font-medium transition-colors", [e.fullWidth ? "flex-1" : "", c.value]]),
|
|
2126
2130
|
onClick: n[0] ||= (e) => t.$emit("click", e)
|
|
2127
|
-
}, [S(t.$slots, "icon", { iconClass: "w-4 h-4" }), e.label ? (y(), o("span",
|
|
2131
|
+
}, [S(t.$slots, "icon", { iconClass: "w-4 h-4" }), e.label ? (y(), o("span", Hn, T(e.label), 1)) : a("", !0)], 10, Vn));
|
|
2128
2132
|
}
|
|
2129
|
-
}),
|
|
2133
|
+
}), Wn = ["title", "aria-label"], Gn = /* @__PURE__ */ d({
|
|
2130
2134
|
__name: "BaseCopyButton",
|
|
2131
2135
|
props: {
|
|
2132
2136
|
text: {},
|
|
@@ -2137,7 +2141,7 @@ var on = ["aria-label", "aria-expanded"], sn = { class: "flex flex-col h-full" }
|
|
|
2137
2141
|
},
|
|
2138
2142
|
emits: ["copied", "error"],
|
|
2139
2143
|
setup(e, { emit: t }) {
|
|
2140
|
-
let n = e, a = t, { isDark: s } =
|
|
2144
|
+
let n = e, a = t, { isDark: s } = U(), c = b(!1), l = null, u = r(() => c.value ? "Copied!" : n.label ? `Copy ${n.label}` : "Copy"), d = r(() => n.label ? `Copy ${n.label}` : "Copy"), f = r(() => n.variant === "bordered" ? `inline-flex items-center justify-center w-9 h-9 rounded-lg border transition-colors cursor-pointer shrink-0 ${c.value ? s.value ? "border-emerald-500/40 bg-emerald-500/10 text-emerald-400" : "border-emerald-300 bg-emerald-50 text-emerald-600" : s.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 ${s.value ? "text-gray-400 hover:text-emerald-300 hover:bg-emerald-500/10" : "text-gray-500 hover:text-emerald-600 hover:bg-emerald-50"}`);
|
|
2141
2145
|
async function p(e) {
|
|
2142
2146
|
try {
|
|
2143
2147
|
if (navigator.clipboard?.writeText) {
|
|
@@ -2167,28 +2171,28 @@ var on = ["aria-label", "aria-expanded"], sn = { class: "flex flex-col h-full" }
|
|
|
2167
2171
|
"aria-label": d.value,
|
|
2168
2172
|
class: m(f.value),
|
|
2169
2173
|
onClick: h
|
|
2170
|
-
}, [c.value ? (y(), i(E(
|
|
2174
|
+
}, [c.value ? (y(), i(E(ue), {
|
|
2171
2175
|
key: 0,
|
|
2172
2176
|
class: m(e.iconClass),
|
|
2173
2177
|
"aria-hidden": "true"
|
|
2174
|
-
}, null, 8, ["class"])) : (y(), i(E(
|
|
2178
|
+
}, null, 8, ["class"])) : (y(), i(E(de), {
|
|
2175
2179
|
key: 1,
|
|
2176
2180
|
class: m(e.iconClass),
|
|
2177
2181
|
"aria-hidden": "true"
|
|
2178
|
-
}, null, 8, ["class"]))], 10,
|
|
2182
|
+
}, null, 8, ["class"]))], 10, Wn));
|
|
2179
2183
|
}
|
|
2180
|
-
}),
|
|
2184
|
+
}), Kn = ["disabled", "aria-busy"], qn = {
|
|
2181
2185
|
key: 0,
|
|
2182
2186
|
class: "w-5 h-5 animate-spin shrink-0",
|
|
2183
2187
|
viewBox: "0 0 24 24",
|
|
2184
2188
|
fill: "none",
|
|
2185
2189
|
"aria-hidden": "true"
|
|
2186
|
-
},
|
|
2190
|
+
}, Jn = {
|
|
2187
2191
|
key: 1,
|
|
2188
2192
|
class: "w-5 h-5 shrink-0",
|
|
2189
2193
|
viewBox: "0 0 48 48",
|
|
2190
2194
|
"aria-hidden": "true"
|
|
2191
|
-
},
|
|
2195
|
+
}, Yn = /* @__PURE__ */ d({
|
|
2192
2196
|
__name: "BaseGoogleSignInButton",
|
|
2193
2197
|
props: {
|
|
2194
2198
|
label: { default: "Sign in with Google" },
|
|
@@ -2207,7 +2211,7 @@ var on = ["aria-label", "aria-expanded"], sn = { class: "flex flex-col h-full" }
|
|
|
2207
2211
|
},
|
|
2208
2212
|
emits: ["click"],
|
|
2209
2213
|
setup(e, { emit: t }) {
|
|
2210
|
-
let n = e, i = t, { isDark: a } =
|
|
2214
|
+
let n = e, i = t, { isDark: a } = U(), l = r(() => n.disabled || n.loading);
|
|
2211
2215
|
function u() {
|
|
2212
2216
|
l.value || i("click");
|
|
2213
2217
|
}
|
|
@@ -2217,7 +2221,7 @@ var on = ["aria-label", "aria-expanded"], sn = { class: "flex flex-col h-full" }
|
|
|
2217
2221
|
"aria-busy": e.loading,
|
|
2218
2222
|
onClick: u,
|
|
2219
2223
|
class: m(["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" : "", E(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"]])
|
|
2220
|
-
}, [e.loading ? (y(), o("svg",
|
|
2224
|
+
}, [e.loading ? (y(), o("svg", qn, [...n[0] ||= [s("circle", {
|
|
2221
2225
|
class: "opacity-25",
|
|
2222
2226
|
cx: "12",
|
|
2223
2227
|
cy: "12",
|
|
@@ -2228,18 +2232,18 @@ var on = ["aria-label", "aria-expanded"], sn = { class: "flex flex-col h-full" }
|
|
|
2228
2232
|
class: "opacity-75",
|
|
2229
2233
|
fill: "currentColor",
|
|
2230
2234
|
d: "M4 12a8 8 0 0 1 8-8V0C5.4 0 0 5.4 0 12h4z"
|
|
2231
|
-
}, null, -1)]])) : (y(), o("svg",
|
|
2235
|
+
}, null, -1)]])) : (y(), o("svg", Jn, [...n[1] ||= [c("<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)]])), s("span", null, T(e.label), 1)], 10, Kn));
|
|
2232
2236
|
}
|
|
2233
|
-
}),
|
|
2237
|
+
}), Xn = {
|
|
2234
2238
|
key: 0,
|
|
2235
2239
|
class: "flex justify-center mb-6"
|
|
2236
|
-
},
|
|
2240
|
+
}, Zn = { class: "mb-6 text-center" }, Qn = { class: "flex items-center gap-3 my-5" }, $n = ["disabled"], er = { class: "flex items-center justify-between mb-1.5" }, tr = { class: "relative" }, nr = ["type", "disabled"], rr = ["aria-label", "aria-pressed"], ir = ["disabled"], ar = ["disabled", "aria-busy"], or = {
|
|
2237
2241
|
key: 0,
|
|
2238
2242
|
class: "w-4 h-4 animate-spin",
|
|
2239
2243
|
viewBox: "0 0 24 24",
|
|
2240
2244
|
fill: "none",
|
|
2241
2245
|
"aria-hidden": "true"
|
|
2242
|
-
},
|
|
2246
|
+
}, sr = /* @__PURE__ */ d({
|
|
2243
2247
|
__name: "BaseLoginForm",
|
|
2244
2248
|
props: {
|
|
2245
2249
|
title: { default: "Sign in" },
|
|
@@ -2265,7 +2269,7 @@ var on = ["aria-label", "aria-expanded"], sn = { class: "flex flex-col h-full" }
|
|
|
2265
2269
|
},
|
|
2266
2270
|
emits: ["submit", "google-sign-in"],
|
|
2267
2271
|
setup(t, { emit: n }) {
|
|
2268
|
-
let i = t, c = n, { isDark: d } =
|
|
2272
|
+
let i = t, c = n, { isDark: d } = U(), f = J(), p = b(""), h = b(""), g = b(!1), _ = b(!1), v = r(() => i.loading || i.googleLoading);
|
|
2269
2273
|
function x() {
|
|
2270
2274
|
v.value || c("submit", {
|
|
2271
2275
|
email: p.value,
|
|
@@ -2274,8 +2278,8 @@ var on = ["aria-label", "aria-expanded"], sn = { class: "flex flex-col h-full" }
|
|
|
2274
2278
|
});
|
|
2275
2279
|
}
|
|
2276
2280
|
return (n, r) => (y(), o("div", { class: m(["w-full max-w-sm mx-auto rounded-xl border shadow-sm p-6 sm:p-8", E(f).card]) }, [
|
|
2277
|
-
n.$slots.logo ? (y(), o("div",
|
|
2278
|
-
s("div",
|
|
2281
|
+
n.$slots.logo ? (y(), o("div", Xn, [S(n.$slots, "logo")])) : a("", !0),
|
|
2282
|
+
s("div", Zn, [s("h1", { class: m(["text-xl font-semibold", E(f).primaryText]) }, T(t.title), 3), t.subtitle ? (y(), o("p", {
|
|
2279
2283
|
key: 0,
|
|
2280
2284
|
class: m(["mt-1 text-sm", E(f).mutedText])
|
|
2281
2285
|
}, T(t.subtitle), 3)) : a("", !0)]),
|
|
@@ -2284,11 +2288,11 @@ var on = ["aria-label", "aria-expanded"], sn = { class: "flex flex-col h-full" }
|
|
|
2284
2288
|
role: "alert",
|
|
2285
2289
|
class: m(["mb-4 rounded-lg border px-3 py-2 text-sm", E(d) ? "bg-red-500/10 border-red-500/30 text-red-300" : "bg-red-50 border-red-200 text-red-700"])
|
|
2286
2290
|
}, T(t.error), 3)) : a("", !0),
|
|
2287
|
-
t.showGoogle ? (y(), o(e, { key: 2 }, [u(
|
|
2291
|
+
t.showGoogle ? (y(), o(e, { key: 2 }, [u(Yn, {
|
|
2288
2292
|
loading: t.googleLoading,
|
|
2289
2293
|
disabled: t.loading,
|
|
2290
2294
|
onClick: r[0] ||= (e) => c("google-sign-in")
|
|
2291
|
-
}, null, 8, ["loading", "disabled"]), s("div",
|
|
2295
|
+
}, null, 8, ["loading", "disabled"]), s("div", Qn, [
|
|
2292
2296
|
s("span", { class: m(["h-px flex-1", E(d) ? "bg-gray-700" : "bg-gray-200"]) }, null, 2),
|
|
2293
2297
|
s("span", { class: m(["text-xs uppercase tracking-wider", E(f).dimTextAlt]) }, "or", 2),
|
|
2294
2298
|
s("span", { class: m(["h-px flex-1", E(d) ? "bg-gray-700" : "bg-gray-200"]) }, null, 2)
|
|
@@ -2310,11 +2314,11 @@ var on = ["aria-label", "aria-expanded"], sn = { class: "flex flex-col h-full" }
|
|
|
2310
2314
|
disabled: v.value,
|
|
2311
2315
|
placeholder: "you@example.com",
|
|
2312
2316
|
class: m(["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", E(f).inputWithPlaceholder])
|
|
2313
|
-
}, null, 10,
|
|
2314
|
-
s("div", null, [s("div",
|
|
2317
|
+
}, null, 10, $n), [[A, p.value]])]),
|
|
2318
|
+
s("div", null, [s("div", er, [s("label", {
|
|
2315
2319
|
for: "login-password",
|
|
2316
2320
|
class: m(["block text-sm font-medium", E(f).label])
|
|
2317
|
-
}, " Password ", 2), S(n.$slots, "forgot")]), s("div",
|
|
2321
|
+
}, " Password ", 2), S(n.$slots, "forgot")]), s("div", tr, [N(s("input", {
|
|
2318
2322
|
id: "login-password",
|
|
2319
2323
|
"onUpdate:modelValue": r[2] ||= (e) => h.value = e,
|
|
2320
2324
|
type: _.value ? "text" : "password",
|
|
@@ -2324,13 +2328,13 @@ var on = ["aria-label", "aria-expanded"], sn = { class: "flex flex-col h-full" }
|
|
|
2324
2328
|
disabled: v.value,
|
|
2325
2329
|
placeholder: "••••••••",
|
|
2326
2330
|
class: m(["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", E(f).inputWithPlaceholder])
|
|
2327
|
-
}, null, 10,
|
|
2331
|
+
}, null, 10, nr), [[k, h.value]]), s("button", {
|
|
2328
2332
|
type: "button",
|
|
2329
2333
|
onClick: r[3] ||= (e) => _.value = !_.value,
|
|
2330
2334
|
"aria-label": _.value ? "Hide password" : "Show password",
|
|
2331
2335
|
"aria-pressed": _.value,
|
|
2332
2336
|
class: m(["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", E(f).mutedText])
|
|
2333
|
-
}, T(_.value ? "Hide" : "Show"), 11,
|
|
2337
|
+
}, T(_.value ? "Hide" : "Show"), 11, rr)])]),
|
|
2334
2338
|
t.showRemember ? (y(), o("label", {
|
|
2335
2339
|
key: 0,
|
|
2336
2340
|
class: m(["flex items-center gap-2 text-sm cursor-pointer select-none", E(f).bodyText])
|
|
@@ -2339,13 +2343,13 @@ var on = ["aria-label", "aria-expanded"], sn = { class: "flex flex-col h-full" }
|
|
|
2339
2343
|
type: "checkbox",
|
|
2340
2344
|
disabled: v.value,
|
|
2341
2345
|
class: "w-4 h-4 rounded border-gray-300 text-emerald-600 focus:ring-emerald-500"
|
|
2342
|
-
}, null, 8,
|
|
2346
|
+
}, null, 8, ir), [[O, g.value]]), r[5] ||= l(" Remember me ", -1)], 2)) : a("", !0),
|
|
2343
2347
|
s("button", {
|
|
2344
2348
|
type: "submit",
|
|
2345
2349
|
disabled: v.value,
|
|
2346
2350
|
"aria-busy": t.loading,
|
|
2347
2351
|
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"
|
|
2348
|
-
}, [t.loading ? (y(), o("svg",
|
|
2352
|
+
}, [t.loading ? (y(), o("svg", or, [...r[6] ||= [s("circle", {
|
|
2349
2353
|
class: "opacity-25",
|
|
2350
2354
|
cx: "12",
|
|
2351
2355
|
cy: "12",
|
|
@@ -2356,7 +2360,7 @@ var on = ["aria-label", "aria-expanded"], sn = { class: "flex flex-col h-full" }
|
|
|
2356
2360
|
class: "opacity-75",
|
|
2357
2361
|
fill: "currentColor",
|
|
2358
2362
|
d: "M4 12a8 8 0 0 1 8-8V0C5.4 0 0 5.4 0 12h4z"
|
|
2359
|
-
}, null, -1)]])) : a("", !0), l(" " + T(t.submitLabel), 1)], 8,
|
|
2363
|
+
}, null, -1)]])) : a("", !0), l(" " + T(t.submitLabel), 1)], 8, ar)
|
|
2360
2364
|
], 32),
|
|
2361
2365
|
n.$slots.footer ? (y(), o("div", {
|
|
2362
2366
|
key: 3,
|
|
@@ -2364,10 +2368,10 @@ var on = ["aria-label", "aria-expanded"], sn = { class: "flex flex-col h-full" }
|
|
|
2364
2368
|
}, [S(n.$slots, "footer")], 2)) : a("", !0)
|
|
2365
2369
|
], 2));
|
|
2366
2370
|
}
|
|
2367
|
-
}),
|
|
2371
|
+
}), cr = ["aria-label"], lr = { class: "flex-1 overflow-y-auto" }, ur = {
|
|
2368
2372
|
key: 0,
|
|
2369
2373
|
class: "flex flex-col items-center justify-center text-center px-6 py-16 gap-3"
|
|
2370
|
-
},
|
|
2374
|
+
}, dr = ["onClick"], fr = { class: "min-w-0 flex-1" }, pr = { class: "flex items-baseline justify-between gap-2" }, mr = /* @__PURE__ */ d({
|
|
2371
2375
|
__name: "BaseNotificationPanel",
|
|
2372
2376
|
props: {
|
|
2373
2377
|
title: { default: "Notifications" },
|
|
@@ -2379,7 +2383,7 @@ var on = ["aria-label", "aria-expanded"], sn = { class: "flex flex-col h-full" }
|
|
|
2379
2383
|
},
|
|
2380
2384
|
emits: ["select"],
|
|
2381
2385
|
setup(c, { emit: d }) {
|
|
2382
|
-
let f = d, { isDark: p } =
|
|
2386
|
+
let f = d, { isDark: p } = U(), h = J(), { notifications: g, unreadCount: _, open: v, closePanel: b, markAllRead: S, markRead: C } = on(), w = {
|
|
2383
2387
|
info: "bg-sky-500",
|
|
2384
2388
|
success: "bg-emerald-500",
|
|
2385
2389
|
warning: "bg-amber-500",
|
|
@@ -2388,7 +2392,7 @@ var on = ["aria-label", "aria-expanded"], sn = { class: "flex flex-col h-full" }
|
|
|
2388
2392
|
function O(e) {
|
|
2389
2393
|
C(e), f("select", e);
|
|
2390
2394
|
}
|
|
2391
|
-
return
|
|
2395
|
+
return Y(() => {
|
|
2392
2396
|
v.value && b();
|
|
2393
2397
|
}), (r, d) => (y(), i(t, { to: "body" }, [u(n, {
|
|
2394
2398
|
"enter-active-class": "transition-opacity duration-200",
|
|
@@ -2421,7 +2425,7 @@ var on = ["aria-label", "aria-expanded"], sn = { class: "flex flex-col h-full" }
|
|
|
2421
2425
|
onClick: d[1] ||= (...e) => E(b) && E(b)(...e),
|
|
2422
2426
|
"aria-label": "Close notifications",
|
|
2423
2427
|
class: m(["p-1.5 rounded-lg cursor-pointer transition-colors focus:outline-none focus-visible:ring-2 focus-visible:ring-emerald-500", E(p) ? "text-gray-400 hover:bg-gray-800" : "text-gray-500 hover:bg-gray-100"])
|
|
2424
|
-
}, [u(E(
|
|
2428
|
+
}, [u(E(xe), {
|
|
2425
2429
|
class: "w-5 h-5",
|
|
2426
2430
|
"aria-hidden": "true"
|
|
2427
2431
|
})], 2)], 2),
|
|
@@ -2433,7 +2437,7 @@ var on = ["aria-label", "aria-expanded"], sn = { class: "flex flex-col h-full" }
|
|
|
2433
2437
|
onClick: d[2] ||= (...e) => E(S) && E(S)(...e),
|
|
2434
2438
|
class: m(["text-xs font-medium cursor-pointer transition-colors focus:outline-none focus-visible:underline", E(h).emeraldText])
|
|
2435
2439
|
}, " Mark all as read ", 2)], 2)) : a("", !0),
|
|
2436
|
-
s("div",
|
|
2440
|
+
s("div", lr, [D.value === 0 ? (y(), o("div", ur, [u(E(ie), {
|
|
2437
2441
|
class: m(["w-10 h-10", E(h).illustration]),
|
|
2438
2442
|
"aria-hidden": "true"
|
|
2439
2443
|
}, null, 8, ["class"]), s("p", { class: m(["text-sm", E(h).mutedText]) }, T(c.emptyText), 3)])) : (y(), o("ul", {
|
|
@@ -2446,18 +2450,18 @@ var on = ["aria-label", "aria-expanded"], sn = { class: "flex flex-col h-full" }
|
|
|
2446
2450
|
}, [s("span", {
|
|
2447
2451
|
class: m(["mt-1.5 w-2 h-2 rounded-full shrink-0", e.read ? E(p) ? "bg-gray-700" : "bg-gray-300" : w[e.type ?? "info"]]),
|
|
2448
2452
|
"aria-hidden": "true"
|
|
2449
|
-
}, null, 2), s("span",
|
|
2453
|
+
}, null, 2), s("span", fr, [s("span", pr, [s("span", { class: m(["text-sm truncate", [e.read ? "font-medium" : "font-semibold", E(h).primaryTextSoft]]) }, T(e.title), 3), e.time ? (y(), o("span", {
|
|
2450
2454
|
key: 0,
|
|
2451
2455
|
class: m(["text-xs shrink-0", E(h).dimText])
|
|
2452
2456
|
}, T(e.time), 3)) : a("", !0)]), e.message ? (y(), o("span", {
|
|
2453
2457
|
key: 0,
|
|
2454
2458
|
class: m(["mt-0.5 block text-sm", E(h).mutedText])
|
|
2455
|
-
}, T(e.message), 3)) : a("", !0)])], 10,
|
|
2456
|
-
], 10,
|
|
2459
|
+
}, T(e.message), 3)) : a("", !0)])], 10, dr)]))), 128))], 2))])
|
|
2460
|
+
], 10, cr)) : a("", !0)]),
|
|
2457
2461
|
_: 1
|
|
2458
2462
|
})]));
|
|
2459
2463
|
}
|
|
2460
|
-
}),
|
|
2464
|
+
}), hr = ["value", "type"], gr = /* @__PURE__ */ d({
|
|
2461
2465
|
__name: "BaseInput",
|
|
2462
2466
|
props: {
|
|
2463
2467
|
modelValue: { default: "" },
|
|
@@ -2479,9 +2483,9 @@ var on = ["aria-label", "aria-expanded"], sn = { class: "flex flex-col h-full" }
|
|
|
2479
2483
|
type: e.type,
|
|
2480
2484
|
class: m(["rounded border border-slate-300 dark:border-slate-600 bg-slate-50 dark:bg-slate-900 text-slate-900 dark:text-slate-100 text-sm", [e.block ? "w-full" : "", e.size === "sm" ? "px-2 py-1.5" : "px-3 py-2"]]),
|
|
2481
2485
|
onInput: r
|
|
2482
|
-
}, null, 42,
|
|
2486
|
+
}, null, 42, hr));
|
|
2483
2487
|
}
|
|
2484
|
-
}),
|
|
2488
|
+
}), _r = ["value"], vr = /* @__PURE__ */ d({
|
|
2485
2489
|
__name: "BaseSelect",
|
|
2486
2490
|
props: {
|
|
2487
2491
|
modelValue: { default: void 0 },
|
|
@@ -2501,13 +2505,84 @@ var on = ["aria-label", "aria-expanded"], sn = { class: "flex flex-col h-full" }
|
|
|
2501
2505
|
value: e.modelValue,
|
|
2502
2506
|
class: m(["rounded border border-slate-300 dark:border-slate-600 bg-slate-50 dark:bg-slate-900 text-slate-900 dark:text-slate-100 text-sm", [e.block ? "w-full" : "", e.size === "md" ? "px-3 py-2" : "px-2 py-1.5"]]),
|
|
2503
2507
|
onChange: r
|
|
2504
|
-
}, [S(t.$slots, "default")], 42,
|
|
2508
|
+
}, [S(t.$slots, "default")], 42, _r));
|
|
2509
|
+
}
|
|
2510
|
+
}), yr = [
|
|
2511
|
+
"disabled",
|
|
2512
|
+
"aria-label",
|
|
2513
|
+
"aria-expanded"
|
|
2514
|
+
], br = ["aria-label"], xr = ["aria-selected", "title"], Sr = ["disabled", "onClick"], Cr = /* @__PURE__ */ d({
|
|
2515
|
+
__name: "BaseDropdown",
|
|
2516
|
+
props: {
|
|
2517
|
+
options: {},
|
|
2518
|
+
modelValue: { default: null },
|
|
2519
|
+
placeholder: { default: "Select" },
|
|
2520
|
+
size: { default: "md" },
|
|
2521
|
+
block: {
|
|
2522
|
+
type: Boolean,
|
|
2523
|
+
default: !0
|
|
2524
|
+
},
|
|
2525
|
+
disabled: {
|
|
2526
|
+
type: Boolean,
|
|
2527
|
+
default: !1
|
|
2528
|
+
},
|
|
2529
|
+
ariaLabel: { default: "" }
|
|
2530
|
+
},
|
|
2531
|
+
emits: ["update:modelValue"],
|
|
2532
|
+
setup(t, { emit: n }) {
|
|
2533
|
+
let i = t, c = n, l = b(!1), d = b(null), f = r(() => i.options.find((e) => e.value === i.modelValue) ?? null), p = r(() => "flex items-center justify-between gap-2 rounded-lg border text-left text-sm transition-colors border-slate-300 dark:border-slate-600 bg-white dark:bg-slate-900 text-slate-700 dark:text-slate-100 hover:bg-slate-50 dark:hover:bg-slate-800 focus:outline-none focus-visible:ring-2 focus-visible:ring-emerald-500 disabled:opacity-50 disabled:cursor-not-allowed " + (i.size === "sm" ? "px-3 py-2" : "px-4 py-2.5"));
|
|
2534
|
+
function _(e) {
|
|
2535
|
+
return `block w-full px-4 py-2 text-left text-sm transition-colors disabled:opacity-50 disabled:cursor-not-allowed ${e.value === i.modelValue ? "bg-emerald-500 text-white" : "text-slate-700 dark:text-slate-200 hover:bg-slate-100 dark:hover:bg-slate-800"}`;
|
|
2536
|
+
}
|
|
2537
|
+
function v() {
|
|
2538
|
+
i.disabled || (l.value = !l.value);
|
|
2539
|
+
}
|
|
2540
|
+
function S(e) {
|
|
2541
|
+
e.disabled || (c("update:modelValue", e.value), l.value = !1);
|
|
2542
|
+
}
|
|
2543
|
+
Y(() => {
|
|
2544
|
+
l.value = !1;
|
|
2545
|
+
});
|
|
2546
|
+
function C(e) {
|
|
2547
|
+
l.value && d.value && !d.value.contains(e.target) && (l.value = !1);
|
|
2548
|
+
}
|
|
2549
|
+
return g(() => document.addEventListener("click", C)), h(() => document.removeEventListener("click", C)), (n, r) => (y(), o("div", {
|
|
2550
|
+
ref_key: "rootEl",
|
|
2551
|
+
ref: d,
|
|
2552
|
+
class: m(t.block ? "relative w-full" : "relative inline-block")
|
|
2553
|
+
}, [s("button", {
|
|
2554
|
+
type: "button",
|
|
2555
|
+
class: m([p.value, t.block ? "w-full" : ""]),
|
|
2556
|
+
disabled: t.disabled,
|
|
2557
|
+
"aria-label": t.ariaLabel || void 0,
|
|
2558
|
+
"aria-haspopup": "listbox",
|
|
2559
|
+
"aria-expanded": l.value,
|
|
2560
|
+
onClick: v
|
|
2561
|
+
}, [s("span", { class: m(f.value ? "" : "text-slate-400 dark:text-slate-500") }, T(f.value ? f.value.label : t.placeholder), 3), u(E(ce), {
|
|
2562
|
+
class: m(["w-5 h-5 shrink-0 text-slate-500 dark:text-slate-400 transition-transform", l.value ? "rotate-180" : ""]),
|
|
2563
|
+
"aria-hidden": "true"
|
|
2564
|
+
}, null, 8, ["class"])], 10, yr), l.value ? (y(), o("ul", {
|
|
2565
|
+
key: 0,
|
|
2566
|
+
role: "listbox",
|
|
2567
|
+
"aria-label": t.ariaLabel || t.placeholder,
|
|
2568
|
+
class: "absolute z-20 mt-1 w-full 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"
|
|
2569
|
+
}, [(y(!0), o(e, null, x(t.options, (e) => (y(), o("li", {
|
|
2570
|
+
key: String(e.value),
|
|
2571
|
+
role: "option",
|
|
2572
|
+
"aria-selected": e.value === t.modelValue,
|
|
2573
|
+
title: e.title
|
|
2574
|
+
}, [s("button", {
|
|
2575
|
+
type: "button",
|
|
2576
|
+
disabled: e.disabled,
|
|
2577
|
+
class: m(_(e)),
|
|
2578
|
+
onClick: (t) => S(e)
|
|
2579
|
+
}, T(e.label), 11, Sr)], 8, xr))), 128))], 8, br)) : a("", !0)], 2));
|
|
2505
2580
|
}
|
|
2506
|
-
}),
|
|
2581
|
+
}), wr = ["role", "aria-label"], Tr = [
|
|
2507
2582
|
"aria-pressed",
|
|
2508
2583
|
"title",
|
|
2509
2584
|
"onClick"
|
|
2510
|
-
],
|
|
2585
|
+
], Er = "bg-slate-50 dark:bg-slate-900 text-slate-600 dark:text-slate-300 hover:bg-slate-100 dark:hover:bg-slate-800", Dr = /* @__PURE__ */ d({
|
|
2511
2586
|
__name: "BaseSegmentedControl",
|
|
2512
2587
|
props: {
|
|
2513
2588
|
options: {},
|
|
@@ -2524,7 +2599,7 @@ var on = ["aria-label", "aria-expanded"], sn = { class: "flex flex-col h-full" }
|
|
|
2524
2599
|
let i = t, a = n, s = r(() => i.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 = r(() => i.variant === "toolbar" ? "flex items-center px-3.5 text-xs font-semibold uppercase tracking-wide transition-colors focus:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-emerald-500" : `${i.variant === "wide" ? "px-4 py-2" : "px-3 py-2"} text-sm font-medium transition-colors border-l first:border-l-0 border-slate-300 dark:border-slate-600`), l = r(() => i.variant === "wide" ? "bg-emerald-600 text-white" : "bg-emerald-500 text-white");
|
|
2525
2600
|
function u(e) {
|
|
2526
2601
|
let t = e.value === i.modelValue;
|
|
2527
|
-
return i.optionClass ? i.optionClass(e, t) : t ? l.value :
|
|
2602
|
+
return i.optionClass ? i.optionClass(e, t) : t ? l.value : Er;
|
|
2528
2603
|
}
|
|
2529
2604
|
return (n, r) => (y(), o("div", {
|
|
2530
2605
|
role: t.ariaLabel ? "group" : void 0,
|
|
@@ -2537,9 +2612,9 @@ var on = ["aria-label", "aria-expanded"], sn = { class: "flex flex-col h-full" }
|
|
|
2537
2612
|
"aria-pressed": e.value === t.modelValue,
|
|
2538
2613
|
title: e.title,
|
|
2539
2614
|
onClick: (t) => a("update:modelValue", e.value)
|
|
2540
|
-
}, T(e.label), 11,
|
|
2615
|
+
}, T(e.label), 11, Tr))), 128))], 10, wr));
|
|
2541
2616
|
}
|
|
2542
|
-
}),
|
|
2617
|
+
}), Or = { class: "w-full text-sm" }, kr = { class: "bg-slate-50 dark:bg-slate-800/60 text-slate-600 dark:text-slate-300" }, Ar = { class: "text-left" }, jr = { key: 0 }, Mr = ["colspan"], Nr = /* @__PURE__ */ d({
|
|
2543
2618
|
__name: "BaseTable",
|
|
2544
2619
|
props: {
|
|
2545
2620
|
columns: {},
|
|
@@ -2550,24 +2625,24 @@ var on = ["aria-label", "aria-expanded"], sn = { class: "flex flex-col h-full" }
|
|
|
2550
2625
|
emptyText: { default: "No rows." }
|
|
2551
2626
|
},
|
|
2552
2627
|
setup(t) {
|
|
2553
|
-
return (n, r) => (y(), o("table",
|
|
2628
|
+
return (n, r) => (y(), o("table", Or, [s("thead", kr, [s("tr", Ar, [(y(!0), o(e, null, x(t.columns, (e, t) => (y(), o("th", {
|
|
2554
2629
|
key: t,
|
|
2555
2630
|
class: m(["px-4 py-3", e.align === "right" ? "text-right" : ""])
|
|
2556
|
-
}, T(e.label), 3))), 128))])]), s("tbody", null, [t.empty ? (y(), o("tr",
|
|
2631
|
+
}, T(e.label), 3))), 128))])]), s("tbody", null, [t.empty ? (y(), o("tr", jr, [s("td", {
|
|
2557
2632
|
colspan: t.columns.length,
|
|
2558
2633
|
class: "px-4 py-12 text-center text-slate-500"
|
|
2559
|
-
}, [S(n.$slots, "empty", {}, () => [l(T(t.emptyText), 1)])], 8,
|
|
2634
|
+
}, [S(n.$slots, "empty", {}, () => [l(T(t.emptyText), 1)])], 8, Mr)])) : a("", !0), S(n.$slots, "default")])]));
|
|
2560
2635
|
}
|
|
2561
|
-
}),
|
|
2636
|
+
}), Pr = { class: "grid gap-3 md:grid-cols-2" }, Fr = {
|
|
2562
2637
|
key: 0,
|
|
2563
2638
|
class: "block text-[11px] uppercase tracking-wide text-slate-500 mb-1"
|
|
2564
|
-
},
|
|
2639
|
+
}, Ir = ["value"], Lr = {
|
|
2565
2640
|
key: 2,
|
|
2566
2641
|
class: "flex items-center gap-2 mt-4"
|
|
2567
|
-
},
|
|
2642
|
+
}, Rr = ["checked", "onChange"], zr = { class: "text-sm text-slate-900 dark:text-slate-100" }, Br = {
|
|
2568
2643
|
key: 4,
|
|
2569
2644
|
class: "text-[11px] text-slate-400 mt-1"
|
|
2570
|
-
},
|
|
2645
|
+
}, Vr = /* @__PURE__ */ d({
|
|
2571
2646
|
__name: "BaseSpecFields",
|
|
2572
2647
|
props: {
|
|
2573
2648
|
specs: {},
|
|
@@ -2583,9 +2658,9 @@ var on = ["aria-label", "aria-expanded"], sn = { class: "flex flex-col h-full" }
|
|
|
2583
2658
|
let n = parseFloat(t);
|
|
2584
2659
|
r("update", e, Number.isNaN(n) ? t : n);
|
|
2585
2660
|
}
|
|
2586
|
-
return (n, u) => (y(), o("div",
|
|
2587
|
-
u.type === "boolean" ? a("", !0) : (y(), o("label",
|
|
2588
|
-
u.type === "select" ? (y(), i(
|
|
2661
|
+
return (n, u) => (y(), o("div", Pr, [(y(!0), o(e, null, x(t.specs, (u) => (y(), o("div", { key: u.key }, [
|
|
2662
|
+
u.type === "boolean" ? a("", !0) : (y(), o("label", Fr, T(u.label), 1)),
|
|
2663
|
+
u.type === "select" ? (y(), i(vr, {
|
|
2589
2664
|
key: 1,
|
|
2590
2665
|
modelValue: String(t.params[u.key] ?? ""),
|
|
2591
2666
|
"onUpdate:modelValue": (e) => r("update", u.key, e)
|
|
@@ -2593,14 +2668,14 @@ var on = ["aria-label", "aria-expanded"], sn = { class: "flex flex-col h-full" }
|
|
|
2593
2668
|
default: M(() => [(y(!0), o(e, null, x(u.options ?? [], (e) => (y(), o("option", {
|
|
2594
2669
|
key: e,
|
|
2595
2670
|
value: e
|
|
2596
|
-
}, T(e), 9,
|
|
2671
|
+
}, T(e), 9, Ir))), 128))]),
|
|
2597
2672
|
_: 2
|
|
2598
|
-
}, 1032, ["modelValue", "onUpdate:modelValue"])) : u.type === "boolean" ? (y(), o("label",
|
|
2673
|
+
}, 1032, ["modelValue", "onUpdate:modelValue"])) : u.type === "boolean" ? (y(), o("label", Lr, [s("input", {
|
|
2599
2674
|
checked: !!t.params[u.key],
|
|
2600
2675
|
type: "checkbox",
|
|
2601
2676
|
class: "h-4 w-4",
|
|
2602
2677
|
onChange: (e) => c(u.key, e)
|
|
2603
|
-
}, null, 40,
|
|
2678
|
+
}, null, 40, Rr), s("span", zr, T(u.label), 1)])) : (y(), i(gr, {
|
|
2604
2679
|
key: 3,
|
|
2605
2680
|
modelValue: t.params[u.key],
|
|
2606
2681
|
type: "number",
|
|
@@ -2613,14 +2688,14 @@ var on = ["aria-label", "aria-expanded"], sn = { class: "flex flex-col h-full" }
|
|
|
2613
2688
|
"min",
|
|
2614
2689
|
"onUpdate:modelValue"
|
|
2615
2690
|
])),
|
|
2616
|
-
u.help ? (y(), o("p",
|
|
2691
|
+
u.help ? (y(), o("p", Br, T(u.help), 1)) : a("", !0),
|
|
2617
2692
|
S(n.$slots, "after", { spec: u })
|
|
2618
2693
|
]))), 128))]));
|
|
2619
2694
|
}
|
|
2620
2695
|
});
|
|
2621
2696
|
//#endregion
|
|
2622
2697
|
//#region src/composables/useDebounce.ts
|
|
2623
|
-
function
|
|
2698
|
+
function Hr(e, t = 300) {
|
|
2624
2699
|
let n = b(e.value), r = null;
|
|
2625
2700
|
return j(e, (e) => {
|
|
2626
2701
|
r && clearTimeout(r), r = setTimeout(() => {
|
|
@@ -2632,12 +2707,12 @@ function Ir(e, t = 300) {
|
|
|
2632
2707
|
}
|
|
2633
2708
|
//#endregion
|
|
2634
2709
|
//#region src/composables/useToast.ts
|
|
2635
|
-
function
|
|
2636
|
-
let t = b(!1), n = b(""), r = b(
|
|
2710
|
+
function Ur(e = 3e3) {
|
|
2711
|
+
let t = b(!1), n = b(""), r = b(K.SUCCESS), i = null;
|
|
2637
2712
|
function a() {
|
|
2638
2713
|
i &&= (clearTimeout(i), null);
|
|
2639
2714
|
}
|
|
2640
|
-
function o(o, s =
|
|
2715
|
+
function o(o, s = K.SUCCESS, c = e) {
|
|
2641
2716
|
n.value = o, r.value = s, t.value = !0, a(), i = setTimeout(() => {
|
|
2642
2717
|
t.value = !1, i = null;
|
|
2643
2718
|
}, c);
|
|
@@ -2653,16 +2728,16 @@ function Lr(e = 3e3) {
|
|
|
2653
2728
|
}
|
|
2654
2729
|
//#endregion
|
|
2655
2730
|
//#region src/enums/BaseBadgeEnum.ts
|
|
2656
|
-
var
|
|
2731
|
+
var Wr = /* @__PURE__ */ function(e) {
|
|
2657
2732
|
return e.WIN = "WIN", e.LOSE = "LOSE", e;
|
|
2658
|
-
}({}),
|
|
2733
|
+
}({}), Gr = {
|
|
2659
2734
|
GET: "bg-blue-600",
|
|
2660
2735
|
POST: "bg-emerald-600",
|
|
2661
2736
|
PUT: "bg-amber-600",
|
|
2662
2737
|
DELETE: "bg-red-600",
|
|
2663
2738
|
PATCH: "bg-purple-600",
|
|
2664
2739
|
HEAD: "bg-gray-600"
|
|
2665
|
-
},
|
|
2740
|
+
}, Kr = {
|
|
2666
2741
|
GET: "bg-blue-500",
|
|
2667
2742
|
POST: "bg-green-500",
|
|
2668
2743
|
PUT: "bg-yellow-500",
|
|
@@ -2670,23 +2745,23 @@ var Rr = /* @__PURE__ */ function(e) {
|
|
|
2670
2745
|
PATCH: "bg-purple-500",
|
|
2671
2746
|
HEAD: "bg-gray-500"
|
|
2672
2747
|
};
|
|
2673
|
-
function
|
|
2674
|
-
return e ?
|
|
2748
|
+
function qr(e) {
|
|
2749
|
+
return e ? Gr[e.toUpperCase()] ?? "bg-gray-600" : "bg-gray-600";
|
|
2675
2750
|
}
|
|
2676
|
-
function
|
|
2677
|
-
return e ?
|
|
2751
|
+
function Jr(e) {
|
|
2752
|
+
return e ? Kr[e.toUpperCase()] ?? "bg-gray-500" : "bg-gray-500";
|
|
2678
2753
|
}
|
|
2679
|
-
function
|
|
2754
|
+
function Yr(e) {
|
|
2680
2755
|
let t = e ?? 0;
|
|
2681
2756
|
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";
|
|
2682
2757
|
}
|
|
2683
|
-
function
|
|
2758
|
+
function Xr(e, t) {
|
|
2684
2759
|
let n = e ?? 200;
|
|
2685
2760
|
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";
|
|
2686
2761
|
}
|
|
2687
2762
|
//#endregion
|
|
2688
2763
|
//#region src/utils/sanitizeHtml.ts
|
|
2689
|
-
var
|
|
2764
|
+
var Zr = /* @__PURE__ */ new Set([
|
|
2690
2765
|
"A",
|
|
2691
2766
|
"B",
|
|
2692
2767
|
"STRONG",
|
|
@@ -2701,7 +2776,7 @@ var Gr = /* @__PURE__ */ new Set([
|
|
|
2701
2776
|
"LI",
|
|
2702
2777
|
"SPAN",
|
|
2703
2778
|
"DIV"
|
|
2704
|
-
]),
|
|
2779
|
+
]), Qr = /* @__PURE__ */ new Set([
|
|
2705
2780
|
"SCRIPT",
|
|
2706
2781
|
"STYLE",
|
|
2707
2782
|
"IFRAME",
|
|
@@ -2709,53 +2784,53 @@ var Gr = /* @__PURE__ */ new Set([
|
|
|
2709
2784
|
"EMBED",
|
|
2710
2785
|
"NOSCRIPT",
|
|
2711
2786
|
"TEMPLATE"
|
|
2712
|
-
]),
|
|
2713
|
-
function
|
|
2787
|
+
]), $r = { A: /* @__PURE__ */ new Set(["href", "title"]) };
|
|
2788
|
+
function ei(e) {
|
|
2714
2789
|
let t = e.trim().toLowerCase();
|
|
2715
2790
|
return t.startsWith("http://") || t.startsWith("https://") || t.startsWith("mailto:") || t.startsWith("tel:") || t.startsWith("/") || t.startsWith("#") || t === "";
|
|
2716
2791
|
}
|
|
2717
|
-
function
|
|
2792
|
+
function ti(e) {
|
|
2718
2793
|
if (e.nodeType !== Node.ELEMENT_NODE) return;
|
|
2719
2794
|
let t = e, n = t.tagName.toUpperCase();
|
|
2720
|
-
if (!
|
|
2721
|
-
|
|
2795
|
+
if (!Zr.has(n)) {
|
|
2796
|
+
Qr.has(n) ? t.remove() : t.replaceWith(document.createTextNode(t.textContent ?? ""));
|
|
2722
2797
|
return;
|
|
2723
2798
|
}
|
|
2724
|
-
let r =
|
|
2799
|
+
let r = $r[n] ?? /* @__PURE__ */ new Set();
|
|
2725
2800
|
for (let e of Array.from(t.attributes)) {
|
|
2726
2801
|
if (!r.has(e.name.toLowerCase())) {
|
|
2727
2802
|
t.removeAttribute(e.name);
|
|
2728
2803
|
continue;
|
|
2729
2804
|
}
|
|
2730
|
-
n === "A" && e.name.toLowerCase() === "href" && !
|
|
2805
|
+
n === "A" && e.name.toLowerCase() === "href" && !ei(e.value) && t.removeAttribute(e.name);
|
|
2731
2806
|
}
|
|
2732
2807
|
n === "A" && t.hasAttribute("href") && (t.setAttribute("rel", "noopener noreferrer"), t.setAttribute("target", "_blank"));
|
|
2733
|
-
for (let e of Array.from(t.childNodes))
|
|
2808
|
+
for (let e of Array.from(t.childNodes)) ti(e);
|
|
2734
2809
|
}
|
|
2735
|
-
function
|
|
2810
|
+
function ni(e) {
|
|
2736
2811
|
if (!e) return "";
|
|
2737
2812
|
let t = new DOMParser().parseFromString(`<div>${e}</div>`, "text/html").body.firstElementChild;
|
|
2738
2813
|
if (!t) return "";
|
|
2739
|
-
for (let e of Array.from(t.childNodes))
|
|
2814
|
+
for (let e of Array.from(t.childNodes)) ti(e);
|
|
2740
2815
|
return t.innerHTML;
|
|
2741
2816
|
}
|
|
2742
2817
|
//#endregion
|
|
2743
2818
|
//#region src/utils/format.ts
|
|
2744
|
-
var
|
|
2745
|
-
function
|
|
2746
|
-
if (e == null || typeof e == "string" && e.trim() === "") return
|
|
2819
|
+
var ri = "—";
|
|
2820
|
+
function ii(e, t = 4) {
|
|
2821
|
+
if (e == null || typeof e == "string" && e.trim() === "") return ri;
|
|
2747
2822
|
let n = typeof e == "string" ? Number(e) : e;
|
|
2748
2823
|
return isFinite(n) ? n.toLocaleString(void 0, {
|
|
2749
2824
|
minimumFractionDigits: t,
|
|
2750
2825
|
maximumFractionDigits: t
|
|
2751
|
-
}) :
|
|
2826
|
+
}) : ri;
|
|
2752
2827
|
}
|
|
2753
|
-
function
|
|
2754
|
-
if (e == null || e === "") return
|
|
2828
|
+
function ai(e) {
|
|
2829
|
+
if (e == null || e === "") return ri;
|
|
2755
2830
|
let t = new Date(e);
|
|
2756
2831
|
return isNaN(t.getTime()) ? String(e) : t.toLocaleString();
|
|
2757
2832
|
}
|
|
2758
|
-
function
|
|
2833
|
+
function oi(e) {
|
|
2759
2834
|
return new Date(e).toLocaleString(void 0, {
|
|
2760
2835
|
month: "short",
|
|
2761
2836
|
day: "numeric",
|
|
@@ -2763,13 +2838,13 @@ function ei(e) {
|
|
|
2763
2838
|
minute: "2-digit"
|
|
2764
2839
|
});
|
|
2765
2840
|
}
|
|
2766
|
-
function
|
|
2841
|
+
function si(e) {
|
|
2767
2842
|
return new Date(e).toLocaleDateString(void 0, {
|
|
2768
2843
|
month: "short",
|
|
2769
2844
|
day: "numeric"
|
|
2770
2845
|
});
|
|
2771
2846
|
}
|
|
2772
|
-
function
|
|
2847
|
+
function ci(e) {
|
|
2773
2848
|
if (!isFinite(e) || e === 0) return e.toFixed(2);
|
|
2774
2849
|
let t = Math.abs(e), n = 2;
|
|
2775
2850
|
return t < 1e-4 ? n = 8 : t < .01 ? n = 6 : t < 1 ? n = 4 : t < 100 && (n = 3), e.toLocaleString(void 0, {
|
|
@@ -2777,15 +2852,15 @@ function ni(e) {
|
|
|
2777
2852
|
maximumFractionDigits: n
|
|
2778
2853
|
});
|
|
2779
2854
|
}
|
|
2780
|
-
function
|
|
2855
|
+
function li(e, t = 2) {
|
|
2781
2856
|
return `${e >= 0 ? "+" : ""}${e.toFixed(t)}%`;
|
|
2782
2857
|
}
|
|
2783
|
-
function
|
|
2858
|
+
function ui(e) {
|
|
2784
2859
|
return `${e < 0 ? "-" : "+"}$${Math.abs(e).toFixed(2)}`;
|
|
2785
2860
|
}
|
|
2786
2861
|
//#endregion
|
|
2787
2862
|
//#region src/utils/pnl.ts
|
|
2788
|
-
function
|
|
2863
|
+
function di(e) {
|
|
2789
2864
|
if (e.buyPrice == null || e.lastPrice == null || e.filledQty == null) return {
|
|
2790
2865
|
pnlUsd: null,
|
|
2791
2866
|
pnlPct: null
|
|
@@ -2800,4 +2875,4 @@ function ai(e) {
|
|
|
2800
2875
|
};
|
|
2801
2876
|
}
|
|
2802
2877
|
//#endregion
|
|
2803
|
-
export {
|
|
2878
|
+
export { I as AlertEnum, Un as BaseActionButton, Oe as BaseAlert, Nn as BaseAppLayout, R as BaseBadge, Wr as BaseBadgeEnum, Ne as BaseBreadcrumb, Ge as BaseButton, z as BaseButtonEnum, B as BaseButtonSizeEnum, Vt as BaseCollapsibleSection, Gt as BaseConfirmModal, Gn as BaseCopyButton, Cr as BaseDropdown, An as BaseEntityPickerModal, Yn as BaseGoogleSignInButton, gr as BaseInput, Ye as BaseLine, Xe as BaseLoginEnum, sr as BaseLoginForm, Qe as BaseLogo, G as BaseLogoEnum, at as BaseModal, $e as BaseModalEnum, Rt as BaseModalShell, Qt as BaseNotFoundPage, mr as BaseNotificationPanel, Ln as BasePageHeader, ot as BaseRow, Dr as BaseSegmentedControl, vr as BaseSelect, _n as BaseSidebar, Vr as BaseSpecFields, st as BaseSpinner, Nr as BaseTable, Yt as BaseTextInputModal, ut as BaseToast, K as BaseToastEnum, Bn as BaseToolbarButton, ft as ColoredSquares, L as ColorsEnums, ht as EarningsCard, bt as EuroAmount, W as LineEnum, wt as Pagination, q as PositioningEnum, kt as TrendArrow, di as computePnL, ai as fmtDate, si as fmtDateShort, oi as fmtDateTime, ii as fmtNumber, li as fmtPct, ci as fmtPrice, ui as fmtUsd, Te as getBaseColor, Ee as getBaseColorOf, Ie as initTheme, ei as isSafeHref, Jr as methodBadgeBright, qr as methodBadgeSolid, ni as sanitizeHtml, Yr as statusBadgeSolid, Xr as statusBadgeTinted, Hr as useDebouncedRef, Y as useEscapeKey, $t as useMobileSidebar, on as useNotifications, rn as useSidebarCollapse, U as useTheme, J as useThemeClasses, Ur as useToast };
|