@toife/vue 1.2.28 → 1.2.30
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-ripple.vue.d.ts +7 -0
- package/dist/index.css +1 -1
- package/dist/index.es.js +170 -149
- package/dist/index.umd.js +1 -1
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { createElementBlock as p, openBlock as c, renderSlot as h, defineComponent as
|
|
1
|
+
import { createElementBlock as p, openBlock as c, renderSlot as h, defineComponent as b, ref as v, computed as x, reactive as te, watch as L, Fragment as R, withDirectives as O, createCommentVNode as I, normalizeStyle as T, normalizeClass as S, vShow as N, createElementVNode as $, createVNode as W, createBlock as B, withCtx as V, toDisplayString as M, renderList as q, createTextVNode as A, createApp as H, h as U, unref as E, onUnmounted as G, onMounted as K, resolveDynamicComponent as ie, markRaw as ue, inject as de, provide as pe } from "vue";
|
|
2
2
|
import { gesture as J } from "@toife/gesture";
|
|
3
3
|
import { useRouter as oe, useRoute as fe } from "vue-router";
|
|
4
4
|
const me = (o) => o && (o.tagName == "INPUT" || o.tagName == "TEXTAREA" || o.isContentEditable), ve = () => {
|
|
@@ -8,7 +8,7 @@ const me = (o) => o && (o.tagName == "INPUT" || o.tagName == "TEXTAREA" || o.isC
|
|
|
8
8
|
document.addEventListener("contextmenu", (o) => o.preventDefault()), document.addEventListener("selectstart", (o) => o.preventDefault()), document.addEventListener("pointerup", (o) => {
|
|
9
9
|
!me(o.target) && ve();
|
|
10
10
|
});
|
|
11
|
-
},
|
|
11
|
+
}, _ = (o, s) => {
|
|
12
12
|
const e = o.__vccOpts || o;
|
|
13
13
|
for (const [t, n] of s)
|
|
14
14
|
e[t] = n;
|
|
@@ -19,7 +19,7 @@ function he(o, s) {
|
|
|
19
19
|
h(o.$slots, "default")
|
|
20
20
|
]);
|
|
21
21
|
}
|
|
22
|
-
const be = /* @__PURE__ */
|
|
22
|
+
const be = /* @__PURE__ */ _(ye, [["render", he]]), ke = /* @__PURE__ */ b({
|
|
23
23
|
__name: "t-present",
|
|
24
24
|
props: {
|
|
25
25
|
keepalive: { type: Boolean, default: !0 },
|
|
@@ -29,13 +29,13 @@ const be = /* @__PURE__ */ y(ye, [["render", he]]), ke = /* @__PURE__ */ k({
|
|
|
29
29
|
},
|
|
30
30
|
emits: ["dismiss"],
|
|
31
31
|
setup(o, { expose: s, emit: e }) {
|
|
32
|
-
const t = v(0), n = v(!1), r = v(), i = v(), a = o, d = e, m =
|
|
32
|
+
const t = v(0), n = v(!1), r = v(), i = v(), a = o, d = e, m = x(() => n.value || a.keepalive), y = te({
|
|
33
33
|
"--t-present-backdrop-opacity": "0.4",
|
|
34
34
|
"--t-present-transition": "0.2s",
|
|
35
35
|
"--t-present-content-transform": "0px",
|
|
36
36
|
"--t-present-content-opacity": "1"
|
|
37
37
|
}), l = (f) => {
|
|
38
|
-
a.backdrop ? f?.backdropOpacity && (
|
|
38
|
+
a.backdrop ? f?.backdropOpacity && (y["--t-present-backdrop-opacity"] = f.backdropOpacity) : y["--t-present-backdrop-opacity"] = "0", f?.transition && (y["--t-present-transition"] = f.transition, y["--t-present-transition"] = f.transition), f?.contentTransform && (y["--t-present-content-transform"] = f.contentTransform), f?.contentOpacity && (y["--t-present-content-opacity"] = f.contentOpacity);
|
|
39
39
|
}, g = () => {
|
|
40
40
|
l({
|
|
41
41
|
contentTransform: "0px",
|
|
@@ -53,7 +53,7 @@ const be = /* @__PURE__ */ y(ye, [["render", he]]), ke = /* @__PURE__ */ k({
|
|
|
53
53
|
});
|
|
54
54
|
};
|
|
55
55
|
L(() => a.visible, () => {
|
|
56
|
-
a.visible ? (n.value = !0, t.value =
|
|
56
|
+
a.visible ? (n.value = !0, t.value = Re.getNewIndex(), setTimeout(() => {
|
|
57
57
|
g();
|
|
58
58
|
}, 50)) : (u(), setTimeout(() => {
|
|
59
59
|
n.value = !1;
|
|
@@ -63,16 +63,16 @@ const be = /* @__PURE__ */ y(ye, [["render", he]]), ke = /* @__PURE__ */ k({
|
|
|
63
63
|
open: g,
|
|
64
64
|
close: u
|
|
65
65
|
});
|
|
66
|
-
const
|
|
66
|
+
const k = (f) => {
|
|
67
67
|
f.preventDefault(), d("dismiss", "backdrop");
|
|
68
68
|
};
|
|
69
|
-
return u(), (f, z) => (c(), p(
|
|
69
|
+
return u(), (f, z) => (c(), p(R, null, [
|
|
70
70
|
m.value ? O((c(), p("div", {
|
|
71
71
|
key: 0,
|
|
72
|
-
class:
|
|
72
|
+
class: S(["t-present", { [f.placement]: !0 }]),
|
|
73
73
|
ref_key: "present",
|
|
74
74
|
ref: i,
|
|
75
|
-
style: T({ ...
|
|
75
|
+
style: T({ ...y, zIndex: t.value })
|
|
76
76
|
}, [
|
|
77
77
|
h(f.$slots, "default", {}, void 0, !0)
|
|
78
78
|
], 6)), [
|
|
@@ -81,16 +81,16 @@ const be = /* @__PURE__ */ y(ye, [["render", he]]), ke = /* @__PURE__ */ k({
|
|
|
81
81
|
m.value ? O((c(), p("div", {
|
|
82
82
|
key: 1,
|
|
83
83
|
class: "t-present-backdrop",
|
|
84
|
-
onClick:
|
|
84
|
+
onClick: k,
|
|
85
85
|
ref_key: "backdrop",
|
|
86
86
|
ref: r,
|
|
87
|
-
style: T({ ...
|
|
87
|
+
style: T({ ...y, zIndex: t.value - 1 })
|
|
88
88
|
}, null, 4)), [
|
|
89
89
|
[N, n.value]
|
|
90
90
|
]) : I("", !0)
|
|
91
91
|
], 64));
|
|
92
92
|
}
|
|
93
|
-
}), D = /* @__PURE__ */
|
|
93
|
+
}), D = /* @__PURE__ */ _(ke, [["__scopeId", "data-v-3d0c3227"]]), $e = /* @__PURE__ */ b({
|
|
94
94
|
__name: "t-loading-icon",
|
|
95
95
|
props: {
|
|
96
96
|
size: {
|
|
@@ -114,10 +114,10 @@ const be = /* @__PURE__ */ y(ye, [["render", he]]), ke = /* @__PURE__ */ k({
|
|
|
114
114
|
"aria-label": "Loading..."
|
|
115
115
|
}, null, 4));
|
|
116
116
|
}
|
|
117
|
-
}), X = /* @__PURE__ */
|
|
117
|
+
}), X = /* @__PURE__ */ _($e, [["__scopeId", "data-v-7c463303"]]), we = { class: "t-button-content" }, Te = {
|
|
118
118
|
key: 0,
|
|
119
119
|
class: "loader"
|
|
120
|
-
}, xe = /* @__PURE__ */
|
|
120
|
+
}, xe = /* @__PURE__ */ b({
|
|
121
121
|
__name: "t-button",
|
|
122
122
|
props: {
|
|
123
123
|
color: { default: null },
|
|
@@ -130,7 +130,7 @@ const be = /* @__PURE__ */ y(ye, [["render", he]]), ke = /* @__PURE__ */ k({
|
|
|
130
130
|
activeBackground: { type: Boolean, default: !1 }
|
|
131
131
|
},
|
|
132
132
|
setup(o) {
|
|
133
|
-
const s = o, e =
|
|
133
|
+
const s = o, e = x(() => {
|
|
134
134
|
let t;
|
|
135
135
|
return s.variant == "default" && (s.color ? ["warning", "info", "danger", "primary", "secondary", "success"].includes(s.color) ? t = {
|
|
136
136
|
"--border": "none",
|
|
@@ -171,7 +171,7 @@ const be = /* @__PURE__ */ y(ye, [["render", he]]), ke = /* @__PURE__ */ k({
|
|
|
171
171
|
}), t;
|
|
172
172
|
});
|
|
173
173
|
return (t, n) => (c(), p("button", {
|
|
174
|
-
class:
|
|
174
|
+
class: S(["t-button", { "active-background": s.activeBackground, rounded: s.rounded, block: s.block, ["size-" + s.size]: !0 }]),
|
|
175
175
|
style: T(e.value)
|
|
176
176
|
}, [
|
|
177
177
|
O($("span", we, [
|
|
@@ -187,10 +187,10 @@ const be = /* @__PURE__ */ y(ye, [["render", he]]), ke = /* @__PURE__ */ k({
|
|
|
187
187
|
])) : I("", !0)
|
|
188
188
|
], 6));
|
|
189
189
|
}
|
|
190
|
-
}), j = /* @__PURE__ */
|
|
190
|
+
}), j = /* @__PURE__ */ _(xe, [["__scopeId", "data-v-185a9e49"]]), Se = {
|
|
191
191
|
key: 0,
|
|
192
192
|
class: "t-alert-header"
|
|
193
|
-
}, ze = { class: "t-alert-content" }, Ie = { class: "t-alert-footer" }, Be = /* @__PURE__ */
|
|
193
|
+
}, ze = { class: "t-alert-content" }, Ie = { class: "t-alert-footer" }, Be = /* @__PURE__ */ b({
|
|
194
194
|
__name: "t-alert",
|
|
195
195
|
props: {
|
|
196
196
|
title: {},
|
|
@@ -204,7 +204,7 @@ const be = /* @__PURE__ */ y(ye, [["render", he]]), ke = /* @__PURE__ */ k({
|
|
|
204
204
|
n.value = !0;
|
|
205
205
|
}, m = (l) => {
|
|
206
206
|
n.value = !1, l.handler && l.handler(), r("dismiss", "choose", l?.data);
|
|
207
|
-
},
|
|
207
|
+
}, y = (l) => {
|
|
208
208
|
t.dismiss && t.dismiss.includes(l) ? (n.value = !1, r("dismiss", l)) : l == "backdrop" && (a.value = !0, setTimeout(() => {
|
|
209
209
|
a.value = !1;
|
|
210
210
|
}, 300));
|
|
@@ -216,11 +216,11 @@ const be = /* @__PURE__ */ y(ye, [["render", he]]), ke = /* @__PURE__ */ k({
|
|
|
216
216
|
backdrop: !0,
|
|
217
217
|
keepalive: !1,
|
|
218
218
|
visible: n.value,
|
|
219
|
-
onDismiss:
|
|
219
|
+
onDismiss: y
|
|
220
220
|
}, {
|
|
221
221
|
default: V(() => [
|
|
222
222
|
$("div", {
|
|
223
|
-
class:
|
|
223
|
+
class: S(["t-alert", { pop: a.value }]),
|
|
224
224
|
ref_key: "container",
|
|
225
225
|
ref: i
|
|
226
226
|
}, [
|
|
@@ -232,13 +232,13 @@ const be = /* @__PURE__ */ y(ye, [["render", he]]), ke = /* @__PURE__ */ k({
|
|
|
232
232
|
], !0),
|
|
233
233
|
h(l.$slots, "footer", {}, () => [
|
|
234
234
|
$("div", Ie, [
|
|
235
|
-
(c(!0), p(
|
|
235
|
+
(c(!0), p(R, null, q(t.actions, (u) => (c(), B(j, {
|
|
236
236
|
color: u.color,
|
|
237
237
|
variant: u.variant,
|
|
238
|
-
onClick: (
|
|
238
|
+
onClick: (k) => m(u)
|
|
239
239
|
}, {
|
|
240
240
|
default: V(() => [
|
|
241
|
-
|
|
241
|
+
A(M(u.text), 1)
|
|
242
242
|
]),
|
|
243
243
|
_: 2
|
|
244
244
|
}, 1032, ["color", "variant", "onClick"]))), 256))
|
|
@@ -249,7 +249,7 @@ const be = /* @__PURE__ */ y(ye, [["render", he]]), ke = /* @__PURE__ */ k({
|
|
|
249
249
|
_: 3
|
|
250
250
|
}, 8, ["visible"]));
|
|
251
251
|
}
|
|
252
|
-
}), se = /* @__PURE__ */
|
|
252
|
+
}), se = /* @__PURE__ */ _(Be, [["__scopeId", "data-v-05d0c578"]]), lo = (o = {}) => ({
|
|
253
253
|
open() {
|
|
254
254
|
return new Promise((s) => {
|
|
255
255
|
let e = document.body.querySelector(".t-app");
|
|
@@ -274,7 +274,7 @@ const be = /* @__PURE__ */ y(ye, [["render", he]]), ke = /* @__PURE__ */ k({
|
|
|
274
274
|
}, 50);
|
|
275
275
|
});
|
|
276
276
|
}
|
|
277
|
-
}), Ce = /* @__PURE__ */
|
|
277
|
+
}), Ce = /* @__PURE__ */ b({
|
|
278
278
|
__name: "t-action",
|
|
279
279
|
props: {
|
|
280
280
|
actions: {},
|
|
@@ -286,7 +286,7 @@ const be = /* @__PURE__ */ y(ye, [["render", he]]), ke = /* @__PURE__ */ k({
|
|
|
286
286
|
n.value = !0;
|
|
287
287
|
}, m = (l) => {
|
|
288
288
|
n.value = !1, l.handler && l.handler(), r("dismiss", "choose", l?.data);
|
|
289
|
-
},
|
|
289
|
+
}, y = (l) => {
|
|
290
290
|
t.dismiss && t.dismiss.includes(l) ? (n.value = !1, r("dismiss", l)) : l == "backdrop" && (a.value = !0, setTimeout(() => {
|
|
291
291
|
a.value = !1;
|
|
292
292
|
}, 300));
|
|
@@ -298,24 +298,24 @@ const be = /* @__PURE__ */ y(ye, [["render", he]]), ke = /* @__PURE__ */ k({
|
|
|
298
298
|
backdrop: !0,
|
|
299
299
|
keepalive: !1,
|
|
300
300
|
visible: n.value,
|
|
301
|
-
onDismiss:
|
|
301
|
+
onDismiss: y
|
|
302
302
|
}, {
|
|
303
303
|
default: V(() => [
|
|
304
304
|
$("div", {
|
|
305
|
-
class:
|
|
305
|
+
class: S(["t-action", { pop: a.value }]),
|
|
306
306
|
ref_key: "container",
|
|
307
307
|
ref: i
|
|
308
308
|
}, [
|
|
309
|
-
(c(!0), p(
|
|
310
|
-
(c(!0), p(
|
|
311
|
-
color:
|
|
312
|
-
size:
|
|
313
|
-
variant:
|
|
314
|
-
onClick: (f) => m(
|
|
309
|
+
(c(!0), p(R, null, q(t.actions, (u) => (c(), p("div", null, [
|
|
310
|
+
(c(!0), p(R, null, q(u, (k) => (c(), B(j, {
|
|
311
|
+
color: k.color,
|
|
312
|
+
size: k.size,
|
|
313
|
+
variant: k.variant,
|
|
314
|
+
onClick: (f) => m(k),
|
|
315
315
|
block: ""
|
|
316
316
|
}, {
|
|
317
317
|
default: V(() => [
|
|
318
|
-
|
|
318
|
+
A(M(k.text), 1)
|
|
319
319
|
]),
|
|
320
320
|
_: 2
|
|
321
321
|
}, 1032, ["color", "size", "variant", "onClick"]))), 256))
|
|
@@ -325,7 +325,7 @@ const be = /* @__PURE__ */ y(ye, [["render", he]]), ke = /* @__PURE__ */ k({
|
|
|
325
325
|
_: 1
|
|
326
326
|
}, 8, ["visible"]));
|
|
327
327
|
}
|
|
328
|
-
}), Ee = /* @__PURE__ */
|
|
328
|
+
}), Ee = /* @__PURE__ */ _(Ce, [["__scopeId", "data-v-c6bccffb"]]), co = (o = {}) => ({
|
|
329
329
|
open() {
|
|
330
330
|
return new Promise((s) => {
|
|
331
331
|
let e = document.body.querySelector(".t-app");
|
|
@@ -350,7 +350,7 @@ const be = /* @__PURE__ */ y(ye, [["render", he]]), ke = /* @__PURE__ */ k({
|
|
|
350
350
|
}, 50);
|
|
351
351
|
});
|
|
352
352
|
}
|
|
353
|
-
}), Ve = { class: "t-loading" }, Me = /* @__PURE__ */
|
|
353
|
+
}), Ve = { class: "t-loading" }, Me = /* @__PURE__ */ b({
|
|
354
354
|
__name: "t-loading",
|
|
355
355
|
props: {
|
|
356
356
|
type: { default: "spinner" }
|
|
@@ -383,7 +383,7 @@ const be = /* @__PURE__ */ y(ye, [["render", he]]), ke = /* @__PURE__ */ k({
|
|
|
383
383
|
_: 3
|
|
384
384
|
}, 8, ["visible"]));
|
|
385
385
|
}
|
|
386
|
-
}), Pe = /* @__PURE__ */
|
|
386
|
+
}), Pe = /* @__PURE__ */ _(Me, [["__scopeId", "data-v-8f84c14e"]]), io = (o = {}) => {
|
|
387
387
|
const s = v(), e = document.body.querySelector(".t-app");
|
|
388
388
|
let t = null, n = null;
|
|
389
389
|
return {
|
|
@@ -409,11 +409,11 @@ const be = /* @__PURE__ */ y(ye, [["render", he]]), ke = /* @__PURE__ */ k({
|
|
|
409
409
|
});
|
|
410
410
|
}
|
|
411
411
|
};
|
|
412
|
-
}, Y = v(1e3),
|
|
412
|
+
}, Y = v(1e3), Re = {
|
|
413
413
|
getNewIndex() {
|
|
414
414
|
return Y.value += 2, Y.value;
|
|
415
415
|
}
|
|
416
|
-
}, C = te([]), Q = v(!0),
|
|
416
|
+
}, C = te([]), Q = v(!0), Ae = (o) => {
|
|
417
417
|
C.push(o);
|
|
418
418
|
}, De = (o) => {
|
|
419
419
|
o || C.pop();
|
|
@@ -425,19 +425,19 @@ const be = /* @__PURE__ */ y(ye, [["render", he]]), ke = /* @__PURE__ */ k({
|
|
|
425
425
|
Q.value = !0;
|
|
426
426
|
}, w = {
|
|
427
427
|
screens: C,
|
|
428
|
-
addScreen:
|
|
428
|
+
addScreen: Ae,
|
|
429
429
|
removeScreen: De,
|
|
430
430
|
removeAllScreen: Oe,
|
|
431
431
|
lockSwipe: Ne,
|
|
432
432
|
unlockSwipe: qe,
|
|
433
433
|
swipeable: Q,
|
|
434
|
-
hasPrevious:
|
|
435
|
-
currentScreen:
|
|
436
|
-
lastScreen:
|
|
434
|
+
hasPrevious: x(() => C.length > 1),
|
|
435
|
+
currentScreen: x(() => C[C.length - 1]),
|
|
436
|
+
lastScreen: x(() => {
|
|
437
437
|
if (!(C.length < 2))
|
|
438
438
|
return C[C.length - 2];
|
|
439
439
|
})
|
|
440
|
-
}, Le = /* @__PURE__ */
|
|
440
|
+
}, Le = /* @__PURE__ */ b({
|
|
441
441
|
__name: "t-toast",
|
|
442
442
|
props: {
|
|
443
443
|
message: {},
|
|
@@ -459,7 +459,7 @@ const be = /* @__PURE__ */ y(ye, [["render", he]]), ke = /* @__PURE__ */ k({
|
|
|
459
459
|
a.value = !0, setTimeout(() => {
|
|
460
460
|
i.value = !1, r.value = !1, n("dismiss");
|
|
461
461
|
}, 300);
|
|
462
|
-
},
|
|
462
|
+
}, y = x(() => {
|
|
463
463
|
let l;
|
|
464
464
|
return t.variant == "default" && (t.color ? ["warning", "info", "danger", "primary", "secondary", "success"].includes(t.color) ? l = {
|
|
465
465
|
"--border": "none",
|
|
@@ -503,11 +503,11 @@ const be = /* @__PURE__ */ y(ye, [["render", he]]), ke = /* @__PURE__ */ k({
|
|
|
503
503
|
open: d
|
|
504
504
|
}), (l, g) => i.value ? (c(), p("div", {
|
|
505
505
|
key: 0,
|
|
506
|
-
class:
|
|
507
|
-
style: T({ "--space": t.space, ...
|
|
506
|
+
class: S(["t-toast", { [t.placement]: !0, open: r.value, closing: a.value }]),
|
|
507
|
+
style: T({ "--space": t.space, ...y.value })
|
|
508
508
|
}, M(t.message), 7)) : I("", !0);
|
|
509
509
|
}
|
|
510
|
-
}), ne = /* @__PURE__ */
|
|
510
|
+
}), ne = /* @__PURE__ */ _(Le, [["__scopeId", "data-v-7754026e"]]), uo = (o = {}) => ({
|
|
511
511
|
open() {
|
|
512
512
|
let s = document.body.querySelector(".t-app");
|
|
513
513
|
if (!s) return;
|
|
@@ -536,7 +536,7 @@ function re() {
|
|
|
536
536
|
height: We
|
|
537
537
|
};
|
|
538
538
|
}
|
|
539
|
-
const He = /* @__PURE__ */
|
|
539
|
+
const He = /* @__PURE__ */ b({
|
|
540
540
|
__name: "t-cable",
|
|
541
541
|
props: {
|
|
542
542
|
keyboard: { type: Boolean, default: !0 },
|
|
@@ -545,19 +545,19 @@ const He = /* @__PURE__ */ k({
|
|
|
545
545
|
setup(o) {
|
|
546
546
|
const s = o, { height: e } = re();
|
|
547
547
|
return (t, n) => (c(), p("div", {
|
|
548
|
-
class:
|
|
548
|
+
class: S(["t-cable", { keyboard: s.keyboard && E(e) > 0, [s.placement]: !0 }]),
|
|
549
549
|
style: T({ "--t-keyboard-height": E(e) + "px", "--t-keyboard-transition": E(e) > 0 ? "0.3s" : "0.1s" })
|
|
550
550
|
}, [
|
|
551
551
|
h(t.$slots, "default", {}, void 0, !0)
|
|
552
552
|
], 6));
|
|
553
553
|
}
|
|
554
|
-
}), Ue = /* @__PURE__ */
|
|
554
|
+
}), Ue = /* @__PURE__ */ _(He, [["__scopeId", "data-v-ecb72421"]]), Xe = /* @__PURE__ */ b({
|
|
555
555
|
__name: "t-card",
|
|
556
556
|
props: {
|
|
557
557
|
color: { default: null }
|
|
558
558
|
},
|
|
559
559
|
setup(o) {
|
|
560
|
-
const s = o, e =
|
|
560
|
+
const s = o, e = x(() => {
|
|
561
561
|
let t;
|
|
562
562
|
return s.color ? ["warning", "info", "danger", "primary", "secondary", "success"].includes(s.color) ? t = {
|
|
563
563
|
"--background": "var(--t-color-status-" + s.color + ")"
|
|
@@ -580,7 +580,7 @@ function Ge(o, s) {
|
|
|
580
580
|
h(o.$slots, "default", {}, void 0, !0)
|
|
581
581
|
]);
|
|
582
582
|
}
|
|
583
|
-
const ae = /* @__PURE__ */
|
|
583
|
+
const ae = /* @__PURE__ */ _(je, [["render", Ge], ["__scopeId", "data-v-3fd76212"]]), ee = 80, Ke = /* @__PURE__ */ b({
|
|
584
584
|
__name: "t-refresher",
|
|
585
585
|
emits: ["refresh"],
|
|
586
586
|
setup(o, { emit: s }) {
|
|
@@ -595,8 +595,8 @@ const ae = /* @__PURE__ */ y(je, [["render", Ge], ["__scopeId", "data-v-3fd76212
|
|
|
595
595
|
};
|
|
596
596
|
return L(() => r.value, () => {
|
|
597
597
|
i && i.destroy();
|
|
598
|
-
let
|
|
599
|
-
|
|
598
|
+
let y = r.value.closest(".t-content");
|
|
599
|
+
y && (i = J(y, {
|
|
600
600
|
isMoving: !1,
|
|
601
601
|
options: {
|
|
602
602
|
minDist: 60
|
|
@@ -618,14 +618,14 @@ const ae = /* @__PURE__ */ y(je, [["render", Ge], ["__scopeId", "data-v-3fd76212
|
|
|
618
618
|
}));
|
|
619
619
|
}), G(() => {
|
|
620
620
|
i && i.destroy();
|
|
621
|
-
}), (
|
|
621
|
+
}), (y, l) => O((c(), p("div", {
|
|
622
622
|
class: "t-refresher",
|
|
623
623
|
ref_key: "container",
|
|
624
624
|
ref: r,
|
|
625
625
|
style: T({ height: `${t.value}px` })
|
|
626
626
|
}, [
|
|
627
627
|
$("img", {
|
|
628
|
-
class:
|
|
628
|
+
class: S({ spiner: n.value }),
|
|
629
629
|
src: "https://static.toikit.com/toikit/home_2.png?v=3",
|
|
630
630
|
alt: "Loading...",
|
|
631
631
|
style: { width: "22px", height: "22px" }
|
|
@@ -634,13 +634,13 @@ const ae = /* @__PURE__ */ y(je, [["render", Ge], ["__scopeId", "data-v-3fd76212
|
|
|
634
634
|
[N, t.value > 0]
|
|
635
635
|
]);
|
|
636
636
|
}
|
|
637
|
-
}), Je = /* @__PURE__ */
|
|
637
|
+
}), Je = /* @__PURE__ */ _(Ke, [["__scopeId", "data-v-c6364c14"]]), Qe = {}, Ze = { class: "t-screen" };
|
|
638
638
|
function Ye(o, s) {
|
|
639
639
|
return c(), p("div", Ze, [
|
|
640
640
|
h(o.$slots, "default", {}, void 0, !0)
|
|
641
641
|
]);
|
|
642
642
|
}
|
|
643
|
-
const le = /* @__PURE__ */
|
|
643
|
+
const le = /* @__PURE__ */ _(Qe, [["render", Ye], ["__scopeId", "data-v-c2a3436c"]]), et = /* @__PURE__ */ b({
|
|
644
644
|
__name: "t-swipe-screen",
|
|
645
645
|
emits: ["change"],
|
|
646
646
|
setup(o, { emit: s }) {
|
|
@@ -654,24 +654,24 @@ const le = /* @__PURE__ */ y(Qe, [["render", Ye], ["__scopeId", "data-v-c2a3436c
|
|
|
654
654
|
target: null,
|
|
655
655
|
component: ue(e[u] || null)
|
|
656
656
|
});
|
|
657
|
-
}, m = (u,
|
|
658
|
-
!
|
|
659
|
-
|
|
657
|
+
}, m = (u, k) => {
|
|
658
|
+
!k || w.screens[u].target || (w.screens[u].target = k.$el, u > 0 && (i.value = !0, k.$el.style.transform = "translateX(var(--t-app-width))", k.$el.transitionOrigin = "center", document.documentElement.style.setProperty("--t-screen-backdrop-duration", "0s"), document.documentElement.style.setProperty("--t-swipe-backdrop-opacity", "0"), setTimeout(() => {
|
|
659
|
+
k.$el.style.transition = "transform 0.35s ease", k.$el.style.transform = "translateX(0px)", document.documentElement.style.setProperty("--t-screen-backdrop-duration", "0.35s"), document.documentElement.style.setProperty("--t-swipe-backdrop-opacity", "0.5"), w.screens.length > 1 && (w.lastScreen.value.target.style.transitionOrigin = "left center", w.lastScreen.value.target.style.transition = "transform 0.35s ease", w.lastScreen.value.target.style.transform = "translateX(calc(var(--t-app-width) / 100 * 30 * -1)) scale(0.5) perspective(var(--t-app-width)) rotateY(30deg)"), setTimeout(() => {
|
|
660
660
|
a("change"), i.value = !1;
|
|
661
661
|
}, 400);
|
|
662
662
|
}, 100)));
|
|
663
|
-
},
|
|
663
|
+
}, y = () => {
|
|
664
664
|
w.currentScreen.value.target.style.transition = "transform 0.35s ease", w.currentScreen.value.target.style.transform = "translateX(var(--t-app-width)) scale(1)", w.lastScreen.value.target.style.transition = "transform 0.35s ease", w.lastScreen.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"), i.value = !0, setTimeout(() => {
|
|
665
665
|
w.removeScreen(), a("change"), i.value = !1;
|
|
666
666
|
}, 400);
|
|
667
667
|
};
|
|
668
|
-
d(n.name), L(() => n.name, (u,
|
|
669
|
-
u != w.currentScreen.value.name && (w.lastScreen.value?.name == u ?
|
|
668
|
+
d(n.name), L(() => n.name, (u, k) => {
|
|
669
|
+
u != w.currentScreen.value.name && (w.lastScreen.value?.name == u ? y() : d(u));
|
|
670
670
|
});
|
|
671
671
|
const l = () => {
|
|
672
672
|
i.value = !0;
|
|
673
|
-
const u = w.currentScreen.value.target,
|
|
674
|
-
u.style.transition = "transform 0.35s ease", u.style.transform = "translateX(0px)",
|
|
673
|
+
const u = w.currentScreen.value.target, k = w.lastScreen.value.target;
|
|
674
|
+
u.style.transition = "transform 0.35s ease", u.style.transform = "translateX(0px)", k.style.transition = "transform 0.35s ease", k.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(() => {
|
|
675
675
|
i.value = !1;
|
|
676
676
|
}, 400);
|
|
677
677
|
};
|
|
@@ -688,13 +688,13 @@ const le = /* @__PURE__ */ y(Qe, [["render", Ye], ["__scopeId", "data-v-c2a3436c
|
|
|
688
688
|
down() {
|
|
689
689
|
this.isMoving = !1;
|
|
690
690
|
},
|
|
691
|
-
move({ deltaX: u, initialDirection:
|
|
692
|
-
if (
|
|
691
|
+
move({ deltaX: u, initialDirection: k }) {
|
|
692
|
+
if (k != "right") return;
|
|
693
693
|
const f = window.innerWidth, z = u / f * 100, P = w.currentScreen.value.target, Z = w.lastScreen?.value?.target;
|
|
694
694
|
(u > 15 && u <= f || this.isMoving) && (u = u > 0 ? u : 0, this.isMoving = !0, P.style.transition = "transform 0s ease", P.style.transform = `translateX(${u}px)`, Z.style.transition = "transform 0s ease", document.documentElement.style.setProperty("--t-screen-backdrop-duration", "0s"), Z.style.transform = `translateX(calc((var(--t-app-width) / 100 * 30 * -1) + ((var(--t-app-width) / 100 * 30) / 100 * ${z}))) scale(${0.5 + 0.5 / 100 * z}) perspective(var(--t-app-width)) rotateY(${30 - 30 / 100 * z}deg)`, document.documentElement.style.setProperty("--t-swipe-backdrop-opacity", `${0.5 - 0.5 / 100 * z}`));
|
|
695
695
|
},
|
|
696
|
-
up({ deltaX: u, initialDirection:
|
|
697
|
-
this.isMoving = !1,
|
|
696
|
+
up({ deltaX: u, initialDirection: k }) {
|
|
697
|
+
this.isMoving = !1, k != "right" && l();
|
|
698
698
|
const f = window.innerWidth;
|
|
699
699
|
u / f * 100 >= 50 ? t.back() : l();
|
|
700
700
|
},
|
|
@@ -704,8 +704,8 @@ const le = /* @__PURE__ */ y(Qe, [["render", Ye], ["__scopeId", "data-v-c2a3436c
|
|
|
704
704
|
});
|
|
705
705
|
}), G(() => {
|
|
706
706
|
g && g.destroy(), w.removeAllScreen();
|
|
707
|
-
}), (u,
|
|
708
|
-
(c(!0), p(
|
|
707
|
+
}), (u, k) => (c(), p(R, null, [
|
|
708
|
+
(c(!0), p(R, null, q(E(w).screens, (f, z) => (c(), B(le, {
|
|
709
709
|
ref_for: !0,
|
|
710
710
|
ref: (P) => m(z, P),
|
|
711
711
|
style: T({ zIndex: z + (z == E(w).screens.length - 1 ? 2 : 1) }),
|
|
@@ -722,7 +722,7 @@ const le = /* @__PURE__ */ y(Qe, [["render", Ye], ["__scopeId", "data-v-c2a3436c
|
|
|
722
722
|
}, null, 4)
|
|
723
723
|
], 64));
|
|
724
724
|
}
|
|
725
|
-
}), tt = /* @__PURE__ */
|
|
725
|
+
}), tt = /* @__PURE__ */ _(et, [["__scopeId", "data-v-abea77ec"]]), ot = /* @__PURE__ */ b({
|
|
726
726
|
__name: "t-toolbar",
|
|
727
727
|
props: {
|
|
728
728
|
placement: { default: "bottom" },
|
|
@@ -732,7 +732,7 @@ const le = /* @__PURE__ */ y(Qe, [["render", Ye], ["__scopeId", "data-v-c2a3436c
|
|
|
732
732
|
setup(o) {
|
|
733
733
|
const s = o;
|
|
734
734
|
return (e, t) => (c(), p("div", {
|
|
735
|
-
class:
|
|
735
|
+
class: S(["t-toolbar", { [s.placement]: !0, safe: s.safe }]),
|
|
736
736
|
style: T({ "--t-size-toolbar": s.size })
|
|
737
737
|
}, [
|
|
738
738
|
$("div", null, [
|
|
@@ -740,7 +740,7 @@ const le = /* @__PURE__ */ y(Qe, [["render", Ye], ["__scopeId", "data-v-c2a3436c
|
|
|
740
740
|
])
|
|
741
741
|
], 6));
|
|
742
742
|
}
|
|
743
|
-
}), st = /* @__PURE__ */
|
|
743
|
+
}), st = /* @__PURE__ */ _(ot, [["__scopeId", "data-v-db1924b1"]]), nt = /* @__PURE__ */ b({
|
|
744
744
|
__name: "t-back-button",
|
|
745
745
|
props: {
|
|
746
746
|
to: {}
|
|
@@ -759,14 +759,14 @@ const le = /* @__PURE__ */ y(Qe, [["render", Ye], ["__scopeId", "data-v-c2a3436c
|
|
|
759
759
|
], !0)
|
|
760
760
|
])) : I("", !0);
|
|
761
761
|
}
|
|
762
|
-
}), rt = /* @__PURE__ */
|
|
762
|
+
}), rt = /* @__PURE__ */ _(nt, [["__scopeId", "data-v-ed626a3d"]]), at = /* @__PURE__ */ b({
|
|
763
763
|
__name: "t-text",
|
|
764
764
|
props: {
|
|
765
765
|
color: { default: "var(--t-color-text)" },
|
|
766
766
|
size: { default: "standard" }
|
|
767
767
|
},
|
|
768
768
|
setup(o) {
|
|
769
|
-
const s = o, e =
|
|
769
|
+
const s = o, e = x(() => {
|
|
770
770
|
let t, n = s.color;
|
|
771
771
|
return s.size == "standard" ? t = "var(--t-fs-10)" : s.size == "small" ? t = "var(--t-fs-08)" : s.size == "large" ? t = "var(--t-fs-12)" : t = s.size, ["warning", "info", "danger", "primary", "secondary", "success"].includes(s.color) && (n = `var(--t-color-status-${s.color})`), {
|
|
772
772
|
"--color": n,
|
|
@@ -780,17 +780,17 @@ const le = /* @__PURE__ */ y(Qe, [["render", Ye], ["__scopeId", "data-v-c2a3436c
|
|
|
780
780
|
h(t.$slots, "default", {}, void 0, !0)
|
|
781
781
|
], 4));
|
|
782
782
|
}
|
|
783
|
-
}), F = /* @__PURE__ */
|
|
783
|
+
}), F = /* @__PURE__ */ _(at, [["__scopeId", "data-v-f0f94f05"]]), lt = /* @__PURE__ */ b({
|
|
784
784
|
__name: "t-pull-signal",
|
|
785
785
|
props: {
|
|
786
786
|
placement: { default: "bottom" }
|
|
787
787
|
},
|
|
788
788
|
setup(o) {
|
|
789
789
|
return (s, e) => (c(), p("div", {
|
|
790
|
-
class:
|
|
790
|
+
class: S(["t-pull-bar", { [s.placement]: !0 }])
|
|
791
791
|
}, null, 2));
|
|
792
792
|
}
|
|
793
|
-
}), ce = /* @__PURE__ */
|
|
793
|
+
}), ce = /* @__PURE__ */ _(lt, [["__scopeId", "data-v-daa38c85"]]), ct = /* @__PURE__ */ b({
|
|
794
794
|
__name: "t-sheet",
|
|
795
795
|
props: {
|
|
796
796
|
background: { default: "var(--t-color-surface)" },
|
|
@@ -808,14 +808,14 @@ const le = /* @__PURE__ */ y(Qe, [["render", Ye], ["__scopeId", "data-v-c2a3436c
|
|
|
808
808
|
setup(o, { emit: s }) {
|
|
809
809
|
const e = o, t = s, n = v(), r = v(), i = v(!1);
|
|
810
810
|
let a = null;
|
|
811
|
-
const d =
|
|
811
|
+
const d = x(() => {
|
|
812
812
|
if (e.placement == "bottom") return "down";
|
|
813
813
|
if (e.placement == "top") return "up";
|
|
814
814
|
if (e.placement == "left") return "left";
|
|
815
815
|
if (e.placement == "right") return "right";
|
|
816
816
|
}), m = (l) => {
|
|
817
817
|
t("dismiss", l);
|
|
818
|
-
},
|
|
818
|
+
}, y = () => {
|
|
819
819
|
i.value = !0, setTimeout(() => {
|
|
820
820
|
i.value = !1;
|
|
821
821
|
}, 300);
|
|
@@ -833,18 +833,18 @@ const le = /* @__PURE__ */ y(Qe, [["render", Ye], ["__scopeId", "data-v-c2a3436c
|
|
|
833
833
|
this.isMoving = !1;
|
|
834
834
|
},
|
|
835
835
|
fast({ initialDirection: g }) {
|
|
836
|
-
|
|
836
|
+
y(), g == d.value ? t("dismiss", "gesture") : r.value.open();
|
|
837
837
|
},
|
|
838
|
-
move({ deltaY: g, deltaX: u, initialDirection:
|
|
839
|
-
if (
|
|
838
|
+
move({ deltaY: g, deltaX: u, initialDirection: k }) {
|
|
839
|
+
if (k != d.value) return;
|
|
840
840
|
let f = 0;
|
|
841
841
|
e.placement == "bottom" || e.placement == "top" ? f = g : f = u, e.placement == "bottom" && (f = g > 0 ? g : 0), e.placement == "top" && (f = g < 0 ? g : 0), e.placement == "left" && (f = u < 0 ? g : 0), e.placement == "right" && (f = u > 0 ? g : 0), (e.placement == "bottom" && (f >= 10 || this.isMoving) || e.placement == "top" && (f <= -10 || this.isMoving) || e.placement == "left" && (f >= 10 || this.isMoving) || e.placement == "right" && (f <= -10 || this.isMoving)) && (this.isMoving = !0, r.value.render({
|
|
842
842
|
contentTransform: f + "px",
|
|
843
843
|
transition: "0s"
|
|
844
844
|
}));
|
|
845
845
|
},
|
|
846
|
-
up({ deltaY: g, deltaX: u, initialDirection:
|
|
847
|
-
if (this.isMoving = !1,
|
|
846
|
+
up({ deltaY: g, deltaX: u, initialDirection: k }) {
|
|
847
|
+
if (this.isMoving = !1, y(), k != d.value) {
|
|
848
848
|
r.value.open();
|
|
849
849
|
return;
|
|
850
850
|
}
|
|
@@ -852,7 +852,7 @@ const le = /* @__PURE__ */ y(Qe, [["render", Ye], ["__scopeId", "data-v-c2a3436c
|
|
|
852
852
|
e.placement == "bottom" || e.placement == "top" ? (f = n.value.offsetHeight, P = g) : (f = n.value.offsetWidth, P = u), z = P / f * 100, z > 50 ? t("dismiss", "gesture") : r.value.open();
|
|
853
853
|
},
|
|
854
854
|
cancel() {
|
|
855
|
-
this.isMoving = !1,
|
|
855
|
+
this.isMoving = !1, y(), r.value.open();
|
|
856
856
|
}
|
|
857
857
|
}));
|
|
858
858
|
}), G(() => {
|
|
@@ -881,7 +881,7 @@ const le = /* @__PURE__ */ y(Qe, [["render", Ye], ["__scopeId", "data-v-c2a3436c
|
|
|
881
881
|
], !0)
|
|
882
882
|
])) : I("", !0),
|
|
883
883
|
$("div", {
|
|
884
|
-
class:
|
|
884
|
+
class: S(["t-sheet", { fullscreen: e.fullscreen, [e.placement]: !0, rounded: l.rounded, radius: e.radius }]),
|
|
885
885
|
style: T({ "--background": e.background }),
|
|
886
886
|
ref_key: "sheet",
|
|
887
887
|
ref: n
|
|
@@ -892,7 +892,7 @@ const le = /* @__PURE__ */ y(Qe, [["render", Ye], ["__scopeId", "data-v-c2a3436c
|
|
|
892
892
|
_: 3
|
|
893
893
|
}, 8, ["placement", "backdrop", "visible", "keepalive"]));
|
|
894
894
|
}
|
|
895
|
-
}), it = /* @__PURE__ */
|
|
895
|
+
}), it = /* @__PURE__ */ _(ct, [["__scopeId", "data-v-0ff00a13"]]), ut = { class: "t-input-label" }, dt = { class: "t-input-content" }, pt = ["type", "placeholder", "value"], ft = /* @__PURE__ */ b({
|
|
896
896
|
__name: "t-input",
|
|
897
897
|
props: {
|
|
898
898
|
size: { default: "standard" },
|
|
@@ -911,7 +911,7 @@ const le = /* @__PURE__ */ y(Qe, [["render", Ye], ["__scopeId", "data-v-c2a3436c
|
|
|
911
911
|
t("update:modelValue", r.target.value);
|
|
912
912
|
};
|
|
913
913
|
return (r, i) => (c(), p("div", {
|
|
914
|
-
class:
|
|
914
|
+
class: S(["t-input", { rounded: e.rounded, ["size-" + e.size]: !0, ["variant-" + e.variant]: !0 }])
|
|
915
915
|
}, [
|
|
916
916
|
$("label", null, [
|
|
917
917
|
$("span", ut, M(r.label), 1),
|
|
@@ -931,7 +931,7 @@ const le = /* @__PURE__ */ y(Qe, [["render", Ye], ["__scopeId", "data-v-c2a3436c
|
|
|
931
931
|
color: "danger"
|
|
932
932
|
}, {
|
|
933
933
|
default: V(() => [
|
|
934
|
-
|
|
934
|
+
A(M(e.error), 1)
|
|
935
935
|
]),
|
|
936
936
|
_: 1
|
|
937
937
|
})) : e.help ? (c(), B(F, {
|
|
@@ -939,29 +939,29 @@ const le = /* @__PURE__ */ y(Qe, [["render", Ye], ["__scopeId", "data-v-c2a3436c
|
|
|
939
939
|
color: "secondary"
|
|
940
940
|
}, {
|
|
941
941
|
default: V(() => [
|
|
942
|
-
|
|
942
|
+
A(M(e.help), 1)
|
|
943
943
|
]),
|
|
944
944
|
_: 1
|
|
945
945
|
})) : I("", !0)
|
|
946
946
|
], 2));
|
|
947
947
|
}
|
|
948
|
-
}), mt = /* @__PURE__ */
|
|
948
|
+
}), mt = /* @__PURE__ */ _(ft, [["__scopeId", "data-v-1a9425cf"]]), vt = {};
|
|
949
949
|
function _t(o, s) {
|
|
950
950
|
return c(), p("textarea");
|
|
951
951
|
}
|
|
952
|
-
const yt = /* @__PURE__ */
|
|
952
|
+
const yt = /* @__PURE__ */ _(vt, [["render", _t]]), gt = {};
|
|
953
953
|
function ht(o, s) {
|
|
954
954
|
return c(), p("div");
|
|
955
955
|
}
|
|
956
|
-
const bt = /* @__PURE__ */
|
|
956
|
+
const bt = /* @__PURE__ */ _(gt, [["render", ht]]), kt = {}, $t = { class: "t-grid" };
|
|
957
957
|
function wt(o, s) {
|
|
958
958
|
return c(), p("div", $t);
|
|
959
959
|
}
|
|
960
|
-
const Tt = /* @__PURE__ */
|
|
960
|
+
const Tt = /* @__PURE__ */ _(kt, [["render", wt]]), xt = {}, St = { class: "t-grid-item" };
|
|
961
961
|
function zt(o, s) {
|
|
962
962
|
return c(), p("div", St);
|
|
963
963
|
}
|
|
964
|
-
const It = /* @__PURE__ */
|
|
964
|
+
const It = /* @__PURE__ */ _(xt, [["render", zt]]), Bt = /* @__PURE__ */ b({
|
|
965
965
|
__name: "t-divider",
|
|
966
966
|
props: {
|
|
967
967
|
direction: { default: "horizontal" }
|
|
@@ -969,17 +969,17 @@ const It = /* @__PURE__ */ y(xt, [["render", zt]]), Bt = /* @__PURE__ */ k({
|
|
|
969
969
|
setup(o) {
|
|
970
970
|
const s = o;
|
|
971
971
|
return (e, t) => (c(), p("div", {
|
|
972
|
-
class:
|
|
972
|
+
class: S(["t-divider", { [s.direction]: !0 }])
|
|
973
973
|
}, null, 2));
|
|
974
974
|
}
|
|
975
|
-
}), Ct = /* @__PURE__ */
|
|
975
|
+
}), Ct = /* @__PURE__ */ _(Bt, [["__scopeId", "data-v-47ee8991"]]), Et = /* @__PURE__ */ b({
|
|
976
976
|
__name: "t-toggle-password",
|
|
977
977
|
props: {
|
|
978
978
|
color: { default: "warning" }
|
|
979
979
|
},
|
|
980
980
|
emits: ["change"],
|
|
981
981
|
setup(o, { emit: s }) {
|
|
982
|
-
const e = o, t = s, n = v(!1), r = v(), i =
|
|
982
|
+
const e = o, t = s, n = v(!1), r = v(), i = x(() => {
|
|
983
983
|
let m = e.color;
|
|
984
984
|
return ["warning", "info", "danger", "primary", "secondary", "success"].includes(e.color) && (m = `var(--t-color-status-${e.color})`), {
|
|
985
985
|
"--color": m
|
|
@@ -993,7 +993,7 @@ const It = /* @__PURE__ */ y(xt, [["render", zt]]), Bt = /* @__PURE__ */ k({
|
|
|
993
993
|
let m = a();
|
|
994
994
|
m && (n.value = !n.value, n.value ? m.type = "text" : m.type = "password", t("change", n.value));
|
|
995
995
|
};
|
|
996
|
-
return (m,
|
|
996
|
+
return (m, y) => (c(), p("button", {
|
|
997
997
|
ref_key: "toggle",
|
|
998
998
|
ref: r,
|
|
999
999
|
class: "t-toggle-password",
|
|
@@ -1001,35 +1001,35 @@ const It = /* @__PURE__ */ y(xt, [["render", zt]]), Bt = /* @__PURE__ */ k({
|
|
|
1001
1001
|
onClick: d
|
|
1002
1002
|
}, [
|
|
1003
1003
|
n.value ? h(m.$slots, "on", { key: 0 }, () => [
|
|
1004
|
-
|
|
1004
|
+
y[0] || (y[0] = $("i", { class: "ri-eye-line" }, null, -1))
|
|
1005
1005
|
], !0) : I("", !0),
|
|
1006
1006
|
n.value ? I("", !0) : h(m.$slots, "off", { key: 1 }, () => [
|
|
1007
|
-
|
|
1007
|
+
y[1] || (y[1] = $("i", { class: "ri-eye-off-line" }, null, -1))
|
|
1008
1008
|
], !0)
|
|
1009
1009
|
], 4));
|
|
1010
1010
|
}
|
|
1011
|
-
}), Vt = /* @__PURE__ */
|
|
1011
|
+
}), Vt = /* @__PURE__ */ _(Et, [["__scopeId", "data-v-3268e9e3"]]), Mt = /* @__PURE__ */ b({
|
|
1012
1012
|
__name: "t-avatar",
|
|
1013
1013
|
props: {
|
|
1014
1014
|
square: { type: Boolean, default: !1 },
|
|
1015
1015
|
size: { default: "standard" }
|
|
1016
1016
|
},
|
|
1017
1017
|
setup(o) {
|
|
1018
|
-
const s = o, e =
|
|
1018
|
+
const s = o, e = x(() => s.size == "small" ? "24px" : s.size == "standard" ? "40px" : s.size == "large" ? "60px" : s.size);
|
|
1019
1019
|
return (t, n) => (c(), p("div", {
|
|
1020
|
-
class:
|
|
1020
|
+
class: S(["t-avatar", { square: t.square }]),
|
|
1021
1021
|
style: T({ "--size": e.value })
|
|
1022
1022
|
}, [
|
|
1023
1023
|
h(t.$slots, "default", {}, void 0, !0)
|
|
1024
1024
|
], 6));
|
|
1025
1025
|
}
|
|
1026
|
-
}), Pt = /* @__PURE__ */
|
|
1026
|
+
}), Pt = /* @__PURE__ */ _(Mt, [["__scopeId", "data-v-24384c2f"]]), Rt = { class: "t-collapse-title" }, At = {
|
|
1027
1027
|
key: 0,
|
|
1028
1028
|
class: "icon"
|
|
1029
1029
|
}, Dt = {
|
|
1030
1030
|
key: 1,
|
|
1031
1031
|
class: "icon"
|
|
1032
|
-
}, Ot = { class: "t-collapse-content" }, Nt = /* @__PURE__ */
|
|
1032
|
+
}, Ot = { class: "t-collapse-content" }, Nt = /* @__PURE__ */ b({
|
|
1033
1033
|
__name: "t-collapse",
|
|
1034
1034
|
props: {
|
|
1035
1035
|
title: {}
|
|
@@ -1040,7 +1040,7 @@ const It = /* @__PURE__ */ y(xt, [["render", zt]]), Bt = /* @__PURE__ */ k({
|
|
|
1040
1040
|
n.value = !n.value, r.value = `calc(${i.value.offsetHeight}px + 2rem)`, t("change", n.value);
|
|
1041
1041
|
};
|
|
1042
1042
|
return t("change", n.value), (d, m) => (c(), p("div", {
|
|
1043
|
-
class:
|
|
1043
|
+
class: S(["t-collapse", { open: n.value }]),
|
|
1044
1044
|
style: T({ "--height": r.value })
|
|
1045
1045
|
}, [
|
|
1046
1046
|
$("div", {
|
|
@@ -1048,13 +1048,13 @@ const It = /* @__PURE__ */ y(xt, [["render", zt]]), Bt = /* @__PURE__ */ k({
|
|
|
1048
1048
|
onClick: a
|
|
1049
1049
|
}, [
|
|
1050
1050
|
h(d.$slots, "icon"),
|
|
1051
|
-
$("div",
|
|
1051
|
+
$("div", Rt, [
|
|
1052
1052
|
h(d.$slots, "title", {}, () => [
|
|
1053
|
-
|
|
1053
|
+
A(M(e.title), 1)
|
|
1054
1054
|
])
|
|
1055
1055
|
]),
|
|
1056
1056
|
h(d.$slots, "toggle", {}, () => [
|
|
1057
|
-
n.value ? (c(), p("div",
|
|
1057
|
+
n.value ? (c(), p("div", At, [...m[0] || (m[0] = [
|
|
1058
1058
|
$("i", { class: "ri-arrow-up-s-line" }, null, -1)
|
|
1059
1059
|
])])) : (c(), p("div", Dt, [...m[1] || (m[1] = [
|
|
1060
1060
|
$("i", { class: "ri-arrow-down-s-line" }, null, -1)
|
|
@@ -1073,7 +1073,7 @@ const It = /* @__PURE__ */ y(xt, [["render", zt]]), Bt = /* @__PURE__ */ k({
|
|
|
1073
1073
|
])
|
|
1074
1074
|
], 6));
|
|
1075
1075
|
}
|
|
1076
|
-
}), qt = /* @__PURE__ */
|
|
1076
|
+
}), qt = /* @__PURE__ */ b({
|
|
1077
1077
|
__name: "t-switch",
|
|
1078
1078
|
props: {
|
|
1079
1079
|
modelValue: { type: Boolean },
|
|
@@ -1083,7 +1083,7 @@ const It = /* @__PURE__ */ y(xt, [["render", zt]]), Bt = /* @__PURE__ */ k({
|
|
|
1083
1083
|
setup(o, { emit: s }) {
|
|
1084
1084
|
const e = o, t = s, n = () => {
|
|
1085
1085
|
t("update:modelValue", !e.modelValue);
|
|
1086
|
-
}, r =
|
|
1086
|
+
}, r = x(() => {
|
|
1087
1087
|
let i = {
|
|
1088
1088
|
"--background": e.color,
|
|
1089
1089
|
"--color": "#ffffff"
|
|
@@ -1094,24 +1094,24 @@ const It = /* @__PURE__ */ y(xt, [["render", zt]]), Bt = /* @__PURE__ */ k({
|
|
|
1094
1094
|
}), i;
|
|
1095
1095
|
});
|
|
1096
1096
|
return (i, a) => (c(), p("div", {
|
|
1097
|
-
class:
|
|
1097
|
+
class: S(["t-switch", { on: e.modelValue }]),
|
|
1098
1098
|
style: T(r.value),
|
|
1099
1099
|
onClick: n
|
|
1100
1100
|
}, [...a[0] || (a[0] = [
|
|
1101
1101
|
$("div", { class: "t-switch-icon" }, null, -1)
|
|
1102
1102
|
])], 6));
|
|
1103
1103
|
}
|
|
1104
|
-
}), Lt = /* @__PURE__ */
|
|
1104
|
+
}), Lt = /* @__PURE__ */ _(qt, [["__scopeId", "data-v-3616970e"]]), Wt = /* @__PURE__ */ b({
|
|
1105
1105
|
__name: "t-tab",
|
|
1106
1106
|
props: {
|
|
1107
1107
|
value: {}
|
|
1108
1108
|
},
|
|
1109
1109
|
setup(o) {
|
|
1110
|
-
const s = o, e = de("tabsState"), t =
|
|
1110
|
+
const s = o, e = de("tabsState"), t = x(() => e.active.value === s.value), n = () => {
|
|
1111
1111
|
e.setActive(s.value);
|
|
1112
1112
|
};
|
|
1113
1113
|
return (r, i) => (c(), p("li", {
|
|
1114
|
-
class:
|
|
1114
|
+
class: S(["t-tab", { active: t.value }])
|
|
1115
1115
|
}, [
|
|
1116
1116
|
W(j, {
|
|
1117
1117
|
variant: "text",
|
|
@@ -1126,7 +1126,7 @@ const It = /* @__PURE__ */ y(xt, [["render", zt]]), Bt = /* @__PURE__ */ k({
|
|
|
1126
1126
|
}, 8, ["size", "color"])
|
|
1127
1127
|
], 2));
|
|
1128
1128
|
}
|
|
1129
|
-
}), Ht = /* @__PURE__ */
|
|
1129
|
+
}), Ht = /* @__PURE__ */ _(Wt, [["__scopeId", "data-v-36c12a50"]]), Ut = /* @__PURE__ */ b({
|
|
1130
1130
|
__name: "t-tabs",
|
|
1131
1131
|
props: {
|
|
1132
1132
|
placement: { default: "top-start" },
|
|
@@ -1138,7 +1138,7 @@ const It = /* @__PURE__ */ y(xt, [["render", zt]]), Bt = /* @__PURE__ */ k({
|
|
|
1138
1138
|
},
|
|
1139
1139
|
emits: ["update:modelValue"],
|
|
1140
1140
|
setup(o, { emit: s }) {
|
|
1141
|
-
const e = o, t = s, n = v("0px"), r = v(), i =
|
|
1141
|
+
const e = o, t = s, n = v("0px"), r = v(), i = x(() => {
|
|
1142
1142
|
let d = e.color;
|
|
1143
1143
|
return ["warning", "info", "danger", "primary", "secondary", "success"].includes(d) && (d = `var(--t-color-status-${d})`), d;
|
|
1144
1144
|
}), a = () => {
|
|
@@ -1146,20 +1146,20 @@ const It = /* @__PURE__ */ y(xt, [["render", zt]]), Bt = /* @__PURE__ */ k({
|
|
|
1146
1146
|
if (e.placement.startsWith("top-") || e.placement.startsWith("bottom-")) {
|
|
1147
1147
|
let d = r.value.querySelector(".active");
|
|
1148
1148
|
if (d) {
|
|
1149
|
-
let m = d.getBoundingClientRect().left - r.value.getBoundingClientRect().left + r.value.scrollLeft,
|
|
1150
|
-
n.value = m +
|
|
1149
|
+
let m = d.getBoundingClientRect().left - r.value.getBoundingClientRect().left + r.value.scrollLeft, y = d.offsetWidth / 2;
|
|
1150
|
+
n.value = m + y - e.border / 2 + "px";
|
|
1151
1151
|
}
|
|
1152
1152
|
} else if (e.placement.startsWith("left-") || e.placement.startsWith("right-")) {
|
|
1153
1153
|
let d = r.value.querySelector(".active");
|
|
1154
1154
|
if (d) {
|
|
1155
|
-
let m = d.getBoundingClientRect().top - r.value.getBoundingClientRect().top + r.value.scrollTop,
|
|
1156
|
-
n.value = m +
|
|
1155
|
+
let m = d.getBoundingClientRect().top - r.value.getBoundingClientRect().top + r.value.scrollTop, y = d.offsetHeight / 2;
|
|
1156
|
+
n.value = m + y - e.border / 2 + "px";
|
|
1157
1157
|
}
|
|
1158
1158
|
}
|
|
1159
1159
|
}, 50);
|
|
1160
1160
|
};
|
|
1161
1161
|
return pe("tabsState", {
|
|
1162
|
-
active:
|
|
1162
|
+
active: x(() => e.modelValue),
|
|
1163
1163
|
color: i.value,
|
|
1164
1164
|
size: e.size,
|
|
1165
1165
|
variant: e.variant,
|
|
@@ -1171,13 +1171,13 @@ const It = /* @__PURE__ */ y(xt, [["render", zt]]), Bt = /* @__PURE__ */ k({
|
|
|
1171
1171
|
}), (d, m) => (c(), p("ul", {
|
|
1172
1172
|
ref_key: "container",
|
|
1173
1173
|
ref: r,
|
|
1174
|
-
class:
|
|
1174
|
+
class: S(["t-tabs", { [d.placement]: !0, [d.variant]: !0 }]),
|
|
1175
1175
|
style: T({ "--color": i.value, "--transform": n.value, "--border": d.border + "px" })
|
|
1176
1176
|
}, [
|
|
1177
1177
|
h(d.$slots, "default", {}, void 0, !0)
|
|
1178
1178
|
], 6));
|
|
1179
1179
|
}
|
|
1180
|
-
}), Xt = /* @__PURE__ */
|
|
1180
|
+
}), Xt = /* @__PURE__ */ _(Ut, [["__scopeId", "data-v-65a2c74c"]]), jt = /* @__PURE__ */ b({
|
|
1181
1181
|
__name: "t-loading-app",
|
|
1182
1182
|
setup(o) {
|
|
1183
1183
|
return (s, e) => (c(), B(ae, null, {
|
|
@@ -1187,10 +1187,10 @@ const It = /* @__PURE__ */ y(xt, [["render", zt]]), Bt = /* @__PURE__ */ k({
|
|
|
1187
1187
|
_: 1
|
|
1188
1188
|
}));
|
|
1189
1189
|
}
|
|
1190
|
-
}), Ft = /* @__PURE__ */
|
|
1190
|
+
}), Ft = /* @__PURE__ */ _(jt, [["__scopeId", "data-v-1436aa9f"]]), Gt = { key: 0 }, Kt = {
|
|
1191
1191
|
key: 0,
|
|
1192
1192
|
class: "t-checkbox-label"
|
|
1193
|
-
}, Jt = /* @__PURE__ */
|
|
1193
|
+
}, Jt = /* @__PURE__ */ b({
|
|
1194
1194
|
__name: "t-checkbox",
|
|
1195
1195
|
props: {
|
|
1196
1196
|
label: { default: "" },
|
|
@@ -1203,7 +1203,7 @@ const It = /* @__PURE__ */ y(xt, [["render", zt]]), Bt = /* @__PURE__ */ k({
|
|
|
1203
1203
|
},
|
|
1204
1204
|
emits: ["update:modelValue"],
|
|
1205
1205
|
setup(o, { emit: s }) {
|
|
1206
|
-
const e = o, t = s, n =
|
|
1206
|
+
const e = o, t = s, n = x(() => {
|
|
1207
1207
|
let a = {
|
|
1208
1208
|
"--background": e.color,
|
|
1209
1209
|
"--color": "#ffffff"
|
|
@@ -1212,19 +1212,19 @@ const It = /* @__PURE__ */ y(xt, [["render", zt]]), Bt = /* @__PURE__ */ k({
|
|
|
1212
1212
|
"--background": `var(--t-color-status-${e.color})`,
|
|
1213
1213
|
"--color": `var(--t-color-status-${e.color}-text)`
|
|
1214
1214
|
}), a;
|
|
1215
|
-
}), r =
|
|
1215
|
+
}), r = x(() => e.multiple ? e.modelValue.includes(e.value) : e.value === void 0 ? e.modelValue : e.modelValue == e.value), i = () => {
|
|
1216
1216
|
if (e.multiple) {
|
|
1217
1217
|
let a = e.modelValue;
|
|
1218
1218
|
e.modelValue.includes(e.value) ? a.splice(a.indexOf(e.value), 1) : a.push(e.value), t("update:modelValue", a);
|
|
1219
1219
|
} else e.value === void 0 ? t("update:modelValue", !e.modelValue) : t("update:modelValue", e.value);
|
|
1220
1220
|
};
|
|
1221
1221
|
return (a, d) => (c(), p("div", {
|
|
1222
|
-
class:
|
|
1222
|
+
class: S(["t-checkbox", { active: r.value }]),
|
|
1223
1223
|
style: T(n.value),
|
|
1224
1224
|
onClick: i
|
|
1225
1225
|
}, [
|
|
1226
1226
|
$("div", {
|
|
1227
|
-
class:
|
|
1227
|
+
class: S(`t-checkbox-${a.type}`)
|
|
1228
1228
|
}, [
|
|
1229
1229
|
a.type == "radio" ? (c(), p("div", Gt)) : I("", !0),
|
|
1230
1230
|
a.type == "check" ? h(a.$slots, "icon", { key: 1 }, () => [
|
|
@@ -1234,7 +1234,7 @@ const It = /* @__PURE__ */ y(xt, [["render", zt]]), Bt = /* @__PURE__ */ k({
|
|
|
1234
1234
|
a.label ? (c(), p("span", Kt, M(e.label), 1)) : I("", !0)
|
|
1235
1235
|
], 6));
|
|
1236
1236
|
}
|
|
1237
|
-
}), Qt = /* @__PURE__ */
|
|
1237
|
+
}), Qt = /* @__PURE__ */ _(Jt, [["__scopeId", "data-v-d558d0b0"]]), Zt = /* @__PURE__ */ b({
|
|
1238
1238
|
__name: "t-keyboard",
|
|
1239
1239
|
setup(o) {
|
|
1240
1240
|
const { height: s } = re();
|
|
@@ -1243,7 +1243,7 @@ const It = /* @__PURE__ */ y(xt, [["render", zt]]), Bt = /* @__PURE__ */ k({
|
|
|
1243
1243
|
style: T({ "--height": E(s) + "px" })
|
|
1244
1244
|
}, null, 4));
|
|
1245
1245
|
}
|
|
1246
|
-
}), Yt = /* @__PURE__ */
|
|
1246
|
+
}), Yt = /* @__PURE__ */ _(Zt, [["__scopeId", "data-v-5d3fa1da"]]), eo = /* @__PURE__ */ b({
|
|
1247
1247
|
__name: "t-skeleton",
|
|
1248
1248
|
props: {
|
|
1249
1249
|
width: { default: "100%" },
|
|
@@ -1252,7 +1252,7 @@ const It = /* @__PURE__ */ y(xt, [["render", zt]]), Bt = /* @__PURE__ */ k({
|
|
|
1252
1252
|
color: { default: null }
|
|
1253
1253
|
},
|
|
1254
1254
|
setup(o) {
|
|
1255
|
-
const s = o, e =
|
|
1255
|
+
const s = o, e = x(() => ({
|
|
1256
1256
|
"--width": s.width,
|
|
1257
1257
|
"--height": s.height,
|
|
1258
1258
|
"--radius": s.radius
|
|
@@ -1262,20 +1262,41 @@ const It = /* @__PURE__ */ y(xt, [["render", zt]]), Bt = /* @__PURE__ */ k({
|
|
|
1262
1262
|
style: T(e.value)
|
|
1263
1263
|
}, null, 4));
|
|
1264
1264
|
}
|
|
1265
|
-
}), to = /* @__PURE__ */
|
|
1265
|
+
}), to = /* @__PURE__ */ _(eo, [["__scopeId", "data-v-877bbdb5"]]), oo = /* @__PURE__ */ b({
|
|
1266
|
+
__name: "t-ripple",
|
|
1267
|
+
props: {
|
|
1268
|
+
color: { default: "primary" }
|
|
1269
|
+
},
|
|
1270
|
+
setup(o) {
|
|
1271
|
+
const s = o, e = x(() => {
|
|
1272
|
+
let t = {};
|
|
1273
|
+
return s.color ? ["warning", "info", "danger", "primary", "secondary", "success"].includes(s.color) ? t = {
|
|
1274
|
+
"--color": "var(--t-color-status-" + s.color + ")"
|
|
1275
|
+
} : t = {
|
|
1276
|
+
"--color": s.color
|
|
1277
|
+
} : t = {
|
|
1278
|
+
"--color": "var(--t-color-surface)"
|
|
1279
|
+
}, t;
|
|
1280
|
+
});
|
|
1281
|
+
return (t, n) => (c(), p("div", {
|
|
1282
|
+
class: "t-ripple",
|
|
1283
|
+
style: T(e.value)
|
|
1284
|
+
}, null, 4));
|
|
1285
|
+
}
|
|
1286
|
+
}), so = /* @__PURE__ */ _(oo, [["__scopeId", "data-v-42cb3d71"]]), po = () => ({
|
|
1266
1287
|
install: (o) => {
|
|
1267
|
-
_e(), o.component("t-app", be), o.component("t-screen", le), o.component("t-swipe-screen", tt), o.component("t-cable", Ue), o.component("t-toolbar", st), o.component("t-content", ae), o.component("t-card", Xe), o.component("t-refresher", Je), o.component("t-button", j), o.component("t-back-button", rt), o.component("t-present", D), o.component("t-text", F), o.component("t-sheet", it), o.component("t-pull-signal", ce), o.component("t-input", mt), o.component("t-textarea", yt), o.component("t-rich-text", bt), o.component("t-grid", Tt), o.component("t-grid-item", It), o.component("t-divider", Ct), o.component("t-toggle-password", Vt), o.component("t-loading-icon", X), o.component("t-alert", se), o.component("t-avatar", Pt), o.component("t-collapse", Nt), o.component("t-toast", ne), o.component("t-switch", Lt), o.component("t-tab", Ht), o.component("t-tabs", Xt), o.component("t-loading-app", Ft), o.component("t-checkbox", Qt), o.component("t-keyboard", Yt), o.component("t-skeleton", to);
|
|
1288
|
+
_e(), o.component("t-app", be), o.component("t-screen", le), o.component("t-swipe-screen", tt), o.component("t-cable", Ue), o.component("t-toolbar", st), o.component("t-content", ae), o.component("t-card", Xe), o.component("t-refresher", Je), o.component("t-button", j), o.component("t-back-button", rt), o.component("t-present", D), o.component("t-text", F), o.component("t-sheet", it), o.component("t-pull-signal", ce), o.component("t-input", mt), o.component("t-textarea", yt), o.component("t-rich-text", bt), o.component("t-grid", Tt), o.component("t-grid-item", It), o.component("t-divider", Ct), o.component("t-toggle-password", Vt), o.component("t-loading-icon", X), o.component("t-alert", se), o.component("t-avatar", Pt), o.component("t-collapse", Nt), o.component("t-toast", ne), o.component("t-switch", Lt), o.component("t-tab", Ht), o.component("t-tabs", Xt), o.component("t-loading-app", Ft), o.component("t-checkbox", Qt), o.component("t-keyboard", Yt), o.component("t-skeleton", to), o.component("t-ripple", so);
|
|
1268
1289
|
}
|
|
1269
1290
|
});
|
|
1270
1291
|
export {
|
|
1271
1292
|
ve as blurCurrentActive,
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
|
|
1293
|
+
co as createAction,
|
|
1294
|
+
lo as createAlert,
|
|
1295
|
+
io as createLoading,
|
|
1296
|
+
uo as createToast,
|
|
1297
|
+
po as createToife,
|
|
1277
1298
|
me as isFormElement,
|
|
1278
|
-
|
|
1299
|
+
Re as presentController,
|
|
1279
1300
|
w as screenController,
|
|
1280
1301
|
re as useKeyboard
|
|
1281
1302
|
};
|