@alfalab/core-components-confirmation 9.0.7 → 10.1.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.
- package/CHANGELOG.md +57 -0
- package/dist/component.d.ts +4 -164
- package/dist/component.js +113 -101
- package/dist/components/countdown-loader/component.d.ts +1 -1
- package/dist/components/countdown-loader/component.js +1 -1
- package/dist/components/countdown-loader/index.css +2 -2
- package/dist/components/index.d.ts +1 -3
- package/dist/components/index.js +15 -14
- package/dist/components/screens/fatal-error/component.d.ts +3 -0
- package/dist/components/screens/fatal-error/component.js +25 -0
- package/dist/components/screens/fatal-error/index.css +61 -0
- package/dist/components/{code-input → screens/fatal-error}/index.d.ts +0 -0
- package/dist/components/screens/fatal-error/index.js +13 -0
- package/dist/components/screens/hint/component.d.ts +3 -0
- package/dist/components/screens/hint/component.js +45 -0
- package/dist/components/screens/hint/index.css +103 -0
- package/dist/components/{countdown → screens/hint}/index.d.ts +0 -0
- package/dist/components/screens/hint/index.js +15 -0
- package/dist/components/screens/index.d.ts +4 -0
- package/dist/components/screens/index.js +26 -0
- package/dist/components/screens/initial/component.d.ts +3 -0
- package/dist/components/screens/initial/component.js +95 -0
- package/dist/components/screens/initial/countdown-section.d.ts +0 -0
- package/dist/components/screens/initial/countdown-section.js +15 -0
- package/dist/components/screens/initial/index.css +98 -0
- package/dist/components/{overlimit → screens/initial}/index.d.ts +0 -0
- package/dist/components/screens/initial/index.js +19 -0
- package/dist/components/screens/temp-block/component.d.ts +3 -0
- package/dist/components/screens/temp-block/component.js +36 -0
- package/dist/components/{overlimit → screens/temp-block}/index.css +9 -31
- package/dist/components/{sign-confirmation → screens/temp-block}/index.d.ts +0 -0
- package/dist/components/screens/temp-block/index.js +13 -0
- package/dist/context.d.ts +4 -0
- package/dist/context.js +27 -0
- package/dist/countdown-section-4cb91876.d.ts +9 -0
- package/dist/countdown-section-4cb91876.js +41 -0
- package/dist/cssm/component.d.ts +4 -164
- package/dist/cssm/component.js +115 -103
- package/dist/cssm/components/countdown-loader/component.d.ts +1 -1
- package/dist/cssm/components/index.d.ts +1 -3
- package/dist/cssm/components/index.js +19 -18
- package/dist/cssm/components/screens/fatal-error/component.d.ts +3 -0
- package/dist/cssm/components/screens/fatal-error/component.js +24 -0
- package/dist/cssm/components/{code-input → screens/fatal-error}/index.d.ts +0 -0
- package/dist/cssm/components/screens/fatal-error/index.js +14 -0
- package/dist/cssm/components/screens/fatal-error/index.module.css +60 -0
- package/dist/cssm/components/screens/hint/component.d.ts +3 -0
- package/dist/cssm/components/screens/hint/component.js +44 -0
- package/dist/cssm/components/{countdown → screens/hint}/index.d.ts +0 -0
- package/dist/cssm/components/screens/hint/index.js +16 -0
- package/dist/cssm/components/screens/hint/index.module.css +102 -0
- package/dist/cssm/components/screens/index.d.ts +4 -0
- package/dist/cssm/components/screens/index.js +31 -0
- package/dist/cssm/components/screens/initial/component.d.ts +3 -0
- package/dist/cssm/components/screens/initial/component.js +97 -0
- package/dist/cssm/components/screens/initial/countdown-section.d.ts +9 -0
- package/dist/cssm/components/screens/initial/countdown-section.js +41 -0
- package/dist/cssm/components/{overlimit → screens/initial}/index.d.ts +0 -0
- package/dist/cssm/components/screens/initial/index.js +20 -0
- package/dist/cssm/components/{sign-confirmation → screens/initial}/index.module.css +40 -50
- package/dist/cssm/components/screens/temp-block/component.d.ts +3 -0
- package/dist/cssm/components/screens/temp-block/component.js +36 -0
- package/dist/cssm/components/{sign-confirmation → screens/temp-block}/index.d.ts +0 -0
- package/dist/cssm/components/screens/temp-block/index.js +15 -0
- package/dist/cssm/components/{overlimit → screens/temp-block}/index.module.css +6 -28
- package/dist/cssm/context.d.ts +4 -0
- package/dist/cssm/context.js +27 -0
- package/dist/cssm/index.d.ts +3 -0
- package/dist/cssm/index.js +29 -20
- package/dist/cssm/index.module.css +5 -77
- package/dist/cssm/types.d.ts +130 -0
- package/dist/cssm/types.js +23 -0
- package/dist/cssm/utils.d.ts +30 -0
- package/dist/cssm/utils.js +84 -0
- package/dist/esm/component.d.ts +4 -164
- package/dist/esm/component.js +114 -102
- package/dist/esm/components/countdown-loader/component.d.ts +1 -1
- package/dist/esm/components/countdown-loader/component.js +1 -1
- package/dist/esm/components/countdown-loader/index.css +2 -2
- package/dist/esm/components/index.d.ts +1 -3
- package/dist/esm/components/index.js +11 -10
- package/dist/esm/components/screens/fatal-error/component.d.ts +3 -0
- package/dist/esm/components/screens/fatal-error/component.js +17 -0
- package/dist/esm/components/screens/fatal-error/index.css +61 -0
- package/dist/esm/components/{code-input → screens/fatal-error}/index.d.ts +0 -0
- package/dist/esm/components/screens/fatal-error/index.js +5 -0
- package/dist/esm/components/screens/hint/component.d.ts +3 -0
- package/dist/esm/components/screens/hint/component.js +36 -0
- package/dist/esm/components/screens/hint/index.css +103 -0
- package/dist/esm/components/{countdown → screens/hint}/index.d.ts +0 -0
- package/dist/esm/components/screens/hint/index.js +7 -0
- package/dist/esm/components/screens/index.d.ts +4 -0
- package/dist/esm/components/screens/index.js +15 -0
- package/dist/esm/components/screens/initial/component.d.ts +3 -0
- package/dist/esm/components/screens/initial/component.js +86 -0
- package/dist/esm/components/screens/initial/countdown-section.d.ts +0 -0
- package/dist/esm/components/screens/initial/countdown-section.js +7 -0
- package/dist/esm/components/screens/initial/index.css +98 -0
- package/dist/esm/components/{overlimit → screens/initial}/index.d.ts +0 -0
- package/dist/esm/components/screens/initial/index.js +11 -0
- package/dist/esm/components/screens/temp-block/component.d.ts +3 -0
- package/dist/esm/components/screens/temp-block/component.js +28 -0
- package/dist/{modern/components/overlimit → esm/components/screens/temp-block}/index.css +9 -31
- package/dist/esm/components/{sign-confirmation → screens/temp-block}/index.d.ts +0 -0
- package/dist/esm/components/screens/temp-block/index.js +5 -0
- package/dist/esm/context.d.ts +4 -0
- package/dist/esm/context.js +23 -0
- package/dist/esm/countdown-section-7f4accdc.d.ts +9 -0
- package/dist/esm/countdown-section-7f4accdc.js +33 -0
- package/dist/esm/index.css +7 -79
- package/dist/esm/index.d.ts +3 -0
- package/dist/esm/index.js +13 -11
- package/dist/esm/types.d.ts +130 -0
- package/dist/esm/types.js +19 -0
- package/dist/esm/utils.d.ts +30 -0
- package/dist/esm/utils.js +76 -0
- package/dist/index.css +7 -79
- package/dist/index.d.ts +3 -0
- package/dist/index.js +25 -16
- package/dist/modern/component.d.ts +4 -164
- package/dist/modern/component.js +75 -102
- package/dist/modern/components/countdown-loader/component.d.ts +1 -1
- package/dist/modern/components/countdown-loader/component.js +1 -1
- package/dist/modern/components/countdown-loader/index.css +2 -2
- package/dist/modern/components/index.d.ts +1 -3
- package/dist/modern/components/index.js +11 -10
- package/dist/modern/components/screens/fatal-error/component.d.ts +3 -0
- package/dist/modern/components/screens/fatal-error/component.js +17 -0
- package/dist/modern/components/screens/fatal-error/index.css +61 -0
- package/dist/modern/components/{code-input → screens/fatal-error}/index.d.ts +0 -0
- package/dist/modern/components/screens/fatal-error/index.js +5 -0
- package/dist/modern/components/screens/hint/component.d.ts +3 -0
- package/dist/modern/components/screens/hint/component.js +36 -0
- package/dist/modern/components/screens/hint/index.css +103 -0
- package/dist/modern/components/{countdown → screens/hint}/index.d.ts +0 -0
- package/dist/modern/components/screens/hint/index.js +7 -0
- package/dist/modern/components/screens/index.d.ts +4 -0
- package/dist/modern/components/screens/index.js +15 -0
- package/dist/modern/components/screens/initial/component.d.ts +3 -0
- package/dist/modern/components/screens/initial/component.js +86 -0
- package/dist/modern/components/screens/initial/countdown-section.d.ts +0 -0
- package/dist/modern/components/screens/initial/countdown-section.js +7 -0
- package/dist/modern/components/screens/initial/index.css +98 -0
- package/dist/modern/components/{overlimit → screens/initial}/index.d.ts +0 -0
- package/dist/modern/components/screens/initial/index.js +11 -0
- package/dist/modern/components/screens/temp-block/component.d.ts +3 -0
- package/dist/modern/components/screens/temp-block/component.js +28 -0
- package/dist/{esm/components/overlimit → modern/components/screens/temp-block}/index.css +9 -31
- package/dist/modern/components/{sign-confirmation → screens/temp-block}/index.d.ts +0 -0
- package/dist/modern/components/screens/temp-block/index.js +5 -0
- package/dist/modern/context.d.ts +4 -0
- package/dist/modern/context.js +23 -0
- package/dist/modern/countdown-section-2c8a29e0.d.ts +9 -0
- package/dist/modern/countdown-section-2c8a29e0.js +32 -0
- package/dist/modern/index.css +7 -79
- package/dist/modern/index.d.ts +3 -0
- package/dist/modern/index.js +12 -10
- package/dist/modern/types.d.ts +130 -0
- package/dist/modern/types.js +19 -0
- package/dist/modern/utils.d.ts +30 -0
- package/dist/modern/utils.js +74 -0
- package/dist/types.d.ts +130 -0
- package/dist/types.js +23 -0
- package/dist/utils.d.ts +30 -0
- package/dist/utils.js +84 -0
- package/package.json +4 -3
- package/dist/components/code-input/component.d.ts +0 -16
- package/dist/components/code-input/component.js +0 -160
- package/dist/components/code-input/index.css +0 -99
- package/dist/components/code-input/index.js +0 -13
- package/dist/components/code-input/utils.d.ts +0 -10
- package/dist/components/code-input/utils.js +0 -21
- package/dist/components/countdown/component.d.ts +0 -23
- package/dist/components/countdown/component.js +0 -117
- package/dist/components/countdown/index.css +0 -85
- package/dist/components/countdown/index.js +0 -16
- package/dist/components/overlimit/component.d.ts +0 -12
- package/dist/components/overlimit/component.js +0 -73
- package/dist/components/overlimit/index.js +0 -17
- package/dist/components/sign-confirmation/component.d.ts +0 -37
- package/dist/components/sign-confirmation/component.js +0 -62
- package/dist/components/sign-confirmation/index.css +0 -108
- package/dist/components/sign-confirmation/index.js +0 -20
- package/dist/cssm/components/code-input/component.d.ts +0 -16
- package/dist/cssm/components/code-input/component.js +0 -159
- package/dist/cssm/components/code-input/index.js +0 -14
- package/dist/cssm/components/code-input/index.module.css +0 -98
- package/dist/cssm/components/code-input/utils.d.ts +0 -10
- package/dist/cssm/components/code-input/utils.js +0 -21
- package/dist/cssm/components/countdown/component.d.ts +0 -23
- package/dist/cssm/components/countdown/component.js +0 -117
- package/dist/cssm/components/countdown/index.js +0 -18
- package/dist/cssm/components/countdown/index.module.css +0 -84
- package/dist/cssm/components/overlimit/component.d.ts +0 -12
- package/dist/cssm/components/overlimit/component.js +0 -74
- package/dist/cssm/components/overlimit/index.js +0 -20
- package/dist/cssm/components/sign-confirmation/component.d.ts +0 -37
- package/dist/cssm/components/sign-confirmation/component.js +0 -64
- package/dist/cssm/components/sign-confirmation/index.js +0 -24
- package/dist/esm/components/code-input/component.d.ts +0 -16
- package/dist/esm/components/code-input/component.js +0 -151
- package/dist/esm/components/code-input/index.css +0 -99
- package/dist/esm/components/code-input/index.js +0 -5
- package/dist/esm/components/code-input/utils.d.ts +0 -10
- package/dist/esm/components/code-input/utils.js +0 -17
- package/dist/esm/components/countdown/component.d.ts +0 -23
- package/dist/esm/components/countdown/component.js +0 -107
- package/dist/esm/components/countdown/index.css +0 -85
- package/dist/esm/components/countdown/index.js +0 -7
- package/dist/esm/components/overlimit/component.d.ts +0 -12
- package/dist/esm/components/overlimit/component.js +0 -65
- package/dist/esm/components/overlimit/index.js +0 -9
- package/dist/esm/components/sign-confirmation/component.d.ts +0 -37
- package/dist/esm/components/sign-confirmation/component.js +0 -53
- package/dist/esm/components/sign-confirmation/index.css +0 -108
- package/dist/esm/components/sign-confirmation/index.js +0 -12
- package/dist/modern/components/code-input/component.d.ts +0 -16
- package/dist/modern/components/code-input/component.js +0 -123
- package/dist/modern/components/code-input/index.css +0 -99
- package/dist/modern/components/code-input/index.js +0 -5
- package/dist/modern/components/code-input/utils.d.ts +0 -10
- package/dist/modern/components/code-input/utils.js +0 -16
- package/dist/modern/components/countdown/component.d.ts +0 -23
- package/dist/modern/components/countdown/component.js +0 -102
- package/dist/modern/components/countdown/index.css +0 -85
- package/dist/modern/components/countdown/index.js +0 -7
- package/dist/modern/components/overlimit/component.d.ts +0 -12
- package/dist/modern/components/overlimit/component.js +0 -64
- package/dist/modern/components/overlimit/index.js +0 -9
- package/dist/modern/components/sign-confirmation/component.d.ts +0 -37
- package/dist/modern/components/sign-confirmation/component.js +0 -51
- package/dist/modern/components/sign-confirmation/index.css +0 -108
- package/dist/modern/components/sign-confirmation/index.js +0 -12
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* Начиная с указанного индекса, заменяет элементы исходного массива
|
|
7
|
-
*/
|
|
8
|
-
var mergeArrays = function (_a) {
|
|
9
|
-
var sourceArray = _a.sourceArray, targetArray = _a.targetArray, startIndex = _a.startIndex, resultArrayLength = _a.resultArrayLength;
|
|
10
|
-
var insertedElemIndex = 0;
|
|
11
|
-
var result = new Array(resultArrayLength).fill('');
|
|
12
|
-
return result.map(function (_, index) {
|
|
13
|
-
if (index < startIndex) {
|
|
14
|
-
return sourceArray[index] || '';
|
|
15
|
-
}
|
|
16
|
-
// eslint-disable-next-line no-plusplus
|
|
17
|
-
return targetArray[insertedElemIndex++] || sourceArray[index] || '';
|
|
18
|
-
});
|
|
19
|
-
};
|
|
20
|
-
|
|
21
|
-
exports.mergeArrays = mergeArrays;
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { MouseEvent, FC, ReactNode } from 'react';
|
|
2
|
-
/**
|
|
3
|
-
* TODO: Вынести это в utils
|
|
4
|
-
* Форматирование миллисекунд в hh:mm:ss.
|
|
5
|
-
*
|
|
6
|
-
* @param {Number} ms миллисекунды
|
|
7
|
-
* @returns {String} время в формате mm:ss
|
|
8
|
-
*/
|
|
9
|
-
declare function formatMsAsMinutes(ms: number): string;
|
|
10
|
-
type CountdownProps = {
|
|
11
|
-
duration: number;
|
|
12
|
-
hasPhoneMask: boolean;
|
|
13
|
-
phone?: string;
|
|
14
|
-
alignContent: string;
|
|
15
|
-
buttonRetryText: string;
|
|
16
|
-
noAttemptsLeftMessage?: string;
|
|
17
|
-
hasError: boolean;
|
|
18
|
-
content?: ReactNode;
|
|
19
|
-
onCountdownFinished?: () => void;
|
|
20
|
-
onRepeatSms: (event: MouseEvent) => void;
|
|
21
|
-
};
|
|
22
|
-
declare const Countdown: FC<CountdownProps>;
|
|
23
|
-
export { formatMsAsMinutes, CountdownProps, Countdown };
|
|
@@ -1,117 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
var React = require('react');
|
|
6
|
-
var cn = require('classnames');
|
|
7
|
-
var coreComponentsButton = require('@alfalab/core-components-button');
|
|
8
|
-
var utils = require('@alfalab/utils');
|
|
9
|
-
var hooks = require('@alfalab/hooks');
|
|
10
|
-
var components_countdownLoader_component = require('../countdown-loader/component.js');
|
|
11
|
-
|
|
12
|
-
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
13
|
-
|
|
14
|
-
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
15
|
-
var cn__default = /*#__PURE__*/_interopDefaultLegacy(cn);
|
|
16
|
-
|
|
17
|
-
var styles = {"component":"confirmation__component_tecu4","hasError":"confirmation__hasError_tecu4","getCodeButton":"confirmation__getCodeButton_tecu4","info":"confirmation__info_tecu4","customContent":"confirmation__customContent_tecu4","loaderWrap":"confirmation__loaderWrap_tecu4","loader":"confirmation__loader_tecu4","center":"confirmation__center_tecu4","timePassed":"confirmation__timePassed_tecu4","noAttemptsLeftMessage":"confirmation__noAttemptsLeftMessage_tecu4"};
|
|
18
|
-
require('./index.css')
|
|
19
|
-
|
|
20
|
-
/**
|
|
21
|
-
* TODO: Вынести это в utils
|
|
22
|
-
* Форматирование миллисекунд в hh:mm:ss.
|
|
23
|
-
*
|
|
24
|
-
* @param {Number} ms миллисекунды
|
|
25
|
-
* @returns {String} время в формате mm:ss
|
|
26
|
-
*/
|
|
27
|
-
function formatMsAsMinutes(ms) {
|
|
28
|
-
var totalSeconds = Math.ceil(ms / 1000);
|
|
29
|
-
var totalMinutes = Math.floor(totalSeconds / 60);
|
|
30
|
-
var totalHours = Math.floor(totalMinutes / 60);
|
|
31
|
-
var seconds = totalSeconds % 60;
|
|
32
|
-
var paddedSeconds = ("00" + seconds).slice(-2);
|
|
33
|
-
if (totalHours > 0) {
|
|
34
|
-
var minutes = totalMinutes % 60;
|
|
35
|
-
var paddedMinutes_1 = ("00" + minutes).slice(-2);
|
|
36
|
-
var paddedHours = ("00" + totalHours).slice(-2);
|
|
37
|
-
return paddedHours + ":" + paddedMinutes_1 + ":" + paddedSeconds;
|
|
38
|
-
}
|
|
39
|
-
var paddedMinutes = ("00" + totalMinutes).slice(-2);
|
|
40
|
-
return paddedMinutes + ":" + paddedSeconds;
|
|
41
|
-
}
|
|
42
|
-
var Container = function (_a) {
|
|
43
|
-
var _b;
|
|
44
|
-
var alignContent = _a.alignContent, hasError = _a.hasError, children = _a.children;
|
|
45
|
-
return (React__default['default'].createElement("div", { className: cn__default['default'](styles.component, styles[alignContent], (_b = {},
|
|
46
|
-
_b[styles.hasError] = hasError,
|
|
47
|
-
_b)) }, children));
|
|
48
|
-
};
|
|
49
|
-
var Countdown = function (_a) {
|
|
50
|
-
var _b = _a.duration, duration = _b === void 0 ? 5000 : _b, _c = _a.phone, phone = _c === void 0 ? '' : _c, _d = _a.hasPhoneMask, hasPhoneMask = _d === void 0 ? true : _d, buttonRetryText = _a.buttonRetryText, alignContent = _a.alignContent, noAttemptsLeftMessage = _a.noAttemptsLeftMessage, hasError = _a.hasError, content = _a.content, onRepeatSms = _a.onRepeatSms, onCountdownFinished = _a.onCountdownFinished;
|
|
51
|
-
var timerId = React.useRef(0);
|
|
52
|
-
var start = React.useRef(0);
|
|
53
|
-
var _e = React.useState(false), repeatSmsButtonShow = _e[0], setRepeatSmsButtonShow = _e[1];
|
|
54
|
-
var _f = React.useState(0), timePassed = _f[0], setTimePassed = _f[1];
|
|
55
|
-
var noAttemptsLeftMessagePrev = hooks.usePrevious(noAttemptsLeftMessage);
|
|
56
|
-
var stopTimer = React.useCallback(function () {
|
|
57
|
-
window.clearInterval(timerId.current);
|
|
58
|
-
}, []);
|
|
59
|
-
var updateProgress = React.useCallback(function () {
|
|
60
|
-
var passed = Date.now() - start.current;
|
|
61
|
-
if (passed >= duration) {
|
|
62
|
-
setRepeatSmsButtonShow(true);
|
|
63
|
-
if (onCountdownFinished) {
|
|
64
|
-
onCountdownFinished();
|
|
65
|
-
}
|
|
66
|
-
stopTimer();
|
|
67
|
-
}
|
|
68
|
-
else {
|
|
69
|
-
setTimePassed(passed);
|
|
70
|
-
}
|
|
71
|
-
}, [duration, onCountdownFinished, stopTimer]);
|
|
72
|
-
var startTimer = React.useCallback(function () {
|
|
73
|
-
start.current = Date.now();
|
|
74
|
-
updateProgress();
|
|
75
|
-
timerId.current = window.setInterval(updateProgress, 50);
|
|
76
|
-
}, [updateProgress]);
|
|
77
|
-
var handleRepeatSmsButtonClick = React.useCallback(function (event) {
|
|
78
|
-
setRepeatSmsButtonShow(false);
|
|
79
|
-
if (onRepeatSms) {
|
|
80
|
-
onRepeatSms(event);
|
|
81
|
-
}
|
|
82
|
-
startTimer();
|
|
83
|
-
}, [onRepeatSms, startTimer]);
|
|
84
|
-
React.useEffect(function () {
|
|
85
|
-
startTimer();
|
|
86
|
-
return function () {
|
|
87
|
-
stopTimer();
|
|
88
|
-
};
|
|
89
|
-
}, [startTimer, stopTimer]);
|
|
90
|
-
React.useEffect(function () {
|
|
91
|
-
// Если кончились попытки ввода кода, то останавливаем таймер
|
|
92
|
-
if (!noAttemptsLeftMessagePrev && noAttemptsLeftMessage) {
|
|
93
|
-
stopTimer();
|
|
94
|
-
}
|
|
95
|
-
}, [noAttemptsLeftMessage, noAttemptsLeftMessagePrev, stopTimer]);
|
|
96
|
-
var progress = timePassed / duration;
|
|
97
|
-
var formattedPhone = utils.phoneNumber.format(phone);
|
|
98
|
-
var retryButton = (React__default['default'].createElement(coreComponentsButton.Button, { size: 'xs', view: 'secondary', onClick: handleRepeatSmsButtonClick, className: styles.getCodeButton }, buttonRetryText));
|
|
99
|
-
if (content) {
|
|
100
|
-
return (React__default['default'].createElement(Container, { alignContent: alignContent, hasError: hasError },
|
|
101
|
-
React__default['default'].createElement("div", { className: styles.customContent }, content),
|
|
102
|
-
retryButton));
|
|
103
|
-
}
|
|
104
|
-
return (React__default['default'].createElement(Container, { alignContent: alignContent, hasError: hasError },
|
|
105
|
-
phone && !hasError && (React__default['default'].createElement("div", null,
|
|
106
|
-
"\u041A\u043E\u0434 \u043E\u0442\u043F\u0440\u0430\u0432\u043B\u0435\u043D \u043D\u0430",
|
|
107
|
-
' ',
|
|
108
|
-
hasPhoneMask ? utils.phoneNumber.mask(formattedPhone) : formattedPhone)),
|
|
109
|
-
noAttemptsLeftMessage ? (React__default['default'].createElement("div", { className: styles.noAttemptsLeftMessage }, noAttemptsLeftMessage)) : repeatSmsButtonShow ? (retryButton) : (React__default['default'].createElement("div", null,
|
|
110
|
-
React__default['default'].createElement("div", { className: styles.info }, "\u0417\u0430\u043F\u0440\u043E\u0441\u0438\u0442\u044C \u043F\u043E\u0432\u0442\u043E\u0440\u043D\u043E \u043C\u043E\u0436\u043D\u043E \u0447\u0435\u0440\u0435\u0437"),
|
|
111
|
-
React__default['default'].createElement("div", { className: styles.loaderWrap },
|
|
112
|
-
React__default['default'].createElement(components_countdownLoader_component.CountdownLoader, { progress: progress, className: styles.loader }),
|
|
113
|
-
React__default['default'].createElement("div", { className: styles.timePassed }, formatMsAsMinutes(duration - timePassed)))))));
|
|
114
|
-
};
|
|
115
|
-
|
|
116
|
-
exports.Countdown = Countdown;
|
|
117
|
-
exports.formatMsAsMinutes = formatMsAsMinutes;
|
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
/* hash: 16vas */
|
|
2
|
-
:root {
|
|
3
|
-
--color-light-text-secondary: #546272;
|
|
4
|
-
}
|
|
5
|
-
:root {
|
|
6
|
-
|
|
7
|
-
/* Hard */
|
|
8
|
-
|
|
9
|
-
/* Up */
|
|
10
|
-
|
|
11
|
-
/* Hard up */
|
|
12
|
-
}
|
|
13
|
-
:root {
|
|
14
|
-
--gap-2xs: 4px;
|
|
15
|
-
--gap-xs: 8px;
|
|
16
|
-
--gap-2xl: 32px;
|
|
17
|
-
--gap-3xl: 40px;
|
|
18
|
-
}
|
|
19
|
-
:root {
|
|
20
|
-
--font-family-system: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Helvetica,
|
|
21
|
-
sans-serif;
|
|
22
|
-
}
|
|
23
|
-
:root {
|
|
24
|
-
/* title */
|
|
25
|
-
|
|
26
|
-
/* text */
|
|
27
|
-
--confirmation-text-font-size: 16px;
|
|
28
|
-
--confirmation-text-line-height: 24px;
|
|
29
|
-
--confirmation-text-font-weight: 400;
|
|
30
|
-
--confirmation-text-font-family: var(--font-family-system);
|
|
31
|
-
--confirmation-text-color: var(--color-light-text-secondary);
|
|
32
|
-
|
|
33
|
-
/* error */
|
|
34
|
-
|
|
35
|
-
/* input */
|
|
36
|
-
}
|
|
37
|
-
.confirmation__component_tecu4 {
|
|
38
|
-
font-size: var(--confirmation-text-font-size);
|
|
39
|
-
line-height: var(--confirmation-text-line-height);
|
|
40
|
-
font-weight: var(--confirmation-text-font-weight);
|
|
41
|
-
font-family: var(--confirmation-text-font-family);
|
|
42
|
-
color: var(--confirmation-text-color);
|
|
43
|
-
|
|
44
|
-
display: flex;
|
|
45
|
-
flex-direction: column;
|
|
46
|
-
align-items: flex-start;
|
|
47
|
-
margin-top: var(--gap-3xl);
|
|
48
|
-
color: var(--confirmation-text-color);
|
|
49
|
-
}
|
|
50
|
-
.confirmation__hasError_tecu4 .confirmation__getCodeButton_tecu4 {
|
|
51
|
-
margin-top: 0;
|
|
52
|
-
}
|
|
53
|
-
.confirmation__hasError_tecu4 .confirmation__info_tecu4 {
|
|
54
|
-
margin-top: 0;
|
|
55
|
-
}
|
|
56
|
-
.confirmation__hasError_tecu4 .confirmation__customContent_tecu4 {
|
|
57
|
-
margin-bottom: var(--gap-2xl);
|
|
58
|
-
}
|
|
59
|
-
.confirmation__info_tecu4 {
|
|
60
|
-
margin: var(--gap-2xs) 0;
|
|
61
|
-
}
|
|
62
|
-
.confirmation__loaderWrap_tecu4 {
|
|
63
|
-
display: flex;
|
|
64
|
-
align-items: center;
|
|
65
|
-
margin-bottom: var(--gap-xs);
|
|
66
|
-
}
|
|
67
|
-
.confirmation__loader_tecu4 {
|
|
68
|
-
margin-right: var(--gap-xs);
|
|
69
|
-
}
|
|
70
|
-
.confirmation__center_tecu4 {
|
|
71
|
-
align-items: center
|
|
72
|
-
}
|
|
73
|
-
.confirmation__center_tecu4 .confirmation__loaderWrap_tecu4 {
|
|
74
|
-
justify-content: center;
|
|
75
|
-
}
|
|
76
|
-
.confirmation__timePassed_tecu4 {
|
|
77
|
-
display: flex;
|
|
78
|
-
min-width: 3em;
|
|
79
|
-
}
|
|
80
|
-
.confirmation__getCodeButton_tecu4 {
|
|
81
|
-
margin-top: var(--gap-2xl);
|
|
82
|
-
}
|
|
83
|
-
.confirmation__noAttemptsLeftMessage_tecu4 {
|
|
84
|
-
margin: var(--gap-2xs) 0 var(--gap-xs);
|
|
85
|
-
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
require('react');
|
|
6
|
-
require('classnames');
|
|
7
|
-
require('@alfalab/core-components-button');
|
|
8
|
-
require('@alfalab/utils');
|
|
9
|
-
require('@alfalab/hooks');
|
|
10
|
-
require('../countdown-loader/component.js');
|
|
11
|
-
var components_countdown_component = require('./component.js');
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
exports.Countdown = components_countdown_component.Countdown;
|
|
16
|
-
exports.formatMsAsMinutes = components_countdown_component.formatMsAsMinutes;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { MouseEvent, FC } from 'react';
|
|
2
|
-
type OverlimitProps = {
|
|
3
|
-
duration?: number;
|
|
4
|
-
buttonRetryText: string;
|
|
5
|
-
hasFatalError: boolean;
|
|
6
|
-
title: string;
|
|
7
|
-
text: string;
|
|
8
|
-
onOverlimitCountdownFinished: () => void;
|
|
9
|
-
onOverlimitRepeatSms: (event: MouseEvent) => void;
|
|
10
|
-
};
|
|
11
|
-
declare const Overlimit: FC<OverlimitProps>;
|
|
12
|
-
export { OverlimitProps, Overlimit };
|
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
var React = require('react');
|
|
6
|
-
require('classnames');
|
|
7
|
-
var coreComponentsButton = require('@alfalab/core-components-button');
|
|
8
|
-
require('@alfalab/utils');
|
|
9
|
-
require('@alfalab/hooks');
|
|
10
|
-
var components_countdownLoader_component = require('../countdown-loader/component.js');
|
|
11
|
-
var components_countdown_component = require('../countdown/component.js');
|
|
12
|
-
var iconsGlyph = require('@alfalab/icons-glyph');
|
|
13
|
-
|
|
14
|
-
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
15
|
-
|
|
16
|
-
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
17
|
-
|
|
18
|
-
var styles = {"component":"confirmation__component_1iqq7","title":"confirmation__title_1iqq7","description":"confirmation__description_1iqq7","countdown":"confirmation__countdown_1iqq7","loader":"confirmation__loader_1iqq7","timePassed":"confirmation__timePassed_1iqq7","getCodeButton":"confirmation__getCodeButton_1iqq7","alertIcon":"confirmation__alertIcon_1iqq7"};
|
|
19
|
-
require('./index.css')
|
|
20
|
-
|
|
21
|
-
var Overlimit = function (_a) {
|
|
22
|
-
var _b = _a.duration, duration = _b === void 0 ? 60000 : _b, buttonRetryText = _a.buttonRetryText, hasFatalError = _a.hasFatalError, onOverlimitRepeatSms = _a.onOverlimitRepeatSms, onOverlimitCountdownFinished = _a.onOverlimitCountdownFinished, text = _a.text, title = _a.title;
|
|
23
|
-
var timerId = React.useRef(0);
|
|
24
|
-
var start = React.useRef(0);
|
|
25
|
-
var _c = React.useState(false), isBlockingOver = _c[0], setIsBlockingOver = _c[1];
|
|
26
|
-
var _d = React.useState(0), timePassed = _d[0], setTimePassed = _d[1];
|
|
27
|
-
var stopTimer = React.useCallback(function () {
|
|
28
|
-
window.clearInterval(timerId.current);
|
|
29
|
-
}, []);
|
|
30
|
-
var updateProgress = React.useCallback(function () {
|
|
31
|
-
var passed = Date.now() - start.current;
|
|
32
|
-
if (passed >= duration) {
|
|
33
|
-
setIsBlockingOver(true);
|
|
34
|
-
if (onOverlimitCountdownFinished) {
|
|
35
|
-
onOverlimitCountdownFinished();
|
|
36
|
-
}
|
|
37
|
-
stopTimer();
|
|
38
|
-
}
|
|
39
|
-
else {
|
|
40
|
-
setTimePassed(passed);
|
|
41
|
-
}
|
|
42
|
-
}, [duration, onOverlimitCountdownFinished, stopTimer]);
|
|
43
|
-
var startTimer = React.useCallback(function () {
|
|
44
|
-
start.current = Date.now();
|
|
45
|
-
updateProgress();
|
|
46
|
-
timerId.current = window.setInterval(updateProgress, 50);
|
|
47
|
-
}, [updateProgress]);
|
|
48
|
-
var handleRepeatSmsButtonClick = React.useCallback(function (event) {
|
|
49
|
-
setIsBlockingOver(false);
|
|
50
|
-
if (onOverlimitRepeatSms) {
|
|
51
|
-
onOverlimitRepeatSms(event);
|
|
52
|
-
}
|
|
53
|
-
startTimer();
|
|
54
|
-
}, [onOverlimitRepeatSms, startTimer]);
|
|
55
|
-
React.useEffect(function () {
|
|
56
|
-
startTimer();
|
|
57
|
-
return function () {
|
|
58
|
-
stopTimer();
|
|
59
|
-
};
|
|
60
|
-
}, [startTimer, stopTimer]);
|
|
61
|
-
var progress = timePassed / duration;
|
|
62
|
-
return (React__default['default'].createElement("div", { className: styles.component },
|
|
63
|
-
hasFatalError && (React__default['default'].createElement("div", { className: styles.alertIcon },
|
|
64
|
-
React__default['default'].createElement(iconsGlyph.CrossCircleMIcon, { "data-test-id": 'alert-icon', width: 64, height: 64 }))),
|
|
65
|
-
React__default['default'].createElement("span", { className: styles.title }, title),
|
|
66
|
-
React__default['default'].createElement("div", { className: styles.description },
|
|
67
|
-
React__default['default'].createElement("div", null, text),
|
|
68
|
-
isBlockingOver ? (React__default['default'].createElement(coreComponentsButton.Button, { size: 'xs', view: 'secondary', onClick: handleRepeatSmsButtonClick, className: styles.getCodeButton }, buttonRetryText)) : (React__default['default'].createElement("div", { className: styles.countdown },
|
|
69
|
-
React__default['default'].createElement(components_countdownLoader_component.CountdownLoader, { progress: progress, className: styles.loader }),
|
|
70
|
-
React__default['default'].createElement("div", { className: styles.timePassed }, components_countdown_component.formatMsAsMinutes(duration - timePassed)))))));
|
|
71
|
-
};
|
|
72
|
-
|
|
73
|
-
exports.Overlimit = Overlimit;
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
require('react');
|
|
6
|
-
require('classnames');
|
|
7
|
-
require('@alfalab/core-components-button');
|
|
8
|
-
require('@alfalab/utils');
|
|
9
|
-
require('@alfalab/hooks');
|
|
10
|
-
require('../countdown-loader/component.js');
|
|
11
|
-
require('../countdown/component.js');
|
|
12
|
-
require('@alfalab/icons-glyph');
|
|
13
|
-
var components_overlimit_component = require('./component.js');
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
exports.Overlimit = components_overlimit_component.Overlimit;
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import React from 'react';
|
|
3
|
-
import { FC, MutableRefObject, ReactNode } from "react";
|
|
4
|
-
import { ContentAlign } from "../../component";
|
|
5
|
-
type SignConfirmationProps = {
|
|
6
|
-
codeChecking: boolean;
|
|
7
|
-
codeSending: boolean;
|
|
8
|
-
smsHintVisible: boolean;
|
|
9
|
-
requiredCharAmount: number;
|
|
10
|
-
countdownDuration: number;
|
|
11
|
-
additionalContent: React.ReactNode;
|
|
12
|
-
hasPhoneMask: boolean;
|
|
13
|
-
phone?: string;
|
|
14
|
-
code: string;
|
|
15
|
-
errorText: string;
|
|
16
|
-
error: boolean;
|
|
17
|
-
title: string | React.ReactNode;
|
|
18
|
-
codeCheckingText: string;
|
|
19
|
-
codeSendingText: string;
|
|
20
|
-
hasSmsCountdown: boolean;
|
|
21
|
-
inputRef: MutableRefObject<HTMLInputElement | null>;
|
|
22
|
-
alignContent: ContentAlign;
|
|
23
|
-
noAttemptsLeftMessage?: string;
|
|
24
|
-
buttonRetryText: string;
|
|
25
|
-
countdownContent?: ReactNode;
|
|
26
|
-
onInputFinished: ({ code }: {
|
|
27
|
-
code: string;
|
|
28
|
-
}) => void;
|
|
29
|
-
onInputChange: ({ code }: {
|
|
30
|
-
code: string;
|
|
31
|
-
}) => void;
|
|
32
|
-
onSmsRetryClick: (event: React.MouseEvent) => void;
|
|
33
|
-
onCountdownFinished: () => void;
|
|
34
|
-
onSmsHintLinkClick: (event: React.MouseEvent) => void;
|
|
35
|
-
};
|
|
36
|
-
declare const SignConfirmation: FC<SignConfirmationProps>;
|
|
37
|
-
export { SignConfirmationProps, SignConfirmation };
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
var React = require('react');
|
|
6
|
-
var cn = require('classnames');
|
|
7
|
-
require('@alfalab/core-components-button');
|
|
8
|
-
var coreComponentsLink = require('@alfalab/core-components-link');
|
|
9
|
-
require('@alfalab/utils');
|
|
10
|
-
require('@alfalab/hooks');
|
|
11
|
-
require('../countdown-loader/component.js');
|
|
12
|
-
var components_countdown_component = require('../countdown/component.js');
|
|
13
|
-
var coreComponentsLoader = require('@alfalab/core-components-loader');
|
|
14
|
-
var components_codeInput_component = require('../code-input/component.js');
|
|
15
|
-
require('../code-input/utils.js');
|
|
16
|
-
|
|
17
|
-
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
18
|
-
|
|
19
|
-
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
20
|
-
var cn__default = /*#__PURE__*/_interopDefaultLegacy(cn);
|
|
21
|
-
|
|
22
|
-
var styles = {"component":"confirmation__component_srlhu","countdown":"confirmation__countdown_srlhu","hidden":"confirmation__hidden_srlhu","header":"confirmation__header_srlhu","inputContainer":"confirmation__inputContainer_srlhu","smsComeLinkWrap":"confirmation__smsComeLinkWrap_srlhu","smsComeLink":"confirmation__smsComeLink_srlhu","error":"confirmation__error_srlhu","loaderWrap":"confirmation__loaderWrap_srlhu","loaderText":"confirmation__loaderText_srlhu","center":"confirmation__center_srlhu","codeInput":"confirmation__codeInput_srlhu"};
|
|
23
|
-
require('./index.css')
|
|
24
|
-
|
|
25
|
-
var SignConfirmation = function (_a) {
|
|
26
|
-
var _b;
|
|
27
|
-
var codeChecking = _a.codeChecking, codeSending = _a.codeSending, smsHintVisible = _a.smsHintVisible, requiredCharAmount = _a.requiredCharAmount, countdownDuration = _a.countdownDuration, additionalContent = _a.additionalContent, hasPhoneMask = _a.hasPhoneMask, phone = _a.phone, inputValue = _a.code, error = _a.error, errorText = _a.errorText, title = _a.title, hasSmsCountdown = _a.hasSmsCountdown, inputRef = _a.inputRef, codeCheckingText = _a.codeCheckingText, codeSendingText = _a.codeSendingText, alignContent = _a.alignContent, noAttemptsLeftMessage = _a.noAttemptsLeftMessage, buttonRetryText = _a.buttonRetryText, countdownContent = _a.countdownContent, onInputFinished = _a.onInputFinished, onInputChange = _a.onInputChange, onSmsRetryClick = _a.onSmsRetryClick, onCountdownFinished = _a.onCountdownFinished, onSmsHintLinkClick = _a.onSmsHintLinkClick;
|
|
28
|
-
var processing = codeChecking || codeSending;
|
|
29
|
-
var displayedError = processing ? '' : errorText;
|
|
30
|
-
var handleInputKeyDown = React.useCallback(function (event) {
|
|
31
|
-
if (event.key === 'Enter') {
|
|
32
|
-
onInputFinished({ code: event.target.value });
|
|
33
|
-
}
|
|
34
|
-
}, [onInputFinished]);
|
|
35
|
-
var handleInputFinished = React.useCallback(function (code) {
|
|
36
|
-
onInputFinished({ code: code });
|
|
37
|
-
if (inputRef.current) {
|
|
38
|
-
inputRef.current.blur();
|
|
39
|
-
}
|
|
40
|
-
}, [onInputFinished, inputRef]);
|
|
41
|
-
var handleInputChange = React.useCallback(function (code) {
|
|
42
|
-
if (code.length === requiredCharAmount) {
|
|
43
|
-
handleInputFinished(code);
|
|
44
|
-
}
|
|
45
|
-
onInputChange({ code: code });
|
|
46
|
-
}, [handleInputFinished, onInputChange, requiredCharAmount]);
|
|
47
|
-
return (React__default['default'].createElement("div", { className: cn__default['default'](styles.component, styles[alignContent]) },
|
|
48
|
-
typeof title === 'string' ? React__default['default'].createElement("span", { className: styles.header }, title) : title,
|
|
49
|
-
React__default['default'].createElement("div", { className: styles.inputContainer },
|
|
50
|
-
React__default['default'].createElement(components_codeInput_component.CodeInput, { processing: processing, error: error, value: inputValue, ref: inputRef, slotsCount: requiredCharAmount, className: styles.codeInput, alignContent: alignContent, handleChange: handleInputChange, handleInputKeyDown: handleInputKeyDown }),
|
|
51
|
-
displayedError && (React__default['default'].createElement("div", { className: styles.error, role: 'alert' }, displayedError))),
|
|
52
|
-
processing && (React__default['default'].createElement("div", { className: styles.loaderWrap },
|
|
53
|
-
React__default['default'].createElement(coreComponentsLoader.Loader, null),
|
|
54
|
-
React__default['default'].createElement("span", { className: styles.loaderText }, codeChecking ? codeCheckingText : codeSendingText))),
|
|
55
|
-
hasSmsCountdown && (React__default['default'].createElement("div", { className: cn__default['default']('countdown', styles.countdown, (_b = {}, _b[styles.hidden] = processing, _b)) },
|
|
56
|
-
React__default['default'].createElement(components_countdown_component.Countdown, { duration: countdownDuration, phone: phone, hasPhoneMask: hasPhoneMask, alignContent: alignContent, noAttemptsLeftMessage: noAttemptsLeftMessage, hasError: Boolean(displayedError), buttonRetryText: buttonRetryText, content: countdownContent, onRepeatSms: onSmsRetryClick, onCountdownFinished: onCountdownFinished }))),
|
|
57
|
-
smsHintVisible && (React__default['default'].createElement("div", { className: styles.smsComeLinkWrap },
|
|
58
|
-
React__default['default'].createElement(coreComponentsLink.Link, { onClick: onSmsHintLinkClick, className: styles.smsComeLink, view: 'secondary', pseudo: true }, "\u041D\u0435 \u043F\u0440\u0438\u0445\u043E\u0434\u0438\u0442 \u0441\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u0435?"))),
|
|
59
|
-
React__default['default'].createElement("div", null, additionalContent)));
|
|
60
|
-
};
|
|
61
|
-
|
|
62
|
-
exports.SignConfirmation = SignConfirmation;
|
|
@@ -1,108 +0,0 @@
|
|
|
1
|
-
/* hash: u6g7x */
|
|
2
|
-
:root {
|
|
3
|
-
--color-light-text-negative: #d91d0b;
|
|
4
|
-
--color-light-text-primary: #0b1f35;
|
|
5
|
-
--color-light-text-secondary: #546272;
|
|
6
|
-
}
|
|
7
|
-
:root {
|
|
8
|
-
|
|
9
|
-
/* Hard */
|
|
10
|
-
|
|
11
|
-
/* Up */
|
|
12
|
-
|
|
13
|
-
/* Hard up */
|
|
14
|
-
}
|
|
15
|
-
:root {
|
|
16
|
-
--gap-xs: 8px;
|
|
17
|
-
--gap-s: 12px;
|
|
18
|
-
--gap-l: 20px;
|
|
19
|
-
--gap-3xl: 40px;
|
|
20
|
-
}
|
|
21
|
-
:root {
|
|
22
|
-
--font-family-system: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Helvetica,
|
|
23
|
-
sans-serif;
|
|
24
|
-
}
|
|
25
|
-
:root {
|
|
26
|
-
/* title */
|
|
27
|
-
--confirmation-title-font-size: 22px;
|
|
28
|
-
--confirmation-title-line-height: 26px;
|
|
29
|
-
--confirmation-title-font-weight: 700;
|
|
30
|
-
--confirmation-title-font-family: var(--font-family-system);
|
|
31
|
-
--confirmation-title-color: var(--color-light-text-primary);
|
|
32
|
-
--confirmation-title-font-feature-settings: normal;
|
|
33
|
-
|
|
34
|
-
/* text */
|
|
35
|
-
--confirmation-text-font-size: 16px;
|
|
36
|
-
--confirmation-text-line-height: 24px;
|
|
37
|
-
--confirmation-text-font-weight: 400;
|
|
38
|
-
--confirmation-text-font-family: var(--font-family-system);
|
|
39
|
-
--confirmation-text-color: var(--color-light-text-secondary);
|
|
40
|
-
|
|
41
|
-
/* error */
|
|
42
|
-
--confirmation-error-color: var(--color-light-text-negative);
|
|
43
|
-
|
|
44
|
-
/* input */
|
|
45
|
-
}
|
|
46
|
-
.confirmation__component_srlhu {
|
|
47
|
-
display: flex;
|
|
48
|
-
flex-direction: column;
|
|
49
|
-
}
|
|
50
|
-
.confirmation__countdown_srlhu {
|
|
51
|
-
max-height: 300px;
|
|
52
|
-
overflow: hidden;
|
|
53
|
-
transition: max-height 0.15s ease;
|
|
54
|
-
}
|
|
55
|
-
.confirmation__hidden_srlhu {
|
|
56
|
-
opacity: 0;
|
|
57
|
-
max-height: 0;
|
|
58
|
-
}
|
|
59
|
-
.confirmation__header_srlhu {
|
|
60
|
-
font-size: var(--confirmation-title-font-size);
|
|
61
|
-
line-height: var(--confirmation-title-line-height);
|
|
62
|
-
font-weight: var(--confirmation-title-font-weight);
|
|
63
|
-
font-family: var(--confirmation-title-font-family);
|
|
64
|
-
color: var(--confirmation-title-color);
|
|
65
|
-
font-feature-settings: var(--confirmation-title-font-feature-settings);
|
|
66
|
-
|
|
67
|
-
margin-bottom: var(--gap-3xl);
|
|
68
|
-
color: var(--confirmation-title-color);
|
|
69
|
-
}
|
|
70
|
-
.confirmation__inputContainer_srlhu {
|
|
71
|
-
display: flex;
|
|
72
|
-
flex-direction: column;
|
|
73
|
-
}
|
|
74
|
-
.confirmation__smsComeLinkWrap_srlhu {
|
|
75
|
-
margin-top: var(--gap-l);
|
|
76
|
-
}
|
|
77
|
-
.confirmation__smsComeLink_srlhu {
|
|
78
|
-
font-size: 14px;
|
|
79
|
-
line-height: 20px;
|
|
80
|
-
font-weight: 400;
|
|
81
|
-
}
|
|
82
|
-
.confirmation__error_srlhu {
|
|
83
|
-
font-size: 14px;
|
|
84
|
-
line-height: 20px;
|
|
85
|
-
font-weight: 400;
|
|
86
|
-
|
|
87
|
-
margin-top: var(--gap-xs);
|
|
88
|
-
color: var(--confirmation-error-color);
|
|
89
|
-
}
|
|
90
|
-
.confirmation__loaderWrap_srlhu {
|
|
91
|
-
display: flex;
|
|
92
|
-
align-items: center;
|
|
93
|
-
margin: var(--gap-3xl) 0 var(--gap-xs);
|
|
94
|
-
}
|
|
95
|
-
.confirmation__loaderText_srlhu {
|
|
96
|
-
font-size: var(--confirmation-text-font-size);
|
|
97
|
-
line-height: var(--confirmation-text-line-height);
|
|
98
|
-
font-weight: var(--confirmation-text-font-weight);
|
|
99
|
-
font-family: var(--confirmation-text-font-family);
|
|
100
|
-
color: var(--confirmation-text-color);
|
|
101
|
-
|
|
102
|
-
margin-left: var(--gap-s);
|
|
103
|
-
color: var(--confirmation-text-color);
|
|
104
|
-
}
|
|
105
|
-
.confirmation__center_srlhu .confirmation__codeInput_srlhu,
|
|
106
|
-
.confirmation__center_srlhu .confirmation__loaderWrap_srlhu {
|
|
107
|
-
justify-content: center;
|
|
108
|
-
}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
require('react');
|
|
6
|
-
require('classnames');
|
|
7
|
-
require('@alfalab/core-components-button');
|
|
8
|
-
require('@alfalab/core-components-link');
|
|
9
|
-
require('@alfalab/utils');
|
|
10
|
-
require('@alfalab/hooks');
|
|
11
|
-
require('../countdown-loader/component.js');
|
|
12
|
-
require('../countdown/component.js');
|
|
13
|
-
require('@alfalab/core-components-loader');
|
|
14
|
-
require('../code-input/component.js');
|
|
15
|
-
require('../code-input/utils.js');
|
|
16
|
-
var components_signConfirmation_component = require('./component.js');
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
exports.SignConfirmation = components_signConfirmation_component.SignConfirmation;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import React from 'react';
|
|
3
|
-
import { KeyboardEvent } from "react";
|
|
4
|
-
import { ContentAlign } from "../../component";
|
|
5
|
-
type CodeInputProps = {
|
|
6
|
-
processing: boolean;
|
|
7
|
-
value: string;
|
|
8
|
-
slotsCount: number;
|
|
9
|
-
error: boolean;
|
|
10
|
-
className?: string;
|
|
11
|
-
alignContent: ContentAlign;
|
|
12
|
-
handleChange: (code: string) => void;
|
|
13
|
-
handleInputKeyDown: (event: KeyboardEvent) => void;
|
|
14
|
-
};
|
|
15
|
-
declare const CodeInput: React.ForwardRefExoticComponent<CodeInputProps & React.RefAttributes<HTMLInputElement>>;
|
|
16
|
-
export { CodeInput };
|