react-motion-modal 1.0.5 → 1.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.
Files changed (2) hide show
  1. package/dist/index.js +2 -2
  2. package/package.json +11 -3
package/dist/index.js CHANGED
@@ -5717,13 +5717,13 @@ const as = (t) => {
5717
5717
  })), eh = ({ modals: t, initialParams: e }) => {
5718
5718
  const n = us((o) => o.activeModals), i = us((o) => o.closeModal), s = et(null);
5719
5719
  return he(() => {
5720
- if (s.current = document.body, n?.length === 0 || !n[n.length - 1].params?.closeOnPressEsc)
5720
+ if (s.current = document.body, n?.length === 0 || !n[n.length - 1].params?.closeOnPressEsc && e?.closeOnPressEsc)
5721
5721
  return;
5722
5722
  const o = () => {
5723
5723
  i();
5724
5724
  };
5725
5725
  return Fn.bind(["escape"], o), () => Fn.unbind(["escape"], o);
5726
- }, [n, i]), s.current && Uc.createPortal(
5726
+ }, [n, i, e?.closeOnPressEsc]), s.current && Uc.createPortal(
5727
5727
  /* @__PURE__ */ X(nu, { initial: !0, mode: "popLayout", children: n?.map((o, r) => {
5728
5728
  const l = t[o.name], u = o.params || e, a = u?.animate || e?.animate, f = u?.onClose || e?.onClose, h = u?.container || e?.container, c = u?.body || e?.body, g = u?.closeOnClickOutside || e?.closeOnClickOutside;
5729
5729
  return /* @__PURE__ */ X(
package/package.json CHANGED
@@ -1,14 +1,22 @@
1
1
  {
2
2
  "name": "react-motion-modal",
3
- "version": "1.0.5",
3
+ "version": "1.0.6",
4
4
  "type": "module",
5
5
  "license": "MIT",
6
6
  "main": "./dist/index.js",
7
7
  "module": "./dist/index.d.ts",
8
8
  "author": "Ngô Văn Sơn",
9
- "files": ["dist"],
9
+ "files": [
10
+ "dist"
11
+ ],
10
12
  "homepage": "https://github.com/sonnv1912/react-motion-modal",
11
- "keywords": ["react", "modal", "animated", "framer-motion", "react-modal"],
13
+ "keywords": [
14
+ "react",
15
+ "modal",
16
+ "animated",
17
+ "framer-motion",
18
+ "react-modal"
19
+ ],
12
20
  "repository": {
13
21
  "type": "git",
14
22
  "url": "git+https://github.com/sonnv1912/react-motion-modal.git"