@redneckz/wildless-cms-uni-blocks 0.3.21 → 0.3.24

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 (523) hide show
  1. package/bundle/blocks.schema.json +1 -1
  2. package/bundle/bundle.umd.js +222 -71
  3. package/bundle/bundle.umd.min.js +1 -1
  4. package/dist/components/Accordion/Accordion.js +6 -2
  5. package/dist/components/Accordion/Accordion.js.map +1 -1
  6. package/dist/components/Accordion/AccordionContent.d.ts +8 -1
  7. package/dist/components/Accordion/AccordionItem.js +14 -5
  8. package/dist/components/Accordion/AccordionItem.js.map +1 -1
  9. package/dist/components/Accordion/AccordionItem.mobile.js +1 -1
  10. package/dist/components/Accordion/AccordionItem.mobile.js.map +1 -1
  11. package/dist/components/Accordion/AccordionItemInner.js +2 -2
  12. package/dist/components/Accordion/AccordionItemInner.js.map +1 -1
  13. package/dist/components/Accordion/AccordionItemInner.mobile.js +2 -2
  14. package/dist/components/Accordion/AccordionItemInner.mobile.js.map +1 -1
  15. package/dist/components/Accordion/useActiveHandler.d.ts +7 -0
  16. package/dist/components/Accordion/{utils/useActiveHandler.js → useActiveHandler.js} +2 -2
  17. package/dist/components/Accordion/useActiveHandler.js.map +1 -0
  18. package/dist/components/ComparisonTable/ComparisonTable.mobile.js +17 -5
  19. package/dist/components/ComparisonTable/ComparisonTable.mobile.js.map +1 -1
  20. package/dist/components/ComparisonTable/ComparisonTableContent.d.ts +18 -2
  21. package/dist/components/ComparisonTable/HeaderCell.d.ts +1 -0
  22. package/dist/components/ComparisonTable/HeaderCell.js.map +1 -1
  23. package/dist/components/ComparisonTable/TableColumn.d.ts +3 -2
  24. package/dist/components/ComparisonTable/TableColumn.js.map +1 -1
  25. package/dist/components/ContentPage/ContentPage.js.map +1 -1
  26. package/dist/components/Gallery/Gallery.mobile.js +4 -4
  27. package/dist/components/Gallery/Gallery.mobile.js.map +1 -1
  28. package/dist/components/Gallery/GalleryCardInner.js +3 -8
  29. package/dist/components/Gallery/GalleryCardInner.js.map +1 -1
  30. package/dist/components/Gallery/GalleryContent.d.ts +4 -3
  31. package/dist/components/Headline/Headline.js +1 -1
  32. package/dist/components/Headline/Headline.js.map +1 -1
  33. package/dist/components/LinkDocs/LinkDocs.mobile.js +1 -1
  34. package/dist/components/LinkDocs/LinkDocs.mobile.js.map +1 -1
  35. package/dist/components/LinkDocs/LinkDocsContent.d.ts +4 -10
  36. package/dist/components/LinkDocs/LinkDocsHorizontalList.js +1 -1
  37. package/dist/components/LinkDocs/LinkDocsHorizontalList.js.map +1 -1
  38. package/dist/components/LinkDocs/LinkDocsVerticalList.d.ts +1 -1
  39. package/dist/components/LinkDocs/LinkDocsVerticalList.js +1 -1
  40. package/dist/components/LinkDocs/LinkDocsVerticalList.js.map +1 -1
  41. package/dist/components/MiniGallery/MiniGalleryContent.d.ts +1 -0
  42. package/dist/components/MobileAppTile/MobileAppTile.mobile.js +1 -1
  43. package/dist/components/MobileAppTile/MobileAppTile.mobile.js.map +1 -1
  44. package/dist/components/OtherProducts/OtherProductsContent.d.ts +4 -1
  45. package/dist/components/OtherProducts/OtherProductsItem.js +4 -4
  46. package/dist/components/OtherProducts/OtherProductsItem.js.map +1 -1
  47. package/dist/components/OtherProducts/useActiveHandler.d.ts +7 -0
  48. package/dist/components/OtherProducts/{utils/useActiveHandler.js → useActiveHandler.js} +2 -2
  49. package/dist/components/OtherProducts/useActiveHandler.js.map +1 -0
  50. package/dist/components/ProductBlock/ProductBlock.mobile.js +7 -5
  51. package/dist/components/ProductBlock/ProductBlock.mobile.js.map +1 -1
  52. package/dist/components/ProductBlock/ProductBlockContent.d.ts +4 -0
  53. package/dist/components/ProductBlock/ProductBlockInner.js +2 -2
  54. package/dist/components/ProductBlock/ProductBlockInner.js.map +1 -1
  55. package/dist/components/ProductBlock/ProductBlockInner.mobile.js +8 -3
  56. package/dist/components/ProductBlock/ProductBlockInner.mobile.js.map +1 -1
  57. package/dist/components/ProductBlock/renderBenefit.mobile.d.ts +2 -1
  58. package/dist/components/ProductBlock/renderBenefit.mobile.js +1 -1
  59. package/dist/components/ProductBlock/renderBenefit.mobile.js.map +1 -1
  60. package/dist/components/ProductGallery/ProductGalleryContent.d.ts +4 -1
  61. package/dist/components/TariffsTable/TariffsTable.mobile.js +1 -1
  62. package/dist/components/TariffsTable/TariffsTable.mobile.js.map +1 -1
  63. package/dist/components/TariffsTable/TariffsTableCell.js +4 -4
  64. package/dist/components/TariffsTable/TariffsTableCell.js.map +1 -1
  65. package/dist/components/TariffsTable/TariffsTableContent.d.ts +1 -1
  66. package/dist/components/TariffsTable/TariffsTableTileCell.js +4 -2
  67. package/dist/components/TariffsTable/TariffsTableTileCell.js.map +1 -1
  68. package/dist/components/TextBlock/TextBlock.mobile.js +1 -1
  69. package/dist/components/TextBlock/TextBlock.mobile.js.map +1 -1
  70. package/dist/components/TextBlock/TextBlockContent.d.ts +1 -1
  71. package/dist/components/Tile/Tile.js +1 -1
  72. package/dist/components/Tile/Tile.js.map +1 -1
  73. package/dist/content-page-repository/transformPicture.js +2 -1
  74. package/dist/content-page-repository/transformPicture.js.map +1 -1
  75. package/dist/icons/IconName.d.ts +77 -0
  76. package/dist/icons/IconName.js +79 -1
  77. package/dist/icons/IconName.js.map +1 -1
  78. package/dist/model/BlockVersion.d.ts +1 -1
  79. package/dist/model/Picture.d.ts +2 -2
  80. package/dist/ui-kit/BlocksList/BlocksListProps.d.ts +46 -18
  81. package/dist/ui-kit/BlocksList/renderBlocksList.d.ts +4 -2
  82. package/dist/ui-kit/BlocksList/renderBlocksList.js +3 -3
  83. package/dist/ui-kit/BlocksList/renderBlocksList.js.map +1 -1
  84. package/dist/ui-kit/Heading/Heading.js.map +1 -1
  85. package/dist/ui-kit/Icon/Icon.js +4 -2
  86. package/dist/ui-kit/Icon/Icon.js.map +1 -1
  87. package/dist/ui-kit/Icon/IconProps.d.ts +2 -2
  88. package/dist/ui-kit/Img/Img.js +3 -1
  89. package/dist/ui-kit/Img/Img.js.map +1 -1
  90. package/dist/ui-kit/List/List.d.ts +1 -1
  91. package/dist/ui-kit/List/List.js +7 -2
  92. package/dist/ui-kit/List/List.js.map +1 -1
  93. package/dist/ui-kit/List/ListItem.d.ts +1 -1
  94. package/dist/ui-kit/List/ListItem.js +4 -9
  95. package/dist/ui-kit/List/ListItem.js.map +1 -1
  96. package/dist/ui-kit/List/ListProps.d.ts +2 -0
  97. package/dist/ui-kit/SearchBar/SearchBar.mobile.js +1 -1
  98. package/dist/ui-kit/SearchBar/SearchBar.mobile.js.map +1 -1
  99. package/lib/common.css +1 -1
  100. package/lib/components/Accordion/Accordion.js +6 -2
  101. package/lib/components/Accordion/Accordion.js.map +1 -1
  102. package/lib/components/Accordion/AccordionContent.d.ts +8 -1
  103. package/lib/components/Accordion/AccordionItem.js +14 -5
  104. package/lib/components/Accordion/AccordionItem.js.map +1 -1
  105. package/lib/components/Accordion/AccordionItem.mobile.js +1 -1
  106. package/lib/components/Accordion/AccordionItem.mobile.js.map +1 -1
  107. package/lib/components/Accordion/AccordionItemInner.js +2 -2
  108. package/lib/components/Accordion/AccordionItemInner.js.map +1 -1
  109. package/lib/components/Accordion/AccordionItemInner.mobile.js +2 -2
  110. package/lib/components/Accordion/AccordionItemInner.mobile.js.map +1 -1
  111. package/lib/components/Accordion/useActiveHandler.d.ts +7 -0
  112. package/{mobile/lib/components/Accordion/utils → lib/components/Accordion}/useActiveHandler.js +2 -2
  113. package/lib/components/Accordion/useActiveHandler.js.map +1 -0
  114. package/lib/components/BaseTile/getTileHeadingType.d.ts +1 -1
  115. package/lib/components/ComparisonTable/ComparisonTable.mobile.js +17 -5
  116. package/lib/components/ComparisonTable/ComparisonTable.mobile.js.map +1 -1
  117. package/lib/components/ComparisonTable/ComparisonTableContent.d.ts +18 -2
  118. package/lib/components/ComparisonTable/HeaderCell.d.ts +1 -0
  119. package/lib/components/ComparisonTable/HeaderCell.js.map +1 -1
  120. package/lib/components/ComparisonTable/TableColumn.d.ts +3 -2
  121. package/lib/components/ComparisonTable/TableColumn.js.map +1 -1
  122. package/lib/components/ContentPage/ContentPage.js.map +1 -1
  123. package/lib/components/Gallery/Gallery.mobile.js +4 -4
  124. package/lib/components/Gallery/Gallery.mobile.js.map +1 -1
  125. package/lib/components/Gallery/GalleryCardInner.js +3 -8
  126. package/lib/components/Gallery/GalleryCardInner.js.map +1 -1
  127. package/lib/components/Gallery/GalleryContent.d.ts +4 -3
  128. package/lib/components/Headline/Headline.js +1 -1
  129. package/lib/components/Headline/Headline.js.map +1 -1
  130. package/lib/components/LinkDocs/LinkDocs.mobile.js +1 -1
  131. package/lib/components/LinkDocs/LinkDocs.mobile.js.map +1 -1
  132. package/lib/components/LinkDocs/LinkDocsContent.d.ts +4 -10
  133. package/lib/components/LinkDocs/LinkDocsHorizontalList.js +1 -1
  134. package/lib/components/LinkDocs/LinkDocsHorizontalList.js.map +1 -1
  135. package/lib/components/LinkDocs/LinkDocsVerticalList.d.ts +1 -1
  136. package/lib/components/LinkDocs/LinkDocsVerticalList.js +1 -1
  137. package/lib/components/LinkDocs/LinkDocsVerticalList.js.map +1 -1
  138. package/lib/components/MiniGallery/MiniGalleryContent.d.ts +1 -0
  139. package/lib/components/MobileAppTile/MobileAppTile.mobile.js +1 -1
  140. package/lib/components/MobileAppTile/MobileAppTile.mobile.js.map +1 -1
  141. package/lib/components/OtherProducts/OtherProductsContent.d.ts +4 -1
  142. package/lib/components/OtherProducts/OtherProductsItem.js +4 -4
  143. package/lib/components/OtherProducts/OtherProductsItem.js.map +1 -1
  144. package/lib/components/OtherProducts/useActiveHandler.d.ts +7 -0
  145. package/lib/components/OtherProducts/{utils/useActiveHandler.js → useActiveHandler.js} +2 -2
  146. package/lib/components/OtherProducts/useActiveHandler.js.map +1 -0
  147. package/lib/components/ProductBlock/ProductBlock.fixture.mobile.d.ts +4 -0
  148. package/lib/components/ProductBlock/ProductBlock.mobile.js +7 -5
  149. package/lib/components/ProductBlock/ProductBlock.mobile.js.map +1 -1
  150. package/lib/components/ProductBlock/ProductBlockContent.d.ts +4 -0
  151. package/lib/components/ProductBlock/ProductBlockInner.js +2 -2
  152. package/lib/components/ProductBlock/ProductBlockInner.js.map +1 -1
  153. package/lib/components/ProductBlock/ProductBlockInner.mobile.js +8 -3
  154. package/lib/components/ProductBlock/ProductBlockInner.mobile.js.map +1 -1
  155. package/lib/components/ProductBlock/renderBenefit.mobile.d.ts +2 -1
  156. package/lib/components/ProductBlock/renderBenefit.mobile.js +1 -1
  157. package/lib/components/ProductBlock/renderBenefit.mobile.js.map +1 -1
  158. package/lib/components/ProductGallery/ProductGalleryContent.d.ts +4 -1
  159. package/lib/components/TariffsTable/TariffsTable.mobile.js +1 -1
  160. package/lib/components/TariffsTable/TariffsTable.mobile.js.map +1 -1
  161. package/lib/components/TariffsTable/TariffsTableCell.js +4 -4
  162. package/lib/components/TariffsTable/TariffsTableCell.js.map +1 -1
  163. package/lib/components/TariffsTable/TariffsTableContent.d.ts +1 -1
  164. package/lib/components/TariffsTable/TariffsTableTileCell.js +4 -2
  165. package/lib/components/TariffsTable/TariffsTableTileCell.js.map +1 -1
  166. package/lib/components/TextBlock/TextBlock.mobile.js +1 -1
  167. package/lib/components/TextBlock/TextBlock.mobile.js.map +1 -1
  168. package/lib/components/TextBlock/TextBlockContent.d.ts +1 -1
  169. package/lib/components/Tile/Tile.js +1 -1
  170. package/lib/components/Tile/Tile.js.map +1 -1
  171. package/lib/content-page-repository/transformPicture.js +2 -1
  172. package/lib/content-page-repository/transformPicture.js.map +1 -1
  173. package/lib/icons/IconName.d.ts +77 -0
  174. package/lib/icons/IconName.js +78 -0
  175. package/lib/icons/IconName.js.map +1 -1
  176. package/lib/model/BlockVersion.d.ts +1 -1
  177. package/lib/model/Picture.d.ts +2 -2
  178. package/lib/ui-kit/BlocksList/BlocksListProps.d.ts +46 -18
  179. package/lib/ui-kit/BlocksList/renderBlocksList.d.ts +4 -2
  180. package/lib/ui-kit/BlocksList/renderBlocksList.js +3 -3
  181. package/lib/ui-kit/BlocksList/renderBlocksList.js.map +1 -1
  182. package/lib/ui-kit/Heading/Heading.js.map +1 -1
  183. package/lib/ui-kit/Icon/Icon.js +4 -2
  184. package/lib/ui-kit/Icon/Icon.js.map +1 -1
  185. package/lib/ui-kit/Icon/IconProps.d.ts +2 -2
  186. package/lib/ui-kit/Img/Img.js +3 -1
  187. package/lib/ui-kit/Img/Img.js.map +1 -1
  188. package/lib/ui-kit/List/List.d.ts +1 -1
  189. package/lib/ui-kit/List/List.fixture.d.ts +10 -0
  190. package/lib/ui-kit/List/List.js +7 -2
  191. package/lib/ui-kit/List/List.js.map +1 -1
  192. package/lib/ui-kit/List/ListItem.d.ts +1 -1
  193. package/lib/ui-kit/List/ListItem.js +4 -9
  194. package/lib/ui-kit/List/ListItem.js.map +1 -1
  195. package/lib/ui-kit/List/ListProps.d.ts +2 -0
  196. package/lib/ui-kit/SearchBar/SearchBar.mobile.js +1 -1
  197. package/lib/ui-kit/SearchBar/SearchBar.mobile.js.map +1 -1
  198. package/mobile/bundle/bundle.umd.js +234 -77
  199. package/mobile/bundle/bundle.umd.min.js +1 -1
  200. package/mobile/dist/components/Accordion/AccordionContent.d.ts +8 -1
  201. package/mobile/dist/components/Accordion/AccordionItem.js +1 -1
  202. package/mobile/dist/components/Accordion/AccordionItem.js.map +1 -1
  203. package/mobile/dist/components/Accordion/AccordionItemInner.js +2 -2
  204. package/mobile/dist/components/Accordion/AccordionItemInner.js.map +1 -1
  205. package/mobile/dist/components/Accordion/useActiveHandler.d.ts +7 -0
  206. package/mobile/dist/components/Accordion/{utils/useActiveHandler.js → useActiveHandler.js} +2 -2
  207. package/mobile/dist/components/Accordion/useActiveHandler.js.map +1 -0
  208. package/mobile/dist/components/ComparisonTable/ComparisonTable.js +17 -5
  209. package/mobile/dist/components/ComparisonTable/ComparisonTable.js.map +1 -1
  210. package/mobile/dist/components/ComparisonTable/ComparisonTableContent.d.ts +18 -2
  211. package/mobile/dist/components/ComparisonTable/TableColumn.d.ts +3 -2
  212. package/mobile/dist/components/ComparisonTable/TableColumn.js.map +1 -1
  213. package/mobile/dist/components/ContentPage/ContentPage.js.map +1 -1
  214. package/mobile/dist/components/Gallery/Gallery.js +4 -4
  215. package/mobile/dist/components/Gallery/Gallery.js.map +1 -1
  216. package/mobile/dist/components/Gallery/GalleryCardInner.js +3 -8
  217. package/mobile/dist/components/Gallery/GalleryCardInner.js.map +1 -1
  218. package/mobile/dist/components/Gallery/GalleryContent.d.ts +4 -3
  219. package/mobile/dist/components/LinkDocs/LinkDocs.js +1 -1
  220. package/mobile/dist/components/LinkDocs/LinkDocs.js.map +1 -1
  221. package/mobile/dist/components/LinkDocs/LinkDocsContent.d.ts +4 -10
  222. package/mobile/dist/components/LinkDocs/LinkDocsHorizontalList.js +1 -1
  223. package/mobile/dist/components/LinkDocs/LinkDocsHorizontalList.js.map +1 -1
  224. package/mobile/dist/components/LinkDocs/LinkDocsVerticalList.d.ts +1 -1
  225. package/mobile/dist/components/LinkDocs/LinkDocsVerticalList.js +1 -1
  226. package/mobile/dist/components/LinkDocs/LinkDocsVerticalList.js.map +1 -1
  227. package/mobile/dist/components/MiniGallery/MiniGalleryContent.d.ts +1 -0
  228. package/mobile/dist/components/MobileAppTile/MobileAppTile.js +1 -1
  229. package/mobile/dist/components/MobileAppTile/MobileAppTile.js.map +1 -1
  230. package/mobile/dist/components/OtherProducts/OtherProductsContent.d.ts +4 -1
  231. package/mobile/dist/components/OtherProducts/OtherProductsItem.js +4 -4
  232. package/mobile/dist/components/OtherProducts/OtherProductsItem.js.map +1 -1
  233. package/mobile/dist/components/OtherProducts/useActiveHandler.d.ts +7 -0
  234. package/mobile/dist/components/OtherProducts/{utils/useActiveHandler.js → useActiveHandler.js} +2 -2
  235. package/mobile/dist/components/OtherProducts/useActiveHandler.js.map +1 -0
  236. package/mobile/dist/components/ProductBlock/ProductBlock.js +7 -5
  237. package/mobile/dist/components/ProductBlock/ProductBlock.js.map +1 -1
  238. package/mobile/dist/components/ProductBlock/ProductBlockContent.d.ts +4 -0
  239. package/mobile/dist/components/ProductBlock/ProductBlockInner.js +8 -3
  240. package/mobile/dist/components/ProductBlock/ProductBlockInner.js.map +1 -1
  241. package/mobile/dist/components/ProductBlock/renderBenefit.d.ts +2 -1
  242. package/mobile/dist/components/ProductBlock/renderBenefit.js +1 -1
  243. package/mobile/dist/components/ProductBlock/renderBenefit.js.map +1 -1
  244. package/mobile/dist/components/ProductGallery/ProductGalleryContent.d.ts +4 -1
  245. package/mobile/dist/components/TariffsTable/TariffsTable.js +1 -1
  246. package/mobile/dist/components/TariffsTable/TariffsTable.js.map +1 -1
  247. package/mobile/dist/components/TariffsTable/TariffsTableCell.js +4 -4
  248. package/mobile/dist/components/TariffsTable/TariffsTableCell.js.map +1 -1
  249. package/mobile/dist/components/TariffsTable/TariffsTableContent.d.ts +1 -1
  250. package/mobile/dist/components/TariffsTable/TariffsTableTileCell.js +4 -2
  251. package/mobile/dist/components/TariffsTable/TariffsTableTileCell.js.map +1 -1
  252. package/mobile/dist/components/TextBlock/TextBlock.js +1 -1
  253. package/mobile/dist/components/TextBlock/TextBlock.js.map +1 -1
  254. package/mobile/dist/components/TextBlock/TextBlockContent.d.ts +1 -1
  255. package/mobile/dist/components/Tile/Tile.js +1 -1
  256. package/mobile/dist/components/Tile/Tile.js.map +1 -1
  257. package/mobile/dist/content-page-repository/transformPicture.js +2 -1
  258. package/mobile/dist/content-page-repository/transformPicture.js.map +1 -1
  259. package/mobile/dist/icons/IconName.d.ts +77 -0
  260. package/mobile/dist/icons/IconName.js +79 -1
  261. package/mobile/dist/icons/IconName.js.map +1 -1
  262. package/mobile/dist/model/BlockVersion.d.ts +1 -1
  263. package/mobile/dist/model/Picture.d.ts +2 -2
  264. package/mobile/dist/ui-kit/BlocksList/BlocksListProps.d.ts +46 -18
  265. package/mobile/dist/ui-kit/BlocksList/renderBlocksList.d.ts +4 -2
  266. package/mobile/dist/ui-kit/BlocksList/renderBlocksList.js +3 -3
  267. package/mobile/dist/ui-kit/BlocksList/renderBlocksList.js.map +1 -1
  268. package/mobile/dist/ui-kit/Icon/Icon.js +4 -2
  269. package/mobile/dist/ui-kit/Icon/Icon.js.map +1 -1
  270. package/mobile/dist/ui-kit/Icon/IconProps.d.ts +2 -2
  271. package/mobile/dist/ui-kit/List/List.d.ts +1 -1
  272. package/mobile/dist/ui-kit/List/List.js +7 -2
  273. package/mobile/dist/ui-kit/List/List.js.map +1 -1
  274. package/mobile/dist/ui-kit/List/ListItem.d.ts +1 -1
  275. package/mobile/dist/ui-kit/List/ListItem.js +4 -9
  276. package/mobile/dist/ui-kit/List/ListItem.js.map +1 -1
  277. package/mobile/dist/ui-kit/List/ListProps.d.ts +2 -0
  278. package/mobile/dist/ui-kit/SearchBar/SearchBar.js +1 -1
  279. package/mobile/dist/ui-kit/SearchBar/SearchBar.js.map +1 -1
  280. package/mobile/lib/components/Accordion/AccordionContent.d.ts +8 -1
  281. package/mobile/lib/components/Accordion/AccordionItem.js +1 -1
  282. package/mobile/lib/components/Accordion/AccordionItem.js.map +1 -1
  283. package/mobile/lib/components/Accordion/AccordionItemInner.js +2 -2
  284. package/mobile/lib/components/Accordion/AccordionItemInner.js.map +1 -1
  285. package/mobile/lib/components/Accordion/useActiveHandler.d.ts +7 -0
  286. package/{lib/components/Accordion/utils → mobile/lib/components/Accordion}/useActiveHandler.js +2 -2
  287. package/mobile/lib/components/Accordion/useActiveHandler.js.map +1 -0
  288. package/mobile/lib/components/ComparisonTable/ComparisonTable.js +17 -5
  289. package/mobile/lib/components/ComparisonTable/ComparisonTable.js.map +1 -1
  290. package/mobile/lib/components/ComparisonTable/ComparisonTableContent.d.ts +18 -2
  291. package/mobile/lib/components/ComparisonTable/TableColumn.d.ts +3 -2
  292. package/mobile/lib/components/ComparisonTable/TableColumn.js.map +1 -1
  293. package/mobile/lib/components/ContentPage/ContentPage.js.map +1 -1
  294. package/mobile/lib/components/Gallery/Gallery.js +4 -4
  295. package/mobile/lib/components/Gallery/Gallery.js.map +1 -1
  296. package/mobile/lib/components/Gallery/GalleryCardInner.js +3 -8
  297. package/mobile/lib/components/Gallery/GalleryCardInner.js.map +1 -1
  298. package/mobile/lib/components/Gallery/GalleryContent.d.ts +4 -3
  299. package/mobile/lib/components/LinkDocs/LinkDocs.js +1 -1
  300. package/mobile/lib/components/LinkDocs/LinkDocs.js.map +1 -1
  301. package/mobile/lib/components/LinkDocs/LinkDocsContent.d.ts +4 -10
  302. package/mobile/lib/components/LinkDocs/LinkDocsHorizontalList.js +1 -1
  303. package/mobile/lib/components/LinkDocs/LinkDocsHorizontalList.js.map +1 -1
  304. package/mobile/lib/components/LinkDocs/LinkDocsVerticalList.d.ts +1 -1
  305. package/mobile/lib/components/LinkDocs/LinkDocsVerticalList.js +1 -1
  306. package/mobile/lib/components/LinkDocs/LinkDocsVerticalList.js.map +1 -1
  307. package/mobile/lib/components/MiniGallery/MiniGalleryContent.d.ts +1 -0
  308. package/mobile/lib/components/MobileAppTile/MobileAppTile.js +1 -1
  309. package/mobile/lib/components/MobileAppTile/MobileAppTile.js.map +1 -1
  310. package/mobile/lib/components/OtherProducts/OtherProductsContent.d.ts +4 -1
  311. package/mobile/lib/components/OtherProducts/OtherProductsItem.js +4 -4
  312. package/mobile/lib/components/OtherProducts/OtherProductsItem.js.map +1 -1
  313. package/mobile/lib/components/OtherProducts/useActiveHandler.d.ts +7 -0
  314. package/mobile/lib/components/OtherProducts/{utils/useActiveHandler.js → useActiveHandler.js} +2 -2
  315. package/mobile/lib/components/OtherProducts/useActiveHandler.js.map +1 -0
  316. package/mobile/lib/components/ProductBlock/ProductBlock.js +7 -5
  317. package/mobile/lib/components/ProductBlock/ProductBlock.js.map +1 -1
  318. package/mobile/lib/components/ProductBlock/ProductBlockContent.d.ts +4 -0
  319. package/mobile/lib/components/ProductBlock/ProductBlockInner.js +8 -3
  320. package/mobile/lib/components/ProductBlock/ProductBlockInner.js.map +1 -1
  321. package/mobile/lib/components/ProductBlock/renderBenefit.d.ts +2 -1
  322. package/mobile/lib/components/ProductBlock/renderBenefit.js +1 -1
  323. package/mobile/lib/components/ProductBlock/renderBenefit.js.map +1 -1
  324. package/mobile/lib/components/ProductGallery/ProductGalleryContent.d.ts +4 -1
  325. package/mobile/lib/components/TariffsTable/TariffsTable.js +1 -1
  326. package/mobile/lib/components/TariffsTable/TariffsTable.js.map +1 -1
  327. package/mobile/lib/components/TariffsTable/TariffsTableCell.js +4 -4
  328. package/mobile/lib/components/TariffsTable/TariffsTableCell.js.map +1 -1
  329. package/mobile/lib/components/TariffsTable/TariffsTableContent.d.ts +1 -1
  330. package/mobile/lib/components/TariffsTable/TariffsTableTileCell.js +4 -2
  331. package/mobile/lib/components/TariffsTable/TariffsTableTileCell.js.map +1 -1
  332. package/mobile/lib/components/TextBlock/TextBlock.js +1 -1
  333. package/mobile/lib/components/TextBlock/TextBlock.js.map +1 -1
  334. package/mobile/lib/components/TextBlock/TextBlockContent.d.ts +1 -1
  335. package/mobile/lib/components/Tile/Tile.js +1 -1
  336. package/mobile/lib/components/Tile/Tile.js.map +1 -1
  337. package/mobile/lib/content-page-repository/transformPicture.js +2 -1
  338. package/mobile/lib/content-page-repository/transformPicture.js.map +1 -1
  339. package/mobile/lib/icons/IconName.d.ts +77 -0
  340. package/mobile/lib/icons/IconName.js +78 -0
  341. package/mobile/lib/icons/IconName.js.map +1 -1
  342. package/mobile/lib/model/BlockVersion.d.ts +1 -1
  343. package/mobile/lib/model/Picture.d.ts +2 -2
  344. package/mobile/lib/ui-kit/BlocksList/BlocksListProps.d.ts +46 -18
  345. package/mobile/lib/ui-kit/BlocksList/renderBlocksList.d.ts +4 -2
  346. package/mobile/lib/ui-kit/BlocksList/renderBlocksList.js +3 -3
  347. package/mobile/lib/ui-kit/BlocksList/renderBlocksList.js.map +1 -1
  348. package/mobile/lib/ui-kit/Icon/Icon.js +4 -2
  349. package/mobile/lib/ui-kit/Icon/Icon.js.map +1 -1
  350. package/mobile/lib/ui-kit/Icon/IconProps.d.ts +2 -2
  351. package/mobile/lib/ui-kit/List/List.d.ts +1 -1
  352. package/mobile/lib/ui-kit/List/List.js +7 -2
  353. package/mobile/lib/ui-kit/List/List.js.map +1 -1
  354. package/mobile/lib/ui-kit/List/ListItem.d.ts +1 -1
  355. package/mobile/lib/ui-kit/List/ListItem.js +4 -9
  356. package/mobile/lib/ui-kit/List/ListItem.js.map +1 -1
  357. package/mobile/lib/ui-kit/List/ListProps.d.ts +2 -0
  358. package/mobile/lib/ui-kit/SearchBar/SearchBar.js +1 -1
  359. package/mobile/lib/ui-kit/SearchBar/SearchBar.js.map +1 -1
  360. package/mobile/src/components/Accordion/AccordionContent.ts +9 -2
  361. package/mobile/src/components/Accordion/AccordionItem.tsx +1 -1
  362. package/mobile/src/components/Accordion/AccordionItemInner.tsx +11 -9
  363. package/mobile/src/components/Accordion/{utils/useActiveHandler.ts → useActiveHandler.ts} +4 -3
  364. package/mobile/src/components/ComparisonTable/ComparisonTable.tsx +51 -30
  365. package/mobile/src/components/ComparisonTable/ComparisonTableContent.ts +21 -2
  366. package/mobile/src/components/ComparisonTable/TableColumn.tsx +3 -2
  367. package/mobile/src/components/ContentPage/ContentPage.page.json +1 -1
  368. package/mobile/src/components/ContentPage/ContentPage.tsx +0 -1
  369. package/mobile/src/components/Gallery/Gallery.example.json +2 -20
  370. package/mobile/src/components/Gallery/Gallery.tsx +5 -4
  371. package/mobile/src/components/Gallery/GalleryCardInner.tsx +12 -17
  372. package/mobile/src/components/Gallery/GalleryContent.ts +4 -3
  373. package/mobile/src/components/Headline/Headline.example.json +8 -1
  374. package/mobile/src/components/LinkDocs/LinkDocs.example.json +2 -2
  375. package/mobile/src/components/LinkDocs/LinkDocs.tsx +3 -1
  376. package/mobile/src/components/LinkDocs/LinkDocsContent.ts +4 -11
  377. package/mobile/src/components/LinkDocs/LinkDocsHorizontalList.tsx +1 -1
  378. package/mobile/src/components/LinkDocs/LinkDocsVerticalList.tsx +4 -2
  379. package/mobile/src/components/MiniGallery/MiniGalleryContent.ts +1 -0
  380. package/mobile/src/components/MobileAppTile/MobileAppTile.tsx +1 -1
  381. package/mobile/src/components/OtherProducts/OtherProductsContent.ts +4 -1
  382. package/mobile/src/components/OtherProducts/OtherProductsItem.tsx +29 -27
  383. package/{src/components/OtherProducts/utils → mobile/src/components/OtherProducts}/useActiveHandler.ts +4 -3
  384. package/mobile/src/components/ProductBlock/ProductBlock.example.json +3 -1
  385. package/mobile/src/components/ProductBlock/ProductBlock.tsx +17 -12
  386. package/mobile/src/components/ProductBlock/ProductBlockContent.ts +4 -0
  387. package/mobile/src/components/ProductBlock/ProductBlockInner.tsx +25 -5
  388. package/mobile/src/components/ProductBlock/renderBenefit.tsx +2 -1
  389. package/mobile/src/components/ProductGallery/ProductGallery.example.json +2 -1
  390. package/mobile/src/components/ProductGallery/ProductGalleryContent.ts +4 -1
  391. package/mobile/src/components/StepsBlock/StepsBlock.example.json +1 -0
  392. package/mobile/src/components/TariffsTable/TariffsTable.tsx +3 -1
  393. package/mobile/src/components/TariffsTable/TariffsTableCell.tsx +28 -27
  394. package/mobile/src/components/TariffsTable/TariffsTableContent.ts +1 -1
  395. package/mobile/src/components/TariffsTable/TariffsTableTileCell.tsx +33 -31
  396. package/mobile/src/components/TextBlock/TextBlock.example.json +4 -3
  397. package/mobile/src/components/TextBlock/TextBlock.tsx +2 -2
  398. package/mobile/src/components/TextBlock/TextBlockContent.ts +1 -1
  399. package/mobile/src/components/Tile/Tile.tsx +3 -1
  400. package/mobile/src/content-page-repository/transformPicture.ts +2 -1
  401. package/mobile/src/icons/IconName.ts +4 -0
  402. package/mobile/src/model/BlockVersion.ts +1 -1
  403. package/mobile/src/model/Picture.ts +2 -2
  404. package/mobile/src/ui-kit/BlocksList/BlocksListProps.ts +27 -29
  405. package/mobile/src/ui-kit/BlocksList/renderBlocksList.tsx +12 -4
  406. package/mobile/src/ui-kit/Icon/Icon.tsx +9 -2
  407. package/mobile/src/ui-kit/Icon/IconProps.ts +2 -2
  408. package/mobile/src/ui-kit/List/List.tsx +9 -3
  409. package/mobile/src/ui-kit/List/ListItem.tsx +5 -12
  410. package/mobile/src/ui-kit/List/ListProps.ts +2 -0
  411. package/mobile/src/ui-kit/SearchBar/SearchBar.tsx +1 -1
  412. package/package.json +1 -1
  413. package/src/components/Accordion/Accordion.tsx +27 -14
  414. package/src/components/Accordion/AccordionContent.ts +9 -2
  415. package/src/components/Accordion/AccordionItem.mobile.tsx +1 -1
  416. package/src/components/Accordion/AccordionItem.tsx +48 -26
  417. package/src/components/Accordion/AccordionItemInner.mobile.tsx +11 -9
  418. package/src/components/Accordion/AccordionItemInner.tsx +10 -8
  419. package/src/components/Accordion/{utils/useActiveHandler.ts → useActiveHandler.ts} +4 -3
  420. package/src/components/ComparisonTable/ComparisonTable.fixture.mobile.tsx +1 -1
  421. package/src/components/ComparisonTable/ComparisonTable.mobile.tsx +51 -30
  422. package/src/components/ComparisonTable/ComparisonTableContent.ts +21 -2
  423. package/src/components/ComparisonTable/HeaderCell.tsx +1 -0
  424. package/src/components/ComparisonTable/TableColumn.tsx +3 -2
  425. package/src/components/ContentPage/ContentPage.page.json +1 -1
  426. package/src/components/ContentPage/ContentPage.tsx +0 -1
  427. package/src/components/Gallery/Gallery.example.json +2 -20
  428. package/src/components/Gallery/Gallery.fixture.mobile.tsx +3 -2
  429. package/src/components/Gallery/Gallery.mobile.tsx +5 -4
  430. package/src/components/Gallery/GalleryCardInner.tsx +12 -17
  431. package/src/components/Gallery/GalleryContent.ts +4 -3
  432. package/src/components/Headline/Headline.example.json +8 -1
  433. package/src/components/Headline/Headline.tsx +4 -2
  434. package/src/components/LinkDocs/LinkDocs.example.json +2 -2
  435. package/src/components/LinkDocs/LinkDocs.mobile.tsx +3 -1
  436. package/src/components/LinkDocs/LinkDocsContent.ts +4 -11
  437. package/src/components/LinkDocs/LinkDocsHorizontalList.tsx +1 -1
  438. package/src/components/LinkDocs/LinkDocsVerticalList.tsx +4 -2
  439. package/src/components/MiniGallery/MiniGalleryContent.ts +1 -0
  440. package/src/components/MobileAppTile/MobileAppTile.mobile.tsx +1 -1
  441. package/src/components/OtherProducts/OtherProductsContent.ts +4 -1
  442. package/src/components/OtherProducts/OtherProductsItem.tsx +29 -27
  443. package/{mobile/src/components/OtherProducts/utils → src/components/OtherProducts}/useActiveHandler.ts +4 -3
  444. package/src/components/ProductBlock/ProductBlock.example.json +3 -1
  445. package/src/components/ProductBlock/ProductBlock.fixture.mobile.tsx +49 -13
  446. package/src/components/ProductBlock/ProductBlock.mobile.tsx +17 -12
  447. package/src/components/ProductBlock/ProductBlockContent.ts +4 -0
  448. package/src/components/ProductBlock/ProductBlockInner.mobile.tsx +25 -5
  449. package/src/components/ProductBlock/ProductBlockInner.tsx +8 -1
  450. package/src/components/ProductBlock/renderBenefit.mobile.tsx +2 -1
  451. package/src/components/ProductGallery/ProductGallery.example.json +2 -1
  452. package/src/components/ProductGallery/ProductGalleryContent.ts +4 -1
  453. package/src/components/StepsBlock/StepsBlock.example.json +1 -0
  454. package/src/components/TariffsTable/TariffsTable.mobile.tsx +3 -1
  455. package/src/components/TariffsTable/TariffsTableCell.tsx +28 -27
  456. package/src/components/TariffsTable/TariffsTableContent.ts +1 -1
  457. package/src/components/TariffsTable/TariffsTableTileCell.tsx +33 -31
  458. package/src/components/TextBlock/TextBlock.example.json +4 -3
  459. package/src/components/TextBlock/TextBlock.fixture.mobile.tsx +8 -0
  460. package/src/components/TextBlock/TextBlock.mobile.tsx +2 -2
  461. package/src/components/TextBlock/TextBlockContent.ts +1 -1
  462. package/src/components/Tile/Tile.tsx +3 -1
  463. package/src/content-page-repository/transformPicture.ts +2 -1
  464. package/src/icons/IconName.ts +78 -0
  465. package/src/model/BlockVersion.ts +1 -1
  466. package/src/model/Picture.ts +2 -2
  467. package/src/ui-kit/BlocksList/BlocksListProps.ts +27 -29
  468. package/src/ui-kit/BlocksList/renderBlocksList.tsx +12 -4
  469. package/src/ui-kit/Heading/Heading.tsx +1 -3
  470. package/src/ui-kit/Icon/Icon.tsx +9 -2
  471. package/src/ui-kit/Icon/IconProps.ts +2 -2
  472. package/src/ui-kit/Img/Img.tsx +5 -2
  473. package/src/ui-kit/List/List.fixture.tsx +37 -0
  474. package/src/ui-kit/List/List.tsx +9 -3
  475. package/src/ui-kit/List/ListItem.tsx +5 -12
  476. package/src/ui-kit/List/ListProps.ts +2 -0
  477. package/src/ui-kit/SearchBar/SearchBar.mobile.tsx +1 -1
  478. package/dist/components/Accordion/utils/useActiveHandler.d.ts +0 -9
  479. package/dist/components/Accordion/utils/useActiveHandler.js.map +0 -1
  480. package/dist/components/OtherProducts/utils/useActiveHandler.d.ts +0 -9
  481. package/dist/components/OtherProducts/utils/useActiveHandler.js.map +0 -1
  482. package/dist/ui-kit/BlockItem/BlockItem.d.ts +0 -2
  483. package/dist/ui-kit/BlockItem/BlockItem.js +0 -23
  484. package/dist/ui-kit/BlockItem/BlockItem.js.map +0 -1
  485. package/dist/ui-kit/BlockItem/BlockItemProps.d.ts +0 -21
  486. package/dist/ui-kit/BlockItem/BlockItemProps.js +0 -2
  487. package/dist/ui-kit/BlockItem/BlockItemProps.js.map +0 -1
  488. package/lib/components/Accordion/utils/useActiveHandler.d.ts +0 -9
  489. package/lib/components/Accordion/utils/useActiveHandler.js.map +0 -1
  490. package/lib/components/OtherProducts/utils/useActiveHandler.d.ts +0 -9
  491. package/lib/components/OtherProducts/utils/useActiveHandler.js.map +0 -1
  492. package/lib/ui-kit/BlockItem/BlockItem.d.ts +0 -2
  493. package/lib/ui-kit/BlockItem/BlockItem.fixture.d.ts +0 -8
  494. package/lib/ui-kit/BlockItem/BlockItem.js +0 -21
  495. package/lib/ui-kit/BlockItem/BlockItem.js.map +0 -1
  496. package/lib/ui-kit/BlockItem/BlockItemProps.d.ts +0 -21
  497. package/lib/ui-kit/BlockItem/BlockItemProps.js +0 -2
  498. package/lib/ui-kit/BlockItem/BlockItemProps.js.map +0 -1
  499. package/mobile/dist/components/Accordion/utils/useActiveHandler.d.ts +0 -9
  500. package/mobile/dist/components/Accordion/utils/useActiveHandler.js.map +0 -1
  501. package/mobile/dist/components/OtherProducts/utils/useActiveHandler.d.ts +0 -9
  502. package/mobile/dist/components/OtherProducts/utils/useActiveHandler.js.map +0 -1
  503. package/mobile/dist/ui-kit/BlockItem/BlockItem.d.ts +0 -2
  504. package/mobile/dist/ui-kit/BlockItem/BlockItem.js +0 -23
  505. package/mobile/dist/ui-kit/BlockItem/BlockItem.js.map +0 -1
  506. package/mobile/dist/ui-kit/BlockItem/BlockItemProps.d.ts +0 -21
  507. package/mobile/dist/ui-kit/BlockItem/BlockItemProps.js +0 -2
  508. package/mobile/dist/ui-kit/BlockItem/BlockItemProps.js.map +0 -1
  509. package/mobile/lib/components/Accordion/utils/useActiveHandler.d.ts +0 -9
  510. package/mobile/lib/components/Accordion/utils/useActiveHandler.js.map +0 -1
  511. package/mobile/lib/components/OtherProducts/utils/useActiveHandler.d.ts +0 -9
  512. package/mobile/lib/components/OtherProducts/utils/useActiveHandler.js.map +0 -1
  513. package/mobile/lib/ui-kit/BlockItem/BlockItem.d.ts +0 -2
  514. package/mobile/lib/ui-kit/BlockItem/BlockItem.js +0 -21
  515. package/mobile/lib/ui-kit/BlockItem/BlockItem.js.map +0 -1
  516. package/mobile/lib/ui-kit/BlockItem/BlockItemProps.d.ts +0 -21
  517. package/mobile/lib/ui-kit/BlockItem/BlockItemProps.js +0 -2
  518. package/mobile/lib/ui-kit/BlockItem/BlockItemProps.js.map +0 -1
  519. package/mobile/src/ui-kit/BlockItem/BlockItem.tsx +0 -33
  520. package/mobile/src/ui-kit/BlockItem/BlockItemProps.ts +0 -23
  521. package/src/ui-kit/BlockItem/BlockItem.fixture.tsx +0 -12
  522. package/src/ui-kit/BlockItem/BlockItem.tsx +0 -33
  523. package/src/ui-kit/BlockItem/BlockItemProps.ts +0 -23
@@ -8,6 +8,13 @@ import type { ProductTileContent } from '../../components/ProductTile/ProductTil
8
8
  import type { TextBlockContent } from '../../components/TextBlock/TextBlockContent';
9
9
  import type { TileContent } from '../../components/Tile/TileContent';
10
10
  import type { LinkListContent } from '../../components/LinkList/LinkListContent';
11
+ import { ContentPageContext } from '../../components/ContentPage/ContentPageContext';
12
+
13
+ export interface ActiveHandler {
14
+ context: ContentPageContext;
15
+ blocks?: BlockDef[];
16
+ initialState?: boolean;
17
+ }
11
18
 
12
19
  /**
13
20
  * @title Количество колонок
@@ -15,74 +22,65 @@ import type { LinkListContent } from '../../components/LinkList/LinkListContent'
15
22
  */
16
23
  export type ColumnsCount = 1 | 2;
17
24
 
18
- /**
19
- * @title Тип блока
20
- */
21
- export type BlockDefType =
22
- | 'Headline'
23
- | 'LinkDocs'
24
- | 'TextBlock'
25
- | 'PictureText'
26
- | 'Tile'
27
- | 'ProductTile'
28
- | 'ProductBlock'
29
- | 'Gallery'
30
- | 'MiniGallery'
31
- | 'LinkList';
32
-
33
- interface BaseBlockDef {
34
- blockListType: BlockDefType;
35
- }
36
-
37
25
  /**
38
26
  * @title Заголовок
27
+ * @default {"blockListType": "Headline"}
39
28
  */
40
- export type HeadlineBlockListDef = HeadlineContent & BaseBlockDef;
29
+ export type HeadlineBlockListDef = HeadlineContent & { blockListType: 'Headline' };
41
30
 
42
31
  /**
43
32
  * @title Список документов
33
+ * @default {"blockListType": "LinkDocs"}
44
34
  */
45
- export type LinkDocsBlockListDef = LinkDocsContent & BaseBlockDef;
35
+ export type LinkDocsBlockListDef = LinkDocsContent & { blockListType: 'LinkDocs' };
46
36
 
47
37
  /**
48
38
  * @title Текстовый блок
39
+ * @default {"blockListType": "TextBlock"}
49
40
  */
50
- export type TextBlockBlockListDef = TextBlockContent & BaseBlockDef;
41
+ export type TextBlockBlockListDef = TextBlockContent & { blockListType: 'TextBlock' };
51
42
 
52
43
  /**
53
44
  * @title Картинка с текстом
45
+ * @default {"blockListType": "PictureText"}
54
46
  */
55
- export type PictureTextBlockListDef = PictureTextContent & BaseBlockDef;
47
+ export type PictureTextBlockListDef = PictureTextContent & { blockListType: 'PictureText' };
56
48
 
57
49
  /**
58
50
  * @title Продуктовый блок
51
+ * @default {"blockListType": "ProductBlock"}
59
52
  */
60
- export type ProductBlockBlockListDef = ProductBlockContent & BaseBlockDef;
53
+ export type ProductBlockBlockListDef = ProductBlockContent & { blockListType: 'ProductBlock' };
61
54
 
62
55
  /**
63
56
  * @title Плитка
57
+ * @default {"blockListType": "Tile"}
64
58
  */
65
- export type TileBlockListDef = TileContent & BaseBlockDef;
59
+ export type TileBlockListDef = TileContent & { blockListType: 'Tile' };
66
60
 
67
61
  /**
68
62
  * @title Продуктовая плитка
63
+ * @default {"blockListType": "ProductTile"}
69
64
  */
70
- export type ProductTileBlockListDef = ProductTileContent & BaseBlockDef;
65
+ export type ProductTileBlockListDef = ProductTileContent & { blockListType: 'ProductTile' };
71
66
 
72
67
  /**
73
68
  * @title Галлерея
69
+ * @default {"blockListType": "Gallery"}
74
70
  */
75
- export type GalleryBlockListDef = GalleryContent & BaseBlockDef;
71
+ export type GalleryBlockListDef = GalleryContent & { blockListType: 'Gallery' };
76
72
 
77
73
  /**
78
74
  * @title Мини-галлерея
75
+ * @default {"blockListType": "MiniGallery"}
79
76
  */
80
- export type MiniGalleryBlockListDef = MiniGalleryContent & BaseBlockDef;
77
+ export type MiniGalleryBlockListDef = MiniGalleryContent & { blockListType: 'MiniGallery' };
81
78
 
82
79
  /**
83
80
  * @title Список ссылок
81
+ * @default {"blockListType": "LinkList"}
84
82
  */
85
- export type LinkListBlockListDef = LinkListContent & BaseBlockDef;
83
+ export type LinkListBlockListDef = LinkListContent & { blockListType: 'LinkList' };
86
84
 
87
85
  /**
88
86
  * @title Выберите блок
@@ -2,19 +2,27 @@ import type { JSXBlock } from '../../components/ContentPage/ContentPage';
2
2
  import type { ContentPageContext } from '../../components/ContentPage/ContentPageContext';
3
3
  import type { BlockDef, ColumnsCount } from './BlocksListProps';
4
4
  import { EmbeddableBlocks } from './EmbeddableBlocks';
5
+ import { BlockVersion } from '../../model/BlockVersion';
5
6
 
6
7
  type EmbeddableBlocksProps = {
7
8
  blocks?: BlockDef[];
8
9
  context: ContentPageContext;
9
10
  columns?: ColumnsCount;
10
11
  className?: string;
12
+ version?: BlockVersion;
11
13
  };
12
14
 
13
- export const renderBlocksList = ({ blocks, context, className, columns }: EmbeddableBlocksProps) =>
14
- blocks?.length ? blocks.map(renderBlock({ context, className, columns })) : null;
15
+ export const renderBlocksList = ({
16
+ blocks,
17
+ context,
18
+ className,
19
+ columns,
20
+ version,
21
+ }: EmbeddableBlocksProps) =>
22
+ blocks?.length ? blocks.map(renderBlock({ context, className, columns, version })) : null;
15
23
 
16
24
  export const renderBlock =
17
- ({ context, columns, className }: EmbeddableBlocksProps) =>
25
+ ({ context, columns, className, version }: EmbeddableBlocksProps) =>
18
26
  (block: BlockDef, i: number) => {
19
27
  const type = block?.blockListType;
20
28
  if (!type || !(type in EmbeddableBlocks)) {
@@ -24,7 +32,7 @@ export const renderBlock =
24
32
  const EmbeddedBlock: JSXBlock = EmbeddableBlocks[type];
25
33
  return (
26
34
  <div className={`${className} ${columnsCountClass}`} key={`block_${i}`}>
27
- <EmbeddedBlock context={context} {...block} className="!p-0" />
35
+ <EmbeddedBlock context={context} {...block} blockVersion={version} className="!p-0" />
28
36
  </div>
29
37
  );
30
38
  };
@@ -1,17 +1,19 @@
1
1
  import { JSX } from '@redneckz/uni-jsx';
2
2
  import { projectSettings } from '../../ProjectSettings';
3
3
  import type { IconColor, IconProps } from './IconProps';
4
+ import { IconTitleMap } from '../../icons/IconName';
4
5
 
5
6
  const svgColorsMap: Record<IconColor, string> = {
6
7
  none: '',
7
8
  primary: 'text-primary-main',
9
+ secondary: 'text-primary-text',
8
10
  };
9
11
 
10
12
  export const Icon = JSX<IconProps>(
11
13
  ({
12
14
  className = '',
13
15
  name,
14
- alt = `Icon ${name}`,
16
+ alt = `Иконка ${IconTitleMap[name] || name}`,
15
17
  title = alt,
16
18
  asSVG,
17
19
  color = 'primary',
@@ -21,7 +23,12 @@ export const Icon = JSX<IconProps>(
21
23
 
22
24
  if (asSVG) {
23
25
  return (
24
- <svg className={`${svgColorsMap[color]} ${className}`} {...imgProps} aria-hidden="true">
26
+ <svg
27
+ className={`${svgColorsMap[color]} ${className}`}
28
+ {...imgProps}
29
+ aria-hidden="true"
30
+ style={color === 'secondary' ? { filter: 'invert(1)' } : null}
31
+ >
25
32
  {title ? <title>{title}</title> : null}
26
33
  {alt ? <desc>{alt}</desc> : null}
27
34
  <use href={`${href}#icon`} xlinkHref={`${href}#icon`} />
@@ -4,9 +4,9 @@ export type { IconName };
4
4
 
5
5
  /**
6
6
  * @title Цвет иконки (svg)
7
- * @enumNames ["Нет", "Основной"]
7
+ * @enumNames ["Нет", "Основной", "Второстепенный"]
8
8
  */
9
- export type IconColor = 'none' | 'primary';
9
+ export type IconColor = 'none' | 'primary' | 'secondary';
10
10
 
11
11
  export interface IconProps {
12
12
  className?: string;
@@ -1,12 +1,18 @@
1
1
  import { JSX } from '@redneckz/uni-jsx';
2
2
  import { ListItem } from './ListItem';
3
- import { ListProps } from './ListProps';
3
+ import type { ListProps, ListItemVersion } from './ListProps';
4
+
5
+ const TEXT_STYLE_MAP: Record<ListItemVersion, string> = {
6
+ primary: 'text-primary-text',
7
+ secondary: 'text-white',
8
+ gray: 'text-secondary-text',
9
+ };
4
10
 
5
11
  export const List = JSX<ListProps>((props) => {
6
- const { className = '', itemClassName, isDotted, items, version } = props;
12
+ const { className = '', itemClassName, isDotted, items, version = 'primary' } = props;
7
13
 
8
14
  return (
9
- <section className={`${className}`} role="list">
15
+ <section className={`${TEXT_STYLE_MAP[version]} ${className}`} role="list">
10
16
  {items?.length
11
17
  ? items.map((_, i) => (
12
18
  <ListItem
@@ -1,5 +1,5 @@
1
1
  import { JSX } from '@redneckz/uni-jsx';
2
- import { ListItemVersion } from './ListProps';
2
+ import type { ListItemVersion } from './ListProps';
3
3
 
4
4
  /**
5
5
  * @title Параметры элемента списка
@@ -13,13 +13,7 @@ export interface ListItemProps {
13
13
 
14
14
  const LIST_STYLE_CLASSES = 'rounded-full inline-block mr-3 mt-2';
15
15
 
16
- const TEXT_STYLE_MAP: Record<ListItemVersion, string> = {
17
- primary: 'text-primary-text',
18
- secondary: 'text-white',
19
- gray: 'text-secondary-text',
20
- };
21
-
22
- const LIST_STYLE_MAP: Record<ListItemVersion, string> = {
16
+ const LIST_DOT_STYLE_MAP: Record<ListItemVersion, string> = {
23
17
  primary: 'bg-primary-main',
24
18
  secondary: 'bg-white',
25
19
  gray: 'bg-secondary-text',
@@ -30,14 +24,13 @@ export const ListItem = JSX<ListItemProps>(
30
24
  return (
31
25
  <div className={`font-sans flex items-start ${className}`} role="listitem">
32
26
  {isDotted && <div className={getListStyle(version)} />}
33
- <span className={`text-m-md ${TEXT_STYLE_MAP[version]}`}>{children}</span>
27
+ <span>{children}</span>
34
28
  </div>
35
29
  );
36
30
  },
37
31
  );
38
32
 
39
33
  const getListStyle = (version: ListItemVersion) => {
40
- const size =
41
- version === 'gray' ? 'w-[6px] h-[6px] min-w-[6px] min-h-[6px]' : 'w-2 h-2 min-w-2 min-h-2';
42
- return `${LIST_STYLE_CLASSES} ${LIST_STYLE_MAP[version]} ${size}`;
34
+ const size = version === 'gray' ? 'w-1.5 h-1.5 min-w-1.5 min-h-1.5' : 'w-2 h-2 min-w-2 min-h-2';
35
+ return `${LIST_STYLE_CLASSES} ${LIST_DOT_STYLE_MAP[version]} ${size}`;
43
36
  };
@@ -2,6 +2,7 @@ import type { ListContent } from './ListContent';
2
2
 
3
3
  /**
4
4
  * @title Версия списка
5
+ * @enumNames ["Основной", "Второстепенный", "Серый"]
5
6
  */
6
7
  export type ListItemVersion = 'primary' | 'secondary' | 'gray';
7
8
 
@@ -10,6 +11,7 @@ export type ListItemVersion = 'primary' | 'secondary' | 'gray';
10
11
  */
11
12
  export interface ListProps extends ListContent {
12
13
  className?: string;
14
+ /** @title Буллиты */
13
15
  isDotted?: boolean;
14
16
  version?: ListItemVersion;
15
17
  itemClassName?: string;
@@ -31,7 +31,7 @@ export const SearchBar = JSX<UniBlockProps>(({ className, context }) => {
31
31
  placeholder="some search"
32
32
  />
33
33
  <button
34
- className="visible peer-placeholder-shown:invisible absolute top-2 right-3 w-6 h-6 p-1 bg-transparent cursor-pointer"
34
+ className="visible peer-placeholder-shown:invisible absolute top-2 right-3 w-6 h-6 p-1 bg-transparent cursor-pointer border-none"
35
35
  onClick={(e) => {
36
36
  e.preventDefault();
37
37
  setTerm('');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@redneckz/wildless-cms-uni-blocks",
3
- "version": "0.3.21",
3
+ "version": "0.3.24",
4
4
  "private": false,
5
5
  "license": "MIT",
6
6
  "author": "ЦК",
@@ -1,4 +1,5 @@
1
1
  import { JSX } from '@redneckz/uni-jsx';
2
+ import { BlockVersion } from '../../model/BlockVersion';
2
3
  import type { UniBlockProps } from '../../types';
3
4
  import { Heading } from '../../ui-kit/Heading/Heading';
4
5
  import type { AccordionContent } from './AccordionContent';
@@ -6,17 +7,29 @@ import { AccordionItem } from './AccordionItem';
6
7
 
7
8
  export interface AccordionProps extends AccordionContent, UniBlockProps {}
8
9
 
9
- export const Accordion = JSX<AccordionProps>(({ title, accordionItems, context, className }) => {
10
- return (
11
- <section className={`p-[50px] font-sans bg-white text-primary-text ${className || ''}`}>
12
- {title ? <Heading headingType="h4" className="mb-2.5" title={title} /> : null}
13
- {accordionItems?.length ? (
14
- <ul className="list-none m-0 p-0">
15
- {accordionItems.map((item, i) => (
16
- <AccordionItem key={`AccordionItem${i}`} {...item} context={context} />
17
- ))}
18
- </ul>
19
- ) : null}
20
- </section>
21
- );
22
- });
10
+ const accordionStyleMap: Record<BlockVersion, string> = {
11
+ primary: 'bg-white text-primary-text',
12
+ secondary: 'bg-primary-main text-white',
13
+ };
14
+
15
+ export const Accordion = JSX<AccordionProps>(
16
+ ({ title, accordionItems, context, className = '', version = 'primary' }) => {
17
+ return (
18
+ <section className={`p-[50px] font-sans ${className} ${accordionStyleMap[version]}`}>
19
+ {title ? <Heading headingType="h4" className="mb-2.5" title={title} /> : null}
20
+ {accordionItems?.length ? (
21
+ <ul className="list-none m-0 p-0">
22
+ {accordionItems.map((item, i) => (
23
+ <AccordionItem
24
+ key={`AccordionItem${i}`}
25
+ {...item}
26
+ version={version}
27
+ context={context}
28
+ />
29
+ ))}
30
+ </ul>
31
+ ) : null}
32
+ </section>
33
+ );
34
+ },
35
+ );
@@ -1,5 +1,5 @@
1
1
  import type { BlockDef, ColumnsCount } from '../../ui-kit/BlocksList/BlocksListProps';
2
-
2
+ import type { BlockVersion } from '../../model/BlockVersion';
3
3
  /**
4
4
  * @title Элемент списка
5
5
  */
@@ -9,6 +9,10 @@ export interface AccordionItemCommonProps {
9
9
  * @default Список
10
10
  */
11
11
  label?: string;
12
+ /**
13
+ * @title Отображать в раскрытом виде
14
+ */
15
+ isExpanded?: boolean;
12
16
  /** @title Блоки */
13
17
  blocks?: BlockDef[];
14
18
  /**
@@ -16,6 +20,8 @@ export interface AccordionItemCommonProps {
16
20
  * @default false
17
21
  */
18
22
  bordered?: boolean; // TODO: только для мобильной версии
23
+ version?: BlockVersion;
24
+
19
25
  columns?: ColumnsCount;
20
26
  }
21
27
 
@@ -25,9 +31,10 @@ export interface AccordionItemCommonProps {
25
31
  export interface AccordionContent {
26
32
  /** @title Заголовок */
27
33
  title?: string;
34
+ version?: BlockVersion;
28
35
  /** @title Список */
29
36
  accordionItems?: AccordionItemCommonProps[];
30
- /** @title Подзаголовок */
37
+ /** @title Описание */
31
38
  description?: string; // TODO: только для мобильной версии
32
39
  /**
33
40
  * @title Отображать/скрывать обводку у элемента списка
@@ -3,7 +3,7 @@ import type { UniBlockProps } from '../../types';
3
3
  import { Icon } from '../../ui-kit/Icon/Icon';
4
4
  import type { AccordionItemCommonProps } from './AccordionContent';
5
5
  import { AccordionItemInner } from './AccordionItemInner';
6
- import { useActiveHandler } from './utils/useActiveHandler';
6
+ import { useActiveHandler } from './useActiveHandler';
7
7
 
8
8
  export interface AccordionItemProps extends AccordionItemCommonProps, UniBlockProps {}
9
9
 
@@ -1,37 +1,59 @@
1
1
  import { JSX } from '@redneckz/uni-jsx';
2
+ import { BlockVersion } from '../../model/BlockVersion';
2
3
  import type { UniBlockProps } from '../../types';
3
4
  import { Icon } from '../../ui-kit/Icon/Icon';
4
5
  import type { AccordionItemCommonProps } from './AccordionContent';
5
6
  import { AccordionItemInner } from './AccordionItemInner';
6
- import { useActiveHandler } from './utils/useActiveHandler';
7
+ import { useActiveHandler } from './useActiveHandler';
7
8
 
8
9
  export interface AccordionItemProps extends AccordionItemCommonProps, UniBlockProps {}
9
10
 
10
- export const AccordionItem = JSX<AccordionItemProps>(({ label, blocks, columns, context }) => {
11
- const { hasContent, icon, handleToggle } = useActiveHandler({
12
- context,
13
- blocks,
14
- });
11
+ const buttonStyleMap: Record<BlockVersion, string> = {
12
+ primary: 'text-primary-text',
13
+ secondary: 'text-white',
14
+ };
15
15
 
16
- return (
17
- <li className="border-0 border-b border-solid border-main-divider last:border-b-0">
18
- <button
19
- className={`border-none bg-transparent px-0 py-5 flex justify-between text-left w-full font-sans text-primary-text
16
+ const buttonHoverStyleMap: Record<BlockVersion, string> = {
17
+ primary: 'group-hover:text-primary-main',
18
+ secondary: 'group-hover:text-white',
19
+ };
20
+
21
+ export const AccordionItem = JSX<AccordionItemProps>(
22
+ ({ label, isExpanded, blocks, columns, context, version = 'primary' }) => {
23
+ const { isActive, hasContent, icon, handleToggle } = useActiveHandler({
24
+ context,
25
+ blocks,
26
+ initialState: isExpanded,
27
+ });
28
+
29
+ return (
30
+ <li className="border-0 border-b border-solid border-main-divider last:border-b-0">
31
+ <button
32
+ className={`border-none bg-transparent px-0 py-5 flex justify-between text-left w-full font-sans ${
33
+ buttonStyleMap[version]
34
+ }
20
35
  ${hasContent ? 'group cursor-pointer' : ''}`}
21
- onClick={handleToggle}
22
- >
23
- <span
24
- className={`text-xl pr-2.5 font-medium ${
25
- hasContent ? 'group-hover:text-primary-main' : ''
26
- }`}
36
+ onClick={handleToggle}
27
37
  >
28
- {label}
29
- </span>
30
- {hasContent ? <Icon name={icon} width="24" height="24" asSVG /> : null}
31
- </button>
32
- {hasContent ? (
33
- <AccordionItemInner columns={columns} blocks={blocks} context={context} />
34
- ) : null}
35
- </li>
36
- );
37
- });
38
+ <span
39
+ className={`text-xl pr-2.5 font-medium ${
40
+ hasContent ? buttonHoverStyleMap[version] : ''
41
+ }`}
42
+ >
43
+ {label}
44
+ </span>
45
+ {hasContent ? <Icon name={icon} width="24" height="24" asSVG /> : null}
46
+ </button>
47
+ {hasContent ? (
48
+ <AccordionItemInner
49
+ isExpanded={isActive}
50
+ columns={columns}
51
+ blocks={blocks}
52
+ version={version}
53
+ context={context}
54
+ />
55
+ ) : null}
56
+ </li>
57
+ );
58
+ },
59
+ );
@@ -2,12 +2,14 @@ import { JSX } from '@redneckz/uni-jsx';
2
2
  import type { AccordionItemProps } from './AccordionItem';
3
3
  import { renderBlocksList } from '../../ui-kit/BlocksList/renderBlocksList';
4
4
 
5
- export const AccordionItemInner = JSX<AccordionItemProps>(({ blocks, context }) => {
6
- const className = 'mb-5 last:mb-0 first:mt-2';
7
- const columns = 1;
8
- return (
9
- <div className="transition-all duration-300 max-h-0 overflow-hidden group-last:last:pb-0">
10
- {renderBlocksList({ context, className, columns, blocks })}
11
- </div>
12
- );
13
- });
5
+ export const AccordionItemInner = JSX<AccordionItemProps>(
6
+ ({ blocks, context, version = 'primary' }) => {
7
+ const className = 'mb-5 last:mb-0 first:mt-2';
8
+ const columns = 1;
9
+ return (
10
+ <div className="transition-all duration-300 max-h-0 overflow-hidden group-last:last:pb-0">
11
+ {renderBlocksList({ context, className, columns, blocks, version })}
12
+ </div>
13
+ );
14
+ },
15
+ );
@@ -2,11 +2,13 @@ import { JSX } from '@redneckz/uni-jsx';
2
2
  import type { AccordionItemProps } from './AccordionItem';
3
3
  import { renderBlocksList } from '../../ui-kit/BlocksList/renderBlocksList';
4
4
 
5
- export const AccordionItemInner = JSX<AccordionItemProps>(({ blocks, columns = 1, context }) => {
6
- const className = 'mb-5 last:mb-0 pb-5';
7
- return (
8
- <div className="transition-all duration-300 max-h-0 overflow-hidden">
9
- {renderBlocksList({ context, className, columns, blocks })}
10
- </div>
11
- );
12
- });
5
+ export const AccordionItemInner = JSX<AccordionItemProps>(
6
+ ({ blocks, columns = 1, context, version = 'primary' }) => {
7
+ const className = 'mb-5 last:mb-0 pb-5';
8
+ return (
9
+ <div className="transition-all duration-300 max-h-0 overflow-hidden">
10
+ {renderBlocksList({ context, className, columns, blocks, version })}
11
+ </div>
12
+ );
13
+ },
14
+ );
@@ -1,7 +1,8 @@
1
- import type { IconName } from '../../../icons/IconName';
1
+ import type { IconName } from '../../icons/IconName';
2
+ import { ActiveHandler } from '../../ui-kit/BlocksList/BlocksListProps';
2
3
 
3
- export const useActiveHandler = ({ context, blocks }) => {
4
- const [isActive, setIsActive] = context.useState(false);
4
+ export const useActiveHandler = ({ context, blocks, initialState = false }: ActiveHandler) => {
5
+ const [isActive, setIsActive] = context.useState(initialState);
5
6
  const hasContent = blocks?.length;
6
7
  const icon: IconName = isActive ? 'MinusIcon' : 'PlusIcon';
7
8
 
@@ -143,7 +143,7 @@ export default {
143
143
  isColoredFirstColumn={true}
144
144
  context={context}
145
145
  rowHeaders={rowHeaders}
146
- useSwiper={true}
146
+ useSwiper={'horizontal'}
147
147
  columns={Array(2).fill(columns).flat()}
148
148
  visibleRowLength={2}
149
149
  />
@@ -16,7 +16,7 @@ export const ComparisonTable = JSX<ComparisonTableProps>(
16
16
  columns,
17
17
  visibleRowLength = 0,
18
18
  isColoredFirstColumn = false,
19
- useSwiper = false,
19
+ useSwiper = 'horizontal',
20
20
  }) => {
21
21
  const tableData =
22
22
  columns?.map(({ data, header }) => ({
@@ -65,41 +65,62 @@ const renderColumns = ({
65
65
  isColoredFirstColumn,
66
66
  columnsViewState,
67
67
  handleToggleColumn,
68
- useSwiper,
68
+ useSwiper = 'horizontal',
69
69
  setColumnsViewState,
70
70
  }) => (
71
71
  <div role="table">
72
- {tableData?.length ? (
73
- useSwiper ? (
74
- <SwipeListControl
75
- context={context}
76
- onSlideChange={onSlideChange(columnsViewState, setColumnsViewState)}
77
- >
78
- {tableData.map(
79
- renderColumn({
80
- context,
81
- visibleRowLength,
82
- isColoredFirstColumn,
83
- columnsViewState,
84
- handleToggleColumn,
85
- }),
86
- )}
87
- </SwipeListControl>
88
- ) : (
89
- tableData.map(
90
- renderColumn({
91
- context,
92
- visibleRowLength,
93
- isColoredFirstColumn,
94
- columnsViewState,
95
- handleToggleColumn,
96
- }),
97
- )
98
- )
99
- ) : null}
72
+ {tableData?.length
73
+ ? renderInnerTable({
74
+ useSwiper,
75
+ context,
76
+ columnsViewState,
77
+ setColumnsViewState,
78
+ tableData,
79
+ visibleRowLength,
80
+ isColoredFirstColumn,
81
+ handleToggleColumn,
82
+ })
83
+ : null}
100
84
  </div>
101
85
  );
102
86
 
87
+ const renderInnerTable = ({
88
+ useSwiper,
89
+ context,
90
+ columnsViewState,
91
+ setColumnsViewState,
92
+ tableData,
93
+ visibleRowLength,
94
+ isColoredFirstColumn,
95
+ handleToggleColumn,
96
+ }) =>
97
+ useSwiper === 'horizontal' ? (
98
+ tableData.map(
99
+ renderColumn({
100
+ context,
101
+ visibleRowLength,
102
+ isColoredFirstColumn,
103
+ columnsViewState,
104
+ handleToggleColumn,
105
+ }),
106
+ )
107
+ ) : (
108
+ <SwipeListControl
109
+ context={context}
110
+ onSlideChange={onSlideChange(columnsViewState, setColumnsViewState)}
111
+ >
112
+ {tableData.map(
113
+ renderColumn({
114
+ context,
115
+ visibleRowLength,
116
+ isColoredFirstColumn,
117
+ columnsViewState,
118
+ handleToggleColumn,
119
+ }),
120
+ )}
121
+ </SwipeListControl>
122
+ );
123
+
103
124
  const renderColumn =
104
125
  ({ context, visibleRowLength, isColoredFirstColumn, columnsViewState, handleToggleColumn }) =>
105
126
  (columnData, i) =>