@alfalab/core-components-bottom-sheet 4.1.5 → 4.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (40) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/dist/{component-08541c66.d.ts → component-a69ef39f.d.ts} +4 -0
  3. package/dist/{component-08541c66.js → component-a69ef39f.js} +24 -8
  4. package/dist/component.js +2 -2
  5. package/dist/components/backer/Component.js +1 -1
  6. package/dist/components/closer/Component.js +1 -1
  7. package/dist/components/header/Component.js +2 -2
  8. package/dist/components/swipeable-backdrop/Component.js +1 -1
  9. package/dist/{esm/component-4819d33f.d.ts → cssm/component-42c27971.d.ts} +4 -0
  10. package/dist/cssm/{component-d1b19e73.js → component-42c27971.js} +22 -6
  11. package/dist/cssm/component.js +1 -1
  12. package/dist/cssm/components/header/Component.js +1 -1
  13. package/dist/cssm/index.d.ts +1 -1
  14. package/dist/cssm/index.js +1 -1
  15. package/dist/cssm/index.module.css +3 -0
  16. package/dist/{cssm/component-d1b19e73.d.ts → esm/component-273ce79d.d.ts} +4 -0
  17. package/dist/esm/{component-4819d33f.js → component-273ce79d.js} +24 -8
  18. package/dist/esm/component.js +2 -2
  19. package/dist/esm/components/backer/Component.js +1 -1
  20. package/dist/esm/components/closer/Component.js +1 -1
  21. package/dist/esm/components/header/Component.js +2 -2
  22. package/dist/esm/components/swipeable-backdrop/Component.js +1 -1
  23. package/dist/esm/index.css +3 -0
  24. package/dist/esm/index.d.ts +1 -1
  25. package/dist/esm/index.js +2 -2
  26. package/dist/esm/{tslib.es6-06f08f9d.d.ts → tslib.es6-702aaccc.d.ts} +0 -0
  27. package/dist/esm/{tslib.es6-06f08f9d.js → tslib.es6-702aaccc.js} +0 -0
  28. package/dist/index.css +3 -0
  29. package/dist/index.d.ts +1 -1
  30. package/dist/index.js +2 -2
  31. package/dist/modern/{component-0900cda5.d.ts → component-17606fb9.d.ts} +4 -0
  32. package/dist/modern/{component-0900cda5.js → component-17606fb9.js} +20 -4
  33. package/dist/modern/component.js +1 -1
  34. package/dist/modern/components/header/Component.js +1 -1
  35. package/dist/modern/index.css +3 -0
  36. package/dist/modern/index.d.ts +1 -1
  37. package/dist/modern/index.js +1 -1
  38. package/dist/{tslib.es6-fb4ad0bd.d.ts → tslib.es6-cbd7f1a3.d.ts} +0 -0
  39. package/dist/{tslib.es6-fb4ad0bd.js → tslib.es6-cbd7f1a3.js} +0 -0
  40. package/package.json +2 -2
package/CHANGELOG.md CHANGED
@@ -3,6 +3,17 @@
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.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
+
8
+
9
+ ### Features
10
+
11
+ * **BottonSheet:** prop for controlling animation on screen size chan… ([#89](https://github.com/core-ds/core-components/issues/89)) ([a69e178](https://github.com/core-ds/core-components/commit/a69e17891d1fd91ba6f35bfc097ae1fc9cbf92df))
12
+
13
+
14
+
15
+
16
+
6
17
  ## [4.1.5](https://github.com/core-ds/core-components/compare/@alfalab/core-components-bottom-sheet@4.1.4...@alfalab/core-components-bottom-sheet@4.1.5) (2022-06-03)
7
18
 
8
19
  **Note:** Version bump only for package @alfalab/core-components-bottom-sheet
@@ -174,6 +174,10 @@ type BottomSheetProps = {
174
174
  * Запретить закрытие шторки кликом на оверлэй
175
175
  */
176
176
  disableOverlayClick?: boolean;
177
+ /**
178
+ * Не анимировать шторку при изменении размера вьюпорта
179
+ */
180
+ ignoreScreenChange?: boolean;
177
181
  /**
178
182
  * Обработчик закрытия
179
183
  */
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var tslib_es6 = require('./tslib.es6-fb4ad0bd.js');
3
+ var tslib_es6 = require('./tslib.es6-cbd7f1a3.js');
4
4
  var React = require('react');
5
5
  var cn = require('classnames');
6
6
  var reactDiv100vh = require('react-div-100vh');
@@ -64,7 +64,7 @@ var Header = function (_a) {
64
64
  _e)) }, hasCloser ? React__default['default'].createElement(components_closer_Component.Closer, { className: closerClassName }) : rightAddons))));
65
65
  };
66
66
 
67
- var styles$1 = {"modal":"bottom-sheet__modal_7hpwg","component":"bottom-sheet__component_7hpwg","withTransition":"bottom-sheet__withTransition_7hpwg","scrollableContainer":"bottom-sheet__scrollableContainer_7hpwg","marker":"bottom-sheet__marker_7hpwg","content":"bottom-sheet__content_7hpwg","noHeader":"bottom-sheet__noHeader_7hpwg","noFooter":"bottom-sheet__noFooter_7hpwg","scrollLocked":"bottom-sheet__scrollLocked_7hpwg","appear":"bottom-sheet__appear_7hpwg","enter":"bottom-sheet__enter_7hpwg","appearActive":"bottom-sheet__appearActive_7hpwg","enterActive":"bottom-sheet__enterActive_7hpwg","enterDone":"bottom-sheet__enterDone_7hpwg","appearDone":"bottom-sheet__appearDone_7hpwg","exit":"bottom-sheet__exit_7hpwg","exitActive":"bottom-sheet__exitActive_7hpwg"};
67
+ var styles$1 = {"modal":"bottom-sheet__modal_7hpwg","component":"bottom-sheet__component_7hpwg","withTransition":"bottom-sheet__withTransition_7hpwg","withZeroTransition":"bottom-sheet__withZeroTransition_7hpwg","scrollableContainer":"bottom-sheet__scrollableContainer_7hpwg","marker":"bottom-sheet__marker_7hpwg","content":"bottom-sheet__content_7hpwg","noHeader":"bottom-sheet__noHeader_7hpwg","noFooter":"bottom-sheet__noFooter_7hpwg","scrollLocked":"bottom-sheet__scrollLocked_7hpwg","appear":"bottom-sheet__appear_7hpwg","enter":"bottom-sheet__enter_7hpwg","appearActive":"bottom-sheet__appearActive_7hpwg","enterActive":"bottom-sheet__enterActive_7hpwg","enterDone":"bottom-sheet__enterDone_7hpwg","appearDone":"bottom-sheet__appearDone_7hpwg","exit":"bottom-sheet__exit_7hpwg","exitActive":"bottom-sheet__exitActive_7hpwg"};
68
68
  require('./index.css')
69
69
 
70
70
  var TIMEOUT = 300;
@@ -77,14 +77,15 @@ var HEADER_OFFSET = 24;
77
77
  var CLOSE_OFFSET = 0.2;
78
78
  var BottomSheet = React.forwardRef(function (_a, ref) {
79
79
  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, onClose = _a.onClose, onBack = _a.onBack;
81
- var _k = React.useState(0), sheetOffset = _k[0], setSheetOffset = _k[1];
82
- var _l = React.useState(1), backdropOpacity = _l[0], setBackdropOpacity = _l[1];
83
- var _m = React.useState(false), scrollLocked = _m[0], setScrollLocked = _m[1];
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;
81
+ var _l = React.useState(0), sheetOffset = _l[0], setSheetOffset = _l[1];
82
+ var _m = React.useState(1), backdropOpacity = _m[0], setBackdropOpacity = _m[1];
83
+ var _o = React.useState(false), scrollLocked = _o[0], setScrollLocked = _o[1];
84
84
  var sheetHeight = React.useRef(0);
85
85
  var scrollableContainer = React.useRef(null);
86
86
  var scrollableContainerScrollValue = React.useRef(0);
87
87
  var emptyHeader = !hasCloser && !hasBacker && !leftAddons && !rightAddons && !title;
88
+ var _p = React.useState(styles$1.withTransition), transitionClassName = _p[0], setTransitionClassName = _p[1];
88
89
  // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
89
90
  var fullHeight = reactDiv100vh.use100vh();
90
91
  var targetHeight = fullHeight - HEADER_OFFSET + "px";
@@ -148,6 +149,12 @@ var BottomSheet = React.forwardRef(function (_a, ref) {
148
149
  onClose();
149
150
  }
150
151
  else {
152
+ /**
153
+ * Установить мгновенную анимацию шторке если она не закрыта при свайпе и установлен проп ignoreScreenChange
154
+ */
155
+ if (ignoreScreenChange) {
156
+ setTransitionClassName(styles$1.withZeroTransition);
157
+ }
151
158
  setSheetOffset(0);
152
159
  setBackdropOpacity(1);
153
160
  }
@@ -158,6 +165,12 @@ var BottomSheet = React.forwardRef(function (_a, ref) {
158
165
  };
159
166
  var handleSheetSwiping = function (_a) {
160
167
  var deltaY = _a.deltaY, initial = _a.initial;
168
+ /**
169
+ * Вернуть плавную анимацию шторке при свайпе
170
+ */
171
+ if (transitionClassName === styles$1.withZeroTransition) {
172
+ setTransitionClassName(styles$1.withTransition);
173
+ }
161
174
  var offsetY = initial[1];
162
175
  if (shouldSkipSwiping(offsetY)) {
163
176
  return;
@@ -204,7 +217,10 @@ var BottomSheet = React.forwardRef(function (_a, ref) {
204
217
  if (!open) {
205
218
  setSheetOffset(0);
206
219
  }
207
- }, [open]);
220
+ if (ignoreScreenChange && open) {
221
+ setTransitionClassName(styles$1.withZeroTransition);
222
+ }
223
+ }, [open, ignoreScreenChange]);
208
224
  var getSwipeStyles = function () { return ({
209
225
  transform: sheetOffset ? "translateY(" + sheetOffset + "px)" : '',
210
226
  }); };
@@ -219,7 +235,7 @@ var BottomSheet = React.forwardRef(function (_a, ref) {
219
235
  invisible: initialHeight === 'full' ? false : hideOverlay,
220
236
  }, disableBackdropClick: hideOverlay ? true : disableOverlayClick, className: styles$1.modal, transitionProps: tslib_es6.__assign(tslib_es6.__assign({ appear: true, timeout: TIMEOUT, classNames: styles$1 }, transitionProps), { onExited: handleExited, onEntered: handleEntered }) },
221
237
  React__default['default'].createElement("div", tslib_es6.__assign({ className: cn__default['default'](styles$1.component, className, (_b = {},
222
- _b[styles$1.withTransition] = !sheetOffset,
238
+ _b[transitionClassName] = !sheetOffset,
223
239
  _b)), style: tslib_es6.__assign(tslib_es6.__assign({}, getSwipeStyles()), getHeightStyles()) }, sheetSwipeablehandlers),
224
240
  React__default['default'].createElement("div", { className: cn__default['default'](styles$1.scrollableContainer, containerClassName, (_c = {},
225
241
  _c[styles$1.scrollLocked] = scrollLocked,
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-fb4ad0bd.js');
5
+ require('./tslib.es6-cbd7f1a3.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-08541c66.js');
17
+ var components_header_Component = require('./component-a69ef39f.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-fb4ad0bd.js');
5
+ var tslib_es6 = require('../../tslib.es6-cbd7f1a3.js');
6
6
  var React = require('react');
7
7
  var cn = require('classnames');
8
8
  var coreComponentsIconButton = require('@alfalab/core-components-icon-button');
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var tslib_es6 = require('../../tslib.es6-fb4ad0bd.js');
5
+ var tslib_es6 = require('../../tslib.es6-cbd7f1a3.js');
6
6
  var React = require('react');
7
7
  var cn = require('classnames');
8
8
  var coreComponentsBaseModal = require('@alfalab/core-components-base-modal');
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- require('../../tslib.es6-fb4ad0bd.js');
5
+ require('../../tslib.es6-cbd7f1a3.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-08541c66.js');
17
+ var components_header_Component = require('../../component-a69ef39f.js');
18
18
  require('../footer/Component.js');
19
19
  require('@alfalab/core-components-backdrop');
20
20
  require('../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-fb4ad0bd.js');
5
+ var tslib_es6 = require('../../tslib.es6-cbd7f1a3.js');
6
6
  var React = require('react');
7
7
  var coreComponentsBackdrop = require('@alfalab/core-components-backdrop');
8
8
 
@@ -174,6 +174,10 @@ type BottomSheetProps = {
174
174
  * Запретить закрытие шторки кликом на оверлэй
175
175
  */
176
176
  disableOverlayClick?: boolean;
177
+ /**
178
+ * Не анимировать шторку при изменении размера вьюпорта
179
+ */
180
+ ignoreScreenChange?: boolean;
177
181
  /**
178
182
  * Обработчик закрытия
179
183
  */
@@ -75,14 +75,15 @@ var HEADER_OFFSET = 24;
75
75
  var CLOSE_OFFSET = 0.2;
76
76
  var BottomSheet = React.forwardRef(function (_a, ref) {
77
77
  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, onClose = _a.onClose, onBack = _a.onBack;
79
- var _k = React.useState(0), sheetOffset = _k[0], setSheetOffset = _k[1];
80
- var _l = React.useState(1), backdropOpacity = _l[0], setBackdropOpacity = _l[1];
81
- var _m = React.useState(false), scrollLocked = _m[0], setScrollLocked = _m[1];
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;
79
+ var _l = React.useState(0), sheetOffset = _l[0], setSheetOffset = _l[1];
80
+ var _m = React.useState(1), backdropOpacity = _m[0], setBackdropOpacity = _m[1];
81
+ var _o = React.useState(false), scrollLocked = _o[0], setScrollLocked = _o[1];
82
82
  var sheetHeight = React.useRef(0);
83
83
  var scrollableContainer = React.useRef(null);
84
84
  var scrollableContainerScrollValue = React.useRef(0);
85
85
  var emptyHeader = !hasCloser && !hasBacker && !leftAddons && !rightAddons && !title;
86
+ var _p = React.useState(styles__default$1['default'].withTransition), transitionClassName = _p[0], setTransitionClassName = _p[1];
86
87
  // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
87
88
  var fullHeight = reactDiv100vh.use100vh();
88
89
  var targetHeight = fullHeight - HEADER_OFFSET + "px";
@@ -146,6 +147,12 @@ var BottomSheet = React.forwardRef(function (_a, ref) {
146
147
  onClose();
147
148
  }
148
149
  else {
150
+ /**
151
+ * Установить мгновенную анимацию шторке если она не закрыта при свайпе и установлен проп ignoreScreenChange
152
+ */
153
+ if (ignoreScreenChange) {
154
+ setTransitionClassName(styles__default$1['default'].withZeroTransition);
155
+ }
149
156
  setSheetOffset(0);
150
157
  setBackdropOpacity(1);
151
158
  }
@@ -156,6 +163,12 @@ var BottomSheet = React.forwardRef(function (_a, ref) {
156
163
  };
157
164
  var handleSheetSwiping = function (_a) {
158
165
  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
+ }
159
172
  var offsetY = initial[1];
160
173
  if (shouldSkipSwiping(offsetY)) {
161
174
  return;
@@ -202,7 +215,10 @@ var BottomSheet = React.forwardRef(function (_a, ref) {
202
215
  if (!open) {
203
216
  setSheetOffset(0);
204
217
  }
205
- }, [open]);
218
+ if (ignoreScreenChange && open) {
219
+ setTransitionClassName(styles__default$1['default'].withZeroTransition);
220
+ }
221
+ }, [open, ignoreScreenChange]);
206
222
  var getSwipeStyles = function () { return ({
207
223
  transform: sheetOffset ? "translateY(" + sheetOffset + "px)" : '',
208
224
  }); };
@@ -217,7 +233,7 @@ var BottomSheet = React.forwardRef(function (_a, ref) {
217
233
  invisible: initialHeight === 'full' ? false : hideOverlay,
218
234
  }, disableBackdropClick: hideOverlay ? true : disableOverlayClick, className: styles__default$1['default'].modal, transitionProps: tslib_es6.__assign(tslib_es6.__assign({ appear: true, timeout: TIMEOUT, classNames: styles__default$1['default'] }, transitionProps), { onExited: handleExited, onEntered: handleEntered }) },
219
235
  React__default['default'].createElement("div", tslib_es6.__assign({ className: cn__default['default'](styles__default$1['default'].component, className, (_b = {},
220
- _b[styles__default$1['default'].withTransition] = !sheetOffset,
236
+ _b[transitionClassName] = !sheetOffset,
221
237
  _b)), style: tslib_es6.__assign(tslib_es6.__assign({}, getSwipeStyles()), getHeightStyles()) }, sheetSwipeablehandlers),
222
238
  React__default['default'].createElement("div", { className: cn__default['default'](styles__default$1['default'].scrollableContainer, containerClassName, (_c = {},
223
239
  _c[styles__default$1['default'].scrollLocked] = scrollLocked,
@@ -17,7 +17,7 @@ require('@alfalab/icons-glyph/ArrowBackMIcon');
17
17
  require('./components/backer/index.module.css');
18
18
  require('./components/backer/Component.js');
19
19
  require('./components/header/index.module.css');
20
- var components_header_Component = require('./component-d1b19e73.js');
20
+ var components_header_Component = require('./component-42c27971.js');
21
21
  require('./components/footer/index.module.css');
22
22
  require('./components/footer/Component.js');
23
23
  require('@alfalab/core-components-backdrop/dist/cssm');
@@ -17,7 +17,7 @@ require('@alfalab/icons-glyph/ArrowBackMIcon');
17
17
  require('../backer/index.module.css');
18
18
  require('../backer/Component.js');
19
19
  require('./index.module.css');
20
- var components_header_Component = require('../../component-d1b19e73.js');
20
+ var components_header_Component = require('../../component-42c27971.js');
21
21
  require('../footer/index.module.css');
22
22
  require('../footer/Component.js');
23
23
  require('@alfalab/core-components-backdrop/dist/cssm');
@@ -1 +1 @@
1
- export * from "./component-d1b19e73";
1
+ export * from "./component-42c27971";
@@ -17,7 +17,7 @@ require('@alfalab/icons-glyph/ArrowBackMIcon');
17
17
  require('./components/backer/index.module.css');
18
18
  require('./components/backer/Component.js');
19
19
  require('./components/header/index.module.css');
20
- var components_header_Component = require('./component-d1b19e73.js');
20
+ var components_header_Component = require('./component-42c27971.js');
21
21
  require('./components/footer/index.module.css');
22
22
  require('./components/footer/Component.js');
23
23
  require('@alfalab/core-components-backdrop/dist/cssm');
@@ -43,6 +43,9 @@
43
43
  .withTransition {
44
44
  transition: var(--bottom-sheet-out-transition);
45
45
  }
46
+ .withZeroTransition {
47
+ transition: 0s linear;
48
+ }
46
49
  .scrollableContainer {
47
50
  overflow: auto;
48
51
  display: flex;
@@ -174,6 +174,10 @@ type BottomSheetProps = {
174
174
  * Запретить закрытие шторки кликом на оверлэй
175
175
  */
176
176
  disableOverlayClick?: boolean;
177
+ /**
178
+ * Не анимировать шторку при изменении размера вьюпорта
179
+ */
180
+ ignoreScreenChange?: boolean;
177
181
  /**
178
182
  * Обработчик закрытия
179
183
  */
@@ -1,4 +1,4 @@
1
- import { _ as __assign } from './tslib.es6-06f08f9d.js';
1
+ import { _ as __assign } from './tslib.es6-702aaccc.js';
2
2
  import React, { useContext, useEffect, forwardRef, useState, useRef, useCallback } from 'react';
3
3
  import cn from 'classnames';
4
4
  import { use100vh } from 'react-div-100vh';
@@ -57,7 +57,7 @@ var Header = function (_a) {
57
57
  _e)) }, hasCloser ? React.createElement(Closer, { className: closerClassName }) : rightAddons))));
58
58
  };
59
59
 
60
- var styles$1 = {"modal":"bottom-sheet__modal_7hpwg","component":"bottom-sheet__component_7hpwg","withTransition":"bottom-sheet__withTransition_7hpwg","scrollableContainer":"bottom-sheet__scrollableContainer_7hpwg","marker":"bottom-sheet__marker_7hpwg","content":"bottom-sheet__content_7hpwg","noHeader":"bottom-sheet__noHeader_7hpwg","noFooter":"bottom-sheet__noFooter_7hpwg","scrollLocked":"bottom-sheet__scrollLocked_7hpwg","appear":"bottom-sheet__appear_7hpwg","enter":"bottom-sheet__enter_7hpwg","appearActive":"bottom-sheet__appearActive_7hpwg","enterActive":"bottom-sheet__enterActive_7hpwg","enterDone":"bottom-sheet__enterDone_7hpwg","appearDone":"bottom-sheet__appearDone_7hpwg","exit":"bottom-sheet__exit_7hpwg","exitActive":"bottom-sheet__exitActive_7hpwg"};
60
+ var styles$1 = {"modal":"bottom-sheet__modal_7hpwg","component":"bottom-sheet__component_7hpwg","withTransition":"bottom-sheet__withTransition_7hpwg","withZeroTransition":"bottom-sheet__withZeroTransition_7hpwg","scrollableContainer":"bottom-sheet__scrollableContainer_7hpwg","marker":"bottom-sheet__marker_7hpwg","content":"bottom-sheet__content_7hpwg","noHeader":"bottom-sheet__noHeader_7hpwg","noFooter":"bottom-sheet__noFooter_7hpwg","scrollLocked":"bottom-sheet__scrollLocked_7hpwg","appear":"bottom-sheet__appear_7hpwg","enter":"bottom-sheet__enter_7hpwg","appearActive":"bottom-sheet__appearActive_7hpwg","enterActive":"bottom-sheet__enterActive_7hpwg","enterDone":"bottom-sheet__enterDone_7hpwg","appearDone":"bottom-sheet__appearDone_7hpwg","exit":"bottom-sheet__exit_7hpwg","exitActive":"bottom-sheet__exitActive_7hpwg"};
61
61
  require('./index.css')
62
62
 
63
63
  var TIMEOUT = 300;
@@ -70,14 +70,15 @@ var HEADER_OFFSET = 24;
70
70
  var CLOSE_OFFSET = 0.2;
71
71
  var BottomSheet = forwardRef(function (_a, ref) {
72
72
  var _b, _c, _d;
73
- 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, onClose = _a.onClose, onBack = _a.onBack;
74
- var _k = useState(0), sheetOffset = _k[0], setSheetOffset = _k[1];
75
- var _l = useState(1), backdropOpacity = _l[0], setBackdropOpacity = _l[1];
76
- var _m = useState(false), scrollLocked = _m[0], setScrollLocked = _m[1];
73
+ 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;
74
+ var _l = useState(0), sheetOffset = _l[0], setSheetOffset = _l[1];
75
+ var _m = useState(1), backdropOpacity = _m[0], setBackdropOpacity = _m[1];
76
+ var _o = useState(false), scrollLocked = _o[0], setScrollLocked = _o[1];
77
77
  var sheetHeight = useRef(0);
78
78
  var scrollableContainer = useRef(null);
79
79
  var scrollableContainerScrollValue = useRef(0);
80
80
  var emptyHeader = !hasCloser && !hasBacker && !leftAddons && !rightAddons && !title;
81
+ var _p = useState(styles$1.withTransition), transitionClassName = _p[0], setTransitionClassName = _p[1];
81
82
  // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
82
83
  var fullHeight = use100vh();
83
84
  var targetHeight = fullHeight - HEADER_OFFSET + "px";
@@ -141,6 +142,12 @@ var BottomSheet = forwardRef(function (_a, ref) {
141
142
  onClose();
142
143
  }
143
144
  else {
145
+ /**
146
+ * Установить мгновенную анимацию шторке если она не закрыта при свайпе и установлен проп ignoreScreenChange
147
+ */
148
+ if (ignoreScreenChange) {
149
+ setTransitionClassName(styles$1.withZeroTransition);
150
+ }
144
151
  setSheetOffset(0);
145
152
  setBackdropOpacity(1);
146
153
  }
@@ -151,6 +158,12 @@ var BottomSheet = forwardRef(function (_a, ref) {
151
158
  };
152
159
  var handleSheetSwiping = function (_a) {
153
160
  var deltaY = _a.deltaY, initial = _a.initial;
161
+ /**
162
+ * Вернуть плавную анимацию шторке при свайпе
163
+ */
164
+ if (transitionClassName === styles$1.withZeroTransition) {
165
+ setTransitionClassName(styles$1.withTransition);
166
+ }
154
167
  var offsetY = initial[1];
155
168
  if (shouldSkipSwiping(offsetY)) {
156
169
  return;
@@ -197,7 +210,10 @@ var BottomSheet = forwardRef(function (_a, ref) {
197
210
  if (!open) {
198
211
  setSheetOffset(0);
199
212
  }
200
- }, [open]);
213
+ if (ignoreScreenChange && open) {
214
+ setTransitionClassName(styles$1.withZeroTransition);
215
+ }
216
+ }, [open, ignoreScreenChange]);
201
217
  var getSwipeStyles = function () { return ({
202
218
  transform: sheetOffset ? "translateY(" + sheetOffset + "px)" : '',
203
219
  }); };
@@ -212,7 +228,7 @@ var BottomSheet = forwardRef(function (_a, ref) {
212
228
  invisible: initialHeight === 'full' ? false : hideOverlay,
213
229
  }, disableBackdropClick: hideOverlay ? true : disableOverlayClick, className: styles$1.modal, transitionProps: __assign(__assign({ appear: true, timeout: TIMEOUT, classNames: styles$1 }, transitionProps), { onExited: handleExited, onEntered: handleEntered }) },
214
230
  React.createElement("div", __assign({ className: cn(styles$1.component, className, (_b = {},
215
- _b[styles$1.withTransition] = !sheetOffset,
231
+ _b[transitionClassName] = !sheetOffset,
216
232
  _b)), style: __assign(__assign({}, getSwipeStyles()), getHeightStyles()) }, sheetSwipeablehandlers),
217
233
  React.createElement("div", { className: cn(styles$1.scrollableContainer, containerClassName, (_c = {},
218
234
  _c[styles$1.scrollLocked] = scrollLocked,
@@ -1,4 +1,4 @@
1
- import './tslib.es6-06f08f9d.js';
1
+ import './tslib.es6-702aaccc.js';
2
2
  import 'react';
3
3
  import 'classnames';
4
4
  import 'react-div-100vh';
@@ -10,7 +10,7 @@ import '@alfalab/icons-glyph/CrossMIcon';
10
10
  import './components/closer/Component.js';
11
11
  import '@alfalab/icons-glyph/ArrowBackMIcon';
12
12
  import './components/backer/Component.js';
13
- export { B as BottomSheet, C as CLOSE_OFFSET, H as HEADER_OFFSET } from './component-4819d33f.js';
13
+ export { B as BottomSheet, C as CLOSE_OFFSET, H as HEADER_OFFSET } from './component-273ce79d.js';
14
14
  import './components/footer/Component.js';
15
15
  import '@alfalab/core-components-backdrop/dist/esm';
16
16
  import './components/swipeable-backdrop/Component.js';
@@ -1,4 +1,4 @@
1
- import { a as __rest, _ as __assign } from '../../tslib.es6-06f08f9d.js';
1
+ import { a as __rest, _ as __assign } from '../../tslib.es6-702aaccc.js';
2
2
  import React from 'react';
3
3
  import cn from 'classnames';
4
4
  import { IconButton } from '@alfalab/core-components-icon-button/dist/esm';
@@ -1,4 +1,4 @@
1
- import { a as __rest, _ as __assign } from '../../tslib.es6-06f08f9d.js';
1
+ import { a as __rest, _ as __assign } from '../../tslib.es6-702aaccc.js';
2
2
  import React, { useContext, useCallback } from 'react';
3
3
  import cn from 'classnames';
4
4
  import { BaseModalContext } from '@alfalab/core-components-base-modal/dist/esm';
@@ -1,4 +1,4 @@
1
- import '../../tslib.es6-06f08f9d.js';
1
+ import '../../tslib.es6-702aaccc.js';
2
2
  import 'react';
3
3
  import 'classnames';
4
4
  import 'react-div-100vh';
@@ -10,7 +10,7 @@ import '@alfalab/icons-glyph/CrossMIcon';
10
10
  import '../closer/Component.js';
11
11
  import '@alfalab/icons-glyph/ArrowBackMIcon';
12
12
  import '../backer/Component.js';
13
- export { a as Header } from '../../component-4819d33f.js';
13
+ export { a as Header } from '../../component-273ce79d.js';
14
14
  import '../footer/Component.js';
15
15
  import '@alfalab/core-components-backdrop/dist/esm';
16
16
  import '../swipeable-backdrop/Component.js';
@@ -1,4 +1,4 @@
1
- import { a as __rest, _ as __assign } from '../../tslib.es6-06f08f9d.js';
1
+ import { a as __rest, _ as __assign } from '../../tslib.es6-702aaccc.js';
2
2
  import React from 'react';
3
3
  import { Backdrop } from '@alfalab/core-components-backdrop/dist/esm';
4
4
 
@@ -44,6 +44,9 @@
44
44
  .bottom-sheet__withTransition_7hpwg {
45
45
  transition: var(--bottom-sheet-out-transition);
46
46
  }
47
+ .bottom-sheet__withZeroTransition_7hpwg {
48
+ transition: 0s linear;
49
+ }
47
50
  .bottom-sheet__scrollableContainer_7hpwg {
48
51
  overflow: auto;
49
52
  display: flex;
@@ -1 +1 @@
1
- export * from "./component-4819d33f";
1
+ export * from "./component-273ce79d";
package/dist/esm/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import './tslib.es6-06f08f9d.js';
1
+ import './tslib.es6-702aaccc.js';
2
2
  import 'react';
3
3
  import 'classnames';
4
4
  import 'react-div-100vh';
@@ -10,7 +10,7 @@ import '@alfalab/icons-glyph/CrossMIcon';
10
10
  import './components/closer/Component.js';
11
11
  import '@alfalab/icons-glyph/ArrowBackMIcon';
12
12
  import './components/backer/Component.js';
13
- export { B as BottomSheet, C as CLOSE_OFFSET, H as HEADER_OFFSET } from './component-4819d33f.js';
13
+ export { B as BottomSheet, C as CLOSE_OFFSET, H as HEADER_OFFSET } from './component-273ce79d.js';
14
14
  import './components/footer/Component.js';
15
15
  import '@alfalab/core-components-backdrop/dist/esm';
16
16
  import './components/swipeable-backdrop/Component.js';
package/dist/index.css CHANGED
@@ -44,6 +44,9 @@
44
44
  .bottom-sheet__withTransition_7hpwg {
45
45
  transition: var(--bottom-sheet-out-transition);
46
46
  }
47
+ .bottom-sheet__withZeroTransition_7hpwg {
48
+ transition: 0s linear;
49
+ }
47
50
  .bottom-sheet__scrollableContainer_7hpwg {
48
51
  overflow: auto;
49
52
  display: flex;
package/dist/index.d.ts CHANGED
@@ -1 +1 @@
1
- export * from "./component-08541c66";
1
+ export * from "./component-a69ef39f";
package/dist/index.js CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- require('./tslib.es6-fb4ad0bd.js');
5
+ require('./tslib.es6-cbd7f1a3.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-08541c66.js');
17
+ var components_header_Component = require('./component-a69ef39f.js');
18
18
  require('./components/footer/Component.js');
19
19
  require('@alfalab/core-components-backdrop');
20
20
  require('./components/swipeable-backdrop/Component.js');
@@ -174,6 +174,10 @@ type BottomSheetProps = {
174
174
  * Запретить закрытие шторки кликом на оверлэй
175
175
  */
176
176
  disableOverlayClick?: boolean;
177
+ /**
178
+ * Не анимировать шторку при изменении размера вьюпорта
179
+ */
180
+ ignoreScreenChange?: boolean;
177
181
  /**
178
182
  * Обработчик закрытия
179
183
  */
@@ -53,7 +53,7 @@ const Header = ({ title, headerClassName, addonClassName, closerClassName, backe
53
53
  }) }, hasCloser ? React.createElement(Closer, { className: closerClassName }) : rightAddons))));
54
54
  };
55
55
 
56
- var styles$1 = {"modal":"bottom-sheet__modal_7hpwg","component":"bottom-sheet__component_7hpwg","withTransition":"bottom-sheet__withTransition_7hpwg","scrollableContainer":"bottom-sheet__scrollableContainer_7hpwg","marker":"bottom-sheet__marker_7hpwg","content":"bottom-sheet__content_7hpwg","noHeader":"bottom-sheet__noHeader_7hpwg","noFooter":"bottom-sheet__noFooter_7hpwg","scrollLocked":"bottom-sheet__scrollLocked_7hpwg","appear":"bottom-sheet__appear_7hpwg","enter":"bottom-sheet__enter_7hpwg","appearActive":"bottom-sheet__appearActive_7hpwg","enterActive":"bottom-sheet__enterActive_7hpwg","enterDone":"bottom-sheet__enterDone_7hpwg","appearDone":"bottom-sheet__appearDone_7hpwg","exit":"bottom-sheet__exit_7hpwg","exitActive":"bottom-sheet__exitActive_7hpwg"};
56
+ var styles$1 = {"modal":"bottom-sheet__modal_7hpwg","component":"bottom-sheet__component_7hpwg","withTransition":"bottom-sheet__withTransition_7hpwg","withZeroTransition":"bottom-sheet__withZeroTransition_7hpwg","scrollableContainer":"bottom-sheet__scrollableContainer_7hpwg","marker":"bottom-sheet__marker_7hpwg","content":"bottom-sheet__content_7hpwg","noHeader":"bottom-sheet__noHeader_7hpwg","noFooter":"bottom-sheet__noFooter_7hpwg","scrollLocked":"bottom-sheet__scrollLocked_7hpwg","appear":"bottom-sheet__appear_7hpwg","enter":"bottom-sheet__enter_7hpwg","appearActive":"bottom-sheet__appearActive_7hpwg","enterActive":"bottom-sheet__enterActive_7hpwg","enterDone":"bottom-sheet__enterDone_7hpwg","appearDone":"bottom-sheet__appearDone_7hpwg","exit":"bottom-sheet__exit_7hpwg","exitActive":"bottom-sheet__exitActive_7hpwg"};
57
57
  require('./index.css')
58
58
 
59
59
  const TIMEOUT = 300;
@@ -64,7 +64,7 @@ const MARKET_HEIGHT = 24;
64
64
  /* Верхний отступ шторки, если она открыта на максимальную высоту */
65
65
  const HEADER_OFFSET = 24;
66
66
  const CLOSE_OFFSET = 0.2;
67
- const BottomSheet = forwardRef(({ open, title, actionButton, contentClassName, containerClassName, headerClassName, footerClassName, addonClassName, closerClassName, backerClassName, className, leftAddons, rightAddons, hasCloser, hasBacker, titleAlign = 'left', trimTitle, stickyHeader, stickyFooter = true, initialHeight = 'default', hideOverlay, hideHeader, disableOverlayClick, children, zIndex, transitionProps = {}, dataTestId, swipeable = true, onClose, onBack, }, ref) => {
67
+ const BottomSheet = forwardRef(({ open, title, actionButton, contentClassName, containerClassName, headerClassName, footerClassName, addonClassName, closerClassName, backerClassName, className, leftAddons, rightAddons, hasCloser, hasBacker, titleAlign = 'left', trimTitle, stickyHeader, stickyFooter = true, initialHeight = 'default', hideOverlay, hideHeader, disableOverlayClick, children, zIndex, transitionProps = {}, dataTestId, swipeable = true, ignoreScreenChange = false, onClose, onBack, }, ref) => {
68
68
  const [sheetOffset, setSheetOffset] = useState(0);
69
69
  const [backdropOpacity, setBackdropOpacity] = useState(1);
70
70
  const [scrollLocked, setScrollLocked] = useState(false);
@@ -72,6 +72,7 @@ const BottomSheet = forwardRef(({ open, title, actionButton, contentClassName, c
72
72
  const scrollableContainer = useRef(null);
73
73
  const scrollableContainerScrollValue = useRef(0);
74
74
  const emptyHeader = !hasCloser && !hasBacker && !leftAddons && !rightAddons && !title;
75
+ const [transitionClassName, setTransitionClassName] = useState(styles$1.withTransition);
75
76
  // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
76
77
  const fullHeight = use100vh();
77
78
  const targetHeight = `${fullHeight - HEADER_OFFSET}px`;
@@ -133,6 +134,12 @@ const BottomSheet = forwardRef(({ open, title, actionButton, contentClassName, c
133
134
  onClose();
134
135
  }
135
136
  else {
137
+ /**
138
+ * Установить мгновенную анимацию шторке если она не закрыта при свайпе и установлен проп ignoreScreenChange
139
+ */
140
+ if (ignoreScreenChange) {
141
+ setTransitionClassName(styles$1.withZeroTransition);
142
+ }
136
143
  setSheetOffset(0);
137
144
  setBackdropOpacity(1);
138
145
  }
@@ -142,6 +149,12 @@ const BottomSheet = forwardRef(({ open, title, actionButton, contentClassName, c
142
149
  scrollableContainerScrollValue.current = 0;
143
150
  };
144
151
  const handleSheetSwiping = ({ deltaY, initial }) => {
152
+ /**
153
+ * Вернуть плавную анимацию шторке при свайпе
154
+ */
155
+ if (transitionClassName === styles$1.withZeroTransition) {
156
+ setTransitionClassName(styles$1.withTransition);
157
+ }
145
158
  const offsetY = initial[1];
146
159
  if (shouldSkipSwiping(offsetY)) {
147
160
  return;
@@ -188,7 +201,10 @@ const BottomSheet = forwardRef(({ open, title, actionButton, contentClassName, c
188
201
  if (!open) {
189
202
  setSheetOffset(0);
190
203
  }
191
- }, [open]);
204
+ if (ignoreScreenChange && open) {
205
+ setTransitionClassName(styles$1.withZeroTransition);
206
+ }
207
+ }, [open, ignoreScreenChange]);
192
208
  const getSwipeStyles = () => ({
193
209
  transform: sheetOffset ? `translateY(${sheetOffset}px)` : '',
194
210
  });
@@ -210,7 +226,7 @@ const BottomSheet = forwardRef(({ open, title, actionButton, contentClassName, c
210
226
  onEntered: handleEntered,
211
227
  } },
212
228
  React.createElement("div", Object.assign({ className: cn(styles$1.component, className, {
213
- [styles$1.withTransition]: !sheetOffset,
229
+ [transitionClassName]: !sheetOffset,
214
230
  }), style: {
215
231
  ...getSwipeStyles(),
216
232
  ...getHeightStyles(),
@@ -9,7 +9,7 @@ import '@alfalab/icons-glyph/CrossMIcon';
9
9
  import './components/closer/Component.js';
10
10
  import '@alfalab/icons-glyph/ArrowBackMIcon';
11
11
  import './components/backer/Component.js';
12
- export { B as BottomSheet, C as CLOSE_OFFSET, H as HEADER_OFFSET } from './component-0900cda5.js';
12
+ export { B as BottomSheet, C as CLOSE_OFFSET, H as HEADER_OFFSET } from './component-17606fb9.js';
13
13
  import './components/footer/Component.js';
14
14
  import '@alfalab/core-components-backdrop/dist/modern';
15
15
  import './components/swipeable-backdrop/Component.js';
@@ -9,7 +9,7 @@ import '@alfalab/icons-glyph/CrossMIcon';
9
9
  import '../closer/Component.js';
10
10
  import '@alfalab/icons-glyph/ArrowBackMIcon';
11
11
  import '../backer/Component.js';
12
- export { a as Header } from '../../component-0900cda5.js';
12
+ export { a as Header } from '../../component-17606fb9.js';
13
13
  import '../footer/Component.js';
14
14
  import '@alfalab/core-components-backdrop/dist/modern';
15
15
  import '../swipeable-backdrop/Component.js';
@@ -44,6 +44,9 @@
44
44
  .bottom-sheet__withTransition_7hpwg {
45
45
  transition: var(--bottom-sheet-out-transition);
46
46
  }
47
+ .bottom-sheet__withZeroTransition_7hpwg {
48
+ transition: 0s linear;
49
+ }
47
50
  .bottom-sheet__scrollableContainer_7hpwg {
48
51
  overflow: auto;
49
52
  display: flex;
@@ -1 +1 @@
1
- export * from "./component-0900cda5";
1
+ export * from "./component-17606fb9";
@@ -9,7 +9,7 @@ import '@alfalab/icons-glyph/CrossMIcon';
9
9
  import './components/closer/Component.js';
10
10
  import '@alfalab/icons-glyph/ArrowBackMIcon';
11
11
  import './components/backer/Component.js';
12
- export { B as BottomSheet, C as CLOSE_OFFSET, H as HEADER_OFFSET } from './component-0900cda5.js';
12
+ export { B as BottomSheet, C as CLOSE_OFFSET, H as HEADER_OFFSET } from './component-17606fb9.js';
13
13
  import './components/footer/Component.js';
14
14
  import '@alfalab/core-components-backdrop/dist/modern';
15
15
  import './components/swipeable-backdrop/Component.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alfalab/core-components-bottom-sheet",
3
- "version": "4.1.5",
3
+ "version": "4.2.0",
4
4
  "description": "Bottom sheet mobile component",
5
5
  "keywords": [],
6
6
  "license": "MIT",
@@ -29,5 +29,5 @@
29
29
  "react-swipeable": "5.5.1",
30
30
  "react-transition-group": "4.4.1"
31
31
  },
32
- "gitHead": "d86d1207351d2e8dceb0519cbb0b64c06aaa6884"
32
+ "gitHead": "dc4aed3c70aced5d10e29f0abbd47429784860f0"
33
33
  }