mgv-backoffice 1.23.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/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 +460 -389
- 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/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" },
|
|
@@ -1017,7 +1017,7 @@ var Fe = [
|
|
|
1017
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", {
|
|
1018
1018
|
key: 0,
|
|
1019
1019
|
class: m(["absolute right-4 top-4 rounded-md px-3 py-1 text-xs font-bold tracking-wide", d.value.badge])
|
|
1020
|
-
}, T(t.badge), 3)) : a("", !0), s("div",
|
|
1020
|
+
}, T(t.badge), 3)) : a("", !0), s("div", pt, [s("div", mt, [
|
|
1021
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
1022
|
s("p", { class: m(["mt-1 font-bold truncate", [d.value.amount, t.compact ? "text-lg" : "text-4xl"]]) }, T(f.value), 3),
|
|
1023
1023
|
s("p", { class: m(["mt-1 font-medium", [d.value.subtitle, t.compact ? "text-xs" : "text-sm"]]) }, T(t.subtitle), 3)
|
|
@@ -1031,10 +1031,10 @@ var Fe = [
|
|
|
1031
1031
|
"stroke-linejoin": "round"
|
|
1032
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));
|
|
1033
1033
|
}
|
|
1034
|
-
}),
|
|
1034
|
+
}), gt = {
|
|
1035
1035
|
key: 0,
|
|
1036
1036
|
class: "font-bold text-green-800"
|
|
1037
|
-
},
|
|
1037
|
+
}, _t = { key: 0 }, vt = { key: 0 }, yt = "font-bold", bt = /* @__PURE__ */ d({
|
|
1038
1038
|
__name: "EuroAmount",
|
|
1039
1039
|
props: {
|
|
1040
1040
|
amount: {
|
|
@@ -1054,15 +1054,15 @@ var Fe = [
|
|
|
1054
1054
|
},
|
|
1055
1055
|
setup(t) {
|
|
1056
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));
|
|
1057
|
-
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", {
|
|
1058
1058
|
key: 1,
|
|
1059
|
-
class: m([
|
|
1060
|
-
}, [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));
|
|
1061
1061
|
}
|
|
1062
|
-
}),
|
|
1062
|
+
}), xt = { class: "flex list-none p-0 m-0" }, St = ["onClick", "onKeydown"], Ct = {
|
|
1063
1063
|
key: 1,
|
|
1064
1064
|
class: "inline-block border border-gray-300 rounded-lg p-3 text-black cursor-not-allowed"
|
|
1065
|
-
},
|
|
1065
|
+
}, wt = /* @__PURE__ */ d({
|
|
1066
1066
|
__name: "Pagination",
|
|
1067
1067
|
props: {
|
|
1068
1068
|
totalItems: {
|
|
@@ -1092,28 +1092,28 @@ var Fe = [
|
|
|
1092
1092
|
}
|
|
1093
1093
|
return j(() => [r.totalItems, r.itemsPerPage], () => {
|
|
1094
1094
|
a.value = Math.ceil(r.totalItems / r.itemsPerPage), i.value > a.value && (i.value = Math.max(1, a.value)), u(i.value);
|
|
1095
|
-
}, { 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", {
|
|
1096
1096
|
key: t,
|
|
1097
1097
|
class: "mr-1"
|
|
1098
|
-
}, [e === 0 ? (y(), o("span",
|
|
1098
|
+
}, [e === 0 ? (y(), o("span", Ct, "...")) : (y(), o("a", {
|
|
1099
1099
|
key: 0,
|
|
1100
1100
|
role: "button",
|
|
1101
1101
|
tabindex: "0",
|
|
1102
1102
|
onClick: (t) => d(e),
|
|
1103
1103
|
onKeydown: P((t) => d(e), ["enter"]),
|
|
1104
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 }])
|
|
1105
|
-
}, T(e), 43,
|
|
1105
|
+
}, T(e), 43, St))]))), 128))])]));
|
|
1106
1106
|
}
|
|
1107
|
-
}),
|
|
1107
|
+
}), Tt = { key: 0 }, Et = {
|
|
1108
1108
|
key: 0,
|
|
1109
1109
|
class: "flex items-center space-x-2"
|
|
1110
|
-
},
|
|
1110
|
+
}, Dt = {
|
|
1111
1111
|
key: 1,
|
|
1112
1112
|
class: "flex items-center space-x-2"
|
|
1113
|
-
},
|
|
1113
|
+
}, Ot = {
|
|
1114
1114
|
key: 2,
|
|
1115
1115
|
class: "flex items-center space-x-2"
|
|
1116
|
-
},
|
|
1116
|
+
}, kt = /* @__PURE__ */ d({
|
|
1117
1117
|
__name: "TrendArrow",
|
|
1118
1118
|
props: {
|
|
1119
1119
|
number: {
|
|
@@ -1127,13 +1127,13 @@ var Fe = [
|
|
|
1127
1127
|
},
|
|
1128
1128
|
setup(e) {
|
|
1129
1129
|
let t = e, n = r(() => t.number !== null && t.number !== void 0 && t.number < 0), i = r(() => t.number === 0);
|
|
1130
|
-
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 }, {
|
|
1131
1131
|
default: M(() => [l(T(e.number) + T(t.icon), 1)]),
|
|
1132
1132
|
_: 1
|
|
1133
|
-
}, 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 }, {
|
|
1134
1134
|
default: M(() => [l(T(e.number) + T(t.icon), 1)]),
|
|
1135
1135
|
_: 1
|
|
1136
|
-
}, 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 }, {
|
|
1137
1137
|
default: M(() => [l(T(e.number) + T(t.icon), 1)]),
|
|
1138
1138
|
_: 1
|
|
1139
1139
|
}, 8, ["color"]), u(E(ne), { class: "h-5 w-5 text-green-500" })]))])) : a("", !0);
|
|
@@ -1141,8 +1141,8 @@ var Fe = [
|
|
|
1141
1141
|
});
|
|
1142
1142
|
//#endregion
|
|
1143
1143
|
//#region src/composables/useThemeClasses.ts
|
|
1144
|
-
function
|
|
1145
|
-
let { isDark: e } =
|
|
1144
|
+
function J() {
|
|
1145
|
+
let { isDark: e } = U();
|
|
1146
1146
|
return {
|
|
1147
1147
|
card: r(() => e.value ? "bg-gray-800 border-gray-700" : "bg-white border-gray-200"),
|
|
1148
1148
|
cardAlt: r(() => e.value ? "bg-gray-900 border-gray-700" : "bg-white border-gray-200"),
|
|
@@ -1169,7 +1169,7 @@ function Y() {
|
|
|
1169
1169
|
}
|
|
1170
1170
|
//#endregion
|
|
1171
1171
|
//#region src/composables/useEscapeKey.ts
|
|
1172
|
-
function
|
|
1172
|
+
function Y(e) {
|
|
1173
1173
|
function t(t) {
|
|
1174
1174
|
t.key === "Escape" && e();
|
|
1175
1175
|
}
|
|
@@ -1177,7 +1177,7 @@ function Ot(e) {
|
|
|
1177
1177
|
}
|
|
1178
1178
|
//#endregion
|
|
1179
1179
|
//#region src/components/BaseModalShell.vue?vue&type=script&setup=true&lang.ts
|
|
1180
|
-
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({
|
|
1181
1181
|
__name: "BaseModalShell",
|
|
1182
1182
|
props: {
|
|
1183
1183
|
title: {},
|
|
@@ -1194,11 +1194,11 @@ var kt = { class: "flex items-start gap-4 min-w-0" }, At = { class: "flex-1 min-
|
|
|
1194
1194
|
},
|
|
1195
1195
|
emits: ["cancel", "backdrop"],
|
|
1196
1196
|
setup(e, { emit: n }) {
|
|
1197
|
-
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");
|
|
1198
1198
|
function h() {
|
|
1199
1199
|
l("backdrop"), c.manualClose || l("cancel");
|
|
1200
1200
|
}
|
|
1201
|
-
return
|
|
1201
|
+
return Y(() => {
|
|
1202
1202
|
c.manualClose || l("cancel");
|
|
1203
1203
|
}), (n, r) => (y(), i(t, { to: "body" }, [s("div", {
|
|
1204
1204
|
class: "fixed inset-0 z-50 flex items-center justify-center bg-black/50",
|
|
@@ -1211,14 +1211,14 @@ var kt = { class: "flex items-start gap-4 min-w-0" }, At = { class: "flex-1 min-
|
|
|
1211
1211
|
class: m(["relative w-full mx-4 rounded-lg shadow-xl max-h-[90vh] flex flex-col", [e.maxWidthClass, p.value]]),
|
|
1212
1212
|
onClick: r[0] ||= F(() => {}, ["stop"])
|
|
1213
1213
|
}, [
|
|
1214
|
-
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", {
|
|
1215
1215
|
id: f,
|
|
1216
1216
|
class: m(["text-lg font-medium", E(d).primaryText])
|
|
1217
1217
|
}, T(e.title), 3), e.subtitle ? (y(), o("p", {
|
|
1218
1218
|
key: 0,
|
|
1219
1219
|
class: m(["text-sm mt-1 break-all", E(d).mutedText])
|
|
1220
1220
|
}, T(e.subtitle), 3)) : a("", !0)])]), S(n.$slots, "header-actions")], 2),
|
|
1221
|
-
s("div",
|
|
1221
|
+
s("div", Mt, [S(n.$slots, "default")]),
|
|
1222
1222
|
n.$slots.footer ? (y(), o("div", {
|
|
1223
1223
|
key: 0,
|
|
1224
1224
|
class: m(["flex gap-3 justify-end p-6 border-t shrink-0", E(d).border])
|
|
@@ -1227,16 +1227,16 @@ var kt = { class: "flex items-start gap-4 min-w-0" }, At = { class: "flex-1 min-
|
|
|
1227
1227
|
key: 1,
|
|
1228
1228
|
class: m(["relative w-full mx-4 rounded-lg shadow-xl", [e.maxWidthClass, p.value]]),
|
|
1229
1229
|
onClick: r[1] ||= F(() => {}, ["stop"])
|
|
1230
|
-
}, [s("div",
|
|
1231
|
-
s("div",
|
|
1230
|
+
}, [s("div", Nt, [
|
|
1231
|
+
s("div", Pt, [S(n.$slots, "icon"), s("div", Ft, [s("h3", {
|
|
1232
1232
|
id: f,
|
|
1233
1233
|
class: m(["text-lg font-medium", E(d).primaryText])
|
|
1234
1234
|
}, T(e.title), 3)])]),
|
|
1235
|
-
s("div",
|
|
1236
|
-
s("div",
|
|
1235
|
+
s("div", It, [S(n.$slots, "default")]),
|
|
1236
|
+
s("div", Lt, [S(n.$slots, "footer")])
|
|
1237
1237
|
])], 2))])]));
|
|
1238
1238
|
}
|
|
1239
|
-
}),
|
|
1239
|
+
}), zt = ["aria-expanded"], Bt = { class: "flex items-center gap-3" }, Vt = /* @__PURE__ */ d({
|
|
1240
1240
|
__name: "BaseCollapsibleSection",
|
|
1241
1241
|
props: {
|
|
1242
1242
|
title: {},
|
|
@@ -1246,13 +1246,13 @@ var kt = { class: "flex items-start gap-4 min-w-0" }, At = { class: "flex-1 min-
|
|
|
1246
1246
|
},
|
|
1247
1247
|
emits: ["toggle"],
|
|
1248
1248
|
setup(e, { emit: t }) {
|
|
1249
|
-
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);
|
|
1250
1250
|
return (t, n) => (y(), o("section", { class: m(["rounded-xl border overflow-hidden transition-colors", E(l).cardAlt]) }, [s("button", {
|
|
1251
1251
|
type: "button",
|
|
1252
1252
|
class: m(["w-full flex items-center justify-between p-4 text-left transition-colors", d.value]),
|
|
1253
1253
|
"aria-expanded": !e.collapsed,
|
|
1254
1254
|
onClick: n[0] ||= (e) => i("toggle")
|
|
1255
|
-
}, [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", {
|
|
1256
1256
|
key: 0,
|
|
1257
1257
|
class: m(["text-xs px-2 py-0.5 rounded-full", f.value])
|
|
1258
1258
|
}, T(e.badge), 3)) : a("", !0)]), (y(), o("svg", {
|
|
@@ -1266,15 +1266,15 @@ var kt = { class: "flex items-start gap-4 min-w-0" }, At = { class: "flex-1 min-
|
|
|
1266
1266
|
"stroke-linecap": "round",
|
|
1267
1267
|
"stroke-linejoin": "round",
|
|
1268
1268
|
d: "M19 9l-7 7-7-7"
|
|
1269
|
-
}, 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));
|
|
1270
1270
|
}
|
|
1271
|
-
}),
|
|
1271
|
+
}), Ht = ["disabled"], Ut = ["disabled"], Wt = {
|
|
1272
1272
|
key: 0,
|
|
1273
1273
|
class: "w-4 h-4 animate-spin",
|
|
1274
1274
|
fill: "none",
|
|
1275
1275
|
viewBox: "0 0 24 24",
|
|
1276
1276
|
"aria-hidden": "true"
|
|
1277
|
-
},
|
|
1277
|
+
}, Gt = /* @__PURE__ */ d({
|
|
1278
1278
|
__name: "BaseConfirmModal",
|
|
1279
1279
|
props: {
|
|
1280
1280
|
title: {},
|
|
@@ -1290,19 +1290,19 @@ var kt = { class: "flex items-start gap-4 min-w-0" }, At = { class: "flex-1 min-
|
|
|
1290
1290
|
},
|
|
1291
1291
|
emits: ["confirm", "cancel"],
|
|
1292
1292
|
setup(e, { emit: t }) {
|
|
1293
|
-
let n = e, r = t, { isDark: c } =
|
|
1293
|
+
let n = e, r = t, { isDark: c } = U(), d = J();
|
|
1294
1294
|
function f() {
|
|
1295
1295
|
n.submitting || r("confirm");
|
|
1296
1296
|
}
|
|
1297
1297
|
function p() {
|
|
1298
1298
|
n.submitting || r("cancel");
|
|
1299
1299
|
}
|
|
1300
|
-
return (t, n) => (y(), i(
|
|
1300
|
+
return (t, n) => (y(), i(Rt, {
|
|
1301
1301
|
title: e.title,
|
|
1302
1302
|
"manual-close": e.submitting,
|
|
1303
1303
|
onCancel: p
|
|
1304
1304
|
}, {
|
|
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(
|
|
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), {
|
|
1306
1306
|
class: m(["h-6 w-6", e.variant === "danger" ? "text-red-600" : "text-amber-600"]),
|
|
1307
1307
|
"aria-hidden": "true"
|
|
1308
1308
|
}, null, 8, ["class"])], 2)]),
|
|
@@ -1311,12 +1311,12 @@ var kt = { class: "flex items-start gap-4 min-w-0" }, At = { class: "flex-1 min-
|
|
|
1311
1311
|
disabled: e.submitting,
|
|
1312
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"]]),
|
|
1313
1313
|
onClick: p
|
|
1314
|
-
}, T(e.cancelText), 11,
|
|
1314
|
+
}, T(e.cancelText), 11, Ht), s("button", {
|
|
1315
1315
|
type: "button",
|
|
1316
1316
|
disabled: e.submitting,
|
|
1317
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"]]),
|
|
1318
1318
|
onClick: f
|
|
1319
|
-
}, [e.submitting ? (y(), o("svg",
|
|
1319
|
+
}, [e.submitting ? (y(), o("svg", Wt, [...n[0] ||= [s("circle", {
|
|
1320
1320
|
class: "opacity-25",
|
|
1321
1321
|
cx: "12",
|
|
1322
1322
|
cy: "12",
|
|
@@ -1327,12 +1327,12 @@ var kt = { class: "flex items-start gap-4 min-w-0" }, At = { class: "flex-1 min-
|
|
|
1327
1327
|
class: "opacity-75",
|
|
1328
1328
|
fill: "currentColor",
|
|
1329
1329
|
d: "M4 12a8 8 0 018-8v4a4 4 0 00-4 4H4z"
|
|
1330
|
-
}, 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)]),
|
|
1331
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")]),
|
|
1332
1332
|
_: 3
|
|
1333
1333
|
}, 8, ["title", "manual-close"]));
|
|
1334
1334
|
}
|
|
1335
|
-
}),
|
|
1335
|
+
}), Kt = { class: "mt-4" }, qt = ["placeholder"], Jt = ["disabled"], Yt = /* @__PURE__ */ d({
|
|
1336
1336
|
__name: "BaseTextInputModal",
|
|
1337
1337
|
props: {
|
|
1338
1338
|
title: {},
|
|
@@ -1350,7 +1350,7 @@ var kt = { class: "flex items-start gap-4 min-w-0" }, At = { class: "flex-1 min-
|
|
|
1350
1350
|
},
|
|
1351
1351
|
emits: ["confirm", "cancel"],
|
|
1352
1352
|
setup(e, { emit: t }) {
|
|
1353
|
-
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);
|
|
1354
1354
|
g(async () => {
|
|
1355
1355
|
await p(), l.value?.focus();
|
|
1356
1356
|
});
|
|
@@ -1363,12 +1363,12 @@ var kt = { class: "flex items-start gap-4 min-w-0" }, At = { class: "flex-1 min-
|
|
|
1363
1363
|
function h() {
|
|
1364
1364
|
c.value.trim() === (n.initialValue ?? "").trim() && f();
|
|
1365
1365
|
}
|
|
1366
|
-
return
|
|
1366
|
+
return Y(f), (t, n) => (y(), i(Rt, {
|
|
1367
1367
|
title: e.title,
|
|
1368
1368
|
"manual-close": "",
|
|
1369
1369
|
onBackdrop: h
|
|
1370
1370
|
}, {
|
|
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(
|
|
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), {
|
|
1372
1372
|
class: "h-6 w-6 text-emerald-600",
|
|
1373
1373
|
"aria-hidden": "true"
|
|
1374
1374
|
})], 2)])]),
|
|
@@ -1381,8 +1381,8 @@ var kt = { class: "flex items-start gap-4 min-w-0" }, At = { class: "flex-1 min-
|
|
|
1381
1381
|
disabled: !c.value.trim() || e.submitting,
|
|
1382
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"]]),
|
|
1383
1383
|
onClick: d
|
|
1384
|
-
}, T(e.submitting ? e.submittingText : e.confirmText), 11,
|
|
1385
|
-
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", {
|
|
1386
1386
|
ref_key: "nameInput",
|
|
1387
1387
|
ref: l,
|
|
1388
1388
|
"onUpdate:modelValue": n[0] ||= (e) => c.value = e,
|
|
@@ -1390,11 +1390,11 @@ var kt = { class: "flex items-start gap-4 min-w-0" }, At = { class: "flex-1 min-
|
|
|
1390
1390
|
placeholder: e.placeholder,
|
|
1391
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"]),
|
|
1392
1392
|
onKeyup: P(d, ["enter"])
|
|
1393
|
-
}, null, 42,
|
|
1393
|
+
}, null, 42, qt), [[A, c.value]])])]),
|
|
1394
1394
|
_: 3
|
|
1395
1395
|
}, 8, ["title"]));
|
|
1396
1396
|
}
|
|
1397
|
-
}),
|
|
1397
|
+
}), Xt = { class: "flex items-center justify-center min-h-[60vh]" }, Zt = { class: "text-center px-6" }, Qt = /* @__PURE__ */ d({
|
|
1398
1398
|
__name: "BaseNotFoundPage",
|
|
1399
1399
|
props: {
|
|
1400
1400
|
code: { default: "404" },
|
|
@@ -1403,12 +1403,12 @@ var kt = { class: "flex items-start gap-4 min-w-0" }, At = { class: "flex-1 min-
|
|
|
1403
1403
|
homeLabel: { default: "Go home" }
|
|
1404
1404
|
},
|
|
1405
1405
|
setup(e) {
|
|
1406
|
-
let t = e, n =
|
|
1406
|
+
let t = e, n = we(), { isDark: r } = U(), i = J();
|
|
1407
1407
|
function a() {
|
|
1408
1408
|
n.push({ name: t.homeRouteName });
|
|
1409
1409
|
}
|
|
1410
|
-
return (t, n) => (y(), o("div",
|
|
1411
|
-
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"]),
|
|
1412
1412
|
s("h1", { class: m(["text-4xl font-bold mb-2", E(r) ? "text-gray-200" : "text-gray-800"]) }, T(e.code), 3),
|
|
1413
1413
|
s("p", { class: m(["text-lg mb-6", E(i).dimTextAlt]) }, T(e.message), 3),
|
|
1414
1414
|
s("button", {
|
|
@@ -1418,7 +1418,7 @@ var kt = { class: "flex items-start gap-4 min-w-0" }, At = { class: "flex-1 min-
|
|
|
1418
1418
|
])]));
|
|
1419
1419
|
}
|
|
1420
1420
|
}), X = b(!1);
|
|
1421
|
-
function
|
|
1421
|
+
function $t() {
|
|
1422
1422
|
function e() {
|
|
1423
1423
|
X.value = !0;
|
|
1424
1424
|
}
|
|
@@ -1437,19 +1437,19 @@ function Qt() {
|
|
|
1437
1437
|
}
|
|
1438
1438
|
//#endregion
|
|
1439
1439
|
//#region src/composables/useSidebarCollapse.ts
|
|
1440
|
-
var Z = b(!1),
|
|
1441
|
-
function
|
|
1442
|
-
if (
|
|
1443
|
-
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);
|
|
1444
1444
|
e && (Z.value = e === "true"), f(!0).run(() => {
|
|
1445
1445
|
j(Z, (e) => {
|
|
1446
|
-
window.localStorage?.setItem(
|
|
1446
|
+
window.localStorage?.setItem(tn, String(e));
|
|
1447
1447
|
});
|
|
1448
1448
|
});
|
|
1449
1449
|
}
|
|
1450
1450
|
}
|
|
1451
|
-
function
|
|
1452
|
-
|
|
1451
|
+
function rn(e) {
|
|
1452
|
+
nn(e?.storageKey ?? tn);
|
|
1453
1453
|
function t() {
|
|
1454
1454
|
Z.value = !0;
|
|
1455
1455
|
}
|
|
@@ -1468,8 +1468,8 @@ function nn(e) {
|
|
|
1468
1468
|
}
|
|
1469
1469
|
//#endregion
|
|
1470
1470
|
//#region src/composables/useNotifications.ts
|
|
1471
|
-
var Q = b([]), $ = b(!1),
|
|
1472
|
-
function
|
|
1471
|
+
var Q = b([]), $ = b(!1), an = r(() => Q.value.filter((e) => !e.read).length);
|
|
1472
|
+
function on() {
|
|
1473
1473
|
function e() {
|
|
1474
1474
|
$.value = !0;
|
|
1475
1475
|
}
|
|
@@ -1505,7 +1505,7 @@ function an() {
|
|
|
1505
1505
|
}
|
|
1506
1506
|
return {
|
|
1507
1507
|
notifications: Q,
|
|
1508
|
-
unreadCount:
|
|
1508
|
+
unreadCount: an,
|
|
1509
1509
|
open: $,
|
|
1510
1510
|
openPanel: e,
|
|
1511
1511
|
closePanel: t,
|
|
@@ -1520,22 +1520,22 @@ function an() {
|
|
|
1520
1520
|
}
|
|
1521
1521
|
//#endregion
|
|
1522
1522
|
//#region src/components/BaseSidebar.vue?vue&type=script&setup=true&lang.ts
|
|
1523
|
-
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 = [
|
|
1524
1524
|
"aria-current",
|
|
1525
1525
|
"title",
|
|
1526
1526
|
"onClick"
|
|
1527
|
-
],
|
|
1527
|
+
], fn = ["aria-label"], pn = { class: "relative shrink-0" }, mn = {
|
|
1528
1528
|
key: 0,
|
|
1529
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"
|
|
1530
|
-
},
|
|
1530
|
+
}, hn = [
|
|
1531
1531
|
"title",
|
|
1532
1532
|
"aria-label",
|
|
1533
1533
|
"aria-pressed"
|
|
1534
|
-
],
|
|
1534
|
+
], gn = [
|
|
1535
1535
|
"title",
|
|
1536
1536
|
"aria-label",
|
|
1537
1537
|
"aria-pressed"
|
|
1538
|
-
],
|
|
1538
|
+
], _n = /*#__PURE__*/ ((e, t) => {
|
|
1539
1539
|
let n = e.__vccOpts || e;
|
|
1540
1540
|
for (let [e, r] of t) n[e] = r;
|
|
1541
1541
|
return n;
|
|
@@ -1560,7 +1560,7 @@ var on = ["aria-label", "aria-expanded"], sn = { class: "flex flex-col h-full" }
|
|
|
1560
1560
|
}
|
|
1561
1561
|
},
|
|
1562
1562
|
setup(t) {
|
|
1563
|
-
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;
|
|
1564
1564
|
j(g, async (e) => {
|
|
1565
1565
|
e ? (M = document.activeElement instanceof HTMLElement ? document.activeElement : null, await p(), ee.value?.focus()) : (M?.focus(), M = null);
|
|
1566
1566
|
});
|
|
@@ -1585,7 +1585,7 @@ var on = ["aria-label", "aria-expanded"], sn = { class: "flex flex-col h-full" }
|
|
|
1585
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"]),
|
|
1586
1586
|
"aria-label": E(g) ? "Close navigation menu" : "Open navigation menu",
|
|
1587
1587
|
"aria-expanded": E(g)
|
|
1588
|
-
}, [E(g) ? (y(), i(E(
|
|
1588
|
+
}, [E(g) ? (y(), i(E(xe), {
|
|
1589
1589
|
key: 1,
|
|
1590
1590
|
class: "w-6 h-6",
|
|
1591
1591
|
"aria-hidden": "true"
|
|
@@ -1593,7 +1593,7 @@ var on = ["aria-label", "aria-expanded"], sn = { class: "flex flex-col h-full" }
|
|
|
1593
1593
|
key: 0,
|
|
1594
1594
|
class: "w-6 h-6",
|
|
1595
1595
|
"aria-hidden": "true"
|
|
1596
|
-
}))], 10,
|
|
1596
|
+
}))], 10, sn)], 2),
|
|
1597
1597
|
E(g) ? (y(), o("div", {
|
|
1598
1598
|
key: 0,
|
|
1599
1599
|
class: "mobile-overlay fixed inset-0 z-40 bg-black/50",
|
|
@@ -1608,7 +1608,7 @@ var on = ["aria-label", "aria-expanded"], sn = { class: "flex flex-col h-full" }
|
|
|
1608
1608
|
E(g) ? "translate-x-0 z-50" : "-translate-x-full max-lg:pointer-events-none lg:translate-x-0 z-50",
|
|
1609
1609
|
t.collapsible && E(C) ? "lg:w-16" : "lg:w-60"
|
|
1610
1610
|
]])
|
|
1611
|
-
}, [s("div",
|
|
1611
|
+
}, [s("div", cn, [
|
|
1612
1612
|
s("div", { class: m(["px-5 pt-5 pb-4 flex items-center justify-center relative", { "lg:px-2": A.value }]) }, [s("button", {
|
|
1613
1613
|
type: "button",
|
|
1614
1614
|
onClick: N,
|
|
@@ -1621,17 +1621,17 @@ var on = ["aria-label", "aria-expanded"], sn = { class: "flex flex-col h-full" }
|
|
|
1621
1621
|
onClick: r[2] ||= (...e) => E(_) && E(_)(...e),
|
|
1622
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"]),
|
|
1623
1623
|
"aria-label": "Close navigation menu"
|
|
1624
|
-
}, [u(E(
|
|
1624
|
+
}, [u(E(xe), {
|
|
1625
1625
|
class: "w-5 h-5",
|
|
1626
1626
|
"aria-hidden": "true"
|
|
1627
1627
|
})], 2)], 2),
|
|
1628
|
-
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", {
|
|
1629
1629
|
type: "button",
|
|
1630
1630
|
"aria-current": P(e.name) ? "page" : void 0,
|
|
1631
1631
|
title: A.value ? e.label : void 0,
|
|
1632
1632
|
onClick: (t) => F(e.name),
|
|
1633
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 }]])
|
|
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,
|
|
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))]),
|
|
1635
1635
|
s("div", { class: m(["px-4 py-4 border-t transition-colors space-y-3", E(f) ? "border-gray-800" : "border-gray-200"]) }, [
|
|
1636
1636
|
t.showNotifications ? (y(), o("button", {
|
|
1637
1637
|
key: 0,
|
|
@@ -1640,10 +1640,10 @@ var on = ["aria-label", "aria-expanded"], sn = { class: "flex flex-col h-full" }
|
|
|
1640
1640
|
title: "Notifications",
|
|
1641
1641
|
"aria-label": E(O) > 0 ? `Notifications, ${E(O)} unread` : "Notifications",
|
|
1642
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 }]])
|
|
1643
|
-
}, [s("span",
|
|
1643
|
+
}, [s("span", pn, [u(E(ie), {
|
|
1644
1644
|
class: "w-[18px] h-[18px]",
|
|
1645
1645
|
"aria-hidden": "true"
|
|
1646
|
-
}), 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),
|
|
1647
1647
|
t.showThemeToggle ? (y(), o("button", {
|
|
1648
1648
|
key: 1,
|
|
1649
1649
|
type: "button",
|
|
@@ -1653,13 +1653,13 @@ var on = ["aria-label", "aria-expanded"], sn = { class: "flex flex-col h-full" }
|
|
|
1653
1653
|
"aria-pressed": E(f),
|
|
1654
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 }]])
|
|
1655
1655
|
}, [
|
|
1656
|
-
(y(), i(w(E(f) ? E(
|
|
1656
|
+
(y(), i(w(E(f) ? E(be) : E(ye)), {
|
|
1657
1657
|
class: m(["hidden w-[18px] h-[18px] shrink-0", { "lg:block": A.value }]),
|
|
1658
1658
|
"aria-hidden": "true"
|
|
1659
1659
|
}, null, 8, ["class"])),
|
|
1660
1660
|
s("span", { class: m({ "lg:hidden": A.value }) }, T(E(f) ? "Switch to light" : "Switch to dark"), 3),
|
|
1661
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)
|
|
1662
|
-
], 10,
|
|
1662
|
+
], 10, hn)) : a("", !0),
|
|
1663
1663
|
t.collapsible ? (y(), o("button", {
|
|
1664
1664
|
key: 2,
|
|
1665
1665
|
type: "button",
|
|
@@ -1671,7 +1671,7 @@ var on = ["aria-label", "aria-expanded"], sn = { class: "flex flex-col h-full" }
|
|
|
1671
1671
|
}, [(y(), i(w(E(C) ? E(se) : E(oe)), {
|
|
1672
1672
|
class: "w-[18px] h-[18px] shrink-0",
|
|
1673
1673
|
"aria-hidden": "true"
|
|
1674
|
-
})), 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),
|
|
1675
1675
|
s("div", { class: m({ "lg:hidden": A.value }) }, [S(n.$slots, "status", {}, void 0, !0)], 2),
|
|
1676
1676
|
s("div", { class: m({ "lg:hidden": A.value }) }, [S(n.$slots, "footer", {}, () => [t.appName || t.version ? (y(), o("div", {
|
|
1677
1677
|
key: 0,
|
|
@@ -1685,26 +1685,26 @@ var on = ["aria-label", "aria-expanded"], sn = { class: "flex flex-col h-full" }
|
|
|
1685
1685
|
])], 2)
|
|
1686
1686
|
]));
|
|
1687
1687
|
}
|
|
1688
|
-
}), [["__scopeId", "data-v-6fca021f"]]),
|
|
1688
|
+
}), [["__scopeId", "data-v-6fca021f"]]), vn = {
|
|
1689
1689
|
key: 1,
|
|
1690
1690
|
class: "mt-4 flex justify-center py-6"
|
|
1691
|
-
},
|
|
1691
|
+
}, yn = {
|
|
1692
1692
|
key: 2,
|
|
1693
1693
|
class: "mt-4 text-sm text-red-500",
|
|
1694
1694
|
role: "alert"
|
|
1695
|
-
},
|
|
1695
|
+
}, bn = {
|
|
1696
1696
|
key: 3,
|
|
1697
1697
|
class: "mt-4"
|
|
1698
|
-
},
|
|
1698
|
+
}, xn = { class: "relative" }, Sn = ["placeholder"], Cn = {
|
|
1699
1699
|
key: 4,
|
|
1700
1700
|
class: "mt-3 max-h-64 overflow-y-auto"
|
|
1701
|
-
},
|
|
1701
|
+
}, wn = ["onClick"], Tn = { class: "flex-1 min-w-0" }, En = {
|
|
1702
1702
|
key: 0,
|
|
1703
1703
|
class: "text-center py-6"
|
|
1704
|
-
},
|
|
1704
|
+
}, Dn = {
|
|
1705
1705
|
key: 1,
|
|
1706
1706
|
class: "text-center py-6"
|
|
1707
|
-
},
|
|
1707
|
+
}, On = ["disabled"], kn = ["disabled"], An = /* @__PURE__ */ d({
|
|
1708
1708
|
__name: "BaseEntityPickerModal",
|
|
1709
1709
|
props: {
|
|
1710
1710
|
title: {},
|
|
@@ -1726,7 +1726,7 @@ var on = ["aria-label", "aria-expanded"], sn = { class: "flex flex-col h-full" }
|
|
|
1726
1726
|
},
|
|
1727
1727
|
emits: ["confirm", "cancel"],
|
|
1728
1728
|
setup(t, { emit: n }) {
|
|
1729
|
-
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(() => {
|
|
1730
1730
|
let e = c.loader ? h.value : c.items;
|
|
1731
1731
|
return c.excludeId ? e.filter((e) => e.id !== c.excludeId) : e;
|
|
1732
1732
|
}), k = r(() => O.value.filter((e) => e.label.toLowerCase().includes(w.value.toLowerCase()))), ee = {
|
|
@@ -1841,12 +1841,12 @@ var on = ["aria-label", "aria-expanded"], sn = { class: "flex flex-col h-full" }
|
|
|
1841
1841
|
function te() {
|
|
1842
1842
|
c.submitting || l("cancel");
|
|
1843
1843
|
}
|
|
1844
|
-
return (n, r) => (y(), i(
|
|
1844
|
+
return (n, r) => (y(), i(Rt, {
|
|
1845
1845
|
title: t.title,
|
|
1846
1846
|
"manual-close": t.submitting,
|
|
1847
1847
|
onCancel: te
|
|
1848
1848
|
}, {
|
|
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(
|
|
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), {
|
|
1850
1850
|
class: m(["h-6 w-6", P.value.iconText]),
|
|
1851
1851
|
"aria-hidden": "true"
|
|
1852
1852
|
}, null, 8, ["class"])], 2)])]),
|
|
@@ -1855,19 +1855,19 @@ var on = ["aria-label", "aria-expanded"], sn = { class: "flex flex-col h-full" }
|
|
|
1855
1855
|
disabled: t.submitting,
|
|
1856
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]),
|
|
1857
1857
|
onClick: te
|
|
1858
|
-
}, T(t.cancelText), 11,
|
|
1858
|
+
}, T(t.cancelText), 11, On), s("button", {
|
|
1859
1859
|
type: "button",
|
|
1860
1860
|
disabled: !C.value || t.submitting,
|
|
1861
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]),
|
|
1862
1862
|
onClick: F
|
|
1863
|
-
}, T(t.submitting ? t.submittingText : t.confirmText), 11,
|
|
1863
|
+
}, T(t.submitting ? t.submittingText : t.confirmText), 11, kn)]),
|
|
1864
1864
|
default: M(() => [
|
|
1865
1865
|
t.message ? (y(), o("p", {
|
|
1866
1866
|
key: 0,
|
|
1867
1867
|
class: m(["text-sm", E(d) ? "text-gray-300" : "text-gray-600"])
|
|
1868
1868
|
}, T(t.message), 3)) : a("", !0),
|
|
1869
|
-
_.value ? (y(), o("div",
|
|
1870
|
-
!_.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), {
|
|
1871
1871
|
class: m(["absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4", E(f).dimText]),
|
|
1872
1872
|
"aria-hidden": "true"
|
|
1873
1873
|
}, null, 8, ["class"]), N(s("input", {
|
|
@@ -1877,14 +1877,14 @@ var on = ["aria-label", "aria-expanded"], sn = { class: "flex flex-col h-full" }
|
|
|
1877
1877
|
type: "text",
|
|
1878
1878
|
placeholder: t.searchPlaceholder,
|
|
1879
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]])
|
|
1880
|
-
}, null, 10,
|
|
1881
|
-
!_.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", {
|
|
1882
1882
|
key: e.id,
|
|
1883
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"]]),
|
|
1884
1884
|
onClick: (t) => C.value = e.id
|
|
1885
1885
|
}, [
|
|
1886
|
-
u(E(
|
|
1887
|
-
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)]),
|
|
1888
1888
|
C.value === e.id ? (y(), o("div", {
|
|
1889
1889
|
key: 0,
|
|
1890
1890
|
class: m(["w-5 h-5 rounded-full flex items-center justify-center", P.value.checkBg])
|
|
@@ -1900,15 +1900,15 @@ var on = ["aria-label", "aria-expanded"], sn = { class: "flex flex-col h-full" }
|
|
|
1900
1900
|
"stroke-linejoin": "round",
|
|
1901
1901
|
d: "M5 13l4 4L19 7"
|
|
1902
1902
|
})], -1)]], 2)) : a("", !0)
|
|
1903
|
-
], 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)
|
|
1904
1904
|
]),
|
|
1905
1905
|
_: 3
|
|
1906
1906
|
}, 8, ["title", "manual-close"]));
|
|
1907
1907
|
}
|
|
1908
|
-
}),
|
|
1908
|
+
}), jn = {
|
|
1909
1909
|
href: "#main-content",
|
|
1910
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"
|
|
1911
|
-
},
|
|
1911
|
+
}, Mn = ["inert"], Nn = /* @__PURE__ */ d({
|
|
1912
1912
|
__name: "BaseAppLayout",
|
|
1913
1913
|
props: {
|
|
1914
1914
|
showSidebar: {
|
|
@@ -1918,19 +1918,19 @@ var on = ["aria-label", "aria-expanded"], sn = { class: "flex flex-col h-full" }
|
|
|
1918
1918
|
skipLinkLabel: { default: "Skip to main content" }
|
|
1919
1919
|
},
|
|
1920
1920
|
setup(e) {
|
|
1921
|
-
let t = e, { isDark: n } =
|
|
1921
|
+
let t = e, { isDark: n } = U(), { mobileOpen: i } = $t(), { collapsed: c } = rn(), l = r(() => t.showSidebar);
|
|
1922
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"]) }, [
|
|
1923
|
-
s("a",
|
|
1923
|
+
s("a", jn, T(e.skipLinkLabel), 1),
|
|
1924
1924
|
l.value ? S(t.$slots, "sidebar", { key: 0 }) : a("", !0),
|
|
1925
1925
|
s("main", {
|
|
1926
1926
|
id: "main-content",
|
|
1927
1927
|
tabindex: "-1",
|
|
1928
1928
|
inert: l.value && E(i) ? !0 : void 0,
|
|
1929
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" : ""])
|
|
1930
|
-
}, [S(t.$slots, "default")], 10,
|
|
1930
|
+
}, [S(t.$slots, "default")], 10, Mn)
|
|
1931
1931
|
], 2));
|
|
1932
1932
|
}
|
|
1933
|
-
}),
|
|
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({
|
|
1934
1934
|
__name: "BasePageHeader",
|
|
1935
1935
|
props: {
|
|
1936
1936
|
title: {},
|
|
@@ -1939,7 +1939,7 @@ var on = ["aria-label", "aria-expanded"], sn = { class: "flex flex-col h-full" }
|
|
|
1939
1939
|
maxWidthClass: { default: "max-w-4xl" }
|
|
1940
1940
|
},
|
|
1941
1941
|
setup(e) {
|
|
1942
|
-
let t = e, { isDark: n } =
|
|
1942
|
+
let t = e, { isDark: n } = U(), i = J(), c = r(() => {
|
|
1943
1943
|
let e = {
|
|
1944
1944
|
emerald: {
|
|
1945
1945
|
dark: "bg-emerald-500/10",
|
|
@@ -1980,16 +1980,16 @@ var on = ["aria-label", "aria-expanded"], sn = { class: "flex flex-col h-full" }
|
|
|
1980
1980
|
}[t.iconColor];
|
|
1981
1981
|
return n.value ? e.dark : e.light;
|
|
1982
1982
|
});
|
|
1983
|
-
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", {
|
|
1984
1984
|
key: 0,
|
|
1985
1985
|
class: m(["text-sm", E(i).dimTextAlt])
|
|
1986
|
-
}, T(e.subtitle), 3)) : a("", !0)])]), s("div",
|
|
1986
|
+
}, T(e.subtitle), 3)) : a("", !0)])]), s("div", In, [S(t.$slots, "actions")])])], 2));
|
|
1987
1987
|
}
|
|
1988
|
-
}),
|
|
1988
|
+
}), Rn = [
|
|
1989
1989
|
"type",
|
|
1990
1990
|
"disabled",
|
|
1991
1991
|
"title"
|
|
1992
|
-
],
|
|
1992
|
+
], zn = { key: 0 }, Bn = /* @__PURE__ */ d({
|
|
1993
1993
|
__name: "BaseToolbarButton",
|
|
1994
1994
|
props: {
|
|
1995
1995
|
label: { default: "" },
|
|
@@ -2003,7 +2003,7 @@ var on = ["aria-label", "aria-expanded"], sn = { class: "flex flex-col h-full" }
|
|
|
2003
2003
|
},
|
|
2004
2004
|
emits: ["click"],
|
|
2005
2005
|
setup(e) {
|
|
2006
|
-
let t = e, { isDark: n } =
|
|
2006
|
+
let t = e, { isDark: n } = U(), i = r(() => {
|
|
2007
2007
|
let e = {
|
|
2008
2008
|
neutral: {
|
|
2009
2009
|
dark: "bg-gray-800 text-gray-100 border-gray-700 hover:bg-gray-700",
|
|
@@ -2022,14 +2022,14 @@ var on = ["aria-label", "aria-expanded"], sn = { class: "flex flex-col h-full" }
|
|
|
2022
2022
|
title: e.title,
|
|
2023
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]),
|
|
2024
2024
|
onClick: n[0] ||= (e) => t.$emit("click", e)
|
|
2025
|
-
}, [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));
|
|
2026
2026
|
}
|
|
2027
|
-
}),
|
|
2027
|
+
}), Vn = [
|
|
2028
2028
|
"type",
|
|
2029
2029
|
"disabled",
|
|
2030
2030
|
"title",
|
|
2031
2031
|
"aria-label"
|
|
2032
|
-
],
|
|
2032
|
+
], Hn = { key: 0 }, Un = /* @__PURE__ */ d({
|
|
2033
2033
|
__name: "BaseActionButton",
|
|
2034
2034
|
props: {
|
|
2035
2035
|
label: { default: "" },
|
|
@@ -2048,7 +2048,7 @@ var on = ["aria-label", "aria-expanded"], sn = { class: "flex flex-col h-full" }
|
|
|
2048
2048
|
},
|
|
2049
2049
|
emits: ["click"],
|
|
2050
2050
|
setup(e) {
|
|
2051
|
-
let t = e, { isDark: n } =
|
|
2051
|
+
let t = e, { isDark: n } = U(), i = r(() => {
|
|
2052
2052
|
let e = {
|
|
2053
2053
|
emerald: {
|
|
2054
2054
|
dark: "text-emerald-400 hover:bg-emerald-500/10",
|
|
@@ -2128,9 +2128,9 @@ var on = ["aria-label", "aria-expanded"], sn = { class: "flex flex-col h-full" }
|
|
|
2128
2128
|
"aria-label": e.ariaLabel,
|
|
2129
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]]),
|
|
2130
2130
|
onClick: n[0] ||= (e) => t.$emit("click", e)
|
|
2131
|
-
}, [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));
|
|
2132
2132
|
}
|
|
2133
|
-
}),
|
|
2133
|
+
}), Wn = ["title", "aria-label"], Gn = /* @__PURE__ */ d({
|
|
2134
2134
|
__name: "BaseCopyButton",
|
|
2135
2135
|
props: {
|
|
2136
2136
|
text: {},
|
|
@@ -2141,7 +2141,7 @@ var on = ["aria-label", "aria-expanded"], sn = { class: "flex flex-col h-full" }
|
|
|
2141
2141
|
},
|
|
2142
2142
|
emits: ["copied", "error"],
|
|
2143
2143
|
setup(e, { emit: t }) {
|
|
2144
|
-
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"}`);
|
|
2145
2145
|
async function p(e) {
|
|
2146
2146
|
try {
|
|
2147
2147
|
if (navigator.clipboard?.writeText) {
|
|
@@ -2171,28 +2171,28 @@ var on = ["aria-label", "aria-expanded"], sn = { class: "flex flex-col h-full" }
|
|
|
2171
2171
|
"aria-label": d.value,
|
|
2172
2172
|
class: m(f.value),
|
|
2173
2173
|
onClick: h
|
|
2174
|
-
}, [c.value ? (y(), i(E(
|
|
2174
|
+
}, [c.value ? (y(), i(E(ue), {
|
|
2175
2175
|
key: 0,
|
|
2176
2176
|
class: m(e.iconClass),
|
|
2177
2177
|
"aria-hidden": "true"
|
|
2178
|
-
}, null, 8, ["class"])) : (y(), i(E(
|
|
2178
|
+
}, null, 8, ["class"])) : (y(), i(E(de), {
|
|
2179
2179
|
key: 1,
|
|
2180
2180
|
class: m(e.iconClass),
|
|
2181
2181
|
"aria-hidden": "true"
|
|
2182
|
-
}, null, 8, ["class"]))], 10,
|
|
2182
|
+
}, null, 8, ["class"]))], 10, Wn));
|
|
2183
2183
|
}
|
|
2184
|
-
}),
|
|
2184
|
+
}), Kn = ["disabled", "aria-busy"], qn = {
|
|
2185
2185
|
key: 0,
|
|
2186
2186
|
class: "w-5 h-5 animate-spin shrink-0",
|
|
2187
2187
|
viewBox: "0 0 24 24",
|
|
2188
2188
|
fill: "none",
|
|
2189
2189
|
"aria-hidden": "true"
|
|
2190
|
-
},
|
|
2190
|
+
}, Jn = {
|
|
2191
2191
|
key: 1,
|
|
2192
2192
|
class: "w-5 h-5 shrink-0",
|
|
2193
2193
|
viewBox: "0 0 48 48",
|
|
2194
2194
|
"aria-hidden": "true"
|
|
2195
|
-
},
|
|
2195
|
+
}, Yn = /* @__PURE__ */ d({
|
|
2196
2196
|
__name: "BaseGoogleSignInButton",
|
|
2197
2197
|
props: {
|
|
2198
2198
|
label: { default: "Sign in with Google" },
|
|
@@ -2211,7 +2211,7 @@ var on = ["aria-label", "aria-expanded"], sn = { class: "flex flex-col h-full" }
|
|
|
2211
2211
|
},
|
|
2212
2212
|
emits: ["click"],
|
|
2213
2213
|
setup(e, { emit: t }) {
|
|
2214
|
-
let n = e, i = t, { isDark: a } =
|
|
2214
|
+
let n = e, i = t, { isDark: a } = U(), l = r(() => n.disabled || n.loading);
|
|
2215
2215
|
function u() {
|
|
2216
2216
|
l.value || i("click");
|
|
2217
2217
|
}
|
|
@@ -2221,7 +2221,7 @@ var on = ["aria-label", "aria-expanded"], sn = { class: "flex flex-col h-full" }
|
|
|
2221
2221
|
"aria-busy": e.loading,
|
|
2222
2222
|
onClick: u,
|
|
2223
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"]])
|
|
2224
|
-
}, [e.loading ? (y(), o("svg",
|
|
2224
|
+
}, [e.loading ? (y(), o("svg", qn, [...n[0] ||= [s("circle", {
|
|
2225
2225
|
class: "opacity-25",
|
|
2226
2226
|
cx: "12",
|
|
2227
2227
|
cy: "12",
|
|
@@ -2232,18 +2232,18 @@ var on = ["aria-label", "aria-expanded"], sn = { class: "flex flex-col h-full" }
|
|
|
2232
2232
|
class: "opacity-75",
|
|
2233
2233
|
fill: "currentColor",
|
|
2234
2234
|
d: "M4 12a8 8 0 0 1 8-8V0C5.4 0 0 5.4 0 12h4z"
|
|
2235
|
-
}, 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));
|
|
2236
2236
|
}
|
|
2237
|
-
}),
|
|
2237
|
+
}), Xn = {
|
|
2238
2238
|
key: 0,
|
|
2239
2239
|
class: "flex justify-center mb-6"
|
|
2240
|
-
},
|
|
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 = {
|
|
2241
2241
|
key: 0,
|
|
2242
2242
|
class: "w-4 h-4 animate-spin",
|
|
2243
2243
|
viewBox: "0 0 24 24",
|
|
2244
2244
|
fill: "none",
|
|
2245
2245
|
"aria-hidden": "true"
|
|
2246
|
-
},
|
|
2246
|
+
}, sr = /* @__PURE__ */ d({
|
|
2247
2247
|
__name: "BaseLoginForm",
|
|
2248
2248
|
props: {
|
|
2249
2249
|
title: { default: "Sign in" },
|
|
@@ -2269,7 +2269,7 @@ var on = ["aria-label", "aria-expanded"], sn = { class: "flex flex-col h-full" }
|
|
|
2269
2269
|
},
|
|
2270
2270
|
emits: ["submit", "google-sign-in"],
|
|
2271
2271
|
setup(t, { emit: n }) {
|
|
2272
|
-
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);
|
|
2273
2273
|
function x() {
|
|
2274
2274
|
v.value || c("submit", {
|
|
2275
2275
|
email: p.value,
|
|
@@ -2278,8 +2278,8 @@ var on = ["aria-label", "aria-expanded"], sn = { class: "flex flex-col h-full" }
|
|
|
2278
2278
|
});
|
|
2279
2279
|
}
|
|
2280
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]) }, [
|
|
2281
|
-
n.$slots.logo ? (y(), o("div",
|
|
2282
|
-
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", {
|
|
2283
2283
|
key: 0,
|
|
2284
2284
|
class: m(["mt-1 text-sm", E(f).mutedText])
|
|
2285
2285
|
}, T(t.subtitle), 3)) : a("", !0)]),
|
|
@@ -2288,11 +2288,11 @@ var on = ["aria-label", "aria-expanded"], sn = { class: "flex flex-col h-full" }
|
|
|
2288
2288
|
role: "alert",
|
|
2289
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"])
|
|
2290
2290
|
}, T(t.error), 3)) : a("", !0),
|
|
2291
|
-
t.showGoogle ? (y(), o(e, { key: 2 }, [u(
|
|
2291
|
+
t.showGoogle ? (y(), o(e, { key: 2 }, [u(Yn, {
|
|
2292
2292
|
loading: t.googleLoading,
|
|
2293
2293
|
disabled: t.loading,
|
|
2294
2294
|
onClick: r[0] ||= (e) => c("google-sign-in")
|
|
2295
|
-
}, null, 8, ["loading", "disabled"]), s("div",
|
|
2295
|
+
}, null, 8, ["loading", "disabled"]), s("div", Qn, [
|
|
2296
2296
|
s("span", { class: m(["h-px flex-1", E(d) ? "bg-gray-700" : "bg-gray-200"]) }, null, 2),
|
|
2297
2297
|
s("span", { class: m(["text-xs uppercase tracking-wider", E(f).dimTextAlt]) }, "or", 2),
|
|
2298
2298
|
s("span", { class: m(["h-px flex-1", E(d) ? "bg-gray-700" : "bg-gray-200"]) }, null, 2)
|
|
@@ -2314,11 +2314,11 @@ var on = ["aria-label", "aria-expanded"], sn = { class: "flex flex-col h-full" }
|
|
|
2314
2314
|
disabled: v.value,
|
|
2315
2315
|
placeholder: "you@example.com",
|
|
2316
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])
|
|
2317
|
-
}, null, 10,
|
|
2318
|
-
s("div", null, [s("div",
|
|
2317
|
+
}, null, 10, $n), [[A, p.value]])]),
|
|
2318
|
+
s("div", null, [s("div", er, [s("label", {
|
|
2319
2319
|
for: "login-password",
|
|
2320
2320
|
class: m(["block text-sm font-medium", E(f).label])
|
|
2321
|
-
}, " Password ", 2), S(n.$slots, "forgot")]), s("div",
|
|
2321
|
+
}, " Password ", 2), S(n.$slots, "forgot")]), s("div", tr, [N(s("input", {
|
|
2322
2322
|
id: "login-password",
|
|
2323
2323
|
"onUpdate:modelValue": r[2] ||= (e) => h.value = e,
|
|
2324
2324
|
type: _.value ? "text" : "password",
|
|
@@ -2328,13 +2328,13 @@ var on = ["aria-label", "aria-expanded"], sn = { class: "flex flex-col h-full" }
|
|
|
2328
2328
|
disabled: v.value,
|
|
2329
2329
|
placeholder: "••••••••",
|
|
2330
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])
|
|
2331
|
-
}, null, 10,
|
|
2331
|
+
}, null, 10, nr), [[k, h.value]]), s("button", {
|
|
2332
2332
|
type: "button",
|
|
2333
2333
|
onClick: r[3] ||= (e) => _.value = !_.value,
|
|
2334
2334
|
"aria-label": _.value ? "Hide password" : "Show password",
|
|
2335
2335
|
"aria-pressed": _.value,
|
|
2336
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])
|
|
2337
|
-
}, T(_.value ? "Hide" : "Show"), 11,
|
|
2337
|
+
}, T(_.value ? "Hide" : "Show"), 11, rr)])]),
|
|
2338
2338
|
t.showRemember ? (y(), o("label", {
|
|
2339
2339
|
key: 0,
|
|
2340
2340
|
class: m(["flex items-center gap-2 text-sm cursor-pointer select-none", E(f).bodyText])
|
|
@@ -2343,13 +2343,13 @@ var on = ["aria-label", "aria-expanded"], sn = { class: "flex flex-col h-full" }
|
|
|
2343
2343
|
type: "checkbox",
|
|
2344
2344
|
disabled: v.value,
|
|
2345
2345
|
class: "w-4 h-4 rounded border-gray-300 text-emerald-600 focus:ring-emerald-500"
|
|
2346
|
-
}, null, 8,
|
|
2346
|
+
}, null, 8, ir), [[O, g.value]]), r[5] ||= l(" Remember me ", -1)], 2)) : a("", !0),
|
|
2347
2347
|
s("button", {
|
|
2348
2348
|
type: "submit",
|
|
2349
2349
|
disabled: v.value,
|
|
2350
2350
|
"aria-busy": t.loading,
|
|
2351
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"
|
|
2352
|
-
}, [t.loading ? (y(), o("svg",
|
|
2352
|
+
}, [t.loading ? (y(), o("svg", or, [...r[6] ||= [s("circle", {
|
|
2353
2353
|
class: "opacity-25",
|
|
2354
2354
|
cx: "12",
|
|
2355
2355
|
cy: "12",
|
|
@@ -2360,7 +2360,7 @@ var on = ["aria-label", "aria-expanded"], sn = { class: "flex flex-col h-full" }
|
|
|
2360
2360
|
class: "opacity-75",
|
|
2361
2361
|
fill: "currentColor",
|
|
2362
2362
|
d: "M4 12a8 8 0 0 1 8-8V0C5.4 0 0 5.4 0 12h4z"
|
|
2363
|
-
}, null, -1)]])) : a("", !0), l(" " + T(t.submitLabel), 1)], 8,
|
|
2363
|
+
}, null, -1)]])) : a("", !0), l(" " + T(t.submitLabel), 1)], 8, ar)
|
|
2364
2364
|
], 32),
|
|
2365
2365
|
n.$slots.footer ? (y(), o("div", {
|
|
2366
2366
|
key: 3,
|
|
@@ -2368,10 +2368,10 @@ var on = ["aria-label", "aria-expanded"], sn = { class: "flex flex-col h-full" }
|
|
|
2368
2368
|
}, [S(n.$slots, "footer")], 2)) : a("", !0)
|
|
2369
2369
|
], 2));
|
|
2370
2370
|
}
|
|
2371
|
-
}),
|
|
2371
|
+
}), cr = ["aria-label"], lr = { class: "flex-1 overflow-y-auto" }, ur = {
|
|
2372
2372
|
key: 0,
|
|
2373
2373
|
class: "flex flex-col items-center justify-center text-center px-6 py-16 gap-3"
|
|
2374
|
-
},
|
|
2374
|
+
}, dr = ["onClick"], fr = { class: "min-w-0 flex-1" }, pr = { class: "flex items-baseline justify-between gap-2" }, mr = /* @__PURE__ */ d({
|
|
2375
2375
|
__name: "BaseNotificationPanel",
|
|
2376
2376
|
props: {
|
|
2377
2377
|
title: { default: "Notifications" },
|
|
@@ -2383,7 +2383,7 @@ var on = ["aria-label", "aria-expanded"], sn = { class: "flex flex-col h-full" }
|
|
|
2383
2383
|
},
|
|
2384
2384
|
emits: ["select"],
|
|
2385
2385
|
setup(c, { emit: d }) {
|
|
2386
|
-
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 = {
|
|
2387
2387
|
info: "bg-sky-500",
|
|
2388
2388
|
success: "bg-emerald-500",
|
|
2389
2389
|
warning: "bg-amber-500",
|
|
@@ -2392,7 +2392,7 @@ var on = ["aria-label", "aria-expanded"], sn = { class: "flex flex-col h-full" }
|
|
|
2392
2392
|
function O(e) {
|
|
2393
2393
|
C(e), f("select", e);
|
|
2394
2394
|
}
|
|
2395
|
-
return
|
|
2395
|
+
return Y(() => {
|
|
2396
2396
|
v.value && b();
|
|
2397
2397
|
}), (r, d) => (y(), i(t, { to: "body" }, [u(n, {
|
|
2398
2398
|
"enter-active-class": "transition-opacity duration-200",
|
|
@@ -2425,7 +2425,7 @@ var on = ["aria-label", "aria-expanded"], sn = { class: "flex flex-col h-full" }
|
|
|
2425
2425
|
onClick: d[1] ||= (...e) => E(b) && E(b)(...e),
|
|
2426
2426
|
"aria-label": "Close notifications",
|
|
2427
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"])
|
|
2428
|
-
}, [u(E(
|
|
2428
|
+
}, [u(E(xe), {
|
|
2429
2429
|
class: "w-5 h-5",
|
|
2430
2430
|
"aria-hidden": "true"
|
|
2431
2431
|
})], 2)], 2),
|
|
@@ -2437,7 +2437,7 @@ var on = ["aria-label", "aria-expanded"], sn = { class: "flex flex-col h-full" }
|
|
|
2437
2437
|
onClick: d[2] ||= (...e) => E(S) && E(S)(...e),
|
|
2438
2438
|
class: m(["text-xs font-medium cursor-pointer transition-colors focus:outline-none focus-visible:underline", E(h).emeraldText])
|
|
2439
2439
|
}, " Mark all as read ", 2)], 2)) : a("", !0),
|
|
2440
|
-
s("div",
|
|
2440
|
+
s("div", lr, [D.value === 0 ? (y(), o("div", ur, [u(E(ie), {
|
|
2441
2441
|
class: m(["w-10 h-10", E(h).illustration]),
|
|
2442
2442
|
"aria-hidden": "true"
|
|
2443
2443
|
}, null, 8, ["class"]), s("p", { class: m(["text-sm", E(h).mutedText]) }, T(c.emptyText), 3)])) : (y(), o("ul", {
|
|
@@ -2450,18 +2450,18 @@ var on = ["aria-label", "aria-expanded"], sn = { class: "flex flex-col h-full" }
|
|
|
2450
2450
|
}, [s("span", {
|
|
2451
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"]]),
|
|
2452
2452
|
"aria-hidden": "true"
|
|
2453
|
-
}, 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", {
|
|
2454
2454
|
key: 0,
|
|
2455
2455
|
class: m(["text-xs shrink-0", E(h).dimText])
|
|
2456
2456
|
}, T(e.time), 3)) : a("", !0)]), e.message ? (y(), o("span", {
|
|
2457
2457
|
key: 0,
|
|
2458
2458
|
class: m(["mt-0.5 block text-sm", E(h).mutedText])
|
|
2459
|
-
}, T(e.message), 3)) : a("", !0)])], 10,
|
|
2460
|
-
], 10,
|
|
2459
|
+
}, T(e.message), 3)) : a("", !0)])], 10, dr)]))), 128))], 2))])
|
|
2460
|
+
], 10, cr)) : a("", !0)]),
|
|
2461
2461
|
_: 1
|
|
2462
2462
|
})]));
|
|
2463
2463
|
}
|
|
2464
|
-
}),
|
|
2464
|
+
}), hr = ["value", "type"], gr = /* @__PURE__ */ d({
|
|
2465
2465
|
__name: "BaseInput",
|
|
2466
2466
|
props: {
|
|
2467
2467
|
modelValue: { default: "" },
|
|
@@ -2483,9 +2483,9 @@ var on = ["aria-label", "aria-expanded"], sn = { class: "flex flex-col h-full" }
|
|
|
2483
2483
|
type: e.type,
|
|
2484
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"]]),
|
|
2485
2485
|
onInput: r
|
|
2486
|
-
}, null, 42,
|
|
2486
|
+
}, null, 42, hr));
|
|
2487
2487
|
}
|
|
2488
|
-
}),
|
|
2488
|
+
}), _r = ["value"], vr = /* @__PURE__ */ d({
|
|
2489
2489
|
__name: "BaseSelect",
|
|
2490
2490
|
props: {
|
|
2491
2491
|
modelValue: { default: void 0 },
|
|
@@ -2505,13 +2505,84 @@ var on = ["aria-label", "aria-expanded"], sn = { class: "flex flex-col h-full" }
|
|
|
2505
2505
|
value: e.modelValue,
|
|
2506
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"]]),
|
|
2507
2507
|
onChange: r
|
|
2508
|
-
}, [S(t.$slots, "default")], 42,
|
|
2508
|
+
}, [S(t.$slots, "default")], 42, _r));
|
|
2509
2509
|
}
|
|
2510
|
-
}),
|
|
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));
|
|
2580
|
+
}
|
|
2581
|
+
}), wr = ["role", "aria-label"], Tr = [
|
|
2511
2582
|
"aria-pressed",
|
|
2512
2583
|
"title",
|
|
2513
2584
|
"onClick"
|
|
2514
|
-
],
|
|
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({
|
|
2515
2586
|
__name: "BaseSegmentedControl",
|
|
2516
2587
|
props: {
|
|
2517
2588
|
options: {},
|
|
@@ -2528,7 +2599,7 @@ var on = ["aria-label", "aria-expanded"], sn = { class: "flex flex-col h-full" }
|
|
|
2528
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");
|
|
2529
2600
|
function u(e) {
|
|
2530
2601
|
let t = e.value === i.modelValue;
|
|
2531
|
-
return i.optionClass ? i.optionClass(e, t) : t ? l.value :
|
|
2602
|
+
return i.optionClass ? i.optionClass(e, t) : t ? l.value : Er;
|
|
2532
2603
|
}
|
|
2533
2604
|
return (n, r) => (y(), o("div", {
|
|
2534
2605
|
role: t.ariaLabel ? "group" : void 0,
|
|
@@ -2541,9 +2612,9 @@ var on = ["aria-label", "aria-expanded"], sn = { class: "flex flex-col h-full" }
|
|
|
2541
2612
|
"aria-pressed": e.value === t.modelValue,
|
|
2542
2613
|
title: e.title,
|
|
2543
2614
|
onClick: (t) => a("update:modelValue", e.value)
|
|
2544
|
-
}, T(e.label), 11,
|
|
2615
|
+
}, T(e.label), 11, Tr))), 128))], 10, wr));
|
|
2545
2616
|
}
|
|
2546
|
-
}),
|
|
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({
|
|
2547
2618
|
__name: "BaseTable",
|
|
2548
2619
|
props: {
|
|
2549
2620
|
columns: {},
|
|
@@ -2554,24 +2625,24 @@ var on = ["aria-label", "aria-expanded"], sn = { class: "flex flex-col h-full" }
|
|
|
2554
2625
|
emptyText: { default: "No rows." }
|
|
2555
2626
|
},
|
|
2556
2627
|
setup(t) {
|
|
2557
|
-
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", {
|
|
2558
2629
|
key: t,
|
|
2559
2630
|
class: m(["px-4 py-3", e.align === "right" ? "text-right" : ""])
|
|
2560
|
-
}, 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", {
|
|
2561
2632
|
colspan: t.columns.length,
|
|
2562
2633
|
class: "px-4 py-12 text-center text-slate-500"
|
|
2563
|
-
}, [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")])]));
|
|
2564
2635
|
}
|
|
2565
|
-
}),
|
|
2636
|
+
}), Pr = { class: "grid gap-3 md:grid-cols-2" }, Fr = {
|
|
2566
2637
|
key: 0,
|
|
2567
2638
|
class: "block text-[11px] uppercase tracking-wide text-slate-500 mb-1"
|
|
2568
|
-
},
|
|
2639
|
+
}, Ir = ["value"], Lr = {
|
|
2569
2640
|
key: 2,
|
|
2570
2641
|
class: "flex items-center gap-2 mt-4"
|
|
2571
|
-
},
|
|
2642
|
+
}, Rr = ["checked", "onChange"], zr = { class: "text-sm text-slate-900 dark:text-slate-100" }, Br = {
|
|
2572
2643
|
key: 4,
|
|
2573
2644
|
class: "text-[11px] text-slate-400 mt-1"
|
|
2574
|
-
},
|
|
2645
|
+
}, Vr = /* @__PURE__ */ d({
|
|
2575
2646
|
__name: "BaseSpecFields",
|
|
2576
2647
|
props: {
|
|
2577
2648
|
specs: {},
|
|
@@ -2587,9 +2658,9 @@ var on = ["aria-label", "aria-expanded"], sn = { class: "flex flex-col h-full" }
|
|
|
2587
2658
|
let n = parseFloat(t);
|
|
2588
2659
|
r("update", e, Number.isNaN(n) ? t : n);
|
|
2589
2660
|
}
|
|
2590
|
-
return (n, u) => (y(), o("div",
|
|
2591
|
-
u.type === "boolean" ? a("", !0) : (y(), o("label",
|
|
2592
|
-
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, {
|
|
2593
2664
|
key: 1,
|
|
2594
2665
|
modelValue: String(t.params[u.key] ?? ""),
|
|
2595
2666
|
"onUpdate:modelValue": (e) => r("update", u.key, e)
|
|
@@ -2597,14 +2668,14 @@ var on = ["aria-label", "aria-expanded"], sn = { class: "flex flex-col h-full" }
|
|
|
2597
2668
|
default: M(() => [(y(!0), o(e, null, x(u.options ?? [], (e) => (y(), o("option", {
|
|
2598
2669
|
key: e,
|
|
2599
2670
|
value: e
|
|
2600
|
-
}, T(e), 9,
|
|
2671
|
+
}, T(e), 9, Ir))), 128))]),
|
|
2601
2672
|
_: 2
|
|
2602
|
-
}, 1032, ["modelValue", "onUpdate:modelValue"])) : u.type === "boolean" ? (y(), o("label",
|
|
2673
|
+
}, 1032, ["modelValue", "onUpdate:modelValue"])) : u.type === "boolean" ? (y(), o("label", Lr, [s("input", {
|
|
2603
2674
|
checked: !!t.params[u.key],
|
|
2604
2675
|
type: "checkbox",
|
|
2605
2676
|
class: "h-4 w-4",
|
|
2606
2677
|
onChange: (e) => c(u.key, e)
|
|
2607
|
-
}, null, 40,
|
|
2678
|
+
}, null, 40, Rr), s("span", zr, T(u.label), 1)])) : (y(), i(gr, {
|
|
2608
2679
|
key: 3,
|
|
2609
2680
|
modelValue: t.params[u.key],
|
|
2610
2681
|
type: "number",
|
|
@@ -2617,14 +2688,14 @@ var on = ["aria-label", "aria-expanded"], sn = { class: "flex flex-col h-full" }
|
|
|
2617
2688
|
"min",
|
|
2618
2689
|
"onUpdate:modelValue"
|
|
2619
2690
|
])),
|
|
2620
|
-
u.help ? (y(), o("p",
|
|
2691
|
+
u.help ? (y(), o("p", Br, T(u.help), 1)) : a("", !0),
|
|
2621
2692
|
S(n.$slots, "after", { spec: u })
|
|
2622
2693
|
]))), 128))]));
|
|
2623
2694
|
}
|
|
2624
2695
|
});
|
|
2625
2696
|
//#endregion
|
|
2626
2697
|
//#region src/composables/useDebounce.ts
|
|
2627
|
-
function
|
|
2698
|
+
function Hr(e, t = 300) {
|
|
2628
2699
|
let n = b(e.value), r = null;
|
|
2629
2700
|
return j(e, (e) => {
|
|
2630
2701
|
r && clearTimeout(r), r = setTimeout(() => {
|
|
@@ -2636,12 +2707,12 @@ function Ir(e, t = 300) {
|
|
|
2636
2707
|
}
|
|
2637
2708
|
//#endregion
|
|
2638
2709
|
//#region src/composables/useToast.ts
|
|
2639
|
-
function
|
|
2640
|
-
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;
|
|
2641
2712
|
function a() {
|
|
2642
2713
|
i &&= (clearTimeout(i), null);
|
|
2643
2714
|
}
|
|
2644
|
-
function o(o, s =
|
|
2715
|
+
function o(o, s = K.SUCCESS, c = e) {
|
|
2645
2716
|
n.value = o, r.value = s, t.value = !0, a(), i = setTimeout(() => {
|
|
2646
2717
|
t.value = !1, i = null;
|
|
2647
2718
|
}, c);
|
|
@@ -2657,16 +2728,16 @@ function Lr(e = 3e3) {
|
|
|
2657
2728
|
}
|
|
2658
2729
|
//#endregion
|
|
2659
2730
|
//#region src/enums/BaseBadgeEnum.ts
|
|
2660
|
-
var
|
|
2731
|
+
var Wr = /* @__PURE__ */ function(e) {
|
|
2661
2732
|
return e.WIN = "WIN", e.LOSE = "LOSE", e;
|
|
2662
|
-
}({}),
|
|
2733
|
+
}({}), Gr = {
|
|
2663
2734
|
GET: "bg-blue-600",
|
|
2664
2735
|
POST: "bg-emerald-600",
|
|
2665
2736
|
PUT: "bg-amber-600",
|
|
2666
2737
|
DELETE: "bg-red-600",
|
|
2667
2738
|
PATCH: "bg-purple-600",
|
|
2668
2739
|
HEAD: "bg-gray-600"
|
|
2669
|
-
},
|
|
2740
|
+
}, Kr = {
|
|
2670
2741
|
GET: "bg-blue-500",
|
|
2671
2742
|
POST: "bg-green-500",
|
|
2672
2743
|
PUT: "bg-yellow-500",
|
|
@@ -2674,23 +2745,23 @@ var Rr = /* @__PURE__ */ function(e) {
|
|
|
2674
2745
|
PATCH: "bg-purple-500",
|
|
2675
2746
|
HEAD: "bg-gray-500"
|
|
2676
2747
|
};
|
|
2677
|
-
function
|
|
2678
|
-
return e ?
|
|
2748
|
+
function qr(e) {
|
|
2749
|
+
return e ? Gr[e.toUpperCase()] ?? "bg-gray-600" : "bg-gray-600";
|
|
2679
2750
|
}
|
|
2680
|
-
function
|
|
2681
|
-
return e ?
|
|
2751
|
+
function Jr(e) {
|
|
2752
|
+
return e ? Kr[e.toUpperCase()] ?? "bg-gray-500" : "bg-gray-500";
|
|
2682
2753
|
}
|
|
2683
|
-
function
|
|
2754
|
+
function Yr(e) {
|
|
2684
2755
|
let t = e ?? 0;
|
|
2685
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";
|
|
2686
2757
|
}
|
|
2687
|
-
function
|
|
2758
|
+
function Xr(e, t) {
|
|
2688
2759
|
let n = e ?? 200;
|
|
2689
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";
|
|
2690
2761
|
}
|
|
2691
2762
|
//#endregion
|
|
2692
2763
|
//#region src/utils/sanitizeHtml.ts
|
|
2693
|
-
var
|
|
2764
|
+
var Zr = /* @__PURE__ */ new Set([
|
|
2694
2765
|
"A",
|
|
2695
2766
|
"B",
|
|
2696
2767
|
"STRONG",
|
|
@@ -2705,7 +2776,7 @@ var Gr = /* @__PURE__ */ new Set([
|
|
|
2705
2776
|
"LI",
|
|
2706
2777
|
"SPAN",
|
|
2707
2778
|
"DIV"
|
|
2708
|
-
]),
|
|
2779
|
+
]), Qr = /* @__PURE__ */ new Set([
|
|
2709
2780
|
"SCRIPT",
|
|
2710
2781
|
"STYLE",
|
|
2711
2782
|
"IFRAME",
|
|
@@ -2713,53 +2784,53 @@ var Gr = /* @__PURE__ */ new Set([
|
|
|
2713
2784
|
"EMBED",
|
|
2714
2785
|
"NOSCRIPT",
|
|
2715
2786
|
"TEMPLATE"
|
|
2716
|
-
]),
|
|
2717
|
-
function
|
|
2787
|
+
]), $r = { A: /* @__PURE__ */ new Set(["href", "title"]) };
|
|
2788
|
+
function ei(e) {
|
|
2718
2789
|
let t = e.trim().toLowerCase();
|
|
2719
2790
|
return t.startsWith("http://") || t.startsWith("https://") || t.startsWith("mailto:") || t.startsWith("tel:") || t.startsWith("/") || t.startsWith("#") || t === "";
|
|
2720
2791
|
}
|
|
2721
|
-
function
|
|
2792
|
+
function ti(e) {
|
|
2722
2793
|
if (e.nodeType !== Node.ELEMENT_NODE) return;
|
|
2723
2794
|
let t = e, n = t.tagName.toUpperCase();
|
|
2724
|
-
if (!
|
|
2725
|
-
|
|
2795
|
+
if (!Zr.has(n)) {
|
|
2796
|
+
Qr.has(n) ? t.remove() : t.replaceWith(document.createTextNode(t.textContent ?? ""));
|
|
2726
2797
|
return;
|
|
2727
2798
|
}
|
|
2728
|
-
let r =
|
|
2799
|
+
let r = $r[n] ?? /* @__PURE__ */ new Set();
|
|
2729
2800
|
for (let e of Array.from(t.attributes)) {
|
|
2730
2801
|
if (!r.has(e.name.toLowerCase())) {
|
|
2731
2802
|
t.removeAttribute(e.name);
|
|
2732
2803
|
continue;
|
|
2733
2804
|
}
|
|
2734
|
-
n === "A" && e.name.toLowerCase() === "href" && !
|
|
2805
|
+
n === "A" && e.name.toLowerCase() === "href" && !ei(e.value) && t.removeAttribute(e.name);
|
|
2735
2806
|
}
|
|
2736
2807
|
n === "A" && t.hasAttribute("href") && (t.setAttribute("rel", "noopener noreferrer"), t.setAttribute("target", "_blank"));
|
|
2737
|
-
for (let e of Array.from(t.childNodes))
|
|
2808
|
+
for (let e of Array.from(t.childNodes)) ti(e);
|
|
2738
2809
|
}
|
|
2739
|
-
function
|
|
2810
|
+
function ni(e) {
|
|
2740
2811
|
if (!e) return "";
|
|
2741
2812
|
let t = new DOMParser().parseFromString(`<div>${e}</div>`, "text/html").body.firstElementChild;
|
|
2742
2813
|
if (!t) return "";
|
|
2743
|
-
for (let e of Array.from(t.childNodes))
|
|
2814
|
+
for (let e of Array.from(t.childNodes)) ti(e);
|
|
2744
2815
|
return t.innerHTML;
|
|
2745
2816
|
}
|
|
2746
2817
|
//#endregion
|
|
2747
2818
|
//#region src/utils/format.ts
|
|
2748
|
-
var
|
|
2749
|
-
function
|
|
2750
|
-
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;
|
|
2751
2822
|
let n = typeof e == "string" ? Number(e) : e;
|
|
2752
2823
|
return isFinite(n) ? n.toLocaleString(void 0, {
|
|
2753
2824
|
minimumFractionDigits: t,
|
|
2754
2825
|
maximumFractionDigits: t
|
|
2755
|
-
}) :
|
|
2826
|
+
}) : ri;
|
|
2756
2827
|
}
|
|
2757
|
-
function
|
|
2758
|
-
if (e == null || e === "") return
|
|
2828
|
+
function ai(e) {
|
|
2829
|
+
if (e == null || e === "") return ri;
|
|
2759
2830
|
let t = new Date(e);
|
|
2760
2831
|
return isNaN(t.getTime()) ? String(e) : t.toLocaleString();
|
|
2761
2832
|
}
|
|
2762
|
-
function
|
|
2833
|
+
function oi(e) {
|
|
2763
2834
|
return new Date(e).toLocaleString(void 0, {
|
|
2764
2835
|
month: "short",
|
|
2765
2836
|
day: "numeric",
|
|
@@ -2767,13 +2838,13 @@ function ei(e) {
|
|
|
2767
2838
|
minute: "2-digit"
|
|
2768
2839
|
});
|
|
2769
2840
|
}
|
|
2770
|
-
function
|
|
2841
|
+
function si(e) {
|
|
2771
2842
|
return new Date(e).toLocaleDateString(void 0, {
|
|
2772
2843
|
month: "short",
|
|
2773
2844
|
day: "numeric"
|
|
2774
2845
|
});
|
|
2775
2846
|
}
|
|
2776
|
-
function
|
|
2847
|
+
function ci(e) {
|
|
2777
2848
|
if (!isFinite(e) || e === 0) return e.toFixed(2);
|
|
2778
2849
|
let t = Math.abs(e), n = 2;
|
|
2779
2850
|
return t < 1e-4 ? n = 8 : t < .01 ? n = 6 : t < 1 ? n = 4 : t < 100 && (n = 3), e.toLocaleString(void 0, {
|
|
@@ -2781,15 +2852,15 @@ function ni(e) {
|
|
|
2781
2852
|
maximumFractionDigits: n
|
|
2782
2853
|
});
|
|
2783
2854
|
}
|
|
2784
|
-
function
|
|
2855
|
+
function li(e, t = 2) {
|
|
2785
2856
|
return `${e >= 0 ? "+" : ""}${e.toFixed(t)}%`;
|
|
2786
2857
|
}
|
|
2787
|
-
function
|
|
2858
|
+
function ui(e) {
|
|
2788
2859
|
return `${e < 0 ? "-" : "+"}$${Math.abs(e).toFixed(2)}`;
|
|
2789
2860
|
}
|
|
2790
2861
|
//#endregion
|
|
2791
2862
|
//#region src/utils/pnl.ts
|
|
2792
|
-
function
|
|
2863
|
+
function di(e) {
|
|
2793
2864
|
if (e.buyPrice == null || e.lastPrice == null || e.filledQty == null) return {
|
|
2794
2865
|
pnlUsd: null,
|
|
2795
2866
|
pnlPct: null
|
|
@@ -2804,4 +2875,4 @@ function ai(e) {
|
|
|
2804
2875
|
};
|
|
2805
2876
|
}
|
|
2806
2877
|
//#endregion
|
|
2807
|
-
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 };
|