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