@redneckz/wildless-cms-uni-blocks 0.3.35 → 0.3.38

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 (352) hide show
  1. package/bundle/blocks.schema.json +1 -1
  2. package/bundle/bundle.umd.js +151 -85
  3. package/bundle/bundle.umd.min.js +1 -1
  4. package/dist/components/BlockContent.d.ts +2 -1
  5. package/dist/components/Blocks.d.ts +1 -0
  6. package/dist/components/Blocks.js +3 -1
  7. package/dist/components/Blocks.js.map +1 -1
  8. package/dist/components/ComparisonTable/HeaderCell.js +1 -1
  9. package/dist/components/ComparisonTable/HeaderCell.js.map +1 -1
  10. package/dist/components/ComparisonTable/TableCell.js +1 -1
  11. package/dist/components/ContentPage/ContentPage.js +13 -3
  12. package/dist/components/ContentPage/ContentPage.js.map +1 -1
  13. package/dist/components/CreditCalculator/renderButton.js +8 -1
  14. package/dist/components/CreditCalculator/renderButton.js.map +1 -1
  15. package/dist/components/Gallery/GalleryCardInner.js +5 -6
  16. package/dist/components/Gallery/GalleryCardInner.js.map +1 -1
  17. package/dist/components/Gallery/GalleryContainer.js +2 -2
  18. package/dist/components/Gallery/GalleryContainer.js.map +1 -1
  19. package/dist/components/Gallery/GalleryInner.js +1 -1
  20. package/dist/components/GracePeriod/GracePeriod.d.ts +5 -0
  21. package/dist/components/GracePeriod/GracePeriod.js +21 -0
  22. package/dist/components/GracePeriod/GracePeriod.js.map +1 -0
  23. package/dist/components/GracePeriod/GracePeriodContent.d.ts +25 -0
  24. package/dist/components/GracePeriod/GracePeriodContent.js +2 -0
  25. package/dist/components/GracePeriod/GracePeriodContent.js.map +1 -0
  26. package/dist/components/Header/Header.js +1 -1
  27. package/dist/components/Header/Header.js.map +1 -1
  28. package/dist/components/Header/HeaderSubMenu.js +8 -1
  29. package/dist/components/Header/HeaderSubMenu.js.map +1 -1
  30. package/dist/components/Header/HeaderSubMenuObserver.js +5 -4
  31. package/dist/components/Header/HeaderSubMenuObserver.js.map +1 -1
  32. package/dist/components/LinkDocs/LinkDocsList.d.ts +1 -1
  33. package/dist/components/LinkDocs/LinkDocsList.js +1 -1
  34. package/dist/components/LinkDocs/LinkDocsList.js.map +1 -1
  35. package/dist/components/LinkDocs/LinkDocsListItem.js +1 -1
  36. package/dist/components/LinkDocs/LinkDocsListItem.js.map +1 -1
  37. package/dist/components/MobileAppTile/MobileAppTile.js +1 -2
  38. package/dist/components/MobileAppTile/MobileAppTile.js.map +1 -1
  39. package/dist/components/NavigatorTabs/NavigatorTabItem.js +4 -4
  40. package/dist/components/NavigatorTabs/NavigatorTabItem.js.map +1 -1
  41. package/dist/components/NavigatorTabs/NavigatorTabs.d.ts +1 -1
  42. package/dist/components/NavigatorTabs/NavigatorTabs.js +11 -6
  43. package/dist/components/NavigatorTabs/NavigatorTabs.js.map +1 -1
  44. package/dist/components/NavigatorTabs/NavigatorTabsContent.d.ts +3 -1
  45. package/dist/components/ProductBlock/renderBackwardButton.js +1 -1
  46. package/dist/components/ProductBlock/renderBackwardButton.js.map +1 -1
  47. package/dist/components/Recommendation/RecommendationCard.js +2 -1
  48. package/dist/components/Recommendation/RecommendationCard.js.map +1 -1
  49. package/dist/components/Recommendation/RecommendationContent.d.ts +4 -0
  50. package/dist/components/StepsBlock/StepsBlock.js +6 -5
  51. package/dist/components/StepsBlock/StepsBlock.js.map +1 -1
  52. package/dist/components/StepsBlock/StepsBlockContent.d.ts +3 -0
  53. package/dist/components/TariffsTable/TariffsTableCell.js +2 -1
  54. package/dist/components/TariffsTable/TariffsTableCell.js.map +1 -1
  55. package/dist/components/TariffsTable/TariffsTableTileCell.js +2 -1
  56. package/dist/components/TariffsTable/TariffsTableTileCell.js.map +1 -1
  57. package/dist/components/TariffsTable/utils/getButtonAriaLabel.d.ts +2 -0
  58. package/dist/components/TariffsTable/utils/getButtonAriaLabel.js +6 -0
  59. package/dist/components/TariffsTable/utils/getButtonAriaLabel.js.map +1 -0
  60. package/dist/components/Tile/Tile.js +1 -1
  61. package/dist/components/Tile/Tile.js.map +1 -1
  62. package/dist/hooks/useLink.d.ts +1 -1
  63. package/dist/hooks/useLink.js +1 -1
  64. package/dist/hooks/useLink.js.map +1 -1
  65. package/dist/ui-kit/Button/Button.js +6 -1
  66. package/dist/ui-kit/Button/Button.js.map +1 -1
  67. package/dist/ui-kit/Button/ButtonInner.js +1 -1
  68. package/dist/ui-kit/Button/ButtonInner.js.map +1 -1
  69. package/dist/ui-kit/Heading/Heading.d.ts +2 -1
  70. package/dist/ui-kit/Heading/Heading.js +3 -3
  71. package/dist/ui-kit/Heading/Heading.js.map +1 -1
  72. package/dist/ui-kit/Heading/Heading.mobile.d.ts +2 -1
  73. package/dist/ui-kit/Heading/Heading.mobile.js +2 -2
  74. package/dist/ui-kit/Heading/Heading.mobile.js.map +1 -1
  75. package/dist/utils/changeHashOnScroll.d.ts +2 -0
  76. package/dist/utils/changeHashOnScroll.js +16 -0
  77. package/dist/utils/changeHashOnScroll.js.map +1 -0
  78. package/dist/utils/tableFunc.d.ts +2 -0
  79. package/dist/utils/tableFunc.js +8 -0
  80. package/dist/utils/tableFunc.js.map +1 -0
  81. package/lib/common.css +1 -1
  82. package/lib/components/BlockContent.d.ts +2 -1
  83. package/lib/components/Blocks.d.ts +1 -0
  84. package/lib/components/Blocks.js +3 -1
  85. package/lib/components/Blocks.js.map +1 -1
  86. package/lib/components/ComparisonTable/HeaderCell.js +1 -1
  87. package/lib/components/ComparisonTable/HeaderCell.js.map +1 -1
  88. package/lib/components/ComparisonTable/TableCell.js +1 -1
  89. package/lib/components/ContentPage/ContentPage.js +13 -3
  90. package/lib/components/ContentPage/ContentPage.js.map +1 -1
  91. package/lib/components/CreditCalculator/renderButton.js +8 -1
  92. package/lib/components/CreditCalculator/renderButton.js.map +1 -1
  93. package/lib/components/Gallery/GalleryCardInner.js +5 -6
  94. package/lib/components/Gallery/GalleryCardInner.js.map +1 -1
  95. package/lib/components/Gallery/GalleryContainer.js +2 -2
  96. package/lib/components/Gallery/GalleryContainer.js.map +1 -1
  97. package/lib/components/Gallery/GalleryInner.js +1 -1
  98. package/lib/components/GracePeriod/GracePeriod.d.ts +5 -0
  99. package/lib/components/GracePeriod/GracePeriod.fixture.d.ts +6 -0
  100. package/lib/components/GracePeriod/GracePeriod.js +19 -0
  101. package/lib/components/GracePeriod/GracePeriod.js.map +1 -0
  102. package/lib/components/GracePeriod/GracePeriodContent.d.ts +25 -0
  103. package/lib/components/GracePeriod/GracePeriodContent.js +2 -0
  104. package/lib/components/GracePeriod/GracePeriodContent.js.map +1 -0
  105. package/lib/components/Header/Header.js +1 -1
  106. package/lib/components/Header/Header.js.map +1 -1
  107. package/lib/components/Header/HeaderSubMenu.js +8 -1
  108. package/lib/components/Header/HeaderSubMenu.js.map +1 -1
  109. package/lib/components/Header/HeaderSubMenuObserver.js +5 -4
  110. package/lib/components/Header/HeaderSubMenuObserver.js.map +1 -1
  111. package/lib/components/LinkDocs/LinkDocsList.d.ts +1 -1
  112. package/lib/components/LinkDocs/LinkDocsList.js +1 -1
  113. package/lib/components/LinkDocs/LinkDocsList.js.map +1 -1
  114. package/lib/components/LinkDocs/LinkDocsListItem.js +1 -1
  115. package/lib/components/LinkDocs/LinkDocsListItem.js.map +1 -1
  116. package/lib/components/MobileAppTile/MobileAppTile.js +1 -2
  117. package/lib/components/MobileAppTile/MobileAppTile.js.map +1 -1
  118. package/lib/components/NavigatorTabs/NavigatorTabItem.js +4 -4
  119. package/lib/components/NavigatorTabs/NavigatorTabItem.js.map +1 -1
  120. package/lib/components/NavigatorTabs/NavigatorTabs.d.ts +1 -1
  121. package/lib/components/NavigatorTabs/NavigatorTabs.js +12 -7
  122. package/lib/components/NavigatorTabs/NavigatorTabs.js.map +1 -1
  123. package/lib/components/NavigatorTabs/NavigatorTabsContent.d.ts +3 -1
  124. package/lib/components/ProductBlock/renderBackwardButton.js +1 -1
  125. package/lib/components/ProductBlock/renderBackwardButton.js.map +1 -1
  126. package/lib/components/Recommendation/RecommendationCard.js +2 -1
  127. package/lib/components/Recommendation/RecommendationCard.js.map +1 -1
  128. package/lib/components/Recommendation/RecommendationContent.d.ts +4 -0
  129. package/lib/components/StepsBlock/StepsBlock.fixture.d.ts +2 -0
  130. package/lib/components/StepsBlock/StepsBlock.js +6 -5
  131. package/lib/components/StepsBlock/StepsBlock.js.map +1 -1
  132. package/lib/components/StepsBlock/StepsBlockContent.d.ts +3 -0
  133. package/lib/components/TariffsTable/TariffsTableCell.js +2 -1
  134. package/lib/components/TariffsTable/TariffsTableCell.js.map +1 -1
  135. package/lib/components/TariffsTable/TariffsTableTileCell.js +2 -1
  136. package/lib/components/TariffsTable/TariffsTableTileCell.js.map +1 -1
  137. package/lib/components/TariffsTable/utils/getButtonAriaLabel.d.ts +2 -0
  138. package/lib/components/TariffsTable/utils/getButtonAriaLabel.js +3 -0
  139. package/lib/components/TariffsTable/utils/getButtonAriaLabel.js.map +1 -0
  140. package/lib/components/Tile/Tile.js +1 -1
  141. package/lib/components/Tile/Tile.js.map +1 -1
  142. package/lib/hooks/useLink.d.ts +1 -1
  143. package/lib/hooks/useLink.js +1 -1
  144. package/lib/hooks/useLink.js.map +1 -1
  145. package/lib/ui-kit/Button/Button.js +6 -1
  146. package/lib/ui-kit/Button/Button.js.map +1 -1
  147. package/lib/ui-kit/Button/ButtonInner.js +1 -1
  148. package/lib/ui-kit/Button/ButtonInner.js.map +1 -1
  149. package/lib/ui-kit/Heading/Heading.d.ts +2 -1
  150. package/lib/ui-kit/Heading/Heading.js +3 -3
  151. package/lib/ui-kit/Heading/Heading.js.map +1 -1
  152. package/lib/ui-kit/Heading/Heading.mobile.d.ts +2 -1
  153. package/lib/ui-kit/Heading/Heading.mobile.js +2 -2
  154. package/lib/ui-kit/Heading/Heading.mobile.js.map +1 -1
  155. package/lib/utils/changeHashOnScroll.d.ts +2 -0
  156. package/lib/utils/changeHashOnScroll.js +13 -0
  157. package/lib/utils/changeHashOnScroll.js.map +1 -0
  158. package/lib/utils/tableFunc.d.ts +2 -0
  159. package/lib/utils/tableFunc.js +5 -0
  160. package/lib/utils/tableFunc.js.map +1 -0
  161. package/mobile/bundle/bundle.umd.js +33 -8
  162. package/mobile/bundle/bundle.umd.min.js +1 -1
  163. package/mobile/dist/components/BlockContent.d.ts +2 -1
  164. package/mobile/dist/components/ContentPage/ContentPage.js +13 -3
  165. package/mobile/dist/components/ContentPage/ContentPage.js.map +1 -1
  166. package/mobile/dist/components/CreditCalculator/renderButton.js +8 -1
  167. package/mobile/dist/components/CreditCalculator/renderButton.js.map +1 -1
  168. package/mobile/dist/components/Gallery/GalleryCardInner.js +5 -6
  169. package/mobile/dist/components/Gallery/GalleryCardInner.js.map +1 -1
  170. package/mobile/dist/components/Gallery/GalleryContainer.js +2 -2
  171. package/mobile/dist/components/Gallery/GalleryContainer.js.map +1 -1
  172. package/mobile/dist/components/Gallery/GalleryInner.js +1 -1
  173. package/mobile/dist/components/GracePeriod/GracePeriod.d.ts +5 -0
  174. package/mobile/dist/components/GracePeriod/GracePeriod.js +21 -0
  175. package/mobile/dist/components/GracePeriod/GracePeriod.js.map +1 -0
  176. package/mobile/dist/components/GracePeriod/GracePeriodContent.d.ts +25 -0
  177. package/mobile/dist/components/GracePeriod/GracePeriodContent.js +2 -0
  178. package/mobile/dist/components/GracePeriod/GracePeriodContent.js.map +1 -0
  179. package/mobile/dist/components/Header/HeaderSubMenu.js +8 -1
  180. package/mobile/dist/components/Header/HeaderSubMenu.js.map +1 -1
  181. package/mobile/dist/components/Header/HeaderSubMenuObserver.js +5 -4
  182. package/mobile/dist/components/Header/HeaderSubMenuObserver.js.map +1 -1
  183. package/mobile/dist/components/LinkDocs/LinkDocsList.d.ts +1 -1
  184. package/mobile/dist/components/LinkDocs/LinkDocsList.js +1 -1
  185. package/mobile/dist/components/LinkDocs/LinkDocsList.js.map +1 -1
  186. package/mobile/dist/components/NavigatorTabs/NavigatorTabItem.js +4 -4
  187. package/mobile/dist/components/NavigatorTabs/NavigatorTabItem.js.map +1 -1
  188. package/mobile/dist/components/NavigatorTabs/NavigatorTabs.d.ts +1 -1
  189. package/mobile/dist/components/NavigatorTabs/NavigatorTabs.js +11 -6
  190. package/mobile/dist/components/NavigatorTabs/NavigatorTabs.js.map +1 -1
  191. package/mobile/dist/components/NavigatorTabs/NavigatorTabsContent.d.ts +3 -1
  192. package/mobile/dist/components/ProductBlock/renderBackwardButton.js +1 -1
  193. package/mobile/dist/components/ProductBlock/renderBackwardButton.js.map +1 -1
  194. package/mobile/dist/components/Recommendation/RecommendationCard.js +2 -1
  195. package/mobile/dist/components/Recommendation/RecommendationCard.js.map +1 -1
  196. package/mobile/dist/components/Recommendation/RecommendationContent.d.ts +4 -0
  197. package/mobile/dist/components/StepsBlock/StepsBlockContent.d.ts +3 -0
  198. package/mobile/dist/components/TariffsTable/TariffsTableCell.js +2 -1
  199. package/mobile/dist/components/TariffsTable/TariffsTableCell.js.map +1 -1
  200. package/mobile/dist/components/TariffsTable/TariffsTableTileCell.js +2 -1
  201. package/mobile/dist/components/TariffsTable/TariffsTableTileCell.js.map +1 -1
  202. package/mobile/dist/components/TariffsTable/utils/getButtonAriaLabel.d.ts +2 -0
  203. package/mobile/dist/components/TariffsTable/utils/getButtonAriaLabel.js +6 -0
  204. package/mobile/dist/components/TariffsTable/utils/getButtonAriaLabel.js.map +1 -0
  205. package/mobile/dist/components/Tile/Tile.js +1 -1
  206. package/mobile/dist/components/Tile/Tile.js.map +1 -1
  207. package/mobile/dist/hooks/useLink.d.ts +1 -1
  208. package/mobile/dist/hooks/useLink.js +1 -1
  209. package/mobile/dist/hooks/useLink.js.map +1 -1
  210. package/mobile/dist/ui-kit/Button/ButtonInner.js +1 -1
  211. package/mobile/dist/ui-kit/Button/ButtonInner.js.map +1 -1
  212. package/mobile/dist/ui-kit/Heading/Heading.d.ts +2 -1
  213. package/mobile/dist/ui-kit/Heading/Heading.js +2 -2
  214. package/mobile/dist/ui-kit/Heading/Heading.js.map +1 -1
  215. package/mobile/dist/utils/changeHashOnScroll.d.ts +2 -0
  216. package/mobile/dist/utils/changeHashOnScroll.js +16 -0
  217. package/mobile/dist/utils/changeHashOnScroll.js.map +1 -0
  218. package/mobile/dist/utils/tableFunc.d.ts +2 -0
  219. package/mobile/dist/utils/tableFunc.js +8 -0
  220. package/mobile/dist/utils/tableFunc.js.map +1 -0
  221. package/mobile/lib/components/BlockContent.d.ts +2 -1
  222. package/mobile/lib/components/ContentPage/ContentPage.js +13 -3
  223. package/mobile/lib/components/ContentPage/ContentPage.js.map +1 -1
  224. package/mobile/lib/components/CreditCalculator/renderButton.js +8 -1
  225. package/mobile/lib/components/CreditCalculator/renderButton.js.map +1 -1
  226. package/mobile/lib/components/Gallery/GalleryCardInner.js +5 -6
  227. package/mobile/lib/components/Gallery/GalleryCardInner.js.map +1 -1
  228. package/mobile/lib/components/Gallery/GalleryContainer.js +2 -2
  229. package/mobile/lib/components/Gallery/GalleryContainer.js.map +1 -1
  230. package/mobile/lib/components/Gallery/GalleryInner.js +1 -1
  231. package/mobile/lib/components/GracePeriod/GracePeriod.d.ts +5 -0
  232. package/mobile/lib/components/GracePeriod/GracePeriod.js +19 -0
  233. package/mobile/lib/components/GracePeriod/GracePeriod.js.map +1 -0
  234. package/mobile/lib/components/GracePeriod/GracePeriodContent.d.ts +25 -0
  235. package/mobile/lib/components/GracePeriod/GracePeriodContent.js +2 -0
  236. package/mobile/lib/components/GracePeriod/GracePeriodContent.js.map +1 -0
  237. package/mobile/lib/components/Header/HeaderSubMenu.js +8 -1
  238. package/mobile/lib/components/Header/HeaderSubMenu.js.map +1 -1
  239. package/mobile/lib/components/Header/HeaderSubMenuObserver.js +5 -4
  240. package/mobile/lib/components/Header/HeaderSubMenuObserver.js.map +1 -1
  241. package/mobile/lib/components/LinkDocs/LinkDocsList.d.ts +1 -1
  242. package/mobile/lib/components/LinkDocs/LinkDocsList.js +1 -1
  243. package/mobile/lib/components/LinkDocs/LinkDocsList.js.map +1 -1
  244. package/mobile/lib/components/NavigatorTabs/NavigatorTabItem.js +4 -4
  245. package/mobile/lib/components/NavigatorTabs/NavigatorTabItem.js.map +1 -1
  246. package/mobile/lib/components/NavigatorTabs/NavigatorTabs.d.ts +1 -1
  247. package/mobile/lib/components/NavigatorTabs/NavigatorTabs.js +12 -7
  248. package/mobile/lib/components/NavigatorTabs/NavigatorTabs.js.map +1 -1
  249. package/mobile/lib/components/NavigatorTabs/NavigatorTabsContent.d.ts +3 -1
  250. package/mobile/lib/components/ProductBlock/renderBackwardButton.js +1 -1
  251. package/mobile/lib/components/ProductBlock/renderBackwardButton.js.map +1 -1
  252. package/mobile/lib/components/Recommendation/RecommendationCard.js +2 -1
  253. package/mobile/lib/components/Recommendation/RecommendationCard.js.map +1 -1
  254. package/mobile/lib/components/Recommendation/RecommendationContent.d.ts +4 -0
  255. package/mobile/lib/components/StepsBlock/StepsBlockContent.d.ts +3 -0
  256. package/mobile/lib/components/TariffsTable/TariffsTableCell.js +2 -1
  257. package/mobile/lib/components/TariffsTable/TariffsTableCell.js.map +1 -1
  258. package/mobile/lib/components/TariffsTable/TariffsTableTileCell.js +2 -1
  259. package/mobile/lib/components/TariffsTable/TariffsTableTileCell.js.map +1 -1
  260. package/mobile/lib/components/TariffsTable/utils/getButtonAriaLabel.d.ts +2 -0
  261. package/mobile/lib/components/TariffsTable/utils/getButtonAriaLabel.js +3 -0
  262. package/mobile/lib/components/TariffsTable/utils/getButtonAriaLabel.js.map +1 -0
  263. package/mobile/lib/components/Tile/Tile.js +1 -1
  264. package/mobile/lib/components/Tile/Tile.js.map +1 -1
  265. package/mobile/lib/hooks/useLink.d.ts +1 -1
  266. package/mobile/lib/hooks/useLink.js +1 -1
  267. package/mobile/lib/hooks/useLink.js.map +1 -1
  268. package/mobile/lib/ui-kit/Button/ButtonInner.js +1 -1
  269. package/mobile/lib/ui-kit/Button/ButtonInner.js.map +1 -1
  270. package/mobile/lib/ui-kit/Heading/Heading.d.ts +2 -1
  271. package/mobile/lib/ui-kit/Heading/Heading.js +2 -2
  272. package/mobile/lib/ui-kit/Heading/Heading.js.map +1 -1
  273. package/mobile/lib/utils/changeHashOnScroll.d.ts +2 -0
  274. package/mobile/lib/utils/changeHashOnScroll.js +13 -0
  275. package/mobile/lib/utils/changeHashOnScroll.js.map +1 -0
  276. package/mobile/lib/utils/tableFunc.d.ts +2 -0
  277. package/mobile/lib/utils/tableFunc.js +5 -0
  278. package/mobile/lib/utils/tableFunc.js.map +1 -0
  279. package/mobile/src/components/BlockContent.ts +2 -0
  280. package/mobile/src/components/ContentPage/ContentPage.page.json +188 -234
  281. package/mobile/src/components/ContentPage/ContentPage.tsx +18 -2
  282. package/mobile/src/components/CreditCalculator/renderButton.tsx +11 -1
  283. package/mobile/src/components/Footer/FooterContent.ts +0 -1
  284. package/mobile/src/components/Gallery/GalleryCardInner.tsx +6 -7
  285. package/mobile/src/components/Gallery/GalleryContainer.tsx +2 -2
  286. package/mobile/src/components/Gallery/GalleryInner.tsx +1 -1
  287. package/mobile/src/components/GracePeriod/GracePeriod.example.json +90 -0
  288. package/mobile/src/components/GracePeriod/GracePeriod.tsx +70 -0
  289. package/mobile/src/components/GracePeriod/GracePeriodContent.ts +27 -0
  290. package/mobile/src/components/Header/HeaderSubMenu.tsx +17 -2
  291. package/mobile/src/components/Header/HeaderSubMenuObserver.ts +6 -4
  292. package/mobile/src/components/LinkDocs/LinkDocsList.tsx +3 -3
  293. package/mobile/src/components/NavigatorTabs/NavigatorTabItem.tsx +7 -5
  294. package/mobile/src/components/NavigatorTabs/NavigatorTabs.example.json +3 -3
  295. package/mobile/src/components/NavigatorTabs/NavigatorTabs.tsx +17 -9
  296. package/mobile/src/components/NavigatorTabs/NavigatorTabsContent.ts +3 -1
  297. package/mobile/src/components/ProductBlock/renderBackwardButton.tsx +1 -0
  298. package/mobile/src/components/Recommendation/RecommendationCard.tsx +2 -1
  299. package/mobile/src/components/Recommendation/RecommendationContent.ts +4 -0
  300. package/mobile/src/components/StepsBlock/StepsBlockContent.ts +3 -0
  301. package/mobile/src/components/TariffsTable/TariffsTableCell.tsx +2 -0
  302. package/mobile/src/components/TariffsTable/TariffsTableTileCell.tsx +2 -0
  303. package/mobile/src/components/TariffsTable/utils/getButtonAriaLabel.ts +5 -0
  304. package/mobile/src/components/Tile/Tile.tsx +1 -0
  305. package/mobile/src/hooks/useLink.ts +1 -1
  306. package/mobile/src/ui-kit/Button/ButtonInner.tsx +1 -1
  307. package/mobile/src/ui-kit/Heading/Heading.tsx +5 -2
  308. package/mobile/src/utils/changeHashOnScroll.ts +15 -0
  309. package/mobile/src/utils/tableFunc.ts +8 -0
  310. package/package.json +1 -1
  311. package/src/components/BlockContent.ts +2 -0
  312. package/src/components/Blocks.ts +3 -1
  313. package/src/components/ComparisonTable/HeaderCell.tsx +1 -1
  314. package/src/components/ComparisonTable/TableCell.tsx +1 -1
  315. package/src/components/ContentPage/ContentPage.page.json +188 -234
  316. package/src/components/ContentPage/ContentPage.tsx +18 -2
  317. package/src/components/CreditCalculator/renderButton.tsx +11 -1
  318. package/src/components/Footer/FooterContent.ts +0 -1
  319. package/src/components/Gallery/GalleryCardInner.tsx +6 -7
  320. package/src/components/Gallery/GalleryContainer.tsx +2 -2
  321. package/src/components/Gallery/GalleryInner.tsx +1 -1
  322. package/src/components/GracePeriod/GracePeriod.example.json +90 -0
  323. package/src/components/GracePeriod/GracePeriod.fixture.tsx +109 -0
  324. package/src/components/GracePeriod/GracePeriod.tsx +70 -0
  325. package/src/components/GracePeriod/GracePeriodContent.ts +27 -0
  326. package/src/components/Header/Header.tsx +1 -1
  327. package/src/components/Header/HeaderSubMenu.tsx +17 -2
  328. package/src/components/Header/HeaderSubMenuObserver.ts +6 -4
  329. package/src/components/LinkDocs/LinkDocsList.tsx +3 -3
  330. package/src/components/LinkDocs/LinkDocsListItem.tsx +3 -3
  331. package/src/components/MobileAppTile/MobileAppTile.tsx +4 -5
  332. package/src/components/NavigatorTabs/NavigatorTabItem.tsx +7 -5
  333. package/src/components/NavigatorTabs/NavigatorTabs.example.json +3 -3
  334. package/src/components/NavigatorTabs/NavigatorTabs.tsx +17 -9
  335. package/src/components/NavigatorTabs/NavigatorTabsContent.ts +3 -1
  336. package/src/components/ProductBlock/renderBackwardButton.tsx +1 -0
  337. package/src/components/Recommendation/RecommendationCard.tsx +2 -1
  338. package/src/components/Recommendation/RecommendationContent.ts +4 -0
  339. package/src/components/StepsBlock/StepsBlock.fixture.tsx +59 -0
  340. package/src/components/StepsBlock/StepsBlock.tsx +34 -11
  341. package/src/components/StepsBlock/StepsBlockContent.ts +3 -0
  342. package/src/components/TariffsTable/TariffsTableCell.tsx +2 -0
  343. package/src/components/TariffsTable/TariffsTableTileCell.tsx +2 -0
  344. package/src/components/TariffsTable/utils/getButtonAriaLabel.ts +5 -0
  345. package/src/components/Tile/Tile.tsx +1 -0
  346. package/src/hooks/useLink.ts +1 -1
  347. package/src/ui-kit/Button/Button.tsx +20 -15
  348. package/src/ui-kit/Button/ButtonInner.tsx +1 -1
  349. package/src/ui-kit/Heading/Heading.mobile.tsx +5 -2
  350. package/src/ui-kit/Heading/Heading.tsx +6 -3
  351. package/src/utils/changeHashOnScroll.ts +15 -0
  352. package/src/utils/tableFunc.ts +8 -0
@@ -1,5 +1,7 @@
1
1
  import { JSX, PropsWithChildren } from '@redneckz/uni-jsx';
2
2
  import type { BlockDef, ContentPageDef, UniBlockProps } from '../../types';
3
+ import { changeHashOnScroll } from '../../utils/changeHashOnScroll';
4
+ import { isSSR } from '../../utils/isSSR';
3
5
  import type { BlockContent } from '../BlockContent';
4
6
  import { LikeControl } from '../LikeControl/LikeControl';
5
7
  import { Placeholder } from '../Placeholder/Placeholder';
@@ -36,22 +38,34 @@ export interface RenderBlockFunc {
36
38
  context: ContentPageContext;
37
39
  }
38
40
 
41
+ const isClient = !isSSR();
42
+
39
43
  const defaultBlockDecorator: BlockDecorator = ({ blockClassName, block, render }) =>
40
44
  render({ blockClassName, block });
41
45
 
42
46
  export const ContentPage = JSX<ContentPageProps>(
43
47
  ({
44
- className,
48
+ className = '',
45
49
  context,
46
50
  blocksRegistry,
47
51
  data: { style: pageStyle, blocks, slots = {}, likeControl, colorPalette = 'pc' },
48
52
  blockDecorator = defaultBlockDecorator,
49
53
  }) => {
50
54
  const { header } = slots;
55
+ const router = context.useRouter();
56
+
57
+ // listener is for NavigatorTabs
58
+ isClient &&
59
+ globalThis.addEventListener('load', () => {
60
+ const sectionsWithAnchors = globalThis.document.querySelectorAll('section[id]');
61
+ globalThis.document.addEventListener('scroll', () =>
62
+ changeHashOnScroll(router, sectionsWithAnchors),
63
+ );
64
+ });
51
65
 
52
66
  return (
53
67
  <section
54
- className={`relative ${style2className(pageStyle)} ${className || ''}`}
68
+ className={`relative ${style2className(pageStyle)} ${className}`}
55
69
  data-theme={colorPalette}
56
70
  >
57
71
  {header?.blocks?.length ? (
@@ -73,6 +87,7 @@ export const ContentPage = JSX<ContentPageProps>(
73
87
  {likeControl && (
74
88
  <div className="flex items-end absolute bottom-0 right-0 h-full pointer-events-none">
75
89
  <LikeControl
90
+ key="LikeControl"
76
91
  className="rounded-tl-lg sticky bottom-0 pointer-events-auto"
77
92
  context={context}
78
93
  />
@@ -100,6 +115,7 @@ function renderBlock(
100
115
  const { version, content, anchor } = props.block;
101
116
  return (
102
117
  <BlockComponent
118
+ key={`${type}-${i}`}
103
119
  className={props.blockClassName}
104
120
  version={version}
105
121
  context={context}
@@ -1,4 +1,14 @@
1
+ import { tableFunc } from '../../utils/tableFunc';
2
+
3
+ const func = tableFunc<number, string>([
4
+ [(_) => _ === 1, 'год'],
5
+ [(_) => _ <= 4, 'года'],
6
+ [() => true, 'лет'],
7
+ ]);
8
+
1
9
  export function renderButton(number: number, i: number, handleClick: (number: number) => void) {
10
+ const string = func(number);
11
+
2
12
  return (
3
13
  <button
4
14
  key={String(i)}
@@ -6,7 +16,7 @@ export function renderButton(number: number, i: number, handleClick: (number: nu
6
16
  onClick={() => handleClick(number)}
7
17
  >
8
18
  <span className="font-semibold text-sm">
9
- {number} {number === 1 ? 'год' : number > 4 ? 'лет' : 'года'}
19
+ {number} {string}
10
20
  </span>
11
21
  </button>
12
22
  );
@@ -1,4 +1,3 @@
1
- import type { IconName } from '../../icons/IconName';
2
1
  import type { LinkProps } from '../../model/LinkProps';
3
2
  import type { SitemapProps } from '../../services/sitemap/SitemapProps';
4
3
  import type { Picture } from '../../model/Picture';
@@ -7,9 +7,9 @@ import type { GalleryCard, GalleryItem } from './GalleryContent';
7
7
 
8
8
  export const GalleryCardInner = JSX<GalleryCard>(
9
9
  ({ title, description, image, items, button, version }) => {
10
- const titleStyleClasses = getTitleStyle(version, description, items);
10
+ const titleStyleClasses = getTitleStyle(version);
11
11
  return (
12
- <div className="h-full flex flex-col justify-between">
12
+ <div className="h-full flex flex-col justify-between text-center">
13
13
  <div>
14
14
  {image?.src ? (
15
15
  <div className="flex justify-center">
@@ -18,7 +18,7 @@ export const GalleryCardInner = JSX<GalleryCard>(
18
18
  ) : null}
19
19
  {title ? renderCardTitle(title, titleStyleClasses) : null}
20
20
  {description ? (
21
- <div className={`font-normal text-sm ${title ? 'mt-2' : ''}`}>{description}</div>
21
+ <div className={`font-light text-m-md-new ${title ? 'mt-2' : ''}`}>{description}</div>
22
22
  ) : null}
23
23
  {items?.length ? renderItems(items, version) : null}
24
24
  </div>
@@ -39,7 +39,7 @@ function renderButton(button) {
39
39
  }
40
40
 
41
41
  function renderCardTitle(title: string, className: string) {
42
- return <div className={`font-medium text-xl m-0 ${className}`}>{title}</div>;
42
+ return <div className={`text-xl m-0 ${className}`}>{title}</div>;
43
43
  }
44
44
 
45
45
  function renderItems(items: GalleryItem[], version: BlockVersion = 'primary') {
@@ -55,9 +55,8 @@ function renderItems(items: GalleryItem[], version: BlockVersion = 'primary') {
55
55
  );
56
56
  }
57
57
 
58
- function getTitleStyle(version, description, items) {
59
- return `font-medium text-xl m-0
58
+ function getTitleStyle(version) {
59
+ return `text-xl m-0
60
60
  ${version !== 'secondary' ? 'text-primary-text' : ''}
61
- ${!description && !items?.length ? 'text-center' : ''}
62
61
  `;
63
62
  }
@@ -25,7 +25,7 @@ export const GalleryContainer = JSX<GalleryContainerProps>(
25
25
  <div className="flex flex-col items-center mb-8">
26
26
  {title ? <Heading headingType="h2" className="text-center" title={title} /> : null}
27
27
  {description ? (
28
- <div className="font-normal text-base max-w-[600px] mt-2.5">{description}</div>
28
+ <div className="font-light text-md max-w-[600px] mt-2.5">{description}</div>
29
29
  ) : null}
30
30
  </div>
31
31
  <div
@@ -45,7 +45,7 @@ export const GalleryContainer = JSX<GalleryContainerProps>(
45
45
  function renderCard({ card, version }: GalleryCardData, i: number) {
46
46
  return (
47
47
  <section
48
- className={`box-border border-solid border rounded-md border-main-divider p-7 mx-2 flex flex-col justify-between
48
+ className={`box-border border-solid border border-main-stroke p-6 mx-2 flex flex-col justify-between
49
49
  items-stretch ${cardStyleMap[version]} ${
50
50
  cardVersionMap[card.version ?? 'primary']
51
51
  } w-full col-span-4`}
@@ -27,7 +27,7 @@ export const GalleryInner = JSX<GalleryInnerProps>(
27
27
 
28
28
  return (
29
29
  <section
30
- className={`relative font-sans text-primary-text bg-white p-[50px] overflow-hidden ${className}`}
30
+ className={`relative font-sans text-primary-text bg-white p-[42px] overflow-hidden ${className}`}
31
31
  id={anchor}
32
32
  >
33
33
  <GalleryContainer
@@ -0,0 +1,90 @@
1
+ {
2
+ "title": "Пример использования «Карты для покупок в рассрочку»:",
3
+ "description": "Описание",
4
+ "calendar": [
5
+ {
6
+ "blackText": "1 декабря — беспроцентный период",
7
+ "greenText": "начинается с первого числа каждого месяца",
8
+ "month": [
9
+ {
10
+ "name": "Август",
11
+ "image": {
12
+ "src": "calendar/august.png",
13
+ "format": "webp",
14
+ "size": {
15
+ "width": 210,
16
+ "height": "auto"
17
+ },
18
+ "alt": "Пример использования «Карты для покупок в рассрочку»"
19
+ }
20
+ }
21
+ ]
22
+ },
23
+ {
24
+ "blackText": "25 сентября и 25 октября — обязательный платеж 25 числа следующих месяцев",
25
+ "greenText": "(минимальный платеж, 3% от суммы задолженности)",
26
+ "month": [
27
+ {
28
+ "name": "Сентябрь",
29
+ "image": {
30
+ "src": "calendar/september.png",
31
+ "format": "webp",
32
+ "size": {
33
+ "width": 210,
34
+ "height": "auto"
35
+ },
36
+ "alt": "Пример использования «Карты для покупок в рассрочку»"
37
+ }
38
+ },
39
+ {
40
+ "name": "Октябрь",
41
+ "image": {
42
+ "src": "calendar/october.png",
43
+ "format": "webp",
44
+ "size": {
45
+ "width": 210,
46
+ "height": "auto"
47
+ },
48
+ "alt": "Пример использования «Карты для покупок в рассрочку»"
49
+ }
50
+ }
51
+ ]
52
+ },
53
+ {
54
+ "blackText": "25 ноября — последний день беспроцентного 3-х месячного периода",
55
+ "greenText": "",
56
+ "month": [
57
+ {
58
+ "name": "Ноябрь",
59
+ "image": {
60
+ "src": "calendar/november.png",
61
+ "format": "webp",
62
+ "size": {
63
+ "width": 210,
64
+ "height": "auto"
65
+ },
66
+ "alt": "Пример использования «Карты для покупок в рассрочку»"
67
+ }
68
+ }
69
+ ]
70
+ },
71
+ {
72
+ "blackText": "",
73
+ "greenText": "25 декабря — обязательный платеж в соответствии с тарифом",
74
+ "month": [
75
+ {
76
+ "name": "Декабрь",
77
+ "image": {
78
+ "src": "calendar/december.png",
79
+ "format": "webp",
80
+ "size": {
81
+ "width": 210,
82
+ "height": "auto"
83
+ },
84
+ "alt": "Пример использования «Карты для покупок в рассрочку»"
85
+ }
86
+ }
87
+ ]
88
+ }
89
+ ]
90
+ }
@@ -0,0 +1,70 @@
1
+ import { JSX } from '@redneckz/uni-jsx';
2
+ import type { UniBlockProps } from '../../types';
3
+ import type { GracePeriodContent } from './GracePeriodContent';
4
+
5
+ import { Heading } from '../../ui-kit/Heading/Heading';
6
+ import { Img } from '../../ui-kit/Img/Img';
7
+
8
+ export interface GracePeriodProps extends GracePeriodContent, UniBlockProps {}
9
+
10
+ export const GracePeriod = JSX<GracePeriodProps>(
11
+ ({ className = '', title, description, calendar, anchor = null }) => {
12
+ return (
13
+ <section className={`bg-white p-16 pt-12 ${className}`} id={anchor}>
14
+ <Heading headingType="h2" className="text-center" title={title} />
15
+ <div className="font-light text-base-md text-center mt-3">{description}</div>
16
+ {renderCalendar(calendar)}
17
+ </section>
18
+ );
19
+ },
20
+ );
21
+
22
+ const renderCalendar = (calendar) => {
23
+ const colCount =
24
+ calendar.reduce((accumulator, currentValue) => accumulator + currentValue.month.length, 0) || 1;
25
+ const colSize = 100 / colCount;
26
+
27
+ const mappedCalendar = calendar.map((_) => ({
28
+ ..._,
29
+ flexBasis: `${_.month.length * colSize}%`,
30
+ }));
31
+
32
+ return (
33
+ <div className="w-full flex flex-col justify-center mt-14">
34
+ <div className="flex w-full mb-3 font-light text-m-title-md mb-3 text-center">
35
+ {mappedCalendar.map((_) => renderMonthNames(_, colSize))}
36
+ </div>
37
+ <div className="flex w-full">
38
+ {mappedCalendar.map((_, ind) => (
39
+ <div
40
+ key={`monthItem-${ind}`}
41
+ className="pr-3 mr-3 border-r border-r-gray/100 last:border-r-0 last:pr-0 last:mr-0"
42
+ style={{ flexBasis: _.flexBasis }}
43
+ >
44
+ <div className="flex">{renderMonthImages(_)}</div>
45
+ <div className="font-light text-sm text-primary-text mt-3">
46
+ <span>{_.blackText}</span>&thinsp;
47
+ <span className="text-primary-main">{_.greenText}</span>
48
+ </div>
49
+ </div>
50
+ ))}
51
+ </div>
52
+ </div>
53
+ );
54
+ };
55
+
56
+ const renderMonthNames = (item, colSize) =>
57
+ item.month.map((_) => (
58
+ <div key={`monthName-${_.name}`} style={{ flexBasis: `${colSize}%` }}>
59
+ {_.name}
60
+ </div>
61
+ ));
62
+ const renderMonthImages = (item) =>
63
+ item.month.map((_) => (
64
+ <div
65
+ key={`monthImage-${_.image.src}`}
66
+ className="max-h-[207px] border-r-[1px] pr-3 mr-3 border-r-gray/100 last:border-r-0 last:pr-0 last:mr-0"
67
+ >
68
+ <Img image={_.image} className="flex" />
69
+ </div>
70
+ ));
@@ -0,0 +1,27 @@
1
+ import type { HeadingContent } from '../../ui-kit/Heading/HeadingContent';
2
+ import type { Picture } from '../../model/Picture';
3
+
4
+ interface Month {
5
+ /** @title Название месяца */
6
+ name?: string;
7
+ /** @title Изображение календарного месяца */
8
+ image?: Picture;
9
+ }
10
+
11
+ interface CalendarItem {
12
+ month?: Month[];
13
+ /** @title Основной текст */
14
+ blackText?: string;
15
+ /** @title Вспомогательный текст */
16
+ greenText?: string;
17
+ }
18
+
19
+ /**
20
+ * @title Льготный период
21
+ */
22
+ export interface GracePeriodContent extends HeadingContent {
23
+ /** @title Описание */
24
+ description?: string;
25
+ /** @title Календарь */
26
+ calendar?: CalendarItem[];
27
+ }
@@ -4,6 +4,7 @@ import type { BgColorVersion } from '../../model/BgColorVersion';
4
4
  import type { LinkProps } from '../../model/LinkProps';
5
5
  import { findActiveSubItem } from '../../services/sitemap/findActiveSubItem';
6
6
  import { HeaderItem } from '../../ui-kit/HeaderItem/HeaderItem';
7
+ import { isSSR } from '../../utils/isSSR';
7
8
  import type { ContentPageContext } from '../ContentPage/ContentPageContext';
8
9
  import { headerSubMenuObserver } from './HeaderSubMenuObserver';
9
10
 
@@ -19,6 +20,10 @@ export const HeaderSubMenu = JSX<HeaderSubMenuProps>(({ context, subItems, bgCol
19
20
  const { handlerDecorator } = context;
20
21
 
21
22
  setTimeout(() => {
23
+ if (isSSR()) {
24
+ return;
25
+ }
26
+
22
27
  const headerSubMenu = globalThis.document.querySelectorAll('[data-item-name=header-submenu]');
23
28
  headerSubMenu.forEach((_) => {
24
29
  headerSubMenuObserver?.observe(_);
@@ -70,10 +75,16 @@ const renderDotsSubMenu = ({
70
75
  <button
71
76
  className="flex justify-between items-center cursor-pointer h-6 ml-6"
72
77
  onClick={toggleSubMenu}
78
+ aria-label={`${subMenuIsShow ? 'Скрыть другие разделы' : 'Показать другие разделы'}`}
73
79
  >
74
- {Array(3).fill(<div className="w-[3px] h-[3px] rounded bg-black mr-1" />)}
80
+ {Array(3)
81
+ .fill(0)
82
+ .map((_, i) => renderDot(i))}
75
83
  </button>
76
- <div className={`flex flex-col rounded-md bg-white p-6 pb-2 ${subMenuIsShow ? '' : 'hidden'}`}>
84
+ <div
85
+ className={`flex flex-col rounded-md bg-white p-6 pb-2 ${subMenuIsShow ? '' : 'hidden'}`}
86
+ aria-hidden={!subMenuIsShow}
87
+ >
77
88
  {renderDotsSubMenuItems(subItems, router, handlerDecorator)}
78
89
  </div>
79
90
  </div>
@@ -91,3 +102,7 @@ const renderDotsSubMenuItems = (subItems, router, handlerDecorator) =>
91
102
  {_.text}
92
103
  </a>
93
104
  ));
105
+
106
+ const renderDot = (i: number) => (
107
+ <div key={String(i)} className="w-[3px] h-[3px] rounded bg-black mr-1" />
108
+ );
@@ -1,8 +1,9 @@
1
1
  import { isSSR } from '../../utils/isSSR';
2
2
 
3
- export const headerSubMenuObserver = isSSR()
4
- ? undefined
5
- : new IntersectionObserver(
3
+ const isClient = !isSSR();
4
+
5
+ export const headerSubMenuObserver = isClient
6
+ ? new IntersectionObserver(
6
7
  (entries) => {
7
8
  const headerSubMenuButtonElement = window.document.querySelector(
8
9
  '[data-header-submenu-visible=toggled]',
@@ -30,7 +31,8 @@ export const headerSubMenuObserver = isSSR()
30
31
  }
31
32
  },
32
33
  { root: window.document, threshold: 1.0 },
33
- );
34
+ )
35
+ : undefined;
34
36
 
35
37
  // TODO: add types
36
38
  const toggleVisibilityInItems = (visibilityList, items, className) => {
@@ -1,7 +1,7 @@
1
1
  import { JSX } from '@redneckz/uni-jsx';
2
- import { LinkDocsListItem } from './LinkDocsListItem';
3
- import type { LinkColumnsMode, LinkDocsItem } from './LinkDocsContent';
4
2
  import type { Picture } from '../../model/Picture';
3
+ import type { LinkColumnsMode, LinkDocsItem } from './LinkDocsContent';
4
+ import { LinkDocsListItem } from './LinkDocsListItem';
5
5
 
6
6
  export interface LinkDocsListProps {
7
7
  className?: string;
@@ -21,7 +21,7 @@ export const LinkDocsList = JSX<LinkDocsListProps>(
21
21
  role="listitem"
22
22
  >
23
23
  <LinkDocsListItem
24
- className="group flex text-sm align-middle h-fit w-fit text-primary-text no-underline hover:text-primary-main"
24
+ className="group flex align-middle h-fit w-fit text-primary-text no-underline hover:text-primary-main"
25
25
  doc={doc}
26
26
  icon={icon}
27
27
  />
@@ -8,22 +8,24 @@ export interface NavigatorTabItemProps extends NavigatorTab {
8
8
  }
9
9
 
10
10
  const TEXT_CLASSES = 'font-sans font-normal text-sm';
11
- const LINK_CLASSES = 'flex-1 flex items-center justify-center';
11
+ const LINK_CLASSES = 'flex-1 flex items-center justify-center cursor-pointer';
12
12
 
13
13
  export const NavigatorTabItem = JSX<NavigatorTabItemProps>(
14
- ({ className = '', label, active, children, onClick, anchor }) => (
15
- <a className={getLinkClasses(className, active)} href={`#${anchor}`} onClick={onClick}>
14
+ ({ className = '', label, active, children, onClick, href, target = '_self' }) => (
15
+ <a className={getLinkClasses(className, active)} target={target} href={href} onClick={onClick}>
16
16
  <span className={getTextClasses(active)}>{label || children}</span>
17
17
  </a>
18
18
  ),
19
19
  );
20
20
 
21
21
  const getLinkClasses = (className: string, active?: boolean) => {
22
- const classes = active ? 'bg-primary-main' : 'bg-white';
22
+ const classes = active ? 'bg-primary-main' : 'group bg-white';
23
+
23
24
  return `${classes} ${LINK_CLASSES} ${className}`;
24
25
  };
25
26
 
26
27
  const getTextClasses = (active?: boolean) => {
27
- const classes = active ? 'text-white' : 'text-secondary-text hover:text-primary-main';
28
+ const classes = active ? 'text-white' : 'text-secondary-text group-hover:text-primary-main ';
29
+
28
30
  return `${classes} ${TEXT_CLASSES}`;
29
31
  };
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "navigatorTabs": [
3
- { "label": "Tab1", "anchor": "tab1" },
4
- { "label": "Tab2", "anchor": "tab2" },
5
- { "label": "Tab3", "anchor": "tab3" }
3
+ { "label": "Tab1", "href": "#tab1" },
4
+ { "label": "Tab2", "href": "#tab2" },
5
+ { "label": "Link", "href": "https://rshb.ru", "target": "_blank" }
6
6
  ]
7
7
  }
@@ -1,36 +1,44 @@
1
1
  import { JSX } from '@redneckz/uni-jsx';
2
2
  import type { UniBlockProps } from '../../types';
3
- import { getHash } from '../../utils/url';
3
+ import { getHash, isURL } from '../../utils/url';
4
4
  import type { Router } from '../ContentPage/ContentPageContext';
5
5
  import { NavigatorTabItem } from './NavigatorTabItem';
6
6
  import type { NavigatorTab, NavigatorTabsContent } from './NavigatorTabsContent';
7
7
 
8
- export interface TabsBlockProps extends NavigatorTabsContent, UniBlockProps {}
8
+ export interface TabsBlockProps extends UniBlockProps, NavigatorTabsContent {}
9
9
 
10
10
  export const NavigatorTabs = JSX<TabsBlockProps>(
11
11
  ({ className = '', navigatorTabs, context, anchor = null }) => {
12
12
  const router = context.useRouter();
13
- const hash = getHash(router.href);
13
+ const href = globalThis.location.href;
14
+
14
15
  return (
15
16
  <section
16
17
  className={`sticky top-0 z-20 box-border flex gap-x-1 h-12 ${className}`}
17
18
  id={anchor}
18
19
  >
19
- {navigatorTabs ? navigatorTabs.map(renderTab(hash, router)) : null}
20
+ {navigatorTabs ? navigatorTabs.map(renderTab(href, router)) : null}
20
21
  </section>
21
22
  );
22
23
  },
23
24
  );
24
25
 
25
- const renderTab = (hash?: string, router?: Router) => (tab: NavigatorTab, i: number) => {
26
- const anchorHash = `#${tab.anchor}`;
27
- const active = hash ? anchorHash === hash : i === 0;
26
+ const renderTab = (href?: string, router?: Router) => (tab: NavigatorTab, i: number) => {
27
+ const hash = getHash(href);
28
+ const active = hash ? tab.href === hash : i === 0;
29
+
28
30
  return (
29
31
  <NavigatorTabItem
30
- key={tab.anchor}
32
+ key={tab.href}
31
33
  active={active}
32
- onClick={() => router?.replace(anchorHash)}
34
+ onClick={() => handleRoute(router, tab.href)}
33
35
  {...tab}
34
36
  />
35
37
  );
36
38
  };
39
+
40
+ const handleRoute = (router?: Router, href?: string) => {
41
+ if (isURL(href)) return; // if href if full URL - move to HTML href action, do not touch router
42
+
43
+ router?.replace(href || '');
44
+ };
@@ -5,7 +5,9 @@ export interface NavigatorTab {
5
5
  /** @title Название */
6
6
  label?: string;
7
7
  /** @title Якорь */
8
- anchor?: string;
8
+ href?: string;
9
+ /** @title Таргет (target) */
10
+ target?: string;
9
11
  }
10
12
 
11
13
  /**
@@ -18,6 +18,7 @@ export function renderBackwardButton(text: string, version: BlockVersion, classN
18
18
  <Button
19
19
  rounded
20
20
  className={`w-12 h-12 min-h-12 max-h-12 flex items-center justify-center mr-3 ${backwardBgStyleMap[version]}`}
21
+ ariaLabel={text}
21
22
  >
22
23
  <Img
23
24
  className={`w-4 h-4 min-w-4 min-h-4 rounded-full box-border ${backwardIconStyleMap[version]}`}
@@ -6,6 +6,7 @@ import { BaseTile } from '../BaseTile/BaseTile';
6
6
  import { SocialMedia } from '../Footer/SocialMedia';
7
7
  import type { UniBlockProps } from '../../types';
8
8
  import type { RecommendationCardTypes } from './RecommendationContent';
9
+ import { Heading } from '../../ui-kit/Heading/Heading';
9
10
 
10
11
  export interface RecommendationCardProps extends RecommendationCardTypes, UniBlockProps {}
11
12
 
@@ -21,7 +22,7 @@ export const RecommendationCard = JSX<RecommendationCardProps>(
21
22
  className="flex justify-between"
22
23
  title={
23
24
  title ? (
24
- <h4 className={`font-sans text-title-xs font-normal m-0 mb-3.5`}>{title}</h4>
25
+ <Heading headingType="h4" as="h3" className="font-normal mb-3.5" title={title} />
25
26
  ) : null
26
27
  }
27
28
  image={image?.src && <Img className="mt-auto ml-7" image={image} />}
@@ -17,5 +17,9 @@ export interface RecommendationContent extends HeadingContent {
17
17
  /** @title Карточки */
18
18
  recommendations?: RecommendationCardTypes[];
19
19
  version?: BlockVersion;
20
+ /**
21
+ * @title Ссылка
22
+ * @minItems 3
23
+ */
20
24
  socialMedia?: LinkProps[];
21
25
  }
@@ -1,6 +1,7 @@
1
1
  import type { SizeVersion } from '../../model/SizeVersion';
2
2
  import type { BlockVersion } from '../../model/BlockVersion';
3
3
  import type { Picture } from '../../model/Picture';
4
+ import type { ButtonProps } from '../../ui-kit/Button/ButtonProps';
4
5
 
5
6
  /**
6
7
  * @title Шаг
@@ -11,6 +12,7 @@ export interface Step {
11
12
  /** @title Описание */
12
13
  description?: string;
13
14
  icon?: Picture;
15
+ button?: ButtonProps;
14
16
  }
15
17
 
16
18
  /**
@@ -29,6 +31,7 @@ export interface StepsBlockContent {
29
31
  * @maxItems 4
30
32
  */
31
33
  steps?: Step[];
34
+ button?: ButtonProps;
32
35
  /** @title Размер шагов (моб.) */
33
36
  size?: SizeVersion; // TODO: mobile content
34
37
  version?: BlockVersion; // TODO: mobile content
@@ -4,6 +4,7 @@ import type { ButtonWithIconProps } from '../../ui-kit/Button/ButtonProps';
4
4
  import { Img } from '../../ui-kit/Img/Img';
5
5
  import { List } from '../../ui-kit/List/List';
6
6
  import type { TariffsTableCellData, TariffsTableList } from './TariffsTableContent';
7
+ import { getButtonAriaLabel } from './utils/getButtonAriaLabel';
7
8
 
8
9
  export interface TariffsTableCellProps {
9
10
  cell: TariffsTableCellData[];
@@ -53,6 +54,7 @@ const renderButtons = (buttons: ButtonWithIconProps[]) => (
53
54
  <Button
54
55
  className={`${idx > 0 && rounded ? 'ml-3' : ''} w-12 h-12`}
55
56
  key={String(idx)}
57
+ ariaLabel={getButtonAriaLabel(icon)}
56
58
  rounded={rounded}
57
59
  appendLeft={icon ? <Img image={icon} width="24px" height="24px" asSVG /> : null}
58
60
  {...buttonProps}
@@ -9,6 +9,7 @@ import type {
9
9
  TariffsTableList,
10
10
  TariffsTableTileCellProps,
11
11
  } from './TariffsTableContent';
12
+ import { getButtonAriaLabel } from './utils/getButtonAriaLabel';
12
13
 
13
14
  export const TariffsTableTileCell = JSX<TariffsTableTileCellProps>(({ header, data }) => {
14
15
  return (
@@ -52,6 +53,7 @@ const renderButtons = (buttons: ButtonWithIconProps[]) => (
52
53
  <Button
53
54
  className={`mt-3 ${idx > 0 && rounded ? 'ml-2.5' : ''} ${icon ? 'w-12 h-12' : ''}`}
54
55
  key={String(idx)}
56
+ ariaLabel={getButtonAriaLabel(icon)}
55
57
  rounded={rounded}
56
58
  appendLeft={icon ? <Img image={icon} width="24px" height="24px" asSVG /> : null}
57
59
  {...buttonProps}
@@ -0,0 +1,5 @@
1
+ import type { Picture } from '../../../model/Picture';
2
+ import { IconTitleMap } from '../../../icons/IconName';
3
+
4
+ export const getButtonAriaLabel = (icon: Picture | undefined) =>
5
+ icon?.alt || icon?.title || IconTitleMap[icon?.icon ? icon.icon : ''];
@@ -50,6 +50,7 @@ export const Tile = JSX<TileProps>((props) => {
50
50
  title && (
51
51
  <Heading
52
52
  headingType={getTileHeadingType(className)}
53
+ as="h3"
53
54
  title={title}
54
55
  className={`whitespace-pre-wrap max-w-[600px] ${title ? 'mb-3' : ''}
55
56
  ${version === 'primary' ? 'text-primary-text' : ''}`}