@alfalab/core-components-confirmation 12.2.0 → 12.2.2
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 → component-be4e19ca.d.ts} +6 -4
- package/{component-40c9adb0.js → component-be4e19ca.js} +3 -2
- package/component.desktop.js +3 -3
- package/component.mobile.js +4 -4
- package/component.responsive.js +3 -3
- package/components/base-confirmation/component.js +3 -3
- package/components/base-confirmation/index.css +4 -4
- package/components/base-confirmation/index.d.ts +1 -1
- package/components/base-confirmation/index.js +3 -3
- 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 +2 -2
- package/components/screens/fatal-error/component.js +2 -2
- package/components/screens/fatal-error/index.css +5 -5
- package/components/screens/fatal-error/index.js +1 -1
- package/components/screens/hint/component.js +2 -2
- package/components/screens/hint/index.css +12 -12
- package/components/screens/hint/index.js +1 -1
- package/components/screens/index.js +2 -2
- package/components/screens/initial/component.js +2 -2
- package/components/screens/initial/countdown-section.js +2 -2
- package/components/screens/initial/index.css +19 -19
- package/components/screens/initial/index.js +2 -2
- package/components/screens/temp-block/component.js +1 -1
- package/components/screens/temp-block/index.css +5 -5
- package/{countdown-section-d04caa75.d.ts → countdown-section-828d7b52.d.ts} +0 -0
- package/{countdown-section-d04caa75.js → countdown-section-828d7b52.js} +2 -2
- package/cssm/{component-5c5b24ae.d.ts → component-4b21185d.d.ts} +6 -4
- package/cssm/{component-5c5b24ae.js → component-4b21185d.js} +2 -1
- package/cssm/component.desktop.js +2 -2
- package/cssm/component.mobile.js +2 -2
- package/cssm/component.responsive.js +2 -2
- package/cssm/components/base-confirmation/component.js +2 -2
- package/cssm/components/base-confirmation/index.d.ts +1 -1
- package/cssm/components/base-confirmation/index.js +2 -2
- package/cssm/components/base-confirmation/index.module.css +1 -1
- package/cssm/components/index.js +1 -1
- package/cssm/components/screens/fatal-error/component.js +1 -1
- package/cssm/components/screens/fatal-error/index.js +1 -1
- package/cssm/components/screens/hint/component.js +1 -1
- package/cssm/components/screens/hint/index.js +1 -1
- package/cssm/components/screens/index.js +1 -1
- package/cssm/components/screens/initial/component.js +1 -1
- package/cssm/components/screens/initial/countdown-section.js +1 -1
- package/cssm/components/screens/initial/index.js +1 -1
- package/cssm/components/screens/initial/index.module.css +1 -1
- package/cssm/desktop.js +2 -2
- package/cssm/index.d.ts +1 -1
- package/cssm/index.js +2 -2
- package/cssm/mobile.js +2 -2
- package/cssm/responsive.js +2 -2
- package/cssm/utils.js +3 -5
- package/desktop.js +3 -3
- package/esm/{component-1f28492d.d.ts → component-57bd90b3.d.ts} +6 -4
- package/esm/{component-1f28492d.js → component-57bd90b3.js} +3 -2
- package/esm/component.desktop.js +3 -3
- package/esm/component.mobile.js +4 -4
- package/esm/component.responsive.js +3 -3
- package/esm/components/base-confirmation/component.js +3 -3
- package/esm/components/base-confirmation/index.css +4 -4
- package/esm/components/base-confirmation/index.d.ts +1 -1
- package/esm/components/base-confirmation/index.js +3 -3
- 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 +2 -2
- package/esm/components/screens/fatal-error/component.js +2 -2
- package/esm/components/screens/fatal-error/index.css +5 -5
- package/esm/components/screens/fatal-error/index.js +1 -1
- package/esm/components/screens/hint/component.js +2 -2
- package/esm/components/screens/hint/index.css +12 -12
- package/esm/components/screens/hint/index.js +1 -1
- package/esm/components/screens/index.js +2 -2
- package/esm/components/screens/initial/component.js +2 -2
- package/esm/components/screens/initial/countdown-section.js +2 -2
- package/esm/components/screens/initial/index.css +19 -19
- package/esm/components/screens/initial/index.js +2 -2
- package/esm/components/screens/temp-block/component.js +1 -1
- package/esm/components/screens/temp-block/index.css +5 -5
- package/esm/{countdown-section-b47c61ca.d.ts → countdown-section-4353332f.d.ts} +0 -0
- package/esm/{countdown-section-b47c61ca.js → countdown-section-4353332f.js} +2 -2
- package/esm/desktop.js +3 -3
- package/esm/index.d.ts +1 -1
- package/esm/index.js +3 -3
- package/esm/mobile.css +2 -2
- package/esm/mobile.js +3 -3
- package/esm/responsive.js +3 -3
- package/esm/utils.js +3 -5
- package/index.d.ts +1 -1
- package/index.js +3 -3
- package/mobile.css +2 -2
- package/mobile.js +3 -3
- package/modern/component.desktop.js +3 -3
- package/modern/component.mobile.js +4 -4
- package/modern/component.responsive.js +3 -3
- package/modern/components/base-confirmation/component.js +4 -3
- package/modern/components/base-confirmation/index.css +4 -4
- package/modern/components/base-confirmation/index.js +2 -2
- 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 +2 -2
- package/modern/components/screens/fatal-error/component.js +2 -2
- package/modern/components/screens/fatal-error/index.css +5 -5
- package/modern/components/screens/fatal-error/index.js +1 -1
- package/modern/components/screens/hint/component.js +2 -2
- package/modern/components/screens/hint/index.css +12 -12
- package/modern/components/screens/hint/index.js +1 -1
- package/modern/components/screens/index.js +2 -2
- package/modern/components/screens/initial/component.js +2 -2
- package/modern/components/screens/initial/countdown-section.js +2 -2
- package/modern/components/screens/initial/index.css +19 -19
- package/modern/components/screens/initial/index.js +2 -2
- package/modern/components/screens/temp-block/component.js +1 -1
- package/modern/components/screens/temp-block/index.css +5 -5
- package/modern/{countdown-section-2212ec31.d.ts → countdown-section-9ba68311.d.ts} +0 -0
- package/modern/{countdown-section-2212ec31.js → countdown-section-9ba68311.js} +2 -2
- package/modern/desktop.js +2 -2
- package/modern/index.d.ts +1 -1
- package/modern/index.js +2 -2
- package/modern/mobile.css +2 -2
- package/modern/mobile.js +2 -2
- package/modern/responsive.js +2 -2
- package/modern/utils.js +2 -4
- package/package.json +2 -2
- package/responsive.js +3 -3
- package/utils.js +3 -5
|
@@ -2,11 +2,11 @@ import React, { useContext } from 'react';
|
|
|
2
2
|
import cn from 'classnames';
|
|
3
3
|
import { formatMsAsMinutes } from './utils.js';
|
|
4
4
|
import { ConfirmationContext } from './context.js';
|
|
5
|
-
import { Typography } from '@alfalab/core-components-typography/modern';
|
|
6
5
|
import { Button } from '@alfalab/core-components-button/modern';
|
|
6
|
+
import { Typography } from '@alfalab/core-components-typography/modern';
|
|
7
7
|
import { Loader } from '@alfalab/core-components-loader/modern';
|
|
8
8
|
|
|
9
|
-
var styles = {"component":"
|
|
9
|
+
var styles = {"component":"confirmation__component_lii92","typographyTheme":"confirmation__typographyTheme_lii92","phone":"confirmation__phone_lii92","compact":"confirmation__compact_lii92","loaderWrap":"confirmation__loaderWrap_lii92","left":"confirmation__left_lii92","center":"confirmation__center_lii92","codeInput":"confirmation__codeInput_lii92","smsComeLink":"confirmation__smsComeLink_lii92","countdownContainer":"confirmation__countdownContainer_lii92","countdownMobile":"confirmation__countdownMobile_lii92","countdownLoaderMobile":"confirmation__countdownLoaderMobile_lii92","getCodeButton":"confirmation__getCodeButton_lii92","getCodeButtonMobile":"confirmation__getCodeButtonMobile_lii92","containerInput":"confirmation__containerInput_lii92"};
|
|
10
10
|
require('./components/screens/initial/index.css')
|
|
11
11
|
|
|
12
12
|
const CountdownSection = ({ codeSendHintVisible, timePassed, processing, mobile, handleSmsRetryClick, }) => {
|
package/modern/desktop.js
CHANGED
|
@@ -4,13 +4,13 @@ import '@alfalab/hooks';
|
|
|
4
4
|
import './utils.js';
|
|
5
5
|
import './context.js';
|
|
6
6
|
import './types.js';
|
|
7
|
+
import '@alfalab/core-components-button/modern';
|
|
7
8
|
import '@alfalab/core-components-code-input/modern';
|
|
8
9
|
import '@alfalab/core-components-link/modern';
|
|
9
10
|
import '@alfalab/core-components-typography/modern';
|
|
10
|
-
import '@alfalab/core-components-button/modern';
|
|
11
11
|
import './components/header/component.js';
|
|
12
12
|
import '@alfalab/core-components-loader/modern';
|
|
13
|
-
import './countdown-section-
|
|
13
|
+
import './countdown-section-9ba68311.js';
|
|
14
14
|
import './components/screens/initial/component.js';
|
|
15
15
|
import './components/screens/hint/component.js';
|
|
16
16
|
import './components/screens/fatal-error/component.js';
|
package/modern/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { ConfirmationDesktop as Confirmation
|
|
1
|
+
export { ConfirmationDesktop as Confirmation } from "./desktop";
|
|
2
2
|
export * from "./responsive";
|
|
3
3
|
export * from "./components/index";
|
|
4
4
|
export * from "./context";
|
package/modern/index.js
CHANGED
|
@@ -4,13 +4,13 @@ import '@alfalab/hooks';
|
|
|
4
4
|
export { ONE_DAY, ONE_MINUTE, formatMsAsMinutes, useConfirmation, useCountdown } from './utils.js';
|
|
5
5
|
export { ConfirmationContext } from './context.js';
|
|
6
6
|
export { defaultTexts } from './types.js';
|
|
7
|
+
import '@alfalab/core-components-button/modern';
|
|
7
8
|
import '@alfalab/core-components-code-input/modern';
|
|
8
9
|
import '@alfalab/core-components-link/modern';
|
|
9
10
|
import '@alfalab/core-components-typography/modern';
|
|
10
|
-
import '@alfalab/core-components-button/modern';
|
|
11
11
|
import './components/header/component.js';
|
|
12
12
|
import '@alfalab/core-components-loader/modern';
|
|
13
|
-
import './countdown-section-
|
|
13
|
+
import './countdown-section-9ba68311.js';
|
|
14
14
|
export { Initial } from './components/screens/initial/component.js';
|
|
15
15
|
export { Hint } from './components/screens/hint/component.js';
|
|
16
16
|
export { FatalError } from './components/screens/fatal-error/component.js';
|
package/modern/mobile.css
CHANGED
package/modern/mobile.js
CHANGED
|
@@ -4,13 +4,13 @@ import '@alfalab/hooks';
|
|
|
4
4
|
import './utils.js';
|
|
5
5
|
import './context.js';
|
|
6
6
|
import './types.js';
|
|
7
|
+
import '@alfalab/core-components-button/modern';
|
|
7
8
|
import '@alfalab/core-components-code-input/modern';
|
|
8
9
|
import '@alfalab/core-components-link/modern';
|
|
9
10
|
import '@alfalab/core-components-typography/modern';
|
|
10
|
-
import '@alfalab/core-components-button/modern';
|
|
11
11
|
import './components/header/component.js';
|
|
12
12
|
import '@alfalab/core-components-loader/modern';
|
|
13
|
-
import './countdown-section-
|
|
13
|
+
import './countdown-section-9ba68311.js';
|
|
14
14
|
import './components/screens/initial/component.js';
|
|
15
15
|
import './components/screens/hint/component.js';
|
|
16
16
|
import './components/screens/fatal-error/component.js';
|
package/modern/responsive.js
CHANGED
|
@@ -4,13 +4,13 @@ import '@alfalab/hooks';
|
|
|
4
4
|
import './utils.js';
|
|
5
5
|
import './context.js';
|
|
6
6
|
import './types.js';
|
|
7
|
+
import '@alfalab/core-components-button/modern';
|
|
7
8
|
import '@alfalab/core-components-code-input/modern';
|
|
8
9
|
import '@alfalab/core-components-link/modern';
|
|
9
10
|
import '@alfalab/core-components-typography/modern';
|
|
10
|
-
import '@alfalab/core-components-button/modern';
|
|
11
11
|
import './components/header/component.js';
|
|
12
12
|
import '@alfalab/core-components-loader/modern';
|
|
13
|
-
import './countdown-section-
|
|
13
|
+
import './countdown-section-9ba68311.js';
|
|
14
14
|
import './components/screens/initial/component.js';
|
|
15
15
|
import './components/screens/hint/component.js';
|
|
16
16
|
import './components/screens/fatal-error/component.js';
|
package/modern/utils.js
CHANGED
|
@@ -48,10 +48,8 @@ const useCountdown = (countdownDuration, tick = 1000) => {
|
|
|
48
48
|
timerId.current = window.setInterval(updateProgress, tick);
|
|
49
49
|
}, [stopTimer, updateProgress, tick]);
|
|
50
50
|
const timeLeft = countdownDuration - timePassed;
|
|
51
|
-
useEffect(() => {
|
|
52
|
-
|
|
53
|
-
stopTimer();
|
|
54
|
-
};
|
|
51
|
+
useEffect(() => () => {
|
|
52
|
+
stopTimer();
|
|
55
53
|
}, [stopTimer]);
|
|
56
54
|
return [timeLeft, startTimer, stopTimer];
|
|
57
55
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alfalab/core-components-confirmation",
|
|
3
|
-
"version": "12.2.
|
|
3
|
+
"version": "12.2.2",
|
|
4
4
|
"description": "Sms confirmation component",
|
|
5
5
|
"keywords": [],
|
|
6
6
|
"license": "MIT",
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
"directory": "dist"
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@alfalab/core-components-button": "^
|
|
17
|
+
"@alfalab/core-components-button": "^7.0.0",
|
|
18
18
|
"@alfalab/core-components-code-input": "^2.1.1",
|
|
19
19
|
"@alfalab/core-components-link": "^5.0.1",
|
|
20
20
|
"@alfalab/core-components-loader": "^3.0.2",
|
package/responsive.js
CHANGED
|
@@ -2,20 +2,20 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
require('./component-
|
|
5
|
+
require('./component-be4e19ca.js');
|
|
6
6
|
require('react');
|
|
7
7
|
require('classnames');
|
|
8
8
|
require('@alfalab/hooks');
|
|
9
9
|
require('./utils.js');
|
|
10
10
|
require('./context.js');
|
|
11
11
|
require('./types.js');
|
|
12
|
+
require('@alfalab/core-components-button');
|
|
12
13
|
require('@alfalab/core-components-code-input');
|
|
13
14
|
require('@alfalab/core-components-link');
|
|
14
15
|
require('@alfalab/core-components-typography');
|
|
15
|
-
require('@alfalab/core-components-button');
|
|
16
16
|
require('./components/header/component.js');
|
|
17
17
|
require('@alfalab/core-components-loader');
|
|
18
|
-
require('./countdown-section-
|
|
18
|
+
require('./countdown-section-828d7b52.js');
|
|
19
19
|
require('./components/screens/initial/component.js');
|
|
20
20
|
require('./components/screens/hint/component.js');
|
|
21
21
|
require('./components/screens/fatal-error/component.js');
|
package/utils.js
CHANGED
|
@@ -53,11 +53,9 @@ var useCountdown = function (countdownDuration, tick) {
|
|
|
53
53
|
timerId.current = window.setInterval(updateProgress, tick);
|
|
54
54
|
}, [stopTimer, updateProgress, tick]);
|
|
55
55
|
var timeLeft = countdownDuration - timePassed;
|
|
56
|
-
React.useEffect(function () {
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
};
|
|
60
|
-
}, [stopTimer]);
|
|
56
|
+
React.useEffect(function () { return function () {
|
|
57
|
+
stopTimer();
|
|
58
|
+
}; }, [stopTimer]);
|
|
61
59
|
return [timeLeft, startTimer, stopTimer];
|
|
62
60
|
};
|
|
63
61
|
var ONE_DAY = 24 * 60 * 60 * 1000;
|