@toife/vue 1.2.6 → 1.2.8
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 +226 -224
- 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 p, openBlock as c, renderSlot as
|
|
1
|
+
import { createElementBlock as p, openBlock as c, renderSlot as g, defineComponent as k, ref as _, computed as z, reactive as ee, watch as X, Fragment as R, withDirectives as O, createCommentVNode as I, normalizeStyle as w, normalizeClass as x, vShow as N, createElementVNode as h, createVNode as W, createBlock as B, withCtx as E, toDisplayString as V, renderList as q, createTextVNode as D, createApp as Y, h as H, unref as P, onUnmounted as G, onMounted as K, resolveDynamicComponent as le, markRaw as ce, inject as ie, provide as ue } from "vue";
|
|
2
2
|
import { gesture as M } from "@toife/gesture";
|
|
3
|
-
import { useRouter as
|
|
4
|
-
const
|
|
3
|
+
import { useRouter as te, useRoute as de } from "vue-router";
|
|
4
|
+
const pe = (o) => o && (o.tagName == "INPUT" || o.tagName == "TEXTAREA" || o.isContentEditable), fe = () => {
|
|
5
5
|
const o = document.activeElement;
|
|
6
6
|
o && (o.tagName === "INPUT" || o.tagName === "TEXTAREA" || o.isContentEditable) && o.blur();
|
|
7
|
-
},
|
|
7
|
+
}, me = () => {
|
|
8
8
|
document.addEventListener("contextmenu", (o) => o.preventDefault()), document.addEventListener("selectstart", (o) => o.preventDefault()), document.addEventListener("pointerup", (o) => {
|
|
9
|
-
!
|
|
9
|
+
!pe(o.target) && fe();
|
|
10
10
|
});
|
|
11
11
|
}, y = (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
|
-
},
|
|
17
|
-
function
|
|
18
|
-
return c(), p("div",
|
|
19
|
-
|
|
16
|
+
}, ve = {}, _e = { class: "t-app" };
|
|
17
|
+
function ye(o, s) {
|
|
18
|
+
return c(), p("div", _e, [
|
|
19
|
+
g(o.$slots, "default")
|
|
20
20
|
]);
|
|
21
21
|
}
|
|
22
|
-
const
|
|
22
|
+
const ge = /* @__PURE__ */ y(ve, [["render", ye]]), be = /* @__PURE__ */ k({
|
|
23
23
|
__name: "t-present",
|
|
24
24
|
props: {
|
|
25
25
|
keepalive: { type: Boolean, default: !0 },
|
|
@@ -29,14 +29,14 @@ const ye = /* @__PURE__ */ y(me, [["render", _e]]), ge = /* @__PURE__ */ k({
|
|
|
29
29
|
},
|
|
30
30
|
emits: ["dismiss"],
|
|
31
31
|
setup(o, { expose: s, emit: e }) {
|
|
32
|
-
const t = _(0), n = _(!1), r = _(), i = _(), a = o, u = e, f =
|
|
32
|
+
const t = _(0), n = _(!1), r = _(), i = _(), a = o, u = e, f = z(() => n.value || a.keepalive), m = ee({
|
|
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
37
|
}), l = (v) => {
|
|
38
38
|
a.backdrop ? v?.backdropOpacity && (m["--t-present-backdrop-opacity"] = v.backdropOpacity) : m["--t-present-backdrop-opacity"] = "0", v?.transition && (m["--t-present-transition"] = v.transition, m["--t-present-transition"] = v.transition), v?.contentTransform && (m["--t-present-content-transform"] = v.contentTransform), v?.contentOpacity && (m["--t-present-content-opacity"] = v.contentOpacity);
|
|
39
|
-
},
|
|
39
|
+
}, $ = () => {
|
|
40
40
|
l({
|
|
41
41
|
contentTransform: "0px",
|
|
42
42
|
transition: "0.2s",
|
|
@@ -44,29 +44,29 @@ const ye = /* @__PURE__ */ y(me, [["render", _e]]), ge = /* @__PURE__ */ k({
|
|
|
44
44
|
contentOpacity: "1"
|
|
45
45
|
});
|
|
46
46
|
}, d = () => {
|
|
47
|
-
let v = "0px",
|
|
48
|
-
a.placement == "bottom" || a.placement == "right" ? v = "100%" : a.placement == "top" || a.placement == "left" ? v = "-100%" : a.placement == "center" && (v = "0px",
|
|
47
|
+
let v = "0px", S = "1";
|
|
48
|
+
a.placement == "bottom" || a.placement == "right" ? v = "100%" : a.placement == "top" || a.placement == "left" ? v = "-100%" : a.placement == "center" && (v = "0px", S = "0"), l({
|
|
49
49
|
contentTransform: v,
|
|
50
50
|
transition: "0.2s",
|
|
51
|
-
contentOpacity:
|
|
51
|
+
contentOpacity: S,
|
|
52
52
|
backdropOpacity: "0"
|
|
53
53
|
});
|
|
54
54
|
};
|
|
55
55
|
X(() => a.visible, () => {
|
|
56
|
-
a.visible ? (n.value = !0, t.value =
|
|
57
|
-
|
|
56
|
+
a.visible ? (n.value = !0, t.value = Ve.getNewIndex(), setTimeout(() => {
|
|
57
|
+
$();
|
|
58
58
|
}, 50)) : (d(), setTimeout(() => {
|
|
59
59
|
n.value = !1;
|
|
60
60
|
}, 200));
|
|
61
61
|
}), s({
|
|
62
62
|
render: l,
|
|
63
|
-
open:
|
|
63
|
+
open: $,
|
|
64
64
|
close: d
|
|
65
65
|
});
|
|
66
|
-
const
|
|
66
|
+
const b = (v) => {
|
|
67
67
|
v.preventDefault(), u("dismiss", "backdrop");
|
|
68
68
|
};
|
|
69
|
-
return d(), (v,
|
|
69
|
+
return d(), (v, S) => (c(), p(R, null, [
|
|
70
70
|
f.value ? O((c(), p("div", {
|
|
71
71
|
key: 0,
|
|
72
72
|
class: x(["t-present", { [v.placement]: !0 }]),
|
|
@@ -74,14 +74,14 @@ const ye = /* @__PURE__ */ y(me, [["render", _e]]), ge = /* @__PURE__ */ k({
|
|
|
74
74
|
ref: i,
|
|
75
75
|
style: w({ ...m, zIndex: t.value })
|
|
76
76
|
}, [
|
|
77
|
-
|
|
77
|
+
g(v.$slots, "default", {}, void 0, !0)
|
|
78
78
|
], 6)), [
|
|
79
79
|
[N, n.value]
|
|
80
80
|
]) : I("", !0),
|
|
81
81
|
f.value ? O((c(), p("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
87
|
style: w({ ...m, zIndex: t.value - 1 })
|
|
@@ -90,7 +90,7 @@ const ye = /* @__PURE__ */ y(me, [["render", _e]]), ge = /* @__PURE__ */ k({
|
|
|
90
90
|
]) : I("", !0)
|
|
91
91
|
], 64));
|
|
92
92
|
}
|
|
93
|
-
}), L = /* @__PURE__ */ y(
|
|
93
|
+
}), L = /* @__PURE__ */ y(be, [["__scopeId", "data-v-3d0c3227"]]), he = /* @__PURE__ */ k({
|
|
94
94
|
__name: "t-loading-icon",
|
|
95
95
|
props: {
|
|
96
96
|
size: {
|
|
@@ -114,10 +114,10 @@ const ye = /* @__PURE__ */ y(me, [["render", _e]]), ge = /* @__PURE__ */ k({
|
|
|
114
114
|
"aria-label": "Loading..."
|
|
115
115
|
}, null, 4));
|
|
116
116
|
}
|
|
117
|
-
}), U = /* @__PURE__ */ y(
|
|
117
|
+
}), U = /* @__PURE__ */ y(he, [["__scopeId", "data-v-7c463303"]]), ke = {
|
|
118
118
|
key: 0,
|
|
119
119
|
class: "loader"
|
|
120
|
-
},
|
|
120
|
+
}, $e = /* @__PURE__ */ k({
|
|
121
121
|
__name: "t-button",
|
|
122
122
|
props: {
|
|
123
123
|
color: { default: null },
|
|
@@ -130,7 +130,7 @@ const ye = /* @__PURE__ */ y(me, [["render", _e]]), ge = /* @__PURE__ */ k({
|
|
|
130
130
|
activeBackground: { type: Boolean, default: !1 }
|
|
131
131
|
},
|
|
132
132
|
setup(o) {
|
|
133
|
-
const s = o, e =
|
|
133
|
+
const s = o, e = z(() => {
|
|
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",
|
|
@@ -175,11 +175,11 @@ const ye = /* @__PURE__ */ y(me, [["render", _e]]), ge = /* @__PURE__ */ k({
|
|
|
175
175
|
style: w(e.value)
|
|
176
176
|
}, [
|
|
177
177
|
O(h("span", null, [
|
|
178
|
-
|
|
178
|
+
g(t.$slots, "default", {}, void 0, !0)
|
|
179
179
|
], 512), [
|
|
180
180
|
[N, !s.loading]
|
|
181
181
|
]),
|
|
182
|
-
s.loading ? (c(), p("span",
|
|
182
|
+
s.loading ? (c(), p("span", ke, [
|
|
183
183
|
W(U, {
|
|
184
184
|
color: "var(--color)",
|
|
185
185
|
type: s.loadingType
|
|
@@ -187,10 +187,10 @@ const ye = /* @__PURE__ */ y(me, [["render", _e]]), ge = /* @__PURE__ */ k({
|
|
|
187
187
|
])) : I("", !0)
|
|
188
188
|
], 6));
|
|
189
189
|
}
|
|
190
|
-
}), j = /* @__PURE__ */ y(
|
|
190
|
+
}), j = /* @__PURE__ */ y($e, [["__scopeId", "data-v-74d8380d"]]), Te = {
|
|
191
191
|
key: 0,
|
|
192
192
|
class: "t-alert-header"
|
|
193
|
-
},
|
|
193
|
+
}, we = { class: "t-alert-content" }, xe = { class: "t-alert-footer" }, Se = /* @__PURE__ */ k({
|
|
194
194
|
__name: "t-alert",
|
|
195
195
|
props: {
|
|
196
196
|
title: {},
|
|
@@ -211,7 +211,7 @@ const ye = /* @__PURE__ */ y(me, [["render", _e]]), ge = /* @__PURE__ */ k({
|
|
|
211
211
|
};
|
|
212
212
|
return s({
|
|
213
213
|
open: u
|
|
214
|
-
}), (l,
|
|
214
|
+
}), (l, $) => (c(), B(L, {
|
|
215
215
|
placement: "center",
|
|
216
216
|
backdrop: !0,
|
|
217
217
|
keepalive: !1,
|
|
@@ -224,18 +224,18 @@ const ye = /* @__PURE__ */ y(me, [["render", _e]]), ge = /* @__PURE__ */ k({
|
|
|
224
224
|
ref_key: "container",
|
|
225
225
|
ref: i
|
|
226
226
|
}, [
|
|
227
|
-
|
|
228
|
-
t.title ? (c(), p("div",
|
|
227
|
+
g(l.$slots, "header", {}, () => [
|
|
228
|
+
t.title ? (c(), p("div", Te, V(t.title), 1)) : I("", !0)
|
|
229
229
|
], !0),
|
|
230
|
-
|
|
231
|
-
h("div",
|
|
230
|
+
g(l.$slots, "content", {}, () => [
|
|
231
|
+
h("div", we, V(t.message), 1)
|
|
232
232
|
], !0),
|
|
233
|
-
|
|
234
|
-
h("div",
|
|
233
|
+
g(l.$slots, "footer", {}, () => [
|
|
234
|
+
h("div", xe, [
|
|
235
235
|
(c(!0), p(R, null, q(t.actions, (d) => (c(), B(j, {
|
|
236
236
|
color: d.color,
|
|
237
237
|
variant: d.variant,
|
|
238
|
-
onClick: (
|
|
238
|
+
onClick: (b) => f(d)
|
|
239
239
|
}, {
|
|
240
240
|
default: E(() => [
|
|
241
241
|
D(V(d.text), 1)
|
|
@@ -249,7 +249,7 @@ const ye = /* @__PURE__ */ y(me, [["render", _e]]), ge = /* @__PURE__ */ k({
|
|
|
249
249
|
_: 3
|
|
250
250
|
}, 8, ["visible"]));
|
|
251
251
|
}
|
|
252
|
-
}),
|
|
252
|
+
}), oe = /* @__PURE__ */ y(Se, [["__scopeId", "data-v-05d0c578"]]), Jt = (o = {}) => ({
|
|
253
253
|
open() {
|
|
254
254
|
return new Promise((s) => {
|
|
255
255
|
let e = document.body.querySelector(".t-app");
|
|
@@ -258,13 +258,13 @@ const ye = /* @__PURE__ */ y(me, [["render", _e]]), ge = /* @__PURE__ */ k({
|
|
|
258
258
|
e.appendChild(t);
|
|
259
259
|
const r = Y({
|
|
260
260
|
render() {
|
|
261
|
-
return H(
|
|
261
|
+
return H(oe, {
|
|
262
262
|
...o,
|
|
263
263
|
ref: n,
|
|
264
264
|
onDismiss: (i, a) => {
|
|
265
265
|
setTimeout(() => {
|
|
266
266
|
r.unmount(), t.remove();
|
|
267
|
-
}, 300), s(a);
|
|
267
|
+
}, 300), s({ type: i, data: a });
|
|
268
268
|
}
|
|
269
269
|
});
|
|
270
270
|
}
|
|
@@ -274,7 +274,7 @@ const ye = /* @__PURE__ */ y(me, [["render", _e]]), ge = /* @__PURE__ */ k({
|
|
|
274
274
|
}, 50);
|
|
275
275
|
});
|
|
276
276
|
}
|
|
277
|
-
}),
|
|
277
|
+
}), ze = /* @__PURE__ */ k({
|
|
278
278
|
__name: "t-action",
|
|
279
279
|
props: {
|
|
280
280
|
actions: {},
|
|
@@ -293,7 +293,7 @@ const ye = /* @__PURE__ */ y(me, [["render", _e]]), ge = /* @__PURE__ */ k({
|
|
|
293
293
|
};
|
|
294
294
|
return s({
|
|
295
295
|
open: u
|
|
296
|
-
}), (l,
|
|
296
|
+
}), (l, $) => (c(), B(L, {
|
|
297
297
|
placement: "bottom",
|
|
298
298
|
backdrop: !0,
|
|
299
299
|
keepalive: !1,
|
|
@@ -307,15 +307,15 @@ const ye = /* @__PURE__ */ y(me, [["render", _e]]), ge = /* @__PURE__ */ k({
|
|
|
307
307
|
ref: i
|
|
308
308
|
}, [
|
|
309
309
|
(c(!0), p(R, null, q(t.actions, (d) => (c(), p("div", null, [
|
|
310
|
-
(c(!0), p(R, null, q(d, (
|
|
311
|
-
color:
|
|
312
|
-
size:
|
|
313
|
-
variant:
|
|
314
|
-
onClick: (v) => f(
|
|
310
|
+
(c(!0), p(R, null, q(d, (b) => (c(), B(j, {
|
|
311
|
+
color: b.color,
|
|
312
|
+
size: b.size,
|
|
313
|
+
variant: b.variant,
|
|
314
|
+
onClick: (v) => f(b),
|
|
315
315
|
block: ""
|
|
316
316
|
}, {
|
|
317
317
|
default: E(() => [
|
|
318
|
-
D(V(
|
|
318
|
+
D(V(b.text), 1)
|
|
319
319
|
]),
|
|
320
320
|
_: 2
|
|
321
321
|
}, 1032, ["color", "size", "variant", "onClick"]))), 256))
|
|
@@ -325,7 +325,7 @@ const ye = /* @__PURE__ */ y(me, [["render", _e]]), ge = /* @__PURE__ */ k({
|
|
|
325
325
|
_: 1
|
|
326
326
|
}, 8, ["visible"]));
|
|
327
327
|
}
|
|
328
|
-
}),
|
|
328
|
+
}), Ie = /* @__PURE__ */ y(ze, [["__scopeId", "data-v-c6bccffb"]]), Qt = (o = {}) => ({
|
|
329
329
|
open() {
|
|
330
330
|
return new Promise((s) => {
|
|
331
331
|
let e = document.body.querySelector(".t-app");
|
|
@@ -334,13 +334,13 @@ const ye = /* @__PURE__ */ y(me, [["render", _e]]), ge = /* @__PURE__ */ k({
|
|
|
334
334
|
e.appendChild(t);
|
|
335
335
|
const r = Y({
|
|
336
336
|
render() {
|
|
337
|
-
return H(
|
|
337
|
+
return H(Ie, {
|
|
338
338
|
...o,
|
|
339
339
|
ref: n,
|
|
340
340
|
onDismiss: (i, a) => {
|
|
341
341
|
setTimeout(() => {
|
|
342
342
|
r.unmount(), t.remove();
|
|
343
|
-
}, 300), s(a);
|
|
343
|
+
}, 300), s({ type: i, data: a });
|
|
344
344
|
}
|
|
345
345
|
});
|
|
346
346
|
}
|
|
@@ -350,7 +350,7 @@ const ye = /* @__PURE__ */ y(me, [["render", _e]]), ge = /* @__PURE__ */ k({
|
|
|
350
350
|
}, 50);
|
|
351
351
|
});
|
|
352
352
|
}
|
|
353
|
-
}),
|
|
353
|
+
}), Be = { class: "t-loading" }, Ce = /* @__PURE__ */ k({
|
|
354
354
|
__name: "t-loading",
|
|
355
355
|
props: {
|
|
356
356
|
type: { default: "spinner" }
|
|
@@ -372,8 +372,8 @@ const ye = /* @__PURE__ */ y(me, [["render", _e]]), ge = /* @__PURE__ */ k({
|
|
|
372
372
|
visible: n.value
|
|
373
373
|
}, {
|
|
374
374
|
default: E(() => [
|
|
375
|
-
h("div",
|
|
376
|
-
|
|
375
|
+
h("div", Be, [
|
|
376
|
+
g(a.$slots, "default", {}, () => [
|
|
377
377
|
W(U, {
|
|
378
378
|
type: t.type
|
|
379
379
|
}, null, 8, ["type"])
|
|
@@ -383,7 +383,7 @@ const ye = /* @__PURE__ */ y(me, [["render", _e]]), ge = /* @__PURE__ */ k({
|
|
|
383
383
|
_: 3
|
|
384
384
|
}, 8, ["visible"]));
|
|
385
385
|
}
|
|
386
|
-
}),
|
|
386
|
+
}), Ee = /* @__PURE__ */ y(Ce, [["__scopeId", "data-v-8f84c14e"]]), Zt = (o = {}) => {
|
|
387
387
|
const s = _(), e = document.body.querySelector(".t-app");
|
|
388
388
|
let t = null, n = null;
|
|
389
389
|
return {
|
|
@@ -391,7 +391,7 @@ const ye = /* @__PURE__ */ y(me, [["render", _e]]), ge = /* @__PURE__ */ k({
|
|
|
391
391
|
return new Promise((r) => {
|
|
392
392
|
e && (n = document.createElement("div"), e.appendChild(n), t = Y({
|
|
393
393
|
render() {
|
|
394
|
-
return H(
|
|
394
|
+
return H(Ee, {
|
|
395
395
|
...o,
|
|
396
396
|
ref: s
|
|
397
397
|
});
|
|
@@ -409,28 +409,28 @@ const ye = /* @__PURE__ */ y(me, [["render", _e]]), ge = /* @__PURE__ */ k({
|
|
|
409
409
|
});
|
|
410
410
|
}
|
|
411
411
|
};
|
|
412
|
-
},
|
|
412
|
+
}, Q = _(1e3), Ve = {
|
|
413
413
|
getNewIndex() {
|
|
414
|
-
return
|
|
414
|
+
return Q.value += 2, Q.value;
|
|
415
415
|
}
|
|
416
|
-
}, C =
|
|
416
|
+
}, C = ee([]), Pe = (o) => {
|
|
417
417
|
C.push(o);
|
|
418
|
-
},
|
|
418
|
+
}, Ae = (o) => {
|
|
419
419
|
o || C.pop();
|
|
420
|
-
},
|
|
420
|
+
}, Re = () => {
|
|
421
421
|
C.splice(0, C.length);
|
|
422
|
-
},
|
|
422
|
+
}, T = {
|
|
423
423
|
screens: C,
|
|
424
|
-
addScreen:
|
|
425
|
-
removeScreen:
|
|
426
|
-
removeAllScreen:
|
|
427
|
-
hasPrevious:
|
|
428
|
-
currentScreen:
|
|
429
|
-
lastScreen:
|
|
424
|
+
addScreen: Pe,
|
|
425
|
+
removeScreen: Ae,
|
|
426
|
+
removeAllScreen: Re,
|
|
427
|
+
hasPrevious: z(() => C.length > 1),
|
|
428
|
+
currentScreen: z(() => C[C.length - 1]),
|
|
429
|
+
lastScreen: z(() => {
|
|
430
430
|
if (!(C.length < 2))
|
|
431
431
|
return C[C.length - 2];
|
|
432
432
|
})
|
|
433
|
-
},
|
|
433
|
+
}, De = /* @__PURE__ */ k({
|
|
434
434
|
__name: "t-toast",
|
|
435
435
|
props: {
|
|
436
436
|
message: {},
|
|
@@ -452,7 +452,7 @@ const ye = /* @__PURE__ */ y(me, [["render", _e]]), ge = /* @__PURE__ */ k({
|
|
|
452
452
|
a.value = !0, setTimeout(() => {
|
|
453
453
|
i.value = !1, r.value = !1, n("dismiss");
|
|
454
454
|
}, 300);
|
|
455
|
-
}, m =
|
|
455
|
+
}, m = z(() => {
|
|
456
456
|
let l;
|
|
457
457
|
return t.variant == "default" && (t.color ? ["warning", "info", "danger", "primary", "secondary", "success"].includes(t.color) ? l = {
|
|
458
458
|
"--border": "none",
|
|
@@ -494,13 +494,13 @@ const ye = /* @__PURE__ */ y(me, [["render", _e]]), ge = /* @__PURE__ */ k({
|
|
|
494
494
|
});
|
|
495
495
|
return s({
|
|
496
496
|
open: u
|
|
497
|
-
}), (l,
|
|
497
|
+
}), (l, $) => i.value ? (c(), p("div", {
|
|
498
498
|
key: 0,
|
|
499
499
|
class: x(["t-toast", { [t.placement]: !0, open: r.value, closing: a.value }]),
|
|
500
500
|
style: w({ "--space": t.space, ...m.value })
|
|
501
501
|
}, V(t.message), 7)) : I("", !0);
|
|
502
502
|
}
|
|
503
|
-
}),
|
|
503
|
+
}), se = /* @__PURE__ */ y(De, [["__scopeId", "data-v-61960e03"]]), eo = (o = {}) => ({
|
|
504
504
|
open() {
|
|
505
505
|
let s = document.body.querySelector(".t-app");
|
|
506
506
|
if (!s) return;
|
|
@@ -508,7 +508,7 @@ const ye = /* @__PURE__ */ y(me, [["render", _e]]), ge = /* @__PURE__ */ k({
|
|
|
508
508
|
s.appendChild(e);
|
|
509
509
|
const n = Y({
|
|
510
510
|
render() {
|
|
511
|
-
return H(
|
|
511
|
+
return H(se, {
|
|
512
512
|
...o,
|
|
513
513
|
ref: t,
|
|
514
514
|
onDismiss: () => {
|
|
@@ -523,34 +523,34 @@ const ye = /* @__PURE__ */ y(me, [["render", _e]]), ge = /* @__PURE__ */ k({
|
|
|
523
523
|
t.value?.open?.();
|
|
524
524
|
}, 50);
|
|
525
525
|
}
|
|
526
|
-
}),
|
|
527
|
-
function
|
|
526
|
+
}), Le = _(0);
|
|
527
|
+
function Oe() {
|
|
528
528
|
return {
|
|
529
|
-
height:
|
|
529
|
+
height: Le
|
|
530
530
|
};
|
|
531
531
|
}
|
|
532
|
-
const
|
|
532
|
+
const Ne = /* @__PURE__ */ k({
|
|
533
533
|
__name: "t-cable",
|
|
534
534
|
props: {
|
|
535
535
|
keyboard: { type: Boolean, default: !0 },
|
|
536
536
|
placement: { default: "bottom" }
|
|
537
537
|
},
|
|
538
538
|
setup(o) {
|
|
539
|
-
const s = o, { height: e } =
|
|
539
|
+
const s = o, { height: e } = Oe();
|
|
540
540
|
return (t, n) => (c(), p("div", {
|
|
541
541
|
class: x(["t-cable", { keyboard: s.keyboard && P(e) > 0, [s.placement]: !0 }]),
|
|
542
542
|
style: w({ "--t-keyboard-height": P(e) + "px", "--t-keyboard-transition": P(e) > 0 ? "0.3s" : "0.1s" })
|
|
543
543
|
}, [
|
|
544
|
-
|
|
544
|
+
g(t.$slots, "default", {}, void 0, !0)
|
|
545
545
|
], 6));
|
|
546
546
|
}
|
|
547
|
-
}),
|
|
547
|
+
}), qe = /* @__PURE__ */ y(Ne, [["__scopeId", "data-v-ecb72421"]]), Xe = /* @__PURE__ */ k({
|
|
548
548
|
__name: "t-card",
|
|
549
549
|
props: {
|
|
550
550
|
color: { default: null }
|
|
551
551
|
},
|
|
552
552
|
setup(o) {
|
|
553
|
-
const s = o, e =
|
|
553
|
+
const s = o, e = z(() => {
|
|
554
554
|
let t;
|
|
555
555
|
return s.color ? ["warning", "info", "danger", "primary", "secondary", "success"].includes(s.color) ? t = {
|
|
556
556
|
"--background": "var(--t-color-status-" + s.color + ")"
|
|
@@ -564,16 +564,16 @@ const Oe = /* @__PURE__ */ k({
|
|
|
564
564
|
class: "t-card",
|
|
565
565
|
style: w(e.value)
|
|
566
566
|
}, [
|
|
567
|
-
|
|
567
|
+
g(t.$slots, "default")
|
|
568
568
|
], 4));
|
|
569
569
|
}
|
|
570
|
-
}),
|
|
571
|
-
function
|
|
572
|
-
return c(), p("div",
|
|
573
|
-
|
|
570
|
+
}), We = {}, Ye = { class: "t-content" };
|
|
571
|
+
function He(o, s) {
|
|
572
|
+
return c(), p("div", Ye, [
|
|
573
|
+
g(o.$slots, "default", {}, void 0, !0)
|
|
574
574
|
]);
|
|
575
575
|
}
|
|
576
|
-
const
|
|
576
|
+
const ne = /* @__PURE__ */ y(We, [["render", He], ["__scopeId", "data-v-d58accf4"]]), Z = 80, Ue = /* @__PURE__ */ k({
|
|
577
577
|
__name: "t-refresher",
|
|
578
578
|
emits: ["refresh"],
|
|
579
579
|
setup(o, { emit: s }) {
|
|
@@ -584,7 +584,7 @@ const se = /* @__PURE__ */ y(Xe, [["render", Ye], ["__scopeId", "data-v-d58accf4
|
|
|
584
584
|
a = !1;
|
|
585
585
|
}, 2e3);
|
|
586
586
|
}, f = () => {
|
|
587
|
-
a = !0, n.value = !0, t.value =
|
|
587
|
+
a = !0, n.value = !0, t.value = Z, e("refresh", u);
|
|
588
588
|
};
|
|
589
589
|
return X(() => r.value, () => {
|
|
590
590
|
i && i.destroy();
|
|
@@ -593,11 +593,11 @@ const se = /* @__PURE__ */ y(Xe, [["render", Ye], ["__scopeId", "data-v-d58accf4
|
|
|
593
593
|
options: {
|
|
594
594
|
minDist: 60
|
|
595
595
|
},
|
|
596
|
-
move({ dy: l,
|
|
597
|
-
n.value || a ||
|
|
596
|
+
move({ dy: l, d: $ }) {
|
|
597
|
+
n.value || a || $ != "down" || (l > 10 && m.scrollTop == 0 && m.classList.add("scroll-hidden"), l >= 120 ? f() : l > 10 && (t.value = l));
|
|
598
598
|
},
|
|
599
|
-
up({ dy: l,
|
|
600
|
-
m.classList.remove("scroll-hidden"), !(n.value || a) && (l >
|
|
599
|
+
up({ dy: l, d: $ }) {
|
|
600
|
+
m.classList.remove("scroll-hidden"), !(n.value || a) && (l > Z && $ == "down" ? f() : t.value = 0);
|
|
601
601
|
},
|
|
602
602
|
cancel() {
|
|
603
603
|
m.classList.remove("scroll-hidden"), !(n.value || a) && (n.value = !1, t.value = 0);
|
|
@@ -623,93 +623,95 @@ const se = /* @__PURE__ */ y(Xe, [["render", Ye], ["__scopeId", "data-v-d58accf4
|
|
|
623
623
|
[N, t.value > 0]
|
|
624
624
|
]);
|
|
625
625
|
}
|
|
626
|
-
}),
|
|
627
|
-
function
|
|
628
|
-
return c(), p("div",
|
|
629
|
-
|
|
626
|
+
}), je = /* @__PURE__ */ y(Ue, [["__scopeId", "data-v-40809825"]]), Fe = {}, Ge = { class: "t-screen" };
|
|
627
|
+
function Ke(o, s) {
|
|
628
|
+
return c(), p("div", Ge, [
|
|
629
|
+
g(o.$slots, "default", {}, void 0, !0)
|
|
630
630
|
]);
|
|
631
631
|
}
|
|
632
|
-
const
|
|
632
|
+
const re = /* @__PURE__ */ y(Fe, [["render", Ke], ["__scopeId", "data-v-c2a3436c"]]), Me = /* @__PURE__ */ k({
|
|
633
633
|
__name: "t-swipe-screen",
|
|
634
634
|
emits: ["change"],
|
|
635
635
|
setup(o, { emit: s }) {
|
|
636
636
|
let e = {};
|
|
637
|
-
const t =
|
|
637
|
+
const t = te(), n = de(), r = t.getRoutes(), i = _(!1), a = s;
|
|
638
638
|
for (let d of r)
|
|
639
639
|
e[d.name] = d.components;
|
|
640
640
|
const u = (d) => {
|
|
641
|
-
d &&
|
|
641
|
+
d && T.addScreen({
|
|
642
642
|
name: d,
|
|
643
643
|
target: null,
|
|
644
|
-
component:
|
|
644
|
+
component: ce(e[d] || null)
|
|
645
645
|
});
|
|
646
|
-
}, f = (d,
|
|
647
|
-
!
|
|
648
|
-
|
|
646
|
+
}, f = (d, b) => {
|
|
647
|
+
!b || T.screens[d].target || (T.screens[d].target = b.$el, d > 0 && (i.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(() => {
|
|
648
|
+
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(() => {
|
|
649
649
|
a("change"), i.value = !1;
|
|
650
650
|
}, 400);
|
|
651
651
|
}, 100)));
|
|
652
652
|
}, m = () => {
|
|
653
|
-
|
|
654
|
-
|
|
653
|
+
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"), i.value = !0, setTimeout(() => {
|
|
654
|
+
T.removeScreen(), a("change"), i.value = !1;
|
|
655
655
|
}, 400);
|
|
656
656
|
};
|
|
657
|
-
u(n.name), X(() => n.name, (d,
|
|
658
|
-
d !=
|
|
657
|
+
u(n.name), X(() => n.name, (d, b) => {
|
|
658
|
+
d != T.currentScreen.value.name && (T.lastScreen.value?.name == d ? m() : u(d));
|
|
659
659
|
});
|
|
660
660
|
const l = () => {
|
|
661
661
|
i.value = !0;
|
|
662
|
-
const d =
|
|
663
|
-
d.style.transition = "transform 0.35s ease", d.style.transform = "translateX(0px)",
|
|
662
|
+
const d = T.currentScreen.value.target, b = T.lastScreen.value.target;
|
|
663
|
+
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(() => {
|
|
664
664
|
i.value = !1;
|
|
665
665
|
}, 400);
|
|
666
666
|
};
|
|
667
|
-
let
|
|
667
|
+
let $;
|
|
668
668
|
return K(() => {
|
|
669
|
-
|
|
669
|
+
$ = M(document, {
|
|
670
670
|
pointerId: null,
|
|
671
671
|
beforeEvent(d) {
|
|
672
|
-
return !(i.value ||
|
|
672
|
+
return !(i.value || T.screens.length < 2);
|
|
673
673
|
},
|
|
674
674
|
fast({ d }) {
|
|
675
675
|
d == "right" && t.back();
|
|
676
676
|
},
|
|
677
|
-
move({ dx: d }) {
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
677
|
+
move({ dx: d, d: b }) {
|
|
678
|
+
if (b != "right") return;
|
|
679
|
+
const v = window.innerWidth, S = d / v * 100, A = T.currentScreen.value.target, J = T.lastScreen?.value?.target;
|
|
680
|
+
if (d > 15 && d <= v) {
|
|
681
|
+
A.style.transition = "transform 0s ease", A.style.transform = `translateX(${d}px)`, J.style.transition = "transform 0s ease", document.documentElement.style.setProperty("--t-screen-backdrop-duration", "0s"), J.style.transform = `translateX(calc((var(--t-app-width) / 100 * 30 * -1) + ((var(--t-app-width) / 100 * 30) / 100 * ${S}))) scale(${0.5 + 0.5 / 100 * S}) perspective(var(--t-app-width)) rotateY(${30 - 30 / 100 * S}deg)`, document.documentElement.style.setProperty("--t-swipe-backdrop-opacity", `${0.5 - 0.5 / 100 * S}`);
|
|
681
682
|
return;
|
|
682
683
|
}
|
|
683
684
|
},
|
|
684
|
-
up({ dx: d }) {
|
|
685
|
-
|
|
686
|
-
|
|
685
|
+
up({ dx: d, d: b }) {
|
|
686
|
+
if (b != "right") return;
|
|
687
|
+
const v = window.innerWidth;
|
|
688
|
+
d / v * 100 >= 50 ? t.back() : l();
|
|
687
689
|
},
|
|
688
690
|
cancel() {
|
|
689
691
|
l();
|
|
690
692
|
}
|
|
691
693
|
});
|
|
692
694
|
}), G(() => {
|
|
693
|
-
|
|
694
|
-
}), (d,
|
|
695
|
-
(c(!0), p(R, null, q(P(
|
|
695
|
+
$ && $.destroy(), T.removeAllScreen();
|
|
696
|
+
}), (d, b) => (c(), p(R, null, [
|
|
697
|
+
(c(!0), p(R, null, q(P(T).screens, (v, S) => (c(), B(re, {
|
|
696
698
|
ref_for: !0,
|
|
697
|
-
ref: (A) => f(
|
|
698
|
-
style: w({ zIndex:
|
|
699
|
-
key:
|
|
699
|
+
ref: (A) => f(S, A),
|
|
700
|
+
style: w({ zIndex: S + (S == P(T).screens.length - 1 ? 2 : 1) }),
|
|
701
|
+
key: S
|
|
700
702
|
}, {
|
|
701
703
|
default: E(() => [
|
|
702
|
-
(c(), B(
|
|
704
|
+
(c(), B(le(v.component.default)))
|
|
703
705
|
]),
|
|
704
706
|
_: 2
|
|
705
707
|
}, 1032, ["style"]))), 128)),
|
|
706
708
|
h("div", {
|
|
707
709
|
class: "t-swipe-backdrop",
|
|
708
|
-
style: w({ zIndex: P(
|
|
710
|
+
style: w({ zIndex: P(T).screens.length })
|
|
709
711
|
}, null, 4)
|
|
710
712
|
], 64));
|
|
711
713
|
}
|
|
712
|
-
}),
|
|
714
|
+
}), Je = /* @__PURE__ */ y(Me, [["__scopeId", "data-v-2e08682a"]]), Qe = /* @__PURE__ */ k({
|
|
713
715
|
__name: "t-toolbar",
|
|
714
716
|
props: {
|
|
715
717
|
placement: { default: "bottom" },
|
|
@@ -723,37 +725,37 @@ const ne = /* @__PURE__ */ y(je, [["render", Ge], ["__scopeId", "data-v-c2a3436c
|
|
|
723
725
|
style: w({ "--t-size-toolbar": s.size })
|
|
724
726
|
}, [
|
|
725
727
|
h("div", null, [
|
|
726
|
-
|
|
728
|
+
g(e.$slots, "default", {}, void 0, !0)
|
|
727
729
|
])
|
|
728
730
|
], 6));
|
|
729
731
|
}
|
|
730
|
-
}),
|
|
732
|
+
}), Ze = /* @__PURE__ */ y(Qe, [["__scopeId", "data-v-db1924b1"]]), et = /* @__PURE__ */ k({
|
|
731
733
|
__name: "t-back-button",
|
|
732
734
|
props: {
|
|
733
735
|
to: {}
|
|
734
736
|
},
|
|
735
737
|
setup(o) {
|
|
736
|
-
const s =
|
|
737
|
-
|
|
738
|
+
const s = te(), e = o, t = () => {
|
|
739
|
+
T.hasPrevious.value ? s?.back?.() : e.to && s?.push?.(e.to);
|
|
738
740
|
};
|
|
739
|
-
return (n, r) => n.to || P(
|
|
741
|
+
return (n, r) => n.to || P(T).hasPrevious ? (c(), p("button", {
|
|
740
742
|
key: 0,
|
|
741
743
|
class: "t-back-button",
|
|
742
744
|
onClick: t
|
|
743
745
|
}, [
|
|
744
|
-
|
|
746
|
+
g(n.$slots, "default", {}, () => [
|
|
745
747
|
r[0] || (r[0] = h("i", { class: "ri-arrow-left-s-line" }, null, -1))
|
|
746
748
|
], !0)
|
|
747
749
|
])) : I("", !0);
|
|
748
750
|
}
|
|
749
|
-
}),
|
|
751
|
+
}), tt = /* @__PURE__ */ y(et, [["__scopeId", "data-v-ed626a3d"]]), ot = /* @__PURE__ */ k({
|
|
750
752
|
__name: "t-text",
|
|
751
753
|
props: {
|
|
752
754
|
color: { default: "var(--t-color-text)" },
|
|
753
755
|
size: { default: "standard" }
|
|
754
756
|
},
|
|
755
757
|
setup(o) {
|
|
756
|
-
const s = o, e =
|
|
758
|
+
const s = o, e = z(() => {
|
|
757
759
|
let t, n = s.color;
|
|
758
760
|
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})`), {
|
|
759
761
|
"--color": n,
|
|
@@ -764,10 +766,10 @@ const ne = /* @__PURE__ */ y(je, [["render", Ge], ["__scopeId", "data-v-c2a3436c
|
|
|
764
766
|
class: "t-text",
|
|
765
767
|
style: w(e.value)
|
|
766
768
|
}, [
|
|
767
|
-
|
|
769
|
+
g(t.$slots, "default", {}, void 0, !0)
|
|
768
770
|
], 4));
|
|
769
771
|
}
|
|
770
|
-
}), F = /* @__PURE__ */ y(
|
|
772
|
+
}), F = /* @__PURE__ */ y(ot, [["__scopeId", "data-v-f0f94f05"]]), st = /* @__PURE__ */ k({
|
|
771
773
|
__name: "t-pull-signal",
|
|
772
774
|
props: {
|
|
773
775
|
placement: { default: "bottom" }
|
|
@@ -777,7 +779,7 @@ const ne = /* @__PURE__ */ y(je, [["render", Ge], ["__scopeId", "data-v-c2a3436c
|
|
|
777
779
|
class: x(["t-pull-bar", { [s.placement]: !0 }])
|
|
778
780
|
}, null, 2));
|
|
779
781
|
}
|
|
780
|
-
}),
|
|
782
|
+
}), ae = /* @__PURE__ */ y(st, [["__scopeId", "data-v-daa38c85"]]), nt = /* @__PURE__ */ k({
|
|
781
783
|
__name: "t-sheet",
|
|
782
784
|
props: {
|
|
783
785
|
background: { default: "var(--t-color-surface)" },
|
|
@@ -795,7 +797,7 @@ const ne = /* @__PURE__ */ y(je, [["render", Ge], ["__scopeId", "data-v-c2a3436c
|
|
|
795
797
|
setup(o, { emit: s }) {
|
|
796
798
|
const e = o, t = s, n = _(), r = _(), i = _(!1);
|
|
797
799
|
let a = null;
|
|
798
|
-
const u =
|
|
800
|
+
const u = z(() => {
|
|
799
801
|
if (e.placement == "bottom") return "down";
|
|
800
802
|
if (e.placement == "top") return "up";
|
|
801
803
|
if (e.placement == "left") return "left";
|
|
@@ -812,27 +814,27 @@ const ne = /* @__PURE__ */ y(je, [["render", Ge], ["__scopeId", "data-v-c2a3436c
|
|
|
812
814
|
options: {
|
|
813
815
|
minDist: 30
|
|
814
816
|
},
|
|
815
|
-
beforeEvent(
|
|
817
|
+
beforeEvent($) {
|
|
816
818
|
return !(i.value || !e.gesture || e.placement == "center");
|
|
817
819
|
},
|
|
818
|
-
fast({ d:
|
|
819
|
-
m(),
|
|
820
|
+
fast({ d: $ }) {
|
|
821
|
+
m(), $ == u.value ? t("dismiss", "gesture") : r.value.open();
|
|
820
822
|
},
|
|
821
|
-
move({ dy:
|
|
822
|
-
if (
|
|
823
|
+
move({ dy: $, dx: d, d: b }) {
|
|
824
|
+
if (b != u.value) return;
|
|
823
825
|
let v = 0;
|
|
824
|
-
e.placement == "bottom" || e.placement == "top" ? v =
|
|
826
|
+
e.placement == "bottom" || e.placement == "top" ? v = $ : v = d, r.value.render({
|
|
825
827
|
contentTransform: v + "px",
|
|
826
828
|
transition: "0s"
|
|
827
829
|
});
|
|
828
830
|
},
|
|
829
|
-
up({ dy:
|
|
830
|
-
if (m(),
|
|
831
|
+
up({ dy: $, dx: d, d: b }) {
|
|
832
|
+
if (m(), b != u.value) {
|
|
831
833
|
r.value.open();
|
|
832
834
|
return;
|
|
833
835
|
}
|
|
834
|
-
let v,
|
|
835
|
-
e.placement == "bottom" || e.placement == "top" ? (v = n.value.offsetHeight, A =
|
|
836
|
+
let v, S, A;
|
|
837
|
+
e.placement == "bottom" || e.placement == "top" ? (v = n.value.offsetHeight, A = $) : (v = n.value.offsetWidth, A = d), S = A / v * 100, S > 50 ? t("dismiss", "gesture") : r.value.open();
|
|
836
838
|
},
|
|
837
839
|
cancel() {
|
|
838
840
|
m(), r.value.open();
|
|
@@ -840,7 +842,7 @@ const ne = /* @__PURE__ */ y(je, [["render", Ge], ["__scopeId", "data-v-c2a3436c
|
|
|
840
842
|
}));
|
|
841
843
|
}), G(() => {
|
|
842
844
|
a && a.destroy();
|
|
843
|
-
}), (l,
|
|
845
|
+
}), (l, $) => (c(), B(L, {
|
|
844
846
|
ref_key: "present",
|
|
845
847
|
ref: r,
|
|
846
848
|
placement: e.placement,
|
|
@@ -850,17 +852,17 @@ const ne = /* @__PURE__ */ y(je, [["render", Ge], ["__scopeId", "data-v-c2a3436c
|
|
|
850
852
|
onDismiss: f
|
|
851
853
|
}, {
|
|
852
854
|
default: E(() => [
|
|
853
|
-
e.gesture && e.placement != "center" ? (c(), B(
|
|
855
|
+
e.gesture && e.placement != "center" ? (c(), B(ae, {
|
|
854
856
|
key: 0,
|
|
855
857
|
placement: e.placement
|
|
856
858
|
}, null, 8, ["placement"])) : I("", !0),
|
|
857
859
|
e.closeButton && e.placement == "center" ? (c(), p("button", {
|
|
858
860
|
key: 1,
|
|
859
861
|
class: "t-sheet-close",
|
|
860
|
-
onClick:
|
|
862
|
+
onClick: $[0] || ($[0] = (d) => f("close-button"))
|
|
861
863
|
}, [
|
|
862
|
-
|
|
863
|
-
|
|
864
|
+
g(l.$slots, "close-icon", {}, () => [
|
|
865
|
+
$[1] || ($[1] = h("i", { class: "ri-close-large-line" }, null, -1))
|
|
864
866
|
], !0)
|
|
865
867
|
])) : I("", !0),
|
|
866
868
|
h("div", {
|
|
@@ -869,13 +871,13 @@ const ne = /* @__PURE__ */ y(je, [["render", Ge], ["__scopeId", "data-v-c2a3436c
|
|
|
869
871
|
ref_key: "sheet",
|
|
870
872
|
ref: n
|
|
871
873
|
}, [
|
|
872
|
-
|
|
874
|
+
g(l.$slots, "default", {}, void 0, !0)
|
|
873
875
|
], 6)
|
|
874
876
|
]),
|
|
875
877
|
_: 3
|
|
876
878
|
}, 8, ["placement", "backdrop", "visible", "keepalive"]));
|
|
877
879
|
}
|
|
878
|
-
}),
|
|
880
|
+
}), rt = /* @__PURE__ */ y(nt, [["__scopeId", "data-v-8f224e75"]]), at = { class: "t-input-label" }, lt = { class: "t-input-content" }, ct = ["type", "placeholder", "value"], it = /* @__PURE__ */ k({
|
|
879
881
|
__name: "t-input",
|
|
880
882
|
props: {
|
|
881
883
|
size: { default: "standard" },
|
|
@@ -897,16 +899,16 @@ const ne = /* @__PURE__ */ y(je, [["render", Ge], ["__scopeId", "data-v-c2a3436c
|
|
|
897
899
|
class: x(["t-input", { rounded: e.rounded, ["size-" + e.size]: !0, ["variant-" + e.variant]: !0 }])
|
|
898
900
|
}, [
|
|
899
901
|
h("label", null, [
|
|
900
|
-
h("span",
|
|
901
|
-
h("div",
|
|
902
|
-
|
|
902
|
+
h("span", at, V(r.label), 1),
|
|
903
|
+
h("div", lt, [
|
|
904
|
+
g(r.$slots, "start", {}, void 0, !0),
|
|
903
905
|
h("input", {
|
|
904
906
|
type: r.type,
|
|
905
907
|
placeholder: r.placeholder,
|
|
906
908
|
value: r.modelValue,
|
|
907
909
|
onInput: n
|
|
908
|
-
}, null, 40,
|
|
909
|
-
|
|
910
|
+
}, null, 40, ct),
|
|
911
|
+
g(r.$slots, "end", {}, void 0, !0)
|
|
910
912
|
])
|
|
911
913
|
]),
|
|
912
914
|
e.error ? (c(), B(F, {
|
|
@@ -928,23 +930,23 @@ const ne = /* @__PURE__ */ y(je, [["render", Ge], ["__scopeId", "data-v-c2a3436c
|
|
|
928
930
|
})) : I("", !0)
|
|
929
931
|
], 2));
|
|
930
932
|
}
|
|
931
|
-
}),
|
|
932
|
-
function
|
|
933
|
+
}), ut = /* @__PURE__ */ y(it, [["__scopeId", "data-v-1a9425cf"]]), dt = {};
|
|
934
|
+
function pt(o, s) {
|
|
933
935
|
return c(), p("textarea");
|
|
934
936
|
}
|
|
935
|
-
const
|
|
936
|
-
function
|
|
937
|
+
const ft = /* @__PURE__ */ y(dt, [["render", pt]]), mt = {};
|
|
938
|
+
function vt(o, s) {
|
|
937
939
|
return c(), p("div");
|
|
938
940
|
}
|
|
939
|
-
const
|
|
940
|
-
function
|
|
941
|
-
return c(), p("div",
|
|
941
|
+
const _t = /* @__PURE__ */ y(mt, [["render", vt]]), yt = {}, gt = { class: "t-grid" };
|
|
942
|
+
function bt(o, s) {
|
|
943
|
+
return c(), p("div", gt);
|
|
942
944
|
}
|
|
943
|
-
const
|
|
944
|
-
function
|
|
945
|
-
return c(), p("div",
|
|
945
|
+
const ht = /* @__PURE__ */ y(yt, [["render", bt]]), kt = {}, $t = { class: "t-grid-item" };
|
|
946
|
+
function Tt(o, s) {
|
|
947
|
+
return c(), p("div", $t);
|
|
946
948
|
}
|
|
947
|
-
const
|
|
949
|
+
const wt = /* @__PURE__ */ y(kt, [["render", Tt]]), xt = /* @__PURE__ */ k({
|
|
948
950
|
__name: "t-divider",
|
|
949
951
|
props: {
|
|
950
952
|
direction: { default: "horizontal" }
|
|
@@ -955,14 +957,14 @@ const Tt = /* @__PURE__ */ y(ht, [["render", $t]]), wt = /* @__PURE__ */ k({
|
|
|
955
957
|
class: x(["t-divider", { [s.direction]: !0 }])
|
|
956
958
|
}, null, 2));
|
|
957
959
|
}
|
|
958
|
-
}),
|
|
960
|
+
}), St = /* @__PURE__ */ y(xt, [["__scopeId", "data-v-47ee8991"]]), zt = /* @__PURE__ */ k({
|
|
959
961
|
__name: "t-toggle-password",
|
|
960
962
|
props: {
|
|
961
963
|
color: { default: "warning" }
|
|
962
964
|
},
|
|
963
965
|
emits: ["change"],
|
|
964
966
|
setup(o, { emit: s }) {
|
|
965
|
-
const e = o, t = s, n = _(!1), r = _(), i =
|
|
967
|
+
const e = o, t = s, n = _(!1), r = _(), i = z(() => {
|
|
966
968
|
let f = e.color;
|
|
967
969
|
return ["warning", "info", "danger", "primary", "secondary", "success"].includes(e.color) && (f = `var(--t-color-status-${e.color})`), {
|
|
968
970
|
"--color": f
|
|
@@ -983,36 +985,36 @@ const Tt = /* @__PURE__ */ y(ht, [["render", $t]]), wt = /* @__PURE__ */ k({
|
|
|
983
985
|
style: w(i.value),
|
|
984
986
|
onClick: u
|
|
985
987
|
}, [
|
|
986
|
-
n.value ?
|
|
988
|
+
n.value ? g(f.$slots, "on", { key: 0 }, () => [
|
|
987
989
|
m[0] || (m[0] = h("i", { class: "ri-eye-line" }, null, -1))
|
|
988
990
|
], !0) : I("", !0),
|
|
989
|
-
n.value ? I("", !0) :
|
|
991
|
+
n.value ? I("", !0) : g(f.$slots, "off", { key: 1 }, () => [
|
|
990
992
|
m[1] || (m[1] = h("i", { class: "ri-eye-off-line" }, null, -1))
|
|
991
993
|
], !0)
|
|
992
994
|
], 4));
|
|
993
995
|
}
|
|
994
|
-
}),
|
|
996
|
+
}), It = /* @__PURE__ */ y(zt, [["__scopeId", "data-v-3268e9e3"]]), Bt = /* @__PURE__ */ k({
|
|
995
997
|
__name: "t-avatar",
|
|
996
998
|
props: {
|
|
997
999
|
square: { type: Boolean, default: !1 },
|
|
998
1000
|
size: { default: "standard" }
|
|
999
1001
|
},
|
|
1000
1002
|
setup(o) {
|
|
1001
|
-
const s = o, e =
|
|
1003
|
+
const s = o, e = z(() => s.size == "small" ? "24px" : s.size == "standard" ? "40px" : s.size == "large" ? "60px" : s.size);
|
|
1002
1004
|
return (t, n) => (c(), p("div", {
|
|
1003
1005
|
class: x(["t-avatar", { square: t.square }]),
|
|
1004
1006
|
style: w({ "--size": e.value })
|
|
1005
1007
|
}, [
|
|
1006
|
-
|
|
1008
|
+
g(t.$slots, "default", {}, void 0, !0)
|
|
1007
1009
|
], 6));
|
|
1008
1010
|
}
|
|
1009
|
-
}),
|
|
1011
|
+
}), Ct = /* @__PURE__ */ y(Bt, [["__scopeId", "data-v-24384c2f"]]), Et = { class: "t-collapse-title" }, Vt = {
|
|
1010
1012
|
key: 0,
|
|
1011
1013
|
class: "icon"
|
|
1012
|
-
},
|
|
1014
|
+
}, Pt = {
|
|
1013
1015
|
key: 1,
|
|
1014
1016
|
class: "icon"
|
|
1015
|
-
},
|
|
1017
|
+
}, At = { class: "t-collapse-content" }, Rt = /* @__PURE__ */ k({
|
|
1016
1018
|
__name: "t-collapse",
|
|
1017
1019
|
props: {
|
|
1018
1020
|
title: {}
|
|
@@ -1030,33 +1032,33 @@ const Tt = /* @__PURE__ */ y(ht, [["render", $t]]), wt = /* @__PURE__ */ k({
|
|
|
1030
1032
|
class: "t-collapse-header",
|
|
1031
1033
|
onClick: a
|
|
1032
1034
|
}, [
|
|
1033
|
-
|
|
1034
|
-
h("div",
|
|
1035
|
-
|
|
1035
|
+
g(u.$slots, "icon"),
|
|
1036
|
+
h("div", Et, [
|
|
1037
|
+
g(u.$slots, "title", {}, () => [
|
|
1036
1038
|
D(V(e.title), 1)
|
|
1037
1039
|
])
|
|
1038
1040
|
]),
|
|
1039
|
-
|
|
1040
|
-
n.value ? (c(), p("div",
|
|
1041
|
+
g(u.$slots, "toggle", {}, () => [
|
|
1042
|
+
n.value ? (c(), p("div", Vt, [...f[0] || (f[0] = [
|
|
1041
1043
|
h("i", { class: "ri-arrow-up-s-line" }, null, -1)
|
|
1042
|
-
])])) : (c(), p("div",
|
|
1044
|
+
])])) : (c(), p("div", Pt, [...f[1] || (f[1] = [
|
|
1043
1045
|
h("i", { class: "ri-arrow-down-s-line" }, null, -1)
|
|
1044
1046
|
])]))
|
|
1045
1047
|
])
|
|
1046
1048
|
]),
|
|
1047
|
-
h("div",
|
|
1049
|
+
h("div", At, [
|
|
1048
1050
|
h("div", {
|
|
1049
1051
|
ref_key: "content",
|
|
1050
1052
|
ref: i
|
|
1051
1053
|
}, [
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
+
g(u.$slots, "content", {}, () => [
|
|
1055
|
+
g(u.$slots, "default")
|
|
1054
1056
|
])
|
|
1055
1057
|
], 512)
|
|
1056
1058
|
])
|
|
1057
1059
|
], 6));
|
|
1058
1060
|
}
|
|
1059
|
-
}),
|
|
1061
|
+
}), Dt = /* @__PURE__ */ k({
|
|
1060
1062
|
__name: "t-switch",
|
|
1061
1063
|
props: {
|
|
1062
1064
|
modelValue: { type: Boolean },
|
|
@@ -1066,7 +1068,7 @@ const Tt = /* @__PURE__ */ y(ht, [["render", $t]]), wt = /* @__PURE__ */ k({
|
|
|
1066
1068
|
setup(o, { emit: s }) {
|
|
1067
1069
|
const e = o, t = s, n = () => {
|
|
1068
1070
|
t("update:modelValue", !e.modelValue);
|
|
1069
|
-
}, r =
|
|
1071
|
+
}, r = z(() => {
|
|
1070
1072
|
let i = {
|
|
1071
1073
|
"--background": e.color,
|
|
1072
1074
|
"--color": "#ffffff"
|
|
@@ -1084,13 +1086,13 @@ const Tt = /* @__PURE__ */ y(ht, [["render", $t]]), wt = /* @__PURE__ */ k({
|
|
|
1084
1086
|
h("div", { class: "t-switch-icon" }, null, -1)
|
|
1085
1087
|
])], 6));
|
|
1086
1088
|
}
|
|
1087
|
-
}),
|
|
1089
|
+
}), Lt = /* @__PURE__ */ y(Dt, [["__scopeId", "data-v-3616970e"]]), Ot = /* @__PURE__ */ k({
|
|
1088
1090
|
__name: "t-tab",
|
|
1089
1091
|
props: {
|
|
1090
1092
|
value: {}
|
|
1091
1093
|
},
|
|
1092
1094
|
setup(o) {
|
|
1093
|
-
const s = o, e =
|
|
1095
|
+
const s = o, e = ie("tabsState"), t = z(() => e.active.value === s.value), n = () => {
|
|
1094
1096
|
e.setActive(s.value);
|
|
1095
1097
|
};
|
|
1096
1098
|
return (r, i) => (c(), p("li", {
|
|
@@ -1103,13 +1105,13 @@ const Tt = /* @__PURE__ */ y(ht, [["render", $t]]), wt = /* @__PURE__ */ k({
|
|
|
1103
1105
|
color: t.value && P(e).variant == "text" ? P(e).color : void 0
|
|
1104
1106
|
}, {
|
|
1105
1107
|
default: E(() => [
|
|
1106
|
-
|
|
1108
|
+
g(r.$slots, "default", {}, void 0, !0)
|
|
1107
1109
|
]),
|
|
1108
1110
|
_: 3
|
|
1109
1111
|
}, 8, ["size", "color"])
|
|
1110
1112
|
], 2));
|
|
1111
1113
|
}
|
|
1112
|
-
}),
|
|
1114
|
+
}), Nt = /* @__PURE__ */ y(Ot, [["__scopeId", "data-v-36c12a50"]]), qt = /* @__PURE__ */ k({
|
|
1113
1115
|
__name: "t-tabs",
|
|
1114
1116
|
props: {
|
|
1115
1117
|
placement: { default: "top-start" },
|
|
@@ -1121,7 +1123,7 @@ const Tt = /* @__PURE__ */ y(ht, [["render", $t]]), wt = /* @__PURE__ */ k({
|
|
|
1121
1123
|
},
|
|
1122
1124
|
emits: ["update:modelValue"],
|
|
1123
1125
|
setup(o, { emit: s }) {
|
|
1124
|
-
const e = o, t = s, n = _("0px"), r = _(), i =
|
|
1126
|
+
const e = o, t = s, n = _("0px"), r = _(), i = z(() => {
|
|
1125
1127
|
let u = e.color;
|
|
1126
1128
|
return ["warning", "info", "danger", "primary", "secondary", "success"].includes(u) && (u = `var(--t-color-status-${u})`), u;
|
|
1127
1129
|
}), a = () => {
|
|
@@ -1141,8 +1143,8 @@ const Tt = /* @__PURE__ */ y(ht, [["render", $t]]), wt = /* @__PURE__ */ k({
|
|
|
1141
1143
|
}
|
|
1142
1144
|
}, 50);
|
|
1143
1145
|
};
|
|
1144
|
-
return
|
|
1145
|
-
active:
|
|
1146
|
+
return ue("tabsState", {
|
|
1147
|
+
active: z(() => e.modelValue),
|
|
1146
1148
|
color: i.value,
|
|
1147
1149
|
size: e.size,
|
|
1148
1150
|
variant: e.variant,
|
|
@@ -1157,23 +1159,23 @@ const Tt = /* @__PURE__ */ y(ht, [["render", $t]]), wt = /* @__PURE__ */ k({
|
|
|
1157
1159
|
class: x(["t-tabs", { [u.placement]: !0, [u.variant]: !0 }]),
|
|
1158
1160
|
style: w({ "--color": i.value, "--transform": n.value, "--border": u.border + "px" })
|
|
1159
1161
|
}, [
|
|
1160
|
-
|
|
1162
|
+
g(u.$slots, "default", {}, void 0, !0)
|
|
1161
1163
|
], 6));
|
|
1162
1164
|
}
|
|
1163
|
-
}),
|
|
1165
|
+
}), Xt = /* @__PURE__ */ y(qt, [["__scopeId", "data-v-65a2c74c"]]), Wt = /* @__PURE__ */ k({
|
|
1164
1166
|
__name: "t-loading-app",
|
|
1165
1167
|
setup(o) {
|
|
1166
|
-
return (s, e) => (c(), B(
|
|
1168
|
+
return (s, e) => (c(), B(ne, null, {
|
|
1167
1169
|
default: E(() => [
|
|
1168
1170
|
W(U, { type: "spinner" })
|
|
1169
1171
|
]),
|
|
1170
1172
|
_: 1
|
|
1171
1173
|
}));
|
|
1172
1174
|
}
|
|
1173
|
-
}),
|
|
1175
|
+
}), Yt = /* @__PURE__ */ y(Wt, [["__scopeId", "data-v-1436aa9f"]]), Ht = { key: 0 }, Ut = {
|
|
1174
1176
|
key: 0,
|
|
1175
1177
|
class: "t-checkbox-label"
|
|
1176
|
-
},
|
|
1178
|
+
}, jt = /* @__PURE__ */ k({
|
|
1177
1179
|
__name: "t-checkbox",
|
|
1178
1180
|
props: {
|
|
1179
1181
|
label: { default: "" },
|
|
@@ -1186,7 +1188,7 @@ const Tt = /* @__PURE__ */ y(ht, [["render", $t]]), wt = /* @__PURE__ */ k({
|
|
|
1186
1188
|
},
|
|
1187
1189
|
emits: ["update:modelValue"],
|
|
1188
1190
|
setup(o, { emit: s }) {
|
|
1189
|
-
const e = o, t = s, n =
|
|
1191
|
+
const e = o, t = s, n = z(() => {
|
|
1190
1192
|
let a = {
|
|
1191
1193
|
"--background": e.color,
|
|
1192
1194
|
"--color": "#ffffff"
|
|
@@ -1195,7 +1197,7 @@ const Tt = /* @__PURE__ */ y(ht, [["render", $t]]), wt = /* @__PURE__ */ k({
|
|
|
1195
1197
|
"--background": `var(--t-color-status-${e.color})`,
|
|
1196
1198
|
"--color": `var(--t-color-status-${e.color}-text)`
|
|
1197
1199
|
}), a;
|
|
1198
|
-
}), r =
|
|
1200
|
+
}), r = z(() => e.multiple ? e.modelValue.includes(e.value) : e.value === void 0 ? e.modelValue : e.modelValue == e.value), i = () => {
|
|
1199
1201
|
if (e.multiple) {
|
|
1200
1202
|
let a = e.modelValue;
|
|
1201
1203
|
e.modelValue.includes(e.value) ? a.splice(a.indexOf(e.value), 1) : a.push(e.value), t("update:modelValue", a);
|
|
@@ -1209,28 +1211,28 @@ const Tt = /* @__PURE__ */ y(ht, [["render", $t]]), wt = /* @__PURE__ */ k({
|
|
|
1209
1211
|
h("div", {
|
|
1210
1212
|
class: x(`t-checkbox-${a.type}`)
|
|
1211
1213
|
}, [
|
|
1212
|
-
a.type == "radio" ? (c(), p("div",
|
|
1213
|
-
a.type == "check" ?
|
|
1214
|
+
a.type == "radio" ? (c(), p("div", Ht)) : I("", !0),
|
|
1215
|
+
a.type == "check" ? g(a.$slots, "icon", { key: 1 }, () => [
|
|
1214
1216
|
u[0] || (u[0] = h("i", { class: "ri-check-line" }, null, -1))
|
|
1215
1217
|
], !0) : I("", !0)
|
|
1216
1218
|
], 2),
|
|
1217
|
-
a.label ? (c(), p("span",
|
|
1219
|
+
a.label ? (c(), p("span", Ut, V(e.label), 1)) : I("", !0)
|
|
1218
1220
|
], 6));
|
|
1219
1221
|
}
|
|
1220
|
-
}),
|
|
1222
|
+
}), Ft = /* @__PURE__ */ y(jt, [["__scopeId", "data-v-d558d0b0"]]), to = () => ({
|
|
1221
1223
|
install: (o) => {
|
|
1222
|
-
|
|
1224
|
+
me(), o.component("t-app", ge), o.component("t-screen", re), o.component("t-swipe-screen", Je), o.component("t-cable", qe), o.component("t-toolbar", Ze), o.component("t-content", ne), o.component("t-card", Xe), o.component("t-refresher", je), o.component("t-button", j), o.component("t-back-button", tt), o.component("t-present", L), o.component("t-text", F), o.component("t-sheet", rt), o.component("t-pull-signal", ae), o.component("t-input", ut), o.component("t-textarea", ft), o.component("t-rich-text", _t), o.component("t-grid", ht), o.component("t-grid-item", wt), o.component("t-divider", St), o.component("t-toggle-password", It), o.component("t-loading-icon", U), o.component("t-alert", oe), o.component("t-avatar", Ct), o.component("t-collapse", Rt), o.component("t-toast", se), o.component("t-switch", Lt), o.component("t-tab", Nt), o.component("t-tabs", Xt), o.component("t-loading-app", Yt), o.component("t-checkbox", Ft);
|
|
1223
1225
|
}
|
|
1224
1226
|
});
|
|
1225
1227
|
export {
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1228
|
+
fe as blurCurrentActive,
|
|
1229
|
+
Qt as createAction,
|
|
1230
|
+
Jt as createAlert,
|
|
1231
|
+
Zt as createLoading,
|
|
1232
|
+
eo as createToast,
|
|
1233
|
+
to as createToife,
|
|
1234
|
+
pe as isFormElement,
|
|
1235
|
+
Ve as presentController,
|
|
1236
|
+
T as screenController,
|
|
1237
|
+
Oe as useKeyboard
|
|
1236
1238
|
};
|