@toife/vue 1.1.5 → 1.1.6
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/index.es.js +211 -211
- package/dist/index.umd.js +1 -1
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
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
|
|
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 z, normalizeStyle as x, normalizeClass as I, vShow as U, createElementVNode as k, createVNode as ee, createBlock as E, withCtx as P, toDisplayString as C, renderList as W, createTextVNode as q, 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
3
|
import { useRouter as oe, useRoute as ie } from "vue-router";
|
|
4
|
-
const O = (
|
|
5
|
-
const
|
|
6
|
-
|
|
4
|
+
const O = (t) => t && (t.tagName == "INPUT" || t.tagName == "TEXTAREA" || t.isContentEditable), X = () => {
|
|
5
|
+
const t = document.activeElement;
|
|
6
|
+
t && (t.tagName === "INPUT" || t.tagName === "TEXTAREA" || t.isContentEditable) && t.blur();
|
|
7
7
|
}, ue = () => {
|
|
8
|
-
document.addEventListener("contextmenu", (
|
|
9
|
-
!O(
|
|
8
|
+
document.addEventListener("contextmenu", (t) => t.preventDefault()), document.addEventListener("selectstart", (t) => t.preventDefault()), document.addEventListener("pointerup", (t) => {
|
|
9
|
+
!O(t.target) && X();
|
|
10
10
|
});
|
|
11
|
-
}, g = (
|
|
12
|
-
const n =
|
|
13
|
-
for (const [
|
|
14
|
-
n[
|
|
11
|
+
}, g = (t, o) => {
|
|
12
|
+
const n = t.__vccOpts || t;
|
|
13
|
+
for (const [e, r] of o)
|
|
14
|
+
n[e] = r;
|
|
15
15
|
return n;
|
|
16
16
|
}, de = {}, pe = { class: "t-app" };
|
|
17
|
-
function fe(
|
|
17
|
+
function fe(t, o) {
|
|
18
18
|
return c(), m("div", pe, [
|
|
19
|
-
h(
|
|
19
|
+
h(t.$slots, "default")
|
|
20
20
|
]);
|
|
21
21
|
}
|
|
22
22
|
const me = /* @__PURE__ */ g(de, [["render", fe]]), ve = /* @__PURE__ */ T({
|
|
@@ -28,8 +28,8 @@ const me = /* @__PURE__ */ g(de, [["render", fe]]), ve = /* @__PURE__ */ T({
|
|
|
28
28
|
placement: { default: "bottom" }
|
|
29
29
|
},
|
|
30
30
|
emits: ["dismiss"],
|
|
31
|
-
setup(
|
|
32
|
-
const
|
|
31
|
+
setup(t, { expose: o, emit: n }) {
|
|
32
|
+
const e = _(0), r = _(!1), a = _(), l = _(), i = t, 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",
|
|
@@ -53,7 +53,7 @@ const me = /* @__PURE__ */ g(de, [["render", fe]]), ve = /* @__PURE__ */ T({
|
|
|
53
53
|
});
|
|
54
54
|
};
|
|
55
55
|
D(() => i.visible, () => {
|
|
56
|
-
i.visible ? (r.value = !0,
|
|
56
|
+
i.visible ? (r.value = !0, e.value = Se.getNewIndex(), setTimeout(() => {
|
|
57
57
|
s();
|
|
58
58
|
}, 50)) : (d(), setTimeout(() => {
|
|
59
59
|
r.value = !1;
|
|
@@ -67,7 +67,7 @@ const me = /* @__PURE__ */ g(de, [["render", fe]]), ve = /* @__PURE__ */ T({
|
|
|
67
67
|
return D(() => a.value, (u) => {
|
|
68
68
|
u && (b = N(a.value, {
|
|
69
69
|
beforeEvent(w) {
|
|
70
|
-
return w.stopPropagation(), O(w.target) || (w.preventDefault(),
|
|
70
|
+
return w.stopPropagation(), O(w.target) || (w.preventDefault(), X()), w.type == "pointerup";
|
|
71
71
|
},
|
|
72
72
|
up() {
|
|
73
73
|
y("dismiss", "backdrop");
|
|
@@ -81,24 +81,24 @@ const me = /* @__PURE__ */ g(de, [["render", fe]]), ve = /* @__PURE__ */ T({
|
|
|
81
81
|
class: I(["t-present", { [u.placement]: !0 }]),
|
|
82
82
|
ref_key: "present",
|
|
83
83
|
ref: l,
|
|
84
|
-
style: x({ ...v, zIndex:
|
|
84
|
+
style: x({ ...v, zIndex: e.value })
|
|
85
85
|
}, [
|
|
86
86
|
h(u.$slots, "default", {}, void 0, !0)
|
|
87
87
|
], 6)), [
|
|
88
88
|
[U, r.value]
|
|
89
|
-
]) :
|
|
89
|
+
]) : z("", !0),
|
|
90
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: x({ ...v, zIndex:
|
|
95
|
+
style: x({ ...v, zIndex: e.value - 1 })
|
|
96
96
|
}, null, 4)), [
|
|
97
97
|
[U, r.value]
|
|
98
|
-
]) :
|
|
98
|
+
]) : z("", !0)
|
|
99
99
|
], 64));
|
|
100
100
|
}
|
|
101
|
-
}),
|
|
101
|
+
}), L = /* @__PURE__ */ g(ve, [["__scopeId", "data-v-dc2a4bc9"]]), _e = /* @__PURE__ */ T({
|
|
102
102
|
__name: "t-loading-icon",
|
|
103
103
|
props: {
|
|
104
104
|
size: {
|
|
@@ -110,13 +110,13 @@ const me = /* @__PURE__ */ g(de, [["render", fe]]), ve = /* @__PURE__ */ T({
|
|
|
110
110
|
default: "var(--t-color-text)"
|
|
111
111
|
}
|
|
112
112
|
},
|
|
113
|
-
setup(
|
|
113
|
+
setup(t) {
|
|
114
114
|
return (o, n) => (c(), m("span", {
|
|
115
115
|
class: "t-loading-icon",
|
|
116
116
|
style: x({
|
|
117
|
-
width:
|
|
118
|
-
height:
|
|
119
|
-
borderTopColor:
|
|
117
|
+
width: t.size,
|
|
118
|
+
height: t.size,
|
|
119
|
+
borderTopColor: t.color
|
|
120
120
|
}),
|
|
121
121
|
role: "status",
|
|
122
122
|
"aria-label": "Loading..."
|
|
@@ -137,53 +137,53 @@ const me = /* @__PURE__ */ g(de, [["render", fe]]), ve = /* @__PURE__ */ T({
|
|
|
137
137
|
variant: { default: "default" },
|
|
138
138
|
activeBackground: { type: Boolean, default: !1 }
|
|
139
139
|
},
|
|
140
|
-
setup(
|
|
141
|
-
const o =
|
|
142
|
-
let
|
|
143
|
-
return o.variant == "default" && (o.color ? ["warning", "info", "danger", "primary", "secondary", "success"].includes(o.color) ?
|
|
140
|
+
setup(t) {
|
|
141
|
+
const o = t, n = S(() => {
|
|
142
|
+
let e;
|
|
143
|
+
return o.variant == "default" && (o.color ? ["warning", "info", "danger", "primary", "secondary", "success"].includes(o.color) ? e = {
|
|
144
144
|
"--border": "none",
|
|
145
145
|
"--color": "var(--t-color-status-" + o.color + "-text)",
|
|
146
146
|
"--background": "var(--t-color-status-" + o.color + ")"
|
|
147
|
-
} :
|
|
147
|
+
} : e = {
|
|
148
148
|
"--border": "none",
|
|
149
149
|
"--color": "var(--t-color-text)",
|
|
150
150
|
"--background": o.color
|
|
151
|
-
} :
|
|
151
|
+
} : e = {
|
|
152
152
|
"--border": "none",
|
|
153
153
|
"--color": "var(--t-color-text)",
|
|
154
154
|
"--background": "var(--t-color-surface)"
|
|
155
|
-
}), o.variant == "text" && (o.color ? ["warning", "info", "danger", "primary", "secondary", "success"].includes(o.color) ?
|
|
155
|
+
}), o.variant == "text" && (o.color ? ["warning", "info", "danger", "primary", "secondary", "success"].includes(o.color) ? e = {
|
|
156
156
|
"--border": "none",
|
|
157
157
|
"--color": "var(--t-color-status-" + o.color + ")",
|
|
158
158
|
"--background": "transparent"
|
|
159
|
-
} :
|
|
159
|
+
} : e = {
|
|
160
160
|
"--border": "none",
|
|
161
161
|
"--color": o.color,
|
|
162
162
|
"--background": "transparent"
|
|
163
|
-
} :
|
|
163
|
+
} : e = {
|
|
164
164
|
"--border": "none",
|
|
165
165
|
"--color": "var(--t-color-text)",
|
|
166
166
|
"--background": "transparent"
|
|
167
|
-
}), o.variant == "outline" && (o.color ? ["warning", "info", "danger", "primary", "secondary", "success"].includes(o.color) ?
|
|
167
|
+
}), o.variant == "outline" && (o.color ? ["warning", "info", "danger", "primary", "secondary", "success"].includes(o.color) ? e = {
|
|
168
168
|
"--border": "0.55px solid var(--t-color-status-" + o.color + ")",
|
|
169
169
|
"--color": "var(--t-color-status-" + o.color + ")",
|
|
170
170
|
"--background": "transparent"
|
|
171
|
-
} :
|
|
171
|
+
} : e = {
|
|
172
172
|
"--border": "0.55px solid " + o.color,
|
|
173
173
|
"--color": o.color,
|
|
174
174
|
"--background": "transparent"
|
|
175
|
-
} :
|
|
175
|
+
} : e = {
|
|
176
176
|
"--border": "0.55px solid var(--t-color-text)",
|
|
177
177
|
"--color": "var(--t-color-text)",
|
|
178
178
|
"--background": "transparent"
|
|
179
|
-
}),
|
|
179
|
+
}), e;
|
|
180
180
|
});
|
|
181
|
-
return (
|
|
181
|
+
return (e, r) => (c(), m("button", {
|
|
182
182
|
class: I(["t-button", { "active-background": o.activeBackground, rounded: o.rounded, block: o.block, ["size-" + o.size]: !0 }]),
|
|
183
183
|
style: x(n.value)
|
|
184
184
|
}, [
|
|
185
185
|
Y(k("span", null, [
|
|
186
|
-
h(
|
|
186
|
+
h(e.$slots, "default", {}, void 0, !0)
|
|
187
187
|
], 512), [
|
|
188
188
|
[U, !o.loading]
|
|
189
189
|
]),
|
|
@@ -192,7 +192,7 @@ const me = /* @__PURE__ */ g(de, [["render", fe]]), ve = /* @__PURE__ */ T({
|
|
|
192
192
|
color: "var(--color)",
|
|
193
193
|
type: o.loadingType
|
|
194
194
|
}, null, 8, ["type"])
|
|
195
|
-
])) :
|
|
195
|
+
])) : z("", !0)
|
|
196
196
|
], 6));
|
|
197
197
|
}
|
|
198
198
|
}), M = /* @__PURE__ */ g(ge, [["__scopeId", "data-v-07bf1b8d"]]), be = {
|
|
@@ -206,8 +206,8 @@ const me = /* @__PURE__ */ g(de, [["render", fe]]), ve = /* @__PURE__ */ T({
|
|
|
206
206
|
actions: {}
|
|
207
207
|
},
|
|
208
208
|
emits: ["close"],
|
|
209
|
-
setup(
|
|
210
|
-
const
|
|
209
|
+
setup(t, { expose: o, emit: n }) {
|
|
210
|
+
const e = t, r = _(!1), a = n, l = _();
|
|
211
211
|
let i;
|
|
212
212
|
const y = _(!1), p = () => {
|
|
213
213
|
r.value = !0;
|
|
@@ -223,12 +223,12 @@ const me = /* @__PURE__ */ g(de, [["render", fe]]), ve = /* @__PURE__ */ T({
|
|
|
223
223
|
}), D(() => l.value, (s) => {
|
|
224
224
|
s && (i = N(l.value, {
|
|
225
225
|
beforeEvent(d) {
|
|
226
|
-
return d.stopPropagation(), O(d.target) || (d.preventDefault(),
|
|
226
|
+
return d.stopPropagation(), O(d.target) || (d.preventDefault(), X()), !1;
|
|
227
227
|
}
|
|
228
228
|
}));
|
|
229
229
|
}), A(() => {
|
|
230
230
|
i && i.destroy();
|
|
231
|
-
}), (s, d) => (c(),
|
|
231
|
+
}), (s, d) => (c(), E(L, {
|
|
232
232
|
placement: "center",
|
|
233
233
|
backdrop: !0,
|
|
234
234
|
keepalive: !1,
|
|
@@ -242,20 +242,20 @@ const me = /* @__PURE__ */ g(de, [["render", fe]]), ve = /* @__PURE__ */ T({
|
|
|
242
242
|
ref: l
|
|
243
243
|
}, [
|
|
244
244
|
h(s.$slots, "header", {}, () => [
|
|
245
|
-
|
|
245
|
+
e.title ? (c(), m("div", be, C(e.title), 1)) : z("", !0)
|
|
246
246
|
], !0),
|
|
247
247
|
h(s.$slots, "content", {}, () => [
|
|
248
|
-
k("div", he, C(
|
|
248
|
+
k("div", he, C(e.message), 1)
|
|
249
249
|
], !0),
|
|
250
250
|
h(s.$slots, "footer", {}, () => [
|
|
251
251
|
k("div", ke, [
|
|
252
|
-
(c(!0), m(V, null, W(
|
|
252
|
+
(c(!0), m(V, null, W(e.actions, (b) => (c(), E(M, {
|
|
253
253
|
color: b.color,
|
|
254
254
|
variant: b.variant,
|
|
255
255
|
onClick: (u) => v(b)
|
|
256
256
|
}, {
|
|
257
257
|
default: P(() => [
|
|
258
|
-
|
|
258
|
+
q(C(b.text), 1)
|
|
259
259
|
]),
|
|
260
260
|
_: 2
|
|
261
261
|
}, 1032, ["color", "variant", "onClick"]))), 256))
|
|
@@ -266,27 +266,27 @@ const me = /* @__PURE__ */ g(de, [["render", fe]]), ve = /* @__PURE__ */ T({
|
|
|
266
266
|
_: 3
|
|
267
267
|
}, 8, ["visible"]));
|
|
268
268
|
}
|
|
269
|
-
}), ne = /* @__PURE__ */ g($e, [["__scopeId", "data-v-5b4773ce"]]), Vt = (
|
|
269
|
+
}), ne = /* @__PURE__ */ g($e, [["__scopeId", "data-v-5b4773ce"]]), Vt = (t = {}) => ({
|
|
270
270
|
open() {
|
|
271
271
|
return new Promise((o) => {
|
|
272
272
|
let n = document.body.querySelector(".t-app");
|
|
273
273
|
if (!n) return;
|
|
274
|
-
const
|
|
275
|
-
n.appendChild(
|
|
274
|
+
const e = document.createElement("div"), r = _();
|
|
275
|
+
n.appendChild(e);
|
|
276
276
|
const a = F({
|
|
277
277
|
render() {
|
|
278
278
|
return G(ne, {
|
|
279
|
-
...
|
|
279
|
+
...t,
|
|
280
280
|
ref: r,
|
|
281
281
|
onClose: (l) => {
|
|
282
282
|
setTimeout(() => {
|
|
283
|
-
a.unmount(),
|
|
283
|
+
a.unmount(), e.remove();
|
|
284
284
|
}, 300), o(l);
|
|
285
285
|
}
|
|
286
286
|
});
|
|
287
287
|
}
|
|
288
288
|
});
|
|
289
|
-
a.mount(
|
|
289
|
+
a.mount(e), setTimeout(() => {
|
|
290
290
|
r.value?.open?.();
|
|
291
291
|
}, 50);
|
|
292
292
|
});
|
|
@@ -297,8 +297,8 @@ const me = /* @__PURE__ */ g(de, [["render", fe]]), ve = /* @__PURE__ */ T({
|
|
|
297
297
|
actions: {}
|
|
298
298
|
},
|
|
299
299
|
emits: ["close"],
|
|
300
|
-
setup(
|
|
301
|
-
const
|
|
300
|
+
setup(t, { expose: o, emit: n }) {
|
|
301
|
+
const e = t, r = _(!1), a = n, l = _();
|
|
302
302
|
let i;
|
|
303
303
|
const y = _(!1), p = () => {
|
|
304
304
|
r.value = !0;
|
|
@@ -314,12 +314,12 @@ const me = /* @__PURE__ */ g(de, [["render", fe]]), ve = /* @__PURE__ */ T({
|
|
|
314
314
|
}), D(() => l.value, (s) => {
|
|
315
315
|
s && (i = N(l.value, {
|
|
316
316
|
beforeEvent(d) {
|
|
317
|
-
return d.stopPropagation(), O(d.target) || (d.preventDefault(),
|
|
317
|
+
return d.stopPropagation(), O(d.target) || (d.preventDefault(), X()), !1;
|
|
318
318
|
}
|
|
319
319
|
}));
|
|
320
320
|
}), A(() => {
|
|
321
321
|
i && i.destroy();
|
|
322
|
-
}), (s, d) => (c(),
|
|
322
|
+
}), (s, d) => (c(), E(L, {
|
|
323
323
|
placement: "bottom",
|
|
324
324
|
backdrop: !0,
|
|
325
325
|
keepalive: !1,
|
|
@@ -332,8 +332,8 @@ const me = /* @__PURE__ */ g(de, [["render", fe]]), ve = /* @__PURE__ */ T({
|
|
|
332
332
|
ref_key: "container",
|
|
333
333
|
ref: l
|
|
334
334
|
}, [
|
|
335
|
-
(c(!0), m(V, null, W(
|
|
336
|
-
(c(!0), m(V, null, W(b, (u) => (c(),
|
|
335
|
+
(c(!0), m(V, null, W(e.actions, (b) => (c(), m("div", null, [
|
|
336
|
+
(c(!0), m(V, null, W(b, (u) => (c(), E(M, {
|
|
337
337
|
color: u.color,
|
|
338
338
|
size: u.size,
|
|
339
339
|
variant: u.variant,
|
|
@@ -341,7 +341,7 @@ const me = /* @__PURE__ */ g(de, [["render", fe]]), ve = /* @__PURE__ */ T({
|
|
|
341
341
|
block: ""
|
|
342
342
|
}, {
|
|
343
343
|
default: P(() => [
|
|
344
|
-
|
|
344
|
+
q(C(u.text), 1)
|
|
345
345
|
]),
|
|
346
346
|
_: 2
|
|
347
347
|
}, 1032, ["color", "size", "variant", "onClick"]))), 256))
|
|
@@ -351,27 +351,27 @@ const me = /* @__PURE__ */ g(de, [["render", fe]]), ve = /* @__PURE__ */ T({
|
|
|
351
351
|
_: 1
|
|
352
352
|
}, 8, ["visible"]));
|
|
353
353
|
}
|
|
354
|
-
}), we = /* @__PURE__ */ g(Te, [["__scopeId", "data-v-42000b04"]]), At = (
|
|
354
|
+
}), we = /* @__PURE__ */ g(Te, [["__scopeId", "data-v-42000b04"]]), At = (t = {}) => ({
|
|
355
355
|
open() {
|
|
356
356
|
return new Promise((o) => {
|
|
357
357
|
let n = document.body.querySelector(".t-app");
|
|
358
358
|
if (!n) return;
|
|
359
|
-
const
|
|
360
|
-
n.appendChild(
|
|
359
|
+
const e = document.createElement("div"), r = _();
|
|
360
|
+
n.appendChild(e);
|
|
361
361
|
const a = F({
|
|
362
362
|
render() {
|
|
363
363
|
return G(we, {
|
|
364
|
-
...
|
|
364
|
+
...t,
|
|
365
365
|
ref: r,
|
|
366
366
|
onClose: (l) => {
|
|
367
367
|
setTimeout(() => {
|
|
368
|
-
a.unmount(),
|
|
368
|
+
a.unmount(), e.remove();
|
|
369
369
|
}, 300), o(l);
|
|
370
370
|
}
|
|
371
371
|
});
|
|
372
372
|
}
|
|
373
373
|
});
|
|
374
|
-
a.mount(
|
|
374
|
+
a.mount(e), setTimeout(() => {
|
|
375
375
|
r.value?.open?.();
|
|
376
376
|
}, 50);
|
|
377
377
|
});
|
|
@@ -382,8 +382,8 @@ const me = /* @__PURE__ */ g(de, [["render", fe]]), ve = /* @__PURE__ */ T({
|
|
|
382
382
|
type: { default: "spinner" }
|
|
383
383
|
},
|
|
384
384
|
emits: ["close"],
|
|
385
|
-
setup(
|
|
386
|
-
const
|
|
385
|
+
setup(t, { expose: o, emit: n }) {
|
|
386
|
+
const e = t, r = _(!1), a = _();
|
|
387
387
|
let l;
|
|
388
388
|
return o({
|
|
389
389
|
open: () => {
|
|
@@ -395,12 +395,12 @@ const me = /* @__PURE__ */ g(de, [["render", fe]]), ve = /* @__PURE__ */ T({
|
|
|
395
395
|
}), D(() => a.value, (p) => {
|
|
396
396
|
p && (l = N(a.value, {
|
|
397
397
|
beforeEvent(v) {
|
|
398
|
-
return v.stopPropagation(), O(v.target) || (v.preventDefault(),
|
|
398
|
+
return v.stopPropagation(), O(v.target) || (v.preventDefault(), X()), !1;
|
|
399
399
|
}
|
|
400
400
|
}));
|
|
401
401
|
}), A(() => {
|
|
402
402
|
l && l.destroy();
|
|
403
|
-
}), (p, v) => (c(),
|
|
403
|
+
}), (p, v) => (c(), E(L, {
|
|
404
404
|
placement: "center",
|
|
405
405
|
backdrop: !0,
|
|
406
406
|
keepalive: !1,
|
|
@@ -414,7 +414,7 @@ const me = /* @__PURE__ */ g(de, [["render", fe]]), ve = /* @__PURE__ */ T({
|
|
|
414
414
|
}, [
|
|
415
415
|
h(p.$slots, "default", {}, () => [
|
|
416
416
|
ee(K, {
|
|
417
|
-
type:
|
|
417
|
+
type: e.type
|
|
418
418
|
}, null, 8, ["type"])
|
|
419
419
|
], !0)
|
|
420
420
|
], 512)
|
|
@@ -422,20 +422,20 @@ const me = /* @__PURE__ */ g(de, [["render", fe]]), ve = /* @__PURE__ */ T({
|
|
|
422
422
|
_: 3
|
|
423
423
|
}, 8, ["visible"]));
|
|
424
424
|
}
|
|
425
|
-
}), Ie = /* @__PURE__ */ g(xe, [["__scopeId", "data-v-96624ceb"]]), Ot = (
|
|
425
|
+
}), Ie = /* @__PURE__ */ g(xe, [["__scopeId", "data-v-96624ceb"]]), Ot = (t = {}) => {
|
|
426
426
|
const o = _(), n = document.body.querySelector(".t-app");
|
|
427
|
-
let
|
|
427
|
+
let e = null, r = null;
|
|
428
428
|
return {
|
|
429
429
|
open() {
|
|
430
430
|
return new Promise((a) => {
|
|
431
|
-
n && (r = document.createElement("div"), n.appendChild(r),
|
|
431
|
+
n && (r = document.createElement("div"), n.appendChild(r), e = F({
|
|
432
432
|
render() {
|
|
433
433
|
return G(Ie, {
|
|
434
|
-
...
|
|
434
|
+
...t,
|
|
435
435
|
ref: o
|
|
436
436
|
});
|
|
437
437
|
}
|
|
438
|
-
}),
|
|
438
|
+
}), e.mount(r), setTimeout(() => {
|
|
439
439
|
o.value?.open?.(), a(!0);
|
|
440
440
|
}, 50));
|
|
441
441
|
});
|
|
@@ -443,7 +443,7 @@ const me = /* @__PURE__ */ g(de, [["render", fe]]), ve = /* @__PURE__ */ T({
|
|
|
443
443
|
close() {
|
|
444
444
|
return new Promise((a) => {
|
|
445
445
|
o.value?.close?.(), setTimeout(() => {
|
|
446
|
-
|
|
446
|
+
e?.unmount?.(), r?.remove?.(), a(!0);
|
|
447
447
|
}, 300);
|
|
448
448
|
});
|
|
449
449
|
}
|
|
@@ -452,14 +452,14 @@ const me = /* @__PURE__ */ g(de, [["render", fe]]), ve = /* @__PURE__ */ T({
|
|
|
452
452
|
getNewIndex() {
|
|
453
453
|
return J.value += 2, J.value;
|
|
454
454
|
}
|
|
455
|
-
}, B = Z([]),
|
|
456
|
-
B.push(
|
|
457
|
-
},
|
|
458
|
-
|
|
455
|
+
}, B = Z([]), ze = (t) => {
|
|
456
|
+
B.push(t);
|
|
457
|
+
}, Ee = (t) => {
|
|
458
|
+
t || B.pop();
|
|
459
459
|
}, $ = {
|
|
460
460
|
screens: B,
|
|
461
|
-
addScreen:
|
|
462
|
-
removeScreen:
|
|
461
|
+
addScreen: ze,
|
|
462
|
+
removeScreen: Ee,
|
|
463
463
|
hasPrevious: S(() => B.length > 1),
|
|
464
464
|
currentScreen: S(() => B[B.length - 1]),
|
|
465
465
|
lastScreen: S(() => {
|
|
@@ -477,50 +477,50 @@ const me = /* @__PURE__ */ g(de, [["render", fe]]), ve = /* @__PURE__ */ T({
|
|
|
477
477
|
variant: { default: "default" }
|
|
478
478
|
},
|
|
479
479
|
emits: ["close"],
|
|
480
|
-
setup(
|
|
481
|
-
const
|
|
480
|
+
setup(t, { expose: o, emit: n }) {
|
|
481
|
+
const e = t, r = n, a = _(!1), l = _(!1), i = _(!1), y = () => {
|
|
482
482
|
l.value = !0, i.value = !1, setTimeout(() => {
|
|
483
483
|
a.value = !0;
|
|
484
484
|
}, 10), setTimeout(() => {
|
|
485
485
|
p();
|
|
486
|
-
},
|
|
486
|
+
}, e.duration + 10);
|
|
487
487
|
}, p = () => {
|
|
488
488
|
i.value = !0, setTimeout(() => {
|
|
489
489
|
l.value = !1, a.value = !1, r("close");
|
|
490
490
|
}, 300);
|
|
491
491
|
}, v = S(() => {
|
|
492
492
|
let f;
|
|
493
|
-
return
|
|
493
|
+
return e.variant == "default" && (e.color ? ["warning", "info", "danger", "primary", "secondary", "success"].includes(e.color) ? f = {
|
|
494
494
|
"--border": "none",
|
|
495
|
-
"--color": "var(--t-color-status-" +
|
|
496
|
-
"--background": "rgba(var(--t-color-status-" +
|
|
495
|
+
"--color": "var(--t-color-status-" + e.color + "-text)",
|
|
496
|
+
"--background": "rgba(var(--t-color-status-" + e.color + "-rgb), 0.6)"
|
|
497
497
|
} : f = {
|
|
498
498
|
"--border": "none",
|
|
499
499
|
"--color": "var(--t-color-text)",
|
|
500
|
-
"--background":
|
|
500
|
+
"--background": e.color
|
|
501
501
|
} : f = {
|
|
502
502
|
"--border": "none",
|
|
503
503
|
"--color": "var(--t-color-text)",
|
|
504
504
|
"--background": "rgba(var(--t-color-surface-rgb), 0.6)"
|
|
505
|
-
}),
|
|
505
|
+
}), e.variant == "text" && (e.color ? ["warning", "info", "danger", "primary", "secondary", "success"].includes(e.color) ? f = {
|
|
506
506
|
"--border": "none",
|
|
507
|
-
"--color": "var(--t-color-status-" +
|
|
507
|
+
"--color": "var(--t-color-status-" + e.color + ")",
|
|
508
508
|
"--background": "transparent"
|
|
509
509
|
} : f = {
|
|
510
510
|
"--border": "none",
|
|
511
|
-
"--color":
|
|
511
|
+
"--color": e.color,
|
|
512
512
|
"--background": "transparent"
|
|
513
513
|
} : f = {
|
|
514
514
|
"--border": "none",
|
|
515
515
|
"--color": "var(--t-color-text)",
|
|
516
516
|
"--background": "transparent"
|
|
517
|
-
}),
|
|
518
|
-
"--border": "0.55px solid var(--t-color-status-" +
|
|
519
|
-
"--color": "var(--t-color-status-" +
|
|
517
|
+
}), e.variant == "outline" && (e.color ? ["warning", "info", "danger", "primary", "secondary", "success"].includes(e.color) ? f = {
|
|
518
|
+
"--border": "0.55px solid var(--t-color-status-" + e.color + ")",
|
|
519
|
+
"--color": "var(--t-color-status-" + e.color + ")",
|
|
520
520
|
"--background": "transparent"
|
|
521
521
|
} : f = {
|
|
522
|
-
"--border": "0.55px solid " +
|
|
523
|
-
"--color":
|
|
522
|
+
"--border": "0.55px solid " + e.color,
|
|
523
|
+
"--color": e.color,
|
|
524
524
|
"--background": "transparent"
|
|
525
525
|
} : f = {
|
|
526
526
|
"--border": "0.55px solid var(--t-color-text)",
|
|
@@ -532,21 +532,21 @@ const me = /* @__PURE__ */ g(de, [["render", fe]]), ve = /* @__PURE__ */ T({
|
|
|
532
532
|
open: y
|
|
533
533
|
}), (f, s) => l.value ? (c(), m("div", {
|
|
534
534
|
key: 0,
|
|
535
|
-
class: I(["t-toast", { [
|
|
536
|
-
style: x({ "--space":
|
|
537
|
-
}, C(
|
|
535
|
+
class: I(["t-toast", { [e.placement]: !0, open: a.value, closing: i.value }]),
|
|
536
|
+
style: x({ "--space": e.space, ...v.value })
|
|
537
|
+
}, C(e.message), 7)) : z("", !0);
|
|
538
538
|
}
|
|
539
|
-
}), re = /* @__PURE__ */ g(Be, [["__scopeId", "data-v-5159a3c5"]]),
|
|
539
|
+
}), re = /* @__PURE__ */ g(Be, [["__scopeId", "data-v-5159a3c5"]]), Xt = (t = {}) => ({
|
|
540
540
|
open() {
|
|
541
541
|
let o = document.body.querySelector(".t-app");
|
|
542
542
|
if (!o) return;
|
|
543
|
-
const n = document.createElement("div"),
|
|
543
|
+
const n = document.createElement("div"), e = _();
|
|
544
544
|
o.appendChild(n);
|
|
545
545
|
const r = F({
|
|
546
546
|
render() {
|
|
547
547
|
return G(re, {
|
|
548
|
-
...
|
|
549
|
-
ref:
|
|
548
|
+
...t,
|
|
549
|
+
ref: e,
|
|
550
550
|
onClose: () => {
|
|
551
551
|
setTimeout(() => {
|
|
552
552
|
r.unmount(), n.remove();
|
|
@@ -556,7 +556,7 @@ const me = /* @__PURE__ */ g(de, [["render", fe]]), ve = /* @__PURE__ */ T({
|
|
|
556
556
|
}
|
|
557
557
|
});
|
|
558
558
|
r.mount(n), setTimeout(() => {
|
|
559
|
-
|
|
559
|
+
e.value?.open?.();
|
|
560
560
|
}, 50);
|
|
561
561
|
}
|
|
562
562
|
}), Ce = _(0);
|
|
@@ -571,13 +571,13 @@ const De = /* @__PURE__ */ T({
|
|
|
571
571
|
keyboard: { type: Boolean, default: !0 },
|
|
572
572
|
placement: { default: "bottom" }
|
|
573
573
|
},
|
|
574
|
-
setup(
|
|
575
|
-
const o =
|
|
576
|
-
return (
|
|
574
|
+
setup(t) {
|
|
575
|
+
const o = t, { height: n } = Pe();
|
|
576
|
+
return (e, r) => (c(), m("div", {
|
|
577
577
|
class: I(["t-cable", { keyboard: o.keyboard && R(n) > 0, [o.placement]: !0 }]),
|
|
578
578
|
style: x({ "--t-keyboard-height": R(n) + "px", "--t-keyboard-transition": R(n) > 0 ? "0.3s" : "0.1s" })
|
|
579
579
|
}, [
|
|
580
|
-
h(
|
|
580
|
+
h(e.$slots, "default", {}, void 0, !0)
|
|
581
581
|
], 6));
|
|
582
582
|
}
|
|
583
583
|
}), Re = /* @__PURE__ */ g(De, [["__scopeId", "data-v-ecb72421"]]), Ne = /* @__PURE__ */ T({
|
|
@@ -585,42 +585,42 @@ const De = /* @__PURE__ */ T({
|
|
|
585
585
|
props: {
|
|
586
586
|
color: { default: null }
|
|
587
587
|
},
|
|
588
|
-
setup(
|
|
589
|
-
const o =
|
|
590
|
-
let
|
|
591
|
-
return o.color ? ["warning", "info", "danger", "primary", "secondary", "success"].includes(o.color) ?
|
|
588
|
+
setup(t) {
|
|
589
|
+
const o = t, n = S(() => {
|
|
590
|
+
let e;
|
|
591
|
+
return o.color ? ["warning", "info", "danger", "primary", "secondary", "success"].includes(o.color) ? e = {
|
|
592
592
|
"--background": "var(--t-color-status-" + o.color + ")"
|
|
593
|
-
} :
|
|
593
|
+
} : e = {
|
|
594
594
|
"--background": o.color
|
|
595
|
-
} :
|
|
595
|
+
} : e = {
|
|
596
596
|
"--background": "var(--t-color-surface)"
|
|
597
|
-
},
|
|
597
|
+
}, e;
|
|
598
598
|
});
|
|
599
|
-
return (
|
|
599
|
+
return (e, r) => (c(), m("div", {
|
|
600
600
|
class: "t-card",
|
|
601
601
|
style: x(n.value)
|
|
602
602
|
}, [
|
|
603
|
-
h(
|
|
603
|
+
h(e.$slots, "default")
|
|
604
604
|
], 4));
|
|
605
605
|
}
|
|
606
606
|
}), Ve = {}, Ae = { class: "t-content" };
|
|
607
|
-
function Oe(
|
|
607
|
+
function Oe(t, o) {
|
|
608
608
|
return c(), m("div", Ae, [
|
|
609
|
-
h(
|
|
609
|
+
h(t.$slots, "default", {}, void 0, !0)
|
|
610
610
|
]);
|
|
611
611
|
}
|
|
612
|
-
const
|
|
612
|
+
const Xe = /* @__PURE__ */ g(Ve, [["render", Oe], ["__scopeId", "data-v-9a833657"]]), Q = 80, qe = /* @__PURE__ */ T({
|
|
613
613
|
__name: "t-refresher",
|
|
614
614
|
emits: ["refresh"],
|
|
615
|
-
setup(
|
|
616
|
-
const n = o,
|
|
615
|
+
setup(t, { emit: o }) {
|
|
616
|
+
const n = o, e = _(0), r = _(!1), a = _();
|
|
617
617
|
let l, i = !1;
|
|
618
618
|
const y = () => {
|
|
619
|
-
r.value = !1,
|
|
619
|
+
r.value = !1, e.value = 0, l && l.cancel(), setTimeout(() => {
|
|
620
620
|
i = !1;
|
|
621
621
|
}, 2e3);
|
|
622
622
|
}, p = () => {
|
|
623
|
-
i = !0, r.value = !0,
|
|
623
|
+
i = !0, r.value = !0, e.value = Q, n("refresh", y);
|
|
624
624
|
};
|
|
625
625
|
return D(() => a.value, () => {
|
|
626
626
|
l && l.destroy();
|
|
@@ -630,13 +630,13 @@ const Le = /* @__PURE__ */ g(Ve, [["render", Oe], ["__scopeId", "data-v-9a833657
|
|
|
630
630
|
minDist: 60
|
|
631
631
|
},
|
|
632
632
|
move({ dy: f }) {
|
|
633
|
-
r.value || i || f < 0 || (f >= 120 ? p() :
|
|
633
|
+
r.value || i || f < 0 || (f >= 120 ? p() : e.value = f);
|
|
634
634
|
},
|
|
635
635
|
up({ dy: f }) {
|
|
636
|
-
r.value || i || (f > Q ? p() :
|
|
636
|
+
r.value || i || (f > Q ? p() : e.value = 0);
|
|
637
637
|
},
|
|
638
638
|
cancel() {
|
|
639
|
-
r.value = !1,
|
|
639
|
+
r.value = !1, e.value = 0;
|
|
640
640
|
}
|
|
641
641
|
}));
|
|
642
642
|
}), A(() => {
|
|
@@ -645,7 +645,7 @@ const Le = /* @__PURE__ */ g(Ve, [["render", Oe], ["__scopeId", "data-v-9a833657
|
|
|
645
645
|
class: "t-refresher",
|
|
646
646
|
ref_key: "container",
|
|
647
647
|
ref: a,
|
|
648
|
-
style: x({ height: `${
|
|
648
|
+
style: x({ height: `${e.value}px` })
|
|
649
649
|
}, [
|
|
650
650
|
k("img", {
|
|
651
651
|
class: I({ spiner: r.value }),
|
|
@@ -654,21 +654,21 @@ const Le = /* @__PURE__ */ g(Ve, [["render", Oe], ["__scopeId", "data-v-9a833657
|
|
|
654
654
|
style: { width: "22px", height: "22px" }
|
|
655
655
|
}, null, 2)
|
|
656
656
|
], 4)), [
|
|
657
|
-
[U,
|
|
657
|
+
[U, e.value > 0]
|
|
658
658
|
]);
|
|
659
659
|
}
|
|
660
|
-
}),
|
|
661
|
-
function We(
|
|
660
|
+
}), Le = /* @__PURE__ */ g(qe, [["__scopeId", "data-v-688c5394"]]), Ye = {}, Ue = { class: "t-screen" };
|
|
661
|
+
function We(t, o) {
|
|
662
662
|
return c(), m("div", Ue, [
|
|
663
|
-
h(
|
|
663
|
+
h(t.$slots, "default", {}, void 0, !0)
|
|
664
664
|
]);
|
|
665
665
|
}
|
|
666
666
|
const se = /* @__PURE__ */ g(Ye, [["render", We], ["__scopeId", "data-v-66ea8649"]]), Fe = /* @__PURE__ */ T({
|
|
667
667
|
__name: "t-swipe-screen",
|
|
668
668
|
emits: ["change"],
|
|
669
|
-
setup(
|
|
669
|
+
setup(t, { emit: o }) {
|
|
670
670
|
let n = {};
|
|
671
|
-
const
|
|
671
|
+
const e = oe(), r = ie(), a = e.getRoutes(), l = _(!1), i = o;
|
|
672
672
|
for (let s of a)
|
|
673
673
|
n[s.name] = s.components;
|
|
674
674
|
const y = (s) => {
|
|
@@ -708,7 +708,7 @@ const se = /* @__PURE__ */ g(Ye, [["render", We], ["__scopeId", "data-v-66ea8649
|
|
|
708
708
|
(s.type == "pointerup" || s.type == "pointercancel") && (this.pointerId = null);
|
|
709
709
|
},
|
|
710
710
|
fast({ d: s }) {
|
|
711
|
-
s == "right" &&
|
|
711
|
+
s == "right" && e.back();
|
|
712
712
|
},
|
|
713
713
|
move({ dx: s }) {
|
|
714
714
|
const d = window.innerWidth, b = s / d * 100, u = $.currentScreen.value.target, w = $.lastScreen?.value?.target;
|
|
@@ -719,21 +719,21 @@ const se = /* @__PURE__ */ g(Ye, [["render", We], ["__scopeId", "data-v-66ea8649
|
|
|
719
719
|
},
|
|
720
720
|
up({ dx: s }) {
|
|
721
721
|
const d = window.innerWidth;
|
|
722
|
-
s / d * 100 >= 50 ?
|
|
722
|
+
s / d * 100 >= 50 ? e.back() : f();
|
|
723
723
|
},
|
|
724
724
|
cancel() {
|
|
725
725
|
f();
|
|
726
726
|
}
|
|
727
727
|
});
|
|
728
728
|
}), (s, d) => (c(), m(V, null, [
|
|
729
|
-
(c(!0), m(V, null, W(R($).screens, (b, u) => (c(),
|
|
729
|
+
(c(!0), m(V, null, W(R($).screens, (b, u) => (c(), E(se, {
|
|
730
730
|
ref_for: !0,
|
|
731
731
|
ref: (w) => p(u, w),
|
|
732
732
|
style: x({ zIndex: u + (u == R($).screens.length - 1 ? 2 : 1) }),
|
|
733
733
|
key: u
|
|
734
734
|
}, {
|
|
735
735
|
default: P(() => [
|
|
736
|
-
(c(),
|
|
736
|
+
(c(), E(le(b.component.default)))
|
|
737
737
|
]),
|
|
738
738
|
_: 2
|
|
739
739
|
}, 1032, ["style"]))), 128)),
|
|
@@ -749,9 +749,9 @@ const se = /* @__PURE__ */ g(Ye, [["render", We], ["__scopeId", "data-v-66ea8649
|
|
|
749
749
|
placement: { default: "bottom" },
|
|
750
750
|
size: { default: "50px" }
|
|
751
751
|
},
|
|
752
|
-
setup(
|
|
753
|
-
const o =
|
|
754
|
-
return (n,
|
|
752
|
+
setup(t) {
|
|
753
|
+
const o = t;
|
|
754
|
+
return (n, e) => (c(), m("div", {
|
|
755
755
|
class: I(["t-toolbar", { [o.placement]: !0 }]),
|
|
756
756
|
style: x({ "--t-size-toolbar": o.size })
|
|
757
757
|
}, [
|
|
@@ -765,19 +765,19 @@ const se = /* @__PURE__ */ g(Ye, [["render", We], ["__scopeId", "data-v-66ea8649
|
|
|
765
765
|
props: {
|
|
766
766
|
to: {}
|
|
767
767
|
},
|
|
768
|
-
setup(
|
|
769
|
-
const o = oe(), n =
|
|
768
|
+
setup(t) {
|
|
769
|
+
const o = oe(), n = t, e = () => {
|
|
770
770
|
$.hasPrevious.value ? o?.back?.() : n.to && o?.push?.(n.to);
|
|
771
771
|
};
|
|
772
772
|
return (r, a) => r.to || R($).hasPrevious ? (c(), m("button", {
|
|
773
773
|
key: 0,
|
|
774
774
|
class: "t-back-button",
|
|
775
|
-
onClick:
|
|
775
|
+
onClick: e
|
|
776
776
|
}, [
|
|
777
777
|
h(r.$slots, "default", {}, () => [
|
|
778
778
|
a[0] || (a[0] = k("i", { class: "ri-arrow-left-s-line" }, null, -1))
|
|
779
779
|
], !0)
|
|
780
|
-
])) :
|
|
780
|
+
])) : z("", !0);
|
|
781
781
|
}
|
|
782
782
|
}), Me = /* @__PURE__ */ g(Ke, [["__scopeId", "data-v-ed626a3d"]]), Je = /* @__PURE__ */ T({
|
|
783
783
|
__name: "t-text",
|
|
@@ -785,19 +785,19 @@ const se = /* @__PURE__ */ g(Ye, [["render", We], ["__scopeId", "data-v-66ea8649
|
|
|
785
785
|
color: { default: "var(--t-color-text)" },
|
|
786
786
|
size: { default: "standard" }
|
|
787
787
|
},
|
|
788
|
-
setup(
|
|
789
|
-
const o =
|
|
790
|
-
let
|
|
791
|
-
return o.size == "standard" ?
|
|
788
|
+
setup(t) {
|
|
789
|
+
const o = t, n = S(() => {
|
|
790
|
+
let e, r = o.color;
|
|
791
|
+
return o.size == "standard" ? e = "var(--t-fs-10)" : o.size == "small" ? e = "var(--t-fs-08)" : o.size == "large" ? e = "var(--t-fs-12)" : e = o.size, ["warning", "info", "danger", "primary", "secondary", "success"].includes(o.color) && (r = `var(--t-color-status-${o.color})`), {
|
|
792
792
|
"--color": r,
|
|
793
|
-
"--font-size":
|
|
793
|
+
"--font-size": e
|
|
794
794
|
};
|
|
795
795
|
});
|
|
796
|
-
return (
|
|
796
|
+
return (e, r) => (c(), m("span", {
|
|
797
797
|
class: "t-text",
|
|
798
798
|
style: x(n.value)
|
|
799
799
|
}, [
|
|
800
|
-
h(
|
|
800
|
+
h(e.$slots, "default", {}, void 0, !0)
|
|
801
801
|
], 4));
|
|
802
802
|
}
|
|
803
803
|
}), j = /* @__PURE__ */ g(Je, [["__scopeId", "data-v-f0f94f05"]]), Qe = /* @__PURE__ */ T({
|
|
@@ -805,7 +805,7 @@ const se = /* @__PURE__ */ g(Ye, [["render", We], ["__scopeId", "data-v-66ea8649
|
|
|
805
805
|
props: {
|
|
806
806
|
placement: { default: "bottom" }
|
|
807
807
|
},
|
|
808
|
-
setup(
|
|
808
|
+
setup(t) {
|
|
809
809
|
return (o, n) => (c(), m("div", {
|
|
810
810
|
class: I(["t-pull-bar", { [o.placement]: !0 }])
|
|
811
811
|
}, null, 2));
|
|
@@ -825,8 +825,8 @@ const se = /* @__PURE__ */ g(Ye, [["render", We], ["__scopeId", "data-v-66ea8649
|
|
|
825
825
|
closeButton: { type: Boolean, default: !0 }
|
|
826
826
|
},
|
|
827
827
|
emits: ["dismiss"],
|
|
828
|
-
setup(
|
|
829
|
-
const n =
|
|
828
|
+
setup(t, { emit: o }) {
|
|
829
|
+
const n = t, e = o, r = _(), a = _(), l = _(!1);
|
|
830
830
|
let i = null;
|
|
831
831
|
const y = S(() => {
|
|
832
832
|
if (n.placement == "bottom") return "down";
|
|
@@ -834,7 +834,7 @@ const se = /* @__PURE__ */ g(Ye, [["render", We], ["__scopeId", "data-v-66ea8649
|
|
|
834
834
|
if (n.placement == "left") return "left";
|
|
835
835
|
if (n.placement == "right") return "right";
|
|
836
836
|
}), p = (f) => {
|
|
837
|
-
|
|
837
|
+
e("dismiss", f);
|
|
838
838
|
}, v = () => {
|
|
839
839
|
l.value = !0, setTimeout(() => {
|
|
840
840
|
l.value = !1;
|
|
@@ -848,13 +848,13 @@ const se = /* @__PURE__ */ g(Ye, [["render", We], ["__scopeId", "data-v-66ea8649
|
|
|
848
848
|
pointerId: null,
|
|
849
849
|
beforeEvent(s) {
|
|
850
850
|
let d = !1, b = !1;
|
|
851
|
-
return l.value || !n.gesture || n.placement == "center" ? d = !0 : this.pointerId ? (d = !0, b = this.pointerId == s.pointerId) : s.type == "pointerdown" && (this.pointerId = s.pointerId, d = !0, b = !0), d && (s.stopPropagation(), O(s.target) || (s.preventDefault(),
|
|
851
|
+
return l.value || !n.gesture || n.placement == "center" ? d = !0 : this.pointerId ? (d = !0, b = this.pointerId == s.pointerId) : s.type == "pointerdown" && (this.pointerId = s.pointerId, d = !0, b = !0), d && (s.stopPropagation(), O(s.target) || (s.preventDefault(), X())), b;
|
|
852
852
|
},
|
|
853
853
|
afterEvent(s) {
|
|
854
854
|
(s.type == "pointerup" || s.type == "pointercancel") && (this.pointerId = null);
|
|
855
855
|
},
|
|
856
856
|
fast({ d: s }) {
|
|
857
|
-
v(), s == y.value ?
|
|
857
|
+
v(), s == y.value ? e("dismiss", "gesture") : a.value.open();
|
|
858
858
|
},
|
|
859
859
|
move({ dy: s, dx: d, d: b }) {
|
|
860
860
|
if (b != y.value) return;
|
|
@@ -870,7 +870,7 @@ const se = /* @__PURE__ */ g(Ye, [["render", We], ["__scopeId", "data-v-66ea8649
|
|
|
870
870
|
return;
|
|
871
871
|
}
|
|
872
872
|
let u, w, H;
|
|
873
|
-
n.placement == "bottom" || n.placement == "top" ? (u = r.value.offsetHeight, H = s) : (u = r.value.offsetWidth, H = d), w = H / u * 100, w > 50 ?
|
|
873
|
+
n.placement == "bottom" || n.placement == "top" ? (u = r.value.offsetHeight, H = s) : (u = r.value.offsetWidth, H = d), w = H / u * 100, w > 50 ? e("dismiss", "gesture") : a.value.open();
|
|
874
874
|
},
|
|
875
875
|
cancel() {
|
|
876
876
|
v(), a.value.open();
|
|
@@ -878,7 +878,7 @@ const se = /* @__PURE__ */ g(Ye, [["render", We], ["__scopeId", "data-v-66ea8649
|
|
|
878
878
|
}));
|
|
879
879
|
}), A(() => {
|
|
880
880
|
i && i.destroy();
|
|
881
|
-
}), (f, s) => (c(),
|
|
881
|
+
}), (f, s) => (c(), E(L, {
|
|
882
882
|
ref_key: "present",
|
|
883
883
|
ref: a,
|
|
884
884
|
placement: n.placement,
|
|
@@ -888,10 +888,10 @@ const se = /* @__PURE__ */ g(Ye, [["render", We], ["__scopeId", "data-v-66ea8649
|
|
|
888
888
|
onDismiss: p
|
|
889
889
|
}, {
|
|
890
890
|
default: P(() => [
|
|
891
|
-
n.gesture && n.placement != "center" ? (c(),
|
|
891
|
+
n.gesture && n.placement != "center" ? (c(), E(ae, {
|
|
892
892
|
key: 0,
|
|
893
893
|
placement: n.placement
|
|
894
|
-
}, null, 8, ["placement"])) :
|
|
894
|
+
}, null, 8, ["placement"])) : z("", !0),
|
|
895
895
|
n.closeButton && n.placement == "center" ? (c(), m("button", {
|
|
896
896
|
key: 1,
|
|
897
897
|
class: "t-sheet-close",
|
|
@@ -900,7 +900,7 @@ const se = /* @__PURE__ */ g(Ye, [["render", We], ["__scopeId", "data-v-66ea8649
|
|
|
900
900
|
h(f.$slots, "close-icon", {}, () => [
|
|
901
901
|
s[1] || (s[1] = k("i", { class: "ri-close-large-line" }, null, -1))
|
|
902
902
|
], !0)
|
|
903
|
-
])) :
|
|
903
|
+
])) : z("", !0),
|
|
904
904
|
k("div", {
|
|
905
905
|
class: I(["t-sheet", { fullscreen: n.fullscreen, [n.placement]: !0, rounded: f.rounded, radius: n.radius }]),
|
|
906
906
|
style: x({ "--background": n.background }),
|
|
@@ -927,9 +927,9 @@ const se = /* @__PURE__ */ g(Ye, [["render", We], ["__scopeId", "data-v-66ea8649
|
|
|
927
927
|
variant: { default: "normal" }
|
|
928
928
|
},
|
|
929
929
|
emits: ["update:modelValue"],
|
|
930
|
-
setup(
|
|
931
|
-
const n =
|
|
932
|
-
|
|
930
|
+
setup(t, { emit: o }) {
|
|
931
|
+
const n = t, e = o, r = (a) => {
|
|
932
|
+
e("update:modelValue", a.target.value);
|
|
933
933
|
};
|
|
934
934
|
return (a, l) => (c(), m("div", {
|
|
935
935
|
class: I(["t-input", { rounded: n.rounded, ["size-" + n.size]: !0 }])
|
|
@@ -947,39 +947,39 @@ const se = /* @__PURE__ */ g(Ye, [["render", We], ["__scopeId", "data-v-66ea8649
|
|
|
947
947
|
h(a.$slots, "end", {}, void 0, !0)
|
|
948
948
|
])
|
|
949
949
|
]),
|
|
950
|
-
n.error ? (c(),
|
|
950
|
+
n.error ? (c(), E(j, {
|
|
951
951
|
key: 0,
|
|
952
952
|
color: "danger"
|
|
953
953
|
}, {
|
|
954
954
|
default: P(() => [
|
|
955
|
-
|
|
955
|
+
q(C(n.error), 1)
|
|
956
956
|
]),
|
|
957
957
|
_: 1
|
|
958
|
-
})) : n.help ? (c(),
|
|
958
|
+
})) : n.help ? (c(), E(j, {
|
|
959
959
|
key: 1,
|
|
960
960
|
color: "secondary"
|
|
961
961
|
}, {
|
|
962
962
|
default: P(() => [
|
|
963
|
-
|
|
963
|
+
q(C(n.help), 1)
|
|
964
964
|
]),
|
|
965
965
|
_: 1
|
|
966
|
-
})) :
|
|
966
|
+
})) : z("", !0)
|
|
967
967
|
], 2));
|
|
968
968
|
}
|
|
969
969
|
}), st = /* @__PURE__ */ g(rt, [["__scopeId", "data-v-75bf0d19"]]), at = {};
|
|
970
|
-
function lt(
|
|
970
|
+
function lt(t, o) {
|
|
971
971
|
return c(), m("textarea");
|
|
972
972
|
}
|
|
973
973
|
const ct = /* @__PURE__ */ g(at, [["render", lt]]), it = {};
|
|
974
|
-
function ut(
|
|
974
|
+
function ut(t, o) {
|
|
975
975
|
return c(), m("div");
|
|
976
976
|
}
|
|
977
977
|
const dt = /* @__PURE__ */ g(it, [["render", ut]]), pt = {}, ft = { class: "t-grid" };
|
|
978
|
-
function mt(
|
|
978
|
+
function mt(t, o) {
|
|
979
979
|
return c(), m("div", ft);
|
|
980
980
|
}
|
|
981
981
|
const vt = /* @__PURE__ */ g(pt, [["render", mt]]), _t = {}, yt = { class: "t-grid-item" };
|
|
982
|
-
function gt(
|
|
982
|
+
function gt(t, o) {
|
|
983
983
|
return c(), m("div", yt);
|
|
984
984
|
}
|
|
985
985
|
const bt = /* @__PURE__ */ g(_t, [["render", gt]]), ht = /* @__PURE__ */ T({
|
|
@@ -987,9 +987,9 @@ const bt = /* @__PURE__ */ g(_t, [["render", gt]]), ht = /* @__PURE__ */ T({
|
|
|
987
987
|
props: {
|
|
988
988
|
type: { default: "horizontal" }
|
|
989
989
|
},
|
|
990
|
-
setup(
|
|
991
|
-
const o =
|
|
992
|
-
return (n,
|
|
990
|
+
setup(t) {
|
|
991
|
+
const o = t;
|
|
992
|
+
return (n, e) => (c(), m("div", {
|
|
993
993
|
class: I(["t-divider", { [o.type]: !0 }])
|
|
994
994
|
}, null, 2));
|
|
995
995
|
}
|
|
@@ -999,8 +999,8 @@ const bt = /* @__PURE__ */ g(_t, [["render", gt]]), ht = /* @__PURE__ */ T({
|
|
|
999
999
|
color: { default: "warning" }
|
|
1000
1000
|
},
|
|
1001
1001
|
emits: ["change"],
|
|
1002
|
-
setup(
|
|
1003
|
-
const n =
|
|
1002
|
+
setup(t, { emit: o }) {
|
|
1003
|
+
const n = t, e = o, r = _(!1), a = _(), l = S(() => {
|
|
1004
1004
|
let p = n.color;
|
|
1005
1005
|
return ["warning", "info", "danger", "primary", "secondary", "success"].includes(n.color) && (p = `var(--t-color-status-${n.color})`), {
|
|
1006
1006
|
"--color": p
|
|
@@ -1008,11 +1008,11 @@ const bt = /* @__PURE__ */ g(_t, [["render", gt]]), ht = /* @__PURE__ */ T({
|
|
|
1008
1008
|
}), i = () => a.value?.parentElement?.querySelector?.("input");
|
|
1009
1009
|
te(() => {
|
|
1010
1010
|
let p = i();
|
|
1011
|
-
p && (r.value = p.type != "password",
|
|
1011
|
+
p && (r.value = p.type != "password", e("change", r.value));
|
|
1012
1012
|
});
|
|
1013
1013
|
const y = () => {
|
|
1014
1014
|
let p = i();
|
|
1015
|
-
p && (r.value = !r.value, r.value ? p.type = "text" : p.type = "password",
|
|
1015
|
+
p && (r.value = !r.value, r.value ? p.type = "text" : p.type = "password", e("change", r.value));
|
|
1016
1016
|
};
|
|
1017
1017
|
return (p, v) => (c(), m("button", {
|
|
1018
1018
|
ref_key: "toggle",
|
|
@@ -1023,8 +1023,8 @@ const bt = /* @__PURE__ */ g(_t, [["render", gt]]), ht = /* @__PURE__ */ T({
|
|
|
1023
1023
|
}, [
|
|
1024
1024
|
r.value ? h(p.$slots, "on", { key: 0 }, () => [
|
|
1025
1025
|
v[0] || (v[0] = k("i", { class: "ri-eye-line" }, null, -1))
|
|
1026
|
-
], !0) :
|
|
1027
|
-
r.value ?
|
|
1026
|
+
], !0) : z("", !0),
|
|
1027
|
+
r.value ? z("", !0) : h(p.$slots, "off", { key: 1 }, () => [
|
|
1028
1028
|
v[1] || (v[1] = k("i", { class: "ri-eye-off-line" }, null, -1))
|
|
1029
1029
|
], !0)
|
|
1030
1030
|
], 4));
|
|
@@ -1035,32 +1035,32 @@ const bt = /* @__PURE__ */ g(_t, [["render", gt]]), ht = /* @__PURE__ */ T({
|
|
|
1035
1035
|
square: { type: Boolean, default: !1 },
|
|
1036
1036
|
size: { default: "standard" }
|
|
1037
1037
|
},
|
|
1038
|
-
setup(
|
|
1039
|
-
const o =
|
|
1040
|
-
return (
|
|
1041
|
-
class: I(["t-avatar", { square:
|
|
1038
|
+
setup(t) {
|
|
1039
|
+
const o = t, n = S(() => o.size == "small" ? "24px" : o.size == "standard" ? "40px" : o.size == "large" ? "60px" : o.size);
|
|
1040
|
+
return (e, r) => (c(), m("div", {
|
|
1041
|
+
class: I(["t-avatar", { square: e.square }]),
|
|
1042
1042
|
style: x({ "--size": n.value })
|
|
1043
1043
|
}, [
|
|
1044
|
-
h(
|
|
1044
|
+
h(e.$slots, "default", {}, void 0, !0)
|
|
1045
1045
|
], 6));
|
|
1046
1046
|
}
|
|
1047
1047
|
}), xt = /* @__PURE__ */ g(wt, [["__scopeId", "data-v-24384c2f"]]), It = { class: "t-collapse-title" }, St = {
|
|
1048
1048
|
key: 0,
|
|
1049
1049
|
class: "icon"
|
|
1050
|
-
},
|
|
1050
|
+
}, zt = {
|
|
1051
1051
|
key: 1,
|
|
1052
1052
|
class: "icon"
|
|
1053
|
-
},
|
|
1053
|
+
}, Et = { class: "t-collapse-content" }, Bt = /* @__PURE__ */ T({
|
|
1054
1054
|
__name: "t-collapse",
|
|
1055
1055
|
props: {
|
|
1056
1056
|
title: {}
|
|
1057
1057
|
},
|
|
1058
1058
|
emits: ["change"],
|
|
1059
|
-
setup(
|
|
1060
|
-
const n =
|
|
1061
|
-
r.value = !r.value, a.value = `calc(${l.value.offsetHeight}px + 2rem)`,
|
|
1059
|
+
setup(t, { emit: o }) {
|
|
1060
|
+
const n = t, e = o, r = _(!1), a = _(""), l = _(), i = () => {
|
|
1061
|
+
r.value = !r.value, a.value = `calc(${l.value.offsetHeight}px + 2rem)`, e("change", r.value);
|
|
1062
1062
|
};
|
|
1063
|
-
return
|
|
1063
|
+
return e("change", r.value), (y, p) => (c(), m("div", {
|
|
1064
1064
|
class: I(["t-collapse", { open: r.value }]),
|
|
1065
1065
|
style: x({ "--height": a.value })
|
|
1066
1066
|
}, [
|
|
@@ -1071,18 +1071,18 @@ const bt = /* @__PURE__ */ g(_t, [["render", gt]]), ht = /* @__PURE__ */ T({
|
|
|
1071
1071
|
h(y.$slots, "icon"),
|
|
1072
1072
|
k("div", It, [
|
|
1073
1073
|
h(y.$slots, "title", {}, () => [
|
|
1074
|
-
|
|
1074
|
+
q(C(n.title), 1)
|
|
1075
1075
|
])
|
|
1076
1076
|
]),
|
|
1077
1077
|
h(y.$slots, "toggle", {}, () => [
|
|
1078
1078
|
r.value ? (c(), m("div", St, [...p[0] || (p[0] = [
|
|
1079
1079
|
k("i", { class: "ri-arrow-up-s-line" }, null, -1)
|
|
1080
|
-
])])) : (c(), m("div",
|
|
1080
|
+
])])) : (c(), m("div", zt, [...p[1] || (p[1] = [
|
|
1081
1081
|
k("i", { class: "ri-arrow-down-s-line" }, null, -1)
|
|
1082
1082
|
])]))
|
|
1083
1083
|
])
|
|
1084
1084
|
]),
|
|
1085
|
-
k("div",
|
|
1085
|
+
k("div", Et, [
|
|
1086
1086
|
k("div", {
|
|
1087
1087
|
ref_key: "content",
|
|
1088
1088
|
ref: l
|
|
@@ -1101,9 +1101,9 @@ const bt = /* @__PURE__ */ g(_t, [["render", gt]]), ht = /* @__PURE__ */ T({
|
|
|
1101
1101
|
color: { default: "primary" }
|
|
1102
1102
|
},
|
|
1103
1103
|
emits: ["update:modelValue"],
|
|
1104
|
-
setup(
|
|
1105
|
-
const n =
|
|
1106
|
-
|
|
1104
|
+
setup(t, { emit: o }) {
|
|
1105
|
+
const n = t, e = o, r = () => {
|
|
1106
|
+
e("update:modelValue", !n.modelValue);
|
|
1107
1107
|
}, a = S(() => {
|
|
1108
1108
|
let l = {
|
|
1109
1109
|
"--background": n.color,
|
|
@@ -1122,18 +1122,18 @@ const bt = /* @__PURE__ */ g(_t, [["render", gt]]), ht = /* @__PURE__ */ T({
|
|
|
1122
1122
|
k("div", { class: "t-switch-icon" }, null, -1)
|
|
1123
1123
|
])], 6));
|
|
1124
1124
|
}
|
|
1125
|
-
}), Pt = /* @__PURE__ */ g(Ct, [["__scopeId", "data-v-3616970e"]]),
|
|
1126
|
-
install: (
|
|
1127
|
-
ue(),
|
|
1125
|
+
}), Pt = /* @__PURE__ */ g(Ct, [["__scopeId", "data-v-3616970e"]]), qt = () => ({
|
|
1126
|
+
install: (t) => {
|
|
1127
|
+
ue(), t.component("t-app", me), t.component("t-screen", se), t.component("t-swipe-screen", Ge), t.component("t-cable", Re), t.component("t-toolbar", je), t.component("t-content", Xe), t.component("t-card", Ne), t.component("t-refresher", Le), t.component("t-button", M), t.component("t-back-button", Me), t.component("t-present", L), t.component("t-text", j), t.component("t-sheet", et), t.component("t-pull-signal", ae), t.component("t-input", st), t.component("t-textarea", ct), t.component("t-rich-text", dt), t.component("t-grid", vt), t.component("t-grid-item", bt), t.component("t-divider", kt), t.component("t-toggle-password", Tt), t.component("t-loading-icon", K), t.component("t-alert", ne), t.component("t-avatar", xt), t.component("t-collapse", Bt), t.component("t-toast", re), t.component("t-switch", Pt);
|
|
1128
1128
|
}
|
|
1129
1129
|
});
|
|
1130
1130
|
export {
|
|
1131
|
-
|
|
1131
|
+
X as blurCurrentActive,
|
|
1132
1132
|
At as createAction,
|
|
1133
1133
|
Vt as createAlert,
|
|
1134
1134
|
Ot as createLoading,
|
|
1135
|
-
|
|
1136
|
-
|
|
1135
|
+
Xt as createToast,
|
|
1136
|
+
qt as createToife,
|
|
1137
1137
|
O as isFormElement,
|
|
1138
1138
|
Se as presentController,
|
|
1139
1139
|
$ as screenController,
|
package/dist/index.umd.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(b,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue"),require("@toife/gesture"),require("vue-router")):typeof define=="function"&&define.amd?define(["exports","vue","@toife/gesture","vue-router"],e):(b=typeof globalThis<"u"?globalThis:b||self,e(b.ToifeVue={},b.Vue,b.ToifeGesture,b.VueRouter))})(this,(function(b,e,$,C){"use strict";const E=t=>t&&(t.tagName=="INPUT"||t.tagName=="TEXTAREA"||t.isContentEditable),S=()=>{const t=document.activeElement;t&&(t.tagName==="INPUT"||t.tagName==="TEXTAREA"||t.isContentEditable)&&t.blur()},q=()=>{document.addEventListener("contextmenu",t=>t.preventDefault()),document.addEventListener("dblclick",t=>t.preventDefault()),document.addEventListener("selectstart",t=>t.preventDefault()),document.addEventListener("gesturestart",t=>t.preventDefault()),document.addEventListener("pointerup",t=>{!E(t.target)&&S()})},y=(t,n)=>{const r=t.__vccOpts||t;for(const[o,s]of n)r[o]=s;return r},O={},X={class:"t-app"};function F(t,n){return e.openBlock(),e.createElementBlock("div",X,[e.renderSlot(t.$slots,"default")])}const U=y(O,[["render",F]]),w=y(e.defineComponent({__name:"t-present",props:{keepalive:{type:Boolean,default:!0},visible:{type:Boolean,default:!1},backdrop:{type:Boolean,default:!0},placement:{default:"bottom"}},emits:["dismiss"],setup(t,{expose:n,emit:r}){const o=e.ref(0),s=e.ref(!1),a=e.ref(),c=e.ref(),i=t,_=r,m=e.computed(()=>s.value||i.keepalive),u=e.reactive({"--t-present-backdrop-opacity":"0.4","--t-present-transition":"0.2s","--t-present-content-transform":"0px","--t-present-content-opacity":"1"}),f=d=>{i.backdrop?d?.backdropOpacity&&(u["--t-present-backdrop-opacity"]=d.backdropOpacity):u["--t-present-backdrop-opacity"]="0",d?.transition&&(u["--t-present-transition"]=d.transition,u["--t-present-transition"]=d.transition),d?.contentTransform&&(u["--t-present-content-transform"]=d.contentTransform),d?.contentOpacity&&(u["--t-present-content-opacity"]=d.contentOpacity)},l=()=>{f({contentTransform:"0px",transition:"0.2s",backdropOpacity:"0.4",contentOpacity:"1"})},p=()=>{let d="0px",h="1";i.placement=="bottom"||i.placement=="right"?d="100%":i.placement=="top"||i.placement=="left"?d="-100%":i.placement=="center"&&(d="0px",h="0"),f({contentTransform:d,transition:"0.2s",contentOpacity:h,backdropOpacity:"0"})};e.watch(()=>i.visible,()=>{i.visible?(s.value=!0,o.value=D.getNewIndex(),setTimeout(()=>{l()},50)):(p(),setTimeout(()=>{s.value=!1},200))}),n({render:f,open:l,close:p});let k;return e.watch(()=>a.value,d=>{d&&(k=$.gesture(a.value,{beforeEvent(h){return h.stopPropagation(),E(h.target)||(h.preventDefault(),S()),h.type=="pointerup"},up(){_("dismiss","backdrop")}}))}),e.onUnmounted(()=>{k&&k.destroy()}),p(),(d,h)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[m.value?e.withDirectives((e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["t-present",{[d.placement]:!0}]),ref_key:"present",ref:c,style:e.normalizeStyle({...u,zIndex:o.value})},[e.renderSlot(d.$slots,"default",{},void 0,!0)],6)),[[e.vShow,s.value]]):e.createCommentVNode("",!0),m.value?e.withDirectives((e.openBlock(),e.createElementBlock("div",{key:1,class:"t-present-backdrop",ref_key:"backdrop",ref:a,style:e.normalizeStyle({...u,zIndex:o.value-1})},null,4)),[[e.vShow,s.value]]):e.createCommentVNode("",!0)],64))}}),[["__scopeId","data-v-dc2a4bc9"]]),T=y(e.defineComponent({__name:"t-loading-icon",props:{size:{type:String,default:"24px"},color:{type:String,default:"var(--t-color-text)"}},setup(t){return(n,r)=>(e.openBlock(),e.createElementBlock("span",{class:"t-loading-icon",style:e.normalizeStyle({width:t.size,height:t.size,borderTopColor:t.color}),role:"status","aria-label":"Loading..."},null,4))}}),[["__scopeId","data-v-7c463303"]]),Y={key:0,class:"loader"},z=y(e.defineComponent({__name:"t-button",props:{color:{default:null},size:{default:"standard"},rounded:{type:Boolean,default:!1},block:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},loadingType:{default:"spinner"},variant:{default:"default"},activeBackground:{type:Boolean,default:!1}},setup(t){const n=t,r=e.computed(()=>{let o;return n.variant=="default"&&(n.color?["warning","info","danger","primary","secondary","success"].includes(n.color)?o={"--border":"none","--color":"var(--t-color-status-"+n.color+"-text)","--background":"var(--t-color-status-"+n.color+")"}:o={"--border":"none","--color":"var(--t-color-text)","--background":n.color}:o={"--border":"none","--color":"var(--t-color-text)","--background":"var(--t-color-surface)"}),n.variant=="text"&&(n.color?["warning","info","danger","primary","secondary","success"].includes(n.color)?o={"--border":"none","--color":"var(--t-color-status-"+n.color+")","--background":"transparent"}:o={"--border":"none","--color":n.color,"--background":"transparent"}:o={"--border":"none","--color":"var(--t-color-text)","--background":"transparent"}),n.variant=="outline"&&(n.color?["warning","info","danger","primary","secondary","success"].includes(n.color)?o={"--border":"0.55px solid var(--t-color-status-"+n.color+")","--color":"var(--t-color-status-"+n.color+")","--background":"transparent"}:o={"--border":"0.55px solid "+n.color,"--color":n.color,"--background":"transparent"}:o={"--border":"0.55px solid var(--t-color-text)","--color":"var(--t-color-text)","--background":"transparent"}),o});return(o,s)=>(e.openBlock(),e.createElementBlock("button",{class:e.normalizeClass(["t-button",{"active-background":n.activeBackground,rounded:n.rounded,block:n.block,["size-"+n.size]:!0}]),style:e.normalizeStyle(r.value)},[e.withDirectives(e.createElementVNode("span",null,[e.renderSlot(o.$slots,"default",{},void 0,!0)],512),[[e.vShow,!n.loading]]),n.loading?(e.openBlock(),e.createElementBlock("span",Y,[e.createVNode(T,{color:"var(--color)",type:n.loadingType},null,8,["type"])])):e.createCommentVNode("",!0)],6))}}),[["__scopeId","data-v-07bf1b8d"]]),j={key:0,class:"t-alert-header"},G={class:"t-alert-content"},M={class:"t-alert-footer"},N=y(e.defineComponent({__name:"t-alert",props:{title:{},message:{},actions:{}},emits:["close"],setup(t,{expose:n,emit:r}){const o=t,s=e.ref(!1),a=r,c=e.ref();let i;const _=e.ref(!1),m=()=>{s.value=!0},u=l=>{s.value=!1,l.handler&&l.handler(),a("close",l?.data)},f=l=>{l=="backdrop"&&(_.value=!0,setTimeout(()=>{_.value=!1},300))};return n({open:m}),e.watch(()=>c.value,l=>{l&&(i=$.gesture(c.value,{beforeEvent(p){return p.stopPropagation(),E(p.target)||(p.preventDefault(),S()),!1}}))}),e.onUnmounted(()=>{i&&i.destroy()}),(l,p)=>(e.openBlock(),e.createBlock(w,{placement:"center",backdrop:!0,keepalive:!1,visible:s.value,onDismiss:f},{default:e.withCtx(()=>[e.createElementVNode("div",{class:e.normalizeClass(["t-alert",{pop:_.value}]),ref_key:"container",ref:c},[e.renderSlot(l.$slots,"header",{},()=>[o.title?(e.openBlock(),e.createElementBlock("div",j,e.toDisplayString(o.title),1)):e.createCommentVNode("",!0)],!0),e.renderSlot(l.$slots,"content",{},()=>[e.createElementVNode("div",G,e.toDisplayString(o.message),1)],!0),e.renderSlot(l.$slots,"footer",{},()=>[e.createElementVNode("div",M,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.actions,k=>(e.openBlock(),e.createBlock(z,{color:k.color,variant:k.variant,onClick:d=>u(k)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(k.text),1)]),_:2},1032,["color","variant","onClick"]))),256))])],!0)],2)]),_:3},8,["visible"]))}}),[["__scopeId","data-v-5b4773ce"]]),W=(t={})=>({open(){return new Promise(n=>{let r=document.body.querySelector(".t-app");if(!r)return;const o=document.createElement("div"),s=e.ref();r.appendChild(o);const a=e.createApp({render(){return e.h(N,{...t,ref:s,onClose:c=>{setTimeout(()=>{a.unmount(),o.remove()},300),n(c)}})}});a.mount(o),setTimeout(()=>{s.value?.open?.()},50)})}}),H=y(e.defineComponent({__name:"t-action",props:{actions:{}},emits:["close"],setup(t,{expose:n,emit:r}){const o=t,s=e.ref(!1),a=r,c=e.ref();let i;const _=e.ref(!1),m=()=>{s.value=!0},u=l=>{s.value=!1,l.handler&&l.handler(),a("close",l?.data)},f=l=>{l=="backdrop"&&(_.value=!0,setTimeout(()=>{_.value=!1},300))};return n({open:m}),e.watch(()=>c.value,l=>{l&&(i=$.gesture(c.value,{beforeEvent(p){return p.stopPropagation(),E(p.target)||(p.preventDefault(),S()),!1}}))}),e.onUnmounted(()=>{i&&i.destroy()}),(l,p)=>(e.openBlock(),e.createBlock(w,{placement:"bottom",backdrop:!0,keepalive:!1,visible:s.value,onDismiss:f},{default:e.withCtx(()=>[e.createElementVNode("div",{class:e.normalizeClass(["t-action",{pop:_.value}]),ref_key:"container",ref:c},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.actions,k=>(e.openBlock(),e.createElementBlock("div",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(k,d=>(e.openBlock(),e.createBlock(z,{color:d.color,size:d.size,variant:d.variant,onClick:h=>u(d),block:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(d.text),1)]),_:2},1032,["color","size","variant","onClick"]))),256))]))),256))],2)]),_:1},8,["visible"]))}}),[["__scopeId","data-v-42000b04"]]),K=(t={})=>({open(){return new Promise(n=>{let r=document.body.querySelector(".t-app");if(!r)return;const o=document.createElement("div"),s=e.ref();r.appendChild(o);const a=e.createApp({render(){return e.h(H,{...t,ref:s,onClose:c=>{setTimeout(()=>{a.unmount(),o.remove()},300),n(c)}})}});a.mount(o),setTimeout(()=>{s.value?.open?.()},50)})}}),J=y(e.defineComponent({__name:"t-loading",props:{type:{default:"spinner"}},emits:["close"],setup(t,{expose:n,emit:r}){const o=t,s=e.ref(!1),a=e.ref();let c;return n({open:()=>{s.value=!0},close:()=>{s.value=!1}}),e.watch(()=>a.value,m=>{m&&(c=$.gesture(a.value,{beforeEvent(u){return u.stopPropagation(),E(u.target)||(u.preventDefault(),S()),!1}}))}),e.onUnmounted(()=>{c&&c.destroy()}),(m,u)=>(e.openBlock(),e.createBlock(w,{placement:"center",backdrop:!0,keepalive:!1,visible:s.value},{default:e.withCtx(()=>[e.createElementVNode("div",{class:"t-loading",ref_key:"container",ref:a},[e.renderSlot(m.$slots,"default",{},()=>[e.createVNode(T,{type:o.type},null,8,["type"])],!0)],512)]),_:3},8,["visible"]))}}),[["__scopeId","data-v-96624ceb"]]),Q=(t={})=>{const n=e.ref(),r=document.body.querySelector(".t-app");let o=null,s=null;return{open(){return new Promise(a=>{r&&(s=document.createElement("div"),r.appendChild(s),o=e.createApp({render(){return e.h(J,{...t,ref:n})}}),o.mount(s),setTimeout(()=>{n.value?.open?.(),a(!0)},50))})},close(){return new Promise(a=>{n.value?.close?.(),setTimeout(()=>{o?.unmount?.(),s?.remove?.(),a(!0)},300)})}}},I=e.ref(1e3),D={getNewIndex(){return I.value+=2,I.value}},B=e.reactive([]),g={screens:B,addScreen:t=>{B.push(t)},removeScreen:t=>{t||B.pop()},hasPrevious:e.computed(()=>B.length>1),currentScreen:e.computed(()=>B[B.length-1]),lastScreen:e.computed(()=>{if(!(B.length<2))return B[B.length-2]})},P=y(e.defineComponent({__name:"t-toast",props:{message:{},space:{default:"0px"},placement:{default:"bottom"},duration:{default:2e3},color:{default:null},variant:{default:"default"}},emits:["close"],setup(t,{expose:n,emit:r}){const o=t,s=r,a=e.ref(!1),c=e.ref(!1),i=e.ref(!1),_=()=>{c.value=!0,i.value=!1,setTimeout(()=>{a.value=!0},10),setTimeout(()=>{m()},o.duration+10)},m=()=>{i.value=!0,setTimeout(()=>{c.value=!1,a.value=!1,s("close")},300)},u=e.computed(()=>{let f;return o.variant=="default"&&(o.color?["warning","info","danger","primary","secondary","success"].includes(o.color)?f={"--border":"none","--color":"var(--t-color-status-"+o.color+"-text)","--background":"rgba(var(--t-color-status-"+o.color+"-rgb), 0.6)"}:f={"--border":"none","--color":"var(--t-color-text)","--background":o.color}:f={"--border":"none","--color":"var(--t-color-text)","--background":"rgba(var(--t-color-surface-rgb), 0.6)"}),o.variant=="text"&&(o.color?["warning","info","danger","primary","secondary","success"].includes(o.color)?f={"--border":"none","--color":"var(--t-color-status-"+o.color+")","--background":"transparent"}:f={"--border":"none","--color":o.color,"--background":"transparent"}:f={"--border":"none","--color":"var(--t-color-text)","--background":"transparent"}),o.variant=="outline"&&(o.color?["warning","info","danger","primary","secondary","success"].includes(o.color)?f={"--border":"0.55px solid var(--t-color-status-"+o.color+")","--color":"var(--t-color-status-"+o.color+")","--background":"transparent"}:f={"--border":"0.55px solid "+o.color,"--color":o.color,"--background":"transparent"}:f={"--border":"0.55px solid var(--t-color-text)","--color":"var(--t-color-text)","--background":"transparent"}),f});return n({open:_}),(f,l)=>c.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["t-toast",{[o.placement]:!0,open:a.value,closing:i.value}]),style:e.normalizeStyle({"--space":o.space,...u.value})},e.toDisplayString(o.message),7)):e.createCommentVNode("",!0)}}),[["__scopeId","data-v-5159a3c5"]]),Z=(t={})=>({open(){let n=document.body.querySelector(".t-app");if(!n)return;const r=document.createElement("div"),o=e.ref();n.appendChild(r);const s=e.createApp({render(){return e.h(P,{...t,ref:o,onClose:()=>{setTimeout(()=>{s.unmount(),r.remove()},300)}})}});s.mount(r),setTimeout(()=>{o.value?.open?.()},50)}}),ee=e.ref(0);function v(){return{height:ee}}const te=y(e.defineComponent({__name:"t-cable",props:{keyboard:{type:Boolean,default:!0},placement:{default:"bottom"}},setup(t){const n=t,{height:r}=v();return(o,s)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["t-cable",{keyboard:n.keyboard&&e.unref(r)>0,[n.placement]:!0}]),style:e.normalizeStyle({"--t-keyboard-height":e.unref(r)+"px","--t-keyboard-transition":e.unref(r)>0?"0.3s":"0.1s"})},[e.renderSlot(o.$slots,"default",{},void 0,!0)],6))}}),[["__scopeId","data-v-ecb72421"]]),oe=e.defineComponent({__name:"t-card",props:{color:{default:null}},setup(t){const n=t,r=e.computed(()=>{let o;return n.color?["warning","info","danger","primary","secondary","success"].includes(n.color)?o={"--background":"var(--t-color-status-"+n.color+")"}:o={"--background":n.color}:o={"--background":"var(--t-color-surface)"},o});return(o,s)=>(e.openBlock(),e.createElementBlock("div",{class:"t-card",style:e.normalizeStyle(r.value)},[e.renderSlot(o.$slots,"default")],4))}}),ne={},re={class:"t-content"};function se(t,n){return e.openBlock(),e.createElementBlock("div",re,[e.renderSlot(t.$slots,"default",{},void 0,!0)])}const le=y(ne,[["render",se],["__scopeId","data-v-9a833657"]]),A=80,ae=y(e.defineComponent({__name:"t-refresher",emits:["refresh"],setup(t,{emit:n}){const r=n,o=e.ref(0),s=e.ref(!1),a=e.ref();let c,i=!1;const _=()=>{s.value=!1,o.value=0,c&&c.cancel(),setTimeout(()=>{i=!1},2e3)},m=()=>{i=!0,s.value=!0,o.value=A,r("refresh",_)};return e.watch(()=>a.value,()=>{c&&c.destroy();let u=a.value.closest(".t-content");u&&(c=$.gesture(u,{options:{minDist:60},move({dy:f}){s.value||i||f<0||(f>=120?m():o.value=f)},up({dy:f}){s.value||i||(f>A?m():o.value=0)},cancel(){s.value=!1,o.value=0}}))}),e.onUnmounted(()=>{c&&c.destroy()}),(u,f)=>e.withDirectives((e.openBlock(),e.createElementBlock("div",{class:"t-refresher",ref_key:"container",ref:a,style:e.normalizeStyle({height:`${o.value}px`})},[e.createElementVNode("img",{class:e.normalizeClass({spiner:s.value}),src:"https://static.toikit.com/toikit/home_2.png?v=3",alt:"Loading...",style:{width:"22px",height:"22px"}},null,2)],4)),[[e.vShow,o.value>0]])}}),[["__scopeId","data-v-688c5394"]]),ce={},ie={class:"t-screen"};function de(t,n){return e.openBlock(),e.createElementBlock("div",ie,[e.renderSlot(t.$slots,"default",{},void 0,!0)])}const R=y(ce,[["render",de],["__scopeId","data-v-66ea8649"]]),pe=y(e.defineComponent({__name:"t-swipe-screen",emits:["change"],setup(t,{emit:n}){let r={};const o=C.useRouter(),s=C.useRoute(),a=o.getRoutes(),c=e.ref(!1),i=n;for(let l of a)r[l.name]=l.components;const _=l=>{l&&g.addScreen({name:l,target:null,component:e.markRaw(r[l]||null)})},m=(l,p)=>{!p||g.screens[l].target||(g.screens[l].target=p.$el,l>0&&(c.value=!0,p.$el.style.transform="translateX(100vw)",p.$el.transitionOrigin="center",document.documentElement.style.setProperty("--t-swipe-backdrop-opacity","0"),setTimeout(()=>{p.$el.style.transition="transform 0.35s ease",p.$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"),g.screens.length>1&&(g.lastScreen.value.target.style.transitionOrigin="left center",g.lastScreen.value.target.style.transition="transform 0.35s ease",g.lastScreen.value.target.style.transform="translateX(-30vw) scale(0.5) perspective(100vw) rotateY(30deg)"),setTimeout(()=>{i("change"),c.value=!1},400)},100)))},u=()=>{g.currentScreen.value.target.style.transition="transform 0.35s ease",g.currentScreen.value.target.style.transform="translateX(100vw) scale(1)",g.lastScreen.value.target.style.transition="transform 0.35s ease",g.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(()=>{g.removeScreen(),i("change"),c.value=!1},400)};_(s.name),e.watch(()=>s.name,(l,p)=>{l!=g.currentScreen.value.name&&(g.lastScreen.value?.name==l?u():_(l))});const f=()=>{c.value=!0;const l=g.currentScreen.value.target,p=g.lastScreen.value.target;l.style.transition="transform 0.35s ease",l.style.transform="translateX(0px)",p.style.transition="transform 0.35s ease",p.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(()=>{c.value=!1},400)};return e.onMounted(()=>{$.gesture(document,{pointerId:null,beforeEvent(l){return c.value||g.screens.length<2?!1:(l.type=="pointerdown"&&!this.pointerId&&(this.pointerId=l.pointerId),this.pointerId==l.pointerId)},afterEvent(l){(l.type=="pointerup"||l.type=="pointercancel")&&(this.pointerId=null)},fast({d:l}){l=="right"&&o.back()},move({dx:l}){const p=window.innerWidth,k=l/p*100,d=g.currentScreen.value.target,h=g.lastScreen?.value?.target;if(l>0&&l<=p){d.style.transition="transform 0s ease",d.style.transform=`translateX(${l}px)`,h.style.transition="transform 0s ease",document.documentElement.style.setProperty("--t-screen-backdrop-duration","0s"),h.style.transform=`translateX(calc(-30vw + (30vw / 100 * ${k}))) scale(${.5+.5/100*k}) perspective(100vw) rotateY(${30-30/100*k}deg)`,document.documentElement.style.setProperty("--t-swipe-backdrop-opacity",`${.5-.5/100*k}`);return}},up({dx:l}){const p=window.innerWidth;l/p*100>=50?o.back():f()},cancel(){f()}})}),(l,p)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(g).screens,(k,d)=>(e.openBlock(),e.createBlock(R,{ref_for:!0,ref:h=>m(d,h),style:e.normalizeStyle({zIndex:d+(d==e.unref(g).screens.length-1?2:1)}),key:d},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(k.component.default)))]),_:2},1032,["style"]))),128)),e.createElementVNode("div",{class:"t-swipe-backdrop",style:e.normalizeStyle({zIndex:e.unref(g).screens.length})},null,4)],64))}}),[["__scopeId","data-v-a048cc07"]]),me=y(e.defineComponent({__name:"t-toolbar",props:{placement:{default:"bottom"},size:{default:"50px"}},setup(t){const n=t;return(r,o)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["t-toolbar",{[n.placement]:!0}]),style:e.normalizeStyle({"--t-size-toolbar":n.size})},[e.createElementVNode("div",null,[e.renderSlot(r.$slots,"default",{},void 0,!0)])],6))}}),[["__scopeId","data-v-3b3a7896"]]),fe=y(e.defineComponent({__name:"t-back-button",props:{to:{}},setup(t){const n=C.useRouter(),r=t,o=()=>{g.hasPrevious.value?n?.back?.():r.to&&n?.push?.(r.to)};return(s,a)=>s.to||e.unref(g).hasPrevious?(e.openBlock(),e.createElementBlock("button",{key:0,class:"t-back-button",onClick:o},[e.renderSlot(s.$slots,"default",{},()=>[a[0]||(a[0]=e.createElementVNode("i",{class:"ri-arrow-left-s-line"},null,-1))],!0)])):e.createCommentVNode("",!0)}}),[["__scopeId","data-v-ed626a3d"]]),x=y(e.defineComponent({__name:"t-text",props:{color:{default:"var(--t-color-text)"},size:{default:"standard"}},setup(t){const n=t,r=e.computed(()=>{let o,s=n.color;return n.size=="standard"?o="var(--t-fs-10)":n.size=="small"?o="var(--t-fs-08)":n.size=="large"?o="var(--t-fs-12)":o=n.size,["warning","info","danger","primary","secondary","success"].includes(n.color)&&(s=`var(--t-color-status-${n.color})`),{"--color":s,"--font-size":o}});return(o,s)=>(e.openBlock(),e.createElementBlock("span",{class:"t-text",style:e.normalizeStyle(r.value)},[e.renderSlot(o.$slots,"default",{},void 0,!0)],4))}}),[["__scopeId","data-v-f0f94f05"]]),L=y(e.defineComponent({__name:"t-pull-signal",props:{placement:{default:"bottom"}},setup(t){return(n,r)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["t-pull-bar",{[n.placement]:!0}])},null,2))}}),[["__scopeId","data-v-daa38c85"]]),ue=y(e.defineComponent({__name:"t-sheet",props:{background:{default:"var(--t-color-surface)"},visible:{type:Boolean,default:!1},gesture:{type:Boolean,default:!0},fullscreen:{type:Boolean,default:!1},placement:{default:"bottom"},keepalive:{type:Boolean,default:!0},backdrop:{type:Boolean,default:!0},rounded:{type:Boolean,default:!0},radius:{type:Boolean,default:!0},closeButton:{type:Boolean,default:!0}},emits:["dismiss"],setup(t,{emit:n}){const r=t,o=n,s=e.ref(),a=e.ref(),c=e.ref(!1);let i=null;const _=e.computed(()=>{if(r.placement=="bottom")return"down";if(r.placement=="top")return"up";if(r.placement=="left")return"left";if(r.placement=="right")return"right"}),m=f=>{o("dismiss",f)},u=()=>{c.value=!0,setTimeout(()=>{c.value=!1},300)};return e.watch(()=>s.value,f=>{f&&(i=$.gesture(s.value,{options:{minDist:30},pointerId:null,beforeEvent(l){let p=!1,k=!1;return c.value||!r.gesture||r.placement=="center"?p=!0:this.pointerId?(p=!0,k=this.pointerId==l.pointerId):l.type=="pointerdown"&&(this.pointerId=l.pointerId,p=!0,k=!0),p&&(l.stopPropagation(),E(l.target)||(l.preventDefault(),S())),k},afterEvent(l){(l.type=="pointerup"||l.type=="pointercancel")&&(this.pointerId=null)},fast({d:l}){u(),l==_.value?o("dismiss","gesture"):a.value.open()},move({dy:l,dx:p,d:k}){if(k!=_.value)return;let d=0;r.placement=="bottom"||r.placement=="top"?d=l:d=p,a.value.render({contentTransform:d+"px",transition:"0s"})},up({dy:l,dx:p,d:k}){if(u(),k!=_.value){a.value.open();return}let d,h,V;r.placement=="bottom"||r.placement=="top"?(d=s.value.offsetHeight,V=l):(d=s.value.offsetWidth,V=p),h=V/d*100,h>50?o("dismiss","gesture"):a.value.open()},cancel(){u(),a.value.open()}}))}),e.onUnmounted(()=>{i&&i.destroy()}),(f,l)=>(e.openBlock(),e.createBlock(w,{ref_key:"present",ref:a,placement:r.placement,backdrop:f.backdrop,visible:r.visible,keepalive:r.keepalive,onDismiss:m},{default:e.withCtx(()=>[r.gesture&&r.placement!="center"?(e.openBlock(),e.createBlock(L,{key:0,placement:r.placement},null,8,["placement"])):e.createCommentVNode("",!0),r.closeButton&&r.placement=="center"?(e.openBlock(),e.createElementBlock("button",{key:1,class:"t-sheet-close",onClick:l[0]||(l[0]=p=>m("close-button"))},[e.renderSlot(f.$slots,"close-icon",{},()=>[l[1]||(l[1]=e.createElementVNode("i",{class:"ri-close-large-line"},null,-1))],!0)])):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(["t-sheet",{fullscreen:r.fullscreen,[r.placement]:!0,rounded:f.rounded,radius:r.radius}]),style:e.normalizeStyle({"--background":r.background}),ref_key:"sheet",ref:s},[e.renderSlot(f.$slots,"default",{},void 0,!0)],6)]),_:3},8,["placement","backdrop","visible","keepalive"]))}}),[["__scopeId","data-v-14b7fc93"]]),_e={class:"t-input-label"},ye={class:"t-input-content"},ke=["type","placeholder","value"],ge=y(e.defineComponent({__name:"t-input",props:{size:{default:"standard"},rounded:{type:Boolean,default:!1},label:{default:""},placeholder:{default:""},type:{default:"text"},help:{},error:{},modelValue:{default:""},variant:{default:"normal"}},emits:["update:modelValue"],setup(t,{emit:n}){const r=t,o=n,s=a=>{o("update:modelValue",a.target.value)};return(a,c)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["t-input",{rounded:r.rounded,["size-"+r.size]:!0}])},[e.createElementVNode("label",null,[e.createElementVNode("span",_e,e.toDisplayString(a.label),1),e.createElementVNode("div",ye,[e.renderSlot(a.$slots,"start",{},void 0,!0),e.createElementVNode("input",{type:a.type,placeholder:a.placeholder,value:a.modelValue,onInput:s},null,40,ke),e.renderSlot(a.$slots,"end",{},void 0,!0)])]),r.error?(e.openBlock(),e.createBlock(x,{key:0,color:"danger"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(r.error),1)]),_:1})):r.help?(e.openBlock(),e.createBlock(x,{key:1,color:"secondary"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(r.help),1)]),_:1})):e.createCommentVNode("",!0)],2))}}),[["__scopeId","data-v-75bf0d19"]]),be={};function he(t,n){return e.openBlock(),e.createElementBlock("textarea")}const Be=y(be,[["render",he]]),$e={};function Ee(t,n){return e.openBlock(),e.createElementBlock("div")}const Se=y($e,[["render",Ee]]),we={},Ce={class:"t-grid"};function Te(t,n){return e.openBlock(),e.createElementBlock("div",Ce)}const ze=y(we,[["render",Te]]),xe={},Ve={class:"t-grid-item"};function Ne(t,n){return e.openBlock(),e.createElementBlock("div",Ve)}const Ie=y(xe,[["render",Ne]]),De=y(e.defineComponent({__name:"t-divider",props:{type:{default:"horizontal"}},setup(t){const n=t;return(r,o)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["t-divider",{[n.type]:!0}])},null,2))}}),[["__scopeId","data-v-816784be"]]),Pe=y(e.defineComponent({__name:"t-toggle-password",props:{color:{default:"warning"}},emits:["change"],setup(t,{emit:n}){const r=t,o=n,s=e.ref(!1),a=e.ref(),c=e.computed(()=>{let m=r.color;return["warning","info","danger","primary","secondary","success"].includes(r.color)&&(m=`var(--t-color-status-${r.color})`),{"--color":m}}),i=()=>a.value?.parentElement?.querySelector?.("input");e.onMounted(()=>{let m=i();m&&(s.value=m.type!="password",o("change",s.value))});const _=()=>{let m=i();m&&(s.value=!s.value,s.value?m.type="text":m.type="password",o("change",s.value))};return(m,u)=>(e.openBlock(),e.createElementBlock("button",{ref_key:"toggle",ref:a,class:"t-toggle-password",style:e.normalizeStyle(c.value),onClick:_},[s.value?e.renderSlot(m.$slots,"on",{key:0},()=>[u[0]||(u[0]=e.createElementVNode("i",{class:"ri-eye-line"},null,-1))],!0):e.createCommentVNode("",!0),s.value?e.createCommentVNode("",!0):e.renderSlot(m.$slots,"off",{key:1},()=>[u[1]||(u[1]=e.createElementVNode("i",{class:"ri-eye-off-line"},null,-1))],!0)],4))}}),[["__scopeId","data-v-3268e9e3"]]),ve=y(e.defineComponent({__name:"t-avatar",props:{square:{type:Boolean,default:!1},size:{default:"standard"}},setup(t){const n=t,r=e.computed(()=>n.size=="small"?"24px":n.size=="standard"?"40px":n.size=="large"?"60px":n.size);return(o,s)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["t-avatar",{square:o.square}]),style:e.normalizeStyle({"--size":r.value})},[e.renderSlot(o.$slots,"default",{},void 0,!0)],6))}}),[["__scopeId","data-v-24384c2f"]]),Ae={class:"t-collapse-title"},Re={key:0,class:"icon"},Le={key:1,class:"icon"},qe={class:"t-collapse-content"},Oe=e.defineComponent({__name:"t-collapse",props:{title:{}},emits:["change"],setup(t,{emit:n}){const r=t,o=n,s=e.ref(!1),a=e.ref(""),c=e.ref(),i=()=>{s.value=!s.value,a.value=`calc(${c.value.offsetHeight}px + 2rem)`,o("change",s.value)};return o("change",s.value),(_,m)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["t-collapse",{open:s.value}]),style:e.normalizeStyle({"--height":a.value})},[e.createElementVNode("div",{class:"t-collapse-header",onClick:i},[e.renderSlot(_.$slots,"icon"),e.createElementVNode("div",Ae,[e.renderSlot(_.$slots,"title",{},()=>[e.createTextVNode(e.toDisplayString(r.title),1)])]),e.renderSlot(_.$slots,"toggle",{},()=>[s.value?(e.openBlock(),e.createElementBlock("div",Re,[...m[0]||(m[0]=[e.createElementVNode("i",{class:"ri-arrow-up-s-line"},null,-1)])])):(e.openBlock(),e.createElementBlock("div",Le,[...m[1]||(m[1]=[e.createElementVNode("i",{class:"ri-arrow-down-s-line"},null,-1)])]))])]),e.createElementVNode("div",qe,[e.createElementVNode("div",{ref_key:"content",ref:c},[e.renderSlot(_.$slots,"content",{},()=>[e.renderSlot(_.$slots,"default")])],512)])],6))}}),Xe=y(e.defineComponent({__name:"t-switch",props:{modelValue:{type:Boolean},color:{default:"primary"}},emits:["update:modelValue"],setup(t,{emit:n}){const r=t,o=n,s=()=>{o("update:modelValue",!r.modelValue)},a=e.computed(()=>{let c={"--background":r.color,"--color":"#ffffff"};return["warning","info","danger","primary","secondary","success"].includes(r.color)&&(c={"--background":`var(--t-color-status-${r.color})`,"--color":`var(--t-color-status-${r.color}-text)`}),c});return(c,i)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["t-switch",{on:r.modelValue}]),style:e.normalizeStyle(a.value),onClick:s},[...i[0]||(i[0]=[e.createElementVNode("div",{class:"t-switch-icon"},null,-1)])],6))}}),[["__scopeId","data-v-3616970e"]]),Fe=()=>({install:t=>{q(),t.component("t-app",U),t.component("t-screen",R),t.component("t-swipe-screen",pe),t.component("t-cable",te),t.component("t-toolbar",me),t.component("t-content",le),t.component("t-card",oe),t.component("t-refresher",ae),t.component("t-button",z),t.component("t-back-button",fe),t.component("t-present",w),t.component("t-text",x),t.component("t-sheet",ue),t.component("t-pull-signal",L),t.component("t-input",ge),t.component("t-textarea",Be),t.component("t-rich-text",Se),t.component("t-grid",ze),t.component("t-grid-item",Ie),t.component("t-divider",De),t.component("t-toggle-password",Pe),t.component("t-loading-icon",T),t.component("t-alert",N),t.component("t-avatar",ve),t.component("t-collapse",Oe),t.component("t-toast",P),t.component("t-switch",Xe)}});b.blurCurrentActive=S,b.createAction=K,b.createAlert=W,b.createLoading=Q,b.createToast=Z,b.createToife=Fe,b.isFormElement=E,b.presentController=D,b.screenController=g,b.useKeyboard=v,Object.defineProperty(b,Symbol.toStringTag,{value:"Module"})}));
|
|
1
|
+
(function(b,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue"),require("@toife/gesture"),require("vue-router")):typeof define=="function"&&define.amd?define(["exports","vue","@toife/gesture","vue-router"],e):(b=typeof globalThis<"u"?globalThis:b||self,e(b.ToifeVue={},b.Vue,b.ToifeGesture,b.VueRouter))})(this,(function(b,e,$,C){"use strict";const S=o=>o&&(o.tagName=="INPUT"||o.tagName=="TEXTAREA"||o.isContentEditable),E=()=>{const o=document.activeElement;o&&(o.tagName==="INPUT"||o.tagName==="TEXTAREA"||o.isContentEditable)&&o.blur()},O=()=>{document.addEventListener("contextmenu",o=>o.preventDefault()),document.addEventListener("selectstart",o=>o.preventDefault()),document.addEventListener("pointerup",o=>{!S(o.target)&&E()})},y=(o,n)=>{const r=o.__vccOpts||o;for(const[t,s]of n)r[t]=s;return r},L={},X={class:"t-app"};function F(o,n){return e.openBlock(),e.createElementBlock("div",X,[e.renderSlot(o.$slots,"default")])}const U=y(L,[["render",F]]),w=y(e.defineComponent({__name:"t-present",props:{keepalive:{type:Boolean,default:!0},visible:{type:Boolean,default:!1},backdrop:{type:Boolean,default:!0},placement:{default:"bottom"}},emits:["dismiss"],setup(o,{expose:n,emit:r}){const t=e.ref(0),s=e.ref(!1),a=e.ref(),c=e.ref(),i=o,_=r,m=e.computed(()=>s.value||i.keepalive),u=e.reactive({"--t-present-backdrop-opacity":"0.4","--t-present-transition":"0.2s","--t-present-content-transform":"0px","--t-present-content-opacity":"1"}),f=d=>{i.backdrop?d?.backdropOpacity&&(u["--t-present-backdrop-opacity"]=d.backdropOpacity):u["--t-present-backdrop-opacity"]="0",d?.transition&&(u["--t-present-transition"]=d.transition,u["--t-present-transition"]=d.transition),d?.contentTransform&&(u["--t-present-content-transform"]=d.contentTransform),d?.contentOpacity&&(u["--t-present-content-opacity"]=d.contentOpacity)},l=()=>{f({contentTransform:"0px",transition:"0.2s",backdropOpacity:"0.4",contentOpacity:"1"})},p=()=>{let d="0px",h="1";i.placement=="bottom"||i.placement=="right"?d="100%":i.placement=="top"||i.placement=="left"?d="-100%":i.placement=="center"&&(d="0px",h="0"),f({contentTransform:d,transition:"0.2s",contentOpacity:h,backdropOpacity:"0"})};e.watch(()=>i.visible,()=>{i.visible?(s.value=!0,t.value=D.getNewIndex(),setTimeout(()=>{l()},50)):(p(),setTimeout(()=>{s.value=!1},200))}),n({render:f,open:l,close:p});let k;return e.watch(()=>a.value,d=>{d&&(k=$.gesture(a.value,{beforeEvent(h){return h.stopPropagation(),S(h.target)||(h.preventDefault(),E()),h.type=="pointerup"},up(){_("dismiss","backdrop")}}))}),e.onUnmounted(()=>{k&&k.destroy()}),p(),(d,h)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[m.value?e.withDirectives((e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["t-present",{[d.placement]:!0}]),ref_key:"present",ref:c,style:e.normalizeStyle({...u,zIndex:t.value})},[e.renderSlot(d.$slots,"default",{},void 0,!0)],6)),[[e.vShow,s.value]]):e.createCommentVNode("",!0),m.value?e.withDirectives((e.openBlock(),e.createElementBlock("div",{key:1,class:"t-present-backdrop",ref_key:"backdrop",ref:a,style:e.normalizeStyle({...u,zIndex:t.value-1})},null,4)),[[e.vShow,s.value]]):e.createCommentVNode("",!0)],64))}}),[["__scopeId","data-v-dc2a4bc9"]]),T=y(e.defineComponent({__name:"t-loading-icon",props:{size:{type:String,default:"24px"},color:{type:String,default:"var(--t-color-text)"}},setup(o){return(n,r)=>(e.openBlock(),e.createElementBlock("span",{class:"t-loading-icon",style:e.normalizeStyle({width:o.size,height:o.size,borderTopColor:o.color}),role:"status","aria-label":"Loading..."},null,4))}}),[["__scopeId","data-v-7c463303"]]),Y={key:0,class:"loader"},z=y(e.defineComponent({__name:"t-button",props:{color:{default:null},size:{default:"standard"},rounded:{type:Boolean,default:!1},block:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},loadingType:{default:"spinner"},variant:{default:"default"},activeBackground:{type:Boolean,default:!1}},setup(o){const n=o,r=e.computed(()=>{let t;return n.variant=="default"&&(n.color?["warning","info","danger","primary","secondary","success"].includes(n.color)?t={"--border":"none","--color":"var(--t-color-status-"+n.color+"-text)","--background":"var(--t-color-status-"+n.color+")"}:t={"--border":"none","--color":"var(--t-color-text)","--background":n.color}:t={"--border":"none","--color":"var(--t-color-text)","--background":"var(--t-color-surface)"}),n.variant=="text"&&(n.color?["warning","info","danger","primary","secondary","success"].includes(n.color)?t={"--border":"none","--color":"var(--t-color-status-"+n.color+")","--background":"transparent"}:t={"--border":"none","--color":n.color,"--background":"transparent"}:t={"--border":"none","--color":"var(--t-color-text)","--background":"transparent"}),n.variant=="outline"&&(n.color?["warning","info","danger","primary","secondary","success"].includes(n.color)?t={"--border":"0.55px solid var(--t-color-status-"+n.color+")","--color":"var(--t-color-status-"+n.color+")","--background":"transparent"}:t={"--border":"0.55px solid "+n.color,"--color":n.color,"--background":"transparent"}:t={"--border":"0.55px solid var(--t-color-text)","--color":"var(--t-color-text)","--background":"transparent"}),t});return(t,s)=>(e.openBlock(),e.createElementBlock("button",{class:e.normalizeClass(["t-button",{"active-background":n.activeBackground,rounded:n.rounded,block:n.block,["size-"+n.size]:!0}]),style:e.normalizeStyle(r.value)},[e.withDirectives(e.createElementVNode("span",null,[e.renderSlot(t.$slots,"default",{},void 0,!0)],512),[[e.vShow,!n.loading]]),n.loading?(e.openBlock(),e.createElementBlock("span",Y,[e.createVNode(T,{color:"var(--color)",type:n.loadingType},null,8,["type"])])):e.createCommentVNode("",!0)],6))}}),[["__scopeId","data-v-07bf1b8d"]]),j={key:0,class:"t-alert-header"},G={class:"t-alert-content"},M={class:"t-alert-footer"},N=y(e.defineComponent({__name:"t-alert",props:{title:{},message:{},actions:{}},emits:["close"],setup(o,{expose:n,emit:r}){const t=o,s=e.ref(!1),a=r,c=e.ref();let i;const _=e.ref(!1),m=()=>{s.value=!0},u=l=>{s.value=!1,l.handler&&l.handler(),a("close",l?.data)},f=l=>{l=="backdrop"&&(_.value=!0,setTimeout(()=>{_.value=!1},300))};return n({open:m}),e.watch(()=>c.value,l=>{l&&(i=$.gesture(c.value,{beforeEvent(p){return p.stopPropagation(),S(p.target)||(p.preventDefault(),E()),!1}}))}),e.onUnmounted(()=>{i&&i.destroy()}),(l,p)=>(e.openBlock(),e.createBlock(w,{placement:"center",backdrop:!0,keepalive:!1,visible:s.value,onDismiss:f},{default:e.withCtx(()=>[e.createElementVNode("div",{class:e.normalizeClass(["t-alert",{pop:_.value}]),ref_key:"container",ref:c},[e.renderSlot(l.$slots,"header",{},()=>[t.title?(e.openBlock(),e.createElementBlock("div",j,e.toDisplayString(t.title),1)):e.createCommentVNode("",!0)],!0),e.renderSlot(l.$slots,"content",{},()=>[e.createElementVNode("div",G,e.toDisplayString(t.message),1)],!0),e.renderSlot(l.$slots,"footer",{},()=>[e.createElementVNode("div",M,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.actions,k=>(e.openBlock(),e.createBlock(z,{color:k.color,variant:k.variant,onClick:d=>u(k)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(k.text),1)]),_:2},1032,["color","variant","onClick"]))),256))])],!0)],2)]),_:3},8,["visible"]))}}),[["__scopeId","data-v-5b4773ce"]]),W=(o={})=>({open(){return new Promise(n=>{let r=document.body.querySelector(".t-app");if(!r)return;const t=document.createElement("div"),s=e.ref();r.appendChild(t);const a=e.createApp({render(){return e.h(N,{...o,ref:s,onClose:c=>{setTimeout(()=>{a.unmount(),t.remove()},300),n(c)}})}});a.mount(t),setTimeout(()=>{s.value?.open?.()},50)})}}),H=y(e.defineComponent({__name:"t-action",props:{actions:{}},emits:["close"],setup(o,{expose:n,emit:r}){const t=o,s=e.ref(!1),a=r,c=e.ref();let i;const _=e.ref(!1),m=()=>{s.value=!0},u=l=>{s.value=!1,l.handler&&l.handler(),a("close",l?.data)},f=l=>{l=="backdrop"&&(_.value=!0,setTimeout(()=>{_.value=!1},300))};return n({open:m}),e.watch(()=>c.value,l=>{l&&(i=$.gesture(c.value,{beforeEvent(p){return p.stopPropagation(),S(p.target)||(p.preventDefault(),E()),!1}}))}),e.onUnmounted(()=>{i&&i.destroy()}),(l,p)=>(e.openBlock(),e.createBlock(w,{placement:"bottom",backdrop:!0,keepalive:!1,visible:s.value,onDismiss:f},{default:e.withCtx(()=>[e.createElementVNode("div",{class:e.normalizeClass(["t-action",{pop:_.value}]),ref_key:"container",ref:c},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.actions,k=>(e.openBlock(),e.createElementBlock("div",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(k,d=>(e.openBlock(),e.createBlock(z,{color:d.color,size:d.size,variant:d.variant,onClick:h=>u(d),block:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(d.text),1)]),_:2},1032,["color","size","variant","onClick"]))),256))]))),256))],2)]),_:1},8,["visible"]))}}),[["__scopeId","data-v-42000b04"]]),K=(o={})=>({open(){return new Promise(n=>{let r=document.body.querySelector(".t-app");if(!r)return;const t=document.createElement("div"),s=e.ref();r.appendChild(t);const a=e.createApp({render(){return e.h(H,{...o,ref:s,onClose:c=>{setTimeout(()=>{a.unmount(),t.remove()},300),n(c)}})}});a.mount(t),setTimeout(()=>{s.value?.open?.()},50)})}}),J=y(e.defineComponent({__name:"t-loading",props:{type:{default:"spinner"}},emits:["close"],setup(o,{expose:n,emit:r}){const t=o,s=e.ref(!1),a=e.ref();let c;return n({open:()=>{s.value=!0},close:()=>{s.value=!1}}),e.watch(()=>a.value,m=>{m&&(c=$.gesture(a.value,{beforeEvent(u){return u.stopPropagation(),S(u.target)||(u.preventDefault(),E()),!1}}))}),e.onUnmounted(()=>{c&&c.destroy()}),(m,u)=>(e.openBlock(),e.createBlock(w,{placement:"center",backdrop:!0,keepalive:!1,visible:s.value},{default:e.withCtx(()=>[e.createElementVNode("div",{class:"t-loading",ref_key:"container",ref:a},[e.renderSlot(m.$slots,"default",{},()=>[e.createVNode(T,{type:t.type},null,8,["type"])],!0)],512)]),_:3},8,["visible"]))}}),[["__scopeId","data-v-96624ceb"]]),Q=(o={})=>{const n=e.ref(),r=document.body.querySelector(".t-app");let t=null,s=null;return{open(){return new Promise(a=>{r&&(s=document.createElement("div"),r.appendChild(s),t=e.createApp({render(){return e.h(J,{...o,ref:n})}}),t.mount(s),setTimeout(()=>{n.value?.open?.(),a(!0)},50))})},close(){return new Promise(a=>{n.value?.close?.(),setTimeout(()=>{t?.unmount?.(),s?.remove?.(),a(!0)},300)})}}},I=e.ref(1e3),D={getNewIndex(){return I.value+=2,I.value}},B=e.reactive([]),g={screens:B,addScreen:o=>{B.push(o)},removeScreen:o=>{o||B.pop()},hasPrevious:e.computed(()=>B.length>1),currentScreen:e.computed(()=>B[B.length-1]),lastScreen:e.computed(()=>{if(!(B.length<2))return B[B.length-2]})},P=y(e.defineComponent({__name:"t-toast",props:{message:{},space:{default:"0px"},placement:{default:"bottom"},duration:{default:2e3},color:{default:null},variant:{default:"default"}},emits:["close"],setup(o,{expose:n,emit:r}){const t=o,s=r,a=e.ref(!1),c=e.ref(!1),i=e.ref(!1),_=()=>{c.value=!0,i.value=!1,setTimeout(()=>{a.value=!0},10),setTimeout(()=>{m()},t.duration+10)},m=()=>{i.value=!0,setTimeout(()=>{c.value=!1,a.value=!1,s("close")},300)},u=e.computed(()=>{let f;return t.variant=="default"&&(t.color?["warning","info","danger","primary","secondary","success"].includes(t.color)?f={"--border":"none","--color":"var(--t-color-status-"+t.color+"-text)","--background":"rgba(var(--t-color-status-"+t.color+"-rgb), 0.6)"}:f={"--border":"none","--color":"var(--t-color-text)","--background":t.color}:f={"--border":"none","--color":"var(--t-color-text)","--background":"rgba(var(--t-color-surface-rgb), 0.6)"}),t.variant=="text"&&(t.color?["warning","info","danger","primary","secondary","success"].includes(t.color)?f={"--border":"none","--color":"var(--t-color-status-"+t.color+")","--background":"transparent"}:f={"--border":"none","--color":t.color,"--background":"transparent"}:f={"--border":"none","--color":"var(--t-color-text)","--background":"transparent"}),t.variant=="outline"&&(t.color?["warning","info","danger","primary","secondary","success"].includes(t.color)?f={"--border":"0.55px solid var(--t-color-status-"+t.color+")","--color":"var(--t-color-status-"+t.color+")","--background":"transparent"}:f={"--border":"0.55px solid "+t.color,"--color":t.color,"--background":"transparent"}:f={"--border":"0.55px solid var(--t-color-text)","--color":"var(--t-color-text)","--background":"transparent"}),f});return n({open:_}),(f,l)=>c.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["t-toast",{[t.placement]:!0,open:a.value,closing:i.value}]),style:e.normalizeStyle({"--space":t.space,...u.value})},e.toDisplayString(t.message),7)):e.createCommentVNode("",!0)}}),[["__scopeId","data-v-5159a3c5"]]),Z=(o={})=>({open(){let n=document.body.querySelector(".t-app");if(!n)return;const r=document.createElement("div"),t=e.ref();n.appendChild(r);const s=e.createApp({render(){return e.h(P,{...o,ref:t,onClose:()=>{setTimeout(()=>{s.unmount(),r.remove()},300)}})}});s.mount(r),setTimeout(()=>{t.value?.open?.()},50)}}),ee=e.ref(0);function v(){return{height:ee}}const te=y(e.defineComponent({__name:"t-cable",props:{keyboard:{type:Boolean,default:!0},placement:{default:"bottom"}},setup(o){const n=o,{height:r}=v();return(t,s)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["t-cable",{keyboard:n.keyboard&&e.unref(r)>0,[n.placement]:!0}]),style:e.normalizeStyle({"--t-keyboard-height":e.unref(r)+"px","--t-keyboard-transition":e.unref(r)>0?"0.3s":"0.1s"})},[e.renderSlot(t.$slots,"default",{},void 0,!0)],6))}}),[["__scopeId","data-v-ecb72421"]]),oe=e.defineComponent({__name:"t-card",props:{color:{default:null}},setup(o){const n=o,r=e.computed(()=>{let t;return n.color?["warning","info","danger","primary","secondary","success"].includes(n.color)?t={"--background":"var(--t-color-status-"+n.color+")"}:t={"--background":n.color}:t={"--background":"var(--t-color-surface)"},t});return(t,s)=>(e.openBlock(),e.createElementBlock("div",{class:"t-card",style:e.normalizeStyle(r.value)},[e.renderSlot(t.$slots,"default")],4))}}),ne={},re={class:"t-content"};function se(o,n){return e.openBlock(),e.createElementBlock("div",re,[e.renderSlot(o.$slots,"default",{},void 0,!0)])}const le=y(ne,[["render",se],["__scopeId","data-v-9a833657"]]),A=80,ae=y(e.defineComponent({__name:"t-refresher",emits:["refresh"],setup(o,{emit:n}){const r=n,t=e.ref(0),s=e.ref(!1),a=e.ref();let c,i=!1;const _=()=>{s.value=!1,t.value=0,c&&c.cancel(),setTimeout(()=>{i=!1},2e3)},m=()=>{i=!0,s.value=!0,t.value=A,r("refresh",_)};return e.watch(()=>a.value,()=>{c&&c.destroy();let u=a.value.closest(".t-content");u&&(c=$.gesture(u,{options:{minDist:60},move({dy:f}){s.value||i||f<0||(f>=120?m():t.value=f)},up({dy:f}){s.value||i||(f>A?m():t.value=0)},cancel(){s.value=!1,t.value=0}}))}),e.onUnmounted(()=>{c&&c.destroy()}),(u,f)=>e.withDirectives((e.openBlock(),e.createElementBlock("div",{class:"t-refresher",ref_key:"container",ref:a,style:e.normalizeStyle({height:`${t.value}px`})},[e.createElementVNode("img",{class:e.normalizeClass({spiner:s.value}),src:"https://static.toikit.com/toikit/home_2.png?v=3",alt:"Loading...",style:{width:"22px",height:"22px"}},null,2)],4)),[[e.vShow,t.value>0]])}}),[["__scopeId","data-v-688c5394"]]),ce={},ie={class:"t-screen"};function de(o,n){return e.openBlock(),e.createElementBlock("div",ie,[e.renderSlot(o.$slots,"default",{},void 0,!0)])}const R=y(ce,[["render",de],["__scopeId","data-v-66ea8649"]]),pe=y(e.defineComponent({__name:"t-swipe-screen",emits:["change"],setup(o,{emit:n}){let r={};const t=C.useRouter(),s=C.useRoute(),a=t.getRoutes(),c=e.ref(!1),i=n;for(let l of a)r[l.name]=l.components;const _=l=>{l&&g.addScreen({name:l,target:null,component:e.markRaw(r[l]||null)})},m=(l,p)=>{!p||g.screens[l].target||(g.screens[l].target=p.$el,l>0&&(c.value=!0,p.$el.style.transform="translateX(100vw)",p.$el.transitionOrigin="center",document.documentElement.style.setProperty("--t-swipe-backdrop-opacity","0"),setTimeout(()=>{p.$el.style.transition="transform 0.35s ease",p.$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"),g.screens.length>1&&(g.lastScreen.value.target.style.transitionOrigin="left center",g.lastScreen.value.target.style.transition="transform 0.35s ease",g.lastScreen.value.target.style.transform="translateX(-30vw) scale(0.5) perspective(100vw) rotateY(30deg)"),setTimeout(()=>{i("change"),c.value=!1},400)},100)))},u=()=>{g.currentScreen.value.target.style.transition="transform 0.35s ease",g.currentScreen.value.target.style.transform="translateX(100vw) scale(1)",g.lastScreen.value.target.style.transition="transform 0.35s ease",g.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(()=>{g.removeScreen(),i("change"),c.value=!1},400)};_(s.name),e.watch(()=>s.name,(l,p)=>{l!=g.currentScreen.value.name&&(g.lastScreen.value?.name==l?u():_(l))});const f=()=>{c.value=!0;const l=g.currentScreen.value.target,p=g.lastScreen.value.target;l.style.transition="transform 0.35s ease",l.style.transform="translateX(0px)",p.style.transition="transform 0.35s ease",p.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(()=>{c.value=!1},400)};return e.onMounted(()=>{$.gesture(document,{pointerId:null,beforeEvent(l){return c.value||g.screens.length<2?!1:(l.type=="pointerdown"&&!this.pointerId&&(this.pointerId=l.pointerId),this.pointerId==l.pointerId)},afterEvent(l){(l.type=="pointerup"||l.type=="pointercancel")&&(this.pointerId=null)},fast({d:l}){l=="right"&&t.back()},move({dx:l}){const p=window.innerWidth,k=l/p*100,d=g.currentScreen.value.target,h=g.lastScreen?.value?.target;if(l>0&&l<=p){d.style.transition="transform 0s ease",d.style.transform=`translateX(${l}px)`,h.style.transition="transform 0s ease",document.documentElement.style.setProperty("--t-screen-backdrop-duration","0s"),h.style.transform=`translateX(calc(-30vw + (30vw / 100 * ${k}))) scale(${.5+.5/100*k}) perspective(100vw) rotateY(${30-30/100*k}deg)`,document.documentElement.style.setProperty("--t-swipe-backdrop-opacity",`${.5-.5/100*k}`);return}},up({dx:l}){const p=window.innerWidth;l/p*100>=50?t.back():f()},cancel(){f()}})}),(l,p)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(g).screens,(k,d)=>(e.openBlock(),e.createBlock(R,{ref_for:!0,ref:h=>m(d,h),style:e.normalizeStyle({zIndex:d+(d==e.unref(g).screens.length-1?2:1)}),key:d},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(k.component.default)))]),_:2},1032,["style"]))),128)),e.createElementVNode("div",{class:"t-swipe-backdrop",style:e.normalizeStyle({zIndex:e.unref(g).screens.length})},null,4)],64))}}),[["__scopeId","data-v-a048cc07"]]),me=y(e.defineComponent({__name:"t-toolbar",props:{placement:{default:"bottom"},size:{default:"50px"}},setup(o){const n=o;return(r,t)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["t-toolbar",{[n.placement]:!0}]),style:e.normalizeStyle({"--t-size-toolbar":n.size})},[e.createElementVNode("div",null,[e.renderSlot(r.$slots,"default",{},void 0,!0)])],6))}}),[["__scopeId","data-v-3b3a7896"]]),fe=y(e.defineComponent({__name:"t-back-button",props:{to:{}},setup(o){const n=C.useRouter(),r=o,t=()=>{g.hasPrevious.value?n?.back?.():r.to&&n?.push?.(r.to)};return(s,a)=>s.to||e.unref(g).hasPrevious?(e.openBlock(),e.createElementBlock("button",{key:0,class:"t-back-button",onClick:t},[e.renderSlot(s.$slots,"default",{},()=>[a[0]||(a[0]=e.createElementVNode("i",{class:"ri-arrow-left-s-line"},null,-1))],!0)])):e.createCommentVNode("",!0)}}),[["__scopeId","data-v-ed626a3d"]]),x=y(e.defineComponent({__name:"t-text",props:{color:{default:"var(--t-color-text)"},size:{default:"standard"}},setup(o){const n=o,r=e.computed(()=>{let t,s=n.color;return n.size=="standard"?t="var(--t-fs-10)":n.size=="small"?t="var(--t-fs-08)":n.size=="large"?t="var(--t-fs-12)":t=n.size,["warning","info","danger","primary","secondary","success"].includes(n.color)&&(s=`var(--t-color-status-${n.color})`),{"--color":s,"--font-size":t}});return(t,s)=>(e.openBlock(),e.createElementBlock("span",{class:"t-text",style:e.normalizeStyle(r.value)},[e.renderSlot(t.$slots,"default",{},void 0,!0)],4))}}),[["__scopeId","data-v-f0f94f05"]]),q=y(e.defineComponent({__name:"t-pull-signal",props:{placement:{default:"bottom"}},setup(o){return(n,r)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["t-pull-bar",{[n.placement]:!0}])},null,2))}}),[["__scopeId","data-v-daa38c85"]]),ue=y(e.defineComponent({__name:"t-sheet",props:{background:{default:"var(--t-color-surface)"},visible:{type:Boolean,default:!1},gesture:{type:Boolean,default:!0},fullscreen:{type:Boolean,default:!1},placement:{default:"bottom"},keepalive:{type:Boolean,default:!0},backdrop:{type:Boolean,default:!0},rounded:{type:Boolean,default:!0},radius:{type:Boolean,default:!0},closeButton:{type:Boolean,default:!0}},emits:["dismiss"],setup(o,{emit:n}){const r=o,t=n,s=e.ref(),a=e.ref(),c=e.ref(!1);let i=null;const _=e.computed(()=>{if(r.placement=="bottom")return"down";if(r.placement=="top")return"up";if(r.placement=="left")return"left";if(r.placement=="right")return"right"}),m=f=>{t("dismiss",f)},u=()=>{c.value=!0,setTimeout(()=>{c.value=!1},300)};return e.watch(()=>s.value,f=>{f&&(i=$.gesture(s.value,{options:{minDist:30},pointerId:null,beforeEvent(l){let p=!1,k=!1;return c.value||!r.gesture||r.placement=="center"?p=!0:this.pointerId?(p=!0,k=this.pointerId==l.pointerId):l.type=="pointerdown"&&(this.pointerId=l.pointerId,p=!0,k=!0),p&&(l.stopPropagation(),S(l.target)||(l.preventDefault(),E())),k},afterEvent(l){(l.type=="pointerup"||l.type=="pointercancel")&&(this.pointerId=null)},fast({d:l}){u(),l==_.value?t("dismiss","gesture"):a.value.open()},move({dy:l,dx:p,d:k}){if(k!=_.value)return;let d=0;r.placement=="bottom"||r.placement=="top"?d=l:d=p,a.value.render({contentTransform:d+"px",transition:"0s"})},up({dy:l,dx:p,d:k}){if(u(),k!=_.value){a.value.open();return}let d,h,V;r.placement=="bottom"||r.placement=="top"?(d=s.value.offsetHeight,V=l):(d=s.value.offsetWidth,V=p),h=V/d*100,h>50?t("dismiss","gesture"):a.value.open()},cancel(){u(),a.value.open()}}))}),e.onUnmounted(()=>{i&&i.destroy()}),(f,l)=>(e.openBlock(),e.createBlock(w,{ref_key:"present",ref:a,placement:r.placement,backdrop:f.backdrop,visible:r.visible,keepalive:r.keepalive,onDismiss:m},{default:e.withCtx(()=>[r.gesture&&r.placement!="center"?(e.openBlock(),e.createBlock(q,{key:0,placement:r.placement},null,8,["placement"])):e.createCommentVNode("",!0),r.closeButton&&r.placement=="center"?(e.openBlock(),e.createElementBlock("button",{key:1,class:"t-sheet-close",onClick:l[0]||(l[0]=p=>m("close-button"))},[e.renderSlot(f.$slots,"close-icon",{},()=>[l[1]||(l[1]=e.createElementVNode("i",{class:"ri-close-large-line"},null,-1))],!0)])):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(["t-sheet",{fullscreen:r.fullscreen,[r.placement]:!0,rounded:f.rounded,radius:r.radius}]),style:e.normalizeStyle({"--background":r.background}),ref_key:"sheet",ref:s},[e.renderSlot(f.$slots,"default",{},void 0,!0)],6)]),_:3},8,["placement","backdrop","visible","keepalive"]))}}),[["__scopeId","data-v-14b7fc93"]]),_e={class:"t-input-label"},ye={class:"t-input-content"},ke=["type","placeholder","value"],ge=y(e.defineComponent({__name:"t-input",props:{size:{default:"standard"},rounded:{type:Boolean,default:!1},label:{default:""},placeholder:{default:""},type:{default:"text"},help:{},error:{},modelValue:{default:""},variant:{default:"normal"}},emits:["update:modelValue"],setup(o,{emit:n}){const r=o,t=n,s=a=>{t("update:modelValue",a.target.value)};return(a,c)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["t-input",{rounded:r.rounded,["size-"+r.size]:!0}])},[e.createElementVNode("label",null,[e.createElementVNode("span",_e,e.toDisplayString(a.label),1),e.createElementVNode("div",ye,[e.renderSlot(a.$slots,"start",{},void 0,!0),e.createElementVNode("input",{type:a.type,placeholder:a.placeholder,value:a.modelValue,onInput:s},null,40,ke),e.renderSlot(a.$slots,"end",{},void 0,!0)])]),r.error?(e.openBlock(),e.createBlock(x,{key:0,color:"danger"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(r.error),1)]),_:1})):r.help?(e.openBlock(),e.createBlock(x,{key:1,color:"secondary"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(r.help),1)]),_:1})):e.createCommentVNode("",!0)],2))}}),[["__scopeId","data-v-75bf0d19"]]),be={};function he(o,n){return e.openBlock(),e.createElementBlock("textarea")}const Be=y(be,[["render",he]]),$e={};function Se(o,n){return e.openBlock(),e.createElementBlock("div")}const Ee=y($e,[["render",Se]]),we={},Ce={class:"t-grid"};function Te(o,n){return e.openBlock(),e.createElementBlock("div",Ce)}const ze=y(we,[["render",Te]]),xe={},Ve={class:"t-grid-item"};function Ne(o,n){return e.openBlock(),e.createElementBlock("div",Ve)}const Ie=y(xe,[["render",Ne]]),De=y(e.defineComponent({__name:"t-divider",props:{type:{default:"horizontal"}},setup(o){const n=o;return(r,t)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["t-divider",{[n.type]:!0}])},null,2))}}),[["__scopeId","data-v-816784be"]]),Pe=y(e.defineComponent({__name:"t-toggle-password",props:{color:{default:"warning"}},emits:["change"],setup(o,{emit:n}){const r=o,t=n,s=e.ref(!1),a=e.ref(),c=e.computed(()=>{let m=r.color;return["warning","info","danger","primary","secondary","success"].includes(r.color)&&(m=`var(--t-color-status-${r.color})`),{"--color":m}}),i=()=>a.value?.parentElement?.querySelector?.("input");e.onMounted(()=>{let m=i();m&&(s.value=m.type!="password",t("change",s.value))});const _=()=>{let m=i();m&&(s.value=!s.value,s.value?m.type="text":m.type="password",t("change",s.value))};return(m,u)=>(e.openBlock(),e.createElementBlock("button",{ref_key:"toggle",ref:a,class:"t-toggle-password",style:e.normalizeStyle(c.value),onClick:_},[s.value?e.renderSlot(m.$slots,"on",{key:0},()=>[u[0]||(u[0]=e.createElementVNode("i",{class:"ri-eye-line"},null,-1))],!0):e.createCommentVNode("",!0),s.value?e.createCommentVNode("",!0):e.renderSlot(m.$slots,"off",{key:1},()=>[u[1]||(u[1]=e.createElementVNode("i",{class:"ri-eye-off-line"},null,-1))],!0)],4))}}),[["__scopeId","data-v-3268e9e3"]]),ve=y(e.defineComponent({__name:"t-avatar",props:{square:{type:Boolean,default:!1},size:{default:"standard"}},setup(o){const n=o,r=e.computed(()=>n.size=="small"?"24px":n.size=="standard"?"40px":n.size=="large"?"60px":n.size);return(t,s)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["t-avatar",{square:t.square}]),style:e.normalizeStyle({"--size":r.value})},[e.renderSlot(t.$slots,"default",{},void 0,!0)],6))}}),[["__scopeId","data-v-24384c2f"]]),Ae={class:"t-collapse-title"},Re={key:0,class:"icon"},qe={key:1,class:"icon"},Oe={class:"t-collapse-content"},Le=e.defineComponent({__name:"t-collapse",props:{title:{}},emits:["change"],setup(o,{emit:n}){const r=o,t=n,s=e.ref(!1),a=e.ref(""),c=e.ref(),i=()=>{s.value=!s.value,a.value=`calc(${c.value.offsetHeight}px + 2rem)`,t("change",s.value)};return t("change",s.value),(_,m)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["t-collapse",{open:s.value}]),style:e.normalizeStyle({"--height":a.value})},[e.createElementVNode("div",{class:"t-collapse-header",onClick:i},[e.renderSlot(_.$slots,"icon"),e.createElementVNode("div",Ae,[e.renderSlot(_.$slots,"title",{},()=>[e.createTextVNode(e.toDisplayString(r.title),1)])]),e.renderSlot(_.$slots,"toggle",{},()=>[s.value?(e.openBlock(),e.createElementBlock("div",Re,[...m[0]||(m[0]=[e.createElementVNode("i",{class:"ri-arrow-up-s-line"},null,-1)])])):(e.openBlock(),e.createElementBlock("div",qe,[...m[1]||(m[1]=[e.createElementVNode("i",{class:"ri-arrow-down-s-line"},null,-1)])]))])]),e.createElementVNode("div",Oe,[e.createElementVNode("div",{ref_key:"content",ref:c},[e.renderSlot(_.$slots,"content",{},()=>[e.renderSlot(_.$slots,"default")])],512)])],6))}}),Xe=y(e.defineComponent({__name:"t-switch",props:{modelValue:{type:Boolean},color:{default:"primary"}},emits:["update:modelValue"],setup(o,{emit:n}){const r=o,t=n,s=()=>{t("update:modelValue",!r.modelValue)},a=e.computed(()=>{let c={"--background":r.color,"--color":"#ffffff"};return["warning","info","danger","primary","secondary","success"].includes(r.color)&&(c={"--background":`var(--t-color-status-${r.color})`,"--color":`var(--t-color-status-${r.color}-text)`}),c});return(c,i)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["t-switch",{on:r.modelValue}]),style:e.normalizeStyle(a.value),onClick:s},[...i[0]||(i[0]=[e.createElementVNode("div",{class:"t-switch-icon"},null,-1)])],6))}}),[["__scopeId","data-v-3616970e"]]),Fe=()=>({install:o=>{O(),o.component("t-app",U),o.component("t-screen",R),o.component("t-swipe-screen",pe),o.component("t-cable",te),o.component("t-toolbar",me),o.component("t-content",le),o.component("t-card",oe),o.component("t-refresher",ae),o.component("t-button",z),o.component("t-back-button",fe),o.component("t-present",w),o.component("t-text",x),o.component("t-sheet",ue),o.component("t-pull-signal",q),o.component("t-input",ge),o.component("t-textarea",Be),o.component("t-rich-text",Ee),o.component("t-grid",ze),o.component("t-grid-item",Ie),o.component("t-divider",De),o.component("t-toggle-password",Pe),o.component("t-loading-icon",T),o.component("t-alert",N),o.component("t-avatar",ve),o.component("t-collapse",Le),o.component("t-toast",P),o.component("t-switch",Xe)}});b.blurCurrentActive=E,b.createAction=K,b.createAlert=W,b.createLoading=Q,b.createToast=Z,b.createToife=Fe,b.isFormElement=S,b.presentController=D,b.screenController=g,b.useKeyboard=v,Object.defineProperty(b,Symbol.toStringTag,{value:"Module"})}));
|