@npm_leadtech/legal-contracts-ui 0.136.3 → 0.137.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 +11 -11
- package/package.json +1 -1
package/dist/components/Modal.js
CHANGED
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsxs as
|
|
2
|
+
import { jsxs as a, Fragment as u, jsx as e } from "react/jsx-runtime";
|
|
3
3
|
import "react";
|
|
4
4
|
import { createPortal as m } from "react-dom";
|
|
5
5
|
import { CloseIcon as d } from "./CloseIcon.js";
|
|
6
|
-
const
|
|
6
|
+
const y = ({ trigger: o, children: i, isOpen: r, setIsOpen: s, showClose: c, onTrigger: l }) => {
|
|
7
7
|
const t = () => {
|
|
8
|
-
|
|
8
|
+
l && l(), s(!r);
|
|
9
9
|
};
|
|
10
|
-
return /* @__PURE__ */
|
|
11
|
-
!!
|
|
12
|
-
|
|
10
|
+
return /* @__PURE__ */ a(u, { children: [
|
|
11
|
+
!!o && /* @__PURE__ */ e("button", { "aria-label": "zoom", onClick: t, className: "flex w-full cursor-pointer justify-center", children: o }),
|
|
12
|
+
r && m(
|
|
13
13
|
/* @__PURE__ */ e(
|
|
14
14
|
"button",
|
|
15
15
|
{
|
|
16
16
|
className: "bg-primary-900/80 fixed inset-0 z-1001 flex items-center justify-center",
|
|
17
|
-
onClick: (
|
|
18
|
-
|
|
17
|
+
onClick: (n) => {
|
|
18
|
+
n.target === n.currentTarget && t();
|
|
19
19
|
},
|
|
20
|
-
children: /* @__PURE__ */ e("div", { className: "relative flex max-h-screen w-full items-start justify-center overflow-y-auto px-6 py-24", children: /* @__PURE__ */
|
|
21
|
-
|
|
20
|
+
children: /* @__PURE__ */ e("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("div", { className: "pointer-events-auto relative", children: [
|
|
21
|
+
c && /* @__PURE__ */ e(
|
|
22
22
|
"button",
|
|
23
23
|
{
|
|
24
24
|
type: "button",
|
|
@@ -37,5 +37,5 @@ const x = ({ trigger: l, children: i, isOpen: o, setIsOpen: c, showClose: s, onT
|
|
|
37
37
|
] });
|
|
38
38
|
};
|
|
39
39
|
export {
|
|
40
|
-
|
|
40
|
+
y as Modal
|
|
41
41
|
};
|