dirk-cfx-react 1.1.56 → 1.1.58
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/index.cjs +9 -2
- package/dist/components/index.cjs.map +1 -1
- package/dist/components/index.js +9 -2
- package/dist/components/index.js.map +1 -1
- package/dist/index.cjs +69 -62
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +11 -4
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -2548,6 +2548,7 @@ function Modal({
|
|
|
2548
2548
|
children
|
|
2549
2549
|
}) {
|
|
2550
2550
|
const theme = core.useMantineTheme();
|
|
2551
|
+
const pointerDownOnOverlay = react.useRef(false);
|
|
2551
2552
|
return /* @__PURE__ */ jsxRuntime.jsx(core.Portal, { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
2552
2553
|
framerMotion.motion.div,
|
|
2553
2554
|
{
|
|
@@ -2563,7 +2564,14 @@ function Modal({
|
|
|
2563
2564
|
justifyContent: "center",
|
|
2564
2565
|
background: "rgba(0,0,0,0.65)"
|
|
2565
2566
|
},
|
|
2566
|
-
|
|
2567
|
+
onPointerDown: (e) => {
|
|
2568
|
+
pointerDownOnOverlay.current = e.target === e.currentTarget;
|
|
2569
|
+
},
|
|
2570
|
+
onClick: (e) => {
|
|
2571
|
+
if (clickOutside && e.target === e.currentTarget && pointerDownOnOverlay.current) {
|
|
2572
|
+
onClose();
|
|
2573
|
+
}
|
|
2574
|
+
},
|
|
2567
2575
|
children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2568
2576
|
framerMotion.motion.div,
|
|
2569
2577
|
{
|
|
@@ -2571,7 +2579,6 @@ function Modal({
|
|
|
2571
2579
|
animate: { opacity: 1, scale: 1, y: 0 },
|
|
2572
2580
|
exit: { opacity: 0, scale: 0.96, y: 8 },
|
|
2573
2581
|
transition: { duration: 0.18, ease: "easeOut" },
|
|
2574
|
-
onClick: (e) => e.stopPropagation(),
|
|
2575
2582
|
style: {
|
|
2576
2583
|
background: core.alpha(theme.colors.dark[9], 0.98),
|
|
2577
2584
|
border: `0.1vh solid ${theme.colors.dark[7]}`,
|