@alfalab/core-components-confirmation 12.5.2 → 13.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (181) hide show
  1. package/component.desktop.d.ts +1 -1
  2. package/component.desktop.js +5 -3
  3. package/component.mobile.js +6 -4
  4. package/component.responsive.d.ts +2 -3
  5. package/component.responsive.js +9 -9
  6. package/components/base-confirmation/component.js +9 -6
  7. package/components/base-confirmation/index.css +2 -2
  8. package/components/base-confirmation/index.js +5 -3
  9. package/components/countdown-loader/component.js +1 -1
  10. package/components/countdown-loader/index.css +2 -2
  11. package/components/header/component.js +1 -1
  12. package/components/header/index.css +4 -4
  13. package/components/index.js +5 -3
  14. package/components/screens/fatal-error/component.js +3 -3
  15. package/components/screens/fatal-error/index.css +6 -6
  16. package/components/screens/hint/component.js +3 -3
  17. package/components/screens/hint/index.css +12 -12
  18. package/components/screens/index.js +5 -3
  19. package/components/screens/initial/component.js +12 -9
  20. package/components/screens/initial/countdown-section.js +1 -1
  21. package/components/screens/initial/index.css +17 -20
  22. package/components/screens/initial/index.js +5 -3
  23. package/components/screens/temp-block/component.js +1 -1
  24. package/components/screens/temp-block/index.css +7 -7
  25. package/context.js +1 -0
  26. package/{countdown-section-41f47745.js → countdown-section-fb6524aa.js} +3 -3
  27. package/cssm/component.desktop.d.ts +1 -1
  28. package/cssm/component.desktop.js +4 -2
  29. package/cssm/component.mobile.js +4 -2
  30. package/cssm/component.responsive.d.ts +2 -3
  31. package/cssm/component.responsive.js +8 -8
  32. package/cssm/components/base-confirmation/component.js +7 -4
  33. package/cssm/components/base-confirmation/index.js +4 -2
  34. package/cssm/components/index.js +4 -2
  35. package/cssm/components/screens/fatal-error/component.js +2 -2
  36. package/cssm/components/screens/hint/component.js +2 -2
  37. package/cssm/components/screens/index.js +4 -2
  38. package/cssm/components/screens/initial/component.js +11 -8
  39. package/cssm/components/screens/initial/countdown-section.js +2 -2
  40. package/cssm/components/screens/initial/index.js +4 -2
  41. package/cssm/components/screens/initial/index.module.css +0 -3
  42. package/cssm/context.js +1 -0
  43. package/cssm/desktop.d.ts +1 -1
  44. package/cssm/desktop.js +7 -3
  45. package/cssm/index.d.ts +2 -6
  46. package/cssm/index.js +18 -26
  47. package/cssm/mobile.d.ts +1 -1
  48. package/cssm/mobile.js +7 -3
  49. package/cssm/shared.d.ts +4 -0
  50. package/cssm/shared.js +43 -0
  51. package/cssm/types.d.ts +11 -0
  52. package/desktop.d.ts +1 -1
  53. package/desktop.js +8 -4
  54. package/esm/component.desktop.d.ts +1 -1
  55. package/esm/component.desktop.js +5 -3
  56. package/esm/component.mobile.js +6 -4
  57. package/esm/component.responsive.d.ts +2 -3
  58. package/esm/component.responsive.js +9 -9
  59. package/esm/components/base-confirmation/component.js +9 -6
  60. package/esm/components/base-confirmation/index.css +2 -2
  61. package/esm/components/base-confirmation/index.js +5 -3
  62. package/esm/components/countdown-loader/component.js +1 -1
  63. package/esm/components/countdown-loader/index.css +2 -2
  64. package/esm/components/header/component.js +1 -1
  65. package/esm/components/header/index.css +4 -4
  66. package/esm/components/index.js +5 -3
  67. package/esm/components/screens/fatal-error/component.js +3 -3
  68. package/esm/components/screens/fatal-error/index.css +6 -6
  69. package/esm/components/screens/hint/component.js +3 -3
  70. package/esm/components/screens/hint/index.css +12 -12
  71. package/esm/components/screens/index.js +5 -3
  72. package/esm/components/screens/initial/component.js +8 -5
  73. package/esm/components/screens/initial/countdown-section.js +1 -1
  74. package/esm/components/screens/initial/index.css +17 -20
  75. package/esm/components/screens/initial/index.js +5 -3
  76. package/esm/components/screens/temp-block/component.js +1 -1
  77. package/esm/components/screens/temp-block/index.css +7 -7
  78. package/esm/context.js +1 -0
  79. package/esm/{countdown-section-83bf5f20.js → countdown-section-c65cff2d.js} +3 -3
  80. package/esm/desktop.d.ts +1 -1
  81. package/esm/desktop.js +6 -4
  82. package/esm/index.d.ts +2 -6
  83. package/esm/index.js +17 -14
  84. package/esm/mobile.css +2 -2
  85. package/esm/mobile.d.ts +1 -1
  86. package/esm/mobile.js +6 -4
  87. package/esm/shared.d.ts +4 -0
  88. package/esm/shared.js +20 -0
  89. package/esm/types.d.ts +11 -0
  90. package/index.d.ts +2 -6
  91. package/index.js +16 -24
  92. package/mobile.css +2 -2
  93. package/mobile.d.ts +1 -1
  94. package/mobile.js +8 -4
  95. package/modern/component.desktop.d.ts +1 -1
  96. package/modern/component.desktop.js +5 -3
  97. package/modern/component.mobile.js +6 -4
  98. package/modern/component.responsive.d.ts +2 -3
  99. package/modern/component.responsive.js +9 -9
  100. package/modern/components/base-confirmation/component.js +8 -5
  101. package/modern/components/base-confirmation/index.css +2 -2
  102. package/modern/components/base-confirmation/index.js +5 -3
  103. package/modern/components/countdown-loader/component.js +1 -1
  104. package/modern/components/countdown-loader/index.css +2 -2
  105. package/modern/components/header/component.js +1 -1
  106. package/modern/components/header/index.css +4 -4
  107. package/modern/components/index.js +5 -3
  108. package/modern/components/screens/fatal-error/component.js +3 -3
  109. package/modern/components/screens/fatal-error/index.css +6 -6
  110. package/modern/components/screens/hint/component.js +3 -3
  111. package/modern/components/screens/hint/index.css +12 -12
  112. package/modern/components/screens/index.js +5 -3
  113. package/modern/components/screens/initial/component.js +8 -5
  114. package/modern/components/screens/initial/countdown-section.js +1 -1
  115. package/modern/components/screens/initial/index.css +17 -20
  116. package/modern/components/screens/initial/index.js +5 -3
  117. package/modern/components/screens/temp-block/component.js +1 -1
  118. package/modern/components/screens/temp-block/index.css +7 -7
  119. package/modern/context.js +1 -0
  120. package/modern/{countdown-section-a28d693c.js → countdown-section-dd4e5fe3.js} +3 -3
  121. package/modern/desktop.d.ts +1 -1
  122. package/modern/desktop.js +6 -4
  123. package/modern/index.d.ts +2 -6
  124. package/modern/index.js +17 -14
  125. package/modern/mobile.css +2 -2
  126. package/modern/mobile.d.ts +1 -1
  127. package/modern/mobile.js +6 -4
  128. package/modern/shared.d.ts +4 -0
  129. package/modern/shared.js +20 -0
  130. package/modern/types.d.ts +11 -0
  131. package/package.json +31 -6
  132. package/shared.d.ts +4 -0
  133. package/shared.js +37 -0
  134. package/src/component.desktop.tsx +10 -0
  135. package/src/component.mobile.tsx +13 -0
  136. package/src/component.responsive.tsx +31 -0
  137. package/src/components/base-confirmation/component.tsx +123 -0
  138. package/src/components/base-confirmation/index.module.css +8 -0
  139. package/src/components/base-confirmation/index.ts +1 -0
  140. package/src/components/countdown-loader/component.tsx +37 -0
  141. package/src/components/countdown-loader/index.module.css +7 -0
  142. package/src/components/countdown-loader/index.ts +1 -0
  143. package/src/components/header/component.tsx +28 -0
  144. package/src/components/header/index.module.css +21 -0
  145. package/src/components/header/index.ts +1 -0
  146. package/src/components/index.ts +2 -0
  147. package/src/components/screens/fatal-error/component.tsx +46 -0
  148. package/src/components/screens/fatal-error/index.module.css +23 -0
  149. package/src/components/screens/fatal-error/index.ts +1 -0
  150. package/src/components/screens/hint/component.tsx +94 -0
  151. package/src/components/screens/hint/index.module.css +51 -0
  152. package/src/components/screens/hint/index.ts +1 -0
  153. package/src/components/screens/index.ts +4 -0
  154. package/src/components/screens/initial/component.tsx +190 -0
  155. package/src/components/screens/initial/countdown-section.tsx +79 -0
  156. package/src/components/screens/initial/index.module.css +71 -0
  157. package/src/components/screens/initial/index.ts +1 -0
  158. package/src/components/screens/temp-block/component.tsx +58 -0
  159. package/src/components/screens/temp-block/index.module.css +28 -0
  160. package/src/components/screens/temp-block/index.ts +1 -0
  161. package/src/context.ts +26 -0
  162. package/src/desktop.ts +3 -0
  163. package/src/index.ts +6 -0
  164. package/src/mobile.module.css +3 -0
  165. package/src/mobile.ts +3 -0
  166. package/src/shared.ts +4 -0
  167. package/src/types.ts +219 -0
  168. package/src/utils.ts +107 -0
  169. package/src/vars.css +33 -0
  170. package/types.d.ts +11 -0
  171. package/cssm/responsive.d.ts +0 -2
  172. package/cssm/responsive.js +0 -39
  173. package/esm/responsive.d.ts +0 -2
  174. package/esm/responsive.js +0 -23
  175. package/modern/responsive.d.ts +0 -2
  176. package/modern/responsive.js +0 -22
  177. package/responsive.d.ts +0 -2
  178. package/responsive.js +0 -31
  179. /package/{countdown-section-41f47745.d.ts → countdown-section-fb6524aa.d.ts} +0 -0
  180. /package/esm/{countdown-section-83bf5f20.d.ts → countdown-section-c65cff2d.d.ts} +0 -0
  181. /package/modern/{countdown-section-a28d693c.d.ts → countdown-section-dd4e5fe3.d.ts} +0 -0
@@ -1,19 +1,22 @@
1
1
  import React from 'react';
2
- import { useMedia } from '@alfalab/hooks';
2
+ import { useMatchMedia } from '@alfalab/core-components-mq/modern';
3
3
  import { ConfirmationDesktop } from './component.desktop.js';
4
4
  import { ConfirmationMobile } from './component.mobile.js';
5
5
  import './components/base-confirmation/component.js';
6
6
  import 'classnames';
7
+ import '@alfalab/hooks';
7
8
  import './context.js';
8
9
  import './utils.js';
9
10
  import './types.js';
10
11
  import './components/screens/initial/component.js';
11
- import '@alfalab/core-components-button/modern';
12
- import '@alfalab/core-components-code-input/modern';
12
+ import '@alfalab/core-components-button/modern/mobile';
13
+ import '@alfalab/core-components-code-input/modern/desktop';
14
+ import '@alfalab/core-components-code-input/modern/mobile';
13
15
  import '@alfalab/core-components-link/modern';
14
16
  import '@alfalab/core-components-typography/modern';
15
17
  import './components/header/component.js';
16
- import './countdown-section-a28d693c.js';
18
+ import './countdown-section-dd4e5fe3.js';
19
+ import '@alfalab/core-components-button/modern';
17
20
  import '@alfalab/core-components-loader/modern';
18
21
  import './components/screens/hint/component.js';
19
22
  import './components/screens/fatal-error/component.js';
@@ -21,11 +24,8 @@ import './components/screens/temp-block/component.js';
21
24
  import './components/countdown-loader/component.js';
22
25
 
23
26
  const ConfirmationResponsive = ({ breakpoint = 1024, ...restProps }) => {
24
- const [view] = useMedia([
25
- ['mobile', `(max-width: ${breakpoint - 1}px)`],
26
- ['desktop', `(min-width: ${breakpoint}px)`],
27
- ], 'desktop');
28
- return view === 'desktop' ? (React.createElement(ConfirmationDesktop, { ...restProps })) : (React.createElement(ConfirmationMobile, { ...restProps }));
27
+ const [isDesktop] = useMatchMedia(`(min-width: ${breakpoint}px)`, true);
28
+ return isDesktop ? (React.createElement(ConfirmationDesktop, { ...restProps })) : (React.createElement(ConfirmationMobile, { breakpoint: breakpoint, ...restProps }));
29
29
  };
30
30
 
31
31
  export { ConfirmationResponsive };
@@ -8,16 +8,18 @@ import { Initial } from '../screens/initial/component.js';
8
8
  import { Hint } from '../screens/hint/component.js';
9
9
  import { FatalError } from '../screens/fatal-error/component.js';
10
10
  import { TempBlock } from '../screens/temp-block/component.js';
11
- import '@alfalab/core-components-button/modern';
12
- import '@alfalab/core-components-code-input/modern';
11
+ import '@alfalab/core-components-button/modern/mobile';
12
+ import '@alfalab/core-components-code-input/modern/desktop';
13
+ import '@alfalab/core-components-code-input/modern/mobile';
13
14
  import '@alfalab/core-components-link/modern';
14
15
  import '@alfalab/core-components-typography/modern';
15
16
  import '../header/component.js';
16
- import '../../countdown-section-a28d693c.js';
17
+ import '../../countdown-section-dd4e5fe3.js';
18
+ import '@alfalab/core-components-button/modern';
17
19
  import '@alfalab/core-components-loader/modern';
18
20
  import '../countdown-loader/component.js';
19
21
 
20
- const styles = {"component":"confirmation__component_6nkvy"};
22
+ const styles = {"component":"confirmation__component_19xfa"};
21
23
  require('./index.css')
22
24
 
23
25
  const confirmationScreens = {
@@ -26,7 +28,7 @@ const confirmationScreens = {
26
28
  FATAL_ERROR: FatalError,
27
29
  TEMP_BLOCK: TempBlock,
28
30
  };
29
- const BaseConfirmation = ({ state, screen, alignContent = 'left', children, requiredCharAmount = 5, countdownDuration = ONE_MINUTE, tempBlockDuration = ONE_DAY, phone, blockSmsRetry, dataTestId, className, getScreensMap, onInputFinished, onChangeState, onSmsRetryClick, onChangeScreen, onFatalErrorOkButtonClick, onTempBlockFinished, mobile, clearCodeOnError = true, hideCountdownSection = false, ...restProps }) => {
31
+ const BaseConfirmation = ({ state, screen, alignContent = 'left', children, requiredCharAmount = 5, countdownDuration = ONE_MINUTE, tempBlockDuration = ONE_DAY, phone, blockSmsRetry, dataTestId, className, getScreensMap, onInputFinished, onChangeState, onSmsRetryClick, onChangeScreen, onFatalErrorOkButtonClick, onTempBlockFinished, mobile, clearCodeOnError = true, hideCountdownSection = false, breakpoint = 1024, ...restProps }) => {
30
32
  const [timeLeft, startTimer, stopTimer] = useCountdown(countdownDuration);
31
33
  const prevState = usePrevious(state);
32
34
  useEffect(() => {
@@ -74,6 +76,7 @@ const BaseConfirmation = ({ state, screen, alignContent = 'left', children, requ
74
76
  tempBlockDuration,
75
77
  phone,
76
78
  blockSmsRetry,
79
+ breakpoint,
77
80
  onTempBlockFinished,
78
81
  onChangeState,
79
82
  onChangeScreen,
@@ -1,4 +1,4 @@
1
- /* hash: osu4z */
1
+ /* hash: sufuv */
2
2
  :root {
3
3
  } /* deprecated */ :root {
4
4
  --color-light-text-secondary: rgba(60, 60, 67, 0.66); /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
@@ -15,7 +15,7 @@
15
15
  } :root {
16
16
  } :root {
17
17
  } :root {
18
- } .confirmation__component_6nkvy {
18
+ } .confirmation__component_19xfa {
19
19
  width: 100%;
20
20
  max-width: 388px;
21
21
  margin: 0 auto;
@@ -6,12 +6,14 @@ import '../../context.js';
6
6
  import '../../utils.js';
7
7
  import '../../types.js';
8
8
  import '../screens/initial/component.js';
9
- import '@alfalab/core-components-button/modern';
10
- import '@alfalab/core-components-code-input/modern';
9
+ import '@alfalab/core-components-button/modern/mobile';
10
+ import '@alfalab/core-components-code-input/modern/desktop';
11
+ import '@alfalab/core-components-code-input/modern/mobile';
11
12
  import '@alfalab/core-components-link/modern';
12
13
  import '@alfalab/core-components-typography/modern';
13
14
  import '../header/component.js';
14
- import '../../countdown-section-a28d693c.js';
15
+ import '../../countdown-section-dd4e5fe3.js';
16
+ import '@alfalab/core-components-button/modern';
15
17
  import '@alfalab/core-components-loader/modern';
16
18
  import '../screens/hint/component.js';
17
19
  import '../screens/fatal-error/component.js';
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
 
3
- const styles = {"circle":"confirmation__circle_1nxmu"};
3
+ const styles = {"circle":"confirmation__circle_fzyku"};
4
4
  require('./index.css')
5
5
 
6
6
  const SIZE = 16;
@@ -1,4 +1,4 @@
1
- /* hash: 1k61m */
1
+ /* hash: 10yuu */
2
2
  :root {
3
3
  } /* deprecated */ :root {
4
4
  --color-light-graphic-tertiary: #c1c1c3; /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
@@ -15,7 +15,7 @@
15
15
  } :root {
16
16
  } :root {
17
17
  } :root {
18
- } .confirmation__circle_1nxmu {
18
+ } .confirmation__circle_fzyku {
19
19
  fill: transparent;
20
20
  stroke: var(--color-light-graphic-tertiary);
21
21
  stroke-width: 2px;
@@ -2,7 +2,7 @@ import React from 'react';
2
2
  import cn from 'classnames';
3
3
  import { Typography } from '@alfalab/core-components-typography/modern';
4
4
 
5
- const styles = {"header":"confirmation__header_1eaff","typography":"confirmation__typography_1eaff","typographyMobile":"confirmation__typographyMobile_1eaff"};
5
+ const styles = {"header":"confirmation__header_2zjkj","typography":"confirmation__typography_2zjkj","typographyMobile":"confirmation__typographyMobile_2zjkj"};
6
6
  require('./index.css')
7
7
 
8
8
  const Header = ({ mobile, children }) => (React.createElement(Typography.Title, { className: cn(styles.header, styles.typography, { [styles.typographyMobile]: mobile }), tag: 'h3', color: 'primary' }, children));
@@ -1,4 +1,4 @@
1
- /* hash: aqcvz */
1
+ /* hash: e6d4i */
2
2
  :root {
3
3
  } /* deprecated */ :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 */
4
4
  } :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 */
@@ -34,15 +34,15 @@
34
34
 
35
35
  /* header */
36
36
  --confirmation-header-font-feature-settings: normal
37
- } .confirmation__header_1eaff.confirmation__header_1eaff {
37
+ } .confirmation__header_2zjkj.confirmation__header_2zjkj {
38
38
  margin-bottom: var(--gap-xl);
39
- } .confirmation__typography_1eaff.confirmation__typography_1eaff.confirmation__typography_1eaff {
39
+ } .confirmation__typography_2zjkj.confirmation__typography_2zjkj.confirmation__typography_2zjkj {
40
40
  font-feature-settings: var(--confirmation-header-font-feature-settings);
41
41
  font-size: var(--confirmation-header-desktop-font-size);
42
42
  line-height: var(--confirmation-header-desktop-line-height);
43
43
  font-weight: var(--confirmation-header-desktop-font-weight);
44
44
  font-family: var(--confirmation-header-desktop-font-family);
45
- } .confirmation__typographyMobile_1eaff.confirmation__typographyMobile_1eaff.confirmation__typographyMobile_1eaff {
45
+ } .confirmation__typographyMobile_2zjkj.confirmation__typographyMobile_2zjkj.confirmation__typographyMobile_2zjkj {
46
46
  font-feature-settings: var(--confirmation-header-font-feature-settings);
47
47
  font-size: var(--confirmation-header-mobile-font-size);
48
48
  line-height: var(--confirmation-header-mobile-line-height);
@@ -5,13 +5,15 @@ export { TempBlock } from './screens/temp-block/component.js';
5
5
  export { CountdownLoader } from './countdown-loader/component.js';
6
6
  import 'react';
7
7
  import 'classnames';
8
- import '@alfalab/core-components-button/modern';
9
- import '@alfalab/core-components-code-input/modern';
8
+ import '@alfalab/core-components-button/modern/mobile';
9
+ import '@alfalab/core-components-code-input/modern/desktop';
10
+ import '@alfalab/core-components-code-input/modern/mobile';
10
11
  import '@alfalab/core-components-link/modern';
11
12
  import '@alfalab/core-components-typography/modern';
12
13
  import '@alfalab/hooks';
13
14
  import '../context.js';
14
15
  import '../utils.js';
15
16
  import './header/component.js';
16
- import '../countdown-section-a28d693c.js';
17
+ import '../countdown-section-dd4e5fe3.js';
18
+ import '@alfalab/core-components-button/modern';
17
19
  import '@alfalab/core-components-loader/modern';
@@ -6,15 +6,15 @@ import { ConfirmationContext } from '../../../context.js';
6
6
  import { Header } from '../../header/component.js';
7
7
  import '../../../utils.js';
8
8
 
9
- const styles = {"component":"confirmation__component_vxx2m","typographyTheme":"confirmation__typographyTheme_vxx2m","left":"confirmation__left_vxx2m","center":"confirmation__center_vxx2m","button":"confirmation__button_vxx2m"};
9
+ const styles = {"component":"confirmation__component_1jo59","typographyTheme":"confirmation__typographyTheme_1jo59","left":"confirmation__left_1jo59","center":"confirmation__center_1jo59","button":"confirmation__button_1jo59"};
10
10
  require('./index.css')
11
11
 
12
12
  const FatalError = ({ mobile }) => {
13
- const { alignContent, texts, onFatalErrorOkButtonClick } = useContext(ConfirmationContext);
13
+ const { alignContent, texts, onFatalErrorOkButtonClick, breakpoint } = useContext(ConfirmationContext);
14
14
  return (React.createElement("div", { className: cn(styles.component, styles[alignContent]) },
15
15
  React.createElement(Header, { mobile: mobile }, texts.fatalErrorTitle),
16
16
  React.createElement(Typography.Text, { view: 'primary-medium', color: 'primary', className: cn({ [styles.typographyTheme]: !mobile }) }, texts.fatalErrorDescription),
17
- React.createElement(Button, { size: mobile ? 'xs' : 's', view: 'secondary', onClick: onFatalErrorOkButtonClick, className: styles.button }, texts.fatalErrorButton)));
17
+ React.createElement(Button, { size: mobile ? 'xs' : 's', view: 'secondary', onClick: onFatalErrorOkButtonClick, className: styles.button, breakpoint: breakpoint }, texts.fatalErrorButton)));
18
18
  };
19
19
 
20
20
  export { FatalError };
@@ -1,4 +1,4 @@
1
- /* hash: kjcue */
1
+ /* hash: nzd2y */
2
2
  :root {
3
3
  } /* deprecated */ :root {
4
4
  --color-light-text-primary: #0e0e0e; /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
@@ -31,20 +31,20 @@
31
31
  --confirmation-text-color: var(--color-light-text-primary)
32
32
 
33
33
  /* header */
34
- } .confirmation__component_vxx2m {
34
+ } .confirmation__component_1jo59 {
35
35
  display: flex;
36
36
  flex-direction: column;
37
- } .confirmation__typographyTheme_vxx2m.confirmation__typographyTheme_vxx2m {
37
+ } .confirmation__typographyTheme_1jo59.confirmation__typographyTheme_1jo59 {
38
38
  font-size: var(--confirmation-text-font-size);
39
39
  line-height: var(--confirmation-text-line-height);
40
40
  font-weight: var(--confirmation-text-font-weight);
41
41
  font-family: var(--confirmation-text-font-family);
42
42
  color: var(--confirmation-text-color);
43
- } .confirmation__left_vxx2m {
43
+ } .confirmation__left_1jo59 {
44
44
  align-items: flex-start;
45
- } .confirmation__center_vxx2m {
45
+ } .confirmation__center_1jo59 {
46
46
  align-items: center;
47
47
  text-align: center;
48
- } .confirmation__button_vxx2m {
48
+ } .confirmation__button_1jo59 {
49
49
  margin-top: var(--gap-2xl);
50
50
  }
@@ -7,11 +7,11 @@ import { ConfirmationContext } from '../../../context.js';
7
7
  import { Header } from '../../header/component.js';
8
8
  import '../../../utils.js';
9
9
 
10
- const styles = {"component":"confirmation__component_1ft06","center":"confirmation__center_1ft06","text":"confirmation__text_1ft06","typographyTheme":"confirmation__typographyTheme_1ft06","phonesWrap":"confirmation__phonesWrap_1ft06","phoneWrap":"confirmation__phoneWrap_1ft06","phoneLink":"confirmation__phoneLink_1ft06","hintButton":"confirmation__hintButton_1ft06","phoneContentMobile":"confirmation__phoneContentMobile_1ft06"};
10
+ const styles = {"component":"confirmation__component_kde6d","center":"confirmation__center_kde6d","text":"confirmation__text_kde6d","typographyTheme":"confirmation__typographyTheme_kde6d","phonesWrap":"confirmation__phonesWrap_kde6d","phoneWrap":"confirmation__phoneWrap_kde6d","phoneLink":"confirmation__phoneLink_kde6d","hintButton":"confirmation__hintButton_kde6d","phoneContentMobile":"confirmation__phoneContentMobile_kde6d"};
11
11
  require('./index.css')
12
12
 
13
13
  const Hint = ({ mobile }) => {
14
- const { alignContent, texts, onChangeScreen, onChangeState } = useContext(ConfirmationContext);
14
+ const { alignContent, texts, onChangeScreen, onChangeState, breakpoint } = useContext(ConfirmationContext);
15
15
  const handleReturnButtonClick = () => {
16
16
  onChangeScreen('INITIAL');
17
17
  onChangeState('INITIAL');
@@ -31,7 +31,7 @@ const Hint = ({ mobile }) => {
31
31
  ? 'В\u00A0Москве и\u00A0за\u00A0границей'
32
32
  : ' \u2014\u00A0в\u00A0Москве и\u00A0за\u00A0границей'))),
33
33
  React.createElement(Typography.Text, { view: 'primary-medium', color: 'primary', className: cn(styles.text, { [styles.typographyTheme]: !mobile }) }, "\u0415\u0441\u043B\u0438 \u043D\u043E\u043C\u0435\u0440 \u043D\u0435\u00A0\u043C\u0435\u043D\u044F\u043B\u0441\u044F, \u0432\u043E\u0437\u043C\u043E\u0436\u043D\u043E, \u043F\u0435\u0440\u0435\u0433\u0440\u0443\u0436\u0435\u043D \u0441\u0435\u0440\u0432\u0438\u0441 \u043E\u0442\u043F\u0440\u0430\u0432\u043A\u0438 \u0441\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u0439. \u041F\u043E\u043F\u0440\u043E\u0431\u0443\u0439\u0442\u0435 \u043F\u043E\u0432\u0442\u043E\u0440\u0438\u0442\u044C \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u0447\u0435\u0440\u0435\u0437 \u043D\u0435\u0441\u043A\u043E\u043B\u044C\u043A\u043E \u043C\u0438\u043D\u0443\u0442."),
34
- React.createElement(Button, { size: mobile ? 'xs' : 's', view: 'secondary', onClick: handleReturnButtonClick, className: styles.hintButton }, texts.hintButton)));
34
+ React.createElement(Button, { size: mobile ? 'xs' : 's', view: 'secondary', onClick: handleReturnButtonClick, className: styles.hintButton, breakpoint: breakpoint }, texts.hintButton)));
35
35
  };
36
36
 
37
37
  export { Hint };
@@ -1,4 +1,4 @@
1
- /* hash: 13np8 */
1
+ /* hash: 17pax */
2
2
  :root {
3
3
  } /* deprecated */ :root {
4
4
  --color-light-text-primary: #0e0e0e; /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
@@ -33,38 +33,38 @@
33
33
  --confirmation-text-color: var(--color-light-text-primary)
34
34
 
35
35
  /* header */
36
- } .confirmation__component_1ft06 {
36
+ } .confirmation__component_kde6d {
37
37
  display: flex;
38
38
  flex-direction: column;
39
39
  align-items: flex-start
40
- } .confirmation__component_1ft06 span:last-of-type {
40
+ } .confirmation__component_kde6d span:last-of-type {
41
41
  margin-bottom: 0;
42
- } .confirmation__center_1ft06 {
42
+ } .confirmation__center_kde6d {
43
43
  align-items: center;
44
44
  text-align: center;
45
- } .confirmation__text_1ft06.confirmation__text_1ft06 {
45
+ } .confirmation__text_kde6d.confirmation__text_kde6d {
46
46
  margin-bottom: var(--gap-xl);
47
- } .confirmation__typographyTheme_1ft06.confirmation__typographyTheme_1ft06 {
47
+ } .confirmation__typographyTheme_kde6d.confirmation__typographyTheme_kde6d {
48
48
  font-size: var(--confirmation-text-font-size);
49
49
  line-height: var(--confirmation-text-line-height);
50
50
  font-weight: var(--confirmation-text-font-weight);
51
51
  font-family: var(--confirmation-text-font-family);
52
52
  color: var(--confirmation-text-color);
53
- } .confirmation__phonesWrap_1ft06 {
53
+ } .confirmation__phonesWrap_kde6d {
54
54
  display: flex;
55
55
  flex-direction: column;
56
56
  margin-bottom: var(--gap-xl);
57
- } .confirmation__phoneWrap_1ft06 {
57
+ } .confirmation__phoneWrap_kde6d {
58
58
  margin-bottom: var(--gap-xs)
59
- } .confirmation__phoneWrap_1ft06:last-child {
59
+ } .confirmation__phoneWrap_kde6d:last-child {
60
60
  margin-bottom: 0;
61
- } .confirmation__phoneLink_1ft06.confirmation__phoneLink_1ft06 {
61
+ } .confirmation__phoneLink_kde6d.confirmation__phoneLink_kde6d {
62
62
  font-size: 16px;
63
63
  line-height: 24px;
64
64
  font-weight: 500;
65
- } .confirmation__hintButton_1ft06 {
65
+ } .confirmation__hintButton_kde6d {
66
66
  margin-top: var(--gap-2xl);
67
- } .confirmation__phoneContentMobile_1ft06 {
67
+ } .confirmation__phoneContentMobile_kde6d {
68
68
  display: flex;
69
69
  flex-direction: column;
70
70
  align-items: center;
@@ -4,14 +4,16 @@ export { FatalError } from './fatal-error/component.js';
4
4
  export { TempBlock } from './temp-block/component.js';
5
5
  import 'react';
6
6
  import 'classnames';
7
- import '@alfalab/core-components-button/modern';
8
- import '@alfalab/core-components-code-input/modern';
7
+ import '@alfalab/core-components-button/modern/mobile';
8
+ import '@alfalab/core-components-code-input/modern/desktop';
9
+ import '@alfalab/core-components-code-input/modern/mobile';
9
10
  import '@alfalab/core-components-link/modern';
10
11
  import '@alfalab/core-components-typography/modern';
11
12
  import '@alfalab/hooks';
12
13
  import '../../context.js';
13
14
  import '../../utils.js';
14
15
  import '../header/component.js';
15
- import '../../countdown-section-a28d693c.js';
16
+ import '../../countdown-section-dd4e5fe3.js';
17
+ import '@alfalab/core-components-button/modern';
16
18
  import '@alfalab/core-components-loader/modern';
17
19
  import '../countdown-loader/component.js';
@@ -1,14 +1,16 @@
1
1
  import React, { useContext, useRef, useState, useCallback, useEffect, useLayoutEffect } from 'react';
2
2
  import cn from 'classnames';
3
- import { Button } from '@alfalab/core-components-button/modern';
4
- import { CodeInput } from '@alfalab/core-components-code-input/modern';
3
+ import { ButtonMobile } from '@alfalab/core-components-button/modern/mobile';
4
+ import { CodeInputDesktop } from '@alfalab/core-components-code-input/modern/desktop';
5
+ import { CodeInputMobile } from '@alfalab/core-components-code-input/modern/mobile';
5
6
  import { Link } from '@alfalab/core-components-link/modern';
6
7
  import { Typography } from '@alfalab/core-components-typography/modern';
7
8
  import { usePrevious } from '@alfalab/hooks';
8
9
  import { ConfirmationContext } from '../../../context.js';
9
10
  import { Header } from '../../header/component.js';
10
- import { s as styles, C as CountdownSection } from '../../../countdown-section-a28d693c.js';
11
+ import { s as styles, C as CountdownSection } from '../../../countdown-section-dd4e5fe3.js';
11
12
  import '../../../utils.js';
13
+ import '@alfalab/core-components-button/modern';
12
14
  import '@alfalab/core-components-loader/modern';
13
15
 
14
16
  const CODE_SEND_HINT_VISIBLE_DURATION = 2000;
@@ -79,14 +81,15 @@ const Initial = ({ mobile }) => {
79
81
  };
80
82
  const processing = ['CODE_CHECKING', 'CODE_SENDING'].includes(state);
81
83
  const timePassed = timeLeft === 0;
84
+ const ComponentCodeInput = mobile ? CodeInputMobile : CodeInputDesktop;
82
85
  return (React.createElement("div", { className: cn(styles.component, styles[alignContent]) },
83
86
  React.createElement(Header, { mobile: mobile }, texts.title),
84
87
  React.createElement(Typography.Text, { view: 'primary-medium', color: 'primary', className: cn(styles.phone, { [styles.typographyTheme]: !mobile }) },
85
88
  "\u041A\u043E\u0434 \u043E\u0442\u043F\u0440\u0430\u0432\u043B\u0435\u043D \u043D\u0430 ",
86
89
  phone),
87
- React.createElement(CodeInput, { disabled: processing, error: getCodeInputError(), ref: inputRef, fields: requiredCharAmount, className: cn(styles.containerInput, styles.codeInput), onComplete: handleInputComplete, onChange: handleInputChange, clearCodeOnError: clearCodeOnError, onErrorAnimationEnd: handleErrorAnimationEnd }),
90
+ React.createElement(ComponentCodeInput, { disabled: processing, error: getCodeInputError(), ref: inputRef, fields: requiredCharAmount, className: cn(styles.containerInput, styles.codeInput), onComplete: handleInputComplete, onChange: handleInputChange, clearCodeOnError: clearCodeOnError, onErrorAnimationEnd: handleErrorAnimationEnd }),
88
91
  !hideCountdownSection && (React.createElement(CountdownSection, { processing: processing, timePassed: timePassed, codeSendHintVisible: codeSendHintVisible, handleSmsRetryClick: handleSmsRetryClick, mobile: mobile })),
89
- mobile ? (React.createElement(Button, { onClick: handleSmsHintLinkClick, view: 'link', size: 'xs' }, texts.linkToHint)) : (React.createElement(Link, { onClick: handleSmsHintLinkClick, className: styles.smsComeLink, view: mobile ? 'primary' : 'secondary', pseudo: true }, texts.linkToHint))));
92
+ mobile ? (React.createElement(ButtonMobile, { onClick: handleSmsHintLinkClick, view: 'link', size: 'xs' }, texts.linkToHint)) : (React.createElement(Link, { onClick: handleSmsHintLinkClick, className: styles.smsComeLink, view: mobile ? 'primary' : 'secondary', pseudo: true }, texts.linkToHint))));
90
93
  };
91
94
 
92
95
  export { Initial };
@@ -5,4 +5,4 @@ import '@alfalab/core-components-loader/modern';
5
5
  import '@alfalab/core-components-typography/modern';
6
6
  import '../../../context.js';
7
7
  import '../../../utils.js';
8
- export { C as CountdownSection } from '../../../countdown-section-a28d693c.js';
8
+ export { C as CountdownSection } from '../../../countdown-section-dd4e5fe3.js';
@@ -1,4 +1,4 @@
1
- /* hash: 1hf3q */
1
+ /* hash: 26rxz */
2
2
  :root {
3
3
  } /* deprecated */ :root {
4
4
  --color-light-text-primary: #0e0e0e;
@@ -14,7 +14,6 @@
14
14
  /* Hard up */
15
15
  } :root {
16
16
  } :root {
17
- --gap-2xs: 4px;
18
17
  --gap-s: 12px;
19
18
  --gap-m: 16px;
20
19
  --gap-l: 20px;
@@ -38,51 +37,49 @@
38
37
  --confirmation-text-color: var(--color-light-text-primary)
39
38
 
40
39
  /* header */
41
- } .confirmation__component_16lwf {
40
+ } .confirmation__component_7ycwi {
42
41
  display: flex;
43
42
  flex-direction: column;
44
- } .confirmation__typographyTheme_16lwf.confirmation__typographyTheme_16lwf {
43
+ } .confirmation__typographyTheme_7ycwi.confirmation__typographyTheme_7ycwi {
45
44
  font-size: var(--confirmation-text-font-size);
46
45
  line-height: var(--confirmation-text-line-height);
47
46
  font-weight: var(--confirmation-text-font-weight);
48
47
  font-family: var(--confirmation-text-font-family);
49
48
  color: var(--confirmation-text-color);
50
- } .confirmation__phone_16lwf.confirmation__phone_16lwf {
49
+ } .confirmation__phone_7ycwi.confirmation__phone_7ycwi {
51
50
  color: var(--color-light-text-primary);
52
51
  margin-bottom: var(--gap-2xl);
53
- } .confirmation__compact_16lwf {
52
+ } .confirmation__compact_7ycwi {
54
53
  margin-bottom: var(--gap-xl);
55
- } .confirmation__loaderWrap_16lwf {
54
+ } .confirmation__loaderWrap_7ycwi {
56
55
  display: flex;
57
56
  align-items: center;
58
- } .confirmation__left_16lwf {
57
+ } .confirmation__left_7ycwi {
59
58
  align-items: flex-start;
60
- } .confirmation__center_16lwf {
59
+ } .confirmation__center_7ycwi {
61
60
  align-items: center;
62
61
  text-align: center
63
- } .confirmation__center_16lwf .confirmation__loaderWrap_16lwf {
62
+ } .confirmation__center_7ycwi .confirmation__loaderWrap_7ycwi {
64
63
  justify-content: center;
65
- } .confirmation__center_16lwf input {
66
- margin: 0 var(--gap-2xs);
67
- } .confirmation__codeInput_16lwf {
64
+ } .confirmation__codeInput_7ycwi {
68
65
  margin-bottom: var(--gap-s);
69
- } .confirmation__smsComeLink_16lwf.confirmation__smsComeLink_16lwf {
66
+ } .confirmation__smsComeLink_7ycwi.confirmation__smsComeLink_7ycwi {
70
67
  font-size: 14px;
71
68
  line-height: 20px;
72
69
  font-weight: 500;
73
- } .confirmation__countdownContainer_16lwf.confirmation__countdownContainer_16lwf {
70
+ } .confirmation__countdownContainer_7ycwi.confirmation__countdownContainer_7ycwi {
74
71
  color: var(--color-light-text-secondary);
75
72
  margin-bottom: var(--gap-xl);
76
- } .confirmation__countdownMobile_16lwf.confirmation__countdownMobile_16lwf {
73
+ } .confirmation__countdownMobile_7ycwi.confirmation__countdownMobile_7ycwi {
77
74
  margin-bottom: var(--gap-l);
78
- } .confirmation__countdownLoaderMobile_16lwf.confirmation__countdownLoaderMobile_16lwf {
75
+ } .confirmation__countdownLoaderMobile_7ycwi.confirmation__countdownLoaderMobile_7ycwi {
79
76
  margin-bottom: var(--gap-m);
80
- } .confirmation__getCodeButton_16lwf {
77
+ } .confirmation__getCodeButton_7ycwi {
81
78
  position: relative;
82
79
  top: var(--gap-2xs-neg);
83
80
  margin-bottom: var(--gap-m);
84
- } .confirmation__getCodeButtonMobile_16lwf {
81
+ } .confirmation__getCodeButtonMobile_7ycwi {
85
82
  margin-bottom: 0;
86
- } .confirmation__containerInput_16lwf {
83
+ } .confirmation__containerInput_7ycwi {
87
84
  min-height: 80px;
88
85
  }
@@ -1,13 +1,15 @@
1
1
  export { Initial } from './component.js';
2
2
  import 'react';
3
3
  import 'classnames';
4
- import '@alfalab/core-components-button/modern';
5
- import '@alfalab/core-components-code-input/modern';
4
+ import '@alfalab/core-components-button/modern/mobile';
5
+ import '@alfalab/core-components-code-input/modern/desktop';
6
+ import '@alfalab/core-components-code-input/modern/mobile';
6
7
  import '@alfalab/core-components-link/modern';
7
8
  import '@alfalab/core-components-typography/modern';
8
9
  import '@alfalab/hooks';
9
10
  import '../../../context.js';
10
11
  import '../../../utils.js';
11
12
  import '../../header/component.js';
12
- import '../../../countdown-section-a28d693c.js';
13
+ import '../../../countdown-section-dd4e5fe3.js';
14
+ import '@alfalab/core-components-button/modern';
13
15
  import '@alfalab/core-components-loader/modern';
@@ -6,7 +6,7 @@ import { useCountdown, formatMsAsMinutes } from '../../../utils.js';
6
6
  import { CountdownLoader } from '../../countdown-loader/component.js';
7
7
  import { Header } from '../../header/component.js';
8
8
 
9
- const styles = {"component":"confirmation__component_1q9mt","center":"confirmation__center_1q9mt","typographyTheme":"confirmation__typographyTheme_1q9mt","description":"confirmation__description_1q9mt","countdownWrap":"confirmation__countdownWrap_1q9mt","loader":"confirmation__loader_1q9mt"};
9
+ const styles = {"component":"confirmation__component_mzsf9","center":"confirmation__center_mzsf9","typographyTheme":"confirmation__typographyTheme_mzsf9","description":"confirmation__description_mzsf9","countdownWrap":"confirmation__countdownWrap_mzsf9","loader":"confirmation__loader_mzsf9"};
10
10
  require('./index.css')
11
11
 
12
12
  const TempBlock = ({ mobile }) => {
@@ -1,4 +1,4 @@
1
- /* hash: 1bz9l */
1
+ /* hash: s6hbt */
2
2
  :root {
3
3
  } /* deprecated */ :root {
4
4
  --color-light-text-primary: #0e0e0e; /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
@@ -31,23 +31,23 @@
31
31
  --confirmation-text-color: var(--color-light-text-primary)
32
32
 
33
33
  /* header */
34
- } .confirmation__component_1q9mt {
34
+ } .confirmation__component_mzsf9 {
35
35
  display: flex;
36
36
  flex-direction: column;
37
- } .confirmation__center_1q9mt {
37
+ } .confirmation__center_mzsf9 {
38
38
  align-items: center;
39
39
  text-align: center;
40
- } .confirmation__typographyTheme_1q9mt.confirmation__typographyTheme_1q9mt {
40
+ } .confirmation__typographyTheme_mzsf9.confirmation__typographyTheme_mzsf9 {
41
41
  font-size: var(--confirmation-text-font-size);
42
42
  line-height: var(--confirmation-text-line-height);
43
43
  font-weight: var(--confirmation-text-font-weight);
44
44
  font-family: var(--confirmation-text-font-family);
45
45
  color: var(--confirmation-text-color);
46
- } .confirmation__description_1q9mt.confirmation__description_1q9mt {
46
+ } .confirmation__description_mzsf9.confirmation__description_mzsf9 {
47
47
  margin-bottom: var(--gap-xs);
48
- } .confirmation__countdownWrap_1q9mt {
48
+ } .confirmation__countdownWrap_mzsf9 {
49
49
  display: flex;
50
50
  align-items: center;
51
- } .confirmation__loader_1q9mt {
51
+ } .confirmation__loader_mzsf9 {
52
52
  margin-right: var(--gap-xs);
53
53
  }
package/modern/context.js CHANGED
@@ -13,6 +13,7 @@ const ConfirmationContext = createContext({
13
13
  tempBlockDuration: ONE_DAY,
14
14
  phone: '',
15
15
  hideCountdownSection: false,
16
+ breakpoint: 1024,
16
17
  onTempBlockFinished: mockFn,
17
18
  onInputFinished: mockFn,
18
19
  onChangeState: mockFn,
@@ -6,11 +6,11 @@ import { Typography } from '@alfalab/core-components-typography/modern';
6
6
  import { ConfirmationContext } from './context.js';
7
7
  import { formatMsAsMinutes } from './utils.js';
8
8
 
9
- const styles = {"component":"confirmation__component_16lwf","typographyTheme":"confirmation__typographyTheme_16lwf","phone":"confirmation__phone_16lwf","compact":"confirmation__compact_16lwf","loaderWrap":"confirmation__loaderWrap_16lwf","left":"confirmation__left_16lwf","center":"confirmation__center_16lwf","codeInput":"confirmation__codeInput_16lwf","smsComeLink":"confirmation__smsComeLink_16lwf","countdownContainer":"confirmation__countdownContainer_16lwf","countdownMobile":"confirmation__countdownMobile_16lwf","countdownLoaderMobile":"confirmation__countdownLoaderMobile_16lwf","getCodeButton":"confirmation__getCodeButton_16lwf","getCodeButtonMobile":"confirmation__getCodeButtonMobile_16lwf","containerInput":"confirmation__containerInput_16lwf"};
9
+ const styles = {"component":"confirmation__component_7ycwi","typographyTheme":"confirmation__typographyTheme_7ycwi","phone":"confirmation__phone_7ycwi","compact":"confirmation__compact_7ycwi","loaderWrap":"confirmation__loaderWrap_7ycwi","left":"confirmation__left_7ycwi","center":"confirmation__center_7ycwi","codeInput":"confirmation__codeInput_7ycwi","smsComeLink":"confirmation__smsComeLink_7ycwi","countdownContainer":"confirmation__countdownContainer_7ycwi","countdownMobile":"confirmation__countdownMobile_7ycwi","countdownLoaderMobile":"confirmation__countdownLoaderMobile_7ycwi","getCodeButton":"confirmation__getCodeButton_7ycwi","getCodeButtonMobile":"confirmation__getCodeButtonMobile_7ycwi","containerInput":"confirmation__containerInput_7ycwi"};
10
10
  require('./components/screens/initial/index.css')
11
11
 
12
12
  const CountdownSection = ({ codeSendHintVisible, timePassed, processing, mobile, handleSmsRetryClick, }) => {
13
- const { state, texts, timeLeft, blockSmsRetry } = useContext(ConfirmationContext);
13
+ const { state, texts, timeLeft, blockSmsRetry, breakpoint } = useContext(ConfirmationContext);
14
14
  const renderText = (text) => (React.createElement(Typography.Text, { className: cn(styles.countdownContainer, {
15
15
  [styles.countdownMobile]: mobile,
16
16
  [styles.typographyTheme]: !mobile,
@@ -28,7 +28,7 @@ const CountdownSection = ({ codeSendHintVisible, timePassed, processing, mobile,
28
28
  if (blockSmsRetry)
29
29
  return renderText(texts.noAttemptsLeft);
30
30
  if (timePassed) {
31
- return (React.createElement(Button, { size: mobile ? 'xs' : 'xxs', view: 'secondary', onClick: handleSmsRetryClick, className: cn(styles.getCodeButton, { [styles.getCodeButtonMobile]: mobile }) }, texts.buttonRetry));
31
+ return (React.createElement(Button, { size: mobile ? 'xs' : 'xxs', view: 'secondary', onClick: handleSmsRetryClick, className: cn(styles.getCodeButton, { [styles.getCodeButtonMobile]: mobile }), breakpoint: breakpoint }, texts.buttonRetry));
32
32
  }
33
33
  return renderText(`${texts.countdown} ${formatMsAsMinutes(timeLeft)}`);
34
34
  };
@@ -1,2 +1,2 @@
1
1
  export * from "./component.desktop";
2
- export {};
2
+ export { useConfirmation, useCountdown } from "./utils";