mgv-backoffice 1.33.0 → 1.35.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 +84 -2
- package/dist/components/BaseCodeBlock.vue.d.ts +17 -0
- package/dist/components/BasePillPickerModal.vue.d.ts +43 -0
- package/dist/components/BaseToolbarButton.vue.d.ts +1 -1
- package/dist/composables/usePolling.d.ts +31 -0
- package/dist/composables/useThemeClasses.d.ts +27 -24
- package/dist/index.d.ts +7 -1
- package/dist/types/pillPicker.d.ts +14 -0
- package/dist/ui-lib.css +1 -1
- package/dist/ui-lib.js +825 -609
- package/dist/ui-lib.umd.cjs +1 -1
- package/dist/utils/format.d.ts +12 -0
- package/dist/utils/validate.d.ts +35 -0
- package/package.json +1 -1
- package/src/components/BaseCodeBlock.test.ts +70 -0
- package/src/components/BaseCodeBlock.vue +74 -0
- package/src/components/BasePillPickerModal.test.ts +95 -0
- package/src/components/BasePillPickerModal.vue +0 -0
- package/src/components/BaseToolbarButton.test.ts +48 -0
- package/src/components/BaseToolbarButton.vue +21 -6
- package/src/composables/usePolling.test.ts +112 -0
- package/src/composables/usePolling.ts +90 -0
- package/src/composables/useThemeClasses.test.ts +34 -0
- package/src/composables/useThemeClasses.ts +30 -26
- package/src/index.ts +13 -0
- package/src/types/pillPicker.ts +14 -0
- package/src/utils/format.test.ts +29 -0
- package/src/utils/format.ts +28 -0
- package/src/utils/validate.test.ts +82 -0
- package/src/utils/validate.ts +76 -0
package/dist/ui-lib.js
CHANGED
|
@@ -1,125 +1,125 @@
|
|
|
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, createSlots as c, createStaticVNode as l, createTextVNode as u, createVNode as d, defineComponent as f, effectScope as p, nextTick as m, normalizeClass as h, onBeforeUnmount as g, onMounted as _, onScopeDispose as v, onUnmounted as y, openBlock as b, reactive as x,
|
|
2
|
-
import { ArrowDownIcon as
|
|
3
|
-
import { HomeIcon as
|
|
4
|
-
import { useRoute as
|
|
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, createSlots as c, createStaticVNode as l, createTextVNode as u, createVNode as d, defineComponent as f, effectScope as p, nextTick as m, normalizeClass as h, onBeforeUnmount as g, onMounted as _, onScopeDispose as v, onUnmounted as y, openBlock as b, reactive as x, readonly as S, ref as C, renderList as w, renderSlot as T, resolveComponent as E, resolveDynamicComponent as D, toDisplayString as O, unref as k, useSlots as A, vModelCheckbox as ee, vModelDynamic as j, vModelText as M, vShow as N, watch as P, withCtx as F, withDirectives as I, withKeys as te, withModifiers as L } from "vue";
|
|
2
|
+
import { ArrowDownIcon as ne, ArrowUpIcon as re, Bars3Icon as ie, BellIcon as ae, CheckCircleIcon as oe, ChevronDoubleLeftIcon as se, ChevronDoubleRightIcon as ce, ChevronDownIcon as le, ChevronRightIcon as ue, ClipboardDocumentCheckIcon as de, ClipboardDocumentIcon as fe, DocumentDuplicateIcon as pe, ExclamationCircleIcon as me, ExclamationTriangleIcon as he, FolderIcon as ge, InformationCircleIcon as _e, MagnifyingGlassIcon as ve, MinusIcon as ye, MoonIcon as be, SunIcon as xe, XMarkIcon as Se } from "@heroicons/vue/24/outline";
|
|
3
|
+
import { HomeIcon as Ce } from "@heroicons/vue/24/solid";
|
|
4
|
+
import { useRoute as we, useRouter as Te } from "vue-router";
|
|
5
5
|
//#region src/enums/AlertEnum.ts
|
|
6
|
-
var
|
|
6
|
+
var R = /* @__PURE__ */ function(e) {
|
|
7
7
|
return e.WARNING = "WARNING", e.ERROR = "ERROR", e.SUCCESS = "SUCCESS", e.INFO = "INFO", e;
|
|
8
|
-
}({}),
|
|
9
|
-
function
|
|
10
|
-
if (
|
|
11
|
-
e !==
|
|
8
|
+
}({}), z = C(!1), Ee = !1, B = "mgv-theme";
|
|
9
|
+
function De(e) {
|
|
10
|
+
if (Ee) {
|
|
11
|
+
e !== B && console.warn(`[ui-lib] useTheme: storage key "${e}" ignored — theme already initialized with "${B}". Call initTheme({ storageKey }) before mounting any component.`);
|
|
12
12
|
return;
|
|
13
13
|
}
|
|
14
|
-
if (
|
|
15
|
-
let e = window.localStorage?.getItem(
|
|
16
|
-
e ?
|
|
14
|
+
if (Ee = !0, B = e, typeof window < "u") {
|
|
15
|
+
let e = window.localStorage?.getItem(B);
|
|
16
|
+
e ? z.value = e === "dark" : typeof window.matchMedia == "function" && (z.value = window.matchMedia("(prefers-color-scheme: dark)").matches);
|
|
17
17
|
}
|
|
18
18
|
typeof document < "u" && p(!0).run(() => {
|
|
19
|
-
|
|
20
|
-
document.documentElement.classList.toggle("dark", e), window.localStorage?.setItem(
|
|
19
|
+
P(z, (e) => {
|
|
20
|
+
document.documentElement.classList.toggle("dark", e), window.localStorage?.setItem(B, e ? "dark" : "light");
|
|
21
21
|
}, { immediate: !0 });
|
|
22
22
|
});
|
|
23
23
|
}
|
|
24
|
-
function
|
|
25
|
-
|
|
24
|
+
function Oe(e) {
|
|
25
|
+
De(e?.storageKey ?? B);
|
|
26
26
|
}
|
|
27
|
-
function
|
|
28
|
-
|
|
27
|
+
function V(e) {
|
|
28
|
+
De(e?.storageKey ?? B);
|
|
29
29
|
function t() {
|
|
30
|
-
|
|
30
|
+
z.value = !z.value;
|
|
31
31
|
}
|
|
32
32
|
return {
|
|
33
|
-
isDark:
|
|
33
|
+
isDark: z,
|
|
34
34
|
toggleTheme: t
|
|
35
35
|
};
|
|
36
36
|
}
|
|
37
37
|
//#endregion
|
|
38
38
|
//#region src/components/BaseAlert.vue?vue&type=script&setup=true&lang.ts
|
|
39
|
-
var
|
|
39
|
+
var ke = { class: "min-w-0 flex-1" }, Ae = {
|
|
40
40
|
key: 0,
|
|
41
41
|
class: "font-medium"
|
|
42
|
-
},
|
|
42
|
+
}, je = /* @__PURE__ */ f({
|
|
43
43
|
__name: "BaseAlert",
|
|
44
44
|
props: {
|
|
45
45
|
title: { default: "" },
|
|
46
|
-
color: { default:
|
|
46
|
+
color: { default: R.ERROR },
|
|
47
47
|
compact: {
|
|
48
48
|
type: Boolean,
|
|
49
49
|
default: !1
|
|
50
50
|
}
|
|
51
51
|
},
|
|
52
52
|
setup(e) {
|
|
53
|
-
let t = e, { isDark: n } =
|
|
54
|
-
[
|
|
53
|
+
let t = e, { isDark: n } = V(), c = {
|
|
54
|
+
[R.ERROR]: {
|
|
55
55
|
light: "bg-red-50 border-red-200 text-red-700",
|
|
56
56
|
dark: "bg-red-500/10 border-red-500/30 text-red-300"
|
|
57
57
|
},
|
|
58
|
-
[
|
|
58
|
+
[R.WARNING]: {
|
|
59
59
|
light: "bg-amber-50 border-amber-200 text-amber-700",
|
|
60
60
|
dark: "bg-amber-500/10 border-amber-500/30 text-amber-300"
|
|
61
61
|
},
|
|
62
|
-
[
|
|
62
|
+
[R.SUCCESS]: {
|
|
63
63
|
light: "bg-emerald-50 border-emerald-200 text-emerald-700",
|
|
64
64
|
dark: "bg-emerald-500/10 border-emerald-500/30 text-emerald-300"
|
|
65
65
|
},
|
|
66
|
-
[
|
|
66
|
+
[R.INFO]: {
|
|
67
67
|
light: "bg-sky-50 border-sky-200 text-sky-700",
|
|
68
68
|
dark: "bg-sky-500/10 border-sky-500/30 text-sky-300"
|
|
69
69
|
}
|
|
70
70
|
}, l = r(() => n.value ? c[t.color].dark : c[t.color].light), u = r(() => {
|
|
71
71
|
switch (t.color) {
|
|
72
|
-
case
|
|
73
|
-
case
|
|
74
|
-
case
|
|
75
|
-
default: return
|
|
72
|
+
case R.SUCCESS: return oe;
|
|
73
|
+
case R.WARNING: return he;
|
|
74
|
+
case R.INFO: return _e;
|
|
75
|
+
default: return me;
|
|
76
76
|
}
|
|
77
77
|
}), d = r(() => {
|
|
78
78
|
switch (t.color) {
|
|
79
|
-
case
|
|
80
|
-
case
|
|
81
|
-
case
|
|
79
|
+
case R.SUCCESS: return "text-emerald-500";
|
|
80
|
+
case R.WARNING: return "text-amber-500";
|
|
81
|
+
case R.INFO: return "text-sky-500";
|
|
82
82
|
default: return "text-red-500";
|
|
83
83
|
}
|
|
84
84
|
});
|
|
85
85
|
return (t, n) => (b(), o("div", {
|
|
86
86
|
role: "alert",
|
|
87
87
|
class: h(["flex gap-3 mb-4 rounded-lg border text-sm transition-colors", [e.compact ? "items-start px-3 py-2 text-xs" : "items-start p-4", l.value]])
|
|
88
|
-
}, [(b(), i(
|
|
88
|
+
}, [(b(), i(D(u.value), {
|
|
89
89
|
class: h(["shrink-0", [e.compact ? "w-4 h-4 mt-px" : "w-5 h-5 mt-0.5", d.value]]),
|
|
90
90
|
"aria-hidden": "true"
|
|
91
|
-
}, null, 8, ["class"])), s("div",
|
|
91
|
+
}, null, 8, ["class"])), s("div", ke, [e.title ? (b(), o("p", Ae, O(e.title), 1)) : a("", !0), T(t.$slots, "default")])], 2));
|
|
92
92
|
}
|
|
93
|
-
}),
|
|
93
|
+
}), H = /* @__PURE__ */ function(e) {
|
|
94
94
|
return e.NONE = "NONE", e.RED = "RED", e.YELLOW = "YELLOW", e.BLACK = "BLACK", e.GRAY = "GRAY", e.GREEN = "GREEN", e.BLUE = "BLUE", e;
|
|
95
|
-
}({}),
|
|
95
|
+
}({}), Me = "bg-red-100 text-red-700 border-red-200", Ne = /* @__PURE__ */ f({
|
|
96
96
|
__name: "BaseBadge",
|
|
97
97
|
props: { color: {
|
|
98
98
|
type: String,
|
|
99
99
|
required: !1
|
|
100
100
|
} },
|
|
101
101
|
setup(e) {
|
|
102
|
-
let t =
|
|
103
|
-
[
|
|
104
|
-
[
|
|
105
|
-
[
|
|
106
|
-
[
|
|
107
|
-
[
|
|
108
|
-
[
|
|
109
|
-
[
|
|
110
|
-
}, 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] ||
|
|
102
|
+
let t = A(), n = r(() => !!t.default), i = e, s = {
|
|
103
|
+
[H.RED]: "bg-red-100 text-red-700 border-red-200",
|
|
104
|
+
[H.GREEN]: "bg-green-100 text-green-700 border-green-200",
|
|
105
|
+
[H.BLUE]: "bg-blue-100 text-blue-700 border-blue-200",
|
|
106
|
+
[H.YELLOW]: "bg-yellow-100 text-yellow-700 border-yellow-200",
|
|
107
|
+
[H.GRAY]: "bg-gray-100 text-gray-700 border-gray-200",
|
|
108
|
+
[H.BLACK]: "bg-gray-800 text-gray-100 border-gray-700",
|
|
109
|
+
[H.NONE]: "bg-gray-50 text-gray-600 border-gray-200"
|
|
110
|
+
}, 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] || Me}`);
|
|
111
111
|
return (e, t) => n.value ? (b(), o("span", {
|
|
112
112
|
key: 0,
|
|
113
113
|
class: h(c.value)
|
|
114
|
-
}, [
|
|
114
|
+
}, [T(e.$slots, "default")], 2)) : a("", !0);
|
|
115
115
|
}
|
|
116
|
-
}),
|
|
116
|
+
}), Pe = {
|
|
117
117
|
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",
|
|
118
118
|
"aria-label": "Breadcrumb"
|
|
119
|
-
},
|
|
119
|
+
}, Fe = { class: "inline-flex items-center space-x-1 md:space-x-3" }, Ie = {
|
|
120
120
|
class: "inline-flex items-center",
|
|
121
121
|
style: { "margin-left": "0" }
|
|
122
|
-
},
|
|
122
|
+
}, Le = /* @__PURE__ */ f({
|
|
123
123
|
__name: "BaseBreadcrumb",
|
|
124
124
|
props: {
|
|
125
125
|
items: {
|
|
@@ -143,41 +143,41 @@ var Ae = { class: "min-w-0 flex-1" }, je = {
|
|
|
143
143
|
}));
|
|
144
144
|
});
|
|
145
145
|
return (t, n) => {
|
|
146
|
-
let r =
|
|
147
|
-
return b(), o("nav",
|
|
146
|
+
let r = E("router-link");
|
|
147
|
+
return b(), o("nav", Pe, [s("ol", Fe, [s("li", Ie, [d(r, {
|
|
148
148
|
to: "/",
|
|
149
149
|
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"
|
|
150
150
|
}, {
|
|
151
|
-
default:
|
|
151
|
+
default: F(() => [d(k(Ce), { class: "h-4 w-4 text-gray-500 mr-2" }), n[0] ||= u(" Home ", -1)]),
|
|
152
152
|
_: 1
|
|
153
|
-
})]), (b(!0), o(e, null,
|
|
153
|
+
})]), (b(!0), o(e, null, w(i.value, (e, t) => (b(), o("li", {
|
|
154
154
|
key: t,
|
|
155
155
|
class: "inline-flex items-center",
|
|
156
156
|
style: { "margin-left": "0" }
|
|
157
|
-
}, [d(
|
|
157
|
+
}, [d(k(ue), { class: "h-4 w-4 text-gray-500" }), d(r, {
|
|
158
158
|
to: e.url,
|
|
159
159
|
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"
|
|
160
160
|
}, {
|
|
161
|
-
default:
|
|
161
|
+
default: F(() => [u(O(e.name), 1)]),
|
|
162
162
|
_: 2
|
|
163
163
|
}, 1032, ["to"])]))), 128))])]);
|
|
164
164
|
};
|
|
165
165
|
}
|
|
166
|
-
}),
|
|
166
|
+
}), U = /* @__PURE__ */ function(e) {
|
|
167
167
|
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;
|
|
168
|
-
}({}),
|
|
168
|
+
}({}), W = /* @__PURE__ */ function(e) {
|
|
169
169
|
return e.EXTRA_SMALL = "EXTRA_SMALL", e.SMALL = "SMALL", e.BASE = "BASE", e.LARGE = "LARGE", e.EXTRA_LARGE = "EXTRA_LARGE", e;
|
|
170
|
-
}({}),
|
|
170
|
+
}({}), Re = [
|
|
171
171
|
"type",
|
|
172
172
|
"disabled",
|
|
173
173
|
"onClick"
|
|
174
|
-
],
|
|
174
|
+
], ze = {
|
|
175
175
|
key: 0,
|
|
176
176
|
class: "inline-flex items-center"
|
|
177
|
-
},
|
|
177
|
+
}, Be = { key: 1 }, Ve = { key: 2 }, He = ["type", "disabled"], Ue = {
|
|
178
178
|
key: 0,
|
|
179
179
|
class: "inline-flex items-center"
|
|
180
|
-
},
|
|
180
|
+
}, We = { key: 1 }, Ge = { key: 2 }, G = /* @__PURE__ */ f({
|
|
181
181
|
__name: "BaseButton",
|
|
182
182
|
props: {
|
|
183
183
|
description: {
|
|
@@ -187,7 +187,7 @@ var Ae = { class: "min-w-0 flex-1" }, je = {
|
|
|
187
187
|
color: {
|
|
188
188
|
type: String,
|
|
189
189
|
required: !1,
|
|
190
|
-
default:
|
|
190
|
+
default: U.BLUE
|
|
191
191
|
},
|
|
192
192
|
to: {
|
|
193
193
|
type: String,
|
|
@@ -231,103 +231,103 @@ var Ae = { class: "min-w-0 flex-1" }, je = {
|
|
|
231
231
|
}
|
|
232
232
|
},
|
|
233
233
|
setup(e) {
|
|
234
|
-
let { isDark: t } =
|
|
234
|
+
let { isDark: t } = V(), n = e;
|
|
235
235
|
function r() {
|
|
236
236
|
let e = {
|
|
237
|
-
[
|
|
237
|
+
[U.BLUE]: {
|
|
238
238
|
light: "text-blue-700 border-blue-300 hover:bg-blue-50",
|
|
239
239
|
dark: "text-blue-400 border-blue-500/40 hover:bg-blue-500/10"
|
|
240
240
|
},
|
|
241
|
-
[
|
|
241
|
+
[U.GREEN]: {
|
|
242
242
|
light: "text-green-700 border-green-300 hover:bg-green-50",
|
|
243
243
|
dark: "text-green-400 border-green-500/40 hover:bg-green-500/10"
|
|
244
244
|
},
|
|
245
|
-
[
|
|
245
|
+
[U.EMERALD]: {
|
|
246
246
|
light: "text-emerald-700 border-emerald-300 hover:bg-emerald-50",
|
|
247
247
|
dark: "text-emerald-400 border-emerald-500/40 hover:bg-emerald-500/10"
|
|
248
248
|
},
|
|
249
|
-
[
|
|
249
|
+
[U.RED]: {
|
|
250
250
|
light: "text-red-700 border-red-300 hover:bg-red-50",
|
|
251
251
|
dark: "text-red-400 border-red-500/40 hover:bg-red-500/10"
|
|
252
252
|
},
|
|
253
|
-
[
|
|
253
|
+
[U.YELLOW]: {
|
|
254
254
|
light: "text-yellow-700 border-yellow-300 hover:bg-yellow-50",
|
|
255
255
|
dark: "text-yellow-400 border-yellow-500/40 hover:bg-yellow-500/10"
|
|
256
256
|
},
|
|
257
|
-
[
|
|
257
|
+
[U.PURPLE]: {
|
|
258
258
|
light: "text-purple-700 border-purple-300 hover:bg-purple-50",
|
|
259
259
|
dark: "text-purple-400 border-purple-500/40 hover:bg-purple-500/10"
|
|
260
260
|
},
|
|
261
|
-
[
|
|
261
|
+
[U.SKY]: {
|
|
262
262
|
light: "text-sky-700 border-sky-300 hover:bg-sky-50",
|
|
263
263
|
dark: "text-sky-400 border-sky-500/40 hover:bg-sky-500/10"
|
|
264
264
|
},
|
|
265
|
-
[
|
|
265
|
+
[U.AMBER]: {
|
|
266
266
|
light: "text-amber-700 border-amber-300 hover:bg-amber-50",
|
|
267
267
|
dark: "text-amber-400 border-amber-500/40 hover:bg-amber-500/10"
|
|
268
268
|
},
|
|
269
|
-
[
|
|
269
|
+
[U.GRAY]: {
|
|
270
270
|
light: "text-gray-700 border-gray-300 hover:bg-gray-50",
|
|
271
271
|
dark: "text-gray-300 border-gray-600 hover:bg-gray-800"
|
|
272
272
|
},
|
|
273
|
-
[
|
|
273
|
+
[U.DARK]: {
|
|
274
274
|
light: "text-gray-700 border-gray-300 hover:bg-gray-50",
|
|
275
275
|
dark: "text-gray-300 border-gray-600 hover:bg-gray-800"
|
|
276
276
|
},
|
|
277
|
-
[
|
|
277
|
+
[U.WHITE]: {
|
|
278
278
|
light: "text-gray-700 border-gray-300 hover:bg-gray-50",
|
|
279
279
|
dark: "text-gray-300 border-gray-600 hover:bg-gray-800"
|
|
280
280
|
}
|
|
281
|
-
}, r = e[n.color] ?? e[
|
|
281
|
+
}, r = e[n.color] ?? e[U.BLUE], i = t.value ? r.dark : r.light;
|
|
282
282
|
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}`;
|
|
283
283
|
}
|
|
284
284
|
function c() {
|
|
285
285
|
let e = {
|
|
286
|
-
[
|
|
286
|
+
[U.BLUE]: {
|
|
287
287
|
light: "text-blue-600 hover:bg-blue-50",
|
|
288
288
|
dark: "text-blue-400 hover:bg-blue-500/10"
|
|
289
289
|
},
|
|
290
|
-
[
|
|
290
|
+
[U.GREEN]: {
|
|
291
291
|
light: "text-green-600 hover:bg-green-50",
|
|
292
292
|
dark: "text-green-400 hover:bg-green-500/10"
|
|
293
293
|
},
|
|
294
|
-
[
|
|
294
|
+
[U.EMERALD]: {
|
|
295
295
|
light: "text-emerald-600 hover:bg-emerald-50",
|
|
296
296
|
dark: "text-emerald-400 hover:bg-emerald-500/10"
|
|
297
297
|
},
|
|
298
|
-
[
|
|
298
|
+
[U.SKY]: {
|
|
299
299
|
light: "text-sky-600 hover:bg-sky-50",
|
|
300
300
|
dark: "text-sky-400 hover:bg-sky-500/10"
|
|
301
301
|
},
|
|
302
|
-
[
|
|
302
|
+
[U.RED]: {
|
|
303
303
|
light: "text-red-500 hover:bg-red-50",
|
|
304
304
|
dark: "text-red-400 hover:bg-red-500/10"
|
|
305
305
|
},
|
|
306
|
-
[
|
|
306
|
+
[U.AMBER]: {
|
|
307
307
|
light: "text-amber-700 hover:bg-amber-50",
|
|
308
308
|
dark: "text-amber-300 hover:bg-amber-500/10"
|
|
309
309
|
},
|
|
310
|
-
[
|
|
310
|
+
[U.YELLOW]: {
|
|
311
311
|
light: "text-yellow-600 hover:bg-yellow-50",
|
|
312
312
|
dark: "text-yellow-400 hover:bg-yellow-500/10"
|
|
313
313
|
},
|
|
314
|
-
[
|
|
314
|
+
[U.PURPLE]: {
|
|
315
315
|
light: "text-purple-600 hover:bg-purple-50",
|
|
316
316
|
dark: "text-purple-400 hover:bg-purple-500/10"
|
|
317
317
|
},
|
|
318
|
-
[
|
|
318
|
+
[U.GRAY]: {
|
|
319
319
|
light: "text-gray-500 hover:bg-gray-100",
|
|
320
320
|
dark: "text-gray-400 hover:bg-gray-800"
|
|
321
321
|
},
|
|
322
|
-
[
|
|
322
|
+
[U.DARK]: {
|
|
323
323
|
light: "text-gray-500 hover:bg-gray-100",
|
|
324
324
|
dark: "text-gray-400 hover:bg-gray-800"
|
|
325
325
|
},
|
|
326
|
-
[
|
|
326
|
+
[U.WHITE]: {
|
|
327
327
|
light: "text-gray-500 hover:bg-gray-100",
|
|
328
328
|
dark: "text-gray-400 hover:bg-gray-800"
|
|
329
329
|
}
|
|
330
|
-
}, r = e[n.color] ?? e[
|
|
330
|
+
}, r = e[n.color] ?? e[U.GRAY], i = t.value ? r.dark : r.light;
|
|
331
331
|
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`;
|
|
332
332
|
}
|
|
333
333
|
function l() {
|
|
@@ -335,37 +335,37 @@ var Ae = { class: "min-w-0 flex-1" }, je = {
|
|
|
335
335
|
e || (t += " cursor-pointer");
|
|
336
336
|
let i;
|
|
337
337
|
switch (n.color) {
|
|
338
|
-
case
|
|
338
|
+
case U.BLUE:
|
|
339
339
|
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";
|
|
340
340
|
break;
|
|
341
|
-
case
|
|
341
|
+
case U.WHITE:
|
|
342
342
|
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";
|
|
343
343
|
break;
|
|
344
|
-
case
|
|
344
|
+
case U.DARK:
|
|
345
345
|
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";
|
|
346
346
|
break;
|
|
347
|
-
case
|
|
347
|
+
case U.GREEN:
|
|
348
348
|
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";
|
|
349
349
|
break;
|
|
350
|
-
case
|
|
350
|
+
case U.EMERALD:
|
|
351
351
|
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";
|
|
352
352
|
break;
|
|
353
|
-
case
|
|
353
|
+
case U.RED:
|
|
354
354
|
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";
|
|
355
355
|
break;
|
|
356
|
-
case
|
|
356
|
+
case U.YELLOW:
|
|
357
357
|
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";
|
|
358
358
|
break;
|
|
359
|
-
case
|
|
359
|
+
case U.PURPLE:
|
|
360
360
|
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";
|
|
361
361
|
break;
|
|
362
|
-
case
|
|
362
|
+
case U.SKY:
|
|
363
363
|
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";
|
|
364
364
|
break;
|
|
365
|
-
case
|
|
365
|
+
case U.AMBER:
|
|
366
366
|
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";
|
|
367
367
|
break;
|
|
368
|
-
case
|
|
368
|
+
case U.GRAY:
|
|
369
369
|
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";
|
|
370
370
|
break;
|
|
371
371
|
default:
|
|
@@ -375,19 +375,19 @@ var Ae = { class: "min-w-0 flex-1" }, je = {
|
|
|
375
375
|
n.outline && (i = r()), n.ghost && (i = c());
|
|
376
376
|
let a = "px-5 py-2.5 mr-2 mb-2 text-sm";
|
|
377
377
|
switch (n.size) {
|
|
378
|
-
case
|
|
378
|
+
case W.EXTRA_SMALL:
|
|
379
379
|
a = "px-3 py-2 text-xs";
|
|
380
380
|
break;
|
|
381
|
-
case
|
|
381
|
+
case W.SMALL:
|
|
382
382
|
a = "px-3 py-2 text-sm";
|
|
383
383
|
break;
|
|
384
|
-
case
|
|
384
|
+
case W.BASE:
|
|
385
385
|
a = "px-5 py-2.5 text-sm";
|
|
386
386
|
break;
|
|
387
|
-
case
|
|
387
|
+
case W.LARGE:
|
|
388
388
|
a = "px-5 py-3 text-base";
|
|
389
389
|
break;
|
|
390
|
-
case
|
|
390
|
+
case W.EXTRA_LARGE:
|
|
391
391
|
a = "px-6 py-3.5 text-base";
|
|
392
392
|
break;
|
|
393
393
|
}
|
|
@@ -395,19 +395,19 @@ var Ae = { class: "min-w-0 flex-1" }, je = {
|
|
|
395
395
|
return n.isRounded && (o = "rounded-full"), t + " " + a + " " + i + " font-medium " + o;
|
|
396
396
|
}
|
|
397
397
|
return (t, r) => {
|
|
398
|
-
let c =
|
|
398
|
+
let c = E("router-link");
|
|
399
399
|
return e.to ? (b(), i(c, {
|
|
400
400
|
key: 0,
|
|
401
401
|
to: e.to,
|
|
402
402
|
custom: ""
|
|
403
403
|
}, {
|
|
404
|
-
default:
|
|
404
|
+
default: F(({ navigate: i }) => [s("button", {
|
|
405
405
|
type: n.type,
|
|
406
406
|
class: h(l()),
|
|
407
407
|
disabled: e.isDisable || e.isLoading,
|
|
408
408
|
onClick: i
|
|
409
409
|
}, [
|
|
410
|
-
e.isLoading ? (b(), o("div",
|
|
410
|
+
e.isLoading ? (b(), o("div", ze, [...r[0] ||= [s("svg", {
|
|
411
411
|
"aria-hidden": "true",
|
|
412
412
|
role: "status",
|
|
413
413
|
class: "inline w-4 h-4 me-3 animate-spin",
|
|
@@ -421,10 +421,10 @@ var Ae = { class: "min-w-0 flex-1" }, je = {
|
|
|
421
421
|
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",
|
|
422
422
|
fill: "currentColor"
|
|
423
423
|
})], -1)]])) : a("", !0),
|
|
424
|
-
e.iconLeft ? a("", !0) : (b(), o("span",
|
|
425
|
-
|
|
426
|
-
e.iconLeft ? (b(), o("span",
|
|
427
|
-
], 10,
|
|
424
|
+
e.iconLeft ? a("", !0) : (b(), o("span", Be, O(e.description), 1)),
|
|
425
|
+
T(t.$slots, "default"),
|
|
426
|
+
e.iconLeft ? (b(), o("span", Ve, O(e.description), 1)) : a("", !0)
|
|
427
|
+
], 10, Re)]),
|
|
428
428
|
_: 3
|
|
429
429
|
}, 8, ["to"])) : (b(), o("button", {
|
|
430
430
|
key: 1,
|
|
@@ -432,7 +432,7 @@ var Ae = { class: "min-w-0 flex-1" }, je = {
|
|
|
432
432
|
class: h(l()),
|
|
433
433
|
disabled: e.isDisable || e.isLoading
|
|
434
434
|
}, [
|
|
435
|
-
e.isLoading ? (b(), o("div",
|
|
435
|
+
e.isLoading ? (b(), o("div", Ue, [...r[1] ||= [s("svg", {
|
|
436
436
|
"aria-hidden": "true",
|
|
437
437
|
role: "status",
|
|
438
438
|
class: "inline w-4 h-4 me-3 animate-spin",
|
|
@@ -446,13 +446,13 @@ var Ae = { class: "min-w-0 flex-1" }, je = {
|
|
|
446
446
|
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",
|
|
447
447
|
fill: "currentColor"
|
|
448
448
|
})], -1)]])) : a("", !0),
|
|
449
|
-
e.iconLeft ? a("", !0) : (b(), o("span",
|
|
450
|
-
|
|
451
|
-
e.iconLeft ? (b(), o("span",
|
|
452
|
-
], 10,
|
|
449
|
+
e.iconLeft ? a("", !0) : (b(), o("span", We, O(e.description), 1)),
|
|
450
|
+
T(t.$slots, "default"),
|
|
451
|
+
e.iconLeft ? (b(), o("span", Ge, O(e.description), 1)) : a("", !0)
|
|
452
|
+
], 10, He));
|
|
453
453
|
};
|
|
454
454
|
}
|
|
455
|
-
}),
|
|
455
|
+
}), Ke = /* @__PURE__ */ function(e) {
|
|
456
456
|
return e.BASE = "BASE", e.BASE_SHORTER = "BASE_SHORTER", e.SQUARE = "SQUARE", e;
|
|
457
457
|
}({}), qe = {
|
|
458
458
|
key: 0,
|
|
@@ -468,48 +468,48 @@ var Ae = { class: "min-w-0 flex-1" }, je = {
|
|
|
468
468
|
props: { mode: {
|
|
469
469
|
type: String,
|
|
470
470
|
required: !1,
|
|
471
|
-
default:
|
|
471
|
+
default: Ke.BASE
|
|
472
472
|
} },
|
|
473
473
|
setup(t) {
|
|
474
474
|
return (n, r) => (b(), o(e, null, [
|
|
475
|
-
t.mode ===
|
|
476
|
-
t.mode ===
|
|
477
|
-
t.mode ===
|
|
475
|
+
t.mode === k(Ke).BASE ? (b(), o("hr", qe)) : a("", !0),
|
|
476
|
+
t.mode === k(Ke).BASE_SHORTER ? (b(), o("hr", Je)) : a("", !0),
|
|
477
|
+
t.mode === k(Ke).SQUARE ? (b(), o("hr", Ye)) : a("", !0)
|
|
478
478
|
], 64));
|
|
479
479
|
}
|
|
480
|
-
}),
|
|
480
|
+
}), K = /* @__PURE__ */ function(e) {
|
|
481
481
|
return e.SMALL = "SMALL", e.MEDIUM = "MEDIUM", e.LARGE = "LARGE", e;
|
|
482
|
-
}({}), Ze =
|
|
482
|
+
}({}), Ze = K, Qe = ["height", "width"], $e = /* @__PURE__ */ f({
|
|
483
483
|
__name: "BaseLogo",
|
|
484
484
|
props: { size: {
|
|
485
485
|
type: String,
|
|
486
486
|
required: !1,
|
|
487
|
-
default:
|
|
487
|
+
default: K.MEDIUM
|
|
488
488
|
} },
|
|
489
489
|
setup(e) {
|
|
490
490
|
let t = e;
|
|
491
491
|
function n() {
|
|
492
492
|
let e = "";
|
|
493
493
|
switch (t.size) {
|
|
494
|
-
case
|
|
494
|
+
case K.SMALL:
|
|
495
495
|
e = "50px";
|
|
496
496
|
break;
|
|
497
|
-
case
|
|
497
|
+
case K.MEDIUM:
|
|
498
498
|
e = "100px";
|
|
499
499
|
break;
|
|
500
|
-
case
|
|
500
|
+
case K.LARGE:
|
|
501
501
|
e = "150px";
|
|
502
502
|
break;
|
|
503
503
|
}
|
|
504
504
|
return e;
|
|
505
505
|
}
|
|
506
506
|
return (e, t) => {
|
|
507
|
-
let r =
|
|
507
|
+
let r = E("router-link");
|
|
508
508
|
return b(), i(r, {
|
|
509
509
|
to: "/",
|
|
510
510
|
class: "flex items-center mb-6 text-2xl font-semibold text-gray-900 dark:text-white"
|
|
511
511
|
}, {
|
|
512
|
-
default:
|
|
512
|
+
default: F(() => [(b(), o("svg", {
|
|
513
513
|
height: n(),
|
|
514
514
|
width: n(),
|
|
515
515
|
viewBox: "33.6 130.6 499.7 242.9",
|
|
@@ -715,31 +715,31 @@ var Ae = { class: "min-w-0 flex-1" }, je = {
|
|
|
715
715
|
role: "dialog",
|
|
716
716
|
"aria-modal": "true",
|
|
717
717
|
"aria-labelledby": i
|
|
718
|
-
}, [t.mode ===
|
|
719
|
-
d(
|
|
718
|
+
}, [t.mode === k(et).DELETE ? (b(), o("div", tt, [
|
|
719
|
+
d(k(me), { class: "w-12 h-12 text-gray-400 mx-auto mb-4" }),
|
|
720
720
|
s("h3", {
|
|
721
721
|
id: i,
|
|
722
722
|
class: "mb-5 text-lg font-normal text-gray-500 dark:text-gray-400"
|
|
723
|
-
}, " Are you sure you want to delete this " +
|
|
724
|
-
s("div", nt, [d(
|
|
725
|
-
color:
|
|
723
|
+
}, " Are you sure you want to delete this " + O(t.title) + "? ", 1),
|
|
724
|
+
s("div", nt, [d(G, {
|
|
725
|
+
color: k(U).RED,
|
|
726
726
|
onClick: r[1] ||= (e) => n.$emit("confirmModal"),
|
|
727
727
|
description: "Yes, I'm sure"
|
|
728
|
-
}, null, 8, ["color"]), d(
|
|
729
|
-
color:
|
|
728
|
+
}, null, 8, ["color"]), d(G, {
|
|
729
|
+
color: k(U).WHITE,
|
|
730
730
|
onClick: r[2] ||= (e) => n.$emit("closeModal"),
|
|
731
731
|
description: "No, cancel"
|
|
732
732
|
}, null, 8, ["color"])])
|
|
733
733
|
])) : (b(), o("div", rt, [
|
|
734
|
-
d(
|
|
734
|
+
d(k(oe), { class: "w-12 h-12 text-green-500 mx-auto mb-4" }),
|
|
735
735
|
s("h3", {
|
|
736
736
|
id: i,
|
|
737
737
|
class: "mb-2 text-lg font-medium text-gray-900"
|
|
738
|
-
},
|
|
739
|
-
t.description ? (b(), o("p", it,
|
|
740
|
-
|
|
741
|
-
s("div", at, [d(
|
|
742
|
-
color:
|
|
738
|
+
}, O(t.title), 1),
|
|
739
|
+
t.description ? (b(), o("p", it, O(t.description), 1)) : a("", !0),
|
|
740
|
+
T(n.$slots, "default"),
|
|
741
|
+
s("div", at, [d(G, {
|
|
742
|
+
color: k(U).BLUE,
|
|
743
743
|
onClick: r[3] ||= (e) => n.$emit("closeModal"),
|
|
744
744
|
description: "OK"
|
|
745
745
|
}, null, 8, ["color"])])
|
|
@@ -757,7 +757,7 @@ var Ae = { class: "min-w-0 flex-1" }, je = {
|
|
|
757
757
|
function n() {
|
|
758
758
|
return "block p-8 border border-gray-200 rounded-xl shadow-sm dark:bg-gray-800 dark:border-gray-700 " + t.bgColor;
|
|
759
759
|
}
|
|
760
|
-
return (e, t) => (b(), o("div", { class: h(n()) }, [
|
|
760
|
+
return (e, t) => (b(), o("div", { class: h(n()) }, [T(e.$slots, "default")], 2));
|
|
761
761
|
}
|
|
762
762
|
}), ct = /* @__PURE__ */ f({
|
|
763
763
|
__name: "BaseSpinner",
|
|
@@ -787,9 +787,9 @@ var Ae = { class: "min-w-0 flex-1" }, je = {
|
|
|
787
787
|
"aria-label": "Loading"
|
|
788
788
|
}, null, 2));
|
|
789
789
|
}
|
|
790
|
-
}),
|
|
790
|
+
}), q = /* @__PURE__ */ function(e) {
|
|
791
791
|
return e.SUCCESS = "SUCCESS", e.WARNING = "WARNING", e.ERROR = "ERROR", e;
|
|
792
|
-
}({}),
|
|
792
|
+
}({}), J = /* @__PURE__ */ function(e) {
|
|
793
793
|
return e.TOP_LEFT = "TOP_LEFT", e.TOP_RIGHT = "TOP_RIGHT", e.BOTTOM_LEFT = "BOTTOM_LEFT", e.BOTTOM_RIGHT = "BOTTOM_RIGHT", e;
|
|
794
794
|
}({}), lt = { 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" }, ut = { class: "ml-3 text-sm font-normal" }, dt = /* @__PURE__ */ f({
|
|
795
795
|
__name: "BaseToast",
|
|
@@ -810,7 +810,7 @@ var Ae = { class: "min-w-0 flex-1" }, je = {
|
|
|
810
810
|
positioning: {
|
|
811
811
|
type: String,
|
|
812
812
|
required: !1,
|
|
813
|
-
default:
|
|
813
|
+
default: J.TOP_RIGHT
|
|
814
814
|
},
|
|
815
815
|
duration: {
|
|
816
816
|
type: Number,
|
|
@@ -819,7 +819,7 @@ var Ae = { class: "min-w-0 flex-1" }, je = {
|
|
|
819
819
|
}
|
|
820
820
|
},
|
|
821
821
|
setup(e) {
|
|
822
|
-
let t = e, n =
|
|
822
|
+
let t = e, n = C(!0), r = null;
|
|
823
823
|
function i() {
|
|
824
824
|
n.value = !1, r &&= (clearTimeout(r), null);
|
|
825
825
|
}
|
|
@@ -831,13 +831,13 @@ var Ae = { class: "min-w-0 flex-1" }, je = {
|
|
|
831
831
|
function c() {
|
|
832
832
|
let e = "";
|
|
833
833
|
switch (t.mode) {
|
|
834
|
-
case
|
|
834
|
+
case q.ERROR:
|
|
835
835
|
e = "text-red-500 bg-red-100 dark:bg-red-800 dark:text-red-200";
|
|
836
836
|
break;
|
|
837
|
-
case
|
|
837
|
+
case q.SUCCESS:
|
|
838
838
|
e = "text-green-500 bg-green-100 dark:bg-green-800 dark:text-green-200";
|
|
839
839
|
break;
|
|
840
|
-
case
|
|
840
|
+
case q.WARNING:
|
|
841
841
|
e = "text-orange-500 bg-orange-100 dark:bg-orange-700 dark:text-orange-200";
|
|
842
842
|
break;
|
|
843
843
|
default:
|
|
@@ -849,16 +849,16 @@ var Ae = { class: "min-w-0 flex-1" }, je = {
|
|
|
849
849
|
function l() {
|
|
850
850
|
let e = "top-5 right-5";
|
|
851
851
|
switch (t.positioning) {
|
|
852
|
-
case
|
|
852
|
+
case J.BOTTOM_LEFT:
|
|
853
853
|
e = "bottom-5 left-5";
|
|
854
854
|
break;
|
|
855
|
-
case
|
|
855
|
+
case J.TOP_LEFT:
|
|
856
856
|
e = "top-5 left-5";
|
|
857
857
|
break;
|
|
858
|
-
case
|
|
858
|
+
case J.TOP_RIGHT:
|
|
859
859
|
e = "top-5 right-5";
|
|
860
860
|
break;
|
|
861
|
-
case
|
|
861
|
+
case J.BOTTOM_RIGHT:
|
|
862
862
|
e = "bottom-5 right-5";
|
|
863
863
|
break;
|
|
864
864
|
}
|
|
@@ -870,24 +870,24 @@ var Ae = { class: "min-w-0 flex-1" }, je = {
|
|
|
870
870
|
class: h(l()),
|
|
871
871
|
role: "alert"
|
|
872
872
|
}, [s("div", lt, [
|
|
873
|
-
e.mode ==
|
|
873
|
+
e.mode == k(q).ERROR ? (b(), o("div", {
|
|
874
874
|
key: 0,
|
|
875
875
|
class: h(c())
|
|
876
|
-
}, [d(
|
|
876
|
+
}, [d(k(me), { class: "h-6 w-6 text-red-500" }), r[0] ||= s("span", { class: "sr-only" }, "Error icon", -1)], 2)) : e.mode == k(q).SUCCESS ? (b(), o("div", {
|
|
877
877
|
key: 1,
|
|
878
878
|
class: h(c())
|
|
879
|
-
}, [d(
|
|
879
|
+
}, [d(k(oe), { class: "h-6 w-6 text-green-500" }), r[1] ||= s("span", { class: "sr-only" }, "Check icon", -1)], 2)) : e.mode == k(q).WARNING ? (b(), o("div", {
|
|
880
880
|
key: 2,
|
|
881
881
|
class: h(c())
|
|
882
|
-
}, [d(
|
|
883
|
-
s("div", ut,
|
|
882
|
+
}, [d(k(he), { class: "h-6 w-6 text-yellow-500" }), r[2] ||= s("span", { class: "sr-only" }, "Warning icon", -1)], 2)) : a("", !0),
|
|
883
|
+
s("div", ut, O(e.description), 1),
|
|
884
884
|
e.hasCloseIcon ? (b(), o("button", {
|
|
885
885
|
key: 3,
|
|
886
886
|
type: "button",
|
|
887
887
|
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",
|
|
888
888
|
"aria-label": "Close",
|
|
889
889
|
onClick: i
|
|
890
|
-
}, [r[3] ||= s("span", { class: "sr-only" }, "Close", -1), d(
|
|
890
|
+
}, [r[3] ||= s("span", { class: "sr-only" }, "Close", -1), d(k(Se), { class: "h-6 w-6 text-gray-500" })])) : a("", !0)
|
|
891
891
|
])], 2)) : a("", !0);
|
|
892
892
|
}
|
|
893
893
|
}), ft = { class: "w-13" }, pt = /* @__PURE__ */ f({
|
|
@@ -907,27 +907,27 @@ var Ae = { class: "min-w-0 flex-1" }, je = {
|
|
|
907
907
|
"bg-yellow-300",
|
|
908
908
|
"bg-purple-300",
|
|
909
909
|
"bg-pink-300"
|
|
910
|
-
], r =
|
|
910
|
+
], r = C(n[Math.floor(Math.random() * n.length)]);
|
|
911
911
|
function i() {
|
|
912
912
|
let e = "gray";
|
|
913
913
|
switch (t.color) {
|
|
914
|
-
case
|
|
914
|
+
case H.GREEN:
|
|
915
915
|
e = "green";
|
|
916
916
|
break;
|
|
917
|
-
case
|
|
917
|
+
case H.RED:
|
|
918
918
|
e = "red";
|
|
919
919
|
break;
|
|
920
|
-
case
|
|
920
|
+
case H.BLUE:
|
|
921
921
|
e = "blue";
|
|
922
922
|
break;
|
|
923
|
-
case
|
|
923
|
+
case H.YELLOW:
|
|
924
924
|
e = "yellow";
|
|
925
925
|
break;
|
|
926
|
-
case
|
|
926
|
+
case H.NONE: return "font-bold text-xs mr-2 px-2.5 py-0.5 rounded-full";
|
|
927
927
|
}
|
|
928
928
|
return "font-bold text-xs mr-2 px-2.5 py-0.5 rounded-full bg-" + e + "-100 text-" + e + "-800";
|
|
929
929
|
}
|
|
930
|
-
return (e, t) => (b(), o("div", ft, [s("div", { class: h(["border border-gray-300 relative aspect-square rounded-lg bg-white shadow-sm overflow-hidden flex items-center justify-center text-center", i()]) }, [
|
|
930
|
+
return (e, t) => (b(), o("div", ft, [s("div", { class: h(["border border-gray-300 relative aspect-square rounded-lg bg-white shadow-sm overflow-hidden flex items-center justify-center text-center", i()]) }, [T(e.$slots, "default"), s("div", { class: h(["absolute bottom-0 left-0 h-1 w-full", r.value]) }, null, 2)], 2)]));
|
|
931
931
|
}
|
|
932
932
|
}), mt = { class: "flex items-start justify-between" }, ht = { class: "min-w-0" }, gt = /* @__PURE__ */ f({
|
|
933
933
|
__name: "EarningsCard",
|
|
@@ -984,10 +984,10 @@ var Ae = { class: "min-w-0 flex-1" }, je = {
|
|
|
984
984
|
return (n, r) => (b(), o("div", { class: h(["relative rounded-xl border-2 border-dashed bg-white dark:bg-slate-800", [d.value.border, t.compact ? "p-3" : "p-6"]]) }, [t.badge ? (b(), o("div", {
|
|
985
985
|
key: 0,
|
|
986
986
|
class: h(["absolute right-4 top-4 rounded-md px-3 py-1 text-xs font-bold tracking-wide", d.value.badge])
|
|
987
|
-
},
|
|
988
|
-
s("p", { class: h(["font-bold tracking-wide text-gray-800 dark:text-slate-200", t.compact ? "pr-8 text-xs" : "text-sm"]) },
|
|
989
|
-
s("p", { class: h(["mt-1 font-bold truncate", [d.value.amount, t.compact ? "text-lg" : "text-4xl"]]) },
|
|
990
|
-
s("p", { class: h(["mt-1 font-medium", [d.value.subtitle, t.compact ? "text-xs" : "text-sm"]]) },
|
|
987
|
+
}, O(t.badge), 3)) : a("", !0), s("div", mt, [s("div", ht, [
|
|
988
|
+
s("p", { class: h(["font-bold tracking-wide text-gray-800 dark:text-slate-200", t.compact ? "pr-8 text-xs" : "text-sm"]) }, O(t.title), 3),
|
|
989
|
+
s("p", { class: h(["mt-1 font-bold truncate", [d.value.amount, t.compact ? "text-lg" : "text-4xl"]]) }, O(f.value), 3),
|
|
990
|
+
s("p", { class: h(["mt-1 font-medium", [d.value.subtitle, t.compact ? "text-xs" : "text-sm"]]) }, O(t.subtitle), 3)
|
|
991
991
|
]), s("div", { class: h(["flex items-center justify-center", [d.value.iconBox, t.compact ? "absolute right-2 top-2 h-6 w-6 rounded-lg" : "mt-6 h-12 w-12 rounded-xl"]]) }, [(b(), o("svg", {
|
|
992
992
|
class: h([d.value.icon, t.compact ? "h-3.5 w-3.5" : "h-6 w-6"]),
|
|
993
993
|
viewBox: "0 0 24 24",
|
|
@@ -1021,10 +1021,10 @@ var Ae = { class: "min-w-0 flex-1" }, je = {
|
|
|
1021
1021
|
},
|
|
1022
1022
|
setup(t) {
|
|
1023
1023
|
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), l = r(() => s.value || c.value), d = r(() => !s.value && !c.value && !(n.beforeAmount === null || n.beforeAmount === void 0));
|
|
1024
|
-
return (n, r) => (b(), o(e, null, [i.value && d.value ? (b(), o("span", _t, [u(
|
|
1024
|
+
return (n, r) => (b(), o(e, null, [i.value && d.value ? (b(), o("span", _t, [u(O(t.amount) + " ", 1), t.showCurrency ? (b(), o("span", vt, "€")) : a("", !0)])) : a("", !0), i.value && !d.value ? (b(), o("span", {
|
|
1025
1025
|
key: 1,
|
|
1026
1026
|
class: h([bt, l.value ? "text-red-800 dark:text-red-400" : "text-gray-800 dark:text-gray-200"])
|
|
1027
|
-
}, [u(
|
|
1027
|
+
}, [u(O(t.amount) + " ", 1), t.showCurrency ? (b(), o("span", yt, "€")) : a("", !0)], 2)) : a("", !0)], 64));
|
|
1028
1028
|
}
|
|
1029
1029
|
}), St = { "aria-label": "Pagination" }, Ct = { class: "flex list-none p-0 m-0" }, wt = [
|
|
1030
1030
|
"aria-current",
|
|
@@ -1048,7 +1048,7 @@ var Ae = { class: "min-w-0 flex-1" }, je = {
|
|
|
1048
1048
|
},
|
|
1049
1049
|
emits: ["page-changed"],
|
|
1050
1050
|
setup(t, { emit: n }) {
|
|
1051
|
-
let r = t, i =
|
|
1051
|
+
let r = t, i = C(1), a = C(0), c = C([]), l = n;
|
|
1052
1052
|
function u(e) {
|
|
1053
1053
|
if (a.value <= 5) {
|
|
1054
1054
|
c.value = Array.from({ length: a.value }, (e, t) => t + 1);
|
|
@@ -1062,9 +1062,9 @@ var Ae = { class: "min-w-0 flex-1" }, je = {
|
|
|
1062
1062
|
function d(e) {
|
|
1063
1063
|
e === i.value || e < 1 || e > a.value || (i.value = e, u(e), l("page-changed", e));
|
|
1064
1064
|
}
|
|
1065
|
-
return
|
|
1065
|
+
return P(() => [r.totalItems, r.itemsPerPage], () => {
|
|
1066
1066
|
a.value = Math.ceil(r.totalItems / r.itemsPerPage), i.value > a.value && (i.value = Math.max(1, a.value)), u(i.value);
|
|
1067
|
-
}, { immediate: !0 }), (t, n) => (b(), o("nav", St, [s("ul", Ct, [(b(!0), o(e, null,
|
|
1067
|
+
}, { immediate: !0 }), (t, n) => (b(), o("nav", St, [s("ul", Ct, [(b(!0), o(e, null, w(c.value, (e, t) => (b(), o("li", {
|
|
1068
1068
|
key: t,
|
|
1069
1069
|
class: "mr-1"
|
|
1070
1070
|
}, [e === 0 ? (b(), o("span", Tt, "...")) : (b(), o("button", {
|
|
@@ -1074,7 +1074,7 @@ var Ae = { class: "min-w-0 flex-1" }, je = {
|
|
|
1074
1074
|
"aria-label": `Go to page ${e}`,
|
|
1075
1075
|
onClick: (t) => d(e),
|
|
1076
1076
|
class: h(["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 }])
|
|
1077
|
-
},
|
|
1077
|
+
}, O(e), 11, wt))]))), 128))])]));
|
|
1078
1078
|
}
|
|
1079
1079
|
}), Dt = { key: 0 }, Ot = {
|
|
1080
1080
|
key: 0,
|
|
@@ -1099,23 +1099,23 @@ var Ae = { class: "min-w-0 flex-1" }, je = {
|
|
|
1099
1099
|
},
|
|
1100
1100
|
setup(e) {
|
|
1101
1101
|
let t = e, n = r(() => t.number !== null && t.number !== void 0 && t.number < 0), i = r(() => t.number === 0);
|
|
1102
|
-
return (r, s) => e.number !== null && e.number !== void 0 ? (b(), o("div", Dt, [n.value ? (b(), o("span", Ot, [d(
|
|
1103
|
-
default:
|
|
1102
|
+
return (r, s) => e.number !== null && e.number !== void 0 ? (b(), o("div", Dt, [n.value ? (b(), o("span", Ot, [d(Ne, { color: k(H).RED }, {
|
|
1103
|
+
default: F(() => [u(O(e.number) + O(t.icon), 1)]),
|
|
1104
1104
|
_: 1
|
|
1105
|
-
}, 8, ["color"]), d(
|
|
1106
|
-
default:
|
|
1105
|
+
}, 8, ["color"]), d(k(ne), { class: "h-5 w-5 text-red-500" })])) : i.value ? (b(), o("span", kt, [d(Ne, { color: k(H).GRAY }, {
|
|
1106
|
+
default: F(() => [u(O(e.number) + O(t.icon), 1)]),
|
|
1107
1107
|
_: 1
|
|
1108
|
-
}, 8, ["color"]), d(
|
|
1109
|
-
default:
|
|
1108
|
+
}, 8, ["color"]), d(k(ye), { class: "h-5 w-5 text-gray-400" })])) : (b(), o("span", At, [d(Ne, { color: k(H).GREEN }, {
|
|
1109
|
+
default: F(() => [u(O(e.number) + O(t.icon), 1)]),
|
|
1110
1110
|
_: 1
|
|
1111
|
-
}, 8, ["color"]), d(
|
|
1111
|
+
}, 8, ["color"]), d(k(re), { class: "h-5 w-5 text-green-500" })]))])) : a("", !0);
|
|
1112
1112
|
}
|
|
1113
1113
|
});
|
|
1114
1114
|
//#endregion
|
|
1115
1115
|
//#region src/composables/useThemeClasses.ts
|
|
1116
|
-
function
|
|
1117
|
-
let { isDark: e } =
|
|
1118
|
-
return {
|
|
1116
|
+
function Y() {
|
|
1117
|
+
let { isDark: e } = V();
|
|
1118
|
+
return x({
|
|
1119
1119
|
card: r(() => e.value ? "bg-gray-800 border-gray-700" : "bg-white border-gray-200"),
|
|
1120
1120
|
cardAlt: r(() => e.value ? "bg-gray-900 border-gray-700" : "bg-white border-gray-200"),
|
|
1121
1121
|
pageBg: r(() => e.value ? "bg-gray-900" : "bg-gray-50"),
|
|
@@ -1137,7 +1137,7 @@ function J() {
|
|
|
1137
1137
|
amberText: r(() => e.value ? "text-amber-400" : "text-amber-600"),
|
|
1138
1138
|
amberTextStrong: r(() => e.value ? "text-amber-300" : "text-amber-700"),
|
|
1139
1139
|
redText: r(() => e.value ? "text-red-400" : "text-red-500")
|
|
1140
|
-
};
|
|
1140
|
+
});
|
|
1141
1141
|
}
|
|
1142
1142
|
//#endregion
|
|
1143
1143
|
//#region src/composables/useEscapeKey.ts
|
|
@@ -1169,7 +1169,7 @@ var Nt = { class: "flex items-start gap-4 min-w-0" }, Pt = { class: "flex-1 min-
|
|
|
1169
1169
|
},
|
|
1170
1170
|
emits: ["cancel", "backdrop"],
|
|
1171
1171
|
setup(e, { emit: n }) {
|
|
1172
|
-
let c = e, l = n, { isDark: u } =
|
|
1172
|
+
let c = e, l = n, { isDark: u } = V(), d = Y(), f = `modal-title-${Math.random().toString(36).slice(2, 9)}`, p = r(() => u.value ? "bg-gray-900 border border-gray-700" : "bg-white border border-gray-200"), m = r(() => c.iconBgClass || (u.value ? "bg-emerald-900/30" : "bg-emerald-50"));
|
|
1173
1173
|
function g() {
|
|
1174
1174
|
l("backdrop"), c.manualClose || l("cancel");
|
|
1175
1175
|
}
|
|
@@ -1184,37 +1184,37 @@ var Nt = { class: "flex items-start gap-4 min-w-0" }, Pt = { class: "flex-1 min-
|
|
|
1184
1184
|
}, [e.scrollable ? (b(), o("div", {
|
|
1185
1185
|
key: 0,
|
|
1186
1186
|
class: h(["relative w-full mx-4 rounded-lg shadow-xl max-h-[90vh] flex flex-col", [e.maxWidthClass, p.value]]),
|
|
1187
|
-
onClick: r[0] ||=
|
|
1187
|
+
onClick: r[0] ||= L(() => {}, ["stop"])
|
|
1188
1188
|
}, [
|
|
1189
|
-
s("div", { class: h(["flex items-start justify-between gap-4 p-6 border-b shrink-0",
|
|
1189
|
+
s("div", { class: h(["flex items-start justify-between gap-4 p-6 border-b shrink-0", k(d).border]) }, [s("div", Nt, [T(n.$slots, "icon", {}, () => [s("div", { class: h(["flex-shrink-0 flex h-12 w-12 items-center justify-center rounded-full", m.value]) }, [(b(), i(D(e.icon), {
|
|
1190
1190
|
class: h(["h-6 w-6", e.iconClass]),
|
|
1191
1191
|
"aria-hidden": "true"
|
|
1192
1192
|
}, null, 8, ["class"]))], 2)]), s("div", Pt, [s("h3", {
|
|
1193
1193
|
id: f,
|
|
1194
|
-
class: h(["text-lg font-medium",
|
|
1195
|
-
},
|
|
1194
|
+
class: h(["text-lg font-medium", k(d).primaryText])
|
|
1195
|
+
}, O(e.title), 3), e.subtitle ? (b(), o("p", {
|
|
1196
1196
|
key: 0,
|
|
1197
|
-
class: h(["text-sm mt-1 break-all",
|
|
1198
|
-
},
|
|
1199
|
-
s("div", Ft, [
|
|
1197
|
+
class: h(["text-sm mt-1 break-all", k(d).mutedText])
|
|
1198
|
+
}, O(e.subtitle), 3)) : a("", !0)])]), T(n.$slots, "header-actions")], 2),
|
|
1199
|
+
s("div", Ft, [T(n.$slots, "default")]),
|
|
1200
1200
|
n.$slots.footer ? (b(), o("div", {
|
|
1201
1201
|
key: 0,
|
|
1202
|
-
class: h(["flex gap-3 justify-end p-6 border-t shrink-0",
|
|
1203
|
-
}, [
|
|
1202
|
+
class: h(["flex gap-3 justify-end p-6 border-t shrink-0", k(d).border])
|
|
1203
|
+
}, [T(n.$slots, "footer")], 2)) : a("", !0)
|
|
1204
1204
|
], 2)) : (b(), o("div", {
|
|
1205
1205
|
key: 1,
|
|
1206
1206
|
class: h(["relative w-full mx-4 rounded-lg shadow-xl", [e.maxWidthClass, p.value]]),
|
|
1207
|
-
onClick: r[1] ||=
|
|
1207
|
+
onClick: r[1] ||= L(() => {}, ["stop"])
|
|
1208
1208
|
}, [s("div", It, [
|
|
1209
|
-
s("div", Lt, [
|
|
1209
|
+
s("div", Lt, [T(n.$slots, "icon", {}, () => [s("div", { class: h(["flex-shrink-0 flex h-12 w-12 items-center justify-center rounded-full", m.value]) }, [(b(), i(D(e.icon), {
|
|
1210
1210
|
class: h(["h-6 w-6", e.iconClass]),
|
|
1211
1211
|
"aria-hidden": "true"
|
|
1212
1212
|
}, null, 8, ["class"]))], 2)]), s("div", Rt, [s("h3", {
|
|
1213
1213
|
id: f,
|
|
1214
|
-
class: h(["text-lg font-medium",
|
|
1215
|
-
},
|
|
1216
|
-
s("div", zt, [
|
|
1217
|
-
s("div", Bt, [
|
|
1214
|
+
class: h(["text-lg font-medium", k(d).primaryText])
|
|
1215
|
+
}, O(e.title), 3)])]),
|
|
1216
|
+
s("div", zt, [T(n.$slots, "default")]),
|
|
1217
|
+
s("div", Bt, [T(n.$slots, "footer")])
|
|
1218
1218
|
])], 2))])]));
|
|
1219
1219
|
}
|
|
1220
1220
|
}), Ht = ["aria-expanded"], Ut = { class: "flex items-center gap-3" }, Wt = /* @__PURE__ */ f({
|
|
@@ -1227,17 +1227,17 @@ var Nt = { class: "flex items-start gap-4 min-w-0" }, Pt = { class: "flex-1 min-
|
|
|
1227
1227
|
},
|
|
1228
1228
|
emits: ["toggle"],
|
|
1229
1229
|
setup(e, { emit: t }) {
|
|
1230
|
-
let n = e, i = t, { isDark: c } =
|
|
1231
|
-
return (t, n) => (b(), o("section", { class: h(["rounded-xl border transition-colors",
|
|
1230
|
+
let n = e, i = t, { isDark: c } = V(), l = Y(), u = r(() => c.value ? "text-gray-100" : "text-gray-700"), d = r(() => c.value ? "bg-gray-800/50 hover:bg-gray-800 border-gray-700" : "bg-gray-50 hover:bg-gray-100 border-gray-200"), f = r(() => c.value ? "bg-emerald-500/15 text-emerald-400" : "bg-emerald-50 text-emerald-700"), p = r(() => n.bodyClass === void 0 ? c.value ? "bg-gray-800" : "bg-white" : n.bodyClass);
|
|
1231
|
+
return (t, n) => (b(), o("section", { class: h(["rounded-xl border transition-colors", k(l).cardAlt]) }, [s("button", {
|
|
1232
1232
|
type: "button",
|
|
1233
1233
|
class: h(["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, e.collapsed ? "rounded-xl" : "rounded-t-xl"]]),
|
|
1234
1234
|
"aria-expanded": !e.collapsed,
|
|
1235
1235
|
onClick: n[0] ||= (e) => i("toggle")
|
|
1236
|
-
}, [s("div", Ut, [s("h2", { class: h(["text-base font-semibold", u.value]) },
|
|
1236
|
+
}, [s("div", Ut, [s("h2", { class: h(["text-base font-semibold", u.value]) }, O(e.title), 3), e.badge ? (b(), o("span", {
|
|
1237
1237
|
key: 0,
|
|
1238
1238
|
class: h(["text-xs px-2 py-0.5 rounded-full", f.value])
|
|
1239
|
-
},
|
|
1240
|
-
class: h(["w-5 h-5 transition-transform", [e.collapsed ? "" : "rotate-180",
|
|
1239
|
+
}, O(e.badge), 3)) : a("", !0)]), (b(), o("svg", {
|
|
1240
|
+
class: h(["w-5 h-5 transition-transform", [e.collapsed ? "" : "rotate-180", k(l).dimTextAlt]]),
|
|
1241
1241
|
fill: "none",
|
|
1242
1242
|
viewBox: "0 0 24 24",
|
|
1243
1243
|
stroke: "currentColor",
|
|
@@ -1247,7 +1247,7 @@ var Nt = { class: "flex items-start gap-4 min-w-0" }, Pt = { class: "flex-1 min-
|
|
|
1247
1247
|
"stroke-linecap": "round",
|
|
1248
1248
|
"stroke-linejoin": "round",
|
|
1249
1249
|
d: "M19 9l-7 7-7-7"
|
|
1250
|
-
}, null, -1)]], 2))], 10, Ht),
|
|
1250
|
+
}, null, -1)]], 2))], 10, Ht), I(s("div", { class: h(["p-6 border-t rounded-b-xl", [k(l).border, p.value]]) }, [T(t.$slots, "default")], 2), [[N, !e.collapsed]])], 2));
|
|
1251
1251
|
}
|
|
1252
1252
|
}), Gt = ["disabled"], Kt = ["disabled"], qt = {
|
|
1253
1253
|
key: 0,
|
|
@@ -1271,7 +1271,7 @@ var Nt = { class: "flex items-start gap-4 min-w-0" }, Pt = { class: "flex-1 min-
|
|
|
1271
1271
|
},
|
|
1272
1272
|
emits: ["confirm", "cancel"],
|
|
1273
1273
|
setup(e, { emit: t }) {
|
|
1274
|
-
let n = e, r = t, { isDark: c } =
|
|
1274
|
+
let n = e, r = t, { isDark: c } = V(), l = Y();
|
|
1275
1275
|
function d() {
|
|
1276
1276
|
n.submitting || r("confirm");
|
|
1277
1277
|
}
|
|
@@ -1280,18 +1280,18 @@ var Nt = { class: "flex items-start gap-4 min-w-0" }, Pt = { class: "flex-1 min-
|
|
|
1280
1280
|
}
|
|
1281
1281
|
return (t, n) => (b(), i(Vt, {
|
|
1282
1282
|
title: e.title,
|
|
1283
|
-
icon:
|
|
1284
|
-
"icon-bg-class": e.variant === "danger" ?
|
|
1283
|
+
icon: k(he),
|
|
1284
|
+
"icon-bg-class": e.variant === "danger" ? k(c) ? "bg-red-900/30" : "bg-red-50" : k(c) ? "bg-amber-900/30" : "bg-amber-50",
|
|
1285
1285
|
"icon-class": e.variant === "danger" ? "text-red-600" : "text-amber-600",
|
|
1286
1286
|
"manual-close": e.submitting,
|
|
1287
1287
|
onCancel: f
|
|
1288
1288
|
}, {
|
|
1289
|
-
footer:
|
|
1289
|
+
footer: F(() => [s("button", {
|
|
1290
1290
|
type: "button",
|
|
1291
1291
|
disabled: e.submitting,
|
|
1292
|
-
class: h(["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", [
|
|
1292
|
+
class: h(["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", [k(l).ghostButton, e.submitting ? "opacity-60 cursor-not-allowed" : "cursor-pointer"]]),
|
|
1293
1293
|
onClick: f
|
|
1294
|
-
},
|
|
1294
|
+
}, O(e.cancelText), 11, Gt), s("button", {
|
|
1295
1295
|
type: "button",
|
|
1296
1296
|
disabled: e.submitting,
|
|
1297
1297
|
class: h(["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"]]),
|
|
@@ -1307,8 +1307,8 @@ var Nt = { class: "flex items-start gap-4 min-w-0" }, Pt = { class: "flex-1 min-
|
|
|
1307
1307
|
class: "opacity-75",
|
|
1308
1308
|
fill: "currentColor",
|
|
1309
1309
|
d: "M4 12a8 8 0 018-8v4a4 4 0 00-4 4H4z"
|
|
1310
|
-
}, null, -1)]])) : a("", !0), u(" " +
|
|
1311
|
-
default:
|
|
1310
|
+
}, null, -1)]])) : a("", !0), u(" " + O(e.submitting ? e.submittingText : e.confirmText), 1)], 10, Kt)]),
|
|
1311
|
+
default: F(() => [T(t.$slots, "message", {}, () => [s("p", { class: h(["text-sm", k(c) ? "text-gray-300" : "text-gray-600"]) }, O(e.message), 3)]), T(t.$slots, "default")]),
|
|
1312
1312
|
_: 3
|
|
1313
1313
|
}, 8, [
|
|
1314
1314
|
"title",
|
|
@@ -1336,7 +1336,7 @@ var Nt = { class: "flex items-start gap-4 min-w-0" }, Pt = { class: "flex-1 min-
|
|
|
1336
1336
|
},
|
|
1337
1337
|
emits: ["confirm", "cancel"],
|
|
1338
1338
|
setup(e, { emit: t }) {
|
|
1339
|
-
let n = e, r = t, { isDark: a } =
|
|
1339
|
+
let n = e, r = t, { isDark: a } = V(), o = Y(), l = C(n.initialValue), u = C(null);
|
|
1340
1340
|
_(async () => {
|
|
1341
1341
|
await m(), u.value?.focus();
|
|
1342
1342
|
});
|
|
@@ -1351,33 +1351,33 @@ var Nt = { class: "flex items-start gap-4 min-w-0" }, Pt = { class: "flex-1 min-
|
|
|
1351
1351
|
}
|
|
1352
1352
|
return Mt(f), (t, n) => (b(), i(Vt, {
|
|
1353
1353
|
title: e.title,
|
|
1354
|
-
icon:
|
|
1354
|
+
icon: k(pe),
|
|
1355
1355
|
"manual-close": "",
|
|
1356
1356
|
onBackdrop: p
|
|
1357
1357
|
}, c({
|
|
1358
|
-
footer:
|
|
1358
|
+
footer: F(() => [s("button", {
|
|
1359
1359
|
type: "button",
|
|
1360
|
-
class: h(["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",
|
|
1360
|
+
class: h(["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", k(o).ghostButton]),
|
|
1361
1361
|
onClick: f
|
|
1362
|
-
},
|
|
1362
|
+
}, O(e.cancelText), 3), s("button", {
|
|
1363
1363
|
type: "button",
|
|
1364
1364
|
disabled: !l.value.trim() || e.submitting,
|
|
1365
1365
|
class: h(["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", [!l.value.trim() || e.submitting ? "bg-emerald-400 cursor-not-allowed" : "bg-emerald-600 hover:bg-emerald-700 cursor-pointer"]]),
|
|
1366
1366
|
onClick: d
|
|
1367
|
-
},
|
|
1368
|
-
default:
|
|
1367
|
+
}, O(e.submitting ? e.submittingText : e.confirmText), 11, Zt)]),
|
|
1368
|
+
default: F(() => [s("p", { class: h(["text-sm", k(a) ? "text-gray-300" : "text-gray-600"]) }, O(e.message), 3), s("div", Yt, [s("label", { class: h(["block text-sm font-medium mb-1", k(o).label]) }, O(e.inputLabel), 3), I(s("input", {
|
|
1369
1369
|
ref_key: "nameInput",
|
|
1370
1370
|
ref: u,
|
|
1371
1371
|
"onUpdate:modelValue": n[0] ||= (e) => l.value = e,
|
|
1372
1372
|
type: "text",
|
|
1373
1373
|
placeholder: e.placeholder,
|
|
1374
|
-
class: h(["w-full px-3 py-2 rounded-md border text-sm transition-colors",
|
|
1375
|
-
onKeyup:
|
|
1376
|
-
}, null, 42, Xt), [[
|
|
1374
|
+
class: h(["w-full px-3 py-2 rounded-md border text-sm transition-colors", k(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"]),
|
|
1375
|
+
onKeyup: te(d, ["enter"])
|
|
1376
|
+
}, null, 42, Xt), [[M, l.value]])])]),
|
|
1377
1377
|
_: 2
|
|
1378
1378
|
}, [t.$slots.icon ? {
|
|
1379
1379
|
name: "icon",
|
|
1380
|
-
fn:
|
|
1380
|
+
fn: F(() => [T(t.$slots, "icon")]),
|
|
1381
1381
|
key: "0"
|
|
1382
1382
|
} : void 0]), 1032, ["title", "icon"]));
|
|
1383
1383
|
}
|
|
@@ -1390,21 +1390,21 @@ var Nt = { class: "flex items-start gap-4 min-w-0" }, Pt = { class: "flex-1 min-
|
|
|
1390
1390
|
homeLabel: { default: "Go home" }
|
|
1391
1391
|
},
|
|
1392
1392
|
setup(e) {
|
|
1393
|
-
let t = e, n =
|
|
1393
|
+
let t = e, n = Te(), { isDark: r } = V(), i = Y();
|
|
1394
1394
|
function a() {
|
|
1395
1395
|
n.push({ name: t.homeRouteName });
|
|
1396
1396
|
}
|
|
1397
1397
|
return (t, n) => (b(), o("div", $t, [s("div", en, [
|
|
1398
|
-
d(
|
|
1399
|
-
s("h1", { class: h(["text-4xl font-bold mb-2",
|
|
1400
|
-
s("p", { class: h(["text-lg mb-6",
|
|
1398
|
+
d(k(he), { class: h(["w-16 h-16 mx-auto mb-4", k(i).illustration]) }, null, 8, ["class"]),
|
|
1399
|
+
s("h1", { class: h(["text-4xl font-bold mb-2", k(r) ? "text-gray-200" : "text-gray-800"]) }, O(e.code), 3),
|
|
1400
|
+
s("p", { class: h(["text-lg mb-6", k(i).dimTextAlt]) }, O(e.message), 3),
|
|
1401
1401
|
s("button", {
|
|
1402
1402
|
onClick: a,
|
|
1403
|
-
class: h(["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",
|
|
1404
|
-
},
|
|
1403
|
+
class: h(["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", k(r) ? "bg-emerald-600 hover:bg-emerald-500" : "bg-emerald-600 hover:bg-emerald-700"])
|
|
1404
|
+
}, O(e.homeLabel), 3)
|
|
1405
1405
|
])]));
|
|
1406
1406
|
}
|
|
1407
|
-
}), nn =
|
|
1407
|
+
}), nn = C(!1);
|
|
1408
1408
|
function rn() {
|
|
1409
1409
|
function e() {
|
|
1410
1410
|
nn.value = !0;
|
|
@@ -1424,12 +1424,12 @@ function rn() {
|
|
|
1424
1424
|
}
|
|
1425
1425
|
//#endregion
|
|
1426
1426
|
//#region src/composables/useSidebarCollapse.ts
|
|
1427
|
-
var
|
|
1427
|
+
var X = C(!1), an = !1, on = "mgv-sidebar-collapsed";
|
|
1428
1428
|
function sn(e) {
|
|
1429
1429
|
if (!an && (an = !0, on = e, typeof window < "u")) {
|
|
1430
1430
|
let e = window.localStorage?.getItem(on);
|
|
1431
|
-
e && (
|
|
1432
|
-
|
|
1431
|
+
e && (X.value = e === "true"), p(!0).run(() => {
|
|
1432
|
+
P(X, (e) => {
|
|
1433
1433
|
window.localStorage?.setItem(on, String(e));
|
|
1434
1434
|
});
|
|
1435
1435
|
});
|
|
@@ -1438,16 +1438,16 @@ function sn(e) {
|
|
|
1438
1438
|
function cn(e) {
|
|
1439
1439
|
sn(e?.storageKey ?? on);
|
|
1440
1440
|
function t() {
|
|
1441
|
-
|
|
1441
|
+
X.value = !0;
|
|
1442
1442
|
}
|
|
1443
1443
|
function n() {
|
|
1444
|
-
|
|
1444
|
+
X.value = !1;
|
|
1445
1445
|
}
|
|
1446
1446
|
function r() {
|
|
1447
|
-
|
|
1447
|
+
X.value = !X.value;
|
|
1448
1448
|
}
|
|
1449
1449
|
return {
|
|
1450
|
-
collapsed:
|
|
1450
|
+
collapsed: X,
|
|
1451
1451
|
collapse: t,
|
|
1452
1452
|
expand: n,
|
|
1453
1453
|
toggle: r
|
|
@@ -1455,45 +1455,45 @@ function cn(e) {
|
|
|
1455
1455
|
}
|
|
1456
1456
|
//#endregion
|
|
1457
1457
|
//#region src/composables/useNotifications.ts
|
|
1458
|
-
var
|
|
1459
|
-
function
|
|
1458
|
+
var Z = C([]), ln = C(!1), un = r(() => Z.value.filter((e) => !e.read).length);
|
|
1459
|
+
function dn() {
|
|
1460
1460
|
function e() {
|
|
1461
|
-
|
|
1461
|
+
ln.value = !0;
|
|
1462
1462
|
}
|
|
1463
1463
|
function t() {
|
|
1464
|
-
|
|
1464
|
+
ln.value = !1;
|
|
1465
1465
|
}
|
|
1466
1466
|
function n() {
|
|
1467
|
-
|
|
1467
|
+
ln.value = !ln.value;
|
|
1468
1468
|
}
|
|
1469
1469
|
function r(e) {
|
|
1470
|
-
|
|
1470
|
+
Z.value = e;
|
|
1471
1471
|
}
|
|
1472
1472
|
function i(e) {
|
|
1473
|
-
|
|
1473
|
+
Z.value = [e, ...Z.value];
|
|
1474
1474
|
}
|
|
1475
1475
|
function a(e) {
|
|
1476
|
-
|
|
1476
|
+
Z.value = Z.value.filter((t) => t.id !== e);
|
|
1477
1477
|
}
|
|
1478
1478
|
function o(e) {
|
|
1479
|
-
|
|
1479
|
+
Z.value = Z.value.map((t) => t.id === e ? {
|
|
1480
1480
|
...t,
|
|
1481
1481
|
read: !0
|
|
1482
1482
|
} : t);
|
|
1483
1483
|
}
|
|
1484
1484
|
function s() {
|
|
1485
|
-
|
|
1485
|
+
Z.value = Z.value.map((e) => e.read ? e : {
|
|
1486
1486
|
...e,
|
|
1487
1487
|
read: !0
|
|
1488
1488
|
});
|
|
1489
1489
|
}
|
|
1490
1490
|
function c() {
|
|
1491
|
-
|
|
1491
|
+
Z.value = [];
|
|
1492
1492
|
}
|
|
1493
1493
|
return {
|
|
1494
|
-
notifications:
|
|
1495
|
-
unreadCount:
|
|
1496
|
-
open:
|
|
1494
|
+
notifications: Z,
|
|
1495
|
+
unreadCount: un,
|
|
1496
|
+
open: ln,
|
|
1497
1497
|
openPanel: e,
|
|
1498
1498
|
closePanel: t,
|
|
1499
1499
|
togglePanel: n,
|
|
@@ -1507,22 +1507,22 @@ function un() {
|
|
|
1507
1507
|
}
|
|
1508
1508
|
//#endregion
|
|
1509
1509
|
//#region src/components/BaseSidebar.vue?vue&type=script&setup=true&lang.ts
|
|
1510
|
-
var
|
|
1510
|
+
var fn = ["aria-label", "aria-expanded"], pn = { class: "flex flex-col h-full" }, mn = { class: "flex-1 overflow-y-auto px-3 space-y-6" }, hn = { class: "space-y-0.5" }, gn = [
|
|
1511
1511
|
"aria-current",
|
|
1512
1512
|
"title",
|
|
1513
1513
|
"onClick"
|
|
1514
|
-
],
|
|
1514
|
+
], _n = ["aria-label"], vn = { class: "relative shrink-0" }, yn = {
|
|
1515
1515
|
key: 0,
|
|
1516
1516
|
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"
|
|
1517
|
-
},
|
|
1517
|
+
}, bn = [
|
|
1518
1518
|
"title",
|
|
1519
1519
|
"aria-label",
|
|
1520
1520
|
"aria-pressed"
|
|
1521
|
-
],
|
|
1521
|
+
], xn = [
|
|
1522
1522
|
"title",
|
|
1523
1523
|
"aria-label",
|
|
1524
1524
|
"aria-pressed"
|
|
1525
|
-
],
|
|
1525
|
+
], Sn = /*#__PURE__*/ ((e, t) => {
|
|
1526
1526
|
let n = e.__vccOpts || e;
|
|
1527
1527
|
for (let [e, r] of t) n[e] = r;
|
|
1528
1528
|
return n;
|
|
@@ -1547,151 +1547,151 @@ var dn = ["aria-label", "aria-expanded"], fn = { class: "flex flex-col h-full" }
|
|
|
1547
1547
|
}
|
|
1548
1548
|
},
|
|
1549
1549
|
setup(t) {
|
|
1550
|
-
let n = t, c =
|
|
1551
|
-
|
|
1550
|
+
let n = t, c = Te(), l = we(), { isDark: f, toggleTheme: p } = V(), { mobileOpen: g, close: _, toggle: v } = rn(), { collapsed: y, toggle: x } = cn(), { unreadCount: S, togglePanel: E } = dn(), A = r(() => n.collapsible && y.value), ee = C(null), j = null;
|
|
1551
|
+
P(g, async (e) => {
|
|
1552
1552
|
e ? (j = document.activeElement instanceof HTMLElement ? document.activeElement : null, await m(), ee.value?.focus()) : (j?.focus(), j = null);
|
|
1553
1553
|
});
|
|
1554
|
-
function
|
|
1554
|
+
function M() {
|
|
1555
1555
|
c.push({ name: n.homeRouteName }), _();
|
|
1556
1556
|
}
|
|
1557
1557
|
function N(e) {
|
|
1558
1558
|
return l.name === e;
|
|
1559
1559
|
}
|
|
1560
|
-
function
|
|
1560
|
+
function F(e) {
|
|
1561
1561
|
c.push({ name: e }), _();
|
|
1562
1562
|
}
|
|
1563
1563
|
return (n, r) => (b(), o("div", null, [
|
|
1564
|
-
s("div", { class: h(["mobile-topbar fixed top-0 inset-x-0 z-30 flex items-center justify-between px-4 py-3 border-b transition-colors",
|
|
1564
|
+
s("div", { class: h(["mobile-topbar fixed top-0 inset-x-0 z-30 flex items-center justify-between px-4 py-3 border-b transition-colors", k(f) ? "bg-gray-900 border-gray-800" : "bg-white border-gray-200"]) }, [s("button", {
|
|
1565
1565
|
type: "button",
|
|
1566
|
-
onClick:
|
|
1566
|
+
onClick: M,
|
|
1567
1567
|
class: "cursor-pointer rounded focus:outline-none focus-visible:ring-2 focus-visible:ring-emerald-500",
|
|
1568
1568
|
"aria-label": "Go to home"
|
|
1569
|
-
}, [
|
|
1569
|
+
}, [T(n.$slots, "logo", { size: 28 }, void 0, !0)]), s("button", {
|
|
1570
1570
|
type: "button",
|
|
1571
|
-
onClick: r[0] ||= (...e) =>
|
|
1572
|
-
class: h(["p-2 rounded-lg cursor-pointer transition-colors focus:outline-none focus-visible:ring-2 focus-visible:ring-emerald-500",
|
|
1573
|
-
"aria-label":
|
|
1574
|
-
"aria-expanded":
|
|
1575
|
-
}, [
|
|
1571
|
+
onClick: r[0] ||= (...e) => k(v) && k(v)(...e),
|
|
1572
|
+
class: h(["p-2 rounded-lg cursor-pointer transition-colors focus:outline-none focus-visible:ring-2 focus-visible:ring-emerald-500", k(f) ? "text-gray-400 hover:bg-gray-800" : "text-gray-600 hover:bg-gray-100"]),
|
|
1573
|
+
"aria-label": k(g) ? "Close navigation menu" : "Open navigation menu",
|
|
1574
|
+
"aria-expanded": k(g)
|
|
1575
|
+
}, [k(g) ? (b(), i(k(Se), {
|
|
1576
1576
|
key: 1,
|
|
1577
1577
|
class: "w-6 h-6",
|
|
1578
1578
|
"aria-hidden": "true"
|
|
1579
|
-
})) : (b(), i(
|
|
1579
|
+
})) : (b(), i(k(ie), {
|
|
1580
1580
|
key: 0,
|
|
1581
1581
|
class: "w-6 h-6",
|
|
1582
1582
|
"aria-hidden": "true"
|
|
1583
|
-
}))], 10,
|
|
1584
|
-
|
|
1583
|
+
}))], 10, fn)], 2),
|
|
1584
|
+
k(g) ? (b(), o("div", {
|
|
1585
1585
|
key: 0,
|
|
1586
1586
|
class: "mobile-overlay fixed inset-0 z-40 bg-black/50",
|
|
1587
1587
|
"aria-hidden": "true",
|
|
1588
|
-
onClick: r[1] ||= (...e) =>
|
|
1588
|
+
onClick: r[1] ||= (...e) => k(_) && k(_)(...e)
|
|
1589
1589
|
})) : a("", !0),
|
|
1590
1590
|
s("aside", {
|
|
1591
1591
|
role: "navigation",
|
|
1592
1592
|
"aria-label": "Main navigation",
|
|
1593
1593
|
class: h(["fixed top-0 left-0 h-screen w-60 flex flex-col border-r transition-all duration-300 lg:pointer-events-auto", [
|
|
1594
|
-
|
|
1595
|
-
|
|
1596
|
-
t.collapsible &&
|
|
1594
|
+
k(f) ? "bg-gray-900 border-gray-800" : "bg-white border-gray-200",
|
|
1595
|
+
k(g) ? "translate-x-0 z-50" : "-translate-x-full max-lg:pointer-events-none lg:translate-x-0 z-50",
|
|
1596
|
+
t.collapsible && k(y) ? "lg:w-16" : "lg:w-60"
|
|
1597
1597
|
]])
|
|
1598
|
-
}, [s("div",
|
|
1598
|
+
}, [s("div", pn, [
|
|
1599
1599
|
s("div", { class: h(["px-5 pt-5 pb-4 flex items-center justify-center relative", { "lg:px-2": A.value }]) }, [s("button", {
|
|
1600
1600
|
type: "button",
|
|
1601
|
-
onClick:
|
|
1601
|
+
onClick: M,
|
|
1602
1602
|
class: "cursor-pointer rounded focus:outline-none focus-visible:ring-2 focus-visible:ring-emerald-500",
|
|
1603
1603
|
"aria-label": "Go to home"
|
|
1604
|
-
}, [
|
|
1604
|
+
}, [T(n.$slots, "logo", { size: A.value ? 36 : 52 }, void 0, !0)]), s("button", {
|
|
1605
1605
|
ref_key: "closeMobileButton",
|
|
1606
1606
|
ref: ee,
|
|
1607
1607
|
type: "button",
|
|
1608
|
-
onClick: r[2] ||= (...e) =>
|
|
1609
|
-
class: h(["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",
|
|
1608
|
+
onClick: r[2] ||= (...e) => k(_) && k(_)(...e),
|
|
1609
|
+
class: h(["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", k(f) ? "text-gray-400 hover:bg-gray-800" : "text-gray-500 hover:bg-gray-100"]),
|
|
1610
1610
|
"aria-label": "Close navigation menu"
|
|
1611
|
-
}, [d(
|
|
1611
|
+
}, [d(k(Se), {
|
|
1612
1612
|
class: "w-5 h-5",
|
|
1613
1613
|
"aria-hidden": "true"
|
|
1614
1614
|
})], 2)], 2),
|
|
1615
|
-
s("nav",
|
|
1615
|
+
s("nav", mn, [(b(!0), o(e, null, w(t.sections, (t) => (b(), o("div", { key: t.title }, [s("p", { class: h(["px-2 mb-2 text-[10px] font-semibold uppercase tracking-wider text-gray-500", { "lg:hidden": A.value }]) }, O(t.title), 3), s("ul", hn, [(b(!0), o(e, null, w(t.items, (e) => (b(), o("li", { key: e.name }, [s("button", {
|
|
1616
1616
|
type: "button",
|
|
1617
1617
|
"aria-current": N(e.name) ? "page" : void 0,
|
|
1618
1618
|
title: A.value ? e.label : void 0,
|
|
1619
|
-
onClick: (t) =>
|
|
1620
|
-
class: h(["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", [N(e.name) ?
|
|
1621
|
-
}, [(b(), i(
|
|
1622
|
-
s("div", { class: h(["px-4 py-4 border-t transition-colors space-y-3",
|
|
1619
|
+
onClick: (t) => F(e.name),
|
|
1620
|
+
class: h(["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", [N(e.name) ? k(f) ? "bg-emerald-500/15 text-emerald-300" : "bg-emerald-50 text-emerald-700" : k(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 }]])
|
|
1621
|
+
}, [(b(), i(D(e.icon), { class: "w-[18px] h-[18px] shrink-0" })), s("span", { class: h({ "lg:hidden": A.value }) }, O(e.label), 3)], 10, gn)]))), 128))])]))), 128))]),
|
|
1622
|
+
s("div", { class: h(["px-4 py-4 border-t transition-colors space-y-3", k(f) ? "border-gray-800" : "border-gray-200"]) }, [
|
|
1623
1623
|
t.showNotifications ? (b(), o("button", {
|
|
1624
1624
|
key: 0,
|
|
1625
1625
|
type: "button",
|
|
1626
|
-
onClick: r[3] ||= (...e) =>
|
|
1626
|
+
onClick: r[3] ||= (...e) => k(E) && k(E)(...e),
|
|
1627
1627
|
title: "Notifications",
|
|
1628
|
-
"aria-label":
|
|
1629
|
-
class: h(["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", [
|
|
1630
|
-
}, [s("span",
|
|
1628
|
+
"aria-label": k(S) > 0 ? `Notifications, ${k(S)} unread` : "Notifications",
|
|
1629
|
+
class: h(["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", [k(f) ? "text-gray-400 hover:text-gray-100 hover:bg-gray-800" : "text-gray-600 hover:text-gray-900 hover:bg-gray-100", { "lg:justify-center": A.value }]])
|
|
1630
|
+
}, [s("span", vn, [d(k(ae), {
|
|
1631
1631
|
class: "w-[18px] h-[18px]",
|
|
1632
1632
|
"aria-hidden": "true"
|
|
1633
|
-
}),
|
|
1633
|
+
}), k(S) > 0 ? (b(), o("span", yn, O(k(S) > 99 ? "99+" : k(S)), 1)) : a("", !0)]), s("span", { class: h({ "lg:hidden": A.value }) }, "Notifications", 2)], 10, _n)) : a("", !0),
|
|
1634
1634
|
t.showThemeToggle ? (b(), o("button", {
|
|
1635
1635
|
key: 1,
|
|
1636
1636
|
type: "button",
|
|
1637
|
-
onClick: r[4] ||= (...e) =>
|
|
1638
|
-
title:
|
|
1639
|
-
"aria-label":
|
|
1640
|
-
"aria-pressed":
|
|
1641
|
-
class: h(["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", [
|
|
1637
|
+
onClick: r[4] ||= (...e) => k(p) && k(p)(...e),
|
|
1638
|
+
title: k(f) ? "Switch to light mode" : "Switch to dark mode",
|
|
1639
|
+
"aria-label": k(f) ? "Switch to light mode" : "Switch to dark mode",
|
|
1640
|
+
"aria-pressed": k(f),
|
|
1641
|
+
class: h(["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", [k(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 }]])
|
|
1642
1642
|
}, [
|
|
1643
|
-
(b(), i(
|
|
1643
|
+
(b(), i(D(k(f) ? k(xe) : k(be)), {
|
|
1644
1644
|
class: h(["hidden w-[18px] h-[18px] shrink-0", { "lg:block": A.value }]),
|
|
1645
1645
|
"aria-hidden": "true"
|
|
1646
1646
|
}, null, 8, ["class"])),
|
|
1647
|
-
s("span", { class: h({ "lg:hidden": A.value }) },
|
|
1648
|
-
s("span", { class: h(["ml-auto relative w-9 h-5 rounded-full transition-colors", [
|
|
1649
|
-
], 10,
|
|
1647
|
+
s("span", { class: h({ "lg:hidden": A.value }) }, O(k(f) ? "Switch to light" : "Switch to dark"), 3),
|
|
1648
|
+
s("span", { class: h(["ml-auto relative w-9 h-5 rounded-full transition-colors", [k(f) ? "bg-emerald-600" : "bg-gray-300", { "lg:hidden": A.value }]]) }, [s("span", { class: h(["absolute top-0.5 left-0.5 w-4 h-4 rounded-full bg-white shadow-sm transition-transform duration-300", k(f) ? "translate-x-4" : "translate-x-0"]) }, null, 2)], 2)
|
|
1649
|
+
], 10, bn)) : a("", !0),
|
|
1650
1650
|
t.collapsible ? (b(), o("button", {
|
|
1651
1651
|
key: 2,
|
|
1652
1652
|
type: "button",
|
|
1653
|
-
onClick: r[5] ||= (...e) =>
|
|
1654
|
-
title:
|
|
1655
|
-
"aria-label":
|
|
1656
|
-
"aria-pressed":
|
|
1657
|
-
class: h(["hidden lg: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", [
|
|
1658
|
-
}, [(b(), i(
|
|
1653
|
+
onClick: r[5] ||= (...e) => k(x) && k(x)(...e),
|
|
1654
|
+
title: k(y) ? "Expand sidebar" : "Collapse sidebar",
|
|
1655
|
+
"aria-label": k(y) ? "Expand sidebar" : "Collapse sidebar",
|
|
1656
|
+
"aria-pressed": k(y),
|
|
1657
|
+
class: h(["hidden lg: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", [k(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 }]])
|
|
1658
|
+
}, [(b(), i(D(k(y) ? k(ce) : k(se)), {
|
|
1659
1659
|
class: "w-[18px] h-[18px] shrink-0",
|
|
1660
1660
|
"aria-hidden": "true"
|
|
1661
|
-
})), s("span", { class: h({ "lg:hidden": A.value }) }, "Collapse", 2)], 10,
|
|
1662
|
-
s("div", { class: h({ "lg:hidden": A.value }) }, [
|
|
1663
|
-
s("div", { class: h({ "lg:hidden": A.value }) }, [
|
|
1661
|
+
})), s("span", { class: h({ "lg:hidden": A.value }) }, "Collapse", 2)], 10, xn)) : a("", !0),
|
|
1662
|
+
s("div", { class: h({ "lg:hidden": A.value }) }, [T(n.$slots, "status", {}, void 0, !0)], 2),
|
|
1663
|
+
s("div", { class: h({ "lg:hidden": A.value }) }, [T(n.$slots, "footer", {}, () => [t.appName || t.version ? (b(), o("div", {
|
|
1664
1664
|
key: 0,
|
|
1665
|
-
class: h(["flex items-center justify-center gap-2 text-xs", (
|
|
1665
|
+
class: h(["flex items-center justify-center gap-2 text-xs", (k(f), "text-gray-500")])
|
|
1666
1666
|
}, [s("span", null, [
|
|
1667
|
-
u(
|
|
1667
|
+
u(O(t.appName), 1),
|
|
1668
1668
|
t.appName && t.version ? (b(), o(e, { key: 0 }, [], 64)) : a("", !0),
|
|
1669
|
-
t.version ? (b(), o(e, { key: 1 }, [u("v" +
|
|
1669
|
+
t.version ? (b(), o(e, { key: 1 }, [u("v" + O(t.version), 1)], 64)) : a("", !0)
|
|
1670
1670
|
])], 2)) : a("", !0)], !0)], 2)
|
|
1671
1671
|
], 2)
|
|
1672
1672
|
])], 2)
|
|
1673
1673
|
]));
|
|
1674
1674
|
}
|
|
1675
|
-
}), [["__scopeId", "data-v-452beaf2"]]),
|
|
1675
|
+
}), [["__scopeId", "data-v-452beaf2"]]), Cn = {
|
|
1676
1676
|
key: 1,
|
|
1677
1677
|
class: "mt-4 flex justify-center py-6"
|
|
1678
|
-
},
|
|
1678
|
+
}, wn = {
|
|
1679
1679
|
key: 2,
|
|
1680
1680
|
class: "mt-4 text-sm text-red-500",
|
|
1681
1681
|
role: "alert"
|
|
1682
|
-
},
|
|
1682
|
+
}, Tn = {
|
|
1683
1683
|
key: 3,
|
|
1684
1684
|
class: "mt-4"
|
|
1685
|
-
},
|
|
1685
|
+
}, En = { class: "relative" }, Dn = ["placeholder"], On = {
|
|
1686
1686
|
key: 4,
|
|
1687
1687
|
class: "mt-3 max-h-64 overflow-y-auto"
|
|
1688
|
-
},
|
|
1688
|
+
}, kn = ["aria-pressed", "onClick"], An = { class: "flex-1 min-w-0" }, jn = {
|
|
1689
1689
|
key: 0,
|
|
1690
1690
|
class: "text-center py-6"
|
|
1691
|
-
},
|
|
1691
|
+
}, Mn = {
|
|
1692
1692
|
key: 1,
|
|
1693
1693
|
class: "text-center py-6"
|
|
1694
|
-
},
|
|
1694
|
+
}, Nn = ["disabled"], Pn = ["disabled"], Fn = /* @__PURE__ */ f({
|
|
1695
1695
|
__name: "BaseEntityPickerModal",
|
|
1696
1696
|
props: {
|
|
1697
1697
|
title: {},
|
|
@@ -1713,10 +1713,10 @@ var dn = ["aria-label", "aria-expanded"], fn = { class: "flex flex-col h-full" }
|
|
|
1713
1713
|
},
|
|
1714
1714
|
emits: ["confirm", "cancel"],
|
|
1715
1715
|
setup(t, { emit: n }) {
|
|
1716
|
-
let l = t, u = n, { isDark: f } =
|
|
1716
|
+
let l = t, u = n, { isDark: f } = V(), p = Y(), g = C([]), v = C(!1), y = C(""), x = C(null), S = C(""), E = C(null), D = r(() => {
|
|
1717
1717
|
let e = l.loader ? g.value : l.items;
|
|
1718
1718
|
return l.excludeId ? e.filter((e) => e.id !== l.excludeId) : e;
|
|
1719
|
-
}), A = r(() =>
|
|
1719
|
+
}), A = r(() => D.value.filter((e) => e.label.toLowerCase().includes(S.value.toLowerCase()))), ee = {
|
|
1720
1720
|
emerald: {
|
|
1721
1721
|
iconBg: "bg-emerald-50",
|
|
1722
1722
|
iconText: "text-emerald-600",
|
|
@@ -1762,7 +1762,7 @@ var dn = ["aria-label", "aria-expanded"], fn = { class: "flex flex-col h-full" }
|
|
|
1762
1762
|
confirmActive: "bg-amber-600 hover:bg-amber-700 cursor-pointer",
|
|
1763
1763
|
confirmDisabled: "bg-amber-400 cursor-not-allowed"
|
|
1764
1764
|
}
|
|
1765
|
-
},
|
|
1765
|
+
}, j = {
|
|
1766
1766
|
emerald: {
|
|
1767
1767
|
iconBg: "bg-emerald-900/30",
|
|
1768
1768
|
iconText: "text-emerald-400",
|
|
@@ -1808,7 +1808,7 @@ var dn = ["aria-label", "aria-expanded"], fn = { class: "flex flex-col h-full" }
|
|
|
1808
1808
|
confirmActive: "bg-amber-600 hover:bg-amber-700 cursor-pointer",
|
|
1809
1809
|
confirmDisabled: "bg-amber-400 cursor-not-allowed"
|
|
1810
1810
|
}
|
|
1811
|
-
},
|
|
1811
|
+
}, N = r(() => (f.value ? j : ee)[l.variant]);
|
|
1812
1812
|
_(async () => {
|
|
1813
1813
|
if (l.loader) {
|
|
1814
1814
|
v.value = !0;
|
|
@@ -1822,60 +1822,60 @@ var dn = ["aria-label", "aria-expanded"], fn = { class: "flex flex-col h-full" }
|
|
|
1822
1822
|
}
|
|
1823
1823
|
await m(), E.value?.focus();
|
|
1824
1824
|
});
|
|
1825
|
-
function
|
|
1825
|
+
function P() {
|
|
1826
1826
|
!x.value || l.submitting || u("confirm", x.value);
|
|
1827
1827
|
}
|
|
1828
|
-
function
|
|
1828
|
+
function te() {
|
|
1829
1829
|
l.submitting || u("cancel");
|
|
1830
1830
|
}
|
|
1831
1831
|
return (n, r) => (b(), i(Vt, {
|
|
1832
1832
|
title: t.title,
|
|
1833
|
-
icon:
|
|
1834
|
-
"icon-bg-class":
|
|
1835
|
-
"icon-class":
|
|
1833
|
+
icon: k(ge),
|
|
1834
|
+
"icon-bg-class": N.value.iconBg,
|
|
1835
|
+
"icon-class": N.value.iconText,
|
|
1836
1836
|
"manual-close": t.submitting,
|
|
1837
|
-
onCancel:
|
|
1837
|
+
onCancel: te
|
|
1838
1838
|
}, c({
|
|
1839
|
-
footer:
|
|
1839
|
+
footer: F(() => [s("button", {
|
|
1840
1840
|
type: "button",
|
|
1841
1841
|
disabled: t.submitting,
|
|
1842
|
-
class: h(["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",
|
|
1843
|
-
onClick:
|
|
1844
|
-
},
|
|
1842
|
+
class: h(["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", k(p).ghostButton]),
|
|
1843
|
+
onClick: te
|
|
1844
|
+
}, O(t.cancelText), 11, Nn), s("button", {
|
|
1845
1845
|
type: "button",
|
|
1846
1846
|
disabled: !x.value || t.submitting,
|
|
1847
|
-
class: h(["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", !x.value || t.submitting ?
|
|
1848
|
-
onClick:
|
|
1849
|
-
},
|
|
1850
|
-
default:
|
|
1847
|
+
class: h(["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", !x.value || t.submitting ? N.value.confirmDisabled : N.value.confirmActive]),
|
|
1848
|
+
onClick: P
|
|
1849
|
+
}, O(t.submitting ? t.submittingText : t.confirmText), 11, Pn)]),
|
|
1850
|
+
default: F(() => [
|
|
1851
1851
|
t.message ? (b(), o("p", {
|
|
1852
1852
|
key: 0,
|
|
1853
|
-
class: h(["text-sm",
|
|
1854
|
-
},
|
|
1855
|
-
v.value ? (b(), o("div",
|
|
1856
|
-
!v.value && !y.value &&
|
|
1857
|
-
class: h(["absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4",
|
|
1853
|
+
class: h(["text-sm", k(f) ? "text-gray-300" : "text-gray-600"])
|
|
1854
|
+
}, O(t.message), 3)) : a("", !0),
|
|
1855
|
+
v.value ? (b(), o("div", Cn, [d(ct, { color: "emerald" })])) : y.value ? (b(), o("div", wn, O(y.value), 1)) : a("", !0),
|
|
1856
|
+
!v.value && !y.value && D.value.length > 0 ? (b(), o("div", Tn, [s("div", En, [d(k(ve), {
|
|
1857
|
+
class: h(["absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4", k(p).dimText]),
|
|
1858
1858
|
"aria-hidden": "true"
|
|
1859
|
-
}, null, 8, ["class"]),
|
|
1859
|
+
}, null, 8, ["class"]), I(s("input", {
|
|
1860
1860
|
ref_key: "searchInputRef",
|
|
1861
1861
|
ref: E,
|
|
1862
|
-
"onUpdate:modelValue": r[0] ||= (e) =>
|
|
1862
|
+
"onUpdate:modelValue": r[0] ||= (e) => S.value = e,
|
|
1863
1863
|
type: "text",
|
|
1864
1864
|
placeholder: t.searchPlaceholder,
|
|
1865
|
-
class: h(["w-full pl-9 pr-3 py-2 text-sm rounded-md border outline-none transition-colors", [
|
|
1866
|
-
}, null, 10,
|
|
1867
|
-
!v.value && !y.value ? (b(), o("div",
|
|
1865
|
+
class: h(["w-full pl-9 pr-3 py-2 text-sm rounded-md border outline-none transition-colors", [k(f) ? "bg-gray-800 border-gray-600 text-gray-200 placeholder-gray-500" : "bg-white border-gray-300 text-gray-700 placeholder-gray-400", N.value.inputFocus]])
|
|
1866
|
+
}, null, 10, Dn), [[M, S.value]])])])) : a("", !0),
|
|
1867
|
+
!v.value && !y.value ? (b(), o("div", On, [(b(!0), o(e, null, w(A.value, (e) => (b(), o("button", {
|
|
1868
1868
|
key: e.id,
|
|
1869
1869
|
type: "button",
|
|
1870
1870
|
"aria-pressed": x.value === e.id,
|
|
1871
|
-
class: h(["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", [x.value === e.id ?
|
|
1871
|
+
class: h(["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", [x.value === e.id ? N.value.selectedRow : k(f) ? "hover:bg-gray-800 border border-transparent" : "hover:bg-gray-50 border border-transparent"]]),
|
|
1872
1872
|
onClick: (t) => x.value = e.id
|
|
1873
1873
|
}, [
|
|
1874
|
-
d(
|
|
1875
|
-
s("div",
|
|
1874
|
+
d(k(ge), { class: h(["w-5 h-5 flex-shrink-0", k(p).dimText]) }, null, 8, ["class"]),
|
|
1875
|
+
s("div", An, [s("p", { class: h(["text-sm font-medium truncate", k(p).bodyText]) }, O(e.label), 3)]),
|
|
1876
1876
|
x.value === e.id ? (b(), o("div", {
|
|
1877
1877
|
key: 0,
|
|
1878
|
-
class: h(["w-5 h-5 rounded-full flex items-center justify-center",
|
|
1878
|
+
class: h(["w-5 h-5 rounded-full flex items-center justify-center", N.value.checkBg])
|
|
1879
1879
|
}, [...r[1] ||= [s("svg", {
|
|
1880
1880
|
class: "w-3 h-3 text-white",
|
|
1881
1881
|
fill: "none",
|
|
@@ -1888,12 +1888,12 @@ var dn = ["aria-label", "aria-expanded"], fn = { class: "flex flex-col h-full" }
|
|
|
1888
1888
|
"stroke-linejoin": "round",
|
|
1889
1889
|
d: "M5 13l4 4L19 7"
|
|
1890
1890
|
})], -1)]], 2)) : a("", !0)
|
|
1891
|
-
], 10,
|
|
1891
|
+
], 10, kn))), 128)), D.value.length === 0 ? (b(), o("div", jn, [s("p", { class: h(["text-sm", k(p).dimText]) }, O(t.emptyMessage), 3)])) : A.value.length === 0 ? (b(), o("div", Mn, [s("p", { class: h(["text-sm", k(p).dimText]) }, O(t.noMatchMessage), 3)])) : a("", !0)])) : a("", !0)
|
|
1892
1892
|
]),
|
|
1893
1893
|
_: 2
|
|
1894
1894
|
}, [n.$slots.icon ? {
|
|
1895
1895
|
name: "icon",
|
|
1896
|
-
fn:
|
|
1896
|
+
fn: F(() => [T(n.$slots, "icon")]),
|
|
1897
1897
|
key: "0"
|
|
1898
1898
|
} : void 0]), 1032, [
|
|
1899
1899
|
"title",
|
|
@@ -1903,10 +1903,10 @@ var dn = ["aria-label", "aria-expanded"], fn = { class: "flex flex-col h-full" }
|
|
|
1903
1903
|
"manual-close"
|
|
1904
1904
|
]));
|
|
1905
1905
|
}
|
|
1906
|
-
}),
|
|
1906
|
+
}), In = {
|
|
1907
1907
|
href: "#main-content",
|
|
1908
1908
|
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"
|
|
1909
|
-
},
|
|
1909
|
+
}, Ln = ["inert"], Rn = /* @__PURE__ */ f({
|
|
1910
1910
|
__name: "BaseAppLayout",
|
|
1911
1911
|
props: {
|
|
1912
1912
|
showSidebar: {
|
|
@@ -1916,19 +1916,19 @@ var dn = ["aria-label", "aria-expanded"], fn = { class: "flex flex-col h-full" }
|
|
|
1916
1916
|
skipLinkLabel: { default: "Skip to main content" }
|
|
1917
1917
|
},
|
|
1918
1918
|
setup(e) {
|
|
1919
|
-
let t = e, { isDark: n } =
|
|
1920
|
-
return (t, r) => (b(), o("div", { class: h(["min-h-screen transition-colors duration-300",
|
|
1921
|
-
s("a",
|
|
1922
|
-
l.value ?
|
|
1919
|
+
let t = e, { isDark: n } = V(), { mobileOpen: i } = rn(), { collapsed: c } = cn(), l = r(() => t.showSidebar);
|
|
1920
|
+
return (t, r) => (b(), o("div", { class: h(["min-h-screen transition-colors duration-300", k(n) ? "bg-gray-950 text-gray-100" : "bg-gray-50 text-gray-800"]) }, [
|
|
1921
|
+
s("a", In, O(e.skipLinkLabel), 1),
|
|
1922
|
+
l.value ? T(t.$slots, "sidebar", { key: 0 }) : a("", !0),
|
|
1923
1923
|
s("main", {
|
|
1924
1924
|
id: "main-content",
|
|
1925
1925
|
tabindex: "-1",
|
|
1926
|
-
inert: l.value &&
|
|
1927
|
-
class: h(["transition-all duration-300", l.value ?
|
|
1928
|
-
}, [
|
|
1926
|
+
inert: l.value && k(i) ? !0 : void 0,
|
|
1927
|
+
class: h(["transition-all duration-300", l.value ? k(c) ? "pt-14 lg:pt-0 lg:ml-16" : "pt-14 lg:pt-0 lg:ml-60" : ""])
|
|
1928
|
+
}, [T(t.$slots, "default")], 10, Ln)
|
|
1929
1929
|
], 2));
|
|
1930
1930
|
}
|
|
1931
|
-
}),
|
|
1931
|
+
}), zn = { class: "flex flex-wrap items-center justify-between gap-3 mb-8" }, Bn = { class: "flex items-center gap-3 min-w-0" }, Vn = { class: "flex items-center gap-2" }, Hn = /* @__PURE__ */ f({
|
|
1932
1932
|
__name: "BasePageHeader",
|
|
1933
1933
|
props: {
|
|
1934
1934
|
title: {},
|
|
@@ -1937,7 +1937,7 @@ var dn = ["aria-label", "aria-expanded"], fn = { class: "flex flex-col h-full" }
|
|
|
1937
1937
|
maxWidthClass: { default: "max-w-4xl" }
|
|
1938
1938
|
},
|
|
1939
1939
|
setup(e) {
|
|
1940
|
-
let t = e, { isDark: n } =
|
|
1940
|
+
let t = e, { isDark: n } = V(), i = Y(), c = r(() => {
|
|
1941
1941
|
let e = {
|
|
1942
1942
|
emerald: {
|
|
1943
1943
|
dark: "bg-emerald-500/10",
|
|
@@ -1978,16 +1978,16 @@ var dn = ["aria-label", "aria-expanded"], fn = { class: "flex flex-col h-full" }
|
|
|
1978
1978
|
}[t.iconColor];
|
|
1979
1979
|
return n.value ? e.dark : e.light;
|
|
1980
1980
|
});
|
|
1981
|
-
return (t, n) => (b(), o("div", { class: h(["mx-auto px-4 sm:px-6", e.maxWidthClass]) }, [s("div",
|
|
1981
|
+
return (t, n) => (b(), o("div", { class: h(["mx-auto px-4 sm:px-6", e.maxWidthClass]) }, [s("div", zn, [s("div", Bn, [s("div", { class: h(["w-10 h-10 rounded-lg flex items-center justify-center", c.value]) }, [T(t.$slots, "icon", { iconClass: l.value })], 2), s("div", null, [s("h1", { class: h(["text-2xl font-bold", k(i).primaryTextSoft]) }, O(e.title), 3), e.subtitle ? (b(), o("p", {
|
|
1982
1982
|
key: 0,
|
|
1983
|
-
class: h(["text-sm",
|
|
1984
|
-
},
|
|
1983
|
+
class: h(["text-sm", k(i).dimTextAlt])
|
|
1984
|
+
}, O(e.subtitle), 3)) : a("", !0)])]), s("div", Vn, [T(t.$slots, "actions")])])], 2));
|
|
1985
1985
|
}
|
|
1986
|
-
}),
|
|
1986
|
+
}), Un = [
|
|
1987
1987
|
"type",
|
|
1988
1988
|
"disabled",
|
|
1989
1989
|
"title"
|
|
1990
|
-
],
|
|
1990
|
+
], Wn = { key: 0 }, Gn = /* @__PURE__ */ f({
|
|
1991
1991
|
__name: "BaseToolbarButton",
|
|
1992
1992
|
props: {
|
|
1993
1993
|
label: { default: "" },
|
|
@@ -2001,7 +2001,11 @@ var dn = ["aria-label", "aria-expanded"], fn = { class: "flex flex-col h-full" }
|
|
|
2001
2001
|
},
|
|
2002
2002
|
emits: ["click"],
|
|
2003
2003
|
setup(e) {
|
|
2004
|
-
let t = e, { isDark: n } =
|
|
2004
|
+
let t = e, { isDark: n } = V(), i = {
|
|
2005
|
+
neutral: "px-3 py-2 rounded-lg font-medium disabled:opacity-50",
|
|
2006
|
+
danger: "px-3 py-2 rounded-lg font-medium disabled:opacity-50",
|
|
2007
|
+
ghost: "h-9 px-4 rounded-md font-semibold disabled:opacity-40 disabled:hover:bg-slate-50 dark:disabled:hover:bg-slate-900"
|
|
2008
|
+
}, s = r(() => {
|
|
2005
2009
|
let e = {
|
|
2006
2010
|
neutral: {
|
|
2007
2011
|
dark: "bg-gray-800 text-gray-100 border-gray-700 hover:bg-gray-700",
|
|
@@ -2010,24 +2014,28 @@ var dn = ["aria-label", "aria-expanded"], fn = { class: "flex flex-col h-full" }
|
|
|
2010
2014
|
danger: {
|
|
2011
2015
|
dark: "bg-red-600 text-white border-red-600 hover:bg-red-500",
|
|
2012
2016
|
light: "bg-red-600 text-white border-red-600 hover:bg-red-700"
|
|
2017
|
+
},
|
|
2018
|
+
ghost: {
|
|
2019
|
+
dark: "border-slate-300 dark:border-slate-600 bg-slate-50 dark:bg-slate-900 text-slate-600 dark:text-slate-300 hover:bg-slate-100 dark:hover:bg-slate-800",
|
|
2020
|
+
light: "border-slate-300 dark:border-slate-600 bg-slate-50 dark:bg-slate-900 text-slate-600 dark:text-slate-300 hover:bg-slate-100 dark:hover:bg-slate-800"
|
|
2013
2021
|
}
|
|
2014
2022
|
}[t.variant];
|
|
2015
|
-
return n.value ? e.dark : e.light;
|
|
2023
|
+
return [i[t.variant], n.value ? e.dark : e.light];
|
|
2016
2024
|
});
|
|
2017
2025
|
return (t, n) => (b(), o("button", {
|
|
2018
2026
|
type: e.type,
|
|
2019
2027
|
disabled: e.disabled,
|
|
2020
2028
|
title: e.title,
|
|
2021
|
-
class: h(["inline-flex shrink-0 items-center gap-2
|
|
2029
|
+
class: h(["inline-flex shrink-0 items-center gap-2 text-sm border transition-colors cursor-pointer disabled:cursor-not-allowed whitespace-nowrap focus:outline-none focus-visible:ring-2 focus-visible:ring-emerald-500", s.value]),
|
|
2022
2030
|
onClick: n[0] ||= (e) => t.$emit("click", e)
|
|
2023
|
-
}, [
|
|
2031
|
+
}, [T(t.$slots, "icon", { iconClass: "w-4 h-4" }), e.label ? (b(), o("span", Wn, O(e.label), 1)) : a("", !0)], 10, Un));
|
|
2024
2032
|
}
|
|
2025
|
-
}),
|
|
2033
|
+
}), Kn = [
|
|
2026
2034
|
"type",
|
|
2027
2035
|
"disabled",
|
|
2028
2036
|
"title",
|
|
2029
2037
|
"aria-label"
|
|
2030
|
-
],
|
|
2038
|
+
], qn = { key: 0 }, Jn = /* @__PURE__ */ f({
|
|
2031
2039
|
__name: "BaseActionButton",
|
|
2032
2040
|
props: {
|
|
2033
2041
|
label: { default: "" },
|
|
@@ -2046,7 +2054,7 @@ var dn = ["aria-label", "aria-expanded"], fn = { class: "flex flex-col h-full" }
|
|
|
2046
2054
|
},
|
|
2047
2055
|
emits: ["click"],
|
|
2048
2056
|
setup(e) {
|
|
2049
|
-
let t = e, { isDark: n } =
|
|
2057
|
+
let t = e, { isDark: n } = V(), i = r(() => {
|
|
2050
2058
|
let e = {
|
|
2051
2059
|
emerald: {
|
|
2052
2060
|
dark: "text-emerald-400 hover:bg-emerald-500/10",
|
|
@@ -2126,9 +2134,9 @@ var dn = ["aria-label", "aria-expanded"], fn = { class: "flex flex-col h-full" }
|
|
|
2126
2134
|
"aria-label": e.ariaLabel,
|
|
2127
2135
|
class: h(["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]]),
|
|
2128
2136
|
onClick: n[0] ||= (e) => t.$emit("click", e)
|
|
2129
|
-
}, [
|
|
2137
|
+
}, [T(t.$slots, "icon", { iconClass: "w-4 h-4" }), e.label ? (b(), o("span", qn, O(e.label), 1)) : a("", !0)], 10, Kn));
|
|
2130
2138
|
}
|
|
2131
|
-
}),
|
|
2139
|
+
}), Yn = ["title", "aria-label"], Xn = /* @__PURE__ */ f({
|
|
2132
2140
|
__name: "BaseCopyButton",
|
|
2133
2141
|
props: {
|
|
2134
2142
|
text: {},
|
|
@@ -2139,7 +2147,7 @@ var dn = ["aria-label", "aria-expanded"], fn = { class: "flex flex-col h-full" }
|
|
|
2139
2147
|
},
|
|
2140
2148
|
emits: ["copied", "error"],
|
|
2141
2149
|
setup(e, { emit: t }) {
|
|
2142
|
-
let n = e, a = t, { isDark: s } =
|
|
2150
|
+
let n = e, a = t, { isDark: s } = V(), c = C(!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"}`);
|
|
2143
2151
|
async function p(e) {
|
|
2144
2152
|
try {
|
|
2145
2153
|
if (navigator.clipboard?.writeText) {
|
|
@@ -2169,28 +2177,28 @@ var dn = ["aria-label", "aria-expanded"], fn = { class: "flex flex-col h-full" }
|
|
|
2169
2177
|
"aria-label": d.value,
|
|
2170
2178
|
class: h(f.value),
|
|
2171
2179
|
onClick: m
|
|
2172
|
-
}, [c.value ? (b(), i(
|
|
2180
|
+
}, [c.value ? (b(), i(k(de), {
|
|
2173
2181
|
key: 0,
|
|
2174
2182
|
class: h(e.iconClass),
|
|
2175
2183
|
"aria-hidden": "true"
|
|
2176
|
-
}, null, 8, ["class"])) : (b(), i(
|
|
2184
|
+
}, null, 8, ["class"])) : (b(), i(k(fe), {
|
|
2177
2185
|
key: 1,
|
|
2178
2186
|
class: h(e.iconClass),
|
|
2179
2187
|
"aria-hidden": "true"
|
|
2180
|
-
}, null, 8, ["class"]))], 10,
|
|
2188
|
+
}, null, 8, ["class"]))], 10, Yn));
|
|
2181
2189
|
}
|
|
2182
|
-
}),
|
|
2190
|
+
}), Zn = ["disabled", "aria-busy"], Qn = {
|
|
2183
2191
|
key: 0,
|
|
2184
2192
|
class: "w-5 h-5 animate-spin shrink-0",
|
|
2185
2193
|
viewBox: "0 0 24 24",
|
|
2186
2194
|
fill: "none",
|
|
2187
2195
|
"aria-hidden": "true"
|
|
2188
|
-
},
|
|
2196
|
+
}, $n = {
|
|
2189
2197
|
key: 1,
|
|
2190
2198
|
class: "w-5 h-5 shrink-0",
|
|
2191
2199
|
viewBox: "0 0 48 48",
|
|
2192
2200
|
"aria-hidden": "true"
|
|
2193
|
-
},
|
|
2201
|
+
}, er = /* @__PURE__ */ f({
|
|
2194
2202
|
__name: "BaseGoogleSignInButton",
|
|
2195
2203
|
props: {
|
|
2196
2204
|
label: { default: "Sign in with Google" },
|
|
@@ -2209,7 +2217,7 @@ var dn = ["aria-label", "aria-expanded"], fn = { class: "flex flex-col h-full" }
|
|
|
2209
2217
|
},
|
|
2210
2218
|
emits: ["click"],
|
|
2211
2219
|
setup(e, { emit: t }) {
|
|
2212
|
-
let n = e, i = t, { isDark: a } =
|
|
2220
|
+
let n = e, i = t, { isDark: a } = V(), c = r(() => n.disabled || n.loading);
|
|
2213
2221
|
function u() {
|
|
2214
2222
|
c.value || i("click");
|
|
2215
2223
|
}
|
|
@@ -2218,8 +2226,8 @@ var dn = ["aria-label", "aria-expanded"], fn = { class: "flex flex-col h-full" }
|
|
|
2218
2226
|
disabled: c.value,
|
|
2219
2227
|
"aria-busy": e.loading,
|
|
2220
2228
|
onClick: u,
|
|
2221
|
-
class: h(["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" : "",
|
|
2222
|
-
}, [e.loading ? (b(), o("svg",
|
|
2229
|
+
class: h(["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" : "", k(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"]])
|
|
2230
|
+
}, [e.loading ? (b(), o("svg", Qn, [...n[0] ||= [s("circle", {
|
|
2223
2231
|
class: "opacity-25",
|
|
2224
2232
|
cx: "12",
|
|
2225
2233
|
cy: "12",
|
|
@@ -2230,18 +2238,18 @@ var dn = ["aria-label", "aria-expanded"], fn = { class: "flex flex-col h-full" }
|
|
|
2230
2238
|
class: "opacity-75",
|
|
2231
2239
|
fill: "currentColor",
|
|
2232
2240
|
d: "M4 12a8 8 0 0 1 8-8V0C5.4 0 0 5.4 0 12h4z"
|
|
2233
|
-
}, null, -1)]])) : (b(), o("svg",
|
|
2241
|
+
}, null, -1)]])) : (b(), o("svg", $n, [...n[1] ||= [l("<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, O(e.label), 1)], 10, Zn));
|
|
2234
2242
|
}
|
|
2235
|
-
}),
|
|
2243
|
+
}), tr = {
|
|
2236
2244
|
key: 0,
|
|
2237
2245
|
class: "flex justify-center mb-6"
|
|
2238
|
-
},
|
|
2246
|
+
}, nr = { class: "mb-6 text-center" }, rr = { class: "flex items-center gap-3 my-5" }, ir = ["disabled"], ar = { class: "flex items-center justify-between mb-1.5" }, or = { class: "relative" }, sr = ["type", "disabled"], cr = ["aria-label", "aria-pressed"], lr = ["disabled"], ur = ["disabled", "aria-busy"], dr = {
|
|
2239
2247
|
key: 0,
|
|
2240
2248
|
class: "w-4 h-4 animate-spin",
|
|
2241
2249
|
viewBox: "0 0 24 24",
|
|
2242
2250
|
fill: "none",
|
|
2243
2251
|
"aria-hidden": "true"
|
|
2244
|
-
},
|
|
2252
|
+
}, fr = /* @__PURE__ */ f({
|
|
2245
2253
|
__name: "BaseLoginForm",
|
|
2246
2254
|
props: {
|
|
2247
2255
|
title: { default: "Sign in" },
|
|
@@ -2267,7 +2275,7 @@ var dn = ["aria-label", "aria-expanded"], fn = { class: "flex flex-col h-full" }
|
|
|
2267
2275
|
},
|
|
2268
2276
|
emits: ["submit", "google-sign-in"],
|
|
2269
2277
|
setup(t, { emit: n }) {
|
|
2270
|
-
let i = t, c = n, { isDark: l } =
|
|
2278
|
+
let i = t, c = n, { isDark: l } = V(), f = Y(), p = C(""), m = C(""), g = C(!1), _ = C(!1), v = r(() => i.loading || i.googleLoading);
|
|
2271
2279
|
function y() {
|
|
2272
2280
|
v.value || c("submit", {
|
|
2273
2281
|
email: p.value,
|
|
@@ -2275,34 +2283,34 @@ var dn = ["aria-label", "aria-expanded"], fn = { class: "flex flex-col h-full" }
|
|
|
2275
2283
|
...i.showRemember ? { remember: g.value } : {}
|
|
2276
2284
|
});
|
|
2277
2285
|
}
|
|
2278
|
-
return (n, r) => (b(), o("div", { class: h(["w-full max-w-sm mx-auto rounded-xl border shadow-sm p-6 sm:p-8",
|
|
2279
|
-
n.$slots.logo ? (b(), o("div",
|
|
2280
|
-
s("div",
|
|
2286
|
+
return (n, r) => (b(), o("div", { class: h(["w-full max-w-sm mx-auto rounded-xl border shadow-sm p-6 sm:p-8", k(f).card]) }, [
|
|
2287
|
+
n.$slots.logo ? (b(), o("div", tr, [T(n.$slots, "logo")])) : a("", !0),
|
|
2288
|
+
s("div", nr, [s("h1", { class: h(["text-xl font-semibold", k(f).primaryText]) }, O(t.title), 3), t.subtitle ? (b(), o("p", {
|
|
2281
2289
|
key: 0,
|
|
2282
|
-
class: h(["mt-1 text-sm",
|
|
2283
|
-
},
|
|
2290
|
+
class: h(["mt-1 text-sm", k(f).mutedText])
|
|
2291
|
+
}, O(t.subtitle), 3)) : a("", !0)]),
|
|
2284
2292
|
t.error ? (b(), o("div", {
|
|
2285
2293
|
key: 1,
|
|
2286
2294
|
role: "alert",
|
|
2287
|
-
class: h(["mb-4 rounded-lg border px-3 py-2 text-sm",
|
|
2288
|
-
},
|
|
2289
|
-
t.showGoogle ? (b(), o(e, { key: 2 }, [d(
|
|
2295
|
+
class: h(["mb-4 rounded-lg border px-3 py-2 text-sm", k(l) ? "bg-red-500/10 border-red-500/30 text-red-300" : "bg-red-50 border-red-200 text-red-700"])
|
|
2296
|
+
}, O(t.error), 3)) : a("", !0),
|
|
2297
|
+
t.showGoogle ? (b(), o(e, { key: 2 }, [d(er, {
|
|
2290
2298
|
loading: t.googleLoading,
|
|
2291
2299
|
disabled: t.loading,
|
|
2292
2300
|
onClick: r[0] ||= (e) => c("google-sign-in")
|
|
2293
|
-
}, null, 8, ["loading", "disabled"]), s("div",
|
|
2294
|
-
s("span", { class: h(["h-px flex-1",
|
|
2295
|
-
s("span", { class: h(["text-xs uppercase tracking-wider",
|
|
2296
|
-
s("span", { class: h(["h-px flex-1",
|
|
2301
|
+
}, null, 8, ["loading", "disabled"]), s("div", rr, [
|
|
2302
|
+
s("span", { class: h(["h-px flex-1", k(l) ? "bg-gray-700" : "bg-gray-200"]) }, null, 2),
|
|
2303
|
+
s("span", { class: h(["text-xs uppercase tracking-wider", k(f).dimTextAlt]) }, "or", 2),
|
|
2304
|
+
s("span", { class: h(["h-px flex-1", k(l) ? "bg-gray-700" : "bg-gray-200"]) }, null, 2)
|
|
2297
2305
|
])], 64)) : a("", !0),
|
|
2298
2306
|
s("form", {
|
|
2299
2307
|
class: "space-y-4",
|
|
2300
|
-
onSubmit:
|
|
2308
|
+
onSubmit: L(y, ["prevent"])
|
|
2301
2309
|
}, [
|
|
2302
2310
|
s("div", null, [s("label", {
|
|
2303
2311
|
for: "login-email",
|
|
2304
|
-
class: h(["block mb-1.5 text-sm font-medium",
|
|
2305
|
-
}, " Email ", 2),
|
|
2312
|
+
class: h(["block mb-1.5 text-sm font-medium", k(f).label])
|
|
2313
|
+
}, " Email ", 2), I(s("input", {
|
|
2306
2314
|
id: "login-email",
|
|
2307
2315
|
"onUpdate:modelValue": r[1] ||= (e) => p.value = e,
|
|
2308
2316
|
type: "email",
|
|
@@ -2311,12 +2319,12 @@ var dn = ["aria-label", "aria-expanded"], fn = { class: "flex flex-col h-full" }
|
|
|
2311
2319
|
required: "",
|
|
2312
2320
|
disabled: v.value,
|
|
2313
2321
|
placeholder: "you@example.com",
|
|
2314
|
-
class: h(["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",
|
|
2315
|
-
}, null, 10,
|
|
2316
|
-
s("div", null, [s("div",
|
|
2322
|
+
class: h(["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", k(f).inputWithPlaceholder])
|
|
2323
|
+
}, null, 10, ir), [[M, p.value]])]),
|
|
2324
|
+
s("div", null, [s("div", ar, [s("label", {
|
|
2317
2325
|
for: "login-password",
|
|
2318
|
-
class: h(["block text-sm font-medium",
|
|
2319
|
-
}, " Password ", 2),
|
|
2326
|
+
class: h(["block text-sm font-medium", k(f).label])
|
|
2327
|
+
}, " Password ", 2), T(n.$slots, "forgot")]), s("div", or, [I(s("input", {
|
|
2320
2328
|
id: "login-password",
|
|
2321
2329
|
"onUpdate:modelValue": r[2] ||= (e) => m.value = e,
|
|
2322
2330
|
type: _.value ? "text" : "password",
|
|
@@ -2325,29 +2333,29 @@ var dn = ["aria-label", "aria-expanded"], fn = { class: "flex flex-col h-full" }
|
|
|
2325
2333
|
required: "",
|
|
2326
2334
|
disabled: v.value,
|
|
2327
2335
|
placeholder: "••••••••",
|
|
2328
|
-
class: h(["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",
|
|
2329
|
-
}, null, 10,
|
|
2336
|
+
class: h(["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", k(f).inputWithPlaceholder])
|
|
2337
|
+
}, null, 10, sr), [[j, m.value]]), s("button", {
|
|
2330
2338
|
type: "button",
|
|
2331
2339
|
onClick: r[3] ||= (e) => _.value = !_.value,
|
|
2332
2340
|
"aria-label": _.value ? "Hide password" : "Show password",
|
|
2333
2341
|
"aria-pressed": _.value,
|
|
2334
|
-
class: h(["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",
|
|
2335
|
-
},
|
|
2342
|
+
class: h(["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", k(f).mutedText])
|
|
2343
|
+
}, O(_.value ? "Hide" : "Show"), 11, cr)])]),
|
|
2336
2344
|
t.showRemember ? (b(), o("label", {
|
|
2337
2345
|
key: 0,
|
|
2338
|
-
class: h(["flex items-center gap-2 text-sm cursor-pointer select-none",
|
|
2339
|
-
}, [
|
|
2346
|
+
class: h(["flex items-center gap-2 text-sm cursor-pointer select-none", k(f).bodyText])
|
|
2347
|
+
}, [I(s("input", {
|
|
2340
2348
|
"onUpdate:modelValue": r[4] ||= (e) => g.value = e,
|
|
2341
2349
|
type: "checkbox",
|
|
2342
2350
|
disabled: v.value,
|
|
2343
2351
|
class: "w-4 h-4 rounded border-gray-300 text-emerald-600 focus:ring-emerald-500"
|
|
2344
|
-
}, null, 8,
|
|
2352
|
+
}, null, 8, lr), [[ee, g.value]]), r[5] ||= u(" Remember me ", -1)], 2)) : a("", !0),
|
|
2345
2353
|
s("button", {
|
|
2346
2354
|
type: "submit",
|
|
2347
2355
|
disabled: v.value,
|
|
2348
2356
|
"aria-busy": t.loading,
|
|
2349
2357
|
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"
|
|
2350
|
-
}, [t.loading ? (b(), o("svg",
|
|
2358
|
+
}, [t.loading ? (b(), o("svg", dr, [...r[6] ||= [s("circle", {
|
|
2351
2359
|
class: "opacity-25",
|
|
2352
2360
|
cx: "12",
|
|
2353
2361
|
cy: "12",
|
|
@@ -2358,18 +2366,18 @@ var dn = ["aria-label", "aria-expanded"], fn = { class: "flex flex-col h-full" }
|
|
|
2358
2366
|
class: "opacity-75",
|
|
2359
2367
|
fill: "currentColor",
|
|
2360
2368
|
d: "M4 12a8 8 0 0 1 8-8V0C5.4 0 0 5.4 0 12h4z"
|
|
2361
|
-
}, null, -1)]])) : a("", !0), u(" " +
|
|
2369
|
+
}, null, -1)]])) : a("", !0), u(" " + O(t.submitLabel), 1)], 8, ur)
|
|
2362
2370
|
], 32),
|
|
2363
2371
|
n.$slots.footer ? (b(), o("div", {
|
|
2364
2372
|
key: 3,
|
|
2365
|
-
class: h(["mt-6 text-center text-sm",
|
|
2366
|
-
}, [
|
|
2373
|
+
class: h(["mt-6 text-center text-sm", k(f).mutedText])
|
|
2374
|
+
}, [T(n.$slots, "footer")], 2)) : a("", !0)
|
|
2367
2375
|
], 2));
|
|
2368
2376
|
}
|
|
2369
|
-
}),
|
|
2377
|
+
}), pr = ["aria-label"], mr = { class: "flex-1 overflow-y-auto" }, hr = {
|
|
2370
2378
|
key: 0,
|
|
2371
2379
|
class: "flex flex-col items-center justify-center text-center px-6 py-16 gap-3"
|
|
2372
|
-
},
|
|
2380
|
+
}, gr = ["onClick"], _r = { class: "min-w-0 flex-1" }, vr = { class: "flex items-baseline justify-between gap-2" }, yr = /* @__PURE__ */ f({
|
|
2373
2381
|
__name: "BaseNotificationPanel",
|
|
2374
2382
|
props: {
|
|
2375
2383
|
title: { default: "Notifications" },
|
|
@@ -2381,7 +2389,7 @@ var dn = ["aria-label", "aria-expanded"], fn = { class: "flex flex-col h-full" }
|
|
|
2381
2389
|
},
|
|
2382
2390
|
emits: ["select"],
|
|
2383
2391
|
setup(c, { emit: l }) {
|
|
2384
|
-
let f = l, { isDark: p } =
|
|
2392
|
+
let f = l, { isDark: p } = V(), m = Y(), { notifications: g, unreadCount: _, open: v, closePanel: y, markAllRead: x, markRead: S } = dn(), C = {
|
|
2385
2393
|
info: "bg-sky-500",
|
|
2386
2394
|
success: "bg-emerald-500",
|
|
2387
2395
|
warning: "bg-amber-500",
|
|
@@ -2398,11 +2406,11 @@ var dn = ["aria-label", "aria-expanded"], fn = { class: "flex flex-col h-full" }
|
|
|
2398
2406
|
"leave-active-class": "transition-opacity duration-200",
|
|
2399
2407
|
"leave-to-class": "opacity-0"
|
|
2400
2408
|
}, {
|
|
2401
|
-
default:
|
|
2409
|
+
default: F(() => [k(v) ? (b(), o("div", {
|
|
2402
2410
|
key: 0,
|
|
2403
2411
|
class: "fixed inset-0 z-[60] bg-black/50",
|
|
2404
2412
|
"aria-hidden": "true",
|
|
2405
|
-
onClick: l[0] ||= (...e) =>
|
|
2413
|
+
onClick: l[0] ||= (...e) => k(y) && k(y)(...e)
|
|
2406
2414
|
})) : a("", !0)]),
|
|
2407
2415
|
_: 1
|
|
2408
2416
|
}), d(n, {
|
|
@@ -2411,55 +2419,55 @@ var dn = ["aria-label", "aria-expanded"], fn = { class: "flex flex-col h-full" }
|
|
|
2411
2419
|
"leave-active-class": "transition-transform duration-300 ease-in",
|
|
2412
2420
|
"leave-to-class": "-translate-x-full"
|
|
2413
2421
|
}, {
|
|
2414
|
-
default:
|
|
2422
|
+
default: F(() => [k(v) ? (b(), o("aside", {
|
|
2415
2423
|
key: 0,
|
|
2416
2424
|
role: "dialog",
|
|
2417
2425
|
"aria-modal": "true",
|
|
2418
2426
|
"aria-label": c.title,
|
|
2419
|
-
class: h(["fixed top-0 left-0 z-[70] h-screen w-full max-w-sm flex flex-col border-r shadow-xl",
|
|
2427
|
+
class: h(["fixed top-0 left-0 z-[70] h-screen w-full max-w-sm flex flex-col border-r shadow-xl", k(p) ? "bg-gray-900 border-gray-800" : "bg-white border-gray-200"])
|
|
2420
2428
|
}, [
|
|
2421
|
-
s("div", { class: h(["flex items-center justify-between gap-3 px-5 py-4 border-b shrink-0",
|
|
2429
|
+
s("div", { class: h(["flex items-center justify-between gap-3 px-5 py-4 border-b shrink-0", k(m).border]) }, [s("h2", { class: h(["text-lg font-semibold flex items-center gap-2", k(m).primaryText]) }, [u(O(c.title) + " ", 1), s("span", { class: h(["text-sm font-normal", k(m).dimTextAlt]) }, "— " + O(T.value), 3)], 2), s("button", {
|
|
2422
2430
|
type: "button",
|
|
2423
|
-
onClick: l[1] ||= (...e) =>
|
|
2431
|
+
onClick: l[1] ||= (...e) => k(y) && k(y)(...e),
|
|
2424
2432
|
"aria-label": "Close notifications",
|
|
2425
|
-
class: h(["p-1.5 rounded-lg cursor-pointer transition-colors focus:outline-none focus-visible:ring-2 focus-visible:ring-emerald-500",
|
|
2426
|
-
}, [d(
|
|
2433
|
+
class: h(["p-1.5 rounded-lg cursor-pointer transition-colors focus:outline-none focus-visible:ring-2 focus-visible:ring-emerald-500", k(p) ? "text-gray-400 hover:bg-gray-800" : "text-gray-500 hover:bg-gray-100"])
|
|
2434
|
+
}, [d(k(Se), {
|
|
2427
2435
|
class: "w-5 h-5",
|
|
2428
2436
|
"aria-hidden": "true"
|
|
2429
2437
|
})], 2)], 2),
|
|
2430
|
-
c.showMarkAllRead &&
|
|
2438
|
+
c.showMarkAllRead && k(_) > 0 ? (b(), o("div", {
|
|
2431
2439
|
key: 0,
|
|
2432
|
-
class: h(["px-5 py-2 border-b shrink-0 flex justify-end",
|
|
2440
|
+
class: h(["px-5 py-2 border-b shrink-0 flex justify-end", k(m).border])
|
|
2433
2441
|
}, [s("button", {
|
|
2434
2442
|
type: "button",
|
|
2435
|
-
onClick: l[2] ||= (...e) =>
|
|
2436
|
-
class: h(["text-xs font-medium cursor-pointer transition-colors focus:outline-none focus-visible:underline",
|
|
2443
|
+
onClick: l[2] ||= (...e) => k(x) && k(x)(...e),
|
|
2444
|
+
class: h(["text-xs font-medium cursor-pointer transition-colors focus:outline-none focus-visible:underline", k(m).emeraldText])
|
|
2437
2445
|
}, " Mark all as read ", 2)], 2)) : a("", !0),
|
|
2438
|
-
s("div",
|
|
2439
|
-
class: h(["w-10 h-10",
|
|
2446
|
+
s("div", mr, [T.value === 0 ? (b(), o("div", hr, [d(k(ae), {
|
|
2447
|
+
class: h(["w-10 h-10", k(m).illustration]),
|
|
2440
2448
|
"aria-hidden": "true"
|
|
2441
|
-
}, null, 8, ["class"]), s("p", { class: h(["text-sm",
|
|
2449
|
+
}, null, 8, ["class"]), s("p", { class: h(["text-sm", k(m).mutedText]) }, O(c.emptyText), 3)])) : (b(), o("ul", {
|
|
2442
2450
|
key: 1,
|
|
2443
|
-
class: h(["divide-y",
|
|
2444
|
-
}, [(b(!0), o(e, null,
|
|
2451
|
+
class: h(["divide-y", k(p) ? "divide-gray-800" : "divide-gray-100"])
|
|
2452
|
+
}, [(b(!0), o(e, null, w(k(g), (e) => (b(), o("li", { key: e.id }, [s("button", {
|
|
2445
2453
|
type: "button",
|
|
2446
2454
|
onClick: (t) => E(e.id),
|
|
2447
|
-
class: h(["w-full text-left px-5 py-4 flex gap-3 transition-colors cursor-pointer focus:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-emerald-500", [e.read ? "" :
|
|
2455
|
+
class: h(["w-full text-left px-5 py-4 flex gap-3 transition-colors cursor-pointer focus:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-emerald-500", [e.read ? "" : k(p) ? "bg-emerald-500/5" : "bg-emerald-50/60", k(p) ? "hover:bg-gray-800" : "hover:bg-gray-50"]])
|
|
2448
2456
|
}, [s("span", {
|
|
2449
|
-
class: h(["mt-1.5 w-2 h-2 rounded-full shrink-0", e.read ?
|
|
2457
|
+
class: h(["mt-1.5 w-2 h-2 rounded-full shrink-0", e.read ? k(p) ? "bg-gray-700" : "bg-gray-300" : C[e.type ?? "info"]]),
|
|
2450
2458
|
"aria-hidden": "true"
|
|
2451
|
-
}, null, 2), s("span",
|
|
2459
|
+
}, null, 2), s("span", _r, [s("span", vr, [s("span", { class: h(["text-sm truncate", [e.read ? "font-medium" : "font-semibold", k(m).primaryTextSoft]]) }, O(e.title), 3), e.time ? (b(), o("span", {
|
|
2452
2460
|
key: 0,
|
|
2453
|
-
class: h(["text-xs shrink-0",
|
|
2454
|
-
},
|
|
2461
|
+
class: h(["text-xs shrink-0", k(m).dimText])
|
|
2462
|
+
}, O(e.time), 3)) : a("", !0)]), e.message ? (b(), o("span", {
|
|
2455
2463
|
key: 0,
|
|
2456
|
-
class: h(["mt-0.5 block text-sm",
|
|
2457
|
-
},
|
|
2458
|
-
], 10,
|
|
2464
|
+
class: h(["mt-0.5 block text-sm", k(m).mutedText])
|
|
2465
|
+
}, O(e.message), 3)) : a("", !0)])], 10, gr)]))), 128))], 2))])
|
|
2466
|
+
], 10, pr)) : a("", !0)]),
|
|
2459
2467
|
_: 1
|
|
2460
2468
|
})]));
|
|
2461
2469
|
}
|
|
2462
|
-
}),
|
|
2470
|
+
}), br = ["disabled"], xr = /* @__PURE__ */ f({
|
|
2463
2471
|
__name: "BaseChipButton",
|
|
2464
2472
|
props: {
|
|
2465
2473
|
size: { default: "sm" },
|
|
@@ -2470,15 +2478,15 @@ var dn = ["aria-label", "aria-expanded"], fn = { class: "flex flex-col h-full" }
|
|
|
2470
2478
|
},
|
|
2471
2479
|
emits: ["click"],
|
|
2472
2480
|
setup(e, { emit: t }) {
|
|
2473
|
-
let n = t, { isDark: r } =
|
|
2481
|
+
let n = t, { isDark: r } = V();
|
|
2474
2482
|
return (t, i) => (b(), o("button", {
|
|
2475
2483
|
type: "button",
|
|
2476
2484
|
disabled: e.disabled,
|
|
2477
|
-
class: h(["inline-flex items-center gap-1 font-medium rounded-md border transition-colors cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed focus:outline-none focus-visible:ring-2 focus-visible:ring-emerald-500", [e.size === "xs" ? "text-xs px-2 py-0.5" : "text-xs px-2.5 py-1",
|
|
2485
|
+
class: h(["inline-flex items-center gap-1 font-medium rounded-md border transition-colors cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed focus:outline-none focus-visible:ring-2 focus-visible:ring-emerald-500", [e.size === "xs" ? "text-xs px-2 py-0.5" : "text-xs px-2.5 py-1", k(r) ? "text-emerald-300 border-emerald-700 bg-emerald-900/30 hover:bg-emerald-800/50" : "text-emerald-700 border-emerald-200 bg-emerald-50 hover:bg-emerald-100"]]),
|
|
2478
2486
|
onClick: i[0] ||= (e) => n("click")
|
|
2479
|
-
}, [
|
|
2487
|
+
}, [T(t.$slots, "default")], 10, br));
|
|
2480
2488
|
}
|
|
2481
|
-
}),
|
|
2489
|
+
}), Sr = /* @__PURE__ */ f({
|
|
2482
2490
|
__name: "BaseRemoveButton",
|
|
2483
2491
|
emits: ["click"],
|
|
2484
2492
|
setup(e, { emit: t }) {
|
|
@@ -2489,18 +2497,18 @@ var dn = ["aria-label", "aria-expanded"], fn = { class: "flex flex-col h-full" }
|
|
|
2489
2497
|
onClick: t[0] ||= (e) => n("click")
|
|
2490
2498
|
}, " × "));
|
|
2491
2499
|
}
|
|
2492
|
-
}),
|
|
2500
|
+
}), Cr = { class: "relative flex h-2 w-2" }, wr = {
|
|
2493
2501
|
key: 0,
|
|
2494
2502
|
class: "animate-ping absolute inline-flex h-full w-full rounded-full bg-emerald-400 opacity-75",
|
|
2495
2503
|
"aria-hidden": "true"
|
|
2496
|
-
},
|
|
2504
|
+
}, Tr = /* @__PURE__ */ f({
|
|
2497
2505
|
__name: "BaseStatusPill",
|
|
2498
2506
|
props: {
|
|
2499
2507
|
status: {},
|
|
2500
2508
|
label: {}
|
|
2501
2509
|
},
|
|
2502
2510
|
setup(e) {
|
|
2503
|
-
let t = e, { isDark: n } =
|
|
2511
|
+
let t = e, { isDark: n } = V(), i = r(() => {
|
|
2504
2512
|
switch (t.status) {
|
|
2505
2513
|
case "ok": return n.value ? "bg-emerald-500/10 text-emerald-400" : "bg-emerald-50 text-emerald-700";
|
|
2506
2514
|
case "error": return n.value ? "bg-red-500/10 text-red-400" : "bg-red-50 text-red-700";
|
|
@@ -2513,13 +2521,13 @@ var dn = ["aria-label", "aria-expanded"], fn = { class: "flex flex-col h-full" }
|
|
|
2513
2521
|
default: return "bg-gray-400";
|
|
2514
2522
|
}
|
|
2515
2523
|
});
|
|
2516
|
-
return (t, n) => (b(), o("div", { class: h(["flex items-center gap-2 px-3 py-1.5 rounded-lg text-xs", i.value]) }, [s("span",
|
|
2524
|
+
return (t, n) => (b(), o("div", { class: h(["flex items-center gap-2 px-3 py-1.5 rounded-lg text-xs", i.value]) }, [s("span", Cr, [e.status === "ok" ? (b(), o("span", wr)) : a("", !0), s("span", { class: h(["relative inline-flex rounded-full h-2 w-2", c.value]) }, null, 2)]), u(" " + O(e.label), 1)], 2));
|
|
2517
2525
|
}
|
|
2518
|
-
}),
|
|
2526
|
+
}), Er = { class: "text-sm font-medium" }, Dr = [
|
|
2519
2527
|
"accept",
|
|
2520
2528
|
"multiple",
|
|
2521
2529
|
"disabled"
|
|
2522
|
-
],
|
|
2530
|
+
], Or = /* @__PURE__ */ f({
|
|
2523
2531
|
__name: "BaseFileDropzone",
|
|
2524
2532
|
props: {
|
|
2525
2533
|
label: {},
|
|
@@ -2536,7 +2544,7 @@ var dn = ["aria-label", "aria-expanded"], fn = { class: "flex flex-col h-full" }
|
|
|
2536
2544
|
},
|
|
2537
2545
|
emits: ["files"],
|
|
2538
2546
|
setup(e, { emit: t }) {
|
|
2539
|
-
let n = e, r = t, { isDark: i } =
|
|
2547
|
+
let n = e, r = t, { isDark: i } = V(), c = C(!1);
|
|
2540
2548
|
function l(e) {
|
|
2541
2549
|
let t = e.target, n = Array.from(t.files ?? []);
|
|
2542
2550
|
t.value = "", n.length && r("files", n);
|
|
@@ -2550,12 +2558,12 @@ var dn = ["aria-label", "aria-expanded"], fn = { class: "flex flex-col h-full" }
|
|
|
2550
2558
|
t.length && r("files", n.multiple ? t : t.slice(0, 1));
|
|
2551
2559
|
}
|
|
2552
2560
|
return (t, n) => (b(), o("label", {
|
|
2553
|
-
class: h(["flex flex-col items-center justify-center gap-2 rounded-lg border-2 border-dashed px-6 py-10 text-center transition-colors", [e.disabled ? "opacity-50 cursor-not-allowed" : "cursor-pointer", c.value ?
|
|
2554
|
-
onDragover:
|
|
2555
|
-
onDragleave: n[0] ||=
|
|
2556
|
-
onDrop:
|
|
2561
|
+
class: h(["flex flex-col items-center justify-center gap-2 rounded-lg border-2 border-dashed px-6 py-10 text-center transition-colors", [e.disabled ? "opacity-50 cursor-not-allowed" : "cursor-pointer", c.value ? k(i) ? "border-emerald-500 text-emerald-400" : "border-emerald-500 text-emerald-600" : k(i) ? "border-gray-700 hover:border-emerald-500 text-gray-400 hover:text-emerald-400" : "border-gray-300 hover:border-emerald-500 text-gray-500 hover:text-emerald-600"]]),
|
|
2562
|
+
onDragover: L(u, ["prevent"]),
|
|
2563
|
+
onDragleave: n[0] ||= L((e) => c.value = !1, ["prevent"]),
|
|
2564
|
+
onDrop: L(d, ["prevent"])
|
|
2557
2565
|
}, [
|
|
2558
|
-
|
|
2566
|
+
T(t.$slots, "icon", {}, () => [n[1] ||= s("svg", {
|
|
2559
2567
|
class: "w-10 h-10",
|
|
2560
2568
|
fill: "none",
|
|
2561
2569
|
viewBox: "0 0 24 24",
|
|
@@ -2567,11 +2575,11 @@ var dn = ["aria-label", "aria-expanded"], fn = { class: "flex flex-col h-full" }
|
|
|
2567
2575
|
"stroke-linejoin": "round",
|
|
2568
2576
|
d: "M19.5 14.25v-2.625a3.375 3.375 0 0 0-3.375-3.375h-1.5A1.125 1.125 0 0 1 13.5 7.125v-1.5a3.375 3.375 0 0 0-3.375-3.375H8.25m6.75 12-3-3m0 0-3 3m3-3v6m-1.5-15H5.625c-.621 0-1.125.504-1.125 1.125v17.25c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125V11.25a9 9 0 0 0-9-9Z"
|
|
2569
2577
|
})], -1)]),
|
|
2570
|
-
s("p",
|
|
2578
|
+
s("p", Er, O(e.label), 1),
|
|
2571
2579
|
e.hint ? (b(), o("p", {
|
|
2572
2580
|
key: 0,
|
|
2573
|
-
class: h(["text-xs",
|
|
2574
|
-
},
|
|
2581
|
+
class: h(["text-xs", k(i) ? "text-gray-500" : "text-gray-400"])
|
|
2582
|
+
}, O(e.hint), 3)) : a("", !0),
|
|
2575
2583
|
s("input", {
|
|
2576
2584
|
type: "file",
|
|
2577
2585
|
class: "hidden",
|
|
@@ -2579,10 +2587,41 @@ var dn = ["aria-label", "aria-expanded"], fn = { class: "flex flex-col h-full" }
|
|
|
2579
2587
|
multiple: e.multiple,
|
|
2580
2588
|
disabled: e.disabled,
|
|
2581
2589
|
onChange: l
|
|
2582
|
-
}, null, 40,
|
|
2590
|
+
}, null, 40, Dr)
|
|
2583
2591
|
], 34));
|
|
2584
2592
|
}
|
|
2585
|
-
}),
|
|
2593
|
+
}), kr = /* @__PURE__ */ f({
|
|
2594
|
+
__name: "BaseCodeBlock",
|
|
2595
|
+
props: {
|
|
2596
|
+
code: {},
|
|
2597
|
+
variant: { default: "soft" },
|
|
2598
|
+
size: { default: "sm" },
|
|
2599
|
+
maxHeightClass: { default: "" }
|
|
2600
|
+
},
|
|
2601
|
+
setup(e) {
|
|
2602
|
+
let t = e, { isDark: n } = V(), i = {
|
|
2603
|
+
soft: {
|
|
2604
|
+
dark: "bg-gray-800/70 text-gray-300",
|
|
2605
|
+
light: "bg-gray-100 text-gray-700"
|
|
2606
|
+
},
|
|
2607
|
+
bordered: {
|
|
2608
|
+
dark: "border bg-gray-900 border-gray-700 text-gray-300",
|
|
2609
|
+
light: "border bg-white border-gray-200 text-gray-700"
|
|
2610
|
+
}
|
|
2611
|
+
}, a = {
|
|
2612
|
+
sm: "text-sm px-5 py-4 rounded-lg",
|
|
2613
|
+
xs: "text-xs p-3 rounded-lg"
|
|
2614
|
+
}, s = r(() => {
|
|
2615
|
+
let e = i[t.variant];
|
|
2616
|
+
return n.value ? e.dark : e.light;
|
|
2617
|
+
}), c = r(() => a[t.size]);
|
|
2618
|
+
return (t, n) => (b(), o("pre", { class: h(["font-mono overflow-auto", [
|
|
2619
|
+
c.value,
|
|
2620
|
+
s.value,
|
|
2621
|
+
e.maxHeightClass
|
|
2622
|
+
]]) }, O(e.code), 3));
|
|
2623
|
+
}
|
|
2624
|
+
}), Ar = ["value", "type"], Q = /* @__PURE__ */ f({
|
|
2586
2625
|
__name: "BaseInput",
|
|
2587
2626
|
props: {
|
|
2588
2627
|
modelValue: { default: "" },
|
|
@@ -2604,9 +2643,9 @@ var dn = ["aria-label", "aria-expanded"], fn = { class: "flex flex-col h-full" }
|
|
|
2604
2643
|
type: e.type,
|
|
2605
2644
|
class: h(["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"]]),
|
|
2606
2645
|
onInput: r
|
|
2607
|
-
}, null, 42,
|
|
2646
|
+
}, null, 42, Ar));
|
|
2608
2647
|
}
|
|
2609
|
-
}),
|
|
2648
|
+
}), jr = ["value"], Mr = /* @__PURE__ */ f({
|
|
2610
2649
|
__name: "BaseSelect",
|
|
2611
2650
|
props: {
|
|
2612
2651
|
modelValue: { default: void 0 },
|
|
@@ -2626,13 +2665,13 @@ var dn = ["aria-label", "aria-expanded"], fn = { class: "flex flex-col h-full" }
|
|
|
2626
2665
|
value: e.modelValue,
|
|
2627
2666
|
class: h(["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"]]),
|
|
2628
2667
|
onChange: r
|
|
2629
|
-
}, [
|
|
2668
|
+
}, [T(t.$slots, "default")], 42, jr));
|
|
2630
2669
|
}
|
|
2631
|
-
}),
|
|
2670
|
+
}), Nr = [
|
|
2632
2671
|
"disabled",
|
|
2633
2672
|
"aria-label",
|
|
2634
2673
|
"aria-expanded"
|
|
2635
|
-
],
|
|
2674
|
+
], Pr = ["aria-label"], Fr = ["aria-selected", "title"], Ir = ["disabled", "onClick"], Lr = /* @__PURE__ */ f({
|
|
2636
2675
|
__name: "BaseDropdown",
|
|
2637
2676
|
props: {
|
|
2638
2677
|
options: {},
|
|
@@ -2653,7 +2692,7 @@ var dn = ["aria-label", "aria-expanded"], fn = { class: "flex flex-col h-full" }
|
|
|
2653
2692
|
},
|
|
2654
2693
|
emits: ["update:modelValue"],
|
|
2655
2694
|
setup(t, { emit: n }) {
|
|
2656
|
-
let i = t, c = n, l =
|
|
2695
|
+
let i = t, c = n, l = C(!1), u = C(null), f = r(() => i.options.find((e) => e.value === i.modelValue) ?? null), p = r(() => i.triggerClass ? "flex items-center justify-between gap-2 text-left transition-colors focus:outline-none focus-visible:ring-2 focus-visible:ring-emerald-500 cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed " + i.triggerClass : "flex items-center justify-between gap-2 text-left transition-colors focus:outline-none focus-visible:ring-2 focus-visible:ring-emerald-500 cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed rounded-lg border text-sm 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 " + (i.size === "sm" ? "px-3 py-2" : "px-4 py-2.5"));
|
|
2657
2696
|
function m(e) {
|
|
2658
2697
|
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"}`;
|
|
2659
2698
|
}
|
|
@@ -2681,15 +2720,15 @@ var dn = ["aria-label", "aria-expanded"], fn = { class: "flex flex-col h-full" }
|
|
|
2681
2720
|
"aria-haspopup": "listbox",
|
|
2682
2721
|
"aria-expanded": l.value,
|
|
2683
2722
|
onClick: v
|
|
2684
|
-
}, [s("span", { class: h(["min-w-0 truncate", f.value ? "" : "text-slate-400 dark:text-slate-500"]) },
|
|
2723
|
+
}, [s("span", { class: h(["min-w-0 truncate", f.value ? "" : "text-slate-400 dark:text-slate-500"]) }, O(f.value ? f.value.label : t.placeholder), 3), d(k(le), {
|
|
2685
2724
|
class: h(["shrink-0 transition-transform", [t.chevronClass, l.value ? "rotate-180" : ""]]),
|
|
2686
2725
|
"aria-hidden": "true"
|
|
2687
|
-
}, null, 8, ["class"])], 10,
|
|
2726
|
+
}, null, 8, ["class"])], 10, Nr), l.value ? (b(), o("ul", {
|
|
2688
2727
|
key: 0,
|
|
2689
2728
|
role: "listbox",
|
|
2690
2729
|
"aria-label": t.ariaLabel || t.placeholder,
|
|
2691
2730
|
class: "absolute z-20 mt-1 w-full min-w-max max-w-xs 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"
|
|
2692
|
-
}, [(b(!0), o(e, null,
|
|
2731
|
+
}, [(b(!0), o(e, null, w(t.options, (e) => (b(), o("li", {
|
|
2693
2732
|
key: String(e.value),
|
|
2694
2733
|
role: "option",
|
|
2695
2734
|
"aria-selected": e.value === t.modelValue,
|
|
@@ -2699,13 +2738,13 @@ var dn = ["aria-label", "aria-expanded"], fn = { class: "flex flex-col h-full" }
|
|
|
2699
2738
|
disabled: e.disabled,
|
|
2700
2739
|
class: h(m(e)),
|
|
2701
2740
|
onClick: (t) => y(e)
|
|
2702
|
-
},
|
|
2741
|
+
}, O(e.label), 11, Ir)], 8, Fr))), 128))], 8, Pr)) : a("", !0)], 2));
|
|
2703
2742
|
}
|
|
2704
|
-
}),
|
|
2743
|
+
}), Rr = ["role", "aria-label"], zr = [
|
|
2705
2744
|
"aria-pressed",
|
|
2706
2745
|
"title",
|
|
2707
2746
|
"onClick"
|
|
2708
|
-
],
|
|
2747
|
+
], Br = "bg-slate-50 dark:bg-slate-900 text-slate-600 dark:text-slate-300 hover:bg-slate-100 dark:hover:bg-slate-800", Vr = /* @__PURE__ */ f({
|
|
2709
2748
|
__name: "BaseSegmentedControl",
|
|
2710
2749
|
props: {
|
|
2711
2750
|
options: {},
|
|
@@ -2722,22 +2761,22 @@ var dn = ["aria-label", "aria-expanded"], fn = { class: "flex flex-col h-full" }
|
|
|
2722
2761
|
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");
|
|
2723
2762
|
function u(e) {
|
|
2724
2763
|
let t = e.value === i.modelValue;
|
|
2725
|
-
return i.optionClass ? i.optionClass(e, t) : t ? l.value :
|
|
2764
|
+
return i.optionClass ? i.optionClass(e, t) : t ? l.value : Br;
|
|
2726
2765
|
}
|
|
2727
2766
|
return (n, r) => (b(), o("div", {
|
|
2728
2767
|
role: t.ariaLabel ? "group" : void 0,
|
|
2729
2768
|
"aria-label": t.ariaLabel || void 0,
|
|
2730
2769
|
class: h(s.value)
|
|
2731
|
-
}, [(b(!0), o(e, null,
|
|
2770
|
+
}, [(b(!0), o(e, null, w(t.options, (e) => (b(), o("button", {
|
|
2732
2771
|
key: String(e.value),
|
|
2733
2772
|
type: "button",
|
|
2734
2773
|
class: h([c.value, u(e)]),
|
|
2735
2774
|
"aria-pressed": e.value === t.modelValue,
|
|
2736
2775
|
title: e.title,
|
|
2737
2776
|
onClick: (t) => a("update:modelValue", e.value)
|
|
2738
|
-
},
|
|
2777
|
+
}, O(e.label), 11, zr))), 128))], 10, Rr));
|
|
2739
2778
|
}
|
|
2740
|
-
}),
|
|
2779
|
+
}), Hr = { class: "w-full text-sm" }, Ur = { class: "bg-slate-50 dark:bg-slate-800/60 text-slate-600 dark:text-slate-300" }, Wr = { class: "text-left" }, Gr = { key: 0 }, Kr = ["colspan"], qr = /* @__PURE__ */ f({
|
|
2741
2780
|
__name: "BaseTable",
|
|
2742
2781
|
props: {
|
|
2743
2782
|
columns: {},
|
|
@@ -2748,24 +2787,24 @@ var dn = ["aria-label", "aria-expanded"], fn = { class: "flex flex-col h-full" }
|
|
|
2748
2787
|
emptyText: { default: "No rows." }
|
|
2749
2788
|
},
|
|
2750
2789
|
setup(t) {
|
|
2751
|
-
return (n, r) => (b(), o("table",
|
|
2790
|
+
return (n, r) => (b(), o("table", Hr, [s("thead", Ur, [s("tr", Wr, [(b(!0), o(e, null, w(t.columns, (e, t) => (b(), o("th", {
|
|
2752
2791
|
key: t,
|
|
2753
2792
|
class: h(["px-4 py-3", e.align === "right" ? "text-right" : ""])
|
|
2754
|
-
},
|
|
2793
|
+
}, O(e.label), 3))), 128))])]), s("tbody", null, [t.empty ? (b(), o("tr", Gr, [s("td", {
|
|
2755
2794
|
colspan: t.columns.length,
|
|
2756
2795
|
class: "px-4 py-12 text-center text-slate-500"
|
|
2757
|
-
}, [
|
|
2796
|
+
}, [T(n.$slots, "empty", {}, () => [u(O(t.emptyText), 1)])], 8, Kr)])) : a("", !0), T(n.$slots, "default")])]));
|
|
2758
2797
|
}
|
|
2759
|
-
}),
|
|
2798
|
+
}), Jr = { class: "grid gap-3 md:grid-cols-2" }, Yr = {
|
|
2760
2799
|
key: 0,
|
|
2761
2800
|
class: "block text-[11px] uppercase tracking-wide text-slate-500 mb-1"
|
|
2762
|
-
},
|
|
2801
|
+
}, Xr = ["value"], Zr = {
|
|
2763
2802
|
key: 2,
|
|
2764
2803
|
class: "flex items-center gap-2 mt-4"
|
|
2765
|
-
},
|
|
2804
|
+
}, Qr = ["checked", "onChange"], $r = { class: "text-sm text-slate-900 dark:text-slate-100" }, ei = {
|
|
2766
2805
|
key: 4,
|
|
2767
2806
|
class: "text-[11px] text-slate-400 mt-1"
|
|
2768
|
-
},
|
|
2807
|
+
}, ti = /* @__PURE__ */ f({
|
|
2769
2808
|
__name: "BaseSpecFields",
|
|
2770
2809
|
props: {
|
|
2771
2810
|
specs: {},
|
|
@@ -2781,24 +2820,24 @@ var dn = ["aria-label", "aria-expanded"], fn = { class: "flex flex-col h-full" }
|
|
|
2781
2820
|
let n = parseFloat(t);
|
|
2782
2821
|
r("update", e, Number.isNaN(n) ? t : n);
|
|
2783
2822
|
}
|
|
2784
|
-
return (n, u) => (b(), o("div",
|
|
2785
|
-
u.type === "boolean" ? a("", !0) : (b(), o("label",
|
|
2786
|
-
u.type === "select" ? (b(), i(
|
|
2823
|
+
return (n, u) => (b(), o("div", Jr, [(b(!0), o(e, null, w(t.specs, (u) => (b(), o("div", { key: u.key }, [
|
|
2824
|
+
u.type === "boolean" ? a("", !0) : (b(), o("label", Yr, O(u.label), 1)),
|
|
2825
|
+
u.type === "select" ? (b(), i(Mr, {
|
|
2787
2826
|
key: 1,
|
|
2788
2827
|
modelValue: String(t.params[u.key] ?? ""),
|
|
2789
2828
|
"onUpdate:modelValue": (e) => r("update", u.key, e)
|
|
2790
2829
|
}, {
|
|
2791
|
-
default:
|
|
2830
|
+
default: F(() => [(b(!0), o(e, null, w(u.options ?? [], (e) => (b(), o("option", {
|
|
2792
2831
|
key: e,
|
|
2793
2832
|
value: e
|
|
2794
|
-
},
|
|
2833
|
+
}, O(e), 9, Xr))), 128))]),
|
|
2795
2834
|
_: 2
|
|
2796
|
-
}, 1032, ["modelValue", "onUpdate:modelValue"])) : u.type === "boolean" ? (b(), o("label",
|
|
2835
|
+
}, 1032, ["modelValue", "onUpdate:modelValue"])) : u.type === "boolean" ? (b(), o("label", Zr, [s("input", {
|
|
2797
2836
|
checked: !!t.params[u.key],
|
|
2798
2837
|
type: "checkbox",
|
|
2799
2838
|
class: "h-4 w-4",
|
|
2800
2839
|
onChange: (e) => c(u.key, e)
|
|
2801
|
-
}, null, 40,
|
|
2840
|
+
}, null, 40, Qr), s("span", $r, O(u.label), 1)])) : (b(), i(Q, {
|
|
2802
2841
|
key: 3,
|
|
2803
2842
|
modelValue: t.params[u.key],
|
|
2804
2843
|
type: "number",
|
|
@@ -2811,11 +2850,11 @@ var dn = ["aria-label", "aria-expanded"], fn = { class: "flex flex-col h-full" }
|
|
|
2811
2850
|
"min",
|
|
2812
2851
|
"onUpdate:modelValue"
|
|
2813
2852
|
])),
|
|
2814
|
-
u.help ? (b(), o("p",
|
|
2815
|
-
|
|
2853
|
+
u.help ? (b(), o("p", ei, O(u.help), 1)) : a("", !0),
|
|
2854
|
+
T(n.$slots, "after", { spec: u })
|
|
2816
2855
|
]))), 128))]));
|
|
2817
2856
|
}
|
|
2818
|
-
}),
|
|
2857
|
+
}), ni = { class: "mt-1.5 space-y-0.5 px-1" }, ri = { class: "text-slate-400 dark:text-slate-500" }, ii = /* @__PURE__ */ f({
|
|
2819
2858
|
__name: "BaseStatBreakdown",
|
|
2820
2859
|
props: {
|
|
2821
2860
|
items: {},
|
|
@@ -2834,16 +2873,16 @@ var dn = ["aria-label", "aria-expanded"], fn = { class: "flex flex-col h-full" }
|
|
|
2834
2873
|
function i(e) {
|
|
2835
2874
|
return !n.signed || e == null ? "text-slate-500 dark:text-slate-400" : e >= 0 ? "text-emerald-600 dark:text-emerald-400" : "text-red-600 dark:text-red-400";
|
|
2836
2875
|
}
|
|
2837
|
-
return (n, a) => (b(), o("div",
|
|
2876
|
+
return (n, a) => (b(), o("div", ni, [(b(!0), o(e, null, w(t.items, (e) => (b(), o("div", {
|
|
2838
2877
|
key: e.label,
|
|
2839
2878
|
class: "flex items-center justify-between text-[11px]"
|
|
2840
|
-
}, [s("span",
|
|
2879
|
+
}, [s("span", ri, O(e.label), 1), s("span", { class: h(["font-mono tabular-nums font-medium", i(e.value)]) }, O(r(e.value)), 3)]))), 128))]));
|
|
2841
2880
|
}
|
|
2842
|
-
}),
|
|
2881
|
+
}), ai = [
|
|
2843
2882
|
"disabled",
|
|
2844
2883
|
"title",
|
|
2845
2884
|
"aria-pressed"
|
|
2846
|
-
],
|
|
2885
|
+
], oi = /* @__PURE__ */ f({
|
|
2847
2886
|
__name: "BaseFilterChip",
|
|
2848
2887
|
props: {
|
|
2849
2888
|
label: { default: "" },
|
|
@@ -2878,15 +2917,15 @@ var dn = ["aria-label", "aria-expanded"], fn = { class: "flex flex-col h-full" }
|
|
|
2878
2917
|
title: e.title,
|
|
2879
2918
|
"aria-pressed": e.active,
|
|
2880
2919
|
class: h(["whitespace-nowrap rounded-md border px-3 text-sm font-semibold text-center transition-colors focus:outline-none focus-visible:ring-2 disabled:opacity-50 disabled:cursor-not-allowed", e.active ? n[e.color] : t[e.color]])
|
|
2881
|
-
}, [
|
|
2920
|
+
}, [T(r.$slots, "default", {}, () => [u(O(e.label), 1)])], 10, ai));
|
|
2882
2921
|
}
|
|
2883
|
-
}),
|
|
2922
|
+
}), si = { class: "flex items-center justify-between mb-4" }, ci = { class: "text-lg font-semibold text-slate-900 dark:text-slate-100" }, li = {
|
|
2884
2923
|
key: 0,
|
|
2885
2924
|
class: "text-xs text-slate-500 dark:text-slate-400"
|
|
2886
|
-
},
|
|
2925
|
+
}, ui = {
|
|
2887
2926
|
key: 0,
|
|
2888
2927
|
class: "inline-flex items-center gap-2 text-xs text-slate-500"
|
|
2889
|
-
},
|
|
2928
|
+
}, di = { class: "grid gap-4 md:grid-cols-2" }, fi = { class: "md:col-span-2" }, pi = ["for"], mi = { class: "md:col-span-2" }, hi = ["for"], gi = { class: "text-[11px] text-slate-500 mt-1" }, _i = { class: "md:col-span-2" }, vi = ["for"], yi = { class: "md:col-span-2" }, bi = ["for"], xi = { class: "md:col-span-2" }, Si = "placeholder:text-slate-400 dark:placeholder:text-slate-500 font-mono", Ci = /* @__PURE__ */ f({
|
|
2890
2929
|
__name: "BaseCredentialsForm",
|
|
2891
2930
|
props: {
|
|
2892
2931
|
title: {},
|
|
@@ -2912,7 +2951,7 @@ var dn = ["aria-label", "aria-expanded"], fn = { class: "flex flex-col h-full" }
|
|
|
2912
2951
|
"load-error"
|
|
2913
2952
|
],
|
|
2914
2953
|
setup(t, { expose: n, emit: r }) {
|
|
2915
|
-
let c = t, l = r, f =
|
|
2954
|
+
let c = t, l = r, f = C(!1), p = C(!1), m = x({
|
|
2916
2955
|
keyId: "",
|
|
2917
2956
|
secretKey: "",
|
|
2918
2957
|
baseUrl: c.defaults.baseUrl,
|
|
@@ -2959,30 +2998,30 @@ var dn = ["aria-label", "aria-expanded"], fn = { class: "flex flex-col h-full" }
|
|
|
2959
2998
|
}
|
|
2960
2999
|
}
|
|
2961
3000
|
return _(g), n({ load: g }), (n, r) => (b(), i(st, { class: "!p-6" }, {
|
|
2962
|
-
default:
|
|
2963
|
-
s("div",
|
|
2964
|
-
s("div",
|
|
2965
|
-
s("div",
|
|
3001
|
+
default: F(() => [
|
|
3002
|
+
s("div", si, [s("div", null, [s("h2", ci, O(t.title), 1), t.subtitle ? (b(), o("p", li, O(t.subtitle), 1)) : a("", !0)]), f.value ? (b(), o("span", ui, [d(ct, { class: "!h-4 !w-4" }), r[4] ||= u(" Saving… ", -1)])) : a("", !0)]),
|
|
3003
|
+
s("div", di, [
|
|
3004
|
+
s("div", fi, [s("label", {
|
|
2966
3005
|
for: `${t.idPrefix}-key-id`,
|
|
2967
3006
|
class: "block text-xs uppercase tracking-wide text-slate-500 mb-1"
|
|
2968
|
-
},
|
|
3007
|
+
}, O(t.keyLabel), 9, pi), d(Q, {
|
|
2969
3008
|
id: `${t.idPrefix}-key-id`,
|
|
2970
3009
|
modelValue: m.keyId,
|
|
2971
3010
|
"onUpdate:modelValue": r[0] ||= (e) => m.keyId = e,
|
|
2972
3011
|
type: "text",
|
|
2973
3012
|
autocomplete: "off",
|
|
2974
3013
|
placeholder: t.keyPlaceholder,
|
|
2975
|
-
class: h(
|
|
3014
|
+
class: h(Si)
|
|
2976
3015
|
}, null, 8, [
|
|
2977
3016
|
"id",
|
|
2978
3017
|
"modelValue",
|
|
2979
3018
|
"placeholder"
|
|
2980
3019
|
])]),
|
|
2981
|
-
s("div",
|
|
3020
|
+
s("div", mi, [
|
|
2982
3021
|
s("label", {
|
|
2983
3022
|
for: `${t.idPrefix}-secret`,
|
|
2984
3023
|
class: "block text-xs uppercase tracking-wide text-slate-500 mb-1"
|
|
2985
|
-
},
|
|
3024
|
+
}, O(t.secretLabel), 9, hi),
|
|
2986
3025
|
d(Q, {
|
|
2987
3026
|
id: `${t.idPrefix}-secret`,
|
|
2988
3027
|
modelValue: m.secretKey,
|
|
@@ -2990,40 +3029,40 @@ var dn = ["aria-label", "aria-expanded"], fn = { class: "flex flex-col h-full" }
|
|
|
2990
3029
|
type: "password",
|
|
2991
3030
|
autocomplete: "new-password",
|
|
2992
3031
|
placeholder: p.value ? "•••••••• (unchanged — type to replace)" : t.secretPlaceholder,
|
|
2993
|
-
class: h(
|
|
3032
|
+
class: h(Si)
|
|
2994
3033
|
}, null, 8, [
|
|
2995
3034
|
"id",
|
|
2996
3035
|
"modelValue",
|
|
2997
3036
|
"placeholder"
|
|
2998
3037
|
]),
|
|
2999
|
-
s("p",
|
|
3038
|
+
s("p", gi, [p.value ? (b(), o(e, { key: 0 }, [u(O(t.secretSetHint), 1)], 64)) : T(n.$slots, "no-secret-hint", { key: 1 }, () => [u(O(t.permissionsHint), 1)])])
|
|
3000
3039
|
]),
|
|
3001
|
-
s("div",
|
|
3040
|
+
s("div", _i, [
|
|
3002
3041
|
s("label", {
|
|
3003
3042
|
for: `${t.idPrefix}-base-url`,
|
|
3004
3043
|
class: "block text-xs uppercase tracking-wide text-slate-500 mb-1"
|
|
3005
|
-
}, "Base URL (trading)", 8,
|
|
3044
|
+
}, "Base URL (trading)", 8, vi),
|
|
3006
3045
|
d(Q, {
|
|
3007
3046
|
id: `${t.idPrefix}-base-url`,
|
|
3008
3047
|
modelValue: m.baseUrl,
|
|
3009
3048
|
"onUpdate:modelValue": r[2] ||= (e) => m.baseUrl = e,
|
|
3010
3049
|
type: "text",
|
|
3011
|
-
class: h(
|
|
3050
|
+
class: h(Si)
|
|
3012
3051
|
}, null, 8, ["id", "modelValue"]),
|
|
3013
|
-
|
|
3052
|
+
T(n.$slots, "base-url-extra", { form: m })
|
|
3014
3053
|
]),
|
|
3015
|
-
s("div",
|
|
3054
|
+
s("div", yi, [s("label", {
|
|
3016
3055
|
for: `${t.idPrefix}-data-url`,
|
|
3017
3056
|
class: "block text-xs uppercase tracking-wide text-slate-500 mb-1"
|
|
3018
|
-
}, "Data URL (market data)", 8,
|
|
3057
|
+
}, "Data URL (market data)", 8, bi), d(Q, {
|
|
3019
3058
|
id: `${t.idPrefix}-data-url`,
|
|
3020
3059
|
modelValue: m.dataUrl,
|
|
3021
3060
|
"onUpdate:modelValue": r[3] ||= (e) => m.dataUrl = e,
|
|
3022
3061
|
type: "text",
|
|
3023
|
-
class: h(
|
|
3062
|
+
class: h(Si)
|
|
3024
3063
|
}, null, 8, ["id", "modelValue"])]),
|
|
3025
|
-
s("div",
|
|
3026
|
-
color:
|
|
3064
|
+
s("div", xi, [d(G, {
|
|
3065
|
+
color: k(U).GREEN,
|
|
3027
3066
|
description: t.saveLabel,
|
|
3028
3067
|
isDisable: f.value,
|
|
3029
3068
|
isLoading: f.value,
|
|
@@ -3035,17 +3074,110 @@ var dn = ["aria-label", "aria-expanded"], fn = { class: "flex flex-col h-full" }
|
|
|
3035
3074
|
"isLoading"
|
|
3036
3075
|
])])
|
|
3037
3076
|
]),
|
|
3038
|
-
|
|
3077
|
+
T(n.$slots, "footer")
|
|
3039
3078
|
]),
|
|
3040
3079
|
_: 3
|
|
3041
3080
|
}));
|
|
3042
3081
|
}
|
|
3082
|
+
}), wi = {
|
|
3083
|
+
key: 0,
|
|
3084
|
+
class: "text-sm text-slate-500 dark:text-slate-400"
|
|
3085
|
+
}, Ti = { class: "mb-3 flex flex-wrap items-center gap-2" }, Ei = { class: "relative min-w-[200px] flex-1" }, Di = ["placeholder"], Oi = {
|
|
3086
|
+
key: 0,
|
|
3087
|
+
class: "text-sm text-slate-500 dark:text-slate-400"
|
|
3088
|
+
}, ki = {
|
|
3089
|
+
key: 1,
|
|
3090
|
+
class: "flex flex-wrap gap-2"
|
|
3091
|
+
}, Ai = ["title", "onClick"], ji = "h-9 rounded-md border border-slate-300 dark:border-slate-600 bg-slate-50 dark:bg-slate-900 text-slate-900 dark:text-slate-100 text-sm focus:outline-none focus-visible:ring-2 focus-visible:ring-emerald-500", Mi = "\0all", Ni = /* @__PURE__ */ f({
|
|
3092
|
+
__name: "BasePillPickerModal",
|
|
3093
|
+
props: {
|
|
3094
|
+
title: {},
|
|
3095
|
+
items: {},
|
|
3096
|
+
groups: {},
|
|
3097
|
+
icon: {},
|
|
3098
|
+
subtitle: {},
|
|
3099
|
+
searchPlaceholder: { default: "Filter…" },
|
|
3100
|
+
emptyMessage: { default: "Nothing to pick from." },
|
|
3101
|
+
noMatchMessage: { default: "No items match the current filter." },
|
|
3102
|
+
mono: {
|
|
3103
|
+
type: Boolean,
|
|
3104
|
+
default: !1
|
|
3105
|
+
},
|
|
3106
|
+
maxWidthClass: { default: "max-w-2xl" },
|
|
3107
|
+
closeText: { default: "Close" },
|
|
3108
|
+
groupAriaLabel: { default: "Group" },
|
|
3109
|
+
allLabel: { default: "All" }
|
|
3110
|
+
},
|
|
3111
|
+
emits: ["pick", "close"],
|
|
3112
|
+
setup(t, { emit: n }) {
|
|
3113
|
+
let c = t, l = n, u = r(() => c.icon ?? ve), f = C(""), p = C(Mi), m = r(() => c.groups && c.groups.length > 0 ? [{
|
|
3114
|
+
value: Mi,
|
|
3115
|
+
label: c.allLabel
|
|
3116
|
+
}, ...c.groups] : []), g = r(() => c.items.filter((e) => (p.value === Mi || e.group === p.value) && e.label.toLowerCase().includes(f.value.trim().toLowerCase())));
|
|
3117
|
+
return (n, r) => (b(), i(Vt, {
|
|
3118
|
+
title: t.title,
|
|
3119
|
+
icon: u.value,
|
|
3120
|
+
subtitle: t.subtitle,
|
|
3121
|
+
scrollable: "",
|
|
3122
|
+
"max-width-class": t.maxWidthClass,
|
|
3123
|
+
onCancel: r[4] ||= (e) => l("close")
|
|
3124
|
+
}, {
|
|
3125
|
+
footer: F(() => [d(Gn, {
|
|
3126
|
+
variant: "ghost",
|
|
3127
|
+
label: t.closeText,
|
|
3128
|
+
onClick: r[3] ||= (e) => l("close")
|
|
3129
|
+
}, null, 8, ["label"])]),
|
|
3130
|
+
default: F(() => [t.items.length === 0 ? (b(), o("p", wi, O(t.emptyMessage), 1)) : (b(), o(e, { key: 1 }, [s("div", Ti, [s("div", Ei, [
|
|
3131
|
+
d(k(ve), { class: "pointer-events-none absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-slate-400" }),
|
|
3132
|
+
I(s("input", {
|
|
3133
|
+
"onUpdate:modelValue": r[0] ||= (e) => f.value = e,
|
|
3134
|
+
type: "text",
|
|
3135
|
+
placeholder: t.searchPlaceholder,
|
|
3136
|
+
autocomplete: "off",
|
|
3137
|
+
class: h([
|
|
3138
|
+
ji,
|
|
3139
|
+
"w-full pl-9 pr-8 placeholder:text-slate-400 dark:placeholder:text-slate-500",
|
|
3140
|
+
t.mono ? "font-mono" : ""
|
|
3141
|
+
])
|
|
3142
|
+
}, null, 10, Di), [[M, f.value]]),
|
|
3143
|
+
f.value ? (b(), o("button", {
|
|
3144
|
+
key: 0,
|
|
3145
|
+
type: "button",
|
|
3146
|
+
"aria-label": "Clear the filter",
|
|
3147
|
+
class: "absolute right-2 top-1/2 -translate-y-1/2 text-slate-400 hover:text-slate-600 dark:hover:text-slate-200",
|
|
3148
|
+
onClick: r[1] ||= (e) => f.value = ""
|
|
3149
|
+
}, " ✕ ")) : a("", !0)
|
|
3150
|
+
]), m.value.length > 0 ? (b(), i(Vr, {
|
|
3151
|
+
key: 0,
|
|
3152
|
+
modelValue: p.value,
|
|
3153
|
+
"onUpdate:modelValue": r[2] ||= (e) => p.value = e,
|
|
3154
|
+
options: m.value,
|
|
3155
|
+
"aria-label": t.groupAriaLabel
|
|
3156
|
+
}, null, 8, [
|
|
3157
|
+
"modelValue",
|
|
3158
|
+
"options",
|
|
3159
|
+
"aria-label"
|
|
3160
|
+
])) : a("", !0)]), g.value.length === 0 ? (b(), o("p", Oi, O(t.noMatchMessage), 1)) : (b(), o("div", ki, [(b(!0), o(e, null, w(g.value, (e) => (b(), o("button", {
|
|
3161
|
+
key: e.id,
|
|
3162
|
+
type: "button",
|
|
3163
|
+
title: e.title,
|
|
3164
|
+
class: h(["h-8 shrink-0 rounded-md border border-slate-300 dark:border-slate-600 bg-slate-50 dark:bg-slate-900 px-3 text-sm text-slate-700 dark:text-slate-200 transition-colors hover:border-emerald-500 hover:bg-emerald-50 hover:text-emerald-700 dark:hover:bg-emerald-500/10 dark:hover:text-emerald-400 focus:outline-none focus-visible:ring-2 focus-visible:ring-emerald-500", t.mono ? "font-mono" : ""]),
|
|
3165
|
+
onClick: (t) => l("pick", e)
|
|
3166
|
+
}, O(e.label), 11, Ai))), 128))]))], 64))]),
|
|
3167
|
+
_: 1
|
|
3168
|
+
}, 8, [
|
|
3169
|
+
"title",
|
|
3170
|
+
"icon",
|
|
3171
|
+
"subtitle",
|
|
3172
|
+
"max-width-class"
|
|
3173
|
+
]));
|
|
3174
|
+
}
|
|
3043
3175
|
});
|
|
3044
3176
|
//#endregion
|
|
3045
3177
|
//#region src/composables/useDebounce.ts
|
|
3046
|
-
function
|
|
3047
|
-
let n =
|
|
3048
|
-
return
|
|
3178
|
+
function Pi(e, t = 300) {
|
|
3179
|
+
let n = C(e.value), r = null;
|
|
3180
|
+
return P(e, (e) => {
|
|
3049
3181
|
r && clearTimeout(r), r = setTimeout(() => {
|
|
3050
3182
|
n.value = e, r = null;
|
|
3051
3183
|
}, t);
|
|
@@ -3055,12 +3187,12 @@ function Si(e, t = 300) {
|
|
|
3055
3187
|
}
|
|
3056
3188
|
//#endregion
|
|
3057
3189
|
//#region src/composables/useToast.ts
|
|
3058
|
-
function
|
|
3059
|
-
let t =
|
|
3190
|
+
function Fi(e = 3e3) {
|
|
3191
|
+
let t = C(!1), n = C(""), r = C(q.SUCCESS), i = null;
|
|
3060
3192
|
function a() {
|
|
3061
3193
|
i &&= (clearTimeout(i), null);
|
|
3062
3194
|
}
|
|
3063
|
-
function o(o, s =
|
|
3195
|
+
function o(o, s = q.SUCCESS, c = e) {
|
|
3064
3196
|
n.value = o, r.value = s, t.value = !0, a(), i = setTimeout(() => {
|
|
3065
3197
|
t.value = !1, i = null;
|
|
3066
3198
|
}, c);
|
|
@@ -3076,8 +3208,8 @@ function Ci(e = 3e3) {
|
|
|
3076
3208
|
}
|
|
3077
3209
|
//#endregion
|
|
3078
3210
|
//#region src/composables/useQueryParamSync.ts
|
|
3079
|
-
function
|
|
3080
|
-
let e =
|
|
3211
|
+
function Ii() {
|
|
3212
|
+
let e = we(), t = Te();
|
|
3081
3213
|
function n(t) {
|
|
3082
3214
|
let n = e.query[t];
|
|
3083
3215
|
return typeof n == "string" ? n : "";
|
|
@@ -3098,8 +3230,8 @@ function wi() {
|
|
|
3098
3230
|
}
|
|
3099
3231
|
//#endregion
|
|
3100
3232
|
//#region src/composables/useFieldClasses.ts
|
|
3101
|
-
function
|
|
3102
|
-
let { isDark: e } =
|
|
3233
|
+
function Li() {
|
|
3234
|
+
let { isDark: e } = V(), t = r(() => e.value ? "text-gray-300" : "text-gray-600"), n = r(() => e.value ? "bg-gray-800 border-gray-600 text-gray-100 placeholder-gray-500 focus:ring-emerald-500 focus:border-emerald-500" : "bg-white border-gray-300 text-gray-800 focus:ring-emerald-500 focus:border-emerald-500");
|
|
3103
3235
|
function i(t) {
|
|
3104
3236
|
return t == null || String(t).trim() === "" ? e.value ? "bg-gray-800 border-red-500 text-gray-100 placeholder-gray-500 focus:ring-red-500 focus:border-red-500 ring-1 ring-red-500/30" : "bg-white border-red-400 text-gray-800 focus:ring-red-500 focus:border-red-500 ring-1 ring-red-400/30" : n.value;
|
|
3105
3237
|
}
|
|
@@ -3110,52 +3242,81 @@ function Ti() {
|
|
|
3110
3242
|
};
|
|
3111
3243
|
}
|
|
3112
3244
|
//#endregion
|
|
3245
|
+
//#region src/composables/usePolling.ts
|
|
3246
|
+
function Ri(e, t, n = {}) {
|
|
3247
|
+
let { immediate: r = !0, pauseWhenHidden: i = !0 } = n, a = null, o = C(!1);
|
|
3248
|
+
function s() {
|
|
3249
|
+
a !== null || t === null || (a = setInterval(() => void e(), t));
|
|
3250
|
+
}
|
|
3251
|
+
function c() {
|
|
3252
|
+
a !== null && (clearInterval(a), a = null);
|
|
3253
|
+
}
|
|
3254
|
+
function l() {
|
|
3255
|
+
o.value || (o.value = !0, r && e(), s());
|
|
3256
|
+
}
|
|
3257
|
+
function u() {
|
|
3258
|
+
o.value = !1, c();
|
|
3259
|
+
}
|
|
3260
|
+
function d() {
|
|
3261
|
+
document.visibilityState === "visible" ? (o.value = !0, e(), s()) : u();
|
|
3262
|
+
}
|
|
3263
|
+
return _(() => {
|
|
3264
|
+
l(), i && document.addEventListener("visibilitychange", d);
|
|
3265
|
+
}), y(() => {
|
|
3266
|
+
u(), i && document.removeEventListener("visibilitychange", d);
|
|
3267
|
+
}), {
|
|
3268
|
+
start: l,
|
|
3269
|
+
stop: u,
|
|
3270
|
+
active: S(o)
|
|
3271
|
+
};
|
|
3272
|
+
}
|
|
3273
|
+
//#endregion
|
|
3113
3274
|
//#region src/enums/BaseBadgeEnum.ts
|
|
3114
|
-
var
|
|
3275
|
+
var zi = /* @__PURE__ */ function(e) {
|
|
3115
3276
|
return e.WIN = "WIN", e.LOSE = "LOSE", e;
|
|
3116
3277
|
}({});
|
|
3117
3278
|
//#endregion
|
|
3118
3279
|
//#region src/utils/util.ts
|
|
3119
|
-
function
|
|
3280
|
+
function Bi(e) {
|
|
3120
3281
|
let t = "red";
|
|
3121
3282
|
switch (e) {
|
|
3122
|
-
case
|
|
3283
|
+
case R.ERROR:
|
|
3123
3284
|
t = "red";
|
|
3124
3285
|
break;
|
|
3125
|
-
case
|
|
3286
|
+
case R.SUCCESS:
|
|
3126
3287
|
t = "green";
|
|
3127
3288
|
break;
|
|
3128
|
-
case
|
|
3289
|
+
case R.INFO:
|
|
3129
3290
|
t = "gray";
|
|
3130
3291
|
break;
|
|
3131
|
-
case
|
|
3292
|
+
case R.WARNING:
|
|
3132
3293
|
t = "yellow";
|
|
3133
3294
|
break;
|
|
3134
3295
|
}
|
|
3135
3296
|
return t;
|
|
3136
3297
|
}
|
|
3137
|
-
function
|
|
3298
|
+
function Vi(e) {
|
|
3138
3299
|
let t = "red";
|
|
3139
3300
|
switch (e) {
|
|
3140
|
-
case
|
|
3301
|
+
case H.GREEN:
|
|
3141
3302
|
t = "green";
|
|
3142
3303
|
break;
|
|
3143
|
-
case
|
|
3304
|
+
case H.RED:
|
|
3144
3305
|
t = "red";
|
|
3145
3306
|
break;
|
|
3146
|
-
case
|
|
3307
|
+
case H.BLUE:
|
|
3147
3308
|
t = "blue";
|
|
3148
3309
|
break;
|
|
3149
|
-
case
|
|
3310
|
+
case H.YELLOW:
|
|
3150
3311
|
t = "yellow";
|
|
3151
3312
|
break;
|
|
3152
|
-
case
|
|
3313
|
+
case H.BLACK:
|
|
3153
3314
|
t = "black";
|
|
3154
3315
|
break;
|
|
3155
|
-
case
|
|
3316
|
+
case H.GRAY:
|
|
3156
3317
|
t = "gray";
|
|
3157
3318
|
break;
|
|
3158
|
-
case
|
|
3319
|
+
case H.NONE:
|
|
3159
3320
|
t = "";
|
|
3160
3321
|
break;
|
|
3161
3322
|
}
|
|
@@ -3163,14 +3324,14 @@ function Oi(e) {
|
|
|
3163
3324
|
}
|
|
3164
3325
|
//#endregion
|
|
3165
3326
|
//#region src/utils/httpColors.ts
|
|
3166
|
-
var
|
|
3327
|
+
var Hi = {
|
|
3167
3328
|
GET: "bg-blue-600",
|
|
3168
3329
|
POST: "bg-emerald-600",
|
|
3169
3330
|
PUT: "bg-amber-600",
|
|
3170
3331
|
DELETE: "bg-red-600",
|
|
3171
3332
|
PATCH: "bg-purple-600",
|
|
3172
3333
|
HEAD: "bg-gray-600"
|
|
3173
|
-
},
|
|
3334
|
+
}, Ui = {
|
|
3174
3335
|
GET: "bg-blue-500",
|
|
3175
3336
|
POST: "bg-green-500",
|
|
3176
3337
|
PUT: "bg-yellow-500",
|
|
@@ -3178,39 +3339,39 @@ var ki = {
|
|
|
3178
3339
|
PATCH: "bg-purple-500",
|
|
3179
3340
|
HEAD: "bg-gray-500"
|
|
3180
3341
|
};
|
|
3181
|
-
function
|
|
3182
|
-
return e ?
|
|
3342
|
+
function Wi(e) {
|
|
3343
|
+
return e ? Hi[e.toUpperCase()] ?? "bg-gray-600" : "bg-gray-600";
|
|
3183
3344
|
}
|
|
3184
|
-
function
|
|
3185
|
-
return e ?
|
|
3345
|
+
function Gi(e) {
|
|
3346
|
+
return e ? Ui[e.toUpperCase()] ?? "bg-gray-500" : "bg-gray-500";
|
|
3186
3347
|
}
|
|
3187
|
-
function
|
|
3348
|
+
function Ki(e) {
|
|
3188
3349
|
let t = e ?? 0;
|
|
3189
3350
|
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";
|
|
3190
3351
|
}
|
|
3191
|
-
function
|
|
3352
|
+
function qi(e, t) {
|
|
3192
3353
|
let n = (e || "ANY").toUpperCase();
|
|
3193
3354
|
return n === "GET" ? t ? "bg-blue-500/15 text-blue-400" : "bg-blue-100 text-blue-700" : n === "POST" ? t ? "bg-emerald-500/15 text-emerald-400" : "bg-emerald-100 text-emerald-700" : n === "PUT" ? t ? "bg-amber-500/15 text-amber-400" : "bg-amber-100 text-amber-700" : n === "DELETE" ? t ? "bg-red-500/15 text-red-400" : "bg-red-100 text-red-700" : n === "PATCH" ? t ? "bg-purple-500/15 text-purple-400" : "bg-purple-100 text-purple-700" : n === "HEAD" ? t ? "bg-sky-500/15 text-sky-400" : "bg-sky-100 text-sky-700" : t ? "bg-gray-500/15 text-gray-400" : "bg-gray-100 text-gray-600";
|
|
3194
3355
|
}
|
|
3195
|
-
function
|
|
3356
|
+
function Ji(e, t) {
|
|
3196
3357
|
let n = e ?? 200;
|
|
3197
3358
|
return n >= 200 && n < 300 ? t ? "bg-emerald-500/15 text-emerald-300" : "bg-emerald-100 text-emerald-700" : n >= 300 && n < 400 ? t ? "bg-sky-500/15 text-sky-300" : "bg-sky-100 text-sky-700" : n >= 400 && n < 500 ? t ? "bg-amber-500/15 text-amber-300" : "bg-amber-100 text-amber-700" : n >= 500 && n < 600 ? t ? "bg-red-500/15 text-red-300" : "bg-red-100 text-red-700" : t ? "bg-gray-800 text-gray-400" : "bg-gray-100 text-gray-600";
|
|
3198
3359
|
}
|
|
3199
|
-
function
|
|
3360
|
+
function Yi(e, t) {
|
|
3200
3361
|
let n = e ?? 200;
|
|
3201
3362
|
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";
|
|
3202
3363
|
}
|
|
3203
3364
|
//#endregion
|
|
3204
3365
|
//#region src/utils/kvRows.ts
|
|
3205
|
-
function
|
|
3366
|
+
function Xi(e) {
|
|
3206
3367
|
return !(e.key ?? "").trim() || e.matcherType === "absent" ? !1 : !(e.value ?? "").trim();
|
|
3207
3368
|
}
|
|
3208
|
-
function
|
|
3369
|
+
function Zi(e) {
|
|
3209
3370
|
return e.matcherType === "absent" || !(e.value ?? "").trim() ? !1 : !(e.key ?? "").trim();
|
|
3210
3371
|
}
|
|
3211
3372
|
//#endregion
|
|
3212
3373
|
//#region src/utils/sanitizeHtml.ts
|
|
3213
|
-
var
|
|
3374
|
+
var Qi = /* @__PURE__ */ new Set([
|
|
3214
3375
|
"A",
|
|
3215
3376
|
"B",
|
|
3216
3377
|
"STRONG",
|
|
@@ -3225,7 +3386,7 @@ var zi = /* @__PURE__ */ new Set([
|
|
|
3225
3386
|
"LI",
|
|
3226
3387
|
"SPAN",
|
|
3227
3388
|
"DIV"
|
|
3228
|
-
]),
|
|
3389
|
+
]), $i = /* @__PURE__ */ new Set([
|
|
3229
3390
|
"SCRIPT",
|
|
3230
3391
|
"STYLE",
|
|
3231
3392
|
"IFRAME",
|
|
@@ -3233,40 +3394,40 @@ var zi = /* @__PURE__ */ new Set([
|
|
|
3233
3394
|
"EMBED",
|
|
3234
3395
|
"NOSCRIPT",
|
|
3235
3396
|
"TEMPLATE"
|
|
3236
|
-
]),
|
|
3237
|
-
function
|
|
3397
|
+
]), ea = { A: /* @__PURE__ */ new Set(["href", "title"]) };
|
|
3398
|
+
function ta(e) {
|
|
3238
3399
|
let t = e.trim().toLowerCase();
|
|
3239
3400
|
return t.startsWith("http://") || t.startsWith("https://") || t.startsWith("mailto:") || t.startsWith("tel:") || t.startsWith("/") || t.startsWith("#") || t === "";
|
|
3240
3401
|
}
|
|
3241
|
-
function
|
|
3402
|
+
function na(e) {
|
|
3242
3403
|
if (e.nodeType !== Node.ELEMENT_NODE) return;
|
|
3243
3404
|
let t = e, n = t.tagName.toUpperCase();
|
|
3244
|
-
if (!
|
|
3245
|
-
|
|
3405
|
+
if (!Qi.has(n)) {
|
|
3406
|
+
$i.has(n) ? t.remove() : t.replaceWith(document.createTextNode(t.textContent ?? ""));
|
|
3246
3407
|
return;
|
|
3247
3408
|
}
|
|
3248
|
-
let r =
|
|
3409
|
+
let r = ea[n] ?? /* @__PURE__ */ new Set();
|
|
3249
3410
|
for (let e of Array.from(t.attributes)) {
|
|
3250
3411
|
if (!r.has(e.name.toLowerCase())) {
|
|
3251
3412
|
t.removeAttribute(e.name);
|
|
3252
3413
|
continue;
|
|
3253
3414
|
}
|
|
3254
|
-
n === "A" && e.name.toLowerCase() === "href" && !
|
|
3415
|
+
n === "A" && e.name.toLowerCase() === "href" && !ta(e.value) && t.removeAttribute(e.name);
|
|
3255
3416
|
}
|
|
3256
3417
|
n === "A" && t.hasAttribute("href") && (t.setAttribute("rel", "noopener noreferrer"), t.setAttribute("target", "_blank"));
|
|
3257
|
-
for (let e of Array.from(t.childNodes))
|
|
3418
|
+
for (let e of Array.from(t.childNodes)) na(e);
|
|
3258
3419
|
}
|
|
3259
|
-
function
|
|
3420
|
+
function ra(e) {
|
|
3260
3421
|
if (!e) return "";
|
|
3261
3422
|
let t = new DOMParser().parseFromString(`<div>${e}</div>`, "text/html").body.firstElementChild;
|
|
3262
3423
|
if (!t) return "";
|
|
3263
|
-
for (let e of Array.from(t.childNodes))
|
|
3424
|
+
for (let e of Array.from(t.childNodes)) na(e);
|
|
3264
3425
|
return t.innerHTML;
|
|
3265
3426
|
}
|
|
3266
3427
|
//#endregion
|
|
3267
3428
|
//#region src/utils/format.ts
|
|
3268
3429
|
var $ = "—";
|
|
3269
|
-
function
|
|
3430
|
+
function ia(e, t = 4) {
|
|
3270
3431
|
if (e == null || typeof e == "string" && e.trim() === "") return $;
|
|
3271
3432
|
let n = typeof e == "string" ? Number(e) : e;
|
|
3272
3433
|
return isFinite(n) ? n.toLocaleString(void 0, {
|
|
@@ -3274,12 +3435,12 @@ function Gi(e, t = 4) {
|
|
|
3274
3435
|
maximumFractionDigits: t
|
|
3275
3436
|
}) : $;
|
|
3276
3437
|
}
|
|
3277
|
-
function
|
|
3438
|
+
function aa(e) {
|
|
3278
3439
|
if (e == null || e === "") return $;
|
|
3279
3440
|
let t = new Date(e);
|
|
3280
3441
|
return isNaN(t.getTime()) ? String(e) : t.toLocaleString();
|
|
3281
3442
|
}
|
|
3282
|
-
function
|
|
3443
|
+
function oa(e) {
|
|
3283
3444
|
return new Date(e).toLocaleString(void 0, {
|
|
3284
3445
|
month: "short",
|
|
3285
3446
|
day: "numeric",
|
|
@@ -3287,13 +3448,13 @@ function qi(e) {
|
|
|
3287
3448
|
minute: "2-digit"
|
|
3288
3449
|
});
|
|
3289
3450
|
}
|
|
3290
|
-
function
|
|
3451
|
+
function sa(e) {
|
|
3291
3452
|
return new Date(e).toLocaleDateString(void 0, {
|
|
3292
3453
|
month: "short",
|
|
3293
3454
|
day: "numeric"
|
|
3294
3455
|
});
|
|
3295
3456
|
}
|
|
3296
|
-
function
|
|
3457
|
+
function ca(e) {
|
|
3297
3458
|
try {
|
|
3298
3459
|
return new Date(e).toLocaleString(void 0, {
|
|
3299
3460
|
year: "numeric",
|
|
@@ -3309,7 +3470,7 @@ function Yi(e) {
|
|
|
3309
3470
|
return String(e);
|
|
3310
3471
|
}
|
|
3311
3472
|
}
|
|
3312
|
-
function
|
|
3473
|
+
function la(e) {
|
|
3313
3474
|
if (!isFinite(e) || e === 0) return e.toFixed(2);
|
|
3314
3475
|
let t = Math.abs(e), n = 2;
|
|
3315
3476
|
return t < 1e-4 ? n = 8 : t < .01 ? n = 6 : t < 1 ? n = 4 : t < 100 && (n = 3), e.toLocaleString(void 0, {
|
|
@@ -3317,13 +3478,13 @@ function Xi(e) {
|
|
|
3317
3478
|
maximumFractionDigits: n
|
|
3318
3479
|
});
|
|
3319
3480
|
}
|
|
3320
|
-
function
|
|
3481
|
+
function ua(e, t = 2) {
|
|
3321
3482
|
return `${e >= 0 ? "+" : ""}${e.toFixed(t)}%`;
|
|
3322
3483
|
}
|
|
3323
|
-
function
|
|
3484
|
+
function da(e) {
|
|
3324
3485
|
return `${e < 0 ? "-" : "+"}$${Math.abs(e).toFixed(2)}`;
|
|
3325
3486
|
}
|
|
3326
|
-
function
|
|
3487
|
+
function fa(e) {
|
|
3327
3488
|
if (e == null || e === "") return $;
|
|
3328
3489
|
let t = new Date(e);
|
|
3329
3490
|
return isNaN(t.getTime()) ? String(e) : t.toLocaleDateString("en-US", {
|
|
@@ -3332,7 +3493,7 @@ function $i(e) {
|
|
|
3332
3493
|
day: "numeric"
|
|
3333
3494
|
});
|
|
3334
3495
|
}
|
|
3335
|
-
function
|
|
3496
|
+
function pa(e) {
|
|
3336
3497
|
if (e == null || e === "") return $;
|
|
3337
3498
|
let t = new Date(e);
|
|
3338
3499
|
return isNaN(t.getTime()) ? String(e) : t.toLocaleDateString("en-US", {
|
|
@@ -3343,22 +3504,77 @@ function ea(e) {
|
|
|
3343
3504
|
minute: "2-digit"
|
|
3344
3505
|
});
|
|
3345
3506
|
}
|
|
3346
|
-
function
|
|
3507
|
+
function ma(e) {
|
|
3347
3508
|
if (typeof e != "number" || !isFinite(e) || e <= 0) return "";
|
|
3348
3509
|
let t = e / 1e3, n = t < 1 ? 3 : 2;
|
|
3349
3510
|
return `= ${t.toFixed(n)} s`;
|
|
3350
3511
|
}
|
|
3351
|
-
function
|
|
3512
|
+
function ha(e) {
|
|
3352
3513
|
return e ? e < 1024 ? `${e} B` : e < 1024 * 1024 ? `${(e / 1024).toFixed(1)} KB` : `${(e / (1024 * 1024)).toFixed(1)} MB` : "";
|
|
3353
3514
|
}
|
|
3354
|
-
function
|
|
3515
|
+
function ga(e) {
|
|
3516
|
+
try {
|
|
3517
|
+
return JSON.stringify(JSON.parse(e), null, 2);
|
|
3518
|
+
} catch {
|
|
3519
|
+
return e;
|
|
3520
|
+
}
|
|
3521
|
+
}
|
|
3522
|
+
function _a(e) {
|
|
3523
|
+
if (e == null) return "";
|
|
3524
|
+
if (typeof e == "string") return e;
|
|
3525
|
+
try {
|
|
3526
|
+
return JSON.stringify(e);
|
|
3527
|
+
} catch {
|
|
3528
|
+
return String(e);
|
|
3529
|
+
}
|
|
3530
|
+
}
|
|
3531
|
+
function va(e, t = 2) {
|
|
3355
3532
|
if (e == null || !isFinite(e)) return $;
|
|
3356
3533
|
let n = Math.floor(Math.max(0, e) / 6e4), r = Math.floor(n / 1440), i = Math.floor(n % 1440 / 60), a = n % 60, o = [];
|
|
3357
3534
|
return r > 0 && o.push(`${r}d`), (r > 0 || i > 0) && o.push(`${i}h`), o.push(`${a}m`), o.slice(0, t).join(" ");
|
|
3358
3535
|
}
|
|
3359
3536
|
//#endregion
|
|
3537
|
+
//#region src/utils/validate.ts
|
|
3538
|
+
function ya(e) {
|
|
3539
|
+
let t = (e ?? "").trim();
|
|
3540
|
+
if (!t) return !1;
|
|
3541
|
+
try {
|
|
3542
|
+
let e = new URL(t);
|
|
3543
|
+
return e.protocol === "http:" || e.protocol === "https:";
|
|
3544
|
+
} catch {
|
|
3545
|
+
return !1;
|
|
3546
|
+
}
|
|
3547
|
+
}
|
|
3548
|
+
function ba(e) {
|
|
3549
|
+
if (!e.trim()) return !0;
|
|
3550
|
+
try {
|
|
3551
|
+
return JSON.parse(e), !0;
|
|
3552
|
+
} catch {
|
|
3553
|
+
return !1;
|
|
3554
|
+
}
|
|
3555
|
+
}
|
|
3556
|
+
function xa(e) {
|
|
3557
|
+
if (!e.trim()) return !0;
|
|
3558
|
+
try {
|
|
3559
|
+
return !new DOMParser().parseFromString(e, "application/xml").getElementsByTagName("parsererror").length;
|
|
3560
|
+
} catch {
|
|
3561
|
+
return !1;
|
|
3562
|
+
}
|
|
3563
|
+
}
|
|
3564
|
+
function Sa(e) {
|
|
3565
|
+
if (!e.trim()) return !0;
|
|
3566
|
+
let t = e.replace(/\s+/g, "");
|
|
3567
|
+
if (!t) return !0;
|
|
3568
|
+
if (t.length % 4 != 0 || !/^[A-Za-z0-9+/]*={0,2}$/.test(t)) return !1;
|
|
3569
|
+
try {
|
|
3570
|
+
return atob(t), !0;
|
|
3571
|
+
} catch {
|
|
3572
|
+
return !1;
|
|
3573
|
+
}
|
|
3574
|
+
}
|
|
3575
|
+
//#endregion
|
|
3360
3576
|
//#region src/utils/specForm.ts
|
|
3361
|
-
function
|
|
3577
|
+
function Ca(e, t) {
|
|
3362
3578
|
let n = {};
|
|
3363
3579
|
if (!e) return n;
|
|
3364
3580
|
for (let r of e) {
|
|
@@ -3367,7 +3583,7 @@ function ia(e, t) {
|
|
|
3367
3583
|
}
|
|
3368
3584
|
return n;
|
|
3369
3585
|
}
|
|
3370
|
-
function
|
|
3586
|
+
function wa(e, t) {
|
|
3371
3587
|
if (!e) return null;
|
|
3372
3588
|
for (let n of e) if (n.type === "decimal" || n.type === "integer") {
|
|
3373
3589
|
let e = t[n.key], r = e === "" || e == null;
|
|
@@ -3378,7 +3594,7 @@ function aa(e, t) {
|
|
|
3378
3594
|
}
|
|
3379
3595
|
//#endregion
|
|
3380
3596
|
//#region src/utils/pnl.ts
|
|
3381
|
-
function
|
|
3597
|
+
function Ta(e) {
|
|
3382
3598
|
if (e.buyPrice == null || e.lastPrice == null || e.filledQty == null) return {
|
|
3383
3599
|
pnlUsd: null,
|
|
3384
3600
|
pnlPct: null
|
|
@@ -3393,4 +3609,4 @@ function oa(e) {
|
|
|
3393
3609
|
};
|
|
3394
3610
|
}
|
|
3395
3611
|
//#endregion
|
|
3396
|
-
export {
|
|
3612
|
+
export { R as AlertEnum, Jn as BaseActionButton, je as BaseAlert, Rn as BaseAppLayout, Ne as BaseBadge, zi as BaseBadgeEnum, Le as BaseBreadcrumb, G as BaseButton, U as BaseButtonEnum, W as BaseButtonSizeEnum, xr as BaseChipButton, kr as BaseCodeBlock, Wt as BaseCollapsibleSection, Jt as BaseConfirmModal, Xn as BaseCopyButton, Ci as BaseCredentialsForm, Lr as BaseDropdown, Fn as BaseEntityPickerModal, Or as BaseFileDropzone, oi as BaseFilterChip, er as BaseGoogleSignInButton, Q as BaseInput, Xe as BaseLine, Ze as BaseLoginEnum, fr as BaseLoginForm, $e as BaseLogo, K as BaseLogoEnum, ot as BaseModal, et as BaseModalEnum, Vt as BaseModalShell, tn as BaseNotFoundPage, yr as BaseNotificationPanel, Hn as BasePageHeader, Ni as BasePillPickerModal, Sr as BaseRemoveButton, st as BaseRow, Vr as BaseSegmentedControl, Mr as BaseSelect, Sn as BaseSidebar, ti as BaseSpecFields, ct as BaseSpinner, ii as BaseStatBreakdown, Tr as BaseStatusPill, qr as BaseTable, Qt as BaseTextInputModal, dt as BaseToast, q as BaseToastEnum, Gn as BaseToolbarButton, pt as ColoredSquares, H as ColorsEnums, gt as EarningsCard, xt as EuroAmount, Ke as LineEnum, Et as Pagination, J as PositioningEnum, jt as TrendArrow, Ca as buildSpecParams, Ta as computePnL, wa as firstInvalidNumericSpec, ha as fmtBytes, fa as fmtCalendarDate, pa as fmtCalendarDateTime, aa as fmtDate, sa as fmtDateShort, oa as fmtDateTime, ca as fmtDateTimeMs, va as fmtDuration, ma as fmtMsAsSeconds, ia as fmtNumber, ua as fmtPct, la as fmtPrice, da as fmtUsd, ga as formatJson, Bi as getBaseColor, Vi as getBaseColorOf, Oe as initTheme, ta as isSafeHref, ya as isValidAbsoluteUrl, Sa as isValidBase64, ba as isValidJson, xa as isValidXml, Gi as methodBadgeBright, Wi as methodBadgeSolid, qi as methodBadgeTinted, Zi as rowKeyMissing, Xi as rowValueMissing, ra as sanitizeHtml, Ji as statusBadgeSoft, Ki as statusBadgeSolid, Yi as statusBadgeTinted, _a as stringifyValue, Pi as useDebouncedRef, Mt as useEscapeKey, Li as useFieldClasses, rn as useMobileSidebar, dn as useNotifications, Ri as usePolling, Ii as useQueryParamSync, cn as useSidebarCollapse, V as useTheme, Y as useThemeClasses, Fi as useToast };
|