mgv-backoffice 1.11.0 → 1.16.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 +54 -2
- package/dist/src/components/BaseButton.vue.d.ts +22 -0
- package/dist/src/components/BaseConfirmModal.vue.d.ts +16 -1
- package/dist/src/components/BaseCopyButton.vue.d.ts +26 -0
- package/dist/src/components/BaseModalShell.vue.d.ts +18 -0
- package/dist/src/components/EarningsCard.vue.d.ts +11 -0
- package/dist/src/enums/BaseButtonEnum.d.ts +5 -1
- package/dist/src/index.d.ts +1 -0
- package/dist/ui-lib.css +1 -1
- package/dist/ui-lib.js +487 -268
- package/dist/ui-lib.umd.cjs +1 -1
- package/package.json +2 -1
- package/src/components/BaseButton.vue +172 -2
- package/src/components/BaseConfirmModal.vue +7 -0
- package/src/components/BaseCopyButton.vue +135 -0
- package/src/components/BaseEntityPickerModal.vue +1 -1
- package/src/components/BaseModalShell.vue +52 -0
- package/src/components/EarningsCard.test.ts +33 -0
- package/src/components/EarningsCard.vue +64 -10
- package/src/enums/BaseButtonEnum.ts +4 -0
- package/src/index.ts +1 -0
- package/src/utils/pnl.test.ts +6 -0
- package/src/utils/pnl.ts +6 -1
- package/tailwind.safelist.css +17 -1
- package/tailwind.safelist.js +17 -0
package/dist/ui-lib.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Fragment as e, Teleport as t, computed as n, createBlock as r, createCommentVNode as i, createElementBlock as a, createElementVNode as o, createTextVNode as s, createVNode as c, defineComponent as l, effectScope as u, nextTick as d, normalizeClass as f, onBeforeUnmount as p, onMounted as m, onScopeDispose as h, onUnmounted as g, openBlock as _, ref as v, renderList as y, renderSlot as b, resolveComponent as x, resolveDynamicComponent as S, toDisplayString as C, unref as w, useSlots as T, vModelText as E, vShow as D, watch as O, withCtx as k, withDirectives as A, withKeys as j, withModifiers as M } from "vue";
|
|
2
|
-
import { ArrowDownIcon as ee, ArrowUpIcon as te, Bars3Icon as N, CheckCircleIcon as ne, ChevronRightIcon as re,
|
|
3
|
-
import { HomeIcon as
|
|
4
|
-
import { useRoute as
|
|
2
|
+
import { ArrowDownIcon as ee, ArrowUpIcon as te, Bars3Icon as N, CheckCircleIcon as ne, ChevronRightIcon as re, ClipboardDocumentCheckIcon as ie, ClipboardDocumentIcon as ae, DocumentDuplicateIcon as oe, ExclamationCircleIcon as se, ExclamationTriangleIcon as P, FolderIcon as ce, InformationCircleIcon as le, MagnifyingGlassIcon as ue, XMarkIcon as F } from "@heroicons/vue/24/outline";
|
|
3
|
+
import { HomeIcon as de } from "@heroicons/vue/24/solid";
|
|
4
|
+
import { useRoute as fe, useRouter as pe } from "vue-router";
|
|
5
5
|
//#region src/enums/AlertEnum.ts
|
|
6
6
|
var I = /* @__PURE__ */ function(e) {
|
|
7
7
|
return e.WARNING = "WARNING", e.ERROR = "ERROR", e.SUCCESS = "SUCCESS", e.INFO = "INFO", e;
|
|
@@ -10,7 +10,7 @@ var I = /* @__PURE__ */ function(e) {
|
|
|
10
10
|
}({});
|
|
11
11
|
//#endregion
|
|
12
12
|
//#region src/utils/util.ts
|
|
13
|
-
function
|
|
13
|
+
function me(e) {
|
|
14
14
|
let t = "red";
|
|
15
15
|
switch (e) {
|
|
16
16
|
case I.ERROR:
|
|
@@ -28,7 +28,7 @@ function fe(e) {
|
|
|
28
28
|
}
|
|
29
29
|
return t;
|
|
30
30
|
}
|
|
31
|
-
function
|
|
31
|
+
function he(e) {
|
|
32
32
|
let t = "red";
|
|
33
33
|
switch (e) {
|
|
34
34
|
case L.GREEN:
|
|
@@ -57,7 +57,7 @@ function pe(e) {
|
|
|
57
57
|
}
|
|
58
58
|
//#endregion
|
|
59
59
|
//#region src/components/BaseAlert.vue?vue&type=script&setup=true&lang.ts
|
|
60
|
-
var
|
|
60
|
+
var ge = { class: "font-medium pl-1" }, _e = /* @__PURE__ */ l({
|
|
61
61
|
__name: "BaseAlert",
|
|
62
62
|
props: {
|
|
63
63
|
title: {
|
|
@@ -74,15 +74,15 @@ var me = { class: "font-medium pl-1" }, he = /* @__PURE__ */ l({
|
|
|
74
74
|
setup(e) {
|
|
75
75
|
let t = e;
|
|
76
76
|
function n() {
|
|
77
|
-
let e =
|
|
77
|
+
let e = me(t.color);
|
|
78
78
|
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";
|
|
79
79
|
}
|
|
80
80
|
return (t, r) => (_(), a("div", {
|
|
81
81
|
class: f(n()),
|
|
82
82
|
role: "alert"
|
|
83
|
-
}, [c(w(
|
|
83
|
+
}, [c(w(le), { class: "w-6 h-6 text-gray-400" }), o("div", null, [o("span", ge, C(e.title), 1)])], 2));
|
|
84
84
|
}
|
|
85
|
-
}),
|
|
85
|
+
}), ve = "bg-red-100 text-red-700 border-red-200", R = /* @__PURE__ */ l({
|
|
86
86
|
__name: "BaseBadge",
|
|
87
87
|
props: { color: {
|
|
88
88
|
type: String,
|
|
@@ -96,19 +96,19 @@ var me = { class: "font-medium pl-1" }, he = /* @__PURE__ */ l({
|
|
|
96
96
|
[L.YELLOW]: "bg-yellow-100 text-yellow-700 border-yellow-200",
|
|
97
97
|
[L.GRAY]: "bg-gray-100 text-gray-700 border-gray-200",
|
|
98
98
|
[L.NONE]: "bg-gray-50 text-gray-600 border-gray-200"
|
|
99
|
-
}, c = n(() => `inline-flex items-center gap-1 font-semibold text-xs leading-none px-3 py-1.5 rounded-full border ${o.color && s[o.color] ||
|
|
99
|
+
}, c = n(() => `inline-flex items-center gap-1 font-semibold text-xs leading-none px-3 py-1.5 rounded-full border ${o.color && s[o.color] || ve}`);
|
|
100
100
|
return (e, t) => r.value ? (_(), a("span", {
|
|
101
101
|
key: 0,
|
|
102
102
|
class: f(c.value)
|
|
103
103
|
}, [b(e.$slots, "default")], 2)) : i("", !0);
|
|
104
104
|
}
|
|
105
|
-
}),
|
|
105
|
+
}), ye = {
|
|
106
106
|
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",
|
|
107
107
|
"aria-label": "Breadcrumb"
|
|
108
|
-
},
|
|
108
|
+
}, be = { class: "inline-flex items-center space-x-1 md:space-x-3" }, xe = {
|
|
109
109
|
class: "inline-flex items-center",
|
|
110
110
|
style: { "margin-left": "0" }
|
|
111
|
-
},
|
|
111
|
+
}, Se = /* @__PURE__ */ l({
|
|
112
112
|
__name: "BaseBreadcrumb",
|
|
113
113
|
props: {
|
|
114
114
|
items: {
|
|
@@ -133,11 +133,11 @@ var me = { class: "font-medium pl-1" }, he = /* @__PURE__ */ l({
|
|
|
133
133
|
});
|
|
134
134
|
return (t, n) => {
|
|
135
135
|
let r = x("router-link");
|
|
136
|
-
return _(), a("nav",
|
|
136
|
+
return _(), a("nav", ye, [o("ol", be, [o("li", xe, [c(r, {
|
|
137
137
|
to: "/",
|
|
138
138
|
class: "inline-flex items-center text-sm font-medium text-gray-700 hover:text-blue-600 dark:text-gray-400 dark:hover:text-white"
|
|
139
139
|
}, {
|
|
140
|
-
default: k(() => [c(w(
|
|
140
|
+
default: k(() => [c(w(de), { class: "h-4 w-4 text-gray-500 mr-2" }), n[0] ||= s(" Home ", -1)]),
|
|
141
141
|
_: 1
|
|
142
142
|
})]), (_(!0), a(e, null, y(i.value, (e, t) => (_(), a("li", {
|
|
143
143
|
key: t,
|
|
@@ -153,20 +153,46 @@ var me = { class: "font-medium pl-1" }, he = /* @__PURE__ */ l({
|
|
|
153
153
|
};
|
|
154
154
|
}
|
|
155
155
|
}), z = /* @__PURE__ */ function(e) {
|
|
156
|
-
return e.RED = "RED", e.BLUE = "BLUE", e.WHITE = "WHITE", e.DARK = "DARK", e.GREEN = "GREEN", e.YELLOW = "YELLOW", e.PURPLE = "PURPLE", e;
|
|
156
|
+
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;
|
|
157
157
|
}({}), B = /* @__PURE__ */ function(e) {
|
|
158
158
|
return e.EXTRA_SMALL = "EXTRA_SMALL", e.SMALL = "SMALL", e.BASE = "BASE", e.LARGE = "LARGE", e.EXTRA_LARGE = "EXTRA_LARGE", e;
|
|
159
|
-
}({}),
|
|
159
|
+
}({}), V = v(!1), Ce = !1, H = "mgv-theme";
|
|
160
|
+
function we(e) {
|
|
161
|
+
if (!Ce) {
|
|
162
|
+
if (Ce = !0, H = e, typeof window < "u") {
|
|
163
|
+
let e = window.localStorage?.getItem(H);
|
|
164
|
+
e ? V.value = e === "dark" : typeof window.matchMedia == "function" && (V.value = window.matchMedia("(prefers-color-scheme: dark)").matches);
|
|
165
|
+
}
|
|
166
|
+
typeof document < "u" && u(!0).run(() => {
|
|
167
|
+
O(V, (e) => {
|
|
168
|
+
document.documentElement.classList.toggle("dark", e), window.localStorage?.setItem(H, e ? "dark" : "light");
|
|
169
|
+
}, { immediate: !0 });
|
|
170
|
+
});
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
function U(e) {
|
|
174
|
+
we(e?.storageKey ?? H);
|
|
175
|
+
function t() {
|
|
176
|
+
V.value = !V.value;
|
|
177
|
+
}
|
|
178
|
+
return {
|
|
179
|
+
isDark: V,
|
|
180
|
+
toggleTheme: t
|
|
181
|
+
};
|
|
182
|
+
}
|
|
183
|
+
//#endregion
|
|
184
|
+
//#region src/components/BaseButton.vue?vue&type=script&setup=true&lang.ts
|
|
185
|
+
var Te = [
|
|
160
186
|
"type",
|
|
161
187
|
"disabled",
|
|
162
188
|
"onClick"
|
|
163
|
-
],
|
|
189
|
+
], Ee = {
|
|
164
190
|
key: 0,
|
|
165
191
|
class: "inline-flex items-center"
|
|
166
|
-
},
|
|
192
|
+
}, De = { key: 1 }, Oe = { key: 2 }, ke = ["type", "disabled"], Ae = {
|
|
167
193
|
key: 0,
|
|
168
194
|
class: "inline-flex items-center"
|
|
169
|
-
},
|
|
195
|
+
}, je = { key: 1 }, Me = { key: 2 }, Ne = /* @__PURE__ */ l({
|
|
170
196
|
__name: "BaseButton",
|
|
171
197
|
props: {
|
|
172
198
|
description: {
|
|
@@ -204,6 +230,16 @@ var me = { class: "font-medium pl-1" }, he = /* @__PURE__ */ l({
|
|
|
204
230
|
type: Boolean,
|
|
205
231
|
required: !1
|
|
206
232
|
},
|
|
233
|
+
outline: {
|
|
234
|
+
type: Boolean,
|
|
235
|
+
required: !1,
|
|
236
|
+
default: !1
|
|
237
|
+
},
|
|
238
|
+
ghost: {
|
|
239
|
+
type: Boolean,
|
|
240
|
+
required: !1,
|
|
241
|
+
default: !1
|
|
242
|
+
},
|
|
207
243
|
isDisable: {
|
|
208
244
|
type: Boolean,
|
|
209
245
|
required: !1
|
|
@@ -218,37 +254,148 @@ var me = { class: "font-medium pl-1" }, he = /* @__PURE__ */ l({
|
|
|
218
254
|
}
|
|
219
255
|
},
|
|
220
256
|
setup(e) {
|
|
221
|
-
let t = e;
|
|
222
|
-
function
|
|
223
|
-
let e =
|
|
224
|
-
|
|
257
|
+
let { isDark: t } = U(), n = e;
|
|
258
|
+
function s() {
|
|
259
|
+
let e = {
|
|
260
|
+
[z.BLUE]: {
|
|
261
|
+
light: "text-blue-700 border-blue-300 hover:bg-blue-50",
|
|
262
|
+
dark: "text-blue-400 border-blue-500/40 hover:bg-blue-500/10"
|
|
263
|
+
},
|
|
264
|
+
[z.GREEN]: {
|
|
265
|
+
light: "text-green-700 border-green-300 hover:bg-green-50",
|
|
266
|
+
dark: "text-green-400 border-green-500/40 hover:bg-green-500/10"
|
|
267
|
+
},
|
|
268
|
+
[z.EMERALD]: {
|
|
269
|
+
light: "text-emerald-700 border-emerald-300 hover:bg-emerald-50",
|
|
270
|
+
dark: "text-emerald-400 border-emerald-500/40 hover:bg-emerald-500/10"
|
|
271
|
+
},
|
|
272
|
+
[z.RED]: {
|
|
273
|
+
light: "text-red-700 border-red-300 hover:bg-red-50",
|
|
274
|
+
dark: "text-red-400 border-red-500/40 hover:bg-red-500/10"
|
|
275
|
+
},
|
|
276
|
+
[z.YELLOW]: {
|
|
277
|
+
light: "text-yellow-700 border-yellow-300 hover:bg-yellow-50",
|
|
278
|
+
dark: "text-yellow-400 border-yellow-500/40 hover:bg-yellow-500/10"
|
|
279
|
+
},
|
|
280
|
+
[z.PURPLE]: {
|
|
281
|
+
light: "text-purple-700 border-purple-300 hover:bg-purple-50",
|
|
282
|
+
dark: "text-purple-400 border-purple-500/40 hover:bg-purple-500/10"
|
|
283
|
+
},
|
|
284
|
+
[z.SKY]: {
|
|
285
|
+
light: "text-sky-700 border-sky-300 hover:bg-sky-50",
|
|
286
|
+
dark: "text-sky-400 border-sky-500/40 hover:bg-sky-500/10"
|
|
287
|
+
},
|
|
288
|
+
[z.AMBER]: {
|
|
289
|
+
light: "text-amber-700 border-amber-300 hover:bg-amber-50",
|
|
290
|
+
dark: "text-amber-400 border-amber-500/40 hover:bg-amber-500/10"
|
|
291
|
+
},
|
|
292
|
+
[z.GRAY]: {
|
|
293
|
+
light: "text-gray-700 border-gray-300 hover:bg-gray-50",
|
|
294
|
+
dark: "text-gray-300 border-gray-600 hover:bg-gray-800"
|
|
295
|
+
},
|
|
296
|
+
[z.DARK]: {
|
|
297
|
+
light: "text-gray-700 border-gray-300 hover:bg-gray-50",
|
|
298
|
+
dark: "text-gray-300 border-gray-600 hover:bg-gray-800"
|
|
299
|
+
},
|
|
300
|
+
[z.WHITE]: {
|
|
301
|
+
light: "text-gray-700 border-gray-300 hover:bg-gray-50",
|
|
302
|
+
dark: "text-gray-300 border-gray-600 hover:bg-gray-800"
|
|
303
|
+
}
|
|
304
|
+
}, r = e[n.color] ?? e[z.BLUE], i = t.value ? r.dark : r.light;
|
|
305
|
+
return n.isDisable || n.isLoading ? `border bg-transparent ${i} opacity-50 cursor-not-allowed` : `focus:outline-none border bg-transparent ${i}`;
|
|
306
|
+
}
|
|
307
|
+
function c() {
|
|
308
|
+
let e = {
|
|
309
|
+
[z.BLUE]: {
|
|
310
|
+
light: "text-blue-600 hover:bg-blue-50",
|
|
311
|
+
dark: "text-blue-400 hover:bg-blue-500/10"
|
|
312
|
+
},
|
|
313
|
+
[z.GREEN]: {
|
|
314
|
+
light: "text-green-600 hover:bg-green-50",
|
|
315
|
+
dark: "text-green-400 hover:bg-green-500/10"
|
|
316
|
+
},
|
|
317
|
+
[z.EMERALD]: {
|
|
318
|
+
light: "text-emerald-600 hover:bg-emerald-50",
|
|
319
|
+
dark: "text-emerald-400 hover:bg-emerald-500/10"
|
|
320
|
+
},
|
|
321
|
+
[z.SKY]: {
|
|
322
|
+
light: "text-sky-600 hover:bg-sky-50",
|
|
323
|
+
dark: "text-sky-400 hover:bg-sky-500/10"
|
|
324
|
+
},
|
|
325
|
+
[z.RED]: {
|
|
326
|
+
light: "text-red-500 hover:bg-red-50",
|
|
327
|
+
dark: "text-red-400 hover:bg-red-500/10"
|
|
328
|
+
},
|
|
329
|
+
[z.AMBER]: {
|
|
330
|
+
light: "text-amber-700 hover:bg-amber-50",
|
|
331
|
+
dark: "text-amber-300 hover:bg-amber-500/10"
|
|
332
|
+
},
|
|
333
|
+
[z.YELLOW]: {
|
|
334
|
+
light: "text-yellow-600 hover:bg-yellow-50",
|
|
335
|
+
dark: "text-yellow-400 hover:bg-yellow-500/10"
|
|
336
|
+
},
|
|
337
|
+
[z.PURPLE]: {
|
|
338
|
+
light: "text-purple-600 hover:bg-purple-50",
|
|
339
|
+
dark: "text-purple-400 hover:bg-purple-500/10"
|
|
340
|
+
},
|
|
341
|
+
[z.GRAY]: {
|
|
342
|
+
light: "text-gray-500 hover:bg-gray-100",
|
|
343
|
+
dark: "text-gray-400 hover:bg-gray-800"
|
|
344
|
+
},
|
|
345
|
+
[z.DARK]: {
|
|
346
|
+
light: "text-gray-500 hover:bg-gray-100",
|
|
347
|
+
dark: "text-gray-400 hover:bg-gray-800"
|
|
348
|
+
},
|
|
349
|
+
[z.WHITE]: {
|
|
350
|
+
light: "text-gray-500 hover:bg-gray-100",
|
|
351
|
+
dark: "text-gray-400 hover:bg-gray-800"
|
|
352
|
+
}
|
|
353
|
+
}, r = e[n.color] ?? e[z.GRAY], i = t.value ? r.dark : r.light;
|
|
354
|
+
return n.isDisable || n.isLoading ? `bg-transparent ${i} opacity-60 cursor-not-allowed` : `focus:outline-none bg-transparent ${i} cursor-pointer`;
|
|
355
|
+
}
|
|
356
|
+
function l() {
|
|
357
|
+
let e = n.isDisable || n.isLoading, t;
|
|
358
|
+
switch (n.color) {
|
|
225
359
|
case z.BLUE:
|
|
226
|
-
|
|
360
|
+
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";
|
|
227
361
|
break;
|
|
228
362
|
case z.WHITE:
|
|
229
|
-
|
|
363
|
+
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";
|
|
230
364
|
break;
|
|
231
365
|
case z.DARK:
|
|
232
|
-
|
|
366
|
+
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";
|
|
233
367
|
break;
|
|
234
368
|
case z.GREEN:
|
|
235
|
-
|
|
369
|
+
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";
|
|
370
|
+
break;
|
|
371
|
+
case z.EMERALD:
|
|
372
|
+
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";
|
|
236
373
|
break;
|
|
237
374
|
case z.RED:
|
|
238
|
-
|
|
375
|
+
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";
|
|
239
376
|
break;
|
|
240
377
|
case z.YELLOW:
|
|
241
|
-
|
|
378
|
+
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";
|
|
242
379
|
break;
|
|
243
380
|
case z.PURPLE:
|
|
244
|
-
|
|
381
|
+
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 px-5 py-2.5 mb-2";
|
|
382
|
+
break;
|
|
383
|
+
case z.SKY:
|
|
384
|
+
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";
|
|
385
|
+
break;
|
|
386
|
+
case z.AMBER:
|
|
387
|
+
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";
|
|
388
|
+
break;
|
|
389
|
+
case z.GRAY:
|
|
390
|
+
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";
|
|
245
391
|
break;
|
|
246
392
|
default:
|
|
247
|
-
|
|
393
|
+
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";
|
|
248
394
|
break;
|
|
249
395
|
}
|
|
396
|
+
n.outline && (t = s()), n.ghost && (t = c());
|
|
250
397
|
let r = "px-5 py-2.5 mr-2 mb-2 text-sm";
|
|
251
|
-
switch (
|
|
398
|
+
switch (n.size) {
|
|
252
399
|
case B.EXTRA_SMALL:
|
|
253
400
|
r = "px-3 py-2 text-xs";
|
|
254
401
|
break;
|
|
@@ -266,25 +413,25 @@ var me = { class: "font-medium pl-1" }, he = /* @__PURE__ */ l({
|
|
|
266
413
|
break;
|
|
267
414
|
}
|
|
268
415
|
let i = "rounded-lg";
|
|
269
|
-
return
|
|
416
|
+
return n.isRounded && (i = "rounded-full"), "inline-flex items-center " + r + " " + t + " font-medium " + i;
|
|
270
417
|
}
|
|
271
|
-
return (
|
|
272
|
-
let
|
|
273
|
-
return e.to ? (_(), r(
|
|
418
|
+
return (t, s) => {
|
|
419
|
+
let c = x("router-link");
|
|
420
|
+
return e.to ? (_(), r(c, {
|
|
274
421
|
key: 0,
|
|
275
422
|
to: e.to,
|
|
276
423
|
custom: ""
|
|
277
424
|
}, {
|
|
278
425
|
default: k(({ navigate: r }) => [o("button", {
|
|
279
|
-
type:
|
|
280
|
-
class: f(
|
|
426
|
+
type: n.type,
|
|
427
|
+
class: f(l()),
|
|
281
428
|
disabled: e.isDisable || e.isLoading,
|
|
282
429
|
onClick: r
|
|
283
430
|
}, [
|
|
284
|
-
e.isLoading ? (_(), a("div",
|
|
431
|
+
e.isLoading ? (_(), a("div", Ee, [...s[0] ||= [o("svg", {
|
|
285
432
|
"aria-hidden": "true",
|
|
286
433
|
role: "status",
|
|
287
|
-
class: "inline w-4 h-4 me-3
|
|
434
|
+
class: "inline w-4 h-4 me-3 animate-spin",
|
|
288
435
|
viewBox: "0 0 100 101",
|
|
289
436
|
fill: "none",
|
|
290
437
|
xmlns: "http://www.w3.org/2000/svg"
|
|
@@ -295,21 +442,21 @@ var me = { class: "font-medium pl-1" }, he = /* @__PURE__ */ l({
|
|
|
295
442
|
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",
|
|
296
443
|
fill: "currentColor"
|
|
297
444
|
})], -1)]])) : i("", !0),
|
|
298
|
-
e.iconLeft ? i("", !0) : (_(), a("span",
|
|
299
|
-
b(
|
|
300
|
-
e.iconLeft ? (_(), a("span",
|
|
301
|
-
], 10,
|
|
445
|
+
e.iconLeft ? i("", !0) : (_(), a("span", De, C(e.description), 1)),
|
|
446
|
+
b(t.$slots, "default"),
|
|
447
|
+
e.iconLeft ? (_(), a("span", Oe, C(e.description), 1)) : i("", !0)
|
|
448
|
+
], 10, Te)]),
|
|
302
449
|
_: 3
|
|
303
450
|
}, 8, ["to"])) : (_(), a("button", {
|
|
304
451
|
key: 1,
|
|
305
|
-
type:
|
|
306
|
-
class: f(
|
|
452
|
+
type: n.type,
|
|
453
|
+
class: f(l()),
|
|
307
454
|
disabled: e.isDisable || e.isLoading
|
|
308
455
|
}, [
|
|
309
|
-
e.isLoading ? (_(), a("div",
|
|
456
|
+
e.isLoading ? (_(), a("div", Ae, [...s[1] ||= [o("svg", {
|
|
310
457
|
"aria-hidden": "true",
|
|
311
458
|
role: "status",
|
|
312
|
-
class: "inline w-4 h-4 me-3
|
|
459
|
+
class: "inline w-4 h-4 me-3 animate-spin",
|
|
313
460
|
viewBox: "0 0 100 101",
|
|
314
461
|
fill: "none",
|
|
315
462
|
xmlns: "http://www.w3.org/2000/svg"
|
|
@@ -320,58 +467,58 @@ var me = { class: "font-medium pl-1" }, he = /* @__PURE__ */ l({
|
|
|
320
467
|
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",
|
|
321
468
|
fill: "currentColor"
|
|
322
469
|
})], -1)]])) : i("", !0),
|
|
323
|
-
e.iconLeft ? i("", !0) : (_(), a("span",
|
|
324
|
-
b(
|
|
325
|
-
e.iconLeft ? (_(), a("span",
|
|
326
|
-
], 10,
|
|
470
|
+
e.iconLeft ? i("", !0) : (_(), a("span", je, C(e.description), 1)),
|
|
471
|
+
b(t.$slots, "default"),
|
|
472
|
+
e.iconLeft ? (_(), a("span", Me, C(e.description), 1)) : i("", !0)
|
|
473
|
+
], 10, ke));
|
|
327
474
|
};
|
|
328
475
|
}
|
|
329
|
-
}),
|
|
476
|
+
}), W = /* @__PURE__ */ function(e) {
|
|
330
477
|
return e.BASE = "BASE", e.BASE_SHORTER = "BASE_SHORTER", e.SQUARE = "SQUARE", e;
|
|
331
|
-
}({}),
|
|
478
|
+
}({}), Pe = {
|
|
332
479
|
key: 0,
|
|
333
480
|
class: "h-px my-8 bg-gray-200 border-0 dark:bg-gray-700"
|
|
334
|
-
},
|
|
481
|
+
}, Fe = {
|
|
335
482
|
key: 1,
|
|
336
483
|
class: "w-48 h-1 mx-auto my-4 bg-gray-100 border-0 rounded md:my-10 dark:bg-gray-700"
|
|
337
|
-
},
|
|
484
|
+
}, Ie = {
|
|
338
485
|
key: 2,
|
|
339
486
|
class: "w-8 h-8 mx-auto my-8 bg-gray-200 border-0 rounded md:my-12 dark:bg-gray-700"
|
|
340
|
-
},
|
|
487
|
+
}, Le = /* @__PURE__ */ l({
|
|
341
488
|
__name: "BaseLine",
|
|
342
489
|
props: { mode: {
|
|
343
490
|
type: String,
|
|
344
491
|
required: !1,
|
|
345
|
-
default:
|
|
492
|
+
default: W.BASE
|
|
346
493
|
} },
|
|
347
494
|
setup(t) {
|
|
348
495
|
return (n, r) => (_(), a(e, null, [
|
|
349
|
-
t.mode === w(
|
|
350
|
-
t.mode === w(
|
|
351
|
-
t.mode === w(
|
|
496
|
+
t.mode === w(W).BASE ? (_(), a("hr", Pe)) : i("", !0),
|
|
497
|
+
t.mode === w(W).BASE_SHORTER ? (_(), a("hr", Fe)) : i("", !0),
|
|
498
|
+
t.mode === w(W).SQUARE ? (_(), a("hr", Ie)) : i("", !0)
|
|
352
499
|
], 64));
|
|
353
500
|
}
|
|
354
|
-
}),
|
|
501
|
+
}), G = /* @__PURE__ */ function(e) {
|
|
355
502
|
return e.SMALL = "SMALL", e.MEDIUM = "MEDIUM", e.LARGE = "LARGE", e;
|
|
356
|
-
}({}),
|
|
503
|
+
}({}), Re = G, ze = ["height", "width"], Be = /* @__PURE__ */ l({
|
|
357
504
|
__name: "BaseLogo",
|
|
358
505
|
props: { size: {
|
|
359
506
|
type: String,
|
|
360
507
|
required: !1,
|
|
361
|
-
default:
|
|
508
|
+
default: G.MEDIUM
|
|
362
509
|
} },
|
|
363
510
|
setup(e) {
|
|
364
511
|
let t = e;
|
|
365
512
|
function n() {
|
|
366
513
|
let e = "";
|
|
367
514
|
switch (t.size) {
|
|
368
|
-
case
|
|
515
|
+
case G.SMALL:
|
|
369
516
|
e = "50px";
|
|
370
517
|
break;
|
|
371
|
-
case
|
|
518
|
+
case G.MEDIUM:
|
|
372
519
|
e = "100px";
|
|
373
520
|
break;
|
|
374
|
-
case
|
|
521
|
+
case G.LARGE:
|
|
375
522
|
e = "150px";
|
|
376
523
|
break;
|
|
377
524
|
}
|
|
@@ -533,17 +680,17 @@ var me = { class: "font-medium pl-1" }, he = /* @__PURE__ */ l({
|
|
|
533
680
|
d: "m281.7 183.8h3.6v18.5h-3.6z",
|
|
534
681
|
fill: "url(#k)"
|
|
535
682
|
}, null, -1)
|
|
536
|
-
]], 8,
|
|
683
|
+
]], 8, ze))]),
|
|
537
684
|
_: 1
|
|
538
685
|
});
|
|
539
686
|
};
|
|
540
687
|
}
|
|
541
|
-
}),
|
|
688
|
+
}), K = /* @__PURE__ */ function(e) {
|
|
542
689
|
return e.DELETE = "DELETE", e.SUCCESS = "SUCCESS", e;
|
|
543
|
-
}({}),
|
|
690
|
+
}({}), Ve = ["aria-labelledby"], He = {
|
|
544
691
|
key: 0,
|
|
545
692
|
class: "p-6 text-center"
|
|
546
|
-
},
|
|
693
|
+
}, Ue = ["id"], We = { class: "flex justify-center" }, Ge = /* @__PURE__ */ l({
|
|
547
694
|
__name: "BaseModal",
|
|
548
695
|
props: {
|
|
549
696
|
title: {
|
|
@@ -562,7 +709,7 @@ var me = { class: "font-medium pl-1" }, he = /* @__PURE__ */ l({
|
|
|
562
709
|
mode: {
|
|
563
710
|
type: String,
|
|
564
711
|
required: !1,
|
|
565
|
-
default:
|
|
712
|
+
default: K.SUCCESS
|
|
566
713
|
}
|
|
567
714
|
},
|
|
568
715
|
emits: ["closeModal", "confirmModal"],
|
|
@@ -585,13 +732,13 @@ var me = { class: "font-medium pl-1" }, he = /* @__PURE__ */ l({
|
|
|
585
732
|
role: "dialog",
|
|
586
733
|
"aria-modal": "true",
|
|
587
734
|
"aria-labelledby": "modal-title-" + t.title
|
|
588
|
-
}, [t.mode === w(
|
|
589
|
-
c(w(
|
|
735
|
+
}, [t.mode === w(K).DELETE ? (_(), a("div", He, [
|
|
736
|
+
c(w(se), { class: "w-12 h-12 text-gray-400 mx-auto mb-4" }),
|
|
590
737
|
o("h3", {
|
|
591
738
|
id: "modal-title-" + t.title,
|
|
592
739
|
class: "mb-5 text-lg font-normal text-gray-500 dark:text-gray-400"
|
|
593
|
-
}, " Are you sure you want to delete this " + C(t.title) + "? ", 9,
|
|
594
|
-
o("div",
|
|
740
|
+
}, " Are you sure you want to delete this " + C(t.title) + "? ", 9, Ue),
|
|
741
|
+
o("div", We, [c(s, {
|
|
595
742
|
color: w(z).RED,
|
|
596
743
|
onClick: r[1] ||= (e) => n.$emit("confirmModal"),
|
|
597
744
|
description: "Yes, I'm sure"
|
|
@@ -600,14 +747,14 @@ var me = { class: "font-medium pl-1" }, he = /* @__PURE__ */ l({
|
|
|
600
747
|
onClick: r[2] ||= (e) => n.$emit("closeModal"),
|
|
601
748
|
description: "No, cancel"
|
|
602
749
|
}, null, 8, ["color"])])
|
|
603
|
-
])) : i("", !0)], 8,
|
|
750
|
+
])) : i("", !0)], 8, Ve)], 64);
|
|
604
751
|
};
|
|
605
752
|
}
|
|
606
|
-
}),
|
|
753
|
+
}), q = (e, t) => {
|
|
607
754
|
let n = e.__vccOpts || e;
|
|
608
755
|
for (let [e, r] of t) n[e] = r;
|
|
609
756
|
return n;
|
|
610
|
-
},
|
|
757
|
+
}, Ke = /* @__PURE__ */ q(Ge, [["__scopeId", "data-v-1db4f0ac"]]), qe = /* @__PURE__ */ l({
|
|
611
758
|
__name: "BaseRow",
|
|
612
759
|
props: { bgColor: {
|
|
613
760
|
type: String,
|
|
@@ -621,7 +768,7 @@ var me = { class: "font-medium pl-1" }, he = /* @__PURE__ */ l({
|
|
|
621
768
|
}
|
|
622
769
|
return (e, t) => (_(), a("div", { class: f(n()) }, [b(e.$slots, "default")], 2));
|
|
623
770
|
}
|
|
624
|
-
}),
|
|
771
|
+
}), Je = /* @__PURE__ */ l({
|
|
625
772
|
__name: "BaseSpinner",
|
|
626
773
|
props: {
|
|
627
774
|
size: { default: "sm" },
|
|
@@ -649,17 +796,17 @@ var me = { class: "font-medium pl-1" }, he = /* @__PURE__ */ l({
|
|
|
649
796
|
"aria-label": "Loading"
|
|
650
797
|
}, null, 2));
|
|
651
798
|
}
|
|
652
|
-
}),
|
|
799
|
+
}), J = /* @__PURE__ */ function(e) {
|
|
653
800
|
return e.SUCCESS = "SUCCESS", e.WARNING = "WARNING", e.ERROR = "ERROR", e;
|
|
654
|
-
}({}),
|
|
801
|
+
}({}), Y = /* @__PURE__ */ function(e) {
|
|
655
802
|
return e.TOP_LEFT = "TOP_LEFT", e.TOP_RIGHT = "TOP_RIGHT", e.BOTTOM_LEFT = "BOTTOM_LEFT", e.BOTTOM_RIGHT = "BOTTOM_RIGHT", e;
|
|
656
|
-
}({}),
|
|
803
|
+
}({}), Ye = { 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" }, Xe = { class: "ml-3 text-sm font-normal" }, Ze = {
|
|
657
804
|
key: 3,
|
|
658
805
|
type: "button",
|
|
659
806
|
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",
|
|
660
807
|
"data-dismiss-target": "#toast-danger",
|
|
661
808
|
"aria-label": "Close"
|
|
662
|
-
},
|
|
809
|
+
}, Qe = /* @__PURE__ */ l({
|
|
663
810
|
__name: "BaseToast",
|
|
664
811
|
props: {
|
|
665
812
|
mode: {
|
|
@@ -678,7 +825,7 @@ var me = { class: "font-medium pl-1" }, he = /* @__PURE__ */ l({
|
|
|
678
825
|
positioning: {
|
|
679
826
|
type: String,
|
|
680
827
|
required: !1,
|
|
681
|
-
default:
|
|
828
|
+
default: Y.TOP_RIGHT
|
|
682
829
|
},
|
|
683
830
|
duration: {
|
|
684
831
|
type: Number,
|
|
@@ -699,13 +846,13 @@ var me = { class: "font-medium pl-1" }, he = /* @__PURE__ */ l({
|
|
|
699
846
|
function l() {
|
|
700
847
|
let e = "";
|
|
701
848
|
switch (t.mode) {
|
|
702
|
-
case
|
|
849
|
+
case J.ERROR:
|
|
703
850
|
e = "text-red-500 bg-red-100 dark:bg-red-800 dark:text-red-200";
|
|
704
851
|
break;
|
|
705
|
-
case
|
|
852
|
+
case J.SUCCESS:
|
|
706
853
|
e = "text-green-500 bg-green-100 dark:bg-green-800 dark:text-green-200";
|
|
707
854
|
break;
|
|
708
|
-
case
|
|
855
|
+
case J.WARNING:
|
|
709
856
|
e = "text-orange-500 bg-orange-100 dark:bg-orange-700 dark:text-orange-200";
|
|
710
857
|
break;
|
|
711
858
|
default:
|
|
@@ -717,16 +864,16 @@ var me = { class: "font-medium pl-1" }, he = /* @__PURE__ */ l({
|
|
|
717
864
|
function u() {
|
|
718
865
|
let e = "top-5 right-5";
|
|
719
866
|
switch (t.positioning) {
|
|
720
|
-
case
|
|
867
|
+
case Y.BOTTOM_LEFT:
|
|
721
868
|
e = "bottom-5 left-5";
|
|
722
869
|
break;
|
|
723
|
-
case
|
|
870
|
+
case Y.TOP_LEFT:
|
|
724
871
|
e = "top-5 left-5";
|
|
725
872
|
break;
|
|
726
|
-
case
|
|
873
|
+
case Y.TOP_RIGHT:
|
|
727
874
|
e = "top-5 right-5";
|
|
728
875
|
break;
|
|
729
|
-
case
|
|
876
|
+
case Y.BOTTOM_RIGHT:
|
|
730
877
|
e = "bottom-5 right-5";
|
|
731
878
|
break;
|
|
732
879
|
}
|
|
@@ -737,25 +884,25 @@ var me = { class: "font-medium pl-1" }, he = /* @__PURE__ */ l({
|
|
|
737
884
|
id: "toast-top-right",
|
|
738
885
|
class: f(u()),
|
|
739
886
|
role: "alert"
|
|
740
|
-
}, [o("div",
|
|
741
|
-
e.mode == w(
|
|
887
|
+
}, [o("div", Ye, [
|
|
888
|
+
e.mode == w(J).ERROR ? (_(), a("div", {
|
|
742
889
|
key: 0,
|
|
743
890
|
class: f(l())
|
|
744
|
-
}, [c(w(
|
|
891
|
+
}, [c(w(se), { class: "h-6 w-6 text-red-500" }), r[0] ||= o("span", { class: "sr-only" }, "Error icon", -1)], 2)) : e.mode == w(J).SUCCESS ? (_(), a("div", {
|
|
745
892
|
key: 1,
|
|
746
893
|
class: f(l())
|
|
747
|
-
}, [c(w(ne), { class: "h-6 w-6 text-green-500" }), r[1] ||= o("span", { class: "sr-only" }, "Check icon", -1)], 2)) : e.mode == w(
|
|
894
|
+
}, [c(w(ne), { class: "h-6 w-6 text-green-500" }), r[1] ||= o("span", { class: "sr-only" }, "Check icon", -1)], 2)) : e.mode == w(J).WARNING ? (_(), a("div", {
|
|
748
895
|
key: 2,
|
|
749
896
|
class: f(l())
|
|
750
897
|
}, [c(w(P), { class: "h-6 w-6 text-yellow-500" }), r[2] ||= o("span", { class: "sr-only" }, "Warning icon", -1)], 2)) : i("", !0),
|
|
751
|
-
o("div",
|
|
752
|
-
e.hasCloseIcon ? (_(), a("button",
|
|
898
|
+
o("div", Xe, C(e.description), 1),
|
|
899
|
+
e.hasCloseIcon ? (_(), a("button", Ze, [r[3] ||= o("span", { class: "sr-only" }, "Close", -1), c(w(F), {
|
|
753
900
|
class: "h-6 w-6 text-gray-500 cursor-pointer",
|
|
754
901
|
onClick: s
|
|
755
902
|
})])) : i("", !0)
|
|
756
903
|
])], 2)) : i("", !0);
|
|
757
904
|
}
|
|
758
|
-
}),
|
|
905
|
+
}), $e = { class: "w-13" }, et = /* @__PURE__ */ l({
|
|
759
906
|
__name: "ColoredSquares",
|
|
760
907
|
props: { color: {
|
|
761
908
|
type: String,
|
|
@@ -794,12 +941,9 @@ var me = { class: "font-medium pl-1" }, he = /* @__PURE__ */ l({
|
|
|
794
941
|
}
|
|
795
942
|
return "font-bold bg-" + e + "-100 text-" + e + "-800 text-xs mr-2 px-2.5 py-0.5 rounded-full";
|
|
796
943
|
}
|
|
797
|
-
return (e, t) => (_(), a("div",
|
|
944
|
+
return (e, t) => (_(), a("div", $e, [o("div", { class: f(["border border-gray-300 relative aspect-square rounded-lg bg-white shadow-sm overflow-hidden flex items-center justify-center text-center", i()]) }, [b(e.$slots, "default"), o("div", { class: f(["absolute bottom-0 left-0 h-1 w-full", r.value]) }, null, 2)], 2)]));
|
|
798
945
|
}
|
|
799
|
-
}),
|
|
800
|
-
key: 0,
|
|
801
|
-
class: "absolute right-4 top-4 rounded-md bg-orange-100 px-3 py-1 text-xs font-bold tracking-wide text-orange-500 dark:bg-orange-900/40 dark:text-orange-400"
|
|
802
|
-
}, $e = { class: "flex items-start justify-between" }, et = { class: "text-sm font-bold tracking-wide text-gray-800 dark:text-slate-200" }, tt = { class: "mt-1 text-4xl font-bold text-gray-400 dark:text-slate-300" }, nt = { class: "mt-1 text-sm font-medium text-orange-400 dark:text-orange-400" }, rt = /* @__PURE__ */ l({
|
|
946
|
+
}), tt = { class: "flex items-start justify-between" }, nt = { class: "text-sm font-bold tracking-wide text-gray-800 dark:text-slate-200" }, rt = /* @__PURE__ */ l({
|
|
803
947
|
__name: "EarningsCard",
|
|
804
948
|
props: {
|
|
805
949
|
title: { default: "TOTAL EARNINGS" },
|
|
@@ -807,26 +951,50 @@ var me = { class: "font-medium pl-1" }, he = /* @__PURE__ */ l({
|
|
|
807
951
|
subtitle: { default: "Lifetime commission" },
|
|
808
952
|
badge: { default: "" },
|
|
809
953
|
currency: { default: "$" },
|
|
810
|
-
decimals: { default: 2 }
|
|
954
|
+
decimals: { default: 2 },
|
|
955
|
+
accent: { default: "orange" }
|
|
811
956
|
},
|
|
812
957
|
setup(e) {
|
|
813
|
-
let t = e, r =
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
958
|
+
let t = e, r = {
|
|
959
|
+
orange: {
|
|
960
|
+
border: "border-orange-300 dark:border-orange-700",
|
|
961
|
+
badge: "bg-orange-100 text-orange-500 dark:bg-orange-900/40 dark:text-orange-400",
|
|
962
|
+
amount: "text-gray-400 dark:text-slate-300",
|
|
963
|
+
subtitle: "text-orange-400 dark:text-orange-400",
|
|
964
|
+
iconBox: "bg-orange-50 dark:bg-orange-900/30",
|
|
965
|
+
icon: "text-orange-400"
|
|
966
|
+
},
|
|
967
|
+
emerald: {
|
|
968
|
+
border: "border-emerald-300 dark:border-emerald-700",
|
|
969
|
+
badge: "bg-emerald-100 text-emerald-600 dark:bg-emerald-900/40 dark:text-emerald-400",
|
|
970
|
+
amount: "text-emerald-500 dark:text-emerald-400",
|
|
971
|
+
subtitle: "text-emerald-500 dark:text-emerald-400",
|
|
972
|
+
iconBox: "bg-emerald-50 dark:bg-emerald-900/30",
|
|
973
|
+
icon: "text-emerald-500"
|
|
974
|
+
}
|
|
975
|
+
}, s = n(() => r[t.accent]), c = n(() => {
|
|
976
|
+
let e = Number.isFinite(t.amount) ? t.amount : 0;
|
|
977
|
+
return t.currency + e.toLocaleString("en-US", {
|
|
978
|
+
minimumFractionDigits: t.decimals,
|
|
979
|
+
maximumFractionDigits: t.decimals
|
|
980
|
+
});
|
|
981
|
+
});
|
|
982
|
+
return (t, n) => (_(), a("div", { class: f(["relative rounded-xl border-2 border-dashed bg-white p-6 dark:bg-slate-800", s.value.border]) }, [e.badge ? (_(), a("div", {
|
|
983
|
+
key: 0,
|
|
984
|
+
class: f(["absolute right-4 top-4 rounded-md px-3 py-1 text-xs font-bold tracking-wide", s.value.badge])
|
|
985
|
+
}, C(e.badge), 3)) : i("", !0), o("div", tt, [o("div", null, [
|
|
986
|
+
o("p", nt, C(e.title), 1),
|
|
987
|
+
o("p", { class: f(["mt-1 text-4xl font-bold", s.value.amount]) }, C(c.value), 3),
|
|
988
|
+
o("p", { class: f(["mt-1 text-sm font-medium", s.value.subtitle]) }, C(e.subtitle), 3)
|
|
989
|
+
]), o("div", { class: f(["mt-6 flex h-12 w-12 items-center justify-center rounded-xl", s.value.iconBox]) }, [(_(), a("svg", {
|
|
990
|
+
class: f(["h-6 w-6", s.value.icon]),
|
|
823
991
|
viewBox: "0 0 24 24",
|
|
824
992
|
fill: "none",
|
|
825
993
|
stroke: "currentColor",
|
|
826
994
|
"stroke-width": "2.5",
|
|
827
995
|
"stroke-linecap": "round",
|
|
828
996
|
"stroke-linejoin": "round"
|
|
829
|
-
}, [o("polyline", { points: "22 7 13.5 15.5 8.5 10.5 2 17" }), o("polyline", { points: "16 7 22 7 22 13" })])],
|
|
997
|
+
}, [...n[0] ||= [o("polyline", { points: "22 7 13.5 15.5 8.5 10.5 2 17" }, null, -1), o("polyline", { points: "16 7 22 7 22 13" }, null, -1)]], 2))], 2)])], 2));
|
|
830
998
|
}
|
|
831
999
|
}), it = {
|
|
832
1000
|
key: 0,
|
|
@@ -859,7 +1027,7 @@ var me = { class: "font-medium pl-1" }, he = /* @__PURE__ */ l({
|
|
|
859
1027
|
}), lt = ["onClick", "onKeydown"], ut = {
|
|
860
1028
|
key: 1,
|
|
861
1029
|
style: { cursor: "not-allowed" }
|
|
862
|
-
}, dt = /* @__PURE__ */
|
|
1030
|
+
}, dt = /* @__PURE__ */ q(/* @__PURE__ */ l({
|
|
863
1031
|
__name: "Pagination",
|
|
864
1032
|
props: {
|
|
865
1033
|
totalItems: {
|
|
@@ -932,34 +1100,11 @@ var me = { class: "font-medium pl-1" }, he = /* @__PURE__ */ l({
|
|
|
932
1100
|
_: 1
|
|
933
1101
|
}, 8, ["color"]), c(w(te), { class: "h-5 w-5 text-green-500" })]))])) : i("", !0);
|
|
934
1102
|
}
|
|
935
|
-
})
|
|
936
|
-
function _t(e) {
|
|
937
|
-
if (!gt) {
|
|
938
|
-
if (gt = !0, J = e, typeof window < "u") {
|
|
939
|
-
let e = window.localStorage?.getItem(J);
|
|
940
|
-
e ? q.value = e === "dark" : typeof window.matchMedia == "function" && (q.value = window.matchMedia("(prefers-color-scheme: dark)").matches);
|
|
941
|
-
}
|
|
942
|
-
typeof document < "u" && u(!0).run(() => {
|
|
943
|
-
O(q, (e) => {
|
|
944
|
-
document.documentElement.classList.toggle("dark", e), window.localStorage?.setItem(J, e ? "dark" : "light");
|
|
945
|
-
}, { immediate: !0 });
|
|
946
|
-
});
|
|
947
|
-
}
|
|
948
|
-
}
|
|
949
|
-
function Y(e) {
|
|
950
|
-
_t(e?.storageKey ?? J);
|
|
951
|
-
function t() {
|
|
952
|
-
q.value = !q.value;
|
|
953
|
-
}
|
|
954
|
-
return {
|
|
955
|
-
isDark: q,
|
|
956
|
-
toggleTheme: t
|
|
957
|
-
};
|
|
958
|
-
}
|
|
1103
|
+
});
|
|
959
1104
|
//#endregion
|
|
960
1105
|
//#region src/composables/useThemeClasses.ts
|
|
961
1106
|
function X() {
|
|
962
|
-
let { isDark: e } =
|
|
1107
|
+
let { isDark: e } = U();
|
|
963
1108
|
return {
|
|
964
1109
|
card: n(() => e.value ? "bg-gray-800 border-gray-700" : "bg-white border-gray-200"),
|
|
965
1110
|
cardAlt: n(() => e.value ? "bg-gray-900 border-gray-700" : "bg-white border-gray-200"),
|
|
@@ -994,7 +1139,7 @@ function Z(e) {
|
|
|
994
1139
|
}
|
|
995
1140
|
//#endregion
|
|
996
1141
|
//#region src/components/BaseModalShell.vue?vue&type=script&setup=true&lang.ts
|
|
997
|
-
var vt = { class: "p-6" }, yt = { class: "flex items-start gap-4" },
|
|
1142
|
+
var gt = { class: "flex items-start gap-4 min-w-0" }, _t = { class: "flex-1 min-w-0" }, vt = { class: "p-6 overflow-y-auto flex-1" }, yt = { class: "p-6" }, bt = { class: "flex items-start gap-4" }, xt = { class: "flex-1" }, St = { class: "mt-4" }, Ct = { class: "mt-6 flex gap-3 justify-end" }, Q = /* @__PURE__ */ l({
|
|
998
1143
|
__name: "BaseModalShell",
|
|
999
1144
|
props: {
|
|
1000
1145
|
title: {},
|
|
@@ -1002,35 +1147,58 @@ var vt = { class: "p-6" }, yt = { class: "flex items-start gap-4" }, bt = { clas
|
|
|
1002
1147
|
manualClose: {
|
|
1003
1148
|
type: Boolean,
|
|
1004
1149
|
default: !1
|
|
1005
|
-
}
|
|
1150
|
+
},
|
|
1151
|
+
scrollable: {
|
|
1152
|
+
type: Boolean,
|
|
1153
|
+
default: !1
|
|
1154
|
+
},
|
|
1155
|
+
subtitle: { default: "" }
|
|
1006
1156
|
},
|
|
1007
1157
|
emits: ["cancel", "backdrop"],
|
|
1008
|
-
setup(e, { emit:
|
|
1009
|
-
let
|
|
1010
|
-
function
|
|
1011
|
-
|
|
1158
|
+
setup(e, { emit: s }) {
|
|
1159
|
+
let c = e, l = s, { isDark: u } = U(), d = X(), p = `modal-title-${Math.random().toString(36).slice(2, 9)}`, m = n(() => u.value ? "bg-gray-900 border border-gray-700" : "bg-white border border-gray-200");
|
|
1160
|
+
function h() {
|
|
1161
|
+
l("backdrop"), c.manualClose || l("cancel");
|
|
1012
1162
|
}
|
|
1013
1163
|
return Z(() => {
|
|
1014
|
-
|
|
1015
|
-
}), (n,
|
|
1164
|
+
c.manualClose || l("cancel");
|
|
1165
|
+
}), (n, s) => (_(), r(t, { to: "body" }, [o("div", {
|
|
1016
1166
|
class: "fixed inset-0 z-50 flex items-center justify-center bg-black/50",
|
|
1017
1167
|
role: "dialog",
|
|
1018
1168
|
"aria-modal": "true",
|
|
1019
|
-
"aria-labelledby":
|
|
1020
|
-
onClick:
|
|
1021
|
-
}, [
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1169
|
+
"aria-labelledby": p,
|
|
1170
|
+
onClick: h
|
|
1171
|
+
}, [e.scrollable ? (_(), a("div", {
|
|
1172
|
+
key: 0,
|
|
1173
|
+
class: f(["relative w-full mx-4 rounded-lg shadow-xl max-h-[90vh] flex flex-col", [e.maxWidthClass, m.value]]),
|
|
1174
|
+
onClick: s[0] ||= M(() => {}, ["stop"])
|
|
1175
|
+
}, [
|
|
1176
|
+
o("div", { class: f(["flex items-start justify-between gap-4 p-6 border-b shrink-0", w(d).border]) }, [o("div", gt, [b(n.$slots, "icon"), o("div", _t, [o("h3", {
|
|
1177
|
+
id: p,
|
|
1178
|
+
class: f(["text-lg font-medium", w(d).primaryText])
|
|
1179
|
+
}, C(e.title), 3), e.subtitle ? (_(), a("p", {
|
|
1180
|
+
key: 0,
|
|
1181
|
+
class: f(["text-sm mt-1 break-all", w(d).mutedText])
|
|
1182
|
+
}, C(e.subtitle), 3)) : i("", !0)])]), b(n.$slots, "header-actions")], 2),
|
|
1183
|
+
o("div", vt, [b(n.$slots, "default")]),
|
|
1184
|
+
n.$slots.footer ? (_(), a("div", {
|
|
1185
|
+
key: 0,
|
|
1186
|
+
class: f(["flex gap-3 justify-end p-6 border-t shrink-0", w(d).border])
|
|
1187
|
+
}, [b(n.$slots, "footer")], 2)) : i("", !0)
|
|
1188
|
+
], 2)) : (_(), a("div", {
|
|
1189
|
+
key: 1,
|
|
1190
|
+
class: f(["relative w-full mx-4 rounded-lg shadow-xl", [e.maxWidthClass, m.value]]),
|
|
1191
|
+
onClick: s[1] ||= M(() => {}, ["stop"])
|
|
1192
|
+
}, [o("div", yt, [
|
|
1193
|
+
o("div", bt, [b(n.$slots, "icon"), o("div", xt, [o("h3", {
|
|
1194
|
+
id: p,
|
|
1195
|
+
class: f(["text-lg font-medium", w(d).primaryText])
|
|
1028
1196
|
}, C(e.title), 3)])]),
|
|
1029
|
-
o("div",
|
|
1030
|
-
o("div",
|
|
1031
|
-
])], 2)])]));
|
|
1197
|
+
o("div", St, [b(n.$slots, "default")]),
|
|
1198
|
+
o("div", Ct, [b(n.$slots, "footer")])
|
|
1199
|
+
])], 2))])]));
|
|
1032
1200
|
}
|
|
1033
|
-
}),
|
|
1201
|
+
}), wt = ["aria-expanded"], Tt = { class: "flex items-center gap-3" }, Et = /* @__PURE__ */ l({
|
|
1034
1202
|
__name: "BaseCollapsibleSection",
|
|
1035
1203
|
props: {
|
|
1036
1204
|
title: {},
|
|
@@ -1040,13 +1208,13 @@ var vt = { class: "p-6" }, yt = { class: "flex items-start gap-4" }, bt = { clas
|
|
|
1040
1208
|
},
|
|
1041
1209
|
emits: ["toggle"],
|
|
1042
1210
|
setup(e, { emit: t }) {
|
|
1043
|
-
let r = e, s = t, { isDark: c } =
|
|
1211
|
+
let r = e, s = t, { isDark: c } = U(), l = X(), u = n(() => c.value ? "text-gray-100" : "text-gray-700"), d = n(() => c.value ? "bg-gray-800/50 hover:bg-gray-800 border-gray-700" : "bg-gray-50 hover:bg-gray-100 border-gray-200"), p = n(() => c.value ? "bg-emerald-500/15 text-emerald-400" : "bg-emerald-50 text-emerald-700"), m = n(() => r.bodyClass === void 0 ? c.value ? "bg-gray-800" : "bg-white" : r.bodyClass);
|
|
1044
1212
|
return (t, n) => (_(), a("section", { class: f(["rounded-xl border overflow-hidden transition-colors", w(l).cardAlt]) }, [o("button", {
|
|
1045
1213
|
type: "button",
|
|
1046
1214
|
class: f(["w-full flex items-center justify-between p-4 text-left transition-colors", d.value]),
|
|
1047
1215
|
"aria-expanded": !e.collapsed,
|
|
1048
1216
|
onClick: n[0] ||= (e) => s("toggle")
|
|
1049
|
-
}, [o("div",
|
|
1217
|
+
}, [o("div", Tt, [o("h2", { class: f(["text-base font-semibold", u.value]) }, C(e.title), 3), e.badge ? (_(), a("span", {
|
|
1050
1218
|
key: 0,
|
|
1051
1219
|
class: f(["text-xs px-2 py-0.5 rounded-full", p.value])
|
|
1052
1220
|
}, C(e.badge), 3)) : i("", !0)]), (_(), a("svg", {
|
|
@@ -1060,15 +1228,15 @@ var vt = { class: "p-6" }, yt = { class: "flex items-start gap-4" }, bt = { clas
|
|
|
1060
1228
|
"stroke-linecap": "round",
|
|
1061
1229
|
"stroke-linejoin": "round",
|
|
1062
1230
|
d: "M19 9l-7 7-7-7"
|
|
1063
|
-
}, null, -1)]], 2))], 10,
|
|
1231
|
+
}, null, -1)]], 2))], 10, wt), A(o("div", { class: f(["p-6 border-t", [w(l).border, m.value]]) }, [b(t.$slots, "default")], 2), [[D, !e.collapsed]])], 2));
|
|
1064
1232
|
}
|
|
1065
|
-
}),
|
|
1233
|
+
}), Dt = ["disabled"], Ot = ["disabled"], kt = {
|
|
1066
1234
|
key: 0,
|
|
1067
1235
|
class: "w-4 h-4 animate-spin",
|
|
1068
1236
|
fill: "none",
|
|
1069
1237
|
viewBox: "0 0 24 24",
|
|
1070
1238
|
"aria-hidden": "true"
|
|
1071
|
-
},
|
|
1239
|
+
}, At = /* @__PURE__ */ l({
|
|
1072
1240
|
__name: "BaseConfirmModal",
|
|
1073
1241
|
props: {
|
|
1074
1242
|
title: {},
|
|
@@ -1084,7 +1252,7 @@ var vt = { class: "p-6" }, yt = { class: "flex items-start gap-4" }, bt = { clas
|
|
|
1084
1252
|
},
|
|
1085
1253
|
emits: ["confirm", "cancel"],
|
|
1086
1254
|
setup(e, { emit: t }) {
|
|
1087
|
-
let n = e, l = t, { isDark: u } =
|
|
1255
|
+
let n = e, l = t, { isDark: u } = U(), d = X();
|
|
1088
1256
|
function p() {
|
|
1089
1257
|
n.submitting || l("confirm");
|
|
1090
1258
|
}
|
|
@@ -1105,12 +1273,12 @@ var vt = { class: "p-6" }, yt = { class: "flex items-start gap-4" }, bt = { clas
|
|
|
1105
1273
|
disabled: e.submitting,
|
|
1106
1274
|
class: f(["inline-flex items-center justify-center px-4 py-2 border rounded-md shadow-sm text-sm font-medium transition-colors duration-150", [w(d).ghostButton, e.submitting ? "opacity-60 cursor-not-allowed" : "cursor-pointer"]]),
|
|
1107
1275
|
onClick: m
|
|
1108
|
-
}, C(e.cancelText), 11,
|
|
1276
|
+
}, C(e.cancelText), 11, Dt), o("button", {
|
|
1109
1277
|
type: "button",
|
|
1110
1278
|
disabled: e.submitting,
|
|
1111
1279
|
class: f(["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"]]),
|
|
1112
1280
|
onClick: p
|
|
1113
|
-
}, [e.submitting ? (_(), a("svg",
|
|
1281
|
+
}, [e.submitting ? (_(), a("svg", kt, [...n[0] ||= [o("circle", {
|
|
1114
1282
|
class: "opacity-25",
|
|
1115
1283
|
cx: "12",
|
|
1116
1284
|
cy: "12",
|
|
@@ -1121,12 +1289,12 @@ var vt = { class: "p-6" }, yt = { class: "flex items-start gap-4" }, bt = { clas
|
|
|
1121
1289
|
class: "opacity-75",
|
|
1122
1290
|
fill: "currentColor",
|
|
1123
1291
|
d: "M4 12a8 8 0 018-8v4a4 4 0 00-4 4H4z"
|
|
1124
|
-
}, null, -1)]])) : i("", !0), s(" " + C(e.submitting ? e.submittingText : e.confirmText), 1)], 10,
|
|
1125
|
-
default: k(() => [o("p", { class: f(["text-sm", w(u) ? "text-gray-300" : "text-gray-600"]) }, C(e.message), 3)]),
|
|
1126
|
-
_:
|
|
1292
|
+
}, null, -1)]])) : i("", !0), s(" " + C(e.submitting ? e.submittingText : e.confirmText), 1)], 10, Ot)]),
|
|
1293
|
+
default: k(() => [o("p", { class: f(["text-sm", w(u) ? "text-gray-300" : "text-gray-600"]) }, C(e.message), 3), b(t.$slots, "default")]),
|
|
1294
|
+
_: 3
|
|
1127
1295
|
}, 8, ["title", "manual-close"]));
|
|
1128
1296
|
}
|
|
1129
|
-
}),
|
|
1297
|
+
}), jt = { class: "mt-4" }, Mt = ["placeholder"], Nt = ["disabled"], Pt = /* @__PURE__ */ l({
|
|
1130
1298
|
__name: "BaseTextInputModal",
|
|
1131
1299
|
props: {
|
|
1132
1300
|
title: {},
|
|
@@ -1144,7 +1312,7 @@ var vt = { class: "p-6" }, yt = { class: "flex items-start gap-4" }, bt = { clas
|
|
|
1144
1312
|
},
|
|
1145
1313
|
emits: ["confirm", "cancel"],
|
|
1146
1314
|
setup(e, { emit: t }) {
|
|
1147
|
-
let n = e, i = t, { isDark: a } =
|
|
1315
|
+
let n = e, i = t, { isDark: a } = U(), s = X(), l = v(n.initialValue), u = v(null);
|
|
1148
1316
|
m(async () => {
|
|
1149
1317
|
await d(), u.value?.focus();
|
|
1150
1318
|
});
|
|
@@ -1162,7 +1330,7 @@ var vt = { class: "p-6" }, yt = { class: "flex items-start gap-4" }, bt = { clas
|
|
|
1162
1330
|
"manual-close": "",
|
|
1163
1331
|
onBackdrop: g
|
|
1164
1332
|
}, {
|
|
1165
|
-
icon: k(() => [b(t.$slots, "icon", {}, () => [o("div", { class: f(["flex-shrink-0 flex h-12 w-12 items-center justify-center rounded-full", w(a) ? "bg-emerald-900/30" : "bg-emerald-50"]) }, [c(w(
|
|
1333
|
+
icon: k(() => [b(t.$slots, "icon", {}, () => [o("div", { class: f(["flex-shrink-0 flex h-12 w-12 items-center justify-center rounded-full", w(a) ? "bg-emerald-900/30" : "bg-emerald-50"]) }, [c(w(oe), {
|
|
1166
1334
|
class: "h-6 w-6 text-emerald-600",
|
|
1167
1335
|
"aria-hidden": "true"
|
|
1168
1336
|
})], 2)])]),
|
|
@@ -1175,8 +1343,8 @@ var vt = { class: "p-6" }, yt = { class: "flex items-start gap-4" }, bt = { clas
|
|
|
1175
1343
|
disabled: !l.value.trim() || e.submitting,
|
|
1176
1344
|
class: f(["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", [!l.value.trim() || e.submitting ? "bg-emerald-400 cursor-not-allowed" : "bg-emerald-600 hover:bg-emerald-700 cursor-pointer"]]),
|
|
1177
1345
|
onClick: p
|
|
1178
|
-
}, C(e.submitting ? e.submittingText : e.confirmText), 11,
|
|
1179
|
-
default: k(() => [o("p", { class: f(["text-sm", w(a) ? "text-gray-300" : "text-gray-600"]) }, C(e.message), 3), o("div",
|
|
1346
|
+
}, C(e.submitting ? e.submittingText : e.confirmText), 11, Nt)]),
|
|
1347
|
+
default: k(() => [o("p", { class: f(["text-sm", w(a) ? "text-gray-300" : "text-gray-600"]) }, C(e.message), 3), o("div", jt, [o("label", { class: f(["block text-sm font-medium mb-1", w(s).label]) }, C(e.inputLabel), 3), A(o("input", {
|
|
1180
1348
|
ref_key: "nameInput",
|
|
1181
1349
|
ref: u,
|
|
1182
1350
|
"onUpdate:modelValue": n[0] ||= (e) => l.value = e,
|
|
@@ -1184,11 +1352,11 @@ var vt = { class: "p-6" }, yt = { class: "flex items-start gap-4" }, bt = { clas
|
|
|
1184
1352
|
placeholder: e.placeholder,
|
|
1185
1353
|
class: f(["w-full px-3 py-2 rounded-md border text-sm transition-colors", w(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"]),
|
|
1186
1354
|
onKeyup: j(p, ["enter"])
|
|
1187
|
-
}, null, 42,
|
|
1355
|
+
}, null, 42, Mt), [[E, l.value]])])]),
|
|
1188
1356
|
_: 3
|
|
1189
1357
|
}, 8, ["title"]));
|
|
1190
1358
|
}
|
|
1191
|
-
}),
|
|
1359
|
+
}), Ft = { class: "flex items-center justify-center min-h-[60vh]" }, It = { class: "text-center px-6" }, Lt = /* @__PURE__ */ l({
|
|
1192
1360
|
__name: "BaseNotFoundPage",
|
|
1193
1361
|
props: {
|
|
1194
1362
|
code: { default: "404" },
|
|
@@ -1197,11 +1365,11 @@ var vt = { class: "p-6" }, yt = { class: "flex items-start gap-4" }, bt = { clas
|
|
|
1197
1365
|
homeLabel: { default: "Go home" }
|
|
1198
1366
|
},
|
|
1199
1367
|
setup(e) {
|
|
1200
|
-
let t = e, n =
|
|
1368
|
+
let t = e, n = pe(), { isDark: r } = U(), i = X();
|
|
1201
1369
|
function s() {
|
|
1202
1370
|
n.push({ name: t.homeRouteName });
|
|
1203
1371
|
}
|
|
1204
|
-
return (t, n) => (_(), a("div",
|
|
1372
|
+
return (t, n) => (_(), a("div", Ft, [o("div", It, [
|
|
1205
1373
|
c(w(P), { class: f(["w-16 h-16 mx-auto mb-4", w(i).illustration]) }, null, 8, ["class"]),
|
|
1206
1374
|
o("h1", { class: f(["text-4xl font-bold mb-2", w(r) ? "text-gray-200" : "text-gray-800"]) }, C(e.code), 3),
|
|
1207
1375
|
o("p", { class: f(["text-lg mb-6", w(i).dimTextAlt]) }, C(e.message), 3),
|
|
@@ -1212,7 +1380,7 @@ var vt = { class: "p-6" }, yt = { class: "flex items-start gap-4" }, bt = { clas
|
|
|
1212
1380
|
])]));
|
|
1213
1381
|
}
|
|
1214
1382
|
}), $ = v(!1);
|
|
1215
|
-
function
|
|
1383
|
+
function Rt() {
|
|
1216
1384
|
function e() {
|
|
1217
1385
|
$.value = !0;
|
|
1218
1386
|
}
|
|
@@ -1231,11 +1399,11 @@ function Lt() {
|
|
|
1231
1399
|
}
|
|
1232
1400
|
//#endregion
|
|
1233
1401
|
//#region src/components/BaseSidebar.vue?vue&type=script&setup=true&lang.ts
|
|
1234
|
-
var
|
|
1402
|
+
var zt = ["aria-label", "aria-expanded"], Bt = { class: "flex flex-col h-full" }, Vt = { class: "px-5 pt-5 pb-4 flex items-center justify-center relative" }, Ht = { class: "flex-1 overflow-y-auto px-3 space-y-6" }, Ut = { class: "px-2 mb-2 text-[10px] font-semibold uppercase tracking-wider text-gray-500" }, Wt = { class: "space-y-0.5" }, Gt = ["aria-current", "onClick"], Kt = [
|
|
1235
1403
|
"title",
|
|
1236
1404
|
"aria-label",
|
|
1237
1405
|
"aria-pressed"
|
|
1238
|
-
],
|
|
1406
|
+
], qt = /* @__PURE__ */ q(/* @__PURE__ */ l({
|
|
1239
1407
|
__name: "BaseSidebar",
|
|
1240
1408
|
props: {
|
|
1241
1409
|
sections: {},
|
|
@@ -1248,7 +1416,7 @@ var Rt = ["aria-label", "aria-expanded"], zt = { class: "flex flex-col h-full" }
|
|
|
1248
1416
|
}
|
|
1249
1417
|
},
|
|
1250
1418
|
setup(t) {
|
|
1251
|
-
let n = t, l =
|
|
1419
|
+
let n = t, l = pe(), u = fe(), { isDark: p, toggleTheme: h } = U(), { mobileOpen: x, close: T, toggle: E } = Rt(), D = v(null), k = null;
|
|
1252
1420
|
O(x, async (e) => {
|
|
1253
1421
|
e ? (k = document.activeElement instanceof HTMLElement ? document.activeElement : null, await d(), D.value?.focus()) : (k?.focus(), k = null);
|
|
1254
1422
|
}), m(() => {}), g(() => {});
|
|
@@ -1281,7 +1449,7 @@ var Rt = ["aria-label", "aria-expanded"], zt = { class: "flex flex-col h-full" }
|
|
|
1281
1449
|
key: 0,
|
|
1282
1450
|
class: "w-6 h-6",
|
|
1283
1451
|
"aria-hidden": "true"
|
|
1284
|
-
}))], 10,
|
|
1452
|
+
}))], 10, zt)], 2),
|
|
1285
1453
|
w(x) ? (_(), a("div", {
|
|
1286
1454
|
key: 0,
|
|
1287
1455
|
class: "mobile-overlay fixed inset-0 z-40 bg-black/50",
|
|
@@ -1292,8 +1460,8 @@ var Rt = ["aria-label", "aria-expanded"], zt = { class: "flex flex-col h-full" }
|
|
|
1292
1460
|
role: "navigation",
|
|
1293
1461
|
"aria-label": "Main navigation",
|
|
1294
1462
|
class: f(["fixed top-0 left-0 h-screen w-60 flex flex-col border-r transition-transform duration-300 lg:pointer-events-auto", [w(p) ? "bg-gray-900 border-gray-800" : "bg-white border-gray-200", w(x) ? "translate-x-0 z-50" : "-translate-x-full max-lg:pointer-events-none lg:translate-x-0 z-50"]])
|
|
1295
|
-
}, [o("div",
|
|
1296
|
-
o("div",
|
|
1463
|
+
}, [o("div", Bt, [
|
|
1464
|
+
o("div", Vt, [o("button", {
|
|
1297
1465
|
type: "button",
|
|
1298
1466
|
onClick: A,
|
|
1299
1467
|
class: "cursor-pointer",
|
|
@@ -1309,12 +1477,12 @@ var Rt = ["aria-label", "aria-expanded"], zt = { class: "flex flex-col h-full" }
|
|
|
1309
1477
|
class: "w-5 h-5",
|
|
1310
1478
|
"aria-hidden": "true"
|
|
1311
1479
|
})], 2)]),
|
|
1312
|
-
o("nav",
|
|
1480
|
+
o("nav", Ht, [(_(!0), a(e, null, y(t.sections, (t) => (_(), a("div", { key: t.title }, [o("p", Ut, C(t.title), 1), o("ul", Wt, [(_(!0), a(e, null, y(t.items, (e) => (_(), a("li", { key: e.name }, [o("button", {
|
|
1313
1481
|
type: "button",
|
|
1314
1482
|
"aria-current": j(e.name) ? "page" : void 0,
|
|
1315
1483
|
onClick: (t) => M(e.name),
|
|
1316
1484
|
class: f(["flex items-center gap-3 px-3 py-2.5 rounded-lg text-sm font-medium transition-colors w-full text-left cursor-pointer focus:outline-none focus-visible:ring-2 focus-visible:ring-emerald-500", j(e.name) ? w(p) ? "bg-emerald-500/15 text-emerald-300" : "bg-emerald-50 text-emerald-700" : w(p) ? "text-gray-400 hover:text-gray-100 hover:bg-gray-800" : "text-gray-600 hover:text-gray-900 hover:bg-gray-100"])
|
|
1317
|
-
}, [(_(), r(S(e.icon), { class: "w-[18px] h-[18px] shrink-0" })), s(" " + C(e.label), 1)], 10,
|
|
1485
|
+
}, [(_(), r(S(e.icon), { class: "w-[18px] h-[18px] shrink-0" })), s(" " + C(e.label), 1)], 10, Gt)]))), 128))])]))), 128))]),
|
|
1318
1486
|
o("div", { class: f(["px-4 py-4 border-t transition-colors space-y-3", w(p) ? "border-gray-800" : "border-gray-200"]) }, [
|
|
1319
1487
|
t.showThemeToggle ? (_(), a("button", {
|
|
1320
1488
|
key: 0,
|
|
@@ -1324,7 +1492,7 @@ var Rt = ["aria-label", "aria-expanded"], zt = { class: "flex flex-col h-full" }
|
|
|
1324
1492
|
"aria-label": w(p) ? "Switch to light mode" : "Switch to dark mode",
|
|
1325
1493
|
"aria-pressed": w(p),
|
|
1326
1494
|
class: f(["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", w(p) ? "text-gray-400 hover:text-gray-100 hover:bg-gray-800" : "text-gray-600 hover:text-gray-900 hover:bg-gray-100"])
|
|
1327
|
-
}, [s(C(w(p) ? "Switch to light" : "Switch to dark") + " ", 1), o("span", { class: f(["ml-auto relative w-9 h-5 rounded-full transition-colors", w(p) ? "bg-emerald-600" : "bg-gray-300"]) }, [o("span", { class: f(["absolute top-0.5 left-0.5 w-4 h-4 rounded-full bg-white shadow-sm transition-transform duration-300", w(p) ? "translate-x-4" : "translate-x-0"]) }, null, 2)], 2)], 10,
|
|
1495
|
+
}, [s(C(w(p) ? "Switch to light" : "Switch to dark") + " ", 1), o("span", { class: f(["ml-auto relative w-9 h-5 rounded-full transition-colors", w(p) ? "bg-emerald-600" : "bg-gray-300"]) }, [o("span", { class: f(["absolute top-0.5 left-0.5 w-4 h-4 rounded-full bg-white shadow-sm transition-transform duration-300", w(p) ? "translate-x-4" : "translate-x-0"]) }, null, 2)], 2)], 10, Kt)) : i("", !0),
|
|
1328
1496
|
b(n.$slots, "status", {}, void 0, !0),
|
|
1329
1497
|
b(n.$slots, "footer", {}, () => [t.appName || t.version ? (_(), a("div", {
|
|
1330
1498
|
key: 0,
|
|
@@ -1338,26 +1506,26 @@ var Rt = ["aria-label", "aria-expanded"], zt = { class: "flex flex-col h-full" }
|
|
|
1338
1506
|
])], 2)
|
|
1339
1507
|
]));
|
|
1340
1508
|
}
|
|
1341
|
-
}), [["__scopeId", "data-v-e27f267e"]]),
|
|
1509
|
+
}), [["__scopeId", "data-v-e27f267e"]]), Jt = {
|
|
1342
1510
|
key: 1,
|
|
1343
1511
|
class: "mt-4 flex justify-center py-6"
|
|
1344
|
-
},
|
|
1512
|
+
}, Yt = {
|
|
1345
1513
|
key: 2,
|
|
1346
1514
|
class: "mt-4 text-sm text-red-500",
|
|
1347
1515
|
role: "alert"
|
|
1348
|
-
},
|
|
1516
|
+
}, Xt = {
|
|
1349
1517
|
key: 3,
|
|
1350
1518
|
class: "mt-4"
|
|
1351
|
-
},
|
|
1519
|
+
}, Zt = { class: "relative" }, Qt = ["placeholder"], $t = {
|
|
1352
1520
|
key: 4,
|
|
1353
1521
|
class: "mt-3 max-h-64 overflow-y-auto"
|
|
1354
|
-
},
|
|
1522
|
+
}, en = ["onClick"], tn = { class: "flex-1 min-w-0" }, nn = {
|
|
1355
1523
|
key: 0,
|
|
1356
1524
|
class: "text-center py-6"
|
|
1357
|
-
},
|
|
1525
|
+
}, rn = {
|
|
1358
1526
|
key: 1,
|
|
1359
1527
|
class: "text-center py-6"
|
|
1360
|
-
},
|
|
1528
|
+
}, an = ["disabled"], on = ["disabled"], sn = /* @__PURE__ */ l({
|
|
1361
1529
|
__name: "BaseEntityPickerModal",
|
|
1362
1530
|
props: {
|
|
1363
1531
|
title: {},
|
|
@@ -1379,7 +1547,7 @@ var Rt = ["aria-label", "aria-expanded"], zt = { class: "flex flex-col h-full" }
|
|
|
1379
1547
|
},
|
|
1380
1548
|
emits: ["confirm", "cancel"],
|
|
1381
1549
|
setup(t, { emit: s }) {
|
|
1382
|
-
let l = t, u = s, { isDark: p } =
|
|
1550
|
+
let l = t, u = s, { isDark: p } = U(), h = X(), g = v([]), x = v(!1), S = v(""), T = v(null), D = v(""), O = v(null), j = n(() => {
|
|
1383
1551
|
let e = l.loader ? g.value : l.items;
|
|
1384
1552
|
return l.excludeId ? e.filter((e) => e.id !== l.excludeId) : e;
|
|
1385
1553
|
}), M = n(() => j.value.filter((e) => e.label.toLowerCase().includes(D.value.toLowerCase()))), ee = {
|
|
@@ -1499,7 +1667,7 @@ var Rt = ["aria-label", "aria-expanded"], zt = { class: "flex flex-col h-full" }
|
|
|
1499
1667
|
"manual-close": t.submitting,
|
|
1500
1668
|
onCancel: re
|
|
1501
1669
|
}, {
|
|
1502
|
-
icon: k(() => [b(n.$slots, "icon", {}, () => [o("div", { class: f(["flex-shrink-0 flex h-12 w-12 items-center justify-center rounded-full", N.value.iconBg]) }, [c(w(
|
|
1670
|
+
icon: k(() => [b(n.$slots, "icon", {}, () => [o("div", { class: f(["flex-shrink-0 flex h-12 w-12 items-center justify-center rounded-full", N.value.iconBg]) }, [c(w(ce), {
|
|
1503
1671
|
class: f(["h-6 w-6", N.value.iconText]),
|
|
1504
1672
|
"aria-hidden": "true"
|
|
1505
1673
|
}, null, 8, ["class"])], 2)])]),
|
|
@@ -1508,19 +1676,19 @@ var Rt = ["aria-label", "aria-expanded"], zt = { class: "flex flex-col h-full" }
|
|
|
1508
1676
|
disabled: t.submitting,
|
|
1509
1677
|
class: f(["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", w(h).ghostButton]),
|
|
1510
1678
|
onClick: re
|
|
1511
|
-
}, C(t.cancelText), 11,
|
|
1679
|
+
}, C(t.cancelText), 11, an), o("button", {
|
|
1512
1680
|
type: "button",
|
|
1513
1681
|
disabled: !T.value || t.submitting,
|
|
1514
1682
|
class: f(["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", !T.value || t.submitting ? N.value.confirmDisabled : N.value.confirmActive]),
|
|
1515
1683
|
onClick: ne
|
|
1516
|
-
}, C(t.submitting ? t.submittingText : t.confirmText), 11,
|
|
1684
|
+
}, C(t.submitting ? t.submittingText : t.confirmText), 11, on)]),
|
|
1517
1685
|
default: k(() => [
|
|
1518
1686
|
t.message ? (_(), a("p", {
|
|
1519
1687
|
key: 0,
|
|
1520
1688
|
class: f(["text-sm", w(p) ? "text-gray-300" : "text-gray-600"])
|
|
1521
1689
|
}, C(t.message), 3)) : i("", !0),
|
|
1522
|
-
x.value ? (_(), a("div",
|
|
1523
|
-
!x.value && !S.value && j.value.length > 0 ? (_(), a("div",
|
|
1690
|
+
x.value ? (_(), a("div", Jt, [c(Je, { color: "emerald" })])) : S.value ? (_(), a("div", Yt, C(S.value), 1)) : i("", !0),
|
|
1691
|
+
!x.value && !S.value && j.value.length > 0 ? (_(), a("div", Xt, [o("div", Zt, [c(w(ue), {
|
|
1524
1692
|
class: f(["absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4", w(h).dimText]),
|
|
1525
1693
|
"aria-hidden": "true"
|
|
1526
1694
|
}, null, 8, ["class"]), A(o("input", {
|
|
@@ -1530,14 +1698,14 @@ var Rt = ["aria-label", "aria-expanded"], zt = { class: "flex flex-col h-full" }
|
|
|
1530
1698
|
type: "text",
|
|
1531
1699
|
placeholder: t.searchPlaceholder,
|
|
1532
1700
|
class: f(["w-full pl-9 pr-3 py-2 text-sm rounded-md border outline-none transition-colors", [w(p) ? "bg-gray-800 border-gray-600 text-gray-200 placeholder-gray-500" : "bg-white border-gray-300 text-gray-700 placeholder-gray-400", N.value.inputFocus]])
|
|
1533
|
-
}, null, 10,
|
|
1534
|
-
!x.value && !S.value ? (_(), a("div",
|
|
1701
|
+
}, null, 10, Qt), [[E, D.value]])])])) : i("", !0),
|
|
1702
|
+
!x.value && !S.value ? (_(), a("div", $t, [(_(!0), a(e, null, y(M.value, (e) => (_(), a("div", {
|
|
1535
1703
|
key: e.id,
|
|
1536
1704
|
class: f(["flex items-center gap-3 px-3 py-2.5 rounded-lg cursor-pointer transition-colors", [T.value === e.id ? N.value.selectedRow : w(p) ? "hover:bg-gray-800 border border-transparent" : "hover:bg-gray-50 border border-transparent"]]),
|
|
1537
1705
|
onClick: (t) => T.value = e.id
|
|
1538
1706
|
}, [
|
|
1539
|
-
c(w(
|
|
1540
|
-
o("div",
|
|
1707
|
+
c(w(ce), { class: f(["w-5 h-5 flex-shrink-0", w(h).dimText]) }, null, 8, ["class"]),
|
|
1708
|
+
o("div", tn, [o("p", { class: f(["text-sm font-medium truncate", w(h).bodyText]) }, C(e.label), 3)]),
|
|
1541
1709
|
T.value === e.id ? (_(), a("div", {
|
|
1542
1710
|
key: 0,
|
|
1543
1711
|
class: f(["w-5 h-5 rounded-full flex items-center justify-center", N.value.checkBg])
|
|
@@ -1553,15 +1721,15 @@ var Rt = ["aria-label", "aria-expanded"], zt = { class: "flex flex-col h-full" }
|
|
|
1553
1721
|
"stroke-linejoin": "round",
|
|
1554
1722
|
d: "M5 13l4 4L19 7"
|
|
1555
1723
|
})], -1)]], 2)) : i("", !0)
|
|
1556
|
-
], 10,
|
|
1724
|
+
], 10, en))), 128)), j.value.length === 0 ? (_(), a("div", nn, [o("p", { class: f(["text-sm", w(h).dimText]) }, C(t.emptyMessage), 3)])) : M.value.length === 0 ? (_(), a("div", rn, [o("p", { class: f(["text-sm", w(h).dimText]) }, C(t.noMatchMessage), 3)])) : i("", !0)])) : i("", !0)
|
|
1557
1725
|
]),
|
|
1558
1726
|
_: 3
|
|
1559
1727
|
}, 8, ["title", "manual-close"]));
|
|
1560
1728
|
}
|
|
1561
|
-
}),
|
|
1729
|
+
}), cn = {
|
|
1562
1730
|
href: "#main-content",
|
|
1563
1731
|
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"
|
|
1564
|
-
},
|
|
1732
|
+
}, ln = ["inert"], un = /* @__PURE__ */ l({
|
|
1565
1733
|
__name: "BaseAppLayout",
|
|
1566
1734
|
props: {
|
|
1567
1735
|
showSidebar: {
|
|
@@ -1571,19 +1739,19 @@ var Rt = ["aria-label", "aria-expanded"], zt = { class: "flex flex-col h-full" }
|
|
|
1571
1739
|
skipLinkLabel: { default: "Skip to main content" }
|
|
1572
1740
|
},
|
|
1573
1741
|
setup(e) {
|
|
1574
|
-
let t = e, { isDark: r } =
|
|
1742
|
+
let t = e, { isDark: r } = U(), { mobileOpen: s } = Rt(), c = n(() => t.showSidebar);
|
|
1575
1743
|
return (t, n) => (_(), a("div", { class: f(["min-h-screen transition-colors duration-300", w(r) ? "bg-gray-950 text-gray-100" : "bg-gray-50 text-gray-800"]) }, [
|
|
1576
|
-
o("a",
|
|
1744
|
+
o("a", cn, C(e.skipLinkLabel), 1),
|
|
1577
1745
|
c.value ? b(t.$slots, "sidebar", { key: 0 }) : i("", !0),
|
|
1578
1746
|
o("main", {
|
|
1579
1747
|
id: "main-content",
|
|
1580
1748
|
tabindex: "-1",
|
|
1581
1749
|
inert: c.value && w(s) ? !0 : void 0,
|
|
1582
1750
|
class: f(c.value ? "pt-14 lg:pt-0 lg:ml-60" : "")
|
|
1583
|
-
}, [b(t.$slots, "default")], 10,
|
|
1751
|
+
}, [b(t.$slots, "default")], 10, ln)
|
|
1584
1752
|
], 2));
|
|
1585
1753
|
}
|
|
1586
|
-
}),
|
|
1754
|
+
}), dn = { class: "flex items-center justify-between mb-8" }, fn = { class: "flex items-center gap-3" }, pn = { class: "flex items-center gap-2" }, mn = /* @__PURE__ */ l({
|
|
1587
1755
|
__name: "BasePageHeader",
|
|
1588
1756
|
props: {
|
|
1589
1757
|
title: {},
|
|
@@ -1592,7 +1760,7 @@ var Rt = ["aria-label", "aria-expanded"], zt = { class: "flex flex-col h-full" }
|
|
|
1592
1760
|
maxWidthClass: { default: "max-w-4xl" }
|
|
1593
1761
|
},
|
|
1594
1762
|
setup(e) {
|
|
1595
|
-
let t = e, { isDark: r } =
|
|
1763
|
+
let t = e, { isDark: r } = U(), s = X(), c = n(() => {
|
|
1596
1764
|
let e = {
|
|
1597
1765
|
emerald: {
|
|
1598
1766
|
dark: "bg-emerald-500/10",
|
|
@@ -1633,16 +1801,16 @@ var Rt = ["aria-label", "aria-expanded"], zt = { class: "flex flex-col h-full" }
|
|
|
1633
1801
|
}[t.iconColor];
|
|
1634
1802
|
return r.value ? e.dark : e.light;
|
|
1635
1803
|
});
|
|
1636
|
-
return (t, n) => (_(), a("div", { class: f(["mx-auto px-4 sm:px-6", e.maxWidthClass]) }, [o("div",
|
|
1804
|
+
return (t, n) => (_(), a("div", { class: f(["mx-auto px-4 sm:px-6", e.maxWidthClass]) }, [o("div", dn, [o("div", fn, [o("div", { class: f(["w-10 h-10 rounded-lg flex items-center justify-center", c.value]) }, [b(t.$slots, "icon", { iconClass: l.value })], 2), o("div", null, [o("h1", { class: f(["text-2xl font-bold", w(s).primaryTextSoft]) }, C(e.title), 3), e.subtitle ? (_(), a("p", {
|
|
1637
1805
|
key: 0,
|
|
1638
1806
|
class: f(["text-sm", w(s).dimTextAlt])
|
|
1639
|
-
}, C(e.subtitle), 3)) : i("", !0)])]), o("div",
|
|
1807
|
+
}, C(e.subtitle), 3)) : i("", !0)])]), o("div", pn, [b(t.$slots, "actions")])])], 2));
|
|
1640
1808
|
}
|
|
1641
|
-
}),
|
|
1809
|
+
}), hn = [
|
|
1642
1810
|
"type",
|
|
1643
1811
|
"disabled",
|
|
1644
1812
|
"title"
|
|
1645
|
-
],
|
|
1813
|
+
], gn = { key: 0 }, _n = /* @__PURE__ */ l({
|
|
1646
1814
|
__name: "BaseToolbarButton",
|
|
1647
1815
|
props: {
|
|
1648
1816
|
label: { default: "" },
|
|
@@ -1656,7 +1824,7 @@ var Rt = ["aria-label", "aria-expanded"], zt = { class: "flex flex-col h-full" }
|
|
|
1656
1824
|
},
|
|
1657
1825
|
emits: ["click"],
|
|
1658
1826
|
setup(e) {
|
|
1659
|
-
let t = e, { isDark: r } =
|
|
1827
|
+
let t = e, { isDark: r } = U(), o = n(() => {
|
|
1660
1828
|
let e = {
|
|
1661
1829
|
neutral: {
|
|
1662
1830
|
dark: "bg-gray-800 text-gray-100 border-gray-700 hover:bg-gray-700",
|
|
@@ -1675,14 +1843,14 @@ var Rt = ["aria-label", "aria-expanded"], zt = { class: "flex flex-col h-full" }
|
|
|
1675
1843
|
title: e.title,
|
|
1676
1844
|
class: f(["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", o.value]),
|
|
1677
1845
|
onClick: n[0] ||= (e) => t.$emit("click", e)
|
|
1678
|
-
}, [b(t.$slots, "icon", { iconClass: "w-4 h-4" }), e.label ? (_(), a("span",
|
|
1846
|
+
}, [b(t.$slots, "icon", { iconClass: "w-4 h-4" }), e.label ? (_(), a("span", gn, C(e.label), 1)) : i("", !0)], 10, hn));
|
|
1679
1847
|
}
|
|
1680
|
-
}),
|
|
1848
|
+
}), vn = [
|
|
1681
1849
|
"type",
|
|
1682
1850
|
"disabled",
|
|
1683
1851
|
"title",
|
|
1684
1852
|
"aria-label"
|
|
1685
|
-
],
|
|
1853
|
+
], yn = { key: 0 }, bn = /* @__PURE__ */ l({
|
|
1686
1854
|
__name: "BaseActionButton",
|
|
1687
1855
|
props: {
|
|
1688
1856
|
label: { default: "" },
|
|
@@ -1701,7 +1869,7 @@ var Rt = ["aria-label", "aria-expanded"], zt = { class: "flex flex-col h-full" }
|
|
|
1701
1869
|
},
|
|
1702
1870
|
emits: ["click"],
|
|
1703
1871
|
setup(e) {
|
|
1704
|
-
let t = e, { isDark: r } =
|
|
1872
|
+
let t = e, { isDark: r } = U(), o = n(() => {
|
|
1705
1873
|
let e = {
|
|
1706
1874
|
emerald: {
|
|
1707
1875
|
dark: "text-emerald-400 hover:bg-emerald-500/10",
|
|
@@ -1781,12 +1949,63 @@ var Rt = ["aria-label", "aria-expanded"], zt = { class: "flex flex-col h-full" }
|
|
|
1781
1949
|
"aria-label": e.ariaLabel,
|
|
1782
1950
|
class: f(["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]]),
|
|
1783
1951
|
onClick: n[0] ||= (e) => t.$emit("click", e)
|
|
1784
|
-
}, [b(t.$slots, "icon", { iconClass: "w-4 h-4" }), e.label ? (_(), a("span",
|
|
1952
|
+
}, [b(t.$slots, "icon", { iconClass: "w-4 h-4" }), e.label ? (_(), a("span", yn, C(e.label), 1)) : i("", !0)], 10, vn));
|
|
1953
|
+
}
|
|
1954
|
+
}), xn = ["title", "aria-label"], Sn = /* @__PURE__ */ l({
|
|
1955
|
+
__name: "BaseCopyButton",
|
|
1956
|
+
props: {
|
|
1957
|
+
text: {},
|
|
1958
|
+
label: { default: "" },
|
|
1959
|
+
variant: { default: "ghost" },
|
|
1960
|
+
resetMs: { default: 1500 },
|
|
1961
|
+
iconClass: { default: "w-4 h-4" }
|
|
1962
|
+
},
|
|
1963
|
+
emits: ["copied", "error"],
|
|
1964
|
+
setup(e, { emit: t }) {
|
|
1965
|
+
let i = e, o = t, { isDark: s } = U(), c = v(!1), l = null, u = n(() => c.value ? "Copied!" : i.label ? `Copy ${i.label}` : "Copy"), d = n(() => i.label ? `Copy ${i.label}` : "Copy"), p = n(() => i.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"}`);
|
|
1966
|
+
async function m(e) {
|
|
1967
|
+
try {
|
|
1968
|
+
if (navigator.clipboard?.writeText) {
|
|
1969
|
+
await navigator.clipboard.writeText(e);
|
|
1970
|
+
return;
|
|
1971
|
+
}
|
|
1972
|
+
} catch {}
|
|
1973
|
+
let t = document.createElement("textarea");
|
|
1974
|
+
t.value = e, t.style.position = "fixed", t.style.opacity = "0", document.body.appendChild(t), t.select();
|
|
1975
|
+
let n = document.execCommand("copy");
|
|
1976
|
+
if (document.body.removeChild(t), !n) throw Error("Copy command was rejected");
|
|
1977
|
+
}
|
|
1978
|
+
async function h() {
|
|
1979
|
+
try {
|
|
1980
|
+
await m(i.text), c.value = !0, l && clearTimeout(l), l = setTimeout(() => {
|
|
1981
|
+
c.value = !1;
|
|
1982
|
+
}, i.resetMs), o("copied");
|
|
1983
|
+
} catch (e) {
|
|
1984
|
+
o("error", e);
|
|
1985
|
+
}
|
|
1986
|
+
}
|
|
1987
|
+
return g(() => {
|
|
1988
|
+
l && clearTimeout(l);
|
|
1989
|
+
}), (t, n) => (_(), a("button", {
|
|
1990
|
+
type: "button",
|
|
1991
|
+
title: u.value,
|
|
1992
|
+
"aria-label": d.value,
|
|
1993
|
+
class: f(p.value),
|
|
1994
|
+
onClick: h
|
|
1995
|
+
}, [c.value ? (_(), r(w(ie), {
|
|
1996
|
+
key: 0,
|
|
1997
|
+
class: f(e.iconClass),
|
|
1998
|
+
"aria-hidden": "true"
|
|
1999
|
+
}, null, 8, ["class"])) : (_(), r(w(ae), {
|
|
2000
|
+
key: 1,
|
|
2001
|
+
class: f(e.iconClass),
|
|
2002
|
+
"aria-hidden": "true"
|
|
2003
|
+
}, null, 8, ["class"]))], 10, xn));
|
|
1785
2004
|
}
|
|
1786
2005
|
});
|
|
1787
2006
|
//#endregion
|
|
1788
2007
|
//#region src/composables/useDebounce.ts
|
|
1789
|
-
function
|
|
2008
|
+
function Cn(e, t = 300) {
|
|
1790
2009
|
let n = v(e.value), r = null;
|
|
1791
2010
|
return O(e, (e) => {
|
|
1792
2011
|
r && clearTimeout(r), r = setTimeout(() => {
|
|
@@ -1798,12 +2017,12 @@ function bn(e, t = 300) {
|
|
|
1798
2017
|
}
|
|
1799
2018
|
//#endregion
|
|
1800
2019
|
//#region src/composables/useToast.ts
|
|
1801
|
-
function
|
|
1802
|
-
let t = v(!1), n = v(""), r = v(
|
|
2020
|
+
function wn(e = 3e3) {
|
|
2021
|
+
let t = v(!1), n = v(""), r = v(J.SUCCESS), i = null;
|
|
1803
2022
|
function a() {
|
|
1804
2023
|
i &&= (clearTimeout(i), null);
|
|
1805
2024
|
}
|
|
1806
|
-
function o(o, s =
|
|
2025
|
+
function o(o, s = J.SUCCESS, c = e) {
|
|
1807
2026
|
n.value = o, r.value = s, t.value = !0, a(), i = setTimeout(() => {
|
|
1808
2027
|
t.value = !1, i = null;
|
|
1809
2028
|
}, c);
|
|
@@ -1819,16 +2038,16 @@ function xn(e = 3e3) {
|
|
|
1819
2038
|
}
|
|
1820
2039
|
//#endregion
|
|
1821
2040
|
//#region src/enums/BaseBadgeEnum.ts
|
|
1822
|
-
var
|
|
2041
|
+
var Tn = /* @__PURE__ */ function(e) {
|
|
1823
2042
|
return e.WIN = "WIN", e.LOSE = "LOSE", e;
|
|
1824
|
-
}({}),
|
|
2043
|
+
}({}), En = {
|
|
1825
2044
|
GET: "bg-blue-600",
|
|
1826
2045
|
POST: "bg-emerald-600",
|
|
1827
2046
|
PUT: "bg-amber-600",
|
|
1828
2047
|
DELETE: "bg-red-600",
|
|
1829
2048
|
PATCH: "bg-purple-600",
|
|
1830
2049
|
HEAD: "bg-gray-600"
|
|
1831
|
-
},
|
|
2050
|
+
}, Dn = {
|
|
1832
2051
|
GET: "bg-blue-500",
|
|
1833
2052
|
POST: "bg-green-500",
|
|
1834
2053
|
PUT: "bg-yellow-500",
|
|
@@ -1836,23 +2055,23 @@ var Sn = /* @__PURE__ */ function(e) {
|
|
|
1836
2055
|
PATCH: "bg-purple-500",
|
|
1837
2056
|
HEAD: "bg-gray-500"
|
|
1838
2057
|
};
|
|
1839
|
-
function
|
|
1840
|
-
return e ?
|
|
2058
|
+
function On(e) {
|
|
2059
|
+
return e ? En[e.toUpperCase()] ?? "bg-gray-600" : "bg-gray-600";
|
|
1841
2060
|
}
|
|
1842
|
-
function
|
|
1843
|
-
return e ?
|
|
2061
|
+
function kn(e) {
|
|
2062
|
+
return e ? Dn[e.toUpperCase()] ?? "bg-gray-500" : "bg-gray-500";
|
|
1844
2063
|
}
|
|
1845
|
-
function
|
|
2064
|
+
function An(e) {
|
|
1846
2065
|
let t = e ?? 0;
|
|
1847
2066
|
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";
|
|
1848
2067
|
}
|
|
1849
|
-
function
|
|
2068
|
+
function jn(e, t) {
|
|
1850
2069
|
let n = e ?? 200;
|
|
1851
2070
|
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";
|
|
1852
2071
|
}
|
|
1853
2072
|
//#endregion
|
|
1854
2073
|
//#region src/utils/sanitizeHtml.ts
|
|
1855
|
-
var
|
|
2074
|
+
var Mn = new Set([
|
|
1856
2075
|
"A",
|
|
1857
2076
|
"B",
|
|
1858
2077
|
"STRONG",
|
|
@@ -1867,7 +2086,7 @@ var kn = new Set([
|
|
|
1867
2086
|
"LI",
|
|
1868
2087
|
"SPAN",
|
|
1869
2088
|
"DIV"
|
|
1870
|
-
]),
|
|
2089
|
+
]), Nn = new Set([
|
|
1871
2090
|
"SCRIPT",
|
|
1872
2091
|
"STYLE",
|
|
1873
2092
|
"IFRAME",
|
|
@@ -1875,53 +2094,53 @@ var kn = new Set([
|
|
|
1875
2094
|
"EMBED",
|
|
1876
2095
|
"NOSCRIPT",
|
|
1877
2096
|
"TEMPLATE"
|
|
1878
|
-
]),
|
|
1879
|
-
function
|
|
2097
|
+
]), Pn = { A: new Set(["href", "title"]) };
|
|
2098
|
+
function Fn(e) {
|
|
1880
2099
|
let t = e.trim().toLowerCase();
|
|
1881
2100
|
return t.startsWith("http://") || t.startsWith("https://") || t.startsWith("mailto:") || t.startsWith("tel:") || t.startsWith("/") || t.startsWith("#") || t === "";
|
|
1882
2101
|
}
|
|
1883
|
-
function
|
|
2102
|
+
function In(e) {
|
|
1884
2103
|
if (e.nodeType !== Node.ELEMENT_NODE) return;
|
|
1885
2104
|
let t = e, n = t.tagName.toUpperCase();
|
|
1886
|
-
if (!
|
|
1887
|
-
|
|
2105
|
+
if (!Mn.has(n)) {
|
|
2106
|
+
Nn.has(n) ? t.remove() : t.replaceWith(document.createTextNode(t.textContent ?? ""));
|
|
1888
2107
|
return;
|
|
1889
2108
|
}
|
|
1890
|
-
let r =
|
|
2109
|
+
let r = Pn[n] ?? /* @__PURE__ */ new Set();
|
|
1891
2110
|
for (let e of Array.from(t.attributes)) {
|
|
1892
2111
|
if (!r.has(e.name.toLowerCase())) {
|
|
1893
2112
|
t.removeAttribute(e.name);
|
|
1894
2113
|
continue;
|
|
1895
2114
|
}
|
|
1896
|
-
n === "A" && e.name.toLowerCase() === "href" && !
|
|
2115
|
+
n === "A" && e.name.toLowerCase() === "href" && !Fn(e.value) && t.removeAttribute(e.name);
|
|
1897
2116
|
}
|
|
1898
2117
|
n === "A" && t.hasAttribute("href") && (t.setAttribute("rel", "noopener noreferrer"), t.setAttribute("target", "_blank"));
|
|
1899
|
-
for (let e of Array.from(t.childNodes))
|
|
2118
|
+
for (let e of Array.from(t.childNodes)) In(e);
|
|
1900
2119
|
}
|
|
1901
|
-
function
|
|
2120
|
+
function Ln(e) {
|
|
1902
2121
|
if (!e) return "";
|
|
1903
2122
|
let t = new DOMParser().parseFromString(`<div>${e}</div>`, "text/html").body.firstElementChild;
|
|
1904
2123
|
if (!t) return "";
|
|
1905
|
-
for (let e of Array.from(t.childNodes))
|
|
2124
|
+
for (let e of Array.from(t.childNodes)) In(e);
|
|
1906
2125
|
return t.innerHTML;
|
|
1907
2126
|
}
|
|
1908
2127
|
//#endregion
|
|
1909
2128
|
//#region src/utils/format.ts
|
|
1910
|
-
var
|
|
1911
|
-
function
|
|
1912
|
-
if (e == null || typeof e == "string" && e.trim() === "") return
|
|
2129
|
+
var Rn = "—";
|
|
2130
|
+
function zn(e, t = 4) {
|
|
2131
|
+
if (e == null || typeof e == "string" && e.trim() === "") return Rn;
|
|
1913
2132
|
let n = typeof e == "string" ? Number(e) : e;
|
|
1914
2133
|
return isFinite(n) ? n.toLocaleString(void 0, {
|
|
1915
2134
|
minimumFractionDigits: t,
|
|
1916
2135
|
maximumFractionDigits: t
|
|
1917
|
-
}) :
|
|
2136
|
+
}) : Rn;
|
|
1918
2137
|
}
|
|
1919
|
-
function
|
|
1920
|
-
if (e == null || e === "") return
|
|
2138
|
+
function Bn(e) {
|
|
2139
|
+
if (e == null || e === "") return Rn;
|
|
1921
2140
|
let t = new Date(e);
|
|
1922
2141
|
return isNaN(t.getTime()) ? String(e) : t.toLocaleString();
|
|
1923
2142
|
}
|
|
1924
|
-
function
|
|
2143
|
+
function Vn(e) {
|
|
1925
2144
|
return new Date(e).toLocaleString(void 0, {
|
|
1926
2145
|
month: "short",
|
|
1927
2146
|
day: "numeric",
|
|
@@ -1929,13 +2148,13 @@ function Rn(e) {
|
|
|
1929
2148
|
minute: "2-digit"
|
|
1930
2149
|
});
|
|
1931
2150
|
}
|
|
1932
|
-
function
|
|
2151
|
+
function Hn(e) {
|
|
1933
2152
|
return new Date(e).toLocaleDateString(void 0, {
|
|
1934
2153
|
month: "short",
|
|
1935
2154
|
day: "numeric"
|
|
1936
2155
|
});
|
|
1937
2156
|
}
|
|
1938
|
-
function
|
|
2157
|
+
function Un(e) {
|
|
1939
2158
|
if (!isFinite(e) || e === 0) return e.toFixed(2);
|
|
1940
2159
|
let t = Math.abs(e), n = 2;
|
|
1941
2160
|
return t < 1e-4 ? n = 8 : t < .01 ? n = 6 : t < 1 ? n = 4 : t < 100 && (n = 3), e.toLocaleString(void 0, {
|
|
@@ -1943,21 +2162,21 @@ function Bn(e) {
|
|
|
1943
2162
|
maximumFractionDigits: n
|
|
1944
2163
|
});
|
|
1945
2164
|
}
|
|
1946
|
-
function
|
|
2165
|
+
function Wn(e, t = 2) {
|
|
1947
2166
|
return `${e >= 0 ? "+" : ""}${e.toFixed(t)}%`;
|
|
1948
2167
|
}
|
|
1949
|
-
function
|
|
2168
|
+
function Gn(e) {
|
|
1950
2169
|
return `${e < 0 ? "-" : "+"}$${Math.abs(e).toFixed(2)}`;
|
|
1951
2170
|
}
|
|
1952
2171
|
//#endregion
|
|
1953
2172
|
//#region src/utils/pnl.ts
|
|
1954
|
-
function
|
|
2173
|
+
function Kn(e) {
|
|
1955
2174
|
if (e.buyPrice == null || e.lastPrice == null || e.filledQty == null) return {
|
|
1956
2175
|
pnlUsd: null,
|
|
1957
2176
|
pnlPct: null
|
|
1958
2177
|
};
|
|
1959
2178
|
let t = Number(e.buyPrice), n = Number(e.lastPrice), r = Number(e.filledQty);
|
|
1960
|
-
return !isFinite(t) || !isFinite(n) || !isFinite(r) || t <= 0 ? {
|
|
2179
|
+
return !isFinite(t) || !isFinite(n) || !isFinite(r) || t <= 0 || n <= 0 ? {
|
|
1961
2180
|
pnlUsd: null,
|
|
1962
2181
|
pnlPct: null
|
|
1963
2182
|
} : {
|
|
@@ -1966,4 +2185,4 @@ function Un(e) {
|
|
|
1966
2185
|
};
|
|
1967
2186
|
}
|
|
1968
2187
|
//#endregion
|
|
1969
|
-
export { I as AlertEnum,
|
|
2188
|
+
export { I as AlertEnum, bn as BaseActionButton, _e as BaseAlert, un as BaseAppLayout, R as BaseBadge, Tn as BaseBadgeEnum, Se as BaseBreadcrumb, Ne as BaseButton, z as BaseButtonEnum, B as BaseButtonSizeEnum, Et as BaseCollapsibleSection, At as BaseConfirmModal, Sn as BaseCopyButton, sn as BaseEntityPickerModal, Le as BaseLine, Re as BaseLoginEnum, Be as BaseLogo, G as BaseLogoEnum, Ke as BaseModal, K as BaseModalEnum, Q as BaseModalShell, Lt as BaseNotFoundPage, mn as BasePageHeader, qe as BaseRow, qt as BaseSidebar, Je as BaseSpinner, Pt as BaseTextInputModal, Qe as BaseToast, J as BaseToastEnum, _n as BaseToolbarButton, et as ColoredSquares, L as ColorsEnums, rt as EarningsCard, ct as EuroAmount, W as LineEnum, dt as Pagination, Y as PositioningEnum, ht as TrendArrow, Kn as computePnL, Bn as fmtDate, Hn as fmtDateShort, Vn as fmtDateTime, zn as fmtNumber, Wn as fmtPct, Un as fmtPrice, Gn as fmtUsd, me as getBaseColor, he as getBaseColorOf, Fn as isSafeHref, kn as methodBadgeBright, On as methodBadgeSolid, Ln as sanitizeHtml, An as statusBadgeSolid, jn as statusBadgeTinted, Cn as useDebouncedRef, Z as useEscapeKey, Rt as useMobileSidebar, U as useTheme, X as useThemeClasses, wn as useToast };
|