@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.
Files changed (213) hide show
  1. package/component-40c9adb0.d.ts +35 -0
  2. package/{component.js → component-40c9adb0.js} +11 -18
  3. package/component.desktop.d.ts +5 -0
  4. package/component.desktop.js +31 -0
  5. package/component.mobile.d.ts +5 -0
  6. package/component.mobile.js +38 -0
  7. package/component.responsive.d.ts +6 -0
  8. package/component.responsive.js +39 -0
  9. package/components/base-confirmation/component.d.ts +0 -0
  10. package/components/base-confirmation/component.js +27 -0
  11. package/components/base-confirmation/index.css +24 -0
  12. package/components/base-confirmation/index.d.ts +1 -0
  13. package/components/base-confirmation/index.js +27 -0
  14. package/components/countdown-loader/component.js +1 -1
  15. package/components/countdown-loader/index.css +2 -11
  16. package/components/header/component.d.ts +13 -0
  17. package/components/header/component.js +23 -0
  18. package/components/header/index.css +51 -0
  19. package/components/header/index.d.ts +1 -0
  20. package/components/header/index.js +12 -0
  21. package/components/index.js +4 -2
  22. package/components/screens/fatal-error/component.d.ts +9 -3
  23. package/components/screens/fatal-error/component.js +13 -7
  24. package/components/screens/fatal-error/index.css +17 -29
  25. package/components/screens/fatal-error/index.js +3 -0
  26. package/components/screens/hint/component.d.ts +9 -3
  27. package/components/screens/hint/component.js +17 -17
  28. package/components/screens/hint/index.css +25 -48
  29. package/components/screens/hint/index.js +2 -0
  30. package/components/screens/index.js +4 -2
  31. package/components/screens/initial/component.d.ts +9 -3
  32. package/components/screens/initial/component.js +14 -11
  33. package/components/screens/initial/countdown-section.js +3 -2
  34. package/components/screens/initial/index.css +48 -45
  35. package/components/screens/initial/index.js +4 -2
  36. package/components/screens/temp-block/component.d.ts +9 -3
  37. package/components/screens/temp-block/component.js +13 -7
  38. package/components/screens/temp-block/index.css +12 -30
  39. package/components/screens/temp-block/index.js +3 -0
  40. package/{esm/countdown-section-3aba82dd.d.ts → countdown-section-d04caa75.d.ts} +1 -0
  41. package/countdown-section-d04caa75.js +56 -0
  42. package/cssm/component-5c5b24ae.d.ts +35 -0
  43. package/cssm/{component.js → component-5c5b24ae.js} +10 -22
  44. package/cssm/component.desktop.d.ts +5 -0
  45. package/cssm/component.desktop.js +38 -0
  46. package/cssm/component.mobile.d.ts +5 -0
  47. package/cssm/component.mobile.js +44 -0
  48. package/cssm/component.responsive.d.ts +6 -0
  49. package/cssm/component.responsive.js +47 -0
  50. package/cssm/components/base-confirmation/component.d.ts +0 -0
  51. package/cssm/components/base-confirmation/component.js +34 -0
  52. package/cssm/components/base-confirmation/index.d.ts +1 -0
  53. package/cssm/components/base-confirmation/index.js +34 -0
  54. package/cssm/components/base-confirmation/index.module.css +23 -0
  55. package/cssm/components/countdown-loader/index.module.css +0 -9
  56. package/cssm/components/header/component.d.ts +13 -0
  57. package/cssm/components/header/component.js +22 -0
  58. package/cssm/components/header/index.d.ts +1 -0
  59. package/cssm/components/header/index.js +13 -0
  60. package/cssm/components/header/index.module.css +50 -0
  61. package/cssm/components/index.js +5 -2
  62. package/cssm/components/screens/fatal-error/component.d.ts +9 -3
  63. package/cssm/components/screens/fatal-error/component.js +13 -6
  64. package/cssm/components/screens/fatal-error/index.js +4 -0
  65. package/cssm/components/screens/fatal-error/index.module.css +16 -28
  66. package/cssm/components/screens/hint/component.d.ts +9 -3
  67. package/cssm/components/screens/hint/component.js +17 -16
  68. package/cssm/components/screens/hint/index.js +3 -0
  69. package/cssm/components/screens/hint/index.module.css +17 -40
  70. package/cssm/components/screens/index.js +5 -2
  71. package/cssm/components/screens/initial/component.d.ts +9 -3
  72. package/cssm/components/screens/initial/component.js +15 -11
  73. package/cssm/components/screens/initial/countdown-section.d.ts +1 -0
  74. package/cssm/components/screens/initial/countdown-section.js +25 -10
  75. package/cssm/components/screens/initial/index.js +5 -2
  76. package/cssm/components/screens/initial/index.module.css +37 -34
  77. package/cssm/components/screens/temp-block/component.d.ts +9 -3
  78. package/cssm/components/screens/temp-block/component.js +13 -6
  79. package/cssm/components/screens/temp-block/index.js +4 -0
  80. package/cssm/components/screens/temp-block/index.module.css +9 -27
  81. package/cssm/desktop.d.ts +1 -0
  82. package/cssm/desktop.js +35 -0
  83. package/cssm/index.d.ts +2 -1
  84. package/cssm/index.js +13 -5
  85. package/cssm/mobile.d.ts +1 -0
  86. package/cssm/mobile.js +36 -0
  87. package/cssm/mobile.module.css +3 -0
  88. package/cssm/responsive.d.ts +1 -0
  89. package/cssm/responsive.js +38 -0
  90. package/cssm/types.d.ts +4 -0
  91. package/cssm/vars.css +4 -4
  92. package/desktop.d.ts +1 -0
  93. package/desktop.js +28 -0
  94. package/esm/component-1f28492d.d.ts +35 -0
  95. package/esm/{component.js → component-1f28492d.js} +6 -12
  96. package/esm/component.desktop.d.ts +5 -0
  97. package/esm/component.desktop.js +23 -0
  98. package/esm/component.mobile.d.ts +5 -0
  99. package/esm/component.mobile.js +29 -0
  100. package/esm/component.responsive.d.ts +6 -0
  101. package/esm/component.responsive.js +31 -0
  102. package/esm/components/base-confirmation/component.d.ts +0 -0
  103. package/esm/components/base-confirmation/component.js +19 -0
  104. package/esm/components/base-confirmation/index.css +24 -0
  105. package/esm/components/base-confirmation/index.d.ts +1 -0
  106. package/esm/components/base-confirmation/index.js +19 -0
  107. package/esm/components/countdown-loader/component.js +1 -1
  108. package/esm/components/countdown-loader/index.css +2 -11
  109. package/esm/components/header/component.d.ts +13 -0
  110. package/esm/components/header/component.js +14 -0
  111. package/esm/components/header/index.css +51 -0
  112. package/esm/components/header/index.d.ts +1 -0
  113. package/esm/components/header/index.js +4 -0
  114. package/esm/components/index.js +4 -2
  115. package/esm/components/screens/fatal-error/component.d.ts +9 -3
  116. package/esm/components/screens/fatal-error/component.js +13 -8
  117. package/esm/components/screens/fatal-error/index.css +17 -29
  118. package/esm/components/screens/fatal-error/index.js +3 -0
  119. package/esm/components/screens/hint/component.d.ts +9 -3
  120. package/esm/components/screens/hint/component.js +17 -17
  121. package/esm/components/screens/hint/index.css +25 -48
  122. package/esm/components/screens/hint/index.js +2 -0
  123. package/esm/components/screens/index.js +4 -2
  124. package/esm/components/screens/initial/component.d.ts +9 -3
  125. package/esm/components/screens/initial/component.js +14 -11
  126. package/esm/components/screens/initial/countdown-section.js +3 -2
  127. package/esm/components/screens/initial/index.css +48 -45
  128. package/esm/components/screens/initial/index.js +4 -2
  129. package/esm/components/screens/temp-block/component.d.ts +9 -3
  130. package/esm/components/screens/temp-block/component.js +12 -7
  131. package/esm/components/screens/temp-block/index.css +12 -30
  132. package/esm/components/screens/temp-block/index.js +3 -0
  133. package/{modern/countdown-section-7a5f6574.d.ts → esm/countdown-section-b47c61ca.d.ts} +1 -0
  134. package/esm/countdown-section-b47c61ca.js +48 -0
  135. package/esm/desktop.d.ts +1 -0
  136. package/esm/desktop.js +20 -0
  137. package/esm/index.d.ts +2 -1
  138. package/esm/index.js +8 -3
  139. package/esm/mobile.css +4 -0
  140. package/esm/mobile.d.ts +1 -0
  141. package/esm/mobile.js +20 -0
  142. package/esm/responsive.d.ts +1 -0
  143. package/esm/responsive.js +22 -0
  144. package/esm/types.d.ts +4 -0
  145. package/index.d.ts +2 -1
  146. package/index.js +10 -4
  147. package/mobile.css +4 -0
  148. package/mobile.d.ts +1 -0
  149. package/mobile.js +28 -0
  150. package/modern/component.desktop.d.ts +5 -0
  151. package/modern/component.desktop.js +23 -0
  152. package/modern/component.mobile.d.ts +5 -0
  153. package/modern/component.mobile.js +26 -0
  154. package/modern/component.responsive.d.ts +6 -0
  155. package/modern/component.responsive.js +31 -0
  156. package/modern/components/base-confirmation/component.d.ts +4 -0
  157. package/modern/{component.js → components/base-confirmation/component.js} +16 -14
  158. package/modern/components/base-confirmation/index.css +24 -0
  159. package/modern/components/base-confirmation/index.d.ts +1 -0
  160. package/modern/components/base-confirmation/index.js +19 -0
  161. package/modern/components/countdown-loader/component.js +1 -1
  162. package/modern/components/countdown-loader/index.css +2 -11
  163. package/modern/components/header/component.d.ts +13 -0
  164. package/modern/components/header/component.js +10 -0
  165. package/modern/components/header/index.css +51 -0
  166. package/modern/components/header/index.d.ts +1 -0
  167. package/modern/components/header/index.js +4 -0
  168. package/modern/components/index.js +4 -2
  169. package/modern/components/screens/fatal-error/component.d.ts +9 -3
  170. package/modern/components/screens/fatal-error/component.js +11 -8
  171. package/modern/components/screens/fatal-error/index.css +17 -29
  172. package/modern/components/screens/fatal-error/index.js +3 -0
  173. package/modern/components/screens/hint/component.d.ts +9 -3
  174. package/modern/components/screens/hint/component.js +14 -16
  175. package/modern/components/screens/hint/index.css +25 -48
  176. package/modern/components/screens/hint/index.js +2 -0
  177. package/modern/components/screens/index.js +4 -2
  178. package/modern/components/screens/initial/component.d.ts +9 -3
  179. package/modern/components/screens/initial/component.js +10 -9
  180. package/modern/components/screens/initial/countdown-section.js +3 -2
  181. package/modern/components/screens/initial/index.css +48 -45
  182. package/modern/components/screens/initial/index.js +4 -2
  183. package/modern/components/screens/temp-block/component.d.ts +9 -3
  184. package/modern/components/screens/temp-block/component.js +8 -5
  185. package/modern/components/screens/temp-block/index.css +12 -30
  186. package/modern/components/screens/temp-block/index.js +3 -0
  187. package/{countdown-section-44184a06.d.ts → modern/countdown-section-2212ec31.d.ts} +1 -0
  188. package/modern/countdown-section-2212ec31.js +46 -0
  189. package/modern/desktop.d.ts +1 -0
  190. package/modern/desktop.js +20 -0
  191. package/modern/index.d.ts +2 -1
  192. package/modern/index.js +8 -3
  193. package/modern/mobile.css +4 -0
  194. package/modern/mobile.d.ts +1 -0
  195. package/modern/mobile.js +20 -0
  196. package/modern/responsive.d.ts +1 -0
  197. package/modern/responsive.js +22 -0
  198. package/modern/types.d.ts +4 -0
  199. package/package.json +4 -3
  200. package/responsive.d.ts +1 -0
  201. package/responsive.js +30 -0
  202. package/types.d.ts +4 -0
  203. package/component.d.ts +0 -4
  204. package/countdown-section-44184a06.js +0 -41
  205. package/cssm/component.d.ts +0 -4
  206. package/cssm/index.module.css +0 -46
  207. package/esm/component.d.ts +0 -4
  208. package/esm/countdown-section-3aba82dd.js +0 -33
  209. package/esm/index.css +0 -47
  210. package/index.css +0 -47
  211. package/modern/component.d.ts +0 -4
  212. package/modern/countdown-section-7a5f6574.js +0 -32
  213. package/modern/index.css +0 -47
@@ -1,4 +0,0 @@
1
- import { FC } from 'react';
2
- import { ConfirmationProps } from "./types";
3
- declare const Confirmation: FC<ConfirmationProps>;
4
- export { Confirmation };
@@ -1,46 +0,0 @@
1
- :root {
2
- --color-light-text-secondary: #546272;
3
- }
4
- :root {
5
-
6
- /* Hard */
7
-
8
- /* Up */
9
-
10
- /* Hard up */
11
- }
12
- :root {
13
- --font-family-system: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Helvetica,
14
- sans-serif;
15
- }
16
- :root {
17
- /* title */
18
-
19
- /* text */
20
- --confirmation-text-font-size: 16px;
21
- --confirmation-text-line-height: 24px;
22
- --confirmation-text-font-weight: 400;
23
- --confirmation-text-font-family: var(--font-family-system);
24
- --confirmation-text-color: var(--color-light-text-secondary);
25
-
26
- /* error */
27
-
28
- /* input */
29
- }
30
- .component {
31
- font-size: var(--confirmation-text-font-size);
32
- line-height: var(--confirmation-text-line-height);
33
- font-weight: var(--confirmation-text-font-weight);
34
- font-family: var(--confirmation-text-font-family);
35
- color: var(--confirmation-text-color);
36
-
37
- display: flex;
38
- flex-direction: column;
39
- width: 100%;
40
- max-width: 400px;
41
- margin: 0 auto;
42
- }
43
- .center {
44
- align-items: center;
45
- text-align: center;
46
- }
@@ -1,4 +0,0 @@
1
- import { FC } from 'react';
2
- import { ConfirmationProps } from "./types";
3
- declare const Confirmation: FC<ConfirmationProps>;
4
- export { Confirmation };
@@ -1,33 +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 { Loader } from '@alfalab/core-components-loader/esm';
6
- import { Button } from '@alfalab/core-components-button/esm';
7
-
8
- var styles = {"component":"confirmation__component_66h8v","header":"confirmation__header_66h8v","phone":"confirmation__phone_66h8v","inputContainer":"confirmation__inputContainer_66h8v","compact":"confirmation__compact_66h8v","loaderWrap":"confirmation__loaderWrap_66h8v","center":"confirmation__center_66h8v","codeInput":"confirmation__codeInput_66h8v","smsComeLink":"confirmation__smsComeLink_66h8v","countdownContainer":"confirmation__countdownContainer_66h8v","getCodeButton":"confirmation__getCodeButton_66h8v","countdown":"confirmation__countdown_66h8v","countdownTimer":"confirmation__countdownTimer_66h8v"};
9
- require('./components/screens/initial/index.css')
10
-
11
- var CountdownSection = function (_a) {
12
- var codeSendHintVisible = _a.codeSendHintVisible, timePassed = _a.timePassed, processing = _a.processing, handleSmsRetryClick = _a.handleSmsRetryClick;
13
- var _b = useContext(ConfirmationContext), state = _b.state, texts = _b.texts, timeLeft = _b.timeLeft, blockSmsRetry = _b.blockSmsRetry;
14
- if (codeSendHintVisible) {
15
- return React.createElement("div", { className: styles.countdownContainer }, texts.codeSended);
16
- }
17
- if (processing) {
18
- return (React.createElement("div", { className: cn(styles.loaderWrap, styles.countdownContainer) },
19
- React.createElement(Loader, null),
20
- React.createElement("span", { className: styles.loaderText }, state === 'CODE_CHECKING' ? texts.codeChecking : texts.codeSending)));
21
- }
22
- if (blockSmsRetry) {
23
- return React.createElement("div", { className: styles.countdownContainer }, texts.noAttemptsLeft);
24
- }
25
- if (timePassed) {
26
- return (React.createElement(Button, { size: 'xxs', view: 'secondary', onClick: handleSmsRetryClick, className: styles.getCodeButton }, texts.buttonRetry));
27
- }
28
- return (React.createElement("div", { className: cn(styles.countdown, styles.countdownContainer) },
29
- texts.countdown,
30
- React.createElement("div", { className: styles.countdownTimer }, formatMsAsMinutes(timeLeft))));
31
- };
32
-
33
- export { CountdownSection as C, styles as s };
package/esm/index.css DELETED
@@ -1,47 +0,0 @@
1
- /* hash: bzxbf */
2
- :root {
3
- --color-light-text-secondary: #546272;
4
- }
5
- :root {
6
-
7
- /* Hard */
8
-
9
- /* Up */
10
-
11
- /* Hard up */
12
- }
13
- :root {
14
- --font-family-system: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Helvetica,
15
- sans-serif;
16
- }
17
- :root {
18
- /* title */
19
-
20
- /* text */
21
- --confirmation-text-font-size: 16px;
22
- --confirmation-text-line-height: 24px;
23
- --confirmation-text-font-weight: 400;
24
- --confirmation-text-font-family: var(--font-family-system);
25
- --confirmation-text-color: var(--color-light-text-secondary);
26
-
27
- /* error */
28
-
29
- /* input */
30
- }
31
- .confirmation__component_1sztg {
32
- font-size: var(--confirmation-text-font-size);
33
- line-height: var(--confirmation-text-line-height);
34
- font-weight: var(--confirmation-text-font-weight);
35
- font-family: var(--confirmation-text-font-family);
36
- color: var(--confirmation-text-color);
37
-
38
- display: flex;
39
- flex-direction: column;
40
- width: 100%;
41
- max-width: 400px;
42
- margin: 0 auto;
43
- }
44
- .confirmation__center_1sztg {
45
- align-items: center;
46
- text-align: center;
47
- }
package/index.css DELETED
@@ -1,47 +0,0 @@
1
- /* hash: bzxbf */
2
- :root {
3
- --color-light-text-secondary: #546272;
4
- }
5
- :root {
6
-
7
- /* Hard */
8
-
9
- /* Up */
10
-
11
- /* Hard up */
12
- }
13
- :root {
14
- --font-family-system: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Helvetica,
15
- sans-serif;
16
- }
17
- :root {
18
- /* title */
19
-
20
- /* text */
21
- --confirmation-text-font-size: 16px;
22
- --confirmation-text-line-height: 24px;
23
- --confirmation-text-font-weight: 400;
24
- --confirmation-text-font-family: var(--font-family-system);
25
- --confirmation-text-color: var(--color-light-text-secondary);
26
-
27
- /* error */
28
-
29
- /* input */
30
- }
31
- .confirmation__component_1sztg {
32
- font-size: var(--confirmation-text-font-size);
33
- line-height: var(--confirmation-text-line-height);
34
- font-weight: var(--confirmation-text-font-weight);
35
- font-family: var(--confirmation-text-font-family);
36
- color: var(--confirmation-text-color);
37
-
38
- display: flex;
39
- flex-direction: column;
40
- width: 100%;
41
- max-width: 400px;
42
- margin: 0 auto;
43
- }
44
- .confirmation__center_1sztg {
45
- align-items: center;
46
- text-align: center;
47
- }
@@ -1,4 +0,0 @@
1
- import { FC } from 'react';
2
- import { ConfirmationProps } from "./types";
3
- declare const Confirmation: FC<ConfirmationProps>;
4
- export { Confirmation };
@@ -1,32 +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 { Loader } from '@alfalab/core-components-loader/modern';
6
- import { Button } from '@alfalab/core-components-button/modern';
7
-
8
- var styles = {"component":"confirmation__component_66h8v","header":"confirmation__header_66h8v","phone":"confirmation__phone_66h8v","inputContainer":"confirmation__inputContainer_66h8v","compact":"confirmation__compact_66h8v","loaderWrap":"confirmation__loaderWrap_66h8v","center":"confirmation__center_66h8v","codeInput":"confirmation__codeInput_66h8v","smsComeLink":"confirmation__smsComeLink_66h8v","countdownContainer":"confirmation__countdownContainer_66h8v","getCodeButton":"confirmation__getCodeButton_66h8v","countdown":"confirmation__countdown_66h8v","countdownTimer":"confirmation__countdownTimer_66h8v"};
9
- require('./components/screens/initial/index.css')
10
-
11
- const CountdownSection = ({ codeSendHintVisible, timePassed, processing, handleSmsRetryClick, }) => {
12
- const { state, texts, timeLeft, blockSmsRetry } = useContext(ConfirmationContext);
13
- if (codeSendHintVisible) {
14
- return React.createElement("div", { className: styles.countdownContainer }, texts.codeSended);
15
- }
16
- if (processing) {
17
- return (React.createElement("div", { className: cn(styles.loaderWrap, styles.countdownContainer) },
18
- React.createElement(Loader, null),
19
- React.createElement("span", { className: styles.loaderText }, state === 'CODE_CHECKING' ? texts.codeChecking : texts.codeSending)));
20
- }
21
- if (blockSmsRetry) {
22
- return React.createElement("div", { className: styles.countdownContainer }, texts.noAttemptsLeft);
23
- }
24
- if (timePassed) {
25
- return (React.createElement(Button, { size: 'xxs', view: 'secondary', onClick: handleSmsRetryClick, className: styles.getCodeButton }, texts.buttonRetry));
26
- }
27
- return (React.createElement("div", { className: cn(styles.countdown, styles.countdownContainer) },
28
- texts.countdown,
29
- React.createElement("div", { className: styles.countdownTimer }, formatMsAsMinutes(timeLeft))));
30
- };
31
-
32
- export { CountdownSection as C, styles as s };
package/modern/index.css DELETED
@@ -1,47 +0,0 @@
1
- /* hash: bzxbf */
2
- :root {
3
- --color-light-text-secondary: #546272;
4
- }
5
- :root {
6
-
7
- /* Hard */
8
-
9
- /* Up */
10
-
11
- /* Hard up */
12
- }
13
- :root {
14
- --font-family-system: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Helvetica,
15
- sans-serif;
16
- }
17
- :root {
18
- /* title */
19
-
20
- /* text */
21
- --confirmation-text-font-size: 16px;
22
- --confirmation-text-line-height: 24px;
23
- --confirmation-text-font-weight: 400;
24
- --confirmation-text-font-family: var(--font-family-system);
25
- --confirmation-text-color: var(--color-light-text-secondary);
26
-
27
- /* error */
28
-
29
- /* input */
30
- }
31
- .confirmation__component_1sztg {
32
- font-size: var(--confirmation-text-font-size);
33
- line-height: var(--confirmation-text-line-height);
34
- font-weight: var(--confirmation-text-font-weight);
35
- font-family: var(--confirmation-text-font-family);
36
- color: var(--confirmation-text-color);
37
-
38
- display: flex;
39
- flex-direction: column;
40
- width: 100%;
41
- max-width: 400px;
42
- margin: 0 auto;
43
- }
44
- .confirmation__center_1sztg {
45
- align-items: center;
46
- text-align: center;
47
- }