@alfalab/core-components-confirmation 12.3.3 → 12.3.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/{component-c18159ad.d.ts → component-ad8387ce.d.ts} +0 -0
- package/{component-c18159ad.js → component-ad8387ce.js} +2 -2
- package/component.desktop.js +2 -2
- package/component.mobile.js +3 -3
- package/component.responsive.js +2 -2
- package/components/base-confirmation/component.js +2 -2
- package/components/base-confirmation/index.css +2 -8
- package/components/base-confirmation/index.d.ts +1 -1
- package/components/base-confirmation/index.js +2 -2
- package/components/countdown-loader/component.js +1 -1
- package/components/countdown-loader/index.css +2 -2
- package/components/header/component.js +1 -1
- package/components/header/index.css +4 -4
- package/components/index.js +1 -1
- package/components/screens/fatal-error/component.js +1 -1
- package/components/screens/fatal-error/index.css +10 -5
- package/components/screens/hint/component.js +16 -17
- package/components/screens/hint/index.css +15 -14
- package/components/screens/index.js +1 -1
- package/components/screens/initial/component.js +1 -1
- package/components/screens/initial/countdown-section.js +1 -1
- package/components/screens/initial/index.css +18 -18
- package/components/screens/initial/index.js +1 -1
- package/components/screens/temp-block/component.js +3 -3
- package/components/screens/temp-block/index.css +13 -5
- package/{countdown-section-fa5d99c6.d.ts → countdown-section-f4894842.d.ts} +0 -0
- package/countdown-section-f4894842.js +49 -0
- package/cssm/{component-cbe72bf1.d.ts → component-5a4af768.d.ts} +0 -0
- package/cssm/{component-cbe72bf1.js → component-5a4af768.js} +1 -1
- package/cssm/component.desktop.js +1 -1
- package/cssm/component.mobile.js +1 -1
- package/cssm/component.responsive.js +1 -1
- package/cssm/components/base-confirmation/component.js +1 -1
- package/cssm/components/base-confirmation/index.d.ts +1 -1
- package/cssm/components/base-confirmation/index.js +1 -1
- package/cssm/components/base-confirmation/index.module.css +0 -6
- package/cssm/components/header/index.module.css +3 -3
- package/cssm/components/screens/fatal-error/index.module.css +6 -1
- package/cssm/components/screens/hint/component.js +15 -16
- package/cssm/components/screens/hint/index.module.css +9 -8
- package/cssm/components/screens/initial/countdown-section.js +19 -26
- package/cssm/components/screens/initial/index.module.css +5 -5
- package/cssm/components/screens/temp-block/component.js +2 -2
- package/cssm/components/screens/temp-block/index.module.css +10 -2
- package/cssm/desktop.js +1 -1
- package/cssm/index.js +1 -1
- package/cssm/mobile.js +1 -1
- package/cssm/responsive.js +1 -1
- package/desktop.js +2 -2
- package/esm/{component-2c4a15b0.d.ts → component-b1ceb5d0.d.ts} +0 -0
- package/esm/{component-2c4a15b0.js → component-b1ceb5d0.js} +2 -2
- package/esm/component.desktop.js +2 -2
- package/esm/component.mobile.js +3 -3
- package/esm/component.responsive.js +2 -2
- package/esm/components/base-confirmation/component.js +2 -2
- package/esm/components/base-confirmation/index.css +2 -8
- package/esm/components/base-confirmation/index.d.ts +1 -1
- package/esm/components/base-confirmation/index.js +2 -2
- package/esm/components/countdown-loader/component.js +1 -1
- package/esm/components/countdown-loader/index.css +2 -2
- package/esm/components/header/component.js +1 -1
- package/esm/components/header/index.css +4 -4
- package/esm/components/index.js +1 -1
- package/esm/components/screens/fatal-error/component.js +1 -1
- package/esm/components/screens/fatal-error/index.css +10 -5
- package/esm/components/screens/hint/component.js +16 -17
- package/esm/components/screens/hint/index.css +15 -14
- package/esm/components/screens/index.js +1 -1
- package/esm/components/screens/initial/component.js +1 -1
- package/esm/components/screens/initial/countdown-section.js +1 -1
- package/esm/components/screens/initial/index.css +18 -18
- package/esm/components/screens/initial/index.js +1 -1
- package/esm/components/screens/temp-block/component.js +4 -4
- package/esm/components/screens/temp-block/index.css +13 -5
- package/esm/{countdown-section-a819b4f1.d.ts → countdown-section-608e4e3a.d.ts} +0 -0
- package/esm/countdown-section-608e4e3a.js +41 -0
- package/esm/desktop.js +2 -2
- package/esm/index.js +2 -2
- package/esm/mobile.css +2 -2
- package/esm/mobile.js +2 -2
- package/esm/responsive.js +2 -2
- package/index.js +2 -2
- package/mobile.css +2 -2
- package/mobile.js +2 -2
- package/modern/component.desktop.js +1 -1
- package/modern/component.mobile.js +2 -2
- package/modern/component.responsive.js +1 -1
- package/modern/components/base-confirmation/component.js +3 -3
- package/modern/components/base-confirmation/index.css +2 -8
- package/modern/components/base-confirmation/index.js +1 -1
- package/modern/components/countdown-loader/component.js +1 -1
- package/modern/components/countdown-loader/index.css +2 -2
- package/modern/components/header/component.js +1 -1
- package/modern/components/header/index.css +4 -4
- package/modern/components/index.js +1 -1
- package/modern/components/screens/fatal-error/component.js +1 -1
- package/modern/components/screens/fatal-error/index.css +10 -5
- package/modern/components/screens/hint/component.js +16 -17
- package/modern/components/screens/hint/index.css +15 -14
- package/modern/components/screens/index.js +1 -1
- package/modern/components/screens/initial/component.js +1 -1
- package/modern/components/screens/initial/countdown-section.js +1 -1
- package/modern/components/screens/initial/index.css +18 -18
- package/modern/components/screens/initial/index.js +1 -1
- package/modern/components/screens/temp-block/component.js +4 -4
- package/modern/components/screens/temp-block/index.css +13 -5
- package/modern/{countdown-section-5519e1b6.d.ts → countdown-section-cb87c8ea.d.ts} +0 -0
- package/modern/countdown-section-cb87c8ea.js +36 -0
- package/modern/desktop.js +1 -1
- package/modern/index.js +1 -1
- package/modern/mobile.css +2 -2
- package/modern/mobile.js +1 -1
- package/modern/responsive.js +1 -1
- package/package.json +1 -1
- package/responsive.js +2 -2
- package/countdown-section-fa5d99c6.js +0 -56
- package/esm/countdown-section-a819b4f1.js +0 -48
- package/modern/countdown-section-5519e1b6.js +0 -46
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var React = require('react');
|
|
4
|
-
var cn = require('classnames');
|
|
5
|
-
var utils = require('./utils.js');
|
|
6
|
-
var context = require('./context.js');
|
|
7
|
-
var coreComponentsButton = require('@alfalab/core-components-button');
|
|
8
|
-
var coreComponentsTypography = require('@alfalab/core-components-typography');
|
|
9
|
-
var coreComponentsLoader = require('@alfalab/core-components-loader');
|
|
10
|
-
|
|
11
|
-
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
12
|
-
|
|
13
|
-
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
14
|
-
var cn__default = /*#__PURE__*/_interopDefaultLegacy(cn);
|
|
15
|
-
|
|
16
|
-
var styles = {"component":"confirmation__component_19pqy","typographyTheme":"confirmation__typographyTheme_19pqy","phone":"confirmation__phone_19pqy","compact":"confirmation__compact_19pqy","loaderWrap":"confirmation__loaderWrap_19pqy","left":"confirmation__left_19pqy","center":"confirmation__center_19pqy","codeInput":"confirmation__codeInput_19pqy","smsComeLink":"confirmation__smsComeLink_19pqy","countdownContainer":"confirmation__countdownContainer_19pqy","countdownMobile":"confirmation__countdownMobile_19pqy","countdownLoaderMobile":"confirmation__countdownLoaderMobile_19pqy","getCodeButton":"confirmation__getCodeButton_19pqy","getCodeButtonMobile":"confirmation__getCodeButtonMobile_19pqy","containerInput":"confirmation__containerInput_19pqy"};
|
|
17
|
-
require('./components/screens/initial/index.css')
|
|
18
|
-
|
|
19
|
-
var CountdownSection = function (_a) {
|
|
20
|
-
var _b, _c, _d, _e, _f;
|
|
21
|
-
var codeSendHintVisible = _a.codeSendHintVisible, timePassed = _a.timePassed, processing = _a.processing, mobile = _a.mobile, handleSmsRetryClick = _a.handleSmsRetryClick;
|
|
22
|
-
var _g = React.useContext(context.ConfirmationContext), state = _g.state, texts = _g.texts, timeLeft = _g.timeLeft, blockSmsRetry = _g.blockSmsRetry;
|
|
23
|
-
if (codeSendHintVisible) {
|
|
24
|
-
return (React__default['default'].createElement(coreComponentsTypography.Typography.Text, { className: cn__default['default'](styles.countdownContainer, (_b = {},
|
|
25
|
-
_b[styles.countdownMobile] = mobile,
|
|
26
|
-
_b[styles.typographyTheme] = !mobile,
|
|
27
|
-
_b)), view: mobile ? 'primary-small' : 'primary-medium', tag: 'div' }, texts.codeSended));
|
|
28
|
-
}
|
|
29
|
-
if (processing) {
|
|
30
|
-
return (React__default['default'].createElement("div", { className: cn__default['default'](styles.loaderWrap, styles.countdownContainer, (_c = {},
|
|
31
|
-
_c[styles.countdownLoaderMobile] = mobile,
|
|
32
|
-
_c[styles.typographyTheme] = !mobile,
|
|
33
|
-
_c)) },
|
|
34
|
-
React__default['default'].createElement(coreComponentsLoader.Loader, null),
|
|
35
|
-
React__default['default'].createElement("span", { className: styles.loaderText }, state === 'CODE_CHECKING' ? texts.codeChecking : texts.codeSending)));
|
|
36
|
-
}
|
|
37
|
-
if (blockSmsRetry) {
|
|
38
|
-
return (React__default['default'].createElement(coreComponentsTypography.Typography.Text, { className: cn__default['default'](styles.countdownContainer, (_d = {},
|
|
39
|
-
_d[styles.countdownMobile] = mobile,
|
|
40
|
-
_d[styles.typographyTheme] = !mobile,
|
|
41
|
-
_d)), view: mobile ? 'primary-small' : 'primary-medium', tag: 'div' }, texts.noAttemptsLeft));
|
|
42
|
-
}
|
|
43
|
-
if (timePassed) {
|
|
44
|
-
return (React__default['default'].createElement(coreComponentsButton.Button, { size: mobile ? 'xs' : 'xxs', view: 'secondary', onClick: handleSmsRetryClick, className: cn__default['default'](styles.getCodeButton, (_e = {}, _e[styles.getCodeButtonMobile] = mobile, _e)) }, texts.buttonRetry));
|
|
45
|
-
}
|
|
46
|
-
return (React__default['default'].createElement(coreComponentsTypography.Typography.Text, { className: cn__default['default'](styles.countdown, styles.countdownContainer, (_f = {},
|
|
47
|
-
_f[styles.countdownMobile] = mobile,
|
|
48
|
-
_f[styles.typographyTheme] = !mobile,
|
|
49
|
-
_f)), view: mobile ? 'primary-small' : 'primary-medium', tag: 'div' },
|
|
50
|
-
texts.countdown,
|
|
51
|
-
" ",
|
|
52
|
-
utils.formatMsAsMinutes(timeLeft)));
|
|
53
|
-
};
|
|
54
|
-
|
|
55
|
-
exports.CountdownSection = CountdownSection;
|
|
56
|
-
exports.styles = styles;
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
import React, { useContext } from 'react';
|
|
2
|
-
import cn from 'classnames';
|
|
3
|
-
import { formatMsAsMinutes } from './utils.js';
|
|
4
|
-
import { ConfirmationContext } from './context.js';
|
|
5
|
-
import { Button } from '@alfalab/core-components-button/esm';
|
|
6
|
-
import { Typography } from '@alfalab/core-components-typography/esm';
|
|
7
|
-
import { Loader } from '@alfalab/core-components-loader/esm';
|
|
8
|
-
|
|
9
|
-
var styles = {"component":"confirmation__component_19pqy","typographyTheme":"confirmation__typographyTheme_19pqy","phone":"confirmation__phone_19pqy","compact":"confirmation__compact_19pqy","loaderWrap":"confirmation__loaderWrap_19pqy","left":"confirmation__left_19pqy","center":"confirmation__center_19pqy","codeInput":"confirmation__codeInput_19pqy","smsComeLink":"confirmation__smsComeLink_19pqy","countdownContainer":"confirmation__countdownContainer_19pqy","countdownMobile":"confirmation__countdownMobile_19pqy","countdownLoaderMobile":"confirmation__countdownLoaderMobile_19pqy","getCodeButton":"confirmation__getCodeButton_19pqy","getCodeButtonMobile":"confirmation__getCodeButtonMobile_19pqy","containerInput":"confirmation__containerInput_19pqy"};
|
|
10
|
-
require('./components/screens/initial/index.css')
|
|
11
|
-
|
|
12
|
-
var CountdownSection = function (_a) {
|
|
13
|
-
var _b, _c, _d, _e, _f;
|
|
14
|
-
var codeSendHintVisible = _a.codeSendHintVisible, timePassed = _a.timePassed, processing = _a.processing, mobile = _a.mobile, handleSmsRetryClick = _a.handleSmsRetryClick;
|
|
15
|
-
var _g = useContext(ConfirmationContext), state = _g.state, texts = _g.texts, timeLeft = _g.timeLeft, blockSmsRetry = _g.blockSmsRetry;
|
|
16
|
-
if (codeSendHintVisible) {
|
|
17
|
-
return (React.createElement(Typography.Text, { className: cn(styles.countdownContainer, (_b = {},
|
|
18
|
-
_b[styles.countdownMobile] = mobile,
|
|
19
|
-
_b[styles.typographyTheme] = !mobile,
|
|
20
|
-
_b)), view: mobile ? 'primary-small' : 'primary-medium', tag: 'div' }, texts.codeSended));
|
|
21
|
-
}
|
|
22
|
-
if (processing) {
|
|
23
|
-
return (React.createElement("div", { className: cn(styles.loaderWrap, styles.countdownContainer, (_c = {},
|
|
24
|
-
_c[styles.countdownLoaderMobile] = mobile,
|
|
25
|
-
_c[styles.typographyTheme] = !mobile,
|
|
26
|
-
_c)) },
|
|
27
|
-
React.createElement(Loader, null),
|
|
28
|
-
React.createElement("span", { className: styles.loaderText }, state === 'CODE_CHECKING' ? texts.codeChecking : texts.codeSending)));
|
|
29
|
-
}
|
|
30
|
-
if (blockSmsRetry) {
|
|
31
|
-
return (React.createElement(Typography.Text, { className: cn(styles.countdownContainer, (_d = {},
|
|
32
|
-
_d[styles.countdownMobile] = mobile,
|
|
33
|
-
_d[styles.typographyTheme] = !mobile,
|
|
34
|
-
_d)), view: mobile ? 'primary-small' : 'primary-medium', tag: 'div' }, texts.noAttemptsLeft));
|
|
35
|
-
}
|
|
36
|
-
if (timePassed) {
|
|
37
|
-
return (React.createElement(Button, { size: mobile ? 'xs' : 'xxs', view: 'secondary', onClick: handleSmsRetryClick, className: cn(styles.getCodeButton, (_e = {}, _e[styles.getCodeButtonMobile] = mobile, _e)) }, texts.buttonRetry));
|
|
38
|
-
}
|
|
39
|
-
return (React.createElement(Typography.Text, { className: cn(styles.countdown, styles.countdownContainer, (_f = {},
|
|
40
|
-
_f[styles.countdownMobile] = mobile,
|
|
41
|
-
_f[styles.typographyTheme] = !mobile,
|
|
42
|
-
_f)), view: mobile ? 'primary-small' : 'primary-medium', tag: 'div' },
|
|
43
|
-
texts.countdown,
|
|
44
|
-
" ",
|
|
45
|
-
formatMsAsMinutes(timeLeft)));
|
|
46
|
-
};
|
|
47
|
-
|
|
48
|
-
export { CountdownSection as C, styles as s };
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import React, { useContext } from 'react';
|
|
2
|
-
import cn from 'classnames';
|
|
3
|
-
import { formatMsAsMinutes } from './utils.js';
|
|
4
|
-
import { ConfirmationContext } from './context.js';
|
|
5
|
-
import { Button } from '@alfalab/core-components-button/modern';
|
|
6
|
-
import { Typography } from '@alfalab/core-components-typography/modern';
|
|
7
|
-
import { Loader } from '@alfalab/core-components-loader/modern';
|
|
8
|
-
|
|
9
|
-
var styles = {"component":"confirmation__component_19pqy","typographyTheme":"confirmation__typographyTheme_19pqy","phone":"confirmation__phone_19pqy","compact":"confirmation__compact_19pqy","loaderWrap":"confirmation__loaderWrap_19pqy","left":"confirmation__left_19pqy","center":"confirmation__center_19pqy","codeInput":"confirmation__codeInput_19pqy","smsComeLink":"confirmation__smsComeLink_19pqy","countdownContainer":"confirmation__countdownContainer_19pqy","countdownMobile":"confirmation__countdownMobile_19pqy","countdownLoaderMobile":"confirmation__countdownLoaderMobile_19pqy","getCodeButton":"confirmation__getCodeButton_19pqy","getCodeButtonMobile":"confirmation__getCodeButtonMobile_19pqy","containerInput":"confirmation__containerInput_19pqy"};
|
|
10
|
-
require('./components/screens/initial/index.css')
|
|
11
|
-
|
|
12
|
-
const CountdownSection = ({ codeSendHintVisible, timePassed, processing, mobile, handleSmsRetryClick, }) => {
|
|
13
|
-
const { state, texts, timeLeft, blockSmsRetry } = useContext(ConfirmationContext);
|
|
14
|
-
if (codeSendHintVisible) {
|
|
15
|
-
return (React.createElement(Typography.Text, { className: cn(styles.countdownContainer, {
|
|
16
|
-
[styles.countdownMobile]: mobile,
|
|
17
|
-
[styles.typographyTheme]: !mobile,
|
|
18
|
-
}), view: mobile ? 'primary-small' : 'primary-medium', tag: 'div' }, texts.codeSended));
|
|
19
|
-
}
|
|
20
|
-
if (processing) {
|
|
21
|
-
return (React.createElement("div", { className: cn(styles.loaderWrap, styles.countdownContainer, {
|
|
22
|
-
[styles.countdownLoaderMobile]: mobile,
|
|
23
|
-
[styles.typographyTheme]: !mobile,
|
|
24
|
-
}) },
|
|
25
|
-
React.createElement(Loader, null),
|
|
26
|
-
React.createElement("span", { className: styles.loaderText }, state === 'CODE_CHECKING' ? texts.codeChecking : texts.codeSending)));
|
|
27
|
-
}
|
|
28
|
-
if (blockSmsRetry) {
|
|
29
|
-
return (React.createElement(Typography.Text, { className: cn(styles.countdownContainer, {
|
|
30
|
-
[styles.countdownMobile]: mobile,
|
|
31
|
-
[styles.typographyTheme]: !mobile,
|
|
32
|
-
}), view: mobile ? 'primary-small' : 'primary-medium', tag: 'div' }, texts.noAttemptsLeft));
|
|
33
|
-
}
|
|
34
|
-
if (timePassed) {
|
|
35
|
-
return (React.createElement(Button, { size: mobile ? 'xs' : 'xxs', view: 'secondary', onClick: handleSmsRetryClick, className: cn(styles.getCodeButton, { [styles.getCodeButtonMobile]: mobile }) }, texts.buttonRetry));
|
|
36
|
-
}
|
|
37
|
-
return (React.createElement(Typography.Text, { className: cn(styles.countdown, styles.countdownContainer, {
|
|
38
|
-
[styles.countdownMobile]: mobile,
|
|
39
|
-
[styles.typographyTheme]: !mobile,
|
|
40
|
-
}), view: mobile ? 'primary-small' : 'primary-medium', tag: 'div' },
|
|
41
|
-
texts.countdown,
|
|
42
|
-
" ",
|
|
43
|
-
formatMsAsMinutes(timeLeft)));
|
|
44
|
-
};
|
|
45
|
-
|
|
46
|
-
export { CountdownSection as C, styles as s };
|