@zealsolutions/zeal-ui 1.0.0-alpha.11
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/README.md +29 -0
- package/dist/BaseDropdownButton-UQfsyK6a.js +43 -0
- package/dist/BaseOverlay-ulI9NqJC.js +21 -0
- package/dist/BaseTooltip-BWN44Hgh.js +53 -0
- package/dist/CircleStatusIcon-Cqfkui_k.js +14 -0
- package/dist/CloseButton-BY5yns2W.js +17 -0
- package/dist/InfiniteScroll-UshOR9FB.js +430 -0
- package/dist/InputField-Dy0a6K08.js +55 -0
- package/dist/OpacityScaleTransition-CtMzqccC.js +26 -0
- package/dist/OpacityTranslateTransition-fF3EnRwC.js +32 -0
- package/dist/TranslateTransition-Bae6KuMl.js +54 -0
- package/dist/TruncateText-CLf5O_YR.js +61 -0
- package/dist/components/buttons/index.js +68 -0
- package/dist/components/forms/index.js +96 -0
- package/dist/components/icons/index.js +4 -0
- package/dist/components/inputs/index.js +4 -0
- package/dist/components/menus/index.js +1784 -0
- package/dist/components/modals/index.js +209 -0
- package/dist/components/overlays/index.js +4 -0
- package/dist/components/tooltips/index.js +4 -0
- package/dist/components/transitions/index.js +9 -0
- package/dist/components/utils/index.js +6 -0
- package/dist/config/tailwind/index.js +307 -0
- package/dist/css/base.css +185 -0
- package/dist/css/typography.css +31 -0
- package/dist/favicon.ico +0 -0
- package/dist/fonts/montserrat/JTUQjIg1_i6t8kCHKm459WxRxC7mw9c.woff2 +0 -0
- package/dist/fonts/montserrat/JTUQjIg1_i6t8kCHKm459WxRxi7mw9c.woff2 +0 -0
- package/dist/fonts/montserrat/JTUQjIg1_i6t8kCHKm459WxRxy7mw9c.woff2 +0 -0
- package/dist/fonts/montserrat/JTUQjIg1_i6t8kCHKm459WxRyS7m.woff2 +0 -0
- package/dist/fonts/montserrat/JTUQjIg1_i6t8kCHKm459WxRzS7mw9c.woff2 +0 -0
- package/dist/fonts/montserrat/JTUSjIg1_i6t8kCHKm459W1hyzbi.woff2 +0 -0
- package/dist/fonts/montserrat/JTUSjIg1_i6t8kCHKm459WRhyzbi.woff2 +0 -0
- package/dist/fonts/montserrat/JTUSjIg1_i6t8kCHKm459WZhyzbi.woff2 +0 -0
- package/dist/fonts/montserrat/JTUSjIg1_i6t8kCHKm459Wdhyzbi.woff2 +0 -0
- package/dist/fonts/montserrat/JTUSjIg1_i6t8kCHKm459Wlhyw.woff2 +0 -0
- package/dist/fonts/unna/AYCEpXzofN0NOp8LlQ.woff2 +0 -0
- package/dist/fonts/unna/AYCEpXzofN0NOpELlVHC.woff2 +0 -0
- package/dist/fonts/unna/AYCJpXzofN0NOpozLGzTR3Jv.woff2 +0 -0
- package/dist/fonts/unna/AYCJpXzofN0NOpozLGzTSXJv_vc.woff2 +0 -0
- package/dist/fonts/unna/AYCKpXzofN0NOpo7l0nG.woff2 +0 -0
- package/dist/fonts/unna/AYCKpXzofN0NOpo7mUnGeFM.woff2 +0 -0
- package/dist/fonts/unna/AYCLpXzofN0NMiQugG7jRQ.woff2 +0 -0
- package/dist/fonts/unna/AYCLpXzofN0NMiQugGDjRWpr.woff2 +0 -0
- package/package.json +78 -0
package/README.md
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# zeal-ui
|
|
2
|
+
|
|
3
|
+
This template should help get you started developing with Vue 3 in Vite.
|
|
4
|
+
|
|
5
|
+
## Recommended IDE Setup
|
|
6
|
+
|
|
7
|
+
[VSCode](https://code.visualstudio.com/) + [Volar](https://marketplace.visualstudio.com/items?itemName=Vue.volar) (and disable Vetur).
|
|
8
|
+
|
|
9
|
+
## Customize configuration
|
|
10
|
+
|
|
11
|
+
See [Vite Configuration Reference](https://vitejs.dev/config/).
|
|
12
|
+
|
|
13
|
+
## Project Setup
|
|
14
|
+
|
|
15
|
+
```sh
|
|
16
|
+
npm install
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
### Compile and Hot-Reload for Development
|
|
20
|
+
|
|
21
|
+
```sh
|
|
22
|
+
npm run dev
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
### Compile and Minify for Production
|
|
26
|
+
|
|
27
|
+
```sh
|
|
28
|
+
npm run build
|
|
29
|
+
```
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { openBlock as s, createElementBlock as r, normalizeClass as o, createElementVNode as t, renderSlot as a, createCommentVNode as l } from "vue";
|
|
2
|
+
const c = { class: "flex items-center space-x-3" }, d = { key: 0 }, i = { class: "truncate" }, f = {
|
|
3
|
+
__name: "BaseDropdownButton",
|
|
4
|
+
props: {
|
|
5
|
+
showButtonIcon: {
|
|
6
|
+
type: Boolean,
|
|
7
|
+
default: !1
|
|
8
|
+
},
|
|
9
|
+
dropdownDirection: {
|
|
10
|
+
type: String,
|
|
11
|
+
default: "down"
|
|
12
|
+
},
|
|
13
|
+
showDropdown: {
|
|
14
|
+
type: Boolean,
|
|
15
|
+
default: !1
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
setup(e) {
|
|
19
|
+
return (n, u) => (s(), r("button", {
|
|
20
|
+
ref: "button",
|
|
21
|
+
class: o(["relative cursor-default text-style-base-body rounded-md py-2.5 pl-5 pr-10 text-left text-black ring-inset focus:outline-none focus:ring-2 focus:ring-app-950 focus:shadow-md focus:bg-app-100", e.showDropdown ? "ring-2 ring-app-950 shadow-md bg-app-100" : "ring-1 ring-steel-400 bg-white"])
|
|
22
|
+
}, [
|
|
23
|
+
t("div", c, [
|
|
24
|
+
e.showButtonIcon ? (s(), r("div", d, [
|
|
25
|
+
a(n.$slots, "buttonIcon")
|
|
26
|
+
])) : l("", !0),
|
|
27
|
+
t("div", i, [
|
|
28
|
+
a(n.$slots, "default")
|
|
29
|
+
])
|
|
30
|
+
]),
|
|
31
|
+
t("span", {
|
|
32
|
+
class: o(["pointer-events-none absolute inset-y-0 right-0 flex items-center pr-4", e.showDropdown ? "text-black" : "text-steel-800"])
|
|
33
|
+
}, [
|
|
34
|
+
t("i", {
|
|
35
|
+
class: o(["fa-regular fa-chevron-down transition-transform duration-300 text-lg", e.dropdownDirection === "down" ? "" : "rotate-180"])
|
|
36
|
+
}, null, 2)
|
|
37
|
+
], 2)
|
|
38
|
+
], 2));
|
|
39
|
+
}
|
|
40
|
+
};
|
|
41
|
+
export {
|
|
42
|
+
f as _
|
|
43
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { openBlock as s, createElementBlock as r, normalizeClass as o } from "vue";
|
|
2
|
+
const c = {
|
|
3
|
+
__name: "BaseOverlay",
|
|
4
|
+
props: {
|
|
5
|
+
transparent: {
|
|
6
|
+
type: Boolean,
|
|
7
|
+
default: !1
|
|
8
|
+
}
|
|
9
|
+
},
|
|
10
|
+
emits: ["close"],
|
|
11
|
+
setup(t, { emit: n }) {
|
|
12
|
+
const a = n;
|
|
13
|
+
return (l, e) => (s(), r("div", {
|
|
14
|
+
class: o(["fixed inset-0 z-40", t.transparent ? "bg-transparent" : "bg-gray-200 bg-opacity-80"]),
|
|
15
|
+
onClick: e[0] || (e[0] = (i) => a("close"))
|
|
16
|
+
}, null, 2));
|
|
17
|
+
}
|
|
18
|
+
};
|
|
19
|
+
export {
|
|
20
|
+
c as _
|
|
21
|
+
};
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { computed as c, openBlock as t, createElementBlock as o, normalizeClass as a, normalizeStyle as p, createVNode as d, withCtx as b, createElementVNode as m, renderSlot as u, createCommentVNode as y } from "vue";
|
|
2
|
+
import { _ as h } from "./OpacityTranslateTransition-fF3EnRwC.js";
|
|
3
|
+
const x = { class: "inline-block text-white text-style-tooltip" }, N = {
|
|
4
|
+
__name: "BaseTooltip",
|
|
5
|
+
props: {
|
|
6
|
+
position: {
|
|
7
|
+
type: String,
|
|
8
|
+
default: "top"
|
|
9
|
+
},
|
|
10
|
+
top: {
|
|
11
|
+
type: Number,
|
|
12
|
+
default: 0
|
|
13
|
+
},
|
|
14
|
+
left: {
|
|
15
|
+
type: Number,
|
|
16
|
+
default: 0
|
|
17
|
+
},
|
|
18
|
+
show: {
|
|
19
|
+
type: Boolean,
|
|
20
|
+
default: !1
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
emits: ["after-leave"],
|
|
24
|
+
setup(e, { emit: l }) {
|
|
25
|
+
const n = e, r = l, s = c(() => n.position === "top" ? "down" : "up"), i = () => {
|
|
26
|
+
r("after-leave");
|
|
27
|
+
};
|
|
28
|
+
return (f, v) => (t(), o("div", {
|
|
29
|
+
class: a(["absolute z-50 pointer-events-none w-48 -translate-x-1/2", e.position === "top" ? "-translate-y-full" : ""]),
|
|
30
|
+
style: p(`top: ${e.top}px; left: ${e.left}px;`)
|
|
31
|
+
}, [
|
|
32
|
+
d(h, {
|
|
33
|
+
direction: s.value,
|
|
34
|
+
onAfterLeave: i
|
|
35
|
+
}, {
|
|
36
|
+
default: b(() => [
|
|
37
|
+
e.show ? (t(), o("div", {
|
|
38
|
+
key: 0,
|
|
39
|
+
class: a(["bg-black rounded-lg shadow-md py-2.5 px-4 before:absolute before:left-1/2 before:-translate-x-1/2 before:rotate-45 before:w-2.5 before:h-2.5 before:bg-black", e.position === "top" ? "before:bottom-0 before:translate-y-1/2" : "before:top-0 before:-translate-y-1/2"])
|
|
40
|
+
}, [
|
|
41
|
+
m("span", x, [
|
|
42
|
+
u(f.$slots, "default")
|
|
43
|
+
])
|
|
44
|
+
], 2)) : y("", !0)
|
|
45
|
+
]),
|
|
46
|
+
_: 3
|
|
47
|
+
}, 8, ["direction"])
|
|
48
|
+
], 6));
|
|
49
|
+
}
|
|
50
|
+
};
|
|
51
|
+
export {
|
|
52
|
+
N as _
|
|
53
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { openBlock as r, createElementBlock as s } from "vue";
|
|
2
|
+
const l = (e, t) => {
|
|
3
|
+
const c = e.__vccOpts || e;
|
|
4
|
+
for (const [n, o] of t)
|
|
5
|
+
c[n] = o;
|
|
6
|
+
return c;
|
|
7
|
+
}, _ = {}, a = { class: "inline-block h-2.5 w-2.5 flex-shrink-0 rounded-full bg-steel-500" };
|
|
8
|
+
function f(e, t) {
|
|
9
|
+
return r(), s("span", a);
|
|
10
|
+
}
|
|
11
|
+
const p = /* @__PURE__ */ l(_, [["render", f]]);
|
|
12
|
+
export {
|
|
13
|
+
p as C
|
|
14
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { openBlock as s, createElementBlock as n, createElementVNode as c } from "vue";
|
|
2
|
+
const l = /* @__PURE__ */ c("i", { class: "fa-regular fa-xmark" }, null, -1), r = [
|
|
3
|
+
l
|
|
4
|
+
], u = {
|
|
5
|
+
__name: "CloseButton",
|
|
6
|
+
emits: ["close"],
|
|
7
|
+
setup(i, { emit: t }) {
|
|
8
|
+
const o = t;
|
|
9
|
+
return (m, e) => (s(), n("button", {
|
|
10
|
+
class: "flex items-center justify-center p-2 text-lg",
|
|
11
|
+
onClick: e[0] || (e[0] = (_) => o("close"))
|
|
12
|
+
}, r));
|
|
13
|
+
}
|
|
14
|
+
};
|
|
15
|
+
export {
|
|
16
|
+
u as _
|
|
17
|
+
};
|
|
@@ -0,0 +1,430 @@
|
|
|
1
|
+
import { unref as Z, watch as A, onMounted as j, nextTick as X, getCurrentScope as ee, onScopeDispose as te, getCurrentInstance as $, isRef as ne, reactive as H, ref as g, computed as L, watchEffect as oe, openBlock as re, createElementBlock as ie, renderSlot as le } from "vue";
|
|
2
|
+
function N(e) {
|
|
3
|
+
return ee() ? (te(e), !0) : !1;
|
|
4
|
+
}
|
|
5
|
+
function b(e) {
|
|
6
|
+
return typeof e == "function" ? e() : Z(e);
|
|
7
|
+
}
|
|
8
|
+
const se = typeof window < "u" && typeof document < "u";
|
|
9
|
+
typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
|
|
10
|
+
const ce = (e) => e != null, ue = Object.prototype.toString, ae = (e) => ue.call(e) === "[object Object]", T = () => {
|
|
11
|
+
};
|
|
12
|
+
function C(e, n) {
|
|
13
|
+
function t(...o) {
|
|
14
|
+
return new Promise((r, i) => {
|
|
15
|
+
Promise.resolve(e(() => n.apply(this, o), { fn: n, thisArg: this, args: o })).then(r).catch(i);
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
return t;
|
|
19
|
+
}
|
|
20
|
+
const fe = (e) => e();
|
|
21
|
+
function q(e, n = {}) {
|
|
22
|
+
let t, o, r = T;
|
|
23
|
+
const i = (l) => {
|
|
24
|
+
clearTimeout(l), r(), r = T;
|
|
25
|
+
};
|
|
26
|
+
return (l) => {
|
|
27
|
+
const s = b(e), u = b(n.maxWait);
|
|
28
|
+
return t && i(t), s <= 0 || u !== void 0 && u <= 0 ? (o && (i(o), o = null), Promise.resolve(l())) : new Promise((f, d) => {
|
|
29
|
+
r = n.rejectOnCancel ? d : f, u && !o && (o = setTimeout(() => {
|
|
30
|
+
t && i(t), o = null, f(l());
|
|
31
|
+
}, u)), t = setTimeout(() => {
|
|
32
|
+
o && i(o), o = null, f(l());
|
|
33
|
+
}, s);
|
|
34
|
+
});
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
function de(...e) {
|
|
38
|
+
let n = 0, t, o = !0, r = T, i, c, l, s, u;
|
|
39
|
+
!ne(e[0]) && typeof e[0] == "object" ? { delay: c, trailing: l = !0, leading: s = !0, rejectOnCancel: u = !1 } = e[0] : [c, l = !0, s = !0, u = !1] = e;
|
|
40
|
+
const f = () => {
|
|
41
|
+
t && (clearTimeout(t), t = void 0, r(), r = T);
|
|
42
|
+
};
|
|
43
|
+
return (v) => {
|
|
44
|
+
const m = b(c), p = Date.now() - n, S = () => i = v();
|
|
45
|
+
return f(), m <= 0 ? (n = Date.now(), S()) : (p > m && (s || !o) ? (n = Date.now(), S()) : l && (i = new Promise((w, h) => {
|
|
46
|
+
r = u ? h : w, t = setTimeout(() => {
|
|
47
|
+
n = Date.now(), o = !0, w(S()), f();
|
|
48
|
+
}, Math.max(0, m - p));
|
|
49
|
+
})), !s && !t && (t = setTimeout(() => o = !0, m)), o = !1, i);
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
function me(e) {
|
|
53
|
+
return $();
|
|
54
|
+
}
|
|
55
|
+
function ve(e, n = 200, t = {}) {
|
|
56
|
+
return C(
|
|
57
|
+
q(n, t),
|
|
58
|
+
e
|
|
59
|
+
);
|
|
60
|
+
}
|
|
61
|
+
function pe(e, n = 200, t = !1, o = !0, r = !1) {
|
|
62
|
+
return C(
|
|
63
|
+
de(n, t, o, r),
|
|
64
|
+
e
|
|
65
|
+
);
|
|
66
|
+
}
|
|
67
|
+
function he(e, n, t = {}) {
|
|
68
|
+
const {
|
|
69
|
+
eventFilter: o = fe,
|
|
70
|
+
...r
|
|
71
|
+
} = t;
|
|
72
|
+
return A(
|
|
73
|
+
e,
|
|
74
|
+
C(
|
|
75
|
+
o,
|
|
76
|
+
n
|
|
77
|
+
),
|
|
78
|
+
r
|
|
79
|
+
);
|
|
80
|
+
}
|
|
81
|
+
function J(e, n = !0, t) {
|
|
82
|
+
me() ? j(e, t) : n ? e() : X(e);
|
|
83
|
+
}
|
|
84
|
+
function _e(e, n, t = {}) {
|
|
85
|
+
const {
|
|
86
|
+
debounce: o = 0,
|
|
87
|
+
maxWait: r = void 0,
|
|
88
|
+
...i
|
|
89
|
+
} = t;
|
|
90
|
+
return he(
|
|
91
|
+
e,
|
|
92
|
+
n,
|
|
93
|
+
{
|
|
94
|
+
...i,
|
|
95
|
+
eventFilter: q(o, { maxWait: r })
|
|
96
|
+
}
|
|
97
|
+
);
|
|
98
|
+
}
|
|
99
|
+
function x(e) {
|
|
100
|
+
var n;
|
|
101
|
+
const t = b(e);
|
|
102
|
+
return (n = t == null ? void 0 : t.$el) != null ? n : t;
|
|
103
|
+
}
|
|
104
|
+
const M = se ? window : void 0;
|
|
105
|
+
function P(...e) {
|
|
106
|
+
let n, t, o, r;
|
|
107
|
+
if (typeof e[0] == "string" || Array.isArray(e[0]) ? ([t, o, r] = e, n = M) : [n, t, o, r] = e, !n)
|
|
108
|
+
return T;
|
|
109
|
+
Array.isArray(t) || (t = [t]), Array.isArray(o) || (o = [o]);
|
|
110
|
+
const i = [], c = () => {
|
|
111
|
+
i.forEach((f) => f()), i.length = 0;
|
|
112
|
+
}, l = (f, d, v, m) => (f.addEventListener(d, v, m), () => f.removeEventListener(d, v, m)), s = A(
|
|
113
|
+
() => [x(n), b(r)],
|
|
114
|
+
([f, d]) => {
|
|
115
|
+
if (c(), !f)
|
|
116
|
+
return;
|
|
117
|
+
const v = ae(d) ? { ...d } : d;
|
|
118
|
+
i.push(
|
|
119
|
+
...t.flatMap((m) => o.map((p) => l(f, m, p, v)))
|
|
120
|
+
);
|
|
121
|
+
},
|
|
122
|
+
{ immediate: !0, flush: "post" }
|
|
123
|
+
), u = () => {
|
|
124
|
+
s(), c();
|
|
125
|
+
};
|
|
126
|
+
return N(u), u;
|
|
127
|
+
}
|
|
128
|
+
function be() {
|
|
129
|
+
const e = g(!1), n = $();
|
|
130
|
+
return n && j(() => {
|
|
131
|
+
e.value = !0;
|
|
132
|
+
}, n), e;
|
|
133
|
+
}
|
|
134
|
+
function K(e) {
|
|
135
|
+
const n = be();
|
|
136
|
+
return L(() => (n.value, !!e()));
|
|
137
|
+
}
|
|
138
|
+
function we(e, n = {}) {
|
|
139
|
+
const { window: t = M } = n, o = K(() => t && "matchMedia" in t && typeof t.matchMedia == "function");
|
|
140
|
+
let r;
|
|
141
|
+
const i = g(!1), c = (u) => {
|
|
142
|
+
i.value = u.matches;
|
|
143
|
+
}, l = () => {
|
|
144
|
+
r && ("removeEventListener" in r ? r.removeEventListener("change", c) : r.removeListener(c));
|
|
145
|
+
}, s = oe(() => {
|
|
146
|
+
o.value && (l(), r = t.matchMedia(b(e)), "addEventListener" in r ? r.addEventListener("change", c) : r.addListener(c), i.value = r.matches);
|
|
147
|
+
});
|
|
148
|
+
return N(() => {
|
|
149
|
+
s(), l(), r = void 0;
|
|
150
|
+
}), i;
|
|
151
|
+
}
|
|
152
|
+
function ye(e, n, t = {}) {
|
|
153
|
+
const {
|
|
154
|
+
root: o,
|
|
155
|
+
rootMargin: r = "0px",
|
|
156
|
+
threshold: i = 0.1,
|
|
157
|
+
window: c = M,
|
|
158
|
+
immediate: l = !0
|
|
159
|
+
} = t, s = K(() => c && "IntersectionObserver" in c), u = L(() => {
|
|
160
|
+
const p = b(e);
|
|
161
|
+
return (Array.isArray(p) ? p : [p]).map(x).filter(ce);
|
|
162
|
+
});
|
|
163
|
+
let f = T;
|
|
164
|
+
const d = g(l), v = s.value ? A(
|
|
165
|
+
() => [u.value, x(o), d.value],
|
|
166
|
+
([p, S]) => {
|
|
167
|
+
if (f(), !d.value || !p.length)
|
|
168
|
+
return;
|
|
169
|
+
const w = new IntersectionObserver(
|
|
170
|
+
n,
|
|
171
|
+
{
|
|
172
|
+
root: x(S),
|
|
173
|
+
rootMargin: r,
|
|
174
|
+
threshold: i
|
|
175
|
+
}
|
|
176
|
+
);
|
|
177
|
+
p.forEach((h) => h && w.observe(h)), f = () => {
|
|
178
|
+
w.disconnect(), f = T;
|
|
179
|
+
};
|
|
180
|
+
},
|
|
181
|
+
{ immediate: l, flush: "post" }
|
|
182
|
+
) : T, m = () => {
|
|
183
|
+
f(), v(), d.value = !1;
|
|
184
|
+
};
|
|
185
|
+
return N(m), {
|
|
186
|
+
isSupported: s,
|
|
187
|
+
isActive: d,
|
|
188
|
+
pause() {
|
|
189
|
+
f(), d.value = !1;
|
|
190
|
+
},
|
|
191
|
+
resume() {
|
|
192
|
+
d.value = !0;
|
|
193
|
+
},
|
|
194
|
+
stop: m
|
|
195
|
+
};
|
|
196
|
+
}
|
|
197
|
+
function ge(e, n = {}) {
|
|
198
|
+
const { window: t = M, scrollTarget: o, threshold: r = 0 } = n, i = g(!1);
|
|
199
|
+
return ye(
|
|
200
|
+
e,
|
|
201
|
+
(c) => {
|
|
202
|
+
let l = i.value, s = 0;
|
|
203
|
+
for (const u of c)
|
|
204
|
+
u.time >= s && (s = u.time, l = u.isIntersecting);
|
|
205
|
+
i.value = l;
|
|
206
|
+
},
|
|
207
|
+
{
|
|
208
|
+
root: o,
|
|
209
|
+
window: t,
|
|
210
|
+
threshold: r
|
|
211
|
+
}
|
|
212
|
+
), i;
|
|
213
|
+
}
|
|
214
|
+
const G = 1;
|
|
215
|
+
function Ee(e, n = {}) {
|
|
216
|
+
const {
|
|
217
|
+
throttle: t = 0,
|
|
218
|
+
idle: o = 200,
|
|
219
|
+
onStop: r = T,
|
|
220
|
+
onScroll: i = T,
|
|
221
|
+
offset: c = {
|
|
222
|
+
left: 0,
|
|
223
|
+
right: 0,
|
|
224
|
+
top: 0,
|
|
225
|
+
bottom: 0
|
|
226
|
+
},
|
|
227
|
+
eventListenerOptions: l = {
|
|
228
|
+
capture: !1,
|
|
229
|
+
passive: !0
|
|
230
|
+
},
|
|
231
|
+
behavior: s = "auto",
|
|
232
|
+
window: u = M,
|
|
233
|
+
onError: f = (a) => {
|
|
234
|
+
console.error(a);
|
|
235
|
+
}
|
|
236
|
+
} = n, d = g(0), v = g(0), m = L({
|
|
237
|
+
get() {
|
|
238
|
+
return d.value;
|
|
239
|
+
},
|
|
240
|
+
set(a) {
|
|
241
|
+
S(a, void 0);
|
|
242
|
+
}
|
|
243
|
+
}), p = L({
|
|
244
|
+
get() {
|
|
245
|
+
return v.value;
|
|
246
|
+
},
|
|
247
|
+
set(a) {
|
|
248
|
+
S(void 0, a);
|
|
249
|
+
}
|
|
250
|
+
});
|
|
251
|
+
function S(a, I) {
|
|
252
|
+
var y, O, D;
|
|
253
|
+
if (!u)
|
|
254
|
+
return;
|
|
255
|
+
const _ = b(e);
|
|
256
|
+
_ && ((D = _ instanceof Document ? u.document.body : _) == null || D.scrollTo({
|
|
257
|
+
top: (y = b(I)) != null ? y : p.value,
|
|
258
|
+
left: (O = b(a)) != null ? O : m.value,
|
|
259
|
+
behavior: b(s)
|
|
260
|
+
}));
|
|
261
|
+
}
|
|
262
|
+
const w = g(!1), h = H({
|
|
263
|
+
left: !0,
|
|
264
|
+
right: !1,
|
|
265
|
+
top: !0,
|
|
266
|
+
bottom: !1
|
|
267
|
+
}), E = H({
|
|
268
|
+
left: !1,
|
|
269
|
+
right: !1,
|
|
270
|
+
top: !1,
|
|
271
|
+
bottom: !1
|
|
272
|
+
}), V = (a) => {
|
|
273
|
+
w.value && (w.value = !1, E.left = !1, E.right = !1, E.top = !1, E.bottom = !1, r(a));
|
|
274
|
+
}, U = ve(V, t + o), F = (a) => {
|
|
275
|
+
var I;
|
|
276
|
+
if (!u)
|
|
277
|
+
return;
|
|
278
|
+
const y = ((I = a == null ? void 0 : a.document) == null ? void 0 : I.documentElement) || (a == null ? void 0 : a.documentElement) || x(a), { display: O, flexDirection: D } = getComputedStyle(y), _ = y.scrollLeft;
|
|
279
|
+
E.left = _ < d.value, E.right = _ > d.value;
|
|
280
|
+
const R = Math.abs(_) <= (c.left || 0), B = Math.abs(_) + y.clientWidth >= y.scrollWidth - (c.right || 0) - G;
|
|
281
|
+
O === "flex" && D === "row-reverse" ? (h.left = B, h.right = R) : (h.left = R, h.right = B), d.value = _;
|
|
282
|
+
let W = y.scrollTop;
|
|
283
|
+
a === u.document && !W && (W = u.document.body.scrollTop), E.top = W < v.value, E.bottom = W > v.value;
|
|
284
|
+
const Y = Math.abs(W) <= (c.top || 0), z = Math.abs(W) + y.clientHeight >= y.scrollHeight - (c.bottom || 0) - G;
|
|
285
|
+
O === "flex" && D === "column-reverse" ? (h.top = z, h.bottom = Y) : (h.top = Y, h.bottom = z), v.value = W;
|
|
286
|
+
}, k = (a) => {
|
|
287
|
+
var I;
|
|
288
|
+
if (!u)
|
|
289
|
+
return;
|
|
290
|
+
const y = (I = a.target.documentElement) != null ? I : a.target;
|
|
291
|
+
F(y), w.value = !0, U(a), i(a);
|
|
292
|
+
};
|
|
293
|
+
return P(
|
|
294
|
+
e,
|
|
295
|
+
"scroll",
|
|
296
|
+
t ? pe(k, t, !0, !1) : k,
|
|
297
|
+
l
|
|
298
|
+
), J(() => {
|
|
299
|
+
try {
|
|
300
|
+
const a = b(e);
|
|
301
|
+
if (!a)
|
|
302
|
+
return;
|
|
303
|
+
F(a);
|
|
304
|
+
} catch (a) {
|
|
305
|
+
f(a);
|
|
306
|
+
}
|
|
307
|
+
}), P(
|
|
308
|
+
e,
|
|
309
|
+
"scrollend",
|
|
310
|
+
V,
|
|
311
|
+
l
|
|
312
|
+
), {
|
|
313
|
+
x: m,
|
|
314
|
+
y: p,
|
|
315
|
+
isScrolling: w,
|
|
316
|
+
arrivedState: h,
|
|
317
|
+
directions: E,
|
|
318
|
+
measure() {
|
|
319
|
+
const a = b(e);
|
|
320
|
+
u && a && F(a);
|
|
321
|
+
}
|
|
322
|
+
};
|
|
323
|
+
}
|
|
324
|
+
function Se(e) {
|
|
325
|
+
return typeof Window < "u" && e instanceof Window ? e.document.documentElement : typeof Document < "u" && e instanceof Document ? e.documentElement : e;
|
|
326
|
+
}
|
|
327
|
+
function Q(e, n, t = {}) {
|
|
328
|
+
var o;
|
|
329
|
+
const {
|
|
330
|
+
direction: r = "bottom",
|
|
331
|
+
interval: i = 100,
|
|
332
|
+
canLoadMore: c = () => !0
|
|
333
|
+
} = t, l = H(Ee(
|
|
334
|
+
e,
|
|
335
|
+
{
|
|
336
|
+
...t,
|
|
337
|
+
offset: {
|
|
338
|
+
[r]: (o = t.distance) != null ? o : 0,
|
|
339
|
+
...t.offset
|
|
340
|
+
}
|
|
341
|
+
}
|
|
342
|
+
)), s = g(), u = L(() => !!s.value), f = L(() => Se(b(e))), d = ge(f);
|
|
343
|
+
function v() {
|
|
344
|
+
if (l.measure(), !f.value || !d.value || !c(f.value))
|
|
345
|
+
return;
|
|
346
|
+
const { scrollHeight: m, clientHeight: p, scrollWidth: S, clientWidth: w } = f.value, h = r === "bottom" || r === "top" ? m <= p : S <= w;
|
|
347
|
+
(l.arrivedState[r] || h) && (s.value || (s.value = Promise.all([
|
|
348
|
+
n(l),
|
|
349
|
+
new Promise((E) => setTimeout(E, i))
|
|
350
|
+
]).finally(() => {
|
|
351
|
+
s.value = null, X(() => v());
|
|
352
|
+
})));
|
|
353
|
+
}
|
|
354
|
+
return A(
|
|
355
|
+
() => [l.arrivedState[r], d.value],
|
|
356
|
+
v,
|
|
357
|
+
{ immediate: !0 }
|
|
358
|
+
), {
|
|
359
|
+
isLoading: u
|
|
360
|
+
};
|
|
361
|
+
}
|
|
362
|
+
function Ie(e = {}) {
|
|
363
|
+
const {
|
|
364
|
+
window: n = M,
|
|
365
|
+
initialWidth: t = Number.POSITIVE_INFINITY,
|
|
366
|
+
initialHeight: o = Number.POSITIVE_INFINITY,
|
|
367
|
+
listenOrientation: r = !0,
|
|
368
|
+
includeScrollbar: i = !0
|
|
369
|
+
} = e, c = g(t), l = g(o), s = () => {
|
|
370
|
+
n && (i ? (c.value = n.innerWidth, l.value = n.innerHeight) : (c.value = n.document.documentElement.clientWidth, l.value = n.document.documentElement.clientHeight));
|
|
371
|
+
};
|
|
372
|
+
if (s(), J(s), P("resize", s, { passive: !0 }), r) {
|
|
373
|
+
const u = we("(orientation: portrait)");
|
|
374
|
+
A(u, () => s());
|
|
375
|
+
}
|
|
376
|
+
return { width: c, height: l };
|
|
377
|
+
}
|
|
378
|
+
const We = {
|
|
379
|
+
__name: "InfiniteScroll",
|
|
380
|
+
props: {
|
|
381
|
+
down: {
|
|
382
|
+
type: Boolean,
|
|
383
|
+
default: !0
|
|
384
|
+
},
|
|
385
|
+
up: {
|
|
386
|
+
type: Boolean,
|
|
387
|
+
default: !1
|
|
388
|
+
},
|
|
389
|
+
distance: {
|
|
390
|
+
type: Number,
|
|
391
|
+
default: 10
|
|
392
|
+
}
|
|
393
|
+
},
|
|
394
|
+
emits: ["load"],
|
|
395
|
+
setup(e, { expose: n, emit: t }) {
|
|
396
|
+
const o = e, r = t, i = g(null), c = g(!0);
|
|
397
|
+
n({
|
|
398
|
+
canEmit: c
|
|
399
|
+
}), o.down && Q(
|
|
400
|
+
i,
|
|
401
|
+
() => {
|
|
402
|
+
l("down");
|
|
403
|
+
},
|
|
404
|
+
{ distance: o.distance }
|
|
405
|
+
), o.up && Q(
|
|
406
|
+
i,
|
|
407
|
+
() => {
|
|
408
|
+
l("up");
|
|
409
|
+
},
|
|
410
|
+
{ distance: o.distance, direction: "top" }
|
|
411
|
+
);
|
|
412
|
+
const l = (s) => {
|
|
413
|
+
c.value && (c.value = !1, r("load", s));
|
|
414
|
+
};
|
|
415
|
+
return j(() => {
|
|
416
|
+
i.value.scrollTop = 0;
|
|
417
|
+
}), (s, u) => (re(), ie("div", {
|
|
418
|
+
ref_key: "el",
|
|
419
|
+
ref: i,
|
|
420
|
+
class: "overflow-y-scroll overscroll-none"
|
|
421
|
+
}, [
|
|
422
|
+
le(s.$slots, "default")
|
|
423
|
+
], 512));
|
|
424
|
+
}
|
|
425
|
+
};
|
|
426
|
+
export {
|
|
427
|
+
We as _,
|
|
428
|
+
Ie as u,
|
|
429
|
+
_e as w
|
|
430
|
+
};
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { mergeModels as r, useModel as u, openBlock as o, createElementBlock as a, withDirectives as m, createElementVNode as n, normalizeClass as p, vModelDynamic as f, createCommentVNode as h } from "vue";
|
|
2
|
+
const g = { class: "relative flex-1" }, x = ["name", "type", "placeholder"], y = {
|
|
3
|
+
key: 0,
|
|
4
|
+
class: "pointer-events-none absolute inset-y-0 right-0 flex items-center pr-3"
|
|
5
|
+
}, b = /* @__PURE__ */ n("i", {
|
|
6
|
+
class: "fa-regular fa-circle-exclamation text-error-950 text-lg",
|
|
7
|
+
"aria-hidden": "true"
|
|
8
|
+
}, null, -1), v = [
|
|
9
|
+
b
|
|
10
|
+
], B = {
|
|
11
|
+
__name: "InputField",
|
|
12
|
+
props: /* @__PURE__ */ r({
|
|
13
|
+
hasError: {
|
|
14
|
+
type: Boolean,
|
|
15
|
+
default: !1
|
|
16
|
+
},
|
|
17
|
+
label: {
|
|
18
|
+
type: String,
|
|
19
|
+
default: ""
|
|
20
|
+
},
|
|
21
|
+
placeholder: {
|
|
22
|
+
type: String,
|
|
23
|
+
default: ""
|
|
24
|
+
},
|
|
25
|
+
fieldType: {
|
|
26
|
+
type: String,
|
|
27
|
+
default: "text"
|
|
28
|
+
}
|
|
29
|
+
}, {
|
|
30
|
+
modelValue: {},
|
|
31
|
+
modelModifiers: {}
|
|
32
|
+
}),
|
|
33
|
+
emits: /* @__PURE__ */ r(["blur"], ["update:modelValue"]),
|
|
34
|
+
setup(e, { emit: s }) {
|
|
35
|
+
const i = s, t = u(e, "modelValue"), d = () => {
|
|
36
|
+
i("blur");
|
|
37
|
+
};
|
|
38
|
+
return (V, l) => (o(), a("div", g, [
|
|
39
|
+
m(n("input", {
|
|
40
|
+
"onUpdate:modelValue": l[0] || (l[0] = (c) => t.value = c),
|
|
41
|
+
name: e.label,
|
|
42
|
+
onBlur: d,
|
|
43
|
+
type: e.fieldType,
|
|
44
|
+
class: p(["block w-full rounded-md border-0 py-2.5 px-5 ring-1 ring-inset focus:shadow-md focus:ring-2 focus:outline-none", e.hasError ? "ring-error-950 focus:bg-error-100 focus:ring-error-950 text-error-950 focus:placeholder:text-error-900 pr-10" : "ring-steel-400 focus:bg-app-100 focus:ring-app-700 text-problack placeholder:text-steel-800"]),
|
|
45
|
+
placeholder: e.placeholder
|
|
46
|
+
}, null, 42, x), [
|
|
47
|
+
[f, t.value]
|
|
48
|
+
]),
|
|
49
|
+
e.hasError ? (o(), a("div", y, v)) : h("", !0)
|
|
50
|
+
]));
|
|
51
|
+
}
|
|
52
|
+
};
|
|
53
|
+
export {
|
|
54
|
+
B as _
|
|
55
|
+
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { openBlock as n, createBlock as l, Transition as o, withCtx as i, renderSlot as c } from "vue";
|
|
2
|
+
const v = {
|
|
3
|
+
__name: "OpacityScaleTransition",
|
|
4
|
+
emits: ["after-enter", "after-leave"],
|
|
5
|
+
setup(f, { emit: a }) {
|
|
6
|
+
const t = a;
|
|
7
|
+
return (s, e) => (n(), l(o, {
|
|
8
|
+
"enter-active-class": "transition-all ease-out duration-300 scale-100",
|
|
9
|
+
"enter-from-class": "opacity-0 scale-95",
|
|
10
|
+
"enter-to-class": "opacity-100 scale-100",
|
|
11
|
+
"leave-active-class": "transition-all ease-in duration-200 scale-100",
|
|
12
|
+
"leave-from-class": "opacity-100 scale-100",
|
|
13
|
+
"leave-to-class": "opacity-0 scale-95",
|
|
14
|
+
onAfterEnter: e[0] || (e[0] = (r) => t("after-enter")),
|
|
15
|
+
onAfterLeave: e[1] || (e[1] = (r) => t("after-leave"))
|
|
16
|
+
}, {
|
|
17
|
+
default: i(() => [
|
|
18
|
+
c(s.$slots, "default")
|
|
19
|
+
]),
|
|
20
|
+
_: 3
|
|
21
|
+
}));
|
|
22
|
+
}
|
|
23
|
+
};
|
|
24
|
+
export {
|
|
25
|
+
v as _
|
|
26
|
+
};
|