@redneckz/wildless-cms-uni-blocks 0.3.61 → 0.3.63

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 (437) hide show
  1. package/bundle/blocks.schema.json +1 -1
  2. package/bundle/bundle.umd.js +100 -39
  3. package/bundle/bundle.umd.min.js +1 -1
  4. package/cosmos-static/icons/AirPlane.svg +1 -0
  5. package/cosmos-static/icons/CarIcon.svg +1 -0
  6. package/cosmos-static/icons/CinemaIcon.svg +1 -0
  7. package/cosmos-static/icons/DocsIcon.svg +1 -0
  8. package/cosmos-static/icons/PowerIcon.svg +1 -0
  9. package/cosmos-static/icons/PumpkinIcon.svg +1 -0
  10. package/cosmos-static/icons/SoundIcon.svg +1 -0
  11. package/cosmos-static/icons/WateringCan.svg +1 -0
  12. package/dist/components/Accordion/Accordion.js +7 -2
  13. package/dist/components/Accordion/Accordion.js.map +1 -1
  14. package/dist/components/Accordion/AccordionContent.d.ts +3 -0
  15. package/dist/components/BaseTile/BaseTileProps.d.ts +1 -9
  16. package/dist/components/BenefitsBlock/BenefitsBlock.js +3 -3
  17. package/dist/components/BenefitsBlock/BenefitsBlock.js.map +1 -1
  18. package/dist/components/BlockContent.d.ts +2 -1
  19. package/dist/components/Blocks.d.ts +1 -0
  20. package/dist/components/Blocks.js +2 -0
  21. package/dist/components/Blocks.js.map +1 -1
  22. package/dist/components/BonusBenefitsBlock/BonusBenefitsBlock.d.ts +5 -0
  23. package/dist/components/BonusBenefitsBlock/BonusBenefitsBlock.js +14 -0
  24. package/dist/components/BonusBenefitsBlock/BonusBenefitsBlock.js.map +1 -0
  25. package/dist/components/BonusBenefitsBlock/BonusBenefitsBlockContent.d.ts +21 -0
  26. package/dist/components/BonusBenefitsBlock/BonusBenefitsBlockContent.js +2 -0
  27. package/dist/components/BonusBenefitsBlock/BonusBenefitsBlockContent.js.map +1 -0
  28. package/dist/components/BonusBenefitsBlock/getElementsColsValue.d.ts +1 -0
  29. package/dist/components/BonusBenefitsBlock/getElementsColsValue.js +17 -0
  30. package/dist/components/BonusBenefitsBlock/getElementsColsValue.js.map +1 -0
  31. package/dist/components/ComparisonTable/ComparisonTable.mobile.js +1 -1
  32. package/dist/components/ComparisonTable/ComparisonTable.mobile.js.map +1 -1
  33. package/dist/components/ComparisonTable/HeaderCell.mobile.js +1 -1
  34. package/dist/components/ComparisonTable/HeaderCell.mobile.js.map +1 -1
  35. package/dist/components/ComparisonTable/TableCell.js +1 -1
  36. package/dist/components/ComparisonTable/TableCell.js.map +1 -1
  37. package/dist/components/ComparisonTable/TableCell.mobile.js +1 -1
  38. package/dist/components/ComparisonTable/TableCell.mobile.js.map +1 -1
  39. package/dist/components/ContentPage/ContentPage.js +1 -1
  40. package/dist/components/ContentPage/ContentPage.js.map +1 -1
  41. package/dist/components/Gallery/GalleryInner.js +1 -1
  42. package/dist/components/Gallery/GalleryInner.js.map +1 -1
  43. package/dist/components/Headline/Headline.js +1 -1
  44. package/dist/components/Headline/Headline.js.map +1 -1
  45. package/dist/components/Headline/Headline.mobile.js +1 -1
  46. package/dist/components/Headline/Headline.mobile.js.map +1 -1
  47. package/dist/components/Headline/HeadlineContent.d.ts +1 -1
  48. package/dist/components/Headline/constants.d.ts +1 -1
  49. package/dist/components/LinkDocs/LinkDocsContent.d.ts +1 -1
  50. package/dist/components/MobileAppTile/MobileAppTile.js +1 -1
  51. package/dist/components/MobileAppTile/MobileAppTile.js.map +1 -1
  52. package/dist/components/OtherProducts/OtherProductsContent.d.ts +1 -1
  53. package/dist/components/OtherProducts/OtherProductsItem.d.ts +1 -2
  54. package/dist/components/OtherProducts/OtherProductsItem.js +10 -7
  55. package/dist/components/OtherProducts/OtherProductsItem.js.map +1 -1
  56. package/dist/components/ProductBlock/ProductBlockInner.js +2 -2
  57. package/dist/components/ProductBlock/ProductBlockInner.js.map +1 -1
  58. package/dist/components/ProductBlock/ProductBlockInner.mobile.js +1 -1
  59. package/dist/components/ProductBlock/ProductBlockInner.mobile.js.map +1 -1
  60. package/dist/components/ProductTile/ProductTile.js +1 -1
  61. package/dist/components/ProductTile/ProductTile.js.map +1 -1
  62. package/dist/components/Recommendation/Recommendation.js +1 -1
  63. package/dist/components/Recommendation/Recommendation.js.map +1 -1
  64. package/dist/components/StepsBlock/StepsBlock.mobile.js +2 -2
  65. package/dist/components/StepsBlock/StepsBlock.mobile.js.map +1 -1
  66. package/dist/components/TariffsTable/TariffsTable.js +8 -3
  67. package/dist/components/TariffsTable/TariffsTable.js.map +1 -1
  68. package/dist/components/TariffsTable/TariffsTableContent.d.ts +7 -5
  69. package/dist/components/TextBlock/TextBlock.js +1 -1
  70. package/dist/components/TextBlock/TextBlock.js.map +1 -1
  71. package/dist/components/Tile/Tile.js +2 -2
  72. package/dist/components/Tile/Tile.js.map +1 -1
  73. package/dist/icons/IconName.d.ts +22 -6
  74. package/dist/icons/IconName.js +18 -2
  75. package/dist/icons/IconName.js.map +1 -1
  76. package/dist/model/AlignType.d.ts +9 -0
  77. package/dist/model/AlignType.js +2 -0
  78. package/dist/model/AlignType.js.map +1 -0
  79. package/dist/model/VNode.d.ts +1 -0
  80. package/dist/model/VNode.js +2 -0
  81. package/dist/model/VNode.js.map +1 -0
  82. package/dist/ui-kit/Foldable/Foldable.d.ts +20 -0
  83. package/dist/ui-kit/Foldable/Foldable.js +22 -0
  84. package/dist/ui-kit/Foldable/Foldable.js.map +1 -0
  85. package/dist/ui-kit/Foldable/useActiveHandler.d.ts +11 -0
  86. package/dist/ui-kit/Foldable/useActiveHandler.js +22 -0
  87. package/dist/ui-kit/Foldable/useActiveHandler.js.map +1 -0
  88. package/dist/ui-kit/Logo/Logo.mobile.js +1 -1
  89. package/dist/ui-kit/Logo/Logo.mobile.js.map +1 -1
  90. package/dist/ui-kit/SearchBar/SearchBar.js +1 -1
  91. package/dist/ui-kit/SearchBar/SearchBar.js.map +1 -1
  92. package/dist/ui-kit/SearchBar/SearchBar.mobile.js +1 -1
  93. package/dist/ui-kit/SearchBar/SearchBar.mobile.js.map +1 -1
  94. package/dist/ui-kit/SearchBar.mobile.js +1 -1
  95. package/dist/ui-kit/SearchBar.mobile.js.map +1 -1
  96. package/lib/common.css +1 -1
  97. package/lib/components/Accordion/Accordion.fixture.d.ts +1 -0
  98. package/lib/components/Accordion/Accordion.js +7 -2
  99. package/lib/components/Accordion/Accordion.js.map +1 -1
  100. package/lib/components/Accordion/AccordionContent.d.ts +3 -0
  101. package/lib/components/BaseTile/BaseTileProps.d.ts +1 -9
  102. package/lib/components/BenefitsBlock/BenefitsBlock.js +3 -3
  103. package/lib/components/BenefitsBlock/BenefitsBlock.js.map +1 -1
  104. package/lib/components/BlockContent.d.ts +2 -1
  105. package/lib/components/Blocks.d.ts +1 -0
  106. package/lib/components/Blocks.js +2 -0
  107. package/lib/components/Blocks.js.map +1 -1
  108. package/lib/components/BonusBenefitsBlock/BonusBenefitsBlock.d.ts +5 -0
  109. package/lib/components/BonusBenefitsBlock/BonusBenefitsBlock.fixture.d.ts +4 -0
  110. package/lib/components/BonusBenefitsBlock/BonusBenefitsBlock.js +12 -0
  111. package/lib/components/BonusBenefitsBlock/BonusBenefitsBlock.js.map +1 -0
  112. package/lib/components/BonusBenefitsBlock/BonusBenefitsBlockContent.d.ts +21 -0
  113. package/lib/components/BonusBenefitsBlock/BonusBenefitsBlockContent.js +2 -0
  114. package/lib/components/BonusBenefitsBlock/BonusBenefitsBlockContent.js.map +1 -0
  115. package/lib/components/BonusBenefitsBlock/getElementsColsValue.d.ts +1 -0
  116. package/lib/components/BonusBenefitsBlock/getElementsColsValue.js +14 -0
  117. package/lib/components/BonusBenefitsBlock/getElementsColsValue.js.map +1 -0
  118. package/lib/components/ComparisonTable/ComparisonTable.mobile.js +1 -1
  119. package/lib/components/ComparisonTable/ComparisonTable.mobile.js.map +1 -1
  120. package/lib/components/ComparisonTable/HeaderCell.mobile.js +1 -1
  121. package/lib/components/ComparisonTable/HeaderCell.mobile.js.map +1 -1
  122. package/lib/components/ComparisonTable/TableCell.js +1 -1
  123. package/lib/components/ComparisonTable/TableCell.js.map +1 -1
  124. package/lib/components/ComparisonTable/TableCell.mobile.js +1 -1
  125. package/lib/components/ComparisonTable/TableCell.mobile.js.map +1 -1
  126. package/lib/components/ContentPage/ContentPage.js +1 -1
  127. package/lib/components/ContentPage/ContentPage.js.map +1 -1
  128. package/lib/components/Gallery/GalleryInner.js +1 -1
  129. package/lib/components/Gallery/GalleryInner.js.map +1 -1
  130. package/lib/components/Headline/Headline.js +1 -1
  131. package/lib/components/Headline/Headline.js.map +1 -1
  132. package/lib/components/Headline/Headline.mobile.js +1 -1
  133. package/lib/components/Headline/Headline.mobile.js.map +1 -1
  134. package/lib/components/Headline/HeadlineContent.d.ts +1 -1
  135. package/lib/components/Headline/constants.d.ts +1 -1
  136. package/lib/components/LinkDocs/LinkDocsContent.d.ts +1 -1
  137. package/lib/components/MobileAppTile/MobileAppTile.js +1 -1
  138. package/lib/components/MobileAppTile/MobileAppTile.js.map +1 -1
  139. package/lib/components/OtherProducts/OtherProductsContent.d.ts +1 -1
  140. package/lib/components/OtherProducts/OtherProductsItem.d.ts +1 -2
  141. package/lib/components/OtherProducts/OtherProductsItem.js +11 -8
  142. package/lib/components/OtherProducts/OtherProductsItem.js.map +1 -1
  143. package/lib/components/ProductBlock/ProductBlockInner.js +2 -2
  144. package/lib/components/ProductBlock/ProductBlockInner.js.map +1 -1
  145. package/lib/components/ProductBlock/ProductBlockInner.mobile.js +1 -1
  146. package/lib/components/ProductBlock/ProductBlockInner.mobile.js.map +1 -1
  147. package/lib/components/ProductTile/ProductTile.js +1 -1
  148. package/lib/components/ProductTile/ProductTile.js.map +1 -1
  149. package/lib/components/Recommendation/Recommendation.js +1 -1
  150. package/lib/components/Recommendation/Recommendation.js.map +1 -1
  151. package/lib/components/StepsBlock/StepsBlock.mobile.js +2 -2
  152. package/lib/components/StepsBlock/StepsBlock.mobile.js.map +1 -1
  153. package/lib/components/TariffsTable/TariffsTable.js +8 -3
  154. package/lib/components/TariffsTable/TariffsTable.js.map +1 -1
  155. package/lib/components/TariffsTable/TariffsTableContent.d.ts +7 -5
  156. package/lib/components/TextBlock/TextBlock.js +1 -1
  157. package/lib/components/TextBlock/TextBlock.js.map +1 -1
  158. package/lib/components/Tile/Tile.js +2 -2
  159. package/lib/components/Tile/Tile.js.map +1 -1
  160. package/lib/icons/IconName.d.ts +22 -6
  161. package/lib/icons/IconName.js +18 -2
  162. package/lib/icons/IconName.js.map +1 -1
  163. package/lib/model/AlignType.d.ts +9 -0
  164. package/lib/model/AlignType.js +2 -0
  165. package/lib/model/AlignType.js.map +1 -0
  166. package/lib/model/VNode.d.ts +1 -0
  167. package/lib/model/VNode.js +2 -0
  168. package/lib/model/VNode.js.map +1 -0
  169. package/lib/ui-kit/Foldable/Foldable.d.ts +20 -0
  170. package/lib/ui-kit/Foldable/Foldable.js +20 -0
  171. package/lib/ui-kit/Foldable/Foldable.js.map +1 -0
  172. package/lib/ui-kit/Foldable/useActiveHandler.d.ts +11 -0
  173. package/lib/ui-kit/Foldable/useActiveHandler.js +19 -0
  174. package/lib/ui-kit/Foldable/useActiveHandler.js.map +1 -0
  175. package/lib/ui-kit/Logo/Logo.mobile.js +1 -1
  176. package/lib/ui-kit/Logo/Logo.mobile.js.map +1 -1
  177. package/lib/ui-kit/SearchBar/SearchBar.js +1 -1
  178. package/lib/ui-kit/SearchBar/SearchBar.js.map +1 -1
  179. package/lib/ui-kit/SearchBar/SearchBar.mobile.js +1 -1
  180. package/lib/ui-kit/SearchBar/SearchBar.mobile.js.map +1 -1
  181. package/lib/ui-kit/SearchBar.mobile.js +1 -1
  182. package/lib/ui-kit/SearchBar.mobile.js.map +1 -1
  183. package/mobile/bundle/bundle.umd.js +28 -12
  184. package/mobile/bundle/bundle.umd.min.js +1 -1
  185. package/mobile/dist/components/Accordion/AccordionContent.d.ts +3 -0
  186. package/mobile/dist/components/BaseTile/BaseTileProps.d.ts +1 -9
  187. package/mobile/dist/components/BenefitsBlock/BenefitsBlock.js +3 -3
  188. package/mobile/dist/components/BenefitsBlock/BenefitsBlock.js.map +1 -1
  189. package/mobile/dist/components/BlockContent.d.ts +2 -1
  190. package/mobile/dist/components/BonusBenefitsBlock/BonusBenefitsBlock.d.ts +5 -0
  191. package/mobile/dist/components/BonusBenefitsBlock/BonusBenefitsBlock.js +14 -0
  192. package/mobile/dist/components/BonusBenefitsBlock/BonusBenefitsBlock.js.map +1 -0
  193. package/mobile/dist/components/BonusBenefitsBlock/BonusBenefitsBlockContent.d.ts +21 -0
  194. package/mobile/dist/components/BonusBenefitsBlock/BonusBenefitsBlockContent.js +2 -0
  195. package/mobile/dist/components/BonusBenefitsBlock/BonusBenefitsBlockContent.js.map +1 -0
  196. package/mobile/dist/components/BonusBenefitsBlock/getElementsColsValue.d.ts +1 -0
  197. package/mobile/dist/components/BonusBenefitsBlock/getElementsColsValue.js +17 -0
  198. package/mobile/dist/components/BonusBenefitsBlock/getElementsColsValue.js.map +1 -0
  199. package/mobile/dist/components/ComparisonTable/ComparisonTable.js +1 -1
  200. package/mobile/dist/components/ComparisonTable/ComparisonTable.js.map +1 -1
  201. package/mobile/dist/components/ComparisonTable/HeaderCell.js +1 -1
  202. package/mobile/dist/components/ComparisonTable/HeaderCell.js.map +1 -1
  203. package/mobile/dist/components/ComparisonTable/TableCell.js +1 -1
  204. package/mobile/dist/components/ComparisonTable/TableCell.js.map +1 -1
  205. package/mobile/dist/components/ContentPage/ContentPage.js +1 -1
  206. package/mobile/dist/components/ContentPage/ContentPage.js.map +1 -1
  207. package/mobile/dist/components/Gallery/GalleryInner.js +1 -1
  208. package/mobile/dist/components/Gallery/GalleryInner.js.map +1 -1
  209. package/mobile/dist/components/Headline/Headline.js +1 -1
  210. package/mobile/dist/components/Headline/Headline.js.map +1 -1
  211. package/mobile/dist/components/Headline/HeadlineContent.d.ts +1 -1
  212. package/mobile/dist/components/Headline/constants.d.ts +1 -1
  213. package/mobile/dist/components/LinkDocs/LinkDocsContent.d.ts +1 -1
  214. package/mobile/dist/components/OtherProducts/OtherProductsContent.d.ts +1 -1
  215. package/mobile/dist/components/OtherProducts/OtherProductsItem.d.ts +1 -2
  216. package/mobile/dist/components/OtherProducts/OtherProductsItem.js +10 -7
  217. package/mobile/dist/components/OtherProducts/OtherProductsItem.js.map +1 -1
  218. package/mobile/dist/components/ProductBlock/ProductBlockInner.js +1 -1
  219. package/mobile/dist/components/ProductBlock/ProductBlockInner.js.map +1 -1
  220. package/mobile/dist/components/ProductTile/ProductTile.js +1 -1
  221. package/mobile/dist/components/ProductTile/ProductTile.js.map +1 -1
  222. package/mobile/dist/components/Recommendation/Recommendation.js +1 -1
  223. package/mobile/dist/components/Recommendation/Recommendation.js.map +1 -1
  224. package/mobile/dist/components/StepsBlock/StepsBlock.js +2 -2
  225. package/mobile/dist/components/StepsBlock/StepsBlock.js.map +1 -1
  226. package/mobile/dist/components/TariffsTable/TariffsTableContent.d.ts +7 -5
  227. package/mobile/dist/components/Tile/Tile.js +2 -2
  228. package/mobile/dist/components/Tile/Tile.js.map +1 -1
  229. package/mobile/dist/icons/IconName.d.ts +22 -6
  230. package/mobile/dist/icons/IconName.js +18 -2
  231. package/mobile/dist/icons/IconName.js.map +1 -1
  232. package/mobile/dist/model/AlignType.d.ts +9 -0
  233. package/mobile/dist/model/AlignType.js +2 -0
  234. package/mobile/dist/model/AlignType.js.map +1 -0
  235. package/mobile/dist/model/VNode.d.ts +1 -0
  236. package/mobile/dist/model/VNode.js +2 -0
  237. package/mobile/dist/model/VNode.js.map +1 -0
  238. package/mobile/dist/ui-kit/Foldable/Foldable.d.ts +20 -0
  239. package/mobile/dist/ui-kit/Foldable/Foldable.js +22 -0
  240. package/mobile/dist/ui-kit/Foldable/Foldable.js.map +1 -0
  241. package/mobile/dist/ui-kit/Foldable/useActiveHandler.d.ts +11 -0
  242. package/mobile/dist/ui-kit/Foldable/useActiveHandler.js +22 -0
  243. package/mobile/dist/ui-kit/Foldable/useActiveHandler.js.map +1 -0
  244. package/mobile/dist/ui-kit/Logo/Logo.js +1 -1
  245. package/mobile/dist/ui-kit/Logo/Logo.js.map +1 -1
  246. package/mobile/dist/ui-kit/SearchBar/SearchBar.js +1 -1
  247. package/mobile/dist/ui-kit/SearchBar/SearchBar.js.map +1 -1
  248. package/mobile/lib/components/Accordion/AccordionContent.d.ts +3 -0
  249. package/mobile/lib/components/BaseTile/BaseTileProps.d.ts +1 -9
  250. package/mobile/lib/components/BenefitsBlock/BenefitsBlock.js +3 -3
  251. package/mobile/lib/components/BenefitsBlock/BenefitsBlock.js.map +1 -1
  252. package/mobile/lib/components/BlockContent.d.ts +2 -1
  253. package/mobile/lib/components/BonusBenefitsBlock/BonusBenefitsBlock.d.ts +5 -0
  254. package/mobile/lib/components/BonusBenefitsBlock/BonusBenefitsBlock.js +12 -0
  255. package/mobile/lib/components/BonusBenefitsBlock/BonusBenefitsBlock.js.map +1 -0
  256. package/mobile/lib/components/BonusBenefitsBlock/BonusBenefitsBlockContent.d.ts +21 -0
  257. package/mobile/lib/components/BonusBenefitsBlock/BonusBenefitsBlockContent.js +2 -0
  258. package/mobile/lib/components/BonusBenefitsBlock/BonusBenefitsBlockContent.js.map +1 -0
  259. package/mobile/lib/components/BonusBenefitsBlock/getElementsColsValue.d.ts +1 -0
  260. package/mobile/lib/components/BonusBenefitsBlock/getElementsColsValue.js +14 -0
  261. package/mobile/lib/components/BonusBenefitsBlock/getElementsColsValue.js.map +1 -0
  262. package/mobile/lib/components/ComparisonTable/ComparisonTable.js +1 -1
  263. package/mobile/lib/components/ComparisonTable/ComparisonTable.js.map +1 -1
  264. package/mobile/lib/components/ComparisonTable/HeaderCell.js +1 -1
  265. package/mobile/lib/components/ComparisonTable/HeaderCell.js.map +1 -1
  266. package/mobile/lib/components/ComparisonTable/TableCell.js +1 -1
  267. package/mobile/lib/components/ComparisonTable/TableCell.js.map +1 -1
  268. package/mobile/lib/components/ContentPage/ContentPage.js +1 -1
  269. package/mobile/lib/components/ContentPage/ContentPage.js.map +1 -1
  270. package/mobile/lib/components/Gallery/GalleryInner.js +1 -1
  271. package/mobile/lib/components/Gallery/GalleryInner.js.map +1 -1
  272. package/mobile/lib/components/Headline/Headline.js +1 -1
  273. package/mobile/lib/components/Headline/Headline.js.map +1 -1
  274. package/mobile/lib/components/Headline/HeadlineContent.d.ts +1 -1
  275. package/mobile/lib/components/Headline/constants.d.ts +1 -1
  276. package/mobile/lib/components/LinkDocs/LinkDocsContent.d.ts +1 -1
  277. package/mobile/lib/components/OtherProducts/OtherProductsContent.d.ts +1 -1
  278. package/mobile/lib/components/OtherProducts/OtherProductsItem.d.ts +1 -2
  279. package/mobile/lib/components/OtherProducts/OtherProductsItem.js +11 -8
  280. package/mobile/lib/components/OtherProducts/OtherProductsItem.js.map +1 -1
  281. package/mobile/lib/components/ProductBlock/ProductBlockInner.js +1 -1
  282. package/mobile/lib/components/ProductBlock/ProductBlockInner.js.map +1 -1
  283. package/mobile/lib/components/ProductTile/ProductTile.js +1 -1
  284. package/mobile/lib/components/ProductTile/ProductTile.js.map +1 -1
  285. package/mobile/lib/components/Recommendation/Recommendation.js +1 -1
  286. package/mobile/lib/components/Recommendation/Recommendation.js.map +1 -1
  287. package/mobile/lib/components/StepsBlock/StepsBlock.js +2 -2
  288. package/mobile/lib/components/StepsBlock/StepsBlock.js.map +1 -1
  289. package/mobile/lib/components/TariffsTable/TariffsTableContent.d.ts +7 -5
  290. package/mobile/lib/components/Tile/Tile.js +2 -2
  291. package/mobile/lib/components/Tile/Tile.js.map +1 -1
  292. package/mobile/lib/icons/IconName.d.ts +22 -6
  293. package/mobile/lib/icons/IconName.js +18 -2
  294. package/mobile/lib/icons/IconName.js.map +1 -1
  295. package/mobile/lib/model/AlignType.d.ts +9 -0
  296. package/mobile/lib/model/AlignType.js +2 -0
  297. package/mobile/lib/model/AlignType.js.map +1 -0
  298. package/mobile/lib/model/VNode.d.ts +1 -0
  299. package/mobile/lib/model/VNode.js +2 -0
  300. package/mobile/lib/model/VNode.js.map +1 -0
  301. package/mobile/lib/ui-kit/Foldable/Foldable.d.ts +20 -0
  302. package/mobile/lib/ui-kit/Foldable/Foldable.js +20 -0
  303. package/mobile/lib/ui-kit/Foldable/Foldable.js.map +1 -0
  304. package/mobile/lib/ui-kit/Foldable/useActiveHandler.d.ts +11 -0
  305. package/mobile/lib/ui-kit/Foldable/useActiveHandler.js +19 -0
  306. package/mobile/lib/ui-kit/Foldable/useActiveHandler.js.map +1 -0
  307. package/mobile/lib/ui-kit/Logo/Logo.js +1 -1
  308. package/mobile/lib/ui-kit/Logo/Logo.js.map +1 -1
  309. package/mobile/lib/ui-kit/SearchBar/SearchBar.js +1 -1
  310. package/mobile/lib/ui-kit/SearchBar/SearchBar.js.map +1 -1
  311. package/mobile/src/components/Accordion/AccordionContent.ts +3 -0
  312. package/mobile/src/components/BaseTile/BaseTileProps.ts +1 -10
  313. package/mobile/src/components/BenefitsBlock/BenefitsBlock.tsx +6 -8
  314. package/mobile/src/components/BlockContent.ts +3 -1
  315. package/mobile/src/components/BonusBenefitsBlock/BonusBenefitsBlock.example.json +54 -0
  316. package/mobile/src/components/BonusBenefitsBlock/BonusBenefitsBlock.tsx +49 -0
  317. package/mobile/src/components/BonusBenefitsBlock/BonusBenefitsBlockContent.ts +23 -0
  318. package/mobile/src/components/BonusBenefitsBlock/getElementsColsValue.ts +12 -0
  319. package/mobile/src/components/ComparisonTable/ComparisonTable.tsx +2 -2
  320. package/mobile/src/components/ComparisonTable/HeaderCell.tsx +4 -4
  321. package/mobile/src/components/ComparisonTable/TableCell.tsx +4 -4
  322. package/mobile/src/components/ContentPage/ContentPage.tsx +2 -2
  323. package/mobile/src/components/Gallery/GalleryInner.tsx +4 -4
  324. package/mobile/src/components/Headline/Headline.tsx +4 -4
  325. package/mobile/src/components/Headline/HeadlineContent.ts +1 -1
  326. package/mobile/src/components/Headline/constants.ts +1 -1
  327. package/mobile/src/components/LinkDocs/LinkDocsContent.ts +1 -1
  328. package/mobile/src/components/OtherProducts/OtherProductsContent.ts +1 -1
  329. package/mobile/src/components/OtherProducts/OtherProductsItem.tsx +33 -23
  330. package/mobile/src/components/ProductBlock/ProductBlockInner.tsx +2 -2
  331. package/mobile/src/components/ProductTile/ProductTile.tsx +2 -2
  332. package/mobile/src/components/Recommendation/Recommendation.tsx +4 -4
  333. package/mobile/src/components/StepsBlock/StepsBlock.tsx +9 -9
  334. package/mobile/src/components/TariffsTable/TariffsTableContent.ts +7 -5
  335. package/mobile/src/components/Tile/Tile.tsx +4 -4
  336. package/mobile/src/icons/AirPlane.svg +98 -0
  337. package/mobile/src/icons/ArrowUpIcon.svg +1 -1
  338. package/mobile/src/icons/ArrowsRewindRight.svg +1 -1
  339. package/mobile/src/icons/CarIcon.svg +466 -0
  340. package/mobile/src/icons/CinemaIcon.svg +274 -0
  341. package/mobile/src/icons/DocsIcon.svg +238 -0
  342. package/mobile/src/icons/IconName.ts +4 -4
  343. package/mobile/src/icons/PowerIcon.svg +135 -0
  344. package/mobile/src/icons/PumpkinIcon.svg +236 -0
  345. package/mobile/src/icons/SoundIcon.svg +113 -0
  346. package/mobile/src/icons/WateringCan.svg +497 -0
  347. package/mobile/src/model/AlignType.ts +9 -0
  348. package/mobile/src/model/VNode.ts +1 -0
  349. package/mobile/src/ui-kit/Foldable/Foldable.tsx +81 -0
  350. package/mobile/src/ui-kit/Foldable/useActiveHandler.ts +34 -0
  351. package/mobile/src/ui-kit/Logo/Logo.tsx +1 -1
  352. package/mobile/src/ui-kit/SearchBar/SearchBar.tsx +1 -1
  353. package/package.json +1 -1
  354. package/src/components/Accordion/Accordion.fixture.tsx +24 -2
  355. package/src/components/Accordion/Accordion.tsx +23 -2
  356. package/src/components/Accordion/AccordionContent.ts +3 -0
  357. package/src/components/BaseTile/BaseTileProps.ts +1 -10
  358. package/src/components/BenefitsBlock/BenefitsBlock.tsx +6 -8
  359. package/src/components/BlockContent.ts +3 -1
  360. package/src/components/Blocks.ts +2 -0
  361. package/src/components/BonusBenefitsBlock/BonusBenefitsBlock.example.json +54 -0
  362. package/src/components/BonusBenefitsBlock/BonusBenefitsBlock.fixture.tsx +50 -0
  363. package/src/components/BonusBenefitsBlock/BonusBenefitsBlock.tsx +49 -0
  364. package/src/components/BonusBenefitsBlock/BonusBenefitsBlockContent.ts +23 -0
  365. package/src/components/BonusBenefitsBlock/getElementsColsValue.ts +12 -0
  366. package/src/components/ComparisonTable/ComparisonTable.mobile.tsx +2 -2
  367. package/src/components/ComparisonTable/HeaderCell.mobile.tsx +4 -4
  368. package/src/components/ComparisonTable/TableCell.mobile.tsx +4 -4
  369. package/src/components/ComparisonTable/TableCell.tsx +4 -4
  370. package/src/components/ContentPage/ContentPage.tsx +2 -2
  371. package/src/components/Gallery/GalleryInner.tsx +4 -4
  372. package/src/components/Headline/Headline.mobile.tsx +4 -4
  373. package/src/components/Headline/Headline.tsx +4 -4
  374. package/src/components/Headline/HeadlineContent.ts +1 -1
  375. package/src/components/Headline/constants.ts +1 -1
  376. package/src/components/LinkDocs/LinkDocs.tsx +1 -1
  377. package/src/components/LinkDocs/LinkDocsContent.ts +1 -1
  378. package/src/components/MobileAppTile/MobileAppTile.tsx +2 -2
  379. package/src/components/OtherProducts/OtherProductsContent.ts +1 -1
  380. package/src/components/OtherProducts/OtherProductsItem.tsx +33 -23
  381. package/src/components/ProductBlock/ProductBlockInner.mobile.tsx +2 -2
  382. package/src/components/ProductBlock/ProductBlockInner.tsx +9 -11
  383. package/src/components/ProductTile/ProductTile.tsx +2 -2
  384. package/src/components/Recommendation/Recommendation.tsx +4 -4
  385. package/src/components/StepsBlock/StepsBlock.mobile.tsx +9 -9
  386. package/src/components/TariffsTable/TariffsTable.fixture.tsx +4 -1
  387. package/src/components/TariffsTable/TariffsTable.tsx +55 -18
  388. package/src/components/TariffsTable/TariffsTableContent.ts +7 -5
  389. package/src/components/TextBlock/TextBlock.tsx +4 -4
  390. package/src/components/Tile/Tile.tsx +4 -4
  391. package/src/icons/AirPlane.svg +98 -0
  392. package/src/icons/ArrowUpIcon.svg +1 -1
  393. package/src/icons/ArrowsRewindRight.svg +1 -1
  394. package/src/icons/CarIcon.svg +466 -0
  395. package/src/icons/CinemaIcon.svg +274 -0
  396. package/src/icons/DocsIcon.svg +238 -0
  397. package/src/icons/IconName.ts +28 -4
  398. package/src/icons/PowerIcon.svg +135 -0
  399. package/src/icons/PumpkinIcon.svg +236 -0
  400. package/src/icons/SoundIcon.svg +113 -0
  401. package/src/icons/WateringCan.svg +497 -0
  402. package/src/model/AlignType.ts +9 -0
  403. package/src/model/VNode.ts +1 -0
  404. package/src/ui-kit/Foldable/Foldable.tsx +81 -0
  405. package/src/ui-kit/Foldable/useActiveHandler.ts +34 -0
  406. package/src/ui-kit/Logo/Logo.mobile.tsx +1 -1
  407. package/src/ui-kit/SearchBar/SearchBar.mobile.tsx +1 -1
  408. package/src/ui-kit/SearchBar/SearchBar.tsx +1 -1
  409. package/src/ui-kit/SearchBar.mobile.tsx +1 -1
  410. package/dist/components/OtherProducts/OtherProductsItemInner.d.ts +0 -2
  411. package/dist/components/OtherProducts/OtherProductsItemInner.js +0 -10
  412. package/dist/components/OtherProducts/OtherProductsItemInner.js.map +0 -1
  413. package/dist/components/OtherProducts/useActiveHandler.d.ts +0 -7
  414. package/dist/components/OtherProducts/useActiveHandler.js +0 -21
  415. package/dist/components/OtherProducts/useActiveHandler.js.map +0 -1
  416. package/lib/components/OtherProducts/OtherProductsItemInner.d.ts +0 -2
  417. package/lib/components/OtherProducts/OtherProductsItemInner.js +0 -8
  418. package/lib/components/OtherProducts/OtherProductsItemInner.js.map +0 -1
  419. package/lib/components/OtherProducts/useActiveHandler.d.ts +0 -7
  420. package/lib/components/OtherProducts/useActiveHandler.js +0 -18
  421. package/lib/components/OtherProducts/useActiveHandler.js.map +0 -1
  422. package/mobile/dist/components/OtherProducts/OtherProductsItemInner.d.ts +0 -2
  423. package/mobile/dist/components/OtherProducts/OtherProductsItemInner.js +0 -10
  424. package/mobile/dist/components/OtherProducts/OtherProductsItemInner.js.map +0 -1
  425. package/mobile/dist/components/OtherProducts/useActiveHandler.d.ts +0 -7
  426. package/mobile/dist/components/OtherProducts/useActiveHandler.js +0 -21
  427. package/mobile/dist/components/OtherProducts/useActiveHandler.js.map +0 -1
  428. package/mobile/lib/components/OtherProducts/OtherProductsItemInner.d.ts +0 -2
  429. package/mobile/lib/components/OtherProducts/OtherProductsItemInner.js +0 -8
  430. package/mobile/lib/components/OtherProducts/OtherProductsItemInner.js.map +0 -1
  431. package/mobile/lib/components/OtherProducts/useActiveHandler.d.ts +0 -7
  432. package/mobile/lib/components/OtherProducts/useActiveHandler.js +0 -18
  433. package/mobile/lib/components/OtherProducts/useActiveHandler.js.map +0 -1
  434. package/mobile/src/components/OtherProducts/OtherProductsItemInner.tsx +0 -14
  435. package/mobile/src/components/OtherProducts/useActiveHandler.ts +0 -24
  436. package/src/components/OtherProducts/OtherProductsItemInner.tsx +0 -14
  437. package/src/components/OtherProducts/useActiveHandler.ts +0 -24
@@ -0,0 +1,9 @@
1
+ /**
2
+ * @title Выравнивание
3
+ * @enumNames [
4
+ * "По левому краю",
5
+ * "По центру",
6
+ * "По правому краю"
7
+ * ]
8
+ */
9
+ export type AlignType = 'left' | 'center' | 'right';
@@ -0,0 +1 @@
1
+ export type VNode = unknown;
@@ -0,0 +1,81 @@
1
+ import { JSX } from '@redneckz/uni-jsx';
2
+ import { ContentPageContext } from '../../components/ContentPage/ContentPageContext';
3
+ import type { VNode } from '../../model/VNode';
4
+ import { ColorPalette } from '../../types';
5
+ import { clamp } from '../../utils/clamp';
6
+ import { Icon } from '../Icon/Icon';
7
+ import { foldableBlockClassNames, useActiveHandler } from './useActiveHandler';
8
+
9
+ export type FoldableBlocks = VNode[];
10
+ export type Render = (_: VNode, isActive: boolean) => VNode;
11
+ export interface FoldableProps {
12
+ context: ContentPageContext;
13
+ foldButtonLabel?: string;
14
+ hiddenBlocksNum?: number;
15
+ blocks?: FoldableBlocks;
16
+ foldButtonClasses?: string;
17
+ foldButtonDataTheme?: ColorPalette;
18
+ isUnfolded?: boolean;
19
+ render?: Render;
20
+ }
21
+
22
+ export interface RenderBlocksParams {
23
+ blocksToHide: number;
24
+ isActive: boolean;
25
+ }
26
+
27
+ export const Foldable = JSX<FoldableProps>(
28
+ ({
29
+ blocks = [],
30
+ context,
31
+ hiddenBlocksNum = 0,
32
+ foldButtonClasses,
33
+ foldButtonLabel,
34
+ foldButtonDataTheme,
35
+ isUnfolded,
36
+ render = (_) => _,
37
+ }) => {
38
+ const blocksToHide = clamp(hiddenBlocksNum, 0, blocks.length);
39
+
40
+ const { icon, handleToggle, isActive } = useActiveHandler({
41
+ context,
42
+ initialState: isUnfolded,
43
+ });
44
+
45
+ return blocks ? (
46
+ <div>
47
+ {renderBlocks(blocks, render, { blocksToHide, isActive })}
48
+ {hiddenBlocksNum ? (
49
+ <button
50
+ className={
51
+ foldButtonClasses ||
52
+ 'border-none bg-primary-main px-0 py-[26px] mb-[1px] w-full font-sans text-white text-base flex justify-center cursor-pointer'
53
+ }
54
+ data-theme={foldButtonDataTheme}
55
+ onClick={handleToggle}
56
+ >
57
+ <span className="pr-3">{isActive ? 'Скрыть' : foldButtonLabel}</span>
58
+ <Icon name={icon} width="20" height="20" asSVG />
59
+ </button>
60
+ ) : null}
61
+ </div>
62
+ ) : null;
63
+ },
64
+ );
65
+
66
+ const renderBlocks = (
67
+ blocks: FoldableBlocks,
68
+ render: Render,
69
+ { blocksToHide, isActive }: RenderBlocksParams,
70
+ ) => {
71
+ const visibleBlocks = blocks.slice(0, blocks.length - blocksToHide);
72
+ const hiddenBlocks = blocks.slice(-blocksToHide);
73
+
74
+ return render(
75
+ <div>
76
+ {visibleBlocks}
77
+ <div className={foldableBlockClassNames}>{hiddenBlocks}</div>
78
+ </div>,
79
+ isActive,
80
+ );
81
+ };
@@ -0,0 +1,34 @@
1
+ import { ContentPageContext } from '../../components/ContentPage/ContentPageContext';
2
+ import type { IconName } from '../../icons/IconName';
3
+
4
+ export const foldableBlockClassNames = 'transition-all duration-300 max-h-0 overflow-hidden';
5
+
6
+ export interface ActiveHandler {
7
+ context: ContentPageContext;
8
+ initialState?: boolean;
9
+ }
10
+
11
+ export const useActiveHandler = ({ context, initialState = false }: ActiveHandler) => {
12
+ const [isActive, setIsActive] = context.useState(initialState);
13
+ const icon: IconName = isActive ? 'ArrowUpIcon' : 'ArrowDownIcon';
14
+
15
+ const handleToggle = (e: MouseEvent) => {
16
+ const currentTarget = e.currentTarget as HTMLElement;
17
+
18
+ if (!currentTarget) {
19
+ return;
20
+ }
21
+
22
+ setIsActive(!isActive);
23
+ const wrapperBlock = currentTarget.previousSibling as HTMLElement;
24
+ const contentBlock = wrapperBlock.getElementsByClassName(
25
+ foldableBlockClassNames,
26
+ )[0] as HTMLElement;
27
+
28
+ contentBlock.style.maxHeight = contentBlock.style.maxHeight
29
+ ? ''
30
+ : `${contentBlock.scrollHeight}px`;
31
+ };
32
+
33
+ return { icon, handleToggle, isActive };
34
+ };
@@ -40,7 +40,7 @@ export const Logo = JSX<Partial<LogoProps>>(
40
40
  viewBox="0 0 40 45"
41
41
  paths={LOGO_PATHS.map((d) => ({ d }))}
42
42
  />
43
- {!hideTitle && (
43
+ {hideTitle ? null : (
44
44
  <span className={`${TEXT_COLOR[bgColor]} text-sm font-medium ml-2.5`}>
45
45
  {children || 'Россельхозбанк'}
46
46
  </span>
@@ -10,7 +10,7 @@ export const SearchBar = JSX<UniBlockProps>(({ className, context }) => {
10
10
  <div className="w-[20px] h-[20px]">
11
11
  <Img image="LoupeIcon" width="24" height="24" />
12
12
  </div>
13
- {!term && (
13
+ {term ? null : (
14
14
  <label
15
15
  htmlFor="search-bar-input"
16
16
  className="font-sans font-normal text-sm text-secondary-text"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@redneckz/wildless-cms-uni-blocks",
3
- "version": "0.3.61",
3
+ "version": "0.3.63",
4
4
  "private": false,
5
5
  "license": "MIT",
6
6
  "author": "ЦК",
@@ -61,7 +61,7 @@ const MINI_GALLERY_ACCORDION_BLOCK: MiniGalleryBlockListDef = {
61
61
  ...MINI_GALLERY,
62
62
  };
63
63
 
64
- const propsBlock: AccordionProps = {
64
+ const propsDefaultBlock: AccordionProps = {
65
65
  context,
66
66
  title: 'Accordion title',
67
67
  description: 'Accordion description',
@@ -101,10 +101,32 @@ const propsBlock: AccordionProps = {
101
101
  ],
102
102
  };
103
103
 
104
+ const propsRightAlignTitleBlock: AccordionProps = {
105
+ context,
106
+ title: 'Accordion title',
107
+ accordionAlignTitle: 'right',
108
+ description: 'Accordion description',
109
+ accordionItems: [
110
+ {
111
+ label: 'Accordion label 1',
112
+ blocks: [TEXT_BLOCK_ACCORDION_BLOCK, TEXT_BLOCK_ACCORDION_BLOCK],
113
+ },
114
+ {
115
+ label: 'Accordion label 2',
116
+ blocks: [PICTURE_TEXT_ACCORDION_BLOCK],
117
+ },
118
+ ],
119
+ };
120
+
104
121
  export default {
105
122
  default: (
106
123
  <div className="container grid grid-cols-12">
107
- <Accordion className="col-span-12" {...propsBlock} />
124
+ <Accordion className="col-span-12" {...propsDefaultBlock} />
125
+ </div>
126
+ ),
127
+ 'right-align-title': (
128
+ <div className="container grid grid-cols-12">
129
+ <Accordion className="col-span-12" {...propsRightAlignTitleBlock} />
108
130
  </div>
109
131
  ),
110
132
  };
@@ -3,14 +3,35 @@ import type { UniBlockProps } from '../../types';
3
3
  import { Heading } from '../../ui-kit/Heading/Heading';
4
4
  import type { AccordionContent } from './AccordionContent';
5
5
  import { AccordionItem } from './AccordionItem';
6
+ import { AlignType } from '../../model/AlignType';
7
+
8
+ const ALIGN_TITLE: Record<AlignType, string> = {
9
+ left: 'text-left',
10
+ center: 'text-center',
11
+ right: 'text-right',
12
+ };
6
13
 
7
14
  export interface AccordionProps extends AccordionContent, UniBlockProps {}
8
15
 
9
16
  export const Accordion = JSX<AccordionProps>(
10
- ({ title, description, accordionItems, context, className = '', anchor = null }) => {
17
+ ({
18
+ title,
19
+ description,
20
+ accordionItems,
21
+ context,
22
+ className = '',
23
+ anchor = null,
24
+ accordionAlignTitle = 'center',
25
+ }) => {
11
26
  return (
12
27
  <section className={`p-[50px] font-sans bg-white text-primary-text ${className}`} id={anchor}>
13
- {title ? <Heading headingType="h4" className="mb-2.5" title={title} /> : null}
28
+ {title ? (
29
+ <Heading
30
+ headingType="h4"
31
+ className={`mb-2.5 ${ALIGN_TITLE[accordionAlignTitle]}`}
32
+ title={title}
33
+ />
34
+ ) : null}
14
35
  {description ? <div className="mb-2.5 text-base">{description}</div> : null}
15
36
  {accordionItems?.length ? (
16
37
  <ul className="list-none m-0 p-0">
@@ -1,6 +1,7 @@
1
1
  import type { BlockDef } from '../../ui-kit/BlocksList/BlocksListProps';
2
2
  import type { BlockVersion } from '../../model/BlockVersion';
3
3
  import type { Picture } from '../../model/Picture';
4
+ import type { AlignType } from '../../model/AlignType';
4
5
  /**
5
6
  * @title Элемент списка
6
7
  */
@@ -30,6 +31,8 @@ export interface AccordionItemCommonProps {
30
31
  export interface AccordionContent {
31
32
  /** @title Заголовок */
32
33
  title?: string;
34
+ /** @title Выравнивание заголовка */
35
+ accordionAlignTitle?: AlignType;
33
36
  version?: BlockVersion;
34
37
  /** @title Список */
35
38
  accordionItems?: AccordionItemCommonProps[];
@@ -2,16 +2,7 @@ import type { BlockVersion } from '../../model/BlockVersion';
2
2
  import type { Picture } from '../../model/Picture';
3
3
  import type { ButtonWithIconProps } from '../../ui-kit/Button/ButtonProps';
4
4
  import type { HeadingType } from '../../ui-kit/Heading/HeadingContent';
5
-
6
- /**
7
- * @title Выравнивание
8
- * @enumNames [
9
- * "По левому краю",
10
- * "По центру",
11
- * "По правому краю"
12
- * ]
13
- */
14
- export type AlignType = 'left' | 'center' | 'right';
5
+ import type { AlignType } from '../../model/AlignType';
15
6
 
16
7
  /**
17
8
  * @title Общий компонент плиток
@@ -7,12 +7,10 @@ import type { Benefit, BenefitsBlockContent } from './BenefitsBlockContent';
7
7
  export interface BenefitsBlockProps extends BenefitsBlockContent, UniBlockProps {}
8
8
 
9
9
  export const BenefitsBlock = JSX<BenefitsBlockProps>(
10
- ({ className, title, benefits, anchor = null }) => {
10
+ ({ className = '', title, benefits, anchor = null }) => {
11
11
  return (
12
12
  <section
13
- className={`font-sans text-primary-text bg-white p-12 flex flex-col items-center ${
14
- className || ''
15
- }`}
13
+ className={`font-sans text-primary-text bg-white p-12 flex flex-col items-center ${className}`}
16
14
  id={anchor}
17
15
  >
18
16
  {title ? (
@@ -29,7 +27,7 @@ export const BenefitsBlock = JSX<BenefitsBlockProps>(
29
27
  const renderStep = (benefit: Benefit, i: number) => {
30
28
  return (
31
29
  <div key={String(i)} className="flex items-center gap-5 max-w-[500px]">
32
- {benefit.icon ? (
30
+ {benefit?.icon ? (
33
31
  <Img
34
32
  className="h-[70px] w-[70px] min-w-[70px] min-h-[70px]"
35
33
  image={benefit.icon}
@@ -38,10 +36,10 @@ const renderStep = (benefit: Benefit, i: number) => {
38
36
  />
39
37
  ) : null}
40
38
  <div>
41
- <h3 className="font-medium text-xl m-0">{benefit.label}</h3>
42
- {benefit.description && (
39
+ {benefit?.label ? <h3 className="font-medium text-xl m-0">{benefit.label}</h3> : null}
40
+ {benefit?.description ? (
43
41
  <div className="font-normal text-sm mt-2">{benefit.description}</div>
44
- )}
42
+ ) : null}
45
43
  </div>
46
44
  </div>
47
45
  );
@@ -22,6 +22,7 @@ import type { StepsBlockContent } from './StepsBlock/StepsBlockContent';
22
22
  import type { TariffsTableContent } from './TariffsTable/TariffsTableContent';
23
23
  import type { TextBlockContent } from './TextBlock/TextBlockContent';
24
24
  import type { TileContent } from './Tile/TileContent';
25
+ import type { BonusBenefitsBlockContent } from './BonusBenefitsBlock/BonusBenefitsBlockContent';
25
26
 
26
27
  /**
27
28
  * @hidden
@@ -50,4 +51,5 @@ export type BlockContent =
50
51
  | TileContent
51
52
  | NavigationContent
52
53
  | LinkListContent
53
- | GroupBlockContent;
54
+ | GroupBlockContent
55
+ | BonusBenefitsBlockContent;
@@ -29,6 +29,7 @@ import { TariffsTable } from './TariffsTable/TariffsTable';
29
29
  import { TextBlock } from './TextBlock/TextBlock';
30
30
  import { Tile } from './Tile/Tile';
31
31
  import { GroupBlock } from './GroupBlock/GroupBlock';
32
+ import { BonusBenefitsBlock } from './BonusBenefitsBlock/BonusBenefitsBlock';
32
33
 
33
34
  export const Blocks = {
34
35
  Accordion,
@@ -62,4 +63,5 @@ export const Blocks = {
62
63
  Navigation,
63
64
  Placeholder,
64
65
  GroupBlock,
66
+ BonusBenefitsBlock,
65
67
  };
@@ -0,0 +1,54 @@
1
+ {
2
+ "title": "Вы можете оплатить бонусными баллами",
3
+ "subtitle": "Удобный каталог с большим ассортиментом товаров и сервисов",
4
+ "bonusBenefits": [
5
+ {
6
+ "label": "Более 5000 товаров",
7
+ "icon": {
8
+ "icon": "WateringCan"
9
+ }
10
+ },
11
+ {
12
+ "label": "750 авиакомпаний, 1,2 млн отелей, билеты РЖД",
13
+ "icon": {
14
+ "icon": "SignDocsIcon"
15
+ }
16
+ },
17
+ {
18
+ "label": "Аренда автомобилей",
19
+ "icon": {
20
+ "icon": "SignDocsIcon"
21
+ }
22
+ },
23
+ {
24
+ "label": "Болеее 1000 развлечений",
25
+ "icon": {
26
+ "icon": "SignDocsIcon"
27
+ }
28
+ },
29
+ {
30
+ "label": "Платежные гаджеты Pay Ring",
31
+ "icon": {
32
+ "icon": "SignDocsIcon"
33
+ }
34
+ },
35
+ {
36
+ "label": "Цифровые сервисы",
37
+ "icon": {
38
+ "icon": "SignDocsIcon"
39
+ }
40
+ },
41
+ {
42
+ "label": "Фермерские продукты",
43
+ "icon": {
44
+ "icon": "SignDocsIcon"
45
+ }
46
+ },
47
+ {
48
+ "label": "Страхование",
49
+ "icon": {
50
+ "icon": "SignDocsIcon"
51
+ }
52
+ }
53
+ ]
54
+ }
@@ -0,0 +1,50 @@
1
+ import { context } from '../../setup-fixture';
2
+
3
+ import { BonusBenefitsBlock } from './BonusBenefitsBlock';
4
+
5
+ export default {
6
+ default: (
7
+ <div className="container grid grid-cols-12">
8
+ <BonusBenefitsBlock
9
+ context={context}
10
+ className="col-span-12"
11
+ title="Преимущества кредита"
12
+ subtitle="Удобный каталог с большим ассортиментом товаров и сервисов"
13
+ bonusBenefits={[
14
+ {
15
+ label: 'Более 5000 товаров',
16
+ icon: { icon: 'WateringCan' },
17
+ },
18
+ {
19
+ label: '750 авиакомпаний, 1,2 млн отелей, билеты РЖД',
20
+ icon: { icon: 'AirPlane' },
21
+ },
22
+ {
23
+ label: 'Аренда автомобилей',
24
+ icon: { icon: 'CarIcon' },
25
+ },
26
+ {
27
+ label: 'Болеее 1000 развлечений',
28
+ icon: { icon: 'CinemaIcon' },
29
+ },
30
+ {
31
+ label: 'Платежные гаджеты Pay Ring',
32
+ icon: { icon: 'SoundIcon' },
33
+ },
34
+ {
35
+ label: 'Цифровые сервисы',
36
+ icon: { icon: 'DocsIcon' },
37
+ },
38
+ {
39
+ label: 'Фермерские продукты',
40
+ icon: { icon: 'PumpkinIcon' },
41
+ },
42
+ {
43
+ label: 'Страхование',
44
+ icon: { icon: 'PowerIcon' },
45
+ },
46
+ ]}
47
+ />
48
+ </div>
49
+ ),
50
+ };
@@ -0,0 +1,49 @@
1
+ import { JSX } from '@redneckz/uni-jsx';
2
+ import type { UniBlockProps } from '../../types';
3
+ import { Heading } from '../../ui-kit/Heading/Heading';
4
+ import { Img } from '../../ui-kit/Img/Img';
5
+ import type { BonusBenefit, BonusBenefitsBlockContent } from './BonusBenefitsBlockContent';
6
+ import { getElementsColsValue } from './getElementsColsValue';
7
+
8
+ export interface BenefitsBlockProps extends BonusBenefitsBlockContent, UniBlockProps {}
9
+
10
+ export const BonusBenefitsBlock = JSX<BenefitsBlockProps>(
11
+ ({ className = '', title, subtitle, bonusBenefits, anchor = null }) => {
12
+ return (
13
+ <section
14
+ className={`font-sans text-primary-text bg-white p-50 flex flex-col ${className}`}
15
+ id={anchor}
16
+ >
17
+ {title ? (
18
+ <Heading headingType="h3" className="text-center mb-[10px]" title={title} />
19
+ ) : null}
20
+ {subtitle ? <span className="text-md font-normal text-center">{subtitle}</span> : null}
21
+ {bonusBenefits?.length ? (
22
+ <div className={`grid gap-1 ${getElementsColsValue(className)}`}>
23
+ {bonusBenefits.map(renderBonusBenefit)}
24
+ </div>
25
+ ) : null}
26
+ </section>
27
+ );
28
+ },
29
+ );
30
+
31
+ const renderBonusBenefit = (bonusBenefit: BonusBenefit, i: number) => {
32
+ return (
33
+ <div key={String(i)} className="flex flex-col items-center max-w-[292px]">
34
+ {bonusBenefit?.icon ? (
35
+ <Img
36
+ className="h-[180px] w-[160px] min-w-[160px] min-h-[160px]"
37
+ image={bonusBenefit.icon}
38
+ width="160"
39
+ height="180"
40
+ />
41
+ ) : null}
42
+ <div>
43
+ {bonusBenefit?.label ? (
44
+ <span className="title-2xs text-center m-0">{bonusBenefit.label}</span>
45
+ ) : null}
46
+ </div>
47
+ </div>
48
+ );
49
+ };
@@ -0,0 +1,23 @@
1
+ import type { Picture } from '../../model/Picture';
2
+
3
+ export interface BonusBenefit {
4
+ /** @title Название */
5
+ label?: string;
6
+ /** @title Бонус и преимущество */
7
+ icon?: Picture;
8
+ }
9
+
10
+ /**
11
+ * @title Блок бонусов и преимуществ
12
+ */
13
+ export interface BonusBenefitsBlockContent {
14
+ /** @title Заголовок */
15
+ title?: string;
16
+ /** @title Подзаголовок */
17
+ subtitle?: string;
18
+ /**
19
+ * @title Список бонусов
20
+ * @maxItems 8
21
+ */
22
+ bonusBenefits?: BonusBenefit[];
23
+ }
@@ -0,0 +1,12 @@
1
+ import { getColSpan } from '../../utils/getColSpan';
2
+
3
+ export function getElementsColsValue(className = '') {
4
+ const colSpan = getColSpan(className);
5
+ if (colSpan <= 6) {
6
+ return 'grid-cols-2';
7
+ } else if (colSpan <= 8) {
8
+ return 'grid-cols-3';
9
+ } else {
10
+ return 'grid-cols-4';
11
+ }
12
+ }
@@ -39,9 +39,9 @@ export const ComparisonTable = JSX<ComparisonTableProps>(
39
39
  className || ''
40
40
  }`}
41
41
  >
42
- {title && (
42
+ {title ? (
43
43
  <Heading headingType="h3" className="font-medium text-center m-0 mb-5" title={title} />
44
- )}
44
+ ) : null}
45
45
 
46
46
  {renderColumns({
47
47
  tableData,
@@ -29,20 +29,20 @@ export const HeaderCell = JSX<HeaderCellProps>(
29
29
  <Img image={image} />
30
30
  </div>
31
31
  )}
32
- {title && (
32
+ {title ? (
33
33
  <Heading
34
34
  headingType="h4"
35
35
  className={`${isFillGradient ? 'text-white' : ''}`}
36
36
  title={title}
37
37
  />
38
- )}
39
- {subtitle && (
38
+ ) : null}
39
+ {subtitle ? (
40
40
  <div
41
41
  className={`text-m-sm mb-3.5 ${isFillGradient ? 'text-white' : 'text-secondary-text/80'}`}
42
42
  >
43
43
  {subtitle}
44
44
  </div>
45
- )}
45
+ ) : null}
46
46
  </div>
47
47
  ),
48
48
  );
@@ -31,16 +31,16 @@ const renderCellInner =
31
31
  {rowHeader}
32
32
  </div>
33
33
  <div className="basis-1/2">
34
- {label && (
34
+ {label ? (
35
35
  <div className={`text-right ${isFillGradient ? 'text-white' : ''}`}>{label}</div>
36
- )}
37
- {description && (
36
+ ) : null}
37
+ {description ? (
38
38
  <div
39
39
  className={`text-right ${isFillGradient ? 'text-white/80' : 'text-secondary-text'}`}
40
40
  >
41
41
  {description}
42
42
  </div>
43
- )}
43
+ ) : null}
44
44
  </div>
45
45
  </div>
46
46
  );
@@ -30,15 +30,15 @@ export const TableCell = JSX<TableCellProps>(({ cell, isFirstRow, isLastRow, isF
30
30
 
31
31
  const renderCellInner = ({ label, description }: CellData, i: number, isFillGradient: boolean) => (
32
32
  <div key={String(i)} className="first:pt-7 pt-6 last:pb-7">
33
- {label && (
33
+ {label ? (
34
34
  <h4 className={`text-xl font-medium m-0 ${isFillGradient ? 'text-white' : ''}`}>{label}</h4>
35
- )}
36
- {description && (
35
+ ) : null}
36
+ {description ? (
37
37
  <div
38
38
  className={`text-sm opacity-80 ${isFillGradient ? 'text-white' : 'text-secondary-text'}`}
39
39
  >
40
40
  {description}
41
41
  </div>
42
- )}
42
+ ) : null}
43
43
  </div>
44
44
  );
@@ -85,7 +85,7 @@ export const ContentPage = JSX<ContentPageProps>(
85
85
  </div>
86
86
  ) : null}
87
87
 
88
- {likeControl && (
88
+ {likeControl ? (
89
89
  <div className="flex items-end absolute bottom-0 right-0 h-full pointer-events-none">
90
90
  <LikeControl
91
91
  key="LikeControl"
@@ -93,7 +93,7 @@ export const ContentPage = JSX<ContentPageProps>(
93
93
  context={context}
94
94
  />
95
95
  </div>
96
- )}
96
+ ) : null}
97
97
  </section>
98
98
  );
99
99
  },
@@ -37,22 +37,22 @@ export const GalleryInner = JSX<GalleryInnerProps>(
37
37
  activeCardIndex={activeCardIndex}
38
38
  {...rest}
39
39
  />
40
- {showPrevButton && (
40
+ {showPrevButton ? (
41
41
  <ArrowButton
42
42
  className="absolute top-1/2 left-8 z-10 mt-[25px]"
43
43
  onClick={handlePrevClick}
44
44
  ariaLabel="Пролистать влево"
45
45
  data-block-control="scroll-left"
46
46
  />
47
- )}
48
- {showNextButton && (
47
+ ) : null}
48
+ {showNextButton ? (
49
49
  <ArrowButton
50
50
  className="absolute top-1/2 right-8 z-10 mt-[25px] rotate-180"
51
51
  onClick={handleNextClick}
52
52
  ariaLabel="Пролистать вправо"
53
53
  data-block-control="scroll-right"
54
54
  />
55
- )}
55
+ ) : null}
56
56
  <div className="absolute top-0 left-0 bottom-0 w-[84px] bg-opacity-from-white" />
57
57
  <div className="absolute top-0 right-0 bottom-0 w-[100px] bg-opacity-to-white" />
58
58
  </section>