@redneckz/wildless-cms-uni-blocks 0.10.6 → 0.10.8

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 (650) hide show
  1. package/bundle/blocks.schema.json +1 -1
  2. package/bundle/bundle.umd.js +255 -304
  3. package/bundle/bundle.umd.min.js +1 -1
  4. package/bundle/components/Calculator/Rate.d.ts +1 -0
  5. package/bundle/components/Calculator/renderBinaryRadioButtonGroup.d.ts +11 -0
  6. package/bundle/components/Calculator/renderDaysInput.d.ts +2 -7
  7. package/bundle/components/Calculator/renderInterestPayment.d.ts +2 -9
  8. package/bundle/components/Calculator/renderMonthsInput.d.ts +3 -5
  9. package/bundle/components/Calculator/renderPaymentType.d.ts +2 -11
  10. package/bundle/components/Calculator/renderRegistrationType.d.ts +2 -9
  11. package/bundle/components/Calculator/renderWantedSumInput.d.ts +3 -7
  12. package/bundle/components/Carousel/itemsGap.d.ts +1 -0
  13. package/bundle/components/Carousel/itemsGap.mobile.d.ts +1 -0
  14. package/bundle/components/CarouselRecommendationCard/CarouselRecommendationCard.mobile.d.ts +5 -0
  15. package/bundle/components/CarouselRecommendationCard/cardStyle.d.ts +1 -0
  16. package/bundle/components/CarouselTariffsCard/descriptionSize.d.ts +1 -0
  17. package/bundle/components/CarouselTariffsCard/descriptionSize.mobile.d.ts +1 -0
  18. package/bundle/components/CarouselTariffsCard/getPaddingStyle.d.ts +1 -0
  19. package/bundle/components/CarouselTariffsCard/getPaddingStyle.mobile.d.ts +1 -0
  20. package/bundle/components/CarouselTariffsCard/renderCardInfo.d.ts +3 -0
  21. package/bundle/components/Headline/headlineVersionStyles.d.ts +1 -1
  22. package/bundle/components/Tabs/CenteredTabs.d.ts +7 -0
  23. package/bundle/components/Tabs/LinkTab.d.ts +2 -2
  24. package/bundle/components/Tabs/TabsContent.d.ts +3 -2
  25. package/bundle/components/Tabs/renderGroupTab.d.ts +2 -2
  26. package/bundle/components/Tabs/renderTab.d.ts +3 -3
  27. package/bundle/components/Tabs/tabItemClasses.d.ts +3 -2
  28. package/bundle/ui-kit/InputRange/InputRangeProps.d.ts +1 -0
  29. package/bundle/ui-kit/InputRange/parseDecimal.d.ts +1 -0
  30. package/bundle/ui-kit/InputRange/renderRangeWithTicks.d.ts +12 -0
  31. package/dist/components/ApplicationForm/ApplicationForm.js +1 -1
  32. package/dist/components/ApplicationForm/ApplicationForm.js.map +1 -1
  33. package/dist/components/Blocks.mobile.js +6 -0
  34. package/dist/components/Blocks.mobile.js.map +1 -1
  35. package/dist/components/Calculator/BonusCalculatorForm.js +16 -18
  36. package/dist/components/Calculator/BonusCalculatorForm.js.map +1 -1
  37. package/dist/components/Calculator/BusinessDepositCalculatorForm.js +24 -30
  38. package/dist/components/Calculator/BusinessDepositCalculatorForm.js.map +1 -1
  39. package/dist/components/Calculator/Calculator.js +4 -4
  40. package/dist/components/Calculator/Calculator.js.map +1 -1
  41. package/dist/components/Calculator/CreditCalculatorForm.js +27 -43
  42. package/dist/components/Calculator/CreditCalculatorForm.js.map +1 -1
  43. package/dist/components/Calculator/DepositCalculatorForm.js +30 -33
  44. package/dist/components/Calculator/DepositCalculatorForm.js.map +1 -1
  45. package/dist/components/Calculator/Rate.d.ts +1 -0
  46. package/dist/components/Calculator/Rate.js +1 -1
  47. package/dist/components/Calculator/Rate.js.map +1 -1
  48. package/dist/components/Calculator/renderBinaryRadioButtonGroup.d.ts +11 -0
  49. package/dist/components/Calculator/renderBinaryRadioButtonGroup.js +8 -0
  50. package/dist/components/Calculator/renderBinaryRadioButtonGroup.js.map +1 -0
  51. package/dist/components/Calculator/renderDaysInput.d.ts +2 -7
  52. package/dist/components/Calculator/renderDaysInput.js +2 -9
  53. package/dist/components/Calculator/renderDaysInput.js.map +1 -1
  54. package/dist/components/Calculator/renderInterestPayment.d.ts +2 -9
  55. package/dist/components/Calculator/renderInterestPayment.js +8 -18
  56. package/dist/components/Calculator/renderInterestPayment.js.map +1 -1
  57. package/dist/components/Calculator/renderMonthsInput.d.ts +3 -5
  58. package/dist/components/Calculator/renderMonthsInput.js +2 -10
  59. package/dist/components/Calculator/renderMonthsInput.js.map +1 -1
  60. package/dist/components/Calculator/renderPaymentType.d.ts +2 -11
  61. package/dist/components/Calculator/renderPaymentType.js +9 -19
  62. package/dist/components/Calculator/renderPaymentType.js.map +1 -1
  63. package/dist/components/Calculator/renderRegistrationType.d.ts +2 -9
  64. package/dist/components/Calculator/renderRegistrationType.js +8 -18
  65. package/dist/components/Calculator/renderRegistrationType.js.map +1 -1
  66. package/dist/components/Calculator/renderWantedSumInput.d.ts +3 -7
  67. package/dist/components/Calculator/renderWantedSumInput.js +4 -6
  68. package/dist/components/Calculator/renderWantedSumInput.js.map +1 -1
  69. package/dist/components/Calculator/useDepositCalculatorParams.js +1 -1
  70. package/dist/components/Calculator/useDepositCalculatorParams.js.map +1 -1
  71. package/dist/components/Carousel/Carousel.js +3 -3
  72. package/dist/components/Carousel/Carousel.js.map +1 -1
  73. package/dist/components/Carousel/itemsGap.d.ts +1 -0
  74. package/dist/components/Carousel/itemsGap.js +4 -0
  75. package/dist/components/Carousel/itemsGap.js.map +1 -0
  76. package/dist/components/Carousel/itemsGap.mobile.d.ts +1 -0
  77. package/dist/components/Carousel/itemsGap.mobile.js +4 -0
  78. package/dist/components/Carousel/itemsGap.mobile.js.map +1 -0
  79. package/dist/components/CarouselRecommendationCard/CarouselRecommendationCard.js +2 -2
  80. package/dist/components/CarouselRecommendationCard/CarouselRecommendationCard.js.map +1 -1
  81. package/dist/components/CarouselRecommendationCard/CarouselRecommendationCard.mobile.d.ts +5 -0
  82. package/dist/components/CarouselRecommendationCard/CarouselRecommendationCard.mobile.js +17 -0
  83. package/dist/components/CarouselRecommendationCard/CarouselRecommendationCard.mobile.js.map +1 -0
  84. package/dist/components/CarouselRecommendationCard/cardStyle.d.ts +1 -0
  85. package/dist/components/CarouselRecommendationCard/cardStyle.js +4 -0
  86. package/dist/components/CarouselRecommendationCard/cardStyle.js.map +1 -0
  87. package/dist/components/CarouselTariffsCard/CarouselTariffsCard.js +6 -10
  88. package/dist/components/CarouselTariffsCard/CarouselTariffsCard.js.map +1 -1
  89. package/dist/components/CarouselTariffsCard/descriptionSize.d.ts +1 -0
  90. package/dist/components/CarouselTariffsCard/descriptionSize.js +4 -0
  91. package/dist/components/CarouselTariffsCard/descriptionSize.js.map +1 -0
  92. package/dist/components/CarouselTariffsCard/descriptionSize.mobile.d.ts +1 -0
  93. package/dist/components/CarouselTariffsCard/descriptionSize.mobile.js +4 -0
  94. package/dist/components/CarouselTariffsCard/descriptionSize.mobile.js.map +1 -0
  95. package/dist/components/CarouselTariffsCard/getPaddingStyle.d.ts +1 -0
  96. package/dist/components/CarouselTariffsCard/getPaddingStyle.js +5 -0
  97. package/dist/components/CarouselTariffsCard/getPaddingStyle.js.map +1 -0
  98. package/dist/components/CarouselTariffsCard/getPaddingStyle.mobile.d.ts +1 -0
  99. package/dist/components/CarouselTariffsCard/getPaddingStyle.mobile.js +5 -0
  100. package/dist/components/CarouselTariffsCard/getPaddingStyle.mobile.js.map +1 -0
  101. package/dist/components/CarouselTariffsCard/renderCardInfo.d.ts +3 -0
  102. package/dist/components/CarouselTariffsCard/renderCardInfo.js +12 -0
  103. package/dist/components/CarouselTariffsCard/renderCardInfo.js.map +1 -0
  104. package/dist/components/Footer/Footer.mobile.js +1 -1
  105. package/dist/components/Footer/Footer.mobile.js.map +1 -1
  106. package/dist/components/Footer/SocialMedia.mobile.js +1 -1
  107. package/dist/components/Footer/SocialMedia.mobile.js.map +1 -1
  108. package/dist/components/Headline/Headline.js +2 -1
  109. package/dist/components/Headline/Headline.js.map +1 -1
  110. package/dist/components/Headline/headlineVersionStyles.d.ts +1 -1
  111. package/dist/components/Headline/headlineVersionStyles.js +6 -6
  112. package/dist/components/Headline/headlineVersionStyles.js.map +1 -1
  113. package/dist/components/Tabs/CenteredTabs.d.ts +7 -0
  114. package/dist/components/Tabs/CenteredTabs.js +7 -0
  115. package/dist/components/Tabs/CenteredTabs.js.map +1 -0
  116. package/dist/components/Tabs/LinkTab.d.ts +2 -2
  117. package/dist/components/Tabs/LinkTab.js +2 -2
  118. package/dist/components/Tabs/LinkTab.js.map +1 -1
  119. package/dist/components/Tabs/ScrollableTabs.js +3 -9
  120. package/dist/components/Tabs/ScrollableTabs.js.map +1 -1
  121. package/dist/components/Tabs/Tabs.js +14 -7
  122. package/dist/components/Tabs/Tabs.js.map +1 -1
  123. package/dist/components/Tabs/TabsContent.d.ts +3 -2
  124. package/dist/components/Tabs/renderGroupTab.d.ts +2 -2
  125. package/dist/components/Tabs/renderGroupTab.js +4 -4
  126. package/dist/components/Tabs/renderGroupTab.js.map +1 -1
  127. package/dist/components/Tabs/renderTab.d.ts +3 -3
  128. package/dist/components/Tabs/renderTab.js +3 -3
  129. package/dist/components/Tabs/renderTab.js.map +1 -1
  130. package/dist/components/Tabs/tabItemClasses.d.ts +3 -2
  131. package/dist/components/Tabs/tabItemClasses.js +26 -10
  132. package/dist/components/Tabs/tabItemClasses.js.map +1 -1
  133. package/dist/hooks/useForm.js +2 -2
  134. package/dist/hooks/useForm.js.map +1 -1
  135. package/dist/hooks/useLink.js +1 -1
  136. package/dist/hooks/useLink.js.map +1 -1
  137. package/dist/ui-kit/Checkbox/Checkbox.js +4 -1
  138. package/dist/ui-kit/Checkbox/Checkbox.js.map +1 -1
  139. package/dist/ui-kit/InputRange/InputRange.js +22 -16
  140. package/dist/ui-kit/InputRange/InputRange.js.map +1 -1
  141. package/dist/ui-kit/InputRange/InputRangeProps.d.ts +1 -0
  142. package/dist/ui-kit/InputRange/parseDecimal.d.ts +1 -0
  143. package/dist/ui-kit/InputRange/parseDecimal.js +9 -0
  144. package/dist/ui-kit/InputRange/parseDecimal.js.map +1 -0
  145. package/dist/ui-kit/InputRange/renderRangeWithTicks.d.ts +12 -0
  146. package/dist/ui-kit/InputRange/renderRangeWithTicks.js +17 -0
  147. package/dist/ui-kit/InputRange/renderRangeWithTicks.js.map +1 -0
  148. package/dist/utils/getSanitizedValue.js +1 -1
  149. package/dist/utils/getSanitizedValue.js.map +1 -1
  150. package/dist/wlc.json +1 -2
  151. package/lib/common.css +1 -1
  152. package/lib/components/ApplicationForm/ApplicationForm.js +1 -1
  153. package/lib/components/ApplicationForm/ApplicationForm.js.map +1 -1
  154. package/lib/components/Blocks.mobile.js +6 -0
  155. package/lib/components/Blocks.mobile.js.map +1 -1
  156. package/lib/components/Calculator/BonusCalculatorForm.js +16 -18
  157. package/lib/components/Calculator/BonusCalculatorForm.js.map +1 -1
  158. package/lib/components/Calculator/BusinessDepositCalculatorForm.js +24 -30
  159. package/lib/components/Calculator/BusinessDepositCalculatorForm.js.map +1 -1
  160. package/lib/components/Calculator/Calculator.js +4 -4
  161. package/lib/components/Calculator/Calculator.js.map +1 -1
  162. package/lib/components/Calculator/CreditCalculatorForm.js +27 -43
  163. package/lib/components/Calculator/CreditCalculatorForm.js.map +1 -1
  164. package/lib/components/Calculator/DepositCalculatorForm.js +31 -34
  165. package/lib/components/Calculator/DepositCalculatorForm.js.map +1 -1
  166. package/lib/components/Calculator/Rate.d.ts +1 -0
  167. package/lib/components/Calculator/Rate.js +1 -1
  168. package/lib/components/Calculator/Rate.js.map +1 -1
  169. package/lib/components/Calculator/renderBinaryRadioButtonGroup.d.ts +11 -0
  170. package/lib/components/Calculator/renderBinaryRadioButtonGroup.js +5 -0
  171. package/lib/components/Calculator/renderBinaryRadioButtonGroup.js.map +1 -0
  172. package/lib/components/Calculator/renderDaysInput.d.ts +2 -7
  173. package/lib/components/Calculator/renderDaysInput.js +2 -9
  174. package/lib/components/Calculator/renderDaysInput.js.map +1 -1
  175. package/lib/components/Calculator/renderInterestPayment.d.ts +2 -9
  176. package/lib/components/Calculator/renderInterestPayment.js +8 -18
  177. package/lib/components/Calculator/renderInterestPayment.js.map +1 -1
  178. package/lib/components/Calculator/renderMonthsInput.d.ts +3 -5
  179. package/lib/components/Calculator/renderMonthsInput.js +2 -10
  180. package/lib/components/Calculator/renderMonthsInput.js.map +1 -1
  181. package/lib/components/Calculator/renderPaymentType.d.ts +2 -11
  182. package/lib/components/Calculator/renderPaymentType.js +8 -18
  183. package/lib/components/Calculator/renderPaymentType.js.map +1 -1
  184. package/lib/components/Calculator/renderRegistrationType.d.ts +2 -9
  185. package/lib/components/Calculator/renderRegistrationType.js +8 -18
  186. package/lib/components/Calculator/renderRegistrationType.js.map +1 -1
  187. package/lib/components/Calculator/renderWantedSumInput.d.ts +3 -7
  188. package/lib/components/Calculator/renderWantedSumInput.js +4 -6
  189. package/lib/components/Calculator/renderWantedSumInput.js.map +1 -1
  190. package/lib/components/Calculator/useDepositCalculatorParams.js +1 -1
  191. package/lib/components/Calculator/useDepositCalculatorParams.js.map +1 -1
  192. package/lib/components/Carousel/Carousel.fixture.mobile.d.ts +11 -0
  193. package/lib/components/Carousel/Carousel.js +2 -2
  194. package/lib/components/Carousel/Carousel.js.map +1 -1
  195. package/lib/components/Carousel/itemsGap.d.ts +1 -0
  196. package/lib/components/Carousel/itemsGap.js +2 -0
  197. package/lib/components/Carousel/itemsGap.js.map +1 -0
  198. package/lib/components/Carousel/itemsGap.mobile.d.ts +1 -0
  199. package/lib/components/Carousel/itemsGap.mobile.js +2 -0
  200. package/lib/components/Carousel/itemsGap.mobile.js.map +1 -0
  201. package/lib/components/CarouselRecommendationCard/CarouselRecommendationCard.fixture.mobile.d.ts +16 -0
  202. package/lib/components/CarouselRecommendationCard/CarouselRecommendationCard.js +1 -1
  203. package/lib/components/CarouselRecommendationCard/CarouselRecommendationCard.js.map +1 -1
  204. package/lib/components/CarouselRecommendationCard/CarouselRecommendationCard.mobile.d.ts +5 -0
  205. package/lib/components/CarouselRecommendationCard/CarouselRecommendationCard.mobile.js +15 -0
  206. package/lib/components/CarouselRecommendationCard/CarouselRecommendationCard.mobile.js.map +1 -0
  207. package/lib/components/CarouselRecommendationCard/cardStyle.d.ts +1 -0
  208. package/lib/components/CarouselRecommendationCard/cardStyle.js +2 -0
  209. package/lib/components/CarouselRecommendationCard/cardStyle.js.map +1 -0
  210. package/lib/components/CarouselTariffsCard/CarouselTariffsCard.fixture.mobile.d.ts +9 -0
  211. package/lib/components/CarouselTariffsCard/CarouselTariffsCard.js +5 -9
  212. package/lib/components/CarouselTariffsCard/CarouselTariffsCard.js.map +1 -1
  213. package/lib/components/CarouselTariffsCard/descriptionSize.d.ts +1 -0
  214. package/lib/components/CarouselTariffsCard/descriptionSize.js +2 -0
  215. package/lib/components/CarouselTariffsCard/descriptionSize.js.map +1 -0
  216. package/lib/components/CarouselTariffsCard/descriptionSize.mobile.d.ts +1 -0
  217. package/lib/components/CarouselTariffsCard/descriptionSize.mobile.js +2 -0
  218. package/lib/components/CarouselTariffsCard/descriptionSize.mobile.js.map +1 -0
  219. package/lib/components/CarouselTariffsCard/getPaddingStyle.d.ts +1 -0
  220. package/lib/components/CarouselTariffsCard/getPaddingStyle.js +2 -0
  221. package/lib/components/CarouselTariffsCard/getPaddingStyle.js.map +1 -0
  222. package/lib/components/CarouselTariffsCard/getPaddingStyle.mobile.d.ts +1 -0
  223. package/lib/components/CarouselTariffsCard/getPaddingStyle.mobile.js +2 -0
  224. package/lib/components/CarouselTariffsCard/getPaddingStyle.mobile.js.map +1 -0
  225. package/lib/components/CarouselTariffsCard/renderCardInfo.d.ts +3 -0
  226. package/lib/components/CarouselTariffsCard/renderCardInfo.js +9 -0
  227. package/lib/components/CarouselTariffsCard/renderCardInfo.js.map +1 -0
  228. package/lib/components/Footer/Footer.mobile.js +1 -1
  229. package/lib/components/Footer/Footer.mobile.js.map +1 -1
  230. package/lib/components/Footer/SocialMedia.mobile.js +1 -1
  231. package/lib/components/Footer/SocialMedia.mobile.js.map +1 -1
  232. package/lib/components/Headline/Headline.fixture.mobile.d.ts +22 -0
  233. package/lib/components/Headline/Headline.js +2 -1
  234. package/lib/components/Headline/Headline.js.map +1 -1
  235. package/lib/components/Headline/headlineVersionStyles.d.ts +1 -1
  236. package/lib/components/Headline/headlineVersionStyles.js +6 -6
  237. package/lib/components/Headline/headlineVersionStyles.js.map +1 -1
  238. package/lib/components/Tabs/CenteredTabs.d.ts +7 -0
  239. package/lib/components/Tabs/CenteredTabs.js +5 -0
  240. package/lib/components/Tabs/CenteredTabs.js.map +1 -0
  241. package/lib/components/Tabs/LinkTab.d.ts +2 -2
  242. package/lib/components/Tabs/LinkTab.js +2 -2
  243. package/lib/components/Tabs/LinkTab.js.map +1 -1
  244. package/lib/components/Tabs/ScrollableTabs.js +3 -9
  245. package/lib/components/Tabs/ScrollableTabs.js.map +1 -1
  246. package/lib/components/Tabs/Tabs.fixture.d.ts +1 -0
  247. package/lib/components/Tabs/Tabs.js +14 -7
  248. package/lib/components/Tabs/Tabs.js.map +1 -1
  249. package/lib/components/Tabs/TabsContent.d.ts +3 -2
  250. package/lib/components/Tabs/renderGroupTab.d.ts +2 -2
  251. package/lib/components/Tabs/renderGroupTab.js +5 -5
  252. package/lib/components/Tabs/renderGroupTab.js.map +1 -1
  253. package/lib/components/Tabs/renderTab.d.ts +3 -3
  254. package/lib/components/Tabs/renderTab.js +3 -3
  255. package/lib/components/Tabs/renderTab.js.map +1 -1
  256. package/lib/components/Tabs/tabItemClasses.d.ts +3 -2
  257. package/lib/components/Tabs/tabItemClasses.js +26 -10
  258. package/lib/components/Tabs/tabItemClasses.js.map +1 -1
  259. package/lib/hooks/useForm.js +2 -2
  260. package/lib/hooks/useForm.js.map +1 -1
  261. package/lib/hooks/useLink.js +1 -1
  262. package/lib/hooks/useLink.js.map +1 -1
  263. package/lib/ui-kit/Checkbox/Checkbox.js +4 -1
  264. package/lib/ui-kit/Checkbox/Checkbox.js.map +1 -1
  265. package/lib/ui-kit/InputRange/InputRange.js +22 -16
  266. package/lib/ui-kit/InputRange/InputRange.js.map +1 -1
  267. package/lib/ui-kit/InputRange/InputRangeProps.d.ts +1 -0
  268. package/lib/ui-kit/InputRange/parseDecimal.d.ts +1 -0
  269. package/lib/ui-kit/InputRange/parseDecimal.js +6 -0
  270. package/lib/ui-kit/InputRange/parseDecimal.js.map +1 -0
  271. package/lib/ui-kit/InputRange/renderRangeWithTicks.d.ts +12 -0
  272. package/lib/ui-kit/InputRange/renderRangeWithTicks.js +14 -0
  273. package/lib/ui-kit/InputRange/renderRangeWithTicks.js.map +1 -0
  274. package/lib/utils/getSanitizedValue.js +1 -1
  275. package/lib/utils/getSanitizedValue.js.map +1 -1
  276. package/lib/wlc.json +1 -2
  277. package/mobile/bundle/bundle.umd.js +476 -370
  278. package/mobile/bundle/bundle.umd.min.js +1 -1
  279. package/mobile/bundle/components/Calculator/Rate.d.ts +1 -0
  280. package/mobile/bundle/components/Calculator/renderBinaryRadioButtonGroup.d.ts +11 -0
  281. package/mobile/bundle/components/Calculator/renderDaysInput.d.ts +2 -7
  282. package/mobile/bundle/components/Calculator/renderInterestPayment.d.ts +2 -9
  283. package/mobile/bundle/components/Calculator/renderMonthsInput.d.ts +3 -5
  284. package/mobile/bundle/components/Calculator/renderPaymentType.d.ts +2 -11
  285. package/mobile/bundle/components/Calculator/renderRegistrationType.d.ts +2 -9
  286. package/mobile/bundle/components/Calculator/renderWantedSumInput.d.ts +3 -7
  287. package/mobile/bundle/components/Carousel/itemsGap.d.ts +1 -0
  288. package/mobile/bundle/components/CarouselRecommendationCard/cardStyle.d.ts +1 -0
  289. package/mobile/bundle/components/CarouselTariffsCard/descriptionSize.d.ts +1 -0
  290. package/mobile/bundle/components/CarouselTariffsCard/getPaddingStyle.d.ts +1 -0
  291. package/mobile/bundle/components/CarouselTariffsCard/renderCardInfo.d.ts +3 -0
  292. package/mobile/bundle/components/Headline/headlineVersionStyles.d.ts +1 -1
  293. package/mobile/bundle/components/Tabs/CenteredTabs.d.ts +7 -0
  294. package/mobile/bundle/components/Tabs/LinkTab.d.ts +2 -2
  295. package/mobile/bundle/components/Tabs/TabsContent.d.ts +3 -2
  296. package/mobile/bundle/components/Tabs/renderGroupTab.d.ts +2 -2
  297. package/mobile/bundle/components/Tabs/renderTab.d.ts +3 -3
  298. package/mobile/bundle/components/Tabs/tabItemClasses.d.ts +3 -2
  299. package/mobile/bundle/ui-kit/InputRange/InputRangeProps.d.ts +1 -0
  300. package/mobile/bundle/ui-kit/InputRange/parseDecimal.d.ts +1 -0
  301. package/mobile/bundle/ui-kit/InputRange/renderRangeWithTicks.d.ts +12 -0
  302. package/mobile/dist/components/ApplicationForm/ApplicationForm.js +1 -1
  303. package/mobile/dist/components/ApplicationForm/ApplicationForm.js.map +1 -1
  304. package/mobile/dist/components/Blocks.js +6 -0
  305. package/mobile/dist/components/Blocks.js.map +1 -1
  306. package/mobile/dist/components/Calculator/BonusCalculatorForm.js +16 -18
  307. package/mobile/dist/components/Calculator/BonusCalculatorForm.js.map +1 -1
  308. package/mobile/dist/components/Calculator/BusinessDepositCalculatorForm.js +24 -30
  309. package/mobile/dist/components/Calculator/BusinessDepositCalculatorForm.js.map +1 -1
  310. package/mobile/dist/components/Calculator/Calculator.js +4 -4
  311. package/mobile/dist/components/Calculator/Calculator.js.map +1 -1
  312. package/mobile/dist/components/Calculator/CreditCalculatorForm.js +27 -43
  313. package/mobile/dist/components/Calculator/CreditCalculatorForm.js.map +1 -1
  314. package/mobile/dist/components/Calculator/DepositCalculatorForm.js +30 -33
  315. package/mobile/dist/components/Calculator/DepositCalculatorForm.js.map +1 -1
  316. package/mobile/dist/components/Calculator/Rate.d.ts +1 -0
  317. package/mobile/dist/components/Calculator/Rate.js +1 -1
  318. package/mobile/dist/components/Calculator/Rate.js.map +1 -1
  319. package/mobile/dist/components/Calculator/renderBinaryRadioButtonGroup.d.ts +11 -0
  320. package/mobile/dist/components/Calculator/renderBinaryRadioButtonGroup.js +8 -0
  321. package/mobile/dist/components/Calculator/renderBinaryRadioButtonGroup.js.map +1 -0
  322. package/mobile/dist/components/Calculator/renderDaysInput.d.ts +2 -7
  323. package/mobile/dist/components/Calculator/renderDaysInput.js +2 -9
  324. package/mobile/dist/components/Calculator/renderDaysInput.js.map +1 -1
  325. package/mobile/dist/components/Calculator/renderInterestPayment.d.ts +2 -9
  326. package/mobile/dist/components/Calculator/renderInterestPayment.js +8 -18
  327. package/mobile/dist/components/Calculator/renderInterestPayment.js.map +1 -1
  328. package/mobile/dist/components/Calculator/renderMonthsInput.d.ts +3 -5
  329. package/mobile/dist/components/Calculator/renderMonthsInput.js +2 -10
  330. package/mobile/dist/components/Calculator/renderMonthsInput.js.map +1 -1
  331. package/mobile/dist/components/Calculator/renderPaymentType.d.ts +2 -11
  332. package/mobile/dist/components/Calculator/renderPaymentType.js +9 -19
  333. package/mobile/dist/components/Calculator/renderPaymentType.js.map +1 -1
  334. package/mobile/dist/components/Calculator/renderRegistrationType.d.ts +2 -9
  335. package/mobile/dist/components/Calculator/renderRegistrationType.js +8 -18
  336. package/mobile/dist/components/Calculator/renderRegistrationType.js.map +1 -1
  337. package/mobile/dist/components/Calculator/renderWantedSumInput.d.ts +3 -7
  338. package/mobile/dist/components/Calculator/renderWantedSumInput.js +4 -6
  339. package/mobile/dist/components/Calculator/renderWantedSumInput.js.map +1 -1
  340. package/mobile/dist/components/Calculator/useDepositCalculatorParams.js +1 -1
  341. package/mobile/dist/components/Calculator/useDepositCalculatorParams.js.map +1 -1
  342. package/mobile/dist/components/Carousel/Carousel.js +3 -3
  343. package/mobile/dist/components/Carousel/Carousel.js.map +1 -1
  344. package/mobile/dist/components/Carousel/itemsGap.d.ts +1 -0
  345. package/mobile/dist/components/Carousel/itemsGap.js +4 -0
  346. package/mobile/dist/components/Carousel/itemsGap.js.map +1 -0
  347. package/mobile/dist/components/CarouselRecommendationCard/CarouselRecommendationCard.js +4 -4
  348. package/mobile/dist/components/CarouselRecommendationCard/CarouselRecommendationCard.js.map +1 -1
  349. package/mobile/dist/components/CarouselRecommendationCard/cardStyle.d.ts +1 -0
  350. package/mobile/dist/components/CarouselRecommendationCard/cardStyle.js +4 -0
  351. package/mobile/dist/components/CarouselRecommendationCard/cardStyle.js.map +1 -0
  352. package/mobile/dist/components/CarouselTariffsCard/CarouselTariffsCard.js +6 -10
  353. package/mobile/dist/components/CarouselTariffsCard/CarouselTariffsCard.js.map +1 -1
  354. package/mobile/dist/components/CarouselTariffsCard/descriptionSize.d.ts +1 -0
  355. package/mobile/dist/components/CarouselTariffsCard/descriptionSize.js +4 -0
  356. package/mobile/dist/components/CarouselTariffsCard/descriptionSize.js.map +1 -0
  357. package/mobile/dist/components/CarouselTariffsCard/getPaddingStyle.d.ts +1 -0
  358. package/mobile/dist/components/CarouselTariffsCard/getPaddingStyle.js +5 -0
  359. package/mobile/dist/components/CarouselTariffsCard/getPaddingStyle.js.map +1 -0
  360. package/mobile/dist/components/CarouselTariffsCard/renderCardInfo.d.ts +3 -0
  361. package/mobile/dist/components/CarouselTariffsCard/renderCardInfo.js +12 -0
  362. package/mobile/dist/components/CarouselTariffsCard/renderCardInfo.js.map +1 -0
  363. package/mobile/dist/components/Footer/Footer.js +1 -1
  364. package/mobile/dist/components/Footer/Footer.js.map +1 -1
  365. package/mobile/dist/components/Footer/SocialMedia.js +1 -1
  366. package/mobile/dist/components/Footer/SocialMedia.js.map +1 -1
  367. package/mobile/dist/components/Headline/Headline.js +2 -1
  368. package/mobile/dist/components/Headline/Headline.js.map +1 -1
  369. package/mobile/dist/components/Headline/headlineVersionStyles.d.ts +1 -1
  370. package/mobile/dist/components/Headline/headlineVersionStyles.js +6 -6
  371. package/mobile/dist/components/Headline/headlineVersionStyles.js.map +1 -1
  372. package/mobile/dist/components/Tabs/CenteredTabs.d.ts +7 -0
  373. package/mobile/dist/components/Tabs/CenteredTabs.js +7 -0
  374. package/mobile/dist/components/Tabs/CenteredTabs.js.map +1 -0
  375. package/mobile/dist/components/Tabs/LinkTab.d.ts +2 -2
  376. package/mobile/dist/components/Tabs/LinkTab.js +2 -2
  377. package/mobile/dist/components/Tabs/LinkTab.js.map +1 -1
  378. package/mobile/dist/components/Tabs/ScrollableTabs.js +3 -9
  379. package/mobile/dist/components/Tabs/ScrollableTabs.js.map +1 -1
  380. package/mobile/dist/components/Tabs/Tabs.js +14 -7
  381. package/mobile/dist/components/Tabs/Tabs.js.map +1 -1
  382. package/mobile/dist/components/Tabs/TabsContent.d.ts +3 -2
  383. package/mobile/dist/components/Tabs/renderGroupTab.d.ts +2 -2
  384. package/mobile/dist/components/Tabs/renderGroupTab.js +4 -4
  385. package/mobile/dist/components/Tabs/renderGroupTab.js.map +1 -1
  386. package/mobile/dist/components/Tabs/renderTab.d.ts +3 -3
  387. package/mobile/dist/components/Tabs/renderTab.js +3 -3
  388. package/mobile/dist/components/Tabs/renderTab.js.map +1 -1
  389. package/mobile/dist/components/Tabs/tabItemClasses.d.ts +3 -2
  390. package/mobile/dist/components/Tabs/tabItemClasses.js +26 -10
  391. package/mobile/dist/components/Tabs/tabItemClasses.js.map +1 -1
  392. package/mobile/dist/hooks/useForm.js +2 -2
  393. package/mobile/dist/hooks/useForm.js.map +1 -1
  394. package/mobile/dist/hooks/useLink.js +1 -1
  395. package/mobile/dist/hooks/useLink.js.map +1 -1
  396. package/mobile/dist/ui-kit/Checkbox/Checkbox.js +4 -1
  397. package/mobile/dist/ui-kit/Checkbox/Checkbox.js.map +1 -1
  398. package/mobile/dist/ui-kit/InputRange/InputRange.js +22 -16
  399. package/mobile/dist/ui-kit/InputRange/InputRange.js.map +1 -1
  400. package/mobile/dist/ui-kit/InputRange/InputRangeProps.d.ts +1 -0
  401. package/mobile/dist/ui-kit/InputRange/parseDecimal.d.ts +1 -0
  402. package/mobile/dist/ui-kit/InputRange/parseDecimal.js +9 -0
  403. package/mobile/dist/ui-kit/InputRange/parseDecimal.js.map +1 -0
  404. package/mobile/dist/ui-kit/InputRange/renderRangeWithTicks.d.ts +12 -0
  405. package/mobile/dist/ui-kit/InputRange/renderRangeWithTicks.js +17 -0
  406. package/mobile/dist/ui-kit/InputRange/renderRangeWithTicks.js.map +1 -0
  407. package/mobile/dist/utils/getSanitizedValue.js +1 -1
  408. package/mobile/dist/utils/getSanitizedValue.js.map +1 -1
  409. package/mobile/dist/wlc.json +1 -2
  410. package/mobile/lib/common.css +1 -1
  411. package/mobile/lib/components/ApplicationForm/ApplicationForm.js +1 -1
  412. package/mobile/lib/components/ApplicationForm/ApplicationForm.js.map +1 -1
  413. package/mobile/lib/components/Blocks.js +6 -0
  414. package/mobile/lib/components/Blocks.js.map +1 -1
  415. package/mobile/lib/components/Calculator/BonusCalculatorForm.js +16 -18
  416. package/mobile/lib/components/Calculator/BonusCalculatorForm.js.map +1 -1
  417. package/mobile/lib/components/Calculator/BusinessDepositCalculatorForm.js +24 -30
  418. package/mobile/lib/components/Calculator/BusinessDepositCalculatorForm.js.map +1 -1
  419. package/mobile/lib/components/Calculator/Calculator.js +4 -4
  420. package/mobile/lib/components/Calculator/Calculator.js.map +1 -1
  421. package/mobile/lib/components/Calculator/CreditCalculatorForm.js +27 -43
  422. package/mobile/lib/components/Calculator/CreditCalculatorForm.js.map +1 -1
  423. package/mobile/lib/components/Calculator/DepositCalculatorForm.js +31 -34
  424. package/mobile/lib/components/Calculator/DepositCalculatorForm.js.map +1 -1
  425. package/mobile/lib/components/Calculator/Rate.d.ts +1 -0
  426. package/mobile/lib/components/Calculator/Rate.js +1 -1
  427. package/mobile/lib/components/Calculator/Rate.js.map +1 -1
  428. package/mobile/lib/components/Calculator/renderBinaryRadioButtonGroup.d.ts +11 -0
  429. package/mobile/lib/components/Calculator/renderBinaryRadioButtonGroup.js +5 -0
  430. package/mobile/lib/components/Calculator/renderBinaryRadioButtonGroup.js.map +1 -0
  431. package/mobile/lib/components/Calculator/renderDaysInput.d.ts +2 -7
  432. package/mobile/lib/components/Calculator/renderDaysInput.js +2 -9
  433. package/mobile/lib/components/Calculator/renderDaysInput.js.map +1 -1
  434. package/mobile/lib/components/Calculator/renderInterestPayment.d.ts +2 -9
  435. package/mobile/lib/components/Calculator/renderInterestPayment.js +8 -18
  436. package/mobile/lib/components/Calculator/renderInterestPayment.js.map +1 -1
  437. package/mobile/lib/components/Calculator/renderMonthsInput.d.ts +3 -5
  438. package/mobile/lib/components/Calculator/renderMonthsInput.js +2 -10
  439. package/mobile/lib/components/Calculator/renderMonthsInput.js.map +1 -1
  440. package/mobile/lib/components/Calculator/renderPaymentType.d.ts +2 -11
  441. package/mobile/lib/components/Calculator/renderPaymentType.js +8 -18
  442. package/mobile/lib/components/Calculator/renderPaymentType.js.map +1 -1
  443. package/mobile/lib/components/Calculator/renderRegistrationType.d.ts +2 -9
  444. package/mobile/lib/components/Calculator/renderRegistrationType.js +8 -18
  445. package/mobile/lib/components/Calculator/renderRegistrationType.js.map +1 -1
  446. package/mobile/lib/components/Calculator/renderWantedSumInput.d.ts +3 -7
  447. package/mobile/lib/components/Calculator/renderWantedSumInput.js +4 -6
  448. package/mobile/lib/components/Calculator/renderWantedSumInput.js.map +1 -1
  449. package/mobile/lib/components/Calculator/useDepositCalculatorParams.js +1 -1
  450. package/mobile/lib/components/Calculator/useDepositCalculatorParams.js.map +1 -1
  451. package/mobile/lib/components/Carousel/Carousel.js +2 -2
  452. package/mobile/lib/components/Carousel/Carousel.js.map +1 -1
  453. package/mobile/lib/components/Carousel/itemsGap.d.ts +1 -0
  454. package/mobile/lib/components/Carousel/itemsGap.js +2 -0
  455. package/mobile/lib/components/Carousel/itemsGap.js.map +1 -0
  456. package/mobile/lib/components/CarouselRecommendationCard/CarouselRecommendationCard.js +4 -4
  457. package/mobile/lib/components/CarouselRecommendationCard/CarouselRecommendationCard.js.map +1 -1
  458. package/mobile/lib/components/CarouselRecommendationCard/cardStyle.d.ts +1 -0
  459. package/mobile/lib/components/CarouselRecommendationCard/cardStyle.js +2 -0
  460. package/mobile/lib/components/CarouselRecommendationCard/cardStyle.js.map +1 -0
  461. package/mobile/lib/components/CarouselTariffsCard/CarouselTariffsCard.js +5 -9
  462. package/mobile/lib/components/CarouselTariffsCard/CarouselTariffsCard.js.map +1 -1
  463. package/mobile/lib/components/CarouselTariffsCard/descriptionSize.d.ts +1 -0
  464. package/mobile/lib/components/CarouselTariffsCard/descriptionSize.js +2 -0
  465. package/mobile/lib/components/CarouselTariffsCard/descriptionSize.js.map +1 -0
  466. package/mobile/lib/components/CarouselTariffsCard/getPaddingStyle.d.ts +1 -0
  467. package/mobile/lib/components/CarouselTariffsCard/getPaddingStyle.js +2 -0
  468. package/mobile/lib/components/CarouselTariffsCard/getPaddingStyle.js.map +1 -0
  469. package/mobile/lib/components/CarouselTariffsCard/renderCardInfo.d.ts +3 -0
  470. package/mobile/lib/components/CarouselTariffsCard/renderCardInfo.js +9 -0
  471. package/mobile/lib/components/CarouselTariffsCard/renderCardInfo.js.map +1 -0
  472. package/mobile/lib/components/Footer/Footer.js +1 -1
  473. package/mobile/lib/components/Footer/Footer.js.map +1 -1
  474. package/mobile/lib/components/Footer/SocialMedia.js +1 -1
  475. package/mobile/lib/components/Footer/SocialMedia.js.map +1 -1
  476. package/mobile/lib/components/Headline/Headline.js +2 -1
  477. package/mobile/lib/components/Headline/Headline.js.map +1 -1
  478. package/mobile/lib/components/Headline/headlineVersionStyles.d.ts +1 -1
  479. package/mobile/lib/components/Headline/headlineVersionStyles.js +6 -6
  480. package/mobile/lib/components/Headline/headlineVersionStyles.js.map +1 -1
  481. package/mobile/lib/components/Tabs/CenteredTabs.d.ts +7 -0
  482. package/mobile/lib/components/Tabs/CenteredTabs.js +5 -0
  483. package/mobile/lib/components/Tabs/CenteredTabs.js.map +1 -0
  484. package/mobile/lib/components/Tabs/LinkTab.d.ts +2 -2
  485. package/mobile/lib/components/Tabs/LinkTab.js +2 -2
  486. package/mobile/lib/components/Tabs/LinkTab.js.map +1 -1
  487. package/mobile/lib/components/Tabs/ScrollableTabs.js +3 -9
  488. package/mobile/lib/components/Tabs/ScrollableTabs.js.map +1 -1
  489. package/mobile/lib/components/Tabs/Tabs.js +14 -7
  490. package/mobile/lib/components/Tabs/Tabs.js.map +1 -1
  491. package/mobile/lib/components/Tabs/TabsContent.d.ts +3 -2
  492. package/mobile/lib/components/Tabs/renderGroupTab.d.ts +2 -2
  493. package/mobile/lib/components/Tabs/renderGroupTab.js +5 -5
  494. package/mobile/lib/components/Tabs/renderGroupTab.js.map +1 -1
  495. package/mobile/lib/components/Tabs/renderTab.d.ts +3 -3
  496. package/mobile/lib/components/Tabs/renderTab.js +3 -3
  497. package/mobile/lib/components/Tabs/renderTab.js.map +1 -1
  498. package/mobile/lib/components/Tabs/tabItemClasses.d.ts +3 -2
  499. package/mobile/lib/components/Tabs/tabItemClasses.js +26 -10
  500. package/mobile/lib/components/Tabs/tabItemClasses.js.map +1 -1
  501. package/mobile/lib/hooks/useForm.js +2 -2
  502. package/mobile/lib/hooks/useForm.js.map +1 -1
  503. package/mobile/lib/hooks/useLink.js +1 -1
  504. package/mobile/lib/hooks/useLink.js.map +1 -1
  505. package/mobile/lib/ui-kit/Checkbox/Checkbox.js +4 -1
  506. package/mobile/lib/ui-kit/Checkbox/Checkbox.js.map +1 -1
  507. package/mobile/lib/ui-kit/InputRange/InputRange.js +22 -16
  508. package/mobile/lib/ui-kit/InputRange/InputRange.js.map +1 -1
  509. package/mobile/lib/ui-kit/InputRange/InputRangeProps.d.ts +1 -0
  510. package/mobile/lib/ui-kit/InputRange/parseDecimal.d.ts +1 -0
  511. package/mobile/lib/ui-kit/InputRange/parseDecimal.js +6 -0
  512. package/mobile/lib/ui-kit/InputRange/parseDecimal.js.map +1 -0
  513. package/mobile/lib/ui-kit/InputRange/renderRangeWithTicks.d.ts +12 -0
  514. package/mobile/lib/ui-kit/InputRange/renderRangeWithTicks.js +14 -0
  515. package/mobile/lib/ui-kit/InputRange/renderRangeWithTicks.js.map +1 -0
  516. package/mobile/lib/utils/getSanitizedValue.js +1 -1
  517. package/mobile/lib/utils/getSanitizedValue.js.map +1 -1
  518. package/mobile/lib/wlc.json +1 -2
  519. package/mobile/src/components/ApplicationForm/ApplicationForm.tsx +1 -1
  520. package/mobile/src/components/Blocks.ts +6 -0
  521. package/mobile/src/components/Calculator/BonusCalculatorForm.tsx +29 -33
  522. package/mobile/src/components/Calculator/BusinessDepositCalculatorForm.tsx +37 -57
  523. package/mobile/src/components/Calculator/Calculator.tsx +11 -5
  524. package/mobile/src/components/Calculator/CreditCalculatorForm.tsx +52 -87
  525. package/mobile/src/components/Calculator/DepositCalculatorForm.tsx +38 -66
  526. package/mobile/src/components/Calculator/Rate.tsx +14 -14
  527. package/mobile/src/components/Calculator/renderBinaryRadioButtonGroup.tsx +35 -0
  528. package/mobile/src/components/Calculator/renderDaysInput.tsx +10 -31
  529. package/mobile/src/components/Calculator/renderInterestPayment.tsx +13 -52
  530. package/mobile/src/components/Calculator/renderMonthsInput.tsx +17 -39
  531. package/mobile/src/components/Calculator/renderPaymentType.tsx +13 -49
  532. package/mobile/src/components/Calculator/renderRegistrationType.tsx +13 -51
  533. package/mobile/src/components/Calculator/renderWantedSumInput.tsx +10 -27
  534. package/mobile/src/components/Calculator/useDepositCalculatorParams.ts +1 -1
  535. package/mobile/src/components/Carousel/Carousel.tsx +2 -3
  536. package/mobile/src/components/Carousel/itemsGap.ts +1 -0
  537. package/mobile/src/components/CarouselRecommendationCard/CarouselRecommendationCard.tsx +14 -20
  538. package/mobile/src/components/CarouselRecommendationCard/cardStyle.ts +2 -0
  539. package/mobile/src/components/CarouselTariffsCard/CarouselTariffsCard.tsx +7 -31
  540. package/mobile/src/components/CarouselTariffsCard/descriptionSize.tsx +1 -0
  541. package/mobile/src/components/CarouselTariffsCard/getPaddingStyle.tsx +2 -0
  542. package/mobile/src/components/CarouselTariffsCard/renderCardInfo.tsx +31 -0
  543. package/mobile/src/components/Footer/Footer.tsx +1 -1
  544. package/mobile/src/components/Footer/SocialMedia.tsx +1 -1
  545. package/mobile/src/components/Headline/Headline.tsx +10 -5
  546. package/mobile/src/components/Headline/headlineVersionStyles.ts +7 -7
  547. package/mobile/src/components/Tabs/CenteredTabs.tsx +12 -0
  548. package/mobile/src/components/Tabs/LinkTab.tsx +5 -5
  549. package/mobile/src/components/Tabs/ScrollableTabs.tsx +5 -13
  550. package/mobile/src/components/Tabs/Tabs.tsx +21 -19
  551. package/mobile/src/components/Tabs/TabsContent.ts +3 -2
  552. package/mobile/src/components/Tabs/renderGroupTab.tsx +11 -10
  553. package/mobile/src/components/Tabs/renderTab.tsx +5 -13
  554. package/mobile/src/components/Tabs/tabItemClasses.ts +28 -10
  555. package/mobile/src/hooks/useForm.ts +17 -14
  556. package/mobile/src/hooks/useLink.ts +1 -1
  557. package/mobile/src/ui-kit/Checkbox/Checkbox.tsx +5 -1
  558. package/mobile/src/ui-kit/InputRange/InputRange.tsx +56 -43
  559. package/mobile/src/ui-kit/InputRange/InputRangeProps.ts +1 -0
  560. package/mobile/src/ui-kit/InputRange/parseDecimal.ts +6 -0
  561. package/mobile/src/ui-kit/InputRange/renderRangeWithTicks.tsx +62 -0
  562. package/mobile/src/utils/getSanitizedValue.ts +1 -1
  563. package/mobile/src/wlc.json +1 -2
  564. package/package.json +1 -1
  565. package/src/components/ApplicationForm/ApplicationForm.tsx +1 -1
  566. package/src/components/Blocks.mobile.ts +6 -0
  567. package/src/components/Calculator/BonusCalculatorForm.tsx +29 -33
  568. package/src/components/Calculator/BusinessDepositCalculatorForm.tsx +37 -57
  569. package/src/components/Calculator/Calculator.tsx +11 -5
  570. package/src/components/Calculator/CreditCalculatorForm.tsx +52 -87
  571. package/src/components/Calculator/DepositCalculatorForm.tsx +38 -66
  572. package/src/components/Calculator/Rate.tsx +14 -14
  573. package/src/components/Calculator/renderBinaryRadioButtonGroup.tsx +35 -0
  574. package/src/components/Calculator/renderDaysInput.tsx +10 -31
  575. package/src/components/Calculator/renderInterestPayment.tsx +13 -52
  576. package/src/components/Calculator/renderMonthsInput.tsx +17 -39
  577. package/src/components/Calculator/renderPaymentType.tsx +13 -49
  578. package/src/components/Calculator/renderRegistrationType.tsx +13 -51
  579. package/src/components/Calculator/renderWantedSumInput.tsx +10 -27
  580. package/src/components/Calculator/useDepositCalculatorParams.ts +1 -1
  581. package/src/components/Carousel/Carousel.fixture.mobile.tsx +93 -0
  582. package/src/components/Carousel/Carousel.tsx +2 -3
  583. package/src/components/Carousel/itemsGap.mobile.ts +1 -0
  584. package/src/components/Carousel/itemsGap.ts +1 -0
  585. package/src/components/CarouselRecommendationCard/CarouselRecommendationCard.fixture.mobile.tsx +148 -0
  586. package/src/components/CarouselRecommendationCard/CarouselRecommendationCard.mobile.tsx +63 -0
  587. package/src/components/CarouselRecommendationCard/CarouselRecommendationCard.tsx +1 -3
  588. package/src/components/CarouselRecommendationCard/cardStyle.ts +2 -0
  589. package/src/components/CarouselTariffsCard/CarouselTariffsCard.fixture.mobile.tsx +74 -0
  590. package/src/components/CarouselTariffsCard/CarouselTariffsCard.tsx +7 -31
  591. package/src/components/CarouselTariffsCard/descriptionSize.mobile.tsx +1 -0
  592. package/src/components/CarouselTariffsCard/descriptionSize.tsx +1 -0
  593. package/src/components/CarouselTariffsCard/getPaddingStyle.mobile.tsx +2 -0
  594. package/src/components/CarouselTariffsCard/getPaddingStyle.tsx +2 -0
  595. package/src/components/CarouselTariffsCard/renderCardInfo.tsx +31 -0
  596. package/src/components/Footer/Footer.mobile.tsx +1 -1
  597. package/src/components/Footer/SocialMedia.mobile.tsx +1 -1
  598. package/src/components/Headline/Headline.fixture.mobile.tsx +95 -0
  599. package/src/components/Headline/Headline.tsx +10 -5
  600. package/src/components/Headline/headlineVersionStyles.ts +7 -7
  601. package/src/components/Tabs/CenteredTabs.tsx +12 -0
  602. package/src/components/Tabs/LinkTab.tsx +5 -5
  603. package/src/components/Tabs/ScrollableTabs.tsx +5 -13
  604. package/src/components/Tabs/Tabs.fixture.tsx +27 -0
  605. package/src/components/Tabs/Tabs.tsx +21 -19
  606. package/src/components/Tabs/TabsContent.ts +3 -2
  607. package/src/components/Tabs/renderGroupTab.tsx +11 -10
  608. package/src/components/Tabs/renderTab.tsx +5 -13
  609. package/src/components/Tabs/tabItemClasses.ts +28 -10
  610. package/src/hooks/useForm.ts +17 -14
  611. package/src/hooks/useLink.ts +1 -1
  612. package/src/ui-kit/Checkbox/Checkbox.tsx +5 -1
  613. package/src/ui-kit/InputRange/InputRange.tsx +56 -43
  614. package/src/ui-kit/InputRange/InputRangeProps.ts +1 -0
  615. package/src/ui-kit/InputRange/parseDecimal.ts +6 -0
  616. package/src/ui-kit/InputRange/renderRangeWithTicks.tsx +62 -0
  617. package/src/utils/getSanitizedValue.ts +1 -1
  618. package/src/wlc.json +1 -2
  619. package/bundle/ui-kit/InputListRange/InputListRange.d.ts +0 -2
  620. package/bundle/ui-kit/InputListRange/InputListRangeProps.d.ts +0 -10
  621. package/dist/ui-kit/InputListRange/InputListRange.d.ts +0 -2
  622. package/dist/ui-kit/InputListRange/InputListRange.js +0 -41
  623. package/dist/ui-kit/InputListRange/InputListRange.js.map +0 -1
  624. package/dist/ui-kit/InputListRange/InputListRangeProps.d.ts +0 -10
  625. package/dist/ui-kit/InputListRange/InputListRangeProps.js +0 -2
  626. package/dist/ui-kit/InputListRange/InputListRangeProps.js.map +0 -1
  627. package/lib/ui-kit/InputListRange/InputListRange.d.ts +0 -2
  628. package/lib/ui-kit/InputListRange/InputListRange.js +0 -39
  629. package/lib/ui-kit/InputListRange/InputListRange.js.map +0 -1
  630. package/lib/ui-kit/InputListRange/InputListRangeProps.d.ts +0 -10
  631. package/lib/ui-kit/InputListRange/InputListRangeProps.js +0 -2
  632. package/lib/ui-kit/InputListRange/InputListRangeProps.js.map +0 -1
  633. package/mobile/bundle/ui-kit/InputListRange/InputListRange.d.ts +0 -2
  634. package/mobile/bundle/ui-kit/InputListRange/InputListRangeProps.d.ts +0 -10
  635. package/mobile/dist/ui-kit/InputListRange/InputListRange.d.ts +0 -2
  636. package/mobile/dist/ui-kit/InputListRange/InputListRange.js +0 -41
  637. package/mobile/dist/ui-kit/InputListRange/InputListRange.js.map +0 -1
  638. package/mobile/dist/ui-kit/InputListRange/InputListRangeProps.d.ts +0 -10
  639. package/mobile/dist/ui-kit/InputListRange/InputListRangeProps.js +0 -2
  640. package/mobile/dist/ui-kit/InputListRange/InputListRangeProps.js.map +0 -1
  641. package/mobile/lib/ui-kit/InputListRange/InputListRange.d.ts +0 -2
  642. package/mobile/lib/ui-kit/InputListRange/InputListRange.js +0 -39
  643. package/mobile/lib/ui-kit/InputListRange/InputListRange.js.map +0 -1
  644. package/mobile/lib/ui-kit/InputListRange/InputListRangeProps.d.ts +0 -10
  645. package/mobile/lib/ui-kit/InputListRange/InputListRangeProps.js +0 -2
  646. package/mobile/lib/ui-kit/InputListRange/InputListRangeProps.js.map +0 -1
  647. package/mobile/src/ui-kit/InputListRange/InputListRange.tsx +0 -99
  648. package/mobile/src/ui-kit/InputListRange/InputListRangeProps.ts +0 -11
  649. package/src/ui-kit/InputListRange/InputListRange.tsx +0 -99
  650. package/src/ui-kit/InputListRange/InputListRangeProps.ts +0 -11
@@ -363,7 +363,7 @@
363
363
  const [isDirtyForm, setDirtyForm] = useState(false);
364
364
  const [dirtyFieldsMap, setDirtyFieldsMap] = useState({});
365
365
  const handlersMap = useRef({});
366
- const field = (fieldName) => {
366
+ const field = useCallback((fieldName) => {
367
367
  if (!handlersMap.current) {
368
368
  handlersMap.current = {};
369
369
  }
@@ -376,7 +376,7 @@
376
376
  isDirty: isDirtyForm || dirtyFieldsMap[fieldName],
377
377
  onChange: handlersMap.current[fieldName],
378
378
  };
379
- };
379
+ }, [formState, isDirtyForm, dirtyFieldsMap]);
380
380
  const reset = useCallback(() => {
381
381
  setFormState(initialState);
382
382
  setDirtyForm(false);
@@ -556,7 +556,7 @@
556
556
  const { close } = useDialog();
557
557
  return (props) => ({
558
558
  ...props,
559
- href: isRemote ? props.href : adjustHref(router)(props.href, basePath),
559
+ href: isRemote && !basePath ? props.href : adjustHref(router)(props.href, basePath),
560
560
  'aria-label': props.text,
561
561
  onClick: handlerDecorator(handleHref(props), props),
562
562
  });
@@ -904,26 +904,44 @@
904
904
 
905
905
  const clamp = (value, min, max) => Math.max(min, Math.min(value, max));
906
906
 
907
- const getSanitizedValue = (_) => _.split(/\s+/).join('');
907
+ function parseDecimal(value) {
908
+ const rawValue = (value || '').replace(/\D/g, '');
909
+ const unsafeDecimal = parseInt(rawValue, 10);
910
+ return Number.isNaN(unsafeDecimal) ? 0 : unsafeDecimal;
911
+ }
908
912
 
909
- const DISABLED_INPUT_CLASSES$1 = 'disabled:border-gray disabled:bg-main-divider';
910
- const InputRange = JSX(({ className, title, items = [], min = 1, max = 100, step = 1, value = min, disabled = false, onChange, }) => {
911
- const handleChange = (e) => {
912
- if (!onChange) {
913
- return;
914
- }
915
- onChange(clamp(Number(getSanitizedValue(e.target.value)), min, max));
916
- };
913
+ function renderRangeWithTicks({ list = [], min, max, step, value = list[0] || min, disabled, onChange, }) {
914
+ const rangeValue = list.length ? list.indexOf(value) : value;
917
915
  const inputStyle = {
918
- backgroundSize: `${(((value - min) * 100) / (max - min)).toFixed(2)}% 100%`,
916
+ backgroundSize: `${(((rangeValue - min) * 100) / (max - min)).toFixed(2)}% 100%`,
919
917
  };
920
- return (jsxs("div", { className: className, children: [jsxs("label", { className: "block relative", children: [title ? jsx("span", { className: "text-m-light text-primary-text", children: title }) : null, jsx("input", { className: `m-0 mt-2 font-sans text-h3 w-full h-14 border border-solid border-gray rounded-md
921
- outline-none p-0 pl-4 box-border text-primary-text hover:border-primary-hover focus:border-primary-text ${DISABLED_INPUT_CLASSES$1}`, value: addSpacesBetweenNumbers(value), disabled: disabled, onChange: handleChange, onBlur: handleChange }), jsx("div", { className: "absolute inset-x-0 -bottom-1 px-4 leading-[18px]", children: jsx("input", { className: "box-border w-full m-0 cursor-pointer slider", type: "range", min: min, max: max, step: step, value: value, disabled: disabled, onChange: handleChange, style: inputStyle }) })] }), renderRangeCaption$1(items)] }));
922
- });
923
- function renderRangeCaption$1(items) {
924
- return (jsx("div", { className: "flex justify-between my-2", children: items.map((item, i) => (jsx("span", { className: "text-s-light text-secondary-text", children: item }, String(i)))) }));
918
+ return (jsxs("div", { children: [list.length ? (jsx("div", { className: "absolute w-full flex justify-between -bottom-[3px] px-4", children: list.map((_, i) => (jsx("div", { className: `w-2 h-2 rounded-full ${rangeValue <= i || disabled ? 'bg-gray' : 'bg-primary-main'}` }, String(i)))) })) : null, jsx("div", { className: "absolute inset-x-0 -bottom-1 px-4 leading-[18px]", children: jsx("input", { className: "box-border w-full m-0 cursor-pointer slider relative z-10", style: inputStyle, type: "range", min: min, max: max, step: step, value: rangeValue, disabled: disabled, onInput: ((e) => {
919
+ const rawValue = parseDecimal(e.target?.value);
920
+ const newValue = list.length ? list[rawValue] : rawValue;
921
+ onChange && onChange(newValue || 0);
922
+ }) }) })] }));
925
923
  }
926
924
 
925
+ const DISABLED_INPUT_CLASSES = 'disabled:border-gray disabled:bg-main-divider';
926
+ const DEFAULT_MIN = 1;
927
+ const DEFAULT_MAX = 100;
928
+ const InputRange = JSX(({ className, title, items = [], list = [], min = list.length ? 0 : DEFAULT_MIN, max = list.length ? list.length - 1 : DEFAULT_MAX, step = 1, value = list[0] || min, disabled = false, onChange, }) => {
929
+ const [isFocused, setFocused] = useState(false);
930
+ const handleChange = useCallback((e) => {
931
+ onChange && onChange(parseDecimal(e.target?.value));
932
+ }, [onChange]);
933
+ const handleFocus = useCallback(() => {
934
+ setFocused(true);
935
+ }, []);
936
+ const handleBlur = useCallback(() => {
937
+ setFocused(false);
938
+ onChange && onChange(list.length ? closestValue(list)(value) : clamp(value || 0, min, max));
939
+ }, [onChange, value]);
940
+ return (jsxs("div", { className: className, children: [jsxs("label", { className: "block relative", children: [title ? (jsx(Text, { size: "text-m", font: "font-light", color: "text-primary-text", children: title })) : null, jsx("input", { className: style('m-0 mt-2 font-sans text-h3 w-full h-14', 'border border-solid border-gray rounded-md outline-none', 'p-0 pl-4 box-border', 'text-primary-text hover:border-primary-hover focus:border-primary-text', DISABLED_INPUT_CLASSES), value: isFocused ? value : addSpacesBetweenNumbers(value), disabled: disabled, onInput: handleChange, onFocus: handleFocus, onBlur: handleBlur }), renderRangeWithTicks({ list, min, max, step, disabled, value, onChange })] }), renderRangeCaption(items)] }));
941
+ });
942
+ const closestValue = (list) => (_) => list.reduce((prev, curr) => (Math.abs(curr - _) < Math.abs(prev - _) ? curr : prev));
943
+ const renderRangeCaption = (items) => (jsx("div", { className: "flex justify-between my-2", children: items.map((item, i) => (jsx(Text, { size: "text-s-light", color: "text-secondary-text", children: item }, String(i)))) }));
944
+
927
945
  const renderCreditParameters = (field) => (jsxs("div", { className: "flex justify-between gap-5 mb-7", children: [jsxs("div", { className: "w-1/2", children: [jsx("label", { children: jsx(Text, { size: "text-m-light", children: "\u0421\u0443\u043C\u043C\u0430 \u043A\u0440\u0435\u0434\u0438\u0442\u0430, \u20BD" }) }), jsx(InputRange, { items: ITEMS_CREDIT_AMOUNT, min: MIN_CREDIT_AMOUNT, max: MAX_CREDIT_AMOUNT, ...field('amount') })] }), jsxs("div", { className: "w-1/2", children: [jsx("label", { children: jsx(Text, { size: "text-m-light", children: "\u0421\u0440\u043E\u043A \u043A\u0440\u0435\u0434\u0438\u0442\u0430, \u043C\u0435\u0441\u044F\u0446\u0435\u0432" }) }), jsx(InputRange, { items: ITEMS_CREDIT_TERM, min: MIN_CREDIT_TERM, max: MAX_CREDIT_TERM, ...field('term') })] })] }));
928
946
 
929
947
  const renderRegionDepartment = ({ regions, branches, field }) => (jsxs("div", { className: "flex justify-between gap-5 mb-7", children: [jsx("div", { className: "w-1/2", children: jsx(SelectControl, { label: "\u0420\u0435\u0433\u0438\u043E\u043D", placeholder: "\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u0440\u0435\u0433\u0438\u043E\u043D", options: regions.map(({ code = '', name = '' }) => ({ key: code, text: name })), ...withValidator(field('region'), defaultValidator) }) }), jsx("div", { className: "w-1/2", children: jsx(SelectControl, { label: "\u0410\u0434\u0440\u0435\u0441", placeholder: "\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u0430\u0434\u0440\u0435\u0441", options: branches.map(({ branchCode = '', address = '' }) => ({
@@ -1043,9 +1061,12 @@
1043
1061
  ];
1044
1062
  const Checkbox = JSX(({ className, value, text, disabled, isRadio, onChange }) => {
1045
1063
  const handleChange = useCallback((e) => {
1064
+ if (disabled) {
1065
+ return;
1066
+ }
1046
1067
  e.preventDefault();
1047
1068
  onChange && onChange(!value);
1048
- }, [onChange, value]);
1069
+ }, [onChange, disabled, value]);
1049
1070
  const icon = isRadio ? (jsx("div", { className: "absolute left-1 w-3 h-3 rounded-full bg-primary-main" })) : (jsx(SVG, { paths: CHECK_PATHS, className: "absolute left-1 ml-px block", width: "11", height: "9", fill: "white", viewBox: "0 0 11 9" }));
1050
1071
  return (jsx("div", { className: className, children: jsxs("label", { className: "flex items-center relative cursor-pointer group/box", onClick: handleChange, children: [jsx("div", { className: style('appearance-none w-5 h-5 border-solid cursor-pointer m-0', isRadio ? 'rounded-full border-2' : checkboxStyle(value), value ? 'border-primary-main' : 'border-gray', disabled ? 'bg-main-disabled' : 'group-hover/box:border-primary-hover'), role: "checkbox", "aria-checked": Boolean(value), "aria-disabled": Boolean(disabled) }), value ? icon : null, text ? jsx("span", { className: "font-sans ml-3 text-l-light", children: text }) : null] }) }));
1051
1072
  });
@@ -1114,7 +1135,7 @@
1114
1135
  setResponseType(status);
1115
1136
  return status;
1116
1137
  }, []);
1117
- return (jsx(BlockWrapper, { className: style('font-sans bg-white p-12 pb-9', className), ...rest, children: jsxs("div", { className: "container max-w-[978px]", children: [title ? jsx(Heading, { headingType: "h3", title: title, className: "text-center mb-8" }) : null, COMPONENTS_MAP[typeForm]({ button, link, onSubmit: handleSubmit }), responseType ? jsx(ResponseNotification, { responseType: responseType }) : null] }) }));
1138
+ return (jsx(BlockWrapper, { className: style('font-sans bg-white p-default pb-9', className), ...rest, children: jsxs("div", { className: "container max-w-[978px]", children: [title ? jsx(Heading, { headingType: "h3", title: title, className: "text-center mb-8" }) : null, COMPONENTS_MAP[typeForm]({ button, link, onSubmit: handleSubmit }), responseType ? jsx(ResponseNotification, { responseType: responseType }) : null] }) }));
1118
1139
  });
1119
1140
 
1120
1141
  const BenefitsBlock = JSX(({ className = '', title, benefitList, ...rest }) => (jsxs(BlockWrapper, { className: `p-default flex flex-col items-center ${className}`, ...rest, children: [title ? (jsx(Heading, { headingType: "h3", as: "h2", className: "max-w-[47rem] text-center", title: title })) : null, benefitList?.length ? (jsx("div", { className: "flex flex-wrap w-full justify-center gap-x-20 mt-8", children: benefitList.map(renderStep$1) })) : null] })));
@@ -1146,34 +1167,34 @@
1146
1167
 
1147
1168
  const headlineVersionStyles = {
1148
1169
  XXL: {
1149
- wrapper: 'gap-[18px]',
1150
1170
  title: { headingType: 'h0', as: 'h1' },
1151
1171
  descriptionSize: 'text-h5',
1172
+ descriptionStyle: 'mt-5',
1152
1173
  },
1153
1174
  XL: {
1154
- wrapper: 'gap-4',
1155
1175
  title: { headingType: 'h1', as: 'h1' },
1156
1176
  descriptionSize: 'text-xl-light',
1177
+ descriptionStyle: 'mt-4',
1157
1178
  },
1158
1179
  L: {
1159
- wrapper: 'gap-4',
1160
1180
  title: { headingType: 'h2', as: 'h2' },
1161
1181
  descriptionSize: 'text-xl-light',
1182
+ descriptionStyle: 'mt-4',
1162
1183
  },
1163
1184
  M: {
1164
- wrapper: 'gap-3',
1165
1185
  title: { headingType: 'h3', as: 'h3' },
1166
1186
  descriptionSize: 'text-xl-light',
1187
+ descriptionStyle: 'mt-3',
1167
1188
  },
1168
1189
  S: {
1169
- wrapper: 'gap-2',
1170
1190
  title: { headingType: 'h4', as: 'h4' },
1171
1191
  descriptionSize: 'text-xl-light',
1192
+ descriptionStyle: 'mt-2',
1172
1193
  },
1173
1194
  XS: {
1174
- wrapper: 'gap-2',
1175
1195
  title: { headingType: 'h5', as: 'h5' },
1176
1196
  descriptionSize: 'text-l-light',
1197
+ descriptionStyle: 'mt-2',
1177
1198
  },
1178
1199
  };
1179
1200
  // TODO Move to Gallery and rename
@@ -1191,7 +1212,8 @@
1191
1212
  const Headline = JSX(({ className, title, description, headlineVersion = 'XL', align = 'text-center', as, isPadding = true, isTheme = false, version = '', ...rest }) => {
1192
1213
  const versionStyle = headlineVersionStyles[headlineVersion];
1193
1214
  const paddingStyle = isPadding ? 'p-default' : '';
1194
- return (jsxs(BlockWrapper, { className: style('flex flex-col', paddingStyle, versionStyle.wrapper, className), version: version, isTheme: isTheme, ...rest, children: [title ? (jsx(Heading, { className: style('whitespace-pre-wrap', align), ...versionStyle?.title, as: as || versionStyle?.title.as, title: title })) : null, description ? (jsx(Paragraph, { size: versionStyle.descriptionSize, align: align, children: description })) : null] }));
1215
+ const descriptionStyle = { marginTop: versionStyle.descriptionStyle };
1216
+ return (jsxs(BlockWrapper, { className: style(paddingStyle, className), version: version, isTheme: isTheme, ...rest, children: [title ? (jsx(Heading, { className: style('whitespace-pre-wrap', align), ...versionStyle?.title, as: as || versionStyle?.title.as, title: title })) : null, description ? (jsx(Paragraph, { size: versionStyle.descriptionSize, align: align, ...descriptionStyle, children: description })) : null] }));
1195
1217
  });
1196
1218
 
1197
1219
  const Bonus = JSX((props) => {
@@ -1347,18 +1369,17 @@
1347
1369
  const DEPOSIT_CALC_DEFAULT_DIR = 'deposit-calculator-data';
1348
1370
  const BUSINESS_DEPOSIT_CALC_DEFAULT_DIR = 'business-calculator-data';
1349
1371
 
1350
- const Rate = JSX(({ rate, title = 'Ставка', unit, depositeName, isShowDepositeName, rateBlockClassName }) => (jsxs("div", { children: [jsx(Text, { size: "text-l-light", color: "text-secondary-text", children: title }), jsxs("div", { className: "relative", children: [jsxs("div", { className: "flex justify-start", children: [jsx("span", { className: style('block gradient-color-text font-mohave text-title-huge pr-6 -mt-4', rateBlockClassName), children: String(rate.toFixed(2)).replace('.', ',') }), unit ? (jsx("span", { className: "gradient-color-text text-[65px] leading-[75px]", children: unit })) : ('')] }), depositeName && isShowDepositeName ? (jsx("div", { className: "absolute bottom-7 w-full text-center whitespace-nowrap", children: depositeName })) : null] })] })));
1372
+ const Rate = JSX(({ rate, title = 'Ставка', unit, depositeName, isShowDepositeName, rateBlockClassName, fractionDigits = 2, }) => (jsxs("div", { children: [jsx(Text, { size: "text-l-light", color: "text-secondary-text", children: title }), jsxs("div", { className: "relative", children: [jsxs("div", { className: "flex justify-start gradient-color-text", children: [jsx("span", { className: style('font-mohave text-title-huge pr-6 -mt-4', rateBlockClassName), children: String(rate.toFixed(fractionDigits)).replace('.', ',') }), unit ? jsx("span", { className: "text-7xl", children: unit }) : null] }), depositeName && isShowDepositeName ? (jsx("div", { className: "absolute bottom-7 w-full text-center whitespace-nowrap", children: depositeName })) : null] })] })));
1351
1373
 
1352
1374
  const renderFootnote = (text) => text ? (jsx(Paragraph, { size: "text-s-light", color: "text-secondary-text", children: text })) : null;
1353
1375
 
1354
1376
  const DEFAULT_MONEY_STEP = 1000;
1355
- function renderWantedSumInput(title, params, callback) {
1356
- const { moneyValue, minSum, maxSum, step = DEFAULT_MONEY_STEP, isShowItems = true } = params;
1377
+ function renderWantedSumInput({ isShowItems = true, step = DEFAULT_MONEY_STEP, ...rest }) {
1357
1378
  const items = [
1358
- `От ${addSpacesBetweenNumbers(minSum)} ₽`,
1359
- `До ${addSpacesBetweenNumbers(maxSum)} ₽`,
1379
+ `От ${addSpacesBetweenNumbers(rest.min || 0)} ₽`,
1380
+ `До ${addSpacesBetweenNumbers(rest.max || 0)} ₽`,
1360
1381
  ];
1361
- return (jsx(InputRange, { title: title, items: isShowItems ? items : [], min: minSum, max: maxSum, step: step, value: clamp(moneyValue, minSum, maxSum), onChange: callback }));
1382
+ return jsx(InputRange, { items: isShowItems ? items : [], step: step, ...rest });
1362
1383
  }
1363
1384
 
1364
1385
  const getBonus = (params, bonusTravelValue, bonusOtherValue) => {
@@ -1392,40 +1413,32 @@
1392
1413
  };
1393
1414
 
1394
1415
  const BonusCalculatorForm = JSX(({ className = '', sourceBookDir = '', buttons, footnote }) => {
1395
- const [travelExpenseValue, setTravelExpenseValue] = useState(DEFAULT_TRAVEL_MIN_SUM);
1396
- const handleTravelExpenseValue = useCallback((_) => setTravelExpenseValue(_), []);
1397
- const [restExpenseValue, setRestExpenseValue] = useState(DEFAULT_REST_MIN_SUM);
1398
- const handleRestExpenseValue = useCallback((_) => setRestExpenseValue(_), []);
1399
- const userInputParams = {
1400
- travelExpenseValue,
1401
- restExpenseValue,
1402
- };
1416
+ const [userInputParams, { field }] = useForm({
1417
+ travelExpenseValue: DEFAULT_TRAVEL_MIN_SUM,
1418
+ restExpenseValue: DEFAULT_REST_MIN_SUM,
1419
+ });
1403
1420
  const { minSumTravel, maxSumTravel, minSumOther, maxSumOther, monthBonus, yearBonus } = useBonusCalculatorParams(userInputParams, sourceBookDir);
1404
- return (jsxs("section", { className: style('flex justify-between', className), children: [jsxs("div", { className: "w-[468px]", children: [renderWantedSumInput('Сумма покупок в категории путешествия, ₽', {
1405
- minSum: minSumTravel,
1406
- maxSum: maxSumTravel,
1407
- moneyValue: travelExpenseValue,
1421
+ return (jsxs("section", { className: style('flex justify-between', className), children: [jsxs("div", { className: "w-[468px]", children: [renderWantedSumInput({
1422
+ title: 'Сумма покупок в категории путешествия, ₽',
1423
+ min: minSumTravel,
1424
+ max: maxSumTravel,
1408
1425
  step: 500,
1409
1426
  isShowItems: false,
1410
- }, handleTravelExpenseValue), renderWantedSumInput('Сумма покупок в остальных категориях, ₽', {
1427
+ ...field('travelExpenseValue'),
1428
+ }), renderWantedSumInput({
1429
+ title: 'Сумма покупок в остальных категориях, ₽',
1411
1430
  className: 'mt-7',
1412
- minSum: minSumOther,
1413
- maxSum: maxSumOther,
1414
- moneyValue: restExpenseValue,
1431
+ min: minSumOther,
1432
+ max: maxSumOther,
1415
1433
  step: 500,
1416
1434
  isShowItems: false,
1417
- }, handleRestExpenseValue)] }), jsx("div", { children: monthBonus >= 0 ? (jsx(Rate, { title: "\u0411\u0430\u043B\u043B\u043E\u0432 \u0437\u0430 \u043C\u0435\u0441\u044F\u0446", rate: monthBonus, rateBlockClassName: "tracking-[-14px]" })) : null }), jsxs("div", { className: "w-full max-w-[350px]", children: [yearBonus >= 0 ? jsx(CalculatorValueBlock, { title: "\u0411\u0430\u043B\u043B\u043E\u0432 \u0437\u0430 \u0433\u043E\u0434", value: yearBonus }) : null, renderButtonsSection(buttons, { className: 'mt-7', isVertical: true }), renderFootnote(footnote)] })] }));
1435
+ ...field('restExpenseValue'),
1436
+ })] }), jsx("div", { children: monthBonus >= 0 ? (jsx(Rate, { title: "\u0411\u0430\u043B\u043B\u043E\u0432 \u0437\u0430 \u043C\u0435\u0441\u044F\u0446", rate: monthBonus, rateBlockClassName: "tracking-[-14px]", fractionDigits: 0 })) : null }), jsxs("div", { className: "w-full max-w-[350px]", children: [yearBonus >= 0 ? jsx(CalculatorValueBlock, { title: "\u0411\u0430\u043B\u043B\u043E\u0432 \u0437\u0430 \u0433\u043E\u0434", value: yearBonus }) : null, renderButtonsSection(buttons, { className: 'mt-7', isVertical: true }), renderFootnote(footnote)] })] }));
1418
1437
  });
1419
1438
 
1420
1439
  const STEP_DAYS = 1;
1421
- function renderDaysInput(title, params, callback) {
1422
- const { minDays, maxDays, daysValue } = params;
1423
- const daysText = (days) => {
1424
- const text = Number(days) % 10 === 1 ? 'дня' : 'дней';
1425
- return `${days} ${text}`;
1426
- };
1427
- return (jsx(InputRange, { className: "mt-7", title: title, items: [`От ${daysText(minDays)}`, `До ${daysText(maxDays)}`], min: minDays, max: maxDays, step: STEP_DAYS, value: clamp(daysValue, minDays, maxDays), onChange: callback }));
1428
- }
1440
+ const renderDaysInput = (props) => (jsx(InputRange, { className: "mt-7", items: [`От ${daysText(props.min || 0)}`, `До ${daysText(props.max || 0)}`], step: STEP_DAYS, ...props }));
1441
+ const daysText = (days) => `${days} ${Number(days) % 10 === 1 ? 'дня' : 'дней'}`;
1429
1442
 
1430
1443
  const orientationStyleMap = {
1431
1444
  horizontal: 'gap-10',
@@ -1433,21 +1446,15 @@
1433
1446
  };
1434
1447
  const RadioButtonGroup = JSX(({ items, checkedItem, onChange: onChangeCheckedItem, orientation = 'horizontal' }) => (jsx("div", { className: `flex ${orientationStyleMap[orientation]}`, children: items?.map(({ id, text }) => (jsx(Checkbox, { isRadio: true, text: text, value: checkedItem === id, onChange: () => onChangeCheckedItem && onChangeCheckedItem(id) }, String(id)))) })));
1435
1448
 
1436
- const EVERY_MONTH = 'everyMonth';
1437
- const AT_END_TERM = 'atEndTerm';
1438
- const depositTypeItems = [
1439
- {
1440
- id: EVERY_MONTH,
1441
- text: 'Ежемесячно',
1442
- },
1443
- {
1444
- id: AT_END_TERM,
1445
- text: 'В конце срока',
1446
- },
1447
- ];
1448
- function renderInterestPayment({ isMonthlyInterestPayment, callback, title, orientation = 'horizontal', }) {
1449
- return (jsxs("div", { children: [title ? (jsx("div", { className: "mb-3", children: jsx(Text, { color: "text-secondary-text", font: "font-light", children: title }) })) : null, jsx("div", { children: jsx(RadioButtonGroup, { orientation: orientation, items: depositTypeItems, checkedItem: isMonthlyInterestPayment ? EVERY_MONTH : AT_END_TERM, onChange: (text) => callback && callback(text === EVERY_MONTH) }) })] }));
1450
- }
1449
+ const renderBinaryRadioButtonGroup = ({ items, title, orientation = 'horizontal', value, onChange, }) => (jsxs("div", { children: [title ? (jsx("div", { className: "mb-3", children: jsx(Text, { color: "text-secondary-text", font: "font-light", children: title }) })) : null, jsx(RadioButtonGroup, { orientation: orientation, items: items, checkedItem: items[value ? 0 : 1].id, onChange: (_) => onChange && onChange(_ === items[0].id) })] }));
1450
+
1451
+ const renderInterestPayment = (props) => renderBinaryRadioButtonGroup({
1452
+ ...props,
1453
+ items: [
1454
+ { id: 'everyMonth', text: 'Ежемесячно' },
1455
+ { id: 'atEndTerm', text: 'В конце срока' },
1456
+ ],
1457
+ });
1451
1458
 
1452
1459
  const UnknownRate = JSX(({ title = 'Ставка' }) => (jsxs("div", { children: [jsx(Text, { size: "text-l-light", color: "text-secondary-text", children: title }), jsx("div", { className: "mt-1 pt-1 pl-5 pb-1.5", children: jsx(Icon, { name: "PercentIcon", width: "90", height: "85" }) }), jsx("div", { className: "w-[250px] mt-3.5", children: jsxs(Paragraph, { size: "text-xl-light", color: "text-primary-text", children: ["\u041F\u0440\u043E\u0446\u0435\u043D\u0442\u043D\u0430\u044F \u0441\u0442\u0430\u0432\u043A\u0430 \u0434\u043B\u044F \u0441\u0440\u043E\u043A\u0430 ", jsx("strong", { children: "1-30 \u0434\u043D\u0435\u0439" }), " \u0443\u0441\u0442\u0430\u043D\u0430\u0432\u043B\u0438\u0432\u0430\u0435\u0442\u0441\u044F \u043F\u0440\u0438 \u043E\u0431\u0440\u0430\u0449\u0435\u043D\u0438\u0438 \u0432 \u0411\u0430\u043D\u043A"] }) })] })));
1453
1460
 
@@ -1537,101 +1544,47 @@
1537
1544
  };
1538
1545
 
1539
1546
  const BusinessDepositCalculatorForm = JSX(({ className = '', sourceBookDir, buttons, footnote, bottomFootnote, isShowDepositeName }) => {
1540
- const [moneyValue, setMoneyValue] = useState(BUSINESS_DEFAULT_SUM);
1541
- const handleMoneyValue = useCallback((_) => setMoneyValue(_), []);
1542
- const [daysValue, setDaysValue] = useState(BUSINESS_DEFAULT_DAYS);
1543
- const handleDaysValue = useCallback((_) => setDaysValue(_), []);
1544
- const [isReplenished, toggleIsReplenished] = useState(false);
1545
- const handleIsReplenished = useCallback((_) => toggleIsReplenished(_), []);
1546
- const [isPartialWithdrawal, toggleIsPartialWithdrawal] = useState(false);
1547
- const handleIsPartialWithdrawal = useCallback((_) => toggleIsPartialWithdrawal(_), []);
1548
- const [isSmallBusiness, toggleIsSmallBusiness] = useState(false);
1549
- const handleIsSmallBusiness = useCallback((_) => toggleIsSmallBusiness(_), []);
1550
- const [isMonthlyInterestPayment, toggleIsMonthlyInterestPayment] = useState(false);
1551
- const handleIsMonthlyInterestPayment = useCallback((_) => toggleIsMonthlyInterestPayment(_), []);
1552
- const userInputParams = {
1553
- moneyValue,
1554
- daysValue,
1555
- isReplenished,
1556
- isPartialWithdrawal,
1557
- isSmallBusiness,
1558
- isMonthlyInterestPayment,
1559
- };
1547
+ const [userInputParams, { field }] = useForm({
1548
+ moneyValue: BUSINESS_DEFAULT_SUM,
1549
+ daysValue: BUSINESS_DEFAULT_DAYS,
1550
+ isReplenished: false,
1551
+ isPartialWithdrawal: false,
1552
+ isSmallBusiness: false,
1553
+ isMonthlyInterestPayment: false,
1554
+ });
1560
1555
  const calculatorParams = useBusinessDepositCalculatorParams(userInputParams, sourceBookDir);
1561
1556
  const { income, finalSum, rate, depositeName, isShowUnknownRate } = calculatorParams;
1562
- return (jsxs("section", { className: className, children: [jsxs("div", { className: "flex justify-between", children: [jsxs("div", { className: "w-[486px]", children: [renderWantedSumInput('Сумма вклада, ₽', calculatorParams, handleMoneyValue), renderDaysInput('Срок вклада, дни', calculatorParams, handleDaysValue), jsxs("div", { className: "mt-7 flex justify-between", children: [renderBusinessDepositParamsForm({
1563
- ...calculatorParams,
1564
- handleIsReplenished,
1565
- handleIsPartialWithdrawal,
1566
- handleIsSmallBusiness,
1567
- }), renderInterestPayment({
1568
- isMonthlyInterestPayment,
1569
- callback: handleIsMonthlyInterestPayment,
1557
+ return (jsxs("section", { className: className, children: [jsxs("div", { className: "flex justify-between", children: [jsxs("div", { className: "w-[486px]", children: [renderWantedSumInput({
1558
+ title: 'Сумма вклада, ₽',
1559
+ min: calculatorParams.minSum,
1560
+ max: calculatorParams.maxSum,
1561
+ ...field('moneyValue'),
1562
+ value: calculatorParams.moneyValue,
1563
+ }), renderDaysInput({
1564
+ title: 'Срок вклада, дни',
1565
+ min: calculatorParams.minDays,
1566
+ max: calculatorParams.maxDays,
1567
+ ...field('daysValue'),
1568
+ value: calculatorParams.daysValue,
1569
+ }), jsxs("div", { className: "mt-7 flex justify-between", children: [renderBusinessDepositParamsForm(calculatorParams, field), renderInterestPayment({
1570
1570
  title: 'Выплата процентов',
1571
1571
  orientation: 'vertical',
1572
+ ...field('isMonthlyInterestPayment'),
1572
1573
  })] })] }), isShowUnknownRate ? (jsx(UnknownRate, {})) : (jsx(Rate, { rate: rate, depositeName: depositeName, isShowDepositeName: isShowDepositeName, rateBlockClassName: "tracking-[-25px]", unit: "%" })), jsxs("div", { className: "w-full max-w-[350px]", children: [jsx(CalculatorValueBlock, { title: "\u0414\u043E\u0445\u043E\u0434 \u043F\u043E \u0432\u043A\u043B\u0430\u0434\u0443", value: income, postfix: "\u20BD", prefix: "+" }), jsx(CalculatorValueBlock, { title: "\u0421\u0443\u043C\u043C\u0430 \u0432 \u043A\u043E\u043D\u0446\u0435 \u0441\u0440\u043E\u043A\u0430", value: finalSum, postfix: "\u20BD" }), renderButtonsSection(buttons, { className: 'mt-7', isVertical: true }), jsx("div", { className: "mt-7", children: renderFootnote(footnote) })] })] }), jsx("div", { className: "mt-5", children: renderFootnote(bottomFootnote) })] }));
1573
1574
  });
1574
- const renderBusinessDepositParamsForm = ({ isDisabledOperatingDeposit, isReplenished, isPartialWithdrawal, isSmallBusiness, handleIsReplenished, handleIsPartialWithdrawal, handleIsSmallBusiness, }) => (jsxs("div", { children: [jsx(Checkbox, { text: "\u041F\u043E\u043F\u043E\u043B\u043D\u0435\u043D\u0438\u0435", disabled: isDisabledOperatingDeposit, value: isReplenished, onChange: handleIsReplenished }), jsx(Checkbox, { className: "mt-3", disabled: isDisabledOperatingDeposit, text: "\u0427\u0430\u0441\u0442\u0438\u0447\u043D\u043E\u0435 \u0441\u043D\u044F\u0442\u0438\u0435", value: isPartialWithdrawal, onChange: handleIsPartialWithdrawal }), jsx(Checkbox, { className: "mt-3", text: "\u042F\u0432\u043B\u044F\u044E\u0441\u044C \u043C\u0430\u043B\u044B\u043C \u043F\u0440\u0435\u0434\u043F\u0440\u0438\u044F\u0442\u0438\u0435\u043C", value: isSmallBusiness, onChange: handleIsSmallBusiness })] }));
1575
-
1576
- const DISABLED_INPUT_CLASSES = 'disabled:border-gray disabled:bg-main-divider';
1577
- const InputListRange = JSX(({ className, title, items = [], list = [], value = list[0], disabled = false, onChange }) => {
1578
- const min = 0;
1579
- const max = list.length - 1;
1580
- const step = 1;
1581
- const handleTextChange = (e) => {
1582
- if (!onChange) {
1583
- return;
1584
- }
1585
- const newValue = parseInt(e.target.value);
1586
- const closetValue = list.reduce(function (prev, curr) {
1587
- return Math.abs(curr - newValue) < Math.abs(prev - newValue) ? curr : prev;
1588
- });
1589
- onChange(Number(getSanitizedValue(closetValue.toString())));
1590
- };
1591
- const handleRangeChange = (e) => {
1592
- if (!onChange) {
1593
- return;
1594
- }
1595
- const val = list.at(clamp(parseInt(e.target.value), min, max)) || 0;
1596
- onChange(Number(getSanitizedValue(val.toString())));
1597
- };
1598
- const valueIndex = list.findIndex((item) => item === value) || 0;
1599
- const inputStyle = {
1600
- backgroundSize: `${(((valueIndex - min) * 100) / (max - min)).toFixed(2)}% 100%`,
1601
- };
1602
- return (jsxs("div", { className: className, children: [jsxs("label", { className: "block relative", children: [title ? jsx("span", { className: "text-m-light text-primary-text", children: title }) : null, jsx("input", { className: `m-0 mt-2 font-sans text-h3 w-full h-14 border border-solid border-gray rounded-md
1603
- outline-none p-0 pl-4 box-border text-primary-text hover:border-primary-hover focus:border-primary-text ${DISABLED_INPUT_CLASSES}`, value: addSpacesBetweenNumbers(value), disabled: disabled, onChange: handleTextChange, onBlur: handleTextChange }), list.length ? (jsx("div", { className: "absolute w-full flex justify-between -bottom-[3px] px-4", children: list.map(renderTick(valueIndex, disabled)) })) : null, jsx("div", { className: "absolute inset-x-0 -bottom-1 px-4 leading-[18px]", children: jsx("input", { className: "box-border w-full m-0 cursor-pointer slider relative z-10", type: "range", min: min, max: max, step: step, value: valueIndex, disabled: disabled, onChange: handleRangeChange, style: inputStyle }) })] }), renderRangeCaption(items)] }));
1604
- });
1605
- const renderTick = (valueIndex, disabled) => (value, i) => (jsx("span", { className: `w-2 h-2 rounded-full ${valueIndex <= i || disabled ? 'bg-gray' : 'bg-primary-main'}` }, String(i)));
1606
- function renderRangeCaption(items) {
1607
- return (jsx("div", { className: "flex justify-between my-2", children: items.map((item, i) => (jsx("span", { className: "text-s-light text-secondary-text", children: item }, String(i)))) }));
1608
- }
1575
+ const renderBusinessDepositParamsForm = (calculatorParams, field) => (jsxs("div", { children: [jsx(Checkbox, { text: "\u041F\u043E\u043F\u043E\u043B\u043D\u0435\u043D\u0438\u0435", disabled: calculatorParams.isDisabledOperatingDeposit, ...field('isReplenished'), value: calculatorParams.isReplenished }), jsx(Checkbox, { className: "mt-3", disabled: calculatorParams.isDisabledOperatingDeposit, text: "\u0427\u0430\u0441\u0442\u0438\u0447\u043D\u043E\u0435 \u0441\u043D\u044F\u0442\u0438\u0435", ...field('isPartialWithdrawal'), value: calculatorParams.isPartialWithdrawal }), jsx(Checkbox, { className: "mt-3", text: "\u042F\u0432\u043B\u044F\u044E\u0441\u044C \u043C\u0430\u043B\u044B\u043C \u043F\u0440\u0435\u0434\u043F\u0440\u0438\u044F\u0442\u0438\u0435\u043C", ...field('isSmallBusiness'), value: calculatorParams.isSmallBusiness })] }));
1609
1576
 
1610
1577
  const STEP_MONTHS = 1;
1611
- function renderMonthsInput(title, params, callback) {
1612
- const { minMonths, maxMonths, monthsValue, availableMonths } = params;
1613
- const monthText = (month) => {
1614
- const text = Number(month) % 10 === 1 ? 'месяца' : 'месяцев';
1615
- return `${month} ${text}`;
1616
- };
1617
- return availableMonths?.length ? (jsx(InputListRange, { className: "mt-7", title: title, items: [`От ${monthText(minMonths)}`, `До ${monthText(maxMonths)}`], list: availableMonths, value: clamp(monthsValue, minMonths, maxMonths), onChange: callback })) : (jsx(InputRange, { className: "mt-7", title: title, items: [`От ${monthText(minMonths)}`, `До ${monthText(maxMonths)}`], min: minMonths, max: maxMonths, step: STEP_MONTHS, value: clamp(monthsValue, minMonths, maxMonths), onChange: callback }));
1618
- }
1578
+ const renderMonthsInput = ({ min = 0, max = 0, availableMonths, ...rest }) => (jsx(InputRange, { className: "mt-7", items: [`От ${monthText(min)}`, `До ${monthText(max)}`], step: STEP_MONTHS, ...(availableMonths?.length ? { list: availableMonths } : { min, max }), ...rest }));
1579
+ const monthText = (month) => `${month} ${Number(month) % 10 === 1 ? 'месяца' : 'месяцев'}`;
1619
1580
 
1620
- const ANNUITY = 'annuity';
1621
- const DIFFERENTIAL = 'differential';
1622
- const paymentTypeItems = [
1623
- {
1624
- id: ANNUITY,
1625
- text: 'Аннуитетный',
1626
- },
1627
- {
1628
- id: DIFFERENTIAL,
1629
- text: 'Дифференцированный',
1630
- },
1631
- ];
1632
- function renderPaymentType({ isAnnuity, callback, title, orientation = 'horizontal', }) {
1633
- return (jsxs("div", { children: [title ? (jsx("div", { className: "mb-3", children: jsx(Text, { color: "text-secondary-text", font: "font-light", children: title }) })) : null, jsx(RadioButtonGroup, { orientation: orientation, items: paymentTypeItems, checkedItem: isAnnuity ? ANNUITY : DIFFERENTIAL, onChange: (text) => callback && callback(text === ANNUITY) })] }));
1634
- }
1581
+ const renderPaymentType = (props) => renderBinaryRadioButtonGroup({
1582
+ ...props,
1583
+ items: [
1584
+ { id: 'annuity', text: 'Аннуитетный' },
1585
+ { id: 'differential', text: 'Дифференцированный' },
1586
+ ],
1587
+ });
1635
1588
 
1636
1589
  /**
1637
1590
  * Формулы расчёта аннуитетных и дифференцированных платежей:
@@ -1702,72 +1655,48 @@
1702
1655
  return isExclude || userInputParams[fieldKey] === row[fieldKey];
1703
1656
  };
1704
1657
 
1705
- const CreditCalculatorForm = JSX(({ className = '', sourceBookDir, buttons, footnote, paramsViewSettings }) => {
1706
- const [isAnnuity, toggleIsAnnuity] = useState(false);
1707
- const [isSalaryClient, toggleIsSalaryClient] = useState(false);
1708
- const handleIsSalaryClient = useCallback((_) => toggleIsSalaryClient(_), []);
1709
- const [isStateEmployee, toggleIsStateEmployee] = useState(false);
1710
- const handleIsStateEmployee = useCallback((_) => toggleIsStateEmployee(_), []);
1711
- const [isPensionClient, toggleIsPensionClient] = useState(false);
1712
- const handleIsPensionClient = useCallback((_) => toggleIsPensionClient(_), []);
1713
- const [isInsurance, toggleIsInsurance] = useState(true);
1714
- const handleIsInsurance = useCallback((_) => toggleIsInsurance(_), []);
1715
- const [moneyValue, setMoneyValue] = useState(CREDIT_DEFAULT_SUM);
1716
- const handleMoneyValue = useCallback((_) => setMoneyValue(_), []);
1717
- const [monthsValue, setMonthsValue] = useState(DEFAULT_MONTHS);
1718
- const handleMonthsValue = useCallback((_) => setMonthsValue(_), []);
1719
- const userInputParams = {
1720
- isAnnuity,
1721
- isInsurance,
1722
- isSalaryClient,
1723
- isPensionClient,
1724
- isStateEmployee,
1725
- moneyValue,
1726
- monthsValue,
1727
- };
1658
+ const CreditCalculatorForm = JSX(({ className, sourceBookDir, buttons, footnote, paramsViewSettings }) => {
1659
+ const [userInputParams, { field }] = useForm({
1660
+ isAnnuity: false,
1661
+ isInsurance: true,
1662
+ isSalaryClient: false,
1663
+ isPensionClient: false,
1664
+ isStateEmployee: false,
1665
+ moneyValue: CREDIT_DEFAULT_SUM,
1666
+ monthsValue: DEFAULT_MONTHS,
1667
+ });
1728
1668
  const calculatorParams = useCreditCalculatorParams(userInputParams, sourceBookDir, paramsViewSettings);
1729
- useEffect(() => {
1730
- setMoneyValue(clamp(moneyValue, calculatorParams.minSum, calculatorParams.maxSum));
1731
- setMonthsValue(clamp(monthsValue, calculatorParams.minMonths, calculatorParams.maxMonths));
1732
- }, [calculatorParams]);
1733
- return (jsxs("section", { className: style('flex justify-between', className), children: [jsxs("div", { className: "w-[468px]", children: [renderWantedSumInput('Сумма кредита, ₽', { ...calculatorParams, step: 500 }, handleMoneyValue), renderMonthsInput('Срок кредита, месяцев', calculatorParams, handleMonthsValue), jsx("div", { className: "mt-7", children: renderCreditParamsForm({
1734
- ...calculatorParams,
1735
- ...paramsViewSettings,
1736
- handleIsSalaryClient,
1737
- handleIsStateEmployee,
1738
- handleIsPensionClient,
1739
- handleIsInsurance,
1740
- }) })] }), renderRate(calculatorParams.rate), jsxs("div", { className: "w-full max-w-[350px]", children: [jsx(CalculatorValueBlock, { title: 'Ежемесячный платеж', value: calculatorParams.monthlyPayment, postfix: "\u20BD" }), renderPaymentType({
1741
- isAnnuity,
1742
- orientation: 'vertical',
1743
- callback: toggleIsAnnuity,
1744
- }), renderButtonsSection(buttons, { className: 'mt-7', isVertical: true }), renderFootnote(footnote)] })] }));
1745
- });
1746
- const renderRate = (rate) => (jsx(Rate, { title: "\u0421\u0442\u0430\u0432\u043A\u0430", rate: rate, rateBlockClassName: "tracking-[-25px]", unit: "%" }));
1747
- const renderCreditParamsForm = ({ isSalaryClient, isStateEmployee, isPensionClient, isInsurance, isShowSalaryClient, isShowStateEmployee, isShowPensionClient, isShowInsurance, handleIsSalaryClient, handleIsStateEmployee, handleIsPensionClient, handleIsInsurance, }) => (jsxs("div", { children: [isShowSalaryClient ? (jsx(Checkbox, { text: "\u041F\u043E\u043B\u0443\u0447\u0430\u044E \u0437\u0430\u0440\u043F\u043B\u0430\u0442\u0443 \u043D\u0430 \u0441\u0447\u0451\u0442 \u0432 \u0420\u043E\u0441\u0441\u0435\u043B\u044C\u0445\u043E\u0437\u0431\u0430\u043D\u043A\u0435", value: isSalaryClient, onChange: handleIsSalaryClient })) : null, isShowStateEmployee ? (jsx(Checkbox, { className: "mt-3", text: "\u0420\u0430\u0431\u043E\u0442\u0430\u044E \u0432 \u0431\u044E\u0434\u0436\u0435\u0442\u043D\u043E\u0439 \u043E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u0438", value: isStateEmployee, onChange: handleIsStateEmployee })) : null, isShowPensionClient ? (jsx(Checkbox, { className: "mt-3", text: "\u041F\u043E\u043B\u0443\u0447\u0430\u044E \u043F\u0435\u043D\u0441\u0438\u044E \u043D\u0430 \u043A\u0430\u0440\u0442\u0443 \u0420\u043E\u0441\u0441\u0435\u043B\u044C\u0445\u043E\u0437\u0431\u0430\u043D\u043A\u0430", value: isPensionClient, onChange: handleIsPensionClient })) : null, isShowInsurance ? (jsx(Checkbox, { className: "mt-3", text: "\u041A\u043E\u043C\u043F\u043B\u0435\u043A\u0441\u043D\u0430\u044F \u0441\u0442\u0440\u0430\u0445\u043E\u0432\u0430\u044F \u0437\u0430\u0449\u0438\u0442\u0430", value: isInsurance, onChange: handleIsInsurance })) : null] }));
1748
-
1749
- const REMOTE_REGISTRATION = 'remote';
1750
- const OFFICE_REGISTRATION = 'office';
1751
- const registrationTypeItems = [
1752
- {
1753
- id: OFFICE_REGISTRATION,
1754
- text: 'Офис Банка',
1755
- },
1756
- {
1757
- id: REMOTE_REGISTRATION,
1758
- text: 'Дистанционно',
1759
- },
1760
- ];
1761
- function renderRegistrationType({ isRemoteRegistration, callback, title, orientation = 'horizontal', }) {
1762
- return (jsxs("div", { children: [title ? (jsx("div", { className: "mb-3", children: jsx(Text, { color: "text-secondary-text", font: "font-light", children: title }) })) : null, jsx("div", { children: jsx(RadioButtonGroup, { orientation: orientation, items: registrationTypeItems, checkedItem: isRemoteRegistration ? REMOTE_REGISTRATION : OFFICE_REGISTRATION, onChange: (text) => callback && callback(text === REMOTE_REGISTRATION) }) })] }));
1763
- }
1669
+ return (jsxs("section", { className: style('flex justify-between', className), children: [jsxs("div", { className: "w-[468px]", children: [renderWantedSumInput({
1670
+ title: 'Сумма кредита, ₽',
1671
+ step: 500,
1672
+ min: calculatorParams.minSum,
1673
+ max: calculatorParams.maxSum,
1674
+ ...field('moneyValue'),
1675
+ value: calculatorParams.moneyValue,
1676
+ }), renderMonthsInput({
1677
+ title: 'Срок кредита, месяцев',
1678
+ min: calculatorParams.minMonths,
1679
+ max: calculatorParams.maxMonths,
1680
+ ...field('monthsValue'),
1681
+ value: calculatorParams.monthsValue,
1682
+ }), jsx("div", { className: "mt-7", children: renderCreditParamsForm({ ...calculatorParams, ...paramsViewSettings }, field) })] }), jsx(Rate, { title: "\u0421\u0442\u0430\u0432\u043A\u0430", rate: calculatorParams.rate, rateBlockClassName: "tracking-[-25px]", unit: "%" }), jsxs("div", { className: "w-full max-w-[350px]", children: [jsx(CalculatorValueBlock, { title: 'Ежемесячный платеж', value: calculatorParams.monthlyPayment, postfix: "\u20BD" }), renderPaymentType({ orientation: 'vertical', ...field('isAnnuity') }), renderButtonsSection(buttons, { className: 'mt-7', isVertical: true }), renderFootnote(footnote)] })] }));
1683
+ });
1684
+ const renderCreditParamsForm = (params, field) => (jsxs("div", { children: [params.isShowSalaryClient ? (jsx(Checkbox, { text: "\u041F\u043E\u043B\u0443\u0447\u0430\u044E \u0437\u0430\u0440\u043F\u043B\u0430\u0442\u0443 \u043D\u0430 \u0441\u0447\u0451\u0442 \u0432 \u0420\u043E\u0441\u0441\u0435\u043B\u044C\u0445\u043E\u0437\u0431\u0430\u043D\u043A\u0435", ...field('isSalaryClient'), value: params.isSalaryClient })) : null, params.isShowStateEmployee ? (jsx(Checkbox, { className: "mt-3", text: "\u0420\u0430\u0431\u043E\u0442\u0430\u044E \u0432 \u0431\u044E\u0434\u0436\u0435\u0442\u043D\u043E\u0439 \u043E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u0438", ...field('isStateEmployee'), value: params.isStateEmployee })) : null, params.isShowPensionClient ? (jsx(Checkbox, { className: "mt-3", text: "\u041F\u043E\u043B\u0443\u0447\u0430\u044E \u043F\u0435\u043D\u0441\u0438\u044E \u043D\u0430 \u043A\u0430\u0440\u0442\u0443 \u0420\u043E\u0441\u0441\u0435\u043B\u044C\u0445\u043E\u0437\u0431\u0430\u043D\u043A\u0430", ...field('isPensionClient'), value: params.isPensionClient })) : null, params.isShowInsurance ? (jsx(Checkbox, { className: "mt-3", text: "\u041A\u043E\u043C\u043F\u043B\u0435\u043A\u0441\u043D\u0430\u044F \u0441\u0442\u0440\u0430\u0445\u043E\u0432\u0430\u044F \u0437\u0430\u0449\u0438\u0442\u0430", ...field('isInsurance'), value: params.isInsurance })) : null] }));
1685
+
1686
+ const renderRegistrationType = (props) => renderBinaryRadioButtonGroup({
1687
+ ...props,
1688
+ items: [
1689
+ { id: 'remote', text: 'Дистанционно' },
1690
+ { id: 'office', text: 'Офис Банка' },
1691
+ ],
1692
+ });
1764
1693
 
1765
1694
  const arrayByRange = (start, stop, step = 1) => Array.from({ length: Math.abs(stop - start) / step + 1 }, (value, index) => stop >= start ? start + index * step : start - index * step);
1766
1695
 
1767
1696
  const useDepositCalculatorParams = (userInputParams, sourceBookDir, paramsViewSettings) => {
1768
1697
  const { moneyValue, monthsValue } = userInputParams;
1769
1698
  const data = useCalculatorParams(sourceBookDir || DEPOSIT_CALC_DEFAULT_DIR);
1770
- const defaultMonth = data?.rateRows[0]
1699
+ const defaultMonth = data?.rateRows?.[0]
1771
1700
  ? getMiddleMonth(data.rateRows[0].minMonths, data.rateRows[0].maxMonths)
1772
1701
  : 1;
1773
1702
  const isExcludeMonthlyInterestPayment = !paramsViewSettings?.isShowMonthlyInterestPayment;
@@ -1816,48 +1745,45 @@
1816
1745
  const checkRowByParam = ({ row, userInputParams, paramKey, isExclude }) => isExclude || userInputParams[paramKey] === row[paramKey];
1817
1746
  const getMiddleMonth = (minMonths, maxMonths) => minMonths + Math.round((maxMonths - minMonths) / 2);
1818
1747
 
1819
- const DepositCalculatorForm = JSX(({ className = '', sourceBookDir, buttons, footnote, paramsViewSettings }) => {
1820
- const [moneyValue, setMoneyValue] = useState(DEPOSIT_DEFAULT_SUM);
1821
- const handleMoneyValue = useCallback((_) => setMoneyValue(_), []);
1822
- const [monthsValue, setMonthsValue] = useState(0);
1823
- const [isMonthlyInterestPayment, toggleIsMonthlyInterestPayment] = useState(false);
1824
- const handleIsMonthlyInterestPayment = useCallback((_) => toggleIsMonthlyInterestPayment(_), []);
1825
- const [isRemoteRegistration, toggleIsRemoteRegistration] = useState(false);
1826
- const handleIsRemoteRegistration = useCallback((_) => toggleIsRemoteRegistration(_), []);
1827
- const userInputParams = {
1828
- moneyValue,
1829
- monthsValue,
1830
- isMonthlyInterestPayment,
1831
- isRemoteRegistration,
1832
- };
1833
- const handleMonthsValue = useCallback((_) => setMonthsValue(_), []);
1748
+ const DepositCalculatorForm = JSX(({ className, sourceBookDir, buttons, footnote, paramsViewSettings }) => {
1749
+ const [userInputParams, { field }] = useForm({
1750
+ moneyValue: DEPOSIT_DEFAULT_SUM,
1751
+ monthsValue: 0,
1752
+ isMonthlyInterestPayment: false,
1753
+ isRemoteRegistration: false,
1754
+ });
1834
1755
  const calculatorParams = useDepositCalculatorParams(userInputParams, sourceBookDir, paramsViewSettings);
1835
1756
  const { defaultMonth, income, finalSum, rate } = calculatorParams;
1757
+ const { onChange: setMonthsValue } = field('monthsValue');
1836
1758
  useEffect(() => {
1837
- setMonthsValue(defaultMonth);
1759
+ setMonthsValue && setMonthsValue(defaultMonth);
1838
1760
  }, [defaultMonth]);
1839
- return (jsxs("section", { className: style('flex justify-between', className), children: [jsxs("div", { className: "w-[468px]", children: [renderWantedSumInput('Сумма вклада, ₽', {
1840
- ...calculatorParams,
1841
- }, handleMoneyValue), renderMonthsInput('Срок вклада, месяцев', {
1842
- ...calculatorParams,
1843
- }, handleMonthsValue), jsx("div", { className: "mt-7", children: renderDepositParamsForm({
1844
- ...calculatorParams,
1845
- ...paramsViewSettings,
1846
- handleIsMonthlyInterestPayment,
1847
- handleIsRemoteRegistration,
1848
- }) })] }), jsx(Rate, { rate: rate, rateBlockClassName: "tracking-[-25px]", unit: "%" }), jsxs("div", { className: "w-full max-w-[350px]", children: [jsx(CalculatorValueBlock, { title: "\u0414\u043E\u0445\u043E\u0434 \u043F\u043E \u0432\u043A\u043B\u0430\u0434\u0443", value: income, postfix: "\u20BD", prefix: "+" }), jsx(CalculatorValueBlock, { title: "\u0421\u0443\u043C\u043C\u0430 \u0432 \u043A\u043E\u043D\u0446\u0435 \u0441\u0440\u043E\u043A\u0430", value: finalSum, postfix: "\u20BD" }), renderButtonsSection(buttons, { className: 'mt-7', isVertical: true }), renderFootnote(footnote)] })] }));
1849
- });
1850
- const renderDepositParamsForm = ({ isMonthlyInterestPayment, isRemoteRegistration, isShowMonthlyInterestPayment, isShowRemoteRegistration, handleIsMonthlyInterestPayment, handleIsRemoteRegistration, }) => (jsxs("div", { className: "flex flex-col gap-y-7", children: [isShowMonthlyInterestPayment
1761
+ return (jsxs("section", { className: style('flex justify-between', className), children: [jsxs("div", { className: "w-[468px]", children: [renderWantedSumInput({
1762
+ title: 'Сумма вклада, ₽',
1763
+ min: calculatorParams.minSum,
1764
+ max: calculatorParams.maxSum,
1765
+ ...field('moneyValue'),
1766
+ value: calculatorParams.moneyValue,
1767
+ }), renderMonthsInput({
1768
+ title: 'Срок вклада, месяцев',
1769
+ min: calculatorParams.minMonths,
1770
+ max: calculatorParams.maxMonths,
1771
+ availableMonths: calculatorParams.availableMonths,
1772
+ ...field('monthsValue'),
1773
+ value: calculatorParams.monthsValue,
1774
+ }), jsx("div", { className: "mt-7", children: renderDepositParamsForm({ ...calculatorParams, ...paramsViewSettings }, field) })] }), jsx(Rate, { rate: rate, rateBlockClassName: "tracking-[-25px]", unit: "%" }), jsxs("div", { className: "w-full max-w-[350px]", children: [jsx(CalculatorValueBlock, { title: "\u0414\u043E\u0445\u043E\u0434 \u043F\u043E \u0432\u043A\u043B\u0430\u0434\u0443", value: income, postfix: "\u20BD", prefix: "+" }), jsx(CalculatorValueBlock, { title: "\u0421\u0443\u043C\u043C\u0430 \u0432 \u043A\u043E\u043D\u0446\u0435 \u0441\u0440\u043E\u043A\u0430", value: finalSum, postfix: "\u20BD" }), renderButtonsSection(buttons, { className: 'mt-7', isVertical: true }), renderFootnote(footnote)] })] }));
1775
+ });
1776
+ const renderDepositParamsForm = (params, field) => (jsxs("div", { className: "flex flex-col gap-y-7", children: [params.isShowMonthlyInterestPayment
1851
1777
  ? renderInterestPayment({
1852
- isMonthlyInterestPayment,
1853
- callback: handleIsMonthlyInterestPayment,
1854
1778
  title: 'Выплата процентов',
1779
+ ...field('isMonthlyInterestPayment'),
1780
+ value: params.isMonthlyInterestPayment,
1855
1781
  })
1856
- : null, isShowRemoteRegistration
1782
+ : null, params.isShowRemoteRegistration
1857
1783
  ? renderRegistrationType({
1858
- isRemoteRegistration,
1859
- callback: handleIsRemoteRegistration,
1860
1784
  title: 'Оформление',
1785
+ ...field('isRemoteRegistration'),
1786
+ value: params.isRemoteRegistration,
1861
1787
  })
1862
1788
  : null] }));
1863
1789
 
@@ -1887,8 +1813,8 @@
1887
1813
  itemCount: calculatorTabs?.length,
1888
1814
  visibleItemCount: COLUMNS_FOR_SCROLL,
1889
1815
  });
1890
- return (jsxs(BlockWrapper, { className: `box-border overflow-hidden relative w-100 ${className}`, ...rest, children: [jsxs("div", { className: "bg-white", children: [tabsNav.length > 1
1891
- ? renderTabs({ activeIndex, tabsNav, slideIndexShift, onClick: handleSlideIndexShift })
1816
+ return (jsxs(BlockWrapper, { className: style('box-border overflow-hidden relative w-100', className), ...rest, children: [jsxs("div", { className: "bg-white", children: [tabsNav.length > 1
1817
+ ? renderTabs$1({ activeIndex, tabsNav, slideIndexShift, onClick: handleSlideIndexShift })
1892
1818
  : null, renderArrows({
1893
1819
  ...controls,
1894
1820
  btnClass: ['left-3', 'right-3'],
@@ -1906,13 +1832,12 @@
1906
1832
  const iconClassName = isActive ? '' : `text-primary-main`;
1907
1833
  const iconVersion = tab?.icon?.iconVersion;
1908
1834
  const activeIconStyle = isActive ? 'white' : 'normal';
1909
- return (jsxs("button", { type: "button", onClick: onClick, "aria-label": tab?.title, className: `box-border relative border border-gray cursor-pointer text-left border-b-0 flex hover:h-[88px]
1910
- ${btnClassName}`, children: [jsx(ImgInner, { className: `h-6 w-6 min-w-6 min-h-6 mr-4 ${iconClassName}`, image: {
1835
+ return (jsxs("button", { type: "button", onClick: onClick, "aria-label": tab?.title, className: style('box-border relative border border-gray cursor-pointer text-left border-b-0 flex hover:h-[88px]', btnClassName), children: [jsx(ImgInner, { className: `h-6 w-6 min-w-6 min-h-6 mr-4 ${iconClassName}`, image: {
1911
1836
  ...tab?.icon,
1912
1837
  iconVersion: iconVersion ?? activeIconStyle,
1913
- }, width: "24", height: "24" }), jsxs("div", { className: "border-0", children: [jsx("div", { className: `${btnTitleClassName}`, children: tab?.title }), jsx("div", { className: `${btnDescClassName}`, children: tab.description })] })] }, String(i)));
1838
+ }, width: "24", height: "24" }), jsxs("div", { className: "border-0", children: [jsx("div", { className: btnTitleClassName, children: tab?.title }), jsx("div", { className: btnDescClassName, children: tab.description })] })] }, String(i)));
1914
1839
  }
1915
- function renderTabs({ activeIndex, tabsNav, slideIndexShift, onClick }) {
1840
+ function renderTabs$1({ activeIndex, tabsNav, slideIndexShift, onClick }) {
1916
1841
  const CARD_SHIFT = 388;
1917
1842
  return (jsxs("div", { children: [jsx("div", { style: { transform: `translateX(-${activeIndex * CARD_SHIFT}px)` }, className: "flex flex-col justify-end items-center h-[126px] pt-9 box-border duration-1000", children: jsx("div", { className: "w-full flex flex-nowrap items-end gap-2", children: tabsNav.map((tab, i) => renderNavButton$3({
1918
1843
  tab,
@@ -1922,6 +1847,8 @@
1922
1847
  })) }) }), jsx("div", { className: "w-full h-2 bg-primary-main" })] }));
1923
1848
  }
1924
1849
 
1850
+ const getSanitizedValue = (_) => _.replace(/\s/g, '');
1851
+
1925
1852
  const adjustValue = (val) => onlyOneDot(setZeroStart(replaceCommaToDot(getSanitizedValue(val))));
1926
1853
  const localNumberFormat = (val) => new Intl.NumberFormat('ru-RU', {
1927
1854
  minimumFractionDigits: 0,
@@ -2189,6 +2116,7 @@
2189
2116
  const renderBlur = (isBlur, scroll) => isBlur ? (jsxs("div", { children: [scroll.canScrollLeft ? (jsx("div", { className: style(blurBaseStyle, 'left-0 bg-opacity-from-white') })) : null, scroll.canScrollRight ? (jsx("div", { className: style(blurBaseStyle, 'right-0 bg-opacity-to-white') })) : null] })) : null;
2190
2117
 
2191
2118
  const ITEMS_GAP = 4;
2119
+
2192
2120
  const Carousel = JSX(({ className = '', itemCount, visibleItemCount, isBlur = true, isCyclic = false, arrowsPadded = true, isPadding = true, showDots = false, isAlignCenter = false, ...rest }) => {
2193
2121
  const { blocks: childBlocks = [] } = rest.block || {};
2194
2122
  const count = itemCount || childBlocks?.length;
@@ -2201,7 +2129,7 @@
2201
2129
  });
2202
2130
  const [dotsActiveIndex] = scroll.visibleIndicesRange;
2203
2131
  const isBankHistoryCarousel = childBlocks && childBlocks[0]?.type === 'CarouselBankHistoryCard';
2204
- return (jsx(BlockWrapper, { className: style(getPaddingStyle(isPadding), 'group-data-secondary:bg-primary-main group-data-secondary:text-white', className), ...rest, children: jsxs("div", { className: style(getAlignStyle(isAlignCenter), 'relative max-w-full'), children: [jsx(SwipeListContainer, { containerRef: containerRef, visibleItemCount: visibleItemCount, snapAlign: "snap-start", gap: ITEMS_GAP, onVisibleIndicesChange: scroll.handleVisibleIndicesChange, children: renderChildren({
2132
+ return (jsx(BlockWrapper, { className: style(getPaddingStyle$1(isPadding), 'group-data-secondary:bg-primary-main group-data-secondary:text-white', className), ...rest, children: jsxs("div", { className: style(getAlignStyle(isAlignCenter), 'relative max-w-full'), children: [jsx(SwipeListContainer, { containerRef: containerRef, visibleItemCount: visibleItemCount, snapAlign: "snap-start", gap: ITEMS_GAP, onVisibleIndicesChange: scroll.handleVisibleIndicesChange, children: renderChildren({
2205
2133
  ...rest,
2206
2134
  renderProps: isBankHistoryCarousel
2207
2135
  ? (block, options) => renderBlock$1(block, options, {
@@ -2209,7 +2137,7 @@
2209
2137
  activeIndex: activeIndex,
2210
2138
  })
2211
2139
  : renderBlock$1,
2212
- }) }), jsx(CarouselScrollButtons, { scroll: scroll, isBlur: isBlur, arrowsPadded: arrowsPadded, onScrollLeft: decreaseActiveIndex, onScrollRight: increaseActiveIndex, hasEdgeBlocks: isBankHistoryCarousel, activeIndex: activeIndex, itemCount: count }), showDots ? renderDots(containerRef, dotsActiveIndex, itemCount) : null] }) }));
2140
+ }) }), jsx(CarouselScrollButtons, { scroll: scroll, isBlur: isBlur, arrowsPadded: arrowsPadded, onScrollLeft: decreaseActiveIndex, onScrollRight: increaseActiveIndex, hasEdgeBlocks: isBankHistoryCarousel, activeIndex: activeIndex, itemCount: count }), showDots ? renderDots(containerRef, dotsActiveIndex, count) : null] }) }));
2213
2141
  });
2214
2142
  Carousel.childrenTypes = [
2215
2143
  'CarouselCard',
@@ -2224,7 +2152,7 @@
2224
2152
  'CarouselInvestmentCard',
2225
2153
  'CarouselEventCard',
2226
2154
  ];
2227
- const getPaddingStyle = (isPadding) => (isPadding ? 'p-default' : '');
2155
+ const getPaddingStyle$1 = (isPadding) => (isPadding ? 'p-default' : '');
2228
2156
  const getAlignStyle = (isAlignCenter) => isAlignCenter ? 'flex justify-center' : '';
2229
2157
  const renderDots = (containerRef, dotsActiveIndex, itemCount) => (jsx(SwipeListControlDots, { containerRef: containerRef, activeIndex: dotsActiveIndex, dotCount: itemCount, listType: 'horizontal-list' }));
2230
2158
 
@@ -2423,6 +2351,7 @@
2423
2351
  const SocialMedia = JSX(({ className = '', media, children, buttonSize }) => (jsxs("div", { className: "font-sans", children: [jsx("div", { className: `flex gap-1 ${className}`, children: media?.map((_, index) => (jsx(MediaButton, { buttonSize: buttonSize, ..._ }, String(index)))) }), jsx(Text, { size: "text-s-light", color: "text-secondary-text", children: children })] })));
2424
2352
 
2425
2353
  const BORDER_STYLE = 'border border-solid border-gray group-data-secondary:border-white/50 group-data-gray:border-main-divider';
2354
+
2426
2355
  const CarouselRecommendationCard = JSX(({ className = '', description, href, icon, items = [], socialMedia = [], target, title, align = 'text-left', version = 'primary', ...rest }) => {
2427
2356
  return (jsx(BlockWrapper, { className: style('relative p-7 min-w-[524px] min-h-[218px] h-full box-border group-data-gray:bg-main-divider/50', BORDER_STYLE, className), version: version, ...rest, children: jsxs(LinkWrapper, { href: href, target: target, children: [jsx(Headline, { className: "mb-4", title: title, description: description, headlineVersion: "S", isPadding: false, align: align }), jsxs("div", { className: "w-1/2 h-full flex flex-col flex-1 justify-end", children: [items.length ? (jsx(List, { className: "flex flex-col gap-2", itemClassName: "text-l-light", items: items })) : null, socialMedia.length ? jsx(SocialMedia, { className: "pt-10", media: socialMedia }) : null] }), renderIconBlock$2(icon)] }) }));
2428
2357
  });
@@ -2457,20 +2386,24 @@
2457
2386
  return (jsx("div", { ref: containerRef, className: `transition-max-h duration-300 overflow-hidden ${containerRef.current || !isUnfolded ? 'max-h-0' : ''} ${className}`, children: children }));
2458
2387
  });
2459
2388
 
2389
+ const getPaddingStyle = (isHighlighting = false) => isHighlighting ? 'p-8 mt-8 pt-20' : 'p-8 mt-20';
2390
+
2391
+ const descriptionSize = 'text-h6';
2392
+
2393
+ const renderCardInfo = (cell, i) => {
2394
+ const { title, description, buttons } = cell;
2395
+ return (jsxs("div", { className: "py-5 border-b border-main-divider", children: [title ? (jsx("div", { className: "opacity-80", children: jsx(Text, { size: "text-m", color: "text-secondary-text", children: title }) })) : null, description ? (jsx("div", { className: "mt-1", children: jsx(Text, { size: descriptionSize, color: "text-primary-text", children: description }) })) : null, buttons?.length ? (jsx("div", { className: "text-primary-main", children: renderButtonsSection(buttons) })) : null] }, String(i)));
2396
+ };
2397
+
2460
2398
  const VISIBLE_CELLS_COUNT = 1;
2461
- const CarouselTariffsCard = JSX(({ className = '', title, icon, isHighlighting, button, cardCells = [], ...rest }) => {
2399
+ const CarouselTariffsCard = JSX(({ className = '', title, icon, isHighlighting = false, button, cardCells = [], ...rest }) => {
2462
2400
  const cellsNode = cardCells.map(renderCardInfo);
2463
2401
  const visibleCells = cellsNode.slice(0, VISIBLE_CELLS_COUNT);
2464
2402
  const hiddenCells = cellsNode.slice(VISIBLE_CELLS_COUNT);
2465
- return (jsxs(BlockWrapper, { className: style('relative border border-gray p-8 flex flex-col', getHitStyle(isHighlighting), className), ...rest, children: [isHighlighting ? renderHitIcon() : null, renderIconBlock$1(icon), title ? jsx(Heading, { className: "text-center pt-2", headingType: "h5", title: title }) : null, button ? jsx(Button, { className: "w-full mt-4", ...button }) : null, cardCells.length ? (jsx(Foldable, { renderFoldableSection: ({ isUnfolded }) => (jsxs("div", { children: [visibleCells, jsx(FoldableSection, { isUnfolded: isUnfolded, children: hiddenCells })] })), renderFoldButton: cardCells.length > 1 ? renderFoldButton$1 : null })) : null] }));
2403
+ return (jsxs(BlockWrapper, { className: style('relative border border-gray flex flex-col', getPaddingStyle(isHighlighting), className), ...rest, children: [isHighlighting ? renderHitIcon() : null, renderIconBlock$1(icon), title ? jsx(Heading, { className: "text-center pt-2", headingType: "h5", title: title }) : null, button ? jsx(Button, { className: "w-full mt-4", ...button }) : null, cardCells.length ? (jsx(Foldable, { renderFoldableSection: ({ isUnfolded }) => (jsxs("div", { children: [visibleCells, jsx(FoldableSection, { isUnfolded: isUnfolded, children: hiddenCells })] })), renderFoldButton: cardCells.length > 1 ? renderFoldButton$1 : null })) : null] }));
2466
2404
  });
2467
- const renderIconBlock$1 = (icon) => (jsxs("div", { className: "w-[267px] min-w-[267px] self-center", children: [icon?.src ? jsx(ImgInner, { image: icon }) : null, icon?.icon ? jsx(ImgInner, { image: icon }) : null] }));
2468
- const getHitStyle = (isHighlighting) => isHighlighting ? 'mt-8 pt-20' : 'mt-20 pt-8';
2405
+ const renderIconBlock$1 = (icon) => (jsx("div", { className: "w-[267px] min-w-[267px] self-center", children: icon?.src || icon?.icon ? jsx(ImgInner, { image: icon }) : null }));
2469
2406
  const renderFoldButton$1 = ({ isUnfolded, onToggle }) => (jsxs("button", { className: "w-full cursor-pointer text-primary-main pt-5 flex justify-between items-center", onClick: onToggle, children: [jsx("div", { children: isUnfolded ? 'Скрыть' : 'Подробнее о тарифе' }), jsx(Icon, { className: "text-primary-text", name: isUnfolded ? 'ArrowUpIcon' : 'ArrowDownIcon', width: "16", height: "16" })] }));
2470
- const renderCardInfo = (cell, i) => {
2471
- const { title, description, buttons } = cell;
2472
- return (jsxs("div", { className: "py-5 border-b border-main-divider", children: [title ? (jsx("div", { className: "text-secondary-text text-m-light opacity-80", children: cell.title })) : null, description ? (jsx("div", { className: "text-primary-text text-h6 mt-1", children: cell.description })) : null, buttons?.length ? (jsx("div", { className: "text-primary-main", children: renderButtonsSection(buttons) })) : null] }, String(i)));
2473
- };
2474
2407
  const renderHitIcon = () => (jsxs("div", { className: "absolute -top-7 -right-4 h-[60px] w-[60px] bg-white flex flex-col items-center justify-center rounded-md shadow-[0_4px_25px_rgba(0,0,0,0.07)]", children: [jsx(Icon, { iconVersion: "black", name: "HeartIcon", width: "23", height: "22" }), jsx(Paragraph, { size: "text-s", font: "font-normal", align: "text-center", color: "text-primary-text", children: "\u0425\u0418\u0422" })] }));
2475
2408
 
2476
2409
  const GRADIENT = 'bg-gradient-to-r from-main-gradient-start to-main-gradient-end';
@@ -4492,7 +4425,11 @@
4492
4425
  active: `inline-flex px-4 grow whitespace-nowrap ${LINK_CLASSES} ${SCROLLABLE_ACTIVE_LINK_CLASSES}`,
4493
4426
  default: `inline-flex px-4 grow whitespace-nowrap ${LINK_CLASSES} ${INACTIVE_LINK_CLASSES}`,
4494
4427
  },
4495
- default: {
4428
+ centered: {
4429
+ active: `px-4 rounded-md ${LINK_CLASSES} ${WIDESCREEN_ACTIVE_LINK_CLASSES} whitespace-nowrap`,
4430
+ default: `px-4 rounded-md ${LINK_CLASSES} group/btn bg-transparent whitespace-nowrap`,
4431
+ },
4432
+ wideScreen: {
4496
4433
  active: `${LINK_CLASSES} ${WIDESCREEN_ACTIVE_LINK_CLASSES} whitespace-nowrap`,
4497
4434
  default: `${LINK_CLASSES} ${INACTIVE_LINK_CLASSES} whitespace-nowrap`,
4498
4435
  },
@@ -4502,7 +4439,11 @@
4502
4439
  active: `h-full border-0 border-b-2`,
4503
4440
  default: ``,
4504
4441
  },
4505
- default: {
4442
+ centered: {
4443
+ active: '',
4444
+ default: '',
4445
+ },
4446
+ wideScreen: {
4506
4447
  active: '',
4507
4448
  default: '',
4508
4449
  },
@@ -4514,7 +4455,11 @@
4514
4455
  active: `inline-flex px-4 grow whitespace-nowrap ${LINK_CLASSES} ${SCROLLABLE_ACTIVE_LINK_CLASSES}`,
4515
4456
  default: `inline-flex px-4 grow whitespace-nowrap ${LINK_CLASSES} ${INACTIVE_LINK_CLASSES}`,
4516
4457
  },
4517
- default: {
4458
+ centered: {
4459
+ active: `px-4 rounded-md ${LINK_CLASSES} ${WIDESCREEN_ACTIVE_LINK_CLASSES} whitespace-nowrap`,
4460
+ default: `px-4 rounded-md ${LINK_CLASSES} group/btn bg-transparent whitespace-nowrap`,
4461
+ },
4462
+ wideScreen: {
4518
4463
  active: `${LINK_CLASSES} ${WIDESCREEN_ACTIVE_LINK_CLASSES}`,
4519
4464
  default: `${LINK_CLASSES} ${INACTIVE_LINK_CLASSES}`,
4520
4465
  },
@@ -4524,25 +4469,29 @@
4524
4469
  active: `${TEXT_CLASSES} flex items-center h-full border-0 border-b-2 ${WHITE_ACTIVE_TEXT_CLASSES}`,
4525
4470
  default: `${TEXT_CLASSES} ${INACTIVE_TEXT_CLASSES}`,
4526
4471
  },
4527
- default: {
4472
+ centered: {
4473
+ active: `${TEXT_CLASSES} ${ACTIVE_TEXT_CLASSES}`,
4474
+ default: `${TEXT_CLASSES} ${INACTIVE_TEXT_CLASSES}`,
4475
+ },
4476
+ wideScreen: {
4528
4477
  active: `${TEXT_CLASSES} ${ACTIVE_TEXT_CLASSES}`,
4529
4478
  default: `${TEXT_CLASSES} ${INACTIVE_TEXT_CLASSES}`,
4530
4479
  },
4531
4480
  },
4532
4481
  };
4533
- const getGroupTabClassName = (type, active, isScrollable) => {
4534
- const styleType = isScrollable ? 'scrollable' : 'default';
4482
+ const getGroupTabClassName = (type, active, tabsMode) => {
4535
4483
  const styleActive = active ? 'active' : 'default';
4536
- return GROUP_TAB_CLASSES[type][styleType][styleActive];
4484
+ const mode = tabsMode || 'wideScreen';
4485
+ return GROUP_TAB_CLASSES[type][mode][styleActive];
4537
4486
  };
4538
- const getLinkTabClassName = (type, active, isScrollable) => {
4539
- const styleType = isScrollable ? 'scrollable' : 'default';
4487
+ const getLinkTabClassName = (type, active, tabsMode) => {
4540
4488
  const styleActive = active ? 'active' : 'default';
4541
- return LINK_TAB_CLASSES[type][styleType][styleActive];
4489
+ const mode = tabsMode || 'wideScreen';
4490
+ return LINK_TAB_CLASSES[type][mode][styleActive];
4542
4491
  };
4543
4492
 
4544
4493
  const LinkTab = JSX((props) => {
4545
- const { tab, currentTab, onClick, isScrollable = false } = props;
4494
+ const { tab, currentTab, onClick, tabsMode } = props;
4546
4495
  const active = currentTab?.type === 'link' && currentTab.href === tab.href;
4547
4496
  const link = useLink();
4548
4497
  const adjustedProps = link(tab);
@@ -4550,22 +4499,22 @@
4550
4499
  adjustedProps.onClick(ev);
4551
4500
  onClick(tab);
4552
4501
  };
4553
- return (jsx("a", { role: "tab", className: getLinkTabClassName('link', active, isScrollable), target: tab.target, href: adjustedProps.href, onClick: handleClick, children: jsx("span", { className: getLinkTabClassName('text', active, isScrollable), children: tab.text }) }));
4502
+ return (jsx("a", { role: "tab", className: getLinkTabClassName('link', active, tabsMode), target: tab.target, href: adjustedProps.href, onClick: handleClick, children: jsx("span", { className: getLinkTabClassName('text', active, tabsMode), children: tab.text }) }));
4554
4503
  });
4555
4504
 
4556
4505
  const BADGE_CLASSES = 'min-w-[22px] h-[22px] rounded-full text-xs ml-2 flex justify-center items-center';
4557
4506
  const ACTIVE_BADGE_CLASSES = 'bg-white/30 text-white';
4558
4507
  const INACTIVE_BADGE_CLASSES = 'bg-main-divider text-secondary-text group-hover/btn:text-primary-main';
4559
- const renderGroupTab = ({ page, currentTab, showCounter, onClick, isScrollable = false }) => (tab, i) => {
4508
+ const renderGroupTab = ({ page, currentTab, showCounter, onClick, tabsMode }) => (tab, i) => {
4560
4509
  const active = currentTab === tab;
4561
4510
  const count = tab.ref && page?.blocks
4562
4511
  ? page.blocks.filter((block) => block?.labels?.includes(tab.ref)).length
4563
4512
  : 0;
4564
- return (jsx("div", { className: getGroupTabClassName('div', active, isScrollable), role: "tab", "aria-selected": active, onClick: () => onClick(tab), children: jsxs("div", { className: `flex flex-1 items-center justify-center ${getGroupTabClassName('text', active, isScrollable)}`, children: [renderTitle$1(tab.title, active, isScrollable), renderCount(showCounter, count, active)] }) }, `group-${String(i)}`));
4513
+ return (jsx("div", { className: getGroupTabClassName('div', active, tabsMode), role: "tab", "aria-selected": active, onClick: () => onClick(tab), children: jsxs("div", { className: `flex flex-1 items-center justify-center ${getGroupTabClassName('text', active, tabsMode)}`, children: [renderTitle$1(tab.title, active, tabsMode), renderCount(showCounter, count, active)] }) }, `group-${String(i)}`));
4565
4514
  };
4566
- const renderTitle$1 = (title, active, isScrollable) => {
4515
+ const renderTitle$1 = (title, active, tabsMode) => {
4567
4516
  const activeClassName = active ? WHITE_ACTIVE_TEXT_CLASSES : INACTIVE_TEXT_CLASSES;
4568
- const titleClassName = isScrollable
4517
+ const titleClassName = tabsMode === 'scrollable'
4569
4518
  ? `${TEXT_CLASSES} ${activeClassName}`
4570
4519
  : `${TEXT_CLASSES} ${active ? ACTIVE_TEXT_CLASSES : INACTIVE_TEXT_CLASSES}`;
4571
4520
  return title ? jsx("h3", { className: titleClassName, children: title }) : null;
@@ -4574,16 +4523,16 @@
4574
4523
  return showCounter && count ? (jsx("div", { className: `${BADGE_CLASSES} ${active ? ACTIVE_BADGE_CLASSES : INACTIVE_BADGE_CLASSES}`, children: count })) : null;
4575
4524
  };
4576
4525
 
4577
- const renderTab = ({ page, currentTab, showCounter, onClick, isScrollable = false }) => (tab, i) => {
4526
+ const renderTab = ({ page, showCounter, ...rest }) => (tab, i) => {
4578
4527
  const type = tab.type;
4579
4528
  if (!(type === 'group' || type === 'link')) {
4580
4529
  return null;
4581
4530
  }
4582
4531
  switch (type) {
4583
4532
  case 'group':
4584
- return renderGroupTab({ page, currentTab, showCounter, onClick, isScrollable })(tab, i);
4533
+ return renderGroupTab({ page, showCounter, ...rest })(tab, i);
4585
4534
  case 'link': {
4586
- return (jsx(LinkTab, { tab: tab, currentTab: currentTab, isScrollable: isScrollable, onClick: onClick }, String(i)));
4535
+ return jsx(LinkTab, { tab: tab, ...rest }, String(i));
4587
4536
  }
4588
4537
  default:
4589
4538
  assertUnreachable(type);
@@ -4591,24 +4540,20 @@
4591
4540
  return null;
4592
4541
  };
4593
4542
 
4543
+ const CenteredTabs = JSX(({ tabs, ...rest }) => (jsx("div", { className: "flex p-1 m-auto bg-main-gray rounded-md", children: tabs?.map(renderTab({ ...rest })) })));
4544
+
4594
4545
  const scrollButtonStyle = 'absolute z-40 top-0';
4595
4546
  const ScrollableTabs = JSX((props) => {
4596
- const { tabs, onClick, currentTab, page, showCounter } = props;
4547
+ const { tabs, ...rest } = props;
4597
4548
  const [containerRef, scroll] = useSwipeListScroll({
4598
4549
  itemCount: tabs?.length || 0,
4599
4550
  isCyclic: false,
4600
4551
  });
4601
- return (jsxs("div", { className: "relative max-w-full m-auto", children: [jsx("div", { className: `font-sans max-w-full w-full overflow-hidden relative bg-white`, children: jsx(SwipeListContainer, { containerRef: containerRef, snapAlign: "snap-start", onVisibleIndicesChange: scroll.handleVisibleIndicesChange, children: tabs?.map(renderTab({
4602
- onClick,
4603
- currentTab,
4604
- showCounter,
4605
- page,
4606
- isScrollable: true,
4607
- })) }) }), scroll.canScrollLeft ? (jsx(ScrollLeftButton, { className: `${scrollButtonStyle} left-6`, onClick: scroll.scrollLeft })) : null, scroll.canScrollRight ? (jsx(ScrollRightButton, { className: `${scrollButtonStyle} rotate-180 right-6`, onClick: scroll.scrollRight })) : null] }));
4552
+ return (jsxs("div", { className: "relative max-w-full m-auto", children: [jsx("div", { className: `font-sans max-w-full w-full overflow-hidden relative bg-white`, children: jsx(SwipeListContainer, { containerRef: containerRef, snapAlign: "snap-start", onVisibleIndicesChange: scroll.handleVisibleIndicesChange, children: tabs?.map(renderTab({ ...rest })) }) }), scroll.canScrollLeft ? (jsx(ScrollLeftButton, { className: `${scrollButtonStyle} left-6`, onClick: scroll.scrollLeft })) : null, scroll.canScrollRight ? (jsx(ScrollRightButton, { className: `${scrollButtonStyle} rotate-180 right-6`, onClick: scroll.scrollRight })) : null] }));
4608
4553
  });
4609
4554
 
4610
4555
  const Tabs = JSX((props) => {
4611
- const { className = '', tabs, showCounter, isSticky, tabsMode, ...rest } = props;
4556
+ const { className = '', tabs, isSticky, ...rest } = props;
4612
4557
  const [currentTab, setCurrentTab] = useState(tabs ? tabs[0] : undefined);
4613
4558
  useEffect(() => {
4614
4559
  if (!tabs || !tabs[0]) {
@@ -4625,13 +4570,19 @@
4625
4570
  fireTabEvent(selectedTab);
4626
4571
  setCurrentTab(selectedTab);
4627
4572
  }, []);
4628
- return (jsx(BlockWrapper, { className: `relative box-border flex gap-x-1 w-full ${isSticky ? 'sticky top-1 z-20' : ''} ${className}`, role: "tablist", ...rest, children: tabsMode === 'scrollable' ? (jsx(ScrollableTabs, { tabs: tabs, onClick: handleClick, currentTab: currentTab, showCounter: showCounter, ...rest })) : (tabs?.map(renderTab({
4629
- onClick: handleClick,
4630
- currentTab,
4631
- showCounter,
4632
- ...rest,
4633
- }))) }));
4634
- });
4573
+ return (jsx(BlockWrapper, { className: `relative box-border flex gap-x-1 w-full ${isSticky ? 'sticky top-1 z-20' : ''} ${className}`, role: "tablist", ...rest, children: renderTabs({ tabs, onClick: handleClick, currentTab, ...rest }) }));
4574
+ });
4575
+ const renderTabs = ({ tabsMode, tabs, ...rest }) => {
4576
+ switch (tabsMode) {
4577
+ case 'wideScreen':
4578
+ return tabs?.map(renderTab({ tabsMode, ...rest }));
4579
+ case 'centered':
4580
+ return jsx(CenteredTabs, { tabs: tabs, tabsMode: tabsMode, ...rest });
4581
+ case 'scrollable':
4582
+ return jsx(ScrollableTabs, { tabs: tabs, tabsMode: tabsMode, ...rest });
4583
+ }
4584
+ return null;
4585
+ };
4635
4586
  const fireTabEvent = (tab) => {
4636
4587
  if (tab.type === 'group') {
4637
4588
  defaultEventBus.fire('tab', { type: tab.type, label: tab.ref });
@@ -5074,7 +5025,7 @@
5074
5025
  return (jsx("div", { className: "flex items-end absolute bottom-0 right-0 h-full pointer-events-none", children: jsx(LikeControl, { className: "rounded-tl-lg sticky bottom-0 pointer-events-auto" }) }));
5075
5026
  }
5076
5027
 
5077
- const packageVersion = "0.10.6";
5028
+ const packageVersion = "0.10.8";
5078
5029
 
5079
5030
  exports.Blocks = Blocks;
5080
5031
  exports.ContentPage = ContentPage;