@alfalab/core-components-confirmation 14.0.1 → 14.1.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 (284) hide show
  1. package/component.responsive.d.ts +2 -2
  2. package/component.responsive.js.map +1 -1
  3. package/components/base-confirmation/component.d.ts +2 -2
  4. package/components/base-confirmation/component.js +4 -3
  5. package/components/base-confirmation/component.js.map +1 -1
  6. package/components/base-confirmation/index.css +3 -3
  7. package/components/base-confirmation/index.module.css.js +1 -1
  8. package/components/base-confirmation/index.module.css.js.map +1 -1
  9. package/components/countdown-loader/component.d.ts +1 -1
  10. package/components/countdown-loader/component.js.map +1 -1
  11. package/components/countdown-loader/index.css +1 -1
  12. package/components/countdown-loader/index.module.css.js +1 -1
  13. package/components/countdown-loader/index.module.css.js.map +1 -1
  14. package/components/header/component.d.ts +6 -1
  15. package/components/header/component.js +2 -2
  16. package/components/header/component.js.map +1 -1
  17. package/components/header/index.css +5 -5
  18. package/components/header/index.module.css.js +1 -1
  19. package/components/screens/fatal-error/component.d.ts +1 -1
  20. package/components/screens/fatal-error/component.js +2 -2
  21. package/components/screens/fatal-error/component.js.map +1 -1
  22. package/components/screens/fatal-error/index.css +8 -10
  23. package/components/screens/fatal-error/index.module.css.js +1 -1
  24. package/components/screens/hint/component.d.ts +1 -1
  25. package/components/screens/hint/component.js +2 -2
  26. package/components/screens/hint/component.js.map +1 -1
  27. package/components/screens/hint/index.css +16 -18
  28. package/components/screens/hint/index.module.css.js +1 -1
  29. package/components/screens/initial/component.d.ts +1 -1
  30. package/components/screens/initial/component.js +2 -2
  31. package/components/screens/initial/component.js.map +1 -1
  32. package/components/screens/initial/countdown-section.d.ts +1 -1
  33. package/components/screens/initial/countdown-section.js.map +1 -1
  34. package/components/screens/initial/index.css +22 -24
  35. package/components/screens/initial/index.module.css.js +1 -1
  36. package/components/screens/temp-block/component.d.ts +1 -1
  37. package/components/screens/temp-block/component.js +2 -2
  38. package/components/screens/temp-block/component.js.map +1 -1
  39. package/components/screens/temp-block/index.css +10 -12
  40. package/components/screens/temp-block/index.module.css.js +1 -1
  41. package/components/screens/temp-block-over/component.d.ts +1 -1
  42. package/components/screens/temp-block-over/component.js +2 -2
  43. package/components/screens/temp-block-over/component.js.map +1 -1
  44. package/components/screens/temp-block-over/index.css +7 -9
  45. package/components/screens/temp-block-over/index.module.css.js +1 -1
  46. package/context.d.ts +1 -1
  47. package/context.js +1 -0
  48. package/context.js.map +1 -1
  49. package/cssm/component.responsive.d.ts +2 -2
  50. package/cssm/component.responsive.js.map +1 -1
  51. package/cssm/components/base-confirmation/component.d.ts +2 -2
  52. package/cssm/components/base-confirmation/component.js +4 -3
  53. package/cssm/components/base-confirmation/component.js.map +1 -1
  54. package/cssm/components/base-confirmation/index.module.css +1 -1
  55. package/cssm/components/countdown-loader/component.d.ts +1 -1
  56. package/cssm/components/countdown-loader/component.js.map +1 -1
  57. package/cssm/components/header/component.d.ts +6 -1
  58. package/cssm/components/header/component.js +2 -2
  59. package/cssm/components/header/component.js.map +1 -1
  60. package/cssm/components/header/index.module.css +2 -2
  61. package/cssm/components/screens/fatal-error/component.d.ts +1 -1
  62. package/cssm/components/screens/fatal-error/component.js +2 -2
  63. package/cssm/components/screens/fatal-error/component.js.map +1 -1
  64. package/cssm/components/screens/fatal-error/index.module.css +2 -4
  65. package/cssm/components/screens/hint/component.d.ts +1 -1
  66. package/cssm/components/screens/hint/component.js +2 -2
  67. package/cssm/components/screens/hint/component.js.map +1 -1
  68. package/cssm/components/screens/hint/index.module.css +4 -6
  69. package/cssm/components/screens/initial/component.d.ts +1 -1
  70. package/cssm/components/screens/initial/component.js +2 -2
  71. package/cssm/components/screens/initial/component.js.map +1 -1
  72. package/cssm/components/screens/initial/countdown-section.d.ts +1 -1
  73. package/cssm/components/screens/initial/countdown-section.js.map +1 -1
  74. package/cssm/components/screens/initial/index.module.css +3 -5
  75. package/cssm/components/screens/temp-block/component.d.ts +1 -1
  76. package/cssm/components/screens/temp-block/component.js +2 -2
  77. package/cssm/components/screens/temp-block/component.js.map +1 -1
  78. package/cssm/components/screens/temp-block/index.module.css +2 -4
  79. package/cssm/components/screens/temp-block-over/component.d.ts +1 -1
  80. package/cssm/components/screens/temp-block-over/component.js +2 -2
  81. package/cssm/components/screens/temp-block-over/component.js.map +1 -1
  82. package/cssm/components/screens/temp-block-over/index.module.css +2 -4
  83. package/cssm/context.d.ts +1 -1
  84. package/cssm/context.js +1 -0
  85. package/cssm/context.js.map +1 -1
  86. package/cssm/desktop/component.desktop.d.ts +2 -2
  87. package/cssm/desktop/component.desktop.js.map +1 -1
  88. package/cssm/mobile/component.mobile.d.ts +2 -2
  89. package/cssm/mobile/component.mobile.js.map +1 -1
  90. package/cssm/types.d.ts +13 -8
  91. package/cssm/types.js.map +1 -1
  92. package/cssm/utils.d.ts +1 -1
  93. package/cssm/utils.js.map +1 -1
  94. package/desktop/component.desktop.d.ts +2 -2
  95. package/desktop/component.desktop.js.map +1 -1
  96. package/esm/component.responsive.d.ts +2 -2
  97. package/esm/component.responsive.js.map +1 -1
  98. package/esm/components/base-confirmation/component.d.ts +2 -2
  99. package/esm/components/base-confirmation/component.js +4 -3
  100. package/esm/components/base-confirmation/component.js.map +1 -1
  101. package/esm/components/base-confirmation/index.css +3 -3
  102. package/esm/components/base-confirmation/index.module.css.js +1 -1
  103. package/esm/components/base-confirmation/index.module.css.js.map +1 -1
  104. package/esm/components/countdown-loader/component.d.ts +1 -1
  105. package/esm/components/countdown-loader/component.js.map +1 -1
  106. package/esm/components/countdown-loader/index.css +1 -1
  107. package/esm/components/countdown-loader/index.module.css.js +1 -1
  108. package/esm/components/countdown-loader/index.module.css.js.map +1 -1
  109. package/esm/components/header/component.d.ts +6 -1
  110. package/esm/components/header/component.js +2 -2
  111. package/esm/components/header/component.js.map +1 -1
  112. package/esm/components/header/index.css +5 -5
  113. package/esm/components/header/index.module.css.js +1 -1
  114. package/esm/components/screens/fatal-error/component.d.ts +1 -1
  115. package/esm/components/screens/fatal-error/component.js +2 -2
  116. package/esm/components/screens/fatal-error/component.js.map +1 -1
  117. package/esm/components/screens/fatal-error/index.css +8 -10
  118. package/esm/components/screens/fatal-error/index.module.css.js +1 -1
  119. package/esm/components/screens/hint/component.d.ts +1 -1
  120. package/esm/components/screens/hint/component.js +2 -2
  121. package/esm/components/screens/hint/component.js.map +1 -1
  122. package/esm/components/screens/hint/index.css +16 -18
  123. package/esm/components/screens/hint/index.module.css.js +1 -1
  124. package/esm/components/screens/initial/component.d.ts +1 -1
  125. package/esm/components/screens/initial/component.js +2 -2
  126. package/esm/components/screens/initial/component.js.map +1 -1
  127. package/esm/components/screens/initial/countdown-section.d.ts +1 -1
  128. package/esm/components/screens/initial/countdown-section.js.map +1 -1
  129. package/esm/components/screens/initial/index.css +22 -24
  130. package/esm/components/screens/initial/index.module.css.js +1 -1
  131. package/esm/components/screens/temp-block/component.d.ts +1 -1
  132. package/esm/components/screens/temp-block/component.js +2 -2
  133. package/esm/components/screens/temp-block/component.js.map +1 -1
  134. package/esm/components/screens/temp-block/index.css +10 -12
  135. package/esm/components/screens/temp-block/index.module.css.js +1 -1
  136. package/esm/components/screens/temp-block-over/component.d.ts +1 -1
  137. package/esm/components/screens/temp-block-over/component.js +2 -2
  138. package/esm/components/screens/temp-block-over/component.js.map +1 -1
  139. package/esm/components/screens/temp-block-over/index.css +7 -9
  140. package/esm/components/screens/temp-block-over/index.module.css.js +1 -1
  141. package/esm/context.d.ts +1 -1
  142. package/esm/context.js +1 -0
  143. package/esm/context.js.map +1 -1
  144. package/esm/desktop/component.desktop.d.ts +2 -2
  145. package/esm/desktop/component.desktop.js.map +1 -1
  146. package/esm/mobile/component.mobile.d.ts +2 -2
  147. package/esm/mobile/component.mobile.js.map +1 -1
  148. package/esm/mobile/mobile.css +1 -1
  149. package/esm/mobile/mobile.module.css.js +1 -1
  150. package/esm/types.d.ts +13 -8
  151. package/esm/types.js.map +1 -1
  152. package/esm/utils.d.ts +1 -1
  153. package/esm/utils.js.map +1 -1
  154. package/mobile/component.mobile.d.ts +2 -2
  155. package/mobile/component.mobile.js.map +1 -1
  156. package/mobile/mobile.css +1 -1
  157. package/mobile/mobile.module.css.js +1 -1
  158. package/modern/component.responsive.d.ts +2 -2
  159. package/modern/component.responsive.js.map +1 -1
  160. package/modern/components/base-confirmation/component.d.ts +2 -2
  161. package/modern/components/base-confirmation/component.js +3 -2
  162. package/modern/components/base-confirmation/component.js.map +1 -1
  163. package/modern/components/base-confirmation/index.css +3 -3
  164. package/modern/components/base-confirmation/index.module.css.js +1 -1
  165. package/modern/components/base-confirmation/index.module.css.js.map +1 -1
  166. package/modern/components/countdown-loader/component.d.ts +1 -1
  167. package/modern/components/countdown-loader/component.js.map +1 -1
  168. package/modern/components/countdown-loader/index.css +1 -1
  169. package/modern/components/countdown-loader/index.module.css.js +1 -1
  170. package/modern/components/countdown-loader/index.module.css.js.map +1 -1
  171. package/modern/components/header/component.d.ts +6 -1
  172. package/modern/components/header/component.js +1 -1
  173. package/modern/components/header/component.js.map +1 -1
  174. package/modern/components/header/index.css +5 -5
  175. package/modern/components/header/index.module.css.js +1 -1
  176. package/modern/components/screens/fatal-error/component.d.ts +1 -1
  177. package/modern/components/screens/fatal-error/component.js +2 -2
  178. package/modern/components/screens/fatal-error/component.js.map +1 -1
  179. package/modern/components/screens/fatal-error/index.css +8 -10
  180. package/modern/components/screens/fatal-error/index.module.css.js +1 -1
  181. package/modern/components/screens/hint/component.d.ts +1 -1
  182. package/modern/components/screens/hint/component.js +2 -2
  183. package/modern/components/screens/hint/component.js.map +1 -1
  184. package/modern/components/screens/hint/index.css +16 -18
  185. package/modern/components/screens/hint/index.module.css.js +1 -1
  186. package/modern/components/screens/initial/component.d.ts +1 -1
  187. package/modern/components/screens/initial/component.js +2 -2
  188. package/modern/components/screens/initial/component.js.map +1 -1
  189. package/modern/components/screens/initial/countdown-section.d.ts +1 -1
  190. package/modern/components/screens/initial/countdown-section.js.map +1 -1
  191. package/modern/components/screens/initial/index.css +22 -24
  192. package/modern/components/screens/initial/index.module.css.js +1 -1
  193. package/modern/components/screens/temp-block/component.d.ts +1 -1
  194. package/modern/components/screens/temp-block/component.js +2 -2
  195. package/modern/components/screens/temp-block/component.js.map +1 -1
  196. package/modern/components/screens/temp-block/index.css +10 -12
  197. package/modern/components/screens/temp-block/index.module.css.js +1 -1
  198. package/modern/components/screens/temp-block-over/component.d.ts +1 -1
  199. package/modern/components/screens/temp-block-over/component.js +2 -2
  200. package/modern/components/screens/temp-block-over/component.js.map +1 -1
  201. package/modern/components/screens/temp-block-over/index.css +7 -9
  202. package/modern/components/screens/temp-block-over/index.module.css.js +1 -1
  203. package/modern/context.d.ts +1 -1
  204. package/modern/context.js +1 -0
  205. package/modern/context.js.map +1 -1
  206. package/modern/desktop/component.desktop.d.ts +2 -2
  207. package/modern/desktop/component.desktop.js.map +1 -1
  208. package/modern/mobile/component.mobile.d.ts +2 -2
  209. package/modern/mobile/component.mobile.js.map +1 -1
  210. package/modern/mobile/mobile.css +1 -1
  211. package/modern/mobile/mobile.module.css.js +1 -1
  212. package/modern/types.d.ts +13 -8
  213. package/modern/types.js.map +1 -1
  214. package/modern/utils.d.ts +1 -1
  215. package/modern/utils.js.map +1 -1
  216. package/moderncssm/component.responsive.d.ts +2 -2
  217. package/moderncssm/component.responsive.js.map +1 -1
  218. package/moderncssm/components/base-confirmation/component.d.ts +2 -2
  219. package/moderncssm/components/base-confirmation/component.js +3 -2
  220. package/moderncssm/components/base-confirmation/component.js.map +1 -1
  221. package/moderncssm/components/base-confirmation/index.module.css +3 -2
  222. package/moderncssm/components/countdown-loader/component.d.ts +1 -1
  223. package/moderncssm/components/countdown-loader/component.js.map +1 -1
  224. package/moderncssm/components/countdown-loader/index.module.css +2 -0
  225. package/moderncssm/components/header/component.d.ts +6 -1
  226. package/moderncssm/components/header/component.js +1 -1
  227. package/moderncssm/components/header/component.js.map +1 -1
  228. package/moderncssm/components/header/index.module.css +2 -0
  229. package/moderncssm/components/screens/fatal-error/component.d.ts +1 -1
  230. package/moderncssm/components/screens/fatal-error/component.js +2 -2
  231. package/moderncssm/components/screens/fatal-error/component.js.map +1 -1
  232. package/moderncssm/components/screens/fatal-error/index.module.css +2 -2
  233. package/moderncssm/components/screens/hint/component.d.ts +1 -1
  234. package/moderncssm/components/screens/hint/component.js +2 -2
  235. package/moderncssm/components/screens/hint/component.js.map +1 -1
  236. package/moderncssm/components/screens/hint/index.module.css +4 -4
  237. package/moderncssm/components/screens/initial/component.d.ts +1 -1
  238. package/moderncssm/components/screens/initial/component.js +2 -2
  239. package/moderncssm/components/screens/initial/component.js.map +1 -1
  240. package/moderncssm/components/screens/initial/countdown-section.d.ts +1 -1
  241. package/moderncssm/components/screens/initial/countdown-section.js.map +1 -1
  242. package/moderncssm/components/screens/initial/index.module.css +3 -3
  243. package/moderncssm/components/screens/temp-block/component.d.ts +1 -1
  244. package/moderncssm/components/screens/temp-block/component.js +2 -2
  245. package/moderncssm/components/screens/temp-block/component.js.map +1 -1
  246. package/moderncssm/components/screens/temp-block/index.module.css +2 -2
  247. package/moderncssm/components/screens/temp-block-over/component.d.ts +1 -1
  248. package/moderncssm/components/screens/temp-block-over/component.js +2 -2
  249. package/moderncssm/components/screens/temp-block-over/component.js.map +1 -1
  250. package/moderncssm/components/screens/temp-block-over/index.module.css +2 -2
  251. package/moderncssm/context.d.ts +1 -1
  252. package/moderncssm/context.js +1 -0
  253. package/moderncssm/context.js.map +1 -1
  254. package/moderncssm/desktop/component.desktop.d.ts +2 -2
  255. package/moderncssm/desktop/component.desktop.js.map +1 -1
  256. package/moderncssm/mobile/component.mobile.d.ts +2 -2
  257. package/moderncssm/mobile/component.mobile.js.map +1 -1
  258. package/moderncssm/types.d.ts +13 -8
  259. package/moderncssm/types.js.map +1 -1
  260. package/moderncssm/utils.d.ts +1 -1
  261. package/moderncssm/utils.js.map +1 -1
  262. package/package.json +3 -3
  263. package/src/component.responsive.tsx +2 -2
  264. package/src/components/base-confirmation/component.tsx +5 -6
  265. package/src/components/base-confirmation/index.module.css +1 -1
  266. package/src/components/countdown-loader/component.tsx +1 -1
  267. package/src/components/countdown-loader/index.module.css +1 -1
  268. package/src/components/header/component.tsx +9 -3
  269. package/src/components/screens/fatal-error/component.tsx +5 -3
  270. package/src/components/screens/hint/component.tsx +5 -3
  271. package/src/components/screens/initial/component.tsx +9 -3
  272. package/src/components/screens/initial/countdown-section.tsx +1 -1
  273. package/src/components/screens/temp-block/component.tsx +12 -4
  274. package/src/components/screens/temp-block-over/component.tsx +5 -3
  275. package/src/context.ts +2 -1
  276. package/src/desktop/component.desktop.tsx +2 -2
  277. package/src/mobile/component.mobile.tsx +2 -2
  278. package/src/types.ts +14 -7
  279. package/src/utils.ts +1 -1
  280. package/src/vars.css +1 -1
  281. package/types.d.ts +13 -8
  282. package/types.js.map +1 -1
  283. package/utils.d.ts +1 -1
  284. package/utils.js.map +1 -1
@@ -10,50 +10,48 @@
10
10
  --gap-24: var(--gap-xl);
11
11
  --gap-32: var(--gap-2xl);
12
12
  } :root {
13
- --font-family-system: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Helvetica,
14
- sans-serif;
13
+ --font-family-system:
14
+ system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Helvetica, sans-serif;
15
15
  } :root {
16
16
  --confirmation-text-font-size: 16px;
17
17
  --confirmation-text-line-height: 24px;
18
18
  --confirmation-text-font-weight: 400;
19
19
  --confirmation-text-font-family: var(--font-family-system);
20
20
  --confirmation-text-color: var(--color-light-text-primary)
21
-
22
- /* header */
23
- } .confirmation__component_uanaf {
21
+ } .confirmation__component_t001a {
24
22
  display: flex;
25
23
  flex-direction: column;
26
- align-items: flex-start
27
- } .confirmation__component_uanaf span:last-of-type {
24
+ align-items: flex-start;
25
+ } .confirmation__component_t001a span:last-of-type {
28
26
  margin-bottom: var(--gap-0);
29
- } .confirmation__center_uanaf {
27
+ } .confirmation__center_t001a {
30
28
  align-items: center;
31
29
  text-align: center;
32
- } .confirmation__text_uanaf.confirmation__text_uanaf {
30
+ } .confirmation__text_t001a.confirmation__text_t001a {
33
31
  margin-bottom: var(--gap-24);
34
- } .confirmation__typographyTheme_uanaf.confirmation__typographyTheme_uanaf {
32
+ } .confirmation__typographyTheme_t001a.confirmation__typographyTheme_t001a {
35
33
  font-size: var(--confirmation-text-font-size);
36
34
  line-height: var(--confirmation-text-line-height);
37
35
  font-weight: var(--confirmation-text-font-weight);
38
36
  font-family: var(--confirmation-text-font-family);
39
37
  color: var(--confirmation-text-color);
40
- } .confirmation__typographyThemeMobile_uanaf.confirmation__typographyThemeMobile_uanaf {
38
+ } .confirmation__typographyThemeMobile_t001a.confirmation__typographyThemeMobile_t001a {
41
39
  color: var(--color-light-text-secondary);
42
- } .confirmation__phonesWrap_uanaf {
40
+ } .confirmation__phonesWrap_t001a {
43
41
  display: flex;
44
42
  flex-direction: column;
45
43
  margin-bottom: var(--gap-24);
46
- } .confirmation__phoneWrap_uanaf {
47
- margin-bottom: var(--gap-8)
48
- } .confirmation__phoneWrap_uanaf:last-child {
44
+ } .confirmation__phoneWrap_t001a {
45
+ margin-bottom: var(--gap-8);
46
+ } .confirmation__phoneWrap_t001a:last-child {
49
47
  margin-bottom: var(--gap-0);
50
- } .confirmation__phoneLink_uanaf.confirmation__phoneLink_uanaf {
48
+ } .confirmation__phoneLink_t001a.confirmation__phoneLink_t001a {
51
49
  font-size: 16px;
52
50
  line-height: 24px;
53
51
  font-weight: 500;
54
- } .confirmation__hintButton_uanaf {
52
+ } .confirmation__hintButton_t001a {
55
53
  margin-top: var(--gap-32);
56
- } .confirmation__phoneContentMobile_uanaf {
54
+ } .confirmation__phoneContentMobile_t001a {
57
55
  display: flex;
58
56
  flex-direction: column;
59
57
  }
@@ -1,6 +1,6 @@
1
1
  import './index.css';
2
2
 
3
- const styles = {"component":"confirmation__component_uanaf","center":"confirmation__center_uanaf","text":"confirmation__text_uanaf","typographyTheme":"confirmation__typographyTheme_uanaf","typographyThemeMobile":"confirmation__typographyThemeMobile_uanaf","phonesWrap":"confirmation__phonesWrap_uanaf","phoneWrap":"confirmation__phoneWrap_uanaf","phoneLink":"confirmation__phoneLink_uanaf","hintButton":"confirmation__hintButton_uanaf","phoneContentMobile":"confirmation__phoneContentMobile_uanaf"};
3
+ const styles = {"component":"confirmation__component_t001a","center":"confirmation__center_t001a","text":"confirmation__text_t001a","typographyTheme":"confirmation__typographyTheme_t001a","typographyThemeMobile":"confirmation__typographyThemeMobile_t001a","phonesWrap":"confirmation__phonesWrap_t001a","phoneWrap":"confirmation__phoneWrap_t001a","phoneLink":"confirmation__phoneLink_t001a","hintButton":"confirmation__hintButton_t001a","phoneContentMobile":"confirmation__phoneContentMobile_t001a"};
4
4
 
5
5
  export { styles as default };
6
6
  //# sourceMappingURL=index.module.css.js.map
@@ -1,4 +1,4 @@
1
- import { FC } from 'react';
1
+ import { type FC } from 'react';
2
2
  export declare type InitialProps = {
3
3
  /**
4
4
  * Отображать в мобильной версии экран компонента
@@ -13,7 +13,7 @@ import styles from './index.module.css.js';
13
13
 
14
14
  const CODE_SEND_HINT_VISIBLE_DURATION = 2000;
15
15
  const Initial = ({ mobile }) => {
16
- const { state, alignContent, texts, requiredCharAmount, timeLeft, phone, clearCodeOnError, hideCountdownSection, initialScreenHintSlot, errorVisibleDuration, onChangeState, onInputFinished, onChangeScreen, onSmsRetryClick, } = useContext(ConfirmationContext);
16
+ const { state, alignContent, titleTag, texts, requiredCharAmount, timeLeft, phone, clearCodeOnError, hideCountdownSection, initialScreenHintSlot, errorVisibleDuration, onChangeState, onInputFinished, onChangeScreen, onSmsRetryClick, } = useContext(ConfirmationContext);
17
17
  const prevState = usePrevious(state);
18
18
  const inputRef = useRef(null);
19
19
  const [codeSendHintVisible, setCodeSendHintVisible] = useState(false);
@@ -93,7 +93,7 @@ const Initial = ({ mobile }) => {
93
93
  const timePassed = timeLeft === 0;
94
94
  const ComponentCodeInput = mobile ? CodeInputMobile : CodeInputDesktop;
95
95
  return (React.createElement("div", { className: cn(styles.component, styles[alignContent]) },
96
- React.createElement(Header, { mobile: mobile }, texts.title),
96
+ React.createElement(Header, { mobile: mobile, titleTag: titleTag }, texts.title),
97
97
  phone ? (React.createElement(Text, { view: 'primary-medium', color: 'primary', className: cn(styles.phone, {
98
98
  [styles.typographyTheme]: !mobile,
99
99
  [styles.typographyThemeMobile]: mobile,
@@ -1 +1 @@
1
- {"version":3,"file":"component.js","sources":["../../../../src/components/screens/initial/component.tsx"],"sourcesContent":["import React, { FC, useCallback, useContext, useEffect, useRef, useState } from 'react';\nimport cn from 'classnames';\n\nimport { ButtonMobile } from '@alfalab/core-components-button/mobile';\nimport { CodeInputDesktop } from '@alfalab/core-components-code-input/desktop';\nimport { CodeInputMobile } from '@alfalab/core-components-code-input/mobile';\nimport { BaseCodeInputProps, CustomInputRef } from '@alfalab/core-components-code-input/shared';\nimport { Link } from '@alfalab/core-components-link';\nimport { Text } from '@alfalab/core-components-typography';\nimport { useLayoutEffect_SAFE_FOR_SSR, usePrevious } from '@alfalab/hooks';\n\nimport { ConfirmationContext } from '../../../context';\nimport { Header } from '../../header';\n\nimport { CountdownSection } from './countdown-section';\n\nimport styles from './index.module.css';\n\nexport type InitialProps = {\n /**\n * Отображать в мобильной версии экран компонента\n */\n mobile?: boolean;\n};\n\nconst CODE_SEND_HINT_VISIBLE_DURATION = 2000;\n\nexport const Initial: FC<InitialProps> = ({ mobile }) => {\n const {\n state,\n alignContent,\n texts,\n requiredCharAmount,\n timeLeft,\n phone,\n clearCodeOnError,\n hideCountdownSection,\n initialScreenHintSlot,\n errorVisibleDuration,\n onChangeState,\n onInputFinished,\n onChangeScreen,\n onSmsRetryClick,\n } = useContext(ConfirmationContext);\n\n const prevState = usePrevious(state);\n\n const inputRef = useRef<CustomInputRef>(null);\n\n const [codeSendHintVisible, setCodeSendHintVisible] = useState(false);\n\n const timerId = useRef(0);\n\n const handleInputComplete: BaseCodeInputProps['onComplete'] = (code) => {\n onInputFinished(code);\n };\n\n const handleSmsHintLinkClick = () => {\n onChangeScreen('HINT');\n };\n\n const handleInputChange = () => {\n if (state === 'CODE_ERROR') {\n onChangeState('INITIAL');\n }\n };\n\n const handleSmsRetryClick = () => {\n if (inputRef.current) {\n inputRef.current.reset();\n }\n\n onSmsRetryClick();\n };\n\n const handleErrorAnimationEnd = () => {\n if (clearCodeOnError && state !== 'INITIAL') {\n onChangeState('INITIAL');\n }\n };\n\n const clearTimer = useCallback(() => {\n window.clearTimeout(timerId.current);\n }, []);\n\n useEffect(() => {\n if (inputRef.current) {\n inputRef.current.focus();\n }\n\n return () => {\n clearTimer();\n };\n }, [clearTimer]);\n\n useEffect(() => {\n if (!inputRef.current) {\n return;\n }\n\n if (prevState === 'CODE_SENDING' && state !== 'CODE_SENDING') {\n inputRef.current.focus();\n }\n }, [prevState, state, requiredCharAmount]);\n\n useLayoutEffect_SAFE_FOR_SSR(() => {\n if (prevState === 'CODE_SENDING' && state !== 'CODE_SENDING') {\n setCodeSendHintVisible(true);\n\n clearTimer();\n\n timerId.current = window.setTimeout(() => {\n setCodeSendHintVisible(false);\n }, CODE_SEND_HINT_VISIBLE_DURATION);\n }\n }, [prevState, state, clearTimer]);\n\n const getCodeInputError = (): string | boolean => {\n if (state === 'CODE_EXPIRED') {\n return texts.codeErrorExpired || true;\n }\n\n if (state === 'CODE_EXPIRED_ENDED') {\n return texts.codeErrorExpiredEnded || true;\n }\n\n if (state === 'CODE_ERROR') {\n return texts.codeError || true;\n }\n\n return false;\n };\n\n const renderHintButton = () => {\n if (initialScreenHintSlot) {\n return initialScreenHintSlot;\n }\n\n if (mobile) {\n return (\n <ButtonMobile\n onClick={handleSmsHintLinkClick}\n className={styles.smsBtn}\n view='text'\n size='xs'\n >\n {texts.linkToHint}\n </ButtonMobile>\n );\n }\n\n return (\n <Link\n onClick={handleSmsHintLinkClick}\n className={styles.smsComeLink}\n view={mobile ? 'primary' : 'secondary'}\n pseudo={true}\n >\n {texts.linkToHint}\n </Link>\n );\n };\n\n const processing = ['CODE_CHECKING', 'CODE_SENDING'].includes(state);\n\n const timePassed = timeLeft === 0;\n\n const ComponentCodeInput = mobile ? CodeInputMobile : CodeInputDesktop;\n\n return (\n <div className={cn(styles.component, styles[alignContent])}>\n <Header mobile={mobile}>{texts.title}</Header>\n\n {phone ? (\n <Text\n view='primary-medium'\n color='primary'\n className={cn(styles.phone, {\n [styles.typographyTheme]: !mobile,\n [styles.typographyThemeMobile]: mobile,\n })}\n >\n Отправили на {phone}\n </Text>\n ) : null}\n <ComponentCodeInput\n disabled={processing}\n error={getCodeInputError()}\n ref={inputRef}\n fields={requiredCharAmount}\n className={cn(styles.containerInput, styles.codeInput)}\n onComplete={handleInputComplete}\n onChange={handleInputChange}\n clearCodeOnError={clearCodeOnError}\n errorVisibleDuration={errorVisibleDuration}\n onErrorAnimationEnd={handleErrorAnimationEnd}\n />\n {!hideCountdownSection && (\n <CountdownSection\n processing={processing}\n timePassed={timePassed}\n codeSendHintVisible={codeSendHintVisible}\n handleSmsRetryClick={handleSmsRetryClick}\n mobile={mobile}\n />\n )}\n\n {renderHintButton()}\n </div>\n );\n};\n"],"names":[],"mappings":";;;;;;;;;;;;;AAyBA,MAAM,+BAA+B,GAAG,IAAI;MAE/B,OAAO,GAAqB,CAAC,EAAE,MAAM,EAAE,KAAI;AACpD,IAAA,MAAM,EACF,KAAK,EACL,YAAY,EACZ,KAAK,EACL,kBAAkB,EAClB,QAAQ,EACR,KAAK,EACL,gBAAgB,EAChB,oBAAoB,EACpB,qBAAqB,EACrB,oBAAoB,EACpB,aAAa,EACb,eAAe,EACf,cAAc,EACd,eAAe,GAClB,GAAG,UAAU,CAAC,mBAAmB,CAAC;AAEnC,IAAA,MAAM,SAAS,GAAG,WAAW,CAAC,KAAK,CAAC;AAEpC,IAAA,MAAM,QAAQ,GAAG,MAAM,CAAiB,IAAI,CAAC;IAE7C,MAAM,CAAC,mBAAmB,EAAE,sBAAsB,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC;AAErE,IAAA,MAA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,UAAU,EAAE,UAAU,EACtB,mBAAmB,EAAE,mBAAmB,EACxC,mBAAmB,EAAE,mBAAmB,EACxC,MAAM,EAAE,MAAM,EAAA,CAChB,CACL;QAEA,gBAAgB,EAAE,CACjB;AAEd;;;;"}
1
+ {"version":3,"file":"component.js","sources":["../../../../src/components/screens/initial/component.tsx"],"sourcesContent":["import React, { type FC, useCallback, useContext, useEffect, useRef, useState } from 'react';\nimport cn from 'classnames';\n\nimport { ButtonMobile } from '@alfalab/core-components-button/mobile';\nimport { CodeInputDesktop } from '@alfalab/core-components-code-input/desktop';\nimport { CodeInputMobile } from '@alfalab/core-components-code-input/mobile';\nimport {\n type BaseCodeInputProps,\n type CustomInputRef,\n} from '@alfalab/core-components-code-input/shared';\nimport { Link } from '@alfalab/core-components-link';\nimport { Text } from '@alfalab/core-components-typography';\nimport { useLayoutEffect_SAFE_FOR_SSR, usePrevious } from '@alfalab/hooks';\n\nimport { ConfirmationContext } from '../../../context';\nimport { Header } from '../../header';\n\nimport { CountdownSection } from './countdown-section';\n\nimport styles from './index.module.css';\n\nexport type InitialProps = {\n /**\n * Отображать в мобильной версии экран компонента\n */\n mobile?: boolean;\n};\n\nconst CODE_SEND_HINT_VISIBLE_DURATION = 2000;\n\nexport const Initial: FC<InitialProps> = ({ mobile }) => {\n const {\n state,\n alignContent,\n titleTag,\n texts,\n requiredCharAmount,\n timeLeft,\n phone,\n clearCodeOnError,\n hideCountdownSection,\n initialScreenHintSlot,\n errorVisibleDuration,\n onChangeState,\n onInputFinished,\n onChangeScreen,\n onSmsRetryClick,\n } = useContext(ConfirmationContext);\n\n const prevState = usePrevious(state);\n\n const inputRef = useRef<CustomInputRef>(null);\n\n const [codeSendHintVisible, setCodeSendHintVisible] = useState(false);\n\n const timerId = useRef(0);\n\n const handleInputComplete: BaseCodeInputProps['onComplete'] = (code) => {\n onInputFinished(code);\n };\n\n const handleSmsHintLinkClick = () => {\n onChangeScreen('HINT');\n };\n\n const handleInputChange = () => {\n if (state === 'CODE_ERROR') {\n onChangeState('INITIAL');\n }\n };\n\n const handleSmsRetryClick = () => {\n if (inputRef.current) {\n inputRef.current.reset();\n }\n\n onSmsRetryClick();\n };\n\n const handleErrorAnimationEnd = () => {\n if (clearCodeOnError && state !== 'INITIAL') {\n onChangeState('INITIAL');\n }\n };\n\n const clearTimer = useCallback(() => {\n window.clearTimeout(timerId.current);\n }, []);\n\n useEffect(() => {\n if (inputRef.current) {\n inputRef.current.focus();\n }\n\n return () => {\n clearTimer();\n };\n }, [clearTimer]);\n\n useEffect(() => {\n if (!inputRef.current) {\n return;\n }\n\n if (prevState === 'CODE_SENDING' && state !== 'CODE_SENDING') {\n inputRef.current.focus();\n }\n }, [prevState, state, requiredCharAmount]);\n\n useLayoutEffect_SAFE_FOR_SSR(() => {\n if (prevState === 'CODE_SENDING' && state !== 'CODE_SENDING') {\n setCodeSendHintVisible(true);\n\n clearTimer();\n\n timerId.current = window.setTimeout(() => {\n setCodeSendHintVisible(false);\n }, CODE_SEND_HINT_VISIBLE_DURATION);\n }\n }, [prevState, state, clearTimer]);\n\n const getCodeInputError = (): string | boolean => {\n if (state === 'CODE_EXPIRED') {\n return texts.codeErrorExpired || true;\n }\n\n if (state === 'CODE_EXPIRED_ENDED') {\n return texts.codeErrorExpiredEnded || true;\n }\n\n if (state === 'CODE_ERROR') {\n return texts.codeError || true;\n }\n\n return false;\n };\n\n const renderHintButton = () => {\n if (initialScreenHintSlot) {\n return initialScreenHintSlot;\n }\n\n if (mobile) {\n return (\n <ButtonMobile\n onClick={handleSmsHintLinkClick}\n className={styles.smsBtn}\n view='text'\n size='xs'\n >\n {texts.linkToHint}\n </ButtonMobile>\n );\n }\n\n return (\n <Link\n onClick={handleSmsHintLinkClick}\n className={styles.smsComeLink}\n view={mobile ? 'primary' : 'secondary'}\n pseudo={true}\n >\n {texts.linkToHint}\n </Link>\n );\n };\n\n const processing = ['CODE_CHECKING', 'CODE_SENDING'].includes(state);\n\n const timePassed = timeLeft === 0;\n\n const ComponentCodeInput = mobile ? CodeInputMobile : CodeInputDesktop;\n\n return (\n <div className={cn(styles.component, styles[alignContent])}>\n <Header mobile={mobile} titleTag={titleTag}>\n {texts.title}\n </Header>\n\n {phone ? (\n <Text\n view='primary-medium'\n color='primary'\n className={cn(styles.phone, {\n [styles.typographyTheme]: !mobile,\n [styles.typographyThemeMobile]: mobile,\n })}\n >\n Отправили на {phone}\n </Text>\n ) : null}\n <ComponentCodeInput\n disabled={processing}\n error={getCodeInputError()}\n ref={inputRef}\n fields={requiredCharAmount}\n className={cn(styles.containerInput, styles.codeInput)}\n onComplete={handleInputComplete}\n onChange={handleInputChange}\n clearCodeOnError={clearCodeOnError}\n errorVisibleDuration={errorVisibleDuration}\n onErrorAnimationEnd={handleErrorAnimationEnd}\n />\n {!hideCountdownSection && (\n <CountdownSection\n processing={processing}\n timePassed={timePassed}\n codeSendHintVisible={codeSendHintVisible}\n handleSmsRetryClick={handleSmsRetryClick}\n mobile={mobile}\n />\n )}\n\n {renderHintButton()}\n </div>\n );\n};\n"],"names":[],"mappings":";;;;;;;;;;;;;AA4BA,MAAM,+BAA+B,GAAG,IAAI;MAE/B,OAAO,GAAqB,CAAC,EAAE,MAAM,EAAE,KAAI;AACpD,IAAA,MAAM,EACF,KAAK,EACL,YAAY,EACZ,QAAQ,EACR,KAAK,EACL,kBAAkB,EAClB,QAAQ,EACR,KAAK,EACL,gBAAgB,EAChB,oBAAoB,EACpB,qBAAqB,EACrB,oBAAoB,EACpB,aAAa,EACb,eAAe,EACf,cAAc,EACd,eAAe,GAClB,GAAG,UAAU,CAAC,mBAAmB,CAAC;AAEnC,IAAA,MAAM,SAAS,GAAG,WAAW,CAAC,KAAK,CAAC;AAEpC,IAAA,MAAM,QAAQ,GAAG,MAAM,CAAiB,IAAI,CAAC;IAE7C,MAAM,CAAC,mBAAmB,EAAE,sBAAsB,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC;AAErE,IAAA,MAAM,OAAO,GAAG,MAAM,CAAC,CA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,EACtB,UAAU,EAAE,UAAU,EACtB,mBAAmB,EAAE,mBAAmB,EACxC,mBAAmB,EAAE,mBAAmB,EACxC,MAAM,EAAE,MAAM,EAAA,CAChB,CACL;QAEA,gBAAgB,EAAE,CACjB;AAEd;;;;"}
@@ -1,4 +1,4 @@
1
- import { FC } from 'react';
1
+ import { type FC } from 'react';
2
2
  declare type CountdownSectionProps = {
3
3
  codeSendHintVisible: boolean;
4
4
  timePassed: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"countdown-section.js","sources":["../../../../src/components/screens/initial/countdown-section.tsx"],"sourcesContent":["import React, { FC, Fragment, ReactNode, useContext } from 'react';\nimport cn from 'classnames';\n\nimport { Button } from '@alfalab/core-components-button';\nimport { Spinner } from '@alfalab/core-components-spinner';\nimport { Text } from '@alfalab/core-components-typography';\n\nimport { ConfirmationContext } from '../../../context';\nimport { formatMsAsMinutes } from '../../../utils';\n\nimport styles from './index.module.css';\n\ntype CountdownSectionProps = {\n codeSendHintVisible: boolean;\n timePassed: boolean;\n processing: boolean;\n mobile?: boolean;\n handleSmsRetryClick: () => void;\n};\n\nexport const CountdownSection: FC<CountdownSectionProps> = ({\n codeSendHintVisible,\n timePassed,\n processing,\n mobile,\n handleSmsRetryClick,\n}) => {\n const { state, texts, timeLeft, blockSmsRetry, breakpoint, client } =\n useContext(ConfirmationContext);\n\n const renderText = (content: ReactNode) => (\n <Text\n className={cn(styles.countdownContainer, {\n [styles.countdownMobile]: mobile,\n [styles.typographyTheme]: !mobile,\n })}\n view={mobile ? 'primary-small' : 'primary-medium'}\n tag='div'\n >\n {content}\n </Text>\n );\n\n if (codeSendHintVisible) return renderText(texts.codeSended);\n\n if (processing) {\n return (\n <div\n className={cn(styles.loaderWrap, styles.countdownContainer, {\n [styles.countdownLoaderMobile]: mobile,\n [styles.typographyTheme]: !mobile,\n })}\n >\n <Spinner preset={24} visible={true} />\n\n <span className={styles.loaderText}>\n {state === 'CODE_CHECKING' ? texts.codeChecking : texts.codeSending}\n </span>\n </div>\n );\n }\n\n if (blockSmsRetry) return renderText(texts.noAttemptsLeft);\n\n if (timePassed) {\n return (\n <Button\n size={mobile ? 'xs' : 'xxs'}\n view='secondary'\n onClick={handleSmsRetryClick}\n className={cn(styles.getCodeButton, { [styles.getCodeButtonMobile]: mobile })}\n breakpoint={breakpoint}\n client={client}\n >\n {texts.buttonRetry}\n </Button>\n );\n }\n\n return renderText(\n <Fragment>\n {texts.countdown}\n {'\\u00A0'}\n <time className={styles.timeCounter}>{formatMsAsMinutes(timeLeft)}</time>\n </Fragment>,\n );\n};\n"],"names":[],"mappings":";;;;;;;;;AAoBa,MAAA,gBAAgB,GAA8B,CAAC,EACxD,mBAAmB,EACnB,UAAU,EACV,UAAU,EACV,MAAM,EACN,mBAAmB,GACtB,KAAI;AACD,IAAA,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,EAAE,GAC/D,UAAU,CAAC,mBAAmB,CAAC;AAEnC,IAAA,MAAM,UAAU,GAAG,CAAC,OAAkB,MAClC,KAAA,CAAA,aAAA,CAAC,IAAI,EAAA,EACD,SAAS,EAAE,EAAE,CAAC,MAAM,CAAC,kBAAkB,EAAE;AACrC,YAAA,CAAC,MAAM,CAAC,eAAe,GAAG,MAAM;AAChC,YAAA,CAAC,MAAM,CAAC,eAAe,GAAG,CAAC,MAAM;SACpC,CAAC,EACF,IAAI,EAAE,MAAM,GAAG,eAAe,GAAG,gBAAgB,EACjD,GAAG,EAAC,KAAK,IAER,OAAO,CACL,CACV;AAED,IAAA,IAAI,mBAAmB;AAAE,QAAA,OAAO,UAAU,CAAC,KAAK,CAAC,UAAU,CAAC;AAE5D,IAAA,IAAI,UAAU,EAAE;AACZ,QAAA,QACI,KAAA,CAAA,aAAA,CAAA,KAAA,EAAA,EACI,SAAS,EAAE,EAAE,CAAC,MAAM,CAAC,UAAU,EAAE,MAAM,CAAC,kBAAkB,EAAE;AACxD,gBAAA,CAAC,MAAM,CAAC,qBAAqB,GAAG,MAAM;AACtC,gBAAA,CAAC,MAAM,CAAC,eAAe,GAAG,CAAC,MAAM;aACpC,CAAC,EAAA;YAEF,KAAC,CAAA,aAAA,CAAA,OAAO,IAAC,MAAM,EAAE,EAAE,EAAE,OAAO,EAAE,IAAI,EAAI,CAAA;YAEtC,KAAM,CAAA,aAAA,CAAA,MAAA,EAAA,EAAA,SAAS,EAAE,MAAM,CAAC,UAAU,IAC7B,KAAK,KAAK,eAAe,GAAG,KAAK,CAAC,YAAY,GAAG,KAAK,CAAC,WAAW,CAChE,CACL;AAEb;AAED,IAAA,IAAI,aAAa;AAAE,QAAA,OAAO,UAAU,CAAC,KAAK,CAAC,cAAc,CAAC;AAE1D,IAAA,IAAI,UAAU,EAAE;QACZ,QACI,KAAC,CAAA,aAAA,CAAA,MAAM,EACH,EAAA,IAAI,EAAE,MAAM,GAAG,IAAI,GAAG,KAAK,EAC3B,IAAI,EAAC,WAAW,EAChB,OAAO,EAAE,mBAAmB,EAC5B,SAAS,EAAE,EAAE,CAAC,MAAM,CAAC,aAAa,EAAE,EAAE,CAAC,MAAM,CAAC,mBAAmB,GAAG,MAAM,EAAE,CAAC,EAC7E,UAAU,EAAE,UAAU,EACtB,MAAM,EAAE,MAAM,EAEb,EAAA,KAAK,CAAC,WAAW,CACb;AAEhB;IAED,OAAO,UAAU,CACb,KAAA,CAAA,aAAA,CAAC,QAAQ,EAAA,IAAA;AACJ,QAAA,KAAK,CAAC,SAAS;QACf,QAAQ;AACT,QAAA,KAAA,CAAA,aAAA,CAAA,MAAA,EAAA,EAAM,SAAS,EAAE,MAAM,CAAC,WAAW,EAAA,EAAG,iBAAiB,CAAC,QAAQ,CAAC,CAAQ,CAClE,CACd;AACL;;;;"}
1
+ {"version":3,"file":"countdown-section.js","sources":["../../../../src/components/screens/initial/countdown-section.tsx"],"sourcesContent":["import React, { type FC, Fragment, type ReactNode, useContext } from 'react';\nimport cn from 'classnames';\n\nimport { Button } from '@alfalab/core-components-button';\nimport { Spinner } from '@alfalab/core-components-spinner';\nimport { Text } from '@alfalab/core-components-typography';\n\nimport { ConfirmationContext } from '../../../context';\nimport { formatMsAsMinutes } from '../../../utils';\n\nimport styles from './index.module.css';\n\ntype CountdownSectionProps = {\n codeSendHintVisible: boolean;\n timePassed: boolean;\n processing: boolean;\n mobile?: boolean;\n handleSmsRetryClick: () => void;\n};\n\nexport const CountdownSection: FC<CountdownSectionProps> = ({\n codeSendHintVisible,\n timePassed,\n processing,\n mobile,\n handleSmsRetryClick,\n}) => {\n const { state, texts, timeLeft, blockSmsRetry, breakpoint, client } =\n useContext(ConfirmationContext);\n\n const renderText = (content: ReactNode) => (\n <Text\n className={cn(styles.countdownContainer, {\n [styles.countdownMobile]: mobile,\n [styles.typographyTheme]: !mobile,\n })}\n view={mobile ? 'primary-small' : 'primary-medium'}\n tag='div'\n >\n {content}\n </Text>\n );\n\n if (codeSendHintVisible) return renderText(texts.codeSended);\n\n if (processing) {\n return (\n <div\n className={cn(styles.loaderWrap, styles.countdownContainer, {\n [styles.countdownLoaderMobile]: mobile,\n [styles.typographyTheme]: !mobile,\n })}\n >\n <Spinner preset={24} visible={true} />\n\n <span className={styles.loaderText}>\n {state === 'CODE_CHECKING' ? texts.codeChecking : texts.codeSending}\n </span>\n </div>\n );\n }\n\n if (blockSmsRetry) return renderText(texts.noAttemptsLeft);\n\n if (timePassed) {\n return (\n <Button\n size={mobile ? 'xs' : 'xxs'}\n view='secondary'\n onClick={handleSmsRetryClick}\n className={cn(styles.getCodeButton, { [styles.getCodeButtonMobile]: mobile })}\n breakpoint={breakpoint}\n client={client}\n >\n {texts.buttonRetry}\n </Button>\n );\n }\n\n return renderText(\n <Fragment>\n {texts.countdown}\n {'\\u00A0'}\n <time className={styles.timeCounter}>{formatMsAsMinutes(timeLeft)}</time>\n </Fragment>,\n );\n};\n"],"names":[],"mappings":";;;;;;;;;AAoBa,MAAA,gBAAgB,GAA8B,CAAC,EACxD,mBAAmB,EACnB,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cAAc,CAAC;AAE1D,IAAA,IAAI,UAAU,EAAE;QACZ,QACI,KAAC,CAAA,aAAA,CAAA,MAAM,EACH,EAAA,IAAI,EAAE,MAAM,GAAG,IAAI,GAAG,KAAK,EAC3B,IAAI,EAAC,WAAW,EAChB,OAAO,EAAE,mBAAmB,EAC5B,SAAS,EAAE,EAAE,CAAC,MAAM,CAAC,aAAa,EAAE,EAAE,CAAC,MAAM,CAAC,mBAAmB,GAAG,MAAM,EAAE,CAAC,EAC7E,UAAU,EAAE,UAAU,EACtB,MAAM,EAAE,MAAM,EAEb,EAAA,KAAK,CAAC,WAAW,CACb;AAEhB;IAED,OAAO,UAAU,CACb,KAAA,CAAA,aAAA,CAAC,QAAQ,EAAA,IAAA;AACJ,QAAA,KAAK,CAAC,SAAS;QACf,QAAQ;AACT,QAAA,KAAA,CAAA,aAAA,CAAA,MAAA,EAAA,EAAM,SAAS,EAAE,MAAM,CAAC,WAAW,EAAA,EAAG,iBAAiB,CAAC,QAAQ,CAAC,CAAQ,CAClE,CACd;AACL;;;;"}
@@ -16,8 +16,8 @@
16
16
  --gap-32: var(--gap-2xl);
17
17
  --gap-4-neg: var(--gap-2xs-neg);
18
18
  } :root {
19
- --font-family-system: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Helvetica,
20
- sans-serif;
19
+ --font-family-system:
20
+ system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Helvetica, sans-serif;
21
21
  } :root {
22
22
  --size-xs-height: 40px;
23
23
  } :root {
@@ -26,62 +26,60 @@
26
26
  --confirmation-text-font-weight: 400;
27
27
  --confirmation-text-font-family: var(--font-family-system);
28
28
  --confirmation-text-color: var(--color-light-text-primary)
29
-
30
- /* header */
31
- } .confirmation__component_1nb2w {
29
+ } .confirmation__component_1s4y8 {
32
30
  display: flex;
33
31
  flex-direction: column;
34
- } .confirmation__phone_1nb2w.confirmation__phone_1nb2w {
32
+ } .confirmation__phone_1s4y8.confirmation__phone_1s4y8 {
35
33
  color: var(--color-light-text-primary);
36
34
  margin-bottom: var(--gap-32);
37
- } .confirmation__typographyTheme_1nb2w.confirmation__typographyTheme_1nb2w {
35
+ } .confirmation__typographyTheme_1s4y8.confirmation__typographyTheme_1s4y8 {
38
36
  font-size: var(--confirmation-text-font-size);
39
37
  line-height: var(--confirmation-text-line-height);
40
38
  font-weight: var(--confirmation-text-font-weight);
41
39
  font-family: var(--confirmation-text-font-family);
42
40
  color: var(--confirmation-text-color);
43
- } .confirmation__typographyThemeMobile_1nb2w.confirmation__typographyThemeMobile_1nb2w {
41
+ } .confirmation__typographyThemeMobile_1s4y8.confirmation__typographyThemeMobile_1s4y8 {
44
42
  color: var(--color-light-text-secondary);
45
- } .confirmation__compact_1nb2w {
43
+ } .confirmation__compact_1s4y8 {
46
44
  margin-bottom: var(--gap-24);
47
- } .confirmation__loaderWrap_1nb2w {
45
+ } .confirmation__loaderWrap_1s4y8 {
48
46
  display: flex;
49
47
  align-items: center;
50
- } .confirmation__left_1nb2w {
48
+ } .confirmation__left_1s4y8 {
51
49
  align-items: flex-start;
52
- } .confirmation__center_1nb2w {
50
+ } .confirmation__center_1s4y8 {
53
51
  align-items: center;
54
- text-align: center
55
- } .confirmation__center_1nb2w .confirmation__loaderWrap_1nb2w {
52
+ text-align: center;
53
+ } .confirmation__center_1s4y8 .confirmation__loaderWrap_1s4y8 {
56
54
  justify-content: center;
57
- } .confirmation__codeInput_1nb2w {
55
+ } .confirmation__codeInput_1s4y8 {
58
56
  margin-bottom: var(--gap-12);
59
- } .confirmation__smsBtn_1nb2w.confirmation__smsBtn_1nb2w {
57
+ } .confirmation__smsBtn_1s4y8.confirmation__smsBtn_1s4y8 {
60
58
  min-height: var(--size-xs-height);
61
- } .confirmation__smsComeLink_1nb2w.confirmation__smsComeLink_1nb2w {
59
+ } .confirmation__smsComeLink_1s4y8.confirmation__smsComeLink_1s4y8 {
62
60
  font-size: 14px;
63
61
  line-height: 20px;
64
62
  font-weight: 500;
65
- } .confirmation__countdownContainer_1nb2w.confirmation__countdownContainer_1nb2w {
63
+ } .confirmation__countdownContainer_1s4y8.confirmation__countdownContainer_1s4y8 {
66
64
  color: var(--color-light-text-secondary);
67
65
  margin-bottom: var(--gap-24);
68
- } .confirmation__countdownMobile_1nb2w.confirmation__countdownMobile_1nb2w {
66
+ } .confirmation__countdownMobile_1s4y8.confirmation__countdownMobile_1s4y8 {
69
67
  margin-bottom: var(--gap-20);
70
- } .confirmation__countdownLoaderMobile_1nb2w.confirmation__countdownLoaderMobile_1nb2w {
68
+ } .confirmation__countdownLoaderMobile_1s4y8.confirmation__countdownLoaderMobile_1s4y8 {
71
69
  margin-bottom: var(--gap-16);
72
- } .confirmation__timeCounter_1nb2w {
70
+ } .confirmation__timeCounter_1s4y8 {
73
71
  display: inline-block;
74
72
  min-width: 47px;
75
73
  color: var(--color-light-text-secondary);
76
74
  text-align: left;
77
75
  font-feature-settings: lining-nums tabular-nums;
78
76
  font-variant-numeric: lining-nums tabular-nums;
79
- } .confirmation__getCodeButton_1nb2w {
77
+ } .confirmation__getCodeButton_1s4y8 {
80
78
  position: relative;
81
79
  top: var(--gap-4-neg);
82
80
  margin-bottom: var(--gap-16);
83
- } .confirmation__getCodeButtonMobile_1nb2w {
81
+ } .confirmation__getCodeButtonMobile_1s4y8 {
84
82
  margin-bottom: var(--gap-0);
85
- } .confirmation__containerInput_1nb2w {
83
+ } .confirmation__containerInput_1s4y8 {
86
84
  min-height: 80px;
87
85
  }
@@ -1,6 +1,6 @@
1
1
  import './index.css';
2
2
 
3
- const styles = {"component":"confirmation__component_1nb2w","phone":"confirmation__phone_1nb2w","typographyTheme":"confirmation__typographyTheme_1nb2w","typographyThemeMobile":"confirmation__typographyThemeMobile_1nb2w","compact":"confirmation__compact_1nb2w","loaderWrap":"confirmation__loaderWrap_1nb2w","left":"confirmation__left_1nb2w","center":"confirmation__center_1nb2w","codeInput":"confirmation__codeInput_1nb2w","smsBtn":"confirmation__smsBtn_1nb2w","smsComeLink":"confirmation__smsComeLink_1nb2w","countdownContainer":"confirmation__countdownContainer_1nb2w","countdownMobile":"confirmation__countdownMobile_1nb2w","countdownLoaderMobile":"confirmation__countdownLoaderMobile_1nb2w","timeCounter":"confirmation__timeCounter_1nb2w","getCodeButton":"confirmation__getCodeButton_1nb2w","getCodeButtonMobile":"confirmation__getCodeButtonMobile_1nb2w","containerInput":"confirmation__containerInput_1nb2w"};
3
+ const styles = {"component":"confirmation__component_1s4y8","phone":"confirmation__phone_1s4y8","typographyTheme":"confirmation__typographyTheme_1s4y8","typographyThemeMobile":"confirmation__typographyThemeMobile_1s4y8","compact":"confirmation__compact_1s4y8","loaderWrap":"confirmation__loaderWrap_1s4y8","left":"confirmation__left_1s4y8","center":"confirmation__center_1s4y8","codeInput":"confirmation__codeInput_1s4y8","smsBtn":"confirmation__smsBtn_1s4y8","smsComeLink":"confirmation__smsComeLink_1s4y8","countdownContainer":"confirmation__countdownContainer_1s4y8","countdownMobile":"confirmation__countdownMobile_1s4y8","countdownLoaderMobile":"confirmation__countdownLoaderMobile_1s4y8","timeCounter":"confirmation__timeCounter_1s4y8","getCodeButton":"confirmation__getCodeButton_1s4y8","getCodeButtonMobile":"confirmation__getCodeButtonMobile_1s4y8","containerInput":"confirmation__containerInput_1s4y8"};
4
4
 
5
5
  export { styles as default };
6
6
  //# sourceMappingURL=index.module.css.js.map
@@ -1,4 +1,4 @@
1
- import { FC } from 'react';
1
+ import { type FC } from 'react';
2
2
  export declare type TempBlockProps = {
3
3
  /**
4
4
  * Отображать в мобильной версии экран компонента
@@ -8,7 +8,7 @@ import { Header } from '../../header/component.js';
8
8
  import styles from './index.module.css.js';
9
9
 
10
10
  const TempBlock = ({ mobile }) => {
11
- const { alignContent, texts, tempBlockDuration, onChangeScreen, onTempBlockFinished } = useContext(ConfirmationContext);
11
+ const { alignContent, titleTag, texts, tempBlockDuration, onChangeScreen, onTempBlockFinished, } = useContext(ConfirmationContext);
12
12
  const [timeLeft, startTimer] = useCountdown(tempBlockDuration);
13
13
  useEffect(() => {
14
14
  startTimer();
@@ -19,7 +19,7 @@ const TempBlock = ({ mobile }) => {
19
19
  }
20
20
  }, [timeLeft, onChangeScreen, onTempBlockFinished]);
21
21
  return (React.createElement("div", { className: cn(styles.component, styles[alignContent]) },
22
- React.createElement(Header, { mobile: mobile }, texts.tempBlockTitle),
22
+ React.createElement(Header, { mobile: mobile, titleTag: titleTag }, texts.tempBlockTitle),
23
23
  React.createElement(Text, { view: 'primary-medium', color: 'primary', className: cn(styles.description, {
24
24
  [styles.typographyTheme]: !mobile,
25
25
  [styles.typographyThemeMobile]: mobile,
@@ -1 +1 @@
1
- {"version":3,"file":"component.js","sources":["../../../../src/components/screens/temp-block/component.tsx"],"sourcesContent":["import React, { FC, useContext, useEffect } from 'react';\nimport cn from 'classnames';\n\nimport { Text } from '@alfalab/core-components-typography';\n\nimport { ConfirmationContext } from '../../../context';\nimport { formatMsAsMinutes, useCountdown } from '../../../utils';\nimport { CountdownLoader } from '../../countdown-loader';\nimport { Header } from '../../header';\n\nimport styles from './index.module.css';\n\nexport type TempBlockProps = {\n /**\n * Отображать в мобильной версии экран компонента\n */\n mobile?: boolean;\n};\n\nexport const TempBlock: FC<TempBlockProps> = ({ mobile }) => {\n const { alignContent, texts, tempBlockDuration, onChangeScreen, onTempBlockFinished } =\n useContext(ConfirmationContext);\n\n const [timeLeft, startTimer] = useCountdown(tempBlockDuration);\n\n useEffect(() => {\n startTimer();\n }, [startTimer]);\n\n useEffect(() => {\n if (timeLeft === 0 && onTempBlockFinished) {\n onTempBlockFinished();\n }\n }, [timeLeft, onChangeScreen, onTempBlockFinished]);\n\n return (\n <div className={cn(styles.component, styles[alignContent])}>\n <Header mobile={mobile}>{texts.tempBlockTitle}</Header>\n\n <Text\n view='primary-medium'\n color='primary'\n className={cn(styles.description, {\n [styles.typographyTheme]: !mobile,\n [styles.typographyThemeMobile]: mobile,\n })}\n >\n {texts.tempBlockDescription}\n </Text>\n\n <div className={cn(styles.countdownWrap, { [styles.typographyTheme]: !mobile })}>\n <CountdownLoader\n progress={1 - timeLeft / tempBlockDuration}\n className={styles.loader}\n />\n <time className={styles.timeCounter}>{formatMsAsMinutes(timeLeft)}</time>\n </div>\n </div>\n );\n};\n"],"names":[],"mappings":";;;;;;;;;MAmBa,SAAS,GAAuB,CAAC,EAAE,MAAM,EAAE,KAAI;AACxD,IAAA,MAAM,EAAE,YAAY,EAAE,KAAK,EAAE,iBAAiB,EAAE,cAAc,EAAE,mBAAmB,EAAE,GACjF,UAAU,CAAC,mBAAmB,CAAC;IAEnC,MAAM,CAAC,QAAQ,EAAE,UAAU,CAAC,GAAG,YAAY,CAAC,iBAAiB,CAAC;IAE9D,SAAS,CAAC,MAAK;AACX,QAAA,UAAU,EAAE;AAChB,KAAC,EAAE,CAAC,UAAU,CAAC,CAAC;IAEhB,SAAS,CAAC,MAAK;AACX,QAAA,IAAI,QAAQ,KAAK,CAAC,IAAI,mBAAmB,EAAE;AACvC,YAAA,mBAAmB,EAAE;AACxB;KACJ,EAAE,CAAC,QAAQ,EAAE,cAAc,EAAE,mBAAmB,CAAC,CAAC;AAEnD,IAAA,QACI,KAAA,CAAA,aAAA,CAAA,KAAA,EAAA,EAAK,SAAS,EAAE,EAAE,CAAC,MAAM,CAAC,SAAS,EAAE,MAAM,CAAC,YAAY,CAAC,CAAC,EAAA;QACtD,KAAC,CAAA,aAAA,CAAA,MAAM,IAAC,MAAM,EAAE,MAAM,EAAG,EAAA,KAAK,CAAC,cAAc,CAAU;AAEvD,QAAA,KAAA,CAAA,aAAA,CAAC,IAAI,EACD,EAAA,IAAI,EAAC,gBAAgB,EACrB,KAAK,EAAC,SAAS,EACf,SAAS,EAAE,EAAE,CAAC,MAAM,CAAC,WAAW,EAAE;AAC9B,gBAAA,CAAC,MAAM,CAAC,eAAe,GAAG,CAAC,MAAM;AACjC,gBAAA,CAAC,MAAM,CAAC,qBAAqB,GAAG,MAAM;AACzC,aAAA,CAAC,EAED,EAAA,KAAK,CAAC,oBAAoB,CACxB;AAEP,QAAA,KAAA,CAAA,aAAA,CAAA,KAAA,EAAA,EAAK,SAAS,EAAE,EAAE,CAAC,MAAM,CAAC,aAAa,EAAE,EAAE,CAAC,MAAM,CAAC,eAAe,GAAG,CAAC,MAAM,EAAE,CAAC,EAAA;AAC3E,YAAA,KAAA,CAAA,aAAA,CAAC,eAAe,EAAA,EACZ,QAAQ,EAAE,CAAC,GAAG,QAAQ,GAAG,iBAAiB,EAC1C,SAAS,EAAE,MAAM,CAAC,MAAM,EAC1B,CAAA;AACF,YAAA,KAAA,CAAA,aAAA,CAAA,MAAA,EAAA,EAAM,SAAS,EAAE,MAAM,CAAC,WAAW,EAAG,EAAA,iBAAiB,CAAC,QAAQ,CAAC,CAAQ,CACvE,CACJ;AAEd;;;;"}
1
+ {"version":3,"file":"component.js","sources":["../../../../src/components/screens/temp-block/component.tsx"],"sourcesContent":["import React, { type FC, useContext, useEffect } from 'react';\nimport cn from 'classnames';\n\nimport { Text } from '@alfalab/core-components-typography';\n\nimport { ConfirmationContext } from '../../../context';\nimport { formatMsAsMinutes, useCountdown } from '../../../utils';\nimport { CountdownLoader } from '../../countdown-loader';\nimport { Header } from '../../header';\n\nimport styles from './index.module.css';\n\nexport type TempBlockProps = {\n /**\n * Отображать в мобильной версии экран компонента\n */\n mobile?: boolean;\n};\n\nexport const TempBlock: FC<TempBlockProps> = ({ mobile }) => {\n const {\n alignContent,\n titleTag,\n texts,\n tempBlockDuration,\n onChangeScreen,\n onTempBlockFinished,\n } = useContext(ConfirmationContext);\n\n const [timeLeft, startTimer] = useCountdown(tempBlockDuration);\n\n useEffect(() => {\n startTimer();\n }, [startTimer]);\n\n useEffect(() => {\n if (timeLeft === 0 && onTempBlockFinished) {\n onTempBlockFinished();\n }\n }, [timeLeft, onChangeScreen, onTempBlockFinished]);\n\n return (\n <div className={cn(styles.component, styles[alignContent])}>\n <Header mobile={mobile} titleTag={titleTag}>\n {texts.tempBlockTitle}\n </Header>\n\n <Text\n view='primary-medium'\n color='primary'\n className={cn(styles.description, {\n [styles.typographyTheme]: !mobile,\n [styles.typographyThemeMobile]: mobile,\n })}\n >\n {texts.tempBlockDescription}\n </Text>\n\n <div className={cn(styles.countdownWrap, { [styles.typographyTheme]: !mobile })}>\n <CountdownLoader\n progress={1 - timeLeft / tempBlockDuration}\n className={styles.loader}\n />\n <time className={styles.timeCounter}>{formatMsAsMinutes(timeLeft)}</time>\n </div>\n </div>\n );\n};\n"],"names":[],"mappings":";;;;;;;;;MAmBa,SAAS,GAAuB,CAAC,EAAE,MAAM,EAAE,KAAI;AACxD,IAAA,MAAM,EACF,YAAY,EACZ,QAAQ,EACR,KAAK,EACL,iBAAiB,EACjB,cAAc,EACd,mBAAmB,GACtB,GAAG,UAAU,CAAC,mBAAmB,CAAC;IAEnC,MAAM,CAAC,QAAQ,EAAE,UAAU,CAAC,GAAG,YAAY,CAAC,iBAAiB,CAAC;IAE9D,SAAS,CAAC,MAAK;AACX,QAAA,UAAU,EAAE;AAChB,KAAC,EAAE,CAAC,UAAU,CAAC,CAAC;IAEhB,SAAS,CAAC,MAAK;AACX,QAAA,IAAI,QAAQ,KAAK,CAAC,IAAI,mBAAmB,EAAE;AACvC,YAAA,mBAAmB,EAAE;AACxB;KACJ,EAAE,CAAC,QAAQ,EAAE,cAAc,EAAE,mBAAmB,CAAC,CAAC;AAEnD,IAAA,QACI,KAAA,CAAA,aAAA,CAAA,KAAA,EAAA,EAAK,SAAS,EAAE,EAAE,CAAC,MAAM,CAAC,SAAS,EAAE,MAAM,CAAC,YAAY,CAAC,CAAC,EAAA;AACtD,QAAA,KAAA,CAAA,aAAA,CAAC,MAAM,EAAA,EAAC,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,QAAQ,EAAA,EACrC,KAAK,CAAC,cAAc,CAChB;AAET,QAAA,KAAA,CAAA,aAAA,CAAC,IAAI,EACD,EAAA,IAAI,EAAC,gBAAgB,EACrB,KAAK,EAAC,SAAS,EACf,SAAS,EAAE,EAAE,CAAC,MAAM,CAAC,WAAW,EAAE;AAC9B,gBAAA,CAAC,MAAM,CAAC,eAAe,GAAG,CAAC,MAAM;AACjC,gBAAA,CAAC,MAAM,CAAC,qBAAqB,GAAG,MAAM;AACzC,aAAA,CAAC,EAED,EAAA,KAAK,CAAC,oBAAoB,CACxB;AAEP,QAAA,KAAA,CAAA,aAAA,CAAA,KAAA,EAAA,EAAK,SAAS,EAAE,EAAE,CAAC,MAAM,CAAC,aAAa,EAAE,EAAE,CAAC,MAAM,CAAC,eAAe,GAAG,CAAC,MAAM,EAAE,CAAC,EAAA;AAC3E,YAAA,KAAA,CAAA,aAAA,CAAC,eAAe,EAAA,EACZ,QAAQ,EAAE,CAAC,GAAG,QAAQ,GAAG,iBAAiB,EAC1C,SAAS,EAAE,MAAM,CAAC,MAAM,EAC1B,CAAA;AACF,YAAA,KAAA,CAAA,aAAA,CAAA,MAAA,EAAA,EAAM,SAAS,EAAE,MAAM,CAAC,WAAW,EAAG,EAAA,iBAAiB,CAAC,QAAQ,CAAC,CAAQ,CACvE,CACJ;AAEd;;;;"}
@@ -5,42 +5,40 @@
5
5
  --gap-xs: 8px;
6
6
  --gap-8: var(--gap-xs);
7
7
  } :root {
8
- --font-family-system: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Helvetica,
9
- sans-serif;
8
+ --font-family-system:
9
+ system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Helvetica, sans-serif;
10
10
  } :root {
11
11
  --confirmation-text-font-size: 16px;
12
12
  --confirmation-text-line-height: 24px;
13
13
  --confirmation-text-font-weight: 400;
14
14
  --confirmation-text-font-family: var(--font-family-system);
15
15
  --confirmation-text-color: var(--color-light-text-primary)
16
-
17
- /* header */
18
- } .confirmation__component_vppvo {
16
+ } .confirmation__component_10jl7 {
19
17
  display: flex;
20
18
  flex-direction: column;
21
- } .confirmation__center_vppvo {
19
+ } .confirmation__center_10jl7 {
22
20
  align-items: center;
23
21
  text-align: center;
24
- } .confirmation__typographyTheme_vppvo.confirmation__typographyTheme_vppvo {
22
+ } .confirmation__typographyTheme_10jl7.confirmation__typographyTheme_10jl7 {
25
23
  font-size: var(--confirmation-text-font-size);
26
24
  line-height: var(--confirmation-text-line-height);
27
25
  font-weight: var(--confirmation-text-font-weight);
28
26
  font-family: var(--confirmation-text-font-family);
29
27
  color: var(--confirmation-text-color);
30
- } .confirmation__typographyThemeMobile_vppvo.confirmation__typographyThemeMobile_vppvo {
28
+ } .confirmation__typographyThemeMobile_10jl7.confirmation__typographyThemeMobile_10jl7 {
31
29
  color: var(--color-light-text-secondary);
32
- } .confirmation__description_vppvo.confirmation__description_vppvo {
30
+ } .confirmation__description_10jl7.confirmation__description_10jl7 {
33
31
  margin-bottom: var(--gap-8);
34
- } .confirmation__countdownWrap_vppvo {
32
+ } .confirmation__countdownWrap_10jl7 {
35
33
  display: flex;
36
34
  align-items: center;
37
- } .confirmation__timeCounter_vppvo {
35
+ } .confirmation__timeCounter_10jl7 {
38
36
  display: inline-block;
39
37
  min-width: 47px;
40
38
  color: var(--color-light-text-secondary);
41
39
  text-align: left;
42
40
  font-feature-settings: lining-nums tabular-nums;
43
41
  font-variant-numeric: lining-nums tabular-nums;
44
- } .confirmation__loader_vppvo {
42
+ } .confirmation__loader_10jl7 {
45
43
  margin-right: var(--gap-8);
46
44
  }
@@ -1,6 +1,6 @@
1
1
  import './index.css';
2
2
 
3
- const styles = {"component":"confirmation__component_vppvo","center":"confirmation__center_vppvo","typographyTheme":"confirmation__typographyTheme_vppvo","typographyThemeMobile":"confirmation__typographyThemeMobile_vppvo","description":"confirmation__description_vppvo","countdownWrap":"confirmation__countdownWrap_vppvo","timeCounter":"confirmation__timeCounter_vppvo","loader":"confirmation__loader_vppvo"};
3
+ const styles = {"component":"confirmation__component_10jl7","center":"confirmation__center_10jl7","typographyTheme":"confirmation__typographyTheme_10jl7","typographyThemeMobile":"confirmation__typographyThemeMobile_10jl7","description":"confirmation__description_10jl7","countdownWrap":"confirmation__countdownWrap_10jl7","timeCounter":"confirmation__timeCounter_10jl7","loader":"confirmation__loader_10jl7"};
4
4
 
5
5
  export { styles as default };
6
6
  //# sourceMappingURL=index.module.css.js.map
@@ -1,4 +1,4 @@
1
- import { FC } from 'react';
1
+ import { type FC } from 'react';
2
2
  export declare type TempBlockOverProps = {
3
3
  /**
4
4
  * Отображать в мобильной версии экран компонента
@@ -7,13 +7,13 @@ import { Header } from '../../header/component.js';
7
7
  import styles from './index.module.css.js';
8
8
 
9
9
  const TempBlockOver = ({ mobile }) => {
10
- const { alignContent, texts, breakpoint, client, onChangeScreen, onChangeState } = useContext(ConfirmationContext);
10
+ const { alignContent, titleTag, texts, breakpoint, client, onChangeScreen, onChangeState } = useContext(ConfirmationContext);
11
11
  const handleReturnButtonClick = () => {
12
12
  onChangeScreen('INITIAL');
13
13
  onChangeState('INITIAL');
14
14
  };
15
15
  return (React.createElement("div", { className: cn(styles.component, styles[alignContent]) },
16
- React.createElement(Header, { mobile: mobile }, texts.tempBlockOverTitle),
16
+ React.createElement(Header, { mobile: mobile, titleTag: titleTag }, texts.tempBlockOverTitle),
17
17
  React.createElement(Text, { view: 'primary-medium', color: 'primary', className: cn(styles.description, {
18
18
  [styles.typographyTheme]: !mobile,
19
19
  [styles.typographyThemeMobile]: mobile,
@@ -1 +1 @@
1
- {"version":3,"file":"component.js","sources":["../../../../src/components/screens/temp-block-over/component.tsx"],"sourcesContent":["import React, { FC, useContext } from 'react';\nimport cn from 'classnames';\n\nimport { Button } from '@alfalab/core-components-button';\nimport { Text } from '@alfalab/core-components-typography';\n\nimport { ConfirmationContext } from '../../../context';\nimport { Header } from '../../header';\n\nimport styles from './index.module.css';\n\nexport type TempBlockOverProps = {\n /**\n * Отображать в мобильной версии экран компонента\n */\n mobile?: boolean;\n};\n\nexport const TempBlockOver: FC<TempBlockOverProps> = ({ mobile }) => {\n const { alignContent, texts, breakpoint, client, onChangeScreen, onChangeState } =\n useContext(ConfirmationContext);\n\n const handleReturnButtonClick = () => {\n onChangeScreen('INITIAL');\n onChangeState('INITIAL');\n };\n\n return (\n <div className={cn(styles.component, styles[alignContent])}>\n <Header mobile={mobile}>{texts.tempBlockOverTitle}</Header>\n\n <Text\n view='primary-medium'\n color='primary'\n className={cn(styles.description, {\n [styles.typographyTheme]: !mobile,\n [styles.typographyThemeMobile]: mobile,\n })}\n >\n {texts.tempBlockOverDescription}\n </Text>\n\n <Button\n size={mobile ? 'xs' : 's'}\n view='secondary'\n onClick={handleReturnButtonClick}\n className={styles.button}\n breakpoint={breakpoint}\n client={client}\n >\n {texts.tempBlockOverButton}\n </Button>\n </div>\n );\n};\n"],"names":[],"mappings":";;;;;;;;MAkBa,aAAa,GAA2B,CAAC,EAAE,MAAM,EAAE,KAAI;AAChE,IAAA,MAAM,EAAE,YAAY,EAAE,KAAK,EAAE,UAAU,EAAE,MAAM,EAAE,cAAc,EAAE,aAAa,EAAE,GAC5E,UAAU,CAAC,mBAAmB,CAAC;IAEnC,MAAM,uBAAuB,GAAG,MAAK;QACjC,cAAc,CAAC,SAAS,CAAC;QACzB,aAAa,CAAC,SAAS,CAAC;AAC5B,KAAC;AAED,IAAA,QACI,KAAA,CAAA,aAAA,CAAA,KAAA,EAAA,EAAK,SAAS,EAAE,EAAE,CAAC,MAAM,CAAC,SAAS,EAAE,MAAM,CAAC,YAAY,CAAC,CAAC,EAAA;QACtD,KAAC,CAAA,aAAA,CAAA,MAAM,IAAC,MAAM,EAAE,MAAM,EAAG,EAAA,KAAK,CAAC,kBAAkB,CAAU;AAE3D,QAAA,KAAA,CAAA,aAAA,CAAC,IAAI,EACD,EAAA,IAAI,EAAC,gBAAgB,EACrB,KAAK,EAAC,SAAS,EACf,SAAS,EAAE,EAAE,CAAC,MAAM,CAAC,WAAW,EAAE;AAC9B,gBAAA,CAAC,MAAM,CAAC,eAAe,GAAG,CAAC,MAAM;AACjC,gBAAA,CAAC,MAAM,CAAC,qBAAqB,GAAG,MAAM;AACzC,aAAA,CAAC,EAED,EAAA,KAAK,CAAC,wBAAwB,CAC5B;AAEP,QAAA,KAAA,CAAA,aAAA,CAAC,MAAM,EACH,EAAA,IAAI,EAAE,MAAM,GAAG,IAAI,GAAG,GAAG,EACzB,IAAI,EAAC,WAAW,EAChB,OAAO,EAAE,uBAAuB,EAChC,SAAS,EAAE,MAAM,CAAC,MAAM,EACxB,UAAU,EAAE,UAAU,EACtB,MAAM,EAAE,MAAM,IAEb,KAAK,CAAC,mBAAmB,CACrB,CACP;AAEd;;;;"}
1
+ {"version":3,"file":"component.js","sources":["../../../../src/components/screens/temp-block-over/component.tsx"],"sourcesContent":["import React, { type FC, useContext } from 'react';\nimport cn from 'classnames';\n\nimport { Button } from '@alfalab/core-components-button';\nimport { Text } from '@alfalab/core-components-typography';\n\nimport { ConfirmationContext } from '../../../context';\nimport { Header } from '../../header';\n\nimport styles from './index.module.css';\n\nexport type TempBlockOverProps = {\n /**\n * Отображать в мобильной версии экран компонента\n */\n mobile?: boolean;\n};\n\nexport const TempBlockOver: FC<TempBlockOverProps> = ({ mobile }) => {\n const { alignContent, titleTag, texts, breakpoint, client, onChangeScreen, onChangeState } =\n useContext(ConfirmationContext);\n\n const handleReturnButtonClick = () => {\n onChangeScreen('INITIAL');\n onChangeState('INITIAL');\n };\n\n return (\n <div className={cn(styles.component, styles[alignContent])}>\n <Header mobile={mobile} titleTag={titleTag}>\n {texts.tempBlockOverTitle}\n </Header>\n\n <Text\n view='primary-medium'\n color='primary'\n className={cn(styles.description, {\n [styles.typographyTheme]: !mobile,\n [styles.typographyThemeMobile]: mobile,\n })}\n >\n {texts.tempBlockOverDescription}\n </Text>\n\n <Button\n size={mobile ? 'xs' : 's'}\n view='secondary'\n onClick={handleReturnButtonClick}\n className={styles.button}\n breakpoint={breakpoint}\n client={client}\n >\n {texts.tempBlockOverButton}\n </Button>\n </div>\n );\n};\n"],"names":[],"mappings":";;;;;;;;MAkBa,aAAa,GAA2B,CAAC,EAAE,MAAM,EAAE,KAAI;IAChE,MAAM,EAAE,YAAY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etica,
9
- sans-serif;
8
+ --font-family-system:
9
+ system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Helvetica, sans-serif;
10
10
  } :root {
11
11
  --confirmation-text-font-size: 16px;
12
12
  --confirmation-text-line-height: 24px;
13
13
  --confirmation-text-font-weight: 400;
14
14
  --confirmation-text-font-family: var(--font-family-system);
15
15
  --confirmation-text-color: var(--color-light-text-primary)
16
-
17
- /* header */
18
- } .confirmation__component_1biyi {
16
+ } .confirmation__component_1a8b9 {
19
17
  display: flex;
20
18
  flex-direction: column;
21
- } .confirmation__center_1biyi {
19
+ } .confirmation__center_1a8b9 {
22
20
  align-items: center;
23
21
  text-align: center;
24
- } .confirmation__typographyTheme_1biyi.confirmation__typographyTheme_1biyi {
22
+ } .confirmation__typographyTheme_1a8b9.confirmation__typographyTheme_1a8b9 {
25
23
  font-size: var(--confirmation-text-font-size);
26
24
  line-height: var(--confirmation-text-line-height);
27
25
  font-weight: var(--confirmation-text-font-weight);
28
26
  font-family: var(--confirmation-text-font-family);
29
27
  color: var(--confirmation-text-color);
30
- } .confirmation__typographyThemeMobile_1biyi.confirmation__typographyThemeMobile_1biyi {
28
+ } .confirmation__typographyThemeMobile_1a8b9.confirmation__typographyThemeMobile_1a8b9 {
31
29
  color: var(--color-light-text-secondary);
32
- } .confirmation__button_1biyi.confirmation__button_1biyi {
30
+ } .confirmation__button_1a8b9.confirmation__button_1a8b9 {
33
31
  margin-top: var(--gap-32);
34
32
  }
@@ -1,6 +1,6 @@
1
1
  import './index.css';
2
2
 
3
- const styles = {"component":"confirmation__component_1biyi","center":"confirmation__center_1biyi","typographyTheme":"confirmation__typographyTheme_1biyi","typographyThemeMobile":"confirmation__typographyThemeMobile_1biyi","button":"confirmation__button_1biyi"};
3
+ const styles = {"component":"confirmation__component_1a8b9","center":"confirmation__center_1a8b9","typographyTheme":"confirmation__typographyTheme_1a8b9","typographyThemeMobile":"confirmation__typographyThemeMobile_1a8b9","button":"confirmation__button_1a8b9"};
4
4
 
5
5
  export { styles as default };
6
6
  //# sourceMappingURL=index.module.css.js.map
@@ -1,3 +1,3 @@
1
1
  /// <reference types="react" />
2
- import { TConfirmationContext } from './types';
2
+ import { type TConfirmationContext } from './types';
3
3
  export declare const ConfirmationContext: import("react").Context<TConfirmationContext>;
package/modern/context.js CHANGED
@@ -4,6 +4,7 @@ import { ONE_DAY, ONE_MINUTE } from './utils.js';
4
4
  const mockFn = () => undefined;
5
5
  const ConfirmationContext = createContext({
6
6
  alignContent: 'left',
7
+ titleTag: 'h3',
7
8
  texts: {},
8
9
  state: 'INITIAL',
9
10
  screen: 'INITIAL',
@@ -1 +1 @@
1
- {"version":3,"file":"context.js","sources":["../src/context.ts"],"sourcesContent":["import { createContext } from 'react';\n\nimport { TConfirmationContext } from './types';\nimport { ONE_DAY, ONE_MINUTE } from './utils';\n\nconst mockFn = () => undefined;\n\nexport const ConfirmationContext = createContext<TConfirmationContext>({\n alignContent: 'left',\n texts: {},\n state: 'INITIAL',\n screen: 'INITIAL',\n requiredCharAmount: 5,\n countdownDuration: ONE_MINUTE,\n timeLeft: ONE_MINUTE,\n tempBlockDuration: ONE_DAY,\n phone: '',\n hideCountdownSection: false,\n breakpoint: 1024,\n client: 'desktop',\n initialScreenHintSlot: null,\n onTempBlockFinished: mockFn,\n onInputFinished: mockFn,\n onChangeState: mockFn,\n onSmsRetryClick: mockFn,\n onChangeScreen: mockFn,\n onFatalErrorOkButtonClick: mockFn,\n});\n"],"names":[],"mappings":";;;AAKA,MAAM,MAAM,GAAG,MAAM,SAAS;AAEvB,MAAM,mBAAmB,GAAG,aAAa,CAAuB;AACnE,IAAA,YAAY,EAAE,MAAM;AACpB,IAAA,KAAK,EAAE,EAAE;AACT,IAAA,KAAK,EAAE,SAAS;AAChB,IAAA,MAAM,EAAE,SAAS;AACjB,IAAA,kBAAkB,EAAE,CAAC;AACrB,IAAA,iBAAiB,EAAE,UAAU;AAC7B,IAAA,QAAQ,EAAE,UAAU;AACpB,IAAA,iBAAiB,EAAE,OAAO;AAC1B,IAAA,KAAK,EAAE,EAAE;AACT,IAAA,oBAAoB,EAAE,KAAK;AAC3B,IAAA,UAAU,EAAE,IAAI;AAChB,IAAA,MAAM,EAAE,SAAS;AACjB,IAAA,qBAAqB,EAAE,IAAI;AAC3B,IAAA,mBAAmB,EAAE,MAAM;AAC3B,IAAA,eAAe,EAAE,MAAM;AACvB,IAAA,aAAa,EAAE,MAAM;AACrB,IAAA,eAAe,EAAE,MAAM;AACvB,IAAA,cAAc,EAAE,MAAM;AACtB,IAAA,yBAAyB,EAAE,MAAM;AACpC,CAAA;;;;"}
1
+ {"version":3,"file":"context.js","sources":["../src/context.ts"],"sourcesContent":["import { createContext } from 'react';\n\nimport { type TConfirmationContext } from './types';\nimport { ONE_DAY, ONE_MINUTE } from './utils';\n\nconst mockFn = () => undefined;\n\nexport const ConfirmationContext = createContext<TConfirmationContext>({\n alignContent: 'left',\n titleTag: 'h3',\n texts: {},\n state: 'INITIAL',\n screen: 'INITIAL',\n requiredCharAmount: 5,\n countdownDuration: ONE_MINUTE,\n timeLeft: ONE_MINUTE,\n tempBlockDuration: ONE_DAY,\n phone: '',\n hideCountdownSection: false,\n breakpoint: 1024,\n client: 'desktop',\n initialScreenHintSlot: null,\n onTempBlockFinished: mockFn,\n onInputFinished: mockFn,\n onChangeState: mockFn,\n onSmsRetryClick: mockFn,\n onChangeScreen: mockFn,\n onFatalErrorOkButtonClick: mockFn,\n});\n"],"names":[],"mappings":";;;AAKA,MAAM,MAAM,GAAG,MAAM,SAAS;AAEvB,MAAM,mBAAmB,GAAG,aAAa,CAAuB;AACnE,IAAA,YAAY,EAAE,MAAM;AACpB,IAAA,QAAQ,EAAE,IAAI;AACd,IAAA,KAAK,EAAE,EAAE;AACT,IAAA,KAAK,EAAE,SAAS;AAChB,IAAA,MAAM,EAAE,SAAS;AACjB,IAAA,kBAAkB,EAAE,CAAC;AACrB,IAAA,iBAAiB,EAAE,UAAU;AAC7B,IAAA,QAAQ,EAAE,UAAU;AACpB,IAAA,iBAAiB,EAAE,OAAO;AAC1B,IAAA,KAAK,EAAE,EAAE;AACT,IAAA,oBAAoB,EAAE,KAAK;AAC3B,IAAA,UAAU,EAAE,IAAI;AAChB,IAAA,MAAM,EAAE,SAAS;AACjB,IAAA,qBAAqB,EAAE,IAAI;AAC3B,IAAA,mBAAmB,EAAE,MAAM;AAC3B,IAAA,eAAe,EAAE,MAAM;AACvB,IAAA,aAAa,EAAE,MAAM;AACrB,IAAA,eAAe,EAAE,MAAM;AACvB,IAAA,cAAc,EAAE,MAAM;AACtB,IAAA,yBAAyB,EAAE,MAAM;AACpC,CAAA;;;;"}
@@ -1,4 +1,4 @@
1
- import { FC } from 'react';
2
- import { ConfirmationProps } from '../types';
1
+ import { type FC } from 'react';
2
+ import { type ConfirmationProps } from '../types';
3
3
  export declare type DesktopConfirmationProps = Omit<ConfirmationProps, 'mobile' | 'breakpoint'>;
4
4
  export declare const ConfirmationDesktop: FC<DesktopConfirmationProps>;
@@ -1 +1 @@
1
- {"version":3,"file":"component.desktop.js","sources":["../../src/desktop/component.desktop.tsx"],"sourcesContent":["import React, { FC } from 'react';\n\nimport { BaseConfirmation } from '../components/base-confirmation';\nimport { ConfirmationProps } from '../types';\n\nexport type DesktopConfirmationProps = Omit<ConfirmationProps, 'mobile' | 'breakpoint'>;\n\nexport const ConfirmationDesktop: FC<DesktopConfirmationProps> = (props) => (\n <BaseConfirmation {...props} />\n);\n"],"names":[],"mappings":";;;AAOa,MAAA,mBAAmB,GAAiC,CAAC,KAAK,MACnE,oBAAC,gBAAgB,EAAA,EAAA,GAAK,KAAK,EAAA,CAAI;;;;"}
1
+ {"version":3,"file":"component.desktop.js","sources":["../../src/desktop/component.desktop.tsx"],"sourcesContent":["import React, { type FC } from 'react';\n\nimport { BaseConfirmation } from '../components/base-confirmation';\nimport { type ConfirmationProps } from '../types';\n\nexport type DesktopConfirmationProps = Omit<ConfirmationProps, 'mobile' | 'breakpoint'>;\n\nexport const ConfirmationDesktop: FC<DesktopConfirmationProps> = (props) => (\n <BaseConfirmation {...props} />\n);\n"],"names":[],"mappings":";;;AAOa,MAAA,mBAAmB,GAAiC,CAAC,KAAK,MACnE,oBAAC,gBAAgB,EAAA,EAAA,GAAK,KAAK,EAAA,CAAI;;;;"}
@@ -1,4 +1,4 @@
1
- import { FC } from 'react';
2
- import { ConfirmationProps } from '../types';
1
+ import { type FC } from 'react';
2
+ import { type ConfirmationProps } from '../types';
3
3
  export declare type MobileConfirmationProps = Omit<ConfirmationProps, 'mobile'>;
4
4
  export declare const ConfirmationMobile: FC<MobileConfirmationProps>;
@@ -1 +1 @@
1
- {"version":3,"file":"component.mobile.js","sources":["../../src/mobile/component.mobile.tsx"],"sourcesContent":["import React, { FC } from 'react';\nimport cn from 'classnames';\n\nimport { BaseConfirmation } from '../components/base-confirmation';\nimport { ConfirmationProps } from '../types';\n\nimport styles from './mobile.module.css';\n\nexport type MobileConfirmationProps = Omit<ConfirmationProps, 'mobile'>;\n\nexport const ConfirmationMobile: FC<MobileConfirmationProps> = ({ className, ...resProps }) => (\n <BaseConfirmation mobile={true} className={cn(className, styles.container)} {...resProps} />\n);\n"],"names":[],"mappings":";;;;;AAUa,MAAA,kBAAkB,GAAgC,CAAC,EAAE,SAAS,EAAE,GAAG,QAAQ,EAAE,MACtF,oBAAC,gBAAgB,EAAA,EAAC,MAAM,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE,CAAC,SAAS,EAAE,MAAM,CAAC,SAAS,CAAC,EAAA,GAAM,QAAQ,EAAA,CAAI;;;;"}
1
+ {"version":3,"file":"component.mobile.js","sources":["../../src/mobile/component.mobile.tsx"],"sourcesContent":["import React, { type FC } from 'react';\nimport cn from 'classnames';\n\nimport { BaseConfirmation } from '../components/base-confirmation';\nimport { type ConfirmationProps } from '../types';\n\nimport styles from './mobile.module.css';\n\nexport type MobileConfirmationProps = Omit<ConfirmationProps, 'mobile'>;\n\nexport const ConfirmationMobile: FC<MobileConfirmationProps> = ({ className, ...resProps }) => (\n <BaseConfirmation mobile={true} className={cn(className, styles.container)} {...resProps} />\n);\n"],"names":[],"mappings":";;;;;AAUa,MAAA,kBAAkB,GAAgC,CAAC,EAAE,SAAS,EAAE,GAAG,QAAQ,EAAE,MACtF,oBAAC,gBAAgB,EAAA,EAAC,MAAM,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE,CAAC,SAAS,EAAE,MAAM,CAAC,SAAS,CAAC,EAAA,GAAM,QAAQ,EAAA,CAAI;;;;"}
@@ -1,3 +1,3 @@
1
- .confirmation__container_gb4w9 {
1
+ .confirmation__container_bh9k2 {
2
2
  max-width: 288px;
3
3
  }
@@ -1,6 +1,6 @@
1
1
  import './mobile.css';
2
2
 
3
- const styles = {"container":"confirmation__container_gb4w9"};
3
+ const styles = {"container":"confirmation__container_bh9k2"};
4
4
 
5
5
  export { styles as default };
6
6
  //# sourceMappingURL=mobile.module.css.js.map