@alfalab/core-components-confirmation 12.1.4 → 12.2.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/component-40c9adb0.d.ts +35 -0
- package/{component.js → component-40c9adb0.js} +11 -18
- package/component.desktop.d.ts +5 -0
- package/component.desktop.js +31 -0
- package/component.mobile.d.ts +5 -0
- package/component.mobile.js +38 -0
- package/component.responsive.d.ts +6 -0
- package/component.responsive.js +39 -0
- package/components/base-confirmation/component.d.ts +0 -0
- package/components/base-confirmation/component.js +27 -0
- package/components/base-confirmation/index.css +24 -0
- package/components/base-confirmation/index.d.ts +1 -0
- package/components/base-confirmation/index.js +27 -0
- package/components/countdown-loader/component.js +1 -1
- package/components/countdown-loader/index.css +2 -11
- package/components/header/component.d.ts +13 -0
- package/components/header/component.js +23 -0
- package/components/header/index.css +51 -0
- package/components/header/index.d.ts +1 -0
- package/components/header/index.js +12 -0
- package/components/index.js +4 -2
- package/components/screens/fatal-error/component.d.ts +9 -3
- package/components/screens/fatal-error/component.js +13 -7
- package/components/screens/fatal-error/index.css +17 -29
- package/components/screens/fatal-error/index.js +3 -0
- package/components/screens/hint/component.d.ts +9 -3
- package/components/screens/hint/component.js +17 -17
- package/components/screens/hint/index.css +25 -48
- package/components/screens/hint/index.js +2 -0
- package/components/screens/index.js +4 -2
- package/components/screens/initial/component.d.ts +9 -3
- package/components/screens/initial/component.js +14 -11
- package/components/screens/initial/countdown-section.js +3 -2
- package/components/screens/initial/index.css +48 -45
- package/components/screens/initial/index.js +4 -2
- package/components/screens/temp-block/component.d.ts +9 -3
- package/components/screens/temp-block/component.js +13 -7
- package/components/screens/temp-block/index.css +12 -30
- package/components/screens/temp-block/index.js +3 -0
- package/{esm/countdown-section-694d1c59.d.ts → countdown-section-d04caa75.d.ts} +1 -0
- package/countdown-section-d04caa75.js +56 -0
- package/cssm/component-5c5b24ae.d.ts +35 -0
- package/cssm/{component.js → component-5c5b24ae.js} +10 -22
- package/cssm/component.desktop.d.ts +5 -0
- package/cssm/component.desktop.js +38 -0
- package/cssm/component.mobile.d.ts +5 -0
- package/cssm/component.mobile.js +44 -0
- package/cssm/component.responsive.d.ts +6 -0
- package/cssm/component.responsive.js +47 -0
- package/cssm/components/base-confirmation/component.d.ts +0 -0
- package/cssm/components/base-confirmation/component.js +34 -0
- package/cssm/components/base-confirmation/index.d.ts +1 -0
- package/cssm/components/base-confirmation/index.js +34 -0
- package/cssm/components/base-confirmation/index.module.css +23 -0
- package/cssm/components/countdown-loader/index.module.css +0 -9
- package/cssm/components/header/component.d.ts +13 -0
- package/cssm/components/header/component.js +22 -0
- package/cssm/components/header/index.d.ts +1 -0
- package/cssm/components/header/index.js +13 -0
- package/cssm/components/header/index.module.css +50 -0
- package/cssm/components/index.js +5 -2
- package/cssm/components/screens/fatal-error/component.d.ts +9 -3
- package/cssm/components/screens/fatal-error/component.js +13 -6
- package/cssm/components/screens/fatal-error/index.js +4 -0
- package/cssm/components/screens/fatal-error/index.module.css +16 -28
- package/cssm/components/screens/hint/component.d.ts +9 -3
- package/cssm/components/screens/hint/component.js +17 -16
- package/cssm/components/screens/hint/index.js +3 -0
- package/cssm/components/screens/hint/index.module.css +17 -40
- package/cssm/components/screens/index.js +5 -2
- package/cssm/components/screens/initial/component.d.ts +9 -3
- package/cssm/components/screens/initial/component.js +15 -11
- package/cssm/components/screens/initial/countdown-section.d.ts +1 -0
- package/cssm/components/screens/initial/countdown-section.js +25 -10
- package/cssm/components/screens/initial/index.js +5 -2
- package/cssm/components/screens/initial/index.module.css +37 -34
- package/cssm/components/screens/temp-block/component.d.ts +9 -3
- package/cssm/components/screens/temp-block/component.js +13 -6
- package/cssm/components/screens/temp-block/index.js +4 -0
- package/cssm/components/screens/temp-block/index.module.css +9 -27
- package/cssm/desktop.d.ts +1 -0
- package/cssm/desktop.js +35 -0
- package/cssm/index.d.ts +2 -1
- package/cssm/index.js +13 -5
- package/cssm/mobile.d.ts +1 -0
- package/cssm/mobile.js +36 -0
- package/cssm/mobile.module.css +3 -0
- package/cssm/responsive.d.ts +1 -0
- package/cssm/responsive.js +38 -0
- package/cssm/types.d.ts +4 -0
- package/cssm/vars.css +4 -4
- package/desktop.d.ts +1 -0
- package/desktop.js +28 -0
- package/esm/component-1f28492d.d.ts +35 -0
- package/esm/{component.js → component-1f28492d.js} +6 -12
- package/esm/component.desktop.d.ts +5 -0
- package/esm/component.desktop.js +23 -0
- package/esm/component.mobile.d.ts +5 -0
- package/esm/component.mobile.js +29 -0
- package/esm/component.responsive.d.ts +6 -0
- package/esm/component.responsive.js +31 -0
- package/esm/components/base-confirmation/component.d.ts +0 -0
- package/esm/components/base-confirmation/component.js +19 -0
- package/esm/components/base-confirmation/index.css +24 -0
- package/esm/components/base-confirmation/index.d.ts +1 -0
- package/esm/components/base-confirmation/index.js +19 -0
- package/esm/components/countdown-loader/component.js +1 -1
- package/esm/components/countdown-loader/index.css +2 -11
- package/esm/components/header/component.d.ts +13 -0
- package/esm/components/header/component.js +14 -0
- package/esm/components/header/index.css +51 -0
- package/esm/components/header/index.d.ts +1 -0
- package/esm/components/header/index.js +4 -0
- package/esm/components/index.js +4 -2
- package/esm/components/screens/fatal-error/component.d.ts +9 -3
- package/esm/components/screens/fatal-error/component.js +13 -8
- package/esm/components/screens/fatal-error/index.css +17 -29
- package/esm/components/screens/fatal-error/index.js +3 -0
- package/esm/components/screens/hint/component.d.ts +9 -3
- package/esm/components/screens/hint/component.js +17 -17
- package/esm/components/screens/hint/index.css +25 -48
- package/esm/components/screens/hint/index.js +2 -0
- package/esm/components/screens/index.js +4 -2
- package/esm/components/screens/initial/component.d.ts +9 -3
- package/esm/components/screens/initial/component.js +14 -11
- package/esm/components/screens/initial/countdown-section.js +3 -2
- package/esm/components/screens/initial/index.css +48 -45
- package/esm/components/screens/initial/index.js +4 -2
- package/esm/components/screens/temp-block/component.d.ts +9 -3
- package/esm/components/screens/temp-block/component.js +12 -7
- package/esm/components/screens/temp-block/index.css +12 -30
- package/esm/components/screens/temp-block/index.js +3 -0
- package/{modern/countdown-section-d8a9a733.d.ts → esm/countdown-section-b47c61ca.d.ts} +1 -0
- package/esm/countdown-section-b47c61ca.js +48 -0
- package/esm/desktop.d.ts +1 -0
- package/esm/desktop.js +20 -0
- package/esm/index.d.ts +2 -1
- package/esm/index.js +8 -3
- package/esm/mobile.css +4 -0
- package/esm/mobile.d.ts +1 -0
- package/esm/mobile.js +20 -0
- package/esm/responsive.d.ts +1 -0
- package/esm/responsive.js +22 -0
- package/esm/types.d.ts +4 -0
- package/index.d.ts +2 -1
- package/index.js +10 -4
- package/mobile.css +4 -0
- package/mobile.d.ts +1 -0
- package/mobile.js +28 -0
- package/modern/component.desktop.d.ts +5 -0
- package/modern/component.desktop.js +23 -0
- package/modern/component.mobile.d.ts +5 -0
- package/modern/component.mobile.js +26 -0
- package/modern/component.responsive.d.ts +6 -0
- package/modern/component.responsive.js +31 -0
- package/modern/components/base-confirmation/component.d.ts +4 -0
- package/modern/{component.js → components/base-confirmation/component.js} +16 -14
- package/modern/components/base-confirmation/index.css +24 -0
- package/modern/components/base-confirmation/index.d.ts +1 -0
- package/modern/components/base-confirmation/index.js +19 -0
- package/modern/components/countdown-loader/component.js +1 -1
- package/modern/components/countdown-loader/index.css +2 -11
- package/modern/components/header/component.d.ts +13 -0
- package/modern/components/header/component.js +10 -0
- package/modern/components/header/index.css +51 -0
- package/modern/components/header/index.d.ts +1 -0
- package/modern/components/header/index.js +4 -0
- package/modern/components/index.js +4 -2
- package/modern/components/screens/fatal-error/component.d.ts +9 -3
- package/modern/components/screens/fatal-error/component.js +11 -8
- package/modern/components/screens/fatal-error/index.css +17 -29
- package/modern/components/screens/fatal-error/index.js +3 -0
- package/modern/components/screens/hint/component.d.ts +9 -3
- package/modern/components/screens/hint/component.js +14 -16
- package/modern/components/screens/hint/index.css +25 -48
- package/modern/components/screens/hint/index.js +2 -0
- package/modern/components/screens/index.js +4 -2
- package/modern/components/screens/initial/component.d.ts +9 -3
- package/modern/components/screens/initial/component.js +10 -9
- package/modern/components/screens/initial/countdown-section.js +3 -2
- package/modern/components/screens/initial/index.css +48 -45
- package/modern/components/screens/initial/index.js +4 -2
- package/modern/components/screens/temp-block/component.d.ts +9 -3
- package/modern/components/screens/temp-block/component.js +8 -5
- package/modern/components/screens/temp-block/index.css +12 -30
- package/modern/components/screens/temp-block/index.js +3 -0
- package/{countdown-section-c2901a7e.d.ts → modern/countdown-section-2212ec31.d.ts} +1 -0
- package/modern/countdown-section-2212ec31.js +46 -0
- package/modern/desktop.d.ts +1 -0
- package/modern/desktop.js +20 -0
- package/modern/index.d.ts +2 -1
- package/modern/index.js +8 -3
- package/modern/mobile.css +4 -0
- package/modern/mobile.d.ts +1 -0
- package/modern/mobile.js +20 -0
- package/modern/responsive.d.ts +1 -0
- package/modern/responsive.js +22 -0
- package/modern/types.d.ts +4 -0
- package/package.json +3 -2
- package/responsive.d.ts +1 -0
- package/responsive.js +30 -0
- package/types.d.ts +4 -0
- package/component.d.ts +0 -4
- package/countdown-section-c2901a7e.js +0 -41
- package/cssm/component.d.ts +0 -4
- package/cssm/index.module.css +0 -46
- package/esm/component.d.ts +0 -4
- package/esm/countdown-section-694d1c59.js +0 -33
- package/esm/index.css +0 -47
- package/index.css +0 -47
- package/modern/component.d.ts +0 -4
- package/modern/countdown-section-d8a9a733.js +0 -32
- package/modern/index.css +0 -47
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: mq7s8 */
|
|
2
2
|
:root {
|
|
3
3
|
--color-light-text-primary: #0b1f35;
|
|
4
|
+
--color-light-text-secondary: #546272;
|
|
4
5
|
}
|
|
5
6
|
:root {
|
|
6
7
|
|
|
@@ -12,7 +13,9 @@
|
|
|
12
13
|
}
|
|
13
14
|
:root {
|
|
14
15
|
--gap-2xs: 4px;
|
|
16
|
+
--gap-s: 12px;
|
|
15
17
|
--gap-m: 16px;
|
|
18
|
+
--gap-l: 20px;
|
|
16
19
|
--gap-xl: 24px;
|
|
17
20
|
--gap-2xl: 32px;
|
|
18
21
|
--gap-2xs-neg: -4px;
|
|
@@ -22,80 +25,80 @@
|
|
|
22
25
|
sans-serif;
|
|
23
26
|
}
|
|
24
27
|
:root {
|
|
25
|
-
/*
|
|
26
|
-
--confirmation-title-font-size: 22px;
|
|
27
|
-
--confirmation-title-line-height: 26px;
|
|
28
|
-
--confirmation-title-font-weight: 700;
|
|
29
|
-
--confirmation-title-font-family: var(--font-family-system);
|
|
30
|
-
--confirmation-title-color: var(--color-light-text-primary);
|
|
31
|
-
--confirmation-title-font-feature-settings: normal;
|
|
28
|
+
/* desktop */
|
|
32
29
|
|
|
33
|
-
/*
|
|
30
|
+
/* mobile */
|
|
34
31
|
|
|
35
|
-
/*
|
|
32
|
+
/* text */
|
|
33
|
+
--confirmation-text-font-size: 16px;
|
|
34
|
+
--confirmation-text-line-height: 24px;
|
|
35
|
+
--confirmation-text-font-weight: 400;
|
|
36
|
+
--confirmation-text-font-family: var(--font-family-system);
|
|
37
|
+
--confirmation-text-color: var(--color-light-text-primary)
|
|
36
38
|
|
|
37
|
-
/*
|
|
39
|
+
/* header */
|
|
38
40
|
}
|
|
39
|
-
.
|
|
41
|
+
.confirmation__component_1bham {
|
|
40
42
|
display: flex;
|
|
41
43
|
flex-direction: column;
|
|
42
44
|
}
|
|
43
|
-
.
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
font-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
font-family: var(--confirmation-title-font-family);
|
|
50
|
-
color: var(--confirmation-title-color);
|
|
51
|
-
font-feature-settings: var(--confirmation-title-font-feature-settings);
|
|
52
|
-
}
|
|
53
|
-
.confirmation__phone_38eal {
|
|
54
|
-
margin-bottom: var(--gap-2xl);
|
|
55
|
-
color: var(--color-light-text-primary);
|
|
45
|
+
.confirmation__typographyTheme_1bham {
|
|
46
|
+
font-size: var(--confirmation-text-font-size);
|
|
47
|
+
line-height: var(--confirmation-text-line-height);
|
|
48
|
+
font-weight: var(--confirmation-text-font-weight);
|
|
49
|
+
font-family: var(--confirmation-text-font-family);
|
|
50
|
+
color: var(--confirmation-text-color);
|
|
56
51
|
}
|
|
57
|
-
.
|
|
58
|
-
|
|
59
|
-
flex-direction: column;
|
|
52
|
+
.confirmation__phone_1bham {
|
|
53
|
+
color: var(--color-light-text-primary);
|
|
60
54
|
margin-bottom: var(--gap-2xl);
|
|
61
55
|
}
|
|
62
|
-
.
|
|
56
|
+
.confirmation__compact_1bham {
|
|
63
57
|
margin-bottom: var(--gap-xl);
|
|
64
58
|
}
|
|
65
|
-
.
|
|
59
|
+
.confirmation__loaderWrap_1bham {
|
|
66
60
|
display: flex;
|
|
67
61
|
align-items: center;
|
|
68
62
|
}
|
|
69
|
-
.
|
|
63
|
+
.confirmation__left_1bham {
|
|
64
|
+
align-items: flex-start;
|
|
65
|
+
}
|
|
66
|
+
.confirmation__center_1bham {
|
|
70
67
|
align-items: center;
|
|
71
68
|
text-align: center
|
|
72
69
|
}
|
|
73
|
-
.
|
|
74
|
-
.confirmation__center_38eal .confirmation__loaderWrap_38eal {
|
|
70
|
+
.confirmation__center_1bham .confirmation__loaderWrap_1bham {
|
|
75
71
|
justify-content: center;
|
|
76
72
|
}
|
|
77
|
-
.
|
|
73
|
+
.confirmation__center_1bham input {
|
|
78
74
|
margin: 0 var(--gap-2xs);
|
|
79
75
|
}
|
|
80
|
-
.
|
|
76
|
+
.confirmation__codeInput_1bham {
|
|
77
|
+
margin-bottom: var(--gap-s);
|
|
78
|
+
}
|
|
79
|
+
.confirmation__smsComeLink_1bham {
|
|
81
80
|
font-size: 14px;
|
|
82
81
|
line-height: 20px;
|
|
83
|
-
font-weight:
|
|
82
|
+
font-weight: 500;
|
|
84
83
|
}
|
|
85
|
-
.
|
|
84
|
+
.confirmation__countdownContainer_1bham {
|
|
85
|
+
color: var(--color-light-text-secondary);
|
|
86
86
|
margin-bottom: var(--gap-xl);
|
|
87
87
|
}
|
|
88
|
-
.
|
|
88
|
+
.confirmation__countdownMobile_1bham {
|
|
89
|
+
margin-bottom: var(--gap-l);
|
|
90
|
+
}
|
|
91
|
+
.confirmation__countdownLoaderMobile_1bham {
|
|
92
|
+
margin-bottom: var(--gap-m);
|
|
93
|
+
}
|
|
94
|
+
.confirmation__getCodeButton_1bham {
|
|
89
95
|
position: relative;
|
|
90
96
|
top: var(--gap-2xs-neg);
|
|
91
97
|
margin-bottom: var(--gap-m);
|
|
92
98
|
}
|
|
93
|
-
.
|
|
94
|
-
|
|
99
|
+
.confirmation__getCodeButtonMobile_1bham {
|
|
100
|
+
margin-bottom: 0;
|
|
95
101
|
}
|
|
96
|
-
.
|
|
97
|
-
|
|
98
|
-
justify-content: flex-start;
|
|
99
|
-
min-width: 45px;
|
|
100
|
-
margin-left: var(--gap-2xs);
|
|
102
|
+
.confirmation__containerInput_1bham {
|
|
103
|
+
min-height: 80px;
|
|
101
104
|
}
|
|
@@ -5,7 +5,9 @@ import '../../../utils.js';
|
|
|
5
5
|
import '../../../context.js';
|
|
6
6
|
import '@alfalab/core-components-code-input/esm';
|
|
7
7
|
import '@alfalab/core-components-link/esm';
|
|
8
|
-
import '
|
|
9
|
-
import '@alfalab/core-components-loader/esm';
|
|
8
|
+
import '@alfalab/core-components-typography/esm';
|
|
10
9
|
import '@alfalab/core-components-button/esm';
|
|
10
|
+
import '../../header/component.js';
|
|
11
|
+
import '@alfalab/core-components-loader/esm';
|
|
12
|
+
import '../../../countdown-section-b47c61ca.js';
|
|
11
13
|
export { Initial } from './component.js';
|
|
@@ -1,3 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
type TempBlockProps = {
|
|
3
|
+
/**
|
|
4
|
+
* Отображать в мобильной версии экран компонента
|
|
5
|
+
*/
|
|
6
|
+
mobile?: boolean;
|
|
7
|
+
};
|
|
8
|
+
declare const TempBlock: FC<TempBlockProps>;
|
|
9
|
+
export { TempBlockProps, TempBlock };
|
|
@@ -1,14 +1,19 @@
|
|
|
1
1
|
import React, { useContext, useEffect, Fragment } from 'react';
|
|
2
|
+
import cn from 'classnames';
|
|
2
3
|
import { useCountdown, formatMsAsMinutes } from '../../../utils.js';
|
|
3
4
|
import { ConfirmationContext } from '../../../context.js';
|
|
5
|
+
import { Typography } from '@alfalab/core-components-typography/esm';
|
|
6
|
+
import { Header } from '../../header/component.js';
|
|
4
7
|
import { CountdownLoader } from '../../countdown-loader/component.js';
|
|
5
8
|
|
|
6
|
-
var styles = {"
|
|
9
|
+
var styles = {"typographyTheme":"confirmation__typographyTheme_dpv0y","description":"confirmation__description_dpv0y","countdownWrap":"confirmation__countdownWrap_dpv0y","loader":"confirmation__loader_dpv0y"};
|
|
7
10
|
require('./index.css')
|
|
8
11
|
|
|
9
|
-
var TempBlock = function () {
|
|
10
|
-
var
|
|
11
|
-
var
|
|
12
|
+
var TempBlock = function (_a) {
|
|
13
|
+
var _b, _c;
|
|
14
|
+
var mobile = _a.mobile;
|
|
15
|
+
var _d = useContext(ConfirmationContext), texts = _d.texts, tempBlockDuration = _d.tempBlockDuration, onChangeScreen = _d.onChangeScreen, onTempBlockFinished = _d.onTempBlockFinished;
|
|
16
|
+
var _e = useCountdown(tempBlockDuration), timeLeft = _e[0], startTimer = _e[1];
|
|
12
17
|
useEffect(function () {
|
|
13
18
|
startTimer();
|
|
14
19
|
}, [startTimer]);
|
|
@@ -18,9 +23,9 @@ var TempBlock = function () {
|
|
|
18
23
|
}
|
|
19
24
|
}, [timeLeft, onChangeScreen, onTempBlockFinished]);
|
|
20
25
|
return (React.createElement(Fragment, null,
|
|
21
|
-
React.createElement(
|
|
22
|
-
React.createElement(
|
|
23
|
-
React.createElement("div", { className: styles.countdownWrap },
|
|
26
|
+
React.createElement(Header, { mobile: mobile }, texts.tempBlockTitle),
|
|
27
|
+
React.createElement(Typography.Text, { view: 'primary-medium', color: 'primary', className: cn(styles.description, (_b = {}, _b[styles.typographyTheme] = !mobile, _b)) }, texts.tempBlockDescription),
|
|
28
|
+
React.createElement("div", { className: cn(styles.countdownWrap, (_c = {}, _c[styles.typographyTheme] = !mobile, _c)) },
|
|
24
29
|
React.createElement(CountdownLoader, { progress: 1 - timeLeft / tempBlockDuration, className: styles.loader }),
|
|
25
30
|
formatMsAsMinutes(timeLeft))));
|
|
26
31
|
};
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: 6x7mg */
|
|
2
2
|
:root {
|
|
3
3
|
--color-light-text-primary: #0b1f35;
|
|
4
|
-
--color-light-text-secondary: #546272;
|
|
5
4
|
}
|
|
6
5
|
:root {
|
|
7
6
|
|
|
@@ -13,56 +12,39 @@
|
|
|
13
12
|
}
|
|
14
13
|
:root {
|
|
15
14
|
--gap-xs: 8px;
|
|
16
|
-
--gap-xl: 24px;
|
|
17
|
-
--gap-2xl: 32px;
|
|
18
15
|
}
|
|
19
16
|
:root {
|
|
20
17
|
--font-family-system: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Helvetica,
|
|
21
18
|
sans-serif;
|
|
22
19
|
}
|
|
23
20
|
:root {
|
|
24
|
-
/*
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
--confirmation-title-font-weight: 700;
|
|
28
|
-
--confirmation-title-font-family: var(--font-family-system);
|
|
29
|
-
--confirmation-title-color: var(--color-light-text-primary);
|
|
30
|
-
--confirmation-title-font-feature-settings: normal;
|
|
21
|
+
/* desktop */
|
|
22
|
+
|
|
23
|
+
/* mobile */
|
|
31
24
|
|
|
32
25
|
/* text */
|
|
33
26
|
--confirmation-text-font-size: 16px;
|
|
34
27
|
--confirmation-text-line-height: 24px;
|
|
35
28
|
--confirmation-text-font-weight: 400;
|
|
36
29
|
--confirmation-text-font-family: var(--font-family-system);
|
|
37
|
-
--confirmation-text-color: var(--color-light-text-
|
|
38
|
-
|
|
39
|
-
/* error */
|
|
30
|
+
--confirmation-text-color: var(--color-light-text-primary)
|
|
40
31
|
|
|
41
|
-
/*
|
|
42
|
-
}
|
|
43
|
-
.confirmation__header_1g2lg {
|
|
44
|
-
margin: 0;
|
|
45
|
-
margin-bottom: var(--gap-xl);
|
|
46
|
-
font-size: var(--confirmation-title-font-size);
|
|
47
|
-
line-height: var(--confirmation-title-line-height);
|
|
48
|
-
font-weight: var(--confirmation-title-font-weight);
|
|
49
|
-
font-family: var(--confirmation-title-font-family);
|
|
50
|
-
color: var(--confirmation-title-color);
|
|
51
|
-
font-feature-settings: var(--confirmation-title-font-feature-settings);
|
|
32
|
+
/* header */
|
|
52
33
|
}
|
|
53
|
-
.
|
|
34
|
+
.confirmation__typographyTheme_dpv0y {
|
|
54
35
|
font-size: var(--confirmation-text-font-size);
|
|
55
36
|
line-height: var(--confirmation-text-line-height);
|
|
56
37
|
font-weight: var(--confirmation-text-font-weight);
|
|
57
38
|
font-family: var(--confirmation-text-font-family);
|
|
58
39
|
color: var(--confirmation-text-color);
|
|
59
|
-
|
|
60
|
-
margin-bottom: var(--gap-2xl);
|
|
61
40
|
}
|
|
62
|
-
.
|
|
41
|
+
.confirmation__description_dpv0y {
|
|
42
|
+
margin-bottom: var(--gap-xs);
|
|
43
|
+
}
|
|
44
|
+
.confirmation__countdownWrap_dpv0y {
|
|
63
45
|
display: flex;
|
|
64
46
|
align-items: center;
|
|
65
47
|
}
|
|
66
|
-
.
|
|
48
|
+
.confirmation__loader_dpv0y {
|
|
67
49
|
margin-right: var(--gap-xs);
|
|
68
50
|
}
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import 'react';
|
|
2
|
+
import 'classnames';
|
|
2
3
|
import '../../../utils.js';
|
|
3
4
|
import '../../../context.js';
|
|
5
|
+
import '@alfalab/core-components-typography/esm';
|
|
6
|
+
import '../../header/component.js';
|
|
4
7
|
import '../../countdown-loader/component.js';
|
|
5
8
|
export { TempBlock } from './component.js';
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import React, { useContext } from 'react';
|
|
2
|
+
import cn from 'classnames';
|
|
3
|
+
import { formatMsAsMinutes } from './utils.js';
|
|
4
|
+
import { ConfirmationContext } from './context.js';
|
|
5
|
+
import { Typography } from '@alfalab/core-components-typography/esm';
|
|
6
|
+
import { Button } from '@alfalab/core-components-button/esm';
|
|
7
|
+
import { Loader } from '@alfalab/core-components-loader/esm';
|
|
8
|
+
|
|
9
|
+
var styles = {"component":"confirmation__component_1bham","typographyTheme":"confirmation__typographyTheme_1bham","phone":"confirmation__phone_1bham","compact":"confirmation__compact_1bham","loaderWrap":"confirmation__loaderWrap_1bham","left":"confirmation__left_1bham","center":"confirmation__center_1bham","codeInput":"confirmation__codeInput_1bham","smsComeLink":"confirmation__smsComeLink_1bham","countdownContainer":"confirmation__countdownContainer_1bham","countdownMobile":"confirmation__countdownMobile_1bham","countdownLoaderMobile":"confirmation__countdownLoaderMobile_1bham","getCodeButton":"confirmation__getCodeButton_1bham","getCodeButtonMobile":"confirmation__getCodeButtonMobile_1bham","containerInput":"confirmation__containerInput_1bham"};
|
|
10
|
+
require('./components/screens/initial/index.css')
|
|
11
|
+
|
|
12
|
+
var CountdownSection = function (_a) {
|
|
13
|
+
var _b, _c, _d, _e, _f;
|
|
14
|
+
var codeSendHintVisible = _a.codeSendHintVisible, timePassed = _a.timePassed, processing = _a.processing, mobile = _a.mobile, handleSmsRetryClick = _a.handleSmsRetryClick;
|
|
15
|
+
var _g = useContext(ConfirmationContext), state = _g.state, texts = _g.texts, timeLeft = _g.timeLeft, blockSmsRetry = _g.blockSmsRetry;
|
|
16
|
+
if (codeSendHintVisible) {
|
|
17
|
+
return (React.createElement(Typography.Text, { className: cn(styles.countdownContainer, (_b = {},
|
|
18
|
+
_b[styles.countdownMobile] = mobile,
|
|
19
|
+
_b[styles.typographyTheme] = !mobile,
|
|
20
|
+
_b)), view: mobile ? 'primary-small' : 'primary-medium', tag: 'div' }, texts.codeSended));
|
|
21
|
+
}
|
|
22
|
+
if (processing) {
|
|
23
|
+
return (React.createElement("div", { className: cn(styles.loaderWrap, styles.countdownContainer, (_c = {},
|
|
24
|
+
_c[styles.countdownLoaderMobile] = mobile,
|
|
25
|
+
_c[styles.typographyTheme] = !mobile,
|
|
26
|
+
_c)) },
|
|
27
|
+
React.createElement(Loader, null),
|
|
28
|
+
React.createElement("span", { className: styles.loaderText }, state === 'CODE_CHECKING' ? texts.codeChecking : texts.codeSending)));
|
|
29
|
+
}
|
|
30
|
+
if (blockSmsRetry) {
|
|
31
|
+
return (React.createElement(Typography.Text, { className: cn(styles.countdownContainer, (_d = {},
|
|
32
|
+
_d[styles.countdownMobile] = mobile,
|
|
33
|
+
_d[styles.typographyTheme] = !mobile,
|
|
34
|
+
_d)), view: mobile ? 'primary-small' : 'primary-medium', tag: 'div' }, texts.noAttemptsLeft));
|
|
35
|
+
}
|
|
36
|
+
if (timePassed) {
|
|
37
|
+
return (React.createElement(Button, { size: mobile ? 'xs' : 'xxs', view: 'secondary', onClick: handleSmsRetryClick, className: cn(styles.getCodeButton, (_e = {}, _e[styles.getCodeButtonMobile] = mobile, _e)) }, texts.buttonRetry));
|
|
38
|
+
}
|
|
39
|
+
return (React.createElement(Typography.Text, { className: cn(styles.countdown, styles.countdownContainer, (_f = {},
|
|
40
|
+
_f[styles.countdownMobile] = mobile,
|
|
41
|
+
_f[styles.typographyTheme] = !mobile,
|
|
42
|
+
_f)), view: mobile ? 'primary-small' : 'primary-medium', tag: 'div' },
|
|
43
|
+
texts.countdown,
|
|
44
|
+
" ",
|
|
45
|
+
formatMsAsMinutes(timeLeft)));
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
export { CountdownSection as C, styles as s };
|
package/esm/desktop.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./component.desktop";
|
package/esm/desktop.js
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import './component-1f28492d.js';
|
|
2
|
+
import 'react';
|
|
3
|
+
import 'classnames';
|
|
4
|
+
import '@alfalab/hooks';
|
|
5
|
+
import './utils.js';
|
|
6
|
+
import './context.js';
|
|
7
|
+
import './types.js';
|
|
8
|
+
import '@alfalab/core-components-code-input/esm';
|
|
9
|
+
import '@alfalab/core-components-link/esm';
|
|
10
|
+
import '@alfalab/core-components-typography/esm';
|
|
11
|
+
import '@alfalab/core-components-button/esm';
|
|
12
|
+
import './components/header/component.js';
|
|
13
|
+
import '@alfalab/core-components-loader/esm';
|
|
14
|
+
import './countdown-section-b47c61ca.js';
|
|
15
|
+
import './components/screens/initial/component.js';
|
|
16
|
+
import './components/screens/hint/component.js';
|
|
17
|
+
import './components/screens/fatal-error/component.js';
|
|
18
|
+
import './components/countdown-loader/component.js';
|
|
19
|
+
import './components/screens/temp-block/component.js';
|
|
20
|
+
export { ConfirmationDesktop } from './component.desktop.js';
|
package/esm/index.d.ts
CHANGED
package/esm/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
import './component-1f28492d.js';
|
|
2
2
|
import 'react';
|
|
3
3
|
import 'classnames';
|
|
4
4
|
import '@alfalab/hooks';
|
|
@@ -7,11 +7,16 @@ export { ConfirmationContext } from './context.js';
|
|
|
7
7
|
export { defaultTexts } from './types.js';
|
|
8
8
|
import '@alfalab/core-components-code-input/esm';
|
|
9
9
|
import '@alfalab/core-components-link/esm';
|
|
10
|
-
import '
|
|
11
|
-
import '@alfalab/core-components-loader/esm';
|
|
10
|
+
import '@alfalab/core-components-typography/esm';
|
|
12
11
|
import '@alfalab/core-components-button/esm';
|
|
12
|
+
import './components/header/component.js';
|
|
13
|
+
import '@alfalab/core-components-loader/esm';
|
|
14
|
+
import './countdown-section-b47c61ca.js';
|
|
13
15
|
export { Initial } from './components/screens/initial/component.js';
|
|
14
16
|
export { Hint } from './components/screens/hint/component.js';
|
|
15
17
|
export { FatalError } from './components/screens/fatal-error/component.js';
|
|
16
18
|
export { CountdownLoader } from './components/countdown-loader/component.js';
|
|
17
19
|
export { TempBlock } from './components/screens/temp-block/component.js';
|
|
20
|
+
export { ConfirmationDesktop as Confirmation } from './component.desktop.js';
|
|
21
|
+
import './component.mobile.js';
|
|
22
|
+
export { ConfirmationResponsive } from './component.responsive.js';
|
package/esm/mobile.css
ADDED
package/esm/mobile.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./component.mobile";
|
package/esm/mobile.js
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import './component-1f28492d.js';
|
|
2
|
+
import 'react';
|
|
3
|
+
import 'classnames';
|
|
4
|
+
import '@alfalab/hooks';
|
|
5
|
+
import './utils.js';
|
|
6
|
+
import './context.js';
|
|
7
|
+
import './types.js';
|
|
8
|
+
import '@alfalab/core-components-code-input/esm';
|
|
9
|
+
import '@alfalab/core-components-link/esm';
|
|
10
|
+
import '@alfalab/core-components-typography/esm';
|
|
11
|
+
import '@alfalab/core-components-button/esm';
|
|
12
|
+
import './components/header/component.js';
|
|
13
|
+
import '@alfalab/core-components-loader/esm';
|
|
14
|
+
import './countdown-section-b47c61ca.js';
|
|
15
|
+
import './components/screens/initial/component.js';
|
|
16
|
+
import './components/screens/hint/component.js';
|
|
17
|
+
import './components/screens/fatal-error/component.js';
|
|
18
|
+
import './components/countdown-loader/component.js';
|
|
19
|
+
import './components/screens/temp-block/component.js';
|
|
20
|
+
export { ConfirmationMobile } from './component.mobile.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./component.responsive";
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import './component-1f28492d.js';
|
|
2
|
+
import 'react';
|
|
3
|
+
import 'classnames';
|
|
4
|
+
import '@alfalab/hooks';
|
|
5
|
+
import './utils.js';
|
|
6
|
+
import './context.js';
|
|
7
|
+
import './types.js';
|
|
8
|
+
import '@alfalab/core-components-code-input/esm';
|
|
9
|
+
import '@alfalab/core-components-link/esm';
|
|
10
|
+
import '@alfalab/core-components-typography/esm';
|
|
11
|
+
import '@alfalab/core-components-button/esm';
|
|
12
|
+
import './components/header/component.js';
|
|
13
|
+
import '@alfalab/core-components-loader/esm';
|
|
14
|
+
import './countdown-section-b47c61ca.js';
|
|
15
|
+
import './components/screens/initial/component.js';
|
|
16
|
+
import './components/screens/hint/component.js';
|
|
17
|
+
import './components/screens/fatal-error/component.js';
|
|
18
|
+
import './components/countdown-loader/component.js';
|
|
19
|
+
import './components/screens/temp-block/component.js';
|
|
20
|
+
import './component.desktop.js';
|
|
21
|
+
import './component.mobile.js';
|
|
22
|
+
export { ConfirmationResponsive } from './component.responsive.js';
|
package/esm/types.d.ts
CHANGED
package/index.d.ts
CHANGED
package/index.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
require('./component-40c9adb0.js');
|
|
6
6
|
require('react');
|
|
7
7
|
require('classnames');
|
|
8
8
|
require('@alfalab/hooks');
|
|
@@ -11,18 +11,22 @@ var context = require('./context.js');
|
|
|
11
11
|
var types = require('./types.js');
|
|
12
12
|
require('@alfalab/core-components-code-input');
|
|
13
13
|
require('@alfalab/core-components-link');
|
|
14
|
-
require('
|
|
15
|
-
require('@alfalab/core-components-loader');
|
|
14
|
+
require('@alfalab/core-components-typography');
|
|
16
15
|
require('@alfalab/core-components-button');
|
|
16
|
+
require('./components/header/component.js');
|
|
17
|
+
require('@alfalab/core-components-loader');
|
|
18
|
+
require('./countdown-section-d04caa75.js');
|
|
17
19
|
var components_screens_initial_component = require('./components/screens/initial/component.js');
|
|
18
20
|
var components_screens_hint_component = require('./components/screens/hint/component.js');
|
|
19
21
|
var components_screens_fatalError_component = require('./components/screens/fatal-error/component.js');
|
|
20
22
|
var components_countdownLoader_component = require('./components/countdown-loader/component.js');
|
|
21
23
|
var components_screens_tempBlock_component = require('./components/screens/temp-block/component.js');
|
|
24
|
+
var component_desktop = require('./component.desktop.js');
|
|
25
|
+
require('./component.mobile.js');
|
|
26
|
+
var component_responsive = require('./component.responsive.js');
|
|
22
27
|
|
|
23
28
|
|
|
24
29
|
|
|
25
|
-
exports.Confirmation = component.Confirmation;
|
|
26
30
|
exports.ONE_DAY = utils.ONE_DAY;
|
|
27
31
|
exports.ONE_MINUTE = utils.ONE_MINUTE;
|
|
28
32
|
exports.formatMsAsMinutes = utils.formatMsAsMinutes;
|
|
@@ -35,3 +39,5 @@ exports.Hint = components_screens_hint_component.Hint;
|
|
|
35
39
|
exports.FatalError = components_screens_fatalError_component.FatalError;
|
|
36
40
|
exports.CountdownLoader = components_countdownLoader_component.CountdownLoader;
|
|
37
41
|
exports.TempBlock = components_screens_tempBlock_component.TempBlock;
|
|
42
|
+
exports.Confirmation = component_desktop.ConfirmationDesktop;
|
|
43
|
+
exports.ConfirmationResponsive = component_responsive.ConfirmationResponsive;
|
package/mobile.css
ADDED
package/mobile.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./component.mobile";
|
package/mobile.js
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
require('./component-40c9adb0.js');
|
|
6
|
+
require('react');
|
|
7
|
+
require('classnames');
|
|
8
|
+
require('@alfalab/hooks');
|
|
9
|
+
require('./utils.js');
|
|
10
|
+
require('./context.js');
|
|
11
|
+
require('./types.js');
|
|
12
|
+
require('@alfalab/core-components-code-input');
|
|
13
|
+
require('@alfalab/core-components-link');
|
|
14
|
+
require('@alfalab/core-components-typography');
|
|
15
|
+
require('@alfalab/core-components-button');
|
|
16
|
+
require('./components/header/component.js');
|
|
17
|
+
require('@alfalab/core-components-loader');
|
|
18
|
+
require('./countdown-section-d04caa75.js');
|
|
19
|
+
require('./components/screens/initial/component.js');
|
|
20
|
+
require('./components/screens/hint/component.js');
|
|
21
|
+
require('./components/screens/fatal-error/component.js');
|
|
22
|
+
require('./components/countdown-loader/component.js');
|
|
23
|
+
require('./components/screens/temp-block/component.js');
|
|
24
|
+
var component_mobile = require('./component.mobile.js');
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
exports.ConfirmationMobile = component_mobile.ConfirmationMobile;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import 'classnames';
|
|
3
|
+
import '@alfalab/hooks';
|
|
4
|
+
import './utils.js';
|
|
5
|
+
import './context.js';
|
|
6
|
+
import './types.js';
|
|
7
|
+
import '@alfalab/core-components-code-input/modern';
|
|
8
|
+
import '@alfalab/core-components-link/modern';
|
|
9
|
+
import '@alfalab/core-components-typography/modern';
|
|
10
|
+
import '@alfalab/core-components-button/modern';
|
|
11
|
+
import './components/header/component.js';
|
|
12
|
+
import '@alfalab/core-components-loader/modern';
|
|
13
|
+
import './countdown-section-2212ec31.js';
|
|
14
|
+
import './components/screens/initial/component.js';
|
|
15
|
+
import './components/screens/hint/component.js';
|
|
16
|
+
import './components/screens/fatal-error/component.js';
|
|
17
|
+
import './components/countdown-loader/component.js';
|
|
18
|
+
import './components/screens/temp-block/component.js';
|
|
19
|
+
import { BaseConfirmation } from './components/base-confirmation/component.js';
|
|
20
|
+
|
|
21
|
+
const ConfirmationDesktop = props => (React.createElement(BaseConfirmation, Object.assign({}, props)));
|
|
22
|
+
|
|
23
|
+
export { ConfirmationDesktop };
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import cn from 'classnames';
|
|
3
|
+
import '@alfalab/hooks';
|
|
4
|
+
import './utils.js';
|
|
5
|
+
import './context.js';
|
|
6
|
+
import './types.js';
|
|
7
|
+
import '@alfalab/core-components-code-input/modern';
|
|
8
|
+
import '@alfalab/core-components-link/modern';
|
|
9
|
+
import '@alfalab/core-components-typography/modern';
|
|
10
|
+
import '@alfalab/core-components-button/modern';
|
|
11
|
+
import './components/header/component.js';
|
|
12
|
+
import '@alfalab/core-components-loader/modern';
|
|
13
|
+
import './countdown-section-2212ec31.js';
|
|
14
|
+
import './components/screens/initial/component.js';
|
|
15
|
+
import './components/screens/hint/component.js';
|
|
16
|
+
import './components/screens/fatal-error/component.js';
|
|
17
|
+
import './components/countdown-loader/component.js';
|
|
18
|
+
import './components/screens/temp-block/component.js';
|
|
19
|
+
import { BaseConfirmation } from './components/base-confirmation/component.js';
|
|
20
|
+
|
|
21
|
+
var styles = {"container":"confirmation__container_wf4yk"};
|
|
22
|
+
require('./mobile.css')
|
|
23
|
+
|
|
24
|
+
const ConfirmationMobile = ({ className, ...resProps }) => (React.createElement(BaseConfirmation, Object.assign({ mobile: true, className: cn(className, styles.container) }, resProps)));
|
|
25
|
+
|
|
26
|
+
export { ConfirmationMobile };
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
import { ConfirmationProps } from "./types";
|
|
3
|
+
type ResponsiveConfirmationProps = Omit<ConfirmationProps, 'confirmationScreens'>;
|
|
4
|
+
type ConfirmationMedia = 'desktop' | 'mobile';
|
|
5
|
+
declare const ConfirmationResponsive: FC<ResponsiveConfirmationProps>;
|
|
6
|
+
export { ResponsiveConfirmationProps, ConfirmationMedia, ConfirmationResponsive };
|