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