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

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 (473) hide show
  1. package/bundle/bundle.umd.js +198 -266
  2. package/bundle/bundle.umd.min.js +1 -1
  3. package/bundle/components/Calculator/Rate.d.ts +1 -0
  4. package/bundle/components/Calculator/renderBinaryRadioButtonGroup.d.ts +11 -0
  5. package/bundle/components/Calculator/renderDaysInput.d.ts +2 -7
  6. package/bundle/components/Calculator/renderInterestPayment.d.ts +2 -9
  7. package/bundle/components/Calculator/renderMonthsInput.d.ts +3 -5
  8. package/bundle/components/Calculator/renderPaymentType.d.ts +2 -11
  9. package/bundle/components/Calculator/renderRegistrationType.d.ts +2 -9
  10. package/bundle/components/Calculator/renderWantedSumInput.d.ts +3 -7
  11. package/bundle/components/Carousel/itemsGap.d.ts +1 -0
  12. package/bundle/components/Carousel/itemsGap.mobile.d.ts +1 -0
  13. package/bundle/components/CarouselTariffsCard/descriptionSize.d.ts +1 -0
  14. package/bundle/components/CarouselTariffsCard/descriptionSize.mobile.d.ts +1 -0
  15. package/bundle/components/CarouselTariffsCard/getPaddingStyle.d.ts +1 -0
  16. package/bundle/components/CarouselTariffsCard/getPaddingStyle.mobile.d.ts +1 -0
  17. package/bundle/components/CarouselTariffsCard/renderCardInfo.d.ts +3 -0
  18. package/bundle/components/Headline/headlineVersionStyles.d.ts +1 -1
  19. package/bundle/ui-kit/InputRange/InputRangeProps.d.ts +1 -0
  20. package/bundle/ui-kit/InputRange/parseDecimal.d.ts +1 -0
  21. package/bundle/ui-kit/InputRange/renderRangeWithTicks.d.ts +12 -0
  22. package/dist/components/ApplicationForm/ApplicationForm.js +1 -1
  23. package/dist/components/ApplicationForm/ApplicationForm.js.map +1 -1
  24. package/dist/components/Blocks.mobile.js +4 -0
  25. package/dist/components/Blocks.mobile.js.map +1 -1
  26. package/dist/components/Calculator/BonusCalculatorForm.js +16 -18
  27. package/dist/components/Calculator/BonusCalculatorForm.js.map +1 -1
  28. package/dist/components/Calculator/BusinessDepositCalculatorForm.js +24 -30
  29. package/dist/components/Calculator/BusinessDepositCalculatorForm.js.map +1 -1
  30. package/dist/components/Calculator/Calculator.js +4 -4
  31. package/dist/components/Calculator/Calculator.js.map +1 -1
  32. package/dist/components/Calculator/CreditCalculatorForm.js +27 -43
  33. package/dist/components/Calculator/CreditCalculatorForm.js.map +1 -1
  34. package/dist/components/Calculator/DepositCalculatorForm.js +30 -33
  35. package/dist/components/Calculator/DepositCalculatorForm.js.map +1 -1
  36. package/dist/components/Calculator/Rate.d.ts +1 -0
  37. package/dist/components/Calculator/Rate.js +1 -1
  38. package/dist/components/Calculator/Rate.js.map +1 -1
  39. package/dist/components/Calculator/renderBinaryRadioButtonGroup.d.ts +11 -0
  40. package/dist/components/Calculator/renderBinaryRadioButtonGroup.js +8 -0
  41. package/dist/components/Calculator/renderBinaryRadioButtonGroup.js.map +1 -0
  42. package/dist/components/Calculator/renderDaysInput.d.ts +2 -7
  43. package/dist/components/Calculator/renderDaysInput.js +2 -9
  44. package/dist/components/Calculator/renderDaysInput.js.map +1 -1
  45. package/dist/components/Calculator/renderInterestPayment.d.ts +2 -9
  46. package/dist/components/Calculator/renderInterestPayment.js +8 -18
  47. package/dist/components/Calculator/renderInterestPayment.js.map +1 -1
  48. package/dist/components/Calculator/renderMonthsInput.d.ts +3 -5
  49. package/dist/components/Calculator/renderMonthsInput.js +2 -10
  50. package/dist/components/Calculator/renderMonthsInput.js.map +1 -1
  51. package/dist/components/Calculator/renderPaymentType.d.ts +2 -11
  52. package/dist/components/Calculator/renderPaymentType.js +9 -19
  53. package/dist/components/Calculator/renderPaymentType.js.map +1 -1
  54. package/dist/components/Calculator/renderRegistrationType.d.ts +2 -9
  55. package/dist/components/Calculator/renderRegistrationType.js +8 -18
  56. package/dist/components/Calculator/renderRegistrationType.js.map +1 -1
  57. package/dist/components/Calculator/renderWantedSumInput.d.ts +3 -7
  58. package/dist/components/Calculator/renderWantedSumInput.js +4 -6
  59. package/dist/components/Calculator/renderWantedSumInput.js.map +1 -1
  60. package/dist/components/Calculator/useDepositCalculatorParams.js +1 -1
  61. package/dist/components/Calculator/useDepositCalculatorParams.js.map +1 -1
  62. package/dist/components/Carousel/Carousel.js +3 -3
  63. package/dist/components/Carousel/Carousel.js.map +1 -1
  64. package/dist/components/Carousel/itemsGap.d.ts +1 -0
  65. package/dist/components/Carousel/itemsGap.js +4 -0
  66. package/dist/components/Carousel/itemsGap.js.map +1 -0
  67. package/dist/components/Carousel/itemsGap.mobile.d.ts +1 -0
  68. package/dist/components/Carousel/itemsGap.mobile.js +4 -0
  69. package/dist/components/Carousel/itemsGap.mobile.js.map +1 -0
  70. package/dist/components/CarouselTariffsCard/CarouselTariffsCard.js +6 -10
  71. package/dist/components/CarouselTariffsCard/CarouselTariffsCard.js.map +1 -1
  72. package/dist/components/CarouselTariffsCard/descriptionSize.d.ts +1 -0
  73. package/dist/components/CarouselTariffsCard/descriptionSize.js +4 -0
  74. package/dist/components/CarouselTariffsCard/descriptionSize.js.map +1 -0
  75. package/dist/components/CarouselTariffsCard/descriptionSize.mobile.d.ts +1 -0
  76. package/dist/components/CarouselTariffsCard/descriptionSize.mobile.js +4 -0
  77. package/dist/components/CarouselTariffsCard/descriptionSize.mobile.js.map +1 -0
  78. package/dist/components/CarouselTariffsCard/getPaddingStyle.d.ts +1 -0
  79. package/dist/components/CarouselTariffsCard/getPaddingStyle.js +5 -0
  80. package/dist/components/CarouselTariffsCard/getPaddingStyle.js.map +1 -0
  81. package/dist/components/CarouselTariffsCard/getPaddingStyle.mobile.d.ts +1 -0
  82. package/dist/components/CarouselTariffsCard/getPaddingStyle.mobile.js +5 -0
  83. package/dist/components/CarouselTariffsCard/getPaddingStyle.mobile.js.map +1 -0
  84. package/dist/components/CarouselTariffsCard/renderCardInfo.d.ts +3 -0
  85. package/dist/components/CarouselTariffsCard/renderCardInfo.js +12 -0
  86. package/dist/components/CarouselTariffsCard/renderCardInfo.js.map +1 -0
  87. package/dist/components/Headline/Headline.js +2 -1
  88. package/dist/components/Headline/Headline.js.map +1 -1
  89. package/dist/components/Headline/headlineVersionStyles.d.ts +1 -1
  90. package/dist/components/Headline/headlineVersionStyles.js +6 -6
  91. package/dist/components/Headline/headlineVersionStyles.js.map +1 -1
  92. package/dist/hooks/useForm.js +2 -2
  93. package/dist/hooks/useForm.js.map +1 -1
  94. package/dist/ui-kit/Checkbox/Checkbox.js +4 -1
  95. package/dist/ui-kit/Checkbox/Checkbox.js.map +1 -1
  96. package/dist/ui-kit/InputRange/InputRange.js +22 -16
  97. package/dist/ui-kit/InputRange/InputRange.js.map +1 -1
  98. package/dist/ui-kit/InputRange/InputRangeProps.d.ts +1 -0
  99. package/dist/ui-kit/InputRange/parseDecimal.d.ts +1 -0
  100. package/dist/ui-kit/InputRange/parseDecimal.js +9 -0
  101. package/dist/ui-kit/InputRange/parseDecimal.js.map +1 -0
  102. package/dist/ui-kit/InputRange/renderRangeWithTicks.d.ts +12 -0
  103. package/dist/ui-kit/InputRange/renderRangeWithTicks.js +17 -0
  104. package/dist/ui-kit/InputRange/renderRangeWithTicks.js.map +1 -0
  105. package/dist/utils/getSanitizedValue.js +1 -1
  106. package/dist/utils/getSanitizedValue.js.map +1 -1
  107. package/dist/wlc.json +1 -2
  108. package/lib/common.css +1 -1
  109. package/lib/components/ApplicationForm/ApplicationForm.js +1 -1
  110. package/lib/components/ApplicationForm/ApplicationForm.js.map +1 -1
  111. package/lib/components/Blocks.mobile.js +4 -0
  112. package/lib/components/Blocks.mobile.js.map +1 -1
  113. package/lib/components/Calculator/BonusCalculatorForm.js +16 -18
  114. package/lib/components/Calculator/BonusCalculatorForm.js.map +1 -1
  115. package/lib/components/Calculator/BusinessDepositCalculatorForm.js +24 -30
  116. package/lib/components/Calculator/BusinessDepositCalculatorForm.js.map +1 -1
  117. package/lib/components/Calculator/Calculator.js +4 -4
  118. package/lib/components/Calculator/Calculator.js.map +1 -1
  119. package/lib/components/Calculator/CreditCalculatorForm.js +27 -43
  120. package/lib/components/Calculator/CreditCalculatorForm.js.map +1 -1
  121. package/lib/components/Calculator/DepositCalculatorForm.js +31 -34
  122. package/lib/components/Calculator/DepositCalculatorForm.js.map +1 -1
  123. package/lib/components/Calculator/Rate.d.ts +1 -0
  124. package/lib/components/Calculator/Rate.js +1 -1
  125. package/lib/components/Calculator/Rate.js.map +1 -1
  126. package/lib/components/Calculator/renderBinaryRadioButtonGroup.d.ts +11 -0
  127. package/lib/components/Calculator/renderBinaryRadioButtonGroup.js +5 -0
  128. package/lib/components/Calculator/renderBinaryRadioButtonGroup.js.map +1 -0
  129. package/lib/components/Calculator/renderDaysInput.d.ts +2 -7
  130. package/lib/components/Calculator/renderDaysInput.js +2 -9
  131. package/lib/components/Calculator/renderDaysInput.js.map +1 -1
  132. package/lib/components/Calculator/renderInterestPayment.d.ts +2 -9
  133. package/lib/components/Calculator/renderInterestPayment.js +8 -18
  134. package/lib/components/Calculator/renderInterestPayment.js.map +1 -1
  135. package/lib/components/Calculator/renderMonthsInput.d.ts +3 -5
  136. package/lib/components/Calculator/renderMonthsInput.js +2 -10
  137. package/lib/components/Calculator/renderMonthsInput.js.map +1 -1
  138. package/lib/components/Calculator/renderPaymentType.d.ts +2 -11
  139. package/lib/components/Calculator/renderPaymentType.js +8 -18
  140. package/lib/components/Calculator/renderPaymentType.js.map +1 -1
  141. package/lib/components/Calculator/renderRegistrationType.d.ts +2 -9
  142. package/lib/components/Calculator/renderRegistrationType.js +8 -18
  143. package/lib/components/Calculator/renderRegistrationType.js.map +1 -1
  144. package/lib/components/Calculator/renderWantedSumInput.d.ts +3 -7
  145. package/lib/components/Calculator/renderWantedSumInput.js +4 -6
  146. package/lib/components/Calculator/renderWantedSumInput.js.map +1 -1
  147. package/lib/components/Calculator/useDepositCalculatorParams.js +1 -1
  148. package/lib/components/Calculator/useDepositCalculatorParams.js.map +1 -1
  149. package/lib/components/Carousel/Carousel.fixture.mobile.d.ts +11 -0
  150. package/lib/components/Carousel/Carousel.js +2 -2
  151. package/lib/components/Carousel/Carousel.js.map +1 -1
  152. package/lib/components/Carousel/itemsGap.d.ts +1 -0
  153. package/lib/components/Carousel/itemsGap.js +2 -0
  154. package/lib/components/Carousel/itemsGap.js.map +1 -0
  155. package/lib/components/Carousel/itemsGap.mobile.d.ts +1 -0
  156. package/lib/components/Carousel/itemsGap.mobile.js +2 -0
  157. package/lib/components/Carousel/itemsGap.mobile.js.map +1 -0
  158. package/lib/components/CarouselTariffsCard/CarouselTariffsCard.fixture.mobile.d.ts +9 -0
  159. package/lib/components/CarouselTariffsCard/CarouselTariffsCard.js +5 -9
  160. package/lib/components/CarouselTariffsCard/CarouselTariffsCard.js.map +1 -1
  161. package/lib/components/CarouselTariffsCard/descriptionSize.d.ts +1 -0
  162. package/lib/components/CarouselTariffsCard/descriptionSize.js +2 -0
  163. package/lib/components/CarouselTariffsCard/descriptionSize.js.map +1 -0
  164. package/lib/components/CarouselTariffsCard/descriptionSize.mobile.d.ts +1 -0
  165. package/lib/components/CarouselTariffsCard/descriptionSize.mobile.js +2 -0
  166. package/lib/components/CarouselTariffsCard/descriptionSize.mobile.js.map +1 -0
  167. package/lib/components/CarouselTariffsCard/getPaddingStyle.d.ts +1 -0
  168. package/lib/components/CarouselTariffsCard/getPaddingStyle.js +2 -0
  169. package/lib/components/CarouselTariffsCard/getPaddingStyle.js.map +1 -0
  170. package/lib/components/CarouselTariffsCard/getPaddingStyle.mobile.d.ts +1 -0
  171. package/lib/components/CarouselTariffsCard/getPaddingStyle.mobile.js +2 -0
  172. package/lib/components/CarouselTariffsCard/getPaddingStyle.mobile.js.map +1 -0
  173. package/lib/components/CarouselTariffsCard/renderCardInfo.d.ts +3 -0
  174. package/lib/components/CarouselTariffsCard/renderCardInfo.js +9 -0
  175. package/lib/components/CarouselTariffsCard/renderCardInfo.js.map +1 -0
  176. package/lib/components/Headline/Headline.fixture.mobile.d.ts +22 -0
  177. package/lib/components/Headline/Headline.js +2 -1
  178. package/lib/components/Headline/Headline.js.map +1 -1
  179. package/lib/components/Headline/headlineVersionStyles.d.ts +1 -1
  180. package/lib/components/Headline/headlineVersionStyles.js +6 -6
  181. package/lib/components/Headline/headlineVersionStyles.js.map +1 -1
  182. package/lib/hooks/useForm.js +2 -2
  183. package/lib/hooks/useForm.js.map +1 -1
  184. package/lib/ui-kit/Checkbox/Checkbox.js +4 -1
  185. package/lib/ui-kit/Checkbox/Checkbox.js.map +1 -1
  186. package/lib/ui-kit/InputRange/InputRange.js +22 -16
  187. package/lib/ui-kit/InputRange/InputRange.js.map +1 -1
  188. package/lib/ui-kit/InputRange/InputRangeProps.d.ts +1 -0
  189. package/lib/ui-kit/InputRange/parseDecimal.d.ts +1 -0
  190. package/lib/ui-kit/InputRange/parseDecimal.js +6 -0
  191. package/lib/ui-kit/InputRange/parseDecimal.js.map +1 -0
  192. package/lib/ui-kit/InputRange/renderRangeWithTicks.d.ts +12 -0
  193. package/lib/ui-kit/InputRange/renderRangeWithTicks.js +14 -0
  194. package/lib/ui-kit/InputRange/renderRangeWithTicks.js.map +1 -0
  195. package/lib/utils/getSanitizedValue.js +1 -1
  196. package/lib/utils/getSanitizedValue.js.map +1 -1
  197. package/lib/wlc.json +1 -2
  198. package/mobile/bundle/bundle.umd.js +363 -265
  199. package/mobile/bundle/bundle.umd.min.js +1 -1
  200. package/mobile/bundle/components/Calculator/Rate.d.ts +1 -0
  201. package/mobile/bundle/components/Calculator/renderBinaryRadioButtonGroup.d.ts +11 -0
  202. package/mobile/bundle/components/Calculator/renderDaysInput.d.ts +2 -7
  203. package/mobile/bundle/components/Calculator/renderInterestPayment.d.ts +2 -9
  204. package/mobile/bundle/components/Calculator/renderMonthsInput.d.ts +3 -5
  205. package/mobile/bundle/components/Calculator/renderPaymentType.d.ts +2 -11
  206. package/mobile/bundle/components/Calculator/renderRegistrationType.d.ts +2 -9
  207. package/mobile/bundle/components/Calculator/renderWantedSumInput.d.ts +3 -7
  208. package/mobile/bundle/components/Carousel/itemsGap.d.ts +1 -0
  209. package/mobile/bundle/components/CarouselTariffsCard/descriptionSize.d.ts +1 -0
  210. package/mobile/bundle/components/CarouselTariffsCard/getPaddingStyle.d.ts +1 -0
  211. package/mobile/bundle/components/CarouselTariffsCard/renderCardInfo.d.ts +3 -0
  212. package/mobile/bundle/components/Headline/headlineVersionStyles.d.ts +1 -1
  213. package/mobile/bundle/ui-kit/InputRange/InputRangeProps.d.ts +1 -0
  214. package/mobile/bundle/ui-kit/InputRange/parseDecimal.d.ts +1 -0
  215. package/mobile/bundle/ui-kit/InputRange/renderRangeWithTicks.d.ts +12 -0
  216. package/mobile/dist/components/ApplicationForm/ApplicationForm.js +1 -1
  217. package/mobile/dist/components/ApplicationForm/ApplicationForm.js.map +1 -1
  218. package/mobile/dist/components/Blocks.js +4 -0
  219. package/mobile/dist/components/Blocks.js.map +1 -1
  220. package/mobile/dist/components/Calculator/BonusCalculatorForm.js +16 -18
  221. package/mobile/dist/components/Calculator/BonusCalculatorForm.js.map +1 -1
  222. package/mobile/dist/components/Calculator/BusinessDepositCalculatorForm.js +24 -30
  223. package/mobile/dist/components/Calculator/BusinessDepositCalculatorForm.js.map +1 -1
  224. package/mobile/dist/components/Calculator/Calculator.js +4 -4
  225. package/mobile/dist/components/Calculator/Calculator.js.map +1 -1
  226. package/mobile/dist/components/Calculator/CreditCalculatorForm.js +27 -43
  227. package/mobile/dist/components/Calculator/CreditCalculatorForm.js.map +1 -1
  228. package/mobile/dist/components/Calculator/DepositCalculatorForm.js +30 -33
  229. package/mobile/dist/components/Calculator/DepositCalculatorForm.js.map +1 -1
  230. package/mobile/dist/components/Calculator/Rate.d.ts +1 -0
  231. package/mobile/dist/components/Calculator/Rate.js +1 -1
  232. package/mobile/dist/components/Calculator/Rate.js.map +1 -1
  233. package/mobile/dist/components/Calculator/renderBinaryRadioButtonGroup.d.ts +11 -0
  234. package/mobile/dist/components/Calculator/renderBinaryRadioButtonGroup.js +8 -0
  235. package/mobile/dist/components/Calculator/renderBinaryRadioButtonGroup.js.map +1 -0
  236. package/mobile/dist/components/Calculator/renderDaysInput.d.ts +2 -7
  237. package/mobile/dist/components/Calculator/renderDaysInput.js +2 -9
  238. package/mobile/dist/components/Calculator/renderDaysInput.js.map +1 -1
  239. package/mobile/dist/components/Calculator/renderInterestPayment.d.ts +2 -9
  240. package/mobile/dist/components/Calculator/renderInterestPayment.js +8 -18
  241. package/mobile/dist/components/Calculator/renderInterestPayment.js.map +1 -1
  242. package/mobile/dist/components/Calculator/renderMonthsInput.d.ts +3 -5
  243. package/mobile/dist/components/Calculator/renderMonthsInput.js +2 -10
  244. package/mobile/dist/components/Calculator/renderMonthsInput.js.map +1 -1
  245. package/mobile/dist/components/Calculator/renderPaymentType.d.ts +2 -11
  246. package/mobile/dist/components/Calculator/renderPaymentType.js +9 -19
  247. package/mobile/dist/components/Calculator/renderPaymentType.js.map +1 -1
  248. package/mobile/dist/components/Calculator/renderRegistrationType.d.ts +2 -9
  249. package/mobile/dist/components/Calculator/renderRegistrationType.js +8 -18
  250. package/mobile/dist/components/Calculator/renderRegistrationType.js.map +1 -1
  251. package/mobile/dist/components/Calculator/renderWantedSumInput.d.ts +3 -7
  252. package/mobile/dist/components/Calculator/renderWantedSumInput.js +4 -6
  253. package/mobile/dist/components/Calculator/renderWantedSumInput.js.map +1 -1
  254. package/mobile/dist/components/Calculator/useDepositCalculatorParams.js +1 -1
  255. package/mobile/dist/components/Calculator/useDepositCalculatorParams.js.map +1 -1
  256. package/mobile/dist/components/Carousel/Carousel.js +3 -3
  257. package/mobile/dist/components/Carousel/Carousel.js.map +1 -1
  258. package/mobile/dist/components/Carousel/itemsGap.d.ts +1 -0
  259. package/mobile/dist/components/Carousel/itemsGap.js +4 -0
  260. package/mobile/dist/components/Carousel/itemsGap.js.map +1 -0
  261. package/mobile/dist/components/CarouselTariffsCard/CarouselTariffsCard.js +6 -10
  262. package/mobile/dist/components/CarouselTariffsCard/CarouselTariffsCard.js.map +1 -1
  263. package/mobile/dist/components/CarouselTariffsCard/descriptionSize.d.ts +1 -0
  264. package/mobile/dist/components/CarouselTariffsCard/descriptionSize.js +4 -0
  265. package/mobile/dist/components/CarouselTariffsCard/descriptionSize.js.map +1 -0
  266. package/mobile/dist/components/CarouselTariffsCard/getPaddingStyle.d.ts +1 -0
  267. package/mobile/dist/components/CarouselTariffsCard/getPaddingStyle.js +5 -0
  268. package/mobile/dist/components/CarouselTariffsCard/getPaddingStyle.js.map +1 -0
  269. package/mobile/dist/components/CarouselTariffsCard/renderCardInfo.d.ts +3 -0
  270. package/mobile/dist/components/CarouselTariffsCard/renderCardInfo.js +12 -0
  271. package/mobile/dist/components/CarouselTariffsCard/renderCardInfo.js.map +1 -0
  272. package/mobile/dist/components/Headline/Headline.js +2 -1
  273. package/mobile/dist/components/Headline/Headline.js.map +1 -1
  274. package/mobile/dist/components/Headline/headlineVersionStyles.d.ts +1 -1
  275. package/mobile/dist/components/Headline/headlineVersionStyles.js +6 -6
  276. package/mobile/dist/components/Headline/headlineVersionStyles.js.map +1 -1
  277. package/mobile/dist/hooks/useForm.js +2 -2
  278. package/mobile/dist/hooks/useForm.js.map +1 -1
  279. package/mobile/dist/ui-kit/Checkbox/Checkbox.js +4 -1
  280. package/mobile/dist/ui-kit/Checkbox/Checkbox.js.map +1 -1
  281. package/mobile/dist/ui-kit/InputRange/InputRange.js +22 -16
  282. package/mobile/dist/ui-kit/InputRange/InputRange.js.map +1 -1
  283. package/mobile/dist/ui-kit/InputRange/InputRangeProps.d.ts +1 -0
  284. package/mobile/dist/ui-kit/InputRange/parseDecimal.d.ts +1 -0
  285. package/mobile/dist/ui-kit/InputRange/parseDecimal.js +9 -0
  286. package/mobile/dist/ui-kit/InputRange/parseDecimal.js.map +1 -0
  287. package/mobile/dist/ui-kit/InputRange/renderRangeWithTicks.d.ts +12 -0
  288. package/mobile/dist/ui-kit/InputRange/renderRangeWithTicks.js +17 -0
  289. package/mobile/dist/ui-kit/InputRange/renderRangeWithTicks.js.map +1 -0
  290. package/mobile/dist/utils/getSanitizedValue.js +1 -1
  291. package/mobile/dist/utils/getSanitizedValue.js.map +1 -1
  292. package/mobile/dist/wlc.json +1 -2
  293. package/mobile/lib/common.css +1 -1
  294. package/mobile/lib/components/ApplicationForm/ApplicationForm.js +1 -1
  295. package/mobile/lib/components/ApplicationForm/ApplicationForm.js.map +1 -1
  296. package/mobile/lib/components/Blocks.js +4 -0
  297. package/mobile/lib/components/Blocks.js.map +1 -1
  298. package/mobile/lib/components/Calculator/BonusCalculatorForm.js +16 -18
  299. package/mobile/lib/components/Calculator/BonusCalculatorForm.js.map +1 -1
  300. package/mobile/lib/components/Calculator/BusinessDepositCalculatorForm.js +24 -30
  301. package/mobile/lib/components/Calculator/BusinessDepositCalculatorForm.js.map +1 -1
  302. package/mobile/lib/components/Calculator/Calculator.js +4 -4
  303. package/mobile/lib/components/Calculator/Calculator.js.map +1 -1
  304. package/mobile/lib/components/Calculator/CreditCalculatorForm.js +27 -43
  305. package/mobile/lib/components/Calculator/CreditCalculatorForm.js.map +1 -1
  306. package/mobile/lib/components/Calculator/DepositCalculatorForm.js +31 -34
  307. package/mobile/lib/components/Calculator/DepositCalculatorForm.js.map +1 -1
  308. package/mobile/lib/components/Calculator/Rate.d.ts +1 -0
  309. package/mobile/lib/components/Calculator/Rate.js +1 -1
  310. package/mobile/lib/components/Calculator/Rate.js.map +1 -1
  311. package/mobile/lib/components/Calculator/renderBinaryRadioButtonGroup.d.ts +11 -0
  312. package/mobile/lib/components/Calculator/renderBinaryRadioButtonGroup.js +5 -0
  313. package/mobile/lib/components/Calculator/renderBinaryRadioButtonGroup.js.map +1 -0
  314. package/mobile/lib/components/Calculator/renderDaysInput.d.ts +2 -7
  315. package/mobile/lib/components/Calculator/renderDaysInput.js +2 -9
  316. package/mobile/lib/components/Calculator/renderDaysInput.js.map +1 -1
  317. package/mobile/lib/components/Calculator/renderInterestPayment.d.ts +2 -9
  318. package/mobile/lib/components/Calculator/renderInterestPayment.js +8 -18
  319. package/mobile/lib/components/Calculator/renderInterestPayment.js.map +1 -1
  320. package/mobile/lib/components/Calculator/renderMonthsInput.d.ts +3 -5
  321. package/mobile/lib/components/Calculator/renderMonthsInput.js +2 -10
  322. package/mobile/lib/components/Calculator/renderMonthsInput.js.map +1 -1
  323. package/mobile/lib/components/Calculator/renderPaymentType.d.ts +2 -11
  324. package/mobile/lib/components/Calculator/renderPaymentType.js +8 -18
  325. package/mobile/lib/components/Calculator/renderPaymentType.js.map +1 -1
  326. package/mobile/lib/components/Calculator/renderRegistrationType.d.ts +2 -9
  327. package/mobile/lib/components/Calculator/renderRegistrationType.js +8 -18
  328. package/mobile/lib/components/Calculator/renderRegistrationType.js.map +1 -1
  329. package/mobile/lib/components/Calculator/renderWantedSumInput.d.ts +3 -7
  330. package/mobile/lib/components/Calculator/renderWantedSumInput.js +4 -6
  331. package/mobile/lib/components/Calculator/renderWantedSumInput.js.map +1 -1
  332. package/mobile/lib/components/Calculator/useDepositCalculatorParams.js +1 -1
  333. package/mobile/lib/components/Calculator/useDepositCalculatorParams.js.map +1 -1
  334. package/mobile/lib/components/Carousel/Carousel.js +2 -2
  335. package/mobile/lib/components/Carousel/Carousel.js.map +1 -1
  336. package/mobile/lib/components/Carousel/itemsGap.d.ts +1 -0
  337. package/mobile/lib/components/Carousel/itemsGap.js +2 -0
  338. package/mobile/lib/components/Carousel/itemsGap.js.map +1 -0
  339. package/mobile/lib/components/CarouselTariffsCard/CarouselTariffsCard.js +5 -9
  340. package/mobile/lib/components/CarouselTariffsCard/CarouselTariffsCard.js.map +1 -1
  341. package/mobile/lib/components/CarouselTariffsCard/descriptionSize.d.ts +1 -0
  342. package/mobile/lib/components/CarouselTariffsCard/descriptionSize.js +2 -0
  343. package/mobile/lib/components/CarouselTariffsCard/descriptionSize.js.map +1 -0
  344. package/mobile/lib/components/CarouselTariffsCard/getPaddingStyle.d.ts +1 -0
  345. package/mobile/lib/components/CarouselTariffsCard/getPaddingStyle.js +2 -0
  346. package/mobile/lib/components/CarouselTariffsCard/getPaddingStyle.js.map +1 -0
  347. package/mobile/lib/components/CarouselTariffsCard/renderCardInfo.d.ts +3 -0
  348. package/mobile/lib/components/CarouselTariffsCard/renderCardInfo.js +9 -0
  349. package/mobile/lib/components/CarouselTariffsCard/renderCardInfo.js.map +1 -0
  350. package/mobile/lib/components/Headline/Headline.js +2 -1
  351. package/mobile/lib/components/Headline/Headline.js.map +1 -1
  352. package/mobile/lib/components/Headline/headlineVersionStyles.d.ts +1 -1
  353. package/mobile/lib/components/Headline/headlineVersionStyles.js +6 -6
  354. package/mobile/lib/components/Headline/headlineVersionStyles.js.map +1 -1
  355. package/mobile/lib/hooks/useForm.js +2 -2
  356. package/mobile/lib/hooks/useForm.js.map +1 -1
  357. package/mobile/lib/ui-kit/Checkbox/Checkbox.js +4 -1
  358. package/mobile/lib/ui-kit/Checkbox/Checkbox.js.map +1 -1
  359. package/mobile/lib/ui-kit/InputRange/InputRange.js +22 -16
  360. package/mobile/lib/ui-kit/InputRange/InputRange.js.map +1 -1
  361. package/mobile/lib/ui-kit/InputRange/InputRangeProps.d.ts +1 -0
  362. package/mobile/lib/ui-kit/InputRange/parseDecimal.d.ts +1 -0
  363. package/mobile/lib/ui-kit/InputRange/parseDecimal.js +6 -0
  364. package/mobile/lib/ui-kit/InputRange/parseDecimal.js.map +1 -0
  365. package/mobile/lib/ui-kit/InputRange/renderRangeWithTicks.d.ts +12 -0
  366. package/mobile/lib/ui-kit/InputRange/renderRangeWithTicks.js +14 -0
  367. package/mobile/lib/ui-kit/InputRange/renderRangeWithTicks.js.map +1 -0
  368. package/mobile/lib/utils/getSanitizedValue.js +1 -1
  369. package/mobile/lib/utils/getSanitizedValue.js.map +1 -1
  370. package/mobile/lib/wlc.json +1 -2
  371. package/mobile/src/components/ApplicationForm/ApplicationForm.tsx +1 -1
  372. package/mobile/src/components/Blocks.ts +4 -0
  373. package/mobile/src/components/Calculator/BonusCalculatorForm.tsx +29 -33
  374. package/mobile/src/components/Calculator/BusinessDepositCalculatorForm.tsx +37 -57
  375. package/mobile/src/components/Calculator/Calculator.tsx +11 -5
  376. package/mobile/src/components/Calculator/CreditCalculatorForm.tsx +52 -87
  377. package/mobile/src/components/Calculator/DepositCalculatorForm.tsx +38 -66
  378. package/mobile/src/components/Calculator/Rate.tsx +14 -14
  379. package/mobile/src/components/Calculator/renderBinaryRadioButtonGroup.tsx +35 -0
  380. package/mobile/src/components/Calculator/renderDaysInput.tsx +10 -31
  381. package/mobile/src/components/Calculator/renderInterestPayment.tsx +13 -52
  382. package/mobile/src/components/Calculator/renderMonthsInput.tsx +17 -39
  383. package/mobile/src/components/Calculator/renderPaymentType.tsx +13 -49
  384. package/mobile/src/components/Calculator/renderRegistrationType.tsx +13 -51
  385. package/mobile/src/components/Calculator/renderWantedSumInput.tsx +10 -27
  386. package/mobile/src/components/Calculator/useDepositCalculatorParams.ts +1 -1
  387. package/mobile/src/components/Carousel/Carousel.tsx +2 -3
  388. package/mobile/src/components/Carousel/itemsGap.ts +1 -0
  389. package/mobile/src/components/CarouselTariffsCard/CarouselTariffsCard.tsx +7 -31
  390. package/mobile/src/components/CarouselTariffsCard/descriptionSize.tsx +1 -0
  391. package/mobile/src/components/CarouselTariffsCard/getPaddingStyle.tsx +2 -0
  392. package/mobile/src/components/CarouselTariffsCard/renderCardInfo.tsx +31 -0
  393. package/mobile/src/components/Headline/Headline.tsx +10 -5
  394. package/mobile/src/components/Headline/headlineVersionStyles.ts +7 -7
  395. package/mobile/src/hooks/useForm.ts +17 -14
  396. package/mobile/src/ui-kit/Checkbox/Checkbox.tsx +5 -1
  397. package/mobile/src/ui-kit/InputRange/InputRange.tsx +56 -43
  398. package/mobile/src/ui-kit/InputRange/InputRangeProps.ts +1 -0
  399. package/mobile/src/ui-kit/InputRange/parseDecimal.ts +6 -0
  400. package/mobile/src/ui-kit/InputRange/renderRangeWithTicks.tsx +62 -0
  401. package/mobile/src/utils/getSanitizedValue.ts +1 -1
  402. package/mobile/src/wlc.json +1 -2
  403. package/package.json +1 -1
  404. package/src/components/ApplicationForm/ApplicationForm.tsx +1 -1
  405. package/src/components/Blocks.mobile.ts +4 -0
  406. package/src/components/Calculator/BonusCalculatorForm.tsx +29 -33
  407. package/src/components/Calculator/BusinessDepositCalculatorForm.tsx +37 -57
  408. package/src/components/Calculator/Calculator.tsx +11 -5
  409. package/src/components/Calculator/CreditCalculatorForm.tsx +52 -87
  410. package/src/components/Calculator/DepositCalculatorForm.tsx +38 -66
  411. package/src/components/Calculator/Rate.tsx +14 -14
  412. package/src/components/Calculator/renderBinaryRadioButtonGroup.tsx +35 -0
  413. package/src/components/Calculator/renderDaysInput.tsx +10 -31
  414. package/src/components/Calculator/renderInterestPayment.tsx +13 -52
  415. package/src/components/Calculator/renderMonthsInput.tsx +17 -39
  416. package/src/components/Calculator/renderPaymentType.tsx +13 -49
  417. package/src/components/Calculator/renderRegistrationType.tsx +13 -51
  418. package/src/components/Calculator/renderWantedSumInput.tsx +10 -27
  419. package/src/components/Calculator/useDepositCalculatorParams.ts +1 -1
  420. package/src/components/Carousel/Carousel.fixture.mobile.tsx +93 -0
  421. package/src/components/Carousel/Carousel.tsx +2 -3
  422. package/src/components/Carousel/itemsGap.mobile.ts +1 -0
  423. package/src/components/Carousel/itemsGap.ts +1 -0
  424. package/src/components/CarouselTariffsCard/CarouselTariffsCard.fixture.mobile.tsx +74 -0
  425. package/src/components/CarouselTariffsCard/CarouselTariffsCard.tsx +7 -31
  426. package/src/components/CarouselTariffsCard/descriptionSize.mobile.tsx +1 -0
  427. package/src/components/CarouselTariffsCard/descriptionSize.tsx +1 -0
  428. package/src/components/CarouselTariffsCard/getPaddingStyle.mobile.tsx +2 -0
  429. package/src/components/CarouselTariffsCard/getPaddingStyle.tsx +2 -0
  430. package/src/components/CarouselTariffsCard/renderCardInfo.tsx +31 -0
  431. package/src/components/Headline/Headline.fixture.mobile.tsx +95 -0
  432. package/src/components/Headline/Headline.tsx +10 -5
  433. package/src/components/Headline/headlineVersionStyles.ts +7 -7
  434. package/src/hooks/useForm.ts +17 -14
  435. package/src/ui-kit/Checkbox/Checkbox.tsx +5 -1
  436. package/src/ui-kit/InputRange/InputRange.tsx +56 -43
  437. package/src/ui-kit/InputRange/InputRangeProps.ts +1 -0
  438. package/src/ui-kit/InputRange/parseDecimal.ts +6 -0
  439. package/src/ui-kit/InputRange/renderRangeWithTicks.tsx +62 -0
  440. package/src/utils/getSanitizedValue.ts +1 -1
  441. package/src/wlc.json +1 -2
  442. package/bundle/ui-kit/InputListRange/InputListRange.d.ts +0 -2
  443. package/bundle/ui-kit/InputListRange/InputListRangeProps.d.ts +0 -10
  444. package/dist/ui-kit/InputListRange/InputListRange.d.ts +0 -2
  445. package/dist/ui-kit/InputListRange/InputListRange.js +0 -41
  446. package/dist/ui-kit/InputListRange/InputListRange.js.map +0 -1
  447. package/dist/ui-kit/InputListRange/InputListRangeProps.d.ts +0 -10
  448. package/dist/ui-kit/InputListRange/InputListRangeProps.js +0 -2
  449. package/dist/ui-kit/InputListRange/InputListRangeProps.js.map +0 -1
  450. package/lib/ui-kit/InputListRange/InputListRange.d.ts +0 -2
  451. package/lib/ui-kit/InputListRange/InputListRange.js +0 -39
  452. package/lib/ui-kit/InputListRange/InputListRange.js.map +0 -1
  453. package/lib/ui-kit/InputListRange/InputListRangeProps.d.ts +0 -10
  454. package/lib/ui-kit/InputListRange/InputListRangeProps.js +0 -2
  455. package/lib/ui-kit/InputListRange/InputListRangeProps.js.map +0 -1
  456. package/mobile/bundle/ui-kit/InputListRange/InputListRange.d.ts +0 -2
  457. package/mobile/bundle/ui-kit/InputListRange/InputListRangeProps.d.ts +0 -10
  458. package/mobile/dist/ui-kit/InputListRange/InputListRange.d.ts +0 -2
  459. package/mobile/dist/ui-kit/InputListRange/InputListRange.js +0 -41
  460. package/mobile/dist/ui-kit/InputListRange/InputListRange.js.map +0 -1
  461. package/mobile/dist/ui-kit/InputListRange/InputListRangeProps.d.ts +0 -10
  462. package/mobile/dist/ui-kit/InputListRange/InputListRangeProps.js +0 -2
  463. package/mobile/dist/ui-kit/InputListRange/InputListRangeProps.js.map +0 -1
  464. package/mobile/lib/ui-kit/InputListRange/InputListRange.d.ts +0 -2
  465. package/mobile/lib/ui-kit/InputListRange/InputListRange.js +0 -39
  466. package/mobile/lib/ui-kit/InputListRange/InputListRange.js.map +0 -1
  467. package/mobile/lib/ui-kit/InputListRange/InputListRangeProps.d.ts +0 -10
  468. package/mobile/lib/ui-kit/InputListRange/InputListRangeProps.js +0 -2
  469. package/mobile/lib/ui-kit/InputListRange/InputListRangeProps.js.map +0 -1
  470. package/mobile/src/ui-kit/InputListRange/InputListRange.tsx +0 -99
  471. package/mobile/src/ui-kit/InputListRange/InputListRangeProps.ts +0 -11
  472. package/src/ui-kit/InputListRange/InputListRange.tsx +0 -99
  473. package/src/ui-kit/InputListRange/InputListRangeProps.ts +0 -11
@@ -236,41 +236,84 @@
236
236
  return JSXTmpl;
237
237
  };
238
238
 
239
- const HeadingClass = {
240
- h0: 'text-m-title',
241
- h1: 'text-m-title',
242
- h2: 'text-m-title',
243
- h3: 'text-h6',
244
- h4: 'text-m-title-xs',
245
- h5: 'text-m-title-xs',
246
- h6: 'text-m-title-xs',
247
- };
248
- const Heading = JSX((props) => {
249
- const { className, headingType = 'h3', title, as: Tag = 'h3' } = props;
250
- return (jsx(Tag, { className: `font-sans font-medium m-0 ${HeadingClass[headingType]} ${className || ''}`, children: title }));
251
- });
252
-
253
239
  const style = (...atoms) => atoms
254
240
  .flatMap((_) => _)
255
241
  .filter(Boolean)
256
242
  .join(' ');
257
243
 
258
- const mapChildren = (mapper) => (children) => {
259
- if (children === null || children === undefined) {
244
+ const defaultBlockDecorator = ({ blockClassName, block, render }) => render({ blockClassName, block });
245
+
246
+ const DEFAULT_ANCESTORS = [];
247
+ const defaultStyle = 'col-span-12';
248
+ function renderBlock(block, options, { className, ...extraProps } = {}) {
249
+ const { key, blockDecorator = defaultBlockDecorator, blocksRegistry = {}, ancestors = DEFAULT_ANCESTORS, } = options;
250
+ const { type } = block;
251
+ if (!(type && type in blocksRegistry)) {
252
+ console.warn(`No block with "${type}" is registered`);
253
+ }
254
+ const BlockComponent = type && blocksRegistry[type];
255
+ return blockDecorator({
256
+ blockClassName: style('scroll-mt-12', // TODO scroll-mt-12 ? here?
257
+ className, block.style || defaultStyle),
258
+ block,
259
+ ancestors,
260
+ // Adjusted by decorator block and blockClassName
261
+ render: ({ block: adjustedBlock, blockClassName: adjustedBlockClassName }) => {
262
+ const { content } = adjustedBlock;
263
+ return BlockComponent ? (jsx(BlockComponent, { className: adjustedBlockClassName, block: block, options: options, ...content, ...extraProps }, key)) : null;
264
+ },
265
+ }, key);
266
+ }
267
+
268
+ const DEFAULT_SLOT_NAME = null;
269
+
270
+ const EMPTY_ANCESTORS = [];
271
+ const renderBlocksList = (blocks, { key, ancestors = EMPTY_ANCESTORS, slotName = DEFAULT_SLOT_NAME, renderProps = renderBlock, ...options }) => (blocks || []).map((_, j) => renderProps(_, {
272
+ ...options,
273
+ key: `${key ? key : _.type}-${j}`,
274
+ ancestors: options.parent
275
+ ? [...(ancestors || EMPTY_ANCESTORS), [options.parent, slotName]]
276
+ : ancestors,
277
+ }));
278
+
279
+ function renderChildren({ children, block, options, renderProps, }) {
280
+ if (children) {
260
281
  return children;
261
282
  }
262
- return Array.isArray(children) ? children.map(mapper) : mapper(children, 0);
263
- };
283
+ return block && options
284
+ ? renderBlocksList(block.blocks, { ...options, parent: block, renderProps })
285
+ : null;
286
+ }
264
287
 
265
- const HEADER_HEIGHT = 170;
266
- const FOOTER_HEIGHT = 48;
267
- const BLOCKS_GAP = 4;
268
- const PAGE_PADDINGS_X = 20;
269
- const DEFAULT_HEIGHT = 866;
270
- const getContainerHeight = (minHeight) => ({
271
- height: `calc(100vh - ${HEADER_HEIGHT + FOOTER_HEIGHT + BLOCKS_GAP + PAGE_PADDINGS_X}px)`,
272
- minHeight: `${minHeight || DEFAULT_HEIGHT}px`,
273
- });
288
+ class EventBus {
289
+ subscribers = {};
290
+ subjectsStateMap = {};
291
+ subscribe(type, listener) {
292
+ this.subscribers[type] = (this.subscribers[type] || []).concat(listener);
293
+ const latestEvent = this.subjectsStateMap[type];
294
+ if (latestEvent) {
295
+ listener(latestEvent);
296
+ }
297
+ return () => {
298
+ this.unsubscribe(type, listener);
299
+ };
300
+ }
301
+ unsubscribe(type, listener) {
302
+ this.subscribers[type] = this.subscribers[type]?.filter((s) => s !== listener);
303
+ }
304
+ fire(type, event) {
305
+ const isSubjectDeclared = type in this.subjectsStateMap;
306
+ if (isSubjectDeclared) {
307
+ this.subjectsStateMap[type] = event;
308
+ }
309
+ this.subscribers[type]?.forEach((s) => s(event));
310
+ }
311
+ subject(type, event) {
312
+ this.subjectsStateMap[type] = event;
313
+ }
314
+ }
315
+
316
+ const defaultEventBus = new EventBus();
274
317
 
275
318
  const SENSITIVITY_SCALE = 10;
276
319
  function useIntersectionObserver(observerCallback, { sensitivity, rootRef } = {}) {
@@ -296,6 +339,54 @@
296
339
  .concat(1);
297
340
  }
298
341
 
342
+ const blockRouterEventBus = new EventBus();
343
+
344
+ function useBlockIntersectionObserver(block) {
345
+ const observerCallback = useCallback((entries) => {
346
+ if (!block || !entries?.length) {
347
+ return;
348
+ }
349
+ const intersection = entries[entries.length - 1];
350
+ blockRouterEventBus.fire('intersection', { block, intersection });
351
+ }, [block]);
352
+ return useIntersectionObserver(observerCallback, { sensitivity: 1 });
353
+ }
354
+
355
+ const blockStyles = {
356
+ primary: 'bg-white text-primary-text',
357
+ secondary: 'bg-primary-main text-white',
358
+ gray: 'bg-main-divider text-primary-text',
359
+ transparent: 'bg-transparent text-primary-text',
360
+ '': '',
361
+ };
362
+ const BlockWrapper = JSX(({ className = '', version = 'primary', isTheme = true, block, tag = 'section', role, children, }) => {
363
+ const Tag = tag;
364
+ const ref = useBlockIntersectionObserver(block);
365
+ const [isHidden, setHidden] = useState(false);
366
+ useEffect(() => defaultEventBus.subscribe('tab', (event) => {
367
+ setHidden(Boolean(event.label && block?.labels?.length && !block.labels.includes(event.label)));
368
+ }), [block]);
369
+ return (jsx(Tag, { className: style(groupStyle(Boolean(version && isTheme)), blockStyles[version], isHidden ? 'hidden' : '', className), ...(version && isTheme ? { 'data-ver': version } : {}), ...(block?.anchor ? { id: block.anchor, ref } : {}), role: role, children: children }));
370
+ });
371
+ const groupStyle = (isGroup) => (isGroup ? 'group' : '');
372
+
373
+ const mapChildren = (mapper) => (children) => {
374
+ if (children === null || children === undefined) {
375
+ return children;
376
+ }
377
+ return Array.isArray(children) ? children.map(mapper) : mapper(children, 0);
378
+ };
379
+
380
+ const HEADER_HEIGHT = 170;
381
+ const FOOTER_HEIGHT = 48;
382
+ const BLOCKS_GAP = 4;
383
+ const PAGE_PADDINGS_X = 20;
384
+ const DEFAULT_HEIGHT = 866;
385
+ const getContainerHeight = (minHeight) => ({
386
+ height: `calc(100vh - ${HEADER_HEIGHT + FOOTER_HEIGHT + BLOCKS_GAP + PAGE_PADDINGS_X}px)`,
387
+ minHeight: `${minHeight || DEFAULT_HEIGHT}px`,
388
+ });
389
+
299
390
  const SwipeListItem = JSX(({ className = '', style, idx, activeIndex, observerOptions, children, onIntersection }) => {
300
391
  const observerCallback = useCallback((entries) => {
301
392
  if (entries.length && onIntersection) {
@@ -432,57 +523,23 @@
432
523
  ];
433
524
  };
434
525
 
435
- const DEFAULT_GAP = 14;
436
- /*
437
- Horizontal padding used on a container above SwipeListControl.
438
- Same value used on a SwipeListControlChildren container to compensate it
439
- and get rid of a clipping effect caused by overflow: hidden.
440
- */
441
- const DEFAULT_PADDING = 16;
442
- const SwipeListControl = JSX(({ className = '', gap = DEFAULT_GAP, padding = DEFAULT_PADDING, showDots = true, minHeight, children, onVisibleIndicesChange, listType = 'horizontal-list', version, }) => {
443
- const itemCount = Array.isArray(children) ? children.length : 0;
444
- const [containerRef, scroll] = useSwipeListScroll({
445
- itemCount,
446
- onVisibleIndicesChange,
447
- });
448
- const [activeIndex] = scroll.visibleIndicesRange;
449
- return (jsxs("div", { className: style(className, listType === 'vertical-list' ? 'relative h-full' : ''), children: [jsx(SwipeListContainer, { containerRef: containerRef, activeIndex: activeIndex, visibleItemCount: 1, gap: gap, padding: padding, onVisibleIndicesChange: scroll.handleVisibleIndicesChange, listType: listType, minHeight: minHeight, children: children }), showDots ? (jsx(SwipeListControlDots, { containerRef: containerRef, activeIndex: activeIndex, dotCount: itemCount, listType: listType, version: version })) : null] }));
450
- });
451
-
452
- class EventBus {
453
- subscribers = {};
454
- subjectsStateMap = {};
455
- subscribe(type, listener) {
456
- this.subscribers[type] = (this.subscribers[type] || []).concat(listener);
457
- const latestEvent = this.subjectsStateMap[type];
458
- if (latestEvent) {
459
- listener(latestEvent);
460
- }
461
- return () => {
462
- this.unsubscribe(type, listener);
463
- };
464
- }
465
- unsubscribe(type, listener) {
466
- this.subscribers[type] = this.subscribers[type]?.filter((s) => s !== listener);
467
- }
468
- fire(type, event) {
469
- const isSubjectDeclared = type in this.subjectsStateMap;
470
- if (isSubjectDeclared) {
471
- this.subjectsStateMap[type] = event;
472
- }
473
- this.subscribers[type]?.forEach((s) => s(event));
474
- }
475
- subject(type, event) {
476
- this.subjectsStateMap[type] = event;
477
- }
526
+ function useRouter() {
527
+ return useRouter._impl();
478
528
  }
479
-
480
- const defaultEventBus = new EventBus();
481
-
482
- const useDialog = (id = '') => ({
483
- open: (message) => defaultEventBus.fire('dialog', { type: 'open', id, message }),
484
- close: () => defaultEventBus.fire('dialog', { type: 'close' }),
529
+ useRouter._impl = () => ({
530
+ href: globalThis.location?.href || '/',
531
+ pathname: globalThis.location?.pathname || '/',
532
+ query: {},
533
+ push: () => {
534
+ // Do nothing
535
+ },
536
+ replace: () => {
537
+ // Do nothing
538
+ },
485
539
  });
540
+ useRouter.setup = (impl) => {
541
+ useRouter._impl = impl;
542
+ };
486
543
 
487
544
  const dirname = (path) => path?.split('/').slice(0, -1).join('/');
488
545
 
@@ -510,31 +567,73 @@
510
567
  };
511
568
  const hasPrefix = (href, prefix) => prefix && href && href.startsWith(prefix);
512
569
 
513
- /* eslint-disable @typescript-eslint/ban-types */
514
- const handlerDecorator = (handler, targetContent) => {
515
- return handlerDecorator._impl(handler, targetContent);
570
+ const svgUseStyleMap = {
571
+ normal: '',
572
+ color: 'text-primary-main',
573
+ black: 'text-black',
574
+ white: 'text-black',
516
575
  };
517
- handlerDecorator._impl = (handler) => handler;
518
- handlerDecorator.setup = (impl) => {
519
- handlerDecorator._impl = impl;
576
+ const Icon = JSX(({ className = '', imageClassName = '', name = '', alt = `Иконка ${name}`, title = alt, iconVersion = 'color', ...imgProps }) => {
577
+ const router = useRouter();
578
+ const href = adjustHref(router)(joinPath(projectSettings.CDN, '/icons', `${name}.svg`));
579
+ if (iconVersion !== 'normal') {
580
+ return (jsx(Background, { className: className, children: jsxs("svg", { className: style(getSvgSize(imgProps.width), svgUseStyleMap[iconVersion], iconVersion === 'white' ? 'invert' : '', imageClassName), ...imgProps, "aria-hidden": "true", children: [title ? jsx("title", { children: title }) : null, alt ? jsx("desc", { children: alt }) : null, jsx("use", { href: `${href}#icon`, xlinkHref: `${href}#icon` })] }) }));
581
+ }
582
+ if (!className.includes('h-')) {
583
+ imgProps['style'] = { height: `${imgProps.height}px` };
584
+ }
585
+ return (jsx("img", { className: className, src: href, alt: alt, title: title, "aria-hidden": "true", ...imgProps }));
586
+ });
587
+ const getSvgSize = (width) => (width ? '' : 'w-full h-full');
588
+ const Background = JSX(({ className, children }) => className ? jsx("div", { className: className, children: children }) : children);
589
+
590
+ const sourcesComparator = (a, b) => a?.media && b?.media ? a.media - b.media : 0;
591
+ const ImgAsPicture = JSX(({ className = '', image, imageClassName = '', isMobile = false, pathPrefix }) => {
592
+ const router = useRouter();
593
+ const pictureStyles = isMobile ? 'flex' : 'flex-none';
594
+ return (jsxs("picture", { className: `${pictureStyles} ${className}`, children: [image?.sources?.length
595
+ ? image.sources
596
+ .filter((_) => _?.src)
597
+ .sort(sourcesComparator)
598
+ .map(({ src, format, media }, index) => (jsx("source", { srcSet: adjustSrc(router, pathPrefix)(src), type: formatToMimeType(format), media: media ? `(max-width: ${media}px)` : '', ...image.size }, `${index}_${src}`)))
599
+ : null, image?.src
600
+ ? renderImg({ ...image, src: adjustSrc(router, pathPrefix)(image.src) }, imageClassName, isMobile)
601
+ : null] }));
602
+ });
603
+ const renderImg = (image, imageClassName = '', isMobile = false) => {
604
+ const style = {
605
+ width: image.size?.width ? `${image.size?.width}px` : '100%',
606
+ height: image.size?.height ? `${image.size?.height}px` : '100%',
607
+ };
608
+ const title = image.title || '';
609
+ const alt = image.alt || image.title;
610
+ const imgStyle = isMobile ? 'm-auto' : 'm-0';
611
+ return (jsx("img", { src: image.src, className: `${imgStyle} ${imageClassName}`, alt: alt, title: title, style: style, ...image.size }));
520
612
  };
613
+ const adjustSrc = (router, pathPrefix) => (src) => src && !isURL(src) ? adjustHref(router)(joinPath(pathPrefix, src)) : src;
614
+ const formatToMimeType = (format) => format ? `image/${String(format)}` : undefined;
521
615
 
522
- function useRouter() {
523
- return useRouter._impl();
524
- }
525
- useRouter._impl = () => ({
526
- href: globalThis.location?.href || '/',
527
- pathname: globalThis.location?.pathname || '/',
528
- query: {},
529
- push: () => {
530
- // Do nothing
531
- },
532
- replace: () => {
533
- // Do nothing
534
- },
616
+ const ImgInner = JSX(({ className = '', image, imageClassName = '', isMobile, pathPrefix, ...iconProps }) => {
617
+ if (!image?.src && !image?.icon) {
618
+ return null;
619
+ }
620
+ return image.icon ? (jsx(Icon, { className: className, imageClassName: imageClassName, iconVersion: image?.iconVersion, name: image.icon, ...iconProps })) : (jsx(ImgAsPicture, { className: className, imageClassName: imageClassName, image: image, isMobile: isMobile, pathPrefix: pathPrefix }));
621
+ });
622
+
623
+ const Img = JSX((props) => jsx(ImgInner, { ...props, isMobile: true }));
624
+
625
+ const useDialog = (id = '') => ({
626
+ open: (message) => defaultEventBus.fire('dialog', { type: 'open', id, message }),
627
+ close: () => defaultEventBus.fire('dialog', { type: 'close' }),
535
628
  });
536
- useRouter.setup = (impl) => {
537
- useRouter._impl = impl;
629
+
630
+ /* eslint-disable @typescript-eslint/ban-types */
631
+ const handlerDecorator = (handler, targetContent) => {
632
+ return handlerDecorator._impl(handler, targetContent);
633
+ };
634
+ handlerDecorator._impl = (handler) => handler;
635
+ handlerDecorator.setup = (impl) => {
636
+ handlerDecorator._impl = impl;
538
637
  };
539
638
 
540
639
  function useLink(params = {}) {
@@ -635,63 +734,170 @@
635
734
  const RegularButton = JSX(({ className = '', href, rel, target, ariaLabel, version, rounded, onClick, children }) => (jsx("a", { className: getRegularButtonClasses({ className, version, rounded }), href: href, rel: rel, target: target, "aria-label": ariaLabel, role: href ? 'link' : 'button', onClick: onClick, children: children })));
636
735
  const DisabledButton = JSX(({ className, ariaLabel, version, rounded, children }) => (jsx("div", { role: "button", "aria-disabled": "true", "aria-label": ariaLabel, tabIndex: -1, className: getDisabledButtonClasses({ className, rounded, version }), children: children })));
637
736
 
638
- const GRADIENT = 'bg-gradient-to-r from-main-gradient-start to-main-gradient-end';
639
- const DIVIDER_CLASSES = 'border-main-divider border border-t-0 border-x-0';
737
+ const ArrowButton = JSX(({ className, disabled, ...rest }) => (jsx(Button, { rounded: true, className: `group/btn shadow-[0_4px_25px_rgba(0,0,0,0.07)] w-12 h-12 min-h-12 max-h-12 flex items-center justify-center ${disabled
738
+ ? 'bg-secondary-light text-secondary-text'
739
+ : 'bg-white text-primary-text hover:text-primary-main'} ${className || ''}`, disabled: disabled, ...rest, children: jsx(Img, { className: "w-4 h-4 min-w-4 min-h-4 rounded-full box-border", image: { icon: 'ArrowLeftIcon', iconVersion: 'black' }, imageClassName: "group-hover/btn:text-primary-main", width: "16", height: "16" }) })));
740
+ const ScrollLeftButton = JSX((props) => (jsx(ArrowButton, { ...props, ariaLabel: "\u041F\u0440\u043E\u043B\u0438\u0441\u0442\u0430\u0442\u044C \u0432\u043B\u0435\u0432\u043E", "data-block-control": "scroll-left" })));
741
+ const ScrollRightButton = JSX((props) => (jsx(ArrowButton, { ...props, className: `${props.className || ''} rotate-180`, ariaLabel: "\u041F\u0440\u043E\u043B\u0438\u0441\u0442\u0430\u0442\u044C \u0432\u043F\u0440\u0430\u0432\u043E", "data-block-control": "scroll-right" })));
742
+
743
+ const scrollButtonStyle = 'absolute top-[calc(50%-24px)] z-40';
744
+ const blurBaseStyle = 'absolute top-0 bottom-0 z-40 w-[84px] pointer-events-none';
745
+ const CarouselScrollButtons = JSX(({ scroll, arrowsPadded, isBlur, onScrollLeft, onScrollRight, hasEdgeBlocks, activeIndex, itemCount, }) => {
746
+ const { canScrollLeft, canScrollRight, scrollLeft, scrollRight } = scroll;
747
+ const canMoveLeft = hasEdgeBlocks ? activeIndex > 0 : canScrollLeft;
748
+ const canMoveRight = hasEdgeBlocks ? activeIndex < itemCount - 1 : canScrollRight;
749
+ const handleScrollLeft = useCallback(() => {
750
+ if (!hasEdgeBlocks) {
751
+ scrollLeft();
752
+ }
753
+ else {
754
+ canScrollLeft && activeIndex !== itemCount - 1 && scrollLeft();
755
+ onScrollLeft();
756
+ }
757
+ }, [scrollLeft, onScrollLeft, hasEdgeBlocks, canScrollLeft, activeIndex, itemCount]);
758
+ const handleScrollRight = useCallback(() => {
759
+ if (!hasEdgeBlocks) {
760
+ scrollRight();
761
+ }
762
+ else {
763
+ canScrollRight && activeIndex !== 0 && scrollRight();
764
+ onScrollRight();
765
+ }
766
+ }, [scrollRight, onScrollRight, hasEdgeBlocks, canScrollLeft, activeIndex, itemCount]);
767
+ return (jsxs("div", { children: [renderBlur(isBlur, scroll), canMoveLeft ? (jsx(ScrollLeftButton, { className: style(scrollButtonStyle, arrowsPadded ? 'left-8' : 'left-0'), onClick: handleScrollLeft })) : null, canMoveRight ? (jsx(ScrollRightButton, { className: style(scrollButtonStyle, arrowsPadded ? 'right-8' : 'right-0'), onClick: handleScrollRight })) : null] }));
768
+ });
769
+ 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;
640
770
 
641
- const svgUseStyleMap = {
642
- normal: '',
643
- color: 'text-primary-main',
644
- black: 'text-black',
645
- white: 'text-black',
646
- };
647
- const Icon = JSX(({ className = '', imageClassName = '', name = '', alt = `Иконка ${name}`, title = alt, iconVersion = 'color', ...imgProps }) => {
648
- const router = useRouter();
649
- const href = adjustHref(router)(joinPath(projectSettings.CDN, '/icons', `${name}.svg`));
650
- if (iconVersion !== 'normal') {
651
- return (jsx(Background, { className: className, children: jsxs("svg", { className: style(getSvgSize(imgProps.width), svgUseStyleMap[iconVersion], iconVersion === 'white' ? 'invert' : '', imageClassName), ...imgProps, "aria-hidden": "true", children: [title ? jsx("title", { children: title }) : null, alt ? jsx("desc", { children: alt }) : null, jsx("use", { href: `${href}#icon`, xlinkHref: `${href}#icon` })] }) }));
652
- }
653
- if (!className.includes('h-')) {
654
- imgProps['style'] = { height: `${imgProps.height}px` };
655
- }
656
- return (jsx("img", { className: className, src: href, alt: alt, title: title, "aria-hidden": "true", ...imgProps }));
771
+ const ITEMS_GAP = 16;
772
+
773
+ const Carousel = JSX(({ className = '', itemCount, visibleItemCount, isBlur = true, isCyclic = false, arrowsPadded = true, isPadding = true, showDots = false, isAlignCenter = false, ...rest }) => {
774
+ const { blocks: childBlocks = [] } = rest.block || {};
775
+ const count = itemCount || childBlocks?.length;
776
+ const [activeIndex, setActiveIndex] = useState(Math.floor((visibleItemCount || 0) / 2));
777
+ const increaseActiveIndex = useCallback(() => setActiveIndex((_) => _ + 1), []);
778
+ const decreaseActiveIndex = useCallback(() => setActiveIndex((_) => _ - 1), []);
779
+ const [containerRef, scroll] = useSwipeListScroll({
780
+ itemCount: count,
781
+ isCyclic,
782
+ });
783
+ const [dotsActiveIndex] = scroll.visibleIndicesRange;
784
+ const isBankHistoryCarousel = childBlocks && childBlocks[0]?.type === 'CarouselBankHistoryCard';
785
+ 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({
786
+ ...rest,
787
+ renderProps: isBankHistoryCarousel
788
+ ? (block, options) => renderBlock(block, options, {
789
+ blocksLength: childBlocks?.length,
790
+ activeIndex: activeIndex,
791
+ })
792
+ : renderBlock,
793
+ }) }), jsx(CarouselScrollButtons, { scroll: scroll, isBlur: isBlur, arrowsPadded: arrowsPadded, onScrollLeft: decreaseActiveIndex, onScrollRight: increaseActiveIndex, hasEdgeBlocks: isBankHistoryCarousel, activeIndex: activeIndex, itemCount: count }), showDots ? renderDots(containerRef, dotsActiveIndex, count) : null] }) }));
657
794
  });
658
- const getSvgSize = (width) => (width ? '' : 'w-full h-full');
659
- const Background = JSX(({ className, children }) => className ? jsx("div", { className: className, children: children }) : children);
795
+ Carousel.childrenTypes = [
796
+ 'CarouselCard',
797
+ 'CarouselBankHistoryCard',
798
+ 'CarouselCatalogCard',
799
+ 'CarouselInvestmentCard',
800
+ 'CarouselProductCard',
801
+ 'CarouselProgramsCard',
802
+ 'CarouselRecommendationCard',
803
+ 'CarouselTariffsCard',
804
+ 'CarouselRichTextCard',
805
+ 'CarouselInvestmentCard',
806
+ 'CarouselEventCard',
807
+ ];
808
+ const getPaddingStyle$1 = (isPadding) => (isPadding ? 'p-default' : '');
809
+ const getAlignStyle = (isAlignCenter) => isAlignCenter ? 'flex justify-center' : '';
810
+ const renderDots = (containerRef, dotsActiveIndex, itemCount) => (jsx(SwipeListControlDots, { containerRef: containerRef, activeIndex: dotsActiveIndex, dotCount: itemCount, listType: 'horizontal-list' }));
660
811
 
661
- const sourcesComparator = (a, b) => a?.media && b?.media ? a.media - b.media : 0;
662
- const ImgAsPicture = JSX(({ className = '', image, imageClassName = '', isMobile = false, pathPrefix }) => {
663
- const router = useRouter();
664
- const pictureStyles = isMobile ? 'flex' : 'flex-none';
665
- return (jsxs("picture", { className: `${pictureStyles} ${className}`, children: [image?.sources?.length
666
- ? image.sources
667
- .filter((_) => _?.src)
668
- .sort(sourcesComparator)
669
- .map(({ src, format, media }, index) => (jsx("source", { srcSet: adjustSrc(router, pathPrefix)(src), type: formatToMimeType(format), media: media ? `(max-width: ${media}px)` : '', ...image.size }, `${index}_${src}`)))
670
- : null, image?.src
671
- ? renderImg({ ...image, src: adjustSrc(router, pathPrefix)(image.src) }, imageClassName, isMobile)
672
- : null] }));
812
+ const Foldable = JSX(({ className = '', isFoldButtonOnTop = false, unfoldedByDefault = false, renderFoldableSection, renderFoldButton, }) => {
813
+ const [isUnfolded, setIsUnfolded] = useState(unfoldedByDefault);
814
+ const onToggle = useCallback(() => {
815
+ setIsUnfolded((_) => !_);
816
+ }, []);
817
+ const sectionNode = renderFoldableSection({ isUnfolded, onToggle });
818
+ const buttonNode = renderFoldButton ? renderFoldButton({ isUnfolded, onToggle }) : null;
819
+ return isFoldButtonOnTop ? (jsxs("div", { className: className, children: [buttonNode, sectionNode] })) : (jsxs("div", { className: className, children: [sectionNode, buttonNode] }));
673
820
  });
674
- const renderImg = (image, imageClassName = '', isMobile = false) => {
675
- const style = {
676
- width: image.size?.width ? `${image.size?.width}px` : '100%',
677
- height: image.size?.height ? `${image.size?.height}px` : '100%',
678
- };
679
- const title = image.title || '';
680
- const alt = image.alt || image.title;
681
- const imgStyle = isMobile ? 'm-auto' : 'm-0';
682
- return (jsx("img", { src: image.src, className: `${imgStyle} ${imageClassName}`, alt: alt, title: title, style: style, ...image.size }));
821
+
822
+ const FoldableSection = JSX(({ className = '', isUnfolded, children }) => {
823
+ const containerRef = useRef(null);
824
+ useEffect(() => {
825
+ if (containerRef.current) {
826
+ containerRef.current.style.maxHeight = isUnfolded
827
+ ? `${containerRef.current.scrollHeight}px`
828
+ : '';
829
+ }
830
+ }, [isUnfolded, children?.length]);
831
+ return (jsx("div", { ref: containerRef, className: `transition-max-h duration-300 overflow-hidden ${containerRef.current || !isUnfolded ? 'max-h-0' : ''} ${className}`, children: children }));
832
+ });
833
+
834
+ const HeadingClass = {
835
+ h0: 'text-m-title',
836
+ h1: 'text-m-title',
837
+ h2: 'text-m-title',
838
+ h3: 'text-h6',
839
+ h4: 'text-m-title-xs',
840
+ h5: 'text-m-title-xs',
841
+ h6: 'text-m-title-xs',
683
842
  };
684
- const adjustSrc = (router, pathPrefix) => (src) => src && !isURL(src) ? adjustHref(router)(joinPath(pathPrefix, src)) : src;
685
- const formatToMimeType = (format) => format ? `image/${String(format)}` : undefined;
843
+ const Heading = JSX((props) => {
844
+ const { className, headingType = 'h3', title, as: Tag = 'h3' } = props;
845
+ return (jsx(Tag, { className: `font-sans font-medium m-0 ${HeadingClass[headingType]} ${className || ''}`, children: title }));
846
+ });
686
847
 
687
- const ImgInner = JSX(({ className = '', image, imageClassName = '', isMobile, pathPrefix, ...iconProps }) => {
688
- if (!image?.src && !image?.icon) {
689
- return null;
690
- }
691
- return image.icon ? (jsx(Icon, { className: className, imageClassName: imageClassName, iconVersion: image?.iconVersion, name: image.icon, ...iconProps })) : (jsx(ImgAsPicture, { className: className, imageClassName: imageClassName, image: image, isMobile: isMobile, pathPrefix: pathPrefix }));
848
+ const Paragraph = JSX(({ children, ...style }) => (jsx("p", { className: ['font-sans', ...Object.values(style)].join(' '), children: children })));
849
+
850
+ const getPaddingStyle = (isHighlighting) => isHighlighting ? 'p-default mt-6' : 'p-default mt-6';
851
+
852
+ const renderButtonsSection = (buttons, { className = '', buttonClassName, isVertical } = {}) => buttons?.length && buttons.some((_) => _?.text || _?.icon?.icon) ? (jsx("div", { className: style('flex', isVertical ? 'flex-col gap-2' : 'gap-4', className), children: buttons.map(renderButton(buttonClassName)) })) : null;
853
+ const renderButton = (buttonClassName = '') => (button, index) => {
854
+ const { text, icon, iconRight, version, ...rest } = button || {};
855
+ const iconVersionDefault = version === 'secondary' ? 'color' : 'white';
856
+ const iconVersion = icon?.iconVersion ? icon?.iconVersion : iconVersionDefault;
857
+ return text || icon?.icon ? (jsx(Button, { className: buttonClassName, appendLeft: renderButtonIcon({ ...icon, iconVersion }), appendRight: renderButtonIcon({ ...iconRight, iconVersion }), version: version, text: text, ...rest }, index ? String(index) : '')) : null;
858
+ };
859
+ const DEFAULT_ICON_W = 24;
860
+ const renderButtonIcon = (icon) => icon?.icon || icon?.src ? (jsx(Img, { image: icon, width: String(icon?.size?.width || DEFAULT_ICON_W), height: String(DEFAULT_ICON_W) })) : null;
861
+
862
+ const Text = JSX(({ children, ...style }) => (jsx("span", { className: ['font-sans', ...Object.values(style)].join(' '), children: children })));
863
+
864
+ const descriptionSize = 'text-l';
865
+
866
+ const renderCardInfo = (cell, i) => {
867
+ const { title, description, buttons } = cell;
868
+ 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)));
869
+ };
870
+
871
+ const VISIBLE_CELLS_COUNT = 1;
872
+ const CarouselTariffsCard = JSX(({ className = '', title, icon, isHighlighting = false, button, cardCells = [], ...rest }) => {
873
+ const cellsNode = cardCells.map(renderCardInfo);
874
+ const visibleCells = cellsNode.slice(0, VISIBLE_CELLS_COUNT);
875
+ const hiddenCells = cellsNode.slice(VISIBLE_CELLS_COUNT);
876
+ return (jsxs(BlockWrapper, { className: style('relative border border-gray flex flex-col', getPaddingStyle(isHighlighting), className), ...rest, children: [isHighlighting ? renderHitIcon() : null, renderIconBlock(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] }));
692
877
  });
878
+ const renderIconBlock = (icon) => (jsx("div", { className: "w-[267px] min-w-[267px] self-center", children: icon?.src || icon?.icon ? jsx(Img, { image: icon }) : null }));
879
+ 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" })] }));
880
+ 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" })] }));
693
881
 
694
- const Img = JSX((props) => jsx(ImgInner, { ...props, isMobile: true }));
882
+ const DEFAULT_GAP = 14;
883
+ /*
884
+ Horizontal padding used on a container above SwipeListControl.
885
+ Same value used on a SwipeListControlChildren container to compensate it
886
+ and get rid of a clipping effect caused by overflow: hidden.
887
+ */
888
+ const DEFAULT_PADDING = 16;
889
+ const SwipeListControl = JSX(({ className = '', gap = DEFAULT_GAP, padding = DEFAULT_PADDING, showDots = true, minHeight, children, onVisibleIndicesChange, listType = 'horizontal-list', version, }) => {
890
+ const itemCount = Array.isArray(children) ? children.length : 0;
891
+ const [containerRef, scroll] = useSwipeListScroll({
892
+ itemCount,
893
+ onVisibleIndicesChange,
894
+ });
895
+ const [activeIndex] = scroll.visibleIndicesRange;
896
+ return (jsxs("div", { className: style(className, listType === 'vertical-list' ? 'relative h-full' : ''), children: [jsx(SwipeListContainer, { containerRef: containerRef, activeIndex: activeIndex, visibleItemCount: 1, gap: gap, padding: padding, onVisibleIndicesChange: scroll.handleVisibleIndicesChange, listType: listType, minHeight: minHeight, children: children }), showDots ? (jsx(SwipeListControlDots, { containerRef: containerRef, activeIndex: activeIndex, dotCount: itemCount, listType: listType, version: version })) : null] }));
897
+ });
898
+
899
+ const GRADIENT = 'bg-gradient-to-r from-main-gradient-start to-main-gradient-end';
900
+ const DIVIDER_CLASSES = 'border-main-divider border border-t-0 border-x-0';
695
901
 
696
902
  const headingStyle = (isFillGradient = false) => (isFillGradient ? 'text-white' : '');
697
903
  const subtitleStyle = (isFillGradient = false) => `text-s mb-3.5 ${isFillGradient ? 'text-white' : 'text-secondary-text/80'}`;
@@ -817,37 +1023,6 @@
817
1023
  return data || {};
818
1024
  }
819
1025
 
820
- const blockRouterEventBus = new EventBus();
821
-
822
- function useBlockIntersectionObserver(block) {
823
- const observerCallback = useCallback((entries) => {
824
- if (!block || !entries?.length) {
825
- return;
826
- }
827
- const intersection = entries[entries.length - 1];
828
- blockRouterEventBus.fire('intersection', { block, intersection });
829
- }, [block]);
830
- return useIntersectionObserver(observerCallback, { sensitivity: 1 });
831
- }
832
-
833
- const blockStyles = {
834
- primary: 'bg-white text-primary-text',
835
- secondary: 'bg-primary-main text-white',
836
- gray: 'bg-main-divider text-primary-text',
837
- transparent: 'bg-transparent text-primary-text',
838
- '': '',
839
- };
840
- const BlockWrapper = JSX(({ className = '', version = 'primary', isTheme = true, block, tag = 'section', role, children, }) => {
841
- const Tag = tag;
842
- const ref = useBlockIntersectionObserver(block);
843
- const [isHidden, setHidden] = useState(false);
844
- useEffect(() => defaultEventBus.subscribe('tab', (event) => {
845
- setHidden(Boolean(event.label && block?.labels?.length && !block.labels.includes(event.label)));
846
- }), [block]);
847
- return (jsx(Tag, { className: style(groupStyle(Boolean(version && isTheme)), blockStyles[version], isHidden ? 'hidden' : '', className), ...(version && isTheme ? { 'data-ver': version } : {}), ...(block?.anchor ? { id: block.anchor, ref } : {}), role: role, children: children }));
848
- });
849
- const groupStyle = (isGroup) => (isGroup ? 'group' : '');
850
-
851
1026
  const CloseButton = JSX(({ className, onClick }) => (jsx("button", { className: style('flex justify-center items-center w-12 h-12 p-1 bg-transparent border-none', className), onClick: onClick, title: "\u0417\u0430\u043A\u0440\u044B\u0442\u044C", children: jsx(Img, { image: { icon: 'CloseIcon' }, width: "24", height: "24" }) })));
852
1027
 
853
1028
  function assertUnreachable(x) {
@@ -1180,50 +1355,6 @@
1180
1355
  return (jsx("div", { className: `col-span-12 rounded-md cursor-pointer p-4 mt-6 mb-6 bg-secondary-light font-sans ${className}`, children: href ? (jsxs("div", { className: "flex", children: [jsx("div", { className: "flex justify-center align-middle rounded-md bg-primary-main w-12 h-12", children: jsx(Logo, { className: "w-8", bgColor: "transparent", showTitle: true }) }), jsxs("a", { href: href, target: "_blank", className: "flex flex-col justify-center pl-3", children: [jsx("div", { className: "text-s font-medium mb-[3px]", children: title }), jsx("div", { className: "text-s text-secondary-text", children: description })] })] })) : null }));
1181
1356
  });
1182
1357
 
1183
- const DEFAULT_SLOT_NAME = null;
1184
-
1185
- const defaultBlockDecorator = ({ blockClassName, block, render }) => render({ blockClassName, block });
1186
-
1187
- const DEFAULT_ANCESTORS = [];
1188
- const defaultStyle = 'col-span-12';
1189
- function renderBlock(block, options, { className, ...extraProps } = {}) {
1190
- const { key, blockDecorator = defaultBlockDecorator, blocksRegistry = {}, ancestors = DEFAULT_ANCESTORS, } = options;
1191
- const { type } = block;
1192
- if (!(type && type in blocksRegistry)) {
1193
- console.warn(`No block with "${type}" is registered`);
1194
- }
1195
- const BlockComponent = type && blocksRegistry[type];
1196
- return blockDecorator({
1197
- blockClassName: style('scroll-mt-12', // TODO scroll-mt-12 ? here?
1198
- className, block.style || defaultStyle),
1199
- block,
1200
- ancestors,
1201
- // Adjusted by decorator block and blockClassName
1202
- render: ({ block: adjustedBlock, blockClassName: adjustedBlockClassName }) => {
1203
- const { content } = adjustedBlock;
1204
- return BlockComponent ? (jsx(BlockComponent, { className: adjustedBlockClassName, block: block, options: options, ...content, ...extraProps }, key)) : null;
1205
- },
1206
- }, key);
1207
- }
1208
-
1209
- const EMPTY_ANCESTORS = [];
1210
- const renderBlocksList = (blocks, { key, ancestors = EMPTY_ANCESTORS, slotName = DEFAULT_SLOT_NAME, renderProps = renderBlock, ...options }) => (blocks || []).map((_, j) => renderProps(_, {
1211
- ...options,
1212
- key: `${key ? key : _.type}-${j}`,
1213
- ancestors: options.parent
1214
- ? [...(ancestors || EMPTY_ANCESTORS), [options.parent, slotName]]
1215
- : ancestors,
1216
- }));
1217
-
1218
- function renderChildren({ children, block, options, renderProps, }) {
1219
- if (children) {
1220
- return children;
1221
- }
1222
- return block && options
1223
- ? renderBlocksList(block.blocks, { ...options, parent: block, renderProps })
1224
- : null;
1225
- }
1226
-
1227
1358
  const DefaultFoldButton = JSX(({ className = '', label, icon, dataTheme = '', disabled = false, onClick }) => {
1228
1359
  return (jsxs("button", { className: style('flex justify-center w-full px-0 py-5 border border-transparent outline-none focus:border-primary-text', disabled
1229
1360
  ? 'bg-main-divider text-main-disabled hover:bg-main-divider'
@@ -1233,30 +1364,6 @@
1233
1364
  }, className: "flex-shrink-0 my-auto", width: "20", height: "20" })) : null] }));
1234
1365
  });
1235
1366
 
1236
- const Foldable = JSX(({ className = '', isFoldButtonOnTop = false, unfoldedByDefault = false, renderFoldableSection, renderFoldButton, }) => {
1237
- const [isUnfolded, setIsUnfolded] = useState(unfoldedByDefault);
1238
- const onToggle = useCallback(() => {
1239
- setIsUnfolded((_) => !_);
1240
- }, []);
1241
- const sectionNode = renderFoldableSection({ isUnfolded, onToggle });
1242
- const buttonNode = renderFoldButton ? renderFoldButton({ isUnfolded, onToggle }) : null;
1243
- return isFoldButtonOnTop ? (jsxs("div", { className: className, children: [buttonNode, sectionNode] })) : (jsxs("div", { className: className, children: [sectionNode, buttonNode] }));
1244
- });
1245
-
1246
- const FoldableSection = JSX(({ className = '', isUnfolded, children }) => {
1247
- const containerRef = useRef(null);
1248
- useEffect(() => {
1249
- if (containerRef.current) {
1250
- containerRef.current.style.maxHeight = isUnfolded
1251
- ? `${containerRef.current.scrollHeight}px`
1252
- : '';
1253
- }
1254
- }, [isUnfolded, children?.length]);
1255
- return (jsx("div", { ref: containerRef, className: `transition-max-h duration-300 overflow-hidden ${containerRef.current || !isUnfolded ? 'max-h-0' : ''} ${className}`, children: children }));
1256
- });
1257
-
1258
- const Text = JSX(({ children, ...style }) => (jsx("span", { className: ['font-sans', ...Object.values(style)].join(' '), children: children })));
1259
-
1260
1367
  const RollupItem = JSX(({ className = '', label = 'Развернуть', isExpanded, isFoldButtonOnTop = true, version = 'primary', ...rest }) => {
1261
1368
  return (jsx(BlockWrapper, { className: style('border-b border-solid border-main-divider w-full', className), tag: "div", version: "transparent", ...rest, children: jsx(Foldable, { isFoldButtonOnTop: isFoldButtonOnTop, unfoldedByDefault: isExpanded, renderFoldableSection: ({ isUnfolded }) => (jsx(FoldableSection, { className: "flex flex-wrap group-last:last:pb-0 gap-5 [&>*]:p-0", isUnfolded: isUnfolded, children: renderChildren(rest) })), renderFoldButton: ({ isUnfolded, onToggle }) => renderFoldButton({ version, label, isUnfolded, onToggle }) }) }));
1262
1369
  });
@@ -1461,45 +1568,44 @@
1461
1568
  return (jsxs(BlockWrapper, { tag: "header", version: version, ...rest, children: [jsxs("div", { className: "container px-4 py-0 box-border", children: [jsx(HeaderTop, { onClick: handleBurgerMenuShow, bgColor: bgColor, logo: logo }), jsx("nav", { className: "flex items-center m-0 p-0 overflow-y-hidden w-full h-12", children: jsx("div", { className: "flex no-scrollbar horizontal-list h-full items-center", children: subItems?.map((_, i) => (jsx(HeaderItem, { className: "mr-8 whitespace-nowrap text-s", active: _ === activeSubItem, ..._ }, String(i)))) }) })] }), burgerMenuShow ? (jsx(HeaderBurger, { onClick: handleBurgerMenuShow, burgerSubMenu: dispositions, defaultLocation: defaultLocation, children: jsx("div", { className: "list-none m-0 p-0", children: topItems?.map((item, i) => (jsx(RollupItem, { label: item.text, children: jsx(LinkList, { documents: item.items }) }, String(i)))) }) })) : null] }));
1462
1569
  });
1463
1570
 
1464
- const Paragraph = JSX(({ children, ...style }) => (jsx("p", { className: ['font-sans', ...Object.values(style)].join(' '), children: children })));
1465
-
1466
1571
  const headlineVersionStyles = {
1467
1572
  XXL: {
1468
- wrapper: 'gap-[18px]',
1469
1573
  title: { headingType: 'h0', as: 'h1' },
1470
1574
  descriptionSize: 'text-h5',
1575
+ descriptionStyle: 'mt-5',
1471
1576
  },
1472
1577
  XL: {
1473
- wrapper: 'gap-4',
1474
1578
  title: { headingType: 'h1', as: 'h1' },
1475
1579
  descriptionSize: 'text-xl-light',
1580
+ descriptionStyle: 'mt-4',
1476
1581
  },
1477
1582
  L: {
1478
- wrapper: 'gap-4',
1479
1583
  title: { headingType: 'h2', as: 'h2' },
1480
1584
  descriptionSize: 'text-xl-light',
1585
+ descriptionStyle: 'mt-4',
1481
1586
  },
1482
1587
  M: {
1483
- wrapper: 'gap-3',
1484
1588
  title: { headingType: 'h3', as: 'h3' },
1485
1589
  descriptionSize: 'text-xl-light',
1590
+ descriptionStyle: 'mt-3',
1486
1591
  },
1487
1592
  S: {
1488
- wrapper: 'gap-2',
1489
1593
  title: { headingType: 'h4', as: 'h4' },
1490
1594
  descriptionSize: 'text-xl-light',
1595
+ descriptionStyle: 'mt-2',
1491
1596
  },
1492
1597
  XS: {
1493
- wrapper: 'gap-2',
1494
1598
  title: { headingType: 'h5', as: 'h5' },
1495
1599
  descriptionSize: 'text-l-light',
1600
+ descriptionStyle: 'mt-2',
1496
1601
  },
1497
1602
  };
1498
1603
 
1499
1604
  const Headline = JSX(({ className, title, description, headlineVersion = 'XL', align = 'text-center', as, isPadding = true, isTheme = false, version = '', ...rest }) => {
1500
1605
  const versionStyle = headlineVersionStyles[headlineVersion];
1501
1606
  const paddingStyle = isPadding ? 'p-default' : '';
1502
- 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] }));
1607
+ const descriptionStyle = { marginTop: versionStyle.descriptionStyle };
1608
+ 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] }));
1503
1609
  });
1504
1610
 
1505
1611
  const ImgBlock = JSX((props) => {
@@ -1582,16 +1688,6 @@
1582
1688
  const renderShimmerItem = (width, index) => (jsx("div", { style: { width: `${width || 100}%` }, className: "h-4 mt-2 bg-secondary-light" }, String(index)));
1583
1689
  const goldenSequence = (first, size) => [first].concat(size > 0 ? goldenSequence(first / GOLDEN_RATIO, size - 1) : []);
1584
1690
 
1585
- const renderButtonsSection = (buttons, { className = '', buttonClassName, isVertical } = {}) => buttons?.length && buttons.some((_) => _?.text || _?.icon?.icon) ? (jsx("div", { className: style('flex', isVertical ? 'flex-col gap-2' : 'gap-4', className), children: buttons.map(renderButton(buttonClassName)) })) : null;
1586
- const renderButton = (buttonClassName = '') => (button, index) => {
1587
- const { text, icon, iconRight, version, ...rest } = button || {};
1588
- const iconVersionDefault = version === 'secondary' ? 'color' : 'white';
1589
- const iconVersion = icon?.iconVersion ? icon?.iconVersion : iconVersionDefault;
1590
- return text || icon?.icon ? (jsx(Button, { className: buttonClassName, appendLeft: renderButtonIcon({ ...icon, iconVersion }), appendRight: renderButtonIcon({ ...iconRight, iconVersion }), version: version, text: text, ...rest }, index ? String(index) : '')) : null;
1591
- };
1592
- const DEFAULT_ICON_W = 24;
1593
- const renderButtonIcon = (icon) => icon?.icon || icon?.src ? (jsx(Img, { image: icon, width: String(icon?.size?.width || DEFAULT_ICON_W), height: String(DEFAULT_ICON_W) })) : null;
1594
-
1595
1691
  const DOT_SIZE_MAP = {
1596
1692
  L: 'w-1.5 h-1.5 min-w-1.5 min-h-1.5 mr-4',
1597
1693
  M: 'w-1.5 h-1.5 min-w-1.5 min-h-1.5 mr-3',
@@ -1786,6 +1882,8 @@
1786
1882
  VerticalLayout.childrenTypes = [];
1787
1883
 
1788
1884
  const Blocks = {
1885
+ Carousel,
1886
+ CarouselTariffsCard,
1789
1887
  ComparisonTable,
1790
1888
  Footer,
1791
1889
  Header,
@@ -1955,7 +2053,7 @@
1955
2053
  return (list) => list.reduce((acc, el, i) => (acc.length ? acc.concat({ ...sep, key: i }, el) : [el]), []);
1956
2054
  }
1957
2055
 
1958
- const packageVersion = "0.10.6";
2056
+ const packageVersion = "0.10.7";
1959
2057
 
1960
2058
  exports.Blocks = Blocks;
1961
2059
  exports.ContentPage = ContentPage;