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