@toife/vue 2.0.26 → 2.1.2
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 +24 -0
- package/dist/components/t-grid.vue.d.ts +16 -1
- 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 +561 -534
- 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 f, openBlock as i, renderSlot as
|
|
2
|
-
import { gesture as
|
|
3
|
-
import { useRouter as fe, useRoute as
|
|
4
|
-
const
|
|
1
|
+
import { createElementBlock as f, openBlock as i, renderSlot as _, 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
|
+
}, g = (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(), f("div",
|
|
19
|
-
|
|
16
|
+
}, ze = {}, Ee = { class: "t-app" };
|
|
17
|
+
function Ie(t, o) {
|
|
18
|
+
return i(), f("div", Ee, [
|
|
19
|
+
_(t.$slots, "default")
|
|
20
20
|
]);
|
|
21
21
|
}
|
|
22
|
-
const
|
|
22
|
+
const Pe = /* @__PURE__ */ g(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 =
|
|
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 =
|
|
42
|
-
|
|
43
|
-
},
|
|
44
|
-
if (
|
|
45
|
-
|
|
46
|
-
let
|
|
47
|
-
(
|
|
48
|
-
contentTransform:
|
|
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
|
+
d.value = !0;
|
|
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
|
+
}, b = () => {
|
|
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)) : (b(), 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: b
|
|
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() : b();
|
|
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:
|
|
95
|
+
style: T([a, { zIndex: s.value }, n.style])
|
|
96
96
|
}, [
|
|
97
|
-
|
|
97
|
+
_(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:
|
|
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__ */ g(Ve, [["__scopeId", "data-v-cab98086"]]), Ce = /* @__PURE__ */ h({
|
|
114
|
+
__name: "t-icon-spinner",
|
|
116
115
|
props: {
|
|
117
116
|
size: {
|
|
118
117
|
type: String,
|
|
@@ -125,8 +124,8 @@ const Ee = /* @__PURE__ */ _(Ce, [["render", ze]]), Ve = /* @__PURE__ */ b({
|
|
|
125
124
|
},
|
|
126
125
|
setup(t) {
|
|
127
126
|
return (o, e) => (i(), f("span", {
|
|
128
|
-
class: "t-
|
|
129
|
-
style:
|
|
127
|
+
class: "t-icon-spinner",
|
|
128
|
+
style: T({
|
|
130
129
|
width: t.size,
|
|
131
130
|
height: t.size,
|
|
132
131
|
borderTopColor: t.color
|
|
@@ -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__ */ g(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 },
|
|
@@ -151,7 +150,7 @@ const Ee = /* @__PURE__ */ _(Ce, [["render", ze]]), Ve = /* @__PURE__ */ b({
|
|
|
151
150
|
activeBackground: { type: Boolean, default: !1 }
|
|
152
151
|
},
|
|
153
152
|
setup(t) {
|
|
154
|
-
const o = t, e =
|
|
153
|
+
const o = t, e = x(() => {
|
|
155
154
|
let s;
|
|
156
155
|
return o.variant == "default" && (o.color ? ["warning", "info", "danger", "primary", "secondary", "success"].includes(o.color) ? s = {
|
|
157
156
|
"--border": "none",
|
|
@@ -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
|
-
style:
|
|
195
|
+
style: T(e.value)
|
|
197
196
|
}, [
|
|
198
|
-
|
|
199
|
-
|
|
197
|
+
U($("span", Re, [
|
|
198
|
+
_(s.$slots, "default", {}, void 0, !0)
|
|
200
199
|
], 512), [
|
|
201
|
-
[
|
|
200
|
+
[j, !o.loading]
|
|
202
201
|
]),
|
|
203
202
|
o.loading ? (i(), f("span", Ae, [
|
|
204
|
-
|
|
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__ */ g(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(),
|
|
228
|
-
},
|
|
229
|
-
s.dismiss && s.dismiss.includes(a) ? (l.value = !1,
|
|
230
|
-
|
|
225
|
+
}, v = (a) => {
|
|
226
|
+
l.value = !1, a.handler && a.handler(), r("dismiss", "choose", a?.data);
|
|
227
|
+
}, d = (a) => {
|
|
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
|
-
onDismiss:
|
|
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(), f("div",
|
|
247
|
+
_(a.$slots, "header", {}, () => [
|
|
248
|
+
s.title ? (i(), f("div", Ne, A(s.title), 1)) : I("", !0)
|
|
250
249
|
], !0),
|
|
251
|
-
|
|
252
|
-
$("div",
|
|
250
|
+
_(a.$slots, "content", {}, () => [
|
|
251
|
+
$("div", Xe, A(s.message), 1)
|
|
253
252
|
], !0),
|
|
254
|
-
|
|
255
|
-
$("div",
|
|
256
|
-
(i(!0), f(q, null,
|
|
257
|
-
color:
|
|
258
|
-
variant:
|
|
259
|
-
|
|
253
|
+
_(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__ */ g(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
|
-
},
|
|
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), f(q, null,
|
|
335
|
-
(i(!0), f(q, null,
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
335
|
+
(i(!0), f(q, null, G(s.actions, (w, b) => (i(), f("div", { key: b }, [
|
|
336
|
+
(i(!0), f(q, null, G(w, (P, k) => (i(), C(Z, {
|
|
337
|
+
key: P.key ?? `${b}-${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__ */
|
|
355
|
+
}), Me = /* @__PURE__ */ g(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
|
+
_(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
|
-
}),
|
|
412
|
-
const o =
|
|
413
|
-
let s = null,
|
|
411
|
+
}), ve = /* @__PURE__ */ g(He, [["__scopeId", "data-v-598c3462"]]), $o = (t = {}) => {
|
|
412
|
+
const o = m(), e = document.body.querySelector(".t-app");
|
|
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,19 +558,19 @@ 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
|
-
const
|
|
573
|
+
const d = x(() => {
|
|
574
574
|
let a;
|
|
575
575
|
return s.variant == "default" && (s.color ? ["warning", "info", "danger", "primary", "secondary", "success"].includes(s.color) ? a = {
|
|
576
576
|
"--border": "none",
|
|
@@ -611,73 +611,73 @@ const Ee = /* @__PURE__ */ _(Ce, [["render", ze]]), Ve = /* @__PURE__ */ b({
|
|
|
611
611
|
}), a;
|
|
612
612
|
});
|
|
613
613
|
return o({
|
|
614
|
-
open:
|
|
615
|
-
close:
|
|
614
|
+
open: p,
|
|
615
|
+
close: v
|
|
616
616
|
}), (a, c) => u.value ? (i(), f("div", {
|
|
617
617
|
key: 0,
|
|
618
|
-
class: B(["t-toast", { [s.placement]: !0, open: l.value, closing:
|
|
619
|
-
style:
|
|
618
|
+
class: B(["t-toast", { [s.placement]: !0, open: l.value, closing: n.value }]),
|
|
619
|
+
style: T({ "--space": s.space, ...d.value })
|
|
620
620
|
}, [
|
|
621
|
-
|
|
622
|
-
$("div",
|
|
621
|
+
_(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__ */ g(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
|
-
const e = document.createElement("div"), s =
|
|
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
|
-
style:
|
|
669
|
+
style: T({ "--t-keyboard-height": O(e) + "px", "--t-keyboard-transition": O(e) > 0 ? "0.3s" : "0.1s" })
|
|
670
670
|
}, [
|
|
671
|
-
|
|
671
|
+
_(s.$slots, "default", {}, void 0, !0)
|
|
672
672
|
], 6));
|
|
673
673
|
}
|
|
674
|
-
}),
|
|
674
|
+
}), nt = /* @__PURE__ */ g(rt, [["__scopeId", "data-v-27e0d794"]]), at = /* @__PURE__ */ h({
|
|
675
675
|
__name: "t-card",
|
|
676
676
|
props: {
|
|
677
677
|
color: { default: null }
|
|
678
678
|
},
|
|
679
679
|
setup(t) {
|
|
680
|
-
const o = t, e =
|
|
680
|
+
const o = t, e = x(() => {
|
|
681
681
|
let s;
|
|
682
682
|
return o.color ? ["warning", "info", "danger", "primary", "secondary", "success"].includes(o.color) ? s = {
|
|
683
683
|
"--background": "var(--t-color-status-" + o.color + ")"
|
|
@@ -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
|
-
style:
|
|
692
|
+
style: T(e.value)
|
|
693
693
|
}, [
|
|
694
|
-
|
|
694
|
+
_(s.$slots, "default")
|
|
695
695
|
], 4));
|
|
696
696
|
}
|
|
697
|
-
}),
|
|
698
|
-
function
|
|
699
|
-
return i(), f("div",
|
|
700
|
-
|
|
697
|
+
}), lt = {}, ct = { class: "t-content" };
|
|
698
|
+
function it(t, o) {
|
|
699
|
+
return i(), f("div", ct, [
|
|
700
|
+
_(t.$slots, "default", {}, void 0, !0)
|
|
701
701
|
]);
|
|
702
702
|
}
|
|
703
|
-
const
|
|
703
|
+
const ut = /* @__PURE__ */ g(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,
|
|
716
|
-
},
|
|
717
|
-
|
|
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
|
+
}, d = () => {
|
|
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" &&
|
|
737
|
-
|
|
734
|
+
move({ deltaY: y, initialDirection: w }) {
|
|
735
|
+
if (l.value || p || w != "down") return;
|
|
736
|
+
if (s.variant == "max" && y >= s.threshold) {
|
|
737
|
+
d();
|
|
738
738
|
return;
|
|
739
739
|
}
|
|
740
|
-
const
|
|
741
|
-
|
|
740
|
+
const b = y < 0 ? 0 : y;
|
|
741
|
+
r.value = b, e("move", b);
|
|
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
|
+
_(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
|
-
}), pt = /* @__PURE__ */
|
|
767
|
+
}), pt = /* @__PURE__ */ g(dt, [["__scopeId", "data-v-c77146a5"]]), ft = {}, mt = { class: "t-screen" };
|
|
768
768
|
function vt(t, o) {
|
|
769
769
|
return i(), f("div", mt, [
|
|
770
|
-
|
|
770
|
+
_(t.$slots, "default", {}, void 0, !0)
|
|
771
771
|
]);
|
|
772
772
|
}
|
|
773
|
-
const be = /* @__PURE__ */
|
|
774
|
-
__name: "t-
|
|
773
|
+
const be = /* @__PURE__ */ g(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,72 +780,72 @@ 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
|
-
const
|
|
788
|
+
const d = (c) => {
|
|
789
789
|
c && S.addScreen({
|
|
790
790
|
name: c,
|
|
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
|
-
}) :
|
|
803
|
-
}),
|
|
804
|
-
|
|
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), f(q, null,
|
|
828
|
+
}), (c, y) => (i(), f(q, null, [
|
|
829
|
+
(i(!0), f(q, null, G(O(S).screens, (w, b) => (i(), C(be, {
|
|
830
830
|
ref_for: !0,
|
|
831
|
-
ref: (
|
|
832
|
-
style:
|
|
833
|
-
key:
|
|
831
|
+
ref: (P) => a(b, P),
|
|
832
|
+
style: T({ zIndex: b + (b == O(S).screens.length - 1 ? 2 : 1) }),
|
|
833
|
+
key: b
|
|
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:
|
|
844
|
-
style:
|
|
843
|
+
ref: v,
|
|
844
|
+
style: T({ zIndex: O(S).screens.length })
|
|
845
845
|
}, null, 4)
|
|
846
846
|
], 64));
|
|
847
847
|
}
|
|
848
|
-
}), _t = /* @__PURE__ */
|
|
848
|
+
}), _t = /* @__PURE__ */ g(yt, [["__scopeId", "data-v-2d6fbfe1"]]), gt = /* @__PURE__ */ h({
|
|
849
849
|
__name: "t-toolbar",
|
|
850
850
|
props: {
|
|
851
851
|
placement: { default: null },
|
|
@@ -853,24 +853,24 @@ const be = /* @__PURE__ */ _(ft, [["render", vt], ["__scopeId", "data-v-c2a3436c
|
|
|
853
853
|
size: { default: "50px" }
|
|
854
854
|
},
|
|
855
855
|
setup(t) {
|
|
856
|
-
const o = t, e = pe("cableState"), s =
|
|
857
|
-
return (
|
|
856
|
+
const o = t, e = pe("cableState"), s = x(() => o?.placement || e?.placement);
|
|
857
|
+
return (r, l) => (i(), f("div", {
|
|
858
858
|
class: B(["t-toolbar", { [s.value]: !0, safe: o.safe }]),
|
|
859
|
-
style:
|
|
859
|
+
style: T({ "--t-size-toolbar": o.size })
|
|
860
860
|
}, [
|
|
861
861
|
$("div", null, [
|
|
862
|
-
|
|
862
|
+
_(r.$slots, "default", {}, void 0, !0)
|
|
863
863
|
])
|
|
864
864
|
], 6));
|
|
865
865
|
}
|
|
866
|
-
}), bt = /* @__PURE__ */
|
|
866
|
+
}), bt = /* @__PURE__ */ g(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;
|
|
@@ -880,35 +880,35 @@ const be = /* @__PURE__ */ _(ft, [["render", vt], ["__scopeId", "data-v-c2a3436c
|
|
|
880
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
|
+
_(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__ */
|
|
890
|
+
}), kt = /* @__PURE__ */ g(ht, [["__scopeId", "data-v-eb92b1fe"]]), $t = /* @__PURE__ */ h({
|
|
891
891
|
__name: "t-text",
|
|
892
892
|
props: {
|
|
893
893
|
color: { default: "var(--t-color-text)" },
|
|
894
894
|
size: { default: "standard" }
|
|
895
895
|
},
|
|
896
896
|
setup(t) {
|
|
897
|
-
const o = t, e =
|
|
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":
|
|
897
|
+
const o = t, e = x(() => {
|
|
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
|
-
style:
|
|
906
|
+
style: T(e.value)
|
|
907
907
|
}, [
|
|
908
|
-
|
|
908
|
+
_(s.$slots, "default", {}, void 0, !0)
|
|
909
909
|
], 4));
|
|
910
910
|
}
|
|
911
|
-
}),
|
|
911
|
+
}), oe = /* @__PURE__ */ g($t, [["__scopeId", "data-v-f0f94f05"]]), xt = /* @__PURE__ */ h({
|
|
912
912
|
__name: "t-gesture-indicator",
|
|
913
913
|
props: {
|
|
914
914
|
placement: { default: "bottom" }
|
|
@@ -918,7 +918,7 @@ const be = /* @__PURE__ */ _(ft, [["render", vt], ["__scopeId", "data-v-c2a3436c
|
|
|
918
918
|
class: B(["t-gesture-indicator", { [o.placement]: !0 }])
|
|
919
919
|
}, null, 2));
|
|
920
920
|
}
|
|
921
|
-
}), he = /* @__PURE__ */
|
|
921
|
+
}), he = /* @__PURE__ */ g(xt, [["__scopeId", "data-v-ed8f7308"]]), Tt = /* @__PURE__ */ h({
|
|
922
922
|
__name: "t-sheet",
|
|
923
923
|
props: {
|
|
924
924
|
background: { default: "var(--t-color-surface)" },
|
|
@@ -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
|
-
|
|
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 b = 0;
|
|
972
|
+
e.placement == "bottom" || e.placement == "top" ? b = c : b = y, e.placement == "bottom" && (b = c > 0 ? c : 0), e.placement == "top" && (b = c < 0 ? c : 0), e.placement == "left" && (b = y < 0 ? y : 0), e.placement == "right" && (b = y > 0 ? y : 0), (e.placement == "bottom" && (b >= 10 || this.isMoving) || e.placement == "top" && (b <= -10 || this.isMoving) || e.placement == "left" && (b <= -10 || this.isMoving) || e.placement == "right" && (b >= 10 || this.isMoving)) && (this.isMoving = !0, l.value.render({
|
|
973
|
+
contentTransform: b + "px",
|
|
974
974
|
transition: "0s"
|
|
975
975
|
}));
|
|
976
976
|
},
|
|
977
|
-
up({ deltaY: c, deltaX:
|
|
978
|
-
if (this.isMoving = !1,
|
|
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 b, P, k;
|
|
983
|
+
e.placement == "bottom" || e.placement == "top" ? (b = r.value.offsetHeight, k = c) : (b = r.value.offsetWidth, k = y), P = k / b * 100, P > 50 ? s("dismiss", "gesture") : l.value.open();
|
|
984
984
|
},
|
|
985
985
|
cancel() {
|
|
986
|
-
this.isMoving = !1,
|
|
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:
|
|
1002
|
-
style:
|
|
1001
|
+
onDismiss: v,
|
|
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
|
-
style:
|
|
1011
|
+
style: T({ "--background": e.background }),
|
|
1012
1012
|
ref_key: "sheet",
|
|
1013
|
-
ref:
|
|
1013
|
+
ref: r
|
|
1014
1014
|
}, [
|
|
1015
|
-
|
|
1015
|
+
_(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__ */ g(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,81 +1034,87 @@ 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
|
-
),
|
|
1040
|
-
s("update:modelValue",
|
|
1041
|
-
},
|
|
1042
|
-
|
|
1043
|
-
},
|
|
1044
|
-
|
|
1039
|
+
), n = (d) => {
|
|
1040
|
+
s("update:modelValue", d.target.value);
|
|
1041
|
+
}, p = async (d) => {
|
|
1042
|
+
r.value = !0;
|
|
1043
|
+
}, v = () => {
|
|
1044
|
+
r.value = !1;
|
|
1045
1045
|
};
|
|
1046
|
-
return (
|
|
1046
|
+
return (d, a) => (i(), f("div", {
|
|
1047
1047
|
class: B(["t-input", {
|
|
1048
|
-
rounded:
|
|
1049
|
-
["size-" +
|
|
1050
|
-
["variant-" +
|
|
1051
|
-
focus:
|
|
1048
|
+
rounded: d.rounded,
|
|
1049
|
+
["size-" + d.size]: !0,
|
|
1050
|
+
["variant-" + d.variant]: !0,
|
|
1051
|
+
focus: r.value,
|
|
1052
1052
|
"has-value": u.value,
|
|
1053
|
-
readonly:
|
|
1053
|
+
readonly: d.readonly
|
|
1054
1054
|
}])
|
|
1055
1055
|
}, [
|
|
1056
1056
|
$("label", null, [
|
|
1057
|
-
$("span", St, A(
|
|
1057
|
+
$("span", St, A(d.label), 1),
|
|
1058
1058
|
$("div", Bt, [
|
|
1059
|
-
|
|
1059
|
+
_(d.$slots, "start", {}, void 0, !0),
|
|
1060
1060
|
$("input", {
|
|
1061
1061
|
ref_key: "editable",
|
|
1062
1062
|
ref: l,
|
|
1063
1063
|
class: "t-input-editable",
|
|
1064
|
-
placeholder:
|
|
1065
|
-
value:
|
|
1066
|
-
type:
|
|
1067
|
-
onInput:
|
|
1068
|
-
onFocus:
|
|
1069
|
-
onBlur:
|
|
1070
|
-
readonly:
|
|
1071
|
-
}, null, 40,
|
|
1072
|
-
|
|
1064
|
+
placeholder: d.placeholder,
|
|
1065
|
+
value: d.modelValue,
|
|
1066
|
+
type: d.type,
|
|
1067
|
+
onInput: n,
|
|
1068
|
+
onFocus: p,
|
|
1069
|
+
onBlur: v,
|
|
1070
|
+
readonly: d.readonly
|
|
1071
|
+
}, null, 40, zt),
|
|
1072
|
+
_(d.$slots, "end", {}, void 0, !0)
|
|
1073
1073
|
])
|
|
1074
1074
|
]),
|
|
1075
|
-
|
|
1075
|
+
d.error ? (i(), C(oe, {
|
|
1076
1076
|
key: 0,
|
|
1077
1077
|
color: "danger"
|
|
1078
1078
|
}, {
|
|
1079
|
-
default:
|
|
1080
|
-
M(A(
|
|
1079
|
+
default: N(() => [
|
|
1080
|
+
M(A(d.error), 1)
|
|
1081
1081
|
]),
|
|
1082
1082
|
_: 1
|
|
1083
|
-
})) :
|
|
1083
|
+
})) : d.help ? (i(), C(oe, {
|
|
1084
1084
|
key: 1,
|
|
1085
1085
|
color: "secondary"
|
|
1086
1086
|
}, {
|
|
1087
|
-
default:
|
|
1088
|
-
M(A(
|
|
1087
|
+
default: N(() => [
|
|
1088
|
+
M(A(d.help), 1)
|
|
1089
1089
|
]),
|
|
1090
1090
|
_: 1
|
|
1091
|
-
})) :
|
|
1091
|
+
})) : I("", !0)
|
|
1092
1092
|
], 2));
|
|
1093
1093
|
}
|
|
1094
|
-
}),
|
|
1094
|
+
}), It = /* @__PURE__ */ g(Et, [["__scopeId", "data-v-11ddaa71"]]), Pt = {};
|
|
1095
1095
|
function Vt(t, o) {
|
|
1096
1096
|
return i(), f("textarea");
|
|
1097
1097
|
}
|
|
1098
|
-
const
|
|
1098
|
+
const Ct = /* @__PURE__ */ g(Pt, [["render", Vt]]), Rt = {};
|
|
1099
1099
|
function At(t, o) {
|
|
1100
1100
|
return i(), f("div");
|
|
1101
1101
|
}
|
|
1102
|
-
const Ot = /* @__PURE__ */
|
|
1102
|
+
const Ot = /* @__PURE__ */ g(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
|
+
}, [
|
|
1114
|
+
_(s.$slots, "default", {}, void 0, !0)
|
|
1115
|
+
], 4));
|
|
1110
1116
|
}
|
|
1111
|
-
}),
|
|
1117
|
+
}), Xt = /* @__PURE__ */ g(Nt, [["__scopeId", "data-v-eeba6473"]]), Dt = /* @__PURE__ */ h({
|
|
1112
1118
|
__name: "t-divider",
|
|
1113
1119
|
props: {
|
|
1114
1120
|
direction: { default: "horizontal" }
|
|
@@ -1119,108 +1125,108 @@ const Ot = /* @__PURE__ */ _(Rt, [["render", At]]), Xt = { class: "t-grid" }, Dt
|
|
|
1119
1125
|
class: B(["t-divider", { [o.direction]: !0 }])
|
|
1120
1126
|
}, null, 2));
|
|
1121
1127
|
}
|
|
1122
|
-
}),
|
|
1128
|
+
}), Wt = /* @__PURE__ */ g(Dt, [["__scopeId", "data-v-47ee8991"]]), qt = /* @__PURE__ */ h({
|
|
1123
1129
|
__name: "t-toggle-password",
|
|
1124
1130
|
props: {
|
|
1125
1131
|
color: { default: "warning" }
|
|
1126
1132
|
},
|
|
1127
1133
|
emits: ["change"],
|
|
1128
1134
|
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":
|
|
1135
|
+
const e = t, s = o, r = m(!1), l = m(), u = x(() => {
|
|
1136
|
+
let v = e.color;
|
|
1137
|
+
return ["warning", "info", "danger", "primary", "secondary", "success"].includes(e.color) && (v = `var(--t-color-status-${e.color})`), {
|
|
1138
|
+
"--color": v
|
|
1133
1139
|
};
|
|
1134
|
-
}),
|
|
1135
|
-
|
|
1136
|
-
let
|
|
1137
|
-
|
|
1140
|
+
}), n = () => l.value?.parentElement?.querySelector?.("input");
|
|
1141
|
+
H(() => {
|
|
1142
|
+
let v = n();
|
|
1143
|
+
v && (r.value = v.type != "password", s("change", r.value));
|
|
1138
1144
|
});
|
|
1139
|
-
const
|
|
1140
|
-
let
|
|
1141
|
-
|
|
1145
|
+
const p = () => {
|
|
1146
|
+
let v = n();
|
|
1147
|
+
v && (r.value = !r.value, r.value ? v.type = "text" : v.type = "password", s("change", r.value));
|
|
1142
1148
|
};
|
|
1143
|
-
return (
|
|
1149
|
+
return (v, d) => (i(), f("button", {
|
|
1144
1150
|
ref_key: "toggle",
|
|
1145
1151
|
ref: l,
|
|
1146
1152
|
class: "t-toggle-password",
|
|
1147
|
-
style:
|
|
1148
|
-
|
|
1153
|
+
style: T(u.value),
|
|
1154
|
+
onPointerup: p
|
|
1149
1155
|
}, [
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
], !0) :
|
|
1153
|
-
|
|
1154
|
-
|
|
1156
|
+
r.value ? _(v.$slots, "on", { key: 0 }, () => [
|
|
1157
|
+
d[0] || (d[0] = $("i", { class: "ri-eye-line" }, null, -1))
|
|
1158
|
+
], !0) : I("", !0),
|
|
1159
|
+
r.value ? I("", !0) : _(v.$slots, "off", { key: 1 }, () => [
|
|
1160
|
+
d[1] || (d[1] = $("i", { class: "ri-eye-off-line" }, null, -1))
|
|
1155
1161
|
], !0)
|
|
1156
|
-
],
|
|
1162
|
+
], 36));
|
|
1157
1163
|
}
|
|
1158
|
-
}),
|
|
1164
|
+
}), Mt = /* @__PURE__ */ g(qt, [["__scopeId", "data-v-e5aa6028"]]), Lt = /* @__PURE__ */ h({
|
|
1159
1165
|
__name: "t-avatar",
|
|
1160
1166
|
props: {
|
|
1161
1167
|
square: { type: Boolean, default: !1 },
|
|
1162
1168
|
size: { default: "standard" }
|
|
1163
1169
|
},
|
|
1164
1170
|
setup(t) {
|
|
1165
|
-
const o = t, e =
|
|
1166
|
-
return (s,
|
|
1171
|
+
const o = t, e = x(() => o.size == "small" ? "24px" : o.size == "standard" ? "40px" : o.size == "large" ? "60px" : o.size);
|
|
1172
|
+
return (s, r) => (i(), f("div", {
|
|
1167
1173
|
class: B(["t-avatar", { square: s.square }]),
|
|
1168
|
-
style:
|
|
1174
|
+
style: T({ "--size": e.value })
|
|
1169
1175
|
}, [
|
|
1170
|
-
|
|
1176
|
+
_(s.$slots, "default", {}, void 0, !0)
|
|
1171
1177
|
], 6));
|
|
1172
1178
|
}
|
|
1173
|
-
}),
|
|
1179
|
+
}), Ht = /* @__PURE__ */ g(Lt, [["__scopeId", "data-v-1d223827"]]), Ft = { class: "t-collapse-title" }, Kt = {
|
|
1174
1180
|
key: 0,
|
|
1175
1181
|
class: "icon"
|
|
1176
|
-
},
|
|
1182
|
+
}, Ut = {
|
|
1177
1183
|
key: 1,
|
|
1178
1184
|
class: "icon"
|
|
1179
|
-
},
|
|
1185
|
+
}, jt = { class: "t-collapse-content" }, Gt = /* @__PURE__ */ h({
|
|
1180
1186
|
__name: "t-collapse",
|
|
1181
1187
|
props: {
|
|
1182
1188
|
title: {}
|
|
1183
1189
|
},
|
|
1184
1190
|
emits: ["change"],
|
|
1185
1191
|
setup(t, { emit: o }) {
|
|
1186
|
-
const e = t, s = o,
|
|
1187
|
-
|
|
1192
|
+
const e = t, s = o, r = m(!1), l = m(""), u = m(), n = () => {
|
|
1193
|
+
r.value = !r.value, l.value = `calc(${u.value.offsetHeight}px + 2rem)`, s("change", r.value);
|
|
1188
1194
|
};
|
|
1189
|
-
return s("change",
|
|
1190
|
-
class: B(["t-collapse", { open:
|
|
1191
|
-
style:
|
|
1195
|
+
return s("change", r.value), (p, v) => (i(), f("div", {
|
|
1196
|
+
class: B(["t-collapse", { open: r.value }]),
|
|
1197
|
+
style: T({ "--height": l.value })
|
|
1192
1198
|
}, [
|
|
1193
1199
|
$("div", {
|
|
1194
1200
|
class: "t-collapse-header",
|
|
1195
|
-
|
|
1201
|
+
onPointerup: n
|
|
1196
1202
|
}, [
|
|
1197
|
-
|
|
1198
|
-
$("div",
|
|
1199
|
-
|
|
1203
|
+
_(p.$slots, "icon"),
|
|
1204
|
+
$("div", Ft, [
|
|
1205
|
+
_(p.$slots, "title", {}, () => [
|
|
1200
1206
|
M(A(e.title), 1)
|
|
1201
1207
|
])
|
|
1202
1208
|
]),
|
|
1203
|
-
|
|
1204
|
-
|
|
1209
|
+
_(p.$slots, "toggle", {}, () => [
|
|
1210
|
+
r.value ? (i(), f("div", Kt, [...v[0] || (v[0] = [
|
|
1205
1211
|
$("i", { class: "ri-arrow-up-s-line" }, null, -1)
|
|
1206
|
-
])])) : (i(), f("div",
|
|
1212
|
+
])])) : (i(), f("div", Ut, [...v[1] || (v[1] = [
|
|
1207
1213
|
$("i", { class: "ri-arrow-down-s-line" }, null, -1)
|
|
1208
1214
|
])]))
|
|
1209
1215
|
])
|
|
1210
|
-
]),
|
|
1211
|
-
$("div",
|
|
1216
|
+
], 32),
|
|
1217
|
+
$("div", jt, [
|
|
1212
1218
|
$("div", {
|
|
1213
1219
|
ref_key: "content",
|
|
1214
1220
|
ref: u
|
|
1215
1221
|
}, [
|
|
1216
|
-
|
|
1217
|
-
|
|
1222
|
+
_(p.$slots, "content", {}, () => [
|
|
1223
|
+
_(p.$slots, "default")
|
|
1218
1224
|
])
|
|
1219
1225
|
], 512)
|
|
1220
1226
|
])
|
|
1221
1227
|
], 6));
|
|
1222
1228
|
}
|
|
1223
|
-
}),
|
|
1229
|
+
}), Jt = /* @__PURE__ */ h({
|
|
1224
1230
|
__name: "t-switch",
|
|
1225
1231
|
props: {
|
|
1226
1232
|
modelValue: { type: Boolean },
|
|
@@ -1228,9 +1234,9 @@ const Ot = /* @__PURE__ */ _(Rt, [["render", At]]), Xt = { class: "t-grid" }, Dt
|
|
|
1228
1234
|
},
|
|
1229
1235
|
emits: ["update:modelValue"],
|
|
1230
1236
|
setup(t, { emit: o }) {
|
|
1231
|
-
const e = t, s = o,
|
|
1237
|
+
const e = t, s = o, r = () => {
|
|
1232
1238
|
s("update:modelValue", !e.modelValue);
|
|
1233
|
-
}, l =
|
|
1239
|
+
}, l = x(() => {
|
|
1234
1240
|
let u = {
|
|
1235
1241
|
"--background": e.color,
|
|
1236
1242
|
"--color": "#ffffff"
|
|
@@ -1240,41 +1246,41 @@ const Ot = /* @__PURE__ */ _(Rt, [["render", At]]), Xt = { class: "t-grid" }, Dt
|
|
|
1240
1246
|
"--color": `var(--t-color-status-${e.color}-text)`
|
|
1241
1247
|
}), u;
|
|
1242
1248
|
});
|
|
1243
|
-
return (u,
|
|
1249
|
+
return (u, n) => (i(), f("div", {
|
|
1244
1250
|
class: B(["t-switch", { on: e.modelValue }]),
|
|
1245
|
-
style:
|
|
1246
|
-
|
|
1247
|
-
}, [...
|
|
1251
|
+
style: T(l.value),
|
|
1252
|
+
onPointerup: r
|
|
1253
|
+
}, [...n[0] || (n[0] = [
|
|
1248
1254
|
$("div", { class: "t-switch-icon" }, null, -1)
|
|
1249
|
-
])],
|
|
1255
|
+
])], 38));
|
|
1250
1256
|
}
|
|
1251
|
-
}),
|
|
1257
|
+
}), Qt = /* @__PURE__ */ g(Jt, [["__scopeId", "data-v-ac24f5cf"]]), Zt = /* @__PURE__ */ h({
|
|
1252
1258
|
__name: "t-tab",
|
|
1253
1259
|
props: {
|
|
1254
1260
|
value: {},
|
|
1255
1261
|
disabled: { type: Boolean, default: !1 }
|
|
1256
1262
|
},
|
|
1257
1263
|
setup(t) {
|
|
1258
|
-
const o = t, e = pe("tabsState"), s =
|
|
1264
|
+
const o = t, e = pe("tabsState"), s = x(() => e.activeValue.value === o.value), r = () => {
|
|
1259
1265
|
o.disabled || e.setValue(o.value);
|
|
1260
1266
|
};
|
|
1261
1267
|
return (l, u) => (i(), f("li", {
|
|
1262
1268
|
class: B(["t-tab", { active: s.value }])
|
|
1263
1269
|
}, [
|
|
1264
|
-
|
|
1270
|
+
ue(Z, {
|
|
1265
1271
|
variant: "text",
|
|
1266
|
-
|
|
1272
|
+
onPointerup: r,
|
|
1267
1273
|
size: O(e).size,
|
|
1268
1274
|
color: s.value ? O(e).color.text : void 0
|
|
1269
1275
|
}, {
|
|
1270
|
-
default:
|
|
1271
|
-
|
|
1276
|
+
default: N(() => [
|
|
1277
|
+
_(l.$slots, "default", {}, void 0, !0)
|
|
1272
1278
|
]),
|
|
1273
1279
|
_: 3
|
|
1274
1280
|
}, 8, ["size", "color"])
|
|
1275
1281
|
], 2));
|
|
1276
1282
|
}
|
|
1277
|
-
}),
|
|
1283
|
+
}), Yt = /* @__PURE__ */ g(Zt, [["__scopeId", "data-v-d25a3a3e"]]), eo = /* @__PURE__ */ h({
|
|
1278
1284
|
__name: "t-tabs",
|
|
1279
1285
|
props: {
|
|
1280
1286
|
placement: { default: "top-start" },
|
|
@@ -1288,82 +1294,72 @@ const Ot = /* @__PURE__ */ _(Rt, [["render", At]]), Xt = { class: "t-grid" }, Dt
|
|
|
1288
1294
|
},
|
|
1289
1295
|
emits: ["update:modelValue"],
|
|
1290
1296
|
setup(t, { emit: o }) {
|
|
1291
|
-
const e = t, s = o,
|
|
1297
|
+
const e = t, s = o, r = m("0px"), l = m(0), u = m(0), n = m(), p = x(() => {
|
|
1292
1298
|
let a = "", c = "";
|
|
1293
1299
|
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":
|
|
1300
|
+
}), v = x(() => e.variant == "border-under" ? {
|
|
1301
|
+
"--transform": r.value,
|
|
1296
1302
|
"--border": e.border + "px"
|
|
1297
1303
|
} : e.variant == "tag" ? {
|
|
1298
1304
|
"--top": e.margin[0] + "px",
|
|
1299
1305
|
"--height": u.value - e.margin[0] * 2 + "px",
|
|
1300
1306
|
"--left": e.margin[1] + "px",
|
|
1301
1307
|
"--width": l.value - e.margin[1] * 2 + "px",
|
|
1302
|
-
"--transform":
|
|
1308
|
+
"--transform": r.value,
|
|
1303
1309
|
"--radius": e.radius + "px"
|
|
1304
|
-
} : {}),
|
|
1310
|
+
} : {}), d = () => {
|
|
1305
1311
|
if (e.variant == "border-under") {
|
|
1306
|
-
let a =
|
|
1312
|
+
let a = n.value.querySelector(".active");
|
|
1307
1313
|
if (a) {
|
|
1308
1314
|
if (e.placement.startsWith("top-") || e.placement.startsWith("bottom-")) {
|
|
1309
|
-
let c = a.getBoundingClientRect().left -
|
|
1310
|
-
|
|
1315
|
+
let c = a.getBoundingClientRect().left - n.value.getBoundingClientRect().left + n.value.scrollLeft, y = a.offsetWidth / 2;
|
|
1316
|
+
r.value = c + y - e.border / 2 + "px";
|
|
1311
1317
|
} else if (e.placement.startsWith("left-") || e.placement.startsWith("right-")) {
|
|
1312
|
-
let c = a.getBoundingClientRect().top -
|
|
1313
|
-
|
|
1318
|
+
let c = a.getBoundingClientRect().top - n.value.getBoundingClientRect().top + n.value.scrollTop, y = a.offsetHeight / 2;
|
|
1319
|
+
r.value = c + y - e.border / 2 + "px";
|
|
1314
1320
|
}
|
|
1315
1321
|
}
|
|
1316
1322
|
}
|
|
1317
1323
|
if (e.variant == "tag") {
|
|
1318
|
-
let a =
|
|
1324
|
+
let a = n.value.querySelector(".active");
|
|
1319
1325
|
if (a) {
|
|
1320
|
-
let c = a.offsetWidth,
|
|
1326
|
+
let c = a.offsetWidth, y = a.offsetHeight;
|
|
1321
1327
|
if (e.placement.startsWith("top-") || e.placement.startsWith("bottom-")) {
|
|
1322
|
-
let
|
|
1323
|
-
|
|
1328
|
+
let w = a.getBoundingClientRect().left - n.value.getBoundingClientRect().left + n.value.scrollLeft;
|
|
1329
|
+
r.value = w + "px";
|
|
1324
1330
|
} else if (e.placement.startsWith("left-") || e.placement.startsWith("right-")) {
|
|
1325
|
-
let
|
|
1326
|
-
|
|
1331
|
+
let w = a.getBoundingClientRect().top - n.value.getBoundingClientRect().top + n.value.scrollTop;
|
|
1332
|
+
r.value = w + "px";
|
|
1327
1333
|
}
|
|
1328
|
-
l.value = c, u.value =
|
|
1334
|
+
l.value = c, u.value = y;
|
|
1329
1335
|
}
|
|
1330
1336
|
}
|
|
1331
1337
|
};
|
|
1332
1338
|
return de("tabsState", {
|
|
1333
|
-
activeValue:
|
|
1334
|
-
color:
|
|
1339
|
+
activeValue: x(() => e.modelValue),
|
|
1340
|
+
color: p.value,
|
|
1335
1341
|
size: e.size,
|
|
1336
1342
|
variant: e.variant,
|
|
1337
1343
|
setValue: (a) => {
|
|
1338
1344
|
s("update:modelValue", a);
|
|
1339
1345
|
}
|
|
1340
|
-
}),
|
|
1341
|
-
await
|
|
1342
|
-
}),
|
|
1343
|
-
await
|
|
1346
|
+
}), W(() => e.modelValue, async () => {
|
|
1347
|
+
await le(), d();
|
|
1348
|
+
}), H(async () => {
|
|
1349
|
+
await le(), d();
|
|
1344
1350
|
}), (a, c) => (i(), f("ul", {
|
|
1345
1351
|
ref_key: "container",
|
|
1346
|
-
ref:
|
|
1352
|
+
ref: n,
|
|
1347
1353
|
class: B(["t-tabs", { [a.placement]: !0, [`variant-${a.variant}`]: !0 }]),
|
|
1348
|
-
style:
|
|
1354
|
+
style: T([{ "--background": p.value.background, "--color": p.value.text }, v.value])
|
|
1349
1355
|
}, [
|
|
1350
|
-
|
|
1356
|
+
_(a.$slots, "default", {}, void 0, !0)
|
|
1351
1357
|
], 6));
|
|
1352
1358
|
}
|
|
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 = {
|
|
1359
|
+
}), to = /* @__PURE__ */ g(eo, [["__scopeId", "data-v-b512ed8e"]]), oo = { key: 0 }, so = {
|
|
1364
1360
|
key: 0,
|
|
1365
1361
|
class: "t-checkbox-label"
|
|
1366
|
-
},
|
|
1362
|
+
}, ro = /* @__PURE__ */ h({
|
|
1367
1363
|
__name: "t-checkbox",
|
|
1368
1364
|
props: {
|
|
1369
1365
|
label: { default: "" },
|
|
@@ -1376,50 +1372,49 @@ const Ot = /* @__PURE__ */ _(Rt, [["render", At]]), Xt = { class: "t-grid" }, Dt
|
|
|
1376
1372
|
},
|
|
1377
1373
|
emits: ["update:modelValue"],
|
|
1378
1374
|
setup(t, { emit: o }) {
|
|
1379
|
-
const e = t, s = o,
|
|
1380
|
-
let
|
|
1375
|
+
const e = t, s = o, r = x(() => {
|
|
1376
|
+
let n = {
|
|
1381
1377
|
"--background": e.color,
|
|
1382
1378
|
"--color": "#ffffff"
|
|
1383
1379
|
};
|
|
1384
|
-
return ["warning", "info", "danger", "primary", "secondary", "success"].includes(e.color) && (
|
|
1380
|
+
return ["warning", "info", "danger", "primary", "secondary", "success"].includes(e.color) && (n = {
|
|
1385
1381
|
"--background": `var(--t-color-status-${e.color})`,
|
|
1386
1382
|
"--color": `var(--t-color-status-${e.color}-text)`
|
|
1387
|
-
}),
|
|
1388
|
-
}), l =
|
|
1389
|
-
if (
|
|
1390
|
-
let
|
|
1391
|
-
e.modelValue.includes(e.value) ?
|
|
1383
|
+
}), n;
|
|
1384
|
+
}), l = x(() => e.multiple ? e.modelValue.includes(e.value) : e.value === void 0 ? e.modelValue : e.modelValue == e.value), u = (n) => {
|
|
1385
|
+
if (n.preventDefault(), n.stopPropagation(), e.multiple) {
|
|
1386
|
+
let p = e.modelValue;
|
|
1387
|
+
e.modelValue.includes(e.value) ? p.splice(p.indexOf(e.value), 1) : p.push(e.value), s("update:modelValue", p);
|
|
1392
1388
|
} else e.value === void 0 ? s("update:modelValue", !e.modelValue) : s("update:modelValue", e.value);
|
|
1393
1389
|
};
|
|
1394
|
-
return (
|
|
1390
|
+
return (n, p) => (i(), f("div", {
|
|
1395
1391
|
class: B(["t-checkbox", { active: l.value }]),
|
|
1396
|
-
style:
|
|
1397
|
-
|
|
1398
|
-
onTouchend: u
|
|
1392
|
+
style: T(r.value),
|
|
1393
|
+
onPointerup: u
|
|
1399
1394
|
}, [
|
|
1400
1395
|
$("div", {
|
|
1401
|
-
class: B(`t-checkbox-${
|
|
1396
|
+
class: B(`t-checkbox-${n.type}`)
|
|
1402
1397
|
}, [
|
|
1403
|
-
|
|
1404
|
-
|
|
1405
|
-
|
|
1406
|
-
], !0) :
|
|
1398
|
+
n.type == "radio" ? (i(), f("div", oo)) : I("", !0),
|
|
1399
|
+
n.type == "check" ? _(n.$slots, "icon", { key: 1 }, () => [
|
|
1400
|
+
p[0] || (p[0] = $("i", { class: "ri-check-line" }, null, -1))
|
|
1401
|
+
], !0) : I("", !0)
|
|
1407
1402
|
], 2),
|
|
1408
|
-
|
|
1409
|
-
|
|
1403
|
+
_(n.$slots, "label", {}, () => [
|
|
1404
|
+
n.label ? (i(), f("span", so, A(e.label), 1)) : I("", !0)
|
|
1410
1405
|
], !0)
|
|
1411
1406
|
], 38));
|
|
1412
1407
|
}
|
|
1413
|
-
}),
|
|
1408
|
+
}), no = /* @__PURE__ */ g(ro, [["__scopeId", "data-v-b1f8b112"]]), ao = /* @__PURE__ */ h({
|
|
1414
1409
|
__name: "t-keyboard-space",
|
|
1415
1410
|
setup(t) {
|
|
1416
|
-
const { height: o } =
|
|
1411
|
+
const { height: o } = ge();
|
|
1417
1412
|
return (e, s) => (i(), f("div", {
|
|
1418
1413
|
class: "t-keyboard-space",
|
|
1419
|
-
style:
|
|
1414
|
+
style: T({ "--height": O(o) + "px" })
|
|
1420
1415
|
}, null, 4));
|
|
1421
1416
|
}
|
|
1422
|
-
}),
|
|
1417
|
+
}), lo = /* @__PURE__ */ g(ao, [["__scopeId", "data-v-4b06018d"]]), co = /* @__PURE__ */ h({
|
|
1423
1418
|
__name: "t-skeleton",
|
|
1424
1419
|
props: {
|
|
1425
1420
|
width: { default: "100%" },
|
|
@@ -1428,23 +1423,23 @@ const Ot = /* @__PURE__ */ _(Rt, [["render", At]]), Xt = { class: "t-grid" }, Dt
|
|
|
1428
1423
|
color: { default: null }
|
|
1429
1424
|
},
|
|
1430
1425
|
setup(t) {
|
|
1431
|
-
const o = t, e =
|
|
1426
|
+
const o = t, e = x(() => ({
|
|
1432
1427
|
"--width": o.width,
|
|
1433
1428
|
"--height": o.height,
|
|
1434
1429
|
"--radius": o.radius
|
|
1435
1430
|
}));
|
|
1436
|
-
return (s,
|
|
1431
|
+
return (s, r) => (i(), f("div", {
|
|
1437
1432
|
class: "t-skeleton",
|
|
1438
|
-
style:
|
|
1433
|
+
style: T(e.value)
|
|
1439
1434
|
}, null, 4));
|
|
1440
1435
|
}
|
|
1441
|
-
}),
|
|
1436
|
+
}), io = /* @__PURE__ */ g(co, [["__scopeId", "data-v-877bbdb5"]]), uo = /* @__PURE__ */ h({
|
|
1442
1437
|
__name: "t-ripple",
|
|
1443
1438
|
props: {
|
|
1444
1439
|
color: { default: "primary" }
|
|
1445
1440
|
},
|
|
1446
1441
|
setup(t) {
|
|
1447
|
-
const o = t, e =
|
|
1442
|
+
const o = t, e = x(() => {
|
|
1448
1443
|
let s = {};
|
|
1449
1444
|
return o.color ? ["warning", "info", "danger", "primary", "secondary", "success"].includes(o.color) ? s = {
|
|
1450
1445
|
"--color": "var(--t-color-status-" + o.color + ")"
|
|
@@ -1454,25 +1449,57 @@ const Ot = /* @__PURE__ */ _(Rt, [["render", At]]), Xt = { class: "t-grid" }, Dt
|
|
|
1454
1449
|
"--color": "var(--t-color-surface)"
|
|
1455
1450
|
}, s;
|
|
1456
1451
|
});
|
|
1457
|
-
return (s,
|
|
1452
|
+
return (s, r) => (i(), f("div", {
|
|
1458
1453
|
class: "t-ripple",
|
|
1459
|
-
style:
|
|
1454
|
+
style: T(e.value)
|
|
1460
1455
|
}, null, 4));
|
|
1461
1456
|
}
|
|
1462
|
-
}),
|
|
1457
|
+
}), po = /* @__PURE__ */ g(uo, [["__scopeId", "data-v-42cb3d71"]]), fo = /* @__PURE__ */ h({
|
|
1458
|
+
__name: "t-flex",
|
|
1459
|
+
props: {
|
|
1460
|
+
gap: { default: 0 },
|
|
1461
|
+
direction: { default: "row" }
|
|
1462
|
+
},
|
|
1463
|
+
setup(t) {
|
|
1464
|
+
const o = t, e = x(() => isNaN(o.gap) ? o.gap : `var(--t-size-${o.gap})`);
|
|
1465
|
+
return (s, r) => (i(), f("div", {
|
|
1466
|
+
class: "t-flex",
|
|
1467
|
+
style: T({ "--gap": e.value, "--direction": o.direction })
|
|
1468
|
+
}, [
|
|
1469
|
+
_(s.$slots, "default", {}, void 0, !0)
|
|
1470
|
+
], 4));
|
|
1471
|
+
}
|
|
1472
|
+
}), mo = /* @__PURE__ */ g(fo, [["__scopeId", "data-v-35f9cdab"]]), vo = ["src"], yo = /* @__PURE__ */ h({
|
|
1473
|
+
__name: "t-image",
|
|
1474
|
+
props: {
|
|
1475
|
+
defaultSrc: {},
|
|
1476
|
+
src: {}
|
|
1477
|
+
},
|
|
1478
|
+
setup(t) {
|
|
1479
|
+
const o = m(""), e = () => {
|
|
1480
|
+
t.defaultSrc && (o.value = t.defaultSrc);
|
|
1481
|
+
};
|
|
1482
|
+
return H(() => {
|
|
1483
|
+
o.value = t.src;
|
|
1484
|
+
}), (s, r) => (i(), f("img", {
|
|
1485
|
+
onError: e,
|
|
1486
|
+
src: o.value
|
|
1487
|
+
}, null, 40, vo));
|
|
1488
|
+
}
|
|
1489
|
+
}), To = () => ({
|
|
1463
1490
|
install: (t) => {
|
|
1464
|
-
Be(), t.component("t-app",
|
|
1491
|
+
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);
|
|
1465
1492
|
}
|
|
1466
1493
|
});
|
|
1467
1494
|
export {
|
|
1468
1495
|
Se as blurCurrentActive,
|
|
1469
|
-
|
|
1470
|
-
|
|
1471
|
-
|
|
1472
|
-
|
|
1496
|
+
ko as createAction,
|
|
1497
|
+
ho as createAlert,
|
|
1498
|
+
$o as createLoading,
|
|
1499
|
+
xo as createToast,
|
|
1473
1500
|
To as createToife,
|
|
1474
|
-
|
|
1475
|
-
|
|
1501
|
+
we as isFormElement,
|
|
1502
|
+
Fe as presentController,
|
|
1476
1503
|
S as screenController,
|
|
1477
|
-
|
|
1504
|
+
ge as useKeyboard
|
|
1478
1505
|
};
|