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