@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.
- package/.swc/plugins/{v7_linux_x86_64_14.0.0/cce279a62b5dde357ee7b421711ef357c3f0a29cd3cb6e86336f7345fd604d8e → linux_x86_64_24.0.0/202f6e4cef5244f7c5860be71bf49ba7448c1085420582e8bfccb5598d99b9c4.wasmer-v7} +0 -0
- package/.swc/plugins/{v7_linux_x86_64_14.0.0/358fecaab1701de64a7bceee21e5f3a204d1107aa33eb372d1dab77a43118622 → linux_x86_64_24.0.0/671036687e3bc3a68b2957b14f0890c0b5825f19e8049d9af5daf3537b9160fd.wasmer-v7} +0 -0
- package/collectPackageInfo.js +1 -1
- package/components/Badge/Badge.js +19 -10
- package/components/Button/Button.mixins.js +1 -1
- package/components/Button/createButton.js +76 -12
- package/components/Card/Card.js +75 -11
- package/components/Card/CardMedia.js +19 -10
- package/components/Card/CardPrice.js +19 -10
- package/components/Card/CardTypography.js +2 -2
- package/components/Carousel/CarouselItem.js +21 -12
- package/components/Carousel/hooks.js +2 -2
- package/components/Carousel/utils.js +14 -14
- package/components/Image/Image.js +19 -10
- package/components/Input/Input.mixins.js +1 -1
- package/components/ModalBase/ModalBase.js +19 -10
- package/components/ModalBase/ModalBaseContext.js +3 -3
- package/components/ModalBase/ModalOverlay.js +19 -10
- package/components/ModalBase/hooks.js +1 -1
- package/components/PaginationDots/usePaginationDots.js +1 -1
- package/components/Popup/Popup.js +77 -13
- package/components/PopupBase/PopupBase.js +31 -13
- package/components/PopupBase/PopupBaseContext.js +4 -4
- package/components/PopupBase/PopupBaseRoot.js +75 -11
- package/components/PopupBase/hooks.js +2 -2
- package/components/PopupBase/utils.js +1 -1
- package/components/Price/Price.js +19 -10
- package/components/RadioGroup/RadioGroup.js +75 -11
- package/components/SSRProvider/SSRProvider.js +1 -1
- package/components/Skeleton/LineSkeleton.js +19 -10
- package/components/Skeleton/RectSkeleton.js +19 -10
- package/components/Skeleton/TextSkeleton.js +19 -10
- package/components/Slider/Double.js +19 -10
- package/components/Slider/Handle.js +29 -11
- package/components/Slider/Single.js +19 -10
- package/components/Slider/Slider.js +2 -2
- package/components/Slider/SliderBase.js +2 -2
- package/components/Slider/ThumbBase.js +19 -10
- package/components/Spinner/Spinner.js +19 -10
- package/components/Spinner/SpinnerSvg.js +19 -10
- package/components/Switch/Switch.js +76 -12
- package/components/Tabs/TabItem.js +75 -11
- package/components/Tabs/Tabs.js +75 -11
- package/components/Tabs/createTabsController.js +75 -11
- package/components/TextArea/TextArea.js +1 -1
- package/components/Toast/Toast.js +1 -1
- package/components/Toast/ToastContext.js +2 -2
- package/components/Toast/ToastController.js +3 -3
- package/components/Toast/ToastProvider.js +3 -3
- package/components/Toast/useToast.js +1 -1
- package/es/collectPackageInfo.js +1 -1
- package/es/components/Badge/Badge.js +19 -10
- package/es/components/Button/Button.mixins.js +1 -1
- package/es/components/Button/createButton.js +76 -12
- package/es/components/Card/Card.js +75 -11
- package/es/components/Card/CardMedia.js +19 -10
- package/es/components/Card/CardPrice.js +19 -10
- package/es/components/Card/CardTypography.js +2 -2
- package/es/components/Carousel/CarouselItem.js +21 -12
- package/es/components/Carousel/hooks.js +4 -4
- package/es/components/Carousel/utils.js +14 -14
- package/es/components/Image/Image.js +19 -10
- package/es/components/Input/Input.mixins.js +1 -1
- package/es/components/ModalBase/ModalBase.js +19 -10
- package/es/components/ModalBase/ModalBaseContext.js +3 -3
- package/es/components/ModalBase/ModalOverlay.js +19 -10
- package/es/components/ModalBase/hooks.js +1 -1
- package/es/components/PaginationDots/usePaginationDots.js +1 -1
- package/es/components/Popup/Popup.js +77 -13
- package/es/components/PopupBase/PopupBase.js +31 -13
- package/es/components/PopupBase/PopupBaseContext.js +4 -4
- package/es/components/PopupBase/PopupBaseRoot.js +75 -11
- package/es/components/PopupBase/hooks.js +2 -2
- package/es/components/PopupBase/utils.js +1 -1
- package/es/components/Price/Price.js +19 -10
- package/es/components/RadioGroup/RadioGroup.js +75 -11
- package/es/components/SSRProvider/SSRProvider.js +1 -1
- package/es/components/Skeleton/LineSkeleton.js +19 -10
- package/es/components/Skeleton/RectSkeleton.js +19 -10
- package/es/components/Skeleton/TextSkeleton.js +19 -10
- package/es/components/Slider/Double.js +19 -10
- package/es/components/Slider/Handle.js +29 -11
- package/es/components/Slider/Single.js +19 -10
- package/es/components/Slider/Slider.js +2 -2
- package/es/components/Slider/SliderBase.js +2 -2
- package/es/components/Slider/ThumbBase.js +19 -10
- package/es/components/Spinner/Spinner.js +19 -10
- package/es/components/Spinner/SpinnerSvg.js +19 -10
- package/es/components/Switch/Switch.js +76 -12
- package/es/components/Tabs/TabItem.js +75 -11
- package/es/components/Tabs/Tabs.js +75 -11
- package/es/components/Tabs/createTabsController.js +75 -11
- package/es/components/TextArea/TextArea.js +1 -1
- package/es/components/Toast/Toast.js +1 -1
- package/es/components/Toast/ToastContext.js +2 -2
- package/es/components/Toast/ToastController.js +3 -3
- package/es/components/Toast/ToastProvider.js +3 -3
- package/es/components/Toast/useToast.js +1 -1
- package/es/hocs/withAutoFocus.js +20 -11
- package/es/hocs/withSkeleton.js +1 -1
- package/es/hooks/useFocusTrap.js +4 -4
- package/es/hooks/useForkRef.js +1 -1
- package/es/hooks/useResizeObserver.js +1 -1
- package/es/mixins/addFocus.js +2 -2
- package/es/mixins/applyDisabled.js +1 -1
- package/es/mixins/applyEllipsis.js +1 -1
- package/es/mixins/applyMaxLines.js +1 -1
- package/es/mixins/applyNoSelect.js +1 -1
- package/es/mixins/applyOutline.js +1 -1
- package/es/mixins/applyRoundness.js +1 -1
- package/es/mixins/applyScrollSnap.js +1 -1
- package/es/mixins/applySkeletonGradient.js +1 -1
- package/es/mixins/applyView.js +1 -1
- package/es/mixins/blur.js +1 -1
- package/es/utils/animatedScrollTo.js +8 -8
- package/es/utils/extractTextFrom.js +1 -1
- package/es/utils/formatCurrency.js +1 -1
- package/es/utils/formatters.js +5 -5
- package/es/utils/roundness.js +1 -1
- package/es/utils/scopeTab.js +1 -1
- package/es/utils/setRef.js +1 -1
- package/es/utils/tabbable.js +6 -6
- package/es/utils/toCssSize.js +1 -1
- package/es/utils/transformStyles.js +3 -3
- package/hocs/withAutoFocus.js +20 -11
- package/hocs/withSkeleton.js +1 -1
- package/hooks/useFocusTrap.js +4 -4
- package/hooks/useForkRef.js +1 -1
- package/hooks/useResizeObserver.js +1 -1
- package/mixins/addFocus.js +2 -2
- package/mixins/applyDisabled.js +1 -1
- package/mixins/applyEllipsis.js +1 -1
- package/mixins/applyMaxLines.js +1 -1
- package/mixins/applyNoSelect.js +1 -1
- package/mixins/applyOutline.js +1 -1
- package/mixins/applyRoundness.js +1 -1
- package/mixins/applyScrollSnap.js +1 -1
- package/mixins/applySkeletonGradient.js +1 -1
- package/mixins/applyView.js +1 -1
- package/mixins/blur.js +1 -1
- package/package.json +3 -3
- package/utils/animatedScrollTo.js +8 -8
- package/utils/extractTextFrom.js +1 -1
- package/utils/formatCurrency.js +1 -1
- package/utils/formatters.js +5 -5
- package/utils/roundness.js +1 -1
- package/utils/scopeTab.js +1 -1
- package/utils/setRef.js +1 -1
- package/utils/tabbable.js +6 -6
- package/utils/toCssSize.js +1 -1
- package/utils/transformStyles.js +3 -3
|
@@ -87,12 +87,22 @@ function _object_spread(target) {
|
|
|
87
87
|
}
|
|
88
88
|
function _object_without_properties(source, excluded) {
|
|
89
89
|
if (source == null) return {};
|
|
90
|
-
var target =
|
|
91
|
-
|
|
90
|
+
var target = {}, sourceKeys, key, i;
|
|
91
|
+
if (typeof Reflect !== "undefined" && Reflect.ownKeys) {
|
|
92
|
+
sourceKeys = Reflect.ownKeys(source);
|
|
93
|
+
for(i = 0; i < sourceKeys.length; i++){
|
|
94
|
+
key = sourceKeys[i];
|
|
95
|
+
if (excluded.indexOf(key) >= 0) continue;
|
|
96
|
+
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
|
|
97
|
+
target[key] = source[key];
|
|
98
|
+
}
|
|
99
|
+
return target;
|
|
100
|
+
}
|
|
101
|
+
target = _object_without_properties_loose(source, excluded);
|
|
92
102
|
if (Object.getOwnPropertySymbols) {
|
|
93
|
-
|
|
94
|
-
for(i = 0; i <
|
|
95
|
-
key =
|
|
103
|
+
sourceKeys = Object.getOwnPropertySymbols(source);
|
|
104
|
+
for(i = 0; i < sourceKeys.length; i++){
|
|
105
|
+
key = sourceKeys[i];
|
|
96
106
|
if (excluded.indexOf(key) >= 0) continue;
|
|
97
107
|
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
|
|
98
108
|
target[key] = source[key];
|
|
@@ -102,12 +112,11 @@ function _object_without_properties(source, excluded) {
|
|
|
102
112
|
}
|
|
103
113
|
function _object_without_properties_loose(source, excluded) {
|
|
104
114
|
if (source == null) return {};
|
|
105
|
-
var target = {};
|
|
106
|
-
var sourceKeys = Object.keys(source);
|
|
107
|
-
var key, i;
|
|
115
|
+
var target = {}, sourceKeys = Object.getOwnPropertyNames(source), key, i;
|
|
108
116
|
for(i = 0; i < sourceKeys.length; i++){
|
|
109
117
|
key = sourceKeys[i];
|
|
110
118
|
if (excluded.indexOf(key) >= 0) continue;
|
|
119
|
+
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
|
|
111
120
|
target[key] = source[key];
|
|
112
121
|
}
|
|
113
122
|
return target;
|
|
@@ -169,8 +178,8 @@ var StyledDivImg = _styledcomponents.default.div.withConfig({
|
|
|
169
178
|
]);
|
|
170
179
|
/**
|
|
171
180
|
* Компонент для отображения картинок.
|
|
172
|
-
*/ var ImageBase = function(
|
|
173
|
-
var src =
|
|
181
|
+
*/ var ImageBase = function ImageBase(_0) {
|
|
182
|
+
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, [
|
|
174
183
|
"src",
|
|
175
184
|
"srcSet",
|
|
176
185
|
"sizes",
|
|
@@ -11,7 +11,7 @@ Object.defineProperty(exports, "applyInputStyles", {
|
|
|
11
11
|
var _styledcomponents = require("styled-components");
|
|
12
12
|
var _tokens = require("../../tokens");
|
|
13
13
|
var _Field = require("../Field");
|
|
14
|
-
var applyInputStyles = function(param) {
|
|
14
|
+
var applyInputStyles = function applyInputStyles(param) {
|
|
15
15
|
var status = param.status, _param_$size = param.$size, $size = _param_$size === void 0 ? 'm' : _param_$size;
|
|
16
16
|
return (0, _styledcomponents.css)([
|
|
17
17
|
"box-sizing:border-box;width:100%;border:0 none;caret-color:",
|
|
@@ -49,12 +49,22 @@ function _object_spread(target) {
|
|
|
49
49
|
}
|
|
50
50
|
function _object_without_properties(source, excluded) {
|
|
51
51
|
if (source == null) return {};
|
|
52
|
-
var target =
|
|
53
|
-
|
|
52
|
+
var target = {}, sourceKeys, key, i;
|
|
53
|
+
if (typeof Reflect !== "undefined" && Reflect.ownKeys) {
|
|
54
|
+
sourceKeys = Reflect.ownKeys(source);
|
|
55
|
+
for(i = 0; i < sourceKeys.length; i++){
|
|
56
|
+
key = sourceKeys[i];
|
|
57
|
+
if (excluded.indexOf(key) >= 0) continue;
|
|
58
|
+
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
|
|
59
|
+
target[key] = source[key];
|
|
60
|
+
}
|
|
61
|
+
return target;
|
|
62
|
+
}
|
|
63
|
+
target = _object_without_properties_loose(source, excluded);
|
|
54
64
|
if (Object.getOwnPropertySymbols) {
|
|
55
|
-
|
|
56
|
-
for(i = 0; i <
|
|
57
|
-
key =
|
|
65
|
+
sourceKeys = Object.getOwnPropertySymbols(source);
|
|
66
|
+
for(i = 0; i < sourceKeys.length; i++){
|
|
67
|
+
key = sourceKeys[i];
|
|
58
68
|
if (excluded.indexOf(key) >= 0) continue;
|
|
59
69
|
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
|
|
60
70
|
target[key] = source[key];
|
|
@@ -64,12 +74,11 @@ function _object_without_properties(source, excluded) {
|
|
|
64
74
|
}
|
|
65
75
|
function _object_without_properties_loose(source, excluded) {
|
|
66
76
|
if (source == null) return {};
|
|
67
|
-
var target = {};
|
|
68
|
-
var sourceKeys = Object.keys(source);
|
|
69
|
-
var key, i;
|
|
77
|
+
var target = {}, sourceKeys = Object.getOwnPropertyNames(source), key, i;
|
|
70
78
|
for(i = 0; i < sourceKeys.length; i++){
|
|
71
79
|
key = sourceKeys[i];
|
|
72
80
|
if (excluded.indexOf(key) >= 0) continue;
|
|
81
|
+
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
|
|
73
82
|
target[key] = source[key];
|
|
74
83
|
}
|
|
75
84
|
return target;
|
|
@@ -77,8 +86,8 @@ function _object_without_properties_loose(source, excluded) {
|
|
|
77
86
|
var NoScroll = (0, _styledcomponents.createGlobalStyle)([
|
|
78
87
|
"body{overflow-y:hidden;}"
|
|
79
88
|
]);
|
|
80
|
-
var ModalBase = function(
|
|
81
|
-
var id =
|
|
89
|
+
var ModalBase = function ModalBase(_0) {
|
|
90
|
+
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, [
|
|
82
91
|
"id",
|
|
83
92
|
"withAnimation",
|
|
84
93
|
"onClose",
|
|
@@ -18,20 +18,20 @@ _export(exports, {
|
|
|
18
18
|
});
|
|
19
19
|
/**
|
|
20
20
|
* Взаимодействие с модальными оконами.
|
|
21
|
-
*/ var getModals = function(items) {
|
|
21
|
+
*/ var getModals = function getModals(items) {
|
|
22
22
|
return items.filter(function(item) {
|
|
23
23
|
var _item_info;
|
|
24
24
|
return item === null || item === void 0 ? void 0 : (_item_info = item.info) === null || _item_info === void 0 ? void 0 : _item_info.isModal;
|
|
25
25
|
});
|
|
26
26
|
};
|
|
27
|
-
var getIdLastModal = function(items) {
|
|
27
|
+
var getIdLastModal = function getIdLastModal(items) {
|
|
28
28
|
var modals = getModals(items);
|
|
29
29
|
if (!modals.length) {
|
|
30
30
|
return;
|
|
31
31
|
}
|
|
32
32
|
return modals[modals.length - 1].id;
|
|
33
33
|
};
|
|
34
|
-
var getIdFirstModal = function(items) {
|
|
34
|
+
var getIdFirstModal = function getIdFirstModal(items) {
|
|
35
35
|
var modals = getModals(items);
|
|
36
36
|
if (!modals.length) {
|
|
37
37
|
return;
|
|
@@ -95,12 +95,22 @@ function _object_spread(target) {
|
|
|
95
95
|
}
|
|
96
96
|
function _object_without_properties(source, excluded) {
|
|
97
97
|
if (source == null) return {};
|
|
98
|
-
var target =
|
|
99
|
-
|
|
98
|
+
var target = {}, sourceKeys, key, i;
|
|
99
|
+
if (typeof Reflect !== "undefined" && Reflect.ownKeys) {
|
|
100
|
+
sourceKeys = Reflect.ownKeys(source);
|
|
101
|
+
for(i = 0; i < sourceKeys.length; i++){
|
|
102
|
+
key = sourceKeys[i];
|
|
103
|
+
if (excluded.indexOf(key) >= 0) continue;
|
|
104
|
+
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
|
|
105
|
+
target[key] = source[key];
|
|
106
|
+
}
|
|
107
|
+
return target;
|
|
108
|
+
}
|
|
109
|
+
target = _object_without_properties_loose(source, excluded);
|
|
100
110
|
if (Object.getOwnPropertySymbols) {
|
|
101
|
-
|
|
102
|
-
for(i = 0; i <
|
|
103
|
-
key =
|
|
111
|
+
sourceKeys = Object.getOwnPropertySymbols(source);
|
|
112
|
+
for(i = 0; i < sourceKeys.length; i++){
|
|
113
|
+
key = sourceKeys[i];
|
|
104
114
|
if (excluded.indexOf(key) >= 0) continue;
|
|
105
115
|
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
|
|
106
116
|
target[key] = source[key];
|
|
@@ -110,12 +120,11 @@ function _object_without_properties(source, excluded) {
|
|
|
110
120
|
}
|
|
111
121
|
function _object_without_properties_loose(source, excluded) {
|
|
112
122
|
if (source == null) return {};
|
|
113
|
-
var target = {};
|
|
114
|
-
var sourceKeys = Object.keys(source);
|
|
115
|
-
var key, i;
|
|
123
|
+
var target = {}, sourceKeys = Object.getOwnPropertyNames(source), key, i;
|
|
116
124
|
for(i = 0; i < sourceKeys.length; i++){
|
|
117
125
|
key = sourceKeys[i];
|
|
118
126
|
if (excluded.indexOf(key) >= 0) continue;
|
|
127
|
+
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
|
|
119
128
|
target[key] = source[key];
|
|
120
129
|
}
|
|
121
130
|
return target;
|
|
@@ -150,8 +159,8 @@ var Overlay = _styledcomponents.default.div.withConfig({
|
|
|
150
159
|
var clickable = param.clickable;
|
|
151
160
|
return clickable ? 'pointer' : 'default';
|
|
152
161
|
});
|
|
153
|
-
var ModalOverlay = function(
|
|
154
|
-
var id =
|
|
162
|
+
var ModalOverlay = function ModalOverlay(_0) {
|
|
163
|
+
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, [
|
|
155
164
|
"id",
|
|
156
165
|
"withBlur",
|
|
157
166
|
"onOverlayClick",
|
|
@@ -40,7 +40,7 @@ function _object_spread(target) {
|
|
|
40
40
|
return target;
|
|
41
41
|
}
|
|
42
42
|
var ESCAPE_KEYCODE = 27;
|
|
43
|
-
var useModal = function(param) {
|
|
43
|
+
var useModal = function useModal(param) {
|
|
44
44
|
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;
|
|
45
45
|
var popupController = (0, _PopupBase.usePopupBaseContext)();
|
|
46
46
|
// При ESC закрывает текущее окно, если это возможно
|
|
@@ -9,7 +9,7 @@ Object.defineProperty(exports, "usePaginationDots", {
|
|
|
9
9
|
}
|
|
10
10
|
});
|
|
11
11
|
var _react = require("react");
|
|
12
|
-
var usePaginationDots = function(param) {
|
|
12
|
+
var usePaginationDots = function usePaginationDots(param) {
|
|
13
13
|
var items = param.items, index = param.index, _param_visibleItems = param.visibleItems, visibleItems = _param_visibleItems === void 0 ? 7 : _param_visibleItems;
|
|
14
14
|
var activeId = items[index].id;
|
|
15
15
|
var prevIndex = (0, _react.useRef)(null);
|
|
@@ -20,6 +20,14 @@ var _react = /*#__PURE__*/ _interop_require_wildcard(require("react"));
|
|
|
20
20
|
var _styledcomponents = /*#__PURE__*/ _interop_require_default(require("styled-components"));
|
|
21
21
|
var _reactpopper = require("react-popper");
|
|
22
22
|
var _hooks = require("../../hooks");
|
|
23
|
+
function _array_like_to_array(arr, len) {
|
|
24
|
+
if (len == null || len > arr.length) len = arr.length;
|
|
25
|
+
for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
|
|
26
|
+
return arr2;
|
|
27
|
+
}
|
|
28
|
+
function _array_with_holes(arr) {
|
|
29
|
+
if (Array.isArray(arr)) return arr;
|
|
30
|
+
}
|
|
23
31
|
function _define_property(obj, key, value) {
|
|
24
32
|
if (key in obj) {
|
|
25
33
|
Object.defineProperty(obj, key, {
|
|
@@ -79,6 +87,36 @@ function _interop_require_wildcard(obj, nodeInterop) {
|
|
|
79
87
|
}
|
|
80
88
|
return newObj;
|
|
81
89
|
}
|
|
90
|
+
function _iterable_to_array(iter) {
|
|
91
|
+
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
|
|
92
|
+
}
|
|
93
|
+
function _iterable_to_array_limit(arr, i) {
|
|
94
|
+
var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
|
|
95
|
+
if (_i == null) return;
|
|
96
|
+
var _arr = [];
|
|
97
|
+
var _n = true;
|
|
98
|
+
var _d = false;
|
|
99
|
+
var _s, _e;
|
|
100
|
+
try {
|
|
101
|
+
for(_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true){
|
|
102
|
+
_arr.push(_s.value);
|
|
103
|
+
if (i && _arr.length === i) break;
|
|
104
|
+
}
|
|
105
|
+
} catch (err) {
|
|
106
|
+
_d = true;
|
|
107
|
+
_e = err;
|
|
108
|
+
} finally{
|
|
109
|
+
try {
|
|
110
|
+
if (!_n && _i["return"] != null) _i["return"]();
|
|
111
|
+
} finally{
|
|
112
|
+
if (_d) throw _e;
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
return _arr;
|
|
116
|
+
}
|
|
117
|
+
function _non_iterable_rest() {
|
|
118
|
+
throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
119
|
+
}
|
|
82
120
|
function _object_spread(target) {
|
|
83
121
|
for(var i = 1; i < arguments.length; i++){
|
|
84
122
|
var source = arguments[i] != null ? arguments[i] : {};
|
|
@@ -120,12 +158,22 @@ function _object_spread_props(target, source) {
|
|
|
120
158
|
}
|
|
121
159
|
function _object_without_properties(source, excluded) {
|
|
122
160
|
if (source == null) return {};
|
|
123
|
-
var target =
|
|
124
|
-
|
|
161
|
+
var target = {}, sourceKeys, key, i;
|
|
162
|
+
if (typeof Reflect !== "undefined" && Reflect.ownKeys) {
|
|
163
|
+
sourceKeys = Reflect.ownKeys(source);
|
|
164
|
+
for(i = 0; i < sourceKeys.length; i++){
|
|
165
|
+
key = sourceKeys[i];
|
|
166
|
+
if (excluded.indexOf(key) >= 0) continue;
|
|
167
|
+
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
|
|
168
|
+
target[key] = source[key];
|
|
169
|
+
}
|
|
170
|
+
return target;
|
|
171
|
+
}
|
|
172
|
+
target = _object_without_properties_loose(source, excluded);
|
|
125
173
|
if (Object.getOwnPropertySymbols) {
|
|
126
|
-
|
|
127
|
-
for(i = 0; i <
|
|
128
|
-
key =
|
|
174
|
+
sourceKeys = Object.getOwnPropertySymbols(source);
|
|
175
|
+
for(i = 0; i < sourceKeys.length; i++){
|
|
176
|
+
key = sourceKeys[i];
|
|
129
177
|
if (excluded.indexOf(key) >= 0) continue;
|
|
130
178
|
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
|
|
131
179
|
target[key] = source[key];
|
|
@@ -135,16 +183,29 @@ function _object_without_properties(source, excluded) {
|
|
|
135
183
|
}
|
|
136
184
|
function _object_without_properties_loose(source, excluded) {
|
|
137
185
|
if (source == null) return {};
|
|
138
|
-
var target = {};
|
|
139
|
-
var sourceKeys = Object.keys(source);
|
|
140
|
-
var key, i;
|
|
186
|
+
var target = {}, sourceKeys = Object.getOwnPropertyNames(source), key, i;
|
|
141
187
|
for(i = 0; i < sourceKeys.length; i++){
|
|
142
188
|
key = sourceKeys[i];
|
|
143
189
|
if (excluded.indexOf(key) >= 0) continue;
|
|
190
|
+
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
|
|
144
191
|
target[key] = source[key];
|
|
145
192
|
}
|
|
146
193
|
return target;
|
|
147
194
|
}
|
|
195
|
+
function _sliced_to_array(arr, i) {
|
|
196
|
+
return _array_with_holes(arr) || _iterable_to_array_limit(arr, i) || _unsupported_iterable_to_array(arr, i) || _non_iterable_rest();
|
|
197
|
+
}
|
|
198
|
+
function _to_array(arr) {
|
|
199
|
+
return _array_with_holes(arr) || _iterable_to_array(arr) || _unsupported_iterable_to_array(arr) || _non_iterable_rest();
|
|
200
|
+
}
|
|
201
|
+
function _unsupported_iterable_to_array(o, minLen) {
|
|
202
|
+
if (!o) return;
|
|
203
|
+
if (typeof o === "string") return _array_like_to_array(o, minLen);
|
|
204
|
+
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
205
|
+
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
206
|
+
if (n === "Map" || n === "Set") return Array.from(n);
|
|
207
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
|
|
208
|
+
}
|
|
148
209
|
var StyledRoot = _styledcomponents.default.div.withConfig({
|
|
149
210
|
displayName: "Popup__StyledRoot",
|
|
150
211
|
componentId: "sc-7a6b6e85-0"
|
|
@@ -157,16 +218,19 @@ var StyledPopup = _styledcomponents.default.div.withConfig({
|
|
|
157
218
|
})([
|
|
158
219
|
"position:absolute;z-index:1;padding:var(--plasma-popup-padding);margin:var(--plasma-popup-margin);width:var(--plasma-popup-width);"
|
|
159
220
|
]);
|
|
160
|
-
var getPlacement = function(placement) {
|
|
221
|
+
var getPlacement = function getPlacement(placement) {
|
|
161
222
|
return "".concat(placement, "-start");
|
|
162
223
|
};
|
|
163
|
-
var getAutoPlacements = function(placements) {
|
|
224
|
+
var getAutoPlacements = function getAutoPlacements(placements) {
|
|
164
225
|
return (placements || []).map(function(placement) {
|
|
165
226
|
return getPlacement(placement);
|
|
166
227
|
});
|
|
167
228
|
};
|
|
168
|
-
var Popup = /*#__PURE__*/ (0, _react.memo)(/*#__PURE__*/ _react.default.forwardRef(function(
|
|
169
|
-
var
|
|
229
|
+
var Popup = /*#__PURE__*/ (0, _react.memo)(/*#__PURE__*/ _react.default.forwardRef(function(_0, _1) {
|
|
230
|
+
var _ref = [
|
|
231
|
+
_0,
|
|
232
|
+
_1
|
|
233
|
+
], _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, [
|
|
170
234
|
"disclosure",
|
|
171
235
|
"children",
|
|
172
236
|
"isOpen",
|
|
@@ -174,7 +238,7 @@ var Popup = /*#__PURE__*/ (0, _react.memo)(/*#__PURE__*/ _react.default.forwardR
|
|
|
174
238
|
"trigger",
|
|
175
239
|
"placement",
|
|
176
240
|
"onToggle"
|
|
177
|
-
]);
|
|
241
|
+
]), _rest1 = _sliced_to_array(_rest, 1), outerRootRef = _rest1[0];
|
|
178
242
|
var innerIsOpen = Boolean(isOpen || opened);
|
|
179
243
|
var rootRef = (0, _react.useRef)(null);
|
|
180
244
|
var popupRef = (0, _react.useRef)(null);
|
|
@@ -91,6 +91,9 @@ function _interop_require_wildcard(obj, nodeInterop) {
|
|
|
91
91
|
}
|
|
92
92
|
return newObj;
|
|
93
93
|
}
|
|
94
|
+
function _iterable_to_array(iter) {
|
|
95
|
+
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
|
|
96
|
+
}
|
|
94
97
|
function _iterable_to_array_limit(arr, i) {
|
|
95
98
|
var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
|
|
96
99
|
if (_i == null) return;
|
|
@@ -135,12 +138,22 @@ function _object_spread(target) {
|
|
|
135
138
|
}
|
|
136
139
|
function _object_without_properties(source, excluded) {
|
|
137
140
|
if (source == null) return {};
|
|
138
|
-
var target =
|
|
139
|
-
|
|
141
|
+
var target = {}, sourceKeys, key, i;
|
|
142
|
+
if (typeof Reflect !== "undefined" && Reflect.ownKeys) {
|
|
143
|
+
sourceKeys = Reflect.ownKeys(source);
|
|
144
|
+
for(i = 0; i < sourceKeys.length; i++){
|
|
145
|
+
key = sourceKeys[i];
|
|
146
|
+
if (excluded.indexOf(key) >= 0) continue;
|
|
147
|
+
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
|
|
148
|
+
target[key] = source[key];
|
|
149
|
+
}
|
|
150
|
+
return target;
|
|
151
|
+
}
|
|
152
|
+
target = _object_without_properties_loose(source, excluded);
|
|
140
153
|
if (Object.getOwnPropertySymbols) {
|
|
141
|
-
|
|
142
|
-
for(i = 0; i <
|
|
143
|
-
key =
|
|
154
|
+
sourceKeys = Object.getOwnPropertySymbols(source);
|
|
155
|
+
for(i = 0; i < sourceKeys.length; i++){
|
|
156
|
+
key = sourceKeys[i];
|
|
144
157
|
if (excluded.indexOf(key) >= 0) continue;
|
|
145
158
|
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
|
|
146
159
|
target[key] = source[key];
|
|
@@ -150,12 +163,11 @@ function _object_without_properties(source, excluded) {
|
|
|
150
163
|
}
|
|
151
164
|
function _object_without_properties_loose(source, excluded) {
|
|
152
165
|
if (source == null) return {};
|
|
153
|
-
var target = {};
|
|
154
|
-
var sourceKeys = Object.keys(source);
|
|
155
|
-
var key, i;
|
|
166
|
+
var target = {}, sourceKeys = Object.getOwnPropertyNames(source), key, i;
|
|
156
167
|
for(i = 0; i < sourceKeys.length; i++){
|
|
157
168
|
key = sourceKeys[i];
|
|
158
169
|
if (excluded.indexOf(key) >= 0) continue;
|
|
170
|
+
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
|
|
159
171
|
target[key] = source[key];
|
|
160
172
|
}
|
|
161
173
|
return target;
|
|
@@ -163,6 +175,9 @@ function _object_without_properties_loose(source, excluded) {
|
|
|
163
175
|
function _sliced_to_array(arr, i) {
|
|
164
176
|
return _array_with_holes(arr) || _iterable_to_array_limit(arr, i) || _unsupported_iterable_to_array(arr, i) || _non_iterable_rest();
|
|
165
177
|
}
|
|
178
|
+
function _to_array(arr) {
|
|
179
|
+
return _array_with_holes(arr) || _iterable_to_array(arr) || _unsupported_iterable_to_array(arr) || _non_iterable_rest();
|
|
180
|
+
}
|
|
166
181
|
function _unsupported_iterable_to_array(o, minLen) {
|
|
167
182
|
if (!o) return;
|
|
168
183
|
if (typeof o === "string") return _array_like_to_array(o, minLen);
|
|
@@ -177,7 +192,7 @@ var StyledPortal = _styledcomponents.default.div.withConfig({
|
|
|
177
192
|
})([
|
|
178
193
|
""
|
|
179
194
|
]);
|
|
180
|
-
var getClassName = function(animationInfo, className) {
|
|
195
|
+
var getClassName = function getClassName(animationInfo, className) {
|
|
181
196
|
var endAnimation = (animationInfo === null || animationInfo === void 0 ? void 0 : animationInfo.endAnimation) ? _utils.endAnimationClass : '';
|
|
182
197
|
var endTransition = (animationInfo === null || animationInfo === void 0 ? void 0 : animationInfo.endTransition) ? _utils.endTransitionClass : '';
|
|
183
198
|
return [
|
|
@@ -186,11 +201,14 @@ var getClassName = function(animationInfo, className) {
|
|
|
186
201
|
endTransition
|
|
187
202
|
].filter(Boolean).join(' ');
|
|
188
203
|
};
|
|
189
|
-
var PopupBase = /*#__PURE__*/ (0, _react.forwardRef)(function(
|
|
190
|
-
var
|
|
204
|
+
var PopupBase = /*#__PURE__*/ (0, _react.forwardRef)(function(_0, _1) {
|
|
205
|
+
var _ref = [
|
|
206
|
+
_0,
|
|
207
|
+
_1
|
|
208
|
+
], _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 ? [
|
|
191
209
|
0,
|
|
192
210
|
0
|
|
193
|
-
] :
|
|
211
|
+
] : _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, [
|
|
194
212
|
"id",
|
|
195
213
|
"isOpen",
|
|
196
214
|
"opened",
|
|
@@ -204,7 +222,7 @@ var PopupBase = /*#__PURE__*/ (0, _react.forwardRef)(function(_param, ref) {
|
|
|
204
222
|
"popupInfo",
|
|
205
223
|
"withAnimation",
|
|
206
224
|
"className"
|
|
207
|
-
]);
|
|
225
|
+
]), _rest1 = _sliced_to_array(_rest, 1), ref = _rest1[0];
|
|
208
226
|
var innerIsOpen = Boolean(isOpen || opened);
|
|
209
227
|
var uniqId = (0, _hooks.useUniqId)();
|
|
210
228
|
var innerId = id || uniqId;
|
|
@@ -130,18 +130,18 @@ var PopupBaseContext = /*#__PURE__*/ (0, _react.createContext)({
|
|
|
130
130
|
throw new Error('Function not implemented. Add PopupBaseProvider');
|
|
131
131
|
}
|
|
132
132
|
});
|
|
133
|
-
var usePopupBaseContext = function() {
|
|
133
|
+
var usePopupBaseContext = function usePopupBaseContext() {
|
|
134
134
|
return (0, _react.useContext)(PopupBaseContext);
|
|
135
135
|
};
|
|
136
|
-
var PopupBaseProvider = function(param) {
|
|
136
|
+
var PopupBaseProvider = function PopupBaseProvider(param) {
|
|
137
137
|
var children = param.children;
|
|
138
138
|
var _useState = _sliced_to_array((0, _react.useState)([]), 2), items = _useState[0], setItems = _useState[1];
|
|
139
|
-
var register = function(info) {
|
|
139
|
+
var register = function register(info) {
|
|
140
140
|
setItems(_to_consumable_array(items).concat([
|
|
141
141
|
info
|
|
142
142
|
]));
|
|
143
143
|
};
|
|
144
|
-
var unregister = function(id) {
|
|
144
|
+
var unregister = function unregister(id) {
|
|
145
145
|
var index = items.findIndex(function(item) {
|
|
146
146
|
return id === item.id;
|
|
147
147
|
});
|
|
@@ -21,6 +21,14 @@ var _styledcomponents = /*#__PURE__*/ _interop_require_wildcard(require("styled-
|
|
|
21
21
|
var _hooks = require("../../hooks");
|
|
22
22
|
var _PopupBaseContext = require("./PopupBaseContext");
|
|
23
23
|
var _utils = require("./utils");
|
|
24
|
+
function _array_like_to_array(arr, len) {
|
|
25
|
+
if (len == null || len > arr.length) len = arr.length;
|
|
26
|
+
for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
|
|
27
|
+
return arr2;
|
|
28
|
+
}
|
|
29
|
+
function _array_with_holes(arr) {
|
|
30
|
+
if (Array.isArray(arr)) return arr;
|
|
31
|
+
}
|
|
24
32
|
function _define_property(obj, key, value) {
|
|
25
33
|
if (key in obj) {
|
|
26
34
|
Object.defineProperty(obj, key, {
|
|
@@ -75,6 +83,36 @@ function _interop_require_wildcard(obj, nodeInterop) {
|
|
|
75
83
|
}
|
|
76
84
|
return newObj;
|
|
77
85
|
}
|
|
86
|
+
function _iterable_to_array(iter) {
|
|
87
|
+
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
|
|
88
|
+
}
|
|
89
|
+
function _iterable_to_array_limit(arr, i) {
|
|
90
|
+
var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
|
|
91
|
+
if (_i == null) return;
|
|
92
|
+
var _arr = [];
|
|
93
|
+
var _n = true;
|
|
94
|
+
var _d = false;
|
|
95
|
+
var _s, _e;
|
|
96
|
+
try {
|
|
97
|
+
for(_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true){
|
|
98
|
+
_arr.push(_s.value);
|
|
99
|
+
if (i && _arr.length === i) break;
|
|
100
|
+
}
|
|
101
|
+
} catch (err) {
|
|
102
|
+
_d = true;
|
|
103
|
+
_e = err;
|
|
104
|
+
} finally{
|
|
105
|
+
try {
|
|
106
|
+
if (!_n && _i["return"] != null) _i["return"]();
|
|
107
|
+
} finally{
|
|
108
|
+
if (_d) throw _e;
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
return _arr;
|
|
112
|
+
}
|
|
113
|
+
function _non_iterable_rest() {
|
|
114
|
+
throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
115
|
+
}
|
|
78
116
|
function _object_spread(target) {
|
|
79
117
|
for(var i = 1; i < arguments.length; i++){
|
|
80
118
|
var source = arguments[i] != null ? arguments[i] : {};
|
|
@@ -92,12 +130,22 @@ function _object_spread(target) {
|
|
|
92
130
|
}
|
|
93
131
|
function _object_without_properties(source, excluded) {
|
|
94
132
|
if (source == null) return {};
|
|
95
|
-
var target =
|
|
96
|
-
|
|
133
|
+
var target = {}, sourceKeys, key, i;
|
|
134
|
+
if (typeof Reflect !== "undefined" && Reflect.ownKeys) {
|
|
135
|
+
sourceKeys = Reflect.ownKeys(source);
|
|
136
|
+
for(i = 0; i < sourceKeys.length; i++){
|
|
137
|
+
key = sourceKeys[i];
|
|
138
|
+
if (excluded.indexOf(key) >= 0) continue;
|
|
139
|
+
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
|
|
140
|
+
target[key] = source[key];
|
|
141
|
+
}
|
|
142
|
+
return target;
|
|
143
|
+
}
|
|
144
|
+
target = _object_without_properties_loose(source, excluded);
|
|
97
145
|
if (Object.getOwnPropertySymbols) {
|
|
98
|
-
|
|
99
|
-
for(i = 0; i <
|
|
100
|
-
key =
|
|
146
|
+
sourceKeys = Object.getOwnPropertySymbols(source);
|
|
147
|
+
for(i = 0; i < sourceKeys.length; i++){
|
|
148
|
+
key = sourceKeys[i];
|
|
101
149
|
if (excluded.indexOf(key) >= 0) continue;
|
|
102
150
|
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
|
|
103
151
|
target[key] = source[key];
|
|
@@ -107,16 +155,29 @@ function _object_without_properties(source, excluded) {
|
|
|
107
155
|
}
|
|
108
156
|
function _object_without_properties_loose(source, excluded) {
|
|
109
157
|
if (source == null) return {};
|
|
110
|
-
var target = {};
|
|
111
|
-
var sourceKeys = Object.keys(source);
|
|
112
|
-
var key, i;
|
|
158
|
+
var target = {}, sourceKeys = Object.getOwnPropertyNames(source), key, i;
|
|
113
159
|
for(i = 0; i < sourceKeys.length; i++){
|
|
114
160
|
key = sourceKeys[i];
|
|
115
161
|
if (excluded.indexOf(key) >= 0) continue;
|
|
162
|
+
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
|
|
116
163
|
target[key] = source[key];
|
|
117
164
|
}
|
|
118
165
|
return target;
|
|
119
166
|
}
|
|
167
|
+
function _sliced_to_array(arr, i) {
|
|
168
|
+
return _array_with_holes(arr) || _iterable_to_array_limit(arr, i) || _unsupported_iterable_to_array(arr, i) || _non_iterable_rest();
|
|
169
|
+
}
|
|
170
|
+
function _to_array(arr) {
|
|
171
|
+
return _array_with_holes(arr) || _iterable_to_array(arr) || _unsupported_iterable_to_array(arr) || _non_iterable_rest();
|
|
172
|
+
}
|
|
173
|
+
function _unsupported_iterable_to_array(o, minLen) {
|
|
174
|
+
if (!o) return;
|
|
175
|
+
if (typeof o === "string") return _array_like_to_array(o, minLen);
|
|
176
|
+
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
177
|
+
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
178
|
+
if (n === "Map" || n === "Set") return Array.from(n);
|
|
179
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
|
|
180
|
+
}
|
|
120
181
|
var DEFAULT_Z_INDEX = 9000;
|
|
121
182
|
var PopupBaseView = _styledcomponents.default.div.withConfig({
|
|
122
183
|
displayName: "PopupBaseRoot__PopupBaseView",
|
|
@@ -148,8 +209,11 @@ var PopupRootContainer = _styledcomponents.default.div.withConfig({
|
|
|
148
209
|
var placement = param.placement, offset = param.offset;
|
|
149
210
|
return (0, _utils.handlePosition)(placement, offset);
|
|
150
211
|
});
|
|
151
|
-
var PopupBaseRoot = /*#__PURE__*/ _react.default.forwardRef(function(
|
|
152
|
-
var
|
|
212
|
+
var PopupBaseRoot = /*#__PURE__*/ _react.default.forwardRef(function(_0, _1) {
|
|
213
|
+
var _ref = [
|
|
214
|
+
_0,
|
|
215
|
+
_1
|
|
216
|
+
], _ref1 = _to_array(_ref), _ref2 = _ref1[0], _rest = _ref1.slice(1), id = _ref2.id, placement = _ref2.placement, offset = _ref2.offset, frame = _ref2.frame, setVisible = _ref2.setVisible, children = _ref2.children, role = _ref2.role, zIndex = _ref2.zIndex, animationInfo = _ref2.animationInfo, rest = _object_without_properties(_ref2, [
|
|
153
217
|
"id",
|
|
154
218
|
"placement",
|
|
155
219
|
"offset",
|
|
@@ -159,7 +223,7 @@ var PopupBaseRoot = /*#__PURE__*/ _react.default.forwardRef(function(_param, ref
|
|
|
159
223
|
"role",
|
|
160
224
|
"zIndex",
|
|
161
225
|
"animationInfo"
|
|
162
|
-
]);
|
|
226
|
+
]), _rest1 = _sliced_to_array(_rest, 1), ref = _rest1[0];
|
|
163
227
|
var contentRef = (0, _react.useRef)(null);
|
|
164
228
|
var innerRef = (0, _hooks.useForkRef)(contentRef, ref);
|
|
165
229
|
var popupController = (0, _PopupBaseContext.usePopupBaseContext)();
|
|
@@ -92,7 +92,7 @@ function _unsupported_iterable_to_array(o, minLen) {
|
|
|
92
92
|
if (n === "Map" || n === "Set") return Array.from(n);
|
|
93
93
|
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
|
|
94
94
|
}
|
|
95
|
-
var usePopupAnimation = function() {
|
|
95
|
+
var usePopupAnimation = function usePopupAnimation() {
|
|
96
96
|
var _useState = _sliced_to_array((0, _react.useState)(false), 2), endAnimation = _useState[0], setEndAnimation = _useState[1];
|
|
97
97
|
var _useState1 = _sliced_to_array((0, _react.useState)(false), 2), endTransition = _useState1[0], setEndTransition = _useState1[1];
|
|
98
98
|
return {
|
|
@@ -102,7 +102,7 @@ var usePopupAnimation = function() {
|
|
|
102
102
|
setEndAnimation: setEndAnimation
|
|
103
103
|
};
|
|
104
104
|
};
|
|
105
|
-
var usePopup = function(param) {
|
|
105
|
+
var usePopup = function usePopup(param) {
|
|
106
106
|
var isOpen = param.isOpen, id = param.id, popupInfo = param.popupInfo, withAnimation = param.withAnimation;
|
|
107
107
|
var _useState = _sliced_to_array((0, _react.useState)(false), 2), isVisible = _useState[0], setVisible = _useState[1];
|
|
108
108
|
var popupController = (0, _PopupBaseContext.usePopupBaseContext)();
|
|
@@ -72,7 +72,7 @@ function _unsupported_iterable_to_array(o, minLen) {
|
|
|
72
72
|
var popupBaseRootClass = 'popup-base-root';
|
|
73
73
|
var endAnimationClass = 'popup-base-end-animation';
|
|
74
74
|
var endTransitionClass = 'popup-base-end-transition';
|
|
75
|
-
var handlePosition = function(placement, offset) {
|
|
75
|
+
var handlePosition = function handlePosition(placement, offset) {
|
|
76
76
|
var x = '0rem';
|
|
77
77
|
var y = '0rem';
|
|
78
78
|
if (offset) {
|