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

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 (212) hide show
  1. package/bundle/blocks.schema.json +1 -1
  2. package/bundle/bundle.umd.js +59 -40
  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/dist/components/Blocks.mobile.js +2 -0
  14. package/dist/components/Blocks.mobile.js.map +1 -1
  15. package/dist/components/CarouselRecommendationCard/CarouselRecommendationCard.js +2 -2
  16. package/dist/components/CarouselRecommendationCard/CarouselRecommendationCard.js.map +1 -1
  17. package/dist/components/CarouselRecommendationCard/CarouselRecommendationCard.mobile.d.ts +5 -0
  18. package/dist/components/CarouselRecommendationCard/CarouselRecommendationCard.mobile.js +17 -0
  19. package/dist/components/CarouselRecommendationCard/CarouselRecommendationCard.mobile.js.map +1 -0
  20. package/dist/components/CarouselRecommendationCard/cardStyle.d.ts +1 -0
  21. package/dist/components/CarouselRecommendationCard/cardStyle.js +4 -0
  22. package/dist/components/CarouselRecommendationCard/cardStyle.js.map +1 -0
  23. package/dist/components/CarouselTariffsCard/getPaddingStyle.d.ts +1 -1
  24. package/dist/components/CarouselTariffsCard/getPaddingStyle.js +1 -1
  25. package/dist/components/CarouselTariffsCard/getPaddingStyle.js.map +1 -1
  26. package/dist/components/CarouselTariffsCard/getPaddingStyle.mobile.js +1 -1
  27. package/dist/components/CarouselTariffsCard/getPaddingStyle.mobile.js.map +1 -1
  28. package/dist/components/Footer/Footer.mobile.js +1 -1
  29. package/dist/components/Footer/Footer.mobile.js.map +1 -1
  30. package/dist/components/Footer/SocialMedia.mobile.js +1 -1
  31. package/dist/components/Footer/SocialMedia.mobile.js.map +1 -1
  32. package/dist/components/Tabs/CenteredTabs.d.ts +7 -0
  33. package/dist/components/Tabs/CenteredTabs.js +7 -0
  34. package/dist/components/Tabs/CenteredTabs.js.map +1 -0
  35. package/dist/components/Tabs/LinkTab.d.ts +2 -2
  36. package/dist/components/Tabs/LinkTab.js +2 -2
  37. package/dist/components/Tabs/LinkTab.js.map +1 -1
  38. package/dist/components/Tabs/ScrollableTabs.js +3 -9
  39. package/dist/components/Tabs/ScrollableTabs.js.map +1 -1
  40. package/dist/components/Tabs/Tabs.js +14 -7
  41. package/dist/components/Tabs/Tabs.js.map +1 -1
  42. package/dist/components/Tabs/TabsContent.d.ts +3 -2
  43. package/dist/components/Tabs/renderGroupTab.d.ts +2 -2
  44. package/dist/components/Tabs/renderGroupTab.js +4 -4
  45. package/dist/components/Tabs/renderGroupTab.js.map +1 -1
  46. package/dist/components/Tabs/renderTab.d.ts +3 -3
  47. package/dist/components/Tabs/renderTab.js +3 -3
  48. package/dist/components/Tabs/renderTab.js.map +1 -1
  49. package/dist/components/Tabs/tabItemClasses.d.ts +3 -2
  50. package/dist/components/Tabs/tabItemClasses.js +26 -10
  51. package/dist/components/Tabs/tabItemClasses.js.map +1 -1
  52. package/dist/hooks/useLink.js +1 -1
  53. package/dist/hooks/useLink.js.map +1 -1
  54. package/lib/common.css +1 -1
  55. package/lib/components/Blocks.mobile.js +2 -0
  56. package/lib/components/Blocks.mobile.js.map +1 -1
  57. package/lib/components/CarouselRecommendationCard/CarouselRecommendationCard.fixture.mobile.d.ts +16 -0
  58. package/lib/components/CarouselRecommendationCard/CarouselRecommendationCard.js +1 -1
  59. package/lib/components/CarouselRecommendationCard/CarouselRecommendationCard.js.map +1 -1
  60. package/lib/components/CarouselRecommendationCard/CarouselRecommendationCard.mobile.d.ts +5 -0
  61. package/lib/components/CarouselRecommendationCard/CarouselRecommendationCard.mobile.js +15 -0
  62. package/lib/components/CarouselRecommendationCard/CarouselRecommendationCard.mobile.js.map +1 -0
  63. package/lib/components/CarouselRecommendationCard/cardStyle.d.ts +1 -0
  64. package/lib/components/CarouselRecommendationCard/cardStyle.js +2 -0
  65. package/lib/components/CarouselRecommendationCard/cardStyle.js.map +1 -0
  66. package/lib/components/CarouselTariffsCard/getPaddingStyle.d.ts +1 -1
  67. package/lib/components/CarouselTariffsCard/getPaddingStyle.js +1 -1
  68. package/lib/components/CarouselTariffsCard/getPaddingStyle.js.map +1 -1
  69. package/lib/components/CarouselTariffsCard/getPaddingStyle.mobile.js +1 -1
  70. package/lib/components/CarouselTariffsCard/getPaddingStyle.mobile.js.map +1 -1
  71. package/lib/components/Footer/Footer.mobile.js +1 -1
  72. package/lib/components/Footer/Footer.mobile.js.map +1 -1
  73. package/lib/components/Footer/SocialMedia.mobile.js +1 -1
  74. package/lib/components/Footer/SocialMedia.mobile.js.map +1 -1
  75. package/lib/components/Tabs/CenteredTabs.d.ts +7 -0
  76. package/lib/components/Tabs/CenteredTabs.js +5 -0
  77. package/lib/components/Tabs/CenteredTabs.js.map +1 -0
  78. package/lib/components/Tabs/LinkTab.d.ts +2 -2
  79. package/lib/components/Tabs/LinkTab.js +2 -2
  80. package/lib/components/Tabs/LinkTab.js.map +1 -1
  81. package/lib/components/Tabs/ScrollableTabs.js +3 -9
  82. package/lib/components/Tabs/ScrollableTabs.js.map +1 -1
  83. package/lib/components/Tabs/Tabs.fixture.d.ts +1 -0
  84. package/lib/components/Tabs/Tabs.js +14 -7
  85. package/lib/components/Tabs/Tabs.js.map +1 -1
  86. package/lib/components/Tabs/TabsContent.d.ts +3 -2
  87. package/lib/components/Tabs/renderGroupTab.d.ts +2 -2
  88. package/lib/components/Tabs/renderGroupTab.js +5 -5
  89. package/lib/components/Tabs/renderGroupTab.js.map +1 -1
  90. package/lib/components/Tabs/renderTab.d.ts +3 -3
  91. package/lib/components/Tabs/renderTab.js +3 -3
  92. package/lib/components/Tabs/renderTab.js.map +1 -1
  93. package/lib/components/Tabs/tabItemClasses.d.ts +3 -2
  94. package/lib/components/Tabs/tabItemClasses.js +26 -10
  95. package/lib/components/Tabs/tabItemClasses.js.map +1 -1
  96. package/lib/hooks/useLink.js +1 -1
  97. package/lib/hooks/useLink.js.map +1 -1
  98. package/mobile/bundle/bundle.umd.js +143 -135
  99. package/mobile/bundle/bundle.umd.min.js +1 -1
  100. package/mobile/bundle/components/CarouselRecommendationCard/cardStyle.d.ts +1 -0
  101. package/mobile/bundle/components/Tabs/CenteredTabs.d.ts +7 -0
  102. package/mobile/bundle/components/Tabs/LinkTab.d.ts +2 -2
  103. package/mobile/bundle/components/Tabs/TabsContent.d.ts +3 -2
  104. package/mobile/bundle/components/Tabs/renderGroupTab.d.ts +2 -2
  105. package/mobile/bundle/components/Tabs/renderTab.d.ts +3 -3
  106. package/mobile/bundle/components/Tabs/tabItemClasses.d.ts +3 -2
  107. package/mobile/dist/components/Blocks.js +2 -0
  108. package/mobile/dist/components/Blocks.js.map +1 -1
  109. package/mobile/dist/components/CarouselRecommendationCard/CarouselRecommendationCard.js +4 -4
  110. package/mobile/dist/components/CarouselRecommendationCard/CarouselRecommendationCard.js.map +1 -1
  111. package/mobile/dist/components/CarouselRecommendationCard/cardStyle.d.ts +1 -0
  112. package/mobile/dist/components/CarouselRecommendationCard/cardStyle.js +4 -0
  113. package/mobile/dist/components/CarouselRecommendationCard/cardStyle.js.map +1 -0
  114. package/mobile/dist/components/CarouselTariffsCard/getPaddingStyle.js +1 -1
  115. package/mobile/dist/components/CarouselTariffsCard/getPaddingStyle.js.map +1 -1
  116. package/mobile/dist/components/Footer/Footer.js +1 -1
  117. package/mobile/dist/components/Footer/Footer.js.map +1 -1
  118. package/mobile/dist/components/Footer/SocialMedia.js +1 -1
  119. package/mobile/dist/components/Footer/SocialMedia.js.map +1 -1
  120. package/mobile/dist/components/Tabs/CenteredTabs.d.ts +7 -0
  121. package/mobile/dist/components/Tabs/CenteredTabs.js +7 -0
  122. package/mobile/dist/components/Tabs/CenteredTabs.js.map +1 -0
  123. package/mobile/dist/components/Tabs/LinkTab.d.ts +2 -2
  124. package/mobile/dist/components/Tabs/LinkTab.js +2 -2
  125. package/mobile/dist/components/Tabs/LinkTab.js.map +1 -1
  126. package/mobile/dist/components/Tabs/ScrollableTabs.js +3 -9
  127. package/mobile/dist/components/Tabs/ScrollableTabs.js.map +1 -1
  128. package/mobile/dist/components/Tabs/Tabs.js +14 -7
  129. package/mobile/dist/components/Tabs/Tabs.js.map +1 -1
  130. package/mobile/dist/components/Tabs/TabsContent.d.ts +3 -2
  131. package/mobile/dist/components/Tabs/renderGroupTab.d.ts +2 -2
  132. package/mobile/dist/components/Tabs/renderGroupTab.js +4 -4
  133. package/mobile/dist/components/Tabs/renderGroupTab.js.map +1 -1
  134. package/mobile/dist/components/Tabs/renderTab.d.ts +3 -3
  135. package/mobile/dist/components/Tabs/renderTab.js +3 -3
  136. package/mobile/dist/components/Tabs/renderTab.js.map +1 -1
  137. package/mobile/dist/components/Tabs/tabItemClasses.d.ts +3 -2
  138. package/mobile/dist/components/Tabs/tabItemClasses.js +26 -10
  139. package/mobile/dist/components/Tabs/tabItemClasses.js.map +1 -1
  140. package/mobile/dist/hooks/useLink.js +1 -1
  141. package/mobile/dist/hooks/useLink.js.map +1 -1
  142. package/mobile/lib/common.css +1 -1
  143. package/mobile/lib/components/Blocks.js +2 -0
  144. package/mobile/lib/components/Blocks.js.map +1 -1
  145. package/mobile/lib/components/CarouselRecommendationCard/CarouselRecommendationCard.js +4 -4
  146. package/mobile/lib/components/CarouselRecommendationCard/CarouselRecommendationCard.js.map +1 -1
  147. package/mobile/lib/components/CarouselRecommendationCard/cardStyle.d.ts +1 -0
  148. package/mobile/lib/components/CarouselRecommendationCard/cardStyle.js +2 -0
  149. package/mobile/lib/components/CarouselRecommendationCard/cardStyle.js.map +1 -0
  150. package/mobile/lib/components/CarouselTariffsCard/getPaddingStyle.js +1 -1
  151. package/mobile/lib/components/CarouselTariffsCard/getPaddingStyle.js.map +1 -1
  152. package/mobile/lib/components/Footer/Footer.js +1 -1
  153. package/mobile/lib/components/Footer/Footer.js.map +1 -1
  154. package/mobile/lib/components/Footer/SocialMedia.js +1 -1
  155. package/mobile/lib/components/Footer/SocialMedia.js.map +1 -1
  156. package/mobile/lib/components/Tabs/CenteredTabs.d.ts +7 -0
  157. package/mobile/lib/components/Tabs/CenteredTabs.js +5 -0
  158. package/mobile/lib/components/Tabs/CenteredTabs.js.map +1 -0
  159. package/mobile/lib/components/Tabs/LinkTab.d.ts +2 -2
  160. package/mobile/lib/components/Tabs/LinkTab.js +2 -2
  161. package/mobile/lib/components/Tabs/LinkTab.js.map +1 -1
  162. package/mobile/lib/components/Tabs/ScrollableTabs.js +3 -9
  163. package/mobile/lib/components/Tabs/ScrollableTabs.js.map +1 -1
  164. package/mobile/lib/components/Tabs/Tabs.js +14 -7
  165. package/mobile/lib/components/Tabs/Tabs.js.map +1 -1
  166. package/mobile/lib/components/Tabs/TabsContent.d.ts +3 -2
  167. package/mobile/lib/components/Tabs/renderGroupTab.d.ts +2 -2
  168. package/mobile/lib/components/Tabs/renderGroupTab.js +5 -5
  169. package/mobile/lib/components/Tabs/renderGroupTab.js.map +1 -1
  170. package/mobile/lib/components/Tabs/renderTab.d.ts +3 -3
  171. package/mobile/lib/components/Tabs/renderTab.js +3 -3
  172. package/mobile/lib/components/Tabs/renderTab.js.map +1 -1
  173. package/mobile/lib/components/Tabs/tabItemClasses.d.ts +3 -2
  174. package/mobile/lib/components/Tabs/tabItemClasses.js +26 -10
  175. package/mobile/lib/components/Tabs/tabItemClasses.js.map +1 -1
  176. package/mobile/lib/hooks/useLink.js +1 -1
  177. package/mobile/lib/hooks/useLink.js.map +1 -1
  178. package/mobile/src/components/Blocks.ts +2 -0
  179. package/mobile/src/components/CarouselRecommendationCard/CarouselRecommendationCard.tsx +14 -20
  180. package/mobile/src/components/CarouselRecommendationCard/cardStyle.ts +2 -0
  181. package/mobile/src/components/CarouselTariffsCard/getPaddingStyle.tsx +2 -2
  182. package/mobile/src/components/Footer/Footer.tsx +1 -1
  183. package/mobile/src/components/Footer/SocialMedia.tsx +1 -1
  184. package/mobile/src/components/Tabs/CenteredTabs.tsx +12 -0
  185. package/mobile/src/components/Tabs/LinkTab.tsx +5 -5
  186. package/mobile/src/components/Tabs/ScrollableTabs.tsx +5 -13
  187. package/mobile/src/components/Tabs/Tabs.tsx +21 -19
  188. package/mobile/src/components/Tabs/TabsContent.ts +3 -2
  189. package/mobile/src/components/Tabs/renderGroupTab.tsx +11 -10
  190. package/mobile/src/components/Tabs/renderTab.tsx +5 -13
  191. package/mobile/src/components/Tabs/tabItemClasses.ts +28 -10
  192. package/mobile/src/hooks/useLink.ts +1 -1
  193. package/package.json +1 -1
  194. package/src/components/Blocks.mobile.ts +2 -0
  195. package/src/components/CarouselRecommendationCard/CarouselRecommendationCard.fixture.mobile.tsx +148 -0
  196. package/src/components/CarouselRecommendationCard/CarouselRecommendationCard.mobile.tsx +63 -0
  197. package/src/components/CarouselRecommendationCard/CarouselRecommendationCard.tsx +1 -3
  198. package/src/components/CarouselRecommendationCard/cardStyle.ts +2 -0
  199. package/src/components/CarouselTariffsCard/getPaddingStyle.mobile.tsx +2 -2
  200. package/src/components/CarouselTariffsCard/getPaddingStyle.tsx +1 -1
  201. package/src/components/Footer/Footer.mobile.tsx +1 -1
  202. package/src/components/Footer/SocialMedia.mobile.tsx +1 -1
  203. package/src/components/Tabs/CenteredTabs.tsx +12 -0
  204. package/src/components/Tabs/LinkTab.tsx +5 -5
  205. package/src/components/Tabs/ScrollableTabs.tsx +5 -13
  206. package/src/components/Tabs/Tabs.fixture.tsx +27 -0
  207. package/src/components/Tabs/Tabs.tsx +21 -19
  208. package/src/components/Tabs/TabsContent.ts +3 -2
  209. package/src/components/Tabs/renderGroupTab.tsx +11 -10
  210. package/src/components/Tabs/renderTab.tsx +5 -13
  211. package/src/components/Tabs/tabItemClasses.ts +28 -10
  212. package/src/hooks/useLink.ts +1 -1
@@ -556,7 +556,7 @@
556
556
  const { close } = useDialog();
557
557
  return (props) => ({
558
558
  ...props,
559
- href: isRemote ? props.href : adjustHref(router)(props.href, basePath),
559
+ href: isRemote && !basePath ? props.href : adjustHref(router)(props.href, basePath),
560
560
  'aria-label': props.text,
561
561
  onClick: handlerDecorator(handleHref(props), props),
562
562
  });
@@ -1814,7 +1814,7 @@
1814
1814
  visibleItemCount: COLUMNS_FOR_SCROLL,
1815
1815
  });
1816
1816
  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 })
1817
+ ? renderTabs$1({ activeIndex, tabsNav, slideIndexShift, onClick: handleSlideIndexShift })
1818
1818
  : null, renderArrows({
1819
1819
  ...controls,
1820
1820
  btnClass: ['left-3', 'right-3'],
@@ -1837,7 +1837,7 @@
1837
1837
  iconVersion: iconVersion ?? activeIconStyle,
1838
1838
  }, 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
1839
  }
1840
- function renderTabs({ activeIndex, tabsNav, slideIndexShift, onClick }) {
1840
+ function renderTabs$1({ activeIndex, tabsNav, slideIndexShift, onClick }) {
1841
1841
  const CARD_SHIFT = 388;
1842
1842
  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
1843
  tab,
@@ -2351,6 +2351,7 @@
2351
2351
  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
2352
 
2353
2353
  const BORDER_STYLE = 'border border-solid border-gray group-data-secondary:border-white/50 group-data-gray:border-main-divider';
2354
+
2354
2355
  const CarouselRecommendationCard = JSX(({ className = '', description, href, icon, items = [], socialMedia = [], target, title, align = 'text-left', version = 'primary', ...rest }) => {
2355
2356
  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
2357
  });
@@ -2385,7 +2386,7 @@
2385
2386
  return (jsx("div", { ref: containerRef, className: `transition-max-h duration-300 overflow-hidden ${containerRef.current || !isUnfolded ? 'max-h-0' : ''} ${className}`, children: children }));
2386
2387
  });
2387
2388
 
2388
- const getPaddingStyle = (isHighlighting) => isHighlighting ? 'p-8 mt-8 pt-20' : 'p-8 mt-20';
2389
+ const getPaddingStyle = (isHighlighting = false) => isHighlighting ? 'p-8 mt-8 pt-20' : 'p-8 mt-20';
2389
2390
 
2390
2391
  const descriptionSize = 'text-h6';
2391
2392
 
@@ -4424,7 +4425,11 @@
4424
4425
  active: `inline-flex px-4 grow whitespace-nowrap ${LINK_CLASSES} ${SCROLLABLE_ACTIVE_LINK_CLASSES}`,
4425
4426
  default: `inline-flex px-4 grow whitespace-nowrap ${LINK_CLASSES} ${INACTIVE_LINK_CLASSES}`,
4426
4427
  },
4427
- default: {
4428
+ centered: {
4429
+ active: `px-4 rounded-md ${LINK_CLASSES} ${WIDESCREEN_ACTIVE_LINK_CLASSES} whitespace-nowrap`,
4430
+ default: `px-4 rounded-md ${LINK_CLASSES} group/btn bg-transparent whitespace-nowrap`,
4431
+ },
4432
+ wideScreen: {
4428
4433
  active: `${LINK_CLASSES} ${WIDESCREEN_ACTIVE_LINK_CLASSES} whitespace-nowrap`,
4429
4434
  default: `${LINK_CLASSES} ${INACTIVE_LINK_CLASSES} whitespace-nowrap`,
4430
4435
  },
@@ -4434,7 +4439,11 @@
4434
4439
  active: `h-full border-0 border-b-2`,
4435
4440
  default: ``,
4436
4441
  },
4437
- default: {
4442
+ centered: {
4443
+ active: '',
4444
+ default: '',
4445
+ },
4446
+ wideScreen: {
4438
4447
  active: '',
4439
4448
  default: '',
4440
4449
  },
@@ -4446,7 +4455,11 @@
4446
4455
  active: `inline-flex px-4 grow whitespace-nowrap ${LINK_CLASSES} ${SCROLLABLE_ACTIVE_LINK_CLASSES}`,
4447
4456
  default: `inline-flex px-4 grow whitespace-nowrap ${LINK_CLASSES} ${INACTIVE_LINK_CLASSES}`,
4448
4457
  },
4449
- default: {
4458
+ centered: {
4459
+ active: `px-4 rounded-md ${LINK_CLASSES} ${WIDESCREEN_ACTIVE_LINK_CLASSES} whitespace-nowrap`,
4460
+ default: `px-4 rounded-md ${LINK_CLASSES} group/btn bg-transparent whitespace-nowrap`,
4461
+ },
4462
+ wideScreen: {
4450
4463
  active: `${LINK_CLASSES} ${WIDESCREEN_ACTIVE_LINK_CLASSES}`,
4451
4464
  default: `${LINK_CLASSES} ${INACTIVE_LINK_CLASSES}`,
4452
4465
  },
@@ -4456,25 +4469,29 @@
4456
4469
  active: `${TEXT_CLASSES} flex items-center h-full border-0 border-b-2 ${WHITE_ACTIVE_TEXT_CLASSES}`,
4457
4470
  default: `${TEXT_CLASSES} ${INACTIVE_TEXT_CLASSES}`,
4458
4471
  },
4459
- default: {
4472
+ centered: {
4473
+ active: `${TEXT_CLASSES} ${ACTIVE_TEXT_CLASSES}`,
4474
+ default: `${TEXT_CLASSES} ${INACTIVE_TEXT_CLASSES}`,
4475
+ },
4476
+ wideScreen: {
4460
4477
  active: `${TEXT_CLASSES} ${ACTIVE_TEXT_CLASSES}`,
4461
4478
  default: `${TEXT_CLASSES} ${INACTIVE_TEXT_CLASSES}`,
4462
4479
  },
4463
4480
  },
4464
4481
  };
4465
- const getGroupTabClassName = (type, active, isScrollable) => {
4466
- const styleType = isScrollable ? 'scrollable' : 'default';
4482
+ const getGroupTabClassName = (type, active, tabsMode) => {
4467
4483
  const styleActive = active ? 'active' : 'default';
4468
- return GROUP_TAB_CLASSES[type][styleType][styleActive];
4484
+ const mode = tabsMode || 'wideScreen';
4485
+ return GROUP_TAB_CLASSES[type][mode][styleActive];
4469
4486
  };
4470
- const getLinkTabClassName = (type, active, isScrollable) => {
4471
- const styleType = isScrollable ? 'scrollable' : 'default';
4487
+ const getLinkTabClassName = (type, active, tabsMode) => {
4472
4488
  const styleActive = active ? 'active' : 'default';
4473
- return LINK_TAB_CLASSES[type][styleType][styleActive];
4489
+ const mode = tabsMode || 'wideScreen';
4490
+ return LINK_TAB_CLASSES[type][mode][styleActive];
4474
4491
  };
4475
4492
 
4476
4493
  const LinkTab = JSX((props) => {
4477
- const { tab, currentTab, onClick, isScrollable = false } = props;
4494
+ const { tab, currentTab, onClick, tabsMode } = props;
4478
4495
  const active = currentTab?.type === 'link' && currentTab.href === tab.href;
4479
4496
  const link = useLink();
4480
4497
  const adjustedProps = link(tab);
@@ -4482,22 +4499,22 @@
4482
4499
  adjustedProps.onClick(ev);
4483
4500
  onClick(tab);
4484
4501
  };
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 }) }));
4502
+ 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
4503
  });
4487
4504
 
4488
4505
  const BADGE_CLASSES = 'min-w-[22px] h-[22px] rounded-full text-xs ml-2 flex justify-center items-center';
4489
4506
  const ACTIVE_BADGE_CLASSES = 'bg-white/30 text-white';
4490
4507
  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) => {
4508
+ const renderGroupTab = ({ page, currentTab, showCounter, onClick, tabsMode }) => (tab, i) => {
4492
4509
  const active = currentTab === tab;
4493
4510
  const count = tab.ref && page?.blocks
4494
4511
  ? page.blocks.filter((block) => block?.labels?.includes(tab.ref)).length
4495
4512
  : 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)}`));
4513
+ 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
4514
  };
4498
- const renderTitle$1 = (title, active, isScrollable) => {
4515
+ const renderTitle$1 = (title, active, tabsMode) => {
4499
4516
  const activeClassName = active ? WHITE_ACTIVE_TEXT_CLASSES : INACTIVE_TEXT_CLASSES;
4500
- const titleClassName = isScrollable
4517
+ const titleClassName = tabsMode === 'scrollable'
4501
4518
  ? `${TEXT_CLASSES} ${activeClassName}`
4502
4519
  : `${TEXT_CLASSES} ${active ? ACTIVE_TEXT_CLASSES : INACTIVE_TEXT_CLASSES}`;
4503
4520
  return title ? jsx("h3", { className: titleClassName, children: title }) : null;
@@ -4506,16 +4523,16 @@
4506
4523
  return showCounter && count ? (jsx("div", { className: `${BADGE_CLASSES} ${active ? ACTIVE_BADGE_CLASSES : INACTIVE_BADGE_CLASSES}`, children: count })) : null;
4507
4524
  };
4508
4525
 
4509
- const renderTab = ({ page, currentTab, showCounter, onClick, isScrollable = false }) => (tab, i) => {
4526
+ const renderTab = ({ page, showCounter, ...rest }) => (tab, i) => {
4510
4527
  const type = tab.type;
4511
4528
  if (!(type === 'group' || type === 'link')) {
4512
4529
  return null;
4513
4530
  }
4514
4531
  switch (type) {
4515
4532
  case 'group':
4516
- return renderGroupTab({ page, currentTab, showCounter, onClick, isScrollable })(tab, i);
4533
+ return renderGroupTab({ page, showCounter, ...rest })(tab, i);
4517
4534
  case 'link': {
4518
- return (jsx(LinkTab, { tab: tab, currentTab: currentTab, isScrollable: isScrollable, onClick: onClick }, String(i)));
4535
+ return jsx(LinkTab, { tab: tab, ...rest }, String(i));
4519
4536
  }
4520
4537
  default:
4521
4538
  assertUnreachable(type);
@@ -4523,24 +4540,20 @@
4523
4540
  return null;
4524
4541
  };
4525
4542
 
4543
+ const CenteredTabs = JSX(({ tabs, ...rest }) => (jsx("div", { className: "flex p-1 m-auto bg-main-gray rounded-md", children: tabs?.map(renderTab({ ...rest })) })));
4544
+
4526
4545
  const scrollButtonStyle = 'absolute z-40 top-0';
4527
4546
  const ScrollableTabs = JSX((props) => {
4528
- const { tabs, onClick, currentTab, page, showCounter } = props;
4547
+ const { tabs, ...rest } = props;
4529
4548
  const [containerRef, scroll] = useSwipeListScroll({
4530
4549
  itemCount: tabs?.length || 0,
4531
4550
  isCyclic: false,
4532
4551
  });
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] }));
4552
+ 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
4553
  });
4541
4554
 
4542
4555
  const Tabs = JSX((props) => {
4543
- const { className = '', tabs, showCounter, isSticky, tabsMode, ...rest } = props;
4556
+ const { className = '', tabs, isSticky, ...rest } = props;
4544
4557
  const [currentTab, setCurrentTab] = useState(tabs ? tabs[0] : undefined);
4545
4558
  useEffect(() => {
4546
4559
  if (!tabs || !tabs[0]) {
@@ -4557,13 +4570,19 @@
4557
4570
  fireTabEvent(selectedTab);
4558
4571
  setCurrentTab(selectedTab);
4559
4572
  }, []);
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
- });
4573
+ 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 }) }));
4574
+ });
4575
+ const renderTabs = ({ tabsMode, tabs, ...rest }) => {
4576
+ switch (tabsMode) {
4577
+ case 'wideScreen':
4578
+ return tabs?.map(renderTab({ tabsMode, ...rest }));
4579
+ case 'centered':
4580
+ return jsx(CenteredTabs, { tabs: tabs, tabsMode: tabsMode, ...rest });
4581
+ case 'scrollable':
4582
+ return jsx(ScrollableTabs, { tabs: tabs, tabsMode: tabsMode, ...rest });
4583
+ }
4584
+ return null;
4585
+ };
4567
4586
  const fireTabEvent = (tab) => {
4568
4587
  if (tab.type === 'group') {
4569
4588
  defaultEventBus.fire('tab', { type: tab.type, label: tab.ref });
@@ -5006,7 +5025,7 @@
5006
5025
  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
5026
  }
5008
5027
 
5009
- const packageVersion = "0.10.7";
5028
+ const packageVersion = "0.10.8";
5010
5029
 
5011
5030
  exports.Blocks = Blocks;
5012
5031
  exports.ContentPage = ContentPage;