@alfalab/core-components-bottom-sheet 4.2.0 → 4.3.2
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/CHANGELOG.md +35 -0
- package/dist/{component-a69ef39f.d.ts → component-01854e98.d.ts} +13 -1
- package/dist/{component-a69ef39f.js → component-01854e98.js} +34 -30
- package/dist/component.js +2 -2
- package/dist/components/backer/Component.js +2 -2
- package/dist/components/backer/index.css +3 -3
- package/dist/components/closer/Component.js +2 -2
- package/dist/components/closer/index.css +3 -3
- package/dist/components/footer/Component.js +1 -1
- package/dist/components/footer/index.css +4 -4
- package/dist/components/header/Component.js +2 -2
- package/dist/components/header/index.css +19 -17
- package/dist/components/swipeable-backdrop/Component.js +1 -1
- package/dist/{esm/component-273ce79d.d.ts → cssm/component-1a32e10b.d.ts} +13 -1
- package/dist/cssm/{component-42c27971.js → component-1a32e10b.js} +31 -27
- package/dist/cssm/component.js +1 -1
- package/dist/cssm/components/header/Component.js +1 -1
- package/dist/cssm/components/header/index.module.css +4 -2
- package/dist/cssm/index.d.ts +1 -1
- package/dist/cssm/index.js +1 -1
- package/dist/{cssm/component-42c27971.d.ts → esm/component-3c2b5fd7.d.ts} +13 -1
- package/dist/esm/{component-273ce79d.js → component-3c2b5fd7.js} +34 -30
- package/dist/esm/component.js +2 -2
- package/dist/esm/components/backer/Component.js +2 -2
- package/dist/esm/components/backer/index.css +3 -3
- package/dist/esm/components/closer/Component.js +2 -2
- package/dist/esm/components/closer/index.css +3 -3
- package/dist/esm/components/footer/Component.js +1 -1
- package/dist/esm/components/footer/index.css +4 -4
- package/dist/esm/components/header/Component.js +2 -2
- package/dist/esm/components/header/index.css +19 -17
- package/dist/esm/components/swipeable-backdrop/Component.js +1 -1
- package/dist/esm/index.css +16 -16
- package/dist/esm/index.d.ts +1 -1
- package/dist/esm/index.js +2 -2
- package/dist/esm/{tslib.es6-702aaccc.d.ts → tslib.es6-5568f64c.d.ts} +0 -0
- package/dist/esm/{tslib.es6-702aaccc.js → tslib.es6-5568f64c.js} +0 -0
- package/dist/index.css +16 -16
- package/dist/index.d.ts +1 -1
- package/dist/index.js +2 -2
- package/dist/modern/{component-17606fb9.d.ts → component-0e021541.d.ts} +13 -1
- package/dist/modern/{component-17606fb9.js → component-0e021541.js} +31 -27
- package/dist/modern/component.js +1 -1
- package/dist/modern/components/backer/Component.js +1 -1
- package/dist/modern/components/backer/index.css +3 -3
- package/dist/modern/components/closer/Component.js +1 -1
- package/dist/modern/components/closer/index.css +3 -3
- package/dist/modern/components/footer/Component.js +1 -1
- package/dist/modern/components/footer/index.css +4 -4
- package/dist/modern/components/header/Component.js +1 -1
- package/dist/modern/components/header/index.css +19 -17
- package/dist/modern/index.css +16 -16
- package/dist/modern/index.d.ts +1 -1
- package/dist/modern/index.js +1 -1
- package/dist/{tslib.es6-cbd7f1a3.d.ts → tslib.es6-071a0cac.d.ts} +0 -0
- package/dist/{tslib.es6-cbd7f1a3.js → tslib.es6-071a0cac.js} +0 -0
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,41 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [4.3.2](https://github.com/core-ds/core-components/compare/@alfalab/core-components-bottom-sheet@4.3.1...@alfalab/core-components-bottom-sheet@4.3.2) (2022-06-24)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @alfalab/core-components-bottom-sheet
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
## [4.3.1](https://github.com/core-ds/core-components/compare/@alfalab/core-components-bottom-sheet@4.3.0...@alfalab/core-components-bottom-sheet@4.3.1) (2022-06-23)
|
|
15
|
+
|
|
16
|
+
**Note:** Version bump only for package @alfalab/core-components-bottom-sheet
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
# [4.3.0](https://github.com/core-ds/core-components/compare/@alfalab/core-components-bottom-sheet@4.2.1...@alfalab/core-components-bottom-sheet@4.3.0) (2022-06-20)
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
### Features
|
|
26
|
+
|
|
27
|
+
* **input-autocomplete:** add new component InputAutocompleteMobile ([#96](https://github.com/core-ds/core-components/issues/96)) ([a0e9f95](https://github.com/core-ds/core-components/commit/a0e9f95edbfcd6722e99647d75a262805e81a4a7))
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
## [4.2.1](https://github.com/core-ds/core-components/compare/@alfalab/core-components-bottom-sheet@4.2.0...@alfalab/core-components-bottom-sheet@4.2.1) (2022-06-20)
|
|
34
|
+
|
|
35
|
+
**Note:** Version bump only for package @alfalab/core-components-bottom-sheet
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
|
|
6
41
|
# [4.2.0](https://github.com/core-ds/core-components/compare/@alfalab/core-components-bottom-sheet@4.1.5...@alfalab/core-components-bottom-sheet@4.2.0) (2022-06-16)
|
|
7
42
|
|
|
8
43
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference types="react-transition-group" />
|
|
2
2
|
/// <reference types="react" />
|
|
3
3
|
import React from "react";
|
|
4
|
-
import { FC, ReactNode } from "react";
|
|
4
|
+
import { FC, ReactNode, HTMLAttributes } from "react";
|
|
5
5
|
import { BottomSheetTitleAlign } from "./index";
|
|
6
6
|
import { TransitionProps } from 'react-transition-group/Transition';
|
|
7
7
|
type HeaderProps = {
|
|
@@ -33,6 +33,10 @@ type HeaderProps = {
|
|
|
33
33
|
* Слот справа
|
|
34
34
|
*/
|
|
35
35
|
rightAddons?: ReactNode;
|
|
36
|
+
/**
|
|
37
|
+
* Слот снизу
|
|
38
|
+
*/
|
|
39
|
+
bottomAddons?: ReactNode;
|
|
36
40
|
/**
|
|
37
41
|
* Наличие компонента крестика
|
|
38
42
|
*/
|
|
@@ -85,6 +89,10 @@ type BottomSheetProps = {
|
|
|
85
89
|
* Дополнительный класс
|
|
86
90
|
*/
|
|
87
91
|
contentClassName?: string;
|
|
92
|
+
/**
|
|
93
|
+
* Дополнительные пропсы на контейнер.
|
|
94
|
+
*/
|
|
95
|
+
containerProps?: HTMLAttributes<HTMLDivElement>;
|
|
88
96
|
/**
|
|
89
97
|
* Дополнительный класс
|
|
90
98
|
*/
|
|
@@ -134,6 +142,10 @@ type BottomSheetProps = {
|
|
|
134
142
|
* Слот справа
|
|
135
143
|
*/
|
|
136
144
|
rightAddons?: ReactNode;
|
|
145
|
+
/**
|
|
146
|
+
* Слот снизу
|
|
147
|
+
*/
|
|
148
|
+
bottomAddons?: ReactNode;
|
|
137
149
|
/**
|
|
138
150
|
* Наличие компонента крестика
|
|
139
151
|
*/
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var tslib_es6 = require('./tslib.es6-
|
|
3
|
+
var tslib_es6 = require('./tslib.es6-071a0cac.js');
|
|
4
4
|
var React = require('react');
|
|
5
5
|
var cn = require('classnames');
|
|
6
6
|
var reactDiv100vh = require('react-div-100vh');
|
|
@@ -17,13 +17,13 @@ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'defau
|
|
|
17
17
|
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
18
18
|
var cn__default = /*#__PURE__*/_interopDefaultLegacy(cn);
|
|
19
19
|
|
|
20
|
-
var styles = {"header":"bottom-
|
|
20
|
+
var styles = {"headerWrapper":"bottom-sheet__headerWrapper_ghjc3","header":"bottom-sheet__header_ghjc3","sticky":"bottom-sheet__sticky_ghjc3","highlighted":"bottom-sheet__highlighted_ghjc3","justifyEnd":"bottom-sheet__justifyEnd_ghjc3","addon":"bottom-sheet__addon_ghjc3","addonFixed":"bottom-sheet__addonFixed_ghjc3","addonLeft":"bottom-sheet__addonLeft_ghjc3","addonRight":"bottom-sheet__addonRight_ghjc3","title":"bottom-sheet__title_ghjc3","titleCenter":"bottom-sheet__titleCenter_ghjc3","titleLeft":"bottom-sheet__titleLeft_ghjc3","trimTitle":"bottom-sheet__trimTitle_ghjc3","titleBigIndentHorizontal":"bottom-sheet__titleBigIndentHorizontal_ghjc3","titleIndentRight":"bottom-sheet__titleIndentRight_ghjc3","titleIndentLeft":"bottom-sheet__titleIndentLeft_ghjc3"};
|
|
21
21
|
require('./components/header/index.css')
|
|
22
22
|
|
|
23
23
|
var Header = function (_a) {
|
|
24
|
-
var _b, _c, _d, _e;
|
|
25
|
-
var title = _a.title, headerClassName = _a.headerClassName, addonClassName = _a.addonClassName, closerClassName = _a.closerClassName, backerClassName = _a.backerClassName, leftAddons = _a.leftAddons, rightAddons = _a.rightAddons, hasCloser = _a.hasCloser, hasBacker = _a.hasBacker, titleAlign = _a.titleAlign, trimTitle = _a.trimTitle, sticky = _a.sticky, onBack = _a.onBack;
|
|
26
|
-
var
|
|
24
|
+
var _b, _c, _d, _e, _f;
|
|
25
|
+
var title = _a.title, headerClassName = _a.headerClassName, addonClassName = _a.addonClassName, closerClassName = _a.closerClassName, backerClassName = _a.backerClassName, leftAddons = _a.leftAddons, rightAddons = _a.rightAddons, bottomAddons = _a.bottomAddons, hasCloser = _a.hasCloser, hasBacker = _a.hasBacker, titleAlign = _a.titleAlign, trimTitle = _a.trimTitle, sticky = _a.sticky, onBack = _a.onBack;
|
|
26
|
+
var _g = React.useContext(coreComponentsBaseModal.BaseModalContext), headerHighlighted = _g.headerHighlighted, setHasHeader = _g.setHasHeader, setHeaderOffset = _g.setHeaderOffset;
|
|
27
27
|
var hasLeftPart = hasBacker || leftAddons || titleAlign === 'center';
|
|
28
28
|
var hasRightPart = hasCloser || rightAddons || titleAlign === 'center';
|
|
29
29
|
var hasHeaderContent = title || hasBacker || hasCloser;
|
|
@@ -44,27 +44,30 @@ var Header = function (_a) {
|
|
|
44
44
|
_a[styles.titleIndentRight] = !sticky && !titleAlignedCenter && hasRightPart,
|
|
45
45
|
_a));
|
|
46
46
|
};
|
|
47
|
-
return (React__default['default'].createElement("div", { className: cn__default['default'](styles.
|
|
48
|
-
_b[styles.justifyEnd] = !title,
|
|
47
|
+
return (React__default['default'].createElement("div", { className: cn__default['default'](styles.headerWrapper, headerClassName, (_b = {},
|
|
49
48
|
_b[styles.highlighted] = headerHighlighted && sticky,
|
|
50
49
|
_b[styles.sticky] = sticky,
|
|
51
50
|
_b)) },
|
|
52
|
-
|
|
53
|
-
_c[styles.
|
|
54
|
-
_c
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
51
|
+
React__default['default'].createElement("div", { className: cn__default['default'](styles.header, headerClassName, (_c = {},
|
|
52
|
+
_c[styles.justifyEnd] = !title,
|
|
53
|
+
_c)) },
|
|
54
|
+
hasLeftPart && (React__default['default'].createElement("div", { className: cn__default['default'](styles.addon, addonClassName, (_d = {},
|
|
55
|
+
_d[styles.addonFixed] = !sticky,
|
|
56
|
+
_d[styles.addonLeft] = !sticky,
|
|
57
|
+
_d)) }, hasBacker ? (React__default['default'].createElement(components_backer_Component.Backer, { className: backerClassName, onClick: onBack })) : (leftAddons))),
|
|
58
|
+
hasHeaderContent && (React__default['default'].createElement(coreComponentsTypography.Typography.Text, { view: 'primary-large', weight: 'bold', className: cn__default['default'](styles.title, getTitleIndent(), (_e = {},
|
|
59
|
+
_e[styles.titleCenter] = titleAlign === 'center',
|
|
60
|
+
_e[styles.titleLeft] = titleAlign === 'left',
|
|
61
|
+
_e[styles.trimTitle] = trimTitle,
|
|
62
|
+
_e)), color: 'primary' }, title)),
|
|
63
|
+
hasRightPart && (React__default['default'].createElement("div", { className: cn__default['default'](styles.addon, addonClassName, (_f = {},
|
|
64
|
+
_f[styles.addonFixed] = !sticky,
|
|
65
|
+
_f[styles.addonRight] = !sticky,
|
|
66
|
+
_f)) }, hasCloser ? React__default['default'].createElement(components_closer_Component.Closer, { className: closerClassName }) : rightAddons))),
|
|
67
|
+
bottomAddons));
|
|
65
68
|
};
|
|
66
69
|
|
|
67
|
-
var styles$1 = {"modal":"bottom-
|
|
70
|
+
var styles$1 = {"modal":"bottom-sheet__modal_x2u51","component":"bottom-sheet__component_x2u51","withTransition":"bottom-sheet__withTransition_x2u51","withZeroTransition":"bottom-sheet__withZeroTransition_x2u51","scrollableContainer":"bottom-sheet__scrollableContainer_x2u51","marker":"bottom-sheet__marker_x2u51","content":"bottom-sheet__content_x2u51","noHeader":"bottom-sheet__noHeader_x2u51","noFooter":"bottom-sheet__noFooter_x2u51","scrollLocked":"bottom-sheet__scrollLocked_x2u51","appear":"bottom-sheet__appear_x2u51","enter":"bottom-sheet__enter_x2u51","appearActive":"bottom-sheet__appearActive_x2u51","enterActive":"bottom-sheet__enterActive_x2u51","enterDone":"bottom-sheet__enterDone_x2u51","appearDone":"bottom-sheet__appearDone_x2u51","exit":"bottom-sheet__exit_x2u51","exitActive":"bottom-sheet__exitActive_x2u51"};
|
|
68
71
|
require('./index.css')
|
|
69
72
|
|
|
70
73
|
var TIMEOUT = 300;
|
|
@@ -77,7 +80,7 @@ var HEADER_OFFSET = 24;
|
|
|
77
80
|
var CLOSE_OFFSET = 0.2;
|
|
78
81
|
var BottomSheet = React.forwardRef(function (_a, ref) {
|
|
79
82
|
var _b, _c, _d;
|
|
80
|
-
var open = _a.open, title = _a.title, actionButton = _a.actionButton, contentClassName = _a.contentClassName, containerClassName = _a.containerClassName, headerClassName = _a.headerClassName, footerClassName = _a.footerClassName, addonClassName = _a.addonClassName, closerClassName = _a.closerClassName, backerClassName = _a.backerClassName, className = _a.className, leftAddons = _a.leftAddons, rightAddons = _a.rightAddons, hasCloser = _a.hasCloser, hasBacker = _a.hasBacker, _e = _a.titleAlign, titleAlign = _e === void 0 ? 'left' : _e, trimTitle = _a.trimTitle, stickyHeader = _a.stickyHeader, _f = _a.stickyFooter, stickyFooter = _f === void 0 ? true : _f, _g = _a.initialHeight, initialHeight = _g === void 0 ? 'default' : _g, hideOverlay = _a.hideOverlay, hideHeader = _a.hideHeader, disableOverlayClick = _a.disableOverlayClick, children = _a.children, zIndex = _a.zIndex, _h = _a.transitionProps, transitionProps = _h === void 0 ? {} : _h, dataTestId = _a.dataTestId, _j = _a.swipeable, swipeable = _j === void 0 ? true : _j, _k = _a.ignoreScreenChange, ignoreScreenChange = _k === void 0 ? false : _k, onClose = _a.onClose, onBack = _a.onBack;
|
|
83
|
+
var open = _a.open, title = _a.title, actionButton = _a.actionButton, contentClassName = _a.contentClassName, containerClassName = _a.containerClassName, containerProps = _a.containerProps, headerClassName = _a.headerClassName, footerClassName = _a.footerClassName, addonClassName = _a.addonClassName, closerClassName = _a.closerClassName, backerClassName = _a.backerClassName, className = _a.className, leftAddons = _a.leftAddons, rightAddons = _a.rightAddons, bottomAddons = _a.bottomAddons, hasCloser = _a.hasCloser, hasBacker = _a.hasBacker, _e = _a.titleAlign, titleAlign = _e === void 0 ? 'left' : _e, trimTitle = _a.trimTitle, stickyHeader = _a.stickyHeader, _f = _a.stickyFooter, stickyFooter = _f === void 0 ? true : _f, _g = _a.initialHeight, initialHeight = _g === void 0 ? 'default' : _g, hideOverlay = _a.hideOverlay, hideHeader = _a.hideHeader, disableOverlayClick = _a.disableOverlayClick, children = _a.children, zIndex = _a.zIndex, _h = _a.transitionProps, transitionProps = _h === void 0 ? {} : _h, dataTestId = _a.dataTestId, _j = _a.swipeable, swipeable = _j === void 0 ? true : _j, _k = _a.ignoreScreenChange, ignoreScreenChange = _k === void 0 ? false : _k, onClose = _a.onClose, onBack = _a.onBack;
|
|
81
84
|
var _l = React.useState(0), sheetOffset = _l[0], setSheetOffset = _l[1];
|
|
82
85
|
var _m = React.useState(1), backdropOpacity = _m[0], setBackdropOpacity = _m[1];
|
|
83
86
|
var _o = React.useState(false), scrollLocked = _o[0], setScrollLocked = _o[1];
|
|
@@ -97,6 +100,7 @@ var BottomSheet = React.forwardRef(function (_a, ref) {
|
|
|
97
100
|
backerClassName: backerClassName,
|
|
98
101
|
leftAddons: leftAddons,
|
|
99
102
|
rightAddons: rightAddons,
|
|
103
|
+
bottomAddons: bottomAddons,
|
|
100
104
|
hasCloser: hasCloser,
|
|
101
105
|
hasBacker: hasBacker,
|
|
102
106
|
titleAlign: titleAlign,
|
|
@@ -165,12 +169,6 @@ var BottomSheet = React.forwardRef(function (_a, ref) {
|
|
|
165
169
|
};
|
|
166
170
|
var handleSheetSwiping = function (_a) {
|
|
167
171
|
var deltaY = _a.deltaY, initial = _a.initial;
|
|
168
|
-
/**
|
|
169
|
-
* Вернуть плавную анимацию шторке при свайпе
|
|
170
|
-
*/
|
|
171
|
-
if (transitionClassName === styles$1.withZeroTransition) {
|
|
172
|
-
setTransitionClassName(styles$1.withTransition);
|
|
173
|
-
}
|
|
174
172
|
var offsetY = initial[1];
|
|
175
173
|
if (shouldSkipSwiping(offsetY)) {
|
|
176
174
|
return;
|
|
@@ -184,6 +182,12 @@ var BottomSheet = React.forwardRef(function (_a, ref) {
|
|
|
184
182
|
*/
|
|
185
183
|
if (offset > 0) {
|
|
186
184
|
setScrollLocked(true);
|
|
185
|
+
/**
|
|
186
|
+
* Вернуть плавную анимацию шторке при свайпе
|
|
187
|
+
*/
|
|
188
|
+
if (transitionClassName === styles$1.withZeroTransition) {
|
|
189
|
+
setTransitionClassName(styles$1.withTransition);
|
|
190
|
+
}
|
|
187
191
|
}
|
|
188
192
|
};
|
|
189
193
|
var backdropSwipeablehandlers = reactSwipeable.useSwipeable({
|
|
@@ -237,9 +241,9 @@ var BottomSheet = React.forwardRef(function (_a, ref) {
|
|
|
237
241
|
React__default['default'].createElement("div", tslib_es6.__assign({ className: cn__default['default'](styles$1.component, className, (_b = {},
|
|
238
242
|
_b[transitionClassName] = !sheetOffset,
|
|
239
243
|
_b)), style: tslib_es6.__assign(tslib_es6.__assign({}, getSwipeStyles()), getHeightStyles()) }, sheetSwipeablehandlers),
|
|
240
|
-
React__default['default'].createElement("div", { className: cn__default['default'](styles$1.scrollableContainer, containerClassName, (_c = {},
|
|
244
|
+
React__default['default'].createElement("div", tslib_es6.__assign({}, containerProps, { className: cn__default['default'](styles$1.scrollableContainer, containerProps === null || containerProps === void 0 ? void 0 : containerProps.className, containerClassName, (_c = {},
|
|
241
245
|
_c[styles$1.scrollLocked] = scrollLocked,
|
|
242
|
-
_c)), ref: scrollableContainer },
|
|
246
|
+
_c)), ref: scrollableContainer }),
|
|
243
247
|
swipeable && React__default['default'].createElement("div", { className: cn__default['default'](styles$1.marker) }),
|
|
244
248
|
!hideHeader && !emptyHeader && React__default['default'].createElement(Header, tslib_es6.__assign({}, headerProps)),
|
|
245
249
|
React__default['default'].createElement("div", { className: cn__default['default'](styles$1.content, contentClassName, (_d = {},
|
package/dist/component.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
require('./tslib.es6-
|
|
5
|
+
require('./tslib.es6-071a0cac.js');
|
|
6
6
|
require('react');
|
|
7
7
|
require('classnames');
|
|
8
8
|
require('react-div-100vh');
|
|
@@ -14,7 +14,7 @@ require('@alfalab/icons-glyph/CrossMIcon');
|
|
|
14
14
|
require('./components/closer/Component.js');
|
|
15
15
|
require('@alfalab/icons-glyph/ArrowBackMIcon');
|
|
16
16
|
require('./components/backer/Component.js');
|
|
17
|
-
var components_header_Component = require('./component-
|
|
17
|
+
var components_header_Component = require('./component-01854e98.js');
|
|
18
18
|
require('./components/footer/Component.js');
|
|
19
19
|
require('@alfalab/core-components-backdrop');
|
|
20
20
|
require('./components/swipeable-backdrop/Component.js');
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var tslib_es6 = require('../../tslib.es6-
|
|
5
|
+
var tslib_es6 = require('../../tslib.es6-071a0cac.js');
|
|
6
6
|
var React = require('react');
|
|
7
7
|
var cn = require('classnames');
|
|
8
8
|
var coreComponentsIconButton = require('@alfalab/core-components-icon-button');
|
|
@@ -13,7 +13,7 @@ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'defau
|
|
|
13
13
|
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
14
14
|
var cn__default = /*#__PURE__*/_interopDefaultLegacy(cn);
|
|
15
15
|
|
|
16
|
-
var styles = {"backer":"bottom-
|
|
16
|
+
var styles = {"backer":"bottom-sheet__backer_17yfr","button":"bottom-sheet__button_17yfr"};
|
|
17
17
|
require('./index.css')
|
|
18
18
|
|
|
19
19
|
var Backer = function (_a) {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: v6wpa */
|
|
2
2
|
:root {
|
|
3
3
|
--bottom-sheet-backer-bg-color: var(--color-light-bg-primary-inverted-alpha-3);
|
|
4
4
|
}
|
|
5
5
|
|
|
6
|
-
.bottom-
|
|
6
|
+
.bottom-sheet__backer_17yfr {
|
|
7
7
|
width: 32px;
|
|
8
8
|
height: 32px;
|
|
9
9
|
display: flex;
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
color: var(--color-light-graphic-primary);
|
|
14
14
|
}
|
|
15
15
|
|
|
16
|
-
.bottom-
|
|
16
|
+
.bottom-sheet__button_17yfr {
|
|
17
17
|
background: var(--bottom-sheet-backer-bg-color);
|
|
18
18
|
-webkit-backdrop-filter: blur(10px);
|
|
19
19
|
backdrop-filter: blur(10px);
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var tslib_es6 = require('../../tslib.es6-
|
|
5
|
+
var tslib_es6 = require('../../tslib.es6-071a0cac.js');
|
|
6
6
|
var React = require('react');
|
|
7
7
|
var cn = require('classnames');
|
|
8
8
|
var coreComponentsBaseModal = require('@alfalab/core-components-base-modal');
|
|
@@ -14,7 +14,7 @@ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'defau
|
|
|
14
14
|
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
15
15
|
var cn__default = /*#__PURE__*/_interopDefaultLegacy(cn);
|
|
16
16
|
|
|
17
|
-
var styles = {"closer":"bottom-
|
|
17
|
+
var styles = {"closer":"bottom-sheet__closer_yne74","button":"bottom-sheet__button_yne74"};
|
|
18
18
|
require('./index.css')
|
|
19
19
|
|
|
20
20
|
var Closer = function (_a) {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: 1g6km */
|
|
2
2
|
:root {
|
|
3
3
|
--bottom-sheet-closer-bg-color: var(--color-light-bg-primary-inverted-alpha-3);
|
|
4
4
|
}
|
|
5
5
|
|
|
6
|
-
.bottom-
|
|
6
|
+
.bottom-sheet__closer_yne74 {
|
|
7
7
|
width: 32px;
|
|
8
8
|
height: 32px;
|
|
9
9
|
display: flex;
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
color: var(--color-light-graphic-primary);
|
|
14
14
|
}
|
|
15
15
|
|
|
16
|
-
.bottom-
|
|
16
|
+
.bottom-sheet__button_yne74 {
|
|
17
17
|
background: var(--bottom-sheet-closer-bg-color);
|
|
18
18
|
-webkit-backdrop-filter: blur(10px);
|
|
19
19
|
backdrop-filter: blur(10px);
|
|
@@ -11,7 +11,7 @@ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'defau
|
|
|
11
11
|
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
12
12
|
var cn__default = /*#__PURE__*/_interopDefaultLegacy(cn);
|
|
13
13
|
|
|
14
|
-
var styles = {"footer":"bottom-
|
|
14
|
+
var styles = {"footer":"bottom-sheet__footer_1poao","sticky":"bottom-sheet__sticky_1poao","highlighted":"bottom-sheet__highlighted_1poao"};
|
|
15
15
|
require('./index.css')
|
|
16
16
|
|
|
17
17
|
var Footer = function (_a) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: 1w1xm */
|
|
2
2
|
:root {
|
|
3
3
|
--color-light-bg-primary: #fff;
|
|
4
4
|
--color-light-border-primary: #dbdee1;
|
|
@@ -18,15 +18,15 @@
|
|
|
18
18
|
--bottom-sheet-footer-border-top: 1px solid var(--color-light-border-primary);
|
|
19
19
|
--bottom-sheet-footer-background-color: var(--color-light-bg-primary);
|
|
20
20
|
}
|
|
21
|
-
.bottom-
|
|
21
|
+
.bottom-sheet__footer_1poao {
|
|
22
22
|
padding: var(--gap-m) var(--gap-m);
|
|
23
23
|
background-color: var(--color-light-bg-primary);
|
|
24
24
|
}
|
|
25
|
-
.bottom-
|
|
25
|
+
.bottom-sheet__sticky_1poao {
|
|
26
26
|
position: sticky;
|
|
27
27
|
bottom: 0;
|
|
28
28
|
}
|
|
29
|
-
.bottom-
|
|
29
|
+
.bottom-sheet__highlighted_1poao {
|
|
30
30
|
border-top: var(--bottom-sheet-footer-border-top);
|
|
31
31
|
background-color: var(--bottom-sheet-footer-background-color);
|
|
32
32
|
}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
require('../../tslib.es6-
|
|
5
|
+
require('../../tslib.es6-071a0cac.js');
|
|
6
6
|
require('react');
|
|
7
7
|
require('classnames');
|
|
8
8
|
require('react-div-100vh');
|
|
@@ -14,7 +14,7 @@ require('@alfalab/icons-glyph/CrossMIcon');
|
|
|
14
14
|
require('../closer/Component.js');
|
|
15
15
|
require('@alfalab/icons-glyph/ArrowBackMIcon');
|
|
16
16
|
require('../backer/Component.js');
|
|
17
|
-
var components_header_Component = require('../../component-
|
|
17
|
+
var components_header_Component = require('../../component-01854e98.js');
|
|
18
18
|
require('../footer/Component.js');
|
|
19
19
|
require('@alfalab/core-components-backdrop');
|
|
20
20
|
require('../swipeable-backdrop/Component.js');
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: d9ojq */
|
|
2
2
|
:root {
|
|
3
3
|
--color-light-bg-primary: #fff;
|
|
4
4
|
}
|
|
@@ -30,8 +30,7 @@
|
|
|
30
30
|
--bottom-sheet-title-font-family: var(--font-family-system);
|
|
31
31
|
--bottom-sheet-title-margin-vertical: var(--gap-2xs);
|
|
32
32
|
}
|
|
33
|
-
.bottom-
|
|
34
|
-
display: flex;
|
|
33
|
+
.bottom-sheet__headerWrapper_ghjc3 {
|
|
35
34
|
padding: var(--gap-xs);
|
|
36
35
|
padding-bottom: 0;
|
|
37
36
|
background-color: var(--color-light-bg-primary);
|
|
@@ -39,35 +38,38 @@
|
|
|
39
38
|
border-top-left-radius: var(--border-radius-xl);
|
|
40
39
|
z-index: 1;
|
|
41
40
|
}
|
|
42
|
-
.bottom-
|
|
41
|
+
.bottom-sheet__header_ghjc3 {
|
|
42
|
+
display: flex;
|
|
43
|
+
}
|
|
44
|
+
.bottom-sheet__sticky_ghjc3 {
|
|
43
45
|
position: sticky;
|
|
44
46
|
top: 0;
|
|
45
47
|
}
|
|
46
|
-
.bottom-
|
|
48
|
+
.bottom-sheet__highlighted_ghjc3 {
|
|
47
49
|
border-bottom: var(--bottom-sheet-header-border-bottom);
|
|
48
50
|
}
|
|
49
|
-
.bottom-
|
|
51
|
+
.bottom-sheet__justifyEnd_ghjc3 {
|
|
50
52
|
justify-content: flex-end;
|
|
51
53
|
}
|
|
52
|
-
.bottom-
|
|
54
|
+
.bottom-sheet__addon_ghjc3 {
|
|
53
55
|
display: flex;
|
|
54
56
|
justify-content: center;
|
|
55
57
|
align-items: center;
|
|
56
58
|
min-width: 48px;
|
|
57
59
|
height: 48px;
|
|
58
60
|
}
|
|
59
|
-
.bottom-
|
|
61
|
+
.bottom-sheet__addonFixed_ghjc3 {
|
|
60
62
|
position: fixed;
|
|
61
63
|
}
|
|
62
|
-
.bottom-
|
|
64
|
+
.bottom-sheet__addonLeft_ghjc3 {
|
|
63
65
|
left: 0;
|
|
64
66
|
margin-left: var(--gap-xs);
|
|
65
67
|
}
|
|
66
|
-
.bottom-
|
|
68
|
+
.bottom-sheet__addonRight_ghjc3 {
|
|
67
69
|
right: 0;
|
|
68
70
|
margin-right: var(--gap-xs);
|
|
69
71
|
}
|
|
70
|
-
.bottom-
|
|
72
|
+
.bottom-sheet__title_ghjc3 {
|
|
71
73
|
padding: var(--gap-xs) var(--gap-xs);
|
|
72
74
|
margin: var(--bottom-sheet-title-margin-vertical) 0;
|
|
73
75
|
width: 100%;
|
|
@@ -76,23 +78,23 @@
|
|
|
76
78
|
line-height: var(--bottom-sheet-title-line-height);
|
|
77
79
|
font-family: var(--bottom-sheet-title-font-family);
|
|
78
80
|
}
|
|
79
|
-
.bottom-
|
|
81
|
+
.bottom-sheet__titleCenter_ghjc3 {
|
|
80
82
|
text-align: center;
|
|
81
83
|
}
|
|
82
|
-
.bottom-
|
|
84
|
+
.bottom-sheet__titleLeft_ghjc3 {
|
|
83
85
|
text-align: left;
|
|
84
86
|
}
|
|
85
|
-
.bottom-
|
|
87
|
+
.bottom-sheet__trimTitle_ghjc3 {
|
|
86
88
|
white-space: nowrap;
|
|
87
89
|
overflow: hidden;
|
|
88
90
|
text-overflow: ellipsis;
|
|
89
91
|
}
|
|
90
|
-
.bottom-
|
|
92
|
+
.bottom-sheet__titleBigIndentHorizontal_ghjc3 {
|
|
91
93
|
margin: var(--bottom-sheet-title-margin-vertical) var(--gap-4xl);
|
|
92
94
|
}
|
|
93
|
-
.bottom-
|
|
95
|
+
.bottom-sheet__titleIndentRight_ghjc3 {
|
|
94
96
|
margin-right: var(--gap-4xl);
|
|
95
97
|
}
|
|
96
|
-
.bottom-
|
|
98
|
+
.bottom-sheet__titleIndentLeft_ghjc3 {
|
|
97
99
|
margin-left: var(--gap-4xl);
|
|
98
100
|
}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var tslib_es6 = require('../../tslib.es6-
|
|
5
|
+
var tslib_es6 = require('../../tslib.es6-071a0cac.js');
|
|
6
6
|
var React = require('react');
|
|
7
7
|
var coreComponentsBackdrop = require('@alfalab/core-components-backdrop');
|
|
8
8
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference types="react-transition-group" />
|
|
2
2
|
/// <reference types="react" />
|
|
3
3
|
import React from "react";
|
|
4
|
-
import { FC, ReactNode } from "react";
|
|
4
|
+
import { FC, ReactNode, HTMLAttributes } from "react";
|
|
5
5
|
import { BottomSheetTitleAlign } from "./index";
|
|
6
6
|
import { TransitionProps } from 'react-transition-group/Transition';
|
|
7
7
|
type HeaderProps = {
|
|
@@ -33,6 +33,10 @@ type HeaderProps = {
|
|
|
33
33
|
* Слот справа
|
|
34
34
|
*/
|
|
35
35
|
rightAddons?: ReactNode;
|
|
36
|
+
/**
|
|
37
|
+
* Слот снизу
|
|
38
|
+
*/
|
|
39
|
+
bottomAddons?: ReactNode;
|
|
36
40
|
/**
|
|
37
41
|
* Наличие компонента крестика
|
|
38
42
|
*/
|
|
@@ -85,6 +89,10 @@ type BottomSheetProps = {
|
|
|
85
89
|
* Дополнительный класс
|
|
86
90
|
*/
|
|
87
91
|
contentClassName?: string;
|
|
92
|
+
/**
|
|
93
|
+
* Дополнительные пропсы на контейнер.
|
|
94
|
+
*/
|
|
95
|
+
containerProps?: HTMLAttributes<HTMLDivElement>;
|
|
88
96
|
/**
|
|
89
97
|
* Дополнительный класс
|
|
90
98
|
*/
|
|
@@ -134,6 +142,10 @@ type BottomSheetProps = {
|
|
|
134
142
|
* Слот справа
|
|
135
143
|
*/
|
|
136
144
|
rightAddons?: ReactNode;
|
|
145
|
+
/**
|
|
146
|
+
* Слот снизу
|
|
147
|
+
*/
|
|
148
|
+
bottomAddons?: ReactNode;
|
|
137
149
|
/**
|
|
138
150
|
* Наличие компонента крестика
|
|
139
151
|
*/
|
|
@@ -22,9 +22,9 @@ var styles__default = /*#__PURE__*/_interopDefaultLegacy(styles);
|
|
|
22
22
|
var styles__default$1 = /*#__PURE__*/_interopDefaultLegacy(styles$1);
|
|
23
23
|
|
|
24
24
|
var Header = function (_a) {
|
|
25
|
-
var _b, _c, _d, _e;
|
|
26
|
-
var title = _a.title, headerClassName = _a.headerClassName, addonClassName = _a.addonClassName, closerClassName = _a.closerClassName, backerClassName = _a.backerClassName, leftAddons = _a.leftAddons, rightAddons = _a.rightAddons, hasCloser = _a.hasCloser, hasBacker = _a.hasBacker, titleAlign = _a.titleAlign, trimTitle = _a.trimTitle, sticky = _a.sticky, onBack = _a.onBack;
|
|
27
|
-
var
|
|
25
|
+
var _b, _c, _d, _e, _f;
|
|
26
|
+
var title = _a.title, headerClassName = _a.headerClassName, addonClassName = _a.addonClassName, closerClassName = _a.closerClassName, backerClassName = _a.backerClassName, leftAddons = _a.leftAddons, rightAddons = _a.rightAddons, bottomAddons = _a.bottomAddons, hasCloser = _a.hasCloser, hasBacker = _a.hasBacker, titleAlign = _a.titleAlign, trimTitle = _a.trimTitle, sticky = _a.sticky, onBack = _a.onBack;
|
|
27
|
+
var _g = React.useContext(coreComponentsBaseModal.BaseModalContext), headerHighlighted = _g.headerHighlighted, setHasHeader = _g.setHasHeader, setHeaderOffset = _g.setHeaderOffset;
|
|
28
28
|
var hasLeftPart = hasBacker || leftAddons || titleAlign === 'center';
|
|
29
29
|
var hasRightPart = hasCloser || rightAddons || titleAlign === 'center';
|
|
30
30
|
var hasHeaderContent = title || hasBacker || hasCloser;
|
|
@@ -45,24 +45,27 @@ var Header = function (_a) {
|
|
|
45
45
|
_a[styles__default['default'].titleIndentRight] = !sticky && !titleAlignedCenter && hasRightPart,
|
|
46
46
|
_a));
|
|
47
47
|
};
|
|
48
|
-
return (React__default['default'].createElement("div", { className: cn__default['default'](styles__default['default'].
|
|
49
|
-
_b[styles__default['default'].justifyEnd] = !title,
|
|
48
|
+
return (React__default['default'].createElement("div", { className: cn__default['default'](styles__default['default'].headerWrapper, headerClassName, (_b = {},
|
|
50
49
|
_b[styles__default['default'].highlighted] = headerHighlighted && sticky,
|
|
51
50
|
_b[styles__default['default'].sticky] = sticky,
|
|
52
51
|
_b)) },
|
|
53
|
-
|
|
54
|
-
_c[styles__default['default'].
|
|
55
|
-
_c
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
52
|
+
React__default['default'].createElement("div", { className: cn__default['default'](styles__default['default'].header, headerClassName, (_c = {},
|
|
53
|
+
_c[styles__default['default'].justifyEnd] = !title,
|
|
54
|
+
_c)) },
|
|
55
|
+
hasLeftPart && (React__default['default'].createElement("div", { className: cn__default['default'](styles__default['default'].addon, addonClassName, (_d = {},
|
|
56
|
+
_d[styles__default['default'].addonFixed] = !sticky,
|
|
57
|
+
_d[styles__default['default'].addonLeft] = !sticky,
|
|
58
|
+
_d)) }, hasBacker ? (React__default['default'].createElement(components_backer_Component.Backer, { className: backerClassName, onClick: onBack })) : (leftAddons))),
|
|
59
|
+
hasHeaderContent && (React__default['default'].createElement(coreComponentsTypography.Typography.Text, { view: 'primary-large', weight: 'bold', className: cn__default['default'](styles__default['default'].title, getTitleIndent(), (_e = {},
|
|
60
|
+
_e[styles__default['default'].titleCenter] = titleAlign === 'center',
|
|
61
|
+
_e[styles__default['default'].titleLeft] = titleAlign === 'left',
|
|
62
|
+
_e[styles__default['default'].trimTitle] = trimTitle,
|
|
63
|
+
_e)), color: 'primary' }, title)),
|
|
64
|
+
hasRightPart && (React__default['default'].createElement("div", { className: cn__default['default'](styles__default['default'].addon, addonClassName, (_f = {},
|
|
65
|
+
_f[styles__default['default'].addonFixed] = !sticky,
|
|
66
|
+
_f[styles__default['default'].addonRight] = !sticky,
|
|
67
|
+
_f)) }, hasCloser ? React__default['default'].createElement(components_closer_Component.Closer, { className: closerClassName }) : rightAddons))),
|
|
68
|
+
bottomAddons));
|
|
66
69
|
};
|
|
67
70
|
|
|
68
71
|
var TIMEOUT = 300;
|
|
@@ -75,7 +78,7 @@ var HEADER_OFFSET = 24;
|
|
|
75
78
|
var CLOSE_OFFSET = 0.2;
|
|
76
79
|
var BottomSheet = React.forwardRef(function (_a, ref) {
|
|
77
80
|
var _b, _c, _d;
|
|
78
|
-
var open = _a.open, title = _a.title, actionButton = _a.actionButton, contentClassName = _a.contentClassName, containerClassName = _a.containerClassName, headerClassName = _a.headerClassName, footerClassName = _a.footerClassName, addonClassName = _a.addonClassName, closerClassName = _a.closerClassName, backerClassName = _a.backerClassName, className = _a.className, leftAddons = _a.leftAddons, rightAddons = _a.rightAddons, hasCloser = _a.hasCloser, hasBacker = _a.hasBacker, _e = _a.titleAlign, titleAlign = _e === void 0 ? 'left' : _e, trimTitle = _a.trimTitle, stickyHeader = _a.stickyHeader, _f = _a.stickyFooter, stickyFooter = _f === void 0 ? true : _f, _g = _a.initialHeight, initialHeight = _g === void 0 ? 'default' : _g, hideOverlay = _a.hideOverlay, hideHeader = _a.hideHeader, disableOverlayClick = _a.disableOverlayClick, children = _a.children, zIndex = _a.zIndex, _h = _a.transitionProps, transitionProps = _h === void 0 ? {} : _h, dataTestId = _a.dataTestId, _j = _a.swipeable, swipeable = _j === void 0 ? true : _j, _k = _a.ignoreScreenChange, ignoreScreenChange = _k === void 0 ? false : _k, onClose = _a.onClose, onBack = _a.onBack;
|
|
81
|
+
var open = _a.open, title = _a.title, actionButton = _a.actionButton, contentClassName = _a.contentClassName, containerClassName = _a.containerClassName, containerProps = _a.containerProps, headerClassName = _a.headerClassName, footerClassName = _a.footerClassName, addonClassName = _a.addonClassName, closerClassName = _a.closerClassName, backerClassName = _a.backerClassName, className = _a.className, leftAddons = _a.leftAddons, rightAddons = _a.rightAddons, bottomAddons = _a.bottomAddons, hasCloser = _a.hasCloser, hasBacker = _a.hasBacker, _e = _a.titleAlign, titleAlign = _e === void 0 ? 'left' : _e, trimTitle = _a.trimTitle, stickyHeader = _a.stickyHeader, _f = _a.stickyFooter, stickyFooter = _f === void 0 ? true : _f, _g = _a.initialHeight, initialHeight = _g === void 0 ? 'default' : _g, hideOverlay = _a.hideOverlay, hideHeader = _a.hideHeader, disableOverlayClick = _a.disableOverlayClick, children = _a.children, zIndex = _a.zIndex, _h = _a.transitionProps, transitionProps = _h === void 0 ? {} : _h, dataTestId = _a.dataTestId, _j = _a.swipeable, swipeable = _j === void 0 ? true : _j, _k = _a.ignoreScreenChange, ignoreScreenChange = _k === void 0 ? false : _k, onClose = _a.onClose, onBack = _a.onBack;
|
|
79
82
|
var _l = React.useState(0), sheetOffset = _l[0], setSheetOffset = _l[1];
|
|
80
83
|
var _m = React.useState(1), backdropOpacity = _m[0], setBackdropOpacity = _m[1];
|
|
81
84
|
var _o = React.useState(false), scrollLocked = _o[0], setScrollLocked = _o[1];
|
|
@@ -95,6 +98,7 @@ var BottomSheet = React.forwardRef(function (_a, ref) {
|
|
|
95
98
|
backerClassName: backerClassName,
|
|
96
99
|
leftAddons: leftAddons,
|
|
97
100
|
rightAddons: rightAddons,
|
|
101
|
+
bottomAddons: bottomAddons,
|
|
98
102
|
hasCloser: hasCloser,
|
|
99
103
|
hasBacker: hasBacker,
|
|
100
104
|
titleAlign: titleAlign,
|
|
@@ -163,12 +167,6 @@ var BottomSheet = React.forwardRef(function (_a, ref) {
|
|
|
163
167
|
};
|
|
164
168
|
var handleSheetSwiping = function (_a) {
|
|
165
169
|
var deltaY = _a.deltaY, initial = _a.initial;
|
|
166
|
-
/**
|
|
167
|
-
* Вернуть плавную анимацию шторке при свайпе
|
|
168
|
-
*/
|
|
169
|
-
if (transitionClassName === styles__default$1['default'].withZeroTransition) {
|
|
170
|
-
setTransitionClassName(styles__default$1['default'].withTransition);
|
|
171
|
-
}
|
|
172
170
|
var offsetY = initial[1];
|
|
173
171
|
if (shouldSkipSwiping(offsetY)) {
|
|
174
172
|
return;
|
|
@@ -182,6 +180,12 @@ var BottomSheet = React.forwardRef(function (_a, ref) {
|
|
|
182
180
|
*/
|
|
183
181
|
if (offset > 0) {
|
|
184
182
|
setScrollLocked(true);
|
|
183
|
+
/**
|
|
184
|
+
* Вернуть плавную анимацию шторке при свайпе
|
|
185
|
+
*/
|
|
186
|
+
if (transitionClassName === styles__default$1['default'].withZeroTransition) {
|
|
187
|
+
setTransitionClassName(styles__default$1['default'].withTransition);
|
|
188
|
+
}
|
|
185
189
|
}
|
|
186
190
|
};
|
|
187
191
|
var backdropSwipeablehandlers = reactSwipeable.useSwipeable({
|
|
@@ -235,9 +239,9 @@ var BottomSheet = React.forwardRef(function (_a, ref) {
|
|
|
235
239
|
React__default['default'].createElement("div", tslib_es6.__assign({ className: cn__default['default'](styles__default$1['default'].component, className, (_b = {},
|
|
236
240
|
_b[transitionClassName] = !sheetOffset,
|
|
237
241
|
_b)), style: tslib_es6.__assign(tslib_es6.__assign({}, getSwipeStyles()), getHeightStyles()) }, sheetSwipeablehandlers),
|
|
238
|
-
React__default['default'].createElement("div", { className: cn__default['default'](styles__default$1['default'].scrollableContainer, containerClassName, (_c = {},
|
|
242
|
+
React__default['default'].createElement("div", tslib_es6.__assign({}, containerProps, { className: cn__default['default'](styles__default$1['default'].scrollableContainer, containerProps === null || containerProps === void 0 ? void 0 : containerProps.className, containerClassName, (_c = {},
|
|
239
243
|
_c[styles__default$1['default'].scrollLocked] = scrollLocked,
|
|
240
|
-
_c)), ref: scrollableContainer },
|
|
244
|
+
_c)), ref: scrollableContainer }),
|
|
241
245
|
swipeable && React__default['default'].createElement("div", { className: cn__default['default'](styles__default$1['default'].marker) }),
|
|
242
246
|
!hideHeader && !emptyHeader && React__default['default'].createElement(Header, tslib_es6.__assign({}, headerProps)),
|
|
243
247
|
React__default['default'].createElement("div", { className: cn__default['default'](styles__default$1['default'].content, contentClassName, (_d = {},
|