@toife/vue 1.0.0 → 1.0.2

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