@luminati-io/uikit 5.2.1 → 5.2.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -45421,21 +45421,25 @@ var Tooltip = function Tooltip(_ref) {
45421
45421
  setVisible = _useState8[1];
45422
45422
  var hideTimer = (0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)();
45423
45423
  var showTimer = (0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)();
45424
- var show = (0,react__WEBPACK_IMPORTED_MODULE_1__.useCallback)(function () {
45424
+ var clearTimers = (0,react__WEBPACK_IMPORTED_MODULE_1__.useCallback)(function () {
45425
+ clearTimeout(showTimer.current);
45425
45426
  clearTimeout(hideTimer.current);
45427
+ }, []);
45428
+ var show = (0,react__WEBPACK_IMPORTED_MODULE_1__.useCallback)(function () {
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
- clearTimeout(showTimer.current);
45435
+ clearTimers();
45432
45436
  hideTimer.current = setTimeout(function () {
45433
45437
  return setVisible(false);
45434
45438
  }, interactive ? CLOSE_DELAY : hideDelay);
45435
45439
  }, [interactive, hideDelay]);
45436
45440
  (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(function () {
45437
45441
  return function () {
45438
- clearTimeout(showTimer.current);
45442
+ clearTimers();
45439
45443
  };
45440
45444
  }, []);
45441
45445
  var _usePopper = (0,react_popper__WEBPACK_IMPORTED_MODULE_6__.usePopper)(referenceElement, popperElement, {