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