@vehiclehistory/property-lib 0.0.8 → 0.0.10

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.
@@ -1,109 +0,0 @@
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
- };
@@ -1,15 +0,0 @@
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
- };
@@ -1,32 +0,0 @@
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
- };