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

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 (287) hide show
  1. package/bundle/blocks.schema.json +1 -1
  2. package/bundle/bundle.umd.js +123 -79
  3. package/bundle/bundle.umd.min.js +1 -1
  4. package/dist/components/Blocks.js +1 -1
  5. package/dist/components/Blocks.js.map +1 -1
  6. package/dist/components/ComparisonTable/HeaderCell.js +1 -1
  7. package/dist/components/ComparisonTable/HeaderCell.js.map +1 -1
  8. package/dist/components/ComparisonTable/TableCell.js +1 -1
  9. package/dist/components/ContentPage/ContentPage.js +10 -3
  10. package/dist/components/ContentPage/ContentPage.js.map +1 -1
  11. package/dist/components/CreditCalculator/renderButton.js +8 -1
  12. package/dist/components/CreditCalculator/renderButton.js.map +1 -1
  13. package/dist/components/Gallery/GalleryCardInner.js +5 -6
  14. package/dist/components/Gallery/GalleryCardInner.js.map +1 -1
  15. package/dist/components/Gallery/GalleryContainer.js +2 -2
  16. package/dist/components/Gallery/GalleryContainer.js.map +1 -1
  17. package/dist/components/Gallery/GalleryInner.js +1 -1
  18. package/dist/components/Header/Header.js +1 -1
  19. package/dist/components/Header/Header.js.map +1 -1
  20. package/dist/components/Header/HeaderSubMenu.js +4 -1
  21. package/dist/components/Header/HeaderSubMenu.js.map +1 -1
  22. package/dist/components/LinkDocs/LinkDocsList.d.ts +1 -1
  23. package/dist/components/LinkDocs/LinkDocsList.js +1 -1
  24. package/dist/components/LinkDocs/LinkDocsList.js.map +1 -1
  25. package/dist/components/LinkDocs/LinkDocsListItem.js +1 -1
  26. package/dist/components/LinkDocs/LinkDocsListItem.js.map +1 -1
  27. package/dist/components/NavigatorTabs/NavigatorTabItem.js +4 -4
  28. package/dist/components/NavigatorTabs/NavigatorTabItem.js.map +1 -1
  29. package/dist/components/NavigatorTabs/NavigatorTabs.d.ts +1 -1
  30. package/dist/components/NavigatorTabs/NavigatorTabs.js +11 -6
  31. package/dist/components/NavigatorTabs/NavigatorTabs.js.map +1 -1
  32. package/dist/components/NavigatorTabs/NavigatorTabsContent.d.ts +3 -1
  33. package/dist/components/ProductBlock/renderBackwardButton.js +1 -1
  34. package/dist/components/ProductBlock/renderBackwardButton.js.map +1 -1
  35. package/dist/components/Recommendation/RecommendationCard.js +2 -1
  36. package/dist/components/Recommendation/RecommendationCard.js.map +1 -1
  37. package/dist/components/Recommendation/RecommendationContent.d.ts +4 -0
  38. package/dist/components/StepsBlock/StepsBlock.js +6 -5
  39. package/dist/components/StepsBlock/StepsBlock.js.map +1 -1
  40. package/dist/components/StepsBlock/StepsBlockContent.d.ts +3 -0
  41. package/dist/components/TariffsTable/TariffsTableCell.js +2 -1
  42. package/dist/components/TariffsTable/TariffsTableCell.js.map +1 -1
  43. package/dist/components/TariffsTable/TariffsTableTileCell.js +2 -1
  44. package/dist/components/TariffsTable/TariffsTableTileCell.js.map +1 -1
  45. package/dist/components/TariffsTable/utils/getButtonAriaLabel.d.ts +2 -0
  46. package/dist/components/TariffsTable/utils/getButtonAriaLabel.js +6 -0
  47. package/dist/components/TariffsTable/utils/getButtonAriaLabel.js.map +1 -0
  48. package/dist/components/Tile/Tile.js +1 -1
  49. package/dist/components/Tile/Tile.js.map +1 -1
  50. package/dist/hooks/useLink.d.ts +1 -1
  51. package/dist/hooks/useLink.js +1 -1
  52. package/dist/hooks/useLink.js.map +1 -1
  53. package/dist/ui-kit/Button/Button.js +6 -1
  54. package/dist/ui-kit/Button/Button.js.map +1 -1
  55. package/dist/ui-kit/Heading/Heading.d.ts +2 -1
  56. package/dist/ui-kit/Heading/Heading.js +3 -3
  57. package/dist/ui-kit/Heading/Heading.js.map +1 -1
  58. package/dist/ui-kit/Heading/Heading.mobile.d.ts +2 -1
  59. package/dist/ui-kit/Heading/Heading.mobile.js +2 -2
  60. package/dist/ui-kit/Heading/Heading.mobile.js.map +1 -1
  61. package/dist/utils/changeHashOnScroll.d.ts +2 -0
  62. package/dist/utils/changeHashOnScroll.js +16 -0
  63. package/dist/utils/changeHashOnScroll.js.map +1 -0
  64. package/dist/utils/tableFunc.d.ts +2 -0
  65. package/dist/utils/tableFunc.js +8 -0
  66. package/dist/utils/tableFunc.js.map +1 -0
  67. package/lib/common.css +1 -1
  68. package/lib/components/Blocks.js +1 -1
  69. package/lib/components/Blocks.js.map +1 -1
  70. package/lib/components/ComparisonTable/HeaderCell.js +1 -1
  71. package/lib/components/ComparisonTable/HeaderCell.js.map +1 -1
  72. package/lib/components/ComparisonTable/TableCell.js +1 -1
  73. package/lib/components/ContentPage/ContentPage.js +10 -3
  74. package/lib/components/ContentPage/ContentPage.js.map +1 -1
  75. package/lib/components/CreditCalculator/renderButton.js +8 -1
  76. package/lib/components/CreditCalculator/renderButton.js.map +1 -1
  77. package/lib/components/Gallery/GalleryCardInner.js +5 -6
  78. package/lib/components/Gallery/GalleryCardInner.js.map +1 -1
  79. package/lib/components/Gallery/GalleryContainer.js +2 -2
  80. package/lib/components/Gallery/GalleryContainer.js.map +1 -1
  81. package/lib/components/Gallery/GalleryInner.js +1 -1
  82. package/lib/components/Header/Header.js +1 -1
  83. package/lib/components/Header/Header.js.map +1 -1
  84. package/lib/components/Header/HeaderSubMenu.js +4 -1
  85. package/lib/components/Header/HeaderSubMenu.js.map +1 -1
  86. package/lib/components/LinkDocs/LinkDocsList.d.ts +1 -1
  87. package/lib/components/LinkDocs/LinkDocsList.js +1 -1
  88. package/lib/components/LinkDocs/LinkDocsList.js.map +1 -1
  89. package/lib/components/LinkDocs/LinkDocsListItem.js +1 -1
  90. package/lib/components/LinkDocs/LinkDocsListItem.js.map +1 -1
  91. package/lib/components/NavigatorTabs/NavigatorTabItem.js +4 -4
  92. package/lib/components/NavigatorTabs/NavigatorTabItem.js.map +1 -1
  93. package/lib/components/NavigatorTabs/NavigatorTabs.d.ts +1 -1
  94. package/lib/components/NavigatorTabs/NavigatorTabs.js +12 -7
  95. package/lib/components/NavigatorTabs/NavigatorTabs.js.map +1 -1
  96. package/lib/components/NavigatorTabs/NavigatorTabsContent.d.ts +3 -1
  97. package/lib/components/ProductBlock/renderBackwardButton.js +1 -1
  98. package/lib/components/ProductBlock/renderBackwardButton.js.map +1 -1
  99. package/lib/components/Recommendation/RecommendationCard.js +2 -1
  100. package/lib/components/Recommendation/RecommendationCard.js.map +1 -1
  101. package/lib/components/Recommendation/RecommendationContent.d.ts +4 -0
  102. package/lib/components/StepsBlock/StepsBlock.fixture.d.ts +2 -0
  103. package/lib/components/StepsBlock/StepsBlock.js +6 -5
  104. package/lib/components/StepsBlock/StepsBlock.js.map +1 -1
  105. package/lib/components/StepsBlock/StepsBlockContent.d.ts +3 -0
  106. package/lib/components/TariffsTable/TariffsTableCell.js +2 -1
  107. package/lib/components/TariffsTable/TariffsTableCell.js.map +1 -1
  108. package/lib/components/TariffsTable/TariffsTableTileCell.js +2 -1
  109. package/lib/components/TariffsTable/TariffsTableTileCell.js.map +1 -1
  110. package/lib/components/TariffsTable/utils/getButtonAriaLabel.d.ts +2 -0
  111. package/lib/components/TariffsTable/utils/getButtonAriaLabel.js +3 -0
  112. package/lib/components/TariffsTable/utils/getButtonAriaLabel.js.map +1 -0
  113. package/lib/components/Tile/Tile.js +1 -1
  114. package/lib/components/Tile/Tile.js.map +1 -1
  115. package/lib/hooks/useLink.d.ts +1 -1
  116. package/lib/hooks/useLink.js +1 -1
  117. package/lib/hooks/useLink.js.map +1 -1
  118. package/lib/ui-kit/Button/Button.js +6 -1
  119. package/lib/ui-kit/Button/Button.js.map +1 -1
  120. package/lib/ui-kit/Heading/Heading.d.ts +2 -1
  121. package/lib/ui-kit/Heading/Heading.js +3 -3
  122. package/lib/ui-kit/Heading/Heading.js.map +1 -1
  123. package/lib/ui-kit/Heading/Heading.mobile.d.ts +2 -1
  124. package/lib/ui-kit/Heading/Heading.mobile.js +2 -2
  125. package/lib/ui-kit/Heading/Heading.mobile.js.map +1 -1
  126. package/lib/utils/changeHashOnScroll.d.ts +2 -0
  127. package/lib/utils/changeHashOnScroll.js +13 -0
  128. package/lib/utils/changeHashOnScroll.js.map +1 -0
  129. package/lib/utils/tableFunc.d.ts +2 -0
  130. package/lib/utils/tableFunc.js +5 -0
  131. package/lib/utils/tableFunc.js.map +1 -0
  132. package/mobile/bundle/bundle.umd.js +28 -7
  133. package/mobile/bundle/bundle.umd.min.js +1 -1
  134. package/mobile/dist/components/ContentPage/ContentPage.js +10 -3
  135. package/mobile/dist/components/ContentPage/ContentPage.js.map +1 -1
  136. package/mobile/dist/components/CreditCalculator/renderButton.js +8 -1
  137. package/mobile/dist/components/CreditCalculator/renderButton.js.map +1 -1
  138. package/mobile/dist/components/Gallery/GalleryCardInner.js +5 -6
  139. package/mobile/dist/components/Gallery/GalleryCardInner.js.map +1 -1
  140. package/mobile/dist/components/Gallery/GalleryContainer.js +2 -2
  141. package/mobile/dist/components/Gallery/GalleryContainer.js.map +1 -1
  142. package/mobile/dist/components/Gallery/GalleryInner.js +1 -1
  143. package/mobile/dist/components/Header/HeaderSubMenu.js +4 -1
  144. package/mobile/dist/components/Header/HeaderSubMenu.js.map +1 -1
  145. package/mobile/dist/components/LinkDocs/LinkDocsList.d.ts +1 -1
  146. package/mobile/dist/components/LinkDocs/LinkDocsList.js +1 -1
  147. package/mobile/dist/components/LinkDocs/LinkDocsList.js.map +1 -1
  148. package/mobile/dist/components/NavigatorTabs/NavigatorTabItem.js +4 -4
  149. package/mobile/dist/components/NavigatorTabs/NavigatorTabItem.js.map +1 -1
  150. package/mobile/dist/components/NavigatorTabs/NavigatorTabs.d.ts +1 -1
  151. package/mobile/dist/components/NavigatorTabs/NavigatorTabs.js +11 -6
  152. package/mobile/dist/components/NavigatorTabs/NavigatorTabs.js.map +1 -1
  153. package/mobile/dist/components/NavigatorTabs/NavigatorTabsContent.d.ts +3 -1
  154. package/mobile/dist/components/ProductBlock/renderBackwardButton.js +1 -1
  155. package/mobile/dist/components/ProductBlock/renderBackwardButton.js.map +1 -1
  156. package/mobile/dist/components/Recommendation/RecommendationCard.js +2 -1
  157. package/mobile/dist/components/Recommendation/RecommendationCard.js.map +1 -1
  158. package/mobile/dist/components/Recommendation/RecommendationContent.d.ts +4 -0
  159. package/mobile/dist/components/StepsBlock/StepsBlockContent.d.ts +3 -0
  160. package/mobile/dist/components/TariffsTable/TariffsTableCell.js +2 -1
  161. package/mobile/dist/components/TariffsTable/TariffsTableCell.js.map +1 -1
  162. package/mobile/dist/components/TariffsTable/TariffsTableTileCell.js +2 -1
  163. package/mobile/dist/components/TariffsTable/TariffsTableTileCell.js.map +1 -1
  164. package/mobile/dist/components/TariffsTable/utils/getButtonAriaLabel.d.ts +2 -0
  165. package/mobile/dist/components/TariffsTable/utils/getButtonAriaLabel.js +6 -0
  166. package/mobile/dist/components/TariffsTable/utils/getButtonAriaLabel.js.map +1 -0
  167. package/mobile/dist/components/Tile/Tile.js +1 -1
  168. package/mobile/dist/components/Tile/Tile.js.map +1 -1
  169. package/mobile/dist/hooks/useLink.d.ts +1 -1
  170. package/mobile/dist/hooks/useLink.js +1 -1
  171. package/mobile/dist/hooks/useLink.js.map +1 -1
  172. package/mobile/dist/ui-kit/Heading/Heading.d.ts +2 -1
  173. package/mobile/dist/ui-kit/Heading/Heading.js +2 -2
  174. package/mobile/dist/ui-kit/Heading/Heading.js.map +1 -1
  175. package/mobile/dist/utils/changeHashOnScroll.d.ts +2 -0
  176. package/mobile/dist/utils/changeHashOnScroll.js +16 -0
  177. package/mobile/dist/utils/changeHashOnScroll.js.map +1 -0
  178. package/mobile/dist/utils/tableFunc.d.ts +2 -0
  179. package/mobile/dist/utils/tableFunc.js +8 -0
  180. package/mobile/dist/utils/tableFunc.js.map +1 -0
  181. package/mobile/lib/components/ContentPage/ContentPage.js +10 -3
  182. package/mobile/lib/components/ContentPage/ContentPage.js.map +1 -1
  183. package/mobile/lib/components/CreditCalculator/renderButton.js +8 -1
  184. package/mobile/lib/components/CreditCalculator/renderButton.js.map +1 -1
  185. package/mobile/lib/components/Gallery/GalleryCardInner.js +5 -6
  186. package/mobile/lib/components/Gallery/GalleryCardInner.js.map +1 -1
  187. package/mobile/lib/components/Gallery/GalleryContainer.js +2 -2
  188. package/mobile/lib/components/Gallery/GalleryContainer.js.map +1 -1
  189. package/mobile/lib/components/Gallery/GalleryInner.js +1 -1
  190. package/mobile/lib/components/Header/HeaderSubMenu.js +4 -1
  191. package/mobile/lib/components/Header/HeaderSubMenu.js.map +1 -1
  192. package/mobile/lib/components/LinkDocs/LinkDocsList.d.ts +1 -1
  193. package/mobile/lib/components/LinkDocs/LinkDocsList.js +1 -1
  194. package/mobile/lib/components/LinkDocs/LinkDocsList.js.map +1 -1
  195. package/mobile/lib/components/NavigatorTabs/NavigatorTabItem.js +4 -4
  196. package/mobile/lib/components/NavigatorTabs/NavigatorTabItem.js.map +1 -1
  197. package/mobile/lib/components/NavigatorTabs/NavigatorTabs.d.ts +1 -1
  198. package/mobile/lib/components/NavigatorTabs/NavigatorTabs.js +12 -7
  199. package/mobile/lib/components/NavigatorTabs/NavigatorTabs.js.map +1 -1
  200. package/mobile/lib/components/NavigatorTabs/NavigatorTabsContent.d.ts +3 -1
  201. package/mobile/lib/components/ProductBlock/renderBackwardButton.js +1 -1
  202. package/mobile/lib/components/ProductBlock/renderBackwardButton.js.map +1 -1
  203. package/mobile/lib/components/Recommendation/RecommendationCard.js +2 -1
  204. package/mobile/lib/components/Recommendation/RecommendationCard.js.map +1 -1
  205. package/mobile/lib/components/Recommendation/RecommendationContent.d.ts +4 -0
  206. package/mobile/lib/components/StepsBlock/StepsBlockContent.d.ts +3 -0
  207. package/mobile/lib/components/TariffsTable/TariffsTableCell.js +2 -1
  208. package/mobile/lib/components/TariffsTable/TariffsTableCell.js.map +1 -1
  209. package/mobile/lib/components/TariffsTable/TariffsTableTileCell.js +2 -1
  210. package/mobile/lib/components/TariffsTable/TariffsTableTileCell.js.map +1 -1
  211. package/mobile/lib/components/TariffsTable/utils/getButtonAriaLabel.d.ts +2 -0
  212. package/mobile/lib/components/TariffsTable/utils/getButtonAriaLabel.js +3 -0
  213. package/mobile/lib/components/TariffsTable/utils/getButtonAriaLabel.js.map +1 -0
  214. package/mobile/lib/components/Tile/Tile.js +1 -1
  215. package/mobile/lib/components/Tile/Tile.js.map +1 -1
  216. package/mobile/lib/hooks/useLink.d.ts +1 -1
  217. package/mobile/lib/hooks/useLink.js +1 -1
  218. package/mobile/lib/hooks/useLink.js.map +1 -1
  219. package/mobile/lib/ui-kit/Heading/Heading.d.ts +2 -1
  220. package/mobile/lib/ui-kit/Heading/Heading.js +2 -2
  221. package/mobile/lib/ui-kit/Heading/Heading.js.map +1 -1
  222. package/mobile/lib/utils/changeHashOnScroll.d.ts +2 -0
  223. package/mobile/lib/utils/changeHashOnScroll.js +13 -0
  224. package/mobile/lib/utils/changeHashOnScroll.js.map +1 -0
  225. package/mobile/lib/utils/tableFunc.d.ts +2 -0
  226. package/mobile/lib/utils/tableFunc.js +5 -0
  227. package/mobile/lib/utils/tableFunc.js.map +1 -0
  228. package/mobile/src/components/ContentPage/ContentPage.page.json +94 -234
  229. package/mobile/src/components/ContentPage/ContentPage.tsx +14 -2
  230. package/mobile/src/components/CreditCalculator/renderButton.tsx +11 -1
  231. package/mobile/src/components/Footer/FooterContent.ts +0 -1
  232. package/mobile/src/components/Gallery/GalleryCardInner.tsx +6 -7
  233. package/mobile/src/components/Gallery/GalleryContainer.tsx +2 -2
  234. package/mobile/src/components/Gallery/GalleryInner.tsx +1 -1
  235. package/mobile/src/components/Header/HeaderSubMenu.tsx +12 -2
  236. package/mobile/src/components/LinkDocs/LinkDocsList.tsx +3 -3
  237. package/mobile/src/components/NavigatorTabs/NavigatorTabItem.tsx +7 -5
  238. package/mobile/src/components/NavigatorTabs/NavigatorTabs.example.json +3 -3
  239. package/mobile/src/components/NavigatorTabs/NavigatorTabs.tsx +17 -9
  240. package/mobile/src/components/NavigatorTabs/NavigatorTabsContent.ts +3 -1
  241. package/mobile/src/components/ProductBlock/renderBackwardButton.tsx +1 -0
  242. package/mobile/src/components/Recommendation/RecommendationCard.tsx +2 -1
  243. package/mobile/src/components/Recommendation/RecommendationContent.ts +4 -0
  244. package/mobile/src/components/StepsBlock/StepsBlockContent.ts +3 -0
  245. package/mobile/src/components/TariffsTable/TariffsTableCell.tsx +2 -0
  246. package/mobile/src/components/TariffsTable/TariffsTableTileCell.tsx +2 -0
  247. package/mobile/src/components/TariffsTable/utils/getButtonAriaLabel.ts +5 -0
  248. package/mobile/src/components/Tile/Tile.tsx +1 -0
  249. package/mobile/src/hooks/useLink.ts +1 -1
  250. package/mobile/src/ui-kit/Heading/Heading.tsx +5 -2
  251. package/mobile/src/utils/changeHashOnScroll.ts +15 -0
  252. package/mobile/src/utils/tableFunc.ts +8 -0
  253. package/package.json +1 -1
  254. package/src/components/Blocks.ts +1 -1
  255. package/src/components/ComparisonTable/HeaderCell.tsx +1 -1
  256. package/src/components/ComparisonTable/TableCell.tsx +1 -1
  257. package/src/components/ContentPage/ContentPage.page.json +94 -234
  258. package/src/components/ContentPage/ContentPage.tsx +14 -2
  259. package/src/components/CreditCalculator/renderButton.tsx +11 -1
  260. package/src/components/Footer/FooterContent.ts +0 -1
  261. package/src/components/Gallery/GalleryCardInner.tsx +6 -7
  262. package/src/components/Gallery/GalleryContainer.tsx +2 -2
  263. package/src/components/Gallery/GalleryInner.tsx +1 -1
  264. package/src/components/Header/Header.tsx +1 -1
  265. package/src/components/Header/HeaderSubMenu.tsx +12 -2
  266. package/src/components/LinkDocs/LinkDocsList.tsx +3 -3
  267. package/src/components/LinkDocs/LinkDocsListItem.tsx +3 -3
  268. package/src/components/NavigatorTabs/NavigatorTabItem.tsx +7 -5
  269. package/src/components/NavigatorTabs/NavigatorTabs.example.json +3 -3
  270. package/src/components/NavigatorTabs/NavigatorTabs.tsx +17 -9
  271. package/src/components/NavigatorTabs/NavigatorTabsContent.ts +3 -1
  272. package/src/components/ProductBlock/renderBackwardButton.tsx +1 -0
  273. package/src/components/Recommendation/RecommendationCard.tsx +2 -1
  274. package/src/components/Recommendation/RecommendationContent.ts +4 -0
  275. package/src/components/StepsBlock/StepsBlock.fixture.tsx +59 -0
  276. package/src/components/StepsBlock/StepsBlock.tsx +34 -11
  277. package/src/components/StepsBlock/StepsBlockContent.ts +3 -0
  278. package/src/components/TariffsTable/TariffsTableCell.tsx +2 -0
  279. package/src/components/TariffsTable/TariffsTableTileCell.tsx +2 -0
  280. package/src/components/TariffsTable/utils/getButtonAriaLabel.ts +5 -0
  281. package/src/components/Tile/Tile.tsx +1 -0
  282. package/src/hooks/useLink.ts +1 -1
  283. package/src/ui-kit/Button/Button.tsx +20 -15
  284. package/src/ui-kit/Heading/Heading.mobile.tsx +5 -2
  285. package/src/ui-kit/Heading/Heading.tsx +6 -3
  286. package/src/utils/changeHashOnScroll.ts +15 -0
  287. package/src/utils/tableFunc.ts +8 -0
@@ -188,18 +188,18 @@
188
188
 
189
189
  const HEADING_STYLE_MAP = {
190
190
  h1: 'text-title-xl tracking-[-0.3px]',
191
- h2: 'text-title-lg',
191
+ h2: 'text-title',
192
192
  h3: 'text-title-sm',
193
193
  h4: 'text-title-xs',
194
194
  h5: 'text-title-2xs tracking-[0.2px]',
195
195
  h6: 'text-title-2xs tracking-[0.2px]',
196
196
  };
197
197
  const Heading = JSX((props) => {
198
- const { className = '', headingType, title } = props;
198
+ const { className = '', headingType, title, as } = props;
199
199
  if (!headingType) {
200
200
  return;
201
201
  }
202
- const Tag = headingType;
202
+ const Tag = as || headingType;
203
203
  return (jsx(Tag, { className: `font-sans m-0 ${HEADING_STYLE_MAP[headingType]} ${className}`, children: title }));
204
204
  });
205
205
 
@@ -485,10 +485,10 @@
485
485
  return index !== -1 ? href.substring(index + 1) : '';
486
486
  };
487
487
 
488
- const LinkDocsListItem = JSX(({ className = '', doc, icon }) => (jsx(LinkDocsListItemBase, { className: `flex h-full box-border ${className}`, iconClassName: "mr-2.5 min-w-6 min-h-6 text-primary-text", textClassName: "self-center", suffixClassName: "text-secondary-text group-hover:text-primary-main", doc: doc, icon: icon })));
488
+ const LinkDocsListItem = JSX(({ className = '', doc, icon }) => (jsx(LinkDocsListItemBase, { className: `flex h-full box-border ${className}`, iconClassName: "mr-3.5 min-w-6 min-h-6 text-primary-text", textClassName: "self-center font-light", suffixClassName: "text-secondary-text group-hover:text-primary-main", doc: doc, icon: icon })));
489
489
 
490
490
  const LinkDocsList = JSX(({ className, documents, columnsMode = 'double', icon }) => {
491
- return documents?.length ? (jsx("div", { className: className, role: "list", children: documents.map((doc, i) => (jsx("div", { className: columnsMode === 'double' ? 'basis-[calc(50%-20px)]' : '', role: "listitem", children: jsx(LinkDocsListItem, { className: "group flex text-sm align-middle h-fit w-fit text-primary-text no-underline hover:text-primary-main", doc: doc, icon: icon }) }, String(i)))) })) : null;
491
+ return documents?.length ? (jsx("div", { className: className, role: "list", children: documents.map((doc, i) => (jsx("div", { className: columnsMode === 'double' ? 'basis-[calc(50%-20px)]' : '', role: "listitem", children: jsx(LinkDocsListItem, { className: "group flex align-middle h-fit w-fit text-primary-text no-underline hover:text-primary-main", doc: doc, icon: icon }) }, String(i)))) })) : null;
492
492
  });
493
493
 
494
494
  const titleAlignStyleMap = {
@@ -572,7 +572,7 @@
572
572
  return {
573
573
  ...link,
574
574
  href,
575
- ariaLabel: link.text,
575
+ 'aria-label': link.text,
576
576
  onClick: handlerDecorator((ev) => {
577
577
  const isLocalHref = href && !isURL(href);
578
578
  const isLocalTarget = !link.target || link.target === '_self';
@@ -631,7 +631,12 @@
631
631
  const buttonInner = children ?? (jsx(ButtonInner, { text: text, aboveText: aboveText, appendLeft: appendLeft, rounded: rounded }));
632
632
  return disabled ? (jsx(DisabledButton, { ...props, children: buttonInner })) : (jsx(RegularButton, { ...props, children: buttonInner }));
633
633
  });
634
- const RegularButton = JSX(({ className, ariaLabel, version = 'none', rounded, href, target, children, onClick, ...rest }) => (jsx("a", { className: `${buttonStyle} inline-block cursor-pointer no-underline ${buttonStyleMap[version] || ''} ${rounded ? 'rounded-full' : 'rounded-md'} ${className || ''}`, href: href, target: target, onClick: onClick, "aria-label": ariaLabel, role: href ? 'link' : 'button', ...rest, children: children })));
634
+ const RegularButton = JSX(({ className, ariaLabel, version = 'none', rounded, href, target, children, onClick, ...rest }) => {
635
+ // Pick Button props to prevent forwarding into HTML <a> tag leading to errors being printed in console.
636
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
637
+ const { aboveText, appendLeft, ...linkProps } = rest;
638
+ return (jsx("a", { className: `${buttonStyle} inline-block cursor-pointer no-underline ${buttonStyleMap[version] || ''} ${rounded ? 'rounded-full' : 'rounded-md'} ${className || ''}`, href: href, target: target, onClick: onClick, "aria-label": ariaLabel, role: href ? 'link' : 'button', ...linkProps, children: children }));
639
+ });
635
640
  const DisabledButton = JSX(({ className, children, ariaLabel, version = 'none', rounded }) => (jsx("div", { role: "button", "aria-disabled": "true", "aria-label": ariaLabel, tabIndex: "-1", className: `inline-block ${buttonStyle} ${buttonDisabledStyleMap[version] || ''} ${rounded ? 'rounded-full' : 'rounded-md'} ${className || ''}`, children: children })));
636
641
 
637
642
  const ButtonSection = JSX(({ context, className = '', buttons }) => {
@@ -732,7 +737,7 @@
732
737
  secondary: 'text-primary-text',
733
738
  };
734
739
  function renderBackwardButton(text, version, className) {
735
- return (jsxs("div", { className: `flex items-center ${className}`, children: [jsx(Button, { rounded: true, className: `w-12 h-12 min-h-12 max-h-12 flex items-center justify-center mr-3 ${backwardBgStyleMap[version]}`, children: jsx(Img, { className: `w-4 h-4 min-w-4 min-h-4 rounded-full box-border ${backwardIconStyleMap[version]}`, image: { icon: 'ArrowLeftIcon' }, color: "none", width: "24", height: "24", asSVG: true }) }), text ? jsx("span", { className: "text-m-md", children: text }) : null] }));
740
+ return (jsxs("div", { className: `flex items-center ${className}`, children: [jsx(Button, { rounded: true, className: `w-12 h-12 min-h-12 max-h-12 flex items-center justify-center mr-3 ${backwardBgStyleMap[version]}`, ariaLabel: text, children: jsx(Img, { className: `w-4 h-4 min-w-4 min-h-4 rounded-full box-border ${backwardIconStyleMap[version]}`, image: { icon: 'ArrowLeftIcon' }, color: "none", width: "24", height: "24", asSVG: true }) }), text ? jsx("span", { className: "text-m-md", children: text }) : null] }));
736
741
  }
737
742
 
738
743
  const productBlockStyleMap$1 = {
@@ -832,7 +837,7 @@
832
837
  };
833
838
  const Tile = JSX((props) => {
834
839
  const { context, title, description, items, children, buttons, image, className = '', version = 'primary', role, anchor = null, } = props;
835
- return (jsx("section", { className: `overflow-hidden font-sans p-9 pr-3 box-border ${className} ${tileStyleMap[version]} ${getTileRightPadding(className)} ${getTileMinHeight(className)} `, role: role, id: anchor, children: jsxs(BaseTile, { context: context, title: title && (jsx(Heading, { headingType: getTileHeadingType(className), title: title, className: `whitespace-pre-wrap max-w-[600px] ${title ? 'mb-3' : ''}
840
+ return (jsx("section", { className: `overflow-hidden font-sans p-9 pr-3 box-border ${className} ${tileStyleMap[version]} ${getTileRightPadding(className)} ${getTileMinHeight(className)} `, role: role, id: anchor, children: jsxs(BaseTile, { context: context, title: title && (jsx(Heading, { headingType: getTileHeadingType(className), as: "h3", title: title, className: `whitespace-pre-wrap max-w-[600px] ${title ? 'mb-3' : ''}
836
841
  ${version === 'primary' ? 'text-primary-text' : ''}` })), buttons: buttons?.length ? (jsx(ButtonSection, { context: context, buttons: buttons, className: "flex mt-9 gap-3" })) : null, image: image?.src && jsx(Img, { className: "mt-auto ml-7", image: image }), children: [description && (jsx(Description, { className: "mt-4 max-w-[600px] text-title-new-sm font-light", description: description })), children, renderList$1(items, version)] }) }));
837
842
  });
838
843
  function renderList$1(items, version) {
@@ -895,30 +900,29 @@
895
900
  };
896
901
 
897
902
  const GalleryCardInner = JSX(({ title, description, image, items, button, version }) => {
898
- const titleStyleClasses = getTitleStyle(version, description, items);
899
- return (jsxs("div", { className: "h-full flex flex-col justify-between", children: [jsxs("div", { children: [image?.src ? (jsx("div", { className: "flex justify-center", children: jsx(Img, { className: "mb-6", image: image }) })) : null, title ? renderCardTitle(title, titleStyleClasses) : null, description ? (jsx("div", { className: `font-normal text-sm ${title ? 'mt-2' : ''}`, children: description })) : null, items?.length ? renderItems(items, version) : null] }), button?.text ? renderButton$1(button) : null] }));
903
+ const titleStyleClasses = getTitleStyle(version);
904
+ return (jsxs("div", { className: "h-full flex flex-col justify-between text-center", children: [jsxs("div", { children: [image?.src ? (jsx("div", { className: "flex justify-center", children: jsx(Img, { className: "mb-6", image: image }) })) : null, title ? renderCardTitle(title, titleStyleClasses) : null, description ? (jsx("div", { className: `font-light text-m-md-new ${title ? 'mt-2' : ''}`, children: description })) : null, items?.length ? renderItems(items, version) : null] }), button?.text ? renderButton$1(button) : null] }));
900
905
  });
901
906
  function renderButton$1(button) {
902
907
  return (jsx(Button, { className: "mt-6 w-full", appendLeft: button.icon && jsx(Img, { image: button.icon, width: "24px", height: "24px", asSVG: true }), ...button }));
903
908
  }
904
909
  function renderCardTitle(title, className) {
905
- return jsx("div", { className: `font-medium text-xl m-0 ${className}`, children: title });
910
+ return jsx("div", { className: `text-xl m-0 ${className}`, children: title });
906
911
  }
907
912
  function renderItems(items, version = 'primary') {
908
913
  return (jsx(List, { className: `max-w-[308px] mt-2 text-sm ${version === 'primary' ? '!text-secondary-text' : ''}`, itemClassName: "mt-1 first:mt-0", items: items.filter((item) => item?.text).map((item) => item.text), version: version }));
909
914
  }
910
- function getTitleStyle(version, description, items) {
911
- return `font-medium text-xl m-0
915
+ function getTitleStyle(version) {
916
+ return `text-xl m-0
912
917
  ${version !== 'secondary' ? 'text-primary-text' : ''}
913
- ${!description && !items?.length ? 'text-center' : ''}
914
918
  `;
915
919
  }
916
920
 
917
921
  const GalleryContainer = JSX(({ context, title, description, cards = [], version = 'normal', activeCardIndex }) => {
918
- return (jsxs("div", { children: [jsx("div", { className: "absolute top-0 left-0 bottom-0 w-[84px] bg-gradient-to-r from-white to-transparent" }), jsxs("div", { className: "flex flex-col items-center mb-8", children: [title ? jsx(Heading, { headingType: "h2", className: "text-center", title: title }) : null, description ? (jsx("div", { className: "font-normal text-base max-w-[600px] mt-2.5", children: description })) : null] }), jsx("div", { className: `flex ${cards?.length <= galleryLengthForScrollMap[version] ? 'justify-center' : ''} duration-1000`, style: { transform: `translateX(-${activeCardIndex * cardWidthMap[version]}px)` }, role: "list", children: cards?.map((card, i) => renderCard({ card, version, context }, i)) })] }));
922
+ return (jsxs("div", { children: [jsx("div", { className: "absolute top-0 left-0 bottom-0 w-[84px] bg-gradient-to-r from-white to-transparent" }), jsxs("div", { className: "flex flex-col items-center mb-8", children: [title ? jsx(Heading, { headingType: "h2", className: "text-center", title: title }) : null, description ? (jsx("div", { className: "font-light text-md max-w-[600px] mt-2.5", children: description })) : null] }), jsx("div", { className: `flex ${cards?.length <= galleryLengthForScrollMap[version] ? 'justify-center' : ''} duration-1000`, style: { transform: `translateX(-${activeCardIndex * cardWidthMap[version]}px)` }, role: "list", children: cards?.map((card, i) => renderCard({ card, version, context }, i)) })] }));
919
923
  });
920
924
  function renderCard({ card, version }, i) {
921
- return (jsx("section", { className: `box-border border-solid border rounded-md border-main-divider p-7 mx-2 flex flex-col justify-between
925
+ return (jsx("section", { className: `box-border border-solid border border-main-stroke p-6 mx-2 flex flex-col justify-between
922
926
  items-stretch ${cardStyleMap[version]} ${cardVersionMap[card.version ?? 'primary']} w-full col-span-4`, role: "listitem", children: jsx(GalleryCardInner, { ...card }) }, String(i)));
923
927
  }
924
928
 
@@ -930,7 +934,7 @@
930
934
  const showNextButton = isGalleryScrollAvailable &&
931
935
  cards?.length - activeCardIndex > galleryLengthForScrollMap[version];
932
936
  const showPrevButton = isGalleryScrollAvailable && activeCardIndex > 0;
933
- return (jsxs("section", { className: `relative font-sans text-primary-text bg-white p-[50px] overflow-hidden ${className}`, id: anchor, children: [jsx(GalleryContainer, { context: context, cards: cards, version: version, activeCardIndex: activeCardIndex, ...rest }), showPrevButton && (jsx(ArrowButton, { className: "absolute top-1/2 left-8 rotate-180 z-10 mt-[25px]", onClick: handlePrevClick, ariaLabel: "\u041F\u0440\u043E\u043B\u0438\u0441\u0442\u0430\u0442\u044C \u0432\u043B\u0435\u0432\u043E", "data-block-control": "scroll-left" })), showNextButton && (jsx(ArrowButton, { className: "absolute top-1/2 right-8 z-10 mt-[25px]", onClick: handleNextClick, ariaLabel: "\u041F\u0440\u043E\u043B\u0438\u0441\u0442\u0430\u0442\u044C \u0432\u043F\u0440\u0430\u0432\u043E", "data-block-control": "scroll-right" })), jsx("div", { className: "absolute top-0 left-0 bottom-0 w-[84px] bg-opacity-from-white" }), jsx("div", { className: "absolute top-0 right-0 bottom-0 w-[100px] bg-opacity-to-white" })] }));
937
+ return (jsxs("section", { className: `relative font-sans text-primary-text bg-white p-[42px] overflow-hidden ${className}`, id: anchor, children: [jsx(GalleryContainer, { context: context, cards: cards, version: version, activeCardIndex: activeCardIndex, ...rest }), showPrevButton && (jsx(ArrowButton, { className: "absolute top-1/2 left-8 rotate-180 z-10 mt-[25px]", onClick: handlePrevClick, ariaLabel: "\u041F\u0440\u043E\u043B\u0438\u0441\u0442\u0430\u0442\u044C \u0432\u043B\u0435\u0432\u043E", "data-block-control": "scroll-left" })), showNextButton && (jsx(ArrowButton, { className: "absolute top-1/2 right-8 z-10 mt-[25px]", onClick: handleNextClick, ariaLabel: "\u041F\u0440\u043E\u043B\u0438\u0441\u0442\u0430\u0442\u044C \u0432\u043F\u0440\u0430\u0432\u043E", "data-block-control": "scroll-right" })), jsx("div", { className: "absolute top-0 left-0 bottom-0 w-[84px] bg-opacity-from-white" }), jsx("div", { className: "absolute top-0 right-0 bottom-0 w-[100px] bg-opacity-to-white" })] }));
934
938
  });
935
939
 
936
940
  const Gallery = JSX((props) => jsx(GalleryInner, { ...props, version: "normal" }));
@@ -1031,7 +1035,7 @@
1031
1035
  };
1032
1036
  const TableCarouselContainer = JSX(({ children, activeCardIndex, columnWidth, version = 'comparison' }) => (jsx("div", { className: "flex flex-1 overflow-hidden", children: jsx("div", { className: carouselContainerClassesMap[version], style: { transform: `translateX(-${activeCardIndex * columnWidth}px)` }, children: children }) })));
1033
1037
 
1034
- const HeaderCell = JSX(({ icon, image, title, link }) => (jsxs("div", { className: `w-80 box-border flex flex-col items-center rounded-t-md border-b-0 px-7 pt-7 pb-[46px] ${BORDER_CLASSES$1} ${GRADIENT}`, role: "columnheader", scope: "col", children: [icon && !image?.src && (jsx(Img, { className: "h-[63px] w-[63px] min-w-[63px] min-h-[63px] mb-4", image: icon, width: "63", height: "63" })), image?.src && jsx(Img, { className: "mb-[18px]", image: image }), title && jsx(Heading, { headingType: "h4", className: "text-center text-white", title: title }), link?.text && (jsx("div", { className: "mt-auto w-full", children: jsx(Button, { href: link.href, target: link.target, className: "mt-4 w-full text-primary-main bg-white hover:bg-secondary-hover active:bg-secondary-active", children: jsx("div", { className: "font-medium text-xs py-[11px]", children: link.text }) }) }))] })));
1038
+ const HeaderCell = JSX(({ icon, image, title, link }) => (jsxs("div", { className: `w-80 box-border flex flex-col items-center rounded-t-md border-b-0 px-7 pt-7 pb-[46px] ${BORDER_CLASSES$1} ${GRADIENT}`, role: "columnheader", scope: "col", children: [icon && !image?.src && (jsx(Img, { className: "h-[63px] w-[63px] min-w-[63px] min-h-[63px] mb-4", image: icon, width: "63", height: "63" })), image?.src && jsx(Img, { className: "mb-[18px]", image: image }), title && jsx(Heading, { headingType: "h4", as: "h3", className: "text-center text-white", title: title }), link?.text && (jsx("div", { className: "mt-auto w-full", children: jsx(Button, { href: link.href, target: link.target, className: "mt-4 w-full text-primary-main bg-white hover:bg-secondary-hover active:bg-secondary-active", children: jsx("div", { className: "font-medium text-xs py-[11px]", children: link.text }) }) }))] })));
1035
1039
 
1036
1040
  const ComparisonTableColumnHeaders = JSX(({ colHeaders, activeCardIndex, router, handlerDecorator }) => {
1037
1041
  return (jsxs(TableRowContainer, { children: [jsx("div", { className: FIRST_CELL_CLASSES$1, role: "columnheader", scope: "col" }), jsx(TableCarouselContainer, { activeCardIndex: activeCardIndex, columnWidth: COLUMN_WIDTH$1, children: colHeaders.map((header, i) => (jsx(HeaderCell, { ...header, link: header.link && useLink({ router, handlerDecorator }, header.link) }, String(i)))) })] }));
@@ -1042,7 +1046,7 @@
1042
1046
  const cellClasses = `mx-7 h-full ${DIVIDER_CLASSES$1} ${isFillGradient && isFirstRow ? 'border-t' : ''} ${!isLastRow ? 'border-solid' : 'border-b-0'}`;
1043
1047
  return (jsx("div", { className: cellWrapperClasses, role: "cell", children: jsx("div", { className: cellClasses, children: cell.map((item, i) => renderCellInner$1(item, i, isFillGradient)) }) }));
1044
1048
  });
1045
- const renderCellInner$1 = ({ label, description }, i, isFillGradient) => (jsxs("div", { className: "first:pt-7 pt-6 last:pb-7", children: [label && (jsx("h5", { className: `text-xl font-medium m-0 ${isFillGradient ? 'text-white' : ''}`, children: label })), description && (jsx("div", { className: `text-sm opacity-80 ${isFillGradient ? 'text-white' : 'text-secondary-text'}`, children: description }))] }, String(i)));
1049
+ const renderCellInner$1 = ({ label, description }, i, isFillGradient) => (jsxs("div", { className: "first:pt-7 pt-6 last:pb-7", children: [label && (jsx("h4", { className: `text-xl font-medium m-0 ${isFillGradient ? 'text-white' : ''}`, children: label })), description && (jsx("div", { className: `text-sm opacity-80 ${isFillGradient ? 'text-white' : 'text-secondary-text'}`, children: description }))] }, String(i)));
1046
1050
 
1047
1051
  const TableRow = JSX(({ row: { header, data }, activeCardIndex, isColoredFirstColumn, isFirstRow, isLastRow }) => (jsxs(TableRowContainer, { children: [header?.title ? (jsx("div", { className: `text-sm py-7 ${DIVIDER_CLASSES$1} ${FIRST_CELL_CLASSES$1} ${!isLastRow ? 'border-solid' : 'border-b-0'}`, children: header.title })) : null, data?.length ? (jsx(TableCarouselContainer, { activeCardIndex: activeCardIndex, columnWidth: COLUMN_WIDTH$1, children: data.map((cell, i) => (jsx(TableCell, { cell: cell, isFirstRow: isFirstRow, isLastRow: isLastRow, isFillGradient: isColoredFirstColumn && i === 0 }, String(i)))) })) : null] })));
1048
1052
 
@@ -1192,8 +1196,19 @@
1192
1196
  }
1193
1197
  };
1194
1198
 
1199
+ const tableFunc = (table) => (input) => {
1200
+ const [, output] = table.find(([predicate]) => predicate(input)) || [];
1201
+ return output;
1202
+ };
1203
+
1204
+ const func = tableFunc([
1205
+ [(_) => _ === 1, 'год'],
1206
+ [(_) => _ <= 4, 'года'],
1207
+ [() => true, 'лет'],
1208
+ ]);
1195
1209
  function renderButton(number, i, handleClick) {
1196
- return (jsx("button", { className: "bg-secondary-light rounded-3xl h-10 w-[75px] box-border mr-2 flex items-center justify-center cursor-pointer border-none", onClick: () => handleClick(number), children: jsxs("span", { className: "font-semibold text-sm", children: [number, " ", number === 1 ? 'год' : number > 4 ? 'лет' : 'года'] }) }, String(i)));
1210
+ const string = func(number);
1211
+ return (jsx("button", { className: "bg-secondary-light rounded-3xl h-10 w-[75px] box-border mr-2 flex items-center justify-center cursor-pointer border-none", onClick: () => handleClick(number), children: jsxs("span", { className: "font-semibold text-sm", children: [number, " ", string] }) }, String(i)));
1197
1212
  }
1198
1213
 
1199
1214
  const addSpacesBetweenNumbers = (number) => new Intl.NumberFormat('ru-RU', { maximumSignificantDigits: 3 }).format(number);
@@ -1667,9 +1682,12 @@
1667
1682
  })] }));
1668
1683
  });
1669
1684
  // TODO: add types
1670
- const renderDotsSubMenu = ({ subMenuIsShow, toggleSubMenu, subItems, router, handlerDecorator, }) => (jsxs("div", { className: `absolute w-52 -top-4 right-0 pt-4 z-40 ${subMenuIsShow ? 'bg-white rounded-md shadow-blue-gray/24' : ''}`, "data-header-submenu-visible": "toggled", children: [jsx("button", { className: "flex justify-between items-center cursor-pointer h-6 ml-6", onClick: toggleSubMenu, children: Array(3).fill(jsx("div", { className: "w-[3px] h-[3px] rounded bg-black mr-1" })) }), jsx("div", { className: `flex flex-col rounded-md bg-white p-6 pb-2 ${subMenuIsShow ? '' : 'hidden'}`, children: renderDotsSubMenuItems(subItems, router, handlerDecorator) })] }));
1685
+ const renderDotsSubMenu = ({ subMenuIsShow, toggleSubMenu, subItems, router, handlerDecorator, }) => (jsxs("div", { className: `absolute w-52 -top-4 right-0 pt-4 z-40 ${subMenuIsShow ? 'bg-white rounded-md shadow-blue-gray/24' : ''}`, "data-header-submenu-visible": "toggled", children: [jsx("button", { className: "flex justify-between items-center cursor-pointer h-6 ml-6", onClick: toggleSubMenu, "aria-label": `${subMenuIsShow ? 'Скрыть другие разделы' : 'Показать другие разделы'}`, children: Array(3)
1686
+ .fill(0)
1687
+ .map((_, i) => renderDot(i)) }), jsx("div", { className: `flex flex-col rounded-md bg-white p-6 pb-2 ${subMenuIsShow ? '' : 'hidden'}`, "aria-hidden": !subMenuIsShow, children: renderDotsSubMenuItems(subItems, router, handlerDecorator) })] }));
1671
1688
  // TODO: add types
1672
1689
  const renderDotsSubMenuItems = (subItems, router, handlerDecorator) => subItems?.map((_) => (jsx("a", { ...useLink({ router, handlerDecorator }, _), "data-item-name": "dots-header-submenu", className: "text-base font-light pb-4 hover:text-primary-main", children: _.text }, _.href)));
1690
+ const renderDot = (i) => (jsx("div", { className: "w-[3px] h-[3px] rounded bg-black mr-1" }, String(i)));
1673
1691
 
1674
1692
  const BORDER_COLORS = {
1675
1693
  'bg-white': 'bg-main-divider',
@@ -1681,7 +1699,7 @@
1681
1699
  const { handlerDecorator } = context;
1682
1700
  const mergedItems = mergeTopItems(sitemap.topItems, topItems);
1683
1701
  const activeTopItem = mergedItems.find(isTopItemActive(router));
1684
- const topMenu = mergedItems.map((_, i) => (jsx(TopItem, { active: _ === activeTopItem, ...useLink({ router, handlerDecorator }, _), ariaLabel: _.text, bgColor: bgColor }, String(i))));
1702
+ const topMenu = mergedItems.map((_, i) => (jsx(TopItem, { active: _ === activeTopItem, ...useLink({ router, handlerDecorator }, _), "aria-label": _.text, bgColor: bgColor }, String(i))));
1685
1703
  return (jsx("header", { className: `pt-6 pb-8 px-20 ${bgColor} ${className}`, id: anchor, children: jsxs("div", { className: "container", children: [jsxs("div", { className: "flex items-center", children: [jsx(Logo, { className: "mr-8", bgColor: bgColor }), topMenu, jsx(HeaderSecondaryMenu, { context: context, className: "ml-auto", defaultLocation: defaultLocation, bgColor: bgColor })] }), jsx("div", { className: `mt-6 h-[1px] ${BORDER_COLORS[bgColor]}` }), jsx(HeaderSubMenu, { context: context, subItems: activeTopItem?.items, bgColor: bgColor })] }) }));
1686
1704
  });
1687
1705
 
@@ -1701,28 +1719,69 @@
1701
1719
  });
1702
1720
 
1703
1721
  const TEXT_CLASSES = 'font-sans font-normal text-sm';
1704
- const LINK_CLASSES = 'flex-1 flex items-center justify-center';
1705
- const NavigatorTabItem = JSX(({ className = '', label, active, children, onClick, anchor }) => (jsx("a", { className: getLinkClasses(className, active), href: `#${anchor}`, onClick: onClick, children: jsx("span", { className: getTextClasses(active), children: label || children }) })));
1722
+ const LINK_CLASSES = 'flex-1 flex items-center justify-center cursor-pointer';
1723
+ const NavigatorTabItem = JSX(({ className = '', label, active, children, onClick, href, target = '_self' }) => (jsx("a", { className: getLinkClasses(className, active), target: target, href: href, onClick: onClick, children: jsx("span", { className: getTextClasses(active), children: label || children }) })));
1706
1724
  const getLinkClasses = (className, active) => {
1707
- const classes = active ? 'bg-primary-main' : 'bg-white';
1725
+ const classes = active ? 'bg-primary-main' : 'group bg-white';
1708
1726
  return `${classes} ${LINK_CLASSES} ${className}`;
1709
1727
  };
1710
1728
  const getTextClasses = (active) => {
1711
- const classes = active ? 'text-white' : 'text-secondary-text hover:text-primary-main';
1729
+ const classes = active ? 'text-white' : 'text-secondary-text group-hover:text-primary-main ';
1712
1730
  return `${classes} ${TEXT_CLASSES}`;
1713
1731
  };
1714
1732
 
1715
1733
  const NavigatorTabs = JSX(({ className = '', navigatorTabs, context, anchor = null }) => {
1716
1734
  const router = context.useRouter();
1717
- const hash = getHash(router.href);
1718
- return (jsx("section", { className: `sticky top-0 z-20 box-border flex gap-x-1 h-12 ${className}`, id: anchor, children: navigatorTabs ? navigatorTabs.map(renderTab(hash, router)) : null }));
1735
+ const href = globalThis.location.href;
1736
+ return (jsx("section", { className: `sticky top-0 z-20 box-border flex gap-x-1 h-12 ${className}`, id: anchor, children: navigatorTabs ? navigatorTabs.map(renderTab(href, router)) : null }));
1719
1737
  });
1720
- const renderTab = (hash, router) => (tab, i) => {
1721
- const anchorHash = `#${tab.anchor}`;
1722
- const active = hash ? anchorHash === hash : i === 0;
1723
- return (jsx(NavigatorTabItem, { active: active, onClick: () => router?.replace(anchorHash), ...tab }, tab.anchor));
1738
+ const renderTab = (href, router) => (tab, i) => {
1739
+ const hash = getHash(href);
1740
+ const active = hash ? tab.href === hash : i === 0;
1741
+ return (jsx(NavigatorTabItem, { active: active, onClick: () => handleRoute(router, tab.href), ...tab }, tab.href));
1742
+ };
1743
+ const handleRoute = (router, href) => {
1744
+ if (isURL(href))
1745
+ return; // if href if full URL - move to HTML href action, do not touch router
1746
+ router?.replace(href || '');
1724
1747
  };
1725
1748
 
1749
+ const useActiveHandler = ({ context, blocks, initialState = false }) => {
1750
+ const [isActive, setIsActive] = context.useState(initialState);
1751
+ const hasContent = blocks?.length;
1752
+ const icon = isActive ? 'ArrowUpIcon' : 'ArrowDownIcon';
1753
+ const getContentBlock = ({ currentTarget }) => currentTarget.previousSibling;
1754
+ const handleToggle = (e) => {
1755
+ if (!hasContent) {
1756
+ return;
1757
+ }
1758
+ setIsActive(!isActive);
1759
+ const contentBlock = getContentBlock(e);
1760
+ contentBlock.style.maxHeight = contentBlock.style.maxHeight
1761
+ ? null
1762
+ : `${contentBlock.scrollHeight}px`;
1763
+ };
1764
+ return { isActive, hasContent, icon, handleToggle };
1765
+ };
1766
+
1767
+ const OtherProductsItemInner = JSX(({ blocks, columns = 1, context }) => {
1768
+ const className = 'box-border p-5';
1769
+ return (jsx("div", { className: "transition-all duration-300 max-h-0 overflow-hidden", children: jsx("div", { className: `box-border w-full p-9 ${columns > 1 ? 'flex flex-wrap' : ''}`, children: renderBlocksList({ context, className, columns, blocks }) }) }));
1770
+ });
1771
+
1772
+ const OtherProductsItem = JSX(({ label, isExpanded, blocks, columns, context }) => {
1773
+ const { hasContent, icon, handleToggle, isActive } = useActiveHandler({
1774
+ context,
1775
+ blocks,
1776
+ initialState: isExpanded,
1777
+ });
1778
+ return (jsxs("div", { className: "border-0 border-b border-solid border-main-divider", children: [hasContent ? (jsx(OtherProductsItemInner, { isExpanded: isActive, columns: columns, blocks: blocks, context: context })) : null, jsxs("button", { className: "border-none bg-primary-main px-0 py-[26px] mb-[1px] w-full font-sans text-white text-base flex justify-center cursor-pointer", onClick: handleToggle, children: [jsx("span", { className: "pr-3", children: isActive ? 'Скрыть' : label }), hasContent ? jsx(Icon, { name: icon, width: "20", height: "20", asSVG: true }) : null] })] }));
1779
+ });
1780
+
1781
+ const OtherProducts = JSX(({ blockItems, context, className }) => {
1782
+ return (jsx("section", { className: `font-sans bg-white text-primary-text ${className || ''}`, children: blockItems?.length ? (jsx("div", { className: "list-none m-0 p-0", children: blockItems.map((item, i) => (jsx(OtherProductsItem, { ...item, context: context }, `BlockItem${i}`))) })) : null }));
1783
+ });
1784
+
1726
1785
  const GOLDEN_RATIO = 1.618;
1727
1786
  const Placeholder = JSX(({ className, context, title, description = 'Блок в разработке...', anchor = null }) => {
1728
1787
  return (jsx("section", { className: `bg-white text-primary-text font-sans p-9 box-border ${className} ${getTileRightPadding(className)} ${getTileMinHeight(className)} `, id: anchor, children: jsxs(BaseTile, { context: context, title: title ? (jsx(Heading, { headingType: getTileHeadingType(className), title: title, className: `whitespace-pre-wrap max-w-[600px]` })) : null, children: [description ? (jsx(Description, { className: "mt-4 max-w-[600px]", description: description })) : null, jsx("figure", { className: "m-0 min-w-[600px]", children: renderShimmer() })] }) }));
@@ -1828,44 +1887,8 @@
1828
1887
  return dateObj.toLocaleString('ru-RU', dateFormat).replace('г.', '');
1829
1888
  }
1830
1889
 
1831
- const useActiveHandler = ({ context, blocks, initialState = false }) => {
1832
- const [isActive, setIsActive] = context.useState(initialState);
1833
- const hasContent = blocks?.length;
1834
- const icon = isActive ? 'ArrowUpIcon' : 'ArrowDownIcon';
1835
- const getContentBlock = ({ currentTarget }) => currentTarget.previousSibling;
1836
- const handleToggle = (e) => {
1837
- if (!hasContent) {
1838
- return;
1839
- }
1840
- setIsActive(!isActive);
1841
- const contentBlock = getContentBlock(e);
1842
- contentBlock.style.maxHeight = contentBlock.style.maxHeight
1843
- ? null
1844
- : `${contentBlock.scrollHeight}px`;
1845
- };
1846
- return { isActive, hasContent, icon, handleToggle };
1847
- };
1848
-
1849
- const OtherProductsItemInner = JSX(({ blocks, columns = 1, context }) => {
1850
- const className = 'box-border p-5';
1851
- return (jsx("div", { className: "transition-all duration-300 max-h-0 overflow-hidden", children: jsx("div", { className: `box-border w-full p-9 ${columns > 1 ? 'flex flex-wrap' : ''}`, children: renderBlocksList({ context, className, columns, blocks }) }) }));
1852
- });
1853
-
1854
- const OtherProductsItem = JSX(({ label, isExpanded, blocks, columns, context }) => {
1855
- const { hasContent, icon, handleToggle, isActive } = useActiveHandler({
1856
- context,
1857
- blocks,
1858
- initialState: isExpanded,
1859
- });
1860
- return (jsxs("div", { className: "border-0 border-b border-solid border-main-divider", children: [hasContent ? (jsx(OtherProductsItemInner, { isExpanded: isActive, columns: columns, blocks: blocks, context: context })) : null, jsxs("button", { className: "border-none bg-primary-main px-0 py-[26px] mb-[1px] w-full font-sans text-white text-base flex justify-center cursor-pointer", onClick: handleToggle, children: [jsx("span", { className: "pr-3", children: isActive ? 'Скрыть' : label }), hasContent ? jsx(Icon, { name: icon, width: "20", height: "20", asSVG: true }) : null] })] }));
1861
- });
1862
-
1863
- const OtherProducts = JSX(({ blockItems, context, className }) => {
1864
- return (jsx("section", { className: `font-sans bg-white text-primary-text ${className || ''}`, children: blockItems?.length ? (jsx("div", { className: "list-none m-0 p-0", children: blockItems.map((item, i) => (jsx(OtherProductsItem, { ...item, context: context }, `BlockItem${i}`))) })) : null }));
1865
- });
1866
-
1867
1890
  const RecommendationCard = JSX(({ context, className = '', title, description, items, image, version, socialMedia }) => {
1868
- return (jsx("section", { className: `border border-solid box-border py-[30px] px-9 min-w-[515px] max-w-[515px] ${className}`, role: "listitem", children: jsxs(BaseTile, { context: context, className: "flex justify-between", title: title ? (jsx("h4", { className: `font-sans text-title-xs font-normal m-0 mb-3.5`, children: title })) : null, image: image?.src && jsx(Img, { className: "mt-auto ml-7", image: image }), children: [description ? jsx(Description, { className: "text-left", description: description }) : null, items?.length ? (jsx(List, { className: "text-md font-light flex flex-col gap-2", items: items, version: version })) : null, jsx(SocialMedia, { className: "pt-[42px] pb-0", media: socialMedia, context: context })] }) }));
1891
+ return (jsx("section", { className: `border border-solid box-border py-[30px] px-9 min-w-[515px] max-w-[515px] ${className}`, role: "listitem", children: jsxs(BaseTile, { context: context, className: "flex justify-between", title: title ? (jsx(Heading, { headingType: "h4", as: "h3", className: "font-normal mb-3.5", title: title })) : null, image: image?.src && jsx(Img, { className: "mt-auto ml-7", image: image }), children: [description ? jsx(Description, { className: "text-left", description: description }) : null, items?.length ? (jsx(List, { className: "text-md font-light flex flex-col gap-2", items: items, version: version })) : null, jsx(SocialMedia, { className: "pt-[42px] pb-0", media: socialMedia, context: context })] }) }));
1869
1892
  });
1870
1893
 
1871
1894
  const BLUR_BLOCK_CLASSES = 'absolute top-0 bottom-0 w-[84px]';
@@ -1895,20 +1918,20 @@
1895
1918
  return (jsxs("div", { children: [showPrevButton && (jsx(ArrowButton, { className: "absolute top-1/2 left-8 rotate-180 z-10 mt-6", onClick: handlePrevClick, ariaLabel: "\u041F\u0440\u043E\u043B\u0438\u0441\u0442\u0430\u0442\u044C \u0432\u043B\u0435\u0432\u043E" })), showNextButton && (jsx(ArrowButton, { className: "absolute top-1/2 right-8 z-10 mt-6", onClick: handleNextClick, ariaLabel: "\u041F\u0440\u043E\u043B\u0438\u0441\u0442\u0430\u0442\u044C \u0432\u043F\u0440\u0430\u0432\u043E" }))] }));
1896
1919
  };
1897
1920
 
1898
- const StepsBlock = JSX(({ className = '', title, showLines = true, steps = [], anchor = null }) => {
1921
+ const StepsBlock = JSX(({ className = '', title, showLines = true, steps = [], button, anchor = null }) => {
1899
1922
  const shortGaps = steps.length > 3;
1900
1923
  return (jsxs("section", { className: [
1901
1924
  'box-border font-sans text-primary-text bg-white',
1902
1925
  shortGaps ? 'px-20' : 'px-[70px]',
1903
1926
  'py-[50px] flex flex-col items-center',
1904
1927
  className,
1905
- ].join(' '), id: anchor, children: [jsx(Heading, { headingType: "h2", className: "max-w-[47rem] text-center", title: title }), steps?.length ? (jsxs("div", { className: `box-border py-0.5 mb-0.5 ${title ? 'mt-9' : ''}`, children: [jsx("div", { className: "flex items-center px-[88px]", children: joinList(jsx("div", { className: `h-0.5 w-full bg-secondary-light ${!showLines ? 'opacity-0' : ''}` }))(steps.map(renderStepIcon)) }), jsx("div", { className: `flex justify-between ${shortGaps ? 'gap-x-3' : 'gap-x-[101px]'}`, children: steps.map(renderStepTitle) })] })) : null] }));
1928
+ ].join(' '), id: anchor, children: [jsx(Heading, { headingType: "h2", className: "max-w-[47rem] text-center", title: title }), steps?.length ? (jsxs("div", { className: `box-border py-0.5 mb-0.5 ${title ? 'mt-9' : ''}`, children: [jsx("div", { className: "flex items-center px-[88px]", children: joinList(jsx("div", { className: `h-0.5 w-full bg-secondary-light ${!showLines ? 'opacity-0' : ''}` }))(steps.map(renderStepIcon)) }), jsx("div", { className: `flex justify-between ${shortGaps ? 'gap-x-3' : 'gap-x-[101px]'}`, children: steps.map((step, i) => renderStepTitle(step, i, Boolean(button?.text))) })] })) : null, button?.text ? (jsx(Button, { className: "box-border mt-[43px] py-3 h-12 w-full max-w-[240px]", version: "primary", href: "#", children: button.text })) : null] }));
1906
1929
  });
1907
1930
  const renderStepIcon = (step, i) => {
1908
- return (jsx("div", { className: "flex flex-col items-center text-center relative", children: jsx("div", { className: "h-[100px] w-[100px] min-w-[100px] min-h-[100px] bg-secondary-light rounded-full p-[26px] box-border z-10", children: (step.icon?.icon && jsx(Img, { image: step.icon, width: "48", height: "48" })) || (jsx("span", { className: "font-medium text-title-sm text-secondary-text", children: i + 1 })) }) }, String(i)));
1931
+ return (jsx("div", { className: "flex flex-col items-center text-center relative", children: jsx("div", { className: "h-[100px] w-[100px] min-w-[100px] min-h-[100px] bg-secondary-light rounded-full p-[26px] box-border z-10", children: (step.icon?.icon && jsx(Img, { image: step.icon, width: "48", height: "48" })) || (jsx("span", { className: "font-normal text-title-sm text-secondary-text", children: i + 1 })) }) }, String(i)));
1909
1932
  };
1910
- const renderStepTitle = (step, i) => {
1911
- return (jsxs("div", { className: "flex flex-col items-center text-center relative w-[276px] whitespace-pre-line overflow-hidden", children: [step.label && jsx("div", { className: "font-medium text-xl m-0 mt-4", children: step.label }), step.description && (jsx("div", { className: `font-normal text-sm text-secondary-text ${step.label ? 'mt-2' : 'mt-4'}`, children: step.description }))] }, String(i)));
1933
+ const renderStepTitle = (step, i, isMainButton) => {
1934
+ return (jsxs("div", { className: "flex flex-col items-center justify-between text-center relative w-[276px] whitespace-pre-line overflow-hidden", children: [jsxs("div", { children: [step.label && jsx("div", { className: "font-normal text-xl m-0 mt-4", children: step.label }), step.description && (jsx("div", { className: `font-light text-base text-secondary-text ${step.label ? 'mt-2' : 'mt-4'}`, children: step.description }))] }), step?.button?.text && !isMainButton ? (jsx(Button, { className: "box-border mt-[38px] py-3 h-12 w-full max-w-[240px]", version: "primary", href: "#", children: step.button.text })) : null] }, String(i)));
1912
1935
  };
1913
1936
 
1914
1937
  const DIVIDER_CLASSES = 'border-main-divider border border-t-0 border-x-0';
@@ -1916,13 +1939,15 @@
1916
1939
  const COLS_LENGTH_FOR_SCROLL = 2;
1917
1940
  const COLUMN_WIDTH = 4 * 80 + 40; // w-80 + pl-10 = 360px
1918
1941
 
1942
+ const getButtonAriaLabel = (icon) => icon?.alt || icon?.title || IconTitleMap[icon?.icon ? icon.icon : ''];
1943
+
1919
1944
  const TariffsTableCell = JSX(({ cell, isLastRow }) => {
1920
1945
  const cellWrapperClasses = `first:pl-0 pl-10 w-80 flex-grow flex flex-col border-solid border-main-divider border border-t-0 border-x-0 ${isLastRow ? 'border-t-0 rounded-b-md' : ''}`;
1921
1946
  return (jsx("div", { className: cellWrapperClasses, role: "cell", children: jsx("div", { children: cell.map(renderCellInner) }) }));
1922
1947
  });
1923
1948
  const renderCellInner = ({ label, description, list, image, buttons }, i) => (jsxs("div", { className: "first:pt-5 last:pb-5", children: [i > 0 && (jsx("div", { className: "border-main-divider border border-solid border-t-0 border-x-0 my-4" })), label ? jsx("div", { className: "text-xl font-medium m-0", children: label }) : null, description ? jsx("div", { className: "text-sm text-secondary-text", children: description }) : null, list?.items?.length ? renderList(list) : null, image && jsx(Img, { image: image }), buttons?.length ? renderButtons(buttons) : null] }, String(i)));
1924
1949
  const renderList = (list) => (jsx(List, { className: "flex flex-col justify-between items-start text-sm", version: "gray", items: list.items, isDotted: list.isDotted ?? true }));
1925
- const renderButtons = (buttons) => (jsx("div", { children: buttons.map(({ icon, rounded, ...buttonProps }, idx) => (jsx(Button, { className: `${idx > 0 && rounded ? 'ml-3' : ''} w-12 h-12`, rounded: rounded, appendLeft: icon ? jsx(Img, { image: icon, width: "24px", height: "24px", asSVG: true }) : null, ...buttonProps }, String(idx)))) }));
1950
+ const renderButtons = (buttons) => (jsx("div", { children: buttons.map(({ icon, rounded, ...buttonProps }, idx) => (jsx(Button, { className: `${idx > 0 && rounded ? 'ml-3' : ''} w-12 h-12`, ariaLabel: getButtonAriaLabel(icon), rounded: rounded, appendLeft: icon ? jsx(Img, { image: icon, width: "24px", height: "24px", asSVG: true }) : null, ...buttonProps }, String(idx)))) }));
1926
1951
 
1927
1952
  const TariffsTableRow = JSX(({ row: { header, data }, activeCardIndex, isLastRow }) => {
1928
1953
  return (jsxs(TableRowContainer, { children: [jsx("div", { className: `text-sm py-5 ${FIRST_CELL_CLASSES} ${DIVIDER_CLASSES} ${!isLastRow ? 'border-solid' : ''}`, children: jsxs("div", { className: "flex items-center text-primary-text", children: [header?.icon ? (jsx(Img, { className: "mr-[14px] max-w-6 max-h-6", image: header.icon, width: "24px", height: "24px", asSVG: true })) : null, header?.title] }) }), data?.length ? (jsx(TableCarouselContainer, { activeCardIndex: activeCardIndex, columnWidth: COLUMN_WIDTH, version: "tariff", children: data.map((cell, i) => (jsx(TariffsTableCell, { cell: cell, isLastRow: isLastRow }, String(i)))) })) : null] }));
@@ -1977,6 +2002,19 @@
1977
2002
  Placeholder,
1978
2003
  };
1979
2004
 
2005
+ const changeHashOnScroll = (router, blocks) => {
2006
+ blocks?.forEach((block) => {
2007
+ const currentHash = globalThis.location.hash;
2008
+ const anchorHash = `#${block?.id}`;
2009
+ if (currentHash === anchorHash)
2010
+ return;
2011
+ const position = block?.getBoundingClientRect();
2012
+ if (position && position.top > 0 && position.top < 150) {
2013
+ router.replace(`#${block?.id}`);
2014
+ }
2015
+ });
2016
+ };
2017
+
1980
2018
  const LikeButton = JSX(({ className, onClick, ariaLabel }) => (jsx("button", { type: "button", className: `border-0 w-[36px] bg-inherit cursor-pointer ${className || ''}`, onClick: onClick, "aria-label": ariaLabel, children: renderLikeIcon() })));
1981
2019
  const renderLikeIcon = () => {
1982
2020
  const params = {
@@ -1994,9 +2032,15 @@
1994
2032
  });
1995
2033
 
1996
2034
  const defaultBlockDecorator = ({ blockClassName, block, render }) => render({ blockClassName, block });
1997
- const ContentPage = JSX(({ className, context, blocksRegistry, data: { style: pageStyle, blocks, slots = {}, likeControl, colorPalette = 'pc' }, blockDecorator = defaultBlockDecorator, }) => {
2035
+ const ContentPage = JSX(({ className = '', context, blocksRegistry, data: { style: pageStyle, blocks, slots = {}, likeControl, colorPalette = 'pc' }, blockDecorator = defaultBlockDecorator, }) => {
1998
2036
  const { header } = slots;
1999
- return (jsxs("section", { className: `relative ${style2className(pageStyle)} ${className || ''}`, "data-theme": colorPalette, children: [header?.blocks?.length ? (jsx("div", { className: `${style2className(header?.style)}`, children: header.blocks.map((block, i) => renderBlock({ block, blockDecorator, blocksRegistry, context }, i)) })) : null, blocks?.length ? (jsx("div", { className: "container grid grid-cols-12 gap-1", children: blocks.map((block, i) => renderBlock({ block, blockDecorator, blocksRegistry, context }, i)) })) : null, likeControl && (jsx("div", { className: "flex items-end absolute bottom-0 right-0 h-full pointer-events-none", children: jsx(LikeControl, { className: "rounded-tl-lg sticky bottom-0 pointer-events-auto", context: context }) }))] }));
2037
+ const router = context.useRouter();
2038
+ // listener is for NavigatorTabs
2039
+ globalThis.addEventListener('load', () => {
2040
+ const sectionsWithAnchors = globalThis.document.querySelectorAll('section[id]');
2041
+ globalThis.document.addEventListener('scroll', () => changeHashOnScroll(router, sectionsWithAnchors));
2042
+ });
2043
+ return (jsxs("section", { className: `relative ${style2className(pageStyle)} ${className}`, "data-theme": colorPalette, children: [header?.blocks?.length ? (jsx("div", { className: `${style2className(header?.style)}`, children: header.blocks.map((block, i) => renderBlock({ block, blockDecorator, blocksRegistry, context }, i)) })) : null, blocks?.length ? (jsx("div", { className: "container grid grid-cols-12 gap-1", children: blocks.map((block, i) => renderBlock({ block, blockDecorator, blocksRegistry, context }, i)) })) : null, likeControl && (jsx("div", { className: "flex items-end absolute bottom-0 right-0 h-full pointer-events-none", children: jsx(LikeControl, { className: "rounded-tl-lg sticky bottom-0 pointer-events-auto", context: context }, "LikeControl") }))] }));
2000
2044
  });
2001
2045
  function renderBlock({ block, blockDecorator, blocksRegistry, context }, i) {
2002
2046
  const { type } = block;
@@ -2009,7 +2053,7 @@
2009
2053
  block,
2010
2054
  render: (props) => {
2011
2055
  const { version, content, anchor } = props.block;
2012
- return (jsx(BlockComponent, { className: props.blockClassName, version: version, context: context, anchor: anchor, ...content }));
2056
+ return (jsx(BlockComponent, { className: props.blockClassName, version: version, context: context, anchor: anchor, ...content }, `${type}-${i}`));
2013
2057
  },
2014
2058
  }, `block-${i}`);
2015
2059
  }