@alfalab/core-components-confirmation 12.1.3 → 12.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/component-40c9adb0.d.ts +35 -0
- package/{component.js → component-40c9adb0.js} +11 -18
- package/component.desktop.d.ts +5 -0
- package/component.desktop.js +31 -0
- package/component.mobile.d.ts +5 -0
- package/component.mobile.js +38 -0
- package/component.responsive.d.ts +6 -0
- package/component.responsive.js +39 -0
- package/components/base-confirmation/component.d.ts +0 -0
- package/components/base-confirmation/component.js +27 -0
- package/components/base-confirmation/index.css +24 -0
- package/components/base-confirmation/index.d.ts +1 -0
- package/components/base-confirmation/index.js +27 -0
- package/components/countdown-loader/component.js +1 -1
- package/components/countdown-loader/index.css +2 -11
- package/components/header/component.d.ts +13 -0
- package/components/header/component.js +23 -0
- package/components/header/index.css +51 -0
- package/components/header/index.d.ts +1 -0
- package/components/header/index.js +12 -0
- package/components/index.js +4 -2
- package/components/screens/fatal-error/component.d.ts +9 -3
- package/components/screens/fatal-error/component.js +13 -7
- package/components/screens/fatal-error/index.css +17 -29
- package/components/screens/fatal-error/index.js +3 -0
- package/components/screens/hint/component.d.ts +9 -3
- package/components/screens/hint/component.js +17 -17
- package/components/screens/hint/index.css +25 -48
- package/components/screens/hint/index.js +2 -0
- package/components/screens/index.js +4 -2
- package/components/screens/initial/component.d.ts +9 -3
- package/components/screens/initial/component.js +14 -11
- package/components/screens/initial/countdown-section.js +3 -2
- package/components/screens/initial/index.css +48 -45
- package/components/screens/initial/index.js +4 -2
- package/components/screens/temp-block/component.d.ts +9 -3
- package/components/screens/temp-block/component.js +13 -7
- package/components/screens/temp-block/index.css +12 -30
- package/components/screens/temp-block/index.js +3 -0
- package/{esm/countdown-section-3aba82dd.d.ts → countdown-section-d04caa75.d.ts} +1 -0
- package/countdown-section-d04caa75.js +56 -0
- package/cssm/component-5c5b24ae.d.ts +35 -0
- package/cssm/{component.js → component-5c5b24ae.js} +10 -22
- package/cssm/component.desktop.d.ts +5 -0
- package/cssm/component.desktop.js +38 -0
- package/cssm/component.mobile.d.ts +5 -0
- package/cssm/component.mobile.js +44 -0
- package/cssm/component.responsive.d.ts +6 -0
- package/cssm/component.responsive.js +47 -0
- package/cssm/components/base-confirmation/component.d.ts +0 -0
- package/cssm/components/base-confirmation/component.js +34 -0
- package/cssm/components/base-confirmation/index.d.ts +1 -0
- package/cssm/components/base-confirmation/index.js +34 -0
- package/cssm/components/base-confirmation/index.module.css +23 -0
- package/cssm/components/countdown-loader/index.module.css +0 -9
- package/cssm/components/header/component.d.ts +13 -0
- package/cssm/components/header/component.js +22 -0
- package/cssm/components/header/index.d.ts +1 -0
- package/cssm/components/header/index.js +13 -0
- package/cssm/components/header/index.module.css +50 -0
- package/cssm/components/index.js +5 -2
- package/cssm/components/screens/fatal-error/component.d.ts +9 -3
- package/cssm/components/screens/fatal-error/component.js +13 -6
- package/cssm/components/screens/fatal-error/index.js +4 -0
- package/cssm/components/screens/fatal-error/index.module.css +16 -28
- package/cssm/components/screens/hint/component.d.ts +9 -3
- package/cssm/components/screens/hint/component.js +17 -16
- package/cssm/components/screens/hint/index.js +3 -0
- package/cssm/components/screens/hint/index.module.css +17 -40
- package/cssm/components/screens/index.js +5 -2
- package/cssm/components/screens/initial/component.d.ts +9 -3
- package/cssm/components/screens/initial/component.js +15 -11
- package/cssm/components/screens/initial/countdown-section.d.ts +1 -0
- package/cssm/components/screens/initial/countdown-section.js +25 -10
- package/cssm/components/screens/initial/index.js +5 -2
- package/cssm/components/screens/initial/index.module.css +37 -34
- package/cssm/components/screens/temp-block/component.d.ts +9 -3
- package/cssm/components/screens/temp-block/component.js +13 -6
- package/cssm/components/screens/temp-block/index.js +4 -0
- package/cssm/components/screens/temp-block/index.module.css +9 -27
- package/cssm/desktop.d.ts +1 -0
- package/cssm/desktop.js +35 -0
- package/cssm/index.d.ts +2 -1
- package/cssm/index.js +13 -5
- package/cssm/mobile.d.ts +1 -0
- package/cssm/mobile.js +36 -0
- package/cssm/mobile.module.css +3 -0
- package/cssm/responsive.d.ts +1 -0
- package/cssm/responsive.js +38 -0
- package/cssm/types.d.ts +4 -0
- package/cssm/vars.css +4 -4
- package/desktop.d.ts +1 -0
- package/desktop.js +28 -0
- package/esm/component-1f28492d.d.ts +35 -0
- package/esm/{component.js → component-1f28492d.js} +6 -12
- package/esm/component.desktop.d.ts +5 -0
- package/esm/component.desktop.js +23 -0
- package/esm/component.mobile.d.ts +5 -0
- package/esm/component.mobile.js +29 -0
- package/esm/component.responsive.d.ts +6 -0
- package/esm/component.responsive.js +31 -0
- package/esm/components/base-confirmation/component.d.ts +0 -0
- package/esm/components/base-confirmation/component.js +19 -0
- package/esm/components/base-confirmation/index.css +24 -0
- package/esm/components/base-confirmation/index.d.ts +1 -0
- package/esm/components/base-confirmation/index.js +19 -0
- package/esm/components/countdown-loader/component.js +1 -1
- package/esm/components/countdown-loader/index.css +2 -11
- package/esm/components/header/component.d.ts +13 -0
- package/esm/components/header/component.js +14 -0
- package/esm/components/header/index.css +51 -0
- package/esm/components/header/index.d.ts +1 -0
- package/esm/components/header/index.js +4 -0
- package/esm/components/index.js +4 -2
- package/esm/components/screens/fatal-error/component.d.ts +9 -3
- package/esm/components/screens/fatal-error/component.js +13 -8
- package/esm/components/screens/fatal-error/index.css +17 -29
- package/esm/components/screens/fatal-error/index.js +3 -0
- package/esm/components/screens/hint/component.d.ts +9 -3
- package/esm/components/screens/hint/component.js +17 -17
- package/esm/components/screens/hint/index.css +25 -48
- package/esm/components/screens/hint/index.js +2 -0
- package/esm/components/screens/index.js +4 -2
- package/esm/components/screens/initial/component.d.ts +9 -3
- package/esm/components/screens/initial/component.js +14 -11
- package/esm/components/screens/initial/countdown-section.js +3 -2
- package/esm/components/screens/initial/index.css +48 -45
- package/esm/components/screens/initial/index.js +4 -2
- package/esm/components/screens/temp-block/component.d.ts +9 -3
- package/esm/components/screens/temp-block/component.js +12 -7
- package/esm/components/screens/temp-block/index.css +12 -30
- package/esm/components/screens/temp-block/index.js +3 -0
- package/{modern/countdown-section-7a5f6574.d.ts → esm/countdown-section-b47c61ca.d.ts} +1 -0
- package/esm/countdown-section-b47c61ca.js +48 -0
- package/esm/desktop.d.ts +1 -0
- package/esm/desktop.js +20 -0
- package/esm/index.d.ts +2 -1
- package/esm/index.js +8 -3
- package/esm/mobile.css +4 -0
- package/esm/mobile.d.ts +1 -0
- package/esm/mobile.js +20 -0
- package/esm/responsive.d.ts +1 -0
- package/esm/responsive.js +22 -0
- package/esm/types.d.ts +4 -0
- package/index.d.ts +2 -1
- package/index.js +10 -4
- package/mobile.css +4 -0
- package/mobile.d.ts +1 -0
- package/mobile.js +28 -0
- package/modern/component.desktop.d.ts +5 -0
- package/modern/component.desktop.js +23 -0
- package/modern/component.mobile.d.ts +5 -0
- package/modern/component.mobile.js +26 -0
- package/modern/component.responsive.d.ts +6 -0
- package/modern/component.responsive.js +31 -0
- package/modern/components/base-confirmation/component.d.ts +4 -0
- package/modern/{component.js → components/base-confirmation/component.js} +16 -14
- package/modern/components/base-confirmation/index.css +24 -0
- package/modern/components/base-confirmation/index.d.ts +1 -0
- package/modern/components/base-confirmation/index.js +19 -0
- package/modern/components/countdown-loader/component.js +1 -1
- package/modern/components/countdown-loader/index.css +2 -11
- package/modern/components/header/component.d.ts +13 -0
- package/modern/components/header/component.js +10 -0
- package/modern/components/header/index.css +51 -0
- package/modern/components/header/index.d.ts +1 -0
- package/modern/components/header/index.js +4 -0
- package/modern/components/index.js +4 -2
- package/modern/components/screens/fatal-error/component.d.ts +9 -3
- package/modern/components/screens/fatal-error/component.js +11 -8
- package/modern/components/screens/fatal-error/index.css +17 -29
- package/modern/components/screens/fatal-error/index.js +3 -0
- package/modern/components/screens/hint/component.d.ts +9 -3
- package/modern/components/screens/hint/component.js +14 -16
- package/modern/components/screens/hint/index.css +25 -48
- package/modern/components/screens/hint/index.js +2 -0
- package/modern/components/screens/index.js +4 -2
- package/modern/components/screens/initial/component.d.ts +9 -3
- package/modern/components/screens/initial/component.js +10 -9
- package/modern/components/screens/initial/countdown-section.js +3 -2
- package/modern/components/screens/initial/index.css +48 -45
- package/modern/components/screens/initial/index.js +4 -2
- package/modern/components/screens/temp-block/component.d.ts +9 -3
- package/modern/components/screens/temp-block/component.js +8 -5
- package/modern/components/screens/temp-block/index.css +12 -30
- package/modern/components/screens/temp-block/index.js +3 -0
- package/{countdown-section-44184a06.d.ts → modern/countdown-section-2212ec31.d.ts} +1 -0
- package/modern/countdown-section-2212ec31.js +46 -0
- package/modern/desktop.d.ts +1 -0
- package/modern/desktop.js +20 -0
- package/modern/index.d.ts +2 -1
- package/modern/index.js +8 -3
- package/modern/mobile.css +4 -0
- package/modern/mobile.d.ts +1 -0
- package/modern/mobile.js +20 -0
- package/modern/responsive.d.ts +1 -0
- package/modern/responsive.js +22 -0
- package/modern/types.d.ts +4 -0
- package/package.json +4 -3
- package/responsive.d.ts +1 -0
- package/responsive.js +30 -0
- package/types.d.ts +4 -0
- package/component.d.ts +0 -4
- package/countdown-section-44184a06.js +0 -41
- package/cssm/component.d.ts +0 -4
- package/cssm/index.module.css +0 -46
- package/esm/component.d.ts +0 -4
- package/esm/countdown-section-3aba82dd.js +0 -33
- package/esm/index.css +0 -47
- package/index.css +0 -47
- package/modern/component.d.ts +0 -4
- package/modern/countdown-section-7a5f6574.js +0 -32
- package/modern/index.css +0 -47
|
@@ -0,0 +1,56 @@
|
|
|
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 coreComponentsTypography = require('@alfalab/core-components-typography');
|
|
8
|
+
var coreComponentsButton = require('@alfalab/core-components-button');
|
|
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_1bham","typographyTheme":"confirmation__typographyTheme_1bham","phone":"confirmation__phone_1bham","compact":"confirmation__compact_1bham","loaderWrap":"confirmation__loaderWrap_1bham","left":"confirmation__left_1bham","center":"confirmation__center_1bham","codeInput":"confirmation__codeInput_1bham","smsComeLink":"confirmation__smsComeLink_1bham","countdownContainer":"confirmation__countdownContainer_1bham","countdownMobile":"confirmation__countdownMobile_1bham","countdownLoaderMobile":"confirmation__countdownLoaderMobile_1bham","getCodeButton":"confirmation__getCodeButton_1bham","getCodeButtonMobile":"confirmation__getCodeButtonMobile_1bham","containerInput":"confirmation__containerInput_1bham"};
|
|
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;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
import { ConfirmationProps } from "./types";
|
|
3
|
+
declare function __extends(d: any, b: any): void;
|
|
4
|
+
declare function __rest(s: any, e: any): {};
|
|
5
|
+
declare function __decorate(decorators: any, target: any, key: any, desc: any, ...args: any[]): any;
|
|
6
|
+
declare function __param(paramIndex: any, decorator: any): (target: any, key: any) => void;
|
|
7
|
+
declare function __metadata(metadataKey: any, metadataValue: any): any;
|
|
8
|
+
declare function __awaiter(thisArg: any, _arguments: any, P: any, generator: any): any;
|
|
9
|
+
declare function __generator(thisArg: any, body: any): {
|
|
10
|
+
next: (v: any) => any;
|
|
11
|
+
throw: (v: any) => any;
|
|
12
|
+
return: (v: any) => any;
|
|
13
|
+
};
|
|
14
|
+
declare function __exportStar(m: any, o: any): void;
|
|
15
|
+
declare function __values(o: any): any;
|
|
16
|
+
declare function __read(o: any, n: any): any;
|
|
17
|
+
declare function __spread(...args: any[]): any[];
|
|
18
|
+
declare function __spreadArrays(...args: any[]): any[];
|
|
19
|
+
declare function __await(v: any): any;
|
|
20
|
+
declare class __await {
|
|
21
|
+
constructor(v: any);
|
|
22
|
+
v: any;
|
|
23
|
+
}
|
|
24
|
+
declare function __asyncGenerator(thisArg: any, _arguments: any, generator: any): {};
|
|
25
|
+
declare function __asyncDelegator(o: any): {};
|
|
26
|
+
declare function __asyncValues(o: any): any;
|
|
27
|
+
declare function __makeTemplateObject(cooked: any, raw: any): any;
|
|
28
|
+
declare function __importStar(mod: any): any;
|
|
29
|
+
declare function __importDefault(mod: any): any;
|
|
30
|
+
declare function __classPrivateFieldGet(receiver: any, privateMap: any): any;
|
|
31
|
+
declare function __classPrivateFieldSet(receiver: any, privateMap: any, value: any): any;
|
|
32
|
+
declare function __assign(...args: any[]): any;
|
|
33
|
+
declare function __createBinding(o: any, m: any, k: any, k2: any): void;
|
|
34
|
+
declare const BaseConfirmation: FC<ConfirmationProps>;
|
|
35
|
+
export { __extends, __rest, __decorate, __param, __metadata, __awaiter, __generator, __exportStar, __values, __read, __spread, __spreadArrays, __await, __asyncGenerator, __asyncDelegator, __asyncValues, __makeTemplateObject, __importStar, __importDefault, __classPrivateFieldGet, __classPrivateFieldSet, __assign, __createBinding, BaseConfirmation };
|
|
@@ -1,29 +1,16 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
3
|
var React = require('react');
|
|
6
4
|
var cn = require('classnames');
|
|
7
5
|
var hooks = require('@alfalab/hooks');
|
|
8
6
|
var utils = require('./utils.js');
|
|
9
7
|
var context = require('./context.js');
|
|
10
8
|
var types = require('./types.js');
|
|
11
|
-
require('@alfalab/core-components-code-input/cssm');
|
|
12
|
-
require('@alfalab/core-components-link/cssm');
|
|
13
|
-
require('./components/screens/initial/index.module.css');
|
|
14
|
-
require('@alfalab/core-components-loader/cssm');
|
|
15
|
-
require('@alfalab/core-components-button/cssm');
|
|
16
|
-
require('./components/screens/initial/countdown-section.js');
|
|
17
9
|
var components_screens_initial_component = require('./components/screens/initial/component.js');
|
|
18
|
-
require('./components/screens/hint/index.module.css');
|
|
19
10
|
var components_screens_hint_component = require('./components/screens/hint/component.js');
|
|
20
|
-
require('./components/screens/fatal-error/index.module.css');
|
|
21
11
|
var components_screens_fatalError_component = require('./components/screens/fatal-error/component.js');
|
|
22
|
-
require('./components/countdown-loader/index.module.css');
|
|
23
|
-
require('./components/countdown-loader/component.js');
|
|
24
|
-
require('./components/screens/temp-block/index.module.css');
|
|
25
12
|
var components_screens_tempBlock_component = require('./components/screens/temp-block/component.js');
|
|
26
|
-
var styles = require('./index.module.css');
|
|
13
|
+
var styles = require('./components/base-confirmation/index.module.css');
|
|
27
14
|
|
|
28
15
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
29
16
|
|
|
@@ -45,8 +32,8 @@ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
|
45
32
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
46
33
|
PERFORMANCE OF THIS SOFTWARE.
|
|
47
34
|
***************************************************************************** */
|
|
48
|
-
|
|
49
|
-
__assign = Object.assign || function __assign(t) {
|
|
35
|
+
exports.__assign = function () {
|
|
36
|
+
exports.__assign = Object.assign || function __assign(t) {
|
|
50
37
|
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
51
38
|
s = arguments[i];
|
|
52
39
|
for (var p in s)
|
|
@@ -55,7 +42,7 @@ var __assign = function () {
|
|
|
55
42
|
}
|
|
56
43
|
return t;
|
|
57
44
|
};
|
|
58
|
-
return __assign.apply(this, arguments);
|
|
45
|
+
return exports.__assign.apply(this, arguments);
|
|
59
46
|
};
|
|
60
47
|
function __rest(s, e) {
|
|
61
48
|
var t = {};
|
|
@@ -76,8 +63,8 @@ var confirmationScreens = {
|
|
|
76
63
|
FATAL_ERROR: components_screens_fatalError_component.FatalError,
|
|
77
64
|
TEMP_BLOCK: components_screens_tempBlock_component.TempBlock,
|
|
78
65
|
};
|
|
79
|
-
var
|
|
80
|
-
var state = _a.state, screen = _a.screen, _b = _a.alignContent, alignContent = _b === void 0 ? 'left' : _b, children = _a.children, _c = _a.requiredCharAmount, requiredCharAmount = _c === void 0 ? 5 : _c, _d = _a.countdownDuration, countdownDuration = _d === void 0 ? utils.ONE_MINUTE : _d, _e = _a.tempBlockDuration, tempBlockDuration = _e === void 0 ? utils.ONE_DAY : _e, 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, restProps = __rest(_a, ["state", "screen", "alignContent", "children", "requiredCharAmount", "countdownDuration", "tempBlockDuration", "phone", "blockSmsRetry", "dataTestId", "className", "getScreensMap", "onInputFinished", "onChangeState", "onSmsRetryClick", "onChangeScreen", "onFatalErrorOkButtonClick", "onTempBlockFinished"]);
|
|
66
|
+
var BaseConfirmation = function (_a) {
|
|
67
|
+
var state = _a.state, screen = _a.screen, _b = _a.alignContent, alignContent = _b === void 0 ? 'left' : _b, children = _a.children, _c = _a.requiredCharAmount, requiredCharAmount = _c === void 0 ? 5 : _c, _d = _a.countdownDuration, countdownDuration = _d === void 0 ? utils.ONE_MINUTE : _d, _e = _a.tempBlockDuration, tempBlockDuration = _e === void 0 ? utils.ONE_DAY : _e, 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, restProps = __rest(_a, ["state", "screen", "alignContent", "children", "requiredCharAmount", "countdownDuration", "tempBlockDuration", "phone", "blockSmsRetry", "dataTestId", "className", "getScreensMap", "onInputFinished", "onChangeState", "onSmsRetryClick", "onChangeScreen", "onFatalErrorOkButtonClick", "onTempBlockFinished", "mobile"]);
|
|
81
68
|
var _f = utils.useCountdown(countdownDuration), timeLeft = _f[0], startTimer = _f[1], stopTimer = _f[2];
|
|
82
69
|
var prevState = hooks.usePrevious(state);
|
|
83
70
|
React.useEffect(function () {
|
|
@@ -114,7 +101,7 @@ var Confirmation = function (_a) {
|
|
|
114
101
|
};
|
|
115
102
|
var contextValue = {
|
|
116
103
|
alignContent: alignContent,
|
|
117
|
-
texts: __assign(__assign({}, types.defaultTexts), restProps.texts),
|
|
104
|
+
texts: exports.__assign(exports.__assign({}, types.defaultTexts), restProps.texts),
|
|
118
105
|
state: state,
|
|
119
106
|
screen: screen,
|
|
120
107
|
requiredCharAmount: requiredCharAmount,
|
|
@@ -133,7 +120,8 @@ var Confirmation = function (_a) {
|
|
|
133
120
|
var screensMap = getScreensMap ? getScreensMap(confirmationScreens) : confirmationScreens;
|
|
134
121
|
var CurrentScreen = screensMap[screen];
|
|
135
122
|
return (React__default['default'].createElement(context.ConfirmationContext.Provider, { value: contextValue },
|
|
136
|
-
React__default['default'].createElement("div", { className: cn__default['default'](styles__default['default'].component, styles__default['default'][alignContent], className), "data-test-id": dataTestId }, CurrentScreen && React__default['default'].createElement(CurrentScreen,
|
|
123
|
+
React__default['default'].createElement("div", { className: cn__default['default'](styles__default['default'].component, styles__default['default'][alignContent], className), "data-test-id": dataTestId }, CurrentScreen && React__default['default'].createElement(CurrentScreen, { mobile: mobile }))));
|
|
137
124
|
};
|
|
138
125
|
|
|
139
|
-
exports.
|
|
126
|
+
exports.BaseConfirmation = BaseConfirmation;
|
|
127
|
+
exports.__rest = __rest;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var components_baseConfirmation_component = require('./component-5c5b24ae.js');
|
|
6
|
+
var React = require('react');
|
|
7
|
+
require('classnames');
|
|
8
|
+
require('@alfalab/hooks');
|
|
9
|
+
require('./utils.js');
|
|
10
|
+
require('./context.js');
|
|
11
|
+
require('./types.js');
|
|
12
|
+
require('@alfalab/core-components-code-input/cssm');
|
|
13
|
+
require('@alfalab/core-components-link/cssm');
|
|
14
|
+
require('@alfalab/core-components-typography/cssm');
|
|
15
|
+
require('@alfalab/core-components-button/cssm');
|
|
16
|
+
require('./components/header/index.module.css');
|
|
17
|
+
require('./components/header/component.js');
|
|
18
|
+
require('@alfalab/core-components-loader/cssm');
|
|
19
|
+
require('./components/screens/initial/index.module.css');
|
|
20
|
+
require('./components/screens/initial/countdown-section.js');
|
|
21
|
+
require('./components/screens/initial/component.js');
|
|
22
|
+
require('./components/screens/hint/index.module.css');
|
|
23
|
+
require('./components/screens/hint/component.js');
|
|
24
|
+
require('./components/screens/fatal-error/index.module.css');
|
|
25
|
+
require('./components/screens/fatal-error/component.js');
|
|
26
|
+
require('./components/countdown-loader/index.module.css');
|
|
27
|
+
require('./components/countdown-loader/component.js');
|
|
28
|
+
require('./components/screens/temp-block/index.module.css');
|
|
29
|
+
require('./components/screens/temp-block/component.js');
|
|
30
|
+
require('./components/base-confirmation/index.module.css');
|
|
31
|
+
|
|
32
|
+
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
33
|
+
|
|
34
|
+
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
35
|
+
|
|
36
|
+
var ConfirmationDesktop = function (props) { return (React__default['default'].createElement(components_baseConfirmation_component.BaseConfirmation, components_baseConfirmation_component.__assign({}, props))); };
|
|
37
|
+
|
|
38
|
+
exports.ConfirmationDesktop = ConfirmationDesktop;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var components_baseConfirmation_component = require('./component-5c5b24ae.js');
|
|
6
|
+
var React = require('react');
|
|
7
|
+
var cn = require('classnames');
|
|
8
|
+
require('@alfalab/hooks');
|
|
9
|
+
require('./utils.js');
|
|
10
|
+
require('./context.js');
|
|
11
|
+
require('./types.js');
|
|
12
|
+
require('@alfalab/core-components-code-input/cssm');
|
|
13
|
+
require('@alfalab/core-components-link/cssm');
|
|
14
|
+
require('@alfalab/core-components-typography/cssm');
|
|
15
|
+
require('@alfalab/core-components-button/cssm');
|
|
16
|
+
require('./components/header/index.module.css');
|
|
17
|
+
require('./components/header/component.js');
|
|
18
|
+
require('@alfalab/core-components-loader/cssm');
|
|
19
|
+
require('./components/screens/initial/index.module.css');
|
|
20
|
+
require('./components/screens/initial/countdown-section.js');
|
|
21
|
+
require('./components/screens/initial/component.js');
|
|
22
|
+
require('./components/screens/hint/index.module.css');
|
|
23
|
+
require('./components/screens/hint/component.js');
|
|
24
|
+
require('./components/screens/fatal-error/index.module.css');
|
|
25
|
+
require('./components/screens/fatal-error/component.js');
|
|
26
|
+
require('./components/countdown-loader/index.module.css');
|
|
27
|
+
require('./components/countdown-loader/component.js');
|
|
28
|
+
require('./components/screens/temp-block/index.module.css');
|
|
29
|
+
require('./components/screens/temp-block/component.js');
|
|
30
|
+
require('./components/base-confirmation/index.module.css');
|
|
31
|
+
var styles = require('./mobile.module.css');
|
|
32
|
+
|
|
33
|
+
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
34
|
+
|
|
35
|
+
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
36
|
+
var cn__default = /*#__PURE__*/_interopDefaultLegacy(cn);
|
|
37
|
+
var styles__default = /*#__PURE__*/_interopDefaultLegacy(styles);
|
|
38
|
+
|
|
39
|
+
var ConfirmationMobile = function (_a) {
|
|
40
|
+
var className = _a.className, resProps = components_baseConfirmation_component.__rest(_a, ["className"]);
|
|
41
|
+
return (React__default['default'].createElement(components_baseConfirmation_component.BaseConfirmation, components_baseConfirmation_component.__assign({ mobile: true, className: cn__default['default'](className, styles__default['default'].container) }, resProps)));
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
exports.ConfirmationMobile = ConfirmationMobile;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
import { ConfirmationProps } from "./types";
|
|
3
|
+
type ResponsiveConfirmationProps = Omit<ConfirmationProps, 'confirmationScreens'>;
|
|
4
|
+
type ConfirmationMedia = 'desktop' | 'mobile';
|
|
5
|
+
declare const ConfirmationResponsive: FC<ResponsiveConfirmationProps>;
|
|
6
|
+
export { ResponsiveConfirmationProps, ConfirmationMedia, ConfirmationResponsive };
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var components_baseConfirmation_component = require('./component-5c5b24ae.js');
|
|
6
|
+
var React = require('react');
|
|
7
|
+
require('classnames');
|
|
8
|
+
var hooks = require('@alfalab/hooks');
|
|
9
|
+
require('./utils.js');
|
|
10
|
+
require('./context.js');
|
|
11
|
+
require('./types.js');
|
|
12
|
+
require('@alfalab/core-components-code-input/cssm');
|
|
13
|
+
require('@alfalab/core-components-link/cssm');
|
|
14
|
+
require('@alfalab/core-components-typography/cssm');
|
|
15
|
+
require('@alfalab/core-components-button/cssm');
|
|
16
|
+
require('./components/header/index.module.css');
|
|
17
|
+
require('./components/header/component.js');
|
|
18
|
+
require('@alfalab/core-components-loader/cssm');
|
|
19
|
+
require('./components/screens/initial/index.module.css');
|
|
20
|
+
require('./components/screens/initial/countdown-section.js');
|
|
21
|
+
require('./components/screens/initial/component.js');
|
|
22
|
+
require('./components/screens/hint/index.module.css');
|
|
23
|
+
require('./components/screens/hint/component.js');
|
|
24
|
+
require('./components/screens/fatal-error/index.module.css');
|
|
25
|
+
require('./components/screens/fatal-error/component.js');
|
|
26
|
+
require('./components/countdown-loader/index.module.css');
|
|
27
|
+
require('./components/countdown-loader/component.js');
|
|
28
|
+
require('./components/screens/temp-block/index.module.css');
|
|
29
|
+
require('./components/screens/temp-block/component.js');
|
|
30
|
+
require('./components/base-confirmation/index.module.css');
|
|
31
|
+
var component_desktop = require('./component.desktop.js');
|
|
32
|
+
require('./mobile.module.css');
|
|
33
|
+
var component_mobile = require('./component.mobile.js');
|
|
34
|
+
|
|
35
|
+
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
36
|
+
|
|
37
|
+
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
38
|
+
|
|
39
|
+
var ConfirmationResponsive = function (props) {
|
|
40
|
+
var view = hooks.useMedia([
|
|
41
|
+
['mobile', '(max-width: 1023px)'],
|
|
42
|
+
['desktop', '(min-width: 1024px)'],
|
|
43
|
+
], 'desktop')[0];
|
|
44
|
+
return view === 'desktop' ? (React__default['default'].createElement(component_desktop.ConfirmationDesktop, components_baseConfirmation_component.__assign({}, props))) : (React__default['default'].createElement(component_mobile.ConfirmationMobile, components_baseConfirmation_component.__assign({}, props)));
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
exports.ConfirmationResponsive = ConfirmationResponsive;
|
|
File without changes
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var components_baseConfirmation_component = require('../../component-5c5b24ae.js');
|
|
6
|
+
require('react');
|
|
7
|
+
require('classnames');
|
|
8
|
+
require('@alfalab/hooks');
|
|
9
|
+
require('../../utils.js');
|
|
10
|
+
require('../../context.js');
|
|
11
|
+
require('../../types.js');
|
|
12
|
+
require('@alfalab/core-components-code-input/cssm');
|
|
13
|
+
require('@alfalab/core-components-link/cssm');
|
|
14
|
+
require('@alfalab/core-components-typography/cssm');
|
|
15
|
+
require('@alfalab/core-components-button/cssm');
|
|
16
|
+
require('../header/index.module.css');
|
|
17
|
+
require('../header/component.js');
|
|
18
|
+
require('@alfalab/core-components-loader/cssm');
|
|
19
|
+
require('../screens/initial/index.module.css');
|
|
20
|
+
require('../screens/initial/countdown-section.js');
|
|
21
|
+
require('../screens/initial/component.js');
|
|
22
|
+
require('../screens/hint/index.module.css');
|
|
23
|
+
require('../screens/hint/component.js');
|
|
24
|
+
require('../screens/fatal-error/index.module.css');
|
|
25
|
+
require('../screens/fatal-error/component.js');
|
|
26
|
+
require('../countdown-loader/index.module.css');
|
|
27
|
+
require('../countdown-loader/component.js');
|
|
28
|
+
require('../screens/temp-block/index.module.css');
|
|
29
|
+
require('../screens/temp-block/component.js');
|
|
30
|
+
require('./index.module.css');
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
exports.BaseConfirmation = components_baseConfirmation_component.BaseConfirmation;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "../../component-5c5b24ae";
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var components_baseConfirmation_component = require('../../component-5c5b24ae.js');
|
|
6
|
+
require('react');
|
|
7
|
+
require('classnames');
|
|
8
|
+
require('@alfalab/hooks');
|
|
9
|
+
require('../../utils.js');
|
|
10
|
+
require('../../context.js');
|
|
11
|
+
require('../../types.js');
|
|
12
|
+
require('@alfalab/core-components-code-input/cssm');
|
|
13
|
+
require('@alfalab/core-components-link/cssm');
|
|
14
|
+
require('@alfalab/core-components-typography/cssm');
|
|
15
|
+
require('@alfalab/core-components-button/cssm');
|
|
16
|
+
require('../header/index.module.css');
|
|
17
|
+
require('../header/component.js');
|
|
18
|
+
require('@alfalab/core-components-loader/cssm');
|
|
19
|
+
require('../screens/initial/index.module.css');
|
|
20
|
+
require('../screens/initial/countdown-section.js');
|
|
21
|
+
require('../screens/initial/component.js');
|
|
22
|
+
require('../screens/hint/index.module.css');
|
|
23
|
+
require('../screens/hint/component.js');
|
|
24
|
+
require('../screens/fatal-error/index.module.css');
|
|
25
|
+
require('../screens/fatal-error/component.js');
|
|
26
|
+
require('../countdown-loader/index.module.css');
|
|
27
|
+
require('../countdown-loader/component.js');
|
|
28
|
+
require('../screens/temp-block/index.module.css');
|
|
29
|
+
require('../screens/temp-block/component.js');
|
|
30
|
+
require('./index.module.css');
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
exports.BaseConfirmation = components_baseConfirmation_component.BaseConfirmation;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
:root {
|
|
2
|
+
--color-light-text-secondary: #546272;
|
|
3
|
+
}
|
|
4
|
+
:root {
|
|
5
|
+
|
|
6
|
+
/* Hard */
|
|
7
|
+
|
|
8
|
+
/* Up */
|
|
9
|
+
|
|
10
|
+
/* Hard up */
|
|
11
|
+
}
|
|
12
|
+
.component {
|
|
13
|
+
display: flex;
|
|
14
|
+
flex-direction: column;
|
|
15
|
+
width: 100%;
|
|
16
|
+
max-width: 388px;
|
|
17
|
+
margin: 0 auto;
|
|
18
|
+
color: var(--color-light-text-secondary);
|
|
19
|
+
}
|
|
20
|
+
.center {
|
|
21
|
+
align-items: center;
|
|
22
|
+
text-align: center;
|
|
23
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { FC, ReactNode } from 'react';
|
|
2
|
+
type HeaderProps = {
|
|
3
|
+
/**
|
|
4
|
+
* Контент шапки
|
|
5
|
+
*/
|
|
6
|
+
children?: ReactNode;
|
|
7
|
+
/**
|
|
8
|
+
* Отображать в мобильной версии экран компонента
|
|
9
|
+
*/
|
|
10
|
+
mobile?: boolean;
|
|
11
|
+
};
|
|
12
|
+
declare const Header: FC<HeaderProps>;
|
|
13
|
+
export { HeaderProps, Header };
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var React = require('react');
|
|
6
|
+
var cn = require('classnames');
|
|
7
|
+
var coreComponentsTypography = require('@alfalab/core-components-typography/cssm');
|
|
8
|
+
var styles = require('./index.module.css');
|
|
9
|
+
|
|
10
|
+
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
11
|
+
|
|
12
|
+
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
13
|
+
var cn__default = /*#__PURE__*/_interopDefaultLegacy(cn);
|
|
14
|
+
var styles__default = /*#__PURE__*/_interopDefaultLegacy(styles);
|
|
15
|
+
|
|
16
|
+
var Header = function (_a) {
|
|
17
|
+
var _b;
|
|
18
|
+
var mobile = _a.mobile, children = _a.children;
|
|
19
|
+
return (React__default['default'].createElement(coreComponentsTypography.Typography.Title, { className: cn__default['default'](styles__default['default'].header, styles__default['default'].typography, (_b = {}, _b[styles__default['default'].typographyMobile] = mobile, _b)), tag: 'h3', color: 'primary' }, children));
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
exports.Header = Header;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./component";
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
require('react');
|
|
6
|
+
require('classnames');
|
|
7
|
+
require('@alfalab/core-components-typography/cssm');
|
|
8
|
+
require('./index.module.css');
|
|
9
|
+
var components_header_component = require('./component.js');
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
exports.Header = components_header_component.Header;
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
:root {
|
|
2
|
+
|
|
3
|
+
/* Hard */
|
|
4
|
+
|
|
5
|
+
/* Up */
|
|
6
|
+
|
|
7
|
+
/* Hard up */
|
|
8
|
+
}
|
|
9
|
+
:root {
|
|
10
|
+
--gap-xl: 24px;
|
|
11
|
+
}
|
|
12
|
+
:root {
|
|
13
|
+
--font-family-system: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Helvetica,
|
|
14
|
+
sans-serif;
|
|
15
|
+
}
|
|
16
|
+
:root {
|
|
17
|
+
/* desktop */
|
|
18
|
+
--confirmation-header-desktop-font-size: 22px;
|
|
19
|
+
--confirmation-header-desktop-line-height: 26px;
|
|
20
|
+
--confirmation-header-desktop-font-weight: bold;
|
|
21
|
+
--confirmation-header-desktop-font-family: var(--font-family-system);
|
|
22
|
+
|
|
23
|
+
/* mobile */
|
|
24
|
+
--confirmation-header-mobile-font-size: 18px;
|
|
25
|
+
--confirmation-header-mobile-line-height: 22px;
|
|
26
|
+
--confirmation-header-mobile-font-weight: bold;
|
|
27
|
+
--confirmation-header-mobile-font-family: var(--font-family-system);
|
|
28
|
+
|
|
29
|
+
/* text */
|
|
30
|
+
|
|
31
|
+
/* header */
|
|
32
|
+
--confirmation-header-font-feature-settings: normal
|
|
33
|
+
}
|
|
34
|
+
.header {
|
|
35
|
+
margin-bottom: var(--gap-xl);
|
|
36
|
+
}
|
|
37
|
+
.typography {
|
|
38
|
+
font-feature-settings: var(--confirmation-header-font-feature-settings);
|
|
39
|
+
font-size: var(--confirmation-header-desktop-font-size);
|
|
40
|
+
line-height: var(--confirmation-header-desktop-line-height);
|
|
41
|
+
font-weight: var(--confirmation-header-desktop-font-weight);
|
|
42
|
+
font-family: var(--confirmation-header-desktop-font-family);
|
|
43
|
+
}
|
|
44
|
+
.typographyMobile {
|
|
45
|
+
font-feature-settings: var(--confirmation-header-font-feature-settings);
|
|
46
|
+
font-size: var(--confirmation-header-mobile-font-size);
|
|
47
|
+
line-height: var(--confirmation-header-mobile-line-height);
|
|
48
|
+
font-weight: var(--confirmation-header-mobile-font-weight);
|
|
49
|
+
font-family: var(--confirmation-header-mobile-font-family);
|
|
50
|
+
}
|
package/cssm/components/index.js
CHANGED
|
@@ -9,9 +9,12 @@ require('../utils.js');
|
|
|
9
9
|
require('../context.js');
|
|
10
10
|
require('@alfalab/core-components-code-input/cssm');
|
|
11
11
|
require('@alfalab/core-components-link/cssm');
|
|
12
|
-
require('
|
|
13
|
-
require('@alfalab/core-components-loader/cssm');
|
|
12
|
+
require('@alfalab/core-components-typography/cssm');
|
|
14
13
|
require('@alfalab/core-components-button/cssm');
|
|
14
|
+
require('./header/index.module.css');
|
|
15
|
+
require('./header/component.js');
|
|
16
|
+
require('@alfalab/core-components-loader/cssm');
|
|
17
|
+
require('./screens/initial/index.module.css');
|
|
15
18
|
require('./screens/initial/countdown-section.js');
|
|
16
19
|
var components_screens_initial_component = require('./screens/initial/component.js');
|
|
17
20
|
require('./screens/hint/index.module.css');
|
|
@@ -1,3 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
type FatalErrorProps = {
|
|
3
|
+
/**
|
|
4
|
+
* Отображать в мобильной версии экран компонента
|
|
5
|
+
*/
|
|
6
|
+
mobile?: boolean;
|
|
7
|
+
};
|
|
8
|
+
declare const FatalError: FC<FatalErrorProps>;
|
|
9
|
+
export { FatalErrorProps, FatalError };
|
|
@@ -3,22 +3,29 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
var React = require('react');
|
|
6
|
+
var cn = require('classnames');
|
|
6
7
|
require('../../../utils.js');
|
|
7
8
|
var context = require('../../../context.js');
|
|
9
|
+
var coreComponentsTypography = require('@alfalab/core-components-typography/cssm');
|
|
8
10
|
var coreComponentsButton = require('@alfalab/core-components-button/cssm');
|
|
11
|
+
require('../../header/index.module.css');
|
|
12
|
+
var components_header_component = require('../../header/component.js');
|
|
9
13
|
var styles = require('./index.module.css');
|
|
10
14
|
|
|
11
15
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
12
16
|
|
|
13
17
|
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
18
|
+
var cn__default = /*#__PURE__*/_interopDefaultLegacy(cn);
|
|
14
19
|
var styles__default = /*#__PURE__*/_interopDefaultLegacy(styles);
|
|
15
20
|
|
|
16
|
-
var FatalError = function () {
|
|
17
|
-
var
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
React__default['default'].createElement(
|
|
21
|
+
var FatalError = function (_a) {
|
|
22
|
+
var _b;
|
|
23
|
+
var mobile = _a.mobile;
|
|
24
|
+
var _c = React.useContext(context.ConfirmationContext), alignContent = _c.alignContent, texts = _c.texts, onFatalErrorOkButtonClick = _c.onFatalErrorOkButtonClick;
|
|
25
|
+
return (React__default['default'].createElement("div", { className: cn__default['default'](styles__default['default'].component, styles__default['default'][alignContent]) },
|
|
26
|
+
React__default['default'].createElement(components_header_component.Header, { mobile: mobile }, texts.fatalErrorTitle),
|
|
27
|
+
React__default['default'].createElement(coreComponentsTypography.Typography.Text, { view: 'primary-medium', color: 'primary', className: cn__default['default']((_b = {}, _b[styles__default['default'].typographyTheme] = !mobile, _b)) }, texts.fatalErrorDescription),
|
|
28
|
+
React__default['default'].createElement(coreComponentsButton.Button, { size: mobile ? 'xs' : 's', view: 'secondary', onClick: onFatalErrorOkButtonClick, className: styles__default['default'].button }, texts.fatalErrorButton)));
|
|
22
29
|
};
|
|
23
30
|
|
|
24
31
|
exports.FatalError = FatalError;
|
|
@@ -3,9 +3,13 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
require('react');
|
|
6
|
+
require('classnames');
|
|
6
7
|
require('../../../utils.js');
|
|
7
8
|
require('../../../context.js');
|
|
9
|
+
require('@alfalab/core-components-typography/cssm');
|
|
8
10
|
require('@alfalab/core-components-button/cssm');
|
|
11
|
+
require('../../header/index.module.css');
|
|
12
|
+
require('../../header/component.js');
|
|
9
13
|
require('./index.module.css');
|
|
10
14
|
var components_screens_fatalError_component = require('./component.js');
|
|
11
15
|
|