@alfalab/core-components-bottom-sheet 5.2.2 → 5.3.1

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 (60) hide show
  1. package/{component-a31768c8.d.ts → component-7f6ec6ba.d.ts} +5 -1
  2. package/{component-a31768c8.js → component-7f6ec6ba.js} +16 -14
  3. package/component.js +3 -2
  4. package/components/backer/Component.js +4 -4
  5. package/components/backer/index.css +3 -3
  6. package/components/closer/Component.js +4 -4
  7. package/components/closer/index.css +3 -3
  8. package/components/footer/Component.js +1 -1
  9. package/components/footer/index.css +4 -4
  10. package/components/header/Component.js +3 -2
  11. package/components/header/index.css +17 -17
  12. package/components/swipeable-backdrop/Component.js +4 -4
  13. package/{esm/component-13675fe5.d.ts → cssm/component-8a02e7db.d.ts} +5 -1
  14. package/cssm/{component-082df5fd.js → component-8a02e7db.js} +14 -12
  15. package/cssm/component.js +3 -2
  16. package/cssm/components/backer/Component.js +3 -3
  17. package/cssm/components/closer/Component.js +3 -3
  18. package/cssm/components/header/Component.js +3 -2
  19. package/cssm/components/swipeable-backdrop/Component.js +4 -4
  20. package/cssm/index.d.ts +1 -1
  21. package/cssm/index.js +3 -2
  22. package/{cssm/component-082df5fd.d.ts → esm/component-9a8081cd.d.ts} +5 -1
  23. package/esm/{component-13675fe5.js → component-9a8081cd.js} +9 -8
  24. package/esm/component.js +3 -2
  25. package/esm/components/backer/Component.js +2 -2
  26. package/esm/components/backer/index.css +3 -3
  27. package/esm/components/closer/Component.js +2 -2
  28. package/esm/components/closer/index.css +3 -3
  29. package/esm/components/footer/Component.js +1 -1
  30. package/esm/components/footer/index.css +4 -4
  31. package/esm/components/header/Component.js +3 -2
  32. package/esm/components/header/index.css +17 -17
  33. package/esm/components/swipeable-backdrop/Component.js +1 -1
  34. package/esm/index.css +15 -15
  35. package/esm/index.d.ts +1 -1
  36. package/esm/index.js +3 -2
  37. package/index.css +15 -15
  38. package/index.d.ts +1 -1
  39. package/index.js +3 -2
  40. package/modern/{component-dbd4ab19.d.ts → component-6012913e.d.ts} +5 -1
  41. package/modern/{component-dbd4ab19.js → component-6012913e.js} +5 -4
  42. package/modern/component.js +2 -1
  43. package/modern/components/backer/Component.js +1 -1
  44. package/modern/components/backer/index.css +3 -3
  45. package/modern/components/closer/Component.js +1 -1
  46. package/modern/components/closer/index.css +3 -3
  47. package/modern/components/footer/Component.js +1 -1
  48. package/modern/components/footer/index.css +4 -4
  49. package/modern/components/header/Component.js +2 -1
  50. package/modern/components/header/index.css +17 -17
  51. package/modern/index.css +15 -15
  52. package/modern/index.d.ts +1 -1
  53. package/modern/index.js +2 -1
  54. package/package.json +8 -6
  55. package/cssm/tslib.es6-bbd6cd2a.d.ts +0 -36
  56. package/cssm/tslib.es6-bbd6cd2a.js +0 -42
  57. package/esm/tslib.es6-c1a8448e.d.ts +0 -36
  58. package/esm/tslib.es6-c1a8448e.js +0 -40
  59. package/tslib.es6-f62bcae9.d.ts +0 -36
  60. package/tslib.es6-f62bcae9.js +0 -42
@@ -1,6 +1,7 @@
1
- import { _ as __assign } from './tslib.es6-c1a8448e.js';
1
+ import { __assign } from 'tslib';
2
2
  import React, { useContext, useEffect, forwardRef, useState, useRef, useCallback } from 'react';
3
3
  import { use100vh } from 'react-div-100vh';
4
+ import mergeRefs from 'react-merge-refs';
4
5
  import { useSwipeable } from 'react-swipeable';
5
6
  import cn from 'classnames';
6
7
  import { BaseModalContext, BaseModal } from '@alfalab/core-components-base-modal/esm';
@@ -15,7 +16,7 @@ var getDataTestId = function (dataTestId, element) {
15
16
  return dataTestId ? "".concat(dataTestId).concat(elementPart) : undefined;
16
17
  };
17
18
 
18
- var styles$1 = {"headerWrapper":"bottom-sheet__headerWrapper_1uguw","header":"bottom-sheet__header_1uguw","sticky":"bottom-sheet__sticky_1uguw","highlighted":"bottom-sheet__highlighted_1uguw","justifyEnd":"bottom-sheet__justifyEnd_1uguw","addon":"bottom-sheet__addon_1uguw","addonFixed":"bottom-sheet__addonFixed_1uguw","addonLeft":"bottom-sheet__addonLeft_1uguw","addonRight":"bottom-sheet__addonRight_1uguw","title":"bottom-sheet__title_1uguw","titleCenter":"bottom-sheet__titleCenter_1uguw","titleLeft":"bottom-sheet__titleLeft_1uguw","trimTitle":"bottom-sheet__trimTitle_1uguw","titleBigIndentHorizontal":"bottom-sheet__titleBigIndentHorizontal_1uguw","titleIndentRight":"bottom-sheet__titleIndentRight_1uguw","titleIndentLeft":"bottom-sheet__titleIndentLeft_1uguw"};
19
+ var styles$1 = {"headerWrapper":"bottom-sheet__headerWrapper_1veed","header":"bottom-sheet__header_1veed","sticky":"bottom-sheet__sticky_1veed","highlighted":"bottom-sheet__highlighted_1veed","justifyEnd":"bottom-sheet__justifyEnd_1veed","addon":"bottom-sheet__addon_1veed","addonFixed":"bottom-sheet__addonFixed_1veed","addonLeft":"bottom-sheet__addonLeft_1veed","addonRight":"bottom-sheet__addonRight_1veed","title":"bottom-sheet__title_1veed","titleCenter":"bottom-sheet__titleCenter_1veed","titleLeft":"bottom-sheet__titleLeft_1veed","trimTitle":"bottom-sheet__trimTitle_1veed","titleBigIndentHorizontal":"bottom-sheet__titleBigIndentHorizontal_1veed","titleIndentRight":"bottom-sheet__titleIndentRight_1veed","titleIndentLeft":"bottom-sheet__titleIndentLeft_1veed"};
19
20
  require('./components/header/index.css')
20
21
 
21
22
  var Header = function (_a) {
@@ -65,7 +66,7 @@ var Header = function (_a) {
65
66
  bottomAddons));
66
67
  };
67
68
 
68
- var styles = {"modal":"bottom-sheet__modal_ug9q1","component":"bottom-sheet__component_ug9q1","withTransition":"bottom-sheet__withTransition_ug9q1","scrollableContainer":"bottom-sheet__scrollableContainer_ug9q1","marker":"bottom-sheet__marker_ug9q1","content":"bottom-sheet__content_ug9q1","noHeader":"bottom-sheet__noHeader_ug9q1","noFooter":"bottom-sheet__noFooter_ug9q1","scrollLocked":"bottom-sheet__scrollLocked_ug9q1","appear":"bottom-sheet__appear_ug9q1","enter":"bottom-sheet__enter_ug9q1","appearActive":"bottom-sheet__appearActive_ug9q1","enterActive":"bottom-sheet__enterActive_ug9q1","enterDone":"bottom-sheet__enterDone_ug9q1","appearDone":"bottom-sheet__appearDone_ug9q1","exit":"bottom-sheet__exit_ug9q1","exitActive":"bottom-sheet__exitActive_ug9q1"};
69
+ var styles = {"modal":"bottom-sheet__modal_h361e","component":"bottom-sheet__component_h361e","withTransition":"bottom-sheet__withTransition_h361e","scrollableContainer":"bottom-sheet__scrollableContainer_h361e","marker":"bottom-sheet__marker_h361e","content":"bottom-sheet__content_h361e","noHeader":"bottom-sheet__noHeader_h361e","noFooter":"bottom-sheet__noFooter_h361e","scrollLocked":"bottom-sheet__scrollLocked_h361e","appear":"bottom-sheet__appear_h361e","enter":"bottom-sheet__enter_h361e","appearActive":"bottom-sheet__appearActive_h361e","enterActive":"bottom-sheet__enterActive_h361e","enterDone":"bottom-sheet__enterDone_h361e","appearDone":"bottom-sheet__appearDone_h361e","exit":"bottom-sheet__exit_h361e","exitActive":"bottom-sheet__exitActive_h361e"};
69
70
  require('./index.css')
70
71
 
71
72
  var TIMEOUT = 300;
@@ -78,10 +79,10 @@ var HEADER_OFFSET = 24;
78
79
  var CLOSE_OFFSET = 0.2;
79
80
  var BottomSheet = forwardRef(function (_a, ref) {
80
81
  var _b, _c, _d;
81
- var open = _a.open, title = _a.title, container = _a.container, 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, modalClassName = _a.modalClassName, modalWrapperClassName = _a.modalWrapperClassName, 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, disableBlockingScroll = _a.disableBlockingScroll, 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, backdropProps = _a.backdropProps, onClose = _a.onClose, onBack = _a.onBack;
82
- var _k = useState(0), sheetOffset = _k[0], setSheetOffset = _k[1];
83
- var _l = useState(1), backdropOpacity = _l[0], setBackdropOpacity = _l[1];
84
- var _m = useState(false), scrollLocked = _m[0], setScrollLocked = _m[1];
82
+ var open = _a.open, title = _a.title, container = _a.container, 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, modalClassName = _a.modalClassName, modalWrapperClassName = _a.modalWrapperClassName, 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, disableBlockingScroll = _a.disableBlockingScroll, 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, backdropProps = _a.backdropProps, _k = _a.scrollableContainerRef, scrollableContainerRef = _k === void 0 ? function () { return null; } : _k, onClose = _a.onClose, onBack = _a.onBack;
83
+ var _l = useState(0), sheetOffset = _l[0], setSheetOffset = _l[1];
84
+ var _m = useState(1), backdropOpacity = _m[0], setBackdropOpacity = _m[1];
85
+ var _o = useState(false), scrollLocked = _o[0], setScrollLocked = _o[1];
85
86
  var sheetHeight = useRef(0);
86
87
  var scrollableContainer = useRef(null);
87
88
  var scrollableContainerScrollValue = useRef(0);
@@ -222,7 +223,7 @@ var BottomSheet = forwardRef(function (_a, ref) {
222
223
  _b)), style: __assign(__assign({}, getSwipeStyles()), getHeightStyles()) }, sheetSwipeablehandlers),
223
224
  React.createElement("div", __assign({}, containerProps, { className: cn(styles.scrollableContainer, containerProps === null || containerProps === void 0 ? void 0 : containerProps.className, containerClassName, (_c = {},
224
225
  _c[styles.scrollLocked] = scrollLocked,
225
- _c)), ref: scrollableContainer }),
226
+ _c)), ref: mergeRefs([scrollableContainer, scrollableContainerRef]) }),
226
227
  swipeable && React.createElement("div", { className: cn(styles.marker) }),
227
228
  !hideHeader && !emptyHeader && React.createElement(Header, __assign({}, headerProps)),
228
229
  React.createElement("div", { className: cn(styles.content, contentClassName, (_d = {},
package/esm/component.js CHANGED
@@ -1,10 +1,11 @@
1
- import './tslib.es6-c1a8448e.js';
1
+ import 'tslib';
2
2
  import 'react';
3
3
  import 'react-div-100vh';
4
+ import 'react-merge-refs';
4
5
  import 'react-swipeable';
5
6
  import 'classnames';
6
7
  import '@alfalab/core-components-base-modal/esm';
7
- export { B as BottomSheet, C as CLOSE_OFFSET, H as HEADER_OFFSET } from './component-13675fe5.js';
8
+ export { B as BottomSheet, C as CLOSE_OFFSET, H as HEADER_OFFSET } from './component-9a8081cd.js';
8
9
  import './components/footer/Component.js';
9
10
  import './components/swipeable-backdrop/Component.js';
10
11
  import '@alfalab/core-components-typography/esm';
@@ -1,10 +1,10 @@
1
- import { a as __rest, _ as __assign } from '../../tslib.es6-c1a8448e.js';
1
+ import { __rest, __assign } from 'tslib';
2
2
  import React from 'react';
3
3
  import cn from 'classnames';
4
4
  import { IconButton } from '@alfalab/core-components-icon-button/esm';
5
5
  import { ArrowBackMIcon } from '@alfalab/icons-glyph/ArrowBackMIcon';
6
6
 
7
- var styles = {"backer":"bottom-sheet__backer_57ab6","button":"bottom-sheet__button_57ab6"};
7
+ var styles = {"backer":"bottom-sheet__backer_i62n2","button":"bottom-sheet__button_i62n2"};
8
8
  require('./index.css')
9
9
 
10
10
  var Backer = function (_a) {
@@ -1,4 +1,4 @@
1
- /* hash: 1xbzm */
1
+ /* hash: fo1vj */
2
2
  :root {
3
3
  } /* deprecated */ :root {
4
4
  --color-light-graphic-primary: #0b1f35;
@@ -18,7 +18,7 @@
18
18
  } :root {
19
19
  } :root {
20
20
  --bottom-sheet-backer-bg-color: var(--color-light-bg-primary-inverted-alpha-3);
21
- } .bottom-sheet__backer_57ab6 {
21
+ } .bottom-sheet__backer_i62n2 {
22
22
  width: 32px;
23
23
  height: 32px;
24
24
  display: flex;
@@ -26,7 +26,7 @@
26
26
  align-items: center;
27
27
  cursor: pointer;
28
28
  color: var(--color-light-graphic-primary);
29
- } .bottom-sheet__button_57ab6 {
29
+ } .bottom-sheet__button_i62n2 {
30
30
  background: var(--bottom-sheet-backer-bg-color);
31
31
  -webkit-backdrop-filter: blur(10px);
32
32
  backdrop-filter: blur(10px);
@@ -1,11 +1,11 @@
1
- import { a as __rest, _ as __assign } from '../../tslib.es6-c1a8448e.js';
1
+ import { __rest, __assign } from 'tslib';
2
2
  import React, { useContext, useCallback } from 'react';
3
3
  import cn from 'classnames';
4
4
  import { BaseModalContext } from '@alfalab/core-components-base-modal/esm';
5
5
  import { IconButton } from '@alfalab/core-components-icon-button/esm';
6
6
  import { CrossMIcon } from '@alfalab/icons-glyph/CrossMIcon';
7
7
 
8
- var styles = {"closer":"bottom-sheet__closer_1fi8d","button":"bottom-sheet__button_1fi8d"};
8
+ var styles = {"closer":"bottom-sheet__closer_1254o","button":"bottom-sheet__button_1254o"};
9
9
  require('./index.css')
10
10
 
11
11
  var Closer = function (_a) {
@@ -1,4 +1,4 @@
1
- /* hash: 13z6q */
1
+ /* hash: 1cmjx */
2
2
  :root {
3
3
  } /* deprecated */ :root {
4
4
  --color-light-graphic-primary: #0b1f35;
@@ -18,7 +18,7 @@
18
18
  } :root {
19
19
  } :root {
20
20
  --bottom-sheet-closer-bg-color: var(--color-light-bg-primary-inverted-alpha-3);
21
- } .bottom-sheet__closer_1fi8d {
21
+ } .bottom-sheet__closer_1254o {
22
22
  width: 32px;
23
23
  height: 32px;
24
24
  display: flex;
@@ -26,7 +26,7 @@
26
26
  align-items: center;
27
27
  cursor: pointer;
28
28
  color: var(--color-light-graphic-primary);
29
- } .bottom-sheet__button_1fi8d {
29
+ } .bottom-sheet__button_1254o {
30
30
  background: var(--bottom-sheet-closer-bg-color);
31
31
  -webkit-backdrop-filter: blur(10px);
32
32
  backdrop-filter: blur(10px);
@@ -2,7 +2,7 @@ import React, { useContext, useEffect } from 'react';
2
2
  import cn from 'classnames';
3
3
  import { BaseModalContext } from '@alfalab/core-components-base-modal/esm';
4
4
 
5
- var styles = {"footer":"bottom-sheet__footer_1mm05","sticky":"bottom-sheet__sticky_1mm05","highlighted":"bottom-sheet__highlighted_1mm05"};
5
+ var styles = {"footer":"bottom-sheet__footer_i273y","sticky":"bottom-sheet__sticky_i273y","highlighted":"bottom-sheet__highlighted_i273y"};
6
6
  require('./index.css')
7
7
 
8
8
  var Footer = function (_a) {
@@ -1,4 +1,4 @@
1
- /* hash: twuoo */
1
+ /* hash: cjoe0 */
2
2
  :root {
3
3
  } /* deprecated */ :root {
4
4
  --color-light-bg-primary: #fff;
@@ -20,13 +20,13 @@
20
20
  } :root {
21
21
  --bottom-sheet-footer-border-top: 1px solid var(--color-light-border-primary);
22
22
  --bottom-sheet-footer-background-color: var(--color-light-bg-primary);
23
- } .bottom-sheet__footer_1mm05 {
23
+ } .bottom-sheet__footer_i273y {
24
24
  padding: var(--gap-m) var(--gap-m);
25
25
  background-color: var(--color-light-bg-primary);
26
- } .bottom-sheet__sticky_1mm05 {
26
+ } .bottom-sheet__sticky_i273y {
27
27
  position: sticky;
28
28
  bottom: 0;
29
- } .bottom-sheet__highlighted_1mm05 {
29
+ } .bottom-sheet__highlighted_i273y {
30
30
  border-top: var(--bottom-sheet-footer-border-top);
31
31
  background-color: var(--bottom-sheet-footer-background-color);
32
32
  }
@@ -2,11 +2,12 @@ import 'react';
2
2
  import 'classnames';
3
3
  import '@alfalab/core-components-base-modal/esm';
4
4
  import '@alfalab/core-components-typography/esm';
5
- export { a as Header } from '../../component-13675fe5.js';
5
+ export { a as Header } from '../../component-9a8081cd.js';
6
6
  import '../backer/Component.js';
7
7
  import '../closer/Component.js';
8
- import '../../tslib.es6-c1a8448e.js';
8
+ import 'tslib';
9
9
  import 'react-div-100vh';
10
+ import 'react-merge-refs';
10
11
  import 'react-swipeable';
11
12
  import '../footer/Component.js';
12
13
  import '../swipeable-backdrop/Component.js';
@@ -1,4 +1,4 @@
1
- /* hash: 1a5po */
1
+ /* hash: ssjdh */
2
2
  :root {
3
3
  } /* deprecated */ :root {
4
4
  --color-light-bg-primary: #fff;
@@ -28,37 +28,37 @@
28
28
  --bottom-sheet-title-line-height: 24px;
29
29
  --bottom-sheet-title-font-family: var(--font-family-system);
30
30
  --bottom-sheet-title-margin-vertical: var(--gap-2xs);
31
- } .bottom-sheet__headerWrapper_1uguw {
31
+ } .bottom-sheet__headerWrapper_1veed {
32
32
  padding: var(--gap-xs);
33
33
  padding-bottom: 0;
34
34
  background-color: var(--color-light-bg-primary);
35
35
  border-top-right-radius: var(--border-radius-xl);
36
36
  border-top-left-radius: var(--border-radius-xl);
37
37
  z-index: 1;
38
- } .bottom-sheet__header_1uguw {
38
+ } .bottom-sheet__header_1veed {
39
39
  display: flex;
40
- } .bottom-sheet__sticky_1uguw {
40
+ } .bottom-sheet__sticky_1veed {
41
41
  position: sticky;
42
42
  top: 0;
43
- } .bottom-sheet__highlighted_1uguw {
43
+ } .bottom-sheet__highlighted_1veed {
44
44
  border-bottom: var(--bottom-sheet-header-border-bottom);
45
- } .bottom-sheet__justifyEnd_1uguw {
45
+ } .bottom-sheet__justifyEnd_1veed {
46
46
  justify-content: flex-end;
47
- } .bottom-sheet__addon_1uguw {
47
+ } .bottom-sheet__addon_1veed {
48
48
  display: flex;
49
49
  justify-content: center;
50
50
  align-items: center;
51
51
  min-width: 48px;
52
52
  height: 48px;
53
- } .bottom-sheet__addonFixed_1uguw {
53
+ } .bottom-sheet__addonFixed_1veed {
54
54
  position: fixed;
55
- } .bottom-sheet__addonLeft_1uguw {
55
+ } .bottom-sheet__addonLeft_1veed {
56
56
  left: 0;
57
57
  margin-left: var(--gap-xs);
58
- } .bottom-sheet__addonRight_1uguw {
58
+ } .bottom-sheet__addonRight_1veed {
59
59
  right: 0;
60
60
  margin-right: var(--gap-xs);
61
- } .bottom-sheet__title_1uguw {
61
+ } .bottom-sheet__title_1veed {
62
62
  padding: var(--gap-xs) var(--gap-xs);
63
63
  margin: var(--bottom-sheet-title-margin-vertical) 0;
64
64
  width: 100%;
@@ -66,18 +66,18 @@
66
66
  font-weight: var(--bottom-sheet-title-font-weight);
67
67
  line-height: var(--bottom-sheet-title-line-height);
68
68
  font-family: var(--bottom-sheet-title-font-family);
69
- } .bottom-sheet__titleCenter_1uguw {
69
+ } .bottom-sheet__titleCenter_1veed {
70
70
  text-align: center;
71
- } .bottom-sheet__titleLeft_1uguw {
71
+ } .bottom-sheet__titleLeft_1veed {
72
72
  text-align: left;
73
- } .bottom-sheet__trimTitle_1uguw {
73
+ } .bottom-sheet__trimTitle_1veed {
74
74
  white-space: nowrap;
75
75
  overflow: hidden;
76
76
  text-overflow: ellipsis;
77
- } .bottom-sheet__titleBigIndentHorizontal_1uguw {
77
+ } .bottom-sheet__titleBigIndentHorizontal_1veed {
78
78
  margin: var(--bottom-sheet-title-margin-vertical) var(--gap-4xl);
79
- } .bottom-sheet__titleIndentRight_1uguw {
79
+ } .bottom-sheet__titleIndentRight_1veed {
80
80
  margin-right: var(--gap-4xl);
81
- } .bottom-sheet__titleIndentLeft_1uguw {
81
+ } .bottom-sheet__titleIndentLeft_1veed {
82
82
  margin-left: var(--gap-4xl);
83
83
  }
@@ -1,4 +1,4 @@
1
- import { a as __rest, _ as __assign } from '../../tslib.es6-c1a8448e.js';
1
+ import { __rest, __assign } from 'tslib';
2
2
  import React from 'react';
3
3
  import { Backdrop } from '@alfalab/core-components-backdrop/esm';
4
4
 
package/esm/index.css CHANGED
@@ -1,4 +1,4 @@
1
- /* hash: 1nfk7 */
1
+ /* hash: 1w2xe */
2
2
  :root {
3
3
  } /* deprecated */ :root {
4
4
  --color-light-bg-primary: #fff;
@@ -25,13 +25,13 @@
25
25
  } :root {
26
26
  --bottom-sheet-in-transition: 0.5s cubic-bezier(0.09, 0.91, 0.18, 0.99);
27
27
  --bottom-sheet-out-transition: 0.3s ease;
28
- } .bottom-sheet__modal_ug9q1 {
28
+ } .bottom-sheet__modal_h361e {
29
29
  background-color: transparent;
30
30
  position: fixed;
31
31
  bottom: 0;
32
32
  width: 100%;
33
33
  max-width: 600px;
34
- } .bottom-sheet__component_ug9q1 {
34
+ } .bottom-sheet__component_h361e {
35
35
  overflow: hidden;
36
36
  position: relative;
37
37
  display: flex;
@@ -40,15 +40,15 @@
40
40
  border-top-left-radius: var(--border-radius-3xl);
41
41
  background: var(--color-light-bg-primary);
42
42
  transform: translateY(100%);
43
- } .bottom-sheet__withTransition_ug9q1 {
43
+ } .bottom-sheet__withTransition_h361e {
44
44
  transition: var(--bottom-sheet-out-transition);
45
- } .bottom-sheet__scrollableContainer_ug9q1 {
45
+ } .bottom-sheet__scrollableContainer_h361e {
46
46
  overflow: auto;
47
47
  display: flex;
48
48
  flex-direction: column;
49
49
  position: relative;
50
50
  height: 100%;
51
- } .bottom-sheet__marker_ug9q1 {
51
+ } .bottom-sheet__marker_h361e {
52
52
  position: fixed;
53
53
  top: var(--gap-2xs);
54
54
  left: 50%;
@@ -58,29 +58,29 @@
58
58
  transform: translateX(-50%);
59
59
  background-color: var(--color-light-graphic-quaternary);
60
60
  z-index: 1000;
61
- } .bottom-sheet__content_ug9q1 {
61
+ } .bottom-sheet__content_h361e {
62
62
  display: flex;
63
63
  flex-direction: column;
64
64
  flex: 1;
65
65
  padding: 0 var(--gap-m);
66
66
  color: var(--color-light-text-primary);
67
67
  background-color: var(--color-light-bg-primary);
68
- } .bottom-sheet__noHeader_ug9q1 {
68
+ } .bottom-sheet__noHeader_h361e {
69
69
  padding-top: var(--gap-xl);
70
- } .bottom-sheet__noFooter_ug9q1 {
70
+ } .bottom-sheet__noFooter_h361e {
71
71
  padding-bottom: var(--gap-m);
72
- } .bottom-sheet__scrollLocked_ug9q1 {
72
+ } .bottom-sheet__scrollLocked_h361e {
73
73
  overflow: hidden;
74
- } .bottom-sheet__appear_ug9q1 .bottom-sheet__component_ug9q1, .bottom-sheet__enter_ug9q1 .bottom-sheet__component_ug9q1 {
74
+ } .bottom-sheet__appear_h361e .bottom-sheet__component_h361e, .bottom-sheet__enter_h361e .bottom-sheet__component_h361e {
75
75
  transition: none;
76
- } .bottom-sheet__appearActive_ug9q1 .bottom-sheet__component_ug9q1, .bottom-sheet__enterActive_ug9q1 .bottom-sheet__component_ug9q1 {
76
+ } .bottom-sheet__appearActive_h361e .bottom-sheet__component_h361e, .bottom-sheet__enterActive_h361e .bottom-sheet__component_h361e {
77
77
  transition: var(--bottom-sheet-in-transition);
78
78
  transform: translateY(0);
79
- } .bottom-sheet__enterDone_ug9q1 .bottom-sheet__component_ug9q1, .bottom-sheet__appearDone_ug9q1 .bottom-sheet__component_ug9q1 {
79
+ } .bottom-sheet__enterDone_h361e .bottom-sheet__component_h361e, .bottom-sheet__appearDone_h361e .bottom-sheet__component_h361e {
80
80
  transform: translateY(0);
81
- } .bottom-sheet__exit_ug9q1 .bottom-sheet__component_ug9q1 {
81
+ } .bottom-sheet__exit_h361e .bottom-sheet__component_h361e {
82
82
  transform: translateY(0);
83
- } .bottom-sheet__exitActive_ug9q1 .bottom-sheet__component_ug9q1 {
83
+ } .bottom-sheet__exitActive_h361e .bottom-sheet__component_h361e {
84
84
  transition: var(--bottom-sheet-out-transition);
85
85
  transform: translateY(100%);
86
86
  }
package/esm/index.d.ts CHANGED
@@ -1 +1 @@
1
- export * from "./component-13675fe5";
1
+ export * from "./component-9a8081cd";
package/esm/index.js CHANGED
@@ -1,7 +1,8 @@
1
- export { B as BottomSheet, C as CLOSE_OFFSET, H as HEADER_OFFSET } from './component-13675fe5.js';
2
- import './tslib.es6-c1a8448e.js';
1
+ export { B as BottomSheet, C as CLOSE_OFFSET, H as HEADER_OFFSET } from './component-9a8081cd.js';
2
+ import 'tslib';
3
3
  import 'react';
4
4
  import 'react-div-100vh';
5
+ import 'react-merge-refs';
5
6
  import 'react-swipeable';
6
7
  import 'classnames';
7
8
  import '@alfalab/core-components-base-modal/esm';
package/index.css CHANGED
@@ -1,4 +1,4 @@
1
- /* hash: 1nfk7 */
1
+ /* hash: 1w2xe */
2
2
  :root {
3
3
  } /* deprecated */ :root {
4
4
  --color-light-bg-primary: #fff;
@@ -25,13 +25,13 @@
25
25
  } :root {
26
26
  --bottom-sheet-in-transition: 0.5s cubic-bezier(0.09, 0.91, 0.18, 0.99);
27
27
  --bottom-sheet-out-transition: 0.3s ease;
28
- } .bottom-sheet__modal_ug9q1 {
28
+ } .bottom-sheet__modal_h361e {
29
29
  background-color: transparent;
30
30
  position: fixed;
31
31
  bottom: 0;
32
32
  width: 100%;
33
33
  max-width: 600px;
34
- } .bottom-sheet__component_ug9q1 {
34
+ } .bottom-sheet__component_h361e {
35
35
  overflow: hidden;
36
36
  position: relative;
37
37
  display: flex;
@@ -40,15 +40,15 @@
40
40
  border-top-left-radius: var(--border-radius-3xl);
41
41
  background: var(--color-light-bg-primary);
42
42
  transform: translateY(100%);
43
- } .bottom-sheet__withTransition_ug9q1 {
43
+ } .bottom-sheet__withTransition_h361e {
44
44
  transition: var(--bottom-sheet-out-transition);
45
- } .bottom-sheet__scrollableContainer_ug9q1 {
45
+ } .bottom-sheet__scrollableContainer_h361e {
46
46
  overflow: auto;
47
47
  display: flex;
48
48
  flex-direction: column;
49
49
  position: relative;
50
50
  height: 100%;
51
- } .bottom-sheet__marker_ug9q1 {
51
+ } .bottom-sheet__marker_h361e {
52
52
  position: fixed;
53
53
  top: var(--gap-2xs);
54
54
  left: 50%;
@@ -58,29 +58,29 @@
58
58
  transform: translateX(-50%);
59
59
  background-color: var(--color-light-graphic-quaternary);
60
60
  z-index: 1000;
61
- } .bottom-sheet__content_ug9q1 {
61
+ } .bottom-sheet__content_h361e {
62
62
  display: flex;
63
63
  flex-direction: column;
64
64
  flex: 1;
65
65
  padding: 0 var(--gap-m);
66
66
  color: var(--color-light-text-primary);
67
67
  background-color: var(--color-light-bg-primary);
68
- } .bottom-sheet__noHeader_ug9q1 {
68
+ } .bottom-sheet__noHeader_h361e {
69
69
  padding-top: var(--gap-xl);
70
- } .bottom-sheet__noFooter_ug9q1 {
70
+ } .bottom-sheet__noFooter_h361e {
71
71
  padding-bottom: var(--gap-m);
72
- } .bottom-sheet__scrollLocked_ug9q1 {
72
+ } .bottom-sheet__scrollLocked_h361e {
73
73
  overflow: hidden;
74
- } .bottom-sheet__appear_ug9q1 .bottom-sheet__component_ug9q1, .bottom-sheet__enter_ug9q1 .bottom-sheet__component_ug9q1 {
74
+ } .bottom-sheet__appear_h361e .bottom-sheet__component_h361e, .bottom-sheet__enter_h361e .bottom-sheet__component_h361e {
75
75
  transition: none;
76
- } .bottom-sheet__appearActive_ug9q1 .bottom-sheet__component_ug9q1, .bottom-sheet__enterActive_ug9q1 .bottom-sheet__component_ug9q1 {
76
+ } .bottom-sheet__appearActive_h361e .bottom-sheet__component_h361e, .bottom-sheet__enterActive_h361e .bottom-sheet__component_h361e {
77
77
  transition: var(--bottom-sheet-in-transition);
78
78
  transform: translateY(0);
79
- } .bottom-sheet__enterDone_ug9q1 .bottom-sheet__component_ug9q1, .bottom-sheet__appearDone_ug9q1 .bottom-sheet__component_ug9q1 {
79
+ } .bottom-sheet__enterDone_h361e .bottom-sheet__component_h361e, .bottom-sheet__appearDone_h361e .bottom-sheet__component_h361e {
80
80
  transform: translateY(0);
81
- } .bottom-sheet__exit_ug9q1 .bottom-sheet__component_ug9q1 {
81
+ } .bottom-sheet__exit_h361e .bottom-sheet__component_h361e {
82
82
  transform: translateY(0);
83
- } .bottom-sheet__exitActive_ug9q1 .bottom-sheet__component_ug9q1 {
83
+ } .bottom-sheet__exitActive_h361e .bottom-sheet__component_h361e {
84
84
  transition: var(--bottom-sheet-out-transition);
85
85
  transform: translateY(100%);
86
86
  }
package/index.d.ts CHANGED
@@ -1 +1 @@
1
- export * from "./component-a31768c8";
1
+ export * from "./component-7f6ec6ba";
package/index.js CHANGED
@@ -1,9 +1,10 @@
1
1
  'use strict';
2
2
 
3
- var components_header_Component = require('./component-a31768c8.js');
4
- require('./tslib.es6-f62bcae9.js');
3
+ var components_header_Component = require('./component-7f6ec6ba.js');
4
+ require('tslib');
5
5
  require('react');
6
6
  require('react-div-100vh');
7
+ require('react-merge-refs');
7
8
  require('react-swipeable');
8
9
  require('classnames');
9
10
  require('@alfalab/core-components-base-modal');
@@ -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, HTMLAttributes } from "react";
4
+ import { FC, ReactNode, HTMLAttributes, RefObject } from "react";
5
5
  import { BottomSheetTitleAlign } from "./index";
6
6
  import { TransitionProps } from 'react-transition-group/Transition';
7
7
  import { BaseModalProps } from "@alfalab/core-components-base-modal";
@@ -220,6 +220,10 @@ type BottomSheetProps = {
220
220
  * Свойства для Бэкдропа
221
221
  */
222
222
  backdropProps?: BaseModalProps['backdropProps'];
223
+ /**
224
+ * Реф на контейнер, в котором происходит скролл
225
+ */
226
+ scrollableContainerRef?: RefObject<HTMLElement>;
223
227
  /**
224
228
  * Обработчик закрытия
225
229
  */
@@ -1,5 +1,6 @@
1
1
  import React, { useContext, useEffect, forwardRef, useState, useRef, useCallback } from 'react';
2
2
  import { use100vh } from 'react-div-100vh';
3
+ import mergeRefs from 'react-merge-refs';
3
4
  import { useSwipeable } from 'react-swipeable';
4
5
  import cn from 'classnames';
5
6
  import { BaseModalContext, BaseModal } from '@alfalab/core-components-base-modal/modern';
@@ -14,7 +15,7 @@ const getDataTestId = (dataTestId, element) => {
14
15
  return dataTestId ? `${dataTestId}${elementPart}` : undefined;
15
16
  };
16
17
 
17
- const styles$1 = {"headerWrapper":"bottom-sheet__headerWrapper_1uguw","header":"bottom-sheet__header_1uguw","sticky":"bottom-sheet__sticky_1uguw","highlighted":"bottom-sheet__highlighted_1uguw","justifyEnd":"bottom-sheet__justifyEnd_1uguw","addon":"bottom-sheet__addon_1uguw","addonFixed":"bottom-sheet__addonFixed_1uguw","addonLeft":"bottom-sheet__addonLeft_1uguw","addonRight":"bottom-sheet__addonRight_1uguw","title":"bottom-sheet__title_1uguw","titleCenter":"bottom-sheet__titleCenter_1uguw","titleLeft":"bottom-sheet__titleLeft_1uguw","trimTitle":"bottom-sheet__trimTitle_1uguw","titleBigIndentHorizontal":"bottom-sheet__titleBigIndentHorizontal_1uguw","titleIndentRight":"bottom-sheet__titleIndentRight_1uguw","titleIndentLeft":"bottom-sheet__titleIndentLeft_1uguw"};
18
+ const styles$1 = {"headerWrapper":"bottom-sheet__headerWrapper_1veed","header":"bottom-sheet__header_1veed","sticky":"bottom-sheet__sticky_1veed","highlighted":"bottom-sheet__highlighted_1veed","justifyEnd":"bottom-sheet__justifyEnd_1veed","addon":"bottom-sheet__addon_1veed","addonFixed":"bottom-sheet__addonFixed_1veed","addonLeft":"bottom-sheet__addonLeft_1veed","addonRight":"bottom-sheet__addonRight_1veed","title":"bottom-sheet__title_1veed","titleCenter":"bottom-sheet__titleCenter_1veed","titleLeft":"bottom-sheet__titleLeft_1veed","trimTitle":"bottom-sheet__trimTitle_1veed","titleBigIndentHorizontal":"bottom-sheet__titleBigIndentHorizontal_1veed","titleIndentRight":"bottom-sheet__titleIndentRight_1veed","titleIndentLeft":"bottom-sheet__titleIndentLeft_1veed"};
18
19
  require('./components/header/index.css')
19
20
 
20
21
  const Header = ({ title, headerClassName, addonClassName, closerClassName, backerClassName, leftAddons, rightAddons, bottomAddons, hasCloser, hasBacker, titleAlign, trimTitle, sticky, dataTestId, onBack, }) => {
@@ -61,7 +62,7 @@ const Header = ({ title, headerClassName, addonClassName, closerClassName, backe
61
62
  bottomAddons));
62
63
  };
63
64
 
64
- const styles = {"modal":"bottom-sheet__modal_ug9q1","component":"bottom-sheet__component_ug9q1","withTransition":"bottom-sheet__withTransition_ug9q1","scrollableContainer":"bottom-sheet__scrollableContainer_ug9q1","marker":"bottom-sheet__marker_ug9q1","content":"bottom-sheet__content_ug9q1","noHeader":"bottom-sheet__noHeader_ug9q1","noFooter":"bottom-sheet__noFooter_ug9q1","scrollLocked":"bottom-sheet__scrollLocked_ug9q1","appear":"bottom-sheet__appear_ug9q1","enter":"bottom-sheet__enter_ug9q1","appearActive":"bottom-sheet__appearActive_ug9q1","enterActive":"bottom-sheet__enterActive_ug9q1","enterDone":"bottom-sheet__enterDone_ug9q1","appearDone":"bottom-sheet__appearDone_ug9q1","exit":"bottom-sheet__exit_ug9q1","exitActive":"bottom-sheet__exitActive_ug9q1"};
65
+ const styles = {"modal":"bottom-sheet__modal_h361e","component":"bottom-sheet__component_h361e","withTransition":"bottom-sheet__withTransition_h361e","scrollableContainer":"bottom-sheet__scrollableContainer_h361e","marker":"bottom-sheet__marker_h361e","content":"bottom-sheet__content_h361e","noHeader":"bottom-sheet__noHeader_h361e","noFooter":"bottom-sheet__noFooter_h361e","scrollLocked":"bottom-sheet__scrollLocked_h361e","appear":"bottom-sheet__appear_h361e","enter":"bottom-sheet__enter_h361e","appearActive":"bottom-sheet__appearActive_h361e","enterActive":"bottom-sheet__enterActive_h361e","enterDone":"bottom-sheet__enterDone_h361e","appearDone":"bottom-sheet__appearDone_h361e","exit":"bottom-sheet__exit_h361e","exitActive":"bottom-sheet__exitActive_h361e"};
65
66
  require('./index.css')
66
67
 
67
68
  const TIMEOUT = 300;
@@ -72,7 +73,7 @@ const MARKET_HEIGHT = 24;
72
73
  /* Верхний отступ шторки, если она открыта на максимальную высоту */
73
74
  const HEADER_OFFSET = 24;
74
75
  const CLOSE_OFFSET = 0.2;
75
- const BottomSheet = forwardRef(({ open, title, container, actionButton, contentClassName, containerClassName, containerProps, headerClassName, footerClassName, addonClassName, closerClassName, backerClassName, modalClassName, modalWrapperClassName, className, leftAddons, rightAddons, bottomAddons, hasCloser, hasBacker, titleAlign = 'left', trimTitle, stickyHeader, stickyFooter = true, initialHeight = 'default', hideOverlay, hideHeader, disableOverlayClick, disableBlockingScroll, children, zIndex, transitionProps = {}, dataTestId, swipeable = true, backdropProps, onClose, onBack, }, ref) => {
76
+ const BottomSheet = forwardRef(({ open, title, container, actionButton, contentClassName, containerClassName, containerProps, headerClassName, footerClassName, addonClassName, closerClassName, backerClassName, modalClassName, modalWrapperClassName, className, leftAddons, rightAddons, bottomAddons, hasCloser, hasBacker, titleAlign = 'left', trimTitle, stickyHeader, stickyFooter = true, initialHeight = 'default', hideOverlay, hideHeader, disableOverlayClick, disableBlockingScroll, children, zIndex, transitionProps = {}, dataTestId, swipeable = true, backdropProps, scrollableContainerRef = () => null, onClose, onBack, }, ref) => {
76
77
  const [sheetOffset, setSheetOffset] = useState(0);
77
78
  const [backdropOpacity, setBackdropOpacity] = useState(1);
78
79
  const [scrollLocked, setScrollLocked] = useState(false);
@@ -229,7 +230,7 @@ const BottomSheet = forwardRef(({ open, title, container, actionButton, contentC
229
230
  }, ...sheetSwipeablehandlers },
230
231
  React.createElement("div", { ...containerProps, className: cn(styles.scrollableContainer, containerProps?.className, containerClassName, {
231
232
  [styles.scrollLocked]: scrollLocked,
232
- }), ref: scrollableContainer },
233
+ }), ref: mergeRefs([scrollableContainer, scrollableContainerRef]) },
233
234
  swipeable && React.createElement("div", { className: cn(styles.marker) }),
234
235
  !hideHeader && !emptyHeader && React.createElement(Header, { ...headerProps }),
235
236
  React.createElement("div", { className: cn(styles.content, contentClassName, {
@@ -1,9 +1,10 @@
1
1
  import 'react';
2
2
  import 'react-div-100vh';
3
+ import 'react-merge-refs';
3
4
  import 'react-swipeable';
4
5
  import 'classnames';
5
6
  import '@alfalab/core-components-base-modal/modern';
6
- export { B as BottomSheet, C as CLOSE_OFFSET, H as HEADER_OFFSET } from './component-dbd4ab19.js';
7
+ export { B as BottomSheet, C as CLOSE_OFFSET, H as HEADER_OFFSET } from './component-6012913e.js';
7
8
  import './components/footer/Component.js';
8
9
  import './components/swipeable-backdrop/Component.js';
9
10
  import '@alfalab/core-components-typography/modern';
@@ -3,7 +3,7 @@ import cn from 'classnames';
3
3
  import { IconButton } from '@alfalab/core-components-icon-button/modern';
4
4
  import { ArrowBackMIcon } from '@alfalab/icons-glyph/ArrowBackMIcon';
5
5
 
6
- const styles = {"backer":"bottom-sheet__backer_57ab6","button":"bottom-sheet__button_57ab6"};
6
+ const styles = {"backer":"bottom-sheet__backer_i62n2","button":"bottom-sheet__button_i62n2"};
7
7
  require('./index.css')
8
8
 
9
9
  const Backer = ({ className, size = 'xs', icon = ArrowBackMIcon, dataTestId, onClick, ...restProps }) => (React.createElement("div", { className: cn(styles.backer, className) },
@@ -1,4 +1,4 @@
1
- /* hash: 1xbzm */
1
+ /* hash: fo1vj */
2
2
  :root {
3
3
  } /* deprecated */ :root {
4
4
  --color-light-graphic-primary: #0b1f35;
@@ -18,7 +18,7 @@
18
18
  } :root {
19
19
  } :root {
20
20
  --bottom-sheet-backer-bg-color: var(--color-light-bg-primary-inverted-alpha-3);
21
- } .bottom-sheet__backer_57ab6 {
21
+ } .bottom-sheet__backer_i62n2 {
22
22
  width: 32px;
23
23
  height: 32px;
24
24
  display: flex;
@@ -26,7 +26,7 @@
26
26
  align-items: center;
27
27
  cursor: pointer;
28
28
  color: var(--color-light-graphic-primary);
29
- } .bottom-sheet__button_57ab6 {
29
+ } .bottom-sheet__button_i62n2 {
30
30
  background: var(--bottom-sheet-backer-bg-color);
31
31
  -webkit-backdrop-filter: blur(10px);
32
32
  backdrop-filter: blur(10px);
@@ -4,7 +4,7 @@ import { BaseModalContext } from '@alfalab/core-components-base-modal/modern';
4
4
  import { IconButton } from '@alfalab/core-components-icon-button/modern';
5
5
  import { CrossMIcon } from '@alfalab/icons-glyph/CrossMIcon';
6
6
 
7
- const styles = {"closer":"bottom-sheet__closer_1fi8d","button":"bottom-sheet__button_1fi8d"};
7
+ const styles = {"closer":"bottom-sheet__closer_1254o","button":"bottom-sheet__button_1254o"};
8
8
  require('./index.css')
9
9
 
10
10
  const Closer = ({ className, size = 'xs', icon = CrossMIcon, dataTestId, ...restProps }) => {