@alfalab/core-components-confirmation 12.2.3 → 12.3.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 (113) hide show
  1. package/{component-f8aaad22.d.ts → component-176a536e.d.ts} +0 -0
  2. package/{component-f8aaad22.js → component-176a536e.js} +3 -2
  3. package/component.desktop.js +2 -2
  4. package/component.mobile.js +3 -3
  5. package/component.responsive.js +2 -2
  6. package/components/base-confirmation/component.js +2 -2
  7. package/components/base-confirmation/index.css +3 -3
  8. package/components/base-confirmation/index.d.ts +1 -1
  9. package/components/base-confirmation/index.js +2 -2
  10. package/components/countdown-loader/component.js +1 -1
  11. package/components/countdown-loader/index.css +2 -2
  12. package/components/header/component.js +1 -1
  13. package/components/header/index.css +4 -4
  14. package/components/index.js +1 -1
  15. package/components/screens/fatal-error/component.js +1 -1
  16. package/components/screens/fatal-error/index.css +5 -5
  17. package/components/screens/hint/component.js +7 -3
  18. package/components/screens/hint/index.css +12 -12
  19. package/components/screens/index.js +1 -1
  20. package/components/screens/initial/component.js +3 -3
  21. package/components/screens/initial/countdown-section.js +1 -1
  22. package/components/screens/initial/index.css +18 -18
  23. package/components/screens/initial/index.js +1 -1
  24. package/components/screens/temp-block/component.js +1 -1
  25. package/components/screens/temp-block/index.css +5 -5
  26. package/{countdown-section-68318269.d.ts → countdown-section-f9b594c9.d.ts} +0 -0
  27. package/{countdown-section-68318269.js → countdown-section-f9b594c9.js} +1 -1
  28. package/cssm/{component-4b21185d.d.ts → component-cbe72bf1.d.ts} +0 -0
  29. package/cssm/{component-4b21185d.js → component-cbe72bf1.js} +2 -1
  30. package/cssm/component.desktop.js +1 -1
  31. package/cssm/component.mobile.js +1 -1
  32. package/cssm/component.responsive.js +1 -1
  33. package/cssm/components/base-confirmation/component.js +1 -1
  34. package/cssm/components/base-confirmation/index.d.ts +1 -1
  35. package/cssm/components/base-confirmation/index.js +1 -1
  36. package/cssm/components/screens/hint/component.js +6 -2
  37. package/cssm/components/screens/initial/component.js +2 -2
  38. package/cssm/desktop.js +1 -1
  39. package/cssm/index.js +1 -1
  40. package/cssm/mobile.js +1 -1
  41. package/cssm/responsive.js +1 -1
  42. package/cssm/types.d.ts +5 -1
  43. package/desktop.js +2 -2
  44. package/esm/{component-299f3d2b.d.ts → component-c701193b.d.ts} +0 -0
  45. package/esm/{component-299f3d2b.js → component-c701193b.js} +3 -2
  46. package/esm/component.desktop.js +2 -2
  47. package/esm/component.mobile.js +3 -3
  48. package/esm/component.responsive.js +2 -2
  49. package/esm/components/base-confirmation/component.js +2 -2
  50. package/esm/components/base-confirmation/index.css +3 -3
  51. package/esm/components/base-confirmation/index.d.ts +1 -1
  52. package/esm/components/base-confirmation/index.js +2 -2
  53. package/esm/components/countdown-loader/component.js +1 -1
  54. package/esm/components/countdown-loader/index.css +2 -2
  55. package/esm/components/header/component.js +1 -1
  56. package/esm/components/header/index.css +4 -4
  57. package/esm/components/index.js +1 -1
  58. package/esm/components/screens/fatal-error/component.js +1 -1
  59. package/esm/components/screens/fatal-error/index.css +5 -5
  60. package/esm/components/screens/hint/component.js +7 -3
  61. package/esm/components/screens/hint/index.css +12 -12
  62. package/esm/components/screens/index.js +1 -1
  63. package/esm/components/screens/initial/component.js +3 -3
  64. package/esm/components/screens/initial/countdown-section.js +1 -1
  65. package/esm/components/screens/initial/index.css +18 -18
  66. package/esm/components/screens/initial/index.js +1 -1
  67. package/esm/components/screens/temp-block/component.js +1 -1
  68. package/esm/components/screens/temp-block/index.css +5 -5
  69. package/esm/{countdown-section-63fb6745.d.ts → countdown-section-08eeb8e4.d.ts} +0 -0
  70. package/esm/{countdown-section-63fb6745.js → countdown-section-08eeb8e4.js} +1 -1
  71. package/esm/desktop.js +2 -2
  72. package/esm/index.js +2 -2
  73. package/esm/mobile.css +2 -2
  74. package/esm/mobile.js +2 -2
  75. package/esm/responsive.js +2 -2
  76. package/esm/types.d.ts +5 -1
  77. package/index.js +2 -2
  78. package/mobile.css +2 -2
  79. package/mobile.js +2 -2
  80. package/modern/component.desktop.js +2 -2
  81. package/modern/component.mobile.js +2 -2
  82. package/modern/component.responsive.js +2 -2
  83. package/modern/components/base-confirmation/component.js +4 -3
  84. package/modern/components/base-confirmation/index.css +3 -3
  85. package/modern/components/base-confirmation/index.js +1 -1
  86. package/modern/components/countdown-loader/component.js +1 -1
  87. package/modern/components/countdown-loader/index.css +2 -2
  88. package/modern/components/header/component.js +1 -1
  89. package/modern/components/header/index.css +4 -4
  90. package/modern/components/index.js +1 -1
  91. package/modern/components/screens/fatal-error/component.js +1 -1
  92. package/modern/components/screens/fatal-error/index.css +5 -5
  93. package/modern/components/screens/hint/component.js +7 -3
  94. package/modern/components/screens/hint/index.css +12 -12
  95. package/modern/components/screens/index.js +1 -1
  96. package/modern/components/screens/initial/component.js +4 -4
  97. package/modern/components/screens/initial/countdown-section.js +1 -1
  98. package/modern/components/screens/initial/index.css +18 -18
  99. package/modern/components/screens/initial/index.js +1 -1
  100. package/modern/components/screens/temp-block/component.js +1 -1
  101. package/modern/components/screens/temp-block/index.css +5 -5
  102. package/modern/{countdown-section-4c8d60ef.d.ts → countdown-section-64567d05.d.ts} +0 -0
  103. package/modern/{countdown-section-4c8d60ef.js → countdown-section-64567d05.js} +1 -1
  104. package/modern/desktop.js +1 -1
  105. package/modern/index.js +1 -1
  106. package/modern/mobile.css +2 -2
  107. package/modern/mobile.js +1 -1
  108. package/modern/responsive.js +1 -1
  109. package/modern/types.d.ts +5 -1
  110. package/package.json +4 -4
  111. package/responsive.js +2 -2
  112. package/send-stats.js +1 -1
  113. package/types.d.ts +5 -1
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var components_baseConfirmation_component = require('./component-4b21185d.js');
5
+ var components_baseConfirmation_component = require('./component-cbe72bf1.js');
6
6
  var React = require('react');
7
7
  require('classnames');
8
8
  var hooks = require('@alfalab/hooks');
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var components_baseConfirmation_component = require('../../component-4b21185d.js');
5
+ var components_baseConfirmation_component = require('../../component-cbe72bf1.js');
6
6
  require('react');
7
7
  require('classnames');
8
8
  require('@alfalab/hooks');
@@ -1 +1 @@
1
- export * from "../../component-4b21185d";
1
+ export * from "../../component-cbe72bf1";
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var components_baseConfirmation_component = require('../../component-4b21185d.js');
5
+ var components_baseConfirmation_component = require('../../component-cbe72bf1.js');
6
6
  require('react');
7
7
  require('classnames');
8
8
  require('@alfalab/hooks');
@@ -34,10 +34,14 @@ var Hint = function (_a) {
34
34
  React__default['default'].createElement("div", { className: styles__default['default'].phonesWrap },
35
35
  React__default['default'].createElement("div", { className: cn__default['default'](styles__default['default'].phoneWrap, (_c = {}, _c[styles__default['default'].phoneContentMobile] = mobile, _c)) },
36
36
  React__default['default'].createElement(coreComponentsLink.Link, { href: 'tel:+78002000000', underline: false, className: styles__default['default'].phoneLink }, "8 800 200-00-00"),
37
- React__default['default'].createElement(coreComponentsTypography.Typography.Text, { view: 'primary-medium', color: 'primary', className: cn__default['default'](styles__default['default'].text, (_d = {}, _d[styles__default['default'].typographyTheme] = !mobile, _d)) }, mobile ? (React__default['default'].createElement(React__default['default'].Fragment, null, "\u0414\u043B\u044F\u00A0 \u0437\u0432\u043E\u043D\u043A\u043E\u0432 \u043F\u043E\u00A0\u0420\u043E\u0441\u0441\u0438\u0438")) : (React__default['default'].createElement(React__default['default'].Fragment, null, " \u2014\u00A0\u0434\u043B\u044F \u0437\u0432\u043E\u043D\u043A\u043E\u0432 \u043F\u043E\u00A0\u0420\u043E\u0441\u0441\u0438\u0438")))),
37
+ React__default['default'].createElement(coreComponentsTypography.Typography.Text, { view: 'primary-medium', color: 'primary', className: cn__default['default'](styles__default['default'].text, (_d = {}, _d[styles__default['default'].typographyTheme] = !mobile, _d)) }, mobile
38
+ ? 'Для\u00A0 звонков по\u00A0России'
39
+ : ' \u2014\u00A0для звонков по\u00A0России')),
38
40
  React__default['default'].createElement("div", { className: cn__default['default'](styles__default['default'].phoneWrap, (_e = {}, _e[styles__default['default'].phoneContentMobile] = mobile, _e)) },
39
41
  React__default['default'].createElement(coreComponentsLink.Link, { href: 'tel:+74957888878', underline: false, className: styles__default['default'].phoneLink }, "+7 495 78-888-78"),
40
- React__default['default'].createElement(coreComponentsTypography.Typography.Text, { view: 'primary-medium', color: 'primary', className: cn__default['default'](styles__default['default'].text, (_f = {}, _f[styles__default['default'].typographyTheme] = !mobile, _f)) }, mobile ? (React__default['default'].createElement(React__default['default'].Fragment, null, "\u0412\u00A0\u041C\u043E\u0441\u043A\u0432\u0435 \u0438\u00A0\u0437\u0430\u00A0\u0433\u0440\u0430\u043D\u0438\u0446\u0435\u0439")) : (React__default['default'].createElement(React__default['default'].Fragment, null, " \u2014\u00A0\u0432\u00A0\u041C\u043E\u0441\u043A\u0432\u0435 \u0438\u00A0\u0437\u0430\u00A0\u0433\u0440\u0430\u043D\u0438\u0446\u0435\u0439"))))),
42
+ React__default['default'].createElement(coreComponentsTypography.Typography.Text, { view: 'primary-medium', color: 'primary', className: cn__default['default'](styles__default['default'].text, (_f = {}, _f[styles__default['default'].typographyTheme] = !mobile, _f)) }, mobile
43
+ ? 'В\u00A0Москве и\u00A0за\u00A0границей'
44
+ : ' \u2014\u00A0в\u00A0Москве и\u00A0за\u00A0границей'))),
41
45
  React__default['default'].createElement(coreComponentsTypography.Typography.Text, { view: 'primary-medium', color: 'primary', className: cn__default['default'](styles__default['default'].text, (_g = {}, _g[styles__default['default'].typographyTheme] = !mobile, _g)) }, "\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."),
42
46
  React__default['default'].createElement(coreComponentsButton.Button, { size: mobile ? 'xs' : 's', view: 'secondary', onClick: handleReturnButtonClick, className: styles__default['default'].hintButton }, texts.hintButton))));
43
47
  };
@@ -27,7 +27,7 @@ var CODE_SEND_HINT_VISIBLE_DURATION = 2000;
27
27
  var Initial = function (_a) {
28
28
  var _b;
29
29
  var mobile = _a.mobile;
30
- var _c = React.useContext(context.ConfirmationContext), state = _c.state, alignContent = _c.alignContent, texts = _c.texts, requiredCharAmount = _c.requiredCharAmount, timeLeft = _c.timeLeft, phone = _c.phone, onChangeState = _c.onChangeState, onInputFinished = _c.onInputFinished, onChangeScreen = _c.onChangeScreen, onSmsRetryClick = _c.onSmsRetryClick;
30
+ var _c = React.useContext(context.ConfirmationContext), state = _c.state, alignContent = _c.alignContent, texts = _c.texts, requiredCharAmount = _c.requiredCharAmount, timeLeft = _c.timeLeft, phone = _c.phone, clearCodeOnError = _c.clearCodeOnError, onChangeState = _c.onChangeState, onInputFinished = _c.onInputFinished, onChangeScreen = _c.onChangeScreen, onSmsRetryClick = _c.onSmsRetryClick;
31
31
  var prevState = hooks.usePrevious(state);
32
32
  var inputRef = React.useRef(null);
33
33
  var _d = React.useState(false), codeSendHintVisible = _d[0], setCodeSendHintVisible = _d[1];
@@ -93,7 +93,7 @@ var Initial = function (_a) {
93
93
  React__default['default'].createElement(coreComponentsTypography.Typography.Text, { view: 'primary-medium', color: 'primary', className: cn__default['default'](styles__default['default'].phone, (_b = {}, _b[styles__default['default'].typographyTheme] = !mobile, _b)) },
94
94
  "\u041A\u043E\u0434 \u043E\u0442\u043F\u0440\u0430\u0432\u043B\u0435\u043D \u043D\u0430 ",
95
95
  phone),
96
- React__default['default'].createElement(coreComponentsCodeInput.CodeInput, { disabled: processing, error: getCodeInputError(), ref: inputRef, fields: requiredCharAmount, className: cn__default['default'](styles__default['default'].containerInput, styles__default['default'].codeInput), onComplete: handleInputComplete, onChange: handleInputChange }),
96
+ React__default['default'].createElement(coreComponentsCodeInput.CodeInput, { disabled: processing, error: getCodeInputError(), ref: inputRef, fields: requiredCharAmount, className: cn__default['default'](styles__default['default'].containerInput, styles__default['default'].codeInput), onComplete: handleInputComplete, onChange: handleInputChange, clearCodeOnError: clearCodeOnError }),
97
97
  React__default['default'].createElement(components_screens_initial_countdownSection.CountdownSection, { processing: processing, timePassed: timePassed, codeSendHintVisible: codeSendHintVisible, handleSmsRetryClick: handleSmsRetryClick, mobile: mobile }),
98
98
  mobile ? (React__default['default'].createElement(coreComponentsButton.Button, { onClick: handleSmsHintLinkClick, view: 'link', size: 'xs' }, texts.linkToHint)) : (React__default['default'].createElement(coreComponentsLink.Link, { onClick: handleSmsHintLinkClick, className: styles__default['default'].smsComeLink, view: mobile ? 'primary' : 'secondary', pseudo: true }, texts.linkToHint))));
99
99
  };
package/cssm/desktop.js CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- require('./component-4b21185d.js');
5
+ require('./component-cbe72bf1.js');
6
6
  require('react');
7
7
  require('classnames');
8
8
  require('@alfalab/hooks');
package/cssm/index.js CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- require('./component-4b21185d.js');
5
+ require('./component-cbe72bf1.js');
6
6
  require('react');
7
7
  require('classnames');
8
8
  require('@alfalab/hooks');
package/cssm/mobile.js CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- require('./component-4b21185d.js');
5
+ require('./component-cbe72bf1.js');
6
6
  require('react');
7
7
  require('classnames');
8
8
  require('@alfalab/hooks');
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- require('./component-4b21185d.js');
5
+ require('./component-cbe72bf1.js');
6
6
  require('react');
7
7
  require('classnames');
8
8
  require('@alfalab/hooks');
package/cssm/types.d.ts CHANGED
@@ -48,6 +48,10 @@ type ConfirmationProps = {
48
48
  * Сss класс для стилизации общей обёртки
49
49
  */
50
50
  className?: string;
51
+ /**
52
+ * Флаг - нужно ли очищать код при возникновении ошибки
53
+ */
54
+ clearCodeOnError?: boolean;
51
55
  /**
52
56
  * Функция обновления состояния компонента
53
57
  */
@@ -81,7 +85,7 @@ type ConfirmationProps = {
81
85
  */
82
86
  children?: ReactNode;
83
87
  };
84
- type TConfirmationContext = Required<Pick<ConfirmationProps, 'alignContent' | 'texts' | 'state' | 'screen' | 'requiredCharAmount' | 'onInputFinished' | 'countdownDuration' | 'onChangeState' | 'onSmsRetryClick' | 'onChangeScreen' | 'onFatalErrorOkButtonClick' | 'tempBlockDuration'>> & Pick<ConfirmationProps, 'phone' | 'blockSmsRetry' | 'onTempBlockFinished'> & {
88
+ type TConfirmationContext = Required<Pick<ConfirmationProps, 'alignContent' | 'texts' | 'state' | 'screen' | 'requiredCharAmount' | 'onInputFinished' | 'countdownDuration' | 'onChangeState' | 'onSmsRetryClick' | 'onChangeScreen' | 'onFatalErrorOkButtonClick' | 'tempBlockDuration'>> & Pick<ConfirmationProps, 'phone' | 'blockSmsRetry' | 'onTempBlockFinished' | 'clearCodeOnError'> & {
85
89
  timeLeft: number;
86
90
  };
87
91
  type ConfirmationTexts = {
package/desktop.js CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- require('./component-f8aaad22.js');
5
+ require('./component-176a536e.js');
6
6
  require('react');
7
7
  require('classnames');
8
8
  require('@alfalab/hooks');
@@ -15,7 +15,7 @@ require('@alfalab/core-components-link');
15
15
  require('@alfalab/core-components-typography');
16
16
  require('./components/header/component.js');
17
17
  require('@alfalab/core-components-loader');
18
- require('./countdown-section-68318269.js');
18
+ require('./countdown-section-f9b594c9.js');
19
19
  require('./components/screens/initial/component.js');
20
20
  require('./components/screens/hint/component.js');
21
21
  require('./components/screens/fatal-error/component.js');
@@ -48,7 +48,7 @@ function __rest(s, e) {
48
48
  return t;
49
49
  }
50
50
 
51
- var styles = {"component":"confirmation__component_itozc","center":"confirmation__center_itozc"};
51
+ var styles = {"component":"confirmation__component_nxnyx","center":"confirmation__center_nxnyx"};
52
52
  require('./components/base-confirmation/index.css')
53
53
 
54
54
  var confirmationScreens = {
@@ -58,7 +58,7 @@ var confirmationScreens = {
58
58
  TEMP_BLOCK: TempBlock,
59
59
  };
60
60
  var BaseConfirmation = function (_a) {
61
- var state = _a.state, screen = _a.screen, _b = _a.alignContent, alignContent = _b === void 0 ? 'left' : _b, children = _a.children, _c = _a.requiredCharAmount, requiredCharAmount = _c === void 0 ? 5 : _c, _d = _a.countdownDuration, countdownDuration = _d === void 0 ? ONE_MINUTE : _d, _e = _a.tempBlockDuration, tempBlockDuration = _e === void 0 ? ONE_DAY : _e, phone = _a.phone, blockSmsRetry = _a.blockSmsRetry, dataTestId = _a.dataTestId, className = _a.className, getScreensMap = _a.getScreensMap, onInputFinished = _a.onInputFinished, onChangeState = _a.onChangeState, onSmsRetryClick = _a.onSmsRetryClick, onChangeScreen = _a.onChangeScreen, onFatalErrorOkButtonClick = _a.onFatalErrorOkButtonClick, onTempBlockFinished = _a.onTempBlockFinished, mobile = _a.mobile, restProps = __rest(_a, ["state", "screen", "alignContent", "children", "requiredCharAmount", "countdownDuration", "tempBlockDuration", "phone", "blockSmsRetry", "dataTestId", "className", "getScreensMap", "onInputFinished", "onChangeState", "onSmsRetryClick", "onChangeScreen", "onFatalErrorOkButtonClick", "onTempBlockFinished", "mobile"]);
61
+ var state = _a.state, screen = _a.screen, _b = _a.alignContent, alignContent = _b === void 0 ? 'left' : _b, children = _a.children, _c = _a.requiredCharAmount, requiredCharAmount = _c === void 0 ? 5 : _c, _d = _a.countdownDuration, countdownDuration = _d === void 0 ? ONE_MINUTE : _d, _e = _a.tempBlockDuration, tempBlockDuration = _e === void 0 ? ONE_DAY : _e, phone = _a.phone, blockSmsRetry = _a.blockSmsRetry, dataTestId = _a.dataTestId, className = _a.className, getScreensMap = _a.getScreensMap, onInputFinished = _a.onInputFinished, onChangeState = _a.onChangeState, onSmsRetryClick = _a.onSmsRetryClick, onChangeScreen = _a.onChangeScreen, onFatalErrorOkButtonClick = _a.onFatalErrorOkButtonClick, onTempBlockFinished = _a.onTempBlockFinished, mobile = _a.mobile, clearCodeOnError = _a.clearCodeOnError, restProps = __rest(_a, ["state", "screen", "alignContent", "children", "requiredCharAmount", "countdownDuration", "tempBlockDuration", "phone", "blockSmsRetry", "dataTestId", "className", "getScreensMap", "onInputFinished", "onChangeState", "onSmsRetryClick", "onChangeScreen", "onFatalErrorOkButtonClick", "onTempBlockFinished", "mobile", "clearCodeOnError"]);
62
62
  var _f = useCountdown(countdownDuration), timeLeft = _f[0], startTimer = _f[1], stopTimer = _f[2];
63
63
  var prevState = usePrevious(state);
64
64
  useEffect(function () {
@@ -108,6 +108,7 @@ var BaseConfirmation = function (_a) {
108
108
  onTempBlockFinished: onTempBlockFinished,
109
109
  onChangeState: onChangeState,
110
110
  onChangeScreen: onChangeScreen,
111
+ clearCodeOnError: clearCodeOnError,
111
112
  onInputFinished: handleInputFinished,
112
113
  onSmsRetryClick: handleSmsRetry,
113
114
  onFatalErrorOkButtonClick: handleFatalErrorOkButtonClick,
@@ -1,4 +1,4 @@
1
- import { B as BaseConfirmation, _ as __assign } from './component-299f3d2b.js';
1
+ import { B as BaseConfirmation, _ as __assign } from './component-c701193b.js';
2
2
  import React from 'react';
3
3
  import 'classnames';
4
4
  import '@alfalab/hooks';
@@ -11,7 +11,7 @@ import '@alfalab/core-components-link/esm';
11
11
  import '@alfalab/core-components-typography/esm';
12
12
  import './components/header/component.js';
13
13
  import '@alfalab/core-components-loader/esm';
14
- import './countdown-section-63fb6745.js';
14
+ import './countdown-section-08eeb8e4.js';
15
15
  import './components/screens/initial/component.js';
16
16
  import './components/screens/hint/component.js';
17
17
  import './components/screens/fatal-error/component.js';
@@ -1,4 +1,4 @@
1
- import { a as __rest, B as BaseConfirmation, _ as __assign } from './component-299f3d2b.js';
1
+ import { a as __rest, B as BaseConfirmation, _ as __assign } from './component-c701193b.js';
2
2
  import React from 'react';
3
3
  import cn from 'classnames';
4
4
  import '@alfalab/hooks';
@@ -11,14 +11,14 @@ import '@alfalab/core-components-link/esm';
11
11
  import '@alfalab/core-components-typography/esm';
12
12
  import './components/header/component.js';
13
13
  import '@alfalab/core-components-loader/esm';
14
- import './countdown-section-63fb6745.js';
14
+ import './countdown-section-08eeb8e4.js';
15
15
  import './components/screens/initial/component.js';
16
16
  import './components/screens/hint/component.js';
17
17
  import './components/screens/fatal-error/component.js';
18
18
  import './components/countdown-loader/component.js';
19
19
  import './components/screens/temp-block/component.js';
20
20
 
21
- var styles = {"container":"confirmation__container_10y5j"};
21
+ var styles = {"container":"confirmation__container_15gj1"};
22
22
  require('./mobile.css')
23
23
 
24
24
  var ConfirmationMobile = function (_a) {
@@ -1,4 +1,4 @@
1
- import { _ as __assign } from './component-299f3d2b.js';
1
+ import { _ as __assign } from './component-c701193b.js';
2
2
  import React from 'react';
3
3
  import 'classnames';
4
4
  import { useMedia } from '@alfalab/hooks';
@@ -11,7 +11,7 @@ import '@alfalab/core-components-link/esm';
11
11
  import '@alfalab/core-components-typography/esm';
12
12
  import './components/header/component.js';
13
13
  import '@alfalab/core-components-loader/esm';
14
- import './countdown-section-63fb6745.js';
14
+ import './countdown-section-08eeb8e4.js';
15
15
  import './components/screens/initial/component.js';
16
16
  import './components/screens/hint/component.js';
17
17
  import './components/screens/fatal-error/component.js';
@@ -1,4 +1,4 @@
1
- export { B as BaseConfirmation } from '../../component-299f3d2b.js';
1
+ export { B as BaseConfirmation } from '../../component-c701193b.js';
2
2
  import 'react';
3
3
  import 'classnames';
4
4
  import '@alfalab/hooks';
@@ -11,7 +11,7 @@ import '@alfalab/core-components-link/esm';
11
11
  import '@alfalab/core-components-typography/esm';
12
12
  import '../header/component.js';
13
13
  import '@alfalab/core-components-loader/esm';
14
- import '../../countdown-section-63fb6745.js';
14
+ import '../../countdown-section-08eeb8e4.js';
15
15
  import '../screens/initial/component.js';
16
16
  import '../screens/hint/component.js';
17
17
  import '../screens/fatal-error/component.js';
@@ -1,4 +1,4 @@
1
- /* hash: 4iwab */
1
+ /* hash: zbo4j */
2
2
  :root {
3
3
  --color-light-text-secondary: rgba(11, 31, 53, 0.7);
4
4
  }
@@ -10,7 +10,7 @@
10
10
 
11
11
  /* Hard up */
12
12
  }
13
- .confirmation__component_itozc {
13
+ .confirmation__component_nxnyx {
14
14
  display: flex;
15
15
  flex-direction: column;
16
16
  width: 100%;
@@ -18,7 +18,7 @@
18
18
  margin: 0 auto;
19
19
  color: var(--color-light-text-secondary);
20
20
  }
21
- .confirmation__center_itozc {
21
+ .confirmation__center_nxnyx {
22
22
  align-items: center;
23
23
  text-align: center;
24
24
  }
@@ -1 +1 @@
1
- export * from "../../component-299f3d2b";
1
+ export * from "../../component-c701193b";
@@ -1,4 +1,4 @@
1
- export { B as BaseConfirmation } from '../../component-299f3d2b.js';
1
+ export { B as BaseConfirmation } from '../../component-c701193b.js';
2
2
  import 'react';
3
3
  import 'classnames';
4
4
  import '@alfalab/hooks';
@@ -11,7 +11,7 @@ import '@alfalab/core-components-link/esm';
11
11
  import '@alfalab/core-components-typography/esm';
12
12
  import '../header/component.js';
13
13
  import '@alfalab/core-components-loader/esm';
14
- import '../../countdown-section-63fb6745.js';
14
+ import '../../countdown-section-08eeb8e4.js';
15
15
  import '../screens/initial/component.js';
16
16
  import '../screens/hint/component.js';
17
17
  import '../screens/fatal-error/component.js';
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
 
3
- var styles = {"circle":"confirmation__circle_1jxsw"};
3
+ var styles = {"circle":"confirmation__circle_zo8u6"};
4
4
  require('./index.css')
5
5
 
6
6
  var SIZE = 16;
@@ -1,4 +1,4 @@
1
- /* hash: 152os */
1
+ /* hash: 129i3 */
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_1jxsw {
13
+ .confirmation__circle_zo8u6 {
14
14
  fill: transparent;
15
15
  stroke: var(--color-light-graphic-tertiary);
16
16
  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/esm';
4
4
 
5
- var styles = {"header":"confirmation__header_1fx6i","typography":"confirmation__typography_1fx6i","typographyMobile":"confirmation__typographyMobile_1fx6i"};
5
+ var styles = {"header":"confirmation__header_1r802","typography":"confirmation__typography_1r802","typographyMobile":"confirmation__typographyMobile_1r802"};
6
6
  require('./index.css')
7
7
 
8
8
  var Header = function (_a) {
@@ -1,4 +1,4 @@
1
- /* hash: 1lyb0 */
1
+ /* hash: h4db5 */
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_1fx6i {
35
+ .confirmation__header_1r802 {
36
36
  margin-bottom: var(--gap-xl);
37
37
  }
38
- .confirmation__typography_1fx6i {
38
+ .confirmation__typography_1r802 {
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_1fx6i {
45
+ .confirmation__typographyMobile_1r802 {
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);
@@ -9,7 +9,7 @@ import '@alfalab/core-components-link/esm';
9
9
  import '@alfalab/core-components-typography/esm';
10
10
  import './header/component.js';
11
11
  import '@alfalab/core-components-loader/esm';
12
- import '../countdown-section-63fb6745.js';
12
+ import '../countdown-section-08eeb8e4.js';
13
13
  export { Initial } from './screens/initial/component.js';
14
14
  export { Hint } from './screens/hint/component.js';
15
15
  export { FatalError } from './screens/fatal-error/component.js';
@@ -6,7 +6,7 @@ import { Button } from '@alfalab/core-components-button/esm';
6
6
  import { Typography } from '@alfalab/core-components-typography/esm';
7
7
  import { Header } from '../../header/component.js';
8
8
 
9
- var styles = {"typographyTheme":"confirmation__typographyTheme_zybqm","left":"confirmation__left_zybqm","center":"confirmation__center_zybqm","button":"confirmation__button_zybqm"};
9
+ var styles = {"typographyTheme":"confirmation__typographyTheme_1ktha","left":"confirmation__left_1ktha","center":"confirmation__center_1ktha","button":"confirmation__button_1ktha"};
10
10
  require('./index.css')
11
11
 
12
12
  var FatalError = function (_a) {
@@ -1,4 +1,4 @@
1
- /* hash: ti736 */
1
+ /* hash: gk78h */
2
2
  :root {
3
3
  --color-light-text-primary: #0b1f35;
4
4
  }
@@ -31,19 +31,19 @@
31
31
 
32
32
  /* header */
33
33
  }
34
- .confirmation__typographyTheme_zybqm {
34
+ .confirmation__typographyTheme_1ktha {
35
35
  font-size: var(--confirmation-text-font-size);
36
36
  line-height: var(--confirmation-text-line-height);
37
37
  font-weight: var(--confirmation-text-font-weight);
38
38
  font-family: var(--confirmation-text-font-family);
39
39
  color: var(--confirmation-text-color);
40
40
  }
41
- .confirmation__left_zybqm {
41
+ .confirmation__left_1ktha {
42
42
  align-items: flex-start;
43
43
  }
44
- .confirmation__center_zybqm {
44
+ .confirmation__center_1ktha {
45
45
  align-items: center;
46
46
  }
47
- .confirmation__button_zybqm {
47
+ .confirmation__button_1ktha {
48
48
  margin-top: var(--gap-2xl);
49
49
  }
@@ -7,7 +7,7 @@ import { Link } from '@alfalab/core-components-link/esm';
7
7
  import { Typography } from '@alfalab/core-components-typography/esm';
8
8
  import { Header } from '../../header/component.js';
9
9
 
10
- var styles = {"center":"confirmation__center_7wpc3","hintWrap":"confirmation__hintWrap_7wpc3","text":"confirmation__text_7wpc3","typographyTheme":"confirmation__typographyTheme_7wpc3","phonesWrap":"confirmation__phonesWrap_7wpc3","phoneWrap":"confirmation__phoneWrap_7wpc3","phoneLink":"confirmation__phoneLink_7wpc3","hintButton":"confirmation__hintButton_7wpc3","phoneContentMobile":"confirmation__phoneContentMobile_7wpc3"};
10
+ var styles = {"center":"confirmation__center_d0obp","hintWrap":"confirmation__hintWrap_d0obp","text":"confirmation__text_d0obp","typographyTheme":"confirmation__typographyTheme_d0obp","phonesWrap":"confirmation__phonesWrap_d0obp","phoneWrap":"confirmation__phoneWrap_d0obp","phoneLink":"confirmation__phoneLink_d0obp","hintButton":"confirmation__hintButton_d0obp","phoneContentMobile":"confirmation__phoneContentMobile_d0obp"};
11
11
  require('./index.css')
12
12
 
13
13
  var Hint = function (_a) {
@@ -25,10 +25,14 @@ var Hint = function (_a) {
25
25
  React.createElement("div", { className: styles.phonesWrap },
26
26
  React.createElement("div", { className: cn(styles.phoneWrap, (_c = {}, _c[styles.phoneContentMobile] = mobile, _c)) },
27
27
  React.createElement(Link, { href: 'tel:+78002000000', underline: false, className: styles.phoneLink }, "8 800 200-00-00"),
28
- React.createElement(Typography.Text, { view: 'primary-medium', color: 'primary', className: cn(styles.text, (_d = {}, _d[styles.typographyTheme] = !mobile, _d)) }, mobile ? (React.createElement(React.Fragment, null, "\u0414\u043B\u044F\u00A0 \u0437\u0432\u043E\u043D\u043A\u043E\u0432 \u043F\u043E\u00A0\u0420\u043E\u0441\u0441\u0438\u0438")) : (React.createElement(React.Fragment, null, " \u2014\u00A0\u0434\u043B\u044F \u0437\u0432\u043E\u043D\u043A\u043E\u0432 \u043F\u043E\u00A0\u0420\u043E\u0441\u0441\u0438\u0438")))),
28
+ React.createElement(Typography.Text, { view: 'primary-medium', color: 'primary', className: cn(styles.text, (_d = {}, _d[styles.typographyTheme] = !mobile, _d)) }, mobile
29
+ ? 'Для\u00A0 звонков по\u00A0России'
30
+ : ' \u2014\u00A0для звонков по\u00A0России')),
29
31
  React.createElement("div", { className: cn(styles.phoneWrap, (_e = {}, _e[styles.phoneContentMobile] = mobile, _e)) },
30
32
  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, (_f = {}, _f[styles.typographyTheme] = !mobile, _f)) }, mobile ? (React.createElement(React.Fragment, null, "\u0412\u00A0\u041C\u043E\u0441\u043A\u0432\u0435 \u0438\u00A0\u0437\u0430\u00A0\u0433\u0440\u0430\u043D\u0438\u0446\u0435\u0439")) : (React.createElement(React.Fragment, null, " \u2014\u00A0\u0432\u00A0\u041C\u043E\u0441\u043A\u0432\u0435 \u0438\u00A0\u0437\u0430\u00A0\u0433\u0440\u0430\u043D\u0438\u0446\u0435\u0439"))))),
33
+ React.createElement(Typography.Text, { view: 'primary-medium', color: 'primary', className: cn(styles.text, (_f = {}, _f[styles.typographyTheme] = !mobile, _f)) }, mobile
34
+ ? 'В\u00A0Москве и\u00A0за\u00A0границей'
35
+ : ' \u2014\u00A0в\u00A0Москве и\u00A0за\u00A0границей'))),
32
36
  React.createElement(Typography.Text, { view: 'primary-medium', color: 'primary', className: cn(styles.text, (_g = {}, _g[styles.typographyTheme] = !mobile, _g)) }, "\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."),
33
37
  React.createElement(Button, { size: mobile ? 'xs' : 's', view: 'secondary', onClick: handleReturnButtonClick, className: styles.hintButton }, texts.hintButton))));
34
38
  };
@@ -1,4 +1,4 @@
1
- /* hash: 1g5rj */
1
+ /* hash: 13td6 */
2
2
  :root {
3
3
  --color-light-text-primary: #0b1f35;
4
4
  }
@@ -33,47 +33,47 @@
33
33
 
34
34
  /* header */
35
35
  }
36
- .confirmation__center_7wpc3 .confirmation__hintWrap_7wpc3 {
36
+ .confirmation__center_d0obp .confirmation__hintWrap_d0obp {
37
37
  align-items: center;
38
38
  }
39
- .confirmation__hintWrap_7wpc3 {
39
+ .confirmation__hintWrap_d0obp {
40
40
  display: flex;
41
41
  flex-direction: column;
42
42
  align-items: flex-start
43
43
  }
44
- .confirmation__hintWrap_7wpc3 span:last-of-type {
44
+ .confirmation__hintWrap_d0obp span:last-of-type {
45
45
  margin-bottom: 0;
46
46
  }
47
- .confirmation__text_7wpc3 {
47
+ .confirmation__text_d0obp {
48
48
  margin-bottom: var(--gap-xl);
49
49
  }
50
- .confirmation__typographyTheme_7wpc3 {
50
+ .confirmation__typographyTheme_d0obp {
51
51
  font-size: var(--confirmation-text-font-size);
52
52
  line-height: var(--confirmation-text-line-height);
53
53
  font-weight: var(--confirmation-text-font-weight);
54
54
  font-family: var(--confirmation-text-font-family);
55
55
  color: var(--confirmation-text-color);
56
56
  }
57
- .confirmation__phonesWrap_7wpc3 {
57
+ .confirmation__phonesWrap_d0obp {
58
58
  display: flex;
59
59
  flex-direction: column;
60
60
  margin-bottom: var(--gap-xl);
61
61
  }
62
- .confirmation__phoneWrap_7wpc3 {
62
+ .confirmation__phoneWrap_d0obp {
63
63
  margin-bottom: var(--gap-xs)
64
64
  }
65
- .confirmation__phoneWrap_7wpc3:last-child {
65
+ .confirmation__phoneWrap_d0obp:last-child {
66
66
  margin-bottom: 0;
67
67
  }
68
- .confirmation__phoneLink_7wpc3 {
68
+ .confirmation__phoneLink_d0obp {
69
69
  font-size: 16px;
70
70
  line-height: 24px;
71
71
  font-weight: 500;
72
72
  }
73
- .confirmation__hintButton_7wpc3 {
73
+ .confirmation__hintButton_d0obp {
74
74
  margin-top: var(--gap-2xl);
75
75
  }
76
- .confirmation__phoneContentMobile_7wpc3 {
76
+ .confirmation__phoneContentMobile_d0obp {
77
77
  display: flex;
78
78
  flex-direction: column;
79
79
  align-items: center;
@@ -9,7 +9,7 @@ import '@alfalab/core-components-link/esm';
9
9
  import '@alfalab/core-components-typography/esm';
10
10
  import '../header/component.js';
11
11
  import '@alfalab/core-components-loader/esm';
12
- import '../../countdown-section-63fb6745.js';
12
+ import '../../countdown-section-08eeb8e4.js';
13
13
  export { Initial } from './initial/component.js';
14
14
  export { Hint } from './hint/component.js';
15
15
  export { FatalError } from './fatal-error/component.js';
@@ -9,13 +9,13 @@ import { Link } from '@alfalab/core-components-link/esm';
9
9
  import { Typography } from '@alfalab/core-components-typography/esm';
10
10
  import { Header } from '../../header/component.js';
11
11
  import '@alfalab/core-components-loader/esm';
12
- import { s as styles, C as CountdownSection } from '../../../countdown-section-63fb6745.js';
12
+ import { s as styles, C as CountdownSection } from '../../../countdown-section-08eeb8e4.js';
13
13
 
14
14
  var CODE_SEND_HINT_VISIBLE_DURATION = 2000;
15
15
  var Initial = function (_a) {
16
16
  var _b;
17
17
  var mobile = _a.mobile;
18
- var _c = useContext(ConfirmationContext), state = _c.state, alignContent = _c.alignContent, texts = _c.texts, requiredCharAmount = _c.requiredCharAmount, timeLeft = _c.timeLeft, phone = _c.phone, onChangeState = _c.onChangeState, onInputFinished = _c.onInputFinished, onChangeScreen = _c.onChangeScreen, onSmsRetryClick = _c.onSmsRetryClick;
18
+ var _c = useContext(ConfirmationContext), state = _c.state, alignContent = _c.alignContent, texts = _c.texts, requiredCharAmount = _c.requiredCharAmount, timeLeft = _c.timeLeft, phone = _c.phone, clearCodeOnError = _c.clearCodeOnError, onChangeState = _c.onChangeState, onInputFinished = _c.onInputFinished, onChangeScreen = _c.onChangeScreen, onSmsRetryClick = _c.onSmsRetryClick;
19
19
  var prevState = usePrevious(state);
20
20
  var inputRef = useRef(null);
21
21
  var _d = useState(false), codeSendHintVisible = _d[0], setCodeSendHintVisible = _d[1];
@@ -81,7 +81,7 @@ var Initial = function (_a) {
81
81
  React.createElement(Typography.Text, { view: 'primary-medium', color: 'primary', className: cn(styles.phone, (_b = {}, _b[styles.typographyTheme] = !mobile, _b)) },
82
82
  "\u041A\u043E\u0434 \u043E\u0442\u043F\u0440\u0430\u0432\u043B\u0435\u043D \u043D\u0430 ",
83
83
  phone),
84
- React.createElement(CodeInput, { disabled: processing, error: getCodeInputError(), ref: inputRef, fields: requiredCharAmount, className: cn(styles.containerInput, styles.codeInput), onComplete: handleInputComplete, onChange: handleInputChange }),
84
+ React.createElement(CodeInput, { disabled: processing, error: getCodeInputError(), ref: inputRef, fields: requiredCharAmount, className: cn(styles.containerInput, styles.codeInput), onComplete: handleInputComplete, onChange: handleInputChange, clearCodeOnError: clearCodeOnError }),
85
85
  React.createElement(CountdownSection, { processing: processing, timePassed: timePassed, codeSendHintVisible: codeSendHintVisible, handleSmsRetryClick: handleSmsRetryClick, mobile: mobile }),
86
86
  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))));
87
87
  };
@@ -5,4 +5,4 @@ import '../../../context.js';
5
5
  import '@alfalab/core-components-button/esm';
6
6
  import '@alfalab/core-components-typography/esm';
7
7
  import '@alfalab/core-components-loader/esm';
8
- export { C as CountdownSection } from '../../../countdown-section-63fb6745.js';
8
+ export { C as CountdownSection } from '../../../countdown-section-08eeb8e4.js';