@toife/vue 1.2.53 → 1.2.55
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/t-swipe-screen.vue.d.ts +0 -2
- package/dist/index.css +1 -1
- package/dist/index.es.js +366 -366
- package/dist/index.umd.js +1 -1
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { createElementBlock as d, openBlock as c, renderSlot as g, defineComponent as b, ref as
|
|
1
|
+
import { createElementBlock as d, openBlock as c, renderSlot as g, defineComponent as b, ref as m, computed as w, reactive as ce, watch as O, Fragment as X, withDirectives as W, createCommentVNode as E, normalizeStyle as k, normalizeClass as T, vShow as H, createElementVNode as h, createVNode as U, createBlock as C, withCtx as P, toDisplayString as R, renderList as G, createTextVNode as N, createApp as j, h as F, provide as ie, unref as V, onUnmounted as oe, onMounted as se, resolveDynamicComponent as be, markRaw as he, inject as ue, useAttrs as ke } from "vue";
|
|
2
2
|
import { gesture as ne } from "@toife/gesture";
|
|
3
|
-
import {
|
|
3
|
+
import { useRouter as de, useRoute as $e } from "vue-router";
|
|
4
4
|
const we = (e) => e && (e.tagName == "INPUT" || e.tagName == "TEXTAREA" || e.isContentEditable), xe = () => {
|
|
5
5
|
const e = document.activeElement;
|
|
6
6
|
e && (e.tagName === "INPUT" || e.tagName === "TEXTAREA" || e.isContentEditable) && e.blur();
|
|
@@ -8,7 +8,7 @@ const we = (e) => e && (e.tagName == "INPUT" || e.tagName == "TEXTAREA" || e.isC
|
|
|
8
8
|
document.addEventListener("contextmenu", (e) => e.preventDefault()), document.addEventListener("selectstart", (e) => e.preventDefault()), document.addEventListener("pointerup", (e) => {
|
|
9
9
|
!we(e.target) && xe();
|
|
10
10
|
});
|
|
11
|
-
},
|
|
11
|
+
}, v = (e, o) => {
|
|
12
12
|
const t = e.__vccOpts || e;
|
|
13
13
|
for (const [s, n] of o)
|
|
14
14
|
t[s] = n;
|
|
@@ -19,7 +19,7 @@ function Ie(e, o) {
|
|
|
19
19
|
g(e.$slots, "default")
|
|
20
20
|
]);
|
|
21
21
|
}
|
|
22
|
-
const Ee = /* @__PURE__ */
|
|
22
|
+
const Ee = /* @__PURE__ */ v(Se, [["render", Ie]]), Be = /* @__PURE__ */ b({
|
|
23
23
|
__name: "t-present",
|
|
24
24
|
props: {
|
|
25
25
|
keepalive: { type: Boolean, default: !0 },
|
|
@@ -31,68 +31,68 @@ const Ee = /* @__PURE__ */ y(Se, [["render", Ie]]), Be = /* @__PURE__ */ b({
|
|
|
31
31
|
},
|
|
32
32
|
emits: ["dismiss"],
|
|
33
33
|
setup(e, { expose: o, emit: t }) {
|
|
34
|
-
const s =
|
|
34
|
+
const s = m(0), n = m(!1), a = m(), i = m(), l = e, u = t, p = w(() => n.value || l.keepalive), _ = ce({
|
|
35
35
|
"--t-present-backdrop-opacity": "0.4",
|
|
36
36
|
"--t-present-transition": "0.2s",
|
|
37
37
|
"--t-present-content-transform": "0px",
|
|
38
38
|
"--t-present-content-opacity": "1"
|
|
39
|
-
}),
|
|
40
|
-
|
|
41
|
-
},
|
|
42
|
-
|
|
39
|
+
}), r = (f) => {
|
|
40
|
+
l.backdrop ? f?.backdropOpacity && (_["--t-present-backdrop-opacity"] = f.backdropOpacity) : _["--t-present-backdrop-opacity"] = "0", f?.transition && (_["--t-present-transition"] = f.transition, _["--t-present-transition"] = f.transition), f?.contentTransform && (_["--t-present-content-transform"] = f.contentTransform), f?.contentOpacity && (_["--t-present-content-opacity"] = f.contentOpacity);
|
|
41
|
+
}, y = () => {
|
|
42
|
+
r({
|
|
43
43
|
contentTransform: "0px",
|
|
44
44
|
transition: "0.2s",
|
|
45
45
|
backdropOpacity: "0.4",
|
|
46
46
|
contentOpacity: "1"
|
|
47
47
|
});
|
|
48
|
-
},
|
|
48
|
+
}, $ = () => {
|
|
49
49
|
let f = "0px", D = "1";
|
|
50
|
-
|
|
50
|
+
l.placement == "bottom" || l.placement == "right" ? f = "100%" : l.placement == "top" || l.placement == "left" ? f = "-100%" : l.placement == "center" && (f = "0px", D = "0"), r({
|
|
51
51
|
contentTransform: f,
|
|
52
52
|
transition: "0.2s",
|
|
53
53
|
contentOpacity: D,
|
|
54
54
|
backdropOpacity: "0"
|
|
55
55
|
});
|
|
56
56
|
};
|
|
57
|
-
O(() =>
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
}, 50)) : (
|
|
57
|
+
O(() => l.visible, () => {
|
|
58
|
+
l.visible ? (n.value = !0, s.value = He.getNewIndex(), setTimeout(() => {
|
|
59
|
+
y();
|
|
60
|
+
}, 50)) : ($(), setTimeout(() => {
|
|
61
61
|
n.value = !1;
|
|
62
62
|
}, 200));
|
|
63
63
|
}), o({
|
|
64
|
-
render:
|
|
65
|
-
open:
|
|
66
|
-
close:
|
|
64
|
+
render: r,
|
|
65
|
+
open: y,
|
|
66
|
+
close: $
|
|
67
67
|
});
|
|
68
|
-
const
|
|
69
|
-
f.preventDefault(),
|
|
68
|
+
const S = (f) => {
|
|
69
|
+
f.preventDefault(), u("dismiss", "backdrop");
|
|
70
70
|
};
|
|
71
|
-
return
|
|
72
|
-
|
|
71
|
+
return $(), (f, D) => (c(), d(X, null, [
|
|
72
|
+
p.value ? W((c(), d("div", {
|
|
73
73
|
key: 0,
|
|
74
|
-
class: T(["t-present", [{ [f.placement]: !0 },
|
|
74
|
+
class: T(["t-present", [{ [f.placement]: !0 }, l.class]]),
|
|
75
75
|
ref_key: "present",
|
|
76
|
-
ref:
|
|
77
|
-
style:
|
|
76
|
+
ref: i,
|
|
77
|
+
style: k([_, { zIndex: s.value }, l.style])
|
|
78
78
|
}, [
|
|
79
79
|
g(f.$slots, "default", {}, void 0, !0)
|
|
80
80
|
], 6)), [
|
|
81
81
|
[H, n.value]
|
|
82
82
|
]) : E("", !0),
|
|
83
|
-
|
|
83
|
+
p.value ? W((c(), d("div", {
|
|
84
84
|
key: 1,
|
|
85
85
|
class: "t-present-backdrop",
|
|
86
|
-
onClick:
|
|
86
|
+
onClick: S,
|
|
87
87
|
ref_key: "backdrop",
|
|
88
|
-
ref:
|
|
89
|
-
style:
|
|
88
|
+
ref: a,
|
|
89
|
+
style: k([_, { zIndex: s.value - 1 }, l.style])
|
|
90
90
|
}, null, 4)), [
|
|
91
91
|
[H, n.value]
|
|
92
92
|
]) : E("", !0)
|
|
93
93
|
], 64));
|
|
94
94
|
}
|
|
95
|
-
}), L = /* @__PURE__ */
|
|
95
|
+
}), L = /* @__PURE__ */ v(Be, [["__scopeId", "data-v-8eb6e6e4"]]), Ce = /* @__PURE__ */ b({
|
|
96
96
|
__name: "t-loading-icon",
|
|
97
97
|
props: {
|
|
98
98
|
size: {
|
|
@@ -107,7 +107,7 @@ const Ee = /* @__PURE__ */ y(Se, [["render", Ie]]), Be = /* @__PURE__ */ b({
|
|
|
107
107
|
setup(e) {
|
|
108
108
|
return (o, t) => (c(), d("span", {
|
|
109
109
|
class: "t-loading-icon",
|
|
110
|
-
style:
|
|
110
|
+
style: k({
|
|
111
111
|
width: e.size,
|
|
112
112
|
height: e.size,
|
|
113
113
|
borderTopColor: e.color
|
|
@@ -116,7 +116,7 @@ const Ee = /* @__PURE__ */ y(Se, [["render", Ie]]), Be = /* @__PURE__ */ b({
|
|
|
116
116
|
"aria-label": "Loading..."
|
|
117
117
|
}, null, 4));
|
|
118
118
|
}
|
|
119
|
-
}), K = /* @__PURE__ */
|
|
119
|
+
}), K = /* @__PURE__ */ v(Ce, [["__scopeId", "data-v-7c463303"]]), Ve = { class: "t-button-content" }, Pe = {
|
|
120
120
|
key: 0,
|
|
121
121
|
class: "loader"
|
|
122
122
|
}, Ae = /* @__PURE__ */ b({
|
|
@@ -174,9 +174,9 @@ const Ee = /* @__PURE__ */ y(Se, [["render", Ie]]), Be = /* @__PURE__ */ b({
|
|
|
174
174
|
});
|
|
175
175
|
return (s, n) => (c(), d("button", {
|
|
176
176
|
class: T(["t-button", { "active-background": o.activeBackground, rounded: o.rounded, block: o.block, ["size-" + o.size]: !0 }]),
|
|
177
|
-
style:
|
|
177
|
+
style: k(t.value)
|
|
178
178
|
}, [
|
|
179
|
-
W(
|
|
179
|
+
W(h("span", Ve, [
|
|
180
180
|
g(s.$slots, "default", {}, void 0, !0)
|
|
181
181
|
], 512), [
|
|
182
182
|
[H, !o.loading]
|
|
@@ -189,7 +189,7 @@ const Ee = /* @__PURE__ */ y(Se, [["render", Ie]]), Be = /* @__PURE__ */ b({
|
|
|
189
189
|
])) : E("", !0)
|
|
190
190
|
], 6));
|
|
191
191
|
}
|
|
192
|
-
}), J = /* @__PURE__ */
|
|
192
|
+
}), J = /* @__PURE__ */ v(Ae, [["__scopeId", "data-v-185a9e49"]]), Re = {
|
|
193
193
|
key: 0,
|
|
194
194
|
class: "t-alert-header"
|
|
195
195
|
}, Me = { class: "t-alert-content" }, De = { class: "t-alert-footer" }, Xe = /* @__PURE__ */ b({
|
|
@@ -202,18 +202,18 @@ const Ee = /* @__PURE__ */ y(Se, [["render", Ie]]), Be = /* @__PURE__ */ b({
|
|
|
202
202
|
},
|
|
203
203
|
emits: ["dismiss"],
|
|
204
204
|
setup(e, { expose: o, emit: t }) {
|
|
205
|
-
const s = e, n =
|
|
205
|
+
const s = e, n = m(!1), a = t, i = m(), l = m(!1), u = () => {
|
|
206
206
|
n.value = !0;
|
|
207
|
-
},
|
|
208
|
-
n.value = !1,
|
|
209
|
-
}, _ = (
|
|
210
|
-
s.dismiss && s.dismiss.includes(
|
|
211
|
-
|
|
207
|
+
}, p = (r) => {
|
|
208
|
+
n.value = !1, r.handler && r.handler(), a("dismiss", "choose", r?.data);
|
|
209
|
+
}, _ = (r) => {
|
|
210
|
+
s.dismiss && s.dismiss.includes(r) ? (n.value = !1, a("dismiss", r)) : r == "backdrop" && (l.value = !0, setTimeout(() => {
|
|
211
|
+
l.value = !1;
|
|
212
212
|
}, 300));
|
|
213
213
|
};
|
|
214
214
|
return o({
|
|
215
|
-
open:
|
|
216
|
-
}), (
|
|
215
|
+
open: u
|
|
216
|
+
}), (r, y) => (c(), C(L, {
|
|
217
217
|
placement: "center",
|
|
218
218
|
backdrop: !0,
|
|
219
219
|
keepalive: !1,
|
|
@@ -221,26 +221,26 @@ const Ee = /* @__PURE__ */ y(Se, [["render", Ie]]), Be = /* @__PURE__ */ b({
|
|
|
221
221
|
onDismiss: _
|
|
222
222
|
}, {
|
|
223
223
|
default: P(() => [
|
|
224
|
-
|
|
225
|
-
class: T(["t-alert", { pop:
|
|
224
|
+
h("div", {
|
|
225
|
+
class: T(["t-alert", { pop: l.value }]),
|
|
226
226
|
ref_key: "container",
|
|
227
|
-
ref:
|
|
227
|
+
ref: i
|
|
228
228
|
}, [
|
|
229
|
-
g(
|
|
229
|
+
g(r.$slots, "header", {}, () => [
|
|
230
230
|
s.title ? (c(), d("div", Re, R(s.title), 1)) : E("", !0)
|
|
231
231
|
], !0),
|
|
232
|
-
g(
|
|
233
|
-
|
|
232
|
+
g(r.$slots, "content", {}, () => [
|
|
233
|
+
h("div", Me, R(s.message), 1)
|
|
234
234
|
], !0),
|
|
235
|
-
g(
|
|
236
|
-
|
|
237
|
-
(c(!0), d(X, null, G(s.actions, (
|
|
238
|
-
color:
|
|
239
|
-
variant:
|
|
240
|
-
onClick: (
|
|
235
|
+
g(r.$slots, "footer", {}, () => [
|
|
236
|
+
h("div", De, [
|
|
237
|
+
(c(!0), d(X, null, G(s.actions, ($) => (c(), C(J, {
|
|
238
|
+
color: $.color,
|
|
239
|
+
variant: $.variant,
|
|
240
|
+
onClick: (S) => p($)
|
|
241
241
|
}, {
|
|
242
242
|
default: P(() => [
|
|
243
|
-
N(R(
|
|
243
|
+
N(R($.text), 1)
|
|
244
244
|
]),
|
|
245
245
|
_: 2
|
|
246
246
|
}, 1032, ["color", "variant", "onClick"]))), 256))
|
|
@@ -251,27 +251,27 @@ const Ee = /* @__PURE__ */ y(Se, [["render", Ie]]), Be = /* @__PURE__ */ b({
|
|
|
251
251
|
_: 3
|
|
252
252
|
}, 8, ["visible"]));
|
|
253
253
|
}
|
|
254
|
-
}), pe = /* @__PURE__ */
|
|
254
|
+
}), pe = /* @__PURE__ */ v(Xe, [["__scopeId", "data-v-05d0c578"]]), $o = (e = {}) => ({
|
|
255
255
|
open() {
|
|
256
256
|
return new Promise((o) => {
|
|
257
257
|
let t = document.body.querySelector(".t-app");
|
|
258
258
|
if (!t) return;
|
|
259
|
-
const s = document.createElement("div"), n =
|
|
259
|
+
const s = document.createElement("div"), n = m();
|
|
260
260
|
t.appendChild(s);
|
|
261
|
-
const
|
|
261
|
+
const a = j({
|
|
262
262
|
render() {
|
|
263
263
|
return F(pe, {
|
|
264
264
|
...e,
|
|
265
265
|
ref: n,
|
|
266
|
-
onDismiss: (
|
|
266
|
+
onDismiss: (i, l) => {
|
|
267
267
|
setTimeout(() => {
|
|
268
|
-
|
|
269
|
-
}, 300), o({ type:
|
|
268
|
+
a.unmount(), s.remove();
|
|
269
|
+
}, 300), o({ type: i, data: l });
|
|
270
270
|
}
|
|
271
271
|
});
|
|
272
272
|
}
|
|
273
273
|
});
|
|
274
|
-
|
|
274
|
+
a.mount(s), setTimeout(() => {
|
|
275
275
|
n.value?.open?.();
|
|
276
276
|
}, 50);
|
|
277
277
|
});
|
|
@@ -285,21 +285,21 @@ const Ee = /* @__PURE__ */ y(Se, [["render", Ie]]), Be = /* @__PURE__ */ b({
|
|
|
285
285
|
},
|
|
286
286
|
emits: ["dismiss"],
|
|
287
287
|
setup(e, { expose: o, emit: t }) {
|
|
288
|
-
const s = e, n =
|
|
288
|
+
const s = e, n = m(!1), a = t, i = m(), l = m(!1), u = () => {
|
|
289
289
|
n.value = !0;
|
|
290
|
-
},
|
|
291
|
-
n.value = !1,
|
|
292
|
-
}, _ = (
|
|
293
|
-
s.dismiss && s.dismiss.includes(
|
|
294
|
-
|
|
290
|
+
}, p = (r) => {
|
|
291
|
+
n.value = !1, r.handler && r.handler(), a("dismiss", "choose", r?.data);
|
|
292
|
+
}, _ = (r) => {
|
|
293
|
+
s.dismiss && s.dismiss.includes(r) ? (n.value = !1, a("dismiss", r)) : r == "backdrop" && (l.value = !0, setTimeout(() => {
|
|
294
|
+
l.value = !1;
|
|
295
295
|
}, 300));
|
|
296
296
|
};
|
|
297
|
-
return O(() => s.visible, (
|
|
298
|
-
|
|
297
|
+
return O(() => s.visible, (r) => {
|
|
298
|
+
r ? u() : close();
|
|
299
299
|
}), o({
|
|
300
|
-
open:
|
|
300
|
+
open: u,
|
|
301
301
|
close
|
|
302
|
-
}), (
|
|
302
|
+
}), (r, y) => (c(), C(L, {
|
|
303
303
|
placement: "bottom",
|
|
304
304
|
backdrop: !0,
|
|
305
305
|
keepalive: !1,
|
|
@@ -307,21 +307,21 @@ const Ee = /* @__PURE__ */ y(Se, [["render", Ie]]), Be = /* @__PURE__ */ b({
|
|
|
307
307
|
onDismiss: _
|
|
308
308
|
}, {
|
|
309
309
|
default: P(() => [
|
|
310
|
-
|
|
311
|
-
class: T(["t-action", { pop:
|
|
310
|
+
h("div", {
|
|
311
|
+
class: T(["t-action", { pop: l.value }]),
|
|
312
312
|
ref_key: "container",
|
|
313
|
-
ref:
|
|
313
|
+
ref: i
|
|
314
314
|
}, [
|
|
315
|
-
(c(!0), d(X, null, G(s.actions, (
|
|
316
|
-
(c(!0), d(X, null, G(
|
|
317
|
-
color:
|
|
318
|
-
size:
|
|
319
|
-
variant:
|
|
320
|
-
onClick: (f) =>
|
|
315
|
+
(c(!0), d(X, null, G(s.actions, ($) => (c(), d("div", null, [
|
|
316
|
+
(c(!0), d(X, null, G($, (S) => (c(), C(J, {
|
|
317
|
+
color: S.color,
|
|
318
|
+
size: S.size,
|
|
319
|
+
variant: S.variant,
|
|
320
|
+
onClick: (f) => p(S),
|
|
321
321
|
block: ""
|
|
322
322
|
}, {
|
|
323
323
|
default: P(() => [
|
|
324
|
-
N(R(
|
|
324
|
+
N(R(S.text), 1)
|
|
325
325
|
]),
|
|
326
326
|
_: 2
|
|
327
327
|
}, 1032, ["color", "size", "variant", "onClick"]))), 256))
|
|
@@ -331,27 +331,27 @@ const Ee = /* @__PURE__ */ y(Se, [["render", Ie]]), Be = /* @__PURE__ */ b({
|
|
|
331
331
|
_: 1
|
|
332
332
|
}, 8, ["visible"]));
|
|
333
333
|
}
|
|
334
|
-
}), Ne = /* @__PURE__ */
|
|
334
|
+
}), Ne = /* @__PURE__ */ v(Oe, [["__scopeId", "data-v-e693a02a"]]), wo = (e = {}) => ({
|
|
335
335
|
open() {
|
|
336
336
|
return new Promise((o) => {
|
|
337
337
|
let t = document.body.querySelector(".t-app");
|
|
338
338
|
if (!t) return;
|
|
339
|
-
const s = document.createElement("div"), n =
|
|
339
|
+
const s = document.createElement("div"), n = m();
|
|
340
340
|
t.appendChild(s);
|
|
341
|
-
const
|
|
341
|
+
const a = j({
|
|
342
342
|
render() {
|
|
343
343
|
return F(Ne, {
|
|
344
344
|
...e,
|
|
345
345
|
ref: n,
|
|
346
|
-
onDismiss: (
|
|
346
|
+
onDismiss: (i, l) => {
|
|
347
347
|
setTimeout(() => {
|
|
348
|
-
|
|
349
|
-
}, 300), o({ type:
|
|
348
|
+
a.unmount(), s.remove();
|
|
349
|
+
}, 300), o({ type: i, data: l });
|
|
350
350
|
}
|
|
351
351
|
});
|
|
352
352
|
}
|
|
353
353
|
});
|
|
354
|
-
|
|
354
|
+
a.mount(s), setTimeout(() => {
|
|
355
355
|
n.value?.open?.();
|
|
356
356
|
}, 50);
|
|
357
357
|
});
|
|
@@ -363,7 +363,7 @@ const Ee = /* @__PURE__ */ y(Se, [["render", Ie]]), Be = /* @__PURE__ */ b({
|
|
|
363
363
|
},
|
|
364
364
|
emits: ["dismiss"],
|
|
365
365
|
setup(e, { expose: o, emit: t }) {
|
|
366
|
-
const s = e, n =
|
|
366
|
+
const s = e, n = m(!1);
|
|
367
367
|
return o({
|
|
368
368
|
open: () => {
|
|
369
369
|
n.value = !0;
|
|
@@ -371,15 +371,15 @@ const Ee = /* @__PURE__ */ y(Se, [["render", Ie]]), Be = /* @__PURE__ */ b({
|
|
|
371
371
|
close: () => {
|
|
372
372
|
n.value = !1;
|
|
373
373
|
}
|
|
374
|
-
}), (
|
|
374
|
+
}), (l, u) => (c(), C(L, {
|
|
375
375
|
placement: "center",
|
|
376
376
|
backdrop: !0,
|
|
377
377
|
keepalive: !1,
|
|
378
378
|
visible: n.value
|
|
379
379
|
}, {
|
|
380
380
|
default: P(() => [
|
|
381
|
-
|
|
382
|
-
g(
|
|
381
|
+
h("div", qe, [
|
|
382
|
+
g(l.$slots, "default", {}, () => [
|
|
383
383
|
U(K, {
|
|
384
384
|
type: s.type
|
|
385
385
|
}, null, 8, ["type"])
|
|
@@ -389,12 +389,12 @@ const Ee = /* @__PURE__ */ y(Se, [["render", Ie]]), Be = /* @__PURE__ */ b({
|
|
|
389
389
|
_: 3
|
|
390
390
|
}, 8, ["visible"]));
|
|
391
391
|
}
|
|
392
|
-
}), We = /* @__PURE__ */
|
|
393
|
-
const o =
|
|
392
|
+
}), We = /* @__PURE__ */ v(Le, [["__scopeId", "data-v-8f84c14e"]]), xo = (e = {}) => {
|
|
393
|
+
const o = m(), t = document.body.querySelector(".t-app");
|
|
394
394
|
let s = null, n = null;
|
|
395
395
|
return {
|
|
396
396
|
open() {
|
|
397
|
-
return new Promise((
|
|
397
|
+
return new Promise((a) => {
|
|
398
398
|
t && (n = document.createElement("div"), t.appendChild(n), s = j({
|
|
399
399
|
render() {
|
|
400
400
|
return F(We, {
|
|
@@ -403,37 +403,37 @@ const Ee = /* @__PURE__ */ y(Se, [["render", Ie]]), Be = /* @__PURE__ */ b({
|
|
|
403
403
|
});
|
|
404
404
|
}
|
|
405
405
|
}), s.mount(n), setTimeout(() => {
|
|
406
|
-
o.value?.open?.(),
|
|
406
|
+
o.value?.open?.(), a(!0);
|
|
407
407
|
}, 50));
|
|
408
408
|
});
|
|
409
409
|
},
|
|
410
410
|
close() {
|
|
411
|
-
return new Promise((
|
|
411
|
+
return new Promise((a) => {
|
|
412
412
|
o.value?.close?.(), setTimeout(() => {
|
|
413
|
-
s?.unmount?.(), n?.remove?.(),
|
|
413
|
+
s?.unmount?.(), n?.remove?.(), a(!0);
|
|
414
414
|
}, 300);
|
|
415
415
|
});
|
|
416
416
|
}
|
|
417
417
|
};
|
|
418
|
-
}, ae =
|
|
418
|
+
}, ae = m(1e3), He = {
|
|
419
419
|
getNewIndex() {
|
|
420
420
|
return ae.value += 2, ae.value;
|
|
421
421
|
}
|
|
422
|
-
}, M = ce([]), Q =
|
|
422
|
+
}, M = ce([]), Q = m(!0), I = m(!1), A = m(-1), z = w(() => M[A.value]), q = w(() => M[A.value + 1] || void 0), B = w(() => M[M.length - 2]), fe = w(() => !I.value && Q.value && B.value), Z = {
|
|
423
423
|
reset() {
|
|
424
424
|
I.value = !0;
|
|
425
|
-
const e =
|
|
425
|
+
const e = z.value.target, o = B.value.target;
|
|
426
426
|
e.style.transition = "transform 0.35s ease", e.style.transform = "translateX(0px)", o.style.transition = "transform 0.35s ease", o.style.transform = "translateX(calc(var(--t-app-width) / 100 * 30 * -1)) scale(0.5) perspective(var(--t-app-width)) rotateY(30deg)", document.documentElement.style.setProperty("--t-screen-backdrop-duration", "0.35s"), document.documentElement.style.setProperty("--t-swipe-backdrop-opacity", "0.5"), setTimeout(() => {
|
|
427
427
|
I.value = !1;
|
|
428
428
|
}, 400);
|
|
429
429
|
},
|
|
430
430
|
move(e) {
|
|
431
431
|
if (!fe.value) return;
|
|
432
|
-
const o = window.innerWidth, t = e / o * 100, s =
|
|
432
|
+
const o = window.innerWidth, t = e / o * 100, s = z.value.target, n = B.value.target;
|
|
433
433
|
e > 15 && e <= o && (e = e > 0 ? e : 0, s.style.transition = "transform 0s ease", s.style.transform = `translateX(${e}px)`, n.style.transition = "transform 0s ease", document.documentElement.style.setProperty("--t-screen-backdrop-duration", "0s"), n.style.transform = `translateX(calc((var(--t-app-width) / 100 * 30 * -1) + ((var(--t-app-width) / 100 * 30) / 100 * ${t}))) scale(${0.5 + 0.5 / 100 * t}) perspective(var(--t-app-width)) rotateY(${30 - 30 / 100 * t}deg)`, document.documentElement.style.setProperty("--t-swipe-backdrop-opacity", `${0.5 - 0.5 / 100 * t}`));
|
|
434
434
|
},
|
|
435
435
|
back(e) {
|
|
436
|
-
B.value && (
|
|
436
|
+
B.value && (z.value.target.style.transition = "transform 0.35s ease", z.value.target.style.transform = "translateX(var(--t-app-width)) scale(1)", B.value.target.style.transition = "transform 0.35s ease", B.value.target.style.transform = "translateX(0px) scale(1) perspective(var(--t-app-width)) rotateY(0deg)", document.documentElement.style.setProperty("--t-screen-backdrop-duration", "0.35s"), document.documentElement.style.setProperty("--t-swipe-backdrop-opacity", "0"), I.value = !0, setTimeout(() => {
|
|
437
437
|
re(), I.value = !1, A.value -= 1, e && e();
|
|
438
438
|
}, 400));
|
|
439
439
|
},
|
|
@@ -446,7 +446,7 @@ const Ee = /* @__PURE__ */ y(Se, [["render", Ie]]), Be = /* @__PURE__ */ b({
|
|
|
446
446
|
I.value = !0;
|
|
447
447
|
let o = q.value.target;
|
|
448
448
|
o.style.transform = "translateX(var(--t-app-width))", o.transitionOrigin = "center", document.documentElement.style.setProperty("--t-screen-backdrop-duration", "0s"), document.documentElement.style.setProperty("--t-swipe-backdrop-opacity", "0"), setTimeout(() => {
|
|
449
|
-
o.style.transition = "transform 0.35s ease", o.style.transform = "translateX(0px)", document.documentElement.style.setProperty("--t-screen-backdrop-duration", "0.35s"), document.documentElement.style.setProperty("--t-swipe-backdrop-opacity", "0.5"),
|
|
449
|
+
o.style.transition = "transform 0.35s ease", o.style.transform = "translateX(0px)", document.documentElement.style.setProperty("--t-screen-backdrop-duration", "0.35s"), document.documentElement.style.setProperty("--t-swipe-backdrop-opacity", "0.5"), z.value && (z.value.target.style.transitionOrigin = "left center", z.value.target.style.transition = "transform 0.35s ease", z.value.target.style.transform = "translateX(calc(var(--t-app-width) / 100 * 30 * -1)) scale(0.5) perspective(var(--t-app-width)) rotateY(30deg)"), setTimeout(() => {
|
|
450
450
|
I.value = !1, A.value += 1, e && e();
|
|
451
451
|
}, 400);
|
|
452
452
|
}, 100);
|
|
@@ -454,17 +454,17 @@ const Ee = /* @__PURE__ */ y(Se, [["render", Ie]]), Be = /* @__PURE__ */ b({
|
|
|
454
454
|
}, Y = {
|
|
455
455
|
reset() {
|
|
456
456
|
I.value = !0;
|
|
457
|
-
const e =
|
|
457
|
+
const e = z.value.target, o = B.value.target;
|
|
458
458
|
e.style.transition = "transform 0.35s ease", e.style.transform = "translateX(0px)", o.style.transition = "transform 0.35s ease", o.style.transform = "translateX(calc(var(--t-app-width) / 100 * 30 * -1))", document.documentElement.style.setProperty("--t-screen-backdrop-duration", "0.35s"), document.documentElement.style.setProperty("--t-swipe-backdrop-opacity", "0.5"), setTimeout(() => {
|
|
459
459
|
I.value = !1;
|
|
460
460
|
}, 400);
|
|
461
461
|
},
|
|
462
462
|
move(e) {
|
|
463
|
-
const o = window.innerWidth, t = e / o * 100, s =
|
|
463
|
+
const o = window.innerWidth, t = e / o * 100, s = z.value.target, n = B.value.target;
|
|
464
464
|
e > 15 && e <= o && (e = e > 0 ? e : 0, s.style.transition = "transform 0s ease", s.style.transform = `translateX(${e}px)`, n.style.transition = "transform 0s ease", document.documentElement.style.setProperty("--t-screen-backdrop-duration", "0s"), n.style.transform = `translateX(calc((var(--t-app-width) / 100 * 30 * -1) + ((var(--t-app-width) / 100 * 30) / 100 * ${t})))`, document.documentElement.style.setProperty("--t-swipe-backdrop-opacity", `${0.5 - 0.5 / 100 * t}`));
|
|
465
465
|
},
|
|
466
466
|
back(e) {
|
|
467
|
-
B.value && (
|
|
467
|
+
B.value && (z.value.target.style.transition = "transform 0.35s ease", z.value.target.style.transform = "translateX(var(--t-app-width)) scale(1)", B.value.target.style.transition = "transform 0.35s ease", B.value.target.style.transform = "translateX(0px)", document.documentElement.style.setProperty("--t-screen-backdrop-duration", "0.35s"), document.documentElement.style.setProperty("--t-swipe-backdrop-opacity", "0"), I.value = !0, setTimeout(() => {
|
|
468
468
|
re(), I.value = !1, A.value -= 1, e && e();
|
|
469
469
|
}, 400));
|
|
470
470
|
},
|
|
@@ -477,7 +477,7 @@ const Ee = /* @__PURE__ */ y(Se, [["render", Ie]]), Be = /* @__PURE__ */ b({
|
|
|
477
477
|
I.value = !0;
|
|
478
478
|
let o = q.value.target;
|
|
479
479
|
o.style.transform = "translateX(var(--t-app-width))", o.transitionOrigin = "center", document.documentElement.style.setProperty("--t-screen-backdrop-duration", "0s"), document.documentElement.style.setProperty("--t-swipe-backdrop-opacity", "0"), setTimeout(() => {
|
|
480
|
-
o.style.transition = "transform 0.35s ease", o.style.transform = "translateX(0px)", document.documentElement.style.setProperty("--t-screen-backdrop-duration", "0.35s"), document.documentElement.style.setProperty("--t-swipe-backdrop-opacity", "0.5"),
|
|
480
|
+
o.style.transition = "transform 0.35s ease", o.style.transform = "translateX(0px)", document.documentElement.style.setProperty("--t-screen-backdrop-duration", "0.35s"), document.documentElement.style.setProperty("--t-swipe-backdrop-opacity", "0.5"), z.value && (z.value.target.style.transitionOrigin = "left center", z.value.target.style.transition = "transform 0.35s ease", z.value.target.style.transform = "translateX(calc(var(--t-app-width) / 100 * 30 * -1))"), setTimeout(() => {
|
|
481
481
|
I.value = !1, A.value += 1, e && e();
|
|
482
482
|
}, 400);
|
|
483
483
|
}, 100);
|
|
@@ -517,7 +517,7 @@ const Ee = /* @__PURE__ */ y(Se, [["render", Ie]]), Be = /* @__PURE__ */ b({
|
|
|
517
517
|
lockSwipe: Fe,
|
|
518
518
|
unlockSwipe: Ke,
|
|
519
519
|
swipeable: Q,
|
|
520
|
-
currentScreen:
|
|
520
|
+
currentScreen: z,
|
|
521
521
|
lastScreen: B,
|
|
522
522
|
nextScreen: q
|
|
523
523
|
}, et = { class: "t-toast-content" }, tt = /* @__PURE__ */ b({
|
|
@@ -532,76 +532,76 @@ const Ee = /* @__PURE__ */ y(Se, [["render", Ie]]), Be = /* @__PURE__ */ b({
|
|
|
532
532
|
},
|
|
533
533
|
emits: ["dismiss"],
|
|
534
534
|
setup(e, { expose: o, emit: t }) {
|
|
535
|
-
const s = e, n = t,
|
|
536
|
-
|
|
537
|
-
|
|
535
|
+
const s = e, n = t, a = m(!1), i = m(!1), l = m(!1), u = () => {
|
|
536
|
+
i.value = !0, l.value = !1, setTimeout(() => {
|
|
537
|
+
a.value = !0;
|
|
538
538
|
}, 10);
|
|
539
|
-
},
|
|
540
|
-
|
|
541
|
-
|
|
539
|
+
}, p = () => {
|
|
540
|
+
l.value = !0, setTimeout(() => {
|
|
541
|
+
i.value = !1, a.value = !1, n("dismiss");
|
|
542
542
|
}, 300);
|
|
543
543
|
};
|
|
544
|
-
O(() => s.visible, (
|
|
545
|
-
|
|
544
|
+
O(() => s.visible, (r) => {
|
|
545
|
+
r ? u() : p();
|
|
546
546
|
});
|
|
547
547
|
const _ = w(() => {
|
|
548
|
-
let
|
|
549
|
-
return s.variant == "default" && (s.color ? ["warning", "info", "danger", "primary", "secondary", "success"].includes(s.color) ?
|
|
548
|
+
let r;
|
|
549
|
+
return s.variant == "default" && (s.color ? ["warning", "info", "danger", "primary", "secondary", "success"].includes(s.color) ? r = {
|
|
550
550
|
"--border": "none",
|
|
551
551
|
"--color": "var(--t-color-status-" + s.color + "-text)",
|
|
552
552
|
"--background": "rgba(var(--t-color-status-" + s.color + "-rgb), 1)"
|
|
553
|
-
} :
|
|
553
|
+
} : r = {
|
|
554
554
|
"--border": "none",
|
|
555
555
|
"--color": "var(--t-color-text)",
|
|
556
556
|
"--background": s.color
|
|
557
|
-
} :
|
|
557
|
+
} : r = {
|
|
558
558
|
"--border": "none",
|
|
559
559
|
"--color": "var(--t-color-text)",
|
|
560
560
|
"--background": "rgba(var(--t-color-surface-rgb), 1)"
|
|
561
|
-
}), s.variant == "text" && (s.color ? ["warning", "info", "danger", "primary", "secondary", "success"].includes(s.color) ?
|
|
561
|
+
}), s.variant == "text" && (s.color ? ["warning", "info", "danger", "primary", "secondary", "success"].includes(s.color) ? r = {
|
|
562
562
|
"--border": "none",
|
|
563
563
|
"--color": "var(--t-color-status-" + s.color + ")",
|
|
564
564
|
"--background": "transparent"
|
|
565
|
-
} :
|
|
565
|
+
} : r = {
|
|
566
566
|
"--border": "none",
|
|
567
567
|
"--color": s.color,
|
|
568
568
|
"--background": "transparent"
|
|
569
|
-
} :
|
|
569
|
+
} : r = {
|
|
570
570
|
"--border": "none",
|
|
571
571
|
"--color": "var(--t-color-text)",
|
|
572
572
|
"--background": "transparent"
|
|
573
|
-
}), s.variant == "outline" && (s.color ? ["warning", "info", "danger", "primary", "secondary", "success"].includes(s.color) ?
|
|
573
|
+
}), s.variant == "outline" && (s.color ? ["warning", "info", "danger", "primary", "secondary", "success"].includes(s.color) ? r = {
|
|
574
574
|
"--border": "0.55px solid var(--t-color-status-" + s.color + ")",
|
|
575
575
|
"--color": "var(--t-color-status-" + s.color + ")",
|
|
576
576
|
"--background": "transparent"
|
|
577
|
-
} :
|
|
577
|
+
} : r = {
|
|
578
578
|
"--border": "0.55px solid " + s.color,
|
|
579
579
|
"--color": s.color,
|
|
580
580
|
"--background": "transparent"
|
|
581
|
-
} :
|
|
581
|
+
} : r = {
|
|
582
582
|
"--border": "0.55px solid var(--t-color-text)",
|
|
583
583
|
"--color": "var(--t-color-text)",
|
|
584
584
|
"--background": "transparent"
|
|
585
|
-
}),
|
|
585
|
+
}), r;
|
|
586
586
|
});
|
|
587
587
|
return o({
|
|
588
|
-
open:
|
|
589
|
-
close:
|
|
590
|
-
}), (
|
|
588
|
+
open: u,
|
|
589
|
+
close: p
|
|
590
|
+
}), (r, y) => i.value ? (c(), d("div", {
|
|
591
591
|
key: 0,
|
|
592
|
-
class: T(["t-toast", { [s.placement]: !0, open:
|
|
593
|
-
style:
|
|
592
|
+
class: T(["t-toast", { [s.placement]: !0, open: a.value, closing: l.value }]),
|
|
593
|
+
style: k({ "--space": s.space, ..._.value })
|
|
594
594
|
}, [
|
|
595
|
-
g(
|
|
596
|
-
|
|
595
|
+
g(r.$slots, "content", {}, () => [
|
|
596
|
+
h("div", et, R(s.message), 1)
|
|
597
597
|
], !0)
|
|
598
598
|
], 6)) : E("", !0);
|
|
599
599
|
}
|
|
600
|
-
}), me = /* @__PURE__ */
|
|
600
|
+
}), me = /* @__PURE__ */ v(tt, [["__scopeId", "data-v-7011351e"]]), To = (e = {}) => ({
|
|
601
601
|
open() {
|
|
602
602
|
let o = document.body.querySelector(".t-app");
|
|
603
603
|
if (!o) return;
|
|
604
|
-
const t = document.createElement("div"), s =
|
|
604
|
+
const t = document.createElement("div"), s = m();
|
|
605
605
|
o.appendChild(t);
|
|
606
606
|
const n = j({
|
|
607
607
|
render() {
|
|
@@ -622,7 +622,7 @@ const Ee = /* @__PURE__ */ y(Se, [["render", Ie]]), Be = /* @__PURE__ */ b({
|
|
|
622
622
|
}, e.duration + 10);
|
|
623
623
|
}, 50);
|
|
624
624
|
}
|
|
625
|
-
}), ot =
|
|
625
|
+
}), ot = m(0);
|
|
626
626
|
function ve() {
|
|
627
627
|
return {
|
|
628
628
|
height: ot
|
|
@@ -640,12 +640,12 @@ const st = /* @__PURE__ */ b({
|
|
|
640
640
|
placement: o.placement
|
|
641
641
|
}), (s, n) => (c(), d("div", {
|
|
642
642
|
class: T(["t-cable", { keyboard: o.keyboard && V(t) > 0, [o.placement]: !0 }]),
|
|
643
|
-
style:
|
|
643
|
+
style: k({ "--t-keyboard-height": V(t) + "px", "--t-keyboard-transition": V(t) > 0 ? "0.3s" : "0.1s" })
|
|
644
644
|
}, [
|
|
645
645
|
g(s.$slots, "default", {}, void 0, !0)
|
|
646
646
|
], 6));
|
|
647
647
|
}
|
|
648
|
-
}), nt = /* @__PURE__ */
|
|
648
|
+
}), nt = /* @__PURE__ */ v(st, [["__scopeId", "data-v-6cae224b"]]), rt = /* @__PURE__ */ b({
|
|
649
649
|
__name: "t-card",
|
|
650
650
|
props: {
|
|
651
651
|
color: { default: null }
|
|
@@ -663,7 +663,7 @@ const st = /* @__PURE__ */ b({
|
|
|
663
663
|
});
|
|
664
664
|
return (s, n) => (c(), d("div", {
|
|
665
665
|
class: "t-card",
|
|
666
|
-
style:
|
|
666
|
+
style: k(t.value)
|
|
667
667
|
}, [
|
|
668
668
|
g(s.$slots, "default")
|
|
669
669
|
], 4));
|
|
@@ -674,23 +674,23 @@ function ct(e, o) {
|
|
|
674
674
|
g(e.$slots, "default", {}, void 0, !0)
|
|
675
675
|
]);
|
|
676
676
|
}
|
|
677
|
-
const _e = /* @__PURE__ */
|
|
677
|
+
const _e = /* @__PURE__ */ v(at, [["render", ct], ["__scopeId", "data-v-af750e89"]]), le = 80, it = /* @__PURE__ */ b({
|
|
678
678
|
__name: "t-refresher",
|
|
679
679
|
emits: ["refresh", "move", "cancel", "start"],
|
|
680
680
|
setup(e, { emit: o }) {
|
|
681
|
-
const t = o, s =
|
|
682
|
-
let
|
|
683
|
-
const
|
|
684
|
-
n.value = !1, s.value = 0,
|
|
685
|
-
|
|
681
|
+
const t = o, s = m(0), n = m(!1), a = m();
|
|
682
|
+
let i, l = !1;
|
|
683
|
+
const u = () => {
|
|
684
|
+
n.value = !1, s.value = 0, i && i.cancel(), setTimeout(() => {
|
|
685
|
+
l = !1;
|
|
686
686
|
}, 2e3);
|
|
687
|
-
},
|
|
688
|
-
|
|
687
|
+
}, p = () => {
|
|
688
|
+
l = !0, n.value = !0, s.value = le, t("refresh", u);
|
|
689
689
|
};
|
|
690
|
-
return O(() =>
|
|
691
|
-
|
|
692
|
-
let _ =
|
|
693
|
-
_ && (
|
|
690
|
+
return O(() => a.value, () => {
|
|
691
|
+
i && i.destroy();
|
|
692
|
+
let _ = a.value.closest(".t-content");
|
|
693
|
+
_ && (i = ne(_, {
|
|
694
694
|
isMoving: !1,
|
|
695
695
|
options: {
|
|
696
696
|
minDist: 60
|
|
@@ -698,27 +698,27 @@ const _e = /* @__PURE__ */ y(at, [["render", ct], ["__scopeId", "data-v-af750e89
|
|
|
698
698
|
down() {
|
|
699
699
|
this.isMoving = !1, t("start");
|
|
700
700
|
},
|
|
701
|
-
move({ deltaY:
|
|
702
|
-
n.value ||
|
|
701
|
+
move({ deltaY: r, initialDirection: y }) {
|
|
702
|
+
n.value || l || y != "down" || (r >= 120 ? (this.isMoving = !1, p()) : (r > 10 || this.isMoving) && (this.isMoving = !0, s.value = r > 0 ? r : 0, t("move", r)));
|
|
703
703
|
},
|
|
704
|
-
up({ deltaY:
|
|
705
|
-
this.isMoving = !1, !(n.value ||
|
|
704
|
+
up({ deltaY: r, initialDirection: y }) {
|
|
705
|
+
this.isMoving = !1, !(n.value || l) && (r > le && y == "down" ? p() : (s.value = 0, t("cancel")));
|
|
706
706
|
},
|
|
707
707
|
cancel() {
|
|
708
|
-
this.isMoving = !1, !(n.value ||
|
|
708
|
+
this.isMoving = !1, !(n.value || l) && (n.value = !1, s.value = 0, t("cancel"));
|
|
709
709
|
}
|
|
710
710
|
}, {
|
|
711
711
|
passive: !1
|
|
712
712
|
}));
|
|
713
713
|
}), oe(() => {
|
|
714
|
-
|
|
715
|
-
}), (_,
|
|
714
|
+
i && i.destroy();
|
|
715
|
+
}), (_, r) => W((c(), d("div", {
|
|
716
716
|
class: "t-refresher",
|
|
717
717
|
ref_key: "container",
|
|
718
|
-
ref:
|
|
719
|
-
style:
|
|
718
|
+
ref: a,
|
|
719
|
+
style: k({ height: `${s.value}px` })
|
|
720
720
|
}, [
|
|
721
|
-
|
|
721
|
+
h("img", {
|
|
722
722
|
class: T({ spiner: n.value }),
|
|
723
723
|
src: "https://static.toikit.com/toikit/home_2.png?v=3",
|
|
724
724
|
alt: "Loading...",
|
|
@@ -728,86 +728,86 @@ const _e = /* @__PURE__ */ y(at, [["render", ct], ["__scopeId", "data-v-af750e89
|
|
|
728
728
|
[H, s.value > 0]
|
|
729
729
|
]);
|
|
730
730
|
}
|
|
731
|
-
}), ut = /* @__PURE__ */
|
|
731
|
+
}), ut = /* @__PURE__ */ v(it, [["__scopeId", "data-v-abd4007f"]]), dt = {}, pt = { class: "t-screen" };
|
|
732
732
|
function ft(e, o) {
|
|
733
733
|
return c(), d("div", pt, [
|
|
734
734
|
g(e.$slots, "default", {}, void 0, !0)
|
|
735
735
|
]);
|
|
736
736
|
}
|
|
737
|
-
const ye = /* @__PURE__ */
|
|
737
|
+
const ye = /* @__PURE__ */ v(dt, [["render", ft], ["__scopeId", "data-v-c2a3436c"]]), mt = /* @__PURE__ */ b({
|
|
738
738
|
__name: "t-swipe-screen",
|
|
739
739
|
props: {
|
|
740
740
|
variant: { default: "scale" },
|
|
741
|
-
router: {
|
|
742
|
-
route: {
|
|
741
|
+
router: {},
|
|
742
|
+
route: {}
|
|
743
743
|
},
|
|
744
744
|
emits: ["change"],
|
|
745
745
|
setup(e, { emit: o }) {
|
|
746
746
|
let t = {};
|
|
747
|
-
const s = o, n = e
|
|
748
|
-
let
|
|
749
|
-
const
|
|
750
|
-
for (let
|
|
751
|
-
t[
|
|
752
|
-
const
|
|
753
|
-
|
|
754
|
-
name:
|
|
747
|
+
const s = o, n = e;
|
|
748
|
+
let a;
|
|
749
|
+
const i = n.router || de(), l = n.route || $e(), u = i.getRoutes();
|
|
750
|
+
for (let r of u)
|
|
751
|
+
t[r.name] = r.component || r.components;
|
|
752
|
+
const p = (r) => {
|
|
753
|
+
r && x.addScreen({
|
|
754
|
+
name: r,
|
|
755
755
|
target: null,
|
|
756
|
-
component: he(t[
|
|
756
|
+
component: he(t[r] || null)
|
|
757
757
|
});
|
|
758
|
-
},
|
|
759
|
-
!
|
|
758
|
+
}, _ = (r, y) => {
|
|
759
|
+
!y || x.screens[r].target || (x.addScreenEl(r, y.$el), x.nextScreen && x.next(n.variant, () => {
|
|
760
760
|
s("change");
|
|
761
761
|
}));
|
|
762
762
|
};
|
|
763
|
-
return O(() =>
|
|
764
|
-
|
|
763
|
+
return O(() => l.name, (r, y) => {
|
|
764
|
+
r != x.currentScreen.value?.name && (x.lastScreen.value?.name == r ? x.back(n.variant, () => {
|
|
765
765
|
s("change");
|
|
766
|
-
}) :
|
|
766
|
+
}) : p(l.name));
|
|
767
767
|
}), se(() => {
|
|
768
|
-
|
|
769
|
-
beforeEvent(
|
|
768
|
+
p(l.name), a = ne(document.body, {
|
|
769
|
+
beforeEvent(r) {
|
|
770
770
|
return !!x.isSwipeable.value;
|
|
771
771
|
},
|
|
772
|
-
fast({ initialDirection:
|
|
773
|
-
x.lastScreen.value &&
|
|
772
|
+
fast({ initialDirection: r }) {
|
|
773
|
+
x.lastScreen.value && r == "right" && i.back();
|
|
774
774
|
},
|
|
775
|
-
move({ deltaX:
|
|
776
|
-
|
|
775
|
+
move({ deltaX: r, initialDirection: y }) {
|
|
776
|
+
y == "right" && x.move(n.variant, r);
|
|
777
777
|
},
|
|
778
|
-
up({ deltaX:
|
|
779
|
-
if (
|
|
780
|
-
x.reset(
|
|
778
|
+
up({ deltaX: r, initialDirection: y }) {
|
|
779
|
+
if (y != "right") {
|
|
780
|
+
x.reset(n.variant);
|
|
781
781
|
return;
|
|
782
782
|
}
|
|
783
|
-
const
|
|
784
|
-
|
|
783
|
+
const $ = window.innerWidth;
|
|
784
|
+
r / $ * 100 >= 50 ? i.back() : x.reset(n.variant);
|
|
785
785
|
},
|
|
786
786
|
cancel() {
|
|
787
|
-
x.reset(
|
|
787
|
+
x.reset(n.variant);
|
|
788
788
|
}
|
|
789
789
|
});
|
|
790
790
|
}), oe(() => {
|
|
791
|
-
|
|
792
|
-
}),
|
|
793
|
-
(c(!0), d(X, null, G(V(x).screens, (
|
|
791
|
+
a && a.destroy(), x.removeAllScreen();
|
|
792
|
+
}), (r, y) => (c(), d(X, null, [
|
|
793
|
+
(c(!0), d(X, null, G(V(x).screens, ($, S) => (c(), C(ye, {
|
|
794
794
|
ref_for: !0,
|
|
795
|
-
ref: (
|
|
796
|
-
style:
|
|
797
|
-
key:
|
|
795
|
+
ref: (f) => _(S, f),
|
|
796
|
+
style: k({ zIndex: S + (S == V(x).screens.length - 1 ? 2 : 1) }),
|
|
797
|
+
key: S
|
|
798
798
|
}, {
|
|
799
799
|
default: P(() => [
|
|
800
|
-
(c(), C(be(
|
|
800
|
+
(c(), C(be($.component.default)))
|
|
801
801
|
]),
|
|
802
802
|
_: 2
|
|
803
803
|
}, 1032, ["style"]))), 128)),
|
|
804
|
-
|
|
804
|
+
h("div", {
|
|
805
805
|
class: "t-swipe-backdrop",
|
|
806
|
-
style:
|
|
806
|
+
style: k({ zIndex: V(x).screens.length })
|
|
807
807
|
}, null, 4)
|
|
808
808
|
], 64));
|
|
809
809
|
}
|
|
810
|
-
}), vt = /* @__PURE__ */
|
|
810
|
+
}), vt = /* @__PURE__ */ v(mt, [["__scopeId", "data-v-23e0cfda"]]), _t = /* @__PURE__ */ b({
|
|
811
811
|
__name: "t-toolbar",
|
|
812
812
|
props: {
|
|
813
813
|
placement: { default: null },
|
|
@@ -816,40 +816,40 @@ const ye = /* @__PURE__ */ y(dt, [["render", ft], ["__scopeId", "data-v-c2a3436c
|
|
|
816
816
|
},
|
|
817
817
|
setup(e) {
|
|
818
818
|
const o = e, t = ue("cableState"), s = w(() => o?.placement || t?.placement);
|
|
819
|
-
return (n,
|
|
819
|
+
return (n, a) => (c(), d("div", {
|
|
820
820
|
class: T(["t-toolbar", { [s.value]: !0, safe: o.safe }]),
|
|
821
|
-
style:
|
|
821
|
+
style: k({ "--t-size-toolbar": o.size })
|
|
822
822
|
}, [
|
|
823
|
-
|
|
823
|
+
h("div", null, [
|
|
824
824
|
g(n.$slots, "default", {}, void 0, !0)
|
|
825
825
|
])
|
|
826
826
|
], 6));
|
|
827
827
|
}
|
|
828
|
-
}), yt = /* @__PURE__ */
|
|
828
|
+
}), yt = /* @__PURE__ */ v(_t, [["__scopeId", "data-v-1ee9866d"]]), gt = /* @__PURE__ */ b({
|
|
829
829
|
__name: "t-back-button",
|
|
830
830
|
props: {
|
|
831
831
|
to: {},
|
|
832
832
|
router: {}
|
|
833
833
|
},
|
|
834
834
|
setup(e) {
|
|
835
|
-
const o = e, t = ke(), s = o.router || de(), n = (
|
|
835
|
+
const o = e, t = ke(), s = o.router || de(), n = (a) => {
|
|
836
836
|
if (t.onBack) {
|
|
837
|
-
t.onBack(
|
|
837
|
+
t.onBack(a);
|
|
838
838
|
return;
|
|
839
839
|
}
|
|
840
840
|
x.lastScreen.value ? s?.back?.() : o.to && s?.push?.(o.to);
|
|
841
841
|
};
|
|
842
|
-
return (
|
|
842
|
+
return (a, i) => a.to || V(x).lastScreen ? (c(), d("button", {
|
|
843
843
|
key: 0,
|
|
844
844
|
class: "t-back-button",
|
|
845
845
|
onClick: n
|
|
846
846
|
}, [
|
|
847
|
-
g(
|
|
848
|
-
|
|
847
|
+
g(a.$slots, "default", {}, () => [
|
|
848
|
+
i[0] || (i[0] = h("i", { class: "ri-arrow-left-s-line" }, null, -1))
|
|
849
849
|
], !0)
|
|
850
850
|
])) : E("", !0);
|
|
851
851
|
}
|
|
852
|
-
}), bt = /* @__PURE__ */
|
|
852
|
+
}), bt = /* @__PURE__ */ v(gt, [["__scopeId", "data-v-dcf9d363"]]), ht = /* @__PURE__ */ b({
|
|
853
853
|
__name: "t-text",
|
|
854
854
|
props: {
|
|
855
855
|
color: { default: "var(--t-color-text)" },
|
|
@@ -865,12 +865,12 @@ const ye = /* @__PURE__ */ y(dt, [["render", ft], ["__scopeId", "data-v-c2a3436c
|
|
|
865
865
|
});
|
|
866
866
|
return (s, n) => (c(), d("span", {
|
|
867
867
|
class: "t-text",
|
|
868
|
-
style:
|
|
868
|
+
style: k(t.value)
|
|
869
869
|
}, [
|
|
870
870
|
g(s.$slots, "default", {}, void 0, !0)
|
|
871
871
|
], 4));
|
|
872
872
|
}
|
|
873
|
-
}), te = /* @__PURE__ */
|
|
873
|
+
}), te = /* @__PURE__ */ v(ht, [["__scopeId", "data-v-f0f94f05"]]), kt = /* @__PURE__ */ b({
|
|
874
874
|
__name: "t-gesture-indicator",
|
|
875
875
|
props: {
|
|
876
876
|
placement: { default: "bottom" }
|
|
@@ -880,7 +880,7 @@ const ye = /* @__PURE__ */ y(dt, [["render", ft], ["__scopeId", "data-v-c2a3436c
|
|
|
880
880
|
class: T(["t-gesture-indicator", { [o.placement]: !0 }])
|
|
881
881
|
}, null, 2));
|
|
882
882
|
}
|
|
883
|
-
}), ge = /* @__PURE__ */
|
|
883
|
+
}), ge = /* @__PURE__ */ v(kt, [["__scopeId", "data-v-ed8f7308"]]), $t = /* @__PURE__ */ b({
|
|
884
884
|
__name: "t-sheet",
|
|
885
885
|
props: {
|
|
886
886
|
background: { default: "var(--t-color-surface)" },
|
|
@@ -898,86 +898,86 @@ const ye = /* @__PURE__ */ y(dt, [["render", ft], ["__scopeId", "data-v-c2a3436c
|
|
|
898
898
|
},
|
|
899
899
|
emits: ["dismiss"],
|
|
900
900
|
setup(e, { emit: o }) {
|
|
901
|
-
const t = e, s = o, n =
|
|
902
|
-
let
|
|
903
|
-
const
|
|
901
|
+
const t = e, s = o, n = m(), a = m(), i = m(!1);
|
|
902
|
+
let l = null;
|
|
903
|
+
const u = w(() => {
|
|
904
904
|
if (t.placement == "bottom") return "down";
|
|
905
905
|
if (t.placement == "top") return "up";
|
|
906
906
|
if (t.placement == "left") return "left";
|
|
907
907
|
if (t.placement == "right") return "right";
|
|
908
|
-
}),
|
|
909
|
-
s("dismiss",
|
|
908
|
+
}), p = (r) => {
|
|
909
|
+
s("dismiss", r);
|
|
910
910
|
}, _ = () => {
|
|
911
|
-
|
|
912
|
-
|
|
911
|
+
i.value = !0, setTimeout(() => {
|
|
912
|
+
i.value = !1;
|
|
913
913
|
}, 300);
|
|
914
914
|
};
|
|
915
|
-
return O(() => n.value, (
|
|
916
|
-
|
|
915
|
+
return O(() => n.value, (r) => {
|
|
916
|
+
r && (l = ne(n.value, {
|
|
917
917
|
isMoving: !1,
|
|
918
918
|
options: {
|
|
919
919
|
minDist: 30
|
|
920
920
|
},
|
|
921
|
-
beforeEvent(
|
|
922
|
-
return !(
|
|
921
|
+
beforeEvent(y) {
|
|
922
|
+
return !(i.value || !t.gesture || t.placement == "center");
|
|
923
923
|
},
|
|
924
924
|
down() {
|
|
925
925
|
this.isMoving = !1;
|
|
926
926
|
},
|
|
927
|
-
fast({ initialDirection:
|
|
928
|
-
_(),
|
|
927
|
+
fast({ initialDirection: y }) {
|
|
928
|
+
_(), y == u.value ? s("dismiss", "gesture") : a.value.open();
|
|
929
929
|
},
|
|
930
|
-
move({ deltaY:
|
|
931
|
-
if (
|
|
930
|
+
move({ deltaY: y, deltaX: $, initialDirection: S }) {
|
|
931
|
+
if (S != u.value) return;
|
|
932
932
|
let f = 0;
|
|
933
|
-
t.placement == "bottom" || t.placement == "top" ? f =
|
|
933
|
+
t.placement == "bottom" || t.placement == "top" ? f = y : f = $, t.placement == "bottom" && (f = y > 0 ? y : 0), t.placement == "top" && (f = y < 0 ? y : 0), t.placement == "left" && (f = $ < 0 ? $ : 0), t.placement == "right" && (f = $ > 0 ? $ : 0), (t.placement == "bottom" && (f >= 10 || this.isMoving) || t.placement == "top" && (f <= -10 || this.isMoving) || t.placement == "left" && (f <= -10 || this.isMoving) || t.placement == "right" && (f >= 10 || this.isMoving)) && (this.isMoving = !0, a.value.render({
|
|
934
934
|
contentTransform: f + "px",
|
|
935
935
|
transition: "0s"
|
|
936
936
|
}));
|
|
937
937
|
},
|
|
938
|
-
up({ deltaY:
|
|
939
|
-
if (this.isMoving = !1, _(),
|
|
940
|
-
|
|
938
|
+
up({ deltaY: y, deltaX: $, initialDirection: S }) {
|
|
939
|
+
if (this.isMoving = !1, _(), S != u.value) {
|
|
940
|
+
a.value.open();
|
|
941
941
|
return;
|
|
942
942
|
}
|
|
943
943
|
let f, D, ee;
|
|
944
|
-
t.placement == "bottom" || t.placement == "top" ? (f = n.value.offsetHeight, ee =
|
|
944
|
+
t.placement == "bottom" || t.placement == "top" ? (f = n.value.offsetHeight, ee = y) : (f = n.value.offsetWidth, ee = $), D = ee / f * 100, D > 50 ? s("dismiss", "gesture") : a.value.open();
|
|
945
945
|
},
|
|
946
946
|
cancel() {
|
|
947
|
-
this.isMoving = !1, _(),
|
|
947
|
+
this.isMoving = !1, _(), a.value.open();
|
|
948
948
|
}
|
|
949
949
|
}));
|
|
950
950
|
}), oe(() => {
|
|
951
|
-
|
|
952
|
-
}), (
|
|
951
|
+
l && l.destroy();
|
|
952
|
+
}), (r, y) => (c(), C(L, {
|
|
953
953
|
ref_key: "present",
|
|
954
|
-
ref:
|
|
954
|
+
ref: a,
|
|
955
955
|
class: T(t.class),
|
|
956
956
|
placement: t.placement,
|
|
957
|
-
backdrop:
|
|
957
|
+
backdrop: r.backdrop,
|
|
958
958
|
visible: t.visible,
|
|
959
959
|
keepalive: t.keepalive,
|
|
960
|
-
onDismiss:
|
|
961
|
-
style:
|
|
960
|
+
onDismiss: p,
|
|
961
|
+
style: k(t.style)
|
|
962
962
|
}, {
|
|
963
963
|
default: P(() => [
|
|
964
964
|
t.gesture && t.indicator && t.placement != "center" ? (c(), C(ge, {
|
|
965
965
|
key: 0,
|
|
966
966
|
placement: t.placement
|
|
967
967
|
}, null, 8, ["placement"])) : E("", !0),
|
|
968
|
-
|
|
969
|
-
class: T(["t-sheet", { fullscreen: t.fullscreen, [t.placement]: !0, rounded:
|
|
970
|
-
style:
|
|
968
|
+
h("div", {
|
|
969
|
+
class: T(["t-sheet", { fullscreen: t.fullscreen, [t.placement]: !0, rounded: r.rounded, radius: t.radius }]),
|
|
970
|
+
style: k({ "--background": t.background }),
|
|
971
971
|
ref_key: "sheet",
|
|
972
972
|
ref: n
|
|
973
973
|
}, [
|
|
974
|
-
g(
|
|
974
|
+
g(r.$slots, "default", {}, void 0, !0)
|
|
975
975
|
], 6)
|
|
976
976
|
]),
|
|
977
977
|
_: 3
|
|
978
978
|
}, 8, ["class", "placement", "backdrop", "visible", "keepalive", "style"]));
|
|
979
979
|
}
|
|
980
|
-
}), wt = /* @__PURE__ */
|
|
980
|
+
}), wt = /* @__PURE__ */ v($t, [["__scopeId", "data-v-71a5b877"]]), xt = { class: "t-input-label" }, Tt = { class: "t-input-content" }, St = ["type", "placeholder", "value"], zt = /* @__PURE__ */ b({
|
|
981
981
|
__name: "t-input",
|
|
982
982
|
props: {
|
|
983
983
|
size: { default: "standard" },
|
|
@@ -992,23 +992,23 @@ const ye = /* @__PURE__ */ y(dt, [["render", ft], ["__scopeId", "data-v-c2a3436c
|
|
|
992
992
|
},
|
|
993
993
|
emits: ["update:modelValue"],
|
|
994
994
|
setup(e, { emit: o }) {
|
|
995
|
-
const t = e, s = o, n = (
|
|
996
|
-
s("update:modelValue",
|
|
995
|
+
const t = e, s = o, n = (a) => {
|
|
996
|
+
s("update:modelValue", a.target.value);
|
|
997
997
|
};
|
|
998
|
-
return (
|
|
998
|
+
return (a, i) => (c(), d("div", {
|
|
999
999
|
class: T(["t-input", { rounded: t.rounded, ["size-" + t.size]: !0, ["variant-" + t.variant]: !0 }])
|
|
1000
1000
|
}, [
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
g(
|
|
1005
|
-
|
|
1006
|
-
type:
|
|
1007
|
-
placeholder:
|
|
1008
|
-
value:
|
|
1001
|
+
h("label", null, [
|
|
1002
|
+
h("span", xt, R(a.label), 1),
|
|
1003
|
+
h("div", Tt, [
|
|
1004
|
+
g(a.$slots, "start", {}, void 0, !0),
|
|
1005
|
+
h("input", {
|
|
1006
|
+
type: a.type,
|
|
1007
|
+
placeholder: a.placeholder,
|
|
1008
|
+
value: a.modelValue,
|
|
1009
1009
|
onInput: n
|
|
1010
1010
|
}, null, 40, St),
|
|
1011
|
-
g(
|
|
1011
|
+
g(a.$slots, "end", {}, void 0, !0)
|
|
1012
1012
|
])
|
|
1013
1013
|
]),
|
|
1014
1014
|
t.error ? (c(), C(te, {
|
|
@@ -1030,23 +1030,23 @@ const ye = /* @__PURE__ */ y(dt, [["render", ft], ["__scopeId", "data-v-c2a3436c
|
|
|
1030
1030
|
})) : E("", !0)
|
|
1031
1031
|
], 2));
|
|
1032
1032
|
}
|
|
1033
|
-
}), It = /* @__PURE__ */
|
|
1033
|
+
}), It = /* @__PURE__ */ v(zt, [["__scopeId", "data-v-1a9425cf"]]), Et = {};
|
|
1034
1034
|
function Bt(e, o) {
|
|
1035
1035
|
return c(), d("textarea");
|
|
1036
1036
|
}
|
|
1037
|
-
const Ct = /* @__PURE__ */
|
|
1037
|
+
const Ct = /* @__PURE__ */ v(Et, [["render", Bt]]), Vt = {};
|
|
1038
1038
|
function Pt(e, o) {
|
|
1039
1039
|
return c(), d("div");
|
|
1040
1040
|
}
|
|
1041
|
-
const At = /* @__PURE__ */
|
|
1041
|
+
const At = /* @__PURE__ */ v(Vt, [["render", Pt]]), Rt = {}, Mt = { class: "t-grid" };
|
|
1042
1042
|
function Dt(e, o) {
|
|
1043
1043
|
return c(), d("div", Mt);
|
|
1044
1044
|
}
|
|
1045
|
-
const Xt = /* @__PURE__ */
|
|
1045
|
+
const Xt = /* @__PURE__ */ v(Rt, [["render", Dt]]), Ot = {}, Nt = { class: "t-grid-item" };
|
|
1046
1046
|
function qt(e, o) {
|
|
1047
1047
|
return c(), d("div", Nt);
|
|
1048
1048
|
}
|
|
1049
|
-
const Lt = /* @__PURE__ */
|
|
1049
|
+
const Lt = /* @__PURE__ */ v(Ot, [["render", qt]]), Wt = /* @__PURE__ */ b({
|
|
1050
1050
|
__name: "t-divider",
|
|
1051
1051
|
props: {
|
|
1052
1052
|
direction: { default: "horizontal" }
|
|
@@ -1057,43 +1057,43 @@ const Lt = /* @__PURE__ */ y(Ot, [["render", qt]]), Wt = /* @__PURE__ */ b({
|
|
|
1057
1057
|
class: T(["t-divider", { [o.direction]: !0 }])
|
|
1058
1058
|
}, null, 2));
|
|
1059
1059
|
}
|
|
1060
|
-
}), Ht = /* @__PURE__ */
|
|
1060
|
+
}), Ht = /* @__PURE__ */ v(Wt, [["__scopeId", "data-v-47ee8991"]]), Gt = /* @__PURE__ */ b({
|
|
1061
1061
|
__name: "t-toggle-password",
|
|
1062
1062
|
props: {
|
|
1063
1063
|
color: { default: "warning" }
|
|
1064
1064
|
},
|
|
1065
1065
|
emits: ["change"],
|
|
1066
1066
|
setup(e, { emit: o }) {
|
|
1067
|
-
const t = e, s = o, n =
|
|
1068
|
-
let
|
|
1069
|
-
return ["warning", "info", "danger", "primary", "secondary", "success"].includes(t.color) && (
|
|
1070
|
-
"--color":
|
|
1067
|
+
const t = e, s = o, n = m(!1), a = m(), i = w(() => {
|
|
1068
|
+
let p = t.color;
|
|
1069
|
+
return ["warning", "info", "danger", "primary", "secondary", "success"].includes(t.color) && (p = `var(--t-color-status-${t.color})`), {
|
|
1070
|
+
"--color": p
|
|
1071
1071
|
};
|
|
1072
|
-
}),
|
|
1072
|
+
}), l = () => a.value?.parentElement?.querySelector?.("input");
|
|
1073
1073
|
se(() => {
|
|
1074
|
-
let
|
|
1075
|
-
|
|
1074
|
+
let p = l();
|
|
1075
|
+
p && (n.value = p.type != "password", s("change", n.value));
|
|
1076
1076
|
});
|
|
1077
|
-
const
|
|
1078
|
-
let
|
|
1079
|
-
|
|
1077
|
+
const u = () => {
|
|
1078
|
+
let p = l();
|
|
1079
|
+
p && (n.value = !n.value, n.value ? p.type = "text" : p.type = "password", s("change", n.value));
|
|
1080
1080
|
};
|
|
1081
|
-
return (
|
|
1081
|
+
return (p, _) => (c(), d("button", {
|
|
1082
1082
|
ref_key: "toggle",
|
|
1083
|
-
ref:
|
|
1083
|
+
ref: a,
|
|
1084
1084
|
class: "t-toggle-password",
|
|
1085
|
-
style:
|
|
1086
|
-
onClick:
|
|
1085
|
+
style: k(i.value),
|
|
1086
|
+
onClick: u
|
|
1087
1087
|
}, [
|
|
1088
|
-
n.value ? g(
|
|
1089
|
-
_[0] || (_[0] =
|
|
1088
|
+
n.value ? g(p.$slots, "on", { key: 0 }, () => [
|
|
1089
|
+
_[0] || (_[0] = h("i", { class: "ri-eye-line" }, null, -1))
|
|
1090
1090
|
], !0) : E("", !0),
|
|
1091
|
-
n.value ? E("", !0) : g(
|
|
1092
|
-
_[1] || (_[1] =
|
|
1091
|
+
n.value ? E("", !0) : g(p.$slots, "off", { key: 1 }, () => [
|
|
1092
|
+
_[1] || (_[1] = h("i", { class: "ri-eye-off-line" }, null, -1))
|
|
1093
1093
|
], !0)
|
|
1094
1094
|
], 4));
|
|
1095
1095
|
}
|
|
1096
|
-
}), Ut = /* @__PURE__ */
|
|
1096
|
+
}), Ut = /* @__PURE__ */ v(Gt, [["__scopeId", "data-v-3268e9e3"]]), jt = /* @__PURE__ */ b({
|
|
1097
1097
|
__name: "t-avatar",
|
|
1098
1098
|
props: {
|
|
1099
1099
|
square: { type: Boolean, default: !1 },
|
|
@@ -1103,12 +1103,12 @@ const Lt = /* @__PURE__ */ y(Ot, [["render", qt]]), Wt = /* @__PURE__ */ b({
|
|
|
1103
1103
|
const o = e, t = w(() => o.size == "small" ? "24px" : o.size == "standard" ? "40px" : o.size == "large" ? "60px" : o.size);
|
|
1104
1104
|
return (s, n) => (c(), d("div", {
|
|
1105
1105
|
class: T(["t-avatar", { square: s.square }]),
|
|
1106
|
-
style:
|
|
1106
|
+
style: k({ "--size": t.value })
|
|
1107
1107
|
}, [
|
|
1108
1108
|
g(s.$slots, "default", {}, void 0, !0)
|
|
1109
1109
|
], 6));
|
|
1110
1110
|
}
|
|
1111
|
-
}), Ft = /* @__PURE__ */
|
|
1111
|
+
}), Ft = /* @__PURE__ */ v(jt, [["__scopeId", "data-v-24384c2f"]]), Kt = { class: "t-collapse-title" }, Jt = {
|
|
1112
1112
|
key: 0,
|
|
1113
1113
|
class: "icon"
|
|
1114
1114
|
}, Qt = {
|
|
@@ -1121,38 +1121,38 @@ const Lt = /* @__PURE__ */ y(Ot, [["render", qt]]), Wt = /* @__PURE__ */ b({
|
|
|
1121
1121
|
},
|
|
1122
1122
|
emits: ["change"],
|
|
1123
1123
|
setup(e, { emit: o }) {
|
|
1124
|
-
const t = e, s = o, n =
|
|
1125
|
-
n.value = !n.value,
|
|
1124
|
+
const t = e, s = o, n = m(!1), a = m(""), i = m(), l = () => {
|
|
1125
|
+
n.value = !n.value, a.value = `calc(${i.value.offsetHeight}px + 2rem)`, s("change", n.value);
|
|
1126
1126
|
};
|
|
1127
|
-
return s("change", n.value), (
|
|
1127
|
+
return s("change", n.value), (u, p) => (c(), d("div", {
|
|
1128
1128
|
class: T(["t-collapse", { open: n.value }]),
|
|
1129
|
-
style:
|
|
1129
|
+
style: k({ "--height": a.value })
|
|
1130
1130
|
}, [
|
|
1131
|
-
|
|
1131
|
+
h("div", {
|
|
1132
1132
|
class: "t-collapse-header",
|
|
1133
|
-
onClick:
|
|
1133
|
+
onClick: l
|
|
1134
1134
|
}, [
|
|
1135
|
-
g(
|
|
1136
|
-
|
|
1137
|
-
g(
|
|
1135
|
+
g(u.$slots, "icon"),
|
|
1136
|
+
h("div", Kt, [
|
|
1137
|
+
g(u.$slots, "title", {}, () => [
|
|
1138
1138
|
N(R(t.title), 1)
|
|
1139
1139
|
])
|
|
1140
1140
|
]),
|
|
1141
|
-
g(
|
|
1142
|
-
n.value ? (c(), d("div", Jt, [...
|
|
1143
|
-
|
|
1144
|
-
])])) : (c(), d("div", Qt, [...
|
|
1145
|
-
|
|
1141
|
+
g(u.$slots, "toggle", {}, () => [
|
|
1142
|
+
n.value ? (c(), d("div", Jt, [...p[0] || (p[0] = [
|
|
1143
|
+
h("i", { class: "ri-arrow-up-s-line" }, null, -1)
|
|
1144
|
+
])])) : (c(), d("div", Qt, [...p[1] || (p[1] = [
|
|
1145
|
+
h("i", { class: "ri-arrow-down-s-line" }, null, -1)
|
|
1146
1146
|
])]))
|
|
1147
1147
|
])
|
|
1148
1148
|
]),
|
|
1149
|
-
|
|
1150
|
-
|
|
1149
|
+
h("div", Zt, [
|
|
1150
|
+
h("div", {
|
|
1151
1151
|
ref_key: "content",
|
|
1152
|
-
ref:
|
|
1152
|
+
ref: i
|
|
1153
1153
|
}, [
|
|
1154
|
-
g(
|
|
1155
|
-
g(
|
|
1154
|
+
g(u.$slots, "content", {}, () => [
|
|
1155
|
+
g(u.$slots, "default")
|
|
1156
1156
|
])
|
|
1157
1157
|
], 512)
|
|
1158
1158
|
])
|
|
@@ -1168,25 +1168,25 @@ const Lt = /* @__PURE__ */ y(Ot, [["render", qt]]), Wt = /* @__PURE__ */ b({
|
|
|
1168
1168
|
setup(e, { emit: o }) {
|
|
1169
1169
|
const t = e, s = o, n = () => {
|
|
1170
1170
|
s("update:modelValue", !t.modelValue);
|
|
1171
|
-
},
|
|
1172
|
-
let
|
|
1171
|
+
}, a = w(() => {
|
|
1172
|
+
let i = {
|
|
1173
1173
|
"--background": t.color,
|
|
1174
1174
|
"--color": "#ffffff"
|
|
1175
1175
|
};
|
|
1176
|
-
return ["warning", "info", "danger", "primary", "secondary", "success"].includes(t.color) && (
|
|
1176
|
+
return ["warning", "info", "danger", "primary", "secondary", "success"].includes(t.color) && (i = {
|
|
1177
1177
|
"--background": `var(--t-color-status-${t.color})`,
|
|
1178
1178
|
"--color": `var(--t-color-status-${t.color}-text)`
|
|
1179
|
-
}),
|
|
1179
|
+
}), i;
|
|
1180
1180
|
});
|
|
1181
|
-
return (
|
|
1181
|
+
return (i, l) => (c(), d("div", {
|
|
1182
1182
|
class: T(["t-switch", { on: t.modelValue }]),
|
|
1183
|
-
style:
|
|
1183
|
+
style: k(a.value),
|
|
1184
1184
|
onClick: n
|
|
1185
|
-
}, [...
|
|
1186
|
-
|
|
1185
|
+
}, [...l[0] || (l[0] = [
|
|
1186
|
+
h("div", { class: "t-switch-icon" }, null, -1)
|
|
1187
1187
|
])], 6));
|
|
1188
1188
|
}
|
|
1189
|
-
}), to = /* @__PURE__ */
|
|
1189
|
+
}), to = /* @__PURE__ */ v(eo, [["__scopeId", "data-v-3616970e"]]), oo = /* @__PURE__ */ b({
|
|
1190
1190
|
__name: "t-tab",
|
|
1191
1191
|
props: {
|
|
1192
1192
|
value: {}
|
|
@@ -1195,7 +1195,7 @@ const Lt = /* @__PURE__ */ y(Ot, [["render", qt]]), Wt = /* @__PURE__ */ b({
|
|
|
1195
1195
|
const o = e, t = ue("tabsState"), s = w(() => t.active.value === o.value), n = () => {
|
|
1196
1196
|
t.setActive(o.value);
|
|
1197
1197
|
};
|
|
1198
|
-
return (
|
|
1198
|
+
return (a, i) => (c(), d("li", {
|
|
1199
1199
|
class: T(["t-tab", { active: s.value }])
|
|
1200
1200
|
}, [
|
|
1201
1201
|
U(J, {
|
|
@@ -1205,13 +1205,13 @@ const Lt = /* @__PURE__ */ y(Ot, [["render", qt]]), Wt = /* @__PURE__ */ b({
|
|
|
1205
1205
|
color: s.value && V(t).variant == "text" ? V(t).color : void 0
|
|
1206
1206
|
}, {
|
|
1207
1207
|
default: P(() => [
|
|
1208
|
-
g(
|
|
1208
|
+
g(a.$slots, "default", {}, void 0, !0)
|
|
1209
1209
|
]),
|
|
1210
1210
|
_: 3
|
|
1211
1211
|
}, 8, ["size", "color"])
|
|
1212
1212
|
], 2));
|
|
1213
1213
|
}
|
|
1214
|
-
}), so = /* @__PURE__ */
|
|
1214
|
+
}), so = /* @__PURE__ */ v(oo, [["__scopeId", "data-v-f810d905"]]), no = /* @__PURE__ */ b({
|
|
1215
1215
|
__name: "t-tabs",
|
|
1216
1216
|
props: {
|
|
1217
1217
|
placement: { default: "top-start" },
|
|
@@ -1223,46 +1223,46 @@ const Lt = /* @__PURE__ */ y(Ot, [["render", qt]]), Wt = /* @__PURE__ */ b({
|
|
|
1223
1223
|
},
|
|
1224
1224
|
emits: ["update:modelValue"],
|
|
1225
1225
|
setup(e, { emit: o }) {
|
|
1226
|
-
const t = e, s = o, n =
|
|
1227
|
-
let
|
|
1228
|
-
return ["warning", "info", "danger", "primary", "secondary", "success"].includes(
|
|
1229
|
-
}),
|
|
1226
|
+
const t = e, s = o, n = m("0px"), a = m(), i = w(() => {
|
|
1227
|
+
let u = t.color;
|
|
1228
|
+
return ["warning", "info", "danger", "primary", "secondary", "success"].includes(u) && (u = `var(--t-color-status-${u})`), u;
|
|
1229
|
+
}), l = () => {
|
|
1230
1230
|
setTimeout(() => {
|
|
1231
1231
|
if (t.placement.startsWith("top-") || t.placement.startsWith("bottom-")) {
|
|
1232
|
-
let
|
|
1233
|
-
if (
|
|
1234
|
-
let
|
|
1235
|
-
n.value =
|
|
1232
|
+
let u = a.value.querySelector(".active");
|
|
1233
|
+
if (u) {
|
|
1234
|
+
let p = u.getBoundingClientRect().left - a.value.getBoundingClientRect().left + a.value.scrollLeft, _ = u.offsetWidth / 2;
|
|
1235
|
+
n.value = p + _ - t.border / 2 + "px";
|
|
1236
1236
|
}
|
|
1237
1237
|
} else if (t.placement.startsWith("left-") || t.placement.startsWith("right-")) {
|
|
1238
|
-
let
|
|
1239
|
-
if (
|
|
1240
|
-
let
|
|
1241
|
-
n.value =
|
|
1238
|
+
let u = a.value.querySelector(".active");
|
|
1239
|
+
if (u) {
|
|
1240
|
+
let p = u.getBoundingClientRect().top - a.value.getBoundingClientRect().top + a.value.scrollTop, _ = u.offsetHeight / 2;
|
|
1241
|
+
n.value = p + _ - t.border / 2 + "px";
|
|
1242
1242
|
}
|
|
1243
1243
|
}
|
|
1244
1244
|
}, 50);
|
|
1245
1245
|
};
|
|
1246
1246
|
return ie("tabsState", {
|
|
1247
1247
|
active: w(() => t.modelValue),
|
|
1248
|
-
color:
|
|
1248
|
+
color: i.value,
|
|
1249
1249
|
size: t.size,
|
|
1250
1250
|
variant: t.variant,
|
|
1251
|
-
setActive: (
|
|
1252
|
-
s("update:modelValue",
|
|
1251
|
+
setActive: (u) => {
|
|
1252
|
+
s("update:modelValue", u), l();
|
|
1253
1253
|
}
|
|
1254
1254
|
}), se(() => {
|
|
1255
|
-
|
|
1256
|
-
}), (
|
|
1255
|
+
l();
|
|
1256
|
+
}), (u, p) => (c(), d("ul", {
|
|
1257
1257
|
ref_key: "container",
|
|
1258
|
-
ref:
|
|
1259
|
-
class: T(["t-tabs", { [
|
|
1260
|
-
style:
|
|
1258
|
+
ref: a,
|
|
1259
|
+
class: T(["t-tabs", { [u.placement]: !0, [u.variant]: !0 }]),
|
|
1260
|
+
style: k({ "--color": i.value, "--transform": n.value, "--border": u.border + "px" })
|
|
1261
1261
|
}, [
|
|
1262
|
-
g(
|
|
1262
|
+
g(u.$slots, "default", {}, void 0, !0)
|
|
1263
1263
|
], 6));
|
|
1264
1264
|
}
|
|
1265
|
-
}), ro = /* @__PURE__ */
|
|
1265
|
+
}), ro = /* @__PURE__ */ v(no, [["__scopeId", "data-v-3a46d2df"]]), ao = /* @__PURE__ */ b({
|
|
1266
1266
|
__name: "t-loading-app",
|
|
1267
1267
|
setup(e) {
|
|
1268
1268
|
return (o, t) => (c(), C(_e, null, {
|
|
@@ -1272,7 +1272,7 @@ const Lt = /* @__PURE__ */ y(Ot, [["render", qt]]), Wt = /* @__PURE__ */ b({
|
|
|
1272
1272
|
_: 1
|
|
1273
1273
|
}));
|
|
1274
1274
|
}
|
|
1275
|
-
}), lo = /* @__PURE__ */
|
|
1275
|
+
}), lo = /* @__PURE__ */ v(ao, [["__scopeId", "data-v-1436aa9f"]]), co = { key: 0 }, io = {
|
|
1276
1276
|
key: 0,
|
|
1277
1277
|
class: "t-checkbox-label"
|
|
1278
1278
|
}, uo = /* @__PURE__ */ b({
|
|
@@ -1289,46 +1289,46 @@ const Lt = /* @__PURE__ */ y(Ot, [["render", qt]]), Wt = /* @__PURE__ */ b({
|
|
|
1289
1289
|
emits: ["update:modelValue"],
|
|
1290
1290
|
setup(e, { emit: o }) {
|
|
1291
1291
|
const t = e, s = o, n = w(() => {
|
|
1292
|
-
let
|
|
1292
|
+
let l = {
|
|
1293
1293
|
"--background": t.color,
|
|
1294
1294
|
"--color": "#ffffff"
|
|
1295
1295
|
};
|
|
1296
|
-
return ["warning", "info", "danger", "primary", "secondary", "success"].includes(t.color) && (
|
|
1296
|
+
return ["warning", "info", "danger", "primary", "secondary", "success"].includes(t.color) && (l = {
|
|
1297
1297
|
"--background": `var(--t-color-status-${t.color})`,
|
|
1298
1298
|
"--color": `var(--t-color-status-${t.color}-text)`
|
|
1299
|
-
}),
|
|
1300
|
-
}),
|
|
1299
|
+
}), l;
|
|
1300
|
+
}), a = w(() => t.multiple ? t.modelValue.includes(t.value) : t.value === void 0 ? t.modelValue : t.modelValue == t.value), i = () => {
|
|
1301
1301
|
if (t.multiple) {
|
|
1302
|
-
let
|
|
1303
|
-
t.modelValue.includes(t.value) ?
|
|
1302
|
+
let l = t.modelValue;
|
|
1303
|
+
t.modelValue.includes(t.value) ? l.splice(l.indexOf(t.value), 1) : l.push(t.value), s("update:modelValue", l);
|
|
1304
1304
|
} else t.value === void 0 ? s("update:modelValue", !t.modelValue) : s("update:modelValue", t.value);
|
|
1305
1305
|
};
|
|
1306
|
-
return (
|
|
1307
|
-
class: T(["t-checkbox", { active:
|
|
1308
|
-
style:
|
|
1309
|
-
onClick:
|
|
1306
|
+
return (l, u) => (c(), d("div", {
|
|
1307
|
+
class: T(["t-checkbox", { active: a.value }]),
|
|
1308
|
+
style: k(n.value),
|
|
1309
|
+
onClick: i
|
|
1310
1310
|
}, [
|
|
1311
|
-
|
|
1312
|
-
class: T(`t-checkbox-${
|
|
1311
|
+
h("div", {
|
|
1312
|
+
class: T(`t-checkbox-${l.type}`)
|
|
1313
1313
|
}, [
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
|
|
1314
|
+
l.type == "radio" ? (c(), d("div", co)) : E("", !0),
|
|
1315
|
+
l.type == "check" ? g(l.$slots, "icon", { key: 1 }, () => [
|
|
1316
|
+
u[0] || (u[0] = h("i", { class: "ri-check-line" }, null, -1))
|
|
1317
1317
|
], !0) : E("", !0)
|
|
1318
1318
|
], 2),
|
|
1319
|
-
|
|
1319
|
+
l.label ? (c(), d("span", io, R(t.label), 1)) : E("", !0)
|
|
1320
1320
|
], 6));
|
|
1321
1321
|
}
|
|
1322
|
-
}), po = /* @__PURE__ */
|
|
1322
|
+
}), po = /* @__PURE__ */ v(uo, [["__scopeId", "data-v-05513114"]]), fo = /* @__PURE__ */ b({
|
|
1323
1323
|
__name: "t-keyboard",
|
|
1324
1324
|
setup(e) {
|
|
1325
1325
|
const { height: o } = ve();
|
|
1326
1326
|
return (t, s) => (c(), d("div", {
|
|
1327
1327
|
class: "t-keyboard",
|
|
1328
|
-
style:
|
|
1328
|
+
style: k({ "--height": V(o) + "px" })
|
|
1329
1329
|
}, null, 4));
|
|
1330
1330
|
}
|
|
1331
|
-
}), mo = /* @__PURE__ */
|
|
1331
|
+
}), mo = /* @__PURE__ */ v(fo, [["__scopeId", "data-v-5d3fa1da"]]), vo = /* @__PURE__ */ b({
|
|
1332
1332
|
__name: "t-skeleton",
|
|
1333
1333
|
props: {
|
|
1334
1334
|
width: { default: "100%" },
|
|
@@ -1344,10 +1344,10 @@ const Lt = /* @__PURE__ */ y(Ot, [["render", qt]]), Wt = /* @__PURE__ */ b({
|
|
|
1344
1344
|
}));
|
|
1345
1345
|
return (s, n) => (c(), d("div", {
|
|
1346
1346
|
class: "t-skeleton",
|
|
1347
|
-
style:
|
|
1347
|
+
style: k(t.value)
|
|
1348
1348
|
}, null, 4));
|
|
1349
1349
|
}
|
|
1350
|
-
}), _o = /* @__PURE__ */
|
|
1350
|
+
}), _o = /* @__PURE__ */ v(vo, [["__scopeId", "data-v-877bbdb5"]]), yo = /* @__PURE__ */ b({
|
|
1351
1351
|
__name: "t-ripple",
|
|
1352
1352
|
props: {
|
|
1353
1353
|
color: { default: "primary" }
|
|
@@ -1365,10 +1365,10 @@ const Lt = /* @__PURE__ */ y(Ot, [["render", qt]]), Wt = /* @__PURE__ */ b({
|
|
|
1365
1365
|
});
|
|
1366
1366
|
return (s, n) => (c(), d("div", {
|
|
1367
1367
|
class: "t-ripple",
|
|
1368
|
-
style:
|
|
1368
|
+
style: k(t.value)
|
|
1369
1369
|
}, null, 4));
|
|
1370
1370
|
}
|
|
1371
|
-
}), go = /* @__PURE__ */
|
|
1371
|
+
}), go = /* @__PURE__ */ v(yo, [["__scopeId", "data-v-42cb3d71"]]), So = () => ({
|
|
1372
1372
|
install: (e) => {
|
|
1373
1373
|
Te(), e.component("t-app", Ee), e.component("t-screen", ye), e.component("t-swipe-screen", vt), e.component("t-cable", nt), e.component("t-toolbar", yt), e.component("t-content", _e), e.component("t-card", rt), e.component("t-refresher", ut), e.component("t-button", J), e.component("t-back-button", bt), e.component("t-present", L), e.component("t-text", te), e.component("t-sheet", wt), e.component("t-gesture-indicator", ge), e.component("t-input", It), e.component("t-textarea", Ct), e.component("t-rich-text", At), e.component("t-grid", Xt), e.component("t-grid-item", Lt), e.component("t-divider", Ht), e.component("t-toggle-password", Ut), e.component("t-loading-icon", K), e.component("t-alert", pe), e.component("t-avatar", Ft), e.component("t-collapse", Yt), e.component("t-toast", me), e.component("t-switch", to), e.component("t-tab", so), e.component("t-tabs", ro), e.component("t-loading-app", lo), e.component("t-checkbox", po), e.component("t-keyboard", mo), e.component("t-skeleton", _o), e.component("t-ripple", go);
|
|
1374
1374
|
}
|