indicator-ui 0.0.71 → 0.0.73

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
@@ -6779,6 +6779,100 @@ __webpack_require__.r(__webpack_exports__);
6779
6779
 
6780
6780
 
6781
6781
 
6782
+ /***/ }),
6783
+
6784
+ /***/ "./src/ui/BackgroundModalWindowWrapper/index.ts":
6785
+ /*!******************************************************!*\
6786
+ !*** ./src/ui/BackgroundModalWindowWrapper/index.ts ***!
6787
+ \******************************************************/
6788
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
6789
+
6790
+ "use strict";
6791
+ __webpack_require__.r(__webpack_exports__);
6792
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
6793
+ /* harmony export */ BackgroundModalWindowWrapper: () => (/* reexport safe */ _ui__WEBPACK_IMPORTED_MODULE_0__.BackgroundModalWindowWrapper)
6794
+ /* harmony export */ });
6795
+ /* harmony import */ var _ui__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./ui */ "./src/ui/BackgroundModalWindowWrapper/ui/index.ts");
6796
+ /* harmony import */ var _types__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./types */ "./src/ui/BackgroundModalWindowWrapper/types/index.ts");
6797
+
6798
+
6799
+
6800
+
6801
+ /***/ }),
6802
+
6803
+ /***/ "./src/ui/BackgroundModalWindowWrapper/types/index.ts":
6804
+ /*!************************************************************!*\
6805
+ !*** ./src/ui/BackgroundModalWindowWrapper/types/index.ts ***!
6806
+ \************************************************************/
6807
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
6808
+
6809
+ "use strict";
6810
+ __webpack_require__.r(__webpack_exports__);
6811
+
6812
+
6813
+
6814
+ /***/ }),
6815
+
6816
+ /***/ "./src/ui/BackgroundModalWindowWrapper/ui/BackgroundModalWindowWrapper.tsx":
6817
+ /*!*********************************************************************************!*\
6818
+ !*** ./src/ui/BackgroundModalWindowWrapper/ui/BackgroundModalWindowWrapper.tsx ***!
6819
+ \*********************************************************************************/
6820
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
6821
+
6822
+ "use strict";
6823
+ __webpack_require__.r(__webpack_exports__);
6824
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
6825
+ /* harmony export */ BackgroundModalWindowWrapper: () => (/* binding */ BackgroundModalWindowWrapper)
6826
+ /* harmony export */ });
6827
+ /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "./node_modules/react/jsx-runtime.js");
6828
+ /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react");
6829
+ /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
6830
+
6831
+
6832
+ const BackgroundModalWindowWrapper = (0,react__WEBPACK_IMPORTED_MODULE_1__.forwardRef)(({ children, isShow = false, setIsShow, additionElements = [], onClose, className, styles, }, ref) => {
6833
+ const localRef = (0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)(null);
6834
+ (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => {
6835
+ const handleMouseDown = (e) => {
6836
+ if (!isShow)
6837
+ return;
6838
+ const target = e.target;
6839
+ const modalRef = ref || localRef;
6840
+ if (modalRef && 'current' in modalRef) {
6841
+ if (target === modalRef.current ||
6842
+ (!modalRef.current?.contains(target) && !additionElements.filter(item => item !== null).find(item => {
6843
+ return item === target || item?.contains(target);
6844
+ }))) {
6845
+ onClose && onClose();
6846
+ setIsShow(false);
6847
+ }
6848
+ }
6849
+ };
6850
+ document.addEventListener('mousedown', handleMouseDown);
6851
+ return () => {
6852
+ document.removeEventListener('mousedown', handleMouseDown);
6853
+ };
6854
+ }, [additionElements]);
6855
+ return isShow && ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", { ref: ref || localRef, style: styles, className: className, children: children }));
6856
+ });
6857
+
6858
+
6859
+ /***/ }),
6860
+
6861
+ /***/ "./src/ui/BackgroundModalWindowWrapper/ui/index.ts":
6862
+ /*!*********************************************************!*\
6863
+ !*** ./src/ui/BackgroundModalWindowWrapper/ui/index.ts ***!
6864
+ \*********************************************************/
6865
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
6866
+
6867
+ "use strict";
6868
+ __webpack_require__.r(__webpack_exports__);
6869
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
6870
+ /* harmony export */ BackgroundModalWindowWrapper: () => (/* reexport safe */ _BackgroundModalWindowWrapper__WEBPACK_IMPORTED_MODULE_0__.BackgroundModalWindowWrapper)
6871
+ /* harmony export */ });
6872
+ /* harmony import */ var _BackgroundModalWindowWrapper__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./BackgroundModalWindowWrapper */ "./src/ui/BackgroundModalWindowWrapper/ui/BackgroundModalWindowWrapper.tsx");
6873
+
6874
+
6875
+
6782
6876
  /***/ }),
6783
6877
 
6784
6878
  /***/ "./src/ui/Buttons/index.ts":
@@ -9497,7 +9591,7 @@ function SelectField({ value, onChange, options = [], placeholder, isError, sear
9497
9591
  setOptionsState(options);
9498
9592
  }, [options]);
9499
9593
  const handleChange = (data) => {
9500
- optionsCacheRef.current = optionsState.filter(item => data.includes(item.value));
9594
+ optionsCacheRef.current = data.length > 0 ? optionsState.filter(item => data.includes(item.value)) : optionsState;
9501
9595
  if (data.length === 0 && required) {
9502
9596
  let newValue;
9503
9597
  if (Array.isArray(value)) {
@@ -9506,7 +9600,7 @@ function SelectField({ value, onChange, options = [], placeholder, isError, sear
9506
9600
  else {
9507
9601
  newValue = value;
9508
9602
  }
9509
- onChange && onChange([newValue || optionsState[0]]);
9603
+ onChange && onChange([newValue || optionsState[0].value]);
9510
9604
  }
9511
9605
  else {
9512
9606
  if (data.length > 1 && !multiple) {
@@ -11097,6 +11191,7 @@ __webpack_require__.r(__webpack_exports__);
11097
11191
  "use strict";
11098
11192
  __webpack_require__.r(__webpack_exports__);
11099
11193
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
11194
+ /* harmony export */ BackgroundModalWindowWrapper: () => (/* reexport safe */ _BackgroundModalWindowWrapper__WEBPACK_IMPORTED_MODULE_13__.BackgroundModalWindowWrapper),
11100
11195
  /* harmony export */ Button: () => (/* reexport safe */ _Buttons__WEBPACK_IMPORTED_MODULE_0__.Button),
11101
11196
  /* harmony export */ CALENDAR_DAY_TARGET_DATE: () => (/* reexport safe */ _DatePicker__WEBPACK_IMPORTED_MODULE_2__.CALENDAR_DAY_TARGET_DATE),
11102
11197
  /* harmony export */ CalendarDay: () => (/* reexport safe */ _DatePicker__WEBPACK_IMPORTED_MODULE_2__.CalendarDay),
@@ -11122,8 +11217,8 @@ __webpack_require__.r(__webpack_exports__);
11122
11217
  /* harmony export */ SelectField: () => (/* reexport safe */ _InputFields__WEBPACK_IMPORTED_MODULE_3__.SelectField),
11123
11218
  /* harmony export */ SlideTransition: () => (/* reexport safe */ _SlideTransition__WEBPACK_IMPORTED_MODULE_11__.SlideTransition),
11124
11219
  /* harmony export */ SwitcherField: () => (/* reexport safe */ _InputFields__WEBPACK_IMPORTED_MODULE_3__.SwitcherField),
11125
- /* harmony export */ TabButtons: () => (/* reexport safe */ _TabButtons__WEBPACK_IMPORTED_MODULE_14__.TabButtons),
11126
- /* harmony export */ TabFrame: () => (/* reexport safe */ _TabFrame__WEBPACK_IMPORTED_MODULE_13__.TabFrame),
11220
+ /* harmony export */ TabButtons: () => (/* reexport safe */ _TabButtons__WEBPACK_IMPORTED_MODULE_15__.TabButtons),
11221
+ /* harmony export */ TabFrame: () => (/* reexport safe */ _TabFrame__WEBPACK_IMPORTED_MODULE_14__.TabFrame),
11127
11222
  /* harmony export */ Tag: () => (/* reexport safe */ _Tag__WEBPACK_IMPORTED_MODULE_10__.Tag),
11128
11223
  /* harmony export */ TagCheckbox: () => (/* reexport safe */ _Tag__WEBPACK_IMPORTED_MODULE_10__.TagCheckbox),
11129
11224
  /* harmony export */ TagCount: () => (/* reexport safe */ _Tag__WEBPACK_IMPORTED_MODULE_10__.TagCount),
@@ -11150,8 +11245,10 @@ __webpack_require__.r(__webpack_exports__);
11150
11245
  /* harmony import */ var _Tag__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./Tag */ "./src/ui/Tag/index.ts");
11151
11246
  /* harmony import */ var _SlideTransition__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./SlideTransition */ "./src/ui/SlideTransition/index.ts");
11152
11247
  /* harmony import */ var _ModalWindowWrapper__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./ModalWindowWrapper */ "./src/ui/ModalWindowWrapper/index.ts");
11153
- /* harmony import */ var _TabFrame__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./TabFrame */ "./src/ui/TabFrame/index.ts");
11154
- /* harmony import */ var _TabButtons__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./TabButtons */ "./src/ui/TabButtons/index.ts");
11248
+ /* harmony import */ var _BackgroundModalWindowWrapper__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./BackgroundModalWindowWrapper */ "./src/ui/BackgroundModalWindowWrapper/index.ts");
11249
+ /* harmony import */ var _TabFrame__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./TabFrame */ "./src/ui/TabFrame/index.ts");
11250
+ /* harmony import */ var _TabButtons__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./TabButtons */ "./src/ui/TabButtons/index.ts");
11251
+
11155
11252
 
11156
11253
 
11157
11254
 
@@ -25553,6 +25650,7 @@ var __webpack_exports__ = {};
25553
25650
  \**********************/
25554
25651
  __webpack_require__.r(__webpack_exports__);
25555
25652
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
25653
+ /* harmony export */ BackgroundModalWindowWrapper: () => (/* reexport safe */ _ui__WEBPACK_IMPORTED_MODULE_1__.BackgroundModalWindowWrapper),
25556
25654
  /* harmony export */ Button: () => (/* reexport safe */ _ui__WEBPACK_IMPORTED_MODULE_1__.Button),
25557
25655
  /* harmony export */ CALENDAR_DAY_TARGET_DATE: () => (/* reexport safe */ _ui__WEBPACK_IMPORTED_MODULE_1__.CALENDAR_DAY_TARGET_DATE),
25558
25656
  /* harmony export */ CalendarDay: () => (/* reexport safe */ _ui__WEBPACK_IMPORTED_MODULE_1__.CalendarDay),