@alfalab/core-components-confirmation 12.3.3 → 12.3.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 (164) hide show
  1. package/{component-c18159ad.d.ts → component-5a9a6986.d.ts} +0 -0
  2. package/{component-c18159ad.js → component-5a9a6986.js} +6 -11
  3. package/component.desktop.js +6 -12
  4. package/component.mobile.js +7 -14
  5. package/component.responsive.js +9 -15
  6. package/components/base-confirmation/component.js +7 -9
  7. package/components/base-confirmation/index.css +2 -8
  8. package/components/base-confirmation/index.d.ts +1 -1
  9. package/components/base-confirmation/index.js +5 -7
  10. package/components/countdown-loader/component.js +3 -9
  11. package/components/countdown-loader/index.css +2 -2
  12. package/components/countdown-loader/index.js +1 -3
  13. package/components/header/component.js +2 -9
  14. package/components/header/index.css +4 -4
  15. package/components/header/index.js +1 -3
  16. package/components/index.js +10 -12
  17. package/components/screens/fatal-error/component.js +7 -14
  18. package/components/screens/fatal-error/index.css +10 -5
  19. package/components/screens/fatal-error/index.js +3 -5
  20. package/components/screens/hint/component.js +19 -27
  21. package/components/screens/hint/index.css +15 -14
  22. package/components/screens/hint/index.js +3 -5
  23. package/components/screens/index.js +8 -10
  24. package/components/screens/initial/component.js +15 -17
  25. package/components/screens/initial/countdown-section.js +4 -6
  26. package/components/screens/initial/index.css +18 -18
  27. package/components/screens/initial/index.js +5 -7
  28. package/components/screens/temp-block/component.js +10 -17
  29. package/components/screens/temp-block/index.css +13 -5
  30. package/components/screens/temp-block/index.js +4 -6
  31. package/context.js +0 -2
  32. package/{countdown-section-fa5d99c6.d.ts → countdown-section-b356354f.d.ts} +0 -0
  33. package/countdown-section-b356354f.js +44 -0
  34. package/cssm/{component-cbe72bf1.d.ts → component-895f6f86.d.ts} +0 -0
  35. package/cssm/{component-cbe72bf1.js → component-895f6f86.js} +5 -11
  36. package/cssm/component.desktop.js +10 -16
  37. package/cssm/component.mobile.js +11 -19
  38. package/cssm/component.responsive.js +13 -19
  39. package/cssm/components/base-confirmation/component.js +10 -12
  40. package/cssm/components/base-confirmation/index.d.ts +1 -1
  41. package/cssm/components/base-confirmation/index.js +9 -11
  42. package/cssm/components/base-confirmation/index.module.css +0 -6
  43. package/cssm/components/countdown-loader/component.js +2 -9
  44. package/cssm/components/countdown-loader/index.js +1 -3
  45. package/cssm/components/header/component.js +1 -9
  46. package/cssm/components/header/index.js +1 -3
  47. package/cssm/components/header/index.module.css +3 -3
  48. package/cssm/components/index.js +12 -14
  49. package/cssm/components/screens/fatal-error/component.js +7 -15
  50. package/cssm/components/screens/fatal-error/index.js +4 -6
  51. package/cssm/components/screens/fatal-error/index.module.css +6 -1
  52. package/cssm/components/screens/hint/component.js +19 -28
  53. package/cssm/components/screens/hint/index.js +4 -6
  54. package/cssm/components/screens/hint/index.module.css +9 -8
  55. package/cssm/components/screens/index.js +10 -12
  56. package/cssm/components/screens/initial/component.js +17 -20
  57. package/cssm/components/screens/initial/countdown-section.js +24 -39
  58. package/cssm/components/screens/initial/index.js +6 -8
  59. package/cssm/components/screens/initial/index.module.css +5 -5
  60. package/cssm/components/screens/temp-block/component.js +11 -19
  61. package/cssm/components/screens/temp-block/index.js +6 -8
  62. package/cssm/components/screens/temp-block/index.module.css +10 -2
  63. package/cssm/context.js +0 -2
  64. package/cssm/desktop.d.ts +1 -0
  65. package/cssm/desktop.js +10 -12
  66. package/cssm/index.js +24 -26
  67. package/cssm/mobile.d.ts +1 -0
  68. package/cssm/mobile.js +10 -12
  69. package/cssm/responsive.d.ts +1 -0
  70. package/cssm/responsive.js +11 -13
  71. package/cssm/types.js +0 -2
  72. package/cssm/utils.js +6 -8
  73. package/desktop.d.ts +1 -0
  74. package/desktop.js +6 -8
  75. package/esm/{component-2c4a15b0.d.ts → component-3212dc9c.d.ts} +0 -0
  76. package/esm/{component-2c4a15b0.js → component-3212dc9c.js} +5 -5
  77. package/esm/component.desktop.js +5 -5
  78. package/esm/component.mobile.js +6 -6
  79. package/esm/component.responsive.js +8 -8
  80. package/esm/components/base-confirmation/component.js +7 -7
  81. package/esm/components/base-confirmation/index.css +2 -8
  82. package/esm/components/base-confirmation/index.d.ts +1 -1
  83. package/esm/components/base-confirmation/index.js +5 -5
  84. package/esm/components/countdown-loader/component.js +3 -3
  85. package/esm/components/countdown-loader/index.css +2 -2
  86. package/esm/components/countdown-loader/index.js +1 -1
  87. package/esm/components/header/component.js +1 -1
  88. package/esm/components/header/index.css +4 -4
  89. package/esm/components/header/index.js +1 -1
  90. package/esm/components/index.js +9 -9
  91. package/esm/components/screens/fatal-error/component.js +3 -3
  92. package/esm/components/screens/fatal-error/index.css +10 -5
  93. package/esm/components/screens/fatal-error/index.js +3 -3
  94. package/esm/components/screens/hint/component.js +18 -19
  95. package/esm/components/screens/hint/index.css +15 -14
  96. package/esm/components/screens/hint/index.js +3 -3
  97. package/esm/components/screens/index.js +8 -8
  98. package/esm/components/screens/initial/component.js +10 -5
  99. package/esm/components/screens/initial/countdown-section.js +4 -4
  100. package/esm/components/screens/initial/index.css +18 -18
  101. package/esm/components/screens/initial/index.js +5 -5
  102. package/esm/components/screens/temp-block/component.js +7 -7
  103. package/esm/components/screens/temp-block/index.css +13 -5
  104. package/esm/components/screens/temp-block/index.js +4 -4
  105. package/esm/{countdown-section-a819b4f1.d.ts → countdown-section-5a8d74ee.d.ts} +0 -0
  106. package/esm/countdown-section-5a8d74ee.js +41 -0
  107. package/esm/desktop.d.ts +1 -0
  108. package/esm/desktop.js +6 -6
  109. package/esm/index.js +12 -12
  110. package/esm/mobile.css +2 -2
  111. package/esm/mobile.d.ts +1 -0
  112. package/esm/mobile.js +6 -6
  113. package/esm/responsive.d.ts +1 -0
  114. package/esm/responsive.js +6 -6
  115. package/esm/utils.js +6 -6
  116. package/index.js +21 -23
  117. package/mobile.css +2 -2
  118. package/mobile.d.ts +1 -0
  119. package/mobile.js +6 -8
  120. package/modern/component.desktop.js +5 -5
  121. package/modern/component.mobile.js +6 -6
  122. package/modern/component.responsive.js +8 -8
  123. package/modern/components/base-confirmation/component.js +9 -9
  124. package/modern/components/base-confirmation/index.css +2 -8
  125. package/modern/components/base-confirmation/index.js +5 -5
  126. package/modern/components/countdown-loader/component.js +1 -1
  127. package/modern/components/countdown-loader/index.css +2 -2
  128. package/modern/components/countdown-loader/index.js +1 -1
  129. package/modern/components/header/component.js +1 -1
  130. package/modern/components/header/index.css +4 -4
  131. package/modern/components/header/index.js +1 -1
  132. package/modern/components/index.js +9 -9
  133. package/modern/components/screens/fatal-error/component.js +3 -3
  134. package/modern/components/screens/fatal-error/index.css +10 -5
  135. package/modern/components/screens/fatal-error/index.js +3 -3
  136. package/modern/components/screens/hint/component.js +18 -19
  137. package/modern/components/screens/hint/index.css +15 -14
  138. package/modern/components/screens/hint/index.js +3 -3
  139. package/modern/components/screens/index.js +8 -8
  140. package/modern/components/screens/initial/component.js +10 -5
  141. package/modern/components/screens/initial/countdown-section.js +4 -4
  142. package/modern/components/screens/initial/index.css +18 -18
  143. package/modern/components/screens/initial/index.js +5 -5
  144. package/modern/components/screens/temp-block/component.js +7 -7
  145. package/modern/components/screens/temp-block/index.css +13 -5
  146. package/modern/components/screens/temp-block/index.js +4 -4
  147. package/modern/{countdown-section-5519e1b6.d.ts → countdown-section-b8b393a2.d.ts} +0 -0
  148. package/modern/countdown-section-b8b393a2.js +36 -0
  149. package/modern/desktop.d.ts +1 -0
  150. package/modern/desktop.js +6 -6
  151. package/modern/index.js +12 -12
  152. package/modern/mobile.css +2 -2
  153. package/modern/mobile.d.ts +1 -0
  154. package/modern/mobile.js +6 -6
  155. package/modern/responsive.d.ts +1 -0
  156. package/modern/responsive.js +8 -8
  157. package/package.json +2 -2
  158. package/responsive.d.ts +1 -0
  159. package/responsive.js +6 -8
  160. package/types.js +0 -2
  161. package/utils.js +6 -8
  162. package/countdown-section-fa5d99c6.js +0 -56
  163. package/esm/countdown-section-a819b4f1.js +0 -48
  164. package/modern/countdown-section-5519e1b6.js +0 -46
@@ -1,24 +1,24 @@
1
1
  import React from 'react';
2
2
  import cn from 'classnames';
3
+ import { BaseConfirmation } from './components/base-confirmation/component.js';
3
4
  import '@alfalab/hooks';
4
- import './utils.js';
5
5
  import './context.js';
6
+ import './utils.js';
6
7
  import './types.js';
8
+ import './components/screens/initial/component.js';
7
9
  import '@alfalab/core-components-button/modern';
8
10
  import '@alfalab/core-components-code-input/modern';
9
11
  import '@alfalab/core-components-link/modern';
10
12
  import '@alfalab/core-components-typography/modern';
11
13
  import './components/header/component.js';
14
+ import './countdown-section-b8b393a2.js';
12
15
  import '@alfalab/core-components-loader/modern';
13
- import './countdown-section-5519e1b6.js';
14
- import './components/screens/initial/component.js';
15
16
  import './components/screens/hint/component.js';
16
17
  import './components/screens/fatal-error/component.js';
17
- import './components/countdown-loader/component.js';
18
18
  import './components/screens/temp-block/component.js';
19
- import { BaseConfirmation } from './components/base-confirmation/component.js';
19
+ import './components/countdown-loader/component.js';
20
20
 
21
- var styles = {"container":"confirmation__container_174uf"};
21
+ const styles = {"container":"confirmation__container_12az3"};
22
22
  require('./mobile.css')
23
23
 
24
24
  const ConfirmationMobile = ({ className, ...resProps }) => (React.createElement(BaseConfirmation, { mobile: true, className: cn(className, styles.container), ...resProps }));
@@ -1,24 +1,24 @@
1
1
  import React from 'react';
2
- import 'classnames';
3
2
  import { useMedia } from '@alfalab/hooks';
4
- import './utils.js';
3
+ import { ConfirmationDesktop } from './component.desktop.js';
4
+ import { ConfirmationMobile } from './component.mobile.js';
5
+ import './components/base-confirmation/component.js';
6
+ import 'classnames';
5
7
  import './context.js';
8
+ import './utils.js';
6
9
  import './types.js';
10
+ import './components/screens/initial/component.js';
7
11
  import '@alfalab/core-components-button/modern';
8
12
  import '@alfalab/core-components-code-input/modern';
9
13
  import '@alfalab/core-components-link/modern';
10
14
  import '@alfalab/core-components-typography/modern';
11
15
  import './components/header/component.js';
16
+ import './countdown-section-b8b393a2.js';
12
17
  import '@alfalab/core-components-loader/modern';
13
- import './countdown-section-5519e1b6.js';
14
- import './components/screens/initial/component.js';
15
18
  import './components/screens/hint/component.js';
16
19
  import './components/screens/fatal-error/component.js';
17
- import './components/countdown-loader/component.js';
18
20
  import './components/screens/temp-block/component.js';
19
- import './components/base-confirmation/component.js';
20
- import { ConfirmationDesktop } from './component.desktop.js';
21
- import { ConfirmationMobile } from './component.mobile.js';
21
+ import './components/countdown-loader/component.js';
22
22
 
23
23
  const ConfirmationResponsive = (props) => {
24
24
  const [view] = useMedia([
@@ -1,23 +1,23 @@
1
1
  import React, { useEffect } from 'react';
2
2
  import cn from 'classnames';
3
3
  import { usePrevious } from '@alfalab/hooks';
4
- import { ONE_MINUTE, ONE_DAY, useCountdown } from '../../utils.js';
5
4
  import { ConfirmationContext } from '../../context.js';
6
5
  import { defaultTexts } from '../../types.js';
6
+ import { useCountdown, ONE_MINUTE, ONE_DAY } from '../../utils.js';
7
+ import { Initial } from '../screens/initial/component.js';
8
+ import { Hint } from '../screens/hint/component.js';
9
+ import { FatalError } from '../screens/fatal-error/component.js';
10
+ import { TempBlock } from '../screens/temp-block/component.js';
7
11
  import '@alfalab/core-components-button/modern';
8
12
  import '@alfalab/core-components-code-input/modern';
9
13
  import '@alfalab/core-components-link/modern';
10
14
  import '@alfalab/core-components-typography/modern';
11
15
  import '../header/component.js';
16
+ import '../../countdown-section-b8b393a2.js';
12
17
  import '@alfalab/core-components-loader/modern';
13
- import '../../countdown-section-5519e1b6.js';
14
- import { Initial } from '../screens/initial/component.js';
15
- import { Hint } from '../screens/hint/component.js';
16
- import { FatalError } from '../screens/fatal-error/component.js';
17
18
  import '../countdown-loader/component.js';
18
- import { TempBlock } from '../screens/temp-block/component.js';
19
19
 
20
- var styles = {"component":"confirmation__component_1u8w9","center":"confirmation__center_1u8w9"};
20
+ const styles = {"component":"confirmation__component_1vjji"};
21
21
  require('./index.css')
22
22
 
23
23
  const confirmationScreens = {
@@ -26,7 +26,7 @@ const confirmationScreens = {
26
26
  FATAL_ERROR: FatalError,
27
27
  TEMP_BLOCK: TempBlock,
28
28
  };
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, ...restProps }) => {
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, ...restProps }) => {
30
30
  const [timeLeft, startTimer, stopTimer] = useCountdown(countdownDuration);
31
31
  const prevState = usePrevious(state);
32
32
  useEffect(() => {
@@ -84,7 +84,7 @@ const BaseConfirmation = ({ state, screen, alignContent = 'left', children, requ
84
84
  const screensMap = getScreensMap ? getScreensMap(confirmationScreens) : confirmationScreens;
85
85
  const CurrentScreen = screensMap[screen];
86
86
  return (React.createElement(ConfirmationContext.Provider, { value: contextValue },
87
- React.createElement("div", { className: cn(styles.component, styles[alignContent], className), "data-test-id": dataTestId }, CurrentScreen && React.createElement(CurrentScreen, { mobile: mobile }))));
87
+ React.createElement("div", { className: cn(styles.component, className), "data-test-id": dataTestId }, CurrentScreen && React.createElement(CurrentScreen, { mobile: mobile }))));
88
88
  };
89
89
 
90
90
  export { BaseConfirmation };
@@ -1,4 +1,4 @@
1
- /* hash: 19z35 */
1
+ /* hash: kwbzz */
2
2
  :root {
3
3
  --color-light-text-secondary: rgba(11, 31, 53, 0.7);
4
4
  }
@@ -10,15 +10,9 @@
10
10
 
11
11
  /* Hard up */
12
12
  }
13
- .confirmation__component_1u8w9 {
14
- display: flex;
15
- flex-direction: column;
13
+ .confirmation__component_1vjji {
16
14
  width: 100%;
17
15
  max-width: 388px;
18
16
  margin: 0 auto;
19
17
  color: var(--color-light-text-secondary);
20
18
  }
21
- .confirmation__center_1u8w9 {
22
- align-items: center;
23
- text-align: center;
24
- }
@@ -1,19 +1,19 @@
1
+ export { BaseConfirmation } from './component.js';
1
2
  import 'react';
2
3
  import 'classnames';
3
4
  import '@alfalab/hooks';
4
- import '../../utils.js';
5
5
  import '../../context.js';
6
+ import '../../utils.js';
6
7
  import '../../types.js';
8
+ import '../screens/initial/component.js';
7
9
  import '@alfalab/core-components-button/modern';
8
10
  import '@alfalab/core-components-code-input/modern';
9
11
  import '@alfalab/core-components-link/modern';
10
12
  import '@alfalab/core-components-typography/modern';
11
13
  import '../header/component.js';
14
+ import '../../countdown-section-b8b393a2.js';
12
15
  import '@alfalab/core-components-loader/modern';
13
- import '../../countdown-section-5519e1b6.js';
14
- import '../screens/initial/component.js';
15
16
  import '../screens/hint/component.js';
16
17
  import '../screens/fatal-error/component.js';
17
- import '../countdown-loader/component.js';
18
18
  import '../screens/temp-block/component.js';
19
- export { BaseConfirmation } from './component.js';
19
+ import '../countdown-loader/component.js';
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
 
3
- var styles = {"circle":"confirmation__circle_mqynb"};
3
+ const styles = {"circle":"confirmation__circle_o1lwg"};
4
4
  require('./index.css')
5
5
 
6
6
  const SIZE = 16;
@@ -1,4 +1,4 @@
1
- /* hash: 1ebbi */
1
+ /* hash: 1qnpv */
2
2
  :root {
3
3
  --color-light-graphic-tertiary: #b6bcc3;
4
4
  }
@@ -10,7 +10,7 @@
10
10
 
11
11
  /* Hard up */
12
12
  }
13
- .confirmation__circle_mqynb {
13
+ .confirmation__circle_o1lwg {
14
14
  fill: transparent;
15
15
  stroke: var(--color-light-graphic-tertiary);
16
16
  stroke-width: 2px;
@@ -1,2 +1,2 @@
1
- import 'react';
2
1
  export { CountdownLoader } from './component.js';
2
+ import 'react';
@@ -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
- var styles = {"header":"confirmation__header_1jbf4","typography":"confirmation__typography_1jbf4","typographyMobile":"confirmation__typographyMobile_1jbf4"};
5
+ const styles = {"header":"confirmation__header_1o5ag","typography":"confirmation__typography_1o5ag","typographyMobile":"confirmation__typographyMobile_1o5ag"};
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: 1nu3e */
1
+ /* hash: j05p1 */
2
2
  :root {
3
3
 
4
4
  /* Hard */
@@ -32,17 +32,17 @@
32
32
  /* header */
33
33
  --confirmation-header-font-feature-settings: normal
34
34
  }
35
- .confirmation__header_1jbf4 {
35
+ .confirmation__header_1o5ag.confirmation__header_1o5ag {
36
36
  margin-bottom: var(--gap-xl);
37
37
  }
38
- .confirmation__typography_1jbf4 {
38
+ .confirmation__typography_1o5ag.confirmation__typography_1o5ag {
39
39
  font-feature-settings: var(--confirmation-header-font-feature-settings);
40
40
  font-size: var(--confirmation-header-desktop-font-size);
41
41
  line-height: var(--confirmation-header-desktop-line-height);
42
42
  font-weight: var(--confirmation-header-desktop-font-weight);
43
43
  font-family: var(--confirmation-header-desktop-font-family);
44
44
  }
45
- .confirmation__typographyMobile_1jbf4 {
45
+ .confirmation__typographyMobile_1o5ag.confirmation__typographyMobile_1o5ag {
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);
@@ -1,4 +1,4 @@
1
+ export { Header } from './component.js';
1
2
  import 'react';
2
3
  import 'classnames';
3
4
  import '@alfalab/core-components-typography/modern';
4
- export { Header } from './component.js';
@@ -1,17 +1,17 @@
1
+ export { Initial } from './screens/initial/component.js';
2
+ export { Hint } from './screens/hint/component.js';
3
+ export { FatalError } from './screens/fatal-error/component.js';
4
+ export { TempBlock } from './screens/temp-block/component.js';
5
+ export { CountdownLoader } from './countdown-loader/component.js';
1
6
  import 'react';
2
7
  import 'classnames';
3
- import '@alfalab/hooks';
4
- import '../utils.js';
5
- import '../context.js';
6
8
  import '@alfalab/core-components-button/modern';
7
9
  import '@alfalab/core-components-code-input/modern';
8
10
  import '@alfalab/core-components-link/modern';
9
11
  import '@alfalab/core-components-typography/modern';
12
+ import '@alfalab/hooks';
13
+ import '../context.js';
14
+ import '../utils.js';
10
15
  import './header/component.js';
16
+ import '../countdown-section-b8b393a2.js';
11
17
  import '@alfalab/core-components-loader/modern';
12
- import '../countdown-section-5519e1b6.js';
13
- export { Initial } from './screens/initial/component.js';
14
- export { Hint } from './screens/hint/component.js';
15
- export { FatalError } from './screens/fatal-error/component.js';
16
- export { CountdownLoader } from './countdown-loader/component.js';
17
- export { TempBlock } from './screens/temp-block/component.js';
@@ -1,12 +1,12 @@
1
1
  import React, { useContext } from 'react';
2
2
  import cn from 'classnames';
3
- import '../../../utils.js';
4
- import { ConfirmationContext } from '../../../context.js';
5
3
  import { Button } from '@alfalab/core-components-button/modern';
6
4
  import { Typography } from '@alfalab/core-components-typography/modern';
5
+ import { ConfirmationContext } from '../../../context.js';
7
6
  import { Header } from '../../header/component.js';
7
+ import '../../../utils.js';
8
8
 
9
- var styles = {"typographyTheme":"confirmation__typographyTheme_13ckc","left":"confirmation__left_13ckc","center":"confirmation__center_13ckc","button":"confirmation__button_13ckc"};
9
+ const styles = {"component":"confirmation__component_186fo","typographyTheme":"confirmation__typographyTheme_186fo","left":"confirmation__left_186fo","center":"confirmation__center_186fo","button":"confirmation__button_186fo"};
10
10
  require('./index.css')
11
11
 
12
12
  const FatalError = ({ mobile }) => {
@@ -1,4 +1,4 @@
1
- /* hash: vdzh3 */
1
+ /* hash: ifzmd */
2
2
  :root {
3
3
  --color-light-text-primary: #0b1f35;
4
4
  }
@@ -31,19 +31,24 @@
31
31
 
32
32
  /* header */
33
33
  }
34
- .confirmation__typographyTheme_13ckc {
34
+ .confirmation__component_186fo {
35
+ display: flex;
36
+ flex-direction: column;
37
+ }
38
+ .confirmation__typographyTheme_186fo.confirmation__typographyTheme_186fo {
35
39
  font-size: var(--confirmation-text-font-size);
36
40
  line-height: var(--confirmation-text-line-height);
37
41
  font-weight: var(--confirmation-text-font-weight);
38
42
  font-family: var(--confirmation-text-font-family);
39
43
  color: var(--confirmation-text-color);
40
44
  }
41
- .confirmation__left_13ckc {
45
+ .confirmation__left_186fo {
42
46
  align-items: flex-start;
43
47
  }
44
- .confirmation__center_13ckc {
48
+ .confirmation__center_186fo {
45
49
  align-items: center;
50
+ text-align: center;
46
51
  }
47
- .confirmation__button_13ckc {
52
+ .confirmation__button_186fo {
48
53
  margin-top: var(--gap-2xl);
49
54
  }
@@ -1,8 +1,8 @@
1
+ export { FatalError } from './component.js';
1
2
  import 'react';
2
3
  import 'classnames';
3
- import '../../../utils.js';
4
- import '../../../context.js';
5
4
  import '@alfalab/core-components-button/modern';
6
5
  import '@alfalab/core-components-typography/modern';
6
+ import '../../../context.js';
7
+ import '../../../utils.js';
7
8
  import '../../header/component.js';
8
- export { FatalError } from './component.js';
@@ -1,13 +1,13 @@
1
1
  import React, { useContext } from 'react';
2
2
  import cn from 'classnames';
3
- import '../../../utils.js';
4
- import { ConfirmationContext } from '../../../context.js';
5
3
  import { Button } from '@alfalab/core-components-button/modern';
6
4
  import { Link } from '@alfalab/core-components-link/modern';
7
5
  import { Typography } from '@alfalab/core-components-typography/modern';
6
+ import { ConfirmationContext } from '../../../context.js';
8
7
  import { Header } from '../../header/component.js';
8
+ import '../../../utils.js';
9
9
 
10
- var styles = {"center":"confirmation__center_1jbwm","hintWrap":"confirmation__hintWrap_1jbwm","text":"confirmation__text_1jbwm","typographyTheme":"confirmation__typographyTheme_1jbwm","phonesWrap":"confirmation__phonesWrap_1jbwm","phoneWrap":"confirmation__phoneWrap_1jbwm","phoneLink":"confirmation__phoneLink_1jbwm","hintButton":"confirmation__hintButton_1jbwm","phoneContentMobile":"confirmation__phoneContentMobile_1jbwm"};
10
+ const styles = {"component":"confirmation__component_1kmjv","center":"confirmation__center_1kmjv","text":"confirmation__text_1kmjv","typographyTheme":"confirmation__typographyTheme_1kmjv","phonesWrap":"confirmation__phonesWrap_1kmjv","phoneWrap":"confirmation__phoneWrap_1kmjv","phoneLink":"confirmation__phoneLink_1kmjv","hintButton":"confirmation__hintButton_1kmjv","phoneContentMobile":"confirmation__phoneContentMobile_1kmjv"};
11
11
  require('./index.css')
12
12
 
13
13
  const Hint = ({ mobile }) => {
@@ -17,22 +17,21 @@ const Hint = ({ mobile }) => {
17
17
  onChangeState('INITIAL');
18
18
  };
19
19
  return (React.createElement("div", { className: cn(styles.component, styles[alignContent]) },
20
- React.createElement("div", { className: styles.hintWrap },
21
- React.createElement(Header, { mobile: mobile }, "\u041D\u0435\u00A0\u043F\u0440\u0438\u0445\u043E\u0434\u0438\u0442 \u0441\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u0435?"),
22
- React.createElement(Typography.Text, { view: 'primary-medium', color: 'primary', className: cn(styles.text, { [styles.typographyTheme]: !mobile }) }, "\u0415\u0441\u043B\u0438 \u0443\u00A0\u0432\u0430\u0441 \u0438\u0437\u043C\u0435\u043D\u0438\u043B\u0441\u044F \u043D\u043E\u043C\u0435\u0440 \u0442\u0435\u043B\u0435\u0444\u043E\u043D\u0430, \u043F\u043E\u0437\u0432\u043E\u043D\u0438\u0442\u0435 \u043D\u0430\u043C \u0438\u043B\u0438 \u043E\u0431\u0440\u0430\u0442\u0438\u0442\u0435\u0441\u044C \u0432\u00A0\u043B\u044E\u0431\u043E\u0435 \u043E\u0442\u0434\u0435\u043B\u0435\u043D\u0438\u0435 \u0431\u0430\u043D\u043A\u0430."),
23
- React.createElement("div", { className: styles.phonesWrap },
24
- React.createElement("div", { className: cn(styles.phoneWrap, { [styles.phoneContentMobile]: mobile }) },
25
- React.createElement(Link, { href: 'tel:+78002000000', underline: false, className: styles.phoneLink }, "8 800 200-00-00"),
26
- React.createElement(Typography.Text, { view: 'primary-medium', color: 'primary', className: cn(styles.text, { [styles.typographyTheme]: !mobile }) }, mobile
27
- ? 'Для\u00A0 звонков по\u00A0России'
28
- : ' \u2014\u00A0для звонков по\u00A0России')),
29
- React.createElement("div", { className: cn(styles.phoneWrap, { [styles.phoneContentMobile]: mobile }) },
30
- React.createElement(Link, { href: 'tel:+74957888878', underline: false, className: styles.phoneLink }, "+7 495 78-888-78"),
31
- React.createElement(Typography.Text, { view: 'primary-medium', color: 'primary', className: cn(styles.text, { [styles.typographyTheme]: !mobile }) }, mobile
32
- ? 'В\u00A0Москве и\u00A0за\u00A0границей'
33
- : ' \u2014\u00A0в\u00A0Москве и\u00A0за\u00A0границей'))),
34
- 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."),
35
- React.createElement(Button, { size: mobile ? 'xs' : 's', view: 'secondary', onClick: handleReturnButtonClick, className: styles.hintButton }, texts.hintButton))));
20
+ React.createElement(Header, { mobile: mobile }, "\u041D\u0435\u00A0\u043F\u0440\u0438\u0445\u043E\u0434\u0438\u0442 \u0441\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u0435?"),
21
+ React.createElement(Typography.Text, { view: 'primary-medium', color: 'primary', className: cn(styles.text, { [styles.typographyTheme]: !mobile }) }, "\u0415\u0441\u043B\u0438 \u0443\u00A0\u0432\u0430\u0441 \u0438\u0437\u043C\u0435\u043D\u0438\u043B\u0441\u044F \u043D\u043E\u043C\u0435\u0440 \u0442\u0435\u043B\u0435\u0444\u043E\u043D\u0430, \u043F\u043E\u0437\u0432\u043E\u043D\u0438\u0442\u0435 \u043D\u0430\u043C \u0438\u043B\u0438 \u043E\u0431\u0440\u0430\u0442\u0438\u0442\u0435\u0441\u044C \u0432\u00A0\u043B\u044E\u0431\u043E\u0435 \u043E\u0442\u0434\u0435\u043B\u0435\u043D\u0438\u0435 \u0431\u0430\u043D\u043A\u0430."),
22
+ React.createElement("div", { className: styles.phonesWrap },
23
+ React.createElement("div", { className: cn(styles.phoneWrap, { [styles.phoneContentMobile]: mobile }) },
24
+ React.createElement(Link, { href: 'tel:+78002000000', underline: false, className: styles.phoneLink }, "8 800 200-00-00"),
25
+ React.createElement(Typography.Text, { view: 'primary-medium', color: 'primary', className: cn(styles.text, { [styles.typographyTheme]: !mobile }) }, mobile
26
+ ? 'Для\u00A0 звонков по\u00A0России'
27
+ : ' \u2014\u00A0для звонков по\u00A0России')),
28
+ React.createElement("div", { className: cn(styles.phoneWrap, { [styles.phoneContentMobile]: mobile }) },
29
+ React.createElement(Link, { href: 'tel:+74957888878', underline: false, className: styles.phoneLink }, "+7 495 78-888-78"),
30
+ React.createElement(Typography.Text, { view: 'primary-medium', color: 'primary', className: cn(styles.text, { [styles.typographyTheme]: !mobile }) }, mobile
31
+ ? 'В\u00A0Москве и\u00A0за\u00A0границей'
32
+ : ' \u2014\u00A0в\u00A0Москве и\u00A0за\u00A0границей'))),
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)));
36
35
  };
37
36
 
38
37
  export { Hint };
@@ -1,4 +1,4 @@
1
- /* hash: mkucv */
1
+ /* hash: pe120 */
2
2
  :root {
3
3
  --color-light-text-primary: #0b1f35;
4
4
  }
@@ -33,47 +33,48 @@
33
33
 
34
34
  /* header */
35
35
  }
36
- .confirmation__center_1jbwm .confirmation__hintWrap_1jbwm {
37
- align-items: center;
38
- }
39
- .confirmation__hintWrap_1jbwm {
36
+ .confirmation__component_1kmjv {
40
37
  display: flex;
41
38
  flex-direction: column;
42
39
  align-items: flex-start
43
40
  }
44
- .confirmation__hintWrap_1jbwm span:last-of-type {
41
+ .confirmation__component_1kmjv span:last-of-type {
45
42
  margin-bottom: 0;
46
43
  }
47
- .confirmation__text_1jbwm {
44
+ .confirmation__center_1kmjv {
45
+ align-items: center;
46
+ text-align: center;
47
+ }
48
+ .confirmation__text_1kmjv.confirmation__text_1kmjv {
48
49
  margin-bottom: var(--gap-xl);
49
50
  }
50
- .confirmation__typographyTheme_1jbwm {
51
+ .confirmation__typographyTheme_1kmjv.confirmation__typographyTheme_1kmjv {
51
52
  font-size: var(--confirmation-text-font-size);
52
53
  line-height: var(--confirmation-text-line-height);
53
54
  font-weight: var(--confirmation-text-font-weight);
54
55
  font-family: var(--confirmation-text-font-family);
55
56
  color: var(--confirmation-text-color);
56
57
  }
57
- .confirmation__phonesWrap_1jbwm {
58
+ .confirmation__phonesWrap_1kmjv {
58
59
  display: flex;
59
60
  flex-direction: column;
60
61
  margin-bottom: var(--gap-xl);
61
62
  }
62
- .confirmation__phoneWrap_1jbwm {
63
+ .confirmation__phoneWrap_1kmjv {
63
64
  margin-bottom: var(--gap-xs)
64
65
  }
65
- .confirmation__phoneWrap_1jbwm:last-child {
66
+ .confirmation__phoneWrap_1kmjv:last-child {
66
67
  margin-bottom: 0;
67
68
  }
68
- .confirmation__phoneLink_1jbwm {
69
+ .confirmation__phoneLink_1kmjv.confirmation__phoneLink_1kmjv {
69
70
  font-size: 16px;
70
71
  line-height: 24px;
71
72
  font-weight: 500;
72
73
  }
73
- .confirmation__hintButton_1jbwm {
74
+ .confirmation__hintButton_1kmjv {
74
75
  margin-top: var(--gap-2xl);
75
76
  }
76
- .confirmation__phoneContentMobile_1jbwm {
77
+ .confirmation__phoneContentMobile_1kmjv {
77
78
  display: flex;
78
79
  flex-direction: column;
79
80
  align-items: center;
@@ -1,9 +1,9 @@
1
+ export { Hint } from './component.js';
1
2
  import 'react';
2
3
  import 'classnames';
3
- import '../../../utils.js';
4
- import '../../../context.js';
5
4
  import '@alfalab/core-components-button/modern';
6
5
  import '@alfalab/core-components-link/modern';
7
6
  import '@alfalab/core-components-typography/modern';
7
+ import '../../../context.js';
8
+ import '../../../utils.js';
8
9
  import '../../header/component.js';
9
- export { Hint } from './component.js';
@@ -1,17 +1,17 @@
1
+ export { Initial } from './initial/component.js';
2
+ export { Hint } from './hint/component.js';
3
+ export { FatalError } from './fatal-error/component.js';
4
+ export { TempBlock } from './temp-block/component.js';
1
5
  import 'react';
2
6
  import 'classnames';
3
- import '@alfalab/hooks';
4
- import '../../utils.js';
5
- import '../../context.js';
6
7
  import '@alfalab/core-components-button/modern';
7
8
  import '@alfalab/core-components-code-input/modern';
8
9
  import '@alfalab/core-components-link/modern';
9
10
  import '@alfalab/core-components-typography/modern';
11
+ import '@alfalab/hooks';
12
+ import '../../context.js';
13
+ import '../../utils.js';
10
14
  import '../header/component.js';
15
+ import '../../countdown-section-b8b393a2.js';
11
16
  import '@alfalab/core-components-loader/modern';
12
- import '../../countdown-section-5519e1b6.js';
13
- export { Initial } from './initial/component.js';
14
- export { Hint } from './hint/component.js';
15
- export { FatalError } from './fatal-error/component.js';
16
17
  import '../countdown-loader/component.js';
17
- export { TempBlock } from './temp-block/component.js';
@@ -1,15 +1,15 @@
1
1
  import React, { useContext, useRef, useState, useCallback, useEffect, useLayoutEffect } from 'react';
2
2
  import cn from 'classnames';
3
- import { usePrevious } from '@alfalab/hooks';
4
- import '../../../utils.js';
5
- import { ConfirmationContext } from '../../../context.js';
6
3
  import { Button } from '@alfalab/core-components-button/modern';
7
4
  import { CodeInput } from '@alfalab/core-components-code-input/modern';
8
5
  import { Link } from '@alfalab/core-components-link/modern';
9
6
  import { Typography } from '@alfalab/core-components-typography/modern';
7
+ import { usePrevious } from '@alfalab/hooks';
8
+ import { ConfirmationContext } from '../../../context.js';
10
9
  import { Header } from '../../header/component.js';
10
+ import { s as styles, C as CountdownSection } from '../../../countdown-section-b8b393a2.js';
11
+ import '../../../utils.js';
11
12
  import '@alfalab/core-components-loader/modern';
12
- import { s as styles, C as CountdownSection } from '../../../countdown-section-5519e1b6.js';
13
13
 
14
14
  const CODE_SEND_HINT_VISIBLE_DURATION = 2000;
15
15
  const Initial = ({ mobile }) => {
@@ -35,6 +35,11 @@ const Initial = ({ mobile }) => {
35
35
  }
36
36
  onSmsRetryClick();
37
37
  };
38
+ const handleErrorAnimationEnd = () => {
39
+ if (clearCodeOnError && state !== 'INITIAL') {
40
+ onChangeState('INITIAL');
41
+ }
42
+ };
38
43
  const clearTimer = useCallback(() => {
39
44
  window.clearTimeout(timerId.current);
40
45
  }, []);
@@ -79,7 +84,7 @@ const Initial = ({ mobile }) => {
79
84
  React.createElement(Typography.Text, { view: 'primary-medium', color: 'primary', className: cn(styles.phone, { [styles.typographyTheme]: !mobile }) },
80
85
  "\u041A\u043E\u0434 \u043E\u0442\u043F\u0440\u0430\u0432\u043B\u0435\u043D \u043D\u0430 ",
81
86
  phone),
82
- React.createElement(CodeInput, { disabled: processing, error: getCodeInputError(), ref: inputRef, fields: requiredCharAmount, className: cn(styles.containerInput, styles.codeInput), onComplete: handleInputComplete, onChange: handleInputChange, clearCodeOnError: clearCodeOnError }),
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 }),
83
88
  React.createElement(CountdownSection, { processing: processing, timePassed: timePassed, codeSendHintVisible: codeSendHintVisible, handleSmsRetryClick: handleSmsRetryClick, mobile: mobile }),
84
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))));
85
90
  };
@@ -1,8 +1,8 @@
1
1
  import 'react';
2
2
  import 'classnames';
3
- import '../../../utils.js';
4
- import '../../../context.js';
5
3
  import '@alfalab/core-components-button/modern';
6
- import '@alfalab/core-components-typography/modern';
7
4
  import '@alfalab/core-components-loader/modern';
8
- export { C as CountdownSection } from '../../../countdown-section-5519e1b6.js';
5
+ import '@alfalab/core-components-typography/modern';
6
+ import '../../../context.js';
7
+ import '../../../utils.js';
8
+ export { C as CountdownSection } from '../../../countdown-section-b8b393a2.js';