@alfalab/core-components-confirmation 14.0.0 → 14.1.0-snapshot-92b8690
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/components/base-confirmation/index.css +2 -2
- 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/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/index.css +3 -3
- package/components/header/index.module.css.js +1 -1
- package/components/screens/fatal-error/index.css +6 -6
- package/components/screens/fatal-error/index.module.css.js +1 -1
- package/components/screens/hint/index.css +12 -12
- package/components/screens/hint/index.module.css.js +1 -1
- package/components/screens/initial/index.css +19 -19
- package/components/screens/initial/index.module.css.js +1 -1
- package/components/screens/temp-block/index.css +8 -8
- package/components/screens/temp-block/index.module.css.js +1 -1
- package/components/screens/temp-block-over/index.css +5 -5
- package/components/screens/temp-block-over/index.module.css.js +1 -1
- package/dynamic-mixins/component.responsive.d.ts +19 -0
- package/dynamic-mixins/component.responsive.js +22 -0
- package/dynamic-mixins/component.responsive.js.map +1 -0
- package/dynamic-mixins/components/base-confirmation/component.d.ts +3 -0
- package/dynamic-mixins/components/base-confirmation/component.js +104 -0
- package/dynamic-mixins/components/base-confirmation/component.js.map +1 -0
- package/dynamic-mixins/components/base-confirmation/index.css +11 -0
- package/dynamic-mixins/components/base-confirmation/index.d.ts +1 -0
- package/dynamic-mixins/components/base-confirmation/index.js +10 -0
- package/dynamic-mixins/components/base-confirmation/index.js.map +1 -0
- package/dynamic-mixins/components/base-confirmation/index.module.css.js +8 -0
- package/dynamic-mixins/components/base-confirmation/index.module.css.js.map +1 -0
- package/dynamic-mixins/components/countdown-loader/component.d.ts +7 -0
- package/dynamic-mixins/components/countdown-loader/component.js +28 -0
- package/dynamic-mixins/components/countdown-loader/component.js.map +1 -0
- package/dynamic-mixins/components/countdown-loader/index.css +7 -0
- package/dynamic-mixins/components/countdown-loader/index.d.ts +1 -0
- package/dynamic-mixins/components/countdown-loader/index.js +10 -0
- package/dynamic-mixins/components/countdown-loader/index.js.map +1 -0
- package/dynamic-mixins/components/countdown-loader/index.module.css.js +8 -0
- package/dynamic-mixins/components/countdown-loader/index.module.css.js.map +1 -0
- package/dynamic-mixins/components/header/component.d.ts +12 -0
- package/dynamic-mixins/components/header/component.js +22 -0
- package/dynamic-mixins/components/header/component.js.map +1 -0
- package/dynamic-mixins/components/header/index.css +31 -0
- package/dynamic-mixins/components/header/index.d.ts +1 -0
- package/dynamic-mixins/components/header/index.js +10 -0
- package/dynamic-mixins/components/header/index.js.map +1 -0
- package/dynamic-mixins/components/header/index.module.css.js +8 -0
- package/dynamic-mixins/components/header/index.module.css.js.map +1 -0
- package/dynamic-mixins/components/index.d.ts +2 -0
- package/dynamic-mixins/components/index.js +20 -0
- package/dynamic-mixins/components/index.js.map +1 -0
- package/dynamic-mixins/components/screens/fatal-error/component.d.ts +8 -0
- package/dynamic-mixins/components/screens/fatal-error/component.js +32 -0
- package/dynamic-mixins/components/screens/fatal-error/component.js.map +1 -0
- package/dynamic-mixins/components/screens/fatal-error/index.css +36 -0
- package/dynamic-mixins/components/screens/fatal-error/index.d.ts +1 -0
- package/dynamic-mixins/components/screens/fatal-error/index.js +10 -0
- package/dynamic-mixins/components/screens/fatal-error/index.js.map +1 -0
- package/dynamic-mixins/components/screens/fatal-error/index.module.css.js +8 -0
- package/dynamic-mixins/components/screens/fatal-error/index.module.css.js.map +1 -0
- package/dynamic-mixins/components/screens/hint/component.d.ts +8 -0
- package/dynamic-mixins/components/screens/hint/component.js +62 -0
- package/dynamic-mixins/components/screens/hint/component.js.map +1 -0
- package/dynamic-mixins/components/screens/hint/index.css +57 -0
- package/dynamic-mixins/components/screens/hint/index.d.ts +1 -0
- package/dynamic-mixins/components/screens/hint/index.js +10 -0
- package/dynamic-mixins/components/screens/hint/index.js.map +1 -0
- package/dynamic-mixins/components/screens/hint/index.module.css.js +8 -0
- package/dynamic-mixins/components/screens/hint/index.module.css.js.map +1 -0
- package/dynamic-mixins/components/screens/index.d.ts +5 -0
- package/dynamic-mixins/components/screens/index.js +18 -0
- package/dynamic-mixins/components/screens/index.js.map +1 -0
- package/dynamic-mixins/components/screens/initial/component.d.ts +8 -0
- package/dynamic-mixins/components/screens/initial/component.js +120 -0
- package/dynamic-mixins/components/screens/initial/component.js.map +1 -0
- package/dynamic-mixins/components/screens/initial/countdown-section.d.ts +10 -0
- package/dynamic-mixins/components/screens/initial/countdown-section.js +52 -0
- package/dynamic-mixins/components/screens/initial/countdown-section.js.map +1 -0
- package/dynamic-mixins/components/screens/initial/index.css +85 -0
- package/dynamic-mixins/components/screens/initial/index.d.ts +1 -0
- package/dynamic-mixins/components/screens/initial/index.js +10 -0
- package/dynamic-mixins/components/screens/initial/index.js.map +1 -0
- package/dynamic-mixins/components/screens/initial/index.module.css.js +8 -0
- package/dynamic-mixins/components/screens/initial/index.module.css.js.map +1 -0
- package/dynamic-mixins/components/screens/temp-block/component.d.ts +8 -0
- package/dynamic-mixins/components/screens/temp-block/component.js +44 -0
- package/dynamic-mixins/components/screens/temp-block/component.js.map +1 -0
- package/dynamic-mixins/components/screens/temp-block/index.css +46 -0
- package/dynamic-mixins/components/screens/temp-block/index.d.ts +1 -0
- package/dynamic-mixins/components/screens/temp-block/index.js +10 -0
- package/dynamic-mixins/components/screens/temp-block/index.js.map +1 -0
- package/dynamic-mixins/components/screens/temp-block/index.module.css.js +8 -0
- package/dynamic-mixins/components/screens/temp-block/index.module.css.js.map +1 -0
- package/dynamic-mixins/components/screens/temp-block-over/component.d.ts +8 -0
- package/dynamic-mixins/components/screens/temp-block-over/component.js +36 -0
- package/dynamic-mixins/components/screens/temp-block-over/component.js.map +1 -0
- package/dynamic-mixins/components/screens/temp-block-over/index.css +34 -0
- package/dynamic-mixins/components/screens/temp-block-over/index.d.ts +1 -0
- package/dynamic-mixins/components/screens/temp-block-over/index.js +10 -0
- package/dynamic-mixins/components/screens/temp-block-over/index.js.map +1 -0
- package/dynamic-mixins/components/screens/temp-block-over/index.module.css.js +8 -0
- package/dynamic-mixins/components/screens/temp-block-over/index.module.css.js.map +1 -0
- package/dynamic-mixins/context.d.ts +3 -0
- package/dynamic-mixins/context.js +32 -0
- package/dynamic-mixins/context.js.map +1 -0
- package/dynamic-mixins/desktop/component.desktop.d.ts +4 -0
- package/dynamic-mixins/desktop/component.desktop.js +16 -0
- package/dynamic-mixins/desktop/component.desktop.js.map +1 -0
- package/dynamic-mixins/desktop/index.d.ts +2 -0
- package/dynamic-mixins/desktop/index.js +13 -0
- package/dynamic-mixins/desktop/index.js.map +1 -0
- package/dynamic-mixins/index.d.ts +3 -0
- package/dynamic-mixins/index.js +13 -0
- package/dynamic-mixins/index.js.map +1 -0
- package/dynamic-mixins/mobile/component.mobile.d.ts +4 -0
- package/dynamic-mixins/mobile/component.mobile.js +22 -0
- package/dynamic-mixins/mobile/component.mobile.js.map +1 -0
- package/dynamic-mixins/mobile/index.d.ts +2 -0
- package/dynamic-mixins/mobile/index.js +13 -0
- package/dynamic-mixins/mobile/index.js.map +1 -0
- package/dynamic-mixins/mobile/mobile.css +3 -0
- package/dynamic-mixins/mobile/mobile.module.css.js +8 -0
- package/dynamic-mixins/mobile/mobile.module.css.js.map +1 -0
- package/dynamic-mixins/shared/index.d.ts +4 -0
- package/dynamic-mixins/shared/index.js +28 -0
- package/dynamic-mixins/shared/index.js.map +1 -0
- package/dynamic-mixins/types.d.ts +161 -0
- package/dynamic-mixins/types.js +34 -0
- package/dynamic-mixins/types.js.map +1 -0
- package/dynamic-mixins/utils.d.ts +34 -0
- package/dynamic-mixins/utils.js +91 -0
- package/dynamic-mixins/utils.js.map +1 -0
- package/esm/components/base-confirmation/index.css +2 -2
- 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/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/index.css +3 -3
- package/esm/components/header/index.module.css.js +1 -1
- package/esm/components/screens/fatal-error/index.css +6 -6
- package/esm/components/screens/fatal-error/index.module.css.js +1 -1
- package/esm/components/screens/hint/index.css +12 -12
- package/esm/components/screens/hint/index.module.css.js +1 -1
- package/esm/components/screens/initial/index.css +19 -19
- package/esm/components/screens/initial/index.module.css.js +1 -1
- package/esm/components/screens/temp-block/index.css +8 -8
- package/esm/components/screens/temp-block/index.module.css.js +1 -1
- package/esm/components/screens/temp-block-over/index.css +5 -5
- package/esm/components/screens/temp-block-over/index.module.css.js +1 -1
- package/esm/mobile/mobile.css +1 -1
- package/esm/mobile/mobile.module.css.js +1 -1
- package/mobile/mobile.css +1 -1
- package/mobile/mobile.module.css.js +1 -1
- package/modern/components/base-confirmation/index.css +2 -2
- 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/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/index.css +3 -3
- package/modern/components/header/index.module.css.js +1 -1
- package/modern/components/screens/fatal-error/index.css +6 -6
- package/modern/components/screens/fatal-error/index.module.css.js +1 -1
- package/modern/components/screens/hint/index.css +12 -12
- package/modern/components/screens/hint/index.module.css.js +1 -1
- package/modern/components/screens/initial/index.css +19 -19
- package/modern/components/screens/initial/index.module.css.js +1 -1
- package/modern/components/screens/temp-block/index.css +8 -8
- package/modern/components/screens/temp-block/index.module.css.js +1 -1
- package/modern/components/screens/temp-block-over/index.css +5 -5
- package/modern/components/screens/temp-block-over/index.module.css.js +1 -1
- package/modern/mobile/mobile.css +1 -1
- package/modern/mobile/mobile.module.css.js +1 -1
- package/moderncssm/components/base-confirmation/index.module.css +2 -1
- package/moderncssm/components/countdown-loader/index.module.css +2 -0
- package/moderncssm/components/header/index.module.css +2 -0
- package/moderncssm/components/screens/fatal-error/index.module.css +2 -0
- package/moderncssm/components/screens/hint/index.module.css +2 -0
- package/moderncssm/components/screens/initial/index.module.css +2 -0
- package/moderncssm/components/screens/temp-block/index.module.css +2 -0
- package/moderncssm/components/screens/temp-block-over/index.module.css +2 -0
- package/package.json +9 -9
- package/src/components/base-confirmation/index.module.css +1 -1
- package/src/components/countdown-loader/index.module.css +1 -1
- package/src/vars.css +1 -1
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
--color-light-text-secondary: rgba(4, 4, 19, 0.55);
|
|
3
3
|
} :root {
|
|
4
4
|
--gap-0: 0px;
|
|
5
|
-
} .
|
|
5
|
+
} .confirmation__component_1yg0t {
|
|
6
6
|
width: 100%;
|
|
7
7
|
max-width: 388px;
|
|
8
8
|
color: var(--color-light-text-secondary)
|
|
9
|
-
} .
|
|
9
|
+
} .confirmation__component_1yg0t.confirmation__center_1yg0t {
|
|
10
10
|
margin: var(--gap-0) auto;
|
|
11
11
|
}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
require('./index.css');
|
|
4
4
|
|
|
5
|
-
var styles = {"component":"
|
|
5
|
+
var styles = {"component":"confirmation__component_1yg0t","center":"confirmation__center_1yg0t"};
|
|
6
6
|
|
|
7
7
|
module.exports = styles;
|
|
8
8
|
//# sourceMappingURL=index.module.css.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.module.css.js","sources":["../../src/components/base-confirmation/index.module.css"],"sourcesContent":["@import '@alfalab/core-components-vars/src/index.css';\n\n.component {\n width: 100%;\n max-width: 388px;\n color: var(--color-light-text-secondary);\n\n &.center {\n margin: var(--gap-0) auto;\n }\n}\n"],"names":[],"mappings":";;;;AAEgB,aAAe,CAAC,WAAW,CAAC,+BAA+B,CAAC,QAAQ,CAAC,4BAA4B,CAAC;;;;"}
|
|
1
|
+
{"version":3,"file":"index.module.css.js","sources":["../../src/components/base-confirmation/index.module.css"],"sourcesContent":["@import '@alfalab/core-components-vars/src/no-dynamic-mixins-index.css';\n\n.component {\n width: 100%;\n max-width: 388px;\n color: var(--color-light-text-secondary);\n\n &.center {\n margin: var(--gap-0) auto;\n }\n}\n"],"names":[],"mappings":";;;;AAEgB,aAAe,CAAC,WAAW,CAAC,+BAA+B,CAAC,QAAQ,CAAC,4BAA4B,CAAC;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.module.css.js","sources":["../../src/components/countdown-loader/index.module.css"],"sourcesContent":["@import '@alfalab/core-components-vars/src/index.css';\n\n.circle {\n fill: transparent;\n stroke: var(--color-light-neutral-500);\n stroke-width: 2px;\n}\n"],"names":[],"mappings":";;;;AAEgB,aAAe,CAAC,QAAQ,CAAC,4BAA4B,CAAC;;;;"}
|
|
1
|
+
{"version":3,"file":"index.module.css.js","sources":["../../src/components/countdown-loader/index.module.css"],"sourcesContent":["@import '@alfalab/core-components-vars/src/no-dynamic-mixins-index.css';\n\n.circle {\n fill: transparent;\n stroke: var(--color-light-neutral-500);\n stroke-width: 2px;\n}\n"],"names":[],"mappings":";;;;AAEgB,aAAe,CAAC,QAAQ,CAAC,4BAA4B,CAAC;;;;"}
|
|
@@ -14,15 +14,15 @@
|
|
|
14
14
|
--confirmation-header-mobile-font-weight: 600;
|
|
15
15
|
--confirmation-header-mobile-font-family: var(--font-family-system);
|
|
16
16
|
--confirmation-header-font-feature-settings: normal
|
|
17
|
-
} .
|
|
17
|
+
} .confirmation__header_1keem.confirmation__header_1keem {
|
|
18
18
|
margin-bottom: var(--gap-24);
|
|
19
|
-
} .
|
|
19
|
+
} .confirmation__typography_1keem.confirmation__typography_1keem.confirmation__typography_1keem {
|
|
20
20
|
font-feature-settings: var(--confirmation-header-font-feature-settings);
|
|
21
21
|
font-size: var(--confirmation-header-desktop-font-size);
|
|
22
22
|
line-height: var(--confirmation-header-desktop-line-height);
|
|
23
23
|
font-weight: var(--confirmation-header-desktop-font-weight);
|
|
24
24
|
font-family: var(--confirmation-header-desktop-font-family);
|
|
25
|
-
} .
|
|
25
|
+
} .confirmation__typographyMobile_1keem.confirmation__typographyMobile_1keem.confirmation__typographyMobile_1keem {
|
|
26
26
|
font-feature-settings: var(--confirmation-header-font-feature-settings);
|
|
27
27
|
font-size: var(--confirmation-header-mobile-font-size);
|
|
28
28
|
line-height: var(--confirmation-header-mobile-line-height);
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
require('./index.css');
|
|
4
4
|
|
|
5
|
-
var styles = {"header":"
|
|
5
|
+
var styles = {"header":"confirmation__header_1keem","typography":"confirmation__typography_1keem","typographyMobile":"confirmation__typographyMobile_1keem"};
|
|
6
6
|
|
|
7
7
|
module.exports = styles;
|
|
8
8
|
//# sourceMappingURL=index.module.css.js.map
|
|
@@ -15,22 +15,22 @@
|
|
|
15
15
|
--confirmation-text-color: var(--color-light-text-primary)
|
|
16
16
|
|
|
17
17
|
/* header */
|
|
18
|
-
} .
|
|
18
|
+
} .confirmation__component_1cd5g {
|
|
19
19
|
display: flex;
|
|
20
20
|
flex-direction: column;
|
|
21
|
-
} .
|
|
21
|
+
} .confirmation__typographyTheme_1cd5g.confirmation__typographyTheme_1cd5g {
|
|
22
22
|
font-size: var(--confirmation-text-font-size);
|
|
23
23
|
line-height: var(--confirmation-text-line-height);
|
|
24
24
|
font-weight: var(--confirmation-text-font-weight);
|
|
25
25
|
font-family: var(--confirmation-text-font-family);
|
|
26
26
|
color: var(--confirmation-text-color);
|
|
27
|
-
} .
|
|
27
|
+
} .confirmation__typographyThemeMobile_1cd5g.confirmation__typographyThemeMobile_1cd5g {
|
|
28
28
|
color: var(--color-light-text-secondary);
|
|
29
|
-
} .
|
|
29
|
+
} .confirmation__left_1cd5g {
|
|
30
30
|
align-items: flex-start;
|
|
31
|
-
} .
|
|
31
|
+
} .confirmation__center_1cd5g {
|
|
32
32
|
align-items: center;
|
|
33
33
|
text-align: center;
|
|
34
|
-
} .
|
|
34
|
+
} .confirmation__button_1cd5g.confirmation__button_1cd5g {
|
|
35
35
|
margin-top: var(--gap-32);
|
|
36
36
|
}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
require('./index.css');
|
|
4
4
|
|
|
5
|
-
var styles = {"component":"
|
|
5
|
+
var styles = {"component":"confirmation__component_1cd5g","typographyTheme":"confirmation__typographyTheme_1cd5g","typographyThemeMobile":"confirmation__typographyThemeMobile_1cd5g","left":"confirmation__left_1cd5g","center":"confirmation__center_1cd5g","button":"confirmation__button_1cd5g"};
|
|
6
6
|
|
|
7
7
|
module.exports = styles;
|
|
8
8
|
//# sourceMappingURL=index.module.css.js.map
|
|
@@ -20,40 +20,40 @@
|
|
|
20
20
|
--confirmation-text-color: var(--color-light-text-primary)
|
|
21
21
|
|
|
22
22
|
/* header */
|
|
23
|
-
} .
|
|
23
|
+
} .confirmation__component_1oog5 {
|
|
24
24
|
display: flex;
|
|
25
25
|
flex-direction: column;
|
|
26
26
|
align-items: flex-start
|
|
27
|
-
} .
|
|
27
|
+
} .confirmation__component_1oog5 span:last-of-type {
|
|
28
28
|
margin-bottom: var(--gap-0);
|
|
29
|
-
} .
|
|
29
|
+
} .confirmation__center_1oog5 {
|
|
30
30
|
align-items: center;
|
|
31
31
|
text-align: center;
|
|
32
|
-
} .
|
|
32
|
+
} .confirmation__text_1oog5.confirmation__text_1oog5 {
|
|
33
33
|
margin-bottom: var(--gap-24);
|
|
34
|
-
} .
|
|
34
|
+
} .confirmation__typographyTheme_1oog5.confirmation__typographyTheme_1oog5 {
|
|
35
35
|
font-size: var(--confirmation-text-font-size);
|
|
36
36
|
line-height: var(--confirmation-text-line-height);
|
|
37
37
|
font-weight: var(--confirmation-text-font-weight);
|
|
38
38
|
font-family: var(--confirmation-text-font-family);
|
|
39
39
|
color: var(--confirmation-text-color);
|
|
40
|
-
} .
|
|
40
|
+
} .confirmation__typographyThemeMobile_1oog5.confirmation__typographyThemeMobile_1oog5 {
|
|
41
41
|
color: var(--color-light-text-secondary);
|
|
42
|
-
} .
|
|
42
|
+
} .confirmation__phonesWrap_1oog5 {
|
|
43
43
|
display: flex;
|
|
44
44
|
flex-direction: column;
|
|
45
45
|
margin-bottom: var(--gap-24);
|
|
46
|
-
} .
|
|
46
|
+
} .confirmation__phoneWrap_1oog5 {
|
|
47
47
|
margin-bottom: var(--gap-8)
|
|
48
|
-
} .
|
|
48
|
+
} .confirmation__phoneWrap_1oog5:last-child {
|
|
49
49
|
margin-bottom: var(--gap-0);
|
|
50
|
-
} .
|
|
50
|
+
} .confirmation__phoneLink_1oog5.confirmation__phoneLink_1oog5 {
|
|
51
51
|
font-size: 16px;
|
|
52
52
|
line-height: 24px;
|
|
53
53
|
font-weight: 500;
|
|
54
|
-
} .
|
|
54
|
+
} .confirmation__hintButton_1oog5 {
|
|
55
55
|
margin-top: var(--gap-32);
|
|
56
|
-
} .
|
|
56
|
+
} .confirmation__phoneContentMobile_1oog5 {
|
|
57
57
|
display: flex;
|
|
58
58
|
flex-direction: column;
|
|
59
59
|
}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
require('./index.css');
|
|
4
4
|
|
|
5
|
-
var styles = {"component":"
|
|
5
|
+
var styles = {"component":"confirmation__component_1oog5","center":"confirmation__center_1oog5","text":"confirmation__text_1oog5","typographyTheme":"confirmation__typographyTheme_1oog5","typographyThemeMobile":"confirmation__typographyThemeMobile_1oog5","phonesWrap":"confirmation__phonesWrap_1oog5","phoneWrap":"confirmation__phoneWrap_1oog5","phoneLink":"confirmation__phoneLink_1oog5","hintButton":"confirmation__hintButton_1oog5","phoneContentMobile":"confirmation__phoneContentMobile_1oog5"};
|
|
6
6
|
|
|
7
7
|
module.exports = styles;
|
|
8
8
|
//# sourceMappingURL=index.module.css.js.map
|
|
@@ -28,60 +28,60 @@
|
|
|
28
28
|
--confirmation-text-color: var(--color-light-text-primary)
|
|
29
29
|
|
|
30
30
|
/* header */
|
|
31
|
-
} .
|
|
31
|
+
} .confirmation__component_zxerz {
|
|
32
32
|
display: flex;
|
|
33
33
|
flex-direction: column;
|
|
34
|
-
} .
|
|
34
|
+
} .confirmation__phone_zxerz.confirmation__phone_zxerz {
|
|
35
35
|
color: var(--color-light-text-primary);
|
|
36
36
|
margin-bottom: var(--gap-32);
|
|
37
|
-
} .
|
|
37
|
+
} .confirmation__typographyTheme_zxerz.confirmation__typographyTheme_zxerz {
|
|
38
38
|
font-size: var(--confirmation-text-font-size);
|
|
39
39
|
line-height: var(--confirmation-text-line-height);
|
|
40
40
|
font-weight: var(--confirmation-text-font-weight);
|
|
41
41
|
font-family: var(--confirmation-text-font-family);
|
|
42
42
|
color: var(--confirmation-text-color);
|
|
43
|
-
} .
|
|
43
|
+
} .confirmation__typographyThemeMobile_zxerz.confirmation__typographyThemeMobile_zxerz {
|
|
44
44
|
color: var(--color-light-text-secondary);
|
|
45
|
-
} .
|
|
45
|
+
} .confirmation__compact_zxerz {
|
|
46
46
|
margin-bottom: var(--gap-24);
|
|
47
|
-
} .
|
|
47
|
+
} .confirmation__loaderWrap_zxerz {
|
|
48
48
|
display: flex;
|
|
49
49
|
align-items: center;
|
|
50
|
-
} .
|
|
50
|
+
} .confirmation__left_zxerz {
|
|
51
51
|
align-items: flex-start;
|
|
52
|
-
} .
|
|
52
|
+
} .confirmation__center_zxerz {
|
|
53
53
|
align-items: center;
|
|
54
54
|
text-align: center
|
|
55
|
-
} .
|
|
55
|
+
} .confirmation__center_zxerz .confirmation__loaderWrap_zxerz {
|
|
56
56
|
justify-content: center;
|
|
57
|
-
} .
|
|
57
|
+
} .confirmation__codeInput_zxerz {
|
|
58
58
|
margin-bottom: var(--gap-12);
|
|
59
|
-
} .
|
|
59
|
+
} .confirmation__smsBtn_zxerz.confirmation__smsBtn_zxerz {
|
|
60
60
|
min-height: var(--size-xs-height);
|
|
61
|
-
} .
|
|
61
|
+
} .confirmation__smsComeLink_zxerz.confirmation__smsComeLink_zxerz {
|
|
62
62
|
font-size: 14px;
|
|
63
63
|
line-height: 20px;
|
|
64
64
|
font-weight: 500;
|
|
65
|
-
} .
|
|
65
|
+
} .confirmation__countdownContainer_zxerz.confirmation__countdownContainer_zxerz {
|
|
66
66
|
color: var(--color-light-text-secondary);
|
|
67
67
|
margin-bottom: var(--gap-24);
|
|
68
|
-
} .
|
|
68
|
+
} .confirmation__countdownMobile_zxerz.confirmation__countdownMobile_zxerz {
|
|
69
69
|
margin-bottom: var(--gap-20);
|
|
70
|
-
} .
|
|
70
|
+
} .confirmation__countdownLoaderMobile_zxerz.confirmation__countdownLoaderMobile_zxerz {
|
|
71
71
|
margin-bottom: var(--gap-16);
|
|
72
|
-
} .
|
|
72
|
+
} .confirmation__timeCounter_zxerz {
|
|
73
73
|
display: inline-block;
|
|
74
74
|
min-width: 47px;
|
|
75
75
|
color: var(--color-light-text-secondary);
|
|
76
76
|
text-align: left;
|
|
77
77
|
font-feature-settings: lining-nums tabular-nums;
|
|
78
78
|
font-variant-numeric: lining-nums tabular-nums;
|
|
79
|
-
} .
|
|
79
|
+
} .confirmation__getCodeButton_zxerz {
|
|
80
80
|
position: relative;
|
|
81
81
|
top: var(--gap-4-neg);
|
|
82
82
|
margin-bottom: var(--gap-16);
|
|
83
|
-
} .
|
|
83
|
+
} .confirmation__getCodeButtonMobile_zxerz {
|
|
84
84
|
margin-bottom: var(--gap-0);
|
|
85
|
-
} .
|
|
85
|
+
} .confirmation__containerInput_zxerz {
|
|
86
86
|
min-height: 80px;
|
|
87
87
|
}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
require('./index.css');
|
|
4
4
|
|
|
5
|
-
var styles = {"component":"
|
|
5
|
+
var styles = {"component":"confirmation__component_zxerz","phone":"confirmation__phone_zxerz","typographyTheme":"confirmation__typographyTheme_zxerz","typographyThemeMobile":"confirmation__typographyThemeMobile_zxerz","compact":"confirmation__compact_zxerz","loaderWrap":"confirmation__loaderWrap_zxerz","left":"confirmation__left_zxerz","center":"confirmation__center_zxerz","codeInput":"confirmation__codeInput_zxerz","smsBtn":"confirmation__smsBtn_zxerz","smsComeLink":"confirmation__smsComeLink_zxerz","countdownContainer":"confirmation__countdownContainer_zxerz","countdownMobile":"confirmation__countdownMobile_zxerz","countdownLoaderMobile":"confirmation__countdownLoaderMobile_zxerz","timeCounter":"confirmation__timeCounter_zxerz","getCodeButton":"confirmation__getCodeButton_zxerz","getCodeButtonMobile":"confirmation__getCodeButtonMobile_zxerz","containerInput":"confirmation__containerInput_zxerz"};
|
|
6
6
|
|
|
7
7
|
module.exports = styles;
|
|
8
8
|
//# sourceMappingURL=index.module.css.js.map
|
|
@@ -15,32 +15,32 @@
|
|
|
15
15
|
--confirmation-text-color: var(--color-light-text-primary)
|
|
16
16
|
|
|
17
17
|
/* header */
|
|
18
|
-
} .
|
|
18
|
+
} .confirmation__component_1q5cl {
|
|
19
19
|
display: flex;
|
|
20
20
|
flex-direction: column;
|
|
21
|
-
} .
|
|
21
|
+
} .confirmation__center_1q5cl {
|
|
22
22
|
align-items: center;
|
|
23
23
|
text-align: center;
|
|
24
|
-
} .
|
|
24
|
+
} .confirmation__typographyTheme_1q5cl.confirmation__typographyTheme_1q5cl {
|
|
25
25
|
font-size: var(--confirmation-text-font-size);
|
|
26
26
|
line-height: var(--confirmation-text-line-height);
|
|
27
27
|
font-weight: var(--confirmation-text-font-weight);
|
|
28
28
|
font-family: var(--confirmation-text-font-family);
|
|
29
29
|
color: var(--confirmation-text-color);
|
|
30
|
-
} .
|
|
30
|
+
} .confirmation__typographyThemeMobile_1q5cl.confirmation__typographyThemeMobile_1q5cl {
|
|
31
31
|
color: var(--color-light-text-secondary);
|
|
32
|
-
} .
|
|
32
|
+
} .confirmation__description_1q5cl.confirmation__description_1q5cl {
|
|
33
33
|
margin-bottom: var(--gap-8);
|
|
34
|
-
} .
|
|
34
|
+
} .confirmation__countdownWrap_1q5cl {
|
|
35
35
|
display: flex;
|
|
36
36
|
align-items: center;
|
|
37
|
-
} .
|
|
37
|
+
} .confirmation__timeCounter_1q5cl {
|
|
38
38
|
display: inline-block;
|
|
39
39
|
min-width: 47px;
|
|
40
40
|
color: var(--color-light-text-secondary);
|
|
41
41
|
text-align: left;
|
|
42
42
|
font-feature-settings: lining-nums tabular-nums;
|
|
43
43
|
font-variant-numeric: lining-nums tabular-nums;
|
|
44
|
-
} .
|
|
44
|
+
} .confirmation__loader_1q5cl {
|
|
45
45
|
margin-right: var(--gap-8);
|
|
46
46
|
}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
require('./index.css');
|
|
4
4
|
|
|
5
|
-
var styles = {"component":"
|
|
5
|
+
var styles = {"component":"confirmation__component_1q5cl","center":"confirmation__center_1q5cl","typographyTheme":"confirmation__typographyTheme_1q5cl","typographyThemeMobile":"confirmation__typographyThemeMobile_1q5cl","description":"confirmation__description_1q5cl","countdownWrap":"confirmation__countdownWrap_1q5cl","timeCounter":"confirmation__timeCounter_1q5cl","loader":"confirmation__loader_1q5cl"};
|
|
6
6
|
|
|
7
7
|
module.exports = styles;
|
|
8
8
|
//# sourceMappingURL=index.module.css.js.map
|
|
@@ -15,20 +15,20 @@
|
|
|
15
15
|
--confirmation-text-color: var(--color-light-text-primary)
|
|
16
16
|
|
|
17
17
|
/* header */
|
|
18
|
-
} .
|
|
18
|
+
} .confirmation__component_pr5th {
|
|
19
19
|
display: flex;
|
|
20
20
|
flex-direction: column;
|
|
21
|
-
} .
|
|
21
|
+
} .confirmation__center_pr5th {
|
|
22
22
|
align-items: center;
|
|
23
23
|
text-align: center;
|
|
24
|
-
} .
|
|
24
|
+
} .confirmation__typographyTheme_pr5th.confirmation__typographyTheme_pr5th {
|
|
25
25
|
font-size: var(--confirmation-text-font-size);
|
|
26
26
|
line-height: var(--confirmation-text-line-height);
|
|
27
27
|
font-weight: var(--confirmation-text-font-weight);
|
|
28
28
|
font-family: var(--confirmation-text-font-family);
|
|
29
29
|
color: var(--confirmation-text-color);
|
|
30
|
-
} .
|
|
30
|
+
} .confirmation__typographyThemeMobile_pr5th.confirmation__typographyThemeMobile_pr5th {
|
|
31
31
|
color: var(--color-light-text-secondary);
|
|
32
|
-
} .
|
|
32
|
+
} .confirmation__button_pr5th.confirmation__button_pr5th {
|
|
33
33
|
margin-top: var(--gap-32);
|
|
34
34
|
}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
require('./index.css');
|
|
4
4
|
|
|
5
|
-
var styles = {"component":"
|
|
5
|
+
var styles = {"component":"confirmation__component_pr5th","center":"confirmation__center_pr5th","typographyTheme":"confirmation__typographyTheme_pr5th","typographyThemeMobile":"confirmation__typographyThemeMobile_pr5th","button":"confirmation__button_pr5th"};
|
|
6
6
|
|
|
7
7
|
module.exports = styles;
|
|
8
8
|
//# sourceMappingURL=index.module.css.js.map
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
import { ConfirmationProps } from './types';
|
|
3
|
+
export declare type ResponsiveConfirmationProps = Omit<ConfirmationProps, 'confirmationScreens' | 'breakpoint'> & {
|
|
4
|
+
/**
|
|
5
|
+
* Контрольная точка, с нее начинается desktop версия
|
|
6
|
+
* @default 1024
|
|
7
|
+
*/
|
|
8
|
+
breakpoint?: number;
|
|
9
|
+
/**
|
|
10
|
+
* Версия, которая будет использоваться при серверном рендеринге
|
|
11
|
+
*/
|
|
12
|
+
client?: 'desktop' | 'mobile';
|
|
13
|
+
/**
|
|
14
|
+
* Значение по-умолчанию для хука useMatchMedia
|
|
15
|
+
* @deprecated Используйте client
|
|
16
|
+
*/
|
|
17
|
+
defaultMatchMediaValue?: boolean | (() => boolean);
|
|
18
|
+
};
|
|
19
|
+
export declare const ConfirmationResponsive: FC<ResponsiveConfirmationProps>;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var tslib = require('tslib');
|
|
6
|
+
var React = require('react');
|
|
7
|
+
var dynamicMixins = require('@alfalab/core-components-mq/dynamic-mixins');
|
|
8
|
+
var component_desktop = require('./desktop/component.desktop.js');
|
|
9
|
+
var component_mobile = require('./mobile/component.mobile.js');
|
|
10
|
+
|
|
11
|
+
function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
|
|
12
|
+
|
|
13
|
+
var React__default = /*#__PURE__*/_interopDefaultCompat(React);
|
|
14
|
+
|
|
15
|
+
var ConfirmationResponsive = function (_a) {
|
|
16
|
+
var breakpoint = _a.breakpoint, client = _a.client, _b = _a.defaultMatchMediaValue, defaultMatchMediaValue = _b === void 0 ? client === undefined ? undefined : client === 'desktop' : _b, restProps = tslib.__rest(_a, ["breakpoint", "client", "defaultMatchMediaValue"]);
|
|
17
|
+
var isDesktop = dynamicMixins.useIsDesktop(breakpoint, defaultMatchMediaValue);
|
|
18
|
+
return isDesktop ? (React__default.default.createElement(component_desktop.ConfirmationDesktop, tslib.__assign({}, restProps))) : (React__default.default.createElement(component_mobile.ConfirmationMobile, tslib.__assign({ breakpoint: breakpoint }, restProps)));
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
exports.ConfirmationResponsive = ConfirmationResponsive;
|
|
22
|
+
//# sourceMappingURL=component.responsive.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"component.responsive.js","sources":["../src/component.responsive.tsx"],"sourcesContent":["import React, { FC } from 'react';\n\nimport { useIsDesktop } from '@alfalab/core-components-mq';\n\nimport { ConfirmationDesktop } from './desktop';\nimport { ConfirmationMobile } from './mobile';\nimport { ConfirmationProps } from './types';\n\nexport type ResponsiveConfirmationProps = Omit<\n ConfirmationProps,\n 'confirmationScreens' | 'breakpoint'\n> & {\n /**\n * Контрольная точка, с нее начинается desktop версия\n * @default 1024\n */\n breakpoint?: number;\n\n /**\n * Версия, которая будет использоваться при серверном рендеринге\n */\n client?: 'desktop' | 'mobile';\n\n /**\n * Значение по-умолчанию для хука useMatchMedia\n * @deprecated Используйте client\n */\n defaultMatchMediaValue?: boolean | (() => boolean);\n};\n\nexport const ConfirmationResponsive: FC<ResponsiveConfirmationProps> = ({\n breakpoint,\n client,\n defaultMatchMediaValue = client === undefined ? undefined : client === 'desktop',\n ...restProps\n}) => {\n const isDesktop = useIsDesktop(breakpoint, defaultMatchMediaValue);\n\n return isDesktop ? (\n <ConfirmationDesktop {...restProps} />\n ) : (\n <ConfirmationMobile breakpoint={breakpoint} {...restProps} />\n );\n};\n"],"names":["__rest","useIsDesktop","React","ConfirmationDesktop","__assign","ConfirmationMobile"],"mappings":";;;;;;;;;;;;;;AA8BO,IAAM,sBAAsB,GAAoC,UAAC,EAKvE,EAAA;AAJG,IAAA,IAAA,UAAU,GAAA,EAAA,CAAA,UAAA,EACV,MAAM,GAAA,EAAA,CAAA,MAAA,EACN,EAAgF,GAAA,EAAA,CAAA,sBAAA,EAAhF,sBAAsB,GAAA,EAAA,KAAA,MAAA,GAAG,MAAM,KAAK,SAAS,GAAG,SAAS,GAAG,MAAM,KAAK,SAAS,GAAA,EAAA,EAC7E,SAAS,GAJwDA,YAAA,CAAA,EAAA,EAAA,CAAA,YAAA,EAAA,QAAA,EAAA,wBAAA,CAKvE,CADe;IAEZ,IAAM,SAAS,GAAGC,0BAAY,CAAC,UAAU,EAAE,sBAAsB,CAAC;IAElE,OAAO,SAAS,IACZC,qCAACC,qCAAmB,EAAAC,cAAA,CAAA,EAAA,EAAK,SAAS,CAAA,CAAI,KAEtCF,sBAAC,CAAA,aAAA,CAAAG,mCAAkB,EAACD,cAAA,CAAA,EAAA,UAAU,EAAE,UAAU,EAAM,EAAA,SAAS,CAAI,CAAA,CAChE;AACL;;;;"}
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var tslib = require('tslib');
|
|
6
|
+
var React = require('react');
|
|
7
|
+
var cn = require('classnames');
|
|
8
|
+
var hooks = require('@alfalab/hooks');
|
|
9
|
+
var context = require('../../context.js');
|
|
10
|
+
var types = require('../../types.js');
|
|
11
|
+
var utils = require('../../utils.js');
|
|
12
|
+
var component$4 = require('../screens/initial/component.js');
|
|
13
|
+
var component$3 = require('../screens/hint/component.js');
|
|
14
|
+
var component$2 = require('../screens/fatal-error/component.js');
|
|
15
|
+
var component$1 = require('../screens/temp-block/component.js');
|
|
16
|
+
var component = require('../screens/temp-block-over/component.js');
|
|
17
|
+
var index_module = require('./index.module.css.js');
|
|
18
|
+
|
|
19
|
+
function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
|
|
20
|
+
|
|
21
|
+
var React__default = /*#__PURE__*/_interopDefaultCompat(React);
|
|
22
|
+
var cn__default = /*#__PURE__*/_interopDefaultCompat(cn);
|
|
23
|
+
|
|
24
|
+
var confirmationScreens = {
|
|
25
|
+
INITIAL: component$4.Initial,
|
|
26
|
+
HINT: component$3.Hint,
|
|
27
|
+
FATAL_ERROR: component$2.FatalError,
|
|
28
|
+
TEMP_BLOCK: component$1.TempBlock,
|
|
29
|
+
TEMP_BLOCK_OVER: component.TempBlockOver,
|
|
30
|
+
};
|
|
31
|
+
var BaseConfirmation = function (_a) {
|
|
32
|
+
var _b;
|
|
33
|
+
var state = _a.state, screen = _a.screen, _c = _a.alignContent, alignContent = _c === void 0 ? 'left' : _c; _a.children; var _d = _a.requiredCharAmount, requiredCharAmount = _d === void 0 ? 5 : _d, _e = _a.countdownDuration, countdownDuration = _e === void 0 ? utils.ONE_MINUTE : _e, _f = _a.tempBlockDuration, tempBlockDuration = _f === void 0 ? utils.ONE_DAY : _f, phone = _a.phone, blockSmsRetry = _a.blockSmsRetry, dataTestId = _a.dataTestId, className = _a.className, getScreensMap = _a.getScreensMap, onInputFinished = _a.onInputFinished, onChangeState = _a.onChangeState, onSmsRetryClick = _a.onSmsRetryClick, onChangeScreen = _a.onChangeScreen, onFatalErrorOkButtonClick = _a.onFatalErrorOkButtonClick, onTempBlockFinished = _a.onTempBlockFinished, mobile = _a.mobile, _g = _a.clearCodeOnError, clearCodeOnError = _g === void 0 ? true : _g, _h = _a.hideCountdownSection, hideCountdownSection = _h === void 0 ? false : _h, breakpoint = _a.breakpoint, client = _a.client, initialScreenHintSlot = _a.initialScreenHintSlot, errorVisibleDuration = _a.errorVisibleDuration, restProps = tslib.__rest(_a, ["state", "screen", "alignContent", "children", "requiredCharAmount", "countdownDuration", "tempBlockDuration", "phone", "blockSmsRetry", "dataTestId", "className", "getScreensMap", "onInputFinished", "onChangeState", "onSmsRetryClick", "onChangeScreen", "onFatalErrorOkButtonClick", "onTempBlockFinished", "mobile", "clearCodeOnError", "hideCountdownSection", "breakpoint", "client", "initialScreenHintSlot", "errorVisibleDuration"]);
|
|
34
|
+
var _j = utils.useCountdown(countdownDuration), timeLeft = _j[0], startTimer = _j[1], stopTimer = _j[2];
|
|
35
|
+
var prevState = hooks.usePrevious(state);
|
|
36
|
+
React.useEffect(function () {
|
|
37
|
+
startTimer();
|
|
38
|
+
}, [startTimer]);
|
|
39
|
+
React.useEffect(function () {
|
|
40
|
+
/**
|
|
41
|
+
* Перезапускаем таймер после повторного запроса кода
|
|
42
|
+
*/
|
|
43
|
+
if (state === 'INITIAL' && prevState === 'CODE_SENDING') {
|
|
44
|
+
startTimer();
|
|
45
|
+
}
|
|
46
|
+
}, [state, prevState, startTimer]);
|
|
47
|
+
React.useEffect(function () {
|
|
48
|
+
/**
|
|
49
|
+
* Останавливаем таймер, если новый экран/состояние не содержит таймер
|
|
50
|
+
*/
|
|
51
|
+
if (!['INITIAL', 'HINT', 'TEMP_BLOCK', 'TEMP_BLOCK_OVER'].includes(screen) ||
|
|
52
|
+
blockSmsRetry) {
|
|
53
|
+
stopTimer();
|
|
54
|
+
}
|
|
55
|
+
}, [state, screen, blockSmsRetry, stopTimer]);
|
|
56
|
+
var handleSmsRetry = function () {
|
|
57
|
+
onChangeState('CODE_SENDING');
|
|
58
|
+
onSmsRetryClick();
|
|
59
|
+
};
|
|
60
|
+
var handleInputFinished = function (code) {
|
|
61
|
+
onChangeState('CODE_CHECKING');
|
|
62
|
+
onInputFinished(code);
|
|
63
|
+
};
|
|
64
|
+
var handleFatalErrorOkButtonClick = function () {
|
|
65
|
+
if (onFatalErrorOkButtonClick) {
|
|
66
|
+
onFatalErrorOkButtonClick();
|
|
67
|
+
}
|
|
68
|
+
};
|
|
69
|
+
// eslint-disable-next-line react/jsx-no-constructed-context-values
|
|
70
|
+
var contextValue = {
|
|
71
|
+
hideCountdownSection: hideCountdownSection,
|
|
72
|
+
alignContent: alignContent,
|
|
73
|
+
texts: tslib.__assign(tslib.__assign({}, types.defaultTexts), restProps.texts),
|
|
74
|
+
state: state,
|
|
75
|
+
screen: screen,
|
|
76
|
+
requiredCharAmount: requiredCharAmount,
|
|
77
|
+
countdownDuration: countdownDuration,
|
|
78
|
+
timeLeft: timeLeft,
|
|
79
|
+
tempBlockDuration: tempBlockDuration,
|
|
80
|
+
phone: phone,
|
|
81
|
+
blockSmsRetry: blockSmsRetry,
|
|
82
|
+
breakpoint: breakpoint,
|
|
83
|
+
client: client,
|
|
84
|
+
onTempBlockFinished: onTempBlockFinished,
|
|
85
|
+
onChangeState: onChangeState,
|
|
86
|
+
onChangeScreen: onChangeScreen,
|
|
87
|
+
clearCodeOnError: clearCodeOnError,
|
|
88
|
+
errorVisibleDuration: errorVisibleDuration,
|
|
89
|
+
initialScreenHintSlot: initialScreenHintSlot,
|
|
90
|
+
onInputFinished: handleInputFinished,
|
|
91
|
+
onSmsRetryClick: handleSmsRetry,
|
|
92
|
+
onFatalErrorOkButtonClick: handleFatalErrorOkButtonClick,
|
|
93
|
+
};
|
|
94
|
+
var customScreen = React.useMemo(function () { return getScreensMap && getScreensMap(confirmationScreens); }, [getScreensMap]);
|
|
95
|
+
var screensMap = customScreen || confirmationScreens;
|
|
96
|
+
var CurrentScreen = screensMap[screen];
|
|
97
|
+
return (React__default.default.createElement(context.ConfirmationContext.Provider, { value: contextValue },
|
|
98
|
+
React__default.default.createElement("div", { className: cn__default.default(index_module.component, className, (_b = {},
|
|
99
|
+
_b[index_module.center] = alignContent === 'center',
|
|
100
|
+
_b)), "data-test-id": dataTestId }, CurrentScreen && React__default.default.createElement(CurrentScreen, { mobile: mobile }))));
|
|
101
|
+
};
|
|
102
|
+
|
|
103
|
+
exports.BaseConfirmation = BaseConfirmation;
|
|
104
|
+
//# sourceMappingURL=component.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"component.js","sources":["../../../src/components/base-confirmation/component.tsx"],"sourcesContent":["import React, { ComponentType, FC, useEffect, useMemo } from 'react';\nimport cn from 'classnames';\n\nimport { usePrevious } from '@alfalab/hooks';\n\nimport { ConfirmationContext } from '../../context';\nimport { ConfirmationProps, defaultTexts, TConfirmationContext } from '../../types';\nimport { ONE_DAY, ONE_MINUTE, useCountdown } from '../../utils';\nimport { FatalError, Hint, Initial, TempBlock, TempBlockOver } from '../screens';\n\nimport styles from './index.module.css';\n\nconst confirmationScreens: { [key: string]: ComponentType<{ mobile?: boolean }> } = {\n INITIAL: Initial,\n HINT: Hint,\n FATAL_ERROR: FatalError,\n TEMP_BLOCK: TempBlock,\n TEMP_BLOCK_OVER: TempBlockOver,\n};\n\nexport const BaseConfirmation: FC<ConfirmationProps> = ({\n state,\n screen,\n alignContent = 'left',\n children,\n requiredCharAmount = 5,\n countdownDuration = ONE_MINUTE,\n tempBlockDuration = ONE_DAY,\n phone,\n blockSmsRetry,\n dataTestId,\n className,\n getScreensMap,\n onInputFinished,\n onChangeState,\n onSmsRetryClick,\n onChangeScreen,\n onFatalErrorOkButtonClick,\n onTempBlockFinished,\n mobile,\n clearCodeOnError = true,\n hideCountdownSection = false,\n breakpoint,\n client,\n initialScreenHintSlot,\n errorVisibleDuration,\n ...restProps\n}) => {\n const [timeLeft, startTimer, stopTimer] = useCountdown(countdownDuration);\n\n const prevState = usePrevious(state);\n\n useEffect(() => {\n startTimer();\n }, [startTimer]);\n\n useEffect(() => {\n /**\n * Перезапускаем таймер после повторного запроса кода\n */\n if (state === 'INITIAL' && prevState === 'CODE_SENDING') {\n startTimer();\n }\n }, [state, prevState, startTimer]);\n\n useEffect(() => {\n /**\n * Останавливаем таймер, если новый экран/состояние не содержит таймер\n */\n if (\n !['INITIAL', 'HINT', 'TEMP_BLOCK', 'TEMP_BLOCK_OVER'].includes(screen) ||\n blockSmsRetry\n ) {\n stopTimer();\n }\n }, [state, screen, blockSmsRetry, stopTimer]);\n\n const handleSmsRetry = () => {\n onChangeState('CODE_SENDING');\n\n onSmsRetryClick();\n };\n\n const handleInputFinished = (code: string) => {\n onChangeState('CODE_CHECKING');\n\n onInputFinished(code);\n };\n\n const handleFatalErrorOkButtonClick = () => {\n if (onFatalErrorOkButtonClick) {\n onFatalErrorOkButtonClick();\n }\n };\n\n // eslint-disable-next-line react/jsx-no-constructed-context-values\n const contextValue: TConfirmationContext = {\n hideCountdownSection,\n alignContent,\n texts: { ...defaultTexts, ...restProps.texts },\n state,\n screen,\n requiredCharAmount,\n countdownDuration,\n timeLeft,\n tempBlockDuration,\n phone,\n blockSmsRetry,\n breakpoint,\n client,\n onTempBlockFinished,\n onChangeState,\n onChangeScreen,\n clearCodeOnError,\n errorVisibleDuration,\n initialScreenHintSlot,\n onInputFinished: handleInputFinished,\n onSmsRetryClick: handleSmsRetry,\n onFatalErrorOkButtonClick: handleFatalErrorOkButtonClick,\n };\n\n const customScreen = useMemo(\n () => getScreensMap && getScreensMap(confirmationScreens),\n [getScreensMap],\n );\n\n const screensMap = customScreen || confirmationScreens;\n\n const CurrentScreen = screensMap[screen];\n\n return (\n <ConfirmationContext.Provider value={contextValue}>\n <div\n className={cn(styles.component, className, {\n [styles.center]: alignContent === 'center',\n })}\n data-test-id={dataTestId}\n >\n {CurrentScreen && <CurrentScreen mobile={mobile} />}\n </div>\n </ConfirmationContext.Provider>\n );\n};\n"],"names":["Initial","Hint","FatalError","TempBlock","TempBlockOver","ONE_M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A,cAAA;AACd,QAAA,gBAAgB,EAAA,gBAAA;AAChB,QAAA,oBAAoB,EAAA,oBAAA;AACpB,QAAA,qBAAqB,EAAA,qBAAA;AACrB,QAAA,eAAe,EAAE,mBAAmB;AACpC,QAAA,eAAe,EAAE,cAAc;AAC/B,QAAA,yBAAyB,EAAE,6BAA6B;KAC3D;AAED,IAAA,IAAM,YAAY,GAAGC,aAAO,CACxB,YAAM,EAAA,OAAA,aAAa,IAAI,aAAa,CAAC,mBAAmB,CAAC,GAAA,EACzD,CAAC,aAAa,CAAC,CAClB;AAED,IAAA,IAAM,UAAU,GAAG,YAAY,IAAI,mBAAmB;AAEtD,IAAA,IAAM,aAAa,GAAG,UAAU,CAAC,MAAM,CAAC;IAExC,QACIC,qCAACC,2BAAmB,CAAC,QAAQ,EAAC,EAAA,KAAK,EAAE,YAAY,EAAA;QAC7CD,sBACI,CAAA,aAAA,CAAA,KAAA,EAAA,EAAA,SAAS,EAAEE,mBAAE,CAACC,YAAM,CAAC,SAAS,EAAE,SAAS,GAAA,EAAA,GAAA,EAAA;AACrC,gBAAA,EAAA,CAACA,YAAM,CAAC,MAAM,CAAG,GAAA,YAAY,KAAK,QAAQ;AAC5C,gBAAA,EAAA,EAAA,EAAA,cAAA,EACY,UAAU,EAAA,EAEvB,aAAa,IAAIH,qCAAC,aAAa,EAAA,EAAC,MAAM,EAAE,MAAM,EAAA,CAAI,CACjD,CACqB;AAEvC;;;;"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
:root {
|
|
2
|
+
--color-light-text-secondary: rgba(4, 4, 19, 0.55);
|
|
3
|
+
} :root {
|
|
4
|
+
--gap-0: 0px;
|
|
5
|
+
} .confirmation__component_1yg0t {
|
|
6
|
+
width: 100%;
|
|
7
|
+
max-width: 388px;
|
|
8
|
+
color: var(--color-light-text-secondary)
|
|
9
|
+
} .confirmation__component_1yg0t.confirmation__center_1yg0t {
|
|
10
|
+
margin: var(--gap-0) auto;
|
|
11
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './component';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.module.css.js","sources":["../../src/components/base-confirmation/index.module.css"],"sourcesContent":["@import '@alfalab/core-components-vars/src/no-dynamic-mixins-index.css';\n\n.component {\n width: 100%;\n max-width: 388px;\n color: var(--color-light-text-secondary);\n\n &.center {\n margin: var(--gap-0) auto;\n }\n}\n"],"names":[],"mappings":";;;;AAEgB,aAAe,CAAC,WAAW,CAAC,+BAA+B,CAAC,QAAQ,CAAC,4BAA4B,CAAC;;;;"}
|