@toife/vue 1.1.22 → 1.1.24
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 +180 -180
- package/dist/index.umd.js +1 -1
- package/package.json +2 -2
package/dist/index.es.js
CHANGED
|
@@ -10,8 +10,8 @@ const O = (t) => t && (t.tagName == "INPUT" || t.tagName == "TEXTAREA" || t.isCo
|
|
|
10
10
|
});
|
|
11
11
|
}, g = (t, n) => {
|
|
12
12
|
const o = t.__vccOpts || t;
|
|
13
|
-
for (const [e,
|
|
14
|
-
o[e] =
|
|
13
|
+
for (const [e, s] of n)
|
|
14
|
+
o[e] = s;
|
|
15
15
|
return o;
|
|
16
16
|
}, fe = {}, me = { class: "t-app" };
|
|
17
17
|
function ve(t, n) {
|
|
@@ -29,45 +29,45 @@ const _e = /* @__PURE__ */ g(fe, [["render", ve]]), ye = /* @__PURE__ */ T({
|
|
|
29
29
|
},
|
|
30
30
|
emits: ["dismiss"],
|
|
31
31
|
setup(t, { expose: n, emit: o }) {
|
|
32
|
-
const e = y(0),
|
|
32
|
+
const e = y(0), s = y(!1), a = y(), l = y(), i = t, u = o, d = S(() => s.value || i.keepalive), v = 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
|
-
}), _ = (
|
|
38
|
-
i.backdrop ?
|
|
39
|
-
},
|
|
37
|
+
}), _ = (f) => {
|
|
38
|
+
i.backdrop ? f?.backdropOpacity && (v["--t-present-backdrop-opacity"] = f.backdropOpacity) : v["--t-present-backdrop-opacity"] = "0", f?.transition && (v["--t-present-transition"] = f.transition, v["--t-present-transition"] = f.transition), f?.contentTransform && (v["--t-present-content-transform"] = f.contentTransform), f?.contentOpacity && (v["--t-present-content-opacity"] = f.contentOpacity);
|
|
39
|
+
}, r = () => {
|
|
40
40
|
_({
|
|
41
41
|
contentTransform: "0px",
|
|
42
42
|
transition: "0.2s",
|
|
43
43
|
backdropOpacity: "0.4",
|
|
44
44
|
contentOpacity: "1"
|
|
45
45
|
});
|
|
46
|
-
},
|
|
47
|
-
let
|
|
48
|
-
i.placement == "bottom" || i.placement == "right" ?
|
|
49
|
-
contentTransform:
|
|
46
|
+
}, p = () => {
|
|
47
|
+
let f = "0px", x = "1";
|
|
48
|
+
i.placement == "bottom" || i.placement == "right" ? f = "100%" : i.placement == "top" || i.placement == "left" ? f = "-100%" : i.placement == "center" && (f = "0px", x = "0"), _({
|
|
49
|
+
contentTransform: f,
|
|
50
50
|
transition: "0.2s",
|
|
51
51
|
contentOpacity: x,
|
|
52
52
|
backdropOpacity: "0"
|
|
53
53
|
});
|
|
54
54
|
};
|
|
55
55
|
R(() => i.visible, () => {
|
|
56
|
-
i.visible ? (
|
|
57
|
-
|
|
58
|
-
}, 50)) : (
|
|
59
|
-
|
|
56
|
+
i.visible ? (s.value = !0, e.value = Ee.getNewIndex(), setTimeout(() => {
|
|
57
|
+
r();
|
|
58
|
+
}, 50)) : (p(), setTimeout(() => {
|
|
59
|
+
s.value = !1;
|
|
60
60
|
}, 200));
|
|
61
61
|
}), n({
|
|
62
62
|
render: _,
|
|
63
|
-
open:
|
|
64
|
-
close:
|
|
63
|
+
open: r,
|
|
64
|
+
close: p
|
|
65
65
|
});
|
|
66
66
|
let h;
|
|
67
|
-
return R(() => a.value, (
|
|
68
|
-
|
|
67
|
+
return R(() => a.value, (f) => {
|
|
68
|
+
f && (h = V(a.value, {
|
|
69
69
|
beforeEvent(x) {
|
|
70
|
-
return x.stopPropagation(), O(x.target) || (x.preventDefault(), q()), x.type == "
|
|
70
|
+
return x.stopPropagation(), O(x.target) || (x.preventDefault(), q()), x.type == "pointerdown";
|
|
71
71
|
},
|
|
72
72
|
up() {
|
|
73
73
|
u("dismiss", "backdrop");
|
|
@@ -75,17 +75,17 @@ const _e = /* @__PURE__ */ g(fe, [["render", ve]]), ye = /* @__PURE__ */ T({
|
|
|
75
75
|
}));
|
|
76
76
|
}), N(() => {
|
|
77
77
|
h && h.destroy();
|
|
78
|
-
}),
|
|
78
|
+
}), p(), (f, x) => (c(), m(A, null, [
|
|
79
79
|
d.value ? W((c(), m("div", {
|
|
80
80
|
key: 0,
|
|
81
|
-
class: I(["t-present", { [
|
|
81
|
+
class: I(["t-present", { [f.placement]: !0 }]),
|
|
82
82
|
ref_key: "present",
|
|
83
83
|
ref: l,
|
|
84
84
|
style: w({ ...v, zIndex: e.value })
|
|
85
85
|
}, [
|
|
86
|
-
b(
|
|
86
|
+
b(f.$slots, "default", {}, void 0, !0)
|
|
87
87
|
], 6)), [
|
|
88
|
-
[Y,
|
|
88
|
+
[Y, s.value]
|
|
89
89
|
]) : z("", !0),
|
|
90
90
|
d.value ? W((c(), m("div", {
|
|
91
91
|
key: 1,
|
|
@@ -94,11 +94,11 @@ const _e = /* @__PURE__ */ g(fe, [["render", ve]]), ye = /* @__PURE__ */ T({
|
|
|
94
94
|
ref: a,
|
|
95
95
|
style: w({ ...v, zIndex: e.value - 1 })
|
|
96
96
|
}, null, 4)), [
|
|
97
|
-
[Y,
|
|
97
|
+
[Y, s.value]
|
|
98
98
|
]) : z("", !0)
|
|
99
99
|
], 64));
|
|
100
100
|
}
|
|
101
|
-
}), L = /* @__PURE__ */ g(ye, [["__scopeId", "data-v-
|
|
101
|
+
}), L = /* @__PURE__ */ g(ye, [["__scopeId", "data-v-84c0b568"]]), ge = /* @__PURE__ */ T({
|
|
102
102
|
__name: "t-loading-icon",
|
|
103
103
|
props: {
|
|
104
104
|
size: {
|
|
@@ -178,7 +178,7 @@ const _e = /* @__PURE__ */ g(fe, [["render", ve]]), ye = /* @__PURE__ */ T({
|
|
|
178
178
|
"--background": "transparent"
|
|
179
179
|
}), e;
|
|
180
180
|
});
|
|
181
|
-
return (e,
|
|
181
|
+
return (e, s) => (c(), m("button", {
|
|
182
182
|
class: I(["t-button", { "active-background": n.activeBackground, rounded: n.rounded, block: n.block, ["size-" + n.size]: !0 }]),
|
|
183
183
|
style: w(o.value)
|
|
184
184
|
}, [
|
|
@@ -208,32 +208,32 @@ const _e = /* @__PURE__ */ g(fe, [["render", ve]]), ye = /* @__PURE__ */ T({
|
|
|
208
208
|
},
|
|
209
209
|
emits: ["dismiss"],
|
|
210
210
|
setup(t, { expose: n, emit: o }) {
|
|
211
|
-
const e = t,
|
|
211
|
+
const e = t, s = y(!1), a = o, l = y();
|
|
212
212
|
let i;
|
|
213
213
|
const u = y(!1), d = () => {
|
|
214
|
-
|
|
215
|
-
}, v = (
|
|
216
|
-
|
|
217
|
-
}, _ = (
|
|
218
|
-
e.dismiss && e.dismiss.includes(
|
|
214
|
+
s.value = !0;
|
|
215
|
+
}, v = (r) => {
|
|
216
|
+
s.value = !1, r.handler && r.handler(), a("dismiss", "choose", r?.data);
|
|
217
|
+
}, _ = (r) => {
|
|
218
|
+
e.dismiss && e.dismiss.includes(r) ? (s.value = !1, a("dismiss", r)) : r == "backdrop" && (u.value = !0, setTimeout(() => {
|
|
219
219
|
u.value = !1;
|
|
220
220
|
}, 300));
|
|
221
221
|
};
|
|
222
222
|
return n({
|
|
223
223
|
open: d
|
|
224
|
-
}), R(() => l.value, (
|
|
225
|
-
|
|
226
|
-
beforeEvent(
|
|
227
|
-
return
|
|
224
|
+
}), R(() => l.value, (r) => {
|
|
225
|
+
r && (i = V(l.value, {
|
|
226
|
+
beforeEvent(p) {
|
|
227
|
+
return p.stopPropagation(), O(p.target) || (p.preventDefault(), q()), !1;
|
|
228
228
|
}
|
|
229
229
|
}));
|
|
230
230
|
}), N(() => {
|
|
231
231
|
i && i.destroy();
|
|
232
|
-
}), (
|
|
232
|
+
}), (r, p) => (c(), E(L, {
|
|
233
233
|
placement: "center",
|
|
234
234
|
backdrop: !0,
|
|
235
235
|
keepalive: !1,
|
|
236
|
-
visible:
|
|
236
|
+
visible: s.value,
|
|
237
237
|
onDismiss: _
|
|
238
238
|
}, {
|
|
239
239
|
default: B(() => [
|
|
@@ -242,18 +242,18 @@ const _e = /* @__PURE__ */ g(fe, [["render", ve]]), ye = /* @__PURE__ */ T({
|
|
|
242
242
|
ref_key: "container",
|
|
243
243
|
ref: l
|
|
244
244
|
}, [
|
|
245
|
-
b(
|
|
245
|
+
b(r.$slots, "header", {}, () => [
|
|
246
246
|
e.title ? (c(), m("div", ke, P(e.title), 1)) : z("", !0)
|
|
247
247
|
], !0),
|
|
248
|
-
b(
|
|
248
|
+
b(r.$slots, "content", {}, () => [
|
|
249
249
|
k("div", $e, P(e.message), 1)
|
|
250
250
|
], !0),
|
|
251
|
-
b(
|
|
251
|
+
b(r.$slots, "footer", {}, () => [
|
|
252
252
|
k("div", Te, [
|
|
253
253
|
(c(!0), m(A, null, H(e.actions, (h) => (c(), E(F, {
|
|
254
254
|
color: h.color,
|
|
255
255
|
variant: h.variant,
|
|
256
|
-
onClick: (
|
|
256
|
+
onClick: (f) => v(h)
|
|
257
257
|
}, {
|
|
258
258
|
default: B(() => [
|
|
259
259
|
X(P(h.text), 1)
|
|
@@ -272,13 +272,13 @@ const _e = /* @__PURE__ */ g(fe, [["render", ve]]), ye = /* @__PURE__ */ T({
|
|
|
272
272
|
return new Promise((n) => {
|
|
273
273
|
let o = document.body.querySelector(".t-app");
|
|
274
274
|
if (!o) return;
|
|
275
|
-
const e = document.createElement("div"),
|
|
275
|
+
const e = document.createElement("div"), s = y();
|
|
276
276
|
o.appendChild(e);
|
|
277
277
|
const a = U({
|
|
278
278
|
render() {
|
|
279
279
|
return j(ne, {
|
|
280
280
|
...t,
|
|
281
|
-
ref:
|
|
281
|
+
ref: s,
|
|
282
282
|
onDismiss: (l, i) => {
|
|
283
283
|
setTimeout(() => {
|
|
284
284
|
a.unmount(), e.remove();
|
|
@@ -288,7 +288,7 @@ const _e = /* @__PURE__ */ g(fe, [["render", ve]]), ye = /* @__PURE__ */ T({
|
|
|
288
288
|
}
|
|
289
289
|
});
|
|
290
290
|
a.mount(e), setTimeout(() => {
|
|
291
|
-
|
|
291
|
+
s.value?.open?.();
|
|
292
292
|
}, 50);
|
|
293
293
|
});
|
|
294
294
|
}
|
|
@@ -300,32 +300,32 @@ const _e = /* @__PURE__ */ g(fe, [["render", ve]]), ye = /* @__PURE__ */ T({
|
|
|
300
300
|
},
|
|
301
301
|
emits: ["dismiss"],
|
|
302
302
|
setup(t, { expose: n, emit: o }) {
|
|
303
|
-
const e = t,
|
|
303
|
+
const e = t, s = y(!1), a = o, l = y();
|
|
304
304
|
let i;
|
|
305
305
|
const u = y(!1), d = () => {
|
|
306
|
-
|
|
307
|
-
}, v = (
|
|
308
|
-
|
|
309
|
-
}, _ = (
|
|
310
|
-
e.dismiss && e.dismiss.includes(
|
|
306
|
+
s.value = !0;
|
|
307
|
+
}, v = (r) => {
|
|
308
|
+
s.value = !1, r.handler && r.handler(), a("dismiss", "choose", r?.data);
|
|
309
|
+
}, _ = (r) => {
|
|
310
|
+
e.dismiss && e.dismiss.includes(r) ? (s.value = !1, a("dismiss", r)) : r == "backdrop" && (u.value = !0, setTimeout(() => {
|
|
311
311
|
u.value = !1;
|
|
312
312
|
}, 300));
|
|
313
313
|
};
|
|
314
314
|
return n({
|
|
315
315
|
open: d
|
|
316
|
-
}), R(() => l.value, (
|
|
317
|
-
|
|
318
|
-
beforeEvent(
|
|
319
|
-
return
|
|
316
|
+
}), R(() => l.value, (r) => {
|
|
317
|
+
r && (i = V(l.value, {
|
|
318
|
+
beforeEvent(p) {
|
|
319
|
+
return p.stopPropagation(), O(p.target) || (p.preventDefault(), q()), !1;
|
|
320
320
|
}
|
|
321
321
|
}));
|
|
322
322
|
}), N(() => {
|
|
323
323
|
i && i.destroy();
|
|
324
|
-
}), (
|
|
324
|
+
}), (r, p) => (c(), E(L, {
|
|
325
325
|
placement: "bottom",
|
|
326
326
|
backdrop: !0,
|
|
327
327
|
keepalive: !1,
|
|
328
|
-
visible:
|
|
328
|
+
visible: s.value,
|
|
329
329
|
onDismiss: _
|
|
330
330
|
}, {
|
|
331
331
|
default: B(() => [
|
|
@@ -335,15 +335,15 @@ const _e = /* @__PURE__ */ g(fe, [["render", ve]]), ye = /* @__PURE__ */ T({
|
|
|
335
335
|
ref: l
|
|
336
336
|
}, [
|
|
337
337
|
(c(!0), m(A, null, H(e.actions, (h) => (c(), m("div", null, [
|
|
338
|
-
(c(!0), m(A, null, H(h, (
|
|
339
|
-
color:
|
|
340
|
-
size:
|
|
341
|
-
variant:
|
|
342
|
-
onClick: (x) => v(
|
|
338
|
+
(c(!0), m(A, null, H(h, (f) => (c(), E(F, {
|
|
339
|
+
color: f.color,
|
|
340
|
+
size: f.size,
|
|
341
|
+
variant: f.variant,
|
|
342
|
+
onClick: (x) => v(f),
|
|
343
343
|
block: ""
|
|
344
344
|
}, {
|
|
345
345
|
default: B(() => [
|
|
346
|
-
X(P(
|
|
346
|
+
X(P(f.text), 1)
|
|
347
347
|
]),
|
|
348
348
|
_: 2
|
|
349
349
|
}, 1032, ["color", "size", "variant", "onClick"]))), 256))
|
|
@@ -358,13 +358,13 @@ const _e = /* @__PURE__ */ g(fe, [["render", ve]]), ye = /* @__PURE__ */ T({
|
|
|
358
358
|
return new Promise((n) => {
|
|
359
359
|
let o = document.body.querySelector(".t-app");
|
|
360
360
|
if (!o) return;
|
|
361
|
-
const e = document.createElement("div"),
|
|
361
|
+
const e = document.createElement("div"), s = y();
|
|
362
362
|
o.appendChild(e);
|
|
363
363
|
const a = U({
|
|
364
364
|
render() {
|
|
365
365
|
return j(Ie, {
|
|
366
366
|
...t,
|
|
367
|
-
ref:
|
|
367
|
+
ref: s,
|
|
368
368
|
onDismiss: (l, i) => {
|
|
369
369
|
setTimeout(() => {
|
|
370
370
|
a.unmount(), e.remove();
|
|
@@ -374,7 +374,7 @@ const _e = /* @__PURE__ */ g(fe, [["render", ve]]), ye = /* @__PURE__ */ T({
|
|
|
374
374
|
}
|
|
375
375
|
});
|
|
376
376
|
a.mount(e), setTimeout(() => {
|
|
377
|
-
|
|
377
|
+
s.value?.open?.();
|
|
378
378
|
}, 50);
|
|
379
379
|
});
|
|
380
380
|
}
|
|
@@ -385,14 +385,14 @@ const _e = /* @__PURE__ */ g(fe, [["render", ve]]), ye = /* @__PURE__ */ T({
|
|
|
385
385
|
},
|
|
386
386
|
emits: ["dismiss"],
|
|
387
387
|
setup(t, { expose: n, emit: o }) {
|
|
388
|
-
const e = t,
|
|
388
|
+
const e = t, s = y(!1), a = y();
|
|
389
389
|
let l;
|
|
390
390
|
return n({
|
|
391
391
|
open: () => {
|
|
392
|
-
|
|
392
|
+
s.value = !0;
|
|
393
393
|
},
|
|
394
394
|
close: () => {
|
|
395
|
-
|
|
395
|
+
s.value = !1;
|
|
396
396
|
}
|
|
397
397
|
}), R(() => a.value, (d) => {
|
|
398
398
|
d && (l = V(a.value, {
|
|
@@ -406,7 +406,7 @@ const _e = /* @__PURE__ */ g(fe, [["render", ve]]), ye = /* @__PURE__ */ T({
|
|
|
406
406
|
placement: "center",
|
|
407
407
|
backdrop: !0,
|
|
408
408
|
keepalive: !1,
|
|
409
|
-
visible:
|
|
409
|
+
visible: s.value
|
|
410
410
|
}, {
|
|
411
411
|
default: B(() => [
|
|
412
412
|
k("div", {
|
|
@@ -426,18 +426,18 @@ const _e = /* @__PURE__ */ g(fe, [["render", ve]]), ye = /* @__PURE__ */ T({
|
|
|
426
426
|
}
|
|
427
427
|
}), ze = /* @__PURE__ */ g(Se, [["__scopeId", "data-v-d048a41d"]]), Ht = (t = {}) => {
|
|
428
428
|
const n = y(), o = document.body.querySelector(".t-app");
|
|
429
|
-
let e = null,
|
|
429
|
+
let e = null, s = null;
|
|
430
430
|
return {
|
|
431
431
|
open() {
|
|
432
432
|
return new Promise((a) => {
|
|
433
|
-
o && (
|
|
433
|
+
o && (s = document.createElement("div"), o.appendChild(s), e = U({
|
|
434
434
|
render() {
|
|
435
435
|
return j(ze, {
|
|
436
436
|
...t,
|
|
437
437
|
ref: n
|
|
438
438
|
});
|
|
439
439
|
}
|
|
440
|
-
}), e.mount(
|
|
440
|
+
}), e.mount(s), setTimeout(() => {
|
|
441
441
|
n.value?.open?.(), a(!0);
|
|
442
442
|
}, 50));
|
|
443
443
|
});
|
|
@@ -445,7 +445,7 @@ const _e = /* @__PURE__ */ g(fe, [["render", ve]]), ye = /* @__PURE__ */ T({
|
|
|
445
445
|
close() {
|
|
446
446
|
return new Promise((a) => {
|
|
447
447
|
n.value?.close?.(), setTimeout(() => {
|
|
448
|
-
e?.unmount?.(),
|
|
448
|
+
e?.unmount?.(), s?.remove?.(), a(!0);
|
|
449
449
|
}, 300);
|
|
450
450
|
});
|
|
451
451
|
}
|
|
@@ -480,7 +480,7 @@ const _e = /* @__PURE__ */ g(fe, [["render", ve]]), ye = /* @__PURE__ */ T({
|
|
|
480
480
|
},
|
|
481
481
|
emits: ["dismiss"],
|
|
482
482
|
setup(t, { expose: n, emit: o }) {
|
|
483
|
-
const e = t,
|
|
483
|
+
const e = t, s = o, a = y(!1), l = y(!1), i = y(!1), u = () => {
|
|
484
484
|
l.value = !0, i.value = !1, setTimeout(() => {
|
|
485
485
|
a.value = !0;
|
|
486
486
|
}, 10), setTimeout(() => {
|
|
@@ -488,7 +488,7 @@ const _e = /* @__PURE__ */ g(fe, [["render", ve]]), ye = /* @__PURE__ */ T({
|
|
|
488
488
|
}, e.duration + 10);
|
|
489
489
|
}, d = () => {
|
|
490
490
|
i.value = !0, setTimeout(() => {
|
|
491
|
-
l.value = !1, a.value = !1,
|
|
491
|
+
l.value = !1, a.value = !1, s("dismiss");
|
|
492
492
|
}, 300);
|
|
493
493
|
}, v = S(() => {
|
|
494
494
|
let _;
|
|
@@ -532,32 +532,32 @@ const _e = /* @__PURE__ */ g(fe, [["render", ve]]), ye = /* @__PURE__ */ T({
|
|
|
532
532
|
});
|
|
533
533
|
return n({
|
|
534
534
|
open: u
|
|
535
|
-
}), (_,
|
|
535
|
+
}), (_, r) => l.value ? (c(), m("div", {
|
|
536
536
|
key: 0,
|
|
537
537
|
class: I(["t-toast", { [e.placement]: !0, open: a.value, closing: i.value }]),
|
|
538
538
|
style: w({ "--space": e.space, ...v.value })
|
|
539
539
|
}, P(e.message), 7)) : z("", !0);
|
|
540
540
|
}
|
|
541
|
-
}),
|
|
541
|
+
}), se = /* @__PURE__ */ g(Pe, [["__scopeId", "data-v-98e8be37"]]), Ut = (t = {}) => ({
|
|
542
542
|
open() {
|
|
543
543
|
let n = document.body.querySelector(".t-app");
|
|
544
544
|
if (!n) return;
|
|
545
545
|
const o = document.createElement("div"), e = y();
|
|
546
546
|
n.appendChild(o);
|
|
547
|
-
const
|
|
547
|
+
const s = U({
|
|
548
548
|
render() {
|
|
549
|
-
return j(
|
|
549
|
+
return j(se, {
|
|
550
550
|
...t,
|
|
551
551
|
ref: e,
|
|
552
552
|
onDismiss: () => {
|
|
553
553
|
setTimeout(() => {
|
|
554
|
-
|
|
554
|
+
s.unmount(), o.remove();
|
|
555
555
|
}, 300);
|
|
556
556
|
}
|
|
557
557
|
});
|
|
558
558
|
}
|
|
559
559
|
});
|
|
560
|
-
|
|
560
|
+
s.mount(o), setTimeout(() => {
|
|
561
561
|
e.value?.open?.();
|
|
562
562
|
}, 50);
|
|
563
563
|
}
|
|
@@ -575,7 +575,7 @@ const Ve = /* @__PURE__ */ T({
|
|
|
575
575
|
},
|
|
576
576
|
setup(t) {
|
|
577
577
|
const n = t, { height: o } = Re();
|
|
578
|
-
return (e,
|
|
578
|
+
return (e, s) => (c(), m("div", {
|
|
579
579
|
class: I(["t-cable", { keyboard: n.keyboard && D(o) > 0, [n.placement]: !0 }]),
|
|
580
580
|
style: w({ "--t-keyboard-height": D(o) + "px", "--t-keyboard-transition": D(o) > 0 ? "0.3s" : "0.1s" })
|
|
581
581
|
}, [
|
|
@@ -598,7 +598,7 @@ const Ve = /* @__PURE__ */ T({
|
|
|
598
598
|
"--background": "var(--t-color-surface)"
|
|
599
599
|
}, e;
|
|
600
600
|
});
|
|
601
|
-
return (e,
|
|
601
|
+
return (e, s) => (c(), m("div", {
|
|
602
602
|
class: "t-card",
|
|
603
603
|
style: w(o.value)
|
|
604
604
|
}, [
|
|
@@ -615,14 +615,14 @@ const Le = /* @__PURE__ */ g(Oe, [["render", Xe], ["__scopeId", "data-v-9a833657
|
|
|
615
615
|
__name: "t-refresher",
|
|
616
616
|
emits: ["refresh"],
|
|
617
617
|
setup(t, { emit: n }) {
|
|
618
|
-
const o = n, e = y(0),
|
|
618
|
+
const o = n, e = y(0), s = y(!1), a = y();
|
|
619
619
|
let l, i = !1;
|
|
620
620
|
const u = () => {
|
|
621
|
-
|
|
621
|
+
s.value = !1, e.value = 0, l && l.cancel(), setTimeout(() => {
|
|
622
622
|
i = !1;
|
|
623
623
|
}, 2e3);
|
|
624
624
|
}, d = () => {
|
|
625
|
-
i = !0,
|
|
625
|
+
i = !0, s.value = !0, e.value = ee, o("refresh", u);
|
|
626
626
|
};
|
|
627
627
|
return R(() => a.value, () => {
|
|
628
628
|
l && l.destroy();
|
|
@@ -631,14 +631,14 @@ const Le = /* @__PURE__ */ g(Oe, [["render", Xe], ["__scopeId", "data-v-9a833657
|
|
|
631
631
|
options: {
|
|
632
632
|
minDist: 60
|
|
633
633
|
},
|
|
634
|
-
move({ dy: _, e:
|
|
635
|
-
|
|
634
|
+
move({ dy: _, e: r }) {
|
|
635
|
+
s.value || i || _ < 0 || (_ >= 120 ? d() : e.value = _);
|
|
636
636
|
},
|
|
637
|
-
up({ dy: _, e:
|
|
638
|
-
|
|
637
|
+
up({ dy: _, e: r }) {
|
|
638
|
+
s.value || i || (_ > ee ? d() : e.value = 0);
|
|
639
639
|
},
|
|
640
640
|
cancel() {
|
|
641
|
-
|
|
641
|
+
s.value = !1, e.value = 0;
|
|
642
642
|
}
|
|
643
643
|
}, {
|
|
644
644
|
passive: !1
|
|
@@ -652,7 +652,7 @@ const Le = /* @__PURE__ */ g(Oe, [["render", Xe], ["__scopeId", "data-v-9a833657
|
|
|
652
652
|
style: w({ height: `${e.value}px` })
|
|
653
653
|
}, [
|
|
654
654
|
k("img", {
|
|
655
|
-
class: I({ spiner:
|
|
655
|
+
class: I({ spiner: s.value }),
|
|
656
656
|
src: "https://static.toikit.com/toikit/home_2.png?v=3",
|
|
657
657
|
alt: "Loading...",
|
|
658
658
|
style: { width: "22px", height: "22px" }
|
|
@@ -661,29 +661,29 @@ const Le = /* @__PURE__ */ g(Oe, [["render", Xe], ["__scopeId", "data-v-9a833657
|
|
|
661
661
|
[Y, e.value > 0]
|
|
662
662
|
]);
|
|
663
663
|
}
|
|
664
|
-
}), Ye = /* @__PURE__ */ g(We, [["__scopeId", "data-v-
|
|
664
|
+
}), Ye = /* @__PURE__ */ g(We, [["__scopeId", "data-v-696c775e"]]), He = {}, Ue = { class: "t-screen" };
|
|
665
665
|
function je(t, n) {
|
|
666
666
|
return c(), m("div", Ue, [
|
|
667
667
|
b(t.$slots, "default", {}, void 0, !0)
|
|
668
668
|
]);
|
|
669
669
|
}
|
|
670
|
-
const
|
|
670
|
+
const re = /* @__PURE__ */ g(He, [["render", je], ["__scopeId", "data-v-66ea8649"]]), Fe = /* @__PURE__ */ T({
|
|
671
671
|
__name: "t-swipe-screen",
|
|
672
672
|
emits: ["change"],
|
|
673
673
|
setup(t, { emit: n }) {
|
|
674
674
|
let o = {};
|
|
675
|
-
const e = oe(),
|
|
676
|
-
for (let
|
|
677
|
-
o[
|
|
678
|
-
const u = (
|
|
679
|
-
|
|
680
|
-
name:
|
|
675
|
+
const e = oe(), s = de(), a = e.getRoutes(), l = y(!1), i = n;
|
|
676
|
+
for (let r of a)
|
|
677
|
+
o[r.name] = r.components;
|
|
678
|
+
const u = (r) => {
|
|
679
|
+
r && $.addScreen({
|
|
680
|
+
name: r,
|
|
681
681
|
target: null,
|
|
682
|
-
component: ce(o[
|
|
682
|
+
component: ce(o[r] || null)
|
|
683
683
|
});
|
|
684
|
-
}, d = (
|
|
685
|
-
!
|
|
686
|
-
|
|
684
|
+
}, d = (r, p) => {
|
|
685
|
+
!p || $.screens[r].target || ($.screens[r].target = p.$el, r > 0 && (l.value = !0, p.$el.style.transform = "translateX(100vw)", p.$el.transitionOrigin = "center", document.documentElement.style.setProperty("--t-swipe-backdrop-opacity", "0"), setTimeout(() => {
|
|
686
|
+
p.$el.style.transition = "transform 0.35s ease", p.$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"), $.screens.length > 1 && ($.lastScreen.value.target.style.transitionOrigin = "left center", $.lastScreen.value.target.style.transition = "transform 0.35s ease", $.lastScreen.value.target.style.transform = "translateX(-30vw) scale(0.5) perspective(100vw) rotateY(30deg)"), setTimeout(() => {
|
|
687
687
|
i("change"), l.value = !1;
|
|
688
688
|
}, 400);
|
|
689
689
|
}, 100)));
|
|
@@ -692,49 +692,49 @@ const se = /* @__PURE__ */ g(He, [["render", je], ["__scopeId", "data-v-66ea8649
|
|
|
692
692
|
$.removeScreen(), i("change"), l.value = !1;
|
|
693
693
|
}, 400);
|
|
694
694
|
};
|
|
695
|
-
u(
|
|
696
|
-
|
|
695
|
+
u(s.name), R(() => s.name, (r, p) => {
|
|
696
|
+
r != $.currentScreen.value.name && ($.lastScreen.value?.name == r ? v() : u(r));
|
|
697
697
|
});
|
|
698
698
|
const _ = () => {
|
|
699
699
|
l.value = !0;
|
|
700
|
-
const
|
|
701
|
-
|
|
700
|
+
const r = $.currentScreen.value.target, p = $.lastScreen.value.target;
|
|
701
|
+
r.style.transition = "transform 0.35s ease", r.style.transform = "translateX(0px)", p.style.transition = "transform 0.35s ease", p.style.transform = "translateX(-30vw) scale(0.5) perspective(100vw) rotateY(30deg)", document.documentElement.style.setProperty("--t-screen-backdrop-duration", "0.35s"), document.documentElement.style.setProperty("--t-swipe-backdrop-opacity", "0.5"), setTimeout(() => {
|
|
702
702
|
l.value = !1;
|
|
703
703
|
}, 400);
|
|
704
704
|
};
|
|
705
705
|
return J(() => {
|
|
706
706
|
V(document, {
|
|
707
707
|
pointerId: null,
|
|
708
|
-
beforeEvent(
|
|
709
|
-
return l.value || $.screens.length < 2 ? !1 : (
|
|
708
|
+
beforeEvent(r) {
|
|
709
|
+
return l.value || $.screens.length < 2 ? !1 : (r.type == "pointerdown" && !this.pointerId && (this.pointerId = r.pointerId), this.pointerId == r.pointerId);
|
|
710
710
|
},
|
|
711
|
-
afterEvent(
|
|
712
|
-
(
|
|
711
|
+
afterEvent(r, p) {
|
|
712
|
+
(r == "up" || r == "cancel") && (this.pointerId = null);
|
|
713
713
|
},
|
|
714
|
-
fast({ d:
|
|
715
|
-
|
|
714
|
+
fast({ d: r }) {
|
|
715
|
+
r == "right" && e.back();
|
|
716
716
|
},
|
|
717
|
-
move({ dx:
|
|
718
|
-
const
|
|
719
|
-
if (
|
|
720
|
-
|
|
717
|
+
move({ dx: r }) {
|
|
718
|
+
const p = window.innerWidth, h = r / p * 100, f = $.currentScreen.value.target, x = $.lastScreen?.value?.target;
|
|
719
|
+
if (r > 0 && r <= p) {
|
|
720
|
+
f.style.transition = "transform 0s ease", f.style.transform = `translateX(${r}px)`, x.style.transition = "transform 0s ease", document.documentElement.style.setProperty("--t-screen-backdrop-duration", "0s"), x.style.transform = `translateX(calc(-30vw + (30vw / 100 * ${h}))) scale(${0.5 + 0.5 / 100 * h}) perspective(100vw) rotateY(${30 - 30 / 100 * h}deg)`, document.documentElement.style.setProperty("--t-swipe-backdrop-opacity", `${0.5 - 0.5 / 100 * h}`);
|
|
721
721
|
return;
|
|
722
722
|
}
|
|
723
723
|
},
|
|
724
|
-
up({ dx:
|
|
725
|
-
const
|
|
726
|
-
|
|
724
|
+
up({ dx: r }) {
|
|
725
|
+
const p = window.innerWidth;
|
|
726
|
+
r / p * 100 >= 50 ? e.back() : _();
|
|
727
727
|
},
|
|
728
728
|
cancel() {
|
|
729
729
|
_();
|
|
730
730
|
}
|
|
731
731
|
});
|
|
732
|
-
}), (
|
|
733
|
-
(c(!0), m(A, null, H(D($).screens, (h,
|
|
732
|
+
}), (r, p) => (c(), m(A, null, [
|
|
733
|
+
(c(!0), m(A, null, H(D($).screens, (h, f) => (c(), E(re, {
|
|
734
734
|
ref_for: !0,
|
|
735
|
-
ref: (x) => d(
|
|
736
|
-
style: w({ zIndex:
|
|
737
|
-
key:
|
|
735
|
+
ref: (x) => d(f, x),
|
|
736
|
+
style: w({ zIndex: f + (f == D($).screens.length - 1 ? 2 : 1) }),
|
|
737
|
+
key: f
|
|
738
738
|
}, {
|
|
739
739
|
default: B(() => [
|
|
740
740
|
(c(), E(le(h.component.default)))
|
|
@@ -747,7 +747,7 @@ const se = /* @__PURE__ */ g(He, [["render", je], ["__scopeId", "data-v-66ea8649
|
|
|
747
747
|
}, null, 4)
|
|
748
748
|
], 64));
|
|
749
749
|
}
|
|
750
|
-
}), Ge = /* @__PURE__ */ g(Fe, [["__scopeId", "data-v-
|
|
750
|
+
}), Ge = /* @__PURE__ */ g(Fe, [["__scopeId", "data-v-16f52a17"]]), Ke = /* @__PURE__ */ T({
|
|
751
751
|
__name: "t-toolbar",
|
|
752
752
|
props: {
|
|
753
753
|
placement: { default: "bottom" },
|
|
@@ -773,12 +773,12 @@ const se = /* @__PURE__ */ g(He, [["render", je], ["__scopeId", "data-v-66ea8649
|
|
|
773
773
|
const n = oe(), o = t, e = () => {
|
|
774
774
|
$.hasPrevious.value ? n?.back?.() : o.to && n?.push?.(o.to);
|
|
775
775
|
};
|
|
776
|
-
return (
|
|
776
|
+
return (s, a) => s.to || D($).hasPrevious ? (c(), m("button", {
|
|
777
777
|
key: 0,
|
|
778
778
|
class: "t-back-button",
|
|
779
779
|
onClick: e
|
|
780
780
|
}, [
|
|
781
|
-
b(
|
|
781
|
+
b(s.$slots, "default", {}, () => [
|
|
782
782
|
a[0] || (a[0] = k("i", { class: "ri-arrow-left-s-line" }, null, -1))
|
|
783
783
|
], !0)
|
|
784
784
|
])) : z("", !0);
|
|
@@ -791,13 +791,13 @@ const se = /* @__PURE__ */ g(He, [["render", je], ["__scopeId", "data-v-66ea8649
|
|
|
791
791
|
},
|
|
792
792
|
setup(t) {
|
|
793
793
|
const n = t, o = S(() => {
|
|
794
|
-
let e,
|
|
795
|
-
return n.size == "standard" ? e = "var(--t-fs-10)" : n.size == "small" ? e = "var(--t-fs-08)" : n.size == "large" ? e = "var(--t-fs-12)" : e = n.size, ["warning", "info", "danger", "primary", "secondary", "success"].includes(n.color) && (
|
|
796
|
-
"--color":
|
|
794
|
+
let e, s = n.color;
|
|
795
|
+
return n.size == "standard" ? e = "var(--t-fs-10)" : n.size == "small" ? e = "var(--t-fs-08)" : n.size == "large" ? e = "var(--t-fs-12)" : e = n.size, ["warning", "info", "danger", "primary", "secondary", "success"].includes(n.color) && (s = `var(--t-color-status-${n.color})`), {
|
|
796
|
+
"--color": s,
|
|
797
797
|
"--font-size": e
|
|
798
798
|
};
|
|
799
799
|
});
|
|
800
|
-
return (e,
|
|
800
|
+
return (e, s) => (c(), m("span", {
|
|
801
801
|
class: "t-text",
|
|
802
802
|
style: w(o.value)
|
|
803
803
|
}, [
|
|
@@ -830,7 +830,7 @@ const se = /* @__PURE__ */ g(He, [["render", je], ["__scopeId", "data-v-66ea8649
|
|
|
830
830
|
},
|
|
831
831
|
emits: ["dismiss"],
|
|
832
832
|
setup(t, { emit: n }) {
|
|
833
|
-
const o = t, e = n,
|
|
833
|
+
const o = t, e = n, s = y(), a = y(), l = y(!1);
|
|
834
834
|
let i = null;
|
|
835
835
|
const u = S(() => {
|
|
836
836
|
if (o.placement == "bottom") return "down";
|
|
@@ -844,37 +844,37 @@ const se = /* @__PURE__ */ g(He, [["render", je], ["__scopeId", "data-v-66ea8649
|
|
|
844
844
|
l.value = !1;
|
|
845
845
|
}, 300);
|
|
846
846
|
};
|
|
847
|
-
return R(() =>
|
|
848
|
-
_ && (i = V(
|
|
847
|
+
return R(() => s.value, (_) => {
|
|
848
|
+
_ && (i = V(s.value, {
|
|
849
849
|
options: {
|
|
850
850
|
minDist: 30
|
|
851
851
|
},
|
|
852
852
|
pointerId: null,
|
|
853
|
-
beforeEvent(
|
|
854
|
-
let
|
|
855
|
-
return l.value || !o.gesture || o.placement == "center" ?
|
|
853
|
+
beforeEvent(r) {
|
|
854
|
+
let p = !1, h = !1;
|
|
855
|
+
return l.value || !o.gesture || o.placement == "center" ? p = !0 : this.pointerId ? (p = !0, h = this.pointerId == r.pointerId) : r.type == "pointerdown" && (this.pointerId = r.pointerId, p = !0, h = !0), p && (r.stopPropagation(), O(r.target) || (r.preventDefault(), q())), h;
|
|
856
856
|
},
|
|
857
|
-
afterEvent(
|
|
858
|
-
(
|
|
857
|
+
afterEvent(r, p) {
|
|
858
|
+
(r == "up" || r == "cancel") && (this.pointerId = null);
|
|
859
859
|
},
|
|
860
|
-
fast({ d:
|
|
861
|
-
v(),
|
|
860
|
+
fast({ d: r }) {
|
|
861
|
+
v(), r == u.value ? e("dismiss", "gesture") : a.value.open();
|
|
862
862
|
},
|
|
863
|
-
move({ dy:
|
|
863
|
+
move({ dy: r, dx: p, d: h }) {
|
|
864
864
|
if (h != u.value) return;
|
|
865
|
-
let
|
|
866
|
-
o.placement == "bottom" || o.placement == "top" ?
|
|
867
|
-
contentTransform:
|
|
865
|
+
let f = 0;
|
|
866
|
+
o.placement == "bottom" || o.placement == "top" ? f = r : f = p, a.value.render({
|
|
867
|
+
contentTransform: f + "px",
|
|
868
868
|
transition: "0s"
|
|
869
869
|
});
|
|
870
870
|
},
|
|
871
|
-
up({ dy:
|
|
871
|
+
up({ dy: r, dx: p, d: h }) {
|
|
872
872
|
if (v(), h != u.value) {
|
|
873
873
|
a.value.open();
|
|
874
874
|
return;
|
|
875
875
|
}
|
|
876
|
-
let
|
|
877
|
-
o.placement == "bottom" || o.placement == "top" ? (
|
|
876
|
+
let f, x, G;
|
|
877
|
+
o.placement == "bottom" || o.placement == "top" ? (f = s.value.offsetHeight, G = r) : (f = s.value.offsetWidth, G = p), x = G / f * 100, x > 50 ? e("dismiss", "gesture") : a.value.open();
|
|
878
878
|
},
|
|
879
879
|
cancel() {
|
|
880
880
|
v(), a.value.open();
|
|
@@ -882,7 +882,7 @@ const se = /* @__PURE__ */ g(He, [["render", je], ["__scopeId", "data-v-66ea8649
|
|
|
882
882
|
}));
|
|
883
883
|
}), N(() => {
|
|
884
884
|
i && i.destroy();
|
|
885
|
-
}), (_,
|
|
885
|
+
}), (_, r) => (c(), E(L, {
|
|
886
886
|
ref_key: "present",
|
|
887
887
|
ref: a,
|
|
888
888
|
placement: o.placement,
|
|
@@ -899,17 +899,17 @@ const se = /* @__PURE__ */ g(He, [["render", je], ["__scopeId", "data-v-66ea8649
|
|
|
899
899
|
o.closeButton && o.placement == "center" ? (c(), m("button", {
|
|
900
900
|
key: 1,
|
|
901
901
|
class: "t-sheet-close",
|
|
902
|
-
onClick:
|
|
902
|
+
onClick: r[0] || (r[0] = (p) => d("close-button"))
|
|
903
903
|
}, [
|
|
904
904
|
b(_.$slots, "close-icon", {}, () => [
|
|
905
|
-
|
|
905
|
+
r[1] || (r[1] = k("i", { class: "ri-close-large-line" }, null, -1))
|
|
906
906
|
], !0)
|
|
907
907
|
])) : z("", !0),
|
|
908
908
|
k("div", {
|
|
909
909
|
class: I(["t-sheet", { fullscreen: o.fullscreen, [o.placement]: !0, rounded: _.rounded, radius: o.radius }]),
|
|
910
910
|
style: w({ "--background": o.background }),
|
|
911
911
|
ref_key: "sheet",
|
|
912
|
-
ref:
|
|
912
|
+
ref: s
|
|
913
913
|
}, [
|
|
914
914
|
b(_.$slots, "default", {}, void 0, !0)
|
|
915
915
|
], 6)
|
|
@@ -917,7 +917,7 @@ const se = /* @__PURE__ */ g(He, [["render", je], ["__scopeId", "data-v-66ea8649
|
|
|
917
917
|
_: 3
|
|
918
918
|
}, 8, ["placement", "backdrop", "visible", "keepalive"]));
|
|
919
919
|
}
|
|
920
|
-
}), ot = /* @__PURE__ */ g(tt, [["__scopeId", "data-v-
|
|
920
|
+
}), ot = /* @__PURE__ */ g(tt, [["__scopeId", "data-v-170e2041"]]), nt = { class: "t-input-label" }, st = { class: "t-input-content" }, rt = ["type", "placeholder", "value"], at = /* @__PURE__ */ T({
|
|
921
921
|
__name: "t-input",
|
|
922
922
|
props: {
|
|
923
923
|
size: { default: "standard" },
|
|
@@ -932,7 +932,7 @@ const se = /* @__PURE__ */ g(He, [["render", je], ["__scopeId", "data-v-66ea8649
|
|
|
932
932
|
},
|
|
933
933
|
emits: ["update:modelValue"],
|
|
934
934
|
setup(t, { emit: n }) {
|
|
935
|
-
const o = t, e = n,
|
|
935
|
+
const o = t, e = n, s = (a) => {
|
|
936
936
|
e("update:modelValue", a.target.value);
|
|
937
937
|
};
|
|
938
938
|
return (a, l) => (c(), m("div", {
|
|
@@ -940,14 +940,14 @@ const se = /* @__PURE__ */ g(He, [["render", je], ["__scopeId", "data-v-66ea8649
|
|
|
940
940
|
}, [
|
|
941
941
|
k("label", null, [
|
|
942
942
|
k("span", nt, P(a.label), 1),
|
|
943
|
-
k("div",
|
|
943
|
+
k("div", st, [
|
|
944
944
|
b(a.$slots, "start", {}, void 0, !0),
|
|
945
945
|
k("input", {
|
|
946
946
|
type: a.type,
|
|
947
947
|
placeholder: a.placeholder,
|
|
948
948
|
value: a.modelValue,
|
|
949
|
-
onInput:
|
|
950
|
-
}, null, 40,
|
|
949
|
+
onInput: s
|
|
950
|
+
}, null, 40, rt),
|
|
951
951
|
b(a.$slots, "end", {}, void 0, !0)
|
|
952
952
|
])
|
|
953
953
|
]),
|
|
@@ -1004,7 +1004,7 @@ const kt = /* @__PURE__ */ g(gt, [["render", ht]]), $t = /* @__PURE__ */ T({
|
|
|
1004
1004
|
},
|
|
1005
1005
|
emits: ["change"],
|
|
1006
1006
|
setup(t, { emit: n }) {
|
|
1007
|
-
const o = t, e = n,
|
|
1007
|
+
const o = t, e = n, s = y(!1), a = y(), l = S(() => {
|
|
1008
1008
|
let d = o.color;
|
|
1009
1009
|
return ["warning", "info", "danger", "primary", "secondary", "success"].includes(o.color) && (d = `var(--t-color-status-${o.color})`), {
|
|
1010
1010
|
"--color": d
|
|
@@ -1012,11 +1012,11 @@ const kt = /* @__PURE__ */ g(gt, [["render", ht]]), $t = /* @__PURE__ */ T({
|
|
|
1012
1012
|
}), i = () => a.value?.parentElement?.querySelector?.("input");
|
|
1013
1013
|
J(() => {
|
|
1014
1014
|
let d = i();
|
|
1015
|
-
d && (
|
|
1015
|
+
d && (s.value = d.type != "password", e("change", s.value));
|
|
1016
1016
|
});
|
|
1017
1017
|
const u = () => {
|
|
1018
1018
|
let d = i();
|
|
1019
|
-
d && (
|
|
1019
|
+
d && (s.value = !s.value, s.value ? d.type = "text" : d.type = "password", e("change", s.value));
|
|
1020
1020
|
};
|
|
1021
1021
|
return (d, v) => (c(), m("button", {
|
|
1022
1022
|
ref_key: "toggle",
|
|
@@ -1025,10 +1025,10 @@ const kt = /* @__PURE__ */ g(gt, [["render", ht]]), $t = /* @__PURE__ */ T({
|
|
|
1025
1025
|
style: w(l.value),
|
|
1026
1026
|
onClick: u
|
|
1027
1027
|
}, [
|
|
1028
|
-
|
|
1028
|
+
s.value ? b(d.$slots, "on", { key: 0 }, () => [
|
|
1029
1029
|
v[0] || (v[0] = k("i", { class: "ri-eye-line" }, null, -1))
|
|
1030
1030
|
], !0) : z("", !0),
|
|
1031
|
-
|
|
1031
|
+
s.value ? z("", !0) : b(d.$slots, "off", { key: 1 }, () => [
|
|
1032
1032
|
v[1] || (v[1] = k("i", { class: "ri-eye-off-line" }, null, -1))
|
|
1033
1033
|
], !0)
|
|
1034
1034
|
], 4));
|
|
@@ -1041,7 +1041,7 @@ const kt = /* @__PURE__ */ g(gt, [["render", ht]]), $t = /* @__PURE__ */ T({
|
|
|
1041
1041
|
},
|
|
1042
1042
|
setup(t) {
|
|
1043
1043
|
const n = t, o = S(() => n.size == "small" ? "24px" : n.size == "standard" ? "40px" : n.size == "large" ? "60px" : n.size);
|
|
1044
|
-
return (e,
|
|
1044
|
+
return (e, s) => (c(), m("div", {
|
|
1045
1045
|
class: I(["t-avatar", { square: e.square }]),
|
|
1046
1046
|
style: w({ "--size": o.value })
|
|
1047
1047
|
}, [
|
|
@@ -1061,11 +1061,11 @@ const kt = /* @__PURE__ */ g(gt, [["render", ht]]), $t = /* @__PURE__ */ T({
|
|
|
1061
1061
|
},
|
|
1062
1062
|
emits: ["change"],
|
|
1063
1063
|
setup(t, { emit: n }) {
|
|
1064
|
-
const o = t, e = n,
|
|
1065
|
-
|
|
1064
|
+
const o = t, e = n, s = y(!1), a = y(""), l = y(), i = () => {
|
|
1065
|
+
s.value = !s.value, a.value = `calc(${l.value.offsetHeight}px + 2rem)`, e("change", s.value);
|
|
1066
1066
|
};
|
|
1067
|
-
return e("change",
|
|
1068
|
-
class: I(["t-collapse", { open:
|
|
1067
|
+
return e("change", s.value), (u, d) => (c(), m("div", {
|
|
1068
|
+
class: I(["t-collapse", { open: s.value }]),
|
|
1069
1069
|
style: w({ "--height": a.value })
|
|
1070
1070
|
}, [
|
|
1071
1071
|
k("div", {
|
|
@@ -1079,7 +1079,7 @@ const kt = /* @__PURE__ */ g(gt, [["render", ht]]), $t = /* @__PURE__ */ T({
|
|
|
1079
1079
|
])
|
|
1080
1080
|
]),
|
|
1081
1081
|
b(u.$slots, "toggle", {}, () => [
|
|
1082
|
-
|
|
1082
|
+
s.value ? (c(), m("div", Et, [...d[0] || (d[0] = [
|
|
1083
1083
|
k("i", { class: "ri-arrow-up-s-line" }, null, -1)
|
|
1084
1084
|
])])) : (c(), m("div", Bt, [...d[1] || (d[1] = [
|
|
1085
1085
|
k("i", { class: "ri-arrow-down-s-line" }, null, -1)
|
|
@@ -1106,7 +1106,7 @@ const kt = /* @__PURE__ */ g(gt, [["render", ht]]), $t = /* @__PURE__ */ T({
|
|
|
1106
1106
|
},
|
|
1107
1107
|
emits: ["update:modelValue"],
|
|
1108
1108
|
setup(t, { emit: n }) {
|
|
1109
|
-
const o = t, e = n,
|
|
1109
|
+
const o = t, e = n, s = () => {
|
|
1110
1110
|
e("update:modelValue", !o.modelValue);
|
|
1111
1111
|
}, a = S(() => {
|
|
1112
1112
|
let l = {
|
|
@@ -1121,7 +1121,7 @@ const kt = /* @__PURE__ */ g(gt, [["render", ht]]), $t = /* @__PURE__ */ T({
|
|
|
1121
1121
|
return (l, i) => (c(), m("div", {
|
|
1122
1122
|
class: I(["t-switch", { on: o.modelValue }]),
|
|
1123
1123
|
style: w(a.value),
|
|
1124
|
-
onClick:
|
|
1124
|
+
onClick: s
|
|
1125
1125
|
}, [...i[0] || (i[0] = [
|
|
1126
1126
|
k("div", { class: "t-switch-icon" }, null, -1)
|
|
1127
1127
|
])], 6));
|
|
@@ -1132,7 +1132,7 @@ const kt = /* @__PURE__ */ g(gt, [["render", ht]]), $t = /* @__PURE__ */ T({
|
|
|
1132
1132
|
value: {}
|
|
1133
1133
|
},
|
|
1134
1134
|
setup(t) {
|
|
1135
|
-
const n = t, o = ie("tabsState"), e = S(() => o.active.value === n.value),
|
|
1135
|
+
const n = t, o = ie("tabsState"), e = S(() => o.active.value === n.value), s = () => {
|
|
1136
1136
|
o.setActive(n.value);
|
|
1137
1137
|
};
|
|
1138
1138
|
return (a, l) => (c(), m("li", {
|
|
@@ -1140,7 +1140,7 @@ const kt = /* @__PURE__ */ g(gt, [["render", ht]]), $t = /* @__PURE__ */ T({
|
|
|
1140
1140
|
}, [
|
|
1141
1141
|
M(F, {
|
|
1142
1142
|
variant: "text",
|
|
1143
|
-
onClick:
|
|
1143
|
+
onClick: s,
|
|
1144
1144
|
color: e.value && D(o).variant == "text" ? D(o).color : void 0
|
|
1145
1145
|
}, {
|
|
1146
1146
|
default: B(() => [
|
|
@@ -1161,7 +1161,7 @@ const kt = /* @__PURE__ */ g(gt, [["render", ht]]), $t = /* @__PURE__ */ T({
|
|
|
1161
1161
|
},
|
|
1162
1162
|
emits: ["update:modelValue"],
|
|
1163
1163
|
setup(t, { emit: n }) {
|
|
1164
|
-
const o = t, e = n,
|
|
1164
|
+
const o = t, e = n, s = y("0px"), a = y(), l = S(() => {
|
|
1165
1165
|
let u = o.color;
|
|
1166
1166
|
return ["warning", "info", "danger", "primary", "secondary", "success"].includes(u) && (u = `var(--t-color-status-${u})`), u;
|
|
1167
1167
|
}), i = () => {
|
|
@@ -1170,13 +1170,13 @@ const kt = /* @__PURE__ */ g(gt, [["render", ht]]), $t = /* @__PURE__ */ T({
|
|
|
1170
1170
|
let u = a.value.querySelector(".active");
|
|
1171
1171
|
if (u) {
|
|
1172
1172
|
let d = u.getBoundingClientRect().left - a.value.getBoundingClientRect().left, v = u.offsetWidth / 2;
|
|
1173
|
-
|
|
1173
|
+
s.value = d + v - o.border / 2 + "px";
|
|
1174
1174
|
}
|
|
1175
1175
|
} else if (o.placement.startsWith("left-") || o.placement.startsWith("right-")) {
|
|
1176
1176
|
let u = a.value.querySelector(".active");
|
|
1177
1177
|
if (u) {
|
|
1178
1178
|
let d = u.getBoundingClientRect().top - a.value.getBoundingClientRect().top, v = u.offsetHeight / 2;
|
|
1179
|
-
|
|
1179
|
+
s.value = d + v - o.border / 2 + "px";
|
|
1180
1180
|
}
|
|
1181
1181
|
}
|
|
1182
1182
|
}, 50);
|
|
@@ -1194,14 +1194,14 @@ const kt = /* @__PURE__ */ g(gt, [["render", ht]]), $t = /* @__PURE__ */ T({
|
|
|
1194
1194
|
ref_key: "container",
|
|
1195
1195
|
ref: a,
|
|
1196
1196
|
class: I(["t-tabs", { [u.placement]: !0, [u.variant]: !0 }]),
|
|
1197
|
-
style: w({ "--color": l.value, "--transform":
|
|
1197
|
+
style: w({ "--color": l.value, "--transform": s.value, "--border": u.border + "px" })
|
|
1198
1198
|
}, [
|
|
1199
1199
|
b(u.$slots, "default", {}, void 0, !0)
|
|
1200
1200
|
], 6));
|
|
1201
1201
|
}
|
|
1202
1202
|
}), Ot = /* @__PURE__ */ g(Nt, [["__scopeId", "data-v-2f040d31"]]), jt = () => ({
|
|
1203
1203
|
install: (t) => {
|
|
1204
|
-
pe(), t.component("t-app", _e), t.component("t-screen",
|
|
1204
|
+
pe(), t.component("t-app", _e), t.component("t-screen", re), t.component("t-swipe-screen", Ge), t.component("t-cable", Ae), t.component("t-toolbar", Me), t.component("t-content", Le), t.component("t-card", Ne), t.component("t-refresher", Ye), t.component("t-button", F), t.component("t-back-button", Qe), t.component("t-present", L), t.component("t-text", K), t.component("t-sheet", ot), t.component("t-pull-signal", ae), t.component("t-input", lt), t.component("t-textarea", ut), t.component("t-rich-text", ft), t.component("t-grid", yt), t.component("t-grid-item", kt), t.component("t-divider", Tt), t.component("t-toggle-password", xt), t.component("t-loading-icon", Q), t.component("t-alert", ne), t.component("t-avatar", St), t.component("t-collapse", Pt), t.component("t-toast", se), t.component("t-switch", Rt), t.component("t-tab", At), t.component("t-tabs", Ot);
|
|
1205
1205
|
}
|
|
1206
1206
|
});
|
|
1207
1207
|
export {
|