stone-kit 0.0.770 → 0.0.771

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,34 +1,34 @@
1
- import { jsxs as $, jsx as r } from "react/jsx-runtime";
1
+ import { jsxs as $, jsx as n } from "react/jsx-runtime";
2
2
  import { useEffect as N } from "react";
3
- import { createPortal as w } from "react-dom";
4
- const C = "_root_1k6wm_1", L = "_modalBody_1k6wm_15", b = "_modalOverlay_1k6wm_19", x = "_isTransparentBack_1k6wm_31", s = {
5
- root: C,
3
+ import { createPortal as C } from "react-dom";
4
+ const w = "_root_1k6wm_1", L = "_modalBody_1k6wm_15", x = "_modalOverlay_1k6wm_19", T = "_isTransparentBack_1k6wm_31", s = {
5
+ root: w,
6
6
  modalBody: L,
7
- modalOverlay: b,
8
- isTransparentBack: x
7
+ modalOverlay: x,
8
+ isTransparentBack: T
9
9
  }, h = ({
10
- isOpen: l,
11
- emitIsOpen: t,
12
- isTransparentBack: d = !1,
13
- isClickOutside: n = !0,
10
+ isOpen: d,
11
+ emitIsOpen: r,
12
+ isTransparentBack: l = !1,
13
+ isClickOutside: t = !0,
14
14
  leaveDisableScroll: i = !1,
15
15
  createPortalObj: o,
16
16
  additionalClass: m,
17
17
  additionalClassOverlay: c,
18
18
  additionalClassModalBody: f,
19
19
  opacity: u = 0.7,
20
- colorOverlay: a,
20
+ colorOverlay: e,
21
21
  notDisableScroll: y = !1,
22
22
  children: _,
23
23
  modalBodyRef: k,
24
24
  additionalStylesModalBody: v
25
25
  }) => {
26
26
  const p = () => {
27
- n && t(!1);
27
+ t && r(!1);
28
28
  };
29
29
  N(() => {
30
30
  if (!y) {
31
- if (l) {
31
+ if (d) {
32
32
  if (document.body.classList.contains("disable-scroll"))
33
33
  return;
34
34
  document.body.classList.add("disable-scroll");
@@ -39,25 +39,25 @@ const C = "_root_1k6wm_1", L = "_modalBody_1k6wm_15", b = "_modalOverlay_1k6wm_1
39
39
  }
40
40
  return () => document.body.classList.remove("disable-scroll");
41
41
  }
42
- }, [l]);
43
- const e = /* @__PURE__ */ $(
42
+ }, [d]);
43
+ const a = /* @__PURE__ */ $(
44
44
  "div",
45
45
  {
46
46
  className: `${s.root} ${m}`,
47
47
  onClick: (B) => B.stopPropagation(),
48
48
  children: [
49
- /* @__PURE__ */ r(
49
+ /* @__PURE__ */ n(
50
50
  "div",
51
51
  {
52
52
  onClick: p,
53
- className: `${s.modalOverlay} ${c} ${d ? s.isTransparentBack : ""}`,
53
+ className: `${s.modalOverlay} ${c} ${l ? s.isTransparentBack : ""}`,
54
54
  style: {
55
- opacity: d ? u : void 0,
56
- backgroundColor: a || void 0
55
+ opacity: l ? u : void 0,
56
+ backgroundColor: e || void 0
57
57
  }
58
58
  }
59
59
  ),
60
- /* @__PURE__ */ r(
60
+ /* @__PURE__ */ n(
61
61
  "div",
62
62
  {
63
63
  className: `${s.modalBody} ${f}`,
@@ -69,7 +69,7 @@ const C = "_root_1k6wm_1", L = "_modalBody_1k6wm_15", b = "_modalOverlay_1k6wm_1
69
69
  ]
70
70
  }
71
71
  );
72
- return l ? o != null && o.domNode ? w(e, o.domNode, o.key) : e : null;
72
+ return d ? o != null && o.domNode && o.domNode.isConnected ? C(a, o.domNode, o.key) : a : null;
73
73
  };
74
74
  export {
75
75
  h as Modal
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "stone-kit",
3
3
  "description": "uikit for redesign",
4
4
  "private": false,
5
- "version": "0.0.770",
5
+ "version": "0.0.771",
6
6
  "author": "Mollycodd1e",
7
7
  "license": "ISC",
8
8
  "type": "module",