@redneckz/wildless-cms-uni-blocks 0.10.7 → 0.10.9

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 (258) hide show
  1. package/bundle/blocks.schema.json +1 -1
  2. package/bundle/bundle.umd.js +63 -43
  3. package/bundle/bundle.umd.min.js +1 -1
  4. package/bundle/components/CarouselRecommendationCard/CarouselRecommendationCard.mobile.d.ts +5 -0
  5. package/bundle/components/CarouselRecommendationCard/cardStyle.d.ts +1 -0
  6. package/bundle/components/CarouselTariffsCard/getPaddingStyle.d.ts +1 -1
  7. package/bundle/components/Tabs/CenteredTabs.d.ts +7 -0
  8. package/bundle/components/Tabs/LinkTab.d.ts +2 -2
  9. package/bundle/components/Tabs/TabsContent.d.ts +3 -2
  10. package/bundle/components/Tabs/renderGroupTab.d.ts +2 -2
  11. package/bundle/components/Tabs/renderTab.d.ts +3 -3
  12. package/bundle/components/Tabs/tabItemClasses.d.ts +3 -2
  13. package/bundle/utils/appendSlash.d.ts +1 -0
  14. package/dist/ProjectSettings.js +3 -3
  15. package/dist/ProjectSettings.js.map +1 -1
  16. package/dist/components/Blocks.mobile.js +2 -0
  17. package/dist/components/Blocks.mobile.js.map +1 -1
  18. package/dist/components/Calculator/useCreditCalculatorParams.js +1 -1
  19. package/dist/components/Calculator/useCreditCalculatorParams.js.map +1 -1
  20. package/dist/components/CarouselRecommendationCard/CarouselRecommendationCard.js +2 -2
  21. package/dist/components/CarouselRecommendationCard/CarouselRecommendationCard.js.map +1 -1
  22. package/dist/components/CarouselRecommendationCard/CarouselRecommendationCard.mobile.d.ts +5 -0
  23. package/dist/components/CarouselRecommendationCard/CarouselRecommendationCard.mobile.js +17 -0
  24. package/dist/components/CarouselRecommendationCard/CarouselRecommendationCard.mobile.js.map +1 -0
  25. package/dist/components/CarouselRecommendationCard/cardStyle.d.ts +1 -0
  26. package/dist/components/CarouselRecommendationCard/cardStyle.js +4 -0
  27. package/dist/components/CarouselRecommendationCard/cardStyle.js.map +1 -0
  28. package/dist/components/CarouselTariffsCard/getPaddingStyle.d.ts +1 -1
  29. package/dist/components/CarouselTariffsCard/getPaddingStyle.js +1 -1
  30. package/dist/components/CarouselTariffsCard/getPaddingStyle.js.map +1 -1
  31. package/dist/components/CarouselTariffsCard/getPaddingStyle.mobile.js +1 -1
  32. package/dist/components/CarouselTariffsCard/getPaddingStyle.mobile.js.map +1 -1
  33. package/dist/components/Footer/Footer.mobile.js +1 -1
  34. package/dist/components/Footer/Footer.mobile.js.map +1 -1
  35. package/dist/components/Footer/SocialMedia.mobile.js +1 -1
  36. package/dist/components/Footer/SocialMedia.mobile.js.map +1 -1
  37. package/dist/components/Tabs/CenteredTabs.d.ts +7 -0
  38. package/dist/components/Tabs/CenteredTabs.js +7 -0
  39. package/dist/components/Tabs/CenteredTabs.js.map +1 -0
  40. package/dist/components/Tabs/LinkTab.d.ts +2 -2
  41. package/dist/components/Tabs/LinkTab.js +2 -2
  42. package/dist/components/Tabs/LinkTab.js.map +1 -1
  43. package/dist/components/Tabs/ScrollableTabs.js +3 -9
  44. package/dist/components/Tabs/ScrollableTabs.js.map +1 -1
  45. package/dist/components/Tabs/Tabs.js +14 -7
  46. package/dist/components/Tabs/Tabs.js.map +1 -1
  47. package/dist/components/Tabs/TabsContent.d.ts +3 -2
  48. package/dist/components/Tabs/renderGroupTab.d.ts +2 -2
  49. package/dist/components/Tabs/renderGroupTab.js +4 -4
  50. package/dist/components/Tabs/renderGroupTab.js.map +1 -1
  51. package/dist/components/Tabs/renderTab.d.ts +3 -3
  52. package/dist/components/Tabs/renderTab.js +3 -3
  53. package/dist/components/Tabs/renderTab.js.map +1 -1
  54. package/dist/components/Tabs/tabItemClasses.d.ts +3 -2
  55. package/dist/components/Tabs/tabItemClasses.js +26 -10
  56. package/dist/components/Tabs/tabItemClasses.js.map +1 -1
  57. package/dist/hooks/useLink.js +1 -1
  58. package/dist/hooks/useLink.js.map +1 -1
  59. package/dist/ui-kit/Sitemap/Sitemap.js +2 -1
  60. package/dist/ui-kit/Sitemap/Sitemap.js.map +1 -1
  61. package/dist/utils/appendSlash.d.ts +1 -0
  62. package/dist/utils/appendSlash.js +5 -0
  63. package/dist/utils/appendSlash.js.map +1 -0
  64. package/lib/ProjectSettings.js +1 -1
  65. package/lib/ProjectSettings.js.map +1 -1
  66. package/lib/common.css +1 -1
  67. package/lib/components/Blocks.mobile.js +2 -0
  68. package/lib/components/Blocks.mobile.js.map +1 -1
  69. package/lib/components/Calculator/useCreditCalculatorParams.js +1 -1
  70. package/lib/components/Calculator/useCreditCalculatorParams.js.map +1 -1
  71. package/lib/components/CarouselRecommendationCard/CarouselRecommendationCard.fixture.mobile.d.ts +16 -0
  72. package/lib/components/CarouselRecommendationCard/CarouselRecommendationCard.js +1 -1
  73. package/lib/components/CarouselRecommendationCard/CarouselRecommendationCard.js.map +1 -1
  74. package/lib/components/CarouselRecommendationCard/CarouselRecommendationCard.mobile.d.ts +5 -0
  75. package/lib/components/CarouselRecommendationCard/CarouselRecommendationCard.mobile.js +15 -0
  76. package/lib/components/CarouselRecommendationCard/CarouselRecommendationCard.mobile.js.map +1 -0
  77. package/lib/components/CarouselRecommendationCard/cardStyle.d.ts +1 -0
  78. package/lib/components/CarouselRecommendationCard/cardStyle.js +2 -0
  79. package/lib/components/CarouselRecommendationCard/cardStyle.js.map +1 -0
  80. package/lib/components/CarouselTariffsCard/getPaddingStyle.d.ts +1 -1
  81. package/lib/components/CarouselTariffsCard/getPaddingStyle.js +1 -1
  82. package/lib/components/CarouselTariffsCard/getPaddingStyle.js.map +1 -1
  83. package/lib/components/CarouselTariffsCard/getPaddingStyle.mobile.js +1 -1
  84. package/lib/components/CarouselTariffsCard/getPaddingStyle.mobile.js.map +1 -1
  85. package/lib/components/Footer/Footer.mobile.js +1 -1
  86. package/lib/components/Footer/Footer.mobile.js.map +1 -1
  87. package/lib/components/Footer/SocialMedia.mobile.js +1 -1
  88. package/lib/components/Footer/SocialMedia.mobile.js.map +1 -1
  89. package/lib/components/Tabs/CenteredTabs.d.ts +7 -0
  90. package/lib/components/Tabs/CenteredTabs.js +5 -0
  91. package/lib/components/Tabs/CenteredTabs.js.map +1 -0
  92. package/lib/components/Tabs/LinkTab.d.ts +2 -2
  93. package/lib/components/Tabs/LinkTab.js +2 -2
  94. package/lib/components/Tabs/LinkTab.js.map +1 -1
  95. package/lib/components/Tabs/ScrollableTabs.js +3 -9
  96. package/lib/components/Tabs/ScrollableTabs.js.map +1 -1
  97. package/lib/components/Tabs/Tabs.fixture.d.ts +1 -0
  98. package/lib/components/Tabs/Tabs.js +14 -7
  99. package/lib/components/Tabs/Tabs.js.map +1 -1
  100. package/lib/components/Tabs/TabsContent.d.ts +3 -2
  101. package/lib/components/Tabs/renderGroupTab.d.ts +2 -2
  102. package/lib/components/Tabs/renderGroupTab.js +5 -5
  103. package/lib/components/Tabs/renderGroupTab.js.map +1 -1
  104. package/lib/components/Tabs/renderTab.d.ts +3 -3
  105. package/lib/components/Tabs/renderTab.js +3 -3
  106. package/lib/components/Tabs/renderTab.js.map +1 -1
  107. package/lib/components/Tabs/tabItemClasses.d.ts +3 -2
  108. package/lib/components/Tabs/tabItemClasses.js +26 -10
  109. package/lib/components/Tabs/tabItemClasses.js.map +1 -1
  110. package/lib/hooks/useLink.js +1 -1
  111. package/lib/hooks/useLink.js.map +1 -1
  112. package/lib/ui-kit/Sitemap/Sitemap.js +2 -1
  113. package/lib/ui-kit/Sitemap/Sitemap.js.map +1 -1
  114. package/lib/utils/appendSlash.d.ts +1 -0
  115. package/lib/utils/appendSlash.js +2 -0
  116. package/lib/utils/appendSlash.js.map +1 -0
  117. package/mobile/bundle/bundle.umd.js +146 -137
  118. package/mobile/bundle/bundle.umd.min.js +1 -1
  119. package/mobile/bundle/components/CarouselRecommendationCard/cardStyle.d.ts +1 -0
  120. package/mobile/bundle/components/Tabs/CenteredTabs.d.ts +7 -0
  121. package/mobile/bundle/components/Tabs/LinkTab.d.ts +2 -2
  122. package/mobile/bundle/components/Tabs/TabsContent.d.ts +3 -2
  123. package/mobile/bundle/components/Tabs/renderGroupTab.d.ts +2 -2
  124. package/mobile/bundle/components/Tabs/renderTab.d.ts +3 -3
  125. package/mobile/bundle/components/Tabs/tabItemClasses.d.ts +3 -2
  126. package/mobile/bundle/utils/appendSlash.d.ts +1 -0
  127. package/mobile/dist/ProjectSettings.js +3 -3
  128. package/mobile/dist/ProjectSettings.js.map +1 -1
  129. package/mobile/dist/components/Blocks.js +2 -0
  130. package/mobile/dist/components/Blocks.js.map +1 -1
  131. package/mobile/dist/components/Calculator/useCreditCalculatorParams.js +1 -1
  132. package/mobile/dist/components/Calculator/useCreditCalculatorParams.js.map +1 -1
  133. package/mobile/dist/components/CarouselRecommendationCard/CarouselRecommendationCard.js +4 -4
  134. package/mobile/dist/components/CarouselRecommendationCard/CarouselRecommendationCard.js.map +1 -1
  135. package/mobile/dist/components/CarouselRecommendationCard/cardStyle.d.ts +1 -0
  136. package/mobile/dist/components/CarouselRecommendationCard/cardStyle.js +4 -0
  137. package/mobile/dist/components/CarouselRecommendationCard/cardStyle.js.map +1 -0
  138. package/mobile/dist/components/CarouselTariffsCard/getPaddingStyle.js +1 -1
  139. package/mobile/dist/components/CarouselTariffsCard/getPaddingStyle.js.map +1 -1
  140. package/mobile/dist/components/Footer/Footer.js +1 -1
  141. package/mobile/dist/components/Footer/Footer.js.map +1 -1
  142. package/mobile/dist/components/Footer/SocialMedia.js +1 -1
  143. package/mobile/dist/components/Footer/SocialMedia.js.map +1 -1
  144. package/mobile/dist/components/Tabs/CenteredTabs.d.ts +7 -0
  145. package/mobile/dist/components/Tabs/CenteredTabs.js +7 -0
  146. package/mobile/dist/components/Tabs/CenteredTabs.js.map +1 -0
  147. package/mobile/dist/components/Tabs/LinkTab.d.ts +2 -2
  148. package/mobile/dist/components/Tabs/LinkTab.js +2 -2
  149. package/mobile/dist/components/Tabs/LinkTab.js.map +1 -1
  150. package/mobile/dist/components/Tabs/ScrollableTabs.js +3 -9
  151. package/mobile/dist/components/Tabs/ScrollableTabs.js.map +1 -1
  152. package/mobile/dist/components/Tabs/Tabs.js +14 -7
  153. package/mobile/dist/components/Tabs/Tabs.js.map +1 -1
  154. package/mobile/dist/components/Tabs/TabsContent.d.ts +3 -2
  155. package/mobile/dist/components/Tabs/renderGroupTab.d.ts +2 -2
  156. package/mobile/dist/components/Tabs/renderGroupTab.js +4 -4
  157. package/mobile/dist/components/Tabs/renderGroupTab.js.map +1 -1
  158. package/mobile/dist/components/Tabs/renderTab.d.ts +3 -3
  159. package/mobile/dist/components/Tabs/renderTab.js +3 -3
  160. package/mobile/dist/components/Tabs/renderTab.js.map +1 -1
  161. package/mobile/dist/components/Tabs/tabItemClasses.d.ts +3 -2
  162. package/mobile/dist/components/Tabs/tabItemClasses.js +26 -10
  163. package/mobile/dist/components/Tabs/tabItemClasses.js.map +1 -1
  164. package/mobile/dist/hooks/useLink.js +1 -1
  165. package/mobile/dist/hooks/useLink.js.map +1 -1
  166. package/mobile/dist/ui-kit/Sitemap/Sitemap.js +2 -1
  167. package/mobile/dist/ui-kit/Sitemap/Sitemap.js.map +1 -1
  168. package/mobile/dist/utils/appendSlash.d.ts +1 -0
  169. package/mobile/dist/utils/appendSlash.js +5 -0
  170. package/mobile/dist/utils/appendSlash.js.map +1 -0
  171. package/mobile/lib/ProjectSettings.js +1 -1
  172. package/mobile/lib/ProjectSettings.js.map +1 -1
  173. package/mobile/lib/common.css +1 -1
  174. package/mobile/lib/components/Blocks.js +2 -0
  175. package/mobile/lib/components/Blocks.js.map +1 -1
  176. package/mobile/lib/components/Calculator/useCreditCalculatorParams.js +1 -1
  177. package/mobile/lib/components/Calculator/useCreditCalculatorParams.js.map +1 -1
  178. package/mobile/lib/components/CarouselRecommendationCard/CarouselRecommendationCard.js +4 -4
  179. package/mobile/lib/components/CarouselRecommendationCard/CarouselRecommendationCard.js.map +1 -1
  180. package/mobile/lib/components/CarouselRecommendationCard/cardStyle.d.ts +1 -0
  181. package/mobile/lib/components/CarouselRecommendationCard/cardStyle.js +2 -0
  182. package/mobile/lib/components/CarouselRecommendationCard/cardStyle.js.map +1 -0
  183. package/mobile/lib/components/CarouselTariffsCard/getPaddingStyle.js +1 -1
  184. package/mobile/lib/components/CarouselTariffsCard/getPaddingStyle.js.map +1 -1
  185. package/mobile/lib/components/Footer/Footer.js +1 -1
  186. package/mobile/lib/components/Footer/Footer.js.map +1 -1
  187. package/mobile/lib/components/Footer/SocialMedia.js +1 -1
  188. package/mobile/lib/components/Footer/SocialMedia.js.map +1 -1
  189. package/mobile/lib/components/Tabs/CenteredTabs.d.ts +7 -0
  190. package/mobile/lib/components/Tabs/CenteredTabs.js +5 -0
  191. package/mobile/lib/components/Tabs/CenteredTabs.js.map +1 -0
  192. package/mobile/lib/components/Tabs/LinkTab.d.ts +2 -2
  193. package/mobile/lib/components/Tabs/LinkTab.js +2 -2
  194. package/mobile/lib/components/Tabs/LinkTab.js.map +1 -1
  195. package/mobile/lib/components/Tabs/ScrollableTabs.js +3 -9
  196. package/mobile/lib/components/Tabs/ScrollableTabs.js.map +1 -1
  197. package/mobile/lib/components/Tabs/Tabs.js +14 -7
  198. package/mobile/lib/components/Tabs/Tabs.js.map +1 -1
  199. package/mobile/lib/components/Tabs/TabsContent.d.ts +3 -2
  200. package/mobile/lib/components/Tabs/renderGroupTab.d.ts +2 -2
  201. package/mobile/lib/components/Tabs/renderGroupTab.js +5 -5
  202. package/mobile/lib/components/Tabs/renderGroupTab.js.map +1 -1
  203. package/mobile/lib/components/Tabs/renderTab.d.ts +3 -3
  204. package/mobile/lib/components/Tabs/renderTab.js +3 -3
  205. package/mobile/lib/components/Tabs/renderTab.js.map +1 -1
  206. package/mobile/lib/components/Tabs/tabItemClasses.d.ts +3 -2
  207. package/mobile/lib/components/Tabs/tabItemClasses.js +26 -10
  208. package/mobile/lib/components/Tabs/tabItemClasses.js.map +1 -1
  209. package/mobile/lib/hooks/useLink.js +1 -1
  210. package/mobile/lib/hooks/useLink.js.map +1 -1
  211. package/mobile/lib/ui-kit/Sitemap/Sitemap.js +2 -1
  212. package/mobile/lib/ui-kit/Sitemap/Sitemap.js.map +1 -1
  213. package/mobile/lib/utils/appendSlash.d.ts +1 -0
  214. package/mobile/lib/utils/appendSlash.js +2 -0
  215. package/mobile/lib/utils/appendSlash.js.map +1 -0
  216. package/mobile/src/ProjectSettings.ts +2 -2
  217. package/mobile/src/components/Blocks.ts +2 -0
  218. package/mobile/src/components/Calculator/useCreditCalculatorParams.ts +1 -1
  219. package/mobile/src/components/CarouselRecommendationCard/CarouselRecommendationCard.tsx +14 -20
  220. package/mobile/src/components/CarouselRecommendationCard/cardStyle.ts +2 -0
  221. package/mobile/src/components/CarouselTariffsCard/getPaddingStyle.tsx +2 -2
  222. package/mobile/src/components/Footer/Footer.tsx +1 -1
  223. package/mobile/src/components/Footer/SocialMedia.tsx +1 -1
  224. package/mobile/src/components/Tabs/CenteredTabs.tsx +12 -0
  225. package/mobile/src/components/Tabs/LinkTab.tsx +5 -5
  226. package/mobile/src/components/Tabs/ScrollableTabs.tsx +5 -13
  227. package/mobile/src/components/Tabs/Tabs.tsx +21 -19
  228. package/mobile/src/components/Tabs/TabsContent.ts +3 -2
  229. package/mobile/src/components/Tabs/renderGroupTab.tsx +11 -10
  230. package/mobile/src/components/Tabs/renderTab.tsx +5 -13
  231. package/mobile/src/components/Tabs/tabItemClasses.ts +28 -10
  232. package/mobile/src/hooks/useLink.ts +1 -1
  233. package/mobile/src/ui-kit/Sitemap/Sitemap.tsx +2 -1
  234. package/mobile/src/utils/appendSlash.ts +2 -0
  235. package/package.json +6 -1
  236. package/src/ProjectSettings.ts +2 -2
  237. package/src/components/Blocks.mobile.ts +2 -0
  238. package/src/components/Calculator/useCreditCalculatorParams.ts +1 -1
  239. package/src/components/CarouselRecommendationCard/CarouselRecommendationCard.fixture.mobile.tsx +148 -0
  240. package/src/components/CarouselRecommendationCard/CarouselRecommendationCard.mobile.tsx +63 -0
  241. package/src/components/CarouselRecommendationCard/CarouselRecommendationCard.tsx +1 -3
  242. package/src/components/CarouselRecommendationCard/cardStyle.ts +2 -0
  243. package/src/components/CarouselTariffsCard/getPaddingStyle.mobile.tsx +2 -2
  244. package/src/components/CarouselTariffsCard/getPaddingStyle.tsx +1 -1
  245. package/src/components/Footer/Footer.mobile.tsx +1 -1
  246. package/src/components/Footer/SocialMedia.mobile.tsx +1 -1
  247. package/src/components/Tabs/CenteredTabs.tsx +12 -0
  248. package/src/components/Tabs/LinkTab.tsx +5 -5
  249. package/src/components/Tabs/ScrollableTabs.tsx +5 -13
  250. package/src/components/Tabs/Tabs.fixture.tsx +27 -0
  251. package/src/components/Tabs/Tabs.tsx +21 -19
  252. package/src/components/Tabs/TabsContent.ts +3 -2
  253. package/src/components/Tabs/renderGroupTab.tsx +11 -10
  254. package/src/components/Tabs/renderTab.tsx +5 -13
  255. package/src/components/Tabs/tabItemClasses.ts +28 -10
  256. package/src/hooks/useLink.ts +1 -1
  257. package/src/ui-kit/Sitemap/Sitemap.tsx +2 -1
  258. package/src/utils/appendSlash.ts +2 -0
@@ -53,6 +53,8 @@
53
53
  };
54
54
  }
55
55
 
56
+ const appendSlash = (url) => url && !url.endsWith('/') ? `${url}/` : url;
57
+
56
58
  const DEFAULT_PROJECT_SETTINGS = { PROD_BRANCH: 'master' };
57
59
  const projectSettings = new (class {
58
60
  _ = DEFAULT_PROJECT_SETTINGS;
@@ -96,7 +98,6 @@
96
98
  return this._.YANDEX_METRIKA_ID;
97
99
  }
98
100
  })();
99
- const appendSlash = (url) => (url && !url.endsWith('/') ? `${url}/` : url);
100
101
 
101
102
  const AUTH_PREFIX = 'guest';
102
103
  const STORAGE_KEY = 'likesToken';
@@ -556,7 +557,7 @@
556
557
  const { close } = useDialog();
557
558
  return (props) => ({
558
559
  ...props,
559
- href: isRemote ? props.href : adjustHref(router)(props.href, basePath),
560
+ href: isRemote && !basePath ? props.href : adjustHref(router)(props.href, basePath),
560
561
  'aria-label': props.text,
561
562
  onClick: handlerDecorator(handleHref(props), props),
562
563
  });
@@ -1628,7 +1629,7 @@
1628
1629
  ...getLimitRangeByKeys(['minMonths', 'maxMonths'], creditCalculatorSourceBookLimitParams, rateRows),
1629
1630
  ...userInputParams,
1630
1631
  monthlyPayment,
1631
- }), [userInputParams]);
1632
+ }), [userInputParams, data]);
1632
1633
  };
1633
1634
  const checkRowCommonParams = (props) => checkRowParam({
1634
1635
  ...props,
@@ -1814,7 +1815,7 @@
1814
1815
  visibleItemCount: COLUMNS_FOR_SCROLL,
1815
1816
  });
1816
1817
  return (jsxs(BlockWrapper, { className: style('box-border overflow-hidden relative w-100', className), ...rest, children: [jsxs("div", { className: "bg-white", children: [tabsNav.length > 1
1817
- ? renderTabs({ activeIndex, tabsNav, slideIndexShift, onClick: handleSlideIndexShift })
1818
+ ? renderTabs$1({ activeIndex, tabsNav, slideIndexShift, onClick: handleSlideIndexShift })
1818
1819
  : null, renderArrows({
1819
1820
  ...controls,
1820
1821
  btnClass: ['left-3', 'right-3'],
@@ -1837,7 +1838,7 @@
1837
1838
  iconVersion: iconVersion ?? activeIconStyle,
1838
1839
  }, width: "24", height: "24" }), jsxs("div", { className: "border-0", children: [jsx("div", { className: btnTitleClassName, children: tab?.title }), jsx("div", { className: btnDescClassName, children: tab.description })] })] }, String(i)));
1839
1840
  }
1840
- function renderTabs({ activeIndex, tabsNav, slideIndexShift, onClick }) {
1841
+ function renderTabs$1({ activeIndex, tabsNav, slideIndexShift, onClick }) {
1841
1842
  const CARD_SHIFT = 388;
1842
1843
  return (jsxs("div", { children: [jsx("div", { style: { transform: `translateX(-${activeIndex * CARD_SHIFT}px)` }, className: "flex flex-col justify-end items-center h-[126px] pt-9 box-border duration-1000", children: jsx("div", { className: "w-full flex flex-nowrap items-end gap-2", children: tabsNav.map((tab, i) => renderNavButton$3({
1843
1844
  tab,
@@ -2351,6 +2352,7 @@
2351
2352
  const SocialMedia = JSX(({ className = '', media, children, buttonSize }) => (jsxs("div", { className: "font-sans", children: [jsx("div", { className: `flex gap-1 ${className}`, children: media?.map((_, index) => (jsx(MediaButton, { buttonSize: buttonSize, ..._ }, String(index)))) }), jsx(Text, { size: "text-s-light", color: "text-secondary-text", children: children })] })));
2352
2353
 
2353
2354
  const BORDER_STYLE = 'border border-solid border-gray group-data-secondary:border-white/50 group-data-gray:border-main-divider';
2355
+
2354
2356
  const CarouselRecommendationCard = JSX(({ className = '', description, href, icon, items = [], socialMedia = [], target, title, align = 'text-left', version = 'primary', ...rest }) => {
2355
2357
  return (jsx(BlockWrapper, { className: style('relative p-7 min-w-[524px] min-h-[218px] h-full box-border group-data-gray:bg-main-divider/50', BORDER_STYLE, className), version: version, ...rest, children: jsxs(LinkWrapper, { href: href, target: target, children: [jsx(Headline, { className: "mb-4", title: title, description: description, headlineVersion: "S", isPadding: false, align: align }), jsxs("div", { className: "w-1/2 h-full flex flex-col flex-1 justify-end", children: [items.length ? (jsx(List, { className: "flex flex-col gap-2", itemClassName: "text-l-light", items: items })) : null, socialMedia.length ? jsx(SocialMedia, { className: "pt-10", media: socialMedia }) : null] }), renderIconBlock$2(icon)] }) }));
2356
2358
  });
@@ -2385,7 +2387,7 @@
2385
2387
  return (jsx("div", { ref: containerRef, className: `transition-max-h duration-300 overflow-hidden ${containerRef.current || !isUnfolded ? 'max-h-0' : ''} ${className}`, children: children }));
2386
2388
  });
2387
2389
 
2388
- const getPaddingStyle = (isHighlighting) => isHighlighting ? 'p-8 mt-8 pt-20' : 'p-8 mt-20';
2390
+ const getPaddingStyle = (isHighlighting = false) => isHighlighting ? 'p-8 mt-8 pt-20' : 'p-8 mt-20';
2389
2391
 
2390
2392
  const descriptionSize = 'text-h6';
2391
2393
 
@@ -3039,7 +3041,7 @@
3039
3041
  });
3040
3042
  const renderColumn = (menuItem, index) => {
3041
3043
  const { text, items, href, target, onClick } = menuItem;
3042
- return (jsxs("div", { className: "flex flex-col gap-3.5 w-1/4", children: [jsx("a", { className: "leading-5 text-l text-primary-text hover:text-primary-main no-underline", href: href, target: target || '_self', onClick: onClick, children: text || `Раздел ${index}` }), items?.map((_, i) => (jsx(ColumnItem, { ..._, basePath: href, index: i }, String(i))))] }, String(index)));
3044
+ return (jsxs("div", { className: "flex flex-col gap-3.5 w-1/4", children: [jsx("a", { className: "leading-5 text-l text-primary-text hover:text-primary-main no-underline", href: href, target: target || '_self', onClick: onClick, children: text || `Раздел ${index}` }), items?.map((_, i) => (jsx(ColumnItem, { ..._, basePath: appendSlash(href), index: i }, String(i))))] }, String(index)));
3043
3045
  };
3044
3046
  const ColumnItem = JSX(({ text, index, basePath, ...rest }) => {
3045
3047
  const isAnotherPortal = projectSettings.BASE_PATH && basePath ? !projectSettings.BASE_PATH.startsWith(basePath) : false;
@@ -4424,7 +4426,11 @@
4424
4426
  active: `inline-flex px-4 grow whitespace-nowrap ${LINK_CLASSES} ${SCROLLABLE_ACTIVE_LINK_CLASSES}`,
4425
4427
  default: `inline-flex px-4 grow whitespace-nowrap ${LINK_CLASSES} ${INACTIVE_LINK_CLASSES}`,
4426
4428
  },
4427
- default: {
4429
+ centered: {
4430
+ active: `px-4 rounded-md ${LINK_CLASSES} ${WIDESCREEN_ACTIVE_LINK_CLASSES} whitespace-nowrap`,
4431
+ default: `px-4 rounded-md ${LINK_CLASSES} group/btn bg-transparent whitespace-nowrap`,
4432
+ },
4433
+ wideScreen: {
4428
4434
  active: `${LINK_CLASSES} ${WIDESCREEN_ACTIVE_LINK_CLASSES} whitespace-nowrap`,
4429
4435
  default: `${LINK_CLASSES} ${INACTIVE_LINK_CLASSES} whitespace-nowrap`,
4430
4436
  },
@@ -4434,7 +4440,11 @@
4434
4440
  active: `h-full border-0 border-b-2`,
4435
4441
  default: ``,
4436
4442
  },
4437
- default: {
4443
+ centered: {
4444
+ active: '',
4445
+ default: '',
4446
+ },
4447
+ wideScreen: {
4438
4448
  active: '',
4439
4449
  default: '',
4440
4450
  },
@@ -4446,7 +4456,11 @@
4446
4456
  active: `inline-flex px-4 grow whitespace-nowrap ${LINK_CLASSES} ${SCROLLABLE_ACTIVE_LINK_CLASSES}`,
4447
4457
  default: `inline-flex px-4 grow whitespace-nowrap ${LINK_CLASSES} ${INACTIVE_LINK_CLASSES}`,
4448
4458
  },
4449
- default: {
4459
+ centered: {
4460
+ active: `px-4 rounded-md ${LINK_CLASSES} ${WIDESCREEN_ACTIVE_LINK_CLASSES} whitespace-nowrap`,
4461
+ default: `px-4 rounded-md ${LINK_CLASSES} group/btn bg-transparent whitespace-nowrap`,
4462
+ },
4463
+ wideScreen: {
4450
4464
  active: `${LINK_CLASSES} ${WIDESCREEN_ACTIVE_LINK_CLASSES}`,
4451
4465
  default: `${LINK_CLASSES} ${INACTIVE_LINK_CLASSES}`,
4452
4466
  },
@@ -4456,25 +4470,29 @@
4456
4470
  active: `${TEXT_CLASSES} flex items-center h-full border-0 border-b-2 ${WHITE_ACTIVE_TEXT_CLASSES}`,
4457
4471
  default: `${TEXT_CLASSES} ${INACTIVE_TEXT_CLASSES}`,
4458
4472
  },
4459
- default: {
4473
+ centered: {
4474
+ active: `${TEXT_CLASSES} ${ACTIVE_TEXT_CLASSES}`,
4475
+ default: `${TEXT_CLASSES} ${INACTIVE_TEXT_CLASSES}`,
4476
+ },
4477
+ wideScreen: {
4460
4478
  active: `${TEXT_CLASSES} ${ACTIVE_TEXT_CLASSES}`,
4461
4479
  default: `${TEXT_CLASSES} ${INACTIVE_TEXT_CLASSES}`,
4462
4480
  },
4463
4481
  },
4464
4482
  };
4465
- const getGroupTabClassName = (type, active, isScrollable) => {
4466
- const styleType = isScrollable ? 'scrollable' : 'default';
4483
+ const getGroupTabClassName = (type, active, tabsMode) => {
4467
4484
  const styleActive = active ? 'active' : 'default';
4468
- return GROUP_TAB_CLASSES[type][styleType][styleActive];
4485
+ const mode = tabsMode || 'wideScreen';
4486
+ return GROUP_TAB_CLASSES[type][mode][styleActive];
4469
4487
  };
4470
- const getLinkTabClassName = (type, active, isScrollable) => {
4471
- const styleType = isScrollable ? 'scrollable' : 'default';
4488
+ const getLinkTabClassName = (type, active, tabsMode) => {
4472
4489
  const styleActive = active ? 'active' : 'default';
4473
- return LINK_TAB_CLASSES[type][styleType][styleActive];
4490
+ const mode = tabsMode || 'wideScreen';
4491
+ return LINK_TAB_CLASSES[type][mode][styleActive];
4474
4492
  };
4475
4493
 
4476
4494
  const LinkTab = JSX((props) => {
4477
- const { tab, currentTab, onClick, isScrollable = false } = props;
4495
+ const { tab, currentTab, onClick, tabsMode } = props;
4478
4496
  const active = currentTab?.type === 'link' && currentTab.href === tab.href;
4479
4497
  const link = useLink();
4480
4498
  const adjustedProps = link(tab);
@@ -4482,22 +4500,22 @@
4482
4500
  adjustedProps.onClick(ev);
4483
4501
  onClick(tab);
4484
4502
  };
4485
- return (jsx("a", { role: "tab", className: getLinkTabClassName('link', active, isScrollable), target: tab.target, href: adjustedProps.href, onClick: handleClick, children: jsx("span", { className: getLinkTabClassName('text', active, isScrollable), children: tab.text }) }));
4503
+ return (jsx("a", { role: "tab", className: getLinkTabClassName('link', active, tabsMode), target: tab.target, href: adjustedProps.href, onClick: handleClick, children: jsx("span", { className: getLinkTabClassName('text', active, tabsMode), children: tab.text }) }));
4486
4504
  });
4487
4505
 
4488
4506
  const BADGE_CLASSES = 'min-w-[22px] h-[22px] rounded-full text-xs ml-2 flex justify-center items-center';
4489
4507
  const ACTIVE_BADGE_CLASSES = 'bg-white/30 text-white';
4490
4508
  const INACTIVE_BADGE_CLASSES = 'bg-main-divider text-secondary-text group-hover/btn:text-primary-main';
4491
- const renderGroupTab = ({ page, currentTab, showCounter, onClick, isScrollable = false }) => (tab, i) => {
4509
+ const renderGroupTab = ({ page, currentTab, showCounter, onClick, tabsMode }) => (tab, i) => {
4492
4510
  const active = currentTab === tab;
4493
4511
  const count = tab.ref && page?.blocks
4494
4512
  ? page.blocks.filter((block) => block?.labels?.includes(tab.ref)).length
4495
4513
  : 0;
4496
- return (jsx("div", { className: getGroupTabClassName('div', active, isScrollable), role: "tab", "aria-selected": active, onClick: () => onClick(tab), children: jsxs("div", { className: `flex flex-1 items-center justify-center ${getGroupTabClassName('text', active, isScrollable)}`, children: [renderTitle$1(tab.title, active, isScrollable), renderCount(showCounter, count, active)] }) }, `group-${String(i)}`));
4514
+ return (jsx("div", { className: getGroupTabClassName('div', active, tabsMode), role: "tab", "aria-selected": active, onClick: () => onClick(tab), children: jsxs("div", { className: `flex flex-1 items-center justify-center ${getGroupTabClassName('text', active, tabsMode)}`, children: [renderTitle$1(tab.title, active, tabsMode), renderCount(showCounter, count, active)] }) }, `group-${String(i)}`));
4497
4515
  };
4498
- const renderTitle$1 = (title, active, isScrollable) => {
4516
+ const renderTitle$1 = (title, active, tabsMode) => {
4499
4517
  const activeClassName = active ? WHITE_ACTIVE_TEXT_CLASSES : INACTIVE_TEXT_CLASSES;
4500
- const titleClassName = isScrollable
4518
+ const titleClassName = tabsMode === 'scrollable'
4501
4519
  ? `${TEXT_CLASSES} ${activeClassName}`
4502
4520
  : `${TEXT_CLASSES} ${active ? ACTIVE_TEXT_CLASSES : INACTIVE_TEXT_CLASSES}`;
4503
4521
  return title ? jsx("h3", { className: titleClassName, children: title }) : null;
@@ -4506,16 +4524,16 @@
4506
4524
  return showCounter && count ? (jsx("div", { className: `${BADGE_CLASSES} ${active ? ACTIVE_BADGE_CLASSES : INACTIVE_BADGE_CLASSES}`, children: count })) : null;
4507
4525
  };
4508
4526
 
4509
- const renderTab = ({ page, currentTab, showCounter, onClick, isScrollable = false }) => (tab, i) => {
4527
+ const renderTab = ({ page, showCounter, ...rest }) => (tab, i) => {
4510
4528
  const type = tab.type;
4511
4529
  if (!(type === 'group' || type === 'link')) {
4512
4530
  return null;
4513
4531
  }
4514
4532
  switch (type) {
4515
4533
  case 'group':
4516
- return renderGroupTab({ page, currentTab, showCounter, onClick, isScrollable })(tab, i);
4534
+ return renderGroupTab({ page, showCounter, ...rest })(tab, i);
4517
4535
  case 'link': {
4518
- return (jsx(LinkTab, { tab: tab, currentTab: currentTab, isScrollable: isScrollable, onClick: onClick }, String(i)));
4536
+ return jsx(LinkTab, { tab: tab, ...rest }, String(i));
4519
4537
  }
4520
4538
  default:
4521
4539
  assertUnreachable(type);
@@ -4523,24 +4541,20 @@
4523
4541
  return null;
4524
4542
  };
4525
4543
 
4544
+ const CenteredTabs = JSX(({ tabs, ...rest }) => (jsx("div", { className: "flex p-1 m-auto bg-main-gray rounded-md", children: tabs?.map(renderTab({ ...rest })) })));
4545
+
4526
4546
  const scrollButtonStyle = 'absolute z-40 top-0';
4527
4547
  const ScrollableTabs = JSX((props) => {
4528
- const { tabs, onClick, currentTab, page, showCounter } = props;
4548
+ const { tabs, ...rest } = props;
4529
4549
  const [containerRef, scroll] = useSwipeListScroll({
4530
4550
  itemCount: tabs?.length || 0,
4531
4551
  isCyclic: false,
4532
4552
  });
4533
- return (jsxs("div", { className: "relative max-w-full m-auto", children: [jsx("div", { className: `font-sans max-w-full w-full overflow-hidden relative bg-white`, children: jsx(SwipeListContainer, { containerRef: containerRef, snapAlign: "snap-start", onVisibleIndicesChange: scroll.handleVisibleIndicesChange, children: tabs?.map(renderTab({
4534
- onClick,
4535
- currentTab,
4536
- showCounter,
4537
- page,
4538
- isScrollable: true,
4539
- })) }) }), scroll.canScrollLeft ? (jsx(ScrollLeftButton, { className: `${scrollButtonStyle} left-6`, onClick: scroll.scrollLeft })) : null, scroll.canScrollRight ? (jsx(ScrollRightButton, { className: `${scrollButtonStyle} rotate-180 right-6`, onClick: scroll.scrollRight })) : null] }));
4553
+ return (jsxs("div", { className: "relative max-w-full m-auto", children: [jsx("div", { className: `font-sans max-w-full w-full overflow-hidden relative bg-white`, children: jsx(SwipeListContainer, { containerRef: containerRef, snapAlign: "snap-start", onVisibleIndicesChange: scroll.handleVisibleIndicesChange, children: tabs?.map(renderTab({ ...rest })) }) }), scroll.canScrollLeft ? (jsx(ScrollLeftButton, { className: `${scrollButtonStyle} left-6`, onClick: scroll.scrollLeft })) : null, scroll.canScrollRight ? (jsx(ScrollRightButton, { className: `${scrollButtonStyle} rotate-180 right-6`, onClick: scroll.scrollRight })) : null] }));
4540
4554
  });
4541
4555
 
4542
4556
  const Tabs = JSX((props) => {
4543
- const { className = '', tabs, showCounter, isSticky, tabsMode, ...rest } = props;
4557
+ const { className = '', tabs, isSticky, ...rest } = props;
4544
4558
  const [currentTab, setCurrentTab] = useState(tabs ? tabs[0] : undefined);
4545
4559
  useEffect(() => {
4546
4560
  if (!tabs || !tabs[0]) {
@@ -4557,13 +4571,19 @@
4557
4571
  fireTabEvent(selectedTab);
4558
4572
  setCurrentTab(selectedTab);
4559
4573
  }, []);
4560
- return (jsx(BlockWrapper, { className: `relative box-border flex gap-x-1 w-full ${isSticky ? 'sticky top-1 z-20' : ''} ${className}`, role: "tablist", ...rest, children: tabsMode === 'scrollable' ? (jsx(ScrollableTabs, { tabs: tabs, onClick: handleClick, currentTab: currentTab, showCounter: showCounter, ...rest })) : (tabs?.map(renderTab({
4561
- onClick: handleClick,
4562
- currentTab,
4563
- showCounter,
4564
- ...rest,
4565
- }))) }));
4566
- });
4574
+ return (jsx(BlockWrapper, { className: `relative box-border flex gap-x-1 w-full ${isSticky ? 'sticky top-1 z-20' : ''} ${className}`, role: "tablist", ...rest, children: renderTabs({ tabs, onClick: handleClick, currentTab, ...rest }) }));
4575
+ });
4576
+ const renderTabs = ({ tabsMode, tabs, ...rest }) => {
4577
+ switch (tabsMode) {
4578
+ case 'wideScreen':
4579
+ return tabs?.map(renderTab({ tabsMode, ...rest }));
4580
+ case 'centered':
4581
+ return jsx(CenteredTabs, { tabs: tabs, tabsMode: tabsMode, ...rest });
4582
+ case 'scrollable':
4583
+ return jsx(ScrollableTabs, { tabs: tabs, tabsMode: tabsMode, ...rest });
4584
+ }
4585
+ return null;
4586
+ };
4567
4587
  const fireTabEvent = (tab) => {
4568
4588
  if (tab.type === 'group') {
4569
4589
  defaultEventBus.fire('tab', { type: tab.type, label: tab.ref });
@@ -5006,7 +5026,7 @@
5006
5026
  return (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" }) }));
5007
5027
  }
5008
5028
 
5009
- const packageVersion = "0.10.7";
5029
+ const packageVersion = "0.10.9";
5010
5030
 
5011
5031
  exports.Blocks = Blocks;
5012
5032
  exports.ContentPage = ContentPage;