@alfalab/core-components 46.0.0-beta.2 → 46.0.0-beta.5

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 (192) hide show
  1. package/bottom-sheet/component.js +9 -3
  2. package/bottom-sheet/cssm/component.js +9 -3
  3. package/bottom-sheet/esm/component.js +10 -4
  4. package/bottom-sheet/modern/component.js +9 -4
  5. package/calendar-range/utils.js +3 -1
  6. package/confirmation/components/screens/initial/component.js +1 -1
  7. package/confirmation/components/screens/initial/countdown-section.js +1 -1
  8. package/confirmation/esm/component.responsive.js +1 -1
  9. package/confirmation/esm/components/base-confirmation/component.js +1 -1
  10. package/confirmation/esm/components/base-confirmation/index.js +1 -1
  11. package/confirmation/esm/components/index.js +1 -1
  12. package/confirmation/esm/components/screens/index.js +1 -1
  13. package/confirmation/esm/components/screens/initial/component.js +1 -1
  14. package/confirmation/esm/components/screens/initial/countdown-section.js +1 -1
  15. package/confirmation/esm/components/screens/initial/index.js +1 -1
  16. package/confirmation/esm/desktop/component.desktop.js +1 -1
  17. package/confirmation/esm/desktop/index.js +1 -1
  18. package/confirmation/esm/index.js +1 -1
  19. package/confirmation/esm/mobile/component.mobile.js +1 -1
  20. package/confirmation/esm/mobile/index.js +1 -1
  21. package/confirmation/esm/shared/index.js +1 -1
  22. package/confirmation/modern/component.responsive.js +1 -1
  23. package/confirmation/modern/components/base-confirmation/component.js +1 -1
  24. package/confirmation/modern/components/base-confirmation/index.js +1 -1
  25. package/confirmation/modern/components/index.js +1 -1
  26. package/confirmation/modern/components/screens/index.js +1 -1
  27. package/confirmation/modern/components/screens/initial/component.js +1 -1
  28. package/confirmation/modern/components/screens/initial/countdown-section.js +1 -1
  29. package/confirmation/modern/components/screens/initial/index.js +1 -1
  30. package/confirmation/modern/desktop/component.desktop.js +1 -1
  31. package/confirmation/modern/desktop/index.js +1 -1
  32. package/confirmation/modern/index.js +1 -1
  33. package/confirmation/modern/mobile/component.mobile.js +1 -1
  34. package/confirmation/modern/mobile/index.js +1 -1
  35. package/confirmation/modern/shared/index.js +1 -1
  36. package/modal/components/controls/Component.js +1 -1
  37. package/modal/components/footer/Component.js +1 -1
  38. package/modal/esm/Component.responsive.js +1 -1
  39. package/modal/esm/components/controls/Component.js +1 -1
  40. package/modal/esm/components/controls/index.js +1 -1
  41. package/modal/esm/components/footer/Component.js +1 -1
  42. package/modal/esm/desktop/Component.desktop.js +1 -1
  43. package/modal/esm/desktop/index.js +1 -1
  44. package/modal/esm/index.js +1 -1
  45. package/modal/esm/mobile/Component.mobile.js +1 -1
  46. package/modal/esm/mobile/index.js +1 -1
  47. package/modal/modern/Component.responsive.js +1 -1
  48. package/modal/modern/components/controls/Component.js +1 -1
  49. package/modal/modern/components/controls/index.js +1 -1
  50. package/modal/modern/components/footer/Component.js +1 -1
  51. package/modal/modern/desktop/Component.desktop.js +1 -1
  52. package/modal/modern/desktop/index.js +1 -1
  53. package/modal/modern/index.js +1 -1
  54. package/modal/modern/mobile/Component.mobile.js +1 -1
  55. package/modal/modern/mobile/index.js +1 -1
  56. package/package.json +1 -1
  57. package/select/esm/Component.responsive.js +1 -1
  58. package/select/esm/index.js +1 -1
  59. package/select/esm/mobile/Component.mobile.js +1 -1
  60. package/select/esm/mobile/Component.modal.mobile.js +1 -1
  61. package/select/esm/mobile/index.js +1 -1
  62. package/select/esm/presets/index.js +1 -1
  63. package/select/esm/presets/useSelectWithApply/hook.js +1 -1
  64. package/select/esm/presets/useSelectWithApply/options-list-with-apply/Component.js +1 -1
  65. package/select/esm/presets/useSelectWithApply/options-list-with-apply/index.d.ts +1 -1
  66. package/select/esm/presets/useSelectWithApply/options-list-with-apply/index.js +1 -1
  67. package/select/esm/shared/index.js +1 -1
  68. package/select/mobile/Component.mobile.js +1 -1
  69. package/select/modern/Component.responsive.js +1 -1
  70. package/select/modern/index.js +1 -1
  71. package/select/modern/mobile/Component.mobile.js +1 -1
  72. package/select/modern/mobile/Component.modal.mobile.js +1 -1
  73. package/select/modern/mobile/index.js +1 -1
  74. package/select/modern/presets/index.js +1 -1
  75. package/select/modern/presets/useSelectWithApply/hook.js +1 -1
  76. package/select/modern/presets/useSelectWithApply/options-list-with-apply/Component.js +1 -1
  77. package/select/modern/presets/useSelectWithApply/options-list-with-apply/index.d.ts +1 -1
  78. package/select/modern/presets/useSelectWithApply/options-list-with-apply/index.js +1 -1
  79. package/select/modern/shared/index.js +1 -1
  80. package/select/presets/index.js +1 -1
  81. package/select/presets/useSelectWithApply/hook.js +1 -1
  82. package/select/presets/useSelectWithApply/options-list-with-apply/Component.js +1 -1
  83. package/select/presets/useSelectWithApply/options-list-with-apply/index.d.ts +1 -1
  84. package/select/presets/useSelectWithApply/options-list-with-apply/index.js +1 -1
  85. package/select/shared/index.js +1 -1
  86. package/side-panel/components/controls/Component.js +1 -1
  87. package/side-panel/components/footer/Component.js +1 -1
  88. package/side-panel/esm/Component.responsive.js +1 -1
  89. package/side-panel/esm/components/controls/Component.js +1 -1
  90. package/side-panel/esm/components/controls/index.js +1 -1
  91. package/side-panel/esm/components/footer/Component.desktop.js +1 -1
  92. package/side-panel/esm/components/footer/Component.js +1 -1
  93. package/side-panel/esm/components/footer/Component.mobile.js +1 -1
  94. package/side-panel/esm/desktop/Component.desktop.js +1 -1
  95. package/side-panel/esm/desktop/index.js +1 -1
  96. package/side-panel/esm/index.js +1 -1
  97. package/side-panel/esm/mobile/Component.mobile.js +1 -1
  98. package/side-panel/esm/mobile/index.js +1 -1
  99. package/side-panel/modern/Component.responsive.js +1 -1
  100. package/side-panel/modern/components/controls/Component.js +1 -1
  101. package/side-panel/modern/components/controls/index.js +1 -1
  102. package/side-panel/modern/components/footer/Component.desktop.js +1 -1
  103. package/side-panel/modern/components/footer/Component.js +1 -1
  104. package/side-panel/modern/components/footer/Component.mobile.js +1 -1
  105. package/side-panel/modern/desktop/Component.desktop.js +1 -1
  106. package/side-panel/modern/desktop/index.js +1 -1
  107. package/side-panel/modern/index.js +1 -1
  108. package/side-panel/modern/mobile/Component.mobile.js +1 -1
  109. package/side-panel/modern/mobile/index.js +1 -1
  110. package/steps/Component.js +9 -8
  111. package/steps/cssm/Component.js +9 -8
  112. package/steps/esm/Component.js +10 -9
  113. package/steps/modern/Component.js +10 -9
  114. package/themes/compiled/mobile-dark-bluetint.css +67 -67
  115. package/toast-plate/components/base-toast-plate/component.js +1 -1
  116. package/toast-plate/components/base-toast-plate/utils/getBaseToastPlateTestIds.js +1 -1
  117. package/toast-plate/esm/Component.responsive.js +1 -1
  118. package/toast-plate/esm/components/base-toast-plate/component.js +1 -1
  119. package/toast-plate/esm/components/base-toast-plate/index.js +1 -1
  120. package/toast-plate/esm/components/base-toast-plate/utils/getBaseToastPlateTestIds.js +1 -1
  121. package/toast-plate/esm/desktop/Component.desktop.js +1 -1
  122. package/toast-plate/esm/desktop/index.js +1 -1
  123. package/toast-plate/esm/index-307da6d7.d.ts +1 -1
  124. package/toast-plate/esm/index.js +1 -1
  125. package/toast-plate/esm/mobile/Component.mobile.js +1 -1
  126. package/toast-plate/esm/mobile/index.js +1 -1
  127. package/toast-plate/index-307da6d7.d.ts +1 -1
  128. package/toast-plate/modern/Component.responsive.js +1 -1
  129. package/toast-plate/modern/components/base-toast-plate/component.js +1 -1
  130. package/toast-plate/modern/components/base-toast-plate/index.js +1 -1
  131. package/toast-plate/modern/components/base-toast-plate/utils/getBaseToastPlateTestIds.js +1 -1
  132. package/toast-plate/modern/desktop/Component.desktop.js +1 -1
  133. package/toast-plate/modern/desktop/index.js +1 -1
  134. package/toast-plate/modern/index-307da6d7.d.ts +1 -1
  135. package/toast-plate/modern/index.js +1 -1
  136. package/toast-plate/modern/mobile/Component.mobile.js +1 -1
  137. package/toast-plate/modern/mobile/index.js +1 -1
  138. package/typography/esm/component.js +2 -2
  139. package/typography/esm/index.js +2 -2
  140. package/typography/esm/text/component.js +1 -1
  141. package/typography/esm/text/index.js +1 -1
  142. package/typography/esm/title/component.js +1 -1
  143. package/typography/esm/title/index.js +2 -2
  144. package/typography/esm/title-mobile/component.js +2 -2
  145. package/typography/esm/title-mobile/index.js +2 -2
  146. package/typography/esm/title-responsive/component.js +2 -2
  147. package/typography/esm/title-responsive/index.js +2 -2
  148. package/typography/modern/component.js +2 -2
  149. package/typography/modern/index.js +2 -2
  150. package/typography/modern/text/component.js +1 -1
  151. package/typography/modern/text/index.js +1 -1
  152. package/typography/modern/title/component.js +1 -1
  153. package/typography/modern/title/index.js +2 -2
  154. package/typography/modern/title-mobile/component.js +2 -2
  155. package/typography/modern/title-mobile/index.js +2 -2
  156. package/typography/modern/title-responsive/component.js +2 -2
  157. package/typography/modern/title-responsive/index.js +2 -2
  158. package/typography/text/component.js +1 -1
  159. package/typography/title/component.js +1 -1
  160. package/typography/title/index.js +1 -1
  161. package/typography/title-mobile/component.js +1 -1
  162. package/typography/title-responsive/component.js +1 -1
  163. /package/confirmation/{countdown-section-756d249f.d.ts → countdown-section-f9e4f884.d.ts} +0 -0
  164. /package/confirmation/{countdown-section-756d249f.js → countdown-section-f9e4f884.js} +0 -0
  165. /package/confirmation/esm/{countdown-section-7dc1e811.d.ts → countdown-section-540da1e3.d.ts} +0 -0
  166. /package/confirmation/esm/{countdown-section-7dc1e811.js → countdown-section-540da1e3.js} +0 -0
  167. /package/confirmation/modern/{countdown-section-eccb06b6.d.ts → countdown-section-d3385b29.d.ts} +0 -0
  168. /package/confirmation/modern/{countdown-section-eccb06b6.js → countdown-section-d3385b29.js} +0 -0
  169. /package/modal/esm/{layout.module-912924e9.js → layout.module-ed84e654.js} +0 -0
  170. /package/modal/{layout.module-e38411cc.js → layout.module-74d56d9e.js} +0 -0
  171. /package/modal/modern/{layout.module-020e2ced.js → layout.module-169c9cd4.js} +0 -0
  172. /package/select/esm/{hook-ec5dced0.d.ts → hook-43f97773.d.ts} +0 -0
  173. /package/select/esm/{hook-ec5dced0.js → hook-43f97773.js} +0 -0
  174. /package/select/{hook-24546f56.d.ts → hook-47df637e.d.ts} +0 -0
  175. /package/select/{hook-24546f56.js → hook-47df637e.js} +0 -0
  176. /package/select/modern/{hook-b714aff5.d.ts → hook-72d63281.d.ts} +0 -0
  177. /package/select/modern/{hook-b714aff5.js → hook-72d63281.js} +0 -0
  178. /package/side-panel/esm/{layout.module-bde8ec44.js → layout.module-72cc1a7a.js} +0 -0
  179. /package/side-panel/{layout.module-a60d58a0.js → layout.module-cfb65ab1.js} +0 -0
  180. /package/side-panel/modern/{layout.module-f1c80687.js → layout.module-3503b091.js} +0 -0
  181. /package/toast-plate/esm/{getDataTestId-185adec6.d.ts → getDataTestId-f4dc32c7.d.ts} +0 -0
  182. /package/toast-plate/esm/{getDataTestId-185adec6.js → getDataTestId-f4dc32c7.js} +0 -0
  183. /package/toast-plate/{getDataTestId-3138baed.d.ts → getDataTestId-442368bd.d.ts} +0 -0
  184. /package/toast-plate/{getDataTestId-3138baed.js → getDataTestId-442368bd.js} +0 -0
  185. /package/toast-plate/modern/{getDataTestId-3a028081.d.ts → getDataTestId-16038735.d.ts} +0 -0
  186. /package/toast-plate/modern/{getDataTestId-3a028081.js → getDataTestId-16038735.js} +0 -0
  187. /package/typography/{colors.module-eb3d91ee.js → colors.module-95ea7fc4.js} +0 -0
  188. /package/typography/{common.module-a8409ce9.js → common.module-ae53b4de.js} +0 -0
  189. /package/typography/esm/{colors.module-457deb40.js → colors.module-2b53143b.js} +0 -0
  190. /package/typography/esm/{common.module-99428575.js → common.module-1373fada.js} +0 -0
  191. /package/typography/modern/{colors.module-a0d2e648.js → colors.module-5db1b616.js} +0 -0
  192. /package/typography/modern/{common.module-5bbb2813.js → common.module-49874e31.js} +0 -0
@@ -30,6 +30,7 @@ var BottomSheet = React.forwardRef(function (_a, ref) {
30
30
  var fullHeight = reactDiv100vh.use100vh() || 0;
31
31
  // Хук use100vh рассчитывает высоту вьюпорта в useEffect, поэтому на первый рендер всегда возвращает null.
32
32
  var isFirstRender = fullHeight === 0;
33
+ var initialIndexRef = React.useRef(initialActiveAreaIndex);
33
34
  var magneticAreas = React.useMemo(function () {
34
35
  var _a;
35
36
  if (magneticAreasProp) {
@@ -104,6 +105,10 @@ var BottomSheet = React.forwardRef(function (_a, ref) {
104
105
  }
105
106
  };
106
107
  var scrollToArea = function (idx) {
108
+ if (isFirstRender) {
109
+ initialIndexRef.current = idx;
110
+ return;
111
+ }
107
112
  stopSwiping(null);
108
113
  var nextArea = magneticAreas[idx];
109
114
  var nextAreaIdx = getActiveAreaIndex(nextArea);
@@ -267,7 +272,7 @@ var BottomSheet = React.forwardRef(function (_a, ref) {
267
272
  delta: swipeThreshold,
268
273
  });
269
274
  var handleExited = function (node) {
270
- var idx = initialActiveAreaIndex;
275
+ var idx = initialIndexRef.current;
271
276
  setBackdropOpacity(1);
272
277
  setSheetOffset(isNil(idx) ? magneticAreas[0] : lastMagneticArea - magneticAreas[idx]);
273
278
  setActiveAreaIdx(isNil(idx) ? magneticAreas.length - 1 : idx);
@@ -277,7 +282,8 @@ var BottomSheet = React.forwardRef(function (_a, ref) {
277
282
  }
278
283
  };
279
284
  var handleEnter = function (node, isAppearing) {
280
- onMagnetize === null || onMagnetize === void 0 ? void 0 : onMagnetize(initialActiveAreaIndex !== null && initialActiveAreaIndex !== void 0 ? initialActiveAreaIndex : magneticAreas.length - 1);
285
+ var _a;
286
+ onMagnetize === null || onMagnetize === void 0 ? void 0 : onMagnetize((_a = initialIndexRef.current) !== null && _a !== void 0 ? _a : magneticAreas.length - 1);
281
287
  if (transitionProps.onEnter) {
282
288
  transitionProps.onEnter(node, isAppearing);
283
289
  }
@@ -302,7 +308,7 @@ var BottomSheet = React.forwardRef(function (_a, ref) {
302
308
  if (!isFirstRender) {
303
309
  // Инициализируем стейт только после того, как была рассчитана высота вьюпорта
304
310
  if (activeAreaIdx === -1) {
305
- var idx = initialActiveAreaIndex;
311
+ var idx = initialIndexRef.current;
306
312
  setSheetOffset(isNil(idx) ? 0 : lastMagneticArea - magneticAreas[idx]);
307
313
  setActiveAreaIdx(isNil(idx) ? magneticAreas.length - 1 : idx);
308
314
  }
@@ -29,6 +29,7 @@ var BottomSheet = React.forwardRef(function (_a, ref) {
29
29
  var fullHeight = reactDiv100vh.use100vh() || 0;
30
30
  // Хук use100vh рассчитывает высоту вьюпорта в useEffect, поэтому на первый рендер всегда возвращает null.
31
31
  var isFirstRender = fullHeight === 0;
32
+ var initialIndexRef = React.useRef(initialActiveAreaIndex);
32
33
  var magneticAreas = React.useMemo(function () {
33
34
  var _a;
34
35
  if (magneticAreasProp) {
@@ -103,6 +104,10 @@ var BottomSheet = React.forwardRef(function (_a, ref) {
103
104
  }
104
105
  };
105
106
  var scrollToArea = function (idx) {
107
+ if (isFirstRender) {
108
+ initialIndexRef.current = idx;
109
+ return;
110
+ }
106
111
  stopSwiping(null);
107
112
  var nextArea = magneticAreas[idx];
108
113
  var nextAreaIdx = getActiveAreaIndex(nextArea);
@@ -266,7 +271,7 @@ var BottomSheet = React.forwardRef(function (_a, ref) {
266
271
  delta: swipeThreshold,
267
272
  });
268
273
  var handleExited = function (node) {
269
- var idx = initialActiveAreaIndex;
274
+ var idx = initialIndexRef.current;
270
275
  setBackdropOpacity(1);
271
276
  setSheetOffset(isNil(idx) ? magneticAreas[0] : lastMagneticArea - magneticAreas[idx]);
272
277
  setActiveAreaIdx(isNil(idx) ? magneticAreas.length - 1 : idx);
@@ -276,7 +281,8 @@ var BottomSheet = React.forwardRef(function (_a, ref) {
276
281
  }
277
282
  };
278
283
  var handleEnter = function (node, isAppearing) {
279
- onMagnetize === null || onMagnetize === void 0 ? void 0 : onMagnetize(initialActiveAreaIndex !== null && initialActiveAreaIndex !== void 0 ? initialActiveAreaIndex : magneticAreas.length - 1);
284
+ var _a;
285
+ onMagnetize === null || onMagnetize === void 0 ? void 0 : onMagnetize((_a = initialIndexRef.current) !== null && _a !== void 0 ? _a : magneticAreas.length - 1);
280
286
  if (transitionProps.onEnter) {
281
287
  transitionProps.onEnter(node, isAppearing);
282
288
  }
@@ -301,7 +307,7 @@ var BottomSheet = React.forwardRef(function (_a, ref) {
301
307
  if (!isFirstRender) {
302
308
  // Инициализируем стейт только после того, как была рассчитана высота вьюпорта
303
309
  if (activeAreaIdx === -1) {
304
- var idx = initialActiveAreaIndex;
310
+ var idx = initialIndexRef.current;
305
311
  setSheetOffset(isNil(idx) ? 0 : lastMagneticArea - magneticAreas[idx]);
306
312
  setActiveAreaIdx(isNil(idx) ? magneticAreas.length - 1 : idx);
307
313
  }
@@ -1,5 +1,5 @@
1
1
  import { __assign } from 'tslib';
2
- import React, { forwardRef, useMemo, useState, useRef, useEffect, useImperativeHandle } from 'react';
2
+ import React, { forwardRef, useRef, useMemo, useState, useEffect, useImperativeHandle } from 'react';
3
3
  import { use100vh } from 'react-div-100vh';
4
4
  import mergeRefs from 'react-merge-refs';
5
5
  import { useSwipeable } from 'react-swipeable';
@@ -25,6 +25,7 @@ var BottomSheet = forwardRef(function (_a, ref) {
25
25
  var fullHeight = use100vh() || 0;
26
26
  // Хук use100vh рассчитывает высоту вьюпорта в useEffect, поэтому на первый рендер всегда возвращает null.
27
27
  var isFirstRender = fullHeight === 0;
28
+ var initialIndexRef = useRef(initialActiveAreaIndex);
28
29
  var magneticAreas = useMemo(function () {
29
30
  var _a;
30
31
  if (magneticAreasProp) {
@@ -99,6 +100,10 @@ var BottomSheet = forwardRef(function (_a, ref) {
99
100
  }
100
101
  };
101
102
  var scrollToArea = function (idx) {
103
+ if (isFirstRender) {
104
+ initialIndexRef.current = idx;
105
+ return;
106
+ }
102
107
  stopSwiping(null);
103
108
  var nextArea = magneticAreas[idx];
104
109
  var nextAreaIdx = getActiveAreaIndex(nextArea);
@@ -262,7 +267,7 @@ var BottomSheet = forwardRef(function (_a, ref) {
262
267
  delta: swipeThreshold,
263
268
  });
264
269
  var handleExited = function (node) {
265
- var idx = initialActiveAreaIndex;
270
+ var idx = initialIndexRef.current;
266
271
  setBackdropOpacity(1);
267
272
  setSheetOffset(isNil(idx) ? magneticAreas[0] : lastMagneticArea - magneticAreas[idx]);
268
273
  setActiveAreaIdx(isNil(idx) ? magneticAreas.length - 1 : idx);
@@ -272,7 +277,8 @@ var BottomSheet = forwardRef(function (_a, ref) {
272
277
  }
273
278
  };
274
279
  var handleEnter = function (node, isAppearing) {
275
- onMagnetize === null || onMagnetize === void 0 ? void 0 : onMagnetize(initialActiveAreaIndex !== null && initialActiveAreaIndex !== void 0 ? initialActiveAreaIndex : magneticAreas.length - 1);
280
+ var _a;
281
+ onMagnetize === null || onMagnetize === void 0 ? void 0 : onMagnetize((_a = initialIndexRef.current) !== null && _a !== void 0 ? _a : magneticAreas.length - 1);
276
282
  if (transitionProps.onEnter) {
277
283
  transitionProps.onEnter(node, isAppearing);
278
284
  }
@@ -297,7 +303,7 @@ var BottomSheet = forwardRef(function (_a, ref) {
297
303
  if (!isFirstRender) {
298
304
  // Инициализируем стейт только после того, как была рассчитана высота вьюпорта
299
305
  if (activeAreaIdx === -1) {
300
- var idx = initialActiveAreaIndex;
306
+ var idx = initialIndexRef.current;
301
307
  setSheetOffset(isNil(idx) ? 0 : lastMagneticArea - magneticAreas[idx]);
302
308
  setActiveAreaIdx(isNil(idx) ? magneticAreas.length - 1 : idx);
303
309
  }
@@ -1,4 +1,4 @@
1
- import React, { forwardRef, useMemo, useState, useRef, useEffect, useImperativeHandle } from 'react';
1
+ import React, { forwardRef, useRef, useMemo, useState, useEffect, useImperativeHandle } from 'react';
2
2
  import { use100vh } from 'react-div-100vh';
3
3
  import mergeRefs from 'react-merge-refs';
4
4
  import { useSwipeable } from 'react-swipeable';
@@ -22,6 +22,7 @@ const BottomSheet = forwardRef(({ open, title, container, usePortal, backgroundC
22
22
  const fullHeight = use100vh() || 0;
23
23
  // Хук use100vh рассчитывает высоту вьюпорта в useEffect, поэтому на первый рендер всегда возвращает null.
24
24
  const isFirstRender = fullHeight === 0;
25
+ const initialIndexRef = useRef(initialActiveAreaIndex);
25
26
  const magneticAreas = useMemo(() => {
26
27
  if (magneticAreasProp) {
27
28
  return magneticAreasProp.map((area) => convertPercentToNumber(area, fullHeight, headerOffset));
@@ -116,6 +117,10 @@ const BottomSheet = forwardRef(({ open, title, container, usePortal, backgroundC
116
117
  }
117
118
  };
118
119
  const scrollToArea = (idx) => {
120
+ if (isFirstRender) {
121
+ initialIndexRef.current = idx;
122
+ return;
123
+ }
119
124
  stopSwiping(null);
120
125
  const nextArea = magneticAreas[idx];
121
126
  const nextAreaIdx = getActiveAreaIndex(nextArea);
@@ -275,7 +280,7 @@ const BottomSheet = forwardRef(({ open, title, container, usePortal, backgroundC
275
280
  delta: swipeThreshold,
276
281
  });
277
282
  const handleExited = (node) => {
278
- const idx = initialActiveAreaIndex;
283
+ const idx = initialIndexRef.current;
279
284
  setBackdropOpacity(1);
280
285
  setSheetOffset(isNil(idx) ? magneticAreas[0] : lastMagneticArea - magneticAreas[idx]);
281
286
  setActiveAreaIdx(isNil(idx) ? magneticAreas.length - 1 : idx);
@@ -285,7 +290,7 @@ const BottomSheet = forwardRef(({ open, title, container, usePortal, backgroundC
285
290
  }
286
291
  };
287
292
  const handleEnter = (node, isAppearing) => {
288
- onMagnetize?.(initialActiveAreaIndex ?? magneticAreas.length - 1);
293
+ onMagnetize?.(initialIndexRef.current ?? magneticAreas.length - 1);
289
294
  if (transitionProps.onEnter) {
290
295
  transitionProps.onEnter(node, isAppearing);
291
296
  }
@@ -310,7 +315,7 @@ const BottomSheet = forwardRef(({ open, title, container, usePortal, backgroundC
310
315
  if (!isFirstRender) {
311
316
  // Инициализируем стейт только после того, как была рассчитана высота вьюпорта
312
317
  if (activeAreaIdx === -1) {
313
- const idx = initialActiveAreaIndex;
318
+ const idx = initialIndexRef.current;
314
319
  setSheetOffset(isNil(idx) ? 0 : lastMagneticArea - magneticAreas[idx]);
315
320
  setActiveAreaIdx(isNil(idx) ? magneticAreas.length - 1 : idx);
316
321
  }
@@ -1,5 +1,7 @@
1
1
  Object.defineProperty(exports, '__esModule', { value: true });
2
2
 
3
- var isDayButton = function (node) { return node && node.tagName === 'BUTTON' && node.dataset.date; };
3
+ var isDayButton = function (node) {
4
+ return node && node.tagName === 'BUTTON' && node.dataset.date;
5
+ };
4
6
 
5
7
  exports.isDayButton = isDayButton;
@@ -10,7 +10,7 @@ var coreComponentsTypography = require('../../../../typography');
10
10
  var hooks = require('@alfalab/hooks');
11
11
  var context = require('../../../context.js');
12
12
  var components_header_component = require('../../header/component.js');
13
- var components_screens_initial_countdownSection = require('../../../countdown-section-756d249f.js');
13
+ var components_screens_initial_countdownSection = require('../../../countdown-section-f9e4f884.js');
14
14
 
15
15
  function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
16
16
 
@@ -7,7 +7,7 @@ require('../../../../spinner');
7
7
  require('../../../../typography');
8
8
  require('../../../context.js');
9
9
  require('../../../utils.js');
10
- var components_screens_initial_countdownSection = require('../../../countdown-section-756d249f.js');
10
+ var components_screens_initial_countdownSection = require('../../../countdown-section-f9e4f884.js');
11
11
 
12
12
 
13
13
 
@@ -16,7 +16,7 @@ import '../../code-input/esm/mobile';
16
16
  import '../../link/esm';
17
17
  import '../../typography/esm';
18
18
  import './components/header/component.js';
19
- import './countdown-section-7dc1e811.js';
19
+ import './countdown-section-540da1e3.js';
20
20
  import '../../button/esm';
21
21
  import '../../spinner/esm';
22
22
  import './components/screens/hint/component.js';
@@ -15,7 +15,7 @@ import '../../../../code-input/esm/mobile';
15
15
  import '../../../../link/esm';
16
16
  import '../../../../typography/esm';
17
17
  import '../header/component.js';
18
- import '../../countdown-section-7dc1e811.js';
18
+ import '../../countdown-section-540da1e3.js';
19
19
  import '../../../../button/esm';
20
20
  import '../../../../spinner/esm';
21
21
  import '../countdown-loader/component.js';
@@ -13,7 +13,7 @@ import '../../../../code-input/esm/mobile';
13
13
  import '../../../../link/esm';
14
14
  import '../../../../typography/esm';
15
15
  import '../header/component.js';
16
- import '../../countdown-section-7dc1e811.js';
16
+ import '../../countdown-section-540da1e3.js';
17
17
  import '../../../../button/esm';
18
18
  import '../../../../spinner/esm';
19
19
  import '../screens/hint/component.js';
@@ -14,6 +14,6 @@ import '@alfalab/hooks';
14
14
  import '../context.js';
15
15
  import '../utils.js';
16
16
  import './header/component.js';
17
- import '../countdown-section-7dc1e811.js';
17
+ import '../countdown-section-540da1e3.js';
18
18
  import '../../../button/esm';
19
19
  import '../../../spinner/esm';
@@ -13,7 +13,7 @@ import '@alfalab/hooks';
13
13
  import '../../context.js';
14
14
  import '../../utils.js';
15
15
  import '../header/component.js';
16
- import '../../countdown-section-7dc1e811.js';
16
+ import '../../countdown-section-540da1e3.js';
17
17
  import '../../../../button/esm';
18
18
  import '../../../../spinner/esm';
19
19
  import '../countdown-loader/component.js';
@@ -8,7 +8,7 @@ import { Typography } from '../../../../../typography/esm';
8
8
  import { usePrevious, useLayoutEffect_SAFE_FOR_SSR } from '@alfalab/hooks';
9
9
  import { ConfirmationContext } from '../../../context.js';
10
10
  import { Header } from '../../header/component.js';
11
- import { s as styles, C as CountdownSection } from '../../../countdown-section-7dc1e811.js';
11
+ import { s as styles, C as CountdownSection } from '../../../countdown-section-540da1e3.js';
12
12
  import '../../../utils.js';
13
13
  import '../../../../../button/esm';
14
14
  import '../../../../../spinner/esm';
@@ -4,5 +4,5 @@ import '../../../../../button/esm';
4
4
  import '../../../../../spinner/esm';
5
5
  import '../../../../../typography/esm';
6
6
  import '../../../context.js';
7
- export { C as CountdownSection } from '../../../countdown-section-7dc1e811.js';
7
+ export { C as CountdownSection } from '../../../countdown-section-540da1e3.js';
8
8
  import '../../../utils.js';
@@ -10,6 +10,6 @@ import '@alfalab/hooks';
10
10
  import '../../../context.js';
11
11
  import '../../../utils.js';
12
12
  import '../../header/component.js';
13
- import '../../../countdown-section-7dc1e811.js';
13
+ import '../../../countdown-section-540da1e3.js';
14
14
  import '../../../../../button/esm';
15
15
  import '../../../../../spinner/esm';
@@ -13,7 +13,7 @@ import '../../../code-input/esm/mobile';
13
13
  import '../../../link/esm';
14
14
  import '../../../typography/esm';
15
15
  import '../components/header/component.js';
16
- import '../countdown-section-7dc1e811.js';
16
+ import '../countdown-section-540da1e3.js';
17
17
  import '../../../button/esm';
18
18
  import '../../../spinner/esm';
19
19
  import '../components/screens/hint/component.js';
@@ -14,7 +14,7 @@ import '../../../code-input/esm/mobile';
14
14
  import '../../../link/esm';
15
15
  import '../../../typography/esm';
16
16
  import '../components/header/component.js';
17
- import '../countdown-section-7dc1e811.js';
17
+ import '../countdown-section-540da1e3.js';
18
18
  import '../../../button/esm';
19
19
  import '../../../spinner/esm';
20
20
  import '../components/screens/hint/component.js';
@@ -16,7 +16,7 @@ import '../../code-input/esm/mobile';
16
16
  import '../../link/esm';
17
17
  import '../../typography/esm';
18
18
  import './components/header/component.js';
19
- import './countdown-section-7dc1e811.js';
19
+ import './countdown-section-540da1e3.js';
20
20
  import '../../button/esm';
21
21
  import '../../spinner/esm';
22
22
  import './components/screens/hint/component.js';
@@ -13,7 +13,7 @@ import '../../../code-input/esm/mobile';
13
13
  import '../../../link/esm';
14
14
  import '../../../typography/esm';
15
15
  import '../components/header/component.js';
16
- import '../countdown-section-7dc1e811.js';
16
+ import '../countdown-section-540da1e3.js';
17
17
  import '../../../button/esm';
18
18
  import '../../../spinner/esm';
19
19
  import '../components/screens/hint/component.js';
@@ -14,7 +14,7 @@ import '../../../code-input/esm/mobile';
14
14
  import '../../../link/esm';
15
15
  import '../../../typography/esm';
16
16
  import '../components/header/component.js';
17
- import '../countdown-section-7dc1e811.js';
17
+ import '../countdown-section-540da1e3.js';
18
18
  import '../../../button/esm';
19
19
  import '../../../spinner/esm';
20
20
  import '../components/screens/hint/component.js';
@@ -15,6 +15,6 @@ import '../../../link/esm';
15
15
  import '../../../typography/esm';
16
16
  import '@alfalab/hooks';
17
17
  import '../components/header/component.js';
18
- import '../countdown-section-7dc1e811.js';
18
+ import '../countdown-section-540da1e3.js';
19
19
  import '../../../button/esm';
20
20
  import '../../../spinner/esm';
@@ -15,7 +15,7 @@ import '../../code-input/modern/mobile';
15
15
  import '../../link/modern';
16
16
  import '../../typography/modern';
17
17
  import './components/header/component.js';
18
- import './countdown-section-eccb06b6.js';
18
+ import './countdown-section-d3385b29.js';
19
19
  import '../../button/modern';
20
20
  import '../../spinner/modern';
21
21
  import './components/screens/hint/component.js';
@@ -14,7 +14,7 @@ import '../../../../code-input/modern/mobile';
14
14
  import '../../../../link/modern';
15
15
  import '../../../../typography/modern';
16
16
  import '../header/component.js';
17
- import '../../countdown-section-eccb06b6.js';
17
+ import '../../countdown-section-d3385b29.js';
18
18
  import '../../../../button/modern';
19
19
  import '../../../../spinner/modern';
20
20
  import '../countdown-loader/component.js';
@@ -12,7 +12,7 @@ import '../../../../code-input/modern/mobile';
12
12
  import '../../../../link/modern';
13
13
  import '../../../../typography/modern';
14
14
  import '../header/component.js';
15
- import '../../countdown-section-eccb06b6.js';
15
+ import '../../countdown-section-d3385b29.js';
16
16
  import '../../../../button/modern';
17
17
  import '../../../../spinner/modern';
18
18
  import '../screens/hint/component.js';
@@ -14,6 +14,6 @@ import '@alfalab/hooks';
14
14
  import '../context.js';
15
15
  import '../utils.js';
16
16
  import './header/component.js';
17
- import '../countdown-section-eccb06b6.js';
17
+ import '../countdown-section-d3385b29.js';
18
18
  import '../../../button/modern';
19
19
  import '../../../spinner/modern';
@@ -13,7 +13,7 @@ import '@alfalab/hooks';
13
13
  import '../../context.js';
14
14
  import '../../utils.js';
15
15
  import '../header/component.js';
16
- import '../../countdown-section-eccb06b6.js';
16
+ import '../../countdown-section-d3385b29.js';
17
17
  import '../../../../button/modern';
18
18
  import '../../../../spinner/modern';
19
19
  import '../countdown-loader/component.js';
@@ -8,7 +8,7 @@ import { Typography } from '../../../../../typography/modern';
8
8
  import { usePrevious, useLayoutEffect_SAFE_FOR_SSR } from '@alfalab/hooks';
9
9
  import { ConfirmationContext } from '../../../context.js';
10
10
  import { Header } from '../../header/component.js';
11
- import { s as styles, C as CountdownSection } from '../../../countdown-section-eccb06b6.js';
11
+ import { s as styles, C as CountdownSection } from '../../../countdown-section-d3385b29.js';
12
12
  import '../../../utils.js';
13
13
  import '../../../../../button/modern';
14
14
  import '../../../../../spinner/modern';
@@ -4,5 +4,5 @@ import '../../../../../button/modern';
4
4
  import '../../../../../spinner/modern';
5
5
  import '../../../../../typography/modern';
6
6
  import '../../../context.js';
7
- export { C as CountdownSection } from '../../../countdown-section-eccb06b6.js';
7
+ export { C as CountdownSection } from '../../../countdown-section-d3385b29.js';
8
8
  import '../../../utils.js';
@@ -10,6 +10,6 @@ import '@alfalab/hooks';
10
10
  import '../../../context.js';
11
11
  import '../../../utils.js';
12
12
  import '../../header/component.js';
13
- import '../../../countdown-section-eccb06b6.js';
13
+ import '../../../countdown-section-d3385b29.js';
14
14
  import '../../../../../button/modern';
15
15
  import '../../../../../spinner/modern';
@@ -12,7 +12,7 @@ import '../../../code-input/modern/mobile';
12
12
  import '../../../link/modern';
13
13
  import '../../../typography/modern';
14
14
  import '../components/header/component.js';
15
- import '../countdown-section-eccb06b6.js';
15
+ import '../countdown-section-d3385b29.js';
16
16
  import '../../../button/modern';
17
17
  import '../../../spinner/modern';
18
18
  import '../components/screens/hint/component.js';
@@ -13,7 +13,7 @@ import '../../../code-input/modern/mobile';
13
13
  import '../../../link/modern';
14
14
  import '../../../typography/modern';
15
15
  import '../components/header/component.js';
16
- import '../countdown-section-eccb06b6.js';
16
+ import '../countdown-section-d3385b29.js';
17
17
  import '../../../button/modern';
18
18
  import '../../../spinner/modern';
19
19
  import '../components/screens/hint/component.js';
@@ -15,7 +15,7 @@ import '../../code-input/modern/mobile';
15
15
  import '../../link/modern';
16
16
  import '../../typography/modern';
17
17
  import './components/header/component.js';
18
- import './countdown-section-eccb06b6.js';
18
+ import './countdown-section-d3385b29.js';
19
19
  import '../../button/modern';
20
20
  import '../../spinner/modern';
21
21
  import './components/screens/hint/component.js';
@@ -12,7 +12,7 @@ import '../../../code-input/modern/mobile';
12
12
  import '../../../link/modern';
13
13
  import '../../../typography/modern';
14
14
  import '../components/header/component.js';
15
- import '../countdown-section-eccb06b6.js';
15
+ import '../countdown-section-d3385b29.js';
16
16
  import '../../../button/modern';
17
17
  import '../../../spinner/modern';
18
18
  import '../components/screens/hint/component.js';
@@ -13,7 +13,7 @@ import '../../../code-input/modern/mobile';
13
13
  import '../../../link/modern';
14
14
  import '../../../typography/modern';
15
15
  import '../components/header/component.js';
16
- import '../countdown-section-eccb06b6.js';
16
+ import '../countdown-section-d3385b29.js';
17
17
  import '../../../button/modern';
18
18
  import '../../../spinner/modern';
19
19
  import '../components/screens/hint/component.js';
@@ -15,6 +15,6 @@ import '../../../link/modern';
15
15
  import '../../../typography/modern';
16
16
  import '@alfalab/hooks';
17
17
  import '../components/header/component.js';
18
- import '../countdown-section-eccb06b6.js';
18
+ import '../countdown-section-d3385b29.js';
19
19
  import '../../../button/modern';
20
20
  import '../../../spinner/modern';
@@ -4,7 +4,7 @@ var React = require('react');
4
4
  var cn = require('classnames');
5
5
  var coreComponentsShared = require('../../../shared');
6
6
  var ResponsiveContext = require('../../ResponsiveContext.js');
7
- var layout_module = require('../../layout.module-e38411cc.js');
7
+ var layout_module = require('../../layout.module-74d56d9e.js');
8
8
 
9
9
  function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
10
10
 
@@ -6,7 +6,7 @@ var coreComponentsShared = require('../../../shared');
6
6
  var consts = require('../../consts.js');
7
7
  var Context = require('../../Context.js');
8
8
  var ResponsiveContext = require('../../ResponsiveContext.js');
9
- var layout_module = require('../../layout.module-e38411cc.js');
9
+ var layout_module = require('../../layout.module-74d56d9e.js');
10
10
 
11
11
  function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
12
12
 
@@ -12,7 +12,7 @@ import './consts.js';
12
12
  import './Context.js';
13
13
  import '../../base-modal/esm';
14
14
  import './ResponsiveContext.js';
15
- import './layout.module-912924e9.js';
15
+ import './layout.module-ed84e654.js';
16
16
  import '../../navigation-bar-private/esm';
17
17
  import 'react-merge-refs';
18
18
 
@@ -2,7 +2,7 @@ import React, { useContext } from 'react';
2
2
  import cn from 'classnames';
3
3
  import { getDataTestId } from '../../../../shared/esm';
4
4
  import { ResponsiveContext } from '../../ResponsiveContext.js';
5
- import { l as layoutStyles } from '../../layout.module-912924e9.js';
5
+ import { l as layoutStyles } from '../../layout.module-ed84e654.js';
6
6
 
7
7
  var styles = {"component":"modal__component_6629a"};
8
8
  require('./index.css');
@@ -3,4 +3,4 @@ import 'react';
3
3
  import 'classnames';
4
4
  import '../../../../shared/esm';
5
5
  import '../../ResponsiveContext.js';
6
- import '../../layout.module-912924e9.js';
6
+ import '../../layout.module-ed84e654.js';
@@ -4,7 +4,7 @@ import { getDataTestId } from '../../../../shared/esm';
4
4
  import { SIZE_TO_CLASSNAME_MAP } from '../../consts.js';
5
5
  import { ModalContext } from '../../Context.js';
6
6
  import { ResponsiveContext } from '../../ResponsiveContext.js';
7
- import { l as layoutStyles } from '../../layout.module-912924e9.js';
7
+ import { l as layoutStyles } from '../../layout.module-ed84e654.js';
8
8
  import '../../../../base-modal/esm';
9
9
 
10
10
  var desktopStyles = {"footer":"modal__footer_e5vdf","sticky":"modal__sticky_e5vdf","fullscreen":"modal__fullscreen_e5vdf","size-500":"modal__size-500_e5vdf","size-600":"modal__size-600_e5vdf","size-800":"modal__size-800_e5vdf","size-1140":"modal__size-1140_e5vdf"};
@@ -12,7 +12,7 @@ import '../consts.js';
12
12
  import '../ResponsiveContext.js';
13
13
  import '../../../shared/esm';
14
14
  import '../Context.js';
15
- import '../layout.module-912924e9.js';
15
+ import '../layout.module-ed84e654.js';
16
16
  import '../../../navigation-bar-private/esm';
17
17
 
18
18
  var ModalDesktopComponent = forwardRef(function (props, ref) { return (React.createElement(Modal, __assign({}, props, { ref: ref, view: 'desktop' }))); });
@@ -11,7 +11,7 @@ import '../components/content/Component.js';
11
11
  import '../../../shared/esm';
12
12
  import '../Context.js';
13
13
  import '../components/controls/Component.js';
14
- import '../layout.module-912924e9.js';
14
+ import '../layout.module-ed84e654.js';
15
15
  import '../components/footer/Component.js';
16
16
  import '../components/header/Component.js';
17
17
  import '../../../navigation-bar-private/esm';
@@ -10,7 +10,7 @@ import './Context.js';
10
10
  import '../../base-modal/esm';
11
11
  import './ResponsiveContext.js';
12
12
  import './components/controls/Component.js';
13
- import './layout.module-912924e9.js';
13
+ import './layout.module-ed84e654.js';
14
14
  import './components/footer/Component.js';
15
15
  import './components/header/Component.js';
16
16
  import '../../navigation-bar-private/esm';
@@ -12,7 +12,7 @@ import '../consts.js';
12
12
  import '../ResponsiveContext.js';
13
13
  import '../../../shared/esm';
14
14
  import '../Context.js';
15
- import '../layout.module-912924e9.js';
15
+ import '../layout.module-ed84e654.js';
16
16
  import '../../../navigation-bar-private/esm';
17
17
 
18
18
  var ModalMobileComponent = forwardRef(function (props, ref) { return (React.createElement(Modal, __assign({}, props, { ref: ref, view: 'mobile' }))); });
@@ -11,7 +11,7 @@ import '../components/content/Component.js';
11
11
  import '../../../shared/esm';
12
12
  import '../Context.js';
13
13
  import '../components/controls/Component.js';
14
- import '../layout.module-912924e9.js';
14
+ import '../layout.module-ed84e654.js';
15
15
  import '../components/footer/Component.js';
16
16
  import '../components/header/Component.js';
17
17
  import '../../../navigation-bar-private/esm';