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