@salutejs/plasma-core 1.214.0-canary.2452.21584026956.0 → 1.214.0-dev.0

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.
Files changed (151) hide show
  1. package/.swc/plugins/{v7_linux_x86_64_14.0.0/cce279a62b5dde357ee7b421711ef357c3f0a29cd3cb6e86336f7345fd604d8e → linux_x86_64_24.0.0/202f6e4cef5244f7c5860be71bf49ba7448c1085420582e8bfccb5598d99b9c4.wasmer-v7} +0 -0
  2. package/.swc/plugins/{v7_linux_x86_64_14.0.0/358fecaab1701de64a7bceee21e5f3a204d1107aa33eb372d1dab77a43118622 → linux_x86_64_24.0.0/671036687e3bc3a68b2957b14f0890c0b5825f19e8049d9af5daf3537b9160fd.wasmer-v7} +0 -0
  3. package/collectPackageInfo.js +1 -1
  4. package/components/Badge/Badge.js +19 -10
  5. package/components/Button/Button.mixins.js +1 -1
  6. package/components/Button/createButton.js +76 -12
  7. package/components/Card/Card.js +75 -11
  8. package/components/Card/CardMedia.js +19 -10
  9. package/components/Card/CardPrice.js +19 -10
  10. package/components/Card/CardTypography.js +2 -2
  11. package/components/Carousel/CarouselItem.js +21 -12
  12. package/components/Carousel/hooks.js +2 -2
  13. package/components/Carousel/utils.js +14 -14
  14. package/components/Image/Image.js +19 -10
  15. package/components/Input/Input.mixins.js +1 -1
  16. package/components/ModalBase/ModalBase.js +19 -10
  17. package/components/ModalBase/ModalBaseContext.js +3 -3
  18. package/components/ModalBase/ModalOverlay.js +19 -10
  19. package/components/ModalBase/hooks.js +1 -1
  20. package/components/PaginationDots/usePaginationDots.js +1 -1
  21. package/components/Popup/Popup.js +77 -13
  22. package/components/PopupBase/PopupBase.js +31 -13
  23. package/components/PopupBase/PopupBaseContext.js +4 -4
  24. package/components/PopupBase/PopupBaseRoot.js +75 -11
  25. package/components/PopupBase/hooks.js +2 -2
  26. package/components/PopupBase/utils.js +1 -1
  27. package/components/Price/Price.js +19 -10
  28. package/components/RadioGroup/RadioGroup.js +75 -11
  29. package/components/SSRProvider/SSRProvider.js +1 -1
  30. package/components/Skeleton/LineSkeleton.js +19 -10
  31. package/components/Skeleton/RectSkeleton.js +19 -10
  32. package/components/Skeleton/TextSkeleton.js +19 -10
  33. package/components/Slider/Double.js +19 -10
  34. package/components/Slider/Handle.js +29 -11
  35. package/components/Slider/Single.js +19 -10
  36. package/components/Slider/Slider.js +2 -2
  37. package/components/Slider/SliderBase.js +2 -2
  38. package/components/Slider/ThumbBase.js +19 -10
  39. package/components/Spinner/Spinner.js +19 -10
  40. package/components/Spinner/SpinnerSvg.js +19 -10
  41. package/components/Switch/Switch.js +76 -12
  42. package/components/Tabs/TabItem.js +75 -11
  43. package/components/Tabs/Tabs.js +75 -11
  44. package/components/Tabs/createTabsController.js +75 -11
  45. package/components/TextArea/TextArea.js +1 -1
  46. package/components/Toast/Toast.js +1 -1
  47. package/components/Toast/ToastContext.js +2 -2
  48. package/components/Toast/ToastController.js +3 -3
  49. package/components/Toast/ToastProvider.js +3 -3
  50. package/components/Toast/useToast.js +1 -1
  51. package/es/collectPackageInfo.js +1 -1
  52. package/es/components/Badge/Badge.js +19 -10
  53. package/es/components/Button/Button.mixins.js +1 -1
  54. package/es/components/Button/createButton.js +76 -12
  55. package/es/components/Card/Card.js +75 -11
  56. package/es/components/Card/CardMedia.js +19 -10
  57. package/es/components/Card/CardPrice.js +19 -10
  58. package/es/components/Card/CardTypography.js +2 -2
  59. package/es/components/Carousel/CarouselItem.js +21 -12
  60. package/es/components/Carousel/hooks.js +4 -4
  61. package/es/components/Carousel/utils.js +14 -14
  62. package/es/components/Image/Image.js +19 -10
  63. package/es/components/Input/Input.mixins.js +1 -1
  64. package/es/components/ModalBase/ModalBase.js +19 -10
  65. package/es/components/ModalBase/ModalBaseContext.js +3 -3
  66. package/es/components/ModalBase/ModalOverlay.js +19 -10
  67. package/es/components/ModalBase/hooks.js +1 -1
  68. package/es/components/PaginationDots/usePaginationDots.js +1 -1
  69. package/es/components/Popup/Popup.js +77 -13
  70. package/es/components/PopupBase/PopupBase.js +31 -13
  71. package/es/components/PopupBase/PopupBaseContext.js +4 -4
  72. package/es/components/PopupBase/PopupBaseRoot.js +75 -11
  73. package/es/components/PopupBase/hooks.js +2 -2
  74. package/es/components/PopupBase/utils.js +1 -1
  75. package/es/components/Price/Price.js +19 -10
  76. package/es/components/RadioGroup/RadioGroup.js +75 -11
  77. package/es/components/SSRProvider/SSRProvider.js +1 -1
  78. package/es/components/Skeleton/LineSkeleton.js +19 -10
  79. package/es/components/Skeleton/RectSkeleton.js +19 -10
  80. package/es/components/Skeleton/TextSkeleton.js +19 -10
  81. package/es/components/Slider/Double.js +19 -10
  82. package/es/components/Slider/Handle.js +29 -11
  83. package/es/components/Slider/Single.js +19 -10
  84. package/es/components/Slider/Slider.js +2 -2
  85. package/es/components/Slider/SliderBase.js +2 -2
  86. package/es/components/Slider/ThumbBase.js +19 -10
  87. package/es/components/Spinner/Spinner.js +19 -10
  88. package/es/components/Spinner/SpinnerSvg.js +19 -10
  89. package/es/components/Switch/Switch.js +76 -12
  90. package/es/components/Tabs/TabItem.js +75 -11
  91. package/es/components/Tabs/Tabs.js +75 -11
  92. package/es/components/Tabs/createTabsController.js +75 -11
  93. package/es/components/TextArea/TextArea.js +1 -1
  94. package/es/components/Toast/Toast.js +1 -1
  95. package/es/components/Toast/ToastContext.js +2 -2
  96. package/es/components/Toast/ToastController.js +3 -3
  97. package/es/components/Toast/ToastProvider.js +3 -3
  98. package/es/components/Toast/useToast.js +1 -1
  99. package/es/hocs/withAutoFocus.js +20 -11
  100. package/es/hocs/withSkeleton.js +1 -1
  101. package/es/hooks/useFocusTrap.js +4 -4
  102. package/es/hooks/useForkRef.js +1 -1
  103. package/es/hooks/useResizeObserver.js +1 -1
  104. package/es/mixins/addFocus.js +2 -2
  105. package/es/mixins/applyDisabled.js +1 -1
  106. package/es/mixins/applyEllipsis.js +1 -1
  107. package/es/mixins/applyMaxLines.js +1 -1
  108. package/es/mixins/applyNoSelect.js +1 -1
  109. package/es/mixins/applyOutline.js +1 -1
  110. package/es/mixins/applyRoundness.js +1 -1
  111. package/es/mixins/applyScrollSnap.js +1 -1
  112. package/es/mixins/applySkeletonGradient.js +1 -1
  113. package/es/mixins/applyView.js +1 -1
  114. package/es/mixins/blur.js +1 -1
  115. package/es/utils/animatedScrollTo.js +8 -8
  116. package/es/utils/extractTextFrom.js +1 -1
  117. package/es/utils/formatCurrency.js +1 -1
  118. package/es/utils/formatters.js +5 -5
  119. package/es/utils/roundness.js +1 -1
  120. package/es/utils/scopeTab.js +1 -1
  121. package/es/utils/setRef.js +1 -1
  122. package/es/utils/tabbable.js +6 -6
  123. package/es/utils/toCssSize.js +1 -1
  124. package/es/utils/transformStyles.js +3 -3
  125. package/hocs/withAutoFocus.js +20 -11
  126. package/hocs/withSkeleton.js +1 -1
  127. package/hooks/useFocusTrap.js +4 -4
  128. package/hooks/useForkRef.js +1 -1
  129. package/hooks/useResizeObserver.js +1 -1
  130. package/mixins/addFocus.js +2 -2
  131. package/mixins/applyDisabled.js +1 -1
  132. package/mixins/applyEllipsis.js +1 -1
  133. package/mixins/applyMaxLines.js +1 -1
  134. package/mixins/applyNoSelect.js +1 -1
  135. package/mixins/applyOutline.js +1 -1
  136. package/mixins/applyRoundness.js +1 -1
  137. package/mixins/applyScrollSnap.js +1 -1
  138. package/mixins/applySkeletonGradient.js +1 -1
  139. package/mixins/applyView.js +1 -1
  140. package/mixins/blur.js +1 -1
  141. package/package.json +3 -3
  142. package/utils/animatedScrollTo.js +8 -8
  143. package/utils/extractTextFrom.js +1 -1
  144. package/utils/formatCurrency.js +1 -1
  145. package/utils/formatters.js +5 -5
  146. package/utils/roundness.js +1 -1
  147. package/utils/scopeTab.js +1 -1
  148. package/utils/setRef.js +1 -1
  149. package/utils/tabbable.js +6 -6
  150. package/utils/toCssSize.js +1 -1
  151. package/utils/transformStyles.js +3 -3
@@ -1,5 +1,5 @@
1
1
  import { animatedScrollToX, animatedScrollToY } from '../../utils';
2
- var positionModByScrollAlign = function(param) {
2
+ var positionModByScrollAlign = function positionModByScrollAlign(param) {
3
3
  var scrollAlign = param.scrollAlign, position = param.position, carouselSize = param.carouselSize, itemSize = param.itemSize, offset = param.offset, scrollStart = param.scrollStart, axis = param.axis;
4
4
  if (scrollAlign === 'start') {
5
5
  var inaccuracy = 1;
@@ -24,7 +24,7 @@ var positionModByScrollAlign = function(param) {
24
24
  };
25
25
  /**
26
26
  * Подсчет скролла до переданного индекса.
27
- */ export var getCalculatedPos = function(param) {
27
+ */ export var getCalculatedPos = function getCalculatedPos(param) {
28
28
  var scrollEl = param.scrollEl, items = param.items, axis = param.axis, index = param.index, offset = param.offset, scrollAlign = param.scrollAlign;
29
29
  var position = scrollAlign === 'center' ? offset : 0;
30
30
  var carouselSize;
@@ -35,26 +35,26 @@ var positionModByScrollAlign = function(param) {
35
35
  }
36
36
  for(var i = 0; i < index; i++){
37
37
  if (axis === 'x') {
38
+ var _ref;
38
39
  var _items_item;
39
- var _items_item_offsetWidth;
40
- position += (_items_item_offsetWidth = (_items_item = items.item(i)) === null || _items_item === void 0 ? void 0 : _items_item.offsetWidth) !== null && _items_item_offsetWidth !== void 0 ? _items_item_offsetWidth : 0;
40
+ position += (_ref = (_items_item = items.item(i)) === null || _items_item === void 0 ? void 0 : _items_item.offsetWidth) !== null && _ref !== void 0 ? _ref : 0;
41
41
  } else {
42
+ var _ref1;
42
43
  var _items_item1;
43
- var _items_item_offsetHeight;
44
- position += (_items_item_offsetHeight = (_items_item1 = items.item(i)) === null || _items_item1 === void 0 ? void 0 : _items_item1.offsetHeight) !== null && _items_item_offsetHeight !== void 0 ? _items_item_offsetHeight : 0;
44
+ position += (_ref1 = (_items_item1 = items.item(i)) === null || _items_item1 === void 0 ? void 0 : _items_item1.offsetHeight) !== null && _ref1 !== void 0 ? _ref1 : 0;
45
45
  }
46
46
  }
47
47
  if (axis === 'x') {
48
+ var _ref2;
48
49
  var _items_item2;
49
50
  carouselSize = scrollEl.offsetWidth;
50
- var _items_item_offsetWidth1;
51
- itemSize = (_items_item_offsetWidth1 = (_items_item2 = items.item(index)) === null || _items_item2 === void 0 ? void 0 : _items_item2.offsetWidth) !== null && _items_item_offsetWidth1 !== void 0 ? _items_item_offsetWidth1 : 0;
51
+ itemSize = (_ref2 = (_items_item2 = items.item(index)) === null || _items_item2 === void 0 ? void 0 : _items_item2.offsetWidth) !== null && _ref2 !== void 0 ? _ref2 : 0;
52
52
  scrollStart = scrollEl.scrollLeft;
53
53
  } else {
54
+ var _ref3;
54
55
  var _items_item3;
55
56
  carouselSize = scrollEl.offsetHeight;
56
- var _items_item_offsetHeight1;
57
- itemSize = (_items_item_offsetHeight1 = (_items_item3 = items.item(index)) === null || _items_item3 === void 0 ? void 0 : _items_item3.offsetHeight) !== null && _items_item_offsetHeight1 !== void 0 ? _items_item_offsetHeight1 : 0;
57
+ itemSize = (_ref3 = (_items_item3 = items.item(index)) === null || _items_item3 === void 0 ? void 0 : _items_item3.offsetHeight) !== null && _ref3 !== void 0 ? _ref3 : 0;
58
58
  scrollStart = scrollEl.scrollTop;
59
59
  }
60
60
  return positionModByScrollAlign({
@@ -69,13 +69,13 @@ var positionModByScrollAlign = function(param) {
69
69
  };
70
70
  /**
71
71
  * Подсчет смещения из-за паддингов.
72
- */ export var getCalculatedOffset = function(scrollEl, trackEl, axis) {
72
+ */ export var getCalculatedOffset = function getCalculatedOffset(scrollEl, trackEl, axis) {
73
73
  var paddingProp = axis === 'x' ? 'paddingLeft' : 'paddingTop';
74
74
  return parseInt(getComputedStyle(scrollEl)[paddingProp], 10) + parseInt(getComputedStyle(trackEl)[paddingProp], 10);
75
75
  };
76
76
  /**
77
77
  * Прокрутка к указанной позиции с анимацией или без.
78
- */ export var scrollToPos = function(param) {
78
+ */ export var scrollToPos = function scrollToPos(param) {
79
79
  var scrollEl = param.scrollEl, pos = param.pos, axis = param.axis, animated = param.animated, duration = param.duration, timingFunction = param.timingFunction;
80
80
  if (axis === 'x' && Math.abs(pos - scrollEl.scrollLeft) > 1) {
81
81
  if (animated) {
@@ -96,13 +96,13 @@ var positionModByScrollAlign = function(param) {
96
96
  }
97
97
  }
98
98
  };
99
- var round = function(n) {
99
+ var round = function round(n) {
100
100
  return Math.round(n * 100) / 100;
101
101
  };
102
102
  /**
103
103
  * Получить позицию (слот) айтема в каруселе.
104
104
  * Каждый айтем имеет свой слот относительно вьюпорта карусели.
105
- */ export var getItemSlot = function(itemIndex, itemEnd, itemSize, scrollStart, scrollSize, scrollAlign) {
105
+ */ export var getItemSlot = function getItemSlot(itemIndex, itemEnd, itemSize, scrollStart, scrollSize, scrollAlign) {
106
106
  var prevIndex = arguments.length > 6 && arguments[6] !== void 0 ? arguments[6] : 0, offset = arguments.length > 7 && arguments[7] !== void 0 ? arguments[7] : 0;
107
107
  /**
108
108
  * Граница и центр скролла (видимой части).
@@ -28,12 +28,22 @@ function _object_spread(target) {
28
28
  }
29
29
  function _object_without_properties(source, excluded) {
30
30
  if (source == null) return {};
31
- var target = _object_without_properties_loose(source, excluded);
32
- var key, i;
31
+ var target = {}, sourceKeys, key, i;
32
+ if (typeof Reflect !== "undefined" && Reflect.ownKeys) {
33
+ sourceKeys = Reflect.ownKeys(source);
34
+ for(i = 0; i < sourceKeys.length; i++){
35
+ key = sourceKeys[i];
36
+ if (excluded.indexOf(key) >= 0) continue;
37
+ if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
38
+ target[key] = source[key];
39
+ }
40
+ return target;
41
+ }
42
+ target = _object_without_properties_loose(source, excluded);
33
43
  if (Object.getOwnPropertySymbols) {
34
- var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
35
- for(i = 0; i < sourceSymbolKeys.length; i++){
36
- key = sourceSymbolKeys[i];
44
+ sourceKeys = Object.getOwnPropertySymbols(source);
45
+ for(i = 0; i < sourceKeys.length; i++){
46
+ key = sourceKeys[i];
37
47
  if (excluded.indexOf(key) >= 0) continue;
38
48
  if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
39
49
  target[key] = source[key];
@@ -43,12 +53,11 @@ function _object_without_properties(source, excluded) {
43
53
  }
44
54
  function _object_without_properties_loose(source, excluded) {
45
55
  if (source == null) return {};
46
- var target = {};
47
- var sourceKeys = Object.keys(source);
48
- var key, i;
56
+ var target = {}, sourceKeys = Object.getOwnPropertyNames(source), key, i;
49
57
  for(i = 0; i < sourceKeys.length; i++){
50
58
  key = sourceKeys[i];
51
59
  if (excluded.indexOf(key) >= 0) continue;
60
+ if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
52
61
  target[key] = source[key];
53
62
  }
54
63
  return target;
@@ -113,8 +122,8 @@ var StyledDivImg = styled.div.withConfig({
113
122
  ]);
114
123
  /**
115
124
  * Компонент для отображения картинок.
116
- */ var ImageBase = function(_param) {
117
- var src = _param.src, srcSet = _param.srcSet, sizes = _param.sizes, _param_base = _param.base, base = _param_base === void 0 ? 'img' : _param_base, alt = _param.alt, width = _param.width, height = _param.height, props = _object_without_properties(_param, [
125
+ */ var ImageBase = function ImageBase(_0) {
126
+ var src = _0.src, srcSet = _0.srcSet, sizes = _0.sizes, _0_base = _0.base, base = _0_base === void 0 ? 'img' : _0_base, alt = _0.alt, width = _0.width, height = _0.height, props = _object_without_properties(_0, [
118
127
  "src",
119
128
  "srcSet",
120
129
  "sizes",
@@ -1,7 +1,7 @@
1
1
  import { css } from 'styled-components';
2
2
  import { accent } from '../../tokens';
3
3
  import { fieldStatuses } from '../Field';
4
- export var applyInputStyles = function(param) {
4
+ export var applyInputStyles = function applyInputStyles(param) {
5
5
  var status = param.status, _param_$size = param.$size, $size = _param_$size === void 0 ? 'm' : _param_$size;
6
6
  return css([
7
7
  "box-sizing:border-box;width:100%;border:0 none;caret-color:",
@@ -28,12 +28,22 @@ function _object_spread(target) {
28
28
  }
29
29
  function _object_without_properties(source, excluded) {
30
30
  if (source == null) return {};
31
- var target = _object_without_properties_loose(source, excluded);
32
- var key, i;
31
+ var target = {}, sourceKeys, key, i;
32
+ if (typeof Reflect !== "undefined" && Reflect.ownKeys) {
33
+ sourceKeys = Reflect.ownKeys(source);
34
+ for(i = 0; i < sourceKeys.length; i++){
35
+ key = sourceKeys[i];
36
+ if (excluded.indexOf(key) >= 0) continue;
37
+ if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
38
+ target[key] = source[key];
39
+ }
40
+ return target;
41
+ }
42
+ target = _object_without_properties_loose(source, excluded);
33
43
  if (Object.getOwnPropertySymbols) {
34
- var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
35
- for(i = 0; i < sourceSymbolKeys.length; i++){
36
- key = sourceSymbolKeys[i];
44
+ sourceKeys = Object.getOwnPropertySymbols(source);
45
+ for(i = 0; i < sourceKeys.length; i++){
46
+ key = sourceKeys[i];
37
47
  if (excluded.indexOf(key) >= 0) continue;
38
48
  if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
39
49
  target[key] = source[key];
@@ -43,12 +53,11 @@ function _object_without_properties(source, excluded) {
43
53
  }
44
54
  function _object_without_properties_loose(source, excluded) {
45
55
  if (source == null) return {};
46
- var target = {};
47
- var sourceKeys = Object.keys(source);
48
- var key, i;
56
+ var target = {}, sourceKeys = Object.getOwnPropertyNames(source), key, i;
49
57
  for(i = 0; i < sourceKeys.length; i++){
50
58
  key = sourceKeys[i];
51
59
  if (excluded.indexOf(key) >= 0) continue;
60
+ if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
52
61
  target[key] = source[key];
53
62
  }
54
63
  return target;
@@ -65,8 +74,8 @@ var NoScroll = createGlobalStyle([
65
74
  /**
66
75
  * ModalBase.
67
76
  * Управляет показом/скрытием, подложкой и анимацией визуальной части модального окна.
68
- */ export var ModalBase = function(_param) {
69
- var id = _param.id, withAnimation = _param.withAnimation, onClose = _param.onClose, onOverlayClick = _param.onOverlayClick, onEscKeyDown = _param.onEscKeyDown, _param_closeOnEsc = _param.closeOnEsc, closeOnEsc = _param_closeOnEsc === void 0 ? true : _param_closeOnEsc, _param_closeOnOverlayClick = _param.closeOnOverlayClick, closeOnOverlayClick = _param_closeOnOverlayClick === void 0 ? true : _param_closeOnOverlayClick, withBlur = _param.withBlur, initialFocusRef = _param.initialFocusRef, focusAfterRef = _param.focusAfterRef, zIndex = _param.zIndex, popupInfo = _param.popupInfo, children = _param.children, rest = _object_without_properties(_param, [
77
+ */ export var ModalBase = function ModalBase(_0) {
78
+ var id = _0.id, withAnimation = _0.withAnimation, onClose = _0.onClose, onOverlayClick = _0.onOverlayClick, onEscKeyDown = _0.onEscKeyDown, _0_closeOnEsc = _0.closeOnEsc, closeOnEsc = _0_closeOnEsc === void 0 ? true : _0_closeOnEsc, _0_closeOnOverlayClick = _0.closeOnOverlayClick, closeOnOverlayClick = _0_closeOnOverlayClick === void 0 ? true : _0_closeOnOverlayClick, withBlur = _0.withBlur, initialFocusRef = _0.initialFocusRef, focusAfterRef = _0.focusAfterRef, zIndex = _0.zIndex, popupInfo = _0.popupInfo, children = _0.children, rest = _object_without_properties(_0, [
70
79
  "id",
71
80
  "withAnimation",
72
81
  "onClose",
@@ -1,19 +1,19 @@
1
1
  /**
2
2
  * Взаимодействие с модальными оконами.
3
- */ var getModals = function(items) {
3
+ */ var getModals = function getModals(items) {
4
4
  return items.filter(function(item) {
5
5
  var _item_info;
6
6
  return item === null || item === void 0 ? void 0 : (_item_info = item.info) === null || _item_info === void 0 ? void 0 : _item_info.isModal;
7
7
  });
8
8
  };
9
- export var getIdLastModal = function(items) {
9
+ export var getIdLastModal = function getIdLastModal(items) {
10
10
  var modals = getModals(items);
11
11
  if (!modals.length) {
12
12
  return;
13
13
  }
14
14
  return modals[modals.length - 1].id;
15
15
  };
16
- export var getIdFirstModal = function(items) {
16
+ export var getIdFirstModal = function getIdFirstModal(items) {
17
17
  var modals = getModals(items);
18
18
  if (!modals.length) {
19
19
  return;
@@ -28,12 +28,22 @@ function _object_spread(target) {
28
28
  }
29
29
  function _object_without_properties(source, excluded) {
30
30
  if (source == null) return {};
31
- var target = _object_without_properties_loose(source, excluded);
32
- var key, i;
31
+ var target = {}, sourceKeys, key, i;
32
+ if (typeof Reflect !== "undefined" && Reflect.ownKeys) {
33
+ sourceKeys = Reflect.ownKeys(source);
34
+ for(i = 0; i < sourceKeys.length; i++){
35
+ key = sourceKeys[i];
36
+ if (excluded.indexOf(key) >= 0) continue;
37
+ if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
38
+ target[key] = source[key];
39
+ }
40
+ return target;
41
+ }
42
+ target = _object_without_properties_loose(source, excluded);
33
43
  if (Object.getOwnPropertySymbols) {
34
- var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
35
- for(i = 0; i < sourceSymbolKeys.length; i++){
36
- key = sourceSymbolKeys[i];
44
+ sourceKeys = Object.getOwnPropertySymbols(source);
45
+ for(i = 0; i < sourceKeys.length; i++){
46
+ key = sourceKeys[i];
37
47
  if (excluded.indexOf(key) >= 0) continue;
38
48
  if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
39
49
  target[key] = source[key];
@@ -43,12 +53,11 @@ function _object_without_properties(source, excluded) {
43
53
  }
44
54
  function _object_without_properties_loose(source, excluded) {
45
55
  if (source == null) return {};
46
- var target = {};
47
- var sourceKeys = Object.keys(source);
48
- var key, i;
56
+ var target = {}, sourceKeys = Object.getOwnPropertyNames(source), key, i;
49
57
  for(i = 0; i < sourceKeys.length; i++){
50
58
  key = sourceKeys[i];
51
59
  if (excluded.indexOf(key) >= 0) continue;
60
+ if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
52
61
  target[key] = source[key];
53
62
  }
54
63
  return target;
@@ -93,8 +102,8 @@ export var Overlay = styled.div.withConfig({
93
102
  });
94
103
  /**
95
104
  * ModalOverlay - подложка для ModalBase.
96
- */ export var ModalOverlay = function(_param) {
97
- var id = _param.id, withBlur = _param.withBlur, onOverlayClick = _param.onOverlayClick, onClose = _param.onClose, zIndex = _param.zIndex, _param_closeOnOverlayClick = _param.closeOnOverlayClick, closeOnOverlayClick = _param_closeOnOverlayClick === void 0 ? true : _param_closeOnOverlayClick, rest = _object_without_properties(_param, [
105
+ */ export var ModalOverlay = function ModalOverlay(_0) {
106
+ var id = _0.id, withBlur = _0.withBlur, onOverlayClick = _0.onOverlayClick, onClose = _0.onClose, zIndex = _0.zIndex, _0_closeOnOverlayClick = _0.closeOnOverlayClick, closeOnOverlayClick = _0_closeOnOverlayClick === void 0 ? true : _0_closeOnOverlayClick, rest = _object_without_properties(_0, [
98
107
  "id",
99
108
  "withBlur",
100
109
  "onOverlayClick",
@@ -30,7 +30,7 @@ import { useCallback, useEffect } from 'react';
30
30
  import { usePopupBaseContext } from '../PopupBase';
31
31
  import { getIdLastModal } from './ModalBaseContext';
32
32
  var ESCAPE_KEYCODE = 27;
33
- export var useModal = function(param) {
33
+ export var useModal = function useModal(param) {
34
34
  var id = param.id, popupInfo = param.popupInfo, onEscKeyDown = param.onEscKeyDown, onClose = param.onClose, _param_closeOnEsc = param.closeOnEsc, closeOnEsc = _param_closeOnEsc === void 0 ? true : _param_closeOnEsc;
35
35
  var popupController = usePopupBaseContext();
36
36
  // При ESC закрывает текущее окно, если это возможно
@@ -1,5 +1,5 @@
1
1
  import { useRef } from 'react';
2
- export var usePaginationDots = function(param) {
2
+ export var usePaginationDots = function usePaginationDots(param) {
3
3
  var items = param.items, index = param.index, _param_visibleItems = param.visibleItems, visibleItems = _param_visibleItems === void 0 ? 7 : _param_visibleItems;
4
4
  var activeId = items[index].id;
5
5
  var prevIndex = useRef(null);
@@ -1,3 +1,11 @@
1
+ function _array_like_to_array(arr, len) {
2
+ if (len == null || len > arr.length) len = arr.length;
3
+ for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
4
+ return arr2;
5
+ }
6
+ function _array_with_holes(arr) {
7
+ if (Array.isArray(arr)) return arr;
8
+ }
1
9
  function _define_property(obj, key, value) {
2
10
  if (key in obj) {
3
11
  Object.defineProperty(obj, key, {
@@ -11,6 +19,36 @@ function _define_property(obj, key, value) {
11
19
  }
12
20
  return obj;
13
21
  }
22
+ function _iterable_to_array(iter) {
23
+ if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
24
+ }
25
+ function _iterable_to_array_limit(arr, i) {
26
+ var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
27
+ if (_i == null) return;
28
+ var _arr = [];
29
+ var _n = true;
30
+ var _d = false;
31
+ var _s, _e;
32
+ try {
33
+ for(_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true){
34
+ _arr.push(_s.value);
35
+ if (i && _arr.length === i) break;
36
+ }
37
+ } catch (err) {
38
+ _d = true;
39
+ _e = err;
40
+ } finally{
41
+ try {
42
+ if (!_n && _i["return"] != null) _i["return"]();
43
+ } finally{
44
+ if (_d) throw _e;
45
+ }
46
+ }
47
+ return _arr;
48
+ }
49
+ function _non_iterable_rest() {
50
+ throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
51
+ }
14
52
  function _object_spread(target) {
15
53
  for(var i = 1; i < arguments.length; i++){
16
54
  var source = arguments[i] != null ? arguments[i] : {};
@@ -52,12 +90,22 @@ function _object_spread_props(target, source) {
52
90
  }
53
91
  function _object_without_properties(source, excluded) {
54
92
  if (source == null) return {};
55
- var target = _object_without_properties_loose(source, excluded);
56
- var key, i;
93
+ var target = {}, sourceKeys, key, i;
94
+ if (typeof Reflect !== "undefined" && Reflect.ownKeys) {
95
+ sourceKeys = Reflect.ownKeys(source);
96
+ for(i = 0; i < sourceKeys.length; i++){
97
+ key = sourceKeys[i];
98
+ if (excluded.indexOf(key) >= 0) continue;
99
+ if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
100
+ target[key] = source[key];
101
+ }
102
+ return target;
103
+ }
104
+ target = _object_without_properties_loose(source, excluded);
57
105
  if (Object.getOwnPropertySymbols) {
58
- var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
59
- for(i = 0; i < sourceSymbolKeys.length; i++){
60
- key = sourceSymbolKeys[i];
106
+ sourceKeys = Object.getOwnPropertySymbols(source);
107
+ for(i = 0; i < sourceKeys.length; i++){
108
+ key = sourceKeys[i];
61
109
  if (excluded.indexOf(key) >= 0) continue;
62
110
  if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
63
111
  target[key] = source[key];
@@ -67,16 +115,29 @@ function _object_without_properties(source, excluded) {
67
115
  }
68
116
  function _object_without_properties_loose(source, excluded) {
69
117
  if (source == null) return {};
70
- var target = {};
71
- var sourceKeys = Object.keys(source);
72
- var key, i;
118
+ var target = {}, sourceKeys = Object.getOwnPropertyNames(source), key, i;
73
119
  for(i = 0; i < sourceKeys.length; i++){
74
120
  key = sourceKeys[i];
75
121
  if (excluded.indexOf(key) >= 0) continue;
122
+ if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
76
123
  target[key] = source[key];
77
124
  }
78
125
  return target;
79
126
  }
127
+ function _sliced_to_array(arr, i) {
128
+ return _array_with_holes(arr) || _iterable_to_array_limit(arr, i) || _unsupported_iterable_to_array(arr, i) || _non_iterable_rest();
129
+ }
130
+ function _to_array(arr) {
131
+ return _array_with_holes(arr) || _iterable_to_array(arr) || _unsupported_iterable_to_array(arr) || _non_iterable_rest();
132
+ }
133
+ function _unsupported_iterable_to_array(o, minLen) {
134
+ if (!o) return;
135
+ if (typeof o === "string") return _array_like_to_array(o, minLen);
136
+ var n = Object.prototype.toString.call(o).slice(8, -1);
137
+ if (n === "Object" && o.constructor) n = o.constructor.name;
138
+ if (n === "Map" || n === "Set") return Array.from(n);
139
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
140
+ }
80
141
  import React, { memo, useRef, useCallback, useEffect } from 'react';
81
142
  import styled from 'styled-components';
82
143
  import { usePopper } from 'react-popper';
@@ -93,10 +154,10 @@ var StyledPopup = styled.div.withConfig({
93
154
  })([
94
155
  "position:absolute;z-index:1;padding:var(--plasma-popup-padding);margin:var(--plasma-popup-margin);width:var(--plasma-popup-width);"
95
156
  ]);
96
- export var getPlacement = function(placement) {
157
+ export var getPlacement = function getPlacement(placement) {
97
158
  return "".concat(placement, "-start");
98
159
  };
99
- var getAutoPlacements = function(placements) {
160
+ var getAutoPlacements = function getAutoPlacements(placements) {
100
161
  return (placements || []).map(function(placement) {
101
162
  return getPlacement(placement);
102
163
  });
@@ -105,8 +166,11 @@ var getAutoPlacements = function(placements) {
105
166
  * Всплывающее окно с возможностью позиционирования
106
167
  * и вызова по клику либо ховеру.
107
168
  * @deprecated Используйте Popover
108
- */ export var Popup = /*#__PURE__*/ memo(/*#__PURE__*/ React.forwardRef(function(_param, outerRootRef) {
109
- var disclosure = _param.disclosure, children = _param.children, isOpen = _param.isOpen, opened = _param.opened, trigger = _param.trigger, _param_placement = _param.placement, placement = _param_placement === void 0 ? 'auto' : _param_placement, onToggle = _param.onToggle, rest = _object_without_properties(_param, [
169
+ */ export var Popup = /*#__PURE__*/ memo(/*#__PURE__*/ React.forwardRef(function(_0, _1) {
170
+ var _ref = [
171
+ _0,
172
+ _1
173
+ ], _ref1 = _to_array(_ref), _ref2 = _ref1[0], _rest = _ref1.slice(1), disclosure = _ref2.disclosure, children = _ref2.children, isOpen = _ref2.isOpen, opened = _ref2.opened, trigger = _ref2.trigger, _ref_placement = _ref2.placement, placement = _ref_placement === void 0 ? 'auto' : _ref_placement, onToggle = _ref2.onToggle, rest = _object_without_properties(_ref2, [
110
174
  "disclosure",
111
175
  "children",
112
176
  "isOpen",
@@ -114,7 +178,7 @@ var getAutoPlacements = function(placements) {
114
178
  "trigger",
115
179
  "placement",
116
180
  "onToggle"
117
- ]);
181
+ ]), _rest1 = _sliced_to_array(_rest, 1), outerRootRef = _rest1[0];
118
182
  var innerIsOpen = Boolean(isOpen || opened);
119
183
  var rootRef = useRef(null);
120
184
  var popupRef = useRef(null);
@@ -19,6 +19,9 @@ function _define_property(obj, key, value) {
19
19
  }
20
20
  return obj;
21
21
  }
22
+ function _iterable_to_array(iter) {
23
+ if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
24
+ }
22
25
  function _iterable_to_array_limit(arr, i) {
23
26
  var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
24
27
  if (_i == null) return;
@@ -63,12 +66,22 @@ function _object_spread(target) {
63
66
  }
64
67
  function _object_without_properties(source, excluded) {
65
68
  if (source == null) return {};
66
- var target = _object_without_properties_loose(source, excluded);
67
- var key, i;
69
+ var target = {}, sourceKeys, key, i;
70
+ if (typeof Reflect !== "undefined" && Reflect.ownKeys) {
71
+ sourceKeys = Reflect.ownKeys(source);
72
+ for(i = 0; i < sourceKeys.length; i++){
73
+ key = sourceKeys[i];
74
+ if (excluded.indexOf(key) >= 0) continue;
75
+ if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
76
+ target[key] = source[key];
77
+ }
78
+ return target;
79
+ }
80
+ target = _object_without_properties_loose(source, excluded);
68
81
  if (Object.getOwnPropertySymbols) {
69
- var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
70
- for(i = 0; i < sourceSymbolKeys.length; i++){
71
- key = sourceSymbolKeys[i];
82
+ sourceKeys = Object.getOwnPropertySymbols(source);
83
+ for(i = 0; i < sourceKeys.length; i++){
84
+ key = sourceKeys[i];
72
85
  if (excluded.indexOf(key) >= 0) continue;
73
86
  if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
74
87
  target[key] = source[key];
@@ -78,12 +91,11 @@ function _object_without_properties(source, excluded) {
78
91
  }
79
92
  function _object_without_properties_loose(source, excluded) {
80
93
  if (source == null) return {};
81
- var target = {};
82
- var sourceKeys = Object.keys(source);
83
- var key, i;
94
+ var target = {}, sourceKeys = Object.getOwnPropertyNames(source), key, i;
84
95
  for(i = 0; i < sourceKeys.length; i++){
85
96
  key = sourceKeys[i];
86
97
  if (excluded.indexOf(key) >= 0) continue;
98
+ if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
87
99
  target[key] = source[key];
88
100
  }
89
101
  return target;
@@ -91,6 +103,9 @@ function _object_without_properties_loose(source, excluded) {
91
103
  function _sliced_to_array(arr, i) {
92
104
  return _array_with_holes(arr) || _iterable_to_array_limit(arr, i) || _unsupported_iterable_to_array(arr, i) || _non_iterable_rest();
93
105
  }
106
+ function _to_array(arr) {
107
+ return _array_with_holes(arr) || _iterable_to_array(arr) || _unsupported_iterable_to_array(arr) || _non_iterable_rest();
108
+ }
94
109
  function _unsupported_iterable_to_array(o, minLen) {
95
110
  if (!o) return;
96
111
  if (typeof o === "string") return _array_like_to_array(o, minLen);
@@ -113,7 +128,7 @@ var StyledPortal = styled.div.withConfig({
113
128
  })([
114
129
  ""
115
130
  ]);
116
- export var getClassName = function(animationInfo, className) {
131
+ export var getClassName = function getClassName(animationInfo, className) {
117
132
  var endAnimation = (animationInfo === null || animationInfo === void 0 ? void 0 : animationInfo.endAnimation) ? endAnimationClass : '';
118
133
  var endTransition = (animationInfo === null || animationInfo === void 0 ? void 0 : animationInfo.endTransition) ? endTransitionClass : '';
119
134
  return [
@@ -124,11 +139,14 @@ export var getClassName = function(animationInfo, className) {
124
139
  };
125
140
  /**
126
141
  * Базовый копмонент PopupBase.
127
- */ export var PopupBase = /*#__PURE__*/ forwardRef(function(_param, ref) {
128
- var id = _param.id, isOpen = _param.isOpen, opened = _param.opened, _param_placement = _param.placement, placement = _param_placement === void 0 ? 'center' : _param_placement, _param_offset = _param.offset, offset = _param_offset === void 0 ? [
142
+ */ export var PopupBase = /*#__PURE__*/ forwardRef(function(_0, _1) {
143
+ var _ref = [
144
+ _0,
145
+ _1
146
+ ], _ref1 = _to_array(_ref), _ref2 = _ref1[0], _rest = _ref1.slice(1), id = _ref2.id, isOpen = _ref2.isOpen, opened = _ref2.opened, _ref_placement = _ref2.placement, placement = _ref_placement === void 0 ? 'center' : _ref_placement, _ref_offset = _ref2.offset, offset = _ref_offset === void 0 ? [
129
147
  0,
130
148
  0
131
- ] : _param_offset, _param_frame = _param.frame, frame = _param_frame === void 0 ? 'document' : _param_frame, children = _param.children, overlay = _param.overlay, role = _param.role, zIndex = _param.zIndex, popupInfo = _param.popupInfo, _param_withAnimation = _param.withAnimation, withAnimation = _param_withAnimation === void 0 ? false : _param_withAnimation, className = _param.className, rest = _object_without_properties(_param, [
149
+ ] : _ref_offset, _ref_frame = _ref2.frame, frame = _ref_frame === void 0 ? 'document' : _ref_frame, children = _ref2.children, overlay = _ref2.overlay, role = _ref2.role, zIndex = _ref2.zIndex, popupInfo = _ref2.popupInfo, _ref_withAnimation = _ref2.withAnimation, withAnimation = _ref_withAnimation === void 0 ? false : _ref_withAnimation, className = _ref2.className, rest = _object_without_properties(_ref2, [
132
150
  "id",
133
151
  "isOpen",
134
152
  "opened",
@@ -142,7 +160,7 @@ export var getClassName = function(animationInfo, className) {
142
160
  "popupInfo",
143
161
  "withAnimation",
144
162
  "className"
145
- ]);
163
+ ]), _rest1 = _sliced_to_array(_rest, 1), ref = _rest1[0];
146
164
  var innerIsOpen = Boolean(isOpen || opened);
147
165
  var uniqId = useUniqId();
148
166
  var innerId = id || uniqId;
@@ -68,18 +68,18 @@ var PopupBaseContext = /*#__PURE__*/ createContext({
68
68
  throw new Error('Function not implemented. Add PopupBaseProvider');
69
69
  }
70
70
  });
71
- export var usePopupBaseContext = function() {
71
+ export var usePopupBaseContext = function usePopupBaseContext() {
72
72
  return useContext(PopupBaseContext);
73
73
  };
74
- export var PopupBaseProvider = function(param) {
74
+ export var PopupBaseProvider = function PopupBaseProvider(param) {
75
75
  var children = param.children;
76
76
  var _useState = _sliced_to_array(useState([]), 2), items = _useState[0], setItems = _useState[1];
77
- var register = function(info) {
77
+ var register = function register(info) {
78
78
  setItems(_to_consumable_array(items).concat([
79
79
  info
80
80
  ]));
81
81
  };
82
- var unregister = function(id) {
82
+ var unregister = function unregister(id) {
83
83
  var index = items.findIndex(function(item) {
84
84
  return id === item.id;
85
85
  });