@luminati-io/uikit 5.2.0 → 5.2.2
Sign up to get free protection for your applications and to get access to all the features.
@@ -45419,25 +45419,27 @@ var Tooltip = function Tooltip(_ref) {
|
|
45419
45419
|
_useState8 = _slicedToArray(_useState7, 2),
|
45420
45420
|
visible = _useState8[0],
|
45421
45421
|
setVisible = _useState8[1];
|
45422
|
-
var
|
45422
|
+
var hideTimer = (0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)();
|
45423
45423
|
var showTimer = (0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)();
|
45424
|
+
var clearTimers = (0,react__WEBPACK_IMPORTED_MODULE_1__.useCallback)(function () {
|
45425
|
+
clearTimeout(showTimer.current);
|
45426
|
+
clearTimeout(hideTimer.current);
|
45427
|
+
}, []);
|
45424
45428
|
var show = (0,react__WEBPACK_IMPORTED_MODULE_1__.useCallback)(function () {
|
45425
|
-
|
45429
|
+
clearTimers();
|
45426
45430
|
showTimer.current = setTimeout(function () {
|
45427
45431
|
return setVisible(true);
|
45428
45432
|
}, showDelay);
|
45429
45433
|
}, [showDelay]);
|
45430
45434
|
var hide = (0,react__WEBPACK_IMPORTED_MODULE_1__.useCallback)(function () {
|
45431
|
-
|
45432
|
-
|
45433
|
-
closeTimer.current = setTimeout(function () {
|
45435
|
+
clearTimers();
|
45436
|
+
hideTimer.current = setTimeout(function () {
|
45434
45437
|
return setVisible(false);
|
45435
45438
|
}, interactive ? CLOSE_DELAY : hideDelay);
|
45436
45439
|
}, [interactive, hideDelay]);
|
45437
45440
|
(0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(function () {
|
45438
45441
|
return function () {
|
45439
|
-
|
45440
|
-
clearTimeout(showTimer.current);
|
45442
|
+
clearTimers();
|
45441
45443
|
};
|
45442
45444
|
}, []);
|
45443
45445
|
var _usePopper = (0,react_popper__WEBPACK_IMPORTED_MODULE_6__.usePopper)(referenceElement, popperElement, {
|