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