@toife/vue 2.0.14 → 2.0.15
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.es.js +396 -389
- 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 b, defineComponent as h, ref as v, computed as w, reactive as
|
|
2
|
-
import { gesture as
|
|
3
|
-
import { useRouter as
|
|
4
|
-
const
|
|
5
|
-
const
|
|
6
|
-
|
|
7
|
-
},
|
|
8
|
-
document.addEventListener("contextmenu", (
|
|
9
|
-
!
|
|
1
|
+
import { createElementBlock as p, openBlock as c, renderSlot as b, defineComponent as h, ref as v, computed as w, reactive as ie, watch as D, onMounted as G, Fragment as N, withDirectives as H, createCommentVNode as C, normalizeStyle as x, normalizeClass as S, vShow as F, createElementVNode as $, createVNode as U, createBlock as E, withCtx as V, toDisplayString as R, renderList as K, createTextVNode as q, createApp as j, h as J, provide as ue, unref as A, onUnmounted as re, resolveDynamicComponent as he, markRaw as ke, inject as de, useAttrs as $e, nextTick as le } from "vue";
|
|
2
|
+
import { gesture as ne } from "@toife/gesture";
|
|
3
|
+
import { useRouter as pe, useRoute as we } from "vue-router";
|
|
4
|
+
const xe = (t) => t && (t.tagName == "INPUT" || t.tagName == "TEXTAREA" || t.isContentEditable), Te = () => {
|
|
5
|
+
const t = document.activeElement;
|
|
6
|
+
t && (t.tagName === "INPUT" || t.tagName === "TEXTAREA" || t.isContentEditable) && t.blur();
|
|
7
|
+
}, Se = () => {
|
|
8
|
+
document.addEventListener("contextmenu", (t) => t.preventDefault()), document.addEventListener("pointerup", (t) => {
|
|
9
|
+
!xe(t.target) && Te();
|
|
10
10
|
}), "virtualKeyboard" in navigator && (navigator.virtualKeyboard.overlaysContent = !0);
|
|
11
|
-
}, g = (
|
|
12
|
-
const
|
|
11
|
+
}, g = (t, o) => {
|
|
12
|
+
const e = t.__vccOpts || t;
|
|
13
13
|
for (const [s, r] of o)
|
|
14
|
-
|
|
15
|
-
return
|
|
16
|
-
},
|
|
17
|
-
function
|
|
18
|
-
return c(), p("div",
|
|
19
|
-
b(
|
|
14
|
+
e[s] = r;
|
|
15
|
+
return e;
|
|
16
|
+
}, Be = {}, ze = { class: "t-app" };
|
|
17
|
+
function Ce(t, o) {
|
|
18
|
+
return c(), p("div", ze, [
|
|
19
|
+
b(t.$slots, "default")
|
|
20
20
|
]);
|
|
21
21
|
}
|
|
22
|
-
const
|
|
22
|
+
const Ie = /* @__PURE__ */ g(Be, [["render", Ce]]), Ee = /* @__PURE__ */ h({
|
|
23
23
|
__name: "t-present",
|
|
24
24
|
props: {
|
|
25
25
|
keepalive: { type: Boolean, default: !0 },
|
|
@@ -30,8 +30,8 @@ const Ce = /* @__PURE__ */ g(Se, [["render", ze]]), Ie = /* @__PURE__ */ h({
|
|
|
30
30
|
class: {}
|
|
31
31
|
},
|
|
32
32
|
emits: ["dismiss"],
|
|
33
|
-
setup(
|
|
34
|
-
const s = v(0), r = v(!1), l = v(), d = v(), a =
|
|
33
|
+
setup(t, { expose: o, emit: e }) {
|
|
34
|
+
const s = v(0), r = v(!1), l = v(), d = v(), a = t, f = e, y = w(() => r.value || a.keepalive), i = ie({
|
|
35
35
|
"--t-present-backdrop-opacity": "0.4",
|
|
36
36
|
"--t-present-transition": "0.2s",
|
|
37
37
|
"--t-present-content-transform": "0px",
|
|
@@ -46,16 +46,16 @@ const Ce = /* @__PURE__ */ g(Se, [["render", ze]]), Ie = /* @__PURE__ */ h({
|
|
|
46
46
|
contentOpacity: "1"
|
|
47
47
|
});
|
|
48
48
|
}, _ = () => {
|
|
49
|
-
let m = "0px",
|
|
50
|
-
a.placement == "bottom" || a.placement == "right" ? m = "100%" : a.placement == "top" || a.placement == "left" ? m = "-100%" : a.placement == "center" && (m = "0px",
|
|
49
|
+
let m = "0px", W = "1";
|
|
50
|
+
a.placement == "bottom" || a.placement == "right" ? m = "100%" : a.placement == "top" || a.placement == "left" ? m = "-100%" : a.placement == "center" && (m = "0px", W = "0"), n({
|
|
51
51
|
contentTransform: m,
|
|
52
52
|
transition: "0.2s",
|
|
53
|
-
contentOpacity:
|
|
53
|
+
contentOpacity: W,
|
|
54
54
|
backdropOpacity: "0"
|
|
55
55
|
});
|
|
56
56
|
};
|
|
57
|
-
|
|
58
|
-
a.visible ? (r.value = !0, s.value =
|
|
57
|
+
D(() => a.visible, () => {
|
|
58
|
+
a.visible ? (r.value = !0, s.value = Fe.getNewIndex(), setTimeout(() => {
|
|
59
59
|
u();
|
|
60
60
|
}, 50)) : (_(), setTimeout(() => {
|
|
61
61
|
r.value = !1;
|
|
@@ -68,10 +68,10 @@ const Ce = /* @__PURE__ */ g(Se, [["render", ze]]), Ie = /* @__PURE__ */ h({
|
|
|
68
68
|
const k = (m) => {
|
|
69
69
|
m.preventDefault(), f("dismiss", "backdrop");
|
|
70
70
|
};
|
|
71
|
-
return
|
|
71
|
+
return G(() => {
|
|
72
72
|
a.visible ? u() : _();
|
|
73
|
-
}), (m,
|
|
74
|
-
y.value ?
|
|
73
|
+
}), (m, W) => (c(), p(N, null, [
|
|
74
|
+
y.value ? H((c(), p("div", {
|
|
75
75
|
key: 0,
|
|
76
76
|
class: S(["t-present", [{ [m.placement]: !0 }, a.class]]),
|
|
77
77
|
ref_key: "present",
|
|
@@ -80,9 +80,9 @@ const Ce = /* @__PURE__ */ g(Se, [["render", ze]]), Ie = /* @__PURE__ */ h({
|
|
|
80
80
|
}, [
|
|
81
81
|
b(m.$slots, "default", {}, void 0, !0)
|
|
82
82
|
], 6)), [
|
|
83
|
-
[
|
|
83
|
+
[F, r.value]
|
|
84
84
|
]) : C("", !0),
|
|
85
|
-
y.value ?
|
|
85
|
+
y.value ? H((c(), p("div", {
|
|
86
86
|
key: 1,
|
|
87
87
|
class: "t-present-backdrop",
|
|
88
88
|
onClick: k,
|
|
@@ -90,11 +90,11 @@ const Ce = /* @__PURE__ */ g(Se, [["render", ze]]), Ie = /* @__PURE__ */ h({
|
|
|
90
90
|
ref: l,
|
|
91
91
|
style: x([i, { zIndex: s.value - 1 }, a.style])
|
|
92
92
|
}, null, 4)), [
|
|
93
|
-
[
|
|
93
|
+
[F, r.value]
|
|
94
94
|
]) : C("", !0)
|
|
95
95
|
], 64));
|
|
96
96
|
}
|
|
97
|
-
}),
|
|
97
|
+
}), L = /* @__PURE__ */ g(Ee, [["__scopeId", "data-v-e26ede54"]]), Ve = /* @__PURE__ */ h({
|
|
98
98
|
__name: "t-loading-icon",
|
|
99
99
|
props: {
|
|
100
100
|
size: {
|
|
@@ -106,22 +106,22 @@ const Ce = /* @__PURE__ */ g(Se, [["render", ze]]), Ie = /* @__PURE__ */ h({
|
|
|
106
106
|
default: "var(--t-color-text)"
|
|
107
107
|
}
|
|
108
108
|
},
|
|
109
|
-
setup(
|
|
110
|
-
return (o,
|
|
109
|
+
setup(t) {
|
|
110
|
+
return (o, e) => (c(), p("span", {
|
|
111
111
|
class: "t-loading-icon",
|
|
112
112
|
style: x({
|
|
113
|
-
width:
|
|
114
|
-
height:
|
|
115
|
-
borderTopColor:
|
|
113
|
+
width: t.size,
|
|
114
|
+
height: t.size,
|
|
115
|
+
borderTopColor: t.color
|
|
116
116
|
}),
|
|
117
117
|
role: "status",
|
|
118
118
|
"aria-label": "Loading..."
|
|
119
119
|
}, null, 4));
|
|
120
120
|
}
|
|
121
|
-
}),
|
|
121
|
+
}), Q = /* @__PURE__ */ g(Ve, [["__scopeId", "data-v-7c463303"]]), Pe = { class: "t-button-content" }, Re = {
|
|
122
122
|
key: 0,
|
|
123
123
|
class: "loader"
|
|
124
|
-
},
|
|
124
|
+
}, Ae = /* @__PURE__ */ h({
|
|
125
125
|
__name: "t-button",
|
|
126
126
|
props: {
|
|
127
127
|
color: { default: null },
|
|
@@ -133,8 +133,8 @@ const Ce = /* @__PURE__ */ g(Se, [["render", ze]]), Ie = /* @__PURE__ */ h({
|
|
|
133
133
|
variant: { default: "default" },
|
|
134
134
|
activeBackground: { type: Boolean, default: !1 }
|
|
135
135
|
},
|
|
136
|
-
setup(
|
|
137
|
-
const o =
|
|
136
|
+
setup(t) {
|
|
137
|
+
const o = t, e = w(() => {
|
|
138
138
|
let s;
|
|
139
139
|
return o.variant == "default" && (o.color ? ["warning", "info", "danger", "primary", "secondary", "success"].includes(o.color) ? s = {
|
|
140
140
|
"--border": "none",
|
|
@@ -176,25 +176,25 @@ const Ce = /* @__PURE__ */ g(Se, [["render", ze]]), Ie = /* @__PURE__ */ h({
|
|
|
176
176
|
});
|
|
177
177
|
return (s, r) => (c(), p("button", {
|
|
178
178
|
class: S(["t-button", { "active-background": o.activeBackground, rounded: o.rounded, block: o.block, ["size-" + o.size]: !0 }]),
|
|
179
|
-
style: x(
|
|
179
|
+
style: x(e.value)
|
|
180
180
|
}, [
|
|
181
|
-
|
|
181
|
+
H($("span", Pe, [
|
|
182
182
|
b(s.$slots, "default", {}, void 0, !0)
|
|
183
183
|
], 512), [
|
|
184
|
-
[
|
|
184
|
+
[F, !o.loading]
|
|
185
185
|
]),
|
|
186
|
-
o.loading ? (c(), p("span",
|
|
187
|
-
|
|
186
|
+
o.loading ? (c(), p("span", Re, [
|
|
187
|
+
U(Q, {
|
|
188
188
|
color: "var(--color)",
|
|
189
189
|
type: o.loadingType
|
|
190
190
|
}, null, 8, ["type"])
|
|
191
191
|
])) : C("", !0)
|
|
192
192
|
], 6));
|
|
193
193
|
}
|
|
194
|
-
}),
|
|
194
|
+
}), Z = /* @__PURE__ */ g(Ae, [["__scopeId", "data-v-185a9e49"]]), Xe = {
|
|
195
195
|
key: 0,
|
|
196
196
|
class: "t-alert-header"
|
|
197
|
-
},
|
|
197
|
+
}, Oe = { class: "t-alert-content" }, De = { class: "t-alert-footer" }, We = /* @__PURE__ */ h({
|
|
198
198
|
__name: "t-alert",
|
|
199
199
|
props: {
|
|
200
200
|
title: {},
|
|
@@ -203,8 +203,8 @@ const Ce = /* @__PURE__ */ g(Se, [["render", ze]]), Ie = /* @__PURE__ */ h({
|
|
|
203
203
|
dismiss: {}
|
|
204
204
|
},
|
|
205
205
|
emits: ["dismiss"],
|
|
206
|
-
setup(
|
|
207
|
-
const s =
|
|
206
|
+
setup(t, { expose: o, emit: e }) {
|
|
207
|
+
const s = t, r = v(!1), l = e, d = v(), a = v(!1), f = () => {
|
|
208
208
|
r.value = !0;
|
|
209
209
|
}, y = (n) => {
|
|
210
210
|
r.value = !1, n.handler && n.handler(), l("dismiss", "choose", n?.data);
|
|
@@ -215,7 +215,7 @@ const Ce = /* @__PURE__ */ g(Se, [["render", ze]]), Ie = /* @__PURE__ */ h({
|
|
|
215
215
|
};
|
|
216
216
|
return o({
|
|
217
217
|
open: f
|
|
218
|
-
}), (n, u) => (c(), E(
|
|
218
|
+
}), (n, u) => (c(), E(L, {
|
|
219
219
|
placement: "center",
|
|
220
220
|
backdrop: !0,
|
|
221
221
|
keepalive: !1,
|
|
@@ -229,20 +229,20 @@ const Ce = /* @__PURE__ */ g(Se, [["render", ze]]), Ie = /* @__PURE__ */ h({
|
|
|
229
229
|
ref: d
|
|
230
230
|
}, [
|
|
231
231
|
b(n.$slots, "header", {}, () => [
|
|
232
|
-
s.title ? (c(), p("div",
|
|
232
|
+
s.title ? (c(), p("div", Xe, R(s.title), 1)) : C("", !0)
|
|
233
233
|
], !0),
|
|
234
234
|
b(n.$slots, "content", {}, () => [
|
|
235
|
-
$("div",
|
|
235
|
+
$("div", Oe, R(s.message), 1)
|
|
236
236
|
], !0),
|
|
237
237
|
b(n.$slots, "footer", {}, () => [
|
|
238
|
-
$("div",
|
|
239
|
-
(c(!0), p(
|
|
238
|
+
$("div", De, [
|
|
239
|
+
(c(!0), p(N, null, K(s.actions, (_) => (c(), E(Z, {
|
|
240
240
|
color: _.color,
|
|
241
241
|
variant: _.variant,
|
|
242
242
|
onClick: (k) => y(_)
|
|
243
243
|
}, {
|
|
244
244
|
default: V(() => [
|
|
245
|
-
|
|
245
|
+
q(R(_.text), 1)
|
|
246
246
|
]),
|
|
247
247
|
_: 2
|
|
248
248
|
}, 1032, ["color", "variant", "onClick"]))), 256))
|
|
@@ -253,17 +253,17 @@ const Ce = /* @__PURE__ */ g(Se, [["render", ze]]), Ie = /* @__PURE__ */ h({
|
|
|
253
253
|
_: 3
|
|
254
254
|
}, 8, ["visible"]));
|
|
255
255
|
}
|
|
256
|
-
}),
|
|
256
|
+
}), fe = /* @__PURE__ */ g(We, [["__scopeId", "data-v-05d0c578"]]), wo = (t = {}) => ({
|
|
257
257
|
open() {
|
|
258
258
|
return new Promise((o) => {
|
|
259
|
-
let
|
|
260
|
-
if (!
|
|
259
|
+
let e = document.body.querySelector(".t-app");
|
|
260
|
+
if (!e) return;
|
|
261
261
|
const s = document.createElement("div"), r = v();
|
|
262
|
-
|
|
263
|
-
const l =
|
|
262
|
+
e.appendChild(s);
|
|
263
|
+
const l = j({
|
|
264
264
|
render() {
|
|
265
|
-
return
|
|
266
|
-
...
|
|
265
|
+
return J(fe, {
|
|
266
|
+
...t,
|
|
267
267
|
ref: r,
|
|
268
268
|
onDismiss: (d, a) => {
|
|
269
269
|
setTimeout(() => {
|
|
@@ -278,7 +278,7 @@ const Ce = /* @__PURE__ */ g(Se, [["render", ze]]), Ie = /* @__PURE__ */ h({
|
|
|
278
278
|
}, 50);
|
|
279
279
|
});
|
|
280
280
|
}
|
|
281
|
-
}),
|
|
281
|
+
}), Ne = /* @__PURE__ */ h({
|
|
282
282
|
__name: "t-action",
|
|
283
283
|
props: {
|
|
284
284
|
actions: {},
|
|
@@ -286,8 +286,8 @@ const Ce = /* @__PURE__ */ g(Se, [["render", ze]]), Ie = /* @__PURE__ */ h({
|
|
|
286
286
|
dismiss: {}
|
|
287
287
|
},
|
|
288
288
|
emits: ["dismiss"],
|
|
289
|
-
setup(
|
|
290
|
-
const s =
|
|
289
|
+
setup(t, { expose: o, emit: e }) {
|
|
290
|
+
const s = t, r = v(!1), l = e, d = v(), a = v(!1), f = () => {
|
|
291
291
|
r.value = !0;
|
|
292
292
|
}, y = (n) => {
|
|
293
293
|
r.value = !1, n.handler && n.handler(), l("dismiss", "choose", n?.data);
|
|
@@ -296,12 +296,12 @@ const Ce = /* @__PURE__ */ g(Se, [["render", ze]]), Ie = /* @__PURE__ */ h({
|
|
|
296
296
|
a.value = !1;
|
|
297
297
|
}, 300));
|
|
298
298
|
};
|
|
299
|
-
return
|
|
299
|
+
return D(() => s.visible, (n) => {
|
|
300
300
|
n ? f() : close();
|
|
301
301
|
}), o({
|
|
302
302
|
open: f,
|
|
303
303
|
close
|
|
304
|
-
}), (n, u) => (c(), E(
|
|
304
|
+
}), (n, u) => (c(), E(L, {
|
|
305
305
|
placement: "bottom",
|
|
306
306
|
backdrop: !0,
|
|
307
307
|
keepalive: !1,
|
|
@@ -314,8 +314,8 @@ const Ce = /* @__PURE__ */ g(Se, [["render", ze]]), Ie = /* @__PURE__ */ h({
|
|
|
314
314
|
ref_key: "container",
|
|
315
315
|
ref: d
|
|
316
316
|
}, [
|
|
317
|
-
(c(!0), p(
|
|
318
|
-
(c(!0), p(
|
|
317
|
+
(c(!0), p(N, null, K(s.actions, (_) => (c(), p("div", null, [
|
|
318
|
+
(c(!0), p(N, null, K(_, (k) => (c(), E(Z, {
|
|
319
319
|
color: k.color,
|
|
320
320
|
size: k.size,
|
|
321
321
|
variant: k.variant,
|
|
@@ -323,7 +323,7 @@ const Ce = /* @__PURE__ */ g(Se, [["render", ze]]), Ie = /* @__PURE__ */ h({
|
|
|
323
323
|
block: ""
|
|
324
324
|
}, {
|
|
325
325
|
default: V(() => [
|
|
326
|
-
|
|
326
|
+
q(R(k.text), 1)
|
|
327
327
|
]),
|
|
328
328
|
_: 2
|
|
329
329
|
}, 1032, ["color", "size", "variant", "onClick"]))), 256))
|
|
@@ -333,17 +333,17 @@ const Ce = /* @__PURE__ */ g(Se, [["render", ze]]), Ie = /* @__PURE__ */ h({
|
|
|
333
333
|
_: 1
|
|
334
334
|
}, 8, ["visible"]));
|
|
335
335
|
}
|
|
336
|
-
}),
|
|
336
|
+
}), qe = /* @__PURE__ */ g(Ne, [["__scopeId", "data-v-844fb240"]]), xo = (t = {}) => ({
|
|
337
337
|
open() {
|
|
338
338
|
return new Promise((o) => {
|
|
339
|
-
let
|
|
340
|
-
if (!
|
|
339
|
+
let e = document.body.querySelector(".t-app");
|
|
340
|
+
if (!e) return;
|
|
341
341
|
const s = document.createElement("div"), r = v();
|
|
342
|
-
|
|
343
|
-
const l =
|
|
342
|
+
e.appendChild(s);
|
|
343
|
+
const l = j({
|
|
344
344
|
render() {
|
|
345
|
-
return
|
|
346
|
-
...
|
|
345
|
+
return J(qe, {
|
|
346
|
+
...t,
|
|
347
347
|
ref: r,
|
|
348
348
|
onDismiss: (d, a) => {
|
|
349
349
|
setTimeout(() => {
|
|
@@ -358,14 +358,14 @@ const Ce = /* @__PURE__ */ g(Se, [["render", ze]]), Ie = /* @__PURE__ */ h({
|
|
|
358
358
|
}, 50);
|
|
359
359
|
});
|
|
360
360
|
}
|
|
361
|
-
}),
|
|
361
|
+
}), Me = { class: "t-loading" }, Le = /* @__PURE__ */ h({
|
|
362
362
|
__name: "t-loading",
|
|
363
363
|
props: {
|
|
364
364
|
type: { default: "spinner" }
|
|
365
365
|
},
|
|
366
366
|
emits: ["dismiss"],
|
|
367
|
-
setup(
|
|
368
|
-
const s =
|
|
367
|
+
setup(t, { expose: o, emit: e }) {
|
|
368
|
+
const s = t, r = v(!1);
|
|
369
369
|
return o({
|
|
370
370
|
open: () => {
|
|
371
371
|
r.value = !0;
|
|
@@ -373,16 +373,16 @@ const Ce = /* @__PURE__ */ g(Se, [["render", ze]]), Ie = /* @__PURE__ */ h({
|
|
|
373
373
|
close: () => {
|
|
374
374
|
r.value = !1;
|
|
375
375
|
}
|
|
376
|
-
}), (a, f) => (c(), E(
|
|
376
|
+
}), (a, f) => (c(), E(L, {
|
|
377
377
|
placement: "center",
|
|
378
378
|
backdrop: !0,
|
|
379
379
|
keepalive: !1,
|
|
380
380
|
visible: r.value
|
|
381
381
|
}, {
|
|
382
382
|
default: V(() => [
|
|
383
|
-
$("div",
|
|
383
|
+
$("div", Me, [
|
|
384
384
|
b(a.$slots, "default", {}, () => [
|
|
385
|
-
|
|
385
|
+
U(Q, {
|
|
386
386
|
type: s.type
|
|
387
387
|
}, null, 8, ["type"])
|
|
388
388
|
], !0)
|
|
@@ -391,16 +391,16 @@ const Ce = /* @__PURE__ */ g(Se, [["render", ze]]), Ie = /* @__PURE__ */ h({
|
|
|
391
391
|
_: 3
|
|
392
392
|
}, 8, ["visible"]));
|
|
393
393
|
}
|
|
394
|
-
}),
|
|
395
|
-
const o = v(),
|
|
394
|
+
}), He = /* @__PURE__ */ g(Le, [["__scopeId", "data-v-8f84c14e"]]), To = (t = {}) => {
|
|
395
|
+
const o = v(), e = document.body.querySelector(".t-app");
|
|
396
396
|
let s = null, r = null;
|
|
397
397
|
return {
|
|
398
398
|
open() {
|
|
399
399
|
return new Promise((l) => {
|
|
400
|
-
|
|
400
|
+
e && (r = document.createElement("div"), e.appendChild(r), s = j({
|
|
401
401
|
render() {
|
|
402
|
-
return
|
|
403
|
-
...
|
|
402
|
+
return J(He, {
|
|
403
|
+
...t,
|
|
404
404
|
ref: o
|
|
405
405
|
});
|
|
406
406
|
}
|
|
@@ -417,112 +417,119 @@ const Ce = /* @__PURE__ */ g(Se, [["render", ze]]), Ie = /* @__PURE__ */ h({
|
|
|
417
417
|
});
|
|
418
418
|
}
|
|
419
419
|
};
|
|
420
|
-
},
|
|
420
|
+
}, ce = v(1e3), Fe = {
|
|
421
421
|
getNewIndex() {
|
|
422
|
-
return
|
|
422
|
+
return ce.value += 2, ce.value;
|
|
423
423
|
}
|
|
424
|
-
}, X =
|
|
424
|
+
}, X = ie([]), Y = v(!0), z = v(!1), P = v(-1), B = w(() => X[P.value]), M = w(() => X[P.value + 1] || void 0), I = w(() => X[X.length - 2]), me = w(() => !z.value && Y.value && I.value), O = (t = !0) => {
|
|
425
|
+
let e = B.value.target.closest(".t-app").offsetWidth;
|
|
426
|
+
return t ? e + "px" : e;
|
|
427
|
+
}, ee = {
|
|
425
428
|
reset() {
|
|
426
429
|
z.value = !0;
|
|
427
|
-
const
|
|
428
|
-
|
|
430
|
+
const t = O(), o = B.value.target, e = I.value.target;
|
|
431
|
+
o.style.transition = "transform 0.35s ease", o.style.transform = "translateX(0px)", e.style.transition = "transform 0.35s ease", e.style.transform = `translateX(calc(${t} / 100 * 30 * -1)) scale(0.5) perspective(${t}) rotateY(30deg)`, document.documentElement.style.setProperty("--t-screen-backdrop-duration", "0.35s"), document.documentElement.style.setProperty("--t-swipe-backdrop-opacity", "0.5"), setTimeout(() => {
|
|
429
432
|
z.value = !1;
|
|
430
433
|
}, 400);
|
|
431
434
|
},
|
|
432
|
-
move(
|
|
433
|
-
if (!
|
|
434
|
-
const o =
|
|
435
|
-
|
|
435
|
+
move(t) {
|
|
436
|
+
if (!me.value) return;
|
|
437
|
+
const o = O(!1), e = o + "px", s = t / o * 100, r = B.value.target, l = I.value.target;
|
|
438
|
+
t > 15 && t <= o && (r.style.transition = "transform 0s ease", r.style.transform = `translateX(${t}px)`, l.style.transition = "transform 0s ease", document.documentElement.style.setProperty("--t-screen-backdrop-duration", "0s"), l.style.transform = `translateX(calc((${e} / 100 * 30 * -1) + ((${e} / 100 * 30) / 100 * ${s}))) scale(${0.5 + 0.5 / 100 * s}) perspective(${e}) rotateY(${30 - 30 / 100 * s}deg)`, document.documentElement.style.setProperty("--t-swipe-backdrop-opacity", `${0.5 - 0.5 / 100 * s}`));
|
|
436
439
|
},
|
|
437
|
-
back(
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
},
|
|
440
|
+
back(t) {
|
|
441
|
+
if (!I.value) return;
|
|
442
|
+
const o = O();
|
|
443
|
+
B.value.target.style.transition = "transform 0.35s ease", B.value.target.style.transform = `translateX(${o}) scale(1)`, I.value.target.style.transition = "transform 0.35s ease", I.value.target.style.transform = `translateX(0px) scale(1) perspective(${o}) rotateY(0deg)`, document.documentElement.style.setProperty("--t-screen-backdrop-duration", "0.35s"), document.documentElement.style.setProperty("--t-swipe-backdrop-opacity", "0"), z.value = !0, setTimeout(() => {
|
|
444
|
+
ae(), z.value = !1, P.value -= 1, t && t();
|
|
445
|
+
}, 400);
|
|
441
446
|
},
|
|
442
|
-
next(
|
|
443
|
-
if (!
|
|
447
|
+
next(t) {
|
|
448
|
+
if (!M.value) return;
|
|
444
449
|
if (P.value == -1) {
|
|
445
|
-
P.value += 1,
|
|
450
|
+
P.value += 1, t && t();
|
|
446
451
|
return;
|
|
447
452
|
}
|
|
448
453
|
z.value = !0;
|
|
449
|
-
|
|
450
|
-
o.style.transform =
|
|
451
|
-
o.style.transition = "transform 0.35s ease", o.style.transform = "translateX(0px)", document.documentElement.style.setProperty("--t-screen-backdrop-duration", "0.35s"), document.documentElement.style.setProperty("--t-swipe-backdrop-opacity", "0.5"), B.value && (B.value.target.style.transitionOrigin = "left center", B.value.target.style.transition = "transform 0.35s ease", B.value.target.style.transform =
|
|
452
|
-
z.value = !1, P.value += 1,
|
|
454
|
+
const o = M.value.target, e = O();
|
|
455
|
+
o.style.transform = `translateX(${e})`, o.transitionOrigin = "center", document.documentElement.style.setProperty("--t-screen-backdrop-duration", "0s"), document.documentElement.style.setProperty("--t-swipe-backdrop-opacity", "0"), setTimeout(() => {
|
|
456
|
+
o.style.transition = "transform 0.35s ease", o.style.transform = "translateX(0px)", document.documentElement.style.setProperty("--t-screen-backdrop-duration", "0.35s"), document.documentElement.style.setProperty("--t-swipe-backdrop-opacity", "0.5"), B.value && (B.value.target.style.transitionOrigin = "left center", B.value.target.style.transition = "transform 0.35s ease", B.value.target.style.transform = `translateX(calc(${e} / 100 * 30 * -1)) scale(0.5) perspective(${e}) rotateY(30deg)`), setTimeout(() => {
|
|
457
|
+
z.value = !1, P.value += 1, t && t();
|
|
453
458
|
}, 400);
|
|
454
459
|
}, 100);
|
|
455
460
|
}
|
|
456
|
-
},
|
|
461
|
+
}, te = {
|
|
457
462
|
reset() {
|
|
458
463
|
z.value = !0;
|
|
459
|
-
const
|
|
460
|
-
|
|
464
|
+
const t = O(), o = B.value.target, e = I.value.target;
|
|
465
|
+
o.style.transition = "transform 0.35s ease", o.style.transform = "translateX(0px)", e.style.transition = "transform 0.35s ease", e.style.transform = `translateX(calc(${t} / 100 * 30 * -1))`, document.documentElement.style.setProperty("--t-screen-backdrop-duration", "0.35s"), document.documentElement.style.setProperty("--t-swipe-backdrop-opacity", "0.5"), setTimeout(() => {
|
|
461
466
|
z.value = !1;
|
|
462
467
|
}, 400);
|
|
463
468
|
},
|
|
464
|
-
move(
|
|
465
|
-
const o =
|
|
466
|
-
|
|
469
|
+
move(t) {
|
|
470
|
+
const o = O(!1), e = o + "px", s = t / o * 100, r = B.value.target, l = I.value.target;
|
|
471
|
+
t > 15 && t <= o && (r.style.transition = "transform 0s ease", r.style.transform = `translateX(${t}px)`, l.style.transition = "transform 0s ease", document.documentElement.style.setProperty("--t-screen-backdrop-duration", "0s"), l.style.transform = `translateX(calc((${e} / 100 * 30 * -1) + ((${e} / 100 * 30) / 100 * ${s})))`, document.documentElement.style.setProperty("--t-swipe-backdrop-opacity", `${0.5 - 0.5 / 100 * s}`));
|
|
467
472
|
},
|
|
468
|
-
back(
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
},
|
|
473
|
+
back(t) {
|
|
474
|
+
if (!I.value) return;
|
|
475
|
+
const o = O();
|
|
476
|
+
B.value.target.style.transition = "transform 0.35s ease", B.value.target.style.transform = `translateX(${o}) scale(1)`, I.value.target.style.transition = "transform 0.35s ease", I.value.target.style.transform = "translateX(0px)", document.documentElement.style.setProperty("--t-screen-backdrop-duration", "0.35s"), document.documentElement.style.setProperty("--t-swipe-backdrop-opacity", "0"), z.value = !0, setTimeout(() => {
|
|
477
|
+
ae(), z.value = !1, P.value -= 1, t && t();
|
|
478
|
+
}, 400);
|
|
472
479
|
},
|
|
473
|
-
next(
|
|
474
|
-
if (!
|
|
480
|
+
next(t) {
|
|
481
|
+
if (!M.value) return;
|
|
475
482
|
if (P.value == -1) {
|
|
476
|
-
P.value += 1,
|
|
483
|
+
P.value += 1, t && t();
|
|
477
484
|
return;
|
|
478
485
|
}
|
|
479
486
|
z.value = !0;
|
|
480
|
-
|
|
481
|
-
o.style.transform =
|
|
482
|
-
o.style.transition = "transform 0.35s ease", o.style.transform = "translateX(0px)", document.documentElement.style.setProperty("--t-screen-backdrop-duration", "0.35s"), document.documentElement.style.setProperty("--t-swipe-backdrop-opacity", "0.5"), B.value && (B.value.target.style.transitionOrigin = "left center", B.value.target.style.transition = "transform 0.35s ease", B.value.target.style.transform =
|
|
483
|
-
z.value = !1, P.value += 1,
|
|
487
|
+
const o = M.value.target, e = O();
|
|
488
|
+
o.style.transform = `translateX(${e})`, o.transitionOrigin = "center", document.documentElement.style.setProperty("--t-screen-backdrop-duration", "0s"), document.documentElement.style.setProperty("--t-swipe-backdrop-opacity", "0"), setTimeout(() => {
|
|
489
|
+
o.style.transition = "transform 0.35s ease", o.style.transform = "translateX(0px)", document.documentElement.style.setProperty("--t-screen-backdrop-duration", "0.35s"), document.documentElement.style.setProperty("--t-swipe-backdrop-opacity", "0.5"), B.value && (B.value.target.style.transitionOrigin = "left center", B.value.target.style.transition = "transform 0.35s ease", B.value.target.style.transform = `translateX(calc(${e} / 100 * 30 * -1))`), setTimeout(() => {
|
|
490
|
+
z.value = !1, P.value += 1, t && t();
|
|
484
491
|
}, 400);
|
|
485
492
|
}, 100);
|
|
486
493
|
}
|
|
487
|
-
},
|
|
488
|
-
X.push(
|
|
489
|
-
},
|
|
490
|
-
X[
|
|
491
|
-
},
|
|
492
|
-
|
|
493
|
-
}, Ge = () => {
|
|
494
|
-
X.splice(0, X.length);
|
|
494
|
+
}, Ke = (t) => {
|
|
495
|
+
X.push(t);
|
|
496
|
+
}, Ge = (t, o) => {
|
|
497
|
+
X[t].target = o;
|
|
498
|
+
}, ae = (t) => {
|
|
499
|
+
t || X.pop();
|
|
495
500
|
}, Ue = () => {
|
|
496
|
-
|
|
501
|
+
X.splice(0, X.length);
|
|
497
502
|
}, je = () => {
|
|
498
|
-
|
|
499
|
-
}, Je = (
|
|
500
|
-
|
|
501
|
-
}, Qe = (
|
|
502
|
-
|
|
503
|
-
}, Ze = (
|
|
504
|
-
|
|
505
|
-
}, Ye = (
|
|
506
|
-
|
|
503
|
+
Y.value = !1;
|
|
504
|
+
}, Je = () => {
|
|
505
|
+
Y.value = !0;
|
|
506
|
+
}, Qe = (t, o) => {
|
|
507
|
+
t == "scale" && ee.next(o), t == "transform" && te.next(o);
|
|
508
|
+
}, Ze = (t, o) => {
|
|
509
|
+
t == "scale" && ee.back(o), t == "transform" && te.back(o);
|
|
510
|
+
}, Ye = (t, o) => {
|
|
511
|
+
t == "scale" && ee.move(o), t == "transform" && te.move(o);
|
|
512
|
+
}, et = (t) => {
|
|
513
|
+
t == "scale" && ee.reset(), t == "transform" && te.reset();
|
|
507
514
|
}, T = {
|
|
508
515
|
isBusy: z,
|
|
509
|
-
isSwipeable:
|
|
510
|
-
reset:
|
|
511
|
-
next:
|
|
512
|
-
back:
|
|
513
|
-
move:
|
|
516
|
+
isSwipeable: me,
|
|
517
|
+
reset: et,
|
|
518
|
+
next: Qe,
|
|
519
|
+
back: Ze,
|
|
520
|
+
move: Ye,
|
|
514
521
|
screens: X,
|
|
515
|
-
addScreen:
|
|
516
|
-
addScreenEl:
|
|
517
|
-
removeScreen:
|
|
518
|
-
removeAllScreen:
|
|
519
|
-
lockSwipe:
|
|
520
|
-
unlockSwipe:
|
|
521
|
-
swipeable:
|
|
522
|
+
addScreen: Ke,
|
|
523
|
+
addScreenEl: Ge,
|
|
524
|
+
removeScreen: ae,
|
|
525
|
+
removeAllScreen: Ue,
|
|
526
|
+
lockSwipe: je,
|
|
527
|
+
unlockSwipe: Je,
|
|
528
|
+
swipeable: Y,
|
|
522
529
|
currentScreen: B,
|
|
523
530
|
lastScreen: I,
|
|
524
|
-
nextScreen:
|
|
525
|
-
},
|
|
531
|
+
nextScreen: M
|
|
532
|
+
}, tt = { class: "t-toast-content" }, ot = /* @__PURE__ */ h({
|
|
526
533
|
__name: "t-toast",
|
|
527
534
|
props: {
|
|
528
535
|
message: {},
|
|
@@ -533,8 +540,8 @@ const Ce = /* @__PURE__ */ g(Se, [["render", ze]]), Ie = /* @__PURE__ */ h({
|
|
|
533
540
|
visible: { type: Boolean, default: !1 }
|
|
534
541
|
},
|
|
535
542
|
emits: ["dismiss"],
|
|
536
|
-
setup(
|
|
537
|
-
const s =
|
|
543
|
+
setup(t, { expose: o, emit: e }) {
|
|
544
|
+
const s = t, r = e, l = v(!1), d = v(!1), a = v(!1), f = () => {
|
|
538
545
|
d.value = !0, a.value = !1, setTimeout(() => {
|
|
539
546
|
l.value = !0;
|
|
540
547
|
}, 10);
|
|
@@ -543,7 +550,7 @@ const Ce = /* @__PURE__ */ g(Se, [["render", ze]]), Ie = /* @__PURE__ */ h({
|
|
|
543
550
|
d.value = !1, l.value = !1, r("dismiss");
|
|
544
551
|
}, 300);
|
|
545
552
|
};
|
|
546
|
-
|
|
553
|
+
D(() => s.visible, (n) => {
|
|
547
554
|
n ? f() : y();
|
|
548
555
|
});
|
|
549
556
|
const i = w(() => {
|
|
@@ -595,65 +602,65 @@ const Ce = /* @__PURE__ */ g(Se, [["render", ze]]), Ie = /* @__PURE__ */ h({
|
|
|
595
602
|
style: x({ "--space": s.space, ...i.value })
|
|
596
603
|
}, [
|
|
597
604
|
b(n.$slots, "content", {}, () => [
|
|
598
|
-
$("div",
|
|
605
|
+
$("div", tt, R(s.message), 1)
|
|
599
606
|
], !0)
|
|
600
607
|
], 6)) : C("", !0);
|
|
601
608
|
}
|
|
602
|
-
}),
|
|
609
|
+
}), ve = /* @__PURE__ */ g(ot, [["__scopeId", "data-v-2802d43f"]]), So = (t = {}) => ({
|
|
603
610
|
open() {
|
|
604
611
|
let o = document.body.querySelector(".t-app");
|
|
605
612
|
if (!o) return;
|
|
606
|
-
const
|
|
607
|
-
o.appendChild(
|
|
608
|
-
const r =
|
|
613
|
+
const e = document.createElement("div"), s = v();
|
|
614
|
+
o.appendChild(e);
|
|
615
|
+
const r = j({
|
|
609
616
|
render() {
|
|
610
|
-
return
|
|
611
|
-
...
|
|
617
|
+
return J(ve, {
|
|
618
|
+
...t,
|
|
612
619
|
ref: s,
|
|
613
620
|
onDismiss: () => {
|
|
614
621
|
setTimeout(() => {
|
|
615
|
-
r.unmount(),
|
|
622
|
+
r.unmount(), e.remove();
|
|
616
623
|
}, 300);
|
|
617
624
|
}
|
|
618
625
|
});
|
|
619
626
|
}
|
|
620
627
|
});
|
|
621
|
-
r.mount(
|
|
628
|
+
r.mount(e), setTimeout(() => {
|
|
622
629
|
s.value?.open?.(), setTimeout(() => {
|
|
623
630
|
s.value?.close?.();
|
|
624
|
-
},
|
|
631
|
+
}, t.duration + 10);
|
|
625
632
|
}, 50);
|
|
626
633
|
}
|
|
627
|
-
}),
|
|
628
|
-
function
|
|
634
|
+
}), st = v(0);
|
|
635
|
+
function ye() {
|
|
629
636
|
return {
|
|
630
|
-
height:
|
|
637
|
+
height: st
|
|
631
638
|
};
|
|
632
639
|
}
|
|
633
|
-
const
|
|
640
|
+
const rt = /* @__PURE__ */ h({
|
|
634
641
|
__name: "t-cable",
|
|
635
642
|
props: {
|
|
636
643
|
keyboard: { type: Boolean, default: !1 },
|
|
637
644
|
placement: { default: "bottom" }
|
|
638
645
|
},
|
|
639
|
-
setup(
|
|
640
|
-
const o =
|
|
641
|
-
return
|
|
646
|
+
setup(t) {
|
|
647
|
+
const o = t, { height: e } = ye();
|
|
648
|
+
return ue("cableState", {
|
|
642
649
|
placement: o.placement
|
|
643
650
|
}), (s, r) => (c(), p("div", {
|
|
644
|
-
class: S(["t-cable", { keyboard: o.keyboard && A(
|
|
645
|
-
style: x({ "--t-keyboard-height": A(
|
|
651
|
+
class: S(["t-cable", { keyboard: o.keyboard && A(e) > 0, [o.placement]: !0 }]),
|
|
652
|
+
style: x({ "--t-keyboard-height": A(e) + "px", "--t-keyboard-transition": A(e) > 0 ? "0.3s" : "0.1s" })
|
|
646
653
|
}, [
|
|
647
654
|
b(s.$slots, "default", {}, void 0, !0)
|
|
648
655
|
], 6));
|
|
649
656
|
}
|
|
650
|
-
}),
|
|
657
|
+
}), nt = /* @__PURE__ */ g(rt, [["__scopeId", "data-v-6cae224b"]]), at = /* @__PURE__ */ h({
|
|
651
658
|
__name: "t-card",
|
|
652
659
|
props: {
|
|
653
660
|
color: { default: null }
|
|
654
661
|
},
|
|
655
|
-
setup(
|
|
656
|
-
const o =
|
|
662
|
+
setup(t) {
|
|
663
|
+
const o = t, e = w(() => {
|
|
657
664
|
let s;
|
|
658
665
|
return o.color ? ["warning", "info", "danger", "primary", "secondary", "success"].includes(o.color) ? s = {
|
|
659
666
|
"--background": "var(--t-color-status-" + o.color + ")"
|
|
@@ -665,18 +672,18 @@ const st = /* @__PURE__ */ h({
|
|
|
665
672
|
});
|
|
666
673
|
return (s, r) => (c(), p("div", {
|
|
667
674
|
class: "t-card",
|
|
668
|
-
style: x(
|
|
675
|
+
style: x(e.value)
|
|
669
676
|
}, [
|
|
670
677
|
b(s.$slots, "default")
|
|
671
678
|
], 4));
|
|
672
679
|
}
|
|
673
|
-
}),
|
|
674
|
-
function
|
|
675
|
-
return c(), p("div",
|
|
676
|
-
b(
|
|
680
|
+
}), lt = {}, ct = { class: "t-content" };
|
|
681
|
+
function it(t, o) {
|
|
682
|
+
return c(), p("div", ct, [
|
|
683
|
+
b(t.$slots, "default", {}, void 0, !0)
|
|
677
684
|
]);
|
|
678
685
|
}
|
|
679
|
-
const
|
|
686
|
+
const _e = /* @__PURE__ */ g(lt, [["render", it], ["__scopeId", "data-v-ce0031a0"]]), ut = /* @__PURE__ */ h({
|
|
680
687
|
__name: "t-refresher",
|
|
681
688
|
props: {
|
|
682
689
|
threshold: { default: 120 },
|
|
@@ -684,20 +691,20 @@ const ye = /* @__PURE__ */ g(at, [["render", ct], ["__scopeId", "data-v-ce0031a0
|
|
|
684
691
|
variant: { default: "max" }
|
|
685
692
|
},
|
|
686
693
|
emits: ["refresh", "move", "cancel", "start"],
|
|
687
|
-
setup(
|
|
688
|
-
const
|
|
694
|
+
setup(t, { emit: o }) {
|
|
695
|
+
const e = o, s = t, r = v(0), l = v(!1), d = v();
|
|
689
696
|
let a, f = !1;
|
|
690
697
|
const y = () => {
|
|
691
698
|
l.value = !1, r.value = 0, a && a.cancel(), f = !1;
|
|
692
699
|
}, i = () => {
|
|
693
|
-
f = !0, l.value = !0, r.value = s.threshold,
|
|
700
|
+
f = !0, l.value = !0, r.value = s.threshold, e("refresh", y);
|
|
694
701
|
}, n = () => {
|
|
695
|
-
r.value = 0, l.value = !1, f = !1,
|
|
702
|
+
r.value = 0, l.value = !1, f = !1, e("cancel");
|
|
696
703
|
};
|
|
697
|
-
return
|
|
704
|
+
return D(() => d.value, () => {
|
|
698
705
|
a && a.destroy();
|
|
699
706
|
let u = d.value.closest(".t-content");
|
|
700
|
-
u && (a =
|
|
707
|
+
u && (a = ne(u, {
|
|
701
708
|
options: {
|
|
702
709
|
minMove: 20
|
|
703
710
|
},
|
|
@@ -705,7 +712,7 @@ const ye = /* @__PURE__ */ g(at, [["render", ct], ["__scopeId", "data-v-ce0031a0
|
|
|
705
712
|
return !(u.scrollTop > 0);
|
|
706
713
|
},
|
|
707
714
|
down() {
|
|
708
|
-
l.value || f ||
|
|
715
|
+
l.value || f || e("start");
|
|
709
716
|
},
|
|
710
717
|
move({ deltaY: _, initialDirection: k }) {
|
|
711
718
|
if (l.value || f || k != "down") return;
|
|
@@ -714,7 +721,7 @@ const ye = /* @__PURE__ */ g(at, [["render", ct], ["__scopeId", "data-v-ce0031a0
|
|
|
714
721
|
return;
|
|
715
722
|
}
|
|
716
723
|
const m = _ < 0 ? 0 : _;
|
|
717
|
-
r.value = m,
|
|
724
|
+
r.value = m, e("move", m);
|
|
718
725
|
},
|
|
719
726
|
up({ deltaY: _, initialDirection: k }) {
|
|
720
727
|
l.value || f || k != "down" || (s.variant == "up" && _ >= s.threshold ? i() : n());
|
|
@@ -725,9 +732,9 @@ const ye = /* @__PURE__ */ g(at, [["render", ct], ["__scopeId", "data-v-ce0031a0
|
|
|
725
732
|
}, {
|
|
726
733
|
passive: !1
|
|
727
734
|
}));
|
|
728
|
-
}),
|
|
735
|
+
}), re(() => {
|
|
729
736
|
a && a.destroy();
|
|
730
|
-
}), (u, _) =>
|
|
737
|
+
}), (u, _) => H((c(), p("div", {
|
|
731
738
|
class: S(["t-refresher", { safe: u.safe }]),
|
|
732
739
|
ref_key: "container",
|
|
733
740
|
ref: d
|
|
@@ -737,16 +744,16 @@ const ye = /* @__PURE__ */ g(at, [["render", ct], ["__scopeId", "data-v-ce0031a0
|
|
|
737
744
|
refreshing: l.value
|
|
738
745
|
}, void 0, !0)
|
|
739
746
|
], 2)), [
|
|
740
|
-
[
|
|
747
|
+
[F, r.value > 0]
|
|
741
748
|
]);
|
|
742
749
|
}
|
|
743
|
-
}),
|
|
744
|
-
function
|
|
745
|
-
return c(), p("div",
|
|
746
|
-
b(
|
|
750
|
+
}), dt = /* @__PURE__ */ g(ut, [["__scopeId", "data-v-3a3b6e1f"]]), pt = {}, ft = { class: "t-screen" };
|
|
751
|
+
function mt(t, o) {
|
|
752
|
+
return c(), p("div", ft, [
|
|
753
|
+
b(t.$slots, "default", {}, void 0, !0)
|
|
747
754
|
]);
|
|
748
755
|
}
|
|
749
|
-
const
|
|
756
|
+
const ge = /* @__PURE__ */ g(pt, [["render", mt], ["__scopeId", "data-v-c2a3436c"]]), vt = /* @__PURE__ */ h({
|
|
750
757
|
__name: "t-swipe-screen",
|
|
751
758
|
props: {
|
|
752
759
|
variant: { default: "scale" },
|
|
@@ -754,30 +761,30 @@ const _e = /* @__PURE__ */ g(dt, [["render", ft], ["__scopeId", "data-v-c2a3436c
|
|
|
754
761
|
route: {}
|
|
755
762
|
},
|
|
756
763
|
emits: ["change"],
|
|
757
|
-
setup(
|
|
758
|
-
let
|
|
759
|
-
const s = o, r =
|
|
764
|
+
setup(t, { emit: o }) {
|
|
765
|
+
let e = {};
|
|
766
|
+
const s = o, r = t;
|
|
760
767
|
let l;
|
|
761
|
-
const d = r.router ||
|
|
768
|
+
const d = r.router || pe(), a = r.route || we(), f = d.getRoutes();
|
|
762
769
|
for (let n of f)
|
|
763
|
-
|
|
770
|
+
e[n.name] = n.component || n.components;
|
|
764
771
|
const y = (n) => {
|
|
765
772
|
n && T.addScreen({
|
|
766
773
|
name: n,
|
|
767
774
|
target: null,
|
|
768
|
-
component:
|
|
775
|
+
component: ke(e[n] || null)
|
|
769
776
|
});
|
|
770
777
|
}, i = (n, u) => {
|
|
771
778
|
!u || T.screens[n].target || (T.addScreenEl(n, u.$el), T.nextScreen && T.next(r.variant, () => {
|
|
772
779
|
s("change");
|
|
773
780
|
}));
|
|
774
781
|
};
|
|
775
|
-
return
|
|
782
|
+
return D(() => a.name, (n, u) => {
|
|
776
783
|
n != T.currentScreen.value?.name && (T.lastScreen.value?.name == n ? T.back(r.variant, () => {
|
|
777
784
|
s("change");
|
|
778
785
|
}) : y(a.name));
|
|
779
|
-
}),
|
|
780
|
-
y(a.name), l =
|
|
786
|
+
}), G(() => {
|
|
787
|
+
y(a.name), l = ne(document.body, {
|
|
781
788
|
beforeEvent(n) {
|
|
782
789
|
return !!T.isSwipeable.value;
|
|
783
790
|
},
|
|
@@ -799,17 +806,17 @@ const _e = /* @__PURE__ */ g(dt, [["render", ft], ["__scopeId", "data-v-c2a3436c
|
|
|
799
806
|
T.reset(r.variant);
|
|
800
807
|
}
|
|
801
808
|
});
|
|
802
|
-
}),
|
|
809
|
+
}), re(() => {
|
|
803
810
|
l && l.destroy(), T.removeAllScreen();
|
|
804
|
-
}), (n, u) => (c(), p(
|
|
805
|
-
(c(!0), p(
|
|
811
|
+
}), (n, u) => (c(), p(N, null, [
|
|
812
|
+
(c(!0), p(N, null, K(A(T).screens, (_, k) => (c(), E(ge, {
|
|
806
813
|
ref_for: !0,
|
|
807
814
|
ref: (m) => i(k, m),
|
|
808
815
|
style: x({ zIndex: k + (k == A(T).screens.length - 1 ? 2 : 1) }),
|
|
809
816
|
key: k
|
|
810
817
|
}, {
|
|
811
818
|
default: V(() => [
|
|
812
|
-
(c(), E(
|
|
819
|
+
(c(), E(he(_.component.default)))
|
|
813
820
|
]),
|
|
814
821
|
_: 2
|
|
815
822
|
}, 1032, ["style"]))), 128)),
|
|
@@ -819,15 +826,15 @@ const _e = /* @__PURE__ */ g(dt, [["render", ft], ["__scopeId", "data-v-c2a3436c
|
|
|
819
826
|
}, null, 4)
|
|
820
827
|
], 64));
|
|
821
828
|
}
|
|
822
|
-
}),
|
|
829
|
+
}), yt = /* @__PURE__ */ g(vt, [["__scopeId", "data-v-23e0cfda"]]), _t = /* @__PURE__ */ h({
|
|
823
830
|
__name: "t-toolbar",
|
|
824
831
|
props: {
|
|
825
832
|
placement: { default: null },
|
|
826
833
|
safe: { type: Boolean, default: !0 },
|
|
827
834
|
size: { default: "50px" }
|
|
828
835
|
},
|
|
829
|
-
setup(
|
|
830
|
-
const o =
|
|
836
|
+
setup(t) {
|
|
837
|
+
const o = t, e = de("cableState"), s = w(() => o?.placement || e?.placement);
|
|
831
838
|
return (r, l) => (c(), p("div", {
|
|
832
839
|
class: S(["t-toolbar", { [s.value]: !0, safe: o.safe }]),
|
|
833
840
|
style: x({ "--t-size-toolbar": o.size })
|
|
@@ -837,16 +844,16 @@ const _e = /* @__PURE__ */ g(dt, [["render", ft], ["__scopeId", "data-v-c2a3436c
|
|
|
837
844
|
])
|
|
838
845
|
], 6));
|
|
839
846
|
}
|
|
840
|
-
}),
|
|
847
|
+
}), gt = /* @__PURE__ */ g(_t, [["__scopeId", "data-v-1ee9866d"]]), bt = /* @__PURE__ */ h({
|
|
841
848
|
__name: "t-back-button",
|
|
842
849
|
props: {
|
|
843
850
|
to: {},
|
|
844
851
|
router: {}
|
|
845
852
|
},
|
|
846
|
-
setup(
|
|
847
|
-
const o =
|
|
848
|
-
if (
|
|
849
|
-
|
|
853
|
+
setup(t) {
|
|
854
|
+
const o = t, e = $e(), s = o.router || pe(), r = (l) => {
|
|
855
|
+
if (e.onBack) {
|
|
856
|
+
e.onBack(l);
|
|
850
857
|
return;
|
|
851
858
|
}
|
|
852
859
|
T.lastScreen.value ? s?.back?.() : o.to && s?.push?.(o.to);
|
|
@@ -861,14 +868,14 @@ const _e = /* @__PURE__ */ g(dt, [["render", ft], ["__scopeId", "data-v-c2a3436c
|
|
|
861
868
|
], !0)
|
|
862
869
|
])) : C("", !0);
|
|
863
870
|
}
|
|
864
|
-
}),
|
|
871
|
+
}), ht = /* @__PURE__ */ g(bt, [["__scopeId", "data-v-dcf9d363"]]), kt = /* @__PURE__ */ h({
|
|
865
872
|
__name: "t-text",
|
|
866
873
|
props: {
|
|
867
874
|
color: { default: "var(--t-color-text)" },
|
|
868
875
|
size: { default: "standard" }
|
|
869
876
|
},
|
|
870
|
-
setup(
|
|
871
|
-
const o =
|
|
877
|
+
setup(t) {
|
|
878
|
+
const o = t, e = w(() => {
|
|
872
879
|
let s, r = o.color;
|
|
873
880
|
return o.size == "standard" ? s = "var(--t-fs-10)" : o.size == "small" ? s = "var(--t-fs-08)" : o.size == "large" ? s = "var(--t-fs-12)" : s = o.size, ["warning", "info", "danger", "primary", "secondary", "success"].includes(o.color) && (r = `var(--t-color-status-${o.color})`), {
|
|
874
881
|
"--color": r,
|
|
@@ -877,22 +884,22 @@ const _e = /* @__PURE__ */ g(dt, [["render", ft], ["__scopeId", "data-v-c2a3436c
|
|
|
877
884
|
});
|
|
878
885
|
return (s, r) => (c(), p("span", {
|
|
879
886
|
class: "t-text",
|
|
880
|
-
style: x(
|
|
887
|
+
style: x(e.value)
|
|
881
888
|
}, [
|
|
882
889
|
b(s.$slots, "default", {}, void 0, !0)
|
|
883
890
|
], 4));
|
|
884
891
|
}
|
|
885
|
-
}),
|
|
892
|
+
}), se = /* @__PURE__ */ g(kt, [["__scopeId", "data-v-f0f94f05"]]), $t = /* @__PURE__ */ h({
|
|
886
893
|
__name: "t-gesture-indicator",
|
|
887
894
|
props: {
|
|
888
895
|
placement: { default: "bottom" }
|
|
889
896
|
},
|
|
890
|
-
setup(
|
|
891
|
-
return (o,
|
|
897
|
+
setup(t) {
|
|
898
|
+
return (o, e) => (c(), p("div", {
|
|
892
899
|
class: S(["t-gesture-indicator", { [o.placement]: !0 }])
|
|
893
900
|
}, null, 2));
|
|
894
901
|
}
|
|
895
|
-
}),
|
|
902
|
+
}), be = /* @__PURE__ */ g($t, [["__scopeId", "data-v-ed8f7308"]]), wt = /* @__PURE__ */ h({
|
|
896
903
|
__name: "t-sheet",
|
|
897
904
|
props: {
|
|
898
905
|
background: { default: "var(--t-color-surface)" },
|
|
@@ -909,14 +916,14 @@ const _e = /* @__PURE__ */ g(dt, [["render", ft], ["__scopeId", "data-v-c2a3436c
|
|
|
909
916
|
style: {}
|
|
910
917
|
},
|
|
911
918
|
emits: ["dismiss"],
|
|
912
|
-
setup(
|
|
913
|
-
const
|
|
919
|
+
setup(t, { emit: o }) {
|
|
920
|
+
const e = t, s = o, r = v(), l = v(), d = v(!1);
|
|
914
921
|
let a = null;
|
|
915
922
|
const f = w(() => {
|
|
916
|
-
if (
|
|
917
|
-
if (
|
|
918
|
-
if (
|
|
919
|
-
if (
|
|
923
|
+
if (e.placement == "bottom") return "down";
|
|
924
|
+
if (e.placement == "top") return "up";
|
|
925
|
+
if (e.placement == "left") return "left";
|
|
926
|
+
if (e.placement == "right") return "right";
|
|
920
927
|
}), y = (n) => {
|
|
921
928
|
s("dismiss", n);
|
|
922
929
|
}, i = () => {
|
|
@@ -924,14 +931,14 @@ const _e = /* @__PURE__ */ g(dt, [["render", ft], ["__scopeId", "data-v-c2a3436c
|
|
|
924
931
|
d.value = !1;
|
|
925
932
|
}, 300);
|
|
926
933
|
};
|
|
927
|
-
return
|
|
928
|
-
n && (a =
|
|
934
|
+
return D(() => r.value, (n) => {
|
|
935
|
+
n && (a = ne(r.value, {
|
|
929
936
|
isMoving: !1,
|
|
930
937
|
options: {
|
|
931
938
|
minDist: 30
|
|
932
939
|
},
|
|
933
940
|
beforeEvent(u) {
|
|
934
|
-
return !(d.value || !
|
|
941
|
+
return !(d.value || !e.gesture || e.placement == "center");
|
|
935
942
|
},
|
|
936
943
|
down() {
|
|
937
944
|
this.isMoving = !1;
|
|
@@ -942,7 +949,7 @@ const _e = /* @__PURE__ */ g(dt, [["render", ft], ["__scopeId", "data-v-c2a3436c
|
|
|
942
949
|
move({ deltaY: u, deltaX: _, initialDirection: k }) {
|
|
943
950
|
if (k != f.value) return;
|
|
944
951
|
let m = 0;
|
|
945
|
-
|
|
952
|
+
e.placement == "bottom" || e.placement == "top" ? m = u : m = _, e.placement == "bottom" && (m = u > 0 ? u : 0), e.placement == "top" && (m = u < 0 ? u : 0), e.placement == "left" && (m = _ < 0 ? _ : 0), e.placement == "right" && (m = _ > 0 ? _ : 0), (e.placement == "bottom" && (m >= 10 || this.isMoving) || e.placement == "top" && (m <= -10 || this.isMoving) || e.placement == "left" && (m <= -10 || this.isMoving) || e.placement == "right" && (m >= 10 || this.isMoving)) && (this.isMoving = !0, l.value.render({
|
|
946
953
|
contentTransform: m + "px",
|
|
947
954
|
transition: "0s"
|
|
948
955
|
}));
|
|
@@ -952,34 +959,34 @@ const _e = /* @__PURE__ */ g(dt, [["render", ft], ["__scopeId", "data-v-c2a3436c
|
|
|
952
959
|
l.value.open();
|
|
953
960
|
return;
|
|
954
961
|
}
|
|
955
|
-
let m,
|
|
956
|
-
|
|
962
|
+
let m, W, oe;
|
|
963
|
+
e.placement == "bottom" || e.placement == "top" ? (m = r.value.offsetHeight, oe = u) : (m = r.value.offsetWidth, oe = _), W = oe / m * 100, W > 50 ? s("dismiss", "gesture") : l.value.open();
|
|
957
964
|
},
|
|
958
965
|
cancel() {
|
|
959
966
|
this.isMoving = !1, i(), l.value.open();
|
|
960
967
|
}
|
|
961
968
|
}));
|
|
962
|
-
}),
|
|
969
|
+
}), re(() => {
|
|
963
970
|
a && a.destroy();
|
|
964
|
-
}), (n, u) => (c(), E(
|
|
971
|
+
}), (n, u) => (c(), E(L, {
|
|
965
972
|
ref_key: "present",
|
|
966
973
|
ref: l,
|
|
967
|
-
class: S(
|
|
968
|
-
placement:
|
|
974
|
+
class: S(e.class),
|
|
975
|
+
placement: e.placement,
|
|
969
976
|
backdrop: n.backdrop,
|
|
970
|
-
visible:
|
|
971
|
-
keepalive:
|
|
977
|
+
visible: e.visible,
|
|
978
|
+
keepalive: e.keepalive,
|
|
972
979
|
onDismiss: y,
|
|
973
|
-
style: x(
|
|
980
|
+
style: x(e.style)
|
|
974
981
|
}, {
|
|
975
982
|
default: V(() => [
|
|
976
|
-
|
|
983
|
+
e.gesture && e.indicator && e.placement != "center" ? (c(), E(be, {
|
|
977
984
|
key: 0,
|
|
978
|
-
placement:
|
|
985
|
+
placement: e.placement
|
|
979
986
|
}, null, 8, ["placement"])) : C("", !0),
|
|
980
987
|
$("div", {
|
|
981
|
-
class: S(["t-sheet", { fullscreen:
|
|
982
|
-
style: x({ "--background":
|
|
988
|
+
class: S(["t-sheet", { fullscreen: e.fullscreen, [e.placement]: !0, rounded: n.rounded, radius: e.radius }]),
|
|
989
|
+
style: x({ "--background": e.background }),
|
|
983
990
|
ref_key: "sheet",
|
|
984
991
|
ref: r
|
|
985
992
|
}, [
|
|
@@ -989,7 +996,7 @@ const _e = /* @__PURE__ */ g(dt, [["render", ft], ["__scopeId", "data-v-c2a3436c
|
|
|
989
996
|
_: 3
|
|
990
997
|
}, 8, ["class", "placement", "backdrop", "visible", "keepalive", "style"]));
|
|
991
998
|
}
|
|
992
|
-
}),
|
|
999
|
+
}), xt = /* @__PURE__ */ g(wt, [["__scopeId", "data-v-27e04f6f"]]), Tt = { class: "t-input-label" }, St = { class: "t-input-content" }, Bt = ["placeholder", "value", "type", "readonly"], zt = /* @__PURE__ */ h({
|
|
993
1000
|
__name: "t-input",
|
|
994
1001
|
props: {
|
|
995
1002
|
size: { default: "standard" },
|
|
@@ -1004,9 +1011,9 @@ const _e = /* @__PURE__ */ g(dt, [["render", ft], ["__scopeId", "data-v-c2a3436c
|
|
|
1004
1011
|
readonly: { type: Boolean, default: !1 }
|
|
1005
1012
|
},
|
|
1006
1013
|
emits: ["update:modelValue"],
|
|
1007
|
-
setup(
|
|
1008
|
-
const
|
|
1009
|
-
() => !(
|
|
1014
|
+
setup(t, { emit: o }) {
|
|
1015
|
+
const e = t, s = o, r = v(!1), l = v(null), d = w(
|
|
1016
|
+
() => !(e.modelValue === "" || e.modelValue == null)
|
|
1010
1017
|
), a = (i) => {
|
|
1011
1018
|
s("update:modelValue", i.target.value);
|
|
1012
1019
|
}, f = async (i) => {
|
|
@@ -1025,8 +1032,8 @@ const _e = /* @__PURE__ */ g(dt, [["render", ft], ["__scopeId", "data-v-c2a3436c
|
|
|
1025
1032
|
}])
|
|
1026
1033
|
}, [
|
|
1027
1034
|
$("label", null, [
|
|
1028
|
-
$("span",
|
|
1029
|
-
$("div",
|
|
1035
|
+
$("span", Tt, R(i.label), 1),
|
|
1036
|
+
$("div", St, [
|
|
1030
1037
|
b(i.$slots, "start", {}, void 0, !0),
|
|
1031
1038
|
$("input", {
|
|
1032
1039
|
ref_key: "editable",
|
|
@@ -1039,70 +1046,70 @@ const _e = /* @__PURE__ */ g(dt, [["render", ft], ["__scopeId", "data-v-c2a3436c
|
|
|
1039
1046
|
onFocus: f,
|
|
1040
1047
|
onBlur: y,
|
|
1041
1048
|
readonly: i.readonly
|
|
1042
|
-
}, null, 40,
|
|
1049
|
+
}, null, 40, Bt),
|
|
1043
1050
|
b(i.$slots, "end", {}, void 0, !0)
|
|
1044
1051
|
])
|
|
1045
1052
|
]),
|
|
1046
|
-
i.error ? (c(), E(
|
|
1053
|
+
i.error ? (c(), E(se, {
|
|
1047
1054
|
key: 0,
|
|
1048
1055
|
color: "danger"
|
|
1049
1056
|
}, {
|
|
1050
1057
|
default: V(() => [
|
|
1051
|
-
|
|
1058
|
+
q(R(i.error), 1)
|
|
1052
1059
|
]),
|
|
1053
1060
|
_: 1
|
|
1054
|
-
})) : i.help ? (c(), E(
|
|
1061
|
+
})) : i.help ? (c(), E(se, {
|
|
1055
1062
|
key: 1,
|
|
1056
1063
|
color: "secondary"
|
|
1057
1064
|
}, {
|
|
1058
1065
|
default: V(() => [
|
|
1059
|
-
|
|
1066
|
+
q(R(i.help), 1)
|
|
1060
1067
|
]),
|
|
1061
1068
|
_: 1
|
|
1062
1069
|
})) : C("", !0)
|
|
1063
1070
|
], 2));
|
|
1064
1071
|
}
|
|
1065
|
-
}),
|
|
1066
|
-
function
|
|
1072
|
+
}), Ct = /* @__PURE__ */ g(zt, [["__scopeId", "data-v-11ddaa71"]]), It = {};
|
|
1073
|
+
function Et(t, o) {
|
|
1067
1074
|
return c(), p("textarea");
|
|
1068
1075
|
}
|
|
1069
|
-
const
|
|
1070
|
-
function
|
|
1076
|
+
const Vt = /* @__PURE__ */ g(It, [["render", Et]]), Pt = {};
|
|
1077
|
+
function Rt(t, o) {
|
|
1071
1078
|
return c(), p("div");
|
|
1072
1079
|
}
|
|
1073
|
-
const
|
|
1074
|
-
function
|
|
1075
|
-
return c(), p("div",
|
|
1080
|
+
const At = /* @__PURE__ */ g(Pt, [["render", Rt]]), Xt = {}, Ot = { class: "t-grid" };
|
|
1081
|
+
function Dt(t, o) {
|
|
1082
|
+
return c(), p("div", Ot);
|
|
1076
1083
|
}
|
|
1077
|
-
const
|
|
1078
|
-
function
|
|
1079
|
-
return c(), p("div",
|
|
1084
|
+
const Wt = /* @__PURE__ */ g(Xt, [["render", Dt]]), Nt = {}, qt = { class: "t-grid-item" };
|
|
1085
|
+
function Mt(t, o) {
|
|
1086
|
+
return c(), p("div", qt);
|
|
1080
1087
|
}
|
|
1081
|
-
const
|
|
1088
|
+
const Lt = /* @__PURE__ */ g(Nt, [["render", Mt]]), Ht = /* @__PURE__ */ h({
|
|
1082
1089
|
__name: "t-divider",
|
|
1083
1090
|
props: {
|
|
1084
1091
|
direction: { default: "horizontal" }
|
|
1085
1092
|
},
|
|
1086
|
-
setup(
|
|
1087
|
-
const o =
|
|
1088
|
-
return (
|
|
1093
|
+
setup(t) {
|
|
1094
|
+
const o = t;
|
|
1095
|
+
return (e, s) => (c(), p("div", {
|
|
1089
1096
|
class: S(["t-divider", { [o.direction]: !0 }])
|
|
1090
1097
|
}, null, 2));
|
|
1091
1098
|
}
|
|
1092
|
-
}),
|
|
1099
|
+
}), Ft = /* @__PURE__ */ g(Ht, [["__scopeId", "data-v-47ee8991"]]), Kt = /* @__PURE__ */ h({
|
|
1093
1100
|
__name: "t-toggle-password",
|
|
1094
1101
|
props: {
|
|
1095
1102
|
color: { default: "warning" }
|
|
1096
1103
|
},
|
|
1097
1104
|
emits: ["change"],
|
|
1098
|
-
setup(
|
|
1099
|
-
const
|
|
1100
|
-
let y =
|
|
1101
|
-
return ["warning", "info", "danger", "primary", "secondary", "success"].includes(
|
|
1105
|
+
setup(t, { emit: o }) {
|
|
1106
|
+
const e = t, s = o, r = v(!1), l = v(), d = w(() => {
|
|
1107
|
+
let y = e.color;
|
|
1108
|
+
return ["warning", "info", "danger", "primary", "secondary", "success"].includes(e.color) && (y = `var(--t-color-status-${e.color})`), {
|
|
1102
1109
|
"--color": y
|
|
1103
1110
|
};
|
|
1104
1111
|
}), a = () => l.value?.parentElement?.querySelector?.("input");
|
|
1105
|
-
|
|
1112
|
+
G(() => {
|
|
1106
1113
|
let y = a();
|
|
1107
1114
|
y && (r.value = y.type != "password", s("change", r.value));
|
|
1108
1115
|
});
|
|
@@ -1125,35 +1132,35 @@ const Mt = /* @__PURE__ */ g(Wt, [["render", qt]]), Lt = /* @__PURE__ */ h({
|
|
|
1125
1132
|
], !0)
|
|
1126
1133
|
], 4));
|
|
1127
1134
|
}
|
|
1128
|
-
}),
|
|
1135
|
+
}), Gt = /* @__PURE__ */ g(Kt, [["__scopeId", "data-v-3268e9e3"]]), Ut = /* @__PURE__ */ h({
|
|
1129
1136
|
__name: "t-avatar",
|
|
1130
1137
|
props: {
|
|
1131
1138
|
square: { type: Boolean, default: !1 },
|
|
1132
1139
|
size: { default: "standard" }
|
|
1133
1140
|
},
|
|
1134
|
-
setup(
|
|
1135
|
-
const o =
|
|
1141
|
+
setup(t) {
|
|
1142
|
+
const o = t, e = w(() => o.size == "small" ? "24px" : o.size == "standard" ? "40px" : o.size == "large" ? "60px" : o.size);
|
|
1136
1143
|
return (s, r) => (c(), p("div", {
|
|
1137
1144
|
class: S(["t-avatar", { square: s.square }]),
|
|
1138
|
-
style: x({ "--size":
|
|
1145
|
+
style: x({ "--size": e.value })
|
|
1139
1146
|
}, [
|
|
1140
1147
|
b(s.$slots, "default", {}, void 0, !0)
|
|
1141
1148
|
], 6));
|
|
1142
1149
|
}
|
|
1143
|
-
}),
|
|
1150
|
+
}), jt = /* @__PURE__ */ g(Ut, [["__scopeId", "data-v-24384c2f"]]), Jt = { class: "t-collapse-title" }, Qt = {
|
|
1144
1151
|
key: 0,
|
|
1145
1152
|
class: "icon"
|
|
1146
|
-
},
|
|
1153
|
+
}, Zt = {
|
|
1147
1154
|
key: 1,
|
|
1148
1155
|
class: "icon"
|
|
1149
|
-
},
|
|
1156
|
+
}, Yt = { class: "t-collapse-content" }, eo = /* @__PURE__ */ h({
|
|
1150
1157
|
__name: "t-collapse",
|
|
1151
1158
|
props: {
|
|
1152
1159
|
title: {}
|
|
1153
1160
|
},
|
|
1154
1161
|
emits: ["change"],
|
|
1155
|
-
setup(
|
|
1156
|
-
const
|
|
1162
|
+
setup(t, { emit: o }) {
|
|
1163
|
+
const e = t, s = o, r = v(!1), l = v(""), d = v(), a = () => {
|
|
1157
1164
|
r.value = !r.value, l.value = `calc(${d.value.offsetHeight}px + 2rem)`, s("change", r.value);
|
|
1158
1165
|
};
|
|
1159
1166
|
return s("change", r.value), (f, y) => (c(), p("div", {
|
|
@@ -1165,20 +1172,20 @@ const Mt = /* @__PURE__ */ g(Wt, [["render", qt]]), Lt = /* @__PURE__ */ h({
|
|
|
1165
1172
|
onClick: a
|
|
1166
1173
|
}, [
|
|
1167
1174
|
b(f.$slots, "icon"),
|
|
1168
|
-
$("div",
|
|
1175
|
+
$("div", Jt, [
|
|
1169
1176
|
b(f.$slots, "title", {}, () => [
|
|
1170
|
-
|
|
1177
|
+
q(R(e.title), 1)
|
|
1171
1178
|
])
|
|
1172
1179
|
]),
|
|
1173
1180
|
b(f.$slots, "toggle", {}, () => [
|
|
1174
|
-
r.value ? (c(), p("div",
|
|
1181
|
+
r.value ? (c(), p("div", Qt, [...y[0] || (y[0] = [
|
|
1175
1182
|
$("i", { class: "ri-arrow-up-s-line" }, null, -1)
|
|
1176
|
-
])])) : (c(), p("div",
|
|
1183
|
+
])])) : (c(), p("div", Zt, [...y[1] || (y[1] = [
|
|
1177
1184
|
$("i", { class: "ri-arrow-down-s-line" }, null, -1)
|
|
1178
1185
|
])]))
|
|
1179
1186
|
])
|
|
1180
1187
|
]),
|
|
1181
|
-
$("div",
|
|
1188
|
+
$("div", Yt, [
|
|
1182
1189
|
$("div", {
|
|
1183
1190
|
ref_key: "content",
|
|
1184
1191
|
ref: d
|
|
@@ -1190,52 +1197,52 @@ const Mt = /* @__PURE__ */ g(Wt, [["render", qt]]), Lt = /* @__PURE__ */ h({
|
|
|
1190
1197
|
])
|
|
1191
1198
|
], 6));
|
|
1192
1199
|
}
|
|
1193
|
-
}),
|
|
1200
|
+
}), to = /* @__PURE__ */ h({
|
|
1194
1201
|
__name: "t-switch",
|
|
1195
1202
|
props: {
|
|
1196
1203
|
modelValue: { type: Boolean },
|
|
1197
1204
|
color: { default: "primary" }
|
|
1198
1205
|
},
|
|
1199
1206
|
emits: ["update:modelValue"],
|
|
1200
|
-
setup(
|
|
1201
|
-
const
|
|
1202
|
-
s("update:modelValue", !
|
|
1207
|
+
setup(t, { emit: o }) {
|
|
1208
|
+
const e = t, s = o, r = () => {
|
|
1209
|
+
s("update:modelValue", !e.modelValue);
|
|
1203
1210
|
}, l = w(() => {
|
|
1204
1211
|
let d = {
|
|
1205
|
-
"--background":
|
|
1212
|
+
"--background": e.color,
|
|
1206
1213
|
"--color": "#ffffff"
|
|
1207
1214
|
};
|
|
1208
|
-
return ["warning", "info", "danger", "primary", "secondary", "success"].includes(
|
|
1209
|
-
"--background": `var(--t-color-status-${
|
|
1210
|
-
"--color": `var(--t-color-status-${
|
|
1215
|
+
return ["warning", "info", "danger", "primary", "secondary", "success"].includes(e.color) && (d = {
|
|
1216
|
+
"--background": `var(--t-color-status-${e.color})`,
|
|
1217
|
+
"--color": `var(--t-color-status-${e.color}-text)`
|
|
1211
1218
|
}), d;
|
|
1212
1219
|
});
|
|
1213
1220
|
return (d, a) => (c(), p("div", {
|
|
1214
|
-
class: S(["t-switch", { on:
|
|
1221
|
+
class: S(["t-switch", { on: e.modelValue }]),
|
|
1215
1222
|
style: x(l.value),
|
|
1216
1223
|
onClick: r
|
|
1217
1224
|
}, [...a[0] || (a[0] = [
|
|
1218
1225
|
$("div", { class: "t-switch-icon" }, null, -1)
|
|
1219
1226
|
])], 6));
|
|
1220
1227
|
}
|
|
1221
|
-
}),
|
|
1228
|
+
}), oo = /* @__PURE__ */ g(to, [["__scopeId", "data-v-3616970e"]]), so = /* @__PURE__ */ h({
|
|
1222
1229
|
__name: "t-tab",
|
|
1223
1230
|
props: {
|
|
1224
1231
|
value: {},
|
|
1225
1232
|
disabled: { type: Boolean, default: !1 }
|
|
1226
1233
|
},
|
|
1227
|
-
setup(
|
|
1228
|
-
const o =
|
|
1229
|
-
o.disabled ||
|
|
1234
|
+
setup(t) {
|
|
1235
|
+
const o = t, e = de("tabsState"), s = w(() => e.activeValue.value === o.value), r = () => {
|
|
1236
|
+
o.disabled || e.setValue(o.value);
|
|
1230
1237
|
};
|
|
1231
1238
|
return (l, d) => (c(), p("li", {
|
|
1232
1239
|
class: S(["t-tab", { active: s.value }])
|
|
1233
1240
|
}, [
|
|
1234
|
-
|
|
1241
|
+
U(Z, {
|
|
1235
1242
|
variant: "text",
|
|
1236
1243
|
onClick: r,
|
|
1237
|
-
size: A(
|
|
1238
|
-
color: s.value ? A(
|
|
1244
|
+
size: A(e).size,
|
|
1245
|
+
color: s.value ? A(e).color.text : void 0
|
|
1239
1246
|
}, {
|
|
1240
1247
|
default: V(() => [
|
|
1241
1248
|
b(l.$slots, "default", {}, void 0, !0)
|
|
@@ -1244,7 +1251,7 @@ const Mt = /* @__PURE__ */ g(Wt, [["render", qt]]), Lt = /* @__PURE__ */ h({
|
|
|
1244
1251
|
}, 8, ["size", "color"])
|
|
1245
1252
|
], 2));
|
|
1246
1253
|
}
|
|
1247
|
-
}),
|
|
1254
|
+
}), ro = /* @__PURE__ */ g(so, [["__scopeId", "data-v-4b7f4e98"]]), no = /* @__PURE__ */ h({
|
|
1248
1255
|
__name: "t-tabs",
|
|
1249
1256
|
props: {
|
|
1250
1257
|
placement: { default: "top-start" },
|
|
@@ -1257,41 +1264,41 @@ const Mt = /* @__PURE__ */ g(Wt, [["render", qt]]), Lt = /* @__PURE__ */ h({
|
|
|
1257
1264
|
radius: { default: 4 }
|
|
1258
1265
|
},
|
|
1259
1266
|
emits: ["update:modelValue"],
|
|
1260
|
-
setup(
|
|
1261
|
-
const
|
|
1267
|
+
setup(t, { emit: o }) {
|
|
1268
|
+
const e = t, s = o, r = v("0px"), l = v(0), d = v(0), a = v(), f = w(() => {
|
|
1262
1269
|
let n = "", u = "";
|
|
1263
|
-
return
|
|
1264
|
-
}), y = w(() =>
|
|
1270
|
+
return e.variant == "text" && (n = "transparent", ["warning", "info", "danger", "primary", "secondary", "success"].includes(e.color) ? u = `var(--t-color-status-${e.color})` : u = e.color), e.variant == "border-under" && (u = "currentColor", ["warning", "info", "danger", "primary", "secondary", "success"].includes(e.color) ? n = `var(--t-color-status-${e.color})` : n = e.color), e.variant == "tag" && (["warning", "info", "danger", "primary", "secondary", "success"].includes(e.color) ? (n = `var(--t-color-status-${e.color})`, u = `var(--t-color-status-${e.color}-text)`) : (n = e.color, u = "currentColor")), { background: n, text: u };
|
|
1271
|
+
}), y = w(() => e.variant == "border-under" ? {
|
|
1265
1272
|
"--transform": r.value,
|
|
1266
|
-
"--border":
|
|
1267
|
-
} :
|
|
1268
|
-
"--top":
|
|
1269
|
-
"--height": d.value -
|
|
1270
|
-
"--left":
|
|
1271
|
-
"--width": l.value -
|
|
1273
|
+
"--border": e.border + "px"
|
|
1274
|
+
} : e.variant == "tag" ? {
|
|
1275
|
+
"--top": e.margin[0] + "px",
|
|
1276
|
+
"--height": d.value - e.margin[0] * 2 + "px",
|
|
1277
|
+
"--left": e.margin[1] + "px",
|
|
1278
|
+
"--width": l.value - e.margin[1] * 2 + "px",
|
|
1272
1279
|
"--transform": r.value,
|
|
1273
|
-
"--radius":
|
|
1280
|
+
"--radius": e.radius + "px"
|
|
1274
1281
|
} : {}), i = () => {
|
|
1275
|
-
if (
|
|
1282
|
+
if (e.variant == "border-under") {
|
|
1276
1283
|
let n = a.value.querySelector(".active");
|
|
1277
1284
|
if (n) {
|
|
1278
|
-
if (
|
|
1285
|
+
if (e.placement.startsWith("top-") || e.placement.startsWith("bottom-")) {
|
|
1279
1286
|
let u = n.getBoundingClientRect().left - a.value.getBoundingClientRect().left + a.value.scrollLeft, _ = n.offsetWidth / 2;
|
|
1280
|
-
r.value = u + _ -
|
|
1281
|
-
} else if (
|
|
1287
|
+
r.value = u + _ - e.border / 2 + "px";
|
|
1288
|
+
} else if (e.placement.startsWith("left-") || e.placement.startsWith("right-")) {
|
|
1282
1289
|
let u = n.getBoundingClientRect().top - a.value.getBoundingClientRect().top + a.value.scrollTop, _ = n.offsetHeight / 2;
|
|
1283
|
-
r.value = u + _ -
|
|
1290
|
+
r.value = u + _ - e.border / 2 + "px";
|
|
1284
1291
|
}
|
|
1285
1292
|
}
|
|
1286
1293
|
}
|
|
1287
|
-
if (
|
|
1294
|
+
if (e.variant == "tag") {
|
|
1288
1295
|
let n = a.value.querySelector(".active");
|
|
1289
1296
|
if (n) {
|
|
1290
1297
|
let u = n.offsetWidth, _ = n.offsetHeight;
|
|
1291
|
-
if (
|
|
1298
|
+
if (e.placement.startsWith("top-") || e.placement.startsWith("bottom-")) {
|
|
1292
1299
|
let k = n.getBoundingClientRect().left - a.value.getBoundingClientRect().left + a.value.scrollLeft;
|
|
1293
1300
|
r.value = k + "px";
|
|
1294
|
-
} else if (
|
|
1301
|
+
} else if (e.placement.startsWith("left-") || e.placement.startsWith("right-")) {
|
|
1295
1302
|
let k = n.getBoundingClientRect().top - a.value.getBoundingClientRect().top + a.value.scrollTop;
|
|
1296
1303
|
r.value = k + "px";
|
|
1297
1304
|
}
|
|
@@ -1299,18 +1306,18 @@ const Mt = /* @__PURE__ */ g(Wt, [["render", qt]]), Lt = /* @__PURE__ */ h({
|
|
|
1299
1306
|
}
|
|
1300
1307
|
}
|
|
1301
1308
|
};
|
|
1302
|
-
return
|
|
1303
|
-
activeValue: w(() =>
|
|
1309
|
+
return ue("tabsState", {
|
|
1310
|
+
activeValue: w(() => e.modelValue),
|
|
1304
1311
|
color: f.value,
|
|
1305
|
-
size:
|
|
1306
|
-
variant:
|
|
1312
|
+
size: e.size,
|
|
1313
|
+
variant: e.variant,
|
|
1307
1314
|
setValue: (n) => {
|
|
1308
1315
|
s("update:modelValue", n);
|
|
1309
1316
|
}
|
|
1310
|
-
}),
|
|
1311
|
-
await
|
|
1312
|
-
}),
|
|
1313
|
-
await
|
|
1317
|
+
}), D(() => e.modelValue, async () => {
|
|
1318
|
+
await le(), i();
|
|
1319
|
+
}), G(async () => {
|
|
1320
|
+
await le(), i();
|
|
1314
1321
|
}), (n, u) => (c(), p("ul", {
|
|
1315
1322
|
ref_key: "container",
|
|
1316
1323
|
ref: a,
|
|
@@ -1320,20 +1327,20 @@ const Mt = /* @__PURE__ */ g(Wt, [["render", qt]]), Lt = /* @__PURE__ */ h({
|
|
|
1320
1327
|
b(n.$slots, "default", {}, void 0, !0)
|
|
1321
1328
|
], 6));
|
|
1322
1329
|
}
|
|
1323
|
-
}),
|
|
1330
|
+
}), ao = /* @__PURE__ */ g(no, [["__scopeId", "data-v-8d370631"]]), lo = /* @__PURE__ */ h({
|
|
1324
1331
|
__name: "t-loading-app",
|
|
1325
|
-
setup(
|
|
1326
|
-
return (o,
|
|
1332
|
+
setup(t) {
|
|
1333
|
+
return (o, e) => (c(), E(_e, null, {
|
|
1327
1334
|
default: V(() => [
|
|
1328
|
-
|
|
1335
|
+
U(Q, { type: "spinner" })
|
|
1329
1336
|
]),
|
|
1330
1337
|
_: 1
|
|
1331
1338
|
}));
|
|
1332
1339
|
}
|
|
1333
|
-
}),
|
|
1340
|
+
}), co = /* @__PURE__ */ g(lo, [["__scopeId", "data-v-1436aa9f"]]), io = { key: 0 }, uo = {
|
|
1334
1341
|
key: 0,
|
|
1335
1342
|
class: "t-checkbox-label"
|
|
1336
|
-
},
|
|
1343
|
+
}, po = /* @__PURE__ */ h({
|
|
1337
1344
|
__name: "t-checkbox",
|
|
1338
1345
|
props: {
|
|
1339
1346
|
label: { default: "" },
|
|
@@ -1345,21 +1352,21 @@ const Mt = /* @__PURE__ */ g(Wt, [["render", qt]]), Lt = /* @__PURE__ */ h({
|
|
|
1345
1352
|
color: { default: "primary" }
|
|
1346
1353
|
},
|
|
1347
1354
|
emits: ["update:modelValue"],
|
|
1348
|
-
setup(
|
|
1349
|
-
const
|
|
1355
|
+
setup(t, { emit: o }) {
|
|
1356
|
+
const e = t, s = o, r = w(() => {
|
|
1350
1357
|
let a = {
|
|
1351
|
-
"--background":
|
|
1358
|
+
"--background": e.color,
|
|
1352
1359
|
"--color": "#ffffff"
|
|
1353
1360
|
};
|
|
1354
|
-
return ["warning", "info", "danger", "primary", "secondary", "success"].includes(
|
|
1355
|
-
"--background": `var(--t-color-status-${
|
|
1356
|
-
"--color": `var(--t-color-status-${
|
|
1361
|
+
return ["warning", "info", "danger", "primary", "secondary", "success"].includes(e.color) && (a = {
|
|
1362
|
+
"--background": `var(--t-color-status-${e.color})`,
|
|
1363
|
+
"--color": `var(--t-color-status-${e.color}-text)`
|
|
1357
1364
|
}), a;
|
|
1358
|
-
}), l = w(() =>
|
|
1359
|
-
if (
|
|
1360
|
-
let a =
|
|
1361
|
-
|
|
1362
|
-
} else
|
|
1365
|
+
}), l = w(() => e.multiple ? e.modelValue.includes(e.value) : e.value === void 0 ? e.modelValue : e.modelValue == e.value), d = () => {
|
|
1366
|
+
if (e.multiple) {
|
|
1367
|
+
let a = e.modelValue;
|
|
1368
|
+
e.modelValue.includes(e.value) ? a.splice(a.indexOf(e.value), 1) : a.push(e.value), s("update:modelValue", a);
|
|
1369
|
+
} else e.value === void 0 ? s("update:modelValue", !e.modelValue) : s("update:modelValue", e.value);
|
|
1363
1370
|
};
|
|
1364
1371
|
return (a, f) => (c(), p("div", {
|
|
1365
1372
|
class: S(["t-checkbox", { active: l.value }]),
|
|
@@ -1369,26 +1376,26 @@ const Mt = /* @__PURE__ */ g(Wt, [["render", qt]]), Lt = /* @__PURE__ */ h({
|
|
|
1369
1376
|
$("div", {
|
|
1370
1377
|
class: S(`t-checkbox-${a.type}`)
|
|
1371
1378
|
}, [
|
|
1372
|
-
a.type == "radio" ? (c(), p("div",
|
|
1379
|
+
a.type == "radio" ? (c(), p("div", io)) : C("", !0),
|
|
1373
1380
|
a.type == "check" ? b(a.$slots, "icon", { key: 1 }, () => [
|
|
1374
1381
|
f[0] || (f[0] = $("i", { class: "ri-check-line" }, null, -1))
|
|
1375
1382
|
], !0) : C("", !0)
|
|
1376
1383
|
], 2),
|
|
1377
1384
|
b(a.$slots, "label", {}, () => [
|
|
1378
|
-
a.label ? (c(), p("span",
|
|
1385
|
+
a.label ? (c(), p("span", uo, R(e.label), 1)) : C("", !0)
|
|
1379
1386
|
], !0)
|
|
1380
1387
|
], 6));
|
|
1381
1388
|
}
|
|
1382
|
-
}),
|
|
1389
|
+
}), fo = /* @__PURE__ */ g(po, [["__scopeId", "data-v-0e13abc3"]]), mo = /* @__PURE__ */ h({
|
|
1383
1390
|
__name: "t-keyboard-space",
|
|
1384
|
-
setup(
|
|
1385
|
-
const { height: o } =
|
|
1386
|
-
return (
|
|
1391
|
+
setup(t) {
|
|
1392
|
+
const { height: o } = ye();
|
|
1393
|
+
return (e, s) => (c(), p("div", {
|
|
1387
1394
|
class: "t-keyboard-space",
|
|
1388
1395
|
style: x({ "--height": A(o) + "px" })
|
|
1389
1396
|
}, null, 4));
|
|
1390
1397
|
}
|
|
1391
|
-
}),
|
|
1398
|
+
}), vo = /* @__PURE__ */ g(mo, [["__scopeId", "data-v-4b06018d"]]), yo = /* @__PURE__ */ h({
|
|
1392
1399
|
__name: "t-skeleton",
|
|
1393
1400
|
props: {
|
|
1394
1401
|
width: { default: "100%" },
|
|
@@ -1396,24 +1403,24 @@ const Mt = /* @__PURE__ */ g(Wt, [["render", qt]]), Lt = /* @__PURE__ */ h({
|
|
|
1396
1403
|
radius: { default: "8px" },
|
|
1397
1404
|
color: { default: null }
|
|
1398
1405
|
},
|
|
1399
|
-
setup(
|
|
1400
|
-
const o =
|
|
1406
|
+
setup(t) {
|
|
1407
|
+
const o = t, e = w(() => ({
|
|
1401
1408
|
"--width": o.width,
|
|
1402
1409
|
"--height": o.height,
|
|
1403
1410
|
"--radius": o.radius
|
|
1404
1411
|
}));
|
|
1405
1412
|
return (s, r) => (c(), p("div", {
|
|
1406
1413
|
class: "t-skeleton",
|
|
1407
|
-
style: x(
|
|
1414
|
+
style: x(e.value)
|
|
1408
1415
|
}, null, 4));
|
|
1409
1416
|
}
|
|
1410
|
-
}),
|
|
1417
|
+
}), _o = /* @__PURE__ */ g(yo, [["__scopeId", "data-v-877bbdb5"]]), go = /* @__PURE__ */ h({
|
|
1411
1418
|
__name: "t-ripple",
|
|
1412
1419
|
props: {
|
|
1413
1420
|
color: { default: "primary" }
|
|
1414
1421
|
},
|
|
1415
|
-
setup(
|
|
1416
|
-
const o =
|
|
1422
|
+
setup(t) {
|
|
1423
|
+
const o = t, e = w(() => {
|
|
1417
1424
|
let s = {};
|
|
1418
1425
|
return o.color ? ["warning", "info", "danger", "primary", "secondary", "success"].includes(o.color) ? s = {
|
|
1419
1426
|
"--color": "var(--t-color-status-" + o.color + ")"
|
|
@@ -1425,23 +1432,23 @@ const Mt = /* @__PURE__ */ g(Wt, [["render", qt]]), Lt = /* @__PURE__ */ h({
|
|
|
1425
1432
|
});
|
|
1426
1433
|
return (s, r) => (c(), p("div", {
|
|
1427
1434
|
class: "t-ripple",
|
|
1428
|
-
style: x(
|
|
1435
|
+
style: x(e.value)
|
|
1429
1436
|
}, null, 4));
|
|
1430
1437
|
}
|
|
1431
|
-
}),
|
|
1432
|
-
install: (
|
|
1433
|
-
|
|
1438
|
+
}), bo = /* @__PURE__ */ g(go, [["__scopeId", "data-v-42cb3d71"]]), Bo = () => ({
|
|
1439
|
+
install: (t) => {
|
|
1440
|
+
Se(), t.component("t-app", Ie), t.component("t-screen", ge), t.component("t-swipe-screen", yt), t.component("t-cable", nt), t.component("t-toolbar", gt), t.component("t-content", _e), t.component("t-card", at), t.component("t-refresher", dt), t.component("t-button", Z), t.component("t-back-button", ht), t.component("t-present", L), t.component("t-text", se), t.component("t-sheet", xt), t.component("t-gesture-indicator", be), t.component("t-input", Ct), t.component("t-textarea", Vt), t.component("t-rich-text", At), t.component("t-grid", Wt), t.component("t-grid-item", Lt), t.component("t-divider", Ft), t.component("t-toggle-password", Gt), t.component("t-loading-icon", Q), t.component("t-alert", fe), t.component("t-avatar", jt), t.component("t-collapse", eo), t.component("t-toast", ve), t.component("t-switch", oo), t.component("t-tab", ro), t.component("t-tabs", ao), t.component("t-loading-app", co), t.component("t-checkbox", fo), t.component("t-keyboard-space", vo), t.component("t-skeleton", _o), t.component("t-ripple", bo);
|
|
1434
1441
|
}
|
|
1435
1442
|
});
|
|
1436
1443
|
export {
|
|
1437
|
-
|
|
1438
|
-
|
|
1439
|
-
|
|
1440
|
-
|
|
1441
|
-
|
|
1442
|
-
|
|
1443
|
-
|
|
1444
|
-
|
|
1444
|
+
Te as blurCurrentActive,
|
|
1445
|
+
xo as createAction,
|
|
1446
|
+
wo as createAlert,
|
|
1447
|
+
To as createLoading,
|
|
1448
|
+
So as createToast,
|
|
1449
|
+
Bo as createToife,
|
|
1450
|
+
xe as isFormElement,
|
|
1451
|
+
Fe as presentController,
|
|
1445
1452
|
T as screenController,
|
|
1446
|
-
|
|
1453
|
+
ye as useKeyboard
|
|
1447
1454
|
};
|