@toife/vue 1.2.0 → 1.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.es.js CHANGED
@@ -1,25 +1,25 @@
1
- import { createElementBlock as _, openBlock as i, renderSlot as h, defineComponent as T, ref as y, computed as S, reactive as te, watch as A, Fragment as V, withDirectives as Y, createCommentVNode as C, normalizeStyle as w, normalizeClass as x, vShow as H, createElementVNode as $, createVNode as j, onUnmounted as L, createBlock as z, withCtx as E, toDisplayString as D, renderList as U, createTextVNode as O, createApp as F, h as G, unref as P, onMounted as Q, resolveDynamicComponent as ce, markRaw as ie, inject as ue, provide as de } from "vue";
1
+ import { createElementBlock as v, openBlock as u, renderSlot as h, defineComponent as $, ref as y, computed as I, reactive as te, watch as A, Fragment as R, withDirectives as Y, createCommentVNode as z, normalizeStyle as w, normalizeClass as x, vShow as H, createElementVNode as k, createVNode as j, onUnmounted as L, createBlock as B, withCtx as E, toDisplayString as V, renderList as U, createTextVNode as O, createApp as F, h as G, unref as P, onMounted as Q, resolveDynamicComponent as ce, markRaw as ie, inject as ue, provide as de } from "vue";
2
2
  import { gesture as N } from "@toife/gesture";
3
3
  import { useRouter as oe, useRoute as pe } from "vue-router";
4
- const q = (t) => t && (t.tagName == "INPUT" || t.tagName == "TEXTAREA" || t.isContentEditable), X = () => {
5
- const t = document.activeElement;
6
- t && (t.tagName === "INPUT" || t.tagName === "TEXTAREA" || t.isContentEditable) && t.blur();
4
+ const q = (o) => o && (o.tagName == "INPUT" || o.tagName == "TEXTAREA" || o.isContentEditable), X = () => {
5
+ const o = document.activeElement;
6
+ o && (o.tagName === "INPUT" || o.tagName === "TEXTAREA" || o.isContentEditable) && o.blur();
7
7
  }, fe = () => {
8
- document.addEventListener("contextmenu", (t) => t.preventDefault()), document.addEventListener("selectstart", (t) => t.preventDefault()), document.addEventListener("pointerup", (t) => {
9
- !q(t.target) && X();
8
+ document.addEventListener("contextmenu", (o) => o.preventDefault()), document.addEventListener("selectstart", (o) => o.preventDefault()), document.addEventListener("pointerup", (o) => {
9
+ !q(o.target) && X();
10
10
  });
11
- }, b = (t, n) => {
12
- const o = t.__vccOpts || t;
13
- for (const [e, s] of n)
14
- o[e] = s;
15
- return o;
11
+ }, b = (o, s) => {
12
+ const e = o.__vccOpts || o;
13
+ for (const [t, n] of s)
14
+ e[t] = n;
15
+ return e;
16
16
  }, me = {}, ve = { class: "t-app" };
17
- function _e(t, n) {
18
- return i(), _("div", ve, [
19
- h(t.$slots, "default")
17
+ function _e(o, s) {
18
+ return u(), v("div", ve, [
19
+ h(o.$slots, "default")
20
20
  ]);
21
21
  }
22
- const ye = /* @__PURE__ */ b(me, [["render", _e]]), ge = /* @__PURE__ */ T({
22
+ const ye = /* @__PURE__ */ b(me, [["render", _e]]), ge = /* @__PURE__ */ $({
23
23
  __name: "t-present",
24
24
  props: {
25
25
  keepalive: { type: Boolean, default: !0 },
@@ -28,69 +28,69 @@ const ye = /* @__PURE__ */ b(me, [["render", _e]]), ge = /* @__PURE__ */ T({
28
28
  placement: { default: "bottom" }
29
29
  },
30
30
  emits: ["dismiss"],
31
- setup(t, { expose: n, emit: o }) {
32
- const e = y(0), s = y(!1), r = y(), c = y(), u = t, d = o, p = S(() => s.value || u.keepalive), f = te({
31
+ setup(o, { expose: s, emit: e }) {
32
+ const t = y(0), n = y(!1), r = y(), i = y(), a = o, d = e, p = I(() => n.value || a.keepalive), f = te({
33
33
  "--t-present-backdrop-opacity": "0.4",
34
34
  "--t-present-transition": "0.2s",
35
35
  "--t-present-content-transform": "0px",
36
36
  "--t-present-content-opacity": "1"
37
- }), v = (m) => {
38
- u.backdrop ? m?.backdropOpacity && (f["--t-present-backdrop-opacity"] = m.backdropOpacity) : f["--t-present-backdrop-opacity"] = "0", m?.transition && (f["--t-present-transition"] = m.transition, f["--t-present-transition"] = m.transition), m?.contentTransform && (f["--t-present-content-transform"] = m.contentTransform), m?.contentOpacity && (f["--t-present-content-opacity"] = m.contentOpacity);
39
- }, l = () => {
40
- v({
37
+ }), _ = (m) => {
38
+ a.backdrop ? m?.backdropOpacity && (f["--t-present-backdrop-opacity"] = m.backdropOpacity) : f["--t-present-backdrop-opacity"] = "0", m?.transition && (f["--t-present-transition"] = m.transition, f["--t-present-transition"] = m.transition), m?.contentTransform && (f["--t-present-content-transform"] = m.contentTransform), m?.contentOpacity && (f["--t-present-content-opacity"] = m.contentOpacity);
39
+ }, c = () => {
40
+ _({
41
41
  contentTransform: "0px",
42
42
  transition: "0.2s",
43
43
  backdropOpacity: "0.4",
44
44
  contentOpacity: "1"
45
45
  });
46
- }, a = () => {
47
- let m = "0px", I = "1";
48
- u.placement == "bottom" || u.placement == "right" ? m = "100%" : u.placement == "top" || u.placement == "left" ? m = "-100%" : u.placement == "center" && (m = "0px", I = "0"), v({
46
+ }, l = () => {
47
+ let m = "0px", S = "1";
48
+ a.placement == "bottom" || a.placement == "right" ? m = "100%" : a.placement == "top" || a.placement == "left" ? m = "-100%" : a.placement == "center" && (m = "0px", S = "0"), _({
49
49
  contentTransform: m,
50
50
  transition: "0.2s",
51
- contentOpacity: I,
51
+ contentOpacity: S,
52
52
  backdropOpacity: "0"
53
53
  });
54
54
  };
55
- A(() => u.visible, () => {
56
- u.visible ? (s.value = !0, e.value = Ce.getNewIndex(), setTimeout(() => {
57
- l();
58
- }, 50)) : (a(), setTimeout(() => {
59
- s.value = !1;
55
+ A(() => a.visible, () => {
56
+ a.visible ? (n.value = !0, t.value = Ce.getNewIndex(), setTimeout(() => {
57
+ c();
58
+ }, 50)) : (l(), setTimeout(() => {
59
+ n.value = !1;
60
60
  }, 200));
61
- }), n({
62
- render: v,
63
- open: l,
64
- close: a
61
+ }), s({
62
+ render: _,
63
+ open: c,
64
+ close: l
65
65
  });
66
66
  const g = (m) => {
67
67
  m.preventDefault(), d("dismiss", "backdrop");
68
68
  };
69
- return a(), (m, I) => (i(), _(V, null, [
70
- p.value ? Y((i(), _("div", {
69
+ return l(), (m, S) => (u(), v(R, null, [
70
+ p.value ? Y((u(), v("div", {
71
71
  key: 0,
72
72
  class: x(["t-present", { [m.placement]: !0 }]),
73
73
  ref_key: "present",
74
- ref: c,
75
- style: w({ ...f, zIndex: e.value })
74
+ ref: i,
75
+ style: w({ ...f, zIndex: t.value })
76
76
  }, [
77
77
  h(m.$slots, "default", {}, void 0, !0)
78
78
  ], 6)), [
79
- [H, s.value]
80
- ]) : C("", !0),
81
- p.value ? Y((i(), _("div", {
79
+ [H, n.value]
80
+ ]) : z("", !0),
81
+ p.value ? Y((u(), v("div", {
82
82
  key: 1,
83
83
  class: "t-present-backdrop",
84
84
  onClick: g,
85
85
  ref_key: "backdrop",
86
86
  ref: r,
87
- style: w({ ...f, zIndex: e.value - 1 })
87
+ style: w({ ...f, zIndex: t.value - 1 })
88
88
  }, null, 4)), [
89
- [H, s.value]
90
- ]) : C("", !0)
89
+ [H, n.value]
90
+ ]) : z("", !0)
91
91
  ], 64));
92
92
  }
93
- }), W = /* @__PURE__ */ b(ge, [["__scopeId", "data-v-3d0c3227"]]), be = /* @__PURE__ */ T({
93
+ }), W = /* @__PURE__ */ b(ge, [["__scopeId", "data-v-3d0c3227"]]), be = /* @__PURE__ */ $({
94
94
  __name: "t-loading-icon",
95
95
  props: {
96
96
  size: {
@@ -102,13 +102,13 @@ const ye = /* @__PURE__ */ b(me, [["render", _e]]), ge = /* @__PURE__ */ T({
102
102
  default: "var(--t-color-text)"
103
103
  }
104
104
  },
105
- setup(t) {
106
- return (n, o) => (i(), _("span", {
105
+ setup(o) {
106
+ return (s, e) => (u(), v("span", {
107
107
  class: "t-loading-icon",
108
108
  style: w({
109
- width: t.size,
110
- height: t.size,
111
- borderTopColor: t.color
109
+ width: o.size,
110
+ height: o.size,
111
+ borderTopColor: o.color
112
112
  }),
113
113
  role: "status",
114
114
  "aria-label": "Loading..."
@@ -117,7 +117,7 @@ const ye = /* @__PURE__ */ b(me, [["render", _e]]), ge = /* @__PURE__ */ T({
117
117
  }), K = /* @__PURE__ */ b(be, [["__scopeId", "data-v-7c463303"]]), he = {
118
118
  key: 0,
119
119
  class: "loader"
120
- }, ke = /* @__PURE__ */ T({
120
+ }, ke = /* @__PURE__ */ $({
121
121
  __name: "t-button",
122
122
  props: {
123
123
  color: { default: null },
@@ -129,68 +129,68 @@ const ye = /* @__PURE__ */ b(me, [["render", _e]]), ge = /* @__PURE__ */ T({
129
129
  variant: { default: "default" },
130
130
  activeBackground: { type: Boolean, default: !1 }
131
131
  },
132
- setup(t) {
133
- const n = t, o = S(() => {
134
- let e;
135
- return n.variant == "default" && (n.color ? ["warning", "info", "danger", "primary", "secondary", "success"].includes(n.color) ? e = {
132
+ setup(o) {
133
+ const s = o, e = I(() => {
134
+ let t;
135
+ return s.variant == "default" && (s.color ? ["warning", "info", "danger", "primary", "secondary", "success"].includes(s.color) ? t = {
136
136
  "--border": "none",
137
- "--color": "var(--t-color-status-" + n.color + "-text)",
138
- "--background": "var(--t-color-status-" + n.color + ")"
139
- } : e = {
137
+ "--color": "var(--t-color-status-" + s.color + "-text)",
138
+ "--background": "var(--t-color-status-" + s.color + ")"
139
+ } : t = {
140
140
  "--border": "none",
141
141
  "--color": "var(--t-color-text)",
142
- "--background": n.color
143
- } : e = {
142
+ "--background": s.color
143
+ } : t = {
144
144
  "--border": "none",
145
145
  "--color": "var(--t-color-text)",
146
146
  "--background": "var(--t-color-surface)"
147
- }), n.variant == "text" && (n.color ? ["warning", "info", "danger", "primary", "secondary", "success"].includes(n.color) ? e = {
147
+ }), s.variant == "text" && (s.color ? ["warning", "info", "danger", "primary", "secondary", "success"].includes(s.color) ? t = {
148
148
  "--border": "none",
149
- "--color": "var(--t-color-status-" + n.color + ")",
149
+ "--color": "var(--t-color-status-" + s.color + ")",
150
150
  "--background": "transparent"
151
- } : e = {
151
+ } : t = {
152
152
  "--border": "none",
153
- "--color": n.color,
153
+ "--color": s.color,
154
154
  "--background": "transparent"
155
- } : e = {
155
+ } : t = {
156
156
  "--border": "none",
157
157
  "--color": "var(--t-color-text)",
158
158
  "--background": "transparent"
159
- }), n.variant == "outline" && (n.color ? ["warning", "info", "danger", "primary", "secondary", "success"].includes(n.color) ? e = {
160
- "--border": "0.55px solid var(--t-color-status-" + n.color + ")",
161
- "--color": "var(--t-color-status-" + n.color + ")",
159
+ }), s.variant == "outline" && (s.color ? ["warning", "info", "danger", "primary", "secondary", "success"].includes(s.color) ? t = {
160
+ "--border": "0.55px solid var(--t-color-status-" + s.color + ")",
161
+ "--color": "var(--t-color-status-" + s.color + ")",
162
162
  "--background": "transparent"
163
- } : e = {
164
- "--border": "0.55px solid " + n.color,
165
- "--color": n.color,
163
+ } : t = {
164
+ "--border": "0.55px solid " + s.color,
165
+ "--color": s.color,
166
166
  "--background": "transparent"
167
- } : e = {
167
+ } : t = {
168
168
  "--border": "0.55px solid var(--t-color-text)",
169
169
  "--color": "var(--t-color-text)",
170
170
  "--background": "transparent"
171
- }), e;
171
+ }), t;
172
172
  });
173
- return (e, s) => (i(), _("button", {
174
- class: x(["t-button", { "active-background": n.activeBackground, rounded: n.rounded, block: n.block, ["size-" + n.size]: !0 }]),
175
- style: w(o.value)
173
+ return (t, n) => (u(), v("button", {
174
+ class: x(["t-button", { "active-background": s.activeBackground, rounded: s.rounded, block: s.block, ["size-" + s.size]: !0 }]),
175
+ style: w(e.value)
176
176
  }, [
177
- Y($("span", null, [
178
- h(e.$slots, "default", {}, void 0, !0)
177
+ Y(k("span", null, [
178
+ h(t.$slots, "default", {}, void 0, !0)
179
179
  ], 512), [
180
- [H, !n.loading]
180
+ [H, !s.loading]
181
181
  ]),
182
- n.loading ? (i(), _("span", he, [
182
+ s.loading ? (u(), v("span", he, [
183
183
  j(K, {
184
184
  color: "var(--color)",
185
- type: n.loadingType
185
+ type: s.loadingType
186
186
  }, null, 8, ["type"])
187
- ])) : C("", !0)
187
+ ])) : z("", !0)
188
188
  ], 6));
189
189
  }
190
190
  }), M = /* @__PURE__ */ b(ke, [["__scopeId", "data-v-74d8380d"]]), $e = {
191
191
  key: 0,
192
192
  class: "t-alert-header"
193
- }, Te = { class: "t-alert-content" }, we = { class: "t-alert-footer" }, xe = /* @__PURE__ */ T({
193
+ }, Te = { class: "t-alert-content" }, we = { class: "t-alert-footer" }, xe = /* @__PURE__ */ $({
194
194
  __name: "t-alert",
195
195
  props: {
196
196
  title: {},
@@ -199,56 +199,56 @@ const ye = /* @__PURE__ */ b(me, [["render", _e]]), ge = /* @__PURE__ */ T({
199
199
  dismiss: {}
200
200
  },
201
201
  emits: ["dismiss"],
202
- setup(t, { expose: n, emit: o }) {
203
- const e = t, s = y(!1), r = o, c = y();
204
- let u;
202
+ setup(o, { expose: s, emit: e }) {
203
+ const t = o, n = y(!1), r = e, i = y();
204
+ let a;
205
205
  const d = y(!1), p = () => {
206
- s.value = !0;
207
- }, f = (l) => {
208
- s.value = !1, l.handler && l.handler(), r("dismiss", "choose", l?.data);
209
- }, v = (l) => {
210
- e.dismiss && e.dismiss.includes(l) ? (s.value = !1, r("dismiss", l)) : l == "backdrop" && (d.value = !0, setTimeout(() => {
206
+ n.value = !0;
207
+ }, f = (c) => {
208
+ n.value = !1, c.handler && c.handler(), r("dismiss", "choose", c?.data);
209
+ }, _ = (c) => {
210
+ t.dismiss && t.dismiss.includes(c) ? (n.value = !1, r("dismiss", c)) : c == "backdrop" && (d.value = !0, setTimeout(() => {
211
211
  d.value = !1;
212
212
  }, 300));
213
213
  };
214
- return n({
214
+ return s({
215
215
  open: p
216
- }), A(() => c.value, (l) => {
217
- l && (u = N(c.value, {
218
- beforeEvent(a) {
219
- return a.stopPropagation(), q(a.target) || (a.preventDefault(), X()), !1;
216
+ }), A(() => i.value, (c) => {
217
+ c && (a = N(i.value, {
218
+ beforeEvent(l) {
219
+ return l.stopPropagation(), q(l.target) || (l.preventDefault(), X()), !1;
220
220
  }
221
221
  }));
222
222
  }), L(() => {
223
- u && u.destroy();
224
- }), (l, a) => (i(), z(W, {
223
+ a && a.destroy();
224
+ }), (c, l) => (u(), B(W, {
225
225
  placement: "center",
226
226
  backdrop: !0,
227
227
  keepalive: !1,
228
- visible: s.value,
229
- onDismiss: v
228
+ visible: n.value,
229
+ onDismiss: _
230
230
  }, {
231
231
  default: E(() => [
232
- $("div", {
232
+ k("div", {
233
233
  class: x(["t-alert", { pop: d.value }]),
234
234
  ref_key: "container",
235
- ref: c
235
+ ref: i
236
236
  }, [
237
- h(l.$slots, "header", {}, () => [
238
- e.title ? (i(), _("div", $e, D(e.title), 1)) : C("", !0)
237
+ h(c.$slots, "header", {}, () => [
238
+ t.title ? (u(), v("div", $e, V(t.title), 1)) : z("", !0)
239
239
  ], !0),
240
- h(l.$slots, "content", {}, () => [
241
- $("div", Te, D(e.message), 1)
240
+ h(c.$slots, "content", {}, () => [
241
+ k("div", Te, V(t.message), 1)
242
242
  ], !0),
243
- h(l.$slots, "footer", {}, () => [
244
- $("div", we, [
245
- (i(!0), _(V, null, U(e.actions, (g) => (i(), z(M, {
243
+ h(c.$slots, "footer", {}, () => [
244
+ k("div", we, [
245
+ (u(!0), v(R, null, U(t.actions, (g) => (u(), B(M, {
246
246
  color: g.color,
247
247
  variant: g.variant,
248
248
  onClick: (m) => f(g)
249
249
  }, {
250
250
  default: E(() => [
251
- O(D(g.text), 1)
251
+ O(V(g.text), 1)
252
252
  ]),
253
253
  _: 2
254
254
  }, 1032, ["color", "variant", "onClick"]))), 256))
@@ -259,83 +259,83 @@ const ye = /* @__PURE__ */ b(me, [["render", _e]]), ge = /* @__PURE__ */ T({
259
259
  _: 3
260
260
  }, 8, ["visible"]));
261
261
  }
262
- }), ne = /* @__PURE__ */ b(xe, [["__scopeId", "data-v-5cf415ec"]]), Ut = (t = {}) => ({
262
+ }), se = /* @__PURE__ */ b(xe, [["__scopeId", "data-v-5cf415ec"]]), Kt = (o = {}) => ({
263
263
  open() {
264
- return new Promise((n) => {
265
- let o = document.body.querySelector(".t-app");
266
- if (!o) return;
267
- const e = document.createElement("div"), s = y();
268
- o.appendChild(e);
264
+ return new Promise((s) => {
265
+ let e = document.body.querySelector(".t-app");
266
+ if (!e) return;
267
+ const t = document.createElement("div"), n = y();
268
+ e.appendChild(t);
269
269
  const r = F({
270
270
  render() {
271
- return G(ne, {
272
- ...t,
273
- ref: s,
274
- onDismiss: (c, u) => {
271
+ return G(se, {
272
+ ...o,
273
+ ref: n,
274
+ onDismiss: (i, a) => {
275
275
  setTimeout(() => {
276
- r.unmount(), e.remove();
277
- }, 300), n(u);
276
+ r.unmount(), t.remove();
277
+ }, 300), s(a);
278
278
  }
279
279
  });
280
280
  }
281
281
  });
282
- r.mount(e), setTimeout(() => {
283
- s.value?.open?.();
282
+ r.mount(t), setTimeout(() => {
283
+ n.value?.open?.();
284
284
  }, 50);
285
285
  });
286
286
  }
287
- }), Ie = /* @__PURE__ */ T({
287
+ }), Ie = /* @__PURE__ */ $({
288
288
  __name: "t-action",
289
289
  props: {
290
290
  actions: {},
291
291
  dismiss: {}
292
292
  },
293
293
  emits: ["dismiss"],
294
- setup(t, { expose: n, emit: o }) {
295
- const e = t, s = y(!1), r = o, c = y();
296
- let u;
294
+ setup(o, { expose: s, emit: e }) {
295
+ const t = o, n = y(!1), r = e, i = y();
296
+ let a;
297
297
  const d = y(!1), p = () => {
298
- s.value = !0;
299
- }, f = (l) => {
300
- s.value = !1, l.handler && l.handler(), r("dismiss", "choose", l?.data);
301
- }, v = (l) => {
302
- e.dismiss && e.dismiss.includes(l) ? (s.value = !1, r("dismiss", l)) : l == "backdrop" && (d.value = !0, setTimeout(() => {
298
+ n.value = !0;
299
+ }, f = (c) => {
300
+ n.value = !1, c.handler && c.handler(), r("dismiss", "choose", c?.data);
301
+ }, _ = (c) => {
302
+ t.dismiss && t.dismiss.includes(c) ? (n.value = !1, r("dismiss", c)) : c == "backdrop" && (d.value = !0, setTimeout(() => {
303
303
  d.value = !1;
304
304
  }, 300));
305
305
  };
306
- return n({
306
+ return s({
307
307
  open: p
308
- }), A(() => c.value, (l) => {
309
- l && (u = N(c.value, {
310
- beforeEvent(a) {
311
- return a.stopPropagation(), q(a.target) || (a.preventDefault(), X()), !1;
308
+ }), A(() => i.value, (c) => {
309
+ c && (a = N(i.value, {
310
+ beforeEvent(l) {
311
+ return l.stopPropagation(), q(l.target) || (l.preventDefault(), X()), !1;
312
312
  }
313
313
  }));
314
314
  }), L(() => {
315
- u && u.destroy();
316
- }), (l, a) => (i(), z(W, {
315
+ a && a.destroy();
316
+ }), (c, l) => (u(), B(W, {
317
317
  placement: "bottom",
318
318
  backdrop: !0,
319
319
  keepalive: !1,
320
- visible: s.value,
321
- onDismiss: v
320
+ visible: n.value,
321
+ onDismiss: _
322
322
  }, {
323
323
  default: E(() => [
324
- $("div", {
324
+ k("div", {
325
325
  class: x(["t-action", { pop: d.value }]),
326
326
  ref_key: "container",
327
- ref: c
327
+ ref: i
328
328
  }, [
329
- (i(!0), _(V, null, U(e.actions, (g) => (i(), _("div", null, [
330
- (i(!0), _(V, null, U(g, (m) => (i(), z(M, {
329
+ (u(!0), v(R, null, U(t.actions, (g) => (u(), v("div", null, [
330
+ (u(!0), v(R, null, U(g, (m) => (u(), B(M, {
331
331
  color: m.color,
332
332
  size: m.size,
333
333
  variant: m.variant,
334
- onClick: (I) => f(m),
334
+ onClick: (S) => f(m),
335
335
  block: ""
336
336
  }, {
337
337
  default: E(() => [
338
- O(D(m.text), 1)
338
+ O(V(m.text), 1)
339
339
  ]),
340
340
  _: 2
341
341
  }, 1032, ["color", "size", "variant", "onClick"]))), 256))
@@ -345,70 +345,70 @@ const ye = /* @__PURE__ */ b(me, [["render", _e]]), ge = /* @__PURE__ */ T({
345
345
  _: 1
346
346
  }, 8, ["visible"]));
347
347
  }
348
- }), Se = /* @__PURE__ */ b(Ie, [["__scopeId", "data-v-a87baaae"]]), jt = (t = {}) => ({
348
+ }), Se = /* @__PURE__ */ b(Ie, [["__scopeId", "data-v-a87baaae"]]), Mt = (o = {}) => ({
349
349
  open() {
350
- return new Promise((n) => {
351
- let o = document.body.querySelector(".t-app");
352
- if (!o) return;
353
- const e = document.createElement("div"), s = y();
354
- o.appendChild(e);
350
+ return new Promise((s) => {
351
+ let e = document.body.querySelector(".t-app");
352
+ if (!e) return;
353
+ const t = document.createElement("div"), n = y();
354
+ e.appendChild(t);
355
355
  const r = F({
356
356
  render() {
357
357
  return G(Se, {
358
- ...t,
359
- ref: s,
360
- onDismiss: (c, u) => {
358
+ ...o,
359
+ ref: n,
360
+ onDismiss: (i, a) => {
361
361
  setTimeout(() => {
362
- r.unmount(), e.remove();
363
- }, 300), n(u);
362
+ r.unmount(), t.remove();
363
+ }, 300), s(a);
364
364
  }
365
365
  });
366
366
  }
367
367
  });
368
- r.mount(e), setTimeout(() => {
369
- s.value?.open?.();
368
+ r.mount(t), setTimeout(() => {
369
+ n.value?.open?.();
370
370
  }, 50);
371
371
  });
372
372
  }
373
- }), ze = /* @__PURE__ */ T({
373
+ }), ze = /* @__PURE__ */ $({
374
374
  __name: "t-loading",
375
375
  props: {
376
376
  type: { default: "spinner" }
377
377
  },
378
378
  emits: ["dismiss"],
379
- setup(t, { expose: n, emit: o }) {
380
- const e = t, s = y(!1), r = y();
381
- let c;
382
- return n({
379
+ setup(o, { expose: s, emit: e }) {
380
+ const t = o, n = y(!1), r = y();
381
+ let i;
382
+ return s({
383
383
  open: () => {
384
- s.value = !0;
384
+ n.value = !0;
385
385
  },
386
386
  close: () => {
387
- s.value = !1;
387
+ n.value = !1;
388
388
  }
389
389
  }), A(() => r.value, (p) => {
390
- p && (c = N(r.value, {
390
+ p && (i = N(r.value, {
391
391
  beforeEvent(f) {
392
392
  return f.stopPropagation(), q(f.target) || (f.preventDefault(), X()), !1;
393
393
  }
394
394
  }));
395
395
  }), L(() => {
396
- c && c.destroy();
397
- }), (p, f) => (i(), z(W, {
396
+ i && i.destroy();
397
+ }), (p, f) => (u(), B(W, {
398
398
  placement: "center",
399
399
  backdrop: !0,
400
400
  keepalive: !1,
401
- visible: s.value
401
+ visible: n.value
402
402
  }, {
403
403
  default: E(() => [
404
- $("div", {
404
+ k("div", {
405
405
  class: "t-loading",
406
406
  ref_key: "container",
407
407
  ref: r
408
408
  }, [
409
409
  h(p.$slots, "default", {}, () => [
410
410
  j(K, {
411
- type: e.type
411
+ type: t.type
412
412
  }, null, 8, ["type"])
413
413
  ], !0)
414
414
  ], 512)
@@ -416,28 +416,28 @@ const ye = /* @__PURE__ */ b(me, [["render", _e]]), ge = /* @__PURE__ */ T({
416
416
  _: 3
417
417
  }, 8, ["visible"]));
418
418
  }
419
- }), Be = /* @__PURE__ */ b(ze, [["__scopeId", "data-v-d048a41d"]]), Ft = (t = {}) => {
420
- const n = y(), o = document.body.querySelector(".t-app");
421
- let e = null, s = null;
419
+ }), Be = /* @__PURE__ */ b(ze, [["__scopeId", "data-v-d048a41d"]]), Jt = (o = {}) => {
420
+ const s = y(), e = document.body.querySelector(".t-app");
421
+ let t = null, n = null;
422
422
  return {
423
423
  open() {
424
424
  return new Promise((r) => {
425
- o && (s = document.createElement("div"), o.appendChild(s), e = F({
425
+ e && (n = document.createElement("div"), e.appendChild(n), t = F({
426
426
  render() {
427
427
  return G(Be, {
428
- ...t,
429
- ref: n
428
+ ...o,
429
+ ref: s
430
430
  });
431
431
  }
432
- }), e.mount(s), setTimeout(() => {
433
- n.value?.open?.(), r(!0);
432
+ }), t.mount(n), setTimeout(() => {
433
+ s.value?.open?.(), r(!0);
434
434
  }, 50));
435
435
  });
436
436
  },
437
437
  close() {
438
438
  return new Promise((r) => {
439
- n.value?.close?.(), setTimeout(() => {
440
- e?.unmount?.(), s?.remove?.(), r(!0);
439
+ s.value?.close?.(), setTimeout(() => {
440
+ t?.unmount?.(), n?.remove?.(), r(!0);
441
441
  }, 300);
442
442
  });
443
443
  }
@@ -446,24 +446,24 @@ const ye = /* @__PURE__ */ b(me, [["render", _e]]), ge = /* @__PURE__ */ T({
446
446
  getNewIndex() {
447
447
  return Z.value += 2, Z.value;
448
448
  }
449
- }, B = te([]), Ee = (t) => {
450
- B.push(t);
451
- }, Pe = (t) => {
452
- t || B.pop();
453
- }, De = () => {
454
- B.splice(0, B.length);
455
- }, k = {
456
- screens: B,
449
+ }, C = te([]), Ee = (o) => {
450
+ C.push(o);
451
+ }, Ve = (o) => {
452
+ o || C.pop();
453
+ }, Pe = () => {
454
+ C.splice(0, C.length);
455
+ }, T = {
456
+ screens: C,
457
457
  addScreen: Ee,
458
- removeScreen: Pe,
459
- removeAllScreen: De,
460
- hasPrevious: S(() => B.length > 1),
461
- currentScreen: S(() => B[B.length - 1]),
462
- lastScreen: S(() => {
463
- if (!(B.length < 2))
464
- return B[B.length - 2];
458
+ removeScreen: Ve,
459
+ removeAllScreen: Pe,
460
+ hasPrevious: I(() => C.length > 1),
461
+ currentScreen: I(() => C[C.length - 1]),
462
+ lastScreen: I(() => {
463
+ if (!(C.length < 2))
464
+ return C[C.length - 2];
465
465
  })
466
- }, Re = /* @__PURE__ */ T({
466
+ }, De = /* @__PURE__ */ $({
467
467
  __name: "t-toast",
468
468
  props: {
469
469
  message: {},
@@ -474,346 +474,346 @@ const ye = /* @__PURE__ */ b(me, [["render", _e]]), ge = /* @__PURE__ */ T({
474
474
  variant: { default: "default" }
475
475
  },
476
476
  emits: ["dismiss"],
477
- setup(t, { expose: n, emit: o }) {
478
- const e = t, s = o, r = y(!1), c = y(!1), u = y(!1), d = () => {
479
- c.value = !0, u.value = !1, setTimeout(() => {
477
+ setup(o, { expose: s, emit: e }) {
478
+ const t = o, n = e, r = y(!1), i = y(!1), a = y(!1), d = () => {
479
+ i.value = !0, a.value = !1, setTimeout(() => {
480
480
  r.value = !0;
481
481
  }, 10), setTimeout(() => {
482
482
  p();
483
- }, e.duration + 10);
483
+ }, t.duration + 10);
484
484
  }, p = () => {
485
- u.value = !0, setTimeout(() => {
486
- c.value = !1, r.value = !1, s("dismiss");
485
+ a.value = !0, setTimeout(() => {
486
+ i.value = !1, r.value = !1, n("dismiss");
487
487
  }, 300);
488
- }, f = S(() => {
489
- let v;
490
- return e.variant == "default" && (e.color ? ["warning", "info", "danger", "primary", "secondary", "success"].includes(e.color) ? v = {
488
+ }, f = I(() => {
489
+ let _;
490
+ return t.variant == "default" && (t.color ? ["warning", "info", "danger", "primary", "secondary", "success"].includes(t.color) ? _ = {
491
491
  "--border": "none",
492
- "--color": "var(--t-color-status-" + e.color + "-text)",
493
- "--background": "rgba(var(--t-color-status-" + e.color + "-rgb), 0.6)"
494
- } : v = {
492
+ "--color": "var(--t-color-status-" + t.color + "-text)",
493
+ "--background": "rgba(var(--t-color-status-" + t.color + "-rgb), 0.6)"
494
+ } : _ = {
495
495
  "--border": "none",
496
496
  "--color": "var(--t-color-text)",
497
- "--background": e.color
498
- } : v = {
497
+ "--background": t.color
498
+ } : _ = {
499
499
  "--border": "none",
500
500
  "--color": "var(--t-color-text)",
501
501
  "--background": "rgba(var(--t-color-surface-rgb), 0.6)"
502
- }), e.variant == "text" && (e.color ? ["warning", "info", "danger", "primary", "secondary", "success"].includes(e.color) ? v = {
502
+ }), t.variant == "text" && (t.color ? ["warning", "info", "danger", "primary", "secondary", "success"].includes(t.color) ? _ = {
503
503
  "--border": "none",
504
- "--color": "var(--t-color-status-" + e.color + ")",
504
+ "--color": "var(--t-color-status-" + t.color + ")",
505
505
  "--background": "transparent"
506
- } : v = {
506
+ } : _ = {
507
507
  "--border": "none",
508
- "--color": e.color,
508
+ "--color": t.color,
509
509
  "--background": "transparent"
510
- } : v = {
510
+ } : _ = {
511
511
  "--border": "none",
512
512
  "--color": "var(--t-color-text)",
513
513
  "--background": "transparent"
514
- }), e.variant == "outline" && (e.color ? ["warning", "info", "danger", "primary", "secondary", "success"].includes(e.color) ? v = {
515
- "--border": "0.55px solid var(--t-color-status-" + e.color + ")",
516
- "--color": "var(--t-color-status-" + e.color + ")",
514
+ }), t.variant == "outline" && (t.color ? ["warning", "info", "danger", "primary", "secondary", "success"].includes(t.color) ? _ = {
515
+ "--border": "0.55px solid var(--t-color-status-" + t.color + ")",
516
+ "--color": "var(--t-color-status-" + t.color + ")",
517
517
  "--background": "transparent"
518
- } : v = {
519
- "--border": "0.55px solid " + e.color,
520
- "--color": e.color,
518
+ } : _ = {
519
+ "--border": "0.55px solid " + t.color,
520
+ "--color": t.color,
521
521
  "--background": "transparent"
522
- } : v = {
522
+ } : _ = {
523
523
  "--border": "0.55px solid var(--t-color-text)",
524
524
  "--color": "var(--t-color-text)",
525
525
  "--background": "transparent"
526
- }), v;
526
+ }), _;
527
527
  });
528
- return n({
528
+ return s({
529
529
  open: d
530
- }), (v, l) => c.value ? (i(), _("div", {
530
+ }), (_, c) => i.value ? (u(), v("div", {
531
531
  key: 0,
532
- class: x(["t-toast", { [e.placement]: !0, open: r.value, closing: u.value }]),
533
- style: w({ "--space": e.space, ...f.value })
534
- }, D(e.message), 7)) : C("", !0);
532
+ class: x(["t-toast", { [t.placement]: !0, open: r.value, closing: a.value }]),
533
+ style: w({ "--space": t.space, ...f.value })
534
+ }, V(t.message), 7)) : z("", !0);
535
535
  }
536
- }), se = /* @__PURE__ */ b(Re, [["__scopeId", "data-v-61960e03"]]), Gt = (t = {}) => ({
536
+ }), ne = /* @__PURE__ */ b(De, [["__scopeId", "data-v-61960e03"]]), Qt = (o = {}) => ({
537
537
  open() {
538
- let n = document.body.querySelector(".t-app");
539
- if (!n) return;
540
- const o = document.createElement("div"), e = y();
541
- n.appendChild(o);
542
- const s = F({
538
+ let s = document.body.querySelector(".t-app");
539
+ if (!s) return;
540
+ const e = document.createElement("div"), t = y();
541
+ s.appendChild(e);
542
+ const n = F({
543
543
  render() {
544
- return G(se, {
545
- ...t,
546
- ref: e,
544
+ return G(ne, {
545
+ ...o,
546
+ ref: t,
547
547
  onDismiss: () => {
548
548
  setTimeout(() => {
549
- s.unmount(), o.remove();
549
+ n.unmount(), e.remove();
550
550
  }, 300);
551
551
  }
552
552
  });
553
553
  }
554
554
  });
555
- s.mount(o), setTimeout(() => {
556
- e.value?.open?.();
555
+ n.mount(e), setTimeout(() => {
556
+ t.value?.open?.();
557
557
  }, 50);
558
558
  }
559
559
  }), Ae = y(0);
560
- function Ve() {
560
+ function Re() {
561
561
  return {
562
562
  height: Ae
563
563
  };
564
564
  }
565
- const Le = /* @__PURE__ */ T({
565
+ const Le = /* @__PURE__ */ $({
566
566
  __name: "t-cable",
567
567
  props: {
568
568
  keyboard: { type: Boolean, default: !0 },
569
569
  placement: { default: "bottom" }
570
570
  },
571
- setup(t) {
572
- const n = t, { height: o } = Ve();
573
- return (e, s) => (i(), _("div", {
574
- class: x(["t-cable", { keyboard: n.keyboard && P(o) > 0, [n.placement]: !0 }]),
575
- style: w({ "--t-keyboard-height": P(o) + "px", "--t-keyboard-transition": P(o) > 0 ? "0.3s" : "0.1s" })
571
+ setup(o) {
572
+ const s = o, { height: e } = Re();
573
+ return (t, n) => (u(), v("div", {
574
+ class: x(["t-cable", { keyboard: s.keyboard && P(e) > 0, [s.placement]: !0 }]),
575
+ style: w({ "--t-keyboard-height": P(e) + "px", "--t-keyboard-transition": P(e) > 0 ? "0.3s" : "0.1s" })
576
576
  }, [
577
- h(e.$slots, "default", {}, void 0, !0)
577
+ h(t.$slots, "default", {}, void 0, !0)
578
578
  ], 6));
579
579
  }
580
- }), Ne = /* @__PURE__ */ b(Le, [["__scopeId", "data-v-ecb72421"]]), Oe = /* @__PURE__ */ T({
580
+ }), Ne = /* @__PURE__ */ b(Le, [["__scopeId", "data-v-ecb72421"]]), Oe = /* @__PURE__ */ $({
581
581
  __name: "t-card",
582
582
  props: {
583
583
  color: { default: null }
584
584
  },
585
- setup(t) {
586
- const n = t, o = S(() => {
587
- let e;
588
- return n.color ? ["warning", "info", "danger", "primary", "secondary", "success"].includes(n.color) ? e = {
589
- "--background": "var(--t-color-status-" + n.color + ")"
590
- } : e = {
591
- "--background": n.color
592
- } : e = {
585
+ setup(o) {
586
+ const s = o, e = I(() => {
587
+ let t;
588
+ return s.color ? ["warning", "info", "danger", "primary", "secondary", "success"].includes(s.color) ? t = {
589
+ "--background": "var(--t-color-status-" + s.color + ")"
590
+ } : t = {
591
+ "--background": s.color
592
+ } : t = {
593
593
  "--background": "var(--t-color-surface)"
594
- }, e;
594
+ }, t;
595
595
  });
596
- return (e, s) => (i(), _("div", {
596
+ return (t, n) => (u(), v("div", {
597
597
  class: "t-card",
598
- style: w(o.value)
598
+ style: w(e.value)
599
599
  }, [
600
- h(e.$slots, "default")
600
+ h(t.$slots, "default")
601
601
  ], 4));
602
602
  }
603
603
  }), qe = {}, Xe = { class: "t-content" };
604
- function We(t, n) {
605
- return i(), _("div", Xe, [
606
- h(t.$slots, "default", {}, void 0, !0)
604
+ function We(o, s) {
605
+ return u(), v("div", Xe, [
606
+ h(o.$slots, "default", {}, void 0, !0)
607
607
  ]);
608
608
  }
609
- const re = /* @__PURE__ */ b(qe, [["render", We], ["__scopeId", "data-v-d58accf4"]]), ee = 80, Ye = /* @__PURE__ */ T({
609
+ const re = /* @__PURE__ */ b(qe, [["render", We], ["__scopeId", "data-v-d58accf4"]]), ee = 80, Ye = /* @__PURE__ */ $({
610
610
  __name: "t-refresher",
611
611
  emits: ["refresh"],
612
- setup(t, { emit: n }) {
613
- const o = n, e = y(0), s = y(!1), r = y();
614
- let c, u = !1;
612
+ setup(o, { emit: s }) {
613
+ const e = s, t = y(0), n = y(!1), r = y();
614
+ let i, a = !1;
615
615
  const d = () => {
616
- s.value = !1, e.value = 0, c && c.cancel(), setTimeout(() => {
617
- u = !1;
616
+ n.value = !1, t.value = 0, i && i.cancel(), setTimeout(() => {
617
+ a = !1;
618
618
  }, 2e3);
619
619
  }, p = () => {
620
- u = !0, s.value = !0, e.value = ee, o("refresh", d);
620
+ a = !0, n.value = !0, t.value = ee, e("refresh", d);
621
621
  };
622
622
  return A(() => r.value, () => {
623
- c && c.destroy();
623
+ i && i.destroy();
624
624
  let f = r.value.closest(".t-content");
625
- f && (c = N(f, {
625
+ f && (i = N(f, {
626
626
  options: {
627
627
  minDist: 60
628
628
  },
629
- move({ dy: v, e: l }) {
630
- s.value || u || v < 0 || (v > 5 && f.scrollTop == 0 && (l.preventDefault(), f.classList.add("scroll-hidden")), v >= 120 ? p() : v > 10 && (e.value = v));
629
+ move({ dy: _, e: c }) {
630
+ n.value || a || _ < 0 || (_ > 5 && f.scrollTop == 0 && (c.preventDefault(), f.classList.add("scroll-hidden")), _ >= 120 ? p() : _ > 10 && (t.value = _));
631
631
  },
632
- up({ dy: v, e: l }) {
633
- f.classList.remove("scroll-hidden"), !(s.value || u) && (v > ee ? p() : e.value = 0);
632
+ up({ dy: _, e: c }) {
633
+ f.classList.remove("scroll-hidden"), !(n.value || a) && (_ > ee ? p() : t.value = 0);
634
634
  },
635
635
  cancel() {
636
- f.classList.remove("scroll-hidden"), !(s.value || u) && (s.value = !1, e.value = 0);
636
+ f.classList.remove("scroll-hidden"), !(n.value || a) && (n.value = !1, t.value = 0);
637
637
  }
638
638
  }, {
639
639
  passive: !1
640
640
  }));
641
641
  }), L(() => {
642
- c && c.destroy();
643
- }), (f, v) => Y((i(), _("div", {
642
+ i && i.destroy();
643
+ }), (f, _) => Y((u(), v("div", {
644
644
  class: "t-refresher",
645
645
  ref_key: "container",
646
646
  ref: r,
647
- style: w({ height: `${e.value}px` })
647
+ style: w({ height: `${t.value}px` })
648
648
  }, [
649
- $("img", {
650
- class: x({ spiner: s.value }),
649
+ k("img", {
650
+ class: x({ spiner: n.value }),
651
651
  src: "https://static.toikit.com/toikit/home_2.png?v=3",
652
652
  alt: "Loading...",
653
653
  style: { width: "22px", height: "22px" }
654
654
  }, null, 2)
655
655
  ], 4)), [
656
- [H, e.value > 0]
656
+ [H, t.value > 0]
657
657
  ]);
658
658
  }
659
659
  }), He = /* @__PURE__ */ b(Ye, [["__scopeId", "data-v-ac2b2370"]]), Ue = {}, je = { class: "t-screen" };
660
- function Fe(t, n) {
661
- return i(), _("div", je, [
662
- h(t.$slots, "default", {}, void 0, !0)
660
+ function Fe(o, s) {
661
+ return u(), v("div", je, [
662
+ h(o.$slots, "default", {}, void 0, !0)
663
663
  ]);
664
664
  }
665
- const ae = /* @__PURE__ */ b(Ue, [["render", Fe], ["__scopeId", "data-v-c2a3436c"]]), Ge = /* @__PURE__ */ T({
665
+ const ae = /* @__PURE__ */ b(Ue, [["render", Fe], ["__scopeId", "data-v-c2a3436c"]]), Ge = /* @__PURE__ */ $({
666
666
  __name: "t-swipe-screen",
667
667
  emits: ["change"],
668
- setup(t, { emit: n }) {
669
- let o = {};
670
- const e = oe(), s = pe(), r = e.getRoutes(), c = y(!1), u = n;
671
- for (let a of r)
672
- o[a.name] = a.components;
673
- const d = (a) => {
674
- a && k.addScreen({
675
- name: a,
668
+ setup(o, { emit: s }) {
669
+ let e = {};
670
+ const t = oe(), n = pe(), r = t.getRoutes(), i = y(!1), a = s;
671
+ for (let l of r)
672
+ e[l.name] = l.components;
673
+ const d = (l) => {
674
+ l && T.addScreen({
675
+ name: l,
676
676
  target: null,
677
- component: ie(o[a] || null)
677
+ component: ie(e[l] || null)
678
678
  });
679
- }, p = (a, g) => {
680
- !g || k.screens[a].target || (k.screens[a].target = g.$el, a > 0 && (c.value = !0, g.$el.style.transform = "translateX(var(--t-app-width))", g.$el.transitionOrigin = "center", document.documentElement.style.setProperty("--t-screen-backdrop-duration", "0s"), document.documentElement.style.setProperty("--t-swipe-backdrop-opacity", "0"), setTimeout(() => {
681
- g.$el.style.transition = "transform 0.35s ease", g.$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(calc(var(--t-app-width) / 100 * 30 * -1)) scale(0.5) perspective(var(--t-app-width)) rotateY(30deg)"), setTimeout(() => {
682
- u("change"), c.value = !1;
679
+ }, p = (l, g) => {
680
+ !g || T.screens[l].target || (T.screens[l].target = g.$el, l > 0 && (i.value = !0, g.$el.style.transform = "translateX(var(--t-app-width))", g.$el.transitionOrigin = "center", document.documentElement.style.setProperty("--t-screen-backdrop-duration", "0s"), document.documentElement.style.setProperty("--t-swipe-backdrop-opacity", "0"), setTimeout(() => {
681
+ g.$el.style.transition = "transform 0.35s ease", g.$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"), T.screens.length > 1 && (T.lastScreen.value.target.style.transitionOrigin = "left center", T.lastScreen.value.target.style.transition = "transform 0.35s ease", T.lastScreen.value.target.style.transform = "translateX(calc(var(--t-app-width) / 100 * 30 * -1)) scale(0.5) perspective(var(--t-app-width)) rotateY(30deg)"), setTimeout(() => {
682
+ a("change"), i.value = !1;
683
683
  }, 400);
684
684
  }, 100)));
685
685
  }, f = () => {
686
- k.currentScreen.value.target.style.transition = "transform 0.35s ease", k.currentScreen.value.target.style.transform = "translateX(var(--t-app-width)) scale(1)", k.lastScreen.value.target.style.transition = "transform 0.35s ease", k.lastScreen.value.target.style.transform = "translateX(0px) scale(1) perspective(var(--t-app-width)) rotateY(0deg)", document.documentElement.style.setProperty("--t-screen-backdrop-duration", "0.35s"), document.documentElement.style.setProperty("--t-swipe-backdrop-opacity", "0"), c.value = !0, setTimeout(() => {
687
- k.removeScreen(), u("change"), c.value = !1;
686
+ T.currentScreen.value.target.style.transition = "transform 0.35s ease", T.currentScreen.value.target.style.transform = "translateX(var(--t-app-width)) scale(1)", T.lastScreen.value.target.style.transition = "transform 0.35s ease", T.lastScreen.value.target.style.transform = "translateX(0px) scale(1) perspective(var(--t-app-width)) rotateY(0deg)", document.documentElement.style.setProperty("--t-screen-backdrop-duration", "0.35s"), document.documentElement.style.setProperty("--t-swipe-backdrop-opacity", "0"), i.value = !0, setTimeout(() => {
687
+ T.removeScreen(), a("change"), i.value = !1;
688
688
  }, 400);
689
689
  };
690
- d(s.name), A(() => s.name, (a, g) => {
691
- a != k.currentScreen.value.name && (k.lastScreen.value?.name == a ? f() : d(a));
690
+ d(n.name), A(() => n.name, (l, g) => {
691
+ l != T.currentScreen.value.name && (T.lastScreen.value?.name == l ? f() : d(l));
692
692
  });
693
- const v = () => {
694
- c.value = !0;
695
- const a = k.currentScreen.value.target, g = k.lastScreen.value.target;
696
- a.style.transition = "transform 0.35s ease", a.style.transform = "translateX(0px)", g.style.transition = "transform 0.35s ease", g.style.transform = "translateX(calc(var(--t-app-width) / 100 * 30 * -1)) scale(0.5) perspective(var(--t-app-width)) rotateY(30deg)", document.documentElement.style.setProperty("--t-screen-backdrop-duration", "0.35s"), document.documentElement.style.setProperty("--t-swipe-backdrop-opacity", "0.5"), setTimeout(() => {
697
- c.value = !1;
693
+ const _ = () => {
694
+ i.value = !0;
695
+ const l = T.currentScreen.value.target, g = T.lastScreen.value.target;
696
+ l.style.transition = "transform 0.35s ease", l.style.transform = "translateX(0px)", g.style.transition = "transform 0.35s ease", g.style.transform = "translateX(calc(var(--t-app-width) / 100 * 30 * -1)) scale(0.5) perspective(var(--t-app-width)) rotateY(30deg)", document.documentElement.style.setProperty("--t-screen-backdrop-duration", "0.35s"), document.documentElement.style.setProperty("--t-swipe-backdrop-opacity", "0.5"), setTimeout(() => {
697
+ i.value = !1;
698
698
  }, 400);
699
699
  };
700
- let l;
700
+ let c;
701
701
  return Q(() => {
702
- l = N(document, {
702
+ c = N(document, {
703
703
  pointerId: null,
704
- beforeEvent(a) {
705
- return c.value || k.screens.length < 2 ? !1 : (a.type == "pointerdown" && !this.pointerId && (this.pointerId = a.pointerId), this.pointerId == a.pointerId);
704
+ beforeEvent(l) {
705
+ return i.value || T.screens.length < 2 ? !1 : (l.type == "pointerdown" && !this.pointerId && (this.pointerId = l.pointerId), this.pointerId == l.pointerId);
706
706
  },
707
- afterEvent(a) {
708
- (a.type == "pointerup" || a.type == "pointercancel") && (this.pointerId = null);
707
+ afterEvent(l) {
708
+ (l.type == "pointerup" || l.type == "pointercancel") && (this.pointerId = null);
709
709
  },
710
- fast({ d: a }) {
711
- a == "right" && e.back();
710
+ fast({ d: l }) {
711
+ l == "right" && t.back();
712
712
  },
713
- move({ dx: a }) {
714
- const g = window.innerWidth, m = a / g * 100, I = k.currentScreen.value.target, R = k.lastScreen?.value?.target;
715
- if (a > 15 && a <= g) {
716
- I.style.transition = "transform 0s ease", I.style.transform = `translateX(${a}px)`, R.style.transition = "transform 0s ease", document.documentElement.style.setProperty("--t-screen-backdrop-duration", "0s"), R.style.transform = `translateX(calc((var(--t-app-width) / 100 * 30 * -1) + ((var(--t-app-width) / 100 * 30) / 100 * ${m}))) scale(${0.5 + 0.5 / 100 * m}) perspective(var(--t-app-width)) rotateY(${30 - 30 / 100 * m}deg)`, document.documentElement.style.setProperty("--t-swipe-backdrop-opacity", `${0.5 - 0.5 / 100 * m}`);
713
+ move({ dx: l }) {
714
+ const g = window.innerWidth, m = l / g * 100, S = T.currentScreen.value.target, D = T.lastScreen?.value?.target;
715
+ if (l > 15 && l <= g) {
716
+ S.style.transition = "transform 0s ease", S.style.transform = `translateX(${l}px)`, D.style.transition = "transform 0s ease", document.documentElement.style.setProperty("--t-screen-backdrop-duration", "0s"), D.style.transform = `translateX(calc((var(--t-app-width) / 100 * 30 * -1) + ((var(--t-app-width) / 100 * 30) / 100 * ${m}))) scale(${0.5 + 0.5 / 100 * m}) perspective(var(--t-app-width)) rotateY(${30 - 30 / 100 * m}deg)`, document.documentElement.style.setProperty("--t-swipe-backdrop-opacity", `${0.5 - 0.5 / 100 * m}`);
717
717
  return;
718
718
  }
719
719
  },
720
- up({ dx: a }) {
720
+ up({ dx: l }) {
721
721
  const g = window.innerWidth;
722
- a / g * 100 >= 50 ? e.back() : v();
722
+ l / g * 100 >= 50 ? t.back() : _();
723
723
  },
724
724
  cancel() {
725
- v();
725
+ _();
726
726
  }
727
727
  });
728
728
  }), L(() => {
729
- l && l.destroy(), k.removeAllScreen();
730
- }), (a, g) => (i(), _(V, null, [
731
- (i(!0), _(V, null, U(P(k).screens, (m, I) => (i(), z(ae, {
729
+ c && c.destroy(), T.removeAllScreen();
730
+ }), (l, g) => (u(), v(R, null, [
731
+ (u(!0), v(R, null, U(P(T).screens, (m, S) => (u(), B(ae, {
732
732
  ref_for: !0,
733
- ref: (R) => p(I, R),
734
- style: w({ zIndex: I + (I == P(k).screens.length - 1 ? 2 : 1) }),
735
- key: I
733
+ ref: (D) => p(S, D),
734
+ style: w({ zIndex: S + (S == P(T).screens.length - 1 ? 2 : 1) }),
735
+ key: S
736
736
  }, {
737
737
  default: E(() => [
738
- (i(), z(ce(m.component.default)))
738
+ (u(), B(ce(m.component.default)))
739
739
  ]),
740
740
  _: 2
741
741
  }, 1032, ["style"]))), 128)),
742
- $("div", {
742
+ k("div", {
743
743
  class: "t-swipe-backdrop",
744
- style: w({ zIndex: P(k).screens.length })
744
+ style: w({ zIndex: P(T).screens.length })
745
745
  }, null, 4)
746
746
  ], 64));
747
747
  }
748
- }), Ke = /* @__PURE__ */ b(Ge, [["__scopeId", "data-v-ae7abe9c"]]), Me = /* @__PURE__ */ T({
748
+ }), Ke = /* @__PURE__ */ b(Ge, [["__scopeId", "data-v-ae7abe9c"]]), Me = /* @__PURE__ */ $({
749
749
  __name: "t-toolbar",
750
750
  props: {
751
751
  placement: { default: "bottom" },
752
752
  safe: { type: Boolean, default: !0 },
753
753
  size: { default: "50px" }
754
754
  },
755
- setup(t) {
756
- const n = t;
757
- return (o, e) => (i(), _("div", {
758
- class: x(["t-toolbar", { [n.placement]: !0, safe: n.safe }]),
759
- style: w({ "--t-size-toolbar": n.size })
755
+ setup(o) {
756
+ const s = o;
757
+ return (e, t) => (u(), v("div", {
758
+ class: x(["t-toolbar", { [s.placement]: !0, safe: s.safe }]),
759
+ style: w({ "--t-size-toolbar": s.size })
760
760
  }, [
761
- $("div", null, [
762
- h(o.$slots, "default", {}, void 0, !0)
761
+ k("div", null, [
762
+ h(e.$slots, "default", {}, void 0, !0)
763
763
  ])
764
764
  ], 6));
765
765
  }
766
- }), Je = /* @__PURE__ */ b(Me, [["__scopeId", "data-v-db1924b1"]]), Qe = /* @__PURE__ */ T({
766
+ }), Je = /* @__PURE__ */ b(Me, [["__scopeId", "data-v-db1924b1"]]), Qe = /* @__PURE__ */ $({
767
767
  __name: "t-back-button",
768
768
  props: {
769
769
  to: {}
770
770
  },
771
- setup(t) {
772
- const n = oe(), o = t, e = () => {
773
- k.hasPrevious.value ? n?.back?.() : o.to && n?.push?.(o.to);
771
+ setup(o) {
772
+ const s = oe(), e = o, t = () => {
773
+ T.hasPrevious.value ? s?.back?.() : e.to && s?.push?.(e.to);
774
774
  };
775
- return (s, r) => s.to || P(k).hasPrevious ? (i(), _("button", {
775
+ return (n, r) => n.to || P(T).hasPrevious ? (u(), v("button", {
776
776
  key: 0,
777
777
  class: "t-back-button",
778
- onClick: e
778
+ onClick: t
779
779
  }, [
780
- h(s.$slots, "default", {}, () => [
781
- r[0] || (r[0] = $("i", { class: "ri-arrow-left-s-line" }, null, -1))
780
+ h(n.$slots, "default", {}, () => [
781
+ r[0] || (r[0] = k("i", { class: "ri-arrow-left-s-line" }, null, -1))
782
782
  ], !0)
783
- ])) : C("", !0);
783
+ ])) : z("", !0);
784
784
  }
785
- }), Ze = /* @__PURE__ */ b(Qe, [["__scopeId", "data-v-ed626a3d"]]), et = /* @__PURE__ */ T({
785
+ }), Ze = /* @__PURE__ */ b(Qe, [["__scopeId", "data-v-ed626a3d"]]), et = /* @__PURE__ */ $({
786
786
  __name: "t-text",
787
787
  props: {
788
788
  color: { default: "var(--t-color-text)" },
789
789
  size: { default: "standard" }
790
790
  },
791
- setup(t) {
792
- const n = t, o = S(() => {
793
- let e, s = n.color;
794
- return n.size == "standard" ? e = "var(--t-fs-10)" : n.size == "small" ? e = "var(--t-fs-08)" : n.size == "large" ? e = "var(--t-fs-12)" : e = n.size, ["warning", "info", "danger", "primary", "secondary", "success"].includes(n.color) && (s = `var(--t-color-status-${n.color})`), {
795
- "--color": s,
796
- "--font-size": e
791
+ setup(o) {
792
+ const s = o, e = I(() => {
793
+ let t, n = s.color;
794
+ return s.size == "standard" ? t = "var(--t-fs-10)" : s.size == "small" ? t = "var(--t-fs-08)" : s.size == "large" ? t = "var(--t-fs-12)" : t = s.size, ["warning", "info", "danger", "primary", "secondary", "success"].includes(s.color) && (n = `var(--t-color-status-${s.color})`), {
795
+ "--color": n,
796
+ "--font-size": t
797
797
  };
798
798
  });
799
- return (e, s) => (i(), _("span", {
799
+ return (t, n) => (u(), v("span", {
800
800
  class: "t-text",
801
- style: w(o.value)
801
+ style: w(e.value)
802
802
  }, [
803
- h(e.$slots, "default", {}, void 0, !0)
803
+ h(t.$slots, "default", {}, void 0, !0)
804
804
  ], 4));
805
805
  }
806
- }), J = /* @__PURE__ */ b(et, [["__scopeId", "data-v-f0f94f05"]]), tt = /* @__PURE__ */ T({
806
+ }), J = /* @__PURE__ */ b(et, [["__scopeId", "data-v-f0f94f05"]]), tt = /* @__PURE__ */ $({
807
807
  __name: "t-pull-signal",
808
808
  props: {
809
809
  placement: { default: "bottom" }
810
810
  },
811
- setup(t) {
812
- return (n, o) => (i(), _("div", {
813
- class: x(["t-pull-bar", { [n.placement]: !0 }])
811
+ setup(o) {
812
+ return (s, e) => (u(), v("div", {
813
+ class: x(["t-pull-bar", { [s.placement]: !0 }])
814
814
  }, null, 2));
815
815
  }
816
- }), le = /* @__PURE__ */ b(tt, [["__scopeId", "data-v-daa38c85"]]), ot = /* @__PURE__ */ T({
816
+ }), le = /* @__PURE__ */ b(tt, [["__scopeId", "data-v-daa38c85"]]), ot = /* @__PURE__ */ $({
817
817
  __name: "t-sheet",
818
818
  props: {
819
819
  background: { default: "var(--t-color-surface)" },
@@ -828,95 +828,95 @@ const ae = /* @__PURE__ */ b(Ue, [["render", Fe], ["__scopeId", "data-v-c2a3436c
828
828
  closeButton: { type: Boolean, default: !0 }
829
829
  },
830
830
  emits: ["dismiss"],
831
- setup(t, { emit: n }) {
832
- const o = t, e = n, s = y(), r = y(), c = y(!1);
833
- let u = null;
834
- const d = S(() => {
835
- if (o.placement == "bottom") return "down";
836
- if (o.placement == "top") return "up";
837
- if (o.placement == "left") return "left";
838
- if (o.placement == "right") return "right";
839
- }), p = (v) => {
840
- e("dismiss", v);
831
+ setup(o, { emit: s }) {
832
+ const e = o, t = s, n = y(), r = y(), i = y(!1);
833
+ let a = null;
834
+ const d = I(() => {
835
+ if (e.placement == "bottom") return "down";
836
+ if (e.placement == "top") return "up";
837
+ if (e.placement == "left") return "left";
838
+ if (e.placement == "right") return "right";
839
+ }), p = (_) => {
840
+ t("dismiss", _);
841
841
  }, f = () => {
842
- c.value = !0, setTimeout(() => {
843
- c.value = !1;
842
+ i.value = !0, setTimeout(() => {
843
+ i.value = !1;
844
844
  }, 300);
845
845
  };
846
- return A(() => s.value, (v) => {
847
- v && (u = N(s.value, {
846
+ return A(() => n.value, (_) => {
847
+ _ && (a = N(n.value, {
848
848
  options: {
849
849
  minDist: 30
850
850
  },
851
851
  pointerId: null,
852
- beforeEvent(l) {
853
- let a = !1, g = !1;
854
- return c.value || !o.gesture || o.placement == "center" ? a = !0 : this.pointerId ? (a = !0, g = this.pointerId == l.pointerId) : l.type == "pointerdown" && (this.pointerId = l.pointerId, a = !0, g = !0), a && (l.stopPropagation(), q(l.target) || (l.preventDefault(), X())), g;
852
+ beforeEvent(c) {
853
+ let l = !1, g = !1;
854
+ return i.value || !e.gesture || e.placement == "center" ? l = !0 : this.pointerId ? (l = !0, g = this.pointerId == c.pointerId) : c.type == "pointerdown" && (this.pointerId = c.pointerId, l = !0, g = !0), l && (c.stopPropagation(), q(c.target) || (c.preventDefault(), X())), g;
855
855
  },
856
- afterEvent(l) {
857
- (l.type == "pointerup" || l.type == "pointercancel") && (this.pointerId = null);
856
+ afterEvent(c) {
857
+ (c.type == "pointerup" || c.type == "pointercancel") && (this.pointerId = null);
858
858
  },
859
- fast({ d: l }) {
860
- f(), l == d.value ? e("dismiss", "gesture") : r.value.open();
859
+ fast({ d: c }) {
860
+ f(), c == d.value ? t("dismiss", "gesture") : r.value.open();
861
861
  },
862
- move({ dy: l, dx: a, d: g }) {
862
+ move({ dy: c, dx: l, d: g }) {
863
863
  if (g != d.value) return;
864
864
  let m = 0;
865
- o.placement == "bottom" || o.placement == "top" ? m = l : m = a, r.value.render({
865
+ e.placement == "bottom" || e.placement == "top" ? m = c : m = l, r.value.render({
866
866
  contentTransform: m + "px",
867
867
  transition: "0s"
868
868
  });
869
869
  },
870
- up({ dy: l, dx: a, d: g }) {
870
+ up({ dy: c, dx: l, d: g }) {
871
871
  if (f(), g != d.value) {
872
872
  r.value.open();
873
873
  return;
874
874
  }
875
- let m, I, R;
876
- o.placement == "bottom" || o.placement == "top" ? (m = s.value.offsetHeight, R = l) : (m = s.value.offsetWidth, R = a), I = R / m * 100, I > 50 ? e("dismiss", "gesture") : r.value.open();
875
+ let m, S, D;
876
+ e.placement == "bottom" || e.placement == "top" ? (m = n.value.offsetHeight, D = c) : (m = n.value.offsetWidth, D = l), S = D / m * 100, S > 50 ? t("dismiss", "gesture") : r.value.open();
877
877
  },
878
878
  cancel() {
879
879
  f(), r.value.open();
880
880
  }
881
881
  }));
882
882
  }), L(() => {
883
- u && u.destroy();
884
- }), (v, l) => (i(), z(W, {
883
+ a && a.destroy();
884
+ }), (_, c) => (u(), B(W, {
885
885
  ref_key: "present",
886
886
  ref: r,
887
- placement: o.placement,
888
- backdrop: v.backdrop,
889
- visible: o.visible,
890
- keepalive: o.keepalive,
887
+ placement: e.placement,
888
+ backdrop: _.backdrop,
889
+ visible: e.visible,
890
+ keepalive: e.keepalive,
891
891
  onDismiss: p
892
892
  }, {
893
893
  default: E(() => [
894
- o.gesture && o.placement != "center" ? (i(), z(le, {
894
+ e.gesture && e.placement != "center" ? (u(), B(le, {
895
895
  key: 0,
896
- placement: o.placement
897
- }, null, 8, ["placement"])) : C("", !0),
898
- o.closeButton && o.placement == "center" ? (i(), _("button", {
896
+ placement: e.placement
897
+ }, null, 8, ["placement"])) : z("", !0),
898
+ e.closeButton && e.placement == "center" ? (u(), v("button", {
899
899
  key: 1,
900
900
  class: "t-sheet-close",
901
- onClick: l[0] || (l[0] = (a) => p("close-button"))
901
+ onClick: c[0] || (c[0] = (l) => p("close-button"))
902
902
  }, [
903
- h(v.$slots, "close-icon", {}, () => [
904
- l[1] || (l[1] = $("i", { class: "ri-close-large-line" }, null, -1))
903
+ h(_.$slots, "close-icon", {}, () => [
904
+ c[1] || (c[1] = k("i", { class: "ri-close-large-line" }, null, -1))
905
905
  ], !0)
906
- ])) : C("", !0),
907
- $("div", {
908
- class: x(["t-sheet", { fullscreen: o.fullscreen, [o.placement]: !0, rounded: v.rounded, radius: o.radius }]),
909
- style: w({ "--background": o.background }),
906
+ ])) : z("", !0),
907
+ k("div", {
908
+ class: x(["t-sheet", { fullscreen: e.fullscreen, [e.placement]: !0, rounded: _.rounded, radius: e.radius }]),
909
+ style: w({ "--background": e.background }),
910
910
  ref_key: "sheet",
911
- ref: s
911
+ ref: n
912
912
  }, [
913
- h(v.$slots, "default", {}, void 0, !0)
913
+ h(_.$slots, "default", {}, void 0, !0)
914
914
  ], 6)
915
915
  ]),
916
916
  _: 3
917
917
  }, 8, ["placement", "backdrop", "visible", "keepalive"]));
918
918
  }
919
- }), nt = /* @__PURE__ */ b(ot, [["__scopeId", "data-v-e2e8445e"]]), st = { class: "t-input-label" }, rt = { class: "t-input-content" }, at = ["type", "placeholder", "value"], lt = /* @__PURE__ */ T({
919
+ }), st = /* @__PURE__ */ b(ot, [["__scopeId", "data-v-e2e8445e"]]), nt = { class: "t-input-label" }, rt = { class: "t-input-content" }, at = ["type", "placeholder", "value"], lt = /* @__PURE__ */ $({
920
920
  __name: "t-input",
921
921
  props: {
922
922
  size: { default: "standard" },
@@ -930,121 +930,121 @@ const ae = /* @__PURE__ */ b(Ue, [["render", Fe], ["__scopeId", "data-v-c2a3436c
930
930
  variant: { default: "default" }
931
931
  },
932
932
  emits: ["update:modelValue"],
933
- setup(t, { emit: n }) {
934
- const o = t, e = n, s = (r) => {
935
- e("update:modelValue", r.target.value);
933
+ setup(o, { emit: s }) {
934
+ const e = o, t = s, n = (r) => {
935
+ t("update:modelValue", r.target.value);
936
936
  };
937
- return (r, c) => (i(), _("div", {
938
- class: x(["t-input", { rounded: o.rounded, ["size-" + o.size]: !0, ["variant-" + o.variant]: !0 }])
937
+ return (r, i) => (u(), v("div", {
938
+ class: x(["t-input", { rounded: e.rounded, ["size-" + e.size]: !0, ["variant-" + e.variant]: !0 }])
939
939
  }, [
940
- $("label", null, [
941
- $("span", st, D(r.label), 1),
942
- $("div", rt, [
940
+ k("label", null, [
941
+ k("span", nt, V(r.label), 1),
942
+ k("div", rt, [
943
943
  h(r.$slots, "start", {}, void 0, !0),
944
- $("input", {
944
+ k("input", {
945
945
  type: r.type,
946
946
  placeholder: r.placeholder,
947
947
  value: r.modelValue,
948
- onInput: s
948
+ onInput: n
949
949
  }, null, 40, at),
950
950
  h(r.$slots, "end", {}, void 0, !0)
951
951
  ])
952
952
  ]),
953
- o.error ? (i(), z(J, {
953
+ e.error ? (u(), B(J, {
954
954
  key: 0,
955
955
  color: "danger"
956
956
  }, {
957
957
  default: E(() => [
958
- O(D(o.error), 1)
958
+ O(V(e.error), 1)
959
959
  ]),
960
960
  _: 1
961
- })) : o.help ? (i(), z(J, {
961
+ })) : e.help ? (u(), B(J, {
962
962
  key: 1,
963
963
  color: "secondary"
964
964
  }, {
965
965
  default: E(() => [
966
- O(D(o.help), 1)
966
+ O(V(e.help), 1)
967
967
  ]),
968
968
  _: 1
969
- })) : C("", !0)
969
+ })) : z("", !0)
970
970
  ], 2));
971
971
  }
972
972
  }), ct = /* @__PURE__ */ b(lt, [["__scopeId", "data-v-1a9425cf"]]), it = {};
973
- function ut(t, n) {
974
- return i(), _("textarea");
973
+ function ut(o, s) {
974
+ return u(), v("textarea");
975
975
  }
976
976
  const dt = /* @__PURE__ */ b(it, [["render", ut]]), pt = {};
977
- function ft(t, n) {
978
- return i(), _("div");
977
+ function ft(o, s) {
978
+ return u(), v("div");
979
979
  }
980
980
  const mt = /* @__PURE__ */ b(pt, [["render", ft]]), vt = {}, _t = { class: "t-grid" };
981
- function yt(t, n) {
982
- return i(), _("div", _t);
981
+ function yt(o, s) {
982
+ return u(), v("div", _t);
983
983
  }
984
984
  const gt = /* @__PURE__ */ b(vt, [["render", yt]]), bt = {}, ht = { class: "t-grid-item" };
985
- function kt(t, n) {
986
- return i(), _("div", ht);
985
+ function kt(o, s) {
986
+ return u(), v("div", ht);
987
987
  }
988
- const $t = /* @__PURE__ */ b(bt, [["render", kt]]), Tt = /* @__PURE__ */ T({
988
+ const $t = /* @__PURE__ */ b(bt, [["render", kt]]), Tt = /* @__PURE__ */ $({
989
989
  __name: "t-divider",
990
990
  props: {
991
991
  direction: { default: "horizontal" }
992
992
  },
993
- setup(t) {
994
- const n = t;
995
- return (o, e) => (i(), _("div", {
996
- class: x(["t-divider", { [n.direction]: !0 }])
993
+ setup(o) {
994
+ const s = o;
995
+ return (e, t) => (u(), v("div", {
996
+ class: x(["t-divider", { [s.direction]: !0 }])
997
997
  }, null, 2));
998
998
  }
999
- }), wt = /* @__PURE__ */ b(Tt, [["__scopeId", "data-v-47ee8991"]]), xt = /* @__PURE__ */ T({
999
+ }), wt = /* @__PURE__ */ b(Tt, [["__scopeId", "data-v-47ee8991"]]), xt = /* @__PURE__ */ $({
1000
1000
  __name: "t-toggle-password",
1001
1001
  props: {
1002
1002
  color: { default: "warning" }
1003
1003
  },
1004
1004
  emits: ["change"],
1005
- setup(t, { emit: n }) {
1006
- const o = t, e = n, s = y(!1), r = y(), c = S(() => {
1007
- let p = o.color;
1008
- return ["warning", "info", "danger", "primary", "secondary", "success"].includes(o.color) && (p = `var(--t-color-status-${o.color})`), {
1005
+ setup(o, { emit: s }) {
1006
+ const e = o, t = s, n = y(!1), r = y(), i = I(() => {
1007
+ let p = e.color;
1008
+ return ["warning", "info", "danger", "primary", "secondary", "success"].includes(e.color) && (p = `var(--t-color-status-${e.color})`), {
1009
1009
  "--color": p
1010
1010
  };
1011
- }), u = () => r.value?.parentElement?.querySelector?.("input");
1011
+ }), a = () => r.value?.parentElement?.querySelector?.("input");
1012
1012
  Q(() => {
1013
- let p = u();
1014
- p && (s.value = p.type != "password", e("change", s.value));
1013
+ let p = a();
1014
+ p && (n.value = p.type != "password", t("change", n.value));
1015
1015
  });
1016
1016
  const d = () => {
1017
- let p = u();
1018
- p && (s.value = !s.value, s.value ? p.type = "text" : p.type = "password", e("change", s.value));
1017
+ let p = a();
1018
+ p && (n.value = !n.value, n.value ? p.type = "text" : p.type = "password", t("change", n.value));
1019
1019
  };
1020
- return (p, f) => (i(), _("button", {
1020
+ return (p, f) => (u(), v("button", {
1021
1021
  ref_key: "toggle",
1022
1022
  ref: r,
1023
1023
  class: "t-toggle-password",
1024
- style: w(c.value),
1024
+ style: w(i.value),
1025
1025
  onClick: d
1026
1026
  }, [
1027
- s.value ? h(p.$slots, "on", { key: 0 }, () => [
1028
- f[0] || (f[0] = $("i", { class: "ri-eye-line" }, null, -1))
1029
- ], !0) : C("", !0),
1030
- s.value ? C("", !0) : h(p.$slots, "off", { key: 1 }, () => [
1031
- f[1] || (f[1] = $("i", { class: "ri-eye-off-line" }, null, -1))
1027
+ n.value ? h(p.$slots, "on", { key: 0 }, () => [
1028
+ f[0] || (f[0] = k("i", { class: "ri-eye-line" }, null, -1))
1029
+ ], !0) : z("", !0),
1030
+ n.value ? z("", !0) : h(p.$slots, "off", { key: 1 }, () => [
1031
+ f[1] || (f[1] = k("i", { class: "ri-eye-off-line" }, null, -1))
1032
1032
  ], !0)
1033
1033
  ], 4));
1034
1034
  }
1035
- }), It = /* @__PURE__ */ b(xt, [["__scopeId", "data-v-3268e9e3"]]), St = /* @__PURE__ */ T({
1035
+ }), It = /* @__PURE__ */ b(xt, [["__scopeId", "data-v-3268e9e3"]]), St = /* @__PURE__ */ $({
1036
1036
  __name: "t-avatar",
1037
1037
  props: {
1038
1038
  square: { type: Boolean, default: !1 },
1039
1039
  size: { default: "standard" }
1040
1040
  },
1041
- setup(t) {
1042
- const n = t, o = S(() => n.size == "small" ? "24px" : n.size == "standard" ? "40px" : n.size == "large" ? "60px" : n.size);
1043
- return (e, s) => (i(), _("div", {
1044
- class: x(["t-avatar", { square: e.square }]),
1045
- style: w({ "--size": o.value })
1041
+ setup(o) {
1042
+ const s = o, e = I(() => s.size == "small" ? "24px" : s.size == "standard" ? "40px" : s.size == "large" ? "60px" : s.size);
1043
+ return (t, n) => (u(), v("div", {
1044
+ class: x(["t-avatar", { square: t.square }]),
1045
+ style: w({ "--size": e.value })
1046
1046
  }, [
1047
- h(e.$slots, "default", {}, void 0, !0)
1047
+ h(t.$slots, "default", {}, void 0, !0)
1048
1048
  ], 6));
1049
1049
  }
1050
1050
  }), zt = /* @__PURE__ */ b(St, [["__scopeId", "data-v-24384c2f"]]), Bt = { class: "t-collapse-title" }, Ct = {
@@ -1053,42 +1053,42 @@ const $t = /* @__PURE__ */ b(bt, [["render", kt]]), Tt = /* @__PURE__ */ T({
1053
1053
  }, Et = {
1054
1054
  key: 1,
1055
1055
  class: "icon"
1056
- }, Pt = { class: "t-collapse-content" }, Dt = /* @__PURE__ */ T({
1056
+ }, Vt = { class: "t-collapse-content" }, Pt = /* @__PURE__ */ $({
1057
1057
  __name: "t-collapse",
1058
1058
  props: {
1059
1059
  title: {}
1060
1060
  },
1061
1061
  emits: ["change"],
1062
- setup(t, { emit: n }) {
1063
- const o = t, e = n, s = y(!1), r = y(""), c = y(), u = () => {
1064
- s.value = !s.value, r.value = `calc(${c.value.offsetHeight}px + 2rem)`, e("change", s.value);
1062
+ setup(o, { emit: s }) {
1063
+ const e = o, t = s, n = y(!1), r = y(""), i = y(), a = () => {
1064
+ n.value = !n.value, r.value = `calc(${i.value.offsetHeight}px + 2rem)`, t("change", n.value);
1065
1065
  };
1066
- return e("change", s.value), (d, p) => (i(), _("div", {
1067
- class: x(["t-collapse", { open: s.value }]),
1066
+ return t("change", n.value), (d, p) => (u(), v("div", {
1067
+ class: x(["t-collapse", { open: n.value }]),
1068
1068
  style: w({ "--height": r.value })
1069
1069
  }, [
1070
- $("div", {
1070
+ k("div", {
1071
1071
  class: "t-collapse-header",
1072
- onClick: u
1072
+ onClick: a
1073
1073
  }, [
1074
1074
  h(d.$slots, "icon"),
1075
- $("div", Bt, [
1075
+ k("div", Bt, [
1076
1076
  h(d.$slots, "title", {}, () => [
1077
- O(D(o.title), 1)
1077
+ O(V(e.title), 1)
1078
1078
  ])
1079
1079
  ]),
1080
1080
  h(d.$slots, "toggle", {}, () => [
1081
- s.value ? (i(), _("div", Ct, [...p[0] || (p[0] = [
1082
- $("i", { class: "ri-arrow-up-s-line" }, null, -1)
1083
- ])])) : (i(), _("div", Et, [...p[1] || (p[1] = [
1084
- $("i", { class: "ri-arrow-down-s-line" }, null, -1)
1081
+ n.value ? (u(), v("div", Ct, [...p[0] || (p[0] = [
1082
+ k("i", { class: "ri-arrow-up-s-line" }, null, -1)
1083
+ ])])) : (u(), v("div", Et, [...p[1] || (p[1] = [
1084
+ k("i", { class: "ri-arrow-down-s-line" }, null, -1)
1085
1085
  ])]))
1086
1086
  ])
1087
1087
  ]),
1088
- $("div", Pt, [
1089
- $("div", {
1088
+ k("div", Vt, [
1089
+ k("div", {
1090
1090
  ref_key: "content",
1091
- ref: c
1091
+ ref: i
1092
1092
  }, [
1093
1093
  h(d.$slots, "content", {}, () => [
1094
1094
  h(d.$slots, "default")
@@ -1097,51 +1097,51 @@ const $t = /* @__PURE__ */ b(bt, [["render", kt]]), Tt = /* @__PURE__ */ T({
1097
1097
  ])
1098
1098
  ], 6));
1099
1099
  }
1100
- }), Rt = /* @__PURE__ */ T({
1100
+ }), Dt = /* @__PURE__ */ $({
1101
1101
  __name: "t-switch",
1102
1102
  props: {
1103
1103
  modelValue: { type: Boolean },
1104
1104
  color: { default: "primary" }
1105
1105
  },
1106
1106
  emits: ["update:modelValue"],
1107
- setup(t, { emit: n }) {
1108
- const o = t, e = n, s = () => {
1109
- e("update:modelValue", !o.modelValue);
1110
- }, r = S(() => {
1111
- let c = {
1112
- "--background": o.color,
1107
+ setup(o, { emit: s }) {
1108
+ const e = o, t = s, n = () => {
1109
+ t("update:modelValue", !e.modelValue);
1110
+ }, r = I(() => {
1111
+ let i = {
1112
+ "--background": e.color,
1113
1113
  "--color": "#ffffff"
1114
1114
  };
1115
- return ["warning", "info", "danger", "primary", "secondary", "success"].includes(o.color) && (c = {
1116
- "--background": `var(--t-color-status-${o.color})`,
1117
- "--color": `var(--t-color-status-${o.color}-text)`
1118
- }), c;
1115
+ return ["warning", "info", "danger", "primary", "secondary", "success"].includes(e.color) && (i = {
1116
+ "--background": `var(--t-color-status-${e.color})`,
1117
+ "--color": `var(--t-color-status-${e.color}-text)`
1118
+ }), i;
1119
1119
  });
1120
- return (c, u) => (i(), _("div", {
1121
- class: x(["t-switch", { on: o.modelValue }]),
1120
+ return (i, a) => (u(), v("div", {
1121
+ class: x(["t-switch", { on: e.modelValue }]),
1122
1122
  style: w(r.value),
1123
- onClick: s
1124
- }, [...u[0] || (u[0] = [
1125
- $("div", { class: "t-switch-icon" }, null, -1)
1123
+ onClick: n
1124
+ }, [...a[0] || (a[0] = [
1125
+ k("div", { class: "t-switch-icon" }, null, -1)
1126
1126
  ])], 6));
1127
1127
  }
1128
- }), At = /* @__PURE__ */ b(Rt, [["__scopeId", "data-v-3616970e"]]), Vt = /* @__PURE__ */ T({
1128
+ }), At = /* @__PURE__ */ b(Dt, [["__scopeId", "data-v-3616970e"]]), Rt = /* @__PURE__ */ $({
1129
1129
  __name: "t-tab",
1130
1130
  props: {
1131
1131
  value: {}
1132
1132
  },
1133
- setup(t) {
1134
- const n = t, o = ue("tabsState"), e = S(() => o.active.value === n.value), s = () => {
1135
- o.setActive(n.value);
1133
+ setup(o) {
1134
+ const s = o, e = ue("tabsState"), t = I(() => e.active.value === s.value), n = () => {
1135
+ e.setActive(s.value);
1136
1136
  };
1137
- return (r, c) => (i(), _("li", {
1138
- class: x(["t-tab", { active: e.value }])
1137
+ return (r, i) => (u(), v("li", {
1138
+ class: x(["t-tab", { active: t.value }])
1139
1139
  }, [
1140
1140
  j(M, {
1141
1141
  variant: "text",
1142
- onClick: s,
1143
- size: P(o).size,
1144
- color: e.value && P(o).variant == "text" ? P(o).color : void 0
1142
+ onClick: n,
1143
+ size: P(e).size,
1144
+ color: t.value && P(e).variant == "text" ? P(e).color : void 0
1145
1145
  }, {
1146
1146
  default: E(() => [
1147
1147
  h(r.$slots, "default", {}, void 0, !0)
@@ -1150,7 +1150,7 @@ const $t = /* @__PURE__ */ b(bt, [["render", kt]]), Tt = /* @__PURE__ */ T({
1150
1150
  }, 8, ["size", "color"])
1151
1151
  ], 2));
1152
1152
  }
1153
- }), Lt = /* @__PURE__ */ b(Vt, [["__scopeId", "data-v-36c12a50"]]), Nt = /* @__PURE__ */ T({
1153
+ }), Lt = /* @__PURE__ */ b(Rt, [["__scopeId", "data-v-36c12a50"]]), Nt = /* @__PURE__ */ $({
1154
1154
  __name: "t-tabs",
1155
1155
  props: {
1156
1156
  placement: { default: "top-start" },
@@ -1161,70 +1161,117 @@ const $t = /* @__PURE__ */ b(bt, [["render", kt]]), Tt = /* @__PURE__ */ T({
1161
1161
  size: { default: "standard" }
1162
1162
  },
1163
1163
  emits: ["update:modelValue"],
1164
- setup(t, { emit: n }) {
1165
- const o = t, e = n, s = y("0px"), r = y(), c = S(() => {
1166
- let d = o.color;
1164
+ setup(o, { emit: s }) {
1165
+ const e = o, t = s, n = y("0px"), r = y(), i = I(() => {
1166
+ let d = e.color;
1167
1167
  return ["warning", "info", "danger", "primary", "secondary", "success"].includes(d) && (d = `var(--t-color-status-${d})`), d;
1168
- }), u = () => {
1168
+ }), a = () => {
1169
1169
  setTimeout(() => {
1170
- if (o.placement.startsWith("top-") || o.placement.startsWith("bottom-")) {
1170
+ if (e.placement.startsWith("top-") || e.placement.startsWith("bottom-")) {
1171
1171
  let d = r.value.querySelector(".active");
1172
1172
  if (d) {
1173
1173
  let p = d.getBoundingClientRect().left - r.value.getBoundingClientRect().left + r.value.scrollLeft, f = d.offsetWidth / 2;
1174
- s.value = p + f - o.border / 2 + "px";
1174
+ n.value = p + f - e.border / 2 + "px";
1175
1175
  }
1176
- } else if (o.placement.startsWith("left-") || o.placement.startsWith("right-")) {
1176
+ } else if (e.placement.startsWith("left-") || e.placement.startsWith("right-")) {
1177
1177
  let d = r.value.querySelector(".active");
1178
1178
  if (d) {
1179
1179
  let p = d.getBoundingClientRect().top - r.value.getBoundingClientRect().top + r.value.scrollTop, f = d.offsetHeight / 2;
1180
- s.value = p + f - o.border / 2 + "px";
1180
+ n.value = p + f - e.border / 2 + "px";
1181
1181
  }
1182
1182
  }
1183
1183
  }, 50);
1184
1184
  };
1185
1185
  return de("tabsState", {
1186
- active: S(() => o.modelValue),
1187
- color: c.value,
1188
- size: o.size,
1189
- variant: o.variant,
1186
+ active: I(() => e.modelValue),
1187
+ color: i.value,
1188
+ size: e.size,
1189
+ variant: e.variant,
1190
1190
  setActive: (d) => {
1191
- e("update:modelValue", d), u();
1191
+ t("update:modelValue", d), a();
1192
1192
  }
1193
1193
  }), Q(() => {
1194
- u();
1195
- }), (d, p) => (i(), _("ul", {
1194
+ a();
1195
+ }), (d, p) => (u(), v("ul", {
1196
1196
  ref_key: "container",
1197
1197
  ref: r,
1198
1198
  class: x(["t-tabs", { [d.placement]: !0, [d.variant]: !0 }]),
1199
- style: w({ "--color": c.value, "--transform": s.value, "--border": d.border + "px" })
1199
+ style: w({ "--color": i.value, "--transform": n.value, "--border": d.border + "px" })
1200
1200
  }, [
1201
1201
  h(d.$slots, "default", {}, void 0, !0)
1202
1202
  ], 6));
1203
1203
  }
1204
- }), Ot = /* @__PURE__ */ b(Nt, [["__scopeId", "data-v-65a2c74c"]]), qt = /* @__PURE__ */ T({
1204
+ }), Ot = /* @__PURE__ */ b(Nt, [["__scopeId", "data-v-65a2c74c"]]), qt = /* @__PURE__ */ $({
1205
1205
  __name: "t-loading-app",
1206
- setup(t) {
1207
- return (n, o) => (i(), z(re, null, {
1206
+ setup(o) {
1207
+ return (s, e) => (u(), B(re, null, {
1208
1208
  default: E(() => [
1209
1209
  j(K, { type: "spinner" })
1210
1210
  ]),
1211
1211
  _: 1
1212
1212
  }));
1213
1213
  }
1214
- }), Xt = /* @__PURE__ */ b(qt, [["__scopeId", "data-v-1436aa9f"]]), Kt = () => ({
1215
- install: (t) => {
1216
- fe(), t.component("t-app", ye), t.component("t-screen", ae), t.component("t-swipe-screen", Ke), t.component("t-cable", Ne), t.component("t-toolbar", Je), t.component("t-content", re), t.component("t-card", Oe), t.component("t-refresher", He), t.component("t-button", M), t.component("t-back-button", Ze), t.component("t-present", W), t.component("t-text", J), t.component("t-sheet", nt), t.component("t-pull-signal", le), t.component("t-input", ct), t.component("t-textarea", dt), t.component("t-rich-text", mt), t.component("t-grid", gt), t.component("t-grid-item", $t), t.component("t-divider", wt), t.component("t-toggle-password", It), t.component("t-loading-icon", K), t.component("t-alert", ne), t.component("t-avatar", zt), t.component("t-collapse", Dt), t.component("t-toast", se), t.component("t-switch", At), t.component("t-tab", Lt), t.component("t-tabs", Ot), t.component("t-loading-app", Xt);
1214
+ }), Xt = /* @__PURE__ */ b(qt, [["__scopeId", "data-v-1436aa9f"]]), Wt = { key: 0 }, Yt = {
1215
+ key: 0,
1216
+ class: "t-checkbox-label"
1217
+ }, Ht = /* @__PURE__ */ $({
1218
+ __name: "t-checkbox",
1219
+ props: {
1220
+ label: { default: "" },
1221
+ modelValue: { default: !1 },
1222
+ variant: {},
1223
+ type: { default: "check" },
1224
+ multiple: { type: Boolean, default: !1 },
1225
+ value: { default: void 0 },
1226
+ color: { default: "primary" }
1227
+ },
1228
+ emits: ["update:modelValue"],
1229
+ setup(o, { emit: s }) {
1230
+ const e = o, t = s, n = I(() => {
1231
+ let a = {
1232
+ "--background": e.color,
1233
+ "--color": "#ffffff"
1234
+ };
1235
+ return ["warning", "info", "danger", "primary", "secondary", "success"].includes(e.color) && (a = {
1236
+ "--background": `var(--t-color-status-${e.color})`,
1237
+ "--color": `var(--t-color-status-${e.color}-text)`
1238
+ }), a;
1239
+ }), r = I(() => e.multiple ? e.modelValue.includes(e.value) : e.value === void 0 ? e.modelValue : e.modelValue == e.value), i = () => {
1240
+ if (e.multiple) {
1241
+ let a = e.modelValue;
1242
+ e.modelValue.includes(e.value) ? a.splice(a.indexOf(e.value), 1) : a.push(e.value), t("update:modelValue", a);
1243
+ } else e.value === void 0 ? t("update:modelValue", !e.modelValue) : t("update:modelValue", e.value);
1244
+ };
1245
+ return (a, d) => (u(), v("div", {
1246
+ class: x(["t-checkbox", { active: r.value }]),
1247
+ style: w(n.value),
1248
+ onClick: i
1249
+ }, [
1250
+ k("div", {
1251
+ class: x(`t-checkbox-${a.type}`)
1252
+ }, [
1253
+ a.type == "radio" ? (u(), v("div", Wt)) : z("", !0),
1254
+ a.type == "check" ? h(a.$slots, "icon", { key: 1 }, () => [
1255
+ d[0] || (d[0] = k("i", { class: "ri-check-line" }, null, -1))
1256
+ ], !0) : z("", !0)
1257
+ ], 2),
1258
+ a.label ? (u(), v("span", Yt, V(e.label), 1)) : z("", !0)
1259
+ ], 6));
1260
+ }
1261
+ }), Ut = /* @__PURE__ */ b(Ht, [["__scopeId", "data-v-a3681154"]]), Zt = () => ({
1262
+ install: (o) => {
1263
+ fe(), o.component("t-app", ye), o.component("t-screen", ae), o.component("t-swipe-screen", Ke), o.component("t-cable", Ne), o.component("t-toolbar", Je), o.component("t-content", re), o.component("t-card", Oe), o.component("t-refresher", He), o.component("t-button", M), o.component("t-back-button", Ze), o.component("t-present", W), o.component("t-text", J), o.component("t-sheet", st), o.component("t-pull-signal", le), o.component("t-input", ct), o.component("t-textarea", dt), o.component("t-rich-text", mt), o.component("t-grid", gt), o.component("t-grid-item", $t), o.component("t-divider", wt), o.component("t-toggle-password", It), o.component("t-loading-icon", K), o.component("t-alert", se), o.component("t-avatar", zt), o.component("t-collapse", Pt), o.component("t-toast", ne), o.component("t-switch", At), o.component("t-tab", Lt), o.component("t-tabs", Ot), o.component("t-loading-app", Xt), o.component("t-checkbox", Ut);
1217
1264
  }
1218
1265
  });
1219
1266
  export {
1220
1267
  X as blurCurrentActive,
1221
- jt as createAction,
1222
- Ut as createAlert,
1223
- Ft as createLoading,
1224
- Gt as createToast,
1225
- Kt as createToife,
1268
+ Mt as createAction,
1269
+ Kt as createAlert,
1270
+ Jt as createLoading,
1271
+ Qt as createToast,
1272
+ Zt as createToife,
1226
1273
  q as isFormElement,
1227
1274
  Ce as presentController,
1228
- k as screenController,
1229
- Ve as useKeyboard
1275
+ T as screenController,
1276
+ Re as useKeyboard
1230
1277
  };