@toife/vue 1.1.32 → 1.1.33
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/controllers/screen.d.ts +1 -0
- package/dist/index.css +1 -1
- package/dist/index.es.js +476 -470
- package/dist/index.umd.js +1 -1
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
import { createElementBlock as _, openBlock as
|
|
2
|
-
import { gesture as
|
|
1
|
+
import { createElementBlock as _, openBlock as u, renderSlot as h, defineComponent as T, ref as y, computed as S, reactive as te, watch as A, Fragment as V, withDirectives as Y, createCommentVNode as B, normalizeStyle as w, normalizeClass as x, vShow as H, createElementVNode as $, createVNode as M, onUnmounted as N, createBlock as C, withCtx as P, toDisplayString as D, renderList as U, createTextVNode as O, createApp as j, h as F, unref as E, onMounted as J, resolveDynamicComponent as le, markRaw as ce, inject as ie, provide as ue } from "vue";
|
|
2
|
+
import { gesture as L } from "@toife/gesture";
|
|
3
3
|
import { useRouter as oe, useRoute as de } from "vue-router";
|
|
4
|
-
const
|
|
4
|
+
const q = (t) => t && (t.tagName == "INPUT" || t.tagName == "TEXTAREA" || t.isContentEditable), X = () => {
|
|
5
5
|
const t = document.activeElement;
|
|
6
6
|
t && (t.tagName === "INPUT" || t.tagName === "TEXTAREA" || t.isContentEditable) && t.blur();
|
|
7
7
|
}, pe = () => {
|
|
8
8
|
document.addEventListener("contextmenu", (t) => t.preventDefault()), document.addEventListener("selectstart", (t) => t.preventDefault()), document.addEventListener("pointerup", (t) => {
|
|
9
|
-
!
|
|
9
|
+
!q(t.target) && X();
|
|
10
10
|
});
|
|
11
|
-
},
|
|
11
|
+
}, b = (t, n) => {
|
|
12
12
|
const o = t.__vccOpts || t;
|
|
13
13
|
for (const [e, s] of n)
|
|
14
14
|
o[e] = s;
|
|
15
15
|
return o;
|
|
16
16
|
}, fe = {}, me = { class: "t-app" };
|
|
17
17
|
function ve(t, n) {
|
|
18
|
-
return
|
|
19
|
-
|
|
18
|
+
return u(), _("div", me, [
|
|
19
|
+
h(t.$slots, "default")
|
|
20
20
|
]);
|
|
21
21
|
}
|
|
22
|
-
const _e = /* @__PURE__ */
|
|
22
|
+
const _e = /* @__PURE__ */ b(fe, [["render", ve]]), ye = /* @__PURE__ */ T({
|
|
23
23
|
__name: "t-present",
|
|
24
24
|
props: {
|
|
25
25
|
keepalive: { type: Boolean, default: !0 },
|
|
@@ -29,68 +29,68 @@ 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), s = y(!1),
|
|
32
|
+
const e = y(0), s = y(!1), r = y(), c = y(), i = t, d = o, p = S(() => s.value || i.keepalive), f = 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
|
-
|
|
39
|
-
},
|
|
40
|
-
|
|
37
|
+
}), v = (m) => {
|
|
38
|
+
i.backdrop ? m?.backdropOpacity && (f["--t-present-backdrop-opacity"] = m.backdropOpacity) : f["--t-present-backdrop-opacity"] = "0", m?.transition && (f["--t-present-transition"] = m.transition, f["--t-present-transition"] = m.transition), m?.contentTransform && (f["--t-present-content-transform"] = m.contentTransform), m?.contentOpacity && (f["--t-present-content-opacity"] = m.contentOpacity);
|
|
39
|
+
}, l = () => {
|
|
40
|
+
v({
|
|
41
41
|
contentTransform: "0px",
|
|
42
42
|
transition: "0.2s",
|
|
43
43
|
backdropOpacity: "0.4",
|
|
44
44
|
contentOpacity: "1"
|
|
45
45
|
});
|
|
46
|
-
},
|
|
47
|
-
let
|
|
48
|
-
|
|
49
|
-
contentTransform:
|
|
46
|
+
}, a = () => {
|
|
47
|
+
let m = "0px", I = "1";
|
|
48
|
+
i.placement == "bottom" || i.placement == "right" ? m = "100%" : i.placement == "top" || i.placement == "left" ? m = "-100%" : i.placement == "center" && (m = "0px", I = "0"), v({
|
|
49
|
+
contentTransform: m,
|
|
50
50
|
transition: "0.2s",
|
|
51
|
-
contentOpacity:
|
|
51
|
+
contentOpacity: I,
|
|
52
52
|
backdropOpacity: "0"
|
|
53
53
|
});
|
|
54
54
|
};
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
}, 50)) : (
|
|
55
|
+
A(() => i.visible, () => {
|
|
56
|
+
i.visible ? (s.value = !0, e.value = Be.getNewIndex(), setTimeout(() => {
|
|
57
|
+
l();
|
|
58
|
+
}, 50)) : (a(), setTimeout(() => {
|
|
59
59
|
s.value = !1;
|
|
60
60
|
}, 200));
|
|
61
61
|
}), n({
|
|
62
|
-
render:
|
|
63
|
-
open:
|
|
64
|
-
close:
|
|
62
|
+
render: v,
|
|
63
|
+
open: l,
|
|
64
|
+
close: a
|
|
65
65
|
});
|
|
66
|
-
const
|
|
67
|
-
|
|
66
|
+
const g = (m) => {
|
|
67
|
+
m.preventDefault(), d("dismiss", "backdrop");
|
|
68
68
|
};
|
|
69
|
-
return
|
|
70
|
-
|
|
69
|
+
return a(), (m, I) => (u(), _(V, null, [
|
|
70
|
+
p.value ? Y((u(), _("div", {
|
|
71
71
|
key: 0,
|
|
72
|
-
class: x(["t-present", { [
|
|
72
|
+
class: x(["t-present", { [m.placement]: !0 }]),
|
|
73
73
|
ref_key: "present",
|
|
74
|
-
ref:
|
|
75
|
-
style: w({ ...
|
|
74
|
+
ref: c,
|
|
75
|
+
style: w({ ...f, zIndex: e.value })
|
|
76
76
|
}, [
|
|
77
|
-
|
|
77
|
+
h(m.$slots, "default", {}, void 0, !0)
|
|
78
78
|
], 6)), [
|
|
79
|
-
[
|
|
80
|
-
]) :
|
|
81
|
-
|
|
79
|
+
[H, s.value]
|
|
80
|
+
]) : B("", !0),
|
|
81
|
+
p.value ? Y((u(), _("div", {
|
|
82
82
|
key: 1,
|
|
83
83
|
class: "t-present-backdrop",
|
|
84
|
-
onClick:
|
|
84
|
+
onClick: g,
|
|
85
85
|
ref_key: "backdrop",
|
|
86
|
-
ref:
|
|
87
|
-
style: w({ ...
|
|
86
|
+
ref: r,
|
|
87
|
+
style: w({ ...f, zIndex: e.value - 1 })
|
|
88
88
|
}, null, 4)), [
|
|
89
|
-
[
|
|
90
|
-
]) :
|
|
89
|
+
[H, s.value]
|
|
90
|
+
]) : B("", !0)
|
|
91
91
|
], 64));
|
|
92
92
|
}
|
|
93
|
-
}),
|
|
93
|
+
}), W = /* @__PURE__ */ b(ye, [["__scopeId", "data-v-0ec92514"]]), ge = /* @__PURE__ */ T({
|
|
94
94
|
__name: "t-loading-icon",
|
|
95
95
|
props: {
|
|
96
96
|
size: {
|
|
@@ -103,7 +103,7 @@ const _e = /* @__PURE__ */ g(fe, [["render", ve]]), ye = /* @__PURE__ */ T({
|
|
|
103
103
|
}
|
|
104
104
|
},
|
|
105
105
|
setup(t) {
|
|
106
|
-
return (n, o) => (
|
|
106
|
+
return (n, o) => (u(), _("span", {
|
|
107
107
|
class: "t-loading-icon",
|
|
108
108
|
style: w({
|
|
109
109
|
width: t.size,
|
|
@@ -114,7 +114,7 @@ const _e = /* @__PURE__ */ g(fe, [["render", ve]]), ye = /* @__PURE__ */ T({
|
|
|
114
114
|
"aria-label": "Loading..."
|
|
115
115
|
}, null, 4));
|
|
116
116
|
}
|
|
117
|
-
}), Q = /* @__PURE__ */
|
|
117
|
+
}), Q = /* @__PURE__ */ b(ge, [["__scopeId", "data-v-7c463303"]]), be = {
|
|
118
118
|
key: 0,
|
|
119
119
|
class: "loader"
|
|
120
120
|
}, he = /* @__PURE__ */ T({
|
|
@@ -130,7 +130,7 @@ const _e = /* @__PURE__ */ g(fe, [["render", ve]]), ye = /* @__PURE__ */ T({
|
|
|
130
130
|
activeBackground: { type: Boolean, default: !1 }
|
|
131
131
|
},
|
|
132
132
|
setup(t) {
|
|
133
|
-
const n = t, o =
|
|
133
|
+
const n = t, o = S(() => {
|
|
134
134
|
let e;
|
|
135
135
|
return n.variant == "default" && (n.color ? ["warning", "info", "danger", "primary", "secondary", "success"].includes(n.color) ? e = {
|
|
136
136
|
"--border": "none",
|
|
@@ -170,24 +170,24 @@ const _e = /* @__PURE__ */ g(fe, [["render", ve]]), ye = /* @__PURE__ */ T({
|
|
|
170
170
|
"--background": "transparent"
|
|
171
171
|
}), e;
|
|
172
172
|
});
|
|
173
|
-
return (e, s) => (
|
|
173
|
+
return (e, s) => (u(), _("button", {
|
|
174
174
|
class: x(["t-button", { "active-background": n.activeBackground, rounded: n.rounded, block: n.block, ["size-" + n.size]: !0 }]),
|
|
175
175
|
style: w(o.value)
|
|
176
176
|
}, [
|
|
177
|
-
|
|
178
|
-
|
|
177
|
+
Y($("span", null, [
|
|
178
|
+
h(e.$slots, "default", {}, void 0, !0)
|
|
179
179
|
], 512), [
|
|
180
|
-
[
|
|
180
|
+
[H, !n.loading]
|
|
181
181
|
]),
|
|
182
|
-
n.loading ? (
|
|
182
|
+
n.loading ? (u(), _("span", be, [
|
|
183
183
|
M(Q, {
|
|
184
184
|
color: "var(--color)",
|
|
185
185
|
type: n.loadingType
|
|
186
186
|
}, null, 8, ["type"])
|
|
187
|
-
])) :
|
|
187
|
+
])) : B("", !0)
|
|
188
188
|
], 6));
|
|
189
189
|
}
|
|
190
|
-
}),
|
|
190
|
+
}), G = /* @__PURE__ */ b(he, [["__scopeId", "data-v-74d8380d"]]), ke = {
|
|
191
191
|
key: 0,
|
|
192
192
|
class: "t-alert-header"
|
|
193
193
|
}, $e = { class: "t-alert-content" }, Te = { class: "t-alert-footer" }, we = /* @__PURE__ */ T({
|
|
@@ -200,55 +200,55 @@ const _e = /* @__PURE__ */ g(fe, [["render", ve]]), ye = /* @__PURE__ */ T({
|
|
|
200
200
|
},
|
|
201
201
|
emits: ["dismiss"],
|
|
202
202
|
setup(t, { expose: n, emit: o }) {
|
|
203
|
-
const e = t, s = y(!1),
|
|
204
|
-
let
|
|
205
|
-
const
|
|
203
|
+
const e = t, s = y(!1), r = o, c = y();
|
|
204
|
+
let i;
|
|
205
|
+
const d = y(!1), p = () => {
|
|
206
206
|
s.value = !0;
|
|
207
|
-
},
|
|
208
|
-
s.value = !1,
|
|
209
|
-
},
|
|
210
|
-
e.dismiss && e.dismiss.includes(
|
|
211
|
-
|
|
207
|
+
}, f = (l) => {
|
|
208
|
+
s.value = !1, l.handler && l.handler(), r("dismiss", "choose", l?.data);
|
|
209
|
+
}, v = (l) => {
|
|
210
|
+
e.dismiss && e.dismiss.includes(l) ? (s.value = !1, r("dismiss", l)) : l == "backdrop" && (d.value = !0, setTimeout(() => {
|
|
211
|
+
d.value = !1;
|
|
212
212
|
}, 300));
|
|
213
213
|
};
|
|
214
214
|
return n({
|
|
215
|
-
open:
|
|
216
|
-
}),
|
|
217
|
-
|
|
218
|
-
beforeEvent(
|
|
219
|
-
return
|
|
215
|
+
open: p
|
|
216
|
+
}), A(() => c.value, (l) => {
|
|
217
|
+
l && (i = L(c.value, {
|
|
218
|
+
beforeEvent(a) {
|
|
219
|
+
return a.stopPropagation(), q(a.target) || (a.preventDefault(), X()), !1;
|
|
220
220
|
}
|
|
221
221
|
}));
|
|
222
|
-
}),
|
|
223
|
-
|
|
224
|
-
}), (
|
|
222
|
+
}), N(() => {
|
|
223
|
+
i && i.destroy();
|
|
224
|
+
}), (l, a) => (u(), C(W, {
|
|
225
225
|
placement: "center",
|
|
226
226
|
backdrop: !0,
|
|
227
227
|
keepalive: !1,
|
|
228
228
|
visible: s.value,
|
|
229
|
-
onDismiss:
|
|
229
|
+
onDismiss: v
|
|
230
230
|
}, {
|
|
231
|
-
default:
|
|
232
|
-
|
|
233
|
-
class: x(["t-alert", { pop:
|
|
231
|
+
default: P(() => [
|
|
232
|
+
$("div", {
|
|
233
|
+
class: x(["t-alert", { pop: d.value }]),
|
|
234
234
|
ref_key: "container",
|
|
235
|
-
ref:
|
|
235
|
+
ref: c
|
|
236
236
|
}, [
|
|
237
|
-
|
|
238
|
-
e.title ? (
|
|
237
|
+
h(l.$slots, "header", {}, () => [
|
|
238
|
+
e.title ? (u(), _("div", ke, D(e.title), 1)) : B("", !0)
|
|
239
239
|
], !0),
|
|
240
|
-
|
|
241
|
-
|
|
240
|
+
h(l.$slots, "content", {}, () => [
|
|
241
|
+
$("div", $e, D(e.message), 1)
|
|
242
242
|
], !0),
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
(
|
|
246
|
-
color:
|
|
247
|
-
variant:
|
|
248
|
-
onClick: (
|
|
243
|
+
h(l.$slots, "footer", {}, () => [
|
|
244
|
+
$("div", Te, [
|
|
245
|
+
(u(!0), _(V, null, U(e.actions, (g) => (u(), C(G, {
|
|
246
|
+
color: g.color,
|
|
247
|
+
variant: g.variant,
|
|
248
|
+
onClick: (m) => f(g)
|
|
249
249
|
}, {
|
|
250
|
-
default:
|
|
251
|
-
|
|
250
|
+
default: P(() => [
|
|
251
|
+
O(D(g.text), 1)
|
|
252
252
|
]),
|
|
253
253
|
_: 2
|
|
254
254
|
}, 1032, ["color", "variant", "onClick"]))), 256))
|
|
@@ -259,27 +259,27 @@ const _e = /* @__PURE__ */ g(fe, [["render", ve]]), ye = /* @__PURE__ */ T({
|
|
|
259
259
|
_: 3
|
|
260
260
|
}, 8, ["visible"]));
|
|
261
261
|
}
|
|
262
|
-
}), ne = /* @__PURE__ */
|
|
262
|
+
}), ne = /* @__PURE__ */ b(we, [["__scopeId", "data-v-5cf415ec"]]), Yt = (t = {}) => ({
|
|
263
263
|
open() {
|
|
264
264
|
return new Promise((n) => {
|
|
265
265
|
let o = document.body.querySelector(".t-app");
|
|
266
266
|
if (!o) return;
|
|
267
267
|
const e = document.createElement("div"), s = y();
|
|
268
268
|
o.appendChild(e);
|
|
269
|
-
const
|
|
269
|
+
const r = j({
|
|
270
270
|
render() {
|
|
271
|
-
return
|
|
271
|
+
return F(ne, {
|
|
272
272
|
...t,
|
|
273
273
|
ref: s,
|
|
274
|
-
onDismiss: (
|
|
274
|
+
onDismiss: (c, i) => {
|
|
275
275
|
setTimeout(() => {
|
|
276
|
-
|
|
277
|
-
}, 300), n(
|
|
276
|
+
r.unmount(), e.remove();
|
|
277
|
+
}, 300), n(i);
|
|
278
278
|
}
|
|
279
279
|
});
|
|
280
280
|
}
|
|
281
281
|
});
|
|
282
|
-
|
|
282
|
+
r.mount(e), setTimeout(() => {
|
|
283
283
|
s.value?.open?.();
|
|
284
284
|
}, 50);
|
|
285
285
|
});
|
|
@@ -292,50 +292,50 @@ const _e = /* @__PURE__ */ g(fe, [["render", ve]]), ye = /* @__PURE__ */ T({
|
|
|
292
292
|
},
|
|
293
293
|
emits: ["dismiss"],
|
|
294
294
|
setup(t, { expose: n, emit: o }) {
|
|
295
|
-
const e = t, s = y(!1),
|
|
296
|
-
let
|
|
297
|
-
const
|
|
295
|
+
const e = t, s = y(!1), r = o, c = y();
|
|
296
|
+
let i;
|
|
297
|
+
const d = y(!1), p = () => {
|
|
298
298
|
s.value = !0;
|
|
299
|
-
},
|
|
300
|
-
s.value = !1,
|
|
301
|
-
},
|
|
302
|
-
e.dismiss && e.dismiss.includes(
|
|
303
|
-
|
|
299
|
+
}, f = (l) => {
|
|
300
|
+
s.value = !1, l.handler && l.handler(), r("dismiss", "choose", l?.data);
|
|
301
|
+
}, v = (l) => {
|
|
302
|
+
e.dismiss && e.dismiss.includes(l) ? (s.value = !1, r("dismiss", l)) : l == "backdrop" && (d.value = !0, setTimeout(() => {
|
|
303
|
+
d.value = !1;
|
|
304
304
|
}, 300));
|
|
305
305
|
};
|
|
306
306
|
return n({
|
|
307
|
-
open:
|
|
308
|
-
}),
|
|
309
|
-
|
|
310
|
-
beforeEvent(
|
|
311
|
-
return
|
|
307
|
+
open: p
|
|
308
|
+
}), A(() => c.value, (l) => {
|
|
309
|
+
l && (i = L(c.value, {
|
|
310
|
+
beforeEvent(a) {
|
|
311
|
+
return a.stopPropagation(), q(a.target) || (a.preventDefault(), X()), !1;
|
|
312
312
|
}
|
|
313
313
|
}));
|
|
314
|
-
}),
|
|
315
|
-
|
|
316
|
-
}), (
|
|
314
|
+
}), N(() => {
|
|
315
|
+
i && i.destroy();
|
|
316
|
+
}), (l, a) => (u(), C(W, {
|
|
317
317
|
placement: "bottom",
|
|
318
318
|
backdrop: !0,
|
|
319
319
|
keepalive: !1,
|
|
320
320
|
visible: s.value,
|
|
321
|
-
onDismiss:
|
|
321
|
+
onDismiss: v
|
|
322
322
|
}, {
|
|
323
|
-
default:
|
|
324
|
-
|
|
325
|
-
class: x(["t-action", { pop:
|
|
323
|
+
default: P(() => [
|
|
324
|
+
$("div", {
|
|
325
|
+
class: x(["t-action", { pop: d.value }]),
|
|
326
326
|
ref_key: "container",
|
|
327
|
-
ref:
|
|
327
|
+
ref: c
|
|
328
328
|
}, [
|
|
329
|
-
(
|
|
330
|
-
(
|
|
331
|
-
color:
|
|
332
|
-
size:
|
|
333
|
-
variant:
|
|
334
|
-
onClick: (
|
|
329
|
+
(u(!0), _(V, null, U(e.actions, (g) => (u(), _("div", null, [
|
|
330
|
+
(u(!0), _(V, null, U(g, (m) => (u(), C(G, {
|
|
331
|
+
color: m.color,
|
|
332
|
+
size: m.size,
|
|
333
|
+
variant: m.variant,
|
|
334
|
+
onClick: (I) => f(m),
|
|
335
335
|
block: ""
|
|
336
336
|
}, {
|
|
337
|
-
default:
|
|
338
|
-
|
|
337
|
+
default: P(() => [
|
|
338
|
+
O(D(m.text), 1)
|
|
339
339
|
]),
|
|
340
340
|
_: 2
|
|
341
341
|
}, 1032, ["color", "size", "variant", "onClick"]))), 256))
|
|
@@ -345,27 +345,27 @@ const _e = /* @__PURE__ */ g(fe, [["render", ve]]), ye = /* @__PURE__ */ T({
|
|
|
345
345
|
_: 1
|
|
346
346
|
}, 8, ["visible"]));
|
|
347
347
|
}
|
|
348
|
-
}), Ie = /* @__PURE__ */
|
|
348
|
+
}), Ie = /* @__PURE__ */ b(xe, [["__scopeId", "data-v-73339adc"]]), Ht = (t = {}) => ({
|
|
349
349
|
open() {
|
|
350
350
|
return new Promise((n) => {
|
|
351
351
|
let o = document.body.querySelector(".t-app");
|
|
352
352
|
if (!o) return;
|
|
353
353
|
const e = document.createElement("div"), s = y();
|
|
354
354
|
o.appendChild(e);
|
|
355
|
-
const
|
|
355
|
+
const r = j({
|
|
356
356
|
render() {
|
|
357
|
-
return
|
|
357
|
+
return F(Ie, {
|
|
358
358
|
...t,
|
|
359
359
|
ref: s,
|
|
360
|
-
onDismiss: (
|
|
360
|
+
onDismiss: (c, i) => {
|
|
361
361
|
setTimeout(() => {
|
|
362
|
-
|
|
363
|
-
}, 300), n(
|
|
362
|
+
r.unmount(), e.remove();
|
|
363
|
+
}, 300), n(i);
|
|
364
364
|
}
|
|
365
365
|
});
|
|
366
366
|
}
|
|
367
367
|
});
|
|
368
|
-
|
|
368
|
+
r.mount(e), setTimeout(() => {
|
|
369
369
|
s.value?.open?.();
|
|
370
370
|
}, 50);
|
|
371
371
|
});
|
|
@@ -377,8 +377,8 @@ const _e = /* @__PURE__ */ g(fe, [["render", ve]]), ye = /* @__PURE__ */ T({
|
|
|
377
377
|
},
|
|
378
378
|
emits: ["dismiss"],
|
|
379
379
|
setup(t, { expose: n, emit: o }) {
|
|
380
|
-
const e = t, s = y(!1),
|
|
381
|
-
let
|
|
380
|
+
const e = t, s = y(!1), r = y();
|
|
381
|
+
let c;
|
|
382
382
|
return n({
|
|
383
383
|
open: () => {
|
|
384
384
|
s.value = !0;
|
|
@@ -386,27 +386,27 @@ const _e = /* @__PURE__ */ g(fe, [["render", ve]]), ye = /* @__PURE__ */ T({
|
|
|
386
386
|
close: () => {
|
|
387
387
|
s.value = !1;
|
|
388
388
|
}
|
|
389
|
-
}),
|
|
390
|
-
|
|
391
|
-
beforeEvent(
|
|
392
|
-
return
|
|
389
|
+
}), A(() => r.value, (p) => {
|
|
390
|
+
p && (c = L(r.value, {
|
|
391
|
+
beforeEvent(f) {
|
|
392
|
+
return f.stopPropagation(), q(f.target) || (f.preventDefault(), X()), !1;
|
|
393
393
|
}
|
|
394
394
|
}));
|
|
395
|
-
}),
|
|
396
|
-
|
|
397
|
-
}), (
|
|
395
|
+
}), N(() => {
|
|
396
|
+
c && c.destroy();
|
|
397
|
+
}), (p, f) => (u(), C(W, {
|
|
398
398
|
placement: "center",
|
|
399
399
|
backdrop: !0,
|
|
400
400
|
keepalive: !1,
|
|
401
401
|
visible: s.value
|
|
402
402
|
}, {
|
|
403
|
-
default:
|
|
404
|
-
|
|
403
|
+
default: P(() => [
|
|
404
|
+
$("div", {
|
|
405
405
|
class: "t-loading",
|
|
406
406
|
ref_key: "container",
|
|
407
|
-
ref:
|
|
407
|
+
ref: r
|
|
408
408
|
}, [
|
|
409
|
-
|
|
409
|
+
h(p.$slots, "default", {}, () => [
|
|
410
410
|
M(Q, {
|
|
411
411
|
type: e.type
|
|
412
412
|
}, null, 8, ["type"])
|
|
@@ -416,28 +416,28 @@ const _e = /* @__PURE__ */ g(fe, [["render", ve]]), ye = /* @__PURE__ */ T({
|
|
|
416
416
|
_: 3
|
|
417
417
|
}, 8, ["visible"]));
|
|
418
418
|
}
|
|
419
|
-
}), ze = /* @__PURE__ */
|
|
419
|
+
}), ze = /* @__PURE__ */ b(Se, [["__scopeId", "data-v-d048a41d"]]), Ut = (t = {}) => {
|
|
420
420
|
const n = y(), o = document.body.querySelector(".t-app");
|
|
421
421
|
let e = null, s = null;
|
|
422
422
|
return {
|
|
423
423
|
open() {
|
|
424
|
-
return new Promise((
|
|
425
|
-
o && (s = document.createElement("div"), o.appendChild(s), e =
|
|
424
|
+
return new Promise((r) => {
|
|
425
|
+
o && (s = document.createElement("div"), o.appendChild(s), e = j({
|
|
426
426
|
render() {
|
|
427
|
-
return
|
|
427
|
+
return F(ze, {
|
|
428
428
|
...t,
|
|
429
429
|
ref: n
|
|
430
430
|
});
|
|
431
431
|
}
|
|
432
432
|
}), e.mount(s), setTimeout(() => {
|
|
433
|
-
n.value?.open?.(),
|
|
433
|
+
n.value?.open?.(), r(!0);
|
|
434
434
|
}, 50));
|
|
435
435
|
});
|
|
436
436
|
},
|
|
437
437
|
close() {
|
|
438
|
-
return new Promise((
|
|
438
|
+
return new Promise((r) => {
|
|
439
439
|
n.value?.close?.(), setTimeout(() => {
|
|
440
|
-
e?.unmount?.(), s?.remove?.(),
|
|
440
|
+
e?.unmount?.(), s?.remove?.(), r(!0);
|
|
441
441
|
}, 300);
|
|
442
442
|
});
|
|
443
443
|
}
|
|
@@ -446,21 +446,24 @@ const _e = /* @__PURE__ */ g(fe, [["render", ve]]), ye = /* @__PURE__ */ T({
|
|
|
446
446
|
getNewIndex() {
|
|
447
447
|
return Z.value += 2, Z.value;
|
|
448
448
|
}
|
|
449
|
-
},
|
|
450
|
-
|
|
449
|
+
}, z = te([]), Ce = (t) => {
|
|
450
|
+
z.push(t);
|
|
451
451
|
}, Ee = (t) => {
|
|
452
|
-
t ||
|
|
453
|
-
},
|
|
454
|
-
|
|
452
|
+
t || z.pop();
|
|
453
|
+
}, Pe = () => {
|
|
454
|
+
z.splice(0, z.length);
|
|
455
|
+
}, k = {
|
|
456
|
+
screens: z,
|
|
455
457
|
addScreen: Ce,
|
|
456
458
|
removeScreen: Ee,
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
459
|
+
removeAllScreen: Pe,
|
|
460
|
+
hasPrevious: S(() => z.length > 1),
|
|
461
|
+
currentScreen: S(() => z[z.length - 1]),
|
|
462
|
+
lastScreen: S(() => {
|
|
463
|
+
if (!(z.length < 2))
|
|
464
|
+
return z[z.length - 2];
|
|
462
465
|
})
|
|
463
|
-
},
|
|
466
|
+
}, De = /* @__PURE__ */ T({
|
|
464
467
|
__name: "t-toast",
|
|
465
468
|
props: {
|
|
466
469
|
message: {},
|
|
@@ -472,73 +475,73 @@ const _e = /* @__PURE__ */ g(fe, [["render", ve]]), ye = /* @__PURE__ */ T({
|
|
|
472
475
|
},
|
|
473
476
|
emits: ["dismiss"],
|
|
474
477
|
setup(t, { expose: n, emit: o }) {
|
|
475
|
-
const e = t, s = o,
|
|
476
|
-
|
|
477
|
-
|
|
478
|
+
const e = t, s = o, r = y(!1), c = y(!1), i = y(!1), d = () => {
|
|
479
|
+
c.value = !0, i.value = !1, setTimeout(() => {
|
|
480
|
+
r.value = !0;
|
|
478
481
|
}, 10), setTimeout(() => {
|
|
479
|
-
|
|
482
|
+
p();
|
|
480
483
|
}, e.duration + 10);
|
|
481
|
-
},
|
|
482
|
-
|
|
483
|
-
|
|
484
|
+
}, p = () => {
|
|
485
|
+
i.value = !0, setTimeout(() => {
|
|
486
|
+
c.value = !1, r.value = !1, s("dismiss");
|
|
484
487
|
}, 300);
|
|
485
|
-
},
|
|
486
|
-
let
|
|
487
|
-
return e.variant == "default" && (e.color ? ["warning", "info", "danger", "primary", "secondary", "success"].includes(e.color) ?
|
|
488
|
+
}, f = S(() => {
|
|
489
|
+
let v;
|
|
490
|
+
return e.variant == "default" && (e.color ? ["warning", "info", "danger", "primary", "secondary", "success"].includes(e.color) ? v = {
|
|
488
491
|
"--border": "none",
|
|
489
492
|
"--color": "var(--t-color-status-" + e.color + "-text)",
|
|
490
493
|
"--background": "rgba(var(--t-color-status-" + e.color + "-rgb), 0.6)"
|
|
491
|
-
} :
|
|
494
|
+
} : v = {
|
|
492
495
|
"--border": "none",
|
|
493
496
|
"--color": "var(--t-color-text)",
|
|
494
497
|
"--background": e.color
|
|
495
|
-
} :
|
|
498
|
+
} : v = {
|
|
496
499
|
"--border": "none",
|
|
497
500
|
"--color": "var(--t-color-text)",
|
|
498
501
|
"--background": "rgba(var(--t-color-surface-rgb), 0.6)"
|
|
499
|
-
}), e.variant == "text" && (e.color ? ["warning", "info", "danger", "primary", "secondary", "success"].includes(e.color) ?
|
|
502
|
+
}), e.variant == "text" && (e.color ? ["warning", "info", "danger", "primary", "secondary", "success"].includes(e.color) ? v = {
|
|
500
503
|
"--border": "none",
|
|
501
504
|
"--color": "var(--t-color-status-" + e.color + ")",
|
|
502
505
|
"--background": "transparent"
|
|
503
|
-
} :
|
|
506
|
+
} : v = {
|
|
504
507
|
"--border": "none",
|
|
505
508
|
"--color": e.color,
|
|
506
509
|
"--background": "transparent"
|
|
507
|
-
} :
|
|
510
|
+
} : v = {
|
|
508
511
|
"--border": "none",
|
|
509
512
|
"--color": "var(--t-color-text)",
|
|
510
513
|
"--background": "transparent"
|
|
511
|
-
}), e.variant == "outline" && (e.color ? ["warning", "info", "danger", "primary", "secondary", "success"].includes(e.color) ?
|
|
514
|
+
}), e.variant == "outline" && (e.color ? ["warning", "info", "danger", "primary", "secondary", "success"].includes(e.color) ? v = {
|
|
512
515
|
"--border": "0.55px solid var(--t-color-status-" + e.color + ")",
|
|
513
516
|
"--color": "var(--t-color-status-" + e.color + ")",
|
|
514
517
|
"--background": "transparent"
|
|
515
|
-
} :
|
|
518
|
+
} : v = {
|
|
516
519
|
"--border": "0.55px solid " + e.color,
|
|
517
520
|
"--color": e.color,
|
|
518
521
|
"--background": "transparent"
|
|
519
|
-
} :
|
|
522
|
+
} : v = {
|
|
520
523
|
"--border": "0.55px solid var(--t-color-text)",
|
|
521
524
|
"--color": "var(--t-color-text)",
|
|
522
525
|
"--background": "transparent"
|
|
523
|
-
}),
|
|
526
|
+
}), v;
|
|
524
527
|
});
|
|
525
528
|
return n({
|
|
526
|
-
open:
|
|
527
|
-
}), (
|
|
529
|
+
open: d
|
|
530
|
+
}), (v, l) => c.value ? (u(), _("div", {
|
|
528
531
|
key: 0,
|
|
529
|
-
class: x(["t-toast", { [e.placement]: !0, open:
|
|
530
|
-
style: w({ "--space": e.space, ...
|
|
531
|
-
}, D(e.message), 7)) :
|
|
532
|
+
class: x(["t-toast", { [e.placement]: !0, open: r.value, closing: i.value }]),
|
|
533
|
+
style: w({ "--space": e.space, ...f.value })
|
|
534
|
+
}, D(e.message), 7)) : B("", !0);
|
|
532
535
|
}
|
|
533
|
-
}), se = /* @__PURE__ */
|
|
536
|
+
}), se = /* @__PURE__ */ b(De, [["__scopeId", "data-v-98e8be37"]]), jt = (t = {}) => ({
|
|
534
537
|
open() {
|
|
535
538
|
let n = document.body.querySelector(".t-app");
|
|
536
539
|
if (!n) return;
|
|
537
540
|
const o = document.createElement("div"), e = y();
|
|
538
541
|
n.appendChild(o);
|
|
539
|
-
const s =
|
|
542
|
+
const s = j({
|
|
540
543
|
render() {
|
|
541
|
-
return
|
|
544
|
+
return F(se, {
|
|
542
545
|
...t,
|
|
543
546
|
ref: e,
|
|
544
547
|
onDismiss: () => {
|
|
@@ -553,10 +556,10 @@ const _e = /* @__PURE__ */ g(fe, [["render", ve]]), ye = /* @__PURE__ */ T({
|
|
|
553
556
|
e.value?.open?.();
|
|
554
557
|
}, 50);
|
|
555
558
|
}
|
|
556
|
-
}),
|
|
557
|
-
function
|
|
559
|
+
}), Re = y(0);
|
|
560
|
+
function Ae() {
|
|
558
561
|
return {
|
|
559
|
-
height:
|
|
562
|
+
height: Re
|
|
560
563
|
};
|
|
561
564
|
}
|
|
562
565
|
const Ve = /* @__PURE__ */ T({
|
|
@@ -566,21 +569,21 @@ const Ve = /* @__PURE__ */ T({
|
|
|
566
569
|
placement: { default: "bottom" }
|
|
567
570
|
},
|
|
568
571
|
setup(t) {
|
|
569
|
-
const n = t, { height: o } =
|
|
570
|
-
return (e, s) => (
|
|
571
|
-
class: x(["t-cable", { keyboard: n.keyboard &&
|
|
572
|
-
style: w({ "--t-keyboard-height":
|
|
572
|
+
const n = t, { height: o } = Ae();
|
|
573
|
+
return (e, s) => (u(), _("div", {
|
|
574
|
+
class: x(["t-cable", { keyboard: n.keyboard && E(o) > 0, [n.placement]: !0 }]),
|
|
575
|
+
style: w({ "--t-keyboard-height": E(o) + "px", "--t-keyboard-transition": E(o) > 0 ? "0.3s" : "0.1s" })
|
|
573
576
|
}, [
|
|
574
|
-
|
|
577
|
+
h(e.$slots, "default", {}, void 0, !0)
|
|
575
578
|
], 6));
|
|
576
579
|
}
|
|
577
|
-
}),
|
|
580
|
+
}), Ne = /* @__PURE__ */ b(Ve, [["__scopeId", "data-v-ecb72421"]]), Le = /* @__PURE__ */ T({
|
|
578
581
|
__name: "t-card",
|
|
579
582
|
props: {
|
|
580
583
|
color: { default: null }
|
|
581
584
|
},
|
|
582
585
|
setup(t) {
|
|
583
|
-
const n = t, o =
|
|
586
|
+
const n = t, o = S(() => {
|
|
584
587
|
let e;
|
|
585
588
|
return n.color ? ["warning", "info", "danger", "primary", "secondary", "success"].includes(n.color) ? e = {
|
|
586
589
|
"--background": "var(--t-color-status-" + n.color + ")"
|
|
@@ -590,156 +593,159 @@ const Ve = /* @__PURE__ */ T({
|
|
|
590
593
|
"--background": "var(--t-color-surface)"
|
|
591
594
|
}, e;
|
|
592
595
|
});
|
|
593
|
-
return (e, s) => (
|
|
596
|
+
return (e, s) => (u(), _("div", {
|
|
594
597
|
class: "t-card",
|
|
595
598
|
style: w(o.value)
|
|
596
599
|
}, [
|
|
597
|
-
|
|
600
|
+
h(e.$slots, "default")
|
|
598
601
|
], 4));
|
|
599
602
|
}
|
|
600
|
-
}),
|
|
601
|
-
function
|
|
602
|
-
return
|
|
603
|
-
|
|
603
|
+
}), Oe = {}, qe = { class: "t-content" };
|
|
604
|
+
function Xe(t, n) {
|
|
605
|
+
return u(), _("div", qe, [
|
|
606
|
+
h(t.$slots, "default", {}, void 0, !0)
|
|
604
607
|
]);
|
|
605
608
|
}
|
|
606
|
-
const
|
|
609
|
+
const We = /* @__PURE__ */ b(Oe, [["render", Xe], ["__scopeId", "data-v-9a833657"]]), ee = 80, Ye = /* @__PURE__ */ T({
|
|
607
610
|
__name: "t-refresher",
|
|
608
611
|
emits: ["refresh"],
|
|
609
612
|
setup(t, { emit: n }) {
|
|
610
|
-
const o = n, e = y(0), s = y(!1),
|
|
611
|
-
let
|
|
612
|
-
const
|
|
613
|
-
s.value = !1, e.value = 0,
|
|
614
|
-
|
|
613
|
+
const o = n, e = y(0), s = y(!1), r = y();
|
|
614
|
+
let c, i = !1;
|
|
615
|
+
const d = () => {
|
|
616
|
+
s.value = !1, e.value = 0, c && c.cancel(), setTimeout(() => {
|
|
617
|
+
i = !1;
|
|
615
618
|
}, 2e3);
|
|
616
|
-
},
|
|
617
|
-
|
|
619
|
+
}, p = () => {
|
|
620
|
+
i = !0, s.value = !0, e.value = ee, o("refresh", d);
|
|
618
621
|
};
|
|
619
|
-
return
|
|
620
|
-
|
|
621
|
-
let
|
|
622
|
-
|
|
622
|
+
return A(() => r.value, () => {
|
|
623
|
+
c && c.destroy();
|
|
624
|
+
let f = r.value.closest(".t-content");
|
|
625
|
+
f && (c = L(f, {
|
|
623
626
|
options: {
|
|
624
627
|
minDist: 60
|
|
625
628
|
},
|
|
626
|
-
move({ dy:
|
|
627
|
-
s.value ||
|
|
629
|
+
move({ dy: v, e: l }) {
|
|
630
|
+
s.value || i || v < 0 || (v > 5 && f.scrollTop == 0 && (l.preventDefault(), f.classList.add("scroll-hidden")), v >= 120 ? p() : v > 10 && (e.value = v));
|
|
628
631
|
},
|
|
629
|
-
up({ dy:
|
|
630
|
-
|
|
632
|
+
up({ dy: v, e: l }) {
|
|
633
|
+
f.classList.remove("scroll-hidden"), !(s.value || i) && (v > ee ? p() : e.value = 0);
|
|
631
634
|
},
|
|
632
635
|
cancel() {
|
|
633
|
-
|
|
636
|
+
f.classList.remove("scroll-hidden"), !(s.value || i) && (s.value = !1, e.value = 0);
|
|
634
637
|
}
|
|
635
638
|
}, {
|
|
636
639
|
passive: !1
|
|
637
640
|
}));
|
|
638
|
-
}),
|
|
639
|
-
|
|
640
|
-
}), (
|
|
641
|
+
}), N(() => {
|
|
642
|
+
c && c.destroy();
|
|
643
|
+
}), (f, v) => Y((u(), _("div", {
|
|
641
644
|
class: "t-refresher",
|
|
642
645
|
ref_key: "container",
|
|
643
|
-
ref:
|
|
646
|
+
ref: r,
|
|
644
647
|
style: w({ height: `${e.value}px` })
|
|
645
648
|
}, [
|
|
646
|
-
|
|
649
|
+
$("img", {
|
|
647
650
|
class: x({ spiner: s.value }),
|
|
648
651
|
src: "https://static.toikit.com/toikit/home_2.png?v=3",
|
|
649
652
|
alt: "Loading...",
|
|
650
653
|
style: { width: "22px", height: "22px" }
|
|
651
654
|
}, null, 2)
|
|
652
655
|
], 4)), [
|
|
653
|
-
[
|
|
656
|
+
[H, e.value > 0]
|
|
654
657
|
]);
|
|
655
658
|
}
|
|
656
|
-
}),
|
|
657
|
-
function
|
|
658
|
-
return
|
|
659
|
-
|
|
659
|
+
}), He = /* @__PURE__ */ b(Ye, [["__scopeId", "data-v-ac2b2370"]]), Ue = {}, je = { class: "t-screen" };
|
|
660
|
+
function Fe(t, n) {
|
|
661
|
+
return u(), _("div", je, [
|
|
662
|
+
h(t.$slots, "default", {}, void 0, !0)
|
|
660
663
|
]);
|
|
661
664
|
}
|
|
662
|
-
const re = /* @__PURE__ */
|
|
665
|
+
const re = /* @__PURE__ */ b(Ue, [["render", Fe], ["__scopeId", "data-v-66ea8649"]]), Ge = /* @__PURE__ */ T({
|
|
663
666
|
__name: "t-swipe-screen",
|
|
664
667
|
emits: ["change"],
|
|
665
668
|
setup(t, { emit: n }) {
|
|
666
669
|
let o = {};
|
|
667
|
-
const e = oe(), s = de(),
|
|
668
|
-
for (let
|
|
669
|
-
o[
|
|
670
|
-
const
|
|
671
|
-
|
|
672
|
-
name:
|
|
670
|
+
const e = oe(), s = de(), r = e.getRoutes(), c = y(!1), i = n;
|
|
671
|
+
for (let a of r)
|
|
672
|
+
o[a.name] = a.components;
|
|
673
|
+
const d = (a) => {
|
|
674
|
+
a && k.addScreen({
|
|
675
|
+
name: a,
|
|
673
676
|
target: null,
|
|
674
|
-
component: ce(o[
|
|
677
|
+
component: ce(o[a] || null)
|
|
675
678
|
});
|
|
676
|
-
},
|
|
677
|
-
!
|
|
678
|
-
|
|
679
|
-
|
|
679
|
+
}, p = (a, g) => {
|
|
680
|
+
!g || k.screens[a].target || (k.screens[a].target = g.$el, a > 0 && (c.value = !0, g.$el.style.transform = "translateX(100vw)", g.$el.transitionOrigin = "center", document.documentElement.style.setProperty("--t-swipe-backdrop-opacity", "0"), setTimeout(() => {
|
|
681
|
+
g.$el.style.transition = "transform 0.35s ease", g.$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"), k.screens.length > 1 && (k.lastScreen.value.target.style.transitionOrigin = "left center", k.lastScreen.value.target.style.transition = "transform 0.35s ease", k.lastScreen.value.target.style.transform = "translateX(-30vw) scale(0.5) perspective(100vw) rotateY(30deg)"), setTimeout(() => {
|
|
682
|
+
i("change"), c.value = !1;
|
|
680
683
|
}, 400);
|
|
681
684
|
}, 100)));
|
|
682
|
-
},
|
|
683
|
-
|
|
684
|
-
|
|
685
|
+
}, f = () => {
|
|
686
|
+
k.currentScreen.value.target.style.transition = "transform 0.35s ease", k.currentScreen.value.target.style.transform = "translateX(100vw) scale(1)", k.lastScreen.value.target.style.transition = "transform 0.35s ease", k.lastScreen.value.target.style.transform = "translateX(0px) scale(1) perspective(100vw) rotateY(0deg)", document.documentElement.style.setProperty("--t-screen-backdrop-duration", "0.35s"), document.documentElement.style.setProperty("--t-swipe-backdrop-opacity", "0"), c.value = !0, setTimeout(() => {
|
|
687
|
+
k.removeScreen(), i("change"), c.value = !1;
|
|
685
688
|
}, 400);
|
|
686
689
|
};
|
|
687
|
-
|
|
688
|
-
|
|
690
|
+
d(s.name), A(() => s.name, (a, g) => {
|
|
691
|
+
a != k.currentScreen.value.name && (k.lastScreen.value?.name == a ? f() : d(a));
|
|
689
692
|
});
|
|
690
|
-
const
|
|
691
|
-
|
|
692
|
-
const
|
|
693
|
-
|
|
694
|
-
|
|
693
|
+
const v = () => {
|
|
694
|
+
c.value = !0;
|
|
695
|
+
const a = k.currentScreen.value.target, g = k.lastScreen.value.target;
|
|
696
|
+
a.style.transition = "transform 0.35s ease", a.style.transform = "translateX(0px)", g.style.transition = "transform 0.35s ease", g.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(() => {
|
|
697
|
+
c.value = !1;
|
|
695
698
|
}, 400);
|
|
696
699
|
};
|
|
700
|
+
let l;
|
|
697
701
|
return J(() => {
|
|
698
|
-
|
|
702
|
+
l = L(document, {
|
|
699
703
|
pointerId: null,
|
|
700
|
-
beforeEvent(
|
|
701
|
-
return
|
|
704
|
+
beforeEvent(a) {
|
|
705
|
+
return c.value || k.screens.length < 2 ? !1 : (a.type == "pointerdown" && !this.pointerId && (this.pointerId = a.pointerId), this.pointerId == a.pointerId);
|
|
702
706
|
},
|
|
703
|
-
afterEvent(
|
|
704
|
-
(
|
|
707
|
+
afterEvent(a) {
|
|
708
|
+
(a.type == "pointerup" || a.type == "pointercancel") && (this.pointerId = null);
|
|
705
709
|
},
|
|
706
|
-
fast({ d:
|
|
707
|
-
|
|
710
|
+
fast({ d: a }) {
|
|
711
|
+
a == "right" && e.back();
|
|
708
712
|
},
|
|
709
|
-
move({ dx:
|
|
710
|
-
const
|
|
711
|
-
if (
|
|
712
|
-
|
|
713
|
+
move({ dx: a }) {
|
|
714
|
+
const g = window.innerWidth, m = a / g * 100, I = k.currentScreen.value.target, R = k.lastScreen?.value?.target;
|
|
715
|
+
if (a > 0 && a <= g) {
|
|
716
|
+
I.style.transition = "transform 0s ease", I.style.transform = `translateX(${a}px)`, R.style.transition = "transform 0s ease", document.documentElement.style.setProperty("--t-screen-backdrop-duration", "0s"), R.style.transform = `translateX(calc(-30vw + (30vw / 100 * ${m}))) scale(${0.5 + 0.5 / 100 * m}) perspective(100vw) rotateY(${30 - 30 / 100 * m}deg)`, document.documentElement.style.setProperty("--t-swipe-backdrop-opacity", `${0.5 - 0.5 / 100 * m}`);
|
|
713
717
|
return;
|
|
714
718
|
}
|
|
715
719
|
},
|
|
716
|
-
up({ dx:
|
|
717
|
-
const
|
|
718
|
-
|
|
720
|
+
up({ dx: a }) {
|
|
721
|
+
const g = window.innerWidth;
|
|
722
|
+
a / g * 100 >= 50 ? e.back() : v();
|
|
719
723
|
},
|
|
720
724
|
cancel() {
|
|
721
|
-
|
|
725
|
+
v();
|
|
722
726
|
}
|
|
723
727
|
});
|
|
724
|
-
}), (
|
|
725
|
-
|
|
728
|
+
}), N(() => {
|
|
729
|
+
l && l.destroy(), k.removeAllScreen();
|
|
730
|
+
}), (a, g) => (u(), _(V, null, [
|
|
731
|
+
(u(!0), _(V, null, U(E(k).screens, (m, I) => (u(), C(re, {
|
|
726
732
|
ref_for: !0,
|
|
727
|
-
ref: (
|
|
728
|
-
style: w({ zIndex:
|
|
729
|
-
key:
|
|
733
|
+
ref: (R) => p(I, R),
|
|
734
|
+
style: w({ zIndex: I + (I == E(k).screens.length - 1 ? 2 : 1) }),
|
|
735
|
+
key: I
|
|
730
736
|
}, {
|
|
731
|
-
default:
|
|
732
|
-
(
|
|
737
|
+
default: P(() => [
|
|
738
|
+
(u(), C(le(m.component.default)))
|
|
733
739
|
]),
|
|
734
740
|
_: 2
|
|
735
741
|
}, 1032, ["style"]))), 128)),
|
|
736
|
-
|
|
742
|
+
$("div", {
|
|
737
743
|
class: "t-swipe-backdrop",
|
|
738
|
-
style: w({ zIndex:
|
|
744
|
+
style: w({ zIndex: E(k).screens.length })
|
|
739
745
|
}, null, 4)
|
|
740
746
|
], 64));
|
|
741
747
|
}
|
|
742
|
-
}),
|
|
748
|
+
}), Ke = /* @__PURE__ */ b(Ge, [["__scopeId", "data-v-714c48c4"]]), Me = /* @__PURE__ */ T({
|
|
743
749
|
__name: "t-toolbar",
|
|
744
750
|
props: {
|
|
745
751
|
placement: { default: "bottom" },
|
|
@@ -747,66 +753,66 @@ const re = /* @__PURE__ */ g(He, [["render", je], ["__scopeId", "data-v-66ea8649
|
|
|
747
753
|
},
|
|
748
754
|
setup(t) {
|
|
749
755
|
const n = t;
|
|
750
|
-
return (o, e) => (
|
|
756
|
+
return (o, e) => (u(), _("div", {
|
|
751
757
|
class: x(["t-toolbar", { [n.placement]: !0 }]),
|
|
752
758
|
style: w({ "--t-size-toolbar": n.size })
|
|
753
759
|
}, [
|
|
754
|
-
|
|
755
|
-
|
|
760
|
+
$("div", null, [
|
|
761
|
+
h(o.$slots, "default", {}, void 0, !0)
|
|
756
762
|
])
|
|
757
763
|
], 6));
|
|
758
764
|
}
|
|
759
|
-
}),
|
|
765
|
+
}), Je = /* @__PURE__ */ b(Me, [["__scopeId", "data-v-3b3a7896"]]), Qe = /* @__PURE__ */ T({
|
|
760
766
|
__name: "t-back-button",
|
|
761
767
|
props: {
|
|
762
768
|
to: {}
|
|
763
769
|
},
|
|
764
770
|
setup(t) {
|
|
765
771
|
const n = oe(), o = t, e = () => {
|
|
766
|
-
|
|
772
|
+
k.hasPrevious.value ? n?.back?.() : o.to && n?.push?.(o.to);
|
|
767
773
|
};
|
|
768
|
-
return (s,
|
|
774
|
+
return (s, r) => s.to || E(k).hasPrevious ? (u(), _("button", {
|
|
769
775
|
key: 0,
|
|
770
776
|
class: "t-back-button",
|
|
771
777
|
onClick: e
|
|
772
778
|
}, [
|
|
773
|
-
|
|
774
|
-
|
|
779
|
+
h(s.$slots, "default", {}, () => [
|
|
780
|
+
r[0] || (r[0] = $("i", { class: "ri-arrow-left-s-line" }, null, -1))
|
|
775
781
|
], !0)
|
|
776
|
-
])) :
|
|
782
|
+
])) : B("", !0);
|
|
777
783
|
}
|
|
778
|
-
}),
|
|
784
|
+
}), Ze = /* @__PURE__ */ b(Qe, [["__scopeId", "data-v-ed626a3d"]]), et = /* @__PURE__ */ T({
|
|
779
785
|
__name: "t-text",
|
|
780
786
|
props: {
|
|
781
787
|
color: { default: "var(--t-color-text)" },
|
|
782
788
|
size: { default: "standard" }
|
|
783
789
|
},
|
|
784
790
|
setup(t) {
|
|
785
|
-
const n = t, o =
|
|
791
|
+
const n = t, o = S(() => {
|
|
786
792
|
let e, s = n.color;
|
|
787
793
|
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})`), {
|
|
788
794
|
"--color": s,
|
|
789
795
|
"--font-size": e
|
|
790
796
|
};
|
|
791
797
|
});
|
|
792
|
-
return (e, s) => (
|
|
798
|
+
return (e, s) => (u(), _("span", {
|
|
793
799
|
class: "t-text",
|
|
794
800
|
style: w(o.value)
|
|
795
801
|
}, [
|
|
796
|
-
|
|
802
|
+
h(e.$slots, "default", {}, void 0, !0)
|
|
797
803
|
], 4));
|
|
798
804
|
}
|
|
799
|
-
}), K = /* @__PURE__ */
|
|
805
|
+
}), K = /* @__PURE__ */ b(et, [["__scopeId", "data-v-f0f94f05"]]), tt = /* @__PURE__ */ T({
|
|
800
806
|
__name: "t-pull-signal",
|
|
801
807
|
props: {
|
|
802
808
|
placement: { default: "bottom" }
|
|
803
809
|
},
|
|
804
810
|
setup(t) {
|
|
805
|
-
return (n, o) => (
|
|
811
|
+
return (n, o) => (u(), _("div", {
|
|
806
812
|
class: x(["t-pull-bar", { [n.placement]: !0 }])
|
|
807
813
|
}, null, 2));
|
|
808
814
|
}
|
|
809
|
-
}), ae = /* @__PURE__ */
|
|
815
|
+
}), ae = /* @__PURE__ */ b(tt, [["__scopeId", "data-v-daa38c85"]]), ot = /* @__PURE__ */ T({
|
|
810
816
|
__name: "t-sheet",
|
|
811
817
|
props: {
|
|
812
818
|
background: { default: "var(--t-color-surface)" },
|
|
@@ -822,94 +828,94 @@ const re = /* @__PURE__ */ g(He, [["render", je], ["__scopeId", "data-v-66ea8649
|
|
|
822
828
|
},
|
|
823
829
|
emits: ["dismiss"],
|
|
824
830
|
setup(t, { emit: n }) {
|
|
825
|
-
const o = t, e = n, s = y(),
|
|
826
|
-
let
|
|
827
|
-
const
|
|
831
|
+
const o = t, e = n, s = y(), r = y(), c = y(!1);
|
|
832
|
+
let i = null;
|
|
833
|
+
const d = S(() => {
|
|
828
834
|
if (o.placement == "bottom") return "down";
|
|
829
835
|
if (o.placement == "top") return "up";
|
|
830
836
|
if (o.placement == "left") return "left";
|
|
831
837
|
if (o.placement == "right") return "right";
|
|
832
|
-
}),
|
|
833
|
-
e("dismiss",
|
|
834
|
-
},
|
|
835
|
-
|
|
836
|
-
|
|
838
|
+
}), p = (v) => {
|
|
839
|
+
e("dismiss", v);
|
|
840
|
+
}, f = () => {
|
|
841
|
+
c.value = !0, setTimeout(() => {
|
|
842
|
+
c.value = !1;
|
|
837
843
|
}, 300);
|
|
838
844
|
};
|
|
839
|
-
return
|
|
840
|
-
|
|
845
|
+
return A(() => s.value, (v) => {
|
|
846
|
+
v && (i = L(s.value, {
|
|
841
847
|
options: {
|
|
842
848
|
minDist: 30
|
|
843
849
|
},
|
|
844
850
|
pointerId: null,
|
|
845
|
-
beforeEvent(
|
|
846
|
-
let
|
|
847
|
-
return
|
|
851
|
+
beforeEvent(l) {
|
|
852
|
+
let a = !1, g = !1;
|
|
853
|
+
return c.value || !o.gesture || o.placement == "center" ? a = !0 : this.pointerId ? (a = !0, g = this.pointerId == l.pointerId) : l.type == "pointerdown" && (this.pointerId = l.pointerId, a = !0, g = !0), a && (l.stopPropagation(), q(l.target) || (l.preventDefault(), X())), g;
|
|
848
854
|
},
|
|
849
|
-
afterEvent(
|
|
850
|
-
(
|
|
855
|
+
afterEvent(l) {
|
|
856
|
+
(l.type == "pointerup" || l.type == "pointercancel") && (this.pointerId = null);
|
|
851
857
|
},
|
|
852
|
-
fast({ d:
|
|
853
|
-
|
|
858
|
+
fast({ d: l }) {
|
|
859
|
+
f(), l == d.value ? e("dismiss", "gesture") : r.value.open();
|
|
854
860
|
},
|
|
855
|
-
move({ dy:
|
|
856
|
-
if (
|
|
857
|
-
let
|
|
858
|
-
o.placement == "bottom" || o.placement == "top" ?
|
|
859
|
-
contentTransform:
|
|
861
|
+
move({ dy: l, dx: a, d: g }) {
|
|
862
|
+
if (g != d.value) return;
|
|
863
|
+
let m = 0;
|
|
864
|
+
o.placement == "bottom" || o.placement == "top" ? m = l : m = a, r.value.render({
|
|
865
|
+
contentTransform: m + "px",
|
|
860
866
|
transition: "0s"
|
|
861
867
|
});
|
|
862
868
|
},
|
|
863
|
-
up({ dy:
|
|
864
|
-
if (
|
|
865
|
-
|
|
869
|
+
up({ dy: l, dx: a, d: g }) {
|
|
870
|
+
if (f(), g != d.value) {
|
|
871
|
+
r.value.open();
|
|
866
872
|
return;
|
|
867
873
|
}
|
|
868
|
-
let
|
|
869
|
-
o.placement == "bottom" || o.placement == "top" ? (
|
|
874
|
+
let m, I, R;
|
|
875
|
+
o.placement == "bottom" || o.placement == "top" ? (m = s.value.offsetHeight, R = l) : (m = s.value.offsetWidth, R = a), I = R / m * 100, I > 50 ? e("dismiss", "gesture") : r.value.open();
|
|
870
876
|
},
|
|
871
877
|
cancel() {
|
|
872
|
-
|
|
878
|
+
f(), r.value.open();
|
|
873
879
|
}
|
|
874
880
|
}));
|
|
875
|
-
}),
|
|
876
|
-
|
|
877
|
-
}), (
|
|
881
|
+
}), N(() => {
|
|
882
|
+
i && i.destroy();
|
|
883
|
+
}), (v, l) => (u(), C(W, {
|
|
878
884
|
ref_key: "present",
|
|
879
|
-
ref:
|
|
885
|
+
ref: r,
|
|
880
886
|
placement: o.placement,
|
|
881
|
-
backdrop:
|
|
887
|
+
backdrop: v.backdrop,
|
|
882
888
|
visible: o.visible,
|
|
883
889
|
keepalive: o.keepalive,
|
|
884
|
-
onDismiss:
|
|
890
|
+
onDismiss: p
|
|
885
891
|
}, {
|
|
886
|
-
default:
|
|
887
|
-
o.gesture && o.placement != "center" ? (
|
|
892
|
+
default: P(() => [
|
|
893
|
+
o.gesture && o.placement != "center" ? (u(), C(ae, {
|
|
888
894
|
key: 0,
|
|
889
895
|
placement: o.placement
|
|
890
|
-
}, null, 8, ["placement"])) :
|
|
891
|
-
o.closeButton && o.placement == "center" ? (
|
|
896
|
+
}, null, 8, ["placement"])) : B("", !0),
|
|
897
|
+
o.closeButton && o.placement == "center" ? (u(), _("button", {
|
|
892
898
|
key: 1,
|
|
893
899
|
class: "t-sheet-close",
|
|
894
|
-
onClick:
|
|
900
|
+
onClick: l[0] || (l[0] = (a) => p("close-button"))
|
|
895
901
|
}, [
|
|
896
|
-
|
|
897
|
-
|
|
902
|
+
h(v.$slots, "close-icon", {}, () => [
|
|
903
|
+
l[1] || (l[1] = $("i", { class: "ri-close-large-line" }, null, -1))
|
|
898
904
|
], !0)
|
|
899
|
-
])) :
|
|
900
|
-
|
|
901
|
-
class: x(["t-sheet", { fullscreen: o.fullscreen, [o.placement]: !0, rounded:
|
|
905
|
+
])) : B("", !0),
|
|
906
|
+
$("div", {
|
|
907
|
+
class: x(["t-sheet", { fullscreen: o.fullscreen, [o.placement]: !0, rounded: v.rounded, radius: o.radius }]),
|
|
902
908
|
style: w({ "--background": o.background }),
|
|
903
909
|
ref_key: "sheet",
|
|
904
910
|
ref: s
|
|
905
911
|
}, [
|
|
906
|
-
|
|
912
|
+
h(v.$slots, "default", {}, void 0, !0)
|
|
907
913
|
], 6)
|
|
908
914
|
]),
|
|
909
915
|
_: 3
|
|
910
916
|
}, 8, ["placement", "backdrop", "visible", "keepalive"]));
|
|
911
917
|
}
|
|
912
|
-
}),
|
|
918
|
+
}), nt = /* @__PURE__ */ b(ot, [["__scopeId", "data-v-14b7fc93"]]), st = { class: "t-input-label" }, rt = { class: "t-input-content" }, at = ["type", "placeholder", "value"], lt = /* @__PURE__ */ T({
|
|
913
919
|
__name: "t-input",
|
|
914
920
|
props: {
|
|
915
921
|
size: { default: "standard" },
|
|
@@ -924,173 +930,173 @@ const re = /* @__PURE__ */ g(He, [["render", je], ["__scopeId", "data-v-66ea8649
|
|
|
924
930
|
},
|
|
925
931
|
emits: ["update:modelValue"],
|
|
926
932
|
setup(t, { emit: n }) {
|
|
927
|
-
const o = t, e = n, s = (
|
|
928
|
-
e("update:modelValue",
|
|
933
|
+
const o = t, e = n, s = (r) => {
|
|
934
|
+
e("update:modelValue", r.target.value);
|
|
929
935
|
};
|
|
930
|
-
return (
|
|
936
|
+
return (r, c) => (u(), _("div", {
|
|
931
937
|
class: x(["t-input", { rounded: o.rounded, ["size-" + o.size]: !0, ["variant-" + o.variant]: !0 }])
|
|
932
938
|
}, [
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
type:
|
|
939
|
-
placeholder:
|
|
940
|
-
value:
|
|
939
|
+
$("label", null, [
|
|
940
|
+
$("span", st, D(r.label), 1),
|
|
941
|
+
$("div", rt, [
|
|
942
|
+
h(r.$slots, "start", {}, void 0, !0),
|
|
943
|
+
$("input", {
|
|
944
|
+
type: r.type,
|
|
945
|
+
placeholder: r.placeholder,
|
|
946
|
+
value: r.modelValue,
|
|
941
947
|
onInput: s
|
|
942
|
-
}, null, 40,
|
|
943
|
-
|
|
948
|
+
}, null, 40, at),
|
|
949
|
+
h(r.$slots, "end", {}, void 0, !0)
|
|
944
950
|
])
|
|
945
951
|
]),
|
|
946
|
-
o.error ? (
|
|
952
|
+
o.error ? (u(), C(K, {
|
|
947
953
|
key: 0,
|
|
948
954
|
color: "danger"
|
|
949
955
|
}, {
|
|
950
|
-
default:
|
|
951
|
-
|
|
956
|
+
default: P(() => [
|
|
957
|
+
O(D(o.error), 1)
|
|
952
958
|
]),
|
|
953
959
|
_: 1
|
|
954
|
-
})) : o.help ? (
|
|
960
|
+
})) : o.help ? (u(), C(K, {
|
|
955
961
|
key: 1,
|
|
956
962
|
color: "secondary"
|
|
957
963
|
}, {
|
|
958
|
-
default:
|
|
959
|
-
|
|
964
|
+
default: P(() => [
|
|
965
|
+
O(D(o.help), 1)
|
|
960
966
|
]),
|
|
961
967
|
_: 1
|
|
962
|
-
})) :
|
|
968
|
+
})) : B("", !0)
|
|
963
969
|
], 2));
|
|
964
970
|
}
|
|
965
|
-
}),
|
|
966
|
-
function
|
|
967
|
-
return
|
|
971
|
+
}), ct = /* @__PURE__ */ b(lt, [["__scopeId", "data-v-1a9425cf"]]), it = {};
|
|
972
|
+
function ut(t, n) {
|
|
973
|
+
return u(), _("textarea");
|
|
968
974
|
}
|
|
969
|
-
const
|
|
970
|
-
function
|
|
971
|
-
return
|
|
975
|
+
const dt = /* @__PURE__ */ b(it, [["render", ut]]), pt = {};
|
|
976
|
+
function ft(t, n) {
|
|
977
|
+
return u(), _("div");
|
|
972
978
|
}
|
|
973
|
-
const
|
|
974
|
-
function
|
|
975
|
-
return
|
|
979
|
+
const mt = /* @__PURE__ */ b(pt, [["render", ft]]), vt = {}, _t = { class: "t-grid" };
|
|
980
|
+
function yt(t, n) {
|
|
981
|
+
return u(), _("div", _t);
|
|
976
982
|
}
|
|
977
|
-
const
|
|
978
|
-
function
|
|
979
|
-
return
|
|
983
|
+
const gt = /* @__PURE__ */ b(vt, [["render", yt]]), bt = {}, ht = { class: "t-grid-item" };
|
|
984
|
+
function kt(t, n) {
|
|
985
|
+
return u(), _("div", ht);
|
|
980
986
|
}
|
|
981
|
-
const
|
|
987
|
+
const $t = /* @__PURE__ */ b(bt, [["render", kt]]), Tt = /* @__PURE__ */ T({
|
|
982
988
|
__name: "t-divider",
|
|
983
989
|
props: {
|
|
984
990
|
direction: { default: "horizontal" }
|
|
985
991
|
},
|
|
986
992
|
setup(t) {
|
|
987
993
|
const n = t;
|
|
988
|
-
return (o, e) => (
|
|
994
|
+
return (o, e) => (u(), _("div", {
|
|
989
995
|
class: x(["t-divider", { [n.direction]: !0 }])
|
|
990
996
|
}, null, 2));
|
|
991
997
|
}
|
|
992
|
-
}),
|
|
998
|
+
}), wt = /* @__PURE__ */ b(Tt, [["__scopeId", "data-v-47ee8991"]]), xt = /* @__PURE__ */ T({
|
|
993
999
|
__name: "t-toggle-password",
|
|
994
1000
|
props: {
|
|
995
1001
|
color: { default: "warning" }
|
|
996
1002
|
},
|
|
997
1003
|
emits: ["change"],
|
|
998
1004
|
setup(t, { emit: n }) {
|
|
999
|
-
const o = t, e = n, s = y(!1),
|
|
1000
|
-
let
|
|
1001
|
-
return ["warning", "info", "danger", "primary", "secondary", "success"].includes(o.color) && (
|
|
1002
|
-
"--color":
|
|
1005
|
+
const o = t, e = n, s = y(!1), r = y(), c = S(() => {
|
|
1006
|
+
let p = o.color;
|
|
1007
|
+
return ["warning", "info", "danger", "primary", "secondary", "success"].includes(o.color) && (p = `var(--t-color-status-${o.color})`), {
|
|
1008
|
+
"--color": p
|
|
1003
1009
|
};
|
|
1004
|
-
}),
|
|
1010
|
+
}), i = () => r.value?.parentElement?.querySelector?.("input");
|
|
1005
1011
|
J(() => {
|
|
1006
|
-
let
|
|
1007
|
-
|
|
1012
|
+
let p = i();
|
|
1013
|
+
p && (s.value = p.type != "password", e("change", s.value));
|
|
1008
1014
|
});
|
|
1009
|
-
const
|
|
1010
|
-
let
|
|
1011
|
-
|
|
1015
|
+
const d = () => {
|
|
1016
|
+
let p = i();
|
|
1017
|
+
p && (s.value = !s.value, s.value ? p.type = "text" : p.type = "password", e("change", s.value));
|
|
1012
1018
|
};
|
|
1013
|
-
return (
|
|
1019
|
+
return (p, f) => (u(), _("button", {
|
|
1014
1020
|
ref_key: "toggle",
|
|
1015
|
-
ref:
|
|
1021
|
+
ref: r,
|
|
1016
1022
|
class: "t-toggle-password",
|
|
1017
|
-
style: w(
|
|
1018
|
-
onClick:
|
|
1023
|
+
style: w(c.value),
|
|
1024
|
+
onClick: d
|
|
1019
1025
|
}, [
|
|
1020
|
-
s.value ?
|
|
1021
|
-
|
|
1022
|
-
], !0) :
|
|
1023
|
-
s.value ?
|
|
1024
|
-
|
|
1026
|
+
s.value ? h(p.$slots, "on", { key: 0 }, () => [
|
|
1027
|
+
f[0] || (f[0] = $("i", { class: "ri-eye-line" }, null, -1))
|
|
1028
|
+
], !0) : B("", !0),
|
|
1029
|
+
s.value ? B("", !0) : h(p.$slots, "off", { key: 1 }, () => [
|
|
1030
|
+
f[1] || (f[1] = $("i", { class: "ri-eye-off-line" }, null, -1))
|
|
1025
1031
|
], !0)
|
|
1026
1032
|
], 4));
|
|
1027
1033
|
}
|
|
1028
|
-
}),
|
|
1034
|
+
}), It = /* @__PURE__ */ b(xt, [["__scopeId", "data-v-3268e9e3"]]), St = /* @__PURE__ */ T({
|
|
1029
1035
|
__name: "t-avatar",
|
|
1030
1036
|
props: {
|
|
1031
1037
|
square: { type: Boolean, default: !1 },
|
|
1032
1038
|
size: { default: "standard" }
|
|
1033
1039
|
},
|
|
1034
1040
|
setup(t) {
|
|
1035
|
-
const n = t, o =
|
|
1036
|
-
return (e, s) => (
|
|
1041
|
+
const n = t, o = S(() => n.size == "small" ? "24px" : n.size == "standard" ? "40px" : n.size == "large" ? "60px" : n.size);
|
|
1042
|
+
return (e, s) => (u(), _("div", {
|
|
1037
1043
|
class: x(["t-avatar", { square: e.square }]),
|
|
1038
1044
|
style: w({ "--size": o.value })
|
|
1039
1045
|
}, [
|
|
1040
|
-
|
|
1046
|
+
h(e.$slots, "default", {}, void 0, !0)
|
|
1041
1047
|
], 6));
|
|
1042
1048
|
}
|
|
1043
|
-
}),
|
|
1049
|
+
}), zt = /* @__PURE__ */ b(St, [["__scopeId", "data-v-24384c2f"]]), Bt = { class: "t-collapse-title" }, Ct = {
|
|
1044
1050
|
key: 0,
|
|
1045
1051
|
class: "icon"
|
|
1046
|
-
},
|
|
1052
|
+
}, Et = {
|
|
1047
1053
|
key: 1,
|
|
1048
1054
|
class: "icon"
|
|
1049
|
-
},
|
|
1055
|
+
}, Pt = { class: "t-collapse-content" }, Dt = /* @__PURE__ */ T({
|
|
1050
1056
|
__name: "t-collapse",
|
|
1051
1057
|
props: {
|
|
1052
1058
|
title: {}
|
|
1053
1059
|
},
|
|
1054
1060
|
emits: ["change"],
|
|
1055
1061
|
setup(t, { emit: n }) {
|
|
1056
|
-
const o = t, e = n, s = y(!1),
|
|
1057
|
-
s.value = !s.value,
|
|
1062
|
+
const o = t, e = n, s = y(!1), r = y(""), c = y(), i = () => {
|
|
1063
|
+
s.value = !s.value, r.value = `calc(${c.value.offsetHeight}px + 2rem)`, e("change", s.value);
|
|
1058
1064
|
};
|
|
1059
|
-
return e("change", s.value), (
|
|
1065
|
+
return e("change", s.value), (d, p) => (u(), _("div", {
|
|
1060
1066
|
class: x(["t-collapse", { open: s.value }]),
|
|
1061
|
-
style: w({ "--height":
|
|
1067
|
+
style: w({ "--height": r.value })
|
|
1062
1068
|
}, [
|
|
1063
|
-
|
|
1069
|
+
$("div", {
|
|
1064
1070
|
class: "t-collapse-header",
|
|
1065
|
-
onClick:
|
|
1071
|
+
onClick: i
|
|
1066
1072
|
}, [
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1073
|
+
h(d.$slots, "icon"),
|
|
1074
|
+
$("div", Bt, [
|
|
1075
|
+
h(d.$slots, "title", {}, () => [
|
|
1076
|
+
O(D(o.title), 1)
|
|
1071
1077
|
])
|
|
1072
1078
|
]),
|
|
1073
|
-
|
|
1074
|
-
s.value ? (
|
|
1075
|
-
|
|
1076
|
-
])])) : (
|
|
1077
|
-
|
|
1079
|
+
h(d.$slots, "toggle", {}, () => [
|
|
1080
|
+
s.value ? (u(), _("div", Ct, [...p[0] || (p[0] = [
|
|
1081
|
+
$("i", { class: "ri-arrow-up-s-line" }, null, -1)
|
|
1082
|
+
])])) : (u(), _("div", Et, [...p[1] || (p[1] = [
|
|
1083
|
+
$("i", { class: "ri-arrow-down-s-line" }, null, -1)
|
|
1078
1084
|
])]))
|
|
1079
1085
|
])
|
|
1080
1086
|
]),
|
|
1081
|
-
|
|
1082
|
-
|
|
1087
|
+
$("div", Pt, [
|
|
1088
|
+
$("div", {
|
|
1083
1089
|
ref_key: "content",
|
|
1084
|
-
ref:
|
|
1090
|
+
ref: c
|
|
1085
1091
|
}, [
|
|
1086
|
-
|
|
1087
|
-
|
|
1092
|
+
h(d.$slots, "content", {}, () => [
|
|
1093
|
+
h(d.$slots, "default")
|
|
1088
1094
|
])
|
|
1089
1095
|
], 512)
|
|
1090
1096
|
])
|
|
1091
1097
|
], 6));
|
|
1092
1098
|
}
|
|
1093
|
-
}),
|
|
1099
|
+
}), Rt = /* @__PURE__ */ T({
|
|
1094
1100
|
__name: "t-switch",
|
|
1095
1101
|
props: {
|
|
1096
1102
|
modelValue: { type: Boolean },
|
|
@@ -1100,50 +1106,50 @@ const kt = /* @__PURE__ */ g(gt, [["render", ht]]), $t = /* @__PURE__ */ T({
|
|
|
1100
1106
|
setup(t, { emit: n }) {
|
|
1101
1107
|
const o = t, e = n, s = () => {
|
|
1102
1108
|
e("update:modelValue", !o.modelValue);
|
|
1103
|
-
},
|
|
1104
|
-
let
|
|
1109
|
+
}, r = S(() => {
|
|
1110
|
+
let c = {
|
|
1105
1111
|
"--background": o.color,
|
|
1106
1112
|
"--color": "#ffffff"
|
|
1107
1113
|
};
|
|
1108
|
-
return ["warning", "info", "danger", "primary", "secondary", "success"].includes(o.color) && (
|
|
1114
|
+
return ["warning", "info", "danger", "primary", "secondary", "success"].includes(o.color) && (c = {
|
|
1109
1115
|
"--background": `var(--t-color-status-${o.color})`,
|
|
1110
1116
|
"--color": `var(--t-color-status-${o.color}-text)`
|
|
1111
|
-
}),
|
|
1117
|
+
}), c;
|
|
1112
1118
|
});
|
|
1113
|
-
return (
|
|
1119
|
+
return (c, i) => (u(), _("div", {
|
|
1114
1120
|
class: x(["t-switch", { on: o.modelValue }]),
|
|
1115
|
-
style: w(
|
|
1121
|
+
style: w(r.value),
|
|
1116
1122
|
onClick: s
|
|
1117
|
-
}, [...
|
|
1118
|
-
|
|
1123
|
+
}, [...i[0] || (i[0] = [
|
|
1124
|
+
$("div", { class: "t-switch-icon" }, null, -1)
|
|
1119
1125
|
])], 6));
|
|
1120
1126
|
}
|
|
1121
|
-
}),
|
|
1127
|
+
}), At = /* @__PURE__ */ b(Rt, [["__scopeId", "data-v-3616970e"]]), Vt = /* @__PURE__ */ T({
|
|
1122
1128
|
__name: "t-tab",
|
|
1123
1129
|
props: {
|
|
1124
1130
|
value: {}
|
|
1125
1131
|
},
|
|
1126
1132
|
setup(t) {
|
|
1127
|
-
const n = t, o = ie("tabsState"), e =
|
|
1133
|
+
const n = t, o = ie("tabsState"), e = S(() => o.active.value === n.value), s = () => {
|
|
1128
1134
|
o.setActive(n.value);
|
|
1129
1135
|
};
|
|
1130
|
-
return (
|
|
1136
|
+
return (r, c) => (u(), _("li", {
|
|
1131
1137
|
class: x(["t-tab", { active: e.value }])
|
|
1132
1138
|
}, [
|
|
1133
|
-
M(
|
|
1139
|
+
M(G, {
|
|
1134
1140
|
variant: "text",
|
|
1135
1141
|
onClick: s,
|
|
1136
|
-
size:
|
|
1137
|
-
color: e.value &&
|
|
1142
|
+
size: E(o).size,
|
|
1143
|
+
color: e.value && E(o).variant == "text" ? E(o).color : void 0
|
|
1138
1144
|
}, {
|
|
1139
|
-
default:
|
|
1140
|
-
|
|
1145
|
+
default: P(() => [
|
|
1146
|
+
h(r.$slots, "default", {}, void 0, !0)
|
|
1141
1147
|
]),
|
|
1142
1148
|
_: 3
|
|
1143
1149
|
}, 8, ["size", "color"])
|
|
1144
1150
|
], 2));
|
|
1145
1151
|
}
|
|
1146
|
-
}),
|
|
1152
|
+
}), Nt = /* @__PURE__ */ b(Vt, [["__scopeId", "data-v-36c12a50"]]), Lt = /* @__PURE__ */ T({
|
|
1147
1153
|
__name: "t-tabs",
|
|
1148
1154
|
props: {
|
|
1149
1155
|
placement: { default: "top-start" },
|
|
@@ -1155,59 +1161,59 @@ const kt = /* @__PURE__ */ g(gt, [["render", ht]]), $t = /* @__PURE__ */ T({
|
|
|
1155
1161
|
},
|
|
1156
1162
|
emits: ["update:modelValue"],
|
|
1157
1163
|
setup(t, { emit: n }) {
|
|
1158
|
-
const o = t, e = n, s = y("0px"),
|
|
1159
|
-
let
|
|
1160
|
-
return ["warning", "info", "danger", "primary", "secondary", "success"].includes(
|
|
1161
|
-
}),
|
|
1164
|
+
const o = t, e = n, s = y("0px"), r = y(), c = S(() => {
|
|
1165
|
+
let d = o.color;
|
|
1166
|
+
return ["warning", "info", "danger", "primary", "secondary", "success"].includes(d) && (d = `var(--t-color-status-${d})`), d;
|
|
1167
|
+
}), i = () => {
|
|
1162
1168
|
setTimeout(() => {
|
|
1163
1169
|
if (o.placement.startsWith("top-") || o.placement.startsWith("bottom-")) {
|
|
1164
|
-
let
|
|
1165
|
-
if (
|
|
1166
|
-
let
|
|
1167
|
-
s.value =
|
|
1170
|
+
let d = r.value.querySelector(".active");
|
|
1171
|
+
if (d) {
|
|
1172
|
+
let p = d.getBoundingClientRect().left - r.value.getBoundingClientRect().left, f = d.offsetWidth / 2;
|
|
1173
|
+
s.value = p + f - o.border / 2 + "px";
|
|
1168
1174
|
}
|
|
1169
1175
|
} else if (o.placement.startsWith("left-") || o.placement.startsWith("right-")) {
|
|
1170
|
-
let
|
|
1171
|
-
if (
|
|
1172
|
-
let
|
|
1173
|
-
s.value =
|
|
1176
|
+
let d = r.value.querySelector(".active");
|
|
1177
|
+
if (d) {
|
|
1178
|
+
let p = d.getBoundingClientRect().top - r.value.getBoundingClientRect().top, f = d.offsetHeight / 2;
|
|
1179
|
+
s.value = p + f - o.border / 2 + "px";
|
|
1174
1180
|
}
|
|
1175
1181
|
}
|
|
1176
1182
|
}, 50);
|
|
1177
1183
|
};
|
|
1178
1184
|
return ue("tabsState", {
|
|
1179
|
-
active:
|
|
1180
|
-
color:
|
|
1185
|
+
active: S(() => o.modelValue),
|
|
1186
|
+
color: c.value,
|
|
1181
1187
|
size: o.size,
|
|
1182
1188
|
variant: o.variant,
|
|
1183
|
-
setActive: (
|
|
1184
|
-
e("update:modelValue",
|
|
1189
|
+
setActive: (d) => {
|
|
1190
|
+
e("update:modelValue", d), i();
|
|
1185
1191
|
}
|
|
1186
1192
|
}), J(() => {
|
|
1187
|
-
|
|
1188
|
-
}), (
|
|
1193
|
+
i();
|
|
1194
|
+
}), (d, p) => (u(), _("ul", {
|
|
1189
1195
|
ref_key: "container",
|
|
1190
|
-
ref:
|
|
1191
|
-
class: x(["t-tabs", { [
|
|
1192
|
-
style: w({ "--color":
|
|
1196
|
+
ref: r,
|
|
1197
|
+
class: x(["t-tabs", { [d.placement]: !0, [d.variant]: !0 }]),
|
|
1198
|
+
style: w({ "--color": c.value, "--transform": s.value, "--border": d.border + "px" })
|
|
1193
1199
|
}, [
|
|
1194
|
-
|
|
1200
|
+
h(d.$slots, "default", {}, void 0, !0)
|
|
1195
1201
|
], 6));
|
|
1196
1202
|
}
|
|
1197
|
-
}),
|
|
1203
|
+
}), Ot = /* @__PURE__ */ b(Lt, [["__scopeId", "data-v-7954ab38"]]), Ft = () => ({
|
|
1198
1204
|
install: (t) => {
|
|
1199
|
-
pe(), t.component("t-app", _e), t.component("t-screen", re), t.component("t-swipe-screen",
|
|
1205
|
+
pe(), t.component("t-app", _e), t.component("t-screen", re), t.component("t-swipe-screen", Ke), t.component("t-cable", Ne), t.component("t-toolbar", Je), t.component("t-content", We), t.component("t-card", Le), t.component("t-refresher", He), t.component("t-button", G), t.component("t-back-button", Ze), t.component("t-present", W), t.component("t-text", K), t.component("t-sheet", nt), t.component("t-pull-signal", ae), t.component("t-input", ct), t.component("t-textarea", dt), t.component("t-rich-text", mt), t.component("t-grid", gt), t.component("t-grid-item", $t), t.component("t-divider", wt), t.component("t-toggle-password", It), t.component("t-loading-icon", Q), t.component("t-alert", ne), t.component("t-avatar", zt), t.component("t-collapse", Dt), t.component("t-toast", se), t.component("t-switch", At), t.component("t-tab", Nt), t.component("t-tabs", Ot);
|
|
1200
1206
|
}
|
|
1201
1207
|
});
|
|
1202
1208
|
export {
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1209
|
+
X as blurCurrentActive,
|
|
1210
|
+
Ht as createAction,
|
|
1211
|
+
Yt as createAlert,
|
|
1212
|
+
Ut as createLoading,
|
|
1213
|
+
jt as createToast,
|
|
1214
|
+
Ft as createToife,
|
|
1215
|
+
q as isFormElement,
|
|
1210
1216
|
Be as presentController,
|
|
1211
|
-
|
|
1212
|
-
|
|
1217
|
+
k as screenController,
|
|
1218
|
+
Ae as useKeyboard
|
|
1213
1219
|
};
|