indicator-ui 0.0.289 → 0.0.291
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
|
@@ -35871,7 +35871,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
35871
35871
|
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__);
|
|
35872
35872
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react");
|
|
35873
35873
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
|
|
35874
|
-
var _excluded = ["onScroll", "onScrollTop", "onScrollBottom", "accuracy", "
|
|
35874
|
+
var _excluded = ["onScroll", "onScrollTop", "onScrollBottom", "accuracy", "onWheelTopUp", "onWheelBottomDown"];
|
|
35875
35875
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
35876
35876
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
35877
35877
|
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
@@ -35891,8 +35891,6 @@ var ScrollProvider = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_1__.forwardR
|
|
|
35891
35891
|
onScrollBottom = props.onScrollBottom,
|
|
35892
35892
|
_props$accuracy = props.accuracy,
|
|
35893
35893
|
accuracy = _props$accuracy === void 0 ? 10 : _props$accuracy,
|
|
35894
|
-
_props$wrapper = props.wrapper,
|
|
35895
|
-
wrapper = _props$wrapper === void 0 ? (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", {}) : _props$wrapper,
|
|
35896
35894
|
onWheelTopUp = props.onWheelTopUp,
|
|
35897
35895
|
onWheelBottomDown = props.onWheelBottomDown,
|
|
35898
35896
|
componentProps = _objectWithoutProperties(props, _excluded);
|
|
@@ -35901,9 +35899,10 @@ var ScrollProvider = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_1__.forwardR
|
|
|
35901
35899
|
var isTopTriggeredRef = (0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)(false);
|
|
35902
35900
|
var isBottomTriggeredRef = (0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)(false);
|
|
35903
35901
|
(0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(function () {
|
|
35904
|
-
|
|
35902
|
+
var element = elementRef.current;
|
|
35903
|
+
if (element) {
|
|
35905
35904
|
var handleScroll = function handleScroll(_event) {
|
|
35906
|
-
var el =
|
|
35905
|
+
var el = element;
|
|
35907
35906
|
if (!el) return;
|
|
35908
35907
|
var scrollTop = Math.abs(el.scrollTop);
|
|
35909
35908
|
var clientHeight = el.clientHeight;
|
|
@@ -35952,14 +35951,13 @@ var ScrollProvider = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_1__.forwardR
|
|
|
35952
35951
|
}
|
|
35953
35952
|
}
|
|
35954
35953
|
};
|
|
35955
|
-
|
|
35954
|
+
element.addEventListener("scroll", handleScroll);
|
|
35956
35955
|
return function () {
|
|
35957
|
-
|
|
35958
|
-
(_elementRef$current = elementRef.current) === null || _elementRef$current === void 0 || _elementRef$current.removeEventListener("scroll", handleScroll);
|
|
35956
|
+
element === null || element === void 0 || element.removeEventListener("scroll", handleScroll);
|
|
35959
35957
|
};
|
|
35960
35958
|
}
|
|
35961
|
-
}, [
|
|
35962
|
-
return
|
|
35959
|
+
}, []);
|
|
35960
|
+
return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", _objectSpread({
|
|
35963
35961
|
ref: function ref(node) {
|
|
35964
35962
|
elementRef.current = node;
|
|
35965
35963
|
if (typeof _ref === "function") {
|
|
@@ -36145,23 +36143,21 @@ function SlideTransition(_ref) {
|
|
|
36145
36143
|
};
|
|
36146
36144
|
}, []);
|
|
36147
36145
|
(0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(function () {
|
|
36148
|
-
|
|
36149
|
-
if (isShowAnimation && clientHeight != null) {
|
|
36146
|
+
if (isShowAnimation() && clientHeight != null) {
|
|
36150
36147
|
wrapperRef.current.style.height = clientHeight + 'px';
|
|
36151
36148
|
}
|
|
36152
36149
|
}, [clientHeight]);
|
|
36153
36150
|
(0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(function () {
|
|
36154
36151
|
var _wrapperRef$current;
|
|
36155
36152
|
var contentClientHeight = clientHeight;
|
|
36156
|
-
var isShowAnimation = animation === 'show' || animation === 'enter-up' || animation === 'enter-down';
|
|
36157
36153
|
if (contentClientHeight != null) {
|
|
36158
36154
|
wrapperRef.current.style.height = contentClientHeight + 'px';
|
|
36159
|
-
|
|
36160
|
-
|
|
36161
|
-
|
|
36155
|
+
}
|
|
36156
|
+
if (!isShowAnimation()) {
|
|
36157
|
+
wrapperRef.current.style.overflow = 'hidden';
|
|
36162
36158
|
}
|
|
36163
36159
|
var handleAnimationEnd = function handleAnimationEnd() {
|
|
36164
|
-
if (wrapperRef.current && isShowAnimation) {
|
|
36160
|
+
if (wrapperRef.current && isShowAnimation()) {
|
|
36165
36161
|
wrapperRef.current.style.overflow = '';
|
|
36166
36162
|
}
|
|
36167
36163
|
};
|
|
@@ -36181,6 +36177,9 @@ function SlideTransition(_ref) {
|
|
|
36181
36177
|
children: children
|
|
36182
36178
|
})
|
|
36183
36179
|
});
|
|
36180
|
+
function isShowAnimation() {
|
|
36181
|
+
return animation === 'show' || animation === 'enter-up' || animation === 'enter-down';
|
|
36182
|
+
}
|
|
36184
36183
|
}
|
|
36185
36184
|
|
|
36186
36185
|
/***/ }),
|