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