@alfalab/core-components-bottom-sheet 4.0.0 → 4.0.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/CHANGELOG.md +12 -0
  2. package/dist/{component-0665a3d7.d.ts → component-99884ac1.d.ts} +0 -5
  3. package/dist/{component-0665a3d7.js → component-99884ac1.js} +12 -12
  4. package/dist/component.js +2 -2
  5. package/dist/components/backer/Component.js +2 -2
  6. package/dist/components/backer/index.css +8 -4
  7. package/dist/components/closer/Component.js +2 -2
  8. package/dist/components/closer/index.css +8 -4
  9. package/dist/components/footer/Component.js +1 -1
  10. package/dist/components/footer/index.css +4 -4
  11. package/dist/components/header/Component.js +2 -2
  12. package/dist/components/header/index.css +16 -28
  13. package/dist/components/swipeable-backdrop/Component.js +1 -1
  14. package/dist/{esm/component-2501d7d0.d.ts → cssm/component-1deadd87.d.ts} +0 -5
  15. package/dist/cssm/{component-4b59a168.js → component-1deadd87.js} +9 -9
  16. package/dist/cssm/component.js +1 -1
  17. package/dist/cssm/components/backer/index.module.css +5 -1
  18. package/dist/cssm/components/closer/index.module.css +5 -1
  19. package/dist/cssm/components/header/Component.js +1 -1
  20. package/dist/cssm/components/header/index.module.css +0 -12
  21. package/dist/cssm/index.d.ts +1 -1
  22. package/dist/cssm/index.js +1 -1
  23. package/dist/cssm/index.module.css +1 -1
  24. package/dist/{cssm/component-4b59a168.d.ts → esm/component-dbec5cad.d.ts} +0 -5
  25. package/dist/esm/{component-2501d7d0.js → component-dbec5cad.js} +12 -12
  26. package/dist/esm/component.js +2 -2
  27. package/dist/esm/components/backer/Component.js +2 -2
  28. package/dist/esm/components/backer/index.css +8 -4
  29. package/dist/esm/components/closer/Component.js +2 -2
  30. package/dist/esm/components/closer/index.css +8 -4
  31. package/dist/esm/components/footer/Component.js +1 -1
  32. package/dist/esm/components/footer/index.css +4 -4
  33. package/dist/esm/components/header/Component.js +2 -2
  34. package/dist/esm/components/header/index.css +16 -28
  35. package/dist/esm/components/swipeable-backdrop/Component.js +1 -1
  36. package/dist/esm/index.css +16 -16
  37. package/dist/esm/index.d.ts +1 -1
  38. package/dist/esm/index.js +2 -2
  39. package/dist/esm/{tslib.es6-97cd96ee.d.ts → tslib.es6-eedcd3d6.d.ts} +0 -0
  40. package/dist/esm/{tslib.es6-97cd96ee.js → tslib.es6-eedcd3d6.js} +0 -0
  41. package/dist/index.css +16 -16
  42. package/dist/index.d.ts +1 -1
  43. package/dist/index.js +2 -2
  44. package/dist/modern/{component-6718dad9.d.ts → component-5b171f70.d.ts} +0 -5
  45. package/dist/modern/{component-6718dad9.js → component-5b171f70.js} +9 -9
  46. package/dist/modern/component.js +1 -1
  47. package/dist/modern/components/backer/Component.js +1 -1
  48. package/dist/modern/components/backer/index.css +8 -4
  49. package/dist/modern/components/closer/Component.js +1 -1
  50. package/dist/modern/components/closer/index.css +8 -4
  51. package/dist/modern/components/footer/Component.js +1 -1
  52. package/dist/modern/components/footer/index.css +4 -4
  53. package/dist/modern/components/header/Component.js +1 -1
  54. package/dist/modern/components/header/index.css +16 -28
  55. package/dist/modern/index.css +16 -16
  56. package/dist/modern/index.d.ts +1 -1
  57. package/dist/modern/index.js +1 -1
  58. package/dist/{tslib.es6-4d9b8d1d.d.ts → tslib.es6-1f6a7f15.d.ts} +0 -0
  59. package/dist/{tslib.es6-4d9b8d1d.js → tslib.es6-1f6a7f15.js} +0 -0
  60. package/package.json +2 -2
package/CHANGELOG.md CHANGED
@@ -3,6 +3,18 @@
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.0.1](https://github.com/alfa-laboratory/core-components/compare/@alfalab/core-components-bottom-sheet@4.0.0...@alfalab/core-components-bottom-sheet@4.0.1) (2022-03-28)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * fix modal and bottom-sheet dark mode ([#1043](https://github.com/alfa-laboratory/core-components/issues/1043)) ([cad36a2](https://github.com/alfa-laboratory/core-components/commit/cad36a25b28bfa71296c3dd9dc325eec28b5c241))
12
+ * **bottom-sheet:** fix bottom-sheet swipeable marker ([#1044](https://github.com/alfa-laboratory/core-components/issues/1044)) ([0734e55](https://github.com/alfa-laboratory/core-components/commit/0734e55cc0e394fb33452f875ffcf47819277aee))
13
+
14
+
15
+
16
+
17
+
6
18
  # [4.0.0](https://github.com/alfa-laboratory/core-components/compare/@alfalab/core-components-bottom-sheet@3.1.1...@alfalab/core-components-bottom-sheet@4.0.0) (2022-03-24)
7
19
 
8
20
 
@@ -25,11 +25,6 @@ type HeaderProps = {
25
25
  * Дополнительный класс для компонента стрелки назад
26
26
  */
27
27
  backerClassName?: string;
28
- /**
29
- * Будет ли свайпаться шторка
30
- * @default true
31
- */
32
- swipeable?: boolean;
33
28
  /**
34
29
  * Слот слева
35
30
  */
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var tslib_es6 = require('./tslib.es6-4d9b8d1d.js');
3
+ var tslib_es6 = require('./tslib.es6-1f6a7f15.js');
4
4
  var React = require('react');
5
5
  var cn = require('classnames');
6
6
  var reactDiv100vh = require('react-div-100vh');
@@ -17,12 +17,12 @@ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'defau
17
17
  var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
18
18
  var cn__default = /*#__PURE__*/_interopDefaultLegacy(cn);
19
19
 
20
- var styles = {"header":"bottom-sheet__header_6oyfh","sticky":"bottom-sheet__sticky_6oyfh","highlighted":"bottom-sheet__highlighted_6oyfh","justifyEnd":"bottom-sheet__justifyEnd_6oyfh","marker":"bottom-sheet__marker_6oyfh","addon":"bottom-sheet__addon_6oyfh","addonFixed":"bottom-sheet__addonFixed_6oyfh","addonLeft":"bottom-sheet__addonLeft_6oyfh","addonRight":"bottom-sheet__addonRight_6oyfh","title":"bottom-sheet__title_6oyfh","titleCenter":"bottom-sheet__titleCenter_6oyfh","titleLeft":"bottom-sheet__titleLeft_6oyfh","trimTitle":"bottom-sheet__trimTitle_6oyfh","titleBigIndentHorizontal":"bottom-sheet__titleBigIndentHorizontal_6oyfh","titleIndentRight":"bottom-sheet__titleIndentRight_6oyfh","titleIndentLeft":"bottom-sheet__titleIndentLeft_6oyfh"};
20
+ var styles = {"header":"bottom-sheet__header_1qzdw","sticky":"bottom-sheet__sticky_1qzdw","highlighted":"bottom-sheet__highlighted_1qzdw","justifyEnd":"bottom-sheet__justifyEnd_1qzdw","addon":"bottom-sheet__addon_1qzdw","addonFixed":"bottom-sheet__addonFixed_1qzdw","addonLeft":"bottom-sheet__addonLeft_1qzdw","addonRight":"bottom-sheet__addonRight_1qzdw","title":"bottom-sheet__title_1qzdw","titleCenter":"bottom-sheet__titleCenter_1qzdw","titleLeft":"bottom-sheet__titleLeft_1qzdw","trimTitle":"bottom-sheet__trimTitle_1qzdw","titleBigIndentHorizontal":"bottom-sheet__titleBigIndentHorizontal_1qzdw","titleIndentRight":"bottom-sheet__titleIndentRight_1qzdw","titleIndentLeft":"bottom-sheet__titleIndentLeft_1qzdw"};
21
21
  require('./components/header/index.css')
22
22
 
23
23
  var Header = function (_a) {
24
24
  var _b, _c, _d, _e;
25
- var title = _a.title, className = _a.className, addonClassName = _a.addonClassName, closerClassName = _a.closerClassName, backerClassName = _a.backerClassName, swipeable = _a.swipeable, leftAddons = _a.leftAddons, rightAddons = _a.rightAddons, hasCloser = _a.hasCloser, hasBacker = _a.hasBacker, titleAlign = _a.titleAlign, trimTitle = _a.trimTitle, sticky = _a.sticky, onBack = _a.onBack;
25
+ var title = _a.title, className = _a.className, addonClassName = _a.addonClassName, closerClassName = _a.closerClassName, backerClassName = _a.backerClassName, leftAddons = _a.leftAddons, rightAddons = _a.rightAddons, hasCloser = _a.hasCloser, hasBacker = _a.hasBacker, titleAlign = _a.titleAlign, trimTitle = _a.trimTitle, sticky = _a.sticky, onBack = _a.onBack;
26
26
  var _f = React.useContext(coreComponentsBaseModal.BaseModalContext), headerHighlighted = _f.headerHighlighted, setHasHeader = _f.setHasHeader, setHeaderOffset = _f.setHeaderOffset;
27
27
  var hasLeftPart = hasBacker || leftAddons || titleAlign === 'center';
28
28
  var hasRightPart = hasCloser || rightAddons || titleAlign === 'center';
@@ -49,7 +49,6 @@ var Header = function (_a) {
49
49
  _b[styles.highlighted] = headerHighlighted && sticky,
50
50
  _b[styles.sticky] = sticky,
51
51
  _b)) },
52
- swipeable && React__default['default'].createElement("div", { className: cn__default['default'](styles.marker) }),
53
52
  hasLeftPart && (React__default['default'].createElement("div", { className: cn__default['default'](styles.addon, addonClassName, (_c = {},
54
53
  _c[styles.addonFixed] = !sticky,
55
54
  _c[styles.addonLeft] = !sticky,
@@ -65,22 +64,23 @@ var Header = function (_a) {
65
64
  _e)) }, hasCloser ? React__default['default'].createElement(components_closer_Component.Closer, { className: closerClassName }) : rightAddons))));
66
65
  };
67
66
 
68
- var styles$1 = {"modal":"bottom-sheet__modal_2931u","component":"bottom-sheet__component_2931u","withTransition":"bottom-sheet__withTransition_2931u","scrollableContainer":"bottom-sheet__scrollableContainer_2931u","marker":"bottom-sheet__marker_2931u","content":"bottom-sheet__content_2931u","noHeader":"bottom-sheet__noHeader_2931u","noFooter":"bottom-sheet__noFooter_2931u","scrollLocked":"bottom-sheet__scrollLocked_2931u","appear":"bottom-sheet__appear_2931u","enter":"bottom-sheet__enter_2931u","appearActive":"bottom-sheet__appearActive_2931u","enterActive":"bottom-sheet__enterActive_2931u","enterDone":"bottom-sheet__enterDone_2931u","appearDone":"bottom-sheet__appearDone_2931u","exit":"bottom-sheet__exit_2931u","exitActive":"bottom-sheet__exitActive_2931u"};
67
+ var styles$1 = {"modal":"bottom-sheet__modal_b5hs7","component":"bottom-sheet__component_b5hs7","withTransition":"bottom-sheet__withTransition_b5hs7","scrollableContainer":"bottom-sheet__scrollableContainer_b5hs7","marker":"bottom-sheet__marker_b5hs7","content":"bottom-sheet__content_b5hs7","noHeader":"bottom-sheet__noHeader_b5hs7","noFooter":"bottom-sheet__noFooter_b5hs7","scrollLocked":"bottom-sheet__scrollLocked_b5hs7","appear":"bottom-sheet__appear_b5hs7","enter":"bottom-sheet__enter_b5hs7","appearActive":"bottom-sheet__appearActive_b5hs7","enterActive":"bottom-sheet__enterActive_b5hs7","enterDone":"bottom-sheet__enterDone_b5hs7","appearDone":"bottom-sheet__appearDone_b5hs7","exit":"bottom-sheet__exit_b5hs7","exitActive":"bottom-sheet__exitActive_b5hs7"};
69
68
  require('./index.css')
70
69
 
71
70
  var TIMEOUT = 300;
72
71
  var SWIPE_CLOSE_VELOCITY = 0.4;
73
72
  var MIN_BACKDROP_OPACITY = 0.2;
74
73
  var HEADER_HEIGHT = 56;
74
+ var MARKET_HEIGHT = 24;
75
75
  /* Верхний отступ шторки, если она открыта на максимальную высоту */
76
76
  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, headerClassName = _a.headerClassName, 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, stickyFooter = _a.stickyFooter, _f = _a.initialHeight, initialHeight = _f === void 0 ? 'default' : _f, hideOverlay = _a.hideOverlay, hideHeader = _a.hideHeader, disableOverlayClick = _a.disableOverlayClick, children = _a.children, zIndex = _a.zIndex, _g = _a.transitionProps, transitionProps = _g === void 0 ? {} : _g, dataTestId = _a.dataTestId, _h = _a.swipeable, swipeable = _h === void 0 ? true : _h, onClose = _a.onClose, onBack = _a.onBack;
81
- var _j = React.useState(0), sheetOffset = _j[0], setSheetOffset = _j[1];
82
- var _k = React.useState(1), backdropOpacity = _k[0], setBackdropOpacity = _k[1];
83
- var _l = React.useState(false), scrollLocked = _l[0], setScrollLocked = _l[1];
80
+ var open = _a.open, title = _a.title, actionButton = _a.actionButton, contentClassName = _a.contentClassName, headerClassName = _a.headerClassName, 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];
84
84
  var sheetHeight = React.useRef(0);
85
85
  var scrollableContainer = React.useRef(null);
86
86
  var scrollableContainerScrollValue = React.useRef(0);
@@ -94,7 +94,6 @@ var BottomSheet = React.forwardRef(function (_a, ref) {
94
94
  addonClassName: addonClassName,
95
95
  closerClassName: closerClassName,
96
96
  backerClassName: backerClassName,
97
- swipeable: swipeable,
98
97
  leftAddons: leftAddons,
99
98
  rightAddons: rightAddons,
100
99
  hasCloser: hasCloser,
@@ -123,7 +122,8 @@ var BottomSheet = React.forwardRef(function (_a, ref) {
123
122
  if (!swipeable)
124
123
  return true;
125
124
  if (!scrollableContainer.current ||
126
- (stickyHeader && offsetY <= HEADER_HEIGHT + HEADER_OFFSET)) {
125
+ (stickyHeader && offsetY <= HEADER_HEIGHT + HEADER_OFFSET) ||
126
+ (!stickyHeader && offsetY <= MARKET_HEIGHT + HEADER_OFFSET)) {
127
127
  return false;
128
128
  }
129
129
  if (!scrollableContainerScrollValue.current) {
@@ -224,7 +224,7 @@ var BottomSheet = React.forwardRef(function (_a, ref) {
224
224
  React__default['default'].createElement("div", { className: cn__default['default'](styles$1.scrollableContainer, (_c = {},
225
225
  _c[styles$1.scrollLocked] = scrollLocked,
226
226
  _c)), ref: scrollableContainer },
227
- swipeable && (hideHeader || emptyHeader) && (React__default['default'].createElement("div", { className: cn__default['default'](styles$1.marker) })),
227
+ swipeable && React__default['default'].createElement("div", { className: cn__default['default'](styles$1.marker) }),
228
228
  !hideHeader && !emptyHeader && React__default['default'].createElement(Header, tslib_es6.__assign({}, headerProps)),
229
229
  React__default['default'].createElement("div", { className: cn__default['default'](styles$1.content, contentClassName, (_d = {},
230
230
  _d[styles$1.noHeader] = hideHeader || emptyHeader,
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-4d9b8d1d.js');
5
+ require('./tslib.es6-1f6a7f15.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-0665a3d7.js');
17
+ var components_header_Component = require('./component-99884ac1.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-4d9b8d1d.js');
5
+ var tslib_es6 = require('../../tslib.es6-1f6a7f15.js');
6
6
  var React = require('react');
7
7
  var cn = require('classnames');
8
8
  var coreComponentsIconButton = require('@alfalab/core-components-icon-button');
@@ -13,7 +13,7 @@ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'defau
13
13
  var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
14
14
  var cn__default = /*#__PURE__*/_interopDefaultLegacy(cn);
15
15
 
16
- var styles = {"backer":"bottom-sheet__backer_1svh2","button":"bottom-sheet__button_1svh2"};
16
+ var styles = {"backer":"bottom-sheet__backer_1wvld","button":"bottom-sheet__button_1wvld"};
17
17
  require('./index.css')
18
18
 
19
19
  var Backer = function (_a) {
@@ -1,5 +1,9 @@
1
- /* hash: k9who */
2
- .bottom-sheet__backer_1svh2 {
1
+ /* hash: 1q51x */
2
+ :root {
3
+ --bottom-sheet-backer-bg-color: var(--color-light-bg-primary-alpha-40);
4
+ }
5
+
6
+ .bottom-sheet__backer_1wvld {
3
7
  width: 32px;
4
8
  height: 32px;
5
9
  display: flex;
@@ -8,8 +12,8 @@
8
12
  cursor: pointer;
9
13
  }
10
14
 
11
- .bottom-sheet__button_1svh2 {
12
- background: rgba(0, 0, 0, 0.04);
15
+ .bottom-sheet__button_1wvld {
16
+ background: var(--bottom-sheet-backer-bg-color);
13
17
  -webkit-backdrop-filter: blur(10px);
14
18
  backdrop-filter: blur(10px);
15
19
  border-radius: 50px;
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var tslib_es6 = require('../../tslib.es6-4d9b8d1d.js');
5
+ var tslib_es6 = require('../../tslib.es6-1f6a7f15.js');
6
6
  var React = require('react');
7
7
  var cn = require('classnames');
8
8
  var coreComponentsBaseModal = require('@alfalab/core-components-base-modal');
@@ -14,7 +14,7 @@ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'defau
14
14
  var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
15
15
  var cn__default = /*#__PURE__*/_interopDefaultLegacy(cn);
16
16
 
17
- var styles = {"closer":"bottom-sheet__closer_3tn3y","button":"bottom-sheet__button_3tn3y"};
17
+ var styles = {"closer":"bottom-sheet__closer_cc5pc","button":"bottom-sheet__button_cc5pc"};
18
18
  require('./index.css')
19
19
 
20
20
  var Closer = function (_a) {
@@ -1,5 +1,9 @@
1
- /* hash: ycx49 */
2
- .bottom-sheet__closer_3tn3y {
1
+ /* hash: 1s5go */
2
+ :root {
3
+ --bottom-sheet-closer-bg-color: var(--color-light-bg-primary-alpha-40);
4
+ }
5
+
6
+ .bottom-sheet__closer_cc5pc {
3
7
  width: 32px;
4
8
  height: 32px;
5
9
  display: flex;
@@ -8,8 +12,8 @@
8
12
  cursor: pointer;
9
13
  }
10
14
 
11
- .bottom-sheet__button_3tn3y {
12
- background: rgba(0, 0, 0, 0.04);
15
+ .bottom-sheet__button_cc5pc {
16
+ background: var(--bottom-sheet-closer-bg-color);
13
17
  -webkit-backdrop-filter: blur(10px);
14
18
  backdrop-filter: blur(10px);
15
19
  border-radius: 50px;
@@ -11,7 +11,7 @@ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'defau
11
11
  var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
12
12
  var cn__default = /*#__PURE__*/_interopDefaultLegacy(cn);
13
13
 
14
- var styles = {"footer":"bottom-sheet__footer_1jt1d","sticky":"bottom-sheet__sticky_1jt1d","highlighted":"bottom-sheet__highlighted_1jt1d"};
14
+ var styles = {"footer":"bottom-sheet__footer_10r52","sticky":"bottom-sheet__sticky_10r52","highlighted":"bottom-sheet__highlighted_10r52"};
15
15
  require('./index.css')
16
16
 
17
17
  var Footer = function (_a) {
@@ -1,4 +1,4 @@
1
- /* hash: 1585q */
1
+ /* hash: 1s9q9 */
2
2
  :root {
3
3
  --color-light-bg-primary: #fff;
4
4
  --color-light-border-primary: #dbdee1;
@@ -18,15 +18,15 @@
18
18
  --bottom-sheet-footer-border-top: 1px solid var(--color-light-border-primary);
19
19
  --bottom-sheet-footer-background-color: var(--color-light-bg-primary);
20
20
  }
21
- .bottom-sheet__footer_1jt1d {
21
+ .bottom-sheet__footer_10r52 {
22
22
  padding: var(--gap-m) var(--gap-m);
23
23
  background-color: var(--color-light-bg-primary);
24
24
  }
25
- .bottom-sheet__sticky_1jt1d {
25
+ .bottom-sheet__sticky_10r52 {
26
26
  position: sticky;
27
27
  bottom: 0;
28
28
  }
29
- .bottom-sheet__highlighted_1jt1d {
29
+ .bottom-sheet__highlighted_10r52 {
30
30
  border-top: var(--bottom-sheet-footer-border-top);
31
31
  background-color: var(--bottom-sheet-footer-background-color);
32
32
  }
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- require('../../tslib.es6-4d9b8d1d.js');
5
+ require('../../tslib.es6-1f6a7f15.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-0665a3d7.js');
17
+ var components_header_Component = require('../../component-99884ac1.js');
18
18
  require('../footer/Component.js');
19
19
  require('@alfalab/core-components-backdrop');
20
20
  require('../swipeable-backdrop/Component.js');
@@ -1,7 +1,6 @@
1
- /* hash: nztoa */
1
+ /* hash: 1hcnd */
2
2
  :root {
3
3
  --color-light-bg-primary: #fff;
4
- --color-light-graphic-neutral: #dbdee1;
5
4
  }
6
5
  :root {
7
6
 
@@ -31,7 +30,7 @@
31
30
  --bottom-sheet-title-font-family: var(--font-family-system);
32
31
  --bottom-sheet-title-margin-vertical: var(--gap-2xs);
33
32
  }
34
- .bottom-sheet__header_6oyfh {
33
+ .bottom-sheet__header_1qzdw {
35
34
  display: flex;
36
35
  align-items: center;
37
36
  padding: var(--gap-xs);
@@ -40,46 +39,35 @@
40
39
  border-top-right-radius: var(--border-radius-xl);
41
40
  border-top-left-radius: var(--border-radius-xl);
42
41
  }
43
- .bottom-sheet__sticky_6oyfh {
42
+ .bottom-sheet__sticky_1qzdw {
44
43
  position: sticky;
45
44
  top: 0;
46
45
  }
47
- .bottom-sheet__highlighted_6oyfh {
46
+ .bottom-sheet__highlighted_1qzdw {
48
47
  border-bottom: var(--bottom-sheet-header-border-bottom);
49
48
  }
50
- .bottom-sheet__justifyEnd_6oyfh {
49
+ .bottom-sheet__justifyEnd_1qzdw {
51
50
  justify-content: flex-end;
52
51
  }
53
- .bottom-sheet__marker_6oyfh {
54
- position: absolute;
55
- top: var(--gap-2xs);
56
- left: 50%;
57
- width: 36px;
58
- height: 4px;
59
- border-radius: 20px;
60
- transform: translateX(-50%);
61
- background-color: var(--color-light-graphic-neutral);
62
- z-index: 1000;
63
- }
64
- .bottom-sheet__addon_6oyfh {
52
+ .bottom-sheet__addon_1qzdw {
65
53
  display: flex;
66
54
  justify-content: center;
67
55
  align-items: center;
68
56
  min-width: 48px;
69
57
  height: 48px;
70
58
  }
71
- .bottom-sheet__addonFixed_6oyfh {
59
+ .bottom-sheet__addonFixed_1qzdw {
72
60
  position: fixed;
73
61
  }
74
- .bottom-sheet__addonLeft_6oyfh {
62
+ .bottom-sheet__addonLeft_1qzdw {
75
63
  left: 0;
76
64
  margin-left: var(--gap-xs);
77
65
  }
78
- .bottom-sheet__addonRight_6oyfh {
66
+ .bottom-sheet__addonRight_1qzdw {
79
67
  right: 0;
80
68
  margin-right: var(--gap-xs);
81
69
  }
82
- .bottom-sheet__title_6oyfh {
70
+ .bottom-sheet__title_1qzdw {
83
71
  height: 24px;
84
72
  padding: var(--gap-xs) var(--gap-xs);
85
73
  margin: var(--bottom-sheet-title-margin-vertical) 0;
@@ -89,23 +77,23 @@
89
77
  line-height: var(--bottom-sheet-title-line-height);
90
78
  font-family: var(--bottom-sheet-title-font-family);
91
79
  }
92
- .bottom-sheet__titleCenter_6oyfh {
80
+ .bottom-sheet__titleCenter_1qzdw {
93
81
  text-align: center;
94
82
  }
95
- .bottom-sheet__titleLeft_6oyfh {
83
+ .bottom-sheet__titleLeft_1qzdw {
96
84
  text-align: left;
97
85
  }
98
- .bottom-sheet__trimTitle_6oyfh {
86
+ .bottom-sheet__trimTitle_1qzdw {
99
87
  white-space: nowrap;
100
88
  overflow: hidden;
101
89
  text-overflow: ellipsis;
102
90
  }
103
- .bottom-sheet__titleBigIndentHorizontal_6oyfh {
91
+ .bottom-sheet__titleBigIndentHorizontal_1qzdw {
104
92
  margin: var(--bottom-sheet-title-margin-vertical) var(--gap-4xl);
105
93
  }
106
- .bottom-sheet__titleIndentRight_6oyfh {
94
+ .bottom-sheet__titleIndentRight_1qzdw {
107
95
  margin-right: var(--gap-4xl);
108
96
  }
109
- .bottom-sheet__titleIndentLeft_6oyfh {
97
+ .bottom-sheet__titleIndentLeft_1qzdw {
110
98
  margin-left: var(--gap-4xl);
111
99
  }
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var tslib_es6 = require('../../tslib.es6-4d9b8d1d.js');
5
+ var tslib_es6 = require('../../tslib.es6-1f6a7f15.js');
6
6
  var React = require('react');
7
7
  var coreComponentsBackdrop = require('@alfalab/core-components-backdrop');
8
8
 
@@ -25,11 +25,6 @@ type HeaderProps = {
25
25
  * Дополнительный класс для компонента стрелки назад
26
26
  */
27
27
  backerClassName?: string;
28
- /**
29
- * Будет ли свайпаться шторка
30
- * @default true
31
- */
32
- swipeable?: boolean;
33
28
  /**
34
29
  * Слот слева
35
30
  */
@@ -23,7 +23,7 @@ var styles__default$1 = /*#__PURE__*/_interopDefaultLegacy(styles$1);
23
23
 
24
24
  var Header = function (_a) {
25
25
  var _b, _c, _d, _e;
26
- var title = _a.title, className = _a.className, addonClassName = _a.addonClassName, closerClassName = _a.closerClassName, backerClassName = _a.backerClassName, swipeable = _a.swipeable, leftAddons = _a.leftAddons, rightAddons = _a.rightAddons, hasCloser = _a.hasCloser, hasBacker = _a.hasBacker, titleAlign = _a.titleAlign, trimTitle = _a.trimTitle, sticky = _a.sticky, onBack = _a.onBack;
26
+ var title = _a.title, className = _a.className, addonClassName = _a.addonClassName, closerClassName = _a.closerClassName, backerClassName = _a.backerClassName, leftAddons = _a.leftAddons, rightAddons = _a.rightAddons, hasCloser = _a.hasCloser, hasBacker = _a.hasBacker, titleAlign = _a.titleAlign, trimTitle = _a.trimTitle, sticky = _a.sticky, onBack = _a.onBack;
27
27
  var _f = React.useContext(coreComponentsBaseModal.BaseModalContext), headerHighlighted = _f.headerHighlighted, setHasHeader = _f.setHasHeader, setHeaderOffset = _f.setHeaderOffset;
28
28
  var hasLeftPart = hasBacker || leftAddons || titleAlign === 'center';
29
29
  var hasRightPart = hasCloser || rightAddons || titleAlign === 'center';
@@ -50,7 +50,6 @@ var Header = function (_a) {
50
50
  _b[styles__default['default'].highlighted] = headerHighlighted && sticky,
51
51
  _b[styles__default['default'].sticky] = sticky,
52
52
  _b)) },
53
- swipeable && React__default['default'].createElement("div", { className: cn__default['default'](styles__default['default'].marker) }),
54
53
  hasLeftPart && (React__default['default'].createElement("div", { className: cn__default['default'](styles__default['default'].addon, addonClassName, (_c = {},
55
54
  _c[styles__default['default'].addonFixed] = !sticky,
56
55
  _c[styles__default['default'].addonLeft] = !sticky,
@@ -70,15 +69,16 @@ var TIMEOUT = 300;
70
69
  var SWIPE_CLOSE_VELOCITY = 0.4;
71
70
  var MIN_BACKDROP_OPACITY = 0.2;
72
71
  var HEADER_HEIGHT = 56;
72
+ var MARKET_HEIGHT = 24;
73
73
  /* Верхний отступ шторки, если она открыта на максимальную высоту */
74
74
  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, headerClassName = _a.headerClassName, 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, stickyFooter = _a.stickyFooter, _f = _a.initialHeight, initialHeight = _f === void 0 ? 'default' : _f, hideOverlay = _a.hideOverlay, hideHeader = _a.hideHeader, disableOverlayClick = _a.disableOverlayClick, children = _a.children, zIndex = _a.zIndex, _g = _a.transitionProps, transitionProps = _g === void 0 ? {} : _g, dataTestId = _a.dataTestId, _h = _a.swipeable, swipeable = _h === void 0 ? true : _h, onClose = _a.onClose, onBack = _a.onBack;
79
- var _j = React.useState(0), sheetOffset = _j[0], setSheetOffset = _j[1];
80
- var _k = React.useState(1), backdropOpacity = _k[0], setBackdropOpacity = _k[1];
81
- var _l = React.useState(false), scrollLocked = _l[0], setScrollLocked = _l[1];
78
+ var open = _a.open, title = _a.title, actionButton = _a.actionButton, contentClassName = _a.contentClassName, headerClassName = _a.headerClassName, 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];
82
82
  var sheetHeight = React.useRef(0);
83
83
  var scrollableContainer = React.useRef(null);
84
84
  var scrollableContainerScrollValue = React.useRef(0);
@@ -92,7 +92,6 @@ var BottomSheet = React.forwardRef(function (_a, ref) {
92
92
  addonClassName: addonClassName,
93
93
  closerClassName: closerClassName,
94
94
  backerClassName: backerClassName,
95
- swipeable: swipeable,
96
95
  leftAddons: leftAddons,
97
96
  rightAddons: rightAddons,
98
97
  hasCloser: hasCloser,
@@ -121,7 +120,8 @@ var BottomSheet = React.forwardRef(function (_a, ref) {
121
120
  if (!swipeable)
122
121
  return true;
123
122
  if (!scrollableContainer.current ||
124
- (stickyHeader && offsetY <= HEADER_HEIGHT + HEADER_OFFSET)) {
123
+ (stickyHeader && offsetY <= HEADER_HEIGHT + HEADER_OFFSET) ||
124
+ (!stickyHeader && offsetY <= MARKET_HEIGHT + HEADER_OFFSET)) {
125
125
  return false;
126
126
  }
127
127
  if (!scrollableContainerScrollValue.current) {
@@ -222,7 +222,7 @@ var BottomSheet = React.forwardRef(function (_a, ref) {
222
222
  React__default['default'].createElement("div", { className: cn__default['default'](styles__default$1['default'].scrollableContainer, (_c = {},
223
223
  _c[styles__default$1['default'].scrollLocked] = scrollLocked,
224
224
  _c)), ref: scrollableContainer },
225
- swipeable && (hideHeader || emptyHeader) && (React__default['default'].createElement("div", { className: cn__default['default'](styles__default$1['default'].marker) })),
225
+ swipeable && React__default['default'].createElement("div", { className: cn__default['default'](styles__default$1['default'].marker) }),
226
226
  !hideHeader && !emptyHeader && React__default['default'].createElement(Header, tslib_es6.__assign({}, headerProps)),
227
227
  React__default['default'].createElement("div", { className: cn__default['default'](styles__default$1['default'].content, contentClassName, (_d = {},
228
228
  _d[styles__default$1['default'].noHeader] = hideHeader || emptyHeader,
@@ -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-4b59a168.js');
20
+ var components_header_Component = require('./component-1deadd87.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');
@@ -1,3 +1,7 @@
1
+ :root {
2
+ --bottom-sheet-backer-bg-color: var(--color-light-bg-primary-alpha-40);
3
+ }
4
+
1
5
  .backer {
2
6
  width: 32px;
3
7
  height: 32px;
@@ -8,7 +12,7 @@
8
12
  }
9
13
 
10
14
  .button {
11
- background: rgba(0, 0, 0, 0.04);
15
+ background: var(--bottom-sheet-backer-bg-color);
12
16
  -webkit-backdrop-filter: blur(10px);
13
17
  backdrop-filter: blur(10px);
14
18
  border-radius: 50px;
@@ -1,3 +1,7 @@
1
+ :root {
2
+ --bottom-sheet-closer-bg-color: var(--color-light-bg-primary-alpha-40);
3
+ }
4
+
1
5
  .closer {
2
6
  width: 32px;
3
7
  height: 32px;
@@ -8,7 +12,7 @@
8
12
  }
9
13
 
10
14
  .button {
11
- background: rgba(0, 0, 0, 0.04);
15
+ background: var(--bottom-sheet-closer-bg-color);
12
16
  -webkit-backdrop-filter: blur(10px);
13
17
  backdrop-filter: blur(10px);
14
18
  border-radius: 50px;
@@ -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-4b59a168.js');
20
+ var components_header_Component = require('../../component-1deadd87.js');
21
21
  require('../footer/index.module.css');
22
22
  require('../footer/Component.js');
23
23
  require('@alfalab/core-components-backdrop/dist/cssm');
@@ -1,6 +1,5 @@
1
1
  :root {
2
2
  --color-light-bg-primary: #fff;
3
- --color-light-graphic-neutral: #dbdee1;
4
3
  }
5
4
  :root {
6
5
 
@@ -49,17 +48,6 @@
49
48
  .justifyEnd {
50
49
  justify-content: flex-end;
51
50
  }
52
- .marker {
53
- position: absolute;
54
- top: var(--gap-2xs);
55
- left: 50%;
56
- width: 36px;
57
- height: 4px;
58
- border-radius: 20px;
59
- transform: translateX(-50%);
60
- background-color: var(--color-light-graphic-neutral);
61
- z-index: 1000;
62
- }
63
51
  .addon {
64
52
  display: flex;
65
53
  justify-content: center;
@@ -1 +1 @@
1
- export * from "./component-4b59a168";
1
+ export * from "./component-1deadd87";
@@ -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-4b59a168.js');
20
+ var components_header_Component = require('./component-1deadd87.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');
@@ -51,7 +51,7 @@
51
51
  height: 100%;
52
52
  }
53
53
  .marker {
54
- position: absolute;
54
+ position: fixed;
55
55
  top: var(--gap-2xs);
56
56
  left: 50%;
57
57
  width: 36px;
@@ -25,11 +25,6 @@ type HeaderProps = {
25
25
  * Дополнительный класс для компонента стрелки назад
26
26
  */
27
27
  backerClassName?: string;
28
- /**
29
- * Будет ли свайпаться шторка
30
- * @default true
31
- */
32
- swipeable?: boolean;
33
28
  /**
34
29
  * Слот слева
35
30
  */