@roku-ui/vue 0.7.1 → 0.7.2
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/components/Drawer.vue.d.ts +7 -7
- package/dist/components/Dropzone.vue.d.ts +1 -1
- package/dist/components/FullscreenOverlay.vue.d.ts +9 -9
- package/dist/components/Modal.vue.d.ts +7 -7
- package/dist/components/Overlay.vue.d.ts +1 -1
- package/dist/components/Progress.vue.d.ts +2 -2
- package/dist/components/Slider.vue.d.ts +6 -6
- package/dist/components/Switch.vue.d.ts +6 -6
- package/dist/components/Tabs.vue.d.ts +5 -5
- package/dist/components/TextField.vue.d.ts +66 -0
- package/dist/index.js +256 -265
- package/dist/index.umd.cjs +1 -1
- package/dist/style.css +1 -1
- package/package.json +13 -12
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as x, openBlock as h, createElementBlock as b, normalizeStyle as C, renderSlot as k, computed as m, ref as g, onMounted as ee, Fragment as K, createBlock as P, resolveDynamicComponent as ue, mergeProps as xe, unref as
|
|
1
|
+
import { defineComponent as x, openBlock as h, createElementBlock as b, normalizeStyle as C, renderSlot as k, computed as m, ref as g, onMounted as ee, Fragment as K, createBlock as P, resolveDynamicComponent as ue, mergeProps as xe, unref as u, createCommentVNode as T, getCurrentScope as xt, onScopeDispose as kt, nextTick as et, getCurrentInstance as tt, watch as de, shallowRef as St, readonly as Mt, watchEffect as X, withCtx as L, normalizeClass as y, createElementVNode as w, mergeModels as W, useModel as j, inject as be, provide as ge, useAttrs as $t, withDirectives as Te, vModelText as Ct, createVNode as Z, Teleport as At, Transition as rt, useSlots as nt, toDisplayString as se, renderList as ye, vModelDynamic as Tt, withModifiers as ot, withKeys as zt, reactive as Et, vModelCheckbox as Rt, isRef as Bt, createTextVNode as Ot } from "vue";
|
|
2
2
|
const In = /* @__PURE__ */ x({
|
|
3
3
|
__name: "AspectRatio",
|
|
4
4
|
props: {
|
|
@@ -55,20 +55,20 @@ const In = /* @__PURE__ */ x({
|
|
|
55
55
|
key: 0,
|
|
56
56
|
ref_key: "img",
|
|
57
57
|
ref: a,
|
|
58
|
-
style: [s.style,
|
|
58
|
+
style: [s.style, u(r)],
|
|
59
59
|
placeholder: "",
|
|
60
60
|
src: s.src,
|
|
61
|
-
class: ["h-[var(--size)] w-[var(--size)] rounded-full object-cover", [{ hidden: !
|
|
61
|
+
class: ["h-[var(--size)] w-[var(--size)] rounded-full object-cover", [{ hidden: !u(n) }, t.class]]
|
|
62
62
|
}, s.$attrs, { onLoad: o }), null, 16, ["style", "src", "class"])) : T("", !0),
|
|
63
|
-
|
|
63
|
+
u(n) ? T("", !0) : (h(), b("div", {
|
|
64
64
|
key: 1,
|
|
65
65
|
class: "h-[var(--size)] w-[var(--size)] animate-pulse border-transparent rounded-full bg-surface-high object-cover",
|
|
66
|
-
style: C([s.style,
|
|
66
|
+
style: C([s.style, u(r)])
|
|
67
67
|
}, null, 4))
|
|
68
68
|
], 64));
|
|
69
69
|
}
|
|
70
70
|
});
|
|
71
|
-
function
|
|
71
|
+
function U(e) {
|
|
72
72
|
return m(
|
|
73
73
|
() => ({ style: Nt(e.rounded), class: "rounded-[var(--r-rounded)]" })
|
|
74
74
|
);
|
|
@@ -110,7 +110,7 @@ function Pt() {
|
|
|
110
110
|
};
|
|
111
111
|
}
|
|
112
112
|
function ze(e) {
|
|
113
|
-
return typeof e == "function" ? e() :
|
|
113
|
+
return typeof e == "function" ? e() : u(e);
|
|
114
114
|
}
|
|
115
115
|
const Q = typeof window < "u" && typeof document < "u";
|
|
116
116
|
typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
|
|
@@ -146,10 +146,10 @@ function N(...e) {
|
|
|
146
146
|
);
|
|
147
147
|
},
|
|
148
148
|
{ immediate: !0, flush: "post" }
|
|
149
|
-
),
|
|
149
|
+
), c = () => {
|
|
150
150
|
l(), s();
|
|
151
151
|
};
|
|
152
|
-
return ke(
|
|
152
|
+
return ke(c), c;
|
|
153
153
|
}
|
|
154
154
|
function Gt(e) {
|
|
155
155
|
return typeof e == "function" ? e : typeof e == "string" ? (t) => t.key === e : Array.isArray(e) ? (t) => e.includes(t.key) : () => !0;
|
|
@@ -180,11 +180,11 @@ function De(e) {
|
|
|
180
180
|
function Ue(e, t = {}) {
|
|
181
181
|
const { window: r = fe } = t, n = De(() => r && "matchMedia" in r && typeof r.matchMedia == "function");
|
|
182
182
|
let a;
|
|
183
|
-
const o = g(!1), s = (
|
|
184
|
-
o.value =
|
|
183
|
+
const o = g(!1), s = (c) => {
|
|
184
|
+
o.value = c.matches;
|
|
185
185
|
}, i = () => {
|
|
186
186
|
a && ("removeEventListener" in a ? a.removeEventListener("change", s) : a.removeListener(s));
|
|
187
|
-
}, l =
|
|
187
|
+
}, l = X(() => {
|
|
188
188
|
n.value && (i(), a = r.matchMedia(ze(e)), "addEventListener" in a ? a.addEventListener("change", s) : a.addListener(s), o.value = a.matches);
|
|
189
189
|
});
|
|
190
190
|
return ke(() => {
|
|
@@ -202,13 +202,13 @@ function Xt(e, t, r = {}) {
|
|
|
202
202
|
i(), s.value && n && f && (o = new MutationObserver(t), o.observe(f, a));
|
|
203
203
|
},
|
|
204
204
|
{ immediate: !0 }
|
|
205
|
-
),
|
|
205
|
+
), c = () => o == null ? void 0 : o.takeRecords(), d = () => {
|
|
206
206
|
i(), l();
|
|
207
207
|
};
|
|
208
208
|
return ke(d), {
|
|
209
209
|
isSupported: s,
|
|
210
210
|
stop: d,
|
|
211
|
-
takeRecords:
|
|
211
|
+
takeRecords: c
|
|
212
212
|
};
|
|
213
213
|
}
|
|
214
214
|
function Yt(e, t = {}) {
|
|
@@ -216,28 +216,28 @@ function Yt(e, t = {}) {
|
|
|
216
216
|
let a = 0, o = !0;
|
|
217
217
|
if (Q) {
|
|
218
218
|
const s = typeof t == "function" ? { onDrop: t } : t, i = (l) => {
|
|
219
|
-
var
|
|
220
|
-
const f = Array.from((d = (
|
|
219
|
+
var c, d;
|
|
220
|
+
const f = Array.from((d = (c = l.dataTransfer) == null ? void 0 : c.files) != null ? d : []);
|
|
221
221
|
return n.value = f.length === 0 ? null : f;
|
|
222
222
|
};
|
|
223
223
|
N(e, "dragenter", (l) => {
|
|
224
|
-
var
|
|
225
|
-
const f = Array.from(((
|
|
224
|
+
var c, d;
|
|
225
|
+
const f = Array.from(((c = l == null ? void 0 : l.dataTransfer) == null ? void 0 : c.items) || []).map((v) => v.kind === "file" ? v.type : null).filter(It);
|
|
226
226
|
if (s.dataTypes && l.dataTransfer) {
|
|
227
|
-
const v =
|
|
227
|
+
const v = u(s.dataTypes);
|
|
228
228
|
if (o = typeof v == "function" ? v(f) : v ? v.some((S) => f.includes(S)) : !0, !o)
|
|
229
229
|
return;
|
|
230
230
|
}
|
|
231
231
|
l.preventDefault(), a += 1, r.value = !0, (d = s.onEnter) == null || d.call(s, i(l), l);
|
|
232
232
|
}), N(e, "dragover", (l) => {
|
|
233
|
-
var
|
|
234
|
-
o && (l.preventDefault(), (
|
|
233
|
+
var c;
|
|
234
|
+
o && (l.preventDefault(), (c = s.onOver) == null || c.call(s, i(l), l));
|
|
235
235
|
}), N(e, "dragleave", (l) => {
|
|
236
|
-
var
|
|
237
|
-
o && (l.preventDefault(), a -= 1, a === 0 && (r.value = !1), (
|
|
236
|
+
var c;
|
|
237
|
+
o && (l.preventDefault(), a -= 1, a === 0 && (r.value = !1), (c = s.onLeave) == null || c.call(s, i(l), l));
|
|
238
238
|
}), N(e, "drop", (l) => {
|
|
239
|
-
var
|
|
240
|
-
l.preventDefault(), a = 0, r.value = !1, (
|
|
239
|
+
var c;
|
|
240
|
+
l.preventDefault(), a = 0, r.value = !1, (c = s.onDrop) == null || c.call(s, i(l), l);
|
|
241
241
|
});
|
|
242
242
|
}
|
|
243
243
|
return {
|
|
@@ -250,7 +250,7 @@ function Zt(e, t, r = {}) {
|
|
|
250
250
|
let o;
|
|
251
251
|
const s = De(() => n && "ResizeObserver" in n), i = () => {
|
|
252
252
|
o && (o.disconnect(), o = void 0);
|
|
253
|
-
}, l = m(() => Array.isArray(e) ? e.map((f) => re(f)) : [re(e)]),
|
|
253
|
+
}, l = m(() => Array.isArray(e) ? e.map((f) => re(f)) : [re(e)]), c = de(
|
|
254
254
|
l,
|
|
255
255
|
(f) => {
|
|
256
256
|
if (i(), s.value && n) {
|
|
@@ -261,7 +261,7 @@ function Zt(e, t, r = {}) {
|
|
|
261
261
|
},
|
|
262
262
|
{ immediate: !0, flush: "post", deep: !0 }
|
|
263
263
|
), d = () => {
|
|
264
|
-
i(),
|
|
264
|
+
i(), c();
|
|
265
265
|
};
|
|
266
266
|
return ke(d), {
|
|
267
267
|
isSupported: s,
|
|
@@ -274,15 +274,15 @@ function Kt(e, t = {}) {
|
|
|
274
274
|
windowResize: n = !0,
|
|
275
275
|
windowScroll: a = !0,
|
|
276
276
|
immediate: o = !0
|
|
277
|
-
} = t, s = g(0), i = g(0), l = g(0),
|
|
277
|
+
} = t, s = g(0), i = g(0), l = g(0), c = g(0), d = g(0), f = g(0), v = g(0), S = g(0);
|
|
278
278
|
function A() {
|
|
279
279
|
const z = re(e);
|
|
280
280
|
if (!z) {
|
|
281
|
-
r && (s.value = 0, i.value = 0, l.value = 0,
|
|
281
|
+
r && (s.value = 0, i.value = 0, l.value = 0, c.value = 0, d.value = 0, f.value = 0, v.value = 0, S.value = 0);
|
|
282
282
|
return;
|
|
283
283
|
}
|
|
284
284
|
const E = z.getBoundingClientRect();
|
|
285
|
-
s.value = E.height, i.value = E.bottom, l.value = E.left,
|
|
285
|
+
s.value = E.height, i.value = E.bottom, l.value = E.left, c.value = E.right, d.value = E.top, f.value = E.width, v.value = E.x, S.value = E.y;
|
|
286
286
|
}
|
|
287
287
|
return Zt(e, A), de(() => re(e), (z) => !z && A()), Xt(e, A, {
|
|
288
288
|
attributeFilter: ["style", "class"]
|
|
@@ -292,7 +292,7 @@ function Kt(e, t = {}) {
|
|
|
292
292
|
height: s,
|
|
293
293
|
bottom: i,
|
|
294
294
|
left: l,
|
|
295
|
-
right:
|
|
295
|
+
right: c,
|
|
296
296
|
top: d,
|
|
297
297
|
width: f,
|
|
298
298
|
x: v,
|
|
@@ -308,8 +308,8 @@ function Qt(e, t = {}) {
|
|
|
308
308
|
} = t, o = g(!1);
|
|
309
309
|
let s;
|
|
310
310
|
const i = (l) => {
|
|
311
|
-
const
|
|
312
|
-
s && (clearTimeout(s), s = void 0),
|
|
311
|
+
const c = l ? r : n;
|
|
312
|
+
s && (clearTimeout(s), s = void 0), c ? s = setTimeout(() => o.value = l, c) : o.value = l;
|
|
313
313
|
};
|
|
314
314
|
return a && (N(e, "mouseenter", () => i(!0), { passive: !0 }), N(e, "mouseleave", () => i(!1), { passive: !0 })), o;
|
|
315
315
|
}
|
|
@@ -325,20 +325,20 @@ function er(e = {}) {
|
|
|
325
325
|
} = e, r = g(null), { on: n, trigger: a } = Pt();
|
|
326
326
|
let o;
|
|
327
327
|
t && (o = t.createElement("input"), o.type = "file", o.onchange = (l) => {
|
|
328
|
-
const
|
|
329
|
-
r.value =
|
|
328
|
+
const c = l.target;
|
|
329
|
+
r.value = c.files, a(r.value);
|
|
330
330
|
});
|
|
331
331
|
const s = () => {
|
|
332
332
|
r.value = null, o && (o.value = "", a(null));
|
|
333
333
|
}, i = (l) => {
|
|
334
334
|
if (!o)
|
|
335
335
|
return;
|
|
336
|
-
const
|
|
336
|
+
const c = {
|
|
337
337
|
...Jt,
|
|
338
338
|
...e,
|
|
339
339
|
...l
|
|
340
340
|
};
|
|
341
|
-
o.multiple =
|
|
341
|
+
o.multiple = c.multiple, o.accept = c.accept, o.webkitdirectory = c.directory, Lt(c, "capture") && (o.capture = c.capture), c.reset && s(), o.click();
|
|
342
342
|
};
|
|
343
343
|
return {
|
|
344
344
|
files: Mt(r),
|
|
@@ -350,14 +350,14 @@ function er(e = {}) {
|
|
|
350
350
|
function tr(e, t = {}) {
|
|
351
351
|
const { initialValue: r = !1, focusVisible: n = !1 } = t, a = g(!1), o = m(() => re(e));
|
|
352
352
|
N(o, "focus", (i) => {
|
|
353
|
-
var l,
|
|
354
|
-
(!n || (
|
|
353
|
+
var l, c;
|
|
354
|
+
(!n || (c = (l = i.target).matches) != null && c.call(l, ":focus-visible")) && (a.value = !0);
|
|
355
355
|
}), N(o, "blur", () => a.value = !1);
|
|
356
356
|
const s = m({
|
|
357
357
|
get: () => a.value,
|
|
358
358
|
set(i) {
|
|
359
|
-
var l,
|
|
360
|
-
!i && a.value ? (l = o.value) == null || l.blur() : i && !a.value && ((
|
|
359
|
+
var l, c;
|
|
360
|
+
!i && a.value ? (l = o.value) == null || l.blur() : i && !a.value && ((c = o.value) == null || c.focus());
|
|
361
361
|
}
|
|
362
362
|
});
|
|
363
363
|
return de(
|
|
@@ -388,7 +388,7 @@ const at = /* @__PURE__ */ x({
|
|
|
388
388
|
disabled: { type: Boolean, default: !1 }
|
|
389
389
|
},
|
|
390
390
|
setup(e) {
|
|
391
|
-
const t = e, r =
|
|
391
|
+
const t = e, r = U(t), n = m(() => {
|
|
392
392
|
switch (t.size) {
|
|
393
393
|
case "sm":
|
|
394
394
|
return {
|
|
@@ -479,15 +479,15 @@ const at = /* @__PURE__ */ x({
|
|
|
479
479
|
return "btn-default";
|
|
480
480
|
}
|
|
481
481
|
});
|
|
482
|
-
return (l,
|
|
482
|
+
return (l, c) => (h(), P(ue(l.is), xe({
|
|
483
483
|
ref_key: "btn",
|
|
484
484
|
ref: a,
|
|
485
485
|
"data-size": l.size,
|
|
486
486
|
type: l.type,
|
|
487
487
|
class: ["flex items-center justify-center gap-1 decoration-none", [
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
l.icon ?
|
|
488
|
+
u(i),
|
|
489
|
+
u(r).class,
|
|
490
|
+
l.icon ? u(n).iconContent : u(n).normalContent,
|
|
491
491
|
{
|
|
492
492
|
"filter-grayscale pointer-events-none": l.disabled,
|
|
493
493
|
"active:translate-y-0.25": l.pressEffect === "translate",
|
|
@@ -496,11 +496,11 @@ const at = /* @__PURE__ */ x({
|
|
|
496
496
|
}
|
|
497
497
|
]],
|
|
498
498
|
style: [
|
|
499
|
-
|
|
499
|
+
u(r).style
|
|
500
500
|
],
|
|
501
501
|
disabled: l.disabled
|
|
502
502
|
}, l.$attrs), {
|
|
503
|
-
default:
|
|
503
|
+
default: L(() => [
|
|
504
504
|
l.$slots.leftSection ? k(l.$slots, "leftSection", { key: 0 }) : T("", !0),
|
|
505
505
|
k(l.$slots, "default"),
|
|
506
506
|
l.$slots.rightSection ? k(l.$slots, "rightSection", { key: 1 }) : T("", !0)
|
|
@@ -569,7 +569,7 @@ const Vn = /* @__PURE__ */ nr(or, [["render", sr]]), Dn = /* @__PURE__ */ x({
|
|
|
569
569
|
"rounded-tl": n.position === "left",
|
|
570
570
|
border: n.withBorder
|
|
571
571
|
},
|
|
572
|
-
|
|
572
|
+
u(r)
|
|
573
573
|
]])
|
|
574
574
|
}, [
|
|
575
575
|
k(n.$slots, "default")
|
|
@@ -608,7 +608,7 @@ const Vn = /* @__PURE__ */ nr(or, [["render", sr]]), Dn = /* @__PURE__ */ x({
|
|
|
608
608
|
return (n, a) => (h(), b("div", lr, [
|
|
609
609
|
w("div", {
|
|
610
610
|
class: y(["w-full rounded-xl px-3 py-2 transition-background-color,border-color", [
|
|
611
|
-
|
|
611
|
+
u(r)
|
|
612
612
|
]])
|
|
613
613
|
}, [
|
|
614
614
|
k(n.$slots, "default")
|
|
@@ -617,7 +617,7 @@ const Vn = /* @__PURE__ */ nr(or, [["render", sr]]), Dn = /* @__PURE__ */ x({
|
|
|
617
617
|
}
|
|
618
618
|
}), Ln = /* @__PURE__ */ x({
|
|
619
619
|
__name: "Chip",
|
|
620
|
-
props: /* @__PURE__ */
|
|
620
|
+
props: /* @__PURE__ */ W({
|
|
621
621
|
is: { default: "img" },
|
|
622
622
|
src: {},
|
|
623
623
|
size: { default: "md" },
|
|
@@ -630,7 +630,7 @@ const Vn = /* @__PURE__ */ nr(or, [["render", sr]]), Dn = /* @__PURE__ */ x({
|
|
|
630
630
|
}),
|
|
631
631
|
emits: ["update:modelValue"],
|
|
632
632
|
setup(e) {
|
|
633
|
-
const t = e, r =
|
|
633
|
+
const t = e, r = j(e, "modelValue"), n = U(t), a = m(() => {
|
|
634
634
|
switch (t.size) {
|
|
635
635
|
case "sm":
|
|
636
636
|
return "px-3 text-sm h-6";
|
|
@@ -640,10 +640,10 @@ const Vn = /* @__PURE__ */ nr(or, [["render", sr]]), Dn = /* @__PURE__ */ x({
|
|
|
640
640
|
return "px-8 h-10 text-lg";
|
|
641
641
|
}
|
|
642
642
|
}), o = m(() => r.value ? "container-filled-primary border-transparent" : "container-base"), s = m(() => r.value !== void 0), i = m(() => s.value ? "cursor-pointer" : "");
|
|
643
|
-
return (l,
|
|
644
|
-
class: y(["inline-flex items-center gap-1", [
|
|
645
|
-
style: C([
|
|
646
|
-
onPointerup:
|
|
643
|
+
return (l, c) => (h(), b("span", {
|
|
644
|
+
class: y(["inline-flex items-center gap-1", [u(n).class, u(a), u(o), u(i)]]),
|
|
645
|
+
style: C([u(n).style]),
|
|
646
|
+
onPointerup: c[0] || (c[0] = (d) => u(s) && (r.value = !r.value))
|
|
647
647
|
}, [
|
|
648
648
|
l.$slots.leftSection ? k(l.$slots, "leftSection", { key: 0 }) : T("", !0),
|
|
649
649
|
k(l.$slots, "default"),
|
|
@@ -862,7 +862,7 @@ function dr(e) {
|
|
|
862
862
|
g: 0,
|
|
863
863
|
b: 0
|
|
864
864
|
}, r = 1, n = null, a = null, o = null, s = !1, i = !1;
|
|
865
|
-
return typeof e == "string" && (e = Er(e)), $e(e) == "object" && (
|
|
865
|
+
return typeof e == "string" && (e = Er(e)), $e(e) == "object" && (G(e.r) && G(e.g) && G(e.b) ? (t = fr(e.r, e.g, e.b), s = !0, i = String(e.r).substr(-1) === "%" ? "prgb" : "rgb") : G(e.h) && G(e.s) && G(e.v) ? (n = me(e.s), a = me(e.v), t = pr(e.h, n, a), s = !0, i = "hsv") : G(e.h) && G(e.s) && G(e.l) && (n = me(e.s), o = me(e.l), t = hr(e.h, n, o), s = !0, i = "hsl"), e.hasOwnProperty("a") && (r = e.a)), r = st(r), {
|
|
866
866
|
ok: s,
|
|
867
867
|
format: e.format || i,
|
|
868
868
|
r: Math.min(255, Math.max(t.r, 0)),
|
|
@@ -907,8 +907,8 @@ function Ge(e, t, r) {
|
|
|
907
907
|
function hr(e, t, r) {
|
|
908
908
|
var n, a, o;
|
|
909
909
|
e = M(e, 360), t = M(t, 100), r = M(r, 100);
|
|
910
|
-
function s(
|
|
911
|
-
return f < 0 && (f += 1), f > 1 && (f -= 1), f < 1 / 6 ?
|
|
910
|
+
function s(c, d, f) {
|
|
911
|
+
return f < 0 && (f += 1), f > 1 && (f -= 1), f < 1 / 6 ? c + (d - c) * 6 * f : f < 1 / 2 ? d : f < 2 / 3 ? c + (d - c) * (2 / 3 - f) * 6 : c;
|
|
912
912
|
}
|
|
913
913
|
if (t === 0)
|
|
914
914
|
n = a = o = r;
|
|
@@ -949,9 +949,9 @@ function qe(e, t, r) {
|
|
|
949
949
|
}
|
|
950
950
|
function pr(e, t, r) {
|
|
951
951
|
e = M(e, 360) * 6, t = M(t, 100), r = M(r, 100);
|
|
952
|
-
var n = Math.floor(e), a = e - n, o = r * (1 - t), s = r * (1 - a * t), i = r * (1 - (1 - a) * t), l = n % 6,
|
|
952
|
+
var n = Math.floor(e), a = e - n, o = r * (1 - t), s = r * (1 - a * t), i = r * (1 - (1 - a) * t), l = n % 6, c = [r, s, o, o, i, r][l], d = [i, r, r, s, o, o][l], f = [o, o, i, r, r, s][l];
|
|
953
953
|
return {
|
|
954
|
-
r:
|
|
954
|
+
r: c * 255,
|
|
955
955
|
g: d * 255,
|
|
956
956
|
b: f * 255
|
|
957
957
|
};
|
|
@@ -1087,8 +1087,8 @@ p.isReadable = function(e, t, r) {
|
|
|
1087
1087
|
p.mostReadable = function(e, t, r) {
|
|
1088
1088
|
var n = null, a = 0, o, s, i, l;
|
|
1089
1089
|
r = r || {}, s = r.includeFallbackColors, i = r.level, l = r.size;
|
|
1090
|
-
for (var
|
|
1091
|
-
o = p.readability(e, t[
|
|
1090
|
+
for (var c = 0; c < t.length; c++)
|
|
1091
|
+
o = p.readability(e, t[c]), o > a && (a = o, n = p(t[c]));
|
|
1092
1092
|
return p.isReadable(e, n, {
|
|
1093
1093
|
level: i,
|
|
1094
1094
|
size: l
|
|
@@ -1299,7 +1299,7 @@ var V = function() {
|
|
|
1299
1299
|
hex8: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/
|
|
1300
1300
|
};
|
|
1301
1301
|
}();
|
|
1302
|
-
function
|
|
1302
|
+
function G(e) {
|
|
1303
1303
|
return !!V.CSS_UNIT.exec(e);
|
|
1304
1304
|
}
|
|
1305
1305
|
function Er(e) {
|
|
@@ -1398,18 +1398,18 @@ function Or() {
|
|
|
1398
1398
|
}
|
|
1399
1399
|
function it(e, t = !0) {
|
|
1400
1400
|
const r = g(e), n = g(e.scheme), a = Br();
|
|
1401
|
-
|
|
1401
|
+
X(() => {
|
|
1402
1402
|
a.value && (n.value = a.value);
|
|
1403
1403
|
}), ge("currentTheme", r), ge("currentThemeScheme", n);
|
|
1404
1404
|
const s = {
|
|
1405
|
-
...Object.keys(r.value.colors).map((
|
|
1406
|
-
const d =
|
|
1405
|
+
...Object.keys(r.value.colors).map((c) => {
|
|
1406
|
+
const d = c;
|
|
1407
1407
|
return r.value.colors[d].reduce((v, S, A) => {
|
|
1408
1408
|
const z = p(S).toRgb();
|
|
1409
1409
|
return v[`--r-color-${d}-${A}`] = `${z.r} ${z.g} ${z.b}`, v;
|
|
1410
1410
|
}, {});
|
|
1411
|
-
}).reduce((
|
|
1412
|
-
...
|
|
1411
|
+
}).reduce((c, d) => ({
|
|
1412
|
+
...c,
|
|
1413
1413
|
...d
|
|
1414
1414
|
}), {})
|
|
1415
1415
|
}, i = {
|
|
@@ -1419,8 +1419,8 @@ function it(e, t = !0) {
|
|
|
1419
1419
|
}, l = m(() => {
|
|
1420
1420
|
if (t)
|
|
1421
1421
|
return {};
|
|
1422
|
-
const { scheme:
|
|
1423
|
-
switch (
|
|
1422
|
+
const { scheme: c } = e;
|
|
1423
|
+
switch (c) {
|
|
1424
1424
|
case "dark":
|
|
1425
1425
|
return {
|
|
1426
1426
|
colorScheme: "dark",
|
|
@@ -1499,12 +1499,12 @@ const Nr = ["id"], Pr = ["for"], jn = /* @__PURE__ */ x({
|
|
|
1499
1499
|
},
|
|
1500
1500
|
emits: ["update:modelValue"],
|
|
1501
1501
|
setup(e) {
|
|
1502
|
-
const t =
|
|
1502
|
+
const t = j(e, "modelValue"), r = $t(), n = ct(r), a = g(null);
|
|
1503
1503
|
return (o, s) => {
|
|
1504
1504
|
const i = ir;
|
|
1505
1505
|
return h(), b("div", null, [
|
|
1506
1506
|
Te(w("input", {
|
|
1507
|
-
id:
|
|
1507
|
+
id: u(n),
|
|
1508
1508
|
ref_key: "input",
|
|
1509
1509
|
ref: a,
|
|
1510
1510
|
"onUpdate:modelValue": s[0] || (s[0] = (l) => t.value = l),
|
|
@@ -1513,7 +1513,7 @@ const Nr = ["id"], Pr = ["for"], jn = /* @__PURE__ */ x({
|
|
|
1513
1513
|
}, null, 8, Nr), [
|
|
1514
1514
|
[Ct, t.value]
|
|
1515
1515
|
]),
|
|
1516
|
-
w("label", { for:
|
|
1516
|
+
w("label", { for: u(n) }, [
|
|
1517
1517
|
Z(i, {
|
|
1518
1518
|
class: "cursor-pointer",
|
|
1519
1519
|
color: t.value ?? "#222"
|
|
@@ -1530,7 +1530,7 @@ const Nr = ["id"], Pr = ["for"], jn = /* @__PURE__ */ x({
|
|
|
1530
1530
|
setup(e) {
|
|
1531
1531
|
const r = it(e.theme, !1);
|
|
1532
1532
|
return (n, a) => (h(), b("div", {
|
|
1533
|
-
style: C([
|
|
1533
|
+
style: C([u(r)]),
|
|
1534
1534
|
"data-scheme": n.theme.scheme,
|
|
1535
1535
|
"data-theme": n.theme.name
|
|
1536
1536
|
}, [
|
|
@@ -1539,7 +1539,7 @@ const Nr = ["id"], Pr = ["for"], jn = /* @__PURE__ */ x({
|
|
|
1539
1539
|
}
|
|
1540
1540
|
}), dt = /* @__PURE__ */ x({
|
|
1541
1541
|
__name: "FullscreenOverlay",
|
|
1542
|
-
props: /* @__PURE__ */
|
|
1542
|
+
props: /* @__PURE__ */ W({
|
|
1543
1543
|
persistent: { type: Boolean, default: !1 },
|
|
1544
1544
|
blur: { type: [String, Boolean], default: !1 },
|
|
1545
1545
|
wrapperClass: {}
|
|
@@ -1549,9 +1549,9 @@ const Nr = ["id"], Pr = ["for"], jn = /* @__PURE__ */ x({
|
|
|
1549
1549
|
}),
|
|
1550
1550
|
emits: ["update:modelValue"],
|
|
1551
1551
|
setup(e) {
|
|
1552
|
-
const t = e, r =
|
|
1553
|
-
function a(
|
|
1554
|
-
t.persistent ||
|
|
1552
|
+
const t = e, r = j(e, "modelValue"), n = g(null);
|
|
1553
|
+
function a(c) {
|
|
1554
|
+
t.persistent || c.target === n.value && (r.value = !1);
|
|
1555
1555
|
}
|
|
1556
1556
|
const o = m(() => {
|
|
1557
1557
|
switch (t.blur) {
|
|
@@ -1565,28 +1565,31 @@ const Nr = ["id"], Pr = ["for"], jn = /* @__PURE__ */ x({
|
|
|
1565
1565
|
default:
|
|
1566
1566
|
return "";
|
|
1567
1567
|
}
|
|
1568
|
-
});
|
|
1569
|
-
|
|
1570
|
-
r.value ? document.body.style.overflow = "hidden" : setTimeout(() => {
|
|
1568
|
+
}), s = g(0);
|
|
1569
|
+
X(() => {
|
|
1570
|
+
r.value ? (document.body.style.overflow = "hidden", document.body.style.marginRight = `${s.value}px`) : setTimeout(() => {
|
|
1571
1571
|
document.querySelector(".modal-wrapper.op100") || (document.body.style.overflow = "", document.body.style.marginRight = "");
|
|
1572
1572
|
}, 300);
|
|
1573
|
-
})
|
|
1574
|
-
|
|
1575
|
-
|
|
1576
|
-
|
|
1573
|
+
}), new ResizeObserver(() => {
|
|
1574
|
+
const c = window.innerWidth - document.body.clientWidth;
|
|
1575
|
+
c !== 0 && (s.value = c);
|
|
1576
|
+
}).observe(document.body);
|
|
1577
|
+
const l = Or();
|
|
1578
|
+
return (c, d) => {
|
|
1579
|
+
const f = Vr;
|
|
1577
1580
|
return h(), P(At, { to: "body" }, [
|
|
1578
|
-
Z(
|
|
1579
|
-
default:
|
|
1581
|
+
Z(f, { theme: u(l) }, {
|
|
1582
|
+
default: L(() => [
|
|
1580
1583
|
w("div", {
|
|
1581
1584
|
ref_key: "wrapperRef",
|
|
1582
1585
|
ref: n,
|
|
1583
|
-
class: y(["modal-wrapper fixed left-0 top-0 z-100 h-full w-full bg-surface-lowest/50 transition-all duration-300 md:items-center", [o.value,
|
|
1586
|
+
class: y(["modal-wrapper fixed left-0 top-0 z-100 h-full w-full bg-surface-lowest/50 transition-all duration-300 md:items-center", [o.value, c.wrapperClass, {
|
|
1584
1587
|
"op0 pointer-events-none": !r.value,
|
|
1585
1588
|
op100: r.value
|
|
1586
1589
|
}]]),
|
|
1587
1590
|
onClick: a
|
|
1588
1591
|
}, [
|
|
1589
|
-
k(
|
|
1592
|
+
k(c.$slots, "default")
|
|
1590
1593
|
], 2)
|
|
1591
1594
|
]),
|
|
1592
1595
|
_: 3
|
|
@@ -1596,7 +1599,7 @@ const Nr = ["id"], Pr = ["for"], jn = /* @__PURE__ */ x({
|
|
|
1596
1599
|
}
|
|
1597
1600
|
}), Dr = { class: "flex justify-end p-4 md:px-6 md:py-4 md:pb-0" }, Fr = /* @__PURE__ */ w("i", { class: "i-tabler-x" }, null, -1), Lr = { class: "h-full flex flex-col items-center justify-center px-4 md:px-6" }, Un = /* @__PURE__ */ x({
|
|
1598
1601
|
__name: "Drawer",
|
|
1599
|
-
props: /* @__PURE__ */
|
|
1602
|
+
props: /* @__PURE__ */ W({
|
|
1600
1603
|
persistent: { type: Boolean, default: !1 },
|
|
1601
1604
|
blur: { type: [String, Boolean], default: !1 },
|
|
1602
1605
|
position: { default: "left" }
|
|
@@ -1606,12 +1609,8 @@ const Nr = ["id"], Pr = ["for"], jn = /* @__PURE__ */ x({
|
|
|
1606
1609
|
}),
|
|
1607
1610
|
emits: ["update:modelValue"],
|
|
1608
1611
|
setup(e) {
|
|
1609
|
-
const t = e, r =
|
|
1610
|
-
return
|
|
1611
|
-
r.value ? document.body.style.overflow = "hidden" : setTimeout(() => {
|
|
1612
|
-
document.querySelector(".modal-wrapper.op100") || (document.body.style.overflow = "", document.body.style.marginRight = "");
|
|
1613
|
-
}, 300);
|
|
1614
|
-
}), (n, a) => {
|
|
1612
|
+
const t = e, r = j(e, "modelValue");
|
|
1613
|
+
return (n, a) => {
|
|
1615
1614
|
const o = at, s = dt;
|
|
1616
1615
|
return h(), P(s, {
|
|
1617
1616
|
modelValue: r.value,
|
|
@@ -1619,7 +1618,7 @@ const Nr = ["id"], Pr = ["for"], jn = /* @__PURE__ */ x({
|
|
|
1619
1618
|
blur: t.blur,
|
|
1620
1619
|
persistent: t.persistent
|
|
1621
1620
|
}, {
|
|
1622
|
-
default:
|
|
1621
|
+
default: L(() => [
|
|
1623
1622
|
Z(rt, {
|
|
1624
1623
|
"enter-from-class": n.position === "left" ? "-translate-x-1/1" : "translate-x-1/1",
|
|
1625
1624
|
"enter-to-class": (n.position === "left", "translate-x-0"),
|
|
@@ -1628,7 +1627,7 @@ const Nr = ["id"], Pr = ["for"], jn = /* @__PURE__ */ x({
|
|
|
1628
1627
|
"enter-active-class": "transition ease-out duration-300",
|
|
1629
1628
|
"leave-active-class": "transition ease-in duration-200"
|
|
1630
1629
|
}, {
|
|
1631
|
-
default:
|
|
1630
|
+
default: L(() => [
|
|
1632
1631
|
r.value ? (h(), b("div", {
|
|
1633
1632
|
key: 0,
|
|
1634
1633
|
class: y(["fixed h-full w-full bg-surface-low md:w-md", n.position === "left" ? "left-0" : "right-0"])
|
|
@@ -1640,7 +1639,7 @@ const Nr = ["id"], Pr = ["for"], jn = /* @__PURE__ */ x({
|
|
|
1640
1639
|
class: "text-surface-on hover:text-surface-on",
|
|
1641
1640
|
onPointerup: a[0] || (a[0] = (i) => r.value = !1)
|
|
1642
1641
|
}, {
|
|
1643
|
-
default:
|
|
1642
|
+
default: L(() => [
|
|
1644
1643
|
Fr
|
|
1645
1644
|
]),
|
|
1646
1645
|
_: 1
|
|
@@ -1677,15 +1676,15 @@ const Nr = ["id"], Pr = ["for"], jn = /* @__PURE__ */ x({
|
|
|
1677
1676
|
n("drop", l);
|
|
1678
1677
|
}
|
|
1679
1678
|
});
|
|
1680
|
-
return (l,
|
|
1679
|
+
return (l, c) => (h(), b("div", {
|
|
1681
1680
|
ref_key: "dropZoneRef",
|
|
1682
1681
|
ref: a,
|
|
1683
1682
|
class: y([{
|
|
1684
|
-
"":
|
|
1685
|
-
" bg-surface-low": !
|
|
1683
|
+
"": u(i),
|
|
1684
|
+
" bg-surface-low": !u(i),
|
|
1686
1685
|
"border-dashed": l.dashed
|
|
1687
1686
|
}, "h-full w-full flex cursor-pointer items-center justify-center rounded"]),
|
|
1688
|
-
onPointerup:
|
|
1687
|
+
onPointerup: c[0] || (c[0] = () => u(s)())
|
|
1689
1688
|
}, [
|
|
1690
1689
|
k(l.$slots, "default")
|
|
1691
1690
|
], 34));
|
|
@@ -1712,7 +1711,7 @@ const Nr = ["id"], Pr = ["for"], jn = /* @__PURE__ */ x({
|
|
|
1712
1711
|
var s;
|
|
1713
1712
|
(s = n.value) != null && s.complete && a();
|
|
1714
1713
|
});
|
|
1715
|
-
const o =
|
|
1714
|
+
const o = U(t);
|
|
1716
1715
|
return (s, i) => (h(), b("div", {
|
|
1717
1716
|
style: C({
|
|
1718
1717
|
height: s.height,
|
|
@@ -1727,26 +1726,26 @@ const Nr = ["id"], Pr = ["for"], jn = /* @__PURE__ */ x({
|
|
|
1727
1726
|
ref: n,
|
|
1728
1727
|
style: [
|
|
1729
1728
|
s.style,
|
|
1730
|
-
|
|
1729
|
+
u(o).style
|
|
1731
1730
|
],
|
|
1732
1731
|
src: s.src,
|
|
1733
1732
|
class: ["h-full w-full object-cover", [
|
|
1734
1733
|
t.class,
|
|
1735
|
-
|
|
1734
|
+
u(o).class,
|
|
1736
1735
|
{
|
|
1737
|
-
hidden: !
|
|
1736
|
+
hidden: !u(r)
|
|
1738
1737
|
}
|
|
1739
1738
|
]]
|
|
1740
1739
|
}, s.$attrs, { onLoad: a }), null, 16, ["style", "src", "class"])) : T("", !0),
|
|
1741
|
-
|
|
1740
|
+
u(r) ? T("", !0) : (h(), b("div", {
|
|
1742
1741
|
key: 1,
|
|
1743
1742
|
class: y(["h-full w-full animate-pulse border-transparent bg-surface-high object-cover", [
|
|
1744
1743
|
t.class,
|
|
1745
|
-
|
|
1744
|
+
u(o).class
|
|
1746
1745
|
]]),
|
|
1747
1746
|
style: C([
|
|
1748
1747
|
s.style,
|
|
1749
|
-
|
|
1748
|
+
u(o).style
|
|
1750
1749
|
])
|
|
1751
1750
|
}, null, 6))
|
|
1752
1751
|
], 4));
|
|
@@ -1807,15 +1806,15 @@ const Nr = ["id"], Pr = ["for"], jn = /* @__PURE__ */ x({
|
|
|
1807
1806
|
});
|
|
1808
1807
|
return (i, l) => (h(), b("div", Wr, [
|
|
1809
1808
|
w("div", {
|
|
1810
|
-
class: y([[
|
|
1809
|
+
class: y([[u(o), u(a)], "absolute z-1"])
|
|
1811
1810
|
}, [
|
|
1812
1811
|
t.ping ? (h(), b("div", {
|
|
1813
1812
|
key: 0,
|
|
1814
1813
|
class: y(["absolute box-content animate-ping border-2 border-transparent rounded-full", [
|
|
1815
1814
|
{
|
|
1816
|
-
[
|
|
1815
|
+
[u(r)]: !i.$slots.label
|
|
1817
1816
|
},
|
|
1818
|
-
|
|
1817
|
+
u(s)
|
|
1819
1818
|
]])
|
|
1820
1819
|
}, [
|
|
1821
1820
|
i.$slots.label ? k(i.$slots, "label", { key: 0 }) : T("", !0)
|
|
@@ -1823,9 +1822,9 @@ const Nr = ["id"], Pr = ["for"], jn = /* @__PURE__ */ x({
|
|
|
1823
1822
|
w("div", {
|
|
1824
1823
|
class: y(["top-0 box-content border-2 border-surface-low rounded-full", [
|
|
1825
1824
|
{
|
|
1826
|
-
[
|
|
1825
|
+
[u(r)]: !i.$slots.label
|
|
1827
1826
|
},
|
|
1828
|
-
|
|
1827
|
+
u(s)
|
|
1829
1828
|
]])
|
|
1830
1829
|
}, [
|
|
1831
1830
|
i.$slots.label ? k(i.$slots, "label", { key: 0 }) : T("", !0)
|
|
@@ -1836,7 +1835,7 @@ const Nr = ["id"], Pr = ["for"], jn = /* @__PURE__ */ x({
|
|
|
1836
1835
|
}
|
|
1837
1836
|
}), Yn = /* @__PURE__ */ x({
|
|
1838
1837
|
__name: "Modal",
|
|
1839
|
-
props: /* @__PURE__ */
|
|
1838
|
+
props: /* @__PURE__ */ W({
|
|
1840
1839
|
persistent: { type: Boolean, default: !1 },
|
|
1841
1840
|
blur: { type: [String, Boolean], default: !1 }
|
|
1842
1841
|
}, {
|
|
@@ -1845,12 +1844,8 @@ const Nr = ["id"], Pr = ["for"], jn = /* @__PURE__ */ x({
|
|
|
1845
1844
|
}),
|
|
1846
1845
|
emits: ["update:modelValue"],
|
|
1847
1846
|
setup(e) {
|
|
1848
|
-
const t = e, r =
|
|
1849
|
-
return
|
|
1850
|
-
r.value ? document.body.style.overflow = "hidden" : setTimeout(() => {
|
|
1851
|
-
document.querySelector(".modal-wrapper.op100") || (document.body.style.overflow = "", document.body.style.marginRight = "");
|
|
1852
|
-
}, 300);
|
|
1853
|
-
}), (n, a) => {
|
|
1847
|
+
const t = e, r = j(e, "modelValue");
|
|
1848
|
+
return (n, a) => {
|
|
1854
1849
|
const o = dt;
|
|
1855
1850
|
return h(), P(o, {
|
|
1856
1851
|
modelValue: r.value,
|
|
@@ -1859,7 +1854,7 @@ const Nr = ["id"], Pr = ["for"], jn = /* @__PURE__ */ x({
|
|
|
1859
1854
|
persistent: t.persistent,
|
|
1860
1855
|
"wrapper-class": "flex items-end justify-center"
|
|
1861
1856
|
}, {
|
|
1862
|
-
default:
|
|
1857
|
+
default: L(() => [
|
|
1863
1858
|
Z(rt, {
|
|
1864
1859
|
"enter-from-class": "translate-y-1/2",
|
|
1865
1860
|
"enter-to-class": "translate-y-0",
|
|
@@ -1868,7 +1863,7 @@ const Nr = ["id"], Pr = ["for"], jn = /* @__PURE__ */ x({
|
|
|
1868
1863
|
"enter-active-class": "transition ease-out duration-300",
|
|
1869
1864
|
"leave-active-class": "transition ease-in duration-200"
|
|
1870
1865
|
}, {
|
|
1871
|
-
default:
|
|
1866
|
+
default: L(() => [
|
|
1872
1867
|
r.value ? k(n.$slots, "default", { key: 0 }) : T("", !0)
|
|
1873
1868
|
]),
|
|
1874
1869
|
_: 3
|
|
@@ -1899,7 +1894,7 @@ const Nr = ["id"], Pr = ["for"], jn = /* @__PURE__ */ x({
|
|
|
1899
1894
|
},
|
|
1900
1895
|
emits: ["close"],
|
|
1901
1896
|
setup(e) {
|
|
1902
|
-
const t = e, r =
|
|
1897
|
+
const t = e, r = U(t), n = m(() => {
|
|
1903
1898
|
switch (t.color) {
|
|
1904
1899
|
case "secondary":
|
|
1905
1900
|
return "bg-secondary-container";
|
|
@@ -1927,17 +1922,17 @@ const Nr = ["id"], Pr = ["for"], jn = /* @__PURE__ */ x({
|
|
|
1927
1922
|
return h(), b("div", {
|
|
1928
1923
|
class: y(["relative min-h-16 min-w-80 w-full flex items-center gap-2 container-low p-3", [
|
|
1929
1924
|
{ "border-0": !o.withBorder },
|
|
1930
|
-
|
|
1925
|
+
u(r).class,
|
|
1931
1926
|
{
|
|
1932
1927
|
"max-w-100": !o.block,
|
|
1933
1928
|
"w-full": o.block
|
|
1934
1929
|
}
|
|
1935
1930
|
]]),
|
|
1936
|
-
style: C(
|
|
1931
|
+
style: C(u(r).style)
|
|
1937
1932
|
}, [
|
|
1938
1933
|
o.icon ? (h(), b("div", {
|
|
1939
1934
|
key: 0,
|
|
1940
|
-
class: y(["leading-0",
|
|
1935
|
+
class: y(["leading-0", u(a)])
|
|
1941
1936
|
}, [
|
|
1942
1937
|
o.loading ? (h(), b("i", jr)) : (h(), b("i", {
|
|
1943
1938
|
key: 1,
|
|
@@ -1947,13 +1942,13 @@ const Nr = ["id"], Pr = ["for"], jn = /* @__PURE__ */ x({
|
|
|
1947
1942
|
w("div", {
|
|
1948
1943
|
class: y(["absolute left-[0.25rem] top-[0.25rem] h-[calc(100%-0.5rem)] w-1 rounded-full", [{
|
|
1949
1944
|
"animate-pulse": o.loading
|
|
1950
|
-
},
|
|
1945
|
+
}, u(n)]])
|
|
1951
1946
|
}, null, 2)
|
|
1952
1947
|
])),
|
|
1953
1948
|
w("div", Gr, [
|
|
1954
1949
|
o.title ? (h(), b("div", {
|
|
1955
1950
|
key: 0,
|
|
1956
|
-
class: y([
|
|
1951
|
+
class: y([u(a), "text-base"])
|
|
1957
1952
|
}, se(o.title), 3)) : T("", !0),
|
|
1958
1953
|
o.$slots.message ? k(o.$slots, "message", { key: 1 }) : o.message ? (h(), b("div", qr, se(o.message), 1)) : T("", !0)
|
|
1959
1954
|
]),
|
|
@@ -1964,7 +1959,7 @@ const Nr = ["id"], Pr = ["for"], jn = /* @__PURE__ */ x({
|
|
|
1964
1959
|
class: "text-surface-on hover:text-surface-on",
|
|
1965
1960
|
onClick: s[0] || (s[0] = (l) => o.$emit("close"))
|
|
1966
1961
|
}, {
|
|
1967
|
-
default:
|
|
1962
|
+
default: L(() => [
|
|
1968
1963
|
Xr
|
|
1969
1964
|
]),
|
|
1970
1965
|
_: 1
|
|
@@ -1974,7 +1969,7 @@ const Nr = ["id"], Pr = ["for"], jn = /* @__PURE__ */ x({
|
|
|
1974
1969
|
}
|
|
1975
1970
|
}), ft = /* @__PURE__ */ new Set(), O = /* @__PURE__ */ new WeakMap(), le = /* @__PURE__ */ new WeakMap(), ne = /* @__PURE__ */ new WeakMap(), Ne = /* @__PURE__ */ new WeakMap(), Zr = /* @__PURE__ */ new WeakMap(), ie = /* @__PURE__ */ new WeakMap(), Ce = /* @__PURE__ */ new WeakMap(), ve = /* @__PURE__ */ new WeakSet();
|
|
1976
1971
|
let J, Fe = 0, Le = 0;
|
|
1977
|
-
const
|
|
1972
|
+
const q = "__aa_tgt", we = "__aa_del", Ae = "__aa_new", Kr = (e) => {
|
|
1978
1973
|
const t = rn(e);
|
|
1979
1974
|
t && t.forEach((r) => nn(r));
|
|
1980
1975
|
}, Qr = (e) => {
|
|
@@ -1993,14 +1988,14 @@ function Jr(e) {
|
|
|
1993
1988
|
o - (r.left + a + r.width),
|
|
1994
1989
|
s - (r.top + a + r.height),
|
|
1995
1990
|
r.left - a
|
|
1996
|
-
].map((d) => `${-1 * Math.floor(d)}px`).join(" "),
|
|
1991
|
+
].map((d) => `${-1 * Math.floor(d)}px`).join(" "), c = new IntersectionObserver(() => {
|
|
1997
1992
|
++n > 1 && oe(e);
|
|
1998
1993
|
}, {
|
|
1999
1994
|
root: J,
|
|
2000
1995
|
threshold: 1,
|
|
2001
1996
|
rootMargin: l
|
|
2002
1997
|
});
|
|
2003
|
-
|
|
1998
|
+
c.observe(e), Ne.set(e, c);
|
|
2004
1999
|
}
|
|
2005
2000
|
function oe(e) {
|
|
2006
2001
|
clearTimeout(Ce.get(e));
|
|
@@ -2065,14 +2060,14 @@ function rn(e) {
|
|
|
2065
2060
|
}, /* @__PURE__ */ new Set());
|
|
2066
2061
|
}
|
|
2067
2062
|
function Oe(e, t) {
|
|
2068
|
-
!t && !(
|
|
2063
|
+
!t && !(q in e) ? Object.defineProperty(e, q, { value: e }) : t && !(q in t) && Object.defineProperty(t, q, { value: e });
|
|
2069
2064
|
}
|
|
2070
2065
|
function nn(e) {
|
|
2071
2066
|
var t;
|
|
2072
2067
|
const r = e.isConnected, n = O.has(e);
|
|
2073
2068
|
r && le.has(e) && le.delete(e), ne.has(e) && ((t = ne.get(e)) === null || t === void 0 || t.cancel()), Ae in e ? Qe(e) : n && r ? an(e) : n && !r ? sn(e) : Qe(e);
|
|
2074
2069
|
}
|
|
2075
|
-
function
|
|
2070
|
+
function F(e) {
|
|
2076
2071
|
return Number(e.replace(/[^0-9.\-]/g, ""));
|
|
2077
2072
|
}
|
|
2078
2073
|
function on(e) {
|
|
@@ -2097,17 +2092,17 @@ function pt(e, t, r) {
|
|
|
2097
2092
|
let n = t.width, a = t.height, o = r.width, s = r.height;
|
|
2098
2093
|
const i = getComputedStyle(e);
|
|
2099
2094
|
if (i.getPropertyValue("box-sizing") === "content-box") {
|
|
2100
|
-
const
|
|
2101
|
-
n -= d, o -= d, a -=
|
|
2095
|
+
const c = F(i.paddingTop) + F(i.paddingBottom) + F(i.borderTopWidth) + F(i.borderBottomWidth), d = F(i.paddingLeft) + F(i.paddingRight) + F(i.borderRightWidth) + F(i.borderLeftWidth);
|
|
2096
|
+
n -= d, o -= d, a -= c, s -= c;
|
|
2102
2097
|
}
|
|
2103
2098
|
return [n, o, a, s].map(Math.round);
|
|
2104
2099
|
}
|
|
2105
2100
|
function Re(e) {
|
|
2106
|
-
return
|
|
2101
|
+
return q in e && ie.has(e[q]) ? ie.get(e[q]) : { duration: 250, easing: "ease-in-out" };
|
|
2107
2102
|
}
|
|
2108
2103
|
function mt(e) {
|
|
2109
|
-
if (
|
|
2110
|
-
return e[
|
|
2104
|
+
if (q in e)
|
|
2105
|
+
return e[q];
|
|
2111
2106
|
}
|
|
2112
2107
|
function We(e) {
|
|
2113
2108
|
const t = mt(e);
|
|
@@ -2135,12 +2130,12 @@ function an(e) {
|
|
|
2135
2130
|
return;
|
|
2136
2131
|
const a = Re(e);
|
|
2137
2132
|
if (typeof a != "function") {
|
|
2138
|
-
const o = t.left - r.left, s = t.top - r.top, [i, l,
|
|
2133
|
+
const o = t.left - r.left, s = t.top - r.top, [i, l, c, d] = pt(e, t, r), f = {
|
|
2139
2134
|
transform: `translate(${o}px, ${s}px)`
|
|
2140
2135
|
}, v = {
|
|
2141
2136
|
transform: "translate(0, 0)"
|
|
2142
2137
|
};
|
|
2143
|
-
i !== l && (f.width = `${i}px`, v.width = `${l}px`),
|
|
2138
|
+
i !== l && (f.width = `${i}px`, v.width = `${l}px`), c !== d && (f.height = `${c}px`, v.height = `${d}px`), n = e.animate([f, v], {
|
|
2144
2139
|
duration: a.duration,
|
|
2145
2140
|
easing: a.easing
|
|
2146
2141
|
});
|
|
@@ -2190,14 +2185,14 @@ function sn(e) {
|
|
|
2190
2185
|
const a = window.scrollX, o = window.scrollY;
|
|
2191
2186
|
if (n && n.parentNode && n.parentNode instanceof Element ? n.parentNode.insertBefore(e, n) : r && r.parentNode ? r.parentNode.appendChild(e) : (t = mt(e)) === null || t === void 0 || t.appendChild(e), !We(e))
|
|
2192
2187
|
return Je(e);
|
|
2193
|
-
const [s, i, l,
|
|
2188
|
+
const [s, i, l, c] = cn(e), d = Re(e), f = O.get(e);
|
|
2194
2189
|
(a !== Fe || o !== Le) && ln(e, a, o, d);
|
|
2195
2190
|
let v, S = {
|
|
2196
2191
|
position: "absolute",
|
|
2197
2192
|
top: `${s}px`,
|
|
2198
2193
|
left: `${i}px`,
|
|
2199
2194
|
width: `${l}px`,
|
|
2200
|
-
height: `${
|
|
2195
|
+
height: `${c}px`,
|
|
2201
2196
|
margin: "0",
|
|
2202
2197
|
pointerEvents: "none",
|
|
2203
2198
|
transformOrigin: "center",
|
|
@@ -2225,16 +2220,16 @@ function ln(e, t, r, n) {
|
|
|
2225
2220
|
if (getComputedStyle(J).scrollBehavior === "smooth" && (document.documentElement.style.scrollBehavior = "auto"), window.scrollTo(window.scrollX + a, window.scrollY + o), !e.parentElement)
|
|
2226
2221
|
return;
|
|
2227
2222
|
const l = e.parentElement;
|
|
2228
|
-
let
|
|
2223
|
+
let c = l.clientHeight, d = l.clientWidth;
|
|
2229
2224
|
const f = performance.now();
|
|
2230
2225
|
function v() {
|
|
2231
2226
|
requestAnimationFrame(() => {
|
|
2232
2227
|
if (!_e(n)) {
|
|
2233
|
-
const S =
|
|
2228
|
+
const S = c - l.clientHeight, A = d - l.clientWidth;
|
|
2234
2229
|
f + n.duration > performance.now() ? (window.scrollTo({
|
|
2235
2230
|
left: window.scrollX - A,
|
|
2236
2231
|
top: window.scrollY - S
|
|
2237
|
-
}),
|
|
2232
|
+
}), c = l.clientHeight, d = l.clientWidth, v()) : document.documentElement.style.scrollBehavior = s;
|
|
2238
2233
|
}
|
|
2239
2234
|
});
|
|
2240
2235
|
}
|
|
@@ -2246,7 +2241,7 @@ function cn(e) {
|
|
|
2246
2241
|
for (; a && (getComputedStyle(a).position === "static" || a instanceof HTMLBodyElement); )
|
|
2247
2242
|
a = a.parentElement;
|
|
2248
2243
|
a || (a = document.body);
|
|
2249
|
-
const o = getComputedStyle(a), s = O.get(a) || ce(a), i = Math.round(t.top - s.top) -
|
|
2244
|
+
const o = getComputedStyle(a), s = O.get(a) || ce(a), i = Math.round(t.top - s.top) - F(o.borderTopWidth), l = Math.round(t.left - s.left) - F(o.borderLeftWidth);
|
|
2250
2245
|
return [i, l, r, n];
|
|
2251
2246
|
}
|
|
2252
2247
|
function un(e, t = {}) {
|
|
@@ -2274,7 +2269,7 @@ const dn = {
|
|
|
2274
2269
|
return (r, n) => {
|
|
2275
2270
|
const a = Yr;
|
|
2276
2271
|
return Te((h(), b("div", fn, [
|
|
2277
|
-
(h(!0), b(K, null, ye(
|
|
2272
|
+
(h(!0), b(K, null, ye(u(t), (o) => (h(), P(a, {
|
|
2278
2273
|
key: o.hash,
|
|
2279
2274
|
closeable: "",
|
|
2280
2275
|
"with-border": "",
|
|
@@ -2283,10 +2278,10 @@ const dn = {
|
|
|
2283
2278
|
icon: o.icon,
|
|
2284
2279
|
loading: o.loading,
|
|
2285
2280
|
color: o.color,
|
|
2286
|
-
onClose: (s) =>
|
|
2281
|
+
onClose: (s) => u(t).splice(u(t).indexOf(o), 1)
|
|
2287
2282
|
}, null, 8, ["title", "message", "icon", "loading", "color", "onClose"]))), 128))
|
|
2288
2283
|
])), [
|
|
2289
|
-
[
|
|
2284
|
+
[u(dn)]
|
|
2290
2285
|
]);
|
|
2291
2286
|
};
|
|
2292
2287
|
}
|
|
@@ -2311,7 +2306,7 @@ const dn = {
|
|
|
2311
2306
|
default:
|
|
2312
2307
|
return "";
|
|
2313
2308
|
}
|
|
2314
|
-
}), n =
|
|
2309
|
+
}), n = U(t), a = g(null), o = p(t.color).toRgb(), s = m(() => ({
|
|
2315
2310
|
backgroundColor: `rgba(${o.r}, ${o.g}, ${o.b}, ${t.opacity / 100})`
|
|
2316
2311
|
}));
|
|
2317
2312
|
return (i, l) => (h(), b("div", hn, [
|
|
@@ -2319,8 +2314,8 @@ const dn = {
|
|
|
2319
2314
|
w("div", xe(i.$attrs, {
|
|
2320
2315
|
ref_key: "wrapperRef",
|
|
2321
2316
|
ref: a,
|
|
2322
|
-
class: [[
|
|
2323
|
-
style: [
|
|
2317
|
+
class: [[u(r), u(n).class], "absolute left-0 top-0 h-full w-full overflow-hidden md:items-center"],
|
|
2318
|
+
style: [u(n).style, u(s)]
|
|
2324
2319
|
}), [
|
|
2325
2320
|
k(i.$slots, "content")
|
|
2326
2321
|
], 16)
|
|
@@ -2335,17 +2330,17 @@ const dn = {
|
|
|
2335
2330
|
is: { default: "div" }
|
|
2336
2331
|
},
|
|
2337
2332
|
setup(e) {
|
|
2338
|
-
const r =
|
|
2333
|
+
const r = U(e);
|
|
2339
2334
|
return (n, a) => (h(), P(ue(n.is), {
|
|
2340
2335
|
class: y(["container-low rounded-lg p-4", [
|
|
2341
2336
|
{
|
|
2342
2337
|
"border-transparent": !n.withBorder
|
|
2343
2338
|
},
|
|
2344
|
-
|
|
2339
|
+
u(r).class
|
|
2345
2340
|
]]),
|
|
2346
|
-
style: C([
|
|
2341
|
+
style: C([u(r).style])
|
|
2347
2342
|
}, {
|
|
2348
|
-
default:
|
|
2343
|
+
default: L(() => [
|
|
2349
2344
|
k(n.$slots, "default")
|
|
2350
2345
|
]),
|
|
2351
2346
|
_: 3
|
|
@@ -2353,7 +2348,7 @@ const dn = {
|
|
|
2353
2348
|
}
|
|
2354
2349
|
}), pn = ["placeholder", "type"], mn = /* @__PURE__ */ x({
|
|
2355
2350
|
__name: "TextField",
|
|
2356
|
-
props: /* @__PURE__ */
|
|
2351
|
+
props: /* @__PURE__ */ W({
|
|
2357
2352
|
onChange: {},
|
|
2358
2353
|
color: { default: "primary" },
|
|
2359
2354
|
error: { type: Boolean },
|
|
@@ -2368,7 +2363,7 @@ const dn = {
|
|
|
2368
2363
|
}),
|
|
2369
2364
|
emits: ["update:modelValue"],
|
|
2370
2365
|
setup(e, { expose: t }) {
|
|
2371
|
-
const r = e, n =
|
|
2366
|
+
const r = e, n = j(e, "modelValue"), a = m(() => {
|
|
2372
2367
|
switch (r.size) {
|
|
2373
2368
|
case "sm":
|
|
2374
2369
|
return {
|
|
@@ -2397,16 +2392,16 @@ const dn = {
|
|
|
2397
2392
|
default:
|
|
2398
2393
|
return "text-surface-on bg-surface-base border-surface-border-base focus:border-primary-container";
|
|
2399
2394
|
}
|
|
2400
|
-
}), s = m(() => r.disabled ? "pointer-events-none filter grayscale opacity-60" : ""), i =
|
|
2395
|
+
}), s = m(() => r.disabled ? "pointer-events-none filter grayscale opacity-60" : ""), i = U(r), l = g(null);
|
|
2401
2396
|
return t({
|
|
2402
2397
|
el: l
|
|
2403
|
-
}), (
|
|
2398
|
+
}), (c, d) => Te((h(), b("input", {
|
|
2404
2399
|
ref_key: "input",
|
|
2405
2400
|
ref: l,
|
|
2406
2401
|
"onUpdate:modelValue": d[0] || (d[0] = (f) => n.value = f),
|
|
2407
|
-
class: y(["bg-back-2 border px-2 py-1 outline-none transition-background-color,border-color,color", [
|
|
2408
|
-
style: C([
|
|
2409
|
-
placeholder:
|
|
2402
|
+
class: y(["bg-back-2 border px-2 py-1 outline-none transition-background-color,border-color,color", [u(o), u(s), u(i).class, u(a).base]]),
|
|
2403
|
+
style: C([u(i).style]),
|
|
2404
|
+
placeholder: c.placeholder,
|
|
2410
2405
|
type: r.password ? "password" : "text"
|
|
2411
2406
|
}, null, 14, pn)), [
|
|
2412
2407
|
[Tt, n.value]
|
|
@@ -2425,8 +2420,8 @@ const dn = {
|
|
|
2425
2420
|
function n(o) {
|
|
2426
2421
|
o.preventDefault(), o.stopPropagation();
|
|
2427
2422
|
const s = r.value.findIndex((l) => l.el === o.target), i = o.target.value ?? "";
|
|
2428
|
-
o.target.value = "", Array.from(i).forEach((l,
|
|
2429
|
-
s +
|
|
2423
|
+
o.target.value = "", Array.from(i).forEach((l, c) => {
|
|
2424
|
+
s + c >= r.value.length || (r.value[s + c].el.value = l, s + c + 1 < r.value.length ? (r.value[s + c + 1].el.focus(), r.value[s + c + 1].el.select()) : r.value[s + c].el.blur());
|
|
2430
2425
|
});
|
|
2431
2426
|
}
|
|
2432
2427
|
function a(o) {
|
|
@@ -2483,17 +2478,17 @@ const dn = {
|
|
|
2483
2478
|
case "error":
|
|
2484
2479
|
return "bg-error-7";
|
|
2485
2480
|
}
|
|
2486
|
-
}), a =
|
|
2481
|
+
}), a = U(t);
|
|
2487
2482
|
return (o, s) => (h(), b("div", {
|
|
2488
|
-
class: y(["relative w-full self-center overflow-hidden bg-surface-high transition-background-color,border-color,color", [
|
|
2489
|
-
style: C([
|
|
2483
|
+
class: y(["relative w-full self-center overflow-hidden bg-surface-high transition-background-color,border-color,color", [u(r), u(a).class]]),
|
|
2484
|
+
style: C([u(a).style])
|
|
2490
2485
|
}, [
|
|
2491
2486
|
o.loading ? (h(), b("div", {
|
|
2492
2487
|
key: 1,
|
|
2493
|
-
class: y(["loading-progress h-full", [
|
|
2488
|
+
class: y(["loading-progress h-full", [u(n)]])
|
|
2494
2489
|
}, null, 2)) : (h(), b("div", {
|
|
2495
2490
|
key: 0,
|
|
2496
|
-
class: y(["h-full", [
|
|
2491
|
+
class: y(["h-full", [u(n)]]),
|
|
2497
2492
|
style: C([{
|
|
2498
2493
|
width: `${(Number(o.value) - Number(o.min)) / (Number(o.max) - Number(o.min)) * 100}%`
|
|
2499
2494
|
}])
|
|
@@ -2549,32 +2544,28 @@ const oo = /* @__PURE__ */ x({
|
|
|
2549
2544
|
} }
|
|
2550
2545
|
},
|
|
2551
2546
|
setup(e) {
|
|
2552
|
-
const t = e, r = g(
|
|
2553
|
-
Q &&
|
|
2554
|
-
|
|
2555
|
-
d !== 0 && (r.value = d), n.value = d;
|
|
2556
|
-
}).observe(document.body), new MutationObserver(() => {
|
|
2557
|
-
a.value !== document.documentElement.dataset.scheme && (a.value = document.documentElement.dataset.scheme);
|
|
2547
|
+
const t = e, r = g(t.theme.scheme);
|
|
2548
|
+
Q && new MutationObserver(() => {
|
|
2549
|
+
r.value !== document.documentElement.dataset.scheme && (r.value = document.documentElement.dataset.scheme);
|
|
2558
2550
|
}).observe(document.documentElement, {
|
|
2559
2551
|
attributes: !0,
|
|
2560
2552
|
attributeFilter: ["data-scheme"]
|
|
2561
|
-
})
|
|
2562
|
-
const
|
|
2563
|
-
|
|
2553
|
+
});
|
|
2554
|
+
const n = rr();
|
|
2555
|
+
X(() => {
|
|
2564
2556
|
if (!Q)
|
|
2565
2557
|
return "dark";
|
|
2566
|
-
|
|
2567
|
-
}), ge(ut,
|
|
2568
|
-
const
|
|
2569
|
-
return (
|
|
2558
|
+
r.value === "dark" ? document.documentElement.dataset.scheme = "dark" : r.value === "light" ? document.documentElement.dataset.scheme = "light" : n.value === "dark" ? document.documentElement.dataset.scheme = "dark" : document.documentElement.dataset.scheme = "light", localStorage.setItem("scheme", document.documentElement.dataset.scheme);
|
|
2559
|
+
}), ge(ut, r);
|
|
2560
|
+
const a = it(t.theme);
|
|
2561
|
+
return (o, s) => (h(), P(ue(o.is), {
|
|
2570
2562
|
style: C([
|
|
2571
|
-
|
|
2572
|
-
{ paddingRight: c(o) }
|
|
2563
|
+
u(a)
|
|
2573
2564
|
]),
|
|
2574
2565
|
class: "text-surface-on transition-background-color,border-color,color"
|
|
2575
2566
|
}, {
|
|
2576
|
-
default:
|
|
2577
|
-
k(
|
|
2567
|
+
default: L(() => [
|
|
2568
|
+
k(o.$slots, "default")
|
|
2578
2569
|
]),
|
|
2579
2570
|
_: 3
|
|
2580
2571
|
}, 8, ["style"]));
|
|
@@ -2582,7 +2573,7 @@ const oo = /* @__PURE__ */ x({
|
|
|
2582
2573
|
}), _n = ["id"], xn = ["for"], kn = ["for"], Sn = /* @__PURE__ */ x({
|
|
2583
2574
|
inheritAttrs: !1,
|
|
2584
2575
|
__name: "Switch",
|
|
2585
|
-
props: /* @__PURE__ */
|
|
2576
|
+
props: /* @__PURE__ */ W({
|
|
2586
2577
|
size: { default: "md" },
|
|
2587
2578
|
animate: { type: Boolean, default: !0 },
|
|
2588
2579
|
options: {},
|
|
@@ -2600,7 +2591,7 @@ const oo = /* @__PURE__ */ x({
|
|
|
2600
2591
|
}),
|
|
2601
2592
|
emits: ["update:modelValue"],
|
|
2602
2593
|
setup(e) {
|
|
2603
|
-
const t = e, r =
|
|
2594
|
+
const t = e, r = j(e, "modelValue");
|
|
2604
2595
|
t.value && (r.value = t.value);
|
|
2605
2596
|
const n = g(null), a = g(!1), o = m(() => {
|
|
2606
2597
|
switch (t.size) {
|
|
@@ -2652,7 +2643,7 @@ const oo = /* @__PURE__ */ x({
|
|
|
2652
2643
|
wrapper: r.value ? `border border-transparent ${d}` : "bg-surface-lowest border border-surface-border-base",
|
|
2653
2644
|
indicator: t.disabled ? "bg-surface-high" : "bg-white text-primary-container"
|
|
2654
2645
|
};
|
|
2655
|
-
}),
|
|
2646
|
+
}), c = U(t);
|
|
2656
2647
|
return (d, f) => (h(), b("div", {
|
|
2657
2648
|
role: "switch",
|
|
2658
2649
|
class: y(["relative flex items-center gap-2", {
|
|
@@ -2660,7 +2651,7 @@ const oo = /* @__PURE__ */ x({
|
|
|
2660
2651
|
}])
|
|
2661
2652
|
}, [
|
|
2662
2653
|
Te(w("input", xe({
|
|
2663
|
-
id:
|
|
2654
|
+
id: u(i),
|
|
2664
2655
|
"onUpdate:modelValue": f[0] || (f[0] = (v) => r.value = v)
|
|
2665
2656
|
}, d.$attrs, {
|
|
2666
2657
|
class: "hidden",
|
|
@@ -2670,24 +2661,24 @@ const oo = /* @__PURE__ */ x({
|
|
|
2670
2661
|
]),
|
|
2671
2662
|
w("label", {
|
|
2672
2663
|
class: "leading-0 cursor-pointer!",
|
|
2673
|
-
for:
|
|
2664
|
+
for: u(i)
|
|
2674
2665
|
}, [
|
|
2675
2666
|
w("div", {
|
|
2676
2667
|
ref_key: "wrapper",
|
|
2677
2668
|
ref: n,
|
|
2678
|
-
class: y([[
|
|
2679
|
-
style: C([c
|
|
2669
|
+
class: y([[u(o).wrapper, u(l).wrapper, u(c).class], "relative inline-block transition-all"]),
|
|
2670
|
+
style: C([u(c).style]),
|
|
2680
2671
|
onPointerdown: f[1] || (f[1] = (v) => a.value = !0),
|
|
2681
2672
|
onPointerup: f[2] || (f[2] = (v) => a.value = !1),
|
|
2682
2673
|
onPointerleave: f[3] || (f[3] = (v) => a.value = !1),
|
|
2683
2674
|
onPointerenter: f[4] || (f[4] = (v) => v.buttons === 1 && (a.value = !0))
|
|
2684
2675
|
}, [
|
|
2685
2676
|
w("div", {
|
|
2686
|
-
class: y(["absolute top-50% -translate-y-50%", [
|
|
2687
|
-
style: C([c
|
|
2677
|
+
class: y(["absolute top-50% -translate-y-50%", [u(o).indicator, u(l).indicator, u(s).indicator, r.value ? u(o).active : u(o).inactive, u(c).class]]),
|
|
2678
|
+
style: C([u(c).style])
|
|
2688
2679
|
}, null, 6),
|
|
2689
2680
|
w("i", {
|
|
2690
|
-
class: y(["absolute top-1/2 -translate-y-50%", [
|
|
2681
|
+
class: y(["absolute top-1/2 -translate-y-50%", [u(o).icon, {
|
|
2691
2682
|
[`left-0 text-${d.color}-on`]: r.value,
|
|
2692
2683
|
"right-0 text-surface-on ": !r.value,
|
|
2693
2684
|
[d.onIcon ?? ""]: r.value && d.onIcon,
|
|
@@ -2698,7 +2689,7 @@ const oo = /* @__PURE__ */ x({
|
|
|
2698
2689
|
], 8, xn),
|
|
2699
2690
|
d.label ? (h(), b("label", {
|
|
2700
2691
|
key: 0,
|
|
2701
|
-
for:
|
|
2692
|
+
for: u(i)
|
|
2702
2693
|
}, se(d.label), 9, kn)) : T("", !0)
|
|
2703
2694
|
], 2));
|
|
2704
2695
|
}
|
|
@@ -2713,7 +2704,7 @@ const oo = /* @__PURE__ */ x({
|
|
|
2713
2704
|
t.value = o ? "dark" : "light";
|
|
2714
2705
|
}
|
|
2715
2706
|
});
|
|
2716
|
-
|
|
2707
|
+
X(() => {
|
|
2717
2708
|
Q && (r.value === !0 ? (document.documentElement.setAttribute("data-scheme", "dark"), localStorage.setItem("scheme", "dark")) : r.value === !1 && (document.documentElement.setAttribute("data-scheme", "light"), localStorage.setItem("scheme", "light")));
|
|
2718
2709
|
});
|
|
2719
2710
|
const n = g(!0), a = g(!1);
|
|
@@ -2729,34 +2720,34 @@ const oo = /* @__PURE__ */ x({
|
|
|
2729
2720
|
const i = Sn;
|
|
2730
2721
|
return h(), b(K, null, [
|
|
2731
2722
|
w("div", {
|
|
2732
|
-
class: y({ hidden: !
|
|
2723
|
+
class: y({ hidden: !u(n) })
|
|
2733
2724
|
}, [
|
|
2734
2725
|
w("div", Mn, [
|
|
2735
2726
|
Z(i, {
|
|
2736
2727
|
value: !1,
|
|
2737
|
-
"on-icon": "i-
|
|
2738
|
-
"off-icon": "i-
|
|
2728
|
+
"on-icon": "i-line-md-moon-twotone-alt-loop",
|
|
2729
|
+
"off-icon": "i-line-md-sunny-outline-twotone-loop"
|
|
2739
2730
|
})
|
|
2740
2731
|
]),
|
|
2741
2732
|
w("div", $n, [
|
|
2742
2733
|
Z(i, {
|
|
2743
2734
|
value: !0,
|
|
2744
2735
|
color: "secondary",
|
|
2745
|
-
"on-icon": "i-
|
|
2746
|
-
"off-icon": "i-
|
|
2736
|
+
"on-icon": "i-line-md-moon-twotone-alt-loop",
|
|
2737
|
+
"off-icon": "i-line-md-sunny-outline-twotone-loop"
|
|
2747
2738
|
})
|
|
2748
2739
|
])
|
|
2749
2740
|
], 2),
|
|
2750
2741
|
w("div", {
|
|
2751
|
-
class: y({ hidden:
|
|
2742
|
+
class: y({ hidden: u(n) })
|
|
2752
2743
|
}, [
|
|
2753
2744
|
Z(i, {
|
|
2754
|
-
modelValue:
|
|
2745
|
+
modelValue: u(r),
|
|
2755
2746
|
"onUpdate:modelValue": s[0] || (s[0] = (l) => Bt(r) ? r.value = l : null),
|
|
2756
|
-
animate:
|
|
2747
|
+
animate: u(a),
|
|
2757
2748
|
color: "secondary",
|
|
2758
|
-
"on-icon": "i-
|
|
2759
|
-
"off-icon": "i-
|
|
2749
|
+
"on-icon": "i-line-md-moon-twotone-alt-loop",
|
|
2750
|
+
"off-icon": "i-line-md-sunny-outline-twotone-loop"
|
|
2760
2751
|
}, null, 8, ["modelValue", "animate"])
|
|
2761
2752
|
], 2)
|
|
2762
2753
|
], 64);
|
|
@@ -2769,7 +2760,7 @@ const oo = /* @__PURE__ */ x({
|
|
|
2769
2760
|
Bn
|
|
2770
2761
|
], so = /* @__PURE__ */ x({
|
|
2771
2762
|
__name: "Select",
|
|
2772
|
-
props: /* @__PURE__ */
|
|
2763
|
+
props: /* @__PURE__ */ W({
|
|
2773
2764
|
options: { default() {
|
|
2774
2765
|
return [];
|
|
2775
2766
|
} },
|
|
@@ -2781,17 +2772,17 @@ const oo = /* @__PURE__ */ x({
|
|
|
2781
2772
|
modelValue: { default: void 0 },
|
|
2782
2773
|
modelModifiers: {}
|
|
2783
2774
|
}),
|
|
2784
|
-
emits: /* @__PURE__ */
|
|
2775
|
+
emits: /* @__PURE__ */ W(["change"], ["update:modelValue"]),
|
|
2785
2776
|
setup(e, { emit: t }) {
|
|
2786
|
-
const r = e, n = t, a =
|
|
2787
|
-
|
|
2777
|
+
const r = e, n = t, a = U(r), o = j(e, "modelValue"), s = g(null), i = g(null), { focused: l } = tr(s), c = m(() => r.options.map((_) => E(_)).indexOf(o.value)), d = g(-1), f = g(-1);
|
|
2778
|
+
X(() => {
|
|
2788
2779
|
l.value || (f.value = -1);
|
|
2789
|
-
}),
|
|
2790
|
-
o.value = E(r.options[
|
|
2780
|
+
}), X(() => {
|
|
2781
|
+
o.value = E(r.options[c.value]);
|
|
2791
2782
|
}), de(o, () => {
|
|
2792
2783
|
n("change", o.value);
|
|
2793
2784
|
});
|
|
2794
|
-
const v = r.options, S = m(() => v[
|
|
2785
|
+
const v = r.options, S = m(() => v[c.value]), A = m(() => z(S.value));
|
|
2795
2786
|
function z(_) {
|
|
2796
2787
|
if (_)
|
|
2797
2788
|
return typeof _ == "string" || typeof _ == "symbol" || typeof _ == "number" ? _ : _.label;
|
|
@@ -2844,39 +2835,39 @@ const oo = /* @__PURE__ */ x({
|
|
|
2844
2835
|
w("input", {
|
|
2845
2836
|
ref_key: "inputRef",
|
|
2846
2837
|
ref: s,
|
|
2847
|
-
class: y([[
|
|
2838
|
+
class: y([[u(Se).input, u(Me).wrapper, u(a).class], "r-select-input cursor-pointer border outline-none outline-none focus-visible:outline-2"]),
|
|
2848
2839
|
placeholder: _.placeholder,
|
|
2849
|
-
style: C([
|
|
2840
|
+
style: C([u(a).style]),
|
|
2850
2841
|
readonly: "",
|
|
2851
|
-
value:
|
|
2842
|
+
value: u(A),
|
|
2852
2843
|
"aria-haspopup": "listbox",
|
|
2853
2844
|
autocomplete: "off",
|
|
2854
2845
|
onFocus: pe[0] || (pe[0] = ($) => l.value = !0)
|
|
2855
2846
|
}, null, 46, An),
|
|
2856
2847
|
Tn
|
|
2857
2848
|
]),
|
|
2858
|
-
|
|
2849
|
+
u(l) ? (h(), b("div", {
|
|
2859
2850
|
key: 0,
|
|
2860
|
-
class: y([
|
|
2851
|
+
class: y([u(Me).dropdown, "absolute z-10 mt-2 w-full flex-col overflow-hidden border container-base rounded p-1"])
|
|
2861
2852
|
}, [
|
|
2862
|
-
|
|
2853
|
+
u(v).length === 0 ? (h(), b("div", zn, se(_.noneText), 1)) : (h(!0), b(K, { key: 1 }, ye(u(v), ($, R) => (h(), b("div", {
|
|
2863
2854
|
key: E($),
|
|
2864
2855
|
class: y([{
|
|
2865
|
-
"hover:bg-surface-high border-transparent":
|
|
2866
|
-
"container-filled-primary":
|
|
2856
|
+
"hover:bg-surface-high border-transparent": u(f) !== R,
|
|
2857
|
+
"container-filled-primary": u(f) === R
|
|
2867
2858
|
}, "flex cursor-pointer items-center justify-between gap-2 border rounded p-1 px-2"]),
|
|
2868
2859
|
onPointerdown: (B) => he($),
|
|
2869
2860
|
onHover: (B) => d.value = R
|
|
2870
2861
|
}, [
|
|
2871
2862
|
Ot(se(z($)) + " ", 1),
|
|
2872
|
-
$ ===
|
|
2863
|
+
$ === u(S) ? (h(), b("div", Rn, On)) : T("", !0)
|
|
2873
2864
|
], 42, En))), 128))
|
|
2874
2865
|
], 2)) : T("", !0)
|
|
2875
2866
|
], 512));
|
|
2876
2867
|
}
|
|
2877
2868
|
}), Hn = { class: "relative inline-block w-full" }, lo = /* @__PURE__ */ x({
|
|
2878
2869
|
__name: "Slider",
|
|
2879
|
-
props: /* @__PURE__ */
|
|
2870
|
+
props: /* @__PURE__ */ W({
|
|
2880
2871
|
size: { default: "md" },
|
|
2881
2872
|
animate: { type: Boolean, default: !1 },
|
|
2882
2873
|
width: {},
|
|
@@ -2910,7 +2901,7 @@ const oo = /* @__PURE__ */ x({
|
|
|
2910
2901
|
B.push(R[Math.round(Y * I)]);
|
|
2911
2902
|
return B.push(R[R.length - 1]), B;
|
|
2912
2903
|
}
|
|
2913
|
-
const a = m(() => t.options ? t.options.length : t.tickNum ?? 0), o = m(() => t.options === void 0 ? r(t.min, t.max, t.step) : t.options), s = m(() => n(a.value, o.value)), i =
|
|
2904
|
+
const a = m(() => t.options ? t.options.length : t.tickNum ?? 0), o = m(() => t.options === void 0 ? r(t.min, t.max, t.step) : t.options), s = m(() => n(a.value, o.value)), i = j(e, "modelValue"), l = m(() => o.value.length ?? 0), c = g(o.value.includes(i.value) ? o.value.indexOf(i.value) : 0);
|
|
2914
2905
|
function d($) {
|
|
2915
2906
|
return o.value.indexOf($);
|
|
2916
2907
|
}
|
|
@@ -2937,8 +2928,8 @@ const oo = /* @__PURE__ */ x({
|
|
|
2937
2928
|
return "dark:bg-error-container bg-white";
|
|
2938
2929
|
}
|
|
2939
2930
|
});
|
|
2940
|
-
|
|
2941
|
-
i.value = o.value[
|
|
2931
|
+
X(() => {
|
|
2932
|
+
i.value = o.value[c.value];
|
|
2942
2933
|
});
|
|
2943
2934
|
const A = g(), z = g(), E = Kt(A), he = g(!1);
|
|
2944
2935
|
function Se($) {
|
|
@@ -2951,23 +2942,23 @@ const oo = /* @__PURE__ */ x({
|
|
|
2951
2942
|
$.preventDefault(), $.stopPropagation();
|
|
2952
2943
|
const { clientX: B } = $, I = E.left.value, _t = E.right.value - I, Be = Math.round((B - I) / _t * (l.value - 1));
|
|
2953
2944
|
if (Be < 0) {
|
|
2954
|
-
|
|
2945
|
+
c.value = 0;
|
|
2955
2946
|
return;
|
|
2956
2947
|
}
|
|
2957
2948
|
if (Be > l.value - 1) {
|
|
2958
|
-
|
|
2949
|
+
c.value = l.value - 1;
|
|
2959
2950
|
return;
|
|
2960
2951
|
}
|
|
2961
|
-
|
|
2952
|
+
c.value = Be;
|
|
2962
2953
|
}
|
|
2963
|
-
|
|
2964
|
-
|
|
2954
|
+
X(() => {
|
|
2955
|
+
c.value = d(i.value);
|
|
2965
2956
|
});
|
|
2966
2957
|
function Me($) {
|
|
2967
2958
|
$.preventDefault(), $.stopPropagation(), he.value = !0, Se($);
|
|
2968
2959
|
}
|
|
2969
2960
|
N(A, "pointerdown", Me), ee(() => {
|
|
2970
|
-
N(document, "pointermove", Se),
|
|
2961
|
+
N(document, "pointermove", Se), c.value = Math.max(0, d(i.value));
|
|
2971
2962
|
});
|
|
2972
2963
|
const _ = m(() => {
|
|
2973
2964
|
switch (t.size) {
|
|
@@ -3014,44 +3005,44 @@ const oo = /* @__PURE__ */ x({
|
|
|
3014
3005
|
ref_key: "wrapper",
|
|
3015
3006
|
ref: A,
|
|
3016
3007
|
type: "size",
|
|
3017
|
-
class: y(["w-full flex cursor-pointer items-center",
|
|
3008
|
+
class: y(["w-full flex cursor-pointer items-center", u(_).wrapper]),
|
|
3018
3009
|
onTouchmove: R[0] || (R[0] = ot(() => {
|
|
3019
3010
|
}, ["prevent"]))
|
|
3020
3011
|
}, [
|
|
3021
3012
|
w("div", {
|
|
3022
|
-
class: y(["w-full rounded-full bg-surface-lowest transition-background-color,border-color,color",
|
|
3013
|
+
class: y(["w-full rounded-full bg-surface-lowest transition-background-color,border-color,color", u(_).innerWrapper])
|
|
3023
3014
|
}, [
|
|
3024
3015
|
w("div", {
|
|
3025
|
-
class: y(["relative flex",
|
|
3016
|
+
class: y(["relative flex", u(_).content]),
|
|
3026
3017
|
style: C({
|
|
3027
3018
|
width: `${t.width}rem`,
|
|
3028
3019
|
minWidth: `${t.minWidth}rem`
|
|
3029
3020
|
})
|
|
3030
3021
|
}, [
|
|
3031
|
-
(h(!0), b(K, null, ye(
|
|
3022
|
+
(h(!0), b(K, null, ye(u(s), (B) => (h(), b("div", {
|
|
3032
3023
|
key: B,
|
|
3033
3024
|
style: C({
|
|
3034
|
-
left: `${d(B) / (
|
|
3025
|
+
left: `${d(B) / (u(l) - 1) * 100}%`
|
|
3035
3026
|
}),
|
|
3036
|
-
class: y(["absolute top-50% rounded-full bg-white",
|
|
3027
|
+
class: y(["absolute top-50% rounded-full bg-white", u(_).tick])
|
|
3037
3028
|
}, null, 6))), 128)),
|
|
3038
|
-
c
|
|
3029
|
+
u(c) !== -1 ? (h(), b("div", {
|
|
3039
3030
|
key: 0,
|
|
3040
3031
|
ref_key: "indicator",
|
|
3041
3032
|
ref: z,
|
|
3042
|
-
class: y(["absolute top-50% cursor-pointer rounded-full transition-background-color,border-color,color", [
|
|
3033
|
+
class: y(["absolute top-50% cursor-pointer rounded-full transition-background-color,border-color,color", [u(_).indicator, u(pe).indicator, u(v)]]),
|
|
3043
3034
|
style: C({
|
|
3044
|
-
left: `${c
|
|
3035
|
+
left: `${u(c) / (u(l) - 1) * 100}%`
|
|
3045
3036
|
})
|
|
3046
3037
|
}, [
|
|
3047
3038
|
w("div", {
|
|
3048
|
-
class: y(["pointer-events-none absolute left-50% top-50% rounded-full transition-background-color,border-color,color", [
|
|
3039
|
+
class: y(["pointer-events-none absolute left-50% top-50% rounded-full transition-background-color,border-color,color", [u(_).indicatorInner, u(S)]])
|
|
3049
3040
|
}, null, 2)
|
|
3050
3041
|
], 6)) : T("", !0),
|
|
3051
3042
|
w("div", {
|
|
3052
|
-
class: y(["pointer-events-none h-full rounded-full", [
|
|
3043
|
+
class: y(["pointer-events-none h-full rounded-full", [u(_).progress, u(pe).progress, u(f)]]),
|
|
3053
3044
|
style: C({
|
|
3054
|
-
width: `${c
|
|
3045
|
+
width: `${u(c) / (u(l) - 1) * 100}%`
|
|
3055
3046
|
})
|
|
3056
3047
|
}, null, 6)
|
|
3057
3048
|
], 6)
|
|
@@ -3063,12 +3054,12 @@ const oo = /* @__PURE__ */ x({
|
|
|
3063
3054
|
width: `${t.width}rem`
|
|
3064
3055
|
})
|
|
3065
3056
|
}, [
|
|
3066
|
-
(h(!0), b(K, null, ye(
|
|
3057
|
+
(h(!0), b(K, null, ye(u(s), (B, I) => (h(), b("div", {
|
|
3067
3058
|
key: I,
|
|
3068
3059
|
style: C({
|
|
3069
|
-
left: `${d(B) / (
|
|
3060
|
+
left: `${d(B) / (u(l) - 1) * 100}%`
|
|
3070
3061
|
}),
|
|
3071
|
-
class: y(["absolute w-auto flex rounded-full -translate-x-50%",
|
|
3062
|
+
class: y(["absolute w-auto flex rounded-full -translate-x-50%", u(_).tick])
|
|
3072
3063
|
}, se(B), 7))), 128))
|
|
3073
3064
|
], 4)
|
|
3074
3065
|
]));
|
|
@@ -3099,26 +3090,26 @@ const oo = /* @__PURE__ */ x({
|
|
|
3099
3090
|
return "absolute inset-0 right-100% h-full w-2px bg-primary-container transition-background-color,border-color,color";
|
|
3100
3091
|
}
|
|
3101
3092
|
}), l = m(() => a.value ? "bg-primary-container" : "bg-surface-lowest");
|
|
3102
|
-
return (
|
|
3093
|
+
return (c, d) => (h(), b("button", {
|
|
3103
3094
|
type: "button",
|
|
3104
|
-
class: y(["relative min-w-20 flex items-center justify-center", [
|
|
3095
|
+
class: y(["relative min-w-20 flex items-center justify-center", [u(s)]]),
|
|
3105
3096
|
onClick: o
|
|
3106
3097
|
}, [
|
|
3107
|
-
|
|
3098
|
+
u(a) ? (h(), b("div", {
|
|
3108
3099
|
key: 0,
|
|
3109
|
-
class: y([
|
|
3100
|
+
class: y([u(i), u(l)])
|
|
3110
3101
|
}, null, 2)) : (h(), b("div", {
|
|
3111
3102
|
key: 1,
|
|
3112
|
-
class: y([
|
|
3103
|
+
class: y([u(i), u(l)])
|
|
3113
3104
|
}, null, 2)),
|
|
3114
3105
|
w("div", Nn, [
|
|
3115
|
-
k(
|
|
3106
|
+
k(c.$slots, "default")
|
|
3116
3107
|
])
|
|
3117
3108
|
], 2));
|
|
3118
3109
|
}
|
|
3119
3110
|
}), co = /* @__PURE__ */ x({
|
|
3120
3111
|
__name: "Tabs",
|
|
3121
|
-
props: /* @__PURE__ */
|
|
3112
|
+
props: /* @__PURE__ */ W({
|
|
3122
3113
|
defaultValue: {},
|
|
3123
3114
|
direction: { default: "horizontal" }
|
|
3124
3115
|
}, {
|
|
@@ -3128,13 +3119,13 @@ const oo = /* @__PURE__ */ x({
|
|
|
3128
3119
|
emits: ["update:modelValue"],
|
|
3129
3120
|
setup(e) {
|
|
3130
3121
|
const t = e, r = nt(), n = m(() => {
|
|
3131
|
-
var
|
|
3132
|
-
const i = (
|
|
3122
|
+
var c;
|
|
3123
|
+
const i = (c = r.default) == null ? void 0 : c.call(r);
|
|
3133
3124
|
return (i == null ? void 0 : i.flatMap((d) => d.type === K ? d.children : d).filter((d) => {
|
|
3134
3125
|
var f;
|
|
3135
3126
|
return ((f = d == null ? void 0 : d.props) == null ? void 0 : f.value) !== void 0;
|
|
3136
3127
|
}).map((d) => d.props.value)) ?? [];
|
|
3137
|
-
}), a =
|
|
3128
|
+
}), a = j(e, "modelValue");
|
|
3138
3129
|
!a.value && n.value.length > 0 && (a.value = n.value[0]), ee(() => {
|
|
3139
3130
|
t.defaultValue && (a.value = t.defaultValue);
|
|
3140
3131
|
}), ge(yt, a);
|
|
@@ -3169,7 +3160,7 @@ const oo = /* @__PURE__ */ x({
|
|
|
3169
3160
|
}
|
|
3170
3161
|
});
|
|
3171
3162
|
return (i, l) => (h(), b("div", {
|
|
3172
|
-
class: y(["flex", [
|
|
3163
|
+
class: y(["flex", [u(s)]])
|
|
3173
3164
|
}, [
|
|
3174
3165
|
k(i.$slots, "default")
|
|
3175
3166
|
], 2));
|