@alfalab/core-components-bottom-sheet 5.1.16 → 5.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 (60) hide show
  1. package/{component-11af3f33.d.ts → component-f85861da.d.ts} +6 -0
  2. package/{component-11af3f33.js → component-f85861da.js} +5 -5
  3. package/component.js +2 -2
  4. package/components/backer/Component.js +2 -2
  5. package/components/backer/index.css +12 -9
  6. package/components/closer/Component.js +2 -2
  7. package/components/closer/index.css +12 -9
  8. package/components/footer/Component.js +1 -1
  9. package/components/footer/index.css +13 -13
  10. package/components/header/Component.js +2 -2
  11. package/components/header/index.css +27 -44
  12. package/components/swipeable-backdrop/Component.js +1 -1
  13. package/{esm/component-cbc6d0d3.d.ts → cssm/component-082df5fd.d.ts} +6 -0
  14. package/cssm/{component-5384d179.js → component-082df5fd.js} +2 -2
  15. package/cssm/component.js +1 -1
  16. package/cssm/components/backer/index.module.css +11 -8
  17. package/cssm/components/closer/index.module.css +11 -8
  18. package/cssm/components/footer/index.module.css +12 -12
  19. package/cssm/components/header/Component.js +1 -1
  20. package/cssm/components/header/index.module.css +26 -43
  21. package/cssm/index.d.ts +1 -1
  22. package/cssm/index.js +1 -1
  23. package/cssm/index.module.css +25 -38
  24. package/{cssm/component-5384d179.d.ts → esm/component-62847823.d.ts} +6 -0
  25. package/esm/{component-cbc6d0d3.js → component-62847823.js} +5 -5
  26. package/esm/component.js +2 -2
  27. package/esm/components/backer/Component.js +2 -2
  28. package/esm/components/backer/index.css +12 -9
  29. package/esm/components/closer/Component.js +2 -2
  30. package/esm/components/closer/index.css +12 -9
  31. package/esm/components/footer/Component.js +1 -1
  32. package/esm/components/footer/index.css +13 -13
  33. package/esm/components/header/Component.js +2 -2
  34. package/esm/components/header/index.css +27 -44
  35. package/esm/components/swipeable-backdrop/Component.js +1 -1
  36. package/esm/index.css +26 -39
  37. package/esm/index.d.ts +1 -1
  38. package/esm/index.js +2 -2
  39. package/esm/{tslib.es6-f81724a5.d.ts → tslib.es6-54cc9a3d.d.ts} +0 -0
  40. package/esm/{tslib.es6-f81724a5.js → tslib.es6-54cc9a3d.js} +0 -0
  41. package/index.css +26 -39
  42. package/index.d.ts +1 -1
  43. package/index.js +2 -2
  44. package/modern/{component-412962f0.d.ts → component-d0103215.d.ts} +6 -0
  45. package/modern/{component-412962f0.js → component-d0103215.js} +4 -4
  46. package/modern/component.js +1 -1
  47. package/modern/components/backer/Component.js +1 -1
  48. package/modern/components/backer/index.css +12 -9
  49. package/modern/components/closer/Component.js +1 -1
  50. package/modern/components/closer/index.css +12 -9
  51. package/modern/components/footer/Component.js +1 -1
  52. package/modern/components/footer/index.css +13 -13
  53. package/modern/components/header/Component.js +1 -1
  54. package/modern/components/header/index.css +27 -44
  55. package/modern/index.css +26 -39
  56. package/modern/index.d.ts +1 -1
  57. package/modern/index.js +1 -1
  58. package/package.json +4 -4
  59. /package/{tslib.es6-0683282e.d.ts → tslib.es6-63fb5369.d.ts} +0 -0
  60. /package/{tslib.es6-0683282e.js → tslib.es6-63fb5369.js} +0 -0
@@ -88,6 +88,12 @@ type BottomSheetProps = {
88
88
  * Кнопка действия (обычно, это кнопка закрытия)
89
89
  */
90
90
  actionButton?: ReactNode;
91
+ /**
92
+ * Нода, компонент или функция возвращающая их
93
+ *
94
+ * Контейнер к которому будут добавляться порталы
95
+ */
96
+ container?: BaseModalProps['container'];
91
97
  /**
92
98
  * Дополнительный класс
93
99
  */
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var tslib_es6 = require('./tslib.es6-0683282e.js');
3
+ var tslib_es6 = require('./tslib.es6-63fb5369.js');
4
4
  var React = require('react');
5
5
  var reactDiv100vh = require('react-div-100vh');
6
6
  var reactSwipeable = require('react-swipeable');
@@ -22,7 +22,7 @@ var getDataTestId = function (dataTestId, element) {
22
22
  return dataTestId ? "".concat(dataTestId).concat(elementPart) : undefined;
23
23
  };
24
24
 
25
- var styles$1 = {"headerWrapper":"bottom-sheet__headerWrapper_1rnrb","header":"bottom-sheet__header_1rnrb","sticky":"bottom-sheet__sticky_1rnrb","highlighted":"bottom-sheet__highlighted_1rnrb","justifyEnd":"bottom-sheet__justifyEnd_1rnrb","addon":"bottom-sheet__addon_1rnrb","addonFixed":"bottom-sheet__addonFixed_1rnrb","addonLeft":"bottom-sheet__addonLeft_1rnrb","addonRight":"bottom-sheet__addonRight_1rnrb","title":"bottom-sheet__title_1rnrb","titleCenter":"bottom-sheet__titleCenter_1rnrb","titleLeft":"bottom-sheet__titleLeft_1rnrb","trimTitle":"bottom-sheet__trimTitle_1rnrb","titleBigIndentHorizontal":"bottom-sheet__titleBigIndentHorizontal_1rnrb","titleIndentRight":"bottom-sheet__titleIndentRight_1rnrb","titleIndentLeft":"bottom-sheet__titleIndentLeft_1rnrb"};
25
+ var styles$1 = {"headerWrapper":"bottom-sheet__headerWrapper_kcjgq","header":"bottom-sheet__header_kcjgq","sticky":"bottom-sheet__sticky_kcjgq","highlighted":"bottom-sheet__highlighted_kcjgq","justifyEnd":"bottom-sheet__justifyEnd_kcjgq","addon":"bottom-sheet__addon_kcjgq","addonFixed":"bottom-sheet__addonFixed_kcjgq","addonLeft":"bottom-sheet__addonLeft_kcjgq","addonRight":"bottom-sheet__addonRight_kcjgq","title":"bottom-sheet__title_kcjgq","titleCenter":"bottom-sheet__titleCenter_kcjgq","titleLeft":"bottom-sheet__titleLeft_kcjgq","trimTitle":"bottom-sheet__trimTitle_kcjgq","titleBigIndentHorizontal":"bottom-sheet__titleBigIndentHorizontal_kcjgq","titleIndentRight":"bottom-sheet__titleIndentRight_kcjgq","titleIndentLeft":"bottom-sheet__titleIndentLeft_kcjgq"};
26
26
  require('./components/header/index.css')
27
27
 
28
28
  var Header = function (_a) {
@@ -72,7 +72,7 @@ var Header = function (_a) {
72
72
  bottomAddons));
73
73
  };
74
74
 
75
- var styles = {"modal":"bottom-sheet__modal_1hse9","component":"bottom-sheet__component_1hse9","withTransition":"bottom-sheet__withTransition_1hse9","scrollableContainer":"bottom-sheet__scrollableContainer_1hse9","marker":"bottom-sheet__marker_1hse9","content":"bottom-sheet__content_1hse9","noHeader":"bottom-sheet__noHeader_1hse9","noFooter":"bottom-sheet__noFooter_1hse9","scrollLocked":"bottom-sheet__scrollLocked_1hse9","appear":"bottom-sheet__appear_1hse9","enter":"bottom-sheet__enter_1hse9","appearActive":"bottom-sheet__appearActive_1hse9","enterActive":"bottom-sheet__enterActive_1hse9","enterDone":"bottom-sheet__enterDone_1hse9","appearDone":"bottom-sheet__appearDone_1hse9","exit":"bottom-sheet__exit_1hse9","exitActive":"bottom-sheet__exitActive_1hse9"};
75
+ var styles = {"modal":"bottom-sheet__modal_ex71y","component":"bottom-sheet__component_ex71y","withTransition":"bottom-sheet__withTransition_ex71y","scrollableContainer":"bottom-sheet__scrollableContainer_ex71y","marker":"bottom-sheet__marker_ex71y","content":"bottom-sheet__content_ex71y","noHeader":"bottom-sheet__noHeader_ex71y","noFooter":"bottom-sheet__noFooter_ex71y","scrollLocked":"bottom-sheet__scrollLocked_ex71y","appear":"bottom-sheet__appear_ex71y","enter":"bottom-sheet__enter_ex71y","appearActive":"bottom-sheet__appearActive_ex71y","enterActive":"bottom-sheet__enterActive_ex71y","enterDone":"bottom-sheet__enterDone_ex71y","appearDone":"bottom-sheet__appearDone_ex71y","exit":"bottom-sheet__exit_ex71y","exitActive":"bottom-sheet__exitActive_ex71y"};
76
76
  require('./index.css')
77
77
 
78
78
  var TIMEOUT = 300;
@@ -85,7 +85,7 @@ var HEADER_OFFSET = 24;
85
85
  var CLOSE_OFFSET = 0.2;
86
86
  var BottomSheet = React.forwardRef(function (_a, ref) {
87
87
  var _b, _c, _d;
88
- 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, 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;
88
+ 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;
89
89
  var _k = React.useState(0), sheetOffset = _k[0], setSheetOffset = _k[1];
90
90
  var _l = React.useState(1), backdropOpacity = _l[0], setBackdropOpacity = _l[1];
91
91
  var _m = React.useState(false), scrollLocked = _m[0], setScrollLocked = _m[1];
@@ -222,7 +222,7 @@ var BottomSheet = React.forwardRef(function (_a, ref) {
222
222
  height: initialHeight === 'full' ? targetHeight : 'unset',
223
223
  maxHeight: targetHeight,
224
224
  }); };
225
- return (React__default.default.createElement(coreComponentsBaseModal.BaseModal, { open: open, ref: ref, dataTestId: dataTestId, zIndex: zIndex, onClose: onClose, scrollHandler: scrollableContainer, Backdrop: components_swipeableBackdrop_Component.SwipeableBackdrop, backdropProps: tslib_es6.__assign(tslib_es6.__assign({}, backdropProps), { opacity: backdropOpacity, handlers: swipeable ? backdropSwipeablehandlers : false, opacityTimeout: TIMEOUT, invisible: initialHeight === 'full' ? false : hideOverlay }), disableBackdropClick: hideOverlay ? true : disableOverlayClick, className: cn__default.default(styles.modal, modalClassName), wrapperClassName: modalWrapperClassName, disableBlockingScroll: disableBlockingScroll, transitionProps: tslib_es6.__assign(tslib_es6.__assign({ appear: true, timeout: TIMEOUT, classNames: styles }, transitionProps), { onExited: handleExited, onEntered: handleEntered }) },
225
+ return (React__default.default.createElement(coreComponentsBaseModal.BaseModal, { open: open, ref: ref, container: container, dataTestId: dataTestId, zIndex: zIndex, onClose: onClose, scrollHandler: scrollableContainer, Backdrop: components_swipeableBackdrop_Component.SwipeableBackdrop, backdropProps: tslib_es6.__assign(tslib_es6.__assign({}, backdropProps), { opacity: backdropOpacity, handlers: swipeable ? backdropSwipeablehandlers : false, opacityTimeout: TIMEOUT, invisible: initialHeight === 'full' ? false : hideOverlay }), disableBackdropClick: hideOverlay ? true : disableOverlayClick, className: cn__default.default(styles.modal, modalClassName), wrapperClassName: modalWrapperClassName, disableBlockingScroll: disableBlockingScroll, transitionProps: tslib_es6.__assign(tslib_es6.__assign({ appear: true, timeout: TIMEOUT, classNames: styles }, transitionProps), { onExited: handleExited, onEntered: handleEntered }) },
226
226
  React__default.default.createElement("div", { style: tslib_es6.__assign({}, getHeightStyles()) },
227
227
  React__default.default.createElement("div", tslib_es6.__assign({ className: cn__default.default(styles.component, className, (_b = {},
228
228
  _b[styles.withTransition] = !sheetOffset,
package/component.js CHANGED
@@ -1,12 +1,12 @@
1
1
  'use strict';
2
2
 
3
- require('./tslib.es6-0683282e.js');
3
+ require('./tslib.es6-63fb5369.js');
4
4
  require('react');
5
5
  require('react-div-100vh');
6
6
  require('react-swipeable');
7
7
  require('classnames');
8
8
  require('@alfalab/core-components-base-modal');
9
- var components_header_Component = require('./component-11af3f33.js');
9
+ var components_header_Component = require('./component-f85861da.js');
10
10
  require('./components/footer/Component.js');
11
11
  require('./components/swipeable-backdrop/Component.js');
12
12
  require('@alfalab/core-components-typography');
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var tslib_es6 = require('../../tslib.es6-0683282e.js');
3
+ var tslib_es6 = require('../../tslib.es6-63fb5369.js');
4
4
  var React = require('react');
5
5
  var cn = require('classnames');
6
6
  var coreComponentsIconButton = require('@alfalab/core-components-icon-button');
@@ -11,7 +11,7 @@ function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'defau
11
11
  var React__default = /*#__PURE__*/_interopDefaultCompat(React);
12
12
  var cn__default = /*#__PURE__*/_interopDefaultCompat(cn);
13
13
 
14
- var styles = {"backer":"bottom-sheet__backer_1k990","button":"bottom-sheet__button_1k990"};
14
+ var styles = {"backer":"bottom-sheet__backer_1nbdj","button":"bottom-sheet__button_1nbdj"};
15
15
  require('./index.css')
16
16
 
17
17
  var Backer = function (_a) {
@@ -1,20 +1,24 @@
1
- /* hash: 1v0s7 */
1
+ /* hash: eg7zl */
2
2
  :root {
3
+ } /* deprecated */ :root {
3
4
  --color-light-graphic-primary: #0b1f35;
4
5
  --color-light-bg-primary-inverted-alpha-3: rgba(11, 31, 53, 0.03);
5
- }
6
- :root {
6
+ } :root {
7
+ } :root {
8
+ } :root {
7
9
 
8
10
  /* Hard */
9
11
 
10
12
  /* Up */
11
13
 
12
14
  /* Hard up */
13
- }
14
- :root {
15
+ } :root {
16
+ } :root {
17
+ } :root {
18
+ } :root {
19
+ } :root {
15
20
  --bottom-sheet-backer-bg-color: var(--color-light-bg-primary-inverted-alpha-3);
16
- }
17
- .bottom-sheet__backer_1k990 {
21
+ } .bottom-sheet__backer_1nbdj {
18
22
  width: 32px;
19
23
  height: 32px;
20
24
  display: flex;
@@ -22,8 +26,7 @@
22
26
  align-items: center;
23
27
  cursor: pointer;
24
28
  color: var(--color-light-graphic-primary);
25
- }
26
- .bottom-sheet__button_1k990 {
29
+ } .bottom-sheet__button_1nbdj {
27
30
  background: var(--bottom-sheet-backer-bg-color);
28
31
  -webkit-backdrop-filter: blur(10px);
29
32
  backdrop-filter: blur(10px);
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var tslib_es6 = require('../../tslib.es6-0683282e.js');
3
+ var tslib_es6 = require('../../tslib.es6-63fb5369.js');
4
4
  var React = require('react');
5
5
  var cn = require('classnames');
6
6
  var coreComponentsBaseModal = require('@alfalab/core-components-base-modal');
@@ -12,7 +12,7 @@ function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'defau
12
12
  var React__default = /*#__PURE__*/_interopDefaultCompat(React);
13
13
  var cn__default = /*#__PURE__*/_interopDefaultCompat(cn);
14
14
 
15
- var styles = {"closer":"bottom-sheet__closer_1iz26","button":"bottom-sheet__button_1iz26"};
15
+ var styles = {"closer":"bottom-sheet__closer_g3uz3","button":"bottom-sheet__button_g3uz3"};
16
16
  require('./index.css')
17
17
 
18
18
  var Closer = function (_a) {
@@ -1,20 +1,24 @@
1
- /* hash: 10cg1 */
1
+ /* hash: ia0kw */
2
2
  :root {
3
+ } /* deprecated */ :root {
3
4
  --color-light-graphic-primary: #0b1f35;
4
5
  --color-light-bg-primary-inverted-alpha-3: rgba(11, 31, 53, 0.03);
5
- }
6
- :root {
6
+ } :root {
7
+ } :root {
8
+ } :root {
7
9
 
8
10
  /* Hard */
9
11
 
10
12
  /* Up */
11
13
 
12
14
  /* Hard up */
13
- }
14
- :root {
15
+ } :root {
16
+ } :root {
17
+ } :root {
18
+ } :root {
19
+ } :root {
15
20
  --bottom-sheet-closer-bg-color: var(--color-light-bg-primary-inverted-alpha-3);
16
- }
17
- .bottom-sheet__closer_1iz26 {
21
+ } .bottom-sheet__closer_g3uz3 {
18
22
  width: 32px;
19
23
  height: 32px;
20
24
  display: flex;
@@ -22,8 +26,7 @@
22
26
  align-items: center;
23
27
  cursor: pointer;
24
28
  color: var(--color-light-graphic-primary);
25
- }
26
- .bottom-sheet__button_1iz26 {
29
+ } .bottom-sheet__button_g3uz3 {
27
30
  background: var(--bottom-sheet-closer-bg-color);
28
31
  -webkit-backdrop-filter: blur(10px);
29
32
  backdrop-filter: blur(10px);
@@ -9,7 +9,7 @@ function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'defau
9
9
  var React__default = /*#__PURE__*/_interopDefaultCompat(React);
10
10
  var cn__default = /*#__PURE__*/_interopDefaultCompat(cn);
11
11
 
12
- var styles = {"footer":"bottom-sheet__footer_1mk8h","sticky":"bottom-sheet__sticky_1mk8h","highlighted":"bottom-sheet__highlighted_1mk8h"};
12
+ var styles = {"footer":"bottom-sheet__footer_1ykmx","sticky":"bottom-sheet__sticky_1ykmx","highlighted":"bottom-sheet__highlighted_1ykmx"};
13
13
  require('./index.css')
14
14
 
15
15
  var Footer = function (_a) {
@@ -1,32 +1,32 @@
1
- /* hash: 1gejx */
1
+ /* hash: 1c3qz */
2
2
  :root {
3
+ } /* deprecated */ :root {
3
4
  --color-light-bg-primary: #fff;
4
5
  --color-light-border-primary: #dbdee1;
5
- }
6
- :root {
6
+ } :root {
7
+ } :root {
8
+ } :root {
7
9
 
8
10
  /* Hard */
9
11
 
10
12
  /* Up */
11
13
 
12
14
  /* Hard up */
13
- }
14
- :root {
15
+ } :root {
16
+ } :root {
15
17
  --gap-m: 16px;
16
- }
17
- :root {
18
+ } :root {
19
+ } :root {
20
+ } :root {
18
21
  --bottom-sheet-footer-border-top: 1px solid var(--color-light-border-primary);
19
22
  --bottom-sheet-footer-background-color: var(--color-light-bg-primary);
20
- }
21
- .bottom-sheet__footer_1mk8h {
23
+ } .bottom-sheet__footer_1ykmx {
22
24
  padding: var(--gap-m) var(--gap-m);
23
25
  background-color: var(--color-light-bg-primary);
24
- }
25
- .bottom-sheet__sticky_1mk8h {
26
+ } .bottom-sheet__sticky_1ykmx {
26
27
  position: sticky;
27
28
  bottom: 0;
28
- }
29
- .bottom-sheet__highlighted_1mk8h {
29
+ } .bottom-sheet__highlighted_1ykmx {
30
30
  border-top: var(--bottom-sheet-footer-border-top);
31
31
  background-color: var(--bottom-sheet-footer-background-color);
32
32
  }
@@ -4,10 +4,10 @@ require('react');
4
4
  require('classnames');
5
5
  require('@alfalab/core-components-base-modal');
6
6
  require('@alfalab/core-components-typography');
7
- var components_header_Component = require('../../component-11af3f33.js');
7
+ var components_header_Component = require('../../component-f85861da.js');
8
8
  require('../backer/Component.js');
9
9
  require('../closer/Component.js');
10
- require('../../tslib.es6-0683282e.js');
10
+ require('../../tslib.es6-63fb5369.js');
11
11
  require('react-div-100vh');
12
12
  require('react-swipeable');
13
13
  require('../footer/Component.js');
@@ -1,75 +1,64 @@
1
- /* hash: 47x3j */
1
+ /* hash: 1yot3 */
2
2
  :root {
3
+ } /* deprecated */ :root {
3
4
  --color-light-bg-primary: #fff;
4
- }
5
- :root {
5
+ } :root {
6
+ } :root {
7
+ } :root {
6
8
 
7
9
  /* Hard */
8
10
 
9
11
  /* Up */
10
12
 
11
13
  /* Hard up */
12
- }
13
- :root {
14
+ } :root {
15
+ --border-radius-xl: 16px;
16
+ } :root {
14
17
  --gap-2xs: 4px;
15
18
  --gap-xs: 8px;
16
19
  --gap-4xl: 48px;
17
- }
18
- :root {
20
+ } :root {
19
21
  --font-family-system: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Helvetica,
20
22
  sans-serif;
21
- }
22
- :root {
23
- --border-radius-xl: 16px;
24
- }
25
- :root {
23
+ } :root {
24
+ } :root {
26
25
  --bottom-sheet-header-border-bottom: none;
27
26
  --bottom-sheet-title-font-size: 18px;
28
27
  --bottom-sheet-title-font-weight: 700;
29
28
  --bottom-sheet-title-line-height: 24px;
30
29
  --bottom-sheet-title-font-family: var(--font-family-system);
31
30
  --bottom-sheet-title-margin-vertical: var(--gap-2xs);
32
- }
33
- .bottom-sheet__headerWrapper_1rnrb {
31
+ } .bottom-sheet__headerWrapper_kcjgq {
34
32
  padding: var(--gap-xs);
35
33
  padding-bottom: 0;
36
34
  background-color: var(--color-light-bg-primary);
37
35
  border-top-right-radius: var(--border-radius-xl);
38
36
  border-top-left-radius: var(--border-radius-xl);
39
37
  z-index: 1;
40
- }
41
- .bottom-sheet__header_1rnrb {
38
+ } .bottom-sheet__header_kcjgq {
42
39
  display: flex;
43
- }
44
- .bottom-sheet__sticky_1rnrb {
40
+ } .bottom-sheet__sticky_kcjgq {
45
41
  position: sticky;
46
42
  top: 0;
47
- }
48
- .bottom-sheet__highlighted_1rnrb {
43
+ } .bottom-sheet__highlighted_kcjgq {
49
44
  border-bottom: var(--bottom-sheet-header-border-bottom);
50
- }
51
- .bottom-sheet__justifyEnd_1rnrb {
45
+ } .bottom-sheet__justifyEnd_kcjgq {
52
46
  justify-content: flex-end;
53
- }
54
- .bottom-sheet__addon_1rnrb {
47
+ } .bottom-sheet__addon_kcjgq {
55
48
  display: flex;
56
49
  justify-content: center;
57
50
  align-items: center;
58
51
  min-width: 48px;
59
52
  height: 48px;
60
- }
61
- .bottom-sheet__addonFixed_1rnrb {
53
+ } .bottom-sheet__addonFixed_kcjgq {
62
54
  position: fixed;
63
- }
64
- .bottom-sheet__addonLeft_1rnrb {
55
+ } .bottom-sheet__addonLeft_kcjgq {
65
56
  left: 0;
66
57
  margin-left: var(--gap-xs);
67
- }
68
- .bottom-sheet__addonRight_1rnrb {
58
+ } .bottom-sheet__addonRight_kcjgq {
69
59
  right: 0;
70
60
  margin-right: var(--gap-xs);
71
- }
72
- .bottom-sheet__title_1rnrb {
61
+ } .bottom-sheet__title_kcjgq {
73
62
  padding: var(--gap-xs) var(--gap-xs);
74
63
  margin: var(--bottom-sheet-title-margin-vertical) 0;
75
64
  width: 100%;
@@ -77,24 +66,18 @@
77
66
  font-weight: var(--bottom-sheet-title-font-weight);
78
67
  line-height: var(--bottom-sheet-title-line-height);
79
68
  font-family: var(--bottom-sheet-title-font-family);
80
- }
81
- .bottom-sheet__titleCenter_1rnrb {
69
+ } .bottom-sheet__titleCenter_kcjgq {
82
70
  text-align: center;
83
- }
84
- .bottom-sheet__titleLeft_1rnrb {
71
+ } .bottom-sheet__titleLeft_kcjgq {
85
72
  text-align: left;
86
- }
87
- .bottom-sheet__trimTitle_1rnrb {
73
+ } .bottom-sheet__trimTitle_kcjgq {
88
74
  white-space: nowrap;
89
75
  overflow: hidden;
90
76
  text-overflow: ellipsis;
91
- }
92
- .bottom-sheet__titleBigIndentHorizontal_1rnrb {
77
+ } .bottom-sheet__titleBigIndentHorizontal_kcjgq {
93
78
  margin: var(--bottom-sheet-title-margin-vertical) var(--gap-4xl);
94
- }
95
- .bottom-sheet__titleIndentRight_1rnrb {
79
+ } .bottom-sheet__titleIndentRight_kcjgq {
96
80
  margin-right: var(--gap-4xl);
97
- }
98
- .bottom-sheet__titleIndentLeft_1rnrb {
81
+ } .bottom-sheet__titleIndentLeft_kcjgq {
99
82
  margin-left: var(--gap-4xl);
100
83
  }
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var tslib_es6 = require('../../tslib.es6-0683282e.js');
3
+ var tslib_es6 = require('../../tslib.es6-63fb5369.js');
4
4
  var React = require('react');
5
5
  var coreComponentsBackdrop = require('@alfalab/core-components-backdrop');
6
6
 
@@ -88,6 +88,12 @@ type BottomSheetProps = {
88
88
  * Кнопка действия (обычно, это кнопка закрытия)
89
89
  */
90
90
  actionButton?: ReactNode;
91
+ /**
92
+ * Нода, компонент или функция возвращающая их
93
+ *
94
+ * Контейнер к которому будут добавляться порталы
95
+ */
96
+ container?: BaseModalProps['container'];
91
97
  /**
92
98
  * Дополнительный класс
93
99
  */
@@ -83,7 +83,7 @@ var HEADER_OFFSET = 24;
83
83
  var CLOSE_OFFSET = 0.2;
84
84
  var BottomSheet = React.forwardRef(function (_a, ref) {
85
85
  var _b, _c, _d;
86
- 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, 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;
86
+ 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;
87
87
  var _k = React.useState(0), sheetOffset = _k[0], setSheetOffset = _k[1];
88
88
  var _l = React.useState(1), backdropOpacity = _l[0], setBackdropOpacity = _l[1];
89
89
  var _m = React.useState(false), scrollLocked = _m[0], setScrollLocked = _m[1];
@@ -220,7 +220,7 @@ var BottomSheet = React.forwardRef(function (_a, ref) {
220
220
  height: initialHeight === 'full' ? targetHeight : 'unset',
221
221
  maxHeight: targetHeight,
222
222
  }); };
223
- return (React__default.default.createElement(coreComponentsBaseModal.BaseModal, { open: open, ref: ref, dataTestId: dataTestId, zIndex: zIndex, onClose: onClose, scrollHandler: scrollableContainer, Backdrop: components_swipeableBackdrop_Component.SwipeableBackdrop, backdropProps: tslib_es6.__assign(tslib_es6.__assign({}, backdropProps), { opacity: backdropOpacity, handlers: swipeable ? backdropSwipeablehandlers : false, opacityTimeout: TIMEOUT, invisible: initialHeight === 'full' ? false : hideOverlay }), disableBackdropClick: hideOverlay ? true : disableOverlayClick, className: cn__default.default(styles__default$1.default.modal, modalClassName), wrapperClassName: modalWrapperClassName, disableBlockingScroll: disableBlockingScroll, transitionProps: tslib_es6.__assign(tslib_es6.__assign({ appear: true, timeout: TIMEOUT, classNames: styles__default$1.default }, transitionProps), { onExited: handleExited, onEntered: handleEntered }) },
223
+ return (React__default.default.createElement(coreComponentsBaseModal.BaseModal, { open: open, ref: ref, container: container, dataTestId: dataTestId, zIndex: zIndex, onClose: onClose, scrollHandler: scrollableContainer, Backdrop: components_swipeableBackdrop_Component.SwipeableBackdrop, backdropProps: tslib_es6.__assign(tslib_es6.__assign({}, backdropProps), { opacity: backdropOpacity, handlers: swipeable ? backdropSwipeablehandlers : false, opacityTimeout: TIMEOUT, invisible: initialHeight === 'full' ? false : hideOverlay }), disableBackdropClick: hideOverlay ? true : disableOverlayClick, className: cn__default.default(styles__default$1.default.modal, modalClassName), wrapperClassName: modalWrapperClassName, disableBlockingScroll: disableBlockingScroll, transitionProps: tslib_es6.__assign(tslib_es6.__assign({ appear: true, timeout: TIMEOUT, classNames: styles__default$1.default }, transitionProps), { onExited: handleExited, onEntered: handleEntered }) },
224
224
  React__default.default.createElement("div", { style: tslib_es6.__assign({}, getHeightStyles()) },
225
225
  React__default.default.createElement("div", tslib_es6.__assign({ className: cn__default.default(styles__default$1.default.component, className, (_b = {},
226
226
  _b[styles__default$1.default.withTransition] = !sheetOffset,
package/cssm/component.js CHANGED
@@ -6,7 +6,7 @@ require('react-div-100vh');
6
6
  require('react-swipeable');
7
7
  require('classnames');
8
8
  require('@alfalab/core-components-base-modal/cssm');
9
- var components_header_Component = require('./component-5384d179.js');
9
+ var components_header_Component = require('./component-082df5fd.js');
10
10
  require('./components/footer/Component.js');
11
11
  require('./components/swipeable-backdrop/Component.js');
12
12
  require('./index.module.css');
@@ -1,19 +1,23 @@
1
1
  :root {
2
+ } /* deprecated */ :root {
2
3
  --color-light-graphic-primary: #0b1f35;
3
4
  --color-light-bg-primary-inverted-alpha-3: rgba(11, 31, 53, 0.03);
4
- }
5
- :root {
5
+ } :root {
6
+ } :root {
7
+ } :root {
6
8
 
7
9
  /* Hard */
8
10
 
9
11
  /* Up */
10
12
 
11
13
  /* Hard up */
12
- }
13
- :root {
14
+ } :root {
15
+ } :root {
16
+ } :root {
17
+ } :root {
18
+ } :root {
14
19
  --bottom-sheet-backer-bg-color: var(--color-light-bg-primary-inverted-alpha-3);
15
- }
16
- .backer {
20
+ } .backer {
17
21
  width: 32px;
18
22
  height: 32px;
19
23
  display: flex;
@@ -21,8 +25,7 @@
21
25
  align-items: center;
22
26
  cursor: pointer;
23
27
  color: var(--color-light-graphic-primary);
24
- }
25
- .button {
28
+ } .button {
26
29
  background: var(--bottom-sheet-backer-bg-color);
27
30
  -webkit-backdrop-filter: blur(10px);
28
31
  backdrop-filter: blur(10px);
@@ -1,19 +1,23 @@
1
1
  :root {
2
+ } /* deprecated */ :root {
2
3
  --color-light-graphic-primary: #0b1f35;
3
4
  --color-light-bg-primary-inverted-alpha-3: rgba(11, 31, 53, 0.03);
4
- }
5
- :root {
5
+ } :root {
6
+ } :root {
7
+ } :root {
6
8
 
7
9
  /* Hard */
8
10
 
9
11
  /* Up */
10
12
 
11
13
  /* Hard up */
12
- }
13
- :root {
14
+ } :root {
15
+ } :root {
16
+ } :root {
17
+ } :root {
18
+ } :root {
14
19
  --bottom-sheet-closer-bg-color: var(--color-light-bg-primary-inverted-alpha-3);
15
- }
16
- .closer {
20
+ } .closer {
17
21
  width: 32px;
18
22
  height: 32px;
19
23
  display: flex;
@@ -21,8 +25,7 @@
21
25
  align-items: center;
22
26
  cursor: pointer;
23
27
  color: var(--color-light-graphic-primary);
24
- }
25
- .button {
28
+ } .button {
26
29
  background: var(--bottom-sheet-closer-bg-color);
27
30
  -webkit-backdrop-filter: blur(10px);
28
31
  backdrop-filter: blur(10px);
@@ -1,31 +1,31 @@
1
1
  :root {
2
+ } /* deprecated */ :root {
2
3
  --color-light-bg-primary: #fff;
3
4
  --color-light-border-primary: #dbdee1;
4
- }
5
- :root {
5
+ } :root {
6
+ } :root {
7
+ } :root {
6
8
 
7
9
  /* Hard */
8
10
 
9
11
  /* Up */
10
12
 
11
13
  /* Hard up */
12
- }
13
- :root {
14
+ } :root {
15
+ } :root {
14
16
  --gap-m: 16px;
15
- }
16
- :root {
17
+ } :root {
18
+ } :root {
19
+ } :root {
17
20
  --bottom-sheet-footer-border-top: 1px solid var(--color-light-border-primary);
18
21
  --bottom-sheet-footer-background-color: var(--color-light-bg-primary);
19
- }
20
- .footer {
22
+ } .footer {
21
23
  padding: var(--gap-m) var(--gap-m);
22
24
  background-color: var(--color-light-bg-primary);
23
- }
24
- .sticky {
25
+ } .sticky {
25
26
  position: sticky;
26
27
  bottom: 0;
27
- }
28
- .highlighted {
28
+ } .highlighted {
29
29
  border-top: var(--bottom-sheet-footer-border-top);
30
30
  background-color: var(--bottom-sheet-footer-background-color);
31
31
  }
@@ -4,7 +4,7 @@ require('react');
4
4
  require('classnames');
5
5
  require('@alfalab/core-components-base-modal/cssm');
6
6
  require('@alfalab/core-components-typography/cssm');
7
- var components_header_Component = require('../../component-5384d179.js');
7
+ var components_header_Component = require('../../component-082df5fd.js');
8
8
  require('../backer/Component.js');
9
9
  require('../closer/Component.js');
10
10
  require('./index.module.css');