indicator-ui 0.0.313 → 0.0.315

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
@@ -52715,20 +52715,20 @@ function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t =
52715
52715
 
52716
52716
 
52717
52717
 
52718
- function MicroButton(_ref) {
52719
- var children = _ref.children,
52720
- icon = _ref.icon,
52721
- _ref$size = _ref.size,
52722
- size = _ref$size === void 0 ? '14' : _ref$size,
52723
- _ref$color = _ref.color,
52724
- color = _ref$color === void 0 ? 'light' : _ref$color,
52725
- _ref$additionStyles = _ref.additionStyles,
52726
- additionStyles = _ref$additionStyles === void 0 ? [] : _ref$additionStyles,
52727
- customComponent = _ref.customComponent,
52728
- disabled = _ref.disabled,
52729
- _ref$className = _ref.className,
52730
- className = _ref$className === void 0 ? _styles__WEBPACK_IMPORTED_MODULE_3__.MicroButtonStyle : _ref$className,
52731
- props = _objectWithoutProperties(_ref, _excluded);
52718
+ var MicroButton = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_1__.forwardRef)(function (props, ref) {
52719
+ var children = props.children,
52720
+ icon = props.icon,
52721
+ _props$size = props.size,
52722
+ size = _props$size === void 0 ? '14' : _props$size,
52723
+ _props$color = props.color,
52724
+ color = _props$color === void 0 ? 'light' : _props$color,
52725
+ _props$additionStyles = props.additionStyles,
52726
+ additionStyles = _props$additionStyles === void 0 ? [] : _props$additionStyles,
52727
+ customComponent = props.customComponent,
52728
+ disabled = props.disabled,
52729
+ _props$className = props.className,
52730
+ className = _props$className === void 0 ? _styles__WEBPACK_IMPORTED_MODULE_3__.MicroButtonStyle : _props$className,
52731
+ anotherProps = _objectWithoutProperties(props, _excluded);
52732
52732
  var getTypeClassName = function getTypeClassName() {
52733
52733
  switch (color) {
52734
52734
  case 'light':
@@ -52779,12 +52779,12 @@ function MicroButton(_ref) {
52779
52779
  className: (0,clsx__WEBPACK_IMPORTED_MODULE_2__["default"])(className === null || className === void 0 ? void 0 : className.button, getTypeClassName(), getSizeClassName(), getAdditionStyles())
52780
52780
  });
52781
52781
  }
52782
- return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("button", _objectSpread(_objectSpread({}, props), {}, {
52782
+ return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("button", _objectSpread(_objectSpread({}, anotherProps), {}, {
52783
52783
  disabled: disabled,
52784
52784
  className: (0,clsx__WEBPACK_IMPORTED_MODULE_2__["default"])(className === null || className === void 0 ? void 0 : className.button, getTypeClassName(), getSizeClassName(), getAdditionStyles()),
52785
52785
  children: icon || children
52786
52786
  }));
52787
- }
52787
+ });
52788
52788
 
52789
52789
  /***/ }),
52790
52790
 
@@ -52835,28 +52835,14 @@ __webpack_require__.r(__webpack_exports__);
52835
52835
  /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__);
52836
52836
  /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react");
52837
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); }
52838
52839
  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; }
52839
52840
  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; }
52840
52841
  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; }
52841
52842
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
52842
52843
  function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
52843
- 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); }
52844
52844
 
52845
52845
 
52846
- var mergeRefs = function mergeRefs() {
52847
- for (var _len = arguments.length, refs = new Array(_len), _key = 0; _key < _len; _key++) {
52848
- refs[_key] = arguments[_key];
52849
- }
52850
- return function (node) {
52851
- refs.forEach(function (ref) {
52852
- if (typeof ref === "function") {
52853
- ref(node);
52854
- } else if (ref && _typeof(ref) === "object") {
52855
- ref.current = node;
52856
- }
52857
- });
52858
- };
52859
- };
52860
52846
  var ModalWindowWrapper = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_1__.forwardRef)(function (props, ref) {
52861
52847
  var children = props.children,
52862
52848
  _props$isShow = props.isShow,
@@ -52872,7 +52858,7 @@ var ModalWindowWrapper = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_1__.forw
52872
52858
  var modalWindowRef = (0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)(null);
52873
52859
  (0,react__WEBPACK_IMPORTED_MODULE_1__.useImperativeHandle)(ref, function () {
52874
52860
  return modalWindowRef.current;
52875
- }, []);
52861
+ });
52876
52862
  (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(function () {
52877
52863
  var handleMouseDown = function handleMouseDown(e) {
52878
52864
  var _modalWindowRef$curre;
@@ -52904,11 +52890,19 @@ var ModalWindowWrapper = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_1__.forw
52904
52890
  document.removeEventListener("scroll", handleScroll);
52905
52891
  };
52906
52892
  }, [additionElements, closeOnScroll]);
52893
+ var getStyle = function getStyle() {
52894
+ var hiddenStyle = {
52895
+ visibility: 'hidden',
52896
+ pointerEvents: 'none'
52897
+ };
52898
+ if (isShow) {
52899
+ return style;
52900
+ }
52901
+ return _objectSpread(_objectSpread({}, style), hiddenStyle);
52902
+ };
52907
52903
  return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", {
52908
52904
  ref: modalWindowRef,
52909
- style: _objectSpread(_objectSpread({}, style), {}, {
52910
- display: isShow ? undefined : "none"
52911
- }),
52905
+ style: getStyle(),
52912
52906
  className: className,
52913
52907
  children: children
52914
52908
  });