@alfalab/core-components-confirmation 14.3.1 → 15.0.0-8406faee42e08c133fbcbb0de3e6eb2df6766dd2
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 +6 -3
- package/components/base-confirmation/index.module.css.js +1 -1
- package/components/countdown-loader/index.css +2 -1
- package/components/countdown-loader/index.module.css.js +1 -1
- package/components/header/component.js +3 -5
- package/components/header/component.js.map +1 -1
- package/components/header/index.css +2 -26
- package/components/header/index.module.css.js +1 -1
- package/components/header/index.module.css.js.map +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 +22 -17
- package/components/screens/fatal-error/index.module.css.js +1 -1
- package/components/screens/hint/component.js +5 -5
- package/components/screens/hint/component.js.map +1 -1
- package/components/screens/hint/index.css +35 -23
- package/components/screens/hint/index.module.css.js +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.js +2 -2
- package/components/screens/initial/countdown-section.js.map +1 -1
- package/components/screens/initial/index.css +51 -31
- package/components/screens/initial/index.module.css.js +1 -1
- package/components/screens/temp-block/component.js +1 -1
- package/components/screens/temp-block/component.js.map +1 -1
- package/components/screens/temp-block/index.css +26 -19
- package/components/screens/temp-block/index.module.css.js +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 +20 -16
- package/components/screens/temp-block-over/index.module.css.js +1 -1
- package/cssm/components/base-confirmation/index.module.css +6 -3
- package/cssm/components/countdown-loader/index.module.css +2 -1
- package/cssm/components/header/component.js +3 -5
- package/cssm/components/header/component.js.map +1 -1
- package/cssm/components/header/index.module.css +2 -26
- 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 +22 -17
- package/cssm/components/screens/hint/component.js +5 -5
- package/cssm/components/screens/hint/component.js.map +1 -1
- package/cssm/components/screens/hint/index.module.css +35 -23
- 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.js +2 -2
- package/cssm/components/screens/initial/countdown-section.js.map +1 -1
- package/cssm/components/screens/initial/index.module.css +51 -31
- package/cssm/components/screens/temp-block/component.js +1 -1
- package/cssm/components/screens/temp-block/component.js.map +1 -1
- package/cssm/components/screens/temp-block/index.module.css +26 -19
- 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 +20 -16
- package/esm/components/base-confirmation/index.css +6 -3
- package/esm/components/base-confirmation/index.module.css.js +1 -1
- package/esm/components/countdown-loader/index.css +2 -1
- package/esm/components/countdown-loader/index.module.css.js +1 -1
- package/esm/components/header/component.js +4 -5
- package/esm/components/header/component.js.map +1 -1
- package/esm/components/header/index.css +2 -26
- package/esm/components/header/index.module.css.js +1 -1
- package/esm/components/header/index.module.css.js.map +1 -1
- package/esm/components/screens/fatal-error/component.js +3 -3
- package/esm/components/screens/fatal-error/component.js.map +1 -1
- package/esm/components/screens/fatal-error/index.css +22 -17
- package/esm/components/screens/fatal-error/index.module.css.js +1 -1
- package/esm/components/screens/hint/component.js +6 -6
- package/esm/components/screens/hint/component.js.map +1 -1
- package/esm/components/screens/hint/index.css +35 -23
- package/esm/components/screens/hint/index.module.css.js +1 -1
- package/esm/components/screens/initial/component.js +3 -3
- package/esm/components/screens/initial/component.js.map +1 -1
- package/esm/components/screens/initial/countdown-section.js +3 -3
- package/esm/components/screens/initial/countdown-section.js.map +1 -1
- package/esm/components/screens/initial/index.css +51 -31
- package/esm/components/screens/initial/index.module.css.js +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 +26 -19
- package/esm/components/screens/temp-block/index.module.css.js +1 -1
- package/esm/components/screens/temp-block-over/component.js +3 -3
- package/esm/components/screens/temp-block-over/component.js.map +1 -1
- package/esm/components/screens/temp-block-over/index.css +20 -16
- package/esm/components/screens/temp-block-over/index.module.css.js +1 -1
- package/modern/components/base-confirmation/index.css +6 -3
- package/modern/components/base-confirmation/index.module.css.js +1 -1
- package/modern/components/countdown-loader/index.css +2 -1
- package/modern/components/countdown-loader/index.module.css.js +1 -1
- package/modern/components/header/component.js +5 -3
- package/modern/components/header/component.js.map +1 -1
- package/modern/components/header/index.css +2 -26
- package/modern/components/header/index.module.css.js +1 -1
- package/modern/components/header/index.module.css.js.map +1 -1
- package/modern/components/screens/fatal-error/component.js +3 -3
- package/modern/components/screens/fatal-error/component.js.map +1 -1
- package/modern/components/screens/fatal-error/index.css +22 -17
- package/modern/components/screens/fatal-error/index.module.css.js +1 -1
- package/modern/components/screens/hint/component.js +6 -6
- package/modern/components/screens/hint/component.js.map +1 -1
- package/modern/components/screens/hint/index.css +35 -23
- package/modern/components/screens/hint/index.module.css.js +1 -1
- package/modern/components/screens/initial/component.js +3 -3
- package/modern/components/screens/initial/component.js.map +1 -1
- package/modern/components/screens/initial/countdown-section.js +3 -3
- package/modern/components/screens/initial/countdown-section.js.map +1 -1
- package/modern/components/screens/initial/index.css +51 -31
- package/modern/components/screens/initial/index.module.css.js +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 +26 -19
- package/modern/components/screens/temp-block/index.module.css.js +1 -1
- package/modern/components/screens/temp-block-over/component.js +3 -3
- package/modern/components/screens/temp-block-over/component.js.map +1 -1
- package/modern/components/screens/temp-block-over/index.css +20 -16
- package/modern/components/screens/temp-block-over/index.module.css.js +1 -1
- package/moderncssm/components/header/component.js +5 -3
- package/moderncssm/components/header/component.js.map +1 -1
- package/moderncssm/components/header/index.module.css +0 -28
- package/moderncssm/components/screens/fatal-error/component.js +3 -3
- package/moderncssm/components/screens/fatal-error/component.js.map +1 -1
- package/moderncssm/components/screens/fatal-error/index.module.css +4 -8
- package/moderncssm/components/screens/hint/component.js +6 -6
- package/moderncssm/components/screens/hint/component.js.map +1 -1
- package/moderncssm/components/screens/hint/index.module.css +5 -8
- package/moderncssm/components/screens/initial/component.js +3 -3
- package/moderncssm/components/screens/initial/component.js.map +1 -1
- package/moderncssm/components/screens/initial/countdown-section.js +3 -3
- package/moderncssm/components/screens/initial/countdown-section.js.map +1 -1
- package/moderncssm/components/screens/initial/index.module.css +5 -8
- 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 +4 -8
- package/moderncssm/components/screens/temp-block-over/component.js +3 -3
- package/moderncssm/components/screens/temp-block-over/component.js.map +1 -1
- package/moderncssm/components/screens/temp-block-over/index.module.css +4 -8
- package/package.json +11 -11
- package/src/components/header/component.tsx +17 -11
- package/src/components/header/index.module.css +0 -16
- package/src/components/screens/fatal-error/component.tsx +4 -4
- package/src/components/screens/hint/component.tsx +10 -10
- package/src/components/screens/initial/component.tsx +4 -4
- package/src/components/screens/initial/countdown-section.tsx +4 -4
- package/src/components/screens/temp-block/component.tsx +3 -3
- package/src/components/screens/temp-block-over/component.tsx +4 -4
- package/src/vars.css +1 -23
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
:root {
|
|
2
2
|
--color-light-text-secondary: rgba(4, 4, 19, 0.55);
|
|
3
|
-
}
|
|
3
|
+
}
|
|
4
|
+
:root {
|
|
4
5
|
--gap-0: 0px;
|
|
5
|
-
}
|
|
6
|
+
}
|
|
7
|
+
.confirmation__component_ckd9l {
|
|
6
8
|
width: 100%;
|
|
7
9
|
max-width: 388px;
|
|
8
10
|
color: var(--color-light-text-secondary);
|
|
9
|
-
}
|
|
11
|
+
}
|
|
12
|
+
.confirmation__component_ckd9l.confirmation__center_ckd9l {
|
|
10
13
|
margin: var(--gap-0) auto;
|
|
11
14
|
}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
require('./index.css');
|
|
4
4
|
|
|
5
|
-
var styles = {"component":"
|
|
5
|
+
var styles = {"component":"confirmation__component_ckd9l","center":"confirmation__center_ckd9l"};
|
|
6
6
|
|
|
7
7
|
module.exports = styles;
|
|
8
8
|
//# sourceMappingURL=index.module.css.js.map
|
|
@@ -3,19 +3,17 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
var React = require('react');
|
|
6
|
-
var cn = require('classnames');
|
|
7
6
|
var coreComponentsTypography = require('@alfalab/core-components-typography');
|
|
8
7
|
var index_module = require('./index.module.css.js');
|
|
9
8
|
|
|
10
9
|
function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
|
|
11
10
|
|
|
12
11
|
var React__default = /*#__PURE__*/_interopDefaultCompat(React);
|
|
13
|
-
var cn__default = /*#__PURE__*/_interopDefaultCompat(cn);
|
|
14
12
|
|
|
15
13
|
var Header = function (_a) {
|
|
16
|
-
var _b;
|
|
17
|
-
var
|
|
18
|
-
return (React__default.default.createElement(
|
|
14
|
+
var mobile = _a.mobile, children = _a.children, _b = _a.titleTag, titleTag = _b === void 0 ? 'h3' : _b;
|
|
15
|
+
var Tag = mobile ? coreComponentsTypography.TitleMobile : coreComponentsTypography.TitleDesktop;
|
|
16
|
+
return (React__default.default.createElement(Tag, { font: 'system', view: 'small', className: index_module.header, tag: titleTag, color: 'primary', defaultMargins: false }, children));
|
|
19
17
|
};
|
|
20
18
|
|
|
21
19
|
exports.Header = Header;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"component.js","sources":["../../src/components/header/component.tsx"],"sourcesContent":["import React, { type FC, type ReactNode } from 'react';\
|
|
1
|
+
{"version":3,"file":"component.js","sources":["../../src/components/header/component.tsx"],"sourcesContent":["import React, { type FC, type ReactNode } from 'react';\n\nimport { TitleDesktop, TitleMobile } from '@alfalab/core-components-typography';\n\nimport styles from './index.module.css';\n\nexport type HeaderProps = {\n /**\n * Контент шапки\n */\n children?: ReactNode;\n\n /**\n * Отображать в мобильной версии экран компонента\n */\n mobile?: boolean;\n\n /**\n * HTML тег для заголовка\n * @default 'h3'\n */\n titleTag?: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6';\n};\n\nexport const Header: FC<HeaderProps> = ({ mobile, children, titleTag = 'h3' }) => {\n const Tag = mobile ? TitleMobile : TitleDesktop;\n\n return (\n <Tag\n font='system'\n view='small'\n className={styles.header}\n tag={titleTag}\n color='primary'\n defaultMargins={false}\n >\n {children}\n </Tag>\n );\n};\n"],"names":["TitleMobile","TitleDesktop","React","styles"],"mappings":";;;;;;;;;;;;AAwBO,IAAM,MAAM,GAAoB,UAAC,EAAqC,EAAA;QAAnC,MAAM,GAAA,EAAA,CAAA,MAAA,EAAE,QAAQ,GAAA,EAAA,CAAA,QAAA,EAAE,gBAAe,EAAf,QAAQ,GAAG,EAAA,KAAA,MAAA,GAAA,IAAI,GAAA,EAAA;IACvE,IAAM,GAAG,GAAG,MAAM,GAAGA,oCAAW,GAAGC,qCAAY;AAE/C,IAAA,QACIC,sBAAA,CAAA,aAAA,CAAC,GAAG,EAAA,EACA,IAAI,EAAC,QAAQ,EACb,IAAI,EAAC,OAAO,EACZ,SAAS,EAAEC,YAAM,CAAC,MAAM,EACxB,GAAG,EAAE,QAAQ,EACb,KAAK,EAAC,SAAS,EACf,cAAc,EAAE,KAAK,EAAA,EAEpB,QAAQ,CACP;AAEd;;;;"}
|
|
@@ -1,31 +1,7 @@
|
|
|
1
1
|
:root {
|
|
2
2
|
--gap-xl: 24px;
|
|
3
3
|
--gap-24: var(--gap-xl);
|
|
4
|
-
}
|
|
5
|
-
|
|
6
|
-
system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Helvetica, sans-serif;
|
|
7
|
-
} :root {
|
|
8
|
-
--confirmation-header-desktop-font-size: 22px;
|
|
9
|
-
--confirmation-header-desktop-line-height: 26px;
|
|
10
|
-
--confirmation-header-desktop-font-weight: bold;
|
|
11
|
-
--confirmation-header-desktop-font-family: var(--font-family-system);
|
|
12
|
-
--confirmation-header-mobile-font-size: 20px;
|
|
13
|
-
--confirmation-header-mobile-line-height: 28px;
|
|
14
|
-
--confirmation-header-mobile-font-weight: 600;
|
|
15
|
-
--confirmation-header-mobile-font-family: var(--font-family-system);
|
|
16
|
-
--confirmation-header-font-feature-settings: normal
|
|
17
|
-
} .confirmation__header_cayx9.confirmation__header_cayx9 {
|
|
4
|
+
}
|
|
5
|
+
.confirmation__header_1hham.confirmation__header_1hham {
|
|
18
6
|
margin-bottom: var(--gap-24);
|
|
19
|
-
} .confirmation__typography_cayx9.confirmation__typography_cayx9.confirmation__typography_cayx9 {
|
|
20
|
-
font-feature-settings: var(--confirmation-header-font-feature-settings);
|
|
21
|
-
font-size: var(--confirmation-header-desktop-font-size);
|
|
22
|
-
line-height: var(--confirmation-header-desktop-line-height);
|
|
23
|
-
font-weight: var(--confirmation-header-desktop-font-weight);
|
|
24
|
-
font-family: var(--confirmation-header-desktop-font-family);
|
|
25
|
-
} .confirmation__typographyMobile_cayx9.confirmation__typographyMobile_cayx9.confirmation__typographyMobile_cayx9 {
|
|
26
|
-
font-feature-settings: var(--confirmation-header-font-feature-settings);
|
|
27
|
-
font-size: var(--confirmation-header-mobile-font-size);
|
|
28
|
-
line-height: var(--confirmation-header-mobile-line-height);
|
|
29
|
-
font-weight: var(--confirmation-header-mobile-font-weight);
|
|
30
|
-
font-family: var(--confirmation-header-mobile-font-family);
|
|
31
7
|
}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
require('./index.css');
|
|
4
4
|
|
|
5
|
-
var styles = {"header":"
|
|
5
|
+
var styles = {"header":"confirmation__header_1hham"};
|
|
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/header/index.module.css"],"sourcesContent":["@import '../../vars.css';\n\n.header.header {\n margin-bottom: var(--gap-24);\n}\n
|
|
1
|
+
{"version":3,"file":"index.module.css.js","sources":["../../src/components/header/index.module.css"],"sourcesContent":["@import '../../vars.css';\n\n.header.header {\n margin-bottom: var(--gap-24);\n}\n"],"names":[],"mappings":";;;;AAEgB,aAAe,CAAC,QAAQ,CAAC,4BAA4B,CAAC;;;;"}
|
|
@@ -21,11 +21,11 @@ var FatalError = function (_a) {
|
|
|
21
21
|
var _c = React.useContext(context.ConfirmationContext), alignContent = _c.alignContent, titleTag = _c.titleTag, texts = _c.texts, onFatalErrorOkButtonClick = _c.onFatalErrorOkButtonClick, breakpoint = _c.breakpoint, client = _c.client;
|
|
22
22
|
return (React__default.default.createElement("div", { className: cn__default.default(index_module.component, index_module[alignContent]) },
|
|
23
23
|
React__default.default.createElement(component.Header, { mobile: mobile, titleTag: titleTag }, texts.fatalErrorTitle),
|
|
24
|
-
React__default.default.createElement(coreComponentsTypography.
|
|
24
|
+
React__default.default.createElement(coreComponentsTypography.TypographyText, { view: 'primary-medium', color: 'primary', className: cn__default.default((_b = {},
|
|
25
25
|
_b[index_module.typographyTheme] = !mobile,
|
|
26
26
|
_b[index_module.typographyThemeMobile] = mobile,
|
|
27
27
|
_b)) }, texts.fatalErrorDescription),
|
|
28
|
-
React__default.default.createElement(coreComponentsButton.Button, { size: mobile ?
|
|
28
|
+
React__default.default.createElement(coreComponentsButton.Button, { size: mobile ? 40 : 48, view: 'secondary', onClick: onFatalErrorOkButtonClick, className: index_module.button, breakpoint: breakpoint, client: client }, texts.fatalErrorButton)));
|
|
29
29
|
};
|
|
30
30
|
|
|
31
31
|
exports.FatalError = FatalError;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"component.js","sources":["../../../src/components/screens/fatal-error/component.tsx"],"sourcesContent":["import React, { type FC, useContext } from 'react';\nimport cn from 'classnames';\n\nimport { Button } from '@alfalab/core-components-button';\nimport {
|
|
1
|
+
{"version":3,"file":"component.js","sources":["../../../src/components/screens/fatal-error/component.tsx"],"sourcesContent":["import React, { type FC, useContext } from 'react';\nimport cn from 'classnames';\n\nimport { Button } from '@alfalab/core-components-button';\nimport { TypographyText } from '@alfalab/core-components-typography';\n\nimport { ConfirmationContext } from '../../../context';\nimport { Header } from '../../header';\n\nimport styles from './index.module.css';\n\nexport type FatalErrorProps = {\n /**\n * Отображать в мобильной версии экран компонента\n */\n mobile?: boolean;\n};\n\nexport const FatalError: FC<FatalErrorProps> = ({ mobile }) => {\n const { alignContent, titleTag, texts, onFatalErrorOkButtonClick, breakpoint, client } =\n useContext(ConfirmationContext);\n\n return (\n <div className={cn(styles.component, styles[alignContent])}>\n <Header mobile={mobile} titleTag={titleTag}>\n {texts.fatalErrorTitle}\n </Header>\n\n <TypographyText\n view='primary-medium'\n color='primary'\n className={cn({\n [styles.typographyTheme]: !mobile,\n [styles.typographyThemeMobile]: mobile,\n })}\n >\n {texts.fatalErrorDescription}\n </TypographyText>\n\n <Button\n size={mobile ? 40 : 48}\n view='secondary'\n onClick={onFatalErrorOkButtonClick}\n className={styles.button}\n breakpoint={breakpoint}\n client={client}\n >\n {texts.fatalErrorButton}\n </Button>\n </div>\n );\n};\n"],"names":["useContext","ConfirmationContext","React","cn","styles","Header","TypographyText","Button"],"mappings":";;;;;;;;;;;;;;;;;AAkBO,IAAM,UAAU,GAAwB,UAAC,EAAU,EAAA;;AAAR,IAAA,IAAA,MAAM,GAAA,EAAA,CAAA,MAAA;IAC9C,IAAA,EAAA,GACFA,gBAAU,CAACC,2BAAmB,CAAC,EAD3B,YAAY,GAAA,EAAA,CAAA,YAAA,EAAE,QAAQ,GAAA,EAAA,CAAA,QAAA,EAAE,KAAK,GAAA,EAAA,CAAA,KAAA,EAAE,yBAAyB,GAAA,EAAA,CAAA,yBAAA,EAAE,UAAU,GAA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|
+
:root {
|
|
8
10
|
--font-family-system:
|
|
9
11
|
system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Helvetica, sans-serif;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
--confirmation-text-line-height: 24px;
|
|
13
|
-
--confirmation-text-font-weight: 400;
|
|
14
|
-
--confirmation-text-font-family: var(--font-family-system);
|
|
12
|
+
}
|
|
13
|
+
:root {
|
|
15
14
|
--confirmation-text-color: var(--color-light-text-primary)
|
|
16
|
-
}
|
|
15
|
+
}
|
|
16
|
+
.confirmation__component_1vobt {
|
|
17
17
|
display: flex;
|
|
18
18
|
flex-direction: column;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
font-
|
|
19
|
+
}
|
|
20
|
+
.confirmation__typographyTheme_1vobt.confirmation__typographyTheme_1vobt {
|
|
21
|
+
font-size: 16px;
|
|
22
|
+
line-height: 24px;
|
|
23
|
+
font-weight: 400;
|
|
24
|
+
font-family: var(--font-family-system);
|
|
24
25
|
color: var(--confirmation-text-color);
|
|
25
|
-
}
|
|
26
|
+
}
|
|
27
|
+
.confirmation__typographyThemeMobile_1vobt.confirmation__typographyThemeMobile_1vobt {
|
|
26
28
|
color: var(--color-light-text-secondary);
|
|
27
|
-
}
|
|
29
|
+
}
|
|
30
|
+
.confirmation__left_1vobt {
|
|
28
31
|
align-items: flex-start;
|
|
29
|
-
}
|
|
32
|
+
}
|
|
33
|
+
.confirmation__center_1vobt {
|
|
30
34
|
align-items: center;
|
|
31
35
|
text-align: center;
|
|
32
|
-
}
|
|
36
|
+
}
|
|
37
|
+
.confirmation__button_1vobt.confirmation__button_1vobt {
|
|
33
38
|
margin-top: var(--gap-32);
|
|
34
39
|
}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
require('./index.css');
|
|
4
4
|
|
|
5
|
-
var styles = {"component":"
|
|
5
|
+
var styles = {"component":"confirmation__component_1vobt","typographyTheme":"confirmation__typographyTheme_1vobt","typographyThemeMobile":"confirmation__typographyThemeMobile_1vobt","left":"confirmation__left_1vobt","center":"confirmation__center_1vobt","button":"confirmation__button_1vobt"};
|
|
6
6
|
|
|
7
7
|
module.exports = styles;
|
|
8
8
|
//# sourceMappingURL=index.module.css.js.map
|
|
@@ -28,7 +28,7 @@ var Hint = function (_a) {
|
|
|
28
28
|
};
|
|
29
29
|
return (React__default.default.createElement("div", { className: cn__default.default(index_module.component, index_module[alignContent]) },
|
|
30
30
|
React__default.default.createElement(component.Header, { mobile: mobile, titleTag: titleTag }, texts.hintTitle),
|
|
31
|
-
React__default.default.createElement(coreComponentsTypography.
|
|
31
|
+
React__default.default.createElement(coreComponentsTypography.TypographyText, { view: 'primary-medium', color: 'primary', className: cn__default.default(index_module.text, (_b = {},
|
|
32
32
|
_b[index_module.typographyTheme] = !mobile,
|
|
33
33
|
_b[index_module.typographyThemeMobile] = mobile,
|
|
34
34
|
_b)) }, texts.hintDescription),
|
|
@@ -37,7 +37,7 @@ var Hint = function (_a) {
|
|
|
37
37
|
_c)) },
|
|
38
38
|
React__default.default.createElement("div", { className: cn__default.default(index_module.phoneWrap, (_d = {}, _d[index_module.phoneContentMobile] = mobile, _d)) },
|
|
39
39
|
React__default.default.createElement(coreComponentsLink.Link, { href: utils.getPhoneHref(internationalPhone), underline: false, className: cn__default.default(index_module.phoneLink, (_e = {}, _e[index_module.typographyThemeMobile] = mobile, _e)) }, internationalPhone),
|
|
40
|
-
React__default.default.createElement(coreComponentsTypography.
|
|
40
|
+
React__default.default.createElement(coreComponentsTypography.TypographyText, { view: 'primary-medium', color: 'primary', className: cn__default.default(index_module.text, (_f = {},
|
|
41
41
|
_f[index_module.typographyTheme] = !mobile,
|
|
42
42
|
_f[index_module.typographyThemeMobile] = mobile,
|
|
43
43
|
_f)) }, mobile
|
|
@@ -45,17 +45,17 @@ var Hint = function (_a) {
|
|
|
45
45
|
: ' \u2014\u00A0в\u00A0Москве и\u00A0за\u00A0границей')),
|
|
46
46
|
React__default.default.createElement("div", { className: cn__default.default(index_module.phoneWrap, (_g = {}, _g[index_module.phoneContentMobile] = mobile, _g)) },
|
|
47
47
|
React__default.default.createElement(coreComponentsLink.Link, { href: utils.getPhoneHref(domesticPhone), underline: false, className: cn__default.default(index_module.phoneLink, (_h = {}, _h[index_module.typographyThemeMobile] = mobile, _h)) }, domesticPhone),
|
|
48
|
-
React__default.default.createElement(coreComponentsTypography.
|
|
48
|
+
React__default.default.createElement(coreComponentsTypography.TypographyText, { view: 'primary-medium', color: 'primary', className: cn__default.default(index_module.text, (_j = {},
|
|
49
49
|
_j[index_module.typographyTheme] = !mobile,
|
|
50
50
|
_j[index_module.typographyThemeMobile] = mobile,
|
|
51
51
|
_j)) }, mobile
|
|
52
52
|
? 'Для\u00A0звонков по\u00A0России'
|
|
53
53
|
: ' \u2014\u00A0для звонков по\u00A0России'))),
|
|
54
|
-
React__default.default.createElement(coreComponentsTypography.
|
|
54
|
+
React__default.default.createElement(coreComponentsTypography.TypographyText, { view: 'primary-medium', color: 'primary', className: cn__default.default(index_module.text, (_k = {},
|
|
55
55
|
_k[index_module.typographyTheme] = !mobile,
|
|
56
56
|
_k[index_module.typographyThemeMobile] = mobile,
|
|
57
57
|
_k)) }, texts.hintNotification),
|
|
58
|
-
React__default.default.createElement(coreComponentsButton.Button, { size: mobile ?
|
|
58
|
+
React__default.default.createElement(coreComponentsButton.Button, { size: mobile ? 40 : 48, view: 'secondary', onClick: handleReturnButtonClick, className: index_module.hintButton, breakpoint: breakpoint, client: client }, hintButton)));
|
|
59
59
|
};
|
|
60
60
|
|
|
61
61
|
exports.Hint = Hint;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"component.js","sources":["../../../src/components/screens/hint/component.tsx"],"sourcesContent":["import React, { type FC, useContext } from 'react';\nimport cn from 'classnames';\n\nimport { Button } from '@alfalab/core-components-button';\nimport { Link } from '@alfalab/core-components-link';\nimport {
|
|
1
|
+
{"version":3,"file":"component.js","sources":["../../../src/components/screens/hint/component.tsx"],"sourcesContent":["import React, { type FC, useContext } from 'react';\nimport cn from 'classnames';\n\nimport { Button } from '@alfalab/core-components-button';\nimport { Link } from '@alfalab/core-components-link';\nimport { TypographyText } from '@alfalab/core-components-typography';\n\nimport { ConfirmationContext } from '../../../context';\nimport { getPhoneHref } from '../../../utils';\nimport { Header } from '../../header';\n\nimport styles from './index.module.css';\n\nexport type HintProps = {\n /**\n * Отображать в мобильной версии экран компонента\n */\n mobile?: boolean;\n};\n\nexport const Hint: FC<HintProps> = ({ mobile }) => {\n const { alignContent, titleTag, texts, onChangeScreen, onChangeState, breakpoint, client } =\n useContext(ConfirmationContext);\n\n const { domesticPhone = '', internationalPhone = '', hintButton } = texts;\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.hintTitle}\n </Header>\n\n <TypographyText\n view='primary-medium'\n color='primary'\n className={cn(styles.text, {\n [styles.typographyTheme]: !mobile,\n [styles.typographyThemeMobile]: mobile,\n })}\n >\n {texts.hintDescription}\n </TypographyText>\n\n <div\n className={cn(styles.phonesWrap, {\n [styles.phonesWrapMobile]: mobile,\n })}\n >\n <div className={cn(styles.phoneWrap, { [styles.phoneContentMobile]: mobile })}>\n <Link\n href={getPhoneHref(internationalPhone)}\n underline={false}\n className={cn(styles.phoneLink, { [styles.typographyThemeMobile]: mobile })}\n >\n {internationalPhone}\n </Link>\n <TypographyText\n view='primary-medium'\n color='primary'\n className={cn(styles.text, {\n [styles.typographyTheme]: !mobile,\n [styles.typographyThemeMobile]: mobile,\n })}\n >\n {mobile\n ? 'В\\u00A0Москве и\\u00A0за\\u00A0границей'\n : ' \\u2014\\u00A0в\\u00A0Москве и\\u00A0за\\u00A0границей'}\n </TypographyText>\n </div>\n\n <div className={cn(styles.phoneWrap, { [styles.phoneContentMobile]: mobile })}>\n <Link\n href={getPhoneHref(domesticPhone)}\n underline={false}\n className={cn(styles.phoneLink, { [styles.typographyThemeMobile]: mobile })}\n >\n {domesticPhone}\n </Link>\n <TypographyText\n view='primary-medium'\n color='primary'\n className={cn(styles.text, {\n [styles.typographyTheme]: !mobile,\n [styles.typographyThemeMobile]: mobile,\n })}\n >\n {mobile\n ? 'Для\\u00A0звонков по\\u00A0России'\n : ' \\u2014\\u00A0для звонков по\\u00A0России'}\n </TypographyText>\n </div>\n </div>\n\n <TypographyText\n view='primary-medium'\n color='primary'\n className={cn(styles.text, {\n [styles.typographyTheme]: !mobile,\n [styles.typographyThemeMobile]: mobile,\n })}\n >\n {texts.hintNotification}\n </TypographyText>\n <Button\n size={mobile ? 40 : 48}\n view='secondary'\n onClick={handleReturnButtonClick}\n className={styles.hintButton}\n breakpoint={breakpoint}\n client={client}\n >\n {hintButton}\n </Button>\n </div>\n );\n};\n"],"names":["useContext","ConfirmationContext","React","cn","styles","Header","TypographyText","Link","getPhoneHref","Button"],"mappings":";;;;;;;;;;;;;;;;;;;AAoBO,IAAM,IAAI,GAAkB,UAAC,EAAU,EAAA;;AAAR,IAAA,IAAA,MAAM,GAAA,EAAA,CAAA,MAAA;IAClC,IAAA,EAAA,GACFA,gBAAU,CAACC,2BAAmB,CAAC,EAD3B,YAAY,GAAA,EAAA,CAAA,YAAA,EAAE,QAAQ,GAAA,EAAA,CAAA,QAAA,EAAE,KAAK,WAAA,EAAE,cAAc,GAAA,EAAA,CAAA,cAAA,EAAE,aAAa,GAAA,EAAA,CAAA,aAAA,EAAE,UAAU,GAAA,EAAA,CAAA,UAAA,EAAE,MAAM,GAAA,EAAA,CAAA,MACrD;IAE3B,IAAA,EAAA,GAA4D,KAAK,CAA/C,aAAA,EAAlB,aAAa,GAAG,EAAA,KAAA,MAAA,GAAA,EAAE,GAAA,EAAA,EAAE,EAAwC,GAAA,KAAK,mBAAtB,EAAvB,kBAAkB,mBAAG,EAAE,GAAA,EAAA,EAAE,UAAU,GAAK,KAAK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AS,EACf,SAAS,EAAEH,mBAAE,CAACC,YAAM,CAAC,IAAI,GAAA,EAAA,GAAA,EAAA;AACrB,wBAAA,EAAA,CAACA,YAAM,CAAC,eAAe,CAAA,GAAG,CAAC,MAAM;AACjC,wBAAA,EAAA,CAACA,YAAM,CAAC,qBAAqB,CAAA,GAAG,MAAM;AACxC,wBAAA,EAAA,EAAA,EAAA,EAED;AACG,sBAAE;AACF,sBAAE,yCAAyC,CAClC,CACf,CACJ;AAEN,QAAAF,sBAAA,CAAA,aAAA,CAACI,uCAAc,EACX,EAAA,IAAI,EAAC,gBAAgB,EACrB,KAAK,EAAC,SAAS,EACf,SAAS,EAAEH,mBAAE,CAACC,YAAM,CAAC,IAAI,GAAA,EAAA,GAAA,EAAA;AACrB,gBAAA,EAAA,CAACA,YAAM,CAAC,eAAe,CAAA,GAAG,CAAC,MAAM;AACjC,gBAAA,EAAA,CAACA,YAAM,CAAC,qBAAqB,CAAA,GAAG,MAAM;oBACxC,EAED,EAAA,KAAK,CAAC,gBAAgB,CACV;AACjB,QAAAF,sBAAA,CAAA,aAAA,CAACO,2BAAM,EACH,EAAA,IAAI,EAAE,MAAM,GAAG,EAAE,GAAG,EAAE,EACtB,IAAI,EAAC,WAAW,EAChB,OAAO,EAAE,uBAAuB,EAChC,SAAS,EAAEL,YAAM,CAAC,UAAU,EAC5B,UAAU,EAAE,UAAU,EACtB,MAAM,EAAE,MAAM,EAAA,EAEb,UAAU,CACN,CACP;AAEd;;;;"}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
:root {
|
|
2
2
|
--color-light-text-primary: rgba(3, 3, 6, 0.88);
|
|
3
3
|
--color-light-text-secondary: rgba(4, 4, 19, 0.55);
|
|
4
|
-
}
|
|
4
|
+
}
|
|
5
|
+
:root {
|
|
5
6
|
--gap-xs: 8px;
|
|
6
7
|
--gap-xl: 24px;
|
|
7
8
|
--gap-2xl: 32px;
|
|
@@ -9,49 +10,60 @@
|
|
|
9
10
|
--gap-8: var(--gap-xs);
|
|
10
11
|
--gap-24: var(--gap-xl);
|
|
11
12
|
--gap-32: var(--gap-2xl);
|
|
12
|
-
}
|
|
13
|
+
}
|
|
14
|
+
:root {
|
|
13
15
|
--font-family-system:
|
|
14
16
|
system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Helvetica, sans-serif;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
--confirmation-text-line-height: 24px;
|
|
18
|
-
--confirmation-text-font-weight: 400;
|
|
19
|
-
--confirmation-text-font-family: var(--font-family-system);
|
|
17
|
+
}
|
|
18
|
+
:root {
|
|
20
19
|
--confirmation-text-color: var(--color-light-text-primary)
|
|
21
|
-
}
|
|
20
|
+
}
|
|
21
|
+
.confirmation__component_17zxo {
|
|
22
22
|
display: flex;
|
|
23
23
|
flex-direction: column;
|
|
24
24
|
align-items: flex-start;
|
|
25
|
-
}
|
|
25
|
+
}
|
|
26
|
+
.confirmation__component_17zxo span:last-of-type {
|
|
26
27
|
margin-bottom: var(--gap-0);
|
|
27
|
-
}
|
|
28
|
+
}
|
|
29
|
+
.confirmation__center_17zxo {
|
|
28
30
|
align-items: center;
|
|
29
31
|
text-align: center;
|
|
30
|
-
}
|
|
32
|
+
}
|
|
33
|
+
.confirmation__text_17zxo.confirmation__text_17zxo {
|
|
31
34
|
margin-bottom: var(--gap-24);
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
font-
|
|
35
|
+
}
|
|
36
|
+
.confirmation__typographyTheme_17zxo.confirmation__typographyTheme_17zxo {
|
|
37
|
+
font-size: 16px;
|
|
38
|
+
line-height: 24px;
|
|
39
|
+
font-weight: 400;
|
|
40
|
+
font-family: var(--font-family-system);
|
|
37
41
|
color: var(--confirmation-text-color);
|
|
38
|
-
}
|
|
42
|
+
}
|
|
43
|
+
.confirmation__typographyThemeMobile_17zxo.confirmation__typographyThemeMobile_17zxo {
|
|
39
44
|
color: var(--color-light-text-secondary);
|
|
40
|
-
}
|
|
45
|
+
}
|
|
46
|
+
.confirmation__phonesWrap_17zxo {
|
|
41
47
|
display: flex;
|
|
42
48
|
flex-direction: column;
|
|
43
49
|
margin-bottom: var(--gap-24);
|
|
44
|
-
}
|
|
50
|
+
}
|
|
51
|
+
.confirmation__phoneWrap_17zxo {
|
|
45
52
|
margin-bottom: var(--gap-8);
|
|
46
|
-
}
|
|
53
|
+
}
|
|
54
|
+
.confirmation__phoneWrap_17zxo:last-child {
|
|
47
55
|
margin-bottom: var(--gap-0);
|
|
48
|
-
}
|
|
56
|
+
}
|
|
57
|
+
.confirmation__phoneLink_17zxo.confirmation__phoneLink_17zxo {
|
|
49
58
|
font-size: 16px;
|
|
50
59
|
line-height: 24px;
|
|
51
60
|
font-weight: 500;
|
|
52
|
-
|
|
61
|
+
font-family: var(--font-family-system);
|
|
62
|
+
}
|
|
63
|
+
.confirmation__hintButton_17zxo {
|
|
53
64
|
margin-top: var(--gap-32);
|
|
54
|
-
}
|
|
65
|
+
}
|
|
66
|
+
.confirmation__phoneContentMobile_17zxo {
|
|
55
67
|
display: flex;
|
|
56
68
|
flex-direction: column;
|
|
57
69
|
}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
require('./index.css');
|
|
4
4
|
|
|
5
|
-
var styles = {"component":"
|
|
5
|
+
var styles = {"component":"confirmation__component_17zxo","center":"confirmation__center_17zxo","text":"confirmation__text_17zxo","typographyTheme":"confirmation__typographyTheme_17zxo","typographyThemeMobile":"confirmation__typographyThemeMobile_17zxo","phonesWrap":"confirmation__phonesWrap_17zxo","phoneWrap":"confirmation__phoneWrap_17zxo","phoneLink":"confirmation__phoneLink_17zxo","hintButton":"confirmation__hintButton_17zxo","phoneContentMobile":"confirmation__phoneContentMobile_17zxo"};
|
|
6
6
|
|
|
7
7
|
module.exports = styles;
|
|
8
8
|
//# sourceMappingURL=index.module.css.js.map
|
|
@@ -96,7 +96,7 @@ var Initial = function (_a) {
|
|
|
96
96
|
return initialScreenHintSlot;
|
|
97
97
|
}
|
|
98
98
|
if (mobile$2) {
|
|
99
|
-
return (React__default.default.createElement(mobile$1.ButtonMobile, { onClick: handleSmsHintLinkClick, className: index_module.smsBtn, view: 'text', size:
|
|
99
|
+
return (React__default.default.createElement(mobile$1.ButtonMobile, { onClick: handleSmsHintLinkClick, className: index_module.smsBtn, view: 'text', size: 40 }, texts.linkToHint));
|
|
100
100
|
}
|
|
101
101
|
return (React__default.default.createElement(coreComponentsLink.Link, { onClick: handleSmsHintLinkClick, className: index_module.smsComeLink, view: mobile$2 ? 'primary' : 'secondary', pseudo: true }, texts.linkToHint));
|
|
102
102
|
};
|
|
@@ -105,7 +105,7 @@ var Initial = function (_a) {
|
|
|
105
105
|
var ComponentCodeInput = mobile$2 ? mobile.CodeInputMobile : desktop.CodeInputDesktop;
|
|
106
106
|
return (React__default.default.createElement("div", { className: cn__default.default(index_module.component, index_module[alignContent]) },
|
|
107
107
|
React__default.default.createElement(component.Header, { mobile: mobile$2, titleTag: titleTag }, texts.title),
|
|
108
|
-
phone ? (React__default.default.createElement(coreComponentsTypography.
|
|
108
|
+
phone ? (React__default.default.createElement(coreComponentsTypography.TypographyText, { view: 'primary-medium', color: 'primary', className: cn__default.default(index_module.phone, (_b = {},
|
|
109
109
|
_b[index_module.typographyTheme] = !mobile$2,
|
|
110
110
|
_b[index_module.typographyThemeMobile] = mobile$2,
|
|
111
111
|
_b)) },
|
|
@@ -1 +1 @@
|
|
|
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":["mobile","useContext","ConfirmationContext","usePrevious","useRef","useState","useCallback","useEffect","useLayoutEffect_SAFE_FOR_SSR","React","ButtonMobile","styles","Link","CodeInputMobile","CodeInputDesktop","cn","Header","Text","CountdownSection"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AA4BA,IAAM,+BAA+B,GAAG,IAAI;AAErC,IAAM,OAAO,GAAqB,UAAC,EAAU,EAAA;;AAAR,IAAA,IAAAA,QAAM,GAAA,EAAA,CAAA,MAAA;IACxC,IAAA,EAAA,GAgBFC,gBAAU,CAACC,2BAAmB,CAAC,EAf/B,KAAK,GAAA,EAAA,CAAA,KAAA,EACL,YAAY,GAAA,EAAA,CAAA,YAAA,EACZ,QAAQ,GAAA,EAAA,CAAA,QAAA,EACR,KAAK,GAAA,EAAA,CAAA,KAAA,EACL,kBAAkB,GAAA,EAAA,CAAA,kBAAA,EAClB,QAAQ,GAAA,EAAA,CAAA,QAAA,EACR,KAAK,WAAA,EACL,gBAAgB,sBAAA,EAChB,oBAAoB,0BAAA,EACpB,qBAAqB,GAAA,EAAA,CAAA,qBAAA,EACrB,oBAAoB,GAAA,EAAA,CAAA,oBAAA,EACpB,aAAa,GAAA,EAAA,CAAA,aAAA,EACb,eAAe,GAAA,EAAA,CAAA,eAAA,EACf,cAAc,GAAA,EAAA,CAAA,cAAA,EACd,eAAe,GAAA,EAAA,CAAA,eACgB;AAEnC,IAAA,IAAM,SAAS,GAAGC,iBAAW,CAAC,KAAK,CAAC;AAEpC,IAAA,IAAM,QAAQ,GAAGC,YAAM,CAAiB,IAAI,CAAC;IAEvC,IAAA,EAAA,GAAgDC,cAAQ,CAAC,KAAK,CAAC,EAA9D,mBAAmB,GAAA,EAAA,CAAA,CAAA,CAAA,EAAE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U,EAAE,mBAAmB,EAC/B,QAAQ,EAAE,iBAAiB,EAC3B,gBAAgB,EAAE,gBAAgB,EAClC,oBAAoB,EAAE,oBAAoB,EAC1C,mBAAmB,EAAE,uBAAuB,EAC9C,CAAA;QACD,CAAC,oBAAoB,KAClBF,sBAAC,CAAA,aAAA,CAAAS,iCAAgB,EACb,EAAA,UAAU,EAAE,UAAU,EACtB,UAAU,EAAE,UAAU,EACtB,mBAAmB,EAAE,mBAAmB,EACxC,mBAAmB,EAAE,mBAAmB,EACxC,MAAM,EAAElB,QAAM,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 { TypographyText } 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={40}\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 <TypographyText\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 </TypographyText>\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":["mobile","useContext","ConfirmationContext","usePrevious","useRef","useState","useCallback","useEffect","useLayoutEffect_SAFE_FOR_SSR","React","ButtonMobile","styles","Link","CodeInputMobile","CodeInputDesktop","cn","Header","TypographyText","CountdownSection"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AA4BA,IAAM,+BAA+B,GAAG,IAAI;AAErC,IAAM,OAAO,GAAqB,UAAC,EAAU,EAAA;;AAAR,IAAA,IAAAA,QAAM,GAAA,EAAA,CAAA,MAAA;IACxC,IAAA,EAAA,GAgBF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ext), state = _d.state, texts = _d.texts, timeLeft = _d.timeLeft, blockSmsRetry = _d.blockSmsRetry, breakpoint = _d.breakpoint, client = _d.client;
|
|
23
23
|
var renderText = function (content) {
|
|
24
24
|
var _a;
|
|
25
|
-
return (React__default.default.createElement(coreComponentsTypography.
|
|
25
|
+
return (React__default.default.createElement(coreComponentsTypography.TypographyText, { className: cn__default.default(index_module.countdownContainer, (_a = {},
|
|
26
26
|
_a[index_module.countdownMobile] = mobile,
|
|
27
27
|
_a[index_module.typographyTheme] = !mobile,
|
|
28
28
|
_a)), view: mobile ? 'primary-small' : 'primary-medium', tag: 'div' }, content));
|
|
@@ -40,7 +40,7 @@ var CountdownSection = function (_a) {
|
|
|
40
40
|
if (blockSmsRetry)
|
|
41
41
|
return renderText(texts.noAttemptsLeft);
|
|
42
42
|
if (timePassed) {
|
|
43
|
-
return (React__default.default.createElement(coreComponentsButton.Button, { size: mobile ?
|
|
43
|
+
return (React__default.default.createElement(coreComponentsButton.Button, { size: mobile ? 40 : 32, view: 'secondary', onClick: handleSmsRetryClick, className: cn__default.default(index_module.getCodeButton, (_c = {}, _c[index_module.getCodeButtonMobile] = mobile, _c)), breakpoint: breakpoint, client: client }, texts.buttonRetry));
|
|
44
44
|
}
|
|
45
45
|
return renderText(React__default.default.createElement(React.Fragment, null,
|
|
46
46
|
texts.countdown,
|
|
@@ -1 +1 @@
|
|
|
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 {
|
|
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 { TypographyText } 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 <TypographyText\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 </TypographyText>\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 ? 40 : 32}\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":["useContext","ConfirmationContext","React","TypographyText","cn","styles","Spinner","Button","Fragment","formatMsAsMinutes"],"mappings":";;;;;;;;;;;;;;;;;;AAoBO,IAAM,g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