@toife/vue 1.0.2 → 1.0.3

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