@alfalab/core-components-confirmation 14.0.1 → 14.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/component.responsive.d.ts +2 -2
- package/component.responsive.js.map +1 -1
- package/components/base-confirmation/component.d.ts +2 -2
- package/components/base-confirmation/component.js +4 -3
- package/components/base-confirmation/component.js.map +1 -1
- package/components/base-confirmation/index.css +3 -3
- package/components/base-confirmation/index.module.css.js +1 -1
- package/components/base-confirmation/index.module.css.js.map +1 -1
- package/components/countdown-loader/component.d.ts +1 -1
- package/components/countdown-loader/component.js.map +1 -1
- package/components/countdown-loader/index.css +1 -1
- package/components/countdown-loader/index.module.css.js +1 -1
- package/components/countdown-loader/index.module.css.js.map +1 -1
- package/components/header/component.d.ts +6 -1
- package/components/header/component.js +2 -2
- package/components/header/component.js.map +1 -1
- package/components/header/index.css +5 -5
- package/components/header/index.module.css.js +1 -1
- package/components/screens/fatal-error/component.d.ts +1 -1
- package/components/screens/fatal-error/component.js +2 -2
- package/components/screens/fatal-error/component.js.map +1 -1
- package/components/screens/fatal-error/index.css +8 -10
- package/components/screens/fatal-error/index.module.css.js +1 -1
- package/components/screens/hint/component.d.ts +1 -1
- package/components/screens/hint/component.js +2 -2
- package/components/screens/hint/component.js.map +1 -1
- package/components/screens/hint/index.css +16 -18
- package/components/screens/hint/index.module.css.js +1 -1
- package/components/screens/initial/component.d.ts +1 -1
- package/components/screens/initial/component.js +2 -2
- package/components/screens/initial/component.js.map +1 -1
- package/components/screens/initial/countdown-section.d.ts +1 -1
- package/components/screens/initial/countdown-section.js.map +1 -1
- package/components/screens/initial/index.css +22 -24
- package/components/screens/initial/index.module.css.js +1 -1
- package/components/screens/temp-block/component.d.ts +1 -1
- package/components/screens/temp-block/component.js +2 -2
- package/components/screens/temp-block/component.js.map +1 -1
- package/components/screens/temp-block/index.css +10 -12
- package/components/screens/temp-block/index.module.css.js +1 -1
- package/components/screens/temp-block-over/component.d.ts +1 -1
- package/components/screens/temp-block-over/component.js +2 -2
- package/components/screens/temp-block-over/component.js.map +1 -1
- package/components/screens/temp-block-over/index.css +7 -9
- package/components/screens/temp-block-over/index.module.css.js +1 -1
- package/context.d.ts +1 -1
- package/context.js +1 -0
- package/context.js.map +1 -1
- package/cssm/component.responsive.d.ts +2 -2
- package/cssm/component.responsive.js.map +1 -1
- package/cssm/components/base-confirmation/component.d.ts +2 -2
- package/cssm/components/base-confirmation/component.js +4 -3
- package/cssm/components/base-confirmation/component.js.map +1 -1
- package/cssm/components/base-confirmation/index.module.css +1 -1
- package/cssm/components/countdown-loader/component.d.ts +1 -1
- package/cssm/components/countdown-loader/component.js.map +1 -1
- package/cssm/components/header/component.d.ts +6 -1
- package/cssm/components/header/component.js +2 -2
- package/cssm/components/header/component.js.map +1 -1
- package/cssm/components/header/index.module.css +2 -2
- package/cssm/components/screens/fatal-error/component.d.ts +1 -1
- package/cssm/components/screens/fatal-error/component.js +2 -2
- package/cssm/components/screens/fatal-error/component.js.map +1 -1
- package/cssm/components/screens/fatal-error/index.module.css +2 -4
- package/cssm/components/screens/hint/component.d.ts +1 -1
- package/cssm/components/screens/hint/component.js +2 -2
- package/cssm/components/screens/hint/component.js.map +1 -1
- package/cssm/components/screens/hint/index.module.css +4 -6
- package/cssm/components/screens/initial/component.d.ts +1 -1
- package/cssm/components/screens/initial/component.js +2 -2
- package/cssm/components/screens/initial/component.js.map +1 -1
- package/cssm/components/screens/initial/countdown-section.d.ts +1 -1
- package/cssm/components/screens/initial/countdown-section.js.map +1 -1
- package/cssm/components/screens/initial/index.module.css +3 -5
- package/cssm/components/screens/temp-block/component.d.ts +1 -1
- package/cssm/components/screens/temp-block/component.js +2 -2
- package/cssm/components/screens/temp-block/component.js.map +1 -1
- package/cssm/components/screens/temp-block/index.module.css +2 -4
- package/cssm/components/screens/temp-block-over/component.d.ts +1 -1
- package/cssm/components/screens/temp-block-over/component.js +2 -2
- package/cssm/components/screens/temp-block-over/component.js.map +1 -1
- package/cssm/components/screens/temp-block-over/index.module.css +2 -4
- package/cssm/context.d.ts +1 -1
- package/cssm/context.js +1 -0
- package/cssm/context.js.map +1 -1
- package/cssm/desktop/component.desktop.d.ts +2 -2
- package/cssm/desktop/component.desktop.js.map +1 -1
- package/cssm/mobile/component.mobile.d.ts +2 -2
- package/cssm/mobile/component.mobile.js.map +1 -1
- package/cssm/types.d.ts +13 -8
- package/cssm/types.js.map +1 -1
- package/cssm/utils.d.ts +1 -1
- package/cssm/utils.js.map +1 -1
- package/desktop/component.desktop.d.ts +2 -2
- package/desktop/component.desktop.js.map +1 -1
- package/esm/component.responsive.d.ts +2 -2
- package/esm/component.responsive.js.map +1 -1
- package/esm/components/base-confirmation/component.d.ts +2 -2
- package/esm/components/base-confirmation/component.js +4 -3
- package/esm/components/base-confirmation/component.js.map +1 -1
- package/esm/components/base-confirmation/index.css +3 -3
- package/esm/components/base-confirmation/index.module.css.js +1 -1
- package/esm/components/base-confirmation/index.module.css.js.map +1 -1
- package/esm/components/countdown-loader/component.d.ts +1 -1
- package/esm/components/countdown-loader/component.js.map +1 -1
- package/esm/components/countdown-loader/index.css +1 -1
- package/esm/components/countdown-loader/index.module.css.js +1 -1
- package/esm/components/countdown-loader/index.module.css.js.map +1 -1
- package/esm/components/header/component.d.ts +6 -1
- package/esm/components/header/component.js +2 -2
- package/esm/components/header/component.js.map +1 -1
- package/esm/components/header/index.css +5 -5
- package/esm/components/header/index.module.css.js +1 -1
- package/esm/components/screens/fatal-error/component.d.ts +1 -1
- package/esm/components/screens/fatal-error/component.js +2 -2
- package/esm/components/screens/fatal-error/component.js.map +1 -1
- package/esm/components/screens/fatal-error/index.css +8 -10
- package/esm/components/screens/fatal-error/index.module.css.js +1 -1
- package/esm/components/screens/hint/component.d.ts +1 -1
- package/esm/components/screens/hint/component.js +2 -2
- package/esm/components/screens/hint/component.js.map +1 -1
- package/esm/components/screens/hint/index.css +16 -18
- package/esm/components/screens/hint/index.module.css.js +1 -1
- package/esm/components/screens/initial/component.d.ts +1 -1
- package/esm/components/screens/initial/component.js +2 -2
- package/esm/components/screens/initial/component.js.map +1 -1
- package/esm/components/screens/initial/countdown-section.d.ts +1 -1
- package/esm/components/screens/initial/countdown-section.js.map +1 -1
- package/esm/components/screens/initial/index.css +22 -24
- package/esm/components/screens/initial/index.module.css.js +1 -1
- package/esm/components/screens/temp-block/component.d.ts +1 -1
- package/esm/components/screens/temp-block/component.js +2 -2
- package/esm/components/screens/temp-block/component.js.map +1 -1
- package/esm/components/screens/temp-block/index.css +10 -12
- package/esm/components/screens/temp-block/index.module.css.js +1 -1
- package/esm/components/screens/temp-block-over/component.d.ts +1 -1
- package/esm/components/screens/temp-block-over/component.js +2 -2
- package/esm/components/screens/temp-block-over/component.js.map +1 -1
- package/esm/components/screens/temp-block-over/index.css +7 -9
- package/esm/components/screens/temp-block-over/index.module.css.js +1 -1
- package/esm/context.d.ts +1 -1
- package/esm/context.js +1 -0
- package/esm/context.js.map +1 -1
- package/esm/desktop/component.desktop.d.ts +2 -2
- package/esm/desktop/component.desktop.js.map +1 -1
- package/esm/mobile/component.mobile.d.ts +2 -2
- package/esm/mobile/component.mobile.js.map +1 -1
- package/esm/mobile/mobile.css +1 -1
- package/esm/mobile/mobile.module.css.js +1 -1
- package/esm/types.d.ts +13 -8
- package/esm/types.js.map +1 -1
- package/esm/utils.d.ts +1 -1
- package/esm/utils.js.map +1 -1
- package/mobile/component.mobile.d.ts +2 -2
- package/mobile/component.mobile.js.map +1 -1
- package/mobile/mobile.css +1 -1
- package/mobile/mobile.module.css.js +1 -1
- package/modern/component.responsive.d.ts +2 -2
- package/modern/component.responsive.js.map +1 -1
- package/modern/components/base-confirmation/component.d.ts +2 -2
- package/modern/components/base-confirmation/component.js +3 -2
- package/modern/components/base-confirmation/component.js.map +1 -1
- package/modern/components/base-confirmation/index.css +3 -3
- package/modern/components/base-confirmation/index.module.css.js +1 -1
- package/modern/components/base-confirmation/index.module.css.js.map +1 -1
- package/modern/components/countdown-loader/component.d.ts +1 -1
- package/modern/components/countdown-loader/component.js.map +1 -1
- package/modern/components/countdown-loader/index.css +1 -1
- package/modern/components/countdown-loader/index.module.css.js +1 -1
- package/modern/components/countdown-loader/index.module.css.js.map +1 -1
- package/modern/components/header/component.d.ts +6 -1
- package/modern/components/header/component.js +1 -1
- package/modern/components/header/component.js.map +1 -1
- package/modern/components/header/index.css +5 -5
- package/modern/components/header/index.module.css.js +1 -1
- package/modern/components/screens/fatal-error/component.d.ts +1 -1
- package/modern/components/screens/fatal-error/component.js +2 -2
- package/modern/components/screens/fatal-error/component.js.map +1 -1
- package/modern/components/screens/fatal-error/index.css +8 -10
- package/modern/components/screens/fatal-error/index.module.css.js +1 -1
- package/modern/components/screens/hint/component.d.ts +1 -1
- package/modern/components/screens/hint/component.js +2 -2
- package/modern/components/screens/hint/component.js.map +1 -1
- package/modern/components/screens/hint/index.css +16 -18
- package/modern/components/screens/hint/index.module.css.js +1 -1
- package/modern/components/screens/initial/component.d.ts +1 -1
- package/modern/components/screens/initial/component.js +2 -2
- package/modern/components/screens/initial/component.js.map +1 -1
- package/modern/components/screens/initial/countdown-section.d.ts +1 -1
- package/modern/components/screens/initial/countdown-section.js.map +1 -1
- package/modern/components/screens/initial/index.css +22 -24
- package/modern/components/screens/initial/index.module.css.js +1 -1
- package/modern/components/screens/temp-block/component.d.ts +1 -1
- package/modern/components/screens/temp-block/component.js +2 -2
- package/modern/components/screens/temp-block/component.js.map +1 -1
- package/modern/components/screens/temp-block/index.css +10 -12
- package/modern/components/screens/temp-block/index.module.css.js +1 -1
- package/modern/components/screens/temp-block-over/component.d.ts +1 -1
- package/modern/components/screens/temp-block-over/component.js +2 -2
- package/modern/components/screens/temp-block-over/component.js.map +1 -1
- package/modern/components/screens/temp-block-over/index.css +7 -9
- package/modern/components/screens/temp-block-over/index.module.css.js +1 -1
- package/modern/context.d.ts +1 -1
- package/modern/context.js +1 -0
- package/modern/context.js.map +1 -1
- package/modern/desktop/component.desktop.d.ts +2 -2
- package/modern/desktop/component.desktop.js.map +1 -1
- package/modern/mobile/component.mobile.d.ts +2 -2
- package/modern/mobile/component.mobile.js.map +1 -1
- package/modern/mobile/mobile.css +1 -1
- package/modern/mobile/mobile.module.css.js +1 -1
- package/modern/types.d.ts +13 -8
- package/modern/types.js.map +1 -1
- package/modern/utils.d.ts +1 -1
- package/modern/utils.js.map +1 -1
- package/moderncssm/component.responsive.d.ts +2 -2
- package/moderncssm/component.responsive.js.map +1 -1
- package/moderncssm/components/base-confirmation/component.d.ts +2 -2
- package/moderncssm/components/base-confirmation/component.js +3 -2
- package/moderncssm/components/base-confirmation/component.js.map +1 -1
- package/moderncssm/components/base-confirmation/index.module.css +3 -2
- package/moderncssm/components/countdown-loader/component.d.ts +1 -1
- package/moderncssm/components/countdown-loader/component.js.map +1 -1
- package/moderncssm/components/countdown-loader/index.module.css +2 -0
- package/moderncssm/components/header/component.d.ts +6 -1
- package/moderncssm/components/header/component.js +1 -1
- package/moderncssm/components/header/component.js.map +1 -1
- package/moderncssm/components/header/index.module.css +2 -0
- package/moderncssm/components/screens/fatal-error/component.d.ts +1 -1
- package/moderncssm/components/screens/fatal-error/component.js +2 -2
- package/moderncssm/components/screens/fatal-error/component.js.map +1 -1
- package/moderncssm/components/screens/fatal-error/index.module.css +2 -2
- package/moderncssm/components/screens/hint/component.d.ts +1 -1
- package/moderncssm/components/screens/hint/component.js +2 -2
- package/moderncssm/components/screens/hint/component.js.map +1 -1
- package/moderncssm/components/screens/hint/index.module.css +4 -4
- package/moderncssm/components/screens/initial/component.d.ts +1 -1
- package/moderncssm/components/screens/initial/component.js +2 -2
- package/moderncssm/components/screens/initial/component.js.map +1 -1
- package/moderncssm/components/screens/initial/countdown-section.d.ts +1 -1
- package/moderncssm/components/screens/initial/countdown-section.js.map +1 -1
- package/moderncssm/components/screens/initial/index.module.css +3 -3
- package/moderncssm/components/screens/temp-block/component.d.ts +1 -1
- package/moderncssm/components/screens/temp-block/component.js +2 -2
- package/moderncssm/components/screens/temp-block/component.js.map +1 -1
- package/moderncssm/components/screens/temp-block/index.module.css +2 -2
- package/moderncssm/components/screens/temp-block-over/component.d.ts +1 -1
- package/moderncssm/components/screens/temp-block-over/component.js +2 -2
- package/moderncssm/components/screens/temp-block-over/component.js.map +1 -1
- package/moderncssm/components/screens/temp-block-over/index.module.css +2 -2
- package/moderncssm/context.d.ts +1 -1
- package/moderncssm/context.js +1 -0
- package/moderncssm/context.js.map +1 -1
- package/moderncssm/desktop/component.desktop.d.ts +2 -2
- package/moderncssm/desktop/component.desktop.js.map +1 -1
- package/moderncssm/mobile/component.mobile.d.ts +2 -2
- package/moderncssm/mobile/component.mobile.js.map +1 -1
- package/moderncssm/types.d.ts +13 -8
- package/moderncssm/types.js.map +1 -1
- package/moderncssm/utils.d.ts +1 -1
- package/moderncssm/utils.js.map +1 -1
- package/package.json +3 -3
- package/src/component.responsive.tsx +2 -2
- package/src/components/base-confirmation/component.tsx +5 -6
- package/src/components/base-confirmation/index.module.css +1 -1
- package/src/components/countdown-loader/component.tsx +1 -1
- package/src/components/countdown-loader/index.module.css +1 -1
- package/src/components/header/component.tsx +9 -3
- package/src/components/screens/fatal-error/component.tsx +5 -3
- package/src/components/screens/hint/component.tsx +5 -3
- package/src/components/screens/initial/component.tsx +9 -3
- package/src/components/screens/initial/countdown-section.tsx +1 -1
- package/src/components/screens/temp-block/component.tsx +12 -4
- package/src/components/screens/temp-block-over/component.tsx +5 -3
- package/src/context.ts +2 -1
- package/src/desktop/component.desktop.tsx +2 -2
- package/src/mobile/component.mobile.tsx +2 -2
- package/src/types.ts +14 -7
- package/src/utils.ts +1 -1
- package/src/vars.css +1 -1
- package/types.d.ts +13 -8
- package/types.js.map +1 -1
- package/utils.d.ts +1 -1
- package/utils.js.map +1 -1
|
@@ -10,50 +10,48 @@
|
|
|
10
10
|
--gap-24: var(--gap-xl);
|
|
11
11
|
--gap-32: var(--gap-2xl);
|
|
12
12
|
} :root {
|
|
13
|
-
--font-family-system:
|
|
14
|
-
sans-serif;
|
|
13
|
+
--font-family-system:
|
|
14
|
+
system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Helvetica, sans-serif;
|
|
15
15
|
} :root {
|
|
16
16
|
--confirmation-text-font-size: 16px;
|
|
17
17
|
--confirmation-text-line-height: 24px;
|
|
18
18
|
--confirmation-text-font-weight: 400;
|
|
19
19
|
--confirmation-text-font-family: var(--font-family-system);
|
|
20
20
|
--confirmation-text-color: var(--color-light-text-primary)
|
|
21
|
-
|
|
22
|
-
/* header */
|
|
23
|
-
} .confirmation__component_uanaf {
|
|
21
|
+
} .confirmation__component_t001a {
|
|
24
22
|
display: flex;
|
|
25
23
|
flex-direction: column;
|
|
26
|
-
align-items: flex-start
|
|
27
|
-
} .
|
|
24
|
+
align-items: flex-start;
|
|
25
|
+
} .confirmation__component_t001a span:last-of-type {
|
|
28
26
|
margin-bottom: var(--gap-0);
|
|
29
|
-
} .
|
|
27
|
+
} .confirmation__center_t001a {
|
|
30
28
|
align-items: center;
|
|
31
29
|
text-align: center;
|
|
32
|
-
} .
|
|
30
|
+
} .confirmation__text_t001a.confirmation__text_t001a {
|
|
33
31
|
margin-bottom: var(--gap-24);
|
|
34
|
-
} .
|
|
32
|
+
} .confirmation__typographyTheme_t001a.confirmation__typographyTheme_t001a {
|
|
35
33
|
font-size: var(--confirmation-text-font-size);
|
|
36
34
|
line-height: var(--confirmation-text-line-height);
|
|
37
35
|
font-weight: var(--confirmation-text-font-weight);
|
|
38
36
|
font-family: var(--confirmation-text-font-family);
|
|
39
37
|
color: var(--confirmation-text-color);
|
|
40
|
-
} .
|
|
38
|
+
} .confirmation__typographyThemeMobile_t001a.confirmation__typographyThemeMobile_t001a {
|
|
41
39
|
color: var(--color-light-text-secondary);
|
|
42
|
-
} .
|
|
40
|
+
} .confirmation__phonesWrap_t001a {
|
|
43
41
|
display: flex;
|
|
44
42
|
flex-direction: column;
|
|
45
43
|
margin-bottom: var(--gap-24);
|
|
46
|
-
} .
|
|
47
|
-
margin-bottom: var(--gap-8)
|
|
48
|
-
} .
|
|
44
|
+
} .confirmation__phoneWrap_t001a {
|
|
45
|
+
margin-bottom: var(--gap-8);
|
|
46
|
+
} .confirmation__phoneWrap_t001a:last-child {
|
|
49
47
|
margin-bottom: var(--gap-0);
|
|
50
|
-
} .
|
|
48
|
+
} .confirmation__phoneLink_t001a.confirmation__phoneLink_t001a {
|
|
51
49
|
font-size: 16px;
|
|
52
50
|
line-height: 24px;
|
|
53
51
|
font-weight: 500;
|
|
54
|
-
} .
|
|
52
|
+
} .confirmation__hintButton_t001a {
|
|
55
53
|
margin-top: var(--gap-32);
|
|
56
|
-
} .
|
|
54
|
+
} .confirmation__phoneContentMobile_t001a {
|
|
57
55
|
display: flex;
|
|
58
56
|
flex-direction: column;
|
|
59
57
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import './index.css';
|
|
2
2
|
|
|
3
|
-
const styles = {"component":"
|
|
3
|
+
const styles = {"component":"confirmation__component_t001a","center":"confirmation__center_t001a","text":"confirmation__text_t001a","typographyTheme":"confirmation__typographyTheme_t001a","typographyThemeMobile":"confirmation__typographyThemeMobile_t001a","phonesWrap":"confirmation__phonesWrap_t001a","phoneWrap":"confirmation__phoneWrap_t001a","phoneLink":"confirmation__phoneLink_t001a","hintButton":"confirmation__hintButton_t001a","phoneContentMobile":"confirmation__phoneContentMobile_t001a"};
|
|
4
4
|
|
|
5
5
|
export { styles as default };
|
|
6
6
|
//# sourceMappingURL=index.module.css.js.map
|
|
@@ -13,7 +13,7 @@ import styles from './index.module.css.js';
|
|
|
13
13
|
|
|
14
14
|
const CODE_SEND_HINT_VISIBLE_DURATION = 2000;
|
|
15
15
|
const Initial = ({ mobile }) => {
|
|
16
|
-
const { state, alignContent, texts, requiredCharAmount, timeLeft, phone, clearCodeOnError, hideCountdownSection, initialScreenHintSlot, errorVisibleDuration, onChangeState, onInputFinished, onChangeScreen, onSmsRetryClick, } = useContext(ConfirmationContext);
|
|
16
|
+
const { state, alignContent, titleTag, texts, requiredCharAmount, timeLeft, phone, clearCodeOnError, hideCountdownSection, initialScreenHintSlot, errorVisibleDuration, onChangeState, onInputFinished, onChangeScreen, onSmsRetryClick, } = useContext(ConfirmationContext);
|
|
17
17
|
const prevState = usePrevious(state);
|
|
18
18
|
const inputRef = useRef(null);
|
|
19
19
|
const [codeSendHintVisible, setCodeSendHintVisible] = useState(false);
|
|
@@ -93,7 +93,7 @@ const Initial = ({ mobile }) => {
|
|
|
93
93
|
const timePassed = timeLeft === 0;
|
|
94
94
|
const ComponentCodeInput = mobile ? CodeInputMobile : CodeInputDesktop;
|
|
95
95
|
return (React.createElement("div", { className: cn(styles.component, styles[alignContent]) },
|
|
96
|
-
React.createElement(Header, { mobile: mobile }, texts.title),
|
|
96
|
+
React.createElement(Header, { mobile: mobile, titleTag: titleTag }, texts.title),
|
|
97
97
|
phone ? (React.createElement(Text, { view: 'primary-medium', color: 'primary', className: cn(styles.phone, {
|
|
98
98
|
[styles.typographyTheme]: !mobile,
|
|
99
99
|
[styles.typographyThemeMobile]: mobile,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"component.js","sources":["../../../../src/components/screens/initial/component.tsx"],"sourcesContent":["import React, { FC, useCallback, useContext, useEffect, useRef, useState } from 'react';\nimport cn from 'classnames';\n\nimport { ButtonMobile } from '@alfalab/core-components-button/mobile';\nimport { CodeInputDesktop } from '@alfalab/core-components-code-input/desktop';\nimport { CodeInputMobile } from '@alfalab/core-components-code-input/mobile';\nimport { BaseCodeInputProps, CustomInputRef } from '@alfalab/core-components-code-input/shared';\nimport { Link } from '@alfalab/core-components-link';\nimport { Text } from '@alfalab/core-components-typography';\nimport { useLayoutEffect_SAFE_FOR_SSR, usePrevious } from '@alfalab/hooks';\n\nimport { ConfirmationContext } from '../../../context';\nimport { Header } from '../../header';\n\nimport { CountdownSection } from './countdown-section';\n\nimport styles from './index.module.css';\n\nexport type InitialProps = {\n /**\n * Отображать в мобильной версии экран компонента\n */\n mobile?: boolean;\n};\n\nconst CODE_SEND_HINT_VISIBLE_DURATION = 2000;\n\nexport const Initial: FC<InitialProps> = ({ mobile }) => {\n const {\n state,\n alignContent,\n texts,\n requiredCharAmount,\n timeLeft,\n phone,\n clearCodeOnError,\n hideCountdownSection,\n initialScreenHintSlot,\n errorVisibleDuration,\n onChangeState,\n onInputFinished,\n onChangeScreen,\n onSmsRetryClick,\n } = useContext(ConfirmationContext);\n\n const prevState = usePrevious(state);\n\n const inputRef = useRef<CustomInputRef>(null);\n\n const [codeSendHintVisible, setCodeSendHintVisible] = useState(false);\n\n const timerId = useRef(0);\n\n const handleInputComplete: BaseCodeInputProps['onComplete'] = (code) => {\n onInputFinished(code);\n };\n\n const handleSmsHintLinkClick = () => {\n onChangeScreen('HINT');\n };\n\n const handleInputChange = () => {\n if (state === 'CODE_ERROR') {\n onChangeState('INITIAL');\n }\n };\n\n const handleSmsRetryClick = () => {\n if (inputRef.current) {\n inputRef.current.reset();\n }\n\n onSmsRetryClick();\n };\n\n const handleErrorAnimationEnd = () => {\n if (clearCodeOnError && state !== 'INITIAL') {\n onChangeState('INITIAL');\n }\n };\n\n const clearTimer = useCallback(() => {\n window.clearTimeout(timerId.current);\n }, []);\n\n useEffect(() => {\n if (inputRef.current) {\n inputRef.current.focus();\n }\n\n return () => {\n clearTimer();\n };\n }, [clearTimer]);\n\n useEffect(() => {\n if (!inputRef.current) {\n return;\n }\n\n if (prevState === 'CODE_SENDING' && state !== 'CODE_SENDING') {\n inputRef.current.focus();\n }\n }, [prevState, state, requiredCharAmount]);\n\n useLayoutEffect_SAFE_FOR_SSR(() => {\n if (prevState === 'CODE_SENDING' && state !== 'CODE_SENDING') {\n setCodeSendHintVisible(true);\n\n clearTimer();\n\n timerId.current = window.setTimeout(() => {\n setCodeSendHintVisible(false);\n }, CODE_SEND_HINT_VISIBLE_DURATION);\n }\n }, [prevState, state, clearTimer]);\n\n const getCodeInputError = (): string | boolean => {\n if (state === 'CODE_EXPIRED') {\n return texts.codeErrorExpired || true;\n }\n\n if (state === 'CODE_EXPIRED_ENDED') {\n return texts.codeErrorExpiredEnded || true;\n }\n\n if (state === 'CODE_ERROR') {\n return texts.codeError || true;\n }\n\n return false;\n };\n\n const renderHintButton = () => {\n if (initialScreenHintSlot) {\n return initialScreenHintSlot;\n }\n\n if (mobile) {\n return (\n <ButtonMobile\n onClick={handleSmsHintLinkClick}\n className={styles.smsBtn}\n view='text'\n size='xs'\n >\n {texts.linkToHint}\n </ButtonMobile>\n );\n }\n\n return (\n <Link\n onClick={handleSmsHintLinkClick}\n className={styles.smsComeLink}\n view={mobile ? 'primary' : 'secondary'}\n pseudo={true}\n >\n {texts.linkToHint}\n </Link>\n );\n };\n\n const processing = ['CODE_CHECKING', 'CODE_SENDING'].includes(state);\n\n const timePassed = timeLeft === 0;\n\n const ComponentCodeInput = mobile ? CodeInputMobile : CodeInputDesktop;\n\n return (\n <div className={cn(styles.component, styles[alignContent])}>\n <Header mobile={mobile}>{texts.title}</Header>\n\n {phone ? (\n <Text\n view='primary-medium'\n color='primary'\n className={cn(styles.phone, {\n [styles.typographyTheme]: !mobile,\n [styles.typographyThemeMobile]: mobile,\n })}\n >\n Отправили на {phone}\n </Text>\n ) : null}\n <ComponentCodeInput\n disabled={processing}\n error={getCodeInputError()}\n ref={inputRef}\n fields={requiredCharAmount}\n className={cn(styles.containerInput, styles.codeInput)}\n onComplete={handleInputComplete}\n onChange={handleInputChange}\n clearCodeOnError={clearCodeOnError}\n errorVisibleDuration={errorVisibleDuration}\n onErrorAnimationEnd={handleErrorAnimationEnd}\n />\n {!hideCountdownSection && (\n <CountdownSection\n processing={processing}\n timePassed={timePassed}\n codeSendHintVisible={codeSendHintVisible}\n handleSmsRetryClick={handleSmsRetryClick}\n mobile={mobile}\n />\n )}\n\n {renderHintButton()}\n </div>\n );\n};\n"],"names":[],"mappings":";;;;;;;;;;;;;AAyBA,MAAM,+BAA+B,GAAG,IAAI;MAE/B,OAAO,GAAqB,CAAC,EAAE,MAAM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AAA,kBAAkB,IACf,QAAQ,EAAE,UAAU,EACpB,KAAK,EAAE,iBAAiB,EAAE,EAC1B,GAAG,EAAE,QAAQ,EACb,MAAM,EAAE,kBAAkB,EAC1B,SAAS,EAAE,EAAE,CAAC,MAAM,CAAC,cAAc,EAAE,MAAM,CAAC,SAAS,CAAC,EACtD,UAAU,EAAE,mBAAmB,EAC/B,QAAQ,EAAE,iBAAiB,EAC3B,gBAAgB,EAAE,gBAAgB,EAClC,oBAAoB,EAAE,oBAAoB,EAC1C,mBAAmB,EAAE,uBAAuB,EAC9C,CAAA;QACD,CAAC,oBAAoB,KAClB,KAAC,CAAA,aAAA,CAAA,gBAAgB,EACb,EAAA,UAAU,EAAE,UAAU,EACtB,UAAU,EAAE,UAAU,EACtB,mBAAmB,EAAE,mBAAmB,EACxC,mBAAmB,EAAE,mBAAmB,EACxC,MAAM,EAAE,MAAM,EAAA,CAChB,CACL;QAEA,gBAAgB,EAAE,CACjB;AAEd;;;;"}
|
|
1
|
+
{"version":3,"file":"component.js","sources":["../../../../src/components/screens/initial/component.tsx"],"sourcesContent":["import React, { type FC, useCallback, useContext, useEffect, useRef, useState } from 'react';\nimport cn from 'classnames';\n\nimport { ButtonMobile } from '@alfalab/core-components-button/mobile';\nimport { CodeInputDesktop } from '@alfalab/core-components-code-input/desktop';\nimport { CodeInputMobile } from '@alfalab/core-components-code-input/mobile';\nimport {\n type BaseCodeInputProps,\n type CustomInputRef,\n} from '@alfalab/core-components-code-input/shared';\nimport { Link } from '@alfalab/core-components-link';\nimport { Text } from '@alfalab/core-components-typography';\nimport { useLayoutEffect_SAFE_FOR_SSR, usePrevious } from '@alfalab/hooks';\n\nimport { ConfirmationContext } from '../../../context';\nimport { Header } from '../../header';\n\nimport { CountdownSection } from './countdown-section';\n\nimport styles from './index.module.css';\n\nexport type InitialProps = {\n /**\n * Отображать в мобильной версии экран компонента\n */\n mobile?: boolean;\n};\n\nconst CODE_SEND_HINT_VISIBLE_DURATION = 2000;\n\nexport const Initial: FC<InitialProps> = ({ mobile }) => {\n const {\n state,\n alignContent,\n titleTag,\n texts,\n requiredCharAmount,\n timeLeft,\n phone,\n clearCodeOnError,\n hideCountdownSection,\n initialScreenHintSlot,\n errorVisibleDuration,\n onChangeState,\n onInputFinished,\n onChangeScreen,\n onSmsRetryClick,\n } = useContext(ConfirmationContext);\n\n const prevState = usePrevious(state);\n\n const inputRef = useRef<CustomInputRef>(null);\n\n const [codeSendHintVisible, setCodeSendHintVisible] = useState(false);\n\n const timerId = useRef(0);\n\n const handleInputComplete: BaseCodeInputProps['onComplete'] = (code) => {\n onInputFinished(code);\n };\n\n const handleSmsHintLinkClick = () => {\n onChangeScreen('HINT');\n };\n\n const handleInputChange = () => {\n if (state === 'CODE_ERROR') {\n onChangeState('INITIAL');\n }\n };\n\n const handleSmsRetryClick = () => {\n if (inputRef.current) {\n inputRef.current.reset();\n }\n\n onSmsRetryClick();\n };\n\n const handleErrorAnimationEnd = () => {\n if (clearCodeOnError && state !== 'INITIAL') {\n onChangeState('INITIAL');\n }\n };\n\n const clearTimer = useCallback(() => {\n window.clearTimeout(timerId.current);\n }, []);\n\n useEffect(() => {\n if (inputRef.current) {\n inputRef.current.focus();\n }\n\n return () => {\n clearTimer();\n };\n }, [clearTimer]);\n\n useEffect(() => {\n if (!inputRef.current) {\n return;\n }\n\n if (prevState === 'CODE_SENDING' && state !== 'CODE_SENDING') {\n inputRef.current.focus();\n }\n }, [prevState, state, requiredCharAmount]);\n\n useLayoutEffect_SAFE_FOR_SSR(() => {\n if (prevState === 'CODE_SENDING' && state !== 'CODE_SENDING') {\n setCodeSendHintVisible(true);\n\n clearTimer();\n\n timerId.current = window.setTimeout(() => {\n setCodeSendHintVisible(false);\n }, CODE_SEND_HINT_VISIBLE_DURATION);\n }\n }, [prevState, state, clearTimer]);\n\n const getCodeInputError = (): string | boolean => {\n if (state === 'CODE_EXPIRED') {\n return texts.codeErrorExpired || true;\n }\n\n if (state === 'CODE_EXPIRED_ENDED') {\n return texts.codeErrorExpiredEnded || true;\n }\n\n if (state === 'CODE_ERROR') {\n return texts.codeError || true;\n }\n\n return false;\n };\n\n const renderHintButton = () => {\n if (initialScreenHintSlot) {\n return initialScreenHintSlot;\n }\n\n if (mobile) {\n return (\n <ButtonMobile\n onClick={handleSmsHintLinkClick}\n className={styles.smsBtn}\n view='text'\n size='xs'\n >\n {texts.linkToHint}\n </ButtonMobile>\n );\n }\n\n return (\n <Link\n onClick={handleSmsHintLinkClick}\n className={styles.smsComeLink}\n view={mobile ? 'primary' : 'secondary'}\n pseudo={true}\n >\n {texts.linkToHint}\n </Link>\n );\n };\n\n const processing = ['CODE_CHECKING', 'CODE_SENDING'].includes(state);\n\n const timePassed = timeLeft === 0;\n\n const ComponentCodeInput = mobile ? CodeInputMobile : CodeInputDesktop;\n\n return (\n <div className={cn(styles.component, styles[alignContent])}>\n <Header mobile={mobile} titleTag={titleTag}>\n {texts.title}\n </Header>\n\n {phone ? (\n <Text\n view='primary-medium'\n color='primary'\n className={cn(styles.phone, {\n [styles.typographyTheme]: !mobile,\n [styles.typographyThemeMobile]: mobile,\n })}\n >\n Отправили на {phone}\n </Text>\n ) : null}\n <ComponentCodeInput\n disabled={processing}\n error={getCodeInputError()}\n ref={inputRef}\n fields={requiredCharAmount}\n className={cn(styles.containerInput, styles.codeInput)}\n onComplete={handleInputComplete}\n onChange={handleInputChange}\n clearCodeOnError={clearCodeOnError}\n errorVisibleDuration={errorVisibleDuration}\n onErrorAnimationEnd={handleErrorAnimationEnd}\n />\n {!hideCountdownSection && (\n <CountdownSection\n processing={processing}\n timePassed={timePassed}\n codeSendHintVisible={codeSendHintVisible}\n handleSmsRetryClick={handleSmsRetryClick}\n mobile={mobile}\n />\n )}\n\n {renderHintButton()}\n </div>\n );\n};\n"],"names":[],"mappings":";;;;;;;;;;;;;AA4BA,MAAM,+BAA+B,GAAG,IAAI;MAE/B,OAAO,GAAqB,CAAC,EAAE,MAAM,EAAE,KAAI;AACpD,IAAA,MAAM,EAC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CAAA,aAAA,CAAA,kBAAkB,IACf,QAAQ,EAAE,UAAU,EACpB,KAAK,EAAE,iBAAiB,EAAE,EAC1B,GAAG,EAAE,QAAQ,EACb,MAAM,EAAE,kBAAkB,EAC1B,SAAS,EAAE,EAAE,CAAC,MAAM,CAAC,cAAc,EAAE,MAAM,CAAC,SAAS,CAAC,EACtD,UAAU,EAAE,mBAAmB,EAC/B,QAAQ,EAAE,iBAAiB,EAC3B,gBAAgB,EAAE,gBAAgB,EAClC,oBAAoB,EAAE,oBAAoB,EAC1C,mBAAmB,EAAE,uBAAuB,EAC9C,CAAA;QACD,CAAC,oBAAoB,KAClB,KAAC,CAAA,aAAA,CAAA,gBAAgB,EACb,EAAA,UAAU,EAAE,UAAU,EACtB,UAAU,EAAE,UAAU,EACtB,mBAAmB,EAAE,mBAAmB,EACxC,mBAAmB,EAAE,mBAAmB,EACxC,MAAM,EAAE,MAAM,EAAA,CAChB,CACL;QAEA,gBAAgB,EAAE,CACjB;AAEd;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"countdown-section.js","sources":["../../../../src/components/screens/initial/countdown-section.tsx"],"sourcesContent":["import React, { FC, Fragment, ReactNode, useContext } from 'react';\nimport cn from 'classnames';\n\nimport { Button } from '@alfalab/core-components-button';\nimport { Spinner } from '@alfalab/core-components-spinner';\nimport { Text } from '@alfalab/core-components-typography';\n\nimport { ConfirmationContext } from '../../../context';\nimport { formatMsAsMinutes } from '../../../utils';\n\nimport styles from './index.module.css';\n\ntype CountdownSectionProps = {\n codeSendHintVisible: boolean;\n timePassed: boolean;\n processing: boolean;\n mobile?: boolean;\n handleSmsRetryClick: () => void;\n};\n\nexport const CountdownSection: FC<CountdownSectionProps> = ({\n codeSendHintVisible,\n timePassed,\n processing,\n mobile,\n handleSmsRetryClick,\n}) => {\n const { state, texts, timeLeft, blockSmsRetry, breakpoint, client } =\n useContext(ConfirmationContext);\n\n const renderText = (content: ReactNode) => (\n <Text\n className={cn(styles.countdownContainer, {\n [styles.countdownMobile]: mobile,\n [styles.typographyTheme]: !mobile,\n })}\n view={mobile ? 'primary-small' : 'primary-medium'}\n tag='div'\n >\n {content}\n </Text>\n );\n\n if (codeSendHintVisible) return renderText(texts.codeSended);\n\n if (processing) {\n return (\n <div\n className={cn(styles.loaderWrap, styles.countdownContainer, {\n [styles.countdownLoaderMobile]: mobile,\n [styles.typographyTheme]: !mobile,\n })}\n >\n <Spinner preset={24} visible={true} />\n\n <span className={styles.loaderText}>\n {state === 'CODE_CHECKING' ? texts.codeChecking : texts.codeSending}\n </span>\n </div>\n );\n }\n\n if (blockSmsRetry) return renderText(texts.noAttemptsLeft);\n\n if (timePassed) {\n return (\n <Button\n size={mobile ? 'xs' : 'xxs'}\n view='secondary'\n onClick={handleSmsRetryClick}\n className={cn(styles.getCodeButton, { [styles.getCodeButtonMobile]: mobile })}\n breakpoint={breakpoint}\n client={client}\n >\n {texts.buttonRetry}\n </Button>\n );\n }\n\n return renderText(\n <Fragment>\n {texts.countdown}\n {'\\u00A0'}\n <time className={styles.timeCounter}>{formatMsAsMinutes(timeLeft)}</time>\n </Fragment>,\n );\n};\n"],"names":[],"mappings":";;;;;;;;;AAoBa,MAAA,gBAAgB,GAA8B,CAAC,EACxD,mBAAmB,EACnB,UAAU,EACV,UAAU,EACV,MAAM,EACN,mBAAmB,GACtB,KAAI;AACD,IAAA,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,EAAE,GAC/D,UAAU,CAAC,mBAAmB,CAAC;AAEnC,IAAA,MAAM,UAAU,GAAG,CAAC,OAAkB,MAClC,KAAA,CAAA,aAAA,CAAC,IAAI,EAAA,EACD,SAAS,EAAE,EAAE,CAAC,MAAM,CAAC,kBAAkB,EAAE;AACrC,YAAA,CAAC,MAAM,CAAC,eAAe,GAAG,MAAM;AAChC,YAAA,CAAC,MAAM,CAAC,eAAe,GAAG,CAAC,MAAM;SACpC,CAAC,EACF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,EAAA,IAAA;AACJ,QAAA,KAAK,CAAC,SAAS;QACf,QAAQ;AACT,QAAA,KAAA,CAAA,aAAA,CAAA,MAAA,EAAA,EAAM,SAAS,EAAE,MAAM,CAAC,WAAW,EAAA,EAAG,iBAAiB,CAAC,QAAQ,CAAC,CAAQ,CAClE,CACd;AACL;;;;"}
|
|
1
|
+
{"version":3,"file":"countdown-section.js","sources":["../../../../src/components/screens/initial/countdown-section.tsx"],"sourcesContent":["import React, { type FC, Fragment, type ReactNode, useContext } from 'react';\nimport cn from 'classnames';\n\nimport { Button } from '@alfalab/core-components-button';\nimport { Spinner } from '@alfalab/core-components-spinner';\nimport { Text } from '@alfalab/core-components-typography';\n\nimport { ConfirmationContext } from '../../../context';\nimport { formatMsAsMinutes } from '../../../utils';\n\nimport styles from './index.module.css';\n\ntype CountdownSectionProps = {\n codeSendHintVisible: boolean;\n timePassed: boolean;\n processing: boolean;\n mobile?: boolean;\n handleSmsRetryClick: () => void;\n};\n\nexport const CountdownSection: FC<CountdownSectionProps> = ({\n codeSendHintVisible,\n timePassed,\n processing,\n mobile,\n handleSmsRetryClick,\n}) => {\n const { state, texts, timeLeft, blockSmsRetry, breakpoint, client } =\n useContext(ConfirmationContext);\n\n const renderText = (content: ReactNode) => (\n <Text\n className={cn(styles.countdownContainer, {\n [styles.countdownMobile]: mobile,\n [styles.typographyTheme]: !mobile,\n })}\n view={mobile ? 'primary-small' : 'primary-medium'}\n tag='div'\n >\n {content}\n </Text>\n );\n\n if (codeSendHintVisible) return renderText(texts.codeSended);\n\n if (processing) {\n return (\n <div\n className={cn(styles.loaderWrap, styles.countdownContainer, {\n [styles.countdownLoaderMobile]: mobile,\n [styles.typographyTheme]: !mobile,\n })}\n >\n <Spinner preset={24} visible={true} />\n\n <span className={styles.loaderText}>\n {state === 'CODE_CHECKING' ? texts.codeChecking : texts.codeSending}\n </span>\n </div>\n );\n }\n\n if (blockSmsRetry) return renderText(texts.noAttemptsLeft);\n\n if (timePassed) {\n return (\n <Button\n size={mobile ? 'xs' : 'xxs'}\n view='secondary'\n onClick={handleSmsRetryClick}\n className={cn(styles.getCodeButton, { [styles.getCodeButtonMobile]: mobile })}\n breakpoint={breakpoint}\n client={client}\n >\n {texts.buttonRetry}\n </Button>\n );\n }\n\n return renderText(\n <Fragment>\n {texts.countdown}\n {'\\u00A0'}\n <time className={styles.timeCounter}>{formatMsAsMinutes(timeLeft)}</time>\n </Fragment>,\n );\n};\n"],"names":[],"mappings":";;;;;;;;;AAoBa,MAAA,gBAAgB,GAA8B,CAAC,EACxD,mBAAmB,EACnB,UAAU,EACV,UAAU,EACV,MAAM,EACN,mBAAmB,GACtB,KAAI;AACD,IAAA,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,EAAE,GAC/D,UAAU,CAAC,mBAAmB,CAAC;AAEnC,IAAA,MAAM,UAAU,GAAG,CAAC,OAAkB,MAClC,KAAA,CAAA,aAAA,CAAC,IAAI,EAAA,EACD,SAAS,EAAE,EAAE,CAAC,MAAM,CAAC,kBAAkB,EAAE;AACrC,YAAA,CAAC,MAAM,CAAC,eAAe,GAAG,MAAM;AAChC,YAAA,CAAC,MAAM,CAAC,eAAe,GAAG,CAAC,MAAM;SACpC,CAAC,EACF,IAAI,EAAE,MAAM,GAAG,eAAe,GAAG,gBAAgB,EACjD,GAAG,EAAC,KAAK,IAER,OAAO,CACL,CACV;AAED,IAAA,IAAI,mBAAmB;AAAE,QAAA,OAAO,UAAU,CAAC,KAAK,CAAC,UAAU,CAAC;AAE5D,IAAA,IAAI,UAAU,EAAE;AACZ,QAAA,QACI,KAAA,CAAA,aAAA,CAAA,KAAA,EAAA,EACI,SAAS,EAAE,EAAE,CAAC,MAAM,CAAC,UAAU,EAAE,MAAM,CAAC,kBAAkB,EAAE;AACxD,gBAAA,CAAC,MAAM,CAAC,qBAAqB,GAAG,MAAM;AACtC,gBAAA,CAAC,MAAM,CAAC,eAAe,GAAG,CA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, 'Helvetica Neue', Helvetica, sans-serif;
|
|
21
21
|
} :root {
|
|
22
22
|
--size-xs-height: 40px;
|
|
23
23
|
} :root {
|
|
@@ -26,62 +26,60 @@
|
|
|
26
26
|
--confirmation-text-font-weight: 400;
|
|
27
27
|
--confirmation-text-font-family: var(--font-family-system);
|
|
28
28
|
--confirmation-text-color: var(--color-light-text-primary)
|
|
29
|
-
|
|
30
|
-
/* header */
|
|
31
|
-
} .confirmation__component_1nb2w {
|
|
29
|
+
} .confirmation__component_1s4y8 {
|
|
32
30
|
display: flex;
|
|
33
31
|
flex-direction: column;
|
|
34
|
-
} .
|
|
32
|
+
} .confirmation__phone_1s4y8.confirmation__phone_1s4y8 {
|
|
35
33
|
color: var(--color-light-text-primary);
|
|
36
34
|
margin-bottom: var(--gap-32);
|
|
37
|
-
} .
|
|
35
|
+
} .confirmation__typographyTheme_1s4y8.confirmation__typographyTheme_1s4y8 {
|
|
38
36
|
font-size: var(--confirmation-text-font-size);
|
|
39
37
|
line-height: var(--confirmation-text-line-height);
|
|
40
38
|
font-weight: var(--confirmation-text-font-weight);
|
|
41
39
|
font-family: var(--confirmation-text-font-family);
|
|
42
40
|
color: var(--confirmation-text-color);
|
|
43
|
-
} .
|
|
41
|
+
} .confirmation__typographyThemeMobile_1s4y8.confirmation__typographyThemeMobile_1s4y8 {
|
|
44
42
|
color: var(--color-light-text-secondary);
|
|
45
|
-
} .
|
|
43
|
+
} .confirmation__compact_1s4y8 {
|
|
46
44
|
margin-bottom: var(--gap-24);
|
|
47
|
-
} .
|
|
45
|
+
} .confirmation__loaderWrap_1s4y8 {
|
|
48
46
|
display: flex;
|
|
49
47
|
align-items: center;
|
|
50
|
-
} .
|
|
48
|
+
} .confirmation__left_1s4y8 {
|
|
51
49
|
align-items: flex-start;
|
|
52
|
-
} .
|
|
50
|
+
} .confirmation__center_1s4y8 {
|
|
53
51
|
align-items: center;
|
|
54
|
-
text-align: center
|
|
55
|
-
} .
|
|
52
|
+
text-align: center;
|
|
53
|
+
} .confirmation__center_1s4y8 .confirmation__loaderWrap_1s4y8 {
|
|
56
54
|
justify-content: center;
|
|
57
|
-
} .
|
|
55
|
+
} .confirmation__codeInput_1s4y8 {
|
|
58
56
|
margin-bottom: var(--gap-12);
|
|
59
|
-
} .
|
|
57
|
+
} .confirmation__smsBtn_1s4y8.confirmation__smsBtn_1s4y8 {
|
|
60
58
|
min-height: var(--size-xs-height);
|
|
61
|
-
} .
|
|
59
|
+
} .confirmation__smsComeLink_1s4y8.confirmation__smsComeLink_1s4y8 {
|
|
62
60
|
font-size: 14px;
|
|
63
61
|
line-height: 20px;
|
|
64
62
|
font-weight: 500;
|
|
65
|
-
} .
|
|
63
|
+
} .confirmation__countdownContainer_1s4y8.confirmation__countdownContainer_1s4y8 {
|
|
66
64
|
color: var(--color-light-text-secondary);
|
|
67
65
|
margin-bottom: var(--gap-24);
|
|
68
|
-
} .
|
|
66
|
+
} .confirmation__countdownMobile_1s4y8.confirmation__countdownMobile_1s4y8 {
|
|
69
67
|
margin-bottom: var(--gap-20);
|
|
70
|
-
} .
|
|
68
|
+
} .confirmation__countdownLoaderMobile_1s4y8.confirmation__countdownLoaderMobile_1s4y8 {
|
|
71
69
|
margin-bottom: var(--gap-16);
|
|
72
|
-
} .
|
|
70
|
+
} .confirmation__timeCounter_1s4y8 {
|
|
73
71
|
display: inline-block;
|
|
74
72
|
min-width: 47px;
|
|
75
73
|
color: var(--color-light-text-secondary);
|
|
76
74
|
text-align: left;
|
|
77
75
|
font-feature-settings: lining-nums tabular-nums;
|
|
78
76
|
font-variant-numeric: lining-nums tabular-nums;
|
|
79
|
-
} .
|
|
77
|
+
} .confirmation__getCodeButton_1s4y8 {
|
|
80
78
|
position: relative;
|
|
81
79
|
top: var(--gap-4-neg);
|
|
82
80
|
margin-bottom: var(--gap-16);
|
|
83
|
-
} .
|
|
81
|
+
} .confirmation__getCodeButtonMobile_1s4y8 {
|
|
84
82
|
margin-bottom: var(--gap-0);
|
|
85
|
-
} .
|
|
83
|
+
} .confirmation__containerInput_1s4y8 {
|
|
86
84
|
min-height: 80px;
|
|
87
85
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import './index.css';
|
|
2
2
|
|
|
3
|
-
const styles = {"component":"
|
|
3
|
+
const styles = {"component":"confirmation__component_1s4y8","phone":"confirmation__phone_1s4y8","typographyTheme":"confirmation__typographyTheme_1s4y8","typographyThemeMobile":"confirmation__typographyThemeMobile_1s4y8","compact":"confirmation__compact_1s4y8","loaderWrap":"confirmation__loaderWrap_1s4y8","left":"confirmation__left_1s4y8","center":"confirmation__center_1s4y8","codeInput":"confirmation__codeInput_1s4y8","smsBtn":"confirmation__smsBtn_1s4y8","smsComeLink":"confirmation__smsComeLink_1s4y8","countdownContainer":"confirmation__countdownContainer_1s4y8","countdownMobile":"confirmation__countdownMobile_1s4y8","countdownLoaderMobile":"confirmation__countdownLoaderMobile_1s4y8","timeCounter":"confirmation__timeCounter_1s4y8","getCodeButton":"confirmation__getCodeButton_1s4y8","getCodeButtonMobile":"confirmation__getCodeButtonMobile_1s4y8","containerInput":"confirmation__containerInput_1s4y8"};
|
|
4
4
|
|
|
5
5
|
export { styles as default };
|
|
6
6
|
//# sourceMappingURL=index.module.css.js.map
|
|
@@ -8,7 +8,7 @@ import { Header } from '../../header/component.js';
|
|
|
8
8
|
import styles from './index.module.css.js';
|
|
9
9
|
|
|
10
10
|
const TempBlock = ({ mobile }) => {
|
|
11
|
-
const { alignContent, texts, tempBlockDuration, onChangeScreen, onTempBlockFinished } = useContext(ConfirmationContext);
|
|
11
|
+
const { alignContent, titleTag, texts, tempBlockDuration, onChangeScreen, onTempBlockFinished, } = useContext(ConfirmationContext);
|
|
12
12
|
const [timeLeft, startTimer] = useCountdown(tempBlockDuration);
|
|
13
13
|
useEffect(() => {
|
|
14
14
|
startTimer();
|
|
@@ -19,7 +19,7 @@ const TempBlock = ({ mobile }) => {
|
|
|
19
19
|
}
|
|
20
20
|
}, [timeLeft, onChangeScreen, onTempBlockFinished]);
|
|
21
21
|
return (React.createElement("div", { className: cn(styles.component, styles[alignContent]) },
|
|
22
|
-
React.createElement(Header, { mobile: mobile }, texts.tempBlockTitle),
|
|
22
|
+
React.createElement(Header, { mobile: mobile, titleTag: titleTag }, texts.tempBlockTitle),
|
|
23
23
|
React.createElement(Text, { view: 'primary-medium', color: 'primary', className: cn(styles.description, {
|
|
24
24
|
[styles.typographyTheme]: !mobile,
|
|
25
25
|
[styles.typographyThemeMobile]: mobile,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"component.js","sources":["../../../../src/components/screens/temp-block/component.tsx"],"sourcesContent":["import React, { FC, useContext, useEffect } from 'react';\nimport cn from 'classnames';\n\nimport { Text } from '@alfalab/core-components-typography';\n\nimport { ConfirmationContext } from '../../../context';\nimport { formatMsAsMinutes, useCountdown } from '../../../utils';\nimport { CountdownLoader } from '../../countdown-loader';\nimport { Header } from '../../header';\n\nimport styles from './index.module.css';\n\nexport type TempBlockProps = {\n /**\n * Отображать в мобильной версии экран компонента\n */\n mobile?: boolean;\n};\n\nexport const TempBlock: FC<TempBlockProps> = ({ mobile }) => {\n const {
|
|
1
|
+
{"version":3,"file":"component.js","sources":["../../../../src/components/screens/temp-block/component.tsx"],"sourcesContent":["import React, { type FC, useContext, useEffect } from 'react';\nimport cn from 'classnames';\n\nimport { Text } from '@alfalab/core-components-typography';\n\nimport { ConfirmationContext } from '../../../context';\nimport { formatMsAsMinutes, useCountdown } from '../../../utils';\nimport { CountdownLoader } from '../../countdown-loader';\nimport { Header } from '../../header';\n\nimport styles from './index.module.css';\n\nexport type TempBlockProps = {\n /**\n * Отображать в мобильной версии экран компонента\n */\n mobile?: boolean;\n};\n\nexport const TempBlock: FC<TempBlockProps> = ({ mobile }) => {\n const {\n alignContent,\n titleTag,\n texts,\n tempBlockDuration,\n onChangeScreen,\n onTempBlockFinished,\n } = useContext(ConfirmationContext);\n\n const [timeLeft, startTimer] = useCountdown(tempBlockDuration);\n\n useEffect(() => {\n startTimer();\n }, [startTimer]);\n\n useEffect(() => {\n if (timeLeft === 0 && onTempBlockFinished) {\n onTempBlockFinished();\n }\n }, [timeLeft, onChangeScreen, onTempBlockFinished]);\n\n return (\n <div className={cn(styles.component, styles[alignContent])}>\n <Header mobile={mobile} titleTag={titleTag}>\n {texts.tempBlockTitle}\n </Header>\n\n <Text\n view='primary-medium'\n color='primary'\n className={cn(styles.description, {\n [styles.typographyTheme]: !mobile,\n [styles.typographyThemeMobile]: mobile,\n })}\n >\n {texts.tempBlockDescription}\n </Text>\n\n <div className={cn(styles.countdownWrap, { [styles.typographyTheme]: !mobile })}>\n <CountdownLoader\n progress={1 - timeLeft / tempBlockDuration}\n className={styles.loader}\n />\n <time className={styles.timeCounter}>{formatMsAsMinutes(timeLeft)}</time>\n </div>\n </div>\n );\n};\n"],"names":[],"mappings":";;;;;;;;;MAmBa,SAAS,GAAuB,CAAC,EAAE,MAAM,EAAE,KAAI;AACxD,IAAA,MAAM,EACF,YAAY,EACZ,QAAQ,EACR,KAAK,EACL,iBAAiB,EACjB,cAAc,EACd,mBAAmB,GACtB,GAAG,UAAU,CAAC,mBAAmB,CAAC;IAEnC,MAAM,CAAC,QAAQ,EAAE,UAAU,CAAC,GAAG,YAAY,CAAC,iBAAiB,CAAC;IAE9D,SAAS,CAAC,MAAK;AACX,QAAA,UAAU,EAAE;AAChB,KAAC,EAAE,CAAC,UAAU,CAAC,CAAC;IAEhB,SAAS,CAAC,MAAK;AACX,QAAA,IAAI,QAAQ,KAAK,CAAC,IAAI,mBAAmB,EAAE;AACvC,YAAA,mBAAmB,EAAE;AACxB;KACJ,EAAE,CAAC,QAAQ,EAAE,cAAc,EAAE,mBAAmB,CAAC,CAAC;AAEnD,IAAA,QACI,KAAA,CAAA,aAAA,CAAA,KAAA,EAAA,EAAK,SAAS,EAAE,EAAE,CAAC,MAAM,CAAC,SAAS,EAAE,MAAM,CAAC,YAAY,CAAC,CAAC,EAAA;AACtD,QAAA,KAAA,CAAA,aAAA,CAAC,MAAM,EAAA,EAAC,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,QAAQ,EAAA,EACrC,KAAK,CAAC,cAAc,CAChB;AAET,QAAA,KAAA,CAAA,aAAA,CAAC,IAAI,EACD,EAAA,IAAI,EAAC,gBAAgB,EACrB,KAAK,EAAC,SAAS,EACf,SAAS,EAAE,EAAE,CAAC,MAAM,CAAC,WAAW,EAAE;AAC9B,gBAAA,CAAC,MAAM,CAAC,eAAe,GAAG,CAAC,MAAM;AACjC,gBAAA,CAAC,MAAM,CAAC,qBAAqB,GAAG,MAAM;AACzC,aAAA,CAAC,EAED,EAAA,KAAK,CAAC,oBAAoB,CACxB;AAEP,QAAA,KAAA,CAAA,aAAA,CAAA,KAAA,EAAA,EAAK,SAAS,EAAE,EAAE,CAAC,MAAM,CAAC,aAAa,EAAE,EAAE,CAAC,MAAM,CAAC,eAAe,GAAG,CAAC,MAAM,EAAE,CAAC,EAAA;AAC3E,YAAA,KAAA,CAAA,aAAA,CAAC,eAAe,EAAA,EACZ,QAAQ,EAAE,CAAC,GAAG,QAAQ,GAAG,iBAAiB,EAC1C,SAAS,EAAE,MAAM,CAAC,MAAM,EAC1B,CAAA;AACF,YAAA,KAAA,CAAA,aAAA,CAAA,MAAA,EAAA,EAAM,SAAS,EAAE,MAAM,CAAC,WAAW,EAAG,EAAA,iBAAiB,CAAC,QAAQ,CAAC,CAAQ,CACvE,CACJ;AAEd;;;;"}
|
|
@@ -5,42 +5,40 @@
|
|
|
5
5
|
--gap-xs: 8px;
|
|
6
6
|
--gap-8: var(--gap-xs);
|
|
7
7
|
} :root {
|
|
8
|
-
--font-family-system:
|
|
9
|
-
sans-serif;
|
|
8
|
+
--font-family-system:
|
|
9
|
+
system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Helvetica, sans-serif;
|
|
10
10
|
} :root {
|
|
11
11
|
--confirmation-text-font-size: 16px;
|
|
12
12
|
--confirmation-text-line-height: 24px;
|
|
13
13
|
--confirmation-text-font-weight: 400;
|
|
14
14
|
--confirmation-text-font-family: var(--font-family-system);
|
|
15
15
|
--confirmation-text-color: var(--color-light-text-primary)
|
|
16
|
-
|
|
17
|
-
/* header */
|
|
18
|
-
} .confirmation__component_vppvo {
|
|
16
|
+
} .confirmation__component_10jl7 {
|
|
19
17
|
display: flex;
|
|
20
18
|
flex-direction: column;
|
|
21
|
-
} .
|
|
19
|
+
} .confirmation__center_10jl7 {
|
|
22
20
|
align-items: center;
|
|
23
21
|
text-align: center;
|
|
24
|
-
} .
|
|
22
|
+
} .confirmation__typographyTheme_10jl7.confirmation__typographyTheme_10jl7 {
|
|
25
23
|
font-size: var(--confirmation-text-font-size);
|
|
26
24
|
line-height: var(--confirmation-text-line-height);
|
|
27
25
|
font-weight: var(--confirmation-text-font-weight);
|
|
28
26
|
font-family: var(--confirmation-text-font-family);
|
|
29
27
|
color: var(--confirmation-text-color);
|
|
30
|
-
} .
|
|
28
|
+
} .confirmation__typographyThemeMobile_10jl7.confirmation__typographyThemeMobile_10jl7 {
|
|
31
29
|
color: var(--color-light-text-secondary);
|
|
32
|
-
} .
|
|
30
|
+
} .confirmation__description_10jl7.confirmation__description_10jl7 {
|
|
33
31
|
margin-bottom: var(--gap-8);
|
|
34
|
-
} .
|
|
32
|
+
} .confirmation__countdownWrap_10jl7 {
|
|
35
33
|
display: flex;
|
|
36
34
|
align-items: center;
|
|
37
|
-
} .
|
|
35
|
+
} .confirmation__timeCounter_10jl7 {
|
|
38
36
|
display: inline-block;
|
|
39
37
|
min-width: 47px;
|
|
40
38
|
color: var(--color-light-text-secondary);
|
|
41
39
|
text-align: left;
|
|
42
40
|
font-feature-settings: lining-nums tabular-nums;
|
|
43
41
|
font-variant-numeric: lining-nums tabular-nums;
|
|
44
|
-
} .
|
|
42
|
+
} .confirmation__loader_10jl7 {
|
|
45
43
|
margin-right: var(--gap-8);
|
|
46
44
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import './index.css';
|
|
2
2
|
|
|
3
|
-
const styles = {"component":"
|
|
3
|
+
const styles = {"component":"confirmation__component_10jl7","center":"confirmation__center_10jl7","typographyTheme":"confirmation__typographyTheme_10jl7","typographyThemeMobile":"confirmation__typographyThemeMobile_10jl7","description":"confirmation__description_10jl7","countdownWrap":"confirmation__countdownWrap_10jl7","timeCounter":"confirmation__timeCounter_10jl7","loader":"confirmation__loader_10jl7"};
|
|
4
4
|
|
|
5
5
|
export { styles as default };
|
|
6
6
|
//# sourceMappingURL=index.module.css.js.map
|
|
@@ -7,13 +7,13 @@ import { Header } from '../../header/component.js';
|
|
|
7
7
|
import styles from './index.module.css.js';
|
|
8
8
|
|
|
9
9
|
const TempBlockOver = ({ mobile }) => {
|
|
10
|
-
const { alignContent, texts, breakpoint, client, onChangeScreen, onChangeState } = useContext(ConfirmationContext);
|
|
10
|
+
const { alignContent, titleTag, texts, breakpoint, client, onChangeScreen, onChangeState } = useContext(ConfirmationContext);
|
|
11
11
|
const handleReturnButtonClick = () => {
|
|
12
12
|
onChangeScreen('INITIAL');
|
|
13
13
|
onChangeState('INITIAL');
|
|
14
14
|
};
|
|
15
15
|
return (React.createElement("div", { className: cn(styles.component, styles[alignContent]) },
|
|
16
|
-
React.createElement(Header, { mobile: mobile }, texts.tempBlockOverTitle),
|
|
16
|
+
React.createElement(Header, { mobile: mobile, titleTag: titleTag }, texts.tempBlockOverTitle),
|
|
17
17
|
React.createElement(Text, { view: 'primary-medium', color: 'primary', className: cn(styles.description, {
|
|
18
18
|
[styles.typographyTheme]: !mobile,
|
|
19
19
|
[styles.typographyThemeMobile]: mobile,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"component.js","sources":["../../../../src/components/screens/temp-block-over/component.tsx"],"sourcesContent":["import React, { FC, useContext } from 'react';\nimport cn from 'classnames';\n\nimport { Button } from '@alfalab/core-components-button';\nimport { Text } from '@alfalab/core-components-typography';\n\nimport { ConfirmationContext } from '../../../context';\nimport { Header } from '../../header';\n\nimport styles from './index.module.css';\n\nexport type TempBlockOverProps = {\n /**\n * Отображать в мобильной версии экран компонента\n */\n mobile?: boolean;\n};\n\nexport const TempBlockOver: FC<TempBlockOverProps> = ({ mobile }) => {\n const { alignContent, texts, breakpoint, client, onChangeScreen, onChangeState } =\n useContext(ConfirmationContext);\n\n const handleReturnButtonClick = () => {\n onChangeScreen('INITIAL');\n onChangeState('INITIAL');\n };\n\n return (\n <div className={cn(styles.component, styles[alignContent])}>\n <Header mobile={mobile}
|
|
1
|
+
{"version":3,"file":"component.js","sources":["../../../../src/components/screens/temp-block-over/component.tsx"],"sourcesContent":["import React, { type FC, useContext } from 'react';\nimport cn from 'classnames';\n\nimport { Button } from '@alfalab/core-components-button';\nimport { Text } from '@alfalab/core-components-typography';\n\nimport { ConfirmationContext } from '../../../context';\nimport { Header } from '../../header';\n\nimport styles from './index.module.css';\n\nexport type TempBlockOverProps = {\n /**\n * Отображать в мобильной версии экран компонента\n */\n mobile?: boolean;\n};\n\nexport const TempBlockOver: FC<TempBlockOverProps> = ({ mobile }) => {\n const { alignContent, titleTag, texts, breakpoint, client, onChangeScreen, onChangeState } =\n useContext(ConfirmationContext);\n\n const handleReturnButtonClick = () => {\n onChangeScreen('INITIAL');\n onChangeState('INITIAL');\n };\n\n return (\n <div className={cn(styles.component, styles[alignContent])}>\n <Header mobile={mobile} titleTag={titleTag}>\n {texts.tempBlockOverTitle}\n </Header>\n\n <Text\n view='primary-medium'\n color='primary'\n className={cn(styles.description, {\n [styles.typographyTheme]: !mobile,\n [styles.typographyThemeMobile]: mobile,\n })}\n >\n {texts.tempBlockOverDescription}\n </Text>\n\n <Button\n size={mobile ? 'xs' : 's'}\n view='secondary'\n onClick={handleReturnButtonClick}\n className={styles.button}\n breakpoint={breakpoint}\n client={client}\n >\n {texts.tempBlockOverButton}\n </Button>\n </div>\n );\n};\n"],"names":[],"mappings":";;;;;;;;MAkBa,aAAa,GAA2B,CAAC,EAAE,MAAM,EAAE,KAAI;IAChE,MAAM,EAAE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
|
-
sans-serif;
|
|
8
|
+
--font-family-system:
|
|
9
|
+
system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Helvetica, sans-serif;
|
|
10
10
|
} :root {
|
|
11
11
|
--confirmation-text-font-size: 16px;
|
|
12
12
|
--confirmation-text-line-height: 24px;
|
|
13
13
|
--confirmation-text-font-weight: 400;
|
|
14
14
|
--confirmation-text-font-family: var(--font-family-system);
|
|
15
15
|
--confirmation-text-color: var(--color-light-text-primary)
|
|
16
|
-
|
|
17
|
-
/* header */
|
|
18
|
-
} .confirmation__component_1biyi {
|
|
16
|
+
} .confirmation__component_1a8b9 {
|
|
19
17
|
display: flex;
|
|
20
18
|
flex-direction: column;
|
|
21
|
-
} .
|
|
19
|
+
} .confirmation__center_1a8b9 {
|
|
22
20
|
align-items: center;
|
|
23
21
|
text-align: center;
|
|
24
|
-
} .
|
|
22
|
+
} .confirmation__typographyTheme_1a8b9.confirmation__typographyTheme_1a8b9 {
|
|
25
23
|
font-size: var(--confirmation-text-font-size);
|
|
26
24
|
line-height: var(--confirmation-text-line-height);
|
|
27
25
|
font-weight: var(--confirmation-text-font-weight);
|
|
28
26
|
font-family: var(--confirmation-text-font-family);
|
|
29
27
|
color: var(--confirmation-text-color);
|
|
30
|
-
} .
|
|
28
|
+
} .confirmation__typographyThemeMobile_1a8b9.confirmation__typographyThemeMobile_1a8b9 {
|
|
31
29
|
color: var(--color-light-text-secondary);
|
|
32
|
-
} .
|
|
30
|
+
} .confirmation__button_1a8b9.confirmation__button_1a8b9 {
|
|
33
31
|
margin-top: var(--gap-32);
|
|
34
32
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import './index.css';
|
|
2
2
|
|
|
3
|
-
const styles = {"component":"
|
|
3
|
+
const styles = {"component":"confirmation__component_1a8b9","center":"confirmation__center_1a8b9","typographyTheme":"confirmation__typographyTheme_1a8b9","typographyThemeMobile":"confirmation__typographyThemeMobile_1a8b9","button":"confirmation__button_1a8b9"};
|
|
4
4
|
|
|
5
5
|
export { styles as default };
|
|
6
6
|
//# sourceMappingURL=index.module.css.js.map
|
package/modern/context.d.ts
CHANGED
package/modern/context.js
CHANGED
package/modern/context.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"context.js","sources":["../src/context.ts"],"sourcesContent":["import { createContext } from 'react';\n\nimport { TConfirmationContext } from './types';\nimport { ONE_DAY, ONE_MINUTE } from './utils';\n\nconst mockFn = () => undefined;\n\nexport const ConfirmationContext = createContext<TConfirmationContext>({\n alignContent: 'left',\n texts: {},\n state: 'INITIAL',\n screen: 'INITIAL',\n requiredCharAmount: 5,\n countdownDuration: ONE_MINUTE,\n timeLeft: ONE_MINUTE,\n tempBlockDuration: ONE_DAY,\n phone: '',\n hideCountdownSection: false,\n breakpoint: 1024,\n client: 'desktop',\n initialScreenHintSlot: null,\n onTempBlockFinished: mockFn,\n onInputFinished: mockFn,\n onChangeState: mockFn,\n onSmsRetryClick: mockFn,\n onChangeScreen: mockFn,\n onFatalErrorOkButtonClick: mockFn,\n});\n"],"names":[],"mappings":";;;AAKA,MAAM,MAAM,GAAG,MAAM,SAAS;AAEvB,MAAM,mBAAmB,GAAG,aAAa,CAAuB;AACnE,IAAA,YAAY,EAAE,MAAM;AACpB,IAAA,KAAK,EAAE,EAAE;AACT,IAAA,KAAK,EAAE,SAAS;AAChB,IAAA,MAAM,EAAE,SAAS;AACjB,IAAA,kBAAkB,EAAE,CAAC;AACrB,IAAA,iBAAiB,EAAE,UAAU;AAC7B,IAAA,QAAQ,EAAE,UAAU;AACpB,IAAA,iBAAiB,EAAE,OAAO;AAC1B,IAAA,KAAK,EAAE,EAAE;AACT,IAAA,oBAAoB,EAAE,KAAK;AAC3B,IAAA,UAAU,EAAE,IAAI;AAChB,IAAA,MAAM,EAAE,SAAS;AACjB,IAAA,qBAAqB,EAAE,IAAI;AAC3B,IAAA,mBAAmB,EAAE,MAAM;AAC3B,IAAA,eAAe,EAAE,MAAM;AACvB,IAAA,aAAa,EAAE,MAAM;AACrB,IAAA,eAAe,EAAE,MAAM;AACvB,IAAA,cAAc,EAAE,MAAM;AACtB,IAAA,yBAAyB,EAAE,MAAM;AACpC,CAAA;;;;"}
|
|
1
|
+
{"version":3,"file":"context.js","sources":["../src/context.ts"],"sourcesContent":["import { createContext } from 'react';\n\nimport { type TConfirmationContext } from './types';\nimport { ONE_DAY, ONE_MINUTE } from './utils';\n\nconst mockFn = () => undefined;\n\nexport const ConfirmationContext = createContext<TConfirmationContext>({\n alignContent: 'left',\n titleTag: 'h3',\n texts: {},\n state: 'INITIAL',\n screen: 'INITIAL',\n requiredCharAmount: 5,\n countdownDuration: ONE_MINUTE,\n timeLeft: ONE_MINUTE,\n tempBlockDuration: ONE_DAY,\n phone: '',\n hideCountdownSection: false,\n breakpoint: 1024,\n client: 'desktop',\n initialScreenHintSlot: null,\n onTempBlockFinished: mockFn,\n onInputFinished: mockFn,\n onChangeState: mockFn,\n onSmsRetryClick: mockFn,\n onChangeScreen: mockFn,\n onFatalErrorOkButtonClick: mockFn,\n});\n"],"names":[],"mappings":";;;AAKA,MAAM,MAAM,GAAG,MAAM,SAAS;AAEvB,MAAM,mBAAmB,GAAG,aAAa,CAAuB;AACnE,IAAA,YAAY,EAAE,MAAM;AACpB,IAAA,QAAQ,EAAE,IAAI;AACd,IAAA,KAAK,EAAE,EAAE;AACT,IAAA,KAAK,EAAE,SAAS;AAChB,IAAA,MAAM,EAAE,SAAS;AACjB,IAAA,kBAAkB,EAAE,CAAC;AACrB,IAAA,iBAAiB,EAAE,UAAU;AAC7B,IAAA,QAAQ,EAAE,UAAU;AACpB,IAAA,iBAAiB,EAAE,OAAO;AAC1B,IAAA,KAAK,EAAE,EAAE;AACT,IAAA,oBAAoB,EAAE,KAAK;AAC3B,IAAA,UAAU,EAAE,IAAI;AAChB,IAAA,MAAM,EAAE,SAAS;AACjB,IAAA,qBAAqB,EAAE,IAAI;AAC3B,IAAA,mBAAmB,EAAE,MAAM;AAC3B,IAAA,eAAe,EAAE,MAAM;AACvB,IAAA,aAAa,EAAE,MAAM;AACrB,IAAA,eAAe,EAAE,MAAM;AACvB,IAAA,cAAc,EAAE,MAAM;AACtB,IAAA,yBAAyB,EAAE,MAAM;AACpC,CAAA;;;;"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { FC } from 'react';
|
|
2
|
-
import { ConfirmationProps } from '../types';
|
|
1
|
+
import { type FC } from 'react';
|
|
2
|
+
import { type ConfirmationProps } from '../types';
|
|
3
3
|
export declare type DesktopConfirmationProps = Omit<ConfirmationProps, 'mobile' | 'breakpoint'>;
|
|
4
4
|
export declare const ConfirmationDesktop: FC<DesktopConfirmationProps>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"component.desktop.js","sources":["../../src/desktop/component.desktop.tsx"],"sourcesContent":["import React, { FC } from 'react';\n\nimport { BaseConfirmation } from '../components/base-confirmation';\nimport { ConfirmationProps } from '../types';\n\nexport type DesktopConfirmationProps = Omit<ConfirmationProps, 'mobile' | 'breakpoint'>;\n\nexport const ConfirmationDesktop: FC<DesktopConfirmationProps> = (props) => (\n <BaseConfirmation {...props} />\n);\n"],"names":[],"mappings":";;;AAOa,MAAA,mBAAmB,GAAiC,CAAC,KAAK,MACnE,oBAAC,gBAAgB,EAAA,EAAA,GAAK,KAAK,EAAA,CAAI;;;;"}
|
|
1
|
+
{"version":3,"file":"component.desktop.js","sources":["../../src/desktop/component.desktop.tsx"],"sourcesContent":["import React, { type FC } from 'react';\n\nimport { BaseConfirmation } from '../components/base-confirmation';\nimport { type ConfirmationProps } from '../types';\n\nexport type DesktopConfirmationProps = Omit<ConfirmationProps, 'mobile' | 'breakpoint'>;\n\nexport const ConfirmationDesktop: FC<DesktopConfirmationProps> = (props) => (\n <BaseConfirmation {...props} />\n);\n"],"names":[],"mappings":";;;AAOa,MAAA,mBAAmB,GAAiC,CAAC,KAAK,MACnE,oBAAC,gBAAgB,EAAA,EAAA,GAAK,KAAK,EAAA,CAAI;;;;"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { FC } from 'react';
|
|
2
|
-
import { ConfirmationProps } from '../types';
|
|
1
|
+
import { type FC } from 'react';
|
|
2
|
+
import { type ConfirmationProps } from '../types';
|
|
3
3
|
export declare type MobileConfirmationProps = Omit<ConfirmationProps, 'mobile'>;
|
|
4
4
|
export declare const ConfirmationMobile: FC<MobileConfirmationProps>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"component.mobile.js","sources":["../../src/mobile/component.mobile.tsx"],"sourcesContent":["import React, { FC } from 'react';\nimport cn from 'classnames';\n\nimport { BaseConfirmation } from '../components/base-confirmation';\nimport { ConfirmationProps } from '../types';\n\nimport styles from './mobile.module.css';\n\nexport type MobileConfirmationProps = Omit<ConfirmationProps, 'mobile'>;\n\nexport const ConfirmationMobile: FC<MobileConfirmationProps> = ({ className, ...resProps }) => (\n <BaseConfirmation mobile={true} className={cn(className, styles.container)} {...resProps} />\n);\n"],"names":[],"mappings":";;;;;AAUa,MAAA,kBAAkB,GAAgC,CAAC,EAAE,SAAS,EAAE,GAAG,QAAQ,EAAE,MACtF,oBAAC,gBAAgB,EAAA,EAAC,MAAM,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE,CAAC,SAAS,EAAE,MAAM,CAAC,SAAS,CAAC,EAAA,GAAM,QAAQ,EAAA,CAAI;;;;"}
|
|
1
|
+
{"version":3,"file":"component.mobile.js","sources":["../../src/mobile/component.mobile.tsx"],"sourcesContent":["import React, { type FC } from 'react';\nimport cn from 'classnames';\n\nimport { BaseConfirmation } from '../components/base-confirmation';\nimport { type ConfirmationProps } from '../types';\n\nimport styles from './mobile.module.css';\n\nexport type MobileConfirmationProps = Omit<ConfirmationProps, 'mobile'>;\n\nexport const ConfirmationMobile: FC<MobileConfirmationProps> = ({ className, ...resProps }) => (\n <BaseConfirmation mobile={true} className={cn(className, styles.container)} {...resProps} />\n);\n"],"names":[],"mappings":";;;;;AAUa,MAAA,kBAAkB,GAAgC,CAAC,EAAE,SAAS,EAAE,GAAG,QAAQ,EAAE,MACtF,oBAAC,gBAAgB,EAAA,EAAC,MAAM,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE,CAAC,SAAS,EAAE,MAAM,CAAC,SAAS,CAAC,EAAA,GAAM,QAAQ,EAAA,CAAI;;;;"}
|
package/modern/mobile/mobile.css
CHANGED