@npm_leadtech/legal-contracts-ui 0.145.0 → 0.145.2
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/Modal.js +54 -31
- package/dist/components/SaveIcon.js +24 -7
- package/package.json +1 -1
package/dist/components/Modal.js
CHANGED
|
@@ -1,41 +1,64 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsxs as
|
|
3
|
-
import { useEffect as
|
|
4
|
-
import { createPortal as
|
|
2
|
+
import { jsxs as a, Fragment as f, jsx as o } from "react/jsx-runtime";
|
|
3
|
+
import { useEffect as m } from "react";
|
|
4
|
+
import { createPortal as p } from "react-dom";
|
|
5
5
|
import { CloseIcon as y } from "./CloseIcon.js";
|
|
6
|
-
const
|
|
7
|
-
const
|
|
8
|
-
|
|
9
|
-
},
|
|
10
|
-
|
|
6
|
+
const w = ({ trigger: r, children: i, isOpen: t, setIsOpen: l, showClose: s, onTrigger: c }) => {
|
|
7
|
+
const d = () => {
|
|
8
|
+
c?.(), l(!0);
|
|
9
|
+
}, n = () => {
|
|
10
|
+
l(!1);
|
|
11
|
+
}, u = (e) => {
|
|
12
|
+
e.target === e.currentTarget && n();
|
|
11
13
|
};
|
|
12
|
-
return
|
|
13
|
-
if (!
|
|
14
|
-
const
|
|
14
|
+
return m(() => {
|
|
15
|
+
if (!t) return;
|
|
16
|
+
const e = document.body.style.overflow;
|
|
15
17
|
return document.body.style.overflow = "hidden", () => {
|
|
16
|
-
document.body.style.overflow =
|
|
18
|
+
document.body.style.overflow = e;
|
|
17
19
|
};
|
|
18
|
-
}, [
|
|
19
|
-
!!
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
"button",
|
|
20
|
+
}, [t]), /* @__PURE__ */ a(f, { children: [
|
|
21
|
+
!!r && /* @__PURE__ */ o(
|
|
22
|
+
"button",
|
|
23
|
+
{
|
|
24
|
+
type: "button",
|
|
25
|
+
"aria-label": "zoom",
|
|
26
|
+
onClick: d,
|
|
27
|
+
className: "flex w-full cursor-pointer justify-center",
|
|
28
|
+
children: r
|
|
29
|
+
}
|
|
30
|
+
),
|
|
31
|
+
t && p(
|
|
32
|
+
/* @__PURE__ */ o(
|
|
33
|
+
"div",
|
|
23
34
|
{
|
|
35
|
+
role: "dialog",
|
|
36
|
+
"aria-modal": "true",
|
|
37
|
+
"data-testid": "modal-backdrop",
|
|
24
38
|
className: "bg-primary-900/80 fixed inset-0 z-1001 flex items-center justify-center",
|
|
25
39
|
onClick: u,
|
|
26
|
-
children: /* @__PURE__ */
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
40
|
+
children: /* @__PURE__ */ o("div", { className: "pointer-events-none relative flex max-h-screen w-full items-start justify-center overflow-y-auto px-6 py-24", children: /* @__PURE__ */ a(
|
|
41
|
+
"div",
|
|
42
|
+
{
|
|
43
|
+
className: "pointer-events-auto relative",
|
|
44
|
+
onClick: (e) => {
|
|
45
|
+
e.stopPropagation();
|
|
46
|
+
},
|
|
47
|
+
children: [
|
|
48
|
+
s && /* @__PURE__ */ o(
|
|
49
|
+
"button",
|
|
50
|
+
{
|
|
51
|
+
type: "button",
|
|
52
|
+
className: "absolute top-4 right-4 z-10 cursor-pointer rounded-full p-2 transition-colors hover:bg-neutral-100 focus:outline-none",
|
|
53
|
+
onClick: n,
|
|
54
|
+
"aria-label": "Close",
|
|
55
|
+
children: /* @__PURE__ */ o(y, {})
|
|
56
|
+
}
|
|
57
|
+
),
|
|
58
|
+
i
|
|
59
|
+
]
|
|
60
|
+
}
|
|
61
|
+
) })
|
|
39
62
|
}
|
|
40
63
|
),
|
|
41
64
|
document.body
|
|
@@ -43,5 +66,5 @@ const x = ({ trigger: l, children: a, isOpen: o, setIsOpen: c, showClose: i, onT
|
|
|
43
66
|
] });
|
|
44
67
|
};
|
|
45
68
|
export {
|
|
46
|
-
|
|
69
|
+
w as Modal
|
|
47
70
|
};
|
|
@@ -1,14 +1,31 @@
|
|
|
1
1
|
import { jsx as l } from "react/jsx-runtime";
|
|
2
2
|
import "react";
|
|
3
|
-
const i = (
|
|
4
|
-
"
|
|
3
|
+
const i = ({
|
|
4
|
+
fill: a = "var(--color-neutral-900)",
|
|
5
|
+
width: e = 16,
|
|
6
|
+
height: o = 16,
|
|
7
|
+
...n
|
|
8
|
+
}) => /* @__PURE__ */ l(
|
|
9
|
+
"svg",
|
|
5
10
|
{
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
11
|
+
className: "shrink-0",
|
|
12
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
13
|
+
width: e,
|
|
14
|
+
height: o,
|
|
15
|
+
fill: "none",
|
|
16
|
+
viewBox: "0 0 16 16",
|
|
17
|
+
...n,
|
|
18
|
+
children: /* @__PURE__ */ l(
|
|
19
|
+
"path",
|
|
20
|
+
{
|
|
21
|
+
fill: a,
|
|
22
|
+
fillRule: "evenodd",
|
|
23
|
+
d: "m10.028 7.423-1.306 1.45V1.806a.722.722 0 0 0-1.444 0v7.067l-1.306-1.45a.759.759 0 0 0-1.129 1.014l2.412 2.691a1 1 0 0 0 1.49 0l2.412-2.69a.76.76 0 0 0-1.13-1.015m3.028 1.633a.722.722 0 1 1 1.444 0v5.528a1 1 0 0 1-1 1h-11a1 1 0 0 1-1-1V9.056a.722.722 0 0 1 1.444 0v4.916h10.112z",
|
|
24
|
+
clipRule: "evenodd"
|
|
25
|
+
}
|
|
26
|
+
)
|
|
10
27
|
}
|
|
11
|
-
)
|
|
28
|
+
);
|
|
12
29
|
export {
|
|
13
30
|
i as SaveIcon
|
|
14
31
|
};
|