@vehiclehistory/property-lib 0.0.4 → 0.0.6
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/assets/LoadingBar.css +1 -0
- package/dist/components/Accordion/Accordion.js +69 -0
- package/dist/components/Alert/Alert.js +66 -0
- package/dist/components/Autocomplete/Autocomplete.js +173 -0
- package/dist/components/Badge/Badge.js +25 -0
- package/dist/components/Button/Button.js +43 -0
- package/dist/components/ButtonGroup/ButtonGroup.js +6 -0
- package/dist/components/Card/Card.js +32 -0
- package/dist/components/Checkbox/Checkbox.js +44 -0
- package/dist/components/Container/Container.js +33 -0
- package/dist/components/Dialog/Dialog.js +88 -0
- package/dist/components/Dialog/DialogOld.js +109 -0
- package/dist/components/Dots/Dots.js +15 -0
- package/dist/components/Icon/Icon.d.ts +1 -1
- package/dist/components/Icon/Icon.js +32 -0
- package/dist/components/Icon/icons.js +475 -0
- package/dist/components/Loading/LoadingBar.d.ts +3 -0
- package/dist/components/Loading/LoadingBar.js +48 -0
- package/dist/components/Loading/Spinner.js +18 -0
- package/dist/components/Popover/Popover.js +57 -0
- package/dist/components/Progress/ProgressBar.js +50 -0
- package/dist/components/Radio/Radio.js +46 -0
- package/dist/components/Select/Select.js +61 -0
- package/dist/components/Skeleton/Skeleton.js +20 -0
- package/dist/components/Slider/Slider.js +58 -0
- package/dist/components/Stars/Stars.js +23 -0
- package/dist/components/Swiper/Swiper.js +107 -0
- package/dist/components/Text/TextArea.js +53 -0
- package/dist/components/Text/Textbox.js +78 -0
- package/dist/components/index.js +50 -0
- package/dist/main.js +52 -0
- package/dist/scripts/index.js +764 -0
- package/package.json +8 -5
- package/dist/property-ui-lib.js +0 -2350
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
import { jsxs as n, Fragment as z, jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import { memo as A, useRef as B, useEffect as F } from "react";
|
|
3
|
+
import c from "classnames";
|
|
4
|
+
import I from "../Icon/Icon.js";
|
|
5
|
+
const M = ({
|
|
6
|
+
activator: r,
|
|
7
|
+
id: l = "",
|
|
8
|
+
children: g,
|
|
9
|
+
className: u = "",
|
|
10
|
+
contentClass: h = "",
|
|
11
|
+
onClose: d,
|
|
12
|
+
disableOutsideClick: p = !1,
|
|
13
|
+
footer: m,
|
|
14
|
+
fullMobile: x = !0,
|
|
15
|
+
headerClass: y = "",
|
|
16
|
+
hideClose: w = !1,
|
|
17
|
+
iconSize: C = "medium",
|
|
18
|
+
isOpen: s = !1,
|
|
19
|
+
setDialogOpen: f,
|
|
20
|
+
stickyHeader: N = !1,
|
|
21
|
+
title: b = "",
|
|
22
|
+
titleClass: k = ""
|
|
23
|
+
}) => {
|
|
24
|
+
const o = B(null), i = async () => {
|
|
25
|
+
o.current.classList.add("closing"), await j(o.current), o.current.classList.remove("closing"), d && d(), f(!1);
|
|
26
|
+
}, $ = async (e) => {
|
|
27
|
+
e.key === "Escape" && await i();
|
|
28
|
+
}, D = async ({ clientX: e, clientY: a, target: v }) => {
|
|
29
|
+
const { left: E, right: R, top: K, bottom: L } = o.current.getBoundingClientRect() ?? {};
|
|
30
|
+
(!o.current.contains(v) || e < E || e > R || a < K || a > L) && await i();
|
|
31
|
+
}, j = (e) => Promise.allSettled(
|
|
32
|
+
e.getAnimations().map((a) => a.finished)
|
|
33
|
+
);
|
|
34
|
+
return F(() => {
|
|
35
|
+
const e = o.current;
|
|
36
|
+
e && (s ? e.showModal() : typeof e.close == "function" && e.close());
|
|
37
|
+
}, [s]), /* @__PURE__ */ n(z, { children: [
|
|
38
|
+
r && /* @__PURE__ */ t("span", { id: `${l}-dialog-activator`, onClick: () => f(!0), children: r }),
|
|
39
|
+
/* @__PURE__ */ n(
|
|
40
|
+
"dialog",
|
|
41
|
+
{
|
|
42
|
+
ref: o,
|
|
43
|
+
id: `${l}-dialog`,
|
|
44
|
+
className: c(
|
|
45
|
+
"dialog",
|
|
46
|
+
{
|
|
47
|
+
hidden: !s,
|
|
48
|
+
"xs-max:h-full xs-max:max-h-full": x
|
|
49
|
+
},
|
|
50
|
+
u
|
|
51
|
+
),
|
|
52
|
+
onKeyDown: $,
|
|
53
|
+
onClick: (e) => p ? null : D(e),
|
|
54
|
+
children: [
|
|
55
|
+
/* @__PURE__ */ n(
|
|
56
|
+
"header",
|
|
57
|
+
{
|
|
58
|
+
className: c(
|
|
59
|
+
"dialog-header flex items-center p-4",
|
|
60
|
+
{ "sticky top-0 bg-white": N },
|
|
61
|
+
y
|
|
62
|
+
),
|
|
63
|
+
children: [
|
|
64
|
+
/* @__PURE__ */ t("h3", { id: `${l}-dialog-title`, className: k, children: b || "" }),
|
|
65
|
+
!w && /* @__PURE__ */ t(
|
|
66
|
+
"button",
|
|
67
|
+
{
|
|
68
|
+
type: "button",
|
|
69
|
+
title: "Close",
|
|
70
|
+
className: "dialog-close",
|
|
71
|
+
"data-dialog-close": "",
|
|
72
|
+
onClick: i,
|
|
73
|
+
children: /* @__PURE__ */ t(
|
|
74
|
+
I,
|
|
75
|
+
{
|
|
76
|
+
name: "close",
|
|
77
|
+
size: C,
|
|
78
|
+
className: "pointer-events-none"
|
|
79
|
+
}
|
|
80
|
+
)
|
|
81
|
+
}
|
|
82
|
+
)
|
|
83
|
+
]
|
|
84
|
+
}
|
|
85
|
+
),
|
|
86
|
+
/* @__PURE__ */ t(
|
|
87
|
+
"div",
|
|
88
|
+
{
|
|
89
|
+
id: `${l}-dialog-content`,
|
|
90
|
+
className: c("dialog-content p-4", h),
|
|
91
|
+
children: g
|
|
92
|
+
}
|
|
93
|
+
),
|
|
94
|
+
m && /* @__PURE__ */ t(
|
|
95
|
+
"footer",
|
|
96
|
+
{
|
|
97
|
+
id: `${l}-dialog-footer`,
|
|
98
|
+
className: "dialog-footer flex justify-between items-center p-4 border-t",
|
|
99
|
+
children: m
|
|
100
|
+
}
|
|
101
|
+
)
|
|
102
|
+
]
|
|
103
|
+
}
|
|
104
|
+
)
|
|
105
|
+
] });
|
|
106
|
+
}, H = A(M);
|
|
107
|
+
export {
|
|
108
|
+
H as default
|
|
109
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { jsxs as n, jsx as a } from "react/jsx-runtime";
|
|
2
|
+
import t from "classnames";
|
|
3
|
+
const l = ({ className: s = "" }) => /* @__PURE__ */ n("div", { id: "dots", className: t("mx-auto", s), children: [
|
|
4
|
+
/* @__PURE__ */ a("span", { style: { animationDelay: "0.1s" } }),
|
|
5
|
+
/* @__PURE__ */ a("span", { style: { animationDelay: "0.2s" } }),
|
|
6
|
+
/* @__PURE__ */ a("span", { style: { animationDelay: "0.3s" } }),
|
|
7
|
+
/* @__PURE__ */ a("span", { style: { animationDelay: "0.4s" } }),
|
|
8
|
+
/* @__PURE__ */ a("span", { style: { animationDelay: "0.5s" } }),
|
|
9
|
+
/* @__PURE__ */ a("span", { style: { animationDelay: "0.6s" } }),
|
|
10
|
+
/* @__PURE__ */ a("span", { style: { animationDelay: "0.7s" } }),
|
|
11
|
+
/* @__PURE__ */ a("span", { style: { animationDelay: "0.8s" } })
|
|
12
|
+
] });
|
|
13
|
+
export {
|
|
14
|
+
l as default
|
|
15
|
+
};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { jsx as u } from "react/jsx-runtime";
|
|
2
|
+
import { memo as g, useState as r, useEffect as c } from "react";
|
|
3
|
+
import { getIcon as p, sizeClasses as x } from "./icons.js";
|
|
4
|
+
const I = ({
|
|
5
|
+
color: e = "text-current",
|
|
6
|
+
className: o,
|
|
7
|
+
name: s,
|
|
8
|
+
size: m = "medium",
|
|
9
|
+
viewBox: i = "0 0 20 20"
|
|
10
|
+
}) => {
|
|
11
|
+
const t = p(s), [l, a] = r(e), [n, f] = r(t);
|
|
12
|
+
return c(() => {
|
|
13
|
+
f(t);
|
|
14
|
+
}, [t]), c(() => {
|
|
15
|
+
a(e);
|
|
16
|
+
}, [e]), !t && console.error("Icon does not exist", s), /* @__PURE__ */ u(
|
|
17
|
+
"svg",
|
|
18
|
+
{
|
|
19
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
20
|
+
className: `${x[m]} fill-current flex-shrink-0 ${l}${o ? ` ${o}` : ""}`,
|
|
21
|
+
style: { maxWidth: "4em" },
|
|
22
|
+
role: "presentation",
|
|
23
|
+
viewBox: i,
|
|
24
|
+
dangerouslySetInnerHTML: {
|
|
25
|
+
__html: n && n.path
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
);
|
|
29
|
+
}, v = g(I);
|
|
30
|
+
export {
|
|
31
|
+
v as default
|
|
32
|
+
};
|