@toife/vue 2.1.6 → 2.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/action/action.type.d.ts +17 -0
- package/dist/components/action/action.vue.d.ts +14 -0
- package/dist/components/action/factory.d.ts +3 -0
- package/dist/components/action/index.d.ts +2 -0
- package/dist/components/alert/alert.type.d.ts +16 -0
- package/dist/components/alert/alert.vue.d.ts +14 -0
- package/dist/components/alert/factory.d.ts +3 -0
- package/dist/components/alert/index.d.ts +2 -0
- package/dist/components/app/app.type.d.ts +1 -0
- package/dist/components/app/app.vue.d.ts +3 -0
- package/dist/components/app/index.d.ts +1 -0
- package/dist/components/avatar/avatar.type.d.ts +4 -0
- package/dist/components/{t-divider.vue.d.ts → avatar/avatar.vue.d.ts} +5 -6
- package/dist/components/avatar/index.d.ts +1 -0
- package/dist/components/back-button/back-button.type.d.ts +4 -0
- package/dist/components/back-button/back-button.vue.d.ts +3 -0
- package/dist/components/back-button/index.d.ts +1 -0
- package/dist/components/button/button.type.d.ts +10 -0
- package/dist/components/button/button.vue.d.ts +12 -0
- package/dist/components/button/index.d.ts +1 -0
- package/dist/components/cable/cable.type.d.ts +4 -0
- package/dist/components/cable/cable.vue.d.ts +6 -0
- package/dist/components/cable/index.d.ts +1 -0
- package/dist/components/card/card.type.d.ts +3 -0
- package/dist/components/card/card.vue.d.ts +5 -0
- package/dist/components/card/index.d.ts +1 -0
- package/dist/components/checkbox/checkbox.type.d.ts +12 -0
- package/dist/components/checkbox/checkbox.vue.d.ts +14 -0
- package/dist/components/checkbox/index.d.ts +1 -0
- package/dist/components/collapse/collapse.type.d.ts +6 -0
- package/dist/components/collapse/collapse.vue.d.ts +7 -0
- package/dist/components/collapse/index.d.ts +1 -0
- package/dist/components/content/content.type.d.ts +1 -0
- package/dist/components/content/content.vue.d.ts +3 -0
- package/dist/components/content/index.d.ts +1 -0
- package/dist/components/divider/divider.type.d.ts +3 -0
- package/dist/components/divider/divider.vue.d.ts +5 -0
- package/dist/components/divider/index.d.ts +1 -0
- package/dist/components/flex/flex.type.d.ts +4 -0
- package/dist/components/flex/flex.vue.d.ts +6 -0
- package/dist/components/flex/index.d.ts +1 -0
- package/dist/components/gesture-indicator/gesture-indicator.type.d.ts +3 -0
- package/dist/components/gesture-indicator/gesture-indicator.vue.d.ts +5 -0
- package/dist/components/gesture-indicator/index.d.ts +1 -0
- package/dist/components/grid/grid.type.d.ts +4 -0
- package/dist/components/grid/grid.vue.d.ts +6 -0
- package/dist/components/grid/index.d.ts +1 -0
- package/dist/components/icon-spinner/icon-spinner.type.d.ts +4 -0
- package/dist/components/icon-spinner/icon-spinner.vue.d.ts +6 -0
- package/dist/components/icon-spinner/index.d.ts +1 -0
- package/dist/components/image/image.type.d.ts +4 -0
- package/dist/components/image/image.vue.d.ts +3 -0
- package/dist/components/image/index.d.ts +1 -0
- package/dist/components/index.d.ts +36 -0
- package/dist/components/input/index.d.ts +1 -0
- package/dist/components/input/input.type.d.ts +15 -0
- package/dist/components/input/input.vue.d.ts +16 -0
- package/dist/components/keyboard-space/index.d.ts +2 -0
- package/dist/components/keyboard-space/keyboard-space.type.d.ts +1 -0
- package/dist/components/keyboard-space/keyboard-space.vue.d.ts +3 -0
- package/dist/components/loading/factory.d.ts +4 -0
- package/dist/components/loading/index.d.ts +2 -0
- package/dist/components/loading/loading.type.d.ts +6 -0
- package/dist/components/loading/loading.vue.d.ts +12 -0
- package/dist/components/present/factory.d.ts +1 -0
- package/dist/components/present/index.d.ts +2 -0
- package/dist/components/present/present.type.d.ts +13 -0
- package/dist/components/present/present.vue.d.ts +17 -0
- package/dist/components/refresher/index.d.ts +1 -0
- package/dist/components/refresher/refresher.type.d.ts +11 -0
- package/dist/components/refresher/refresher.vue.d.ts +17 -0
- package/dist/components/richtext/index.d.ts +1 -0
- package/dist/components/richtext/richtext.type.d.ts +1 -0
- package/dist/components/richtext/richtext.vue.d.ts +3 -0
- package/dist/components/ripple/index.d.ts +1 -0
- package/dist/components/ripple/ripple.type.d.ts +3 -0
- package/dist/components/{t-ripple.vue.d.ts → ripple/ripple.vue.d.ts} +3 -5
- package/dist/components/screen/index.d.ts +1 -0
- package/dist/components/screen/screen.type.d.ts +1 -0
- package/dist/components/screen/screen.vue.d.ts +3 -0
- package/dist/{controllers/screen.d.ts → components/screen-router/factory.d.ts} +1 -2
- package/dist/components/screen-router/index.d.ts +2 -0
- package/dist/components/screen-router/screen-router.type.d.ts +8 -0
- package/dist/components/screen-router/screen-router.vue.d.ts +9 -0
- package/dist/components/sheet/index.d.ts +1 -0
- package/dist/components/sheet/sheet.type.d.ts +18 -0
- package/dist/components/sheet/sheet.vue.d.ts +18 -0
- package/dist/components/skeleton/index.d.ts +1 -0
- package/dist/components/skeleton/skeleton.type.d.ts +6 -0
- package/dist/components/skeleton/skeleton.vue.d.ts +8 -0
- package/dist/components/switch/index.d.ts +1 -0
- package/dist/components/switch/switch.type.d.ts +7 -0
- package/dist/components/switch/switch.vue.d.ts +9 -0
- package/dist/components/tab/index.d.ts +1 -0
- package/dist/components/tab/tab.type.d.ts +4 -0
- package/dist/components/tab/tab.vue.d.ts +5 -0
- package/dist/components/tabs/index.d.ts +1 -0
- package/dist/components/tabs/tabs.type.d.ts +13 -0
- package/dist/components/tabs/tabs.vue.d.ts +15 -0
- package/dist/components/text/index.d.ts +1 -0
- package/dist/components/text/text.type.d.ts +4 -0
- package/dist/components/text/text.vue.d.ts +6 -0
- package/dist/components/textarea/index.d.ts +1 -0
- package/dist/components/textarea/textarea.type.d.ts +1 -0
- package/dist/components/textarea/textarea.vue.d.ts +3 -0
- package/dist/components/toast/factory.d.ts +3 -0
- package/dist/components/toast/index.d.ts +2 -0
- package/dist/components/toast/toast.type.d.ts +11 -0
- package/dist/components/toast/toast.vue.d.ts +16 -0
- package/dist/components/toggle-password/index.d.ts +1 -0
- package/dist/components/toggle-password/toggle-password.type.d.ts +6 -0
- package/dist/components/toggle-password/toggle-password.vue.d.ts +9 -0
- package/dist/components/toolbar/index.d.ts +1 -0
- package/dist/components/toolbar/toolbar.type.d.ts +5 -0
- package/dist/components/toolbar/toolbar.vue.d.ts +7 -0
- package/dist/factory.d.ts +4 -0
- package/dist/index.css +1 -1
- package/dist/index.d.ts +4 -5
- package/dist/index.es.js +1566 -1231
- package/dist/index.umd.js +1 -1
- package/dist/type.d.ts +3 -0
- package/dist/utils/events.d.ts +1 -0
- package/dist/utils/index.d.ts +1 -0
- package/package.json +1 -1
- package/dist/components/t-action.vue.d.ts +0 -29
- package/dist/components/t-alert.vue.d.ts +0 -35
- package/dist/components/t-app.vue.d.ts +0 -17
- package/dist/components/t-avatar.vue.d.ts +0 -24
- package/dist/components/t-back-button.vue.d.ts +0 -21
- package/dist/components/t-button.vue.d.ts +0 -36
- package/dist/components/t-cable.vue.d.ts +0 -24
- package/dist/components/t-card.vue.d.ts +0 -22
- package/dist/components/t-checkbox.vue.d.ts +0 -38
- package/dist/components/t-collapse.vue.d.ts +0 -32
- package/dist/components/t-content.vue.d.ts +0 -17
- package/dist/components/t-flex.vue.d.ts +0 -24
- package/dist/components/t-gesture-indicator.vue.d.ts +0 -7
- package/dist/components/t-grid.vue.d.ts +0 -24
- package/dist/components/t-icon-spinner.vue.d.ts +0 -23
- package/dist/components/t-image.vue.d.ts +0 -6
- package/dist/components/t-input.vue.d.ts +0 -47
- package/dist/components/t-keyboard-space.vue.d.ts +0 -2
- package/dist/components/t-loading.vue.d.ts +0 -29
- package/dist/components/t-present.vue.d.ts +0 -47
- package/dist/components/t-refresher.vue.d.ts +0 -43
- package/dist/components/t-rich-text.vue.d.ts +0 -2
- package/dist/components/t-screen-router.vue.d.ts +0 -15
- package/dist/components/t-screen.vue.d.ts +0 -17
- package/dist/components/t-sheet.vue.d.ts +0 -251
- package/dist/components/t-skeleton.vue.d.ts +0 -13
- package/dist/components/t-switch.vue.d.ts +0 -12
- package/dist/components/t-tab.vue.d.ts +0 -23
- package/dist/components/t-tabs.vue.d.ts +0 -43
- package/dist/components/t-text.vue.d.ts +0 -24
- package/dist/components/t-textarea.vue.d.ts +0 -2
- package/dist/components/t-toast.vue.d.ts +0 -38
- package/dist/components/t-toggle-password.vue.d.ts +0 -31
- package/dist/components/t-toolbar.vue.d.ts +0 -26
- package/dist/controllers/action.d.ts +0 -4
- package/dist/controllers/alert.d.ts +0 -4
- package/dist/controllers/index.d.ts +0 -8
- package/dist/controllers/loading.d.ts +0 -5
- package/dist/controllers/present.d.ts +0 -4
- package/dist/controllers/toast.d.ts +0 -4
- package/dist/utils/defaultEvent.d.ts +0 -2
- /package/dist/{controllers/keyboard.d.ts → components/keyboard-space/factory.d.ts} +0 -0
package/dist/index.es.js
CHANGED
|
@@ -1,19 +1,28 @@
|
|
|
1
|
-
import { createElementBlock as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
const
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
1
|
+
import { defineComponent as k, createElementBlock as y, openBlock as i, normalizeClass as p, renderSlot as $, ref as u, computed as b, reactive as ie, watch as z, onMounted as A, Fragment as q, withDirectives as G, createCommentVNode as C, normalizeStyle as w, vShow as U, createElementVNode as S, createVNode as ye, createBlock as j, withCtx as D, renderList as J, createTextVNode as F, toDisplayString as V, createApp as re, h as oe, onUnmounted as M, markRaw as pe, resolveDynamicComponent as Ie, useAttrs as fe, provide as Q, inject as Z, nextTick as ce } from "vue";
|
|
2
|
+
import { useRouter as Y, useRoute as me } from "vue-router";
|
|
3
|
+
import { gesture as L } from "@toife/gesture";
|
|
4
|
+
const Oe = /* @__PURE__ */ k({
|
|
5
|
+
__name: "app",
|
|
6
|
+
setup(r, { expose: o }) {
|
|
7
|
+
o();
|
|
8
|
+
const t = {};
|
|
9
|
+
return Object.defineProperty(t, "__isScriptSetup", { enumerable: !1, value: !0 }), t;
|
|
10
|
+
}
|
|
11
|
+
}), Be = {
|
|
12
|
+
class: /* @__PURE__ */ p({ "toife-app": !0 })
|
|
13
|
+
};
|
|
14
|
+
function Ce(r, o, t, e, s, n) {
|
|
15
|
+
return i(), y("div", Be, [
|
|
16
|
+
$(r.$slots, "default")
|
|
13
17
|
]);
|
|
14
18
|
}
|
|
15
|
-
const
|
|
16
|
-
|
|
19
|
+
const x = (r, o) => {
|
|
20
|
+
const t = r.__vccOpts || r;
|
|
21
|
+
for (const [e, s] of o)
|
|
22
|
+
t[e] = s;
|
|
23
|
+
return t;
|
|
24
|
+
}, ze = /* @__PURE__ */ x(Oe, [["render", Ce]]), _e = u(1e3), ve = () => (_e.value += 2, _e.value), Ee = /* @__PURE__ */ k({
|
|
25
|
+
__name: "present",
|
|
17
26
|
props: {
|
|
18
27
|
keepalive: { type: Boolean, default: !0 },
|
|
19
28
|
visible: { type: Boolean, default: !1 },
|
|
@@ -25,113 +34,116 @@ const ze = /* @__PURE__ */ g(we, [["render", Be]]), Ie = /* @__PURE__ */ h({
|
|
|
25
34
|
duration: { default: 200 }
|
|
26
35
|
},
|
|
27
36
|
emits: ["dismiss"],
|
|
28
|
-
setup(
|
|
29
|
-
const
|
|
30
|
-
"--
|
|
31
|
-
"--
|
|
32
|
-
"--
|
|
33
|
-
"--
|
|
34
|
-
}),
|
|
35
|
-
|
|
36
|
-
},
|
|
37
|
-
if (
|
|
38
|
-
|
|
39
|
-
let
|
|
40
|
-
(
|
|
41
|
-
contentTransform:
|
|
42
|
-
transition:
|
|
37
|
+
setup(r, { expose: o, emit: t }) {
|
|
38
|
+
const e = u(0), s = u(!1), n = u(), l = u(), a = r, c = t, d = b(() => s.value || a.keepalive), _ = u(!1), g = ie({
|
|
39
|
+
"--toife-present-backdrop-opacity": "0.4",
|
|
40
|
+
"--toife-present-transition": "0.2s",
|
|
41
|
+
"--toife-present-content-transform": "0px",
|
|
42
|
+
"--toife-present-content-opacity": "1"
|
|
43
|
+
}), v = b(() => a.duration / 1e3 + "s"), m = (T) => {
|
|
44
|
+
a.backdrop ? T?.backdropOpacity && (g["--toife-present-backdrop-opacity"] = T.backdropOpacity) : g["--toife-present-backdrop-opacity"] = "0", T.transition && (g["--toife-present-transition"] = T.transition), T.contentTransform && (g["--toife-present-content-transform"] = T.contentTransform), T.contentOpacity && (g["--toife-present-content-opacity"] = T.contentOpacity);
|
|
45
|
+
}, h = () => {
|
|
46
|
+
if (a.bounce !== void 0 && !_.value) {
|
|
47
|
+
_.value = !0;
|
|
48
|
+
let T = a.bounce;
|
|
49
|
+
(a.placement == "bottom" || a.placement == "right") && (T = `calc(${a.bounce} * -1)`), m({
|
|
50
|
+
contentTransform: T,
|
|
51
|
+
transition: v.value,
|
|
43
52
|
backdropOpacity: "0.4",
|
|
44
53
|
contentOpacity: "1"
|
|
45
54
|
}), setTimeout(() => {
|
|
46
|
-
|
|
55
|
+
m({
|
|
47
56
|
contentTransform: "0px"
|
|
48
57
|
});
|
|
49
|
-
},
|
|
58
|
+
}, a.duration);
|
|
50
59
|
} else
|
|
51
|
-
|
|
60
|
+
m({
|
|
52
61
|
contentTransform: "0px",
|
|
53
|
-
transition:
|
|
62
|
+
transition: v.value,
|
|
54
63
|
backdropOpacity: "0.4",
|
|
55
64
|
contentOpacity: "1"
|
|
56
65
|
});
|
|
57
|
-
},
|
|
58
|
-
let
|
|
59
|
-
|
|
60
|
-
contentTransform:
|
|
61
|
-
transition:
|
|
62
|
-
contentOpacity:
|
|
66
|
+
}, f = () => {
|
|
67
|
+
let T = "0px", W = "1";
|
|
68
|
+
a.placement == "bottom" || a.placement == "right" ? T = "100%" : a.placement == "top" || a.placement == "left" ? T = "-100%" : a.placement == "center" && (T = "0px", W = "0"), m({
|
|
69
|
+
contentTransform: T,
|
|
70
|
+
transition: v.value,
|
|
71
|
+
contentOpacity: W,
|
|
63
72
|
backdropOpacity: "0"
|
|
64
73
|
});
|
|
65
74
|
};
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
}, 50)) : (
|
|
70
|
-
|
|
75
|
+
z(() => a.visible, () => {
|
|
76
|
+
a.visible ? (_.value = !1, s.value = !0, e.value = ve(), setTimeout(() => {
|
|
77
|
+
h();
|
|
78
|
+
}, 50)) : (f(), setTimeout(() => {
|
|
79
|
+
s.value = !1;
|
|
71
80
|
}, 200));
|
|
72
81
|
}), o({
|
|
73
|
-
render:
|
|
74
|
-
open:
|
|
75
|
-
close:
|
|
82
|
+
render: m,
|
|
83
|
+
open: h,
|
|
84
|
+
close: f
|
|
76
85
|
});
|
|
77
|
-
const
|
|
78
|
-
|
|
86
|
+
const I = (T) => {
|
|
87
|
+
T.preventDefault(), c("dismiss", "backdrop");
|
|
79
88
|
};
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
})
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
ref_key: "backdrop",
|
|
88
|
-
ref: l,
|
|
89
|
-
style: T([a, { zIndex: s.value - 1 }, n.style])
|
|
90
|
-
}, null, 36)), [
|
|
91
|
-
[G, r.value]
|
|
92
|
-
]) : E("", !0),
|
|
93
|
-
v.value ? j((i(), f("div", {
|
|
94
|
-
key: 1,
|
|
95
|
-
class: B(["t-present", [{ [k.placement]: !0 }, n.class]]),
|
|
96
|
-
ref_key: "present",
|
|
97
|
-
ref: u,
|
|
98
|
-
style: T([a, { zIndex: s.value }, n.style])
|
|
99
|
-
}, [
|
|
100
|
-
_(k.$slots, "default", {}, void 0, !0)
|
|
101
|
-
], 6)), [
|
|
102
|
-
[G, r.value]
|
|
103
|
-
]) : E("", !0)
|
|
104
|
-
], 64));
|
|
89
|
+
A(() => {
|
|
90
|
+
a.visible ? h() : f();
|
|
91
|
+
});
|
|
92
|
+
const P = { zIndex: e, isShow: s, backdrop: n, present: l, props: a, emit: c, isRender: d, isBounced: _, styles: g, time: v, render: m, open: h, close: f, onClickBackdrop: I, computed: b, onMounted: A, reactive: ie, ref: u, watch: z, get getNewPresentIndex() {
|
|
93
|
+
return ve;
|
|
94
|
+
} };
|
|
95
|
+
return Object.defineProperty(P, "__isScriptSetup", { enumerable: !1, value: !0 }), P;
|
|
105
96
|
}
|
|
106
|
-
})
|
|
107
|
-
|
|
97
|
+
});
|
|
98
|
+
function je(r, o, t, e, s, n) {
|
|
99
|
+
return i(), y(q, null, [
|
|
100
|
+
e.isRender ? G((i(), y("div", {
|
|
101
|
+
key: 0,
|
|
102
|
+
class: p({ "toife-present-backdrop": !0 }),
|
|
103
|
+
onPointerup: e.onClickBackdrop,
|
|
104
|
+
ref: "backdrop",
|
|
105
|
+
style: w([e.styles, { zIndex: e.zIndex - 1 }, e.props.style])
|
|
106
|
+
}, null, 36)), [
|
|
107
|
+
[U, e.isShow]
|
|
108
|
+
]) : C("", !0),
|
|
109
|
+
e.isRender ? G((i(), y("div", {
|
|
110
|
+
key: 1,
|
|
111
|
+
ref: "present",
|
|
112
|
+
class: p([{ "toife-present": !0, [t.placement]: !0 }, e.props.class]),
|
|
113
|
+
style: w([e.styles, { zIndex: e.zIndex }, e.props.style])
|
|
114
|
+
}, [
|
|
115
|
+
$(r.$slots, "default", {}, void 0, !0)
|
|
116
|
+
], 6)), [
|
|
117
|
+
[U, e.isShow]
|
|
118
|
+
]) : C("", !0)
|
|
119
|
+
], 64);
|
|
120
|
+
}
|
|
121
|
+
const K = /* @__PURE__ */ x(Ee, [["render", je], ["__scopeId", "data-v-dbddbda8"]]), Re = /* @__PURE__ */ k({
|
|
122
|
+
__name: "icon-spinner",
|
|
108
123
|
props: {
|
|
109
|
-
size: {
|
|
110
|
-
|
|
111
|
-
default: "24px"
|
|
112
|
-
},
|
|
113
|
-
color: {
|
|
114
|
-
type: String,
|
|
115
|
-
default: "var(--t-color-text)"
|
|
116
|
-
}
|
|
124
|
+
size: { default: "24px" },
|
|
125
|
+
color: { default: "var(--toife-color-text)" }
|
|
117
126
|
},
|
|
118
|
-
setup(
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
width: t.size,
|
|
123
|
-
height: t.size,
|
|
124
|
-
borderTopColor: t.color
|
|
125
|
-
}),
|
|
126
|
-
role: "status",
|
|
127
|
-
"aria-label": "Loading..."
|
|
128
|
-
}, null, 4));
|
|
127
|
+
setup(r, { expose: o }) {
|
|
128
|
+
o();
|
|
129
|
+
const t = {};
|
|
130
|
+
return Object.defineProperty(t, "__isScriptSetup", { enumerable: !1, value: !0 }), t;
|
|
129
131
|
}
|
|
130
|
-
})
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
132
|
+
});
|
|
133
|
+
function Ve(r, o, t, e, s, n) {
|
|
134
|
+
return i(), y("span", {
|
|
135
|
+
class: p({ "toife-icon-spinner": !0 }),
|
|
136
|
+
style: w({
|
|
137
|
+
width: t.size,
|
|
138
|
+
height: t.size,
|
|
139
|
+
borderTopColor: t.color
|
|
140
|
+
}),
|
|
141
|
+
role: "status",
|
|
142
|
+
"aria-label": "Loading..."
|
|
143
|
+
}, null, 4);
|
|
144
|
+
}
|
|
145
|
+
const ue = /* @__PURE__ */ x(Re, [["render", Ve], ["__scopeId", "data-v-bddf6a6e"]]), Ae = /* @__PURE__ */ k({
|
|
146
|
+
__name: "button",
|
|
135
147
|
props: {
|
|
136
148
|
color: { default: null },
|
|
137
149
|
size: { default: "standard" },
|
|
@@ -142,1139 +154,1353 @@ const ze = /* @__PURE__ */ g(we, [["render", Be]]), Ie = /* @__PURE__ */ h({
|
|
|
142
154
|
variant: { default: "default" },
|
|
143
155
|
activeBackground: { type: Boolean, default: !1 }
|
|
144
156
|
},
|
|
145
|
-
setup(
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
157
|
+
setup(r, { expose: o }) {
|
|
158
|
+
o();
|
|
159
|
+
const t = r, e = b(() => {
|
|
160
|
+
let n;
|
|
161
|
+
return t.variant == "default" && (t.color ? ["warning", "info", "danger", "primary", "secondary", "success"].includes(t.color) ? n = {
|
|
149
162
|
"--border": "none",
|
|
150
|
-
"--color": "var(--
|
|
151
|
-
"--background": "var(--
|
|
152
|
-
} :
|
|
163
|
+
"--color": "var(--toife-color-status-" + t.color + "-text)",
|
|
164
|
+
"--background": "var(--toife-color-status-" + t.color + ")"
|
|
165
|
+
} : n = {
|
|
153
166
|
"--border": "none",
|
|
154
|
-
"--color": "var(--
|
|
155
|
-
"--background":
|
|
156
|
-
} :
|
|
167
|
+
"--color": "var(--toife-color-text)",
|
|
168
|
+
"--background": t.color
|
|
169
|
+
} : n = {
|
|
157
170
|
"--border": "none",
|
|
158
|
-
"--color": "var(--
|
|
159
|
-
"--background": "var(--
|
|
160
|
-
}),
|
|
171
|
+
"--color": "var(--toife-color-text)",
|
|
172
|
+
"--background": "var(--toife-color-surface)"
|
|
173
|
+
}), t.variant == "text" && (t.color ? ["warning", "info", "danger", "primary", "secondary", "success"].includes(t.color) ? n = {
|
|
161
174
|
"--border": "none",
|
|
162
|
-
"--color": "var(--
|
|
175
|
+
"--color": "var(--toife-color-status-" + t.color + ")",
|
|
163
176
|
"--background": "transparent"
|
|
164
|
-
} :
|
|
177
|
+
} : n = {
|
|
165
178
|
"--border": "none",
|
|
166
|
-
"--color":
|
|
179
|
+
"--color": t.color,
|
|
167
180
|
"--background": "transparent"
|
|
168
|
-
} :
|
|
181
|
+
} : n = {
|
|
169
182
|
"--border": "none",
|
|
170
|
-
"--color": "var(--
|
|
183
|
+
"--color": "var(--toife-color-text)",
|
|
171
184
|
"--background": "transparent"
|
|
172
|
-
}),
|
|
173
|
-
"--border": "0.55px solid var(--
|
|
174
|
-
"--color": "var(--
|
|
185
|
+
}), t.variant == "outline" && (t.color ? ["warning", "info", "danger", "primary", "secondary", "success"].includes(t.color) ? n = {
|
|
186
|
+
"--border": "0.55px solid var(--toife-color-status-" + t.color + ")",
|
|
187
|
+
"--color": "var(--toife-color-status-" + t.color + ")",
|
|
175
188
|
"--background": "transparent"
|
|
176
|
-
} :
|
|
177
|
-
"--border": "0.55px solid " +
|
|
178
|
-
"--color":
|
|
189
|
+
} : n = {
|
|
190
|
+
"--border": "0.55px solid " + t.color,
|
|
191
|
+
"--color": t.color,
|
|
179
192
|
"--background": "transparent"
|
|
180
|
-
} :
|
|
181
|
-
"--border": "0.55px solid var(--
|
|
182
|
-
"--color": "var(--
|
|
193
|
+
} : n = {
|
|
194
|
+
"--border": "0.55px solid var(--toife-color-text)",
|
|
195
|
+
"--color": "var(--toife-color-text)",
|
|
183
196
|
"--background": "transparent"
|
|
184
|
-
}),
|
|
185
|
-
})
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
}, [
|
|
190
|
-
j($("span", Pe, [
|
|
191
|
-
_(s.$slots, "default", {}, void 0, !0)
|
|
192
|
-
], 512), [
|
|
193
|
-
[G, !o.loading]
|
|
194
|
-
]),
|
|
195
|
-
o.loading ? (i(), f("span", Ve, [
|
|
196
|
-
ue(ne, {
|
|
197
|
-
color: "var(--color)",
|
|
198
|
-
type: o.loadingType
|
|
199
|
-
}, null, 8, ["type"])
|
|
200
|
-
])) : E("", !0)
|
|
201
|
-
], 6));
|
|
197
|
+
}), n;
|
|
198
|
+
}), s = { props: t, styles: e, computed: b, get IconSpinner() {
|
|
199
|
+
return ue;
|
|
200
|
+
} };
|
|
201
|
+
return Object.defineProperty(s, "__isScriptSetup", { enumerable: !1, value: !0 }), s;
|
|
202
202
|
}
|
|
203
|
-
}),
|
|
203
|
+
}), De = {
|
|
204
|
+
class: /* @__PURE__ */ p({ "toife-button-content": !0 })
|
|
205
|
+
}, Ne = {
|
|
204
206
|
key: 0,
|
|
205
|
-
class: "
|
|
206
|
-
}
|
|
207
|
-
|
|
207
|
+
class: "loader"
|
|
208
|
+
};
|
|
209
|
+
function Xe(r, o, t, e, s, n) {
|
|
210
|
+
return i(), y("button", {
|
|
211
|
+
style: w(e.styles),
|
|
212
|
+
class: p({ "toife-button": !0, "active-background": e.props.activeBackground, rounded: e.props.rounded, block: e.props.block, ["size-" + e.props.size]: !0 })
|
|
213
|
+
}, [
|
|
214
|
+
G(S("span", De, [
|
|
215
|
+
$(r.$slots, "default", {}, void 0, !0)
|
|
216
|
+
], 512), [
|
|
217
|
+
[U, !e.props.loading]
|
|
218
|
+
]),
|
|
219
|
+
e.props.loading ? (i(), y("span", Ne, [
|
|
220
|
+
ye(e.IconSpinner, {
|
|
221
|
+
color: "var(--color)",
|
|
222
|
+
type: e.props.loadingType
|
|
223
|
+
}, null, 8, ["type"])
|
|
224
|
+
])) : C("", !0)
|
|
225
|
+
], 6);
|
|
226
|
+
}
|
|
227
|
+
const ne = /* @__PURE__ */ x(Ae, [["render", Xe], ["__scopeId", "data-v-3ab201fc"]]), We = /* @__PURE__ */ k({
|
|
228
|
+
__name: "action",
|
|
208
229
|
props: {
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
dismiss: {}
|
|
230
|
+
actions: { default: () => [] },
|
|
231
|
+
visible: { type: Boolean, default: !1 },
|
|
232
|
+
dismiss: { default: () => [] }
|
|
213
233
|
},
|
|
214
234
|
emits: ["dismiss"],
|
|
215
|
-
setup(
|
|
216
|
-
const
|
|
217
|
-
|
|
218
|
-
},
|
|
219
|
-
|
|
220
|
-
},
|
|
221
|
-
|
|
222
|
-
|
|
235
|
+
setup(r, { expose: o, emit: t }) {
|
|
236
|
+
const e = r, s = t, n = u(!1), l = u(), a = u(!1), c = () => {
|
|
237
|
+
n.value = !0;
|
|
238
|
+
}, d = () => {
|
|
239
|
+
n.value = !1;
|
|
240
|
+
}, _ = (m) => {
|
|
241
|
+
d(), m.handler && m.handler(), s("dismiss", "choose", m?.data);
|
|
242
|
+
}, g = (m) => {
|
|
243
|
+
e.dismiss && e.dismiss.includes(m) ? (d(), s("dismiss", m)) : m === "backdrop" && (a.value = !0, setTimeout(() => {
|
|
244
|
+
a.value = !1;
|
|
223
245
|
}, 300));
|
|
224
246
|
};
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
}
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
}, {
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
ref_key: "container",
|
|
238
|
-
ref: u
|
|
239
|
-
}, [
|
|
240
|
-
_(a.$slots, "header", {}, () => [
|
|
241
|
-
s.title ? (i(), f("div", Re, A(s.title), 1)) : E("", !0)
|
|
242
|
-
], !0),
|
|
243
|
-
_(a.$slots, "content", {}, () => [
|
|
244
|
-
$("div", Ae, A(s.message), 1)
|
|
245
|
-
], !0),
|
|
246
|
-
_(a.$slots, "footer", {}, () => [
|
|
247
|
-
$("div", Oe, [
|
|
248
|
-
(i(!0), f(q, null, K(s.actions, (y) => (i(), C(Z, {
|
|
249
|
-
color: y.color,
|
|
250
|
-
variant: y.variant,
|
|
251
|
-
onPointerup: (w) => v(y)
|
|
252
|
-
}, {
|
|
253
|
-
default: N(() => [
|
|
254
|
-
M(A(y.text), 1)
|
|
255
|
-
]),
|
|
256
|
-
_: 2
|
|
257
|
-
}, 1032, ["color", "variant", "onPointerup"]))), 256))
|
|
258
|
-
])
|
|
259
|
-
], !0)
|
|
260
|
-
], 2)
|
|
261
|
-
]),
|
|
262
|
-
_: 3
|
|
263
|
-
}, 8, ["visible"]));
|
|
247
|
+
z(() => e.visible, (m) => {
|
|
248
|
+
m ? c() : d();
|
|
249
|
+
}, { immediate: !0 }), o({
|
|
250
|
+
open: c,
|
|
251
|
+
close: d
|
|
252
|
+
});
|
|
253
|
+
const v = { props: e, emit: s, _visible: n, container: l, pop: a, open: c, close: d, choose: _, onDismiss: g, ref: u, watch: z, get Present() {
|
|
254
|
+
return K;
|
|
255
|
+
}, get CustomButton() {
|
|
256
|
+
return ne;
|
|
257
|
+
} };
|
|
258
|
+
return Object.defineProperty(v, "__isScriptSetup", { enumerable: !1, value: !0 }), v;
|
|
264
259
|
}
|
|
265
|
-
})
|
|
260
|
+
});
|
|
261
|
+
function qe(r, o, t, e, s, n) {
|
|
262
|
+
return i(), j(e.Present, {
|
|
263
|
+
placement: "bottom",
|
|
264
|
+
backdrop: !0,
|
|
265
|
+
keepalive: !1,
|
|
266
|
+
visible: e._visible,
|
|
267
|
+
onDismiss: e.onDismiss
|
|
268
|
+
}, {
|
|
269
|
+
default: D(() => [
|
|
270
|
+
S("div", {
|
|
271
|
+
class: p({ pop: e.pop, "toife-action": !0 }),
|
|
272
|
+
ref: "container"
|
|
273
|
+
}, [
|
|
274
|
+
(i(!0), y(q, null, J(e.props.actions, (l, a) => (i(), y("div", { key: a }, [
|
|
275
|
+
(i(!0), y(q, null, J(l, (c, d) => (i(), j(e.CustomButton, {
|
|
276
|
+
key: c.key ?? `${a}-${d}`,
|
|
277
|
+
color: c.color,
|
|
278
|
+
size: c.size,
|
|
279
|
+
variant: c.variant,
|
|
280
|
+
onPointerup: (_) => e.choose(c),
|
|
281
|
+
block: ""
|
|
282
|
+
}, {
|
|
283
|
+
default: D(() => [
|
|
284
|
+
F(V(c.text), 1)
|
|
285
|
+
]),
|
|
286
|
+
_: 2
|
|
287
|
+
}, 1032, ["color", "size", "variant", "onPointerup"]))), 128))
|
|
288
|
+
]))), 128))
|
|
289
|
+
], 2)
|
|
290
|
+
]),
|
|
291
|
+
_: 1
|
|
292
|
+
}, 8, ["visible"]);
|
|
293
|
+
}
|
|
294
|
+
const be = /* @__PURE__ */ x(We, [["render", qe], ["__scopeId", "data-v-9d4bf238"]]), to = (r = {}, o) => ({
|
|
266
295
|
open() {
|
|
267
|
-
return new Promise((
|
|
268
|
-
let e = document.body.querySelector(".
|
|
296
|
+
return new Promise((t) => {
|
|
297
|
+
let e = document.body.querySelector(".toife-app");
|
|
269
298
|
if (!e) return;
|
|
270
|
-
const s = document.createElement("div"),
|
|
299
|
+
const s = document.createElement("div"), n = u();
|
|
271
300
|
e.appendChild(s);
|
|
272
|
-
const l =
|
|
301
|
+
const l = re({
|
|
273
302
|
render() {
|
|
274
|
-
return
|
|
275
|
-
...
|
|
276
|
-
ref:
|
|
277
|
-
onDismiss: (
|
|
303
|
+
return oe(o || be, {
|
|
304
|
+
...r,
|
|
305
|
+
ref: n,
|
|
306
|
+
onDismiss: (a, c) => {
|
|
278
307
|
setTimeout(() => {
|
|
279
308
|
l.unmount(), s.remove();
|
|
280
|
-
}, 300),
|
|
309
|
+
}, 300), t({ type: a, data: c });
|
|
281
310
|
}
|
|
282
311
|
});
|
|
283
312
|
}
|
|
284
313
|
});
|
|
285
314
|
l.mount(s), setTimeout(() => {
|
|
286
|
-
|
|
315
|
+
n.value?.open?.();
|
|
287
316
|
}, 50);
|
|
288
317
|
});
|
|
289
318
|
}
|
|
290
|
-
}),
|
|
291
|
-
__name: "
|
|
319
|
+
}), Me = /* @__PURE__ */ k({
|
|
320
|
+
__name: "alert",
|
|
292
321
|
props: {
|
|
322
|
+
title: { default: "" },
|
|
323
|
+
message: { default: "" },
|
|
293
324
|
actions: { default: () => [] },
|
|
294
|
-
visible: { type: Boolean, default: !1 },
|
|
295
325
|
dismiss: { default: () => [] }
|
|
296
326
|
},
|
|
297
327
|
emits: ["dismiss"],
|
|
298
|
-
setup(
|
|
299
|
-
const
|
|
300
|
-
|
|
301
|
-
},
|
|
302
|
-
|
|
303
|
-
},
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
s.dismiss && s.dismiss.includes(c) ? (v(), r("dismiss", c)) : c === "backdrop" && (n.value = !0, setTimeout(() => {
|
|
307
|
-
n.value = !1;
|
|
328
|
+
setup(r, { expose: o, emit: t }) {
|
|
329
|
+
const e = r, s = t, n = u(!1), l = u(), a = u(!1), c = () => {
|
|
330
|
+
n.value = !0;
|
|
331
|
+
}, d = (v) => {
|
|
332
|
+
n.value = !1, v.handler && v.handler(), s("dismiss", "choose", v?.data);
|
|
333
|
+
}, _ = (v) => {
|
|
334
|
+
e.dismiss && e.dismiss.includes(v) ? (n.value = !1, s("dismiss", v)) : v == "backdrop" && (a.value = !0, setTimeout(() => {
|
|
335
|
+
a.value = !1;
|
|
308
336
|
}, 300));
|
|
309
337
|
};
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
}
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
}
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
338
|
+
o({
|
|
339
|
+
open: c
|
|
340
|
+
});
|
|
341
|
+
const g = { props: e, emit: s, visible: n, container: l, pop: a, open: c, choose: d, onDismiss: _, ref: u, get Present() {
|
|
342
|
+
return K;
|
|
343
|
+
}, get CustomButton() {
|
|
344
|
+
return ne;
|
|
345
|
+
} };
|
|
346
|
+
return Object.defineProperty(g, "__isScriptSetup", { enumerable: !1, value: !0 }), g;
|
|
347
|
+
}
|
|
348
|
+
}), Le = {
|
|
349
|
+
key: 0,
|
|
350
|
+
class: /* @__PURE__ */ p({ "toife-alert-header": !0 })
|
|
351
|
+
}, Fe = {
|
|
352
|
+
class: /* @__PURE__ */ p({ "toife-alert-content": !0 })
|
|
353
|
+
}, He = {
|
|
354
|
+
class: /* @__PURE__ */ p({ "toife-alert-footer": !0 })
|
|
355
|
+
};
|
|
356
|
+
function Ke(r, o, t, e, s, n) {
|
|
357
|
+
return i(), j(e.Present, {
|
|
358
|
+
placement: "center",
|
|
359
|
+
backdrop: !0,
|
|
360
|
+
keepalive: !1,
|
|
361
|
+
visible: e.visible,
|
|
362
|
+
onDismiss: e.onDismiss
|
|
363
|
+
}, {
|
|
364
|
+
default: D(() => [
|
|
365
|
+
S("div", {
|
|
366
|
+
class: p({ pop: e.pop, "toife-alert": !0 }),
|
|
367
|
+
ref: "container"
|
|
368
|
+
}, [
|
|
369
|
+
$(r.$slots, "header", {}, () => [
|
|
370
|
+
e.props.title ? (i(), y("div", Le, V(e.props.title), 1)) : C("", !0)
|
|
371
|
+
], !0),
|
|
372
|
+
$(r.$slots, "content", {}, () => [
|
|
373
|
+
S("div", Fe, V(e.props.message), 1)
|
|
374
|
+
], !0),
|
|
375
|
+
$(r.$slots, "footer", {}, () => [
|
|
376
|
+
S("div", He, [
|
|
377
|
+
(i(!0), y(q, null, J(e.props.actions, (l) => (i(), j(e.CustomButton, {
|
|
378
|
+
color: l.color,
|
|
379
|
+
variant: l.variant,
|
|
380
|
+
onPointerup: (a) => e.choose(l)
|
|
336
381
|
}, {
|
|
337
|
-
default:
|
|
338
|
-
|
|
382
|
+
default: D(() => [
|
|
383
|
+
F(V(l.text), 1)
|
|
339
384
|
]),
|
|
340
385
|
_: 2
|
|
341
|
-
}, 1032, ["color", "
|
|
342
|
-
])
|
|
343
|
-
],
|
|
344
|
-
])
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
}
|
|
348
|
-
}
|
|
386
|
+
}, 1032, ["color", "variant", "onPointerup"]))), 256))
|
|
387
|
+
])
|
|
388
|
+
], !0)
|
|
389
|
+
], 2)
|
|
390
|
+
]),
|
|
391
|
+
_: 3
|
|
392
|
+
}, 8, ["visible"]);
|
|
393
|
+
}
|
|
394
|
+
const ge = /* @__PURE__ */ x(Me, [["render", Ke], ["__scopeId", "data-v-64e5ebe5"]]), ro = (r = {}, o) => ({
|
|
349
395
|
open() {
|
|
350
|
-
return new Promise((
|
|
351
|
-
let e = document.body.querySelector(".
|
|
396
|
+
return new Promise((t) => {
|
|
397
|
+
let e = document.body.querySelector(".toife-app");
|
|
352
398
|
if (!e) return;
|
|
353
|
-
const s = document.createElement("div"),
|
|
399
|
+
const s = document.createElement("div"), n = u();
|
|
354
400
|
e.appendChild(s);
|
|
355
|
-
const l =
|
|
401
|
+
const l = re({
|
|
356
402
|
render() {
|
|
357
|
-
return
|
|
358
|
-
...
|
|
359
|
-
ref:
|
|
360
|
-
onDismiss: (
|
|
403
|
+
return oe(o || ge, {
|
|
404
|
+
...r,
|
|
405
|
+
ref: n,
|
|
406
|
+
onDismiss: (a, c) => {
|
|
361
407
|
setTimeout(() => {
|
|
362
408
|
l.unmount(), s.remove();
|
|
363
|
-
}, 300),
|
|
409
|
+
}, 300), t({ type: a, data: c });
|
|
364
410
|
}
|
|
365
411
|
});
|
|
366
412
|
}
|
|
367
413
|
});
|
|
368
414
|
l.mount(s), setTimeout(() => {
|
|
369
|
-
|
|
415
|
+
n.value?.open?.();
|
|
370
416
|
}, 50);
|
|
371
417
|
});
|
|
372
418
|
}
|
|
373
|
-
}),
|
|
374
|
-
__name: "
|
|
419
|
+
}), Ge = /* @__PURE__ */ k({
|
|
420
|
+
__name: "avatar",
|
|
375
421
|
props: {
|
|
376
|
-
|
|
422
|
+
square: { type: Boolean, default: !1 },
|
|
423
|
+
size: { default: "standard" }
|
|
377
424
|
},
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
const
|
|
381
|
-
return
|
|
382
|
-
open: () => {
|
|
383
|
-
s.value = !0;
|
|
384
|
-
},
|
|
385
|
-
close: () => {
|
|
386
|
-
s.value = !1;
|
|
387
|
-
}
|
|
388
|
-
}), (u, n) => (i(), C(F, {
|
|
389
|
-
placement: "center",
|
|
390
|
-
backdrop: !0,
|
|
391
|
-
keepalive: !1,
|
|
392
|
-
visible: s.value
|
|
393
|
-
}, {
|
|
394
|
-
default: N(() => [
|
|
395
|
-
$("div", We, [
|
|
396
|
-
_(u.$slots, "default", {}, () => [
|
|
397
|
-
u.type === "spinner" ? (i(), C(ne, { key: 0 })) : E("", !0)
|
|
398
|
-
], !0)
|
|
399
|
-
])
|
|
400
|
-
]),
|
|
401
|
-
_: 3
|
|
402
|
-
}, 8, ["visible"]));
|
|
425
|
+
setup(r, { expose: o }) {
|
|
426
|
+
o();
|
|
427
|
+
const t = r, e = b(() => t.size == "small" ? "24px" : t.size == "standard" ? "40px" : t.size == "large" ? "60px" : t.size), s = { props: t, width: e, computed: b };
|
|
428
|
+
return Object.defineProperty(s, "__isScriptSetup", { enumerable: !1, value: !0 }), s;
|
|
403
429
|
}
|
|
404
|
-
})
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
}, 50));
|
|
420
|
-
});
|
|
421
|
-
},
|
|
422
|
-
close() {
|
|
423
|
-
return new Promise((l) => {
|
|
424
|
-
o.value?.close?.(), setTimeout(() => {
|
|
425
|
-
s?.unmount?.(), r?.remove?.(), l(!0);
|
|
426
|
-
}, 300);
|
|
427
|
-
});
|
|
428
|
-
}
|
|
429
|
-
};
|
|
430
|
-
}, ce = m(1e3), Me = {
|
|
431
|
-
getNewIndex() {
|
|
432
|
-
return ce.value += 2, ce.value;
|
|
430
|
+
});
|
|
431
|
+
function Ue(r, o, t, e, s, n) {
|
|
432
|
+
return i(), y("div", {
|
|
433
|
+
class: p({ square: t.square, "toife-avatar": !0 }),
|
|
434
|
+
style: w({ "--size": e.width })
|
|
435
|
+
}, [
|
|
436
|
+
$(r.$slots, "default", {}, void 0, !0)
|
|
437
|
+
], 6);
|
|
438
|
+
}
|
|
439
|
+
const Je = /* @__PURE__ */ x(Ge, [["render", Ue], ["__scopeId", "data-v-32c57a0d"]]), Qe = /* @__PURE__ */ k({
|
|
440
|
+
__name: "screen",
|
|
441
|
+
setup(r, { expose: o }) {
|
|
442
|
+
o();
|
|
443
|
+
const t = {};
|
|
444
|
+
return Object.defineProperty(t, "__isScriptSetup", { enumerable: !1, value: !0 }), t;
|
|
433
445
|
}
|
|
434
|
-
}
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
446
|
+
}), Ze = {
|
|
447
|
+
class: /* @__PURE__ */ p({ "toife-screen": !0 })
|
|
448
|
+
};
|
|
449
|
+
function Ye(r, o, t, e, s, n) {
|
|
450
|
+
return i(), y("div", Ze, [
|
|
451
|
+
$(r.$slots, "default", {}, void 0, !0)
|
|
452
|
+
]);
|
|
453
|
+
}
|
|
454
|
+
const he = /* @__PURE__ */ x(Qe, [["render", Ye], ["__scopeId", "data-v-59be2187"]]), N = ie([]), se = u(!0), B = u(!1), R = u(-1), O = b(() => N[R.value]), H = b(() => N[R.value + 1] || void 0), E = b(() => N[N.length - 2]), ke = b(() => !B.value && se.value && E.value), X = (r = !0) => {
|
|
455
|
+
let t = O.value.target.closest(".toife-app").offsetWidth;
|
|
456
|
+
return r ? t + "px" : t;
|
|
457
|
+
}, ae = {
|
|
438
458
|
reset() {
|
|
439
|
-
|
|
440
|
-
const
|
|
441
|
-
o.style.transition = "transform 0.
|
|
442
|
-
|
|
459
|
+
B.value = !0;
|
|
460
|
+
const r = X(), o = O.value.target, t = E.value.target;
|
|
461
|
+
o.style.transition = "transform 0.25s ease", o.style.transform = "translateX(0px)", t.style.transition = "transform 0.25s ease", t.style.transform = `translateX(calc(${r} / 100 * 30 * -1)) scale(0.5) perspective(${r}) rotateY(30deg)`, document.documentElement.style.setProperty("--toife-screen-backdrop-duration", "0.25s"), document.documentElement.style.setProperty("--toife-swipe-backdrop-opacity", "0.5"), setTimeout(() => {
|
|
462
|
+
B.value = !1;
|
|
443
463
|
}, 400);
|
|
444
464
|
},
|
|
445
|
-
move(
|
|
446
|
-
if (!
|
|
447
|
-
const o =
|
|
448
|
-
|
|
465
|
+
move(r) {
|
|
466
|
+
if (!ke.value) return;
|
|
467
|
+
const o = X(!1), t = o + "px", e = r / o * 100, s = O.value.target, n = E.value.target;
|
|
468
|
+
r > 15 && r <= o && (s.style.transition = "transform 0s ease", s.style.transform = `translateX(${r}px)`, n.style.transition = "transform 0s ease", document.documentElement.style.setProperty("--toife-screen-backdrop-duration", "0s"), n.style.transform = `translateX(calc((${t} / 100 * 30 * -1) + ((${t} / 100 * 30) / 100 * ${e}))) scale(${0.5 + 0.5 / 100 * e}) perspective(${t}) rotateY(${30 - 30 / 100 * e}deg)`, document.documentElement.style.setProperty("--toife-swipe-backdrop-opacity", `${0.5 - 0.5 / 100 * e}`));
|
|
449
469
|
},
|
|
450
|
-
back(
|
|
451
|
-
if (!
|
|
452
|
-
const o =
|
|
453
|
-
|
|
454
|
-
|
|
470
|
+
back(r) {
|
|
471
|
+
if (!E.value) return;
|
|
472
|
+
const o = X();
|
|
473
|
+
O.value.target.style.transition = "transform 0.25s ease", O.value.target.style.transform = `translateX(${o}) scale(1)`, E.value.target.style.transition = "transform 0.25s ease", E.value.target.style.transform = `translateX(0px) scale(1) perspective(${o}) rotateY(0deg)`, document.documentElement.style.setProperty("--toife-screen-backdrop-duration", "0.25s"), document.documentElement.style.setProperty("--toife-swipe-backdrop-opacity", "0"), B.value = !0, setTimeout(() => {
|
|
474
|
+
de(), B.value = !1, R.value -= 1, r && r();
|
|
455
475
|
}, 400);
|
|
456
476
|
},
|
|
457
|
-
next(
|
|
477
|
+
next(r) {
|
|
458
478
|
if (!H.value) return;
|
|
459
479
|
if (R.value == -1) {
|
|
460
|
-
R.value += 1,
|
|
480
|
+
R.value += 1, r && r();
|
|
461
481
|
return;
|
|
462
482
|
}
|
|
463
|
-
|
|
464
|
-
const o = H.value.target,
|
|
465
|
-
o.style.transform = `translateX(${
|
|
466
|
-
o.style.transition = "transform 0.
|
|
467
|
-
|
|
483
|
+
B.value = !0;
|
|
484
|
+
const o = H.value.target, t = X();
|
|
485
|
+
o.style.transform = `translateX(${t})`, o.transitionOrigin = "center", document.documentElement.style.setProperty("--toife-screen-backdrop-duration", "0s"), document.documentElement.style.setProperty("--toife-swipe-backdrop-opacity", "0"), setTimeout(() => {
|
|
486
|
+
o.style.transition = "transform 0.25s ease", o.style.transform = "translateX(0px)", document.documentElement.style.setProperty("--toife-screen-backdrop-duration", "0.25s"), document.documentElement.style.setProperty("--toife-swipe-backdrop-opacity", "0.5"), O.value && (O.value.target.style.transitionOrigin = "left center", O.value.target.style.transition = "transform 0.25s ease", O.value.target.style.transform = `translateX(calc(${t} / 100 * 30 * -1)) scale(0.5) perspective(${t}) rotateY(30deg)`), setTimeout(() => {
|
|
487
|
+
B.value = !1, R.value += 1, r && r();
|
|
468
488
|
}, 400);
|
|
469
489
|
}, 100);
|
|
470
490
|
}
|
|
471
|
-
},
|
|
491
|
+
}, le = {
|
|
472
492
|
reset() {
|
|
473
|
-
|
|
474
|
-
const
|
|
475
|
-
o.style.transition = "transform 0.
|
|
476
|
-
|
|
493
|
+
B.value = !0;
|
|
494
|
+
const r = X(), o = O.value.target, t = E.value.target;
|
|
495
|
+
o.style.transition = "transform 0.25s ease", o.style.transform = "translateX(0px)", t.style.transition = "transform 0.25s ease", t.style.transform = `translateX(calc(${r} / 100 * 30 * -1))`, document.documentElement.style.setProperty("--toife-screen-backdrop-duration", "0.25s"), document.documentElement.style.setProperty("--toife-swipe-backdrop-opacity", "0.5"), setTimeout(() => {
|
|
496
|
+
B.value = !1;
|
|
477
497
|
}, 400);
|
|
478
498
|
},
|
|
479
|
-
move(
|
|
480
|
-
const o =
|
|
481
|
-
|
|
499
|
+
move(r) {
|
|
500
|
+
const o = X(!1), t = o + "px", e = r / o * 100, s = O.value.target, n = E.value.target;
|
|
501
|
+
r > 15 && r <= o && (s.style.transition = "transform 0s ease", s.style.transform = `translateX(${r}px)`, n.style.transition = "transform 0s ease", document.documentElement.style.setProperty("--toife-screen-backdrop-duration", "0s"), n.style.transform = `translateX(calc((${t} / 100 * 30 * -1) + ((${t} / 100 * 30) / 100 * ${e})))`, document.documentElement.style.setProperty("--toife-swipe-backdrop-opacity", `${0.5 - 0.5 / 100 * e}`));
|
|
482
502
|
},
|
|
483
|
-
back(
|
|
484
|
-
if (!
|
|
485
|
-
const o =
|
|
486
|
-
|
|
487
|
-
|
|
503
|
+
back(r) {
|
|
504
|
+
if (!E.value) return;
|
|
505
|
+
const o = X();
|
|
506
|
+
O.value.target.style.transition = "transform 0.25s ease", O.value.target.style.transform = `translateX(${o}) scale(1)`, E.value.target.style.transition = "transform 0.25s ease", E.value.target.style.transform = "translateX(0px)", document.documentElement.style.setProperty("--toife-screen-backdrop-duration", "0.25s"), document.documentElement.style.setProperty("--toife-swipe-backdrop-opacity", "0"), B.value = !0, setTimeout(() => {
|
|
507
|
+
de(), B.value = !1, R.value -= 1, r && r();
|
|
488
508
|
}, 400);
|
|
489
509
|
},
|
|
490
|
-
next(
|
|
510
|
+
next(r) {
|
|
491
511
|
if (!H.value) return;
|
|
492
512
|
if (R.value == -1) {
|
|
493
|
-
R.value += 1,
|
|
513
|
+
R.value += 1, r && r();
|
|
494
514
|
return;
|
|
495
515
|
}
|
|
496
|
-
|
|
497
|
-
const o = H.value.target,
|
|
498
|
-
o.style.transform = `translateX(${
|
|
499
|
-
o.style.transition = "transform 0.
|
|
500
|
-
|
|
516
|
+
B.value = !0;
|
|
517
|
+
const o = H.value.target, t = X();
|
|
518
|
+
o.style.transform = `translateX(${t})`, o.transitionOrigin = "center", document.documentElement.style.setProperty("--toife-screen-backdrop-duration", "0s"), document.documentElement.style.setProperty("--toife-swipe-backdrop-opacity", "0"), setTimeout(() => {
|
|
519
|
+
o.style.transition = "transform 0.25s ease", o.style.transform = "translateX(0px)", document.documentElement.style.setProperty("--toife-screen-backdrop-duration", "0.25s"), document.documentElement.style.setProperty("--toife-swipe-backdrop-opacity", "0.5"), O.value && (O.value.target.style.transitionOrigin = "left center", O.value.target.style.transition = "transform 0.25s ease", O.value.target.style.transform = `translateX(calc(${t} / 100 * 30 * -1))`), setTimeout(() => {
|
|
520
|
+
B.value = !1, R.value += 1, r && r();
|
|
501
521
|
}, 400);
|
|
502
522
|
}, 100);
|
|
503
523
|
}
|
|
504
|
-
},
|
|
505
|
-
|
|
506
|
-
},
|
|
507
|
-
|
|
508
|
-
},
|
|
509
|
-
|
|
510
|
-
},
|
|
511
|
-
|
|
512
|
-
},
|
|
513
|
-
|
|
514
|
-
},
|
|
515
|
-
|
|
516
|
-
},
|
|
517
|
-
|
|
518
|
-
},
|
|
519
|
-
|
|
520
|
-
},
|
|
521
|
-
|
|
522
|
-
},
|
|
523
|
-
|
|
524
|
-
},
|
|
525
|
-
isBusy:
|
|
526
|
-
isSwipeable:
|
|
527
|
-
reset:
|
|
528
|
-
next:
|
|
529
|
-
back:
|
|
530
|
-
move:
|
|
531
|
-
screens:
|
|
532
|
-
addScreen:
|
|
533
|
-
addScreenEl:
|
|
534
|
-
removeScreen:
|
|
535
|
-
removeAllScreen:
|
|
536
|
-
lockSwipe:
|
|
537
|
-
unlockSwipe:
|
|
538
|
-
swipeable:
|
|
539
|
-
currentScreen:
|
|
540
|
-
lastScreen:
|
|
524
|
+
}, et = (r) => {
|
|
525
|
+
N.push(r);
|
|
526
|
+
}, tt = (r, o) => {
|
|
527
|
+
N[r].target = o;
|
|
528
|
+
}, de = (r) => {
|
|
529
|
+
r || N.pop();
|
|
530
|
+
}, rt = () => {
|
|
531
|
+
N.splice(0, N.length);
|
|
532
|
+
}, ot = () => {
|
|
533
|
+
se.value = !1;
|
|
534
|
+
}, nt = () => {
|
|
535
|
+
se.value = !0;
|
|
536
|
+
}, st = (r, o) => {
|
|
537
|
+
r == "scale" && ae.next(o), r == "transform" && le.next(o);
|
|
538
|
+
}, at = (r, o) => {
|
|
539
|
+
r == "scale" && ae.back(o), r == "transform" && le.back(o);
|
|
540
|
+
}, lt = (r, o) => {
|
|
541
|
+
r == "scale" && ae.move(o), r == "transform" && le.move(o);
|
|
542
|
+
}, ct = (r) => {
|
|
543
|
+
r == "scale" && ae.reset(), r == "transform" && le.reset();
|
|
544
|
+
}, ee = () => ({
|
|
545
|
+
isBusy: B,
|
|
546
|
+
isSwipeable: ke,
|
|
547
|
+
reset: ct,
|
|
548
|
+
next: st,
|
|
549
|
+
back: at,
|
|
550
|
+
move: lt,
|
|
551
|
+
screens: N,
|
|
552
|
+
addScreen: et,
|
|
553
|
+
addScreenEl: tt,
|
|
554
|
+
removeScreen: de,
|
|
555
|
+
removeAllScreen: rt,
|
|
556
|
+
lockSwipe: ot,
|
|
557
|
+
unlockSwipe: nt,
|
|
558
|
+
swipeable: se,
|
|
559
|
+
currentScreen: O,
|
|
560
|
+
lastScreen: E,
|
|
541
561
|
nextScreen: H
|
|
542
|
-
},
|
|
543
|
-
__name: "
|
|
544
|
-
props: {
|
|
545
|
-
message: {},
|
|
546
|
-
space: { default: "0px" },
|
|
547
|
-
placement: { default: "bottom" },
|
|
548
|
-
color: { default: null },
|
|
549
|
-
variant: { default: "default" },
|
|
550
|
-
visible: { type: Boolean, default: !1 }
|
|
551
|
-
},
|
|
552
|
-
emits: ["dismiss"],
|
|
553
|
-
setup(t, { expose: o, emit: e }) {
|
|
554
|
-
const s = t, r = e, l = m(!1), u = m(!1), n = m(!1), p = () => {
|
|
555
|
-
u.value = !0, n.value = !1, setTimeout(() => {
|
|
556
|
-
l.value = !0;
|
|
557
|
-
}, 10);
|
|
558
|
-
}, v = () => {
|
|
559
|
-
n.value = !0, setTimeout(() => {
|
|
560
|
-
u.value = !1, l.value = !1, r("dismiss");
|
|
561
|
-
}, 300);
|
|
562
|
-
};
|
|
563
|
-
W(() => s.visible, (a) => {
|
|
564
|
-
a ? p() : v();
|
|
565
|
-
});
|
|
566
|
-
const d = x(() => {
|
|
567
|
-
let a;
|
|
568
|
-
return s.variant == "default" && (s.color ? ["warning", "info", "danger", "primary", "secondary", "success"].includes(s.color) ? a = {
|
|
569
|
-
"--border": "none",
|
|
570
|
-
"--color": "var(--t-color-status-" + s.color + "-text)",
|
|
571
|
-
"--background": "rgba(var(--t-color-status-" + s.color + "-rgb), 1)"
|
|
572
|
-
} : a = {
|
|
573
|
-
"--border": "none",
|
|
574
|
-
"--color": "var(--t-color-text)",
|
|
575
|
-
"--background": s.color
|
|
576
|
-
} : a = {
|
|
577
|
-
"--border": "none",
|
|
578
|
-
"--color": "var(--t-color-text)",
|
|
579
|
-
"--background": "rgba(var(--t-color-surface-rgb), 1)"
|
|
580
|
-
}), s.variant == "text" && (s.color ? ["warning", "info", "danger", "primary", "secondary", "success"].includes(s.color) ? a = {
|
|
581
|
-
"--border": "none",
|
|
582
|
-
"--color": "var(--t-color-status-" + s.color + ")",
|
|
583
|
-
"--background": "transparent"
|
|
584
|
-
} : a = {
|
|
585
|
-
"--border": "none",
|
|
586
|
-
"--color": s.color,
|
|
587
|
-
"--background": "transparent"
|
|
588
|
-
} : a = {
|
|
589
|
-
"--border": "none",
|
|
590
|
-
"--color": "var(--t-color-text)",
|
|
591
|
-
"--background": "transparent"
|
|
592
|
-
}), s.variant == "outline" && (s.color ? ["warning", "info", "danger", "primary", "secondary", "success"].includes(s.color) ? a = {
|
|
593
|
-
"--border": "0.55px solid var(--t-color-status-" + s.color + ")",
|
|
594
|
-
"--color": "var(--t-color-status-" + s.color + ")",
|
|
595
|
-
"--background": "transparent"
|
|
596
|
-
} : a = {
|
|
597
|
-
"--border": "0.55px solid " + s.color,
|
|
598
|
-
"--color": s.color,
|
|
599
|
-
"--background": "transparent"
|
|
600
|
-
} : a = {
|
|
601
|
-
"--border": "0.55px solid var(--t-color-text)",
|
|
602
|
-
"--color": "var(--t-color-text)",
|
|
603
|
-
"--background": "transparent"
|
|
604
|
-
}), a;
|
|
605
|
-
});
|
|
606
|
-
return o({
|
|
607
|
-
open: p,
|
|
608
|
-
close: v
|
|
609
|
-
}), (a, c) => u.value ? (i(), f("div", {
|
|
610
|
-
key: 0,
|
|
611
|
-
class: B(["t-toast", { [s.placement]: !0, open: l.value, closing: n.value }]),
|
|
612
|
-
style: T({ "--space": s.space, ...d.value })
|
|
613
|
-
}, [
|
|
614
|
-
_(a.$slots, "content", {}, () => [
|
|
615
|
-
$("div", Ze, A(s.message), 1)
|
|
616
|
-
], !0)
|
|
617
|
-
], 6)) : E("", !0);
|
|
618
|
-
}
|
|
619
|
-
}), _e = /* @__PURE__ */ g(Ye, [["__scopeId", "data-v-bac1506b"]]), ho = (t = {}) => ({
|
|
620
|
-
open() {
|
|
621
|
-
let o = document.body.querySelector(".t-app");
|
|
622
|
-
if (!o) return;
|
|
623
|
-
const e = document.createElement("div"), s = m();
|
|
624
|
-
o.appendChild(e);
|
|
625
|
-
const r = J({
|
|
626
|
-
render() {
|
|
627
|
-
return Q(_e, {
|
|
628
|
-
...t,
|
|
629
|
-
ref: s,
|
|
630
|
-
onDismiss: () => {
|
|
631
|
-
setTimeout(() => {
|
|
632
|
-
r.unmount(), e.remove();
|
|
633
|
-
}, 300);
|
|
634
|
-
}
|
|
635
|
-
});
|
|
636
|
-
}
|
|
637
|
-
});
|
|
638
|
-
r.mount(e), setTimeout(() => {
|
|
639
|
-
s.value?.open?.(), setTimeout(() => {
|
|
640
|
-
s.value?.close?.();
|
|
641
|
-
}, t.duration + 10);
|
|
642
|
-
}, 50);
|
|
643
|
-
}
|
|
644
|
-
}), et = m(0);
|
|
645
|
-
function ge() {
|
|
646
|
-
return {
|
|
647
|
-
height: et
|
|
648
|
-
};
|
|
649
|
-
}
|
|
650
|
-
const tt = /* @__PURE__ */ h({
|
|
651
|
-
__name: "t-cable",
|
|
652
|
-
props: {
|
|
653
|
-
keyboard: { type: Boolean, default: !1 },
|
|
654
|
-
placement: { default: "bottom" }
|
|
655
|
-
},
|
|
656
|
-
setup(t) {
|
|
657
|
-
const o = t, { height: e } = ge();
|
|
658
|
-
return de("cableState", {
|
|
659
|
-
placement: o.placement
|
|
660
|
-
}), (s, r) => (i(), f("div", {
|
|
661
|
-
class: B(["t-cable", { keyboard: o.keyboard && O(e) > 0, [o.placement]: !0 }]),
|
|
662
|
-
style: T({ "--t-keyboard-height": O(e) + "px", "--t-keyboard-transition": O(e) > 0 ? "0.3s" : "0.1s" })
|
|
663
|
-
}, [
|
|
664
|
-
_(s.$slots, "default", {}, void 0, !0)
|
|
665
|
-
], 6));
|
|
666
|
-
}
|
|
667
|
-
}), ot = /* @__PURE__ */ g(tt, [["__scopeId", "data-v-27e0d794"]]), st = /* @__PURE__ */ h({
|
|
668
|
-
__name: "t-card",
|
|
669
|
-
props: {
|
|
670
|
-
color: { default: null }
|
|
671
|
-
},
|
|
672
|
-
setup(t) {
|
|
673
|
-
const o = t, e = x(() => {
|
|
674
|
-
let s;
|
|
675
|
-
return o.color ? ["warning", "info", "danger", "primary", "secondary", "success"].includes(o.color) ? s = {
|
|
676
|
-
"--background": "var(--t-color-status-" + o.color + ")"
|
|
677
|
-
} : s = {
|
|
678
|
-
"--background": o.color
|
|
679
|
-
} : s = {
|
|
680
|
-
"--background": "var(--t-color-surface)"
|
|
681
|
-
}, s;
|
|
682
|
-
});
|
|
683
|
-
return (s, r) => (i(), f("div", {
|
|
684
|
-
class: "t-card",
|
|
685
|
-
style: T(e.value)
|
|
686
|
-
}, [
|
|
687
|
-
_(s.$slots, "default")
|
|
688
|
-
], 4));
|
|
689
|
-
}
|
|
690
|
-
}), rt = {}, nt = { class: "t-content" };
|
|
691
|
-
function at(t, o) {
|
|
692
|
-
return i(), f("div", nt, [
|
|
693
|
-
_(t.$slots, "default", {}, void 0, !0)
|
|
694
|
-
]);
|
|
695
|
-
}
|
|
696
|
-
const lt = /* @__PURE__ */ g(rt, [["render", at], ["__scopeId", "data-v-ce0031a0"]]), ct = /* @__PURE__ */ h({
|
|
697
|
-
__name: "t-refresher",
|
|
698
|
-
props: {
|
|
699
|
-
threshold: { default: 120 },
|
|
700
|
-
safe: { type: Boolean, default: !1 },
|
|
701
|
-
variant: { default: "max" }
|
|
702
|
-
},
|
|
703
|
-
emits: ["refresh", "move", "cancel", "start"],
|
|
704
|
-
setup(t, { emit: o }) {
|
|
705
|
-
const e = o, s = t, r = m(0), l = m(!1), u = m();
|
|
706
|
-
let n, p = !1;
|
|
707
|
-
const v = () => {
|
|
708
|
-
l.value = !1, r.value = 0, p = !1;
|
|
709
|
-
}, d = () => {
|
|
710
|
-
p = !0, l.value = !0, r.value = s.threshold, e("refresh", v);
|
|
711
|
-
}, a = () => {
|
|
712
|
-
r.value = 0, l.value = !1, p = !1, e("cancel");
|
|
713
|
-
};
|
|
714
|
-
return W(() => u.value, () => {
|
|
715
|
-
n && n.destroy();
|
|
716
|
-
let c = u.value.closest(".t-content");
|
|
717
|
-
c && (n = re(c, {
|
|
718
|
-
options: {
|
|
719
|
-
minMove: 20
|
|
720
|
-
},
|
|
721
|
-
beforeEvent() {
|
|
722
|
-
return !(c.scrollTop > 0);
|
|
723
|
-
},
|
|
724
|
-
down() {
|
|
725
|
-
l.value || p || e("start");
|
|
726
|
-
},
|
|
727
|
-
move({ deltaY: y, initialDirection: w }) {
|
|
728
|
-
if (l.value || p || w != "down") return;
|
|
729
|
-
if (s.variant == "max" && y >= s.threshold) {
|
|
730
|
-
d();
|
|
731
|
-
return;
|
|
732
|
-
}
|
|
733
|
-
const b = y < 0 ? 0 : y;
|
|
734
|
-
r.value = b, e("move", b);
|
|
735
|
-
},
|
|
736
|
-
up({ deltaY: y, initialDirection: w }) {
|
|
737
|
-
l.value || p || w != "down" || (s.variant == "up" && y >= s.threshold ? d() : a());
|
|
738
|
-
},
|
|
739
|
-
cancel() {
|
|
740
|
-
l.value || p || a();
|
|
741
|
-
}
|
|
742
|
-
}, {
|
|
743
|
-
passive: !1
|
|
744
|
-
}));
|
|
745
|
-
}), se(() => {
|
|
746
|
-
n && n.destroy();
|
|
747
|
-
}), (c, y) => j((i(), f("div", {
|
|
748
|
-
class: B(["t-refresher", { safe: c.safe }]),
|
|
749
|
-
ref_key: "container",
|
|
750
|
-
ref: u
|
|
751
|
-
}, [
|
|
752
|
-
_(c.$slots, "default", {
|
|
753
|
-
offset: r.value,
|
|
754
|
-
refreshing: l.value
|
|
755
|
-
}, void 0, !0)
|
|
756
|
-
], 2)), [
|
|
757
|
-
[G, r.value > 0]
|
|
758
|
-
]);
|
|
759
|
-
}
|
|
760
|
-
}), it = /* @__PURE__ */ g(ct, [["__scopeId", "data-v-c77146a5"]]), ut = {}, dt = { class: "t-screen" };
|
|
761
|
-
function pt(t, o) {
|
|
762
|
-
return i(), f("div", dt, [
|
|
763
|
-
_(t.$slots, "default", {}, void 0, !0)
|
|
764
|
-
]);
|
|
765
|
-
}
|
|
766
|
-
const be = /* @__PURE__ */ g(ut, [["render", pt], ["__scopeId", "data-v-c2a3436c"]]), ft = /* @__PURE__ */ h({
|
|
767
|
-
__name: "t-screen-router",
|
|
562
|
+
}), it = /* @__PURE__ */ k({
|
|
563
|
+
__name: "screen-router",
|
|
768
564
|
props: {
|
|
769
565
|
variant: { default: "scale" },
|
|
770
566
|
router: {},
|
|
771
567
|
route: {}
|
|
772
568
|
},
|
|
773
569
|
emits: ["change"],
|
|
774
|
-
setup(
|
|
570
|
+
setup(r, { expose: o, emit: t }) {
|
|
571
|
+
o();
|
|
775
572
|
let e = {};
|
|
776
|
-
const s =
|
|
573
|
+
const s = t, n = r;
|
|
777
574
|
let l;
|
|
778
|
-
const
|
|
779
|
-
for (let
|
|
780
|
-
e[
|
|
781
|
-
const
|
|
782
|
-
|
|
783
|
-
name:
|
|
575
|
+
const a = n.router || Y(), c = n.route || me(), d = a.getRoutes(), _ = ee(), g = u();
|
|
576
|
+
for (let f of d)
|
|
577
|
+
e[f.name] = f.component || f.components;
|
|
578
|
+
const v = (f) => {
|
|
579
|
+
f && _.addScreen({
|
|
580
|
+
name: f,
|
|
784
581
|
target: null,
|
|
785
|
-
component:
|
|
582
|
+
component: pe(e[f] || null)
|
|
786
583
|
});
|
|
787
|
-
},
|
|
788
|
-
!
|
|
584
|
+
}, m = (f, I) => {
|
|
585
|
+
!I || _.screens[f].target || (_.addScreenEl(f, I.$el), _.nextScreen && _.next(n.variant, () => {
|
|
789
586
|
s("change");
|
|
790
587
|
}));
|
|
791
588
|
};
|
|
792
|
-
|
|
793
|
-
|
|
589
|
+
z(() => c.name, (f, I) => {
|
|
590
|
+
f != _.currentScreen.value?.name && (_.lastScreen.value?.name == f ? _.back(n.variant, () => {
|
|
794
591
|
s("change");
|
|
795
|
-
}) :
|
|
796
|
-
}),
|
|
797
|
-
|
|
798
|
-
beforeEvent(
|
|
799
|
-
return !!
|
|
592
|
+
}) : v(c.name));
|
|
593
|
+
}), A(() => {
|
|
594
|
+
v(c.name), l = L(document.body, {
|
|
595
|
+
beforeEvent(f) {
|
|
596
|
+
return !!_.isSwipeable.value;
|
|
800
597
|
},
|
|
801
|
-
fast({ initialDirection:
|
|
802
|
-
|
|
598
|
+
fast({ initialDirection: f }) {
|
|
599
|
+
_.lastScreen.value && f == "right" && a.back();
|
|
803
600
|
},
|
|
804
|
-
move({ deltaX:
|
|
805
|
-
|
|
601
|
+
move({ deltaX: f, initialDirection: I }) {
|
|
602
|
+
I == "right" && _.move(n.variant, f);
|
|
806
603
|
},
|
|
807
|
-
up({ deltaX:
|
|
808
|
-
if (
|
|
809
|
-
|
|
604
|
+
up({ deltaX: f, initialDirection: I }) {
|
|
605
|
+
if (I != "right") {
|
|
606
|
+
_.reset(n.variant);
|
|
810
607
|
return;
|
|
811
608
|
}
|
|
812
|
-
const
|
|
813
|
-
|
|
609
|
+
const P = g.value.offsetParent.offsetWidth;
|
|
610
|
+
f / P * 100 >= 50 ? a.back() : _.reset(n.variant);
|
|
814
611
|
},
|
|
815
612
|
cancel() {
|
|
816
|
-
|
|
613
|
+
_.reset(n.variant);
|
|
817
614
|
}
|
|
818
615
|
});
|
|
819
|
-
}),
|
|
820
|
-
l && l.destroy(),
|
|
821
|
-
})
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
__name: "t-toolbar",
|
|
843
|
-
props: {
|
|
844
|
-
placement: { default: null },
|
|
845
|
-
safe: { type: Boolean, default: !0 },
|
|
846
|
-
size: { default: "50px" }
|
|
847
|
-
},
|
|
848
|
-
setup(t) {
|
|
849
|
-
const o = t, e = pe("cableState"), s = x(() => o?.placement || e?.placement);
|
|
850
|
-
return (r, l) => (i(), f("div", {
|
|
851
|
-
class: B(["t-toolbar", { [s.value]: !0, safe: o.safe }]),
|
|
852
|
-
style: T({ "--t-size-toolbar": o.size })
|
|
853
|
-
}, [
|
|
854
|
-
$("div", null, [
|
|
855
|
-
_(r.$slots, "default", {}, void 0, !0)
|
|
856
|
-
])
|
|
857
|
-
], 6));
|
|
616
|
+
}), M(() => {
|
|
617
|
+
l && l.destroy(), _.removeAllScreen();
|
|
618
|
+
});
|
|
619
|
+
const h = { get routeComponents() {
|
|
620
|
+
return e;
|
|
621
|
+
}, set routeComponents(f) {
|
|
622
|
+
e = f;
|
|
623
|
+
}, emit: s, props: n, get ges() {
|
|
624
|
+
return l;
|
|
625
|
+
}, set ges(f) {
|
|
626
|
+
l = f;
|
|
627
|
+
}, _router: a, _route: c, routes: d, screenRouter: _, backdrop: g, addScreen: v, addScreenRef: m, markRaw: pe, onMounted: A, onUnmounted: M, ref: u, watch: z, get useRoute() {
|
|
628
|
+
return me;
|
|
629
|
+
}, get useRouter() {
|
|
630
|
+
return Y;
|
|
631
|
+
}, get gesture() {
|
|
632
|
+
return L;
|
|
633
|
+
}, get Screen() {
|
|
634
|
+
return he;
|
|
635
|
+
}, get useScreenRouter() {
|
|
636
|
+
return ee;
|
|
637
|
+
} };
|
|
638
|
+
return Object.defineProperty(h, "__isScriptSetup", { enumerable: !1, value: !0 }), h;
|
|
858
639
|
}
|
|
859
|
-
})
|
|
860
|
-
|
|
640
|
+
});
|
|
641
|
+
function ut(r, o, t, e, s, n) {
|
|
642
|
+
return i(), y(q, null, [
|
|
643
|
+
(i(!0), y(q, null, J(e.screenRouter.screens, (l, a) => (i(), j(e.Screen, {
|
|
644
|
+
ref_for: !0,
|
|
645
|
+
ref: (c) => e.addScreenRef(a, c),
|
|
646
|
+
style: w({ zIndex: a + (a == e.screenRouter.screens.length - 1 ? 2 : 1) }),
|
|
647
|
+
key: a
|
|
648
|
+
}, {
|
|
649
|
+
default: D(() => [
|
|
650
|
+
(i(), j(Ie(l.component.default)))
|
|
651
|
+
]),
|
|
652
|
+
_: 2
|
|
653
|
+
}, 1032, ["style"]))), 128)),
|
|
654
|
+
S("div", {
|
|
655
|
+
class: p({ "toife-screen-router-backdrop": !0 }),
|
|
656
|
+
ref: "backdrop",
|
|
657
|
+
style: w({ zIndex: e.screenRouter.screens.length })
|
|
658
|
+
}, null, 4)
|
|
659
|
+
], 64);
|
|
660
|
+
}
|
|
661
|
+
const dt = /* @__PURE__ */ x(it, [["render", ut], ["__scopeId", "data-v-c7ff05f0"]]), pt = /* @__PURE__ */ k({
|
|
662
|
+
__name: "back-button",
|
|
861
663
|
props: {
|
|
862
664
|
to: {},
|
|
863
665
|
router: {}
|
|
864
666
|
},
|
|
865
|
-
setup(
|
|
866
|
-
|
|
667
|
+
setup(r, { expose: o }) {
|
|
668
|
+
o();
|
|
669
|
+
const t = r, e = fe(), s = t.router || Y(), n = ee(), a = { props: t, attrs: e, router: s, screenRouter: n, onClick: (c) => {
|
|
867
670
|
if (e.onBack) {
|
|
868
|
-
e.onBack(
|
|
671
|
+
e.onBack(c);
|
|
869
672
|
return;
|
|
870
673
|
}
|
|
871
|
-
|
|
872
|
-
}
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
},
|
|
878
|
-
_(l.$slots, "default", {}, () => [
|
|
879
|
-
u[0] || (u[0] = $("i", { class: "ri-arrow-left-s-line" }, null, -1))
|
|
880
|
-
], !0)
|
|
881
|
-
], 32)) : E("", !0);
|
|
674
|
+
n.lastScreen.value ? s?.back?.() : t.to && s?.push?.(t.to);
|
|
675
|
+
}, useAttrs: fe, get useRouter() {
|
|
676
|
+
return Y;
|
|
677
|
+
}, get useScreenRouter() {
|
|
678
|
+
return ee;
|
|
679
|
+
} };
|
|
680
|
+
return Object.defineProperty(a, "__isScriptSetup", { enumerable: !1, value: !0 }), a;
|
|
882
681
|
}
|
|
883
|
-
})
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
682
|
+
});
|
|
683
|
+
function ft(r, o, t, e, s, n) {
|
|
684
|
+
return t.to || e.screenRouter.lastScreen ? (i(), y("button", {
|
|
685
|
+
key: 0,
|
|
686
|
+
class: p({ "toife-back-button": !0 }),
|
|
687
|
+
onPointerup: e.onClick
|
|
688
|
+
}, [
|
|
689
|
+
$(r.$slots, "default", {}, () => [
|
|
690
|
+
o[0] || (o[0] = S("i", { class: "ri-arrow-left-s-line" }, null, -1))
|
|
691
|
+
], !0)
|
|
692
|
+
], 32)) : C("", !0);
|
|
693
|
+
}
|
|
694
|
+
const mt = /* @__PURE__ */ x(pt, [["render", ft], ["__scopeId", "data-v-acb94acb"]]), _t = u(0);
|
|
695
|
+
function te() {
|
|
696
|
+
return {
|
|
697
|
+
height: _t
|
|
698
|
+
};
|
|
699
|
+
}
|
|
700
|
+
const vt = /* @__PURE__ */ k({
|
|
701
|
+
__name: "keyboard-space",
|
|
702
|
+
setup(r, { expose: o }) {
|
|
703
|
+
o();
|
|
704
|
+
const { height: t } = te(), e = { height: t, get useKeyboard() {
|
|
705
|
+
return te;
|
|
706
|
+
} };
|
|
707
|
+
return Object.defineProperty(e, "__isScriptSetup", { enumerable: !1, value: !0 }), e;
|
|
903
708
|
}
|
|
904
|
-
})
|
|
905
|
-
|
|
709
|
+
});
|
|
710
|
+
function yt(r, o, t, e, s, n) {
|
|
711
|
+
return i(), y("div", {
|
|
712
|
+
class: p({ "toife-keyboard-space": !0 }),
|
|
713
|
+
style: w({ "--height": e.height + "px" })
|
|
714
|
+
}, null, 4);
|
|
715
|
+
}
|
|
716
|
+
const bt = /* @__PURE__ */ x(vt, [["render", yt], ["__scopeId", "data-v-ae883ffe"]]), gt = /* @__PURE__ */ k({
|
|
717
|
+
__name: "cable",
|
|
906
718
|
props: {
|
|
719
|
+
keyboard: { type: Boolean, default: !1 },
|
|
907
720
|
placement: { default: "bottom" }
|
|
908
721
|
},
|
|
909
|
-
setup(
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
722
|
+
setup(r, { expose: o }) {
|
|
723
|
+
o();
|
|
724
|
+
const t = r, { height: e } = te();
|
|
725
|
+
Q("cableState", {
|
|
726
|
+
placement: t.placement
|
|
727
|
+
});
|
|
728
|
+
const s = { props: t, height: e, provide: Q, get useKeyboard() {
|
|
729
|
+
return te;
|
|
730
|
+
} };
|
|
731
|
+
return Object.defineProperty(s, "__isScriptSetup", { enumerable: !1, value: !0 }), s;
|
|
913
732
|
}
|
|
914
|
-
})
|
|
915
|
-
|
|
733
|
+
});
|
|
734
|
+
function ht(r, o, t, e, s, n) {
|
|
735
|
+
return i(), y("div", {
|
|
736
|
+
class: p({ "toife-cable": !0, keyboard: e.props.keyboard && e.height > 0, [e.props.placement]: !0 }),
|
|
737
|
+
style: w({ "--toife-keyboard-height": e.height + "px", "--toife-keyboard-transition": e.height > 0 ? "0.3s" : "0.1s" })
|
|
738
|
+
}, [
|
|
739
|
+
$(r.$slots, "default", {}, void 0, !0)
|
|
740
|
+
], 6);
|
|
741
|
+
}
|
|
742
|
+
const kt = /* @__PURE__ */ x(gt, [["render", ht], ["__scopeId", "data-v-2c9cb2cf"]]), xt = /* @__PURE__ */ k({
|
|
743
|
+
__name: "card",
|
|
916
744
|
props: {
|
|
917
|
-
|
|
918
|
-
class: {},
|
|
919
|
-
visible: { type: Boolean, default: !1 },
|
|
920
|
-
gesture: { type: Boolean, default: !0 },
|
|
921
|
-
fullscreen: { type: Boolean, default: !1 },
|
|
922
|
-
placement: { default: "bottom" },
|
|
923
|
-
keepalive: { type: Boolean, default: !0 },
|
|
924
|
-
backdrop: { type: Boolean, default: !0 },
|
|
925
|
-
rounded: { type: Boolean, default: !1 },
|
|
926
|
-
indicator: { type: Boolean, default: !0 },
|
|
927
|
-
duration: { default: 200 },
|
|
928
|
-
bounce: {},
|
|
929
|
-
style: {}
|
|
745
|
+
color: { default: null }
|
|
930
746
|
},
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
const
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
},
|
|
943
|
-
|
|
944
|
-
u.value = !1;
|
|
945
|
-
}, 300);
|
|
946
|
-
};
|
|
947
|
-
return W(() => r.value, (a) => {
|
|
948
|
-
a && (n = re(r.value, {
|
|
949
|
-
isMoving: !1,
|
|
950
|
-
options: {
|
|
951
|
-
minDist: 30
|
|
952
|
-
},
|
|
953
|
-
beforeEvent(c) {
|
|
954
|
-
return !(u.value || !e.gesture || e.placement == "center");
|
|
955
|
-
},
|
|
956
|
-
down() {
|
|
957
|
-
this.isMoving = !1;
|
|
958
|
-
},
|
|
959
|
-
fast({ initialDirection: c }) {
|
|
960
|
-
d(), c == p.value ? s("dismiss", "gesture") : l.value.open();
|
|
961
|
-
},
|
|
962
|
-
move({ deltaY: c, deltaX: y, initialDirection: w }) {
|
|
963
|
-
if (w != p.value) return;
|
|
964
|
-
let b = 0;
|
|
965
|
-
e.placement == "bottom" || e.placement == "top" ? b = c : b = y, e.placement == "bottom" && (b = c > 0 ? c : 0), e.placement == "top" && (b = c < 0 ? c : 0), e.placement == "left" && (b = y < 0 ? y : 0), e.placement == "right" && (b = y > 0 ? y : 0), (e.placement == "bottom" && (b >= 10 || this.isMoving) || e.placement == "top" && (b <= -10 || this.isMoving) || e.placement == "left" && (b <= -10 || this.isMoving) || e.placement == "right" && (b >= 10 || this.isMoving)) && (this.isMoving = !0, l.value.render({
|
|
966
|
-
contentTransform: b + "px",
|
|
967
|
-
transition: "0s"
|
|
968
|
-
}));
|
|
969
|
-
},
|
|
970
|
-
up({ deltaY: c, deltaX: y, initialDirection: w }) {
|
|
971
|
-
if (this.isMoving = !1, d(), w != p.value) {
|
|
972
|
-
l.value.open();
|
|
973
|
-
return;
|
|
974
|
-
}
|
|
975
|
-
let b, P, k;
|
|
976
|
-
e.placement == "bottom" || e.placement == "top" ? (b = r.value.offsetHeight, k = c) : (b = r.value.offsetWidth, k = y), P = k / b * 100, P > 50 ? s("dismiss", "gesture") : l.value.open();
|
|
977
|
-
},
|
|
978
|
-
cancel() {
|
|
979
|
-
this.isMoving = !1, d(), l.value.open();
|
|
980
|
-
}
|
|
981
|
-
}));
|
|
982
|
-
}), se(() => {
|
|
983
|
-
n && n.destroy();
|
|
984
|
-
}), (a, c) => (i(), C(F, {
|
|
985
|
-
ref_key: "present",
|
|
986
|
-
ref: l,
|
|
987
|
-
duration: e.duration,
|
|
988
|
-
bounce: e.bounce,
|
|
989
|
-
class: B(e.class),
|
|
990
|
-
placement: e.placement,
|
|
991
|
-
backdrop: a.backdrop,
|
|
992
|
-
visible: e.visible,
|
|
993
|
-
keepalive: e.keepalive,
|
|
994
|
-
onDismiss: v,
|
|
995
|
-
style: T(e.style)
|
|
996
|
-
}, {
|
|
997
|
-
default: N(() => [
|
|
998
|
-
e.gesture && e.indicator && e.placement != "center" ? (i(), C(he, {
|
|
999
|
-
key: 0,
|
|
1000
|
-
placement: e.placement
|
|
1001
|
-
}, null, 8, ["placement"])) : E("", !0),
|
|
1002
|
-
$("div", {
|
|
1003
|
-
class: B(["t-sheet", { fullscreen: e.fullscreen, [e.placement]: !0, rounded: a.rounded }]),
|
|
1004
|
-
style: T({ "--background": e.background }),
|
|
1005
|
-
ref_key: "sheet",
|
|
1006
|
-
ref: r
|
|
1007
|
-
}, [
|
|
1008
|
-
_(a.$slots, "default", {}, void 0, !0)
|
|
1009
|
-
], 6)
|
|
1010
|
-
]),
|
|
1011
|
-
_: 3
|
|
1012
|
-
}, 8, ["duration", "bounce", "class", "placement", "backdrop", "visible", "keepalive", "style"]));
|
|
747
|
+
setup(r, { expose: o }) {
|
|
748
|
+
o();
|
|
749
|
+
const t = r, e = b(() => {
|
|
750
|
+
let n;
|
|
751
|
+
return t.color ? ["warning", "info", "danger", "primary", "secondary", "success"].includes(t.color) ? n = {
|
|
752
|
+
"--background": "var(--toife-color-status-" + t.color + ")"
|
|
753
|
+
} : n = {
|
|
754
|
+
"--background": t.color
|
|
755
|
+
} : n = {
|
|
756
|
+
"--background": "var(--toife-color-surface)"
|
|
757
|
+
}, n;
|
|
758
|
+
}), s = { props: t, styles: e, computed: b };
|
|
759
|
+
return Object.defineProperty(s, "__isScriptSetup", { enumerable: !1, value: !0 }), s;
|
|
1013
760
|
}
|
|
1014
|
-
})
|
|
1015
|
-
|
|
761
|
+
});
|
|
762
|
+
function $t(r, o, t, e, s, n) {
|
|
763
|
+
return i(), y("div", {
|
|
764
|
+
class: p({ "toife-card": !0 }),
|
|
765
|
+
style: w(e.styles)
|
|
766
|
+
}, [
|
|
767
|
+
$(r.$slots, "default")
|
|
768
|
+
], 4);
|
|
769
|
+
}
|
|
770
|
+
const St = /* @__PURE__ */ x(xt, [["render", $t]]), wt = /* @__PURE__ */ k({
|
|
771
|
+
__name: "checkbox",
|
|
1016
772
|
props: {
|
|
1017
|
-
size: { default: "standard" },
|
|
1018
|
-
rounded: { type: Boolean, default: !1 },
|
|
1019
773
|
label: { default: "" },
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
readonly: { type: Boolean, default: !1 }
|
|
774
|
+
modelValue: { default: !1 },
|
|
775
|
+
variant: {},
|
|
776
|
+
type: { default: "check" },
|
|
777
|
+
multiple: { type: Boolean, default: !1 },
|
|
778
|
+
value: { default: void 0 },
|
|
779
|
+
color: { default: "primary" }
|
|
1027
780
|
},
|
|
1028
781
|
emits: ["update:modelValue"],
|
|
1029
|
-
setup(
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
782
|
+
setup(r, { expose: o, emit: t }) {
|
|
783
|
+
o();
|
|
784
|
+
const e = r, s = t, n = b(() => {
|
|
785
|
+
let d = {
|
|
786
|
+
"--background": e.color,
|
|
787
|
+
"--color": "#ffffff"
|
|
788
|
+
};
|
|
789
|
+
return ["warning", "info", "danger", "primary", "secondary", "success"].includes(e.color) && (d = {
|
|
790
|
+
"--background": `var(--toife-color-status-${e.color})`,
|
|
791
|
+
"--color": `var(--toife-color-status-${e.color}-text)`
|
|
792
|
+
}), d;
|
|
793
|
+
}), l = b(() => e.multiple ? e.modelValue.includes(e.value) : e.value === void 0 ? e.modelValue : e.modelValue == e.value), c = { props: e, emit: s, styles: n, isActive: l, onToggle: (d) => {
|
|
794
|
+
if (d.preventDefault(), d.stopPropagation(), e.multiple) {
|
|
795
|
+
let _ = e.modelValue;
|
|
796
|
+
e.modelValue.includes(e.value) ? _.splice(_.indexOf(e.value), 1) : _.push(e.value), s("update:modelValue", _);
|
|
797
|
+
} else e.value === void 0 ? s("update:modelValue", !e.modelValue) : s("update:modelValue", e.value);
|
|
798
|
+
}, computed: b };
|
|
799
|
+
return Object.defineProperty(c, "__isScriptSetup", { enumerable: !1, value: !0 }), c;
|
|
800
|
+
}
|
|
801
|
+
}), Pt = { key: 0 }, Tt = {
|
|
802
|
+
key: 0,
|
|
803
|
+
class: /* @__PURE__ */ p({ "toife-checkbox-label": !0 })
|
|
804
|
+
};
|
|
805
|
+
function It(r, o, t, e, s, n) {
|
|
806
|
+
return i(), y("div", {
|
|
807
|
+
class: p({ "toife-checkbox": !0, active: e.isActive }),
|
|
808
|
+
style: w(e.styles),
|
|
809
|
+
onPointerup: e.onToggle
|
|
810
|
+
}, [
|
|
811
|
+
S("div", {
|
|
812
|
+
class: p({ [`toife-checkbox-${t.type}`]: !0 })
|
|
813
|
+
}, [
|
|
814
|
+
t.type == "radio" ? (i(), y("div", Pt)) : C("", !0),
|
|
815
|
+
t.type == "check" ? $(r.$slots, "icon", { key: 1 }, () => [
|
|
816
|
+
o[0] || (o[0] = S("i", { class: "ri-check-line" }, null, -1))
|
|
817
|
+
], !0) : C("", !0)
|
|
818
|
+
], 2),
|
|
819
|
+
$(r.$slots, "label", {}, () => [
|
|
820
|
+
t.label ? (i(), y("span", Tt, V(e.props.label), 1)) : C("", !0)
|
|
821
|
+
], !0)
|
|
822
|
+
], 38);
|
|
823
|
+
}
|
|
824
|
+
const Ot = /* @__PURE__ */ x(wt, [["render", It], ["__scopeId", "data-v-6f47434a"]]), Bt = /* @__PURE__ */ k({
|
|
825
|
+
__name: "collapse",
|
|
826
|
+
props: {
|
|
827
|
+
title: {}
|
|
828
|
+
},
|
|
829
|
+
emits: ["change"],
|
|
830
|
+
setup(r, { expose: o, emit: t }) {
|
|
831
|
+
o();
|
|
832
|
+
const e = r, s = t, n = u(!1), l = u(""), a = u(), c = () => {
|
|
833
|
+
n.value = !n.value, l.value = `calc(${a.value.offsetHeight}px + 2rem)`, s("change", n.value);
|
|
1038
834
|
};
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
835
|
+
s("change", n.value);
|
|
836
|
+
const d = { props: e, emit: s, isOpen: n, height: l, content: a, onToggle: c, ref: u };
|
|
837
|
+
return Object.defineProperty(d, "__isScriptSetup", { enumerable: !1, value: !0 }), d;
|
|
838
|
+
}
|
|
839
|
+
}), Ct = {
|
|
840
|
+
class: /* @__PURE__ */ p({ "toife-collapse-title": !0 })
|
|
841
|
+
}, zt = {
|
|
842
|
+
key: 0,
|
|
843
|
+
class: "icon"
|
|
844
|
+
}, Et = {
|
|
845
|
+
key: 1,
|
|
846
|
+
class: "icon"
|
|
847
|
+
}, jt = {
|
|
848
|
+
class: /* @__PURE__ */ p({ "toife-collapse-content": !0 })
|
|
849
|
+
}, Rt = { ref: "content" };
|
|
850
|
+
function Vt(r, o, t, e, s, n) {
|
|
851
|
+
return i(), y("div", {
|
|
852
|
+
class: p({ "toife-collapse": !0, open: e.isOpen }),
|
|
853
|
+
style: w({ "--height": e.height })
|
|
854
|
+
}, [
|
|
855
|
+
S("div", {
|
|
856
|
+
class: p({ "toife-collapse-header": !0 }),
|
|
857
|
+
onPointerup: e.onToggle
|
|
1048
858
|
}, [
|
|
1049
|
-
$("
|
|
1050
|
-
|
|
1051
|
-
$("
|
|
1052
|
-
|
|
1053
|
-
$("input", {
|
|
1054
|
-
ref_key: "editable",
|
|
1055
|
-
ref: l,
|
|
1056
|
-
class: "t-input-editable",
|
|
1057
|
-
placeholder: d.placeholder,
|
|
1058
|
-
value: d.modelValue,
|
|
1059
|
-
type: d.type,
|
|
1060
|
-
onInput: n,
|
|
1061
|
-
onFocus: p,
|
|
1062
|
-
onBlur: v,
|
|
1063
|
-
readonly: d.readonly
|
|
1064
|
-
}, null, 40, wt),
|
|
1065
|
-
_(d.$slots, "end", {}, void 0, !0)
|
|
859
|
+
$(r.$slots, "icon"),
|
|
860
|
+
S("div", Ct, [
|
|
861
|
+
$(r.$slots, "title", {}, () => [
|
|
862
|
+
F(V(e.props.title), 1)
|
|
1066
863
|
])
|
|
1067
864
|
]),
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
865
|
+
$(r.$slots, "toggle", {}, () => [
|
|
866
|
+
e.isOpen ? (i(), y("div", zt, [...o[0] || (o[0] = [
|
|
867
|
+
S("i", { class: "ri-arrow-up-s-line" }, null, -1)
|
|
868
|
+
])])) : (i(), y("div", Et, [...o[1] || (o[1] = [
|
|
869
|
+
S("i", { class: "ri-arrow-down-s-line" }, null, -1)
|
|
870
|
+
])]))
|
|
871
|
+
])
|
|
872
|
+
], 32),
|
|
873
|
+
S("div", jt, [
|
|
874
|
+
S("div", Rt, [
|
|
875
|
+
$(r.$slots, "content", {}, () => [
|
|
876
|
+
$(r.$slots, "default")
|
|
877
|
+
])
|
|
878
|
+
], 512)
|
|
879
|
+
])
|
|
880
|
+
], 6);
|
|
881
|
+
}
|
|
882
|
+
const At = /* @__PURE__ */ x(Bt, [["render", Vt]]), Dt = /* @__PURE__ */ k({
|
|
883
|
+
__name: "content",
|
|
884
|
+
setup(r, { expose: o }) {
|
|
885
|
+
o();
|
|
886
|
+
const t = {};
|
|
887
|
+
return Object.defineProperty(t, "__isScriptSetup", { enumerable: !1, value: !0 }), t;
|
|
888
|
+
}
|
|
889
|
+
}), Nt = {
|
|
890
|
+
class: /* @__PURE__ */ p({ "toife-content": !0 })
|
|
891
|
+
};
|
|
892
|
+
function Xt(r, o, t, e, s, n) {
|
|
893
|
+
return i(), y("div", Nt, [
|
|
894
|
+
$(r.$slots, "default", {}, void 0, !0)
|
|
895
|
+
]);
|
|
896
|
+
}
|
|
897
|
+
const Wt = /* @__PURE__ */ x(Dt, [["render", Xt], ["__scopeId", "data-v-90d3a187"]]), qt = /* @__PURE__ */ k({
|
|
898
|
+
__name: "divider",
|
|
899
|
+
props: {
|
|
900
|
+
direction: { default: "horizontal" }
|
|
901
|
+
},
|
|
902
|
+
setup(r, { expose: o }) {
|
|
903
|
+
o();
|
|
904
|
+
const e = { props: r };
|
|
905
|
+
return Object.defineProperty(e, "__isScriptSetup", { enumerable: !1, value: !0 }), e;
|
|
1086
906
|
}
|
|
1087
|
-
})
|
|
1088
|
-
function
|
|
1089
|
-
return i(),
|
|
907
|
+
});
|
|
908
|
+
function Mt(r, o, t, e, s, n) {
|
|
909
|
+
return i(), y("div", {
|
|
910
|
+
class: p({ "toife-divider": !0, [e.props.direction]: !0 })
|
|
911
|
+
}, null, 2);
|
|
912
|
+
}
|
|
913
|
+
const Lt = /* @__PURE__ */ x(qt, [["render", Mt], ["__scopeId", "data-v-1fcdf04e"]]), Ft = /* @__PURE__ */ k({
|
|
914
|
+
__name: "flex",
|
|
915
|
+
props: {
|
|
916
|
+
gap: { default: 0 },
|
|
917
|
+
direction: { default: "row" }
|
|
918
|
+
},
|
|
919
|
+
setup(r, { expose: o }) {
|
|
920
|
+
o();
|
|
921
|
+
const t = r, e = b(() => isNaN(t.gap) ? t.gap : `var(--toife-size-${t.gap})`), s = { props: t, _gap: e, computed: b };
|
|
922
|
+
return Object.defineProperty(s, "__isScriptSetup", { enumerable: !1, value: !0 }), s;
|
|
923
|
+
}
|
|
924
|
+
});
|
|
925
|
+
function Ht(r, o, t, e, s, n) {
|
|
926
|
+
return i(), y("div", {
|
|
927
|
+
class: p({ "toife-flex": !0 }),
|
|
928
|
+
style: w({ "--gap": e._gap, "--direction": e.props.direction })
|
|
929
|
+
}, [
|
|
930
|
+
$(r.$slots, "default", {}, void 0, !0)
|
|
931
|
+
], 4);
|
|
1090
932
|
}
|
|
1091
|
-
const
|
|
1092
|
-
|
|
1093
|
-
|
|
933
|
+
const Kt = /* @__PURE__ */ x(Ft, [["render", Ht], ["__scopeId", "data-v-d6021f57"]]), Gt = /* @__PURE__ */ k({
|
|
934
|
+
__name: "gesture-indicator",
|
|
935
|
+
props: {
|
|
936
|
+
placement: { default: "bottom" }
|
|
937
|
+
},
|
|
938
|
+
setup(r, { expose: o }) {
|
|
939
|
+
o();
|
|
940
|
+
const e = { props: r };
|
|
941
|
+
return Object.defineProperty(e, "__isScriptSetup", { enumerable: !1, value: !0 }), e;
|
|
942
|
+
}
|
|
943
|
+
});
|
|
944
|
+
function Ut(r, o, t, e, s, n) {
|
|
945
|
+
return i(), y("div", {
|
|
946
|
+
class: p({ "toife-gesture-indicator": !0, [t.placement]: !0 })
|
|
947
|
+
}, null, 2);
|
|
1094
948
|
}
|
|
1095
|
-
const
|
|
1096
|
-
__name: "
|
|
949
|
+
const xe = /* @__PURE__ */ x(Gt, [["render", Ut], ["__scopeId", "data-v-65133446"]]), Jt = /* @__PURE__ */ k({
|
|
950
|
+
__name: "grid",
|
|
1097
951
|
props: {
|
|
1098
952
|
gap: { default: 0 },
|
|
1099
953
|
template: { default: "repeat(1, 1fr) / repeat(1, 1fr)" }
|
|
1100
954
|
},
|
|
1101
|
-
setup(
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
style: T({ "--gap": e.value, "--template": o.template })
|
|
1106
|
-
}, [
|
|
1107
|
-
_(s.$slots, "default", {}, void 0, !0)
|
|
1108
|
-
], 4));
|
|
955
|
+
setup(r, { expose: o }) {
|
|
956
|
+
o();
|
|
957
|
+
const t = r, e = b(() => isNaN(t.gap) ? t.gap : `var(--toife-size-${t.gap})`), s = { props: t, _gap: e, computed: b };
|
|
958
|
+
return Object.defineProperty(s, "__isScriptSetup", { enumerable: !1, value: !0 }), s;
|
|
1109
959
|
}
|
|
1110
|
-
})
|
|
1111
|
-
|
|
960
|
+
});
|
|
961
|
+
function Qt(r, o, t, e, s, n) {
|
|
962
|
+
return i(), y("div", {
|
|
963
|
+
class: p({ "toife-grid": !0 }),
|
|
964
|
+
style: w({ "--gap": e._gap, "--template": e.props.template })
|
|
965
|
+
}, [
|
|
966
|
+
$(r.$slots, "default", {}, void 0, !0)
|
|
967
|
+
], 4);
|
|
968
|
+
}
|
|
969
|
+
const Zt = /* @__PURE__ */ x(Jt, [["render", Qt], ["__scopeId", "data-v-797f9e41"]]), Yt = /* @__PURE__ */ k({
|
|
970
|
+
__name: "image",
|
|
1112
971
|
props: {
|
|
1113
|
-
|
|
972
|
+
defaultSrc: {},
|
|
973
|
+
src: {}
|
|
1114
974
|
},
|
|
1115
|
-
setup(
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
}
|
|
975
|
+
setup(r, { expose: o }) {
|
|
976
|
+
o();
|
|
977
|
+
const t = u(""), e = () => {
|
|
978
|
+
r.defaultSrc && (t.value = r.defaultSrc);
|
|
979
|
+
};
|
|
980
|
+
A(() => {
|
|
981
|
+
t.value = r.src;
|
|
982
|
+
});
|
|
983
|
+
const s = { _src: t, handleError: e, onMounted: A, ref: u };
|
|
984
|
+
return Object.defineProperty(s, "__isScriptSetup", { enumerable: !1, value: !0 }), s;
|
|
1120
985
|
}
|
|
1121
|
-
}),
|
|
1122
|
-
|
|
986
|
+
}), er = ["src"];
|
|
987
|
+
function tr(r, o, t, e, s, n) {
|
|
988
|
+
return i(), y("img", {
|
|
989
|
+
onError: e.handleError,
|
|
990
|
+
src: e._src
|
|
991
|
+
}, null, 40, er);
|
|
992
|
+
}
|
|
993
|
+
const rr = /* @__PURE__ */ x(Yt, [["render", tr], ["__scopeId", "data-v-0eed0f1f"]]), or = /* @__PURE__ */ k({
|
|
994
|
+
__name: "text",
|
|
1123
995
|
props: {
|
|
1124
|
-
color: { default: "
|
|
996
|
+
color: { default: "var(--toife-color-text)" },
|
|
997
|
+
size: { default: "standard" }
|
|
1125
998
|
},
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
const
|
|
1129
|
-
let
|
|
1130
|
-
return ["warning", "info", "danger", "primary", "secondary", "success"].includes(
|
|
1131
|
-
"--color":
|
|
999
|
+
setup(r, { expose: o }) {
|
|
1000
|
+
o();
|
|
1001
|
+
const t = r, e = b(() => {
|
|
1002
|
+
let n, l = t.color;
|
|
1003
|
+
return t.size == "standard" ? n = "var(--toife-fs-10)" : t.size == "small" ? n = "var(--toife-fs-08)" : t.size == "large" ? n = "var(--toife-fs-12)" : n = t.size, ["warning", "info", "danger", "primary", "secondary", "success"].includes(t.color) && (l = `var(--toife-color-status-${t.color})`), {
|
|
1004
|
+
"--color": l,
|
|
1005
|
+
"--font-size": n
|
|
1132
1006
|
};
|
|
1133
|
-
}),
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1007
|
+
}), s = { props: t, styles: e, computed: b };
|
|
1008
|
+
return Object.defineProperty(s, "__isScriptSetup", { enumerable: !1, value: !0 }), s;
|
|
1009
|
+
}
|
|
1010
|
+
});
|
|
1011
|
+
function nr(r, o, t, e, s, n) {
|
|
1012
|
+
return i(), y("span", {
|
|
1013
|
+
class: p({ "toife-text": !0 }),
|
|
1014
|
+
style: w(e.styles)
|
|
1015
|
+
}, [
|
|
1016
|
+
$(r.$slots, "default", {}, void 0, !0)
|
|
1017
|
+
], 4);
|
|
1018
|
+
}
|
|
1019
|
+
const $e = /* @__PURE__ */ x(or, [["render", nr], ["__scopeId", "data-v-116b375f"]]), sr = /* @__PURE__ */ k({
|
|
1020
|
+
__name: "input",
|
|
1021
|
+
props: {
|
|
1022
|
+
size: { default: "standard" },
|
|
1023
|
+
rounded: { type: Boolean, default: !1 },
|
|
1024
|
+
label: { default: "" },
|
|
1025
|
+
placeholder: { default: "" },
|
|
1026
|
+
type: { default: "text" },
|
|
1027
|
+
help: {},
|
|
1028
|
+
error: {},
|
|
1029
|
+
modelValue: { default: "" },
|
|
1030
|
+
variant: { default: "default" },
|
|
1031
|
+
readonly: { type: Boolean, default: !1 }
|
|
1032
|
+
},
|
|
1033
|
+
emits: ["update:modelValue"],
|
|
1034
|
+
setup(r, { expose: o, emit: t }) {
|
|
1035
|
+
o();
|
|
1036
|
+
const e = r, s = t, n = u(!1), l = u(null), a = b(
|
|
1037
|
+
() => !(e.modelValue === "" || e.modelValue == null)
|
|
1038
|
+
), g = { props: e, emit: s, isFocus: n, editable: l, hasValue: a, onInput: (v) => {
|
|
1039
|
+
s("update:modelValue", v.target.value);
|
|
1040
|
+
}, focus: async (v) => {
|
|
1041
|
+
n.value = !0;
|
|
1042
|
+
}, blur: () => {
|
|
1043
|
+
n.value = !1;
|
|
1044
|
+
}, ref: u, computed: b, get Text() {
|
|
1045
|
+
return $e;
|
|
1046
|
+
} };
|
|
1047
|
+
return Object.defineProperty(g, "__isScriptSetup", { enumerable: !1, value: !0 }), g;
|
|
1048
|
+
}
|
|
1049
|
+
}), ar = {
|
|
1050
|
+
class: /* @__PURE__ */ p({ "toife-input-label": !0 })
|
|
1051
|
+
}, lr = {
|
|
1052
|
+
class: /* @__PURE__ */ p({ "toife-input-content": !0 })
|
|
1053
|
+
}, cr = ["placeholder", "value", "type", "readonly"];
|
|
1054
|
+
function ir(r, o, t, e, s, n) {
|
|
1055
|
+
return i(), y("div", {
|
|
1056
|
+
class: p({
|
|
1057
|
+
"toife-input": !0,
|
|
1058
|
+
rounded: t.rounded,
|
|
1059
|
+
["size-" + t.size]: !0,
|
|
1060
|
+
["variant-" + t.variant]: !0,
|
|
1061
|
+
focus: e.isFocus,
|
|
1062
|
+
"has-value": e.hasValue,
|
|
1063
|
+
readonly: t.readonly
|
|
1064
|
+
})
|
|
1065
|
+
}, [
|
|
1066
|
+
S("label", null, [
|
|
1067
|
+
S("span", ar, V(t.label), 1),
|
|
1068
|
+
S("div", lr, [
|
|
1069
|
+
$(r.$slots, "start", {}, void 0, !0),
|
|
1070
|
+
S("input", {
|
|
1071
|
+
ref: "editable",
|
|
1072
|
+
class: p({ "toife-input-editable": !0 }),
|
|
1073
|
+
placeholder: t.placeholder,
|
|
1074
|
+
value: t.modelValue,
|
|
1075
|
+
type: t.type,
|
|
1076
|
+
onInput: e.onInput,
|
|
1077
|
+
onFocus: e.focus,
|
|
1078
|
+
onBlur: e.blur,
|
|
1079
|
+
readonly: t.readonly
|
|
1080
|
+
}, null, 40, cr),
|
|
1081
|
+
$(r.$slots, "end", {}, void 0, !0)
|
|
1082
|
+
])
|
|
1083
|
+
]),
|
|
1084
|
+
t.error ? (i(), j(e.Text, {
|
|
1085
|
+
key: 0,
|
|
1086
|
+
color: "danger"
|
|
1087
|
+
}, {
|
|
1088
|
+
default: D(() => [
|
|
1089
|
+
F(V(t.error), 1)
|
|
1090
|
+
]),
|
|
1091
|
+
_: 1
|
|
1092
|
+
})) : t.help ? (i(), j(e.Text, {
|
|
1093
|
+
key: 1,
|
|
1094
|
+
color: "secondary"
|
|
1095
|
+
}, {
|
|
1096
|
+
default: D(() => [
|
|
1097
|
+
F(V(t.help), 1)
|
|
1098
|
+
]),
|
|
1099
|
+
_: 1
|
|
1100
|
+
})) : C("", !0)
|
|
1101
|
+
], 2);
|
|
1102
|
+
}
|
|
1103
|
+
const ur = /* @__PURE__ */ x(sr, [["render", ir], ["__scopeId", "data-v-f7768bea"]]), dr = /* @__PURE__ */ k({
|
|
1104
|
+
__name: "loading",
|
|
1105
|
+
props: {
|
|
1106
|
+
type: { default: "spinner" }
|
|
1107
|
+
},
|
|
1108
|
+
emits: ["dismiss"],
|
|
1109
|
+
setup(r, { expose: o, emit: t }) {
|
|
1110
|
+
const e = r, s = u(!1), n = t;
|
|
1111
|
+
let l;
|
|
1112
|
+
const a = () => {
|
|
1113
|
+
s.value = !0;
|
|
1114
|
+
}, c = () => {
|
|
1115
|
+
s.value = !1;
|
|
1116
|
+
};
|
|
1117
|
+
o({
|
|
1118
|
+
open: a,
|
|
1119
|
+
close: c
|
|
1137
1120
|
});
|
|
1138
|
-
const
|
|
1139
|
-
|
|
1140
|
-
|
|
1121
|
+
const d = { props: e, visible: s, emit: n, get ges() {
|
|
1122
|
+
return l;
|
|
1123
|
+
}, set ges(_) {
|
|
1124
|
+
l = _;
|
|
1125
|
+
}, open: a, close: c, get Present() {
|
|
1126
|
+
return K;
|
|
1127
|
+
}, get IconSpinner() {
|
|
1128
|
+
return ue;
|
|
1129
|
+
}, ref: u };
|
|
1130
|
+
return Object.defineProperty(d, "__isScriptSetup", { enumerable: !1, value: !0 }), d;
|
|
1131
|
+
}
|
|
1132
|
+
}), pr = {
|
|
1133
|
+
class: /* @__PURE__ */ p({ "toife-loading": !0 })
|
|
1134
|
+
};
|
|
1135
|
+
function fr(r, o, t, e, s, n) {
|
|
1136
|
+
return i(), j(e.Present, {
|
|
1137
|
+
placement: "center",
|
|
1138
|
+
backdrop: !0,
|
|
1139
|
+
keepalive: !1,
|
|
1140
|
+
visible: e.visible
|
|
1141
|
+
}, {
|
|
1142
|
+
default: D(() => [
|
|
1143
|
+
S("div", pr, [
|
|
1144
|
+
$(r.$slots, "default", {}, () => [
|
|
1145
|
+
t.type === "spinner" ? (i(), j(e.IconSpinner, { key: 0 })) : C("", !0)
|
|
1146
|
+
], !0)
|
|
1147
|
+
])
|
|
1148
|
+
]),
|
|
1149
|
+
_: 3
|
|
1150
|
+
}, 8, ["visible"]);
|
|
1151
|
+
}
|
|
1152
|
+
const Se = /* @__PURE__ */ x(dr, [["render", fr], ["__scopeId", "data-v-188d5e1b"]]), oo = (r = {}, o) => {
|
|
1153
|
+
const t = u(), e = document.body.querySelector(".toife-app");
|
|
1154
|
+
let s = null, n = null;
|
|
1155
|
+
return {
|
|
1156
|
+
open() {
|
|
1157
|
+
return new Promise((l) => {
|
|
1158
|
+
e && (n = document.createElement("div"), e.appendChild(n), s = re({
|
|
1159
|
+
render() {
|
|
1160
|
+
return oe(o || Se, {
|
|
1161
|
+
...r,
|
|
1162
|
+
ref: t
|
|
1163
|
+
});
|
|
1164
|
+
}
|
|
1165
|
+
}), s.mount(n), setTimeout(() => {
|
|
1166
|
+
t.value?.open?.(), l(!0);
|
|
1167
|
+
}, 50));
|
|
1168
|
+
});
|
|
1169
|
+
},
|
|
1170
|
+
close() {
|
|
1171
|
+
return new Promise((l) => {
|
|
1172
|
+
t.value?.close?.(), setTimeout(() => {
|
|
1173
|
+
s?.unmount?.(), n?.remove?.(), l(!0);
|
|
1174
|
+
}, 300);
|
|
1175
|
+
});
|
|
1176
|
+
}
|
|
1177
|
+
};
|
|
1178
|
+
}, mr = /* @__PURE__ */ k({
|
|
1179
|
+
__name: "refresher",
|
|
1180
|
+
props: {
|
|
1181
|
+
threshold: { default: 120 },
|
|
1182
|
+
safe: { type: Boolean, default: !1 },
|
|
1183
|
+
variant: { default: "max" }
|
|
1184
|
+
},
|
|
1185
|
+
emits: ["refresh", "move", "cancel", "start"],
|
|
1186
|
+
setup(r, { expose: o, emit: t }) {
|
|
1187
|
+
o();
|
|
1188
|
+
const e = t, s = r, n = u(0), l = u(!1), a = u();
|
|
1189
|
+
let c, d = !1;
|
|
1190
|
+
const _ = () => {
|
|
1191
|
+
l.value = !1, n.value = 0, d = !1;
|
|
1192
|
+
}, g = () => {
|
|
1193
|
+
d = !0, l.value = !0, n.value = s.threshold, e("refresh", _);
|
|
1194
|
+
}, v = () => {
|
|
1195
|
+
n.value = 0, l.value = !1, d = !1, e("cancel");
|
|
1141
1196
|
};
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1197
|
+
z(() => a.value, () => {
|
|
1198
|
+
c && c.destroy();
|
|
1199
|
+
let h = a.value.closest(".toife-content");
|
|
1200
|
+
h && (c = L(h, {
|
|
1201
|
+
options: {
|
|
1202
|
+
minMove: 20
|
|
1203
|
+
},
|
|
1204
|
+
beforeEvent() {
|
|
1205
|
+
return !(h.scrollTop > 0);
|
|
1206
|
+
},
|
|
1207
|
+
down() {
|
|
1208
|
+
l.value || d || e("start");
|
|
1209
|
+
},
|
|
1210
|
+
move({ deltaY: f, initialDirection: I }) {
|
|
1211
|
+
if (l.value || d || I != "down") return;
|
|
1212
|
+
if (s.variant == "max" && f >= s.threshold) {
|
|
1213
|
+
g();
|
|
1214
|
+
return;
|
|
1215
|
+
}
|
|
1216
|
+
const P = f < 0 ? 0 : f;
|
|
1217
|
+
n.value = P, e("move", P);
|
|
1218
|
+
},
|
|
1219
|
+
up({ deltaY: f, initialDirection: I }) {
|
|
1220
|
+
l.value || d || I != "down" || (s.variant == "up" && f >= s.threshold ? g() : v());
|
|
1221
|
+
},
|
|
1222
|
+
cancel() {
|
|
1223
|
+
l.value || d || v();
|
|
1224
|
+
}
|
|
1225
|
+
}, {
|
|
1226
|
+
passive: !1
|
|
1227
|
+
}));
|
|
1228
|
+
}), M(() => {
|
|
1229
|
+
c && c.destroy();
|
|
1230
|
+
});
|
|
1231
|
+
const m = { emit: e, props: s, offset: n, refreshing: l, container: a, get cleanup() {
|
|
1232
|
+
return c;
|
|
1233
|
+
}, set cleanup(h) {
|
|
1234
|
+
c = h;
|
|
1235
|
+
}, get locked() {
|
|
1236
|
+
return d;
|
|
1237
|
+
}, set locked(h) {
|
|
1238
|
+
d = h;
|
|
1239
|
+
}, close: _, start: g, cancel: v, ref: u, onUnmounted: M, watch: z, get gesture() {
|
|
1240
|
+
return L;
|
|
1241
|
+
} };
|
|
1242
|
+
return Object.defineProperty(m, "__isScriptSetup", { enumerable: !1, value: !0 }), m;
|
|
1243
|
+
}
|
|
1244
|
+
});
|
|
1245
|
+
function _r(r, o, t, e, s, n) {
|
|
1246
|
+
return G((i(), y("div", {
|
|
1247
|
+
class: p({ "toife-refresher": !0, safe: t.safe }),
|
|
1248
|
+
ref: "container"
|
|
1249
|
+
}, [
|
|
1250
|
+
$(r.$slots, "default", {
|
|
1251
|
+
offset: e.offset,
|
|
1252
|
+
refreshing: e.refreshing
|
|
1253
|
+
}, void 0, !0)
|
|
1254
|
+
], 2)), [
|
|
1255
|
+
[U, e.offset > 0]
|
|
1256
|
+
]);
|
|
1257
|
+
}
|
|
1258
|
+
const vr = /* @__PURE__ */ x(mr, [["render", _r], ["__scopeId", "data-v-69af4f52"]]), yr = /* @__PURE__ */ k({
|
|
1259
|
+
__name: "richtext",
|
|
1260
|
+
setup(r, { expose: o }) {
|
|
1261
|
+
o();
|
|
1262
|
+
const t = {};
|
|
1263
|
+
return Object.defineProperty(t, "__isScriptSetup", { enumerable: !1, value: !0 }), t;
|
|
1156
1264
|
}
|
|
1157
|
-
})
|
|
1158
|
-
|
|
1265
|
+
});
|
|
1266
|
+
function br(r, o, t, e, s, n) {
|
|
1267
|
+
return i(), y("div");
|
|
1268
|
+
}
|
|
1269
|
+
const gr = /* @__PURE__ */ x(yr, [["render", br], ["__scopeId", "data-v-90f4e19d"]]), hr = /* @__PURE__ */ k({
|
|
1270
|
+
__name: "ripple",
|
|
1159
1271
|
props: {
|
|
1160
|
-
|
|
1161
|
-
size: { default: "standard" }
|
|
1272
|
+
color: { default: "primary" }
|
|
1162
1273
|
},
|
|
1163
|
-
setup(
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1274
|
+
setup(r, { expose: o }) {
|
|
1275
|
+
o();
|
|
1276
|
+
const t = r, e = b(() => {
|
|
1277
|
+
let n = {};
|
|
1278
|
+
return t.color ? ["warning", "info", "danger", "primary", "secondary", "success"].includes(t.color) ? n = {
|
|
1279
|
+
"--color": "var(--toife-color-status-" + t.color + ")"
|
|
1280
|
+
} : n = {
|
|
1281
|
+
"--color": t.color
|
|
1282
|
+
} : n = {
|
|
1283
|
+
"--color": "var(--toife-color-surface)"
|
|
1284
|
+
}, n;
|
|
1285
|
+
}), s = { props: t, styles: e, computed: b };
|
|
1286
|
+
return Object.defineProperty(s, "__isScriptSetup", { enumerable: !1, value: !0 }), s;
|
|
1171
1287
|
}
|
|
1172
|
-
})
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
}
|
|
1179
|
-
|
|
1288
|
+
});
|
|
1289
|
+
function kr(r, o, t, e, s, n) {
|
|
1290
|
+
return i(), y("div", {
|
|
1291
|
+
class: p({ "toife-ripple": !0 }),
|
|
1292
|
+
style: w(e.styles)
|
|
1293
|
+
}, null, 4);
|
|
1294
|
+
}
|
|
1295
|
+
const xr = /* @__PURE__ */ x(hr, [["render", kr], ["__scopeId", "data-v-2f24c046"]]), $r = /* @__PURE__ */ k({
|
|
1296
|
+
__name: "sheet",
|
|
1180
1297
|
props: {
|
|
1181
|
-
|
|
1298
|
+
background: { default: "var(--toife-color-surface)" },
|
|
1299
|
+
class: {},
|
|
1300
|
+
visible: { type: Boolean, default: !1 },
|
|
1301
|
+
gesture: { type: Boolean, default: !0 },
|
|
1302
|
+
fullscreen: { type: Boolean, default: !1 },
|
|
1303
|
+
placement: { default: "bottom" },
|
|
1304
|
+
keepalive: { type: Boolean, default: !0 },
|
|
1305
|
+
backdrop: { type: Boolean, default: !0 },
|
|
1306
|
+
rounded: { type: Boolean, default: !1 },
|
|
1307
|
+
indicator: { type: Boolean, default: !0 },
|
|
1308
|
+
duration: { default: 200 },
|
|
1309
|
+
bounce: {},
|
|
1310
|
+
style: {}
|
|
1182
1311
|
},
|
|
1183
|
-
emits: ["
|
|
1184
|
-
setup(
|
|
1185
|
-
|
|
1186
|
-
|
|
1312
|
+
emits: ["dismiss"],
|
|
1313
|
+
setup(r, { expose: o, emit: t }) {
|
|
1314
|
+
o();
|
|
1315
|
+
const e = r, s = t, n = u(), l = u(), a = u(!1);
|
|
1316
|
+
let c = null;
|
|
1317
|
+
const d = b(() => {
|
|
1318
|
+
if (e.placement == "bottom") return "down";
|
|
1319
|
+
if (e.placement == "top") return "up";
|
|
1320
|
+
if (e.placement == "left") return "left";
|
|
1321
|
+
if (e.placement == "right") return "right";
|
|
1322
|
+
}), _ = (m) => {
|
|
1323
|
+
s("dismiss", m);
|
|
1324
|
+
}, g = () => {
|
|
1325
|
+
a.value = !0, setTimeout(() => {
|
|
1326
|
+
a.value = !1;
|
|
1327
|
+
}, 300);
|
|
1187
1328
|
};
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1329
|
+
z(() => n.value, (m) => {
|
|
1330
|
+
m && (c = L(n.value, {
|
|
1331
|
+
isMoving: !1,
|
|
1332
|
+
options: {
|
|
1333
|
+
minDist: 30
|
|
1334
|
+
},
|
|
1335
|
+
beforeEvent(h) {
|
|
1336
|
+
return !(a.value || !e.gesture || e.placement == "center");
|
|
1337
|
+
},
|
|
1338
|
+
down() {
|
|
1339
|
+
this.isMoving = !1;
|
|
1340
|
+
},
|
|
1341
|
+
fast({ initialDirection: h }) {
|
|
1342
|
+
g(), h == d.value ? s("dismiss", "gesture") : l.value.open();
|
|
1343
|
+
},
|
|
1344
|
+
move({ deltaY: h, deltaX: f, initialDirection: I }) {
|
|
1345
|
+
if (I != d.value) return;
|
|
1346
|
+
let P = 0;
|
|
1347
|
+
e.placement == "bottom" || e.placement == "top" ? P = h : P = f, e.placement == "bottom" && (P = h > 0 ? h : 0), e.placement == "top" && (P = h < 0 ? h : 0), e.placement == "left" && (P = f < 0 ? f : 0), e.placement == "right" && (P = f > 0 ? f : 0), (e.placement == "bottom" && (P >= 10 || this.isMoving) || e.placement == "top" && (P <= -10 || this.isMoving) || e.placement == "left" && (P <= -10 || this.isMoving) || e.placement == "right" && (P >= 10 || this.isMoving)) && (this.isMoving = !0, l.value.render({
|
|
1348
|
+
contentTransform: P + "px",
|
|
1349
|
+
transition: "0s"
|
|
1350
|
+
}));
|
|
1351
|
+
},
|
|
1352
|
+
up({ deltaY: h, deltaX: f, initialDirection: I }) {
|
|
1353
|
+
if (this.isMoving = !1, g(), I != d.value) {
|
|
1354
|
+
l.value.open();
|
|
1355
|
+
return;
|
|
1356
|
+
}
|
|
1357
|
+
let P, T, W;
|
|
1358
|
+
e.placement == "bottom" || e.placement == "top" ? (P = n.value.offsetHeight, W = h) : (P = n.value.offsetWidth, W = f), T = W / P * 100, T > 50 ? s("dismiss", "gesture") : l.value.open();
|
|
1359
|
+
},
|
|
1360
|
+
cancel() {
|
|
1361
|
+
this.isMoving = !1, g(), l.value.open();
|
|
1362
|
+
}
|
|
1363
|
+
}));
|
|
1364
|
+
}), M(() => {
|
|
1365
|
+
c && c.destroy();
|
|
1366
|
+
});
|
|
1367
|
+
const v = { props: e, emit: s, sheet: n, present: l, isBusy: a, get ges() {
|
|
1368
|
+
return c;
|
|
1369
|
+
}, set ges(m) {
|
|
1370
|
+
c = m;
|
|
1371
|
+
}, gestureDir: d, close: _, busy: g, computed: b, onUnmounted: M, ref: u, watch: z, get toifeGesture() {
|
|
1372
|
+
return L;
|
|
1373
|
+
}, get Present() {
|
|
1374
|
+
return K;
|
|
1375
|
+
}, get GestureIndicator() {
|
|
1376
|
+
return xe;
|
|
1377
|
+
} };
|
|
1378
|
+
return Object.defineProperty(v, "__isScriptSetup", { enumerable: !1, value: !0 }), v;
|
|
1379
|
+
}
|
|
1380
|
+
});
|
|
1381
|
+
function Sr(r, o, t, e, s, n) {
|
|
1382
|
+
return i(), j(e.Present, {
|
|
1383
|
+
ref: "present",
|
|
1384
|
+
duration: t.duration,
|
|
1385
|
+
bounce: t.bounce,
|
|
1386
|
+
class: p(t.class),
|
|
1387
|
+
placement: t.placement,
|
|
1388
|
+
backdrop: t.backdrop,
|
|
1389
|
+
visible: t.visible,
|
|
1390
|
+
keepalive: t.keepalive,
|
|
1391
|
+
onDismiss: e.close,
|
|
1392
|
+
style: w(t.style)
|
|
1393
|
+
}, {
|
|
1394
|
+
default: D(() => [
|
|
1395
|
+
t.gesture && t.indicator && t.placement != "center" ? (i(), j(e.GestureIndicator, {
|
|
1396
|
+
key: 0,
|
|
1397
|
+
placement: t.placement
|
|
1398
|
+
}, null, 8, ["placement"])) : C("", !0),
|
|
1399
|
+
S("div", {
|
|
1400
|
+
ref: "sheet",
|
|
1401
|
+
class: p({ "toife-sheet": !0, fullscreen: t.fullscreen, [t.placement]: !0, rounded: t.rounded }),
|
|
1402
|
+
style: w({ "--background": t.background })
|
|
1195
1403
|
}, [
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
], 512)
|
|
1219
|
-
])
|
|
1220
|
-
], 6));
|
|
1404
|
+
$(r.$slots, "default", {}, void 0, !0)
|
|
1405
|
+
], 6)
|
|
1406
|
+
]),
|
|
1407
|
+
_: 3
|
|
1408
|
+
}, 8, ["duration", "bounce", "class", "placement", "backdrop", "visible", "keepalive", "style"]);
|
|
1409
|
+
}
|
|
1410
|
+
const wr = /* @__PURE__ */ x($r, [["render", Sr], ["__scopeId", "data-v-0d1848cc"]]), Pr = /* @__PURE__ */ k({
|
|
1411
|
+
__name: "skeleton",
|
|
1412
|
+
props: {
|
|
1413
|
+
width: { default: "100%" },
|
|
1414
|
+
height: { default: "1rem" },
|
|
1415
|
+
radius: { default: "8px" },
|
|
1416
|
+
color: { default: null }
|
|
1417
|
+
},
|
|
1418
|
+
setup(r, { expose: o }) {
|
|
1419
|
+
o();
|
|
1420
|
+
const t = r, e = b(() => ({
|
|
1421
|
+
"--width": t.width,
|
|
1422
|
+
"--height": t.height,
|
|
1423
|
+
"--radius": t.radius
|
|
1424
|
+
})), s = { props: t, styles: e, computed: b };
|
|
1425
|
+
return Object.defineProperty(s, "__isScriptSetup", { enumerable: !1, value: !0 }), s;
|
|
1221
1426
|
}
|
|
1222
|
-
})
|
|
1223
|
-
|
|
1427
|
+
});
|
|
1428
|
+
function Tr(r, o, t, e, s, n) {
|
|
1429
|
+
return i(), y("div", {
|
|
1430
|
+
class: p({ "toife-skeleton": !0 }),
|
|
1431
|
+
style: w(e.styles)
|
|
1432
|
+
}, null, 4);
|
|
1433
|
+
}
|
|
1434
|
+
const Ir = /* @__PURE__ */ x(Pr, [["render", Tr], ["__scopeId", "data-v-08e291f4"]]), Or = /* @__PURE__ */ k({
|
|
1435
|
+
__name: "switch",
|
|
1224
1436
|
props: {
|
|
1225
1437
|
modelValue: { type: Boolean },
|
|
1226
1438
|
color: { default: "primary" }
|
|
1227
1439
|
},
|
|
1228
1440
|
emits: ["update:modelValue"],
|
|
1229
|
-
setup(
|
|
1230
|
-
|
|
1441
|
+
setup(r, { expose: o, emit: t }) {
|
|
1442
|
+
o();
|
|
1443
|
+
const e = r, s = t, n = () => {
|
|
1231
1444
|
s("update:modelValue", !e.modelValue);
|
|
1232
|
-
}, l =
|
|
1233
|
-
let
|
|
1445
|
+
}, l = b(() => {
|
|
1446
|
+
let c = {
|
|
1234
1447
|
"--background": e.color,
|
|
1235
1448
|
"--color": "#ffffff"
|
|
1236
1449
|
};
|
|
1237
|
-
return ["warning", "info", "danger", "primary", "secondary", "success"].includes(e.color) && (
|
|
1238
|
-
"--background": `var(--
|
|
1239
|
-
"--color": `var(--
|
|
1240
|
-
}),
|
|
1241
|
-
});
|
|
1242
|
-
return (
|
|
1243
|
-
class: B(["t-switch", { on: e.modelValue }]),
|
|
1244
|
-
style: T(l.value),
|
|
1245
|
-
onPointerup: r
|
|
1246
|
-
}, [...n[0] || (n[0] = [
|
|
1247
|
-
$("div", { class: "t-switch-icon" }, null, -1)
|
|
1248
|
-
])], 38));
|
|
1450
|
+
return ["warning", "info", "danger", "primary", "secondary", "success"].includes(e.color) && (c = {
|
|
1451
|
+
"--background": `var(--toife-color-status-${e.color})`,
|
|
1452
|
+
"--color": `var(--toife-color-status-${e.color}-text)`
|
|
1453
|
+
}), c;
|
|
1454
|
+
}), a = { props: e, emit: s, onSwitch: n, styles: l, computed: b };
|
|
1455
|
+
return Object.defineProperty(a, "__isScriptSetup", { enumerable: !1, value: !0 }), a;
|
|
1249
1456
|
}
|
|
1250
|
-
})
|
|
1251
|
-
|
|
1457
|
+
});
|
|
1458
|
+
function Br(r, o, t, e, s, n) {
|
|
1459
|
+
return i(), y("div", {
|
|
1460
|
+
class: p({ "toife-switch": !0, on: e.props.modelValue }),
|
|
1461
|
+
style: w(e.styles),
|
|
1462
|
+
onPointerup: e.onSwitch
|
|
1463
|
+
}, [...o[0] || (o[0] = [
|
|
1464
|
+
S("div", {
|
|
1465
|
+
class: p({ "toife-switch-icon": !0 })
|
|
1466
|
+
}, null, -1)
|
|
1467
|
+
])], 38);
|
|
1468
|
+
}
|
|
1469
|
+
const Cr = /* @__PURE__ */ x(Or, [["render", Br], ["__scopeId", "data-v-b571ee39"]]), zr = /* @__PURE__ */ k({
|
|
1470
|
+
__name: "tab",
|
|
1252
1471
|
props: {
|
|
1253
1472
|
value: {},
|
|
1254
1473
|
disabled: { type: Boolean, default: !1 }
|
|
1255
1474
|
},
|
|
1256
|
-
setup(
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
}
|
|
1263
|
-
|
|
1264
|
-
variant: "text",
|
|
1265
|
-
onPointerup: r,
|
|
1266
|
-
size: O(e).size,
|
|
1267
|
-
color: s.value ? O(e).color.text : void 0
|
|
1268
|
-
}, {
|
|
1269
|
-
default: N(() => [
|
|
1270
|
-
_(l.$slots, "default", {}, void 0, !0)
|
|
1271
|
-
]),
|
|
1272
|
-
_: 3
|
|
1273
|
-
}, 8, ["size", "color"])
|
|
1274
|
-
], 2));
|
|
1475
|
+
setup(r, { expose: o }) {
|
|
1476
|
+
o();
|
|
1477
|
+
const t = r, e = Z("tabsState"), s = b(() => e.activeValue.value === t.value), l = { props: t, tabs: e, isActive: s, handleClick: () => {
|
|
1478
|
+
t.disabled || e.setValue(t.value);
|
|
1479
|
+
}, inject: Z, computed: b, get CustomButton() {
|
|
1480
|
+
return ne;
|
|
1481
|
+
} };
|
|
1482
|
+
return Object.defineProperty(l, "__isScriptSetup", { enumerable: !1, value: !0 }), l;
|
|
1275
1483
|
}
|
|
1276
|
-
})
|
|
1277
|
-
|
|
1484
|
+
});
|
|
1485
|
+
function Er(r, o, t, e, s, n) {
|
|
1486
|
+
return i(), y("li", {
|
|
1487
|
+
class: p({ "toife-tab": !0, active: e.isActive })
|
|
1488
|
+
}, [
|
|
1489
|
+
ye(e.CustomButton, {
|
|
1490
|
+
variant: "text",
|
|
1491
|
+
onPointerup: e.handleClick,
|
|
1492
|
+
size: e.tabs.size,
|
|
1493
|
+
color: e.isActive ? e.tabs.color.text : void 0
|
|
1494
|
+
}, {
|
|
1495
|
+
default: D(() => [
|
|
1496
|
+
$(r.$slots, "default", {}, void 0, !0)
|
|
1497
|
+
]),
|
|
1498
|
+
_: 3
|
|
1499
|
+
}, 8, ["size", "color"])
|
|
1500
|
+
], 2);
|
|
1501
|
+
}
|
|
1502
|
+
const jr = /* @__PURE__ */ x(zr, [["render", Er], ["__scopeId", "data-v-4dd31330"]]), Rr = /* @__PURE__ */ k({
|
|
1503
|
+
__name: "tabs",
|
|
1278
1504
|
props: {
|
|
1279
1505
|
placement: { default: "top-start" },
|
|
1280
1506
|
variant: { default: "border-under" },
|
|
@@ -1286,216 +1512,325 @@ const Ct = /* @__PURE__ */ g(Pt, [["render", Vt]]), Rt = /* @__PURE__ */ h({
|
|
|
1286
1512
|
radius: { default: 4 }
|
|
1287
1513
|
},
|
|
1288
1514
|
emits: ["update:modelValue"],
|
|
1289
|
-
setup(
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
|
|
1515
|
+
setup(r, { expose: o, emit: t }) {
|
|
1516
|
+
o();
|
|
1517
|
+
const e = r, s = t, n = u("0px"), l = u(0), a = u(0), c = u(), d = b(() => {
|
|
1518
|
+
let m = "", h = "";
|
|
1519
|
+
return e.variant == "text" && (m = "transparent", ["warning", "info", "danger", "primary", "secondary", "success"].includes(e.color) ? h = `var(--toife-color-status-${e.color})` : h = e.color), e.variant == "border-under" && (h = "currentColor", ["warning", "info", "danger", "primary", "secondary", "success"].includes(e.color) ? m = `var(--toife-color-status-${e.color})` : m = e.color), e.variant == "tag" && (["warning", "info", "danger", "primary", "secondary", "success"].includes(e.color) ? (m = `var(--toife-color-status-${e.color})`, h = `var(--toife-color-status-${e.color}-text)`) : (m = e.color, h = "currentColor")), { background: m, text: h };
|
|
1520
|
+
}), _ = b(() => e.variant == "border-under" ? {
|
|
1521
|
+
"--transform": n.value,
|
|
1295
1522
|
"--border": e.border + "px"
|
|
1296
1523
|
} : e.variant == "tag" ? {
|
|
1297
1524
|
"--top": e.margin[0] + "px",
|
|
1298
|
-
"--height":
|
|
1525
|
+
"--height": a.value - e.margin[0] * 2 + "px",
|
|
1299
1526
|
"--left": e.margin[1] + "px",
|
|
1300
1527
|
"--width": l.value - e.margin[1] * 2 + "px",
|
|
1301
|
-
"--transform":
|
|
1528
|
+
"--transform": n.value,
|
|
1302
1529
|
"--radius": e.radius + "px"
|
|
1303
|
-
} : {}),
|
|
1530
|
+
} : {}), g = () => {
|
|
1304
1531
|
if (e.variant == "border-under") {
|
|
1305
|
-
let
|
|
1306
|
-
if (
|
|
1532
|
+
let m = c.value.querySelector(".active");
|
|
1533
|
+
if (m) {
|
|
1307
1534
|
if (e.placement.startsWith("top-") || e.placement.startsWith("bottom-")) {
|
|
1308
|
-
let
|
|
1309
|
-
|
|
1535
|
+
let h = m.getBoundingClientRect().left - c.value.getBoundingClientRect().left + c.value.scrollLeft, f = m.offsetWidth / 2;
|
|
1536
|
+
n.value = h + f - e.border / 2 + "px";
|
|
1310
1537
|
} else if (e.placement.startsWith("left-") || e.placement.startsWith("right-")) {
|
|
1311
|
-
let
|
|
1312
|
-
|
|
1538
|
+
let h = m.getBoundingClientRect().top - c.value.getBoundingClientRect().top + c.value.scrollTop, f = m.offsetHeight / 2;
|
|
1539
|
+
n.value = h + f - e.border / 2 + "px";
|
|
1313
1540
|
}
|
|
1314
1541
|
}
|
|
1315
1542
|
}
|
|
1316
1543
|
if (e.variant == "tag") {
|
|
1317
|
-
let
|
|
1318
|
-
if (
|
|
1319
|
-
let
|
|
1544
|
+
let m = c.value.querySelector(".active");
|
|
1545
|
+
if (m) {
|
|
1546
|
+
let h = m.offsetWidth, f = m.offsetHeight;
|
|
1320
1547
|
if (e.placement.startsWith("top-") || e.placement.startsWith("bottom-")) {
|
|
1321
|
-
let
|
|
1322
|
-
|
|
1548
|
+
let I = m.getBoundingClientRect().left - c.value.getBoundingClientRect().left + c.value.scrollLeft;
|
|
1549
|
+
n.value = I + "px";
|
|
1323
1550
|
} else if (e.placement.startsWith("left-") || e.placement.startsWith("right-")) {
|
|
1324
|
-
let
|
|
1325
|
-
|
|
1551
|
+
let I = m.getBoundingClientRect().top - c.value.getBoundingClientRect().top + c.value.scrollTop;
|
|
1552
|
+
n.value = I + "px";
|
|
1326
1553
|
}
|
|
1327
|
-
l.value =
|
|
1554
|
+
l.value = h, a.value = f;
|
|
1328
1555
|
}
|
|
1329
1556
|
}
|
|
1330
1557
|
};
|
|
1331
|
-
|
|
1332
|
-
activeValue:
|
|
1333
|
-
color:
|
|
1558
|
+
Q("tabsState", {
|
|
1559
|
+
activeValue: b(() => e.modelValue),
|
|
1560
|
+
color: d.value,
|
|
1334
1561
|
size: e.size,
|
|
1335
1562
|
variant: e.variant,
|
|
1336
|
-
setValue: (
|
|
1337
|
-
s("update:modelValue",
|
|
1563
|
+
setValue: (m) => {
|
|
1564
|
+
s("update:modelValue", m);
|
|
1338
1565
|
}
|
|
1339
|
-
}),
|
|
1340
|
-
await
|
|
1341
|
-
}),
|
|
1342
|
-
await
|
|
1343
|
-
})
|
|
1344
|
-
|
|
1345
|
-
|
|
1346
|
-
class: B(["t-tabs", { [a.placement]: !0, [`variant-${a.variant}`]: !0 }]),
|
|
1347
|
-
style: T([{ "--background": p.value.background, "--color": p.value.text }, v.value])
|
|
1348
|
-
}, [
|
|
1349
|
-
_(a.$slots, "default", {}, void 0, !0)
|
|
1350
|
-
], 6));
|
|
1351
|
-
}
|
|
1352
|
-
}), Zt = /* @__PURE__ */ g(Qt, [["__scopeId", "data-v-b512ed8e"]]), Yt = { key: 0 }, eo = {
|
|
1353
|
-
key: 0,
|
|
1354
|
-
class: "t-checkbox-label"
|
|
1355
|
-
}, to = /* @__PURE__ */ h({
|
|
1356
|
-
__name: "t-checkbox",
|
|
1357
|
-
props: {
|
|
1358
|
-
label: { default: "" },
|
|
1359
|
-
modelValue: { default: !1 },
|
|
1360
|
-
variant: {},
|
|
1361
|
-
type: { default: "check" },
|
|
1362
|
-
multiple: { type: Boolean, default: !1 },
|
|
1363
|
-
value: { default: void 0 },
|
|
1364
|
-
color: { default: "primary" }
|
|
1365
|
-
},
|
|
1366
|
-
emits: ["update:modelValue"],
|
|
1367
|
-
setup(t, { emit: o }) {
|
|
1368
|
-
const e = t, s = o, r = x(() => {
|
|
1369
|
-
let n = {
|
|
1370
|
-
"--background": e.color,
|
|
1371
|
-
"--color": "#ffffff"
|
|
1372
|
-
};
|
|
1373
|
-
return ["warning", "info", "danger", "primary", "secondary", "success"].includes(e.color) && (n = {
|
|
1374
|
-
"--background": `var(--t-color-status-${e.color})`,
|
|
1375
|
-
"--color": `var(--t-color-status-${e.color}-text)`
|
|
1376
|
-
}), n;
|
|
1377
|
-
}), l = x(() => e.multiple ? e.modelValue.includes(e.value) : e.value === void 0 ? e.modelValue : e.modelValue == e.value), u = (n) => {
|
|
1378
|
-
if (n.preventDefault(), n.stopPropagation(), e.multiple) {
|
|
1379
|
-
let p = e.modelValue;
|
|
1380
|
-
e.modelValue.includes(e.value) ? p.splice(p.indexOf(e.value), 1) : p.push(e.value), s("update:modelValue", p);
|
|
1381
|
-
} else e.value === void 0 ? s("update:modelValue", !e.modelValue) : s("update:modelValue", e.value);
|
|
1382
|
-
};
|
|
1383
|
-
return (n, p) => (i(), f("div", {
|
|
1384
|
-
class: B(["t-checkbox", { active: l.value }]),
|
|
1385
|
-
style: T(r.value),
|
|
1386
|
-
onPointerup: u
|
|
1387
|
-
}, [
|
|
1388
|
-
$("div", {
|
|
1389
|
-
class: B(`t-checkbox-${n.type}`)
|
|
1390
|
-
}, [
|
|
1391
|
-
n.type == "radio" ? (i(), f("div", Yt)) : E("", !0),
|
|
1392
|
-
n.type == "check" ? _(n.$slots, "icon", { key: 1 }, () => [
|
|
1393
|
-
p[0] || (p[0] = $("i", { class: "ri-check-line" }, null, -1))
|
|
1394
|
-
], !0) : E("", !0)
|
|
1395
|
-
], 2),
|
|
1396
|
-
_(n.$slots, "label", {}, () => [
|
|
1397
|
-
n.label ? (i(), f("span", eo, A(e.label), 1)) : E("", !0)
|
|
1398
|
-
], !0)
|
|
1399
|
-
], 38));
|
|
1566
|
+
}), z(() => e.modelValue, async () => {
|
|
1567
|
+
await ce(), g();
|
|
1568
|
+
}), A(async () => {
|
|
1569
|
+
await ce(), g();
|
|
1570
|
+
});
|
|
1571
|
+
const v = { props: e, emit: s, transform: n, width: l, height: a, container: c, __color: d, styles: _, calcTransform: g, nextTick: ce, onMounted: A, provide: Q, ref: u, watch: z, computed: b };
|
|
1572
|
+
return Object.defineProperty(v, "__isScriptSetup", { enumerable: !1, value: !0 }), v;
|
|
1400
1573
|
}
|
|
1401
|
-
})
|
|
1402
|
-
|
|
1403
|
-
|
|
1404
|
-
|
|
1405
|
-
|
|
1406
|
-
|
|
1407
|
-
|
|
1408
|
-
},
|
|
1574
|
+
});
|
|
1575
|
+
function Vr(r, o, t, e, s, n) {
|
|
1576
|
+
return i(), y("ul", {
|
|
1577
|
+
ref: "container",
|
|
1578
|
+
class: p({ "toife-tabs": !0, [t.placement]: !0, [`variant-${t.variant}`]: !0 }),
|
|
1579
|
+
style: w([{ "--background": e.__color.background, "--color": e.__color.text }, e.styles])
|
|
1580
|
+
}, [
|
|
1581
|
+
$(r.$slots, "default", {}, void 0, !0)
|
|
1582
|
+
], 6);
|
|
1583
|
+
}
|
|
1584
|
+
const Ar = /* @__PURE__ */ x(Rr, [["render", Vr], ["__scopeId", "data-v-c7fff5a0"]]), Dr = /* @__PURE__ */ k({
|
|
1585
|
+
__name: "textarea",
|
|
1586
|
+
setup(r, { expose: o }) {
|
|
1587
|
+
o();
|
|
1588
|
+
const t = {};
|
|
1589
|
+
return Object.defineProperty(t, "__isScriptSetup", { enumerable: !1, value: !0 }), t;
|
|
1409
1590
|
}
|
|
1410
|
-
}),
|
|
1411
|
-
|
|
1591
|
+
}), Nr = {
|
|
1592
|
+
class: /* @__PURE__ */ p({ "toife-textarea": !0 })
|
|
1593
|
+
};
|
|
1594
|
+
function Xr(r, o, t, e, s, n) {
|
|
1595
|
+
return i(), y("div", Nr, [...o[0] || (o[0] = [
|
|
1596
|
+
S("textarea", null, null, -1)
|
|
1597
|
+
])]);
|
|
1598
|
+
}
|
|
1599
|
+
const Wr = /* @__PURE__ */ x(Dr, [["render", Xr], ["__scopeId", "data-v-9e74bf55"]]), qr = /* @__PURE__ */ k({
|
|
1600
|
+
__name: "toast",
|
|
1412
1601
|
props: {
|
|
1413
|
-
|
|
1414
|
-
|
|
1415
|
-
|
|
1416
|
-
color: { default: null }
|
|
1602
|
+
message: {},
|
|
1603
|
+
space: { default: "0px" },
|
|
1604
|
+
placement: { default: "bottom" },
|
|
1605
|
+
color: { default: null },
|
|
1606
|
+
variant: { default: "default" },
|
|
1607
|
+
visible: { type: Boolean, default: !1 }
|
|
1417
1608
|
},
|
|
1418
|
-
|
|
1419
|
-
|
|
1420
|
-
|
|
1421
|
-
|
|
1422
|
-
|
|
1423
|
-
|
|
1424
|
-
|
|
1425
|
-
|
|
1426
|
-
|
|
1427
|
-
|
|
1609
|
+
emits: ["dismiss"],
|
|
1610
|
+
setup(r, { expose: o, emit: t }) {
|
|
1611
|
+
const e = r, s = t, n = u(!1), l = u(!1), a = u(!1), c = () => {
|
|
1612
|
+
l.value = !0, a.value = !1, setTimeout(() => {
|
|
1613
|
+
n.value = !0;
|
|
1614
|
+
}, 10);
|
|
1615
|
+
}, d = () => {
|
|
1616
|
+
a.value = !0, setTimeout(() => {
|
|
1617
|
+
l.value = !1, n.value = !1, s("dismiss");
|
|
1618
|
+
}, 300);
|
|
1619
|
+
};
|
|
1620
|
+
z(() => e.visible, (v) => {
|
|
1621
|
+
v ? c() : d();
|
|
1622
|
+
});
|
|
1623
|
+
const _ = b(() => {
|
|
1624
|
+
let v;
|
|
1625
|
+
return e.variant == "default" && (e.color ? ["warning", "info", "danger", "primary", "secondary", "success"].includes(e.color) ? v = {
|
|
1626
|
+
"--border": "none",
|
|
1627
|
+
"--color": "var(--toife-color-status-" + e.color + "-text)",
|
|
1628
|
+
"--background": "rgba(var(--toife-color-status-" + e.color + "-rgb), 1)"
|
|
1629
|
+
} : v = {
|
|
1630
|
+
"--border": "none",
|
|
1631
|
+
"--color": "var(--toife-color-text)",
|
|
1632
|
+
"--background": e.color
|
|
1633
|
+
} : v = {
|
|
1634
|
+
"--border": "none",
|
|
1635
|
+
"--color": "var(--toife-color-text)",
|
|
1636
|
+
"--background": "rgba(var(--toife-color-surface-rgb), 1)"
|
|
1637
|
+
}), e.variant == "text" && (e.color ? ["warning", "info", "danger", "primary", "secondary", "success"].includes(e.color) ? v = {
|
|
1638
|
+
"--border": "none",
|
|
1639
|
+
"--color": "var(--toife-color-status-" + e.color + ")",
|
|
1640
|
+
"--background": "transparent"
|
|
1641
|
+
} : v = {
|
|
1642
|
+
"--border": "none",
|
|
1643
|
+
"--color": e.color,
|
|
1644
|
+
"--background": "transparent"
|
|
1645
|
+
} : v = {
|
|
1646
|
+
"--border": "none",
|
|
1647
|
+
"--color": "var(--toife-color-text)",
|
|
1648
|
+
"--background": "transparent"
|
|
1649
|
+
}), e.variant == "outline" && (e.color ? ["warning", "info", "danger", "primary", "secondary", "success"].includes(e.color) ? v = {
|
|
1650
|
+
"--border": "0.55px solid var(--toife-color-status-" + e.color + ")",
|
|
1651
|
+
"--color": "var(--toife-color-status-" + e.color + ")",
|
|
1652
|
+
"--background": "transparent"
|
|
1653
|
+
} : v = {
|
|
1654
|
+
"--border": "0.55px solid " + e.color,
|
|
1655
|
+
"--color": e.color,
|
|
1656
|
+
"--background": "transparent"
|
|
1657
|
+
} : v = {
|
|
1658
|
+
"--border": "0.55px solid var(--toife-color-text)",
|
|
1659
|
+
"--color": "var(--toife-color-text)",
|
|
1660
|
+
"--background": "transparent"
|
|
1661
|
+
}), v;
|
|
1662
|
+
});
|
|
1663
|
+
o({
|
|
1664
|
+
open: c,
|
|
1665
|
+
close: d
|
|
1666
|
+
});
|
|
1667
|
+
const g = { props: e, emit: s, _visible: n, isRender: l, isClosing: a, open: c, close: d, styles: _, computed: b, ref: u, watch: z };
|
|
1668
|
+
return Object.defineProperty(g, "__isScriptSetup", { enumerable: !1, value: !0 }), g;
|
|
1428
1669
|
}
|
|
1429
|
-
}),
|
|
1430
|
-
|
|
1431
|
-
|
|
1432
|
-
|
|
1433
|
-
|
|
1434
|
-
|
|
1435
|
-
|
|
1436
|
-
|
|
1437
|
-
|
|
1438
|
-
|
|
1439
|
-
|
|
1440
|
-
|
|
1441
|
-
|
|
1442
|
-
|
|
1443
|
-
|
|
1670
|
+
}), Mr = {
|
|
1671
|
+
class: /* @__PURE__ */ p({ "toife-toast-content": !0 })
|
|
1672
|
+
};
|
|
1673
|
+
function Lr(r, o, t, e, s, n) {
|
|
1674
|
+
return e.isRender ? (i(), y("div", {
|
|
1675
|
+
key: 0,
|
|
1676
|
+
class: p({ "toife-toast": !0, [e.props.placement]: !0, open: e._visible, closing: e.isClosing }),
|
|
1677
|
+
style: w({ "--space": e.props.space, ...e.styles })
|
|
1678
|
+
}, [
|
|
1679
|
+
$(r.$slots, "content", {}, () => [
|
|
1680
|
+
S("div", Mr, V(e.props.message), 1)
|
|
1681
|
+
], !0)
|
|
1682
|
+
], 6)) : C("", !0);
|
|
1683
|
+
}
|
|
1684
|
+
const we = /* @__PURE__ */ x(qr, [["render", Lr], ["__scopeId", "data-v-931010bd"]]), no = (r = {}, o) => ({
|
|
1685
|
+
open() {
|
|
1686
|
+
let t = document.body.querySelector(".toife-app");
|
|
1687
|
+
if (!t) return;
|
|
1688
|
+
const e = document.createElement("div"), s = u();
|
|
1689
|
+
t.appendChild(e);
|
|
1690
|
+
const n = re({
|
|
1691
|
+
render() {
|
|
1692
|
+
return oe(o || we, {
|
|
1693
|
+
...r,
|
|
1694
|
+
ref: s,
|
|
1695
|
+
onDismiss: () => {
|
|
1696
|
+
setTimeout(() => {
|
|
1697
|
+
n.unmount(), e.remove();
|
|
1698
|
+
}, 300);
|
|
1699
|
+
}
|
|
1700
|
+
});
|
|
1701
|
+
}
|
|
1444
1702
|
});
|
|
1445
|
-
|
|
1446
|
-
|
|
1447
|
-
|
|
1448
|
-
|
|
1703
|
+
n.mount(e), setTimeout(() => {
|
|
1704
|
+
s.value?.open?.(), setTimeout(() => {
|
|
1705
|
+
s.value?.close?.();
|
|
1706
|
+
}, (r.duration || 2e3) + 10);
|
|
1707
|
+
}, 50);
|
|
1449
1708
|
}
|
|
1450
|
-
}),
|
|
1451
|
-
__name: "
|
|
1709
|
+
}), Fr = /* @__PURE__ */ k({
|
|
1710
|
+
__name: "toggle-password",
|
|
1452
1711
|
props: {
|
|
1453
|
-
|
|
1454
|
-
direction: { default: "row" }
|
|
1712
|
+
color: { default: "warning" }
|
|
1455
1713
|
},
|
|
1456
|
-
|
|
1457
|
-
|
|
1458
|
-
|
|
1459
|
-
|
|
1460
|
-
|
|
1461
|
-
|
|
1462
|
-
|
|
1463
|
-
|
|
1714
|
+
emits: ["change"],
|
|
1715
|
+
setup(r, { expose: o, emit: t }) {
|
|
1716
|
+
o();
|
|
1717
|
+
const e = r, s = t, n = u(!1), l = u(), a = b(() => {
|
|
1718
|
+
let g = e.color;
|
|
1719
|
+
return ["warning", "info", "danger", "primary", "secondary", "success"].includes(e.color) && (g = `var(--toife-color-status-${e.color})`), {
|
|
1720
|
+
"--color": g
|
|
1721
|
+
};
|
|
1722
|
+
}), c = () => l.value?.parentElement?.querySelector?.("input");
|
|
1723
|
+
A(() => {
|
|
1724
|
+
let g = c();
|
|
1725
|
+
g && (n.value = g.type != "password", s("change", n.value));
|
|
1726
|
+
});
|
|
1727
|
+
const _ = { props: e, emit: s, isShow: n, toggle: l, style: a, el: c, onClick: () => {
|
|
1728
|
+
let g = c();
|
|
1729
|
+
g && (n.value = !n.value, n.value ? g.type = "text" : g.type = "password", s("change", n.value));
|
|
1730
|
+
}, computed: b, onMounted: A, ref: u };
|
|
1731
|
+
return Object.defineProperty(_, "__isScriptSetup", { enumerable: !1, value: !0 }), _;
|
|
1464
1732
|
}
|
|
1465
|
-
})
|
|
1466
|
-
|
|
1733
|
+
});
|
|
1734
|
+
function Hr(r, o, t, e, s, n) {
|
|
1735
|
+
return i(), y("button", {
|
|
1736
|
+
ref: "toggle",
|
|
1737
|
+
class: p({ "toife-toggle-password": !0 }),
|
|
1738
|
+
style: w(e.style),
|
|
1739
|
+
onPointerup: e.onClick
|
|
1740
|
+
}, [
|
|
1741
|
+
e.isShow ? $(r.$slots, "on", { key: 0 }, () => [
|
|
1742
|
+
o[0] || (o[0] = S("i", { class: "ri-eye-line" }, null, -1))
|
|
1743
|
+
], !0) : C("", !0),
|
|
1744
|
+
e.isShow ? C("", !0) : $(r.$slots, "off", { key: 1 }, () => [
|
|
1745
|
+
o[1] || (o[1] = S("i", { class: "ri-eye-off-line" }, null, -1))
|
|
1746
|
+
], !0)
|
|
1747
|
+
], 36);
|
|
1748
|
+
}
|
|
1749
|
+
const Kr = /* @__PURE__ */ x(Fr, [["render", Hr], ["__scopeId", "data-v-97f88bfa"]]), Gr = /* @__PURE__ */ k({
|
|
1750
|
+
__name: "toolbar",
|
|
1467
1751
|
props: {
|
|
1468
|
-
|
|
1469
|
-
|
|
1752
|
+
placement: { default: null },
|
|
1753
|
+
safe: { type: Boolean, default: !0 },
|
|
1754
|
+
size: { default: "50px" }
|
|
1470
1755
|
},
|
|
1471
|
-
setup(
|
|
1472
|
-
|
|
1473
|
-
|
|
1474
|
-
};
|
|
1475
|
-
return L(() => {
|
|
1476
|
-
o.value = t.src;
|
|
1477
|
-
}), (s, r) => (i(), f("img", {
|
|
1478
|
-
onError: e,
|
|
1479
|
-
src: o.value
|
|
1480
|
-
}, null, 40, po));
|
|
1481
|
-
}
|
|
1482
|
-
}), ko = (t) => t && (t.tagName == "INPUT" || t.tagName == "TEXTAREA" || t.isContentEditable), $o = () => {
|
|
1483
|
-
const t = document.activeElement;
|
|
1484
|
-
t && (t.tagName === "INPUT" || t.tagName === "TEXTAREA" || t.isContentEditable) && t.blur();
|
|
1485
|
-
}, xo = () => ({
|
|
1486
|
-
install: (t) => {
|
|
1487
|
-
t.component("t-app", ze), t.component("t-screen", be), t.component("t-screen-router", mt), t.component("t-cable", ot), t.component("t-toolbar", yt), t.component("t-content", lt), t.component("t-card", st), t.component("t-refresher", it), t.component("t-button", Z), t.component("t-back-button", gt), t.component("t-present", F), t.component("t-text", oe), t.component("t-sheet", $t), t.component("t-gesture-indicator", he), t.component("t-input", Bt), t.component("t-textarea", Et), t.component("t-rich-text", Ct), t.component("t-grid", At), t.component("t-divider", Nt), t.component("t-toggle-password", Dt), t.component("t-icon-spinner", ne), t.component("t-alert", me), t.component("t-avatar", qt), t.component("t-collapse", Ut), t.component("t-toast", _e), t.component("t-switch", Gt), t.component("t-tab", Jt), t.component("t-tabs", Zt), t.component("t-checkbox", oo), t.component("t-keyboard-space", ro), t.component("t-skeleton", ao), t.component("t-ripple", co), t.component("t-loading", ve), t.component("t-flex", uo), t.component("t-image", fo);
|
|
1756
|
+
setup(r, { expose: o }) {
|
|
1757
|
+
o();
|
|
1758
|
+
const t = r, e = Z("cableState"), s = b(() => t?.placement || e?.placement), n = { props: t, cable: e, placement: s, computed: b, inject: Z };
|
|
1759
|
+
return Object.defineProperty(n, "__isScriptSetup", { enumerable: !1, value: !0 }), n;
|
|
1488
1760
|
}
|
|
1489
1761
|
});
|
|
1762
|
+
function Ur(r, o, t, e, s, n) {
|
|
1763
|
+
return i(), y("div", {
|
|
1764
|
+
class: p({ "toife-toolbar": !0, [e.placement]: !0, safe: e.props.safe }),
|
|
1765
|
+
style: w({ "--toife-size-toolbar": e.props.size })
|
|
1766
|
+
}, [
|
|
1767
|
+
S("div", null, [
|
|
1768
|
+
$(r.$slots, "default", {}, void 0, !0)
|
|
1769
|
+
])
|
|
1770
|
+
], 6);
|
|
1771
|
+
}
|
|
1772
|
+
const Jr = /* @__PURE__ */ x(Gr, [["render", Ur], ["__scopeId", "data-v-24f79d25"]]), so = (r) => ({
|
|
1773
|
+
install: (o) => {
|
|
1774
|
+
const t = r?.prefix || "t-";
|
|
1775
|
+
o.component(t + "app", ze), o.component(t + "action", be), o.component(t + "screen", he), o.component(t + "screen-router", dt), o.component(t + "cable", kt), o.component(t + "toolbar", Jr), o.component(t + "content", Wt), o.component(t + "card", St), o.component(t + "refresher", vr), o.component(t + "button", ne), o.component(t + "back-button", mt), o.component(t + "present", K), o.component(t + "text", $e), o.component(t + "sheet", wr), o.component(t + "gesture-indicator", xe), o.component(t + "input", ur), o.component(t + "textarea", Wr), o.component(t + "richtext", gr), o.component(t + "grid", Zt), o.component(t + "divider", Lt), o.component(t + "toggle-password", Kr), o.component(t + "icon-spinner", ue), o.component(t + "alert", ge), o.component(t + "avatar", Je), o.component(t + "collapse", At), o.component(t + "toast", we), o.component(t + "switch", Cr), o.component(t + "tab", jr), o.component(t + "tabs", Ar), o.component(t + "checkbox", Ot), o.component(t + "keyboard-space", bt), o.component(t + "skeleton", Ir), o.component(t + "ripple", xr), o.component(t + "loading", Se), o.component(t + "flex", Kt), o.component(t + "image", rr);
|
|
1776
|
+
}
|
|
1777
|
+
}), Pe = (r) => r && (r.tagName == "INPUT" || r.tagName == "TEXTAREA" || r.isContentEditable), Te = () => {
|
|
1778
|
+
const r = document.activeElement;
|
|
1779
|
+
r && (r.tagName === "INPUT" || r.tagName === "TEXTAREA" || r.isContentEditable) && r.blur();
|
|
1780
|
+
}, Qr = () => {
|
|
1781
|
+
document.addEventListener("contextmenu", (r) => r.preventDefault()), document.addEventListener("pointerup", (r) => {
|
|
1782
|
+
!Pe(r.target) && Te();
|
|
1783
|
+
}), "virtualKeyboard" in navigator && (navigator.virtualKeyboard.overlaysContent = !0);
|
|
1784
|
+
}, ao = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1785
|
+
__proto__: null,
|
|
1786
|
+
blurCurrentActive: Te,
|
|
1787
|
+
isFormElement: Pe,
|
|
1788
|
+
preventDefault: Qr
|
|
1789
|
+
}, Symbol.toStringTag, { value: "Module" }));
|
|
1490
1790
|
export {
|
|
1491
|
-
|
|
1492
|
-
|
|
1493
|
-
|
|
1494
|
-
|
|
1495
|
-
|
|
1496
|
-
|
|
1497
|
-
|
|
1498
|
-
|
|
1499
|
-
|
|
1500
|
-
|
|
1791
|
+
be as Action,
|
|
1792
|
+
ge as Alert,
|
|
1793
|
+
ze as App,
|
|
1794
|
+
Je as Avatar,
|
|
1795
|
+
mt as BackButton,
|
|
1796
|
+
ne as Button,
|
|
1797
|
+
kt as Cable,
|
|
1798
|
+
St as Card,
|
|
1799
|
+
Ot as Checkbox,
|
|
1800
|
+
At as Collapse,
|
|
1801
|
+
Wt as Content,
|
|
1802
|
+
Lt as Divider,
|
|
1803
|
+
Kt as Flex,
|
|
1804
|
+
xe as GestureIndicator,
|
|
1805
|
+
Zt as Grid,
|
|
1806
|
+
ue as IconSpinner,
|
|
1807
|
+
rr as Image,
|
|
1808
|
+
ur as Input,
|
|
1809
|
+
bt as KeyboardSpace,
|
|
1810
|
+
Se as Loading,
|
|
1811
|
+
K as Present,
|
|
1812
|
+
vr as Refresher,
|
|
1813
|
+
gr as Richtext,
|
|
1814
|
+
xr as Ripple,
|
|
1815
|
+
he as Screen,
|
|
1816
|
+
dt as ScreenRouter,
|
|
1817
|
+
wr as Sheet,
|
|
1818
|
+
Ir as Skeleton,
|
|
1819
|
+
Cr as Switch,
|
|
1820
|
+
jr as Tab,
|
|
1821
|
+
Ar as Tabs,
|
|
1822
|
+
$e as Text,
|
|
1823
|
+
Wr as Textarea,
|
|
1824
|
+
we as Toast,
|
|
1825
|
+
Kr as TogglePassword,
|
|
1826
|
+
Jr as Toolbar,
|
|
1827
|
+
to as createAction,
|
|
1828
|
+
ro as createAlert,
|
|
1829
|
+
oo as createLoading,
|
|
1830
|
+
no as createToast,
|
|
1831
|
+
so as createToife,
|
|
1832
|
+
ve as getNewPresentIndex,
|
|
1833
|
+
te as useKeyboard,
|
|
1834
|
+
ee as useScreenRouter,
|
|
1835
|
+
ao as utils
|
|
1501
1836
|
};
|