@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.
Files changed (118) hide show
  1. package/{component-c18159ad.d.ts → component-ad8387ce.d.ts} +0 -0
  2. package/{component-c18159ad.js → component-ad8387ce.js} +2 -2
  3. package/component.desktop.js +2 -2
  4. package/component.mobile.js +3 -3
  5. package/component.responsive.js +2 -2
  6. package/components/base-confirmation/component.js +2 -2
  7. package/components/base-confirmation/index.css +2 -8
  8. package/components/base-confirmation/index.d.ts +1 -1
  9. package/components/base-confirmation/index.js +2 -2
  10. package/components/countdown-loader/component.js +1 -1
  11. package/components/countdown-loader/index.css +2 -2
  12. package/components/header/component.js +1 -1
  13. package/components/header/index.css +4 -4
  14. package/components/index.js +1 -1
  15. package/components/screens/fatal-error/component.js +1 -1
  16. package/components/screens/fatal-error/index.css +10 -5
  17. package/components/screens/hint/component.js +16 -17
  18. package/components/screens/hint/index.css +15 -14
  19. package/components/screens/index.js +1 -1
  20. package/components/screens/initial/component.js +1 -1
  21. package/components/screens/initial/countdown-section.js +1 -1
  22. package/components/screens/initial/index.css +18 -18
  23. package/components/screens/initial/index.js +1 -1
  24. package/components/screens/temp-block/component.js +3 -3
  25. package/components/screens/temp-block/index.css +13 -5
  26. package/{countdown-section-fa5d99c6.d.ts → countdown-section-f4894842.d.ts} +0 -0
  27. package/countdown-section-f4894842.js +49 -0
  28. package/cssm/{component-cbe72bf1.d.ts → component-5a4af768.d.ts} +0 -0
  29. package/cssm/{component-cbe72bf1.js → component-5a4af768.js} +1 -1
  30. package/cssm/component.desktop.js +1 -1
  31. package/cssm/component.mobile.js +1 -1
  32. package/cssm/component.responsive.js +1 -1
  33. package/cssm/components/base-confirmation/component.js +1 -1
  34. package/cssm/components/base-confirmation/index.d.ts +1 -1
  35. package/cssm/components/base-confirmation/index.js +1 -1
  36. package/cssm/components/base-confirmation/index.module.css +0 -6
  37. package/cssm/components/header/index.module.css +3 -3
  38. package/cssm/components/screens/fatal-error/index.module.css +6 -1
  39. package/cssm/components/screens/hint/component.js +15 -16
  40. package/cssm/components/screens/hint/index.module.css +9 -8
  41. package/cssm/components/screens/initial/countdown-section.js +19 -26
  42. package/cssm/components/screens/initial/index.module.css +5 -5
  43. package/cssm/components/screens/temp-block/component.js +2 -2
  44. package/cssm/components/screens/temp-block/index.module.css +10 -2
  45. package/cssm/desktop.js +1 -1
  46. package/cssm/index.js +1 -1
  47. package/cssm/mobile.js +1 -1
  48. package/cssm/responsive.js +1 -1
  49. package/desktop.js +2 -2
  50. package/esm/{component-2c4a15b0.d.ts → component-b1ceb5d0.d.ts} +0 -0
  51. package/esm/{component-2c4a15b0.js → component-b1ceb5d0.js} +2 -2
  52. package/esm/component.desktop.js +2 -2
  53. package/esm/component.mobile.js +3 -3
  54. package/esm/component.responsive.js +2 -2
  55. package/esm/components/base-confirmation/component.js +2 -2
  56. package/esm/components/base-confirmation/index.css +2 -8
  57. package/esm/components/base-confirmation/index.d.ts +1 -1
  58. package/esm/components/base-confirmation/index.js +2 -2
  59. package/esm/components/countdown-loader/component.js +1 -1
  60. package/esm/components/countdown-loader/index.css +2 -2
  61. package/esm/components/header/component.js +1 -1
  62. package/esm/components/header/index.css +4 -4
  63. package/esm/components/index.js +1 -1
  64. package/esm/components/screens/fatal-error/component.js +1 -1
  65. package/esm/components/screens/fatal-error/index.css +10 -5
  66. package/esm/components/screens/hint/component.js +16 -17
  67. package/esm/components/screens/hint/index.css +15 -14
  68. package/esm/components/screens/index.js +1 -1
  69. package/esm/components/screens/initial/component.js +1 -1
  70. package/esm/components/screens/initial/countdown-section.js +1 -1
  71. package/esm/components/screens/initial/index.css +18 -18
  72. package/esm/components/screens/initial/index.js +1 -1
  73. package/esm/components/screens/temp-block/component.js +4 -4
  74. package/esm/components/screens/temp-block/index.css +13 -5
  75. package/esm/{countdown-section-a819b4f1.d.ts → countdown-section-608e4e3a.d.ts} +0 -0
  76. package/esm/countdown-section-608e4e3a.js +41 -0
  77. package/esm/desktop.js +2 -2
  78. package/esm/index.js +2 -2
  79. package/esm/mobile.css +2 -2
  80. package/esm/mobile.js +2 -2
  81. package/esm/responsive.js +2 -2
  82. package/index.js +2 -2
  83. package/mobile.css +2 -2
  84. package/mobile.js +2 -2
  85. package/modern/component.desktop.js +1 -1
  86. package/modern/component.mobile.js +2 -2
  87. package/modern/component.responsive.js +1 -1
  88. package/modern/components/base-confirmation/component.js +3 -3
  89. package/modern/components/base-confirmation/index.css +2 -8
  90. package/modern/components/base-confirmation/index.js +1 -1
  91. package/modern/components/countdown-loader/component.js +1 -1
  92. package/modern/components/countdown-loader/index.css +2 -2
  93. package/modern/components/header/component.js +1 -1
  94. package/modern/components/header/index.css +4 -4
  95. package/modern/components/index.js +1 -1
  96. package/modern/components/screens/fatal-error/component.js +1 -1
  97. package/modern/components/screens/fatal-error/index.css +10 -5
  98. package/modern/components/screens/hint/component.js +16 -17
  99. package/modern/components/screens/hint/index.css +15 -14
  100. package/modern/components/screens/index.js +1 -1
  101. package/modern/components/screens/initial/component.js +1 -1
  102. package/modern/components/screens/initial/countdown-section.js +1 -1
  103. package/modern/components/screens/initial/index.css +18 -18
  104. package/modern/components/screens/initial/index.js +1 -1
  105. package/modern/components/screens/temp-block/component.js +4 -4
  106. package/modern/components/screens/temp-block/index.css +13 -5
  107. package/modern/{countdown-section-5519e1b6.d.ts → countdown-section-cb87c8ea.d.ts} +0 -0
  108. package/modern/countdown-section-cb87c8ea.js +36 -0
  109. package/modern/desktop.js +1 -1
  110. package/modern/index.js +1 -1
  111. package/modern/mobile.css +2 -2
  112. package/modern/mobile.js +1 -1
  113. package/modern/responsive.js +1 -1
  114. package/package.json +1 -1
  115. package/responsive.js +2 -2
  116. package/countdown-section-fa5d99c6.js +0 -56
  117. package/esm/countdown-section-a819b4f1.js +0 -48
  118. 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 };