@redneckz/wildless-cms-uni-blocks 0.3.28 → 0.3.29

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 (376) hide show
  1. package/bundle/blocks.schema.json +1 -1
  2. package/bundle/bundle.umd.js +119 -83
  3. package/bundle/bundle.umd.min.js +1 -1
  4. package/dist/components/Accordion/Accordion.js +2 -2
  5. package/dist/components/Accordion/Accordion.js.map +1 -1
  6. package/dist/components/BaseTile/BaseTile.js +2 -2
  7. package/dist/components/BaseTile/BaseTile.js.map +1 -1
  8. package/dist/components/BenefitsBlock/BenefitsBlock.js +2 -2
  9. package/dist/components/BenefitsBlock/BenefitsBlock.js.map +1 -1
  10. package/dist/components/BlockContent.d.ts +3 -2
  11. package/dist/components/Blocks.d.ts +1 -0
  12. package/dist/components/Blocks.js +2 -0
  13. package/dist/components/Blocks.js.map +1 -1
  14. package/dist/components/ComparisonTable/ComparisonTable.js +3 -3
  15. package/dist/components/ComparisonTable/ComparisonTable.js.map +1 -1
  16. package/dist/components/ContentPage/ContentPage.js +3 -3
  17. package/dist/components/ContentPage/ContentPage.js.map +1 -1
  18. package/dist/components/ContentPage/ContentPageContext.d.ts +2 -1
  19. package/dist/components/ContentPage/normalizeBlock.d.ts +1 -0
  20. package/dist/components/CreditCalculator/CreditCalculator.js +2 -2
  21. package/dist/components/CreditCalculator/CreditCalculator.js.map +1 -1
  22. package/dist/components/ExchangeRateTile/CurrencyTable.js +2 -2
  23. package/dist/components/ExchangeRateTile/CurrencyTable.js.map +1 -1
  24. package/dist/components/ExchangeRateTile/CurrentLocation.js +1 -1
  25. package/dist/components/ExchangeRateTile/CurrentLocation.js.map +1 -1
  26. package/dist/components/ExchangeRateTile/ExchangeCurrencyCalculator.js +2 -2
  27. package/dist/components/ExchangeRateTile/ExchangeCurrencyCalculator.js.map +1 -1
  28. package/dist/components/ExchangeRateTile/ExchangeRateTile.js +2 -2
  29. package/dist/components/ExchangeRateTile/ExchangeRateTile.js.map +1 -1
  30. package/dist/components/Footer/Footer.js +2 -2
  31. package/dist/components/Footer/Footer.js.map +1 -1
  32. package/dist/components/Gallery/GalleryInner.js +2 -2
  33. package/dist/components/Gallery/GalleryInner.js.map +1 -1
  34. package/dist/components/Header/Header.js +2 -2
  35. package/dist/components/Header/Header.js.map +1 -1
  36. package/dist/components/Headline/Headline.js +2 -2
  37. package/dist/components/Headline/Headline.js.map +1 -1
  38. package/dist/components/LikeControl/LikeControl.js +2 -2
  39. package/dist/components/LikeControl/LikeControl.js.map +1 -1
  40. package/dist/components/LinkDocs/LinkDocs.js +2 -2
  41. package/dist/components/LinkDocs/LinkDocs.js.map +1 -1
  42. package/dist/components/LinkList/LinkList.js +2 -2
  43. package/dist/components/LinkList/LinkList.js.map +1 -1
  44. package/dist/components/MobileAppTile/MobileAppTile.js +2 -2
  45. package/dist/components/MobileAppTile/MobileAppTile.js.map +1 -1
  46. package/dist/components/Navigation/Navigation.js +2 -2
  47. package/dist/components/Navigation/Navigation.js.map +1 -1
  48. package/dist/components/NavigatorTabs/NavigatorTabItem.d.ts +7 -0
  49. package/dist/components/NavigatorTabs/NavigatorTabItem.js +16 -0
  50. package/dist/components/NavigatorTabs/NavigatorTabItem.js.map +1 -0
  51. package/dist/components/NavigatorTabs/NavigatorTabs.d.ts +5 -0
  52. package/dist/components/NavigatorTabs/NavigatorTabs.js +17 -0
  53. package/dist/components/NavigatorTabs/NavigatorTabs.js.map +1 -0
  54. package/dist/components/NavigatorTabs/NavigatorTabsContent.d.ts +19 -0
  55. package/dist/components/NavigatorTabs/NavigatorTabsContent.js +2 -0
  56. package/dist/components/NavigatorTabs/NavigatorTabsContent.js.map +1 -0
  57. package/dist/components/PictureText/PictureText.js +2 -2
  58. package/dist/components/PictureText/PictureText.js.map +1 -1
  59. package/dist/components/Placeholder/Placeholder.js +2 -2
  60. package/dist/components/Placeholder/Placeholder.js.map +1 -1
  61. package/dist/components/ProductBlock/ProductBlock.js +2 -2
  62. package/dist/components/ProductBlock/ProductBlock.js.map +1 -1
  63. package/dist/components/ProductBlock/ProductBlockInner.js +1 -1
  64. package/dist/components/ProductBlock/ProductBlockInner.js.map +1 -1
  65. package/dist/components/ProductBlock/ProductBlockInner.mobile.js +1 -1
  66. package/dist/components/ProductBlock/ProductBlockInner.mobile.js.map +1 -1
  67. package/dist/components/ProductGallery/ProductGallery.js +2 -2
  68. package/dist/components/ProductGallery/ProductGallery.js.map +1 -1
  69. package/dist/components/ProductGalleryGreen/ProductGalleryGreen.js +10 -6
  70. package/dist/components/ProductGalleryGreen/ProductGalleryGreen.js.map +1 -1
  71. package/dist/components/ProductTile/ProductTile.js +2 -2
  72. package/dist/components/ProductTile/ProductTile.js.map +1 -1
  73. package/dist/components/PromoTile/PromoTile.js +2 -2
  74. package/dist/components/PromoTile/PromoTile.js.map +1 -1
  75. package/dist/components/Recommendation/Recommendation.js +2 -2
  76. package/dist/components/Recommendation/Recommendation.js.map +1 -1
  77. package/dist/components/StepsBlock/StepsBlock.js +2 -2
  78. package/dist/components/StepsBlock/StepsBlock.js.map +1 -1
  79. package/dist/components/TariffsTable/TariffsTable.js +2 -2
  80. package/dist/components/TariffsTable/TariffsTable.js.map +1 -1
  81. package/dist/components/TextBlock/TextBlock.js +2 -2
  82. package/dist/components/TextBlock/TextBlock.js.map +1 -1
  83. package/dist/components/Tile/Tile.js +2 -2
  84. package/dist/components/Tile/Tile.js.map +1 -1
  85. package/dist/setup-fixture.js +22 -6
  86. package/dist/setup-fixture.js.map +1 -1
  87. package/dist/types.d.ts +2 -0
  88. package/dist/utils/url.d.ts +1 -0
  89. package/dist/utils/url.js +9 -1
  90. package/dist/utils/url.js.map +1 -1
  91. package/lib/common.css +1 -1
  92. package/lib/components/Accordion/Accordion.js +2 -2
  93. package/lib/components/Accordion/Accordion.js.map +1 -1
  94. package/lib/components/BaseTile/BaseTile.js +2 -2
  95. package/lib/components/BaseTile/BaseTile.js.map +1 -1
  96. package/lib/components/BenefitsBlock/BenefitsBlock.js +2 -2
  97. package/lib/components/BenefitsBlock/BenefitsBlock.js.map +1 -1
  98. package/lib/components/BlockContent.d.ts +3 -2
  99. package/lib/components/Blocks.d.ts +1 -0
  100. package/lib/components/Blocks.js +2 -0
  101. package/lib/components/Blocks.js.map +1 -1
  102. package/lib/components/ComparisonTable/ComparisonTable.js +3 -3
  103. package/lib/components/ComparisonTable/ComparisonTable.js.map +1 -1
  104. package/lib/components/ContentPage/ContentPage.js +3 -3
  105. package/lib/components/ContentPage/ContentPage.js.map +1 -1
  106. package/lib/components/ContentPage/ContentPageContext.d.ts +2 -1
  107. package/lib/components/ContentPage/normalizeBlock.d.ts +1 -0
  108. package/lib/components/CreditCalculator/CreditCalculator.js +2 -2
  109. package/lib/components/CreditCalculator/CreditCalculator.js.map +1 -1
  110. package/lib/components/ExchangeRateTile/CurrencyTable.js +2 -2
  111. package/lib/components/ExchangeRateTile/CurrencyTable.js.map +1 -1
  112. package/lib/components/ExchangeRateTile/CurrentLocation.js +1 -1
  113. package/lib/components/ExchangeRateTile/CurrentLocation.js.map +1 -1
  114. package/lib/components/ExchangeRateTile/ExchangeCurrencyCalculator.js +2 -2
  115. package/lib/components/ExchangeRateTile/ExchangeCurrencyCalculator.js.map +1 -1
  116. package/lib/components/ExchangeRateTile/ExchangeRateTile.js +2 -2
  117. package/lib/components/ExchangeRateTile/ExchangeRateTile.js.map +1 -1
  118. package/lib/components/Footer/Footer.js +2 -2
  119. package/lib/components/Footer/Footer.js.map +1 -1
  120. package/lib/components/Gallery/GalleryInner.js +2 -2
  121. package/lib/components/Gallery/GalleryInner.js.map +1 -1
  122. package/lib/components/Header/Header.js +2 -2
  123. package/lib/components/Header/Header.js.map +1 -1
  124. package/lib/components/Headline/Headline.js +2 -2
  125. package/lib/components/Headline/Headline.js.map +1 -1
  126. package/lib/components/LikeControl/LikeControl.js +2 -2
  127. package/lib/components/LikeControl/LikeControl.js.map +1 -1
  128. package/lib/components/LinkDocs/LinkDocs.js +2 -2
  129. package/lib/components/LinkDocs/LinkDocs.js.map +1 -1
  130. package/lib/components/LinkList/LinkList.js +2 -2
  131. package/lib/components/LinkList/LinkList.js.map +1 -1
  132. package/lib/components/MobileAppTile/MobileAppTile.js +2 -2
  133. package/lib/components/MobileAppTile/MobileAppTile.js.map +1 -1
  134. package/lib/components/Navigation/Navigation.js +2 -2
  135. package/lib/components/Navigation/Navigation.js.map +1 -1
  136. package/lib/components/NavigatorTabs/NavigatorTabItem.d.ts +7 -0
  137. package/lib/components/NavigatorTabs/NavigatorTabItem.js +14 -0
  138. package/lib/components/NavigatorTabs/NavigatorTabItem.js.map +1 -0
  139. package/lib/components/NavigatorTabs/NavigatorTabs.d.ts +5 -0
  140. package/lib/components/NavigatorTabs/NavigatorTabs.fixture.d.ts +4 -0
  141. package/lib/components/NavigatorTabs/NavigatorTabs.js +15 -0
  142. package/lib/components/NavigatorTabs/NavigatorTabs.js.map +1 -0
  143. package/lib/components/NavigatorTabs/NavigatorTabsContent.d.ts +19 -0
  144. package/lib/components/NavigatorTabs/NavigatorTabsContent.js +2 -0
  145. package/lib/components/NavigatorTabs/NavigatorTabsContent.js.map +1 -0
  146. package/lib/components/PictureText/PictureText.js +2 -2
  147. package/lib/components/PictureText/PictureText.js.map +1 -1
  148. package/lib/components/Placeholder/Placeholder.js +2 -2
  149. package/lib/components/Placeholder/Placeholder.js.map +1 -1
  150. package/lib/components/ProductBlock/ProductBlock.js +2 -2
  151. package/lib/components/ProductBlock/ProductBlock.js.map +1 -1
  152. package/lib/components/ProductBlock/ProductBlockInner.js +1 -1
  153. package/lib/components/ProductBlock/ProductBlockInner.js.map +1 -1
  154. package/lib/components/ProductBlock/ProductBlockInner.mobile.js +1 -1
  155. package/lib/components/ProductBlock/ProductBlockInner.mobile.js.map +1 -1
  156. package/lib/components/ProductGallery/ProductGallery.js +2 -2
  157. package/lib/components/ProductGallery/ProductGallery.js.map +1 -1
  158. package/lib/components/ProductGalleryGreen/ProductGalleryGreen.js +10 -6
  159. package/lib/components/ProductGalleryGreen/ProductGalleryGreen.js.map +1 -1
  160. package/lib/components/ProductTile/ProductTile.js +2 -2
  161. package/lib/components/ProductTile/ProductTile.js.map +1 -1
  162. package/lib/components/PromoTile/PromoTile.js +2 -2
  163. package/lib/components/PromoTile/PromoTile.js.map +1 -1
  164. package/lib/components/Recommendation/Recommendation.js +2 -2
  165. package/lib/components/Recommendation/Recommendation.js.map +1 -1
  166. package/lib/components/StepsBlock/StepsBlock.js +2 -2
  167. package/lib/components/StepsBlock/StepsBlock.js.map +1 -1
  168. package/lib/components/TariffsTable/TariffsTable.js +2 -2
  169. package/lib/components/TariffsTable/TariffsTable.js.map +1 -1
  170. package/lib/components/TextBlock/TextBlock.js +2 -2
  171. package/lib/components/TextBlock/TextBlock.js.map +1 -1
  172. package/lib/components/Tile/Tile.js +2 -2
  173. package/lib/components/Tile/Tile.js.map +1 -1
  174. package/lib/setup-fixture.js +22 -6
  175. package/lib/setup-fixture.js.map +1 -1
  176. package/lib/types.d.ts +2 -0
  177. package/lib/utils/url.d.ts +1 -0
  178. package/lib/utils/url.js +7 -0
  179. package/lib/utils/url.js.map +1 -1
  180. package/mobile/bundle/bundle.umd.js +36 -28
  181. package/mobile/bundle/bundle.umd.min.js +1 -1
  182. package/mobile/dist/components/BaseTile/BaseTile.js +2 -2
  183. package/mobile/dist/components/BaseTile/BaseTile.js.map +1 -1
  184. package/mobile/dist/components/BenefitsBlock/BenefitsBlock.js +2 -2
  185. package/mobile/dist/components/BenefitsBlock/BenefitsBlock.js.map +1 -1
  186. package/mobile/dist/components/BlockContent.d.ts +3 -2
  187. package/mobile/dist/components/ContentPage/ContentPage.js +3 -3
  188. package/mobile/dist/components/ContentPage/ContentPage.js.map +1 -1
  189. package/mobile/dist/components/ContentPage/ContentPageContext.d.ts +2 -1
  190. package/mobile/dist/components/CreditCalculator/CreditCalculator.js +2 -2
  191. package/mobile/dist/components/CreditCalculator/CreditCalculator.js.map +1 -1
  192. package/mobile/dist/components/ExchangeRateTile/CurrencyTable.js +2 -2
  193. package/mobile/dist/components/ExchangeRateTile/CurrencyTable.js.map +1 -1
  194. package/mobile/dist/components/ExchangeRateTile/CurrentLocation.js +1 -1
  195. package/mobile/dist/components/ExchangeRateTile/CurrentLocation.js.map +1 -1
  196. package/mobile/dist/components/ExchangeRateTile/ExchangeCurrencyCalculator.js +2 -2
  197. package/mobile/dist/components/ExchangeRateTile/ExchangeCurrencyCalculator.js.map +1 -1
  198. package/mobile/dist/components/ExchangeRateTile/ExchangeRateTile.js +2 -2
  199. package/mobile/dist/components/ExchangeRateTile/ExchangeRateTile.js.map +1 -1
  200. package/mobile/dist/components/Gallery/GalleryInner.js +2 -2
  201. package/mobile/dist/components/Gallery/GalleryInner.js.map +1 -1
  202. package/mobile/dist/components/LikeControl/LikeControl.js +2 -2
  203. package/mobile/dist/components/LikeControl/LikeControl.js.map +1 -1
  204. package/mobile/dist/components/LinkList/LinkList.js +2 -2
  205. package/mobile/dist/components/LinkList/LinkList.js.map +1 -1
  206. package/mobile/dist/components/Navigation/Navigation.js +2 -2
  207. package/mobile/dist/components/Navigation/Navigation.js.map +1 -1
  208. package/mobile/dist/components/NavigatorTabs/NavigatorTabItem.d.ts +7 -0
  209. package/mobile/dist/components/NavigatorTabs/NavigatorTabItem.js +16 -0
  210. package/mobile/dist/components/NavigatorTabs/NavigatorTabItem.js.map +1 -0
  211. package/mobile/dist/components/NavigatorTabs/NavigatorTabs.d.ts +5 -0
  212. package/mobile/dist/components/NavigatorTabs/NavigatorTabs.js +17 -0
  213. package/mobile/dist/components/NavigatorTabs/NavigatorTabs.js.map +1 -0
  214. package/mobile/dist/components/NavigatorTabs/NavigatorTabsContent.d.ts +19 -0
  215. package/mobile/dist/components/NavigatorTabs/NavigatorTabsContent.js +2 -0
  216. package/mobile/dist/components/NavigatorTabs/NavigatorTabsContent.js.map +1 -0
  217. package/mobile/dist/components/PictureText/PictureText.js +2 -2
  218. package/mobile/dist/components/PictureText/PictureText.js.map +1 -1
  219. package/mobile/dist/components/Placeholder/Placeholder.js +2 -2
  220. package/mobile/dist/components/Placeholder/Placeholder.js.map +1 -1
  221. package/mobile/dist/components/ProductBlock/ProductBlockInner.js +1 -1
  222. package/mobile/dist/components/ProductBlock/ProductBlockInner.js.map +1 -1
  223. package/mobile/dist/components/ProductGalleryGreen/ProductGalleryGreen.js +10 -6
  224. package/mobile/dist/components/ProductGalleryGreen/ProductGalleryGreen.js.map +1 -1
  225. package/mobile/dist/components/ProductTile/ProductTile.js +2 -2
  226. package/mobile/dist/components/ProductTile/ProductTile.js.map +1 -1
  227. package/mobile/dist/components/PromoTile/PromoTile.js +2 -2
  228. package/mobile/dist/components/PromoTile/PromoTile.js.map +1 -1
  229. package/mobile/dist/components/Recommendation/Recommendation.js +2 -2
  230. package/mobile/dist/components/Recommendation/Recommendation.js.map +1 -1
  231. package/mobile/dist/components/Tile/Tile.js +2 -2
  232. package/mobile/dist/components/Tile/Tile.js.map +1 -1
  233. package/mobile/dist/setup-fixture.js +22 -6
  234. package/mobile/dist/setup-fixture.js.map +1 -1
  235. package/mobile/dist/types.d.ts +2 -0
  236. package/mobile/dist/utils/url.d.ts +1 -0
  237. package/mobile/dist/utils/url.js +9 -1
  238. package/mobile/dist/utils/url.js.map +1 -1
  239. package/mobile/lib/components/BaseTile/BaseTile.js +2 -2
  240. package/mobile/lib/components/BaseTile/BaseTile.js.map +1 -1
  241. package/mobile/lib/components/BenefitsBlock/BenefitsBlock.js +2 -2
  242. package/mobile/lib/components/BenefitsBlock/BenefitsBlock.js.map +1 -1
  243. package/mobile/lib/components/BlockContent.d.ts +3 -2
  244. package/mobile/lib/components/ContentPage/ContentPage.js +3 -3
  245. package/mobile/lib/components/ContentPage/ContentPage.js.map +1 -1
  246. package/mobile/lib/components/ContentPage/ContentPageContext.d.ts +2 -1
  247. package/mobile/lib/components/CreditCalculator/CreditCalculator.js +2 -2
  248. package/mobile/lib/components/CreditCalculator/CreditCalculator.js.map +1 -1
  249. package/mobile/lib/components/ExchangeRateTile/CurrencyTable.js +2 -2
  250. package/mobile/lib/components/ExchangeRateTile/CurrencyTable.js.map +1 -1
  251. package/mobile/lib/components/ExchangeRateTile/CurrentLocation.js +1 -1
  252. package/mobile/lib/components/ExchangeRateTile/CurrentLocation.js.map +1 -1
  253. package/mobile/lib/components/ExchangeRateTile/ExchangeCurrencyCalculator.js +2 -2
  254. package/mobile/lib/components/ExchangeRateTile/ExchangeCurrencyCalculator.js.map +1 -1
  255. package/mobile/lib/components/ExchangeRateTile/ExchangeRateTile.js +2 -2
  256. package/mobile/lib/components/ExchangeRateTile/ExchangeRateTile.js.map +1 -1
  257. package/mobile/lib/components/Gallery/GalleryInner.js +2 -2
  258. package/mobile/lib/components/Gallery/GalleryInner.js.map +1 -1
  259. package/mobile/lib/components/LikeControl/LikeControl.js +2 -2
  260. package/mobile/lib/components/LikeControl/LikeControl.js.map +1 -1
  261. package/mobile/lib/components/LinkList/LinkList.js +2 -2
  262. package/mobile/lib/components/LinkList/LinkList.js.map +1 -1
  263. package/mobile/lib/components/Navigation/Navigation.js +2 -2
  264. package/mobile/lib/components/Navigation/Navigation.js.map +1 -1
  265. package/mobile/lib/components/NavigatorTabs/NavigatorTabItem.d.ts +7 -0
  266. package/mobile/lib/components/NavigatorTabs/NavigatorTabItem.js +14 -0
  267. package/mobile/lib/components/NavigatorTabs/NavigatorTabItem.js.map +1 -0
  268. package/mobile/lib/components/NavigatorTabs/NavigatorTabs.d.ts +5 -0
  269. package/mobile/lib/components/NavigatorTabs/NavigatorTabs.js +15 -0
  270. package/mobile/lib/components/NavigatorTabs/NavigatorTabs.js.map +1 -0
  271. package/mobile/lib/components/NavigatorTabs/NavigatorTabsContent.d.ts +19 -0
  272. package/mobile/lib/components/NavigatorTabs/NavigatorTabsContent.js +2 -0
  273. package/mobile/lib/components/NavigatorTabs/NavigatorTabsContent.js.map +1 -0
  274. package/mobile/lib/components/PictureText/PictureText.js +2 -2
  275. package/mobile/lib/components/PictureText/PictureText.js.map +1 -1
  276. package/mobile/lib/components/Placeholder/Placeholder.js +2 -2
  277. package/mobile/lib/components/Placeholder/Placeholder.js.map +1 -1
  278. package/mobile/lib/components/ProductBlock/ProductBlockInner.js +1 -1
  279. package/mobile/lib/components/ProductBlock/ProductBlockInner.js.map +1 -1
  280. package/mobile/lib/components/ProductGalleryGreen/ProductGalleryGreen.js +10 -6
  281. package/mobile/lib/components/ProductGalleryGreen/ProductGalleryGreen.js.map +1 -1
  282. package/mobile/lib/components/ProductTile/ProductTile.js +2 -2
  283. package/mobile/lib/components/ProductTile/ProductTile.js.map +1 -1
  284. package/mobile/lib/components/PromoTile/PromoTile.js +2 -2
  285. package/mobile/lib/components/PromoTile/PromoTile.js.map +1 -1
  286. package/mobile/lib/components/Recommendation/Recommendation.js +2 -2
  287. package/mobile/lib/components/Recommendation/Recommendation.js.map +1 -1
  288. package/mobile/lib/components/Tile/Tile.js +2 -2
  289. package/mobile/lib/components/Tile/Tile.js.map +1 -1
  290. package/mobile/lib/setup-fixture.js +22 -6
  291. package/mobile/lib/setup-fixture.js.map +1 -1
  292. package/mobile/lib/types.d.ts +2 -0
  293. package/mobile/lib/utils/url.d.ts +1 -0
  294. package/mobile/lib/utils/url.js +7 -0
  295. package/mobile/lib/utils/url.js.map +1 -1
  296. package/mobile/src/common.css +4 -0
  297. package/mobile/src/components/BaseTile/BaseTile.tsx +2 -2
  298. package/mobile/src/components/BenefitsBlock/BenefitsBlock.tsx +19 -16
  299. package/mobile/src/components/BlockContent.ts +3 -1
  300. package/mobile/src/components/ContentPage/ContentPage.page.json +30 -0
  301. package/mobile/src/components/ContentPage/ContentPage.tsx +3 -3
  302. package/mobile/src/components/ContentPage/ContentPageContext.tsx +2 -1
  303. package/mobile/src/components/CreditCalculator/CreditCalculator.tsx +2 -2
  304. package/mobile/src/components/ExchangeRateTile/CurrencyTable.tsx +9 -5
  305. package/mobile/src/components/ExchangeRateTile/CurrentLocation.tsx +2 -2
  306. package/mobile/src/components/ExchangeRateTile/ExchangeCurrencyCalculator.tsx +4 -4
  307. package/mobile/src/components/ExchangeRateTile/ExchangeRateTile.tsx +11 -5
  308. package/mobile/src/components/Gallery/GalleryInner.tsx +2 -1
  309. package/mobile/src/components/LikeControl/LikeControl.tsx +3 -2
  310. package/mobile/src/components/LinkList/LinkList.tsx +2 -2
  311. package/mobile/src/components/Navigation/Navigation.tsx +31 -28
  312. package/mobile/src/components/NavigatorTabs/NavigatorTabItem.tsx +29 -0
  313. package/mobile/src/components/NavigatorTabs/NavigatorTabs.example.json +7 -0
  314. package/mobile/src/components/NavigatorTabs/NavigatorTabs.tsx +36 -0
  315. package/mobile/src/components/NavigatorTabs/NavigatorTabsContent.ts +20 -0
  316. package/mobile/src/components/PictureText/PictureText.tsx +18 -13
  317. package/mobile/src/components/Placeholder/Placeholder.tsx +2 -1
  318. package/mobile/src/components/ProductBlock/ProductBlockInner.tsx +3 -1
  319. package/mobile/src/components/ProductGalleryGreen/ProductGalleryGreen.tsx +11 -6
  320. package/mobile/src/components/ProductTile/ProductTile.tsx +2 -0
  321. package/mobile/src/components/PromoTile/PromoTile.tsx +2 -0
  322. package/mobile/src/components/Recommendation/Recommendation.tsx +2 -1
  323. package/mobile/src/components/Tile/Tile.tsx +2 -0
  324. package/mobile/src/services/sitemap/isTopItemActive.spec.ts +1 -0
  325. package/mobile/src/setup-fixture.ts +23 -8
  326. package/mobile/src/types.ts +2 -0
  327. package/mobile/src/utils/url.ts +9 -0
  328. package/package.json +1 -1
  329. package/src/common.css +4 -0
  330. package/src/components/Accordion/Accordion.tsx +5 -2
  331. package/src/components/BaseTile/BaseTile.tsx +2 -2
  332. package/src/components/BenefitsBlock/BenefitsBlock.tsx +19 -16
  333. package/src/components/BlockContent.ts +3 -1
  334. package/src/components/Blocks.ts +2 -0
  335. package/src/components/ComparisonTable/ComparisonTable.tsx +4 -2
  336. package/src/components/ContentPage/ContentPage.page.json +30 -0
  337. package/src/components/ContentPage/ContentPage.tsx +3 -3
  338. package/src/components/ContentPage/ContentPageContext.tsx +2 -1
  339. package/src/components/CreditCalculator/CreditCalculator.tsx +2 -2
  340. package/src/components/ExchangeRateTile/CurrencyTable.tsx +9 -5
  341. package/src/components/ExchangeRateTile/CurrentLocation.tsx +2 -2
  342. package/src/components/ExchangeRateTile/ExchangeCurrencyCalculator.tsx +4 -4
  343. package/src/components/ExchangeRateTile/ExchangeRateTile.fixture.tsx +1 -1
  344. package/src/components/ExchangeRateTile/ExchangeRateTile.tsx +11 -5
  345. package/src/components/Footer/Footer.tsx +11 -2
  346. package/src/components/Gallery/GalleryInner.tsx +2 -1
  347. package/src/components/Header/Header.tsx +2 -2
  348. package/src/components/Headline/Headline.tsx +9 -2
  349. package/src/components/LikeControl/LikeControl.tsx +3 -2
  350. package/src/components/LinkDocs/LinkDocs.tsx +2 -1
  351. package/src/components/LinkList/LinkList.tsx +2 -2
  352. package/src/components/MobileAppTile/MobileAppTile.tsx +9 -1
  353. package/src/components/Navigation/Navigation.tsx +31 -28
  354. package/src/components/NavigatorTabs/NavigatorTabItem.tsx +29 -0
  355. package/src/components/NavigatorTabs/NavigatorTabs.example.json +7 -0
  356. package/src/components/NavigatorTabs/NavigatorTabs.fixture.tsx +11 -0
  357. package/src/components/NavigatorTabs/NavigatorTabs.tsx +36 -0
  358. package/src/components/NavigatorTabs/NavigatorTabsContent.ts +20 -0
  359. package/src/components/PictureText/PictureText.tsx +18 -13
  360. package/src/components/Placeholder/Placeholder.tsx +2 -1
  361. package/src/components/ProductBlock/ProductBlock.tsx +10 -1
  362. package/src/components/ProductBlock/ProductBlockInner.mobile.tsx +3 -1
  363. package/src/components/ProductBlock/ProductBlockInner.tsx +1 -1
  364. package/src/components/ProductGallery/ProductGallery.tsx +5 -2
  365. package/src/components/ProductGalleryGreen/ProductGalleryGreen.tsx +11 -6
  366. package/src/components/ProductTile/ProductTile.tsx +2 -0
  367. package/src/components/PromoTile/PromoTile.tsx +2 -0
  368. package/src/components/Recommendation/Recommendation.tsx +2 -1
  369. package/src/components/StepsBlock/StepsBlock.tsx +25 -22
  370. package/src/components/TariffsTable/TariffsTable.tsx +2 -1
  371. package/src/components/TextBlock/TextBlock.tsx +10 -1
  372. package/src/components/Tile/Tile.tsx +2 -0
  373. package/src/services/sitemap/isTopItemActive.spec.ts +1 -0
  374. package/src/setup-fixture.ts +23 -8
  375. package/src/types.ts +2 -0
  376. package/src/utils/url.ts +9 -0
@@ -0,0 +1,29 @@
1
+ import { JSX } from '@redneckz/uni-jsx';
2
+ import type { NavigatorTab } from './NavigatorTabsContent';
3
+
4
+ export interface NavigatorTabItemProps extends NavigatorTab {
5
+ active?: boolean;
6
+ className?: string;
7
+ onClick?: (ev: MouseEvent) => void;
8
+ }
9
+
10
+ const TEXT_CLASSES = 'font-sans font-normal text-sm';
11
+ const LINK_CLASSES = 'flex-1 flex items-center justify-center';
12
+
13
+ export const NavigatorTabItem = JSX<NavigatorTabItemProps>(
14
+ ({ className = '', label, active, children, onClick, anchor }) => (
15
+ <a className={getLinkClasses(className, active)} href={`#${anchor}`} onClick={onClick}>
16
+ <span className={getTextClasses(active)}>{label || children}</span>
17
+ </a>
18
+ ),
19
+ );
20
+
21
+ const getLinkClasses = (className: string, active?: boolean) => {
22
+ const classes = active ? 'bg-primary-main' : 'bg-white';
23
+ return `${classes} ${LINK_CLASSES} ${className}`;
24
+ };
25
+
26
+ const getTextClasses = (active?: boolean) => {
27
+ const classes = active ? 'text-white' : 'text-secondary-text hover:text-primary-main';
28
+ return `${classes} ${TEXT_CLASSES}`;
29
+ };
@@ -0,0 +1,7 @@
1
+ {
2
+ "navigatorTabs": [
3
+ { "label": "Tab1", "anchor": "tab1" },
4
+ { "label": "Tab2", "anchor": "tab2" },
5
+ { "label": "Tab3", "anchor": "tab3" }
6
+ ]
7
+ }
@@ -0,0 +1,36 @@
1
+ import { JSX } from '@redneckz/uni-jsx';
2
+ import type { UniBlockProps } from '../../types';
3
+ import { getHash } from '../../utils/url';
4
+ import type { Router } from '../ContentPage/ContentPageContext';
5
+ import { NavigatorTabItem } from './NavigatorTabItem';
6
+ import type { NavigatorTab, NavigatorTabsContent } from './NavigatorTabsContent';
7
+
8
+ export interface TabsBlockProps extends NavigatorTabsContent, UniBlockProps {}
9
+
10
+ export const NavigatorTabs = JSX<TabsBlockProps>(
11
+ ({ className = '', navigatorTabs, context, anchor = null }) => {
12
+ const router = context.useRouter();
13
+ const hash = getHash(router.href);
14
+ return (
15
+ <section
16
+ className={`sticky top-0 z-20 box-border flex gap-x-1 h-12 ${className}`}
17
+ id={anchor}
18
+ >
19
+ {navigatorTabs ? navigatorTabs.map(renderTab(hash, router)) : null}
20
+ </section>
21
+ );
22
+ },
23
+ );
24
+
25
+ const renderTab = (hash?: string, router?: Router) => (tab: NavigatorTab, i: number) => {
26
+ const anchorHash = `#${tab.anchor}`;
27
+ const active = hash ? anchorHash === hash : i === 0;
28
+ return (
29
+ <NavigatorTabItem
30
+ key={tab.anchor}
31
+ active={active}
32
+ onClick={() => router?.replace(anchorHash)}
33
+ {...tab}
34
+ />
35
+ );
36
+ };
@@ -0,0 +1,20 @@
1
+ /**
2
+ * @title Таб
3
+ */
4
+ export interface NavigatorTab {
5
+ /** @title Название */
6
+ label?: string;
7
+ /** @title Якорь */
8
+ anchor?: string;
9
+ }
10
+
11
+ /**
12
+ * @title Блок табов
13
+ */
14
+ export interface NavigatorTabsContent {
15
+ /**
16
+ * @title Список табов
17
+ * @minItems 3
18
+ */
19
+ navigatorTabs?: NavigatorTab[];
20
+ }
@@ -9,19 +9,24 @@ import { Benefit } from '../BenefitsBlock/BenefitsBlockContent';
9
9
 
10
10
  export interface PictureTextProps extends PictureTextContent, UniBlockProps {}
11
11
 
12
- export const PictureText = JSX<PictureTextProps>(({ className = '', title, image, benefits }) => {
13
- return (
14
- <section className={`relative font-sans text-primary-text bg-white p-14 ${className}`}>
15
- <Heading headingType="h2" className="text-center" title={title} />
16
- <div className={'flex justify-center mt-9'}>
17
- {image?.src && <Img className="mr-6" image={image} />}
18
- {benefits?.length ? (
19
- <div className="flex flex-col">{benefits.map(renderBenefit)}</div>
20
- ) : null}
21
- </div>
22
- </section>
23
- );
24
- });
12
+ export const PictureText = JSX<PictureTextProps>(
13
+ ({ className = '', title, image, benefits, anchor = null }) => {
14
+ return (
15
+ <section
16
+ className={`relative font-sans text-primary-text bg-white p-14 ${className}`}
17
+ id={anchor}
18
+ >
19
+ <Heading headingType="h2" className="text-center" title={title} />
20
+ <div className={'flex justify-center mt-9'}>
21
+ {image?.src && <Img className="mr-6" image={image} />}
22
+ {benefits?.length ? (
23
+ <div className="flex flex-col">{benefits.map(renderBenefit)}</div>
24
+ ) : null}
25
+ </div>
26
+ </section>
27
+ );
28
+ },
29
+ );
25
30
 
26
31
  function renderBenefit(benefit: Benefit, i: number) {
27
32
  return (
@@ -15,12 +15,13 @@ export interface PlaceholderProps extends PlaceholderContent, UniBlockProps {
15
15
  const GOLDEN_RATIO = 1.618;
16
16
 
17
17
  export const Placeholder = JSX<PlaceholderProps>(
18
- ({ className, context, title, description = 'Блок в разработке...' }) => {
18
+ ({ className, context, title, description = 'Блок в разработке...', anchor = null }) => {
19
19
  return (
20
20
  <section
21
21
  className={`bg-white text-primary-text font-sans p-9 box-border ${className} ${getTileRightPadding(
22
22
  className,
23
23
  )} ${getTileMinHeight(className)} `}
24
+ id={anchor}
24
25
  >
25
26
  <BaseTile
26
27
  context={context}
@@ -86,7 +86,9 @@ const labelStyleMap: Record<BlockVersion, string> = {
86
86
  };
87
87
 
88
88
  const renderLabel = (label: string, version: BlockVersion) => (
89
- <div className={`m-xs px-2.5 py-1.5 mb-5 rounded-md border-2 w-fit ${labelStyleMap[version]}`}>
89
+ <div
90
+ className={`m-xs px-2.5 py-1.5 mb-5 rounded-md border-2 border-solid w-fit ${labelStyleMap[version]}`}
91
+ >
90
92
  {label}
91
93
  </div>
92
94
  );
@@ -8,7 +8,7 @@ import type { ProductGalleryGreenContent } from './ProductGalleryGreenContent';
8
8
  export interface ProductGalleryProps extends ProductGalleryGreenContent, UniBlockProps {}
9
9
 
10
10
  export const ProductGalleryGreen = JSX<ProductGalleryProps>(
11
- ({ className = '', context, slides = [] }) => {
11
+ ({ className = '', context, slides = [], anchor = null }) => {
12
12
  const galleryNav = slides.map((s) => s.nav);
13
13
  const galleryBlocks = slides.map((s) => s.productBlock);
14
14
  const [activeSlideIndex, setActiveSlideIndex] = context.useState(0);
@@ -16,6 +16,7 @@ export const ProductGalleryGreen = JSX<ProductGalleryProps>(
16
16
  return (
17
17
  <section
18
18
  className={`box-border pt-[70px] relative font-sans overflow-hidden bg-primary-main w-100 ${className}`}
19
+ id={anchor}
19
20
  >
20
21
  <div
21
22
  className="flex duration-1000 pb-14"
@@ -75,9 +76,13 @@ function renderNavButton({ slide, i, activeSlideIndex, onClick }) {
75
76
  const isActiveBtn = i === activeSlideIndex;
76
77
  const btnClassName = isActiveBtn
77
78
  ? 'bg-white shadow-dark-blue/42 h-[102px] w-[354px] min-w-[354px] max-w-[354px] p-0'
78
- : 'bg-white/10 min-w-[277px] px-0 pt-4 pb-[23px] hover:py-[26px] hover:py-[26px] ease-in duration-300';
79
- const btnTitleClassName = isActiveBtn ? 'text-primary-text' : 'text-white';
80
- const btnDescClassName = isActiveBtn ? 'text-secondary-text' : 'text-white';
79
+ : 'bg-white/10 min-w-[277px] px-0 pt-4 pb-[23px] hover:pt-[21px] hover:pb-7 ease-in duration-300';
80
+ const btnTitleClassName = isActiveBtn
81
+ ? 'text-[18px] text-primary-text pb-[10px]'
82
+ : 'text-m-base text-white pb-[3px]';
83
+ const btnDescClassName = isActiveBtn
84
+ ? 'text-[18px] text-secondary-text'
85
+ : 'text-m-base text-white';
81
86
 
82
87
  return (
83
88
  <button
@@ -90,8 +95,8 @@ function renderNavButton({ slide, i, activeSlideIndex, onClick }) {
90
95
  `}
91
96
  >
92
97
  <div className="border-0 px-6">
93
- <div className={`text-sm font-medium pb-[3px] ${btnTitleClassName}`}>{slide?.title}</div>
94
- <div className={`text-xs text-secondary-text ${btnDescClassName}`}>{slide.description}</div>
98
+ <div className={`font-medium ${btnTitleClassName}`}>{slide?.title}</div>
99
+ <div className={`text-secondary-text ${btnDescClassName}`}>{slide.description}</div>
95
100
  </div>
96
101
  </button>
97
102
  );
@@ -29,12 +29,14 @@ export const ProductTile = JSX<ProductTileProps>(
29
29
  buttons,
30
30
  image,
31
31
  version = 'primary',
32
+ anchor = null,
32
33
  }) => {
33
34
  return (
34
35
  <section
35
36
  className={`bg-white text-primary-text font-sans p-9 box-border ${className} ${
36
37
  productTileStyleMap[version]
37
38
  } ${getTileRightPadding(className)} ${getTileMinHeight(className)} `}
39
+ id={anchor}
38
40
  >
39
41
  <BaseTile
40
42
  context={context}
@@ -25,12 +25,14 @@ export const PromoTile = JSX<PromoTileProps>(
25
25
  description,
26
26
  buttons = [],
27
27
  version = 'primary',
28
+ anchor = null,
28
29
  }) => {
29
30
  return (
30
31
  <section
31
32
  className={`bg-white text-primary-text font-sans p-9 box-border ${className} ${
32
33
  promoTileStyleMap[version]
33
34
  } ${getTileRightPadding(className)} ${getTileMinHeight(className)} `}
35
+ id={anchor}
34
36
  >
35
37
  <BaseTile
36
38
  context={context}
@@ -12,7 +12,7 @@ const CARD_SHIFT = 525;
12
12
  export interface RecommendationProps extends RecommendationContent, UniBlockProps {}
13
13
 
14
14
  export const Recommendation = JSX<RecommendationProps>(
15
- ({ context, recommendations = [], className = '', title, version }) => {
15
+ ({ context, recommendations = [], className = '', title, version, anchor = null }) => {
16
16
  const [activeCardIndex, setActiveCardIndex] = context.useState(0);
17
17
 
18
18
  const blockClassName =
@@ -22,6 +22,7 @@ export const Recommendation = JSX<RecommendationProps>(
22
22
  return (
23
23
  <section
24
24
  className={`relative font-sans p-[50px] overflow-hidden ${blockClassName} ${className}`}
25
+ id={anchor}
25
26
  >
26
27
  {title ? <Heading headingType="h3" className="mb-8" title={title} /> : null}
27
28
  <div
@@ -33,6 +33,7 @@ export const Tile = JSX<TileProps>((props) => {
33
33
  className = '',
34
34
  version = 'primary',
35
35
  role,
36
+ anchor = null,
36
37
  } = props;
37
38
 
38
39
  return (
@@ -41,6 +42,7 @@ export const Tile = JSX<TileProps>((props) => {
41
42
  tileStyleMap[version]
42
43
  } ${getTileRightPadding(className)} ${getTileMinHeight(className)} `}
43
44
  role={role}
45
+ id={anchor}
44
46
  >
45
47
  <BaseTile
46
48
  context={context}
@@ -5,6 +5,7 @@ const router: Router = {
5
5
  href: 'https://foo.ru/natural/credits',
6
6
  pathname: '/natural',
7
7
  push: () => undefined,
8
+ replace: () => undefined,
8
9
  query: {},
9
10
  };
10
11
 
@@ -11,16 +11,28 @@ const TEST_ORIGIN = 'http://localhost:5001';
11
11
 
12
12
  const DaData = DaDataAPI('https://10.80.4.9');
13
13
 
14
- export const context: ContentPageContext = {
15
- useState,
16
- useRouter: () => ({
17
- href: `${TEST_ORIGIN}/credits`,
14
+ const Router = () => {
15
+ const [href, setHref] = useState<string>(globalThis.location.href);
16
+
17
+ return {
18
+ href: href,
18
19
  pathname: '/credits',
19
20
  query: {},
20
- push: (url: string) => {
21
- console.log(url);
21
+ push: (url?: string) => {
22
+ if (!url) return;
23
+ globalThis.history.pushState(null, '', url);
24
+ setHref(globalThis.location.href);
22
25
  },
23
- }),
26
+ replace: (url?: string) => {
27
+ if (!url) return;
28
+ globalThis.history.replaceState(null, '', url);
29
+ setHref(globalThis.location.href);
30
+ },
31
+ };
32
+ };
33
+ export const context: ContentPageContext = {
34
+ useState,
35
+ useRouter: Router,
24
36
  useAsyncData: (key, fetcher) => {
25
37
  const [data, setData] = useState();
26
38
  useEffect(() => {
@@ -76,7 +88,10 @@ export const mobileContext: ContentPageContext = {
76
88
  href: `${TEST_ORIGIN}/mobile/credits`,
77
89
  pathname: '/mobile/credits',
78
90
  query: {},
79
- push: (url: string) => {
91
+ push: (url?: string) => {
92
+ console.log(url);
93
+ },
94
+ replace: (url?: string) => {
80
95
  console.log(url);
81
96
  },
82
97
  }),
@@ -10,6 +10,7 @@ export interface BaseBlockDef {
10
10
  content?: BlockContent;
11
11
  version?: BlockVersion;
12
12
  hidden?: boolean;
13
+ anchor?: string;
13
14
  }
14
15
 
15
16
  export interface BlockDef extends BaseBlockDef {
@@ -50,6 +51,7 @@ export interface ContentPageDef extends ContentPageMeta {
50
51
  export interface UniBlockProps {
51
52
  className?: string;
52
53
  context: ContentPageContext;
54
+ anchor?: string;
53
55
  }
54
56
 
55
57
  export interface DaDataResult {
@@ -13,3 +13,12 @@ export const getOrigin = (href?: string) => {
13
13
  const endOfOrigin = url.indexOf('/', endOfProto + protoSeparator.length);
14
14
  return endOfOrigin !== -1 ? url.substring(0, endOfOrigin) : url;
15
15
  };
16
+
17
+ export const getHash = (href?: string) => {
18
+ if (!href || !isURL(href)) {
19
+ return undefined;
20
+ }
21
+
22
+ const hashIndex = href.indexOf('#');
23
+ return hashIndex !== -1 ? href.substring(hashIndex, href.length) : undefined;
24
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@redneckz/wildless-cms-uni-blocks",
3
- "version": "0.3.28",
3
+ "version": "0.3.29",
4
4
  "private": false,
5
5
  "license": "MIT",
6
6
  "author": "ЦК",
package/src/common.css CHANGED
@@ -1,5 +1,9 @@
1
1
  @import '../fonts/ubuntu/ubuntu.css';
2
2
 
3
+ html {
4
+ scroll-behavior: smooth;
5
+ }
6
+
3
7
  /* Private clients | Green */
4
8
  [data-theme='pc'] {
5
9
  --color-primary-main: 66, 171, 68;
@@ -13,9 +13,12 @@ const accordionStyleMap: Record<BlockVersion, string> = {
13
13
  };
14
14
 
15
15
  export const Accordion = JSX<AccordionProps>(
16
- ({ title, accordionItems, context, className = '', version = 'primary' }) => {
16
+ ({ title, accordionItems, context, className = '', version = 'primary', anchor = null }) => {
17
17
  return (
18
- <section className={`p-[50px] font-sans ${className} ${accordionStyleMap[version]}`}>
18
+ <section
19
+ className={`p-[50px] font-sans ${className} ${accordionStyleMap[version]}`}
20
+ id={anchor}
21
+ >
19
22
  {title ? <Heading headingType="h4" className="mb-2.5" title={title} /> : null}
20
23
  {accordionItems?.length ? (
21
24
  <ul className="list-none m-0 p-0">
@@ -5,9 +5,9 @@ import type { BaseTileCommonProps } from './BaseTileProps';
5
5
  export interface BaseTileProps extends BaseTileCommonProps, UniBlockProps {}
6
6
 
7
7
  export const BaseTile = JSX<BaseTileProps>(
8
- ({ className = '', title, children, buttons, image }) => {
8
+ ({ className = '', title, children, buttons, image, anchor = null }) => {
9
9
  return (
10
- <div className={`font-sans flex flex-col grow h-full items-start ${className}`}>
10
+ <div className={`font-sans flex flex-col grow h-full items-start ${className}`} id={anchor}>
11
11
  {title}
12
12
  <div className="flex grow w-full justify-between">
13
13
  <div className="flex flex-col justify-between w-full">
@@ -6,22 +6,25 @@ import type { Benefit, BenefitsBlockContent } from './BenefitsBlockContent';
6
6
 
7
7
  export interface BenefitsBlockProps extends BenefitsBlockContent, UniBlockProps {}
8
8
 
9
- export const BenefitsBlock = JSX<BenefitsBlockProps>(({ className, title, benefits }) => {
10
- return (
11
- <section
12
- className={`font-sans text-primary-text bg-white p-12 flex flex-col items-center ${
13
- className || ''
14
- }`}
15
- >
16
- {title ? (
17
- <Heading headingType="h2" className="max-w-[47rem] text-center" title={title} />
18
- ) : null}
19
- {benefits?.length ? (
20
- <div className="grid grid-cols-2 gap-8 mt-9">{benefits.map(renderStep)}</div>
21
- ) : null}
22
- </section>
23
- );
24
- });
9
+ export const BenefitsBlock = JSX<BenefitsBlockProps>(
10
+ ({ className, title, benefits, anchor = null }) => {
11
+ return (
12
+ <section
13
+ className={`font-sans text-primary-text bg-white p-12 flex flex-col items-center ${
14
+ className || ''
15
+ }`}
16
+ id={anchor}
17
+ >
18
+ {title ? (
19
+ <Heading headingType="h2" className="max-w-[47rem] text-center" title={title} />
20
+ ) : null}
21
+ {benefits?.length ? (
22
+ <div className="grid grid-cols-2 gap-8 mt-9">{benefits.map(renderStep)}</div>
23
+ ) : null}
24
+ </section>
25
+ );
26
+ },
27
+ );
25
28
 
26
29
  const renderStep = (benefit: Benefit, i: number) => {
27
30
  return (
@@ -5,8 +5,10 @@ import type { FooterContent } from './Footer/FooterContent';
5
5
  import type { GalleryContent } from './Gallery/GalleryContent';
6
6
  import type { HeaderContent } from './Header/HeaderContent';
7
7
  import type { LinkDocsContent } from './LinkDocs/LinkDocsContent';
8
+ import type { LinkListContent } from './LinkList/LinkListContent';
8
9
  import type { MobileAppTileContent } from './MobileAppTile/MobileAppTileContent';
9
10
  import type { NavigationContent } from './Navigation/NavigationContent';
11
+ import type { NavigatorTabsContent } from './NavigatorTabs/NavigatorTabsContent';
10
12
  import type { PictureTextContent } from './PictureText/PictureTextContent';
11
13
  import type { PlaceholderContent } from './Placeholder/PlaceholderContent';
12
14
  import type { ProductBlockContent } from './ProductBlock/ProductBlockContent';
@@ -17,7 +19,6 @@ import type { StepsBlockContent } from './StepsBlock/StepsBlockContent';
17
19
  import type { TariffsTableContent } from './TariffsTable/TariffsTableContent';
18
20
  import type { TextBlockContent } from './TextBlock/TextBlockContent';
19
21
  import type { TileContent } from './Tile/TileContent';
20
- import type { LinkListContent } from './LinkList/LinkListContent';
21
22
 
22
23
  /**
23
24
  * @hidden
@@ -31,6 +32,7 @@ export type BlockContent =
31
32
  | HeaderContent
32
33
  | LinkDocsContent
33
34
  | MobileAppTileContent
35
+ | NavigatorTabsContent
34
36
  | PictureTextContent
35
37
  | PlaceholderContent
36
38
  | ProductBlockContent
@@ -11,6 +11,7 @@ import { LinkDocs } from './LinkDocs/LinkDocs';
11
11
  import { MiniGallery } from './MiniGallery/MiniGallery';
12
12
  import { MobileAppTile } from './MobileAppTile/MobileAppTile';
13
13
  import { Navigation } from './Navigation/Navigation';
14
+ import { NavigatorTabs } from './NavigatorTabs/NavigatorTabs';
14
15
  import { PictureText } from './PictureText/PictureText';
15
16
  import { Placeholder } from './Placeholder/Placeholder';
16
17
  import { ProductBlock } from './ProductBlock/ProductBlock';
@@ -38,6 +39,7 @@ export const Blocks = {
38
39
  LinkDocs,
39
40
  MiniGallery,
40
41
  MobileAppTile,
42
+ NavigatorTabs,
41
43
  PictureText,
42
44
  ProductBlock,
43
45
  ProductGallery,
@@ -1,9 +1,9 @@
1
1
  import { JSX } from '@redneckz/uni-jsx';
2
+ import type { UniBlockProps } from '../../types';
2
3
  import { Heading } from '../../ui-kit/Heading/Heading';
3
- import { FIRST_CELL_CLASSES } from './constants';
4
4
  import { ComparisonTableBody } from './ComparisonTableBody';
5
- import type { UniBlockProps } from '../../types';
6
5
  import type { ComparisonTableContent } from './ComparisonTableContent';
6
+ import { FIRST_CELL_CLASSES } from './constants';
7
7
 
8
8
  export interface ComparisonTableProps extends ComparisonTableContent, UniBlockProps {}
9
9
 
@@ -16,6 +16,7 @@ export const ComparisonTable = JSX<ComparisonTableProps>(
16
16
  columns,
17
17
  visibleRowLength = 0,
18
18
  isColoredFirstColumn = false,
19
+ anchor = null,
19
20
  }) => {
20
21
  const [isShowAllRow, setIsShowAllRow] = context.useState(!visibleRowLength);
21
22
  const showToggle = () => setIsShowAllRow(!isShowAllRow);
@@ -25,6 +26,7 @@ export const ComparisonTable = JSX<ComparisonTableProps>(
25
26
  className={`bg-white font-sans py-[50px] pl-[50px] overflow-hidden text-primary-text relative ${
26
27
  className || ''
27
28
  }`}
29
+ id={anchor}
28
30
  >
29
31
  <Heading
30
32
  headingType="h2"
@@ -57,6 +57,34 @@
57
57
  ]
58
58
  }
59
59
  },
60
+ {
61
+ "type": "NavigatorTabs",
62
+ "style": ["col-span-12"],
63
+ "content": {
64
+ "navigatorTabs": [
65
+ {
66
+ "label": "Калькулятор",
67
+ "anchor": "calculator"
68
+ },
69
+ {
70
+ "label": "Преимущества",
71
+ "anchor": "advantages"
72
+ },
73
+ {
74
+ "label": "Как оформить",
75
+ "anchor": "howToApply"
76
+ },
77
+ {
78
+ "label": "Тарифы",
79
+ "anchor": "tariffs"
80
+ },
81
+ {
82
+ "label": "Документы",
83
+ "anchor": "documents"
84
+ }
85
+ ]
86
+ }
87
+ },
60
88
  {
61
89
  "type": "ProductGallery",
62
90
  "style": ["col-span-12"],
@@ -1400,6 +1428,7 @@
1400
1428
  {
1401
1429
  "type": "LinkDocs",
1402
1430
  "style": ["col-span-12"],
1431
+ "anchor": "documents",
1403
1432
  "content": {
1404
1433
  "title": "Дополнительные документы",
1405
1434
  "subtitle": "Ответы на часто задаваемые вопросы",
@@ -1880,6 +1909,7 @@
1880
1909
  },
1881
1910
  {
1882
1911
  "type": "CreditCalculator",
1912
+ "anchor": "calculator",
1883
1913
  "style": ["col-span-12"]
1884
1914
  },
1885
1915
  {
@@ -94,16 +94,16 @@ function renderBlock(
94
94
  const BlockComponent = blocksRegistry[type || 'Placeholder'] || Placeholder;
95
95
  return blockDecorator(
96
96
  {
97
- blockClassName: style2className(block.style),
97
+ blockClassName: `scroll-mt-12 ${style2className(block.style)}`,
98
98
  block,
99
99
  render: (props) => {
100
- const { version, content } = props.block;
100
+ const { version, content, anchor } = props.block;
101
101
  return (
102
102
  <BlockComponent
103
- key={`${type}-${i}`}
104
103
  className={props.blockClassName}
105
104
  version={version}
106
105
  context={context}
106
+ anchor={anchor}
107
107
  {...content}
108
108
  />
109
109
  );
@@ -3,7 +3,8 @@ export interface Router {
3
3
  query: Record<string, string | string[] | undefined>;
4
4
  href?: string;
5
5
  basePath?: string;
6
- push: (url: string) => void;
6
+ push: (url?: string) => void;
7
+ replace: (url?: string) => void;
7
8
  }
8
9
 
9
10
  export interface LikeService {
@@ -10,11 +10,11 @@ import { DEFAULT_TABS } from './defaultTabs';
10
10
  export interface CreditCalculatorProps extends CreditCalculatorContent, UniBlockProps {}
11
11
 
12
12
  export const CreditCalculator = JSX<CreditCalculatorProps>(
13
- ({ className = '', context, tabs = DEFAULT_TABS }) => {
13
+ ({ className = '', context, tabs = DEFAULT_TABS, anchor = null }) => {
14
14
  const [currentTabIndex, setCurrentTabIndex] = context.useState(0);
15
15
 
16
16
  return (
17
- <section className={`font-sans text-primary-text py-10 bg-white ${className}`}>
17
+ <section className={`font-sans text-primary-text py-10 bg-white ${className}`} id={anchor}>
18
18
  <Heading
19
19
  className="w-full text-center mb-8"
20
20
  headingType={getTileHeadingType(className)}