@skedulo/sked-ui 21.0.0-alpha.3 → 21.0.0-alpha.4
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/index.js +9 -16
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -6357,8 +6357,8 @@ var PopOut = function PopOut(props) {
|
|
|
6357
6357
|
openOnMount: openOnMount
|
|
6358
6358
|
}),
|
|
6359
6359
|
visible = _usePopOut.visible,
|
|
6360
|
-
|
|
6361
|
-
|
|
6360
|
+
closePopOut = _usePopOut.closePopOut,
|
|
6361
|
+
openPopOut = _usePopOut.openPopOut;
|
|
6362
6362
|
|
|
6363
6363
|
var contentRef = react__WEBPACK_IMPORTED_MODULE_0__["useRef"](null);
|
|
6364
6364
|
var triggerRef = react__WEBPACK_IMPORTED_MODULE_0__["useRef"](null);
|
|
@@ -6370,10 +6370,7 @@ var PopOut = function PopOut(props) {
|
|
|
6370
6370
|
return null;
|
|
6371
6371
|
}, [visible, triggerRef.current]);
|
|
6372
6372
|
|
|
6373
|
-
var onTriggerClick = function onTriggerClick(
|
|
6374
|
-
// stop propagation here since we don't want this interaction to interfere with the document click handler we setup.
|
|
6375
|
-
e.stopPropagation();
|
|
6376
|
-
|
|
6373
|
+
var onTriggerClick = function onTriggerClick() {
|
|
6377
6374
|
if (visible && closeOnFirstClick) {
|
|
6378
6375
|
closePopOut();
|
|
6379
6376
|
} else if (!visible) {
|
|
@@ -6393,7 +6390,7 @@ var PopOut = function PopOut(props) {
|
|
|
6393
6390
|
return;
|
|
6394
6391
|
}
|
|
6395
6392
|
|
|
6396
|
-
var pageScrolled = triggerRect.top !== updatedTriggerRect.top || triggerRect.left !== updatedTriggerRect.left;
|
|
6393
|
+
var pageScrolled = triggerRect.top !== updatedTriggerRect.top || triggerRect.left !== updatedTriggerRect.left;
|
|
6397
6394
|
|
|
6398
6395
|
if (closeOnScroll && pageScrolled) {
|
|
6399
6396
|
closePopOut();
|
|
@@ -10720,18 +10717,14 @@ var usePopOut = function usePopOut(_ref) {
|
|
|
10720
10717
|
}
|
|
10721
10718
|
}, [preventShow]);
|
|
10722
10719
|
var closePopOut = react__WEBPACK_IMPORTED_MODULE_1__["useCallback"](function () {
|
|
10723
|
-
|
|
10724
|
-
setIsOpen(false);
|
|
10720
|
+
setIsOpen(false);
|
|
10725
10721
|
|
|
10726
|
-
|
|
10727
|
-
|
|
10728
|
-
}
|
|
10722
|
+
if (isOpen && onClose) {
|
|
10723
|
+
onClose();
|
|
10729
10724
|
}
|
|
10730
|
-
}, [isOpen]);
|
|
10725
|
+
}, [isOpen, onClose]);
|
|
10731
10726
|
var openPopOut = react__WEBPACK_IMPORTED_MODULE_1__["useCallback"](function () {
|
|
10732
|
-
|
|
10733
|
-
setIsOpen(true);
|
|
10734
|
-
}
|
|
10727
|
+
setIsOpen(true);
|
|
10735
10728
|
}, [isOpen]);
|
|
10736
10729
|
return {
|
|
10737
10730
|
visible: visible,
|