indicator-ui 0.0.231 → 0.0.233

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
@@ -14990,6 +14990,104 @@ function useIsErrorField() {
14990
14990
 
14991
14991
  /***/ }),
14992
14992
 
14993
+ /***/ "./src/lib/animation/getScrollParents.ts":
14994
+ /*!***********************************************!*\
14995
+ !*** ./src/lib/animation/getScrollParents.ts ***!
14996
+ \***********************************************/
14997
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
14998
+
14999
+ __webpack_require__.r(__webpack_exports__);
15000
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
15001
+ /* harmony export */ getScrollParents: () => (/* binding */ getScrollParents)
15002
+ /* harmony export */ });
15003
+ /**
15004
+ * Находит все родительские елементы в которых есть скролл.
15005
+ * @param element элемент от которого искать.
15006
+ * @returns
15007
+ * Массив DOM-элементов
15008
+ * @example
15009
+ * ```ts
15010
+ * getScrollParents(elementRef.current) // HTMLElement[]
15011
+ * ```
15012
+ */
15013
+ var getScrollParents = function getScrollParents(element) {
15014
+ var parents = [];
15015
+ var current = element.parentElement;
15016
+ while (current) {
15017
+ if (current.scrollHeight > current.clientHeight || current.scrollWidth > current.clientWidth) {
15018
+ parents.push(current);
15019
+ }
15020
+ current = current.parentElement;
15021
+ }
15022
+ return parents;
15023
+ };
15024
+
15025
+ /***/ }),
15026
+
15027
+ /***/ "./src/lib/animation/index.ts":
15028
+ /*!************************************!*\
15029
+ !*** ./src/lib/animation/index.ts ***!
15030
+ \************************************/
15031
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
15032
+
15033
+ __webpack_require__.r(__webpack_exports__);
15034
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
15035
+ /* harmony export */ getScrollParents: () => (/* reexport safe */ _getScrollParents__WEBPACK_IMPORTED_MODULE_1__.getScrollParents),
15036
+ /* harmony export */ throttle: () => (/* reexport safe */ _throttle__WEBPACK_IMPORTED_MODULE_0__.throttle)
15037
+ /* harmony export */ });
15038
+ /* harmony import */ var _throttle__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./throttle */ "./src/lib/animation/throttle.ts");
15039
+ /* harmony import */ var _getScrollParents__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./getScrollParents */ "./src/lib/animation/getScrollParents.ts");
15040
+
15041
+
15042
+
15043
+ /***/ }),
15044
+
15045
+ /***/ "./src/lib/animation/throttle.ts":
15046
+ /*!***************************************!*\
15047
+ !*** ./src/lib/animation/throttle.ts ***!
15048
+ \***************************************/
15049
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
15050
+
15051
+ __webpack_require__.r(__webpack_exports__);
15052
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
15053
+ /* harmony export */ throttle: () => (/* binding */ throttle)
15054
+ /* harmony export */ });
15055
+ /**
15056
+ * Предотвращение перегрузки количества событий.
15057
+ * @param func целевая функция.
15058
+ * @param ms Задержка в ms. Поумолчанию 10
15059
+ * @example
15060
+ * ```ts
15061
+ * const handleScroll = throttle(animationUpdate, 100)
15062
+ * window.addEventListener("scroll", handleScroll);
15063
+ * ```
15064
+ */
15065
+ function throttle(func) {
15066
+ var ms = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 10;
15067
+ var isThrottled = false,
15068
+ savedArgs,
15069
+ savedThis;
15070
+ function wrapper() {
15071
+ if (isThrottled) {
15072
+ savedArgs = arguments;
15073
+ savedThis = this;
15074
+ return;
15075
+ }
15076
+ func.apply(this, arguments);
15077
+ isThrottled = true;
15078
+ setTimeout(function () {
15079
+ isThrottled = false;
15080
+ if (savedArgs) {
15081
+ wrapper.apply(savedThis, savedArgs);
15082
+ savedArgs = savedThis = null;
15083
+ }
15084
+ }, ms);
15085
+ }
15086
+ return wrapper;
15087
+ }
15088
+
15089
+ /***/ }),
15090
+
14993
15091
  /***/ "./src/lib/array/getUniqueArray.ts":
14994
15092
  /*!*****************************************!*\
14995
15093
  !*** ./src/lib/array/getUniqueArray.ts ***!
@@ -15371,6 +15469,7 @@ __webpack_require__.r(__webpack_exports__);
15371
15469
  /* harmony export */ compKeyWays: () => (/* reexport safe */ _dict__WEBPACK_IMPORTED_MODULE_0__.compKeyWays),
15372
15470
  /* harmony export */ getCenterElementAttribute: () => (/* reexport safe */ _reactComponents__WEBPACK_IMPORTED_MODULE_2__.getCenterElementAttribute),
15373
15471
  /* harmony export */ getDeepValue: () => (/* reexport safe */ _dict__WEBPACK_IMPORTED_MODULE_0__.getDeepValue),
15472
+ /* harmony export */ getScrollParents: () => (/* reexport safe */ _animation__WEBPACK_IMPORTED_MODULE_4__.getScrollParents),
15374
15473
  /* harmony export */ getUniqueArray: () => (/* reexport safe */ _array__WEBPACK_IMPORTED_MODULE_1__.getUniqueArray),
15375
15474
  /* harmony export */ handleScrollEnd: () => (/* reexport safe */ _reactComponents__WEBPACK_IMPORTED_MODULE_2__.handleScrollEnd),
15376
15475
  /* harmony export */ isArray: () => (/* reexport safe */ _array__WEBPACK_IMPORTED_MODULE_1__.isArray),
@@ -15381,12 +15480,15 @@ __webpack_require__.r(__webpack_exports__);
15381
15480
  /* harmony export */ saveParseDate: () => (/* reexport safe */ _time__WEBPACK_IMPORTED_MODULE_3__.saveParseDate),
15382
15481
  /* harmony export */ setDeepValue: () => (/* reexport safe */ _dict__WEBPACK_IMPORTED_MODULE_0__.setDeepValue),
15383
15482
  /* harmony export */ startOfDayUTC: () => (/* reexport safe */ _time__WEBPACK_IMPORTED_MODULE_3__.startOfDayUTC),
15483
+ /* harmony export */ throttle: () => (/* reexport safe */ _animation__WEBPACK_IMPORTED_MODULE_4__.throttle),
15384
15484
  /* harmony export */ traverseTreeByStack: () => (/* reexport safe */ _array__WEBPACK_IMPORTED_MODULE_1__.traverseTreeByStack)
15385
15485
  /* harmony export */ });
15386
15486
  /* harmony import */ var _dict__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./dict */ "./src/lib/dict/index.ts");
15387
15487
  /* harmony import */ var _array__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./array */ "./src/lib/array/index.ts");
15388
15488
  /* harmony import */ var _reactComponents__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./reactComponents */ "./src/lib/reactComponents/index.ts");
15389
15489
  /* harmony import */ var _time__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./time */ "./src/lib/time/index.ts");
15490
+ /* harmony import */ var _animation__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./animation */ "./src/lib/animation/index.ts");
15491
+
15390
15492
 
15391
15493
 
15392
15494
 
@@ -15744,7 +15846,8 @@ var BackgroundModalWindowWrapper = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODUL
15744
15846
  document.removeEventListener('mousedown', handleMouseDown);
15745
15847
  };
15746
15848
  }, [additionElements]);
15747
- return isShow && (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", {
15849
+ if (!isShow) return undefined;
15850
+ return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", {
15748
15851
  ref: ref || localRef,
15749
15852
  style: styles,
15750
15853
  className: className,
@@ -16388,7 +16491,8 @@ function CascadeBlock(_ref) {
16388
16491
  removeValues: removeValues,
16389
16492
  label: item.label,
16390
16493
  supportingText: item.supportingText,
16391
- options: item.options
16494
+ options: item.options,
16495
+ defaultAllHidden: defaultAllHidden
16392
16496
  }, idx);
16393
16497
  } else if ('value' in item) {
16394
16498
  return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_ui__WEBPACK_IMPORTED_MODULE_3__.Checkbox, {
@@ -16484,7 +16588,8 @@ function CascadeSelector(_ref) {
16484
16588
  onChange = _ref.onChange,
16485
16589
  _ref$multiple = _ref.multiple,
16486
16590
  multiple = _ref$multiple === void 0 ? true : _ref$multiple,
16487
- defaultAllHidden = _ref.defaultAllHidden,
16591
+ _ref$defaultAllHidden = _ref.defaultAllHidden,
16592
+ defaultAllHidden = _ref$defaultAllHidden === void 0 ? false : _ref$defaultAllHidden,
16488
16593
  maxChosenOptions = _ref.maxChosenOptions;
16489
16594
  var getValue = function getValue() {
16490
16595
  if (Array.isArray(value)) {
@@ -25011,9 +25116,9 @@ __webpack_require__.r(__webpack_exports__);
25011
25116
 
25012
25117
  __webpack_require__.r(__webpack_exports__);
25013
25118
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
25014
- /* harmony export */ ModalWindowWrapper: () => (/* reexport safe */ _ui_ModalWindowWrapper__WEBPACK_IMPORTED_MODULE_0__.ModalWindowWrapper)
25119
+ /* harmony export */ ModalWindowWrapper: () => (/* reexport safe */ _ui__WEBPACK_IMPORTED_MODULE_0__.ModalWindowWrapper)
25015
25120
  /* harmony export */ });
25016
- /* harmony import */ var _ui_ModalWindowWrapper__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./ui/ModalWindowWrapper */ "./src/ui/ModalWindowWrapper/ui/ModalWindowWrapper.tsx");
25121
+ /* harmony import */ var _ui__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./ui */ "./src/ui/ModalWindowWrapper/ui/index.ts");
25017
25122
 
25018
25123
 
25019
25124
  /***/ }),
@@ -25064,7 +25169,8 @@ function ModalWindowWrapper(_ref) {
25064
25169
  document.removeEventListener('mousedown', handleMouseDown);
25065
25170
  };
25066
25171
  }, [additionElements]);
25067
- return isShow && (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", {
25172
+ if (!isShow) return undefined;
25173
+ return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", {
25068
25174
  ref: modalWindowRef,
25069
25175
  style: style,
25070
25176
  className: className,
@@ -25072,6 +25178,21 @@ function ModalWindowWrapper(_ref) {
25072
25178
  });
25073
25179
  }
25074
25180
 
25181
+ /***/ }),
25182
+
25183
+ /***/ "./src/ui/ModalWindowWrapper/ui/index.ts":
25184
+ /*!***********************************************!*\
25185
+ !*** ./src/ui/ModalWindowWrapper/ui/index.ts ***!
25186
+ \***********************************************/
25187
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
25188
+
25189
+ __webpack_require__.r(__webpack_exports__);
25190
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
25191
+ /* harmony export */ ModalWindowWrapper: () => (/* reexport safe */ _ModalWindowWrapper__WEBPACK_IMPORTED_MODULE_0__.ModalWindowWrapper)
25192
+ /* harmony export */ });
25193
+ /* harmony import */ var _ModalWindowWrapper__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./ModalWindowWrapper */ "./src/ui/ModalWindowWrapper/ui/ModalWindowWrapper.tsx");
25194
+
25195
+
25075
25196
  /***/ }),
25076
25197
 
25077
25198
  /***/ "./src/ui/PaginationBar/index.ts":
@@ -26865,6 +26986,285 @@ __webpack_require__.r(__webpack_exports__);
26865
26986
  /* harmony import */ var _ToggleBase__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./ToggleBase */ "./src/ui/ToggleBase/ui/ToggleBase.tsx");
26866
26987
 
26867
26988
 
26989
+ /***/ }),
26990
+
26991
+ /***/ "./src/ui/Tooltip/index.ts":
26992
+ /*!*********************************!*\
26993
+ !*** ./src/ui/Tooltip/index.ts ***!
26994
+ \*********************************/
26995
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
26996
+
26997
+ __webpack_require__.r(__webpack_exports__);
26998
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
26999
+ /* harmony export */ Tooltip: () => (/* reexport safe */ _ui__WEBPACK_IMPORTED_MODULE_0__.Tooltip)
27000
+ /* harmony export */ });
27001
+ /* harmony import */ var _ui__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./ui */ "./src/ui/Tooltip/ui/index.ts");
27002
+
27003
+
27004
+ /***/ }),
27005
+
27006
+ /***/ "./src/ui/Tooltip/lib/getOffset.ts":
27007
+ /*!*****************************************!*\
27008
+ !*** ./src/ui/Tooltip/lib/getOffset.ts ***!
27009
+ \*****************************************/
27010
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
27011
+
27012
+ __webpack_require__.r(__webpack_exports__);
27013
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
27014
+ /* harmony export */ getOffset: () => (/* binding */ getOffset)
27015
+ /* harmony export */ });
27016
+ var getOffset = function getOffset(target, element, arrow) {
27017
+ var offset = {
27018
+ x: 16,
27019
+ y: 16
27020
+ };
27021
+ var ARROW_OFFSET = 23;
27022
+ var WINDOW_MARGIN = 16;
27023
+ if (!target || !element) return offset;
27024
+ switch (arrow) {
27025
+ case 'left-top':
27026
+ offset.y = target.height / 2 - ARROW_OFFSET;
27027
+ offset.x = target.width + WINDOW_MARGIN;
27028
+ break;
27029
+ case 'left-center':
27030
+ offset.y = element.height / 2 * -1 + target.height / 2;
27031
+ offset.x = target.width + WINDOW_MARGIN;
27032
+ break;
27033
+ case 'left-bottom':
27034
+ offset.y = element.height * -1 + target.height / 2 + ARROW_OFFSET;
27035
+ offset.x = target.width + WINDOW_MARGIN;
27036
+ break;
27037
+ case 'right-top':
27038
+ offset.y = target.height / 2 - ARROW_OFFSET;
27039
+ offset.x = -element.width - WINDOW_MARGIN;
27040
+ break;
27041
+ case 'right-center':
27042
+ offset.y = element.height / 2 * -1 + target.height / 2;
27043
+ offset.x = -element.width - WINDOW_MARGIN;
27044
+ break;
27045
+ case 'right-bottom':
27046
+ offset.y = element.height * -1 + target.height / 2 + ARROW_OFFSET;
27047
+ offset.x = -element.width - WINDOW_MARGIN;
27048
+ break;
27049
+ case 'top-left':
27050
+ offset.y = target.height + WINDOW_MARGIN;
27051
+ offset.x = target.width / 2 - ARROW_OFFSET;
27052
+ break;
27053
+ case 'top-center':
27054
+ offset.y = target.height + WINDOW_MARGIN;
27055
+ offset.x = -(element.width / 2) + target.width / 2;
27056
+ break;
27057
+ case 'top-right':
27058
+ offset.y = target.height + WINDOW_MARGIN;
27059
+ offset.x = -element.width + target.width / 2 + ARROW_OFFSET;
27060
+ break;
27061
+ case 'bottom-left':
27062
+ offset.y = -element.height - WINDOW_MARGIN;
27063
+ offset.x = target.width / 2 - ARROW_OFFSET;
27064
+ break;
27065
+ case 'bottom-center':
27066
+ offset.y = -element.height - WINDOW_MARGIN;
27067
+ offset.x = -(element.width / 2) + target.width / 2;
27068
+ break;
27069
+ case 'bottom-right':
27070
+ offset.y = -element.height - WINDOW_MARGIN;
27071
+ offset.x = -element.width + target.width / 2 + ARROW_OFFSET;
27072
+ break;
27073
+ default:
27074
+ break;
27075
+ }
27076
+ return offset;
27077
+ };
27078
+
27079
+ /***/ }),
27080
+
27081
+ /***/ "./src/ui/Tooltip/lib/index.ts":
27082
+ /*!*************************************!*\
27083
+ !*** ./src/ui/Tooltip/lib/index.ts ***!
27084
+ \*************************************/
27085
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
27086
+
27087
+ __webpack_require__.r(__webpack_exports__);
27088
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
27089
+ /* harmony export */ getOffset: () => (/* reexport safe */ _getOffset__WEBPACK_IMPORTED_MODULE_0__.getOffset)
27090
+ /* harmony export */ });
27091
+ /* harmony import */ var _getOffset__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./getOffset */ "./src/ui/Tooltip/lib/getOffset.ts");
27092
+
27093
+
27094
+ /***/ }),
27095
+
27096
+ /***/ "./src/ui/Tooltip/styles/Tooltip.module.scss":
27097
+ /*!***************************************************!*\
27098
+ !*** ./src/ui/Tooltip/styles/Tooltip.module.scss ***!
27099
+ \***************************************************/
27100
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
27101
+
27102
+ __webpack_require__.r(__webpack_exports__);
27103
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
27104
+ /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
27105
+ /* harmony export */ });
27106
+ // extracted by mini-css-extract-plugin
27107
+ /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({"Container":"Tooltip-module__Container___ImGDR","Tooltip":"Tooltip-module__Tooltip___hoSSN","Text":"Tooltip-module__Text___td8bq","Description":"Tooltip-module__Description___P_3Y1","Arrow":"Tooltip-module__Arrow___kK60F","LeftCenter":"Tooltip-module__LeftCenter___XRD6a","RightCenter":"Tooltip-module__RightCenter___YNFRT","LeftTop":"Tooltip-module__LeftTop___EwoVT","RightTop":"Tooltip-module__RightTop___pJ5F2","LeftBottom":"Tooltip-module__LeftBottom___E391m","RightBottom":"Tooltip-module__RightBottom___AsHht","BottomLeft":"Tooltip-module__BottomLeft___Q4Lte","BottomRight":"Tooltip-module__BottomRight___jPMek","BottomCenter":"Tooltip-module__BottomCenter___gT9IG","TopCenter":"Tooltip-module__TopCenter___ZSgyR","TopLeft":"Tooltip-module__TopLeft___GlW5d","TopRight":"Tooltip-module__TopRight___baUsn","Dark":"Tooltip-module__Dark___aFU2K"});
27108
+
27109
+ /***/ }),
27110
+
27111
+ /***/ "./src/ui/Tooltip/styles/index.ts":
27112
+ /*!****************************************!*\
27113
+ !*** ./src/ui/Tooltip/styles/index.ts ***!
27114
+ \****************************************/
27115
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
27116
+
27117
+ __webpack_require__.r(__webpack_exports__);
27118
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
27119
+ /* harmony export */ TooltipStyles: () => (/* reexport safe */ _Tooltip_module_scss__WEBPACK_IMPORTED_MODULE_0__["default"])
27120
+ /* harmony export */ });
27121
+ /* harmony import */ var _Tooltip_module_scss__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Tooltip.module.scss */ "./src/ui/Tooltip/styles/Tooltip.module.scss");
27122
+
27123
+
27124
+ /***/ }),
27125
+
27126
+ /***/ "./src/ui/Tooltip/ui/Tooltip.tsx":
27127
+ /*!***************************************!*\
27128
+ !*** ./src/ui/Tooltip/ui/Tooltip.tsx ***!
27129
+ \***************************************/
27130
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
27131
+
27132
+ __webpack_require__.r(__webpack_exports__);
27133
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
27134
+ /* harmony export */ Tooltip: () => (/* binding */ Tooltip)
27135
+ /* harmony export */ });
27136
+ /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime");
27137
+ /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__);
27138
+ /* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! clsx */ "./node_modules/clsx/dist/clsx.mjs");
27139
+ /* harmony import */ var _styles__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../styles */ "./src/ui/Tooltip/styles/index.ts");
27140
+ /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! react */ "react");
27141
+ /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_3__);
27142
+ /* harmony import */ var _lib__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../lib */ "./src/ui/Tooltip/lib/index.ts");
27143
+ /* harmony import */ var _ui__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @/ui */ "./src/ui/index.ts");
27144
+ /* harmony import */ var _lib__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @/lib */ "./src/lib/index.ts");
27145
+ 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); }
27146
+ 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; }
27147
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
27148
+ 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); }
27149
+
27150
+
27151
+
27152
+
27153
+
27154
+
27155
+
27156
+ /**
27157
+ * @param arrow Положение стрелки по фигме
27158
+ * @param targetRef Tooltip автоматически центрируется относительно targetRef
27159
+ * @param onClose Функция для закрытия Tooltip при клике вне его
27160
+ * @param excludedOnCloseElements Исключаемые элементы при клике на которые onClose не срабатывает
27161
+ * @param color Тема: 'light'/'dark'
27162
+ * @constructor
27163
+ */
27164
+ function Tooltip(_ref) {
27165
+ var _targetRef$current, _elementRef$current, _clsx3;
27166
+ var text = _ref.text,
27167
+ description = _ref.description,
27168
+ arrow = _ref.arrow,
27169
+ classes = _ref.classes,
27170
+ styles = _ref.styles,
27171
+ targetRef = _ref.targetRef,
27172
+ onClose = _ref.onClose,
27173
+ excludedOnCloseElements = _ref.excludedOnCloseElements,
27174
+ _ref$color = _ref.color,
27175
+ color = _ref$color === void 0 ? 'light' : _ref$color;
27176
+ var elementRef = (0,react__WEBPACK_IMPORTED_MODULE_3__.useRef)(null);
27177
+ var rafId = (0,react__WEBPACK_IMPORTED_MODULE_3__.useRef)();
27178
+ // Положение целевого элемента
27179
+ var targetRect = (0,react__WEBPACK_IMPORTED_MODULE_3__.useRef)((targetRef === null || targetRef === void 0 || (_targetRef$current = targetRef.current) === null || _targetRef$current === void 0 ? void 0 : _targetRef$current.getBoundingClientRect()) || null);
27180
+ // Положение позиционируемого элемента
27181
+ var elementRect = (0,react__WEBPACK_IMPORTED_MODULE_3__.useRef)((elementRef === null || elementRef === void 0 || (_elementRef$current = elementRef.current) === null || _elementRef$current === void 0 ? void 0 : _elementRef$current.getBoundingClientRect()) || null);
27182
+ (0,react__WEBPACK_IMPORTED_MODULE_3__.useEffect)(function () {
27183
+ if (!(targetRef !== null && targetRef !== void 0 && targetRef.current) || !(elementRef !== null && elementRef !== void 0 && elementRef.current)) return;
27184
+ // Инициализация появления элемента
27185
+ updatePosition();
27186
+ // Отслеживание изменения размера элемента
27187
+ var observer = new ResizeObserver(function (entries) {
27188
+ (0,_lib__WEBPACK_IMPORTED_MODULE_6__.throttle)(function () {
27189
+ elementRect.current = entries[0].contentRect;
27190
+ updatePosition();
27191
+ }, 10)();
27192
+ });
27193
+ observer.observe(elementRef.current);
27194
+ var scrollHandler = (0,_lib__WEBPACK_IMPORTED_MODULE_6__.throttle)(updatePosition, 10);
27195
+ // Отслеживание скролла на window и любых родительских элеметнах для обновления положения Tooltip в окне
27196
+ var parents = (0,_lib__WEBPACK_IMPORTED_MODULE_6__.getScrollParents)(targetRef.current);
27197
+ parents.forEach(function (parent) {
27198
+ return parent.addEventListener('scroll', scrollHandler);
27199
+ });
27200
+ window.addEventListener('scroll', scrollHandler, {
27201
+ passive: true
27202
+ });
27203
+ return function () {
27204
+ parents.forEach(function (parent) {
27205
+ return parent.removeEventListener('scroll', scrollHandler);
27206
+ });
27207
+ window.removeEventListener('scroll', scrollHandler);
27208
+ if (rafId.current) cancelAnimationFrame(rafId.current);
27209
+ observer.disconnect();
27210
+ };
27211
+ }, []);
27212
+ function updatePosition() {
27213
+ var _elementRect$current, _targetRef$current2;
27214
+ if (!(targetRef !== null && targetRef !== void 0 && targetRef.current) || !(elementRef !== null && elementRef !== void 0 && elementRef.current) || (elementRect === null || elementRect === void 0 || (_elementRect$current = elementRect.current) === null || _elementRect$current === void 0 ? void 0 : _elementRect$current.height) === 0) return;
27215
+ targetRect.current = targetRef === null || targetRef === void 0 || (_targetRef$current2 = targetRef.current) === null || _targetRef$current2 === void 0 ? void 0 : _targetRef$current2.getBoundingClientRect();
27216
+ // Позиционирование относительно размеров целевого и позиционируемого элементов
27217
+ var offset = arrow ? (0,_lib__WEBPACK_IMPORTED_MODULE_4__.getOffset)(targetRect.current, elementRect === null || elementRect === void 0 ? void 0 : elementRect.current, arrow) : {
27218
+ x: 0,
27219
+ y: 24
27220
+ };
27221
+ // Устанавливаем положение с учетом смещения
27222
+ var top = "".concat(targetRect.current.top + offset.y, "px");
27223
+ var left = "".concat(targetRect.current.left + offset.x, "px");
27224
+ elementRef.current.style.top = top;
27225
+ elementRef.current.style.left = left;
27226
+ // Отображение после установки положения на экране
27227
+ elementRef.current.style.opacity = '1';
27228
+ }
27229
+ return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_ui__WEBPACK_IMPORTED_MODULE_5__.ModalWindowWrapper, {
27230
+ isShow: true,
27231
+ setIsShow: onClose ? onClose : function () {},
27232
+ additionElements: excludedOnCloseElements,
27233
+ children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", {
27234
+ className: (0,clsx__WEBPACK_IMPORTED_MODULE_1__["default"])(classes, _defineProperty({}, _styles__WEBPACK_IMPORTED_MODULE_2__.TooltipStyles.Container, !!(targetRef !== null && targetRef !== void 0 && targetRef.current))),
27235
+ ref: elementRef,
27236
+ style: styles,
27237
+ children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", {
27238
+ className: (0,clsx__WEBPACK_IMPORTED_MODULE_1__["default"])(_styles__WEBPACK_IMPORTED_MODULE_2__.TooltipStyles.Tooltip, _defineProperty({}, _styles__WEBPACK_IMPORTED_MODULE_2__.TooltipStyles.Dark, color === 'dark')),
27239
+ children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("p", {
27240
+ className: _styles__WEBPACK_IMPORTED_MODULE_2__.TooltipStyles.Text,
27241
+ children: text
27242
+ }), description && (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("p", {
27243
+ className: _styles__WEBPACK_IMPORTED_MODULE_2__.TooltipStyles.Description,
27244
+ children: description
27245
+ }), arrow && (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("span", {
27246
+ className: (0,clsx__WEBPACK_IMPORTED_MODULE_1__["default"])(_styles__WEBPACK_IMPORTED_MODULE_2__.TooltipStyles.Arrow, (_clsx3 = {}, _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_clsx3, _styles__WEBPACK_IMPORTED_MODULE_2__.TooltipStyles.LeftTop, arrow === 'left-top'), _styles__WEBPACK_IMPORTED_MODULE_2__.TooltipStyles.LeftCenter, arrow === 'left-center'), _styles__WEBPACK_IMPORTED_MODULE_2__.TooltipStyles.LeftBottom, arrow === 'left-bottom'), _styles__WEBPACK_IMPORTED_MODULE_2__.TooltipStyles.RightTop, arrow === 'right-top'), _styles__WEBPACK_IMPORTED_MODULE_2__.TooltipStyles.RightCenter, arrow === 'right-center'), _styles__WEBPACK_IMPORTED_MODULE_2__.TooltipStyles.RightBottom, arrow === 'right-bottom'), _styles__WEBPACK_IMPORTED_MODULE_2__.TooltipStyles.TopLeft, arrow === 'top-left'), _styles__WEBPACK_IMPORTED_MODULE_2__.TooltipStyles.TopCenter, arrow === 'top-center'), _styles__WEBPACK_IMPORTED_MODULE_2__.TooltipStyles.TopRight, arrow === 'top-right'), _styles__WEBPACK_IMPORTED_MODULE_2__.TooltipStyles.BottomLeft, arrow === 'bottom-left'), _defineProperty(_defineProperty(_clsx3, _styles__WEBPACK_IMPORTED_MODULE_2__.TooltipStyles.BottomCenter, arrow === 'bottom-center'), _styles__WEBPACK_IMPORTED_MODULE_2__.TooltipStyles.BottomRight, arrow === 'bottom-right')))
27247
+ })]
27248
+ })
27249
+ })
27250
+ });
27251
+ }
27252
+
27253
+ /***/ }),
27254
+
27255
+ /***/ "./src/ui/Tooltip/ui/index.ts":
27256
+ /*!************************************!*\
27257
+ !*** ./src/ui/Tooltip/ui/index.ts ***!
27258
+ \************************************/
27259
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
27260
+
27261
+ __webpack_require__.r(__webpack_exports__);
27262
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
27263
+ /* harmony export */ Tooltip: () => (/* reexport safe */ _Tooltip__WEBPACK_IMPORTED_MODULE_0__.Tooltip)
27264
+ /* harmony export */ });
27265
+ /* harmony import */ var _Tooltip__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Tooltip */ "./src/ui/Tooltip/ui/Tooltip.tsx");
27266
+
27267
+
26868
27268
  /***/ }),
26869
27269
 
26870
27270
  /***/ "./src/ui/UserPick/assets/index.ts":
@@ -27327,6 +27727,7 @@ __webpack_require__.r(__webpack_exports__);
27327
27727
  /* harmony export */ TimeRangeField: () => (/* reexport safe */ _InputFields__WEBPACK_IMPORTED_MODULE_2__.TimeRangeField),
27328
27728
  /* harmony export */ Toggle: () => (/* reexport safe */ _Toggle__WEBPACK_IMPORTED_MODULE_7__.Toggle),
27329
27729
  /* harmony export */ ToggleBase: () => (/* reexport safe */ _ToggleBase__WEBPACK_IMPORTED_MODULE_6__.ToggleBase),
27730
+ /* harmony export */ Tooltip: () => (/* reexport safe */ _Tooltip__WEBPACK_IMPORTED_MODULE_25__.Tooltip),
27330
27731
  /* harmony export */ UserPick: () => (/* reexport safe */ _UserPick__WEBPACK_IMPORTED_MODULE_17__.UserPick),
27331
27732
  /* harmony export */ VIEW_CELL_SIZE: () => (/* reexport safe */ _DateTimePicker__WEBPACK_IMPORTED_MODULE_24__.VIEW_CELL_SIZE),
27332
27733
  /* harmony export */ VideoPlayerBase: () => (/* reexport safe */ _VideoPlayerBase__WEBPACK_IMPORTED_MODULE_19__.VideoPlayerBase),
@@ -27378,6 +27779,8 @@ __webpack_require__.r(__webpack_exports__);
27378
27779
  /* harmony import */ var _Carousel__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ./Carousel */ "./src/ui/Carousel/index.ts");
27379
27780
  /* harmony import */ var _PlayButton__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ./PlayButton */ "./src/ui/PlayButton/index.ts");
27380
27781
  /* harmony import */ var _DateTimePicker__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ./DateTimePicker */ "./src/ui/DateTimePicker/index.ts");
27782
+ /* harmony import */ var _Tooltip__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ./Tooltip */ "./src/ui/Tooltip/index.ts");
27783
+
27381
27784
 
27382
27785
 
27383
27786
 
@@ -27584,6 +27987,7 @@ __webpack_require__.r(__webpack_exports__);
27584
27987
  /* harmony export */ TimeRangeField: () => (/* reexport safe */ _ui__WEBPACK_IMPORTED_MODULE_1__.TimeRangeField),
27585
27988
  /* harmony export */ Toggle: () => (/* reexport safe */ _ui__WEBPACK_IMPORTED_MODULE_1__.Toggle),
27586
27989
  /* harmony export */ ToggleBase: () => (/* reexport safe */ _ui__WEBPACK_IMPORTED_MODULE_1__.ToggleBase),
27990
+ /* harmony export */ Tooltip: () => (/* reexport safe */ _ui__WEBPACK_IMPORTED_MODULE_1__.Tooltip),
27587
27991
  /* harmony export */ UserPick: () => (/* reexport safe */ _ui__WEBPACK_IMPORTED_MODULE_1__.UserPick),
27588
27992
  /* harmony export */ VIEW_CELL_SIZE: () => (/* reexport safe */ _ui__WEBPACK_IMPORTED_MODULE_1__.VIEW_CELL_SIZE),
27589
27993
  /* harmony export */ VideoPlayerBase: () => (/* reexport safe */ _ui__WEBPACK_IMPORTED_MODULE_1__.VideoPlayerBase),
@@ -27606,6 +28010,7 @@ __webpack_require__.r(__webpack_exports__);
27606
28010
  /* harmony export */ formWrapperComponent: () => (/* reexport safe */ _ui__WEBPACK_IMPORTED_MODULE_1__.formWrapperComponent),
27607
28011
  /* harmony export */ getCenterElementAttribute: () => (/* reexport safe */ _lib__WEBPACK_IMPORTED_MODULE_4__.getCenterElementAttribute),
27608
28012
  /* harmony export */ getDeepValue: () => (/* reexport safe */ _lib__WEBPACK_IMPORTED_MODULE_4__.getDeepValue),
28013
+ /* harmony export */ getScrollParents: () => (/* reexport safe */ _lib__WEBPACK_IMPORTED_MODULE_4__.getScrollParents),
27609
28014
  /* harmony export */ getUniqueArray: () => (/* reexport safe */ _lib__WEBPACK_IMPORTED_MODULE_4__.getUniqueArray),
27610
28015
  /* harmony export */ handleScrollEnd: () => (/* reexport safe */ _lib__WEBPACK_IMPORTED_MODULE_4__.handleScrollEnd),
27611
28016
  /* harmony export */ inputFieldComponent: () => (/* reexport safe */ _ui__WEBPACK_IMPORTED_MODULE_1__.inputFieldComponent),
@@ -27623,6 +28028,7 @@ __webpack_require__.r(__webpack_exports__);
27623
28028
  /* harmony export */ setOnlyTime: () => (/* reexport safe */ _ui__WEBPACK_IMPORTED_MODULE_1__.setOnlyTime),
27624
28029
  /* harmony export */ startOfDayUTC: () => (/* reexport safe */ _lib__WEBPACK_IMPORTED_MODULE_4__.startOfDayUTC),
27625
28030
  /* harmony export */ subDateYear: () => (/* reexport safe */ _ui__WEBPACK_IMPORTED_MODULE_1__.subDateYear),
28031
+ /* harmony export */ throttle: () => (/* reexport safe */ _lib__WEBPACK_IMPORTED_MODULE_4__.throttle),
27626
28032
  /* harmony export */ traverseTreeByStack: () => (/* reexport safe */ _lib__WEBPACK_IMPORTED_MODULE_4__.traverseTreeByStack),
27627
28033
  /* harmony export */ useFormData: () => (/* reexport safe */ _hooks__WEBPACK_IMPORTED_MODULE_2__.useFormData),
27628
28034
  /* harmony export */ useIsErrorField: () => (/* reexport safe */ _hooks__WEBPACK_IMPORTED_MODULE_2__.useIsErrorField)