@roku-ui/vue 0.7.1 → 0.7.3
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 +79 -0
- package/dist/index.js +643 -631
- package/dist/index.umd.cjs +1 -1
- package/dist/style.css +1 -1
- package/package.json +13 -12
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { defineComponent as x, openBlock as h, createElementBlock as b, normalizeStyle as
|
|
2
|
-
const
|
|
1
|
+
import { defineComponent as x, openBlock as h, createElementBlock as b, normalizeStyle as T, renderSlot as S, computed as v, ref as g, onMounted as ee, Fragment as K, createBlock as P, resolveDynamicComponent as ue, mergeProps as de, unref as u, createCommentVNode as A, getCurrentScope as kt, onScopeDispose as St, nextTick as tt, getCurrentInstance as rt, watch as fe, shallowRef as Mt, readonly as $t, watchEffect as X, withCtx as L, normalizeClass as y, createElementVNode as w, mergeModels as W, useModel as j, inject as ge, provide as ye, useAttrs as nt, withDirectives as Te, vModelText as Ct, createVNode as Z, Teleport as At, Transition as ot, useSlots as at, toDisplayString as re, renderList as we, vModelDynamic as Tt, withModifiers as st, withKeys as zt, reactive as Et, vModelCheckbox as Rt, isRef as Bt, createTextVNode as Ot } from "vue";
|
|
2
|
+
const Dn = /* @__PURE__ */ x({
|
|
3
3
|
__name: "AspectRatio",
|
|
4
4
|
props: {
|
|
5
5
|
ratio: { default: 1 },
|
|
@@ -10,7 +10,7 @@ const In = /* @__PURE__ */ x({
|
|
|
10
10
|
},
|
|
11
11
|
setup(e) {
|
|
12
12
|
return (t, r) => (h(), b("div", {
|
|
13
|
-
style:
|
|
13
|
+
style: T({
|
|
14
14
|
"--ar-ratio": t.ratio,
|
|
15
15
|
width: t.width,
|
|
16
16
|
"max-width": t.maxWidth,
|
|
@@ -19,7 +19,7 @@ const In = /* @__PURE__ */ x({
|
|
|
19
19
|
}),
|
|
20
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
21
|
}, [
|
|
22
|
-
|
|
22
|
+
S(t.$slots, "default")
|
|
23
23
|
], 4));
|
|
24
24
|
}
|
|
25
25
|
}), Ht = /* @__PURE__ */ x({
|
|
@@ -32,7 +32,7 @@ const In = /* @__PURE__ */ x({
|
|
|
32
32
|
class: {}
|
|
33
33
|
},
|
|
34
34
|
setup(e) {
|
|
35
|
-
const t = e, r =
|
|
35
|
+
const t = e, r = v(() => {
|
|
36
36
|
switch (t.size) {
|
|
37
37
|
case "sm":
|
|
38
38
|
return "--size: 1.5rem;";
|
|
@@ -51,25 +51,25 @@ const In = /* @__PURE__ */ x({
|
|
|
51
51
|
var s;
|
|
52
52
|
(s = a.value) != null && s.complete && o();
|
|
53
53
|
}), (s, i) => (h(), b(K, null, [
|
|
54
|
-
s.src ? (h(), P(ue(s.is),
|
|
54
|
+
s.src ? (h(), P(ue(s.is), de({
|
|
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: !
|
|
62
|
-
}, s.$attrs, { onLoad: o }), null, 16, ["style", "src", "class"])) :
|
|
63
|
-
|
|
61
|
+
class: ["h-[var(--size)] w-[var(--size)] rounded-full object-cover", [{ hidden: !u(n) }, t.class]]
|
|
62
|
+
}, s.$attrs, { onLoad: o }), null, 16, ["style", "src", "class"])) : A("", !0),
|
|
63
|
+
u(n) ? A("", !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:
|
|
66
|
+
style: T([s.style, u(r)])
|
|
67
67
|
}, null, 4))
|
|
68
68
|
], 64));
|
|
69
69
|
}
|
|
70
70
|
});
|
|
71
|
-
function
|
|
72
|
-
return
|
|
71
|
+
function U(e) {
|
|
72
|
+
return v(
|
|
73
73
|
() => ({ style: Nt(e.rounded), class: "rounded-[var(--r-rounded)]" })
|
|
74
74
|
);
|
|
75
75
|
}
|
|
@@ -91,7 +91,7 @@ function Nt(e) {
|
|
|
91
91
|
}
|
|
92
92
|
}
|
|
93
93
|
function ke(e) {
|
|
94
|
-
return
|
|
94
|
+
return kt() ? (St(e), !0) : !1;
|
|
95
95
|
}
|
|
96
96
|
function Pt() {
|
|
97
97
|
const e = /* @__PURE__ */ new Set(), t = (a) => {
|
|
@@ -110,46 +110,46 @@ 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;
|
|
117
117
|
const It = (e) => e != null, Vt = Object.prototype.toString, Dt = (e) => Vt.call(e) === "[object Object]", Ft = () => {
|
|
118
118
|
}, Lt = (e, t) => Object.prototype.hasOwnProperty.call(e, t);
|
|
119
119
|
function Wt(e) {
|
|
120
|
-
return e ||
|
|
120
|
+
return e || rt();
|
|
121
121
|
}
|
|
122
122
|
function jt(e, t = !0, r) {
|
|
123
|
-
Wt() ? ee(e, r) : t ? e() :
|
|
123
|
+
Wt() ? ee(e, r) : t ? e() : tt(e);
|
|
124
124
|
}
|
|
125
|
-
function
|
|
125
|
+
function ne(e) {
|
|
126
126
|
var t;
|
|
127
127
|
const r = ze(e);
|
|
128
128
|
return (t = r == null ? void 0 : r.$el) != null ? t : r;
|
|
129
129
|
}
|
|
130
|
-
const
|
|
130
|
+
const he = Q ? window : void 0, Ut = Q ? window.document : void 0;
|
|
131
131
|
function N(...e) {
|
|
132
132
|
let t, r, n, a;
|
|
133
|
-
if (typeof e[0] == "string" || Array.isArray(e[0]) ? ([r, n, a] = e, t =
|
|
133
|
+
if (typeof e[0] == "string" || Array.isArray(e[0]) ? ([r, n, a] = e, t = he) : [t, r, n, a] = e, !t)
|
|
134
134
|
return Ft;
|
|
135
135
|
Array.isArray(r) || (r = [r]), Array.isArray(n) || (n = [n]);
|
|
136
136
|
const o = [], s = () => {
|
|
137
137
|
o.forEach((d) => d()), o.length = 0;
|
|
138
|
-
}, i = (d, f,
|
|
139
|
-
() => [
|
|
138
|
+
}, i = (d, f, m, k) => (d.addEventListener(f, m, k), () => d.removeEventListener(f, m, k)), l = fe(
|
|
139
|
+
() => [ne(t), ze(a)],
|
|
140
140
|
([d, f]) => {
|
|
141
141
|
if (s(), !d)
|
|
142
142
|
return;
|
|
143
|
-
const
|
|
143
|
+
const m = Dt(f) ? { ...f } : f;
|
|
144
144
|
o.push(
|
|
145
|
-
...r.flatMap((
|
|
145
|
+
...r.flatMap((k) => n.map(($) => i(d, k, $, m)))
|
|
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;
|
|
@@ -158,7 +158,7 @@ function te(...e) {
|
|
|
158
158
|
let t, r, n = {};
|
|
159
159
|
e.length === 3 ? (t = e[0], r = e[1], n = e[2]) : e.length === 2 ? typeof e[1] == "object" ? (t = !0, r = e[0], n = e[1]) : (t = e[0], r = e[1]) : (t = !0, r = e[0]);
|
|
160
160
|
const {
|
|
161
|
-
target: a =
|
|
161
|
+
target: a = he,
|
|
162
162
|
eventName: o = "keydown",
|
|
163
163
|
passive: s = !1,
|
|
164
164
|
dedupe: i = !1
|
|
@@ -169,22 +169,22 @@ function te(...e) {
|
|
|
169
169
|
}
|
|
170
170
|
function qt() {
|
|
171
171
|
const e = g(!1);
|
|
172
|
-
return
|
|
172
|
+
return rt() && ee(() => {
|
|
173
173
|
e.value = !0;
|
|
174
174
|
}), e;
|
|
175
175
|
}
|
|
176
176
|
function De(e) {
|
|
177
177
|
const t = qt();
|
|
178
|
-
return
|
|
178
|
+
return v(() => (t.value, !!e()));
|
|
179
179
|
}
|
|
180
|
-
function
|
|
181
|
-
const { window: r =
|
|
180
|
+
function Ge(e, t = {}) {
|
|
181
|
+
const { window: r = he } = 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(() => {
|
|
@@ -192,52 +192,52 @@ function Ue(e, t = {}) {
|
|
|
192
192
|
}), o;
|
|
193
193
|
}
|
|
194
194
|
function Xt(e, t, r = {}) {
|
|
195
|
-
const { window: n =
|
|
195
|
+
const { window: n = he, ...a } = r;
|
|
196
196
|
let o;
|
|
197
197
|
const s = De(() => n && "MutationObserver" in n), i = () => {
|
|
198
198
|
o && (o.disconnect(), o = void 0);
|
|
199
|
-
}, l =
|
|
200
|
-
() =>
|
|
199
|
+
}, l = fe(
|
|
200
|
+
() => ne(e),
|
|
201
201
|
(f) => {
|
|
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 = {}) {
|
|
215
|
-
const r = g(!1), n =
|
|
215
|
+
const r = g(!1), n = Mt(null);
|
|
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((m) => m.kind === "file" ? m.type : null).filter(It);
|
|
226
226
|
if (s.dataTypes && l.dataTransfer) {
|
|
227
|
-
const
|
|
228
|
-
if (o = typeof
|
|
227
|
+
const m = u(s.dataTypes);
|
|
228
|
+
if (o = typeof m == "function" ? m(f) : m ? m.some((k) => f.includes(k)) : !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 {
|
|
@@ -246,22 +246,22 @@ function Yt(e, t = {}) {
|
|
|
246
246
|
};
|
|
247
247
|
}
|
|
248
248
|
function Zt(e, t, r = {}) {
|
|
249
|
-
const { window: n =
|
|
249
|
+
const { window: n = he, ...a } = 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 =
|
|
253
|
+
}, l = v(() => Array.isArray(e) ? e.map((f) => ne(f)) : [ne(e)]), c = fe(
|
|
254
254
|
l,
|
|
255
255
|
(f) => {
|
|
256
256
|
if (i(), s.value && n) {
|
|
257
257
|
o = new ResizeObserver(t);
|
|
258
|
-
for (const
|
|
259
|
-
|
|
258
|
+
for (const m of f)
|
|
259
|
+
m && o.observe(m, a);
|
|
260
260
|
}
|
|
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,42 +274,42 @@ 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),
|
|
278
|
-
function
|
|
279
|
-
const z =
|
|
277
|
+
} = t, s = g(0), i = g(0), l = g(0), c = g(0), d = g(0), f = g(0), m = g(0), k = g(0);
|
|
278
|
+
function $() {
|
|
279
|
+
const z = ne(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, m.value = 0, k.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, m.value = E.x, k.value = E.y;
|
|
286
286
|
}
|
|
287
|
-
return Zt(e,
|
|
287
|
+
return Zt(e, $), fe(() => ne(e), (z) => !z && $()), Xt(e, $, {
|
|
288
288
|
attributeFilter: ["style", "class"]
|
|
289
|
-
}), a && N("scroll",
|
|
290
|
-
o &&
|
|
289
|
+
}), a && N("scroll", $, { capture: !0, passive: !0 }), n && N("resize", $, { passive: !0 }), jt(() => {
|
|
290
|
+
o && $();
|
|
291
291
|
}), {
|
|
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
|
-
x:
|
|
299
|
-
y:
|
|
300
|
-
update:
|
|
298
|
+
x: m,
|
|
299
|
+
y: k,
|
|
300
|
+
update: $
|
|
301
301
|
};
|
|
302
302
|
}
|
|
303
303
|
function Qt(e, t = {}) {
|
|
304
304
|
const {
|
|
305
305
|
delayEnter: r = 0,
|
|
306
306
|
delayLeave: n = 0,
|
|
307
|
-
window: a =
|
|
307
|
+
window: a = he
|
|
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,42 +325,42 @@ 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
|
-
files:
|
|
344
|
+
files: $t(r),
|
|
345
345
|
open: i,
|
|
346
346
|
reset: s,
|
|
347
347
|
onChange: n
|
|
348
348
|
};
|
|
349
349
|
}
|
|
350
350
|
function tr(e, t = {}) {
|
|
351
|
-
const { initialValue: r = !1, focusVisible: n = !1 } = t, a = g(!1), o =
|
|
351
|
+
const { initialValue: r = !1, focusVisible: n = !1 } = t, a = g(!1), o = v(() => ne(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
|
-
const s =
|
|
356
|
+
const s = v({
|
|
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
|
-
return
|
|
363
|
+
return fe(
|
|
364
364
|
o,
|
|
365
365
|
() => {
|
|
366
366
|
s.value = r;
|
|
@@ -369,10 +369,10 @@ function tr(e, t = {}) {
|
|
|
369
369
|
), { focused: s };
|
|
370
370
|
}
|
|
371
371
|
function rr(e) {
|
|
372
|
-
const t =
|
|
373
|
-
return
|
|
372
|
+
const t = Ge("(prefers-color-scheme: light)", e), r = Ge("(prefers-color-scheme: dark)", e);
|
|
373
|
+
return v(() => r.value ? "dark" : t.value ? "light" : "no-preference");
|
|
374
374
|
}
|
|
375
|
-
const
|
|
375
|
+
const lt = /* @__PURE__ */ x({
|
|
376
376
|
__name: "Btn",
|
|
377
377
|
props: {
|
|
378
378
|
type: { default: "button" },
|
|
@@ -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 = v(() => {
|
|
392
392
|
switch (t.size) {
|
|
393
393
|
case "sm":
|
|
394
394
|
return {
|
|
@@ -406,7 +406,7 @@ const at = /* @__PURE__ */ x({
|
|
|
406
406
|
iconContent: "h-10 w-10 p-3"
|
|
407
407
|
};
|
|
408
408
|
}
|
|
409
|
-
}), a = g(null), o = Qt(a), s =
|
|
409
|
+
}), a = g(null), o = Qt(a), s = v(() => t.hoverVariant && o.value ? t.hoverVariant : t.variant), i = v(() => {
|
|
410
410
|
switch (s.value) {
|
|
411
411
|
case "filled":
|
|
412
412
|
switch (t.color) {
|
|
@@ -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), de({
|
|
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,14 +496,14 @@ 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:
|
|
504
|
-
l.$slots.leftSection ?
|
|
505
|
-
|
|
506
|
-
l.$slots.rightSection ?
|
|
503
|
+
default: L(() => [
|
|
504
|
+
l.$slots.leftSection ? S(l.$slots, "leftSection", { key: 0 }) : A("", !0),
|
|
505
|
+
S(l.$slots, "default"),
|
|
506
|
+
l.$slots.rightSection ? S(l.$slots, "rightSection", { key: 1 }) : A("", !0)
|
|
507
507
|
]),
|
|
508
508
|
_: 3
|
|
509
509
|
}, 16, ["data-size", "type", "style", "class", "disabled"]));
|
|
@@ -516,10 +516,10 @@ const at = /* @__PURE__ */ x({
|
|
|
516
516
|
}, or = {}, ar = { class: "flex flex-col gap-4 container" };
|
|
517
517
|
function sr(e, t) {
|
|
518
518
|
return h(), b("div", ar, [
|
|
519
|
-
|
|
519
|
+
S(e.$slots, "default")
|
|
520
520
|
]);
|
|
521
521
|
}
|
|
522
|
-
const
|
|
522
|
+
const Fn = /* @__PURE__ */ nr(or, [["render", sr]]), Ln = /* @__PURE__ */ x({
|
|
523
523
|
__name: "ChatMessage",
|
|
524
524
|
props: {
|
|
525
525
|
avatar: {},
|
|
@@ -529,7 +529,7 @@ const Vn = /* @__PURE__ */ nr(or, [["render", sr]]), Dn = /* @__PURE__ */ x({
|
|
|
529
529
|
withBorder: { type: Boolean, default: !1 }
|
|
530
530
|
},
|
|
531
531
|
setup(e) {
|
|
532
|
-
const t = e, r =
|
|
532
|
+
const t = e, r = v(() => {
|
|
533
533
|
switch (t.variant) {
|
|
534
534
|
case "default":
|
|
535
535
|
return "bg-surface-base";
|
|
@@ -558,10 +558,10 @@ const Vn = /* @__PURE__ */ nr(or, [["render", sr]]), Dn = /* @__PURE__ */ x({
|
|
|
558
558
|
}
|
|
559
559
|
]])
|
|
560
560
|
}, [
|
|
561
|
-
n.$slots.avatar ?
|
|
561
|
+
n.$slots.avatar ? S(n.$slots, "avatar", { key: 0 }) : n.avatar ? (h(), P(o, {
|
|
562
562
|
key: 1,
|
|
563
563
|
src: n.avatar
|
|
564
|
-
}, null, 8, ["src"])) :
|
|
564
|
+
}, null, 8, ["src"])) : A("", !0),
|
|
565
565
|
w("div", {
|
|
566
566
|
class: y(["rounded-xl px-3 py-2 transition-background-color,border-color", [
|
|
567
567
|
{
|
|
@@ -569,15 +569,15 @@ 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
|
+
S(n.$slots, "default")
|
|
576
576
|
], 2)
|
|
577
577
|
], 2);
|
|
578
578
|
};
|
|
579
579
|
}
|
|
580
|
-
}), lr = { class: "w-full flex self-center gap-2 text-center" },
|
|
580
|
+
}), lr = { class: "w-full flex self-center gap-2 text-center" }, Wn = /* @__PURE__ */ x({
|
|
581
581
|
__name: "ChatSystem",
|
|
582
582
|
props: {
|
|
583
583
|
position: {},
|
|
@@ -586,7 +586,7 @@ const Vn = /* @__PURE__ */ nr(or, [["render", sr]]), Dn = /* @__PURE__ */ x({
|
|
|
586
586
|
withBorder: { type: Boolean, default: !1 }
|
|
587
587
|
},
|
|
588
588
|
setup(e) {
|
|
589
|
-
const t = e, r =
|
|
589
|
+
const t = e, r = v(() => {
|
|
590
590
|
switch (t.variant) {
|
|
591
591
|
case "default":
|
|
592
592
|
return "bg-surface-base";
|
|
@@ -608,16 +608,16 @@ 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
|
+
S(n.$slots, "default")
|
|
615
615
|
], 2)
|
|
616
616
|
]));
|
|
617
617
|
}
|
|
618
|
-
}),
|
|
618
|
+
}), jn = /* @__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 = v(() => {
|
|
634
634
|
switch (t.size) {
|
|
635
635
|
case "sm":
|
|
636
636
|
return "px-3 text-sm h-6";
|
|
@@ -639,15 +639,15 @@ const Vn = /* @__PURE__ */ nr(or, [["render", sr]]), Dn = /* @__PURE__ */ x({
|
|
|
639
639
|
case "lg":
|
|
640
640
|
return "px-8 h-10 text-lg";
|
|
641
641
|
}
|
|
642
|
-
}), o =
|
|
643
|
-
return (l,
|
|
644
|
-
class: y(["inline-flex items-center gap-1", [
|
|
645
|
-
style:
|
|
646
|
-
onPointerup:
|
|
642
|
+
}), o = v(() => r.value ? "container-filled-primary border-transparent" : "container-base"), s = v(() => r.value !== void 0), i = v(() => s.value ? "cursor-pointer" : "");
|
|
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: T([u(n).style]),
|
|
646
|
+
onPointerup: c[0] || (c[0] = (d) => u(s) && (r.value = !r.value))
|
|
647
647
|
}, [
|
|
648
|
-
l.$slots.leftSection ?
|
|
649
|
-
|
|
650
|
-
l.$slots.rightSection ?
|
|
648
|
+
l.$slots.leftSection ? S(l.$slots, "leftSection", { key: 0 }) : A("", !0),
|
|
649
|
+
S(l.$slots, "default"),
|
|
650
|
+
l.$slots.rightSection ? S(l.$slots, "rightSection", { key: 1 }) : A("", !0)
|
|
651
651
|
], 38));
|
|
652
652
|
}
|
|
653
653
|
}), ir = /* @__PURE__ */ x({
|
|
@@ -663,7 +663,7 @@ const Vn = /* @__PURE__ */ nr(or, [["render", sr]]), Dn = /* @__PURE__ */ x({
|
|
|
663
663
|
"border border-surface-border-base": t.withBorder,
|
|
664
664
|
"border border-transparent": !t.withBorder
|
|
665
665
|
}]]),
|
|
666
|
-
style:
|
|
666
|
+
style: T({
|
|
667
667
|
backgroundColor: t.color
|
|
668
668
|
})
|
|
669
669
|
}, null, 8, ["class", "style"]));
|
|
@@ -714,10 +714,10 @@ p.prototype = {
|
|
|
714
714
|
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;
|
|
715
715
|
},
|
|
716
716
|
setAlpha: function(t) {
|
|
717
|
-
return this._a =
|
|
717
|
+
return this._a = it(t), this._roundA = Math.round(100 * this._a) / 100, this;
|
|
718
718
|
},
|
|
719
719
|
toHsv: function() {
|
|
720
|
-
var t =
|
|
720
|
+
var t = Xe(this._r, this._g, this._b);
|
|
721
721
|
return {
|
|
722
722
|
h: t.h * 360,
|
|
723
723
|
s: t.s,
|
|
@@ -726,11 +726,11 @@ p.prototype = {
|
|
|
726
726
|
};
|
|
727
727
|
},
|
|
728
728
|
toHsvString: function() {
|
|
729
|
-
var t =
|
|
729
|
+
var t = Xe(this._r, this._g, this._b), r = Math.round(t.h * 360), n = Math.round(t.s * 100), a = Math.round(t.v * 100);
|
|
730
730
|
return this._a == 1 ? "hsv(" + r + ", " + n + "%, " + a + "%)" : "hsva(" + r + ", " + n + "%, " + a + "%, " + this._roundA + ")";
|
|
731
731
|
},
|
|
732
732
|
toHsl: function() {
|
|
733
|
-
var t =
|
|
733
|
+
var t = qe(this._r, this._g, this._b);
|
|
734
734
|
return {
|
|
735
735
|
h: t.h * 360,
|
|
736
736
|
s: t.s,
|
|
@@ -739,11 +739,11 @@ p.prototype = {
|
|
|
739
739
|
};
|
|
740
740
|
},
|
|
741
741
|
toHslString: function() {
|
|
742
|
-
var t =
|
|
742
|
+
var t = qe(this._r, this._g, this._b), r = Math.round(t.h * 360), n = Math.round(t.s * 100), a = Math.round(t.l * 100);
|
|
743
743
|
return this._a == 1 ? "hsl(" + r + ", " + n + "%, " + a + "%)" : "hsla(" + r + ", " + n + "%, " + a + "%, " + this._roundA + ")";
|
|
744
744
|
},
|
|
745
745
|
toHex: function(t) {
|
|
746
|
-
return
|
|
746
|
+
return Ye(this._r, this._g, this._b, t);
|
|
747
747
|
},
|
|
748
748
|
toHexString: function(t) {
|
|
749
749
|
return "#" + this.toHex(t);
|
|
@@ -777,13 +777,13 @@ p.prototype = {
|
|
|
777
777
|
return this._a == 1 ? "rgb(" + Math.round(M(this._r, 255) * 100) + "%, " + Math.round(M(this._g, 255) * 100) + "%, " + Math.round(M(this._b, 255) * 100) + "%)" : "rgba(" + Math.round(M(this._r, 255) * 100) + "%, " + Math.round(M(this._g, 255) * 100) + "%, " + Math.round(M(this._b, 255) * 100) + "%, " + this._roundA + ")";
|
|
778
778
|
},
|
|
779
779
|
toName: function() {
|
|
780
|
-
return this._a === 0 ? "transparent" : this._a < 1 ? !1 : Cr[
|
|
780
|
+
return this._a === 0 ? "transparent" : this._a < 1 ? !1 : Cr[Ye(this._r, this._g, this._b, !0)] || !1;
|
|
781
781
|
},
|
|
782
782
|
toFilter: function(t) {
|
|
783
|
-
var r = "#" +
|
|
783
|
+
var r = "#" + Ze(this._r, this._g, this._b, this._a), n = r, a = this._gradientType ? "GradientType = 1, " : "";
|
|
784
784
|
if (t) {
|
|
785
785
|
var o = p(t);
|
|
786
|
-
n = "#" +
|
|
786
|
+
n = "#" + Ze(o._r, o._g, o._b, o._a);
|
|
787
787
|
}
|
|
788
788
|
return "progid:DXImageTransform.Microsoft.gradient(" + a + "startColorstr=" + r + ",endColorstr=" + n + ")";
|
|
789
789
|
},
|
|
@@ -841,17 +841,17 @@ p.prototype = {
|
|
|
841
841
|
// return this._applyCombination(polyad, [number]);
|
|
842
842
|
// },
|
|
843
843
|
triad: function() {
|
|
844
|
-
return this._applyCombination(
|
|
844
|
+
return this._applyCombination(Ke, [3]);
|
|
845
845
|
},
|
|
846
846
|
tetrad: function() {
|
|
847
|
-
return this._applyCombination(
|
|
847
|
+
return this._applyCombination(Ke, [4]);
|
|
848
848
|
}
|
|
849
849
|
};
|
|
850
850
|
p.fromRatio = function(e, t) {
|
|
851
851
|
if ($e(e) == "object") {
|
|
852
852
|
var r = {};
|
|
853
853
|
for (var n in e)
|
|
854
|
-
e.hasOwnProperty(n) && (n === "a" ? r[n] = e[n] : r[n] =
|
|
854
|
+
e.hasOwnProperty(n) && (n === "a" ? r[n] = e[n] : r[n] = ve(e[n]));
|
|
855
855
|
e = r;
|
|
856
856
|
}
|
|
857
857
|
return p(e, t);
|
|
@@ -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 = ve(e.s), a = ve(e.v), t = pr(e.h, n, a), s = !0, i = "hsv") : G(e.h) && G(e.s) && G(e.l) && (n = ve(e.s), o = ve(e.l), t = hr(e.h, n, o), s = !0, i = "hsl"), e.hasOwnProperty("a") && (r = e.a)), r = it(r), {
|
|
866
866
|
ok: s,
|
|
867
867
|
format: e.format || i,
|
|
868
868
|
r: Math.min(255, Math.max(t.r, 0)),
|
|
@@ -878,7 +878,7 @@ function fr(e, t, r) {
|
|
|
878
878
|
b: M(r, 255) * 255
|
|
879
879
|
};
|
|
880
880
|
}
|
|
881
|
-
function
|
|
881
|
+
function qe(e, t, r) {
|
|
882
882
|
e = M(e, 255), t = M(t, 255), r = M(r, 255);
|
|
883
883
|
var n = Math.max(e, t, r), a = Math.min(e, t, r), o, s, i = (n + a) / 2;
|
|
884
884
|
if (n == a)
|
|
@@ -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;
|
|
@@ -922,7 +922,7 @@ function hr(e, t, r) {
|
|
|
922
922
|
b: o * 255
|
|
923
923
|
};
|
|
924
924
|
}
|
|
925
|
-
function
|
|
925
|
+
function Xe(e, t, r) {
|
|
926
926
|
e = M(e, 255), t = M(t, 255), r = M(r, 255);
|
|
927
927
|
var n = Math.max(e, t, r), a = Math.min(e, t, r), o, s, i = n, l = n - a;
|
|
928
928
|
if (s = n === 0 ? 0 : l / n, n == a)
|
|
@@ -949,23 +949,23 @@ 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
|
};
|
|
958
958
|
}
|
|
959
|
-
function
|
|
959
|
+
function Ye(e, t, r, n) {
|
|
960
960
|
var a = [D(Math.round(e).toString(16)), D(Math.round(t).toString(16)), D(Math.round(r).toString(16))];
|
|
961
961
|
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("");
|
|
962
962
|
}
|
|
963
963
|
function mr(e, t, r, n, a) {
|
|
964
|
-
var o = [D(Math.round(e).toString(16)), D(Math.round(t).toString(16)), D(Math.round(r).toString(16)), D(
|
|
964
|
+
var o = [D(Math.round(e).toString(16)), D(Math.round(t).toString(16)), D(Math.round(r).toString(16)), D(ct(n))];
|
|
965
965
|
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("");
|
|
966
966
|
}
|
|
967
|
-
function
|
|
968
|
-
var a = [D(
|
|
967
|
+
function Ze(e, t, r, n) {
|
|
968
|
+
var a = [D(ct(n)), D(Math.round(e).toString(16)), D(Math.round(t).toString(16)), D(Math.round(r).toString(16))];
|
|
969
969
|
return a.join("");
|
|
970
970
|
}
|
|
971
971
|
p.equals = function(e, t) {
|
|
@@ -1014,7 +1014,7 @@ function kr(e) {
|
|
|
1014
1014
|
var t = p(e).toHsl();
|
|
1015
1015
|
return t.h = (t.h + 180) % 360, p(t);
|
|
1016
1016
|
}
|
|
1017
|
-
function
|
|
1017
|
+
function Ke(e, t) {
|
|
1018
1018
|
if (isNaN(t) || t <= 0)
|
|
1019
1019
|
throw new Error("Argument to polyad must be a positive number");
|
|
1020
1020
|
for (var r = p(e).toHsl(), n = [p(e)], a = 360 / t, o = 1; o < t; o++)
|
|
@@ -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
|
|
@@ -1251,7 +1251,7 @@ function Ar(e) {
|
|
|
1251
1251
|
e.hasOwnProperty(r) && (t[e[r]] = r);
|
|
1252
1252
|
return t;
|
|
1253
1253
|
}
|
|
1254
|
-
function
|
|
1254
|
+
function it(e) {
|
|
1255
1255
|
return e = parseFloat(e), (isNaN(e) || e < 0 || e > 1) && (e = 1), e;
|
|
1256
1256
|
}
|
|
1257
1257
|
function M(e, t) {
|
|
@@ -1274,13 +1274,13 @@ function zr(e) {
|
|
|
1274
1274
|
function D(e) {
|
|
1275
1275
|
return e.length == 1 ? "0" + e : "" + e;
|
|
1276
1276
|
}
|
|
1277
|
-
function
|
|
1277
|
+
function ve(e) {
|
|
1278
1278
|
return e <= 1 && (e = e * 100 + "%"), e;
|
|
1279
1279
|
}
|
|
1280
|
-
function
|
|
1280
|
+
function ct(e) {
|
|
1281
1281
|
return Math.round(parseFloat(e) * 255).toString(16);
|
|
1282
1282
|
}
|
|
1283
|
-
function
|
|
1283
|
+
function Qe(e) {
|
|
1284
1284
|
return H(e) / 255;
|
|
1285
1285
|
}
|
|
1286
1286
|
var V = function() {
|
|
@@ -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) {
|
|
@@ -1347,7 +1347,7 @@ function Er(e) {
|
|
|
1347
1347
|
r: H(r[1]),
|
|
1348
1348
|
g: H(r[2]),
|
|
1349
1349
|
b: H(r[3]),
|
|
1350
|
-
a:
|
|
1350
|
+
a: Qe(r[4]),
|
|
1351
1351
|
format: t ? "name" : "hex8"
|
|
1352
1352
|
} : (r = V.hex6.exec(e)) ? {
|
|
1353
1353
|
r: H(r[1]),
|
|
@@ -1358,7 +1358,7 @@ function Er(e) {
|
|
|
1358
1358
|
r: H(r[1] + "" + r[1]),
|
|
1359
1359
|
g: H(r[2] + "" + r[2]),
|
|
1360
1360
|
b: H(r[3] + "" + r[3]),
|
|
1361
|
-
a:
|
|
1361
|
+
a: Qe(r[4] + "" + r[4]),
|
|
1362
1362
|
format: t ? "name" : "hex8"
|
|
1363
1363
|
} : (r = V.hex3.exec(e)) ? {
|
|
1364
1364
|
r: H(r[1] + "" + r[1]),
|
|
@@ -1390,37 +1390,37 @@ function Br() {
|
|
|
1390
1390
|
attributeFilter: ["data-scheme"]
|
|
1391
1391
|
}), e;
|
|
1392
1392
|
}
|
|
1393
|
-
function
|
|
1394
|
-
return
|
|
1393
|
+
function Un() {
|
|
1394
|
+
return ge("currentThemeScheme", null);
|
|
1395
1395
|
}
|
|
1396
1396
|
function Or() {
|
|
1397
|
-
return
|
|
1397
|
+
return ge("currentTheme", g(Ie));
|
|
1398
1398
|
}
|
|
1399
|
-
function
|
|
1399
|
+
function ut(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
|
+
}), ye("currentTheme", r), ye("currentThemeScheme", n);
|
|
1404
1404
|
const s = {
|
|
1405
|
-
...Object.keys(r.value.colors).map((
|
|
1406
|
-
const d =
|
|
1407
|
-
return r.value.colors[d].reduce((
|
|
1408
|
-
const z = p(
|
|
1409
|
-
return
|
|
1405
|
+
...Object.keys(r.value.colors).map((c) => {
|
|
1406
|
+
const d = c;
|
|
1407
|
+
return r.value.colors[d].reduce((m, k, $) => {
|
|
1408
|
+
const z = p(k).toRgb();
|
|
1409
|
+
return m[`--r-color-${d}-${$}`] = `${z.r} ${z.g} ${z.b}`, m;
|
|
1410
1410
|
}, {});
|
|
1411
|
-
}).reduce((
|
|
1412
|
-
...
|
|
1411
|
+
}).reduce((c, d) => ({
|
|
1412
|
+
...c,
|
|
1413
1413
|
...d
|
|
1414
1414
|
}), {})
|
|
1415
1415
|
}, i = {
|
|
1416
1416
|
"font-family": "'Roboto', sans-serif",
|
|
1417
1417
|
"background-color": "rgb(var(--r-color-surface-lowest))",
|
|
1418
1418
|
color: "rgb(var(--r-color-surface-on))"
|
|
1419
|
-
}, l =
|
|
1419
|
+
}, l = v(() => {
|
|
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",
|
|
@@ -1481,17 +1481,17 @@ function it(e, t = !0) {
|
|
|
1481
1481
|
...l.value
|
|
1482
1482
|
};
|
|
1483
1483
|
}
|
|
1484
|
-
function
|
|
1484
|
+
function Fe(e) {
|
|
1485
1485
|
const t = g("");
|
|
1486
1486
|
return ee(() => {
|
|
1487
1487
|
e.id ? t.value = e.id : t.value = `switch-${Math.random().toString(36).slice(2)}-${Date.now().toString(36)}`;
|
|
1488
1488
|
}), t;
|
|
1489
1489
|
}
|
|
1490
|
-
const
|
|
1490
|
+
const dt = Symbol("scheme");
|
|
1491
1491
|
function Hr() {
|
|
1492
|
-
return
|
|
1492
|
+
return ge(dt, g("dark"));
|
|
1493
1493
|
}
|
|
1494
|
-
const Nr = ["id"], Pr = ["for"],
|
|
1494
|
+
const Nr = ["id"], Pr = ["for"], Gn = /* @__PURE__ */ x({
|
|
1495
1495
|
__name: "ColorInput",
|
|
1496
1496
|
props: {
|
|
1497
1497
|
modelValue: {},
|
|
@@ -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 = nt(), n = Fe(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"
|
|
@@ -1528,18 +1528,18 @@ const Nr = ["id"], Pr = ["for"], jn = /* @__PURE__ */ x({
|
|
|
1528
1528
|
theme: {}
|
|
1529
1529
|
},
|
|
1530
1530
|
setup(e) {
|
|
1531
|
-
const r =
|
|
1531
|
+
const r = ut(e.theme, !1);
|
|
1532
1532
|
return (n, a) => (h(), b("div", {
|
|
1533
|
-
style:
|
|
1533
|
+
style: T([u(r)]),
|
|
1534
1534
|
"data-scheme": n.theme.scheme,
|
|
1535
1535
|
"data-theme": n.theme.name
|
|
1536
1536
|
}, [
|
|
1537
|
-
|
|
1537
|
+
S(n.$slots, "default")
|
|
1538
1538
|
], 12, Ir));
|
|
1539
1539
|
}
|
|
1540
|
-
}),
|
|
1540
|
+
}), ft = /* @__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,11 +1549,11 @@ 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
|
-
const o =
|
|
1556
|
+
const o = v(() => {
|
|
1557
1557
|
switch (t.blur) {
|
|
1558
1558
|
case "sm":
|
|
1559
1559
|
return "backdrop-blur-sm";
|
|
@@ -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
|
-
|
|
1592
|
+
S(c.$slots, "default")
|
|
1590
1593
|
], 2)
|
|
1591
1594
|
]),
|
|
1592
1595
|
_: 3
|
|
@@ -1594,9 +1597,9 @@ const Nr = ["id"], Pr = ["for"], jn = /* @__PURE__ */ x({
|
|
|
1594
1597
|
]);
|
|
1595
1598
|
};
|
|
1596
1599
|
}
|
|
1597
|
-
}), 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" },
|
|
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" }, qn = /* @__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,21 +1609,17 @@ 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
|
-
|
|
1612
|
-
document.querySelector(".modal-wrapper.op100") || (document.body.style.overflow = "", document.body.style.marginRight = "");
|
|
1613
|
-
}, 300);
|
|
1614
|
-
}), (n, a) => {
|
|
1615
|
-
const o = at, s = dt;
|
|
1612
|
+
const t = e, r = j(e, "modelValue");
|
|
1613
|
+
return (n, a) => {
|
|
1614
|
+
const o = lt, s = ft;
|
|
1616
1615
|
return h(), P(s, {
|
|
1617
1616
|
modelValue: r.value,
|
|
1618
1617
|
"onUpdate:modelValue": a[1] || (a[1] = (i) => r.value = i),
|
|
1619
1618
|
blur: t.blur,
|
|
1620
1619
|
persistent: t.persistent
|
|
1621
1620
|
}, {
|
|
1622
|
-
default:
|
|
1623
|
-
Z(
|
|
1621
|
+
default: L(() => [
|
|
1622
|
+
Z(ot, {
|
|
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"),
|
|
1626
1625
|
"leave-from-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,16 +1639,16 @@ 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
|
|
1647
1646
|
})
|
|
1648
1647
|
]),
|
|
1649
1648
|
w("div", Lr, [
|
|
1650
|
-
|
|
1649
|
+
S(n.$slots, "default")
|
|
1651
1650
|
])
|
|
1652
|
-
], 2)) :
|
|
1651
|
+
], 2)) : A("", !0)
|
|
1653
1652
|
]),
|
|
1654
1653
|
_: 3
|
|
1655
1654
|
}, 8, ["enter-from-class", "enter-to-class", "leave-from-class", "leave-to-class"])
|
|
@@ -1658,7 +1657,7 @@ const Nr = ["id"], Pr = ["for"], jn = /* @__PURE__ */ x({
|
|
|
1658
1657
|
}, 8, ["modelValue", "blur", "persistent"]);
|
|
1659
1658
|
};
|
|
1660
1659
|
}
|
|
1661
|
-
}),
|
|
1660
|
+
}), Xn = /* @__PURE__ */ x({
|
|
1662
1661
|
__name: "Dropzone",
|
|
1663
1662
|
props: {
|
|
1664
1663
|
dashed: { type: Boolean, default: !0 },
|
|
@@ -1677,20 +1676,20 @@ 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
|
+
S(l.$slots, "default")
|
|
1691
1690
|
], 34));
|
|
1692
1691
|
}
|
|
1693
|
-
}),
|
|
1692
|
+
}), Yn = /* @__PURE__ */ x({
|
|
1694
1693
|
__name: "Image",
|
|
1695
1694
|
props: {
|
|
1696
1695
|
is: { default: "img" },
|
|
@@ -1712,46 +1711,46 @@ 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
|
-
style:
|
|
1716
|
+
style: T({
|
|
1718
1717
|
height: s.height,
|
|
1719
1718
|
width: s.width,
|
|
1720
1719
|
maxHeight: s.maxHeight,
|
|
1721
1720
|
maxWidth: s.maxWidth
|
|
1722
1721
|
})
|
|
1723
1722
|
}, [
|
|
1724
|
-
s.src ? (h(), P(ue(s.is),
|
|
1723
|
+
s.src ? (h(), P(ue(s.is), de({
|
|
1725
1724
|
key: 0,
|
|
1726
1725
|
ref_key: "img",
|
|
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
|
-
}, s.$attrs, { onLoad: a }), null, 16, ["style", "src", "class"])) :
|
|
1741
|
-
|
|
1739
|
+
}, s.$attrs, { onLoad: a }), null, 16, ["style", "src", "class"])) : A("", !0),
|
|
1740
|
+
u(r) ? A("", !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
|
-
style:
|
|
1746
|
+
style: T([
|
|
1748
1747
|
s.style,
|
|
1749
|
-
|
|
1748
|
+
u(o).style
|
|
1750
1749
|
])
|
|
1751
1750
|
}, null, 6))
|
|
1752
1751
|
], 4));
|
|
1753
1752
|
}
|
|
1754
|
-
}), Wr = { class: "relative" },
|
|
1753
|
+
}), Wr = { class: "relative" }, Zn = /* @__PURE__ */ x({
|
|
1755
1754
|
__name: "Indicator",
|
|
1756
1755
|
props: {
|
|
1757
1756
|
color: { default: "primary" },
|
|
@@ -1760,7 +1759,7 @@ const Nr = ["id"], Pr = ["for"], jn = /* @__PURE__ */ x({
|
|
|
1760
1759
|
ping: { type: Boolean }
|
|
1761
1760
|
},
|
|
1762
1761
|
setup(e) {
|
|
1763
|
-
const t = e, r =
|
|
1762
|
+
const t = e, r = v(() => {
|
|
1764
1763
|
switch (t.size) {
|
|
1765
1764
|
case "sm":
|
|
1766
1765
|
return "w-2 h-2";
|
|
@@ -1771,7 +1770,7 @@ const Nr = ["id"], Pr = ["for"], jn = /* @__PURE__ */ x({
|
|
|
1771
1770
|
default:
|
|
1772
1771
|
return typeof t.size == "number" || !Number.isNaN(Number(t.size)) ? `w-${t.size} h-${t.size}` : t.size;
|
|
1773
1772
|
}
|
|
1774
|
-
}), n =
|
|
1773
|
+
}), n = at(), a = v(() => {
|
|
1775
1774
|
if (!n.label)
|
|
1776
1775
|
return "";
|
|
1777
1776
|
switch (t.size) {
|
|
@@ -1782,7 +1781,7 @@ const Nr = ["id"], Pr = ["for"], jn = /* @__PURE__ */ x({
|
|
|
1782
1781
|
case "lg":
|
|
1783
1782
|
return "text-lg children:px-2.5";
|
|
1784
1783
|
}
|
|
1785
|
-
}), o =
|
|
1784
|
+
}), o = v(() => {
|
|
1786
1785
|
switch (t.position) {
|
|
1787
1786
|
case "top-left":
|
|
1788
1787
|
return "top-0 left-0 -translate-x-1/2 -translate-y-1/2";
|
|
@@ -1793,7 +1792,7 @@ const Nr = ["id"], Pr = ["for"], jn = /* @__PURE__ */ x({
|
|
|
1793
1792
|
case "bottom-right":
|
|
1794
1793
|
return "bottom-0 right-0 translate-x-1/2 translate-y-1/2";
|
|
1795
1794
|
}
|
|
1796
|
-
}), s =
|
|
1795
|
+
}), s = v(() => {
|
|
1797
1796
|
switch (t.color) {
|
|
1798
1797
|
case "primary":
|
|
1799
1798
|
return "bg-primary-container text-primary-on";
|
|
@@ -1807,36 +1806,36 @@ 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
|
-
i.$slots.label ?
|
|
1822
|
-
], 2)) :
|
|
1820
|
+
i.$slots.label ? S(i.$slots, "label", { key: 0 }) : A("", !0)
|
|
1821
|
+
], 2)) : A("", !0),
|
|
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
|
-
i.$slots.label ?
|
|
1830
|
+
i.$slots.label ? S(i.$slots, "label", { key: 0 }) : A("", !0)
|
|
1832
1831
|
], 2)
|
|
1833
1832
|
], 2),
|
|
1834
|
-
|
|
1833
|
+
S(i.$slots, "default")
|
|
1835
1834
|
]));
|
|
1836
1835
|
}
|
|
1837
|
-
}),
|
|
1836
|
+
}), Kn = /* @__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,13 +1844,9 @@ 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
|
-
|
|
1851
|
-
document.querySelector(".modal-wrapper.op100") || (document.body.style.overflow = "", document.body.style.marginRight = "");
|
|
1852
|
-
}, 300);
|
|
1853
|
-
}), (n, a) => {
|
|
1854
|
-
const o = dt;
|
|
1847
|
+
const t = e, r = j(e, "modelValue");
|
|
1848
|
+
return (n, a) => {
|
|
1849
|
+
const o = ft;
|
|
1855
1850
|
return h(), P(o, {
|
|
1856
1851
|
modelValue: r.value,
|
|
1857
1852
|
"onUpdate:modelValue": a[0] || (a[0] = (s) => r.value = s),
|
|
@@ -1859,8 +1854,8 @@ 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:
|
|
1863
|
-
Z(
|
|
1857
|
+
default: L(() => [
|
|
1858
|
+
Z(ot, {
|
|
1864
1859
|
"enter-from-class": "translate-y-1/2",
|
|
1865
1860
|
"enter-to-class": "translate-y-0",
|
|
1866
1861
|
"leave-from-class": "translate-y-0",
|
|
@@ -1868,8 +1863,8 @@ 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:
|
|
1872
|
-
r.value ?
|
|
1866
|
+
default: L(() => [
|
|
1867
|
+
r.value ? S(n.$slots, "default", { key: 0 }) : A("", !0)
|
|
1873
1868
|
]),
|
|
1874
1869
|
_: 3
|
|
1875
1870
|
})
|
|
@@ -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 = v(() => {
|
|
1903
1898
|
switch (t.color) {
|
|
1904
1899
|
case "secondary":
|
|
1905
1900
|
return "bg-secondary-container";
|
|
@@ -1910,7 +1905,7 @@ const Nr = ["id"], Pr = ["for"], jn = /* @__PURE__ */ x({
|
|
|
1910
1905
|
default:
|
|
1911
1906
|
return "bg-primary-container";
|
|
1912
1907
|
}
|
|
1913
|
-
}), a =
|
|
1908
|
+
}), a = v(() => {
|
|
1914
1909
|
switch (t.color) {
|
|
1915
1910
|
case "secondary":
|
|
1916
1911
|
return "text-secondary-container";
|
|
@@ -1923,21 +1918,21 @@ const Nr = ["id"], Pr = ["for"], jn = /* @__PURE__ */ x({
|
|
|
1923
1918
|
}
|
|
1924
1919
|
});
|
|
1925
1920
|
return (o, s) => {
|
|
1926
|
-
const i =
|
|
1921
|
+
const i = lt;
|
|
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:
|
|
1931
|
+
style: T(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,15 +1942,15 @@ 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([
|
|
1957
|
-
},
|
|
1958
|
-
o.$slots.message ?
|
|
1951
|
+
class: y([u(a), "text-base"])
|
|
1952
|
+
}, re(o.title), 3)) : A("", !0),
|
|
1953
|
+
o.$slots.message ? S(o.$slots, "message", { key: 1 }) : o.message ? (h(), b("div", qr, re(o.message), 1)) : A("", !0)
|
|
1959
1954
|
]),
|
|
1960
1955
|
o.closeable ? (h(), P(i, {
|
|
1961
1956
|
key: 2,
|
|
@@ -1964,22 +1959,22 @@ 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
|
|
1971
|
-
})) :
|
|
1966
|
+
})) : A("", !0)
|
|
1972
1967
|
], 6);
|
|
1973
1968
|
};
|
|
1974
1969
|
}
|
|
1975
|
-
}),
|
|
1976
|
-
let J,
|
|
1977
|
-
const
|
|
1970
|
+
}), ht = /* @__PURE__ */ new Set(), O = /* @__PURE__ */ new WeakMap(), le = /* @__PURE__ */ new WeakMap(), oe = /* @__PURE__ */ new WeakMap(), Ne = /* @__PURE__ */ new WeakMap(), Zr = /* @__PURE__ */ new WeakMap(), ie = /* @__PURE__ */ new WeakMap(), Ce = /* @__PURE__ */ new WeakMap(), be = /* @__PURE__ */ new WeakSet();
|
|
1971
|
+
let J, Le = 0, We = 0;
|
|
1972
|
+
const q = "__aa_tgt", _e = "__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) => {
|
|
1981
1976
|
e.forEach((t) => {
|
|
1982
|
-
t.target === J && en(), O.has(t.target) &&
|
|
1977
|
+
t.target === J && en(), O.has(t.target) && ae(t.target);
|
|
1983
1978
|
});
|
|
1984
1979
|
};
|
|
1985
1980
|
function Jr(e) {
|
|
@@ -1993,20 +1988,20 @@ 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(" "),
|
|
1997
|
-
++n > 1 &&
|
|
1991
|
+
].map((d) => `${-1 * Math.floor(d)}px`).join(" "), c = new IntersectionObserver(() => {
|
|
1992
|
+
++n > 1 && ae(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
|
-
function
|
|
2000
|
+
function ae(e) {
|
|
2006
2001
|
clearTimeout(Ce.get(e));
|
|
2007
|
-
const t = Re(e), r =
|
|
2002
|
+
const t = Re(e), r = xe(t) ? 500 : t.duration;
|
|
2008
2003
|
Ce.set(e, setTimeout(async () => {
|
|
2009
|
-
const n =
|
|
2004
|
+
const n = oe.get(e);
|
|
2010
2005
|
try {
|
|
2011
2006
|
await (n == null ? void 0 : n.finished), O.set(e, ce(e)), Jr(e);
|
|
2012
2007
|
} catch {
|
|
@@ -2015,21 +2010,21 @@ function oe(e) {
|
|
|
2015
2010
|
}
|
|
2016
2011
|
function en() {
|
|
2017
2012
|
clearTimeout(Ce.get(J)), Ce.set(J, setTimeout(() => {
|
|
2018
|
-
|
|
2013
|
+
ht.forEach((e) => bt(e, (t) => pt(() => ae(t))));
|
|
2019
2014
|
}, 100));
|
|
2020
2015
|
}
|
|
2021
2016
|
function tn(e) {
|
|
2022
2017
|
setTimeout(() => {
|
|
2023
|
-
Zr.set(e, setInterval(() =>
|
|
2018
|
+
Zr.set(e, setInterval(() => pt(ae.bind(null, e)), 2e3));
|
|
2024
2019
|
}, Math.round(2e3 * Math.random()));
|
|
2025
2020
|
}
|
|
2026
|
-
function
|
|
2021
|
+
function pt(e) {
|
|
2027
2022
|
typeof requestIdleCallback == "function" ? requestIdleCallback(() => e()) : requestAnimationFrame(() => e());
|
|
2028
2023
|
}
|
|
2029
|
-
let Pe,
|
|
2030
|
-
typeof window < "u" && (J = document.documentElement, Pe = new MutationObserver(Kr),
|
|
2031
|
-
|
|
2032
|
-
}),
|
|
2024
|
+
let Pe, se;
|
|
2025
|
+
typeof window < "u" && (J = document.documentElement, Pe = new MutationObserver(Kr), se = new ResizeObserver(Qr), window.addEventListener("scroll", () => {
|
|
2026
|
+
We = window.scrollY, Le = window.scrollX;
|
|
2027
|
+
}), se.observe(J));
|
|
2033
2028
|
function rn(e) {
|
|
2034
2029
|
return e.reduce((n, a) => [
|
|
2035
2030
|
...n,
|
|
@@ -2044,7 +2039,7 @@ function rn(e) {
|
|
|
2044
2039
|
for (let o = 0; o < a.target.children.length; o++) {
|
|
2045
2040
|
const s = a.target.children.item(o);
|
|
2046
2041
|
if (s) {
|
|
2047
|
-
if (
|
|
2042
|
+
if (_e in s)
|
|
2048
2043
|
return !1;
|
|
2049
2044
|
Oe(a.target, s), n.add(s);
|
|
2050
2045
|
}
|
|
@@ -2053,7 +2048,7 @@ function rn(e) {
|
|
|
2053
2048
|
if (a.removedNodes.length)
|
|
2054
2049
|
for (let o = 0; o < a.removedNodes.length; o++) {
|
|
2055
2050
|
const s = a.removedNodes[o];
|
|
2056
|
-
if (
|
|
2051
|
+
if (_e in s)
|
|
2057
2052
|
return !1;
|
|
2058
2053
|
s instanceof Element && (n.add(s), Oe(a.target, s), le.set(s, [
|
|
2059
2054
|
a.previousSibling,
|
|
@@ -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
|
-
r && le.has(e) && le.delete(e),
|
|
2068
|
+
r && le.has(e) && le.delete(e), oe.has(e) && ((t = oe.get(e)) === null || t === void 0 || t.cancel()), Ae in e ? Je(e) : n && r ? an(e) : n && !r ? sn(e) : Je(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) {
|
|
@@ -2093,69 +2088,69 @@ function ce(e) {
|
|
|
2093
2088
|
height: t.height
|
|
2094
2089
|
};
|
|
2095
2090
|
}
|
|
2096
|
-
function
|
|
2091
|
+
function mt(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
|
-
function
|
|
2109
|
-
if (
|
|
2110
|
-
return e[
|
|
2103
|
+
function vt(e) {
|
|
2104
|
+
if (q in e)
|
|
2105
|
+
return e[q];
|
|
2111
2106
|
}
|
|
2112
|
-
function
|
|
2113
|
-
const t =
|
|
2114
|
-
return t ?
|
|
2107
|
+
function je(e) {
|
|
2108
|
+
const t = vt(e);
|
|
2109
|
+
return t ? be.has(t) : !1;
|
|
2115
2110
|
}
|
|
2116
|
-
function
|
|
2111
|
+
function bt(e, ...t) {
|
|
2117
2112
|
t.forEach((r) => r(e, ie.has(e)));
|
|
2118
2113
|
for (let r = 0; r < e.children.length; r++) {
|
|
2119
2114
|
const n = e.children.item(r);
|
|
2120
2115
|
n && t.forEach((a) => a(n, ie.has(n)));
|
|
2121
2116
|
}
|
|
2122
2117
|
}
|
|
2123
|
-
function
|
|
2118
|
+
function Ue(e) {
|
|
2124
2119
|
return Array.isArray(e) ? e : [e];
|
|
2125
2120
|
}
|
|
2126
|
-
function
|
|
2121
|
+
function xe(e) {
|
|
2127
2122
|
return typeof e == "function";
|
|
2128
2123
|
}
|
|
2129
2124
|
function an(e) {
|
|
2130
2125
|
const t = O.get(e), r = ce(e);
|
|
2131
|
-
if (!
|
|
2126
|
+
if (!je(e))
|
|
2132
2127
|
return O.set(e, r);
|
|
2133
2128
|
let n;
|
|
2134
2129
|
if (!t)
|
|
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] = mt(e, t, r), f = {
|
|
2139
2134
|
transform: `translate(${o}px, ${s}px)`
|
|
2140
|
-
},
|
|
2135
|
+
}, m = {
|
|
2141
2136
|
transform: "translate(0, 0)"
|
|
2142
2137
|
};
|
|
2143
|
-
i !== l && (f.width = `${i}px`,
|
|
2138
|
+
i !== l && (f.width = `${i}px`, m.width = `${l}px`), c !== d && (f.height = `${c}px`, m.height = `${d}px`), n = e.animate([f, m], {
|
|
2144
2139
|
duration: a.duration,
|
|
2145
2140
|
easing: a.easing
|
|
2146
2141
|
});
|
|
2147
2142
|
} else {
|
|
2148
|
-
const [o] =
|
|
2143
|
+
const [o] = Ue(a(e, "remain", t, r));
|
|
2149
2144
|
n = new Animation(o), n.play();
|
|
2150
2145
|
}
|
|
2151
|
-
|
|
2146
|
+
oe.set(e, n), O.set(e, r), n.addEventListener("finish", ae.bind(null, e));
|
|
2152
2147
|
}
|
|
2153
|
-
function
|
|
2148
|
+
function Je(e) {
|
|
2154
2149
|
Ae in e && delete e[Ae];
|
|
2155
2150
|
const t = ce(e);
|
|
2156
2151
|
O.set(e, t);
|
|
2157
2152
|
const r = Re(e);
|
|
2158
|
-
if (!
|
|
2153
|
+
if (!je(e))
|
|
2159
2154
|
return;
|
|
2160
2155
|
let n;
|
|
2161
2156
|
if (typeof r != "function")
|
|
@@ -2168,15 +2163,15 @@ function Qe(e) {
|
|
|
2168
2163
|
easing: "ease-in"
|
|
2169
2164
|
});
|
|
2170
2165
|
else {
|
|
2171
|
-
const [a] =
|
|
2166
|
+
const [a] = Ue(r(e, "add", t));
|
|
2172
2167
|
n = new Animation(a), n.play();
|
|
2173
2168
|
}
|
|
2174
|
-
|
|
2169
|
+
oe.set(e, n), n.addEventListener("finish", ae.bind(null, e));
|
|
2175
2170
|
}
|
|
2176
|
-
function
|
|
2171
|
+
function et(e, t) {
|
|
2177
2172
|
var r;
|
|
2178
|
-
e.remove(), O.delete(e), le.delete(e),
|
|
2179
|
-
if (
|
|
2173
|
+
e.remove(), O.delete(e), le.delete(e), oe.delete(e), (r = Ne.get(e)) === null || r === void 0 || r.disconnect(), setTimeout(() => {
|
|
2174
|
+
if (_e in e && delete e[_e], Object.defineProperty(e, Ae, { value: !0, configurable: !0 }), t && e instanceof HTMLElement)
|
|
2180
2175
|
for (const n in t)
|
|
2181
2176
|
e.style[n] = "";
|
|
2182
2177
|
}, 0);
|
|
@@ -2186,25 +2181,25 @@ function sn(e) {
|
|
|
2186
2181
|
if (!le.has(e) || !O.has(e))
|
|
2187
2182
|
return;
|
|
2188
2183
|
const [r, n] = le.get(e);
|
|
2189
|
-
Object.defineProperty(e,
|
|
2184
|
+
Object.defineProperty(e, _e, { value: !0, configurable: !0 });
|
|
2190
2185
|
const a = window.scrollX, o = window.scrollY;
|
|
2191
|
-
if (n && n.parentNode && n.parentNode instanceof Element ? n.parentNode.insertBefore(e, n) : r && r.parentNode ? r.parentNode.appendChild(e) : (t =
|
|
2192
|
-
return
|
|
2193
|
-
const [s, i, l,
|
|
2194
|
-
(a !==
|
|
2195
|
-
let
|
|
2186
|
+
if (n && n.parentNode && n.parentNode instanceof Element ? n.parentNode.insertBefore(e, n) : r && r.parentNode ? r.parentNode.appendChild(e) : (t = vt(e)) === null || t === void 0 || t.appendChild(e), !je(e))
|
|
2187
|
+
return et(e);
|
|
2188
|
+
const [s, i, l, c] = cn(e), d = Re(e), f = O.get(e);
|
|
2189
|
+
(a !== Le || o !== We) && ln(e, a, o, d);
|
|
2190
|
+
let m, k = {
|
|
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",
|
|
2204
2199
|
zIndex: "100"
|
|
2205
2200
|
};
|
|
2206
|
-
if (!
|
|
2207
|
-
Object.assign(e.style,
|
|
2201
|
+
if (!xe(d))
|
|
2202
|
+
Object.assign(e.style, k), m = e.animate([
|
|
2208
2203
|
{
|
|
2209
2204
|
transform: "scale(1)",
|
|
2210
2205
|
opacity: 1
|
|
@@ -2215,50 +2210,50 @@ function sn(e) {
|
|
|
2215
2210
|
}
|
|
2216
2211
|
], { duration: d.duration, easing: "ease-out" });
|
|
2217
2212
|
else {
|
|
2218
|
-
const [
|
|
2219
|
-
(z == null ? void 0 : z.styleReset) !== !1 && (
|
|
2213
|
+
const [$, z] = Ue(d(e, "remove", f));
|
|
2214
|
+
(z == null ? void 0 : z.styleReset) !== !1 && (k = (z == null ? void 0 : z.styleReset) || k, Object.assign(e.style, k)), m = new Animation($), m.play();
|
|
2220
2215
|
}
|
|
2221
|
-
|
|
2216
|
+
oe.set(e, m), m.addEventListener("finish", et.bind(null, e, k));
|
|
2222
2217
|
}
|
|
2223
2218
|
function ln(e, t, r, n) {
|
|
2224
|
-
const a =
|
|
2219
|
+
const a = Le - t, o = We - r, s = document.documentElement.style.scrollBehavior;
|
|
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
|
-
function
|
|
2225
|
+
function m() {
|
|
2231
2226
|
requestAnimationFrame(() => {
|
|
2232
|
-
if (!
|
|
2233
|
-
const
|
|
2227
|
+
if (!xe(n)) {
|
|
2228
|
+
const k = c - l.clientHeight, $ = d - l.clientWidth;
|
|
2234
2229
|
f + n.duration > performance.now() ? (window.scrollTo({
|
|
2235
|
-
left: window.scrollX -
|
|
2236
|
-
top: window.scrollY -
|
|
2237
|
-
}),
|
|
2230
|
+
left: window.scrollX - $,
|
|
2231
|
+
top: window.scrollY - k
|
|
2232
|
+
}), c = l.clientHeight, d = l.clientWidth, m()) : document.documentElement.style.scrollBehavior = s;
|
|
2238
2233
|
}
|
|
2239
2234
|
});
|
|
2240
2235
|
}
|
|
2241
|
-
|
|
2236
|
+
m();
|
|
2242
2237
|
}
|
|
2243
2238
|
function cn(e) {
|
|
2244
|
-
const t = O.get(e), [r, , n] =
|
|
2239
|
+
const t = O.get(e), [r, , n] = mt(e, t, ce(e));
|
|
2245
2240
|
let a = e.parentElement;
|
|
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 = {}) {
|
|
2253
|
-
return Pe &&
|
|
2248
|
+
return Pe && se && (window.matchMedia("(prefers-reduced-motion: reduce)").matches && !xe(t) && !t.disrespectUserMotionPreference || (be.add(e), getComputedStyle(e).position === "static" && Object.assign(e.style, { position: "relative" }), bt(e, ae, tn, (a) => se == null ? void 0 : se.observe(a)), xe(t) ? ie.set(e, t) : ie.set(e, { duration: 250, easing: "ease-in-out", ...t }), Pe.observe(e, { childList: !0 }), ht.add(e))), Object.freeze({
|
|
2254
2249
|
parent: e,
|
|
2255
2250
|
enable: () => {
|
|
2256
|
-
|
|
2251
|
+
be.add(e);
|
|
2257
2252
|
},
|
|
2258
2253
|
disable: () => {
|
|
2259
|
-
|
|
2254
|
+
be.delete(e);
|
|
2260
2255
|
},
|
|
2261
|
-
isEnabled: () =>
|
|
2256
|
+
isEnabled: () => be.has(e)
|
|
2262
2257
|
});
|
|
2263
2258
|
}
|
|
2264
2259
|
const dn = {
|
|
@@ -2267,14 +2262,14 @@ const dn = {
|
|
|
2267
2262
|
},
|
|
2268
2263
|
// ignore ssr see #96:
|
|
2269
2264
|
getSSRProps: () => ({})
|
|
2270
|
-
}, fn = { class: "fixed z-20 flex flex-col gap-2 p-2" },
|
|
2265
|
+
}, fn = { class: "fixed z-20 flex flex-col gap-2 p-2" }, Qn = /* @__PURE__ */ x({
|
|
2271
2266
|
__name: "NotificationSystem",
|
|
2272
2267
|
setup(e) {
|
|
2273
|
-
const t =
|
|
2268
|
+
const t = wn();
|
|
2274
2269
|
return (r, n) => {
|
|
2275
2270
|
const a = Yr;
|
|
2276
2271
|
return Te((h(), b("div", fn, [
|
|
2277
|
-
(h(!0), b(K, null,
|
|
2272
|
+
(h(!0), b(K, null, we(u(t), (o) => (h(), P(a, {
|
|
2278
2273
|
key: o.hash,
|
|
2279
2274
|
closeable: "",
|
|
2280
2275
|
"with-border": "",
|
|
@@ -2283,14 +2278,14 @@ 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
|
}
|
|
2293
|
-
}), hn = { class: "relative" },
|
|
2288
|
+
}), hn = { class: "relative" }, Jn = /* @__PURE__ */ x({
|
|
2294
2289
|
__name: "Overlay",
|
|
2295
2290
|
props: {
|
|
2296
2291
|
blur: { type: [Boolean, String], default: !1 },
|
|
@@ -2299,7 +2294,7 @@ const dn = {
|
|
|
2299
2294
|
color: { default: "black" }
|
|
2300
2295
|
},
|
|
2301
2296
|
setup(e) {
|
|
2302
|
-
const t = e, r =
|
|
2297
|
+
const t = e, r = v(() => {
|
|
2303
2298
|
switch (t.blur) {
|
|
2304
2299
|
case "sm":
|
|
2305
2300
|
return "backdrop-blur-sm";
|
|
@@ -2311,22 +2306,22 @@ 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 = v(() => ({
|
|
2315
2310
|
backgroundColor: `rgba(${o.r}, ${o.g}, ${o.b}, ${t.opacity / 100})`
|
|
2316
2311
|
}));
|
|
2317
2312
|
return (i, l) => (h(), b("div", hn, [
|
|
2318
|
-
|
|
2319
|
-
w("div",
|
|
2313
|
+
S(i.$slots, "default"),
|
|
2314
|
+
w("div", de(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
|
+
S(i.$slots, "content")
|
|
2326
2321
|
], 16)
|
|
2327
2322
|
]));
|
|
2328
2323
|
}
|
|
2329
|
-
}),
|
|
2324
|
+
}), eo = /* @__PURE__ */ x({
|
|
2330
2325
|
__name: "Paper",
|
|
2331
2326
|
props: {
|
|
2332
2327
|
size: { default: "md" },
|
|
@@ -2335,25 +2330,25 @@ 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:
|
|
2341
|
+
style: T([u(r).style])
|
|
2347
2342
|
}, {
|
|
2348
|
-
default:
|
|
2349
|
-
|
|
2343
|
+
default: L(() => [
|
|
2344
|
+
S(n.$slots, "default")
|
|
2350
2345
|
]),
|
|
2351
2346
|
_: 3
|
|
2352
2347
|
}, 8, ["class", "style"]));
|
|
2353
2348
|
}
|
|
2354
|
-
}), pn = ["placeholder", "type"],
|
|
2349
|
+
}), pn = ["for"], mn = { key: 1 }, vn = ["id", "placeholder", "type"], bn = /* @__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 },
|
|
@@ -2361,14 +2356,15 @@ const dn = {
|
|
|
2361
2356
|
rounded: { default: "md" },
|
|
2362
2357
|
size: { default: "md" },
|
|
2363
2358
|
password: { type: Boolean },
|
|
2364
|
-
placeholder: {}
|
|
2359
|
+
placeholder: {},
|
|
2360
|
+
label: {}
|
|
2365
2361
|
}, {
|
|
2366
2362
|
modelValue: {},
|
|
2367
2363
|
modelModifiers: {}
|
|
2368
2364
|
}),
|
|
2369
2365
|
emits: ["update:modelValue"],
|
|
2370
2366
|
setup(e, { expose: t }) {
|
|
2371
|
-
const r = e, n =
|
|
2367
|
+
const r = e, n = j(e, "modelValue"), a = v(() => {
|
|
2372
2368
|
switch (r.size) {
|
|
2373
2369
|
case "sm":
|
|
2374
2370
|
return {
|
|
@@ -2383,7 +2379,16 @@ const dn = {
|
|
|
2383
2379
|
base: "h-10 px-4 py-2 text-base"
|
|
2384
2380
|
};
|
|
2385
2381
|
}
|
|
2386
|
-
}), o =
|
|
2382
|
+
}), o = v(() => {
|
|
2383
|
+
switch (r.size) {
|
|
2384
|
+
case "sm":
|
|
2385
|
+
return "text-xs";
|
|
2386
|
+
case "md":
|
|
2387
|
+
return "text-sm";
|
|
2388
|
+
case "lg":
|
|
2389
|
+
return "md-md";
|
|
2390
|
+
}
|
|
2391
|
+
}), s = v(() => {
|
|
2387
2392
|
if (r.error)
|
|
2388
2393
|
return "text-error-container bg-surface-base border-error-container focus:border-error-container";
|
|
2389
2394
|
switch (r.color) {
|
|
@@ -2397,22 +2402,33 @@ const dn = {
|
|
|
2397
2402
|
default:
|
|
2398
2403
|
return "text-surface-on bg-surface-base border-surface-border-base focus:border-primary-container";
|
|
2399
2404
|
}
|
|
2400
|
-
}),
|
|
2401
|
-
|
|
2402
|
-
el:
|
|
2403
|
-
})
|
|
2404
|
-
|
|
2405
|
-
|
|
2406
|
-
|
|
2407
|
-
|
|
2408
|
-
|
|
2409
|
-
|
|
2410
|
-
|
|
2411
|
-
|
|
2412
|
-
|
|
2413
|
-
|
|
2405
|
+
}), i = v(() => r.disabled ? "pointer-events-none filter grayscale opacity-60" : ""), l = U(r), c = g(null);
|
|
2406
|
+
t({
|
|
2407
|
+
el: c
|
|
2408
|
+
});
|
|
2409
|
+
const d = nt(), f = Fe(d);
|
|
2410
|
+
return (m, k) => (h(), b("div", null, [
|
|
2411
|
+
m.$slots.label || m.label ? (h(), b("label", {
|
|
2412
|
+
key: 0,
|
|
2413
|
+
for: u(f),
|
|
2414
|
+
class: y(["mb-1 block text-surface-on", [u(o)]])
|
|
2415
|
+
}, [
|
|
2416
|
+
m.$slots.label ? S(m.$slots, "label", { key: 0 }) : (h(), b("span", mn, re(m.label), 1))
|
|
2417
|
+
], 10, pn)) : A("", !0),
|
|
2418
|
+
Te(w("input", de({ id: u(f) }, m.$attrs, {
|
|
2419
|
+
ref_key: "input",
|
|
2420
|
+
ref: c,
|
|
2421
|
+
"onUpdate:modelValue": k[0] || (k[0] = ($) => n.value = $),
|
|
2422
|
+
class: ["bg-back-2 border px-2 py-1 outline-none transition-background-color,border-color,color", [u(s), u(i), u(l).class, u(a).base]],
|
|
2423
|
+
style: [u(l).style],
|
|
2424
|
+
placeholder: m.placeholder,
|
|
2425
|
+
type: r.password ? "password" : "text"
|
|
2426
|
+
}), null, 16, vn), [
|
|
2427
|
+
[Tt, n.value]
|
|
2428
|
+
])
|
|
2429
|
+
]));
|
|
2414
2430
|
}
|
|
2415
|
-
}),
|
|
2431
|
+
}), gn = { class: "flex gap-2" }, to = /* @__PURE__ */ x({
|
|
2416
2432
|
__name: "PinInput",
|
|
2417
2433
|
props: {
|
|
2418
2434
|
modelValue: {},
|
|
@@ -2425,8 +2441,8 @@ const dn = {
|
|
|
2425
2441
|
function n(o) {
|
|
2426
2442
|
o.preventDefault(), o.stopPropagation();
|
|
2427
2443
|
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 +
|
|
2444
|
+
o.target.value = "", Array.from(i).forEach((l, c) => {
|
|
2445
|
+
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
2446
|
});
|
|
2431
2447
|
}
|
|
2432
2448
|
function a(o) {
|
|
@@ -2436,8 +2452,8 @@ const dn = {
|
|
|
2436
2452
|
const i = r.value.findIndex((l) => l.el === o.target);
|
|
2437
2453
|
i !== 0 && (r.value[i - 1].el.focus(), r.value[i - 1].el.select(), s || (r.value[i - 1].el.value = ""));
|
|
2438
2454
|
}
|
|
2439
|
-
return (o, s) => (h(), b("div",
|
|
2440
|
-
(h(!0), b(K, null,
|
|
2455
|
+
return (o, s) => (h(), b("div", gn, [
|
|
2456
|
+
(h(!0), b(K, null, we(t.length, (i) => (h(), P(bn, {
|
|
2441
2457
|
ref_for: !0,
|
|
2442
2458
|
ref_key: "inputs",
|
|
2443
2459
|
ref: r,
|
|
@@ -2446,12 +2462,12 @@ const dn = {
|
|
|
2446
2462
|
style: { padding: "0" },
|
|
2447
2463
|
password: t.password,
|
|
2448
2464
|
onPointerup: s[0] || (s[0] = (l) => l.target.select()),
|
|
2449
|
-
onInput:
|
|
2465
|
+
onInput: st(n, ["stop", "prevent"]),
|
|
2450
2466
|
onKeydown: zt(a, ["backspace"])
|
|
2451
2467
|
}, null, 8, ["password"]))), 128))
|
|
2452
2468
|
]));
|
|
2453
2469
|
}
|
|
2454
|
-
}),
|
|
2470
|
+
}), ro = /* @__PURE__ */ x({
|
|
2455
2471
|
__name: "Progress",
|
|
2456
2472
|
props: {
|
|
2457
2473
|
value: { default: 0 },
|
|
@@ -2463,7 +2479,7 @@ const dn = {
|
|
|
2463
2479
|
loading: { type: Boolean, default: !1 }
|
|
2464
2480
|
},
|
|
2465
2481
|
setup(e) {
|
|
2466
|
-
const t = e, r =
|
|
2482
|
+
const t = e, r = v(() => {
|
|
2467
2483
|
switch (t.size) {
|
|
2468
2484
|
case "sm":
|
|
2469
2485
|
return "h-0.25";
|
|
@@ -2472,7 +2488,7 @@ const dn = {
|
|
|
2472
2488
|
case "lg":
|
|
2473
2489
|
return "h-1";
|
|
2474
2490
|
}
|
|
2475
|
-
}), n =
|
|
2491
|
+
}), n = v(() => {
|
|
2476
2492
|
switch (t.color) {
|
|
2477
2493
|
case "primary":
|
|
2478
2494
|
return "bg-primary-container";
|
|
@@ -2483,24 +2499,24 @@ const dn = {
|
|
|
2483
2499
|
case "error":
|
|
2484
2500
|
return "bg-error-7";
|
|
2485
2501
|
}
|
|
2486
|
-
}), a =
|
|
2502
|
+
}), a = U(t);
|
|
2487
2503
|
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:
|
|
2504
|
+
class: y(["relative w-full self-center overflow-hidden bg-surface-high transition-background-color,border-color,color", [u(r), u(a).class]]),
|
|
2505
|
+
style: T([u(a).style])
|
|
2490
2506
|
}, [
|
|
2491
2507
|
o.loading ? (h(), b("div", {
|
|
2492
2508
|
key: 1,
|
|
2493
|
-
class: y(["loading-progress h-full", [
|
|
2509
|
+
class: y(["loading-progress h-full", [u(n)]])
|
|
2494
2510
|
}, null, 2)) : (h(), b("div", {
|
|
2495
2511
|
key: 0,
|
|
2496
|
-
class: y(["h-full", [
|
|
2497
|
-
style:
|
|
2512
|
+
class: y(["h-full", [u(n)]]),
|
|
2513
|
+
style: T([{
|
|
2498
2514
|
width: `${(Number(o.value) - Number(o.min)) / (Number(o.max) - Number(o.min)) * 100}%`
|
|
2499
2515
|
}])
|
|
2500
2516
|
}, null, 6))
|
|
2501
2517
|
], 6));
|
|
2502
2518
|
}
|
|
2503
|
-
}),
|
|
2519
|
+
}), gt = {
|
|
2504
2520
|
primary: ["#e5f7ff", "#d3ebfa", "#a9d4f1", "#7cbde9", "#57a9e0", "#3f9cdc", "#3096dc", "#1f82c4", "#0f73b0", "#00649c", "#082f49"],
|
|
2505
2521
|
secondary: ["#e9fbf0", "#dcf1e3", "#badfc7", "#96cea9", "#77bf90", "#63b580", "#58b077", "#479a64", "#3b8a58", "#2c7749", "#022c22"],
|
|
2506
2522
|
tertiary: ["#fff7e1", "#ffedcd", "#fcd99e", "#f9c46b", "#f7b23f", "#f6a724", "#f5a113", "#da8c04", "#c37d00", "#aa6a00", "#572508"],
|
|
@@ -2509,80 +2525,76 @@ const dn = {
|
|
|
2509
2525
|
}, Ie = {
|
|
2510
2526
|
name: "dark",
|
|
2511
2527
|
scheme: "dark",
|
|
2512
|
-
colors:
|
|
2513
|
-
},
|
|
2528
|
+
colors: gt
|
|
2529
|
+
}, yn = {
|
|
2514
2530
|
name: "light",
|
|
2515
2531
|
scheme: "light",
|
|
2516
|
-
colors:
|
|
2517
|
-
},
|
|
2518
|
-
function
|
|
2519
|
-
return
|
|
2532
|
+
colors: gt
|
|
2533
|
+
}, no = Symbol("Notifications"), yt = Et([]);
|
|
2534
|
+
function wn() {
|
|
2535
|
+
return yt;
|
|
2520
2536
|
}
|
|
2521
|
-
class
|
|
2537
|
+
class oo {
|
|
2522
2538
|
static show(t) {
|
|
2523
|
-
t.hash = Math.random().toString(36),
|
|
2539
|
+
t.hash = Math.random().toString(36), yt.push(t);
|
|
2524
2540
|
}
|
|
2525
2541
|
}
|
|
2526
|
-
const
|
|
2527
|
-
function
|
|
2542
|
+
const wt = Symbol("tabCurrent"), _t = Symbol("direction"), Ve = [0.96, 0.96, 0.907, 0.805, 0.697, 0.547, 0.518, 0.445, 0.395, 0.34, 0.28];
|
|
2543
|
+
function _n(e) {
|
|
2528
2544
|
const t = p(e).toHsl().l;
|
|
2529
2545
|
return Ve.reduce(
|
|
2530
2546
|
(r, n) => Math.abs(n - t) < Math.abs(r - t) ? n : r
|
|
2531
2547
|
);
|
|
2532
2548
|
}
|
|
2533
|
-
function
|
|
2534
|
-
const t = p(e), r =
|
|
2549
|
+
function xn(e) {
|
|
2550
|
+
const t = p(e), r = _n(t), n = Ve.findIndex((o) => o === r), a = Ve.map((o) => {
|
|
2535
2551
|
const s = p({ h: t.toHsl().h, s: t.toHsl().s, l: o });
|
|
2536
2552
|
return s.saturate(0 * 100), s;
|
|
2537
2553
|
});
|
|
2538
2554
|
return { baseColorIndex: n, colors: a.map((o) => o.toHexString()) };
|
|
2539
2555
|
}
|
|
2540
|
-
function
|
|
2541
|
-
return
|
|
2556
|
+
function ao(e) {
|
|
2557
|
+
return xn(e).colors;
|
|
2542
2558
|
}
|
|
2543
|
-
const
|
|
2559
|
+
const so = /* @__PURE__ */ x({
|
|
2544
2560
|
__name: "RokuProvider",
|
|
2545
2561
|
props: {
|
|
2546
2562
|
is: { default: "div" },
|
|
2547
2563
|
theme: { default() {
|
|
2548
|
-
return typeof window > "u" || document.documentElement.dataset.scheme === "dark" ? Ie :
|
|
2564
|
+
return typeof window > "u" || document.documentElement.dataset.scheme === "dark" ? Ie : yn;
|
|
2549
2565
|
} }
|
|
2550
2566
|
},
|
|
2551
2567
|
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);
|
|
2568
|
+
const t = e, r = g(t.theme.scheme);
|
|
2569
|
+
Q && new MutationObserver(() => {
|
|
2570
|
+
r.value !== document.documentElement.dataset.scheme && (r.value = document.documentElement.dataset.scheme);
|
|
2558
2571
|
}).observe(document.documentElement, {
|
|
2559
2572
|
attributes: !0,
|
|
2560
2573
|
attributeFilter: ["data-scheme"]
|
|
2561
|
-
})
|
|
2562
|
-
const
|
|
2563
|
-
|
|
2574
|
+
});
|
|
2575
|
+
const n = rr();
|
|
2576
|
+
X(() => {
|
|
2564
2577
|
if (!Q)
|
|
2565
2578
|
return "dark";
|
|
2566
|
-
|
|
2567
|
-
}),
|
|
2568
|
-
const
|
|
2569
|
-
return (
|
|
2570
|
-
style:
|
|
2571
|
-
|
|
2572
|
-
{ paddingRight: c(o) }
|
|
2579
|
+
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);
|
|
2580
|
+
}), ye(dt, r);
|
|
2581
|
+
const a = ut(t.theme);
|
|
2582
|
+
return (o, s) => (h(), P(ue(o.is), {
|
|
2583
|
+
style: T([
|
|
2584
|
+
u(a)
|
|
2573
2585
|
]),
|
|
2574
2586
|
class: "text-surface-on transition-background-color,border-color,color"
|
|
2575
2587
|
}, {
|
|
2576
|
-
default:
|
|
2577
|
-
|
|
2588
|
+
default: L(() => [
|
|
2589
|
+
S(o.$slots, "default")
|
|
2578
2590
|
]),
|
|
2579
2591
|
_: 3
|
|
2580
2592
|
}, 8, ["style"]));
|
|
2581
2593
|
}
|
|
2582
|
-
}),
|
|
2594
|
+
}), kn = ["id"], Sn = ["for"], Mn = ["for"], $n = /* @__PURE__ */ x({
|
|
2583
2595
|
inheritAttrs: !1,
|
|
2584
2596
|
__name: "Switch",
|
|
2585
|
-
props: /* @__PURE__ */
|
|
2597
|
+
props: /* @__PURE__ */ W({
|
|
2586
2598
|
size: { default: "md" },
|
|
2587
2599
|
animate: { type: Boolean, default: !0 },
|
|
2588
2600
|
options: {},
|
|
@@ -2600,9 +2612,9 @@ const oo = /* @__PURE__ */ x({
|
|
|
2600
2612
|
}),
|
|
2601
2613
|
emits: ["update:modelValue"],
|
|
2602
2614
|
setup(e) {
|
|
2603
|
-
const t = e, r =
|
|
2615
|
+
const t = e, r = j(e, "modelValue");
|
|
2604
2616
|
t.value && (r.value = t.value);
|
|
2605
|
-
const n = g(null), a = g(!1), o =
|
|
2617
|
+
const n = g(null), a = g(!1), o = v(() => {
|
|
2606
2618
|
switch (t.size) {
|
|
2607
2619
|
case "sm":
|
|
2608
2620
|
return {
|
|
@@ -2629,13 +2641,13 @@ const oo = /* @__PURE__ */ x({
|
|
|
2629
2641
|
active: a.value ? "left-[calc(1.75rem-1px)]" : "left-[calc(2.25rem-1px)]"
|
|
2630
2642
|
};
|
|
2631
2643
|
}
|
|
2632
|
-
}), s =
|
|
2644
|
+
}), s = v(() => t.animate ? {
|
|
2633
2645
|
indicator: "transition-all",
|
|
2634
2646
|
progress: "transition-width"
|
|
2635
2647
|
} : {
|
|
2636
2648
|
indicator: "",
|
|
2637
2649
|
progress: ""
|
|
2638
|
-
}), i =
|
|
2650
|
+
}), i = Fe(t), l = v(() => {
|
|
2639
2651
|
let d = "bg-primary-container";
|
|
2640
2652
|
switch (t.color) {
|
|
2641
2653
|
case "secondary":
|
|
@@ -2652,42 +2664,42 @@ const oo = /* @__PURE__ */ x({
|
|
|
2652
2664
|
wrapper: r.value ? `border border-transparent ${d}` : "bg-surface-lowest border border-surface-border-base",
|
|
2653
2665
|
indicator: t.disabled ? "bg-surface-high" : "bg-white text-primary-container"
|
|
2654
2666
|
};
|
|
2655
|
-
}),
|
|
2667
|
+
}), c = U(t);
|
|
2656
2668
|
return (d, f) => (h(), b("div", {
|
|
2657
2669
|
role: "switch",
|
|
2658
2670
|
class: y(["relative flex items-center gap-2", {
|
|
2659
2671
|
"pointer-events-none filter-grayscale op60": t.disabled
|
|
2660
2672
|
}])
|
|
2661
2673
|
}, [
|
|
2662
|
-
Te(w("input",
|
|
2663
|
-
id:
|
|
2664
|
-
"onUpdate:modelValue": f[0] || (f[0] = (
|
|
2674
|
+
Te(w("input", de({
|
|
2675
|
+
id: u(i),
|
|
2676
|
+
"onUpdate:modelValue": f[0] || (f[0] = (m) => r.value = m)
|
|
2665
2677
|
}, d.$attrs, {
|
|
2666
2678
|
class: "hidden",
|
|
2667
2679
|
type: "checkbox"
|
|
2668
|
-
}), null, 16,
|
|
2680
|
+
}), null, 16, kn), [
|
|
2669
2681
|
[Rt, r.value]
|
|
2670
2682
|
]),
|
|
2671
2683
|
w("label", {
|
|
2672
2684
|
class: "leading-0 cursor-pointer!",
|
|
2673
|
-
for:
|
|
2685
|
+
for: u(i)
|
|
2674
2686
|
}, [
|
|
2675
2687
|
w("div", {
|
|
2676
2688
|
ref_key: "wrapper",
|
|
2677
2689
|
ref: n,
|
|
2678
|
-
class: y([[
|
|
2679
|
-
style:
|
|
2680
|
-
onPointerdown: f[1] || (f[1] = (
|
|
2681
|
-
onPointerup: f[2] || (f[2] = (
|
|
2682
|
-
onPointerleave: f[3] || (f[3] = (
|
|
2683
|
-
onPointerenter: f[4] || (f[4] = (
|
|
2690
|
+
class: y([[u(o).wrapper, u(l).wrapper, u(c).class], "relative inline-block transition-all"]),
|
|
2691
|
+
style: T([u(c).style]),
|
|
2692
|
+
onPointerdown: f[1] || (f[1] = (m) => a.value = !0),
|
|
2693
|
+
onPointerup: f[2] || (f[2] = (m) => a.value = !1),
|
|
2694
|
+
onPointerleave: f[3] || (f[3] = (m) => a.value = !1),
|
|
2695
|
+
onPointerenter: f[4] || (f[4] = (m) => m.buttons === 1 && (a.value = !0))
|
|
2684
2696
|
}, [
|
|
2685
2697
|
w("div", {
|
|
2686
|
-
class: y(["absolute top-50% -translate-y-50%", [
|
|
2687
|
-
style:
|
|
2698
|
+
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]]),
|
|
2699
|
+
style: T([u(c).style])
|
|
2688
2700
|
}, null, 6),
|
|
2689
2701
|
w("i", {
|
|
2690
|
-
class: y(["absolute top-1/2 -translate-y-50%", [
|
|
2702
|
+
class: y(["absolute top-1/2 -translate-y-50%", [u(o).icon, {
|
|
2691
2703
|
[`left-0 text-${d.color}-on`]: r.value,
|
|
2692
2704
|
"right-0 text-surface-on ": !r.value,
|
|
2693
2705
|
[d.onIcon ?? ""]: r.value && d.onIcon,
|
|
@@ -2695,17 +2707,17 @@ const oo = /* @__PURE__ */ x({
|
|
|
2695
2707
|
}]])
|
|
2696
2708
|
}, null, 2)
|
|
2697
2709
|
], 38)
|
|
2698
|
-
], 8,
|
|
2710
|
+
], 8, Sn),
|
|
2699
2711
|
d.label ? (h(), b("label", {
|
|
2700
2712
|
key: 0,
|
|
2701
|
-
for:
|
|
2702
|
-
},
|
|
2713
|
+
for: u(i)
|
|
2714
|
+
}, re(d.label), 9, Mn)) : A("", !0)
|
|
2703
2715
|
], 2));
|
|
2704
2716
|
}
|
|
2705
|
-
}),
|
|
2717
|
+
}), Cn = { class: "dark:hidden" }, An = { class: "light:hidden" }, lo = /* @__PURE__ */ x({
|
|
2706
2718
|
__name: "SchemeSwitch",
|
|
2707
2719
|
setup(e) {
|
|
2708
|
-
const t = Hr(), r =
|
|
2720
|
+
const t = Hr(), r = v({
|
|
2709
2721
|
get() {
|
|
2710
2722
|
return t.value === "dark";
|
|
2711
2723
|
},
|
|
@@ -2713,7 +2725,7 @@ const oo = /* @__PURE__ */ x({
|
|
|
2713
2725
|
t.value = o ? "dark" : "light";
|
|
2714
2726
|
}
|
|
2715
2727
|
});
|
|
2716
|
-
|
|
2728
|
+
X(() => {
|
|
2717
2729
|
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
2730
|
});
|
|
2719
2731
|
const n = g(!0), a = g(!1);
|
|
@@ -2723,53 +2735,53 @@ const oo = /* @__PURE__ */ x({
|
|
|
2723
2735
|
o === "dark" ? r.value = !0 : o === "light" ? r.value = !1 : r.value = window.matchMedia("(prefers-color-scheme: dark)").matches;
|
|
2724
2736
|
}
|
|
2725
2737
|
n.value = !1;
|
|
2726
|
-
}),
|
|
2738
|
+
}), tt(() => {
|
|
2727
2739
|
a.value = !0;
|
|
2728
2740
|
}), (o, s) => {
|
|
2729
|
-
const i =
|
|
2741
|
+
const i = $n;
|
|
2730
2742
|
return h(), b(K, null, [
|
|
2731
2743
|
w("div", {
|
|
2732
|
-
class: y({ hidden: !
|
|
2744
|
+
class: y({ hidden: !u(n) })
|
|
2733
2745
|
}, [
|
|
2734
|
-
w("div",
|
|
2746
|
+
w("div", Cn, [
|
|
2735
2747
|
Z(i, {
|
|
2736
2748
|
value: !1,
|
|
2737
|
-
"on-icon": "i-
|
|
2738
|
-
"off-icon": "i-
|
|
2749
|
+
"on-icon": "i-line-md-moon-twotone-alt-loop",
|
|
2750
|
+
"off-icon": "i-line-md-sunny-outline-twotone-loop"
|
|
2739
2751
|
})
|
|
2740
2752
|
]),
|
|
2741
|
-
w("div",
|
|
2753
|
+
w("div", An, [
|
|
2742
2754
|
Z(i, {
|
|
2743
2755
|
value: !0,
|
|
2744
2756
|
color: "secondary",
|
|
2745
|
-
"on-icon": "i-
|
|
2746
|
-
"off-icon": "i-
|
|
2757
|
+
"on-icon": "i-line-md-moon-twotone-alt-loop",
|
|
2758
|
+
"off-icon": "i-line-md-sunny-outline-twotone-loop"
|
|
2747
2759
|
})
|
|
2748
2760
|
])
|
|
2749
2761
|
], 2),
|
|
2750
2762
|
w("div", {
|
|
2751
|
-
class: y({ hidden:
|
|
2763
|
+
class: y({ hidden: u(n) })
|
|
2752
2764
|
}, [
|
|
2753
2765
|
Z(i, {
|
|
2754
|
-
modelValue:
|
|
2766
|
+
modelValue: u(r),
|
|
2755
2767
|
"onUpdate:modelValue": s[0] || (s[0] = (l) => Bt(r) ? r.value = l : null),
|
|
2756
|
-
animate:
|
|
2768
|
+
animate: u(a),
|
|
2757
2769
|
color: "secondary",
|
|
2758
|
-
"on-icon": "i-
|
|
2759
|
-
"off-icon": "i-
|
|
2770
|
+
"on-icon": "i-line-md-moon-twotone-alt-loop",
|
|
2771
|
+
"off-icon": "i-line-md-sunny-outline-twotone-loop"
|
|
2760
2772
|
}, null, 8, ["modelValue", "animate"])
|
|
2761
2773
|
], 2)
|
|
2762
2774
|
], 64);
|
|
2763
2775
|
};
|
|
2764
2776
|
}
|
|
2765
|
-
}),
|
|
2777
|
+
}), Tn = { class: "w-full flex items-center" }, zn = ["placeholder", "value"], En = /* @__PURE__ */ w("i", { class: "i-tabler-chevron-down pointer-events-none absolute right-2" }, null, -1), Rn = {
|
|
2766
2778
|
key: 0,
|
|
2767
2779
|
class: "flex cursor-default items-center justify-between gap-2 rounded p-1 px-2"
|
|
2768
|
-
},
|
|
2769
|
-
|
|
2770
|
-
],
|
|
2780
|
+
}, Bn = ["onPointerdown", "onHover"], On = { key: 0 }, Hn = /* @__PURE__ */ w("i", { class: "i-tabler-check h-3 w-3" }, null, -1), Nn = [
|
|
2781
|
+
Hn
|
|
2782
|
+
], io = /* @__PURE__ */ x({
|
|
2771
2783
|
__name: "Select",
|
|
2772
|
-
props: /* @__PURE__ */
|
|
2784
|
+
props: /* @__PURE__ */ W({
|
|
2773
2785
|
options: { default() {
|
|
2774
2786
|
return [];
|
|
2775
2787
|
} },
|
|
@@ -2781,17 +2793,17 @@ const oo = /* @__PURE__ */ x({
|
|
|
2781
2793
|
modelValue: { default: void 0 },
|
|
2782
2794
|
modelModifiers: {}
|
|
2783
2795
|
}),
|
|
2784
|
-
emits: /* @__PURE__ */
|
|
2796
|
+
emits: /* @__PURE__ */ W(["change"], ["update:modelValue"]),
|
|
2785
2797
|
setup(e, { emit: t }) {
|
|
2786
|
-
const r = e, n = t, a =
|
|
2787
|
-
|
|
2798
|
+
const r = e, n = t, a = U(r), o = j(e, "modelValue"), s = g(null), i = g(null), { focused: l } = tr(s), c = v(() => r.options.map((_) => E(_)).indexOf(o.value)), d = g(-1), f = g(-1);
|
|
2799
|
+
X(() => {
|
|
2788
2800
|
l.value || (f.value = -1);
|
|
2789
|
-
}),
|
|
2790
|
-
o.value = E(r.options[
|
|
2791
|
-
}),
|
|
2801
|
+
}), X(() => {
|
|
2802
|
+
o.value = E(r.options[c.value]);
|
|
2803
|
+
}), fe(o, () => {
|
|
2792
2804
|
n("change", o.value);
|
|
2793
2805
|
});
|
|
2794
|
-
const
|
|
2806
|
+
const m = r.options, k = v(() => m[c.value]), $ = v(() => z(k.value));
|
|
2795
2807
|
function z(_) {
|
|
2796
2808
|
if (_)
|
|
2797
2809
|
return typeof _ == "string" || typeof _ == "symbol" || typeof _ == "number" ? _ : _.label;
|
|
@@ -2801,22 +2813,22 @@ const oo = /* @__PURE__ */ x({
|
|
|
2801
2813
|
return typeof _ == "string" || typeof _ == "symbol" || typeof _ == "number" ? _ : _.id;
|
|
2802
2814
|
}
|
|
2803
2815
|
te("ArrowDown", (_) => {
|
|
2804
|
-
l.value && (_.preventDefault(), f.value = (f.value + 1) %
|
|
2816
|
+
l.value && (_.preventDefault(), f.value = (f.value + 1) % m.length);
|
|
2805
2817
|
}), te("ArrowUp", (_) => {
|
|
2806
|
-
l.value && (_.preventDefault(), f.value = (f.value - 1 +
|
|
2818
|
+
l.value && (_.preventDefault(), f.value = (f.value - 1 + m.length) % m.length);
|
|
2807
2819
|
}), te("Enter", () => {
|
|
2808
|
-
l.value && f.value !== -1 && (o.value = E(
|
|
2820
|
+
l.value && f.value !== -1 && (o.value = E(m[f.value]), l.value = !1);
|
|
2809
2821
|
});
|
|
2810
|
-
function
|
|
2822
|
+
function pe(_) {
|
|
2811
2823
|
if (!l.value) {
|
|
2812
2824
|
l.value = !0;
|
|
2813
2825
|
return;
|
|
2814
2826
|
}
|
|
2815
2827
|
o.value = E(_), l.value = !1;
|
|
2816
2828
|
}
|
|
2817
|
-
const Se =
|
|
2829
|
+
const Se = v(() => ({
|
|
2818
2830
|
input: "container-base focus:border-primary-container"
|
|
2819
|
-
})), Me =
|
|
2831
|
+
})), Me = v(() => {
|
|
2820
2832
|
switch (r.size) {
|
|
2821
2833
|
case "sm":
|
|
2822
2834
|
return {
|
|
@@ -2835,48 +2847,48 @@ const oo = /* @__PURE__ */ x({
|
|
|
2835
2847
|
};
|
|
2836
2848
|
}
|
|
2837
2849
|
});
|
|
2838
|
-
return (_,
|
|
2850
|
+
return (_, me) => (h(), b("div", {
|
|
2839
2851
|
ref_key: "wrapperRef",
|
|
2840
2852
|
ref: i,
|
|
2841
2853
|
class: "r-select-wrapper relative"
|
|
2842
2854
|
}, [
|
|
2843
|
-
w("div",
|
|
2855
|
+
w("div", Tn, [
|
|
2844
2856
|
w("input", {
|
|
2845
2857
|
ref_key: "inputRef",
|
|
2846
2858
|
ref: s,
|
|
2847
|
-
class: y([[
|
|
2859
|
+
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
2860
|
placeholder: _.placeholder,
|
|
2849
|
-
style:
|
|
2861
|
+
style: T([u(a).style]),
|
|
2850
2862
|
readonly: "",
|
|
2851
|
-
value:
|
|
2863
|
+
value: u($),
|
|
2852
2864
|
"aria-haspopup": "listbox",
|
|
2853
2865
|
autocomplete: "off",
|
|
2854
|
-
onFocus:
|
|
2855
|
-
}, null, 46,
|
|
2856
|
-
|
|
2866
|
+
onFocus: me[0] || (me[0] = (C) => l.value = !0)
|
|
2867
|
+
}, null, 46, zn),
|
|
2868
|
+
En
|
|
2857
2869
|
]),
|
|
2858
|
-
|
|
2870
|
+
u(l) ? (h(), b("div", {
|
|
2859
2871
|
key: 0,
|
|
2860
|
-
class: y([
|
|
2872
|
+
class: y([u(Me).dropdown, "absolute z-10 mt-2 w-full flex-col overflow-hidden border container-base rounded p-1"])
|
|
2861
2873
|
}, [
|
|
2862
|
-
|
|
2863
|
-
key: E(
|
|
2874
|
+
u(m).length === 0 ? (h(), b("div", Rn, re(_.noneText), 1)) : (h(!0), b(K, { key: 1 }, we(u(m), (C, R) => (h(), b("div", {
|
|
2875
|
+
key: E(C),
|
|
2864
2876
|
class: y([{
|
|
2865
|
-
"hover:bg-surface-high border-transparent":
|
|
2866
|
-
"container-filled-primary":
|
|
2877
|
+
"hover:bg-surface-high border-transparent": u(f) !== R,
|
|
2878
|
+
"container-filled-primary": u(f) === R
|
|
2867
2879
|
}, "flex cursor-pointer items-center justify-between gap-2 border rounded p-1 px-2"]),
|
|
2868
|
-
onPointerdown: (B) =>
|
|
2880
|
+
onPointerdown: (B) => pe(C),
|
|
2869
2881
|
onHover: (B) => d.value = R
|
|
2870
2882
|
}, [
|
|
2871
|
-
Ot(
|
|
2872
|
-
|
|
2873
|
-
], 42,
|
|
2874
|
-
], 2)) :
|
|
2883
|
+
Ot(re(z(C)) + " ", 1),
|
|
2884
|
+
C === u(k) ? (h(), b("div", On, Nn)) : A("", !0)
|
|
2885
|
+
], 42, Bn))), 128))
|
|
2886
|
+
], 2)) : A("", !0)
|
|
2875
2887
|
], 512));
|
|
2876
2888
|
}
|
|
2877
|
-
}),
|
|
2889
|
+
}), Pn = { class: "relative inline-block w-full" }, co = /* @__PURE__ */ x({
|
|
2878
2890
|
__name: "Slider",
|
|
2879
|
-
props: /* @__PURE__ */
|
|
2891
|
+
props: /* @__PURE__ */ W({
|
|
2880
2892
|
size: { default: "md" },
|
|
2881
2893
|
animate: { type: Boolean, default: !1 },
|
|
2882
2894
|
width: {},
|
|
@@ -2896,25 +2908,25 @@ const oo = /* @__PURE__ */ x({
|
|
|
2896
2908
|
emits: ["update:modelValue"],
|
|
2897
2909
|
setup(e) {
|
|
2898
2910
|
const t = e;
|
|
2899
|
-
function r(
|
|
2911
|
+
function r(C, R, B) {
|
|
2900
2912
|
const I = [];
|
|
2901
|
-
for (let Y =
|
|
2913
|
+
for (let Y = C; Y <= R; Y += B)
|
|
2902
2914
|
I.push(Y);
|
|
2903
2915
|
return I[I.length - 1] !== R && I.push(R), I;
|
|
2904
2916
|
}
|
|
2905
|
-
function n(
|
|
2917
|
+
function n(C, R) {
|
|
2906
2918
|
const B = [];
|
|
2907
2919
|
B.push(R[0]);
|
|
2908
|
-
const I = (R.length - 1) / (
|
|
2909
|
-
for (let Y = 1; Y <
|
|
2920
|
+
const I = (R.length - 1) / (C - 1);
|
|
2921
|
+
for (let Y = 1; Y < C - 1; Y++)
|
|
2910
2922
|
B.push(R[Math.round(Y * I)]);
|
|
2911
2923
|
return B.push(R[R.length - 1]), B;
|
|
2912
2924
|
}
|
|
2913
|
-
const a =
|
|
2914
|
-
function d(
|
|
2915
|
-
return o.value.indexOf(
|
|
2925
|
+
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 = j(e, "modelValue"), l = v(() => o.value.length ?? 0), c = g(o.value.includes(i.value) ? o.value.indexOf(i.value) : 0);
|
|
2926
|
+
function d(C) {
|
|
2927
|
+
return o.value.indexOf(C);
|
|
2916
2928
|
}
|
|
2917
|
-
const f =
|
|
2929
|
+
const f = v(() => {
|
|
2918
2930
|
switch (t.color) {
|
|
2919
2931
|
case "primary":
|
|
2920
2932
|
return "bg-primary-container";
|
|
@@ -2925,7 +2937,7 @@ const oo = /* @__PURE__ */ x({
|
|
|
2925
2937
|
case "error":
|
|
2926
2938
|
return "bg-error-container";
|
|
2927
2939
|
}
|
|
2928
|
-
}),
|
|
2940
|
+
}), m = v(() => `dark:bg-white bg-${t.color}-container`), k = v(() => {
|
|
2929
2941
|
switch (t.color) {
|
|
2930
2942
|
case "primary":
|
|
2931
2943
|
return "dark:bg-primary-container bg-white";
|
|
@@ -2937,39 +2949,39 @@ const oo = /* @__PURE__ */ x({
|
|
|
2937
2949
|
return "dark:bg-error-container bg-white";
|
|
2938
2950
|
}
|
|
2939
2951
|
});
|
|
2940
|
-
|
|
2941
|
-
i.value = o.value[
|
|
2952
|
+
X(() => {
|
|
2953
|
+
i.value = o.value[c.value];
|
|
2942
2954
|
});
|
|
2943
|
-
const
|
|
2944
|
-
function Se(
|
|
2945
|
-
if (!
|
|
2955
|
+
const $ = g(), z = g(), E = Kt($), pe = g(!1);
|
|
2956
|
+
function Se(C) {
|
|
2957
|
+
if (!pe.value)
|
|
2946
2958
|
return;
|
|
2947
|
-
if (!(
|
|
2948
|
-
|
|
2959
|
+
if (!(C.buttons === 1)) {
|
|
2960
|
+
pe.value = !1;
|
|
2949
2961
|
return;
|
|
2950
2962
|
}
|
|
2951
|
-
|
|
2952
|
-
const { clientX: B } =
|
|
2963
|
+
C.preventDefault(), C.stopPropagation();
|
|
2964
|
+
const { clientX: B } = C, I = E.left.value, xt = E.right.value - I, Be = Math.round((B - I) / xt * (l.value - 1));
|
|
2953
2965
|
if (Be < 0) {
|
|
2954
|
-
|
|
2966
|
+
c.value = 0;
|
|
2955
2967
|
return;
|
|
2956
2968
|
}
|
|
2957
2969
|
if (Be > l.value - 1) {
|
|
2958
|
-
|
|
2970
|
+
c.value = l.value - 1;
|
|
2959
2971
|
return;
|
|
2960
2972
|
}
|
|
2961
|
-
|
|
2973
|
+
c.value = Be;
|
|
2962
2974
|
}
|
|
2963
|
-
|
|
2964
|
-
|
|
2975
|
+
X(() => {
|
|
2976
|
+
c.value = d(i.value);
|
|
2965
2977
|
});
|
|
2966
|
-
function Me(
|
|
2967
|
-
|
|
2978
|
+
function Me(C) {
|
|
2979
|
+
C.preventDefault(), C.stopPropagation(), pe.value = !0, Se(C);
|
|
2968
2980
|
}
|
|
2969
|
-
N(
|
|
2970
|
-
N(document, "pointermove", Se),
|
|
2981
|
+
N($, "pointerdown", Me), ee(() => {
|
|
2982
|
+
N(document, "pointermove", Se), c.value = Math.max(0, d(i.value));
|
|
2971
2983
|
});
|
|
2972
|
-
const _ =
|
|
2984
|
+
const _ = v(() => {
|
|
2973
2985
|
switch (t.size) {
|
|
2974
2986
|
case "sm":
|
|
2975
2987
|
return {
|
|
@@ -3002,56 +3014,56 @@ const oo = /* @__PURE__ */ x({
|
|
|
3002
3014
|
progress: "-mx-1.5"
|
|
3003
3015
|
};
|
|
3004
3016
|
}
|
|
3005
|
-
}),
|
|
3017
|
+
}), me = v(() => t.animate ? {
|
|
3006
3018
|
indicator: "transition-left",
|
|
3007
3019
|
progress: "transition-width"
|
|
3008
3020
|
} : {
|
|
3009
3021
|
indicator: "",
|
|
3010
3022
|
progress: ""
|
|
3011
3023
|
});
|
|
3012
|
-
return (
|
|
3024
|
+
return (C, R) => (h(), b("div", Pn, [
|
|
3013
3025
|
w("div", {
|
|
3014
3026
|
ref_key: "wrapper",
|
|
3015
|
-
ref:
|
|
3027
|
+
ref: $,
|
|
3016
3028
|
type: "size",
|
|
3017
|
-
class: y(["w-full flex cursor-pointer items-center",
|
|
3018
|
-
onTouchmove: R[0] || (R[0] =
|
|
3029
|
+
class: y(["w-full flex cursor-pointer items-center", u(_).wrapper]),
|
|
3030
|
+
onTouchmove: R[0] || (R[0] = st(() => {
|
|
3019
3031
|
}, ["prevent"]))
|
|
3020
3032
|
}, [
|
|
3021
3033
|
w("div", {
|
|
3022
|
-
class: y(["w-full rounded-full bg-surface-lowest transition-background-color,border-color,color",
|
|
3034
|
+
class: y(["w-full rounded-full bg-surface-lowest transition-background-color,border-color,color", u(_).innerWrapper])
|
|
3023
3035
|
}, [
|
|
3024
3036
|
w("div", {
|
|
3025
|
-
class: y(["relative flex",
|
|
3026
|
-
style:
|
|
3037
|
+
class: y(["relative flex", u(_).content]),
|
|
3038
|
+
style: T({
|
|
3027
3039
|
width: `${t.width}rem`,
|
|
3028
3040
|
minWidth: `${t.minWidth}rem`
|
|
3029
3041
|
})
|
|
3030
3042
|
}, [
|
|
3031
|
-
(h(!0), b(K, null,
|
|
3043
|
+
(h(!0), b(K, null, we(u(s), (B) => (h(), b("div", {
|
|
3032
3044
|
key: B,
|
|
3033
|
-
style:
|
|
3034
|
-
left: `${d(B) / (
|
|
3045
|
+
style: T({
|
|
3046
|
+
left: `${d(B) / (u(l) - 1) * 100}%`
|
|
3035
3047
|
}),
|
|
3036
|
-
class: y(["absolute top-50% rounded-full bg-white",
|
|
3048
|
+
class: y(["absolute top-50% rounded-full bg-white", u(_).tick])
|
|
3037
3049
|
}, null, 6))), 128)),
|
|
3038
|
-
c
|
|
3050
|
+
u(c) !== -1 ? (h(), b("div", {
|
|
3039
3051
|
key: 0,
|
|
3040
3052
|
ref_key: "indicator",
|
|
3041
3053
|
ref: z,
|
|
3042
|
-
class: y(["absolute top-50% cursor-pointer rounded-full transition-background-color,border-color,color", [
|
|
3043
|
-
style:
|
|
3044
|
-
left: `${c
|
|
3054
|
+
class: y(["absolute top-50% cursor-pointer rounded-full transition-background-color,border-color,color", [u(_).indicator, u(me).indicator, u(m)]]),
|
|
3055
|
+
style: T({
|
|
3056
|
+
left: `${u(c) / (u(l) - 1) * 100}%`
|
|
3045
3057
|
})
|
|
3046
3058
|
}, [
|
|
3047
3059
|
w("div", {
|
|
3048
|
-
class: y(["pointer-events-none absolute left-50% top-50% rounded-full transition-background-color,border-color,color", [
|
|
3060
|
+
class: y(["pointer-events-none absolute left-50% top-50% rounded-full transition-background-color,border-color,color", [u(_).indicatorInner, u(k)]])
|
|
3049
3061
|
}, null, 2)
|
|
3050
|
-
], 6)) :
|
|
3062
|
+
], 6)) : A("", !0),
|
|
3051
3063
|
w("div", {
|
|
3052
|
-
class: y(["pointer-events-none h-full rounded-full", [
|
|
3053
|
-
style:
|
|
3054
|
-
width: `${c
|
|
3064
|
+
class: y(["pointer-events-none h-full rounded-full", [u(_).progress, u(me).progress, u(f)]]),
|
|
3065
|
+
style: T({
|
|
3066
|
+
width: `${u(c) / (u(l) - 1) * 100}%`
|
|
3055
3067
|
})
|
|
3056
3068
|
}, null, 6)
|
|
3057
3069
|
], 6)
|
|
@@ -3059,66 +3071,66 @@ const oo = /* @__PURE__ */ x({
|
|
|
3059
3071
|
], 34),
|
|
3060
3072
|
w("div", {
|
|
3061
3073
|
class: "relative mx-1 h-1em text-xs text-surface-onlow",
|
|
3062
|
-
style:
|
|
3074
|
+
style: T({
|
|
3063
3075
|
width: `${t.width}rem`
|
|
3064
3076
|
})
|
|
3065
3077
|
}, [
|
|
3066
|
-
(h(!0), b(K, null,
|
|
3078
|
+
(h(!0), b(K, null, we(u(s), (B, I) => (h(), b("div", {
|
|
3067
3079
|
key: I,
|
|
3068
|
-
style:
|
|
3069
|
-
left: `${d(B) / (
|
|
3080
|
+
style: T({
|
|
3081
|
+
left: `${d(B) / (u(l) - 1) * 100}%`
|
|
3070
3082
|
}),
|
|
3071
|
-
class: y(["absolute w-auto flex rounded-full -translate-x-50%",
|
|
3072
|
-
},
|
|
3083
|
+
class: y(["absolute w-auto flex rounded-full -translate-x-50%", u(_).tick])
|
|
3084
|
+
}, re(B), 7))), 128))
|
|
3073
3085
|
], 4)
|
|
3074
3086
|
]));
|
|
3075
3087
|
}
|
|
3076
|
-
}),
|
|
3088
|
+
}), In = { class: "h-full py-2" }, uo = /* @__PURE__ */ x({
|
|
3077
3089
|
__name: "TabItem",
|
|
3078
3090
|
props: {
|
|
3079
3091
|
value: {},
|
|
3080
3092
|
color: { default: "primary" }
|
|
3081
3093
|
},
|
|
3082
3094
|
setup(e) {
|
|
3083
|
-
const t = e, r =
|
|
3095
|
+
const t = e, r = ge(wt, g("")), n = ge(_t, v(() => "horizontal")), a = v(() => r.value === t.value);
|
|
3084
3096
|
function o() {
|
|
3085
3097
|
r.value = t.value;
|
|
3086
3098
|
}
|
|
3087
|
-
const s =
|
|
3099
|
+
const s = v(() => {
|
|
3088
3100
|
switch (n.value) {
|
|
3089
3101
|
case "horizontal":
|
|
3090
3102
|
return "flex-col";
|
|
3091
3103
|
case "vertical":
|
|
3092
3104
|
return "flex-row-reverse";
|
|
3093
3105
|
}
|
|
3094
|
-
}), i =
|
|
3106
|
+
}), i = v(() => {
|
|
3095
3107
|
switch (n.value) {
|
|
3096
3108
|
case "horizontal":
|
|
3097
3109
|
return "absolute inset-0 top-100% h-2px w-full transition-background-color,border-color,color";
|
|
3098
3110
|
case "vertical":
|
|
3099
3111
|
return "absolute inset-0 right-100% h-full w-2px bg-primary-container transition-background-color,border-color,color";
|
|
3100
3112
|
}
|
|
3101
|
-
}), l =
|
|
3102
|
-
return (
|
|
3113
|
+
}), l = v(() => a.value ? "bg-primary-container" : "bg-surface-lowest");
|
|
3114
|
+
return (c, d) => (h(), b("button", {
|
|
3103
3115
|
type: "button",
|
|
3104
|
-
class: y(["relative min-w-20 flex items-center justify-center", [
|
|
3116
|
+
class: y(["relative min-w-20 flex items-center justify-center", [u(s)]]),
|
|
3105
3117
|
onClick: o
|
|
3106
3118
|
}, [
|
|
3107
|
-
|
|
3119
|
+
u(a) ? (h(), b("div", {
|
|
3108
3120
|
key: 0,
|
|
3109
|
-
class: y([
|
|
3121
|
+
class: y([u(i), u(l)])
|
|
3110
3122
|
}, null, 2)) : (h(), b("div", {
|
|
3111
3123
|
key: 1,
|
|
3112
|
-
class: y([
|
|
3124
|
+
class: y([u(i), u(l)])
|
|
3113
3125
|
}, null, 2)),
|
|
3114
|
-
w("div",
|
|
3115
|
-
|
|
3126
|
+
w("div", In, [
|
|
3127
|
+
S(c.$slots, "default")
|
|
3116
3128
|
])
|
|
3117
3129
|
], 2));
|
|
3118
3130
|
}
|
|
3119
|
-
}),
|
|
3131
|
+
}), fo = /* @__PURE__ */ x({
|
|
3120
3132
|
__name: "Tabs",
|
|
3121
|
-
props: /* @__PURE__ */
|
|
3133
|
+
props: /* @__PURE__ */ W({
|
|
3122
3134
|
defaultValue: {},
|
|
3123
3135
|
direction: { default: "horizontal" }
|
|
3124
3136
|
}, {
|
|
@@ -3127,19 +3139,19 @@ const oo = /* @__PURE__ */ x({
|
|
|
3127
3139
|
}),
|
|
3128
3140
|
emits: ["update:modelValue"],
|
|
3129
3141
|
setup(e) {
|
|
3130
|
-
const t = e, r =
|
|
3131
|
-
var
|
|
3132
|
-
const i = (
|
|
3142
|
+
const t = e, r = at(), n = v(() => {
|
|
3143
|
+
var c;
|
|
3144
|
+
const i = (c = r.default) == null ? void 0 : c.call(r);
|
|
3133
3145
|
return (i == null ? void 0 : i.flatMap((d) => d.type === K ? d.children : d).filter((d) => {
|
|
3134
3146
|
var f;
|
|
3135
3147
|
return ((f = d == null ? void 0 : d.props) == null ? void 0 : f.value) !== void 0;
|
|
3136
3148
|
}).map((d) => d.props.value)) ?? [];
|
|
3137
|
-
}), a =
|
|
3149
|
+
}), a = j(e, "modelValue");
|
|
3138
3150
|
!a.value && n.value.length > 0 && (a.value = n.value[0]), ee(() => {
|
|
3139
3151
|
t.defaultValue && (a.value = t.defaultValue);
|
|
3140
|
-
}),
|
|
3141
|
-
const o =
|
|
3142
|
-
|
|
3152
|
+
}), ye(wt, a);
|
|
3153
|
+
const o = v(() => t.direction);
|
|
3154
|
+
ye(_t, o), te("left", () => {
|
|
3143
3155
|
if (t.direction !== "horizontal")
|
|
3144
3156
|
return;
|
|
3145
3157
|
const i = a.value ? n.value.indexOf(a.value) : 0;
|
|
@@ -3160,7 +3172,7 @@ const oo = /* @__PURE__ */ x({
|
|
|
3160
3172
|
const i = a.value ? n.value.indexOf(a.value) : 0;
|
|
3161
3173
|
i < n.value.length - 1 ? a.value = n.value[i + 1] : a.value = n.value[0];
|
|
3162
3174
|
});
|
|
3163
|
-
const s =
|
|
3175
|
+
const s = v(() => {
|
|
3164
3176
|
switch (t.direction) {
|
|
3165
3177
|
case "horizontal":
|
|
3166
3178
|
return "flex-row";
|
|
@@ -3169,58 +3181,58 @@ const oo = /* @__PURE__ */ x({
|
|
|
3169
3181
|
}
|
|
3170
3182
|
});
|
|
3171
3183
|
return (i, l) => (h(), b("div", {
|
|
3172
|
-
class: y(["flex", [
|
|
3184
|
+
class: y(["flex", [u(s)]])
|
|
3173
3185
|
}, [
|
|
3174
|
-
|
|
3186
|
+
S(i.$slots, "default")
|
|
3175
3187
|
], 2));
|
|
3176
3188
|
}
|
|
3177
3189
|
});
|
|
3178
3190
|
export {
|
|
3179
|
-
|
|
3191
|
+
Dn as AspectRatio,
|
|
3180
3192
|
Ht as Avatar,
|
|
3181
|
-
|
|
3182
|
-
|
|
3183
|
-
|
|
3184
|
-
|
|
3185
|
-
|
|
3186
|
-
|
|
3193
|
+
lt as Btn,
|
|
3194
|
+
Fn as ChatContainer,
|
|
3195
|
+
Ln as ChatMessage,
|
|
3196
|
+
Wn as ChatSystem,
|
|
3197
|
+
jn as Chip,
|
|
3198
|
+
Gn as ColorInput,
|
|
3187
3199
|
ir as ColorSwatch,
|
|
3188
|
-
|
|
3189
|
-
|
|
3190
|
-
|
|
3191
|
-
|
|
3192
|
-
|
|
3193
|
-
|
|
3200
|
+
qn as Drawer,
|
|
3201
|
+
Xn as Dropzone,
|
|
3202
|
+
ft as FullscreenOverlay,
|
|
3203
|
+
Yn as Image,
|
|
3204
|
+
Zn as Indicator,
|
|
3205
|
+
Kn as Modal,
|
|
3194
3206
|
Yr as Notification,
|
|
3195
|
-
|
|
3196
|
-
|
|
3197
|
-
|
|
3198
|
-
|
|
3199
|
-
|
|
3200
|
-
|
|
3201
|
-
|
|
3202
|
-
|
|
3203
|
-
|
|
3204
|
-
|
|
3205
|
-
|
|
3206
|
-
|
|
3207
|
-
|
|
3208
|
-
|
|
3207
|
+
Qn as NotificationSystem,
|
|
3208
|
+
oo as Notifications,
|
|
3209
|
+
Jn as Overlay,
|
|
3210
|
+
eo as Paper,
|
|
3211
|
+
to as PinInput,
|
|
3212
|
+
ro as Progress,
|
|
3213
|
+
so as RokuProvider,
|
|
3214
|
+
lo as SchemeSwitch,
|
|
3215
|
+
io as Select,
|
|
3216
|
+
co as Slider,
|
|
3217
|
+
$n as Switch,
|
|
3218
|
+
uo as TabItem,
|
|
3219
|
+
fo as Tabs,
|
|
3220
|
+
bn as TextField,
|
|
3209
3221
|
Vr as ThemeProvider,
|
|
3210
3222
|
Ie as darkTheme,
|
|
3211
|
-
|
|
3212
|
-
|
|
3213
|
-
|
|
3214
|
-
|
|
3215
|
-
|
|
3216
|
-
|
|
3217
|
-
|
|
3218
|
-
|
|
3223
|
+
_t as directionSymbol,
|
|
3224
|
+
ao as generateColors,
|
|
3225
|
+
xn as generateColorsMap,
|
|
3226
|
+
yn as lightTheme,
|
|
3227
|
+
no as notificationsSymbol,
|
|
3228
|
+
dt as schemeSymbol,
|
|
3229
|
+
wt as tabCurrentSymbol,
|
|
3230
|
+
gt as themeColors,
|
|
3219
3231
|
Or as useCurrentTheme,
|
|
3220
|
-
|
|
3221
|
-
|
|
3222
|
-
|
|
3232
|
+
Un as useCurrentThemeScheme,
|
|
3233
|
+
Fe as useId,
|
|
3234
|
+
wn as useNotifications,
|
|
3223
3235
|
Br as useRootTheme,
|
|
3224
3236
|
Hr as useScheme,
|
|
3225
|
-
|
|
3237
|
+
ut as useThemeStyles
|
|
3226
3238
|
};
|