intelicoreact 1.2.25 → 1.2.26

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.
@@ -62,8 +62,8 @@ function useMobileModal(_ref) {
62
62
  var bodyTop = modalMobileBodyRef === null || modalMobileBodyRef === void 0 ? void 0 : (_modalMobileBodyRef$c = modalMobileBodyRef.current) === null || _modalMobileBodyRef$c === void 0 ? void 0 : (_modalMobileBodyRef$c2 = _modalMobileBodyRef$c.getBoundingClientRect()) === null || _modalMobileBodyRef$c2 === void 0 ? void 0 : _modalMobileBodyRef$c2.top;
63
63
  var modal = modalRef === null || modalRef === void 0 ? void 0 : modalRef.current;
64
64
  var modalStyle = modal ? modal.currentStyle || window.getComputedStyle(modal) : {};
65
- var modalHeight = modal ? (modal === null || modal === void 0 ? void 0 : (_modal$getBoundingCli = modal.getBoundingClientRect()) === null || _modal$getBoundingCli === void 0 ? void 0 : _modal$getBoundingCli.height) + parseFloat(modalStyle === null || modalStyle === void 0 ? void 0 : modalStyle.marginTop) : 0;
66
- var windowHeight = window.screen.availHeight;
65
+ var modalHeight = modal ? (modal === null || modal === void 0 ? void 0 : (_modal$getBoundingCli = modal.getBoundingClientRect()) === null || _modal$getBoundingCli === void 0 ? void 0 : _modal$getBoundingCli.height) + parseFloat((modalStyle === null || modalStyle === void 0 ? void 0 : modalStyle.marginTop) || 0) : 0;
66
+ var windowHeight = document.documentElement.clientHeight || window.screen.availHeight || window.screen.height;
67
67
  var modalContainer = modalMobileContainerRef === null || modalMobileContainerRef === void 0 ? void 0 : modalMobileContainerRef.current;
68
68
  /* MODALS LOGIC | BEGIN */
69
69
  // Detect Mobile
@@ -99,7 +99,7 @@ function useMobileModal(_ref) {
99
99
  modalContainer.style.removeProperty('align-items');
100
100
  }
101
101
  }
102
- }, [modalHeight, windowHeight, modal, modalContainer]);
102
+ }, [modalHeight, windowHeight]);
103
103
  var MODALS_LOGIC = {
104
104
  IS_HEADER_HIDDEN: !isMobile || noMobileModalLogic ? false : footerBottom * -1 <= footerHeight || scrollDirection === SCROLL_DIRECTION.DOWN,
105
105
  IS_HEADER_STICKY: !isMobile || noMobileModalLogic ? false : headerTop <= 0,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "intelicoreact",
3
- "version": "1.2.25",
3
+ "version": "1.2.26",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "files": [