@prom-ui/core 0.0.150 → 0.1.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/Avatar/cjs/index.development.js +4 -10
- package/Avatar/cjs/index.development.v2.js +4 -10
- package/Avatar/cjs/index.production.js +1 -1
- package/Avatar/cjs/index.production.v2.js +1 -1
- package/Avatar/index.d.ts +1 -1
- package/Avatar/package.json +1 -1
- package/Backdrop/cjs/index.development.js +4 -10
- package/Backdrop/cjs/index.development.v2.js +4 -10
- package/Backdrop/cjs/index.production.js +1 -1
- package/Backdrop/cjs/index.production.v2.js +1 -1
- package/Backdrop/index.d.ts +1 -1
- package/Backdrop/package.json +1 -1
- package/Body/cjs/index.development.js +0 -2
- package/Body/cjs/index.development.v2.js +0 -2
- package/Body/cjs/index.production.js +1 -1
- package/Body/cjs/index.production.v2.js +1 -1
- package/Body/package.json +1 -1
- package/BodyProvider/cjs/index.development.js +3 -6
- package/BodyProvider/cjs/index.development.v2.js +3 -6
- package/BodyProvider/cjs/index.production.js +1 -1
- package/BodyProvider/cjs/index.production.v2.js +1 -1
- package/BodyProvider/index.d.ts +1 -1
- package/BodyProvider/package.json +1 -1
- package/Box/cjs/index.development.js +0 -2
- package/Box/cjs/index.development.v2.js +0 -2
- package/Box/cjs/index.production.js +1 -1
- package/Box/cjs/index.production.v2.js +1 -1
- package/Box/cjs/style.development.css +1 -1
- package/Box/cjs/style.development.v2.css +1 -1
- package/Box/cjs/style.production.css +1 -1
- package/Box/cjs/style.production.v2.css +1 -1
- package/Box/package.json +1 -1
- package/Button/cjs/index.development.js +4 -7
- package/Button/cjs/index.development.v2.js +4 -7
- package/Button/cjs/index.production.js +1 -1
- package/Button/cjs/index.production.v2.js +1 -1
- package/Button/cjs/style.development.css +1 -1
- package/Button/cjs/style.development.v2.css +1 -1
- package/Button/cjs/style.production.css +1 -1
- package/Button/cjs/style.production.v2.css +1 -1
- package/Button/index.d.ts +1 -1
- package/Button/package.json +1 -1
- package/ButtonPageUp/cjs/index.development.js +3 -6
- package/ButtonPageUp/cjs/index.development.v2.js +3 -6
- package/ButtonPageUp/cjs/index.production.js +1 -1
- package/ButtonPageUp/cjs/index.production.v2.js +1 -1
- package/ButtonPageUp/index.d.ts +1 -1
- package/ButtonPageUp/package.json +1 -1
- package/Checkbox/cjs/index.development.js +5 -11
- package/Checkbox/cjs/index.development.v2.js +5 -11
- package/Checkbox/cjs/index.production.js +1 -1
- package/Checkbox/cjs/index.production.v2.js +1 -1
- package/Checkbox/index.d.ts +1 -1
- package/Checkbox/package.json +1 -1
- package/Flex/cjs/index.development.js +0 -2
- package/Flex/cjs/index.development.v2.js +0 -2
- package/Flex/cjs/index.production.js +1 -1
- package/Flex/cjs/index.production.v2.js +1 -1
- package/Flex/package.json +1 -1
- package/Grid/cjs/index.development.js +0 -2
- package/Grid/cjs/index.development.v2.js +0 -2
- package/Grid/cjs/index.production.js +1 -1
- package/Grid/cjs/index.production.v2.js +1 -1
- package/Grid/package.json +1 -1
- package/Icon/cjs/index.development.js +3 -6
- package/Icon/cjs/index.development.v2.js +3 -6
- package/Icon/cjs/index.production.js +1 -1
- package/Icon/cjs/index.production.v2.js +1 -1
- package/Icon/index.d.ts +1 -1
- package/Icon/package.json +1 -1
- package/Image/cjs/index.development.js +0 -2
- package/Image/cjs/index.development.v2.js +0 -2
- package/Image/cjs/index.production.js +1 -1
- package/Image/cjs/index.production.v2.js +1 -1
- package/Image/package.json +1 -1
- package/ImageEmoji/cjs/index.development.js +3 -6
- package/ImageEmoji/cjs/index.development.v2.js +3 -6
- package/ImageEmoji/cjs/index.production.js +1 -1
- package/ImageEmoji/cjs/index.production.v2.js +1 -1
- package/ImageEmoji/index.d.ts +1 -1
- package/ImageEmoji/package.json +1 -1
- package/Input/cjs/index.development.js +3 -6
- package/Input/cjs/index.development.v2.js +3 -6
- package/Input/cjs/index.production.js +1 -1
- package/Input/cjs/index.production.v2.js +1 -1
- package/Input/index.d.ts +1 -1
- package/Input/package.json +1 -1
- package/InputField/addons/AfterClearValue.d.ts +1 -1
- package/InputField/addons/AfterTogglePassword.d.ts +1 -1
- package/InputField/addons/ErrorText.d.ts +1 -1
- package/InputField/cjs/index.development.js +3 -6
- package/InputField/cjs/index.development.v2.js +3 -6
- package/InputField/cjs/index.production.js +1 -1
- package/InputField/cjs/index.production.v2.js +1 -1
- package/InputField/index.d.ts +1 -1
- package/InputField/package.json +1 -1
- package/KeyPress/cjs/index.development.js +3 -6
- package/KeyPress/cjs/index.development.v2.js +3 -6
- package/KeyPress/cjs/index.production.js +1 -1
- package/KeyPress/cjs/index.production.v2.js +1 -1
- package/KeyPress/index.d.ts +1 -1
- package/KeyPress/package.json +1 -1
- package/Line/cjs/index.development.js +0 -2
- package/Line/cjs/index.development.v2.js +0 -2
- package/Line/cjs/index.production.js +1 -1
- package/Line/cjs/index.production.v2.js +1 -1
- package/Line/package.json +1 -1
- package/Link/cjs/index.development.js +0 -2
- package/Link/cjs/index.development.v2.js +0 -2
- package/Link/cjs/index.production.js +1 -1
- package/Link/cjs/index.production.v2.js +1 -1
- package/Link/cjs/style.development.css +1 -1
- package/Link/cjs/style.development.v2.css +1 -1
- package/Link/cjs/style.production.css +1 -1
- package/Link/cjs/style.production.v2.css +1 -1
- package/Link/package.json +1 -1
- package/List/cjs/index.development.js +0 -2
- package/List/cjs/index.development.v2.js +0 -2
- package/List/cjs/index.production.js +1 -1
- package/List/cjs/index.production.v2.js +1 -1
- package/List/package.json +1 -1
- package/Media/breakpoints.d.ts +1 -1
- package/Media/cjs/index.development.js +3 -10
- package/Media/cjs/index.development.v2.js +3 -10
- package/Media/cjs/index.production.js +1 -1
- package/Media/cjs/index.production.v2.js +1 -1
- package/Media/context.d.ts +1 -1
- package/Media/index.d.ts +1 -1
- package/Media/package.json +1 -1
- package/Media/useMedia.d.ts +1 -1
- package/OutsideClick/cjs/index.development.js +3 -6
- package/OutsideClick/cjs/index.development.v2.js +3 -6
- package/OutsideClick/cjs/index.production.js +1 -1
- package/OutsideClick/cjs/index.production.v2.js +1 -1
- package/OutsideClick/index.d.ts +1 -1
- package/OutsideClick/package.json +1 -1
- package/Overlay/cjs/index.development.js +18 -27
- package/Overlay/cjs/index.development.v2.js +18 -27
- package/Overlay/cjs/index.production.js +1 -1
- package/Overlay/cjs/index.production.v2.js +1 -1
- package/Overlay/components/OverlayHeader.d.ts +1 -1
- package/Overlay/components/SwipeClose.d.ts +1 -1
- package/Overlay/components/TouchScrollable.d.ts +1 -1
- package/Overlay/index.d.ts +1 -1
- package/Overlay/package.json +1 -1
- package/Overlay/utils.d.ts +3 -3
- package/Picture/cjs/index.development.js +0 -2
- package/Picture/cjs/index.development.v2.js +0 -2
- package/Picture/cjs/index.production.js +1 -1
- package/Picture/cjs/index.production.v2.js +1 -1
- package/Picture/package.json +1 -1
- package/PortableOverlay/cjs/index.development.js +5 -11
- package/PortableOverlay/cjs/index.development.v2.js +5 -11
- package/PortableOverlay/cjs/index.production.js +1 -1
- package/PortableOverlay/cjs/index.production.v2.js +1 -1
- package/PortableOverlay/cjs/style.development.css +1 -1
- package/PortableOverlay/cjs/style.development.v2.css +1 -1
- package/PortableOverlay/cjs/style.production.css +1 -1
- package/PortableOverlay/cjs/style.production.v2.css +1 -1
- package/PortableOverlay/index.d.ts +1 -1
- package/PortableOverlay/package.json +1 -1
- package/Portal/cjs/index.development.js +3 -6
- package/Portal/cjs/index.development.v2.js +3 -6
- package/Portal/cjs/index.production.js +1 -1
- package/Portal/cjs/index.production.v2.js +1 -1
- package/Portal/index.d.ts +1 -1
- package/Portal/package.json +1 -1
- package/QRCode/cjs/index.development.js +3 -6
- package/QRCode/cjs/index.development.v2.js +3 -6
- package/QRCode/cjs/index.production.js +1 -1
- package/QRCode/cjs/index.production.v2.js +1 -1
- package/QRCode/index.d.ts +1 -1
- package/QRCode/package.json +1 -1
- package/Rating/cjs/index.development.js +3 -6
- package/Rating/cjs/index.development.v2.js +3 -6
- package/Rating/cjs/index.production.js +1 -1
- package/Rating/cjs/index.production.v2.js +1 -1
- package/Rating/index.d.ts +1 -1
- package/Rating/package.json +1 -1
- package/SafeQuery/cjs/index.development.js +14 -20
- package/SafeQuery/cjs/index.development.v2.js +14 -20
- package/SafeQuery/cjs/index.production.js +1 -1
- package/SafeQuery/cjs/index.production.v2.js +1 -1
- package/SafeQuery/components/Error.d.ts +1 -1
- package/SafeQuery/index.d.ts +1 -1
- package/SafeQuery/package.json +1 -1
- package/Scroll/cjs/index.development.js +3 -6
- package/Scroll/cjs/index.development.v2.js +3 -6
- package/Scroll/cjs/index.production.js +1 -1
- package/Scroll/cjs/index.production.v2.js +1 -1
- package/Scroll/cjs/style.development.css +1 -1
- package/Scroll/cjs/style.development.v2.css +1 -1
- package/Scroll/cjs/style.production.css +1 -1
- package/Scroll/cjs/style.production.v2.css +1 -1
- package/Scroll/index.d.ts +2 -2
- package/Scroll/package.json +1 -1
- package/ScrollControls/ScrollControlsButton.d.ts +1 -1
- package/ScrollControls/cjs/index.development.js +11 -18
- package/ScrollControls/cjs/index.development.v2.js +11 -18
- package/ScrollControls/cjs/index.production.js +1 -1
- package/ScrollControls/cjs/index.production.v2.js +1 -1
- package/ScrollControls/index.d.ts +1 -1
- package/ScrollControls/package.json +1 -1
- package/SideOverlay/blocks.d.ts +1 -1
- package/SideOverlay/cjs/index.development.js +5 -12
- package/SideOverlay/cjs/index.development.v2.js +5 -12
- package/SideOverlay/cjs/index.production.js +1 -1
- package/SideOverlay/cjs/index.production.v2.js +1 -1
- package/SideOverlay/index.d.ts +1 -1
- package/SideOverlay/package.json +1 -1
- package/SideOverlay/utils.d.ts +3 -3
- package/SimpleSlider/cjs/index.development.js +6 -13
- package/SimpleSlider/cjs/index.development.v2.js +6 -13
- package/SimpleSlider/cjs/index.production.js +1 -1
- package/SimpleSlider/cjs/index.production.v2.js +1 -1
- package/SimpleSlider/index.d.ts +1 -1
- package/SimpleSlider/package.json +1 -1
- package/SimpleSlider/useAutoPlay.d.ts +1 -1
- package/SimpleSlider/utils.d.ts +2 -2
- package/Skeleton/cjs/index.development.js +3 -6
- package/Skeleton/cjs/index.development.v2.js +3 -6
- package/Skeleton/cjs/index.production.js +1 -1
- package/Skeleton/cjs/index.production.v2.js +1 -1
- package/Skeleton/cjs/style.development.css +1 -1
- package/Skeleton/cjs/style.development.v2.css +1 -1
- package/Skeleton/cjs/style.production.css +1 -1
- package/Skeleton/cjs/style.production.v2.css +1 -1
- package/Skeleton/index.d.ts +1 -1
- package/Skeleton/package.json +1 -1
- package/Spinner/cjs/index.development.js +3 -6
- package/Spinner/cjs/index.development.v2.js +3 -6
- package/Spinner/cjs/index.production.js +1 -1
- package/Spinner/cjs/index.production.v2.js +1 -1
- package/Spinner/cjs/style.development.css +1 -1
- package/Spinner/cjs/style.development.v2.css +1 -1
- package/Spinner/cjs/style.production.css +1 -1
- package/Spinner/cjs/style.production.v2.css +1 -1
- package/Spinner/index.d.ts +1 -1
- package/Spinner/package.json +1 -1
- package/Text/cjs/index.development.js +0 -2
- package/Text/cjs/index.development.v2.js +0 -2
- package/Text/cjs/index.production.js +1 -1
- package/Text/cjs/index.production.v2.js +1 -1
- package/Text/package.json +1 -1
- package/TextEmoji/cjs/index.development.js +3 -6
- package/TextEmoji/cjs/index.development.v2.js +3 -6
- package/TextEmoji/cjs/index.production.js +1 -1
- package/TextEmoji/cjs/index.production.v2.js +1 -1
- package/TextEmoji/index.d.ts +1 -1
- package/TextEmoji/package.json +1 -1
- package/Tooltip/cjs/index.development.js +5 -11
- package/Tooltip/cjs/index.development.v2.js +5 -11
- package/Tooltip/cjs/index.production.js +1 -1
- package/Tooltip/cjs/index.production.v2.js +1 -1
- package/Tooltip/index.d.ts +4 -4
- package/Tooltip/package.json +1 -1
- package/Tumbler/cjs/index.development.js +5 -11
- package/Tumbler/cjs/index.development.v2.js +5 -11
- package/Tumbler/cjs/index.production.js +1 -1
- package/Tumbler/cjs/index.production.v2.js +1 -1
- package/Tumbler/index.d.ts +1 -1
- package/Tumbler/package.json +1 -1
- package/base/colors-dark.css +11 -11
- package/base/colors.css +57 -57
- package/base/reset.css +1 -1
- package/base/typography.css +8 -8
- package/package.json +71 -68
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
3
|
var React = require('react');
|
|
6
4
|
var classNames = require('classnames');
|
|
7
5
|
var Icon = require('@prom-ui/core/Icon');
|
|
@@ -9,10 +7,7 @@ var BodyProvider = require('@prom-ui/core/BodyProvider');
|
|
|
9
7
|
var Left = require('@prom-ui/icons/Left');
|
|
10
8
|
var Right = require('@prom-ui/icons/Right');
|
|
11
9
|
|
|
12
|
-
function
|
|
13
|
-
|
|
14
|
-
function _interopNamespace(e) {
|
|
15
|
-
if (e && e.__esModule) return e;
|
|
10
|
+
function _interopNamespaceDefault(e) {
|
|
16
11
|
var n = Object.create(null);
|
|
17
12
|
if (e) {
|
|
18
13
|
Object.keys(e).forEach(function (k) {
|
|
@@ -25,13 +20,11 @@ function _interopNamespace(e) {
|
|
|
25
20
|
}
|
|
26
21
|
});
|
|
27
22
|
}
|
|
28
|
-
n
|
|
23
|
+
n.default = e;
|
|
29
24
|
return Object.freeze(n);
|
|
30
25
|
}
|
|
31
26
|
|
|
32
|
-
var
|
|
33
|
-
var React__namespace = /*#__PURE__*/_interopNamespace(React);
|
|
34
|
-
var classNames__default = /*#__PURE__*/_interopDefaultLegacy(classNames);
|
|
27
|
+
var React__namespace = /*#__PURE__*/_interopNamespaceDefault(React);
|
|
35
28
|
|
|
36
29
|
/******************************************************************************
|
|
37
30
|
Copyright (c) Microsoft Corporation.
|
|
@@ -158,7 +151,7 @@ var ScrollControlsButton = function (_a) {
|
|
|
158
151
|
};
|
|
159
152
|
}, [isActive, children]);
|
|
160
153
|
if (isActive && (controlsVisible.prev || controlsVisible.next)) {
|
|
161
|
-
var iconPlaceholder =
|
|
154
|
+
var iconPlaceholder = React.createElement("svg", {
|
|
162
155
|
className: css.iconPlaceholder,
|
|
163
156
|
viewBox: '0 0 24 24',
|
|
164
157
|
width: 24,
|
|
@@ -167,28 +160,28 @@ var ScrollControlsButton = function (_a) {
|
|
|
167
160
|
"aria-hidden": true,
|
|
168
161
|
tabIndex: -1
|
|
169
162
|
});
|
|
170
|
-
return
|
|
163
|
+
return React.createElement(React.Fragment, null, React.createElement("button", {
|
|
171
164
|
type: 'button',
|
|
172
|
-
className:
|
|
165
|
+
className: classNames(css.prev, (_b = {}, _b[css.hideOnDisabled] = hideOnDisabled, _b[css.largeBoxShadow] = !controlsVisible.isSmallHeight, _b[css.smallBoxShadow] = controlsVisible.isSmallHeight, _b)),
|
|
173
166
|
onClick: handleOnClickPrev,
|
|
174
167
|
style: {
|
|
175
168
|
zIndex: zIndex
|
|
176
169
|
},
|
|
177
170
|
disabled: !controlsVisible.prev,
|
|
178
171
|
title: t(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\u041D\u0430\u0437\u0430\u0434"], ["\u041D\u0430\u0437\u0430\u0434"])))
|
|
179
|
-
}, iconPlaceholder,
|
|
172
|
+
}, iconPlaceholder, React.createElement(Icon.Icon, {
|
|
180
173
|
className: css.icon,
|
|
181
174
|
"icon-as": Left.Left
|
|
182
|
-
})),
|
|
175
|
+
})), React.createElement("button", {
|
|
183
176
|
type: 'button',
|
|
184
|
-
className:
|
|
177
|
+
className: classNames(css.next, (_c = {}, _c[css.hideOnDisabled] = hideOnDisabled, _c[css.largeBoxShadow] = !controlsVisible.isSmallHeight, _c[css.smallBoxShadow] = controlsVisible.isSmallHeight, _c)),
|
|
185
178
|
onClick: handleOnClickNext,
|
|
186
179
|
style: {
|
|
187
180
|
zIndex: zIndex
|
|
188
181
|
},
|
|
189
182
|
disabled: !controlsVisible.next,
|
|
190
183
|
title: t(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\u0414\u0430\u043B\u0435\u0435"], ["\u0414\u0430\u043B\u0435\u0435"])))
|
|
191
|
-
}, iconPlaceholder,
|
|
184
|
+
}, iconPlaceholder, React.createElement(Icon.Icon, {
|
|
192
185
|
className: css.icon,
|
|
193
186
|
"icon-as": Right.Right
|
|
194
187
|
})));
|
|
@@ -214,7 +207,7 @@ var ScrollControls = React__namespace.forwardRef(function (_a, ref) {
|
|
|
214
207
|
var scrollRef = React__namespace.useRef(null);
|
|
215
208
|
return React__namespace.createElement("div", __assign({
|
|
216
209
|
ref: ref,
|
|
217
|
-
className:
|
|
210
|
+
className: classNames(css.root, className, (_b = {}, _b[css.showOnHover] = showOnHover, _b))
|
|
218
211
|
}, props), children(scrollRef), React__namespace.createElement(ScrollControlsButton, {
|
|
219
212
|
scrollRef: scrollRef,
|
|
220
213
|
hideOnDisabled: hideOnDisabled,
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
3
|
var React = require('react');
|
|
6
4
|
var classNames = require('classnames');
|
|
7
5
|
var Icon = require('@prom-ui/core/Icon');
|
|
@@ -9,10 +7,7 @@ var BodyProvider = require('@prom-ui/core/BodyProvider');
|
|
|
9
7
|
var Left = require('@prom-ui/icons/Left');
|
|
10
8
|
var Right = require('@prom-ui/icons/Right');
|
|
11
9
|
|
|
12
|
-
function
|
|
13
|
-
|
|
14
|
-
function _interopNamespace(e) {
|
|
15
|
-
if (e && e.__esModule) return e;
|
|
10
|
+
function _interopNamespaceDefault(e) {
|
|
16
11
|
var n = Object.create(null);
|
|
17
12
|
if (e) {
|
|
18
13
|
Object.keys(e).forEach(function (k) {
|
|
@@ -25,13 +20,11 @@ function _interopNamespace(e) {
|
|
|
25
20
|
}
|
|
26
21
|
});
|
|
27
22
|
}
|
|
28
|
-
n
|
|
23
|
+
n.default = e;
|
|
29
24
|
return Object.freeze(n);
|
|
30
25
|
}
|
|
31
26
|
|
|
32
|
-
var
|
|
33
|
-
var React__namespace = /*#__PURE__*/_interopNamespace(React);
|
|
34
|
-
var classNames__default = /*#__PURE__*/_interopDefaultLegacy(classNames);
|
|
27
|
+
var React__namespace = /*#__PURE__*/_interopNamespaceDefault(React);
|
|
35
28
|
|
|
36
29
|
/******************************************************************************
|
|
37
30
|
Copyright (c) Microsoft Corporation.
|
|
@@ -158,7 +151,7 @@ var ScrollControlsButton = function (_a) {
|
|
|
158
151
|
};
|
|
159
152
|
}, [isActive, children]);
|
|
160
153
|
if (isActive && (controlsVisible.prev || controlsVisible.next)) {
|
|
161
|
-
var iconPlaceholder =
|
|
154
|
+
var iconPlaceholder = React.createElement("svg", {
|
|
162
155
|
className: css.iconPlaceholder,
|
|
163
156
|
viewBox: '0 0 24 24',
|
|
164
157
|
width: 24,
|
|
@@ -167,28 +160,28 @@ var ScrollControlsButton = function (_a) {
|
|
|
167
160
|
"aria-hidden": true,
|
|
168
161
|
tabIndex: -1
|
|
169
162
|
});
|
|
170
|
-
return
|
|
163
|
+
return React.createElement(React.Fragment, null, React.createElement("button", {
|
|
171
164
|
type: 'button',
|
|
172
|
-
className:
|
|
165
|
+
className: classNames(css.prev, (_b = {}, _b[css.hideOnDisabled] = hideOnDisabled, _b[css.largeBoxShadow] = !controlsVisible.isSmallHeight, _b[css.smallBoxShadow] = controlsVisible.isSmallHeight, _b)),
|
|
173
166
|
onClick: handleOnClickPrev,
|
|
174
167
|
style: {
|
|
175
168
|
zIndex: zIndex
|
|
176
169
|
},
|
|
177
170
|
disabled: !controlsVisible.prev,
|
|
178
171
|
title: t(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\u041D\u0430\u0437\u0430\u0434"], ["\u041D\u0430\u0437\u0430\u0434"])))
|
|
179
|
-
}, iconPlaceholder,
|
|
172
|
+
}, iconPlaceholder, React.createElement(Icon.Icon, {
|
|
180
173
|
className: css.icon,
|
|
181
174
|
"icon-as": Left.Left
|
|
182
|
-
})),
|
|
175
|
+
})), React.createElement("button", {
|
|
183
176
|
type: 'button',
|
|
184
|
-
className:
|
|
177
|
+
className: classNames(css.next, (_c = {}, _c[css.hideOnDisabled] = hideOnDisabled, _c[css.largeBoxShadow] = !controlsVisible.isSmallHeight, _c[css.smallBoxShadow] = controlsVisible.isSmallHeight, _c)),
|
|
185
178
|
onClick: handleOnClickNext,
|
|
186
179
|
style: {
|
|
187
180
|
zIndex: zIndex
|
|
188
181
|
},
|
|
189
182
|
disabled: !controlsVisible.next,
|
|
190
183
|
title: t(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\u0414\u0430\u043B\u0435\u0435"], ["\u0414\u0430\u043B\u0435\u0435"])))
|
|
191
|
-
}, iconPlaceholder,
|
|
184
|
+
}, iconPlaceholder, React.createElement(Icon.Icon, {
|
|
192
185
|
className: css.icon,
|
|
193
186
|
"icon-as": Right.Right
|
|
194
187
|
})));
|
|
@@ -214,7 +207,7 @@ var ScrollControls = React__namespace.forwardRef(function (_a, ref) {
|
|
|
214
207
|
var scrollRef = React__namespace.useRef(null);
|
|
215
208
|
return React__namespace.createElement("div", __assign({
|
|
216
209
|
ref: ref,
|
|
217
|
-
className:
|
|
210
|
+
className: classNames(css.root, className, (_b = {}, _b[css.showOnHover] = showOnHover, _b))
|
|
218
211
|
}, props), children(scrollRef), React__namespace.createElement(ScrollControlsButton, {
|
|
219
212
|
scrollRef: scrollRef,
|
|
220
213
|
hideOnDisabled: hideOnDisabled,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";
|
|
1
|
+
"use strict";var e=require("react"),t=require("classnames"),r=require("@prom-ui/core/Icon"),n=require("@prom-ui/core/BodyProvider"),i=require("@prom-ui/icons/Left"),c=require("@prom-ui/icons/Right");function l(e){var t=Object.create(null);return e&&Object.keys(e).forEach((function(r){if("default"!==r){var n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:function(){return e[r]}})}})),t.default=e,Object.freeze(t)}var o=l(e),a=function(){return a=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},a.apply(this,arguments)};function s(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}var u,f,d="mOlOq",v="cF2KB rZcyK",m="_9B-9g rZcyK",p="a-AIU",h="EU4JE",b="mOQTl",O="lzBzL",y="StbVV",g="IONkE",x=function(l){var o,a,d=l.scrollRef,y=l.hideOnDisabled,x=void 0!==y&&y,E=l.isActive,I=void 0===E||E,N=l.onClickNext,j=l.onClickPrev,P=l.zIndex,k=l.children,w=n.useBodyLocale().t,C=e.useRef(null),S=e.useState({prev:!1,next:!1,isSmallHeight:!1}),q=S[0],z=S[1],H=function(e){var t=d.current,r=t.scrollLeft,n=t.scrollWidth,i=t.clientWidth,c=t.clientHeight,l=(Number.isInteger(e)?e:r)||0;z({prev:l>1,next:l<n-i,isSmallHeight:c<64})},L=function(e){var t=d.current,r=t.scrollLeft,n=t.clientWidth*e;H(r+n),requestAnimationFrame((function(){d.current&&d.current.scrollBy({left:n,behavior:"smooth"})}))},B=function(){clearTimeout(C.current||0),C.current=setTimeout(H,100)};if(e.useEffect((function(){return d.current&&I&&(H(),d.current.addEventListener("scroll",B)),function(){d.current&&I&&d.current.removeEventListener("scroll",B)}}),[I,k]),I&&(q.prev||q.next)){var R=e.createElement("svg",{className:b,viewBox:"0 0 24 24",width:24,height:24,focusable:!1,"aria-hidden":!0,tabIndex:-1});return e.createElement(e.Fragment,null,e.createElement("button",{type:"button",className:t(v,(o={},o[g]=x,o[p]=!q.isSmallHeight,o[h]=q.isSmallHeight,o)),onClick:function(){"function"==typeof j&&j(),L(-1)},style:{zIndex:P},disabled:!q.prev,title:w(u||(u=s(["Назад"],["Назад"])))},R,e.createElement(r.Icon,{className:O,"icon-as":i.Left})),e.createElement("button",{type:"button",className:t(m,(a={},a[g]=x,a[p]=!q.isSmallHeight,a[h]=q.isSmallHeight,a)),onClick:function(){"function"==typeof N&&N(),L(1)},style:{zIndex:P},disabled:!q.next,title:w(f||(f=s(["Далее"],["Далее"])))},R,e.createElement(r.Icon,{className:O,"icon-as":c.Right})))}return null},E=o.forwardRef((function(e,r){var n,i=e.children,c=e.className,l=e.hideOnDisabled,s=void 0===l||l,u=e.isActive,f=void 0===u||u,v=e.onClickNext,m=e.onClickPrev,p=e.showOnHover,h=void 0!==p&&p,b=e.zIndex,O=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]])}return r}(e,["children","className","hideOnDisabled","isActive","onClickNext","onClickPrev","showOnHover","zIndex"]),g=o.useRef(null);return o.createElement("div",a({ref:r,className:t(d,c,(n={},n[y]=h,n))},O),i(g),o.createElement(x,{scrollRef:g,hideOnDisabled:s,isActive:f,onClickNext:v,onClickPrev:m,zIndex:b},i))}));exports.ScrollControls=E,require("./style.production.css");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";
|
|
1
|
+
"use strict";var e=require("react"),t=require("classnames"),r=require("@prom-ui/core/Icon"),n=require("@prom-ui/core/BodyProvider"),i=require("@prom-ui/icons/Left"),c=require("@prom-ui/icons/Right");function o(e){var t=Object.create(null);return e&&Object.keys(e).forEach((function(r){if("default"!==r){var n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:function(){return e[r]}})}})),t.default=e,Object.freeze(t)}var l=o(e),a=function(){return a=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},a.apply(this,arguments)};function s(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}var u,f,d="_5xFyd",v="YhapL kQ3-r",m="yCCvv kQ3-r",h="_4Z-qq",p="ZAZeD",b="XLACs",y="z7X7-",O="PVtmJ",g="hwEsJ",x=function(o){var l,a,d=o.scrollRef,O=o.hideOnDisabled,x=void 0!==O&&O,C=o.isActive,E=void 0===C||C,P=o.onClickNext,j=o.onClickPrev,k=o.zIndex,w=o.children,N=n.useBodyLocale().t,I=e.useRef(null),q=e.useState({prev:!1,next:!1,isSmallHeight:!1}),S=q[0],H=q[1],L=function(e){var t=d.current,r=t.scrollLeft,n=t.scrollWidth,i=t.clientWidth,c=t.clientHeight,o=(Number.isInteger(e)?e:r)||0;H({prev:o>1,next:o<n-i,isSmallHeight:c<64})},z=function(e){var t=d.current,r=t.scrollLeft,n=t.clientWidth*e;L(r+n),requestAnimationFrame((function(){d.current&&d.current.scrollBy({left:n,behavior:"smooth"})}))},A=function(){clearTimeout(I.current||0),I.current=setTimeout(L,100)};if(e.useEffect((function(){return d.current&&E&&(L(),d.current.addEventListener("scroll",A)),function(){d.current&&E&&d.current.removeEventListener("scroll",A)}}),[E,w]),E&&(S.prev||S.next)){var R=e.createElement("svg",{className:b,viewBox:"0 0 24 24",width:24,height:24,focusable:!1,"aria-hidden":!0,tabIndex:-1});return e.createElement(e.Fragment,null,e.createElement("button",{type:"button",className:t(v,(l={},l[g]=x,l[h]=!S.isSmallHeight,l[p]=S.isSmallHeight,l)),onClick:function(){"function"==typeof j&&j(),z(-1)},style:{zIndex:k},disabled:!S.prev,title:N(u||(u=s(["Назад"],["Назад"])))},R,e.createElement(r.Icon,{className:y,"icon-as":i.Left})),e.createElement("button",{type:"button",className:t(m,(a={},a[g]=x,a[h]=!S.isSmallHeight,a[p]=S.isSmallHeight,a)),onClick:function(){"function"==typeof P&&P(),z(1)},style:{zIndex:k},disabled:!S.next,title:N(f||(f=s(["Далее"],["Далее"])))},R,e.createElement(r.Icon,{className:y,"icon-as":c.Right})))}return null},C=l.forwardRef((function(e,r){var n,i=e.children,c=e.className,o=e.hideOnDisabled,s=void 0===o||o,u=e.isActive,f=void 0===u||u,v=e.onClickNext,m=e.onClickPrev,h=e.showOnHover,p=void 0!==h&&h,b=e.zIndex,y=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]])}return r}(e,["children","className","hideOnDisabled","isActive","onClickNext","onClickPrev","showOnHover","zIndex"]),g=l.useRef(null);return l.createElement("div",a({ref:r,className:t(d,c,(n={},n[O]=p,n))},y),i(g),l.createElement(x,{scrollRef:g,hideOnDisabled:s,isActive:f,onClickNext:v,onClickPrev:m,zIndex:b},i))}));exports.ScrollControls=C,require("./style.production.v2.css");
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
export
|
|
2
|
+
export type ScrollControlsProps = React.ComponentProps<'div'> & {
|
|
3
3
|
/** Принимает children как функцию, `(scrollRef) =>` */
|
|
4
4
|
children: (ref: React.RefObject<HTMLElement>) => any;
|
|
5
5
|
/** Показывать кнопки при наведении */
|
package/SideOverlay/blocks.d.ts
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
3
|
var React = require('react');
|
|
6
4
|
var ScrollLock = require('react-scrolllock');
|
|
7
5
|
var KeyPress = require('@prom-ui/core/KeyPress');
|
|
@@ -10,10 +8,7 @@ var BodyProvider = require('@prom-ui/core/BodyProvider');
|
|
|
10
8
|
var evokit = require('evokit');
|
|
11
9
|
var reactTransitionGroup = require('react-transition-group');
|
|
12
10
|
|
|
13
|
-
function
|
|
14
|
-
|
|
15
|
-
function _interopNamespace(e) {
|
|
16
|
-
if (e && e.__esModule) return e;
|
|
11
|
+
function _interopNamespaceDefault(e) {
|
|
17
12
|
var n = Object.create(null);
|
|
18
13
|
if (e) {
|
|
19
14
|
Object.keys(e).forEach(function (k) {
|
|
@@ -26,13 +21,11 @@ function _interopNamespace(e) {
|
|
|
26
21
|
}
|
|
27
22
|
});
|
|
28
23
|
}
|
|
29
|
-
n
|
|
24
|
+
n.default = e;
|
|
30
25
|
return Object.freeze(n);
|
|
31
26
|
}
|
|
32
27
|
|
|
33
|
-
var
|
|
34
|
-
var React__namespace = /*#__PURE__*/_interopNamespace(React);
|
|
35
|
-
var ScrollLock__default = /*#__PURE__*/_interopDefaultLegacy(ScrollLock);
|
|
28
|
+
var React__namespace = /*#__PURE__*/_interopNamespaceDefault(React);
|
|
36
29
|
|
|
37
30
|
/******************************************************************************
|
|
38
31
|
Copyright (c) Microsoft Corporation.
|
|
@@ -95,7 +88,7 @@ var Animate = function (_a) {
|
|
|
95
88
|
_c = _a.enabled,
|
|
96
89
|
enabled = _c === void 0 ? true : _c,
|
|
97
90
|
onEnter = _a.onEnter;
|
|
98
|
-
return
|
|
91
|
+
return React.createElement(reactTransitionGroup.CSSTransition, {
|
|
99
92
|
in: open,
|
|
100
93
|
timeout: enabled ? 225 : 0,
|
|
101
94
|
classNames: css,
|
|
@@ -163,7 +156,7 @@ var SideOverlay = function (_a) {
|
|
|
163
156
|
zIndex: zIndex
|
|
164
157
|
},
|
|
165
158
|
className: classNames.Root
|
|
166
|
-
}, props), React__namespace.createElement(
|
|
159
|
+
}, props), React__namespace.createElement(ScrollLock, {
|
|
167
160
|
isActive: useScrollLock
|
|
168
161
|
}), React__namespace.createElement(KeyPress.KeyPress, {
|
|
169
162
|
isActive: useEscapeClose,
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
3
|
var React = require('react');
|
|
6
4
|
var ScrollLock = require('react-scrolllock');
|
|
7
5
|
var KeyPress = require('@prom-ui/core/KeyPress');
|
|
@@ -10,10 +8,7 @@ var BodyProvider = require('@prom-ui/core/BodyProvider');
|
|
|
10
8
|
var evokit = require('evokit');
|
|
11
9
|
var reactTransitionGroup = require('react-transition-group');
|
|
12
10
|
|
|
13
|
-
function
|
|
14
|
-
|
|
15
|
-
function _interopNamespace(e) {
|
|
16
|
-
if (e && e.__esModule) return e;
|
|
11
|
+
function _interopNamespaceDefault(e) {
|
|
17
12
|
var n = Object.create(null);
|
|
18
13
|
if (e) {
|
|
19
14
|
Object.keys(e).forEach(function (k) {
|
|
@@ -26,13 +21,11 @@ function _interopNamespace(e) {
|
|
|
26
21
|
}
|
|
27
22
|
});
|
|
28
23
|
}
|
|
29
|
-
n
|
|
24
|
+
n.default = e;
|
|
30
25
|
return Object.freeze(n);
|
|
31
26
|
}
|
|
32
27
|
|
|
33
|
-
var
|
|
34
|
-
var React__namespace = /*#__PURE__*/_interopNamespace(React);
|
|
35
|
-
var ScrollLock__default = /*#__PURE__*/_interopDefaultLegacy(ScrollLock);
|
|
28
|
+
var React__namespace = /*#__PURE__*/_interopNamespaceDefault(React);
|
|
36
29
|
|
|
37
30
|
/******************************************************************************
|
|
38
31
|
Copyright (c) Microsoft Corporation.
|
|
@@ -95,7 +88,7 @@ var Animate = function (_a) {
|
|
|
95
88
|
_c = _a.enabled,
|
|
96
89
|
enabled = _c === void 0 ? true : _c,
|
|
97
90
|
onEnter = _a.onEnter;
|
|
98
|
-
return
|
|
91
|
+
return React.createElement(reactTransitionGroup.CSSTransition, {
|
|
99
92
|
in: open,
|
|
100
93
|
timeout: enabled ? 225 : 0,
|
|
101
94
|
classNames: css,
|
|
@@ -163,7 +156,7 @@ var SideOverlay = function (_a) {
|
|
|
163
156
|
zIndex: zIndex
|
|
164
157
|
},
|
|
165
158
|
className: classNames.Root
|
|
166
|
-
}, props), React__namespace.createElement(
|
|
159
|
+
}, props), React__namespace.createElement(ScrollLock, {
|
|
167
160
|
isActive: useScrollLock
|
|
168
161
|
}), React__namespace.createElement(KeyPress.KeyPress, {
|
|
169
162
|
isActive: useEscapeClose,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";
|
|
1
|
+
"use strict";var e=require("react"),t=require("react-scrolllock"),o=require("@prom-ui/core/KeyPress"),r=require("@prom-ui/core/Portal"),n=require("@prom-ui/core/BodyProvider"),a=require("evokit"),c=require("react-transition-group");function l(e){var t=Object.create(null);return e&&Object.keys(e).forEach((function(o){if("default"!==o){var r=Object.getOwnPropertyDescriptor(e,o);Object.defineProperty(t,o,r.get?r:{enumerable:!0,get:function(){return e[o]}})}})),t.default=e,Object.freeze(t)}var i=l(e),s=function(){return s=Object.assign||function(e){for(var t,o=1,r=arguments.length;o<r;o++)for(var n in t=arguments[o])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e},s.apply(this,arguments)};var p,u={root:"zoSc7",backdrop:"v5Neh",popup:"LsB4w",content:"D9ezA",close:"aiN5k",popup_placement_top:"BSFf7",popup_placement_bottom:"k1gGY",popup_placement_right:"w9HUr",popup_placement_left:"DWBxa",enter:"ukL-B",exit:"QE5yq",enterActive:"VPRAq",exitActive:"FhiSX"},d={css:u,b:""},m=a.createBlock("div","root",[],d),v=a.createBlock("div","backdrop",[],d),f=a.createBlock("div","popup",["placement"],d),b=a.createBlock("div","content",[],d),y=a.createBlock("button","close",[],d),O=function(t){var o=t.open,r=void 0!==o&&o,n=t.children,a=t.enabled,l=void 0===a||a,i=t.onEnter;return e.createElement(c.CSSTransition,{in:r,timeout:l?225:0,classNames:u,unmountOnExit:!0,onEnter:i},n)},E=function(e,t){return["top","bottom"].includes(e)?{height:t}:{width:t}};exports.SideOverlay=function(e){var a,c,l=e.children,u=e.classNames,d=void 0===u?{}:u,h=e.onClose,k=e.onOpen,P=e.open,g=void 0!==P&&P,x=e.padding,B=void 0===x?"45px 30px 30px 30px":x,C=e.placement,j=void 0===C?"left":C,S=e.size,q=void 0===S?400:S,w=e.useCloseButton,N=void 0===w||w,z=e.useEscapeClose,_=void 0===z||z,A=e.useOutsideClose,I=void 0===A||A,L=e.usePortal,D=void 0===L||L,R=e.useScrollLock,T=void 0===R||R,K=e.useTouchScrollable,Q=void 0===K||K,F=e.zIndex,G=void 0===F?5e3:F,H=e.dataQaId,U=e.contentRef,V=e.animationEnabled,W=void 0===V||V,X=function(e,t){var o={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(o[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(r=Object.getOwnPropertySymbols(e);n<r.length;n++)t.indexOf(r[n])<0&&Object.prototype.propertyIsEnumerable.call(e,r[n])&&(o[r[n]]=e[r[n]])}return o}(e,["children","classNames","onClose","onOpen","open","padding","placement","size","useCloseButton","useEscapeClose","useOutsideClose","usePortal","useScrollLock","useTouchScrollable","zIndex","dataQaId","contentRef","animationEnabled"]),Y=n.useBodyLocale().t;return i.createElement(O,{open:g,onEnter:function(){k&&k()},enabled:W},i.createElement(r.Portal,{isActive:D},i.createElement(m,s({role:"presentation",style:{zIndex:G},className:d.Root},X),i.createElement(t,{isActive:T}),i.createElement(o.KeyPress,{isActive:_,code:"Escape",onKeyDown:h}),i.createElement(v,{className:d.Backdrop,"aria-hidden":!0,onClick:function(e){I&&h&&h(e)}}),i.createElement(f,{"popup-placement":j,className:d.Popup,style:E(j,q),"data-qaid":H},N&&h&&i.createElement(y,{className:d.Close,type:"button",onClick:h,"aria-label":Y(p||(a=["Закрыть"],c=["Закрыть"],Object.defineProperty?Object.defineProperty(a,"raw",{value:c}):a.raw=c,p=a)),"data-qaid":"close"}),Q?i.createElement(t.TouchScrollable,null,i.createElement(b,{ref:U,className:d.Content,style:{padding:B}},l)):i.createElement(b,{ref:U,className:d.Content,style:{padding:B}},l)))))},require("./style.production.css");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";
|
|
1
|
+
"use strict";var e=require("react"),t=require("react-scrolllock"),o=require("@prom-ui/core/KeyPress"),r=require("@prom-ui/core/Portal"),n=require("@prom-ui/core/BodyProvider"),a=require("evokit"),c=require("react-transition-group");function l(e){var t=Object.create(null);return e&&Object.keys(e).forEach((function(o){if("default"!==o){var r=Object.getOwnPropertyDescriptor(e,o);Object.defineProperty(t,o,r.get?r:{enumerable:!0,get:function(){return e[o]}})}})),t.default=e,Object.freeze(t)}var i=l(e),s=function(){return s=Object.assign||function(e){for(var t,o=1,r=arguments.length;o<r;o++)for(var n in t=arguments[o])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e},s.apply(this,arguments)};var p,u={root:"_0hSa2",backdrop:"wUZLN",popup:"Ulqfh",content:"N1Cdb",close:"D-QIP",popup_placement_top:"qJTjO",popup_placement_bottom:"TDEZ7",popup_placement_right:"xZVWW",popup_placement_left:"ywgfV",enter:"_5IZPy",exit:"N9pJ7",enterActive:"SiX-q",exitActive:"oRVo0"},d={css:u,b:""},m=a.createBlock("div","root",[],d),v=a.createBlock("div","backdrop",[],d),f=a.createBlock("div","popup",["placement"],d),b=a.createBlock("div","content",[],d),y=a.createBlock("button","close",[],d),O=function(t){var o=t.open,r=void 0!==o&&o,n=t.children,a=t.enabled,l=void 0===a||a,i=t.onEnter;return e.createElement(c.CSSTransition,{in:r,timeout:l?225:0,classNames:u,unmountOnExit:!0,onEnter:i},n)},E=function(e,t){return["top","bottom"].includes(e)?{height:t}:{width:t}};exports.SideOverlay=function(e){var a,c,l=e.children,u=e.classNames,d=void 0===u?{}:u,h=e.onClose,P=e.onOpen,g=e.open,k=void 0!==g&&g,C=e.padding,j=void 0===C?"45px 30px 30px 30px":C,x=e.placement,q=void 0===x?"left":x,N=e.size,S=void 0===N?400:N,w=e.useCloseButton,B=void 0===w||w,_=e.useEscapeClose,I=void 0===_||_,z=e.useOutsideClose,T=void 0===z||z,A=e.usePortal,D=void 0===A||A,L=e.useScrollLock,R=void 0===L||L,Z=e.useTouchScrollable,K=void 0===Z||Z,Q=e.zIndex,V=void 0===Q?5e3:Q,J=e.dataQaId,U=e.contentRef,W=e.animationEnabled,X=void 0===W||W,F=function(e,t){var o={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(o[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(r=Object.getOwnPropertySymbols(e);n<r.length;n++)t.indexOf(r[n])<0&&Object.prototype.propertyIsEnumerable.call(e,r[n])&&(o[r[n]]=e[r[n]])}return o}(e,["children","classNames","onClose","onOpen","open","padding","placement","size","useCloseButton","useEscapeClose","useOutsideClose","usePortal","useScrollLock","useTouchScrollable","zIndex","dataQaId","contentRef","animationEnabled"]),G=n.useBodyLocale().t;return i.createElement(O,{open:k,onEnter:function(){P&&P()},enabled:X},i.createElement(r.Portal,{isActive:D},i.createElement(m,s({role:"presentation",style:{zIndex:V},className:d.Root},F),i.createElement(t,{isActive:R}),i.createElement(o.KeyPress,{isActive:I,code:"Escape",onKeyDown:h}),i.createElement(v,{className:d.Backdrop,"aria-hidden":!0,onClick:function(e){T&&h&&h(e)}}),i.createElement(f,{"popup-placement":q,className:d.Popup,style:E(q,S),"data-qaid":J},B&&h&&i.createElement(y,{className:d.Close,type:"button",onClick:h,"aria-label":G(p||(a=["Закрыть"],c=["Закрыть"],Object.defineProperty?Object.defineProperty(a,"raw",{value:c}):a.raw=c,p=a)),"data-qaid":"close"}),K?i.createElement(t.TouchScrollable,null,i.createElement(b,{ref:U,className:d.Content,style:{padding:j}},l)):i.createElement(b,{ref:U,className:d.Content,style:{padding:j}},l)))))},require("./style.production.v2.css");
|
package/SideOverlay/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
export
|
|
2
|
+
export type SideOverlayProps = React.ComponentProps<'div'> & {
|
|
3
3
|
/** Включает/отключает анимацию открытия/скрытия шторки */
|
|
4
4
|
animationEnabled?: boolean;
|
|
5
5
|
/** Состояние, открыто или нет */
|
package/SideOverlay/package.json
CHANGED
package/SideOverlay/utils.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
type tPlacement = 'top' | 'right' | 'bottom' | 'left';
|
|
2
|
+
type tSize = string | number;
|
|
3
|
+
type tGetPopupStyle = {
|
|
4
4
|
height?: tSize;
|
|
5
5
|
width?: tSize;
|
|
6
6
|
};
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
3
|
var React = require('react');
|
|
6
4
|
var Swipe = require('react-easy-swipe');
|
|
7
5
|
var classNames = require('classnames');
|
|
@@ -11,10 +9,7 @@ var BodyProvider = require('@prom-ui/core/BodyProvider');
|
|
|
11
9
|
var Left = require('@prom-ui/icons/Left');
|
|
12
10
|
var Right = require('@prom-ui/icons/Right');
|
|
13
11
|
|
|
14
|
-
function
|
|
15
|
-
|
|
16
|
-
function _interopNamespace(e) {
|
|
17
|
-
if (e && e.__esModule) return e;
|
|
12
|
+
function _interopNamespaceDefault(e) {
|
|
18
13
|
var n = Object.create(null);
|
|
19
14
|
if (e) {
|
|
20
15
|
Object.keys(e).forEach(function (k) {
|
|
@@ -27,13 +22,11 @@ function _interopNamespace(e) {
|
|
|
27
22
|
}
|
|
28
23
|
});
|
|
29
24
|
}
|
|
30
|
-
n
|
|
25
|
+
n.default = e;
|
|
31
26
|
return Object.freeze(n);
|
|
32
27
|
}
|
|
33
28
|
|
|
34
|
-
var React__namespace = /*#__PURE__*/
|
|
35
|
-
var Swipe__default = /*#__PURE__*/_interopDefaultLegacy(Swipe);
|
|
36
|
-
var classNames__default = /*#__PURE__*/_interopDefaultLegacy(classNames);
|
|
29
|
+
var React__namespace = /*#__PURE__*/_interopNamespaceDefault(React);
|
|
37
30
|
|
|
38
31
|
/******************************************************************************
|
|
39
32
|
Copyright (c) Microsoft Corporation.
|
|
@@ -305,12 +298,12 @@ var SimpleSlider = React__namespace.forwardRef(function (_a, ref) {
|
|
|
305
298
|
});
|
|
306
299
|
}
|
|
307
300
|
}, [showIndex]);
|
|
308
|
-
return React__namespace.createElement(
|
|
301
|
+
return React__namespace.createElement(Swipe, __assign({
|
|
309
302
|
ref: ref,
|
|
310
303
|
onSwipeLeft: handleSwipeNext,
|
|
311
304
|
onSwipeRight: handleSwipePrev,
|
|
312
305
|
onSwipeMove: handleSwipeMove,
|
|
313
|
-
className:
|
|
306
|
+
className: classNames(css.root, className, (_b = {}, _b[css.showOnHoverButtons] = showOnHoverButtons, _b[css.showOnHoverDots] = showOnHoverDots, _b)),
|
|
314
307
|
style: getRootStyle({
|
|
315
308
|
width: width,
|
|
316
309
|
height: height,
|
|
@@ -376,7 +369,7 @@ var SimpleSlider = React__namespace.forwardRef(function (_a, ref) {
|
|
|
376
369
|
className: css.buttonIcon,
|
|
377
370
|
"icon-as": Right.Right
|
|
378
371
|
}))), isShowDots && React__namespace.createElement("ul", {
|
|
379
|
-
className:
|
|
372
|
+
className: classNames(css.dots, (_c = {}, _c[css.dotsTransparent] = isDotsTransparent, _c))
|
|
380
373
|
}, childrenArray.map(function (child, index) {
|
|
381
374
|
var viewIndex = index + 1;
|
|
382
375
|
return React__namespace.createElement("li", {
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
3
|
var React = require('react');
|
|
6
4
|
var Swipe = require('react-easy-swipe');
|
|
7
5
|
var classNames = require('classnames');
|
|
@@ -11,10 +9,7 @@ var BodyProvider = require('@prom-ui/core/BodyProvider');
|
|
|
11
9
|
var Left = require('@prom-ui/icons/Left');
|
|
12
10
|
var Right = require('@prom-ui/icons/Right');
|
|
13
11
|
|
|
14
|
-
function
|
|
15
|
-
|
|
16
|
-
function _interopNamespace(e) {
|
|
17
|
-
if (e && e.__esModule) return e;
|
|
12
|
+
function _interopNamespaceDefault(e) {
|
|
18
13
|
var n = Object.create(null);
|
|
19
14
|
if (e) {
|
|
20
15
|
Object.keys(e).forEach(function (k) {
|
|
@@ -27,13 +22,11 @@ function _interopNamespace(e) {
|
|
|
27
22
|
}
|
|
28
23
|
});
|
|
29
24
|
}
|
|
30
|
-
n
|
|
25
|
+
n.default = e;
|
|
31
26
|
return Object.freeze(n);
|
|
32
27
|
}
|
|
33
28
|
|
|
34
|
-
var React__namespace = /*#__PURE__*/
|
|
35
|
-
var Swipe__default = /*#__PURE__*/_interopDefaultLegacy(Swipe);
|
|
36
|
-
var classNames__default = /*#__PURE__*/_interopDefaultLegacy(classNames);
|
|
29
|
+
var React__namespace = /*#__PURE__*/_interopNamespaceDefault(React);
|
|
37
30
|
|
|
38
31
|
/******************************************************************************
|
|
39
32
|
Copyright (c) Microsoft Corporation.
|
|
@@ -305,12 +298,12 @@ var SimpleSlider = React__namespace.forwardRef(function (_a, ref) {
|
|
|
305
298
|
});
|
|
306
299
|
}
|
|
307
300
|
}, [showIndex]);
|
|
308
|
-
return React__namespace.createElement(
|
|
301
|
+
return React__namespace.createElement(Swipe, __assign({
|
|
309
302
|
ref: ref,
|
|
310
303
|
onSwipeLeft: handleSwipeNext,
|
|
311
304
|
onSwipeRight: handleSwipePrev,
|
|
312
305
|
onSwipeMove: handleSwipeMove,
|
|
313
|
-
className:
|
|
306
|
+
className: classNames(css.root, className, (_b = {}, _b[css.showOnHoverButtons] = showOnHoverButtons, _b[css.showOnHoverDots] = showOnHoverDots, _b)),
|
|
314
307
|
style: getRootStyle({
|
|
315
308
|
width: width,
|
|
316
309
|
height: height,
|
|
@@ -376,7 +369,7 @@ var SimpleSlider = React__namespace.forwardRef(function (_a, ref) {
|
|
|
376
369
|
className: css.buttonIcon,
|
|
377
370
|
"icon-as": Right.Right
|
|
378
371
|
}))), isShowDots && React__namespace.createElement("ul", {
|
|
379
|
-
className:
|
|
372
|
+
className: classNames(css.dots, (_c = {}, _c[css.dotsTransparent] = isDotsTransparent, _c))
|
|
380
373
|
}, childrenArray.map(function (child, index) {
|
|
381
374
|
var viewIndex = index + 1;
|
|
382
375
|
return React__namespace.createElement("li", {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";
|
|
1
|
+
"use strict";var e=require("react"),t=require("react-easy-swipe"),n=require("classnames");require("intersection-observer");var r=require("@prom-ui/core/Icon"),o=require("@prom-ui/core/BodyProvider"),i=require("@prom-ui/icons/Left"),a=require("@prom-ui/icons/Right");function c(e){var t=Object.create(null);return e&&Object.keys(e).forEach((function(n){if("default"!==n){var r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:function(){return e[n]}})}})),t.default=e,Object.freeze(t)}var u=c(e),s=function(){return s=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},s.apply(this,arguments)};function l(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}var f,d,v,p=function(e){return!!e&&/\d\/\d/.test(e)},m=function(e,t){return Math.abs((e%t+t)%t)},y=function(e){return{paddingTop:"calc(".concat(e.split("/").reverse().join("/")," * 100%)")}},h=function(e){var t=e.width,n=e.height,r=e.ratio,o=e.style,i=p(r);return s({width:t,height:i?"auto":n,maxWidth:i?"100%":"none",aspectRatio:i?r:void 0},o)},x=function(e){var t=e.index,n=e.childrenCount,r=e.duration,o=e.offset,i="number"==typeof o,a=i?o:0;return{transform:"translateX(calc(".concat(t*(100/n)*-1,"% + ").concat(a,"px))"),transition:i?void 0:"transform ".concat(r,"ms ease"),width:"".concat(100*n,"%")}},b="WuTIM",w="G8BYu",g="_94Eq7",E="UqTOk I5yQD LXJjI",O="BbLNv I5yQD LXJjI",N="_89h6n",k="E7g4J",C="v-ZWk",j="cbWCu",I="_7N4yb LXJjI",S="yssoj",q="ig5DV",P=u.forwardRef((function(c,P){var L,B,D,_,R,T,M=c.showIndex,H=void 0===M?0:M,J=c.autoPlay,W=void 0===J?0:J,X=c.children,Q=c.className,z=c.duration,A=void 0===z?500:z,F=c.height,G=c.infinite,U=void 0!==G&&G,V=c.ratio,Y=c.style,Z=c.width,K=c.onChangeIndex,$=c.onClickDot,ee=c.onClickItem,te=c.onClickButtonNext,ne=c.onClickButtonPrev,re=c.onSwipeNext,oe=c.onSwipePrev,ie=c.showOnHoverButtons,ae=void 0!==ie&&ie,ce=c.showOnHoverDots,ue=void 0!==ce&&ce,se=c.isDotsTransparent,le=void 0!==se&&se,fe=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}(c,["showIndex","autoPlay","children","className","duration","height","infinite","ratio","style","width","onChangeIndex","onClickDot","onClickItem","onClickButtonNext","onClickButtonPrev","onSwipeNext","onSwipePrev","showOnHoverButtons","showOnHoverDots","isDotsTransparent"]),de=o.useBodyLocale().t,ve=u.useRef(null),pe=u.useRef(!1),me=u.useState(!1),ye=me[0],he=me[1],xe=u.useState({index:H,offset:void 0}),be=xe[0],we=xe[1],ge=u.Children.count(X),Ee=u.Children.toArray(X),Oe=!U&&0===be.index,Ne=!U&&be.index===ge-1,ke=ge>1,Ce=ge>1,je=!ye&&W>0,Ie=be.index-1,Se=be.index+1,qe=m(be.index,ge),Pe=m(Ie,ge),Le=m(Se,ge),Be=(D=function(){pe.current||Ne||we({index:Se,offset:void 0})},_=W,R=e.useRef(null),[function(){T(),R.current=setTimeout(D,_)},T=function(){clearTimeout(R.current)}]),De=Be[0],_e=Be[1],Re=function(){pe.current=!0,_e()},Te=function(){pe.current=!1,je&&De(),be.index in Ee||we({index:qe,offset:0}),"function"==typeof K&&K(qe)};return u.useEffect((function(){var e,t,n=new IntersectionObserver((function(e){e[0].isIntersecting?De():_e()}));return null===(e=ve.current)||void 0===e||e.addEventListener("transitionstart",Re),null===(t=ve.current)||void 0===t||t.addEventListener("transitionend",Te),je&&ve.current&&n.observe(ve.current),function(){var e,t;null===(e=ve.current)||void 0===e||e.removeEventListener("transitionstart",Re),null===(t=ve.current)||void 0===t||t.removeEventListener("transitionend",Te),_e(),n.disconnect()}}),[be.index,je]),u.useEffect((function(){H!==be.index&&we({index:H,offset:void 0})}),[H]),u.createElement(t,s({ref:P,onSwipeLeft:function(){pe.current||Ne||("function"==typeof re&&re(Le),we({index:Se,offset:void 0}))},onSwipeRight:function(){pe.current||Oe||("function"==typeof oe&&oe(Pe),we({index:Ie,offset:void 0}))},onSwipeMove:function(e,t){var n=e.x;if(!(pe.current||t.touches&&t.touches.length>1)){var r=n;(Oe&&n>0||Ne&&n<0)&&(r=0),we({index:be.index,offset:r})}},className:n(b,Q,(L={},L[S]=ae,L[q]=ue,L)),style:h({width:Z,height:F,ratio:V,style:Y}),onSwipeStart:function(){return he(!0)},onSwipeEnd:function(){return he(!1)},onMouseEnter:function(){return he(!0)},onMouseLeave:function(){return he(!1)}},fe),p(V)&&u.createElement("div",{style:y(V)}),u.createElement("ul",{ref:ve,className:w,style:x({index:U?be.index+1:be.index,childrenCount:U?ge+2:ge,duration:A,offset:be.offset})},U&&u.createElement("li",{className:g},Ee[Ee.length-1]),Ee.map((function(e,t){return u.createElement("li",{key:e.key,className:g,onClick:function(){"function"==typeof ee&&ee(t)},"data-qaid":"image_slider_".concat(t)},e)})),U&&u.createElement("li",{className:g},Ee[0])),ke&&u.createElement(u.Fragment,null,u.createElement("button",{type:"button",className:E,onClick:function(){pe.current||Oe||("function"==typeof ne&&ne(Pe),we({index:Ie,offset:void 0}))},disabled:Oe,"aria-label":de(f||(f=l(["Показать предыдущий баннер"],["Показать предыдущий баннер"]))),"data-qaid":"prev_image"},u.createElement(r.Icon,{className:N,"icon-as":i.Left})),u.createElement("button",{type:"button",className:O,onClick:function(){pe.current||Ne||("function"==typeof te&&te(Le),we({index:Se,offset:void 0}))},disabled:Ne,"aria-label":de(d||(d=l(["Показать следующий баннер"],["Показать следующий баннер"]))),"data-qaid":"next_image"},u.createElement(r.Icon,{className:N,"icon-as":a.Right}))),Ce&&u.createElement("ul",{className:n(k,(B={},B[C]=le,B))},Ee.map((function(e,t){var n=t+1;return u.createElement("li",{className:j,key:e.key},u.createElement("button",{type:"button",className:I,onClick:function(){return e=t,void(pe.current||("function"==typeof $&&$(e),we({index:e,offset:void 0})));var e},disabled:t===qe,"aria-label":de(v||(v=l(["Показать баннер номер ",""],["Показать баннер номер ",""])),n),"data-qaid":"view_image_".concat(n)},n))}))))}));exports.SimpleSlider=P,require("./style.production.css");
|