mgv-backoffice 1.21.0 → 1.23.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 +129 -0
- package/dist/components/BaseInput.vue.d.ts +21 -0
- package/dist/components/BaseSegmentedControl.vue.d.ts +25 -0
- package/dist/components/BaseSelect.vue.d.ts +28 -0
- package/dist/components/BaseSpecFields.vue.d.ts +23 -0
- package/dist/components/BaseTable.vue.d.ts +26 -0
- package/dist/components/EarningsCard.vue.d.ts +10 -0
- package/dist/index.d.ts +8 -0
- package/dist/types/segmented.d.ts +11 -0
- package/dist/types/specField.d.ts +23 -0
- package/dist/types/table.d.ts +8 -0
- package/dist/ui-lib.css +1 -1
- package/dist/ui-lib.js +422 -258
- package/dist/ui-lib.umd.cjs +1 -1
- package/package.json +1 -1
- package/src/components/BaseInput.test.ts +40 -0
- package/src/components/BaseInput.vue +46 -0
- package/src/components/BaseSegmentedControl.test.ts +78 -0
- package/src/components/BaseSegmentedControl.vue +98 -0
- package/src/components/BaseSelect.test.ts +37 -0
- package/src/components/BaseSelect.vue +46 -0
- package/src/components/BaseSpecFields.test.ts +78 -0
- package/src/components/BaseSpecFields.vue +83 -0
- package/src/components/BaseTable.test.ts +55 -0
- package/src/components/BaseTable.vue +50 -0
- package/src/components/EarningsCard.test.ts +30 -0
- package/src/components/EarningsCard.vue +28 -11
- package/src/index.ts +10 -0
- package/src/types/segmented.ts +11 -0
- package/src/types/specField.ts +25 -0
- package/src/types/table.ts +8 -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, ChevronRightIcon as ce, ClipboardDocumentCheckIcon as le, ClipboardDocumentIcon as ue, DocumentDuplicateIcon as de, ExclamationCircleIcon as fe, ExclamationTriangleIcon as pe, FolderIcon as me, InformationCircleIcon as he, MagnifyingGlassIcon as ge, MinusIcon as _e, MoonIcon as ve, SunIcon as ye, XMarkIcon as
|
|
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, ChevronRightIcon as ce, ClipboardDocumentCheckIcon as le, ClipboardDocumentIcon as ue, DocumentDuplicateIcon as de, ExclamationCircleIcon as fe, ExclamationTriangleIcon as pe, FolderIcon as me, InformationCircleIcon as he, MagnifyingGlassIcon as ge, MinusIcon as _e, MoonIcon as ve, SunIcon as ye, XMarkIcon as I } from "@heroicons/vue/24/outline";
|
|
3
|
+
import { HomeIcon as be } from "@heroicons/vue/24/solid";
|
|
4
|
+
import { useRoute as xe, useRouter as Se } from "vue-router";
|
|
5
5
|
//#region src/enums/AlertEnum.ts
|
|
6
|
-
var
|
|
6
|
+
var L = /* @__PURE__ */ function(e) {
|
|
7
7
|
return e.WARNING = "WARNING", e.ERROR = "ERROR", e.SUCCESS = "SUCCESS", e.INFO = "INFO", e;
|
|
8
|
-
}({}),
|
|
8
|
+
}({}), R = /* @__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 Ce(e) {
|
|
14
14
|
let t = "red";
|
|
15
15
|
switch (e) {
|
|
16
|
-
case
|
|
16
|
+
case L.ERROR:
|
|
17
17
|
t = "red";
|
|
18
18
|
break;
|
|
19
|
-
case
|
|
19
|
+
case L.SUCCESS:
|
|
20
20
|
t = "green";
|
|
21
21
|
break;
|
|
22
|
-
case
|
|
22
|
+
case L.INFO:
|
|
23
23
|
t = "gray";
|
|
24
24
|
break;
|
|
25
|
-
case
|
|
25
|
+
case L.WARNING:
|
|
26
26
|
t = "yellow";
|
|
27
27
|
break;
|
|
28
28
|
}
|
|
29
29
|
return t;
|
|
30
30
|
}
|
|
31
|
-
function
|
|
31
|
+
function we(e) {
|
|
32
32
|
let t = "red";
|
|
33
33
|
switch (e) {
|
|
34
|
-
case
|
|
34
|
+
case R.GREEN:
|
|
35
35
|
t = "green";
|
|
36
36
|
break;
|
|
37
|
-
case
|
|
37
|
+
case R.RED:
|
|
38
38
|
t = "red";
|
|
39
39
|
break;
|
|
40
|
-
case
|
|
40
|
+
case R.BLUE:
|
|
41
41
|
t = "blue";
|
|
42
42
|
break;
|
|
43
|
-
case
|
|
43
|
+
case R.YELLOW:
|
|
44
44
|
t = "yellow";
|
|
45
45
|
break;
|
|
46
|
-
case
|
|
46
|
+
case R.BLACK:
|
|
47
47
|
t = "black";
|
|
48
48
|
break;
|
|
49
|
-
case
|
|
49
|
+
case R.GRAY:
|
|
50
50
|
t = "gray";
|
|
51
51
|
break;
|
|
52
|
-
case
|
|
52
|
+
case R.NONE:
|
|
53
53
|
t = "";
|
|
54
54
|
break;
|
|
55
55
|
}
|
|
@@ -57,7 +57,7 @@ function Te(e) {
|
|
|
57
57
|
}
|
|
58
58
|
//#endregion
|
|
59
59
|
//#region src/components/BaseAlert.vue?vue&type=script&setup=true&lang.ts
|
|
60
|
-
var
|
|
60
|
+
var Te = { class: "font-medium pl-1" }, Ee = /* @__PURE__ */ d({
|
|
61
61
|
__name: "BaseAlert",
|
|
62
62
|
props: {
|
|
63
63
|
title: {
|
|
@@ -68,35 +68,35 @@ var Ee = { class: "font-medium pl-1" }, De = /* @__PURE__ */ d({
|
|
|
68
68
|
color: {
|
|
69
69
|
type: String,
|
|
70
70
|
required: !1,
|
|
71
|
-
default:
|
|
71
|
+
default: L.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
|
|
77
|
+
case L.SUCCESS: return ae;
|
|
78
|
+
case L.WARNING: return pe;
|
|
79
|
+
case L.INFO: return he;
|
|
80
80
|
default: return fe;
|
|
81
81
|
}
|
|
82
82
|
}), a = r(() => {
|
|
83
83
|
switch (t.color) {
|
|
84
|
-
case
|
|
85
|
-
case
|
|
86
|
-
case
|
|
84
|
+
case L.SUCCESS: return "text-green-500";
|
|
85
|
+
case L.WARNING: return "text-yellow-500";
|
|
86
|
+
case L.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 = Ce(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", Te, T(e.title), 1)])], 2));
|
|
98
98
|
}
|
|
99
|
-
}),
|
|
99
|
+
}), De = "bg-red-100 text-red-700 border-red-200", z = /* @__PURE__ */ d({
|
|
100
100
|
__name: "BaseBadge",
|
|
101
101
|
props: { color: {
|
|
102
102
|
type: String,
|
|
@@ -104,26 +104,26 @@ var Ee = { class: "font-medium pl-1" }, De = /* @__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
|
+
[R.RED]: "bg-red-100 text-red-700 border-red-200",
|
|
108
|
+
[R.GREEN]: "bg-green-100 text-green-700 border-green-200",
|
|
109
|
+
[R.BLUE]: "bg-blue-100 text-blue-700 border-blue-200",
|
|
110
|
+
[R.YELLOW]: "bg-yellow-100 text-yellow-700 border-yellow-200",
|
|
111
|
+
[R.GRAY]: "bg-gray-100 text-gray-700 border-gray-200",
|
|
112
|
+
[R.BLACK]: "bg-gray-800 text-gray-100 border-gray-700",
|
|
113
|
+
[R.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] || De}`);
|
|
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
|
+
}), Oe = {
|
|
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
|
+
}, ke = { class: "inline-flex items-center space-x-1 md:space-x-3" }, Ae = {
|
|
124
124
|
class: "inline-flex items-center",
|
|
125
125
|
style: { "margin-left": "0" }
|
|
126
|
-
},
|
|
126
|
+
}, je = /* @__PURE__ */ d({
|
|
127
127
|
__name: "BaseBreadcrumb",
|
|
128
128
|
props: {
|
|
129
129
|
items: {
|
|
@@ -148,11 +148,11 @@ var Ee = { class: "font-medium pl-1" }, De = /* @__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", Oe, [s("ol", ke, [s("li", Ae, [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(be), { 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,
|
|
@@ -167,52 +167,52 @@ var Ee = { class: "font-medium pl-1" }, De = /* @__PURE__ */ d({
|
|
|
167
167
|
}, 1032, ["to"])]))), 128))])]);
|
|
168
168
|
};
|
|
169
169
|
}
|
|
170
|
-
}),
|
|
170
|
+
}), B = /* @__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
|
+
}({}), V = /* @__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
|
+
}({}), H = b(!1), Me = !1, U = "mgv-theme";
|
|
175
|
+
function Ne(e) {
|
|
176
|
+
if (Me) {
|
|
177
|
+
e !== U && console.warn(`[ui-lib] useTheme: storage key "${e}" ignored — theme already initialized with "${U}". Call initTheme({ storageKey }) before mounting any component.`);
|
|
178
178
|
return;
|
|
179
179
|
}
|
|
180
|
-
if (
|
|
181
|
-
let e = window.localStorage?.getItem(
|
|
182
|
-
e ?
|
|
180
|
+
if (Me = !0, U = e, typeof window < "u") {
|
|
181
|
+
let e = window.localStorage?.getItem(U);
|
|
182
|
+
e ? H.value = e === "dark" : typeof window.matchMedia == "function" && (H.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(H, (e) => {
|
|
186
|
+
document.documentElement.classList.toggle("dark", e), window.localStorage?.setItem(U, e ? "dark" : "light");
|
|
187
187
|
}, { immediate: !0 });
|
|
188
188
|
});
|
|
189
189
|
}
|
|
190
|
-
function
|
|
191
|
-
|
|
190
|
+
function Pe(e) {
|
|
191
|
+
Ne(e?.storageKey ?? U);
|
|
192
192
|
}
|
|
193
|
-
function
|
|
194
|
-
|
|
193
|
+
function W(e) {
|
|
194
|
+
Ne(e?.storageKey ?? U);
|
|
195
195
|
function t() {
|
|
196
|
-
|
|
196
|
+
H.value = !H.value;
|
|
197
197
|
}
|
|
198
198
|
return {
|
|
199
|
-
isDark:
|
|
199
|
+
isDark: H,
|
|
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 Fe = [
|
|
206
206
|
"type",
|
|
207
207
|
"disabled",
|
|
208
208
|
"onClick"
|
|
209
|
-
],
|
|
209
|
+
], Ie = {
|
|
210
210
|
key: 0,
|
|
211
211
|
class: "inline-flex items-center"
|
|
212
|
-
},
|
|
212
|
+
}, Le = { key: 1 }, Re = { key: 2 }, ze = ["type", "disabled"], Be = {
|
|
213
213
|
key: 0,
|
|
214
214
|
class: "inline-flex items-center"
|
|
215
|
-
},
|
|
215
|
+
}, Ve = { key: 1 }, He = { key: 2 }, Ue = /* @__PURE__ */ d({
|
|
216
216
|
__name: "BaseButton",
|
|
217
217
|
props: {
|
|
218
218
|
description: {
|
|
@@ -222,7 +222,7 @@ var Le = [
|
|
|
222
222
|
color: {
|
|
223
223
|
type: String,
|
|
224
224
|
required: !1,
|
|
225
|
-
default:
|
|
225
|
+
default: B.BLUE
|
|
226
226
|
},
|
|
227
227
|
to: {
|
|
228
228
|
type: String,
|
|
@@ -266,139 +266,139 @@ var Le = [
|
|
|
266
266
|
}
|
|
267
267
|
},
|
|
268
268
|
setup(e) {
|
|
269
|
-
let { isDark: t } =
|
|
269
|
+
let { isDark: t } = W(), n = e;
|
|
270
270
|
function r() {
|
|
271
271
|
let e = {
|
|
272
|
-
[
|
|
272
|
+
[B.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
|
+
[B.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
|
+
[B.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
|
+
[B.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
|
+
[B.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
|
+
[B.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
|
+
[B.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
|
+
[B.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
|
+
[B.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
|
+
[B.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
|
+
[B.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[B.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
|
+
[B.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
|
+
[B.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
|
+
[B.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
|
+
[B.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
|
+
[B.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
|
+
[B.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
|
+
[B.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
|
+
[B.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
|
+
[B.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
|
+
[B.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
|
+
[B.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[B.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 B.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 B.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 B.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 B.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 B.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 B.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 B.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 B.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 B.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 B.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 B.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 Le = [
|
|
|
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 V.EXTRA_SMALL:
|
|
412
412
|
i = "px-3 py-2 text-xs";
|
|
413
413
|
break;
|
|
414
|
-
case
|
|
414
|
+
case V.SMALL:
|
|
415
415
|
i = "px-3 py-2 text-sm";
|
|
416
416
|
break;
|
|
417
|
-
case
|
|
417
|
+
case V.BASE:
|
|
418
418
|
i = "px-5 py-2.5 text-sm";
|
|
419
419
|
break;
|
|
420
|
-
case
|
|
420
|
+
case V.LARGE:
|
|
421
421
|
i = "px-5 py-3 text-base";
|
|
422
422
|
break;
|
|
423
|
-
case
|
|
423
|
+
case V.EXTRA_LARGE:
|
|
424
424
|
i = "px-6 py-3.5 text-base";
|
|
425
425
|
break;
|
|
426
426
|
}
|
|
@@ -440,7 +440,7 @@ var Le = [
|
|
|
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", Ie, [...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 Le = [
|
|
|
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", Le, T(e.description), 1)),
|
|
458
458
|
S(t.$slots, "default"),
|
|
459
|
-
e.iconLeft ? (y(), o("span",
|
|
460
|
-
], 10,
|
|
459
|
+
e.iconLeft ? (y(), o("span", Re, T(e.description), 1)) : a("", !0)
|
|
460
|
+
], 10, Fe)]),
|
|
461
461
|
_: 3
|
|
462
462
|
}, 8, ["to"])) : (y(), o("button", {
|
|
463
463
|
key: 1,
|
|
@@ -465,7 +465,7 @@ var Le = [
|
|
|
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", Be, [...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 Le = [
|
|
|
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", Ve, T(e.description), 1)),
|
|
483
483
|
S(t.$slots, "default"),
|
|
484
|
-
e.iconLeft ? (y(), o("span",
|
|
485
|
-
], 10,
|
|
484
|
+
e.iconLeft ? (y(), o("span", He, T(e.description), 1)) : a("", !0)
|
|
485
|
+
], 10, ze));
|
|
486
486
|
};
|
|
487
487
|
}
|
|
488
|
-
}),
|
|
488
|
+
}), G = /* @__PURE__ */ function(e) {
|
|
489
489
|
return e.BASE = "BASE", e.BASE_SHORTER = "BASE_SHORTER", e.SQUARE = "SQUARE", e;
|
|
490
|
-
}({}),
|
|
490
|
+
}({}), We = {
|
|
491
491
|
key: 0,
|
|
492
492
|
class: "h-px my-8 bg-gray-200 border-0 dark:bg-gray-700"
|
|
493
|
-
},
|
|
493
|
+
}, Ge = {
|
|
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
|
+
}, Ke = {
|
|
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
|
+
}, qe = /* @__PURE__ */ d({
|
|
500
500
|
__name: "BaseLine",
|
|
501
501
|
props: { mode: {
|
|
502
502
|
type: String,
|
|
503
503
|
required: !1,
|
|
504
|
-
default:
|
|
504
|
+
default: G.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(G).BASE ? (y(), o("hr", We)) : a("", !0),
|
|
509
|
+
t.mode === E(G).BASE_SHORTER ? (y(), o("hr", Ge)) : a("", !0),
|
|
510
|
+
t.mode === E(G).SQUARE ? (y(), o("hr", Ke)) : a("", !0)
|
|
511
511
|
], 64));
|
|
512
512
|
}
|
|
513
|
-
}),
|
|
513
|
+
}), K = /* @__PURE__ */ function(e) {
|
|
514
514
|
return e.SMALL = "SMALL", e.MEDIUM = "MEDIUM", e.LARGE = "LARGE", e;
|
|
515
|
-
}({}),
|
|
515
|
+
}({}), Je = K, Ye = ["height", "width"], Xe = /* @__PURE__ */ d({
|
|
516
516
|
__name: "BaseLogo",
|
|
517
517
|
props: { size: {
|
|
518
518
|
type: String,
|
|
519
519
|
required: !1,
|
|
520
|
-
default:
|
|
520
|
+
default: K.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 K.SMALL:
|
|
528
528
|
e = "50px";
|
|
529
529
|
break;
|
|
530
|
-
case
|
|
530
|
+
case K.MEDIUM:
|
|
531
531
|
e = "100px";
|
|
532
532
|
break;
|
|
533
|
-
case
|
|
533
|
+
case K.LARGE:
|
|
534
534
|
e = "150px";
|
|
535
535
|
break;
|
|
536
536
|
}
|
|
@@ -692,23 +692,23 @@ var Le = [
|
|
|
692
692
|
d: "m281.7 183.8h3.6v18.5h-3.6z",
|
|
693
693
|
fill: "url(#k)"
|
|
694
694
|
}, null, -1)
|
|
695
|
-
]], 8,
|
|
695
|
+
]], 8, Ye))]),
|
|
696
696
|
_: 1
|
|
697
697
|
});
|
|
698
698
|
};
|
|
699
699
|
}
|
|
700
|
-
}),
|
|
700
|
+
}), Ze = /* @__PURE__ */ function(e) {
|
|
701
701
|
return e.DELETE = "DELETE", e.SUCCESS = "SUCCESS", e;
|
|
702
|
-
}({}),
|
|
702
|
+
}({}), Qe = {
|
|
703
703
|
key: 0,
|
|
704
704
|
class: "p-6 text-center"
|
|
705
|
-
},
|
|
705
|
+
}, $e = { class: "flex justify-center" }, et = {
|
|
706
706
|
key: 1,
|
|
707
707
|
class: "p-6 text-center"
|
|
708
|
-
},
|
|
708
|
+
}, tt = {
|
|
709
709
|
key: 0,
|
|
710
710
|
class: "mb-5 text-sm text-gray-500"
|
|
711
|
-
},
|
|
711
|
+
}, nt = { class: "flex justify-center" }, rt = /* @__PURE__ */ d({
|
|
712
712
|
__name: "BaseModal",
|
|
713
713
|
props: {
|
|
714
714
|
title: {
|
|
@@ -727,7 +727,7 @@ var Le = [
|
|
|
727
727
|
mode: {
|
|
728
728
|
type: String,
|
|
729
729
|
required: !1,
|
|
730
|
-
default:
|
|
730
|
+
default: Ze.SUCCESS
|
|
731
731
|
}
|
|
732
732
|
},
|
|
733
733
|
emits: ["closeModal", "confirmModal"],
|
|
@@ -748,37 +748,37 @@ var Le = [
|
|
|
748
748
|
role: "dialog",
|
|
749
749
|
"aria-modal": "true",
|
|
750
750
|
"aria-labelledby": i
|
|
751
|
-
}, [t.mode === E(
|
|
751
|
+
}, [t.mode === E(Ze).DELETE ? (y(), o("div", Qe, [
|
|
752
752
|
u(E(fe), { 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", $e, [u(Ue, {
|
|
758
|
+
color: E(B).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(Ue, {
|
|
762
|
+
color: E(B).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", et, [
|
|
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", tt, T(t.description), 1)) : a("", !0),
|
|
773
773
|
S(n.$slots, "default"),
|
|
774
|
-
s("div",
|
|
775
|
-
color: E(
|
|
774
|
+
s("div", nt, [u(Ue, {
|
|
775
|
+
color: E(B).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
|
+
}), it = /* @__PURE__ */ d({
|
|
782
782
|
__name: "BaseRow",
|
|
783
783
|
props: { bgColor: {
|
|
784
784
|
type: String,
|
|
@@ -792,7 +792,7 @@ var Le = [
|
|
|
792
792
|
}
|
|
793
793
|
return (e, t) => (y(), o("div", { class: m(n()) }, [S(e.$slots, "default")], 2));
|
|
794
794
|
}
|
|
795
|
-
}),
|
|
795
|
+
}), at = /* @__PURE__ */ d({
|
|
796
796
|
__name: "BaseSpinner",
|
|
797
797
|
props: {
|
|
798
798
|
size: { default: "sm" },
|
|
@@ -820,11 +820,11 @@ var Le = [
|
|
|
820
820
|
"aria-label": "Loading"
|
|
821
821
|
}, null, 2));
|
|
822
822
|
}
|
|
823
|
-
}),
|
|
823
|
+
}), q = /* @__PURE__ */ function(e) {
|
|
824
824
|
return e.SUCCESS = "SUCCESS", e.WARNING = "WARNING", e.ERROR = "ERROR", e;
|
|
825
|
-
}({}),
|
|
825
|
+
}({}), J = /* @__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
|
+
}({}), ot = { 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" }, st = { class: "ml-3 text-sm font-normal" }, ct = /* @__PURE__ */ d({
|
|
828
828
|
__name: "BaseToast",
|
|
829
829
|
props: {
|
|
830
830
|
mode: {
|
|
@@ -843,7 +843,7 @@ var Le = [
|
|
|
843
843
|
positioning: {
|
|
844
844
|
type: String,
|
|
845
845
|
required: !1,
|
|
846
|
-
default:
|
|
846
|
+
default: J.TOP_RIGHT
|
|
847
847
|
},
|
|
848
848
|
duration: {
|
|
849
849
|
type: Number,
|
|
@@ -864,13 +864,13 @@ var Le = [
|
|
|
864
864
|
function c() {
|
|
865
865
|
let e = "";
|
|
866
866
|
switch (t.mode) {
|
|
867
|
-
case
|
|
867
|
+
case q.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 q.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 q.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 Le = [
|
|
|
882
882
|
function l() {
|
|
883
883
|
let e = "top-5 right-5";
|
|
884
884
|
switch (t.positioning) {
|
|
885
|
-
case
|
|
885
|
+
case J.BOTTOM_LEFT:
|
|
886
886
|
e = "bottom-5 left-5";
|
|
887
887
|
break;
|
|
888
|
-
case
|
|
888
|
+
case J.TOP_LEFT:
|
|
889
889
|
e = "top-5 left-5";
|
|
890
890
|
break;
|
|
891
|
-
case
|
|
891
|
+
case J.TOP_RIGHT:
|
|
892
892
|
e = "top-5 right-5";
|
|
893
893
|
break;
|
|
894
|
-
case
|
|
894
|
+
case J.BOTTOM_RIGHT:
|
|
895
895
|
e = "bottom-5 right-5";
|
|
896
896
|
break;
|
|
897
897
|
}
|
|
@@ -902,28 +902,28 @@ var Le = [
|
|
|
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", ot, [
|
|
906
|
+
e.mode == E(q).ERROR ? (y(), o("div", {
|
|
907
907
|
key: 0,
|
|
908
908
|
class: m(c())
|
|
909
|
-
}, [u(E(fe), { class: "h-6 w-6 text-red-500" }), r[0] ||= s("span", { class: "sr-only" }, "Error icon", -1)], 2)) : e.mode == E(
|
|
909
|
+
}, [u(E(fe), { class: "h-6 w-6 text-red-500" }), r[0] ||= s("span", { class: "sr-only" }, "Error icon", -1)], 2)) : e.mode == E(q).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(q).WARNING ? (y(), o("div", {
|
|
913
913
|
key: 2,
|
|
914
914
|
class: m(c())
|
|
915
915
|
}, [u(E(pe), { class: "h-6 w-6 text-yellow-500" }), r[2] ||= s("span", { class: "sr-only" }, "Warning icon", -1)], 2)) : a("", !0),
|
|
916
|
-
s("div",
|
|
916
|
+
s("div", st, 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(I), { class: "h-6 w-6 text-gray-500" })])) : a("", !0)
|
|
924
924
|
])], 2)) : a("", !0);
|
|
925
925
|
}
|
|
926
|
-
}),
|
|
926
|
+
}), lt = { class: "w-13" }, ut = /* @__PURE__ */ d({
|
|
927
927
|
__name: "ColoredSquares",
|
|
928
928
|
props: { color: {
|
|
929
929
|
type: String,
|
|
@@ -944,25 +944,25 @@ var Le = [
|
|
|
944
944
|
function i() {
|
|
945
945
|
let e = "gray";
|
|
946
946
|
switch (t.color) {
|
|
947
|
-
case
|
|
947
|
+
case R.GREEN:
|
|
948
948
|
e = "green";
|
|
949
949
|
break;
|
|
950
|
-
case
|
|
950
|
+
case R.RED:
|
|
951
951
|
e = "red";
|
|
952
952
|
break;
|
|
953
|
-
case
|
|
953
|
+
case R.BLUE:
|
|
954
954
|
e = "blue";
|
|
955
955
|
break;
|
|
956
|
-
case
|
|
956
|
+
case R.YELLOW:
|
|
957
957
|
e = "yellow";
|
|
958
958
|
break;
|
|
959
|
-
case
|
|
959
|
+
case R.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", lt, [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
|
+
}), dt = { class: "flex items-start justify-between" }, ft = { class: "min-w-0" }, pt = /* @__PURE__ */ d({
|
|
966
966
|
__name: "EarningsCard",
|
|
967
967
|
props: {
|
|
968
968
|
title: { default: "TOTAL EARNINGS" },
|
|
@@ -975,6 +975,10 @@ var Le = [
|
|
|
975
975
|
signed: {
|
|
976
976
|
type: Boolean,
|
|
977
977
|
default: !1
|
|
978
|
+
},
|
|
979
|
+
compact: {
|
|
980
|
+
type: Boolean,
|
|
981
|
+
default: !1
|
|
978
982
|
}
|
|
979
983
|
},
|
|
980
984
|
setup(t) {
|
|
@@ -1010,15 +1014,15 @@ var Le = [
|
|
|
1010
1014
|
minimumFractionDigits: n.decimals,
|
|
1011
1015
|
maximumFractionDigits: n.decimals
|
|
1012
1016
|
}));
|
|
1013
|
-
return (n, r) => (y(), o("div", { class: m(["relative rounded-xl border-2 border-dashed bg-white
|
|
1017
|
+
return (n, r) => (y(), o("div", { class: m(["relative rounded-xl border-2 border-dashed bg-white dark:bg-slate-800", [d.value.border, t.compact ? "p-3" : "p-6"]]) }, [t.badge ? (y(), o("div", {
|
|
1014
1018
|
key: 0,
|
|
1015
1019
|
class: m(["absolute right-4 top-4 rounded-md px-3 py-1 text-xs font-bold tracking-wide", d.value.badge])
|
|
1016
|
-
}, T(t.badge), 3)) : a("", !0), s("div",
|
|
1017
|
-
s("p",
|
|
1018
|
-
s("p", { class: m(["mt-1
|
|
1019
|
-
s("p", { class: m(["mt-1
|
|
1020
|
-
]), s("div", { class: m(["
|
|
1021
|
-
class: m(["h-6 w-6"
|
|
1020
|
+
}, T(t.badge), 3)) : a("", !0), s("div", dt, [s("div", ft, [
|
|
1021
|
+
s("p", { class: m(["font-bold tracking-wide text-gray-800 dark:text-slate-200", t.compact ? "pr-8 text-xs" : "text-sm"]) }, T(t.title), 3),
|
|
1022
|
+
s("p", { class: m(["mt-1 font-bold truncate", [d.value.amount, t.compact ? "text-lg" : "text-4xl"]]) }, T(f.value), 3),
|
|
1023
|
+
s("p", { class: m(["mt-1 font-medium", [d.value.subtitle, t.compact ? "text-xs" : "text-sm"]]) }, T(t.subtitle), 3)
|
|
1024
|
+
]), s("div", { class: m(["flex items-center justify-center", [d.value.iconBox, t.compact ? "absolute right-2 top-2 h-6 w-6 rounded-lg" : "mt-6 h-12 w-12 rounded-xl"]]) }, [(y(), o("svg", {
|
|
1025
|
+
class: m([d.value.icon, t.compact ? "h-3.5 w-3.5" : "h-6 w-6"]),
|
|
1022
1026
|
viewBox: "0 0 24 24",
|
|
1023
1027
|
fill: "none",
|
|
1024
1028
|
stroke: "currentColor",
|
|
@@ -1027,10 +1031,10 @@ var Le = [
|
|
|
1027
1031
|
"stroke-linejoin": "round"
|
|
1028
1032
|
}, [l.value ? (y(), o(e, { key: 0 }, [r[0] ||= s("polyline", { points: "22 17 13.5 8.5 8.5 13.5 2 7" }, null, -1), r[1] ||= s("polyline", { points: "16 17 22 17 22 11" }, null, -1)], 64)) : (y(), o(e, { key: 1 }, [r[2] ||= s("polyline", { points: "22 7 13.5 15.5 8.5 10.5 2 17" }, null, -1), r[3] ||= s("polyline", { points: "16 7 22 7 22 13" }, null, -1)], 64))], 2))], 2)])], 2));
|
|
1029
1033
|
}
|
|
1030
|
-
}),
|
|
1034
|
+
}), mt = {
|
|
1031
1035
|
key: 0,
|
|
1032
1036
|
class: "font-bold text-green-800"
|
|
1033
|
-
},
|
|
1037
|
+
}, ht = { key: 0 }, gt = { key: 0 }, _t = "font-bold", vt = /* @__PURE__ */ d({
|
|
1034
1038
|
__name: "EuroAmount",
|
|
1035
1039
|
props: {
|
|
1036
1040
|
amount: {
|
|
@@ -1050,15 +1054,15 @@ var Le = [
|
|
|
1050
1054
|
},
|
|
1051
1055
|
setup(t) {
|
|
1052
1056
|
let n = t, i = r(() => n.amount !== null && n.amount !== void 0), s = r(() => i.value && n.amount < 0), c = r(() => n.beforeAmount === null || n.beforeAmount === void 0 ? !1 : n.amount < n.beforeAmount), u = r(() => s.value || c.value), d = r(() => !s.value && !c.value && !(n.beforeAmount === null || n.beforeAmount === void 0));
|
|
1053
|
-
return (n, r) => (y(), o(e, null, [i.value && d.value ? (y(), o("span",
|
|
1057
|
+
return (n, r) => (y(), o(e, null, [i.value && d.value ? (y(), o("span", mt, [l(T(t.amount) + " ", 1), t.showCurrency ? (y(), o("span", ht, "€")) : a("", !0)])) : a("", !0), i.value && !d.value ? (y(), o("span", {
|
|
1054
1058
|
key: 1,
|
|
1055
|
-
class: m([
|
|
1056
|
-
}, [l(T(t.amount) + " ", 1), t.showCurrency ? (y(), o("span",
|
|
1059
|
+
class: m([_t, u.value ? "text-red-800" : "text-gray-800"])
|
|
1060
|
+
}, [l(T(t.amount) + " ", 1), t.showCurrency ? (y(), o("span", gt, "€")) : a("", !0)], 2)) : a("", !0)], 64));
|
|
1057
1061
|
}
|
|
1058
|
-
}),
|
|
1062
|
+
}), yt = { class: "flex list-none p-0 m-0" }, bt = ["onClick", "onKeydown"], xt = {
|
|
1059
1063
|
key: 1,
|
|
1060
1064
|
class: "inline-block border border-gray-300 rounded-lg p-3 text-black cursor-not-allowed"
|
|
1061
|
-
},
|
|
1065
|
+
}, St = /* @__PURE__ */ d({
|
|
1062
1066
|
__name: "Pagination",
|
|
1063
1067
|
props: {
|
|
1064
1068
|
totalItems: {
|
|
@@ -1088,28 +1092,28 @@ var Le = [
|
|
|
1088
1092
|
}
|
|
1089
1093
|
return j(() => [r.totalItems, r.itemsPerPage], () => {
|
|
1090
1094
|
a.value = Math.ceil(r.totalItems / r.itemsPerPage), i.value > a.value && (i.value = Math.max(1, a.value)), u(i.value);
|
|
1091
|
-
}, { immediate: !0 }), (t, n) => (y(), o("div", null, [s("ul",
|
|
1095
|
+
}, { immediate: !0 }), (t, n) => (y(), o("div", null, [s("ul", yt, [(y(!0), o(e, null, x(c.value, (e, t) => (y(), o("li", {
|
|
1092
1096
|
key: t,
|
|
1093
1097
|
class: "mr-1"
|
|
1094
|
-
}, [e === 0 ? (y(), o("span",
|
|
1098
|
+
}, [e === 0 ? (y(), o("span", xt, "...")) : (y(), o("a", {
|
|
1095
1099
|
key: 0,
|
|
1096
1100
|
role: "button",
|
|
1097
1101
|
tabindex: "0",
|
|
1098
1102
|
onClick: (t) => d(e),
|
|
1099
1103
|
onKeydown: P((t) => d(e), ["enter"]),
|
|
1100
1104
|
class: m(["inline-block border border-gray-300 rounded-lg p-3 no-underline text-black cursor-pointer hover:bg-gray-300", { "active font-bold bg-gray-200": e === i.value }])
|
|
1101
|
-
}, T(e), 43,
|
|
1105
|
+
}, T(e), 43, bt))]))), 128))])]));
|
|
1102
1106
|
}
|
|
1103
|
-
}),
|
|
1107
|
+
}), Ct = { key: 0 }, wt = {
|
|
1104
1108
|
key: 0,
|
|
1105
1109
|
class: "flex items-center space-x-2"
|
|
1106
|
-
},
|
|
1110
|
+
}, Tt = {
|
|
1107
1111
|
key: 1,
|
|
1108
1112
|
class: "flex items-center space-x-2"
|
|
1109
|
-
},
|
|
1113
|
+
}, Et = {
|
|
1110
1114
|
key: 2,
|
|
1111
1115
|
class: "flex items-center space-x-2"
|
|
1112
|
-
},
|
|
1116
|
+
}, Dt = /* @__PURE__ */ d({
|
|
1113
1117
|
__name: "TrendArrow",
|
|
1114
1118
|
props: {
|
|
1115
1119
|
number: {
|
|
@@ -1123,13 +1127,13 @@ var Le = [
|
|
|
1123
1127
|
},
|
|
1124
1128
|
setup(e) {
|
|
1125
1129
|
let t = e, n = r(() => t.number !== null && t.number !== void 0 && t.number < 0), i = r(() => t.number === 0);
|
|
1126
|
-
return (r, s) => e.number !== null && e.number !== void 0 ? (y(), o("div",
|
|
1130
|
+
return (r, s) => e.number !== null && e.number !== void 0 ? (y(), o("div", Ct, [n.value ? (y(), o("span", wt, [u(z, { color: E(R).RED }, {
|
|
1127
1131
|
default: M(() => [l(T(e.number) + T(t.icon), 1)]),
|
|
1128
1132
|
_: 1
|
|
1129
|
-
}, 8, ["color"]), u(E(te), { class: "h-5 w-5 text-red-500" })])) : i.value ? (y(), o("span",
|
|
1133
|
+
}, 8, ["color"]), u(E(te), { class: "h-5 w-5 text-red-500" })])) : i.value ? (y(), o("span", Tt, [u(z, { color: E(R).GRAY }, {
|
|
1130
1134
|
default: M(() => [l(T(e.number) + T(t.icon), 1)]),
|
|
1131
1135
|
_: 1
|
|
1132
|
-
}, 8, ["color"]), u(E(_e), { class: "h-5 w-5 text-gray-400" })])) : (y(), o("span",
|
|
1136
|
+
}, 8, ["color"]), u(E(_e), { class: "h-5 w-5 text-gray-400" })])) : (y(), o("span", Et, [u(z, { color: E(R).GREEN }, {
|
|
1133
1137
|
default: M(() => [l(T(e.number) + T(t.icon), 1)]),
|
|
1134
1138
|
_: 1
|
|
1135
1139
|
}, 8, ["color"]), u(E(ne), { class: "h-5 w-5 text-green-500" })]))])) : a("", !0);
|
|
@@ -1137,8 +1141,8 @@ var Le = [
|
|
|
1137
1141
|
});
|
|
1138
1142
|
//#endregion
|
|
1139
1143
|
//#region src/composables/useThemeClasses.ts
|
|
1140
|
-
function
|
|
1141
|
-
let { isDark: e } =
|
|
1144
|
+
function Y() {
|
|
1145
|
+
let { isDark: e } = W();
|
|
1142
1146
|
return {
|
|
1143
1147
|
card: r(() => e.value ? "bg-gray-800 border-gray-700" : "bg-white border-gray-200"),
|
|
1144
1148
|
cardAlt: r(() => e.value ? "bg-gray-900 border-gray-700" : "bg-white border-gray-200"),
|
|
@@ -1165,7 +1169,7 @@ function J() {
|
|
|
1165
1169
|
}
|
|
1166
1170
|
//#endregion
|
|
1167
1171
|
//#region src/composables/useEscapeKey.ts
|
|
1168
|
-
function
|
|
1172
|
+
function Ot(e) {
|
|
1169
1173
|
function t(t) {
|
|
1170
1174
|
t.key === "Escape" && e();
|
|
1171
1175
|
}
|
|
@@ -1190,11 +1194,11 @@ var kt = { class: "flex items-start gap-4 min-w-0" }, At = { class: "flex-1 min-
|
|
|
1190
1194
|
},
|
|
1191
1195
|
emits: ["cancel", "backdrop"],
|
|
1192
1196
|
setup(e, { emit: n }) {
|
|
1193
|
-
let c = e, l = n, { isDark: u } =
|
|
1197
|
+
let c = e, l = n, { isDark: u } = W(), d = Y(), f = `modal-title-${Math.random().toString(36).slice(2, 9)}`, p = r(() => u.value ? "bg-gray-900 border border-gray-700" : "bg-white border border-gray-200");
|
|
1194
1198
|
function h() {
|
|
1195
1199
|
l("backdrop"), c.manualClose || l("cancel");
|
|
1196
1200
|
}
|
|
1197
|
-
return
|
|
1201
|
+
return Ot(() => {
|
|
1198
1202
|
c.manualClose || l("cancel");
|
|
1199
1203
|
}), (n, r) => (y(), i(t, { to: "body" }, [s("div", {
|
|
1200
1204
|
class: "fixed inset-0 z-50 flex items-center justify-center bg-black/50",
|
|
@@ -1242,7 +1246,7 @@ var kt = { class: "flex items-start gap-4 min-w-0" }, At = { class: "flex-1 min-
|
|
|
1242
1246
|
},
|
|
1243
1247
|
emits: ["toggle"],
|
|
1244
1248
|
setup(e, { emit: t }) {
|
|
1245
|
-
let n = e, i = t, { isDark: c } =
|
|
1249
|
+
let n = e, i = t, { isDark: c } = W(), l = Y(), u = r(() => c.value ? "text-gray-100" : "text-gray-700"), d = r(() => c.value ? "bg-gray-800/50 hover:bg-gray-800 border-gray-700" : "bg-gray-50 hover:bg-gray-100 border-gray-200"), f = r(() => c.value ? "bg-emerald-500/15 text-emerald-400" : "bg-emerald-50 text-emerald-700"), p = r(() => n.bodyClass === void 0 ? c.value ? "bg-gray-800" : "bg-white" : n.bodyClass);
|
|
1246
1250
|
return (t, n) => (y(), o("section", { class: m(["rounded-xl border overflow-hidden transition-colors", E(l).cardAlt]) }, [s("button", {
|
|
1247
1251
|
type: "button",
|
|
1248
1252
|
class: m(["w-full flex items-center justify-between p-4 text-left transition-colors", d.value]),
|
|
@@ -1286,7 +1290,7 @@ var kt = { class: "flex items-start gap-4 min-w-0" }, At = { class: "flex-1 min-
|
|
|
1286
1290
|
},
|
|
1287
1291
|
emits: ["confirm", "cancel"],
|
|
1288
1292
|
setup(e, { emit: t }) {
|
|
1289
|
-
let n = e, r = t, { isDark: c } =
|
|
1293
|
+
let n = e, r = t, { isDark: c } = W(), d = Y();
|
|
1290
1294
|
function f() {
|
|
1291
1295
|
n.submitting || r("confirm");
|
|
1292
1296
|
}
|
|
@@ -1346,7 +1350,7 @@ var kt = { class: "flex items-start gap-4 min-w-0" }, At = { class: "flex-1 min-
|
|
|
1346
1350
|
},
|
|
1347
1351
|
emits: ["confirm", "cancel"],
|
|
1348
1352
|
setup(e, { emit: t }) {
|
|
1349
|
-
let n = e, r = t, { isDark: a } =
|
|
1353
|
+
let n = e, r = t, { isDark: a } = W(), o = Y(), c = b(n.initialValue), l = b(null);
|
|
1350
1354
|
g(async () => {
|
|
1351
1355
|
await p(), l.value?.focus();
|
|
1352
1356
|
});
|
|
@@ -1359,7 +1363,7 @@ var kt = { class: "flex items-start gap-4 min-w-0" }, At = { class: "flex-1 min-
|
|
|
1359
1363
|
function h() {
|
|
1360
1364
|
c.value.trim() === (n.initialValue ?? "").trim() && f();
|
|
1361
1365
|
}
|
|
1362
|
-
return
|
|
1366
|
+
return Ot(f), (t, n) => (y(), i(Lt, {
|
|
1363
1367
|
title: e.title,
|
|
1364
1368
|
"manual-close": "",
|
|
1365
1369
|
onBackdrop: h
|
|
@@ -1399,7 +1403,7 @@ var kt = { class: "flex items-start gap-4 min-w-0" }, At = { class: "flex-1 min-
|
|
|
1399
1403
|
homeLabel: { default: "Go home" }
|
|
1400
1404
|
},
|
|
1401
1405
|
setup(e) {
|
|
1402
|
-
let t = e, n =
|
|
1406
|
+
let t = e, n = Se(), { isDark: r } = W(), i = Y();
|
|
1403
1407
|
function a() {
|
|
1404
1408
|
n.push({ name: t.homeRouteName });
|
|
1405
1409
|
}
|
|
@@ -1556,7 +1560,7 @@ var on = ["aria-label", "aria-expanded"], sn = { class: "flex flex-col h-full" }
|
|
|
1556
1560
|
}
|
|
1557
1561
|
},
|
|
1558
1562
|
setup(t) {
|
|
1559
|
-
let n = t, c =
|
|
1563
|
+
let n = t, c = Se(), d = xe(), { isDark: f, toggleTheme: h } = W(), { mobileOpen: g, close: _, toggle: v } = Qt(), { collapsed: C, toggle: D } = nn(), { unreadCount: O, togglePanel: k } = an(), A = r(() => n.collapsible && C.value), ee = b(null), M = null;
|
|
1560
1564
|
j(g, async (e) => {
|
|
1561
1565
|
e ? (M = document.activeElement instanceof HTMLElement ? document.activeElement : null, await p(), ee.value?.focus()) : (M?.focus(), M = null);
|
|
1562
1566
|
});
|
|
@@ -1581,7 +1585,7 @@ var on = ["aria-label", "aria-expanded"], sn = { class: "flex flex-col h-full" }
|
|
|
1581
1585
|
class: m(["p-2 rounded-lg cursor-pointer", E(f) ? "text-gray-400 hover:bg-gray-800" : "text-gray-600 hover:bg-gray-100"]),
|
|
1582
1586
|
"aria-label": E(g) ? "Close navigation menu" : "Open navigation menu",
|
|
1583
1587
|
"aria-expanded": E(g)
|
|
1584
|
-
}, [E(g) ? (y(), i(E(
|
|
1588
|
+
}, [E(g) ? (y(), i(E(I), {
|
|
1585
1589
|
key: 1,
|
|
1586
1590
|
class: "w-6 h-6",
|
|
1587
1591
|
"aria-hidden": "true"
|
|
@@ -1617,7 +1621,7 @@ var on = ["aria-label", "aria-expanded"], sn = { class: "flex flex-col h-full" }
|
|
|
1617
1621
|
onClick: r[2] ||= (...e) => E(_) && E(_)(...e),
|
|
1618
1622
|
class: m(["lg:hidden p-1.5 rounded-lg cursor-pointer absolute right-3 top-4 focus:outline-none focus-visible:ring-2 focus-visible:ring-emerald-500", E(f) ? "text-gray-400 hover:bg-gray-800" : "text-gray-500 hover:bg-gray-100"]),
|
|
1619
1623
|
"aria-label": "Close navigation menu"
|
|
1620
|
-
}, [u(E(
|
|
1624
|
+
}, [u(E(I), {
|
|
1621
1625
|
class: "w-5 h-5",
|
|
1622
1626
|
"aria-hidden": "true"
|
|
1623
1627
|
})], 2)], 2),
|
|
@@ -1722,7 +1726,7 @@ var on = ["aria-label", "aria-expanded"], sn = { class: "flex flex-col h-full" }
|
|
|
1722
1726
|
},
|
|
1723
1727
|
emits: ["confirm", "cancel"],
|
|
1724
1728
|
setup(t, { emit: n }) {
|
|
1725
|
-
let c = t, l = n, { isDark: d } =
|
|
1729
|
+
let c = t, l = n, { isDark: d } = W(), f = Y(), h = b([]), _ = b(!1), v = b(""), C = b(null), w = b(""), D = b(null), O = r(() => {
|
|
1726
1730
|
let e = c.loader ? h.value : c.items;
|
|
1727
1731
|
return c.excludeId ? e.filter((e) => e.id !== c.excludeId) : e;
|
|
1728
1732
|
}), k = r(() => O.value.filter((e) => e.label.toLowerCase().includes(w.value.toLowerCase()))), ee = {
|
|
@@ -1862,7 +1866,7 @@ var on = ["aria-label", "aria-expanded"], sn = { class: "flex flex-col h-full" }
|
|
|
1862
1866
|
key: 0,
|
|
1863
1867
|
class: m(["text-sm", E(d) ? "text-gray-300" : "text-gray-600"])
|
|
1864
1868
|
}, T(t.message), 3)) : a("", !0),
|
|
1865
|
-
_.value ? (y(), o("div", _n, [u(
|
|
1869
|
+
_.value ? (y(), o("div", _n, [u(at, { color: "emerald" })])) : v.value ? (y(), o("div", vn, T(v.value), 1)) : a("", !0),
|
|
1866
1870
|
!_.value && !v.value && O.value.length > 0 ? (y(), o("div", yn, [s("div", bn, [u(E(ge), {
|
|
1867
1871
|
class: m(["absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4", E(f).dimText]),
|
|
1868
1872
|
"aria-hidden": "true"
|
|
@@ -1914,7 +1918,7 @@ var on = ["aria-label", "aria-expanded"], sn = { class: "flex flex-col h-full" }
|
|
|
1914
1918
|
skipLinkLabel: { default: "Skip to main content" }
|
|
1915
1919
|
},
|
|
1916
1920
|
setup(e) {
|
|
1917
|
-
let t = e, { isDark: n } =
|
|
1921
|
+
let t = e, { isDark: n } = W(), { mobileOpen: i } = Qt(), { collapsed: c } = nn(), l = r(() => t.showSidebar);
|
|
1918
1922
|
return (t, r) => (y(), o("div", { class: m(["min-h-screen transition-colors duration-300", E(n) ? "bg-gray-950 text-gray-100" : "bg-gray-50 text-gray-800"]) }, [
|
|
1919
1923
|
s("a", An, T(e.skipLinkLabel), 1),
|
|
1920
1924
|
l.value ? S(t.$slots, "sidebar", { key: 0 }) : a("", !0),
|
|
@@ -1935,7 +1939,7 @@ var on = ["aria-label", "aria-expanded"], sn = { class: "flex flex-col h-full" }
|
|
|
1935
1939
|
maxWidthClass: { default: "max-w-4xl" }
|
|
1936
1940
|
},
|
|
1937
1941
|
setup(e) {
|
|
1938
|
-
let t = e, { isDark: n } =
|
|
1942
|
+
let t = e, { isDark: n } = W(), i = Y(), c = r(() => {
|
|
1939
1943
|
let e = {
|
|
1940
1944
|
emerald: {
|
|
1941
1945
|
dark: "bg-emerald-500/10",
|
|
@@ -1999,7 +2003,7 @@ var on = ["aria-label", "aria-expanded"], sn = { class: "flex flex-col h-full" }
|
|
|
1999
2003
|
},
|
|
2000
2004
|
emits: ["click"],
|
|
2001
2005
|
setup(e) {
|
|
2002
|
-
let t = e, { isDark: n } =
|
|
2006
|
+
let t = e, { isDark: n } = W(), i = r(() => {
|
|
2003
2007
|
let e = {
|
|
2004
2008
|
neutral: {
|
|
2005
2009
|
dark: "bg-gray-800 text-gray-100 border-gray-700 hover:bg-gray-700",
|
|
@@ -2044,7 +2048,7 @@ var on = ["aria-label", "aria-expanded"], sn = { class: "flex flex-col h-full" }
|
|
|
2044
2048
|
},
|
|
2045
2049
|
emits: ["click"],
|
|
2046
2050
|
setup(e) {
|
|
2047
|
-
let t = e, { isDark: n } =
|
|
2051
|
+
let t = e, { isDark: n } = W(), i = r(() => {
|
|
2048
2052
|
let e = {
|
|
2049
2053
|
emerald: {
|
|
2050
2054
|
dark: "text-emerald-400 hover:bg-emerald-500/10",
|
|
@@ -2137,7 +2141,7 @@ var on = ["aria-label", "aria-expanded"], sn = { class: "flex flex-col h-full" }
|
|
|
2137
2141
|
},
|
|
2138
2142
|
emits: ["copied", "error"],
|
|
2139
2143
|
setup(e, { emit: t }) {
|
|
2140
|
-
let n = e, a = t, { isDark: s } =
|
|
2144
|
+
let n = e, a = t, { isDark: s } = W(), c = b(!1), l = null, u = r(() => c.value ? "Copied!" : n.label ? `Copy ${n.label}` : "Copy"), d = r(() => n.label ? `Copy ${n.label}` : "Copy"), f = r(() => n.variant === "bordered" ? `inline-flex items-center justify-center w-9 h-9 rounded-lg border transition-colors cursor-pointer shrink-0 ${c.value ? s.value ? "border-emerald-500/40 bg-emerald-500/10 text-emerald-400" : "border-emerald-300 bg-emerald-50 text-emerald-600" : s.value ? "border-gray-600 text-gray-400 hover:text-gray-200 hover:bg-gray-800" : "border-gray-300 text-gray-400 hover:text-gray-600 hover:bg-gray-50"}` : `p-1 rounded transition-colors cursor-pointer ${s.value ? "text-gray-400 hover:text-emerald-300 hover:bg-emerald-500/10" : "text-gray-500 hover:text-emerald-600 hover:bg-emerald-50"}`);
|
|
2141
2145
|
async function p(e) {
|
|
2142
2146
|
try {
|
|
2143
2147
|
if (navigator.clipboard?.writeText) {
|
|
@@ -2207,7 +2211,7 @@ var on = ["aria-label", "aria-expanded"], sn = { class: "flex flex-col h-full" }
|
|
|
2207
2211
|
},
|
|
2208
2212
|
emits: ["click"],
|
|
2209
2213
|
setup(e, { emit: t }) {
|
|
2210
|
-
let n = e, i = t, { isDark: a } =
|
|
2214
|
+
let n = e, i = t, { isDark: a } = W(), l = r(() => n.disabled || n.loading);
|
|
2211
2215
|
function u() {
|
|
2212
2216
|
l.value || i("click");
|
|
2213
2217
|
}
|
|
@@ -2265,7 +2269,7 @@ var on = ["aria-label", "aria-expanded"], sn = { class: "flex flex-col h-full" }
|
|
|
2265
2269
|
},
|
|
2266
2270
|
emits: ["submit", "google-sign-in"],
|
|
2267
2271
|
setup(t, { emit: n }) {
|
|
2268
|
-
let i = t, c = n, { isDark: d } =
|
|
2272
|
+
let i = t, c = n, { isDark: d } = W(), f = Y(), p = b(""), h = b(""), g = b(!1), _ = b(!1), v = r(() => i.loading || i.googleLoading);
|
|
2269
2273
|
function x() {
|
|
2270
2274
|
v.value || c("submit", {
|
|
2271
2275
|
email: p.value,
|
|
@@ -2379,7 +2383,7 @@ var on = ["aria-label", "aria-expanded"], sn = { class: "flex flex-col h-full" }
|
|
|
2379
2383
|
},
|
|
2380
2384
|
emits: ["select"],
|
|
2381
2385
|
setup(c, { emit: d }) {
|
|
2382
|
-
let f = d, { isDark: p } =
|
|
2386
|
+
let f = d, { isDark: p } = W(), h = Y(), { notifications: g, unreadCount: _, open: v, closePanel: b, markAllRead: S, markRead: C } = an(), w = {
|
|
2383
2387
|
info: "bg-sky-500",
|
|
2384
2388
|
success: "bg-emerald-500",
|
|
2385
2389
|
warning: "bg-amber-500",
|
|
@@ -2388,7 +2392,7 @@ var on = ["aria-label", "aria-expanded"], sn = { class: "flex flex-col h-full" }
|
|
|
2388
2392
|
function O(e) {
|
|
2389
2393
|
C(e), f("select", e);
|
|
2390
2394
|
}
|
|
2391
|
-
return
|
|
2395
|
+
return Ot(() => {
|
|
2392
2396
|
v.value && b();
|
|
2393
2397
|
}), (r, d) => (y(), i(t, { to: "body" }, [u(n, {
|
|
2394
2398
|
"enter-active-class": "transition-opacity duration-200",
|
|
@@ -2421,7 +2425,7 @@ var on = ["aria-label", "aria-expanded"], sn = { class: "flex flex-col h-full" }
|
|
|
2421
2425
|
onClick: d[1] ||= (...e) => E(b) && E(b)(...e),
|
|
2422
2426
|
"aria-label": "Close notifications",
|
|
2423
2427
|
class: m(["p-1.5 rounded-lg cursor-pointer transition-colors focus:outline-none focus-visible:ring-2 focus-visible:ring-emerald-500", E(p) ? "text-gray-400 hover:bg-gray-800" : "text-gray-500 hover:bg-gray-100"])
|
|
2424
|
-
}, [u(E(
|
|
2428
|
+
}, [u(E(I), {
|
|
2425
2429
|
class: "w-5 h-5",
|
|
2426
2430
|
"aria-hidden": "true"
|
|
2427
2431
|
})], 2)], 2),
|
|
@@ -2457,10 +2461,170 @@ var on = ["aria-label", "aria-expanded"], sn = { class: "flex flex-col h-full" }
|
|
|
2457
2461
|
_: 1
|
|
2458
2462
|
})]));
|
|
2459
2463
|
}
|
|
2464
|
+
}), mr = ["value", "type"], hr = /* @__PURE__ */ d({
|
|
2465
|
+
__name: "BaseInput",
|
|
2466
|
+
props: {
|
|
2467
|
+
modelValue: { default: "" },
|
|
2468
|
+
type: { default: "text" },
|
|
2469
|
+
size: { default: "md" },
|
|
2470
|
+
block: {
|
|
2471
|
+
type: Boolean,
|
|
2472
|
+
default: !0
|
|
2473
|
+
}
|
|
2474
|
+
},
|
|
2475
|
+
emits: ["update:modelValue"],
|
|
2476
|
+
setup(e, { emit: t }) {
|
|
2477
|
+
let n = t;
|
|
2478
|
+
function r(e) {
|
|
2479
|
+
n("update:modelValue", e.target.value);
|
|
2480
|
+
}
|
|
2481
|
+
return (t, n) => (y(), o("input", {
|
|
2482
|
+
value: e.modelValue,
|
|
2483
|
+
type: e.type,
|
|
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
|
+
onInput: r
|
|
2486
|
+
}, null, 42, mr));
|
|
2487
|
+
}
|
|
2488
|
+
}), gr = ["value"], _r = /* @__PURE__ */ d({
|
|
2489
|
+
__name: "BaseSelect",
|
|
2490
|
+
props: {
|
|
2491
|
+
modelValue: { default: void 0 },
|
|
2492
|
+
size: { default: "sm" },
|
|
2493
|
+
block: {
|
|
2494
|
+
type: Boolean,
|
|
2495
|
+
default: !0
|
|
2496
|
+
}
|
|
2497
|
+
},
|
|
2498
|
+
emits: ["update:modelValue"],
|
|
2499
|
+
setup(e, { emit: t }) {
|
|
2500
|
+
let n = t;
|
|
2501
|
+
function r(e) {
|
|
2502
|
+
n("update:modelValue", e.target.value);
|
|
2503
|
+
}
|
|
2504
|
+
return (t, n) => (y(), o("select", {
|
|
2505
|
+
value: e.modelValue,
|
|
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
|
+
onChange: r
|
|
2508
|
+
}, [S(t.$slots, "default")], 42, gr));
|
|
2509
|
+
}
|
|
2510
|
+
}), vr = ["role", "aria-label"], yr = [
|
|
2511
|
+
"aria-pressed",
|
|
2512
|
+
"title",
|
|
2513
|
+
"onClick"
|
|
2514
|
+
], br = "bg-slate-50 dark:bg-slate-900 text-slate-600 dark:text-slate-300 hover:bg-slate-100 dark:hover:bg-slate-800", xr = /* @__PURE__ */ d({
|
|
2515
|
+
__name: "BaseSegmentedControl",
|
|
2516
|
+
props: {
|
|
2517
|
+
options: {},
|
|
2518
|
+
modelValue: {},
|
|
2519
|
+
variant: { default: "base" },
|
|
2520
|
+
ariaLabel: { default: "" },
|
|
2521
|
+
optionClass: {
|
|
2522
|
+
type: Function,
|
|
2523
|
+
default: void 0
|
|
2524
|
+
}
|
|
2525
|
+
},
|
|
2526
|
+
emits: ["update:modelValue"],
|
|
2527
|
+
setup(t, { emit: n }) {
|
|
2528
|
+
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
|
+
function u(e) {
|
|
2530
|
+
let t = e.value === i.modelValue;
|
|
2531
|
+
return i.optionClass ? i.optionClass(e, t) : t ? l.value : br;
|
|
2532
|
+
}
|
|
2533
|
+
return (n, r) => (y(), o("div", {
|
|
2534
|
+
role: t.ariaLabel ? "group" : void 0,
|
|
2535
|
+
"aria-label": t.ariaLabel || void 0,
|
|
2536
|
+
class: m(s.value)
|
|
2537
|
+
}, [(y(!0), o(e, null, x(t.options, (e) => (y(), o("button", {
|
|
2538
|
+
key: String(e.value),
|
|
2539
|
+
type: "button",
|
|
2540
|
+
class: m([c.value, u(e)]),
|
|
2541
|
+
"aria-pressed": e.value === t.modelValue,
|
|
2542
|
+
title: e.title,
|
|
2543
|
+
onClick: (t) => a("update:modelValue", e.value)
|
|
2544
|
+
}, T(e.label), 11, yr))), 128))], 10, vr));
|
|
2545
|
+
}
|
|
2546
|
+
}), Sr = { class: "w-full text-sm" }, Cr = { class: "bg-slate-50 dark:bg-slate-800/60 text-slate-600 dark:text-slate-300" }, wr = { class: "text-left" }, Tr = { key: 0 }, Er = ["colspan"], Dr = /* @__PURE__ */ d({
|
|
2547
|
+
__name: "BaseTable",
|
|
2548
|
+
props: {
|
|
2549
|
+
columns: {},
|
|
2550
|
+
empty: {
|
|
2551
|
+
type: Boolean,
|
|
2552
|
+
default: !1
|
|
2553
|
+
},
|
|
2554
|
+
emptyText: { default: "No rows." }
|
|
2555
|
+
},
|
|
2556
|
+
setup(t) {
|
|
2557
|
+
return (n, r) => (y(), o("table", Sr, [s("thead", Cr, [s("tr", wr, [(y(!0), o(e, null, x(t.columns, (e, t) => (y(), o("th", {
|
|
2558
|
+
key: t,
|
|
2559
|
+
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", Tr, [s("td", {
|
|
2561
|
+
colspan: t.columns.length,
|
|
2562
|
+
class: "px-4 py-12 text-center text-slate-500"
|
|
2563
|
+
}, [S(n.$slots, "empty", {}, () => [l(T(t.emptyText), 1)])], 8, Er)])) : a("", !0), S(n.$slots, "default")])]));
|
|
2564
|
+
}
|
|
2565
|
+
}), Or = { class: "grid gap-3 md:grid-cols-2" }, kr = {
|
|
2566
|
+
key: 0,
|
|
2567
|
+
class: "block text-[11px] uppercase tracking-wide text-slate-500 mb-1"
|
|
2568
|
+
}, Ar = ["value"], jr = {
|
|
2569
|
+
key: 2,
|
|
2570
|
+
class: "flex items-center gap-2 mt-4"
|
|
2571
|
+
}, Mr = ["checked", "onChange"], Nr = { class: "text-sm text-slate-900 dark:text-slate-100" }, Pr = {
|
|
2572
|
+
key: 4,
|
|
2573
|
+
class: "text-[11px] text-slate-400 mt-1"
|
|
2574
|
+
}, Fr = /* @__PURE__ */ d({
|
|
2575
|
+
__name: "BaseSpecFields",
|
|
2576
|
+
props: {
|
|
2577
|
+
specs: {},
|
|
2578
|
+
params: {}
|
|
2579
|
+
},
|
|
2580
|
+
emits: ["update"],
|
|
2581
|
+
setup(t, { emit: n }) {
|
|
2582
|
+
let r = n;
|
|
2583
|
+
function c(e, t) {
|
|
2584
|
+
r("update", e, t.target.checked);
|
|
2585
|
+
}
|
|
2586
|
+
function l(e, t) {
|
|
2587
|
+
let n = parseFloat(t);
|
|
2588
|
+
r("update", e, Number.isNaN(n) ? t : n);
|
|
2589
|
+
}
|
|
2590
|
+
return (n, u) => (y(), o("div", Or, [(y(!0), o(e, null, x(t.specs, (u) => (y(), o("div", { key: u.key }, [
|
|
2591
|
+
u.type === "boolean" ? a("", !0) : (y(), o("label", kr, T(u.label), 1)),
|
|
2592
|
+
u.type === "select" ? (y(), i(_r, {
|
|
2593
|
+
key: 1,
|
|
2594
|
+
modelValue: String(t.params[u.key] ?? ""),
|
|
2595
|
+
"onUpdate:modelValue": (e) => r("update", u.key, e)
|
|
2596
|
+
}, {
|
|
2597
|
+
default: M(() => [(y(!0), o(e, null, x(u.options ?? [], (e) => (y(), o("option", {
|
|
2598
|
+
key: e,
|
|
2599
|
+
value: e
|
|
2600
|
+
}, T(e), 9, Ar))), 128))]),
|
|
2601
|
+
_: 2
|
|
2602
|
+
}, 1032, ["modelValue", "onUpdate:modelValue"])) : u.type === "boolean" ? (y(), o("label", jr, [s("input", {
|
|
2603
|
+
checked: !!t.params[u.key],
|
|
2604
|
+
type: "checkbox",
|
|
2605
|
+
class: "h-4 w-4",
|
|
2606
|
+
onChange: (e) => c(u.key, e)
|
|
2607
|
+
}, null, 40, Mr), s("span", Nr, T(u.label), 1)])) : (y(), i(hr, {
|
|
2608
|
+
key: 3,
|
|
2609
|
+
modelValue: t.params[u.key],
|
|
2610
|
+
type: "number",
|
|
2611
|
+
step: u.step ?? (u.type === "integer" ? 1 : .01),
|
|
2612
|
+
min: u.min ?? void 0,
|
|
2613
|
+
"onUpdate:modelValue": (e) => l(u.key, e)
|
|
2614
|
+
}, null, 8, [
|
|
2615
|
+
"modelValue",
|
|
2616
|
+
"step",
|
|
2617
|
+
"min",
|
|
2618
|
+
"onUpdate:modelValue"
|
|
2619
|
+
])),
|
|
2620
|
+
u.help ? (y(), o("p", Pr, T(u.help), 1)) : a("", !0),
|
|
2621
|
+
S(n.$slots, "after", { spec: u })
|
|
2622
|
+
]))), 128))]));
|
|
2623
|
+
}
|
|
2460
2624
|
});
|
|
2461
2625
|
//#endregion
|
|
2462
2626
|
//#region src/composables/useDebounce.ts
|
|
2463
|
-
function
|
|
2627
|
+
function Ir(e, t = 300) {
|
|
2464
2628
|
let n = b(e.value), r = null;
|
|
2465
2629
|
return j(e, (e) => {
|
|
2466
2630
|
r && clearTimeout(r), r = setTimeout(() => {
|
|
@@ -2472,12 +2636,12 @@ function mr(e, t = 300) {
|
|
|
2472
2636
|
}
|
|
2473
2637
|
//#endregion
|
|
2474
2638
|
//#region src/composables/useToast.ts
|
|
2475
|
-
function
|
|
2476
|
-
let t = b(!1), n = b(""), r = b(
|
|
2639
|
+
function Lr(e = 3e3) {
|
|
2640
|
+
let t = b(!1), n = b(""), r = b(q.SUCCESS), i = null;
|
|
2477
2641
|
function a() {
|
|
2478
2642
|
i &&= (clearTimeout(i), null);
|
|
2479
2643
|
}
|
|
2480
|
-
function o(o, s =
|
|
2644
|
+
function o(o, s = q.SUCCESS, c = e) {
|
|
2481
2645
|
n.value = o, r.value = s, t.value = !0, a(), i = setTimeout(() => {
|
|
2482
2646
|
t.value = !1, i = null;
|
|
2483
2647
|
}, c);
|
|
@@ -2493,16 +2657,16 @@ function hr(e = 3e3) {
|
|
|
2493
2657
|
}
|
|
2494
2658
|
//#endregion
|
|
2495
2659
|
//#region src/enums/BaseBadgeEnum.ts
|
|
2496
|
-
var
|
|
2660
|
+
var Rr = /* @__PURE__ */ function(e) {
|
|
2497
2661
|
return e.WIN = "WIN", e.LOSE = "LOSE", e;
|
|
2498
|
-
}({}),
|
|
2662
|
+
}({}), zr = {
|
|
2499
2663
|
GET: "bg-blue-600",
|
|
2500
2664
|
POST: "bg-emerald-600",
|
|
2501
2665
|
PUT: "bg-amber-600",
|
|
2502
2666
|
DELETE: "bg-red-600",
|
|
2503
2667
|
PATCH: "bg-purple-600",
|
|
2504
2668
|
HEAD: "bg-gray-600"
|
|
2505
|
-
},
|
|
2669
|
+
}, Br = {
|
|
2506
2670
|
GET: "bg-blue-500",
|
|
2507
2671
|
POST: "bg-green-500",
|
|
2508
2672
|
PUT: "bg-yellow-500",
|
|
@@ -2510,23 +2674,23 @@ var gr = /* @__PURE__ */ function(e) {
|
|
|
2510
2674
|
PATCH: "bg-purple-500",
|
|
2511
2675
|
HEAD: "bg-gray-500"
|
|
2512
2676
|
};
|
|
2513
|
-
function
|
|
2514
|
-
return e ?
|
|
2677
|
+
function Vr(e) {
|
|
2678
|
+
return e ? zr[e.toUpperCase()] ?? "bg-gray-600" : "bg-gray-600";
|
|
2515
2679
|
}
|
|
2516
|
-
function
|
|
2517
|
-
return e ?
|
|
2680
|
+
function Hr(e) {
|
|
2681
|
+
return e ? Br[e.toUpperCase()] ?? "bg-gray-500" : "bg-gray-500";
|
|
2518
2682
|
}
|
|
2519
|
-
function
|
|
2683
|
+
function Ur(e) {
|
|
2520
2684
|
let t = e ?? 0;
|
|
2521
2685
|
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";
|
|
2522
2686
|
}
|
|
2523
|
-
function
|
|
2687
|
+
function Wr(e, t) {
|
|
2524
2688
|
let n = e ?? 200;
|
|
2525
2689
|
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";
|
|
2526
2690
|
}
|
|
2527
2691
|
//#endregion
|
|
2528
2692
|
//#region src/utils/sanitizeHtml.ts
|
|
2529
|
-
var
|
|
2693
|
+
var Gr = /* @__PURE__ */ new Set([
|
|
2530
2694
|
"A",
|
|
2531
2695
|
"B",
|
|
2532
2696
|
"STRONG",
|
|
@@ -2541,7 +2705,7 @@ var Cr = /* @__PURE__ */ new Set([
|
|
|
2541
2705
|
"LI",
|
|
2542
2706
|
"SPAN",
|
|
2543
2707
|
"DIV"
|
|
2544
|
-
]),
|
|
2708
|
+
]), Kr = /* @__PURE__ */ new Set([
|
|
2545
2709
|
"SCRIPT",
|
|
2546
2710
|
"STYLE",
|
|
2547
2711
|
"IFRAME",
|
|
@@ -2549,53 +2713,53 @@ var Cr = /* @__PURE__ */ new Set([
|
|
|
2549
2713
|
"EMBED",
|
|
2550
2714
|
"NOSCRIPT",
|
|
2551
2715
|
"TEMPLATE"
|
|
2552
|
-
]),
|
|
2553
|
-
function
|
|
2716
|
+
]), qr = { A: /* @__PURE__ */ new Set(["href", "title"]) };
|
|
2717
|
+
function Jr(e) {
|
|
2554
2718
|
let t = e.trim().toLowerCase();
|
|
2555
2719
|
return t.startsWith("http://") || t.startsWith("https://") || t.startsWith("mailto:") || t.startsWith("tel:") || t.startsWith("/") || t.startsWith("#") || t === "";
|
|
2556
2720
|
}
|
|
2557
|
-
function
|
|
2721
|
+
function Yr(e) {
|
|
2558
2722
|
if (e.nodeType !== Node.ELEMENT_NODE) return;
|
|
2559
2723
|
let t = e, n = t.tagName.toUpperCase();
|
|
2560
|
-
if (!
|
|
2561
|
-
|
|
2724
|
+
if (!Gr.has(n)) {
|
|
2725
|
+
Kr.has(n) ? t.remove() : t.replaceWith(document.createTextNode(t.textContent ?? ""));
|
|
2562
2726
|
return;
|
|
2563
2727
|
}
|
|
2564
|
-
let r =
|
|
2728
|
+
let r = qr[n] ?? /* @__PURE__ */ new Set();
|
|
2565
2729
|
for (let e of Array.from(t.attributes)) {
|
|
2566
2730
|
if (!r.has(e.name.toLowerCase())) {
|
|
2567
2731
|
t.removeAttribute(e.name);
|
|
2568
2732
|
continue;
|
|
2569
2733
|
}
|
|
2570
|
-
n === "A" && e.name.toLowerCase() === "href" && !
|
|
2734
|
+
n === "A" && e.name.toLowerCase() === "href" && !Jr(e.value) && t.removeAttribute(e.name);
|
|
2571
2735
|
}
|
|
2572
2736
|
n === "A" && t.hasAttribute("href") && (t.setAttribute("rel", "noopener noreferrer"), t.setAttribute("target", "_blank"));
|
|
2573
|
-
for (let e of Array.from(t.childNodes))
|
|
2737
|
+
for (let e of Array.from(t.childNodes)) Yr(e);
|
|
2574
2738
|
}
|
|
2575
|
-
function
|
|
2739
|
+
function Xr(e) {
|
|
2576
2740
|
if (!e) return "";
|
|
2577
2741
|
let t = new DOMParser().parseFromString(`<div>${e}</div>`, "text/html").body.firstElementChild;
|
|
2578
2742
|
if (!t) return "";
|
|
2579
|
-
for (let e of Array.from(t.childNodes))
|
|
2743
|
+
for (let e of Array.from(t.childNodes)) Yr(e);
|
|
2580
2744
|
return t.innerHTML;
|
|
2581
2745
|
}
|
|
2582
2746
|
//#endregion
|
|
2583
2747
|
//#region src/utils/format.ts
|
|
2584
|
-
var
|
|
2585
|
-
function
|
|
2586
|
-
if (e == null || typeof e == "string" && e.trim() === "") return
|
|
2748
|
+
var Zr = "—";
|
|
2749
|
+
function Qr(e, t = 4) {
|
|
2750
|
+
if (e == null || typeof e == "string" && e.trim() === "") return Zr;
|
|
2587
2751
|
let n = typeof e == "string" ? Number(e) : e;
|
|
2588
2752
|
return isFinite(n) ? n.toLocaleString(void 0, {
|
|
2589
2753
|
minimumFractionDigits: t,
|
|
2590
2754
|
maximumFractionDigits: t
|
|
2591
|
-
}) :
|
|
2755
|
+
}) : Zr;
|
|
2592
2756
|
}
|
|
2593
|
-
function
|
|
2594
|
-
if (e == null || e === "") return
|
|
2757
|
+
function $r(e) {
|
|
2758
|
+
if (e == null || e === "") return Zr;
|
|
2595
2759
|
let t = new Date(e);
|
|
2596
2760
|
return isNaN(t.getTime()) ? String(e) : t.toLocaleString();
|
|
2597
2761
|
}
|
|
2598
|
-
function
|
|
2762
|
+
function ei(e) {
|
|
2599
2763
|
return new Date(e).toLocaleString(void 0, {
|
|
2600
2764
|
month: "short",
|
|
2601
2765
|
day: "numeric",
|
|
@@ -2603,13 +2767,13 @@ function Mr(e) {
|
|
|
2603
2767
|
minute: "2-digit"
|
|
2604
2768
|
});
|
|
2605
2769
|
}
|
|
2606
|
-
function
|
|
2770
|
+
function ti(e) {
|
|
2607
2771
|
return new Date(e).toLocaleDateString(void 0, {
|
|
2608
2772
|
month: "short",
|
|
2609
2773
|
day: "numeric"
|
|
2610
2774
|
});
|
|
2611
2775
|
}
|
|
2612
|
-
function
|
|
2776
|
+
function ni(e) {
|
|
2613
2777
|
if (!isFinite(e) || e === 0) return e.toFixed(2);
|
|
2614
2778
|
let t = Math.abs(e), n = 2;
|
|
2615
2779
|
return t < 1e-4 ? n = 8 : t < .01 ? n = 6 : t < 1 ? n = 4 : t < 100 && (n = 3), e.toLocaleString(void 0, {
|
|
@@ -2617,15 +2781,15 @@ function Pr(e) {
|
|
|
2617
2781
|
maximumFractionDigits: n
|
|
2618
2782
|
});
|
|
2619
2783
|
}
|
|
2620
|
-
function
|
|
2784
|
+
function ri(e, t = 2) {
|
|
2621
2785
|
return `${e >= 0 ? "+" : ""}${e.toFixed(t)}%`;
|
|
2622
2786
|
}
|
|
2623
|
-
function
|
|
2787
|
+
function ii(e) {
|
|
2624
2788
|
return `${e < 0 ? "-" : "+"}$${Math.abs(e).toFixed(2)}`;
|
|
2625
2789
|
}
|
|
2626
2790
|
//#endregion
|
|
2627
2791
|
//#region src/utils/pnl.ts
|
|
2628
|
-
function
|
|
2792
|
+
function ai(e) {
|
|
2629
2793
|
if (e.buyPrice == null || e.lastPrice == null || e.filledQty == null) return {
|
|
2630
2794
|
pnlUsd: null,
|
|
2631
2795
|
pnlPct: null
|
|
@@ -2640,4 +2804,4 @@ function Lr(e) {
|
|
|
2640
2804
|
};
|
|
2641
2805
|
}
|
|
2642
2806
|
//#endregion
|
|
2643
|
-
export {
|
|
2807
|
+
export { L as AlertEnum, Hn as BaseActionButton, Ee as BaseAlert, Mn as BaseAppLayout, z as BaseBadge, Rr as BaseBadgeEnum, je as BaseBreadcrumb, Ue as BaseButton, B as BaseButtonEnum, V as BaseButtonSizeEnum, Bt as BaseCollapsibleSection, Wt as BaseConfirmModal, Wn as BaseCopyButton, kn as BaseEntityPickerModal, Jn as BaseGoogleSignInButton, hr as BaseInput, qe as BaseLine, Je as BaseLoginEnum, or as BaseLoginForm, Xe as BaseLogo, K as BaseLogoEnum, rt as BaseModal, Ze as BaseModalEnum, Lt as BaseModalShell, Zt as BaseNotFoundPage, pr as BaseNotificationPanel, In as BasePageHeader, it as BaseRow, xr as BaseSegmentedControl, _r as BaseSelect, gn as BaseSidebar, Fr as BaseSpecFields, at as BaseSpinner, Dr as BaseTable, Jt as BaseTextInputModal, ct as BaseToast, q as BaseToastEnum, zn as BaseToolbarButton, ut as ColoredSquares, R as ColorsEnums, pt as EarningsCard, vt as EuroAmount, G as LineEnum, St as Pagination, J as PositioningEnum, Dt as TrendArrow, ai as computePnL, $r as fmtDate, ti as fmtDateShort, ei as fmtDateTime, Qr as fmtNumber, ri as fmtPct, ni as fmtPrice, ii as fmtUsd, Ce as getBaseColor, we as getBaseColorOf, Pe as initTheme, Jr as isSafeHref, Hr as methodBadgeBright, Vr as methodBadgeSolid, Xr as sanitizeHtml, Ur as statusBadgeSolid, Wr as statusBadgeTinted, Ir as useDebouncedRef, Ot as useEscapeKey, Qt as useMobileSidebar, an as useNotifications, nn as useSidebarCollapse, W as useTheme, Y as useThemeClasses, Lr as useToast };
|