@alfalab/core-components-bottom-sheet 6.21.0 → 6.21.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.
package/component.js CHANGED
@@ -23,7 +23,7 @@ var React__default = /*#__PURE__*/_interopDefaultCompat(React);
23
23
  var mergeRefs__default = /*#__PURE__*/_interopDefaultCompat(mergeRefs);
24
24
  var cn__default = /*#__PURE__*/_interopDefaultCompat(cn);
25
25
 
26
- var styles = {"modal":"bottom-sheet__modal_19msl","wrapper":"bottom-sheet__wrapper_19msl","outerClassName":"bottom-sheet__outerClassName_19msl","fullscreen":"bottom-sheet__fullscreen_19msl","component":"bottom-sheet__component_19msl","withTransition":"bottom-sheet__withTransition_19msl","scrollableContainer":"bottom-sheet__scrollableContainer_19msl","marker":"bottom-sheet__marker_19msl","defaultMarker":"bottom-sheet__defaultMarker_19msl","content":"bottom-sheet__content_19msl","noHeader":"bottom-sheet__noHeader_19msl","noFooter":"bottom-sheet__noFooter_19msl","scrollLocked":"bottom-sheet__scrollLocked_19msl","hiddenScrollbar":"bottom-sheet__hiddenScrollbar_19msl","disabledPointerEvents":"bottom-sheet__disabledPointerEvents_19msl","appear":"bottom-sheet__appear_19msl","enter":"bottom-sheet__enter_19msl","appearActive":"bottom-sheet__appearActive_19msl","enterActive":"bottom-sheet__enterActive_19msl","enterDone":"bottom-sheet__enterDone_19msl","appearDone":"bottom-sheet__appearDone_19msl","exit":"bottom-sheet__exit_19msl","exitActive":"bottom-sheet__exitActive_19msl","safeAreaBottom":"bottom-sheet__safeAreaBottom_19msl","background-accent":"bottom-sheet__background-accent_19msl","background-info":"bottom-sheet__background-info_19msl","background-attention-muted":"bottom-sheet__background-attention-muted_19msl","background-positive-muted":"bottom-sheet__background-positive-muted_19msl","background-negative-muted":"bottom-sheet__background-negative-muted_19msl","background-primary":"bottom-sheet__background-primary_19msl","background-primary-inverted":"bottom-sheet__background-primary-inverted_19msl","background-secondary":"bottom-sheet__background-secondary_19msl","background-secondary-inverted":"bottom-sheet__background-secondary-inverted_19msl","background-tertiary":"bottom-sheet__background-tertiary_19msl","background-tertiary-inverted":"bottom-sheet__background-tertiary-inverted_19msl","background-quaternary":"bottom-sheet__background-quaternary_19msl","background-quaternary-inverted":"bottom-sheet__background-quaternary-inverted_19msl","background-specialbg-component":"bottom-sheet__background-specialbg-component_19msl","background-specialbg-component-inverted":"bottom-sheet__background-specialbg-component-inverted_19msl","background-specialbg-primary-grouped":"bottom-sheet__background-specialbg-primary-grouped_19msl","background-specialbg-secondary-grouped":"bottom-sheet__background-specialbg-secondary-grouped_19msl","background-specialbg-tertiary-grouped":"bottom-sheet__background-specialbg-tertiary-grouped_19msl","background-specialbg-secondary-transparent":"bottom-sheet__background-specialbg-secondary-transparent_19msl","background-specialbg-secondary-transparent-inverted":"bottom-sheet__background-specialbg-secondary-transparent-inverted_19msl","background-specialbg-tertiary-transparent":"bottom-sheet__background-specialbg-tertiary-transparent_19msl","background-specialbg-tertiary-transparent-inverted":"bottom-sheet__background-specialbg-tertiary-transparent-inverted_19msl"};
26
+ var styles = {"modal":"bottom-sheet__modal_1b6dr","wrapper":"bottom-sheet__wrapper_1b6dr","outerClassName":"bottom-sheet__outerClassName_1b6dr","fullscreen":"bottom-sheet__fullscreen_1b6dr","component":"bottom-sheet__component_1b6dr","withTransition":"bottom-sheet__withTransition_1b6dr","scrollableContainer":"bottom-sheet__scrollableContainer_1b6dr","marker":"bottom-sheet__marker_1b6dr","defaultMarker":"bottom-sheet__defaultMarker_1b6dr","content":"bottom-sheet__content_1b6dr","noHeader":"bottom-sheet__noHeader_1b6dr","noFooter":"bottom-sheet__noFooter_1b6dr","scrollLocked":"bottom-sheet__scrollLocked_1b6dr","hiddenScrollbar":"bottom-sheet__hiddenScrollbar_1b6dr","disabledPointerEvents":"bottom-sheet__disabledPointerEvents_1b6dr","appear":"bottom-sheet__appear_1b6dr","enter":"bottom-sheet__enter_1b6dr","appearActive":"bottom-sheet__appearActive_1b6dr","enterActive":"bottom-sheet__enterActive_1b6dr","enterDone":"bottom-sheet__enterDone_1b6dr","appearDone":"bottom-sheet__appearDone_1b6dr","exit":"bottom-sheet__exit_1b6dr","exitActive":"bottom-sheet__exitActive_1b6dr","safeAreaBottom":"bottom-sheet__safeAreaBottom_1b6dr","background-accent":"bottom-sheet__background-accent_1b6dr","background-info":"bottom-sheet__background-info_1b6dr","background-attention-muted":"bottom-sheet__background-attention-muted_1b6dr","background-positive-muted":"bottom-sheet__background-positive-muted_1b6dr","background-negative-muted":"bottom-sheet__background-negative-muted_1b6dr","background-primary":"bottom-sheet__background-primary_1b6dr","background-primary-inverted":"bottom-sheet__background-primary-inverted_1b6dr","background-secondary":"bottom-sheet__background-secondary_1b6dr","background-secondary-inverted":"bottom-sheet__background-secondary-inverted_1b6dr","background-tertiary":"bottom-sheet__background-tertiary_1b6dr","background-tertiary-inverted":"bottom-sheet__background-tertiary-inverted_1b6dr","background-quaternary":"bottom-sheet__background-quaternary_1b6dr","background-quaternary-inverted":"bottom-sheet__background-quaternary-inverted_1b6dr","background-specialbg-component":"bottom-sheet__background-specialbg-component_1b6dr","background-specialbg-component-inverted":"bottom-sheet__background-specialbg-component-inverted_1b6dr","background-specialbg-primary-grouped":"bottom-sheet__background-specialbg-primary-grouped_1b6dr","background-specialbg-secondary-grouped":"bottom-sheet__background-specialbg-secondary-grouped_1b6dr","background-specialbg-tertiary-grouped":"bottom-sheet__background-specialbg-tertiary-grouped_1b6dr","background-specialbg-secondary-transparent":"bottom-sheet__background-specialbg-secondary-transparent_1b6dr","background-specialbg-secondary-transparent-inverted":"bottom-sheet__background-specialbg-secondary-transparent-inverted_1b6dr","background-specialbg-tertiary-transparent":"bottom-sheet__background-specialbg-tertiary-transparent_1b6dr","background-specialbg-tertiary-transparent-inverted":"bottom-sheet__background-specialbg-tertiary-transparent-inverted_1b6dr"};
27
27
  require('./index.css')
28
28
 
29
29
  var isNil = coreComponentsShared.fnUtils.isNil;
@@ -41,6 +41,7 @@ function (_a, ref) {
41
41
  var isFirstRender = fullHeight === 0;
42
42
  fullHeight = adjustContainerHeight(fullHeight);
43
43
  var initialIndexRef = React.useRef(initialActiveAreaIndex);
44
+ var prevMagneticAreasPropRef = React.useRef(magneticAreasProp);
44
45
  var magneticAreas = React.useMemo(function () {
45
46
  var _a;
46
47
  if (magneticAreasProp) {
@@ -64,7 +65,8 @@ function (_a, ref) {
64
65
  var _z = React.useState(0), sheetOffset = _z[0], setSheetOffset = _z[1];
65
66
  var _0 = React.useState(1), backdropOpacity = _0[0], setBackdropOpacity = _0[1];
66
67
  var _1 = React.useState(-1), activeAreaIdx = _1[0], setActiveAreaIdx = _1[1];
67
- var _2 = React.useState(null), swipingInProgress = _2[0], setSwipingInProgress = _2[1];
68
+ var _2 = React.useState(false), skipTransition = _2[0], setSkipTransition = _2[1];
69
+ var _3 = React.useState(null), swipingInProgress = _3[0], setSwipingInProgress = _3[1];
68
70
  var scrollOccurred = React.useRef(false);
69
71
  var headerRef = React.useRef(null);
70
72
  var contentRef = React.useRef(null);
@@ -337,6 +339,11 @@ function (_a, ref) {
337
339
  };
338
340
  React.useEffect(function () {
339
341
  if (!isFirstRender) {
342
+ var magneticAreasPropChanged = prevMagneticAreasPropRef.current !== magneticAreasProp;
343
+ prevMagneticAreasPropRef.current = magneticAreasProp;
344
+ if (magneticAreasPropChanged) {
345
+ setSkipTransition(true);
346
+ }
340
347
  // Инициализируем стейт только после того, как была рассчитана высота вьюпорта
341
348
  if (activeAreaIdx === -1) {
342
349
  var idx = initialIndexRef.current;
@@ -346,9 +353,14 @@ function (_a, ref) {
346
353
  else {
347
354
  setSheetOffset(activeArea ? lastMagneticArea - activeArea : 0);
348
355
  }
356
+ if (magneticAreasPropChanged) {
357
+ requestAnimationFrame(function () {
358
+ setSkipTransition(false);
359
+ });
360
+ }
349
361
  }
350
362
  // eslint-disable-next-line react-hooks/exhaustive-deps
351
- }, [isFirstRender, magneticAreas, lastMagneticArea]);
363
+ }, [isFirstRender, magneticAreas, lastMagneticArea, magneticAreasProp]);
352
364
  React.useEffect(function () {
353
365
  if (!sheetRef.current)
354
366
  return;
@@ -390,7 +402,7 @@ function (_a, ref) {
390
402
  _c)), onTransitionEnd: setSheetHeight },
391
403
  outerAddons && (React__default.default.createElement("div", { className: cn__default.default(styles.outerClassName, outerClassName), style: getSwipeStyles() }, outerAddons)),
392
404
  React__default.default.createElement("div", tslib.__assign({ className: cn__default.default(styles.component, bgClassName, className, (_d = {},
393
- _d[styles.withTransition] = swipingInProgress === false,
405
+ _d[styles.withTransition] = swipingInProgress === false && !skipTransition,
394
406
  _d[styles.safeAreaBottom] = coreComponentsShared.os.isIOS(),
395
407
  _d)), style: tslib.__assign(tslib.__assign({}, getSwipeStyles()), getHeightStyles()) }, sheetSwipeableHandlers, { ref: mergeRefs__default.default([sheetRef, sheetContainerRef, sheetSwipeableHandlers.ref]), onTransitionEnd: handleTransitionEnd }),
396
408
  renderMarker(),
@@ -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 = {"footer":"bottom-sheet__footer_vpojn","sticky":"bottom-sheet__sticky_vpojn","highlighted":"bottom-sheet__highlighted_vpojn","background-accent":"bottom-sheet__background-accent_vpojn","background-info":"bottom-sheet__background-info_vpojn","background-attention-muted":"bottom-sheet__background-attention-muted_vpojn","background-positive-muted":"bottom-sheet__background-positive-muted_vpojn","background-negative-muted":"bottom-sheet__background-negative-muted_vpojn","background-primary":"bottom-sheet__background-primary_vpojn","background-primary-inverted":"bottom-sheet__background-primary-inverted_vpojn","background-secondary":"bottom-sheet__background-secondary_vpojn","background-secondary-inverted":"bottom-sheet__background-secondary-inverted_vpojn","background-tertiary":"bottom-sheet__background-tertiary_vpojn","background-tertiary-inverted":"bottom-sheet__background-tertiary-inverted_vpojn","background-quaternary":"bottom-sheet__background-quaternary_vpojn","background-quaternary-inverted":"bottom-sheet__background-quaternary-inverted_vpojn","background-specialbg-component":"bottom-sheet__background-specialbg-component_vpojn","background-specialbg-component-inverted":"bottom-sheet__background-specialbg-component-inverted_vpojn","background-specialbg-primary-grouped":"bottom-sheet__background-specialbg-primary-grouped_vpojn","background-specialbg-secondary-grouped":"bottom-sheet__background-specialbg-secondary-grouped_vpojn","background-specialbg-tertiary-grouped":"bottom-sheet__background-specialbg-tertiary-grouped_vpojn","background-specialbg-secondary-transparent":"bottom-sheet__background-specialbg-secondary-transparent_vpojn","background-specialbg-secondary-transparent-inverted":"bottom-sheet__background-specialbg-secondary-transparent-inverted_vpojn","background-specialbg-tertiary-transparent":"bottom-sheet__background-specialbg-tertiary-transparent_vpojn","background-specialbg-tertiary-transparent-inverted":"bottom-sheet__background-specialbg-tertiary-transparent-inverted_vpojn"};
14
+ var styles = {"footer":"bottom-sheet__footer_vtjlo","sticky":"bottom-sheet__sticky_vtjlo","highlighted":"bottom-sheet__highlighted_vtjlo","background-accent":"bottom-sheet__background-accent_vtjlo","background-info":"bottom-sheet__background-info_vtjlo","background-attention-muted":"bottom-sheet__background-attention-muted_vtjlo","background-positive-muted":"bottom-sheet__background-positive-muted_vtjlo","background-negative-muted":"bottom-sheet__background-negative-muted_vtjlo","background-primary":"bottom-sheet__background-primary_vtjlo","background-primary-inverted":"bottom-sheet__background-primary-inverted_vtjlo","background-secondary":"bottom-sheet__background-secondary_vtjlo","background-secondary-inverted":"bottom-sheet__background-secondary-inverted_vtjlo","background-tertiary":"bottom-sheet__background-tertiary_vtjlo","background-tertiary-inverted":"bottom-sheet__background-tertiary-inverted_vtjlo","background-quaternary":"bottom-sheet__background-quaternary_vtjlo","background-quaternary-inverted":"bottom-sheet__background-quaternary-inverted_vtjlo","background-specialbg-component":"bottom-sheet__background-specialbg-component_vtjlo","background-specialbg-component-inverted":"bottom-sheet__background-specialbg-component-inverted_vtjlo","background-specialbg-primary-grouped":"bottom-sheet__background-specialbg-primary-grouped_vtjlo","background-specialbg-secondary-grouped":"bottom-sheet__background-specialbg-secondary-grouped_vtjlo","background-specialbg-tertiary-grouped":"bottom-sheet__background-specialbg-tertiary-grouped_vtjlo","background-specialbg-secondary-transparent":"bottom-sheet__background-specialbg-secondary-transparent_vtjlo","background-specialbg-secondary-transparent-inverted":"bottom-sheet__background-specialbg-secondary-transparent-inverted_vtjlo","background-specialbg-tertiary-transparent":"bottom-sheet__background-specialbg-tertiary-transparent_vtjlo","background-specialbg-tertiary-transparent-inverted":"bottom-sheet__background-specialbg-tertiary-transparent-inverted_vtjlo"};
15
15
  require('./index.css')
16
16
 
17
17
  var Footer = function (_a) {
@@ -1,4 +1,4 @@
1
- /* hash: 187e8 */
1
+ /* hash: 19hgu */
2
2
  :root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
3
3
  } /* deprecated */ :root {
4
4
  --color-light-modal-bg-primary: #fff;
@@ -55,58 +55,58 @@
55
55
  /* footer */
56
56
  --bottom-sheet-footer-border-top: 1px solid var(--color-light-neutral-300);
57
57
  --bottom-sheet-footer-background-color: var(--color-light-modal-bg-primary);
58
- } .bottom-sheet__footer_vpojn {
58
+ } .bottom-sheet__footer_vtjlo {
59
59
  padding: var(--gap-16) var(--gap-16);
60
60
  background-color: var(--color-light-modal-bg-primary);
61
- } .bottom-sheet__sticky_vpojn {
61
+ } .bottom-sheet__sticky_vtjlo {
62
62
  position: sticky;
63
63
  bottom: var(--gap-0);
64
64
  z-index: 1;
65
- } .bottom-sheet__highlighted_vpojn {
65
+ } .bottom-sheet__highlighted_vtjlo {
66
66
  border-top: var(--bottom-sheet-footer-border-top);
67
67
  background-color: var(--bottom-sheet-footer-background-color);
68
- } .bottom-sheet__background-accent_vpojn {
68
+ } .bottom-sheet__background-accent_vtjlo {
69
69
  background-color: var(--color-light-bg-accent);
70
- } .bottom-sheet__background-info_vpojn {
70
+ } .bottom-sheet__background-info_vtjlo {
71
71
  background-color: var(--color-light-bg-info);
72
- } .bottom-sheet__background-attention-muted_vpojn {
72
+ } .bottom-sheet__background-attention-muted_vtjlo {
73
73
  background-color: var(--color-light-bg-attention-muted);
74
- } .bottom-sheet__background-positive-muted_vpojn {
74
+ } .bottom-sheet__background-positive-muted_vtjlo {
75
75
  background-color: var(--color-light-bg-positive-muted);
76
- } .bottom-sheet__background-negative-muted_vpojn {
76
+ } .bottom-sheet__background-negative-muted_vtjlo {
77
77
  background-color: var(--color-light-bg-negative-muted);
78
- } .bottom-sheet__background-primary_vpojn {
78
+ } .bottom-sheet__background-primary_vtjlo {
79
79
  background-color: var(--color-light-bg-primary);
80
- } .bottom-sheet__background-primary-inverted_vpojn {
80
+ } .bottom-sheet__background-primary-inverted_vtjlo {
81
81
  background-color: var(--color-light-bg-primary-inverted);
82
- } .bottom-sheet__background-secondary_vpojn {
82
+ } .bottom-sheet__background-secondary_vtjlo {
83
83
  background-color: var(--color-light-bg-secondary);
84
- } .bottom-sheet__background-secondary-inverted_vpojn {
84
+ } .bottom-sheet__background-secondary-inverted_vtjlo {
85
85
  background-color: var(--color-light-bg-secondary-inverted);
86
- } .bottom-sheet__background-tertiary_vpojn {
86
+ } .bottom-sheet__background-tertiary_vtjlo {
87
87
  background-color: var(--color-light-bg-tertiary);
88
- } .bottom-sheet__background-tertiary-inverted_vpojn {
88
+ } .bottom-sheet__background-tertiary-inverted_vtjlo {
89
89
  background-color: var(--color-light-bg-tertiary-inverted);
90
- } .bottom-sheet__background-quaternary_vpojn {
90
+ } .bottom-sheet__background-quaternary_vtjlo {
91
91
  background-color: var(--color-light-bg-quaternary);
92
- } .bottom-sheet__background-quaternary-inverted_vpojn {
92
+ } .bottom-sheet__background-quaternary-inverted_vtjlo {
93
93
  background-color: var(--color-light-bg-quaternary-inverted);
94
- } .bottom-sheet__background-specialbg-component_vpojn {
94
+ } .bottom-sheet__background-specialbg-component_vtjlo {
95
95
  background-color: var(--color-light-specialbg-component);
96
- } .bottom-sheet__background-specialbg-component-inverted_vpojn {
96
+ } .bottom-sheet__background-specialbg-component-inverted_vtjlo {
97
97
  background-color: var(--color-light-specialbg-component-inverted);
98
- } .bottom-sheet__background-specialbg-primary-grouped_vpojn {
98
+ } .bottom-sheet__background-specialbg-primary-grouped_vtjlo {
99
99
  background-color: var(--color-light-specialbg-primary-grouped);
100
- } .bottom-sheet__background-specialbg-secondary-grouped_vpojn {
100
+ } .bottom-sheet__background-specialbg-secondary-grouped_vtjlo {
101
101
  background-color: var(--color-light-specialbg-secondary-grouped);
102
- } .bottom-sheet__background-specialbg-tertiary-grouped_vpojn {
102
+ } .bottom-sheet__background-specialbg-tertiary-grouped_vtjlo {
103
103
  background-color: var(--color-light-specialbg-tertiary-grouped);
104
- } .bottom-sheet__background-specialbg-secondary-transparent_vpojn {
104
+ } .bottom-sheet__background-specialbg-secondary-transparent_vtjlo {
105
105
  background-color: var(--color-light-specialbg-secondary-transparent);
106
- } .bottom-sheet__background-specialbg-secondary-transparent-inverted_vpojn {
106
+ } .bottom-sheet__background-specialbg-secondary-transparent-inverted_vtjlo {
107
107
  background-color: var(--color-light-specialbg-secondary-transparent-inverted);
108
- } .bottom-sheet__background-specialbg-tertiary-transparent_vpojn {
108
+ } .bottom-sheet__background-specialbg-tertiary-transparent_vtjlo {
109
109
  background-color: var(--color-light-specialbg-tertiary-transparent);
110
- } .bottom-sheet__background-specialbg-tertiary-transparent-inverted_vpojn {
110
+ } .bottom-sheet__background-specialbg-tertiary-transparent-inverted_vtjlo {
111
111
  background-color: var(--color-light-specialbg-tertiary-transparent-inverted);
112
112
  }
@@ -13,7 +13,7 @@ function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'defau
13
13
  var React__default = /*#__PURE__*/_interopDefaultCompat(React);
14
14
  var cn__default = /*#__PURE__*/_interopDefaultCompat(cn);
15
15
 
16
- var styles = {"headerBase":"bottom-sheet__headerBase_yvzuo","headerWrapper":"bottom-sheet__headerWrapper_yvzuo bottom-sheet__headerBase_yvzuo","headerWrapperWithoutSwipeMarker":"bottom-sheet__headerWrapperWithoutSwipeMarker_yvzuo bottom-sheet__headerBase_yvzuo","hasContent":"bottom-sheet__hasContent_yvzuo","header":"bottom-sheet__header_yvzuo","sticky":"bottom-sheet__sticky_yvzuo","highlighted":"bottom-sheet__highlighted_yvzuo","justifyEnd":"bottom-sheet__justifyEnd_yvzuo","addon":"bottom-sheet__addon_yvzuo","addonFixed":"bottom-sheet__addonFixed_yvzuo","title":"bottom-sheet__title_yvzuo","titleCenter":"bottom-sheet__titleCenter_yvzuo","titleLeft":"bottom-sheet__titleLeft_yvzuo","trimTitle":"bottom-sheet__trimTitle_yvzuo"};
16
+ var styles = {"headerBase":"bottom-sheet__headerBase_1kquv","headerWrapper":"bottom-sheet__headerWrapper_1kquv bottom-sheet__headerBase_1kquv","headerWrapperWithoutSwipeMarker":"bottom-sheet__headerWrapperWithoutSwipeMarker_1kquv bottom-sheet__headerBase_1kquv","hasContent":"bottom-sheet__hasContent_1kquv","header":"bottom-sheet__header_1kquv","sticky":"bottom-sheet__sticky_1kquv","highlighted":"bottom-sheet__highlighted_1kquv","justifyEnd":"bottom-sheet__justifyEnd_1kquv","addon":"bottom-sheet__addon_1kquv","addonFixed":"bottom-sheet__addonFixed_1kquv","title":"bottom-sheet__title_1kquv","titleCenter":"bottom-sheet__titleCenter_1kquv","titleLeft":"bottom-sheet__titleLeft_1kquv","trimTitle":"bottom-sheet__trimTitle_1kquv"};
17
17
  require('./index.css')
18
18
 
19
19
  var Header = function (_a) {
@@ -1,4 +1,4 @@
1
- /* hash: b3zuh */
1
+ /* hash: ce2gf */
2
2
  :root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
3
3
  } /* deprecated */ :root {
4
4
  --color-light-neutral-300: #e7e8eb; /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
@@ -41,45 +41,45 @@
41
41
  --bottom-sheet-title-font-family: var(--font-family-system);
42
42
 
43
43
  /* footer */
44
- } .bottom-sheet__headerBase_yvzuo {
44
+ } .bottom-sheet__headerBase_1kquv {
45
45
  border-top-left-radius: inherit;
46
46
  border-top-right-radius: inherit;
47
47
  z-index: 1;
48
- } .bottom-sheet__headerWrapper_yvzuo {
48
+ } .bottom-sheet__headerWrapper_1kquv {
49
49
  padding: var(--gap-12) var(--gap-8) var(--gap-4);
50
- } .bottom-sheet__headerWrapperWithoutSwipeMarker_yvzuo {
50
+ } .bottom-sheet__headerWrapperWithoutSwipeMarker_1kquv {
51
51
  padding: var(--gap-8) var(--gap-8) var(--gap-4);
52
- } .bottom-sheet__hasContent_yvzuo {
52
+ } .bottom-sheet__hasContent_1kquv {
53
53
  background-color: inherit;
54
- } .bottom-sheet__header_yvzuo {
54
+ } .bottom-sheet__header_1kquv {
55
55
  display: flex;
56
- } .bottom-sheet__sticky_yvzuo {
56
+ } .bottom-sheet__sticky_1kquv {
57
57
  position: sticky;
58
58
  top: var(--gap-0);
59
- } .bottom-sheet__highlighted_yvzuo {
59
+ } .bottom-sheet__highlighted_1kquv {
60
60
  border-bottom: var(--bottom-sheet-header-border-bottom);
61
- } .bottom-sheet__justifyEnd_yvzuo {
61
+ } .bottom-sheet__justifyEnd_1kquv {
62
62
  justify-content: flex-end;
63
- } .bottom-sheet__addon_yvzuo {
63
+ } .bottom-sheet__addon_1kquv {
64
64
  display: flex;
65
65
  justify-content: center;
66
66
  align-items: center;
67
67
  min-width: 48px;
68
68
  height: 48px;
69
- } .bottom-sheet__addonFixed_yvzuo {
69
+ } .bottom-sheet__addonFixed_1kquv {
70
70
  position: fixed;
71
- } .bottom-sheet__title_yvzuo {
71
+ } .bottom-sheet__title_1kquv {
72
72
  padding: 10px var(--gap-8);
73
73
  width: 100%;
74
74
  font-size: var(--bottom-sheet-title-font-size);
75
75
  font-weight: var(--bottom-sheet-title-font-weight);
76
76
  line-height: var(--bottom-sheet-title-line-height);
77
77
  font-family: var(--bottom-sheet-title-font-family);
78
- } .bottom-sheet__titleCenter_yvzuo {
78
+ } .bottom-sheet__titleCenter_1kquv {
79
79
  text-align: center;
80
- } .bottom-sheet__titleLeft_yvzuo {
80
+ } .bottom-sheet__titleLeft_1kquv {
81
81
  text-align: left;
82
- } .bottom-sheet__trimTitle_yvzuo {
82
+ } .bottom-sheet__trimTitle_1kquv {
83
83
  white-space: nowrap;
84
84
  overflow: hidden;
85
85
  text-overflow: ellipsis;
package/cssm/component.js CHANGED
@@ -40,6 +40,7 @@ function (_a, ref) {
40
40
  var isFirstRender = fullHeight === 0;
41
41
  fullHeight = adjustContainerHeight(fullHeight);
42
42
  var initialIndexRef = React.useRef(initialActiveAreaIndex);
43
+ var prevMagneticAreasPropRef = React.useRef(magneticAreasProp);
43
44
  var magneticAreas = React.useMemo(function () {
44
45
  var _a;
45
46
  if (magneticAreasProp) {
@@ -63,7 +64,8 @@ function (_a, ref) {
63
64
  var _z = React.useState(0), sheetOffset = _z[0], setSheetOffset = _z[1];
64
65
  var _0 = React.useState(1), backdropOpacity = _0[0], setBackdropOpacity = _0[1];
65
66
  var _1 = React.useState(-1), activeAreaIdx = _1[0], setActiveAreaIdx = _1[1];
66
- var _2 = React.useState(null), swipingInProgress = _2[0], setSwipingInProgress = _2[1];
67
+ var _2 = React.useState(false), skipTransition = _2[0], setSkipTransition = _2[1];
68
+ var _3 = React.useState(null), swipingInProgress = _3[0], setSwipingInProgress = _3[1];
67
69
  var scrollOccurred = React.useRef(false);
68
70
  var headerRef = React.useRef(null);
69
71
  var contentRef = React.useRef(null);
@@ -336,6 +338,11 @@ function (_a, ref) {
336
338
  };
337
339
  React.useEffect(function () {
338
340
  if (!isFirstRender) {
341
+ var magneticAreasPropChanged = prevMagneticAreasPropRef.current !== magneticAreasProp;
342
+ prevMagneticAreasPropRef.current = magneticAreasProp;
343
+ if (magneticAreasPropChanged) {
344
+ setSkipTransition(true);
345
+ }
339
346
  // Инициализируем стейт только после того, как была рассчитана высота вьюпорта
340
347
  if (activeAreaIdx === -1) {
341
348
  var idx = initialIndexRef.current;
@@ -345,9 +352,14 @@ function (_a, ref) {
345
352
  else {
346
353
  setSheetOffset(activeArea ? lastMagneticArea - activeArea : 0);
347
354
  }
355
+ if (magneticAreasPropChanged) {
356
+ requestAnimationFrame(function () {
357
+ setSkipTransition(false);
358
+ });
359
+ }
348
360
  }
349
361
  // eslint-disable-next-line react-hooks/exhaustive-deps
350
- }, [isFirstRender, magneticAreas, lastMagneticArea]);
362
+ }, [isFirstRender, magneticAreas, lastMagneticArea, magneticAreasProp]);
351
363
  React.useEffect(function () {
352
364
  if (!sheetRef.current)
353
365
  return;
@@ -389,7 +401,7 @@ function (_a, ref) {
389
401
  _c)), onTransitionEnd: setSheetHeight },
390
402
  outerAddons && (React__default.default.createElement("div", { className: cn__default.default(styles__default.default.outerClassName, outerClassName), style: getSwipeStyles() }, outerAddons)),
391
403
  React__default.default.createElement("div", tslib.__assign({ className: cn__default.default(styles__default.default.component, bgClassName, className, (_d = {},
392
- _d[styles__default.default.withTransition] = swipingInProgress === false,
404
+ _d[styles__default.default.withTransition] = swipingInProgress === false && !skipTransition,
393
405
  _d[styles__default.default.safeAreaBottom] = coreComponentsShared.os.isIOS(),
394
406
  _d)), style: tslib.__assign(tslib.__assign({}, getSwipeStyles()), getHeightStyles()) }, sheetSwipeableHandlers, { ref: mergeRefs__default.default([sheetRef, sheetContainerRef, sheetSwipeableHandlers.ref]), onTransitionEnd: handleTransitionEnd }),
395
407
  renderMarker(),
package/esm/component.js CHANGED
@@ -13,7 +13,7 @@ import { horizontalDirections } from './consts/swipeConsts.js';
13
13
  import { useVisualViewportSize } from './hooks/use-visualviewport-size.js';
14
14
  import { convertPercentToNumber, TIMEOUT, MARKER_HEIGHT, SCROLL_OFFSET, SWIPE_VELOCITY, CLOSE_OFFSET } from './utils.js';
15
15
 
16
- var styles = {"modal":"bottom-sheet__modal_19msl","wrapper":"bottom-sheet__wrapper_19msl","outerClassName":"bottom-sheet__outerClassName_19msl","fullscreen":"bottom-sheet__fullscreen_19msl","component":"bottom-sheet__component_19msl","withTransition":"bottom-sheet__withTransition_19msl","scrollableContainer":"bottom-sheet__scrollableContainer_19msl","marker":"bottom-sheet__marker_19msl","defaultMarker":"bottom-sheet__defaultMarker_19msl","content":"bottom-sheet__content_19msl","noHeader":"bottom-sheet__noHeader_19msl","noFooter":"bottom-sheet__noFooter_19msl","scrollLocked":"bottom-sheet__scrollLocked_19msl","hiddenScrollbar":"bottom-sheet__hiddenScrollbar_19msl","disabledPointerEvents":"bottom-sheet__disabledPointerEvents_19msl","appear":"bottom-sheet__appear_19msl","enter":"bottom-sheet__enter_19msl","appearActive":"bottom-sheet__appearActive_19msl","enterActive":"bottom-sheet__enterActive_19msl","enterDone":"bottom-sheet__enterDone_19msl","appearDone":"bottom-sheet__appearDone_19msl","exit":"bottom-sheet__exit_19msl","exitActive":"bottom-sheet__exitActive_19msl","safeAreaBottom":"bottom-sheet__safeAreaBottom_19msl","background-accent":"bottom-sheet__background-accent_19msl","background-info":"bottom-sheet__background-info_19msl","background-attention-muted":"bottom-sheet__background-attention-muted_19msl","background-positive-muted":"bottom-sheet__background-positive-muted_19msl","background-negative-muted":"bottom-sheet__background-negative-muted_19msl","background-primary":"bottom-sheet__background-primary_19msl","background-primary-inverted":"bottom-sheet__background-primary-inverted_19msl","background-secondary":"bottom-sheet__background-secondary_19msl","background-secondary-inverted":"bottom-sheet__background-secondary-inverted_19msl","background-tertiary":"bottom-sheet__background-tertiary_19msl","background-tertiary-inverted":"bottom-sheet__background-tertiary-inverted_19msl","background-quaternary":"bottom-sheet__background-quaternary_19msl","background-quaternary-inverted":"bottom-sheet__background-quaternary-inverted_19msl","background-specialbg-component":"bottom-sheet__background-specialbg-component_19msl","background-specialbg-component-inverted":"bottom-sheet__background-specialbg-component-inverted_19msl","background-specialbg-primary-grouped":"bottom-sheet__background-specialbg-primary-grouped_19msl","background-specialbg-secondary-grouped":"bottom-sheet__background-specialbg-secondary-grouped_19msl","background-specialbg-tertiary-grouped":"bottom-sheet__background-specialbg-tertiary-grouped_19msl","background-specialbg-secondary-transparent":"bottom-sheet__background-specialbg-secondary-transparent_19msl","background-specialbg-secondary-transparent-inverted":"bottom-sheet__background-specialbg-secondary-transparent-inverted_19msl","background-specialbg-tertiary-transparent":"bottom-sheet__background-specialbg-tertiary-transparent_19msl","background-specialbg-tertiary-transparent-inverted":"bottom-sheet__background-specialbg-tertiary-transparent-inverted_19msl"};
16
+ var styles = {"modal":"bottom-sheet__modal_1b6dr","wrapper":"bottom-sheet__wrapper_1b6dr","outerClassName":"bottom-sheet__outerClassName_1b6dr","fullscreen":"bottom-sheet__fullscreen_1b6dr","component":"bottom-sheet__component_1b6dr","withTransition":"bottom-sheet__withTransition_1b6dr","scrollableContainer":"bottom-sheet__scrollableContainer_1b6dr","marker":"bottom-sheet__marker_1b6dr","defaultMarker":"bottom-sheet__defaultMarker_1b6dr","content":"bottom-sheet__content_1b6dr","noHeader":"bottom-sheet__noHeader_1b6dr","noFooter":"bottom-sheet__noFooter_1b6dr","scrollLocked":"bottom-sheet__scrollLocked_1b6dr","hiddenScrollbar":"bottom-sheet__hiddenScrollbar_1b6dr","disabledPointerEvents":"bottom-sheet__disabledPointerEvents_1b6dr","appear":"bottom-sheet__appear_1b6dr","enter":"bottom-sheet__enter_1b6dr","appearActive":"bottom-sheet__appearActive_1b6dr","enterActive":"bottom-sheet__enterActive_1b6dr","enterDone":"bottom-sheet__enterDone_1b6dr","appearDone":"bottom-sheet__appearDone_1b6dr","exit":"bottom-sheet__exit_1b6dr","exitActive":"bottom-sheet__exitActive_1b6dr","safeAreaBottom":"bottom-sheet__safeAreaBottom_1b6dr","background-accent":"bottom-sheet__background-accent_1b6dr","background-info":"bottom-sheet__background-info_1b6dr","background-attention-muted":"bottom-sheet__background-attention-muted_1b6dr","background-positive-muted":"bottom-sheet__background-positive-muted_1b6dr","background-negative-muted":"bottom-sheet__background-negative-muted_1b6dr","background-primary":"bottom-sheet__background-primary_1b6dr","background-primary-inverted":"bottom-sheet__background-primary-inverted_1b6dr","background-secondary":"bottom-sheet__background-secondary_1b6dr","background-secondary-inverted":"bottom-sheet__background-secondary-inverted_1b6dr","background-tertiary":"bottom-sheet__background-tertiary_1b6dr","background-tertiary-inverted":"bottom-sheet__background-tertiary-inverted_1b6dr","background-quaternary":"bottom-sheet__background-quaternary_1b6dr","background-quaternary-inverted":"bottom-sheet__background-quaternary-inverted_1b6dr","background-specialbg-component":"bottom-sheet__background-specialbg-component_1b6dr","background-specialbg-component-inverted":"bottom-sheet__background-specialbg-component-inverted_1b6dr","background-specialbg-primary-grouped":"bottom-sheet__background-specialbg-primary-grouped_1b6dr","background-specialbg-secondary-grouped":"bottom-sheet__background-specialbg-secondary-grouped_1b6dr","background-specialbg-tertiary-grouped":"bottom-sheet__background-specialbg-tertiary-grouped_1b6dr","background-specialbg-secondary-transparent":"bottom-sheet__background-specialbg-secondary-transparent_1b6dr","background-specialbg-secondary-transparent-inverted":"bottom-sheet__background-specialbg-secondary-transparent-inverted_1b6dr","background-specialbg-tertiary-transparent":"bottom-sheet__background-specialbg-tertiary-transparent_1b6dr","background-specialbg-tertiary-transparent-inverted":"bottom-sheet__background-specialbg-tertiary-transparent-inverted_1b6dr"};
17
17
  require('./index.css')
18
18
 
19
19
  var isNil = fnUtils.isNil;
@@ -31,6 +31,7 @@ function (_a, ref) {
31
31
  var isFirstRender = fullHeight === 0;
32
32
  fullHeight = adjustContainerHeight(fullHeight);
33
33
  var initialIndexRef = useRef(initialActiveAreaIndex);
34
+ var prevMagneticAreasPropRef = useRef(magneticAreasProp);
34
35
  var magneticAreas = useMemo(function () {
35
36
  var _a;
36
37
  if (magneticAreasProp) {
@@ -54,7 +55,8 @@ function (_a, ref) {
54
55
  var _z = useState(0), sheetOffset = _z[0], setSheetOffset = _z[1];
55
56
  var _0 = useState(1), backdropOpacity = _0[0], setBackdropOpacity = _0[1];
56
57
  var _1 = useState(-1), activeAreaIdx = _1[0], setActiveAreaIdx = _1[1];
57
- var _2 = useState(null), swipingInProgress = _2[0], setSwipingInProgress = _2[1];
58
+ var _2 = useState(false), skipTransition = _2[0], setSkipTransition = _2[1];
59
+ var _3 = useState(null), swipingInProgress = _3[0], setSwipingInProgress = _3[1];
58
60
  var scrollOccurred = useRef(false);
59
61
  var headerRef = useRef(null);
60
62
  var contentRef = useRef(null);
@@ -327,6 +329,11 @@ function (_a, ref) {
327
329
  };
328
330
  useEffect(function () {
329
331
  if (!isFirstRender) {
332
+ var magneticAreasPropChanged = prevMagneticAreasPropRef.current !== magneticAreasProp;
333
+ prevMagneticAreasPropRef.current = magneticAreasProp;
334
+ if (magneticAreasPropChanged) {
335
+ setSkipTransition(true);
336
+ }
330
337
  // Инициализируем стейт только после того, как была рассчитана высота вьюпорта
331
338
  if (activeAreaIdx === -1) {
332
339
  var idx = initialIndexRef.current;
@@ -336,9 +343,14 @@ function (_a, ref) {
336
343
  else {
337
344
  setSheetOffset(activeArea ? lastMagneticArea - activeArea : 0);
338
345
  }
346
+ if (magneticAreasPropChanged) {
347
+ requestAnimationFrame(function () {
348
+ setSkipTransition(false);
349
+ });
350
+ }
339
351
  }
340
352
  // eslint-disable-next-line react-hooks/exhaustive-deps
341
- }, [isFirstRender, magneticAreas, lastMagneticArea]);
353
+ }, [isFirstRender, magneticAreas, lastMagneticArea, magneticAreasProp]);
342
354
  useEffect(function () {
343
355
  if (!sheetRef.current)
344
356
  return;
@@ -380,7 +392,7 @@ function (_a, ref) {
380
392
  _c)), onTransitionEnd: setSheetHeight },
381
393
  outerAddons && (React.createElement("div", { className: cn(styles.outerClassName, outerClassName), style: getSwipeStyles() }, outerAddons)),
382
394
  React.createElement("div", __assign({ className: cn(styles.component, bgClassName, className, (_d = {},
383
- _d[styles.withTransition] = swipingInProgress === false,
395
+ _d[styles.withTransition] = swipingInProgress === false && !skipTransition,
384
396
  _d[styles.safeAreaBottom] = os.isIOS(),
385
397
  _d)), style: __assign(__assign({}, getSwipeStyles()), getHeightStyles()) }, sheetSwipeableHandlers, { ref: mergeRefs([sheetRef, sheetContainerRef, sheetSwipeableHandlers.ref]), onTransitionEnd: handleTransitionEnd }),
386
398
  renderMarker(),
@@ -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_vpojn","sticky":"bottom-sheet__sticky_vpojn","highlighted":"bottom-sheet__highlighted_vpojn","background-accent":"bottom-sheet__background-accent_vpojn","background-info":"bottom-sheet__background-info_vpojn","background-attention-muted":"bottom-sheet__background-attention-muted_vpojn","background-positive-muted":"bottom-sheet__background-positive-muted_vpojn","background-negative-muted":"bottom-sheet__background-negative-muted_vpojn","background-primary":"bottom-sheet__background-primary_vpojn","background-primary-inverted":"bottom-sheet__background-primary-inverted_vpojn","background-secondary":"bottom-sheet__background-secondary_vpojn","background-secondary-inverted":"bottom-sheet__background-secondary-inverted_vpojn","background-tertiary":"bottom-sheet__background-tertiary_vpojn","background-tertiary-inverted":"bottom-sheet__background-tertiary-inverted_vpojn","background-quaternary":"bottom-sheet__background-quaternary_vpojn","background-quaternary-inverted":"bottom-sheet__background-quaternary-inverted_vpojn","background-specialbg-component":"bottom-sheet__background-specialbg-component_vpojn","background-specialbg-component-inverted":"bottom-sheet__background-specialbg-component-inverted_vpojn","background-specialbg-primary-grouped":"bottom-sheet__background-specialbg-primary-grouped_vpojn","background-specialbg-secondary-grouped":"bottom-sheet__background-specialbg-secondary-grouped_vpojn","background-specialbg-tertiary-grouped":"bottom-sheet__background-specialbg-tertiary-grouped_vpojn","background-specialbg-secondary-transparent":"bottom-sheet__background-specialbg-secondary-transparent_vpojn","background-specialbg-secondary-transparent-inverted":"bottom-sheet__background-specialbg-secondary-transparent-inverted_vpojn","background-specialbg-tertiary-transparent":"bottom-sheet__background-specialbg-tertiary-transparent_vpojn","background-specialbg-tertiary-transparent-inverted":"bottom-sheet__background-specialbg-tertiary-transparent-inverted_vpojn"};
5
+ var styles = {"footer":"bottom-sheet__footer_vtjlo","sticky":"bottom-sheet__sticky_vtjlo","highlighted":"bottom-sheet__highlighted_vtjlo","background-accent":"bottom-sheet__background-accent_vtjlo","background-info":"bottom-sheet__background-info_vtjlo","background-attention-muted":"bottom-sheet__background-attention-muted_vtjlo","background-positive-muted":"bottom-sheet__background-positive-muted_vtjlo","background-negative-muted":"bottom-sheet__background-negative-muted_vtjlo","background-primary":"bottom-sheet__background-primary_vtjlo","background-primary-inverted":"bottom-sheet__background-primary-inverted_vtjlo","background-secondary":"bottom-sheet__background-secondary_vtjlo","background-secondary-inverted":"bottom-sheet__background-secondary-inverted_vtjlo","background-tertiary":"bottom-sheet__background-tertiary_vtjlo","background-tertiary-inverted":"bottom-sheet__background-tertiary-inverted_vtjlo","background-quaternary":"bottom-sheet__background-quaternary_vtjlo","background-quaternary-inverted":"bottom-sheet__background-quaternary-inverted_vtjlo","background-specialbg-component":"bottom-sheet__background-specialbg-component_vtjlo","background-specialbg-component-inverted":"bottom-sheet__background-specialbg-component-inverted_vtjlo","background-specialbg-primary-grouped":"bottom-sheet__background-specialbg-primary-grouped_vtjlo","background-specialbg-secondary-grouped":"bottom-sheet__background-specialbg-secondary-grouped_vtjlo","background-specialbg-tertiary-grouped":"bottom-sheet__background-specialbg-tertiary-grouped_vtjlo","background-specialbg-secondary-transparent":"bottom-sheet__background-specialbg-secondary-transparent_vtjlo","background-specialbg-secondary-transparent-inverted":"bottom-sheet__background-specialbg-secondary-transparent-inverted_vtjlo","background-specialbg-tertiary-transparent":"bottom-sheet__background-specialbg-tertiary-transparent_vtjlo","background-specialbg-tertiary-transparent-inverted":"bottom-sheet__background-specialbg-tertiary-transparent-inverted_vtjlo"};
6
6
  require('./index.css')
7
7
 
8
8
  var Footer = function (_a) {
@@ -1,4 +1,4 @@
1
- /* hash: 187e8 */
1
+ /* hash: 19hgu */
2
2
  :root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
3
3
  } /* deprecated */ :root {
4
4
  --color-light-modal-bg-primary: #fff;
@@ -55,58 +55,58 @@
55
55
  /* footer */
56
56
  --bottom-sheet-footer-border-top: 1px solid var(--color-light-neutral-300);
57
57
  --bottom-sheet-footer-background-color: var(--color-light-modal-bg-primary);
58
- } .bottom-sheet__footer_vpojn {
58
+ } .bottom-sheet__footer_vtjlo {
59
59
  padding: var(--gap-16) var(--gap-16);
60
60
  background-color: var(--color-light-modal-bg-primary);
61
- } .bottom-sheet__sticky_vpojn {
61
+ } .bottom-sheet__sticky_vtjlo {
62
62
  position: sticky;
63
63
  bottom: var(--gap-0);
64
64
  z-index: 1;
65
- } .bottom-sheet__highlighted_vpojn {
65
+ } .bottom-sheet__highlighted_vtjlo {
66
66
  border-top: var(--bottom-sheet-footer-border-top);
67
67
  background-color: var(--bottom-sheet-footer-background-color);
68
- } .bottom-sheet__background-accent_vpojn {
68
+ } .bottom-sheet__background-accent_vtjlo {
69
69
  background-color: var(--color-light-bg-accent);
70
- } .bottom-sheet__background-info_vpojn {
70
+ } .bottom-sheet__background-info_vtjlo {
71
71
  background-color: var(--color-light-bg-info);
72
- } .bottom-sheet__background-attention-muted_vpojn {
72
+ } .bottom-sheet__background-attention-muted_vtjlo {
73
73
  background-color: var(--color-light-bg-attention-muted);
74
- } .bottom-sheet__background-positive-muted_vpojn {
74
+ } .bottom-sheet__background-positive-muted_vtjlo {
75
75
  background-color: var(--color-light-bg-positive-muted);
76
- } .bottom-sheet__background-negative-muted_vpojn {
76
+ } .bottom-sheet__background-negative-muted_vtjlo {
77
77
  background-color: var(--color-light-bg-negative-muted);
78
- } .bottom-sheet__background-primary_vpojn {
78
+ } .bottom-sheet__background-primary_vtjlo {
79
79
  background-color: var(--color-light-bg-primary);
80
- } .bottom-sheet__background-primary-inverted_vpojn {
80
+ } .bottom-sheet__background-primary-inverted_vtjlo {
81
81
  background-color: var(--color-light-bg-primary-inverted);
82
- } .bottom-sheet__background-secondary_vpojn {
82
+ } .bottom-sheet__background-secondary_vtjlo {
83
83
  background-color: var(--color-light-bg-secondary);
84
- } .bottom-sheet__background-secondary-inverted_vpojn {
84
+ } .bottom-sheet__background-secondary-inverted_vtjlo {
85
85
  background-color: var(--color-light-bg-secondary-inverted);
86
- } .bottom-sheet__background-tertiary_vpojn {
86
+ } .bottom-sheet__background-tertiary_vtjlo {
87
87
  background-color: var(--color-light-bg-tertiary);
88
- } .bottom-sheet__background-tertiary-inverted_vpojn {
88
+ } .bottom-sheet__background-tertiary-inverted_vtjlo {
89
89
  background-color: var(--color-light-bg-tertiary-inverted);
90
- } .bottom-sheet__background-quaternary_vpojn {
90
+ } .bottom-sheet__background-quaternary_vtjlo {
91
91
  background-color: var(--color-light-bg-quaternary);
92
- } .bottom-sheet__background-quaternary-inverted_vpojn {
92
+ } .bottom-sheet__background-quaternary-inverted_vtjlo {
93
93
  background-color: var(--color-light-bg-quaternary-inverted);
94
- } .bottom-sheet__background-specialbg-component_vpojn {
94
+ } .bottom-sheet__background-specialbg-component_vtjlo {
95
95
  background-color: var(--color-light-specialbg-component);
96
- } .bottom-sheet__background-specialbg-component-inverted_vpojn {
96
+ } .bottom-sheet__background-specialbg-component-inverted_vtjlo {
97
97
  background-color: var(--color-light-specialbg-component-inverted);
98
- } .bottom-sheet__background-specialbg-primary-grouped_vpojn {
98
+ } .bottom-sheet__background-specialbg-primary-grouped_vtjlo {
99
99
  background-color: var(--color-light-specialbg-primary-grouped);
100
- } .bottom-sheet__background-specialbg-secondary-grouped_vpojn {
100
+ } .bottom-sheet__background-specialbg-secondary-grouped_vtjlo {
101
101
  background-color: var(--color-light-specialbg-secondary-grouped);
102
- } .bottom-sheet__background-specialbg-tertiary-grouped_vpojn {
102
+ } .bottom-sheet__background-specialbg-tertiary-grouped_vtjlo {
103
103
  background-color: var(--color-light-specialbg-tertiary-grouped);
104
- } .bottom-sheet__background-specialbg-secondary-transparent_vpojn {
104
+ } .bottom-sheet__background-specialbg-secondary-transparent_vtjlo {
105
105
  background-color: var(--color-light-specialbg-secondary-transparent);
106
- } .bottom-sheet__background-specialbg-secondary-transparent-inverted_vpojn {
106
+ } .bottom-sheet__background-specialbg-secondary-transparent-inverted_vtjlo {
107
107
  background-color: var(--color-light-specialbg-secondary-transparent-inverted);
108
- } .bottom-sheet__background-specialbg-tertiary-transparent_vpojn {
108
+ } .bottom-sheet__background-specialbg-tertiary-transparent_vtjlo {
109
109
  background-color: var(--color-light-specialbg-tertiary-transparent);
110
- } .bottom-sheet__background-specialbg-tertiary-transparent-inverted_vpojn {
110
+ } .bottom-sheet__background-specialbg-tertiary-transparent-inverted_vtjlo {
111
111
  background-color: var(--color-light-specialbg-tertiary-transparent-inverted);
112
112
  }
@@ -4,7 +4,7 @@ import cn from 'classnames';
4
4
  import { BaseModalContext } from '@alfalab/core-components-base-modal/esm';
5
5
  import { NavigationBarPrivate } from '@alfalab/core-components-navigation-bar-private/esm';
6
6
 
7
- var styles = {"headerBase":"bottom-sheet__headerBase_yvzuo","headerWrapper":"bottom-sheet__headerWrapper_yvzuo bottom-sheet__headerBase_yvzuo","headerWrapperWithoutSwipeMarker":"bottom-sheet__headerWrapperWithoutSwipeMarker_yvzuo bottom-sheet__headerBase_yvzuo","hasContent":"bottom-sheet__hasContent_yvzuo","header":"bottom-sheet__header_yvzuo","sticky":"bottom-sheet__sticky_yvzuo","highlighted":"bottom-sheet__highlighted_yvzuo","justifyEnd":"bottom-sheet__justifyEnd_yvzuo","addon":"bottom-sheet__addon_yvzuo","addonFixed":"bottom-sheet__addonFixed_yvzuo","title":"bottom-sheet__title_yvzuo","titleCenter":"bottom-sheet__titleCenter_yvzuo","titleLeft":"bottom-sheet__titleLeft_yvzuo","trimTitle":"bottom-sheet__trimTitle_yvzuo"};
7
+ var styles = {"headerBase":"bottom-sheet__headerBase_1kquv","headerWrapper":"bottom-sheet__headerWrapper_1kquv bottom-sheet__headerBase_1kquv","headerWrapperWithoutSwipeMarker":"bottom-sheet__headerWrapperWithoutSwipeMarker_1kquv bottom-sheet__headerBase_1kquv","hasContent":"bottom-sheet__hasContent_1kquv","header":"bottom-sheet__header_1kquv","sticky":"bottom-sheet__sticky_1kquv","highlighted":"bottom-sheet__highlighted_1kquv","justifyEnd":"bottom-sheet__justifyEnd_1kquv","addon":"bottom-sheet__addon_1kquv","addonFixed":"bottom-sheet__addonFixed_1kquv","title":"bottom-sheet__title_1kquv","titleCenter":"bottom-sheet__titleCenter_1kquv","titleLeft":"bottom-sheet__titleLeft_1kquv","trimTitle":"bottom-sheet__trimTitle_1kquv"};
8
8
  require('./index.css')
9
9
 
10
10
  var Header = function (_a) {