@toife/vue 2.0.6 → 2.0.7
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/index.css +1 -1
- package/dist/index.es.js +142 -147
- package/dist/index.umd.js +1 -1
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { createElementBlock as p, openBlock as c, renderSlot as b, defineComponent as h, ref as v, computed as w, reactive as ce, watch as D, onMounted as G, Fragment as W, withDirectives as L, createCommentVNode as
|
|
2
|
-
import { gesture as
|
|
1
|
+
import { createElementBlock as p, openBlock as c, renderSlot as b, defineComponent as h, ref as v, computed as w, reactive as ce, watch as D, onMounted as G, Fragment as W, withDirectives as L, createCommentVNode as I, normalizeStyle as x, normalizeClass as S, vShow as H, createElementVNode as $, createVNode as U, createBlock as E, withCtx as V, toDisplayString as R, renderList as F, createTextVNode as M, createApp as j, h as K, provide as ie, unref as A, onUnmounted as se, resolveDynamicComponent as be, markRaw as he, inject as ue, useAttrs as ke, withModifiers as $e, nextTick as ae } from "vue";
|
|
2
|
+
import { gesture as re } from "@toife/gesture";
|
|
3
3
|
import { useRouter as de, useRoute as we } from "vue-router";
|
|
4
4
|
const xe = (e) => e && (e.tagName == "INPUT" || e.tagName == "TEXTAREA" || e.isContentEditable), Te = () => {
|
|
5
5
|
const e = document.activeElement;
|
|
@@ -13,13 +13,13 @@ const xe = (e) => e && (e.tagName == "INPUT" || e.tagName == "TEXTAREA" || e.isC
|
|
|
13
13
|
for (const [s, r] of o)
|
|
14
14
|
t[s] = r;
|
|
15
15
|
return t;
|
|
16
|
-
}, Be = {},
|
|
17
|
-
function
|
|
18
|
-
return c(), p("div",
|
|
16
|
+
}, Be = {}, ze = { class: "t-app" };
|
|
17
|
+
function Ie(e, o) {
|
|
18
|
+
return c(), p("div", ze, [
|
|
19
19
|
b(e.$slots, "default")
|
|
20
20
|
]);
|
|
21
21
|
}
|
|
22
|
-
const
|
|
22
|
+
const Ce = /* @__PURE__ */ g(Be, [["render", Ie]]), Ee = /* @__PURE__ */ h({
|
|
23
23
|
__name: "t-present",
|
|
24
24
|
props: {
|
|
25
25
|
keepalive: { type: Boolean, default: !0 },
|
|
@@ -31,14 +31,14 @@ const Ie = /* @__PURE__ */ g(Be, [["render", ze]]), Ee = /* @__PURE__ */ h({
|
|
|
31
31
|
},
|
|
32
32
|
emits: ["dismiss"],
|
|
33
33
|
setup(e, { expose: o, emit: t }) {
|
|
34
|
-
const s = v(0), r = v(!1), l = v(), d = v(), a = e, f = t, y = w(() => r.value || a.keepalive),
|
|
34
|
+
const s = v(0), r = v(!1), l = v(), d = v(), a = e, f = t, y = w(() => r.value || a.keepalive), i = ce({
|
|
35
35
|
"--t-present-backdrop-opacity": "0.4",
|
|
36
36
|
"--t-present-transition": "0.2s",
|
|
37
37
|
"--t-present-content-transform": "0px",
|
|
38
38
|
"--t-present-content-opacity": "1"
|
|
39
39
|
}), n = (m) => {
|
|
40
|
-
a.backdrop ? m?.backdropOpacity && (
|
|
41
|
-
},
|
|
40
|
+
a.backdrop ? m?.backdropOpacity && (i["--t-present-backdrop-opacity"] = m.backdropOpacity) : i["--t-present-backdrop-opacity"] = "0", m?.transition && (i["--t-present-transition"] = m.transition, i["--t-present-transition"] = m.transition), m?.contentTransform && (i["--t-present-content-transform"] = m.contentTransform), m?.contentOpacity && (i["--t-present-content-opacity"] = m.contentOpacity);
|
|
41
|
+
}, u = () => {
|
|
42
42
|
n({
|
|
43
43
|
contentTransform: "0px",
|
|
44
44
|
transition: "0.2s",
|
|
@@ -56,42 +56,42 @@ const Ie = /* @__PURE__ */ g(Be, [["render", ze]]), Ee = /* @__PURE__ */ h({
|
|
|
56
56
|
};
|
|
57
57
|
D(() => a.visible, () => {
|
|
58
58
|
a.visible ? (r.value = !0, s.value = Fe.getNewIndex(), setTimeout(() => {
|
|
59
|
-
|
|
59
|
+
u();
|
|
60
60
|
}, 50)) : (_(), setTimeout(() => {
|
|
61
61
|
r.value = !1;
|
|
62
62
|
}, 200));
|
|
63
63
|
}), o({
|
|
64
64
|
render: n,
|
|
65
|
-
open:
|
|
65
|
+
open: u,
|
|
66
66
|
close: _
|
|
67
67
|
});
|
|
68
68
|
const k = (m) => {
|
|
69
69
|
m.preventDefault(), f("dismiss", "backdrop");
|
|
70
70
|
};
|
|
71
71
|
return G(() => {
|
|
72
|
-
a.visible ?
|
|
72
|
+
a.visible ? u() : _();
|
|
73
73
|
}), (m, O) => (c(), p(W, null, [
|
|
74
74
|
y.value ? L((c(), p("div", {
|
|
75
75
|
key: 0,
|
|
76
76
|
class: S(["t-present", [{ [m.placement]: !0 }, a.class]]),
|
|
77
77
|
ref_key: "present",
|
|
78
78
|
ref: d,
|
|
79
|
-
style: x([
|
|
79
|
+
style: x([i, { zIndex: s.value }, a.style])
|
|
80
80
|
}, [
|
|
81
81
|
b(m.$slots, "default", {}, void 0, !0)
|
|
82
82
|
], 6)), [
|
|
83
83
|
[H, r.value]
|
|
84
|
-
]) :
|
|
84
|
+
]) : I("", !0),
|
|
85
85
|
y.value ? L((c(), p("div", {
|
|
86
86
|
key: 1,
|
|
87
87
|
class: "t-present-backdrop",
|
|
88
88
|
onClick: k,
|
|
89
89
|
ref_key: "backdrop",
|
|
90
90
|
ref: l,
|
|
91
|
-
style: x([
|
|
91
|
+
style: x([i, { zIndex: s.value - 1 }, a.style])
|
|
92
92
|
}, null, 4)), [
|
|
93
93
|
[H, r.value]
|
|
94
|
-
]) :
|
|
94
|
+
]) : I("", !0)
|
|
95
95
|
], 64));
|
|
96
96
|
}
|
|
97
97
|
}), q = /* @__PURE__ */ g(Ee, [["__scopeId", "data-v-1b25059f"]]), Ve = /* @__PURE__ */ h({
|
|
@@ -188,7 +188,7 @@ const Ie = /* @__PURE__ */ g(Be, [["render", ze]]), Ee = /* @__PURE__ */ h({
|
|
|
188
188
|
color: "var(--color)",
|
|
189
189
|
type: o.loadingType
|
|
190
190
|
}, null, 8, ["type"])
|
|
191
|
-
])) :
|
|
191
|
+
])) : I("", !0)
|
|
192
192
|
], 6));
|
|
193
193
|
}
|
|
194
194
|
}), Q = /* @__PURE__ */ g(Ae, [["__scopeId", "data-v-185a9e49"]]), Xe = {
|
|
@@ -208,19 +208,19 @@ const Ie = /* @__PURE__ */ g(Be, [["render", ze]]), Ee = /* @__PURE__ */ h({
|
|
|
208
208
|
r.value = !0;
|
|
209
209
|
}, y = (n) => {
|
|
210
210
|
r.value = !1, n.handler && n.handler(), l("dismiss", "choose", n?.data);
|
|
211
|
-
},
|
|
211
|
+
}, i = (n) => {
|
|
212
212
|
s.dismiss && s.dismiss.includes(n) ? (r.value = !1, l("dismiss", n)) : n == "backdrop" && (a.value = !0, setTimeout(() => {
|
|
213
213
|
a.value = !1;
|
|
214
214
|
}, 300));
|
|
215
215
|
};
|
|
216
216
|
return o({
|
|
217
217
|
open: f
|
|
218
|
-
}), (n,
|
|
218
|
+
}), (n, u) => (c(), E(q, {
|
|
219
219
|
placement: "center",
|
|
220
220
|
backdrop: !0,
|
|
221
221
|
keepalive: !1,
|
|
222
222
|
visible: r.value,
|
|
223
|
-
onDismiss:
|
|
223
|
+
onDismiss: i
|
|
224
224
|
}, {
|
|
225
225
|
default: V(() => [
|
|
226
226
|
$("div", {
|
|
@@ -229,7 +229,7 @@ const Ie = /* @__PURE__ */ g(Be, [["render", ze]]), Ee = /* @__PURE__ */ h({
|
|
|
229
229
|
ref: d
|
|
230
230
|
}, [
|
|
231
231
|
b(n.$slots, "header", {}, () => [
|
|
232
|
-
s.title ? (c(), p("div", Xe, R(s.title), 1)) :
|
|
232
|
+
s.title ? (c(), p("div", Xe, R(s.title), 1)) : I("", !0)
|
|
233
233
|
], !0),
|
|
234
234
|
b(n.$slots, "content", {}, () => [
|
|
235
235
|
$("div", De, R(s.message), 1)
|
|
@@ -242,7 +242,7 @@ const Ie = /* @__PURE__ */ g(Be, [["render", ze]]), Ee = /* @__PURE__ */ h({
|
|
|
242
242
|
onClick: (k) => y(_)
|
|
243
243
|
}, {
|
|
244
244
|
default: V(() => [
|
|
245
|
-
|
|
245
|
+
M(R(_.text), 1)
|
|
246
246
|
]),
|
|
247
247
|
_: 2
|
|
248
248
|
}, 1032, ["color", "variant", "onClick"]))), 256))
|
|
@@ -278,7 +278,7 @@ const Ie = /* @__PURE__ */ g(Be, [["render", ze]]), Ee = /* @__PURE__ */ h({
|
|
|
278
278
|
}, 50);
|
|
279
279
|
});
|
|
280
280
|
}
|
|
281
|
-
}),
|
|
281
|
+
}), Me = /* @__PURE__ */ h({
|
|
282
282
|
__name: "t-action",
|
|
283
283
|
props: {
|
|
284
284
|
actions: {},
|
|
@@ -291,7 +291,7 @@ const Ie = /* @__PURE__ */ g(Be, [["render", ze]]), Ee = /* @__PURE__ */ h({
|
|
|
291
291
|
r.value = !0;
|
|
292
292
|
}, y = (n) => {
|
|
293
293
|
r.value = !1, n.handler && n.handler(), l("dismiss", "choose", n?.data);
|
|
294
|
-
},
|
|
294
|
+
}, i = (n) => {
|
|
295
295
|
s.dismiss && s.dismiss.includes(n) ? (r.value = !1, l("dismiss", n)) : n == "backdrop" && (a.value = !0, setTimeout(() => {
|
|
296
296
|
a.value = !1;
|
|
297
297
|
}, 300));
|
|
@@ -301,12 +301,12 @@ const Ie = /* @__PURE__ */ g(Be, [["render", ze]]), Ee = /* @__PURE__ */ h({
|
|
|
301
301
|
}), o({
|
|
302
302
|
open: f,
|
|
303
303
|
close
|
|
304
|
-
}), (n,
|
|
304
|
+
}), (n, u) => (c(), E(q, {
|
|
305
305
|
placement: "bottom",
|
|
306
306
|
backdrop: !0,
|
|
307
307
|
keepalive: !1,
|
|
308
308
|
visible: r.value,
|
|
309
|
-
onDismiss:
|
|
309
|
+
onDismiss: i
|
|
310
310
|
}, {
|
|
311
311
|
default: V(() => [
|
|
312
312
|
$("div", {
|
|
@@ -323,7 +323,7 @@ const Ie = /* @__PURE__ */ g(Be, [["render", ze]]), Ee = /* @__PURE__ */ h({
|
|
|
323
323
|
block: ""
|
|
324
324
|
}, {
|
|
325
325
|
default: V(() => [
|
|
326
|
-
|
|
326
|
+
M(R(k.text), 1)
|
|
327
327
|
]),
|
|
328
328
|
_: 2
|
|
329
329
|
}, 1032, ["color", "size", "variant", "onClick"]))), 256))
|
|
@@ -333,7 +333,7 @@ const Ie = /* @__PURE__ */ g(Be, [["render", ze]]), Ee = /* @__PURE__ */ h({
|
|
|
333
333
|
_: 1
|
|
334
334
|
}, 8, ["visible"]));
|
|
335
335
|
}
|
|
336
|
-
}),
|
|
336
|
+
}), Ne = /* @__PURE__ */ g(Me, [["__scopeId", "data-v-844fb240"]]), xo = (e = {}) => ({
|
|
337
337
|
open() {
|
|
338
338
|
return new Promise((o) => {
|
|
339
339
|
let t = document.body.querySelector(".t-app");
|
|
@@ -342,7 +342,7 @@ const Ie = /* @__PURE__ */ g(Be, [["render", ze]]), Ee = /* @__PURE__ */ h({
|
|
|
342
342
|
t.appendChild(s);
|
|
343
343
|
const l = j({
|
|
344
344
|
render() {
|
|
345
|
-
return K(
|
|
345
|
+
return K(Ne, {
|
|
346
346
|
...e,
|
|
347
347
|
ref: r,
|
|
348
348
|
onDismiss: (d, a) => {
|
|
@@ -421,66 +421,66 @@ const Ie = /* @__PURE__ */ g(Be, [["render", ze]]), Ee = /* @__PURE__ */ h({
|
|
|
421
421
|
getNewIndex() {
|
|
422
422
|
return le.value += 2, le.value;
|
|
423
423
|
}
|
|
424
|
-
}, X = ce([]), Z = v(!0),
|
|
424
|
+
}, X = ce([]), Z = v(!0), z = v(!1), P = v(-1), B = w(() => X[P.value]), N = w(() => X[P.value + 1] || void 0), C = w(() => X[X.length - 2]), fe = w(() => !z.value && Z.value && C.value), Y = {
|
|
425
425
|
reset() {
|
|
426
|
-
|
|
427
|
-
const e = B.value.target, o =
|
|
426
|
+
z.value = !0;
|
|
427
|
+
const e = B.value.target, o = C.value.target;
|
|
428
428
|
e.style.transition = "transform 0.35s ease", e.style.transform = "translateX(0px)", o.style.transition = "transform 0.35s ease", o.style.transform = "translateX(calc(var(--t-app-width) / 100 * 30 * -1)) scale(0.5) perspective(var(--t-app-width)) rotateY(30deg)", document.documentElement.style.setProperty("--t-screen-backdrop-duration", "0.35s"), document.documentElement.style.setProperty("--t-swipe-backdrop-opacity", "0.5"), setTimeout(() => {
|
|
429
|
-
|
|
429
|
+
z.value = !1;
|
|
430
430
|
}, 400);
|
|
431
431
|
},
|
|
432
432
|
move(e) {
|
|
433
433
|
if (!fe.value) return;
|
|
434
|
-
const o = window.innerWidth, t = e / o * 100, s = B.value.target, r =
|
|
434
|
+
const o = window.innerWidth, t = e / o * 100, s = B.value.target, r = C.value.target;
|
|
435
435
|
e > 15 && e <= o && (e = e > 0 ? e : 0, s.style.transition = "transform 0s ease", s.style.transform = `translateX(${e}px)`, r.style.transition = "transform 0s ease", document.documentElement.style.setProperty("--t-screen-backdrop-duration", "0s"), r.style.transform = `translateX(calc((var(--t-app-width) / 100 * 30 * -1) + ((var(--t-app-width) / 100 * 30) / 100 * ${t}))) scale(${0.5 + 0.5 / 100 * t}) perspective(var(--t-app-width)) rotateY(${30 - 30 / 100 * t}deg)`, document.documentElement.style.setProperty("--t-swipe-backdrop-opacity", `${0.5 - 0.5 / 100 * t}`));
|
|
436
436
|
},
|
|
437
437
|
back(e) {
|
|
438
|
-
|
|
439
|
-
|
|
438
|
+
C.value && (B.value.target.style.transition = "transform 0.35s ease", B.value.target.style.transform = "translateX(var(--t-app-width)) scale(1)", C.value.target.style.transition = "transform 0.35s ease", C.value.target.style.transform = "translateX(0px) scale(1) perspective(var(--t-app-width)) rotateY(0deg)", document.documentElement.style.setProperty("--t-screen-backdrop-duration", "0.35s"), document.documentElement.style.setProperty("--t-swipe-backdrop-opacity", "0"), z.value = !0, setTimeout(() => {
|
|
439
|
+
ne(), z.value = !1, P.value -= 1, e && e();
|
|
440
440
|
}, 400));
|
|
441
441
|
},
|
|
442
442
|
next(e) {
|
|
443
|
-
if (!
|
|
443
|
+
if (!N.value) return;
|
|
444
444
|
if (P.value == -1) {
|
|
445
445
|
P.value += 1, e && e();
|
|
446
446
|
return;
|
|
447
447
|
}
|
|
448
|
-
|
|
449
|
-
let o =
|
|
448
|
+
z.value = !0;
|
|
449
|
+
let o = N.value.target;
|
|
450
450
|
o.style.transform = "translateX(var(--t-app-width))", o.transitionOrigin = "center", document.documentElement.style.setProperty("--t-screen-backdrop-duration", "0s"), document.documentElement.style.setProperty("--t-swipe-backdrop-opacity", "0"), setTimeout(() => {
|
|
451
451
|
o.style.transition = "transform 0.35s ease", o.style.transform = "translateX(0px)", document.documentElement.style.setProperty("--t-screen-backdrop-duration", "0.35s"), document.documentElement.style.setProperty("--t-swipe-backdrop-opacity", "0.5"), B.value && (B.value.target.style.transitionOrigin = "left center", B.value.target.style.transition = "transform 0.35s ease", B.value.target.style.transform = "translateX(calc(var(--t-app-width) / 100 * 30 * -1)) scale(0.5) perspective(var(--t-app-width)) rotateY(30deg)"), setTimeout(() => {
|
|
452
|
-
|
|
452
|
+
z.value = !1, P.value += 1, e && e();
|
|
453
453
|
}, 400);
|
|
454
454
|
}, 100);
|
|
455
455
|
}
|
|
456
456
|
}, ee = {
|
|
457
457
|
reset() {
|
|
458
|
-
|
|
459
|
-
const e = B.value.target, o =
|
|
458
|
+
z.value = !0;
|
|
459
|
+
const e = B.value.target, o = C.value.target;
|
|
460
460
|
e.style.transition = "transform 0.35s ease", e.style.transform = "translateX(0px)", o.style.transition = "transform 0.35s ease", o.style.transform = "translateX(calc(var(--t-app-width) / 100 * 30 * -1))", document.documentElement.style.setProperty("--t-screen-backdrop-duration", "0.35s"), document.documentElement.style.setProperty("--t-swipe-backdrop-opacity", "0.5"), setTimeout(() => {
|
|
461
|
-
|
|
461
|
+
z.value = !1;
|
|
462
462
|
}, 400);
|
|
463
463
|
},
|
|
464
464
|
move(e) {
|
|
465
|
-
const o = window.innerWidth, t = e / o * 100, s = B.value.target, r =
|
|
465
|
+
const o = window.innerWidth, t = e / o * 100, s = B.value.target, r = C.value.target;
|
|
466
466
|
e > 15 && e <= o && (e = e > 0 ? e : 0, s.style.transition = "transform 0s ease", s.style.transform = `translateX(${e}px)`, r.style.transition = "transform 0s ease", document.documentElement.style.setProperty("--t-screen-backdrop-duration", "0s"), r.style.transform = `translateX(calc((var(--t-app-width) / 100 * 30 * -1) + ((var(--t-app-width) / 100 * 30) / 100 * ${t})))`, document.documentElement.style.setProperty("--t-swipe-backdrop-opacity", `${0.5 - 0.5 / 100 * t}`));
|
|
467
467
|
},
|
|
468
468
|
back(e) {
|
|
469
|
-
|
|
470
|
-
|
|
469
|
+
C.value && (B.value.target.style.transition = "transform 0.35s ease", B.value.target.style.transform = "translateX(var(--t-app-width)) scale(1)", C.value.target.style.transition = "transform 0.35s ease", C.value.target.style.transform = "translateX(0px)", document.documentElement.style.setProperty("--t-screen-backdrop-duration", "0.35s"), document.documentElement.style.setProperty("--t-swipe-backdrop-opacity", "0"), z.value = !0, setTimeout(() => {
|
|
470
|
+
ne(), z.value = !1, P.value -= 1, e && e();
|
|
471
471
|
}, 400));
|
|
472
472
|
},
|
|
473
473
|
next(e) {
|
|
474
|
-
if (!
|
|
474
|
+
if (!N.value) return;
|
|
475
475
|
if (P.value == -1) {
|
|
476
476
|
P.value += 1, e && e();
|
|
477
477
|
return;
|
|
478
478
|
}
|
|
479
|
-
|
|
480
|
-
let o =
|
|
479
|
+
z.value = !0;
|
|
480
|
+
let o = N.value.target;
|
|
481
481
|
o.style.transform = "translateX(var(--t-app-width))", o.transitionOrigin = "center", document.documentElement.style.setProperty("--t-screen-backdrop-duration", "0s"), document.documentElement.style.setProperty("--t-swipe-backdrop-opacity", "0"), setTimeout(() => {
|
|
482
482
|
o.style.transition = "transform 0.35s ease", o.style.transform = "translateX(0px)", document.documentElement.style.setProperty("--t-screen-backdrop-duration", "0.35s"), document.documentElement.style.setProperty("--t-swipe-backdrop-opacity", "0.5"), B.value && (B.value.target.style.transitionOrigin = "left center", B.value.target.style.transition = "transform 0.35s ease", B.value.target.style.transform = "translateX(calc(var(--t-app-width) / 100 * 30 * -1))"), setTimeout(() => {
|
|
483
|
-
|
|
483
|
+
z.value = !1, P.value += 1, e && e();
|
|
484
484
|
}, 400);
|
|
485
485
|
}, 100);
|
|
486
486
|
}
|
|
@@ -488,7 +488,7 @@ const Ie = /* @__PURE__ */ g(Be, [["render", ze]]), Ee = /* @__PURE__ */ h({
|
|
|
488
488
|
X.push(e);
|
|
489
489
|
}, Ue = (e, o) => {
|
|
490
490
|
X[e].target = o;
|
|
491
|
-
},
|
|
491
|
+
}, ne = (e) => {
|
|
492
492
|
e || X.pop();
|
|
493
493
|
}, je = () => {
|
|
494
494
|
X.splice(0, X.length);
|
|
@@ -505,7 +505,7 @@ const Ie = /* @__PURE__ */ g(Be, [["render", ze]]), Ee = /* @__PURE__ */ h({
|
|
|
505
505
|
}, et = (e) => {
|
|
506
506
|
e == "scale" && Y.reset(), e == "transform" && ee.reset();
|
|
507
507
|
}, T = {
|
|
508
|
-
isBusy:
|
|
508
|
+
isBusy: z,
|
|
509
509
|
isSwipeable: fe,
|
|
510
510
|
reset: et,
|
|
511
511
|
next: Qe,
|
|
@@ -514,14 +514,14 @@ const Ie = /* @__PURE__ */ g(Be, [["render", ze]]), Ee = /* @__PURE__ */ h({
|
|
|
514
514
|
screens: X,
|
|
515
515
|
addScreen: Ge,
|
|
516
516
|
addScreenEl: Ue,
|
|
517
|
-
removeScreen:
|
|
517
|
+
removeScreen: ne,
|
|
518
518
|
removeAllScreen: je,
|
|
519
519
|
lockSwipe: Ke,
|
|
520
520
|
unlockSwipe: Je,
|
|
521
521
|
swipeable: Z,
|
|
522
522
|
currentScreen: B,
|
|
523
|
-
lastScreen:
|
|
524
|
-
nextScreen:
|
|
523
|
+
lastScreen: C,
|
|
524
|
+
nextScreen: N
|
|
525
525
|
}, tt = { class: "t-toast-content" }, ot = /* @__PURE__ */ h({
|
|
526
526
|
__name: "t-toast",
|
|
527
527
|
props: {
|
|
@@ -546,7 +546,7 @@ const Ie = /* @__PURE__ */ g(Be, [["render", ze]]), Ee = /* @__PURE__ */ h({
|
|
|
546
546
|
D(() => s.visible, (n) => {
|
|
547
547
|
n ? f() : y();
|
|
548
548
|
});
|
|
549
|
-
const
|
|
549
|
+
const i = w(() => {
|
|
550
550
|
let n;
|
|
551
551
|
return s.variant == "default" && (s.color ? ["warning", "info", "danger", "primary", "secondary", "success"].includes(s.color) ? n = {
|
|
552
552
|
"--border": "none",
|
|
@@ -589,15 +589,15 @@ const Ie = /* @__PURE__ */ g(Be, [["render", ze]]), Ee = /* @__PURE__ */ h({
|
|
|
589
589
|
return o({
|
|
590
590
|
open: f,
|
|
591
591
|
close: y
|
|
592
|
-
}), (n,
|
|
592
|
+
}), (n, u) => d.value ? (c(), p("div", {
|
|
593
593
|
key: 0,
|
|
594
594
|
class: S(["t-toast", { [s.placement]: !0, open: l.value, closing: a.value }]),
|
|
595
|
-
style: x({ "--space": s.space, ...
|
|
595
|
+
style: x({ "--space": s.space, ...i.value })
|
|
596
596
|
}, [
|
|
597
597
|
b(n.$slots, "content", {}, () => [
|
|
598
598
|
$("div", tt, R(s.message), 1)
|
|
599
599
|
], !0)
|
|
600
|
-
], 6)) :
|
|
600
|
+
], 6)) : I("", !0);
|
|
601
601
|
}
|
|
602
602
|
}), me = /* @__PURE__ */ g(ot, [["__scopeId", "data-v-2802d43f"]]), So = (e = {}) => ({
|
|
603
603
|
open() {
|
|
@@ -689,15 +689,15 @@ const ye = /* @__PURE__ */ g(lt, [["render", it], ["__scopeId", "data-v-af750e89
|
|
|
689
689
|
let a, f = !1;
|
|
690
690
|
const y = () => {
|
|
691
691
|
l.value = !1, r.value = 0, a && a.cancel(), f = !1;
|
|
692
|
-
},
|
|
692
|
+
}, i = () => {
|
|
693
693
|
f = !0, l.value = !0, r.value = s.threshold, t("refresh", y);
|
|
694
694
|
}, n = () => {
|
|
695
695
|
r.value = 0, l.value = !1, f = !1, t("cancel");
|
|
696
696
|
};
|
|
697
697
|
return D(() => d.value, () => {
|
|
698
698
|
a && a.destroy();
|
|
699
|
-
let
|
|
700
|
-
|
|
699
|
+
let u = d.value.closest(".t-content");
|
|
700
|
+
u && (a = re(u, {
|
|
701
701
|
options: {
|
|
702
702
|
minDist: 60
|
|
703
703
|
},
|
|
@@ -707,14 +707,14 @@ const ye = /* @__PURE__ */ g(lt, [["render", it], ["__scopeId", "data-v-af750e89
|
|
|
707
707
|
move({ deltaY: _, initialDirection: k }) {
|
|
708
708
|
if (l.value || f || k != "down") return;
|
|
709
709
|
if (s.variant == "max" && _ >= s.threshold) {
|
|
710
|
-
|
|
710
|
+
i();
|
|
711
711
|
return;
|
|
712
712
|
}
|
|
713
713
|
const m = _ < 0 ? 0 : _;
|
|
714
714
|
r.value = m, t("move", m);
|
|
715
715
|
},
|
|
716
716
|
up({ deltaY: _, initialDirection: k }) {
|
|
717
|
-
l.value || f || k != "down" || (s.variant == "up" && _ >= s.threshold ?
|
|
717
|
+
l.value || f || k != "down" || (s.variant == "up" && _ >= s.threshold ? i() : n());
|
|
718
718
|
},
|
|
719
719
|
cancel() {
|
|
720
720
|
l.value || f || n();
|
|
@@ -722,14 +722,14 @@ const ye = /* @__PURE__ */ g(lt, [["render", it], ["__scopeId", "data-v-af750e89
|
|
|
722
722
|
}, {
|
|
723
723
|
passive: !1
|
|
724
724
|
}));
|
|
725
|
-
}),
|
|
725
|
+
}), se(() => {
|
|
726
726
|
a && a.destroy();
|
|
727
|
-
}), (
|
|
728
|
-
class: S(["t-refresher", { safe:
|
|
727
|
+
}), (u, _) => L((c(), p("div", {
|
|
728
|
+
class: S(["t-refresher", { safe: u.safe }]),
|
|
729
729
|
ref_key: "container",
|
|
730
730
|
ref: d
|
|
731
731
|
}, [
|
|
732
|
-
b(
|
|
732
|
+
b(u.$slots, "default", {
|
|
733
733
|
offset: r.value,
|
|
734
734
|
refreshing: l.value
|
|
735
735
|
}, void 0, !0)
|
|
@@ -764,28 +764,28 @@ const _e = /* @__PURE__ */ g(pt, [["render", mt], ["__scopeId", "data-v-c2a3436c
|
|
|
764
764
|
target: null,
|
|
765
765
|
component: he(t[n] || null)
|
|
766
766
|
});
|
|
767
|
-
},
|
|
768
|
-
!
|
|
767
|
+
}, i = (n, u) => {
|
|
768
|
+
!u || T.screens[n].target || (T.addScreenEl(n, u.$el), T.nextScreen && T.next(r.variant, () => {
|
|
769
769
|
s("change");
|
|
770
770
|
}));
|
|
771
771
|
};
|
|
772
|
-
return D(() => a.name, (n,
|
|
772
|
+
return D(() => a.name, (n, u) => {
|
|
773
773
|
n != T.currentScreen.value?.name && (T.lastScreen.value?.name == n ? T.back(r.variant, () => {
|
|
774
774
|
s("change");
|
|
775
775
|
}) : y(a.name));
|
|
776
776
|
}), G(() => {
|
|
777
|
-
y(a.name), l =
|
|
777
|
+
y(a.name), l = re(document.body, {
|
|
778
778
|
beforeEvent(n) {
|
|
779
779
|
return !!T.isSwipeable.value;
|
|
780
780
|
},
|
|
781
781
|
fast({ initialDirection: n }) {
|
|
782
782
|
T.lastScreen.value && n == "right" && d.back();
|
|
783
783
|
},
|
|
784
|
-
move({ deltaX: n, initialDirection:
|
|
785
|
-
|
|
784
|
+
move({ deltaX: n, initialDirection: u }) {
|
|
785
|
+
u == "right" && T.move(r.variant, n);
|
|
786
786
|
},
|
|
787
|
-
up({ deltaX: n, initialDirection:
|
|
788
|
-
if (
|
|
787
|
+
up({ deltaX: n, initialDirection: u }) {
|
|
788
|
+
if (u != "right") {
|
|
789
789
|
T.reset(r.variant);
|
|
790
790
|
return;
|
|
791
791
|
}
|
|
@@ -796,12 +796,12 @@ const _e = /* @__PURE__ */ g(pt, [["render", mt], ["__scopeId", "data-v-c2a3436c
|
|
|
796
796
|
T.reset(r.variant);
|
|
797
797
|
}
|
|
798
798
|
});
|
|
799
|
-
}),
|
|
799
|
+
}), se(() => {
|
|
800
800
|
l && l.destroy(), T.removeAllScreen();
|
|
801
|
-
}), (n,
|
|
801
|
+
}), (n, u) => (c(), p(W, null, [
|
|
802
802
|
(c(!0), p(W, null, F(A(T).screens, (_, k) => (c(), E(_e, {
|
|
803
803
|
ref_for: !0,
|
|
804
|
-
ref: (m) =>
|
|
804
|
+
ref: (m) => i(k, m),
|
|
805
805
|
style: x({ zIndex: k + (k == A(T).screens.length - 1 ? 2 : 1) }),
|
|
806
806
|
key: k
|
|
807
807
|
}, {
|
|
@@ -856,7 +856,7 @@ const _e = /* @__PURE__ */ g(pt, [["render", mt], ["__scopeId", "data-v-c2a3436c
|
|
|
856
856
|
b(l.$slots, "default", {}, () => [
|
|
857
857
|
d[0] || (d[0] = $("i", { class: "ri-arrow-left-s-line" }, null, -1))
|
|
858
858
|
], !0)
|
|
859
|
-
])) :
|
|
859
|
+
])) : I("", !0);
|
|
860
860
|
}
|
|
861
861
|
}), ht = /* @__PURE__ */ g(bt, [["__scopeId", "data-v-dcf9d363"]]), kt = /* @__PURE__ */ h({
|
|
862
862
|
__name: "t-text",
|
|
@@ -879,7 +879,7 @@ const _e = /* @__PURE__ */ g(pt, [["render", mt], ["__scopeId", "data-v-c2a3436c
|
|
|
879
879
|
b(s.$slots, "default", {}, void 0, !0)
|
|
880
880
|
], 4));
|
|
881
881
|
}
|
|
882
|
-
}),
|
|
882
|
+
}), oe = /* @__PURE__ */ g(kt, [["__scopeId", "data-v-f0f94f05"]]), $t = /* @__PURE__ */ h({
|
|
883
883
|
__name: "t-gesture-indicator",
|
|
884
884
|
props: {
|
|
885
885
|
placement: { default: "bottom" }
|
|
@@ -916,49 +916,49 @@ const _e = /* @__PURE__ */ g(pt, [["render", mt], ["__scopeId", "data-v-c2a3436c
|
|
|
916
916
|
if (t.placement == "right") return "right";
|
|
917
917
|
}), y = (n) => {
|
|
918
918
|
s("dismiss", n);
|
|
919
|
-
},
|
|
919
|
+
}, i = () => {
|
|
920
920
|
d.value = !0, setTimeout(() => {
|
|
921
921
|
d.value = !1;
|
|
922
922
|
}, 300);
|
|
923
923
|
};
|
|
924
924
|
return D(() => r.value, (n) => {
|
|
925
|
-
n && (a =
|
|
925
|
+
n && (a = re(r.value, {
|
|
926
926
|
isMoving: !1,
|
|
927
927
|
options: {
|
|
928
928
|
minDist: 30
|
|
929
929
|
},
|
|
930
|
-
beforeEvent(
|
|
930
|
+
beforeEvent(u) {
|
|
931
931
|
return !(d.value || !t.gesture || t.placement == "center");
|
|
932
932
|
},
|
|
933
933
|
down() {
|
|
934
934
|
this.isMoving = !1;
|
|
935
935
|
},
|
|
936
|
-
fast({ initialDirection:
|
|
937
|
-
|
|
936
|
+
fast({ initialDirection: u }) {
|
|
937
|
+
i(), u == f.value ? s("dismiss", "gesture") : l.value.open();
|
|
938
938
|
},
|
|
939
|
-
move({ deltaY:
|
|
939
|
+
move({ deltaY: u, deltaX: _, initialDirection: k }) {
|
|
940
940
|
if (k != f.value) return;
|
|
941
941
|
let m = 0;
|
|
942
|
-
t.placement == "bottom" || t.placement == "top" ? m =
|
|
942
|
+
t.placement == "bottom" || t.placement == "top" ? m = u : m = _, t.placement == "bottom" && (m = u > 0 ? u : 0), t.placement == "top" && (m = u < 0 ? u : 0), t.placement == "left" && (m = _ < 0 ? _ : 0), t.placement == "right" && (m = _ > 0 ? _ : 0), (t.placement == "bottom" && (m >= 10 || this.isMoving) || t.placement == "top" && (m <= -10 || this.isMoving) || t.placement == "left" && (m <= -10 || this.isMoving) || t.placement == "right" && (m >= 10 || this.isMoving)) && (this.isMoving = !0, l.value.render({
|
|
943
943
|
contentTransform: m + "px",
|
|
944
944
|
transition: "0s"
|
|
945
945
|
}));
|
|
946
946
|
},
|
|
947
|
-
up({ deltaY:
|
|
948
|
-
if (this.isMoving = !1,
|
|
947
|
+
up({ deltaY: u, deltaX: _, initialDirection: k }) {
|
|
948
|
+
if (this.isMoving = !1, i(), k != f.value) {
|
|
949
949
|
l.value.open();
|
|
950
950
|
return;
|
|
951
951
|
}
|
|
952
952
|
let m, O, te;
|
|
953
|
-
t.placement == "bottom" || t.placement == "top" ? (m = r.value.offsetHeight, te =
|
|
953
|
+
t.placement == "bottom" || t.placement == "top" ? (m = r.value.offsetHeight, te = u) : (m = r.value.offsetWidth, te = _), O = te / m * 100, O > 50 ? s("dismiss", "gesture") : l.value.open();
|
|
954
954
|
},
|
|
955
955
|
cancel() {
|
|
956
|
-
this.isMoving = !1,
|
|
956
|
+
this.isMoving = !1, i(), l.value.open();
|
|
957
957
|
}
|
|
958
958
|
}));
|
|
959
|
-
}),
|
|
959
|
+
}), se(() => {
|
|
960
960
|
a && a.destroy();
|
|
961
|
-
}), (n,
|
|
961
|
+
}), (n, u) => (c(), E(q, {
|
|
962
962
|
ref_key: "present",
|
|
963
963
|
ref: l,
|
|
964
964
|
class: S(t.class),
|
|
@@ -973,7 +973,7 @@ const _e = /* @__PURE__ */ g(pt, [["render", mt], ["__scopeId", "data-v-c2a3436c
|
|
|
973
973
|
t.gesture && t.indicator && t.placement != "center" ? (c(), E(ge, {
|
|
974
974
|
key: 0,
|
|
975
975
|
placement: t.placement
|
|
976
|
-
}, null, 8, ["placement"])) :
|
|
976
|
+
}, null, 8, ["placement"])) : I("", !0),
|
|
977
977
|
$("div", {
|
|
978
978
|
class: S(["t-sheet", { fullscreen: t.fullscreen, [t.placement]: !0, rounded: n.rounded, radius: t.radius }]),
|
|
979
979
|
style: x({ "--background": t.background }),
|
|
@@ -986,7 +986,7 @@ const _e = /* @__PURE__ */ g(pt, [["render", mt], ["__scopeId", "data-v-c2a3436c
|
|
|
986
986
|
_: 3
|
|
987
987
|
}, 8, ["class", "placement", "backdrop", "visible", "keepalive", "style"]));
|
|
988
988
|
}
|
|
989
|
-
}), xt = /* @__PURE__ */ g(wt, [["__scopeId", "data-v-6f7063f0"]]), Tt = { class: "t-input-label" }, St = { class: "t-input-content" }, Bt = ["placeholder", "value"],
|
|
989
|
+
}), xt = /* @__PURE__ */ g(wt, [["__scopeId", "data-v-6f7063f0"]]), Tt = { class: "t-input-label" }, St = { class: "t-input-content" }, Bt = ["placeholder", "value"], zt = /* @__PURE__ */ h({
|
|
990
990
|
__name: "t-input",
|
|
991
991
|
props: {
|
|
992
992
|
size: { default: "standard" },
|
|
@@ -1004,71 +1004,66 @@ const _e = /* @__PURE__ */ g(pt, [["render", mt], ["__scopeId", "data-v-c2a3436c
|
|
|
1004
1004
|
setup(e, { emit: o }) {
|
|
1005
1005
|
const t = e, s = o, r = v(!1), l = v(null), d = w(
|
|
1006
1006
|
() => !(t.modelValue === "" || t.modelValue == null)
|
|
1007
|
-
), a = (
|
|
1008
|
-
s("update:modelValue",
|
|
1009
|
-
}, f = async (
|
|
1010
|
-
r.value = !0
|
|
1011
|
-
const n = l.value;
|
|
1012
|
-
if (n) {
|
|
1013
|
-
const i = document.createRange(), _ = window.getSelection();
|
|
1014
|
-
i.selectNodeContents(n), i.collapse(!1), _?.removeAllRanges(), _?.addRange(i), n.focus();
|
|
1015
|
-
}
|
|
1007
|
+
), a = (i) => {
|
|
1008
|
+
s("update:modelValue", i.target.value);
|
|
1009
|
+
}, f = async (i) => {
|
|
1010
|
+
r.value = !0;
|
|
1016
1011
|
}, y = () => {
|
|
1017
1012
|
r.value = !1;
|
|
1018
1013
|
};
|
|
1019
|
-
return (
|
|
1014
|
+
return (i, n) => (c(), p("div", {
|
|
1020
1015
|
class: S(["t-input", {
|
|
1021
|
-
rounded:
|
|
1022
|
-
["size-" +
|
|
1023
|
-
["variant-" +
|
|
1016
|
+
rounded: i.rounded,
|
|
1017
|
+
["size-" + i.size]: !0,
|
|
1018
|
+
["variant-" + i.variant]: !0,
|
|
1024
1019
|
focus: r.value,
|
|
1025
1020
|
"has-value": d.value,
|
|
1026
|
-
readonly:
|
|
1021
|
+
readonly: i.readonly
|
|
1027
1022
|
}])
|
|
1028
1023
|
}, [
|
|
1029
1024
|
$("label", null, [
|
|
1030
|
-
$("span", Tt, R(
|
|
1025
|
+
$("span", Tt, R(i.label), 1),
|
|
1031
1026
|
$("div", St, [
|
|
1032
|
-
b(
|
|
1027
|
+
b(i.$slots, "start", {}, void 0, !0),
|
|
1033
1028
|
$("input", {
|
|
1034
1029
|
ref_key: "editable",
|
|
1035
1030
|
ref: l,
|
|
1036
1031
|
class: "t-input-editable",
|
|
1037
1032
|
contenteditable: "true",
|
|
1038
|
-
placeholder:
|
|
1039
|
-
value:
|
|
1033
|
+
placeholder: i.placeholder,
|
|
1034
|
+
value: i.modelValue,
|
|
1040
1035
|
onInput: a,
|
|
1041
1036
|
onTouchstart: $e(f, ["prevent"]),
|
|
1042
1037
|
onMousedown: f,
|
|
1043
1038
|
onBlur: y
|
|
1044
1039
|
}, null, 40, Bt),
|
|
1045
|
-
b(
|
|
1040
|
+
b(i.$slots, "end", {}, void 0, !0)
|
|
1046
1041
|
])
|
|
1047
1042
|
]),
|
|
1048
|
-
|
|
1043
|
+
i.error ? (c(), E(oe, {
|
|
1049
1044
|
key: 0,
|
|
1050
1045
|
color: "danger"
|
|
1051
1046
|
}, {
|
|
1052
1047
|
default: V(() => [
|
|
1053
|
-
|
|
1048
|
+
M(R(i.error), 1)
|
|
1054
1049
|
]),
|
|
1055
1050
|
_: 1
|
|
1056
|
-
})) :
|
|
1051
|
+
})) : i.help ? (c(), E(oe, {
|
|
1057
1052
|
key: 1,
|
|
1058
1053
|
color: "secondary"
|
|
1059
1054
|
}, {
|
|
1060
1055
|
default: V(() => [
|
|
1061
|
-
|
|
1056
|
+
M(R(i.help), 1)
|
|
1062
1057
|
]),
|
|
1063
1058
|
_: 1
|
|
1064
|
-
})) :
|
|
1059
|
+
})) : I("", !0)
|
|
1065
1060
|
], 2));
|
|
1066
1061
|
}
|
|
1067
|
-
}),
|
|
1062
|
+
}), It = /* @__PURE__ */ g(zt, [["__scopeId", "data-v-d9a83433"]]), Ct = {};
|
|
1068
1063
|
function Et(e, o) {
|
|
1069
1064
|
return c(), p("textarea");
|
|
1070
1065
|
}
|
|
1071
|
-
const Vt = /* @__PURE__ */ g(
|
|
1066
|
+
const Vt = /* @__PURE__ */ g(Ct, [["render", Et]]), Pt = {};
|
|
1072
1067
|
function Rt(e, o) {
|
|
1073
1068
|
return c(), p("div");
|
|
1074
1069
|
}
|
|
@@ -1076,11 +1071,11 @@ const At = /* @__PURE__ */ g(Pt, [["render", Rt]]), Xt = {}, Dt = { class: "t-gr
|
|
|
1076
1071
|
function Ot(e, o) {
|
|
1077
1072
|
return c(), p("div", Dt);
|
|
1078
1073
|
}
|
|
1079
|
-
const Wt = /* @__PURE__ */ g(Xt, [["render", Ot]]),
|
|
1074
|
+
const Wt = /* @__PURE__ */ g(Xt, [["render", Ot]]), Mt = {}, Nt = { class: "t-grid-item" };
|
|
1080
1075
|
function qt(e, o) {
|
|
1081
|
-
return c(), p("div",
|
|
1076
|
+
return c(), p("div", Nt);
|
|
1082
1077
|
}
|
|
1083
|
-
const Lt = /* @__PURE__ */ g(
|
|
1078
|
+
const Lt = /* @__PURE__ */ g(Mt, [["render", qt]]), Ht = /* @__PURE__ */ h({
|
|
1084
1079
|
__name: "t-divider",
|
|
1085
1080
|
props: {
|
|
1086
1081
|
direction: { default: "horizontal" }
|
|
@@ -1112,7 +1107,7 @@ const Lt = /* @__PURE__ */ g(Nt, [["render", qt]]), Ht = /* @__PURE__ */ h({
|
|
|
1112
1107
|
let y = a();
|
|
1113
1108
|
y && (r.value = !r.value, r.value ? y.type = "text" : y.type = "password", s("change", r.value));
|
|
1114
1109
|
};
|
|
1115
|
-
return (y,
|
|
1110
|
+
return (y, i) => (c(), p("button", {
|
|
1116
1111
|
ref_key: "toggle",
|
|
1117
1112
|
ref: l,
|
|
1118
1113
|
class: "t-toggle-password",
|
|
@@ -1120,10 +1115,10 @@ const Lt = /* @__PURE__ */ g(Nt, [["render", qt]]), Ht = /* @__PURE__ */ h({
|
|
|
1120
1115
|
onClick: f
|
|
1121
1116
|
}, [
|
|
1122
1117
|
r.value ? b(y.$slots, "on", { key: 0 }, () => [
|
|
1123
|
-
|
|
1124
|
-
], !0) :
|
|
1125
|
-
r.value ?
|
|
1126
|
-
|
|
1118
|
+
i[0] || (i[0] = $("i", { class: "ri-eye-line" }, null, -1))
|
|
1119
|
+
], !0) : I("", !0),
|
|
1120
|
+
r.value ? I("", !0) : b(y.$slots, "off", { key: 1 }, () => [
|
|
1121
|
+
i[1] || (i[1] = $("i", { class: "ri-eye-off-line" }, null, -1))
|
|
1127
1122
|
], !0)
|
|
1128
1123
|
], 4));
|
|
1129
1124
|
}
|
|
@@ -1169,7 +1164,7 @@ const Lt = /* @__PURE__ */ g(Nt, [["render", qt]]), Ht = /* @__PURE__ */ h({
|
|
|
1169
1164
|
b(f.$slots, "icon"),
|
|
1170
1165
|
$("div", Jt, [
|
|
1171
1166
|
b(f.$slots, "title", {}, () => [
|
|
1172
|
-
|
|
1167
|
+
M(R(t.title), 1)
|
|
1173
1168
|
])
|
|
1174
1169
|
]),
|
|
1175
1170
|
b(f.$slots, "toggle", {}, () => [
|
|
@@ -1261,8 +1256,8 @@ const Lt = /* @__PURE__ */ g(Nt, [["render", qt]]), Ht = /* @__PURE__ */ h({
|
|
|
1261
1256
|
emits: ["update:modelValue"],
|
|
1262
1257
|
setup(e, { emit: o }) {
|
|
1263
1258
|
const t = e, s = o, r = v("0px"), l = v(0), d = v(0), a = v(), f = w(() => {
|
|
1264
|
-
let n = "",
|
|
1265
|
-
return t.variant == "text" && (n = "transparent", ["warning", "info", "danger", "primary", "secondary", "success"].includes(t.color) ?
|
|
1259
|
+
let n = "", u = "";
|
|
1260
|
+
return t.variant == "text" && (n = "transparent", ["warning", "info", "danger", "primary", "secondary", "success"].includes(t.color) ? u = `var(--t-color-status-${t.color})` : u = t.color), t.variant == "border-under" && (u = "currentColor", ["warning", "info", "danger", "primary", "secondary", "success"].includes(t.color) ? n = `var(--t-color-status-${t.color})` : n = t.color), t.variant == "tag" && (["warning", "info", "danger", "primary", "secondary", "success"].includes(t.color) ? (n = `var(--t-color-status-${t.color})`, u = `var(--t-color-status-${t.color}-text)`) : (n = t.color, u = "currentColor")), { background: n, text: u };
|
|
1266
1261
|
}), y = w(() => t.variant == "border-under" ? {
|
|
1267
1262
|
"--transform": r.value,
|
|
1268
1263
|
"--border": t.border + "px"
|
|
@@ -1273,23 +1268,23 @@ const Lt = /* @__PURE__ */ g(Nt, [["render", qt]]), Ht = /* @__PURE__ */ h({
|
|
|
1273
1268
|
"--width": l.value - t.margin[1] * 2 + "px",
|
|
1274
1269
|
"--transform": r.value,
|
|
1275
1270
|
"--radius": t.radius + "px"
|
|
1276
|
-
} : {}),
|
|
1271
|
+
} : {}), i = () => {
|
|
1277
1272
|
if (t.variant == "border-under") {
|
|
1278
1273
|
let n = a.value.querySelector(".active");
|
|
1279
1274
|
if (n) {
|
|
1280
1275
|
if (t.placement.startsWith("top-") || t.placement.startsWith("bottom-")) {
|
|
1281
|
-
let
|
|
1282
|
-
r.value =
|
|
1276
|
+
let u = n.getBoundingClientRect().left - a.value.getBoundingClientRect().left + a.value.scrollLeft, _ = n.offsetWidth / 2;
|
|
1277
|
+
r.value = u + _ - t.border / 2 + "px";
|
|
1283
1278
|
} else if (t.placement.startsWith("left-") || t.placement.startsWith("right-")) {
|
|
1284
|
-
let
|
|
1285
|
-
r.value =
|
|
1279
|
+
let u = n.getBoundingClientRect().top - a.value.getBoundingClientRect().top + a.value.scrollTop, _ = n.offsetHeight / 2;
|
|
1280
|
+
r.value = u + _ - t.border / 2 + "px";
|
|
1286
1281
|
}
|
|
1287
1282
|
}
|
|
1288
1283
|
}
|
|
1289
1284
|
if (t.variant == "tag") {
|
|
1290
1285
|
let n = a.value.querySelector(".active");
|
|
1291
1286
|
if (n) {
|
|
1292
|
-
let
|
|
1287
|
+
let u = n.offsetWidth, _ = n.offsetHeight;
|
|
1293
1288
|
if (t.placement.startsWith("top-") || t.placement.startsWith("bottom-")) {
|
|
1294
1289
|
let k = n.getBoundingClientRect().left - a.value.getBoundingClientRect().left + a.value.scrollLeft;
|
|
1295
1290
|
r.value = k + "px";
|
|
@@ -1297,7 +1292,7 @@ const Lt = /* @__PURE__ */ g(Nt, [["render", qt]]), Ht = /* @__PURE__ */ h({
|
|
|
1297
1292
|
let k = n.getBoundingClientRect().top - a.value.getBoundingClientRect().top + a.value.scrollTop;
|
|
1298
1293
|
r.value = k + "px";
|
|
1299
1294
|
}
|
|
1300
|
-
l.value =
|
|
1295
|
+
l.value = u, d.value = _;
|
|
1301
1296
|
}
|
|
1302
1297
|
}
|
|
1303
1298
|
};
|
|
@@ -1310,10 +1305,10 @@ const Lt = /* @__PURE__ */ g(Nt, [["render", qt]]), Ht = /* @__PURE__ */ h({
|
|
|
1310
1305
|
s("update:modelValue", n);
|
|
1311
1306
|
}
|
|
1312
1307
|
}), D(() => t.modelValue, async () => {
|
|
1313
|
-
await
|
|
1308
|
+
await ae(), i();
|
|
1314
1309
|
}), G(async () => {
|
|
1315
|
-
await
|
|
1316
|
-
}), (n,
|
|
1310
|
+
await ae(), i();
|
|
1311
|
+
}), (n, u) => (c(), p("ul", {
|
|
1317
1312
|
ref_key: "container",
|
|
1318
1313
|
ref: a,
|
|
1319
1314
|
class: S(["t-tabs", { [n.placement]: !0, [`variant-${n.variant}`]: !0 }]),
|
|
@@ -1371,13 +1366,13 @@ const Lt = /* @__PURE__ */ g(Nt, [["render", qt]]), Ht = /* @__PURE__ */ h({
|
|
|
1371
1366
|
$("div", {
|
|
1372
1367
|
class: S(`t-checkbox-${a.type}`)
|
|
1373
1368
|
}, [
|
|
1374
|
-
a.type == "radio" ? (c(), p("div", io)) :
|
|
1369
|
+
a.type == "radio" ? (c(), p("div", io)) : I("", !0),
|
|
1375
1370
|
a.type == "check" ? b(a.$slots, "icon", { key: 1 }, () => [
|
|
1376
1371
|
f[0] || (f[0] = $("i", { class: "ri-check-line" }, null, -1))
|
|
1377
|
-
], !0) :
|
|
1372
|
+
], !0) : I("", !0)
|
|
1378
1373
|
], 2),
|
|
1379
1374
|
b(a.$slots, "label", {}, () => [
|
|
1380
|
-
a.label ? (c(), p("span", uo, R(t.label), 1)) :
|
|
1375
|
+
a.label ? (c(), p("span", uo, R(t.label), 1)) : I("", !0)
|
|
1381
1376
|
], !0)
|
|
1382
1377
|
], 6));
|
|
1383
1378
|
}
|
|
@@ -1432,7 +1427,7 @@ const Lt = /* @__PURE__ */ g(Nt, [["render", qt]]), Ht = /* @__PURE__ */ h({
|
|
|
1432
1427
|
}
|
|
1433
1428
|
}), bo = /* @__PURE__ */ g(go, [["__scopeId", "data-v-42cb3d71"]]), Bo = () => ({
|
|
1434
1429
|
install: (e) => {
|
|
1435
|
-
Se(), e.component("t-app",
|
|
1430
|
+
Se(), e.component("t-app", Ce), e.component("t-screen", _e), e.component("t-swipe-screen", yt), e.component("t-cable", nt), e.component("t-toolbar", gt), e.component("t-content", ye), e.component("t-card", at), e.component("t-refresher", dt), e.component("t-button", Q), e.component("t-back-button", ht), e.component("t-present", q), e.component("t-text", oe), e.component("t-sheet", xt), e.component("t-gesture-indicator", ge), e.component("t-input", It), e.component("t-textarea", Vt), e.component("t-rich-text", At), e.component("t-grid", Wt), e.component("t-grid-item", Lt), e.component("t-divider", Ft), e.component("t-toggle-password", Ut), e.component("t-loading-icon", J), e.component("t-alert", pe), e.component("t-avatar", Kt), e.component("t-collapse", eo), e.component("t-toast", me), e.component("t-switch", oo), e.component("t-tab", ro), e.component("t-tabs", ao), e.component("t-loading-app", co), e.component("t-checkbox", fo), e.component("t-keyboard-space", vo), e.component("t-skeleton", _o), e.component("t-ripple", bo);
|
|
1436
1431
|
}
|
|
1437
1432
|
});
|
|
1438
1433
|
export {
|