@redneckz/wildless-cms-uni-blocks 0.6.36 → 0.6.37

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 (516) hide show
  1. package/bin/migration-scripts/0.6.32.js +6 -0
  2. package/bundle/blocks.schema.json +1 -1
  3. package/bundle/bundle.umd.js +121 -113
  4. package/bundle/bundle.umd.min.js +1 -1
  5. package/bundle/components/CarouselInvestmentCard/CarouselInvestmentCard.d.ts +5 -0
  6. package/{lib/components/InvestmentGallery/InvestmentGalleryContent.d.ts → bundle/components/CarouselInvestmentCard/CarouselInvestmentCardContent.d.ts} +19 -23
  7. package/bundle/components/CarouselTariffsCard/CarouselTariffsCard.d.ts +1 -1
  8. package/bundle/components/Gallery/GalleryContent.d.ts +5 -0
  9. package/bundle/components/ImgBlock/ImgBlock.d.ts +6 -0
  10. package/bundle/components/ImgBlock/ImgBlockContent.d.ts +7 -0
  11. package/bundle/components/ParagraphBlock/ParagraphBlock.d.ts +6 -0
  12. package/bundle/components/ParagraphBlock/ParagraphBlockContent.d.ts +8 -0
  13. package/bundle/components/SafeDepositRental/SafeDepositRentalFields.d.ts +1 -1
  14. package/bundle/components/SafeDepositRental/SafeDepositRentalForm.d.ts +1 -1
  15. package/bundle/components/Video/VideoContent.d.ts +1 -0
  16. package/bundle/ui-kit/Paragraph/Paragraph.d.ts +1 -8
  17. package/bundle/ui-kit/Paragraph/ParagraphProps.d.ts +7 -0
  18. package/bundle/ui-kit/Radio/RadioProps.d.ts +1 -2
  19. package/bundle/ui-kit/Text/Text.d.ts +1 -26
  20. package/bundle/ui-kit/Text/TextProps.d.ts +26 -0
  21. package/dist/components/Blocks.js +7 -3
  22. package/dist/components/Blocks.js.map +1 -1
  23. package/dist/components/Calculator/BonusCalculatorForm.js +4 -2
  24. package/dist/components/Calculator/BonusCalculatorForm.js.map +1 -1
  25. package/dist/components/Calculator/CreditCalculatorForm.js +3 -1
  26. package/dist/components/Calculator/CreditCalculatorForm.js.map +1 -1
  27. package/dist/components/Calculator/DepositCalculatorForm.js +5 -2
  28. package/dist/components/Calculator/DepositCalculatorForm.js.map +1 -1
  29. package/dist/components/Carousel/Carousel.js +2 -1
  30. package/dist/components/Carousel/Carousel.js.map +1 -1
  31. package/dist/components/CarouselCard/CarouselCard.js +2 -2
  32. package/dist/components/CarouselCard/CarouselCard.js.map +1 -1
  33. package/dist/components/CarouselInvestmentCard/CarouselInvestmentCard.d.ts +5 -0
  34. package/dist/components/CarouselInvestmentCard/CarouselInvestmentCard.js +28 -0
  35. package/dist/components/CarouselInvestmentCard/CarouselInvestmentCard.js.map +1 -0
  36. package/dist/components/{InvestmentGallery/InvestmentGalleryContent.d.ts → CarouselInvestmentCard/CarouselInvestmentCardContent.d.ts} +19 -23
  37. package/dist/components/CarouselInvestmentCard/CarouselInvestmentCardContent.js +2 -0
  38. package/dist/components/CarouselInvestmentCard/CarouselInvestmentCardContent.js.map +1 -0
  39. package/dist/components/CarouselTariffsCard/CarouselTariffsCard.d.ts +1 -1
  40. package/dist/components/CarouselTariffsCard/CarouselTariffsCard.js +4 -2
  41. package/dist/components/CarouselTariffsCard/CarouselTariffsCard.js.map +1 -1
  42. package/dist/components/ComparisonTable/ComparisonTable.js +2 -2
  43. package/dist/components/ComparisonTable/ComparisonTable.js.map +1 -1
  44. package/dist/components/Gallery/GalleryCardInner.js +6 -1
  45. package/dist/components/Gallery/GalleryCardInner.js.map +1 -1
  46. package/dist/components/Gallery/GalleryContent.d.ts +5 -0
  47. package/dist/components/Gallery/GalleryInner.js.map +1 -1
  48. package/dist/components/Header/Header.mobile.js +2 -2
  49. package/dist/components/Header/Header.mobile.js.map +1 -1
  50. package/dist/components/Header/HeaderSubMenu.js.map +1 -1
  51. package/dist/components/ImgBlock/ImgBlock.d.ts +6 -0
  52. package/dist/components/ImgBlock/ImgBlock.js +11 -0
  53. package/dist/components/ImgBlock/ImgBlock.js.map +1 -0
  54. package/dist/components/ImgBlock/ImgBlockContent.d.ts +7 -0
  55. package/dist/components/{InvestmentGallery/InvestmentGalleryContent.js → ImgBlock/ImgBlockContent.js} +1 -1
  56. package/dist/components/ImgBlock/ImgBlockContent.js.map +1 -0
  57. package/dist/components/InsuranceAmountBlock/InsuranceAmountBlock.js +5 -7
  58. package/dist/components/InsuranceAmountBlock/InsuranceAmountBlock.js.map +1 -1
  59. package/dist/components/InsuranceAmountBlock/InsuranceAmountBlockInner.js +2 -2
  60. package/dist/components/InsuranceAmountBlock/InsuranceAmountBlockInner.js.map +1 -1
  61. package/dist/components/ParagraphBlock/ParagraphBlock.d.ts +6 -0
  62. package/dist/components/ParagraphBlock/ParagraphBlock.js +11 -0
  63. package/dist/components/ParagraphBlock/ParagraphBlock.js.map +1 -0
  64. package/dist/components/ParagraphBlock/ParagraphBlockContent.d.ts +8 -0
  65. package/{mobile/dist/components/InvestmentGallery/InvestmentGalleryContent.js → dist/components/ParagraphBlock/ParagraphBlockContent.js} +1 -1
  66. package/dist/components/ParagraphBlock/ParagraphBlockContent.js.map +1 -0
  67. package/dist/components/ProductGallery/ProductGallery.js +7 -7
  68. package/dist/components/ProductGallery/ProductGallery.js.map +1 -1
  69. package/dist/components/SafeDepositRental/RegionsAndBranches.js +1 -3
  70. package/dist/components/SafeDepositRental/RegionsAndBranches.js.map +1 -1
  71. package/dist/components/SafeDepositRental/RenderRadioButtons.js +1 -1
  72. package/dist/components/SafeDepositRental/RenderRadioButtons.js.map +1 -1
  73. package/dist/components/SafeDepositRental/SafeDepositRental.js +2 -4
  74. package/dist/components/SafeDepositRental/SafeDepositRental.js.map +1 -1
  75. package/dist/components/SafeDepositRental/SafeDepositRentalFields.d.ts +1 -1
  76. package/dist/components/SafeDepositRental/SafeDepositRentalFields.js +2 -2
  77. package/dist/components/SafeDepositRental/SafeDepositRentalFields.js.map +1 -1
  78. package/dist/components/SafeDepositRental/SafeDepositRentalForm.d.ts +1 -1
  79. package/dist/components/SafeDepositRental/SafeDepositRentalForm.js +2 -2
  80. package/dist/components/SafeDepositRental/SafeDepositRentalForm.js.map +1 -1
  81. package/dist/components/StepsBlock/StepsBlock.js +1 -3
  82. package/dist/components/StepsBlock/StepsBlock.js.map +1 -1
  83. package/dist/components/TariffsTable/TableTileHeader.js +1 -3
  84. package/dist/components/TariffsTable/TableTileHeader.js.map +1 -1
  85. package/dist/components/TariffsTable/TariffsTable.js +6 -6
  86. package/dist/components/TariffsTable/TariffsTable.js.map +1 -1
  87. package/dist/components/TariffsTable/TariffsTableRow.js +3 -1
  88. package/dist/components/TariffsTable/TariffsTableRow.js.map +1 -1
  89. package/dist/components/Video/VideoContent.d.ts +1 -0
  90. package/dist/ui-kit/InnerTable/InnerTable.js +3 -2
  91. package/dist/ui-kit/InnerTable/InnerTable.js.map +1 -1
  92. package/dist/ui-kit/InnerTable/InnerTableBody.js +2 -4
  93. package/dist/ui-kit/InnerTable/InnerTableBody.js.map +1 -1
  94. package/dist/ui-kit/Paragraph/Paragraph.d.ts +1 -8
  95. package/dist/ui-kit/Paragraph/Paragraph.js.map +1 -1
  96. package/dist/ui-kit/Paragraph/ParagraphProps.d.ts +7 -0
  97. package/dist/ui-kit/Paragraph/ParagraphProps.js +2 -0
  98. package/dist/ui-kit/Paragraph/ParagraphProps.js.map +1 -0
  99. package/dist/ui-kit/Radio/Radio.js +1 -1
  100. package/dist/ui-kit/Radio/Radio.js.map +1 -1
  101. package/dist/ui-kit/Radio/RadioProps.d.ts +1 -2
  102. package/dist/ui-kit/Select/Select.js.map +1 -1
  103. package/dist/ui-kit/Text/Text.d.ts +1 -26
  104. package/dist/ui-kit/Text/Text.js.map +1 -1
  105. package/dist/ui-kit/Text/TextProps.d.ts +26 -0
  106. package/dist/ui-kit/Text/TextProps.js +2 -0
  107. package/dist/ui-kit/Text/TextProps.js.map +1 -0
  108. package/lib/common.css +1 -1
  109. package/lib/components/Blocks.js +7 -3
  110. package/lib/components/Blocks.js.map +1 -1
  111. package/lib/components/Calculator/BonusCalculatorForm.js +5 -3
  112. package/lib/components/Calculator/BonusCalculatorForm.js.map +1 -1
  113. package/lib/components/Calculator/CreditCalculatorForm.js +4 -2
  114. package/lib/components/Calculator/CreditCalculatorForm.js.map +1 -1
  115. package/lib/components/Calculator/DepositCalculatorForm.js +6 -3
  116. package/lib/components/Calculator/DepositCalculatorForm.js.map +1 -1
  117. package/lib/components/Carousel/Carousel.fixture.d.ts +1 -0
  118. package/lib/components/Carousel/Carousel.js +2 -1
  119. package/lib/components/Carousel/Carousel.js.map +1 -1
  120. package/lib/components/CarouselCard/CarouselCard.js +2 -2
  121. package/lib/components/CarouselCard/CarouselCard.js.map +1 -1
  122. package/lib/components/CarouselInvestmentCard/CarouselInvestmentCard.d.ts +5 -0
  123. package/lib/components/CarouselInvestmentCard/CarouselInvestmentCard.fixture.d.ts +10 -0
  124. package/lib/components/CarouselInvestmentCard/CarouselInvestmentCard.js +26 -0
  125. package/lib/components/CarouselInvestmentCard/CarouselInvestmentCard.js.map +1 -0
  126. package/{bundle/components/InvestmentGallery/InvestmentGalleryContent.d.ts → lib/components/CarouselInvestmentCard/CarouselInvestmentCardContent.d.ts} +19 -23
  127. package/lib/components/CarouselInvestmentCard/CarouselInvestmentCardContent.js +2 -0
  128. package/lib/components/CarouselInvestmentCard/CarouselInvestmentCardContent.js.map +1 -0
  129. package/lib/components/CarouselTariffsCard/CarouselTariffsCard.d.ts +1 -1
  130. package/lib/components/CarouselTariffsCard/CarouselTariffsCard.js +4 -2
  131. package/lib/components/CarouselTariffsCard/CarouselTariffsCard.js.map +1 -1
  132. package/lib/components/ComparisonTable/ComparisonTable.js +2 -2
  133. package/lib/components/ComparisonTable/ComparisonTable.js.map +1 -1
  134. package/lib/components/Gallery/GalleryCardInner.js +6 -1
  135. package/lib/components/Gallery/GalleryCardInner.js.map +1 -1
  136. package/lib/components/Gallery/GalleryContent.d.ts +5 -0
  137. package/lib/components/Gallery/GalleryInner.js.map +1 -1
  138. package/lib/components/Header/Header.mobile.js +3 -3
  139. package/lib/components/Header/Header.mobile.js.map +1 -1
  140. package/lib/components/Header/HeaderSubMenu.js.map +1 -1
  141. package/lib/components/ImgBlock/ImgBlock.d.ts +6 -0
  142. package/lib/components/{InvestmentGallery/InvestmentGallery.fixture.d.ts → ImgBlock/ImgBlock.fixture.d.ts} +0 -2
  143. package/lib/components/ImgBlock/ImgBlock.js +9 -0
  144. package/lib/components/ImgBlock/ImgBlock.js.map +1 -0
  145. package/lib/components/ImgBlock/ImgBlockContent.d.ts +7 -0
  146. package/lib/components/ImgBlock/ImgBlockContent.js +2 -0
  147. package/lib/components/ImgBlock/ImgBlockContent.js.map +1 -0
  148. package/lib/components/InsuranceAmountBlock/InsuranceAmountBlock.js +6 -8
  149. package/lib/components/InsuranceAmountBlock/InsuranceAmountBlock.js.map +1 -1
  150. package/lib/components/InsuranceAmountBlock/InsuranceAmountBlockInner.js +2 -2
  151. package/lib/components/InsuranceAmountBlock/InsuranceAmountBlockInner.js.map +1 -1
  152. package/lib/components/ParagraphBlock/ParagraphBlock.d.ts +6 -0
  153. package/lib/components/ParagraphBlock/ParagraphBlock.fixture.d.ts +9 -0
  154. package/lib/components/ParagraphBlock/ParagraphBlock.js +9 -0
  155. package/lib/components/ParagraphBlock/ParagraphBlock.js.map +1 -0
  156. package/lib/components/ParagraphBlock/ParagraphBlockContent.d.ts +8 -0
  157. package/lib/components/ParagraphBlock/ParagraphBlockContent.js +2 -0
  158. package/lib/components/ParagraphBlock/ParagraphBlockContent.js.map +1 -0
  159. package/lib/components/ProductGallery/ProductGallery.js +8 -8
  160. package/lib/components/ProductGallery/ProductGallery.js.map +1 -1
  161. package/lib/components/SafeDepositRental/RegionsAndBranches.js +1 -3
  162. package/lib/components/SafeDepositRental/RegionsAndBranches.js.map +1 -1
  163. package/lib/components/SafeDepositRental/RenderRadioButtons.js +2 -2
  164. package/lib/components/SafeDepositRental/RenderRadioButtons.js.map +1 -1
  165. package/lib/components/SafeDepositRental/SafeDepositRental.js +2 -4
  166. package/lib/components/SafeDepositRental/SafeDepositRental.js.map +1 -1
  167. package/lib/components/SafeDepositRental/SafeDepositRentalFields.d.ts +1 -1
  168. package/lib/components/SafeDepositRental/SafeDepositRentalFields.js +2 -2
  169. package/lib/components/SafeDepositRental/SafeDepositRentalFields.js.map +1 -1
  170. package/lib/components/SafeDepositRental/SafeDepositRentalForm.d.ts +1 -1
  171. package/lib/components/SafeDepositRental/SafeDepositRentalForm.js +2 -2
  172. package/lib/components/SafeDepositRental/SafeDepositRentalForm.js.map +1 -1
  173. package/lib/components/StepsBlock/StepsBlock.js +1 -3
  174. package/lib/components/StepsBlock/StepsBlock.js.map +1 -1
  175. package/lib/components/TariffsTable/TableTileHeader.js +1 -3
  176. package/lib/components/TariffsTable/TableTileHeader.js.map +1 -1
  177. package/lib/components/TariffsTable/TariffsTable.js +6 -6
  178. package/lib/components/TariffsTable/TariffsTable.js.map +1 -1
  179. package/lib/components/TariffsTable/TariffsTableRow.js +4 -2
  180. package/lib/components/TariffsTable/TariffsTableRow.js.map +1 -1
  181. package/lib/components/Video/VideoContent.d.ts +1 -0
  182. package/lib/ui-kit/InnerTable/InnerTable.js +4 -3
  183. package/lib/ui-kit/InnerTable/InnerTable.js.map +1 -1
  184. package/lib/ui-kit/InnerTable/InnerTableBody.js +3 -5
  185. package/lib/ui-kit/InnerTable/InnerTableBody.js.map +1 -1
  186. package/lib/ui-kit/Paragraph/Paragraph.d.ts +1 -8
  187. package/lib/ui-kit/Paragraph/Paragraph.js.map +1 -1
  188. package/lib/ui-kit/Paragraph/ParagraphProps.d.ts +7 -0
  189. package/lib/ui-kit/Paragraph/ParagraphProps.js +2 -0
  190. package/lib/ui-kit/Paragraph/ParagraphProps.js.map +1 -0
  191. package/lib/ui-kit/Radio/Radio.js +1 -1
  192. package/lib/ui-kit/Radio/Radio.js.map +1 -1
  193. package/lib/ui-kit/Radio/RadioProps.d.ts +1 -2
  194. package/lib/ui-kit/Select/Select.js.map +1 -1
  195. package/lib/ui-kit/Text/Text.d.ts +1 -26
  196. package/lib/ui-kit/Text/Text.js.map +1 -1
  197. package/lib/ui-kit/Text/TextProps.d.ts +26 -0
  198. package/lib/ui-kit/Text/TextProps.js +2 -0
  199. package/lib/ui-kit/Text/TextProps.js.map +1 -0
  200. package/mobile/bundle/bundle.umd.js +4 -6
  201. package/mobile/bundle/bundle.umd.min.js +1 -1
  202. package/mobile/bundle/components/CarouselInvestmentCard/CarouselInvestmentCard.d.ts +5 -0
  203. package/mobile/bundle/components/{InvestmentGallery/InvestmentGalleryContent.d.ts → CarouselInvestmentCard/CarouselInvestmentCardContent.d.ts} +19 -23
  204. package/mobile/bundle/components/CarouselTariffsCard/CarouselTariffsCard.d.ts +1 -1
  205. package/mobile/bundle/components/Gallery/GalleryContent.d.ts +5 -0
  206. package/mobile/bundle/components/ImgBlock/ImgBlock.d.ts +6 -0
  207. package/mobile/bundle/components/ImgBlock/ImgBlockContent.d.ts +7 -0
  208. package/mobile/bundle/components/ParagraphBlock/ParagraphBlock.d.ts +6 -0
  209. package/mobile/bundle/components/ParagraphBlock/ParagraphBlockContent.d.ts +8 -0
  210. package/mobile/bundle/components/SafeDepositRental/SafeDepositRentalFields.d.ts +1 -1
  211. package/mobile/bundle/components/SafeDepositRental/SafeDepositRentalForm.d.ts +1 -1
  212. package/mobile/bundle/components/Video/VideoContent.d.ts +1 -0
  213. package/mobile/bundle/ui-kit/Paragraph/Paragraph.d.ts +1 -8
  214. package/mobile/bundle/ui-kit/Paragraph/ParagraphProps.d.ts +7 -0
  215. package/mobile/bundle/ui-kit/Radio/RadioProps.d.ts +1 -2
  216. package/mobile/bundle/ui-kit/Text/Text.d.ts +1 -26
  217. package/mobile/bundle/ui-kit/Text/TextProps.d.ts +26 -0
  218. package/mobile/dist/components/Calculator/BonusCalculatorForm.js +4 -2
  219. package/mobile/dist/components/Calculator/BonusCalculatorForm.js.map +1 -1
  220. package/mobile/dist/components/Calculator/CreditCalculatorForm.js +3 -1
  221. package/mobile/dist/components/Calculator/CreditCalculatorForm.js.map +1 -1
  222. package/mobile/dist/components/Calculator/DepositCalculatorForm.js +5 -2
  223. package/mobile/dist/components/Calculator/DepositCalculatorForm.js.map +1 -1
  224. package/mobile/dist/components/Carousel/Carousel.js +2 -1
  225. package/mobile/dist/components/Carousel/Carousel.js.map +1 -1
  226. package/mobile/dist/components/CarouselCard/CarouselCard.js +2 -2
  227. package/mobile/dist/components/CarouselCard/CarouselCard.js.map +1 -1
  228. package/mobile/dist/components/CarouselInvestmentCard/CarouselInvestmentCard.d.ts +5 -0
  229. package/mobile/dist/components/CarouselInvestmentCard/CarouselInvestmentCard.js +28 -0
  230. package/mobile/dist/components/CarouselInvestmentCard/CarouselInvestmentCard.js.map +1 -0
  231. package/mobile/dist/components/CarouselInvestmentCard/CarouselInvestmentCardContent.d.ts +46 -0
  232. package/mobile/dist/components/CarouselInvestmentCard/CarouselInvestmentCardContent.js +2 -0
  233. package/mobile/dist/components/CarouselInvestmentCard/CarouselInvestmentCardContent.js.map +1 -0
  234. package/mobile/dist/components/CarouselTariffsCard/CarouselTariffsCard.d.ts +1 -1
  235. package/mobile/dist/components/CarouselTariffsCard/CarouselTariffsCard.js +4 -2
  236. package/mobile/dist/components/CarouselTariffsCard/CarouselTariffsCard.js.map +1 -1
  237. package/mobile/dist/components/Gallery/GalleryCardInner.js +6 -1
  238. package/mobile/dist/components/Gallery/GalleryCardInner.js.map +1 -1
  239. package/mobile/dist/components/Gallery/GalleryContent.d.ts +5 -0
  240. package/mobile/dist/components/Gallery/GalleryInner.js.map +1 -1
  241. package/mobile/dist/components/Header/Header.js +2 -2
  242. package/mobile/dist/components/Header/Header.js.map +1 -1
  243. package/mobile/dist/components/Header/HeaderSubMenu.js.map +1 -1
  244. package/mobile/dist/components/ImgBlock/ImgBlock.d.ts +6 -0
  245. package/mobile/dist/components/ImgBlock/ImgBlock.js +11 -0
  246. package/mobile/dist/components/ImgBlock/ImgBlock.js.map +1 -0
  247. package/mobile/dist/components/ImgBlock/ImgBlockContent.d.ts +7 -0
  248. package/mobile/dist/components/ImgBlock/ImgBlockContent.js +2 -0
  249. package/mobile/dist/components/ImgBlock/ImgBlockContent.js.map +1 -0
  250. package/mobile/dist/components/InsuranceAmountBlock/InsuranceAmountBlock.js +5 -7
  251. package/mobile/dist/components/InsuranceAmountBlock/InsuranceAmountBlock.js.map +1 -1
  252. package/mobile/dist/components/InsuranceAmountBlock/InsuranceAmountBlockInner.js +2 -2
  253. package/mobile/dist/components/InsuranceAmountBlock/InsuranceAmountBlockInner.js.map +1 -1
  254. package/mobile/dist/components/ParagraphBlock/ParagraphBlock.d.ts +6 -0
  255. package/mobile/dist/components/ParagraphBlock/ParagraphBlock.js +11 -0
  256. package/mobile/dist/components/ParagraphBlock/ParagraphBlock.js.map +1 -0
  257. package/mobile/dist/components/ParagraphBlock/ParagraphBlockContent.d.ts +8 -0
  258. package/mobile/dist/components/ParagraphBlock/ParagraphBlockContent.js +2 -0
  259. package/mobile/dist/components/ParagraphBlock/ParagraphBlockContent.js.map +1 -0
  260. package/mobile/dist/components/ProductGallery/ProductGallery.js +7 -7
  261. package/mobile/dist/components/ProductGallery/ProductGallery.js.map +1 -1
  262. package/mobile/dist/components/SafeDepositRental/RegionsAndBranches.js +1 -3
  263. package/mobile/dist/components/SafeDepositRental/RegionsAndBranches.js.map +1 -1
  264. package/mobile/dist/components/SafeDepositRental/RenderRadioButtons.js +1 -1
  265. package/mobile/dist/components/SafeDepositRental/RenderRadioButtons.js.map +1 -1
  266. package/mobile/dist/components/SafeDepositRental/SafeDepositRental.js +2 -4
  267. package/mobile/dist/components/SafeDepositRental/SafeDepositRental.js.map +1 -1
  268. package/mobile/dist/components/SafeDepositRental/SafeDepositRentalFields.d.ts +1 -1
  269. package/mobile/dist/components/SafeDepositRental/SafeDepositRentalFields.js +2 -2
  270. package/mobile/dist/components/SafeDepositRental/SafeDepositRentalFields.js.map +1 -1
  271. package/mobile/dist/components/SafeDepositRental/SafeDepositRentalForm.d.ts +1 -1
  272. package/mobile/dist/components/SafeDepositRental/SafeDepositRentalForm.js +2 -2
  273. package/mobile/dist/components/SafeDepositRental/SafeDepositRentalForm.js.map +1 -1
  274. package/mobile/dist/components/TariffsTable/TableTileHeader.js +1 -3
  275. package/mobile/dist/components/TariffsTable/TableTileHeader.js.map +1 -1
  276. package/mobile/dist/components/TariffsTable/TariffsTableRow.js +3 -1
  277. package/mobile/dist/components/TariffsTable/TariffsTableRow.js.map +1 -1
  278. package/mobile/dist/components/Video/VideoContent.d.ts +1 -0
  279. package/mobile/dist/ui-kit/InnerTable/InnerTable.js +3 -2
  280. package/mobile/dist/ui-kit/InnerTable/InnerTable.js.map +1 -1
  281. package/mobile/dist/ui-kit/InnerTable/InnerTableBody.js +2 -4
  282. package/mobile/dist/ui-kit/InnerTable/InnerTableBody.js.map +1 -1
  283. package/mobile/dist/ui-kit/Paragraph/Paragraph.d.ts +1 -8
  284. package/mobile/dist/ui-kit/Paragraph/Paragraph.js.map +1 -1
  285. package/mobile/dist/ui-kit/Paragraph/ParagraphProps.d.ts +7 -0
  286. package/mobile/dist/ui-kit/Paragraph/ParagraphProps.js +2 -0
  287. package/mobile/dist/ui-kit/Paragraph/ParagraphProps.js.map +1 -0
  288. package/mobile/dist/ui-kit/Radio/Radio.js +1 -1
  289. package/mobile/dist/ui-kit/Radio/Radio.js.map +1 -1
  290. package/mobile/dist/ui-kit/Radio/RadioProps.d.ts +1 -2
  291. package/mobile/dist/ui-kit/Select/Select.js.map +1 -1
  292. package/mobile/dist/ui-kit/Text/Text.d.ts +1 -26
  293. package/mobile/dist/ui-kit/Text/Text.js.map +1 -1
  294. package/mobile/dist/ui-kit/Text/TextProps.d.ts +26 -0
  295. package/mobile/dist/ui-kit/Text/TextProps.js +2 -0
  296. package/mobile/dist/ui-kit/Text/TextProps.js.map +1 -0
  297. package/mobile/lib/components/Calculator/BonusCalculatorForm.js +5 -3
  298. package/mobile/lib/components/Calculator/BonusCalculatorForm.js.map +1 -1
  299. package/mobile/lib/components/Calculator/CreditCalculatorForm.js +4 -2
  300. package/mobile/lib/components/Calculator/CreditCalculatorForm.js.map +1 -1
  301. package/mobile/lib/components/Calculator/DepositCalculatorForm.js +6 -3
  302. package/mobile/lib/components/Calculator/DepositCalculatorForm.js.map +1 -1
  303. package/mobile/lib/components/Carousel/Carousel.js +2 -1
  304. package/mobile/lib/components/Carousel/Carousel.js.map +1 -1
  305. package/mobile/lib/components/CarouselCard/CarouselCard.js +2 -2
  306. package/mobile/lib/components/CarouselCard/CarouselCard.js.map +1 -1
  307. package/mobile/lib/components/CarouselInvestmentCard/CarouselInvestmentCard.d.ts +5 -0
  308. package/mobile/lib/components/CarouselInvestmentCard/CarouselInvestmentCard.js +26 -0
  309. package/mobile/lib/components/CarouselInvestmentCard/CarouselInvestmentCard.js.map +1 -0
  310. package/mobile/lib/components/CarouselInvestmentCard/CarouselInvestmentCardContent.d.ts +46 -0
  311. package/mobile/lib/components/CarouselInvestmentCard/CarouselInvestmentCardContent.js +2 -0
  312. package/mobile/lib/components/CarouselInvestmentCard/CarouselInvestmentCardContent.js.map +1 -0
  313. package/mobile/lib/components/CarouselTariffsCard/CarouselTariffsCard.d.ts +1 -1
  314. package/mobile/lib/components/CarouselTariffsCard/CarouselTariffsCard.js +4 -2
  315. package/mobile/lib/components/CarouselTariffsCard/CarouselTariffsCard.js.map +1 -1
  316. package/mobile/lib/components/Gallery/GalleryCardInner.js +6 -1
  317. package/mobile/lib/components/Gallery/GalleryCardInner.js.map +1 -1
  318. package/mobile/lib/components/Gallery/GalleryContent.d.ts +5 -0
  319. package/mobile/lib/components/Gallery/GalleryInner.js.map +1 -1
  320. package/mobile/lib/components/Header/Header.js +3 -3
  321. package/mobile/lib/components/Header/Header.js.map +1 -1
  322. package/mobile/lib/components/Header/HeaderSubMenu.js.map +1 -1
  323. package/mobile/lib/components/ImgBlock/ImgBlock.d.ts +6 -0
  324. package/mobile/lib/components/ImgBlock/ImgBlock.js +9 -0
  325. package/mobile/lib/components/ImgBlock/ImgBlock.js.map +1 -0
  326. package/mobile/lib/components/ImgBlock/ImgBlockContent.d.ts +7 -0
  327. package/mobile/lib/components/ImgBlock/ImgBlockContent.js +2 -0
  328. package/mobile/lib/components/ImgBlock/ImgBlockContent.js.map +1 -0
  329. package/mobile/lib/components/InsuranceAmountBlock/InsuranceAmountBlock.js +6 -8
  330. package/mobile/lib/components/InsuranceAmountBlock/InsuranceAmountBlock.js.map +1 -1
  331. package/mobile/lib/components/InsuranceAmountBlock/InsuranceAmountBlockInner.js +2 -2
  332. package/mobile/lib/components/InsuranceAmountBlock/InsuranceAmountBlockInner.js.map +1 -1
  333. package/mobile/lib/components/ParagraphBlock/ParagraphBlock.d.ts +6 -0
  334. package/mobile/lib/components/ParagraphBlock/ParagraphBlock.js +9 -0
  335. package/mobile/lib/components/ParagraphBlock/ParagraphBlock.js.map +1 -0
  336. package/mobile/lib/components/ParagraphBlock/ParagraphBlockContent.d.ts +8 -0
  337. package/mobile/lib/components/ParagraphBlock/ParagraphBlockContent.js +2 -0
  338. package/mobile/lib/components/ParagraphBlock/ParagraphBlockContent.js.map +1 -0
  339. package/mobile/lib/components/ProductGallery/ProductGallery.js +8 -8
  340. package/mobile/lib/components/ProductGallery/ProductGallery.js.map +1 -1
  341. package/mobile/lib/components/SafeDepositRental/RegionsAndBranches.js +1 -3
  342. package/mobile/lib/components/SafeDepositRental/RegionsAndBranches.js.map +1 -1
  343. package/mobile/lib/components/SafeDepositRental/RenderRadioButtons.js +2 -2
  344. package/mobile/lib/components/SafeDepositRental/RenderRadioButtons.js.map +1 -1
  345. package/mobile/lib/components/SafeDepositRental/SafeDepositRental.js +2 -4
  346. package/mobile/lib/components/SafeDepositRental/SafeDepositRental.js.map +1 -1
  347. package/mobile/lib/components/SafeDepositRental/SafeDepositRentalFields.d.ts +1 -1
  348. package/mobile/lib/components/SafeDepositRental/SafeDepositRentalFields.js +2 -2
  349. package/mobile/lib/components/SafeDepositRental/SafeDepositRentalFields.js.map +1 -1
  350. package/mobile/lib/components/SafeDepositRental/SafeDepositRentalForm.d.ts +1 -1
  351. package/mobile/lib/components/SafeDepositRental/SafeDepositRentalForm.js +2 -2
  352. package/mobile/lib/components/SafeDepositRental/SafeDepositRentalForm.js.map +1 -1
  353. package/mobile/lib/components/TariffsTable/TableTileHeader.js +1 -3
  354. package/mobile/lib/components/TariffsTable/TableTileHeader.js.map +1 -1
  355. package/mobile/lib/components/TariffsTable/TariffsTableRow.js +4 -2
  356. package/mobile/lib/components/TariffsTable/TariffsTableRow.js.map +1 -1
  357. package/mobile/lib/components/Video/VideoContent.d.ts +1 -0
  358. package/mobile/lib/ui-kit/InnerTable/InnerTable.js +4 -3
  359. package/mobile/lib/ui-kit/InnerTable/InnerTable.js.map +1 -1
  360. package/mobile/lib/ui-kit/InnerTable/InnerTableBody.js +3 -5
  361. package/mobile/lib/ui-kit/InnerTable/InnerTableBody.js.map +1 -1
  362. package/mobile/lib/ui-kit/Paragraph/Paragraph.d.ts +1 -8
  363. package/mobile/lib/ui-kit/Paragraph/Paragraph.js.map +1 -1
  364. package/mobile/lib/ui-kit/Paragraph/ParagraphProps.d.ts +7 -0
  365. package/mobile/lib/ui-kit/Paragraph/ParagraphProps.js +2 -0
  366. package/mobile/lib/ui-kit/Paragraph/ParagraphProps.js.map +1 -0
  367. package/mobile/lib/ui-kit/Radio/Radio.js +1 -1
  368. package/mobile/lib/ui-kit/Radio/Radio.js.map +1 -1
  369. package/mobile/lib/ui-kit/Radio/RadioProps.d.ts +1 -2
  370. package/mobile/lib/ui-kit/Select/Select.js.map +1 -1
  371. package/mobile/lib/ui-kit/Text/Text.d.ts +1 -26
  372. package/mobile/lib/ui-kit/Text/Text.js.map +1 -1
  373. package/mobile/lib/ui-kit/Text/TextProps.d.ts +26 -0
  374. package/mobile/lib/ui-kit/Text/TextProps.js +2 -0
  375. package/mobile/lib/ui-kit/Text/TextProps.js.map +1 -0
  376. package/mobile/src/components/Calculator/BonusCalculatorForm.tsx +5 -3
  377. package/mobile/src/components/Calculator/CreditCalculatorForm.tsx +5 -3
  378. package/mobile/src/components/Calculator/DepositCalculatorForm.tsx +6 -3
  379. package/mobile/src/components/Carousel/Carousel.tsx +2 -1
  380. package/mobile/src/components/CarouselCard/CarouselCard.tsx +2 -2
  381. package/mobile/src/components/CarouselInvestmentCard/CarouselInvestmentCard.example.json +28 -0
  382. package/mobile/src/components/CarouselInvestmentCard/CarouselInvestmentCard.tsx +83 -0
  383. package/mobile/src/components/CarouselInvestmentCard/CarouselInvestmentCard.ui.json +9 -0
  384. package/mobile/src/components/{InvestmentGallery/InvestmentGalleryContent.ts → CarouselInvestmentCard/CarouselInvestmentCardContent.ts} +20 -25
  385. package/mobile/src/components/CarouselTariffsCard/CarouselTariffsCard.tsx +27 -32
  386. package/mobile/src/components/Gallery/GalleryCardInner.tsx +7 -1
  387. package/mobile/src/components/Gallery/GalleryContent.ts +5 -0
  388. package/mobile/src/components/Gallery/GalleryInner.tsx +0 -1
  389. package/mobile/src/components/Header/Header.tsx +4 -6
  390. package/mobile/src/components/Header/HeaderSubMenu.tsx +1 -0
  391. package/mobile/src/components/ImgBlock/ImgBlock.example.json +11 -0
  392. package/mobile/src/components/ImgBlock/ImgBlock.tsx +17 -0
  393. package/mobile/src/components/ImgBlock/ImgBlock.ui.json +7 -0
  394. package/mobile/src/components/ImgBlock/ImgBlockContent.ts +8 -0
  395. package/mobile/src/components/InsuranceAmountBlock/InsuranceAmountBlock.tsx +8 -11
  396. package/mobile/src/components/InsuranceAmountBlock/InsuranceAmountBlockInner.tsx +3 -3
  397. package/mobile/src/components/ParagraphBlock/ParagraphBlock.example.json +5 -0
  398. package/mobile/src/components/ParagraphBlock/ParagraphBlock.tsx +19 -0
  399. package/mobile/src/components/ParagraphBlock/ParagraphBlock.ui.json +1 -0
  400. package/mobile/src/components/ParagraphBlock/ParagraphBlockContent.ts +9 -0
  401. package/mobile/src/components/ProductGallery/ProductGallery.tsx +13 -13
  402. package/mobile/src/components/SafeDepositRental/RegionsAndBranches.tsx +24 -26
  403. package/mobile/src/components/SafeDepositRental/RenderRadioButtons.tsx +2 -3
  404. package/mobile/src/components/SafeDepositRental/SafeDepositRental.tsx +2 -5
  405. package/mobile/src/components/SafeDepositRental/SafeDepositRentalFields.tsx +3 -3
  406. package/mobile/src/components/SafeDepositRental/SafeDepositRentalForm.tsx +3 -3
  407. package/mobile/src/components/TariffsTable/TableTileHeader.tsx +8 -10
  408. package/mobile/src/components/TariffsTable/TariffsTableRow.tsx +11 -4
  409. package/mobile/src/components/Video/VideoContent.ts +1 -0
  410. package/mobile/src/ui-kit/InnerTable/InnerTable.tsx +4 -5
  411. package/mobile/src/ui-kit/InnerTable/InnerTableBody.tsx +6 -5
  412. package/mobile/src/ui-kit/Paragraph/Paragraph.tsx +1 -8
  413. package/mobile/src/ui-kit/Paragraph/ParagraphProps.ts +8 -0
  414. package/mobile/src/ui-kit/Radio/Radio.tsx +1 -1
  415. package/mobile/src/ui-kit/Radio/RadioProps.ts +1 -1
  416. package/mobile/src/ui-kit/Select/Select.tsx +0 -1
  417. package/mobile/src/ui-kit/Text/Text.tsx +1 -63
  418. package/mobile/src/ui-kit/Text/TextProps.ts +63 -0
  419. package/package.json +1 -1
  420. package/src/components/Blocks.ts +7 -3
  421. package/src/components/Calculator/BonusCalculatorForm.tsx +5 -3
  422. package/src/components/Calculator/CreditCalculatorForm.tsx +5 -3
  423. package/src/components/Calculator/DepositCalculatorForm.tsx +6 -3
  424. package/src/components/Carousel/Carousel.fixture.tsx +20 -1
  425. package/src/components/Carousel/Carousel.tsx +2 -1
  426. package/src/components/CarouselCard/CarouselCard.fixture.tsx +1 -1
  427. package/src/components/CarouselCard/CarouselCard.tsx +2 -2
  428. package/src/components/CarouselInvestmentCard/CarouselInvestmentCard.example.json +28 -0
  429. package/src/components/{InvestmentGallery/InvestmentGallery.fixture.tsx → CarouselInvestmentCard/CarouselInvestmentCard.fixture.tsx} +21 -27
  430. package/src/components/CarouselInvestmentCard/CarouselInvestmentCard.tsx +83 -0
  431. package/src/components/CarouselInvestmentCard/CarouselInvestmentCard.ui.json +9 -0
  432. package/src/components/{InvestmentGallery/InvestmentGalleryContent.ts → CarouselInvestmentCard/CarouselInvestmentCardContent.ts} +20 -25
  433. package/src/components/CarouselTariffsCard/CarouselTariffsCard.tsx +27 -32
  434. package/src/components/ComparisonTable/ComparisonTable.tsx +2 -2
  435. package/src/components/Gallery/GalleryCardInner.tsx +7 -1
  436. package/src/components/Gallery/GalleryContent.ts +5 -0
  437. package/src/components/Gallery/GalleryInner.tsx +0 -1
  438. package/src/components/Header/Header.mobile.tsx +4 -6
  439. package/src/components/Header/HeaderSubMenu.tsx +1 -0
  440. package/src/components/ImgBlock/ImgBlock.example.json +11 -0
  441. package/src/components/ImgBlock/ImgBlock.fixture.tsx +21 -0
  442. package/src/components/ImgBlock/ImgBlock.tsx +17 -0
  443. package/src/components/ImgBlock/ImgBlock.ui.json +7 -0
  444. package/src/components/ImgBlock/ImgBlockContent.ts +8 -0
  445. package/src/components/InsuranceAmountBlock/InsuranceAmountBlock.tsx +8 -11
  446. package/src/components/InsuranceAmountBlock/InsuranceAmountBlockInner.tsx +3 -3
  447. package/src/components/ParagraphBlock/ParagraphBlock.example.json +5 -0
  448. package/src/components/ParagraphBlock/ParagraphBlock.fixture.tsx +45 -0
  449. package/src/components/ParagraphBlock/ParagraphBlock.tsx +19 -0
  450. package/src/components/ParagraphBlock/ParagraphBlock.ui.json +1 -0
  451. package/src/components/ParagraphBlock/ParagraphBlockContent.ts +9 -0
  452. package/src/components/ProductGallery/ProductGallery.tsx +13 -13
  453. package/src/components/SafeDepositRental/RegionsAndBranches.tsx +24 -26
  454. package/src/components/SafeDepositRental/RenderRadioButtons.tsx +2 -3
  455. package/src/components/SafeDepositRental/SafeDepositRental.tsx +2 -5
  456. package/src/components/SafeDepositRental/SafeDepositRentalFields.tsx +3 -3
  457. package/src/components/SafeDepositRental/SafeDepositRentalForm.tsx +3 -3
  458. package/src/components/StepsBlock/StepsBlock.tsx +2 -3
  459. package/src/components/TariffsTable/TableTileHeader.tsx +8 -10
  460. package/src/components/TariffsTable/TariffsTable.tsx +20 -22
  461. package/src/components/TariffsTable/TariffsTableRow.tsx +11 -4
  462. package/src/components/Video/VideoContent.ts +1 -0
  463. package/src/ui-kit/InnerTable/InnerTable.tsx +4 -5
  464. package/src/ui-kit/InnerTable/InnerTableBody.tsx +6 -5
  465. package/src/ui-kit/Paragraph/Paragraph.tsx +1 -8
  466. package/src/ui-kit/Paragraph/ParagraphProps.ts +8 -0
  467. package/src/ui-kit/Radio/Radio.tsx +1 -1
  468. package/src/ui-kit/Radio/RadioProps.ts +1 -1
  469. package/src/ui-kit/Select/Select.tsx +0 -1
  470. package/src/ui-kit/Text/Text.tsx +1 -63
  471. package/src/ui-kit/Text/TextProps.ts +63 -0
  472. package/tailwind.config.cjs +8 -0
  473. package/bundle/components/InvestmentGallery/InvestmentGallery.d.ts +0 -5
  474. package/bundle/components/InvestmentGallery/InvestmentGalleryCard.d.ts +0 -7
  475. package/dist/components/InvestmentGallery/InvestmentGallery.d.ts +0 -5
  476. package/dist/components/InvestmentGallery/InvestmentGallery.js +0 -26
  477. package/dist/components/InvestmentGallery/InvestmentGallery.js.map +0 -1
  478. package/dist/components/InvestmentGallery/InvestmentGalleryCard.d.ts +0 -7
  479. package/dist/components/InvestmentGallery/InvestmentGalleryCard.js +0 -23
  480. package/dist/components/InvestmentGallery/InvestmentGalleryCard.js.map +0 -1
  481. package/dist/components/InvestmentGallery/InvestmentGalleryContent.js.map +0 -1
  482. package/lib/components/InvestmentGallery/InvestmentGallery.d.ts +0 -5
  483. package/lib/components/InvestmentGallery/InvestmentGallery.js +0 -24
  484. package/lib/components/InvestmentGallery/InvestmentGallery.js.map +0 -1
  485. package/lib/components/InvestmentGallery/InvestmentGalleryCard.d.ts +0 -7
  486. package/lib/components/InvestmentGallery/InvestmentGalleryCard.js +0 -21
  487. package/lib/components/InvestmentGallery/InvestmentGalleryCard.js.map +0 -1
  488. package/lib/components/InvestmentGallery/InvestmentGalleryContent.js +0 -2
  489. package/lib/components/InvestmentGallery/InvestmentGalleryContent.js.map +0 -1
  490. package/mobile/bundle/components/InvestmentGallery/InvestmentGallery.d.ts +0 -5
  491. package/mobile/bundle/components/InvestmentGallery/InvestmentGalleryCard.d.ts +0 -7
  492. package/mobile/dist/components/InvestmentGallery/InvestmentGallery.d.ts +0 -5
  493. package/mobile/dist/components/InvestmentGallery/InvestmentGallery.js +0 -26
  494. package/mobile/dist/components/InvestmentGallery/InvestmentGallery.js.map +0 -1
  495. package/mobile/dist/components/InvestmentGallery/InvestmentGalleryCard.d.ts +0 -7
  496. package/mobile/dist/components/InvestmentGallery/InvestmentGalleryCard.js +0 -23
  497. package/mobile/dist/components/InvestmentGallery/InvestmentGalleryCard.js.map +0 -1
  498. package/mobile/dist/components/InvestmentGallery/InvestmentGalleryContent.d.ts +0 -50
  499. package/mobile/dist/components/InvestmentGallery/InvestmentGalleryContent.js.map +0 -1
  500. package/mobile/lib/components/InvestmentGallery/InvestmentGallery.d.ts +0 -5
  501. package/mobile/lib/components/InvestmentGallery/InvestmentGallery.js +0 -24
  502. package/mobile/lib/components/InvestmentGallery/InvestmentGallery.js.map +0 -1
  503. package/mobile/lib/components/InvestmentGallery/InvestmentGalleryCard.d.ts +0 -7
  504. package/mobile/lib/components/InvestmentGallery/InvestmentGalleryCard.js +0 -21
  505. package/mobile/lib/components/InvestmentGallery/InvestmentGalleryCard.js.map +0 -1
  506. package/mobile/lib/components/InvestmentGallery/InvestmentGalleryContent.d.ts +0 -50
  507. package/mobile/lib/components/InvestmentGallery/InvestmentGalleryContent.js +0 -2
  508. package/mobile/lib/components/InvestmentGallery/InvestmentGalleryContent.js.map +0 -1
  509. package/mobile/src/components/InvestmentGallery/InvestmentGallery.example.json +0 -64
  510. package/mobile/src/components/InvestmentGallery/InvestmentGallery.tsx +0 -66
  511. package/mobile/src/components/InvestmentGallery/InvestmentGallery.ui.json +0 -11
  512. package/mobile/src/components/InvestmentGallery/InvestmentGalleryCard.tsx +0 -84
  513. package/src/components/InvestmentGallery/InvestmentGallery.example.json +0 -64
  514. package/src/components/InvestmentGallery/InvestmentGallery.tsx +0 -66
  515. package/src/components/InvestmentGallery/InvestmentGallery.ui.json +0 -11
  516. package/src/components/InvestmentGallery/InvestmentGalleryCard.tsx +0 -84
@@ -0,0 +1,8 @@
1
+ import type { Picture } from '../../model/Picture';
2
+
3
+ /**
4
+ * @title Картинка
5
+ */
6
+ export interface ImgBlockContent {
7
+ image?: Picture;
8
+ }
@@ -1,15 +1,15 @@
1
1
  import { JSX } from '@redneckz/uni-jsx';
2
- import { useState } from '@redneckz/uni-jsx/lib/hooks';
2
+ import { useCallback, useState } from '@redneckz/uni-jsx/lib/hooks';
3
3
  import type { UniBlockProps } from '../../model/JSXBlock';
4
4
  import { BlockWrapper } from '../../ui-kit/BlockWrapper';
5
5
  import { Heading } from '../../ui-kit/Heading/Heading';
6
6
  import type { InsuranceAmountBlockContent } from './InsuranceAmountBlockContent';
7
7
  import { InsuranceAmountBlockInner } from './InsuranceAmountBlockInner';
8
8
 
9
- interface RenderNavButtonProps {
9
+ interface NavButtonProps {
10
10
  title?: string;
11
11
  i: number;
12
- activeSlideIndex?: number;
12
+ isActive: boolean;
13
13
  onClick: () => void;
14
14
  }
15
15
 
@@ -18,6 +18,7 @@ export interface InsuranceAmountBlockProps extends InsuranceAmountBlockContent,
18
18
  export const InsuranceAmountBlock = JSX<InsuranceAmountBlockProps>(
19
19
  ({ className = '', title, insuranceTabs = [], button, ...rest }) => {
20
20
  const [activeSlideIndex, setActiveSlideIndex] = useState(0);
21
+ const handleActiveSlideIndex = useCallback((_: number) => setActiveSlideIndex(_), []);
21
22
 
22
23
  return (
23
24
  <BlockWrapper
@@ -31,8 +32,8 @@ export const InsuranceAmountBlock = JSX<InsuranceAmountBlockProps>(
31
32
  renderNavButton({
32
33
  title: item?.title,
33
34
  i,
34
- activeSlideIndex,
35
- onClick: () => setActiveSlideIndex(i),
35
+ isActive: Boolean(i === activeSlideIndex),
36
+ onClick: () => handleActiveSlideIndex(i),
36
37
  }),
37
38
  )}
38
39
  </div>
@@ -62,12 +63,8 @@ const renderInsuranceGalleries = ({ insuranceTabs, button }: InsuranceAmountBloc
62
63
  : null;
63
64
  };
64
65
 
65
- function renderNavButton({ title, i, activeSlideIndex, onClick }: RenderNavButtonProps) {
66
- const isActiveBtn = i === activeSlideIndex;
67
-
68
- const btnClassName = isActiveBtn
69
- ? 'bg-primary-main text-white rounded-md'
70
- : `text-secondary-text`;
66
+ function renderNavButton({ title, i, isActive, onClick }: NavButtonProps) {
67
+ const btnClassName = isActive ? 'bg-primary-main text-white rounded-md' : `text-secondary-text`;
71
68
 
72
69
  return (
73
70
  <button
@@ -20,7 +20,7 @@ type InsuranceGalleryProps = {
20
20
  onClick: (index: number) => void;
21
21
  };
22
22
 
23
- type InsuranceSlideProps = {
23
+ type NavButtonProps = {
24
24
  slide: CardItem;
25
25
  i: number;
26
26
  isActive: boolean;
@@ -80,7 +80,7 @@ function renderGallery({ activeIndex, cards, selectedCardIndex, onClick }: Insur
80
80
  >
81
81
  <div className={`w-full flex flex-nowrap gap-3.5 pb-12 ${cardsAlignStyle}`}>
82
82
  {cards.map((slide, i) =>
83
- renderSlide({
83
+ renderNavButton({
84
84
  slide,
85
85
  i,
86
86
  isActive: Boolean(i === selectedCardIndex),
@@ -92,7 +92,7 @@ function renderGallery({ activeIndex, cards, selectedCardIndex, onClick }: Insur
92
92
  );
93
93
  }
94
94
 
95
- function renderSlide({ slide, i, isActive, onClick }: InsuranceSlideProps) {
95
+ function renderNavButton({ slide, i, isActive, onClick }: NavButtonProps) {
96
96
  const btnClassName = isActive
97
97
  ? 'shadow-dark-blue/42 border-primary-main'
98
98
  : `ease-in duration-300 border-main-stroke`;
@@ -0,0 +1,5 @@
1
+ {
2
+ "content": {
3
+ "text": "Текст"
4
+ }
5
+ }
@@ -0,0 +1,45 @@
1
+ import '../../setup-fixture';
2
+ import { ParagraphBlock } from './ParagraphBlock';
3
+
4
+ const DEFAULT_CLASS_NAME = 'col-span-12 w-full';
5
+
6
+ export default {
7
+ default: (
8
+ <div className="container grid grid-cols-12">
9
+ <ParagraphBlock className={DEFAULT_CLASS_NAME} text="По умолчанию (наследует от родителя)" />
10
+ <ParagraphBlock className={DEFAULT_CLASS_NAME} text="Текст размера XL" size="text-xl" />
11
+ <ParagraphBlock className={DEFAULT_CLASS_NAME} text="Текст размера L" size="text-l" />
12
+ <ParagraphBlock className={DEFAULT_CLASS_NAME} text="Текст размера M" size="text-m" />
13
+ <ParagraphBlock className={DEFAULT_CLASS_NAME} text="Текст размера S" size="text-s" />
14
+ <ParagraphBlock className={DEFAULT_CLASS_NAME} text="Текст размера XS" size="text-xs" />
15
+ </div>
16
+ ),
17
+ colors: (
18
+ <div className="container grid grid-cols-12">
19
+ <ParagraphBlock className={DEFAULT_CLASS_NAME} text="По умолчанию (наследует от родителя)" />
20
+ <ParagraphBlock className={DEFAULT_CLASS_NAME} text="Текст" color="text-error" />
21
+ <ParagraphBlock className={DEFAULT_CLASS_NAME} text="Текст" color="text-green" />
22
+ <ParagraphBlock className={DEFAULT_CLASS_NAME} text="Текст" color="text-main" />
23
+ <ParagraphBlock className={DEFAULT_CLASS_NAME} text="Текст" color="text-primary-main" />
24
+ <ParagraphBlock className={DEFAULT_CLASS_NAME} text="Текст" color="text-primary-text" />
25
+ <ParagraphBlock className={DEFAULT_CLASS_NAME} text="Текст" color="text-secondary-text" />
26
+ <ParagraphBlock className={DEFAULT_CLASS_NAME} text="Текст" color="text-white" />
27
+ </div>
28
+ ),
29
+ alignment: (
30
+ <div className="container grid grid-cols-12">
31
+ <ParagraphBlock className={DEFAULT_CLASS_NAME} text="По умолчанию (наследует от родителя)" />
32
+ <ParagraphBlock className={DEFAULT_CLASS_NAME} text="Слева" align="text-left" />
33
+ <ParagraphBlock className={DEFAULT_CLASS_NAME} text="Справа" align="text-right" />
34
+ <ParagraphBlock className={DEFAULT_CLASS_NAME} text="По центру" align="text-center" />
35
+ </div>
36
+ ),
37
+ font: (
38
+ <div className="container grid grid-cols-12">
39
+ <ParagraphBlock className={DEFAULT_CLASS_NAME} text="По умолчанию (наследует от родителя)" />
40
+ <ParagraphBlock className={DEFAULT_CLASS_NAME} text="Тонкий" font="font-light" />
41
+ <ParagraphBlock className={DEFAULT_CLASS_NAME} text="Обычный" font="font-normal" />
42
+ <ParagraphBlock className={DEFAULT_CLASS_NAME} text="Средний" font="font-medium" />
43
+ </div>
44
+ ),
45
+ };
@@ -0,0 +1,19 @@
1
+ import { JSX } from '@redneckz/uni-jsx';
2
+ import type { UniBlockProps } from '../../model/JSXBlock';
3
+ import { BlockWrapper } from '../../ui-kit/BlockWrapper';
4
+ import { Paragraph } from '../../ui-kit/Paragraph/Paragraph';
5
+ import type { ParagraphBlockContent } from './ParagraphBlockContent';
6
+
7
+ interface ParagraphBlockProps extends ParagraphBlockContent, UniBlockProps {}
8
+
9
+ export const ParagraphBlock = JSX<ParagraphBlockProps>((props) => {
10
+ const { className, text, size, color, align, font, ...rest } = props;
11
+
12
+ return (
13
+ <BlockWrapper className={className} {...rest}>
14
+ <Paragraph size={size} color={color} align={align} font={font}>
15
+ {text}
16
+ </Paragraph>
17
+ </BlockWrapper>
18
+ );
19
+ });
@@ -0,0 +1,9 @@
1
+ import type { ParagraphProps } from '../../ui-kit/Paragraph/ParagraphProps';
2
+
3
+ /**
4
+ * @title Параграф
5
+ */
6
+ export interface ParagraphBlockContent extends ParagraphProps {
7
+ /** @title Текст */
8
+ text?: string;
9
+ }
@@ -1,20 +1,21 @@
1
1
  import { JSX } from '@redneckz/uni-jsx';
2
- import { useState } from '@redneckz/uni-jsx/lib/hooks';
2
+ import { useCallback, useState } from '@redneckz/uni-jsx/lib/hooks';
3
3
  import type { BlockVersion } from '../../model/BlockVersion';
4
4
  import { VersionStyleMap } from '../../model/BlockVersion';
5
5
  import { BorderVersionStyleMap } from '../../model/BorderVersion';
6
+ import { HeadlineCommonProps } from '../../model/HeadlineType';
6
7
  import type { UniBlockProps } from '../../model/JSXBlock';
7
8
  import { BlockWrapper } from '../../ui-kit/BlockWrapper';
8
9
  import type { ProductBlockInnerContent } from '../ProductBlock/ProductBlockContent';
9
10
  import { ProductBlockInner } from '../ProductBlock/ProductBlockInner';
10
- import type { ProductGalleryContent, ProductGalleryNav } from './ProductGalleryContent';
11
+ import type { ProductGalleryContent } from './ProductGalleryContent';
11
12
 
12
13
  export interface ProductGalleryProps extends ProductGalleryContent, UniBlockProps {}
13
14
 
14
- interface RenderNavButtonProps {
15
- slide?: ProductGalleryNav;
15
+ interface NavButtonProps {
16
+ slide?: HeadlineCommonProps;
16
17
  i: number;
17
- activeSlideIndex?: number;
18
+ isActive: boolean;
18
19
  onClick: () => void;
19
20
  version: BlockVersion;
20
21
  }
@@ -34,6 +35,7 @@ export const ProductGallery = JSX<ProductGalleryProps>(
34
35
  const galleryNav = slides.map((s) => s.nav);
35
36
  const galleryBlocks = slides.map((s) => s.productBlock);
36
37
  const [activeSlideIndex, setActiveSlideIndex] = useState(0);
38
+ const handleActiveSlideIndex = useCallback((_: number) => setActiveSlideIndex(_), []);
37
39
 
38
40
  return (
39
41
  <BlockWrapper
@@ -54,8 +56,8 @@ export const ProductGallery = JSX<ProductGalleryProps>(
54
56
  renderNavButton({
55
57
  slide,
56
58
  i,
57
- activeSlideIndex,
58
- onClick: () => setActiveSlideIndex(i),
59
+ isActive: Boolean(i === activeSlideIndex),
60
+ onClick: () => handleActiveSlideIndex(i),
59
61
  version,
60
62
  }),
61
63
  )}
@@ -87,17 +89,15 @@ function renderProductBlock(block: ProductBlockInnerContent & UniBlockProps, i:
87
89
  );
88
90
  }
89
91
 
90
- function renderNavButton({ slide, i, activeSlideIndex, onClick, version }: RenderNavButtonProps) {
91
- const isActiveBtn = i === activeSlideIndex;
92
-
93
- const btnClassName = isActiveBtn
92
+ function renderNavButton({ slide, i, isActive, onClick, version }: NavButtonProps) {
93
+ const btnClassName = isActive
94
94
  ? 'bg-white shadow-dark-blue/42 min-w-[350px] border-none p-6'
95
95
  : `min-w-[290px] hover:py-[26px] hover:py-[26px] ease-in duration-300 bg-white/10 px-6 py-5 backdrop-blur
96
96
  ${VersionStyleMap[version]}`;
97
- const btnTitleClassName = isActiveBtn
97
+ const btnTitleClassName = isActive
98
98
  ? 'text-primary-text !text-h6 p-2'
99
99
  : `text-l pb-1 ${productBlockStyleMap[version].title}`;
100
- const btnDescClassName = isActiveBtn
100
+ const btnDescClassName = isActive
101
101
  ? 'text-secondary-text text-l-light'
102
102
  : `text-m-light ${productBlockStyleMap[version].text}`;
103
103
 
@@ -20,31 +20,29 @@ export const RegionsAndBranches = JSX<RegionsAndBranchesProps>(
20
20
  branches = [],
21
21
  selectedBranch,
22
22
  onSelectedBranch,
23
- }) => {
24
- return (
25
- <div className="flex justify-between gap-4 mb-6">
26
- <div className="max-w-[396px] w-1/2">
27
- <WrapperSelect
28
- data={regions}
29
- fieldValue="code"
30
- fieldLabel="name"
31
- selected={selectedRegion}
32
- setSelected={onSelectedRegion}
33
- label="Регион"
34
- />
35
- </div>
36
- <div className="max-w-[396px] w-1/2">
37
- <WrapperSelect
38
- data={branches}
39
- fieldValue="branchCode"
40
- fieldLabel="address"
41
- selected={selectedBranch}
42
- setSelected={onSelectedBranch}
43
- label="Отделение"
44
- placeholder="Выберите отделение"
45
- />
46
- </div>
23
+ }) => (
24
+ <div className="flex justify-between gap-4 mb-6">
25
+ <div className="max-w-[396px] w-1/2">
26
+ <WrapperSelect
27
+ data={regions}
28
+ fieldValue="code"
29
+ fieldLabel="name"
30
+ selected={selectedRegion}
31
+ setSelected={onSelectedRegion}
32
+ label="Регион"
33
+ />
47
34
  </div>
48
- );
49
- },
35
+ <div className="max-w-[396px] w-1/2">
36
+ <WrapperSelect
37
+ data={branches}
38
+ fieldValue="branchCode"
39
+ fieldLabel="address"
40
+ selected={selectedBranch}
41
+ setSelected={onSelectedBranch}
42
+ label="Отделение"
43
+ placeholder="Выберите отделение"
44
+ />
45
+ </div>
46
+ </div>
47
+ ),
50
48
  );
@@ -1,11 +1,10 @@
1
1
  import { JSX } from '@redneckz/uni-jsx';
2
- import { useState } from '@redneckz/uni-jsx/lib/hooks/core';
2
+ import { useCallback, useState } from '@redneckz/uni-jsx/lib/hooks/core';
3
3
  import { Radio } from '../../ui-kit/Radio/Radio';
4
4
 
5
5
  export const RenderRadioButtons = JSX(() => {
6
6
  const [selectedOption, setSelectedOption] = useState('option2');
7
-
8
- const onChange = (_: React.ChangeEvent<HTMLInputElement>) => setSelectedOption(_.target.value);
7
+ const onChange = useCallback((_: string) => setSelectedOption(_), []);
9
8
 
10
9
  return (
11
10
  <div>
@@ -18,6 +18,7 @@ const DEFAULT_DAYS = 26;
18
18
  export const SafeDepositRental = JSX<SafeDepositRentalProps>(
19
19
  ({ title, footnote, className = '', ...rest }) => {
20
20
  const [showMap, setShowMap] = useState<boolean>(false);
21
+ const handleShowMap = useCallback(() => setShowMap((_) => !_), []);
21
22
  const [safeDepositState, setStateDepositState] = useState<SafeDepositRentalState>({
22
23
  selectedRegion: '',
23
24
  selectedBranch: '',
@@ -37,10 +38,6 @@ export const SafeDepositRental = JSX<SafeDepositRentalProps>(
37
38
  [setStateDepositState],
38
39
  );
39
40
 
40
- const onShowMapToggle = () => {
41
- setShowMap(!showMap);
42
- };
43
-
44
41
  const points = getCoordinates(getBranch(branches, safeDepositState.selectedBranch) || branches);
45
42
 
46
43
  return (
@@ -58,7 +55,7 @@ export const SafeDepositRental = JSX<SafeDepositRentalProps>(
58
55
  regions={regions}
59
56
  branches={branches}
60
57
  data={{ ...safeDepositState, selectedRegion }}
61
- onShowMapToggle={onShowMapToggle}
58
+ onClick={handleShowMap}
62
59
  onChange={handleChangeSafeDepositState}
63
60
  />
64
61
  {footnote ? <p className="text-s-light text-secondary-text">{footnote}</p> : null}
@@ -13,7 +13,7 @@ export interface SafeDepositRentalFieldsProps extends SafeDepositRentalState {
13
13
  safeBoxCases?: SafeBoxCase[];
14
14
  caseVolumes?: SafeBoxCaseVolume[];
15
15
  branches?: Branch[];
16
- onShowMapToggle: () => void;
16
+ onClick: () => void;
17
17
  onChange: HandleChangeState;
18
18
  }
19
19
 
@@ -29,7 +29,7 @@ export const SafeDepositRentalFields = JSX<SafeDepositRentalFieldsProps>(
29
29
  safeBoxCases,
30
30
  caseVolumes,
31
31
  onChange,
32
- onShowMapToggle,
32
+ onClick,
33
33
  }) => {
34
34
  return (
35
35
  <div className="flex-1 mr-9">
@@ -53,7 +53,7 @@ export const SafeDepositRentalFields = JSX<SafeDepositRentalFieldsProps>(
53
53
  <span className="text-secondary-text text-l-light">Тип договора</span>
54
54
  <div className="flex justify-between items-center mt-5">
55
55
  <RenderRadioButtons />
56
- <Button text="Офисы на карте" version="primary" onClick={onShowMapToggle} />
56
+ <Button text="Офисы на карте" version="primary" onClick={onClick} />
57
57
  </div>
58
58
  </div>
59
59
  );
@@ -11,12 +11,12 @@ export interface SafeDepositRentalFormProps {
11
11
  regions: Region[];
12
12
  branches: Branch[];
13
13
  data: SafeDepositRentalState;
14
- onShowMapToggle: () => void;
14
+ onClick: () => void;
15
15
  onChange: (data: Partial<SafeDepositRentalState>) => void;
16
16
  }
17
17
 
18
18
  export const SafeDepositRentalForm = JSX<SafeDepositRentalFormProps>((props) => {
19
- const { regions, data, branches, onChange, onShowMapToggle } = props;
19
+ const { regions, data, branches, onChange, onClick } = props;
20
20
 
21
21
  useEffect(() => {
22
22
  onChange({
@@ -41,7 +41,7 @@ export const SafeDepositRentalForm = JSX<SafeDepositRentalFormProps>((props) =>
41
41
  <SafeDepositRentalFields
42
42
  {...data}
43
43
  regions={regions}
44
- onShowMapToggle={onShowMapToggle}
44
+ onClick={onClick}
45
45
  branches={branches}
46
46
  caseVolumes={caseVolumes}
47
47
  safeBoxCases={safeBoxCases}
@@ -67,8 +67,8 @@ export const StepsBlock = JSX<StepsBlockProps>(
67
67
 
68
68
  const renderStepIcon =
69
69
  (styleMap: StyleType, version?: BlockVersion) =>
70
- ({ icon }: Step, i: number) => {
71
- return (
70
+ ({ icon }: Step, i: number) =>
71
+ (
72
72
  <div key={String(i)} className="flex flex-col items-center text-center">
73
73
  <div
74
74
  className={`h-[100px] w-[100px] min-w-[100px] min-h-[100px] rounded-full p-[26px] box-border z-10 flex justify-center items-center
@@ -82,4 +82,3 @@ const renderStepIcon =
82
82
  </div>
83
83
  </div>
84
84
  );
85
- };
@@ -3,13 +3,11 @@ import { Heading } from '../../ui-kit/Heading/Heading';
3
3
  import { Img } from '../../ui-kit/Img/Img';
4
4
  import type { TariffsTableRowHeader } from './TariffsTableContent';
5
5
 
6
- export const TableTileHeader = JSX<TariffsTableRowHeader>(({ title, icon }) => {
7
- return (
8
- <div className="flex gap-2.5 mb-2">
9
- {title ? <Heading headingType="h3" className="font-medium" title={title} /> : null}
10
- {icon ? (
11
- <Img className="ml-auto max-w-6 max-h-6" image={icon} width="24px" height="24px" />
12
- ) : null}
13
- </div>
14
- );
15
- });
6
+ export const TableTileHeader = JSX<TariffsTableRowHeader>(({ title, icon }) => (
7
+ <div className="flex gap-2.5 mb-2">
8
+ {title ? <Heading headingType="h3" className="font-medium" title={title} /> : null}
9
+ {icon ? (
10
+ <Img className="ml-auto max-w-6 max-h-6" image={icon} width="24px" height="24px" />
11
+ ) : null}
12
+ </div>
13
+ ));
@@ -16,7 +16,6 @@ export interface TariffsTableProps extends TariffsTableContent, UniBlockProps {}
16
16
 
17
17
  interface WrapperProps {
18
18
  controls: CarouselControls;
19
- isScrollAvailable: boolean;
20
19
  }
21
20
 
22
21
  export const TariffsTable = JSX<TariffsTableProps>(
@@ -39,7 +38,6 @@ export const TariffsTable = JSX<TariffsTableProps>(
39
38
  itemCount: itemCount,
40
39
  visibleItemCount: COLS_LENGTH_FOR_SCROLL,
41
40
  });
42
- const { isScrollAvailable } = controls;
43
41
  const rows = (rowData || []).map((row, i) => (
44
42
  <TariffsTableRow key={String(i)} row={row} activeIndex={activeIndex} rowIdx={i} {...rest} />
45
43
  ));
@@ -58,7 +56,7 @@ export const TariffsTable = JSX<TariffsTableProps>(
58
56
  {hiddenRowsNum > 0 ? (
59
57
  <Foldable
60
58
  renderFoldableSection={({ isUnfolded }) => (
61
- <Wrapper controls={controls} isScrollAvailable={isScrollAvailable}>
59
+ <Wrapper controls={controls}>
62
60
  {visibleRows}
63
61
  <FoldableSection isUnfolded={isUnfolded}>{hiddenRows}</FoldableSection>
64
62
  </Wrapper>
@@ -66,9 +64,7 @@ export const TariffsTable = JSX<TariffsTableProps>(
66
64
  renderFoldButton={renderDefaultFoldButton}
67
65
  />
68
66
  ) : (
69
- <Wrapper controls={controls} isScrollAvailable={isScrollAvailable}>
70
- {rows}
71
- </Wrapper>
67
+ <Wrapper controls={controls}>{rows}</Wrapper>
72
68
  )}
73
69
  </BlockWrapper>
74
70
  );
@@ -89,20 +85,22 @@ function renderDescription(description?: string) {
89
85
  return description ? <div className="mb-9 text-center text-l">{description}</div> : null;
90
86
  }
91
87
 
92
- const Wrapper = JSX<WrapperProps>(({ children, controls, isScrollAvailable }) => (
93
- <div role="table">
94
- <div className="relative">
95
- {children}
96
- {isScrollAvailable
97
- ? renderArrows({
98
- ...controls,
99
- btnClass: ['top-[108px]', 'top-[44px]'],
100
- className: 'right-7',
101
- })
102
- : null}
88
+ const Wrapper = JSX<WrapperProps>(({ children, controls }) => {
89
+ const { isScrollAvailable } = controls;
90
+
91
+ return (
92
+ <div role="table">
93
+ <div className="relative">
94
+ {children}
95
+ {renderArrows({
96
+ ...controls,
97
+ btnClass: ['top-[108px]', 'top-[44px]'],
98
+ className: 'right-7',
99
+ })}
100
+ </div>
101
+ {isScrollAvailable ? (
102
+ <div className="absolute top-0 right-0 bottom-0 w-[84px] bg-opacity-to-white" />
103
+ ) : null}
103
104
  </div>
104
- {isScrollAvailable ? (
105
- <div className="absolute top-0 right-0 bottom-0 w-[84px] bg-opacity-to-white" />
106
- ) : null}
107
- </div>
108
- ));
105
+ );
106
+ });
@@ -1,5 +1,5 @@
1
1
  import { JSX } from '@redneckz/uni-jsx';
2
- import { useState } from '@redneckz/uni-jsx/lib/hooks';
2
+ import { useCallback, useState } from '@redneckz/uni-jsx/lib/hooks';
3
3
  import type { UniBlockProps } from '../../model/JSXBlock';
4
4
  import { Img } from '../../ui-kit/Img/Img';
5
5
  import type { TariffsTableInnerContent } from '../../ui-kit/InnerTable/InnerTableProps';
@@ -19,8 +19,15 @@ export interface TariffsTableRowProps extends UniBlockProps {
19
19
  export const TariffsTableRow = JSX<TariffsTableRowProps>(
20
20
  ({ row: { header, data }, activeIndex, rowIdx, ...rest }) => {
21
21
  const [tableInner, setTableInner] = useState<TariffsTableInnerContent | undefined>(undefined);
22
+ const handleSetTableInner = useCallback(
23
+ (_: TariffsTableInnerContent | undefined) => setTableInner(_),
24
+ [],
25
+ );
22
26
  const [openTableInnerIdx, setOpenTableInnerIdx] = useState<number | undefined>(undefined);
23
-
27
+ const handleOpenTableInnerIdx = useCallback(
28
+ (_: number | undefined) => setOpenTableInnerIdx(_),
29
+ [],
30
+ );
24
31
  const onHideContentClick = () => setTableInner(undefined);
25
32
 
26
33
  return (
@@ -55,10 +62,10 @@ export const TariffsTableRow = JSX<TariffsTableRowProps>(
55
62
  cells={cells}
56
63
  rowIdx={rowIdx}
57
64
  cellIdx={i}
58
- setTableInner={setTableInner}
65
+ setTableInner={handleSetTableInner}
59
66
  tableInner={tableInner}
60
67
  openTableInnerIdx={openTableInnerIdx}
61
- setOpenTableInnerIdx={setOpenTableInnerIdx}
68
+ setOpenTableInnerIdx={handleOpenTableInnerIdx}
62
69
  {...rest}
63
70
  />
64
71
  ))}
@@ -1,6 +1,7 @@
1
1
  import type { TitleProps } from '../../model/HeadlineType';
2
2
  import type { Picture } from '../../model/Picture';
3
3
 
4
+ /** @title Блок Видео */
4
5
  export interface VideoContent extends TitleProps {
5
6
  /** @title URL */
6
7
  src?: string;
@@ -1,10 +1,10 @@
1
1
  import { JSX } from '@redneckz/uni-jsx';
2
- import { useState } from '@redneckz/uni-jsx/lib/hooks';
3
- import { useTariffsInnerTableData } from './useTariffsInnerTableData';
2
+ import { useCallback, useState } from '@redneckz/uni-jsx/lib/hooks';
4
3
  import { InnerTableBody } from './InnerTableBody';
5
4
  import { TableInnerButton } from './InnerTableButton';
6
5
  import { InnerTableHeader } from './InnerTableHeader';
7
6
  import type { TableFetchData, TariffsTableInnerContent } from './InnerTableProps';
7
+ import { useTariffsInnerTableData } from './useTariffsInnerTableData';
8
8
 
9
9
  export interface InnerTableProps extends TariffsTableInnerContent {
10
10
  onClick?: () => void;
@@ -14,10 +14,9 @@ const EMPTY_DATA = 'Данных нет';
14
14
 
15
15
  export const InnerTable = JSX<InnerTableProps>(({ dataUrl, pdfUrl, onClick }) => {
16
16
  const { tableData }: TableFetchData = useTariffsInnerTableData(dataUrl);
17
-
18
17
  const [activeTabIndex, setActiveTabIndex] = useState(0);
18
+ const handleActiveTabIndex = useCallback((_: number) => setActiveTabIndex(_), []);
19
19
  const items = tableData?.[activeTabIndex]?.items ?? [];
20
-
21
20
  const currencies = tableData?.map((item) => item.currency ?? '');
22
21
 
23
22
  return tableData ? (
@@ -25,7 +24,7 @@ export const InnerTable = JSX<InnerTableProps>(({ dataUrl, pdfUrl, onClick }) =>
25
24
  <InnerTableHeader
26
25
  currencies={currencies}
27
26
  activeTabIndex={activeTabIndex}
28
- setActiveTabIndex={setActiveTabIndex}
27
+ setActiveTabIndex={handleActiveTabIndex}
29
28
  linkToPDF={pdfUrl} //TODO: need link to service
30
29
  />
31
30
  <InnerTableBody activeTabIndex={activeTabIndex} items={items} />
@@ -1,5 +1,5 @@
1
1
  import { JSX } from '@redneckz/uni-jsx';
2
- import { useState } from '@redneckz/uni-jsx/lib/hooks';
2
+ import { useCallback, useState } from '@redneckz/uni-jsx/lib/hooks';
3
3
  import { Img } from '../Img/Img';
4
4
  import { InnerTableBodyItem } from './InnerTableBodyItem';
5
5
  import type { DataItem } from './InnerTableProps';
@@ -12,9 +12,10 @@ export interface InnerTableBodyProps {
12
12
  export const InnerTableBody = JSX<InnerTableBodyProps>(({ activeTabIndex, items }) => {
13
13
  const [hiddenTables, setHiddenTables] = useState<Record<string, boolean>>({});
14
14
 
15
- const toggleTable = (key: string) => {
16
- setHiddenTables((oldState) => ({ ...oldState, [key]: !oldState[key] }));
17
- };
15
+ const toggleTables = useCallback(
16
+ (key) => setHiddenTables((oldState) => ({ ...oldState, [key]: !oldState[key] })),
17
+ [],
18
+ );
18
19
 
19
20
  return (
20
21
  <div>
@@ -25,7 +26,7 @@ export const InnerTableBody = JSX<InnerTableBodyProps>(({ activeTabIndex, items
25
26
  <div key={key} className="w-full">
26
27
  <div
27
28
  className="flex p-4 bg-main-stroke text-xl-light text-center justify-center cursor-pointer relative"
28
- onClick={() => toggleTable(key)}
29
+ onClick={() => toggleTables(key)}
29
30
  >
30
31
  {_.title}
31
32
  <Img
@@ -1,12 +1,5 @@
1
1
  import { JSX } from '@redneckz/uni-jsx';
2
- import type { FontWeight, TextAlign, TextColor, TextSize } from '../Text/Text';
3
-
4
- interface ParagraphProps {
5
- size?: TextSize;
6
- color?: TextColor;
7
- align?: TextAlign;
8
- font?: FontWeight;
9
- }
2
+ import type { ParagraphProps } from './ParagraphProps';
10
3
 
11
4
  export const Paragraph = JSX<ParagraphProps>((props) => {
12
5
  const { size = '', color = '', align = '', font = '', children } = props;
@@ -0,0 +1,8 @@
1
+ import type { FontWeight, TextAlign, TextColor, TextSize } from '../Text/TextProps';
2
+
3
+ export interface ParagraphProps {
4
+ size?: TextSize;
5
+ color?: TextColor;
6
+ align?: TextAlign;
7
+ font?: FontWeight;
8
+ }