@redneckz/wildless-cms-uni-blocks 0.4.1 → 0.4.3

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 (327) hide show
  1. package/bundle/blocks.schema.json +1 -1
  2. package/bundle/bundle.umd.js +108 -85
  3. package/bundle/bundle.umd.min.js +1 -1
  4. package/dist/components/BaseTile/BaseTile.js +1 -1
  5. package/dist/components/BaseTile/BaseTile.js.map +1 -1
  6. package/dist/components/BenefitsBlock/BenefitsBlock.js.map +1 -1
  7. package/dist/components/BenefitsBlock/BenefitsBlockContent.d.ts +2 -2
  8. package/dist/components/BlockContent.d.ts +1 -2
  9. package/dist/components/Blocks.d.ts +0 -1
  10. package/dist/components/Blocks.js +0 -2
  11. package/dist/components/Blocks.js.map +1 -1
  12. package/dist/components/Footer/MediaButton.d.ts +1 -1
  13. package/dist/components/Footer/SocialMedia.d.ts +1 -1
  14. package/dist/components/Footer/SocialMedia.mobile.d.ts +1 -1
  15. package/dist/components/Gallery/GalleryContainer.js.map +1 -1
  16. package/dist/components/PictureText/PictureText.js +14 -5
  17. package/dist/components/PictureText/PictureText.js.map +1 -1
  18. package/dist/components/PictureText/PictureTextContent.d.ts +8 -16
  19. package/dist/components/ProductBlock/ProductBlockContent.d.ts +3 -15
  20. package/dist/components/ProductBlock/ProductBlockInner.js +1 -1
  21. package/dist/components/ProductBlock/ProductBlockInner.js.map +1 -1
  22. package/dist/components/ProductBlock/ProductBlockInner.mobile.js +1 -1
  23. package/dist/components/ProductBlock/ProductBlockInner.mobile.js.map +1 -1
  24. package/dist/components/ProductBlock/renderBenefit.d.ts +4 -2
  25. package/dist/components/ProductBlock/renderBenefit.js +3 -22
  26. package/dist/components/ProductBlock/renderBenefit.js.map +1 -1
  27. package/dist/components/ProductGallery/ProductGallery.js +5 -5
  28. package/dist/components/ProductGallery/ProductGallery.js.map +1 -1
  29. package/dist/components/ProductTile/ProductTile.js +1 -1
  30. package/dist/components/ProductTile/ProductTile.js.map +1 -1
  31. package/dist/components/PromoTile/PromoTile.js +1 -1
  32. package/dist/components/PromoTile/PromoTile.js.map +1 -1
  33. package/dist/components/Recommendation/RecommendationCard.d.ts +1 -1
  34. package/dist/components/StepsBlock/StepsBlockStyleMaps.d.ts +1 -1
  35. package/dist/components/Tabs/Tabs.d.ts +2 -1
  36. package/dist/components/Tabs/Tabs.js +3 -3
  37. package/dist/components/Tabs/Tabs.js.map +1 -1
  38. package/dist/components/Tabs/TabsContent.d.ts +8 -2
  39. package/dist/components/Tabs/renderGroupTab.d.ts +4 -0
  40. package/dist/components/Tabs/renderGroupTab.js +18 -0
  41. package/dist/components/Tabs/renderGroupTab.js.map +1 -0
  42. package/dist/components/Tabs/renderLinkTab.d.ts +8 -0
  43. package/dist/components/Tabs/renderLinkTab.js +7 -0
  44. package/dist/components/Tabs/renderLinkTab.js.map +1 -0
  45. package/dist/components/Tabs/renderTab.d.ts +5 -5
  46. package/dist/components/Tabs/renderTab.js +14 -14
  47. package/dist/components/Tabs/renderTab.js.map +1 -1
  48. package/dist/components/Tabs/tabItemClasses.d.ts +6 -0
  49. package/dist/components/Tabs/tabItemClasses.js +9 -0
  50. package/dist/components/Tabs/tabItemClasses.js.map +1 -0
  51. package/dist/ui-kit/BenefitItem/BenefitItem.d.ts +4 -0
  52. package/dist/ui-kit/BenefitItem/BenefitItem.js +29 -0
  53. package/dist/ui-kit/BenefitItem/BenefitItem.js.map +1 -0
  54. package/dist/ui-kit/BenefitItem/BenefitItemProps.d.ts +24 -0
  55. package/dist/{components/Insurance/InsuranceContent.js → ui-kit/BenefitItem/BenefitItemProps.js} +1 -1
  56. package/dist/ui-kit/BenefitItem/BenefitItemProps.js.map +1 -0
  57. package/dist/ui-kit/BlockWrapper.js +10 -1
  58. package/dist/ui-kit/BlockWrapper.js.map +1 -1
  59. package/dist/ui-kit/Foldable/Foldable.js +1 -1
  60. package/dist/ui-kit/Foldable/Foldable.js.map +1 -1
  61. package/lib/common.css +1 -1
  62. package/lib/components/BaseTile/BaseTile.js +1 -1
  63. package/lib/components/BaseTile/BaseTile.js.map +1 -1
  64. package/lib/components/BenefitsBlock/BenefitsBlock.js.map +1 -1
  65. package/lib/components/BenefitsBlock/BenefitsBlockContent.d.ts +2 -2
  66. package/lib/components/BlockContent.d.ts +1 -2
  67. package/lib/components/Blocks.d.ts +0 -1
  68. package/lib/components/Blocks.js +0 -2
  69. package/lib/components/Blocks.js.map +1 -1
  70. package/lib/components/Footer/MediaButton.d.ts +1 -1
  71. package/lib/components/Footer/SocialMedia.d.ts +1 -1
  72. package/lib/components/Footer/SocialMedia.mobile.d.ts +1 -1
  73. package/lib/components/Gallery/GalleryContainer.js.map +1 -1
  74. package/lib/components/PictureText/PictureText.fixture.d.ts +4 -0
  75. package/lib/components/PictureText/PictureText.js +14 -5
  76. package/lib/components/PictureText/PictureText.js.map +1 -1
  77. package/lib/components/PictureText/PictureTextContent.d.ts +8 -16
  78. package/lib/components/ProductBlock/ProductBlockContent.d.ts +3 -15
  79. package/lib/components/ProductBlock/ProductBlockInner.js +1 -1
  80. package/lib/components/ProductBlock/ProductBlockInner.js.map +1 -1
  81. package/lib/components/ProductBlock/ProductBlockInner.mobile.js +1 -1
  82. package/lib/components/ProductBlock/ProductBlockInner.mobile.js.map +1 -1
  83. package/lib/components/ProductBlock/renderBenefit.d.ts +4 -3
  84. package/lib/components/ProductBlock/renderBenefit.js +4 -23
  85. package/lib/components/ProductBlock/renderBenefit.js.map +1 -1
  86. package/lib/components/ProductGallery/ProductGallery.js +5 -5
  87. package/lib/components/ProductGallery/ProductGallery.js.map +1 -1
  88. package/lib/components/ProductTile/ProductTile.js +1 -1
  89. package/lib/components/ProductTile/ProductTile.js.map +1 -1
  90. package/lib/components/PromoTile/PromoTile.js +1 -1
  91. package/lib/components/PromoTile/PromoTile.js.map +1 -1
  92. package/lib/components/Recommendation/RecommendationCard.d.ts +1 -1
  93. package/lib/components/StepsBlock/StepsBlockStyleMaps.d.ts +1 -1
  94. package/lib/components/Tabs/Tabs.d.ts +2 -1
  95. package/lib/components/Tabs/Tabs.js +3 -3
  96. package/lib/components/Tabs/Tabs.js.map +1 -1
  97. package/lib/components/Tabs/TabsContent.d.ts +8 -2
  98. package/lib/components/Tabs/renderGroupTab.d.ts +4 -0
  99. package/lib/components/Tabs/renderGroupTab.js +15 -0
  100. package/lib/components/Tabs/renderGroupTab.js.map +1 -0
  101. package/lib/components/Tabs/renderLinkTab.d.ts +8 -0
  102. package/lib/components/Tabs/renderLinkTab.js +4 -0
  103. package/lib/components/Tabs/renderLinkTab.js.map +1 -0
  104. package/lib/components/Tabs/renderTab.d.ts +5 -5
  105. package/lib/components/Tabs/renderTab.js +14 -14
  106. package/lib/components/Tabs/renderTab.js.map +1 -1
  107. package/lib/components/Tabs/tabItemClasses.d.ts +6 -0
  108. package/lib/components/Tabs/tabItemClasses.js +7 -0
  109. package/lib/components/Tabs/tabItemClasses.js.map +1 -0
  110. package/lib/ui-kit/BenefitItem/BenefitItem.d.ts +4 -0
  111. package/lib/ui-kit/BenefitItem/BenefitItem.js +27 -0
  112. package/lib/ui-kit/BenefitItem/BenefitItem.js.map +1 -0
  113. package/lib/ui-kit/BenefitItem/BenefitItemProps.d.ts +24 -0
  114. package/lib/ui-kit/BenefitItem/BenefitItemProps.js +2 -0
  115. package/lib/ui-kit/BenefitItem/BenefitItemProps.js.map +1 -0
  116. package/lib/ui-kit/BlockWrapper.js +10 -1
  117. package/lib/ui-kit/BlockWrapper.js.map +1 -1
  118. package/lib/ui-kit/Foldable/Foldable.js +1 -1
  119. package/lib/ui-kit/Foldable/Foldable.js.map +1 -1
  120. package/mobile/bundle/bundle.umd.js +30 -13
  121. package/mobile/bundle/bundle.umd.min.js +1 -1
  122. package/mobile/dist/components/BaseTile/BaseTile.js +1 -1
  123. package/mobile/dist/components/BaseTile/BaseTile.js.map +1 -1
  124. package/mobile/dist/components/BenefitsBlock/BenefitsBlock.js.map +1 -1
  125. package/mobile/dist/components/BenefitsBlock/BenefitsBlockContent.d.ts +2 -2
  126. package/mobile/dist/components/BlockContent.d.ts +1 -2
  127. package/mobile/dist/components/Footer/MediaButton.d.ts +1 -1
  128. package/mobile/dist/components/Footer/SocialMedia.d.ts +1 -1
  129. package/mobile/dist/components/Gallery/GalleryContainer.js.map +1 -1
  130. package/mobile/dist/components/PictureText/PictureText.js +14 -5
  131. package/mobile/dist/components/PictureText/PictureText.js.map +1 -1
  132. package/mobile/dist/components/PictureText/PictureTextContent.d.ts +8 -16
  133. package/mobile/dist/components/ProductBlock/ProductBlockContent.d.ts +3 -15
  134. package/mobile/dist/components/ProductBlock/ProductBlockInner.js +1 -1
  135. package/mobile/dist/components/ProductBlock/ProductBlockInner.js.map +1 -1
  136. package/mobile/dist/components/ProductBlock/renderBenefit.d.ts +4 -2
  137. package/mobile/dist/components/ProductBlock/renderBenefit.js +3 -19
  138. package/mobile/dist/components/ProductBlock/renderBenefit.js.map +1 -1
  139. package/mobile/dist/components/ProductTile/ProductTile.js +1 -1
  140. package/mobile/dist/components/ProductTile/ProductTile.js.map +1 -1
  141. package/mobile/dist/components/PromoTile/PromoTile.js +1 -1
  142. package/mobile/dist/components/PromoTile/PromoTile.js.map +1 -1
  143. package/mobile/dist/components/Recommendation/RecommendationCard.d.ts +1 -1
  144. package/mobile/dist/components/StepsBlock/StepsBlockStyleMaps.d.ts +1 -1
  145. package/mobile/dist/components/Tabs/Tabs.d.ts +2 -1
  146. package/mobile/dist/components/Tabs/Tabs.js +3 -3
  147. package/mobile/dist/components/Tabs/Tabs.js.map +1 -1
  148. package/mobile/dist/components/Tabs/TabsContent.d.ts +8 -2
  149. package/mobile/dist/components/Tabs/renderGroupTab.d.ts +4 -0
  150. package/mobile/dist/components/Tabs/renderGroupTab.js +18 -0
  151. package/mobile/dist/components/Tabs/renderGroupTab.js.map +1 -0
  152. package/mobile/dist/components/Tabs/renderLinkTab.d.ts +8 -0
  153. package/mobile/dist/components/Tabs/renderLinkTab.js +7 -0
  154. package/mobile/dist/components/Tabs/renderLinkTab.js.map +1 -0
  155. package/mobile/dist/components/Tabs/renderTab.d.ts +5 -5
  156. package/mobile/dist/components/Tabs/renderTab.js +14 -14
  157. package/mobile/dist/components/Tabs/renderTab.js.map +1 -1
  158. package/mobile/dist/components/Tabs/tabItemClasses.d.ts +6 -0
  159. package/mobile/dist/components/Tabs/tabItemClasses.js +9 -0
  160. package/mobile/dist/components/Tabs/tabItemClasses.js.map +1 -0
  161. package/mobile/dist/ui-kit/BenefitItem/BenefitItem.d.ts +4 -0
  162. package/mobile/dist/ui-kit/BenefitItem/BenefitItem.js +29 -0
  163. package/mobile/dist/ui-kit/BenefitItem/BenefitItem.js.map +1 -0
  164. package/mobile/dist/ui-kit/BenefitItem/BenefitItemProps.d.ts +24 -0
  165. package/mobile/dist/{components/Insurance/InsuranceContent.js → ui-kit/BenefitItem/BenefitItemProps.js} +1 -1
  166. package/mobile/dist/ui-kit/BenefitItem/BenefitItemProps.js.map +1 -0
  167. package/mobile/dist/ui-kit/BlockWrapper.js +10 -1
  168. package/mobile/dist/ui-kit/BlockWrapper.js.map +1 -1
  169. package/mobile/dist/ui-kit/Foldable/Foldable.js +1 -1
  170. package/mobile/dist/ui-kit/Foldable/Foldable.js.map +1 -1
  171. package/mobile/lib/components/BaseTile/BaseTile.js +1 -1
  172. package/mobile/lib/components/BaseTile/BaseTile.js.map +1 -1
  173. package/mobile/lib/components/BenefitsBlock/BenefitsBlock.js.map +1 -1
  174. package/mobile/lib/components/BenefitsBlock/BenefitsBlockContent.d.ts +2 -2
  175. package/mobile/lib/components/BlockContent.d.ts +1 -2
  176. package/mobile/lib/components/Footer/MediaButton.d.ts +1 -1
  177. package/mobile/lib/components/Footer/SocialMedia.d.ts +1 -1
  178. package/mobile/lib/components/Gallery/GalleryContainer.js.map +1 -1
  179. package/mobile/lib/components/PictureText/PictureText.js +14 -5
  180. package/mobile/lib/components/PictureText/PictureText.js.map +1 -1
  181. package/mobile/lib/components/PictureText/PictureTextContent.d.ts +8 -16
  182. package/mobile/lib/components/ProductBlock/ProductBlockContent.d.ts +3 -15
  183. package/mobile/lib/components/ProductBlock/ProductBlockInner.js +1 -1
  184. package/mobile/lib/components/ProductBlock/ProductBlockInner.js.map +1 -1
  185. package/mobile/lib/components/ProductBlock/renderBenefit.d.ts +4 -2
  186. package/mobile/lib/components/ProductBlock/renderBenefit.js +4 -20
  187. package/mobile/lib/components/ProductBlock/renderBenefit.js.map +1 -1
  188. package/mobile/lib/components/ProductTile/ProductTile.js +1 -1
  189. package/mobile/lib/components/ProductTile/ProductTile.js.map +1 -1
  190. package/mobile/lib/components/PromoTile/PromoTile.js +1 -1
  191. package/mobile/lib/components/PromoTile/PromoTile.js.map +1 -1
  192. package/mobile/lib/components/Recommendation/RecommendationCard.d.ts +1 -1
  193. package/mobile/lib/components/StepsBlock/StepsBlockStyleMaps.d.ts +1 -1
  194. package/mobile/lib/components/Tabs/Tabs.d.ts +2 -1
  195. package/mobile/lib/components/Tabs/Tabs.js +3 -3
  196. package/mobile/lib/components/Tabs/Tabs.js.map +1 -1
  197. package/mobile/lib/components/Tabs/TabsContent.d.ts +8 -2
  198. package/mobile/lib/components/Tabs/renderGroupTab.d.ts +4 -0
  199. package/mobile/lib/components/Tabs/renderGroupTab.js +15 -0
  200. package/mobile/lib/components/Tabs/renderGroupTab.js.map +1 -0
  201. package/mobile/lib/components/Tabs/renderLinkTab.d.ts +8 -0
  202. package/mobile/lib/components/Tabs/renderLinkTab.js +4 -0
  203. package/mobile/lib/components/Tabs/renderLinkTab.js.map +1 -0
  204. package/mobile/lib/components/Tabs/renderTab.d.ts +5 -5
  205. package/mobile/lib/components/Tabs/renderTab.js +14 -14
  206. package/mobile/lib/components/Tabs/renderTab.js.map +1 -1
  207. package/mobile/lib/components/Tabs/tabItemClasses.d.ts +6 -0
  208. package/mobile/lib/components/Tabs/tabItemClasses.js +7 -0
  209. package/mobile/lib/components/Tabs/tabItemClasses.js.map +1 -0
  210. package/mobile/lib/ui-kit/BenefitItem/BenefitItem.d.ts +4 -0
  211. package/mobile/lib/ui-kit/BenefitItem/BenefitItem.js +27 -0
  212. package/mobile/lib/ui-kit/BenefitItem/BenefitItem.js.map +1 -0
  213. package/mobile/lib/ui-kit/BenefitItem/BenefitItemProps.d.ts +24 -0
  214. package/mobile/lib/ui-kit/BenefitItem/BenefitItemProps.js +2 -0
  215. package/mobile/lib/ui-kit/BenefitItem/BenefitItemProps.js.map +1 -0
  216. package/mobile/lib/ui-kit/BlockWrapper.js +10 -1
  217. package/mobile/lib/ui-kit/BlockWrapper.js.map +1 -1
  218. package/mobile/lib/ui-kit/Foldable/Foldable.js +1 -1
  219. package/mobile/lib/ui-kit/Foldable/Foldable.js.map +1 -1
  220. package/mobile/src/components/BaseTile/BaseTile.tsx +2 -2
  221. package/mobile/src/components/BenefitsBlock/BenefitsBlock.tsx +2 -2
  222. package/mobile/src/components/BenefitsBlock/BenefitsBlockContent.ts +2 -2
  223. package/mobile/src/components/BlockContent.ts +0 -2
  224. package/mobile/src/components/ContentPage/ContentPage.page.json +41 -41
  225. package/mobile/src/components/Footer/MediaButton.tsx +1 -1
  226. package/mobile/src/components/Footer/SocialMedia.tsx +1 -1
  227. package/mobile/src/components/Gallery/Gallery.tsx +1 -1
  228. package/mobile/src/components/Gallery/GalleryContainer.tsx +0 -1
  229. package/mobile/src/components/PictureText/PictureText.example.json +7 -4
  230. package/mobile/src/components/PictureText/PictureText.tsx +55 -34
  231. package/mobile/src/components/PictureText/PictureTextContent.ts +8 -17
  232. package/mobile/src/components/ProductBlock/ProductBlockContent.ts +3 -17
  233. package/mobile/src/components/ProductBlock/ProductBlockInner.tsx +1 -5
  234. package/mobile/src/components/ProductBlock/renderBenefit.tsx +17 -42
  235. package/mobile/src/components/ProductTile/ProductTile.tsx +1 -1
  236. package/mobile/src/components/PromoTile/PromoTile.tsx +1 -1
  237. package/mobile/src/components/Recommendation/RecommendationCard.tsx +1 -1
  238. package/mobile/src/components/StepsBlock/StepsBlockStyleMaps.ts +1 -1
  239. package/mobile/src/components/Tabs/Tabs.example.json +3 -3
  240. package/mobile/src/components/Tabs/Tabs.tsx +5 -4
  241. package/mobile/src/components/Tabs/TabsContent.ts +9 -2
  242. package/mobile/src/components/Tabs/renderGroupTab.tsx +51 -0
  243. package/mobile/src/components/Tabs/renderLinkTab.tsx +25 -0
  244. package/mobile/src/components/Tabs/renderTab.tsx +18 -38
  245. package/mobile/src/components/Tabs/tabItemClasses.ts +7 -0
  246. package/mobile/src/components/__snapshots__/Blocks.spec.tsx.snap +15 -30
  247. package/mobile/src/ui-kit/BenefitItem/BenefitItem.tsx +58 -0
  248. package/mobile/src/ui-kit/BenefitItem/BenefitItemProps.ts +27 -0
  249. package/mobile/src/ui-kit/BlockWrapper.tsx +12 -1
  250. package/mobile/src/ui-kit/Foldable/Foldable.tsx +1 -1
  251. package/package.json +1 -1
  252. package/src/components/BaseTile/BaseTile.tsx +2 -2
  253. package/src/components/BenefitsBlock/BenefitsBlock.tsx +2 -2
  254. package/src/components/BenefitsBlock/BenefitsBlockContent.ts +2 -2
  255. package/src/components/BlockContent.ts +0 -2
  256. package/src/components/Blocks.ts +0 -2
  257. package/src/components/ContentPage/ContentPage.page.json +41 -41
  258. package/src/components/Footer/MediaButton.tsx +1 -1
  259. package/src/components/Footer/SocialMedia.mobile.tsx +1 -1
  260. package/src/components/Footer/SocialMedia.tsx +1 -1
  261. package/src/components/Gallery/Gallery.mobile.tsx +1 -1
  262. package/src/components/Gallery/GalleryContainer.tsx +0 -1
  263. package/src/components/PictureText/PictureText.example.json +7 -4
  264. package/src/components/PictureText/PictureText.fixture.tsx +74 -5
  265. package/src/components/PictureText/PictureText.tsx +55 -34
  266. package/src/components/PictureText/PictureTextContent.ts +8 -17
  267. package/src/components/ProductBlock/ProductBlock.fixture.mobile.tsx +3 -3
  268. package/src/components/ProductBlock/ProductBlock.fixture.tsx +28 -6
  269. package/src/components/ProductBlock/ProductBlockContent.ts +3 -17
  270. package/src/components/ProductBlock/ProductBlockInner.mobile.tsx +1 -5
  271. package/src/components/ProductBlock/ProductBlockInner.tsx +1 -3
  272. package/src/components/ProductBlock/renderBenefit.tsx +17 -51
  273. package/src/components/ProductGallery/ProductGallery.tsx +5 -4
  274. package/src/components/ProductTile/ProductTile.tsx +1 -1
  275. package/src/components/PromoTile/PromoTile.tsx +1 -1
  276. package/src/components/Recommendation/RecommendationCard.tsx +1 -1
  277. package/src/components/StepsBlock/StepsBlockStyleMaps.ts +1 -1
  278. package/src/components/Tabs/Tabs.example.json +3 -3
  279. package/src/components/Tabs/Tabs.fixture.tsx +3 -3
  280. package/src/components/Tabs/Tabs.tsx +5 -4
  281. package/src/components/Tabs/TabsContent.ts +9 -2
  282. package/src/components/Tabs/renderGroupTab.tsx +51 -0
  283. package/src/components/Tabs/renderLinkTab.tsx +25 -0
  284. package/src/components/Tabs/renderTab.tsx +18 -38
  285. package/src/components/Tabs/tabItemClasses.ts +7 -0
  286. package/src/components/__snapshots__/Blocks.spec.tsx.snap +15 -30
  287. package/src/ui-kit/BenefitItem/BenefitItem.tsx +58 -0
  288. package/src/ui-kit/BenefitItem/BenefitItemProps.ts +27 -0
  289. package/src/ui-kit/BlockWrapper.tsx +12 -1
  290. package/src/ui-kit/Foldable/Foldable.tsx +1 -1
  291. package/dist/components/Insurance/Insurance.d.ts +0 -5
  292. package/dist/components/Insurance/Insurance.js +0 -24
  293. package/dist/components/Insurance/Insurance.js.map +0 -1
  294. package/dist/components/Insurance/InsuranceContent.d.ts +0 -27
  295. package/dist/components/Insurance/InsuranceContent.js.map +0 -1
  296. package/dist/components/ProductBlock/renderBenefit.mobile.d.ts +0 -3
  297. package/dist/components/ProductBlock/renderBenefit.mobile.js +0 -25
  298. package/dist/components/ProductBlock/renderBenefit.mobile.js.map +0 -1
  299. package/lib/components/Insurance/Insurance.d.ts +0 -5
  300. package/lib/components/Insurance/Insurance.fixture.d.ts +0 -6
  301. package/lib/components/Insurance/Insurance.js +0 -22
  302. package/lib/components/Insurance/Insurance.js.map +0 -1
  303. package/lib/components/Insurance/InsuranceContent.d.ts +0 -27
  304. package/lib/components/Insurance/InsuranceContent.js +0 -2
  305. package/lib/components/Insurance/InsuranceContent.js.map +0 -1
  306. package/lib/components/ProductBlock/renderBenefit.mobile.d.ts +0 -3
  307. package/lib/components/ProductBlock/renderBenefit.mobile.js +0 -22
  308. package/lib/components/ProductBlock/renderBenefit.mobile.js.map +0 -1
  309. package/mobile/dist/components/Insurance/Insurance.d.ts +0 -5
  310. package/mobile/dist/components/Insurance/Insurance.js +0 -24
  311. package/mobile/dist/components/Insurance/Insurance.js.map +0 -1
  312. package/mobile/dist/components/Insurance/InsuranceContent.d.ts +0 -27
  313. package/mobile/dist/components/Insurance/InsuranceContent.js.map +0 -1
  314. package/mobile/lib/components/Insurance/Insurance.d.ts +0 -5
  315. package/mobile/lib/components/Insurance/Insurance.js +0 -22
  316. package/mobile/lib/components/Insurance/Insurance.js.map +0 -1
  317. package/mobile/lib/components/Insurance/InsuranceContent.d.ts +0 -27
  318. package/mobile/lib/components/Insurance/InsuranceContent.js +0 -2
  319. package/mobile/lib/components/Insurance/InsuranceContent.js.map +0 -1
  320. package/mobile/src/components/Insurance/Insurance.example.json +0 -29
  321. package/mobile/src/components/Insurance/Insurance.tsx +0 -83
  322. package/mobile/src/components/Insurance/InsuranceContent.ts +0 -29
  323. package/src/components/Insurance/Insurance.example.json +0 -29
  324. package/src/components/Insurance/Insurance.fixture.tsx +0 -70
  325. package/src/components/Insurance/Insurance.tsx +0 -83
  326. package/src/components/Insurance/InsuranceContent.ts +0 -29
  327. package/src/components/ProductBlock/renderBenefit.mobile.tsx +0 -44
@@ -1,24 +0,0 @@
1
- Object.defineProperty(exports, "__esModule", { value: true });
2
- exports.Insurance = void 0;
3
- const jsx_runtime_1 = require("@redneckz/uni-jsx/jsx-runtime");
4
- const uni_jsx_1 = require("@redneckz/uni-jsx");
5
- const BlockWrapper_1 = require("../../ui-kit/BlockWrapper");
6
- const Img_1 = require("../../ui-kit/Img/Img");
7
- const addSpacesBetweenNumbers_1 = require("../../utils/addSpacesBetweenNumbers");
8
- const Headline_1 = require("../Headline/Headline");
9
- exports.Insurance = (0, uni_jsx_1.JSX)(({ context, className = '', title, description, image, benefits, sum, monthLimit, ...rest }) => {
10
- return ((0, jsx_runtime_1.jsxs)(BlockWrapper_1.BlockWrapper, { className: `px-[100px] py-[50px] bg-white text-primary-text font-sans ${className}`, context: context, ...rest, children: [(0, jsx_runtime_1.jsx)(Headline_1.Headline, { context: context, className: "!p-0", title: title, description: description, headlineVersion: "M", align: "center" }), (0, jsx_runtime_1.jsx)("div", { children: (0, jsx_runtime_1.jsxs)("div", { className: "mx-auto flex justify-center gap-[122px] mt-[30px]", children: [image?.src ? (0, jsx_runtime_1.jsx)(Img_1.Img, { image: image }) : null, (0, jsx_runtime_1.jsxs)("div", { className: "w-[558px] m-auto", children: [benefits ? ((0, jsx_runtime_1.jsx)("div", { className: "flex flex-col gap-4", children: benefits.map(renderBenefit) })) : null, renderInsuranceSumMonth(sum, monthLimit)] })] }) })] }));
11
- });
12
- function renderBenefit(benefit, i) {
13
- return ((0, jsx_runtime_1.jsxs)("div", { className: "flex items-center gap-4", children: [benefit?.icon ? ((0, jsx_runtime_1.jsx)(Img_1.Img, { className: "w-12 h-12 min-w-12 p-3 rounded-full bg-secondary-light", image: benefit.icon, asSVG: true })) : null, (0, jsx_runtime_1.jsxs)("div", { children: [benefit?.label ? (0, jsx_runtime_1.jsx)("div", { className: "text-h6", children: benefit.label }) : null, benefit?.description ? ((0, jsx_runtime_1.jsx)("div", { className: "mt-0.5 text-secondary-text text-m", children: benefit.description })) : null] })] }, String(i)));
14
- }
15
- function renderInsuranceSumMonth(sum, monthLimit) {
16
- return sum || monthLimit ? ((0, jsx_runtime_1.jsxs)("div", { className: "bg-secondary-light h-15 flex mt-7 gap-6 px-5 py-4", children: [Number.isFinite(sum) ? renderValueBlock('Страховая сумма:', sum, Boolean(monthLimit)) : null, Number.isFinite(monthLimit)
17
- ? renderValueBlock('Ежемесячный лимит:', monthLimit, Boolean(sum))
18
- : null] })) : null;
19
- }
20
- function renderValueBlock(title, sum = 0, isAnotherBlock = false) {
21
- const widthStyle = isAnotherBlock ? 'w-fit' : 'w-full';
22
- return ((0, jsx_runtime_1.jsxs)("div", { className: `flex justify-between items-center gap-2 w-full ${widthStyle}`, children: [(0, jsx_runtime_1.jsx)("span", { className: "text-secondary-text text-l-light", children: title }), (0, jsx_runtime_1.jsxs)("span", { className: "text-primary-main text-h6", children: [(0, addSpacesBetweenNumbers_1.addSpacesBetweenNumbers)(sum), " \u20BD"] })] }));
23
- }
24
- //# sourceMappingURL=Insurance.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Insurance.js","sourceRoot":"","sources":["../../../src/components/Insurance/Insurance.tsx"],"names":[],"mappings":"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"}
@@ -1,27 +0,0 @@
1
- import type { Picture } from '../../model/Picture';
2
- import type { HeadlineCommonProps } from '../../model/HeadlineType';
3
- /**
4
- * @title Преимущество
5
- */
6
- export interface InsuranceBenefit {
7
- /** @title Название */
8
- label?: string;
9
- /** @title Описание */
10
- description?: string;
11
- icon?: Picture;
12
- }
13
- /**
14
- * @title Страховка
15
- */
16
- export declare type InsuranceContent = HeadlineCommonProps & {
17
- image?: Picture;
18
- /** @title Ежемесячный лимит */
19
- monthLimit?: number;
20
- /** @title Страховая сумма */
21
- sum?: number;
22
- /**
23
- * @title Список преимуществ
24
- * @maxItems 6
25
- */
26
- benefits?: InsuranceBenefit[];
27
- };
@@ -1 +0,0 @@
1
- {"version":3,"file":"InsuranceContent.js","sourceRoot":"","sources":["../../../src/components/Insurance/InsuranceContent.ts"],"names":[],"mappings":""}
@@ -1,5 +0,0 @@
1
- import type { UniBlockProps } from '../../types';
2
- import type { InsuranceContent } from './InsuranceContent';
3
- export interface InsuranceProps extends InsuranceContent, UniBlockProps {
4
- }
5
- export declare const Insurance: import("@redneckz/uni-jsx").UNIComponent<InsuranceProps, any, any>;
@@ -1,22 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "@redneckz/uni-jsx/jsx-runtime";
2
- import { JSX } from '@redneckz/uni-jsx';
3
- import { BlockWrapper } from '../../ui-kit/BlockWrapper.js';
4
- import { Img } from '../../ui-kit/Img/Img.js';
5
- import { addSpacesBetweenNumbers } from '../../utils/addSpacesBetweenNumbers.js';
6
- import { Headline } from '../Headline/Headline.js';
7
- export const Insurance = JSX(({ context, className = '', title, description, image, benefits, sum, monthLimit, ...rest }) => {
8
- return (_jsxs(BlockWrapper, { className: `px-[100px] py-[50px] bg-white text-primary-text font-sans ${className}`, context: context, ...rest, children: [_jsx(Headline, { context: context, className: "!p-0", title: title, description: description, headlineVersion: "M", align: "center" }), _jsx("div", { children: _jsxs("div", { className: "mx-auto flex justify-center gap-[122px] mt-[30px]", children: [image?.src ? _jsx(Img, { image: image }) : null, _jsxs("div", { className: "w-[558px] m-auto", children: [benefits ? (_jsx("div", { className: "flex flex-col gap-4", children: benefits.map(renderBenefit) })) : null, renderInsuranceSumMonth(sum, monthLimit)] })] }) })] }));
9
- });
10
- function renderBenefit(benefit, i) {
11
- return (_jsxs("div", { className: "flex items-center gap-4", children: [benefit?.icon ? (_jsx(Img, { className: "w-12 h-12 min-w-12 p-3 rounded-full bg-secondary-light", image: benefit.icon, asSVG: true })) : null, _jsxs("div", { children: [benefit?.label ? _jsx("div", { className: "text-h6", children: benefit.label }) : null, benefit?.description ? (_jsx("div", { className: "mt-0.5 text-secondary-text text-m", children: benefit.description })) : null] })] }, String(i)));
12
- }
13
- function renderInsuranceSumMonth(sum, monthLimit) {
14
- return sum || monthLimit ? (_jsxs("div", { className: "bg-secondary-light h-15 flex mt-7 gap-6 px-5 py-4", children: [Number.isFinite(sum) ? renderValueBlock('Страховая сумма:', sum, Boolean(monthLimit)) : null, Number.isFinite(monthLimit)
15
- ? renderValueBlock('Ежемесячный лимит:', monthLimit, Boolean(sum))
16
- : null] })) : null;
17
- }
18
- function renderValueBlock(title, sum = 0, isAnotherBlock = false) {
19
- const widthStyle = isAnotherBlock ? 'w-fit' : 'w-full';
20
- return (_jsxs("div", { className: `flex justify-between items-center gap-2 w-full ${widthStyle}`, children: [_jsx("span", { className: "text-secondary-text text-l-light", children: title }), _jsxs("span", { className: "text-primary-main text-h6", children: [addSpacesBetweenNumbers(sum), " \u20BD"] })] }));
21
- }
22
- //# sourceMappingURL=Insurance.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Insurance.js","sourceRoot":"","sources":["../../../src/components/Insurance/Insurance.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAExC,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACzD,OAAO,EAAE,GAAG,EAAE,MAAM,sBAAsB,CAAC;AAC3C,OAAO,EAAE,uBAAuB,EAAE,MAAM,qCAAqC,CAAC;AAC9E,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAKhD,MAAM,CAAC,MAAM,SAAS,GAAG,GAAG,CAC1B,CAAC,EAAE,OAAO,EAAE,SAAS,GAAG,EAAE,EAAE,KAAK,EAAE,WAAW,EAAE,KAAK,EAAE,QAAQ,EAAE,GAAG,EAAE,UAAU,EAAE,GAAG,IAAI,EAAE,EAAE,EAAE;IAC7F,OAAO,CACL,MAAC,YAAY,IACX,SAAS,EAAE,6DAA6D,SAAS,EAAE,EACnF,OAAO,EAAE,OAAO,KACZ,IAAI,aAER,KAAC,QAAQ,IACP,OAAO,EAAE,OAAO,EAChB,SAAS,EAAC,MAAM,EAChB,KAAK,EAAE,KAAK,EACZ,WAAW,EAAE,WAAW,EACxB,eAAe,EAAC,GAAG,EACnB,KAAK,EAAC,QAAQ,GACd,EACF,wBACE,eAAK,SAAS,EAAC,mDAAmD,aAC/D,KAAK,EAAE,GAAG,CAAC,CAAC,CAAC,KAAC,GAAG,IAAC,KAAK,EAAE,KAAK,GAAI,CAAC,CAAC,CAAC,IAAI,EAC1C,eAAK,SAAS,EAAC,kBAAkB,aAC9B,QAAQ,CAAC,CAAC,CAAC,CACV,cAAK,SAAS,EAAC,qBAAqB,YAAE,QAAQ,CAAC,GAAG,CAAC,aAAa,CAAC,GAAO,CACzE,CAAC,CAAC,CAAC,IAAI,EACP,uBAAuB,CAAC,GAAG,EAAE,UAAU,CAAC,IACrC,IACF,GACF,IACO,CAChB,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,SAAS,aAAa,CAAC,OAAyB,EAAE,CAAS;IACzD,OAAO,CACL,eAAqB,SAAS,EAAC,yBAAyB,aACrD,OAAO,EAAE,IAAI,CAAC,CAAC,CAAC,CACf,KAAC,GAAG,IACF,SAAS,EAAC,wDAAwD,EAClE,KAAK,EAAE,OAAO,CAAC,IAAI,EACnB,KAAK,SACL,CACH,CAAC,CAAC,CAAC,IAAI,EACR,0BACG,OAAO,EAAE,KAAK,CAAC,CAAC,CAAC,cAAK,SAAS,EAAC,SAAS,YAAE,OAAO,CAAC,KAAK,GAAO,CAAC,CAAC,CAAC,IAAI,EACtE,OAAO,EAAE,WAAW,CAAC,CAAC,CAAC,CACtB,cAAK,SAAS,EAAC,mCAAmC,YAAE,OAAO,CAAC,WAAW,GAAO,CAC/E,CAAC,CAAC,CAAC,IAAI,IACJ,KAbE,MAAM,CAAC,CAAC,CAAC,CAcb,CACP,CAAC;AACJ,CAAC;AAED,SAAS,uBAAuB,CAAC,GAAY,EAAE,UAAmB;IAChE,OAAO,GAAG,IAAI,UAAU,CAAC,CAAC,CAAC,CACzB,eAAK,SAAS,EAAC,mDAAmD,aAC/D,MAAM,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,gBAAgB,CAAC,kBAAkB,EAAE,GAAG,EAAE,OAAO,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,EAC5F,MAAM,CAAC,QAAQ,CAAC,UAAU,CAAC;gBAC1B,CAAC,CAAC,gBAAgB,CAAC,oBAAoB,EAAE,UAAU,EAAE,OAAO,CAAC,GAAG,CAAC,CAAC;gBAClE,CAAC,CAAC,IAAI,IACJ,CACP,CAAC,CAAC,CAAC,IAAI,CAAC;AACX,CAAC;AAED,SAAS,gBAAgB,CAAC,KAAa,EAAE,GAAG,GAAG,CAAC,EAAE,cAAc,GAAG,KAAK;IACtE,MAAM,UAAU,GAAG,cAAc,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,QAAQ,CAAC;IAEvD,OAAO,CACL,eAAK,SAAS,EAAE,kDAAkD,UAAU,EAAE,aAC5E,eAAM,SAAS,EAAC,kCAAkC,YAAE,KAAK,GAAQ,EACjE,gBAAM,SAAS,EAAC,2BAA2B,aAAE,uBAAuB,CAAC,GAAG,CAAC,eAAU,IAC/E,CACP,CAAC;AACJ,CAAC"}
@@ -1,27 +0,0 @@
1
- import type { Picture } from '../../model/Picture';
2
- import type { HeadlineCommonProps } from '../../model/HeadlineType';
3
- /**
4
- * @title Преимущество
5
- */
6
- export interface InsuranceBenefit {
7
- /** @title Название */
8
- label?: string;
9
- /** @title Описание */
10
- description?: string;
11
- icon?: Picture;
12
- }
13
- /**
14
- * @title Страховка
15
- */
16
- export declare type InsuranceContent = HeadlineCommonProps & {
17
- image?: Picture;
18
- /** @title Ежемесячный лимит */
19
- monthLimit?: number;
20
- /** @title Страховая сумма */
21
- sum?: number;
22
- /**
23
- * @title Список преимуществ
24
- * @maxItems 6
25
- */
26
- benefits?: InsuranceBenefit[];
27
- };
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=InsuranceContent.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"InsuranceContent.js","sourceRoot":"","sources":["../../../src/components/Insurance/InsuranceContent.ts"],"names":[],"mappings":""}
@@ -1,29 +0,0 @@
1
- {
2
- "title": "Заголовок",
3
- "description": "Описание",
4
- "insurance": 500000,
5
- "benefits": [
6
- {
7
- "label": "Заголовок 1",
8
- "description": "Описание 1",
9
- "icon": {
10
- "icon": "ShieldTickIcon"
11
- }
12
- },
13
- {
14
- "label": "Заголовок 2",
15
- "description": "Описание 2",
16
- "icon": {
17
- "icon": "ShieldTickIcon"
18
- }
19
- }
20
- ],
21
- "image": {
22
- "format": "webp",
23
- "size": {
24
- "width": 400,
25
- "height": 300
26
- }
27
- },
28
- "sum": 500000
29
- }
@@ -1,83 +0,0 @@
1
- import { JSX } from '@redneckz/uni-jsx';
2
- import type { UniBlockProps } from '../../types';
3
- import { BlockWrapper } from '../../ui-kit/BlockWrapper';
4
- import { Img } from '../../ui-kit/Img/Img';
5
- import { addSpacesBetweenNumbers } from '../../utils/addSpacesBetweenNumbers';
6
- import { Headline } from '../Headline/Headline';
7
- import type { InsuranceBenefit, InsuranceContent } from './InsuranceContent';
8
-
9
- export interface InsuranceProps extends InsuranceContent, UniBlockProps {}
10
-
11
- export const Insurance = JSX<InsuranceProps>(
12
- ({ context, className = '', title, description, image, benefits, sum, monthLimit, ...rest }) => {
13
- return (
14
- <BlockWrapper
15
- className={`px-[100px] py-[50px] bg-white text-primary-text font-sans ${className}`}
16
- context={context}
17
- {...rest}
18
- >
19
- <Headline
20
- context={context}
21
- className="!p-0"
22
- title={title}
23
- description={description}
24
- headlineVersion="M"
25
- align="center"
26
- />
27
- <div>
28
- <div className="mx-auto flex justify-center gap-[122px] mt-[30px]">
29
- {image?.src ? <Img image={image} /> : null}
30
- <div className="w-[558px] m-auto">
31
- {benefits ? (
32
- <div className="flex flex-col gap-4">{benefits.map(renderBenefit)}</div>
33
- ) : null}
34
- {renderInsuranceSumMonth(sum, monthLimit)}
35
- </div>
36
- </div>
37
- </div>
38
- </BlockWrapper>
39
- );
40
- },
41
- );
42
-
43
- function renderBenefit(benefit: InsuranceBenefit, i: number) {
44
- return (
45
- <div key={String(i)} className="flex items-center gap-4">
46
- {benefit?.icon ? (
47
- <Img
48
- className="w-12 h-12 min-w-12 p-3 rounded-full bg-secondary-light"
49
- image={benefit.icon}
50
- asSVG
51
- />
52
- ) : null}
53
- <div>
54
- {benefit?.label ? <div className="text-h6">{benefit.label}</div> : null}
55
- {benefit?.description ? (
56
- <div className="mt-0.5 text-secondary-text text-m">{benefit.description}</div>
57
- ) : null}
58
- </div>
59
- </div>
60
- );
61
- }
62
-
63
- function renderInsuranceSumMonth(sum?: number, monthLimit?: number) {
64
- return sum || monthLimit ? (
65
- <div className="bg-secondary-light h-15 flex mt-7 gap-6 px-5 py-4">
66
- {Number.isFinite(sum) ? renderValueBlock('Страховая сумма:', sum, Boolean(monthLimit)) : null}
67
- {Number.isFinite(monthLimit)
68
- ? renderValueBlock('Ежемесячный лимит:', monthLimit, Boolean(sum))
69
- : null}
70
- </div>
71
- ) : null;
72
- }
73
-
74
- function renderValueBlock(title: string, sum = 0, isAnotherBlock = false) {
75
- const widthStyle = isAnotherBlock ? 'w-fit' : 'w-full';
76
-
77
- return (
78
- <div className={`flex justify-between items-center gap-2 w-full ${widthStyle}`}>
79
- <span className="text-secondary-text text-l-light">{title}</span>
80
- <span className="text-primary-main text-h6">{addSpacesBetweenNumbers(sum)} ₽</span>
81
- </div>
82
- );
83
- }
@@ -1,29 +0,0 @@
1
- import type { Picture } from '../../model/Picture';
2
- import type { HeadlineCommonProps } from '../../model/HeadlineType';
3
-
4
- /**
5
- * @title Преимущество
6
- */
7
- export interface InsuranceBenefit {
8
- /** @title Название */
9
- label?: string;
10
- /** @title Описание */
11
- description?: string;
12
- icon?: Picture;
13
- }
14
-
15
- /**
16
- * @title Страховка
17
- */
18
- export type InsuranceContent = HeadlineCommonProps & {
19
- image?: Picture;
20
- /** @title Ежемесячный лимит */
21
- monthLimit?: number;
22
- /** @title Страховая сумма */
23
- sum?: number;
24
- /**
25
- * @title Список преимуществ
26
- * @maxItems 6
27
- */
28
- benefits?: InsuranceBenefit[];
29
- };
@@ -1,29 +0,0 @@
1
- {
2
- "title": "Заголовок",
3
- "description": "Описание",
4
- "insurance": 500000,
5
- "benefits": [
6
- {
7
- "label": "Заголовок 1",
8
- "description": "Описание 1",
9
- "icon": {
10
- "icon": "ShieldTickIcon"
11
- }
12
- },
13
- {
14
- "label": "Заголовок 2",
15
- "description": "Описание 2",
16
- "icon": {
17
- "icon": "ShieldTickIcon"
18
- }
19
- }
20
- ],
21
- "image": {
22
- "format": "webp",
23
- "size": {
24
- "width": 400,
25
- "height": 300
26
- }
27
- },
28
- "sum": 500000
29
- }
@@ -1,70 +0,0 @@
1
- import type { Picture } from '../../model/Picture';
2
- import { context } from '../../react/setup-fixture';
3
- import type { InsuranceBenefit } from './InsuranceContent';
4
- import { Insurance } from './Insurance';
5
-
6
- const benefits: InsuranceBenefit[] = [
7
- {
8
- label: 'Телесное повреждение',
9
- description: 'Описание',
10
- icon: { icon: 'ShieldTickIcon' },
11
- },
12
- {
13
- label: 'Госпитализация застрахованного',
14
- icon: { icon: 'ShieldTickIcon' },
15
- },
16
- {
17
- label: 'Сокращение численности работников организации',
18
- icon: { icon: 'ShieldTickIcon' },
19
- },
20
- {
21
- label: 'Смерть застрахованного',
22
- icon: { icon: 'ShieldTickIcon' },
23
- },
24
- ];
25
-
26
- const image: Picture = {
27
- src: 'insurance.png',
28
- format: 'webp',
29
- alt: 'Страховые риски и продукты',
30
- size: {
31
- width: 400,
32
- height: 300,
33
- },
34
- sources: [
35
- {
36
- src: 'insurance.png 1x, insurance-2x.png 2x',
37
- format: 'png',
38
- },
39
- ],
40
- };
41
-
42
- export default {
43
- 'without monthly payment': (
44
- <div className="container grid grid-cols-12">
45
- <Insurance
46
- context={context}
47
- className="col-span-12"
48
- title="Страховые риски и продукты"
49
- description="Покрываемые риски программы «Защита вас и ваших близких»"
50
- benefits={benefits}
51
- image={image}
52
- sum={500000}
53
- />
54
- </div>
55
- ),
56
- 'with monthly payment': (
57
- <div className="container grid grid-cols-12">
58
- <Insurance
59
- context={context}
60
- className="col-span-12"
61
- title="Страховые риски и продукты"
62
- description="Покрываемые риски программы «Защита вас и ваших близких»"
63
- benefits={benefits}
64
- image={image}
65
- sum={500000}
66
- monthLimit={25000}
67
- />
68
- </div>
69
- ),
70
- };
@@ -1,83 +0,0 @@
1
- import { JSX } from '@redneckz/uni-jsx';
2
- import type { UniBlockProps } from '../../types';
3
- import { BlockWrapper } from '../../ui-kit/BlockWrapper';
4
- import { Img } from '../../ui-kit/Img/Img';
5
- import { addSpacesBetweenNumbers } from '../../utils/addSpacesBetweenNumbers';
6
- import { Headline } from '../Headline/Headline';
7
- import type { InsuranceBenefit, InsuranceContent } from './InsuranceContent';
8
-
9
- export interface InsuranceProps extends InsuranceContent, UniBlockProps {}
10
-
11
- export const Insurance = JSX<InsuranceProps>(
12
- ({ context, className = '', title, description, image, benefits, sum, monthLimit, ...rest }) => {
13
- return (
14
- <BlockWrapper
15
- className={`px-[100px] py-[50px] bg-white text-primary-text font-sans ${className}`}
16
- context={context}
17
- {...rest}
18
- >
19
- <Headline
20
- context={context}
21
- className="!p-0"
22
- title={title}
23
- description={description}
24
- headlineVersion="M"
25
- align="center"
26
- />
27
- <div>
28
- <div className="mx-auto flex justify-center gap-[122px] mt-[30px]">
29
- {image?.src ? <Img image={image} /> : null}
30
- <div className="w-[558px] m-auto">
31
- {benefits ? (
32
- <div className="flex flex-col gap-4">{benefits.map(renderBenefit)}</div>
33
- ) : null}
34
- {renderInsuranceSumMonth(sum, monthLimit)}
35
- </div>
36
- </div>
37
- </div>
38
- </BlockWrapper>
39
- );
40
- },
41
- );
42
-
43
- function renderBenefit(benefit: InsuranceBenefit, i: number) {
44
- return (
45
- <div key={String(i)} className="flex items-center gap-4">
46
- {benefit?.icon ? (
47
- <Img
48
- className="w-12 h-12 min-w-12 p-3 rounded-full bg-secondary-light"
49
- image={benefit.icon}
50
- asSVG
51
- />
52
- ) : null}
53
- <div>
54
- {benefit?.label ? <div className="text-h6">{benefit.label}</div> : null}
55
- {benefit?.description ? (
56
- <div className="mt-0.5 text-secondary-text text-m">{benefit.description}</div>
57
- ) : null}
58
- </div>
59
- </div>
60
- );
61
- }
62
-
63
- function renderInsuranceSumMonth(sum?: number, monthLimit?: number) {
64
- return sum || monthLimit ? (
65
- <div className="bg-secondary-light h-15 flex mt-7 gap-6 px-5 py-4">
66
- {Number.isFinite(sum) ? renderValueBlock('Страховая сумма:', sum, Boolean(monthLimit)) : null}
67
- {Number.isFinite(monthLimit)
68
- ? renderValueBlock('Ежемесячный лимит:', monthLimit, Boolean(sum))
69
- : null}
70
- </div>
71
- ) : null;
72
- }
73
-
74
- function renderValueBlock(title: string, sum = 0, isAnotherBlock = false) {
75
- const widthStyle = isAnotherBlock ? 'w-fit' : 'w-full';
76
-
77
- return (
78
- <div className={`flex justify-between items-center gap-2 w-full ${widthStyle}`}>
79
- <span className="text-secondary-text text-l-light">{title}</span>
80
- <span className="text-primary-main text-h6">{addSpacesBetweenNumbers(sum)} ₽</span>
81
- </div>
82
- );
83
- }
@@ -1,29 +0,0 @@
1
- import type { Picture } from '../../model/Picture';
2
- import type { HeadlineCommonProps } from '../../model/HeadlineType';
3
-
4
- /**
5
- * @title Преимущество
6
- */
7
- export interface InsuranceBenefit {
8
- /** @title Название */
9
- label?: string;
10
- /** @title Описание */
11
- description?: string;
12
- icon?: Picture;
13
- }
14
-
15
- /**
16
- * @title Страховка
17
- */
18
- export type InsuranceContent = HeadlineCommonProps & {
19
- image?: Picture;
20
- /** @title Ежемесячный лимит */
21
- monthLimit?: number;
22
- /** @title Страховая сумма */
23
- sum?: number;
24
- /**
25
- * @title Список преимуществ
26
- * @maxItems 6
27
- */
28
- benefits?: InsuranceBenefit[];
29
- };
@@ -1,44 +0,0 @@
1
- import type { BlockVersion } from '../../model/BlockVersion';
2
- import { Img } from '../../ui-kit/Img/Img';
3
- import type { BenefitItemProps } from './ProductBlockContent';
4
-
5
- const benefitTitleStyleMap: Record<BlockVersion, string> = {
6
- primary: 'text-primary-text',
7
- secondary: 'text-white',
8
- };
9
- const benefitDescStyleMap: Record<BlockVersion, string> = {
10
- primary: 'text-secondary-text',
11
- secondary: 'text-white',
12
- };
13
-
14
- export function renderBenefit({ benefit, version = 'primary' }: BenefitItemProps, i: number) {
15
- const isIconWhite = version === 'secondary';
16
-
17
- return (
18
- <div key={String(i)} className="flex gap-3 items-center mb-2.5 last:mb-0">
19
- {benefit.icon ? (
20
- <Img
21
- className={renderBenefitIconBgStyle(version)}
22
- image={{ ...benefit?.icon, iconVersion: isIconWhite ? 'white' : 'normal' }}
23
- width="24"
24
- height="24"
25
- asSVG
26
- />
27
- ) : null}
28
- <div className={`text-l m-0 ${benefitTitleStyleMap[version]}`}>{benefit.label}</div>
29
- {benefit.description && (
30
- <div className={`text-s ${benefitDescStyleMap[version]}`}>{benefit.description}</div>
31
- )}
32
- </div>
33
- );
34
- }
35
-
36
- function renderBenefitIconBgStyle(version) {
37
- let bgColorStyle = 'text-primary-main';
38
-
39
- if (version === 'secondary') {
40
- bgColorStyle = 'text-black';
41
- }
42
-
43
- return `w-6 h-6 rounded-full box-border ${bgColorStyle}`;
44
- }