indicator-ui 0.0.308 → 0.0.310
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 +22 -4
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -41955,8 +41955,10 @@ function useSmartPosition() {
|
|
|
41955
41955
|
}
|
|
41956
41956
|
};
|
|
41957
41957
|
var configurateObj = function configurateObj() {
|
|
41958
|
-
ref.current
|
|
41959
|
-
|
|
41958
|
+
if (ref !== null && ref !== void 0 && ref.current) {
|
|
41959
|
+
ref.current.style.position = position;
|
|
41960
|
+
}
|
|
41961
|
+
if (position === 'absolute' && parentRef !== null && parentRef !== void 0 && parentRef.current) {
|
|
41960
41962
|
parentRef.current.style.position = 'relative';
|
|
41961
41963
|
}
|
|
41962
41964
|
};
|
|
@@ -52833,8 +52835,23 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
52833
52835
|
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__);
|
|
52834
52836
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react");
|
|
52835
52837
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
|
|
52838
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
52836
52839
|
|
|
52837
52840
|
|
|
52841
|
+
var mergeRefs = function mergeRefs() {
|
|
52842
|
+
for (var _len = arguments.length, refs = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
52843
|
+
refs[_key] = arguments[_key];
|
|
52844
|
+
}
|
|
52845
|
+
return function (node) {
|
|
52846
|
+
refs.forEach(function (ref) {
|
|
52847
|
+
if (typeof ref === "function") {
|
|
52848
|
+
ref(node);
|
|
52849
|
+
} else if (ref && _typeof(ref) === "object") {
|
|
52850
|
+
ref.current = node;
|
|
52851
|
+
}
|
|
52852
|
+
});
|
|
52853
|
+
};
|
|
52854
|
+
};
|
|
52838
52855
|
var ModalWindowWrapper = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_1__.forwardRef)(function (props, ref) {
|
|
52839
52856
|
var children = props.children,
|
|
52840
52857
|
_props$isShow = props.isShow,
|
|
@@ -52848,9 +52865,10 @@ var ModalWindowWrapper = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_1__.forw
|
|
|
52848
52865
|
className = props.className,
|
|
52849
52866
|
style = props.style;
|
|
52850
52867
|
var modalWindowRef = (0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)(null);
|
|
52868
|
+
var combinedRef = mergeRefs(ref, modalWindowRef);
|
|
52851
52869
|
(0,react__WEBPACK_IMPORTED_MODULE_1__.useImperativeHandle)(ref, function () {
|
|
52852
52870
|
return modalWindowRef.current;
|
|
52853
|
-
});
|
|
52871
|
+
}, []);
|
|
52854
52872
|
(0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(function () {
|
|
52855
52873
|
var handleMouseDown = function handleMouseDown(e) {
|
|
52856
52874
|
var _modalWindowRef$curre;
|
|
@@ -52884,7 +52902,7 @@ var ModalWindowWrapper = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_1__.forw
|
|
|
52884
52902
|
}, [additionElements, closeOnScroll]);
|
|
52885
52903
|
if (!isShow) return undefined;
|
|
52886
52904
|
return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", {
|
|
52887
|
-
ref:
|
|
52905
|
+
ref: combinedRef,
|
|
52888
52906
|
style: style,
|
|
52889
52907
|
className: className,
|
|
52890
52908
|
children: children
|