@redneckz/wildless-cms-uni-blocks 0.5.12 → 0.5.14

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 (474) hide show
  1. package/bundle/blocks.schema.json +1 -1
  2. package/bundle/bundle.umd.js +136 -84
  3. package/bundle/bundle.umd.min.js +1 -1
  4. package/bundle/components/Accordion/AccordionContent.d.ts +9 -7
  5. package/bundle/components/Accordion/AccordionItem.d.ts +1 -4
  6. package/bundle/components/Accordion/AccordionItem.mobile.d.ts +1 -4
  7. package/bundle/components/Accordion/AccordionItemProps.d.ts +5 -0
  8. package/bundle/components/Accordion/AccordionItemsList.d.ts +1 -0
  9. package/bundle/components/Blocks.d.ts +3 -1
  10. package/bundle/components/InvestmentInfo/InvestmentInfo.d.ts +5 -0
  11. package/bundle/components/InvestmentInfo/InvestmentInfoContent.d.ts +49 -0
  12. package/bundle/components/OtherProducts/OtherProducts.d.ts +2 -1
  13. package/bundle/components/OtherProducts/OtherProductsContent.d.ts +1 -21
  14. package/bundle/components/OtherProductsItem/OtherProductsItem.d.ts +6 -0
  15. package/bundle/components/OtherProductsItem/OtherProductsItemContent.d.ts +14 -0
  16. package/bundle/components/StepsBlock/renderItems.d.ts +7 -2
  17. package/bundle/components/StepsBlock/renderStepContent.d.ts +14 -0
  18. package/bundle/model/BlockDecorator.d.ts +1 -0
  19. package/bundle/model/BlocksRegistry.d.ts +4 -1
  20. package/bundle/ui-kit/Foldable/DefaultFoldButton.d.ts +14 -0
  21. package/bundle/ui-kit/Foldable/Foldable.d.ts +3 -10
  22. package/bundle/ui-kit/Foldable/FoldablePartProps.d.ts +4 -0
  23. package/bundle/ui-kit/Foldable/FoldableSection.d.ts +5 -0
  24. package/dist/components/Accordion/Accordion.js +3 -1
  25. package/dist/components/Accordion/Accordion.js.map +1 -1
  26. package/dist/components/Accordion/Accordion.mobile.js +5 -2
  27. package/dist/components/Accordion/Accordion.mobile.js.map +1 -1
  28. package/dist/components/Accordion/AccordionContent.d.ts +9 -7
  29. package/dist/components/Accordion/AccordionItem.d.ts +1 -4
  30. package/dist/components/Accordion/AccordionItem.js +3 -8
  31. package/dist/components/Accordion/AccordionItem.js.map +1 -1
  32. package/dist/components/Accordion/AccordionItem.mobile.d.ts +1 -4
  33. package/dist/components/Accordion/AccordionItem.mobile.js +2 -5
  34. package/dist/components/Accordion/AccordionItem.mobile.js.map +1 -1
  35. package/dist/components/Accordion/AccordionItemProps.d.ts +5 -0
  36. package/dist/components/Accordion/AccordionItemProps.js +2 -0
  37. package/dist/components/Accordion/AccordionItemProps.js.map +1 -0
  38. package/dist/components/Accordion/AccordionItemsList.d.ts +1 -0
  39. package/dist/components/Accordion/AccordionItemsList.js +6 -0
  40. package/dist/components/Accordion/AccordionItemsList.js.map +1 -0
  41. package/dist/components/Blocks.d.ts +3 -1
  42. package/dist/components/Blocks.js +4 -0
  43. package/dist/components/Blocks.js.map +1 -1
  44. package/dist/components/ContentPage/filterBlocks.js +1 -2
  45. package/dist/components/ContentPage/filterBlocks.js.map +1 -1
  46. package/dist/components/ContentPage/filterBlocks.mobile.js +1 -3
  47. package/dist/components/ContentPage/filterBlocks.mobile.js.map +1 -1
  48. package/dist/components/ContentPage/renderBlock.js +8 -7
  49. package/dist/components/ContentPage/renderBlock.js.map +1 -1
  50. package/dist/components/Footer/Footer.mobile.js +8 -7
  51. package/dist/components/Footer/Footer.mobile.js.map +1 -1
  52. package/dist/components/Header/Header.mobile.js +5 -5
  53. package/dist/components/Header/Header.mobile.js.map +1 -1
  54. package/dist/components/InvestmentInfo/InvestmentInfo.d.ts +5 -0
  55. package/dist/components/InvestmentInfo/InvestmentInfo.js +49 -0
  56. package/dist/components/InvestmentInfo/InvestmentInfo.js.map +1 -0
  57. package/dist/components/InvestmentInfo/InvestmentInfoContent.d.ts +49 -0
  58. package/dist/components/InvestmentInfo/InvestmentInfoContent.js +2 -0
  59. package/dist/components/InvestmentInfo/InvestmentInfoContent.js.map +1 -0
  60. package/dist/components/OtherProducts/OtherProducts.d.ts +2 -1
  61. package/dist/components/OtherProducts/OtherProducts.js +2 -4
  62. package/dist/components/OtherProducts/OtherProducts.js.map +1 -1
  63. package/dist/components/OtherProducts/OtherProductsContent.d.ts +1 -21
  64. package/dist/components/OtherProductsItem/OtherProductsItem.d.ts +6 -0
  65. package/dist/components/OtherProductsItem/OtherProductsItem.js +11 -0
  66. package/dist/components/OtherProductsItem/OtherProductsItem.js.map +1 -0
  67. package/dist/components/OtherProductsItem/OtherProductsItemContent.d.ts +14 -0
  68. package/dist/components/OtherProductsItem/OtherProductsItemContent.js +2 -0
  69. package/dist/components/OtherProductsItem/OtherProductsItemContent.js.map +1 -0
  70. package/dist/components/StepsBlock/StepsBlock.js +2 -8
  71. package/dist/components/StepsBlock/StepsBlock.js.map +1 -1
  72. package/dist/components/StepsBlock/StepsBlockStyleMaps.js +2 -2
  73. package/dist/components/StepsBlock/StepsBlockStyleMaps.js.map +1 -1
  74. package/dist/components/StepsBlock/renderItems.d.ts +7 -2
  75. package/dist/components/StepsBlock/renderItems.js +5 -1
  76. package/dist/components/StepsBlock/renderItems.js.map +1 -1
  77. package/dist/components/StepsBlock/renderStepContent.d.ts +14 -0
  78. package/dist/components/StepsBlock/renderStepContent.js +20 -0
  79. package/dist/components/StepsBlock/renderStepContent.js.map +1 -0
  80. package/dist/components/TariffsTable/TariffsTable.js +11 -2
  81. package/dist/components/TariffsTable/TariffsTable.js.map +1 -1
  82. package/dist/model/BlockDecorator.d.ts +1 -0
  83. package/dist/model/BlockDecorator.js +2 -1
  84. package/dist/model/BlockDecorator.js.map +1 -1
  85. package/dist/model/BlocksRegistry.d.ts +4 -1
  86. package/dist/ui-kit/Foldable/DefaultFoldButton.d.ts +14 -0
  87. package/dist/ui-kit/Foldable/DefaultFoldButton.js +16 -0
  88. package/dist/ui-kit/Foldable/DefaultFoldButton.js.map +1 -0
  89. package/dist/ui-kit/Foldable/Foldable.d.ts +3 -10
  90. package/dist/ui-kit/Foldable/Foldable.js +7 -23
  91. package/dist/ui-kit/Foldable/Foldable.js.map +1 -1
  92. package/dist/ui-kit/Foldable/FoldablePartProps.d.ts +4 -0
  93. package/dist/ui-kit/Foldable/{FoldButtonProps.js → FoldablePartProps.js} +1 -1
  94. package/dist/ui-kit/Foldable/FoldablePartProps.js.map +1 -0
  95. package/dist/ui-kit/Foldable/FoldableSection.d.ts +5 -0
  96. package/dist/ui-kit/Foldable/FoldableSection.js +17 -0
  97. package/dist/ui-kit/Foldable/FoldableSection.js.map +1 -0
  98. package/lib/common.css +1 -1
  99. package/lib/components/Accordion/Accordion.js +3 -1
  100. package/lib/components/Accordion/Accordion.js.map +1 -1
  101. package/lib/components/Accordion/Accordion.mobile.js +5 -2
  102. package/lib/components/Accordion/Accordion.mobile.js.map +1 -1
  103. package/lib/components/Accordion/AccordionContent.d.ts +9 -7
  104. package/lib/components/Accordion/AccordionItem.d.ts +1 -4
  105. package/lib/components/Accordion/AccordionItem.js +3 -8
  106. package/lib/components/Accordion/AccordionItem.js.map +1 -1
  107. package/lib/components/Accordion/AccordionItem.mobile.d.ts +1 -4
  108. package/lib/components/Accordion/AccordionItem.mobile.js +2 -5
  109. package/lib/components/Accordion/AccordionItem.mobile.js.map +1 -1
  110. package/lib/components/Accordion/AccordionItemProps.d.ts +5 -0
  111. package/lib/components/Accordion/AccordionItemProps.js +2 -0
  112. package/lib/components/Accordion/AccordionItemProps.js.map +1 -0
  113. package/lib/components/Accordion/AccordionItemsList.d.ts +1 -0
  114. package/lib/components/Accordion/AccordionItemsList.js +4 -0
  115. package/lib/components/Accordion/AccordionItemsList.js.map +1 -0
  116. package/lib/components/Blocks.d.ts +3 -1
  117. package/lib/components/Blocks.js +4 -0
  118. package/lib/components/Blocks.js.map +1 -1
  119. package/lib/components/ContentPage/filterBlocks.js +1 -2
  120. package/lib/components/ContentPage/filterBlocks.js.map +1 -1
  121. package/lib/components/ContentPage/filterBlocks.mobile.js +1 -3
  122. package/lib/components/ContentPage/filterBlocks.mobile.js.map +1 -1
  123. package/lib/components/ContentPage/renderBlock.js +9 -8
  124. package/lib/components/ContentPage/renderBlock.js.map +1 -1
  125. package/lib/components/Footer/Footer.mobile.js +8 -7
  126. package/lib/components/Footer/Footer.mobile.js.map +1 -1
  127. package/lib/components/Header/Header.mobile.js +5 -5
  128. package/lib/components/Header/Header.mobile.js.map +1 -1
  129. package/lib/components/InvestmentInfo/InvestmentInfo.d.ts +5 -0
  130. package/lib/components/InvestmentInfo/InvestmentInfo.fixture.d.ts +7 -0
  131. package/lib/components/InvestmentInfo/InvestmentInfo.js +47 -0
  132. package/lib/components/InvestmentInfo/InvestmentInfo.js.map +1 -0
  133. package/lib/components/InvestmentInfo/InvestmentInfoContent.d.ts +49 -0
  134. package/lib/components/InvestmentInfo/InvestmentInfoContent.js +2 -0
  135. package/lib/components/InvestmentInfo/InvestmentInfoContent.js.map +1 -0
  136. package/lib/components/OtherProducts/OtherProducts.d.ts +2 -1
  137. package/lib/components/OtherProducts/OtherProducts.fixture.d.ts +1 -0
  138. package/lib/components/OtherProducts/OtherProducts.js +2 -4
  139. package/lib/components/OtherProducts/OtherProducts.js.map +1 -1
  140. package/lib/components/OtherProducts/OtherProductsContent.d.ts +1 -21
  141. package/lib/components/OtherProductsItem/OtherProductsItem.d.ts +6 -0
  142. package/lib/components/OtherProductsItem/OtherProductsItem.fixture.d.ts +5 -0
  143. package/lib/components/OtherProductsItem/OtherProductsItem.js +9 -0
  144. package/lib/components/OtherProductsItem/OtherProductsItem.js.map +1 -0
  145. package/lib/components/OtherProductsItem/OtherProductsItemContent.d.ts +14 -0
  146. package/lib/components/OtherProductsItem/OtherProductsItemContent.js +2 -0
  147. package/lib/components/OtherProductsItem/OtherProductsItemContent.js.map +1 -0
  148. package/lib/components/StepsBlock/StepsBlock.fixture.d.ts +2 -1
  149. package/lib/components/StepsBlock/StepsBlock.js +2 -8
  150. package/lib/components/StepsBlock/StepsBlock.js.map +1 -1
  151. package/lib/components/StepsBlock/StepsBlockStyleMaps.js +2 -2
  152. package/lib/components/StepsBlock/StepsBlockStyleMaps.js.map +1 -1
  153. package/lib/components/StepsBlock/renderItems.d.ts +7 -2
  154. package/lib/components/StepsBlock/renderItems.js +6 -2
  155. package/lib/components/StepsBlock/renderItems.js.map +1 -1
  156. package/lib/components/StepsBlock/renderStepContent.d.ts +14 -0
  157. package/lib/components/StepsBlock/renderStepContent.js +17 -0
  158. package/lib/components/StepsBlock/renderStepContent.js.map +1 -0
  159. package/lib/components/TariffsTable/TariffsTable.js +11 -2
  160. package/lib/components/TariffsTable/TariffsTable.js.map +1 -1
  161. package/lib/model/BlockDecorator.d.ts +1 -0
  162. package/lib/model/BlockDecorator.js +1 -0
  163. package/lib/model/BlockDecorator.js.map +1 -1
  164. package/lib/model/BlocksRegistry.d.ts +4 -1
  165. package/lib/ui-kit/Foldable/DefaultFoldButton.d.ts +14 -0
  166. package/lib/ui-kit/Foldable/DefaultFoldButton.js +13 -0
  167. package/lib/ui-kit/Foldable/DefaultFoldButton.js.map +1 -0
  168. package/lib/ui-kit/Foldable/Foldable.d.ts +3 -10
  169. package/lib/ui-kit/Foldable/Foldable.js +9 -25
  170. package/lib/ui-kit/Foldable/Foldable.js.map +1 -1
  171. package/lib/ui-kit/Foldable/FoldablePartProps.d.ts +4 -0
  172. package/lib/ui-kit/Foldable/FoldablePartProps.js +2 -0
  173. package/lib/ui-kit/Foldable/FoldablePartProps.js.map +1 -0
  174. package/lib/ui-kit/Foldable/FoldableSection.d.ts +5 -0
  175. package/lib/ui-kit/Foldable/FoldableSection.js +15 -0
  176. package/lib/ui-kit/Foldable/FoldableSection.js.map +1 -0
  177. package/mobile/bundle/bundle.umd.js +138 -159
  178. package/mobile/bundle/bundle.umd.min.js +1 -1
  179. package/mobile/bundle/components/Accordion/AccordionContent.d.ts +9 -7
  180. package/mobile/bundle/components/Accordion/AccordionItem.d.ts +1 -4
  181. package/mobile/bundle/components/Accordion/AccordionItemProps.d.ts +5 -0
  182. package/mobile/bundle/components/Accordion/AccordionItemsList.d.ts +1 -0
  183. package/mobile/bundle/components/InvestmentInfo/InvestmentInfo.d.ts +5 -0
  184. package/mobile/bundle/components/InvestmentInfo/InvestmentInfoContent.d.ts +49 -0
  185. package/mobile/bundle/components/OtherProducts/OtherProducts.d.ts +2 -1
  186. package/mobile/bundle/components/OtherProducts/OtherProductsContent.d.ts +1 -21
  187. package/mobile/bundle/components/OtherProductsItem/OtherProductsItem.d.ts +6 -0
  188. package/mobile/bundle/components/OtherProductsItem/OtherProductsItemContent.d.ts +14 -0
  189. package/mobile/bundle/components/StepsBlock/renderItems.d.ts +7 -2
  190. package/mobile/bundle/components/StepsBlock/renderStepContent.d.ts +14 -0
  191. package/mobile/bundle/model/BlockDecorator.d.ts +1 -0
  192. package/mobile/bundle/model/BlocksRegistry.d.ts +4 -1
  193. package/mobile/bundle/ui-kit/Foldable/DefaultFoldButton.d.ts +14 -0
  194. package/mobile/bundle/ui-kit/Foldable/Foldable.d.ts +3 -10
  195. package/mobile/bundle/ui-kit/Foldable/FoldablePartProps.d.ts +4 -0
  196. package/mobile/bundle/ui-kit/Foldable/FoldableSection.d.ts +5 -0
  197. package/mobile/dist/components/Accordion/Accordion.js +5 -2
  198. package/mobile/dist/components/Accordion/Accordion.js.map +1 -1
  199. package/mobile/dist/components/Accordion/AccordionContent.d.ts +9 -7
  200. package/mobile/dist/components/Accordion/AccordionItem.d.ts +1 -4
  201. package/mobile/dist/components/Accordion/AccordionItem.js +2 -5
  202. package/mobile/dist/components/Accordion/AccordionItem.js.map +1 -1
  203. package/mobile/dist/components/Accordion/AccordionItemProps.d.ts +5 -0
  204. package/mobile/dist/components/Accordion/AccordionItemProps.js +2 -0
  205. package/mobile/dist/components/Accordion/AccordionItemProps.js.map +1 -0
  206. package/mobile/dist/components/Accordion/AccordionItemsList.d.ts +1 -0
  207. package/mobile/dist/components/Accordion/AccordionItemsList.js +6 -0
  208. package/mobile/dist/components/Accordion/AccordionItemsList.js.map +1 -0
  209. package/mobile/dist/components/ContentPage/filterBlocks.js +1 -3
  210. package/mobile/dist/components/ContentPage/filterBlocks.js.map +1 -1
  211. package/mobile/dist/components/ContentPage/renderBlock.js +8 -7
  212. package/mobile/dist/components/ContentPage/renderBlock.js.map +1 -1
  213. package/mobile/dist/components/Footer/Footer.js +8 -7
  214. package/mobile/dist/components/Footer/Footer.js.map +1 -1
  215. package/mobile/dist/components/Header/Header.js +5 -5
  216. package/mobile/dist/components/Header/Header.js.map +1 -1
  217. package/mobile/dist/components/InvestmentInfo/InvestmentInfo.d.ts +5 -0
  218. package/mobile/dist/components/InvestmentInfo/InvestmentInfo.js +49 -0
  219. package/mobile/dist/components/InvestmentInfo/InvestmentInfo.js.map +1 -0
  220. package/mobile/dist/components/InvestmentInfo/InvestmentInfoContent.d.ts +49 -0
  221. package/mobile/dist/components/InvestmentInfo/InvestmentInfoContent.js +2 -0
  222. package/mobile/dist/components/InvestmentInfo/InvestmentInfoContent.js.map +1 -0
  223. package/mobile/dist/components/OtherProducts/OtherProducts.d.ts +2 -1
  224. package/mobile/dist/components/OtherProducts/OtherProducts.js +2 -4
  225. package/mobile/dist/components/OtherProducts/OtherProducts.js.map +1 -1
  226. package/mobile/dist/components/OtherProducts/OtherProductsContent.d.ts +1 -21
  227. package/mobile/dist/components/OtherProductsItem/OtherProductsItem.d.ts +6 -0
  228. package/mobile/dist/components/OtherProductsItem/OtherProductsItem.js +11 -0
  229. package/mobile/dist/components/OtherProductsItem/OtherProductsItem.js.map +1 -0
  230. package/mobile/dist/components/OtherProductsItem/OtherProductsItemContent.d.ts +14 -0
  231. package/mobile/dist/components/OtherProductsItem/OtherProductsItemContent.js +2 -0
  232. package/mobile/dist/components/OtherProductsItem/OtherProductsItemContent.js.map +1 -0
  233. package/mobile/dist/components/StepsBlock/StepsBlockStyleMaps.js +2 -2
  234. package/mobile/dist/components/StepsBlock/StepsBlockStyleMaps.js.map +1 -1
  235. package/mobile/dist/components/StepsBlock/renderItems.d.ts +7 -2
  236. package/mobile/dist/components/StepsBlock/renderItems.js +5 -1
  237. package/mobile/dist/components/StepsBlock/renderItems.js.map +1 -1
  238. package/mobile/dist/components/StepsBlock/renderStepContent.d.ts +14 -0
  239. package/mobile/dist/components/StepsBlock/renderStepContent.js +20 -0
  240. package/mobile/dist/components/StepsBlock/renderStepContent.js.map +1 -0
  241. package/mobile/dist/model/BlockDecorator.d.ts +1 -0
  242. package/mobile/dist/model/BlockDecorator.js +2 -1
  243. package/mobile/dist/model/BlockDecorator.js.map +1 -1
  244. package/mobile/dist/model/BlocksRegistry.d.ts +4 -1
  245. package/mobile/dist/ui-kit/Foldable/DefaultFoldButton.d.ts +14 -0
  246. package/mobile/dist/ui-kit/Foldable/DefaultFoldButton.js +16 -0
  247. package/mobile/dist/ui-kit/Foldable/DefaultFoldButton.js.map +1 -0
  248. package/mobile/dist/ui-kit/Foldable/Foldable.d.ts +3 -10
  249. package/mobile/dist/ui-kit/Foldable/Foldable.js +7 -23
  250. package/mobile/dist/ui-kit/Foldable/Foldable.js.map +1 -1
  251. package/mobile/dist/ui-kit/Foldable/FoldablePartProps.d.ts +4 -0
  252. package/mobile/dist/ui-kit/Foldable/{FoldButtonProps.js → FoldablePartProps.js} +1 -1
  253. package/mobile/dist/ui-kit/Foldable/FoldablePartProps.js.map +1 -0
  254. package/mobile/dist/ui-kit/Foldable/FoldableSection.d.ts +5 -0
  255. package/mobile/dist/ui-kit/Foldable/FoldableSection.js +17 -0
  256. package/mobile/dist/ui-kit/Foldable/FoldableSection.js.map +1 -0
  257. package/mobile/lib/components/Accordion/Accordion.js +5 -2
  258. package/mobile/lib/components/Accordion/Accordion.js.map +1 -1
  259. package/mobile/lib/components/Accordion/AccordionContent.d.ts +9 -7
  260. package/mobile/lib/components/Accordion/AccordionItem.d.ts +1 -4
  261. package/mobile/lib/components/Accordion/AccordionItem.js +2 -5
  262. package/mobile/lib/components/Accordion/AccordionItem.js.map +1 -1
  263. package/mobile/lib/components/Accordion/AccordionItemProps.d.ts +5 -0
  264. package/mobile/lib/components/Accordion/AccordionItemProps.js +2 -0
  265. package/mobile/lib/components/Accordion/AccordionItemProps.js.map +1 -0
  266. package/mobile/lib/components/Accordion/AccordionItemsList.d.ts +1 -0
  267. package/mobile/lib/components/Accordion/AccordionItemsList.js +4 -0
  268. package/mobile/lib/components/Accordion/AccordionItemsList.js.map +1 -0
  269. package/mobile/lib/components/ContentPage/filterBlocks.js +1 -3
  270. package/mobile/lib/components/ContentPage/filterBlocks.js.map +1 -1
  271. package/mobile/lib/components/ContentPage/renderBlock.js +9 -8
  272. package/mobile/lib/components/ContentPage/renderBlock.js.map +1 -1
  273. package/mobile/lib/components/Footer/Footer.js +8 -7
  274. package/mobile/lib/components/Footer/Footer.js.map +1 -1
  275. package/mobile/lib/components/Header/Header.js +5 -5
  276. package/mobile/lib/components/Header/Header.js.map +1 -1
  277. package/mobile/lib/components/InvestmentInfo/InvestmentInfo.d.ts +5 -0
  278. package/mobile/lib/components/InvestmentInfo/InvestmentInfo.js +47 -0
  279. package/mobile/lib/components/InvestmentInfo/InvestmentInfo.js.map +1 -0
  280. package/mobile/lib/components/InvestmentInfo/InvestmentInfoContent.d.ts +49 -0
  281. package/mobile/lib/components/InvestmentInfo/InvestmentInfoContent.js +2 -0
  282. package/mobile/lib/components/InvestmentInfo/InvestmentInfoContent.js.map +1 -0
  283. package/mobile/lib/components/OtherProducts/OtherProducts.d.ts +2 -1
  284. package/mobile/lib/components/OtherProducts/OtherProducts.js +2 -4
  285. package/mobile/lib/components/OtherProducts/OtherProducts.js.map +1 -1
  286. package/mobile/lib/components/OtherProducts/OtherProductsContent.d.ts +1 -21
  287. package/mobile/lib/components/OtherProductsItem/OtherProductsItem.d.ts +6 -0
  288. package/mobile/lib/components/OtherProductsItem/OtherProductsItem.js +9 -0
  289. package/mobile/lib/components/OtherProductsItem/OtherProductsItem.js.map +1 -0
  290. package/mobile/lib/components/OtherProductsItem/OtherProductsItemContent.d.ts +14 -0
  291. package/mobile/lib/components/OtherProductsItem/OtherProductsItemContent.js +2 -0
  292. package/mobile/lib/components/OtherProductsItem/OtherProductsItemContent.js.map +1 -0
  293. package/mobile/lib/components/StepsBlock/StepsBlockStyleMaps.js +2 -2
  294. package/mobile/lib/components/StepsBlock/StepsBlockStyleMaps.js.map +1 -1
  295. package/mobile/lib/components/StepsBlock/renderItems.d.ts +7 -2
  296. package/mobile/lib/components/StepsBlock/renderItems.js +6 -2
  297. package/mobile/lib/components/StepsBlock/renderItems.js.map +1 -1
  298. package/mobile/lib/components/StepsBlock/renderStepContent.d.ts +14 -0
  299. package/mobile/lib/components/StepsBlock/renderStepContent.js +17 -0
  300. package/mobile/lib/components/StepsBlock/renderStepContent.js.map +1 -0
  301. package/mobile/lib/model/BlockDecorator.d.ts +1 -0
  302. package/mobile/lib/model/BlockDecorator.js +1 -0
  303. package/mobile/lib/model/BlockDecorator.js.map +1 -1
  304. package/mobile/lib/model/BlocksRegistry.d.ts +4 -1
  305. package/mobile/lib/ui-kit/Foldable/DefaultFoldButton.d.ts +14 -0
  306. package/mobile/lib/ui-kit/Foldable/DefaultFoldButton.js +13 -0
  307. package/mobile/lib/ui-kit/Foldable/DefaultFoldButton.js.map +1 -0
  308. package/mobile/lib/ui-kit/Foldable/Foldable.d.ts +3 -10
  309. package/mobile/lib/ui-kit/Foldable/Foldable.js +9 -25
  310. package/mobile/lib/ui-kit/Foldable/Foldable.js.map +1 -1
  311. package/mobile/lib/ui-kit/Foldable/FoldablePartProps.d.ts +4 -0
  312. package/mobile/lib/ui-kit/Foldable/FoldablePartProps.js +2 -0
  313. package/mobile/lib/ui-kit/Foldable/FoldablePartProps.js.map +1 -0
  314. package/mobile/lib/ui-kit/Foldable/FoldableSection.d.ts +5 -0
  315. package/mobile/lib/ui-kit/Foldable/FoldableSection.js +15 -0
  316. package/mobile/lib/ui-kit/Foldable/FoldableSection.js.map +1 -0
  317. package/mobile/src/common.css +11 -3
  318. package/mobile/src/components/Accordion/Accordion.tsx +17 -7
  319. package/mobile/src/components/Accordion/AccordionContent.ts +10 -7
  320. package/mobile/src/components/Accordion/AccordionItem.tsx +34 -30
  321. package/mobile/src/components/Accordion/AccordionItemProps.ts +6 -0
  322. package/mobile/src/components/Accordion/AccordionItemsList.tsx +5 -0
  323. package/mobile/src/components/ContentPage/filterBlocks.ts +1 -3
  324. package/mobile/src/components/ContentPage/renderBlock.tsx +16 -11
  325. package/mobile/src/components/ExchangeRateTile/ExchangeRateTile.ui.json +8 -1
  326. package/mobile/src/components/Footer/Footer.tsx +15 -13
  327. package/mobile/src/components/GracePeriod/GracePeriod.ui.json +5 -0
  328. package/mobile/src/components/Header/Header.tsx +16 -11
  329. package/mobile/src/components/InvestmentInfo/InvestmentInfo.example.json +48 -0
  330. package/mobile/src/components/InvestmentInfo/InvestmentInfo.tsx +149 -0
  331. package/mobile/src/components/InvestmentInfo/InvestmentInfo.ui.json +16 -0
  332. package/mobile/src/components/InvestmentInfo/InvestmentInfoContent.ts +55 -0
  333. package/mobile/src/components/OtherProducts/OtherProducts.example.json +1 -54
  334. package/mobile/src/components/OtherProducts/OtherProducts.tsx +13 -24
  335. package/mobile/src/components/OtherProducts/OtherProducts.ui.json +1 -76
  336. package/mobile/src/components/OtherProducts/OtherProductsContent.ts +1 -22
  337. package/mobile/src/components/OtherProductsItem/OtherProductsItem.example.json +3 -0
  338. package/mobile/src/components/OtherProductsItem/OtherProductsItem.tsx +39 -0
  339. package/mobile/src/components/OtherProductsItem/OtherProductsItem.ui.json +1 -0
  340. package/mobile/src/components/OtherProductsItem/OtherProductsItemContent.ts +17 -0
  341. package/mobile/src/components/SafeDepositRental/SafeDepositRental.ui.json +8 -1
  342. package/mobile/src/components/StepsBlock/StepsBlockStyleMaps.ts +2 -2
  343. package/mobile/src/components/StepsBlock/renderItems.tsx +24 -15
  344. package/mobile/src/components/StepsBlock/renderStepContent.tsx +63 -0
  345. package/mobile/src/model/BlockDecorator.ts +2 -0
  346. package/mobile/src/model/BlocksRegistry.ts +4 -1
  347. package/mobile/src/ui-kit/Foldable/DefaultFoldButton.tsx +52 -0
  348. package/mobile/src/ui-kit/Foldable/Foldable.tsx +19 -67
  349. package/mobile/src/ui-kit/Foldable/FoldablePartProps.ts +4 -0
  350. package/mobile/src/ui-kit/Foldable/FoldableSection.tsx +30 -0
  351. package/package.json +2 -2
  352. package/src/common.css +11 -3
  353. package/src/components/Accordion/Accordion.mobile.tsx +17 -7
  354. package/src/components/Accordion/Accordion.tsx +12 -3
  355. package/src/components/Accordion/AccordionContent.ts +10 -7
  356. package/src/components/Accordion/AccordionItem.mobile.tsx +34 -30
  357. package/src/components/Accordion/AccordionItem.tsx +24 -23
  358. package/src/components/Accordion/AccordionItemProps.ts +6 -0
  359. package/src/components/Accordion/AccordionItemsList.tsx +5 -0
  360. package/src/components/Blocks.ts +4 -0
  361. package/src/components/ContentPage/filterBlocks.mobile.ts +1 -3
  362. package/src/components/ContentPage/filterBlocks.ts +1 -2
  363. package/src/components/ContentPage/renderBlock.tsx +16 -11
  364. package/src/components/ExchangeRateTile/ExchangeRateTile.ui.json +8 -1
  365. package/src/components/Footer/Footer.mobile.tsx +15 -13
  366. package/src/components/GracePeriod/GracePeriod.ui.json +5 -0
  367. package/src/components/Header/Header.mobile.tsx +16 -11
  368. package/src/components/InvestmentInfo/InvestmentInfo.example.json +48 -0
  369. package/src/components/InvestmentInfo/InvestmentInfo.fixture.tsx +107 -0
  370. package/src/components/InvestmentInfo/InvestmentInfo.tsx +149 -0
  371. package/src/components/InvestmentInfo/InvestmentInfo.ui.json +16 -0
  372. package/src/components/InvestmentInfo/InvestmentInfoContent.ts +55 -0
  373. package/src/components/OtherProducts/OtherProducts.example.json +1 -54
  374. package/src/components/OtherProducts/OtherProducts.fixture.tsx +77 -126
  375. package/src/components/OtherProducts/OtherProducts.tsx +13 -24
  376. package/src/components/OtherProducts/OtherProducts.ui.json +1 -76
  377. package/src/components/OtherProducts/OtherProductsContent.ts +1 -22
  378. package/src/components/OtherProductsItem/OtherProductsItem.example.json +3 -0
  379. package/src/components/OtherProductsItem/OtherProductsItem.fixture.tsx +5 -0
  380. package/src/components/OtherProductsItem/OtherProductsItem.tsx +39 -0
  381. package/src/components/OtherProductsItem/OtherProductsItem.ui.json +1 -0
  382. package/src/components/OtherProductsItem/OtherProductsItemContent.ts +17 -0
  383. package/src/components/SafeDepositRental/SafeDepositRental.ui.json +8 -1
  384. package/src/components/StepsBlock/StepsBlock.fixture.tsx +39 -25
  385. package/src/components/StepsBlock/StepsBlock.tsx +3 -49
  386. package/src/components/StepsBlock/StepsBlockStyleMaps.ts +2 -2
  387. package/src/components/StepsBlock/renderItems.tsx +24 -15
  388. package/src/components/StepsBlock/renderStepContent.tsx +63 -0
  389. package/src/components/TariffsTable/TariffsTable.tsx +32 -23
  390. package/src/model/BlockDecorator.ts +2 -0
  391. package/src/model/BlocksRegistry.ts +4 -1
  392. package/src/ui-kit/Foldable/DefaultFoldButton.tsx +52 -0
  393. package/src/ui-kit/Foldable/Foldable.tsx +19 -67
  394. package/src/ui-kit/Foldable/FoldablePartProps.ts +4 -0
  395. package/src/ui-kit/Foldable/FoldableSection.tsx +30 -0
  396. package/tailwind.config.cjs +5 -0
  397. package/bundle/components/ContentPage/isBlockInRegistry.d.ts +0 -2
  398. package/bundle/components/OtherProducts/OtherProductsItem.d.ts +0 -6
  399. package/bundle/ui-kit/Foldable/DefaultButton.d.ts +0 -2
  400. package/bundle/ui-kit/Foldable/FoldButtonProps.d.ts +0 -12
  401. package/bundle/utils/getAccordionItems.d.ts +0 -1
  402. package/dist/components/ContentPage/isBlockInRegistry.d.ts +0 -2
  403. package/dist/components/ContentPage/isBlockInRegistry.js +0 -7
  404. package/dist/components/ContentPage/isBlockInRegistry.js.map +0 -1
  405. package/dist/components/OtherProducts/OtherProductsItem.d.ts +0 -6
  406. package/dist/components/OtherProducts/OtherProductsItem.js +0 -19
  407. package/dist/components/OtherProducts/OtherProductsItem.js.map +0 -1
  408. package/dist/ui-kit/Foldable/DefaultButton.d.ts +0 -2
  409. package/dist/ui-kit/Foldable/DefaultButton.js +0 -12
  410. package/dist/ui-kit/Foldable/DefaultButton.js.map +0 -1
  411. package/dist/ui-kit/Foldable/FoldButtonProps.d.ts +0 -12
  412. package/dist/ui-kit/Foldable/FoldButtonProps.js.map +0 -1
  413. package/dist/utils/getAccordionItems.d.ts +0 -1
  414. package/dist/utils/getAccordionItems.js +0 -13
  415. package/dist/utils/getAccordionItems.js.map +0 -1
  416. package/lib/components/ContentPage/isBlockInRegistry.d.ts +0 -2
  417. package/lib/components/ContentPage/isBlockInRegistry.js +0 -4
  418. package/lib/components/ContentPage/isBlockInRegistry.js.map +0 -1
  419. package/lib/components/OtherProducts/OtherProductsItem.d.ts +0 -6
  420. package/lib/components/OtherProducts/OtherProductsItem.js +0 -17
  421. package/lib/components/OtherProducts/OtherProductsItem.js.map +0 -1
  422. package/lib/ui-kit/Foldable/DefaultButton.d.ts +0 -2
  423. package/lib/ui-kit/Foldable/DefaultButton.js +0 -10
  424. package/lib/ui-kit/Foldable/DefaultButton.js.map +0 -1
  425. package/lib/ui-kit/Foldable/FoldButtonProps.d.ts +0 -12
  426. package/lib/ui-kit/Foldable/FoldButtonProps.js +0 -2
  427. package/lib/ui-kit/Foldable/FoldButtonProps.js.map +0 -1
  428. package/lib/utils/getAccordionItems.d.ts +0 -1
  429. package/lib/utils/getAccordionItems.js +0 -10
  430. package/lib/utils/getAccordionItems.js.map +0 -1
  431. package/mobile/bundle/components/ContentPage/isBlockInRegistry.d.ts +0 -2
  432. package/mobile/bundle/components/OtherProducts/OtherProductsItem.d.ts +0 -6
  433. package/mobile/bundle/ui-kit/Foldable/DefaultButton.d.ts +0 -2
  434. package/mobile/bundle/ui-kit/Foldable/FoldButtonProps.d.ts +0 -12
  435. package/mobile/bundle/utils/getAccordionItems.d.ts +0 -1
  436. package/mobile/dist/components/ContentPage/isBlockInRegistry.d.ts +0 -2
  437. package/mobile/dist/components/ContentPage/isBlockInRegistry.js +0 -7
  438. package/mobile/dist/components/ContentPage/isBlockInRegistry.js.map +0 -1
  439. package/mobile/dist/components/OtherProducts/OtherProductsItem.d.ts +0 -6
  440. package/mobile/dist/components/OtherProducts/OtherProductsItem.js +0 -19
  441. package/mobile/dist/components/OtherProducts/OtherProductsItem.js.map +0 -1
  442. package/mobile/dist/ui-kit/Foldable/DefaultButton.d.ts +0 -2
  443. package/mobile/dist/ui-kit/Foldable/DefaultButton.js +0 -12
  444. package/mobile/dist/ui-kit/Foldable/DefaultButton.js.map +0 -1
  445. package/mobile/dist/ui-kit/Foldable/FoldButtonProps.d.ts +0 -12
  446. package/mobile/dist/ui-kit/Foldable/FoldButtonProps.js.map +0 -1
  447. package/mobile/dist/utils/getAccordionItems.d.ts +0 -1
  448. package/mobile/dist/utils/getAccordionItems.js +0 -13
  449. package/mobile/dist/utils/getAccordionItems.js.map +0 -1
  450. package/mobile/lib/components/ContentPage/isBlockInRegistry.d.ts +0 -2
  451. package/mobile/lib/components/ContentPage/isBlockInRegistry.js +0 -4
  452. package/mobile/lib/components/ContentPage/isBlockInRegistry.js.map +0 -1
  453. package/mobile/lib/components/OtherProducts/OtherProductsItem.d.ts +0 -6
  454. package/mobile/lib/components/OtherProducts/OtherProductsItem.js +0 -17
  455. package/mobile/lib/components/OtherProducts/OtherProductsItem.js.map +0 -1
  456. package/mobile/lib/ui-kit/Foldable/DefaultButton.d.ts +0 -2
  457. package/mobile/lib/ui-kit/Foldable/DefaultButton.js +0 -10
  458. package/mobile/lib/ui-kit/Foldable/DefaultButton.js.map +0 -1
  459. package/mobile/lib/ui-kit/Foldable/FoldButtonProps.d.ts +0 -12
  460. package/mobile/lib/ui-kit/Foldable/FoldButtonProps.js +0 -2
  461. package/mobile/lib/ui-kit/Foldable/FoldButtonProps.js.map +0 -1
  462. package/mobile/lib/utils/getAccordionItems.d.ts +0 -1
  463. package/mobile/lib/utils/getAccordionItems.js +0 -10
  464. package/mobile/lib/utils/getAccordionItems.js.map +0 -1
  465. package/mobile/src/components/ContentPage/isBlockInRegistry.ts +0 -5
  466. package/mobile/src/components/OtherProducts/OtherProductsItem.tsx +0 -49
  467. package/mobile/src/ui-kit/Foldable/DefaultButton.tsx +0 -27
  468. package/mobile/src/ui-kit/Foldable/FoldButtonProps.ts +0 -13
  469. package/mobile/src/utils/getAccordionItems.ts +0 -10
  470. package/src/components/ContentPage/isBlockInRegistry.ts +0 -5
  471. package/src/components/OtherProducts/OtherProductsItem.tsx +0 -49
  472. package/src/ui-kit/Foldable/DefaultButton.tsx +0 -27
  473. package/src/ui-kit/Foldable/FoldButtonProps.ts +0 -13
  474. package/src/utils/getAccordionItems.ts +0 -10
@@ -1,3 +1,7 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "@redneckz/uni-jsx/jsx-runtime";
2
- export const renderItems = (items, styleMap, isDotted = true) => items ? (_jsx("div", { className: `mt-4 ${styleMap?.description}`, role: "list", children: items.map((_) => (_jsxs("div", { className: "items-start mt-1 first:mt-0", role: "listitem", children: [isDotted ? (_jsx("div", { className: `rounded-full inline-block mr-3 mb-1 w-1.5 h-1.5 min-w-1.5 min-h-1.5 ${styleMap?.dot}` })) : null, _jsx("span", { children: _ })] }))) })) : null;
1
+ import { jsx as _jsx } from "@redneckz/uni-jsx/jsx-runtime";
2
+ import { List } from '../../ui-kit/List/List.js';
3
+ export const renderItems = ({ items, isDotted = true, version = 'primary', className = '', }) => {
4
+ const listVersion = version === 'primary' ? 'gray' : version;
5
+ return items ? (_jsx(List, { className: `mt-4 ${className}`, version: listVersion, items: items, listItemSize: "S", isDotted: isDotted })) : null;
6
+ };
3
7
  //# sourceMappingURL=renderItems.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"renderItems.js","sourceRoot":"","sources":["../../../src/components/StepsBlock/renderItems.tsx"],"names":[],"mappings":";AAEA,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,KAAgB,EAAE,QAAoB,EAAE,QAAQ,GAAG,IAAI,EAAE,EAAE,CACrF,KAAK,CAAC,CAAC,CAAC,CACN,cAAK,SAAS,EAAE,QAAQ,QAAQ,EAAE,WAAW,EAAE,EAAE,IAAI,EAAC,MAAM,YACzD,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAChB,eAAK,SAAS,EAAC,6BAA6B,EAAC,IAAI,EAAC,UAAU,aACzD,QAAQ,CAAC,CAAC,CAAC,CACV,cACE,SAAS,EAAE,uEAAuE,QAAQ,EAAE,GAAG,EAAE,GACjG,CACH,CAAC,CAAC,CAAC,IAAI,EACR,yBAAO,CAAC,GAAQ,IACZ,CACP,CAAC,GACE,CACP,CAAC,CAAC,CAAC,IAAI,CAAC"}
1
+ {"version":3,"file":"renderItems.js","sourceRoot":"","sources":["../../../src/components/StepsBlock/renderItems.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAG9C,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,EAC1B,KAAK,EACL,QAAQ,GAAG,IAAI,EACf,OAAO,GAAG,SAAS,EACnB,SAAS,GAAG,EAAE,GAMf,EAAE,EAAE;IACH,MAAM,WAAW,GAAG,OAAO,KAAK,SAAS,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO,CAAC;IAE7D,OAAO,KAAK,CAAC,CAAC,CAAC,CACb,KAAC,IAAI,IACH,SAAS,EAAE,QAAQ,SAAS,EAAE,EAC9B,OAAO,EAAE,WAAW,EACpB,KAAK,EAAE,KAAK,EACZ,YAAY,EAAC,GAAG,EAChB,QAAQ,EAAE,QAAQ,GAClB,CACH,CAAC,CAAC,CAAC,IAAI,CAAC;AACX,CAAC,CAAC"}
@@ -0,0 +1,14 @@
1
+ /// <reference types="react" />
2
+ import type { BlockVersion } from '../../model/BlockVersion';
3
+ import type { HandlerDecorator, Router } from '../ContentPage/ContentPageContext';
4
+ import type { Step } from './StepsBlockContent';
5
+ import type { StyleType } from './StepsBlockStyleMaps';
6
+ export declare const renderStepContent: ({ styleMap, isMainButton, version, router, handlerDecorator, }: {
7
+ styleMap: StyleType;
8
+ isMainButton: boolean;
9
+ version: BlockVersion;
10
+ router: Router;
11
+ handlerDecorator?: HandlerDecorator | undefined;
12
+ }) => (step: Step, i: number, { length }: {
13
+ length: number;
14
+ }) => JSX.Element;
@@ -0,0 +1,17 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "@redneckz/uni-jsx/jsx-runtime";
2
+ import { Button } from '../../ui-kit/Button/Button.js';
3
+ import { renderItems } from './renderItems.js';
4
+ import { useLink } from '../../hooks/useLink.js';
5
+ export const renderStepContent = ({ styleMap, isMainButton, version, router, handlerDecorator, }) => (step, i, { length }) => {
6
+ const { label, description, button, items, isDotted } = step;
7
+ const additionalMarginClass = `${button?.text ? 'mb-8' : ''} ${step?.label ? 'mt-2' : 'mt-4'}`;
8
+ const widthContainer = length < 5 ? 'w-[276px]' : 'w-[210px]';
9
+ return (_jsxs("div", { className: `flex flex-col items-center text-center relative
10
+ whitespace-pre-line overflow-hidden ${widthContainer}`, children: [renderStepLabel(label), renderStepDescription({
11
+ description,
12
+ className: `${styleMap.description} ${additionalMarginClass}`,
13
+ }), renderItems({ items, isDotted, version, className: styleMap.description }), button?.text && !isMainButton ? (_jsx(Button, { className: "box-border py-3 h-12 w-full max-w-[240px] mt-auto", ...useLink({ router, handlerDecorator }, button), version: version, children: button.text })) : null] }, String(i)));
14
+ };
15
+ const renderStepLabel = (label) => label ? _jsx("div", { className: "text-x6 m-0 mt-4", children: label }) : null;
16
+ const renderStepDescription = ({ description, className = '', }) => (description ? _jsx("div", { className: className, children: description }) : null);
17
+ //# sourceMappingURL=renderStepContent.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"renderStepContent.js","sourceRoot":"","sources":["../../../src/components/StepsBlock/renderStepContent.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAC;AAKpD,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,OAAO,EAAE,MAA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AAG,CAAC,KAAc,EAAE,EAAE,CACzC,KAAK,CAAC,CAAC,CAAC,cAAK,SAAS,EAAC,kBAAkB,YAAE,KAAK,GAAO,CAAC,CAAC,CAAC,IAAI,CAAC;AAEjE,MAAM,qBAAqB,GAAG,CAAC,EAC7B,WAAW,EACX,SAAS,GAAG,EAAE,GAIf,EAAE,EAAE,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,cAAK,SAAS,EAAE,SAAS,YAAG,WAAW,GAAO,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC"}
@@ -3,7 +3,9 @@ import { JSX } from '@redneckz/uni-jsx';
3
3
  import { useState } from '@redneckz/uni-jsx/lib/hooks';
4
4
  import { useTableArrowScrollControl } from '../../hooks/useTableArrowScrollControl.js';
5
5
  import { BlockWrapper } from '../../ui-kit/BlockWrapper.js';
6
+ import { renderDefaultFoldButton } from '../../ui-kit/Foldable/DefaultFoldButton.js';
6
7
  import { Foldable } from '../../ui-kit/Foldable/Foldable.js';
8
+ import { FoldableSection } from '../../ui-kit/Foldable/FoldableSection.js';
7
9
  import { Heading } from '../../ui-kit/Heading/Heading.js';
8
10
  import { TableArrowScrollControl } from '../../ui-kit/TableArrowScrollControl/TableArrowScrollControl.js';
9
11
  import { COLS_LENGTH_FOR_SCROLL } from './constants.js';
@@ -22,9 +24,16 @@ export const TariffsTable = JSX(({ className = '', context, title, description,
22
24
  activeCardIndex,
23
25
  setActiveCardIndex,
24
26
  });
25
- const foldableBlocks = rowData?.map((row, i, { length }) => (_jsx(TariffsTableRow, { context: context, row: row, isLastRow: i + 1 === length, activeCardIndex: activeCardIndex, rowIdx: i }, String(i))));
26
- return (_jsxs(BlockWrapper, { className: `bg-white font-sans p-[50px] overflow-hidden text-primary-text relative ${columnsLength > 1 ? 'pr-0' : ''} ${className}`, context: context, ...rest, children: [title ? (_jsx(Heading, { headingType: "h3", className: `text-center ${description ? 'mb-2.5' : 'mb-8'}`, title: title })) : null, description ? _jsx("div", { className: "mb-9 text-center text-l", children: description }) : null, rowData?.length ? (_jsx(Foldable, { blocks: foldableBlocks, hiddenBlocksNum: hiddenRowsNum, blockWrapper: (children) => (_jsx(Wrapper, { tableArrowScrollControlProps: tableArrowScrollControlProps, children: children })) })) : null] }));
27
+ const rows = (rowData || []).map((row, i, { length }) => (_jsx(TariffsTableRow, { context: context, row: row, isLastRow: i + 1 === length, activeCardIndex: activeCardIndex, rowIdx: i }, String(i))));
28
+ const [visibleRows, hiddenRows] = hiddenRowsNum > 0 ? [rows.slice(0, -hiddenRowsNum), rows.slice(-hiddenRowsNum)] : [rows, []];
29
+ return (_jsxs(BlockWrapper, { className: `bg-white font-sans p-[50px] overflow-hidden text-primary-text relative ${columnsLength > 1 ? 'pr-0' : ''} ${className}`, context: context, ...rest, children: [renderTitle({ title, description }), renderDescription(description), hiddenRowsNum > 0 ? (_jsx(Foldable, { renderFoldableSection: ({ isUnfolded }) => (_jsxs(Wrapper, { tableArrowScrollControlProps: tableArrowScrollControlProps, children: [visibleRows, _jsx(FoldableSection, { isUnfolded: isUnfolded, children: hiddenRows })] })), renderFoldButton: renderDefaultFoldButton })) : (_jsx(Wrapper, { tableArrowScrollControlProps: tableArrowScrollControlProps, children: rows }))] }));
27
30
  });
31
+ function renderTitle({ title, description }) {
32
+ return title ? (_jsx(Heading, { headingType: "h3", className: `text-center ${description ? 'mb-2.5' : 'mb-8'}`, title: title })) : null;
33
+ }
34
+ function renderDescription(description) {
35
+ return description ? _jsx("div", { className: "mb-9 text-center text-l", children: description }) : null;
36
+ }
28
37
  const Wrapper = JSX(({ children, tableArrowScrollControlProps }) => {
29
38
  const { isScrollAvailable } = tableArrowScrollControlProps;
30
39
  return (_jsxs("div", { role: "table", children: [_jsxs("div", { className: "relative", children: [children, _jsx(TableArrowScrollControl, { ...tableArrowScrollControlProps })] }), isScrollAvailable ? (_jsx("div", { className: "absolute top-0 right-0 bottom-0 w-[84px] bg-opacity-to-white" })) : null] }));
@@ -1 +1 @@
1
- {"version":3,"file":"Tariffs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,GAAG,CAEhB,CAAC,EAAE,QAAQ,EAAE,4BAA4B,EAAE,EAAE,EAAE;IAChD,MAAM,EAAE,iBAAiB,EAAE,GAAG,4BAA4B,CAAC;IAE3D,OAAO,CACL,eAAK,IAAI,EAAC,OAAO,aACf,eAAK,SAAS,EAAC,UAAU,aACtB,QAAQ,EACT,KAAC,uBAAuB,OAAK,4BAA4B,GAAI,IACzD,EACL,iBAAiB,CAAC,CAAC,CAAC,CACnB,cAAK,SAAS,EAAC,8DAA8D,GAAG,CACjF,CAAC,CAAC,CAAC,IAAI,IACJ,CACP,CAAC;AACJ,CAAC,CAAC,CAAC"}
@@ -1,6 +1,7 @@
1
1
  import type { BlockDef, Slot, SlotsMap } from './ContentPageDef';
2
2
  export declare const DEFAULT_SLOT_NAME: null;
3
3
  export declare type BlockAncestors = [keyof SlotsMap | typeof DEFAULT_SLOT_NAME, ...Slot[]];
4
+ export declare const DEFAULT_ANCESTORS: BlockAncestors;
4
5
  interface BlockDecoratorProps<VNode> {
5
6
  blockClassName: string;
6
7
  block: BlockDef;
@@ -1,2 +1,3 @@
1
1
  export const DEFAULT_SLOT_NAME = null;
2
+ export const DEFAULT_ANCESTORS = [DEFAULT_SLOT_NAME];
2
3
  //# sourceMappingURL=BlockDecorator.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"BlockDecorator.js","sourceRoot":"","sources":["../../src/model/BlockDecorator.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,iBAAiB,GAAG,IAAI,CAAC"}
1
+ {"version":3,"file":"BlockDecorator.js","sourceRoot":"","sources":["../../src/model/BlockDecorator.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,iBAAiB,GAAG,IAAI,CAAC;AAItC,MAAM,CAAC,MAAM,iBAAiB,GAAmB,CAAC,iBAAiB,CAAC,CAAC"}
@@ -1,5 +1,8 @@
1
1
  import type { UNIComponent } from '@redneckz/uni-jsx';
2
2
  import type { UniBlockProps } from './ContentPageDef';
3
3
  import type { VNode } from './VNode';
4
- export declare type JSXBlock<BlockProps = Record<string, any>> = UNIComponent<BlockProps & UniBlockProps, any, VNode | VNode[]>;
4
+ export declare type JSXBlock<BlockProps = Record<string, any>> = UNIComponent<BlockProps & UniBlockProps, any, VNode | VNode[]> & {
5
+ childrenTypes?: string[];
6
+ renderChild?: (child: VNode, i: number) => VNode;
7
+ };
5
8
  export declare type BlocksRegistry<BlockProps = Record<string, any>> = Record<string, JSXBlock<BlockProps>>;
@@ -0,0 +1,14 @@
1
+ /// <reference types="react" />
2
+ import type { ColorPalette } from '../../model/ContentPageDef';
3
+ import type { IconName } from '../Icon/IconProps';
4
+ import type { FoldablePartProps } from './FoldablePartProps';
5
+ interface DefaultFoldButtonProps {
6
+ className?: string;
7
+ label: string;
8
+ icon: IconName;
9
+ dataTheme?: ColorPalette;
10
+ onClick?: () => void;
11
+ }
12
+ export declare const DefaultFoldButton: import("@redneckz/uni-jsx").UNIComponent<DefaultFoldButtonProps, any, any>;
13
+ export declare const renderDefaultFoldButton: ({ isUnfolded, onToggle }: FoldablePartProps) => JSX.Element;
14
+ export {};
@@ -0,0 +1,13 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "@redneckz/uni-jsx/jsx-runtime";
2
+ import { JSX } from '@redneckz/uni-jsx';
3
+ import { Img } from '../Img/Img.js';
4
+ export const DefaultFoldButton = JSX(({ className, label, icon, dataTheme = '', onClick }) => (_jsxs("button", { className: `border-none bg-primary-main hover:bg-primary-hover px-0 py-5 mb-[1px] w-full font-sans text-white flex justify-center cursor-pointer ${className || ''}`, "data-theme": dataTheme, onClick: onClick, children: [_jsx("span", { className: "text-h4 pr-3", children: label }), icon ? (_jsx(Img, { image: {
5
+ icon,
6
+ iconVersion: 'white',
7
+ }, className: "flex-shrink-0 my-auto", width: "20", height: "20", asSVG: true })) : null] })));
8
+ export const renderDefaultFoldButton = ({ isUnfolded, onToggle }) => {
9
+ const labels = ['Развернуть', 'Скрыть'];
10
+ const icons = ['ArrowDownIcon', 'ArrowUpIcon'];
11
+ return (_jsx(DefaultFoldButton, { icon: icons[Number(isUnfolded)], label: labels[Number(isUnfolded)], onClick: onToggle }));
12
+ };
13
+ //# sourceMappingURL=DefaultFoldButton.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DefaultFoldButton.js","sourceRoot":"","sources":["../../../src/ui-kit/Foldable/DefaultFoldButton.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAGxC,OAAO,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AAWjC,MAAM,CAAC,MAAM,iBAAiB,GAAG,GAAG,CAClC,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,IAAI,EAAE,SAAS,GAAG,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC,CACvD,kBACE,SAAS,EAAE,wIACT,SAAS,IAAI,EACf,EAAE,gBACU,SAAS,EACrB,OAAO,EAAE,OAAO,aAEhB,eAAM,SAAS,EAAC,cAAc,YAAE,KAAK,GAAQ,EAC5C,IAAI,CAAC,CAAC,CAAC,CACN,KAAC,GAAG,IACF,KAAK,EAAE;gBACL,IAAI;gBACJ,WAAW,EAAE,OAAO;aACrB,EACD,SAAS,EAAC,uBAAuB,EACjC,KAAK,EAAC,IAAI,EACV,MAAM,EAAC,IAAI,EACX,KAAK,SACL,CACH,CAAC,CAAC,CAAC,IAAI,IACD,CACV,CACF,CAAC;AAEF,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,EAAE,UAAU,EAAE,QAAQ,EAAqB,EAAE,EAAE;IACrF,MAAM,MAAM,GAAG,CAAC,YAAY,EAAE,QAAQ,CAAC,CAAC;IACxC,MAAM,KAAK,GAAe,CAAC,eAAe,EAAE,aAAa,CAAC,CAAC;IAE3D,OAAO,CACL,KAAC,iBAAiB,IAChB,IAAI,EAAE,KAAK,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC,EAC/B,KAAK,EAAE,MAAM,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC,EACjC,OAAO,EAAE,QAAQ,GACjB,CACH,CAAC;AACJ,CAAC,CAAC"}
@@ -1,16 +1,9 @@
1
1
  import type { VNode } from '../../model/VNode';
2
- interface RenderFoldButtonProps {
3
- isUnfolded: boolean;
4
- onToggle: () => void;
5
- }
2
+ import type { FoldablePartProps } from './FoldablePartProps';
6
3
  export interface FoldableProps {
7
- blocks?: VNode[];
8
- hiddenBlocksNum?: number;
9
4
  unfoldedByDefault?: boolean;
10
5
  isFoldButtonOnTop?: boolean;
11
- containerClassName?: string;
12
- blockWrapper?: (children: VNode) => VNode;
13
- renderFoldButton?: (props: RenderFoldButtonProps) => VNode;
6
+ renderFoldableSection: (props: FoldablePartProps) => VNode;
7
+ renderFoldButton?: (props: FoldablePartProps) => VNode;
14
8
  }
15
9
  export declare const Foldable: import("@redneckz/uni-jsx").UNIComponent<FoldableProps, any, any>;
16
- export {};
@@ -1,29 +1,13 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "@redneckz/uni-jsx/jsx-runtime";
1
+ import { jsxs as _jsxs } from "@redneckz/uni-jsx/jsx-runtime";
2
2
  import { JSX } from '@redneckz/uni-jsx';
3
- import { useRef, useState } from '@redneckz/uni-jsx/lib/hooks';
4
- import { clamp } from '../../utils/clamp.js';
5
- import { DefaultButton } from './DefaultButton.js';
6
- export const Foldable = JSX(({ blocks = [], hiddenBlocksNum = 0, isFoldButtonOnTop = false, unfoldedByDefault = false, containerClassName = '', blockWrapper = (_) => _, renderFoldButton = renderDefaultFoldButton, }) => {
3
+ import { useCallback, useState } from '@redneckz/uni-jsx/lib/hooks';
4
+ export const Foldable = JSX(({ isFoldButtonOnTop = false, unfoldedByDefault = false, renderFoldableSection, renderFoldButton, }) => {
7
5
  const [isUnfolded, setIsUnfolded] = useState(unfoldedByDefault);
8
- const blocksToHide = clamp(hiddenBlocksNum, 0, blocks?.length);
9
- const visibleBlocks = blocks.slice(0, blocks.length - blocksToHide);
10
- const hiddenBlocks = blocksToHide > 0 ? blocks.slice(-blocksToHide) : [];
11
- const containerRef = useRef(null);
12
- const onToggle = () => {
13
- setIsUnfolded(!isUnfolded);
14
- if (containerRef.current) {
15
- containerRef.current.style.maxHeight = isUnfolded
16
- ? ''
17
- : `${containerRef.current.scrollHeight}px`;
18
- }
19
- };
20
- const buttonNode = hiddenBlocksNum ? renderFoldButton({ isUnfolded, onToggle }) : null;
21
- const blocksNode = blockWrapper(_jsxs("div", { children: [visibleBlocks, _jsx("div", { ref: containerRef, className: `transition-max-h duration-300 overflow-hidden max-h-0 ${containerClassName}`, children: hiddenBlocks })] }));
22
- return (_jsx("div", { children: isFoldButtonOnTop ? (_jsxs("div", { children: [buttonNode, blocksNode] })) : (_jsxs("div", { children: [blocksNode, buttonNode] })) }));
6
+ const onToggle = useCallback(() => {
7
+ setIsUnfolded((_) => !_);
8
+ }, []);
9
+ const sectionNode = renderFoldableSection({ isUnfolded, onToggle });
10
+ const buttonNode = renderFoldButton ? renderFoldButton({ isUnfolded, onToggle }) : null;
11
+ return isFoldButtonOnTop ? (_jsxs("div", { children: [buttonNode, sectionNode] })) : (_jsxs("div", { children: [sectionNode, buttonNode] }));
23
12
  });
24
- const renderDefaultFoldButton = (props) => {
25
- const labels = ['Развернуть', 'Скрыть'];
26
- const icons = ['ArrowDownIcon', 'ArrowUpIcon'];
27
- return (_jsx(DefaultButton, { icon: icons[Number(props.isUnfolded)], label: labels[Number(props.isUnfolded)], onClick: props.onToggle }));
28
- };
29
13
  //# sourceMappingURL=Foldable.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Foldable.js","sourceRoot":"","sources":["../../../src/ui-kit/Foldable/Foldable.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AACxC,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AAE/D,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAE1C,OAAO,EAAE,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C,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;IAC3B,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,MAAM,WAAW,GAAG,qBAAqB,CAAC,EAAE,UAAU,EAAE,QAAQ,EAAE,CAAC,CAAC;IACpE,MAAM,UAAU,GAAG,gBAAgB,CAAC,CAAC,CAAC,gBAAgB,CAAC,EAAE,UAAU,EAAE,QAAQ,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;IAExF,OAAO,iBAAiB,CAAC,CAAC,CAAC,CACzB,0BACG,UAAU,EACV,WAAW,IACR,CACP,CAAC,CAAC,CAAC,CACF,0BACG,WAAW,EACX,UAAU,IACP,CACP,CAAC;AACJ,CAAC,CACF,CAAC"}
@@ -0,0 +1,4 @@
1
+ export interface FoldablePartProps {
2
+ isUnfolded: boolean;
3
+ onToggle?: () => void;
4
+ }
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=FoldablePartProps.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FoldablePartProps.js","sourceRoot":"","sources":["../../../src/ui-kit/Foldable/FoldablePartProps.ts"],"names":[],"mappings":""}
@@ -0,0 +1,5 @@
1
+ export interface FoldableSectionProps {
2
+ className?: string;
3
+ isUnfolded?: boolean;
4
+ }
5
+ export declare const FoldableSection: import("@redneckz/uni-jsx").UNIComponent<FoldableSectionProps, any, any>;
@@ -0,0 +1,15 @@
1
+ import { jsx as _jsx } from "@redneckz/uni-jsx/jsx-runtime";
2
+ import { JSX } from '@redneckz/uni-jsx';
3
+ import { useEffect, useRef } from '@redneckz/uni-jsx/lib/hooks';
4
+ export const FoldableSection = JSX(({ className = '', isUnfolded, children }) => {
5
+ const containerRef = useRef(null);
6
+ useEffect(() => {
7
+ if (containerRef.current) {
8
+ containerRef.current.style.maxHeight = isUnfolded
9
+ ? `${containerRef.current.scrollHeight}px`
10
+ : '';
11
+ }
12
+ }, [isUnfolded, children?.length]);
13
+ return (_jsx("div", { ref: containerRef, className: `transition-max-h duration-300 overflow-hidden max-h-0 ${className}`, children: children }));
14
+ });
15
+ //# sourceMappingURL=FoldableSection.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FoldableSection.js","sourceRoot":"","sources":["../../../src/ui-kit/Foldable/FoldableSection.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AACxC,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,6BAA6B,CAAC;AAOhE,MAAM,CAAC,MAAM,eAAe,GAAG,GAAG,CAChC,CAAC,EAAE,SAAS,GAAG,EAAE,EAAE,UAAU,EAAE,QAAQ,EAAE,EAAE,EAAE;IAC3C,MAAM,YAAY,GAAG,MAAM,CAAwB,IAAI,CAAC,CAAC;IAEzD,SAAS,CAAC,GAAG,EAAE;QACb,IAAI,YAAY,CAAC,OAAO,EAAE;YACxB,YAAY,CAAC,OAAO,CAAC,KAAK,CAAC,SAAS,GAAG,UAAU;gBAC/C,CAAC,CAAC,GAAG,YAAY,CAAC,OAAO,CAAC,YAAY,IAAI;gBAC1C,CAAC,CAAC,EAAE,CAAC;SACR;IACH,CAAC,EAAE,CAAC,UAAU,EAAE,QAAQ,EAAE,MAAM,CAAC,CAAC,CAAC;IAEnC,OAAO,CACL,cACE,GAAG,EAAE,YAAY,EACjB,SAAS,EAAE,yDAAyD,SAAS,EAAE,YAE9E,QAAQ,GACL,CACP,CAAC;AACJ,CAAC,CACF,CAAC"}