@toife/vue 1.2.18 → 1.2.19
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 +206 -206
- 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 f, openBlock as c, renderSlot as
|
|
2
|
-
import { gesture as
|
|
1
|
+
import { createElementBlock as f, openBlock as c, renderSlot as h, defineComponent as $, ref as v, computed as z, reactive as ee, watch as L, Fragment as A, withDirectives as O, createCommentVNode as I, normalizeStyle as w, normalizeClass as x, vShow as N, createElementVNode as k, createVNode as W, createBlock as B, withCtx as V, toDisplayString as M, renderList as q, createTextVNode as R, createApp as H, h as U, unref as E, onUnmounted as G, onMounted as K, resolveDynamicComponent as ce, markRaw as ie, inject as ue, provide as de } from "vue";
|
|
2
|
+
import { gesture as J } from "@toife/gesture";
|
|
3
3
|
import { useRouter as te, useRoute as pe } from "vue-router";
|
|
4
4
|
const fe = (o) => o && (o.tagName == "INPUT" || o.tagName == "TEXTAREA" || o.isContentEditable), me = () => {
|
|
5
5
|
const o = document.activeElement;
|
|
@@ -16,10 +16,10 @@ const fe = (o) => o && (o.tagName == "INPUT" || o.tagName == "TEXTAREA" || o.isC
|
|
|
16
16
|
}, _e = {}, ge = { class: "t-app" };
|
|
17
17
|
function ye(o, s) {
|
|
18
18
|
return c(), f("div", ge, [
|
|
19
|
-
|
|
19
|
+
h(o.$slots, "default")
|
|
20
20
|
]);
|
|
21
21
|
}
|
|
22
|
-
const he = /* @__PURE__ */ g(_e, [["render", ye]]), be = /* @__PURE__ */
|
|
22
|
+
const he = /* @__PURE__ */ g(_e, [["render", ye]]), be = /* @__PURE__ */ $({
|
|
23
23
|
__name: "t-present",
|
|
24
24
|
props: {
|
|
25
25
|
keepalive: { type: Boolean, default: !0 },
|
|
@@ -29,21 +29,21 @@ const he = /* @__PURE__ */ g(_e, [["render", ye]]), be = /* @__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,
|
|
32
|
+
const t = v(0), n = v(!1), r = v(), i = v(), a = o, d = e, m = z(() => n.value || a.keepalive), _ = ee({
|
|
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 = (p) => {
|
|
38
38
|
a.backdrop ? p?.backdropOpacity && (_["--t-present-backdrop-opacity"] = p.backdropOpacity) : _["--t-present-backdrop-opacity"] = "0", p?.transition && (_["--t-present-transition"] = p.transition, _["--t-present-transition"] = p.transition), p?.contentTransform && (_["--t-present-content-transform"] = p.contentTransform), p?.contentOpacity && (_["--t-present-content-opacity"] = p.contentOpacity);
|
|
39
|
-
},
|
|
39
|
+
}, y = () => {
|
|
40
40
|
l({
|
|
41
41
|
contentTransform: "0px",
|
|
42
42
|
transition: "0.2s",
|
|
43
43
|
backdropOpacity: "0.4",
|
|
44
44
|
contentOpacity: "1"
|
|
45
45
|
});
|
|
46
|
-
},
|
|
46
|
+
}, u = () => {
|
|
47
47
|
let p = "0px", S = "1";
|
|
48
48
|
a.placement == "bottom" || a.placement == "right" ? p = "100%" : a.placement == "top" || a.placement == "left" ? p = "-100%" : a.placement == "center" && (p = "0px", S = "0"), l({
|
|
49
49
|
contentTransform: p,
|
|
@@ -54,19 +54,19 @@ const he = /* @__PURE__ */ g(_e, [["render", ye]]), be = /* @__PURE__ */ k({
|
|
|
54
54
|
};
|
|
55
55
|
L(() => a.visible, () => {
|
|
56
56
|
a.visible ? (n.value = !0, t.value = Me.getNewIndex(), setTimeout(() => {
|
|
57
|
-
|
|
58
|
-
}, 50)) : (
|
|
57
|
+
y();
|
|
58
|
+
}, 50)) : (u(), setTimeout(() => {
|
|
59
59
|
n.value = !1;
|
|
60
60
|
}, 200));
|
|
61
61
|
}), s({
|
|
62
62
|
render: l,
|
|
63
|
-
open:
|
|
64
|
-
close:
|
|
63
|
+
open: y,
|
|
64
|
+
close: u
|
|
65
65
|
});
|
|
66
|
-
const
|
|
67
|
-
p.preventDefault(),
|
|
66
|
+
const b = (p) => {
|
|
67
|
+
p.preventDefault(), d("dismiss", "backdrop");
|
|
68
68
|
};
|
|
69
|
-
return
|
|
69
|
+
return u(), (p, S) => (c(), f(A, null, [
|
|
70
70
|
m.value ? O((c(), f("div", {
|
|
71
71
|
key: 0,
|
|
72
72
|
class: x(["t-present", { [p.placement]: !0 }]),
|
|
@@ -74,14 +74,14 @@ const he = /* @__PURE__ */ g(_e, [["render", ye]]), be = /* @__PURE__ */ k({
|
|
|
74
74
|
ref: i,
|
|
75
75
|
style: w({ ..._, zIndex: t.value })
|
|
76
76
|
}, [
|
|
77
|
-
|
|
77
|
+
h(p.$slots, "default", {}, void 0, !0)
|
|
78
78
|
], 6)), [
|
|
79
79
|
[N, n.value]
|
|
80
80
|
]) : I("", !0),
|
|
81
81
|
m.value ? O((c(), f("div", {
|
|
82
82
|
key: 1,
|
|
83
83
|
class: "t-present-backdrop",
|
|
84
|
-
onClick:
|
|
84
|
+
onClick: b,
|
|
85
85
|
ref_key: "backdrop",
|
|
86
86
|
ref: r,
|
|
87
87
|
style: w({ ..._, zIndex: t.value - 1 })
|
|
@@ -90,7 +90,7 @@ const he = /* @__PURE__ */ g(_e, [["render", ye]]), be = /* @__PURE__ */ k({
|
|
|
90
90
|
]) : I("", !0)
|
|
91
91
|
], 64));
|
|
92
92
|
}
|
|
93
|
-
}), D = /* @__PURE__ */ g(be, [["__scopeId", "data-v-3d0c3227"]]), ke = /* @__PURE__ */
|
|
93
|
+
}), D = /* @__PURE__ */ g(be, [["__scopeId", "data-v-3d0c3227"]]), ke = /* @__PURE__ */ $({
|
|
94
94
|
__name: "t-loading-icon",
|
|
95
95
|
props: {
|
|
96
96
|
size: {
|
|
@@ -114,10 +114,10 @@ const he = /* @__PURE__ */ g(_e, [["render", ye]]), be = /* @__PURE__ */ k({
|
|
|
114
114
|
"aria-label": "Loading..."
|
|
115
115
|
}, null, 4));
|
|
116
116
|
}
|
|
117
|
-
}),
|
|
117
|
+
}), X = /* @__PURE__ */ g(ke, [["__scopeId", "data-v-7c463303"]]), $e = {
|
|
118
118
|
key: 0,
|
|
119
119
|
class: "loader"
|
|
120
|
-
}, Te = /* @__PURE__ */
|
|
120
|
+
}, Te = /* @__PURE__ */ $({
|
|
121
121
|
__name: "t-button",
|
|
122
122
|
props: {
|
|
123
123
|
color: { default: null },
|
|
@@ -174,13 +174,13 @@ const he = /* @__PURE__ */ g(_e, [["render", ye]]), be = /* @__PURE__ */ k({
|
|
|
174
174
|
class: x(["t-button", { "active-background": s.activeBackground, rounded: s.rounded, block: s.block, ["size-" + s.size]: !0 }]),
|
|
175
175
|
style: w(e.value)
|
|
176
176
|
}, [
|
|
177
|
-
O(
|
|
178
|
-
|
|
177
|
+
O(k("span", null, [
|
|
178
|
+
h(t.$slots, "default", {}, void 0, !0)
|
|
179
179
|
], 512), [
|
|
180
180
|
[N, !s.loading]
|
|
181
181
|
]),
|
|
182
182
|
s.loading ? (c(), f("span", $e, [
|
|
183
|
-
W(
|
|
183
|
+
W(X, {
|
|
184
184
|
color: "var(--color)",
|
|
185
185
|
type: s.loadingType
|
|
186
186
|
}, null, 8, ["type"])
|
|
@@ -190,7 +190,7 @@ const he = /* @__PURE__ */ g(_e, [["render", ye]]), be = /* @__PURE__ */ k({
|
|
|
190
190
|
}), j = /* @__PURE__ */ g(Te, [["__scopeId", "data-v-74d8380d"]]), we = {
|
|
191
191
|
key: 0,
|
|
192
192
|
class: "t-alert-header"
|
|
193
|
-
}, xe = { class: "t-alert-content" }, Se = { class: "t-alert-footer" }, ze = /* @__PURE__ */
|
|
193
|
+
}, xe = { class: "t-alert-content" }, Se = { class: "t-alert-footer" }, ze = /* @__PURE__ */ $({
|
|
194
194
|
__name: "t-alert",
|
|
195
195
|
props: {
|
|
196
196
|
title: {},
|
|
@@ -200,7 +200,7 @@ const he = /* @__PURE__ */ g(_e, [["render", ye]]), be = /* @__PURE__ */ k({
|
|
|
200
200
|
},
|
|
201
201
|
emits: ["dismiss"],
|
|
202
202
|
setup(o, { expose: s, emit: e }) {
|
|
203
|
-
const t = o, n = v(!1), r = e, i = v(), a = v(!1),
|
|
203
|
+
const t = o, n = v(!1), r = e, i = v(), a = v(!1), d = () => {
|
|
204
204
|
n.value = !0;
|
|
205
205
|
}, m = (l) => {
|
|
206
206
|
n.value = !1, l.handler && l.handler(), r("dismiss", "choose", l?.data);
|
|
@@ -210,8 +210,8 @@ const he = /* @__PURE__ */ g(_e, [["render", ye]]), be = /* @__PURE__ */ k({
|
|
|
210
210
|
}, 300));
|
|
211
211
|
};
|
|
212
212
|
return s({
|
|
213
|
-
open:
|
|
214
|
-
}), (l,
|
|
213
|
+
open: d
|
|
214
|
+
}), (l, y) => (c(), B(D, {
|
|
215
215
|
placement: "center",
|
|
216
216
|
backdrop: !0,
|
|
217
217
|
keepalive: !1,
|
|
@@ -219,26 +219,26 @@ const he = /* @__PURE__ */ g(_e, [["render", ye]]), be = /* @__PURE__ */ k({
|
|
|
219
219
|
onDismiss: _
|
|
220
220
|
}, {
|
|
221
221
|
default: V(() => [
|
|
222
|
-
|
|
222
|
+
k("div", {
|
|
223
223
|
class: x(["t-alert", { pop: a.value }]),
|
|
224
224
|
ref_key: "container",
|
|
225
225
|
ref: i
|
|
226
226
|
}, [
|
|
227
|
-
|
|
227
|
+
h(l.$slots, "header", {}, () => [
|
|
228
228
|
t.title ? (c(), f("div", we, M(t.title), 1)) : I("", !0)
|
|
229
229
|
], !0),
|
|
230
|
-
|
|
231
|
-
|
|
230
|
+
h(l.$slots, "content", {}, () => [
|
|
231
|
+
k("div", xe, M(t.message), 1)
|
|
232
232
|
], !0),
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
(c(!0), f(A, null, q(t.actions, (
|
|
236
|
-
color:
|
|
237
|
-
variant:
|
|
238
|
-
onClick: (
|
|
233
|
+
h(l.$slots, "footer", {}, () => [
|
|
234
|
+
k("div", Se, [
|
|
235
|
+
(c(!0), f(A, null, q(t.actions, (u) => (c(), B(j, {
|
|
236
|
+
color: u.color,
|
|
237
|
+
variant: u.variant,
|
|
238
|
+
onClick: (b) => m(u)
|
|
239
239
|
}, {
|
|
240
240
|
default: V(() => [
|
|
241
|
-
R(M(
|
|
241
|
+
R(M(u.text), 1)
|
|
242
242
|
]),
|
|
243
243
|
_: 2
|
|
244
244
|
}, 1032, ["color", "variant", "onClick"]))), 256))
|
|
@@ -249,16 +249,16 @@ const he = /* @__PURE__ */ g(_e, [["render", ye]]), be = /* @__PURE__ */ k({
|
|
|
249
249
|
_: 3
|
|
250
250
|
}, 8, ["visible"]));
|
|
251
251
|
}
|
|
252
|
-
}), oe = /* @__PURE__ */ g(ze, [["__scopeId", "data-v-05d0c578"]]),
|
|
252
|
+
}), oe = /* @__PURE__ */ g(ze, [["__scopeId", "data-v-05d0c578"]]), Yt = (o = {}) => ({
|
|
253
253
|
open() {
|
|
254
254
|
return new Promise((s) => {
|
|
255
255
|
let e = document.body.querySelector(".t-app");
|
|
256
256
|
if (!e) return;
|
|
257
257
|
const t = document.createElement("div"), n = v();
|
|
258
258
|
e.appendChild(t);
|
|
259
|
-
const r =
|
|
259
|
+
const r = H({
|
|
260
260
|
render() {
|
|
261
|
-
return
|
|
261
|
+
return U(oe, {
|
|
262
262
|
...o,
|
|
263
263
|
ref: n,
|
|
264
264
|
onDismiss: (i, a) => {
|
|
@@ -274,7 +274,7 @@ const he = /* @__PURE__ */ g(_e, [["render", ye]]), be = /* @__PURE__ */ k({
|
|
|
274
274
|
}, 50);
|
|
275
275
|
});
|
|
276
276
|
}
|
|
277
|
-
}), Ie = /* @__PURE__ */
|
|
277
|
+
}), Ie = /* @__PURE__ */ $({
|
|
278
278
|
__name: "t-action",
|
|
279
279
|
props: {
|
|
280
280
|
actions: {},
|
|
@@ -282,7 +282,7 @@ const he = /* @__PURE__ */ g(_e, [["render", ye]]), be = /* @__PURE__ */ k({
|
|
|
282
282
|
},
|
|
283
283
|
emits: ["dismiss"],
|
|
284
284
|
setup(o, { expose: s, emit: e }) {
|
|
285
|
-
const t = o, n = v(!1), r = e, i = v(), a = v(!1),
|
|
285
|
+
const t = o, n = v(!1), r = e, i = v(), a = v(!1), d = () => {
|
|
286
286
|
n.value = !0;
|
|
287
287
|
}, m = (l) => {
|
|
288
288
|
n.value = !1, l.handler && l.handler(), r("dismiss", "choose", l?.data);
|
|
@@ -292,8 +292,8 @@ const he = /* @__PURE__ */ g(_e, [["render", ye]]), be = /* @__PURE__ */ k({
|
|
|
292
292
|
}, 300));
|
|
293
293
|
};
|
|
294
294
|
return s({
|
|
295
|
-
open:
|
|
296
|
-
}), (l,
|
|
295
|
+
open: d
|
|
296
|
+
}), (l, y) => (c(), B(D, {
|
|
297
297
|
placement: "bottom",
|
|
298
298
|
backdrop: !0,
|
|
299
299
|
keepalive: !1,
|
|
@@ -301,21 +301,21 @@ const he = /* @__PURE__ */ g(_e, [["render", ye]]), be = /* @__PURE__ */ k({
|
|
|
301
301
|
onDismiss: _
|
|
302
302
|
}, {
|
|
303
303
|
default: V(() => [
|
|
304
|
-
|
|
304
|
+
k("div", {
|
|
305
305
|
class: x(["t-action", { pop: a.value }]),
|
|
306
306
|
ref_key: "container",
|
|
307
307
|
ref: i
|
|
308
308
|
}, [
|
|
309
|
-
(c(!0), f(A, null, q(t.actions, (
|
|
310
|
-
(c(!0), f(A, null, q(
|
|
311
|
-
color:
|
|
312
|
-
size:
|
|
313
|
-
variant:
|
|
314
|
-
onClick: (p) => m(
|
|
309
|
+
(c(!0), f(A, null, q(t.actions, (u) => (c(), f("div", null, [
|
|
310
|
+
(c(!0), f(A, null, q(u, (b) => (c(), B(j, {
|
|
311
|
+
color: b.color,
|
|
312
|
+
size: b.size,
|
|
313
|
+
variant: b.variant,
|
|
314
|
+
onClick: (p) => m(b),
|
|
315
315
|
block: ""
|
|
316
316
|
}, {
|
|
317
317
|
default: V(() => [
|
|
318
|
-
R(M(
|
|
318
|
+
R(M(b.text), 1)
|
|
319
319
|
]),
|
|
320
320
|
_: 2
|
|
321
321
|
}, 1032, ["color", "size", "variant", "onClick"]))), 256))
|
|
@@ -332,9 +332,9 @@ const he = /* @__PURE__ */ g(_e, [["render", ye]]), be = /* @__PURE__ */ k({
|
|
|
332
332
|
if (!e) return;
|
|
333
333
|
const t = document.createElement("div"), n = v();
|
|
334
334
|
e.appendChild(t);
|
|
335
|
-
const r =
|
|
335
|
+
const r = H({
|
|
336
336
|
render() {
|
|
337
|
-
return
|
|
337
|
+
return U(Be, {
|
|
338
338
|
...o,
|
|
339
339
|
ref: n,
|
|
340
340
|
onDismiss: (i, a) => {
|
|
@@ -350,7 +350,7 @@ const he = /* @__PURE__ */ g(_e, [["render", ye]]), be = /* @__PURE__ */ k({
|
|
|
350
350
|
}, 50);
|
|
351
351
|
});
|
|
352
352
|
}
|
|
353
|
-
}), Ce = { class: "t-loading" }, Ee = /* @__PURE__ */
|
|
353
|
+
}), Ce = { class: "t-loading" }, Ee = /* @__PURE__ */ $({
|
|
354
354
|
__name: "t-loading",
|
|
355
355
|
props: {
|
|
356
356
|
type: { default: "spinner" }
|
|
@@ -365,16 +365,16 @@ const he = /* @__PURE__ */ g(_e, [["render", ye]]), be = /* @__PURE__ */ k({
|
|
|
365
365
|
close: () => {
|
|
366
366
|
n.value = !1;
|
|
367
367
|
}
|
|
368
|
-
}), (a,
|
|
368
|
+
}), (a, d) => (c(), B(D, {
|
|
369
369
|
placement: "center",
|
|
370
370
|
backdrop: !0,
|
|
371
371
|
keepalive: !1,
|
|
372
372
|
visible: n.value
|
|
373
373
|
}, {
|
|
374
374
|
default: V(() => [
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
W(
|
|
375
|
+
k("div", Ce, [
|
|
376
|
+
h(a.$slots, "default", {}, () => [
|
|
377
|
+
W(X, {
|
|
378
378
|
type: t.type
|
|
379
379
|
}, null, 8, ["type"])
|
|
380
380
|
], !0)
|
|
@@ -389,9 +389,9 @@ const he = /* @__PURE__ */ g(_e, [["render", ye]]), be = /* @__PURE__ */ k({
|
|
|
389
389
|
return {
|
|
390
390
|
open() {
|
|
391
391
|
return new Promise((r) => {
|
|
392
|
-
e && (n = document.createElement("div"), e.appendChild(n), t =
|
|
392
|
+
e && (n = document.createElement("div"), e.appendChild(n), t = H({
|
|
393
393
|
render() {
|
|
394
|
-
return
|
|
394
|
+
return U(Ve, {
|
|
395
395
|
...o,
|
|
396
396
|
ref: s
|
|
397
397
|
});
|
|
@@ -409,9 +409,9 @@ const he = /* @__PURE__ */ g(_e, [["render", ye]]), be = /* @__PURE__ */ k({
|
|
|
409
409
|
});
|
|
410
410
|
}
|
|
411
411
|
};
|
|
412
|
-
},
|
|
412
|
+
}, Z = v(1e3), Me = {
|
|
413
413
|
getNewIndex() {
|
|
414
|
-
return
|
|
414
|
+
return Z.value += 2, Z.value;
|
|
415
415
|
}
|
|
416
416
|
}, C = ee([]), Pe = (o) => {
|
|
417
417
|
C.push(o);
|
|
@@ -430,7 +430,7 @@ const he = /* @__PURE__ */ g(_e, [["render", ye]]), be = /* @__PURE__ */ k({
|
|
|
430
430
|
if (!(C.length < 2))
|
|
431
431
|
return C[C.length - 2];
|
|
432
432
|
})
|
|
433
|
-
}, De = /* @__PURE__ */
|
|
433
|
+
}, De = /* @__PURE__ */ $({
|
|
434
434
|
__name: "t-toast",
|
|
435
435
|
props: {
|
|
436
436
|
message: {},
|
|
@@ -442,7 +442,7 @@ const he = /* @__PURE__ */ g(_e, [["render", ye]]), be = /* @__PURE__ */ k({
|
|
|
442
442
|
},
|
|
443
443
|
emits: ["dismiss"],
|
|
444
444
|
setup(o, { expose: s, emit: e }) {
|
|
445
|
-
const t = o, n = e, r = v(!1), i = v(!1), a = v(!1),
|
|
445
|
+
const t = o, n = e, r = v(!1), i = v(!1), a = v(!1), d = () => {
|
|
446
446
|
i.value = !0, a.value = !1, setTimeout(() => {
|
|
447
447
|
r.value = !0;
|
|
448
448
|
}, 10), setTimeout(() => {
|
|
@@ -493,8 +493,8 @@ const he = /* @__PURE__ */ g(_e, [["render", ye]]), be = /* @__PURE__ */ k({
|
|
|
493
493
|
}), l;
|
|
494
494
|
});
|
|
495
495
|
return s({
|
|
496
|
-
open:
|
|
497
|
-
}), (l,
|
|
496
|
+
open: d
|
|
497
|
+
}), (l, y) => i.value ? (c(), f("div", {
|
|
498
498
|
key: 0,
|
|
499
499
|
class: x(["t-toast", { [t.placement]: !0, open: r.value, closing: a.value }]),
|
|
500
500
|
style: w({ "--space": t.space, ..._.value })
|
|
@@ -506,9 +506,9 @@ const he = /* @__PURE__ */ g(_e, [["render", ye]]), be = /* @__PURE__ */ k({
|
|
|
506
506
|
if (!s) return;
|
|
507
507
|
const e = document.createElement("div"), t = v();
|
|
508
508
|
s.appendChild(e);
|
|
509
|
-
const n =
|
|
509
|
+
const n = H({
|
|
510
510
|
render() {
|
|
511
|
-
return
|
|
511
|
+
return U(se, {
|
|
512
512
|
...o,
|
|
513
513
|
ref: t,
|
|
514
514
|
onDismiss: () => {
|
|
@@ -529,7 +529,7 @@ function ne() {
|
|
|
529
529
|
height: Oe
|
|
530
530
|
};
|
|
531
531
|
}
|
|
532
|
-
const Ne = /* @__PURE__ */
|
|
532
|
+
const Ne = /* @__PURE__ */ $({
|
|
533
533
|
__name: "t-cable",
|
|
534
534
|
props: {
|
|
535
535
|
keyboard: { type: Boolean, default: !0 },
|
|
@@ -541,10 +541,10 @@ const Ne = /* @__PURE__ */ k({
|
|
|
541
541
|
class: x(["t-cable", { keyboard: s.keyboard && E(e) > 0, [s.placement]: !0 }]),
|
|
542
542
|
style: w({ "--t-keyboard-height": E(e) + "px", "--t-keyboard-transition": E(e) > 0 ? "0.3s" : "0.1s" })
|
|
543
543
|
}, [
|
|
544
|
-
|
|
544
|
+
h(t.$slots, "default", {}, void 0, !0)
|
|
545
545
|
], 6));
|
|
546
546
|
}
|
|
547
|
-
}), qe = /* @__PURE__ */ g(Ne, [["__scopeId", "data-v-ecb72421"]]), Le = /* @__PURE__ */
|
|
547
|
+
}), qe = /* @__PURE__ */ g(Ne, [["__scopeId", "data-v-ecb72421"]]), Le = /* @__PURE__ */ $({
|
|
548
548
|
__name: "t-card",
|
|
549
549
|
props: {
|
|
550
550
|
color: { default: null }
|
|
@@ -564,32 +564,32 @@ const Ne = /* @__PURE__ */ k({
|
|
|
564
564
|
class: "t-card",
|
|
565
565
|
style: w(e.value)
|
|
566
566
|
}, [
|
|
567
|
-
|
|
567
|
+
h(t.$slots, "default")
|
|
568
568
|
], 4));
|
|
569
569
|
}
|
|
570
|
-
}), We = {},
|
|
571
|
-
function
|
|
572
|
-
return c(), f("div",
|
|
573
|
-
|
|
570
|
+
}), We = {}, He = { class: "t-content" };
|
|
571
|
+
function Ue(o, s) {
|
|
572
|
+
return c(), f("div", He, [
|
|
573
|
+
h(o.$slots, "default", {}, void 0, !0)
|
|
574
574
|
]);
|
|
575
575
|
}
|
|
576
|
-
const re = /* @__PURE__ */ g(We, [["render",
|
|
576
|
+
const re = /* @__PURE__ */ g(We, [["render", Ue], ["__scopeId", "data-v-3fd76212"]]), Y = 80, Xe = /* @__PURE__ */ $({
|
|
577
577
|
__name: "t-refresher",
|
|
578
578
|
emits: ["refresh"],
|
|
579
579
|
setup(o, { emit: s }) {
|
|
580
580
|
const e = s, t = v(0), n = v(!1), r = v();
|
|
581
581
|
let i, a = !1;
|
|
582
|
-
const
|
|
582
|
+
const d = () => {
|
|
583
583
|
n.value = !1, t.value = 0, i && i.cancel(), setTimeout(() => {
|
|
584
584
|
a = !1;
|
|
585
585
|
}, 2e3);
|
|
586
586
|
}, m = () => {
|
|
587
|
-
a = !0, n.value = !0, t.value =
|
|
587
|
+
a = !0, n.value = !0, t.value = Y, e("refresh", d);
|
|
588
588
|
};
|
|
589
589
|
return L(() => r.value, () => {
|
|
590
590
|
i && i.destroy();
|
|
591
591
|
let _ = r.value.closest(".t-content");
|
|
592
|
-
_ && (i =
|
|
592
|
+
_ && (i = J(_, {
|
|
593
593
|
isMoving: !1,
|
|
594
594
|
options: {
|
|
595
595
|
minDist: 60
|
|
@@ -597,11 +597,11 @@ const re = /* @__PURE__ */ g(We, [["render", He], ["__scopeId", "data-v-3fd76212
|
|
|
597
597
|
down() {
|
|
598
598
|
this.isMoving = !1;
|
|
599
599
|
},
|
|
600
|
-
move({ deltaY: l, initialDirection:
|
|
601
|
-
n.value || a ||
|
|
600
|
+
move({ deltaY: l, initialDirection: y }) {
|
|
601
|
+
n.value || a || y != "down" || (l >= 120 ? (this.isMoving = !1, m()) : (l > 10 || this.isMoving) && (this.isMoving = !0, t.value = l > 0 ? l : 0));
|
|
602
602
|
},
|
|
603
|
-
up({ deltaY: l, initialDirection:
|
|
604
|
-
this.isMoving = !1, !(n.value || a) && (l >
|
|
603
|
+
up({ deltaY: l, initialDirection: y }) {
|
|
604
|
+
this.isMoving = !1, !(n.value || a) && (l > Y && y == "down" ? m() : t.value = 0);
|
|
605
605
|
},
|
|
606
606
|
cancel() {
|
|
607
607
|
this.isMoving = !1, !(n.value || a) && (n.value = !1, t.value = 0);
|
|
@@ -617,7 +617,7 @@ const re = /* @__PURE__ */ g(We, [["render", He], ["__scopeId", "data-v-3fd76212
|
|
|
617
617
|
ref: r,
|
|
618
618
|
style: w({ height: `${t.value}px` })
|
|
619
619
|
}, [
|
|
620
|
-
|
|
620
|
+
k("img", {
|
|
621
621
|
class: x({ spiner: n.value }),
|
|
622
622
|
src: "https://static.toikit.com/toikit/home_2.png?v=3",
|
|
623
623
|
alt: "Loading...",
|
|
@@ -627,29 +627,29 @@ const re = /* @__PURE__ */ g(We, [["render", He], ["__scopeId", "data-v-3fd76212
|
|
|
627
627
|
[N, t.value > 0]
|
|
628
628
|
]);
|
|
629
629
|
}
|
|
630
|
-
}), je = /* @__PURE__ */ g(
|
|
630
|
+
}), je = /* @__PURE__ */ g(Xe, [["__scopeId", "data-v-c6364c14"]]), Fe = {}, Ge = { class: "t-screen" };
|
|
631
631
|
function Ke(o, s) {
|
|
632
632
|
return c(), f("div", Ge, [
|
|
633
|
-
|
|
633
|
+
h(o.$slots, "default", {}, void 0, !0)
|
|
634
634
|
]);
|
|
635
635
|
}
|
|
636
|
-
const ae = /* @__PURE__ */ g(Fe, [["render", Ke], ["__scopeId", "data-v-c2a3436c"]]),
|
|
636
|
+
const ae = /* @__PURE__ */ g(Fe, [["render", Ke], ["__scopeId", "data-v-c2a3436c"]]), Je = /* @__PURE__ */ $({
|
|
637
637
|
__name: "t-swipe-screen",
|
|
638
638
|
emits: ["change"],
|
|
639
639
|
setup(o, { emit: s }) {
|
|
640
640
|
let e = {};
|
|
641
641
|
const t = te(), n = pe(), r = t.getRoutes(), i = v(!1), a = s;
|
|
642
|
-
for (let
|
|
643
|
-
e[
|
|
644
|
-
const
|
|
645
|
-
|
|
646
|
-
name:
|
|
642
|
+
for (let u of r)
|
|
643
|
+
e[u.name] = u.components;
|
|
644
|
+
const d = (u) => {
|
|
645
|
+
u && T.addScreen({
|
|
646
|
+
name: u,
|
|
647
647
|
target: null,
|
|
648
|
-
component: ie(e[
|
|
648
|
+
component: ie(e[u] || null)
|
|
649
649
|
});
|
|
650
|
-
}, m = (
|
|
651
|
-
!
|
|
652
|
-
|
|
650
|
+
}, m = (u, b) => {
|
|
651
|
+
!b || T.screens[u].target || (T.screens[u].target = b.$el, u > 0 && (i.value = !0, b.$el.style.transform = "translateX(var(--t-app-width))", b.$el.transitionOrigin = "center", document.documentElement.style.setProperty("--t-screen-backdrop-duration", "0s"), document.documentElement.style.setProperty("--t-swipe-backdrop-opacity", "0"), setTimeout(() => {
|
|
652
|
+
b.$el.style.transition = "transform 0.35s ease", b.$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"), T.screens.length > 1 && (T.lastScreen.value.target.style.transitionOrigin = "left center", T.lastScreen.value.target.style.transition = "transform 0.35s ease", T.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(() => {
|
|
653
653
|
a("change"), i.value = !1;
|
|
654
654
|
}, 400);
|
|
655
655
|
}, 100)));
|
|
@@ -658,46 +658,46 @@ const ae = /* @__PURE__ */ g(Fe, [["render", Ke], ["__scopeId", "data-v-c2a3436c
|
|
|
658
658
|
T.removeScreen(), a("change"), i.value = !1;
|
|
659
659
|
}, 400);
|
|
660
660
|
};
|
|
661
|
-
|
|
662
|
-
|
|
661
|
+
d(n.name), L(() => n.name, (u, b) => {
|
|
662
|
+
u != T.currentScreen.value.name && (T.lastScreen.value?.name == u ? _() : d(u));
|
|
663
663
|
});
|
|
664
664
|
const l = () => {
|
|
665
665
|
i.value = !0;
|
|
666
|
-
const
|
|
667
|
-
|
|
666
|
+
const u = T.currentScreen.value.target, b = T.lastScreen.value.target;
|
|
667
|
+
u.style.transition = "transform 0.35s ease", u.style.transform = "translateX(0px)", b.style.transition = "transform 0.35s ease", b.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(() => {
|
|
668
668
|
i.value = !1;
|
|
669
669
|
}, 400);
|
|
670
670
|
};
|
|
671
|
-
let
|
|
671
|
+
let y;
|
|
672
672
|
return K(() => {
|
|
673
|
-
|
|
673
|
+
y = J(document.body, {
|
|
674
674
|
isMoving: !1,
|
|
675
|
-
beforeEvent(
|
|
675
|
+
beforeEvent(u) {
|
|
676
676
|
return !(i.value || T.screens.length < 2);
|
|
677
677
|
},
|
|
678
|
-
fast({ initialDirection:
|
|
679
|
-
|
|
678
|
+
fast({ initialDirection: u }) {
|
|
679
|
+
u == "right" && t.back();
|
|
680
680
|
},
|
|
681
681
|
down() {
|
|
682
682
|
this.isMoving = !1;
|
|
683
683
|
},
|
|
684
|
-
move({ deltaX:
|
|
685
|
-
if (
|
|
686
|
-
const p = window.innerWidth, S =
|
|
687
|
-
(
|
|
684
|
+
move({ deltaX: u, initialDirection: b }) {
|
|
685
|
+
if (b != "right") return;
|
|
686
|
+
const p = window.innerWidth, S = u / p * 100, P = T.currentScreen.value.target, Q = T.lastScreen?.value?.target;
|
|
687
|
+
(u > 15 && u <= p || this.isMoving) && (u = u > 0 ? u : 0, this.isMoving = !0, P.style.transition = "transform 0s ease", P.style.transform = `translateX(${u}px)`, Q.style.transition = "transform 0s ease", document.documentElement.style.setProperty("--t-screen-backdrop-duration", "0s"), Q.style.transform = `translateX(calc((var(--t-app-width) / 100 * 30 * -1) + ((var(--t-app-width) / 100 * 30) / 100 * ${S}))) scale(${0.5 + 0.5 / 100 * S}) perspective(var(--t-app-width)) rotateY(${30 - 30 / 100 * S}deg)`, document.documentElement.style.setProperty("--t-swipe-backdrop-opacity", `${0.5 - 0.5 / 100 * S}`));
|
|
688
688
|
},
|
|
689
|
-
up({ deltaX:
|
|
690
|
-
this.isMoving = !1,
|
|
689
|
+
up({ deltaX: u, initialDirection: b }) {
|
|
690
|
+
this.isMoving = !1, b != "right" && l();
|
|
691
691
|
const p = window.innerWidth;
|
|
692
|
-
|
|
692
|
+
u / p * 100 >= 50 ? t.back() : l();
|
|
693
693
|
},
|
|
694
694
|
cancel() {
|
|
695
695
|
this.isMoving = !1, l();
|
|
696
696
|
}
|
|
697
697
|
});
|
|
698
698
|
}), G(() => {
|
|
699
|
-
|
|
700
|
-
}), (
|
|
699
|
+
y && y.destroy(), T.removeAllScreen();
|
|
700
|
+
}), (u, b) => (c(), f(A, null, [
|
|
701
701
|
(c(!0), f(A, null, q(E(T).screens, (p, S) => (c(), B(ae, {
|
|
702
702
|
ref_for: !0,
|
|
703
703
|
ref: (P) => m(S, P),
|
|
@@ -709,13 +709,13 @@ const ae = /* @__PURE__ */ g(Fe, [["render", Ke], ["__scopeId", "data-v-c2a3436c
|
|
|
709
709
|
]),
|
|
710
710
|
_: 2
|
|
711
711
|
}, 1032, ["style"]))), 128)),
|
|
712
|
-
|
|
712
|
+
k("div", {
|
|
713
713
|
class: "t-swipe-backdrop",
|
|
714
714
|
style: w({ zIndex: E(T).screens.length })
|
|
715
715
|
}, null, 4)
|
|
716
716
|
], 64));
|
|
717
717
|
}
|
|
718
|
-
}),
|
|
718
|
+
}), Qe = /* @__PURE__ */ g(Je, [["__scopeId", "data-v-c652a864"]]), Ze = /* @__PURE__ */ $({
|
|
719
719
|
__name: "t-toolbar",
|
|
720
720
|
props: {
|
|
721
721
|
placement: { default: "bottom" },
|
|
@@ -728,12 +728,12 @@ const ae = /* @__PURE__ */ g(Fe, [["render", Ke], ["__scopeId", "data-v-c2a3436c
|
|
|
728
728
|
class: x(["t-toolbar", { [s.placement]: !0, safe: s.safe }]),
|
|
729
729
|
style: w({ "--t-size-toolbar": s.size })
|
|
730
730
|
}, [
|
|
731
|
-
|
|
732
|
-
|
|
731
|
+
k("div", null, [
|
|
732
|
+
h(e.$slots, "default", {}, void 0, !0)
|
|
733
733
|
])
|
|
734
734
|
], 6));
|
|
735
735
|
}
|
|
736
|
-
}),
|
|
736
|
+
}), Ye = /* @__PURE__ */ g(Ze, [["__scopeId", "data-v-db1924b1"]]), et = /* @__PURE__ */ $({
|
|
737
737
|
__name: "t-back-button",
|
|
738
738
|
props: {
|
|
739
739
|
to: {}
|
|
@@ -747,12 +747,12 @@ const ae = /* @__PURE__ */ g(Fe, [["render", Ke], ["__scopeId", "data-v-c2a3436c
|
|
|
747
747
|
class: "t-back-button",
|
|
748
748
|
onClick: t
|
|
749
749
|
}, [
|
|
750
|
-
|
|
751
|
-
r[0] || (r[0] =
|
|
750
|
+
h(n.$slots, "default", {}, () => [
|
|
751
|
+
r[0] || (r[0] = k("i", { class: "ri-arrow-left-s-line" }, null, -1))
|
|
752
752
|
], !0)
|
|
753
753
|
])) : I("", !0);
|
|
754
754
|
}
|
|
755
|
-
}), tt = /* @__PURE__ */ g(et, [["__scopeId", "data-v-ed626a3d"]]), ot = /* @__PURE__ */
|
|
755
|
+
}), tt = /* @__PURE__ */ g(et, [["__scopeId", "data-v-ed626a3d"]]), ot = /* @__PURE__ */ $({
|
|
756
756
|
__name: "t-text",
|
|
757
757
|
props: {
|
|
758
758
|
color: { default: "var(--t-color-text)" },
|
|
@@ -770,10 +770,10 @@ const ae = /* @__PURE__ */ g(Fe, [["render", Ke], ["__scopeId", "data-v-c2a3436c
|
|
|
770
770
|
class: "t-text",
|
|
771
771
|
style: w(e.value)
|
|
772
772
|
}, [
|
|
773
|
-
|
|
773
|
+
h(t.$slots, "default", {}, void 0, !0)
|
|
774
774
|
], 4));
|
|
775
775
|
}
|
|
776
|
-
}), F = /* @__PURE__ */ g(ot, [["__scopeId", "data-v-f0f94f05"]]), st = /* @__PURE__ */
|
|
776
|
+
}), F = /* @__PURE__ */ g(ot, [["__scopeId", "data-v-f0f94f05"]]), st = /* @__PURE__ */ $({
|
|
777
777
|
__name: "t-pull-signal",
|
|
778
778
|
props: {
|
|
779
779
|
placement: { default: "bottom" }
|
|
@@ -783,7 +783,7 @@ const ae = /* @__PURE__ */ g(Fe, [["render", Ke], ["__scopeId", "data-v-c2a3436c
|
|
|
783
783
|
class: x(["t-pull-bar", { [s.placement]: !0 }])
|
|
784
784
|
}, null, 2));
|
|
785
785
|
}
|
|
786
|
-
}), le = /* @__PURE__ */ g(st, [["__scopeId", "data-v-daa38c85"]]), nt = /* @__PURE__ */
|
|
786
|
+
}), le = /* @__PURE__ */ g(st, [["__scopeId", "data-v-daa38c85"]]), nt = /* @__PURE__ */ $({
|
|
787
787
|
__name: "t-sheet",
|
|
788
788
|
props: {
|
|
789
789
|
background: { default: "var(--t-color-surface)" },
|
|
@@ -801,7 +801,7 @@ const ae = /* @__PURE__ */ g(Fe, [["render", Ke], ["__scopeId", "data-v-c2a3436c
|
|
|
801
801
|
setup(o, { emit: s }) {
|
|
802
802
|
const e = o, t = s, n = v(), r = v(), i = v(!1);
|
|
803
803
|
let a = null;
|
|
804
|
-
const
|
|
804
|
+
const d = z(() => {
|
|
805
805
|
if (e.placement == "bottom") return "down";
|
|
806
806
|
if (e.placement == "top") return "up";
|
|
807
807
|
if (e.placement == "left") return "left";
|
|
@@ -814,35 +814,35 @@ const ae = /* @__PURE__ */ g(Fe, [["render", Ke], ["__scopeId", "data-v-c2a3436c
|
|
|
814
814
|
}, 300);
|
|
815
815
|
};
|
|
816
816
|
return L(() => n.value, (l) => {
|
|
817
|
-
l && (a =
|
|
817
|
+
l && (a = J(n.value, {
|
|
818
818
|
isMoving: !1,
|
|
819
819
|
options: {
|
|
820
820
|
minDist: 30
|
|
821
821
|
},
|
|
822
|
-
beforeEvent(
|
|
822
|
+
beforeEvent(y) {
|
|
823
823
|
return !(i.value || !e.gesture || e.placement == "center");
|
|
824
824
|
},
|
|
825
825
|
down() {
|
|
826
826
|
this.isMoving = !1;
|
|
827
827
|
},
|
|
828
|
-
fast({ initialDirection:
|
|
829
|
-
_(),
|
|
828
|
+
fast({ initialDirection: y }) {
|
|
829
|
+
_(), y == d.value ? t("dismiss", "gesture") : r.value.open();
|
|
830
830
|
},
|
|
831
|
-
move({ deltaY:
|
|
832
|
-
if (
|
|
831
|
+
move({ deltaY: y, deltaX: u, initialDirection: b }) {
|
|
832
|
+
if (b != d.value) return;
|
|
833
833
|
let p = 0;
|
|
834
|
-
e.placement == "bottom" || e.placement == "top" ? p =
|
|
834
|
+
e.placement == "bottom" || e.placement == "top" ? p = y : p = u, e.placement == "bottom" && (p = y > 0 ? y : 0), e.placement == "top" && (p = y < 0 ? y : 0), e.placement == "left" && (p = u < 0 ? y : 0), e.placement == "right" && (p = u > 0 ? y : 0), (e.placement == "bottom" && (p >= 10 || this.isMoving) || e.placement == "top" && (p <= -10 || this.isMoving) || e.placement == "left" && (p >= 10 || this.isMoving) || e.placement == "right" && (p <= -10 || this.isMoving)) && (this.isMoving = !0, r.value.render({
|
|
835
835
|
contentTransform: p + "px",
|
|
836
836
|
transition: "0s"
|
|
837
837
|
}));
|
|
838
838
|
},
|
|
839
|
-
up({ deltaY:
|
|
840
|
-
if (this.isMoving = !1, _(),
|
|
839
|
+
up({ deltaY: y, deltaX: u, initialDirection: b }) {
|
|
840
|
+
if (this.isMoving = !1, _(), b != d.value) {
|
|
841
841
|
r.value.open();
|
|
842
842
|
return;
|
|
843
843
|
}
|
|
844
844
|
let p, S, P;
|
|
845
|
-
e.placement == "bottom" || e.placement == "top" ? (p = n.value.offsetHeight, P =
|
|
845
|
+
e.placement == "bottom" || e.placement == "top" ? (p = n.value.offsetHeight, P = y) : (p = n.value.offsetWidth, P = u), S = P / p * 100, S > 50 ? t("dismiss", "gesture") : r.value.open();
|
|
846
846
|
},
|
|
847
847
|
cancel() {
|
|
848
848
|
this.isMoving = !1, _(), r.value.open();
|
|
@@ -850,7 +850,7 @@ const ae = /* @__PURE__ */ g(Fe, [["render", Ke], ["__scopeId", "data-v-c2a3436c
|
|
|
850
850
|
}));
|
|
851
851
|
}), G(() => {
|
|
852
852
|
a && a.destroy();
|
|
853
|
-
}), (l,
|
|
853
|
+
}), (l, y) => (c(), B(D, {
|
|
854
854
|
ref_key: "present",
|
|
855
855
|
ref: r,
|
|
856
856
|
placement: e.placement,
|
|
@@ -867,25 +867,25 @@ const ae = /* @__PURE__ */ g(Fe, [["render", Ke], ["__scopeId", "data-v-c2a3436c
|
|
|
867
867
|
e.closeButton && e.placement == "center" ? (c(), f("button", {
|
|
868
868
|
key: 1,
|
|
869
869
|
class: "t-sheet-close",
|
|
870
|
-
onClick:
|
|
870
|
+
onClick: y[0] || (y[0] = (u) => m("close-button"))
|
|
871
871
|
}, [
|
|
872
|
-
|
|
873
|
-
|
|
872
|
+
h(l.$slots, "close-icon", {}, () => [
|
|
873
|
+
y[1] || (y[1] = k("i", { class: "ri-close-large-line" }, null, -1))
|
|
874
874
|
], !0)
|
|
875
875
|
])) : I("", !0),
|
|
876
|
-
|
|
876
|
+
k("div", {
|
|
877
877
|
class: x(["t-sheet", { fullscreen: e.fullscreen, [e.placement]: !0, rounded: l.rounded, radius: e.radius }]),
|
|
878
878
|
style: w({ "--background": e.background }),
|
|
879
879
|
ref_key: "sheet",
|
|
880
880
|
ref: n
|
|
881
881
|
}, [
|
|
882
|
-
|
|
882
|
+
h(l.$slots, "default", {}, void 0, !0)
|
|
883
883
|
], 6)
|
|
884
884
|
]),
|
|
885
885
|
_: 3
|
|
886
886
|
}, 8, ["placement", "backdrop", "visible", "keepalive"]));
|
|
887
887
|
}
|
|
888
|
-
}), rt = /* @__PURE__ */ g(nt, [["__scopeId", "data-v-
|
|
888
|
+
}), rt = /* @__PURE__ */ g(nt, [["__scopeId", "data-v-0ff00a13"]]), at = { class: "t-input-label" }, lt = { class: "t-input-content" }, ct = ["type", "placeholder", "value"], it = /* @__PURE__ */ $({
|
|
889
889
|
__name: "t-input",
|
|
890
890
|
props: {
|
|
891
891
|
size: { default: "standard" },
|
|
@@ -906,17 +906,17 @@ const ae = /* @__PURE__ */ g(Fe, [["render", Ke], ["__scopeId", "data-v-c2a3436c
|
|
|
906
906
|
return (r, i) => (c(), f("div", {
|
|
907
907
|
class: x(["t-input", { rounded: e.rounded, ["size-" + e.size]: !0, ["variant-" + e.variant]: !0 }])
|
|
908
908
|
}, [
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
909
|
+
k("label", null, [
|
|
910
|
+
k("span", at, M(r.label), 1),
|
|
911
|
+
k("div", lt, [
|
|
912
|
+
h(r.$slots, "start", {}, void 0, !0),
|
|
913
|
+
k("input", {
|
|
914
914
|
type: r.type,
|
|
915
915
|
placeholder: r.placeholder,
|
|
916
916
|
value: r.modelValue,
|
|
917
917
|
onInput: n
|
|
918
918
|
}, null, 40, ct),
|
|
919
|
-
|
|
919
|
+
h(r.$slots, "end", {}, void 0, !0)
|
|
920
920
|
])
|
|
921
921
|
]),
|
|
922
922
|
e.error ? (c(), B(F, {
|
|
@@ -954,7 +954,7 @@ const bt = /* @__PURE__ */ g(gt, [["render", ht]]), kt = {}, $t = { class: "t-gr
|
|
|
954
954
|
function Tt(o, s) {
|
|
955
955
|
return c(), f("div", $t);
|
|
956
956
|
}
|
|
957
|
-
const wt = /* @__PURE__ */ g(kt, [["render", Tt]]), xt = /* @__PURE__ */
|
|
957
|
+
const wt = /* @__PURE__ */ g(kt, [["render", Tt]]), xt = /* @__PURE__ */ $({
|
|
958
958
|
__name: "t-divider",
|
|
959
959
|
props: {
|
|
960
960
|
direction: { default: "horizontal" }
|
|
@@ -965,7 +965,7 @@ const wt = /* @__PURE__ */ g(kt, [["render", Tt]]), xt = /* @__PURE__ */ k({
|
|
|
965
965
|
class: x(["t-divider", { [s.direction]: !0 }])
|
|
966
966
|
}, null, 2));
|
|
967
967
|
}
|
|
968
|
-
}), St = /* @__PURE__ */ g(xt, [["__scopeId", "data-v-47ee8991"]]), zt = /* @__PURE__ */
|
|
968
|
+
}), St = /* @__PURE__ */ g(xt, [["__scopeId", "data-v-47ee8991"]]), zt = /* @__PURE__ */ $({
|
|
969
969
|
__name: "t-toggle-password",
|
|
970
970
|
props: {
|
|
971
971
|
color: { default: "warning" }
|
|
@@ -982,7 +982,7 @@ const wt = /* @__PURE__ */ g(kt, [["render", Tt]]), xt = /* @__PURE__ */ k({
|
|
|
982
982
|
let m = a();
|
|
983
983
|
m && (n.value = m.type != "password", t("change", n.value));
|
|
984
984
|
});
|
|
985
|
-
const
|
|
985
|
+
const d = () => {
|
|
986
986
|
let m = a();
|
|
987
987
|
m && (n.value = !n.value, n.value ? m.type = "text" : m.type = "password", t("change", n.value));
|
|
988
988
|
};
|
|
@@ -991,17 +991,17 @@ const wt = /* @__PURE__ */ g(kt, [["render", Tt]]), xt = /* @__PURE__ */ k({
|
|
|
991
991
|
ref: r,
|
|
992
992
|
class: "t-toggle-password",
|
|
993
993
|
style: w(i.value),
|
|
994
|
-
onClick:
|
|
994
|
+
onClick: d
|
|
995
995
|
}, [
|
|
996
|
-
n.value ?
|
|
997
|
-
_[0] || (_[0] =
|
|
996
|
+
n.value ? h(m.$slots, "on", { key: 0 }, () => [
|
|
997
|
+
_[0] || (_[0] = k("i", { class: "ri-eye-line" }, null, -1))
|
|
998
998
|
], !0) : I("", !0),
|
|
999
|
-
n.value ? I("", !0) :
|
|
1000
|
-
_[1] || (_[1] =
|
|
999
|
+
n.value ? I("", !0) : h(m.$slots, "off", { key: 1 }, () => [
|
|
1000
|
+
_[1] || (_[1] = k("i", { class: "ri-eye-off-line" }, null, -1))
|
|
1001
1001
|
], !0)
|
|
1002
1002
|
], 4));
|
|
1003
1003
|
}
|
|
1004
|
-
}), It = /* @__PURE__ */ g(zt, [["__scopeId", "data-v-3268e9e3"]]), Bt = /* @__PURE__ */
|
|
1004
|
+
}), It = /* @__PURE__ */ g(zt, [["__scopeId", "data-v-3268e9e3"]]), Bt = /* @__PURE__ */ $({
|
|
1005
1005
|
__name: "t-avatar",
|
|
1006
1006
|
props: {
|
|
1007
1007
|
square: { type: Boolean, default: !1 },
|
|
@@ -1013,7 +1013,7 @@ const wt = /* @__PURE__ */ g(kt, [["render", Tt]]), xt = /* @__PURE__ */ k({
|
|
|
1013
1013
|
class: x(["t-avatar", { square: t.square }]),
|
|
1014
1014
|
style: w({ "--size": e.value })
|
|
1015
1015
|
}, [
|
|
1016
|
-
|
|
1016
|
+
h(t.$slots, "default", {}, void 0, !0)
|
|
1017
1017
|
], 6));
|
|
1018
1018
|
}
|
|
1019
1019
|
}), Ct = /* @__PURE__ */ g(Bt, [["__scopeId", "data-v-24384c2f"]]), Et = { class: "t-collapse-title" }, Vt = {
|
|
@@ -1022,7 +1022,7 @@ const wt = /* @__PURE__ */ g(kt, [["render", Tt]]), xt = /* @__PURE__ */ k({
|
|
|
1022
1022
|
}, Mt = {
|
|
1023
1023
|
key: 1,
|
|
1024
1024
|
class: "icon"
|
|
1025
|
-
}, Pt = { class: "t-collapse-content" }, At = /* @__PURE__ */
|
|
1025
|
+
}, Pt = { class: "t-collapse-content" }, At = /* @__PURE__ */ $({
|
|
1026
1026
|
__name: "t-collapse",
|
|
1027
1027
|
props: {
|
|
1028
1028
|
title: {}
|
|
@@ -1032,41 +1032,41 @@ const wt = /* @__PURE__ */ g(kt, [["render", Tt]]), xt = /* @__PURE__ */ k({
|
|
|
1032
1032
|
const e = o, t = s, n = v(!1), r = v(""), i = v(), a = () => {
|
|
1033
1033
|
n.value = !n.value, r.value = `calc(${i.value.offsetHeight}px + 2rem)`, t("change", n.value);
|
|
1034
1034
|
};
|
|
1035
|
-
return t("change", n.value), (
|
|
1035
|
+
return t("change", n.value), (d, m) => (c(), f("div", {
|
|
1036
1036
|
class: x(["t-collapse", { open: n.value }]),
|
|
1037
1037
|
style: w({ "--height": r.value })
|
|
1038
1038
|
}, [
|
|
1039
|
-
|
|
1039
|
+
k("div", {
|
|
1040
1040
|
class: "t-collapse-header",
|
|
1041
1041
|
onClick: a
|
|
1042
1042
|
}, [
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1043
|
+
h(d.$slots, "icon"),
|
|
1044
|
+
k("div", Et, [
|
|
1045
|
+
h(d.$slots, "title", {}, () => [
|
|
1046
1046
|
R(M(e.title), 1)
|
|
1047
1047
|
])
|
|
1048
1048
|
]),
|
|
1049
|
-
|
|
1049
|
+
h(d.$slots, "toggle", {}, () => [
|
|
1050
1050
|
n.value ? (c(), f("div", Vt, [...m[0] || (m[0] = [
|
|
1051
|
-
|
|
1051
|
+
k("i", { class: "ri-arrow-up-s-line" }, null, -1)
|
|
1052
1052
|
])])) : (c(), f("div", Mt, [...m[1] || (m[1] = [
|
|
1053
|
-
|
|
1053
|
+
k("i", { class: "ri-arrow-down-s-line" }, null, -1)
|
|
1054
1054
|
])]))
|
|
1055
1055
|
])
|
|
1056
1056
|
]),
|
|
1057
|
-
|
|
1058
|
-
|
|
1057
|
+
k("div", Pt, [
|
|
1058
|
+
k("div", {
|
|
1059
1059
|
ref_key: "content",
|
|
1060
1060
|
ref: i
|
|
1061
1061
|
}, [
|
|
1062
|
-
|
|
1063
|
-
|
|
1062
|
+
h(d.$slots, "content", {}, () => [
|
|
1063
|
+
h(d.$slots, "default")
|
|
1064
1064
|
])
|
|
1065
1065
|
], 512)
|
|
1066
1066
|
])
|
|
1067
1067
|
], 6));
|
|
1068
1068
|
}
|
|
1069
|
-
}), Rt = /* @__PURE__ */
|
|
1069
|
+
}), Rt = /* @__PURE__ */ $({
|
|
1070
1070
|
__name: "t-switch",
|
|
1071
1071
|
props: {
|
|
1072
1072
|
modelValue: { type: Boolean },
|
|
@@ -1091,10 +1091,10 @@ const wt = /* @__PURE__ */ g(kt, [["render", Tt]]), xt = /* @__PURE__ */ k({
|
|
|
1091
1091
|
style: w(r.value),
|
|
1092
1092
|
onClick: n
|
|
1093
1093
|
}, [...a[0] || (a[0] = [
|
|
1094
|
-
|
|
1094
|
+
k("div", { class: "t-switch-icon" }, null, -1)
|
|
1095
1095
|
])], 6));
|
|
1096
1096
|
}
|
|
1097
|
-
}), Dt = /* @__PURE__ */ g(Rt, [["__scopeId", "data-v-3616970e"]]), Ot = /* @__PURE__ */
|
|
1097
|
+
}), Dt = /* @__PURE__ */ g(Rt, [["__scopeId", "data-v-3616970e"]]), Ot = /* @__PURE__ */ $({
|
|
1098
1098
|
__name: "t-tab",
|
|
1099
1099
|
props: {
|
|
1100
1100
|
value: {}
|
|
@@ -1113,13 +1113,13 @@ const wt = /* @__PURE__ */ g(kt, [["render", Tt]]), xt = /* @__PURE__ */ k({
|
|
|
1113
1113
|
color: t.value && E(e).variant == "text" ? E(e).color : void 0
|
|
1114
1114
|
}, {
|
|
1115
1115
|
default: V(() => [
|
|
1116
|
-
|
|
1116
|
+
h(r.$slots, "default", {}, void 0, !0)
|
|
1117
1117
|
]),
|
|
1118
1118
|
_: 3
|
|
1119
1119
|
}, 8, ["size", "color"])
|
|
1120
1120
|
], 2));
|
|
1121
1121
|
}
|
|
1122
|
-
}), Nt = /* @__PURE__ */ g(Ot, [["__scopeId", "data-v-36c12a50"]]), qt = /* @__PURE__ */
|
|
1122
|
+
}), Nt = /* @__PURE__ */ g(Ot, [["__scopeId", "data-v-36c12a50"]]), qt = /* @__PURE__ */ $({
|
|
1123
1123
|
__name: "t-tabs",
|
|
1124
1124
|
props: {
|
|
1125
1125
|
placement: { default: "top-start" },
|
|
@@ -1132,20 +1132,20 @@ const wt = /* @__PURE__ */ g(kt, [["render", Tt]]), xt = /* @__PURE__ */ k({
|
|
|
1132
1132
|
emits: ["update:modelValue"],
|
|
1133
1133
|
setup(o, { emit: s }) {
|
|
1134
1134
|
const e = o, t = s, n = v("0px"), r = v(), i = z(() => {
|
|
1135
|
-
let
|
|
1136
|
-
return ["warning", "info", "danger", "primary", "secondary", "success"].includes(
|
|
1135
|
+
let d = e.color;
|
|
1136
|
+
return ["warning", "info", "danger", "primary", "secondary", "success"].includes(d) && (d = `var(--t-color-status-${d})`), d;
|
|
1137
1137
|
}), a = () => {
|
|
1138
1138
|
setTimeout(() => {
|
|
1139
1139
|
if (e.placement.startsWith("top-") || e.placement.startsWith("bottom-")) {
|
|
1140
|
-
let
|
|
1141
|
-
if (
|
|
1142
|
-
let m =
|
|
1140
|
+
let d = r.value.querySelector(".active");
|
|
1141
|
+
if (d) {
|
|
1142
|
+
let m = d.getBoundingClientRect().left - r.value.getBoundingClientRect().left + r.value.scrollLeft, _ = d.offsetWidth / 2;
|
|
1143
1143
|
n.value = m + _ - e.border / 2 + "px";
|
|
1144
1144
|
}
|
|
1145
1145
|
} else if (e.placement.startsWith("left-") || e.placement.startsWith("right-")) {
|
|
1146
|
-
let
|
|
1147
|
-
if (
|
|
1148
|
-
let m =
|
|
1146
|
+
let d = r.value.querySelector(".active");
|
|
1147
|
+
if (d) {
|
|
1148
|
+
let m = d.getBoundingClientRect().top - r.value.getBoundingClientRect().top + r.value.scrollTop, _ = d.offsetHeight / 2;
|
|
1149
1149
|
n.value = m + _ - e.border / 2 + "px";
|
|
1150
1150
|
}
|
|
1151
1151
|
}
|
|
@@ -1156,34 +1156,34 @@ const wt = /* @__PURE__ */ g(kt, [["render", Tt]]), xt = /* @__PURE__ */ k({
|
|
|
1156
1156
|
color: i.value,
|
|
1157
1157
|
size: e.size,
|
|
1158
1158
|
variant: e.variant,
|
|
1159
|
-
setActive: (
|
|
1160
|
-
t("update:modelValue",
|
|
1159
|
+
setActive: (d) => {
|
|
1160
|
+
t("update:modelValue", d), a();
|
|
1161
1161
|
}
|
|
1162
1162
|
}), K(() => {
|
|
1163
1163
|
a();
|
|
1164
|
-
}), (
|
|
1164
|
+
}), (d, m) => (c(), f("ul", {
|
|
1165
1165
|
ref_key: "container",
|
|
1166
1166
|
ref: r,
|
|
1167
|
-
class: x(["t-tabs", { [
|
|
1168
|
-
style: w({ "--color": i.value, "--transform": n.value, "--border":
|
|
1167
|
+
class: x(["t-tabs", { [d.placement]: !0, [d.variant]: !0 }]),
|
|
1168
|
+
style: w({ "--color": i.value, "--transform": n.value, "--border": d.border + "px" })
|
|
1169
1169
|
}, [
|
|
1170
|
-
|
|
1170
|
+
h(d.$slots, "default", {}, void 0, !0)
|
|
1171
1171
|
], 6));
|
|
1172
1172
|
}
|
|
1173
|
-
}), Lt = /* @__PURE__ */ g(qt, [["__scopeId", "data-v-65a2c74c"]]), Wt = /* @__PURE__ */
|
|
1173
|
+
}), Lt = /* @__PURE__ */ g(qt, [["__scopeId", "data-v-65a2c74c"]]), Wt = /* @__PURE__ */ $({
|
|
1174
1174
|
__name: "t-loading-app",
|
|
1175
1175
|
setup(o) {
|
|
1176
1176
|
return (s, e) => (c(), B(re, null, {
|
|
1177
1177
|
default: V(() => [
|
|
1178
|
-
W(
|
|
1178
|
+
W(X, { type: "spinner" })
|
|
1179
1179
|
]),
|
|
1180
1180
|
_: 1
|
|
1181
1181
|
}));
|
|
1182
1182
|
}
|
|
1183
|
-
}),
|
|
1183
|
+
}), Ht = /* @__PURE__ */ g(Wt, [["__scopeId", "data-v-1436aa9f"]]), Ut = { key: 0 }, Xt = {
|
|
1184
1184
|
key: 0,
|
|
1185
1185
|
class: "t-checkbox-label"
|
|
1186
|
-
}, jt = /* @__PURE__ */
|
|
1186
|
+
}, jt = /* @__PURE__ */ $({
|
|
1187
1187
|
__name: "t-checkbox",
|
|
1188
1188
|
props: {
|
|
1189
1189
|
label: { default: "" },
|
|
@@ -1211,23 +1211,23 @@ const wt = /* @__PURE__ */ g(kt, [["render", Tt]]), xt = /* @__PURE__ */ k({
|
|
|
1211
1211
|
e.modelValue.includes(e.value) ? a.splice(a.indexOf(e.value), 1) : a.push(e.value), t("update:modelValue", a);
|
|
1212
1212
|
} else e.value === void 0 ? t("update:modelValue", !e.modelValue) : t("update:modelValue", e.value);
|
|
1213
1213
|
};
|
|
1214
|
-
return (a,
|
|
1214
|
+
return (a, d) => (c(), f("div", {
|
|
1215
1215
|
class: x(["t-checkbox", { active: r.value }]),
|
|
1216
1216
|
style: w(n.value),
|
|
1217
1217
|
onClick: i
|
|
1218
1218
|
}, [
|
|
1219
|
-
|
|
1219
|
+
k("div", {
|
|
1220
1220
|
class: x(`t-checkbox-${a.type}`)
|
|
1221
1221
|
}, [
|
|
1222
|
-
a.type == "radio" ? (c(), f("div",
|
|
1223
|
-
a.type == "check" ?
|
|
1224
|
-
|
|
1222
|
+
a.type == "radio" ? (c(), f("div", Ut)) : I("", !0),
|
|
1223
|
+
a.type == "check" ? h(a.$slots, "icon", { key: 1 }, () => [
|
|
1224
|
+
d[0] || (d[0] = k("i", { class: "ri-check-line" }, null, -1))
|
|
1225
1225
|
], !0) : I("", !0)
|
|
1226
1226
|
], 2),
|
|
1227
|
-
a.label ? (c(), f("span",
|
|
1227
|
+
a.label ? (c(), f("span", Xt, M(e.label), 1)) : I("", !0)
|
|
1228
1228
|
], 6));
|
|
1229
1229
|
}
|
|
1230
|
-
}), Ft = /* @__PURE__ */ g(jt, [["__scopeId", "data-v-d558d0b0"]]), Gt = /* @__PURE__ */
|
|
1230
|
+
}), Ft = /* @__PURE__ */ g(jt, [["__scopeId", "data-v-d558d0b0"]]), Gt = /* @__PURE__ */ $({
|
|
1231
1231
|
__name: "t-keyboard",
|
|
1232
1232
|
setup(o) {
|
|
1233
1233
|
const { height: s } = ne();
|
|
@@ -1238,13 +1238,13 @@ const wt = /* @__PURE__ */ g(kt, [["render", Tt]]), xt = /* @__PURE__ */ k({
|
|
|
1238
1238
|
}
|
|
1239
1239
|
}), Kt = /* @__PURE__ */ g(Gt, [["__scopeId", "data-v-5d3fa1da"]]), so = () => ({
|
|
1240
1240
|
install: (o) => {
|
|
1241
|
-
ve(), o.component("t-app", he), o.component("t-screen", ae), o.component("t-swipe-screen",
|
|
1241
|
+
ve(), o.component("t-app", he), o.component("t-screen", ae), o.component("t-swipe-screen", Qe), o.component("t-cable", qe), o.component("t-toolbar", Ye), o.component("t-content", re), o.component("t-card", Le), o.component("t-refresher", je), o.component("t-button", j), o.component("t-back-button", tt), o.component("t-present", D), o.component("t-text", F), o.component("t-sheet", rt), o.component("t-pull-signal", le), o.component("t-input", ut), o.component("t-textarea", ft), o.component("t-rich-text", _t), o.component("t-grid", bt), o.component("t-grid-item", wt), o.component("t-divider", St), o.component("t-toggle-password", It), o.component("t-loading-icon", X), o.component("t-alert", oe), o.component("t-avatar", Ct), o.component("t-collapse", At), o.component("t-toast", se), o.component("t-switch", Dt), o.component("t-tab", Nt), o.component("t-tabs", Lt), o.component("t-loading-app", Ht), o.component("t-checkbox", Ft), o.component("t-keyboard", Kt);
|
|
1242
1242
|
}
|
|
1243
1243
|
});
|
|
1244
1244
|
export {
|
|
1245
1245
|
me as blurCurrentActive,
|
|
1246
1246
|
eo as createAction,
|
|
1247
|
-
|
|
1247
|
+
Yt as createAlert,
|
|
1248
1248
|
to as createLoading,
|
|
1249
1249
|
oo as createToast,
|
|
1250
1250
|
so as createToife,
|