@bluerobotics/bluevue 0.2.0 → 0.2.1
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/dist/bluevue.js +402 -402
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/src/components/BlueButtonGroup.vue +3 -3
- package/src/components/BlueCheckbox.vue +2 -2
- package/src/components/BlueInput.vue +3 -3
- package/src/components/BlueLoadingDialog.vue +1 -1
- package/src/components/BlueSelect.vue +2 -2
- package/src/components/BlueSwitch.vue +3 -3
- package/src/components/BlueTextarea.vue +2 -1
- package/src/components/BlueWindRose.vue +4 -2
- package/src/styles/bluevue.css +8 -0
package/dist/bluevue.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ref as q, readonly as Ue, onMounted as pe, watch as X, onBeforeUnmount as me, defineComponent as L, computed as
|
|
1
|
+
import { ref as q, readonly as Ue, onMounted as pe, watch as X, onBeforeUnmount as me, defineComponent as L, computed as k, openBlock as a, createElementBlock as d, normalizeStyle as D, normalizeClass as y, renderSlot as j, createBlock as U, createCommentVNode as C, createElementVNode as i, toDisplayString as B, useSlots as Ke, unref as M, withCtx as N, createVNode as O, TransitionGroup as dt, Fragment as J, renderList as Z, createTextVNode as oe, createSlots as Ge, mergeProps as ke, nextTick as Te, withKeys as de, withModifiers as ae, Transition as pt, withDirectives as Ve, vShow as mt, vModelText as je } from "vue";
|
|
2
2
|
import { useFloating as ft, autoUpdate as vt, offset as ht, flip as bt, shift as yt, size as gt } from "@floating-ui/vue";
|
|
3
3
|
const qe = q({ show: !1, message: "Working…", dismissible: !1 }), qt = (c = "Working…", n = !1) => {
|
|
4
4
|
qe.value = { show: !0, message: c, dismissible: n };
|
|
@@ -8,7 +8,7 @@ const qe = q({ show: !1, message: "Working…", dismissible: !1 }), qt = (c = "W
|
|
|
8
8
|
function kt() {
|
|
9
9
|
return { loading: Ue(qe), showLoading: qt, hideLoading: wt };
|
|
10
10
|
}
|
|
11
|
-
class
|
|
11
|
+
class Fe extends Error {
|
|
12
12
|
constructor(n, e, t) {
|
|
13
13
|
super(n), this.url = e, this.status = t, this.name = "BlueOsError";
|
|
14
14
|
}
|
|
@@ -26,10 +26,10 @@ const qo = (c) => {
|
|
|
26
26
|
try {
|
|
27
27
|
v = await fetch(r, { signal: AbortSignal.timeout(t), ...u });
|
|
28
28
|
} catch (x) {
|
|
29
|
-
throw new
|
|
29
|
+
throw new Fe(`Could not reach ${c}: ${x.message}`, r, 0);
|
|
30
30
|
}
|
|
31
31
|
if (!v.ok)
|
|
32
|
-
throw new
|
|
32
|
+
throw new Fe(await v.text() || v.statusText, r, v.status);
|
|
33
33
|
const f = await v.text();
|
|
34
34
|
return f === "" ? void 0 : JSON.parse(f);
|
|
35
35
|
};
|
|
@@ -44,7 +44,7 @@ const qo = (c) => {
|
|
|
44
44
|
}),
|
|
45
45
|
delete: (s, u) => l(s, { method: "DELETE", ...u })
|
|
46
46
|
};
|
|
47
|
-
}, Ce = xe("beacon"),
|
|
47
|
+
}, Ce = xe("beacon"), _e = xe("bag"), $t = xe("version-chooser"), Bt = xe("customization"), Je = q(null), Ye = q(null), Xe = q(null), Ze = q(null), Qe = q(!0), et = q(!1), tt = q(null), he = async (c, n) => {
|
|
48
48
|
try {
|
|
49
49
|
return n(await c), !0;
|
|
50
50
|
} catch {
|
|
@@ -66,10 +66,10 @@ const qo = (c) => {
|
|
|
66
66
|
he(Bt.get("theme"), (t) => {
|
|
67
67
|
Ze.value = t.primary;
|
|
68
68
|
}),
|
|
69
|
-
he(
|
|
69
|
+
he(_e.get("get/settings"), (t) => {
|
|
70
70
|
typeof t.is_dark_theme == "boolean" && (Qe.value = t.is_dark_theme), typeof t.is_pirate_mode == "boolean" && (et.value = t.is_pirate_mode);
|
|
71
71
|
})
|
|
72
|
-
]), tt.value = c || n || e ? null : new
|
|
72
|
+
]), tt.value = c || n || e ? null : new Fe("Could not reach the vehicle", Ce.url("vehicle_name"), 0);
|
|
73
73
|
}, Ct = () => (pe(() => {
|
|
74
74
|
Oe();
|
|
75
75
|
}), {
|
|
@@ -87,14 +87,14 @@ const qo = (c) => {
|
|
|
87
87
|
let t = !1, o;
|
|
88
88
|
pe(async () => {
|
|
89
89
|
try {
|
|
90
|
-
e.value = await
|
|
90
|
+
e.value = await _e.get(`get/${c}`);
|
|
91
91
|
} catch (u) {
|
|
92
92
|
u.status !== 400 && console.warn(`Could not read ${c}:`, u);
|
|
93
93
|
}
|
|
94
94
|
t = !0;
|
|
95
95
|
});
|
|
96
96
|
const l = () => {
|
|
97
|
-
|
|
97
|
+
_e.post(`set/${c}`, e.value).catch((u) => console.warn(`Could not save ${c}:`, u));
|
|
98
98
|
}, s = X(e, () => {
|
|
99
99
|
t && (clearTimeout(o), o = setTimeout(() => {
|
|
100
100
|
o = void 0, l();
|
|
@@ -103,7 +103,7 @@ const qo = (c) => {
|
|
|
103
103
|
return me(() => {
|
|
104
104
|
s(), o !== void 0 && (clearTimeout(o), l());
|
|
105
105
|
}), e;
|
|
106
|
-
},
|
|
106
|
+
}, Tt = {
|
|
107
107
|
primary: "--bluevue-primary",
|
|
108
108
|
accent: "--bluevue-accent",
|
|
109
109
|
error: "--bluevue-error",
|
|
@@ -111,13 +111,13 @@ const qo = (c) => {
|
|
|
111
111
|
panelBg: "--bluevue-panel-bg",
|
|
112
112
|
hairline: "--bluevue-hairline"
|
|
113
113
|
};
|
|
114
|
-
function
|
|
115
|
-
for (const [e, t] of Object.entries(
|
|
114
|
+
function Vt(c, n = document.documentElement) {
|
|
115
|
+
for (const [e, t] of Object.entries(Tt)) {
|
|
116
116
|
const o = c[e];
|
|
117
117
|
o && n.style.setProperty(t, o);
|
|
118
118
|
}
|
|
119
119
|
}
|
|
120
|
-
const
|
|
120
|
+
const Ft = ["role", "aria-label", "aria-hidden"], H = /* @__PURE__ */ L({
|
|
121
121
|
__name: "BlueIcon",
|
|
122
122
|
props: {
|
|
123
123
|
name: {},
|
|
@@ -127,19 +127,19 @@ const Vt = ["role", "aria-label", "aria-hidden"], H = /* @__PURE__ */ L({
|
|
|
127
127
|
label: {}
|
|
128
128
|
},
|
|
129
129
|
setup(c) {
|
|
130
|
-
const n = c, e =
|
|
130
|
+
const n = c, e = k(() => n.name.startsWith("mdi-") ? n.name : `mdi-${n.name}`), t = k(() => {
|
|
131
131
|
const o = n.size ?? 20;
|
|
132
132
|
return typeof o == "number" ? `${o}px` : o;
|
|
133
133
|
});
|
|
134
134
|
return (o, l) => (a(), d("span", {
|
|
135
|
-
class:
|
|
135
|
+
class: y(["mdi bluevue-icon", [e.value, o.spin ? "bluevue-icon--spin" : ""]]),
|
|
136
136
|
style: D({ width: t.value, height: t.value, fontSize: t.value, color: o.color }),
|
|
137
137
|
role: o.label ? "img" : void 0,
|
|
138
138
|
"aria-label": o.label,
|
|
139
139
|
"aria-hidden": o.label ? void 0 : "true"
|
|
140
|
-
}, null, 14,
|
|
140
|
+
}, null, 14, Ft));
|
|
141
141
|
}
|
|
142
|
-
}),
|
|
142
|
+
}), _t = {
|
|
143
143
|
key: 0,
|
|
144
144
|
class: "bluevue-elevation-1 relative flex items-center gap-5 rounded-t-[8px] bg-[#15151577] px-5 py-3"
|
|
145
145
|
}, Mt = ["src"], St = { class: "truncate text-lg font-medium" }, Rt = { class: "ml-auto flex shrink-0 items-center gap-1" }, zt = {
|
|
@@ -159,7 +159,7 @@ const Vt = ["role", "aria-label", "aria-hidden"], H = /* @__PURE__ */ L({
|
|
|
159
159
|
class: "bluevue-elevation-5 mx-auto w-full rounded-[8px] bg-[var(--bluevue-surface)] text-white",
|
|
160
160
|
style: D({ maxWidth: n.width || "615px" })
|
|
161
161
|
}, [
|
|
162
|
-
n.title || n.$slots.header || n.$slots.actions ? (a(), d("header",
|
|
162
|
+
n.title || n.$slots.header || n.$slots.actions ? (a(), d("header", _t, [
|
|
163
163
|
j(n.$slots, "header", {}, () => [
|
|
164
164
|
n.logo ? (a(), d("img", {
|
|
165
165
|
key: 0,
|
|
@@ -178,7 +178,7 @@ const Vt = ["role", "aria-label", "aria-hidden"], H = /* @__PURE__ */ L({
|
|
|
178
178
|
])
|
|
179
179
|
])) : C("", !0),
|
|
180
180
|
i("div", {
|
|
181
|
-
class:
|
|
181
|
+
class: y(n.bodyClass || "px-5 py-4")
|
|
182
182
|
}, [
|
|
183
183
|
j(n.$slots, "default")
|
|
184
184
|
], 2),
|
|
@@ -196,7 +196,7 @@ const Vt = ["role", "aria-label", "aria-hidden"], H = /* @__PURE__ */ L({
|
|
|
196
196
|
label: {}
|
|
197
197
|
},
|
|
198
198
|
setup(c) {
|
|
199
|
-
const n = c, e =
|
|
199
|
+
const n = c, e = k(() => {
|
|
200
200
|
const t = n.size ?? 20;
|
|
201
201
|
return typeof t == "number" ? `${t}px` : t;
|
|
202
202
|
});
|
|
@@ -229,7 +229,7 @@ const Vt = ["role", "aria-label", "aria-hidden"], H = /* @__PURE__ */ L({
|
|
|
229
229
|
},
|
|
230
230
|
emits: ["click"],
|
|
231
231
|
setup(c) {
|
|
232
|
-
const n = c, e = { compact: 24, regular: 30, comfortable: 36 }, t = { compact: "px-2", regular: "px-3", comfortable: "px-4" }, o =
|
|
232
|
+
const n = c, e = { compact: 24, regular: 30, comfortable: 36 }, t = { compact: "px-2", regular: "px-3", comfortable: "px-4" }, o = k(() => n.variant ?? "tonal"), l = k(() => n.density ?? "regular"), s = k(() => n.theme !== "light"), u = k(() => e[l.value]), r = k(() => l.value === "compact" ? 14 : 16), v = k(() => {
|
|
233
233
|
if (n.disabled)
|
|
234
234
|
return o.value === "text" || o.value === "icon" ? "opacity-30 cursor-not-allowed" : "opacity-30 cursor-not-allowed bg-[#9e9e9e80] text-[#afafaf]";
|
|
235
235
|
switch (o.value) {
|
|
@@ -242,16 +242,16 @@ const Vt = ["role", "aria-label", "aria-hidden"], H = /* @__PURE__ */ L({
|
|
|
242
242
|
default:
|
|
243
243
|
return s.value ? "cursor-pointer bg-[#ffffff11] text-white hover:bg-[#ffffff22]" : "cursor-pointer bg-[#00000011] text-black hover:bg-[#00000022]";
|
|
244
244
|
}
|
|
245
|
-
}), f =
|
|
245
|
+
}), f = k(() => o.value === "filled" && !n.disabled ? n.color || "var(--bluevue-primary)" : void 0), x = k(
|
|
246
246
|
() => n.color && (o.value === "text" || o.value === "icon") ? n.color : void 0
|
|
247
247
|
);
|
|
248
|
-
return (p,
|
|
248
|
+
return (p, _) => (a(), d("button", {
|
|
249
249
|
type: p.type || "button",
|
|
250
250
|
disabled: p.disabled,
|
|
251
251
|
title: p.tooltip,
|
|
252
252
|
"aria-label": o.value === "icon" ? p.tooltip : void 0,
|
|
253
253
|
"aria-busy": p.loading || void 0,
|
|
254
|
-
class:
|
|
254
|
+
class: y(["inline-flex shrink-0 select-none items-center justify-center gap-2 whitespace-nowrap transition-colors duration-200", [
|
|
255
255
|
v.value,
|
|
256
256
|
o.value === "icon" ? "rounded-[6px]" : "rounded-[4px]",
|
|
257
257
|
o.value === "icon" ? "" : t[l.value],
|
|
@@ -265,7 +265,7 @@ const Vt = ["role", "aria-label", "aria-hidden"], H = /* @__PURE__ */ L({
|
|
|
265
265
|
width: o.value === "icon" ? `${u.value}px` : void 0,
|
|
266
266
|
backgroundColor: f.value
|
|
267
267
|
}),
|
|
268
|
-
onClick:
|
|
268
|
+
onClick: _[0] || (_[0] = ($) => p.$emit("click", $))
|
|
269
269
|
}, [
|
|
270
270
|
p.loading ? (a(), U(It, {
|
|
271
271
|
key: 0,
|
|
@@ -279,7 +279,7 @@ const Vt = ["role", "aria-label", "aria-hidden"], H = /* @__PURE__ */ L({
|
|
|
279
279
|
}, null, 8, ["name", "size", "color"])) : C("", !0),
|
|
280
280
|
o.value !== "icon" ? (a(), d("span", {
|
|
281
281
|
key: 2,
|
|
282
|
-
class:
|
|
282
|
+
class: y(["min-w-0 truncate font-medium uppercase tracking-wide", l.value === "compact" ? "text-[12px]" : "text-[13px]"])
|
|
283
283
|
}, [
|
|
284
284
|
j(p.$slots, "default")
|
|
285
285
|
], 2)) : C("", !0),
|
|
@@ -314,9 +314,9 @@ const Vt = ["role", "aria-label", "aria-hidden"], H = /* @__PURE__ */ L({
|
|
|
314
314
|
},
|
|
315
315
|
emits: ["update:modelValue"],
|
|
316
316
|
setup(c, { expose: n, emit: e }) {
|
|
317
|
-
const t = c, o = e, l = Ke(), s = q(null), u =
|
|
318
|
-
const
|
|
319
|
-
|
|
317
|
+
const t = c, o = e, l = Ke(), s = q(null), u = k(() => !!(t.title || l.header)), r = (p) => {
|
|
318
|
+
const _ = s.value;
|
|
319
|
+
_ && (p && !_.open && _.showModal(), !p && _.open && _.close());
|
|
320
320
|
};
|
|
321
321
|
pe(() => r(t.modelValue)), X(() => t.modelValue, r);
|
|
322
322
|
const v = () => {
|
|
@@ -327,11 +327,11 @@ const Vt = ["role", "aria-label", "aria-hidden"], H = /* @__PURE__ */ L({
|
|
|
327
327
|
}, x = (p) => {
|
|
328
328
|
!t.persistent && p.target === s.value && v();
|
|
329
329
|
};
|
|
330
|
-
return n({ close: v }), (p,
|
|
330
|
+
return n({ close: v }), (p, _) => (a(), d("dialog", {
|
|
331
331
|
ref_key: "dialogRef",
|
|
332
332
|
ref: s,
|
|
333
333
|
class: "bluevue-dialog",
|
|
334
|
-
onClose:
|
|
334
|
+
onClose: _[0] || (_[0] = ($) => o("update:modelValue", !1)),
|
|
335
335
|
onCancel: f,
|
|
336
336
|
onClick: x
|
|
337
337
|
}, [
|
|
@@ -369,7 +369,7 @@ const Vt = ["role", "aria-label", "aria-hidden"], H = /* @__PURE__ */ L({
|
|
|
369
369
|
onClick: v
|
|
370
370
|
})),
|
|
371
371
|
i("div", {
|
|
372
|
-
class:
|
|
372
|
+
class: y([p.bodyClass || "px-5 py-4", u.value ? "border-t border-[#ffffff0d]" : ""])
|
|
373
373
|
}, [
|
|
374
374
|
j(p.$slots, "default")
|
|
375
375
|
], 2),
|
|
@@ -381,7 +381,7 @@ const Vt = ["role", "aria-label", "aria-hidden"], H = /* @__PURE__ */ L({
|
|
|
381
381
|
}
|
|
382
382
|
}), Ut = ["src"], Kt = {
|
|
383
383
|
key: 0,
|
|
384
|
-
class: "mt-[
|
|
384
|
+
class: "mt-[5px] text-center text-base text-white"
|
|
385
385
|
}, Gt = /* @__PURE__ */ L({
|
|
386
386
|
__name: "BlueLoadingDialog",
|
|
387
387
|
props: {
|
|
@@ -445,7 +445,7 @@ const Zt = { class: "min-w-0 flex-1 text-[13px] leading-snug" }, Qt = {
|
|
|
445
445
|
error: { icon: "mdi-alert-circle-outline", color: "var(--bluevue-error)" },
|
|
446
446
|
warning: { icon: "mdi-alert-outline", color: "#FFB74D" },
|
|
447
447
|
info: { icon: "mdi-information-outline", color: "#42A5F5" }
|
|
448
|
-
}, l =
|
|
448
|
+
}, l = k(() => {
|
|
449
449
|
switch (n.position) {
|
|
450
450
|
case "bottom-left":
|
|
451
451
|
return "bottom-4 left-4 items-start";
|
|
@@ -456,12 +456,12 @@ const Zt = { class: "min-w-0 flex-1 text-[13px] leading-snug" }, Qt = {
|
|
|
456
456
|
default:
|
|
457
457
|
return "bottom-4 right-4 items-end";
|
|
458
458
|
}
|
|
459
|
-
}), s =
|
|
459
|
+
}), s = k(() => {
|
|
460
460
|
var u;
|
|
461
461
|
return (u = n.position) != null && u.startsWith("top") ? [...e.value].reverse() : e.value;
|
|
462
462
|
});
|
|
463
463
|
return (u, r) => (a(), d("div", {
|
|
464
|
-
class:
|
|
464
|
+
class: y(["pointer-events-none fixed z-[2000] flex max-w-[min(90vw,420px)] flex-col gap-2", l.value]),
|
|
465
465
|
role: "status",
|
|
466
466
|
"aria-live": "polite"
|
|
467
467
|
}, [
|
|
@@ -508,7 +508,7 @@ const Zt = { class: "min-w-0 flex-1 text-[13px] leading-snug" }, Qt = {
|
|
|
508
508
|
return X(
|
|
509
509
|
o,
|
|
510
510
|
(l) => {
|
|
511
|
-
!n.ignoreHostTheme && l &&
|
|
511
|
+
!n.ignoreHostTheme && l && Vt({ primary: l });
|
|
512
512
|
},
|
|
513
513
|
{ immediate: !0 }
|
|
514
514
|
), (l, s) => (a(), d("div", {
|
|
@@ -568,20 +568,20 @@ const Zt = { class: "min-w-0 flex-1 text-[13px] leading-snug" }, Qt = {
|
|
|
568
568
|
warning: { icon: "mdi-alert", color: "#FFB74D", background: "#FB8C0022", border: "#FB8C0055" },
|
|
569
569
|
info: { icon: "mdi-information-outline", color: "#81D4FA", background: "#4FC3F71A", border: "#4FC3F744" },
|
|
570
570
|
success: { icon: "mdi-check-circle-outline", color: "#A5D6A7", background: "#66BB6A22", border: "#66BB6A55" }
|
|
571
|
-
}, t = c, o = n, l = q(null), s = q(null), u = q(null), r = q(t.expanded ?? !0), v = q(0), f = q(!1), x =
|
|
571
|
+
}, t = c, o = n, l = q(null), s = q(null), u = q(null), r = q(t.expanded ?? !0), v = q(0), f = q(!1), x = k(() => e[t.severity ?? "info"]), p = k(() => ({
|
|
572
572
|
color: t.color ?? x.value.color,
|
|
573
573
|
backgroundColor: t.background ?? x.value.background,
|
|
574
574
|
borderColor: t.border ?? x.value.border
|
|
575
|
-
})),
|
|
576
|
-
function
|
|
577
|
-
const m = l.value,
|
|
578
|
-
if (!m || !
|
|
575
|
+
})), _ = k(() => r.value ? f.value ? { width: `${v.value}px` } : void 0 : { width: "0px" }), $ = k(() => f.value ? { width: `${v.value}px` } : void 0);
|
|
576
|
+
function F() {
|
|
577
|
+
const m = l.value, V = s.value, E = u.value;
|
|
578
|
+
if (!m || !V || !E)
|
|
579
579
|
return;
|
|
580
|
-
const
|
|
581
|
-
m.style.cssText =
|
|
580
|
+
const w = m.style.cssText, A = V.style.cssText, K = E.style.cssText, Y = () => {
|
|
581
|
+
m.style.cssText = w, V.style.cssText = A, E.style.cssText = K, V.getBoundingClientRect(), m.classList.remove("bluevue-banner--measuring");
|
|
582
582
|
};
|
|
583
|
-
m.classList.add("bluevue-banner--measuring"), m.style.width = "100%",
|
|
584
|
-
const te =
|
|
583
|
+
m.classList.add("bluevue-banner--measuring"), m.style.width = "100%", V.style.flex = "1 1 auto", V.style.width = "auto", E.style.width = "0px";
|
|
584
|
+
const te = V.getBoundingClientRect().width;
|
|
585
585
|
if (te <= 0) {
|
|
586
586
|
Y();
|
|
587
587
|
return;
|
|
@@ -591,27 +591,27 @@ const Zt = { class: "min-w-0 flex-1 text-[13px] leading-snug" }, Qt = {
|
|
|
591
591
|
v.value = Math.min(ee, Math.floor(te)), Y(), f.value = !0;
|
|
592
592
|
}
|
|
593
593
|
function R() {
|
|
594
|
-
|
|
594
|
+
F(), r.value = !r.value, o("update:expanded", r.value);
|
|
595
595
|
}
|
|
596
596
|
let P = null;
|
|
597
597
|
return pe(() => {
|
|
598
|
-
var
|
|
599
|
-
|
|
598
|
+
var V, E;
|
|
599
|
+
F(), (V = document.fonts) == null || V.ready.then(F);
|
|
600
600
|
const m = (E = l.value) == null ? void 0 : E.parentElement;
|
|
601
601
|
if (m) {
|
|
602
|
-
let
|
|
602
|
+
let w = m.clientWidth;
|
|
603
603
|
P = new ResizeObserver(() => {
|
|
604
|
-
m.clientWidth !==
|
|
604
|
+
m.clientWidth !== w && (w = m.clientWidth, requestAnimationFrame(F));
|
|
605
605
|
}), P.observe(m);
|
|
606
606
|
}
|
|
607
607
|
}), me(() => {
|
|
608
608
|
P == null || P.disconnect(), P = null;
|
|
609
|
-
}), X(() => t.text,
|
|
609
|
+
}), X(() => t.text, F, { flush: "post" }), X(
|
|
610
610
|
() => t.expanded,
|
|
611
611
|
(m) => {
|
|
612
612
|
m !== void 0 && (r.value = m);
|
|
613
613
|
}
|
|
614
|
-
), (m,
|
|
614
|
+
), (m, V) => (a(), d("button", {
|
|
615
615
|
ref_key: "box",
|
|
616
616
|
ref: l,
|
|
617
617
|
type: "button",
|
|
@@ -623,13 +623,13 @@ const Zt = { class: "min-w-0 flex-1 text-[13px] leading-snug" }, Qt = {
|
|
|
623
623
|
onClick: R
|
|
624
624
|
}, [
|
|
625
625
|
i("span", {
|
|
626
|
-
class:
|
|
626
|
+
class: y(["mdi bluevue-banner__icon shrink-0", t.icon ?? x.value.icon])
|
|
627
627
|
}, null, 2),
|
|
628
628
|
i("span", {
|
|
629
629
|
ref_key: "reveal",
|
|
630
630
|
ref: s,
|
|
631
|
-
class:
|
|
632
|
-
style: D(
|
|
631
|
+
class: y(["bluevue-banner__reveal overflow-hidden", f.value ? "shrink-0" : ""]),
|
|
632
|
+
style: D(_.value)
|
|
633
633
|
}, [
|
|
634
634
|
i("span", {
|
|
635
635
|
ref_key: "label",
|
|
@@ -685,11 +685,11 @@ const sl = () => {
|
|
|
685
685
|
});
|
|
686
686
|
function ye(c = {}) {
|
|
687
687
|
sl();
|
|
688
|
-
const n = q(null), e = q(null), t = q(!1), o = `bluevue-popover-${++nl}`, l = q(null), s =
|
|
688
|
+
const n = q(null), e = q(null), t = q(!1), o = `bluevue-popover-${++nl}`, l = q(null), s = k(() => {
|
|
689
689
|
if (!l.value) return null;
|
|
690
|
-
const [$,
|
|
691
|
-
return { getBoundingClientRect: () => new DOMRect($,
|
|
692
|
-
}), u =
|
|
690
|
+
const [$, F] = l.value;
|
|
691
|
+
return { getBoundingClientRect: () => new DOMRect($, F, 0, 0) };
|
|
692
|
+
}), u = k(() => t.value ? s.value ?? n.value : null), { floatingStyles: r, isPositioned: v } = ft(u, e, {
|
|
693
693
|
// Stated so isPositioned drops back to false on close, and a second open is held invisible
|
|
694
694
|
// until it has been placed rather than showing for a frame at wherever it last was.
|
|
695
695
|
open: t,
|
|
@@ -701,8 +701,8 @@ function ye(c = {}) {
|
|
|
701
701
|
bt({ padding: 8 }),
|
|
702
702
|
yt({ padding: 8 }),
|
|
703
703
|
...c.matchAnchorWidth ? [gt({
|
|
704
|
-
apply: ({ rects: $, elements:
|
|
705
|
-
|
|
704
|
+
apply: ({ rects: $, elements: F }) => {
|
|
705
|
+
F.floating.style.minWidth = `${$.reference.width}px`;
|
|
706
706
|
}
|
|
707
707
|
})] : []
|
|
708
708
|
]
|
|
@@ -717,8 +717,8 @@ function ye(c = {}) {
|
|
|
717
717
|
isPositioned: v,
|
|
718
718
|
floatingStyles: r,
|
|
719
719
|
show: async ($) => {
|
|
720
|
-
const
|
|
721
|
-
if (l.value = $ ?? null, await
|
|
720
|
+
const F = ++f;
|
|
721
|
+
if (l.value = $ ?? null, await Te(), Se && await al(), F !== f) return;
|
|
722
722
|
const R = e.value;
|
|
723
723
|
!R || R.matches(":popover-open") || R.showPopover();
|
|
724
724
|
},
|
|
@@ -752,19 +752,19 @@ const il = ["aria-describedby"], rl = ["id"], ie = /* @__PURE__ */ L({
|
|
|
752
752
|
n.disabled || !n.text || (x(), f = window.setTimeout(() => {
|
|
753
753
|
f = null, u();
|
|
754
754
|
}, n.openDelay ?? 300));
|
|
755
|
-
},
|
|
755
|
+
}, _ = () => {
|
|
756
756
|
x(), r();
|
|
757
757
|
};
|
|
758
|
-
return me(x), ($,
|
|
758
|
+
return me(x), ($, F) => (a(), d("span", {
|
|
759
759
|
ref_key: "anchorRef",
|
|
760
760
|
ref: e,
|
|
761
761
|
class: "inline-flex",
|
|
762
762
|
"aria-describedby": $.text && !$.disabled ? M(o) : void 0,
|
|
763
763
|
onMouseenter: p,
|
|
764
|
-
onMouseleave:
|
|
764
|
+
onMouseleave: _,
|
|
765
765
|
onFocusin: p,
|
|
766
|
-
onFocusout:
|
|
767
|
-
onKeydown: de(
|
|
766
|
+
onFocusout: _,
|
|
767
|
+
onKeydown: de(_, ["escape"])
|
|
768
768
|
}, [
|
|
769
769
|
j($.$slots, "default"),
|
|
770
770
|
i("div", {
|
|
@@ -774,12 +774,12 @@ const il = ["aria-describedby"], rl = ["id"], ie = /* @__PURE__ */ L({
|
|
|
774
774
|
popover: "manual",
|
|
775
775
|
class: "bluevue-popover",
|
|
776
776
|
style: D(M(s)),
|
|
777
|
-
onToggle:
|
|
777
|
+
onToggle: F[0] || (F[0] = //@ts-ignore
|
|
778
778
|
(...R) => M(v) && M(v)(...R))
|
|
779
779
|
}, [
|
|
780
780
|
i("div", {
|
|
781
781
|
role: "tooltip",
|
|
782
|
-
class:
|
|
782
|
+
class: y(["bluevue-elevation-5 max-w-[280px] rounded-[4px] px-2 py-1 text-xs leading-snug transition-opacity duration-150", [
|
|
783
783
|
$.theme === "light" ? "bg-white text-black" : "bg-[#333333f2] text-white",
|
|
784
784
|
M(l) ? "opacity-100" : "opacity-0"
|
|
785
785
|
]])
|
|
@@ -826,99 +826,99 @@ const il = ["aria-describedby"], rl = ["id"], ie = /* @__PURE__ */ L({
|
|
|
826
826
|
hide: x,
|
|
827
827
|
onToggle: p
|
|
828
828
|
} = ye();
|
|
829
|
-
let
|
|
830
|
-
const
|
|
829
|
+
let _ = null, $ = !1;
|
|
830
|
+
const F = {
|
|
831
831
|
compact: { class: "px-[11px]", total: 22 },
|
|
832
832
|
regular: { class: "px-[15px]", total: 30 },
|
|
833
833
|
comfortable: { class: "px-[19px]", total: 38 }
|
|
834
|
-
}, R = q(null), P = q(null), m = q(null),
|
|
835
|
-
let
|
|
834
|
+
}, R = q(null), P = q(null), m = q(null), V = q(!1), E = q(!1);
|
|
835
|
+
let w = null;
|
|
836
836
|
const A = () => {
|
|
837
|
-
const
|
|
838
|
-
if (!
|
|
839
|
-
const g =
|
|
840
|
-
let
|
|
837
|
+
const h = m.value, S = R.value;
|
|
838
|
+
if (!h || !S) return;
|
|
839
|
+
const g = h.querySelectorAll("[data-bbg-label]"), I = F[e.density || "comfortable"].total;
|
|
840
|
+
let T = 0;
|
|
841
841
|
g.forEach((Q) => {
|
|
842
|
-
|
|
843
|
-
}),
|
|
842
|
+
T += Q.scrollWidth + I;
|
|
843
|
+
}), T += Math.max(0, g.length - 1), V.value = T > kl;
|
|
844
844
|
let G = P.value ? P.value.scrollWidth + xl : 0;
|
|
845
845
|
for (const Q of Array.from(S.children))
|
|
846
|
-
Q.contains(
|
|
847
|
-
E.value =
|
|
846
|
+
Q.contains(h) && (G += Q.clientWidth - h.clientWidth);
|
|
847
|
+
E.value = T > S.clientWidth - G;
|
|
848
848
|
}, K = () => {
|
|
849
|
-
const
|
|
849
|
+
const h = e.buttonItems;
|
|
850
850
|
if (e.type === "switch") {
|
|
851
|
-
const S =
|
|
852
|
-
o.value =
|
|
851
|
+
const S = h.findIndex((I) => I.preSelected), g = S >= 0 ? S : 0;
|
|
852
|
+
o.value = h.map((I, T) => T === g);
|
|
853
853
|
} else
|
|
854
|
-
o.value =
|
|
854
|
+
o.value = h.map((S) => !!S.preSelected);
|
|
855
855
|
t("update:selected", o.value);
|
|
856
|
-
}, Y = (
|
|
856
|
+
}, Y = (h) => {
|
|
857
857
|
var g, I;
|
|
858
|
-
if (e.disabled || e.buttonItems[
|
|
859
|
-
const S = e.buttonItems[
|
|
860
|
-
e.type === "switch" ? o.value[
|
|
861
|
-
}, te = (
|
|
862
|
-
e.disabled || e.buttonItems[
|
|
858
|
+
if (e.disabled || e.buttonItems[h].disabled) return;
|
|
859
|
+
const S = e.buttonItems[h];
|
|
860
|
+
e.type === "switch" ? o.value[h] || (o.value = o.value.map((T, G) => G === h), (g = S.onSelected) == null || g.call(S)) : (o.value[h] = !o.value[h], o.value[h] && ((I = S.onSelected) == null || I.call(S))), t("update:selected", o.value);
|
|
861
|
+
}, te = (h, S) => {
|
|
862
|
+
e.disabled || e.buttonItems[h].disabled || t("context-menu", { item: e.buttonItems[h], index: h, x: S.clientX, y: S.clientY });
|
|
863
863
|
}, ee = () => {
|
|
864
|
-
|
|
865
|
-
}, re = (
|
|
866
|
-
if (e.disabled || e.buttonItems[
|
|
864
|
+
_ !== null && (clearTimeout(_), _ = null);
|
|
865
|
+
}, re = (h, S) => {
|
|
866
|
+
if (e.disabled || e.buttonItems[h].disabled) return;
|
|
867
867
|
ee(), $ = !1;
|
|
868
868
|
const { clientX: g, clientY: I } = S;
|
|
869
|
-
|
|
870
|
-
|
|
869
|
+
_ = window.setTimeout(() => {
|
|
870
|
+
_ = null, $ = !0, t("context-menu", { item: e.buttonItems[h], index: h, x: g, y: I });
|
|
871
871
|
}, wl);
|
|
872
|
-
}, fe = (
|
|
872
|
+
}, fe = (h) => {
|
|
873
873
|
if ($) {
|
|
874
874
|
$ = !1;
|
|
875
875
|
return;
|
|
876
876
|
}
|
|
877
|
-
e.buttonItems[
|
|
878
|
-
}, ne = (
|
|
879
|
-
|
|
877
|
+
e.buttonItems[h].disabled || Y(h);
|
|
878
|
+
}, ne = (h) => {
|
|
879
|
+
h.action(), x();
|
|
880
880
|
};
|
|
881
881
|
return pe(() => {
|
|
882
|
-
var
|
|
883
|
-
K(),
|
|
882
|
+
var h;
|
|
883
|
+
K(), Te(A), (h = document.fonts) == null || h.ready.then(A), typeof ResizeObserver < "u" && m.value && (w = new ResizeObserver(() => A()), w.observe(m.value));
|
|
884
884
|
}), me(() => {
|
|
885
|
-
|
|
885
|
+
w == null || w.disconnect(), ee();
|
|
886
886
|
}), X(
|
|
887
887
|
() => e.buttonItems.length,
|
|
888
888
|
K,
|
|
889
889
|
{ deep: !0, immediate: !0 }
|
|
890
890
|
), X(
|
|
891
|
-
() => e.buttonItems.map((
|
|
892
|
-
() =>
|
|
893
|
-
), (
|
|
891
|
+
() => e.buttonItems.map((h) => h.name).join("|"),
|
|
892
|
+
() => Te(A)
|
|
893
|
+
), (h, S) => {
|
|
894
894
|
var g, I;
|
|
895
895
|
return a(), d("div", {
|
|
896
896
|
ref_key: "rowRef",
|
|
897
897
|
ref: R,
|
|
898
898
|
class: "flex w-full justify-between items-center"
|
|
899
899
|
}, [
|
|
900
|
-
|
|
900
|
+
h.label ? (a(), d("div", ul, [
|
|
901
901
|
i("label", {
|
|
902
902
|
ref_key: "labelRef",
|
|
903
903
|
ref: P,
|
|
904
|
-
class:
|
|
905
|
-
title:
|
|
906
|
-
}, B(
|
|
904
|
+
class: y(["block truncate text-start mr-6", [h.theme === "dark" ? "text-white" : "text-black", h.disabled ? "opacity-30" : ""]]),
|
|
905
|
+
title: h.label
|
|
906
|
+
}, B(h.label), 11, cl)
|
|
907
907
|
])) : (a(), d("div", dl)),
|
|
908
|
-
j(
|
|
908
|
+
j(h.$slots, "insetElement"),
|
|
909
909
|
i("div", pl, [
|
|
910
|
-
|
|
910
|
+
h.infoTooltip ? (a(), U(ie, {
|
|
911
911
|
key: 0,
|
|
912
|
-
text:
|
|
913
|
-
theme:
|
|
912
|
+
text: h.infoTooltip,
|
|
913
|
+
theme: h.theme,
|
|
914
914
|
class: "items-center shrink-0 mr-2"
|
|
915
915
|
}, {
|
|
916
916
|
default: N(() => [
|
|
917
917
|
O(H, {
|
|
918
918
|
name: "mdi-information-outline",
|
|
919
919
|
size: 16,
|
|
920
|
-
label:
|
|
921
|
-
class:
|
|
920
|
+
label: h.infoTooltip,
|
|
921
|
+
class: y(["cursor-help", [h.disabled ? "opacity-30" : "opacity-60", h.theme === "dark" ? "text-white" : "text-black"]])
|
|
922
922
|
}, null, 8, ["label", "class"])
|
|
923
923
|
]),
|
|
924
924
|
_: 1
|
|
@@ -926,31 +926,31 @@ const il = ["aria-describedby"], rl = ["id"], ie = /* @__PURE__ */ L({
|
|
|
926
926
|
i("div", {
|
|
927
927
|
ref_key: "trackRef",
|
|
928
928
|
ref: m,
|
|
929
|
-
class:
|
|
930
|
-
style: D({ height:
|
|
929
|
+
class: y(["relative flex min-w-0 justify-end overflow-hidden rounded-[6px] bluevue-elevation-1 z-[666]", [h.theme === "dark" ? "bg-[#464646AA]" : "bg-[#00000011]", h.disabled ? "opacity-30 pointer-events-none" : ""]]),
|
|
930
|
+
style: D({ height: h.height || (h.density === "compact" ? "24px" : "30px") })
|
|
931
931
|
}, [
|
|
932
932
|
ml,
|
|
933
|
-
(a(!0), d(J, null, Z(
|
|
934
|
-
key:
|
|
933
|
+
(a(!0), d(J, null, Z(h.buttonItems, (T, G) => (a(), d(J, {
|
|
934
|
+
key: T.name
|
|
935
935
|
}, [
|
|
936
936
|
i("button", {
|
|
937
|
-
disabled:
|
|
938
|
-
title:
|
|
939
|
-
class:
|
|
937
|
+
disabled: h.disabled || T.disabled,
|
|
938
|
+
title: T.name,
|
|
939
|
+
class: y(["flex min-w-0 items-center justify-center text-sm font-medium transition-colors duration-200", [
|
|
940
940
|
// A group with no room left falls back to the tightest inset whatever the
|
|
941
941
|
// density asks for, since the alternative is cutting into the names.
|
|
942
|
-
E.value ?
|
|
942
|
+
E.value ? F.compact.class : F[h.density || "comfortable"].class,
|
|
943
943
|
// The active choice is the one worth reading at a glance, so it keeps its full
|
|
944
944
|
// name and the rest give up the room a crowded group needs.
|
|
945
945
|
o.value[G] ? "shrink-0" : "",
|
|
946
|
-
o.value[G] ? "text-white" :
|
|
947
|
-
o.value[G] &&
|
|
948
|
-
|
|
946
|
+
o.value[G] ? "text-white" : h.theme === "dark" ? "text-[#ffffff99]" : "text-[#00000066]",
|
|
947
|
+
o.value[G] && h.type === "switch" ? "bluevue-elevation-5" : "",
|
|
948
|
+
h.disabled || T.disabled ? "cursor-not-allowed" : "cursor-pointer",
|
|
949
949
|
// Only the button's own state fades it: a disabled group is faded whole by the
|
|
950
950
|
// track below, and dimming twice over would leave the names unreadable.
|
|
951
|
-
|
|
951
|
+
T.disabled ? "opacity-30" : ""
|
|
952
952
|
]]),
|
|
953
|
-
style: D({ backgroundColor: o.value[G] ?
|
|
953
|
+
style: D({ backgroundColor: o.value[G] ? T.activeColor || "var(--bluevue-primary)" : void 0 }),
|
|
954
954
|
onClick: (Q) => fe(G),
|
|
955
955
|
onContextmenu: ae((Q) => te(G, Q), ["prevent"]),
|
|
956
956
|
onPointerdown: (Q) => re(G, Q),
|
|
@@ -959,30 +959,30 @@ const il = ["aria-describedby"], rl = ["id"], ie = /* @__PURE__ */ L({
|
|
|
959
959
|
onPointercancel: ee
|
|
960
960
|
}, [
|
|
961
961
|
O(ie, {
|
|
962
|
-
text:
|
|
963
|
-
theme:
|
|
962
|
+
text: T.tooltip || "",
|
|
963
|
+
theme: h.theme,
|
|
964
964
|
class: "min-w-0"
|
|
965
965
|
}, {
|
|
966
966
|
default: N(() => [
|
|
967
967
|
i("span", {
|
|
968
968
|
"data-bbg-label": "",
|
|
969
|
-
class:
|
|
970
|
-
}, B(
|
|
969
|
+
class: y(["block truncate", [h.density === "compact" ? "text-[10px]" : "text-xs", V.value ? "max-w-[150px]" : ""]])
|
|
970
|
+
}, B(T.name), 3)
|
|
971
971
|
]),
|
|
972
972
|
_: 2
|
|
973
973
|
}, 1032, ["text", "theme"])
|
|
974
974
|
], 46, fl),
|
|
975
|
-
G <
|
|
975
|
+
G < h.buttonItems.length - 1 ? (a(), d("div", vl)) : C("", !0)
|
|
976
976
|
], 64))), 128)),
|
|
977
|
-
(g =
|
|
978
|
-
(I =
|
|
977
|
+
(g = h.buttonsMenu) != null && g.length ? (a(), d("div", hl)) : C("", !0),
|
|
978
|
+
(I = h.buttonsMenu) != null && I.length ? (a(), d(J, { key: 1 }, [
|
|
979
979
|
i("button", ke({
|
|
980
980
|
ref_key: "menuAnchorRef",
|
|
981
981
|
ref: l
|
|
982
982
|
}, M(r), {
|
|
983
983
|
type: "button",
|
|
984
984
|
title: "More options",
|
|
985
|
-
class: ["shrink-0 px-0 flex items-center justify-center h-full cursor-pointer",
|
|
985
|
+
class: ["shrink-0 px-0 flex items-center justify-center h-full cursor-pointer", h.theme === "dark" ? "text-white" : "text-black"]
|
|
986
986
|
}), yl, 16),
|
|
987
987
|
i("div", {
|
|
988
988
|
id: M(u),
|
|
@@ -992,27 +992,27 @@ const il = ["aria-describedby"], rl = ["id"], ie = /* @__PURE__ */ L({
|
|
|
992
992
|
class: "bluevue-popover",
|
|
993
993
|
style: D(M(f)),
|
|
994
994
|
onToggle: S[0] || (S[0] = //@ts-ignore
|
|
995
|
-
(...
|
|
995
|
+
(...T) => M(p) && M(p)(...T))
|
|
996
996
|
}, [
|
|
997
997
|
i("ul", {
|
|
998
|
-
class:
|
|
999
|
-
|
|
998
|
+
class: y(["bluevue-elevation-5 max-h-[60vh] overflow-y-auto border-[1px] rounded-[4px] border-[#FFFFFF22]", [
|
|
999
|
+
h.theme === "dark" ? "text-[#FFFFFF99] bg-[var(--bluevue-surface)]" : "text-black bg-white",
|
|
1000
1000
|
M(v) ? "opacity-100" : "opacity-0"
|
|
1001
1001
|
]])
|
|
1002
1002
|
}, [
|
|
1003
|
-
(a(!0), d(J, null, Z(
|
|
1004
|
-
key:
|
|
1003
|
+
(a(!0), d(J, null, Z(h.buttonsMenu, (T, G) => (a(), d("li", {
|
|
1004
|
+
key: T.name
|
|
1005
1005
|
}, [
|
|
1006
1006
|
i("button", {
|
|
1007
|
-
disabled:
|
|
1007
|
+
disabled: T.menuItemDisabled,
|
|
1008
1008
|
type: "button",
|
|
1009
|
-
class:
|
|
1010
|
-
G <
|
|
1011
|
-
|
|
1012
|
-
|
|
1009
|
+
class: y(["block w-full text-left whitespace-nowrap px-4 py-2 text-[14px]", [
|
|
1010
|
+
G < h.buttonsMenu.length - 1 ? "border-b border-white" : "",
|
|
1011
|
+
h.theme === "dark" ? "hover:bg-[#333333]" : "hover:bg-gray-100",
|
|
1012
|
+
T.menuItemDisabled ? "opacity-30 cursor-not-allowed" : "cursor-pointer"
|
|
1013
1013
|
]]),
|
|
1014
|
-
onClick: (Q) => ne(
|
|
1015
|
-
}, B(
|
|
1014
|
+
onClick: (Q) => ne(T)
|
|
1015
|
+
}, B(T.name), 11, ql)
|
|
1016
1016
|
]))), 128))
|
|
1017
1017
|
], 2)
|
|
1018
1018
|
], 44, gl)
|
|
@@ -1022,7 +1022,7 @@ const il = ["aria-describedby"], rl = ["id"], ie = /* @__PURE__ */ L({
|
|
|
1022
1022
|
], 512);
|
|
1023
1023
|
};
|
|
1024
1024
|
}
|
|
1025
|
-
}), $l = { class: "flex w-full items-center justify-between" }, Bl = ["for", "title"], Cl = { key: 1 },
|
|
1025
|
+
}), $l = { class: "flex w-full items-center justify-between" }, Bl = ["for", "title"], Cl = { key: 1 }, Tl = { class: "ml-auto flex shrink-0 items-center" }, Vl = ["id", "name", "checked", "disabled", "aria-checked"], Bo = /* @__PURE__ */ L({
|
|
1026
1026
|
__name: "BlueCheckbox",
|
|
1027
1027
|
props: {
|
|
1028
1028
|
modelValue: { type: [Boolean, null] },
|
|
@@ -1036,17 +1036,17 @@ const il = ["aria-describedby"], rl = ["id"], ie = /* @__PURE__ */ L({
|
|
|
1036
1036
|
},
|
|
1037
1037
|
emits: ["update:modelValue"],
|
|
1038
1038
|
setup(c, { emit: n }) {
|
|
1039
|
-
const e = c, t = n, o =
|
|
1039
|
+
const e = c, t = n, o = k(() => e.modelValue === !0), l = () => {
|
|
1040
1040
|
e.disabled || t("update:modelValue", e.indeterminate ? !0 : !o.value);
|
|
1041
1041
|
};
|
|
1042
1042
|
return (s, u) => (a(), d("div", $l, [
|
|
1043
1043
|
s.label ? (a(), d("label", {
|
|
1044
1044
|
key: 0,
|
|
1045
1045
|
for: s.name,
|
|
1046
|
-
class:
|
|
1046
|
+
class: y(["min-w-0 max-w-[45%] shrink-0 truncate text-start mr-6", [s.theme === "dark" ? "text-white" : "text-black", s.disabled ? "opacity-30" : "cursor-pointer"]]),
|
|
1047
1047
|
title: s.label
|
|
1048
1048
|
}, B(s.label), 11, Bl)) : (a(), d("div", Cl)),
|
|
1049
|
-
i("div",
|
|
1049
|
+
i("div", Tl, [
|
|
1050
1050
|
s.infoTooltip ? (a(), U(ie, {
|
|
1051
1051
|
key: 0,
|
|
1052
1052
|
text: s.infoTooltip,
|
|
@@ -1058,13 +1058,13 @@ const il = ["aria-describedby"], rl = ["id"], ie = /* @__PURE__ */ L({
|
|
|
1058
1058
|
name: "mdi-information-outline",
|
|
1059
1059
|
size: 16,
|
|
1060
1060
|
label: s.infoTooltip,
|
|
1061
|
-
class:
|
|
1061
|
+
class: y(["cursor-help", [s.disabled ? "opacity-30" : "opacity-60", s.theme === "dark" ? "text-white" : "text-black"]])
|
|
1062
1062
|
}, null, 8, ["label", "class"])
|
|
1063
1063
|
]),
|
|
1064
1064
|
_: 1
|
|
1065
1065
|
}, 8, ["text", "theme"])) : C("", !0),
|
|
1066
1066
|
i("label", {
|
|
1067
|
-
class:
|
|
1067
|
+
class: y(["relative inline-flex items-center", s.disabled ? "opacity-30" : "cursor-pointer"])
|
|
1068
1068
|
}, [
|
|
1069
1069
|
i("input", {
|
|
1070
1070
|
id: s.name,
|
|
@@ -1075,9 +1075,9 @@ const il = ["aria-describedby"], rl = ["id"], ie = /* @__PURE__ */ L({
|
|
|
1075
1075
|
disabled: s.disabled,
|
|
1076
1076
|
"aria-checked": s.indeterminate ? "mixed" : o.value,
|
|
1077
1077
|
onChange: l
|
|
1078
|
-
}, null, 40,
|
|
1078
|
+
}, null, 40, Vl),
|
|
1079
1079
|
i("span", {
|
|
1080
|
-
class:
|
|
1080
|
+
class: y(["bluevue-elevation-1 flex h-[18px] w-[18px] items-center justify-center rounded-[4px] border transition-colors peer-focus-visible:outline peer-focus-visible:outline-2 peer-focus-visible:outline-offset-2 peer-focus-visible:outline-[var(--bluevue-accent)]", [
|
|
1081
1081
|
o.value || s.indeterminate ? "border-transparent" : s.theme === "dark" ? "border-[#ffffff44] bg-[#00000022]" : "border-[#00000044] bg-white"
|
|
1082
1082
|
]]),
|
|
1083
1083
|
style: D({ backgroundColor: o.value || s.indeterminate ? s.color || "var(--bluevue-primary)" : void 0 })
|
|
@@ -1093,7 +1093,7 @@ const il = ["aria-describedby"], rl = ["id"], ie = /* @__PURE__ */ L({
|
|
|
1093
1093
|
])
|
|
1094
1094
|
]));
|
|
1095
1095
|
}
|
|
1096
|
-
}),
|
|
1096
|
+
}), Fl = { class: "min-w-0 truncate" }, _l = ["aria-label"], Ml = /* @__PURE__ */ L({
|
|
1097
1097
|
__name: "BlueChip",
|
|
1098
1098
|
props: {
|
|
1099
1099
|
label: {},
|
|
@@ -1111,13 +1111,13 @@ const il = ["aria-describedby"], rl = ["id"], ie = /* @__PURE__ */ L({
|
|
|
1111
1111
|
warning: "#FFB74D",
|
|
1112
1112
|
info: "#42A5F5",
|
|
1113
1113
|
neutral: "#90A4AE"
|
|
1114
|
-
}, t =
|
|
1114
|
+
}, t = k(() => e[n.color ?? "neutral"] ?? n.color ?? e.neutral), o = k(() => n.variant === "filled"), l = k(() => ({
|
|
1115
1115
|
color: o.value ? "#ffffff" : t.value,
|
|
1116
1116
|
backgroundColor: o.value ? t.value : n.variant === "outlined" ? "transparent" : `color-mix(in srgb, ${t.value} 18%, transparent)`,
|
|
1117
1117
|
borderColor: n.variant === "outlined" ? t.value : "transparent"
|
|
1118
1118
|
}));
|
|
1119
1119
|
return (s, u) => (a(), d("span", {
|
|
1120
|
-
class:
|
|
1120
|
+
class: y(["inline-flex max-w-full shrink-0 items-center gap-1 whitespace-nowrap rounded-full border", s.size === "small" ? "h-[18px] px-2 text-[11px]" : "h-[22px] px-[10px] text-[12px]"]),
|
|
1121
1121
|
style: D(l.value)
|
|
1122
1122
|
}, [
|
|
1123
1123
|
s.icon ? (a(), U(H, {
|
|
@@ -1125,7 +1125,7 @@ const il = ["aria-describedby"], rl = ["id"], ie = /* @__PURE__ */ L({
|
|
|
1125
1125
|
name: s.icon,
|
|
1126
1126
|
size: s.size === "small" ? 12 : 14
|
|
1127
1127
|
}, null, 8, ["name", "size"])) : C("", !0),
|
|
1128
|
-
i("span",
|
|
1128
|
+
i("span", Fl, [
|
|
1129
1129
|
j(s.$slots, "default", {}, () => [
|
|
1130
1130
|
oe(B(s.label), 1)
|
|
1131
1131
|
])
|
|
@@ -1141,7 +1141,7 @@ const il = ["aria-describedby"], rl = ["id"], ie = /* @__PURE__ */ L({
|
|
|
1141
1141
|
name: "mdi-close",
|
|
1142
1142
|
size: s.size === "small" ? 12 : 14
|
|
1143
1143
|
}, null, 8, ["size"])
|
|
1144
|
-
], 8,
|
|
1144
|
+
], 8, _l)) : C("", !0)
|
|
1145
1145
|
], 6));
|
|
1146
1146
|
}
|
|
1147
1147
|
}), Sl = {
|
|
@@ -1208,7 +1208,7 @@ const il = ["aria-describedby"], rl = ["id"], ie = /* @__PURE__ */ L({
|
|
|
1208
1208
|
_: 3
|
|
1209
1209
|
}, 8, ["model-value", "title", "icon", "icon-color"]));
|
|
1210
1210
|
}
|
|
1211
|
-
}), Rl = { class: "rounded-lg overflow-hidden" }, zl = { class: "flex-1 flex items-center" }, Dl = ["title"],
|
|
1211
|
+
}), Rl = { class: "rounded-lg overflow-hidden" }, zl = { class: "flex-1 flex items-center" }, Dl = ["title"], To = /* @__PURE__ */ L({
|
|
1212
1212
|
__name: "BlueExpansiblePanel",
|
|
1213
1213
|
props: {
|
|
1214
1214
|
title: {},
|
|
@@ -1233,18 +1233,18 @@ const il = ["aria-describedby"], rl = ["id"], ie = /* @__PURE__ */ L({
|
|
|
1233
1233
|
}, [
|
|
1234
1234
|
i("div", zl, [
|
|
1235
1235
|
i("div", {
|
|
1236
|
-
class:
|
|
1236
|
+
class: y(["flex-1 h-px", e.theme === "dark" ? "bg-[#ffffff22]" : "bg-[#00000033]"])
|
|
1237
1237
|
}, null, 2),
|
|
1238
1238
|
i("span", {
|
|
1239
|
-
class:
|
|
1239
|
+
class: y(["mx-3 min-w-0 truncate text-sm font-medium opacity-60", e.theme === "dark" ? "text-white" : "text-black"]),
|
|
1240
1240
|
title: s.title
|
|
1241
1241
|
}, B(s.title), 11, Dl),
|
|
1242
1242
|
i("div", {
|
|
1243
|
-
class:
|
|
1243
|
+
class: y(["flex-1 h-px", e.theme === "dark" ? "bg-[#ffffff11]" : "bg-[#00000033]"])
|
|
1244
1244
|
}, null, 2)
|
|
1245
1245
|
]),
|
|
1246
1246
|
i("span", {
|
|
1247
|
-
class:
|
|
1247
|
+
class: y(["mdi ml-3 text-[24px] leading-none opacity-40", [
|
|
1248
1248
|
o.value ? "mdi-menu-up" : "mdi-menu-down",
|
|
1249
1249
|
e.theme === "dark" ? "text-white" : "text-black"
|
|
1250
1250
|
]])
|
|
@@ -1252,8 +1252,8 @@ const il = ["aria-describedby"], rl = ["id"], ie = /* @__PURE__ */ L({
|
|
|
1252
1252
|
]),
|
|
1253
1253
|
O(pt, { name: "bluevue-expand" }, {
|
|
1254
1254
|
default: N(() => [
|
|
1255
|
-
|
|
1256
|
-
class:
|
|
1255
|
+
Ve(i("div", {
|
|
1256
|
+
class: y(["px-13 my-6 pb-2", e.theme === "dark" ? "border-[#555555]" : "border-[#dddddd]"])
|
|
1257
1257
|
}, [
|
|
1258
1258
|
j(s.$slots, "default")
|
|
1259
1259
|
], 2), [
|
|
@@ -1267,7 +1267,7 @@ const il = ["aria-describedby"], rl = ["id"], ie = /* @__PURE__ */ L({
|
|
|
1267
1267
|
}), Ll = { class: "text-[13px]" }, Pl = {
|
|
1268
1268
|
key: 0,
|
|
1269
1269
|
class: "text-[11px] opacity-60"
|
|
1270
|
-
}, Il = ["accept", "multiple"],
|
|
1270
|
+
}, Il = ["accept", "multiple"], Vo = /* @__PURE__ */ L({
|
|
1271
1271
|
__name: "BlueFileDrop",
|
|
1272
1272
|
props: {
|
|
1273
1273
|
accept: {},
|
|
@@ -1289,17 +1289,17 @@ const il = ["aria-describedby"], rl = ["id"], ie = /* @__PURE__ */ L({
|
|
|
1289
1289
|
u(x.files), x.value = "";
|
|
1290
1290
|
};
|
|
1291
1291
|
return (f, x) => (a(), d("div", {
|
|
1292
|
-
class:
|
|
1292
|
+
class: y(["w-full", f.disabled ? "pointer-events-none opacity-30" : ""])
|
|
1293
1293
|
}, [
|
|
1294
1294
|
i("button", {
|
|
1295
1295
|
type: "button",
|
|
1296
|
-
class:
|
|
1296
|
+
class: y(["flex w-full cursor-pointer flex-col items-center justify-center gap-1 rounded-[8px] border border-dashed px-4 py-6 text-center transition-colors", [
|
|
1297
1297
|
l.value ? "border-[var(--bluevue-accent)] bg-[var(--bluevue-accent)]/10" : f.theme === "light" ? "border-[#00000033] hover:bg-[#00000006]" : "border-[#ffffff33] hover:bg-[#ffffff08]",
|
|
1298
1298
|
f.theme === "light" ? "text-black" : "text-white"
|
|
1299
1299
|
]]),
|
|
1300
1300
|
onClick: x[0] || (x[0] = (p) => {
|
|
1301
|
-
var
|
|
1302
|
-
return (
|
|
1301
|
+
var _;
|
|
1302
|
+
return (_ = o.value) == null ? void 0 : _.click();
|
|
1303
1303
|
}),
|
|
1304
1304
|
onDragenter: x[1] || (x[1] = ae((p) => {
|
|
1305
1305
|
s.value += 1, l.value = !0;
|
|
@@ -1361,7 +1361,7 @@ const il = ["aria-describedby"], rl = ["id"], ie = /* @__PURE__ */ L({
|
|
|
1361
1361
|
},
|
|
1362
1362
|
emits: ["update:modelValue"],
|
|
1363
1363
|
setup(c, { emit: n }) {
|
|
1364
|
-
const e = c, t = n, o =
|
|
1364
|
+
const e = c, t = n, o = k(() => e.errorMessages && e.errorMessages.length > 0), l = k(() => /^[°′″'"]+$/.test(e.suffix ?? "")), s = k(() => e.theme === "dark" ? "#FFFFFF11" : "#00000011"), u = /^-?\d*\.?\d*$/, r = (m) => m == null ? "" : String(m), v = q(r(e.modelValue)), f = q(null), x = q(!1);
|
|
1365
1365
|
pe(() => {
|
|
1366
1366
|
var m;
|
|
1367
1367
|
e.autofocus && ((m = f.value) == null || m.focus());
|
|
@@ -1369,27 +1369,27 @@ const il = ["aria-describedby"], rl = ["id"], ie = /* @__PURE__ */ L({
|
|
|
1369
1369
|
const p = (m) => {
|
|
1370
1370
|
if (e.type !== "number") return m;
|
|
1371
1371
|
if (m.trim() === "") return null;
|
|
1372
|
-
const
|
|
1373
|
-
return Number.isFinite(
|
|
1374
|
-
},
|
|
1375
|
-
const
|
|
1376
|
-
return e.max !== void 0 ? Math.min(
|
|
1372
|
+
const V = Number(m);
|
|
1373
|
+
return Number.isFinite(V) ? V : null;
|
|
1374
|
+
}, _ = (m) => {
|
|
1375
|
+
const V = e.min !== void 0 ? Math.max(m, e.min) : m;
|
|
1376
|
+
return e.max !== void 0 ? Math.min(V, e.max) : V;
|
|
1377
1377
|
}, $ = (m) => {
|
|
1378
|
-
const
|
|
1379
|
-
if (e.type === "number" && !u.test(
|
|
1380
|
-
|
|
1378
|
+
const V = m.target;
|
|
1379
|
+
if (e.type === "number" && !u.test(V.value)) {
|
|
1380
|
+
V.value = v.value;
|
|
1381
1381
|
return;
|
|
1382
1382
|
}
|
|
1383
|
-
v.value =
|
|
1383
|
+
v.value = V.value;
|
|
1384
1384
|
const E = p(v.value);
|
|
1385
1385
|
E === null && e.type === "number" || t("update:modelValue", E);
|
|
1386
|
-
},
|
|
1386
|
+
}, F = (m) => {
|
|
1387
1387
|
if (e.type !== "number" || e.disabled) return;
|
|
1388
|
-
const
|
|
1388
|
+
const V = e.step ?? 1, E = typeof e.modelValue == "number" ? e.modelValue : Number(v.value) || 0, w = (String(V).split(".")[1] ?? "").length, A = _(Number((E + m * V).toFixed(w)));
|
|
1389
1389
|
v.value = String(A), t("update:modelValue", A);
|
|
1390
1390
|
}, R = () => {
|
|
1391
1391
|
if (e.type === "number" && typeof e.modelValue == "number") {
|
|
1392
|
-
const m =
|
|
1392
|
+
const m = _(e.modelValue);
|
|
1393
1393
|
if (m !== e.modelValue) {
|
|
1394
1394
|
t("update:modelValue", m), v.value = String(m);
|
|
1395
1395
|
return;
|
|
@@ -1404,13 +1404,13 @@ const il = ["aria-describedby"], rl = ["id"], ie = /* @__PURE__ */ L({
|
|
|
1404
1404
|
(m) => {
|
|
1405
1405
|
p(v.value) !== m && (v.value = r(m));
|
|
1406
1406
|
}
|
|
1407
|
-
), (m,
|
|
1407
|
+
), (m, V) => {
|
|
1408
1408
|
var E;
|
|
1409
1409
|
return a(), d("div", El, [
|
|
1410
1410
|
m.label ? (a(), d("div", Al, [
|
|
1411
1411
|
i("label", {
|
|
1412
1412
|
for: m.name,
|
|
1413
|
-
class:
|
|
1413
|
+
class: y(["block truncate text-start mr-6", [m.theme === "dark" ? "text-white" : "text-black", m.disabled ? "opacity-30" : ""]]),
|
|
1414
1414
|
title: m.label
|
|
1415
1415
|
}, B(m.label), 11, jl)
|
|
1416
1416
|
])) : (a(), d("div", Ol)),
|
|
@@ -1426,14 +1426,14 @@ const il = ["aria-describedby"], rl = ["id"], ie = /* @__PURE__ */ L({
|
|
|
1426
1426
|
name: "mdi-information-outline",
|
|
1427
1427
|
size: 16,
|
|
1428
1428
|
label: m.infoTooltip,
|
|
1429
|
-
class:
|
|
1429
|
+
class: y(["cursor-help", [m.disabled ? "opacity-30" : "opacity-60", m.theme === "dark" ? "text-white" : "text-black"]])
|
|
1430
1430
|
}, null, 8, ["label", "class"])
|
|
1431
1431
|
]),
|
|
1432
1432
|
_: 1
|
|
1433
1433
|
}, 8, ["text", "theme"])) : C("", !0),
|
|
1434
1434
|
i("div", Nl, [
|
|
1435
1435
|
i("div", {
|
|
1436
|
-
class:
|
|
1436
|
+
class: y(["relative flex items-center rounded-[6px] bluevue-inset-1 min-w-[90px] max-w-full", [
|
|
1437
1437
|
m.disabled ? "opacity-30 pointer-events-none" : "",
|
|
1438
1438
|
o.value ? "border-2 border-solid border-[var(--bluevue-error)]" : ""
|
|
1439
1439
|
]]),
|
|
@@ -1458,23 +1458,23 @@ const il = ["aria-describedby"], rl = ["id"], ie = /* @__PURE__ */ L({
|
|
|
1458
1458
|
disabled: m.disabled,
|
|
1459
1459
|
autofocus: m.autofocus,
|
|
1460
1460
|
inputmode: m.type === "number" ? "decimal" : void 0,
|
|
1461
|
-
class:
|
|
1461
|
+
class: y(["w-full min-w-0 bg-transparent text-sm font-medium outline-none", [
|
|
1462
1462
|
m.$slots.prepend ? "pl-1" : "pl-4",
|
|
1463
1463
|
m.suffix ? "pr-1" : "pr-4",
|
|
1464
1464
|
m.theme === "dark" ? "text-white placeholder:text-[#ffffff44]" : "text-black placeholder:text-[#00000055]"
|
|
1465
1465
|
]]),
|
|
1466
1466
|
onInput: $,
|
|
1467
1467
|
onKeydown: [
|
|
1468
|
-
|
|
1469
|
-
|
|
1468
|
+
V[0] || (V[0] = de(ae((w) => F(1), ["prevent"]), ["up"])),
|
|
1469
|
+
V[1] || (V[1] = de(ae((w) => F(-1), ["prevent"]), ["down"])),
|
|
1470
1470
|
de(R, ["enter"])
|
|
1471
1471
|
],
|
|
1472
|
-
onFocus:
|
|
1472
|
+
onFocus: V[2] || (V[2] = (w) => x.value = !0),
|
|
1473
1473
|
onBlur: P
|
|
1474
1474
|
}, null, 42, Ul),
|
|
1475
1475
|
m.suffix ? (a(), d("span", {
|
|
1476
1476
|
key: 1,
|
|
1477
|
-
class:
|
|
1477
|
+
class: y(["shrink-0 pr-4 pl-1 text-sm select-none", [
|
|
1478
1478
|
m.theme === "dark" ? "text-[#ffffff66]" : "text-[#00000066]",
|
|
1479
1479
|
l.value ? "translate-y-[0.22em]" : ""
|
|
1480
1480
|
]])
|
|
@@ -1500,9 +1500,9 @@ const il = ["aria-describedby"], rl = ["id"], ie = /* @__PURE__ */ L({
|
|
|
1500
1500
|
label: {}
|
|
1501
1501
|
},
|
|
1502
1502
|
setup(c) {
|
|
1503
|
-
const n = c, e =
|
|
1503
|
+
const n = c, e = k(() => Math.min(100, Math.max(0, n.modelValue ?? 0)));
|
|
1504
1504
|
return (t, o) => (a(), d("div", {
|
|
1505
|
-
class:
|
|
1505
|
+
class: y(["bluevue-progress w-full overflow-hidden rounded-full", t.theme === "light" ? "bg-[#00000022]" : "bg-[#ffffff1a]"]),
|
|
1506
1506
|
style: D({ height: `${t.height ?? 4}px` }),
|
|
1507
1507
|
role: "progressbar",
|
|
1508
1508
|
"aria-label": t.label,
|
|
@@ -1511,7 +1511,7 @@ const il = ["aria-describedby"], rl = ["id"], ie = /* @__PURE__ */ L({
|
|
|
1511
1511
|
"aria-valuemax": "100"
|
|
1512
1512
|
}, [
|
|
1513
1513
|
i("div", {
|
|
1514
|
-
class:
|
|
1514
|
+
class: y(["h-full rounded-full", t.indeterminate ? "bluevue-progress__sweep" : "transition-[width] duration-200 ease-out"]),
|
|
1515
1515
|
style: D({
|
|
1516
1516
|
width: t.indeterminate ? void 0 : `${e.value}%`,
|
|
1517
1517
|
backgroundColor: t.color || "var(--bluevue-primary)"
|
|
@@ -1527,7 +1527,7 @@ const il = ["aria-describedby"], rl = ["id"], ie = /* @__PURE__ */ L({
|
|
|
1527
1527
|
], t2 = { class: "flex w-[84px] shrink-0 flex-col items-center gap-1" }, l2 = ["title"], o2 = {
|
|
1528
1528
|
key: 0,
|
|
1529
1529
|
class: "mt-4 border-t border-[#ffffff0d] pt-4"
|
|
1530
|
-
}, n2 = { class: "mb-2 flex items-baseline justify-between" }, s2 = { class: "truncate text-xs text-[#ffffffcc]" }, a2 = { class: "flex shrink-0 gap-2 pl-3" }, We = 22,
|
|
1530
|
+
}, n2 = { class: "mb-2 flex items-baseline justify-between" }, s2 = { class: "truncate text-xs text-[#ffffffcc]" }, a2 = { class: "flex shrink-0 gap-2 pl-3" }, We = 22, Fo = /* @__PURE__ */ L({
|
|
1531
1531
|
__name: "BlueStepsDialog",
|
|
1532
1532
|
props: {
|
|
1533
1533
|
modelValue: { type: Boolean },
|
|
@@ -1551,7 +1551,7 @@ const il = ["aria-describedby"], rl = ["id"], ie = /* @__PURE__ */ L({
|
|
|
1551
1551
|
running: { icon: "mdi-cog-sync", color: "#42A5F5" },
|
|
1552
1552
|
failed: { icon: "mdi-alert-circle", color: "#EF5350" },
|
|
1553
1553
|
done: { icon: "mdi-check-circle", color: "#66BB6A" }
|
|
1554
|
-
}, u =
|
|
1554
|
+
}, u = k(() => s[e.state]), r = k(() => e.progress !== void 0 || e.indeterminate || !!o.log), v = q(null);
|
|
1555
1555
|
let f = null;
|
|
1556
1556
|
const x = () => {
|
|
1557
1557
|
const p = v.value;
|
|
@@ -1559,12 +1559,12 @@ const il = ["aria-describedby"], rl = ["id"], ie = /* @__PURE__ */ L({
|
|
|
1559
1559
|
};
|
|
1560
1560
|
return X(v, (p) => {
|
|
1561
1561
|
f == null || f.disconnect(), f = null, p && (f = new MutationObserver(x), f.observe(p, { childList: !0, subtree: !0, characterData: !0 }));
|
|
1562
|
-
}), me(() => f == null ? void 0 : f.disconnect()), (p,
|
|
1562
|
+
}), me(() => f == null ? void 0 : f.disconnect()), (p, _) => (a(), U($e, {
|
|
1563
1563
|
"model-value": p.modelValue,
|
|
1564
1564
|
persistent: p.state === "running",
|
|
1565
1565
|
width: "620px",
|
|
1566
1566
|
"body-class": "px-5 pb-4 pt-3",
|
|
1567
|
-
"onUpdate:modelValue":
|
|
1567
|
+
"onUpdate:modelValue": _[0] || (_[0] = ($) => t("update:modelValue", $))
|
|
1568
1568
|
}, Ge({
|
|
1569
1569
|
header: N(() => [
|
|
1570
1570
|
O(H, {
|
|
@@ -1580,10 +1580,10 @@ const il = ["aria-describedby"], rl = ["id"], ie = /* @__PURE__ */ L({
|
|
|
1580
1580
|
]),
|
|
1581
1581
|
default: N(() => [
|
|
1582
1582
|
i("div", Zl, [
|
|
1583
|
-
(a(!0), d(J, null, Z(p.steps, ($,
|
|
1583
|
+
(a(!0), d(J, null, Z(p.steps, ($, F) => (a(), d(J, {
|
|
1584
1584
|
key: $.key
|
|
1585
1585
|
}, [
|
|
1586
|
-
|
|
1586
|
+
F ? (a(), d("div", {
|
|
1587
1587
|
key: 0,
|
|
1588
1588
|
class: "flex flex-1 items-center",
|
|
1589
1589
|
style: D({ height: `${We}px` })
|
|
@@ -1595,7 +1595,7 @@ const il = ["aria-describedby"], rl = ["id"], ie = /* @__PURE__ */ L({
|
|
|
1595
1595
|
color: l[$.state].color
|
|
1596
1596
|
}, null, 8, ["name", "color"]),
|
|
1597
1597
|
i("span", {
|
|
1598
|
-
class:
|
|
1598
|
+
class: y(["w-full truncate text-center text-[10px] leading-tight", $.state === "running" ? "text-white" : "text-[#ffffff77]"]),
|
|
1599
1599
|
title: $.detail || $.title
|
|
1600
1600
|
}, B($.title), 11, l2)
|
|
1601
1601
|
])
|
|
@@ -1641,7 +1641,7 @@ const il = ["aria-describedby"], rl = ["id"], ie = /* @__PURE__ */ L({
|
|
|
1641
1641
|
}, u2 = ["disabled", "onClick"], c2 = { class: "min-w-0" }, d2 = { class: "block text-[13px] leading-snug" }, p2 = {
|
|
1642
1642
|
key: 0,
|
|
1643
1643
|
class: "block text-[10px] text-[#ffffff66]"
|
|
1644
|
-
},
|
|
1644
|
+
}, _o = /* @__PURE__ */ L({
|
|
1645
1645
|
__name: "BlueMenu",
|
|
1646
1646
|
props: {
|
|
1647
1647
|
modelValue: { type: Boolean },
|
|
@@ -1660,26 +1660,26 @@ const il = ["aria-describedby"], rl = ["id"], ie = /* @__PURE__ */ L({
|
|
|
1660
1660
|
floatingStyles: f,
|
|
1661
1661
|
show: x,
|
|
1662
1662
|
hide: p,
|
|
1663
|
-
onToggle:
|
|
1663
|
+
onToggle: _
|
|
1664
1664
|
} = ye();
|
|
1665
|
-
X(r, (
|
|
1665
|
+
X(r, (F) => t("update:modelValue", F)), X(
|
|
1666
1666
|
() => [e.modelValue, e.target],
|
|
1667
|
-
([
|
|
1668
|
-
|
|
1667
|
+
([F, R]) => {
|
|
1668
|
+
F ? x(R) : p();
|
|
1669
1669
|
},
|
|
1670
1670
|
{ immediate: !0 }
|
|
1671
1671
|
);
|
|
1672
|
-
function $(
|
|
1673
|
-
p(),
|
|
1672
|
+
function $(F) {
|
|
1673
|
+
p(), F.action();
|
|
1674
1674
|
}
|
|
1675
|
-
return (
|
|
1676
|
-
|
|
1675
|
+
return (F, R) => (a(), d(J, null, [
|
|
1676
|
+
F.target ? C("", !0) : (a(), d("span", {
|
|
1677
1677
|
key: 0,
|
|
1678
1678
|
ref_key: "anchorRef",
|
|
1679
1679
|
ref: o,
|
|
1680
1680
|
class: "inline-flex"
|
|
1681
1681
|
}, [
|
|
1682
|
-
j(
|
|
1682
|
+
j(F.$slots, "activator", { props: M(u) })
|
|
1683
1683
|
], 512)),
|
|
1684
1684
|
i("div", {
|
|
1685
1685
|
id: M(s),
|
|
@@ -1689,26 +1689,26 @@ const il = ["aria-describedby"], rl = ["id"], ie = /* @__PURE__ */ L({
|
|
|
1689
1689
|
class: "bluevue-popover",
|
|
1690
1690
|
style: D(M(f)),
|
|
1691
1691
|
onToggle: R[0] || (R[0] = //@ts-ignore
|
|
1692
|
-
(...P) => M(
|
|
1692
|
+
(...P) => M(_) && M(_)(...P))
|
|
1693
1693
|
}, [
|
|
1694
1694
|
i("ul", {
|
|
1695
|
-
class:
|
|
1695
|
+
class: y(["bluevue-elevation-5 min-w-[220px] max-h-[60vh] overflow-y-auto rounded-[4px] border border-[#ffffff1a] bg-[#2d2d2d]", M(v) ? "opacity-100" : "opacity-0"])
|
|
1696
1696
|
}, [
|
|
1697
|
-
(a(!0), d(J, null, Z(
|
|
1697
|
+
(a(!0), d(J, null, Z(F.items, (P, m) => (a(), d("li", {
|
|
1698
1698
|
key: P.title
|
|
1699
1699
|
}, [
|
|
1700
1700
|
m ? (a(), d("div", r2)) : C("", !0),
|
|
1701
1701
|
i("button", {
|
|
1702
1702
|
type: "button",
|
|
1703
1703
|
disabled: P.disabled,
|
|
1704
|
-
class:
|
|
1704
|
+
class: y(["flex w-full items-start gap-3 px-4 py-2 text-left", [
|
|
1705
1705
|
P.danger ? "text-[#ff6b6b]" : "text-white",
|
|
1706
1706
|
P.disabled ? "cursor-not-allowed opacity-30" : "cursor-pointer hover:bg-[#ffffff11]"
|
|
1707
1707
|
]]),
|
|
1708
|
-
onClick: (
|
|
1708
|
+
onClick: (V) => $(P)
|
|
1709
1709
|
}, [
|
|
1710
1710
|
i("span", {
|
|
1711
|
-
class:
|
|
1711
|
+
class: y(["mdi shrink-0 mt-[2px] text-[18px] leading-none", P.icon])
|
|
1712
1712
|
}, null, 2),
|
|
1713
1713
|
i("span", c2, [
|
|
1714
1714
|
i("span", d2, B(P.title), 1),
|
|
@@ -1827,18 +1827,18 @@ const il = ["aria-describedby"], rl = ["id"], ie = /* @__PURE__ */ L({
|
|
|
1827
1827
|
setup(c, { emit: n }) {
|
|
1828
1828
|
const e = n;
|
|
1829
1829
|
return (t, o) => (a(), d("fieldset", {
|
|
1830
|
-
class:
|
|
1830
|
+
class: y(["w-full min-w-0", t.disabled ? "opacity-30" : ""])
|
|
1831
1831
|
}, [
|
|
1832
1832
|
t.label ? (a(), d("legend", {
|
|
1833
1833
|
key: 0,
|
|
1834
|
-
class:
|
|
1834
|
+
class: y(["mb-2 text-[13px]", t.theme === "dark" ? "text-white" : "text-black"])
|
|
1835
1835
|
}, B(t.label), 3)) : C("", !0),
|
|
1836
1836
|
i("div", {
|
|
1837
|
-
class:
|
|
1837
|
+
class: y(["flex", t.inline ? "flex-wrap items-center gap-x-5 gap-y-2" : "flex-col gap-2"])
|
|
1838
1838
|
}, [
|
|
1839
1839
|
(a(!0), d(J, null, Z(t.items, (l) => (a(), d("label", {
|
|
1840
1840
|
key: l.value,
|
|
1841
|
-
class:
|
|
1841
|
+
class: y(["flex items-center gap-2", [
|
|
1842
1842
|
t.disabled || l.disabled ? "cursor-not-allowed opacity-30" : "cursor-pointer",
|
|
1843
1843
|
t.theme === "dark" ? "text-white" : "text-black"
|
|
1844
1844
|
]])
|
|
@@ -1853,7 +1853,7 @@ const il = ["aria-describedby"], rl = ["id"], ie = /* @__PURE__ */ L({
|
|
|
1853
1853
|
onChange: (s) => e("update:modelValue", l.value)
|
|
1854
1854
|
}, null, 40, f2),
|
|
1855
1855
|
i("span", {
|
|
1856
|
-
class:
|
|
1856
|
+
class: y(["flex h-[16px] w-[16px] shrink-0 items-center justify-center rounded-full border transition-colors peer-focus-visible:outline peer-focus-visible:outline-2 peer-focus-visible:outline-offset-2 peer-focus-visible:outline-[var(--bluevue-accent)]", t.modelValue === l.value ? "border-[var(--bluevue-primary)]" : t.theme === "dark" ? "border-[#ffffff44]" : "border-[#00000044]"])
|
|
1857
1857
|
}, [
|
|
1858
1858
|
t.modelValue === l.value ? (a(), d("span", v2)) : C("", !0)
|
|
1859
1859
|
], 2),
|
|
@@ -1909,7 +1909,7 @@ const il = ["aria-describedby"], rl = ["id"], ie = /* @__PURE__ */ L({
|
|
|
1909
1909
|
}, k2 = ["title"], x2 = { key: 1 }, $2 = { class: "flex flex-col items-end min-w-0 shrink-[1000]" }, B2 = ["disabled"], C2 = {
|
|
1910
1910
|
key: 0,
|
|
1911
1911
|
class: "text-[14px] text-[var(--bluevue-error)]"
|
|
1912
|
-
},
|
|
1912
|
+
}, T2 = ["id"], V2 = ["disabled", "onClick"], zo = /* @__PURE__ */ L({
|
|
1913
1913
|
__name: "BlueSelect",
|
|
1914
1914
|
props: {
|
|
1915
1915
|
items: {},
|
|
@@ -1933,57 +1933,57 @@ const il = ["aria-describedby"], rl = ["id"], ie = /* @__PURE__ */ L({
|
|
|
1933
1933
|
isOpen: f,
|
|
1934
1934
|
isPositioned: x,
|
|
1935
1935
|
floatingStyles: p,
|
|
1936
|
-
hide:
|
|
1936
|
+
hide: _,
|
|
1937
1937
|
onToggle: $
|
|
1938
|
-
} = ye({ matchAnchorWidth: !0 }),
|
|
1938
|
+
} = ye({ matchAnchorWidth: !0 }), F = k(
|
|
1939
1939
|
() => e.errorMessages && e.errorMessages.length > 0
|
|
1940
|
-
), R =
|
|
1940
|
+
), R = k(() => e.theme === "dark" ? "#FFFFFF05" : "#00000011"), P = (w) => {
|
|
1941
1941
|
if (e.multiSelect) {
|
|
1942
|
-
const A = e.items[
|
|
1942
|
+
const A = e.items[w].value || e.items[w].name, K = o.value.indexOf(A);
|
|
1943
1943
|
K > -1 ? o.value.splice(K, 1) : o.value.push(A), t("update:modelValue", o.value);
|
|
1944
1944
|
} else {
|
|
1945
|
-
const A = e.items[
|
|
1946
|
-
l.value = e.items[
|
|
1945
|
+
const A = e.items[w].value || e.items[w].name;
|
|
1946
|
+
l.value = e.items[w], t("update:modelValue", A), _();
|
|
1947
1947
|
}
|
|
1948
|
-
}, m =
|
|
1949
|
-
function E(
|
|
1950
|
-
return
|
|
1948
|
+
}, m = k(() => e.theme === "dark" ? "text-white" : "text-black"), V = k(() => e.theme === "dark" ? "text-white" : "text-black");
|
|
1949
|
+
function E(w) {
|
|
1950
|
+
return w.disabled || e.disabled ? "text-gray-500" : e.theme === "dark" ? "text-white" : "text-black";
|
|
1951
1951
|
}
|
|
1952
1952
|
return X(
|
|
1953
1953
|
() => e.modelValue,
|
|
1954
|
-
(
|
|
1954
|
+
(w) => {
|
|
1955
1955
|
if (e.multiSelect)
|
|
1956
|
-
Array.isArray(
|
|
1956
|
+
Array.isArray(w) && (o.value = w);
|
|
1957
1957
|
else {
|
|
1958
1958
|
const A = e.items.find(
|
|
1959
|
-
(K) => K.value !== void 0 ? K.value ===
|
|
1959
|
+
(K) => K.value !== void 0 ? K.value === w : K.name === w
|
|
1960
1960
|
);
|
|
1961
1961
|
l.value = A ?? { name: "Select..." };
|
|
1962
1962
|
}
|
|
1963
1963
|
},
|
|
1964
1964
|
{ immediate: !0 }
|
|
1965
|
-
), (
|
|
1965
|
+
), (w, A) => {
|
|
1966
1966
|
var K;
|
|
1967
1967
|
return a(), d("div", q2, [
|
|
1968
|
-
|
|
1968
|
+
w.label ? (a(), d("div", w2, [
|
|
1969
1969
|
i("label", {
|
|
1970
|
-
class:
|
|
1971
|
-
title:
|
|
1972
|
-
}, B(
|
|
1970
|
+
class: y(["block truncate text-start mr-6", [w.theme === "dark" ? "text-white" : "text-black", w.disabled ? "opacity-30" : ""]]),
|
|
1971
|
+
title: w.label
|
|
1972
|
+
}, B(w.label), 11, k2)
|
|
1973
1973
|
])) : (a(), d("div", x2)),
|
|
1974
|
-
j(
|
|
1975
|
-
|
|
1974
|
+
j(w.$slots, "insetElement"),
|
|
1975
|
+
w.infoTooltip ? (a(), U(ie, {
|
|
1976
1976
|
key: 2,
|
|
1977
|
-
text:
|
|
1978
|
-
theme:
|
|
1977
|
+
text: w.infoTooltip,
|
|
1978
|
+
theme: w.theme,
|
|
1979
1979
|
class: "items-center shrink-0 mr-2 ml-auto"
|
|
1980
1980
|
}, {
|
|
1981
1981
|
default: N(() => [
|
|
1982
1982
|
O(H, {
|
|
1983
1983
|
name: "mdi-information-outline",
|
|
1984
1984
|
size: 16,
|
|
1985
|
-
label:
|
|
1986
|
-
class:
|
|
1985
|
+
label: w.infoTooltip,
|
|
1986
|
+
class: y(["cursor-help", [w.disabled ? "opacity-30" : "opacity-60", w.theme === "dark" ? "text-white" : "text-black"]])
|
|
1987
1987
|
}, null, 8, ["label", "class"])
|
|
1988
1988
|
]),
|
|
1989
1989
|
_: 1
|
|
@@ -1994,21 +1994,21 @@ const il = ["aria-describedby"], rl = ["id"], ie = /* @__PURE__ */ L({
|
|
|
1994
1994
|
ref: s
|
|
1995
1995
|
}, M(v), {
|
|
1996
1996
|
type: "button",
|
|
1997
|
-
disabled:
|
|
1997
|
+
disabled: w.disabled,
|
|
1998
1998
|
class: ["relative inline-flex items-center justify-between pl-4 rounded-[6px] bluevue-elevation-1 min-w-[90px] max-w-full", [
|
|
1999
|
-
|
|
2000
|
-
|
|
1999
|
+
w.disabled ? "opacity-30" : "cursor-pointer",
|
|
2000
|
+
F.value ? "border-2 border-solid border-[var(--bluevue-error)]" : ""
|
|
2001
2001
|
]],
|
|
2002
|
-
style: { height:
|
|
2002
|
+
style: { height: w.height || "30px", width: w.width || "auto", backgroundColor: R.value }
|
|
2003
2003
|
}), [
|
|
2004
2004
|
i("span", {
|
|
2005
|
-
class:
|
|
2006
|
-
}, B(
|
|
2005
|
+
class: y(["text-sm font-medium truncate min-w-0 mr-1 -mb-[1px]", V.value])
|
|
2006
|
+
}, B(w.multiSelect ? o.value.length > 0 ? o.value.join(", ") : "Select..." : l.value.name), 3),
|
|
2007
2007
|
i("span", {
|
|
2008
|
-
class:
|
|
2008
|
+
class: y(["mdi mdi-menu-down text-[24px] leading-none shrink-0 transition-transform", [m.value, M(f) ? "rotate-180" : ""]])
|
|
2009
2009
|
}, null, 2)
|
|
2010
2010
|
], 16, B2),
|
|
2011
|
-
|
|
2011
|
+
F.value ? (a(), d("div", C2, B(((K = w.errorMessages) == null ? void 0 : K[0]) || ""), 1)) : C("", !0)
|
|
2012
2012
|
]),
|
|
2013
2013
|
i("div", {
|
|
2014
2014
|
id: M(r),
|
|
@@ -2021,35 +2021,35 @@ const il = ["aria-describedby"], rl = ["id"], ie = /* @__PURE__ */ L({
|
|
|
2021
2021
|
(...Y) => M($) && M($)(...Y))
|
|
2022
2022
|
}, [
|
|
2023
2023
|
i("ul", {
|
|
2024
|
-
class:
|
|
2025
|
-
|
|
2024
|
+
class: y(["bluevue-elevation-5 max-h-[60vh] overflow-y-auto rounded-[4px] border border-[#FFFFFF22]", [
|
|
2025
|
+
w.theme === "dark" ? "bg-[var(--bluevue-surface)]" : "bg-white",
|
|
2026
2026
|
M(x) ? "opacity-100" : "opacity-0"
|
|
2027
2027
|
]])
|
|
2028
2028
|
}, [
|
|
2029
|
-
(a(!0), d(J, null, Z(
|
|
2029
|
+
(a(!0), d(J, null, Z(w.items, (Y, te) => (a(), d("li", {
|
|
2030
2030
|
key: Y.name
|
|
2031
2031
|
}, [
|
|
2032
2032
|
i("button", {
|
|
2033
2033
|
type: "button",
|
|
2034
|
-
disabled:
|
|
2035
|
-
class:
|
|
2034
|
+
disabled: w.disabled || Y.disabled,
|
|
2035
|
+
class: y(["flex w-full items-center justify-between gap-2 whitespace-nowrap px-4 py-2 text-left text-sm", [
|
|
2036
2036
|
E(Y),
|
|
2037
|
-
|
|
2037
|
+
w.disabled || Y.disabled ? "cursor-not-allowed" : w.theme === "dark" ? "cursor-pointer hover:bg-[#ffffff11]" : "cursor-pointer hover:bg-gray-100"
|
|
2038
2038
|
]]),
|
|
2039
2039
|
onClick: (ee) => P(te)
|
|
2040
2040
|
}, [
|
|
2041
2041
|
i("span", {
|
|
2042
|
-
class:
|
|
2042
|
+
class: y(["mdi mdi-check text-[16px] leading-none", o.value.includes(Y.value || Y.name) ? "" : "invisible"])
|
|
2043
2043
|
}, null, 2),
|
|
2044
2044
|
oe(" " + B(Y.name), 1)
|
|
2045
|
-
], 10,
|
|
2045
|
+
], 10, V2)
|
|
2046
2046
|
]))), 128))
|
|
2047
2047
|
], 2)
|
|
2048
|
-
], 44,
|
|
2048
|
+
], 44, T2)
|
|
2049
2049
|
]);
|
|
2050
2050
|
};
|
|
2051
2051
|
}
|
|
2052
|
-
}),
|
|
2052
|
+
}), F2 = { class: "flex w-full justify-between items-center" }, _2 = {
|
|
2053
2053
|
key: 0,
|
|
2054
2054
|
class: "min-w-0 max-w-[45%] shrink-0"
|
|
2055
2055
|
}, M2 = ["title"], S2 = { class: "flex w-1/2 min-w-0 items-center justify-between" }, R2 = { class: "absolute inset-x-[18%] top-1/2 -translate-y-1/2 flex justify-between pointer-events-none" }, z2 = { key: 0 }, D2 = {
|
|
@@ -2078,64 +2078,64 @@ const il = ["aria-describedby"], rl = ["id"], ie = /* @__PURE__ */ L({
|
|
|
2078
2078
|
},
|
|
2079
2079
|
emits: ["update:modelValue"],
|
|
2080
2080
|
setup(c, { emit: n }) {
|
|
2081
|
-
const e = c, t = n, o = (
|
|
2082
|
-
if (!Number.isFinite(
|
|
2083
|
-
const z =
|
|
2081
|
+
const e = c, t = n, o = (b) => {
|
|
2082
|
+
if (!Number.isFinite(b) || b <= 0) return 0;
|
|
2083
|
+
const z = b.toString();
|
|
2084
2084
|
if (z.includes("e-")) {
|
|
2085
2085
|
const ge = parseInt(z.split("e-")[1] ?? "0", 10);
|
|
2086
2086
|
return Math.min(6, Math.max(0, ge));
|
|
2087
2087
|
}
|
|
2088
2088
|
const [, W = ""] = z.split(".");
|
|
2089
2089
|
return Math.min(6, W.length);
|
|
2090
|
-
}, l = q(e.modelValue ?? e.min), s = q(l.value), u = q(!1), r = q(!1), v = q(0), f =
|
|
2090
|
+
}, l = q(e.modelValue ?? e.min), s = q(l.value), u = q(!1), r = q(!1), v = q(0), f = k(
|
|
2091
2091
|
() => e.scaleFn ? e.scaleFn(l.value) : l.value
|
|
2092
|
-
), x =
|
|
2092
|
+
), x = k(
|
|
2093
2093
|
() => e.labelMin ? e.labelMin : e.formatDisplay ? e.formatDisplay(e.scaleFn ? e.scaleFn(e.min) : e.min) : e.min
|
|
2094
|
-
), p =
|
|
2094
|
+
), p = k(
|
|
2095
2095
|
() => e.labelMax ? e.labelMax : e.formatDisplay ? e.formatDisplay(e.scaleFn ? e.scaleFn(e.max) : e.max) : e.max
|
|
2096
|
-
),
|
|
2097
|
-
const
|
|
2098
|
-
return e.scaleFn ? e.scaleFn(
|
|
2099
|
-
}), $ =
|
|
2100
|
-
const
|
|
2101
|
-
return Number.isFinite(
|
|
2102
|
-
}), m = q(0),
|
|
2103
|
-
m.value = 0,
|
|
2104
|
-
}, A = (
|
|
2096
|
+
), _ = k(() => {
|
|
2097
|
+
const b = l.value;
|
|
2098
|
+
return e.scaleFn ? e.scaleFn(b) : b;
|
|
2099
|
+
}), $ = k(() => e.scaleFn ? e.scaleFn(e.min) : e.min), F = k(() => e.scaleFn ? e.scaleFn(e.max) : e.max), R = k(() => e.step ?? 0.1), P = k(() => {
|
|
2100
|
+
const b = e.keyboardStepMultiplierLimit ?? 3;
|
|
2101
|
+
return Number.isFinite(b) && b >= 1 ? b : 3;
|
|
2102
|
+
}), m = q(0), V = q(0), E = q(0), w = () => {
|
|
2103
|
+
m.value = 0, V.value = 0, E.value = 0;
|
|
2104
|
+
}, A = (b) => {
|
|
2105
2105
|
const z = Date.now(), W = P.value;
|
|
2106
|
-
E.value ===
|
|
2107
|
-
const Be = Math.min(1, (
|
|
2106
|
+
E.value === b && z - m.value <= 250 || (V.value = 0), V.value += 1, m.value = z, E.value = b;
|
|
2107
|
+
const Be = Math.min(1, (V.value - 1) / 6);
|
|
2108
2108
|
return 1 + (1 - Math.pow(1 - Be, 2)) * (W - 1);
|
|
2109
|
-
}, K =
|
|
2109
|
+
}, K = k(() => {
|
|
2110
2110
|
if (!e.scaleFn) return R.value;
|
|
2111
|
-
const
|
|
2111
|
+
const b = e.scaleFn(e.min), z = e.scaleFn(e.min + R.value), W = Math.abs(z - b);
|
|
2112
2112
|
return W > 0 ? W : R.value;
|
|
2113
|
-
}), Y =
|
|
2113
|
+
}), Y = k(() => o(K.value)), te = (b, z) => {
|
|
2114
2114
|
const W = Math.max(R.value / 10, 1e-4);
|
|
2115
|
-
return Math.abs(
|
|
2116
|
-
}, ee =
|
|
2115
|
+
return Math.abs(b - z) <= W;
|
|
2116
|
+
}, ee = k(() => (l.value - e.min) / (e.max - e.min) * 100), re = q(0), fe = k(
|
|
2117
2117
|
() => `calc((100% - 70px) * ${(u.value ? re.value : ee.value) / 100})`
|
|
2118
|
-
), ne = (
|
|
2119
|
-
|
|
2120
|
-
},
|
|
2118
|
+
), ne = (b) => {
|
|
2119
|
+
b !== s.value && (s.value = b, t("update:modelValue", b));
|
|
2120
|
+
}, h = q(null);
|
|
2121
2121
|
let S = null;
|
|
2122
2122
|
const g = q(0), I = () => {
|
|
2123
|
-
|
|
2124
|
-
},
|
|
2125
|
-
|
|
2126
|
-
S = null,
|
|
2123
|
+
h.value = null, g.value = 0, S && (clearTimeout(S), S = null);
|
|
2124
|
+
}, T = (b) => {
|
|
2125
|
+
h.value = b, g.value = Date.now() + 2e3, S && clearTimeout(S), S = window.setTimeout(() => {
|
|
2126
|
+
S = null, h.value = null, g.value = 0;
|
|
2127
2127
|
}, 2e3);
|
|
2128
2128
|
}, G = () => {
|
|
2129
|
-
const
|
|
2130
|
-
l.value =
|
|
2129
|
+
const b = Math.min(Math.max(l.value, e.min), e.max);
|
|
2130
|
+
l.value = b, ze(b);
|
|
2131
2131
|
}, Q = () => {
|
|
2132
2132
|
ve();
|
|
2133
2133
|
}, nt = () => {
|
|
2134
|
-
v.value = Math.min(Math.max(v.value, $.value),
|
|
2134
|
+
v.value = Math.min(Math.max(v.value, $.value), F.value);
|
|
2135
2135
|
};
|
|
2136
2136
|
let se = null, le = null;
|
|
2137
|
-
const ze = (
|
|
2138
|
-
if (le =
|
|
2137
|
+
const ze = (b) => {
|
|
2138
|
+
if (le = b, se) return;
|
|
2139
2139
|
const z = le;
|
|
2140
2140
|
le = null, ne(z), se = window.setTimeout(() => {
|
|
2141
2141
|
if (se = null, le === null) return;
|
|
@@ -2144,57 +2144,57 @@ const il = ["aria-describedby"], rl = ["id"], ie = /* @__PURE__ */ L({
|
|
|
2144
2144
|
}, 500);
|
|
2145
2145
|
}, st = () => {
|
|
2146
2146
|
if (se && (clearTimeout(se), se = null), le === null) return;
|
|
2147
|
-
const
|
|
2148
|
-
le = null, ne(
|
|
2147
|
+
const b = le;
|
|
2148
|
+
le = null, ne(b);
|
|
2149
2149
|
}, ve = () => {
|
|
2150
2150
|
r.value = !1;
|
|
2151
|
-
const
|
|
2152
|
-
l.value =
|
|
2151
|
+
const b = Math.min(Math.max(l.value, e.min), e.max);
|
|
2152
|
+
l.value = b, le = b, st(), ne(b), T(b);
|
|
2153
2153
|
}, De = () => ve(), Le = () => ve(), at = () => {
|
|
2154
2154
|
e.disabled || u.value || (r.value = !0, I(), window.addEventListener("pointerup", De, { once: !0 }), window.addEventListener("pointercancel", Le, { once: !0 }));
|
|
2155
|
-
}, Pe = (
|
|
2156
|
-
if (e.disabled || u.value || !Pe(
|
|
2157
|
-
|
|
2158
|
-
const z =
|
|
2155
|
+
}, Pe = (b) => b === "ArrowLeft" || b === "ArrowRight" || b === "ArrowUp" || b === "ArrowDown", it = (b) => {
|
|
2156
|
+
if (e.disabled || u.value || !Pe(b.key)) return;
|
|
2157
|
+
b.preventDefault();
|
|
2158
|
+
const z = b.key === "ArrowRight" || b.key === "ArrowUp" ? 1 : -1, W = R.value;
|
|
2159
2159
|
if (!Number.isFinite(W) || W <= 0) return;
|
|
2160
2160
|
const ge = A(z), Ie = W * ge, Be = l.value + z * Ie, Ee = Math.min(Math.max(Be, e.min), e.max), ct = Math.round((Ee - e.min) / W), Ae = Math.min(
|
|
2161
2161
|
Math.max(e.min + ct * W, e.min),
|
|
2162
2162
|
e.max
|
|
2163
2163
|
);
|
|
2164
2164
|
l.value = Ae, ze(Ae), r.value || (r.value = !0, I());
|
|
2165
|
-
}, rt = (
|
|
2166
|
-
Pe(
|
|
2167
|
-
}, ut = (
|
|
2168
|
-
|
|
2165
|
+
}, rt = (b) => {
|
|
2166
|
+
Pe(b.key) && (w(), ve());
|
|
2167
|
+
}, ut = (b) => {
|
|
2168
|
+
b.key === "Escape" ? (u.value = !1, v.value = e.scaleFn ? e.scaleFn(s.value) : s.value, l.value = s.value) : b.key === "Enter" && (u.value = !1);
|
|
2169
2169
|
};
|
|
2170
2170
|
return X(
|
|
2171
2171
|
() => e.modelValue,
|
|
2172
|
-
(
|
|
2173
|
-
const z =
|
|
2174
|
-
u.value || r.value ||
|
|
2172
|
+
(b) => {
|
|
2173
|
+
const z = b ?? e.min;
|
|
2174
|
+
u.value || r.value || h.value !== null && Date.now() < g.value && !te(z, h.value) || (l.value = z);
|
|
2175
2175
|
},
|
|
2176
2176
|
{ immediate: !0 }
|
|
2177
|
-
), X(u, (
|
|
2178
|
-
if (
|
|
2179
|
-
v.value =
|
|
2177
|
+
), X(u, (b) => {
|
|
2178
|
+
if (b)
|
|
2179
|
+
v.value = _.value, re.value = ee.value;
|
|
2180
2180
|
else {
|
|
2181
2181
|
const z = e.unscaleFn ? e.unscaleFn(v.value) : v.value;
|
|
2182
|
-
l.value = Math.min(Math.max(z, e.min), e.max), ne(l.value),
|
|
2182
|
+
l.value = Math.min(Math.max(z, e.min), e.max), ne(l.value), T(l.value);
|
|
2183
2183
|
}
|
|
2184
2184
|
}), me(() => {
|
|
2185
2185
|
se && clearTimeout(se), S && clearTimeout(S), window.removeEventListener("pointerup", De), window.removeEventListener("pointercancel", Le);
|
|
2186
|
-
}), (
|
|
2187
|
-
|
|
2186
|
+
}), (b, z) => (a(), d("div", F2, [
|
|
2187
|
+
b.label ? (a(), d("div", _2, [
|
|
2188
2188
|
i("label", {
|
|
2189
|
-
class:
|
|
2190
|
-
title:
|
|
2191
|
-
}, B(
|
|
2189
|
+
class: y(["block truncate text-start mr-6", [b.theme === "dark" ? "text-white" : "text-black", b.disabled ? "opacity-30" : ""]]),
|
|
2190
|
+
title: b.label
|
|
2191
|
+
}, B(b.label), 11, M2)
|
|
2192
2192
|
])) : C("", !0),
|
|
2193
2193
|
i("div", S2, [
|
|
2194
2194
|
i("div", {
|
|
2195
2195
|
name: "slider-track",
|
|
2196
|
-
class:
|
|
2197
|
-
style: D({ width:
|
|
2196
|
+
class: y(["relative overflow-visible rounded-[6px] bluevue-elevation-1 min-w-[140px] max-w-full", [b.theme === "dark" ? "bg-[#464646AA]" : "bg-[#00000011]", b.disabled ? "opacity-30" : ""]]),
|
|
2197
|
+
style: D({ width: b.width || "100%", height: b.height || "30px", cursor: b.disabled ? "not-allowed" : "pointer" })
|
|
2198
2198
|
}, [
|
|
2199
2199
|
i("div", R2, [
|
|
2200
2200
|
(a(), d(J, null, Z(6, (W) => i("div", {
|
|
@@ -2202,25 +2202,25 @@ const il = ["aria-describedby"], rl = ["id"], ie = /* @__PURE__ */ L({
|
|
|
2202
2202
|
class: "mdi mdi-circle w-2 h-2",
|
|
2203
2203
|
style: D({
|
|
2204
2204
|
fontSize: "6px",
|
|
2205
|
-
color:
|
|
2205
|
+
color: b.theme === "dark" ? "#ffffff11" : "#00000011"
|
|
2206
2206
|
})
|
|
2207
2207
|
}, null, 4)), 64))
|
|
2208
2208
|
]),
|
|
2209
2209
|
i("div", {
|
|
2210
|
-
class:
|
|
2210
|
+
class: y(["absolute translate-y-1/2 bottom-1/2 flex items-center justify-center text-white text-center text-[14px] whitespace-nowrap min-w-[60px] rounded-[6px] bluevue-elevation-1 z-50 h-3/4", u.value ? "pointer-events-auto" : "pointer-events-none select-none"]),
|
|
2211
2211
|
style: D({
|
|
2212
2212
|
left: fe.value,
|
|
2213
2213
|
marginLeft: "5px",
|
|
2214
|
-
backgroundColor:
|
|
2214
|
+
backgroundColor: b.color || "var(--bluevue-primary)"
|
|
2215
2215
|
})
|
|
2216
2216
|
}, [
|
|
2217
2217
|
u.value ? (a(), d("div", L2, [
|
|
2218
|
-
|
|
2218
|
+
Ve(i("input", {
|
|
2219
2219
|
ref: "editInput",
|
|
2220
2220
|
"onUpdate:modelValue": z[0] || (z[0] = (W) => v.value = W),
|
|
2221
2221
|
type: "number",
|
|
2222
2222
|
min: $.value,
|
|
2223
|
-
max:
|
|
2223
|
+
max: F.value,
|
|
2224
2224
|
step: K.value,
|
|
2225
2225
|
autofocus: "",
|
|
2226
2226
|
class: "bg-white border border-gray-300 rounded px-1 py-0.5",
|
|
@@ -2236,18 +2236,18 @@ const il = ["aria-describedby"], rl = ["id"], ie = /* @__PURE__ */ L({
|
|
|
2236
2236
|
]
|
|
2237
2237
|
])
|
|
2238
2238
|
])) : (a(), d("div", z2, [
|
|
2239
|
-
i("p", D2, B(
|
|
2239
|
+
i("p", D2, B(b.formatDisplay ? b.formatDisplay(f.value) : f.value.toFixed(Y.value)), 1)
|
|
2240
2240
|
]))
|
|
2241
2241
|
], 6),
|
|
2242
|
-
|
|
2242
|
+
Ve(i("input", {
|
|
2243
2243
|
"onUpdate:modelValue": z[2] || (z[2] = (W) => l.value = W),
|
|
2244
2244
|
type: "range",
|
|
2245
|
-
class:
|
|
2245
|
+
class: y(["absolute inset-0 w-full h-full opacity-0", b.disabled ? "cursor-not-allowed" : "cursor-pointer"]),
|
|
2246
2246
|
style: { width: "95%", left: "2.5%" },
|
|
2247
|
-
min:
|
|
2248
|
-
max:
|
|
2247
|
+
min: b.min,
|
|
2248
|
+
max: b.max,
|
|
2249
2249
|
step: R.value,
|
|
2250
|
-
disabled:
|
|
2250
|
+
disabled: b.disabled || u.value,
|
|
2251
2251
|
onInput: G,
|
|
2252
2252
|
onChange: Q,
|
|
2253
2253
|
onPointerdown: at,
|
|
@@ -2264,10 +2264,10 @@ const il = ["aria-describedby"], rl = ["id"], ie = /* @__PURE__ */ L({
|
|
|
2264
2264
|
]
|
|
2265
2265
|
]),
|
|
2266
2266
|
i("p", {
|
|
2267
|
-
class:
|
|
2267
|
+
class: y(["absolute left-[5px] top-1/2 -translate-y-1/2 min-w-[30px] text-[12px] font-medium text-center whitespace-nowrap z-10 pointer-events-none", b.theme === "dark" ? "text-[#ffffff44]" : "text-[#00000066]"])
|
|
2268
2268
|
}, B(x.value), 3),
|
|
2269
2269
|
i("p", {
|
|
2270
|
-
class:
|
|
2270
|
+
class: y(["absolute right-[5px] top-1/2 -translate-y-1/2 min-w-[30px] text-[12px] font-medium text-center whitespace-nowrap z-10 pointer-events-none", b.theme === "dark" ? "text-[#ffffff44]" : "text-[#00000066]"])
|
|
2271
2271
|
}, B(p.value), 3),
|
|
2272
2272
|
u.value ? (a(), d("div", {
|
|
2273
2273
|
key: 0,
|
|
@@ -2325,7 +2325,7 @@ const il = ["aria-describedby"], rl = ["id"], ie = /* @__PURE__ */ L({
|
|
|
2325
2325
|
), (u, r) => (a(), d("div", O2, [
|
|
2326
2326
|
u.label ? (a(), d("div", N2, [
|
|
2327
2327
|
i("label", {
|
|
2328
|
-
class:
|
|
2328
|
+
class: y(["block truncate text-start mr-6", [u.theme === "dark" ? "text-white" : "text-black", u.disabled ? "opacity-30" : ""]]),
|
|
2329
2329
|
title: u.label
|
|
2330
2330
|
}, B(u.label), 11, W2)
|
|
2331
2331
|
])) : C("", !0),
|
|
@@ -2341,14 +2341,14 @@ const il = ["aria-describedby"], rl = ["id"], ie = /* @__PURE__ */ L({
|
|
|
2341
2341
|
name: "mdi-information-outline",
|
|
2342
2342
|
size: 16,
|
|
2343
2343
|
label: u.infoTooltip,
|
|
2344
|
-
class:
|
|
2344
|
+
class: y(["cursor-help", [u.disabled ? "opacity-30" : "opacity-60", u.theme === "dark" ? "text-white" : "text-black"]])
|
|
2345
2345
|
}, null, 8, ["label", "class"])
|
|
2346
2346
|
]),
|
|
2347
2347
|
_: 1
|
|
2348
2348
|
}, 8, ["text", "theme"])) : C("", !0),
|
|
2349
2349
|
i("div", {
|
|
2350
2350
|
name: "switch-track",
|
|
2351
|
-
class:
|
|
2351
|
+
class: y(["relative grid grid-cols-2 rounded-[8px] bluevue-elevation-1 cursor-pointer overflow-hidden", [u.theme === "dark" ? "bg-[#464646AA]" : "bg-[#00000011]", u.disabled ? "opacity-30 cursor-not-allowed" : ""]]),
|
|
2352
2352
|
style: D({ minWidth: u.width || "75px", height: u.height || "30px" }),
|
|
2353
2353
|
onClick: s
|
|
2354
2354
|
}, [
|
|
@@ -2360,10 +2360,10 @@ const il = ["aria-describedby"], rl = ["id"], ie = /* @__PURE__ */ L({
|
|
|
2360
2360
|
})
|
|
2361
2361
|
}, null, 4),
|
|
2362
2362
|
i("span", {
|
|
2363
|
-
class:
|
|
2363
|
+
class: y(["relative flex items-center justify-center px-[9px] text-[14px] whitespace-nowrap pointer-events-none transition-opacity duration-300", l(!o.value)])
|
|
2364
2364
|
}, B(u.labelOff || "Off"), 3),
|
|
2365
2365
|
i("span", {
|
|
2366
|
-
class:
|
|
2366
|
+
class: y(["relative flex items-center justify-center px-[9px] text-[14px] whitespace-nowrap pointer-events-none transition-opacity duration-300", l(o.value)])
|
|
2367
2367
|
}, B(u.labelOn || "On"), 3)
|
|
2368
2368
|
], 6)
|
|
2369
2369
|
])
|
|
@@ -2391,13 +2391,13 @@ const il = ["aria-describedby"], rl = ["id"], ie = /* @__PURE__ */ L({
|
|
|
2391
2391
|
}
|
|
2392
2392
|
e.value = r.key, t.value = !1;
|
|
2393
2393
|
}
|
|
2394
|
-
}, l = (r, v) => r == null ? v == null ? 0 : 1 : v == null ? -1 : typeof r == "number" && typeof v == "number" ? r - v : String(r).localeCompare(String(v), void 0, { numeric: !0 }), s =
|
|
2394
|
+
}, l = (r, v) => r == null ? v == null ? 0 : 1 : v == null ? -1 : typeof r == "number" && typeof v == "number" ? r - v : String(r).localeCompare(String(v), void 0, { numeric: !0 }), s = k(() => {
|
|
2395
2395
|
if (!e.value) return n.rows;
|
|
2396
2396
|
const r = t.value ? -1 : 1;
|
|
2397
2397
|
return [...n.rows].sort((v, f) => r * l(v[e.value], f[e.value]));
|
|
2398
2398
|
}), u = (r) => r.align === "end" ? "text-end" : r.align === "center" ? "text-center" : "text-start";
|
|
2399
2399
|
return (r, v) => (a(), d("div", {
|
|
2400
|
-
class:
|
|
2400
|
+
class: y(["w-full overflow-auto rounded-[6px]", r.theme === "light" ? "bg-[#00000006]" : "bg-[#ffffff08]"]),
|
|
2401
2401
|
style: D({ maxHeight: r.maxHeight })
|
|
2402
2402
|
}, [
|
|
2403
2403
|
i("table", K2, [
|
|
@@ -2406,7 +2406,7 @@ const il = ["aria-describedby"], rl = ["id"], ie = /* @__PURE__ */ L({
|
|
|
2406
2406
|
(a(!0), d(J, null, Z(r.columns, (f) => (a(), d("th", {
|
|
2407
2407
|
key: f.key,
|
|
2408
2408
|
scope: "col",
|
|
2409
|
-
class:
|
|
2409
|
+
class: y(["sticky top-0 z-[1] whitespace-nowrap border-b px-3 py-2 text-[11px] font-medium uppercase tracking-wide backdrop-blur-sm", [
|
|
2410
2410
|
u(f),
|
|
2411
2411
|
f.sortable ? "cursor-pointer select-none" : "",
|
|
2412
2412
|
r.theme === "light" ? "border-[#00000014] bg-[#f5f5f5cc] text-[#00000088]" : "border-[#ffffff14] bg-[#1e1e1ecc] text-[#ffffff88]"
|
|
@@ -2421,7 +2421,7 @@ const il = ["aria-describedby"], rl = ["id"], ie = /* @__PURE__ */ L({
|
|
|
2421
2421
|
key: 0,
|
|
2422
2422
|
name: e.value === f.key ? t.value ? "mdi-arrow-down" : "mdi-arrow-up" : "mdi-arrow-up-down",
|
|
2423
2423
|
size: 12,
|
|
2424
|
-
class:
|
|
2424
|
+
class: y(e.value === f.key ? "" : "opacity-30")
|
|
2425
2425
|
}, null, 8, ["name", "class"])) : C("", !0)
|
|
2426
2426
|
])
|
|
2427
2427
|
], 14, G2))), 128))
|
|
@@ -2430,12 +2430,12 @@ const il = ["aria-describedby"], rl = ["id"], ie = /* @__PURE__ */ L({
|
|
|
2430
2430
|
i("tbody", null, [
|
|
2431
2431
|
(a(!0), d(J, null, Z(s.value, (f, x) => (a(), d("tr", {
|
|
2432
2432
|
key: String(r.rowKey ? f[r.rowKey] : x),
|
|
2433
|
-
class:
|
|
2433
|
+
class: y(["transition-colors", r.theme === "light" ? "hover:bg-[#0000000a]" : "hover:bg-[#ffffff0a]"]),
|
|
2434
2434
|
onClick: (p) => r.$emit("row-click", f)
|
|
2435
2435
|
}, [
|
|
2436
2436
|
(a(!0), d(J, null, Z(r.columns, (p) => (a(), d("td", {
|
|
2437
2437
|
key: p.key,
|
|
2438
|
-
class:
|
|
2438
|
+
class: y(["border-b px-3", [
|
|
2439
2439
|
u(p),
|
|
2440
2440
|
r.dense ? "py-1" : "py-2",
|
|
2441
2441
|
r.theme === "light" ? "border-[#0000000a] text-black" : "border-[#ffffff0a] text-white"
|
|
@@ -2452,7 +2452,7 @@ const il = ["aria-describedby"], rl = ["id"], ie = /* @__PURE__ */ L({
|
|
|
2452
2452
|
s.value.length === 0 ? (a(), d("tr", Y2, [
|
|
2453
2453
|
i("td", {
|
|
2454
2454
|
colspan: r.columns.length,
|
|
2455
|
-
class:
|
|
2455
|
+
class: y(["px-3 py-6 text-center text-[13px]", r.theme === "light" ? "text-[#00000066]" : "text-[#ffffff66]"])
|
|
2456
2456
|
}, [
|
|
2457
2457
|
j(r.$slots, "empty", {}, () => [
|
|
2458
2458
|
oe(B(r.emptyText ?? "Nothing here yet."), 1)
|
|
@@ -2478,7 +2478,7 @@ const il = ["aria-describedby"], rl = ["id"], ie = /* @__PURE__ */ L({
|
|
|
2478
2478
|
setup(c, { emit: n }) {
|
|
2479
2479
|
const e = n;
|
|
2480
2480
|
return (t, o) => (a(), d("div", {
|
|
2481
|
-
class:
|
|
2481
|
+
class: y(["flex items-stretch gap-1 border-b", t.theme === "light" ? "border-[#00000014]" : "border-[#ffffff14]"]),
|
|
2482
2482
|
role: "tablist"
|
|
2483
2483
|
}, [
|
|
2484
2484
|
(a(!0), d(J, null, Z(t.tabs, (l) => (a(), d("button", {
|
|
@@ -2487,7 +2487,7 @@ const il = ["aria-describedby"], rl = ["id"], ie = /* @__PURE__ */ L({
|
|
|
2487
2487
|
role: "tab",
|
|
2488
2488
|
"aria-selected": t.modelValue === l.value,
|
|
2489
2489
|
disabled: l.disabled,
|
|
2490
|
-
class:
|
|
2490
|
+
class: y(["relative flex items-center justify-center gap-2 whitespace-nowrap px-3 pb-2 pt-[6px] text-[13px] font-medium transition-colors", [
|
|
2491
2491
|
t.stretch ? "flex-1" : "",
|
|
2492
2492
|
l.disabled ? "cursor-not-allowed opacity-30" : "cursor-pointer",
|
|
2493
2493
|
t.modelValue === l.value ? t.theme === "light" ? "text-black" : "text-white" : t.theme === "light" ? "text-[#00000088] hover:text-black" : "text-[#ffffff88] hover:text-white"
|
|
@@ -2530,10 +2530,10 @@ const il = ["aria-describedby"], rl = ["id"], ie = /* @__PURE__ */ L({
|
|
|
2530
2530
|
},
|
|
2531
2531
|
emits: ["update:modelValue"],
|
|
2532
2532
|
setup(c, { emit: n }) {
|
|
2533
|
-
const e = c, t = n, o =
|
|
2533
|
+
const e = c, t = n, o = k(() => {
|
|
2534
2534
|
var s;
|
|
2535
2535
|
return (((s = e.errorMessages) == null ? void 0 : s.length) ?? 0) > 0;
|
|
2536
|
-
}), l =
|
|
2536
|
+
}), l = k(() => {
|
|
2537
2537
|
if (!e.autoGrow) return e.rows ?? 4;
|
|
2538
2538
|
const s = (e.modelValue ?? "").split(`
|
|
2539
2539
|
`).length;
|
|
@@ -2546,7 +2546,7 @@ const il = ["aria-describedby"], rl = ["id"], ie = /* @__PURE__ */ L({
|
|
|
2546
2546
|
s.label ? (a(), d("div", to, [
|
|
2547
2547
|
i("label", {
|
|
2548
2548
|
for: s.name,
|
|
2549
|
-
class:
|
|
2549
|
+
class: y(["min-w-0 truncate text-[13px]", [s.theme === "dark" ? "text-white" : "text-black", s.disabled ? "opacity-30" : ""]])
|
|
2550
2550
|
}, B(s.label), 11, lo),
|
|
2551
2551
|
s.infoTooltip ? (a(), U(ie, {
|
|
2552
2552
|
key: 0,
|
|
@@ -2559,8 +2559,8 @@ const il = ["aria-describedby"], rl = ["id"], ie = /* @__PURE__ */ L({
|
|
|
2559
2559
|
name: "mdi-information-outline",
|
|
2560
2560
|
size: 16,
|
|
2561
2561
|
label: s.infoTooltip,
|
|
2562
|
-
class: "opacity-
|
|
2563
|
-
}, null, 8, ["label"])
|
|
2562
|
+
class: y(["cursor-help", s.disabled ? "opacity-30" : "opacity-60"])
|
|
2563
|
+
}, null, 8, ["label", "class"])
|
|
2564
2564
|
]),
|
|
2565
2565
|
_: 1
|
|
2566
2566
|
}, 8, ["text", "theme"])) : C("", !0)
|
|
@@ -2572,7 +2572,7 @@ const il = ["aria-describedby"], rl = ["id"], ie = /* @__PURE__ */ L({
|
|
|
2572
2572
|
value: s.modelValue ?? "",
|
|
2573
2573
|
placeholder: s.placeholder,
|
|
2574
2574
|
disabled: s.disabled,
|
|
2575
|
-
class:
|
|
2575
|
+
class: y(["bluevue-inset-1 w-full resize-y rounded-[6px] px-3 py-2 text-sm outline-none transition-colors focus:outline focus:outline-2 focus:outline-offset-0 focus:outline-[var(--bluevue-accent)]", [
|
|
2576
2576
|
s.theme === "dark" ? "bg-[#ffffff11] text-white placeholder:text-[#ffffff55]" : "bg-[#00000008] text-black placeholder:text-[#00000055]",
|
|
2577
2577
|
s.disabled ? "pointer-events-none opacity-30" : "",
|
|
2578
2578
|
o.value ? "outline outline-2 outline-[var(--bluevue-error)]" : ""
|
|
@@ -2625,13 +2625,13 @@ const il = ["aria-describedby"], rl = ["id"], ie = /* @__PURE__ */ L({
|
|
|
2625
2625
|
activatorProps: f,
|
|
2626
2626
|
isPositioned: x,
|
|
2627
2627
|
floatingStyles: p,
|
|
2628
|
-
onToggle:
|
|
2629
|
-
} = ye({ placement: "bottom-end" }), $ = q(null),
|
|
2628
|
+
onToggle: _
|
|
2629
|
+
} = ye({ placement: "bottom-end" }), $ = q(null), F = q(!1), R = k(() => l.min ?? 0), P = k(() => l.max ?? 360), m = k(() => l.step && l.step > 0 ? l.step : 1), V = k(() => {
|
|
2630
2630
|
const g = P.value - R.value;
|
|
2631
2631
|
return g > 0 ? g : 360;
|
|
2632
|
-
}), E =
|
|
2632
|
+
}), E = k(() => typeof l.modelValue == "number" ? l.modelValue : R.value), w = k(() => (K(E.value) - R.value) / V.value * 360), A = k(() => l.theme !== "light");
|
|
2633
2633
|
function K(g) {
|
|
2634
|
-
return R.value + ((g - R.value) %
|
|
2634
|
+
return R.value + ((g - R.value) % V.value + V.value) % V.value;
|
|
2635
2635
|
}
|
|
2636
2636
|
function Y(g) {
|
|
2637
2637
|
return R.value + Math.round((g - R.value) / m.value) * m.value;
|
|
@@ -2651,23 +2651,23 @@ const il = ["aria-describedby"], rl = ["id"], ie = /* @__PURE__ */ L({
|
|
|
2651
2651
|
function re(g) {
|
|
2652
2652
|
const I = $.value;
|
|
2653
2653
|
if (!I) return E.value;
|
|
2654
|
-
const
|
|
2655
|
-
return R.value + Q / 360 *
|
|
2654
|
+
const T = I.getBoundingClientRect(), G = Math.atan2(g.clientX - (T.left + T.width / 2), T.top + T.height / 2 - g.clientY) * 180 / Math.PI, Q = G < 0 ? G + 360 : G;
|
|
2655
|
+
return R.value + Q / 360 * V.value;
|
|
2656
2656
|
}
|
|
2657
2657
|
function fe(g) {
|
|
2658
2658
|
var I;
|
|
2659
|
-
l.disabled || (
|
|
2659
|
+
l.disabled || (F.value = !0, (I = $.value) == null || I.setPointerCapture(g.pointerId), te(re(g)));
|
|
2660
2660
|
}
|
|
2661
2661
|
function ne(g) {
|
|
2662
|
-
|
|
2662
|
+
F.value && te(re(g));
|
|
2663
2663
|
}
|
|
2664
|
-
function
|
|
2664
|
+
function h(g) {
|
|
2665
2665
|
var I;
|
|
2666
|
-
|
|
2666
|
+
F.value && (F.value = !1, (I = $.value) == null || I.releasePointerCapture(g.pointerId));
|
|
2667
2667
|
}
|
|
2668
2668
|
function S(g, I) {
|
|
2669
|
-
const
|
|
2670
|
-
return { x: e + Math.cos(
|
|
2669
|
+
const T = (g - 90) * Math.PI / 180;
|
|
2670
|
+
return { x: e + Math.cos(T) * I, y: e + Math.sin(T) * I };
|
|
2671
2671
|
}
|
|
2672
2672
|
return (g, I) => (a(), d("div", no, [
|
|
2673
2673
|
O(Re, {
|
|
@@ -2700,7 +2700,7 @@ const il = ["aria-describedby"], rl = ["id"], ie = /* @__PURE__ */ L({
|
|
|
2700
2700
|
O(H, {
|
|
2701
2701
|
name: "mdi-compass-rose",
|
|
2702
2702
|
size: 16,
|
|
2703
|
-
class:
|
|
2703
|
+
class: y(A.value ? "text-white" : "text-black")
|
|
2704
2704
|
}, null, 8, ["class"])
|
|
2705
2705
|
], 16, so)
|
|
2706
2706
|
]),
|
|
@@ -2711,13 +2711,13 @@ const il = ["aria-describedby"], rl = ["id"], ie = /* @__PURE__ */ L({
|
|
|
2711
2711
|
ref_key: "popoverRef",
|
|
2712
2712
|
ref: r,
|
|
2713
2713
|
popover: "",
|
|
2714
|
-
class: "bluevue-popover",
|
|
2714
|
+
class: "bluevue-popover bluevue-popover--dimmed",
|
|
2715
2715
|
style: D(M(p)),
|
|
2716
2716
|
onToggle: I[0] || (I[0] = //@ts-ignore
|
|
2717
|
-
(...
|
|
2717
|
+
(...T) => M(_) && M(_)(...T))
|
|
2718
2718
|
}, [
|
|
2719
2719
|
i("div", {
|
|
2720
|
-
class:
|
|
2720
|
+
class: y(["bluevue-elevation-5 rounded-full", [
|
|
2721
2721
|
A.value ? "bg-[var(--bluevue-surface)] text-white" : "bg-white text-black",
|
|
2722
2722
|
M(x) ? "opacity-100" : "opacity-0"
|
|
2723
2723
|
]])
|
|
@@ -2728,11 +2728,11 @@ const il = ["aria-describedby"], rl = ["id"], ie = /* @__PURE__ */ L({
|
|
|
2728
2728
|
width: be,
|
|
2729
2729
|
height: be,
|
|
2730
2730
|
viewBox: `0 0 ${be} ${be}`,
|
|
2731
|
-
class:
|
|
2731
|
+
class: y(["block touch-none select-none", g.disabled ? "cursor-not-allowed" : "cursor-pointer"]),
|
|
2732
2732
|
onPointerdown: ae(fe, ["prevent"]),
|
|
2733
2733
|
onPointermove: ne,
|
|
2734
|
-
onPointerup:
|
|
2735
|
-
onPointercancel:
|
|
2734
|
+
onPointerup: h,
|
|
2735
|
+
onPointercancel: h
|
|
2736
2736
|
}, [
|
|
2737
2737
|
i("circle", {
|
|
2738
2738
|
cx: e,
|
|
@@ -2748,24 +2748,24 @@ const il = ["aria-describedby"], rl = ["id"], ie = /* @__PURE__ */ L({
|
|
|
2748
2748
|
r: e - 22,
|
|
2749
2749
|
fill: A.value ? "#ffffff0d" : "#0000000d"
|
|
2750
2750
|
}, null, 8, uo),
|
|
2751
|
-
(a(), d(J, null, Z(t, (
|
|
2752
|
-
key:
|
|
2753
|
-
x1: S(
|
|
2754
|
-
y1: S(
|
|
2755
|
-
x2: S(
|
|
2756
|
-
y2: S(
|
|
2751
|
+
(a(), d(J, null, Z(t, (T) => i("line", {
|
|
2752
|
+
key: T,
|
|
2753
|
+
x1: S(T, T % 90 === 0 ? 70 : 74).x,
|
|
2754
|
+
y1: S(T, T % 90 === 0 ? 70 : 74).y,
|
|
2755
|
+
x2: S(T, 80).x,
|
|
2756
|
+
y2: S(T, 80).y,
|
|
2757
2757
|
stroke: A.value ? "#ffffff44" : "#00000044",
|
|
2758
|
-
"stroke-width":
|
|
2758
|
+
"stroke-width": T % 90 === 0 ? 2 : 1
|
|
2759
2759
|
}, null, 8, co)), 64)),
|
|
2760
|
-
(a(), d(J, null, Z(o, (
|
|
2761
|
-
key:
|
|
2762
|
-
x: S(
|
|
2763
|
-
y: S(
|
|
2760
|
+
(a(), d(J, null, Z(o, (T) => i("text", {
|
|
2761
|
+
key: T.label,
|
|
2762
|
+
x: S(T.deg, 58).x,
|
|
2763
|
+
y: S(T.deg, 58).y,
|
|
2764
2764
|
"text-anchor": "middle",
|
|
2765
2765
|
"dominant-baseline": "middle",
|
|
2766
2766
|
class: "text-[11px] font-medium",
|
|
2767
2767
|
fill: A.value ? "#ffffff88" : "#00000088"
|
|
2768
|
-
}, B(
|
|
2768
|
+
}, B(T.label), 9, po)), 64)),
|
|
2769
2769
|
i("defs", null, [
|
|
2770
2770
|
i("filter", {
|
|
2771
2771
|
id: `${M(v)}-arrow-shadow`,
|
|
@@ -2776,7 +2776,7 @@ const il = ["aria-describedby"], rl = ["id"], ie = /* @__PURE__ */ L({
|
|
|
2776
2776
|
}, vo, 8, mo)
|
|
2777
2777
|
]),
|
|
2778
2778
|
i("g", {
|
|
2779
|
-
transform: `rotate(${
|
|
2779
|
+
transform: `rotate(${w.value} ${e} ${e})`,
|
|
2780
2780
|
filter: `url(#${M(v)}-arrow-shadow)`
|
|
2781
2781
|
}, [
|
|
2782
2782
|
i("path", {
|
|
@@ -2825,13 +2825,13 @@ export {
|
|
|
2825
2825
|
Ml as BlueChip,
|
|
2826
2826
|
Co as BlueConfirmDialog,
|
|
2827
2827
|
$e as BlueDialog,
|
|
2828
|
-
|
|
2829
|
-
|
|
2828
|
+
To as BlueExpansiblePanel,
|
|
2829
|
+
Vo as BlueFileDrop,
|
|
2830
2830
|
H as BlueIcon,
|
|
2831
2831
|
Re as BlueInput,
|
|
2832
2832
|
Gt as BlueLoadingDialog,
|
|
2833
|
-
|
|
2834
|
-
|
|
2833
|
+
_o as BlueMenu,
|
|
2834
|
+
Fe as BlueOsError,
|
|
2835
2835
|
Hl as BlueProgressBar,
|
|
2836
2836
|
Mo as BluePromptDialog,
|
|
2837
2837
|
So as BlueRadioGroup,
|
|
@@ -2841,14 +2841,14 @@ export {
|
|
|
2841
2841
|
el as BlueSnackbar,
|
|
2842
2842
|
It as BlueSpinner,
|
|
2843
2843
|
Lo as BlueStat,
|
|
2844
|
-
|
|
2844
|
+
Fo as BlueStepsDialog,
|
|
2845
2845
|
Po as BlueSwitch,
|
|
2846
2846
|
Io as BlueTable,
|
|
2847
2847
|
Eo as BlueTabs,
|
|
2848
2848
|
Ao as BlueTextarea,
|
|
2849
2849
|
ie as BlueTooltip,
|
|
2850
2850
|
jo as BlueWindRose,
|
|
2851
|
-
|
|
2851
|
+
Vt as applyBlueTheme,
|
|
2852
2852
|
xe as blueOsService,
|
|
2853
2853
|
Oo as downloadJson,
|
|
2854
2854
|
xt as isBlueOsExtension,
|