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