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