@redneckz/wildless-cms-uni-blocks 0.6.46 → 0.6.47

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 (396) hide show
  1. package/bundle/blocks.schema.json +1 -1
  2. package/bundle/bundle.umd.js +53 -47
  3. package/bundle/bundle.umd.min.js +1 -1
  4. package/bundle/components/CarouselRecommendationCard/CarouselRecommendationCardContent.d.ts +2 -2
  5. package/bundle/components/ProductTile/ProductTileContent.d.ts +5 -5
  6. package/bundle/components/RichTextBlock/RichTextBlock.d.ts +6 -0
  7. package/bundle/components/RichTextBlock/RichTextBlockContent.d.ts +5 -0
  8. package/bundle/content-page-repository/replaceHeadingTags.d.ts +1 -0
  9. package/bundle/content-page-repository/transformHTML.d.ts +1 -0
  10. package/bundle/model/BlockVersion.d.ts +6 -0
  11. package/bundle/ui-kit/Img/Img.mobile.d.ts +2 -2
  12. package/bundle/ui-kit/Img/ImgAsPicture.d.ts +2 -2
  13. package/bundle/ui-kit/Img/ImgInner.d.ts +2 -2
  14. package/bundle/ui-kit/Img/ImgProps.d.ts +4 -5
  15. package/bundle/ui-kit/RichText/RichText.d.ts +2 -0
  16. package/bundle/ui-kit/RichText/RichTextProps.d.ts +6 -0
  17. package/dist/components/AccordionItem/AccordionItem.js +1 -1
  18. package/dist/components/AccordionItem/AccordionItem.js.map +1 -1
  19. package/dist/components/Blocks.js +10 -8
  20. package/dist/components/Blocks.js.map +1 -1
  21. package/dist/components/BusinessBlock/BusinessCard.js +1 -1
  22. package/dist/components/BusinessBlock/BusinessCard.js.map +1 -1
  23. package/dist/components/Carousel/Carousel.js +3 -1
  24. package/dist/components/Carousel/Carousel.js.map +1 -1
  25. package/dist/components/CarouselRecommendationCard/CarouselRecommendationCard.js +4 -3
  26. package/dist/components/CarouselRecommendationCard/CarouselRecommendationCard.js.map +1 -1
  27. package/dist/components/CarouselRecommendationCard/CarouselRecommendationCardContent.d.ts +2 -2
  28. package/dist/components/ExchangeRateTile/CurrencyTable.js +2 -1
  29. package/dist/components/ExchangeRateTile/CurrencyTable.js.map +1 -1
  30. package/dist/components/Header/HeaderBurger.js +1 -1
  31. package/dist/components/Header/HeaderBurger.js.map +1 -1
  32. package/dist/components/InsuranceAmountBlock/InsuranceAmountBlockInner.js +1 -1
  33. package/dist/components/InsuranceAmountBlock/InsuranceAmountBlockInner.js.map +1 -1
  34. package/dist/components/ProductTile/ProductTileContent.d.ts +5 -5
  35. package/dist/components/ProductTile/renderBenefit.js +4 -4
  36. package/dist/components/ProductTile/renderBenefit.js.map +1 -1
  37. package/dist/components/RichTextBlock/RichTextBlock.d.ts +6 -0
  38. package/dist/components/RichTextBlock/RichTextBlock.js +11 -0
  39. package/dist/components/RichTextBlock/RichTextBlock.js.map +1 -0
  40. package/dist/components/RichTextBlock/RichTextBlockContent.d.ts +5 -0
  41. package/dist/components/RichTextBlock/RichTextBlockContent.js +2 -0
  42. package/dist/components/RichTextBlock/RichTextBlockContent.js.map +1 -0
  43. package/dist/content-page-repository/replaceHeadingTags.d.ts +1 -0
  44. package/dist/content-page-repository/replaceHeadingTags.js +5 -0
  45. package/dist/content-page-repository/replaceHeadingTags.js.map +1 -0
  46. package/dist/content-page-repository/transformContentPage.js +5 -0
  47. package/dist/content-page-repository/transformContentPage.js.map +1 -1
  48. package/dist/content-page-repository/transformHTML.d.ts +1 -0
  49. package/dist/content-page-repository/transformHTML.js +23 -0
  50. package/dist/content-page-repository/transformHTML.js.map +1 -0
  51. package/dist/content-page-repository/transformMarkdown.js +2 -1
  52. package/dist/content-page-repository/transformMarkdown.js.map +1 -1
  53. package/dist/model/BlockVersion.d.ts +6 -0
  54. package/dist/model/BlockVersion.js +6 -1
  55. package/dist/model/BlockVersion.js.map +1 -1
  56. package/dist/ui-kit/Button/ButtonSection.js +1 -1
  57. package/dist/ui-kit/Button/ButtonSection.js.map +1 -1
  58. package/dist/ui-kit/Img/Img.mobile.d.ts +2 -2
  59. package/dist/ui-kit/Img/Img.mobile.js.map +1 -1
  60. package/dist/ui-kit/Img/ImgAsPicture.d.ts +2 -2
  61. package/dist/ui-kit/Img/ImgAsPicture.js +7 -7
  62. package/dist/ui-kit/Img/ImgAsPicture.js.map +1 -1
  63. package/dist/ui-kit/Img/ImgInner.d.ts +2 -2
  64. package/dist/ui-kit/Img/ImgInner.js +2 -8
  65. package/dist/ui-kit/Img/ImgInner.js.map +1 -1
  66. package/dist/ui-kit/Img/ImgProps.d.ts +4 -5
  67. package/dist/ui-kit/InnerTable/InnerTableBody.js +1 -1
  68. package/dist/ui-kit/InnerTable/InnerTableBody.js.map +1 -1
  69. package/dist/ui-kit/Location/Location.js +1 -1
  70. package/dist/ui-kit/Location/Location.js.map +1 -1
  71. package/dist/ui-kit/Logo/renderImage.js +1 -1
  72. package/dist/ui-kit/Logo/renderImage.js.map +1 -1
  73. package/dist/ui-kit/RichText/RichText.d.ts +2 -0
  74. package/dist/ui-kit/{MarkdownText/MarkdownText.js → RichText/RichText.js} +5 -5
  75. package/dist/ui-kit/RichText/RichText.js.map +1 -0
  76. package/dist/ui-kit/RichText/RichTextProps.d.ts +6 -0
  77. package/dist/ui-kit/{MarkdownText/MarkdownTextProps.js → RichText/RichTextProps.js} +1 -1
  78. package/dist/ui-kit/RichText/RichTextProps.js.map +1 -0
  79. package/dist/ui-kit/SearchBar/SearchBarInner.js +2 -2
  80. package/dist/ui-kit/SearchBar/SearchBarInner.js.map +1 -1
  81. package/lib/common.css +1 -1
  82. package/lib/components/AccordionItem/AccordionItem.js +1 -1
  83. package/lib/components/AccordionItem/AccordionItem.js.map +1 -1
  84. package/lib/components/Blocks.js +10 -8
  85. package/lib/components/Blocks.js.map +1 -1
  86. package/lib/components/BusinessBlock/BusinessCard.js +1 -1
  87. package/lib/components/BusinessBlock/BusinessCard.js.map +1 -1
  88. package/lib/components/Carousel/Carousel.js +3 -1
  89. package/lib/components/Carousel/Carousel.js.map +1 -1
  90. package/lib/components/CarouselRecommendationCard/CarouselRecommendationCard.fixture.d.ts +1 -0
  91. package/lib/components/CarouselRecommendationCard/CarouselRecommendationCard.js +5 -4
  92. package/lib/components/CarouselRecommendationCard/CarouselRecommendationCard.js.map +1 -1
  93. package/lib/components/CarouselRecommendationCard/CarouselRecommendationCardContent.d.ts +2 -2
  94. package/lib/components/ExchangeRateTile/CurrencyTable.js +2 -1
  95. package/lib/components/ExchangeRateTile/CurrencyTable.js.map +1 -1
  96. package/lib/components/Header/HeaderBurger.js +1 -1
  97. package/lib/components/Header/HeaderBurger.js.map +1 -1
  98. package/lib/components/InsuranceAmountBlock/InsuranceAmountBlockInner.js +1 -1
  99. package/lib/components/InsuranceAmountBlock/InsuranceAmountBlockInner.js.map +1 -1
  100. package/lib/components/ProductTile/ProductTileContent.d.ts +5 -5
  101. package/lib/components/ProductTile/renderBenefit.js +4 -4
  102. package/lib/components/ProductTile/renderBenefit.js.map +1 -1
  103. package/lib/components/RichTextBlock/RichTextBlock.d.ts +6 -0
  104. package/lib/components/RichTextBlock/RichTextBlock.fixture.d.ts +6 -0
  105. package/lib/components/RichTextBlock/RichTextBlock.js +9 -0
  106. package/lib/components/RichTextBlock/RichTextBlock.js.map +1 -0
  107. package/lib/components/RichTextBlock/RichTextBlockContent.d.ts +5 -0
  108. package/lib/components/RichTextBlock/RichTextBlockContent.js +2 -0
  109. package/lib/components/RichTextBlock/RichTextBlockContent.js.map +1 -0
  110. package/lib/content-page-repository/replaceHeadingTags.d.ts +1 -0
  111. package/lib/content-page-repository/replaceHeadingTags.js +2 -0
  112. package/lib/content-page-repository/replaceHeadingTags.js.map +1 -0
  113. package/lib/content-page-repository/transformContentPage.js +5 -0
  114. package/lib/content-page-repository/transformContentPage.js.map +1 -1
  115. package/lib/content-page-repository/transformHTML.d.ts +1 -0
  116. package/lib/content-page-repository/transformHTML.js +17 -0
  117. package/lib/content-page-repository/transformHTML.js.map +1 -0
  118. package/lib/content-page-repository/transformMarkdown.js +2 -1
  119. package/lib/content-page-repository/transformMarkdown.js.map +1 -1
  120. package/lib/model/BlockVersion.d.ts +6 -0
  121. package/lib/model/BlockVersion.js +5 -0
  122. package/lib/model/BlockVersion.js.map +1 -1
  123. package/lib/ui-kit/Button/ButtonSection.js +1 -1
  124. package/lib/ui-kit/Button/ButtonSection.js.map +1 -1
  125. package/lib/ui-kit/Img/Img.mobile.d.ts +2 -2
  126. package/lib/ui-kit/Img/Img.mobile.js.map +1 -1
  127. package/lib/ui-kit/Img/ImgAsPicture.d.ts +2 -2
  128. package/lib/ui-kit/Img/ImgAsPicture.js +7 -7
  129. package/lib/ui-kit/Img/ImgAsPicture.js.map +1 -1
  130. package/lib/ui-kit/Img/ImgInner.d.ts +2 -2
  131. package/lib/ui-kit/Img/ImgInner.js +2 -8
  132. package/lib/ui-kit/Img/ImgInner.js.map +1 -1
  133. package/lib/ui-kit/Img/ImgProps.d.ts +4 -5
  134. package/lib/ui-kit/InnerTable/InnerTableBody.js +1 -1
  135. package/lib/ui-kit/InnerTable/InnerTableBody.js.map +1 -1
  136. package/lib/ui-kit/Location/Location.js +1 -1
  137. package/lib/ui-kit/Location/Location.js.map +1 -1
  138. package/lib/ui-kit/Logo/renderImage.js +1 -1
  139. package/lib/ui-kit/Logo/renderImage.js.map +1 -1
  140. package/lib/ui-kit/RichText/RichText.d.ts +2 -0
  141. package/lib/ui-kit/RichText/RichText.fixture.d.ts +5 -0
  142. package/lib/ui-kit/{MarkdownText/MarkdownText.js → RichText/RichText.js} +4 -4
  143. package/lib/ui-kit/RichText/RichText.js.map +1 -0
  144. package/lib/ui-kit/RichText/RichTextProps.d.ts +6 -0
  145. package/lib/ui-kit/RichText/RichTextProps.js +2 -0
  146. package/lib/ui-kit/RichText/RichTextProps.js.map +1 -0
  147. package/lib/ui-kit/SearchBar/SearchBarInner.js +2 -2
  148. package/lib/ui-kit/SearchBar/SearchBarInner.js.map +1 -1
  149. package/mobile/bundle/bundle.umd.js +15 -24
  150. package/mobile/bundle/bundle.umd.min.js +1 -1
  151. package/mobile/bundle/components/CarouselRecommendationCard/CarouselRecommendationCardContent.d.ts +2 -2
  152. package/mobile/bundle/components/ProductTile/ProductTileContent.d.ts +5 -5
  153. package/mobile/bundle/components/RichTextBlock/RichTextBlock.d.ts +6 -0
  154. package/mobile/bundle/components/RichTextBlock/RichTextBlockContent.d.ts +5 -0
  155. package/mobile/bundle/content-page-repository/replaceHeadingTags.d.ts +1 -0
  156. package/mobile/bundle/content-page-repository/transformHTML.d.ts +1 -0
  157. package/mobile/bundle/model/BlockVersion.d.ts +6 -0
  158. package/mobile/bundle/ui-kit/Img/Img.d.ts +2 -2
  159. package/mobile/bundle/ui-kit/Img/ImgAsPicture.d.ts +2 -2
  160. package/mobile/bundle/ui-kit/Img/ImgInner.d.ts +2 -2
  161. package/mobile/bundle/ui-kit/Img/ImgProps.d.ts +4 -5
  162. package/mobile/bundle/ui-kit/RichText/RichText.d.ts +2 -0
  163. package/mobile/bundle/ui-kit/RichText/RichTextProps.d.ts +6 -0
  164. package/mobile/dist/components/BusinessBlock/BusinessCard.js +1 -1
  165. package/mobile/dist/components/BusinessBlock/BusinessCard.js.map +1 -1
  166. package/mobile/dist/components/Carousel/Carousel.js +3 -1
  167. package/mobile/dist/components/Carousel/Carousel.js.map +1 -1
  168. package/mobile/dist/components/CarouselRecommendationCard/CarouselRecommendationCard.js +4 -3
  169. package/mobile/dist/components/CarouselRecommendationCard/CarouselRecommendationCard.js.map +1 -1
  170. package/mobile/dist/components/CarouselRecommendationCard/CarouselRecommendationCardContent.d.ts +2 -2
  171. package/mobile/dist/components/ExchangeRateTile/CurrencyTable.js +2 -1
  172. package/mobile/dist/components/ExchangeRateTile/CurrencyTable.js.map +1 -1
  173. package/mobile/dist/components/Header/HeaderBurger.js +1 -1
  174. package/mobile/dist/components/Header/HeaderBurger.js.map +1 -1
  175. package/mobile/dist/components/InsuranceAmountBlock/InsuranceAmountBlockInner.js +1 -1
  176. package/mobile/dist/components/InsuranceAmountBlock/InsuranceAmountBlockInner.js.map +1 -1
  177. package/mobile/dist/components/ProductTile/ProductTileContent.d.ts +5 -5
  178. package/mobile/dist/components/ProductTile/renderBenefit.js +4 -4
  179. package/mobile/dist/components/ProductTile/renderBenefit.js.map +1 -1
  180. package/mobile/dist/components/RichTextBlock/RichTextBlock.d.ts +6 -0
  181. package/mobile/dist/components/RichTextBlock/RichTextBlock.js +11 -0
  182. package/mobile/dist/components/RichTextBlock/RichTextBlock.js.map +1 -0
  183. package/mobile/dist/components/RichTextBlock/RichTextBlockContent.d.ts +5 -0
  184. package/mobile/dist/components/RichTextBlock/RichTextBlockContent.js +2 -0
  185. package/mobile/dist/components/RichTextBlock/RichTextBlockContent.js.map +1 -0
  186. package/mobile/dist/content-page-repository/replaceHeadingTags.d.ts +1 -0
  187. package/mobile/dist/content-page-repository/replaceHeadingTags.js +5 -0
  188. package/mobile/dist/content-page-repository/replaceHeadingTags.js.map +1 -0
  189. package/mobile/dist/content-page-repository/transformContentPage.js +5 -0
  190. package/mobile/dist/content-page-repository/transformContentPage.js.map +1 -1
  191. package/mobile/dist/content-page-repository/transformHTML.d.ts +1 -0
  192. package/mobile/dist/content-page-repository/transformHTML.js +23 -0
  193. package/mobile/dist/content-page-repository/transformHTML.js.map +1 -0
  194. package/mobile/dist/content-page-repository/transformMarkdown.js +2 -1
  195. package/mobile/dist/content-page-repository/transformMarkdown.js.map +1 -1
  196. package/mobile/dist/model/BlockVersion.d.ts +6 -0
  197. package/mobile/dist/model/BlockVersion.js +6 -1
  198. package/mobile/dist/model/BlockVersion.js.map +1 -1
  199. package/mobile/dist/ui-kit/Button/ButtonSection.js +1 -1
  200. package/mobile/dist/ui-kit/Button/ButtonSection.js.map +1 -1
  201. package/mobile/dist/ui-kit/Img/Img.d.ts +2 -2
  202. package/mobile/dist/ui-kit/Img/Img.js.map +1 -1
  203. package/mobile/dist/ui-kit/Img/ImgAsPicture.d.ts +2 -2
  204. package/mobile/dist/ui-kit/Img/ImgAsPicture.js +7 -7
  205. package/mobile/dist/ui-kit/Img/ImgAsPicture.js.map +1 -1
  206. package/mobile/dist/ui-kit/Img/ImgInner.d.ts +2 -2
  207. package/mobile/dist/ui-kit/Img/ImgInner.js +2 -8
  208. package/mobile/dist/ui-kit/Img/ImgInner.js.map +1 -1
  209. package/mobile/dist/ui-kit/Img/ImgProps.d.ts +4 -5
  210. package/mobile/dist/ui-kit/InnerTable/InnerTableBody.js +1 -1
  211. package/mobile/dist/ui-kit/InnerTable/InnerTableBody.js.map +1 -1
  212. package/mobile/dist/ui-kit/Location/Location.js +1 -1
  213. package/mobile/dist/ui-kit/Location/Location.js.map +1 -1
  214. package/mobile/dist/ui-kit/Logo/renderImage.js +1 -1
  215. package/mobile/dist/ui-kit/Logo/renderImage.js.map +1 -1
  216. package/mobile/dist/ui-kit/RichText/RichText.d.ts +2 -0
  217. package/mobile/dist/ui-kit/{MarkdownText/MarkdownText.js → RichText/RichText.js} +5 -5
  218. package/mobile/dist/ui-kit/RichText/RichText.js.map +1 -0
  219. package/mobile/dist/ui-kit/RichText/RichTextProps.d.ts +6 -0
  220. package/mobile/dist/ui-kit/{MarkdownText/MarkdownTextProps.js → RichText/RichTextProps.js} +1 -1
  221. package/mobile/dist/ui-kit/RichText/RichTextProps.js.map +1 -0
  222. package/mobile/dist/ui-kit/SearchBar/SearchBarInner.js +2 -2
  223. package/mobile/dist/ui-kit/SearchBar/SearchBarInner.js.map +1 -1
  224. package/mobile/lib/components/BusinessBlock/BusinessCard.js +1 -1
  225. package/mobile/lib/components/BusinessBlock/BusinessCard.js.map +1 -1
  226. package/mobile/lib/components/Carousel/Carousel.js +3 -1
  227. package/mobile/lib/components/Carousel/Carousel.js.map +1 -1
  228. package/mobile/lib/components/CarouselRecommendationCard/CarouselRecommendationCard.js +5 -4
  229. package/mobile/lib/components/CarouselRecommendationCard/CarouselRecommendationCard.js.map +1 -1
  230. package/mobile/lib/components/CarouselRecommendationCard/CarouselRecommendationCardContent.d.ts +2 -2
  231. package/mobile/lib/components/ExchangeRateTile/CurrencyTable.js +2 -1
  232. package/mobile/lib/components/ExchangeRateTile/CurrencyTable.js.map +1 -1
  233. package/mobile/lib/components/Header/HeaderBurger.js +1 -1
  234. package/mobile/lib/components/Header/HeaderBurger.js.map +1 -1
  235. package/mobile/lib/components/InsuranceAmountBlock/InsuranceAmountBlockInner.js +1 -1
  236. package/mobile/lib/components/InsuranceAmountBlock/InsuranceAmountBlockInner.js.map +1 -1
  237. package/mobile/lib/components/ProductTile/ProductTileContent.d.ts +5 -5
  238. package/mobile/lib/components/ProductTile/renderBenefit.js +4 -4
  239. package/mobile/lib/components/ProductTile/renderBenefit.js.map +1 -1
  240. package/mobile/lib/components/RichTextBlock/RichTextBlock.d.ts +6 -0
  241. package/mobile/lib/components/RichTextBlock/RichTextBlock.js +9 -0
  242. package/mobile/lib/components/RichTextBlock/RichTextBlock.js.map +1 -0
  243. package/mobile/lib/components/RichTextBlock/RichTextBlockContent.d.ts +5 -0
  244. package/mobile/lib/components/RichTextBlock/RichTextBlockContent.js +2 -0
  245. package/mobile/lib/components/RichTextBlock/RichTextBlockContent.js.map +1 -0
  246. package/mobile/lib/content-page-repository/replaceHeadingTags.d.ts +1 -0
  247. package/mobile/lib/content-page-repository/replaceHeadingTags.js +2 -0
  248. package/mobile/lib/content-page-repository/replaceHeadingTags.js.map +1 -0
  249. package/mobile/lib/content-page-repository/transformContentPage.js +5 -0
  250. package/mobile/lib/content-page-repository/transformContentPage.js.map +1 -1
  251. package/mobile/lib/content-page-repository/transformHTML.d.ts +1 -0
  252. package/mobile/lib/content-page-repository/transformHTML.js +17 -0
  253. package/mobile/lib/content-page-repository/transformHTML.js.map +1 -0
  254. package/mobile/lib/content-page-repository/transformMarkdown.js +2 -1
  255. package/mobile/lib/content-page-repository/transformMarkdown.js.map +1 -1
  256. package/mobile/lib/model/BlockVersion.d.ts +6 -0
  257. package/mobile/lib/model/BlockVersion.js +5 -0
  258. package/mobile/lib/model/BlockVersion.js.map +1 -1
  259. package/mobile/lib/ui-kit/Button/ButtonSection.js +1 -1
  260. package/mobile/lib/ui-kit/Button/ButtonSection.js.map +1 -1
  261. package/mobile/lib/ui-kit/Img/Img.d.ts +2 -2
  262. package/mobile/lib/ui-kit/Img/Img.js.map +1 -1
  263. package/mobile/lib/ui-kit/Img/ImgAsPicture.d.ts +2 -2
  264. package/mobile/lib/ui-kit/Img/ImgAsPicture.js +7 -7
  265. package/mobile/lib/ui-kit/Img/ImgAsPicture.js.map +1 -1
  266. package/mobile/lib/ui-kit/Img/ImgInner.d.ts +2 -2
  267. package/mobile/lib/ui-kit/Img/ImgInner.js +2 -8
  268. package/mobile/lib/ui-kit/Img/ImgInner.js.map +1 -1
  269. package/mobile/lib/ui-kit/Img/ImgProps.d.ts +4 -5
  270. package/mobile/lib/ui-kit/InnerTable/InnerTableBody.js +1 -1
  271. package/mobile/lib/ui-kit/InnerTable/InnerTableBody.js.map +1 -1
  272. package/mobile/lib/ui-kit/Location/Location.js +1 -1
  273. package/mobile/lib/ui-kit/Location/Location.js.map +1 -1
  274. package/mobile/lib/ui-kit/Logo/renderImage.js +1 -1
  275. package/mobile/lib/ui-kit/Logo/renderImage.js.map +1 -1
  276. package/mobile/lib/ui-kit/RichText/RichText.d.ts +2 -0
  277. package/mobile/lib/ui-kit/{MarkdownText/MarkdownText.js → RichText/RichText.js} +4 -4
  278. package/mobile/lib/ui-kit/RichText/RichText.js.map +1 -0
  279. package/mobile/lib/ui-kit/RichText/RichTextProps.d.ts +6 -0
  280. package/mobile/lib/ui-kit/RichText/RichTextProps.js +2 -0
  281. package/mobile/lib/ui-kit/RichText/RichTextProps.js.map +1 -0
  282. package/mobile/lib/ui-kit/SearchBar/SearchBarInner.js +2 -2
  283. package/mobile/lib/ui-kit/SearchBar/SearchBarInner.js.map +1 -1
  284. package/mobile/src/common.css +27 -10
  285. package/mobile/src/components/BusinessBlock/BusinessCard.tsx +2 -6
  286. package/mobile/src/components/Carousel/Carousel.tsx +3 -1
  287. package/mobile/src/components/CarouselRecommendationCard/CarouselRecommendationCard.tsx +13 -4
  288. package/mobile/src/components/CarouselRecommendationCard/CarouselRecommendationCardContent.ts +2 -2
  289. package/mobile/src/components/ExchangeRateTile/CurrencyTable.tsx +3 -2
  290. package/mobile/src/components/Header/HeaderBurger.tsx +2 -2
  291. package/mobile/src/components/InsuranceAmountBlock/InsuranceAmountBlockInner.tsx +1 -1
  292. package/mobile/src/components/ProductTile/ProductTile.ui.json +1 -1
  293. package/mobile/src/components/ProductTile/ProductTileContent.ts +5 -5
  294. package/mobile/src/components/ProductTile/renderBenefit.tsx +4 -4
  295. package/mobile/src/components/RichTextBlock/RichTextBlock.example.json +5 -0
  296. package/mobile/src/components/RichTextBlock/RichTextBlock.tsx +17 -0
  297. package/mobile/src/components/RichTextBlock/RichTextBlock.ui.json +7 -0
  298. package/mobile/src/components/RichTextBlock/RichTextBlockContent.ts +6 -0
  299. package/mobile/src/components/VerticalLayout/VerticalLayout.example.json +151 -6
  300. package/mobile/src/content-page-repository/replaceHeadingTags.ts +2 -0
  301. package/mobile/src/content-page-repository/transformContentPage.ts +4 -0
  302. package/mobile/src/content-page-repository/transformHTML.ts +19 -0
  303. package/mobile/src/content-page-repository/transformMarkdown.ts +2 -1
  304. package/mobile/src/model/BlockVersion.ts +12 -0
  305. package/mobile/src/ui-kit/Button/ButtonSection.tsx +1 -1
  306. package/mobile/src/ui-kit/Img/Img.tsx +2 -3
  307. package/mobile/src/ui-kit/Img/ImgAsPicture.tsx +10 -8
  308. package/mobile/src/ui-kit/Img/ImgInner.tsx +13 -21
  309. package/mobile/src/ui-kit/Img/ImgProps.ts +4 -6
  310. package/mobile/src/ui-kit/InnerTable/InnerTableBody.tsx +1 -1
  311. package/mobile/src/ui-kit/Location/Location.tsx +1 -1
  312. package/mobile/src/ui-kit/Logo/renderImage.tsx +2 -1
  313. package/mobile/src/ui-kit/RichText/RichText.tsx +8 -0
  314. package/mobile/src/ui-kit/RichText/RichTextProps.ts +6 -0
  315. package/mobile/src/ui-kit/SearchBar/SearchBarInner.tsx +2 -2
  316. package/package.json +4 -1
  317. package/src/common.css +27 -10
  318. package/src/components/AccordionItem/AccordionItem.tsx +7 -1
  319. package/src/components/Blocks.ts +10 -8
  320. package/src/components/BusinessBlock/BusinessCard.tsx +2 -6
  321. package/src/components/Carousel/Carousel.tsx +3 -1
  322. package/src/components/CarouselRecommendationCard/CarouselRecommendationCard.fixture.tsx +9 -0
  323. package/src/components/CarouselRecommendationCard/CarouselRecommendationCard.tsx +13 -4
  324. package/src/components/CarouselRecommendationCard/CarouselRecommendationCardContent.ts +2 -2
  325. package/src/components/ExchangeRateTile/CurrencyTable.tsx +3 -2
  326. package/src/components/Header/HeaderBurger.tsx +2 -2
  327. package/src/components/InsuranceAmountBlock/InsuranceAmountBlockInner.tsx +1 -1
  328. package/src/components/ProductTile/ProductTile.ui.json +1 -1
  329. package/src/components/ProductTile/ProductTileContent.ts +5 -5
  330. package/src/components/ProductTile/renderBenefit.tsx +4 -4
  331. package/src/components/RichTextBlock/RichTextBlock.example.json +5 -0
  332. package/src/components/RichTextBlock/RichTextBlock.fixture.tsx +29 -0
  333. package/src/components/RichTextBlock/RichTextBlock.tsx +17 -0
  334. package/src/components/RichTextBlock/RichTextBlock.ui.json +7 -0
  335. package/src/components/RichTextBlock/RichTextBlockContent.ts +6 -0
  336. package/src/components/VerticalLayout/VerticalLayout.example.json +151 -6
  337. package/src/content-page-repository/replaceHeadingTags.ts +2 -0
  338. package/src/content-page-repository/transformContentPage.ts +4 -0
  339. package/src/content-page-repository/transformHTML.ts +19 -0
  340. package/src/content-page-repository/transformMarkdown.ts +2 -1
  341. package/src/model/BlockVersion.ts +12 -0
  342. package/src/ui-kit/Button/ButtonSection.tsx +1 -1
  343. package/src/ui-kit/Img/Img.mobile.tsx +2 -3
  344. package/src/ui-kit/Img/ImgAsPicture.tsx +10 -8
  345. package/src/ui-kit/Img/ImgInner.tsx +13 -21
  346. package/src/ui-kit/Img/ImgProps.ts +4 -6
  347. package/src/ui-kit/InnerTable/InnerTableBody.tsx +1 -1
  348. package/src/ui-kit/Location/Location.tsx +1 -1
  349. package/src/ui-kit/Logo/renderImage.tsx +2 -1
  350. package/src/ui-kit/RichText/RichText.fixture.tsx +28 -0
  351. package/src/ui-kit/RichText/RichText.tsx +8 -0
  352. package/src/ui-kit/RichText/RichTextProps.ts +6 -0
  353. package/src/ui-kit/SearchBar/SearchBarInner.tsx +2 -2
  354. package/tailwind.config.cjs +7 -7
  355. package/bundle/ui-kit/Img/getIconVersion.d.ts +0 -2
  356. package/bundle/ui-kit/MarkdownText/MarkdownText.d.ts +0 -2
  357. package/bundle/ui-kit/MarkdownText/MarkdownTextProps.d.ts +0 -6
  358. package/dist/ui-kit/Img/getIconVersion.d.ts +0 -2
  359. package/dist/ui-kit/Img/getIconVersion.js +0 -7
  360. package/dist/ui-kit/Img/getIconVersion.js.map +0 -1
  361. package/dist/ui-kit/MarkdownText/MarkdownText.d.ts +0 -2
  362. package/dist/ui-kit/MarkdownText/MarkdownText.js.map +0 -1
  363. package/dist/ui-kit/MarkdownText/MarkdownTextProps.d.ts +0 -6
  364. package/dist/ui-kit/MarkdownText/MarkdownTextProps.js.map +0 -1
  365. package/lib/ui-kit/Img/getIconVersion.d.ts +0 -2
  366. package/lib/ui-kit/Img/getIconVersion.js +0 -4
  367. package/lib/ui-kit/Img/getIconVersion.js.map +0 -1
  368. package/lib/ui-kit/MarkdownText/MarkdownText.d.ts +0 -2
  369. package/lib/ui-kit/MarkdownText/MarkdownText.js.map +0 -1
  370. package/lib/ui-kit/MarkdownText/MarkdownTextProps.d.ts +0 -6
  371. package/lib/ui-kit/MarkdownText/MarkdownTextProps.js +0 -2
  372. package/lib/ui-kit/MarkdownText/MarkdownTextProps.js.map +0 -1
  373. package/mobile/bundle/ui-kit/Img/getIconVersion.d.ts +0 -2
  374. package/mobile/bundle/ui-kit/MarkdownText/MarkdownText.d.ts +0 -2
  375. package/mobile/bundle/ui-kit/MarkdownText/MarkdownTextProps.d.ts +0 -6
  376. package/mobile/dist/ui-kit/Img/getIconVersion.d.ts +0 -2
  377. package/mobile/dist/ui-kit/Img/getIconVersion.js +0 -7
  378. package/mobile/dist/ui-kit/Img/getIconVersion.js.map +0 -1
  379. package/mobile/dist/ui-kit/MarkdownText/MarkdownText.d.ts +0 -2
  380. package/mobile/dist/ui-kit/MarkdownText/MarkdownText.js.map +0 -1
  381. package/mobile/dist/ui-kit/MarkdownText/MarkdownTextProps.d.ts +0 -6
  382. package/mobile/dist/ui-kit/MarkdownText/MarkdownTextProps.js.map +0 -1
  383. package/mobile/lib/ui-kit/Img/getIconVersion.d.ts +0 -2
  384. package/mobile/lib/ui-kit/Img/getIconVersion.js +0 -4
  385. package/mobile/lib/ui-kit/Img/getIconVersion.js.map +0 -1
  386. package/mobile/lib/ui-kit/MarkdownText/MarkdownText.d.ts +0 -2
  387. package/mobile/lib/ui-kit/MarkdownText/MarkdownText.js.map +0 -1
  388. package/mobile/lib/ui-kit/MarkdownText/MarkdownTextProps.d.ts +0 -6
  389. package/mobile/lib/ui-kit/MarkdownText/MarkdownTextProps.js +0 -2
  390. package/mobile/lib/ui-kit/MarkdownText/MarkdownTextProps.js.map +0 -1
  391. package/mobile/src/ui-kit/Img/getIconVersion.tsx +0 -5
  392. package/mobile/src/ui-kit/MarkdownText/MarkdownText.tsx +0 -8
  393. package/mobile/src/ui-kit/MarkdownText/MarkdownTextProps.ts +0 -6
  394. package/src/ui-kit/Img/getIconVersion.tsx +0 -5
  395. package/src/ui-kit/MarkdownText/MarkdownText.tsx +0 -8
  396. package/src/ui-kit/MarkdownText/MarkdownTextProps.ts +0 -6
@@ -0,0 +1,5 @@
1
+ {
2
+ "content": {
3
+ "__html": "<p class=\"h1\">Заголовок 1</p>\n<p class=\"h2\">Заголовок 2</p>\n<p class=\"h3\">Заголовок 3</p>\n<p class=\"h4\">Заголовок 4</p>\n<p class=\"h5\">Заголовок 5</p>\n<p class=\"h6\">Заголовок 6</p>\n<p>Параграф, в котором много текста и даже <a href=\"#\">ссылка</a></p>\n<p><strong>Жирный текст</strong>, <em>Наклонный текст</em></p>\n<ul>\n <li>Список с точками</li>\n <li>Список с точками</li>\n</ul>\n<ol>\n <li>Нумерованный список</li>\n <li>Нумерованный список</li>\n</ol>\n"
4
+ }
5
+ }
@@ -0,0 +1,29 @@
1
+ import '../../setup-fixture';
2
+ import { RichTextBlock } from './RichTextBlock';
3
+
4
+ const HTML = `
5
+ <p class="h1">Заголовок 1</p>
6
+ <p class="h2">Заголовок 2</p>
7
+ <p class="h3">Заголовок 3</p>
8
+ <p class="h4">Заголовок 4</p>
9
+ <p class="h5">Заголовок 5</p>
10
+ <p class="h6">Заголовок 6</p>
11
+ <p>Параграф, в котором много текста и даже <a href="#">ссылка</a></p>
12
+ <p><strong>Жирный текст</strong>, <em>Наклонный текст</em></p>
13
+ <ul>
14
+ <li>Список с точками</li>
15
+ <li>Список с точками</li>
16
+ </ul>
17
+ <ol>
18
+ <li>Нумерованный список</li>
19
+ <li>Нумерованный список</li>
20
+ </ol>
21
+ `;
22
+
23
+ export default {
24
+ default: (
25
+ <div className="container grid grid-cols-12">
26
+ <RichTextBlock className="col-span-12" __html={HTML} />
27
+ </div>
28
+ ),
29
+ };
@@ -0,0 +1,17 @@
1
+ import { JSX } from '@redneckz/uni-jsx';
2
+ import type { UniBlockProps } from '../../model/JSXBlock';
3
+ import { BlockWrapper } from '../../ui-kit/BlockWrapper';
4
+ import { RichText } from '../../ui-kit/RichText/RichText';
5
+ import type { RichTextBlockContent } from './RichTextBlockContent';
6
+
7
+ interface RichTextBlockProps extends RichTextBlockContent, UniBlockProps {}
8
+
9
+ export const RichTextBlock = JSX<RichTextBlockProps>((props) => {
10
+ const { __html, ...rest } = props;
11
+
12
+ return (
13
+ <BlockWrapper {...rest}>
14
+ <RichText __html={__html} />
15
+ </BlockWrapper>
16
+ );
17
+ });
@@ -0,0 +1,7 @@
1
+ {
2
+ "content": {
3
+ "__html": {
4
+ "ui:widget": "html"
5
+ }
6
+ }
7
+ }
@@ -0,0 +1,6 @@
1
+ import type { RichTextProps } from '../../ui-kit/RichText/RichTextProps';
2
+
3
+ /**
4
+ * @title Форматированный текст
5
+ */
6
+ export type RichTextBlockContent = RichTextProps;
@@ -1,20 +1,165 @@
1
1
  {
2
2
  "content": {
3
- "version": "transparent",
3
+ "version": "primary",
4
4
  "isPadding": false,
5
5
  "isInnerPadding": true,
6
6
  "align": "left",
7
7
  "gap": ""
8
8
  },
9
+ "style": ["col-span-12"],
10
+ "type": "VerticalLayout",
9
11
  "blocks": [
10
12
  {
11
- "type": "Headline",
12
13
  "content": {
13
- "title": "Заголовок блока",
14
- "description": "Описание блока",
15
- "headlineVersion": "M"
14
+ "isBlur": false,
15
+ "visibleItemCount": 3,
16
+ "isCycle": false
16
17
  },
17
- "style": ["col-span-12"]
18
+ "style": ["col-span-12"],
19
+ "type": "Carousel",
20
+ "blocks": [
21
+ {
22
+ "content": {
23
+ "image": {
24
+ "alignment": "center",
25
+ "size": {
26
+ "width": 230,
27
+ "height": 230
28
+ },
29
+ "alt": "",
30
+ "title": "",
31
+ "iconVersion": "normal",
32
+ "format": "webp"
33
+ },
34
+ "button": {
35
+ "text": "Подробнее",
36
+ "icon": {
37
+ "alignment": "center",
38
+ "format": "webp",
39
+ "size": {
40
+ "width": 24,
41
+ "height": 24
42
+ },
43
+ "alt": "",
44
+ "title": "",
45
+ "iconVersion": "normal"
46
+ },
47
+ "version": "primary",
48
+ "iconRight": {
49
+ "alignment": "center",
50
+ "format": "webp",
51
+ "size": {
52
+ "width": 24,
53
+ "height": 24
54
+ },
55
+ "alt": "",
56
+ "title": "",
57
+ "iconVersion": "normal"
58
+ },
59
+ "target": "_self",
60
+ "href": ""
61
+ },
62
+ "title": "Заголовок карточки 1",
63
+ "description": "Описание карточки 1"
64
+ },
65
+ "style": ["col-span-12"],
66
+ "type": "CarouselCatalogCard"
67
+ },
68
+ {
69
+ "content": {
70
+ "image": {
71
+ "alignment": "center",
72
+ "size": {
73
+ "width": 230,
74
+ "height": 230
75
+ },
76
+ "alt": "",
77
+ "title": "",
78
+ "iconVersion": "normal",
79
+ "format": "webp"
80
+ },
81
+ "button": {
82
+ "text": "Подробнее",
83
+ "icon": {
84
+ "alignment": "center",
85
+ "format": "webp",
86
+ "size": {
87
+ "width": 24,
88
+ "height": 24
89
+ },
90
+ "alt": "",
91
+ "title": "",
92
+ "iconVersion": "normal"
93
+ },
94
+ "version": "primary",
95
+ "iconRight": {
96
+ "alignment": "center",
97
+ "format": "webp",
98
+ "size": {
99
+ "width": 24,
100
+ "height": 24
101
+ },
102
+ "alt": "",
103
+ "title": "",
104
+ "iconVersion": "normal"
105
+ },
106
+ "target": "_self",
107
+ "href": ""
108
+ },
109
+ "title": "Заголовок карточки 2",
110
+ "description": "Описание карточки 2"
111
+ },
112
+ "style": ["col-span-12"],
113
+ "type": "CarouselCatalogCard"
114
+ },
115
+ {
116
+ "content": {
117
+ "image": {
118
+ "alignment": "center",
119
+ "size": {
120
+ "width": 230,
121
+ "height": 230
122
+ },
123
+ "alt": "",
124
+ "title": "",
125
+ "iconVersion": "normal",
126
+ "format": "webp"
127
+ },
128
+ "button": {
129
+ "text": "Подробнее",
130
+ "icon": {
131
+ "alignment": "center",
132
+ "format": "webp",
133
+ "size": {
134
+ "width": 24,
135
+ "height": 24
136
+ },
137
+ "alt": "",
138
+ "title": "",
139
+ "iconVersion": "normal"
140
+ },
141
+ "version": "primary",
142
+ "iconRight": {
143
+ "alignment": "center",
144
+ "format": "webp",
145
+ "size": {
146
+ "width": 24,
147
+ "height": 24
148
+ },
149
+ "alt": "",
150
+ "title": "",
151
+ "iconVersion": "normal"
152
+ },
153
+ "target": "_self",
154
+ "href": ""
155
+ },
156
+ "title": "Заголовок карточки 3",
157
+ "description": "Описание карточки 3"
158
+ },
159
+ "style": ["col-span-12"],
160
+ "type": "CarouselCatalogCard"
161
+ }
162
+ ]
18
163
  }
19
164
  ]
20
165
  }
@@ -0,0 +1,2 @@
1
+ export const replaceHeadingTags = (html: string) =>
2
+ html.replaceAll(/<h(\d)>([^<]*)<\/h\d>/g, '<p class="h$1">$2</p>');
@@ -4,6 +4,7 @@ import type { ContentPageDef } from '../model/ContentPageDef';
4
4
  import type { Picture } from '../model/Picture';
5
5
  import { mapJSON } from './mapJSON';
6
6
  import type { TransformationOptions } from './TransformationOptions';
7
+ import { transformHTML } from './transformHTML';
7
8
  import { transformMarkdown } from './transformMarkdown';
8
9
  import { transformPicture } from './transformPicture';
9
10
 
@@ -18,9 +19,12 @@ export async function transformContentPage(
18
19
  // eslint-disable-next-line @typescript-eslint/no-unsafe-argument
19
20
  return mapJSON<ContentPageDef>(JSON.parse(content), async (value: any, [key]) => {
20
21
  const isMarkdown = typeof value === 'string' && key?.endsWith('__md');
22
+ const isHTML = typeof value === 'string' && key?.endsWith('__html');
21
23
 
22
24
  if (isMarkdown) {
23
25
  return await transformMarkdown(value);
26
+ } else if (isHTML) {
27
+ return await transformHTML(value);
24
28
  } else if (isPicture(value)) {
25
29
  try {
26
30
  return await transformPicture(pagePath, value, options);
@@ -0,0 +1,19 @@
1
+ import rehypeParse from 'rehype-parse/lib';
2
+ import rehypeSanitize from 'rehype-sanitize';
3
+ import rehypeStringify from 'rehype-stringify';
4
+ import { unified } from 'unified';
5
+ import { replaceHeadingTags } from './replaceHeadingTags';
6
+
7
+ export async function transformHTML(html: string | null | undefined): Promise<string> {
8
+ if (!html) {
9
+ return '';
10
+ }
11
+
12
+ const result = await unified()
13
+ .use(rehypeParse)
14
+ .use(rehypeSanitize)
15
+ .use(rehypeStringify)
16
+ .process(html);
17
+
18
+ return replaceHeadingTags(result.toString('utf-8'));
19
+ }
@@ -1,6 +1,7 @@
1
1
  import remarkHtml from 'remark-html';
2
2
  import remarkParse from 'remark-parse';
3
3
  import { unified } from 'unified';
4
+ import { replaceHeadingTags } from './replaceHeadingTags';
4
5
 
5
6
  export async function transformMarkdown(markdown: string | null | undefined): Promise<string> {
6
7
  if (!markdown) {
@@ -9,5 +10,5 @@ export async function transformMarkdown(markdown: string | null | undefined): Pr
9
10
 
10
11
  const result = await unified().use(remarkParse).use(remarkHtml).process(markdown);
11
12
 
12
- return result.toString('utf-8').replaceAll(/<h(\d)>([^<]*)<\/h\d>/g, '<p class="h$1">$2</p>');
13
+ return replaceHeadingTags(result.toString('utf-8'));
13
14
  }
@@ -12,6 +12,12 @@ export type BlockVersion = 'primary' | 'secondary';
12
12
  */
13
13
  export type BlockVersionWithTransparent = 'transparent' | 'primary' | 'secondary';
14
14
 
15
+ /**
16
+ * @title Цвет блока
17
+ * @enumNames [ "Основная", "Второстепенная", "Серая"]
18
+ */
19
+ export type BlockVersionWithGray = 'primary' | 'secondary' | 'gray';
20
+
15
21
  export const VersionStyleMap: Record<BlockVersion, string> = {
16
22
  primary: 'bg-white text-primary-text',
17
23
  secondary: 'bg-primary-main text-white',
@@ -28,6 +34,12 @@ export const VersionWithTransparentStyleMap: Record<BlockVersionWithTransparent,
28
34
  secondary: 'bg-primary-main text-white',
29
35
  };
30
36
 
37
+ export const VersionWithGrayStyleMap: Record<BlockVersionWithGray, string> = {
38
+ primary: 'bg-white text-primary-text',
39
+ secondary: 'bg-primary-main text-white',
40
+ gray: 'bg-main-divider text-primary-text',
41
+ };
42
+
31
43
  export const GapStyleMap: Record<GapVersion, string> = {
32
44
  XXL: 'gap-12',
33
45
  XL: 'gap-10',
@@ -47,5 +47,5 @@ const renderButtonIcon = (icon: Picture) => {
47
47
  }
48
48
  const iconWidth = icon?.size?.width ? `${icon.size.width}` : '24';
49
49
 
50
- return <Img image={{ ...icon }} width={iconWidth} height="24" asSVG />;
50
+ return <Img image={icon} width={iconWidth} height="24" asSVG />;
51
51
  };
@@ -1,6 +1,5 @@
1
1
  import { JSX } from '@redneckz/uni-jsx';
2
2
  import { ImgInner } from './ImgInner';
3
+ import type { ImageProps } from './ImgProps';
3
4
 
4
- import type { Image, ImageProps } from './ImgProps';
5
-
6
- export const Img = JSX<ImageProps<Image>>((props) => <ImgInner {...props} isMobile={true} />);
5
+ export const Img = JSX<ImageProps>((props) => <ImgInner {...props} isMobile={true} />);
@@ -10,14 +10,13 @@ const sourcesComparator = (a: Picture, b: Picture) => {
10
10
  return 0;
11
11
  };
12
12
 
13
- export const ImgAsPicture = JSX<ImageProps<Picture>>(
14
- ({ className = '', image, imageClassName = '', isMobile = false, pathPrefix = '' }) => {
13
+ export const ImgAsPicture = JSX<ImageProps>(
14
+ ({ className = '', image, imageClassName = '', isMobile = false, pathPrefix }) => {
15
15
  if (!image || (!image?.sources && !image?.src)) {
16
16
  return null;
17
17
  }
18
18
 
19
19
  const pictureStyles = isMobile ? 'flex' : 'flex-none';
20
- const normalizedPathPrefix = normalizePathPrefix(pathPrefix);
21
20
 
22
21
  return (
23
22
  <picture className={`${pictureStyles} ${className}`}>
@@ -27,7 +26,7 @@ export const ImgAsPicture = JSX<ImageProps<Picture>>(
27
26
  .map(({ src, format, media }, index) => (
28
27
  <source
29
28
  key={`${index}_${src}`}
30
- srcSet={addPathPrefixToSrcSet(src, normalizedPathPrefix)}
29
+ srcSet={addPathPrefixToSrcSet(src, pathPrefix)}
31
30
  type={formatToMimeType(format)}
32
31
  media={media ? `(max-width: ${media}px)` : ''}
33
32
  {...image.size}
@@ -35,7 +34,7 @@ export const ImgAsPicture = JSX<ImageProps<Picture>>(
35
34
  ))
36
35
  : null}
37
36
  {renderImg(
38
- { ...image, src: `${normalizedPathPrefix}${image.src}` },
37
+ { ...image, src: addPathPrefixToSrc(image.src, pathPrefix) },
39
38
  imageClassName,
40
39
  isMobile,
41
40
  )}
@@ -69,10 +68,13 @@ const renderImg = (image: Picture, imageClassName = '', isMobile = false) => {
69
68
  const normalizePathPrefix = (pathPrefix = '') =>
70
69
  pathPrefix && !pathPrefix.endsWith('/') ? `${pathPrefix}/` : pathPrefix;
71
70
 
72
- const addPathPrefixToSrcSet = (srcset = '', pathPrefix = '') =>
71
+ const addPathPrefixToSrc = (src?: string, pathPrefix?: string) =>
72
+ !src || src?.startsWith('data:image') ? src : `${normalizePathPrefix(pathPrefix)}${src}`;
73
+
74
+ const addPathPrefixToSrcSet = (srcset?: string, pathPrefix?: string) =>
73
75
  srcset
74
- .split(',')
75
- .map((src) => `${pathPrefix}${src.trim()}`)
76
+ ?.split(',')
77
+ .map((src) => addPathPrefixToSrc(src.trim(), pathPrefix))
76
78
  .join(', ');
77
79
 
78
80
  export function formatToMimeType(format: ImgSource['format']): string | undefined {
@@ -1,35 +1,27 @@
1
1
  import { JSX } from '@redneckz/uni-jsx';
2
- import type { Picture } from '../../model/Picture';
3
2
  import { Icon } from '../Icon/Icon';
4
- import { getIconVersion } from './getIconVersion';
5
3
  import { ImgAsPicture } from './ImgAsPicture';
6
- import type { Image, ImageProps } from './ImgProps';
4
+ import type { ImageProps } from './ImgProps';
7
5
 
8
- export const ImgInner = JSX<ImageProps<Image>>(
6
+ export const ImgInner = JSX<ImageProps>(
9
7
  ({ className = '', image, imageClassName = '', isMobile, pathPrefix, ...iconProps }) => {
10
- if (!image) {
8
+ if (!image?.src && !image?.icon) {
11
9
  return null;
12
10
  }
13
11
 
14
- // backwards compatibility with existing icons in usage
15
- const icon = typeof image === 'string' ? image : image.icon;
16
- if (icon || icon === '') {
17
- return icon.length ? (
18
- <Icon
19
- className={className}
20
- imageClassName={imageClassName}
21
- iconVersion={getIconVersion(image)}
22
- name={icon}
23
- {...iconProps}
24
- />
25
- ) : null;
26
- }
27
-
28
- return (
12
+ return image.icon ? (
13
+ <Icon
14
+ className={className}
15
+ imageClassName={imageClassName}
16
+ iconVersion={image?.iconVersion || 'normal'}
17
+ name={image.icon}
18
+ {...iconProps}
19
+ />
20
+ ) : (
29
21
  <ImgAsPicture
30
22
  className={className}
31
23
  imageClassName={imageClassName}
32
- image={image as Picture}
24
+ image={image}
33
25
  isMobile={isMobile}
34
26
  pathPrefix={pathPrefix}
35
27
  />
@@ -1,12 +1,10 @@
1
1
  import type { Picture } from '../../model/Picture';
2
- import type { IconCompatibilityFields, IconName } from '../Icon/IconProps';
2
+ import type { IconCompatibilityFields } from '../Icon/IconProps';
3
3
 
4
- export type Image = Picture | IconName;
5
-
6
- export interface ImageContent<T = Picture> {
7
- image?: T;
4
+ export interface ImageContent {
5
+ image?: Picture;
8
6
  }
9
- export interface ImageProps<T> extends ImageContent<T>, IconCompatibilityFields {
7
+ export interface ImageProps extends ImageContent, IconCompatibilityFields {
10
8
  className?: string;
11
9
  imageClassName?: string;
12
10
  isMobile?: boolean;
@@ -30,7 +30,7 @@ export const InnerTableBody = JSX<InnerTableBodyProps>(({ activeTabIndex, items
30
30
  >
31
31
  {_.title}
32
32
  <Img
33
- image={hiddenTables[key] ? 'PlusIcon' : 'MinusIcon'}
33
+ image={{ icon: hiddenTables[key] ? 'PlusIcon' : 'MinusIcon' }}
34
34
  className="absolute right-[22px]"
35
35
  width="24"
36
36
  height="24"
@@ -103,7 +103,7 @@ const CloseButton = JSX<CloseButtonProps>(({ close }) => (
103
103
  close && close();
104
104
  }}
105
105
  >
106
- <Img image="CloseIcon" width="24" height="24" />
106
+ <Img image={{ icon: 'CloseIcon' }} width="24" height="24" />
107
107
  </button>
108
108
  ));
109
109
 
@@ -1,4 +1,4 @@
1
- import { BgColorVersion } from '../../model/BgColorVersion';
1
+ import type { BgColorVersion } from '../../model/BgColorVersion';
2
2
  import type { Picture } from '../../model/Picture';
3
3
  import { Img } from '../Img/Img';
4
4
 
@@ -23,6 +23,7 @@ export const renderImage = (
23
23
  className={SVG_COLOR[bgColor]}
24
24
  width={size?.width}
25
25
  height={size?.height}
26
+ pathPrefix="/wcms-resources/"
26
27
  asSVG
27
28
  />
28
29
  ) : (
@@ -0,0 +1,28 @@
1
+ import { RichText } from './RichText';
2
+
3
+ const HTML = `
4
+ <p class="h1">Заголовок 1</p>
5
+ <p class="h2">Заголовок 2</p>
6
+ <p class="h3">Заголовок 3</p>
7
+ <p class="h4">Заголовок 4</p>
8
+ <p class="h5">Заголовок 5</p>
9
+ <p class="h6">Заголовок 6</p>
10
+ <p>Параграф, в котором много текста и даже <a href="#">ссылка</a></p>
11
+ <p><strong>Жирный текст</strong>, <em>Наклонный текст</em></p>
12
+ <ul>
13
+ <li>Список с точками</li>
14
+ <li>Список с точками</li>
15
+ </ul>
16
+ <ol>
17
+ <li>Нумерованный список</li>
18
+ <li>Нумерованный список</li>
19
+ </ol>
20
+ `;
21
+
22
+ export default {
23
+ default: (
24
+ <section className="p-12">
25
+ <RichText __html={HTML} />
26
+ </section>
27
+ ),
28
+ };
@@ -0,0 +1,8 @@
1
+ import { JSX } from '@redneckz/uni-jsx';
2
+ import type { RichTextProps } from './RichTextProps';
3
+
4
+ export const RichText = JSX<RichTextProps>((props) => {
5
+ const { __html = '' } = props;
6
+
7
+ return <div className="md-container" dangerouslySetInnerHTML={{ __html }} />;
8
+ });
@@ -0,0 +1,6 @@
1
+ type HTML = string;
2
+
3
+ export interface RichTextProps {
4
+ /** @title Текст */
5
+ __html?: HTML;
6
+ }
@@ -20,7 +20,7 @@ export const SearchBarInner = JSX<SearchBarInnerProps>(({ className, isMobile =
20
20
  <form className={`font-sans relative ${className}`}>
21
21
  <div className="absolute rounded h-full flex items-center justify-center pl-4 max-w-[170px] gap-3.5 pointer-events-none">
22
22
  <div className={LoupeIconClassName}>
23
- <Img image="LoupeIcon" width="24" height="24" />
23
+ <Img image={{ icon: 'LoupeIcon' }} width="24" height="24" />
24
24
  </div>
25
25
  {term ? null : (
26
26
  <label
@@ -49,7 +49,7 @@ export const SearchBarInner = JSX<SearchBarInnerProps>(({ className, isMobile =
49
49
  setTerm('');
50
50
  }}
51
51
  >
52
- <Img image="CloseIcon" width="24" height="24" />
52
+ <Img image={{ icon: 'CloseIcon' }} width="24" height="24" />
53
53
  </button>
54
54
  ) : (
55
55
  <Button
@@ -253,13 +253,13 @@ module.exports = {
253
253
  'blue-gray/24': '0 14px 36px -4px rgba(21, 40, 90, 0.24);',
254
254
  },
255
255
  borderColor: {
256
- 'white/50': 'rgba(255,255,255,.5);',
257
- 'gray/100': 'rgba(235, 237, 240, 1);',
258
- 'primary-hover': 'rgba(134, 134, 134, 1);',
259
- 'primary-focus': 'rgba(28, 28, 28, 1);',
260
- 'checkbox-hover': 'rgba(134, 134, 134, 1);',
261
- 'green-light': 'rgba(219, 242, 219, 1);',
262
- golden: 'rgba(255, 237, 184, 1);',
256
+ 'white/50': 'rgba(255,255,255,.5)',
257
+ 'gray/100': 'rgba(235, 237, 240, 1)',
258
+ 'primary-hover': 'rgba(134, 134, 134, 1)',
259
+ 'primary-focus': 'rgba(28, 28, 28, 1)',
260
+ 'checkbox-hover': 'rgba(134, 134, 134, 1)',
261
+ 'green-light': 'rgba(219, 242, 219, 1)',
262
+ golden: 'rgba(255, 237, 184, 1)',
263
263
  'color-stroke': 'rgba(201, 202, 204, 1)',
264
264
  },
265
265
  },
@@ -1,2 +0,0 @@
1
- import type { Image } from './ImgProps';
2
- export declare function getIconVersion(image?: Image): import("../../model/IconVersion").IconVersion;
@@ -1,2 +0,0 @@
1
- import type { MarkdownTextProps } from './MarkdownTextProps';
2
- export declare const MarkdownText: import("@redneckz/uni-jsx").UNIComponent<MarkdownTextProps, any, any>;
@@ -1,6 +0,0 @@
1
- declare type Markdown = string;
2
- export interface MarkdownTextProps {
3
- /** @title Текст */
4
- md?: Markdown;
5
- }
6
- export {};
@@ -1,2 +0,0 @@
1
- import type { Image } from './ImgProps';
2
- export declare function getIconVersion(image?: Image): import("../../model/IconVersion").IconVersion;
@@ -1,7 +0,0 @@
1
- Object.defineProperty(exports, "__esModule", { value: true });
2
- exports.getIconVersion = void 0;
3
- function getIconVersion(image) {
4
- return typeof image === 'string' ? 'normal' : image?.iconVersion || 'normal';
5
- }
6
- exports.getIconVersion = getIconVersion;
7
- //# sourceMappingURL=getIconVersion.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"getIconVersion.js","sourceRoot":"","sources":["../../../src/ui-kit/Img/getIconVersion.tsx"],"names":[],"mappings":";;AAEA,SAAgB,cAAc,CAAC,KAAa;IAC1C,OAAO,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,KAAK,EAAE,WAAW,IAAI,QAAQ,CAAC;AAC/E,CAAC;AAFD,wCAEC"}
@@ -1,2 +0,0 @@
1
- import type { MarkdownTextProps } from './MarkdownTextProps';
2
- export declare const MarkdownText: import("@redneckz/uni-jsx").UNIComponent<MarkdownTextProps, any, any>;
@@ -1 +0,0 @@
1
- {"version":3,"file":"MarkdownText.js","sourceRoot":"","sources":["../../../src/ui-kit/MarkdownText/MarkdownText.tsx"],"names":[],"mappings":";;;AAAA,+CAAwC;AAG3B,QAAA,YAAY,GAAG,IAAA,aAAG,EAAoB,CAAC,KAAK,EAAE,EAAE;IAC3D,MAAM,EAAE,EAAE,GAAG,EAAE,EAAE,GAAG,KAAK,CAAC;IAE1B,OAAO,gCAAK,SAAS,EAAC,cAAc,EAAC,uBAAuB,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,GAAI,CAAC;AACnF,CAAC,CAAC,CAAC"}
@@ -1,6 +0,0 @@
1
- declare type Markdown = string;
2
- export interface MarkdownTextProps {
3
- /** @title Текст */
4
- md?: Markdown;
5
- }
6
- export {};
@@ -1 +0,0 @@
1
- {"version":3,"file":"MarkdownTextProps.js","sourceRoot":"","sources":["../../../src/ui-kit/MarkdownText/MarkdownTextProps.ts"],"names":[],"mappings":""}