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