@toife/vue 1.0.17 → 1.0.18
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 +466 -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,176 @@ 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 ["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
|
+
});
|
|
597
|
+
return (t, r) => (c(), m("div", {
|
|
598
|
+
class: "t-card",
|
|
599
|
+
style: x(n.value)
|
|
600
|
+
}, [
|
|
601
|
+
h(t.$slots, "default")
|
|
602
|
+
], 4));
|
|
603
|
+
}
|
|
604
|
+
}), Ve = {}, Ae = { class: "t-content" };
|
|
605
|
+
function Oe(e, o) {
|
|
606
|
+
return c(), m("div", Ae, [
|
|
607
|
+
h(e.$slots, "default", {}, void 0, !0)
|
|
527
608
|
]);
|
|
528
609
|
}
|
|
529
|
-
const
|
|
610
|
+
const Le = /* @__PURE__ */ g(Ve, [["render", Oe], ["__scopeId", "data-v-9a833657"]]), Q = 80, Xe = /* @__PURE__ */ T({
|
|
530
611
|
__name: "t-refresher",
|
|
531
612
|
emits: ["refresh"],
|
|
532
613
|
setup(e, { emit: o }) {
|
|
533
|
-
const
|
|
614
|
+
const n = o, t = _(0), r = _(!1), a = _();
|
|
534
615
|
let l, i = !1;
|
|
535
|
-
const
|
|
536
|
-
|
|
616
|
+
const y = () => {
|
|
617
|
+
r.value = !1, t.value = 0, l && l.cancel(), setTimeout(() => {
|
|
537
618
|
i = !1;
|
|
538
619
|
}, 2e3);
|
|
539
620
|
}, p = () => {
|
|
540
|
-
i = !0,
|
|
621
|
+
i = !0, r.value = !0, t.value = Q, n("refresh", y);
|
|
541
622
|
};
|
|
542
623
|
return D(() => a.value, () => {
|
|
543
624
|
l && l.destroy();
|
|
544
|
-
let
|
|
545
|
-
l = N(
|
|
625
|
+
let v = a.value.closest(".t-screen");
|
|
626
|
+
l = N(v, {
|
|
546
627
|
options: {
|
|
547
628
|
minDist: 60
|
|
548
629
|
},
|
|
549
|
-
move({ dy:
|
|
550
|
-
|
|
630
|
+
move({ dy: f }) {
|
|
631
|
+
r.value || i || f < 0 || (f >= 120 ? p() : t.value = f);
|
|
551
632
|
},
|
|
552
|
-
up({ dy:
|
|
553
|
-
|
|
633
|
+
up({ dy: f }) {
|
|
634
|
+
r.value || i || (f > Q ? p() : t.value = 0);
|
|
554
635
|
},
|
|
555
636
|
cancel() {
|
|
556
|
-
|
|
637
|
+
r.value = !1, t.value = 0;
|
|
557
638
|
}
|
|
558
639
|
});
|
|
559
640
|
}), A(() => {
|
|
560
641
|
l && l.destroy();
|
|
561
|
-
}), (
|
|
642
|
+
}), (v, f) => Y((c(), m("div", {
|
|
562
643
|
class: "t-refresher",
|
|
563
644
|
ref_key: "container",
|
|
564
645
|
ref: a,
|
|
565
|
-
style:
|
|
646
|
+
style: x({ height: `${t.value}px` })
|
|
566
647
|
}, [
|
|
567
648
|
k("img", {
|
|
568
|
-
class:
|
|
649
|
+
class: I({ spiner: r.value }),
|
|
569
650
|
src: "https://static.toikit.com/toikit/home_2.png?v=3",
|
|
570
651
|
alt: "Loading...",
|
|
571
652
|
style: { width: "22px", height: "22px" }
|
|
572
653
|
}, null, 2)
|
|
573
654
|
], 4)), [
|
|
574
|
-
[U,
|
|
655
|
+
[U, t.value > 0]
|
|
575
656
|
]);
|
|
576
657
|
}
|
|
577
|
-
}),
|
|
578
|
-
function
|
|
579
|
-
return c(),
|
|
580
|
-
|
|
658
|
+
}), qe = /* @__PURE__ */ g(Xe, [["__scopeId", "data-v-7f97bb1a"]]), Ye = {}, Ue = { class: "t-screen" };
|
|
659
|
+
function We(e, o) {
|
|
660
|
+
return c(), m("div", Ue, [
|
|
661
|
+
h(e.$slots, "default", {}, void 0, !0)
|
|
581
662
|
]);
|
|
582
663
|
}
|
|
583
|
-
const
|
|
664
|
+
const se = /* @__PURE__ */ g(Ye, [["render", We], ["__scopeId", "data-v-66ea8649"]]), Fe = /* @__PURE__ */ T({
|
|
584
665
|
__name: "t-swipe-screen",
|
|
585
666
|
emits: ["change"],
|
|
586
667
|
setup(e, { emit: o }) {
|
|
587
|
-
let
|
|
588
|
-
const
|
|
589
|
-
for (let
|
|
590
|
-
|
|
591
|
-
const
|
|
592
|
-
|
|
593
|
-
name:
|
|
668
|
+
let n = {};
|
|
669
|
+
const t = oe(), r = ie(), a = t.getRoutes(), l = _(!1), i = o;
|
|
670
|
+
for (let s of a)
|
|
671
|
+
n[s.name] = s.components;
|
|
672
|
+
const y = (s) => {
|
|
673
|
+
s && $.addScreen({
|
|
674
|
+
name: s,
|
|
594
675
|
target: null,
|
|
595
|
-
component: ce(
|
|
676
|
+
component: ce(n[s] || null)
|
|
596
677
|
});
|
|
597
|
-
}, p = (
|
|
598
|
-
!d || $.screens[
|
|
678
|
+
}, p = (s, d) => {
|
|
679
|
+
!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
680
|
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
681
|
i("change"), l.value = !1;
|
|
601
682
|
}, 400);
|
|
602
683
|
}, 100)));
|
|
603
|
-
},
|
|
684
|
+
}, v = () => {
|
|
604
685
|
$.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
686
|
$.removeScreen(), i("change"), l.value = !1;
|
|
606
687
|
}, 400);
|
|
607
688
|
};
|
|
608
|
-
|
|
609
|
-
|
|
689
|
+
y(r.name), D(() => r.name, (s, d) => {
|
|
690
|
+
s != $.currentScreen.value.name && ($.lastScreen.value?.name == s ? v() : y(s));
|
|
610
691
|
});
|
|
611
|
-
const
|
|
692
|
+
const f = () => {
|
|
612
693
|
l.value = !0;
|
|
613
|
-
const
|
|
614
|
-
|
|
694
|
+
const s = $.currentScreen.value.target, d = $.lastScreen.value.target;
|
|
695
|
+
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
696
|
l.value = !1;
|
|
616
697
|
}, 400);
|
|
617
698
|
};
|
|
618
699
|
return te(() => {
|
|
619
700
|
N(document, {
|
|
620
701
|
pointerId: null,
|
|
621
|
-
beforeEvent(
|
|
622
|
-
return l.value || $.screens.length < 2 ? !1 : (
|
|
702
|
+
beforeEvent(s) {
|
|
703
|
+
return l.value || $.screens.length < 2 ? !1 : (s.type == "pointerdown" && !this.pointerId && (this.pointerId = s.pointerId), this.pointerId == s.pointerId);
|
|
623
704
|
},
|
|
624
|
-
afterEvent(
|
|
625
|
-
(
|
|
705
|
+
afterEvent(s) {
|
|
706
|
+
(s.type == "pointerup" || s.type == "pointercancel") && (this.pointerId = null);
|
|
626
707
|
},
|
|
627
|
-
fast({ d:
|
|
628
|
-
|
|
708
|
+
fast({ d: s }) {
|
|
709
|
+
s == "right" && t.back();
|
|
629
710
|
},
|
|
630
|
-
move({ dx:
|
|
631
|
-
const d = window.innerWidth,
|
|
632
|
-
if (
|
|
633
|
-
u.style.transition = "transform 0s ease", u.style.transform = `translateX(${
|
|
711
|
+
move({ dx: s }) {
|
|
712
|
+
const d = window.innerWidth, b = s / d * 100, u = $.currentScreen.value.target, w = $.lastScreen?.value?.target;
|
|
713
|
+
if (s > 0 && s <= d) {
|
|
714
|
+
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
715
|
return;
|
|
635
716
|
}
|
|
636
717
|
},
|
|
637
|
-
up({ dx:
|
|
718
|
+
up({ dx: s }) {
|
|
638
719
|
const d = window.innerWidth;
|
|
639
|
-
|
|
720
|
+
s / d * 100 >= 50 ? t.back() : f();
|
|
640
721
|
},
|
|
641
722
|
cancel() {
|
|
642
|
-
|
|
723
|
+
f();
|
|
643
724
|
}
|
|
644
725
|
});
|
|
645
|
-
}), (
|
|
646
|
-
(c(!0),
|
|
726
|
+
}), (s, d) => (c(), m(V, null, [
|
|
727
|
+
(c(!0), m(V, null, W(R($).screens, (b, u) => (c(), z(se, {
|
|
647
728
|
ref_for: !0,
|
|
648
729
|
ref: (w) => p(u, w),
|
|
649
|
-
style:
|
|
730
|
+
style: x({ zIndex: u + (u == R($).screens.length - 1 ? 2 : 1) }),
|
|
650
731
|
key: u
|
|
651
732
|
}, {
|
|
652
733
|
default: P(() => [
|
|
653
|
-
(c(), z(le(
|
|
734
|
+
(c(), z(le(b.component.default)))
|
|
654
735
|
]),
|
|
655
736
|
_: 2
|
|
656
737
|
}, 1032, ["style"]))), 128)),
|
|
657
738
|
k("div", {
|
|
658
739
|
class: "t-swipe-backdrop",
|
|
659
|
-
style:
|
|
740
|
+
style: x({ zIndex: R($).screens.length })
|
|
660
741
|
}, null, 4)
|
|
661
742
|
], 64));
|
|
662
743
|
}
|
|
663
|
-
}),
|
|
744
|
+
}), Ge = /* @__PURE__ */ g(Fe, [["__scopeId", "data-v-a048cc07"]]), He = /* @__PURE__ */ T({
|
|
664
745
|
__name: "t-toolbar",
|
|
665
746
|
props: {
|
|
666
747
|
placement: { default: "bottom" },
|
|
@@ -668,66 +749,66 @@ const re = /* @__PURE__ */ y(Fe, [["render", He], ["__scopeId", "data-v-66ea8649
|
|
|
668
749
|
},
|
|
669
750
|
setup(e) {
|
|
670
751
|
const o = e;
|
|
671
|
-
return (
|
|
672
|
-
class:
|
|
673
|
-
style:
|
|
752
|
+
return (n, t) => (c(), m("div", {
|
|
753
|
+
class: I(["t-toolbar", { [o.placement]: !0 }]),
|
|
754
|
+
style: x({ "--t-size-toolbar": o.size })
|
|
674
755
|
}, [
|
|
675
756
|
k("div", null, [
|
|
676
|
-
|
|
757
|
+
h(n.$slots, "default", {}, void 0, !0)
|
|
677
758
|
])
|
|
678
759
|
], 6));
|
|
679
760
|
}
|
|
680
|
-
}),
|
|
761
|
+
}), je = /* @__PURE__ */ g(He, [["__scopeId", "data-v-3b3a7896"]]), Ke = /* @__PURE__ */ T({
|
|
681
762
|
__name: "t-back-button",
|
|
682
763
|
props: {
|
|
683
764
|
to: {}
|
|
684
765
|
},
|
|
685
766
|
setup(e) {
|
|
686
|
-
const o =
|
|
687
|
-
$.hasPrevious.value ? o?.back?.() :
|
|
767
|
+
const o = oe(), n = e, t = () => {
|
|
768
|
+
$.hasPrevious.value ? o?.back?.() : n.to && o?.push?.(n.to);
|
|
688
769
|
};
|
|
689
|
-
return (
|
|
770
|
+
return (r, a) => r.to || R($).hasPrevious ? (c(), m("button", {
|
|
690
771
|
key: 0,
|
|
691
772
|
class: "t-back-button",
|
|
692
|
-
onClick:
|
|
773
|
+
onClick: t
|
|
693
774
|
}, [
|
|
694
|
-
|
|
775
|
+
h(r.$slots, "default", {}, () => [
|
|
695
776
|
a[0] || (a[0] = k("i", { class: "ri-arrow-left-s-line" }, null, -1))
|
|
696
777
|
], !0)
|
|
697
778
|
])) : E("", !0);
|
|
698
779
|
}
|
|
699
|
-
}),
|
|
780
|
+
}), Me = /* @__PURE__ */ g(Ke, [["__scopeId", "data-v-ed626a3d"]]), Je = /* @__PURE__ */ T({
|
|
700
781
|
__name: "t-text",
|
|
701
782
|
props: {
|
|
702
783
|
color: { default: "var(--t-color-text)" },
|
|
703
784
|
size: { default: "standard" }
|
|
704
785
|
},
|
|
705
786
|
setup(e) {
|
|
706
|
-
const o = e,
|
|
707
|
-
let
|
|
708
|
-
return o.size == "standard" ?
|
|
709
|
-
"--color":
|
|
710
|
-
"--font-size":
|
|
787
|
+
const o = e, n = S(() => {
|
|
788
|
+
let t, r = o.color;
|
|
789
|
+
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})`), {
|
|
790
|
+
"--color": r,
|
|
791
|
+
"--font-size": t
|
|
711
792
|
};
|
|
712
793
|
});
|
|
713
|
-
return (
|
|
794
|
+
return (t, r) => (c(), m("span", {
|
|
714
795
|
class: "t-text",
|
|
715
|
-
style:
|
|
796
|
+
style: x(n.value)
|
|
716
797
|
}, [
|
|
717
|
-
|
|
798
|
+
h(t.$slots, "default", {}, void 0, !0)
|
|
718
799
|
], 4));
|
|
719
800
|
}
|
|
720
|
-
}), j = /* @__PURE__ */
|
|
801
|
+
}), j = /* @__PURE__ */ g(Je, [["__scopeId", "data-v-f0f94f05"]]), Qe = /* @__PURE__ */ T({
|
|
721
802
|
__name: "t-pull-signal",
|
|
722
803
|
props: {
|
|
723
804
|
placement: { default: "bottom" }
|
|
724
805
|
},
|
|
725
806
|
setup(e) {
|
|
726
|
-
return (o,
|
|
727
|
-
class:
|
|
807
|
+
return (o, n) => (c(), m("div", {
|
|
808
|
+
class: I(["t-pull-bar", { [o.placement]: !0 }])
|
|
728
809
|
}, null, 2));
|
|
729
810
|
}
|
|
730
|
-
}), ae = /* @__PURE__ */
|
|
811
|
+
}), ae = /* @__PURE__ */ g(Qe, [["__scopeId", "data-v-daa38c85"]]), Ze = /* @__PURE__ */ T({
|
|
731
812
|
__name: "t-sheet",
|
|
732
813
|
props: {
|
|
733
814
|
background: { default: "var(--t-color-surface)" },
|
|
@@ -743,94 +824,94 @@ const re = /* @__PURE__ */ y(Fe, [["render", He], ["__scopeId", "data-v-66ea8649
|
|
|
743
824
|
},
|
|
744
825
|
emits: ["dismiss"],
|
|
745
826
|
setup(e, { emit: o }) {
|
|
746
|
-
const
|
|
827
|
+
const n = e, t = o, r = _(), a = _(), l = _(!1);
|
|
747
828
|
let i = null;
|
|
748
|
-
const
|
|
749
|
-
if (
|
|
750
|
-
if (
|
|
751
|
-
if (
|
|
752
|
-
if (
|
|
753
|
-
}), p = (
|
|
754
|
-
|
|
755
|
-
},
|
|
829
|
+
const y = S(() => {
|
|
830
|
+
if (n.placement == "bottom") return "down";
|
|
831
|
+
if (n.placement == "top") return "up";
|
|
832
|
+
if (n.placement == "left") return "left";
|
|
833
|
+
if (n.placement == "right") return "right";
|
|
834
|
+
}), p = (f) => {
|
|
835
|
+
t("dismiss", f);
|
|
836
|
+
}, v = () => {
|
|
756
837
|
l.value = !0, setTimeout(() => {
|
|
757
838
|
l.value = !1;
|
|
758
839
|
}, 300);
|
|
759
840
|
};
|
|
760
|
-
return D(() =>
|
|
761
|
-
|
|
841
|
+
return D(() => r.value, (f) => {
|
|
842
|
+
f && (i = N(r.value, {
|
|
762
843
|
options: {
|
|
763
844
|
minDist: 30
|
|
764
845
|
},
|
|
765
846
|
pointerId: null,
|
|
766
|
-
beforeEvent(
|
|
767
|
-
let d = !1,
|
|
768
|
-
return l.value || !
|
|
847
|
+
beforeEvent(s) {
|
|
848
|
+
let d = !1, b = !1;
|
|
849
|
+
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
850
|
},
|
|
770
|
-
afterEvent(
|
|
771
|
-
(
|
|
851
|
+
afterEvent(s) {
|
|
852
|
+
(s.type == "pointerup" || s.type == "pointercancel") && (this.pointerId = null);
|
|
772
853
|
},
|
|
773
|
-
fast({ d:
|
|
774
|
-
|
|
854
|
+
fast({ d: s }) {
|
|
855
|
+
v(), s == y.value ? t("dismiss", "gesture") : a.value.open();
|
|
775
856
|
},
|
|
776
|
-
move({ dy:
|
|
777
|
-
if (
|
|
857
|
+
move({ dy: s, dx: d, d: b }) {
|
|
858
|
+
if (b != y.value) return;
|
|
778
859
|
let u = 0;
|
|
779
|
-
|
|
860
|
+
n.placement == "bottom" || n.placement == "top" ? u = s : u = d, a.value.render({
|
|
780
861
|
contentTransform: u + "px",
|
|
781
862
|
transition: "0s"
|
|
782
863
|
});
|
|
783
864
|
},
|
|
784
|
-
up({ dy:
|
|
785
|
-
if (
|
|
865
|
+
up({ dy: s, dx: d, d: b }) {
|
|
866
|
+
if (v(), b != y.value) {
|
|
786
867
|
a.value.open();
|
|
787
868
|
return;
|
|
788
869
|
}
|
|
789
870
|
let u, w, H;
|
|
790
|
-
|
|
871
|
+
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
872
|
},
|
|
792
873
|
cancel() {
|
|
793
|
-
|
|
874
|
+
v(), a.value.open();
|
|
794
875
|
}
|
|
795
876
|
}));
|
|
796
877
|
}), A(() => {
|
|
797
878
|
i && i.destroy();
|
|
798
|
-
}), (
|
|
879
|
+
}), (f, s) => (c(), z(q, {
|
|
799
880
|
ref_key: "present",
|
|
800
881
|
ref: a,
|
|
801
|
-
placement:
|
|
802
|
-
backdrop:
|
|
803
|
-
visible:
|
|
804
|
-
keepalive:
|
|
882
|
+
placement: n.placement,
|
|
883
|
+
backdrop: f.backdrop,
|
|
884
|
+
visible: n.visible,
|
|
885
|
+
keepalive: n.keepalive,
|
|
805
886
|
onDismiss: p
|
|
806
887
|
}, {
|
|
807
888
|
default: P(() => [
|
|
808
|
-
|
|
889
|
+
n.gesture && n.placement != "center" ? (c(), z(ae, {
|
|
809
890
|
key: 0,
|
|
810
|
-
placement:
|
|
891
|
+
placement: n.placement
|
|
811
892
|
}, null, 8, ["placement"])) : E("", !0),
|
|
812
|
-
|
|
893
|
+
n.closeButton && n.placement == "center" ? (c(), m("button", {
|
|
813
894
|
key: 1,
|
|
814
895
|
class: "t-sheet-close",
|
|
815
|
-
onClick:
|
|
896
|
+
onClick: s[0] || (s[0] = (d) => p("close-button"))
|
|
816
897
|
}, [
|
|
817
|
-
|
|
818
|
-
|
|
898
|
+
h(f.$slots, "close-icon", {}, () => [
|
|
899
|
+
s[1] || (s[1] = k("i", { class: "ri-close-large-line" }, null, -1))
|
|
819
900
|
], !0)
|
|
820
901
|
])) : E("", !0),
|
|
821
902
|
k("div", {
|
|
822
|
-
class:
|
|
823
|
-
style:
|
|
903
|
+
class: I(["t-sheet", { fullscreen: n.fullscreen, [n.placement]: !0, rounded: f.rounded, radius: n.radius }]),
|
|
904
|
+
style: x({ "--background": n.background }),
|
|
824
905
|
ref_key: "sheet",
|
|
825
|
-
ref:
|
|
906
|
+
ref: r
|
|
826
907
|
}, [
|
|
827
|
-
|
|
908
|
+
h(f.$slots, "default", {}, void 0, !0)
|
|
828
909
|
], 6)
|
|
829
910
|
]),
|
|
830
911
|
_: 3
|
|
831
912
|
}, 8, ["placement", "backdrop", "visible", "keepalive"]));
|
|
832
913
|
}
|
|
833
|
-
}),
|
|
914
|
+
}), 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
915
|
__name: "t-input",
|
|
835
916
|
props: {
|
|
836
917
|
size: { default: "standard" },
|
|
@@ -845,173 +926,173 @@ const re = /* @__PURE__ */ y(Fe, [["render", He], ["__scopeId", "data-v-66ea8649
|
|
|
845
926
|
},
|
|
846
927
|
emits: ["update:modelValue"],
|
|
847
928
|
setup(e, { emit: o }) {
|
|
848
|
-
const
|
|
849
|
-
|
|
929
|
+
const n = e, t = o, r = (a) => {
|
|
930
|
+
t("update:modelValue", a.target.value);
|
|
850
931
|
};
|
|
851
|
-
return (a, l) => (c(),
|
|
852
|
-
class:
|
|
932
|
+
return (a, l) => (c(), m("div", {
|
|
933
|
+
class: I(["t-input", { rounded: n.rounded, ["size-" + n.size]: !0 }])
|
|
853
934
|
}, [
|
|
854
935
|
k("label", null, [
|
|
855
|
-
k("span",
|
|
856
|
-
k("div",
|
|
857
|
-
|
|
936
|
+
k("span", tt, C(a.label), 1),
|
|
937
|
+
k("div", ot, [
|
|
938
|
+
h(a.$slots, "start", {}, void 0, !0),
|
|
858
939
|
k("input", {
|
|
859
940
|
type: a.type,
|
|
860
941
|
placeholder: a.placeholder,
|
|
861
942
|
value: a.modelValue,
|
|
862
|
-
onInput:
|
|
863
|
-
}, null, 40,
|
|
864
|
-
|
|
943
|
+
onInput: r
|
|
944
|
+
}, null, 40, nt),
|
|
945
|
+
h(a.$slots, "end", {}, void 0, !0)
|
|
865
946
|
])
|
|
866
947
|
]),
|
|
867
|
-
|
|
948
|
+
n.error ? (c(), z(j, {
|
|
868
949
|
key: 0,
|
|
869
950
|
color: "danger"
|
|
870
951
|
}, {
|
|
871
952
|
default: P(() => [
|
|
872
|
-
X(
|
|
953
|
+
X(C(n.error), 1)
|
|
873
954
|
]),
|
|
874
955
|
_: 1
|
|
875
|
-
})) :
|
|
956
|
+
})) : n.help ? (c(), z(j, {
|
|
876
957
|
key: 1,
|
|
877
958
|
color: "secondary"
|
|
878
959
|
}, {
|
|
879
960
|
default: P(() => [
|
|
880
|
-
X(
|
|
961
|
+
X(C(n.help), 1)
|
|
881
962
|
]),
|
|
882
963
|
_: 1
|
|
883
964
|
})) : E("", !0)
|
|
884
965
|
], 2));
|
|
885
966
|
}
|
|
886
|
-
}),
|
|
887
|
-
function
|
|
888
|
-
return c(),
|
|
967
|
+
}), st = /* @__PURE__ */ g(rt, [["__scopeId", "data-v-75bf0d19"]]), at = {};
|
|
968
|
+
function lt(e, o) {
|
|
969
|
+
return c(), m("textarea");
|
|
889
970
|
}
|
|
890
|
-
const
|
|
891
|
-
function
|
|
892
|
-
return c(),
|
|
971
|
+
const ct = /* @__PURE__ */ g(at, [["render", lt]]), it = {};
|
|
972
|
+
function ut(e, o) {
|
|
973
|
+
return c(), m("div");
|
|
893
974
|
}
|
|
894
|
-
const
|
|
895
|
-
function
|
|
896
|
-
return c(),
|
|
975
|
+
const dt = /* @__PURE__ */ g(it, [["render", ut]]), pt = {}, ft = { class: "t-grid" };
|
|
976
|
+
function mt(e, o) {
|
|
977
|
+
return c(), m("div", ft);
|
|
897
978
|
}
|
|
898
|
-
const
|
|
899
|
-
function
|
|
900
|
-
return c(),
|
|
979
|
+
const vt = /* @__PURE__ */ g(pt, [["render", mt]]), _t = {}, yt = { class: "t-grid-item" };
|
|
980
|
+
function gt(e, o) {
|
|
981
|
+
return c(), m("div", yt);
|
|
901
982
|
}
|
|
902
|
-
const
|
|
983
|
+
const bt = /* @__PURE__ */ g(_t, [["render", gt]]), ht = /* @__PURE__ */ T({
|
|
903
984
|
__name: "t-divider",
|
|
904
985
|
props: {
|
|
905
986
|
type: { default: "horizontal" }
|
|
906
987
|
},
|
|
907
988
|
setup(e) {
|
|
908
989
|
const o = e;
|
|
909
|
-
return (
|
|
910
|
-
class:
|
|
990
|
+
return (n, t) => (c(), m("div", {
|
|
991
|
+
class: I(["t-divider", { [o.type]: !0 }])
|
|
911
992
|
}, null, 2));
|
|
912
993
|
}
|
|
913
|
-
}),
|
|
994
|
+
}), kt = /* @__PURE__ */ g(ht, [["__scopeId", "data-v-816784be"]]), $t = /* @__PURE__ */ T({
|
|
914
995
|
__name: "t-toggle-password",
|
|
915
996
|
props: {
|
|
916
997
|
color: { default: "warning" }
|
|
917
998
|
},
|
|
918
999
|
emits: ["change"],
|
|
919
1000
|
setup(e, { emit: o }) {
|
|
920
|
-
const
|
|
921
|
-
let p =
|
|
922
|
-
return ["warning", "info", "danger", "primary", "secondary", "success"].includes(
|
|
1001
|
+
const n = e, t = o, r = _(!1), a = _(), l = S(() => {
|
|
1002
|
+
let p = n.color;
|
|
1003
|
+
return ["warning", "info", "danger", "primary", "secondary", "success"].includes(n.color) && (p = `var(--t-color-status-${n.color})`), {
|
|
923
1004
|
"--color": p
|
|
924
1005
|
};
|
|
925
1006
|
}), i = () => a.value?.parentElement?.querySelector?.("input");
|
|
926
1007
|
te(() => {
|
|
927
1008
|
let p = i();
|
|
928
|
-
p && (
|
|
1009
|
+
p && (r.value = p.type != "password", t("change", r.value));
|
|
929
1010
|
});
|
|
930
|
-
const
|
|
1011
|
+
const y = () => {
|
|
931
1012
|
let p = i();
|
|
932
|
-
p && (
|
|
1013
|
+
p && (r.value = !r.value, r.value ? p.type = "text" : p.type = "password", t("change", r.value));
|
|
933
1014
|
};
|
|
934
|
-
return (p,
|
|
1015
|
+
return (p, v) => (c(), m("button", {
|
|
935
1016
|
ref_key: "toggle",
|
|
936
1017
|
ref: a,
|
|
937
1018
|
class: "t-toggle-password",
|
|
938
|
-
style:
|
|
939
|
-
onClick:
|
|
1019
|
+
style: x(l.value),
|
|
1020
|
+
onClick: y
|
|
940
1021
|
}, [
|
|
941
|
-
|
|
942
|
-
|
|
1022
|
+
r.value ? h(p.$slots, "on", { key: 0 }, () => [
|
|
1023
|
+
v[0] || (v[0] = k("i", { class: "ri-eye-line" }, null, -1))
|
|
943
1024
|
], !0) : E("", !0),
|
|
944
|
-
|
|
945
|
-
|
|
1025
|
+
r.value ? E("", !0) : h(p.$slots, "off", { key: 1 }, () => [
|
|
1026
|
+
v[1] || (v[1] = k("i", { class: "ri-eye-off-line" }, null, -1))
|
|
946
1027
|
], !0)
|
|
947
1028
|
], 4));
|
|
948
1029
|
}
|
|
949
|
-
}),
|
|
1030
|
+
}), Tt = /* @__PURE__ */ g($t, [["__scopeId", "data-v-3268e9e3"]]), wt = /* @__PURE__ */ T({
|
|
950
1031
|
__name: "t-avatar",
|
|
951
1032
|
props: {
|
|
952
1033
|
square: { type: Boolean, default: !1 },
|
|
953
1034
|
size: { default: "standard" }
|
|
954
1035
|
},
|
|
955
1036
|
setup(e) {
|
|
956
|
-
const o = e,
|
|
957
|
-
return (
|
|
958
|
-
class:
|
|
959
|
-
style:
|
|
1037
|
+
const o = e, n = S(() => o.size == "small" ? "24px" : o.size == "standard" ? "40px" : o.size == "large" ? "60px" : o.size);
|
|
1038
|
+
return (t, r) => (c(), m("div", {
|
|
1039
|
+
class: I(["t-avatar", { square: t.square }]),
|
|
1040
|
+
style: x({ "--size": n.value })
|
|
960
1041
|
}, [
|
|
961
|
-
|
|
1042
|
+
h(t.$slots, "default", {}, void 0, !0)
|
|
962
1043
|
], 6));
|
|
963
1044
|
}
|
|
964
|
-
}),
|
|
1045
|
+
}), xt = /* @__PURE__ */ g(wt, [["__scopeId", "data-v-24384c2f"]]), It = { class: "t-collapse-title" }, St = {
|
|
965
1046
|
key: 0,
|
|
966
1047
|
class: "icon"
|
|
967
|
-
},
|
|
1048
|
+
}, Et = {
|
|
968
1049
|
key: 1,
|
|
969
1050
|
class: "icon"
|
|
970
|
-
},
|
|
1051
|
+
}, zt = { class: "t-collapse-content" }, Bt = /* @__PURE__ */ T({
|
|
971
1052
|
__name: "t-collapse",
|
|
972
1053
|
props: {
|
|
973
1054
|
title: {}
|
|
974
1055
|
},
|
|
975
1056
|
emits: ["change"],
|
|
976
1057
|
setup(e, { emit: o }) {
|
|
977
|
-
const
|
|
978
|
-
|
|
1058
|
+
const n = e, t = o, r = _(!1), a = _(""), l = _(), i = () => {
|
|
1059
|
+
r.value = !r.value, a.value = `calc(${l.value.offsetHeight}px + 2rem)`, t("change", r.value);
|
|
979
1060
|
};
|
|
980
|
-
return
|
|
981
|
-
class:
|
|
982
|
-
style:
|
|
1061
|
+
return t("change", r.value), (y, p) => (c(), m("div", {
|
|
1062
|
+
class: I(["t-collapse", { open: r.value }]),
|
|
1063
|
+
style: x({ "--height": a.value })
|
|
983
1064
|
}, [
|
|
984
1065
|
k("div", {
|
|
985
1066
|
class: "t-collapse-header",
|
|
986
1067
|
onClick: i
|
|
987
1068
|
}, [
|
|
988
|
-
|
|
989
|
-
k("div",
|
|
990
|
-
|
|
991
|
-
X(
|
|
1069
|
+
h(y.$slots, "icon"),
|
|
1070
|
+
k("div", It, [
|
|
1071
|
+
h(y.$slots, "title", {}, () => [
|
|
1072
|
+
X(C(n.title), 1)
|
|
992
1073
|
])
|
|
993
1074
|
]),
|
|
994
|
-
|
|
995
|
-
|
|
1075
|
+
h(y.$slots, "toggle", {}, () => [
|
|
1076
|
+
r.value ? (c(), m("div", St, [...p[0] || (p[0] = [
|
|
996
1077
|
k("i", { class: "ri-arrow-up-s-line" }, null, -1)
|
|
997
|
-
])])) : (c(),
|
|
1078
|
+
])])) : (c(), m("div", Et, [...p[1] || (p[1] = [
|
|
998
1079
|
k("i", { class: "ri-arrow-down-s-line" }, null, -1)
|
|
999
1080
|
])]))
|
|
1000
1081
|
])
|
|
1001
1082
|
]),
|
|
1002
|
-
k("div",
|
|
1083
|
+
k("div", zt, [
|
|
1003
1084
|
k("div", {
|
|
1004
1085
|
ref_key: "content",
|
|
1005
1086
|
ref: l
|
|
1006
1087
|
}, [
|
|
1007
|
-
|
|
1008
|
-
|
|
1088
|
+
h(y.$slots, "content", {}, () => [
|
|
1089
|
+
h(y.$slots, "default")
|
|
1009
1090
|
])
|
|
1010
1091
|
], 512)
|
|
1011
1092
|
])
|
|
1012
1093
|
], 6));
|
|
1013
1094
|
}
|
|
1014
|
-
}),
|
|
1095
|
+
}), Ct = /* @__PURE__ */ T({
|
|
1015
1096
|
__name: "t-switch",
|
|
1016
1097
|
props: {
|
|
1017
1098
|
modelValue: { type: Boolean },
|
|
@@ -1019,29 +1100,29 @@ const $t = /* @__PURE__ */ y(ht, [["render", kt]]), Tt = /* @__PURE__ */ T({
|
|
|
1019
1100
|
},
|
|
1020
1101
|
emits: ["update:modelValue"],
|
|
1021
1102
|
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:
|
|
1103
|
+
const n = e, t = o, r = () => {
|
|
1104
|
+
t("update:modelValue", !n.modelValue);
|
|
1105
|
+
}, a = S(() => ["warning", "info", "danger", "primary", "secondary", "success"].includes(n.color) ? `var(--t-color-status-${n.color})` : n.color);
|
|
1106
|
+
return (l, i) => (c(), m("div", {
|
|
1107
|
+
class: I(["t-switch", { on: n.modelValue }]),
|
|
1108
|
+
style: x({ "--background-color": a.value }),
|
|
1109
|
+
onClick: r
|
|
1029
1110
|
}, [...i[0] || (i[0] = [
|
|
1030
1111
|
k("div", { class: "t-switch-icon" }, null, -1)
|
|
1031
1112
|
])], 6));
|
|
1032
1113
|
}
|
|
1033
|
-
}),
|
|
1114
|
+
}), Pt = /* @__PURE__ */ g(Ct, [["__scopeId", "data-v-9b43c883"]]), Xt = () => ({
|
|
1034
1115
|
install: (e) => {
|
|
1035
|
-
ue(), e.component("t-app", me), e.component("t-screen",
|
|
1116
|
+
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
1117
|
}
|
|
1037
1118
|
});
|
|
1038
1119
|
export {
|
|
1039
1120
|
L as blurCurrentActive,
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1121
|
+
At as createAction,
|
|
1122
|
+
Vt as createAlert,
|
|
1123
|
+
Ot as createLoading,
|
|
1124
|
+
Lt as createToast,
|
|
1125
|
+
Xt as createToife,
|
|
1045
1126
|
O as isFormElement,
|
|
1046
1127
|
Se as presentController,
|
|
1047
1128
|
$ as screenController,
|