indicator-ui 0.0.241 → 0.0.243
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
|
@@ -25810,16 +25810,16 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
|
|
|
25810
25810
|
/**
|
|
25811
25811
|
* Компонент для отслеживания скролла в разных обстоятельствах.
|
|
25812
25812
|
* */
|
|
25813
|
-
|
|
25814
|
-
var onScroll =
|
|
25815
|
-
onScrollTop =
|
|
25816
|
-
onScrollBottom =
|
|
25817
|
-
children =
|
|
25818
|
-
|
|
25819
|
-
accuracy =
|
|
25820
|
-
|
|
25821
|
-
wrapper =
|
|
25822
|
-
className =
|
|
25813
|
+
var ScrollProvider = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_1__.forwardRef)(function (props, _ref) {
|
|
25814
|
+
var onScroll = props.onScroll,
|
|
25815
|
+
onScrollTop = props.onScrollTop,
|
|
25816
|
+
onScrollBottom = props.onScrollBottom,
|
|
25817
|
+
children = props.children,
|
|
25818
|
+
_props$accuracy = props.accuracy,
|
|
25819
|
+
accuracy = _props$accuracy === void 0 ? 10 : _props$accuracy,
|
|
25820
|
+
_props$wrapper = props.wrapper,
|
|
25821
|
+
wrapper = _props$wrapper === void 0 ? (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", {}) : _props$wrapper,
|
|
25822
|
+
className = props.className;
|
|
25823
25823
|
var elementRef = (0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)(null);
|
|
25824
25824
|
(0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(function () {
|
|
25825
25825
|
if (elementRef.current) {
|
|
@@ -25865,10 +25865,17 @@ function ScrollProvider(_ref) {
|
|
|
25865
25865
|
className: className
|
|
25866
25866
|
} : {};
|
|
25867
25867
|
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().cloneElement(wrapper, _objectSpread({
|
|
25868
|
-
ref:
|
|
25868
|
+
ref: function ref(node) {
|
|
25869
|
+
elementRef.current = node;
|
|
25870
|
+
if (typeof _ref === "function") {
|
|
25871
|
+
_ref(node);
|
|
25872
|
+
} else if (_ref) {
|
|
25873
|
+
_ref.current = node;
|
|
25874
|
+
}
|
|
25875
|
+
},
|
|
25869
25876
|
children: children
|
|
25870
25877
|
}, classNameProps));
|
|
25871
|
-
}
|
|
25878
|
+
});
|
|
25872
25879
|
|
|
25873
25880
|
/***/ }),
|
|
25874
25881
|
|