@roku-ui/vue 0.3.0 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/AspectRatio.vue.d.ts +8 -0
- package/dist/components/Btn.vue.d.ts +3 -3
- package/dist/components/ChatMessage.vue.d.ts +3 -3
- package/dist/components/Notification.vue.d.ts +20 -3
- package/dist/components/Progress.vue.d.ts +9 -9
- package/dist/components/Slider.vue.d.ts +6 -6
- package/dist/components/Switch.vue.d.ts +6 -0
- package/dist/components/index.d.ts +1 -1
- package/dist/index.js +615 -568
- package/dist/index.umd.cjs +1 -1
- package/dist/style.css +1 -1
- package/package.json +2 -2
- /package/dist/components/{ThemeSwitch.vue.d.ts → SchemeSwitch.vue.d.ts} +0 -0
package/dist/index.js
CHANGED
|
@@ -1,20 +1,26 @@
|
|
|
1
|
-
import { defineComponent as x, openBlock as m, createElementBlock as b,
|
|
2
|
-
const
|
|
1
|
+
import { defineComponent as x, openBlock as m, createElementBlock as b, normalizeStyle as A, renderSlot as M, computed as v, ref as g, onMounted as ne, Fragment as ee, createBlock as P, resolveDynamicComponent as de, mergeProps as we, unref as c, createCommentVNode as T, withCtx as L, normalizeClass as y, createElementVNode as w, mergeModels as Z, useModel as Q, inject as Qe, watchEffect as G, provide as We, useAttrs as gt, withDirectives as Pe, vModelText as yt, createVNode as Y, Teleport as wt, Transition as Je, getCurrentScope as _t, onScopeDispose as xt, nextTick as et, getCurrentInstance as tt, watch as fe, shallowRef as kt, readonly as St, useSlots as Mt, toDisplayString as se, renderList as be, withModifiers as rt, withKeys as $t, reactive as Ct, vModelCheckbox as At, isRef as Tt, createTextVNode as Rt } from "vue";
|
|
2
|
+
const Rn = /* @__PURE__ */ x({
|
|
3
3
|
__name: "AspectRatio",
|
|
4
4
|
props: {
|
|
5
|
-
ratio: { default: 1 }
|
|
5
|
+
ratio: { default: 1 },
|
|
6
|
+
width: {},
|
|
7
|
+
maxWidth: {},
|
|
8
|
+
height: {},
|
|
9
|
+
maxHeight: {}
|
|
6
10
|
},
|
|
7
11
|
setup(e) {
|
|
8
|
-
return (t, r) => (m(), b("div",
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
]
|
|
17
|
-
|
|
12
|
+
return (t, r) => (m(), b("div", {
|
|
13
|
+
style: A({
|
|
14
|
+
"--ar-ratio": t.ratio,
|
|
15
|
+
width: t.width,
|
|
16
|
+
"max-width": t.maxWidth,
|
|
17
|
+
height: t.height,
|
|
18
|
+
"max-height": t.maxHeight
|
|
19
|
+
}),
|
|
20
|
+
class: "relative children:absolute children:top-0 before:block before:h-0 children:h-full children:w-full before:pb-[calc((1/var(--ar-ratio,1))*100%)] before:content-['']"
|
|
21
|
+
}, [
|
|
22
|
+
M(t.$slots, "default")
|
|
23
|
+
], 4));
|
|
18
24
|
}
|
|
19
25
|
}), zt = /* @__PURE__ */ x({
|
|
20
26
|
__name: "Avatar",
|
|
@@ -41,11 +47,11 @@ const An = /* @__PURE__ */ x({
|
|
|
41
47
|
function o() {
|
|
42
48
|
n.value = !0;
|
|
43
49
|
}
|
|
44
|
-
return
|
|
50
|
+
return ne(() => {
|
|
45
51
|
var s;
|
|
46
52
|
(s = a.value) != null && s.complete && o();
|
|
47
|
-
}), (s, i) => (m(), b(
|
|
48
|
-
s.src ? (m(),
|
|
53
|
+
}), (s, i) => (m(), b(ee, null, [
|
|
54
|
+
s.src ? (m(), P(de(s.is), we({
|
|
49
55
|
key: 0,
|
|
50
56
|
ref_key: "img",
|
|
51
57
|
ref: a,
|
|
@@ -53,15 +59,15 @@ const An = /* @__PURE__ */ x({
|
|
|
53
59
|
placeholder: "",
|
|
54
60
|
src: s.src,
|
|
55
61
|
class: ["h-[var(--size)] w-[var(--size)] rounded-full object-cover", [{ hidden: !c(n) }, t.class]]
|
|
56
|
-
}, s.$attrs, { onLoad: o }), null, 16, ["style", "src", "class"])) :
|
|
57
|
-
c(n) ?
|
|
62
|
+
}, s.$attrs, { onLoad: o }), null, 16, ["style", "src", "class"])) : T("", !0),
|
|
63
|
+
c(n) ? T("", !0) : (m(), b("div", {
|
|
58
64
|
key: 1,
|
|
59
|
-
class: "h-[var(--size)] w-[var(--size)] animate-pulse rounded-full bg-surface-high object-cover
|
|
60
|
-
style:
|
|
65
|
+
class: "h-[var(--size)] w-[var(--size)] animate-pulse border-transparent rounded-full bg-surface-high object-cover",
|
|
66
|
+
style: A([s.style, c(r)])
|
|
61
67
|
}, null, 4))
|
|
62
68
|
], 64));
|
|
63
69
|
}
|
|
64
|
-
}),
|
|
70
|
+
}), nt = /* @__PURE__ */ x({
|
|
65
71
|
__name: "Btn",
|
|
66
72
|
props: {
|
|
67
73
|
type: { default: "button" },
|
|
@@ -180,7 +186,7 @@ const An = /* @__PURE__ */ x({
|
|
|
180
186
|
return "btn-default";
|
|
181
187
|
}
|
|
182
188
|
});
|
|
183
|
-
return (o, s) => (m(),
|
|
189
|
+
return (o, s) => (m(), P(de(o.is), we({
|
|
184
190
|
"data-size": o.size,
|
|
185
191
|
type: o.type,
|
|
186
192
|
class: ["flex items-center justify-center gap-1 decoration-none", [
|
|
@@ -193,15 +199,16 @@ const An = /* @__PURE__ */ x({
|
|
|
193
199
|
"active:scale-98": o.pressEffect === "scale",
|
|
194
200
|
"transition-all": o.animate
|
|
195
201
|
}
|
|
196
|
-
]]
|
|
197
|
-
|
|
202
|
+
]],
|
|
203
|
+
disabled: o.disabled
|
|
204
|
+
}, o.$attrs), {
|
|
198
205
|
default: L(() => [
|
|
199
|
-
o.$slots.leftSection ?
|
|
200
|
-
|
|
201
|
-
o.$slots.rightSection ?
|
|
206
|
+
o.$slots.leftSection ? M(o.$slots, "leftSection", { key: 0 }) : T("", !0),
|
|
207
|
+
M(o.$slots, "default"),
|
|
208
|
+
o.$slots.rightSection ? M(o.$slots, "rightSection", { key: 1 }) : T("", !0)
|
|
202
209
|
]),
|
|
203
210
|
_: 3
|
|
204
|
-
}, 16, ["data-size", "type", "class"]));
|
|
211
|
+
}, 16, ["data-size", "type", "class", "disabled"]));
|
|
205
212
|
}
|
|
206
213
|
}), Bt = (e, t) => {
|
|
207
214
|
const r = e.__vccOpts || e;
|
|
@@ -209,12 +216,12 @@ const An = /* @__PURE__ */ x({
|
|
|
209
216
|
r[n] = a;
|
|
210
217
|
return r;
|
|
211
218
|
}, Et = {}, Ot = { class: "flex flex-col gap-4 container" };
|
|
212
|
-
function
|
|
219
|
+
function Nt(e, t) {
|
|
213
220
|
return m(), b("div", Ot, [
|
|
214
|
-
|
|
221
|
+
M(e.$slots, "default")
|
|
215
222
|
]);
|
|
216
223
|
}
|
|
217
|
-
const
|
|
224
|
+
const zn = /* @__PURE__ */ Bt(Et, [["render", Nt]]), Bn = /* @__PURE__ */ x({
|
|
218
225
|
__name: "ChatMessage",
|
|
219
226
|
props: {
|
|
220
227
|
avatar: {},
|
|
@@ -228,7 +235,7 @@ const Tn = /* @__PURE__ */ Bt(Et, [["render", Pt]]), Rn = /* @__PURE__ */ x({
|
|
|
228
235
|
switch (t.variant) {
|
|
229
236
|
case "default":
|
|
230
237
|
return "bg-surface-base";
|
|
231
|
-
case "
|
|
238
|
+
case "filled":
|
|
232
239
|
switch (t.color) {
|
|
233
240
|
case "secondary":
|
|
234
241
|
return "bg-secondary-container text-secondary-on";
|
|
@@ -253,11 +260,11 @@ const Tn = /* @__PURE__ */ Bt(Et, [["render", Pt]]), Rn = /* @__PURE__ */ x({
|
|
|
253
260
|
}
|
|
254
261
|
]])
|
|
255
262
|
}, [
|
|
256
|
-
n.$slots.avatar ?
|
|
263
|
+
n.$slots.avatar ? M(n.$slots, "avatar", { key: 0 }) : n.avatar ? (m(), P(o, {
|
|
257
264
|
key: 1,
|
|
258
265
|
src: n.avatar
|
|
259
|
-
}, null, 8, ["src"])) :
|
|
260
|
-
|
|
266
|
+
}, null, 8, ["src"])) : T("", !0),
|
|
267
|
+
w("div", {
|
|
261
268
|
class: y(["rounded-xl px-3 py-2 transition-background-color,border-color", [
|
|
262
269
|
{
|
|
263
270
|
"rounded-tr": n.position === "right",
|
|
@@ -267,12 +274,12 @@ const Tn = /* @__PURE__ */ Bt(Et, [["render", Pt]]), Rn = /* @__PURE__ */ x({
|
|
|
267
274
|
c(r)
|
|
268
275
|
]])
|
|
269
276
|
}, [
|
|
270
|
-
|
|
277
|
+
M(n.$slots, "default")
|
|
271
278
|
], 2)
|
|
272
279
|
], 2);
|
|
273
280
|
};
|
|
274
281
|
}
|
|
275
|
-
}),
|
|
282
|
+
}), Pt = { class: "w-full flex self-center gap-2 text-center" }, En = /* @__PURE__ */ x({
|
|
276
283
|
__name: "ChatSystem",
|
|
277
284
|
props: {
|
|
278
285
|
position: {},
|
|
@@ -300,23 +307,23 @@ const Tn = /* @__PURE__ */ Bt(Et, [["render", Pt]]), Rn = /* @__PURE__ */ x({
|
|
|
300
307
|
return "bg-transparent";
|
|
301
308
|
}
|
|
302
309
|
});
|
|
303
|
-
return (n, a) => (m(), b("div",
|
|
304
|
-
|
|
305
|
-
class: y(["rounded-xl px-3 py-2
|
|
310
|
+
return (n, a) => (m(), b("div", Pt, [
|
|
311
|
+
w("div", {
|
|
312
|
+
class: y(["w-full rounded-xl px-3 py-2 transition-background-color,border-color", [
|
|
306
313
|
c(r)
|
|
307
314
|
]])
|
|
308
315
|
}, [
|
|
309
|
-
|
|
316
|
+
M(n.$slots, "default")
|
|
310
317
|
], 2)
|
|
311
318
|
]));
|
|
312
319
|
}
|
|
313
320
|
});
|
|
314
|
-
function
|
|
321
|
+
function J(e) {
|
|
315
322
|
return v(
|
|
316
|
-
() => ({ style:
|
|
323
|
+
() => ({ style: Ht(e.rounded), class: "rounded-[var(--r-rounded)]" })
|
|
317
324
|
);
|
|
318
325
|
}
|
|
319
|
-
function
|
|
326
|
+
function Ht(e) {
|
|
320
327
|
const t = /^-?\d*\.?\d+(px|em|rem|vh|vw|in|cm|mm|pt|pc|%)?$/;
|
|
321
328
|
switch (e) {
|
|
322
329
|
case "none":
|
|
@@ -333,9 +340,9 @@ function Nt(e) {
|
|
|
333
340
|
return typeof e == "string" && t.test(e) ? `--r-rounded: ${e};` : typeof e == "number" || !Number.isNaN(Number(e)) ? `--r-rounded: ${e}rem;` : "rounded-[var(--r-rounded)]";
|
|
334
341
|
}
|
|
335
342
|
}
|
|
336
|
-
const
|
|
343
|
+
const On = /* @__PURE__ */ x({
|
|
337
344
|
__name: "Chip",
|
|
338
|
-
props: /* @__PURE__ */
|
|
345
|
+
props: /* @__PURE__ */ Z({
|
|
339
346
|
is: { default: "img" },
|
|
340
347
|
src: {},
|
|
341
348
|
size: { default: "md" },
|
|
@@ -348,7 +355,7 @@ const Bn = /* @__PURE__ */ x({
|
|
|
348
355
|
}),
|
|
349
356
|
emits: ["update:modelValue"],
|
|
350
357
|
setup(e) {
|
|
351
|
-
const t = e, r =
|
|
358
|
+
const t = e, r = Q(e, "modelValue"), n = J(t), a = v(() => {
|
|
352
359
|
switch (t.size) {
|
|
353
360
|
case "sm":
|
|
354
361
|
return "px-3 text-sm h-6";
|
|
@@ -360,15 +367,15 @@ const Bn = /* @__PURE__ */ x({
|
|
|
360
367
|
}), o = v(() => r.value ? "container-filled-primary border-transparent" : "container-base"), s = v(() => r.value !== void 0), i = v(() => s.value ? "cursor-pointer" : "");
|
|
361
368
|
return (l, u) => (m(), b("span", {
|
|
362
369
|
class: y(["inline-flex items-center gap-1", [c(n).class, c(a), c(o), c(i)]]),
|
|
363
|
-
style:
|
|
370
|
+
style: A([c(n).style]),
|
|
364
371
|
onPointerup: u[0] || (u[0] = (d) => c(s) && (r.value = !r.value))
|
|
365
372
|
}, [
|
|
366
|
-
l.$slots.leftSection ?
|
|
367
|
-
|
|
368
|
-
l.$slots.rightSection ?
|
|
373
|
+
l.$slots.leftSection ? M(l.$slots, "leftSection", { key: 0 }) : T("", !0),
|
|
374
|
+
M(l.$slots, "default"),
|
|
375
|
+
l.$slots.rightSection ? M(l.$slots, "rightSection", { key: 1 }) : T("", !0)
|
|
369
376
|
], 38));
|
|
370
377
|
}
|
|
371
|
-
}),
|
|
378
|
+
}), It = /* @__PURE__ */ x({
|
|
372
379
|
__name: "ColorSwatch",
|
|
373
380
|
props: {
|
|
374
381
|
color: {},
|
|
@@ -376,12 +383,12 @@ const Bn = /* @__PURE__ */ x({
|
|
|
376
383
|
withBorder: { type: Boolean, default: !1 }
|
|
377
384
|
},
|
|
378
385
|
setup(e) {
|
|
379
|
-
return (t, r) => (m(),
|
|
386
|
+
return (t, r) => (m(), P(de(t.is), {
|
|
380
387
|
class: y(["h-6 w-6 border rounded-full", [{
|
|
381
388
|
"border border-surface-border-base": t.withBorder,
|
|
382
389
|
"border border-transparent": !t.withBorder
|
|
383
390
|
}]]),
|
|
384
|
-
style:
|
|
391
|
+
style: A({
|
|
385
392
|
backgroundColor: t.color
|
|
386
393
|
})
|
|
387
394
|
}, null, 8, ["class", "style"]));
|
|
@@ -432,7 +439,7 @@ p.prototype = {
|
|
|
432
439
|
return r = t.r / 255, n = t.g / 255, a = t.b / 255, r <= 0.03928 ? o = r / 12.92 : o = Math.pow((r + 0.055) / 1.055, 2.4), n <= 0.03928 ? s = n / 12.92 : s = Math.pow((n + 0.055) / 1.055, 2.4), a <= 0.03928 ? i = a / 12.92 : i = Math.pow((a + 0.055) / 1.055, 2.4), 0.2126 * o + 0.7152 * s + 0.0722 * i;
|
|
433
440
|
},
|
|
434
441
|
setAlpha: function(t) {
|
|
435
|
-
return this._a =
|
|
442
|
+
return this._a = ot(t), this._roundA = Math.round(100 * this._a) / 100, this;
|
|
436
443
|
},
|
|
437
444
|
toHsv: function() {
|
|
438
445
|
var t = je(this._r, this._g, this._b);
|
|
@@ -569,7 +576,7 @@ p.fromRatio = function(e, t) {
|
|
|
569
576
|
if (_e(e) == "object") {
|
|
570
577
|
var r = {};
|
|
571
578
|
for (var n in e)
|
|
572
|
-
e.hasOwnProperty(n) && (n === "a" ? r[n] = e[n] : r[n] =
|
|
579
|
+
e.hasOwnProperty(n) && (n === "a" ? r[n] = e[n] : r[n] = me(e[n]));
|
|
573
580
|
e = r;
|
|
574
581
|
}
|
|
575
582
|
return p(e, t);
|
|
@@ -580,7 +587,7 @@ function Ft(e) {
|
|
|
580
587
|
g: 0,
|
|
581
588
|
b: 0
|
|
582
589
|
}, r = 1, n = null, a = null, o = null, s = !1, i = !1;
|
|
583
|
-
return typeof e == "string" && (e = ir(e)), _e(e) == "object" && (j(e.r) && j(e.g) && j(e.b) ? (t = Wt(e.r, e.g, e.b), s = !0, i = String(e.r).substr(-1) === "%" ? "prgb" : "rgb") : j(e.h) && j(e.s) && j(e.v) ? (n =
|
|
590
|
+
return typeof e == "string" && (e = ir(e)), _e(e) == "object" && (j(e.r) && j(e.g) && j(e.b) ? (t = Wt(e.r, e.g, e.b), s = !0, i = String(e.r).substr(-1) === "%" ? "prgb" : "rgb") : j(e.h) && j(e.s) && j(e.v) ? (n = me(e.s), a = me(e.v), t = jt(e.h, n, a), s = !0, i = "hsv") : j(e.h) && j(e.s) && j(e.l) && (n = me(e.s), o = me(e.l), t = Lt(e.h, n, o), s = !0, i = "hsl"), e.hasOwnProperty("a") && (r = e.a)), r = ot(r), {
|
|
584
591
|
ok: s,
|
|
585
592
|
format: e.format || i,
|
|
586
593
|
r: Math.min(255, Math.max(t.r, 0)),
|
|
@@ -679,11 +686,11 @@ function Ue(e, t, r, n) {
|
|
|
679
686
|
return n && a[0].charAt(0) == a[0].charAt(1) && a[1].charAt(0) == a[1].charAt(1) && a[2].charAt(0) == a[2].charAt(1) ? a[0].charAt(0) + a[1].charAt(0) + a[2].charAt(0) : a.join("");
|
|
680
687
|
}
|
|
681
688
|
function Ut(e, t, r, n, a) {
|
|
682
|
-
var o = [D(Math.round(e).toString(16)), D(Math.round(t).toString(16)), D(Math.round(r).toString(16)), D(
|
|
689
|
+
var o = [D(Math.round(e).toString(16)), D(Math.round(t).toString(16)), D(Math.round(r).toString(16)), D(at(n))];
|
|
683
690
|
return a && o[0].charAt(0) == o[0].charAt(1) && o[1].charAt(0) == o[1].charAt(1) && o[2].charAt(0) == o[2].charAt(1) && o[3].charAt(0) == o[3].charAt(1) ? o[0].charAt(0) + o[1].charAt(0) + o[2].charAt(0) + o[3].charAt(0) : o.join("");
|
|
684
691
|
}
|
|
685
692
|
function Ge(e, t, r, n) {
|
|
686
|
-
var a = [D(
|
|
693
|
+
var a = [D(at(n)), D(Math.round(e).toString(16)), D(Math.round(t).toString(16)), D(Math.round(r).toString(16))];
|
|
687
694
|
return a.join("");
|
|
688
695
|
}
|
|
689
696
|
p.equals = function(e, t) {
|
|
@@ -969,7 +976,7 @@ function or(e) {
|
|
|
969
976
|
e.hasOwnProperty(r) && (t[e[r]] = r);
|
|
970
977
|
return t;
|
|
971
978
|
}
|
|
972
|
-
function
|
|
979
|
+
function ot(e) {
|
|
973
980
|
return e = parseFloat(e), (isNaN(e) || e < 0 || e > 1) && (e = 1), e;
|
|
974
981
|
}
|
|
975
982
|
function S(e, t) {
|
|
@@ -980,7 +987,7 @@ function S(e, t) {
|
|
|
980
987
|
function Se(e) {
|
|
981
988
|
return Math.min(1, Math.max(0, e));
|
|
982
989
|
}
|
|
983
|
-
function
|
|
990
|
+
function N(e) {
|
|
984
991
|
return parseInt(e, 16);
|
|
985
992
|
}
|
|
986
993
|
function ar(e) {
|
|
@@ -992,14 +999,14 @@ function sr(e) {
|
|
|
992
999
|
function D(e) {
|
|
993
1000
|
return e.length == 1 ? "0" + e : "" + e;
|
|
994
1001
|
}
|
|
995
|
-
function
|
|
1002
|
+
function me(e) {
|
|
996
1003
|
return e <= 1 && (e = e * 100 + "%"), e;
|
|
997
1004
|
}
|
|
998
|
-
function
|
|
1005
|
+
function at(e) {
|
|
999
1006
|
return Math.round(parseFloat(e) * 255).toString(16);
|
|
1000
1007
|
}
|
|
1001
1008
|
function Xe(e) {
|
|
1002
|
-
return
|
|
1009
|
+
return N(e) / 255;
|
|
1003
1010
|
}
|
|
1004
1011
|
var V = function() {
|
|
1005
1012
|
var e = "[-\\+]?\\d+%?", t = "[-\\+]?\\d*\\.\\d+%?", r = "(?:" + t + ")|(?:" + e + ")", n = "[\\s|\\(]+(" + r + ")[,|\\s]+(" + r + ")[,|\\s]+(" + r + ")\\s*\\)?", a = "[\\s|\\(]+(" + r + ")[,|\\s]+(" + r + ")[,|\\s]+(" + r + ")[,|\\s]+(" + r + ")\\s*\\)?";
|
|
@@ -1062,26 +1069,26 @@ function ir(e) {
|
|
|
1062
1069
|
v: r[3],
|
|
1063
1070
|
a: r[4]
|
|
1064
1071
|
} : (r = V.hex8.exec(e)) ? {
|
|
1065
|
-
r:
|
|
1066
|
-
g:
|
|
1067
|
-
b:
|
|
1072
|
+
r: N(r[1]),
|
|
1073
|
+
g: N(r[2]),
|
|
1074
|
+
b: N(r[3]),
|
|
1068
1075
|
a: Xe(r[4]),
|
|
1069
1076
|
format: t ? "name" : "hex8"
|
|
1070
1077
|
} : (r = V.hex6.exec(e)) ? {
|
|
1071
|
-
r:
|
|
1072
|
-
g:
|
|
1073
|
-
b:
|
|
1078
|
+
r: N(r[1]),
|
|
1079
|
+
g: N(r[2]),
|
|
1080
|
+
b: N(r[3]),
|
|
1074
1081
|
format: t ? "name" : "hex"
|
|
1075
1082
|
} : (r = V.hex4.exec(e)) ? {
|
|
1076
|
-
r:
|
|
1077
|
-
g:
|
|
1078
|
-
b:
|
|
1083
|
+
r: N(r[1] + "" + r[1]),
|
|
1084
|
+
g: N(r[2] + "" + r[2]),
|
|
1085
|
+
b: N(r[3] + "" + r[3]),
|
|
1079
1086
|
a: Xe(r[4] + "" + r[4]),
|
|
1080
1087
|
format: t ? "name" : "hex8"
|
|
1081
1088
|
} : (r = V.hex3.exec(e)) ? {
|
|
1082
|
-
r:
|
|
1083
|
-
g:
|
|
1084
|
-
b:
|
|
1089
|
+
r: N(r[1] + "" + r[1]),
|
|
1090
|
+
g: N(r[2] + "" + r[2]),
|
|
1091
|
+
b: N(r[3] + "" + r[3]),
|
|
1085
1092
|
format: t ? "name" : "hex"
|
|
1086
1093
|
} : !1;
|
|
1087
1094
|
}
|
|
@@ -1108,13 +1115,13 @@ function cr() {
|
|
|
1108
1115
|
attributeFilter: ["data-scheme"]
|
|
1109
1116
|
}), e;
|
|
1110
1117
|
}
|
|
1111
|
-
function
|
|
1118
|
+
function Nn() {
|
|
1112
1119
|
return Qe("currentThemeScheme", null);
|
|
1113
1120
|
}
|
|
1114
1121
|
function ur() {
|
|
1115
1122
|
return Qe("currentTheme", g(Oe));
|
|
1116
1123
|
}
|
|
1117
|
-
function
|
|
1124
|
+
function st(e, t = !0) {
|
|
1118
1125
|
const r = g(e), n = g(e.scheme), a = cr();
|
|
1119
1126
|
G(() => {
|
|
1120
1127
|
a.value && (n.value = a.value);
|
|
@@ -1122,9 +1129,9 @@ function at(e, t = !0) {
|
|
|
1122
1129
|
const s = {
|
|
1123
1130
|
...Object.keys(r.value.colors).map((u) => {
|
|
1124
1131
|
const d = u;
|
|
1125
|
-
return r.value.colors[d].reduce((h,
|
|
1126
|
-
const
|
|
1127
|
-
return h[`--r-color-${d}-${C}`] = `${
|
|
1132
|
+
return r.value.colors[d].reduce((h, _, C) => {
|
|
1133
|
+
const $ = p(_).toRgb();
|
|
1134
|
+
return h[`--r-color-${d}-${C}`] = `${$.r} ${$.g} ${$.b}`, h;
|
|
1128
1135
|
}, {});
|
|
1129
1136
|
}).reduce((u, d) => ({
|
|
1130
1137
|
...u,
|
|
@@ -1199,13 +1206,13 @@ function at(e, t = !0) {
|
|
|
1199
1206
|
...l.value
|
|
1200
1207
|
};
|
|
1201
1208
|
}
|
|
1202
|
-
function
|
|
1209
|
+
function it(e) {
|
|
1203
1210
|
const t = g("");
|
|
1204
|
-
return
|
|
1211
|
+
return ne(() => {
|
|
1205
1212
|
e.id ? t.value = e.id : t.value = `switch-${Math.random().toString(36).slice(2)}-${Date.now().toString(36)}`;
|
|
1206
1213
|
}), t;
|
|
1207
1214
|
}
|
|
1208
|
-
const dr = ["id"], fr = ["for"],
|
|
1215
|
+
const dr = ["id"], fr = ["for"], Pn = /* @__PURE__ */ x({
|
|
1209
1216
|
__name: "ColorInput",
|
|
1210
1217
|
props: {
|
|
1211
1218
|
modelValue: {},
|
|
@@ -1213,22 +1220,22 @@ const dr = ["id"], fr = ["for"], On = /* @__PURE__ */ x({
|
|
|
1213
1220
|
},
|
|
1214
1221
|
emits: ["update:modelValue"],
|
|
1215
1222
|
setup(e) {
|
|
1216
|
-
const t =
|
|
1223
|
+
const t = Q(e, "modelValue"), r = gt(), n = it(r), a = g(null);
|
|
1217
1224
|
return (o, s) => {
|
|
1218
|
-
const i =
|
|
1225
|
+
const i = It;
|
|
1219
1226
|
return m(), b("div", null, [
|
|
1220
|
-
|
|
1227
|
+
Pe(w("input", {
|
|
1221
1228
|
id: c(n),
|
|
1222
1229
|
ref_key: "input",
|
|
1223
1230
|
ref: a,
|
|
1224
1231
|
"onUpdate:modelValue": s[0] || (s[0] = (l) => t.value = l),
|
|
1225
1232
|
type: "color",
|
|
1226
|
-
class: "absolute opacity-0
|
|
1233
|
+
class: "pointer-events-none absolute opacity-0"
|
|
1227
1234
|
}, null, 8, dr), [
|
|
1228
|
-
[
|
|
1235
|
+
[yt, t.value]
|
|
1229
1236
|
]),
|
|
1230
|
-
|
|
1231
|
-
|
|
1237
|
+
w("label", { for: c(n) }, [
|
|
1238
|
+
Y(i, {
|
|
1232
1239
|
class: "cursor-pointer",
|
|
1233
1240
|
color: t.value ?? "#222"
|
|
1234
1241
|
}, null, 8, ["color"])
|
|
@@ -1242,18 +1249,18 @@ const dr = ["id"], fr = ["for"], On = /* @__PURE__ */ x({
|
|
|
1242
1249
|
theme: {}
|
|
1243
1250
|
},
|
|
1244
1251
|
setup(e) {
|
|
1245
|
-
const r =
|
|
1252
|
+
const r = st(e.theme, !1);
|
|
1246
1253
|
return (n, a) => (m(), b("div", {
|
|
1247
|
-
style:
|
|
1254
|
+
style: A([c(r)]),
|
|
1248
1255
|
"data-scheme": n.theme.scheme,
|
|
1249
1256
|
"data-theme": n.theme.name
|
|
1250
1257
|
}, [
|
|
1251
|
-
|
|
1258
|
+
M(n.$slots, "default")
|
|
1252
1259
|
], 12, pr));
|
|
1253
1260
|
}
|
|
1254
|
-
}),
|
|
1261
|
+
}), lt = /* @__PURE__ */ x({
|
|
1255
1262
|
__name: "FullscreenOverlay",
|
|
1256
|
-
props: /* @__PURE__ */
|
|
1263
|
+
props: /* @__PURE__ */ Z({
|
|
1257
1264
|
persistent: { type: Boolean, default: !1 },
|
|
1258
1265
|
blur: { type: [String, Boolean], default: !1 },
|
|
1259
1266
|
wrapperClass: {}
|
|
@@ -1263,7 +1270,7 @@ const dr = ["id"], fr = ["for"], On = /* @__PURE__ */ x({
|
|
|
1263
1270
|
}),
|
|
1264
1271
|
emits: ["update:modelValue"],
|
|
1265
1272
|
setup(e) {
|
|
1266
|
-
const t = e, r =
|
|
1273
|
+
const t = e, r = Q(e, "modelValue"), n = g(null);
|
|
1267
1274
|
function a(i) {
|
|
1268
1275
|
t.persistent || i.target === n.value && (r.value = !1);
|
|
1269
1276
|
}
|
|
@@ -1288,10 +1295,10 @@ const dr = ["id"], fr = ["for"], On = /* @__PURE__ */ x({
|
|
|
1288
1295
|
const s = ur();
|
|
1289
1296
|
return (i, l) => {
|
|
1290
1297
|
const u = hr;
|
|
1291
|
-
return m(),
|
|
1292
|
-
|
|
1298
|
+
return m(), P(wt, { to: "body" }, [
|
|
1299
|
+
Y(u, { theme: c(s) }, {
|
|
1293
1300
|
default: L(() => [
|
|
1294
|
-
|
|
1301
|
+
w("div", {
|
|
1295
1302
|
ref_key: "wrapperRef",
|
|
1296
1303
|
ref: n,
|
|
1297
1304
|
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, i.wrapperClass, {
|
|
@@ -1300,7 +1307,7 @@ const dr = ["id"], fr = ["for"], On = /* @__PURE__ */ x({
|
|
|
1300
1307
|
}]]),
|
|
1301
1308
|
onClick: a
|
|
1302
1309
|
}, [
|
|
1303
|
-
|
|
1310
|
+
M(i.$slots, "default")
|
|
1304
1311
|
], 2)
|
|
1305
1312
|
]),
|
|
1306
1313
|
_: 3
|
|
@@ -1308,9 +1315,9 @@ const dr = ["id"], fr = ["for"], On = /* @__PURE__ */ x({
|
|
|
1308
1315
|
]);
|
|
1309
1316
|
};
|
|
1310
1317
|
}
|
|
1311
|
-
}), mr = { class: "flex justify-end p-4 md:px-6 md:py-4 md:pb-0" }, vr = /* @__PURE__ */
|
|
1318
|
+
}), mr = { class: "flex justify-end p-4 md:px-6 md:py-4 md:pb-0" }, vr = /* @__PURE__ */ w("i", { class: "i-tabler-x" }, null, -1), br = { class: "h-full flex flex-col items-center justify-center px-4 md:px-6" }, Hn = /* @__PURE__ */ x({
|
|
1312
1319
|
__name: "Drawer",
|
|
1313
|
-
props: /* @__PURE__ */
|
|
1320
|
+
props: /* @__PURE__ */ Z({
|
|
1314
1321
|
persistent: { type: Boolean, default: !1 },
|
|
1315
1322
|
blur: { type: [String, Boolean], default: !1 },
|
|
1316
1323
|
position: { default: "left" }
|
|
@@ -1320,21 +1327,21 @@ const dr = ["id"], fr = ["for"], On = /* @__PURE__ */ x({
|
|
|
1320
1327
|
}),
|
|
1321
1328
|
emits: ["update:modelValue"],
|
|
1322
1329
|
setup(e) {
|
|
1323
|
-
const t = e, r =
|
|
1330
|
+
const t = e, r = Q(e, "modelValue");
|
|
1324
1331
|
return G(() => {
|
|
1325
1332
|
r.value ? document.body.style.overflow = "hidden" : setTimeout(() => {
|
|
1326
1333
|
document.querySelector(".modal-wrapper.op100") || (document.body.style.overflow = "", document.body.style.marginRight = "");
|
|
1327
1334
|
}, 300);
|
|
1328
1335
|
}), (n, a) => {
|
|
1329
|
-
const o =
|
|
1330
|
-
return m(),
|
|
1336
|
+
const o = nt, s = lt;
|
|
1337
|
+
return m(), P(s, {
|
|
1331
1338
|
modelValue: r.value,
|
|
1332
1339
|
"onUpdate:modelValue": a[1] || (a[1] = (i) => r.value = i),
|
|
1333
1340
|
blur: t.blur,
|
|
1334
1341
|
persistent: t.persistent
|
|
1335
1342
|
}, {
|
|
1336
1343
|
default: L(() => [
|
|
1337
|
-
|
|
1344
|
+
Y(Je, {
|
|
1338
1345
|
"enter-from-class": n.position === "left" ? "-translate-x-1/1" : "translate-x-1/1",
|
|
1339
1346
|
"enter-to-class": (n.position === "left", "translate-x-0"),
|
|
1340
1347
|
"leave-from-class": (n.position === "left", "translate-x-0"),
|
|
@@ -1345,10 +1352,10 @@ const dr = ["id"], fr = ["for"], On = /* @__PURE__ */ x({
|
|
|
1345
1352
|
default: L(() => [
|
|
1346
1353
|
r.value ? (m(), b("div", {
|
|
1347
1354
|
key: 0,
|
|
1348
|
-
class: y(["h-full bg-surface-low md:w-md
|
|
1355
|
+
class: y(["fixed h-full w-full bg-surface-low md:w-md", n.position === "left" ? "left-0" : "right-0"])
|
|
1349
1356
|
}, [
|
|
1350
|
-
|
|
1351
|
-
|
|
1357
|
+
w("div", mr, [
|
|
1358
|
+
Y(o, {
|
|
1352
1359
|
icon: "",
|
|
1353
1360
|
variant: "transparent",
|
|
1354
1361
|
class: "text-surface-on hover:text-surface-on",
|
|
@@ -1360,10 +1367,10 @@ const dr = ["id"], fr = ["for"], On = /* @__PURE__ */ x({
|
|
|
1360
1367
|
_: 1
|
|
1361
1368
|
})
|
|
1362
1369
|
]),
|
|
1363
|
-
|
|
1364
|
-
|
|
1370
|
+
w("div", br, [
|
|
1371
|
+
M(n.$slots, "default")
|
|
1365
1372
|
])
|
|
1366
|
-
], 2)) :
|
|
1373
|
+
], 2)) : T("", !0)
|
|
1367
1374
|
]),
|
|
1368
1375
|
_: 3
|
|
1369
1376
|
}, 8, ["enter-from-class", "enter-to-class", "leave-from-class", "leave-to-class"])
|
|
@@ -1374,7 +1381,7 @@ const dr = ["id"], fr = ["for"], On = /* @__PURE__ */ x({
|
|
|
1374
1381
|
}
|
|
1375
1382
|
});
|
|
1376
1383
|
function Me(e) {
|
|
1377
|
-
return
|
|
1384
|
+
return _t() ? (xt(e), !0) : !1;
|
|
1378
1385
|
}
|
|
1379
1386
|
function gr() {
|
|
1380
1387
|
const e = /* @__PURE__ */ new Set(), t = (a) => {
|
|
@@ -1392,25 +1399,25 @@ function gr() {
|
|
|
1392
1399
|
trigger: (...a) => Promise.all(Array.from(e).map((o) => o(...a)))
|
|
1393
1400
|
};
|
|
1394
1401
|
}
|
|
1395
|
-
function
|
|
1402
|
+
function He(e) {
|
|
1396
1403
|
return typeof e == "function" ? e() : c(e);
|
|
1397
1404
|
}
|
|
1398
|
-
const
|
|
1405
|
+
const ie = typeof window < "u" && typeof document < "u";
|
|
1399
1406
|
typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
|
|
1400
1407
|
const yr = (e) => e != null, wr = Object.prototype.toString, _r = (e) => wr.call(e) === "[object Object]", xr = () => {
|
|
1401
1408
|
}, kr = (e, t) => Object.prototype.hasOwnProperty.call(e, t);
|
|
1402
1409
|
function Sr(e) {
|
|
1403
|
-
return e ||
|
|
1410
|
+
return e || tt();
|
|
1404
1411
|
}
|
|
1405
1412
|
function Mr(e, t = !0, r) {
|
|
1406
|
-
Sr() ?
|
|
1413
|
+
Sr() ? ne(e, r) : t ? e() : et(e);
|
|
1407
1414
|
}
|
|
1408
|
-
function
|
|
1415
|
+
function te(e) {
|
|
1409
1416
|
var t;
|
|
1410
|
-
const r =
|
|
1417
|
+
const r = He(e);
|
|
1411
1418
|
return (t = r == null ? void 0 : r.$el) != null ? t : r;
|
|
1412
1419
|
}
|
|
1413
|
-
const $e =
|
|
1420
|
+
const $e = ie ? window : void 0, $r = ie ? window.document : void 0;
|
|
1414
1421
|
function F(...e) {
|
|
1415
1422
|
let t, r, n, a;
|
|
1416
1423
|
if (typeof e[0] == "string" || Array.isArray(e[0]) ? ([r, n, a] = e, t = $e) : [t, r, n, a] = e, !t)
|
|
@@ -1418,14 +1425,14 @@ function F(...e) {
|
|
|
1418
1425
|
Array.isArray(r) || (r = [r]), Array.isArray(n) || (n = [n]);
|
|
1419
1426
|
const o = [], s = () => {
|
|
1420
1427
|
o.forEach((d) => d()), o.length = 0;
|
|
1421
|
-
}, i = (d, f, h,
|
|
1422
|
-
() => [
|
|
1428
|
+
}, i = (d, f, h, _) => (d.addEventListener(f, h, _), () => d.removeEventListener(f, h, _)), l = fe(
|
|
1429
|
+
() => [te(t), He(a)],
|
|
1423
1430
|
([d, f]) => {
|
|
1424
1431
|
if (s(), !d)
|
|
1425
1432
|
return;
|
|
1426
1433
|
const h = _r(f) ? { ...f } : f;
|
|
1427
1434
|
o.push(
|
|
1428
|
-
...r.flatMap((
|
|
1435
|
+
...r.flatMap((_) => n.map((C) => i(d, _, C, h)))
|
|
1429
1436
|
);
|
|
1430
1437
|
},
|
|
1431
1438
|
{ immediate: !0, flush: "post" }
|
|
@@ -1447,26 +1454,26 @@ function Te(...e) {
|
|
|
1447
1454
|
dedupe: i = !1
|
|
1448
1455
|
} = n, l = Cr(t);
|
|
1449
1456
|
return F(a, o, (d) => {
|
|
1450
|
-
d.repeat &&
|
|
1457
|
+
d.repeat && He(i) || l(d) && r(d);
|
|
1451
1458
|
}, s);
|
|
1452
1459
|
}
|
|
1453
1460
|
function Ar() {
|
|
1454
1461
|
const e = g(!1);
|
|
1455
|
-
return
|
|
1462
|
+
return tt() && ne(() => {
|
|
1456
1463
|
e.value = !0;
|
|
1457
1464
|
}), e;
|
|
1458
1465
|
}
|
|
1459
|
-
function
|
|
1466
|
+
function ct(e) {
|
|
1460
1467
|
const t = Ar();
|
|
1461
1468
|
return v(() => (t.value, !!e()));
|
|
1462
1469
|
}
|
|
1463
1470
|
function Tr(e, t, r = {}) {
|
|
1464
1471
|
const { window: n = $e, ...a } = r;
|
|
1465
1472
|
let o;
|
|
1466
|
-
const s =
|
|
1473
|
+
const s = ct(() => n && "MutationObserver" in n), i = () => {
|
|
1467
1474
|
o && (o.disconnect(), o = void 0);
|
|
1468
|
-
}, l =
|
|
1469
|
-
() =>
|
|
1475
|
+
}, l = fe(
|
|
1476
|
+
() => te(e),
|
|
1470
1477
|
(f) => {
|
|
1471
1478
|
i(), s.value && n && f && (o = new MutationObserver(t), o.observe(f, a));
|
|
1472
1479
|
},
|
|
@@ -1483,7 +1490,7 @@ function Tr(e, t, r = {}) {
|
|
|
1483
1490
|
function Rr(e, t = {}) {
|
|
1484
1491
|
const r = g(!1), n = kt(null);
|
|
1485
1492
|
let a = 0, o = !0;
|
|
1486
|
-
if (
|
|
1493
|
+
if (ie) {
|
|
1487
1494
|
const s = typeof t == "function" ? { onDrop: t } : t, i = (l) => {
|
|
1488
1495
|
var u, d;
|
|
1489
1496
|
const f = Array.from((d = (u = l.dataTransfer) == null ? void 0 : u.files) != null ? d : []);
|
|
@@ -1494,7 +1501,7 @@ function Rr(e, t = {}) {
|
|
|
1494
1501
|
const f = Array.from(((u = l == null ? void 0 : l.dataTransfer) == null ? void 0 : u.items) || []).map((h) => h.kind === "file" ? h.type : null).filter(yr);
|
|
1495
1502
|
if (s.dataTypes && l.dataTransfer) {
|
|
1496
1503
|
const h = c(s.dataTypes);
|
|
1497
|
-
if (o = typeof h == "function" ? h(f) : h ? h.some((
|
|
1504
|
+
if (o = typeof h == "function" ? h(f) : h ? h.some((_) => f.includes(_)) : !0, !o)
|
|
1498
1505
|
return;
|
|
1499
1506
|
}
|
|
1500
1507
|
l.preventDefault(), a += 1, r.value = !0, (d = s.onEnter) == null || d.call(s, i(l), l);
|
|
@@ -1517,9 +1524,9 @@ function Rr(e, t = {}) {
|
|
|
1517
1524
|
function zr(e, t, r = {}) {
|
|
1518
1525
|
const { window: n = $e, ...a } = r;
|
|
1519
1526
|
let o;
|
|
1520
|
-
const s =
|
|
1527
|
+
const s = ct(() => n && "ResizeObserver" in n), i = () => {
|
|
1521
1528
|
o && (o.disconnect(), o = void 0);
|
|
1522
|
-
}, l = v(() => Array.isArray(e) ? e.map((f) =>
|
|
1529
|
+
}, l = v(() => Array.isArray(e) ? e.map((f) => te(f)) : [te(e)]), u = fe(
|
|
1523
1530
|
l,
|
|
1524
1531
|
(f) => {
|
|
1525
1532
|
if (i(), s.value && n) {
|
|
@@ -1543,17 +1550,17 @@ function Br(e, t = {}) {
|
|
|
1543
1550
|
windowResize: n = !0,
|
|
1544
1551
|
windowScroll: a = !0,
|
|
1545
1552
|
immediate: o = !0
|
|
1546
|
-
} = t, s = g(0), i = g(0), l = g(0), u = g(0), d = g(0), f = g(0), h = g(0),
|
|
1553
|
+
} = t, s = g(0), i = g(0), l = g(0), u = g(0), d = g(0), f = g(0), h = g(0), _ = g(0);
|
|
1547
1554
|
function C() {
|
|
1548
|
-
const
|
|
1549
|
-
if (
|
|
1550
|
-
r && (s.value = 0, i.value = 0, l.value = 0, u.value = 0, d.value = 0, f.value = 0, h.value = 0,
|
|
1555
|
+
const $ = te(e);
|
|
1556
|
+
if (!$) {
|
|
1557
|
+
r && (s.value = 0, i.value = 0, l.value = 0, u.value = 0, d.value = 0, f.value = 0, h.value = 0, _.value = 0);
|
|
1551
1558
|
return;
|
|
1552
1559
|
}
|
|
1553
|
-
const
|
|
1554
|
-
s.value =
|
|
1560
|
+
const O = $.getBoundingClientRect();
|
|
1561
|
+
s.value = O.height, i.value = O.bottom, l.value = O.left, u.value = O.right, d.value = O.top, f.value = O.width, h.value = O.x, _.value = O.y;
|
|
1555
1562
|
}
|
|
1556
|
-
return zr(e, C),
|
|
1563
|
+
return zr(e, C), fe(() => te(e), ($) => !$ && C()), Tr(e, C, {
|
|
1557
1564
|
attributeFilter: ["style", "class"]
|
|
1558
1565
|
}), a && F("scroll", C, { capture: !0, passive: !0 }), n && F("resize", C, { passive: !0 }), Mr(() => {
|
|
1559
1566
|
o && C();
|
|
@@ -1565,7 +1572,7 @@ function Br(e, t = {}) {
|
|
|
1565
1572
|
top: d,
|
|
1566
1573
|
width: f,
|
|
1567
1574
|
x: h,
|
|
1568
|
-
y:
|
|
1575
|
+
y: _,
|
|
1569
1576
|
update: C
|
|
1570
1577
|
};
|
|
1571
1578
|
}
|
|
@@ -1603,8 +1610,8 @@ function Or(e = {}) {
|
|
|
1603
1610
|
onChange: n
|
|
1604
1611
|
};
|
|
1605
1612
|
}
|
|
1606
|
-
function
|
|
1607
|
-
const { initialValue: r = !1, focusVisible: n = !1 } = t, a = g(!1), o = v(() =>
|
|
1613
|
+
function Nr(e, t = {}) {
|
|
1614
|
+
const { initialValue: r = !1, focusVisible: n = !1 } = t, a = g(!1), o = v(() => te(e));
|
|
1608
1615
|
F(o, "focus", (i) => {
|
|
1609
1616
|
var l, u;
|
|
1610
1617
|
(!n || (u = (l = i.target).matches) != null && u.call(l, ":focus-visible")) && (a.value = !0);
|
|
@@ -1616,7 +1623,7 @@ function Pr(e, t = {}) {
|
|
|
1616
1623
|
!i && a.value ? (l = o.value) == null || l.blur() : i && !a.value && ((u = o.value) == null || u.focus());
|
|
1617
1624
|
}
|
|
1618
1625
|
});
|
|
1619
|
-
return
|
|
1626
|
+
return fe(
|
|
1620
1627
|
o,
|
|
1621
1628
|
() => {
|
|
1622
1629
|
s.value = r;
|
|
@@ -1650,13 +1657,13 @@ const In = /* @__PURE__ */ x({
|
|
|
1650
1657
|
"": c(i),
|
|
1651
1658
|
" bg-surface-low": !c(i),
|
|
1652
1659
|
"border-dashed": l.dashed
|
|
1653
|
-
}, "
|
|
1660
|
+
}, "h-full w-full flex cursor-pointer items-center justify-center rounded"]),
|
|
1654
1661
|
onPointerup: u[0] || (u[0] = () => c(s)())
|
|
1655
1662
|
}, [
|
|
1656
|
-
|
|
1663
|
+
M(l.$slots, "default")
|
|
1657
1664
|
], 34));
|
|
1658
1665
|
}
|
|
1659
|
-
}),
|
|
1666
|
+
}), Vn = /* @__PURE__ */ x({
|
|
1660
1667
|
__name: "Image",
|
|
1661
1668
|
props: {
|
|
1662
1669
|
is: { default: "img" },
|
|
@@ -1674,20 +1681,20 @@ const In = /* @__PURE__ */ x({
|
|
|
1674
1681
|
function a() {
|
|
1675
1682
|
r.value = !0;
|
|
1676
1683
|
}
|
|
1677
|
-
|
|
1684
|
+
ne(() => {
|
|
1678
1685
|
var s;
|
|
1679
1686
|
(s = n.value) != null && s.complete && a();
|
|
1680
1687
|
});
|
|
1681
|
-
const o =
|
|
1688
|
+
const o = J(t);
|
|
1682
1689
|
return (s, i) => (m(), b("div", {
|
|
1683
|
-
style:
|
|
1690
|
+
style: A({
|
|
1684
1691
|
height: s.height,
|
|
1685
1692
|
width: s.width,
|
|
1686
1693
|
maxHeight: s.maxHeight,
|
|
1687
1694
|
maxWidth: s.maxWidth
|
|
1688
1695
|
})
|
|
1689
1696
|
}, [
|
|
1690
|
-
s.src ? (m(),
|
|
1697
|
+
s.src ? (m(), P(de(s.is), we({
|
|
1691
1698
|
key: 0,
|
|
1692
1699
|
ref_key: "img",
|
|
1693
1700
|
ref: n,
|
|
@@ -1696,28 +1703,28 @@ const In = /* @__PURE__ */ x({
|
|
|
1696
1703
|
c(o).style
|
|
1697
1704
|
],
|
|
1698
1705
|
src: s.src,
|
|
1699
|
-
class: ["
|
|
1706
|
+
class: ["h-full w-full object-cover", [
|
|
1700
1707
|
t.class,
|
|
1701
1708
|
c(o).class,
|
|
1702
1709
|
{
|
|
1703
1710
|
hidden: !c(r)
|
|
1704
1711
|
}
|
|
1705
1712
|
]]
|
|
1706
|
-
}, s.$attrs, { onLoad: a }), null, 16, ["style", "src", "class"])) :
|
|
1707
|
-
c(r) ?
|
|
1713
|
+
}, s.$attrs, { onLoad: a }), null, 16, ["style", "src", "class"])) : T("", !0),
|
|
1714
|
+
c(r) ? T("", !0) : (m(), b("div", {
|
|
1708
1715
|
key: 1,
|
|
1709
|
-
class: y(["animate-pulse bg-surface-high object-cover
|
|
1716
|
+
class: y(["h-full w-full animate-pulse border-transparent bg-surface-high object-cover", [
|
|
1710
1717
|
t.class,
|
|
1711
1718
|
c(o).class
|
|
1712
1719
|
]]),
|
|
1713
|
-
style:
|
|
1720
|
+
style: A([
|
|
1714
1721
|
s.style,
|
|
1715
1722
|
c(o).style
|
|
1716
1723
|
])
|
|
1717
1724
|
}, null, 6))
|
|
1718
1725
|
], 4));
|
|
1719
1726
|
}
|
|
1720
|
-
}),
|
|
1727
|
+
}), Pr = { class: "relative" }, Dn = /* @__PURE__ */ x({
|
|
1721
1728
|
__name: "Indicator",
|
|
1722
1729
|
props: {
|
|
1723
1730
|
color: { default: "primary" },
|
|
@@ -1771,38 +1778,38 @@ const In = /* @__PURE__ */ x({
|
|
|
1771
1778
|
return "bg-error-container text-error-on";
|
|
1772
1779
|
}
|
|
1773
1780
|
});
|
|
1774
|
-
return (i, l) => (m(), b("div",
|
|
1775
|
-
|
|
1781
|
+
return (i, l) => (m(), b("div", Pr, [
|
|
1782
|
+
w("div", {
|
|
1776
1783
|
class: y([[c(o), c(a)], "absolute z-1"])
|
|
1777
1784
|
}, [
|
|
1778
1785
|
t.ping ? (m(), b("div", {
|
|
1779
1786
|
key: 0,
|
|
1780
|
-
class: y(["absolute animate-ping
|
|
1787
|
+
class: y(["absolute box-content animate-ping border-2 border-transparent rounded-full", [
|
|
1781
1788
|
{
|
|
1782
1789
|
[c(r)]: !i.$slots.label
|
|
1783
1790
|
},
|
|
1784
1791
|
c(s)
|
|
1785
1792
|
]])
|
|
1786
1793
|
}, [
|
|
1787
|
-
i.$slots.label ?
|
|
1788
|
-
], 2)) :
|
|
1789
|
-
|
|
1790
|
-
class: y(["top-0
|
|
1794
|
+
i.$slots.label ? M(i.$slots, "label", { key: 0 }) : T("", !0)
|
|
1795
|
+
], 2)) : T("", !0),
|
|
1796
|
+
w("div", {
|
|
1797
|
+
class: y(["top-0 box-content border-2 border-surface-low rounded-full", [
|
|
1791
1798
|
{
|
|
1792
1799
|
[c(r)]: !i.$slots.label
|
|
1793
1800
|
},
|
|
1794
1801
|
c(s)
|
|
1795
1802
|
]])
|
|
1796
1803
|
}, [
|
|
1797
|
-
i.$slots.label ?
|
|
1804
|
+
i.$slots.label ? M(i.$slots, "label", { key: 0 }) : T("", !0)
|
|
1798
1805
|
], 2)
|
|
1799
1806
|
], 2),
|
|
1800
|
-
|
|
1807
|
+
M(i.$slots, "default")
|
|
1801
1808
|
]));
|
|
1802
1809
|
}
|
|
1803
|
-
}),
|
|
1810
|
+
}), Fn = /* @__PURE__ */ x({
|
|
1804
1811
|
__name: "Modal",
|
|
1805
|
-
props: /* @__PURE__ */
|
|
1812
|
+
props: /* @__PURE__ */ Z({
|
|
1806
1813
|
persistent: { type: Boolean, default: !1 },
|
|
1807
1814
|
blur: { type: [String, Boolean], default: !1 }
|
|
1808
1815
|
}, {
|
|
@@ -1811,14 +1818,14 @@ const In = /* @__PURE__ */ x({
|
|
|
1811
1818
|
}),
|
|
1812
1819
|
emits: ["update:modelValue"],
|
|
1813
1820
|
setup(e) {
|
|
1814
|
-
const t = e, r =
|
|
1821
|
+
const t = e, r = Q(e, "modelValue");
|
|
1815
1822
|
return G(() => {
|
|
1816
1823
|
r.value ? document.body.style.overflow = "hidden" : setTimeout(() => {
|
|
1817
1824
|
document.querySelector(".modal-wrapper.op100") || (document.body.style.overflow = "", document.body.style.marginRight = "");
|
|
1818
1825
|
}, 300);
|
|
1819
1826
|
}), (n, a) => {
|
|
1820
|
-
const o =
|
|
1821
|
-
return m(),
|
|
1827
|
+
const o = lt;
|
|
1828
|
+
return m(), P(o, {
|
|
1822
1829
|
modelValue: r.value,
|
|
1823
1830
|
"onUpdate:modelValue": a[0] || (a[0] = (s) => r.value = s),
|
|
1824
1831
|
blur: t.blur,
|
|
@@ -1826,7 +1833,7 @@ const In = /* @__PURE__ */ x({
|
|
|
1826
1833
|
"wrapper-class": "flex items-end justify-center"
|
|
1827
1834
|
}, {
|
|
1828
1835
|
default: L(() => [
|
|
1829
|
-
|
|
1836
|
+
Y(Je, {
|
|
1830
1837
|
"enter-from-class": "translate-y-1/2",
|
|
1831
1838
|
"enter-to-class": "translate-y-0",
|
|
1832
1839
|
"leave-from-class": "translate-y-0",
|
|
@@ -1835,7 +1842,7 @@ const In = /* @__PURE__ */ x({
|
|
|
1835
1842
|
"leave-active-class": "transition ease-in duration-200"
|
|
1836
1843
|
}, {
|
|
1837
1844
|
default: L(() => [
|
|
1838
|
-
r.value ?
|
|
1845
|
+
r.value ? M(n.$slots, "default", { key: 0 }) : T("", !0)
|
|
1839
1846
|
]),
|
|
1840
1847
|
_: 3
|
|
1841
1848
|
})
|
|
@@ -1844,13 +1851,13 @@ const In = /* @__PURE__ */ x({
|
|
|
1844
1851
|
}, 8, ["modelValue", "blur", "persistent"]);
|
|
1845
1852
|
};
|
|
1846
1853
|
}
|
|
1847
|
-
}),
|
|
1854
|
+
}), Hr = {
|
|
1848
1855
|
key: 0,
|
|
1849
|
-
class: "i-tabler-loader-2
|
|
1850
|
-
},
|
|
1851
|
-
key:
|
|
1852
|
-
class: "text-sm text-surface-
|
|
1853
|
-
}, Fr = /* @__PURE__ */
|
|
1856
|
+
class: "h-container w-container i-tabler-loader-2 shrink-0 animate-spin"
|
|
1857
|
+
}, Ir = { key: 1 }, Vr = { class: "grow-1" }, Dr = {
|
|
1858
|
+
key: 2,
|
|
1859
|
+
class: "text-sm text-surface-onlow"
|
|
1860
|
+
}, Fr = /* @__PURE__ */ w("i", { class: "i-tabler-x" }, null, -1), Wr = /* @__PURE__ */ x({
|
|
1854
1861
|
__name: "Notification",
|
|
1855
1862
|
props: {
|
|
1856
1863
|
title: {},
|
|
@@ -1859,11 +1866,13 @@ const In = /* @__PURE__ */ x({
|
|
|
1859
1866
|
loading: { type: Boolean },
|
|
1860
1867
|
withBorder: { type: Boolean },
|
|
1861
1868
|
closeable: { type: Boolean },
|
|
1869
|
+
rounded: { default: "md" },
|
|
1870
|
+
block: { type: Boolean, default: !1 },
|
|
1862
1871
|
color: { default: "primary" }
|
|
1863
1872
|
},
|
|
1864
1873
|
emits: ["close"],
|
|
1865
1874
|
setup(e) {
|
|
1866
|
-
const t = e, r = v(() => {
|
|
1875
|
+
const t = e, r = J(t), n = v(() => {
|
|
1867
1876
|
switch (t.color) {
|
|
1868
1877
|
case "secondary":
|
|
1869
1878
|
return "bg-secondary-container";
|
|
@@ -1874,7 +1883,7 @@ const In = /* @__PURE__ */ x({
|
|
|
1874
1883
|
default:
|
|
1875
1884
|
return "bg-primary-container";
|
|
1876
1885
|
}
|
|
1877
|
-
}),
|
|
1886
|
+
}), a = v(() => {
|
|
1878
1887
|
switch (t.color) {
|
|
1879
1888
|
case "secondary":
|
|
1880
1889
|
return "text-secondary-container";
|
|
@@ -1886,58 +1895,64 @@ const In = /* @__PURE__ */ x({
|
|
|
1886
1895
|
return "text-primary-container";
|
|
1887
1896
|
}
|
|
1888
1897
|
});
|
|
1889
|
-
return (
|
|
1890
|
-
const
|
|
1898
|
+
return (o, s) => {
|
|
1899
|
+
const i = nt;
|
|
1891
1900
|
return m(), b("div", {
|
|
1892
|
-
class: y(["relative
|
|
1893
|
-
{ "border-0": !
|
|
1894
|
-
|
|
1901
|
+
class: y(["relative min-h-16 min-w-80 w-full flex items-center gap-2 container-low p-3", [
|
|
1902
|
+
{ "border-0": !o.withBorder },
|
|
1903
|
+
c(r).class,
|
|
1904
|
+
{
|
|
1905
|
+
"max-w-100": !o.block,
|
|
1906
|
+
"w-full": o.block
|
|
1907
|
+
}
|
|
1908
|
+
]]),
|
|
1909
|
+
style: A(c(r).style)
|
|
1895
1910
|
}, [
|
|
1896
|
-
|
|
1911
|
+
o.icon ? (m(), b("div", {
|
|
1897
1912
|
key: 0,
|
|
1898
|
-
class: y(["leading-0", c(
|
|
1913
|
+
class: y(["leading-0", c(a)])
|
|
1899
1914
|
}, [
|
|
1900
|
-
|
|
1915
|
+
o.loading ? (m(), b("i", Hr)) : (m(), b("i", {
|
|
1901
1916
|
key: 1,
|
|
1902
|
-
class: y(["h-container w-container shrink-0",
|
|
1917
|
+
class: y(["h-container w-container shrink-0", o.icon])
|
|
1903
1918
|
}, null, 2))
|
|
1904
|
-
], 2)) : (m(), b("div",
|
|
1905
|
-
|
|
1919
|
+
], 2)) : (m(), b("div", Ir, [
|
|
1920
|
+
w("div", {
|
|
1906
1921
|
class: y(["absolute left-[0.25rem] top-[0.25rem] h-[calc(100%-0.5rem)] w-1 rounded-full", [{
|
|
1907
|
-
"animate-pulse":
|
|
1908
|
-
}, c(
|
|
1922
|
+
"animate-pulse": o.loading
|
|
1923
|
+
}, c(n)]])
|
|
1909
1924
|
}, null, 2)
|
|
1910
1925
|
])),
|
|
1911
|
-
|
|
1912
|
-
|
|
1926
|
+
w("div", Vr, [
|
|
1927
|
+
o.title ? (m(), b("div", {
|
|
1913
1928
|
key: 0,
|
|
1914
|
-
class: y([c(
|
|
1915
|
-
},
|
|
1916
|
-
|
|
1929
|
+
class: y([c(a), "text-base"])
|
|
1930
|
+
}, se(o.title), 3)) : T("", !0),
|
|
1931
|
+
o.$slots.message ? M(o.$slots, "message", { key: 1 }) : o.message ? (m(), b("div", Dr, se(o.message), 1)) : T("", !0)
|
|
1917
1932
|
]),
|
|
1918
|
-
|
|
1933
|
+
o.closeable ? (m(), P(i, {
|
|
1919
1934
|
key: 2,
|
|
1920
1935
|
icon: "",
|
|
1921
1936
|
variant: "transparent",
|
|
1922
1937
|
class: "text-surface-on hover:text-surface-on",
|
|
1923
|
-
onClick:
|
|
1938
|
+
onClick: s[0] || (s[0] = (l) => o.$emit("close"))
|
|
1924
1939
|
}, {
|
|
1925
1940
|
default: L(() => [
|
|
1926
1941
|
Fr
|
|
1927
1942
|
]),
|
|
1928
1943
|
_: 1
|
|
1929
|
-
})) :
|
|
1930
|
-
],
|
|
1944
|
+
})) : T("", !0)
|
|
1945
|
+
], 6);
|
|
1931
1946
|
};
|
|
1932
1947
|
}
|
|
1933
|
-
}),
|
|
1934
|
-
let
|
|
1948
|
+
}), ut = /* @__PURE__ */ new Set(), E = /* @__PURE__ */ new WeakMap(), le = /* @__PURE__ */ new WeakMap(), re = /* @__PURE__ */ new WeakMap(), Be = /* @__PURE__ */ new WeakMap(), Lr = /* @__PURE__ */ new WeakMap(), ce = /* @__PURE__ */ new WeakMap(), xe = /* @__PURE__ */ new WeakMap(), ve = /* @__PURE__ */ new WeakSet();
|
|
1949
|
+
let K, Ie = 0, Ve = 0;
|
|
1935
1950
|
const U = "__aa_tgt", ge = "__aa_del", ke = "__aa_new", jr = (e) => {
|
|
1936
1951
|
const t = Yr(e);
|
|
1937
1952
|
t && t.forEach((r) => Zr(r));
|
|
1938
1953
|
}, Ur = (e) => {
|
|
1939
1954
|
e.forEach((t) => {
|
|
1940
|
-
t.target ===
|
|
1955
|
+
t.target === K && qr(), E.has(t.target) && oe(t.target);
|
|
1941
1956
|
});
|
|
1942
1957
|
};
|
|
1943
1958
|
function Gr(e) {
|
|
@@ -1945,49 +1960,49 @@ function Gr(e) {
|
|
|
1945
1960
|
t == null || t.disconnect();
|
|
1946
1961
|
let r = E.get(e), n = 0;
|
|
1947
1962
|
const a = 5;
|
|
1948
|
-
r || (r =
|
|
1949
|
-
const { offsetWidth: o, offsetHeight: s } =
|
|
1963
|
+
r || (r = ue(e), E.set(e, r));
|
|
1964
|
+
const { offsetWidth: o, offsetHeight: s } = K, l = [
|
|
1950
1965
|
r.top - a,
|
|
1951
1966
|
o - (r.left + a + r.width),
|
|
1952
1967
|
s - (r.top + a + r.height),
|
|
1953
1968
|
r.left - a
|
|
1954
1969
|
].map((d) => `${-1 * Math.floor(d)}px`).join(" "), u = new IntersectionObserver(() => {
|
|
1955
|
-
++n > 1 &&
|
|
1970
|
+
++n > 1 && oe(e);
|
|
1956
1971
|
}, {
|
|
1957
|
-
root:
|
|
1972
|
+
root: K,
|
|
1958
1973
|
threshold: 1,
|
|
1959
1974
|
rootMargin: l
|
|
1960
1975
|
});
|
|
1961
1976
|
u.observe(e), Be.set(e, u);
|
|
1962
1977
|
}
|
|
1963
|
-
function
|
|
1978
|
+
function oe(e) {
|
|
1964
1979
|
clearTimeout(xe.get(e));
|
|
1965
1980
|
const t = Ce(e), r = ye(t) ? 500 : t.duration;
|
|
1966
1981
|
xe.set(e, setTimeout(async () => {
|
|
1967
|
-
const n =
|
|
1982
|
+
const n = re.get(e);
|
|
1968
1983
|
try {
|
|
1969
|
-
await (n == null ? void 0 : n.finished), E.set(e,
|
|
1984
|
+
await (n == null ? void 0 : n.finished), E.set(e, ue(e)), Gr(e);
|
|
1970
1985
|
} catch {
|
|
1971
1986
|
}
|
|
1972
1987
|
}, r));
|
|
1973
1988
|
}
|
|
1974
1989
|
function qr() {
|
|
1975
|
-
clearTimeout(xe.get(
|
|
1976
|
-
|
|
1990
|
+
clearTimeout(xe.get(K)), xe.set(K, setTimeout(() => {
|
|
1991
|
+
ut.forEach((e) => ht(e, (t) => dt(() => oe(t))));
|
|
1977
1992
|
}, 100));
|
|
1978
1993
|
}
|
|
1979
1994
|
function Xr(e) {
|
|
1980
1995
|
setTimeout(() => {
|
|
1981
|
-
Lr.set(e, setInterval(() =>
|
|
1996
|
+
Lr.set(e, setInterval(() => dt(oe.bind(null, e)), 2e3));
|
|
1982
1997
|
}, Math.round(2e3 * Math.random()));
|
|
1983
1998
|
}
|
|
1984
|
-
function
|
|
1999
|
+
function dt(e) {
|
|
1985
2000
|
typeof requestIdleCallback == "function" ? requestIdleCallback(() => e()) : requestAnimationFrame(() => e());
|
|
1986
2001
|
}
|
|
1987
|
-
let Ee,
|
|
1988
|
-
typeof window < "u" && (
|
|
1989
|
-
Ve = window.scrollY,
|
|
1990
|
-
}),
|
|
2002
|
+
let Ee, ae;
|
|
2003
|
+
typeof window < "u" && (K = document.documentElement, Ee = new MutationObserver(jr), ae = new ResizeObserver(Ur), window.addEventListener("scroll", () => {
|
|
2004
|
+
Ve = window.scrollY, Ie = window.scrollX;
|
|
2005
|
+
}), ae.observe(K));
|
|
1991
2006
|
function Yr(e) {
|
|
1992
2007
|
return e.reduce((n, a) => [
|
|
1993
2008
|
...n,
|
|
@@ -2013,7 +2028,7 @@ function Yr(e) {
|
|
|
2013
2028
|
const s = a.removedNodes[o];
|
|
2014
2029
|
if (ge in s)
|
|
2015
2030
|
return !1;
|
|
2016
|
-
s instanceof Element && (n.add(s), Re(a.target, s),
|
|
2031
|
+
s instanceof Element && (n.add(s), Re(a.target, s), le.set(s, [
|
|
2017
2032
|
a.previousSibling,
|
|
2018
2033
|
a.nextSibling
|
|
2019
2034
|
]));
|
|
@@ -2028,7 +2043,7 @@ function Re(e, t) {
|
|
|
2028
2043
|
function Zr(e) {
|
|
2029
2044
|
var t;
|
|
2030
2045
|
const r = e.isConnected, n = E.has(e);
|
|
2031
|
-
r &&
|
|
2046
|
+
r && le.has(e) && le.delete(e), re.has(e) && ((t = re.get(e)) === null || t === void 0 || t.cancel()), ke in e ? Ye(e) : n && r ? Qr(e) : n && !r ? Jr(e) : Ye(e);
|
|
2032
2047
|
}
|
|
2033
2048
|
function W(e) {
|
|
2034
2049
|
return Number(e.replace(/[^0-9.\-]/g, ""));
|
|
@@ -2042,7 +2057,7 @@ function Kr(e) {
|
|
|
2042
2057
|
}
|
|
2043
2058
|
return { x: 0, y: 0 };
|
|
2044
2059
|
}
|
|
2045
|
-
function
|
|
2060
|
+
function ue(e) {
|
|
2046
2061
|
const t = e.getBoundingClientRect(), { x: r, y: n } = Kr(e);
|
|
2047
2062
|
return {
|
|
2048
2063
|
top: t.top + n,
|
|
@@ -2051,7 +2066,7 @@ function ce(e) {
|
|
|
2051
2066
|
height: t.height
|
|
2052
2067
|
};
|
|
2053
2068
|
}
|
|
2054
|
-
function
|
|
2069
|
+
function ft(e, t, r) {
|
|
2055
2070
|
let n = t.width, a = t.height, o = r.width, s = r.height;
|
|
2056
2071
|
const i = getComputedStyle(e);
|
|
2057
2072
|
if (i.getPropertyValue("box-sizing") === "content-box") {
|
|
@@ -2061,21 +2076,21 @@ function dt(e, t, r) {
|
|
|
2061
2076
|
return [n, o, a, s].map(Math.round);
|
|
2062
2077
|
}
|
|
2063
2078
|
function Ce(e) {
|
|
2064
|
-
return U in e &&
|
|
2079
|
+
return U in e && ce.has(e[U]) ? ce.get(e[U]) : { duration: 250, easing: "ease-in-out" };
|
|
2065
2080
|
}
|
|
2066
|
-
function
|
|
2081
|
+
function pt(e) {
|
|
2067
2082
|
if (U in e)
|
|
2068
2083
|
return e[U];
|
|
2069
2084
|
}
|
|
2070
2085
|
function De(e) {
|
|
2071
|
-
const t =
|
|
2072
|
-
return t ?
|
|
2086
|
+
const t = pt(e);
|
|
2087
|
+
return t ? ve.has(t) : !1;
|
|
2073
2088
|
}
|
|
2074
|
-
function
|
|
2075
|
-
t.forEach((r) => r(e,
|
|
2089
|
+
function ht(e, ...t) {
|
|
2090
|
+
t.forEach((r) => r(e, ce.has(e)));
|
|
2076
2091
|
for (let r = 0; r < e.children.length; r++) {
|
|
2077
2092
|
const n = e.children.item(r);
|
|
2078
|
-
n && t.forEach((a) => a(n,
|
|
2093
|
+
n && t.forEach((a) => a(n, ce.has(n)));
|
|
2079
2094
|
}
|
|
2080
2095
|
}
|
|
2081
2096
|
function Fe(e) {
|
|
@@ -2085,7 +2100,7 @@ function ye(e) {
|
|
|
2085
2100
|
return typeof e == "function";
|
|
2086
2101
|
}
|
|
2087
2102
|
function Qr(e) {
|
|
2088
|
-
const t = E.get(e), r =
|
|
2103
|
+
const t = E.get(e), r = ue(e);
|
|
2089
2104
|
if (!De(e))
|
|
2090
2105
|
return E.set(e, r);
|
|
2091
2106
|
let n;
|
|
@@ -2093,7 +2108,7 @@ function Qr(e) {
|
|
|
2093
2108
|
return;
|
|
2094
2109
|
const a = Ce(e);
|
|
2095
2110
|
if (typeof a != "function") {
|
|
2096
|
-
const o = t.left - r.left, s = t.top - r.top, [i, l, u, d] =
|
|
2111
|
+
const o = t.left - r.left, s = t.top - r.top, [i, l, u, d] = ft(e, t, r), f = {
|
|
2097
2112
|
transform: `translate(${o}px, ${s}px)`
|
|
2098
2113
|
}, h = {
|
|
2099
2114
|
transform: "translate(0, 0)"
|
|
@@ -2106,11 +2121,11 @@ function Qr(e) {
|
|
|
2106
2121
|
const [o] = Fe(a(e, "remain", t, r));
|
|
2107
2122
|
n = new Animation(o), n.play();
|
|
2108
2123
|
}
|
|
2109
|
-
|
|
2124
|
+
re.set(e, n), E.set(e, r), n.addEventListener("finish", oe.bind(null, e));
|
|
2110
2125
|
}
|
|
2111
2126
|
function Ye(e) {
|
|
2112
2127
|
ke in e && delete e[ke];
|
|
2113
|
-
const t =
|
|
2128
|
+
const t = ue(e);
|
|
2114
2129
|
E.set(e, t);
|
|
2115
2130
|
const r = Ce(e);
|
|
2116
2131
|
if (!De(e))
|
|
@@ -2129,11 +2144,11 @@ function Ye(e) {
|
|
|
2129
2144
|
const [a] = Fe(r(e, "add", t));
|
|
2130
2145
|
n = new Animation(a), n.play();
|
|
2131
2146
|
}
|
|
2132
|
-
|
|
2147
|
+
re.set(e, n), n.addEventListener("finish", oe.bind(null, e));
|
|
2133
2148
|
}
|
|
2134
2149
|
function Ze(e, t) {
|
|
2135
2150
|
var r;
|
|
2136
|
-
e.remove(), E.delete(e),
|
|
2151
|
+
e.remove(), E.delete(e), le.delete(e), re.delete(e), (r = Be.get(e)) === null || r === void 0 || r.disconnect(), setTimeout(() => {
|
|
2137
2152
|
if (ge in e && delete e[ge], Object.defineProperty(e, ke, { value: !0, configurable: !0 }), t && e instanceof HTMLElement)
|
|
2138
2153
|
for (const n in t)
|
|
2139
2154
|
e.style[n] = "";
|
|
@@ -2141,16 +2156,16 @@ function Ze(e, t) {
|
|
|
2141
2156
|
}
|
|
2142
2157
|
function Jr(e) {
|
|
2143
2158
|
var t;
|
|
2144
|
-
if (!
|
|
2159
|
+
if (!le.has(e) || !E.has(e))
|
|
2145
2160
|
return;
|
|
2146
|
-
const [r, n] =
|
|
2161
|
+
const [r, n] = le.get(e);
|
|
2147
2162
|
Object.defineProperty(e, ge, { value: !0, configurable: !0 });
|
|
2148
2163
|
const a = window.scrollX, o = window.scrollY;
|
|
2149
|
-
if (n && n.parentNode && n.parentNode instanceof Element ? n.parentNode.insertBefore(e, n) : r && r.parentNode ? r.parentNode.appendChild(e) : (t =
|
|
2164
|
+
if (n && n.parentNode && n.parentNode instanceof Element ? n.parentNode.insertBefore(e, n) : r && r.parentNode ? r.parentNode.appendChild(e) : (t = pt(e)) === null || t === void 0 || t.appendChild(e), !De(e))
|
|
2150
2165
|
return Ze(e);
|
|
2151
2166
|
const [s, i, l, u] = tn(e), d = Ce(e), f = E.get(e);
|
|
2152
|
-
(a !==
|
|
2153
|
-
let h,
|
|
2167
|
+
(a !== Ie || o !== Ve) && en(e, a, o, d);
|
|
2168
|
+
let h, _ = {
|
|
2154
2169
|
position: "absolute",
|
|
2155
2170
|
top: `${s}px`,
|
|
2156
2171
|
left: `${i}px`,
|
|
@@ -2162,7 +2177,7 @@ function Jr(e) {
|
|
|
2162
2177
|
zIndex: "100"
|
|
2163
2178
|
};
|
|
2164
2179
|
if (!ye(d))
|
|
2165
|
-
Object.assign(e.style,
|
|
2180
|
+
Object.assign(e.style, _), h = e.animate([
|
|
2166
2181
|
{
|
|
2167
2182
|
transform: "scale(1)",
|
|
2168
2183
|
opacity: 1
|
|
@@ -2173,14 +2188,14 @@ function Jr(e) {
|
|
|
2173
2188
|
}
|
|
2174
2189
|
], { duration: d.duration, easing: "ease-out" });
|
|
2175
2190
|
else {
|
|
2176
|
-
const [C,
|
|
2177
|
-
(
|
|
2191
|
+
const [C, $] = Fe(d(e, "remove", f));
|
|
2192
|
+
($ == null ? void 0 : $.styleReset) !== !1 && (_ = ($ == null ? void 0 : $.styleReset) || _, Object.assign(e.style, _)), h = new Animation(C), h.play();
|
|
2178
2193
|
}
|
|
2179
|
-
|
|
2194
|
+
re.set(e, h), h.addEventListener("finish", Ze.bind(null, e, _));
|
|
2180
2195
|
}
|
|
2181
2196
|
function en(e, t, r, n) {
|
|
2182
|
-
const a =
|
|
2183
|
-
if (getComputedStyle(
|
|
2197
|
+
const a = Ie - t, o = Ve - r, s = document.documentElement.style.scrollBehavior;
|
|
2198
|
+
if (getComputedStyle(K).scrollBehavior === "smooth" && (document.documentElement.style.scrollBehavior = "auto"), window.scrollTo(window.scrollX + a, window.scrollY + o), !e.parentElement)
|
|
2184
2199
|
return;
|
|
2185
2200
|
const l = e.parentElement;
|
|
2186
2201
|
let u = l.clientHeight, d = l.clientWidth;
|
|
@@ -2188,10 +2203,10 @@ function en(e, t, r, n) {
|
|
|
2188
2203
|
function h() {
|
|
2189
2204
|
requestAnimationFrame(() => {
|
|
2190
2205
|
if (!ye(n)) {
|
|
2191
|
-
const
|
|
2206
|
+
const _ = u - l.clientHeight, C = d - l.clientWidth;
|
|
2192
2207
|
f + n.duration > performance.now() ? (window.scrollTo({
|
|
2193
2208
|
left: window.scrollX - C,
|
|
2194
|
-
top: window.scrollY -
|
|
2209
|
+
top: window.scrollY - _
|
|
2195
2210
|
}), u = l.clientHeight, d = l.clientWidth, h()) : document.documentElement.style.scrollBehavior = s;
|
|
2196
2211
|
}
|
|
2197
2212
|
});
|
|
@@ -2199,24 +2214,24 @@ function en(e, t, r, n) {
|
|
|
2199
2214
|
h();
|
|
2200
2215
|
}
|
|
2201
2216
|
function tn(e) {
|
|
2202
|
-
const t = E.get(e), [r, , n] =
|
|
2217
|
+
const t = E.get(e), [r, , n] = ft(e, t, ue(e));
|
|
2203
2218
|
let a = e.parentElement;
|
|
2204
2219
|
for (; a && (getComputedStyle(a).position === "static" || a instanceof HTMLBodyElement); )
|
|
2205
2220
|
a = a.parentElement;
|
|
2206
2221
|
a || (a = document.body);
|
|
2207
|
-
const o = getComputedStyle(a), s = E.get(a) ||
|
|
2222
|
+
const o = getComputedStyle(a), s = E.get(a) || ue(a), i = Math.round(t.top - s.top) - W(o.borderTopWidth), l = Math.round(t.left - s.left) - W(o.borderLeftWidth);
|
|
2208
2223
|
return [i, l, r, n];
|
|
2209
2224
|
}
|
|
2210
2225
|
function rn(e, t = {}) {
|
|
2211
|
-
return Ee &&
|
|
2226
|
+
return Ee && ae && (window.matchMedia("(prefers-reduced-motion: reduce)").matches && !ye(t) && !t.disrespectUserMotionPreference || (ve.add(e), getComputedStyle(e).position === "static" && Object.assign(e.style, { position: "relative" }), ht(e, oe, Xr, (a) => ae == null ? void 0 : ae.observe(a)), ye(t) ? ce.set(e, t) : ce.set(e, { duration: 250, easing: "ease-in-out", ...t }), Ee.observe(e, { childList: !0 }), ut.add(e))), Object.freeze({
|
|
2212
2227
|
parent: e,
|
|
2213
2228
|
enable: () => {
|
|
2214
|
-
|
|
2229
|
+
ve.add(e);
|
|
2215
2230
|
},
|
|
2216
2231
|
disable: () => {
|
|
2217
|
-
|
|
2232
|
+
ve.delete(e);
|
|
2218
2233
|
},
|
|
2219
|
-
isEnabled: () =>
|
|
2234
|
+
isEnabled: () => ve.has(e)
|
|
2220
2235
|
});
|
|
2221
2236
|
}
|
|
2222
2237
|
const nn = {
|
|
@@ -2225,14 +2240,14 @@ const nn = {
|
|
|
2225
2240
|
},
|
|
2226
2241
|
// ignore ssr see #96:
|
|
2227
2242
|
getSSRProps: () => ({})
|
|
2228
|
-
}, on = { class: "fixed z-20 flex flex-col gap-2 p-2" },
|
|
2243
|
+
}, on = { class: "fixed z-20 flex flex-col gap-2 p-2" }, Wn = /* @__PURE__ */ x({
|
|
2229
2244
|
__name: "NotificationSystem",
|
|
2230
2245
|
setup(e) {
|
|
2231
2246
|
const t = dn();
|
|
2232
2247
|
return (r, n) => {
|
|
2233
2248
|
const a = Wr;
|
|
2234
|
-
return
|
|
2235
|
-
(m(!0), b(
|
|
2249
|
+
return Pe((m(), b("div", on, [
|
|
2250
|
+
(m(!0), b(ee, null, be(c(t), (o) => (m(), P(a, {
|
|
2236
2251
|
key: o.hash,
|
|
2237
2252
|
closeable: "",
|
|
2238
2253
|
"with-border": "",
|
|
@@ -2248,7 +2263,7 @@ const nn = {
|
|
|
2248
2263
|
]);
|
|
2249
2264
|
};
|
|
2250
2265
|
}
|
|
2251
|
-
}), an = { class: "relative" },
|
|
2266
|
+
}), an = { class: "relative" }, Ln = /* @__PURE__ */ x({
|
|
2252
2267
|
__name: "Overlay",
|
|
2253
2268
|
props: {
|
|
2254
2269
|
blur: { type: [Boolean, String], default: !1 },
|
|
@@ -2267,24 +2282,24 @@ const nn = {
|
|
|
2267
2282
|
case "lg":
|
|
2268
2283
|
return "backdrop-blur-lg";
|
|
2269
2284
|
default:
|
|
2270
|
-
return "
|
|
2285
|
+
return "";
|
|
2271
2286
|
}
|
|
2272
|
-
}), n =
|
|
2287
|
+
}), n = J(t), a = g(null), o = p(t.color).toRgb(), s = v(() => ({
|
|
2273
2288
|
backgroundColor: `rgba(${o.r}, ${o.g}, ${o.b}, ${t.opacity / 100})`
|
|
2274
2289
|
}));
|
|
2275
2290
|
return (i, l) => (m(), b("div", an, [
|
|
2276
|
-
|
|
2277
|
-
|
|
2291
|
+
M(i.$slots, "default"),
|
|
2292
|
+
w("div", we(i.$attrs, {
|
|
2278
2293
|
ref_key: "wrapperRef",
|
|
2279
2294
|
ref: a,
|
|
2280
|
-
class: [[c(r), c(n).class], "absolute
|
|
2295
|
+
class: [[c(r), c(n).class], "absolute left-0 top-0 h-full w-full overflow-hidden md:items-center"],
|
|
2281
2296
|
style: [c(n).style, c(s)]
|
|
2282
2297
|
}), [
|
|
2283
|
-
|
|
2298
|
+
M(i.$slots, "content")
|
|
2284
2299
|
], 16)
|
|
2285
2300
|
]));
|
|
2286
2301
|
}
|
|
2287
|
-
}),
|
|
2302
|
+
}), jn = /* @__PURE__ */ x({
|
|
2288
2303
|
__name: "Paper",
|
|
2289
2304
|
props: {
|
|
2290
2305
|
size: { default: "md" },
|
|
@@ -2293,18 +2308,18 @@ const nn = {
|
|
|
2293
2308
|
is: { default: "div" }
|
|
2294
2309
|
},
|
|
2295
2310
|
setup(e) {
|
|
2296
|
-
const r =
|
|
2297
|
-
return (n, a) => (m(),
|
|
2311
|
+
const r = J(e);
|
|
2312
|
+
return (n, a) => (m(), P(de(n.is), {
|
|
2298
2313
|
class: y(["container-low rounded-lg p-4", [
|
|
2299
2314
|
{
|
|
2300
2315
|
"border-transparent": !n.withBorder
|
|
2301
2316
|
},
|
|
2302
2317
|
c(r).class
|
|
2303
2318
|
]]),
|
|
2304
|
-
style:
|
|
2319
|
+
style: A([c(r).style])
|
|
2305
2320
|
}, {
|
|
2306
2321
|
default: L(() => [
|
|
2307
|
-
|
|
2322
|
+
M(n.$slots, "default")
|
|
2308
2323
|
]),
|
|
2309
2324
|
_: 3
|
|
2310
2325
|
}, 8, ["class", "style"]));
|
|
@@ -2353,7 +2368,7 @@ const nn = {
|
|
|
2353
2368
|
default:
|
|
2354
2369
|
return "text-surface-on bg-surface-base border-surface-border-base focus:border-primary-container";
|
|
2355
2370
|
}
|
|
2356
|
-
}), i = v(() => n.disabled ? "pointer-events-none filter grayscale opacity-60" : ""), l =
|
|
2371
|
+
}), i = v(() => n.disabled ? "pointer-events-none filter grayscale opacity-60" : ""), l = J(n), u = g(null);
|
|
2357
2372
|
function d(f) {
|
|
2358
2373
|
var h;
|
|
2359
2374
|
a("update:modelValue", ((h = f.target) == null ? void 0 : h.value) ?? ""), a("input", f);
|
|
@@ -2364,19 +2379,18 @@ const nn = {
|
|
|
2364
2379
|
ref_key: "input",
|
|
2365
2380
|
ref: u,
|
|
2366
2381
|
value: f.modelValue,
|
|
2367
|
-
tabindex: "-1",
|
|
2368
2382
|
class: y(["bg-back-2 border px-2 py-1 outline-none transition-background-color,border-color,color", [c(s), c(i), c(l).class, c(o).base]]),
|
|
2369
|
-
style:
|
|
2383
|
+
style: A([c(l).style]),
|
|
2370
2384
|
placeholder: f.placeholder,
|
|
2371
2385
|
type: n.password ? "password" : "text",
|
|
2372
|
-
onChange: h[0] || (h[0] = (
|
|
2386
|
+
onChange: h[0] || (h[0] = (_) => f.$emit("change", _)),
|
|
2373
2387
|
onInput: d,
|
|
2374
|
-
onClick: h[1] || (h[1] = (
|
|
2375
|
-
onPointerdown: h[2] || (h[2] = (
|
|
2376
|
-
onPointerup: h[3] || (h[3] = (
|
|
2388
|
+
onClick: h[1] || (h[1] = (_) => f.$emit("click", _)),
|
|
2389
|
+
onPointerdown: h[2] || (h[2] = (_) => f.$emit("pointerdown", _)),
|
|
2390
|
+
onPointerup: h[3] || (h[3] = (_) => f.$emit("pointerup", _))
|
|
2377
2391
|
}, null, 46, sn));
|
|
2378
2392
|
}
|
|
2379
|
-
}), cn = { class: "flex gap-2" },
|
|
2393
|
+
}), cn = { class: "flex gap-2" }, Un = /* @__PURE__ */ x({
|
|
2380
2394
|
__name: "PinInput",
|
|
2381
2395
|
props: {
|
|
2382
2396
|
modelValue: {},
|
|
@@ -2401,7 +2415,7 @@ const nn = {
|
|
|
2401
2415
|
i !== 0 && (r.value[i - 1].el.focus(), r.value[i - 1].el.select(), s || (r.value[i - 1].el.value = ""));
|
|
2402
2416
|
}
|
|
2403
2417
|
return (o, s) => (m(), b("div", cn, [
|
|
2404
|
-
(m(!0), b(
|
|
2418
|
+
(m(!0), b(ee, null, be(t.length, (i) => (m(), P(ln, {
|
|
2405
2419
|
ref_for: !0,
|
|
2406
2420
|
ref_key: "inputs",
|
|
2407
2421
|
ref: r,
|
|
@@ -2410,12 +2424,12 @@ const nn = {
|
|
|
2410
2424
|
style: { padding: "0" },
|
|
2411
2425
|
password: t.password,
|
|
2412
2426
|
onPointerup: s[0] || (s[0] = (l) => l.target.select()),
|
|
2413
|
-
onInput:
|
|
2427
|
+
onInput: rt(n, ["stop", "prevent"]),
|
|
2414
2428
|
onKeydown: $t(a, ["backspace"])
|
|
2415
2429
|
}, null, 8, ["password"]))), 128))
|
|
2416
2430
|
]));
|
|
2417
2431
|
}
|
|
2418
|
-
}),
|
|
2432
|
+
}), Gn = /* @__PURE__ */ x({
|
|
2419
2433
|
__name: "Progress",
|
|
2420
2434
|
props: {
|
|
2421
2435
|
value: { default: 0 },
|
|
@@ -2447,10 +2461,10 @@ const nn = {
|
|
|
2447
2461
|
case "error":
|
|
2448
2462
|
return "bg-error-7";
|
|
2449
2463
|
}
|
|
2450
|
-
}), a =
|
|
2464
|
+
}), a = J(t);
|
|
2451
2465
|
return (o, s) => (m(), b("div", {
|
|
2452
2466
|
class: y(["relative w-full self-center overflow-hidden bg-surface-high transition-background-color,border-color,color", [c(r), c(a).class]]),
|
|
2453
|
-
style:
|
|
2467
|
+
style: A([c(a).style])
|
|
2454
2468
|
}, [
|
|
2455
2469
|
o.loading ? (m(), b("div", {
|
|
2456
2470
|
key: 1,
|
|
@@ -2458,13 +2472,13 @@ const nn = {
|
|
|
2458
2472
|
}, null, 2)) : (m(), b("div", {
|
|
2459
2473
|
key: 0,
|
|
2460
2474
|
class: y(["h-full", [c(n)]]),
|
|
2461
|
-
style:
|
|
2462
|
-
width: `${(o.value - o.min) / (o.max - o.min) * 100}%`
|
|
2475
|
+
style: A([{
|
|
2476
|
+
width: `${(Number(o.value) - Number(o.min)) / (Number(o.max) - Number(o.min)) * 100}%`
|
|
2463
2477
|
}])
|
|
2464
2478
|
}, null, 6))
|
|
2465
2479
|
], 6));
|
|
2466
2480
|
}
|
|
2467
|
-
}),
|
|
2481
|
+
}), mt = {
|
|
2468
2482
|
primary: ["#e5f7ff", "#d3ebfa", "#a9d4f1", "#7cbde9", "#57a9e0", "#3f9cdc", "#3096dc", "#1f82c4", "#0f73b0", "#00649c", "#082f49"],
|
|
2469
2483
|
secondary: ["#e9fbf0", "#dcf1e3", "#badfc7", "#96cea9", "#77bf90", "#63b580", "#58b077", "#479a64", "#3b8a58", "#2c7749", "#022c22"],
|
|
2470
2484
|
tertiary: ["#fff7e1", "#ffedcd", "#fcd99e", "#f9c46b", "#f7b23f", "#f6a724", "#f5a113", "#da8c04", "#c37d00", "#aa6a00", "#572508"],
|
|
@@ -2473,38 +2487,38 @@ const nn = {
|
|
|
2473
2487
|
}, Oe = {
|
|
2474
2488
|
name: "dark",
|
|
2475
2489
|
scheme: "dark",
|
|
2476
|
-
colors:
|
|
2490
|
+
colors: mt
|
|
2477
2491
|
}, un = {
|
|
2478
2492
|
name: "light",
|
|
2479
2493
|
scheme: "light",
|
|
2480
|
-
colors:
|
|
2481
|
-
},
|
|
2494
|
+
colors: mt
|
|
2495
|
+
}, qn = Symbol("Notifications"), vt = Ct([]);
|
|
2482
2496
|
function dn() {
|
|
2483
|
-
return
|
|
2497
|
+
return vt;
|
|
2484
2498
|
}
|
|
2485
|
-
class
|
|
2499
|
+
class Xn {
|
|
2486
2500
|
static show(t) {
|
|
2487
|
-
t.hash = Math.random().toString(36),
|
|
2501
|
+
t.hash = Math.random().toString(36), vt.push(t);
|
|
2488
2502
|
}
|
|
2489
2503
|
}
|
|
2490
|
-
const
|
|
2504
|
+
const Ne = [0.96, 0.907, 0.805, 0.697, 0.605, 0.547, 0.518, 0.445, 0.395, 0.34, 0.28], Ke = [0.32, 0.16, 0.08, 0.04, 0, 0, 0.04, 0.08, 0.16, 0.32, 0.64];
|
|
2491
2505
|
function fn(e) {
|
|
2492
2506
|
const t = p(e).toHsl().l;
|
|
2493
|
-
return
|
|
2507
|
+
return Ne.reduce(
|
|
2494
2508
|
(r, n) => Math.abs(n - t) < Math.abs(r - t) ? n : r
|
|
2495
2509
|
);
|
|
2496
2510
|
}
|
|
2497
2511
|
function pn(e) {
|
|
2498
|
-
const t = p(e), r = fn(t), n =
|
|
2512
|
+
const t = p(e), r = fn(t), n = Ne.findIndex((o) => o === r), a = Ne.map((o) => {
|
|
2499
2513
|
const s = p({ h: t.toHsl().h, s: t.toHsl().s, l: o }), i = Ke[n] - Ke[n];
|
|
2500
2514
|
return i >= 0 ? s.saturate(i * 100) : s.desaturate(i * -100), s;
|
|
2501
2515
|
});
|
|
2502
2516
|
return { baseColorIndex: n, colors: a.map((o) => o.toHexString()) };
|
|
2503
2517
|
}
|
|
2504
|
-
function
|
|
2518
|
+
function Yn(e) {
|
|
2505
2519
|
return pn(e).colors;
|
|
2506
2520
|
}
|
|
2507
|
-
const
|
|
2521
|
+
const Zn = /* @__PURE__ */ x({
|
|
2508
2522
|
__name: "RokuProvider",
|
|
2509
2523
|
props: {
|
|
2510
2524
|
is: { default: "div" },
|
|
@@ -2514,32 +2528,208 @@ const Xn = /* @__PURE__ */ x({
|
|
|
2514
2528
|
},
|
|
2515
2529
|
setup(e) {
|
|
2516
2530
|
const t = e, r = g(0), n = g(0);
|
|
2517
|
-
|
|
2531
|
+
ie && new ResizeObserver(() => {
|
|
2518
2532
|
const i = window.innerWidth - document.body.clientWidth;
|
|
2519
2533
|
i !== 0 && (r.value = i), n.value = i;
|
|
2520
2534
|
}).observe(document.body);
|
|
2521
|
-
const a = v(() => n.value === r.value ? "0px" : `${r.value}px`), o =
|
|
2522
|
-
return (s, i) => (m(),
|
|
2523
|
-
style:
|
|
2535
|
+
const a = v(() => n.value === r.value ? "0px" : `${r.value}px`), o = st(t.theme);
|
|
2536
|
+
return (s, i) => (m(), P(de(s.is), {
|
|
2537
|
+
style: A([
|
|
2524
2538
|
c(o),
|
|
2525
2539
|
{ paddingRight: c(a) }
|
|
2526
2540
|
]),
|
|
2527
2541
|
class: "text-surface-on transition-background-color,border-color,color"
|
|
2528
2542
|
}, {
|
|
2529
2543
|
default: L(() => [
|
|
2530
|
-
|
|
2544
|
+
M(s.$slots, "default")
|
|
2531
2545
|
]),
|
|
2532
2546
|
_: 3
|
|
2533
2547
|
}, 8, ["style"]));
|
|
2534
2548
|
}
|
|
2535
|
-
}), hn =
|
|
2549
|
+
}), hn = ["id"], mn = ["for"], vn = ["for"], bn = /* @__PURE__ */ x({
|
|
2550
|
+
inheritAttrs: !1,
|
|
2551
|
+
__name: "Switch",
|
|
2552
|
+
props: /* @__PURE__ */ Z({
|
|
2553
|
+
size: { default: "md" },
|
|
2554
|
+
animate: { type: Boolean, default: !0 },
|
|
2555
|
+
options: {},
|
|
2556
|
+
label: {},
|
|
2557
|
+
id: {},
|
|
2558
|
+
rounded: { default: "full" },
|
|
2559
|
+
color: { default: "primary" },
|
|
2560
|
+
disabled: { type: Boolean },
|
|
2561
|
+
offIcon: {},
|
|
2562
|
+
onIcon: {},
|
|
2563
|
+
value: { type: Boolean }
|
|
2564
|
+
}, {
|
|
2565
|
+
modelValue: { type: Boolean },
|
|
2566
|
+
modelModifiers: {}
|
|
2567
|
+
}),
|
|
2568
|
+
emits: ["update:modelValue"],
|
|
2569
|
+
setup(e) {
|
|
2570
|
+
const t = e, r = Q(e, "modelValue");
|
|
2571
|
+
t.value && (r.value = t.value);
|
|
2572
|
+
const n = g(null), a = g(!1), o = v(() => {
|
|
2573
|
+
switch (t.size) {
|
|
2574
|
+
case "sm":
|
|
2575
|
+
return {
|
|
2576
|
+
icon: "text-xs mx-0.5",
|
|
2577
|
+
wrapper: "h-4 w-8",
|
|
2578
|
+
indicator: a.value ? "h-3 w-4" : "h-3 w-3",
|
|
2579
|
+
inactive: "left-[calc(0.125rem-1px)]",
|
|
2580
|
+
active: a.value ? "left-[calc(0.875rem-1px)]" : "left-[calc(1.125rem-1px)]"
|
|
2581
|
+
};
|
|
2582
|
+
case "md":
|
|
2583
|
+
return {
|
|
2584
|
+
icon: "text-sm mx-1",
|
|
2585
|
+
wrapper: "h-6 w-12",
|
|
2586
|
+
indicator: a.value ? "h-4 w-5" : "h-4 w-4",
|
|
2587
|
+
inactive: "left-[calc(0.25rem-1px)]",
|
|
2588
|
+
active: a.value ? "left-[calc(1.5rem-1px)]" : "left-[calc(1.75rem-1px)]"
|
|
2589
|
+
};
|
|
2590
|
+
case "lg":
|
|
2591
|
+
return {
|
|
2592
|
+
icon: "text-lg mx-2",
|
|
2593
|
+
wrapper: "h-8 w-16",
|
|
2594
|
+
indicator: a.value ? "h-6 w-8" : "h-6 w-6",
|
|
2595
|
+
inactive: "left-[calc(0.25rem-1px)]",
|
|
2596
|
+
active: a.value ? "left-[calc(1.75rem-1px)]" : "left-[calc(2.25rem-1px)]"
|
|
2597
|
+
};
|
|
2598
|
+
}
|
|
2599
|
+
}), s = v(() => t.animate ? {
|
|
2600
|
+
indicator: "transition-all",
|
|
2601
|
+
progress: "transition-width"
|
|
2602
|
+
} : {
|
|
2603
|
+
indicator: "",
|
|
2604
|
+
progress: ""
|
|
2605
|
+
}), i = it(t), l = v(() => {
|
|
2606
|
+
let d = "bg-primary-container";
|
|
2607
|
+
switch (t.color) {
|
|
2608
|
+
case "secondary":
|
|
2609
|
+
d = "bg-secondary-7";
|
|
2610
|
+
break;
|
|
2611
|
+
case "tertiary":
|
|
2612
|
+
d = "bg-tertiary-7";
|
|
2613
|
+
break;
|
|
2614
|
+
case "error":
|
|
2615
|
+
d = "bg-error-7";
|
|
2616
|
+
break;
|
|
2617
|
+
}
|
|
2618
|
+
return {
|
|
2619
|
+
wrapper: r.value ? `border border-transparent ${d}` : "bg-surface-lowest border border-surface-border-low",
|
|
2620
|
+
indicator: t.disabled ? "bg-surface-high" : "bg-white text-primary-container"
|
|
2621
|
+
};
|
|
2622
|
+
}), u = J(t);
|
|
2623
|
+
return (d, f) => (m(), b("div", {
|
|
2624
|
+
role: "switch",
|
|
2625
|
+
class: y(["relative flex items-center gap-2", {
|
|
2626
|
+
"pointer-events-none filter-grayscale op60": t.disabled
|
|
2627
|
+
}])
|
|
2628
|
+
}, [
|
|
2629
|
+
Pe(w("input", we({
|
|
2630
|
+
id: c(i),
|
|
2631
|
+
"onUpdate:modelValue": f[0] || (f[0] = (h) => r.value = h)
|
|
2632
|
+
}, d.$attrs, {
|
|
2633
|
+
class: "hidden",
|
|
2634
|
+
type: "checkbox"
|
|
2635
|
+
}), null, 16, hn), [
|
|
2636
|
+
[At, r.value]
|
|
2637
|
+
]),
|
|
2638
|
+
w("label", {
|
|
2639
|
+
class: "leading-0 cursor-pointer!",
|
|
2640
|
+
for: c(i)
|
|
2641
|
+
}, [
|
|
2642
|
+
w("div", {
|
|
2643
|
+
ref_key: "wrapper",
|
|
2644
|
+
ref: n,
|
|
2645
|
+
class: y([[c(o).wrapper, c(l).wrapper, c(u).class], "relative inline-block transition-all"]),
|
|
2646
|
+
style: A([c(u).style]),
|
|
2647
|
+
onPointerdown: f[1] || (f[1] = (h) => a.value = !0),
|
|
2648
|
+
onPointerup: f[2] || (f[2] = (h) => a.value = !1),
|
|
2649
|
+
onPointerleave: f[3] || (f[3] = (h) => a.value = !1),
|
|
2650
|
+
onPointerenter: f[4] || (f[4] = (h) => h.buttons === 1 && (a.value = !0))
|
|
2651
|
+
}, [
|
|
2652
|
+
w("div", {
|
|
2653
|
+
class: y(["absolute top-50% -translate-y-50%", [c(o).indicator, c(l).indicator, c(s).indicator, r.value ? c(o).active : c(o).inactive, c(u).class]]),
|
|
2654
|
+
style: A([c(u).style])
|
|
2655
|
+
}, null, 6),
|
|
2656
|
+
w("i", {
|
|
2657
|
+
class: y(["absolute top-1/2 -translate-y-50%", [c(o).icon, {
|
|
2658
|
+
[`left-0 text-${d.color}-on`]: r.value,
|
|
2659
|
+
"right-0 text-surface-on ": !r.value,
|
|
2660
|
+
[d.onIcon ?? ""]: r.value && d.onIcon,
|
|
2661
|
+
[d.offIcon ?? ""]: !r.value && d.offIcon
|
|
2662
|
+
}]])
|
|
2663
|
+
}, null, 2)
|
|
2664
|
+
], 38)
|
|
2665
|
+
], 8, mn),
|
|
2666
|
+
d.label ? (m(), b("label", {
|
|
2667
|
+
key: 0,
|
|
2668
|
+
for: c(i)
|
|
2669
|
+
}, se(d.label), 9, vn)) : T("", !0)
|
|
2670
|
+
], 2));
|
|
2671
|
+
}
|
|
2672
|
+
}), gn = { class: "dark:hidden" }, yn = { class: "light:hidden" }, Kn = /* @__PURE__ */ x({
|
|
2673
|
+
__name: "SchemeSwitch",
|
|
2674
|
+
setup(e) {
|
|
2675
|
+
const t = g(void 0);
|
|
2676
|
+
G(() => {
|
|
2677
|
+
ie && (t.value === !0 ? (document.documentElement.setAttribute("data-scheme", "dark"), localStorage.setItem("scheme", "dark")) : t.value === !1 && (document.documentElement.setAttribute("data-scheme", "light"), localStorage.setItem("scheme", "light")));
|
|
2678
|
+
});
|
|
2679
|
+
const r = g(!0), n = g(!1);
|
|
2680
|
+
return ne(() => {
|
|
2681
|
+
if (ie) {
|
|
2682
|
+
const a = localStorage.getItem("scheme");
|
|
2683
|
+
a === "dark" ? t.value = !0 : a === "light" ? t.value = !1 : t.value = window.matchMedia("(prefers-color-scheme: dark)").matches;
|
|
2684
|
+
}
|
|
2685
|
+
r.value = !1;
|
|
2686
|
+
}), et(() => {
|
|
2687
|
+
n.value = !0;
|
|
2688
|
+
}), (a, o) => {
|
|
2689
|
+
const s = bn;
|
|
2690
|
+
return m(), b(ee, null, [
|
|
2691
|
+
w("div", {
|
|
2692
|
+
class: y({ hidden: !c(r) })
|
|
2693
|
+
}, [
|
|
2694
|
+
w("div", gn, [
|
|
2695
|
+
Y(s, {
|
|
2696
|
+
value: !1,
|
|
2697
|
+
"on-icon": "i-tabler-moon",
|
|
2698
|
+
"off-icon": "i-tabler-sun"
|
|
2699
|
+
})
|
|
2700
|
+
]),
|
|
2701
|
+
w("div", yn, [
|
|
2702
|
+
Y(s, {
|
|
2703
|
+
value: !0,
|
|
2704
|
+
color: "secondary",
|
|
2705
|
+
"on-icon": "i-tabler-moon",
|
|
2706
|
+
"off-icon": "i-tabler-sun"
|
|
2707
|
+
})
|
|
2708
|
+
])
|
|
2709
|
+
], 2),
|
|
2710
|
+
w("div", {
|
|
2711
|
+
class: y({ hidden: c(r) })
|
|
2712
|
+
}, [
|
|
2713
|
+
Y(s, {
|
|
2714
|
+
modelValue: c(t),
|
|
2715
|
+
"onUpdate:modelValue": o[0] || (o[0] = (i) => Tt(t) ? t.value = i : null),
|
|
2716
|
+
animate: c(n),
|
|
2717
|
+
color: "secondary",
|
|
2718
|
+
"on-icon": "i-tabler-moon",
|
|
2719
|
+
"off-icon": "i-tabler-sun"
|
|
2720
|
+
}, null, 8, ["modelValue", "animate"])
|
|
2721
|
+
], 2)
|
|
2722
|
+
], 64);
|
|
2723
|
+
};
|
|
2724
|
+
}
|
|
2725
|
+
}), wn = { class: "w-full flex items-center" }, _n = ["placeholder", "value"], xn = /* @__PURE__ */ w("i", { class: "i-tabler-chevron-down pointer-events-none absolute right-2" }, null, -1), kn = {
|
|
2536
2726
|
key: 0,
|
|
2537
2727
|
class: "flex cursor-default items-center justify-between gap-2 rounded p-1 px-2"
|
|
2538
|
-
},
|
|
2539
|
-
|
|
2540
|
-
],
|
|
2728
|
+
}, Sn = ["onPointerdown", "onHover"], Mn = { key: 0 }, $n = /* @__PURE__ */ w("i", { class: "i-tabler-check h-3 w-3" }, null, -1), Cn = [
|
|
2729
|
+
$n
|
|
2730
|
+
], Qn = /* @__PURE__ */ x({
|
|
2541
2731
|
__name: "Select",
|
|
2542
|
-
props: /* @__PURE__ */
|
|
2732
|
+
props: /* @__PURE__ */ Z({
|
|
2543
2733
|
options: { default() {
|
|
2544
2734
|
return [];
|
|
2545
2735
|
} },
|
|
@@ -2550,22 +2740,22 @@ const Xn = /* @__PURE__ */ x({
|
|
|
2550
2740
|
modelValue: { default: void 0 },
|
|
2551
2741
|
modelModifiers: {}
|
|
2552
2742
|
}),
|
|
2553
|
-
emits: /* @__PURE__ */
|
|
2743
|
+
emits: /* @__PURE__ */ Z(["change"], ["update:modelValue"]),
|
|
2554
2744
|
setup(e, { emit: t }) {
|
|
2555
|
-
const r = e, n = t, a =
|
|
2745
|
+
const r = e, n = t, a = Q(e, "modelValue"), o = g(null), s = g(null), { focused: i } = Nr(o), l = v(() => r.options.map((k) => $(k)).indexOf(a.value)), u = g(-1), d = g(-1);
|
|
2556
2746
|
G(() => {
|
|
2557
2747
|
i.value || (d.value = -1);
|
|
2558
2748
|
}), G(() => {
|
|
2559
|
-
a.value =
|
|
2560
|
-
}),
|
|
2749
|
+
a.value = $(r.options[l.value]);
|
|
2750
|
+
}), fe(a, () => {
|
|
2561
2751
|
n("change", a.value);
|
|
2562
2752
|
});
|
|
2563
|
-
const f = r.options, h = v(() => f[l.value]),
|
|
2753
|
+
const f = r.options, h = v(() => f[l.value]), _ = v(() => C(h.value));
|
|
2564
2754
|
function C(k) {
|
|
2565
2755
|
if (k)
|
|
2566
2756
|
return typeof k == "string" || typeof k == "symbol" || typeof k == "number" ? k : k.label;
|
|
2567
2757
|
}
|
|
2568
|
-
function
|
|
2758
|
+
function $(k) {
|
|
2569
2759
|
if (k)
|
|
2570
2760
|
return typeof k == "string" || typeof k == "symbol" || typeof k == "number" ? k : k.id;
|
|
2571
2761
|
}
|
|
@@ -2574,18 +2764,18 @@ const Xn = /* @__PURE__ */ x({
|
|
|
2574
2764
|
}), Te("ArrowUp", (k) => {
|
|
2575
2765
|
i.value && (k.preventDefault(), d.value = (d.value - 1 + f.length) % f.length);
|
|
2576
2766
|
}), Te("Enter", () => {
|
|
2577
|
-
i.value && d.value !== -1 && (a.value =
|
|
2767
|
+
i.value && d.value !== -1 && (a.value = $(f[d.value]), i.value = !1);
|
|
2578
2768
|
});
|
|
2579
|
-
function
|
|
2769
|
+
function O(k) {
|
|
2580
2770
|
if (!i.value) {
|
|
2581
2771
|
i.value = !0;
|
|
2582
2772
|
return;
|
|
2583
2773
|
}
|
|
2584
|
-
a.value =
|
|
2774
|
+
a.value = $(k), i.value = !1;
|
|
2585
2775
|
}
|
|
2586
|
-
const
|
|
2776
|
+
const pe = v(() => ({
|
|
2587
2777
|
input: "container-base focus:border-primary-container"
|
|
2588
|
-
})),
|
|
2778
|
+
})), he = v(() => {
|
|
2589
2779
|
switch (r.size) {
|
|
2590
2780
|
case "sm":
|
|
2591
2781
|
return {
|
|
@@ -2604,48 +2794,47 @@ const Xn = /* @__PURE__ */ x({
|
|
|
2604
2794
|
};
|
|
2605
2795
|
}
|
|
2606
2796
|
});
|
|
2607
|
-
return (k,
|
|
2797
|
+
return (k, I) => (m(), b("div", {
|
|
2608
2798
|
ref_key: "wrapperRef",
|
|
2609
2799
|
ref: s,
|
|
2610
2800
|
class: "r-select-wrapper relative"
|
|
2611
2801
|
}, [
|
|
2612
|
-
|
|
2613
|
-
|
|
2802
|
+
w("div", wn, [
|
|
2803
|
+
w("input", {
|
|
2614
2804
|
ref_key: "inputRef",
|
|
2615
2805
|
ref: o,
|
|
2616
|
-
class: y([[c(
|
|
2806
|
+
class: y([[c(pe).input, c(he).wrapper], "r-select-input cursor-pointer border rounded outline-none outline-none focus-visible:outline-2"]),
|
|
2617
2807
|
placeholder: k.placeholder,
|
|
2618
2808
|
readonly: "",
|
|
2619
|
-
value: c(
|
|
2809
|
+
value: c(_),
|
|
2620
2810
|
"aria-haspopup": "listbox",
|
|
2621
2811
|
autocomplete: "off",
|
|
2622
|
-
|
|
2623
|
-
|
|
2624
|
-
|
|
2625
|
-
vn
|
|
2812
|
+
onFocus: I[0] || (I[0] = (q) => i.value = !0)
|
|
2813
|
+
}, null, 42, _n),
|
|
2814
|
+
xn
|
|
2626
2815
|
]),
|
|
2627
2816
|
c(i) ? (m(), b("div", {
|
|
2628
2817
|
key: 0,
|
|
2629
|
-
class: y([c(
|
|
2818
|
+
class: y([c(he).dropdown, "absolute z-1 mt-2 w-full flex-col overflow-hidden border container-base rounded p-1"])
|
|
2630
2819
|
}, [
|
|
2631
|
-
c(f).length === 0 ? (m(), b("div",
|
|
2632
|
-
key:
|
|
2820
|
+
c(f).length === 0 ? (m(), b("div", kn, se(k.noneText), 1)) : (m(!0), b(ee, { key: 1 }, be(c(f), (q, R) => (m(), b("div", {
|
|
2821
|
+
key: $(q),
|
|
2633
2822
|
class: y([{
|
|
2634
|
-
"hover:bg-surface-high": c(d) !==
|
|
2635
|
-
"container-filled-primary": c(d) ===
|
|
2823
|
+
"hover:bg-surface-high": c(d) !== R,
|
|
2824
|
+
"container-filled-primary": c(d) === R
|
|
2636
2825
|
}, "flex cursor-pointer items-center justify-between gap-2 rounded p-1 px-2"]),
|
|
2637
|
-
onPointerdown: (z) =>
|
|
2638
|
-
onHover: (z) => u.value =
|
|
2826
|
+
onPointerdown: (z) => O(q),
|
|
2827
|
+
onHover: (z) => u.value = R
|
|
2639
2828
|
}, [
|
|
2640
|
-
|
|
2641
|
-
q === c(h) ? (m(), b("div",
|
|
2642
|
-
], 42,
|
|
2643
|
-
], 2)) :
|
|
2829
|
+
Rt(se(C(q)) + " ", 1),
|
|
2830
|
+
q === c(h) ? (m(), b("div", Mn, Cn)) : T("", !0)
|
|
2831
|
+
], 42, Sn))), 128))
|
|
2832
|
+
], 2)) : T("", !0)
|
|
2644
2833
|
], 512));
|
|
2645
2834
|
}
|
|
2646
|
-
}),
|
|
2835
|
+
}), An = { class: "relative inline-block w-full" }, Jn = /* @__PURE__ */ x({
|
|
2647
2836
|
__name: "Slider",
|
|
2648
|
-
props: /* @__PURE__ */
|
|
2837
|
+
props: /* @__PURE__ */ Z({
|
|
2649
2838
|
size: { default: "md" },
|
|
2650
2839
|
animate: { type: Boolean, default: !1 },
|
|
2651
2840
|
width: {},
|
|
@@ -2665,23 +2854,23 @@ const Xn = /* @__PURE__ */ x({
|
|
|
2665
2854
|
emits: ["update:modelValue"],
|
|
2666
2855
|
setup(e) {
|
|
2667
2856
|
const t = e;
|
|
2668
|
-
function r(
|
|
2669
|
-
const
|
|
2670
|
-
for (let X =
|
|
2671
|
-
|
|
2672
|
-
return
|
|
2857
|
+
function r(R, z, B) {
|
|
2858
|
+
const H = [];
|
|
2859
|
+
for (let X = R; X <= z; X += B)
|
|
2860
|
+
H.push(X);
|
|
2861
|
+
return H[H.length - 1] !== z && H.push(z), H;
|
|
2673
2862
|
}
|
|
2674
|
-
function n(
|
|
2863
|
+
function n(R, z) {
|
|
2675
2864
|
const B = [];
|
|
2676
2865
|
B.push(z[0]);
|
|
2677
|
-
const
|
|
2678
|
-
for (let X = 1; X <
|
|
2679
|
-
B.push(z[Math.round(X *
|
|
2866
|
+
const H = (z.length - 1) / (R - 1);
|
|
2867
|
+
for (let X = 1; X < R - 1; X++)
|
|
2868
|
+
B.push(z[Math.round(X * H)]);
|
|
2680
2869
|
return B.push(z[z.length - 1]), B;
|
|
2681
2870
|
}
|
|
2682
|
-
const a = v(() => t.options ? t.options.length : t.tickNum ?? 0), o = v(() => t.options === void 0 ? r(t.min, t.max, t.step) : t.options), s = v(() => n(a.value, o.value)), i =
|
|
2683
|
-
function d(
|
|
2684
|
-
return o.value.indexOf(
|
|
2871
|
+
const a = v(() => t.options ? t.options.length : t.tickNum ?? 0), o = v(() => t.options === void 0 ? r(t.min, t.max, t.step) : t.options), s = v(() => n(a.value, o.value)), i = Q(e, "modelValue"), l = v(() => o.value.length ?? 0), u = g(o.value.includes(i.value) ? o.value.indexOf(i.value) : 0);
|
|
2872
|
+
function d(R) {
|
|
2873
|
+
return o.value.indexOf(R);
|
|
2685
2874
|
}
|
|
2686
2875
|
const f = v(() => {
|
|
2687
2876
|
switch (t.color) {
|
|
@@ -2694,7 +2883,7 @@ const Xn = /* @__PURE__ */ x({
|
|
|
2694
2883
|
case "error":
|
|
2695
2884
|
return "bg-error-container";
|
|
2696
2885
|
}
|
|
2697
|
-
}), h = v(() => `dark:bg-white bg-${t.color}-container`),
|
|
2886
|
+
}), h = v(() => `dark:bg-white bg-${t.color}-container`), _ = v(() => {
|
|
2698
2887
|
switch (t.color) {
|
|
2699
2888
|
case "primary":
|
|
2700
2889
|
return "dark:bg-primary-container bg-white";
|
|
@@ -2709,28 +2898,28 @@ const Xn = /* @__PURE__ */ x({
|
|
|
2709
2898
|
G(() => {
|
|
2710
2899
|
i.value = o.value[u.value];
|
|
2711
2900
|
});
|
|
2712
|
-
const C = g(),
|
|
2713
|
-
function
|
|
2714
|
-
if (!
|
|
2901
|
+
const C = g(), $ = g(), O = Br(C), pe = g(!1);
|
|
2902
|
+
function he(R) {
|
|
2903
|
+
if (!pe.value)
|
|
2715
2904
|
return;
|
|
2716
|
-
if (!(
|
|
2717
|
-
|
|
2905
|
+
if (!(R.buttons === 1)) {
|
|
2906
|
+
pe.value = !1;
|
|
2718
2907
|
return;
|
|
2719
2908
|
}
|
|
2720
|
-
|
|
2721
|
-
const { clientX: B } =
|
|
2909
|
+
R.preventDefault(), R.stopPropagation();
|
|
2910
|
+
const { clientX: B } = R, H = O.left.value, bt = O.right.value - H, Ae = Math.round((B - H) / bt * (l.value - 1));
|
|
2722
2911
|
Ae < 0 || Ae > l.value - 1 || (u.value = Ae);
|
|
2723
2912
|
}
|
|
2724
2913
|
G(() => {
|
|
2725
2914
|
u.value = d(i.value);
|
|
2726
2915
|
});
|
|
2727
|
-
function k(
|
|
2728
|
-
|
|
2916
|
+
function k(R) {
|
|
2917
|
+
R.preventDefault(), R.stopPropagation(), pe.value = !0, he(R);
|
|
2729
2918
|
}
|
|
2730
|
-
F(C, "pointerdown", k),
|
|
2731
|
-
F(document, "pointermove",
|
|
2919
|
+
F(C, "pointerdown", k), ne(() => {
|
|
2920
|
+
F(document, "pointermove", he), u.value = Math.max(0, d(i.value));
|
|
2732
2921
|
});
|
|
2733
|
-
const
|
|
2922
|
+
const I = v(() => {
|
|
2734
2923
|
switch (t.size) {
|
|
2735
2924
|
case "sm":
|
|
2736
2925
|
return {
|
|
@@ -2770,253 +2959,111 @@ const Xn = /* @__PURE__ */ x({
|
|
|
2770
2959
|
indicator: "",
|
|
2771
2960
|
progress: ""
|
|
2772
2961
|
});
|
|
2773
|
-
return (
|
|
2774
|
-
|
|
2962
|
+
return (R, z) => (m(), b("div", An, [
|
|
2963
|
+
w("div", {
|
|
2775
2964
|
ref_key: "wrapper",
|
|
2776
2965
|
ref: C,
|
|
2777
2966
|
type: "size",
|
|
2778
|
-
class: y(["
|
|
2779
|
-
onTouchmove: z[0] || (z[0] =
|
|
2967
|
+
class: y(["w-full flex cursor-pointer items-center", c(I).wrapper]),
|
|
2968
|
+
onTouchmove: z[0] || (z[0] = rt(() => {
|
|
2780
2969
|
}, ["prevent"]))
|
|
2781
2970
|
}, [
|
|
2782
|
-
|
|
2783
|
-
class: y(["
|
|
2971
|
+
w("div", {
|
|
2972
|
+
class: y(["w-full rounded-full bg-surface-lowest transition-background-color,border-color,color", c(I).innerWrapper])
|
|
2784
2973
|
}, [
|
|
2785
|
-
|
|
2786
|
-
class: y(["relative flex", c(
|
|
2787
|
-
style:
|
|
2974
|
+
w("div", {
|
|
2975
|
+
class: y(["relative flex", c(I).content]),
|
|
2976
|
+
style: A({
|
|
2788
2977
|
width: `${t.width}rem`,
|
|
2789
2978
|
minWidth: `${t.minWidth}rem`
|
|
2790
2979
|
})
|
|
2791
2980
|
}, [
|
|
2792
|
-
(m(!0), b(
|
|
2981
|
+
(m(!0), b(ee, null, be(c(s), (B) => (m(), b("div", {
|
|
2793
2982
|
key: B,
|
|
2794
|
-
style:
|
|
2983
|
+
style: A({
|
|
2795
2984
|
left: `${d(B) / (c(l) - 1) * 100}%`
|
|
2796
2985
|
}),
|
|
2797
|
-
class: y(["absolute top-50% rounded-full bg-white", c(
|
|
2986
|
+
class: y(["absolute top-50% rounded-full bg-white", c(I).tick])
|
|
2798
2987
|
}, null, 6))), 128)),
|
|
2799
2988
|
c(u) !== -1 ? (m(), b("div", {
|
|
2800
2989
|
key: 0,
|
|
2801
2990
|
ref_key: "indicator",
|
|
2802
|
-
ref:
|
|
2803
|
-
class: y(["absolute top-50% cursor-pointer rounded-full transition-background-color,border-color,color", [c(
|
|
2804
|
-
style:
|
|
2991
|
+
ref: $,
|
|
2992
|
+
class: y(["absolute top-50% cursor-pointer rounded-full transition-background-color,border-color,color", [c(I).indicator, c(q).indicator, c(h)]]),
|
|
2993
|
+
style: A({
|
|
2805
2994
|
left: `${c(u) / (c(l) - 1) * 100}%`
|
|
2806
2995
|
})
|
|
2807
2996
|
}, [
|
|
2808
|
-
|
|
2809
|
-
class: y(["pointer-events-none absolute left-50% top-50% rounded-full transition-background-color,border-color,color", [c(
|
|
2997
|
+
w("div", {
|
|
2998
|
+
class: y(["pointer-events-none absolute left-50% top-50% rounded-full transition-background-color,border-color,color", [c(I).indicatorInner, c(_)]])
|
|
2810
2999
|
}, null, 2)
|
|
2811
|
-
], 6)) :
|
|
2812
|
-
|
|
2813
|
-
class: y(["pointer-events-none h-full rounded-full", [c(
|
|
2814
|
-
style:
|
|
3000
|
+
], 6)) : T("", !0),
|
|
3001
|
+
w("div", {
|
|
3002
|
+
class: y(["pointer-events-none h-full rounded-full", [c(I).progress, c(q).progress, c(f)]]),
|
|
3003
|
+
style: A({
|
|
2815
3004
|
width: `${c(u) / (c(l) - 1) * 100}%`
|
|
2816
3005
|
})
|
|
2817
3006
|
}, null, 6)
|
|
2818
3007
|
], 6)
|
|
2819
3008
|
], 2)
|
|
2820
3009
|
], 34),
|
|
2821
|
-
|
|
3010
|
+
w("div", {
|
|
2822
3011
|
class: "relative mx-1 h-1em text-xs text-surface-onlow",
|
|
2823
|
-
style:
|
|
3012
|
+
style: A({
|
|
2824
3013
|
width: `${t.width}rem`
|
|
2825
3014
|
})
|
|
2826
3015
|
}, [
|
|
2827
|
-
(m(!0), b(
|
|
2828
|
-
key:
|
|
2829
|
-
style:
|
|
3016
|
+
(m(!0), b(ee, null, be(c(s), (B, H) => (m(), b("div", {
|
|
3017
|
+
key: H,
|
|
3018
|
+
style: A({
|
|
2830
3019
|
left: `${d(B) / (c(l) - 1) * 100}%`
|
|
2831
3020
|
}),
|
|
2832
|
-
class: y(["absolute w-auto flex rounded-full -translate-x-50%", c(
|
|
2833
|
-
},
|
|
3021
|
+
class: y(["absolute w-auto flex rounded-full -translate-x-50%", c(I).tick])
|
|
3022
|
+
}, se(B), 7))), 128))
|
|
2834
3023
|
], 4)
|
|
2835
3024
|
]));
|
|
2836
3025
|
}
|
|
2837
|
-
}), kn = ["id"], Sn = ["for"], Mn = ["for"], $n = /* @__PURE__ */ x({
|
|
2838
|
-
inheritAttrs: !1,
|
|
2839
|
-
__name: "Switch",
|
|
2840
|
-
props: /* @__PURE__ */ Y({
|
|
2841
|
-
size: { default: "md" },
|
|
2842
|
-
animate: { type: Boolean, default: !0 },
|
|
2843
|
-
options: {},
|
|
2844
|
-
label: {},
|
|
2845
|
-
id: {},
|
|
2846
|
-
rounded: { default: "full" },
|
|
2847
|
-
color: { default: "primary" },
|
|
2848
|
-
disabled: { type: Boolean },
|
|
2849
|
-
offIcon: {},
|
|
2850
|
-
onIcon: {}
|
|
2851
|
-
}, {
|
|
2852
|
-
modelValue: { type: Boolean },
|
|
2853
|
-
modelModifiers: {}
|
|
2854
|
-
}),
|
|
2855
|
-
emits: ["update:modelValue"],
|
|
2856
|
-
setup(e) {
|
|
2857
|
-
const t = e, r = K(e, "modelValue"), n = g(null), a = g(!1), o = v(() => {
|
|
2858
|
-
switch (t.size) {
|
|
2859
|
-
case "sm":
|
|
2860
|
-
return {
|
|
2861
|
-
icon: "text-xs mx-0.5",
|
|
2862
|
-
wrapper: "h-4 w-8",
|
|
2863
|
-
indicator: a.value ? "h-3 w-4" : "h-3 w-3",
|
|
2864
|
-
inactive: "left-[calc(0.125rem-1px)]",
|
|
2865
|
-
active: a.value ? "left-[calc(0.875rem-1px)]" : "left-[calc(1.125rem-1px)]"
|
|
2866
|
-
};
|
|
2867
|
-
case "md":
|
|
2868
|
-
return {
|
|
2869
|
-
icon: "text-sm mx-1",
|
|
2870
|
-
wrapper: "h-6 w-12",
|
|
2871
|
-
indicator: a.value ? "h-4 w-5" : "h-4 w-4",
|
|
2872
|
-
inactive: "left-[calc(0.25rem-1px)]",
|
|
2873
|
-
active: a.value ? "left-[calc(1.5rem-1px)]" : "left-[calc(1.75rem-1px)]"
|
|
2874
|
-
};
|
|
2875
|
-
case "lg":
|
|
2876
|
-
return {
|
|
2877
|
-
icon: "text-lg mx-2",
|
|
2878
|
-
wrapper: "h-8 w-16",
|
|
2879
|
-
indicator: a.value ? "h-6 w-8" : "h-6 w-6",
|
|
2880
|
-
inactive: "left-[calc(0.25rem-1px)]",
|
|
2881
|
-
active: a.value ? "left-[calc(1.75rem-1px)]" : "left-[calc(2.25rem-1px)]"
|
|
2882
|
-
};
|
|
2883
|
-
}
|
|
2884
|
-
}), s = v(() => t.animate ? {
|
|
2885
|
-
indicator: "transition-all",
|
|
2886
|
-
progress: "transition-width"
|
|
2887
|
-
} : {
|
|
2888
|
-
indicator: "",
|
|
2889
|
-
progress: ""
|
|
2890
|
-
}), i = st(t), l = v(() => {
|
|
2891
|
-
let d = "bg-primary-container";
|
|
2892
|
-
switch (t.color) {
|
|
2893
|
-
case "secondary":
|
|
2894
|
-
d = "bg-secondary-7";
|
|
2895
|
-
break;
|
|
2896
|
-
case "tertiary":
|
|
2897
|
-
d = "bg-tertiary-7";
|
|
2898
|
-
break;
|
|
2899
|
-
case "error":
|
|
2900
|
-
d = "bg-error-7";
|
|
2901
|
-
break;
|
|
2902
|
-
}
|
|
2903
|
-
return {
|
|
2904
|
-
wrapper: r.value ? `border border-transparent ${d}` : "bg-surface-lowest border border-surface-border-low",
|
|
2905
|
-
indicator: t.disabled ? "bg-surface-high" : "bg-white text-primary-container"
|
|
2906
|
-
};
|
|
2907
|
-
}), u = te(t);
|
|
2908
|
-
return (d, f) => (m(), b("div", {
|
|
2909
|
-
role: "switch",
|
|
2910
|
-
class: y(["relative flex items-center gap-2", {
|
|
2911
|
-
"pointer-events-none filter-grayscale op60": t.disabled
|
|
2912
|
-
}])
|
|
2913
|
-
}, [
|
|
2914
|
-
Ie(_("input", we({
|
|
2915
|
-
id: c(i),
|
|
2916
|
-
"onUpdate:modelValue": f[0] || (f[0] = (h) => r.value = h)
|
|
2917
|
-
}, d.$attrs, {
|
|
2918
|
-
class: "hidden",
|
|
2919
|
-
type: "checkbox"
|
|
2920
|
-
}), null, 16, kn), [
|
|
2921
|
-
[Tt, r.value]
|
|
2922
|
-
]),
|
|
2923
|
-
_("label", {
|
|
2924
|
-
class: "leading-0 cursor-pointer!",
|
|
2925
|
-
for: c(i)
|
|
2926
|
-
}, [
|
|
2927
|
-
_("div", {
|
|
2928
|
-
ref_key: "wrapper",
|
|
2929
|
-
ref: n,
|
|
2930
|
-
class: y([[c(o).wrapper, c(l).wrapper, c(u).class], "relative inline-block transition-all"]),
|
|
2931
|
-
style: R([c(u).style]),
|
|
2932
|
-
onPointerdown: f[1] || (f[1] = (h) => a.value = !0),
|
|
2933
|
-
onPointerup: f[2] || (f[2] = (h) => a.value = !1),
|
|
2934
|
-
onPointerleave: f[3] || (f[3] = (h) => a.value = !1),
|
|
2935
|
-
onPointerenter: f[4] || (f[4] = (h) => h.buttons === 1 && (a.value = !0))
|
|
2936
|
-
}, [
|
|
2937
|
-
_("div", {
|
|
2938
|
-
class: y(["absolute top-50% -translate-y-50%", [c(o).indicator, c(l).indicator, c(s).indicator, r.value ? c(o).active : c(o).inactive, c(u).class]]),
|
|
2939
|
-
style: R([c(u).style])
|
|
2940
|
-
}, null, 6),
|
|
2941
|
-
_("i", {
|
|
2942
|
-
class: y(["absolute top-1/2 -translate-y-50%", [c(o).icon, {
|
|
2943
|
-
[`left-0 text-${d.color}-on`]: r.value,
|
|
2944
|
-
"right-0 text-surface-on ": !r.value,
|
|
2945
|
-
[d.onIcon ?? ""]: r.value && d.onIcon,
|
|
2946
|
-
[d.offIcon ?? ""]: !r.value && d.offIcon
|
|
2947
|
-
}]])
|
|
2948
|
-
}, null, 2)
|
|
2949
|
-
], 38)
|
|
2950
|
-
], 8, Sn),
|
|
2951
|
-
d.label ? (m(), b("label", {
|
|
2952
|
-
key: 0,
|
|
2953
|
-
for: c(i)
|
|
2954
|
-
}, ae(d.label), 9, Mn)) : A("", !0)
|
|
2955
|
-
], 2));
|
|
2956
|
-
}
|
|
2957
|
-
}), Kn = /* @__PURE__ */ x({
|
|
2958
|
-
__name: "ThemeSwitch",
|
|
2959
|
-
setup(e) {
|
|
2960
|
-
const t = g(void 0);
|
|
2961
|
-
return G(() => {
|
|
2962
|
-
se && (t.value === !0 ? (document.documentElement.setAttribute("data-scheme", "dark"), localStorage.setItem("scheme", "dark")) : t.value === !1 && (document.documentElement.setAttribute("data-scheme", "light"), localStorage.setItem("scheme", "light")));
|
|
2963
|
-
}), ee(() => {
|
|
2964
|
-
if (se) {
|
|
2965
|
-
const r = localStorage.getItem("scheme");
|
|
2966
|
-
r === "dark" ? t.value = !0 : r === "light" ? t.value = !1 : t.value = window.matchMedia("(prefers-color-scheme: dark)").matches;
|
|
2967
|
-
}
|
|
2968
|
-
}), (r, n) => {
|
|
2969
|
-
const a = $n;
|
|
2970
|
-
return m(), O(a, {
|
|
2971
|
-
modelValue: c(t),
|
|
2972
|
-
"onUpdate:modelValue": n[0] || (n[0] = (o) => Rt(t) ? t.value = o : null),
|
|
2973
|
-
color: "secondary",
|
|
2974
|
-
"on-icon": "i-tabler-moon",
|
|
2975
|
-
"off-icon": "i-tabler-sun"
|
|
2976
|
-
}, null, 8, ["modelValue"]);
|
|
2977
|
-
};
|
|
2978
|
-
}
|
|
2979
3026
|
});
|
|
2980
3027
|
export {
|
|
2981
|
-
|
|
3028
|
+
Rn as AspectRatio,
|
|
2982
3029
|
zt as Avatar,
|
|
2983
|
-
|
|
2984
|
-
|
|
2985
|
-
|
|
2986
|
-
|
|
2987
|
-
|
|
2988
|
-
|
|
2989
|
-
|
|
2990
|
-
|
|
3030
|
+
nt as Btn,
|
|
3031
|
+
zn as ChatContainer,
|
|
3032
|
+
Bn as ChatMessage,
|
|
3033
|
+
En as ChatSystem,
|
|
3034
|
+
On as Chip,
|
|
3035
|
+
Pn as ColorInput,
|
|
3036
|
+
It as ColorSwatch,
|
|
3037
|
+
Hn as Drawer,
|
|
2991
3038
|
In as Dropzone,
|
|
2992
|
-
|
|
2993
|
-
|
|
2994
|
-
|
|
2995
|
-
|
|
3039
|
+
lt as FullscreenOverlay,
|
|
3040
|
+
Vn as Image,
|
|
3041
|
+
Dn as Indicator,
|
|
3042
|
+
Fn as Modal,
|
|
2996
3043
|
Wr as Notification,
|
|
2997
|
-
|
|
2998
|
-
|
|
2999
|
-
|
|
3000
|
-
|
|
3001
|
-
|
|
3002
|
-
|
|
3003
|
-
|
|
3004
|
-
|
|
3005
|
-
|
|
3006
|
-
|
|
3044
|
+
Wn as NotificationSystem,
|
|
3045
|
+
Xn as Notifications,
|
|
3046
|
+
Ln as Overlay,
|
|
3047
|
+
jn as Paper,
|
|
3048
|
+
Un as PinInput,
|
|
3049
|
+
Gn as Progress,
|
|
3050
|
+
Zn as RokuProvider,
|
|
3051
|
+
Kn as SchemeSwitch,
|
|
3052
|
+
Qn as Select,
|
|
3053
|
+
Jn as Slider,
|
|
3054
|
+
bn as Switch,
|
|
3007
3055
|
ln as TextField,
|
|
3008
3056
|
hr as ThemeProvider,
|
|
3009
|
-
Kn as ThemeSwitch,
|
|
3010
3057
|
Oe as darkTheme,
|
|
3011
|
-
|
|
3058
|
+
Yn as generateColors,
|
|
3012
3059
|
pn as generateColorsMap,
|
|
3013
3060
|
un as lightTheme,
|
|
3014
|
-
|
|
3015
|
-
|
|
3061
|
+
qn as notificationsSymbol,
|
|
3062
|
+
mt as themeColors,
|
|
3016
3063
|
ur as useCurrentTheme,
|
|
3017
|
-
|
|
3018
|
-
|
|
3064
|
+
Nn as useCurrentThemeScheme,
|
|
3065
|
+
it as useId,
|
|
3019
3066
|
dn as useNotifications,
|
|
3020
3067
|
cr as useRootTheme,
|
|
3021
|
-
|
|
3068
|
+
st as useThemeStyles
|
|
3022
3069
|
};
|