indicator-ui 0.0.288 → 0.0.290

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 CHANGED
@@ -35901,9 +35901,10 @@ var ScrollProvider = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_1__.forwardR
35901
35901
  var isTopTriggeredRef = (0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)(false);
35902
35902
  var isBottomTriggeredRef = (0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)(false);
35903
35903
  (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(function () {
35904
- if (elementRef.current) {
35904
+ var element = elementRef.current;
35905
+ if (element) {
35905
35906
  var handleScroll = function handleScroll(_event) {
35906
- var el = elementRef.current;
35907
+ var el = element;
35907
35908
  if (!el) return;
35908
35909
  var scrollTop = Math.abs(el.scrollTop);
35909
35910
  var clientHeight = el.clientHeight;
@@ -35952,10 +35953,9 @@ var ScrollProvider = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_1__.forwardR
35952
35953
  }
35953
35954
  }
35954
35955
  };
35955
- elementRef.current.addEventListener("scroll", handleScroll);
35956
+ element.addEventListener("scroll", handleScroll);
35956
35957
  return function () {
35957
- var _elementRef$current;
35958
- (_elementRef$current = elementRef.current) === null || _elementRef$current === void 0 || _elementRef$current.removeEventListener("scroll", handleScroll);
35958
+ element === null || element === void 0 || element.removeEventListener("scroll", handleScroll);
35959
35959
  };
35960
35960
  }
35961
35961
  }, [onScroll, onScrollTop, onScrollBottom, accuracy]);
@@ -36145,23 +36145,21 @@ function SlideTransition(_ref) {
36145
36145
  };
36146
36146
  }, []);
36147
36147
  (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(function () {
36148
- var isShowAnimation = animation === 'show' || animation === 'enter-up' || animation === 'enter-down';
36149
- if (isShowAnimation && clientHeight != null) {
36148
+ if (isShowAnimation() && clientHeight != null) {
36150
36149
  wrapperRef.current.style.height = clientHeight + 'px';
36151
36150
  }
36152
36151
  }, [clientHeight]);
36153
36152
  (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(function () {
36154
36153
  var _wrapperRef$current;
36155
36154
  var contentClientHeight = clientHeight;
36156
- var isShowAnimation = animation === 'show' || animation === 'enter-up' || animation === 'enter-down';
36157
36155
  if (contentClientHeight != null) {
36158
36156
  wrapperRef.current.style.height = contentClientHeight + 'px';
36159
- if (!isShowAnimation) {
36160
- wrapperRef.current.style.overflow = 'hidden';
36161
- }
36157
+ }
36158
+ if (!isShowAnimation()) {
36159
+ wrapperRef.current.style.overflow = 'hidden';
36162
36160
  }
36163
36161
  var handleAnimationEnd = function handleAnimationEnd() {
36164
- if (wrapperRef.current && isShowAnimation) {
36162
+ if (wrapperRef.current && isShowAnimation()) {
36165
36163
  wrapperRef.current.style.overflow = '';
36166
36164
  }
36167
36165
  };
@@ -36181,6 +36179,9 @@ function SlideTransition(_ref) {
36181
36179
  children: children
36182
36180
  })
36183
36181
  });
36182
+ function isShowAnimation() {
36183
+ return animation === 'show' || animation === 'enter-up' || animation === 'enter-down';
36184
+ }
36184
36185
  }
36185
36186
 
36186
36187
  /***/ }),