@toife/vue 1.0.9 → 1.0.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/t-card.vue.d.ts +1 -6
- package/dist/index.css +1 -1
- package/dist/index.es.js +229 -236
- package/dist/index.umd.js +1 -1
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { createElementBlock as f, openBlock as c, renderSlot as
|
|
1
|
+
import { createElementBlock as f, openBlock as c, renderSlot as b, defineComponent as T, ref as v, computed as z, reactive as Z, watch as D, onUnmounted as O, Fragment as A, withDirectives as Y, createCommentVNode as S, normalizeStyle as I, normalizeClass as x, vShow as U, createElementVNode as $, createVNode as ee, createBlock as E, withCtx as P, toDisplayString as B, 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 ne, useRoute as ie } from "vue-router";
|
|
4
4
|
const L = (e) => e && (e.tagName == "INPUT" || e.tagName == "TEXTAREA" || e.isContentEditable), X = () => {
|
|
@@ -8,18 +8,18 @@ const L = (e) => e && (e.tagName == "INPUT" || e.tagName == "TEXTAREA" || e.isCo
|
|
|
8
8
|
document.addEventListener("contextmenu", (e) => e.preventDefault()), document.addEventListener("dblclick", (e) => e.preventDefault()), document.addEventListener("selectstart", (e) => e.preventDefault()), document.addEventListener("gesturestart", (e) => e.preventDefault()), document.addEventListener("pointerup", (e) => {
|
|
9
9
|
!L(e.target) && X();
|
|
10
10
|
});
|
|
11
|
-
},
|
|
12
|
-
const
|
|
13
|
-
for (const [t, r] of
|
|
14
|
-
|
|
15
|
-
return
|
|
11
|
+
}, g = (e, n) => {
|
|
12
|
+
const o = e.__vccOpts || e;
|
|
13
|
+
for (const [t, r] of n)
|
|
14
|
+
o[t] = r;
|
|
15
|
+
return o;
|
|
16
16
|
}, de = {}, pe = { class: "t-app" };
|
|
17
|
-
function fe(e,
|
|
17
|
+
function fe(e, n) {
|
|
18
18
|
return c(), f("div", pe, [
|
|
19
|
-
|
|
19
|
+
b(e.$slots, "default")
|
|
20
20
|
]);
|
|
21
21
|
}
|
|
22
|
-
const me = /* @__PURE__ */
|
|
22
|
+
const me = /* @__PURE__ */ g(de, [["render", fe]]), ve = /* @__PURE__ */ T({
|
|
23
23
|
__name: "t-present",
|
|
24
24
|
props: {
|
|
25
25
|
keepalive: { type: Boolean, default: !0 },
|
|
@@ -28,8 +28,8 @@ const me = /* @__PURE__ */ b(de, [["render", fe]]), ve = /* @__PURE__ */ T({
|
|
|
28
28
|
placement: { default: "bottom" }
|
|
29
29
|
},
|
|
30
30
|
emits: ["dismiss"],
|
|
31
|
-
setup(e, { expose:
|
|
32
|
-
const t = v(0), r = v(!1), a = v(), l = v(), d = e, _ =
|
|
31
|
+
setup(e, { expose: n, emit: o }) {
|
|
32
|
+
const t = v(0), r = v(!1), a = v(), l = v(), d = e, _ = o, p = z(() => r.value || d.keepalive), m = Z({
|
|
33
33
|
"--t-present-backdrop-opacity": "0.4",
|
|
34
34
|
"--t-present-transition": "0.2s",
|
|
35
35
|
"--t-present-content-transform": "0px",
|
|
@@ -58,14 +58,14 @@ const me = /* @__PURE__ */ b(de, [["render", fe]]), ve = /* @__PURE__ */ T({
|
|
|
58
58
|
}, 50)) : (u(), setTimeout(() => {
|
|
59
59
|
r.value = !1;
|
|
60
60
|
}, 200));
|
|
61
|
-
}),
|
|
61
|
+
}), n({
|
|
62
62
|
render: y,
|
|
63
63
|
open: s,
|
|
64
64
|
close: u
|
|
65
65
|
});
|
|
66
|
-
let
|
|
66
|
+
let h;
|
|
67
67
|
return D(() => a.value, (i) => {
|
|
68
|
-
i && (
|
|
68
|
+
i && (h = N(a.value, {
|
|
69
69
|
beforeEvent(w) {
|
|
70
70
|
return w.stopPropagation(), L(w.target) || (w.preventDefault(), X()), w.type == "pointerup";
|
|
71
71
|
},
|
|
@@ -74,7 +74,7 @@ const me = /* @__PURE__ */ b(de, [["render", fe]]), ve = /* @__PURE__ */ T({
|
|
|
74
74
|
}
|
|
75
75
|
}));
|
|
76
76
|
}), O(() => {
|
|
77
|
-
|
|
77
|
+
h && h.destroy();
|
|
78
78
|
}), u(), (i, w) => (c(), f(A, null, [
|
|
79
79
|
p.value ? Y((c(), f("div", {
|
|
80
80
|
key: 0,
|
|
@@ -83,7 +83,7 @@ const me = /* @__PURE__ */ b(de, [["render", fe]]), ve = /* @__PURE__ */ T({
|
|
|
83
83
|
ref: l,
|
|
84
84
|
style: I({ ...m, zIndex: t.value })
|
|
85
85
|
}, [
|
|
86
|
-
|
|
86
|
+
b(i.$slots, "default", {}, void 0, !0)
|
|
87
87
|
], 6)), [
|
|
88
88
|
[U, r.value]
|
|
89
89
|
]) : S("", !0),
|
|
@@ -98,7 +98,7 @@ const me = /* @__PURE__ */ b(de, [["render", fe]]), ve = /* @__PURE__ */ T({
|
|
|
98
98
|
]) : S("", !0)
|
|
99
99
|
], 64));
|
|
100
100
|
}
|
|
101
|
-
}), V = /* @__PURE__ */
|
|
101
|
+
}), V = /* @__PURE__ */ g(ve, [["__scopeId", "data-v-dc2a4bc9"]]), _e = /* @__PURE__ */ T({
|
|
102
102
|
__name: "t-loading-icon",
|
|
103
103
|
props: {
|
|
104
104
|
size: {
|
|
@@ -111,7 +111,7 @@ const me = /* @__PURE__ */ b(de, [["render", fe]]), ve = /* @__PURE__ */ T({
|
|
|
111
111
|
}
|
|
112
112
|
},
|
|
113
113
|
setup(e) {
|
|
114
|
-
return (
|
|
114
|
+
return (n, o) => (c(), f("span", {
|
|
115
115
|
class: "t-loading-icon",
|
|
116
116
|
style: I({
|
|
117
117
|
width: e.size,
|
|
@@ -122,7 +122,7 @@ const me = /* @__PURE__ */ b(de, [["render", fe]]), ve = /* @__PURE__ */ T({
|
|
|
122
122
|
"aria-label": "Loading..."
|
|
123
123
|
}, null, 4));
|
|
124
124
|
}
|
|
125
|
-
}), K = /* @__PURE__ */
|
|
125
|
+
}), K = /* @__PURE__ */ g(_e, [["__scopeId", "data-v-7c463303"]]), ye = {
|
|
126
126
|
key: 0,
|
|
127
127
|
class: "loader"
|
|
128
128
|
}, ge = /* @__PURE__ */ T({
|
|
@@ -138,37 +138,37 @@ const me = /* @__PURE__ */ b(de, [["render", fe]]), ve = /* @__PURE__ */ T({
|
|
|
138
138
|
activeBackground: { type: Boolean, default: !1 }
|
|
139
139
|
},
|
|
140
140
|
setup(e) {
|
|
141
|
-
const
|
|
141
|
+
const n = e, o = z(() => {
|
|
142
142
|
let t;
|
|
143
|
-
return
|
|
144
|
-
"--color": "var(--t-color-text)",
|
|
145
|
-
"--background-color": "var(--t-color-status-" +
|
|
143
|
+
return n.color ? ["warning", "info", "danger", "primary", "secondary", "success"].includes(n.color) ? t = {
|
|
144
|
+
"--color": "var(--t-color-status-" + n.color + "-text)",
|
|
145
|
+
"--background-color": "var(--t-color-status-" + n.color + ")"
|
|
146
146
|
} : t = {
|
|
147
147
|
"--color": "var(--t-color-text)",
|
|
148
|
-
"--background-color":
|
|
148
|
+
"--background-color": n.color
|
|
149
149
|
} : t = {
|
|
150
150
|
"--color": "var(--t-color-text)",
|
|
151
151
|
"--background-color": "transparent"
|
|
152
152
|
}, t;
|
|
153
153
|
});
|
|
154
154
|
return (t, r) => (c(), f("button", {
|
|
155
|
-
class: x(["t-button", { "active-background":
|
|
156
|
-
style: I(
|
|
155
|
+
class: x(["t-button", { "active-background": n.activeBackground, rounded: n.rounded, block: n.block, ["size-" + n.size]: !0, ["variant-" + n.variant]: !0 }]),
|
|
156
|
+
style: I(o.value)
|
|
157
157
|
}, [
|
|
158
158
|
Y($("span", null, [
|
|
159
|
-
|
|
159
|
+
b(t.$slots, "default", {}, void 0, !0)
|
|
160
160
|
], 512), [
|
|
161
|
-
[U, !
|
|
161
|
+
[U, !n.loading]
|
|
162
162
|
]),
|
|
163
|
-
|
|
163
|
+
n.loading ? (c(), f("span", ye, [
|
|
164
164
|
ee(K, {
|
|
165
165
|
color: "var(--color)",
|
|
166
|
-
type:
|
|
166
|
+
type: n.loadingType
|
|
167
167
|
}, null, 8, ["type"])
|
|
168
168
|
])) : S("", !0)
|
|
169
169
|
], 6));
|
|
170
170
|
}
|
|
171
|
-
}), M = /* @__PURE__ */
|
|
171
|
+
}), M = /* @__PURE__ */ g(ge, [["__scopeId", "data-v-cdfe6af8"]]), he = {
|
|
172
172
|
key: 0,
|
|
173
173
|
class: "t-alert-header"
|
|
174
174
|
}, be = { class: "t-alert-content" }, ke = { class: "t-alert-footer" }, $e = /* @__PURE__ */ T({
|
|
@@ -179,8 +179,8 @@ const me = /* @__PURE__ */ b(de, [["render", fe]]), ve = /* @__PURE__ */ T({
|
|
|
179
179
|
actions: {}
|
|
180
180
|
},
|
|
181
181
|
emits: ["close"],
|
|
182
|
-
setup(e, { expose:
|
|
183
|
-
const t = e, r = v(!1), a =
|
|
182
|
+
setup(e, { expose: n, emit: o }) {
|
|
183
|
+
const t = e, r = v(!1), a = o, l = v();
|
|
184
184
|
let d;
|
|
185
185
|
const _ = v(!1), p = () => {
|
|
186
186
|
r.value = !0;
|
|
@@ -191,7 +191,7 @@ const me = /* @__PURE__ */ b(de, [["render", fe]]), ve = /* @__PURE__ */ T({
|
|
|
191
191
|
_.value = !1;
|
|
192
192
|
}, 300));
|
|
193
193
|
};
|
|
194
|
-
return
|
|
194
|
+
return n({
|
|
195
195
|
open: p
|
|
196
196
|
}), D(() => l.value, (s) => {
|
|
197
197
|
s && (d = N(l.value, {
|
|
@@ -214,21 +214,21 @@ const me = /* @__PURE__ */ b(de, [["render", fe]]), ve = /* @__PURE__ */ T({
|
|
|
214
214
|
ref_key: "container",
|
|
215
215
|
ref: l
|
|
216
216
|
}, [
|
|
217
|
-
|
|
218
|
-
t.title ? (c(), f("div", he,
|
|
217
|
+
b(s.$slots, "header", {}, () => [
|
|
218
|
+
t.title ? (c(), f("div", he, B(t.title), 1)) : S("", !0)
|
|
219
219
|
], !0),
|
|
220
|
-
|
|
221
|
-
$("div", be,
|
|
220
|
+
b(s.$slots, "content", {}, () => [
|
|
221
|
+
$("div", be, B(t.message), 1)
|
|
222
222
|
], !0),
|
|
223
|
-
|
|
223
|
+
b(s.$slots, "footer", {}, () => [
|
|
224
224
|
$("div", ke, [
|
|
225
|
-
(c(!0), f(A, null, W(t.actions, (
|
|
226
|
-
color:
|
|
227
|
-
variant:
|
|
228
|
-
onClick: (i) => m(
|
|
225
|
+
(c(!0), f(A, null, W(t.actions, (h) => (c(), E(M, {
|
|
226
|
+
color: h.color,
|
|
227
|
+
variant: h.variant,
|
|
228
|
+
onClick: (i) => m(h)
|
|
229
229
|
}, {
|
|
230
230
|
default: P(() => [
|
|
231
|
-
q(
|
|
231
|
+
q(B(h.text), 1)
|
|
232
232
|
]),
|
|
233
233
|
_: 2
|
|
234
234
|
}, 1032, ["color", "variant", "onClick"]))), 256))
|
|
@@ -239,13 +239,13 @@ const me = /* @__PURE__ */ b(de, [["render", fe]]), ve = /* @__PURE__ */ T({
|
|
|
239
239
|
_: 3
|
|
240
240
|
}, 8, ["visible"]));
|
|
241
241
|
}
|
|
242
|
-
}), oe = /* @__PURE__ */
|
|
242
|
+
}), oe = /* @__PURE__ */ g($e, [["__scopeId", "data-v-0063c9df"]]), Ot = (e = {}) => ({
|
|
243
243
|
open() {
|
|
244
|
-
return new Promise((
|
|
245
|
-
let
|
|
246
|
-
if (!
|
|
244
|
+
return new Promise((n) => {
|
|
245
|
+
let o = document.body.querySelector(".t-app");
|
|
246
|
+
if (!o) return;
|
|
247
247
|
const t = document.createElement("div"), r = v();
|
|
248
|
-
|
|
248
|
+
o.appendChild(t);
|
|
249
249
|
const a = F({
|
|
250
250
|
render() {
|
|
251
251
|
return G(oe, {
|
|
@@ -254,7 +254,7 @@ const me = /* @__PURE__ */ b(de, [["render", fe]]), ve = /* @__PURE__ */ T({
|
|
|
254
254
|
onClose: (l) => {
|
|
255
255
|
setTimeout(() => {
|
|
256
256
|
a.unmount(), t.remove();
|
|
257
|
-
}, 300),
|
|
257
|
+
}, 300), n(l);
|
|
258
258
|
}
|
|
259
259
|
});
|
|
260
260
|
}
|
|
@@ -270,8 +270,8 @@ const me = /* @__PURE__ */ b(de, [["render", fe]]), ve = /* @__PURE__ */ T({
|
|
|
270
270
|
actions: {}
|
|
271
271
|
},
|
|
272
272
|
emits: ["close"],
|
|
273
|
-
setup(e, { expose:
|
|
274
|
-
const t = e, r = v(!1), a =
|
|
273
|
+
setup(e, { expose: n, emit: o }) {
|
|
274
|
+
const t = e, r = v(!1), a = o, l = v();
|
|
275
275
|
let d;
|
|
276
276
|
const _ = v(!1), p = () => {
|
|
277
277
|
r.value = !0;
|
|
@@ -282,7 +282,7 @@ const me = /* @__PURE__ */ b(de, [["render", fe]]), ve = /* @__PURE__ */ T({
|
|
|
282
282
|
_.value = !1;
|
|
283
283
|
}, 300));
|
|
284
284
|
};
|
|
285
|
-
return
|
|
285
|
+
return n({
|
|
286
286
|
open: p
|
|
287
287
|
}), D(() => l.value, (s) => {
|
|
288
288
|
s && (d = N(l.value, {
|
|
@@ -305,8 +305,8 @@ const me = /* @__PURE__ */ b(de, [["render", fe]]), ve = /* @__PURE__ */ T({
|
|
|
305
305
|
ref_key: "container",
|
|
306
306
|
ref: l
|
|
307
307
|
}, [
|
|
308
|
-
(c(!0), f(A, null, W(t.actions, (
|
|
309
|
-
(c(!0), f(A, null, W(
|
|
308
|
+
(c(!0), f(A, null, W(t.actions, (h) => (c(), f("div", null, [
|
|
309
|
+
(c(!0), f(A, null, W(h, (i) => (c(), E(M, {
|
|
310
310
|
color: i.color,
|
|
311
311
|
size: i.size,
|
|
312
312
|
variant: i.variant,
|
|
@@ -314,7 +314,7 @@ const me = /* @__PURE__ */ b(de, [["render", fe]]), ve = /* @__PURE__ */ T({
|
|
|
314
314
|
block: ""
|
|
315
315
|
}, {
|
|
316
316
|
default: P(() => [
|
|
317
|
-
q(
|
|
317
|
+
q(B(i.text), 1)
|
|
318
318
|
]),
|
|
319
319
|
_: 2
|
|
320
320
|
}, 1032, ["color", "size", "variant", "onClick"]))), 256))
|
|
@@ -324,13 +324,13 @@ const me = /* @__PURE__ */ b(de, [["render", fe]]), ve = /* @__PURE__ */ T({
|
|
|
324
324
|
_: 1
|
|
325
325
|
}, 8, ["visible"]));
|
|
326
326
|
}
|
|
327
|
-
}), we = /* @__PURE__ */
|
|
327
|
+
}), we = /* @__PURE__ */ g(Te, [["__scopeId", "data-v-42000b04"]]), Lt = (e = {}) => ({
|
|
328
328
|
open() {
|
|
329
|
-
return new Promise((
|
|
330
|
-
let
|
|
331
|
-
if (!
|
|
329
|
+
return new Promise((n) => {
|
|
330
|
+
let o = document.body.querySelector(".t-app");
|
|
331
|
+
if (!o) return;
|
|
332
332
|
const t = document.createElement("div"), r = v();
|
|
333
|
-
|
|
333
|
+
o.appendChild(t);
|
|
334
334
|
const a = F({
|
|
335
335
|
render() {
|
|
336
336
|
return G(we, {
|
|
@@ -339,7 +339,7 @@ const me = /* @__PURE__ */ b(de, [["render", fe]]), ve = /* @__PURE__ */ T({
|
|
|
339
339
|
onClose: (l) => {
|
|
340
340
|
setTimeout(() => {
|
|
341
341
|
a.unmount(), t.remove();
|
|
342
|
-
}, 300),
|
|
342
|
+
}, 300), n(l);
|
|
343
343
|
}
|
|
344
344
|
});
|
|
345
345
|
}
|
|
@@ -355,10 +355,10 @@ const me = /* @__PURE__ */ b(de, [["render", fe]]), ve = /* @__PURE__ */ T({
|
|
|
355
355
|
type: { default: "spinner" }
|
|
356
356
|
},
|
|
357
357
|
emits: ["close"],
|
|
358
|
-
setup(e, { expose:
|
|
358
|
+
setup(e, { expose: n, emit: o }) {
|
|
359
359
|
const t = e, r = v(!1), a = v();
|
|
360
360
|
let l;
|
|
361
|
-
return
|
|
361
|
+
return n({
|
|
362
362
|
open: () => {
|
|
363
363
|
r.value = !0;
|
|
364
364
|
},
|
|
@@ -385,7 +385,7 @@ const me = /* @__PURE__ */ b(de, [["render", fe]]), ve = /* @__PURE__ */ T({
|
|
|
385
385
|
ref_key: "container",
|
|
386
386
|
ref: a
|
|
387
387
|
}, [
|
|
388
|
-
|
|
388
|
+
b(p.$slots, "default", {}, () => [
|
|
389
389
|
ee(K, {
|
|
390
390
|
type: t.type
|
|
391
391
|
}, null, 8, ["type"])
|
|
@@ -395,27 +395,27 @@ const me = /* @__PURE__ */ b(de, [["render", fe]]), ve = /* @__PURE__ */ T({
|
|
|
395
395
|
_: 3
|
|
396
396
|
}, 8, ["visible"]));
|
|
397
397
|
}
|
|
398
|
-
}), xe = /* @__PURE__ */
|
|
399
|
-
const
|
|
398
|
+
}), xe = /* @__PURE__ */ g(Ie, [["__scopeId", "data-v-96624ceb"]]), Xt = (e = {}) => {
|
|
399
|
+
const n = v(), o = document.body.querySelector(".t-app");
|
|
400
400
|
let t = null, r = null;
|
|
401
401
|
return {
|
|
402
402
|
open() {
|
|
403
403
|
return new Promise((a) => {
|
|
404
|
-
|
|
404
|
+
o && (r = document.createElement("div"), o.appendChild(r), t = F({
|
|
405
405
|
render() {
|
|
406
406
|
return G(xe, {
|
|
407
407
|
...e,
|
|
408
|
-
ref:
|
|
408
|
+
ref: n
|
|
409
409
|
});
|
|
410
410
|
}
|
|
411
411
|
}), t.mount(r), setTimeout(() => {
|
|
412
|
-
|
|
412
|
+
n.value?.open?.(), a(!0);
|
|
413
413
|
}, 50));
|
|
414
414
|
});
|
|
415
415
|
},
|
|
416
416
|
close() {
|
|
417
417
|
return new Promise((a) => {
|
|
418
|
-
|
|
418
|
+
n.value?.close?.(), setTimeout(() => {
|
|
419
419
|
t?.unmount?.(), r?.remove?.(), a(!0);
|
|
420
420
|
}, 300);
|
|
421
421
|
});
|
|
@@ -425,21 +425,21 @@ const me = /* @__PURE__ */ b(de, [["render", fe]]), ve = /* @__PURE__ */ T({
|
|
|
425
425
|
getNewIndex() {
|
|
426
426
|
return J.value += 2, J.value;
|
|
427
427
|
}
|
|
428
|
-
},
|
|
429
|
-
|
|
428
|
+
}, C = Z([]), Ee = (e) => {
|
|
429
|
+
C.push(e);
|
|
430
430
|
}, ze = (e) => {
|
|
431
|
-
e ||
|
|
431
|
+
e || C.pop();
|
|
432
432
|
}, k = {
|
|
433
|
-
screens:
|
|
433
|
+
screens: C,
|
|
434
434
|
addScreen: Ee,
|
|
435
435
|
removeScreen: ze,
|
|
436
|
-
hasPrevious: z(() =>
|
|
437
|
-
currentScreen: z(() =>
|
|
436
|
+
hasPrevious: z(() => C.length > 1),
|
|
437
|
+
currentScreen: z(() => C[C.length - 1]),
|
|
438
438
|
lastScreen: z(() => {
|
|
439
|
-
if (!(
|
|
440
|
-
return
|
|
439
|
+
if (!(C.length < 2))
|
|
440
|
+
return C[C.length - 2];
|
|
441
441
|
})
|
|
442
|
-
},
|
|
442
|
+
}, Ce = /* @__PURE__ */ T({
|
|
443
443
|
__name: "t-toast",
|
|
444
444
|
props: {
|
|
445
445
|
message: {},
|
|
@@ -450,8 +450,8 @@ const me = /* @__PURE__ */ b(de, [["render", fe]]), ve = /* @__PURE__ */ T({
|
|
|
450
450
|
variant: { default: "default" }
|
|
451
451
|
},
|
|
452
452
|
emits: ["close"],
|
|
453
|
-
setup(e, { expose:
|
|
454
|
-
const t = e, r =
|
|
453
|
+
setup(e, { expose: n, emit: o }) {
|
|
454
|
+
const t = e, r = o, a = v(!1), l = v(!1), d = v(!1), _ = () => {
|
|
455
455
|
l.value = !0, d.value = !1, setTimeout(() => {
|
|
456
456
|
a.value = !0;
|
|
457
457
|
}, 10), setTimeout(() => {
|
|
@@ -462,20 +462,20 @@ const me = /* @__PURE__ */ b(de, [["render", fe]]), ve = /* @__PURE__ */ T({
|
|
|
462
462
|
l.value = !1, a.value = !1, r("close");
|
|
463
463
|
}, 300);
|
|
464
464
|
}, m = z(() => ["warning", "info", "danger", "primary", "secondary", "success"].includes(t.color) ? `var(--t-color-status-${t.color}-rgb)` : t.color);
|
|
465
|
-
return
|
|
465
|
+
return n({
|
|
466
466
|
open: _
|
|
467
467
|
}), (y, s) => l.value ? (c(), f("div", {
|
|
468
468
|
key: 0,
|
|
469
469
|
class: x(["t-toast", { [t.placement]: !0, open: a.value, closing: d.value, ["variant-" + t.variant]: !0 }]),
|
|
470
470
|
style: I({ "--space": t.space, "--color": m.value })
|
|
471
|
-
},
|
|
471
|
+
}, B(t.message), 7)) : S("", !0);
|
|
472
472
|
}
|
|
473
|
-
}), se = /* @__PURE__ */
|
|
473
|
+
}), se = /* @__PURE__ */ g(Ce, [["__scopeId", "data-v-5b3334bc"]]), qt = (e = {}) => ({
|
|
474
474
|
open() {
|
|
475
|
-
let
|
|
476
|
-
if (!
|
|
477
|
-
const
|
|
478
|
-
|
|
475
|
+
let n = document.body.querySelector(".t-app");
|
|
476
|
+
if (!n) return;
|
|
477
|
+
const o = document.createElement("div"), t = v();
|
|
478
|
+
n.appendChild(o);
|
|
479
479
|
const r = F({
|
|
480
480
|
render() {
|
|
481
481
|
return G(se, {
|
|
@@ -483,20 +483,20 @@ const me = /* @__PURE__ */ b(de, [["render", fe]]), ve = /* @__PURE__ */ T({
|
|
|
483
483
|
ref: t,
|
|
484
484
|
onClose: () => {
|
|
485
485
|
setTimeout(() => {
|
|
486
|
-
r.unmount(),
|
|
486
|
+
r.unmount(), o.remove();
|
|
487
487
|
}, 300);
|
|
488
488
|
}
|
|
489
489
|
});
|
|
490
490
|
}
|
|
491
491
|
});
|
|
492
|
-
r.mount(
|
|
492
|
+
r.mount(o), setTimeout(() => {
|
|
493
493
|
t.value?.open?.();
|
|
494
494
|
}, 50);
|
|
495
495
|
}
|
|
496
|
-
}),
|
|
496
|
+
}), Be = v(0);
|
|
497
497
|
function Pe() {
|
|
498
498
|
return {
|
|
499
|
-
height:
|
|
499
|
+
height: Be
|
|
500
500
|
};
|
|
501
501
|
}
|
|
502
502
|
const De = /* @__PURE__ */ T({
|
|
@@ -506,45 +506,38 @@ const De = /* @__PURE__ */ T({
|
|
|
506
506
|
placement: { default: "bottom" }
|
|
507
507
|
},
|
|
508
508
|
setup(e) {
|
|
509
|
-
const
|
|
509
|
+
const n = e, { height: o } = Pe();
|
|
510
510
|
return (t, r) => (c(), f("div", {
|
|
511
|
-
class: x(["t-cable", { keyboard:
|
|
512
|
-
style: I({ "--t-keyboard-height": R(
|
|
511
|
+
class: x(["t-cable", { keyboard: n.keyboard && R(o) > 0, [n.placement]: !0 }]),
|
|
512
|
+
style: I({ "--t-keyboard-height": R(o) + "px", "--t-keyboard-transition": R(o) > 0 ? "0.3s" : "0.1s" })
|
|
513
513
|
}, [
|
|
514
|
-
|
|
514
|
+
b(t.$slots, "default", {}, void 0, !0)
|
|
515
515
|
], 6));
|
|
516
516
|
}
|
|
517
|
-
}), Re = /* @__PURE__ */
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
},
|
|
527
|
-
h(n.$slots, "default")
|
|
528
|
-
], 2));
|
|
529
|
-
}
|
|
530
|
-
}), Ae = {}, Oe = { class: "t-content" };
|
|
531
|
-
function Le(e, o) {
|
|
532
|
-
return c(), f("div", Oe, [
|
|
533
|
-
h(e.$slots, "default", {}, void 0, !0)
|
|
517
|
+
}), Re = /* @__PURE__ */ g(De, [["__scopeId", "data-v-ecb72421"]]), Ne = {}, Ae = { class: "t-card" };
|
|
518
|
+
function Oe(e, n) {
|
|
519
|
+
return c(), f("div", Ae, [
|
|
520
|
+
b(e.$slots, "default")
|
|
521
|
+
]);
|
|
522
|
+
}
|
|
523
|
+
const Le = /* @__PURE__ */ g(Ne, [["render", Oe]]), Xe = {}, qe = { class: "t-content" };
|
|
524
|
+
function Ve(e, n) {
|
|
525
|
+
return c(), f("div", qe, [
|
|
526
|
+
b(e.$slots, "default", {}, void 0, !0)
|
|
534
527
|
]);
|
|
535
528
|
}
|
|
536
|
-
const
|
|
529
|
+
const Ye = /* @__PURE__ */ g(Xe, [["render", Ve], ["__scopeId", "data-v-ea276571"]]), Q = 80, Ue = /* @__PURE__ */ T({
|
|
537
530
|
__name: "t-refresher",
|
|
538
531
|
emits: ["refresh"],
|
|
539
|
-
setup(e, { emit:
|
|
540
|
-
const
|
|
532
|
+
setup(e, { emit: n }) {
|
|
533
|
+
const o = n, t = v(0), r = v(!1), a = v();
|
|
541
534
|
let l, d = !1;
|
|
542
535
|
const _ = () => {
|
|
543
536
|
r.value = !1, t.value = 0, l && l.cancel(), setTimeout(() => {
|
|
544
537
|
d = !1;
|
|
545
538
|
}, 2e3);
|
|
546
539
|
}, p = () => {
|
|
547
|
-
d = !0, r.value = !0, t.value = Q,
|
|
540
|
+
d = !0, r.value = !0, t.value = Q, o("refresh", _);
|
|
548
541
|
};
|
|
549
542
|
return D(() => a.value, () => {
|
|
550
543
|
l && l.destroy();
|
|
@@ -581,25 +574,25 @@ const Xe = /* @__PURE__ */ b(Ae, [["render", Le], ["__scopeId", "data-v-ea276571
|
|
|
581
574
|
[U, t.value > 0]
|
|
582
575
|
]);
|
|
583
576
|
}
|
|
584
|
-
}),
|
|
585
|
-
function
|
|
586
|
-
return c(), f("div",
|
|
587
|
-
|
|
577
|
+
}), We = /* @__PURE__ */ g(Ue, [["__scopeId", "data-v-7f97bb1a"]]), Fe = {}, Ge = { class: "t-screen" };
|
|
578
|
+
function He(e, n) {
|
|
579
|
+
return c(), f("div", Ge, [
|
|
580
|
+
b(e.$slots, "default", {}, void 0, !0)
|
|
588
581
|
]);
|
|
589
582
|
}
|
|
590
|
-
const re = /* @__PURE__ */
|
|
583
|
+
const re = /* @__PURE__ */ g(Fe, [["render", He], ["__scopeId", "data-v-66ea8649"]]), je = /* @__PURE__ */ T({
|
|
591
584
|
__name: "t-swipe-screen",
|
|
592
585
|
emits: ["change"],
|
|
593
|
-
setup(e, { emit:
|
|
594
|
-
let
|
|
595
|
-
const t = ne(), r = ie(), a = t.getRoutes(), l = v(!1), d =
|
|
586
|
+
setup(e, { emit: n }) {
|
|
587
|
+
let o = {};
|
|
588
|
+
const t = ne(), r = ie(), a = t.getRoutes(), l = v(!1), d = n;
|
|
596
589
|
for (let s of a)
|
|
597
|
-
|
|
590
|
+
o[s.name] = s.components;
|
|
598
591
|
const _ = (s) => {
|
|
599
592
|
s && k.addScreen({
|
|
600
593
|
name: s,
|
|
601
594
|
target: null,
|
|
602
|
-
component: ce(
|
|
595
|
+
component: ce(o[s] || null)
|
|
603
596
|
});
|
|
604
597
|
}, p = (s, u) => {
|
|
605
598
|
!u || k.screens[s].target || (k.screens[s].target = u.$el, s > 0 && (l.value = !0, u.$el.style.transform = "translateX(100vw)", u.$el.transitionOrigin = "center", document.documentElement.style.setProperty("--t-swipe-backdrop-opacity", "0"), setTimeout(() => {
|
|
@@ -635,9 +628,9 @@ const re = /* @__PURE__ */ b(Ye, [["render", We], ["__scopeId", "data-v-66ea8649
|
|
|
635
628
|
s == "right" && t.back();
|
|
636
629
|
},
|
|
637
630
|
move({ dx: s }) {
|
|
638
|
-
const u = window.innerWidth,
|
|
631
|
+
const u = window.innerWidth, h = s / u * 100, i = k.currentScreen.value.target, w = k.lastScreen?.value?.target;
|
|
639
632
|
if (s > 0 && s <= u) {
|
|
640
|
-
i.style.transition = "transform 0s ease", i.style.transform = `translateX(${s}px)`, w.style.transition = "transform 0s ease", document.documentElement.style.setProperty("--t-screen-backdrop-duration", "0s"), w.style.transform = `translateX(calc(-30vw + (30vw / 100 * ${
|
|
633
|
+
i.style.transition = "transform 0s ease", i.style.transform = `translateX(${s}px)`, w.style.transition = "transform 0s ease", document.documentElement.style.setProperty("--t-screen-backdrop-duration", "0s"), w.style.transform = `translateX(calc(-30vw + (30vw / 100 * ${h}))) scale(${0.5 + 0.5 / 100 * h}) perspective(100vw) rotateY(${30 - 30 / 100 * h}deg)`, document.documentElement.style.setProperty("--t-swipe-backdrop-opacity", `${0.5 - 0.5 / 100 * h}`);
|
|
641
634
|
return;
|
|
642
635
|
}
|
|
643
636
|
},
|
|
@@ -650,14 +643,14 @@ const re = /* @__PURE__ */ b(Ye, [["render", We], ["__scopeId", "data-v-66ea8649
|
|
|
650
643
|
}
|
|
651
644
|
});
|
|
652
645
|
}), (s, u) => (c(), f(A, null, [
|
|
653
|
-
(c(!0), f(A, null, W(R(k).screens, (
|
|
646
|
+
(c(!0), f(A, null, W(R(k).screens, (h, i) => (c(), E(re, {
|
|
654
647
|
ref_for: !0,
|
|
655
648
|
ref: (w) => p(i, w),
|
|
656
649
|
style: I({ zIndex: i + (i == R(k).screens.length - 1 ? 2 : 1) }),
|
|
657
650
|
key: i
|
|
658
651
|
}, {
|
|
659
652
|
default: P(() => [
|
|
660
|
-
(c(), E(le(
|
|
653
|
+
(c(), E(le(h.component.default)))
|
|
661
654
|
]),
|
|
662
655
|
_: 2
|
|
663
656
|
}, 1032, ["style"]))), 128)),
|
|
@@ -667,74 +660,74 @@ const re = /* @__PURE__ */ b(Ye, [["render", We], ["__scopeId", "data-v-66ea8649
|
|
|
667
660
|
}, null, 4)
|
|
668
661
|
], 64));
|
|
669
662
|
}
|
|
670
|
-
}),
|
|
663
|
+
}), Ke = /* @__PURE__ */ g(je, [["__scopeId", "data-v-a048cc07"]]), Me = /* @__PURE__ */ T({
|
|
671
664
|
__name: "t-toolbar",
|
|
672
665
|
props: {
|
|
673
666
|
placement: { default: "bottom" },
|
|
674
667
|
size: { default: "50px" }
|
|
675
668
|
},
|
|
676
669
|
setup(e) {
|
|
677
|
-
const
|
|
678
|
-
return (
|
|
679
|
-
class: x(["t-toolbar", { [
|
|
680
|
-
style: I({ "--t-size-toolbar":
|
|
670
|
+
const n = e;
|
|
671
|
+
return (o, t) => (c(), f("div", {
|
|
672
|
+
class: x(["t-toolbar", { [n.placement]: !0 }]),
|
|
673
|
+
style: I({ "--t-size-toolbar": n.size })
|
|
681
674
|
}, [
|
|
682
675
|
$("div", null, [
|
|
683
|
-
|
|
676
|
+
b(o.$slots, "default", {}, void 0, !0)
|
|
684
677
|
])
|
|
685
678
|
], 6));
|
|
686
679
|
}
|
|
687
|
-
}),
|
|
680
|
+
}), Je = /* @__PURE__ */ g(Me, [["__scopeId", "data-v-3b3a7896"]]), Qe = /* @__PURE__ */ T({
|
|
688
681
|
__name: "t-back-button",
|
|
689
682
|
props: {
|
|
690
683
|
to: {}
|
|
691
684
|
},
|
|
692
685
|
setup(e) {
|
|
693
|
-
const
|
|
694
|
-
k.hasPrevious.value ?
|
|
686
|
+
const n = ne(), o = e, t = () => {
|
|
687
|
+
k.hasPrevious.value ? n?.back?.() : o.to && n?.push?.(o.to);
|
|
695
688
|
};
|
|
696
689
|
return (r, a) => r.to || R(k).hasPrevious ? (c(), f("button", {
|
|
697
690
|
key: 0,
|
|
698
691
|
class: "t-back-button",
|
|
699
692
|
onClick: t
|
|
700
693
|
}, [
|
|
701
|
-
|
|
694
|
+
b(r.$slots, "default", {}, () => [
|
|
702
695
|
a[0] || (a[0] = $("i", { class: "ri-arrow-left-s-line" }, null, -1))
|
|
703
696
|
], !0)
|
|
704
697
|
])) : S("", !0);
|
|
705
698
|
}
|
|
706
|
-
}),
|
|
699
|
+
}), Ze = /* @__PURE__ */ g(Qe, [["__scopeId", "data-v-ed626a3d"]]), et = /* @__PURE__ */ T({
|
|
707
700
|
__name: "t-text",
|
|
708
701
|
props: {
|
|
709
702
|
color: { default: "var(--t-color-text)" },
|
|
710
703
|
size: { default: "standard" }
|
|
711
704
|
},
|
|
712
705
|
setup(e) {
|
|
713
|
-
const
|
|
714
|
-
let t, r =
|
|
715
|
-
return
|
|
706
|
+
const n = e, o = z(() => {
|
|
707
|
+
let t, r = n.color;
|
|
708
|
+
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) && (r = `var(--t-color-status-${n.color})`), {
|
|
716
709
|
"--color": r,
|
|
717
710
|
"--font-size": t
|
|
718
711
|
};
|
|
719
712
|
});
|
|
720
713
|
return (t, r) => (c(), f("span", {
|
|
721
714
|
class: "t-text",
|
|
722
|
-
style: I(
|
|
715
|
+
style: I(o.value)
|
|
723
716
|
}, [
|
|
724
|
-
|
|
717
|
+
b(t.$slots, "default", {}, void 0, !0)
|
|
725
718
|
], 4));
|
|
726
719
|
}
|
|
727
|
-
}), j = /* @__PURE__ */
|
|
720
|
+
}), j = /* @__PURE__ */ g(et, [["__scopeId", "data-v-f0f94f05"]]), tt = /* @__PURE__ */ T({
|
|
728
721
|
__name: "t-pull-signal",
|
|
729
722
|
props: {
|
|
730
723
|
placement: { default: "bottom" }
|
|
731
724
|
},
|
|
732
725
|
setup(e) {
|
|
733
|
-
return (
|
|
734
|
-
class: x(["t-pull-bar", { [
|
|
726
|
+
return (n, o) => (c(), f("div", {
|
|
727
|
+
class: x(["t-pull-bar", { [n.placement]: !0 }])
|
|
735
728
|
}, null, 2));
|
|
736
729
|
}
|
|
737
|
-
}), ae = /* @__PURE__ */
|
|
730
|
+
}), ae = /* @__PURE__ */ g(tt, [["__scopeId", "data-v-0e72394a"]]), nt = /* @__PURE__ */ T({
|
|
738
731
|
__name: "t-sheet",
|
|
739
732
|
props: {
|
|
740
733
|
background: { default: "var(--t-color-surface)" },
|
|
@@ -748,14 +741,14 @@ const re = /* @__PURE__ */ b(Ye, [["render", We], ["__scopeId", "data-v-66ea8649
|
|
|
748
741
|
closeButton: { type: Boolean, default: !0 }
|
|
749
742
|
},
|
|
750
743
|
emits: ["dismiss"],
|
|
751
|
-
setup(e, { emit:
|
|
752
|
-
const
|
|
744
|
+
setup(e, { emit: n }) {
|
|
745
|
+
const o = e, t = n, r = v(), a = v(), l = v(!1);
|
|
753
746
|
let d = null;
|
|
754
747
|
const _ = z(() => {
|
|
755
|
-
if (
|
|
756
|
-
if (
|
|
757
|
-
if (
|
|
758
|
-
if (
|
|
748
|
+
if (o.placement == "bottom") return "down";
|
|
749
|
+
if (o.placement == "top") return "up";
|
|
750
|
+
if (o.placement == "left") return "left";
|
|
751
|
+
if (o.placement == "right") return "right";
|
|
759
752
|
}), p = (y) => {
|
|
760
753
|
t("dismiss", y);
|
|
761
754
|
}, m = () => {
|
|
@@ -770,8 +763,8 @@ const re = /* @__PURE__ */ b(Ye, [["render", We], ["__scopeId", "data-v-66ea8649
|
|
|
770
763
|
},
|
|
771
764
|
pointerId: null,
|
|
772
765
|
beforeEvent(s) {
|
|
773
|
-
let u = !1,
|
|
774
|
-
return l.value || !
|
|
766
|
+
let u = !1, h = !1;
|
|
767
|
+
return l.value || !o.gesture || o.placement == "center" ? u = !0 : this.pointerId ? (u = !0, h = this.pointerId == s.pointerId) : s.type == "pointerdown" && (this.pointerId = s.pointerId, u = !0, h = !0), u && (s.stopPropagation(), L(s.target) || (s.preventDefault(), X())), h;
|
|
775
768
|
},
|
|
776
769
|
afterEvent(s) {
|
|
777
770
|
(s.type == "pointerup" || s.type == "pointercancel") && (this.pointerId = null);
|
|
@@ -779,21 +772,21 @@ const re = /* @__PURE__ */ b(Ye, [["render", We], ["__scopeId", "data-v-66ea8649
|
|
|
779
772
|
fast({ d: s }) {
|
|
780
773
|
m(), s == _.value ? t("dismiss", "gesture") : a.value.open();
|
|
781
774
|
},
|
|
782
|
-
move({ dy: s, dx: u, d:
|
|
783
|
-
if (
|
|
775
|
+
move({ dy: s, dx: u, d: h }) {
|
|
776
|
+
if (h != _.value) return;
|
|
784
777
|
let i = 0;
|
|
785
|
-
|
|
778
|
+
o.placement == "bottom" || o.placement == "top" ? i = s : i = u, a.value.render({
|
|
786
779
|
contentTransform: i + "px",
|
|
787
780
|
transition: "0s"
|
|
788
781
|
});
|
|
789
782
|
},
|
|
790
|
-
up({ dy: s, dx: u, d:
|
|
791
|
-
if (m(),
|
|
783
|
+
up({ dy: s, dx: u, d: h }) {
|
|
784
|
+
if (m(), h != _.value) {
|
|
792
785
|
a.value.open();
|
|
793
786
|
return;
|
|
794
787
|
}
|
|
795
788
|
let i, w, H;
|
|
796
|
-
|
|
789
|
+
o.placement == "bottom" || o.placement == "top" ? (i = r.value.offsetHeight, H = s) : (i = r.value.offsetWidth, H = u), w = H / i * 100, w > 50 ? t("dismiss", "gesture") : a.value.open();
|
|
797
790
|
},
|
|
798
791
|
cancel() {
|
|
799
792
|
m(), a.value.open();
|
|
@@ -804,39 +797,39 @@ const re = /* @__PURE__ */ b(Ye, [["render", We], ["__scopeId", "data-v-66ea8649
|
|
|
804
797
|
}), (y, s) => (c(), E(V, {
|
|
805
798
|
ref_key: "present",
|
|
806
799
|
ref: a,
|
|
807
|
-
placement:
|
|
800
|
+
placement: o.placement,
|
|
808
801
|
backdrop: y.backdrop,
|
|
809
|
-
visible:
|
|
810
|
-
keepalive:
|
|
802
|
+
visible: o.visible,
|
|
803
|
+
keepalive: o.keepalive,
|
|
811
804
|
onDismiss: p
|
|
812
805
|
}, {
|
|
813
806
|
default: P(() => [
|
|
814
|
-
|
|
807
|
+
o.gesture && o.placement != "center" ? (c(), E(ae, {
|
|
815
808
|
key: 0,
|
|
816
|
-
placement:
|
|
809
|
+
placement: o.placement
|
|
817
810
|
}, null, 8, ["placement"])) : S("", !0),
|
|
818
811
|
$("div", {
|
|
819
|
-
class: x(["t-sheet", { fullscreen:
|
|
820
|
-
style: I({ "--background":
|
|
812
|
+
class: x(["t-sheet", { fullscreen: o.fullscreen, [o.placement]: !0, rounded: y.rounded }]),
|
|
813
|
+
style: I({ "--background": o.background }),
|
|
821
814
|
ref_key: "sheet",
|
|
822
815
|
ref: r
|
|
823
816
|
}, [
|
|
824
|
-
|
|
817
|
+
o.closeButton && o.placement == "center" ? (c(), f("button", {
|
|
825
818
|
key: 0,
|
|
826
819
|
class: "t-sheet-close",
|
|
827
820
|
onClick: s[0] || (s[0] = (u) => p("close-button"))
|
|
828
821
|
}, [
|
|
829
|
-
|
|
822
|
+
b(y.$slots, "close-icon", {}, () => [
|
|
830
823
|
s[1] || (s[1] = $("i", { class: "ri-close-large-line" }, null, -1))
|
|
831
824
|
], !0)
|
|
832
825
|
])) : S("", !0),
|
|
833
|
-
|
|
826
|
+
b(y.$slots, "default", {}, void 0, !0)
|
|
834
827
|
], 6)
|
|
835
828
|
]),
|
|
836
829
|
_: 3
|
|
837
830
|
}, 8, ["placement", "backdrop", "visible", "keepalive"]));
|
|
838
831
|
}
|
|
839
|
-
}),
|
|
832
|
+
}), ot = /* @__PURE__ */ g(nt, [["__scopeId", "data-v-c181f6ad"]]), st = { class: "t-input-label" }, rt = { class: "t-input-content" }, at = ["type", "placeholder", "value"], lt = /* @__PURE__ */ T({
|
|
840
833
|
__name: "t-input",
|
|
841
834
|
props: {
|
|
842
835
|
size: { default: "standard" },
|
|
@@ -850,82 +843,82 @@ const re = /* @__PURE__ */ b(Ye, [["render", We], ["__scopeId", "data-v-66ea8649
|
|
|
850
843
|
variant: { default: "normal" }
|
|
851
844
|
},
|
|
852
845
|
emits: ["update:modelValue"],
|
|
853
|
-
setup(e, { emit:
|
|
854
|
-
const
|
|
846
|
+
setup(e, { emit: n }) {
|
|
847
|
+
const o = e, t = n, r = (a) => {
|
|
855
848
|
t("update:modelValue", a.target.value);
|
|
856
849
|
};
|
|
857
850
|
return (a, l) => (c(), f("div", {
|
|
858
|
-
class: x(["t-input", { rounded:
|
|
851
|
+
class: x(["t-input", { rounded: o.rounded, ["size-" + o.size]: !0 }])
|
|
859
852
|
}, [
|
|
860
853
|
$("label", null, [
|
|
861
|
-
$("span",
|
|
862
|
-
$("div",
|
|
863
|
-
|
|
854
|
+
$("span", st, B(a.label), 1),
|
|
855
|
+
$("div", rt, [
|
|
856
|
+
b(a.$slots, "start", {}, void 0, !0),
|
|
864
857
|
$("input", {
|
|
865
858
|
type: a.type,
|
|
866
859
|
placeholder: a.placeholder,
|
|
867
860
|
value: a.modelValue,
|
|
868
861
|
onInput: r
|
|
869
|
-
}, null, 40,
|
|
870
|
-
|
|
862
|
+
}, null, 40, at),
|
|
863
|
+
b(a.$slots, "end", {}, void 0, !0)
|
|
871
864
|
])
|
|
872
865
|
]),
|
|
873
|
-
|
|
866
|
+
o.error ? (c(), E(j, {
|
|
874
867
|
key: 0,
|
|
875
868
|
color: "danger"
|
|
876
869
|
}, {
|
|
877
870
|
default: P(() => [
|
|
878
|
-
q(
|
|
871
|
+
q(B(o.error), 1)
|
|
879
872
|
]),
|
|
880
873
|
_: 1
|
|
881
|
-
})) :
|
|
874
|
+
})) : o.help ? (c(), E(j, {
|
|
882
875
|
key: 1,
|
|
883
876
|
color: "secondary"
|
|
884
877
|
}, {
|
|
885
878
|
default: P(() => [
|
|
886
|
-
q(
|
|
879
|
+
q(B(o.help), 1)
|
|
887
880
|
]),
|
|
888
881
|
_: 1
|
|
889
882
|
})) : S("", !0)
|
|
890
883
|
], 2));
|
|
891
884
|
}
|
|
892
|
-
}),
|
|
893
|
-
function
|
|
885
|
+
}), ct = /* @__PURE__ */ g(lt, [["__scopeId", "data-v-75bf0d19"]]), it = {};
|
|
886
|
+
function ut(e, n) {
|
|
894
887
|
return c(), f("textarea");
|
|
895
888
|
}
|
|
896
|
-
const
|
|
897
|
-
function
|
|
889
|
+
const dt = /* @__PURE__ */ g(it, [["render", ut]]), pt = {};
|
|
890
|
+
function ft(e, n) {
|
|
898
891
|
return c(), f("div");
|
|
899
892
|
}
|
|
900
|
-
const
|
|
901
|
-
function
|
|
902
|
-
return c(), f("div",
|
|
893
|
+
const mt = /* @__PURE__ */ g(pt, [["render", ft]]), vt = {}, _t = { class: "t-grid" };
|
|
894
|
+
function yt(e, n) {
|
|
895
|
+
return c(), f("div", _t);
|
|
903
896
|
}
|
|
904
|
-
const
|
|
905
|
-
function
|
|
906
|
-
return c(), f("div",
|
|
897
|
+
const gt = /* @__PURE__ */ g(vt, [["render", yt]]), ht = {}, bt = { class: "t-grid-item" };
|
|
898
|
+
function kt(e, n) {
|
|
899
|
+
return c(), f("div", bt);
|
|
907
900
|
}
|
|
908
|
-
const
|
|
901
|
+
const $t = /* @__PURE__ */ g(ht, [["render", kt]]), Tt = /* @__PURE__ */ T({
|
|
909
902
|
__name: "t-divider",
|
|
910
903
|
props: {
|
|
911
904
|
type: { default: "horizontal" }
|
|
912
905
|
},
|
|
913
906
|
setup(e) {
|
|
914
|
-
const
|
|
915
|
-
return (
|
|
916
|
-
class: x(["t-divider", { [
|
|
907
|
+
const n = e;
|
|
908
|
+
return (o, t) => (c(), f("div", {
|
|
909
|
+
class: x(["t-divider", { [n.type]: !0 }])
|
|
917
910
|
}, null, 2));
|
|
918
911
|
}
|
|
919
|
-
}),
|
|
912
|
+
}), wt = /* @__PURE__ */ g(Tt, [["__scopeId", "data-v-ea7dc220"]]), It = /* @__PURE__ */ T({
|
|
920
913
|
__name: "t-toogle-password",
|
|
921
914
|
props: {
|
|
922
915
|
color: { default: "warning" }
|
|
923
916
|
},
|
|
924
917
|
emits: ["change"],
|
|
925
|
-
setup(e, { emit:
|
|
926
|
-
const
|
|
927
|
-
let p =
|
|
928
|
-
return ["warning", "info", "danger", "primary", "secondary", "success"].includes(
|
|
918
|
+
setup(e, { emit: n }) {
|
|
919
|
+
const o = e, t = n, r = v(!1), a = v(), l = z(() => {
|
|
920
|
+
let p = o.color;
|
|
921
|
+
return ["warning", "info", "danger", "primary", "secondary", "success"].includes(o.color) && (p = `var(--t-color-status-${o.color})`), {
|
|
929
922
|
"--color": p
|
|
930
923
|
};
|
|
931
924
|
}), d = () => a.value?.parentElement?.querySelector?.("input");
|
|
@@ -944,43 +937,43 @@ const ht = /* @__PURE__ */ b(_t, [["render", gt]]), bt = /* @__PURE__ */ T({
|
|
|
944
937
|
style: I(l.value),
|
|
945
938
|
onClick: _
|
|
946
939
|
}, [
|
|
947
|
-
r.value ?
|
|
940
|
+
r.value ? b(p.$slots, "on", { key: 0 }, () => [
|
|
948
941
|
m[0] || (m[0] = $("i", { class: "ri-eye-line" }, null, -1))
|
|
949
942
|
], !0) : S("", !0),
|
|
950
|
-
r.value ? S("", !0) :
|
|
943
|
+
r.value ? S("", !0) : b(p.$slots, "off", { key: 1 }, () => [
|
|
951
944
|
m[1] || (m[1] = $("i", { class: "ri-eye-off-line" }, null, -1))
|
|
952
945
|
], !0)
|
|
953
946
|
], 4));
|
|
954
947
|
}
|
|
955
|
-
}),
|
|
948
|
+
}), xt = /* @__PURE__ */ g(It, [["__scopeId", "data-v-f133b8be"]]), St = /* @__PURE__ */ T({
|
|
956
949
|
__name: "t-avatar",
|
|
957
950
|
props: {
|
|
958
951
|
square: { type: Boolean, default: !1 },
|
|
959
952
|
size: { default: "standard" }
|
|
960
953
|
},
|
|
961
954
|
setup(e) {
|
|
962
|
-
const
|
|
955
|
+
const n = e, o = z(() => n.size == "small" ? "24px" : n.size == "standard" ? "40px" : n.size == "large" ? "60px" : n.size);
|
|
963
956
|
return (t, r) => (c(), f("div", {
|
|
964
957
|
class: x(["t-avatar", { square: t.square }]),
|
|
965
|
-
style: I({ "--size":
|
|
958
|
+
style: I({ "--size": o.value })
|
|
966
959
|
}, [
|
|
967
|
-
|
|
960
|
+
b(t.$slots, "default", {}, void 0, !0)
|
|
968
961
|
], 6));
|
|
969
962
|
}
|
|
970
|
-
}),
|
|
963
|
+
}), Et = /* @__PURE__ */ g(St, [["__scopeId", "data-v-24384c2f"]]), zt = { class: "t-collapse-title" }, Ct = {
|
|
971
964
|
key: 0,
|
|
972
965
|
class: "icon"
|
|
973
|
-
},
|
|
966
|
+
}, Bt = {
|
|
974
967
|
key: 1,
|
|
975
968
|
class: "icon"
|
|
976
|
-
},
|
|
969
|
+
}, Pt = { class: "t-collapse-content" }, Dt = /* @__PURE__ */ T({
|
|
977
970
|
__name: "t-collapse",
|
|
978
971
|
props: {
|
|
979
972
|
title: {}
|
|
980
973
|
},
|
|
981
974
|
emits: ["change"],
|
|
982
|
-
setup(e, { emit:
|
|
983
|
-
const
|
|
975
|
+
setup(e, { emit: n }) {
|
|
976
|
+
const o = e, t = n, r = v(!1), a = v(""), l = v(), d = () => {
|
|
984
977
|
r.value = !r.value, a.value = `calc(${l.value.offsetHeight}px + 2rem)`, t("change", r.value);
|
|
985
978
|
};
|
|
986
979
|
return t("change", r.value), (_, p) => (c(), f("div", {
|
|
@@ -991,44 +984,44 @@ const ht = /* @__PURE__ */ b(_t, [["render", gt]]), bt = /* @__PURE__ */ T({
|
|
|
991
984
|
class: "t-collapse-header",
|
|
992
985
|
onClick: d
|
|
993
986
|
}, [
|
|
994
|
-
|
|
995
|
-
$("div",
|
|
996
|
-
|
|
997
|
-
q(
|
|
987
|
+
b(_.$slots, "icon"),
|
|
988
|
+
$("div", zt, [
|
|
989
|
+
b(_.$slots, "title", {}, () => [
|
|
990
|
+
q(B(o.title), 1)
|
|
998
991
|
])
|
|
999
992
|
]),
|
|
1000
|
-
|
|
1001
|
-
r.value ? (c(), f("div",
|
|
993
|
+
b(_.$slots, "toogle", {}, () => [
|
|
994
|
+
r.value ? (c(), f("div", Ct, [...p[0] || (p[0] = [
|
|
1002
995
|
$("i", { class: "ri-arrow-up-s-line" }, null, -1)
|
|
1003
|
-
])])) : (c(), f("div",
|
|
996
|
+
])])) : (c(), f("div", Bt, [...p[1] || (p[1] = [
|
|
1004
997
|
$("i", { class: "ri-arrow-down-s-line" }, null, -1)
|
|
1005
998
|
])]))
|
|
1006
999
|
])
|
|
1007
1000
|
]),
|
|
1008
|
-
$("div",
|
|
1001
|
+
$("div", Pt, [
|
|
1009
1002
|
$("div", {
|
|
1010
1003
|
ref_key: "content",
|
|
1011
1004
|
ref: l
|
|
1012
1005
|
}, [
|
|
1013
|
-
|
|
1014
|
-
|
|
1006
|
+
b(_.$slots, "content", {}, () => [
|
|
1007
|
+
b(_.$slots, "default")
|
|
1015
1008
|
])
|
|
1016
1009
|
], 512)
|
|
1017
1010
|
])
|
|
1018
1011
|
], 6));
|
|
1019
1012
|
}
|
|
1020
|
-
}),
|
|
1013
|
+
}), Vt = () => ({
|
|
1021
1014
|
install: (e) => {
|
|
1022
|
-
ue(), e.component("t-app", me), e.component("t-screen", re), e.component("t-swipe-screen",
|
|
1015
|
+
ue(), e.component("t-app", me), e.component("t-screen", re), e.component("t-swipe-screen", Ke), e.component("t-cable", Re), e.component("t-toolbar", Je), e.component("t-content", Ye), e.component("t-card", Le), e.component("t-refresher", We), e.component("t-button", M), e.component("t-back-button", Ze), e.component("t-present", V), e.component("t-text", j), e.component("t-sheet", ot), e.component("t-pull-signal", ae), e.component("t-input", ct), e.component("t-textarea", dt), e.component("t-rich-text", mt), e.component("t-grid", gt), e.component("t-grid-item", $t), e.component("t-divider", wt), e.component("t-toogle-password", xt), e.component("t-loading-icon", K), e.component("t-alert", oe), e.component("t-avatar", Et), e.component("t-collapse", Dt), e.component("t-toast", se);
|
|
1023
1016
|
}
|
|
1024
1017
|
});
|
|
1025
1018
|
export {
|
|
1026
1019
|
X as blurCurrentActive,
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1020
|
+
Lt as createAction,
|
|
1021
|
+
Ot as createAlert,
|
|
1022
|
+
Xt as createLoading,
|
|
1023
|
+
qt as createToast,
|
|
1024
|
+
Vt as createToife,
|
|
1032
1025
|
L as isFormElement,
|
|
1033
1026
|
Se as presentController,
|
|
1034
1027
|
k as screenController,
|