@toife/vue 2.0.21 → 2.0.22
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/t-sheet.vue.d.ts +0 -2
- package/dist/components/t-tabs.vue.d.ts +1 -1
- package/dist/index.css +1 -1
- package/dist/index.es.js +211 -212
- package/dist/index.umd.js +1 -1
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { createElementBlock as p, openBlock as i, renderSlot as g, defineComponent as h, ref as m, computed as w, reactive as ue, watch as W, onMounted as U, Fragment as q, withDirectives as F, createCommentVNode as I, normalizeStyle as T, normalizeClass as
|
|
1
|
+
import { createElementBlock as p, openBlock as i, renderSlot as g, defineComponent as h, ref as m, computed as w, reactive as ue, watch as W, onMounted as U, Fragment as q, withDirectives as F, createCommentVNode as I, normalizeStyle as T, normalizeClass as B, vShow as K, createElementVNode as $, createVNode as j, createBlock as V, withCtx as P, toDisplayString as A, renderList as G, createTextVNode as M, createApp as J, h as Q, provide as de, unref as O, onUnmounted as re, resolveDynamicComponent as ke, markRaw as $e, inject as pe, useAttrs as xe, nextTick as ce } from "vue";
|
|
2
2
|
import { gesture as ae } from "@toife/gesture";
|
|
3
3
|
import { useRouter as fe, useRoute as we } from "vue-router";
|
|
4
|
-
const Te = (t) => t && (t.tagName == "INPUT" || t.tagName == "TEXTAREA" || t.isContentEditable),
|
|
4
|
+
const Te = (t) => t && (t.tagName == "INPUT" || t.tagName == "TEXTAREA" || t.isContentEditable), Se = () => {
|
|
5
5
|
const t = document.activeElement;
|
|
6
6
|
t && (t.tagName === "INPUT" || t.tagName === "TEXTAREA" || t.isContentEditable) && t.blur();
|
|
7
|
-
},
|
|
7
|
+
}, Be = () => {
|
|
8
8
|
document.addEventListener("contextmenu", (t) => t.preventDefault()), document.addEventListener("pointerup", (t) => {
|
|
9
|
-
!Te(t.target) &&
|
|
9
|
+
!Te(t.target) && Se();
|
|
10
10
|
}), "virtualKeyboard" in navigator && (navigator.virtualKeyboard.overlaysContent = !0);
|
|
11
11
|
}, _ = (t, o) => {
|
|
12
12
|
const e = t.__vccOpts || t;
|
|
13
|
-
for (const [s,
|
|
14
|
-
e[s] =
|
|
13
|
+
for (const [s, n] of o)
|
|
14
|
+
e[s] = n;
|
|
15
15
|
return e;
|
|
16
16
|
}, ze = {}, Ce = { class: "t-app" };
|
|
17
17
|
function Ie(t, o) {
|
|
@@ -33,18 +33,18 @@ const Ee = /* @__PURE__ */ _(ze, [["render", Ie]]), Ve = /* @__PURE__ */ h({
|
|
|
33
33
|
},
|
|
34
34
|
emits: ["dismiss"],
|
|
35
35
|
setup(t, { expose: o, emit: e }) {
|
|
36
|
-
const s = m(0),
|
|
36
|
+
const s = m(0), n = m(!1), l = m(), u = m(), r = t, v = e, y = w(() => n.value || r.keepalive), d = m(!1), a = ue({
|
|
37
37
|
"--t-present-backdrop-opacity": "0.4",
|
|
38
38
|
"--t-present-transition": "0.2s",
|
|
39
39
|
"--t-present-content-transform": "0px",
|
|
40
40
|
"--t-present-content-opacity": "1"
|
|
41
|
-
}), c = w(() =>
|
|
42
|
-
|
|
41
|
+
}), c = w(() => r.duration / 1e3 + "s"), f = (x) => {
|
|
42
|
+
r.backdrop ? x?.backdropOpacity && (a["--t-present-backdrop-opacity"] = x.backdropOpacity) : a["--t-present-backdrop-opacity"] = "0", x?.transition && (a["--t-present-transition"] = x.transition), x?.contentTransform && (a["--t-present-content-transform"] = x.contentTransform), x?.contentOpacity && (a["--t-present-content-opacity"] = x.contentOpacity);
|
|
43
43
|
}, k = () => {
|
|
44
|
-
if (
|
|
44
|
+
if (r.bounce !== void 0 && !d.value) {
|
|
45
45
|
d.value = !0;
|
|
46
|
-
let x =
|
|
47
|
-
(
|
|
46
|
+
let x = r.bounce;
|
|
47
|
+
(r.placement == "bottom" || r.placement == "right") && (x = `calc(${r.bounce} * -1)`), f({
|
|
48
48
|
contentTransform: x,
|
|
49
49
|
transition: c.value,
|
|
50
50
|
backdropOpacity: "0.4",
|
|
@@ -53,7 +53,7 @@ const Ee = /* @__PURE__ */ _(ze, [["render", Ie]]), Ve = /* @__PURE__ */ h({
|
|
|
53
53
|
f({
|
|
54
54
|
contentTransform: "0px"
|
|
55
55
|
});
|
|
56
|
-
},
|
|
56
|
+
}, r.duration);
|
|
57
57
|
} else
|
|
58
58
|
f({
|
|
59
59
|
contentTransform: "0px",
|
|
@@ -63,18 +63,18 @@ const Ee = /* @__PURE__ */ _(ze, [["render", Ie]]), Ve = /* @__PURE__ */ h({
|
|
|
63
63
|
});
|
|
64
64
|
}, b = () => {
|
|
65
65
|
let x = "0px", se = "1";
|
|
66
|
-
|
|
66
|
+
r.placement == "bottom" || r.placement == "right" ? x = "100%" : r.placement == "top" || r.placement == "left" ? x = "-100%" : r.placement == "center" && (x = "0px", se = "0"), f({
|
|
67
67
|
contentTransform: x,
|
|
68
68
|
transition: c.value,
|
|
69
69
|
contentOpacity: se,
|
|
70
70
|
backdropOpacity: "0"
|
|
71
71
|
});
|
|
72
72
|
};
|
|
73
|
-
W(() =>
|
|
74
|
-
|
|
73
|
+
W(() => r.visible, () => {
|
|
74
|
+
r.visible ? (d.value = !1, n.value = !0, s.value = Ke.getNewIndex(), setTimeout(() => {
|
|
75
75
|
k();
|
|
76
76
|
}, 50)) : (b(), setTimeout(() => {
|
|
77
|
-
|
|
77
|
+
n.value = !1;
|
|
78
78
|
}, 200));
|
|
79
79
|
}), o({
|
|
80
80
|
render: f,
|
|
@@ -85,18 +85,18 @@ const Ee = /* @__PURE__ */ _(ze, [["render", Ie]]), Ve = /* @__PURE__ */ h({
|
|
|
85
85
|
x.preventDefault(), v("dismiss", "backdrop");
|
|
86
86
|
};
|
|
87
87
|
return U(() => {
|
|
88
|
-
|
|
88
|
+
r.visible ? k() : b();
|
|
89
89
|
}), (x, se) => (i(), p(q, null, [
|
|
90
90
|
y.value ? F((i(), p("div", {
|
|
91
91
|
key: 0,
|
|
92
|
-
class:
|
|
92
|
+
class: B(["t-present", [{ [x.placement]: !0 }, r.class]]),
|
|
93
93
|
ref_key: "present",
|
|
94
94
|
ref: u,
|
|
95
|
-
style: T([a, { zIndex: s.value },
|
|
95
|
+
style: T([a, { zIndex: s.value }, r.style])
|
|
96
96
|
}, [
|
|
97
97
|
g(x.$slots, "default", {}, void 0, !0)
|
|
98
98
|
], 6)), [
|
|
99
|
-
[K,
|
|
99
|
+
[K, n.value]
|
|
100
100
|
]) : I("", !0),
|
|
101
101
|
y.value ? F((i(), p("div", {
|
|
102
102
|
key: 1,
|
|
@@ -104,9 +104,9 @@ const Ee = /* @__PURE__ */ _(ze, [["render", Ie]]), Ve = /* @__PURE__ */ h({
|
|
|
104
104
|
onClick: N,
|
|
105
105
|
ref_key: "backdrop",
|
|
106
106
|
ref: l,
|
|
107
|
-
style: T([a, { zIndex: s.value - 1 },
|
|
107
|
+
style: T([a, { zIndex: s.value - 1 }, r.style])
|
|
108
108
|
}, null, 4)), [
|
|
109
|
-
[K,
|
|
109
|
+
[K, n.value]
|
|
110
110
|
]) : I("", !0)
|
|
111
111
|
], 64));
|
|
112
112
|
}
|
|
@@ -190,8 +190,8 @@ const Ee = /* @__PURE__ */ _(ze, [["render", Ie]]), Ve = /* @__PURE__ */ h({
|
|
|
190
190
|
"--background": "transparent"
|
|
191
191
|
}), s;
|
|
192
192
|
});
|
|
193
|
-
return (s,
|
|
194
|
-
class:
|
|
193
|
+
return (s, n) => (i(), p("button", {
|
|
194
|
+
class: B(["t-button", { "active-background": o.activeBackground, rounded: o.rounded, block: o.block, ["size-" + o.size]: !0 }]),
|
|
195
195
|
style: T(e.value)
|
|
196
196
|
}, [
|
|
197
197
|
F($("span", Re, [
|
|
@@ -220,13 +220,13 @@ const Ee = /* @__PURE__ */ _(ze, [["render", Ie]]), Ve = /* @__PURE__ */ h({
|
|
|
220
220
|
},
|
|
221
221
|
emits: ["dismiss"],
|
|
222
222
|
setup(t, { expose: o, emit: e }) {
|
|
223
|
-
const s = t,
|
|
224
|
-
|
|
223
|
+
const s = t, n = m(!1), l = e, u = m(), r = m(!1), v = () => {
|
|
224
|
+
n.value = !0;
|
|
225
225
|
}, y = (a) => {
|
|
226
|
-
|
|
226
|
+
n.value = !1, a.handler && a.handler(), l("dismiss", "choose", a?.data);
|
|
227
227
|
}, d = (a) => {
|
|
228
|
-
s.dismiss && s.dismiss.includes(a) ? (
|
|
229
|
-
|
|
228
|
+
s.dismiss && s.dismiss.includes(a) ? (n.value = !1, l("dismiss", a)) : a == "backdrop" && (r.value = !0, setTimeout(() => {
|
|
229
|
+
r.value = !1;
|
|
230
230
|
}, 300));
|
|
231
231
|
};
|
|
232
232
|
return o({
|
|
@@ -235,12 +235,12 @@ const Ee = /* @__PURE__ */ _(ze, [["render", Ie]]), Ve = /* @__PURE__ */ h({
|
|
|
235
235
|
placement: "center",
|
|
236
236
|
backdrop: !0,
|
|
237
237
|
keepalive: !1,
|
|
238
|
-
visible:
|
|
238
|
+
visible: n.value,
|
|
239
239
|
onDismiss: d
|
|
240
240
|
}, {
|
|
241
241
|
default: P(() => [
|
|
242
242
|
$("div", {
|
|
243
|
-
class:
|
|
243
|
+
class: B(["t-alert", { pop: r.value }]),
|
|
244
244
|
ref_key: "container",
|
|
245
245
|
ref: u
|
|
246
246
|
}, [
|
|
@@ -274,23 +274,23 @@ const Ee = /* @__PURE__ */ _(ze, [["render", Ie]]), Ve = /* @__PURE__ */ h({
|
|
|
274
274
|
return new Promise((o) => {
|
|
275
275
|
let e = document.body.querySelector(".t-app");
|
|
276
276
|
if (!e) return;
|
|
277
|
-
const s = document.createElement("div"),
|
|
277
|
+
const s = document.createElement("div"), n = m();
|
|
278
278
|
e.appendChild(s);
|
|
279
279
|
const l = J({
|
|
280
280
|
render() {
|
|
281
281
|
return Q(me, {
|
|
282
282
|
...t,
|
|
283
|
-
ref:
|
|
284
|
-
onDismiss: (u,
|
|
283
|
+
ref: n,
|
|
284
|
+
onDismiss: (u, r) => {
|
|
285
285
|
setTimeout(() => {
|
|
286
286
|
l.unmount(), s.remove();
|
|
287
|
-
}, 300), o({ type: u, data:
|
|
287
|
+
}, 300), o({ type: u, data: r });
|
|
288
288
|
}
|
|
289
289
|
});
|
|
290
290
|
}
|
|
291
291
|
});
|
|
292
292
|
l.mount(s), setTimeout(() => {
|
|
293
|
-
|
|
293
|
+
n.value?.open?.();
|
|
294
294
|
}, 50);
|
|
295
295
|
});
|
|
296
296
|
}
|
|
@@ -303,13 +303,13 @@ const Ee = /* @__PURE__ */ _(ze, [["render", Ie]]), Ve = /* @__PURE__ */ h({
|
|
|
303
303
|
},
|
|
304
304
|
emits: ["dismiss"],
|
|
305
305
|
setup(t, { expose: o, emit: e }) {
|
|
306
|
-
const s = t,
|
|
307
|
-
|
|
306
|
+
const s = t, n = m(!1), l = e, u = m(), r = m(!1), v = () => {
|
|
307
|
+
n.value = !0;
|
|
308
308
|
}, y = (a) => {
|
|
309
|
-
|
|
309
|
+
n.value = !1, a.handler && a.handler(), l("dismiss", "choose", a?.data);
|
|
310
310
|
}, d = (a) => {
|
|
311
|
-
s.dismiss && s.dismiss.includes(a) ? (
|
|
312
|
-
|
|
311
|
+
s.dismiss && s.dismiss.includes(a) ? (n.value = !1, l("dismiss", a)) : a == "backdrop" && (r.value = !0, setTimeout(() => {
|
|
312
|
+
r.value = !1;
|
|
313
313
|
}, 300));
|
|
314
314
|
};
|
|
315
315
|
return W(() => s.visible, (a) => {
|
|
@@ -321,12 +321,12 @@ const Ee = /* @__PURE__ */ _(ze, [["render", Ie]]), Ve = /* @__PURE__ */ h({
|
|
|
321
321
|
placement: "bottom",
|
|
322
322
|
backdrop: !0,
|
|
323
323
|
keepalive: !1,
|
|
324
|
-
visible:
|
|
324
|
+
visible: n.value,
|
|
325
325
|
onDismiss: d
|
|
326
326
|
}, {
|
|
327
327
|
default: P(() => [
|
|
328
328
|
$("div", {
|
|
329
|
-
class:
|
|
329
|
+
class: B(["t-action", { pop: r.value }]),
|
|
330
330
|
ref_key: "container",
|
|
331
331
|
ref: u
|
|
332
332
|
}, [
|
|
@@ -354,23 +354,23 @@ const Ee = /* @__PURE__ */ _(ze, [["render", Ie]]), Ve = /* @__PURE__ */ h({
|
|
|
354
354
|
return new Promise((o) => {
|
|
355
355
|
let e = document.body.querySelector(".t-app");
|
|
356
356
|
if (!e) return;
|
|
357
|
-
const s = document.createElement("div"),
|
|
357
|
+
const s = document.createElement("div"), n = m();
|
|
358
358
|
e.appendChild(s);
|
|
359
359
|
const l = J({
|
|
360
360
|
render() {
|
|
361
361
|
return Q(Me, {
|
|
362
362
|
...t,
|
|
363
|
-
ref:
|
|
364
|
-
onDismiss: (u,
|
|
363
|
+
ref: n,
|
|
364
|
+
onDismiss: (u, r) => {
|
|
365
365
|
setTimeout(() => {
|
|
366
366
|
l.unmount(), s.remove();
|
|
367
|
-
}, 300), o({ type: u, data:
|
|
367
|
+
}, 300), o({ type: u, data: r });
|
|
368
368
|
}
|
|
369
369
|
});
|
|
370
370
|
}
|
|
371
371
|
});
|
|
372
372
|
l.mount(s), setTimeout(() => {
|
|
373
|
-
|
|
373
|
+
n.value?.open?.();
|
|
374
374
|
}, 50);
|
|
375
375
|
});
|
|
376
376
|
}
|
|
@@ -381,23 +381,23 @@ const Ee = /* @__PURE__ */ _(ze, [["render", Ie]]), Ve = /* @__PURE__ */ h({
|
|
|
381
381
|
},
|
|
382
382
|
emits: ["dismiss"],
|
|
383
383
|
setup(t, { expose: o, emit: e }) {
|
|
384
|
-
const s = t,
|
|
384
|
+
const s = t, n = m(!1);
|
|
385
385
|
return o({
|
|
386
386
|
open: () => {
|
|
387
|
-
|
|
387
|
+
n.value = !0;
|
|
388
388
|
},
|
|
389
389
|
close: () => {
|
|
390
|
-
|
|
390
|
+
n.value = !1;
|
|
391
391
|
}
|
|
392
|
-
}), (
|
|
392
|
+
}), (r, v) => (i(), V(H, {
|
|
393
393
|
placement: "center",
|
|
394
394
|
backdrop: !0,
|
|
395
395
|
keepalive: !1,
|
|
396
|
-
visible:
|
|
396
|
+
visible: n.value
|
|
397
397
|
}, {
|
|
398
398
|
default: P(() => [
|
|
399
399
|
$("div", Le, [
|
|
400
|
-
g(
|
|
400
|
+
g(r.$slots, "default", {}, () => [
|
|
401
401
|
j(Z, {
|
|
402
402
|
type: s.type
|
|
403
403
|
}, null, 8, ["type"])
|
|
@@ -407,20 +407,20 @@ const Ee = /* @__PURE__ */ _(ze, [["render", Ie]]), Ve = /* @__PURE__ */ h({
|
|
|
407
407
|
_: 3
|
|
408
408
|
}, 8, ["visible"]));
|
|
409
409
|
}
|
|
410
|
-
}), Fe = /* @__PURE__ */ _(He, [["__scopeId", "data-v-8f84c14e"]]),
|
|
410
|
+
}), Fe = /* @__PURE__ */ _(He, [["__scopeId", "data-v-8f84c14e"]]), So = (t = {}) => {
|
|
411
411
|
const o = m(), e = document.body.querySelector(".t-app");
|
|
412
|
-
let s = null,
|
|
412
|
+
let s = null, n = null;
|
|
413
413
|
return {
|
|
414
414
|
open() {
|
|
415
415
|
return new Promise((l) => {
|
|
416
|
-
e && (
|
|
416
|
+
e && (n = document.createElement("div"), e.appendChild(n), s = J({
|
|
417
417
|
render() {
|
|
418
418
|
return Q(Fe, {
|
|
419
419
|
...t,
|
|
420
420
|
ref: o
|
|
421
421
|
});
|
|
422
422
|
}
|
|
423
|
-
}), s.mount(
|
|
423
|
+
}), s.mount(n), setTimeout(() => {
|
|
424
424
|
o.value?.open?.(), l(!0);
|
|
425
425
|
}, 50));
|
|
426
426
|
});
|
|
@@ -428,7 +428,7 @@ const Ee = /* @__PURE__ */ _(ze, [["render", Ie]]), Ve = /* @__PURE__ */ h({
|
|
|
428
428
|
close() {
|
|
429
429
|
return new Promise((l) => {
|
|
430
430
|
o.value?.close?.(), setTimeout(() => {
|
|
431
|
-
s?.unmount?.(),
|
|
431
|
+
s?.unmount?.(), n?.remove?.(), l(!0);
|
|
432
432
|
}, 300);
|
|
433
433
|
});
|
|
434
434
|
}
|
|
@@ -450,8 +450,8 @@ const Ee = /* @__PURE__ */ _(ze, [["render", Ie]]), Ve = /* @__PURE__ */ h({
|
|
|
450
450
|
},
|
|
451
451
|
move(t) {
|
|
452
452
|
if (!ve.value) return;
|
|
453
|
-
const o = D(!1), e = o + "px", s = t / o * 100,
|
|
454
|
-
t > 15 && t <= o && (
|
|
453
|
+
const o = D(!1), e = o + "px", s = t / o * 100, n = z.value.target, l = E.value.target;
|
|
454
|
+
t > 15 && t <= o && (n.style.transition = "transform 0s ease", n.style.transform = `translateX(${t}px)`, l.style.transition = "transform 0s ease", document.documentElement.style.setProperty("--t-screen-backdrop-duration", "0s"), l.style.transform = `translateX(calc((${e} / 100 * 30 * -1) + ((${e} / 100 * 30) / 100 * ${s}))) scale(${0.5 + 0.5 / 100 * s}) perspective(${e}) rotateY(${30 - 30 / 100 * s}deg)`, document.documentElement.style.setProperty("--t-swipe-backdrop-opacity", `${0.5 - 0.5 / 100 * s}`));
|
|
455
455
|
},
|
|
456
456
|
back(t) {
|
|
457
457
|
if (!E.value) return;
|
|
@@ -483,8 +483,8 @@ const Ee = /* @__PURE__ */ _(ze, [["render", Ie]]), Ve = /* @__PURE__ */ h({
|
|
|
483
483
|
}, 400);
|
|
484
484
|
},
|
|
485
485
|
move(t) {
|
|
486
|
-
const o = D(!1), e = o + "px", s = t / o * 100,
|
|
487
|
-
t > 15 && t <= o && (
|
|
486
|
+
const o = D(!1), e = o + "px", s = t / o * 100, n = z.value.target, l = E.value.target;
|
|
487
|
+
t > 15 && t <= o && (n.style.transition = "transform 0s ease", n.style.transform = `translateX(${t}px)`, l.style.transition = "transform 0s ease", document.documentElement.style.setProperty("--t-screen-backdrop-duration", "0s"), l.style.transform = `translateX(calc((${e} / 100 * 30 * -1) + ((${e} / 100 * 30) / 100 * ${s})))`, document.documentElement.style.setProperty("--t-swipe-backdrop-opacity", `${0.5 - 0.5 / 100 * s}`));
|
|
488
488
|
},
|
|
489
489
|
back(t) {
|
|
490
490
|
if (!E.value) return;
|
|
@@ -527,7 +527,7 @@ const Ee = /* @__PURE__ */ _(ze, [["render", Ie]]), Ve = /* @__PURE__ */ h({
|
|
|
527
527
|
t == "scale" && te.move(o), t == "transform" && oe.move(o);
|
|
528
528
|
}, tt = (t) => {
|
|
529
529
|
t == "scale" && te.reset(), t == "transform" && oe.reset();
|
|
530
|
-
},
|
|
530
|
+
}, S = {
|
|
531
531
|
isBusy: C,
|
|
532
532
|
isSwipeable: ve,
|
|
533
533
|
reset: tt,
|
|
@@ -557,13 +557,13 @@ const Ee = /* @__PURE__ */ _(ze, [["render", Ie]]), Ve = /* @__PURE__ */ h({
|
|
|
557
557
|
},
|
|
558
558
|
emits: ["dismiss"],
|
|
559
559
|
setup(t, { expose: o, emit: e }) {
|
|
560
|
-
const s = t,
|
|
561
|
-
u.value = !0,
|
|
560
|
+
const s = t, n = e, l = m(!1), u = m(!1), r = m(!1), v = () => {
|
|
561
|
+
u.value = !0, r.value = !1, setTimeout(() => {
|
|
562
562
|
l.value = !0;
|
|
563
563
|
}, 10);
|
|
564
564
|
}, y = () => {
|
|
565
|
-
|
|
566
|
-
u.value = !1, l.value = !1,
|
|
565
|
+
r.value = !0, setTimeout(() => {
|
|
566
|
+
u.value = !1, l.value = !1, n("dismiss");
|
|
567
567
|
}, 300);
|
|
568
568
|
};
|
|
569
569
|
W(() => s.visible, (a) => {
|
|
@@ -614,7 +614,7 @@ const Ee = /* @__PURE__ */ _(ze, [["render", Ie]]), Ve = /* @__PURE__ */ h({
|
|
|
614
614
|
close: y
|
|
615
615
|
}), (a, c) => u.value ? (i(), p("div", {
|
|
616
616
|
key: 0,
|
|
617
|
-
class:
|
|
617
|
+
class: B(["t-toast", { [s.placement]: !0, open: l.value, closing: r.value }]),
|
|
618
618
|
style: T({ "--space": s.space, ...d.value })
|
|
619
619
|
}, [
|
|
620
620
|
g(a.$slots, "content", {}, () => [
|
|
@@ -622,38 +622,38 @@ const Ee = /* @__PURE__ */ _(ze, [["render", Ie]]), Ve = /* @__PURE__ */ h({
|
|
|
622
622
|
], !0)
|
|
623
623
|
], 6)) : I("", !0);
|
|
624
624
|
}
|
|
625
|
-
}), ye = /* @__PURE__ */ _(st, [["__scopeId", "data-v-2802d43f"]]),
|
|
625
|
+
}), ye = /* @__PURE__ */ _(st, [["__scopeId", "data-v-2802d43f"]]), Bo = (t = {}) => ({
|
|
626
626
|
open() {
|
|
627
627
|
let o = document.body.querySelector(".t-app");
|
|
628
628
|
if (!o) return;
|
|
629
629
|
const e = document.createElement("div"), s = m();
|
|
630
630
|
o.appendChild(e);
|
|
631
|
-
const
|
|
631
|
+
const n = J({
|
|
632
632
|
render() {
|
|
633
633
|
return Q(ye, {
|
|
634
634
|
...t,
|
|
635
635
|
ref: s,
|
|
636
636
|
onDismiss: () => {
|
|
637
637
|
setTimeout(() => {
|
|
638
|
-
|
|
638
|
+
n.unmount(), e.remove();
|
|
639
639
|
}, 300);
|
|
640
640
|
}
|
|
641
641
|
});
|
|
642
642
|
}
|
|
643
643
|
});
|
|
644
|
-
|
|
644
|
+
n.mount(e), setTimeout(() => {
|
|
645
645
|
s.value?.open?.(), setTimeout(() => {
|
|
646
646
|
s.value?.close?.();
|
|
647
647
|
}, t.duration + 10);
|
|
648
648
|
}, 50);
|
|
649
649
|
}
|
|
650
|
-
}),
|
|
650
|
+
}), nt = m(0);
|
|
651
651
|
function _e() {
|
|
652
652
|
return {
|
|
653
|
-
height:
|
|
653
|
+
height: nt
|
|
654
654
|
};
|
|
655
655
|
}
|
|
656
|
-
const
|
|
656
|
+
const rt = /* @__PURE__ */ h({
|
|
657
657
|
__name: "t-cable",
|
|
658
658
|
props: {
|
|
659
659
|
keyboard: { type: Boolean, default: !1 },
|
|
@@ -663,14 +663,14 @@ const nt = /* @__PURE__ */ h({
|
|
|
663
663
|
const o = t, { height: e } = _e();
|
|
664
664
|
return de("cableState", {
|
|
665
665
|
placement: o.placement
|
|
666
|
-
}), (s,
|
|
667
|
-
class:
|
|
666
|
+
}), (s, n) => (i(), p("div", {
|
|
667
|
+
class: B(["t-cable", { keyboard: o.keyboard && O(e) > 0, [o.placement]: !0 }]),
|
|
668
668
|
style: T({ "--t-keyboard-height": O(e) + "px", "--t-keyboard-transition": O(e) > 0 ? "0.3s" : "0.1s" })
|
|
669
669
|
}, [
|
|
670
670
|
g(s.$slots, "default", {}, void 0, !0)
|
|
671
671
|
], 6));
|
|
672
672
|
}
|
|
673
|
-
}), at = /* @__PURE__ */ _(
|
|
673
|
+
}), at = /* @__PURE__ */ _(rt, [["__scopeId", "data-v-6cae224b"]]), lt = /* @__PURE__ */ h({
|
|
674
674
|
__name: "t-card",
|
|
675
675
|
props: {
|
|
676
676
|
color: { default: null }
|
|
@@ -686,7 +686,7 @@ const nt = /* @__PURE__ */ h({
|
|
|
686
686
|
"--background": "var(--t-color-surface)"
|
|
687
687
|
}, s;
|
|
688
688
|
});
|
|
689
|
-
return (s,
|
|
689
|
+
return (s, n) => (i(), p("div", {
|
|
690
690
|
class: "t-card",
|
|
691
691
|
style: T(e.value)
|
|
692
692
|
}, [
|
|
@@ -708,19 +708,19 @@ const ge = /* @__PURE__ */ _(ct, [["render", ut], ["__scopeId", "data-v-ce0031a0
|
|
|
708
708
|
},
|
|
709
709
|
emits: ["refresh", "move", "cancel", "start"],
|
|
710
710
|
setup(t, { emit: o }) {
|
|
711
|
-
const e = o, s = t,
|
|
712
|
-
let
|
|
711
|
+
const e = o, s = t, n = m(0), l = m(!1), u = m();
|
|
712
|
+
let r, v = !1;
|
|
713
713
|
const y = () => {
|
|
714
|
-
l.value = !1,
|
|
714
|
+
l.value = !1, n.value = 0, v = !1;
|
|
715
715
|
}, d = () => {
|
|
716
|
-
v = !0, l.value = !0,
|
|
716
|
+
v = !0, l.value = !0, n.value = s.threshold, e("refresh", y);
|
|
717
717
|
}, a = () => {
|
|
718
|
-
|
|
718
|
+
n.value = 0, l.value = !1, v = !1, e("cancel");
|
|
719
719
|
};
|
|
720
720
|
return W(() => u.value, () => {
|
|
721
|
-
|
|
721
|
+
r && r.destroy();
|
|
722
722
|
let c = u.value.closest(".t-content");
|
|
723
|
-
c && (
|
|
723
|
+
c && (r = ae(c, {
|
|
724
724
|
options: {
|
|
725
725
|
minMove: 20
|
|
726
726
|
},
|
|
@@ -737,7 +737,7 @@ const ge = /* @__PURE__ */ _(ct, [["render", ut], ["__scopeId", "data-v-ce0031a0
|
|
|
737
737
|
return;
|
|
738
738
|
}
|
|
739
739
|
const b = f < 0 ? 0 : f;
|
|
740
|
-
|
|
740
|
+
n.value = b, e("move", b);
|
|
741
741
|
},
|
|
742
742
|
up({ deltaY: f, initialDirection: k }) {
|
|
743
743
|
l.value || v || k != "down" || (s.variant == "up" && f >= s.threshold ? d() : a());
|
|
@@ -748,19 +748,19 @@ const ge = /* @__PURE__ */ _(ct, [["render", ut], ["__scopeId", "data-v-ce0031a0
|
|
|
748
748
|
}, {
|
|
749
749
|
passive: !1
|
|
750
750
|
}));
|
|
751
|
-
}),
|
|
752
|
-
|
|
751
|
+
}), re(() => {
|
|
752
|
+
r && r.destroy();
|
|
753
753
|
}), (c, f) => F((i(), p("div", {
|
|
754
|
-
class:
|
|
754
|
+
class: B(["t-refresher", { safe: c.safe }]),
|
|
755
755
|
ref_key: "container",
|
|
756
756
|
ref: u
|
|
757
757
|
}, [
|
|
758
758
|
g(c.$slots, "default", {
|
|
759
|
-
offset:
|
|
759
|
+
offset: n.value,
|
|
760
760
|
refreshing: l.value
|
|
761
761
|
}, void 0, !0)
|
|
762
762
|
], 2)), [
|
|
763
|
-
[K,
|
|
763
|
+
[K, n.value > 0]
|
|
764
764
|
]);
|
|
765
765
|
}
|
|
766
766
|
}), pt = /* @__PURE__ */ _(dt, [["__scopeId", "data-v-c77146a5"]]), ft = {}, mt = { class: "t-screen" };
|
|
@@ -779,56 +779,56 @@ const be = /* @__PURE__ */ _(ft, [["render", vt], ["__scopeId", "data-v-c2a3436c
|
|
|
779
779
|
emits: ["change"],
|
|
780
780
|
setup(t, { emit: o }) {
|
|
781
781
|
let e = {};
|
|
782
|
-
const s = o,
|
|
782
|
+
const s = o, n = t;
|
|
783
783
|
let l;
|
|
784
|
-
const u =
|
|
784
|
+
const u = n.router || fe(), r = n.route || we(), v = u.getRoutes(), y = m();
|
|
785
785
|
for (let c of v)
|
|
786
786
|
e[c.name] = c.component || c.components;
|
|
787
787
|
const d = (c) => {
|
|
788
|
-
c &&
|
|
788
|
+
c && S.addScreen({
|
|
789
789
|
name: c,
|
|
790
790
|
target: null,
|
|
791
791
|
component: $e(e[c] || null)
|
|
792
792
|
});
|
|
793
793
|
}, a = (c, f) => {
|
|
794
|
-
!f ||
|
|
794
|
+
!f || S.screens[c].target || (S.addScreenEl(c, f.$el), S.nextScreen && S.next(n.variant, () => {
|
|
795
795
|
s("change");
|
|
796
796
|
}));
|
|
797
797
|
};
|
|
798
|
-
return W(() =>
|
|
799
|
-
c !=
|
|
798
|
+
return W(() => r.name, (c, f) => {
|
|
799
|
+
c != S.currentScreen.value?.name && (S.lastScreen.value?.name == c ? S.back(n.variant, () => {
|
|
800
800
|
s("change");
|
|
801
|
-
}) : d(
|
|
801
|
+
}) : d(r.name));
|
|
802
802
|
}), U(() => {
|
|
803
|
-
d(
|
|
803
|
+
d(r.name), l = ae(document.body, {
|
|
804
804
|
beforeEvent(c) {
|
|
805
|
-
return !!
|
|
805
|
+
return !!S.isSwipeable.value;
|
|
806
806
|
},
|
|
807
807
|
fast({ initialDirection: c }) {
|
|
808
|
-
|
|
808
|
+
S.lastScreen.value && c == "right" && u.back();
|
|
809
809
|
},
|
|
810
810
|
move({ deltaX: c, initialDirection: f }) {
|
|
811
|
-
f == "right" &&
|
|
811
|
+
f == "right" && S.move(n.variant, c);
|
|
812
812
|
},
|
|
813
813
|
up({ deltaX: c, initialDirection: f }) {
|
|
814
814
|
if (f != "right") {
|
|
815
|
-
|
|
815
|
+
S.reset(n.variant);
|
|
816
816
|
return;
|
|
817
817
|
}
|
|
818
818
|
const k = y.value.offsetParent.offsetWidth;
|
|
819
|
-
c / k * 100 >= 50 ? u.back() :
|
|
819
|
+
c / k * 100 >= 50 ? u.back() : S.reset(n.variant);
|
|
820
820
|
},
|
|
821
821
|
cancel() {
|
|
822
|
-
|
|
822
|
+
S.reset(n.variant);
|
|
823
823
|
}
|
|
824
824
|
});
|
|
825
|
-
}),
|
|
826
|
-
l && l.destroy(),
|
|
825
|
+
}), re(() => {
|
|
826
|
+
l && l.destroy(), S.removeAllScreen();
|
|
827
827
|
}), (c, f) => (i(), p(q, null, [
|
|
828
|
-
(i(!0), p(q, null, G(O(
|
|
828
|
+
(i(!0), p(q, null, G(O(S).screens, (k, b) => (i(), V(be, {
|
|
829
829
|
ref_for: !0,
|
|
830
830
|
ref: (N) => a(b, N),
|
|
831
|
-
style: T({ zIndex: b + (b == O(
|
|
831
|
+
style: T({ zIndex: b + (b == O(S).screens.length - 1 ? 2 : 1) }),
|
|
832
832
|
key: b
|
|
833
833
|
}, {
|
|
834
834
|
default: P(() => [
|
|
@@ -840,7 +840,7 @@ const be = /* @__PURE__ */ _(ft, [["render", vt], ["__scopeId", "data-v-c2a3436c
|
|
|
840
840
|
class: "t-swipe-backdrop",
|
|
841
841
|
ref_key: "backdrop",
|
|
842
842
|
ref: y,
|
|
843
|
-
style: T({ zIndex: O(
|
|
843
|
+
style: T({ zIndex: O(S).screens.length })
|
|
844
844
|
}, null, 4)
|
|
845
845
|
], 64));
|
|
846
846
|
}
|
|
@@ -853,12 +853,12 @@ const be = /* @__PURE__ */ _(ft, [["render", vt], ["__scopeId", "data-v-c2a3436c
|
|
|
853
853
|
},
|
|
854
854
|
setup(t) {
|
|
855
855
|
const o = t, e = pe("cableState"), s = w(() => o?.placement || e?.placement);
|
|
856
|
-
return (
|
|
857
|
-
class:
|
|
856
|
+
return (n, l) => (i(), p("div", {
|
|
857
|
+
class: B(["t-toolbar", { [s.value]: !0, safe: o.safe }]),
|
|
858
858
|
style: T({ "--t-size-toolbar": o.size })
|
|
859
859
|
}, [
|
|
860
860
|
$("div", null, [
|
|
861
|
-
g(
|
|
861
|
+
g(n.$slots, "default", {}, void 0, !0)
|
|
862
862
|
])
|
|
863
863
|
], 6));
|
|
864
864
|
}
|
|
@@ -869,17 +869,17 @@ const be = /* @__PURE__ */ _(ft, [["render", vt], ["__scopeId", "data-v-c2a3436c
|
|
|
869
869
|
router: {}
|
|
870
870
|
},
|
|
871
871
|
setup(t) {
|
|
872
|
-
const o = t, e = xe(), s = o.router || fe(),
|
|
872
|
+
const o = t, e = xe(), s = o.router || fe(), n = (l) => {
|
|
873
873
|
if (e.onBack) {
|
|
874
874
|
e.onBack(l);
|
|
875
875
|
return;
|
|
876
876
|
}
|
|
877
|
-
|
|
877
|
+
S.lastScreen.value ? s?.back?.() : o.to && s?.push?.(o.to);
|
|
878
878
|
};
|
|
879
|
-
return (l, u) => l.to || O(
|
|
879
|
+
return (l, u) => l.to || O(S).lastScreen ? (i(), p("button", {
|
|
880
880
|
key: 0,
|
|
881
881
|
class: "t-back-button",
|
|
882
|
-
onClick:
|
|
882
|
+
onClick: n
|
|
883
883
|
}, [
|
|
884
884
|
g(l.$slots, "default", {}, () => [
|
|
885
885
|
u[0] || (u[0] = $("i", { class: "ri-arrow-left-s-line" }, null, -1))
|
|
@@ -894,27 +894,27 @@ const be = /* @__PURE__ */ _(ft, [["render", vt], ["__scopeId", "data-v-c2a3436c
|
|
|
894
894
|
},
|
|
895
895
|
setup(t) {
|
|
896
896
|
const o = t, e = w(() => {
|
|
897
|
-
let s,
|
|
898
|
-
return o.size == "standard" ? s = "var(--t-fs-10)" : o.size == "small" ? s = "var(--t-fs-08)" : o.size == "large" ? s = "var(--t-fs-12)" : s = o.size, ["warning", "info", "danger", "primary", "secondary", "success"].includes(o.color) && (
|
|
899
|
-
"--color":
|
|
897
|
+
let s, n = o.color;
|
|
898
|
+
return o.size == "standard" ? s = "var(--t-fs-10)" : o.size == "small" ? s = "var(--t-fs-08)" : o.size == "large" ? s = "var(--t-fs-12)" : s = o.size, ["warning", "info", "danger", "primary", "secondary", "success"].includes(o.color) && (n = `var(--t-color-status-${o.color})`), {
|
|
899
|
+
"--color": n,
|
|
900
900
|
"--font-size": s
|
|
901
901
|
};
|
|
902
902
|
});
|
|
903
|
-
return (s,
|
|
903
|
+
return (s, n) => (i(), p("span", {
|
|
904
904
|
class: "t-text",
|
|
905
905
|
style: T(e.value)
|
|
906
906
|
}, [
|
|
907
907
|
g(s.$slots, "default", {}, void 0, !0)
|
|
908
908
|
], 4));
|
|
909
909
|
}
|
|
910
|
-
}),
|
|
910
|
+
}), ne = /* @__PURE__ */ _($t, [["__scopeId", "data-v-f0f94f05"]]), xt = /* @__PURE__ */ h({
|
|
911
911
|
__name: "t-gesture-indicator",
|
|
912
912
|
props: {
|
|
913
913
|
placement: { default: "bottom" }
|
|
914
914
|
},
|
|
915
915
|
setup(t) {
|
|
916
916
|
return (o, e) => (i(), p("div", {
|
|
917
|
-
class:
|
|
917
|
+
class: B(["t-gesture-indicator", { [o.placement]: !0 }])
|
|
918
918
|
}, null, 2));
|
|
919
919
|
}
|
|
920
920
|
}), he = /* @__PURE__ */ _(xt, [["__scopeId", "data-v-ed8f7308"]]), wt = /* @__PURE__ */ h({
|
|
@@ -929,14 +929,13 @@ const be = /* @__PURE__ */ _(ft, [["render", vt], ["__scopeId", "data-v-c2a3436c
|
|
|
929
929
|
keepalive: { type: Boolean, default: !0 },
|
|
930
930
|
backdrop: { type: Boolean, default: !0 },
|
|
931
931
|
rounded: { type: Boolean, default: !0 },
|
|
932
|
-
radius: { type: Boolean, default: !0 },
|
|
933
932
|
indicator: { type: Boolean, default: !0 },
|
|
934
933
|
style: {}
|
|
935
934
|
},
|
|
936
935
|
emits: ["dismiss"],
|
|
937
936
|
setup(t, { emit: o }) {
|
|
938
|
-
const e = t, s = o,
|
|
939
|
-
let
|
|
937
|
+
const e = t, s = o, n = m(), l = m(), u = m(!1);
|
|
938
|
+
let r = null;
|
|
940
939
|
const v = w(() => {
|
|
941
940
|
if (e.placement == "bottom") return "down";
|
|
942
941
|
if (e.placement == "top") return "up";
|
|
@@ -949,8 +948,8 @@ const be = /* @__PURE__ */ _(ft, [["render", vt], ["__scopeId", "data-v-c2a3436c
|
|
|
949
948
|
u.value = !1;
|
|
950
949
|
}, 300);
|
|
951
950
|
};
|
|
952
|
-
return W(() =>
|
|
953
|
-
a && (
|
|
951
|
+
return W(() => n.value, (a) => {
|
|
952
|
+
a && (r = ae(n.value, {
|
|
954
953
|
isMoving: !1,
|
|
955
954
|
options: {
|
|
956
955
|
minDist: 30
|
|
@@ -978,18 +977,18 @@ const be = /* @__PURE__ */ _(ft, [["render", vt], ["__scopeId", "data-v-c2a3436c
|
|
|
978
977
|
return;
|
|
979
978
|
}
|
|
980
979
|
let b, N, x;
|
|
981
|
-
e.placement == "bottom" || e.placement == "top" ? (b =
|
|
980
|
+
e.placement == "bottom" || e.placement == "top" ? (b = n.value.offsetHeight, x = c) : (b = n.value.offsetWidth, x = f), N = x / b * 100, N > 50 ? s("dismiss", "gesture") : l.value.open();
|
|
982
981
|
},
|
|
983
982
|
cancel() {
|
|
984
983
|
this.isMoving = !1, d(), l.value.open();
|
|
985
984
|
}
|
|
986
985
|
}));
|
|
987
|
-
}),
|
|
988
|
-
|
|
986
|
+
}), re(() => {
|
|
987
|
+
r && r.destroy();
|
|
989
988
|
}), (a, c) => (i(), V(H, {
|
|
990
989
|
ref_key: "present",
|
|
991
990
|
ref: l,
|
|
992
|
-
class:
|
|
991
|
+
class: B(e.class),
|
|
993
992
|
placement: e.placement,
|
|
994
993
|
backdrop: a.backdrop,
|
|
995
994
|
visible: e.visible,
|
|
@@ -1003,10 +1002,10 @@ const be = /* @__PURE__ */ _(ft, [["render", vt], ["__scopeId", "data-v-c2a3436c
|
|
|
1003
1002
|
placement: e.placement
|
|
1004
1003
|
}, null, 8, ["placement"])) : I("", !0),
|
|
1005
1004
|
$("div", {
|
|
1006
|
-
class:
|
|
1005
|
+
class: B(["t-sheet", { fullscreen: e.fullscreen, [e.placement]: !0, rounded: a.rounded }]),
|
|
1007
1006
|
style: T({ "--background": e.background }),
|
|
1008
1007
|
ref_key: "sheet",
|
|
1009
|
-
ref:
|
|
1008
|
+
ref: n
|
|
1010
1009
|
}, [
|
|
1011
1010
|
g(a.$slots, "default", {}, void 0, !0)
|
|
1012
1011
|
], 6)
|
|
@@ -1014,7 +1013,7 @@ const be = /* @__PURE__ */ _(ft, [["render", vt], ["__scopeId", "data-v-c2a3436c
|
|
|
1014
1013
|
_: 3
|
|
1015
1014
|
}, 8, ["class", "placement", "backdrop", "visible", "keepalive", "style"]));
|
|
1016
1015
|
}
|
|
1017
|
-
}), Tt = /* @__PURE__ */ _(wt, [["__scopeId", "data-v-
|
|
1016
|
+
}), Tt = /* @__PURE__ */ _(wt, [["__scopeId", "data-v-729ed53a"]]), St = { class: "t-input-label" }, Bt = { class: "t-input-content" }, zt = ["placeholder", "value", "type", "readonly"], Ct = /* @__PURE__ */ h({
|
|
1018
1017
|
__name: "t-input",
|
|
1019
1018
|
props: {
|
|
1020
1019
|
size: { default: "standard" },
|
|
@@ -1030,28 +1029,28 @@ const be = /* @__PURE__ */ _(ft, [["render", vt], ["__scopeId", "data-v-c2a3436c
|
|
|
1030
1029
|
},
|
|
1031
1030
|
emits: ["update:modelValue"],
|
|
1032
1031
|
setup(t, { emit: o }) {
|
|
1033
|
-
const e = t, s = o,
|
|
1032
|
+
const e = t, s = o, n = m(!1), l = m(null), u = w(
|
|
1034
1033
|
() => !(e.modelValue === "" || e.modelValue == null)
|
|
1035
|
-
),
|
|
1034
|
+
), r = (d) => {
|
|
1036
1035
|
s("update:modelValue", d.target.value);
|
|
1037
1036
|
}, v = async (d) => {
|
|
1038
|
-
|
|
1037
|
+
n.value = !0;
|
|
1039
1038
|
}, y = () => {
|
|
1040
|
-
|
|
1039
|
+
n.value = !1;
|
|
1041
1040
|
};
|
|
1042
1041
|
return (d, a) => (i(), p("div", {
|
|
1043
|
-
class:
|
|
1042
|
+
class: B(["t-input", {
|
|
1044
1043
|
rounded: d.rounded,
|
|
1045
1044
|
["size-" + d.size]: !0,
|
|
1046
1045
|
["variant-" + d.variant]: !0,
|
|
1047
|
-
focus:
|
|
1046
|
+
focus: n.value,
|
|
1048
1047
|
"has-value": u.value,
|
|
1049
1048
|
readonly: d.readonly
|
|
1050
1049
|
}])
|
|
1051
1050
|
}, [
|
|
1052
1051
|
$("label", null, [
|
|
1053
|
-
$("span",
|
|
1054
|
-
$("div",
|
|
1052
|
+
$("span", St, A(d.label), 1),
|
|
1053
|
+
$("div", Bt, [
|
|
1055
1054
|
g(d.$slots, "start", {}, void 0, !0),
|
|
1056
1055
|
$("input", {
|
|
1057
1056
|
ref_key: "editable",
|
|
@@ -1060,7 +1059,7 @@ const be = /* @__PURE__ */ _(ft, [["render", vt], ["__scopeId", "data-v-c2a3436c
|
|
|
1060
1059
|
placeholder: d.placeholder,
|
|
1061
1060
|
value: d.modelValue,
|
|
1062
1061
|
type: d.type,
|
|
1063
|
-
onInput:
|
|
1062
|
+
onInput: r,
|
|
1064
1063
|
onFocus: v,
|
|
1065
1064
|
onBlur: y,
|
|
1066
1065
|
readonly: d.readonly
|
|
@@ -1068,7 +1067,7 @@ const be = /* @__PURE__ */ _(ft, [["render", vt], ["__scopeId", "data-v-c2a3436c
|
|
|
1068
1067
|
g(d.$slots, "end", {}, void 0, !0)
|
|
1069
1068
|
])
|
|
1070
1069
|
]),
|
|
1071
|
-
d.error ? (i(), V(
|
|
1070
|
+
d.error ? (i(), V(ne, {
|
|
1072
1071
|
key: 0,
|
|
1073
1072
|
color: "danger"
|
|
1074
1073
|
}, {
|
|
@@ -1076,7 +1075,7 @@ const be = /* @__PURE__ */ _(ft, [["render", vt], ["__scopeId", "data-v-c2a3436c
|
|
|
1076
1075
|
M(A(d.error), 1)
|
|
1077
1076
|
]),
|
|
1078
1077
|
_: 1
|
|
1079
|
-
})) : d.help ? (i(), V(
|
|
1078
|
+
})) : d.help ? (i(), V(ne, {
|
|
1080
1079
|
key: 1,
|
|
1081
1080
|
color: "secondary"
|
|
1082
1081
|
}, {
|
|
@@ -1111,7 +1110,7 @@ const Ht = /* @__PURE__ */ _(qt, [["render", Lt]]), Ft = /* @__PURE__ */ h({
|
|
|
1111
1110
|
setup(t) {
|
|
1112
1111
|
const o = t;
|
|
1113
1112
|
return (e, s) => (i(), p("div", {
|
|
1114
|
-
class:
|
|
1113
|
+
class: B(["t-divider", { [o.direction]: !0 }])
|
|
1115
1114
|
}, null, 2));
|
|
1116
1115
|
}
|
|
1117
1116
|
}), Kt = /* @__PURE__ */ _(Ft, [["__scopeId", "data-v-47ee8991"]]), Gt = /* @__PURE__ */ h({
|
|
@@ -1121,19 +1120,19 @@ const Ht = /* @__PURE__ */ _(qt, [["render", Lt]]), Ft = /* @__PURE__ */ h({
|
|
|
1121
1120
|
},
|
|
1122
1121
|
emits: ["change"],
|
|
1123
1122
|
setup(t, { emit: o }) {
|
|
1124
|
-
const e = t, s = o,
|
|
1123
|
+
const e = t, s = o, n = m(!1), l = m(), u = w(() => {
|
|
1125
1124
|
let y = e.color;
|
|
1126
1125
|
return ["warning", "info", "danger", "primary", "secondary", "success"].includes(e.color) && (y = `var(--t-color-status-${e.color})`), {
|
|
1127
1126
|
"--color": y
|
|
1128
1127
|
};
|
|
1129
|
-
}),
|
|
1128
|
+
}), r = () => l.value?.parentElement?.querySelector?.("input");
|
|
1130
1129
|
U(() => {
|
|
1131
|
-
let y =
|
|
1132
|
-
y && (
|
|
1130
|
+
let y = r();
|
|
1131
|
+
y && (n.value = y.type != "password", s("change", n.value));
|
|
1133
1132
|
});
|
|
1134
1133
|
const v = () => {
|
|
1135
|
-
let y =
|
|
1136
|
-
y && (
|
|
1134
|
+
let y = r();
|
|
1135
|
+
y && (n.value = !n.value, n.value ? y.type = "text" : y.type = "password", s("change", n.value));
|
|
1137
1136
|
};
|
|
1138
1137
|
return (y, d) => (i(), p("button", {
|
|
1139
1138
|
ref_key: "toggle",
|
|
@@ -1142,10 +1141,10 @@ const Ht = /* @__PURE__ */ _(qt, [["render", Lt]]), Ft = /* @__PURE__ */ h({
|
|
|
1142
1141
|
style: T(u.value),
|
|
1143
1142
|
onClick: v
|
|
1144
1143
|
}, [
|
|
1145
|
-
|
|
1144
|
+
n.value ? g(y.$slots, "on", { key: 0 }, () => [
|
|
1146
1145
|
d[0] || (d[0] = $("i", { class: "ri-eye-line" }, null, -1))
|
|
1147
1146
|
], !0) : I("", !0),
|
|
1148
|
-
|
|
1147
|
+
n.value ? I("", !0) : g(y.$slots, "off", { key: 1 }, () => [
|
|
1149
1148
|
d[1] || (d[1] = $("i", { class: "ri-eye-off-line" }, null, -1))
|
|
1150
1149
|
], !0)
|
|
1151
1150
|
], 4));
|
|
@@ -1158,8 +1157,8 @@ const Ht = /* @__PURE__ */ _(qt, [["render", Lt]]), Ft = /* @__PURE__ */ h({
|
|
|
1158
1157
|
},
|
|
1159
1158
|
setup(t) {
|
|
1160
1159
|
const o = t, e = w(() => o.size == "small" ? "24px" : o.size == "standard" ? "40px" : o.size == "large" ? "60px" : o.size);
|
|
1161
|
-
return (s,
|
|
1162
|
-
class:
|
|
1160
|
+
return (s, n) => (i(), p("div", {
|
|
1161
|
+
class: B(["t-avatar", { square: s.square }]),
|
|
1163
1162
|
style: T({ "--size": e.value })
|
|
1164
1163
|
}, [
|
|
1165
1164
|
g(s.$slots, "default", {}, void 0, !0)
|
|
@@ -1178,16 +1177,16 @@ const Ht = /* @__PURE__ */ _(qt, [["render", Lt]]), Ft = /* @__PURE__ */ h({
|
|
|
1178
1177
|
},
|
|
1179
1178
|
emits: ["change"],
|
|
1180
1179
|
setup(t, { emit: o }) {
|
|
1181
|
-
const e = t, s = o,
|
|
1182
|
-
|
|
1180
|
+
const e = t, s = o, n = m(!1), l = m(""), u = m(), r = () => {
|
|
1181
|
+
n.value = !n.value, l.value = `calc(${u.value.offsetHeight}px + 2rem)`, s("change", n.value);
|
|
1183
1182
|
};
|
|
1184
|
-
return s("change",
|
|
1185
|
-
class:
|
|
1183
|
+
return s("change", n.value), (v, y) => (i(), p("div", {
|
|
1184
|
+
class: B(["t-collapse", { open: n.value }]),
|
|
1186
1185
|
style: T({ "--height": l.value })
|
|
1187
1186
|
}, [
|
|
1188
1187
|
$("div", {
|
|
1189
1188
|
class: "t-collapse-header",
|
|
1190
|
-
onClick:
|
|
1189
|
+
onClick: r
|
|
1191
1190
|
}, [
|
|
1192
1191
|
g(v.$slots, "icon"),
|
|
1193
1192
|
$("div", Qt, [
|
|
@@ -1196,7 +1195,7 @@ const Ht = /* @__PURE__ */ _(qt, [["render", Lt]]), Ft = /* @__PURE__ */ h({
|
|
|
1196
1195
|
])
|
|
1197
1196
|
]),
|
|
1198
1197
|
g(v.$slots, "toggle", {}, () => [
|
|
1199
|
-
|
|
1198
|
+
n.value ? (i(), p("div", Zt, [...y[0] || (y[0] = [
|
|
1200
1199
|
$("i", { class: "ri-arrow-up-s-line" }, null, -1)
|
|
1201
1200
|
])])) : (i(), p("div", Yt, [...y[1] || (y[1] = [
|
|
1202
1201
|
$("i", { class: "ri-arrow-down-s-line" }, null, -1)
|
|
@@ -1223,7 +1222,7 @@ const Ht = /* @__PURE__ */ _(qt, [["render", Lt]]), Ft = /* @__PURE__ */ h({
|
|
|
1223
1222
|
},
|
|
1224
1223
|
emits: ["update:modelValue"],
|
|
1225
1224
|
setup(t, { emit: o }) {
|
|
1226
|
-
const e = t, s = o,
|
|
1225
|
+
const e = t, s = o, n = () => {
|
|
1227
1226
|
s("update:modelValue", !e.modelValue);
|
|
1228
1227
|
}, l = w(() => {
|
|
1229
1228
|
let u = {
|
|
@@ -1235,30 +1234,30 @@ const Ht = /* @__PURE__ */ _(qt, [["render", Lt]]), Ft = /* @__PURE__ */ h({
|
|
|
1235
1234
|
"--color": `var(--t-color-status-${e.color}-text)`
|
|
1236
1235
|
}), u;
|
|
1237
1236
|
});
|
|
1238
|
-
return (u,
|
|
1239
|
-
class:
|
|
1237
|
+
return (u, r) => (i(), p("div", {
|
|
1238
|
+
class: B(["t-switch", { on: e.modelValue }]),
|
|
1240
1239
|
style: T(l.value),
|
|
1241
|
-
onClick:
|
|
1242
|
-
}, [...
|
|
1240
|
+
onClick: n
|
|
1241
|
+
}, [...r[0] || (r[0] = [
|
|
1243
1242
|
$("div", { class: "t-switch-icon" }, null, -1)
|
|
1244
1243
|
])], 6));
|
|
1245
1244
|
}
|
|
1246
|
-
}), so = /* @__PURE__ */ _(oo, [["__scopeId", "data-v-3616970e"]]),
|
|
1245
|
+
}), so = /* @__PURE__ */ _(oo, [["__scopeId", "data-v-3616970e"]]), no = /* @__PURE__ */ h({
|
|
1247
1246
|
__name: "t-tab",
|
|
1248
1247
|
props: {
|
|
1249
1248
|
value: {},
|
|
1250
1249
|
disabled: { type: Boolean, default: !1 }
|
|
1251
1250
|
},
|
|
1252
1251
|
setup(t) {
|
|
1253
|
-
const o = t, e = pe("tabsState"), s = w(() => e.activeValue.value === o.value),
|
|
1252
|
+
const o = t, e = pe("tabsState"), s = w(() => e.activeValue.value === o.value), n = () => {
|
|
1254
1253
|
o.disabled || e.setValue(o.value);
|
|
1255
1254
|
};
|
|
1256
1255
|
return (l, u) => (i(), p("li", {
|
|
1257
|
-
class:
|
|
1256
|
+
class: B(["t-tab", { active: s.value }])
|
|
1258
1257
|
}, [
|
|
1259
1258
|
j(Y, {
|
|
1260
1259
|
variant: "text",
|
|
1261
|
-
onClick:
|
|
1260
|
+
onClick: n,
|
|
1262
1261
|
size: O(e).size,
|
|
1263
1262
|
color: s.value ? O(e).color.text : void 0
|
|
1264
1263
|
}, {
|
|
@@ -1269,7 +1268,7 @@ const Ht = /* @__PURE__ */ _(qt, [["render", Lt]]), Ft = /* @__PURE__ */ h({
|
|
|
1269
1268
|
}, 8, ["size", "color"])
|
|
1270
1269
|
], 2));
|
|
1271
1270
|
}
|
|
1272
|
-
}),
|
|
1271
|
+
}), ro = /* @__PURE__ */ _(no, [["__scopeId", "data-v-4b7f4e98"]]), ao = /* @__PURE__ */ h({
|
|
1273
1272
|
__name: "t-tabs",
|
|
1274
1273
|
props: {
|
|
1275
1274
|
placement: { default: "top-start" },
|
|
@@ -1283,42 +1282,42 @@ const Ht = /* @__PURE__ */ _(qt, [["render", Lt]]), Ft = /* @__PURE__ */ h({
|
|
|
1283
1282
|
},
|
|
1284
1283
|
emits: ["update:modelValue"],
|
|
1285
1284
|
setup(t, { emit: o }) {
|
|
1286
|
-
const e = t, s = o,
|
|
1285
|
+
const e = t, s = o, n = m("0px"), l = m(0), u = m(0), r = m(), v = w(() => {
|
|
1287
1286
|
let a = "", c = "";
|
|
1288
1287
|
return e.variant == "text" && (a = "transparent", ["warning", "info", "danger", "primary", "secondary", "success"].includes(e.color) ? c = `var(--t-color-status-${e.color})` : c = e.color), e.variant == "border-under" && (c = "currentColor", ["warning", "info", "danger", "primary", "secondary", "success"].includes(e.color) ? a = `var(--t-color-status-${e.color})` : a = e.color), e.variant == "tag" && (["warning", "info", "danger", "primary", "secondary", "success"].includes(e.color) ? (a = `var(--t-color-status-${e.color})`, c = `var(--t-color-status-${e.color}-text)`) : (a = e.color, c = "currentColor")), { background: a, text: c };
|
|
1289
1288
|
}), y = w(() => e.variant == "border-under" ? {
|
|
1290
|
-
"--transform":
|
|
1289
|
+
"--transform": n.value,
|
|
1291
1290
|
"--border": e.border + "px"
|
|
1292
1291
|
} : e.variant == "tag" ? {
|
|
1293
1292
|
"--top": e.margin[0] + "px",
|
|
1294
1293
|
"--height": u.value - e.margin[0] * 2 + "px",
|
|
1295
1294
|
"--left": e.margin[1] + "px",
|
|
1296
1295
|
"--width": l.value - e.margin[1] * 2 + "px",
|
|
1297
|
-
"--transform":
|
|
1296
|
+
"--transform": n.value,
|
|
1298
1297
|
"--radius": e.radius + "px"
|
|
1299
1298
|
} : {}), d = () => {
|
|
1300
1299
|
if (e.variant == "border-under") {
|
|
1301
|
-
let a =
|
|
1300
|
+
let a = r.value.querySelector(".active");
|
|
1302
1301
|
if (a) {
|
|
1303
1302
|
if (e.placement.startsWith("top-") || e.placement.startsWith("bottom-")) {
|
|
1304
|
-
let c = a.getBoundingClientRect().left -
|
|
1305
|
-
|
|
1303
|
+
let c = a.getBoundingClientRect().left - r.value.getBoundingClientRect().left + r.value.scrollLeft, f = a.offsetWidth / 2;
|
|
1304
|
+
n.value = c + f - e.border / 2 + "px";
|
|
1306
1305
|
} else if (e.placement.startsWith("left-") || e.placement.startsWith("right-")) {
|
|
1307
|
-
let c = a.getBoundingClientRect().top -
|
|
1308
|
-
|
|
1306
|
+
let c = a.getBoundingClientRect().top - r.value.getBoundingClientRect().top + r.value.scrollTop, f = a.offsetHeight / 2;
|
|
1307
|
+
n.value = c + f - e.border / 2 + "px";
|
|
1309
1308
|
}
|
|
1310
1309
|
}
|
|
1311
1310
|
}
|
|
1312
1311
|
if (e.variant == "tag") {
|
|
1313
|
-
let a =
|
|
1312
|
+
let a = r.value.querySelector(".active");
|
|
1314
1313
|
if (a) {
|
|
1315
1314
|
let c = a.offsetWidth, f = a.offsetHeight;
|
|
1316
1315
|
if (e.placement.startsWith("top-") || e.placement.startsWith("bottom-")) {
|
|
1317
|
-
let k = a.getBoundingClientRect().left -
|
|
1318
|
-
|
|
1316
|
+
let k = a.getBoundingClientRect().left - r.value.getBoundingClientRect().left + r.value.scrollLeft;
|
|
1317
|
+
n.value = k + "px";
|
|
1319
1318
|
} else if (e.placement.startsWith("left-") || e.placement.startsWith("right-")) {
|
|
1320
|
-
let k = a.getBoundingClientRect().top -
|
|
1321
|
-
|
|
1319
|
+
let k = a.getBoundingClientRect().top - r.value.getBoundingClientRect().top + r.value.scrollTop;
|
|
1320
|
+
n.value = k + "px";
|
|
1322
1321
|
}
|
|
1323
1322
|
l.value = c, u.value = f;
|
|
1324
1323
|
}
|
|
@@ -1338,8 +1337,8 @@ const Ht = /* @__PURE__ */ _(qt, [["render", Lt]]), Ft = /* @__PURE__ */ h({
|
|
|
1338
1337
|
await ce(), d();
|
|
1339
1338
|
}), (a, c) => (i(), p("ul", {
|
|
1340
1339
|
ref_key: "container",
|
|
1341
|
-
ref:
|
|
1342
|
-
class:
|
|
1340
|
+
ref: r,
|
|
1341
|
+
class: B(["t-tabs", { [a.placement]: !0, [`variant-${a.variant}`]: !0 }]),
|
|
1343
1342
|
style: T([{ "--background": v.value.background, "--color": v.value.text }, y.value])
|
|
1344
1343
|
}, [
|
|
1345
1344
|
g(a.$slots, "default", {}, void 0, !0)
|
|
@@ -1371,36 +1370,36 @@ const Ht = /* @__PURE__ */ _(qt, [["render", Lt]]), Ft = /* @__PURE__ */ h({
|
|
|
1371
1370
|
},
|
|
1372
1371
|
emits: ["update:modelValue"],
|
|
1373
1372
|
setup(t, { emit: o }) {
|
|
1374
|
-
const e = t, s = o,
|
|
1375
|
-
let
|
|
1373
|
+
const e = t, s = o, n = w(() => {
|
|
1374
|
+
let r = {
|
|
1376
1375
|
"--background": e.color,
|
|
1377
1376
|
"--color": "#ffffff"
|
|
1378
1377
|
};
|
|
1379
|
-
return ["warning", "info", "danger", "primary", "secondary", "success"].includes(e.color) && (
|
|
1378
|
+
return ["warning", "info", "danger", "primary", "secondary", "success"].includes(e.color) && (r = {
|
|
1380
1379
|
"--background": `var(--t-color-status-${e.color})`,
|
|
1381
1380
|
"--color": `var(--t-color-status-${e.color}-text)`
|
|
1382
|
-
}),
|
|
1381
|
+
}), r;
|
|
1383
1382
|
}), l = w(() => e.multiple ? e.modelValue.includes(e.value) : e.value === void 0 ? e.modelValue : e.modelValue == e.value), u = () => {
|
|
1384
1383
|
if (e.multiple) {
|
|
1385
|
-
let
|
|
1386
|
-
e.modelValue.includes(e.value) ?
|
|
1384
|
+
let r = e.modelValue;
|
|
1385
|
+
e.modelValue.includes(e.value) ? r.splice(r.indexOf(e.value), 1) : r.push(e.value), s("update:modelValue", r);
|
|
1387
1386
|
} else e.value === void 0 ? s("update:modelValue", !e.modelValue) : s("update:modelValue", e.value);
|
|
1388
1387
|
};
|
|
1389
|
-
return (
|
|
1390
|
-
class:
|
|
1391
|
-
style: T(
|
|
1388
|
+
return (r, v) => (i(), p("div", {
|
|
1389
|
+
class: B(["t-checkbox", { active: l.value }]),
|
|
1390
|
+
style: T(n.value),
|
|
1392
1391
|
onClick: u
|
|
1393
1392
|
}, [
|
|
1394
1393
|
$("div", {
|
|
1395
|
-
class:
|
|
1394
|
+
class: B(`t-checkbox-${r.type}`)
|
|
1396
1395
|
}, [
|
|
1397
|
-
|
|
1398
|
-
|
|
1396
|
+
r.type == "radio" ? (i(), p("div", uo)) : I("", !0),
|
|
1397
|
+
r.type == "check" ? g(r.$slots, "icon", { key: 1 }, () => [
|
|
1399
1398
|
v[0] || (v[0] = $("i", { class: "ri-check-line" }, null, -1))
|
|
1400
1399
|
], !0) : I("", !0)
|
|
1401
1400
|
], 2),
|
|
1402
|
-
g(
|
|
1403
|
-
|
|
1401
|
+
g(r.$slots, "label", {}, () => [
|
|
1402
|
+
r.label ? (i(), p("span", po, A(e.label), 1)) : I("", !0)
|
|
1404
1403
|
], !0)
|
|
1405
1404
|
], 6));
|
|
1406
1405
|
}
|
|
@@ -1427,7 +1426,7 @@ const Ht = /* @__PURE__ */ _(qt, [["render", Lt]]), Ft = /* @__PURE__ */ h({
|
|
|
1427
1426
|
"--height": o.height,
|
|
1428
1427
|
"--radius": o.radius
|
|
1429
1428
|
}));
|
|
1430
|
-
return (s,
|
|
1429
|
+
return (s, n) => (i(), p("div", {
|
|
1431
1430
|
class: "t-skeleton",
|
|
1432
1431
|
style: T(e.value)
|
|
1433
1432
|
}, null, 4));
|
|
@@ -1448,25 +1447,25 @@ const Ht = /* @__PURE__ */ _(qt, [["render", Lt]]), Ft = /* @__PURE__ */ h({
|
|
|
1448
1447
|
"--color": "var(--t-color-surface)"
|
|
1449
1448
|
}, s;
|
|
1450
1449
|
});
|
|
1451
|
-
return (s,
|
|
1450
|
+
return (s, n) => (i(), p("div", {
|
|
1452
1451
|
class: "t-ripple",
|
|
1453
1452
|
style: T(e.value)
|
|
1454
1453
|
}, null, 4));
|
|
1455
1454
|
}
|
|
1456
1455
|
}), ho = /* @__PURE__ */ _(bo, [["__scopeId", "data-v-42cb3d71"]]), zo = () => ({
|
|
1457
1456
|
install: (t) => {
|
|
1458
|
-
|
|
1457
|
+
Be(), t.component("t-app", Ee), t.component("t-screen", be), t.component("t-swipe-screen", _t), t.component("t-cable", at), t.component("t-toolbar", bt), t.component("t-content", ge), t.component("t-card", lt), t.component("t-refresher", pt), t.component("t-button", Y), t.component("t-back-button", kt), t.component("t-present", H), t.component("t-text", ne), t.component("t-sheet", Tt), t.component("t-gesture-indicator", he), t.component("t-input", It), t.component("t-textarea", Pt), t.component("t-rich-text", Ot), t.component("t-grid", Nt), t.component("t-grid-item", Ht), t.component("t-divider", Kt), t.component("t-toggle-password", Ut), t.component("t-loading-icon", Z), t.component("t-alert", me), t.component("t-avatar", Jt), t.component("t-collapse", to), t.component("t-toast", ye), t.component("t-switch", so), t.component("t-tab", ro), t.component("t-tabs", lo), t.component("t-loading-app", io), t.component("t-checkbox", mo), t.component("t-keyboard-space", yo), t.component("t-skeleton", go), t.component("t-ripple", ho);
|
|
1459
1458
|
}
|
|
1460
1459
|
});
|
|
1461
1460
|
export {
|
|
1462
|
-
|
|
1461
|
+
Se as blurCurrentActive,
|
|
1463
1462
|
To as createAction,
|
|
1464
1463
|
wo as createAlert,
|
|
1465
|
-
|
|
1466
|
-
|
|
1464
|
+
So as createLoading,
|
|
1465
|
+
Bo as createToast,
|
|
1467
1466
|
zo as createToife,
|
|
1468
1467
|
Te as isFormElement,
|
|
1469
1468
|
Ke as presentController,
|
|
1470
|
-
|
|
1469
|
+
S as screenController,
|
|
1471
1470
|
_e as useKeyboard
|
|
1472
1471
|
};
|