@alfalab/core-components-confirmation 13.0.0 → 13.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (115) hide show
  1. package/component.desktop.js +2 -2
  2. package/component.mobile.js +3 -3
  3. package/component.responsive.js +2 -2
  4. package/components/base-confirmation/component.js +5 -4
  5. package/components/base-confirmation/index.css +2 -2
  6. package/components/base-confirmation/index.js +2 -2
  7. package/components/countdown-loader/component.js +1 -1
  8. package/components/countdown-loader/index.css +2 -2
  9. package/components/header/component.js +1 -1
  10. package/components/header/index.css +4 -4
  11. package/components/index.js +2 -2
  12. package/components/screens/fatal-error/component.js +1 -1
  13. package/components/screens/fatal-error/index.css +6 -6
  14. package/components/screens/hint/component.js +1 -1
  15. package/components/screens/hint/index.css +12 -12
  16. package/components/screens/index.js +2 -2
  17. package/components/screens/initial/component.js +13 -4
  18. package/components/screens/initial/countdown-section.js +2 -2
  19. package/components/screens/initial/index.css +17 -17
  20. package/components/screens/initial/index.js +2 -2
  21. package/components/screens/temp-block/component.js +1 -1
  22. package/components/screens/temp-block/index.css +7 -7
  23. package/context.js +1 -0
  24. package/{countdown-section-fb6524aa.js → countdown-section-9a6d1d6b.js} +3 -3
  25. package/cssm/component.desktop.js +1 -1
  26. package/cssm/component.mobile.js +1 -1
  27. package/cssm/component.responsive.js +1 -1
  28. package/cssm/components/base-confirmation/component.js +3 -2
  29. package/cssm/components/base-confirmation/index.js +1 -1
  30. package/cssm/components/index.js +1 -1
  31. package/cssm/components/screens/index.js +1 -1
  32. package/cssm/components/screens/initial/component.js +12 -3
  33. package/cssm/components/screens/initial/countdown-section.js +2 -2
  34. package/cssm/components/screens/initial/index.js +1 -1
  35. package/cssm/context.js +1 -0
  36. package/cssm/desktop.js +1 -1
  37. package/cssm/index.js +1 -1
  38. package/cssm/mobile.js +1 -1
  39. package/cssm/shared.js +1 -1
  40. package/cssm/types.d.ts +5 -1
  41. package/desktop.js +2 -2
  42. package/esm/component.desktop.js +2 -2
  43. package/esm/component.mobile.js +3 -3
  44. package/esm/component.responsive.js +2 -2
  45. package/esm/components/base-confirmation/component.js +5 -4
  46. package/esm/components/base-confirmation/index.css +2 -2
  47. package/esm/components/base-confirmation/index.js +2 -2
  48. package/esm/components/countdown-loader/component.js +1 -1
  49. package/esm/components/countdown-loader/index.css +2 -2
  50. package/esm/components/header/component.js +1 -1
  51. package/esm/components/header/index.css +4 -4
  52. package/esm/components/index.js +2 -2
  53. package/esm/components/screens/fatal-error/component.js +1 -1
  54. package/esm/components/screens/fatal-error/index.css +6 -6
  55. package/esm/components/screens/hint/component.js +1 -1
  56. package/esm/components/screens/hint/index.css +12 -12
  57. package/esm/components/screens/index.js +2 -2
  58. package/esm/components/screens/initial/component.js +13 -4
  59. package/esm/components/screens/initial/countdown-section.js +2 -2
  60. package/esm/components/screens/initial/index.css +17 -17
  61. package/esm/components/screens/initial/index.js +2 -2
  62. package/esm/components/screens/temp-block/component.js +1 -1
  63. package/esm/components/screens/temp-block/index.css +7 -7
  64. package/esm/context.js +1 -0
  65. package/esm/{countdown-section-c65cff2d.js → countdown-section-281fb6b0.js} +3 -3
  66. package/esm/desktop.js +2 -2
  67. package/esm/index.js +2 -2
  68. package/esm/mobile.css +2 -2
  69. package/esm/mobile.js +2 -2
  70. package/esm/shared.js +2 -2
  71. package/esm/types.d.ts +5 -1
  72. package/index.js +2 -2
  73. package/mobile.css +2 -2
  74. package/mobile.js +2 -2
  75. package/modern/component.desktop.js +2 -2
  76. package/modern/component.mobile.js +3 -3
  77. package/modern/component.responsive.js +2 -2
  78. package/modern/components/base-confirmation/component.js +5 -4
  79. package/modern/components/base-confirmation/index.css +2 -2
  80. package/modern/components/base-confirmation/index.js +2 -2
  81. package/modern/components/countdown-loader/component.js +1 -1
  82. package/modern/components/countdown-loader/index.css +2 -2
  83. package/modern/components/header/component.js +1 -1
  84. package/modern/components/header/index.css +4 -4
  85. package/modern/components/index.js +2 -2
  86. package/modern/components/screens/fatal-error/component.js +1 -1
  87. package/modern/components/screens/fatal-error/index.css +6 -6
  88. package/modern/components/screens/hint/component.js +1 -1
  89. package/modern/components/screens/hint/index.css +12 -12
  90. package/modern/components/screens/index.js +2 -2
  91. package/modern/components/screens/initial/component.js +13 -4
  92. package/modern/components/screens/initial/countdown-section.js +2 -2
  93. package/modern/components/screens/initial/index.css +17 -17
  94. package/modern/components/screens/initial/index.js +2 -2
  95. package/modern/components/screens/temp-block/component.js +1 -1
  96. package/modern/components/screens/temp-block/index.css +7 -7
  97. package/modern/context.js +1 -0
  98. package/modern/{countdown-section-dd4e5fe3.js → countdown-section-baf81c17.js} +3 -3
  99. package/modern/desktop.js +2 -2
  100. package/modern/index.js +2 -2
  101. package/modern/mobile.css +2 -2
  102. package/modern/mobile.js +2 -2
  103. package/modern/shared.js +2 -2
  104. package/modern/types.d.ts +5 -1
  105. package/package.json +3 -3
  106. package/shared.js +2 -2
  107. package/src/components/base-confirmation/component.tsx +2 -0
  108. package/src/components/screens/initial/component.tsx +27 -14
  109. package/src/components/screens/initial/countdown-section.tsx +2 -2
  110. package/src/context.ts +1 -0
  111. package/src/types.ts +10 -1
  112. package/types.d.ts +5 -1
  113. /package/{countdown-section-fb6524aa.d.ts → countdown-section-9a6d1d6b.d.ts} +0 -0
  114. /package/esm/{countdown-section-c65cff2d.d.ts → countdown-section-281fb6b0.d.ts} +0 -0
  115. /package/modern/{countdown-section-dd4e5fe3.d.ts → countdown-section-baf81c17.d.ts} +0 -0
@@ -23,7 +23,7 @@ require('../header/component.js');
23
23
  require('../header/index.module.css');
24
24
  require('../screens/initial/countdown-section.js');
25
25
  require('@alfalab/core-components-button/cssm');
26
- require('@alfalab/core-components-loader/cssm');
26
+ require('@alfalab/core-components-spinner/cssm');
27
27
  require('../screens/initial/index.module.css');
28
28
  require('../screens/hint/index.module.css');
29
29
  require('../screens/fatal-error/index.module.css');
@@ -44,7 +44,7 @@ var confirmationScreens = {
44
44
  TEMP_BLOCK: components_screens_tempBlock_component.TempBlock,
45
45
  };
46
46
  var BaseConfirmation = function (_a) {
47
- var state = _a.state, screen = _a.screen, _b = _a.alignContent, alignContent = _b === void 0 ? 'left' : _b; _a.children; var _c = _a.requiredCharAmount, requiredCharAmount = _c === void 0 ? 5 : _c, _d = _a.countdownDuration, countdownDuration = _d === void 0 ? utils.ONE_MINUTE : _d, _e = _a.tempBlockDuration, tempBlockDuration = _e === void 0 ? utils.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, _f = _a.clearCodeOnError, clearCodeOnError = _f === void 0 ? true : _f, _g = _a.hideCountdownSection, hideCountdownSection = _g === void 0 ? false : _g, _h = _a.breakpoint, breakpoint = _h === void 0 ? 1024 : _h, restProps = tslib.__rest(_a, ["state", "screen", "alignContent", "children", "requiredCharAmount", "countdownDuration", "tempBlockDuration", "phone", "blockSmsRetry", "dataTestId", "className", "getScreensMap", "onInputFinished", "onChangeState", "onSmsRetryClick", "onChangeScreen", "onFatalErrorOkButtonClick", "onTempBlockFinished", "mobile", "clearCodeOnError", "hideCountdownSection", "breakpoint"]);
47
+ var state = _a.state, screen = _a.screen, _b = _a.alignContent, alignContent = _b === void 0 ? 'left' : _b; _a.children; var _c = _a.requiredCharAmount, requiredCharAmount = _c === void 0 ? 5 : _c, _d = _a.countdownDuration, countdownDuration = _d === void 0 ? utils.ONE_MINUTE : _d, _e = _a.tempBlockDuration, tempBlockDuration = _e === void 0 ? utils.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, _f = _a.clearCodeOnError, clearCodeOnError = _f === void 0 ? true : _f, _g = _a.hideCountdownSection, hideCountdownSection = _g === void 0 ? false : _g, _h = _a.breakpoint, breakpoint = _h === void 0 ? 1024 : _h, initialScreenHintSlot = _a.initialScreenHintSlot, restProps = tslib.__rest(_a, ["state", "screen", "alignContent", "children", "requiredCharAmount", "countdownDuration", "tempBlockDuration", "phone", "blockSmsRetry", "dataTestId", "className", "getScreensMap", "onInputFinished", "onChangeState", "onSmsRetryClick", "onChangeScreen", "onFatalErrorOkButtonClick", "onTempBlockFinished", "mobile", "clearCodeOnError", "hideCountdownSection", "breakpoint", "initialScreenHintSlot"]);
48
48
  var _j = utils.useCountdown(countdownDuration), timeLeft = _j[0], startTimer = _j[1], stopTimer = _j[2];
49
49
  var prevState = hooks.usePrevious(state);
50
50
  React.useEffect(function () {
@@ -97,6 +97,7 @@ var BaseConfirmation = function (_a) {
97
97
  onChangeState: onChangeState,
98
98
  onChangeScreen: onChangeScreen,
99
99
  clearCodeOnError: clearCodeOnError,
100
+ initialScreenHintSlot: initialScreenHintSlot,
100
101
  onInputFinished: handleInputFinished,
101
102
  onSmsRetryClick: handleSmsRetry,
102
103
  onFatalErrorOkButtonClick: handleFatalErrorOkButtonClick,
@@ -20,7 +20,7 @@ require('../header/component.js');
20
20
  require('../header/index.module.css');
21
21
  require('../screens/initial/countdown-section.js');
22
22
  require('@alfalab/core-components-button/cssm');
23
- require('@alfalab/core-components-loader/cssm');
23
+ require('@alfalab/core-components-spinner/cssm');
24
24
  require('../screens/initial/index.module.css');
25
25
  require('../screens/hint/component.js');
26
26
  require('../screens/hint/index.module.css');
@@ -21,7 +21,7 @@ require('./header/component.js');
21
21
  require('./header/index.module.css');
22
22
  require('./screens/initial/countdown-section.js');
23
23
  require('@alfalab/core-components-button/cssm');
24
- require('@alfalab/core-components-loader/cssm');
24
+ require('@alfalab/core-components-spinner/cssm');
25
25
  require('./screens/initial/index.module.css');
26
26
  require('./screens/hint/index.module.css');
27
27
  require('./screens/fatal-error/index.module.css');
@@ -20,7 +20,7 @@ require('../header/component.js');
20
20
  require('../header/index.module.css');
21
21
  require('./initial/countdown-section.js');
22
22
  require('@alfalab/core-components-button/cssm');
23
- require('@alfalab/core-components-loader/cssm');
23
+ require('@alfalab/core-components-spinner/cssm');
24
24
  require('./initial/index.module.css');
25
25
  require('./hint/index.module.css');
26
26
  require('./fatal-error/index.module.css');
@@ -17,7 +17,7 @@ var styles = require('./index.module.css');
17
17
  require('../../../utils.js');
18
18
  require('../../header/index.module.css');
19
19
  require('@alfalab/core-components-button/cssm');
20
- require('@alfalab/core-components-loader/cssm');
20
+ require('@alfalab/core-components-spinner/cssm');
21
21
 
22
22
  function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
23
23
 
@@ -29,7 +29,7 @@ var CODE_SEND_HINT_VISIBLE_DURATION = 2000;
29
29
  var Initial = function (_a) {
30
30
  var _b;
31
31
  var mobile$2 = _a.mobile;
32
- 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, hideCountdownSection = _c.hideCountdownSection, onChangeState = _c.onChangeState, onInputFinished = _c.onInputFinished, onChangeScreen = _c.onChangeScreen, onSmsRetryClick = _c.onSmsRetryClick;
32
+ 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, hideCountdownSection = _c.hideCountdownSection, initialScreenHintSlot = _c.initialScreenHintSlot, onChangeState = _c.onChangeState, onInputFinished = _c.onInputFinished, onChangeScreen = _c.onChangeScreen, onSmsRetryClick = _c.onSmsRetryClick;
33
33
  var prevState = hooks.usePrevious(state);
34
34
  var inputRef = React.useRef(null);
35
35
  var _d = React.useState(false), codeSendHintVisible = _d[0], setCodeSendHintVisible = _d[1];
@@ -93,6 +93,15 @@ var Initial = function (_a) {
93
93
  }
94
94
  return false;
95
95
  };
96
+ var renderHintButton = function () {
97
+ if (initialScreenHintSlot) {
98
+ return initialScreenHintSlot;
99
+ }
100
+ if (mobile$2) {
101
+ return (React__default.default.createElement(mobile.ButtonMobile, { onClick: handleSmsHintLinkClick, view: 'link', size: 'xs' }, texts.linkToHint));
102
+ }
103
+ return (React__default.default.createElement(coreComponentsLink.Link, { onClick: handleSmsHintLinkClick, className: styles__default.default.smsComeLink, view: mobile$2 ? 'primary' : 'secondary', pseudo: true }, texts.linkToHint));
104
+ };
96
105
  var processing = ['CODE_CHECKING', 'CODE_SENDING'].includes(state);
97
106
  var timePassed = timeLeft === 0;
98
107
  var ComponentCodeInput = mobile$2 ? mobile$1.CodeInputMobile : desktop.CodeInputDesktop;
@@ -103,7 +112,7 @@ var Initial = function (_a) {
103
112
  phone),
104
113
  React__default.default.createElement(ComponentCodeInput, { 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, onErrorAnimationEnd: handleErrorAnimationEnd }),
105
114
  !hideCountdownSection && (React__default.default.createElement(components_screens_initial_countdownSection.CountdownSection, { processing: processing, timePassed: timePassed, codeSendHintVisible: codeSendHintVisible, handleSmsRetryClick: handleSmsRetryClick, mobile: mobile$2 })),
106
- mobile$2 ? (React__default.default.createElement(mobile.ButtonMobile, { onClick: handleSmsHintLinkClick, view: 'link', size: 'xs' }, texts.linkToHint)) : (React__default.default.createElement(coreComponentsLink.Link, { onClick: handleSmsHintLinkClick, className: styles__default.default.smsComeLink, view: mobile$2 ? 'primary' : 'secondary', pseudo: true }, texts.linkToHint))));
115
+ renderHintButton()));
107
116
  };
108
117
 
109
118
  exports.Initial = Initial;
@@ -5,7 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
5
5
  var React = require('react');
6
6
  var cn = require('classnames');
7
7
  var coreComponentsButton = require('@alfalab/core-components-button/cssm');
8
- var coreComponentsLoader = require('@alfalab/core-components-loader/cssm');
8
+ var coreComponentsSpinner = require('@alfalab/core-components-spinner/cssm');
9
9
  var coreComponentsTypography = require('@alfalab/core-components-typography/cssm');
10
10
  var context = require('../../../context.js');
11
11
  var utils = require('../../../utils.js');
@@ -35,7 +35,7 @@ var CountdownSection = function (_a) {
35
35
  _b[styles__default.default.countdownLoaderMobile] = mobile,
36
36
  _b[styles__default.default.typographyTheme] = !mobile,
37
37
  _b)) },
38
- React__default.default.createElement(coreComponentsLoader.Loader, null),
38
+ React__default.default.createElement(coreComponentsSpinner.Spinner, { visible: true }),
39
39
  React__default.default.createElement("span", { className: styles__default.default.loaderText }, state === 'CODE_CHECKING' ? texts.codeChecking : texts.codeSending)));
40
40
  }
41
41
  if (blockSmsRetry)
@@ -17,7 +17,7 @@ require('../../header/component.js');
17
17
  require('../../header/index.module.css');
18
18
  require('./countdown-section.js');
19
19
  require('@alfalab/core-components-button/cssm');
20
- require('@alfalab/core-components-loader/cssm');
20
+ require('@alfalab/core-components-spinner/cssm');
21
21
  require('./index.module.css');
22
22
 
23
23
 
package/cssm/context.js CHANGED
@@ -18,6 +18,7 @@ var ConfirmationContext = React.createContext({
18
18
  phone: '',
19
19
  hideCountdownSection: false,
20
20
  breakpoint: 1024,
21
+ initialScreenHintSlot: null,
21
22
  onTempBlockFinished: mockFn,
22
23
  onInputFinished: mockFn,
23
24
  onChangeState: mockFn,
package/cssm/desktop.js CHANGED
@@ -21,7 +21,7 @@ require('./components/header/component.js');
21
21
  require('./components/header/index.module.css');
22
22
  require('./components/screens/initial/countdown-section.js');
23
23
  require('@alfalab/core-components-button/cssm');
24
- require('@alfalab/core-components-loader/cssm');
24
+ require('@alfalab/core-components-spinner/cssm');
25
25
  require('./components/screens/initial/index.module.css');
26
26
  require('./components/screens/hint/component.js');
27
27
  require('./components/screens/hint/index.module.css');
package/cssm/index.js CHANGED
@@ -23,7 +23,7 @@ require('./components/header/component.js');
23
23
  require('./components/header/index.module.css');
24
24
  require('./components/screens/initial/countdown-section.js');
25
25
  require('@alfalab/core-components-button/cssm');
26
- require('@alfalab/core-components-loader/cssm');
26
+ require('@alfalab/core-components-spinner/cssm');
27
27
  require('./components/screens/initial/index.module.css');
28
28
  require('./components/screens/hint/component.js');
29
29
  require('./components/screens/hint/index.module.css');
package/cssm/mobile.js CHANGED
@@ -21,7 +21,7 @@ require('./components/header/component.js');
21
21
  require('./components/header/index.module.css');
22
22
  require('./components/screens/initial/countdown-section.js');
23
23
  require('@alfalab/core-components-button/cssm');
24
- require('@alfalab/core-components-loader/cssm');
24
+ require('@alfalab/core-components-spinner/cssm');
25
25
  require('./components/screens/initial/index.module.css');
26
26
  require('./components/screens/hint/component.js');
27
27
  require('./components/screens/hint/index.module.css');
package/cssm/shared.js CHANGED
@@ -22,7 +22,7 @@ require('./components/header/component.js');
22
22
  require('./components/header/index.module.css');
23
23
  require('./components/screens/initial/countdown-section.js');
24
24
  require('@alfalab/core-components-button/cssm');
25
- require('@alfalab/core-components-loader/cssm');
25
+ require('@alfalab/core-components-spinner/cssm');
26
26
  require('./components/screens/initial/index.module.css');
27
27
  require('./components/screens/hint/index.module.css');
28
28
  require('./components/screens/fatal-error/index.module.css');
package/cssm/types.d.ts CHANGED
@@ -89,13 +89,17 @@ type ConfirmationProps = {
89
89
  * @default false
90
90
  */
91
91
  hideCountdownSection?: boolean;
92
+ /**
93
+ * Слот для контента с подсказкой на главном экране
94
+ */
95
+ initialScreenHintSlot?: ReactNode;
92
96
  /**
93
97
  * Контрольная точка для кнопки, с нее начинается desktop версия
94
98
  * @default 1024
95
99
  */
96
100
  breakpoint?: number;
97
101
  };
98
- type TConfirmationContext = Required<Pick<ConfirmationProps, 'alignContent' | 'texts' | 'state' | 'screen' | 'requiredCharAmount' | 'onInputFinished' | 'countdownDuration' | 'onChangeState' | 'onSmsRetryClick' | 'onChangeScreen' | 'onFatalErrorOkButtonClick' | 'tempBlockDuration' | 'hideCountdownSection'>> & Pick<ConfirmationProps, 'phone' | 'blockSmsRetry' | 'onTempBlockFinished' | 'clearCodeOnError'> & {
102
+ type TConfirmationContext = Required<Pick<ConfirmationProps, 'alignContent' | 'texts' | 'state' | 'screen' | 'requiredCharAmount' | 'onInputFinished' | 'countdownDuration' | 'onChangeState' | 'onSmsRetryClick' | 'onChangeScreen' | 'onFatalErrorOkButtonClick' | 'tempBlockDuration' | 'hideCountdownSection'>> & Pick<ConfirmationProps, 'phone' | 'blockSmsRetry' | 'onTempBlockFinished' | 'clearCodeOnError' | 'initialScreenHintSlot'> & {
99
103
  timeLeft: number;
100
104
  } & {
101
105
  /**
package/desktop.js CHANGED
@@ -18,9 +18,9 @@ require('@alfalab/core-components-code-input/mobile');
18
18
  require('@alfalab/core-components-link');
19
19
  require('@alfalab/core-components-typography');
20
20
  require('./components/header/component.js');
21
- require('./countdown-section-fb6524aa.js');
21
+ require('./countdown-section-9a6d1d6b.js');
22
22
  require('@alfalab/core-components-button');
23
- require('@alfalab/core-components-loader');
23
+ require('@alfalab/core-components-spinner');
24
24
  require('./components/screens/hint/component.js');
25
25
  require('./components/screens/fatal-error/component.js');
26
26
  require('./components/screens/temp-block/component.js');
@@ -13,9 +13,9 @@ import '@alfalab/core-components-code-input/esm/mobile';
13
13
  import '@alfalab/core-components-link/esm';
14
14
  import '@alfalab/core-components-typography/esm';
15
15
  import './components/header/component.js';
16
- import './countdown-section-c65cff2d.js';
16
+ import './countdown-section-281fb6b0.js';
17
17
  import '@alfalab/core-components-button/esm';
18
- import '@alfalab/core-components-loader/esm';
18
+ import '@alfalab/core-components-spinner/esm';
19
19
  import './components/screens/hint/component.js';
20
20
  import './components/screens/fatal-error/component.js';
21
21
  import './components/screens/temp-block/component.js';
@@ -13,15 +13,15 @@ import '@alfalab/core-components-code-input/esm/mobile';
13
13
  import '@alfalab/core-components-link/esm';
14
14
  import '@alfalab/core-components-typography/esm';
15
15
  import './components/header/component.js';
16
- import './countdown-section-c65cff2d.js';
16
+ import './countdown-section-281fb6b0.js';
17
17
  import '@alfalab/core-components-button/esm';
18
- import '@alfalab/core-components-loader/esm';
18
+ import '@alfalab/core-components-spinner/esm';
19
19
  import './components/screens/hint/component.js';
20
20
  import './components/screens/fatal-error/component.js';
21
21
  import './components/screens/temp-block/component.js';
22
22
  import './components/countdown-loader/component.js';
23
23
 
24
- var styles = {"container":"confirmation__container_hgizz"};
24
+ var styles = {"container":"confirmation__container_gsnsg"};
25
25
  require('./mobile.css')
26
26
 
27
27
  var ConfirmationMobile = function (_a) {
@@ -16,9 +16,9 @@ import '@alfalab/core-components-code-input/esm/mobile';
16
16
  import '@alfalab/core-components-link/esm';
17
17
  import '@alfalab/core-components-typography/esm';
18
18
  import './components/header/component.js';
19
- import './countdown-section-c65cff2d.js';
19
+ import './countdown-section-281fb6b0.js';
20
20
  import '@alfalab/core-components-button/esm';
21
- import '@alfalab/core-components-loader/esm';
21
+ import '@alfalab/core-components-spinner/esm';
22
22
  import './components/screens/hint/component.js';
23
23
  import './components/screens/fatal-error/component.js';
24
24
  import './components/screens/temp-block/component.js';
@@ -15,12 +15,12 @@ import '@alfalab/core-components-code-input/esm/mobile';
15
15
  import '@alfalab/core-components-link/esm';
16
16
  import '@alfalab/core-components-typography/esm';
17
17
  import '../header/component.js';
18
- import '../../countdown-section-c65cff2d.js';
18
+ import '../../countdown-section-281fb6b0.js';
19
19
  import '@alfalab/core-components-button/esm';
20
- import '@alfalab/core-components-loader/esm';
20
+ import '@alfalab/core-components-spinner/esm';
21
21
  import '../countdown-loader/component.js';
22
22
 
23
- var styles = {"component":"confirmation__component_19xfa"};
23
+ var styles = {"component":"confirmation__component_1yhgb"};
24
24
  require('./index.css')
25
25
 
26
26
  var confirmationScreens = {
@@ -30,7 +30,7 @@ var confirmationScreens = {
30
30
  TEMP_BLOCK: TempBlock,
31
31
  };
32
32
  var BaseConfirmation = function (_a) {
33
- var state = _a.state, screen = _a.screen, _b = _a.alignContent, alignContent = _b === void 0 ? 'left' : _b; _a.children; var _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, _f = _a.clearCodeOnError, clearCodeOnError = _f === void 0 ? true : _f, _g = _a.hideCountdownSection, hideCountdownSection = _g === void 0 ? false : _g, _h = _a.breakpoint, breakpoint = _h === void 0 ? 1024 : _h, restProps = __rest(_a, ["state", "screen", "alignContent", "children", "requiredCharAmount", "countdownDuration", "tempBlockDuration", "phone", "blockSmsRetry", "dataTestId", "className", "getScreensMap", "onInputFinished", "onChangeState", "onSmsRetryClick", "onChangeScreen", "onFatalErrorOkButtonClick", "onTempBlockFinished", "mobile", "clearCodeOnError", "hideCountdownSection", "breakpoint"]);
33
+ var state = _a.state, screen = _a.screen, _b = _a.alignContent, alignContent = _b === void 0 ? 'left' : _b; _a.children; var _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, _f = _a.clearCodeOnError, clearCodeOnError = _f === void 0 ? true : _f, _g = _a.hideCountdownSection, hideCountdownSection = _g === void 0 ? false : _g, _h = _a.breakpoint, breakpoint = _h === void 0 ? 1024 : _h, initialScreenHintSlot = _a.initialScreenHintSlot, restProps = __rest(_a, ["state", "screen", "alignContent", "children", "requiredCharAmount", "countdownDuration", "tempBlockDuration", "phone", "blockSmsRetry", "dataTestId", "className", "getScreensMap", "onInputFinished", "onChangeState", "onSmsRetryClick", "onChangeScreen", "onFatalErrorOkButtonClick", "onTempBlockFinished", "mobile", "clearCodeOnError", "hideCountdownSection", "breakpoint", "initialScreenHintSlot"]);
34
34
  var _j = useCountdown(countdownDuration), timeLeft = _j[0], startTimer = _j[1], stopTimer = _j[2];
35
35
  var prevState = usePrevious(state);
36
36
  useEffect(function () {
@@ -83,6 +83,7 @@ var BaseConfirmation = function (_a) {
83
83
  onChangeState: onChangeState,
84
84
  onChangeScreen: onChangeScreen,
85
85
  clearCodeOnError: clearCodeOnError,
86
+ initialScreenHintSlot: initialScreenHintSlot,
86
87
  onInputFinished: handleInputFinished,
87
88
  onSmsRetryClick: handleSmsRetry,
88
89
  onFatalErrorOkButtonClick: handleFatalErrorOkButtonClick,
@@ -1,4 +1,4 @@
1
- /* hash: sufuv */
1
+ /* hash: 1iqd6 */
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_19xfa {
18
+ } .confirmation__component_1yhgb {
19
19
  width: 100%;
20
20
  max-width: 388px;
21
21
  margin: 0 auto;
@@ -13,9 +13,9 @@ import '@alfalab/core-components-code-input/esm/mobile';
13
13
  import '@alfalab/core-components-link/esm';
14
14
  import '@alfalab/core-components-typography/esm';
15
15
  import '../header/component.js';
16
- import '../../countdown-section-c65cff2d.js';
16
+ import '../../countdown-section-281fb6b0.js';
17
17
  import '@alfalab/core-components-button/esm';
18
- import '@alfalab/core-components-loader/esm';
18
+ import '@alfalab/core-components-spinner/esm';
19
19
  import '../screens/hint/component.js';
20
20
  import '../screens/fatal-error/component.js';
21
21
  import '../screens/temp-block/component.js';
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
 
3
- var styles = {"circle":"confirmation__circle_fzyku"};
3
+ var styles = {"circle":"confirmation__circle_1chjs"};
4
4
  require('./index.css')
5
5
 
6
6
  var SIZE = 16;
@@ -1,4 +1,4 @@
1
- /* hash: 10yuu */
1
+ /* hash: f2gll */
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_fzyku {
18
+ } .confirmation__circle_1chjs {
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/esm';
4
4
 
5
- var styles = {"header":"confirmation__header_2zjkj","typography":"confirmation__typography_2zjkj","typographyMobile":"confirmation__typographyMobile_2zjkj"};
5
+ var styles = {"header":"confirmation__header_1ta4c","typography":"confirmation__typography_1ta4c","typographyMobile":"confirmation__typographyMobile_1ta4c"};
6
6
  require('./index.css')
7
7
 
8
8
  var Header = function (_a) {
@@ -1,4 +1,4 @@
1
- /* hash: e6d4i */
1
+ /* hash: 9etnx */
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_2zjkj.confirmation__header_2zjkj {
37
+ } .confirmation__header_1ta4c.confirmation__header_1ta4c {
38
38
  margin-bottom: var(--gap-xl);
39
- } .confirmation__typography_2zjkj.confirmation__typography_2zjkj.confirmation__typography_2zjkj {
39
+ } .confirmation__typography_1ta4c.confirmation__typography_1ta4c.confirmation__typography_1ta4c {
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_2zjkj.confirmation__typographyMobile_2zjkj.confirmation__typographyMobile_2zjkj {
45
+ } .confirmation__typographyMobile_1ta4c.confirmation__typographyMobile_1ta4c.confirmation__typographyMobile_1ta4c {
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);
@@ -14,6 +14,6 @@ import '@alfalab/hooks';
14
14
  import '../context.js';
15
15
  import '../utils.js';
16
16
  import './header/component.js';
17
- import '../countdown-section-c65cff2d.js';
17
+ import '../countdown-section-281fb6b0.js';
18
18
  import '@alfalab/core-components-button/esm';
19
- import '@alfalab/core-components-loader/esm';
19
+ import '@alfalab/core-components-spinner/esm';
@@ -6,7 +6,7 @@ import { ConfirmationContext } from '../../../context.js';
6
6
  import { Header } from '../../header/component.js';
7
7
  import '../../../utils.js';
8
8
 
9
- var styles = {"component":"confirmation__component_1jo59","typographyTheme":"confirmation__typographyTheme_1jo59","left":"confirmation__left_1jo59","center":"confirmation__center_1jo59","button":"confirmation__button_1jo59"};
9
+ var styles = {"component":"confirmation__component_1gd41","typographyTheme":"confirmation__typographyTheme_1gd41","left":"confirmation__left_1gd41","center":"confirmation__center_1gd41","button":"confirmation__button_1gd41"};
10
10
  require('./index.css')
11
11
 
12
12
  var FatalError = function (_a) {
@@ -1,4 +1,4 @@
1
- /* hash: nzd2y */
1
+ /* hash: 1fzts */
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_1jo59 {
34
+ } .confirmation__component_1gd41 {
35
35
  display: flex;
36
36
  flex-direction: column;
37
- } .confirmation__typographyTheme_1jo59.confirmation__typographyTheme_1jo59 {
37
+ } .confirmation__typographyTheme_1gd41.confirmation__typographyTheme_1gd41 {
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_1jo59 {
43
+ } .confirmation__left_1gd41 {
44
44
  align-items: flex-start;
45
- } .confirmation__center_1jo59 {
45
+ } .confirmation__center_1gd41 {
46
46
  align-items: center;
47
47
  text-align: center;
48
- } .confirmation__button_1jo59 {
48
+ } .confirmation__button_1gd41 {
49
49
  margin-top: var(--gap-2xl);
50
50
  }
@@ -7,7 +7,7 @@ import { ConfirmationContext } from '../../../context.js';
7
7
  import { Header } from '../../header/component.js';
8
8
  import '../../../utils.js';
9
9
 
10
- var 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"};
10
+ var styles = {"component":"confirmation__component_1qmb5","center":"confirmation__center_1qmb5","text":"confirmation__text_1qmb5","typographyTheme":"confirmation__typographyTheme_1qmb5","phonesWrap":"confirmation__phonesWrap_1qmb5","phoneWrap":"confirmation__phoneWrap_1qmb5","phoneLink":"confirmation__phoneLink_1qmb5","hintButton":"confirmation__hintButton_1qmb5","phoneContentMobile":"confirmation__phoneContentMobile_1qmb5"};
11
11
  require('./index.css')
12
12
 
13
13
  var Hint = function (_a) {
@@ -1,4 +1,4 @@
1
- /* hash: 17pax */
1
+ /* hash: vc4ds */
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_kde6d {
36
+ } .confirmation__component_1qmb5 {
37
37
  display: flex;
38
38
  flex-direction: column;
39
39
  align-items: flex-start
40
- } .confirmation__component_kde6d span:last-of-type {
40
+ } .confirmation__component_1qmb5 span:last-of-type {
41
41
  margin-bottom: 0;
42
- } .confirmation__center_kde6d {
42
+ } .confirmation__center_1qmb5 {
43
43
  align-items: center;
44
44
  text-align: center;
45
- } .confirmation__text_kde6d.confirmation__text_kde6d {
45
+ } .confirmation__text_1qmb5.confirmation__text_1qmb5 {
46
46
  margin-bottom: var(--gap-xl);
47
- } .confirmation__typographyTheme_kde6d.confirmation__typographyTheme_kde6d {
47
+ } .confirmation__typographyTheme_1qmb5.confirmation__typographyTheme_1qmb5 {
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_kde6d {
53
+ } .confirmation__phonesWrap_1qmb5 {
54
54
  display: flex;
55
55
  flex-direction: column;
56
56
  margin-bottom: var(--gap-xl);
57
- } .confirmation__phoneWrap_kde6d {
57
+ } .confirmation__phoneWrap_1qmb5 {
58
58
  margin-bottom: var(--gap-xs)
59
- } .confirmation__phoneWrap_kde6d:last-child {
59
+ } .confirmation__phoneWrap_1qmb5:last-child {
60
60
  margin-bottom: 0;
61
- } .confirmation__phoneLink_kde6d.confirmation__phoneLink_kde6d {
61
+ } .confirmation__phoneLink_1qmb5.confirmation__phoneLink_1qmb5 {
62
62
  font-size: 16px;
63
63
  line-height: 24px;
64
64
  font-weight: 500;
65
- } .confirmation__hintButton_kde6d {
65
+ } .confirmation__hintButton_1qmb5 {
66
66
  margin-top: var(--gap-2xl);
67
- } .confirmation__phoneContentMobile_kde6d {
67
+ } .confirmation__phoneContentMobile_1qmb5 {
68
68
  display: flex;
69
69
  flex-direction: column;
70
70
  align-items: center;
@@ -13,7 +13,7 @@ import '@alfalab/hooks';
13
13
  import '../../context.js';
14
14
  import '../../utils.js';
15
15
  import '../header/component.js';
16
- import '../../countdown-section-c65cff2d.js';
16
+ import '../../countdown-section-281fb6b0.js';
17
17
  import '@alfalab/core-components-button/esm';
18
- import '@alfalab/core-components-loader/esm';
18
+ import '@alfalab/core-components-spinner/esm';
19
19
  import '../countdown-loader/component.js';
@@ -8,16 +8,16 @@ import { Typography } from '@alfalab/core-components-typography/esm';
8
8
  import { usePrevious } from '@alfalab/hooks';
9
9
  import { ConfirmationContext } from '../../../context.js';
10
10
  import { Header } from '../../header/component.js';
11
- import { s as styles, C as CountdownSection } from '../../../countdown-section-c65cff2d.js';
11
+ import { s as styles, C as CountdownSection } from '../../../countdown-section-281fb6b0.js';
12
12
  import '../../../utils.js';
13
13
  import '@alfalab/core-components-button/esm';
14
- import '@alfalab/core-components-loader/esm';
14
+ import '@alfalab/core-components-spinner/esm';
15
15
 
16
16
  var CODE_SEND_HINT_VISIBLE_DURATION = 2000;
17
17
  var Initial = function (_a) {
18
18
  var _b;
19
19
  var mobile = _a.mobile;
20
- 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, hideCountdownSection = _c.hideCountdownSection, onChangeState = _c.onChangeState, onInputFinished = _c.onInputFinished, onChangeScreen = _c.onChangeScreen, onSmsRetryClick = _c.onSmsRetryClick;
20
+ 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, hideCountdownSection = _c.hideCountdownSection, initialScreenHintSlot = _c.initialScreenHintSlot, onChangeState = _c.onChangeState, onInputFinished = _c.onInputFinished, onChangeScreen = _c.onChangeScreen, onSmsRetryClick = _c.onSmsRetryClick;
21
21
  var prevState = usePrevious(state);
22
22
  var inputRef = useRef(null);
23
23
  var _d = useState(false), codeSendHintVisible = _d[0], setCodeSendHintVisible = _d[1];
@@ -81,6 +81,15 @@ var Initial = function (_a) {
81
81
  }
82
82
  return false;
83
83
  };
84
+ var renderHintButton = function () {
85
+ if (initialScreenHintSlot) {
86
+ return initialScreenHintSlot;
87
+ }
88
+ if (mobile) {
89
+ return (React.createElement(ButtonMobile, { onClick: handleSmsHintLinkClick, view: 'link', size: 'xs' }, texts.linkToHint));
90
+ }
91
+ return (React.createElement(Link, { onClick: handleSmsHintLinkClick, className: styles.smsComeLink, view: mobile ? 'primary' : 'secondary', pseudo: true }, texts.linkToHint));
92
+ };
84
93
  var processing = ['CODE_CHECKING', 'CODE_SENDING'].includes(state);
85
94
  var timePassed = timeLeft === 0;
86
95
  var ComponentCodeInput = mobile ? CodeInputMobile : CodeInputDesktop;
@@ -91,7 +100,7 @@ var Initial = function (_a) {
91
100
  phone),
92
101
  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 }),
93
102
  !hideCountdownSection && (React.createElement(CountdownSection, { processing: processing, timePassed: timePassed, codeSendHintVisible: codeSendHintVisible, handleSmsRetryClick: handleSmsRetryClick, mobile: mobile })),
94
- 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))));
103
+ renderHintButton()));
95
104
  };
96
105
 
97
106
  export { Initial };
@@ -1,8 +1,8 @@
1
1
  import 'react';
2
2
  import 'classnames';
3
3
  import '@alfalab/core-components-button/esm';
4
- import '@alfalab/core-components-loader/esm';
4
+ import '@alfalab/core-components-spinner/esm';
5
5
  import '@alfalab/core-components-typography/esm';
6
6
  import '../../../context.js';
7
7
  import '../../../utils.js';
8
- export { C as CountdownSection } from '../../../countdown-section-c65cff2d.js';
8
+ export { C as CountdownSection } from '../../../countdown-section-281fb6b0.js';