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