mgv-backoffice 1.38.0 → 1.40.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 +59 -1
- package/dist/components/BaseAuthLayout.vue.d.ts +27 -0
- package/dist/components/BaseBooleanBadge.vue.d.ts +12 -0
- package/dist/components/BaseDetailList.vue.d.ts +13 -0
- package/dist/components/BasePageHeader.vue.d.ts +3 -0
- package/dist/components/BaseToggle.vue.d.ts +33 -0
- package/dist/index.d.ts +5 -0
- package/dist/types/detail.d.ts +10 -0
- package/dist/ui-lib.css +1 -1
- package/dist/ui-lib.js +381 -217
- package/dist/ui-lib.umd.cjs +1 -1
- package/package.json +1 -1
- package/src/components/BaseAuthLayout.test.ts +48 -0
- package/src/components/BaseAuthLayout.vue +50 -0
- package/src/components/BaseBooleanBadge.vue +33 -0
- package/src/components/BaseButton.vue +1 -1
- package/src/components/BaseDetailList.test.ts +36 -0
- package/src/components/BaseDetailList.vue +43 -0
- package/src/components/BasePageHeader.vue +13 -2
- package/src/components/BaseSelect.test.ts +1 -1
- package/src/components/BaseSelect.vue +3 -2
- package/src/components/BaseToggle.test.ts +39 -0
- package/src/components/BaseToggle.vue +73 -0
- package/src/components/Pagination.test.ts +93 -85
- package/src/components/Pagination.vue +87 -82
- package/src/index.ts +5 -0
- package/src/style.css +58 -58
- package/src/types/detail.ts +10 -0
package/dist/ui-lib.js
CHANGED
|
@@ -188,7 +188,7 @@ var Fe = { class: "min-w-0 flex-1" }, Ie = {
|
|
|
188
188
|
color: {
|
|
189
189
|
type: String,
|
|
190
190
|
required: !1,
|
|
191
|
-
default: K.
|
|
191
|
+
default: K.GREEN
|
|
192
192
|
},
|
|
193
193
|
to: {
|
|
194
194
|
type: String,
|
|
@@ -1054,7 +1054,8 @@ var Fe = { class: "min-w-0 flex-1" }, Ie = {
|
|
|
1054
1054
|
e === i.value || e < 1 || e > a.value || (i.value = e, u(e), l("page-changed", e));
|
|
1055
1055
|
}
|
|
1056
1056
|
return I(() => [r.totalItems, r.itemsPerPage], () => {
|
|
1057
|
-
|
|
1057
|
+
let e = Number(r.itemsPerPage) > 0 ? Number(r.itemsPerPage) : 20, t = Number(r.totalItems) > 0 ? Number(r.totalItems) : 0;
|
|
1058
|
+
a.value = Math.ceil(t / e), i.value > a.value && (i.value = Math.max(1, a.value)), u(i.value);
|
|
1058
1059
|
}, { immediate: !0 }), (t, n) => (T(), s("nav", Xt, [c("ul", Zt, [(T(!0), s(e, null, k(o.value, (e, t) => (T(), s("li", {
|
|
1059
1060
|
key: t,
|
|
1060
1061
|
class: "mr-1"
|
|
@@ -1919,7 +1920,11 @@ var Bn = ["aria-label", "aria-expanded"], Vn = { class: "flex flex-col h-full" }
|
|
|
1919
1920
|
}, [A(t.$slots, "default")], 10, dr)
|
|
1920
1921
|
], 2));
|
|
1921
1922
|
}
|
|
1922
|
-
}), pr = { class: "flex items-center gap-3 min-w-0" }, mr = {
|
|
1923
|
+
}), pr = { class: "flex items-center gap-3 min-w-0" }, mr = {
|
|
1924
|
+
key: 0,
|
|
1925
|
+
class: "absolute left-0 top-[0.14em] h-[1.1em] w-1 rounded-full bg-gradient-to-b from-emerald-400 to-emerald-600",
|
|
1926
|
+
"aria-hidden": "true"
|
|
1927
|
+
}, hr = { class: "flex items-center gap-2" }, gr = /* @__PURE__ */ p({
|
|
1923
1928
|
__name: "BasePageHeader",
|
|
1924
1929
|
props: {
|
|
1925
1930
|
title: {},
|
|
@@ -1927,7 +1932,11 @@ var Bn = ["aria-label", "aria-expanded"], Vn = { class: "flex flex-col h-full" }
|
|
|
1927
1932
|
iconColor: { default: "emerald" },
|
|
1928
1933
|
maxWidthClass: { default: "max-w-4xl" },
|
|
1929
1934
|
align: { default: "center" },
|
|
1930
|
-
marginClass: { default: "mb-8" }
|
|
1935
|
+
marginClass: { default: "mb-8" },
|
|
1936
|
+
accent: {
|
|
1937
|
+
type: Boolean,
|
|
1938
|
+
default: !1
|
|
1939
|
+
}
|
|
1931
1940
|
},
|
|
1932
1941
|
setup(e) {
|
|
1933
1942
|
let t = e, { isDark: n } = W(), r = Z(), a = i(() => {
|
|
@@ -1974,16 +1983,16 @@ var Bn = ["aria-label", "aria-expanded"], Vn = { class: "flex flex-col h-full" }
|
|
|
1974
1983
|
return (t, n) => (T(), s("header", { class: v(e.maxWidthClass ? ["mx-auto px-4 sm:px-6", e.maxWidthClass] : void 0) }, [c("div", { class: v(["flex flex-wrap justify-between gap-3", [e.align === "end" ? "items-end" : "items-center", e.marginClass]]) }, [c("div", pr, [t.$slots.icon ? (T(), s("div", {
|
|
1975
1984
|
key: 0,
|
|
1976
1985
|
class: v(["w-10 h-10 rounded-lg flex items-center justify-center", a.value])
|
|
1977
|
-
}, [A(t.$slots, "icon", { iconClass: l.value })], 2)) : o("", !0), c("div", null, [c("h1", { class: v(["text-2xl font-bold", P(r).primaryTextSoft]) }, N(e.title),
|
|
1986
|
+
}, [A(t.$slots, "icon", { iconClass: l.value })], 2)) : o("", !0), c("div", null, [c("h1", { class: v(["text-2xl font-bold", [P(r).primaryTextSoft, e.accent ? "relative pl-3.5 tracking-tight" : ""]]) }, [e.accent ? (T(), s("span", mr)) : o("", !0), d(" " + N(e.title), 1)], 2), e.subtitle || t.$slots.subtitle ? (T(), s("p", {
|
|
1978
1987
|
key: 0,
|
|
1979
|
-
class: v(["text-sm", P(r).dimTextAlt])
|
|
1980
|
-
}, [A(t.$slots, "subtitle", {}, () => [d(N(e.subtitle), 1)])], 2)) : o("", !0)])]), c("div",
|
|
1988
|
+
class: v(["max-w-[72ch] text-sm", P(r).dimTextAlt])
|
|
1989
|
+
}, [A(t.$slots, "subtitle", {}, () => [d(N(e.subtitle), 1)])], 2)) : o("", !0)])]), c("div", hr, [A(t.$slots, "actions")])], 2)], 2));
|
|
1981
1990
|
}
|
|
1982
|
-
}),
|
|
1991
|
+
}), _r = [
|
|
1983
1992
|
"type",
|
|
1984
1993
|
"disabled",
|
|
1985
1994
|
"title"
|
|
1986
|
-
],
|
|
1995
|
+
], vr = { key: 0 }, yr = /* @__PURE__ */ p({
|
|
1987
1996
|
__name: "BaseToolbarButton",
|
|
1988
1997
|
props: {
|
|
1989
1998
|
label: { default: "" },
|
|
@@ -2024,14 +2033,14 @@ var Bn = ["aria-label", "aria-expanded"], Vn = { class: "flex flex-col h-full" }
|
|
|
2024
2033
|
title: e.title,
|
|
2025
2034
|
class: v(["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", a.value]),
|
|
2026
2035
|
onClick: n[0] ||= (e) => t.$emit("click", e)
|
|
2027
|
-
}, [A(t.$slots, "icon", { iconClass: "w-4 h-4" }), e.label ? (T(), s("span",
|
|
2036
|
+
}, [A(t.$slots, "icon", { iconClass: "w-4 h-4" }), e.label ? (T(), s("span", vr, N(e.label), 1)) : o("", !0)], 10, _r));
|
|
2028
2037
|
}
|
|
2029
|
-
}),
|
|
2038
|
+
}), br = [
|
|
2030
2039
|
"type",
|
|
2031
2040
|
"disabled",
|
|
2032
2041
|
"title",
|
|
2033
2042
|
"aria-label"
|
|
2034
|
-
],
|
|
2043
|
+
], xr = { key: 0 }, Sr = /* @__PURE__ */ p({
|
|
2035
2044
|
__name: "BaseActionButton",
|
|
2036
2045
|
props: {
|
|
2037
2046
|
label: { default: "" },
|
|
@@ -2130,9 +2139,9 @@ var Bn = ["aria-label", "aria-expanded"], Vn = { class: "flex flex-col h-full" }
|
|
|
2130
2139
|
"aria-label": e.ariaLabel,
|
|
2131
2140
|
class: v(["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]]),
|
|
2132
2141
|
onClick: n[0] ||= (e) => t.$emit("click", e)
|
|
2133
|
-
}, [A(t.$slots, "icon", { iconClass: "w-4 h-4" }), e.label ? (T(), s("span",
|
|
2142
|
+
}, [A(t.$slots, "icon", { iconClass: "w-4 h-4" }), e.label ? (T(), s("span", xr, N(e.label), 1)) : o("", !0)], 10, br));
|
|
2134
2143
|
}
|
|
2135
|
-
}),
|
|
2144
|
+
}), Cr = ["title", "aria-label"], wr = /* @__PURE__ */ p({
|
|
2136
2145
|
__name: "BaseCopyButton",
|
|
2137
2146
|
props: {
|
|
2138
2147
|
text: {},
|
|
@@ -2181,20 +2190,20 @@ var Bn = ["aria-label", "aria-expanded"], Vn = { class: "flex flex-col h-full" }
|
|
|
2181
2190
|
key: 1,
|
|
2182
2191
|
class: v(e.iconClass),
|
|
2183
2192
|
"aria-hidden": "true"
|
|
2184
|
-
}, null, 8, ["class"]))], 10,
|
|
2193
|
+
}, null, 8, ["class"]))], 10, Cr));
|
|
2185
2194
|
}
|
|
2186
|
-
}),
|
|
2195
|
+
}), Tr = ["disabled", "aria-busy"], Er = {
|
|
2187
2196
|
key: 0,
|
|
2188
2197
|
class: "w-5 h-5 animate-spin shrink-0",
|
|
2189
2198
|
viewBox: "0 0 24 24",
|
|
2190
2199
|
fill: "none",
|
|
2191
2200
|
"aria-hidden": "true"
|
|
2192
|
-
},
|
|
2201
|
+
}, Dr = {
|
|
2193
2202
|
key: 1,
|
|
2194
2203
|
class: "w-5 h-5 shrink-0",
|
|
2195
2204
|
viewBox: "0 0 48 48",
|
|
2196
2205
|
"aria-hidden": "true"
|
|
2197
|
-
},
|
|
2206
|
+
}, Or = /* @__PURE__ */ p({
|
|
2198
2207
|
__name: "BaseGoogleSignInButton",
|
|
2199
2208
|
props: {
|
|
2200
2209
|
label: { default: "Sign in with Google" },
|
|
@@ -2223,7 +2232,7 @@ var Bn = ["aria-label", "aria-expanded"], Vn = { class: "flex flex-col h-full" }
|
|
|
2223
2232
|
"aria-busy": e.loading,
|
|
2224
2233
|
onClick: l,
|
|
2225
2234
|
class: v(["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" : "", P(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"]])
|
|
2226
|
-
}, [e.loading ? (T(), s("svg",
|
|
2235
|
+
}, [e.loading ? (T(), s("svg", Er, [...n[0] ||= [c("circle", {
|
|
2227
2236
|
class: "opacity-25",
|
|
2228
2237
|
cx: "12",
|
|
2229
2238
|
cy: "12",
|
|
@@ -2234,18 +2243,18 @@ var Bn = ["aria-label", "aria-expanded"], Vn = { class: "flex flex-col h-full" }
|
|
|
2234
2243
|
class: "opacity-75",
|
|
2235
2244
|
fill: "currentColor",
|
|
2236
2245
|
d: "M4 12a8 8 0 0 1 8-8V0C5.4 0 0 5.4 0 12h4z"
|
|
2237
|
-
}, null, -1)]])) : (T(), s("svg",
|
|
2246
|
+
}, null, -1)]])) : (T(), s("svg", Dr, [...n[1] ||= [u("<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)]])), c("span", null, N(e.label), 1)], 10, Tr));
|
|
2238
2247
|
}
|
|
2239
|
-
}),
|
|
2248
|
+
}), kr = {
|
|
2240
2249
|
key: 0,
|
|
2241
2250
|
class: "flex justify-center mb-6"
|
|
2242
|
-
},
|
|
2251
|
+
}, Ar = { class: "mb-6 text-center" }, jr = { class: "flex items-center gap-3 my-5" }, Mr = ["disabled"], Nr = { class: "flex items-center justify-between mb-1.5" }, Pr = { class: "relative" }, Fr = ["type", "disabled"], Ir = ["aria-label", "aria-pressed"], Lr = ["disabled"], Rr = ["disabled", "aria-busy"], zr = {
|
|
2243
2252
|
key: 0,
|
|
2244
2253
|
class: "w-4 h-4 animate-spin",
|
|
2245
2254
|
viewBox: "0 0 24 24",
|
|
2246
2255
|
fill: "none",
|
|
2247
2256
|
"aria-hidden": "true"
|
|
2248
|
-
},
|
|
2257
|
+
}, Br = /* @__PURE__ */ p({
|
|
2249
2258
|
__name: "BaseLoginForm",
|
|
2250
2259
|
props: {
|
|
2251
2260
|
title: { default: "Sign in" },
|
|
@@ -2280,8 +2289,8 @@ var Bn = ["aria-label", "aria-expanded"], Vn = { class: "flex flex-col h-full" }
|
|
|
2280
2289
|
});
|
|
2281
2290
|
}
|
|
2282
2291
|
return (n, r) => (T(), s("div", { class: v(["w-full max-w-sm mx-auto rounded-xl border shadow-sm p-6 sm:p-8", P(u).card]) }, [
|
|
2283
|
-
n.$slots.logo ? (T(), s("div",
|
|
2284
|
-
c("div",
|
|
2292
|
+
n.$slots.logo ? (T(), s("div", kr, [A(n.$slots, "logo")])) : o("", !0),
|
|
2293
|
+
c("div", Ar, [c("h1", { class: v(["text-xl font-semibold", P(u).primaryText]) }, N(t.title), 3), t.subtitle ? (T(), s("p", {
|
|
2285
2294
|
key: 0,
|
|
2286
2295
|
class: v(["mt-1 text-sm", P(u).mutedText])
|
|
2287
2296
|
}, N(t.subtitle), 3)) : o("", !0)]),
|
|
@@ -2290,11 +2299,11 @@ var Bn = ["aria-label", "aria-expanded"], Vn = { class: "flex flex-col h-full" }
|
|
|
2290
2299
|
role: "alert",
|
|
2291
2300
|
class: v(["mb-4 rounded-lg border px-3 py-2 text-sm", P(l) ? "bg-red-500/10 border-red-500/30 text-red-300" : "bg-red-50 border-red-200 text-red-700"])
|
|
2292
2301
|
}, N(t.error), 3)) : o("", !0),
|
|
2293
|
-
t.showGoogle ? (T(), s(e, { key: 2 }, [f(
|
|
2302
|
+
t.showGoogle ? (T(), s(e, { key: 2 }, [f(Or, {
|
|
2294
2303
|
loading: t.googleLoading,
|
|
2295
2304
|
disabled: t.loading,
|
|
2296
2305
|
onClick: r[0] ||= (e) => a("google-sign-in")
|
|
2297
|
-
}, null, 8, ["loading", "disabled"]), c("div",
|
|
2306
|
+
}, null, 8, ["loading", "disabled"]), c("div", jr, [
|
|
2298
2307
|
c("span", { class: v(["h-px flex-1", P(l) ? "bg-gray-700" : "bg-gray-200"]) }, null, 2),
|
|
2299
2308
|
c("span", { class: v(["text-xs uppercase tracking-wider", P(u).dimTextAlt]) }, "or", 2),
|
|
2300
2309
|
c("span", { class: v(["h-px flex-1", P(l) ? "bg-gray-700" : "bg-gray-200"]) }, null, 2)
|
|
@@ -2316,11 +2325,11 @@ var Bn = ["aria-label", "aria-expanded"], Vn = { class: "flex flex-col h-full" }
|
|
|
2316
2325
|
disabled: _.value,
|
|
2317
2326
|
placeholder: "you@example.com",
|
|
2318
2327
|
class: v(["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", P(u).inputWithPlaceholder])
|
|
2319
|
-
}, null, 10,
|
|
2320
|
-
c("div", null, [c("div",
|
|
2328
|
+
}, null, 10, Mr), [[re, p.value]])]),
|
|
2329
|
+
c("div", null, [c("div", Nr, [c("label", {
|
|
2321
2330
|
for: "login-password",
|
|
2322
2331
|
class: v(["block text-sm font-medium", P(u).label])
|
|
2323
|
-
}, " Password ", 2), A(n.$slots, "forgot")]), c("div",
|
|
2332
|
+
}, " Password ", 2), A(n.$slots, "forgot")]), c("div", Pr, [R(c("input", {
|
|
2324
2333
|
id: "login-password",
|
|
2325
2334
|
"onUpdate:modelValue": r[2] ||= (e) => m.value = e,
|
|
2326
2335
|
type: g.value ? "text" : "password",
|
|
@@ -2330,13 +2339,13 @@ var Bn = ["aria-label", "aria-expanded"], Vn = { class: "flex flex-col h-full" }
|
|
|
2330
2339
|
disabled: _.value,
|
|
2331
2340
|
placeholder: "••••••••",
|
|
2332
2341
|
class: v(["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", P(u).inputWithPlaceholder])
|
|
2333
|
-
}, null, 10,
|
|
2342
|
+
}, null, 10, Fr), [[ne, m.value]]), c("button", {
|
|
2334
2343
|
type: "button",
|
|
2335
2344
|
onClick: r[3] ||= (e) => g.value = !g.value,
|
|
2336
2345
|
"aria-label": g.value ? "Hide password" : "Show password",
|
|
2337
2346
|
"aria-pressed": g.value,
|
|
2338
2347
|
class: v(["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", P(u).mutedText])
|
|
2339
|
-
}, N(g.value ? "Hide" : "Show"), 11,
|
|
2348
|
+
}, N(g.value ? "Hide" : "Show"), 11, Ir)])]),
|
|
2340
2349
|
t.showRemember ? (T(), s("label", {
|
|
2341
2350
|
key: 0,
|
|
2342
2351
|
class: v(["flex items-center gap-2 text-sm cursor-pointer select-none", P(u).bodyText])
|
|
@@ -2345,13 +2354,13 @@ var Bn = ["aria-label", "aria-expanded"], Vn = { class: "flex flex-col h-full" }
|
|
|
2345
2354
|
type: "checkbox",
|
|
2346
2355
|
disabled: _.value,
|
|
2347
2356
|
class: "w-4 h-4 rounded border-gray-300 text-emerald-600 focus:ring-emerald-500"
|
|
2348
|
-
}, null, 8,
|
|
2357
|
+
}, null, 8, Lr), [[te, h.value]]), r[5] ||= d(" Remember me ", -1)], 2)) : o("", !0),
|
|
2349
2358
|
c("button", {
|
|
2350
2359
|
type: "submit",
|
|
2351
2360
|
disabled: _.value,
|
|
2352
2361
|
"aria-busy": t.loading,
|
|
2353
2362
|
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"
|
|
2354
|
-
}, [t.loading ? (T(), s("svg",
|
|
2363
|
+
}, [t.loading ? (T(), s("svg", zr, [...r[6] ||= [c("circle", {
|
|
2355
2364
|
class: "opacity-25",
|
|
2356
2365
|
cx: "12",
|
|
2357
2366
|
cy: "12",
|
|
@@ -2362,7 +2371,7 @@ var Bn = ["aria-label", "aria-expanded"], Vn = { class: "flex flex-col h-full" }
|
|
|
2362
2371
|
class: "opacity-75",
|
|
2363
2372
|
fill: "currentColor",
|
|
2364
2373
|
d: "M4 12a8 8 0 0 1 8-8V0C5.4 0 0 5.4 0 12h4z"
|
|
2365
|
-
}, null, -1)]])) : o("", !0), d(" " + N(t.submitLabel), 1)], 8,
|
|
2374
|
+
}, null, -1)]])) : o("", !0), d(" " + N(t.submitLabel), 1)], 8, Rr)
|
|
2366
2375
|
], 32),
|
|
2367
2376
|
n.$slots.footer ? (T(), s("div", {
|
|
2368
2377
|
key: 3,
|
|
@@ -2370,10 +2379,10 @@ var Bn = ["aria-label", "aria-expanded"], Vn = { class: "flex flex-col h-full" }
|
|
|
2370
2379
|
}, [A(n.$slots, "footer")], 2)) : o("", !0)
|
|
2371
2380
|
], 2));
|
|
2372
2381
|
}
|
|
2373
|
-
}),
|
|
2382
|
+
}), Vr = ["aria-label"], Hr = { class: "flex-1 overflow-y-auto" }, Ur = {
|
|
2374
2383
|
key: 0,
|
|
2375
2384
|
class: "flex flex-col items-center justify-center text-center px-6 py-16 gap-3"
|
|
2376
|
-
},
|
|
2385
|
+
}, Wr = ["onClick"], Gr = { class: "min-w-0 flex-1" }, Kr = { class: "flex items-baseline justify-between gap-2" }, qr = /* @__PURE__ */ p({
|
|
2377
2386
|
__name: "BaseNotificationPanel",
|
|
2378
2387
|
props: {
|
|
2379
2388
|
title: { default: "Notifications" },
|
|
@@ -2439,7 +2448,7 @@ var Bn = ["aria-label", "aria-expanded"], Vn = { class: "flex flex-col h-full" }
|
|
|
2439
2448
|
onClick: l[2] ||= (...e) => P(b) && P(b)(...e),
|
|
2440
2449
|
class: v(["text-xs font-medium cursor-pointer transition-colors focus:outline-none focus-visible:underline", P(m).emeraldText])
|
|
2441
2450
|
}, " Mark all as read ", 2)], 2)) : o("", !0),
|
|
2442
|
-
c("div",
|
|
2451
|
+
c("div", Hr, [C.value === 0 ? (T(), s("div", Ur, [f(P(le), {
|
|
2443
2452
|
class: v(["w-10 h-10", P(m).illustration]),
|
|
2444
2453
|
"aria-hidden": "true"
|
|
2445
2454
|
}, null, 8, ["class"]), c("p", { class: v(["text-sm", P(m).mutedText]) }, N(n.emptyText), 3)])) : (T(), s("ul", {
|
|
@@ -2452,18 +2461,18 @@ var Bn = ["aria-label", "aria-expanded"], Vn = { class: "flex flex-col h-full" }
|
|
|
2452
2461
|
}, [c("span", {
|
|
2453
2462
|
class: v(["mt-1.5 w-2 h-2 rounded-full shrink-0", e.read ? P(p) ? "bg-gray-700" : "bg-gray-300" : S[e.type ?? "info"]]),
|
|
2454
2463
|
"aria-hidden": "true"
|
|
2455
|
-
}, null, 2), c("span",
|
|
2464
|
+
}, null, 2), c("span", Gr, [c("span", Kr, [c("span", { class: v(["text-sm truncate", [e.read ? "font-medium" : "font-semibold", P(m).primaryTextSoft]]) }, N(e.title), 3), e.time ? (T(), s("span", {
|
|
2456
2465
|
key: 0,
|
|
2457
2466
|
class: v(["text-xs shrink-0", P(m).dimText])
|
|
2458
2467
|
}, N(e.time), 3)) : o("", !0)]), e.message ? (T(), s("span", {
|
|
2459
2468
|
key: 0,
|
|
2460
2469
|
class: v(["mt-0.5 block text-sm", P(m).mutedText])
|
|
2461
|
-
}, N(e.message), 3)) : o("", !0)])], 10,
|
|
2462
|
-
], 10,
|
|
2470
|
+
}, N(e.message), 3)) : o("", !0)])], 10, Wr)]))), 128))], 2))])
|
|
2471
|
+
], 10, Vr)) : o("", !0)]),
|
|
2463
2472
|
_: 1
|
|
2464
2473
|
})]));
|
|
2465
2474
|
}
|
|
2466
|
-
}),
|
|
2475
|
+
}), Jr = ["disabled"], Yr = /* @__PURE__ */ p({
|
|
2467
2476
|
__name: "BaseChipButton",
|
|
2468
2477
|
props: {
|
|
2469
2478
|
size: { default: "sm" },
|
|
@@ -2480,9 +2489,9 @@ var Bn = ["aria-label", "aria-expanded"], Vn = { class: "flex flex-col h-full" }
|
|
|
2480
2489
|
disabled: e.disabled,
|
|
2481
2490
|
class: v(["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", P(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"]]),
|
|
2482
2491
|
onClick: i[0] ||= (e) => n("click")
|
|
2483
|
-
}, [A(t.$slots, "default")], 10,
|
|
2492
|
+
}, [A(t.$slots, "default")], 10, Jr));
|
|
2484
2493
|
}
|
|
2485
|
-
}),
|
|
2494
|
+
}), Xr = /* @__PURE__ */ p({
|
|
2486
2495
|
__name: "BaseRemoveButton",
|
|
2487
2496
|
emits: ["click"],
|
|
2488
2497
|
setup(e, { emit: t }) {
|
|
@@ -2493,11 +2502,11 @@ var Bn = ["aria-label", "aria-expanded"], Vn = { class: "flex flex-col h-full" }
|
|
|
2493
2502
|
onClick: t[0] ||= (e) => n("click")
|
|
2494
2503
|
}, " × "));
|
|
2495
2504
|
}
|
|
2496
|
-
}),
|
|
2505
|
+
}), Zr = { class: "relative flex h-2 w-2" }, Qr = {
|
|
2497
2506
|
key: 0,
|
|
2498
2507
|
class: "animate-ping absolute inline-flex h-full w-full rounded-full bg-emerald-400 opacity-75",
|
|
2499
2508
|
"aria-hidden": "true"
|
|
2500
|
-
},
|
|
2509
|
+
}, $r = /* @__PURE__ */ p({
|
|
2501
2510
|
__name: "BaseStatusPill",
|
|
2502
2511
|
props: {
|
|
2503
2512
|
status: {},
|
|
@@ -2517,13 +2526,13 @@ var Bn = ["aria-label", "aria-expanded"], Vn = { class: "flex flex-col h-full" }
|
|
|
2517
2526
|
default: return "bg-gray-400";
|
|
2518
2527
|
}
|
|
2519
2528
|
});
|
|
2520
|
-
return (t, n) => (T(), s("div", { class: v(["flex items-center gap-2 px-3 py-1.5 rounded-lg text-xs", r.value]) }, [c("span",
|
|
2529
|
+
return (t, n) => (T(), s("div", { class: v(["flex items-center gap-2 px-3 py-1.5 rounded-lg text-xs", r.value]) }, [c("span", Zr, [e.status === "ok" ? (T(), s("span", Qr)) : o("", !0), c("span", { class: v(["relative inline-flex rounded-full h-2 w-2", a.value]) }, null, 2)]), d(" " + N(e.label), 1)], 2));
|
|
2521
2530
|
}
|
|
2522
|
-
}),
|
|
2531
|
+
}), ei = { class: "text-sm font-medium" }, ti = [
|
|
2523
2532
|
"accept",
|
|
2524
2533
|
"multiple",
|
|
2525
2534
|
"disabled"
|
|
2526
|
-
],
|
|
2535
|
+
], ni = /* @__PURE__ */ p({
|
|
2527
2536
|
__name: "BaseFileDropzone",
|
|
2528
2537
|
props: {
|
|
2529
2538
|
label: {},
|
|
@@ -2571,7 +2580,7 @@ var Bn = ["aria-label", "aria-expanded"], Vn = { class: "flex flex-col h-full" }
|
|
|
2571
2580
|
"stroke-linejoin": "round",
|
|
2572
2581
|
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"
|
|
2573
2582
|
})], -1)]),
|
|
2574
|
-
c("p",
|
|
2583
|
+
c("p", ei, N(e.label), 1),
|
|
2575
2584
|
e.hint ? (T(), s("p", {
|
|
2576
2585
|
key: 0,
|
|
2577
2586
|
class: v(["text-xs", P(i) ? "text-gray-500" : "text-gray-400"])
|
|
@@ -2583,10 +2592,10 @@ var Bn = ["aria-label", "aria-expanded"], Vn = { class: "flex flex-col h-full" }
|
|
|
2583
2592
|
multiple: e.multiple,
|
|
2584
2593
|
disabled: e.disabled,
|
|
2585
2594
|
onChange: l
|
|
2586
|
-
}, null, 40,
|
|
2595
|
+
}, null, 40, ti)
|
|
2587
2596
|
], 34));
|
|
2588
2597
|
}
|
|
2589
|
-
}),
|
|
2598
|
+
}), ri = /* @__PURE__ */ p({
|
|
2590
2599
|
__name: "BaseCodeBlock",
|
|
2591
2600
|
props: {
|
|
2592
2601
|
code: {},
|
|
@@ -2617,7 +2626,7 @@ var Bn = ["aria-label", "aria-expanded"], Vn = { class: "flex flex-col h-full" }
|
|
|
2617
2626
|
e.maxHeightClass
|
|
2618
2627
|
]]) }, N(e.code), 3));
|
|
2619
2628
|
}
|
|
2620
|
-
}),
|
|
2629
|
+
}), ii = ["value", "type"], ai = /* @__PURE__ */ p({
|
|
2621
2630
|
__name: "BaseInput",
|
|
2622
2631
|
props: {
|
|
2623
2632
|
modelValue: { default: "" },
|
|
@@ -2639,9 +2648,9 @@ var Bn = ["aria-label", "aria-expanded"], Vn = { class: "flex flex-col h-full" }
|
|
|
2639
2648
|
type: e.type,
|
|
2640
2649
|
class: v(["rounded-lg border border-slate-300 dark:border-slate-600 bg-white dark:bg-slate-900 text-slate-900 dark:text-slate-100 text-sm placeholder:text-slate-400 dark:placeholder:text-slate-500 transition-colors hover:border-slate-400 dark:hover:border-slate-500 focus:outline-none focus-visible:ring-2 focus-visible:ring-emerald-500/40 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"]]),
|
|
2641
2650
|
onInput: r
|
|
2642
|
-
}, null, 42,
|
|
2651
|
+
}, null, 42, ii));
|
|
2643
2652
|
}
|
|
2644
|
-
}),
|
|
2653
|
+
}), oi = ["value"], si = /* @__PURE__ */ p({
|
|
2645
2654
|
inheritAttrs: !1,
|
|
2646
2655
|
__name: "BaseSelect",
|
|
2647
2656
|
props: {
|
|
@@ -2660,18 +2669,18 @@ var Bn = ["aria-label", "aria-expanded"], Vn = { class: "flex flex-col h-full" }
|
|
|
2660
2669
|
}
|
|
2661
2670
|
return (t, n) => (T(), s("div", { class: v(["relative", e.block ? "w-full" : "inline-block"]) }, [c("select", g(t.$attrs, {
|
|
2662
2671
|
value: e.modelValue,
|
|
2663
|
-
class: ["w-full appearance-none rounded-lg border border-slate-300 dark:border-slate-600 bg-white dark:bg-slate-900 text-slate-900 dark:text-slate-100 text-sm cursor-pointer transition-colors hover:border-slate-400 dark:hover:border-slate-500 focus:outline-none focus-visible:ring-2 focus-visible:ring-emerald-500/40 focus-visible:border-emerald-500 disabled:opacity-60 disabled:cursor-not-allowed", e.size === "md" ? "py-2 pl-3 pr-9" : "py-1.5 pl-2.5 pr-8"],
|
|
2672
|
+
class: ["w-full appearance-none bg-none rounded-lg border border-slate-300 dark:border-slate-600 bg-white dark:bg-slate-900 text-slate-900 dark:text-slate-100 text-sm cursor-pointer transition-colors hover:border-slate-400 dark:hover:border-slate-500 focus:outline-none focus-visible:ring-2 focus-visible:ring-emerald-500/40 focus-visible:border-emerald-500 disabled:opacity-60 disabled:cursor-not-allowed", e.size === "md" ? "py-2 pl-3 pr-9" : "py-1.5 pl-2.5 pr-8"],
|
|
2664
2673
|
onChange: r
|
|
2665
|
-
}), [A(t.$slots, "default")], 16,
|
|
2674
|
+
}), [A(t.$slots, "default")], 16, oi), f(P(me), {
|
|
2666
2675
|
class: v(["pointer-events-none absolute top-1/2 h-4 w-4 -translate-y-1/2 text-slate-500 dark:text-slate-400", e.size === "md" ? "right-3" : "right-2.5"]),
|
|
2667
2676
|
"aria-hidden": "true"
|
|
2668
2677
|
}, null, 8, ["class"])], 2));
|
|
2669
2678
|
}
|
|
2670
|
-
}),
|
|
2679
|
+
}), ci = [
|
|
2671
2680
|
"disabled",
|
|
2672
2681
|
"aria-label",
|
|
2673
2682
|
"aria-expanded"
|
|
2674
|
-
],
|
|
2683
|
+
], li = ["aria-label"], ui = ["aria-selected", "title"], di = ["disabled", "onClick"], fi = /* @__PURE__ */ p({
|
|
2675
2684
|
__name: "BaseDropdown",
|
|
2676
2685
|
props: {
|
|
2677
2686
|
options: {},
|
|
@@ -2728,7 +2737,7 @@ var Bn = ["aria-label", "aria-expanded"], Vn = { class: "flex flex-col h-full" }
|
|
|
2728
2737
|
}, [c("span", { class: v(["min-w-0 truncate", d.value ? "" : "text-slate-400 dark:text-slate-500"]) }, N(d.value ? d.value.label : t.placeholder), 3), f(P(me), {
|
|
2729
2738
|
class: v(["shrink-0 transition-transform", [t.chevronClass, l.value ? "rotate-180" : ""]]),
|
|
2730
2739
|
"aria-hidden": "true"
|
|
2731
|
-
}, null, 8, ["class"])], 10,
|
|
2740
|
+
}, null, 8, ["class"])], 10, ci), l.value ? (T(), s("ul", {
|
|
2732
2741
|
key: 0,
|
|
2733
2742
|
role: "listbox",
|
|
2734
2743
|
"aria-label": t.ariaLabel || t.placeholder,
|
|
@@ -2743,13 +2752,13 @@ var Bn = ["aria-label", "aria-expanded"], Vn = { class: "flex flex-col h-full" }
|
|
|
2743
2752
|
disabled: e.disabled,
|
|
2744
2753
|
class: v(m(e)),
|
|
2745
2754
|
onClick: (t) => g(e)
|
|
2746
|
-
}, N(e.label), 11,
|
|
2755
|
+
}, N(e.label), 11, di)], 8, ui))), 128))], 8, li)) : o("", !0)], 2));
|
|
2747
2756
|
}
|
|
2748
|
-
}),
|
|
2757
|
+
}), pi = ["role", "aria-label"], mi = [
|
|
2749
2758
|
"aria-pressed",
|
|
2750
2759
|
"title",
|
|
2751
2760
|
"onClick"
|
|
2752
|
-
],
|
|
2761
|
+
], hi = "bg-slate-50 dark:bg-slate-900 text-slate-600 dark:text-slate-300 hover:bg-slate-100 dark:hover:bg-slate-800", gi = /* @__PURE__ */ p({
|
|
2753
2762
|
__name: "BaseSegmentedControl",
|
|
2754
2763
|
props: {
|
|
2755
2764
|
options: {},
|
|
@@ -2766,7 +2775,7 @@ var Bn = ["aria-label", "aria-expanded"], Vn = { class: "flex flex-col h-full" }
|
|
|
2766
2775
|
let r = t, a = n, o = i(() => r.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 = i(() => r.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" : `${r.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 = i(() => r.variant === "wide" ? "bg-emerald-600 text-white" : "bg-emerald-500 text-white");
|
|
2767
2776
|
function u(e) {
|
|
2768
2777
|
let t = e.value === r.modelValue;
|
|
2769
|
-
return r.optionClass ? r.optionClass(e, t) : t ? l.value :
|
|
2778
|
+
return r.optionClass ? r.optionClass(e, t) : t ? l.value : hi;
|
|
2770
2779
|
}
|
|
2771
2780
|
return (n, r) => (T(), s("div", {
|
|
2772
2781
|
role: t.ariaLabel ? "group" : void 0,
|
|
@@ -2779,9 +2788,9 @@ var Bn = ["aria-label", "aria-expanded"], Vn = { class: "flex flex-col h-full" }
|
|
|
2779
2788
|
"aria-pressed": e.value === t.modelValue,
|
|
2780
2789
|
title: e.title,
|
|
2781
2790
|
onClick: (t) => a("update:modelValue", e.value)
|
|
2782
|
-
}, N(e.label), 11,
|
|
2791
|
+
}, N(e.label), 11, mi))), 128))], 10, pi));
|
|
2783
2792
|
}
|
|
2784
|
-
}),
|
|
2793
|
+
}), _i = { class: "w-full text-sm" }, vi = { class: "bg-slate-50 dark:bg-slate-800/60 text-slate-600 dark:text-slate-300" }, yi = { class: "text-left border-b border-slate-200 dark:border-slate-700" }, bi = { class: "divide-y divide-slate-200 dark:divide-slate-700 [&>tr]:transition-colors [&>tr:hover]:bg-slate-50 dark:[&>tr:hover]:bg-slate-800/40" }, xi = { key: 0 }, Si = ["colspan"], Ci = "overflow-x-auto rounded-xl border border-slate-200 bg-white shadow-sm dark:border-slate-700 dark:bg-slate-900", wi = /* @__PURE__ */ p({
|
|
2785
2794
|
__name: "BaseTable",
|
|
2786
2795
|
props: {
|
|
2787
2796
|
columns: {},
|
|
@@ -2796,24 +2805,24 @@ var Bn = ["aria-label", "aria-expanded"], Vn = { class: "flex flex-col h-full" }
|
|
|
2796
2805
|
}
|
|
2797
2806
|
},
|
|
2798
2807
|
setup(t) {
|
|
2799
|
-
return (n, r) => (T(), s("div", { class: v(t.card ?
|
|
2808
|
+
return (n, r) => (T(), s("div", { class: v(t.card ? Ci : void 0) }, [c("table", _i, [c("thead", vi, [c("tr", yi, [(T(!0), s(e, null, k(t.columns, (e, t) => (T(), s("th", {
|
|
2800
2809
|
key: t,
|
|
2801
2810
|
class: v(["px-4 py-3", e.align === "right" ? "text-right" : ""])
|
|
2802
|
-
}, N(e.label), 3))), 128))])]), c("tbody",
|
|
2811
|
+
}, N(e.label), 3))), 128))])]), c("tbody", bi, [t.empty ? (T(), s("tr", xi, [c("td", {
|
|
2803
2812
|
colspan: t.columns.length,
|
|
2804
2813
|
class: "px-4 py-12 text-center text-slate-500"
|
|
2805
|
-
}, [A(n.$slots, "empty", {}, () => [d(N(t.emptyText), 1)])], 8,
|
|
2814
|
+
}, [A(n.$slots, "empty", {}, () => [d(N(t.emptyText), 1)])], 8, Si)])) : o("", !0), A(n.$slots, "default")])])], 2));
|
|
2806
2815
|
}
|
|
2807
|
-
}),
|
|
2816
|
+
}), Ti = { class: "grid gap-3 md:grid-cols-2" }, Ei = {
|
|
2808
2817
|
key: 0,
|
|
2809
2818
|
class: "block text-[11px] uppercase tracking-wide text-slate-500 mb-1"
|
|
2810
|
-
},
|
|
2819
|
+
}, Di = ["value"], Oi = {
|
|
2811
2820
|
key: 2,
|
|
2812
2821
|
class: "flex items-center gap-2 mt-4"
|
|
2813
|
-
},
|
|
2822
|
+
}, ki = ["checked", "onChange"], Ai = { class: "text-sm text-slate-900 dark:text-slate-100" }, ji = {
|
|
2814
2823
|
key: 4,
|
|
2815
2824
|
class: "text-[11px] text-slate-400 mt-1"
|
|
2816
|
-
},
|
|
2825
|
+
}, Mi = /* @__PURE__ */ p({
|
|
2817
2826
|
__name: "BaseSpecFields",
|
|
2818
2827
|
props: {
|
|
2819
2828
|
specs: {},
|
|
@@ -2840,9 +2849,9 @@ var Bn = ["aria-label", "aria-expanded"], Vn = { class: "flex flex-col h-full" }
|
|
|
2840
2849
|
let t = e.clipboardData?.getData("text") ?? "";
|
|
2841
2850
|
/^-?\d*$/.test(t.trim()) || e.preventDefault();
|
|
2842
2851
|
}
|
|
2843
|
-
return (n, f) => (T(), s("div",
|
|
2844
|
-
f.type === "boolean" ? o("", !0) : (T(), s("label",
|
|
2845
|
-
f.type === "select" ? (T(), a(
|
|
2852
|
+
return (n, f) => (T(), s("div", Ti, [(T(!0), s(e, null, k(t.specs, (f) => (T(), s("div", { key: f.key }, [
|
|
2853
|
+
f.type === "boolean" ? o("", !0) : (T(), s("label", Ei, N(f.label), 1)),
|
|
2854
|
+
f.type === "select" ? (T(), a(si, {
|
|
2846
2855
|
key: 1,
|
|
2847
2856
|
modelValue: String(t.params[f.key] ?? ""),
|
|
2848
2857
|
"onUpdate:modelValue": (e) => r("update", f.key, e)
|
|
@@ -2850,14 +2859,14 @@ var Bn = ["aria-label", "aria-expanded"], Vn = { class: "flex flex-col h-full" }
|
|
|
2850
2859
|
default: L(() => [(T(!0), s(e, null, k(f.options ?? [], (e) => (T(), s("option", {
|
|
2851
2860
|
key: e,
|
|
2852
2861
|
value: e
|
|
2853
|
-
}, N(e), 9,
|
|
2862
|
+
}, N(e), 9, Di))), 128))]),
|
|
2854
2863
|
_: 2
|
|
2855
|
-
}, 1032, ["modelValue", "onUpdate:modelValue"])) : f.type === "boolean" ? (T(), s("label",
|
|
2864
|
+
}, 1032, ["modelValue", "onUpdate:modelValue"])) : f.type === "boolean" ? (T(), s("label", Oi, [c("input", {
|
|
2856
2865
|
checked: !!t.params[f.key],
|
|
2857
2866
|
type: "checkbox",
|
|
2858
2867
|
class: "h-4 w-4",
|
|
2859
2868
|
onChange: (e) => i(f.key, e)
|
|
2860
|
-
}, null, 40,
|
|
2869
|
+
}, null, 40, ki), c("span", Ai, N(f.label), 1)])) : (T(), a(ai, {
|
|
2861
2870
|
key: 3,
|
|
2862
2871
|
modelValue: t.params[f.key],
|
|
2863
2872
|
type: "number",
|
|
@@ -2876,11 +2885,11 @@ var Bn = ["aria-label", "aria-expanded"], Vn = { class: "flex flex-col h-full" }
|
|
|
2876
2885
|
"onPaste",
|
|
2877
2886
|
"onUpdate:modelValue"
|
|
2878
2887
|
])),
|
|
2879
|
-
f.help ? (T(), s("p",
|
|
2888
|
+
f.help ? (T(), s("p", ji, N(f.help), 1)) : o("", !0),
|
|
2880
2889
|
A(n.$slots, "after", { spec: f })
|
|
2881
2890
|
]))), 128))]));
|
|
2882
2891
|
}
|
|
2883
|
-
}),
|
|
2892
|
+
}), Ni = { class: "mt-1.5 space-y-0.5 px-1" }, Pi = { class: "text-slate-400 dark:text-slate-500" }, Fi = /* @__PURE__ */ p({
|
|
2884
2893
|
__name: "BaseStatBreakdown",
|
|
2885
2894
|
props: {
|
|
2886
2895
|
items: {},
|
|
@@ -2899,16 +2908,16 @@ var Bn = ["aria-label", "aria-expanded"], Vn = { class: "flex flex-col h-full" }
|
|
|
2899
2908
|
function i(e) {
|
|
2900
2909
|
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";
|
|
2901
2910
|
}
|
|
2902
|
-
return (n, a) => (T(), s("div",
|
|
2911
|
+
return (n, a) => (T(), s("div", Ni, [(T(!0), s(e, null, k(t.items, (e) => (T(), s("div", {
|
|
2903
2912
|
key: e.label,
|
|
2904
2913
|
class: "flex items-center justify-between text-[11px]"
|
|
2905
|
-
}, [c("span",
|
|
2914
|
+
}, [c("span", Pi, N(e.label), 1), c("span", { class: v(["font-mono tabular-nums font-medium", i(e.value)]) }, N(r(e.value)), 3)]))), 128))]));
|
|
2906
2915
|
}
|
|
2907
|
-
}),
|
|
2916
|
+
}), Ii = [
|
|
2908
2917
|
"disabled",
|
|
2909
2918
|
"title",
|
|
2910
2919
|
"aria-pressed"
|
|
2911
|
-
],
|
|
2920
|
+
], Li = /* @__PURE__ */ p({
|
|
2912
2921
|
__name: "BaseFilterChip",
|
|
2913
2922
|
props: {
|
|
2914
2923
|
label: { default: "" },
|
|
@@ -2943,15 +2952,15 @@ var Bn = ["aria-label", "aria-expanded"], Vn = { class: "flex flex-col h-full" }
|
|
|
2943
2952
|
title: e.title,
|
|
2944
2953
|
"aria-pressed": e.active,
|
|
2945
2954
|
class: v(["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]])
|
|
2946
|
-
}, [A(r.$slots, "default", {}, () => [d(N(e.label), 1)])], 10,
|
|
2955
|
+
}, [A(r.$slots, "default", {}, () => [d(N(e.label), 1)])], 10, Ii));
|
|
2947
2956
|
}
|
|
2948
|
-
}),
|
|
2957
|
+
}), Ri = { class: "flex items-center justify-between mb-4" }, zi = { class: "text-lg font-semibold text-slate-900 dark:text-slate-100" }, Bi = {
|
|
2949
2958
|
key: 0,
|
|
2950
2959
|
class: "text-xs text-slate-500 dark:text-slate-400"
|
|
2951
|
-
},
|
|
2960
|
+
}, Vi = {
|
|
2952
2961
|
key: 0,
|
|
2953
2962
|
class: "inline-flex items-center gap-2 text-xs text-slate-500"
|
|
2954
|
-
},
|
|
2963
|
+
}, Hi = { class: "grid gap-4 md:grid-cols-2" }, Ui = { class: "md:col-span-2" }, Wi = ["for"], Gi = { class: "md:col-span-2" }, Ki = ["for"], qi = { class: "text-[11px] text-slate-500 mt-1" }, Ji = { class: "md:col-span-2" }, Yi = ["for"], Xi = { class: "md:col-span-2" }, Zi = ["for"], Qi = { class: "md:col-span-2" }, $i = "placeholder:text-slate-400 dark:placeholder:text-slate-500 font-mono", ea = /* @__PURE__ */ p({
|
|
2955
2964
|
__name: "BaseCredentialsForm",
|
|
2956
2965
|
props: {
|
|
2957
2966
|
title: {},
|
|
@@ -3026,69 +3035,69 @@ var Bn = ["aria-label", "aria-expanded"], Vn = { class: "flex flex-col h-full" }
|
|
|
3026
3035
|
}
|
|
3027
3036
|
return S(h), n({ load: h }), (n, r) => (T(), a(Ft, { class: "!p-6" }, {
|
|
3028
3037
|
default: L(() => [
|
|
3029
|
-
c("div",
|
|
3030
|
-
c("div",
|
|
3031
|
-
c("div",
|
|
3038
|
+
c("div", Ri, [c("div", null, [c("h2", zi, N(t.title), 1), t.subtitle ? (T(), s("p", Bi, N(t.subtitle), 1)) : o("", !0)]), u.value ? (T(), s("span", Vi, [f(It, { class: "!h-4 !w-4" }), r[4] ||= d(" Saving… ", -1)])) : o("", !0)]),
|
|
3039
|
+
c("div", Hi, [
|
|
3040
|
+
c("div", Ui, [c("label", {
|
|
3032
3041
|
for: `${t.idPrefix}-key-id`,
|
|
3033
3042
|
class: "block text-xs uppercase tracking-wide text-slate-500 mb-1"
|
|
3034
|
-
}, N(t.keyLabel), 9,
|
|
3043
|
+
}, N(t.keyLabel), 9, Wi), f(ai, {
|
|
3035
3044
|
id: `${t.idPrefix}-key-id`,
|
|
3036
3045
|
modelValue: m.keyId,
|
|
3037
3046
|
"onUpdate:modelValue": r[0] ||= (e) => m.keyId = e,
|
|
3038
3047
|
type: "text",
|
|
3039
3048
|
autocomplete: "off",
|
|
3040
3049
|
placeholder: t.keyPlaceholder,
|
|
3041
|
-
class: v(
|
|
3050
|
+
class: v($i)
|
|
3042
3051
|
}, null, 8, [
|
|
3043
3052
|
"id",
|
|
3044
3053
|
"modelValue",
|
|
3045
3054
|
"placeholder"
|
|
3046
3055
|
])]),
|
|
3047
|
-
c("div",
|
|
3056
|
+
c("div", Gi, [
|
|
3048
3057
|
c("label", {
|
|
3049
3058
|
for: `${t.idPrefix}-secret`,
|
|
3050
3059
|
class: "block text-xs uppercase tracking-wide text-slate-500 mb-1"
|
|
3051
|
-
}, N(t.secretLabel), 9,
|
|
3052
|
-
f(
|
|
3060
|
+
}, N(t.secretLabel), 9, Ki),
|
|
3061
|
+
f(ai, {
|
|
3053
3062
|
id: `${t.idPrefix}-secret`,
|
|
3054
3063
|
modelValue: m.secretKey,
|
|
3055
3064
|
"onUpdate:modelValue": r[1] ||= (e) => m.secretKey = e,
|
|
3056
3065
|
type: "password",
|
|
3057
3066
|
autocomplete: "new-password",
|
|
3058
3067
|
placeholder: p.value ? "•••••••• (unchanged — type to replace)" : t.secretPlaceholder,
|
|
3059
|
-
class: v(
|
|
3068
|
+
class: v($i)
|
|
3060
3069
|
}, null, 8, [
|
|
3061
3070
|
"id",
|
|
3062
3071
|
"modelValue",
|
|
3063
3072
|
"placeholder"
|
|
3064
3073
|
]),
|
|
3065
|
-
c("p",
|
|
3074
|
+
c("p", qi, [p.value ? (T(), s(e, { key: 0 }, [d(N(t.secretSetHint), 1)], 64)) : A(n.$slots, "no-secret-hint", {}, () => [d(N(t.permissionsHint), 1)], void 0, 1)])
|
|
3066
3075
|
]),
|
|
3067
|
-
c("div",
|
|
3076
|
+
c("div", Ji, [
|
|
3068
3077
|
c("label", {
|
|
3069
3078
|
for: `${t.idPrefix}-base-url`,
|
|
3070
3079
|
class: "block text-xs uppercase tracking-wide text-slate-500 mb-1"
|
|
3071
|
-
}, "Base URL (trading)", 8,
|
|
3072
|
-
f(
|
|
3080
|
+
}, "Base URL (trading)", 8, Yi),
|
|
3081
|
+
f(ai, {
|
|
3073
3082
|
id: `${t.idPrefix}-base-url`,
|
|
3074
3083
|
modelValue: m.baseUrl,
|
|
3075
3084
|
"onUpdate:modelValue": r[2] ||= (e) => m.baseUrl = e,
|
|
3076
3085
|
type: "text",
|
|
3077
|
-
class: v(
|
|
3086
|
+
class: v($i)
|
|
3078
3087
|
}, null, 8, ["id", "modelValue"]),
|
|
3079
3088
|
A(n.$slots, "base-url-extra", { form: m })
|
|
3080
3089
|
]),
|
|
3081
|
-
c("div",
|
|
3090
|
+
c("div", Xi, [c("label", {
|
|
3082
3091
|
for: `${t.idPrefix}-data-url`,
|
|
3083
3092
|
class: "block text-xs uppercase tracking-wide text-slate-500 mb-1"
|
|
3084
|
-
}, "Data URL (market data)", 8,
|
|
3093
|
+
}, "Data URL (market data)", 8, Zi), f(ai, {
|
|
3085
3094
|
id: `${t.idPrefix}-data-url`,
|
|
3086
3095
|
modelValue: m.dataUrl,
|
|
3087
3096
|
"onUpdate:modelValue": r[3] ||= (e) => m.dataUrl = e,
|
|
3088
3097
|
type: "text",
|
|
3089
|
-
class: v(
|
|
3098
|
+
class: v($i)
|
|
3090
3099
|
}, null, 8, ["id", "modelValue"])]),
|
|
3091
|
-
c("div",
|
|
3100
|
+
c("div", Qi, [f(Qe, {
|
|
3092
3101
|
color: P(K).GREEN,
|
|
3093
3102
|
description: t.saveLabel,
|
|
3094
3103
|
isDisable: u.value,
|
|
@@ -3106,16 +3115,16 @@ var Bn = ["aria-label", "aria-expanded"], Vn = { class: "flex flex-col h-full" }
|
|
|
3106
3115
|
_: 3
|
|
3107
3116
|
}));
|
|
3108
3117
|
}
|
|
3109
|
-
}),
|
|
3118
|
+
}), ta = {
|
|
3110
3119
|
key: 0,
|
|
3111
3120
|
class: "text-sm text-slate-500 dark:text-slate-400"
|
|
3112
|
-
},
|
|
3121
|
+
}, na = { class: "mb-3 flex flex-wrap items-center gap-2" }, ra = { class: "relative min-w-[200px] flex-1" }, ia = ["placeholder"], aa = {
|
|
3113
3122
|
key: 0,
|
|
3114
3123
|
class: "text-sm text-slate-500 dark:text-slate-400"
|
|
3115
|
-
},
|
|
3124
|
+
}, oa = {
|
|
3116
3125
|
key: 1,
|
|
3117
3126
|
class: "flex flex-wrap gap-2"
|
|
3118
|
-
},
|
|
3127
|
+
}, sa = ["title", "onClick"], ca = "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", la = "\0all", ua = /* @__PURE__ */ p({
|
|
3119
3128
|
__name: "BasePillPickerModal",
|
|
3120
3129
|
props: {
|
|
3121
3130
|
title: {},
|
|
@@ -3137,10 +3146,10 @@ var Bn = ["aria-label", "aria-expanded"], Vn = { class: "flex flex-col h-full" }
|
|
|
3137
3146
|
},
|
|
3138
3147
|
emits: ["pick", "close"],
|
|
3139
3148
|
setup(t, { emit: n }) {
|
|
3140
|
-
let r = t, l = n, u = i(() => r.icon ?? Ce), d = O(""), p = O(
|
|
3141
|
-
value:
|
|
3149
|
+
let r = t, l = n, u = i(() => r.icon ?? Ce), d = O(""), p = O(la), m = i(() => r.groups && r.groups.length > 0 ? [{
|
|
3150
|
+
value: la,
|
|
3142
3151
|
label: r.allLabel
|
|
3143
|
-
}, ...r.groups] : []), h = i(() => r.items.filter((e) => (p.value ===
|
|
3152
|
+
}, ...r.groups] : []), h = i(() => r.items.filter((e) => (p.value === la || e.group === p.value) && e.label.toLowerCase().includes(d.value.trim().toLowerCase())));
|
|
3144
3153
|
return (n, r) => (T(), a(gn, {
|
|
3145
3154
|
title: t.title,
|
|
3146
3155
|
icon: u.value,
|
|
@@ -3149,12 +3158,12 @@ var Bn = ["aria-label", "aria-expanded"], Vn = { class: "flex flex-col h-full" }
|
|
|
3149
3158
|
"max-width-class": t.maxWidthClass,
|
|
3150
3159
|
onCancel: r[4] ||= (e) => l("close")
|
|
3151
3160
|
}, {
|
|
3152
|
-
footer: L(() => [f(
|
|
3161
|
+
footer: L(() => [f(yr, {
|
|
3153
3162
|
variant: "ghost",
|
|
3154
3163
|
label: t.closeText,
|
|
3155
3164
|
onClick: r[3] ||= (e) => l("close")
|
|
3156
3165
|
}, null, 8, ["label"])]),
|
|
3157
|
-
default: L(() => [t.items.length === 0 ? (T(), s("p",
|
|
3166
|
+
default: L(() => [t.items.length === 0 ? (T(), s("p", ta, N(t.emptyMessage), 1)) : (T(), s(e, { key: 1 }, [c("div", na, [c("div", ra, [
|
|
3158
3167
|
f(P(Ce), { class: "pointer-events-none absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-slate-400" }),
|
|
3159
3168
|
R(c("input", {
|
|
3160
3169
|
"onUpdate:modelValue": r[0] ||= (e) => d.value = e,
|
|
@@ -3162,11 +3171,11 @@ var Bn = ["aria-label", "aria-expanded"], Vn = { class: "flex flex-col h-full" }
|
|
|
3162
3171
|
placeholder: t.searchPlaceholder,
|
|
3163
3172
|
autocomplete: "off",
|
|
3164
3173
|
class: v([
|
|
3165
|
-
|
|
3174
|
+
ca,
|
|
3166
3175
|
"w-full pl-9 pr-8 placeholder:text-slate-400 dark:placeholder:text-slate-500",
|
|
3167
3176
|
t.mono ? "font-mono" : ""
|
|
3168
3177
|
])
|
|
3169
|
-
}, null, 10,
|
|
3178
|
+
}, null, 10, ia), [[re, d.value]]),
|
|
3170
3179
|
d.value ? (T(), s("button", {
|
|
3171
3180
|
key: 0,
|
|
3172
3181
|
type: "button",
|
|
@@ -3174,7 +3183,7 @@ var Bn = ["aria-label", "aria-expanded"], Vn = { class: "flex flex-col h-full" }
|
|
|
3174
3183
|
class: "absolute right-2 top-1/2 -translate-y-1/2 text-slate-400 hover:text-slate-600 dark:hover:text-slate-200",
|
|
3175
3184
|
onClick: r[1] ||= (e) => d.value = ""
|
|
3176
3185
|
}, " ✕ ")) : o("", !0)
|
|
3177
|
-
]), m.value.length > 0 ? (T(), a(
|
|
3186
|
+
]), m.value.length > 0 ? (T(), a(gi, {
|
|
3178
3187
|
key: 0,
|
|
3179
3188
|
modelValue: p.value,
|
|
3180
3189
|
"onUpdate:modelValue": r[2] ||= (e) => p.value = e,
|
|
@@ -3184,13 +3193,13 @@ var Bn = ["aria-label", "aria-expanded"], Vn = { class: "flex flex-col h-full" }
|
|
|
3184
3193
|
"modelValue",
|
|
3185
3194
|
"options",
|
|
3186
3195
|
"aria-label"
|
|
3187
|
-
])) : o("", !0)]), h.value.length === 0 ? (T(), s("p",
|
|
3196
|
+
])) : o("", !0)]), h.value.length === 0 ? (T(), s("p", aa, N(t.noMatchMessage), 1)) : (T(), s("div", oa, [(T(!0), s(e, null, k(h.value, (e) => (T(), s("button", {
|
|
3188
3197
|
key: e.id,
|
|
3189
3198
|
type: "button",
|
|
3190
3199
|
title: e.title,
|
|
3191
3200
|
class: v(["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" : ""]),
|
|
3192
3201
|
onClick: (t) => l("pick", e)
|
|
3193
|
-
}, N(e.label), 11,
|
|
3202
|
+
}, N(e.label), 11, sa))), 128))]))], 64))]),
|
|
3194
3203
|
_: 1
|
|
3195
3204
|
}, 8, [
|
|
3196
3205
|
"title",
|
|
@@ -3199,7 +3208,7 @@ var Bn = ["aria-label", "aria-expanded"], Vn = { class: "flex flex-col h-full" }
|
|
|
3199
3208
|
"max-width-class"
|
|
3200
3209
|
]));
|
|
3201
3210
|
}
|
|
3202
|
-
}),
|
|
3211
|
+
}), da = ["aria-label"], fa = ["title"], pa = { class: "text-[10px] tabular-nums text-slate-400 dark:text-slate-500" }, ma = ["title"], ha = /* @__PURE__ */ p({
|
|
3203
3212
|
__name: "BaseBarDistribution",
|
|
3204
3213
|
props: {
|
|
3205
3214
|
bars: {},
|
|
@@ -3220,7 +3229,7 @@ var Bn = ["aria-label", "aria-expanded"], Vn = { class: "flex flex-col h-full" }
|
|
|
3220
3229
|
class: "flex min-w-7 flex-1 flex-col items-center gap-0.5",
|
|
3221
3230
|
title: o(e)
|
|
3222
3231
|
}, [
|
|
3223
|
-
c("span",
|
|
3232
|
+
c("span", pa, N(e.count), 1),
|
|
3224
3233
|
c("div", {
|
|
3225
3234
|
class: v(["w-full max-w-8 rounded-t", t.barClass]),
|
|
3226
3235
|
style: b({ height: `${a(e)}px` })
|
|
@@ -3228,10 +3237,10 @@ var Bn = ["aria-label", "aria-expanded"], Vn = { class: "flex flex-col h-full" }
|
|
|
3228
3237
|
c("span", {
|
|
3229
3238
|
class: "max-w-full truncate font-mono text-[10px] text-slate-500 dark:text-slate-400",
|
|
3230
3239
|
title: e.label
|
|
3231
|
-
}, N(e.label), 9,
|
|
3232
|
-
], 8,
|
|
3240
|
+
}, N(e.label), 9, ma)
|
|
3241
|
+
], 8, fa))), 128))], 8, da));
|
|
3233
3242
|
}
|
|
3234
|
-
}),
|
|
3243
|
+
}), ga = /* @__PURE__ */ p({
|
|
3235
3244
|
__name: "BaseDateTimePicker",
|
|
3236
3245
|
props: {
|
|
3237
3246
|
modelValue: { default: null },
|
|
@@ -3284,28 +3293,28 @@ var Bn = ["aria-label", "aria-expanded"], Vn = { class: "flex flex-col h-full" }
|
|
|
3284
3293
|
"teleport"
|
|
3285
3294
|
]));
|
|
3286
3295
|
}
|
|
3287
|
-
}),
|
|
3296
|
+
}), _a = { class: "flex min-w-0 flex-1 flex-wrap items-center gap-1" }, va = { class: "truncate" }, ya = [
|
|
3288
3297
|
"aria-label",
|
|
3289
3298
|
"disabled",
|
|
3290
3299
|
"onClick"
|
|
3291
|
-
],
|
|
3300
|
+
], ba = [
|
|
3292
3301
|
"disabled",
|
|
3293
3302
|
"readonly",
|
|
3294
3303
|
"aria-label",
|
|
3295
3304
|
"aria-expanded",
|
|
3296
3305
|
"aria-activedescendant",
|
|
3297
3306
|
"placeholder"
|
|
3298
|
-
],
|
|
3307
|
+
], xa = ["aria-multiselectable"], Sa = [
|
|
3299
3308
|
"id",
|
|
3300
3309
|
"aria-selected",
|
|
3301
3310
|
"aria-disabled",
|
|
3302
3311
|
"title",
|
|
3303
3312
|
"onMouseenter",
|
|
3304
3313
|
"onClick"
|
|
3305
|
-
],
|
|
3314
|
+
], Ca = { class: "truncate" }, wa = {
|
|
3306
3315
|
key: 0,
|
|
3307
3316
|
class: "px-3 py-2 text-sm text-slate-500 dark:text-slate-400"
|
|
3308
|
-
},
|
|
3317
|
+
}, Ta = /* @__PURE__ */ p({
|
|
3309
3318
|
__name: "BaseSearchSelect",
|
|
3310
3319
|
props: {
|
|
3311
3320
|
options: {},
|
|
@@ -3414,10 +3423,10 @@ var Bn = ["aria-label", "aria-expanded"], Vn = { class: "flex flex-col h-full" }
|
|
|
3414
3423
|
class: v(["flex min-h-[38px] items-center gap-1.5 rounded-lg border bg-white px-3 py-1.5 text-sm transition-colors dark:bg-slate-900", [p.value ? "border-emerald-500 ring-2 ring-emerald-500/30" : "border-slate-300 hover:border-slate-400 dark:border-slate-600 dark:hover:border-slate-500", t.disabled ? "cursor-not-allowed opacity-60" : "cursor-text"]]),
|
|
3415
3424
|
onMousedown: te
|
|
3416
3425
|
}, [
|
|
3417
|
-
c("div",
|
|
3426
|
+
c("div", _a, [(T(!0), s(e, null, k(b.value, (e) => R((T(), s("span", {
|
|
3418
3427
|
key: String(e.value),
|
|
3419
3428
|
class: "inline-flex max-w-full items-center gap-1 rounded-md bg-emerald-50 py-0.5 pl-2 pr-1 text-xs font-medium text-emerald-700 dark:bg-emerald-500/15 dark:text-emerald-300"
|
|
3420
|
-
}, [c("span",
|
|
3429
|
+
}, [c("span", va, N(e.label), 1), c("button", {
|
|
3421
3430
|
type: "button",
|
|
3422
3431
|
class: "rounded p-0.5 hover:bg-emerald-100 focus:outline-none focus-visible:ring-2 focus-visible:ring-emerald-500 dark:hover:bg-emerald-500/25",
|
|
3423
3432
|
"aria-label": `Remove ${e.label}`,
|
|
@@ -3427,7 +3436,7 @@ var Bn = ["aria-label", "aria-expanded"], Vn = { class: "flex flex-col h-full" }
|
|
|
3427
3436
|
}, [f(P(B), {
|
|
3428
3437
|
class: "h-3 w-3",
|
|
3429
3438
|
"aria-hidden": "true"
|
|
3430
|
-
})], 40,
|
|
3439
|
+
})], 40, ya)])), [[ie, t.multiple]])), 128)), R(c("input", {
|
|
3431
3440
|
ref_key: "inputEl",
|
|
3432
3441
|
ref: d,
|
|
3433
3442
|
"onUpdate:modelValue": r[1] ||= (e) => m.value = e,
|
|
@@ -3446,7 +3455,7 @@ var Bn = ["aria-label", "aria-expanded"], Vn = { class: "flex flex-col h-full" }
|
|
|
3446
3455
|
onFocus: M,
|
|
3447
3456
|
onInput: M,
|
|
3448
3457
|
onKeydown: se
|
|
3449
|
-
}, null, 42,
|
|
3458
|
+
}, null, 42, ba), [[re, m.value]])]),
|
|
3450
3459
|
t.clearable && C.value && !t.disabled ? (T(), s("button", {
|
|
3451
3460
|
key: 0,
|
|
3452
3461
|
type: "button",
|
|
@@ -3479,28 +3488,28 @@ var Bn = ["aria-label", "aria-expanded"], Vn = { class: "flex flex-col h-full" }
|
|
|
3479
3488
|
onMousedown: r[3] ||= z(() => {}, ["prevent"]),
|
|
3480
3489
|
onMouseenter: (e) => h.value = t,
|
|
3481
3490
|
onClick: (t) => ne(e)
|
|
3482
|
-
}, [c("span",
|
|
3491
|
+
}, [c("span", Ca, N(e.label), 1), A(e) ? (T(), a(P(de), {
|
|
3483
3492
|
key: 0,
|
|
3484
3493
|
class: "h-4 w-4 shrink-0",
|
|
3485
3494
|
"aria-hidden": "true"
|
|
3486
|
-
})) : o("", !0)], 42,
|
|
3495
|
+
})) : o("", !0)], 42, Sa))), 128)), D.value.length === 0 ? (T(), s("li", wa, N(t.options.length === 0 ? t.emptyText : t.noResultsText), 1)) : o("", !0)], 8, xa)) : o("", !0)], 2));
|
|
3487
3496
|
}
|
|
3488
|
-
}),
|
|
3497
|
+
}), Ea = { class: "rounded-xl border border-slate-200 bg-white text-left shadow-sm dark:border-slate-700 dark:bg-slate-900" }, Da = {
|
|
3489
3498
|
key: 0,
|
|
3490
3499
|
class: "flex flex-wrap items-center justify-between gap-3 border-b border-slate-200 px-5 py-3 dark:border-slate-700"
|
|
3491
|
-
},
|
|
3500
|
+
}, Oa = { class: "min-w-0" }, ka = {
|
|
3492
3501
|
key: 0,
|
|
3493
3502
|
class: "text-base font-semibold text-slate-900 dark:text-slate-100"
|
|
3494
|
-
},
|
|
3503
|
+
}, Aa = {
|
|
3495
3504
|
key: 1,
|
|
3496
3505
|
class: "text-sm text-slate-500 dark:text-slate-400"
|
|
3497
|
-
},
|
|
3506
|
+
}, ja = {
|
|
3498
3507
|
key: 0,
|
|
3499
3508
|
class: "flex items-center gap-2"
|
|
3500
|
-
},
|
|
3509
|
+
}, Ma = {
|
|
3501
3510
|
key: 1,
|
|
3502
3511
|
class: "flex flex-wrap items-center justify-end gap-2 border-t border-slate-200 px-5 py-3 dark:border-slate-700"
|
|
3503
|
-
},
|
|
3512
|
+
}, Na = /* @__PURE__ */ p({
|
|
3504
3513
|
__name: "BaseCard",
|
|
3505
3514
|
props: {
|
|
3506
3515
|
title: { default: "" },
|
|
@@ -3508,24 +3517,24 @@ var Bn = ["aria-label", "aria-expanded"], Vn = { class: "flex flex-col h-full" }
|
|
|
3508
3517
|
padding: { default: "md" }
|
|
3509
3518
|
},
|
|
3510
3519
|
setup(e) {
|
|
3511
|
-
return (t, n) => (T(), s("section",
|
|
3512
|
-
e.title || e.subtitle || t.$slots.actions ? (T(), s("header",
|
|
3520
|
+
return (t, n) => (T(), s("section", Ea, [
|
|
3521
|
+
e.title || e.subtitle || t.$slots.actions ? (T(), s("header", Da, [c("div", Oa, [e.title ? (T(), s("h2", ka, N(e.title), 1)) : o("", !0), e.subtitle ? (T(), s("p", Aa, N(e.subtitle), 1)) : o("", !0)]), t.$slots.actions ? (T(), s("div", ja, [A(t.$slots, "actions")])) : o("", !0)])) : o("", !0),
|
|
3513
3522
|
c("div", { class: v(e.padding === "sm" ? "p-4" : e.padding === "none" ? "" : "p-5") }, [A(t.$slots, "default")], 2),
|
|
3514
|
-
t.$slots.footer ? (T(), s("footer",
|
|
3523
|
+
t.$slots.footer ? (T(), s("footer", Ma, [A(t.$slots, "footer")])) : o("", !0)
|
|
3515
3524
|
]));
|
|
3516
3525
|
}
|
|
3517
|
-
}),
|
|
3526
|
+
}), Pa = ["for"], Fa = {
|
|
3518
3527
|
key: 0,
|
|
3519
3528
|
class: "ml-0.5 text-red-500",
|
|
3520
3529
|
"aria-hidden": "true"
|
|
3521
|
-
},
|
|
3530
|
+
}, Ia = {
|
|
3522
3531
|
key: 1,
|
|
3523
3532
|
class: "mt-1 text-xs font-medium text-red-600 dark:text-red-400",
|
|
3524
3533
|
role: "alert"
|
|
3525
|
-
},
|
|
3534
|
+
}, La = {
|
|
3526
3535
|
key: 2,
|
|
3527
3536
|
class: "mt-1 text-xs text-slate-500 dark:text-slate-400"
|
|
3528
|
-
},
|
|
3537
|
+
}, Ra = /* @__PURE__ */ p({
|
|
3529
3538
|
__name: "BaseField",
|
|
3530
3539
|
props: {
|
|
3531
3540
|
label: { default: "" },
|
|
@@ -3551,12 +3560,12 @@ var Bn = ["aria-label", "aria-expanded"], Vn = { class: "flex flex-col h-full" }
|
|
|
3551
3560
|
key: 0,
|
|
3552
3561
|
for: e.labelFor || void 0,
|
|
3553
3562
|
class: v(["mb-1 block", e.compact ? "text-xs uppercase tracking-wide text-slate-500 dark:text-slate-400" : "text-sm font-medium text-slate-700 dark:text-slate-200"])
|
|
3554
|
-
}, [d(N(e.label), 1), e.required ? (T(), s("span",
|
|
3563
|
+
}, [d(N(e.label), 1), e.required ? (T(), s("span", Fa, "*")) : o("", !0)], 10, Pa)) : o("", !0),
|
|
3555
3564
|
A(t.$slots, "default"),
|
|
3556
|
-
e.error ? (T(), s("p",
|
|
3565
|
+
e.error ? (T(), s("p", Ia, N(e.error), 1)) : e.hint ? (T(), s("p", La, N(e.hint), 1)) : o("", !0)
|
|
3557
3566
|
], 2));
|
|
3558
3567
|
}
|
|
3559
|
-
}),
|
|
3568
|
+
}), za = { class: "flex items-start justify-between gap-3" }, Ba = { class: "min-w-0 text-left" }, Va = { class: "truncate text-sm font-bold tracking-wide text-gray-800 dark:text-slate-200" }, Ha = /* @__PURE__ */ p({
|
|
3560
3569
|
__name: "BaseStatCard",
|
|
3561
3570
|
props: {
|
|
3562
3571
|
title: {},
|
|
@@ -3604,8 +3613,8 @@ var Bn = ["aria-label", "aria-expanded"], Vn = { class: "flex flex-col h-full" }
|
|
|
3604
3613
|
}
|
|
3605
3614
|
}, r = i(() => n[t.accent]);
|
|
3606
3615
|
return (t, n) => (T(), a(M(e.to ? P(Oe) : "div"), g(e.to ? { to: e.to } : {}, { class: ["relative block rounded-xl border-2 border-dashed bg-white p-5 transition-colors dark:bg-slate-800", [r.value.border, e.to ? "hover:bg-slate-50 dark:hover:bg-slate-700/60 focus:outline-none focus-visible:ring-2 focus-visible:ring-emerald-500" : ""]] }), {
|
|
3607
|
-
default: L(() => [c("div",
|
|
3608
|
-
c("p",
|
|
3616
|
+
default: L(() => [c("div", za, [c("div", Ba, [
|
|
3617
|
+
c("p", Va, N(e.title), 1),
|
|
3609
3618
|
c("p", { class: v(["mt-1 truncate text-3xl font-bold", r.value.value]) }, N(e.value), 3),
|
|
3610
3619
|
e.subtitle ? (T(), s("p", {
|
|
3611
3620
|
key: 0,
|
|
@@ -3619,10 +3628,165 @@ var Bn = ["aria-label", "aria-expanded"], Vn = { class: "flex flex-col h-full" }
|
|
|
3619
3628
|
_: 3
|
|
3620
3629
|
}, 16, ["class"]));
|
|
3621
3630
|
}
|
|
3631
|
+
}), Ua = [
|
|
3632
|
+
"aria-checked",
|
|
3633
|
+
"aria-label",
|
|
3634
|
+
"disabled"
|
|
3635
|
+
], Wa = {
|
|
3636
|
+
key: 0,
|
|
3637
|
+
class: "text-sm font-medium text-slate-700 dark:text-slate-200"
|
|
3638
|
+
}, Ga = /* @__PURE__ */ p({
|
|
3639
|
+
__name: "BaseToggle",
|
|
3640
|
+
props: {
|
|
3641
|
+
modelValue: {
|
|
3642
|
+
type: Boolean,
|
|
3643
|
+
default: !1
|
|
3644
|
+
},
|
|
3645
|
+
label: { default: "" },
|
|
3646
|
+
ariaLabel: { default: "" },
|
|
3647
|
+
color: { default: "emerald" },
|
|
3648
|
+
offTone: { default: "slate" },
|
|
3649
|
+
disabled: {
|
|
3650
|
+
type: Boolean,
|
|
3651
|
+
default: !1
|
|
3652
|
+
}
|
|
3653
|
+
},
|
|
3654
|
+
emits: ["update:modelValue", "change"],
|
|
3655
|
+
setup(e, { emit: t }) {
|
|
3656
|
+
let n = e, r = t, i = {
|
|
3657
|
+
emerald: "bg-emerald-500",
|
|
3658
|
+
red: "bg-red-600",
|
|
3659
|
+
sky: "bg-sky-500",
|
|
3660
|
+
amber: "bg-amber-500"
|
|
3661
|
+
};
|
|
3662
|
+
function a() {
|
|
3663
|
+
if (n.disabled) return;
|
|
3664
|
+
let e = !n.modelValue;
|
|
3665
|
+
r("update:modelValue", e), r("change", e);
|
|
3666
|
+
}
|
|
3667
|
+
return (t, n) => (T(), s("label", { class: v(["inline-flex items-center gap-3 select-none", e.disabled ? "cursor-not-allowed opacity-60" : "cursor-pointer"]) }, [c("button", {
|
|
3668
|
+
type: "button",
|
|
3669
|
+
role: "switch",
|
|
3670
|
+
"aria-checked": e.modelValue,
|
|
3671
|
+
"aria-label": e.label ? void 0 : e.ariaLabel || void 0,
|
|
3672
|
+
disabled: e.disabled,
|
|
3673
|
+
class: v(["relative inline-flex h-6 w-11 shrink-0 items-center rounded-full transition-colors focus:outline-none focus-visible:ring-2 focus-visible:ring-emerald-500 focus-visible:ring-offset-2 dark:focus-visible:ring-offset-slate-900 disabled:cursor-not-allowed", e.modelValue ? i[e.color] : e.offTone === "red" ? "bg-red-200 dark:bg-red-900/50" : "bg-slate-200 dark:bg-slate-700"]),
|
|
3674
|
+
onClick: a
|
|
3675
|
+
}, [c("span", {
|
|
3676
|
+
class: v(["inline-block h-5 w-5 rounded-full bg-white shadow ring-1 ring-black/5 transition-transform", e.modelValue ? "translate-x-[22px]" : "translate-x-0.5"]),
|
|
3677
|
+
"aria-hidden": "true"
|
|
3678
|
+
}, null, 2)], 10, Ua), e.label ? (T(), s("span", Wa, N(e.label), 1)) : o("", !0)], 2));
|
|
3679
|
+
}
|
|
3680
|
+
}), Ka = { class: "flex min-h-screen w-full flex-col items-center justify-center bg-slate-50 px-4 py-10 dark:bg-slate-950" }, qa = { class: "mb-6 flex justify-center" }, Ja = {
|
|
3681
|
+
key: 0,
|
|
3682
|
+
class: "mb-1 text-2xl font-bold tracking-tight text-slate-900 dark:text-slate-100"
|
|
3683
|
+
}, Ya = {
|
|
3684
|
+
key: 1,
|
|
3685
|
+
class: "text-sm text-slate-500 dark:text-slate-400"
|
|
3686
|
+
}, Xa = {
|
|
3687
|
+
key: 2,
|
|
3688
|
+
class: "mt-6 border-t border-slate-200 pt-4 text-center text-sm text-slate-500 dark:border-slate-700 dark:text-slate-400"
|
|
3689
|
+
}, Za = /* @__PURE__ */ p({
|
|
3690
|
+
__name: "BaseAuthLayout",
|
|
3691
|
+
props: {
|
|
3692
|
+
title: { default: "" },
|
|
3693
|
+
subtitle: { default: "" },
|
|
3694
|
+
wide: {
|
|
3695
|
+
type: Boolean,
|
|
3696
|
+
default: !1
|
|
3697
|
+
}
|
|
3698
|
+
},
|
|
3699
|
+
setup(e) {
|
|
3700
|
+
return (t, n) => (T(), s("div", Ka, [c("div", qa, [A(t.$slots, "logo", {}, () => [f(Dt, { size: P(J).MEDIUM }, null, 8, ["size"])])]), c("div", { class: v(["w-full rounded-xl border border-slate-200 bg-white p-6 text-left shadow-sm sm:p-8 dark:border-slate-700 dark:bg-slate-900", e.wide ? "max-w-3xl" : "max-w-md"]) }, [
|
|
3701
|
+
e.title ? (T(), s("h1", Ja, N(e.title), 1)) : o("", !0),
|
|
3702
|
+
e.subtitle ? (T(), s("p", Ya, N(e.subtitle), 1)) : o("", !0),
|
|
3703
|
+
c("div", { class: v(e.title || e.subtitle ? "mt-6" : "") }, [A(t.$slots, "default")], 2),
|
|
3704
|
+
t.$slots.footer ? (T(), s("div", Xa, [A(t.$slots, "footer")])) : o("", !0)
|
|
3705
|
+
], 2)]));
|
|
3706
|
+
}
|
|
3707
|
+
});
|
|
3708
|
+
//#endregion
|
|
3709
|
+
//#region node_modules/@heroicons/vue/20/solid/esm/CheckCircleIcon.js
|
|
3710
|
+
function Qa(e, t) {
|
|
3711
|
+
return T(), s("svg", {
|
|
3712
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
3713
|
+
viewBox: "0 0 20 20",
|
|
3714
|
+
fill: "currentColor",
|
|
3715
|
+
"aria-hidden": "true",
|
|
3716
|
+
"data-slot": "icon"
|
|
3717
|
+
}, [c("path", {
|
|
3718
|
+
"fill-rule": "evenodd",
|
|
3719
|
+
d: "M10 18a8 8 0 1 0 0-16 8 8 0 0 0 0 16Zm3.857-9.809a.75.75 0 0 0-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 1 0-1.06 1.061l2.5 2.5a.75.75 0 0 0 1.137-.089l4-5.5Z",
|
|
3720
|
+
"clip-rule": "evenodd"
|
|
3721
|
+
})]);
|
|
3722
|
+
}
|
|
3723
|
+
//#endregion
|
|
3724
|
+
//#region node_modules/@heroicons/vue/20/solid/esm/XCircleIcon.js
|
|
3725
|
+
function $a(e, t) {
|
|
3726
|
+
return T(), s("svg", {
|
|
3727
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
3728
|
+
viewBox: "0 0 20 20",
|
|
3729
|
+
fill: "currentColor",
|
|
3730
|
+
"aria-hidden": "true",
|
|
3731
|
+
"data-slot": "icon"
|
|
3732
|
+
}, [c("path", {
|
|
3733
|
+
"fill-rule": "evenodd",
|
|
3734
|
+
d: "M10 18a8 8 0 1 0 0-16 8 8 0 0 0 0 16ZM8.28 7.22a.75.75 0 0 0-1.06 1.06L8.94 10l-1.72 1.72a.75.75 0 1 0 1.06 1.06L10 11.06l1.72 1.72a.75.75 0 1 0 1.06-1.06L11.06 10l1.72-1.72a.75.75 0 0 0-1.06-1.06L10 8.94 8.28 7.22Z",
|
|
3735
|
+
"clip-rule": "evenodd"
|
|
3736
|
+
})]);
|
|
3737
|
+
}
|
|
3738
|
+
//#endregion
|
|
3739
|
+
//#region src/components/BaseBooleanBadge.vue
|
|
3740
|
+
var eo = /* @__PURE__ */ p({
|
|
3741
|
+
__name: "BaseBooleanBadge",
|
|
3742
|
+
props: {
|
|
3743
|
+
value: {
|
|
3744
|
+
type: [Boolean, null],
|
|
3745
|
+
default: !1
|
|
3746
|
+
},
|
|
3747
|
+
trueLabel: { default: "Yes" },
|
|
3748
|
+
falseLabel: { default: "No" }
|
|
3749
|
+
},
|
|
3750
|
+
setup(e) {
|
|
3751
|
+
return (t, n) => (T(), s("span", { class: v(["inline-flex items-center gap-1 rounded-full px-2.5 py-0.5 text-xs font-medium ring-1 ring-inset", e.value ? "bg-emerald-50 text-emerald-700 ring-emerald-600/20 dark:bg-emerald-500/10 dark:text-emerald-300 dark:ring-emerald-400/30" : "bg-slate-100 text-slate-600 ring-slate-500/20 dark:bg-slate-700/50 dark:text-slate-300 dark:ring-slate-400/20"]) }, [e.value ? (T(), a(P(Qa), {
|
|
3752
|
+
key: 0,
|
|
3753
|
+
class: "h-3.5 w-3.5",
|
|
3754
|
+
"aria-hidden": "true"
|
|
3755
|
+
})) : (T(), a(P($a), {
|
|
3756
|
+
key: 1,
|
|
3757
|
+
class: "h-3.5 w-3.5",
|
|
3758
|
+
"aria-hidden": "true"
|
|
3759
|
+
})), d(" " + N(e.value ? e.trueLabel : e.falseLabel), 1)], 2));
|
|
3760
|
+
}
|
|
3761
|
+
}), to = { class: "text-xs uppercase tracking-wide text-slate-500 dark:text-slate-400" }, no = ["href"], ro = {
|
|
3762
|
+
key: 1,
|
|
3763
|
+
class: "text-slate-400 dark:text-slate-500"
|
|
3764
|
+
}, io = /* @__PURE__ */ p({
|
|
3765
|
+
__name: "BaseDetailList",
|
|
3766
|
+
props: {
|
|
3767
|
+
items: {},
|
|
3768
|
+
columns: { default: 2 },
|
|
3769
|
+
emptyText: { default: "—" }
|
|
3770
|
+
},
|
|
3771
|
+
setup(t) {
|
|
3772
|
+
function n(e) {
|
|
3773
|
+
return e == null || e === "";
|
|
3774
|
+
}
|
|
3775
|
+
return (r, i) => (T(), s("dl", { class: v(["grid grid-cols-1 gap-x-6 gap-y-4 text-left", t.columns === 2 ? "sm:grid-cols-2" : t.columns === 3 ? "sm:grid-cols-2 lg:grid-cols-3" : ""]) }, [(T(!0), s(e, null, k(t.items, (r) => (T(), s("div", {
|
|
3776
|
+
key: r.label,
|
|
3777
|
+
class: "min-w-0"
|
|
3778
|
+
}, [c("dt", to, N(r.label), 1), c("dd", { class: v(["mt-1 break-words text-sm text-slate-900 dark:text-slate-100", r.mono ? "font-mono" : ""]) }, [r.href && !n(r.value) ? (T(), s("a", {
|
|
3779
|
+
key: 0,
|
|
3780
|
+
href: r.href,
|
|
3781
|
+
target: "_blank",
|
|
3782
|
+
rel: "noopener noreferrer",
|
|
3783
|
+
class: "text-emerald-600 hover:underline dark:text-emerald-400"
|
|
3784
|
+
}, N(r.value), 9, no)) : n(r.value) ? (T(), s("span", ro, N(t.emptyText), 1)) : (T(), s(e, { key: 2 }, [d(N(r.value), 1)], 64))], 2)]))), 128))], 2));
|
|
3785
|
+
}
|
|
3622
3786
|
});
|
|
3623
3787
|
//#endregion
|
|
3624
3788
|
//#region src/composables/useDebounce.ts
|
|
3625
|
-
function
|
|
3789
|
+
function ao(e, t = 300) {
|
|
3626
3790
|
let n = O(e.value), r = null;
|
|
3627
3791
|
return I(e, (e) => {
|
|
3628
3792
|
r && clearTimeout(r), r = setTimeout(() => {
|
|
@@ -3634,7 +3798,7 @@ function Ha(e, t = 300) {
|
|
|
3634
3798
|
}
|
|
3635
3799
|
//#endregion
|
|
3636
3800
|
//#region src/composables/useToast.ts
|
|
3637
|
-
function
|
|
3801
|
+
function oo(e = 3e3) {
|
|
3638
3802
|
let t = O(!1), n = O(""), r = O(Y.SUCCESS), i = null;
|
|
3639
3803
|
function a() {
|
|
3640
3804
|
i &&= (clearTimeout(i), null);
|
|
@@ -3655,7 +3819,7 @@ function Ua(e = 3e3) {
|
|
|
3655
3819
|
}
|
|
3656
3820
|
//#endregion
|
|
3657
3821
|
//#region src/composables/useQueryParamSync.ts
|
|
3658
|
-
function
|
|
3822
|
+
function so() {
|
|
3659
3823
|
let e = ke(), t = Ae();
|
|
3660
3824
|
function n(t) {
|
|
3661
3825
|
let n = e.query[t];
|
|
@@ -3677,7 +3841,7 @@ function Wa() {
|
|
|
3677
3841
|
}
|
|
3678
3842
|
//#endregion
|
|
3679
3843
|
//#region src/composables/useFieldClasses.ts
|
|
3680
|
-
function
|
|
3844
|
+
function co() {
|
|
3681
3845
|
let { isDark: e } = W(), t = i(() => e.value ? "text-gray-300" : "text-gray-600"), n = i(() => 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");
|
|
3682
3846
|
function r(t) {
|
|
3683
3847
|
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;
|
|
@@ -3690,7 +3854,7 @@ function Ga() {
|
|
|
3690
3854
|
}
|
|
3691
3855
|
//#endregion
|
|
3692
3856
|
//#region src/composables/usePolling.ts
|
|
3693
|
-
function
|
|
3857
|
+
function lo(e, t, n = {}) {
|
|
3694
3858
|
let { immediate: r = !0, pauseWhenHidden: i = !0 } = n, a = null, o = O(!1), s = !1;
|
|
3695
3859
|
function c() {
|
|
3696
3860
|
a === null && t !== null && (a = setInterval(() => void e(), t));
|
|
@@ -3725,12 +3889,12 @@ function Ka(e, t, n = {}) {
|
|
|
3725
3889
|
}
|
|
3726
3890
|
//#endregion
|
|
3727
3891
|
//#region src/enums/BaseBadgeEnum.ts
|
|
3728
|
-
var
|
|
3892
|
+
var uo = /* @__PURE__ */ function(e) {
|
|
3729
3893
|
return e.WIN = "WIN", e.LOSE = "LOSE", e;
|
|
3730
3894
|
}({});
|
|
3731
3895
|
//#endregion
|
|
3732
3896
|
//#region src/utils/util.ts
|
|
3733
|
-
function
|
|
3897
|
+
function fo(e) {
|
|
3734
3898
|
let t = "red";
|
|
3735
3899
|
switch (e) {
|
|
3736
3900
|
case V.ERROR:
|
|
@@ -3746,7 +3910,7 @@ function Ja(e) {
|
|
|
3746
3910
|
}
|
|
3747
3911
|
return t;
|
|
3748
3912
|
}
|
|
3749
|
-
function
|
|
3913
|
+
function po(e) {
|
|
3750
3914
|
let t = "red";
|
|
3751
3915
|
switch (e) {
|
|
3752
3916
|
case G.GREEN:
|
|
@@ -3773,14 +3937,14 @@ function Ya(e) {
|
|
|
3773
3937
|
}
|
|
3774
3938
|
//#endregion
|
|
3775
3939
|
//#region src/utils/httpColors.ts
|
|
3776
|
-
var
|
|
3940
|
+
var mo = {
|
|
3777
3941
|
GET: "bg-blue-600",
|
|
3778
3942
|
POST: "bg-emerald-600",
|
|
3779
3943
|
PUT: "bg-amber-600",
|
|
3780
3944
|
DELETE: "bg-red-600",
|
|
3781
3945
|
PATCH: "bg-purple-600",
|
|
3782
3946
|
HEAD: "bg-gray-600"
|
|
3783
|
-
},
|
|
3947
|
+
}, ho = {
|
|
3784
3948
|
GET: "bg-blue-500",
|
|
3785
3949
|
POST: "bg-green-500",
|
|
3786
3950
|
PUT: "bg-yellow-500",
|
|
@@ -3788,39 +3952,39 @@ var Xa = {
|
|
|
3788
3952
|
PATCH: "bg-purple-500",
|
|
3789
3953
|
HEAD: "bg-gray-500"
|
|
3790
3954
|
};
|
|
3791
|
-
function
|
|
3792
|
-
return e ?
|
|
3955
|
+
function go(e) {
|
|
3956
|
+
return e ? mo[e.toUpperCase()] ?? "bg-gray-600" : "bg-gray-600";
|
|
3793
3957
|
}
|
|
3794
|
-
function
|
|
3795
|
-
return e ?
|
|
3958
|
+
function _o(e) {
|
|
3959
|
+
return e ? ho[e.toUpperCase()] ?? "bg-gray-500" : "bg-gray-500";
|
|
3796
3960
|
}
|
|
3797
|
-
function
|
|
3961
|
+
function vo(e) {
|
|
3798
3962
|
let t = e ?? 0;
|
|
3799
3963
|
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";
|
|
3800
3964
|
}
|
|
3801
|
-
function
|
|
3965
|
+
function yo(e, t) {
|
|
3802
3966
|
let n = (e || "ANY").toUpperCase();
|
|
3803
3967
|
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";
|
|
3804
3968
|
}
|
|
3805
|
-
function
|
|
3969
|
+
function bo(e, t) {
|
|
3806
3970
|
let n = e ?? 200;
|
|
3807
3971
|
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";
|
|
3808
3972
|
}
|
|
3809
|
-
function
|
|
3973
|
+
function xo(e, t) {
|
|
3810
3974
|
let n = e ?? 200;
|
|
3811
3975
|
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";
|
|
3812
3976
|
}
|
|
3813
3977
|
//#endregion
|
|
3814
3978
|
//#region src/utils/kvRows.ts
|
|
3815
|
-
function
|
|
3979
|
+
function So(e) {
|
|
3816
3980
|
return !(e.key ?? "").trim() || e.matcherType === "absent" ? !1 : !(e.value ?? "").trim();
|
|
3817
3981
|
}
|
|
3818
|
-
function
|
|
3982
|
+
function Co(e) {
|
|
3819
3983
|
return e.matcherType === "absent" || !(e.value ?? "").trim() ? !1 : !(e.key ?? "").trim();
|
|
3820
3984
|
}
|
|
3821
3985
|
//#endregion
|
|
3822
3986
|
//#region src/utils/sanitizeHtml.ts
|
|
3823
|
-
var
|
|
3987
|
+
var wo = /* @__PURE__ */ new Set([
|
|
3824
3988
|
"A",
|
|
3825
3989
|
"B",
|
|
3826
3990
|
"STRONG",
|
|
@@ -3835,7 +3999,7 @@ var oo = /* @__PURE__ */ new Set([
|
|
|
3835
3999
|
"LI",
|
|
3836
4000
|
"SPAN",
|
|
3837
4001
|
"DIV"
|
|
3838
|
-
]),
|
|
4002
|
+
]), To = /* @__PURE__ */ new Set([
|
|
3839
4003
|
"SCRIPT",
|
|
3840
4004
|
"STYLE",
|
|
3841
4005
|
"IFRAME",
|
|
@@ -3843,53 +4007,53 @@ var oo = /* @__PURE__ */ new Set([
|
|
|
3843
4007
|
"EMBED",
|
|
3844
4008
|
"NOSCRIPT",
|
|
3845
4009
|
"TEMPLATE"
|
|
3846
|
-
]),
|
|
3847
|
-
function
|
|
4010
|
+
]), Eo = { A: /* @__PURE__ */ new Set(["href", "title"]) };
|
|
4011
|
+
function Do(e) {
|
|
3848
4012
|
let t = e.trim().toLowerCase();
|
|
3849
4013
|
return t.startsWith("http://") || t.startsWith("https://") || t.startsWith("mailto:") || t.startsWith("tel:") || t.startsWith("/") || t.startsWith("#") || t === "";
|
|
3850
4014
|
}
|
|
3851
|
-
function
|
|
4015
|
+
function Oo(e) {
|
|
3852
4016
|
if (e.nodeType !== Node.ELEMENT_NODE) return;
|
|
3853
4017
|
let t = e, n = t.tagName.toUpperCase();
|
|
3854
|
-
if (!
|
|
3855
|
-
|
|
4018
|
+
if (!wo.has(n)) {
|
|
4019
|
+
To.has(n) ? t.remove() : t.replaceWith(document.createTextNode(t.textContent ?? ""));
|
|
3856
4020
|
return;
|
|
3857
4021
|
}
|
|
3858
|
-
let r =
|
|
4022
|
+
let r = Eo[n] ?? /* @__PURE__ */ new Set();
|
|
3859
4023
|
for (let e of Array.from(t.attributes)) {
|
|
3860
4024
|
if (!r.has(e.name.toLowerCase())) {
|
|
3861
4025
|
t.removeAttribute(e.name);
|
|
3862
4026
|
continue;
|
|
3863
4027
|
}
|
|
3864
|
-
n === "A" && e.name.toLowerCase() === "href" && !
|
|
4028
|
+
n === "A" && e.name.toLowerCase() === "href" && !Do(e.value) && t.removeAttribute(e.name);
|
|
3865
4029
|
}
|
|
3866
4030
|
n === "A" && t.hasAttribute("href") && (t.setAttribute("rel", "noopener noreferrer"), t.setAttribute("target", "_blank"));
|
|
3867
|
-
for (let e of Array.from(t.childNodes))
|
|
4031
|
+
for (let e of Array.from(t.childNodes)) Oo(e);
|
|
3868
4032
|
}
|
|
3869
|
-
function
|
|
4033
|
+
function ko(e) {
|
|
3870
4034
|
if (!e) return "";
|
|
3871
4035
|
let t = new DOMParser().parseFromString(`<div>${e}</div>`, "text/html").body.firstElementChild;
|
|
3872
4036
|
if (!t) return "";
|
|
3873
|
-
for (let e of Array.from(t.childNodes))
|
|
4037
|
+
for (let e of Array.from(t.childNodes)) Oo(e);
|
|
3874
4038
|
return t.innerHTML;
|
|
3875
4039
|
}
|
|
3876
4040
|
//#endregion
|
|
3877
4041
|
//#region src/utils/format.ts
|
|
3878
|
-
var
|
|
3879
|
-
function
|
|
3880
|
-
if (e == null || typeof e == "string" && e.trim() === "") return
|
|
4042
|
+
var Ao = "—";
|
|
4043
|
+
function jo(e, t = 4) {
|
|
4044
|
+
if (e == null || typeof e == "string" && e.trim() === "") return Ao;
|
|
3881
4045
|
let n = typeof e == "string" ? Number(e) : e;
|
|
3882
4046
|
return isFinite(n) ? n.toLocaleString(void 0, {
|
|
3883
4047
|
minimumFractionDigits: t,
|
|
3884
4048
|
maximumFractionDigits: t
|
|
3885
|
-
}) :
|
|
4049
|
+
}) : Ao;
|
|
3886
4050
|
}
|
|
3887
|
-
function
|
|
3888
|
-
if (e == null || e === "") return
|
|
4051
|
+
function Mo(e) {
|
|
4052
|
+
if (e == null || e === "") return Ao;
|
|
3889
4053
|
let t = new Date(e);
|
|
3890
4054
|
return isNaN(t.getTime()) ? String(e) : t.toLocaleString();
|
|
3891
4055
|
}
|
|
3892
|
-
function
|
|
4056
|
+
function No(e) {
|
|
3893
4057
|
return new Date(e).toLocaleString(void 0, {
|
|
3894
4058
|
month: "short",
|
|
3895
4059
|
day: "numeric",
|
|
@@ -3897,13 +4061,13 @@ function go(e) {
|
|
|
3897
4061
|
minute: "2-digit"
|
|
3898
4062
|
});
|
|
3899
4063
|
}
|
|
3900
|
-
function
|
|
4064
|
+
function Po(e) {
|
|
3901
4065
|
return new Date(e).toLocaleDateString(void 0, {
|
|
3902
4066
|
month: "short",
|
|
3903
4067
|
day: "numeric"
|
|
3904
4068
|
});
|
|
3905
4069
|
}
|
|
3906
|
-
function
|
|
4070
|
+
function Fo(e) {
|
|
3907
4071
|
try {
|
|
3908
4072
|
return new Date(e).toLocaleString(void 0, {
|
|
3909
4073
|
year: "numeric",
|
|
@@ -3919,7 +4083,7 @@ function vo(e) {
|
|
|
3919
4083
|
return String(e);
|
|
3920
4084
|
}
|
|
3921
4085
|
}
|
|
3922
|
-
function
|
|
4086
|
+
function Io(e) {
|
|
3923
4087
|
if (!isFinite(e) || e === 0) return e.toFixed(2);
|
|
3924
4088
|
let t = Math.abs(e), n = 2;
|
|
3925
4089
|
return t < 1e-4 ? n = 8 : t < .01 ? n = 6 : t < 1 ? n = 4 : t < 100 && (n = 3), e.toLocaleString(void 0, {
|
|
@@ -3927,14 +4091,14 @@ function yo(e) {
|
|
|
3927
4091
|
maximumFractionDigits: n
|
|
3928
4092
|
});
|
|
3929
4093
|
}
|
|
3930
|
-
function
|
|
4094
|
+
function Lo(e, t = 2) {
|
|
3931
4095
|
return `${e >= 0 ? "+" : ""}${e.toFixed(t)}%`;
|
|
3932
4096
|
}
|
|
3933
|
-
function
|
|
4097
|
+
function Ro(e) {
|
|
3934
4098
|
return `${e < 0 ? "-" : "+"}$${Math.abs(e).toFixed(2)}`;
|
|
3935
4099
|
}
|
|
3936
|
-
function
|
|
3937
|
-
if (e == null || e === "") return
|
|
4100
|
+
function zo(e) {
|
|
4101
|
+
if (e == null || e === "") return Ao;
|
|
3938
4102
|
let t = new Date(e);
|
|
3939
4103
|
return isNaN(t.getTime()) ? String(e) : t.toLocaleDateString("en-US", {
|
|
3940
4104
|
year: "numeric",
|
|
@@ -3942,8 +4106,8 @@ function So(e) {
|
|
|
3942
4106
|
day: "numeric"
|
|
3943
4107
|
});
|
|
3944
4108
|
}
|
|
3945
|
-
function
|
|
3946
|
-
if (e == null || e === "") return
|
|
4109
|
+
function Bo(e) {
|
|
4110
|
+
if (e == null || e === "") return Ao;
|
|
3947
4111
|
let t = new Date(e);
|
|
3948
4112
|
return isNaN(t.getTime()) ? String(e) : t.toLocaleDateString("en-US", {
|
|
3949
4113
|
year: "numeric",
|
|
@@ -3953,22 +4117,22 @@ function Co(e) {
|
|
|
3953
4117
|
minute: "2-digit"
|
|
3954
4118
|
});
|
|
3955
4119
|
}
|
|
3956
|
-
function
|
|
4120
|
+
function Vo(e) {
|
|
3957
4121
|
if (typeof e != "number" || !isFinite(e) || e <= 0) return "";
|
|
3958
4122
|
let t = e / 1e3, n = t < 1 ? 3 : 2;
|
|
3959
4123
|
return `= ${t.toFixed(n)} s`;
|
|
3960
4124
|
}
|
|
3961
|
-
function
|
|
4125
|
+
function Ho(e) {
|
|
3962
4126
|
return e ? e < 1024 ? `${e} B` : e < 1048576 ? `${(e / 1024).toFixed(1)} KB` : `${(e / 1048576).toFixed(1)} MB` : "";
|
|
3963
4127
|
}
|
|
3964
|
-
function
|
|
4128
|
+
function Uo(e) {
|
|
3965
4129
|
try {
|
|
3966
4130
|
return JSON.stringify(JSON.parse(e), null, 2);
|
|
3967
4131
|
} catch {
|
|
3968
4132
|
return e;
|
|
3969
4133
|
}
|
|
3970
4134
|
}
|
|
3971
|
-
function
|
|
4135
|
+
function Wo(e) {
|
|
3972
4136
|
if (e == null) return "";
|
|
3973
4137
|
if (typeof e == "string") return e;
|
|
3974
4138
|
try {
|
|
@@ -3977,14 +4141,14 @@ function Do(e) {
|
|
|
3977
4141
|
return String(e);
|
|
3978
4142
|
}
|
|
3979
4143
|
}
|
|
3980
|
-
function
|
|
3981
|
-
if (e == null || !isFinite(e)) return
|
|
4144
|
+
function Go(e, t = 2) {
|
|
4145
|
+
if (e == null || !isFinite(e)) return Ao;
|
|
3982
4146
|
let n = Math.floor(Math.max(0, e) / 6e4), r = Math.floor(n / 1440), i = Math.floor(n % 1440 / 60), a = n % 60, o = [];
|
|
3983
4147
|
return r > 0 && o.push(`${r}d`), (r > 0 || i > 0) && o.push(`${i}h`), o.push(`${a}m`), o.slice(0, t).join(" ");
|
|
3984
4148
|
}
|
|
3985
4149
|
//#endregion
|
|
3986
4150
|
//#region src/utils/validate.ts
|
|
3987
|
-
function
|
|
4151
|
+
function Ko(e) {
|
|
3988
4152
|
let t = (e ?? "").trim();
|
|
3989
4153
|
if (!t) return !1;
|
|
3990
4154
|
try {
|
|
@@ -3994,7 +4158,7 @@ function ko(e) {
|
|
|
3994
4158
|
return !1;
|
|
3995
4159
|
}
|
|
3996
4160
|
}
|
|
3997
|
-
function
|
|
4161
|
+
function qo(e) {
|
|
3998
4162
|
if (!e.trim()) return !0;
|
|
3999
4163
|
try {
|
|
4000
4164
|
return JSON.parse(e), !0;
|
|
@@ -4002,7 +4166,7 @@ function Ao(e) {
|
|
|
4002
4166
|
return !1;
|
|
4003
4167
|
}
|
|
4004
4168
|
}
|
|
4005
|
-
function
|
|
4169
|
+
function Jo(e) {
|
|
4006
4170
|
if (!e.trim()) return !0;
|
|
4007
4171
|
try {
|
|
4008
4172
|
return !new DOMParser().parseFromString(e, "application/xml").getElementsByTagName("parsererror").length;
|
|
@@ -4010,7 +4174,7 @@ function jo(e) {
|
|
|
4010
4174
|
return !1;
|
|
4011
4175
|
}
|
|
4012
4176
|
}
|
|
4013
|
-
function
|
|
4177
|
+
function Yo(e) {
|
|
4014
4178
|
if (!e.trim()) return !0;
|
|
4015
4179
|
let t = e.replace(/\s+/g, "");
|
|
4016
4180
|
if (!t) return !0;
|
|
@@ -4023,7 +4187,7 @@ function Mo(e) {
|
|
|
4023
4187
|
}
|
|
4024
4188
|
//#endregion
|
|
4025
4189
|
//#region src/utils/specForm.ts
|
|
4026
|
-
function
|
|
4190
|
+
function Xo(e, t) {
|
|
4027
4191
|
let n = {};
|
|
4028
4192
|
if (!e) return n;
|
|
4029
4193
|
for (let r of e) {
|
|
@@ -4032,7 +4196,7 @@ function No(e, t) {
|
|
|
4032
4196
|
}
|
|
4033
4197
|
return n;
|
|
4034
4198
|
}
|
|
4035
|
-
function
|
|
4199
|
+
function Zo(e, t) {
|
|
4036
4200
|
if (!e) return null;
|
|
4037
4201
|
for (let n of e) if (n.type === "decimal" || n.type === "integer") {
|
|
4038
4202
|
let e = t[n.key], r = e === "" || e == null;
|
|
@@ -4043,7 +4207,7 @@ function Po(e, t) {
|
|
|
4043
4207
|
}
|
|
4044
4208
|
//#endregion
|
|
4045
4209
|
//#region src/utils/pnl.ts
|
|
4046
|
-
function
|
|
4210
|
+
function Qo(e) {
|
|
4047
4211
|
if (e.buyPrice == null || e.lastPrice == null || e.filledQty == null) return {
|
|
4048
4212
|
pnlUsd: null,
|
|
4049
4213
|
pnlPct: null
|
|
@@ -4058,4 +4222,4 @@ function Fo(e) {
|
|
|
4058
4222
|
};
|
|
4059
4223
|
}
|
|
4060
4224
|
//#endregion
|
|
4061
|
-
export { V as AlertEnum,
|
|
4225
|
+
export { V as AlertEnum, Sr as BaseActionButton, Le as BaseAlert, fr as BaseAppLayout, Za as BaseAuthLayout, ze as BaseBadge, uo as BaseBadgeEnum, ha as BaseBarDistribution, eo as BaseBooleanBadge, Ue as BaseBreadcrumb, Qe as BaseButton, K as BaseButtonEnum, q as BaseButtonSizeEnum, Na as BaseCard, Yr as BaseChipButton, ri as BaseCodeBlock, yn as BaseCollapsibleSection, Cn as BaseConfirmModal, wr as BaseCopyButton, ea as BaseCredentialsForm, ga as BaseDateTimePicker, io as BaseDetailList, fi as BaseDropdown, lr as BaseEntityPickerModal, Ra as BaseField, ni as BaseFileDropzone, Li as BaseFilterChip, Or as BaseGoogleSignInButton, ai as BaseInput, rt as BaseLine, it as BaseLoginEnum, Br as BaseLoginForm, Dt as BaseLogo, J as BaseLogoEnum, Pt as BaseModal, Ot as BaseModalEnum, gn as BaseModalShell, An as BaseNotFoundPage, qr as BaseNotificationPanel, gr as BasePageHeader, ua as BasePillPickerModal, Xr as BaseRemoveButton, Ft as BaseRow, Ta as BaseSearchSelect, gi as BaseSegmentedControl, si as BaseSelect, Xn as BaseSidebar, Mi as BaseSpecFields, It as BaseSpinner, Fi as BaseStatBreakdown, Ha as BaseStatCard, $r as BaseStatusPill, wi as BaseTable, Dn as BaseTextInputModal, zt as BaseToast, Y as BaseToastEnum, Ga as BaseToggle, yr as BaseToolbarButton, Vt as ColoredSquares, G as ColorsEnums, Wt as EarningsCard, Yt as EuroAmount, $e as LineEnum, en as Pagination, X as PositioningEnum, on as TrendArrow, Xo as buildSpecParams, Qo as computePnL, Zo as firstInvalidNumericSpec, Ho as fmtBytes, zo as fmtCalendarDate, Bo as fmtCalendarDateTime, Mo as fmtDate, Po as fmtDateShort, No as fmtDateTime, Fo as fmtDateTimeMs, Go as fmtDuration, Vo as fmtMsAsSeconds, jo as fmtNumber, Lo as fmtPct, Io as fmtPrice, Ro as fmtUsd, Uo as formatJson, fo as getBaseColor, po as getBaseColorOf, Pe as initTheme, Do as isSafeHref, Ko as isValidAbsoluteUrl, Yo as isValidBase64, qo as isValidJson, Jo as isValidXml, _o as methodBadgeBright, go as methodBadgeSolid, yo as methodBadgeTinted, Co as rowKeyMissing, So as rowValueMissing, ko as sanitizeHtml, bo as statusBadgeSoft, vo as statusBadgeSolid, xo as statusBadgeTinted, Wo as stringifyValue, ao as useDebouncedRef, sn as useEscapeKey, co as useFieldClasses, Mn as useMobileSidebar, zn as useNotifications, lo as usePolling, so as useQueryParamSync, In as useSidebarCollapse, W as useTheme, Z as useThemeClasses, oo as useToast };
|