@redneckz/wildless-cms-uni-blocks 0.14.533 → 0.14.535

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 (207) hide show
  1. package/bin/migration-scripts/0.14.530.js +38 -0
  2. package/bundle/blocks.schema.json +1 -1
  3. package/bundle/bundle.umd.js +85 -47
  4. package/bundle/bundle.umd.min.js +1 -1
  5. package/bundle/components/Carousel/CarouselContent.d.ts +2 -0
  6. package/bundle/components/Carousel/renderCarouselCards.d.ts +2 -1
  7. package/bundle/components/ProductBlock/ProductBlockContent.d.ts +2 -1
  8. package/bundle/components/StepsBlock/StepsBlockContent.d.ts +1 -2
  9. package/bundle/ui-kit/SwipeListControl/NavButtonProp.d.ts +9 -0
  10. package/bundle/ui-kit/SwipeListControl/SwipeListControl.d.ts +2 -0
  11. package/bundle/ui-kit/SwipeListControl/SwipeListDots.d.ts +8 -3
  12. package/bundle/ui-kit/SwipeListControl/SwipeListScrollButtons.d.ts +1 -0
  13. package/bundle/ui-kit/SwipeListControl/renderDotButton.d.ts +3 -0
  14. package/bundle/ui-kit/SwipeListControl/renderNavButton.d.ts +3 -0
  15. package/dist/components/Carousel/Carousel.js +8 -3
  16. package/dist/components/Carousel/Carousel.js.map +1 -1
  17. package/dist/components/Carousel/CarouselContent.d.ts +2 -0
  18. package/dist/components/Carousel/renderCarouselCards.d.ts +2 -1
  19. package/dist/components/Carousel/renderCarouselCards.js +3 -1
  20. package/dist/components/Carousel/renderCarouselCards.js.map +1 -1
  21. package/dist/components/ProductBlock/ProductBlock.js +1 -1
  22. package/dist/components/ProductBlock/ProductBlock.js.map +1 -1
  23. package/dist/components/ProductBlock/ProductBlockContent.d.ts +2 -1
  24. package/dist/components/StepsBlock/StepsBlockContent.d.ts +1 -2
  25. package/dist/components/StepsBlock/renderStep.js.map +1 -1
  26. package/dist/components/StepsBlock/renderStepMobile.js +6 -19
  27. package/dist/components/StepsBlock/renderStepMobile.js.map +1 -1
  28. package/dist/ui-kit/LinkButton/ButtonInner.js +2 -2
  29. package/dist/ui-kit/LinkButton/ButtonInner.js.map +1 -1
  30. package/dist/ui-kit/SwipeListControl/NavButtonProp.d.ts +9 -0
  31. package/dist/ui-kit/SwipeListControl/NavButtonProp.js +2 -0
  32. package/dist/ui-kit/SwipeListControl/NavButtonProp.js.map +1 -0
  33. package/dist/ui-kit/SwipeListControl/SwipeListControl.d.ts +2 -0
  34. package/dist/ui-kit/SwipeListControl/SwipeListControl.js +2 -2
  35. package/dist/ui-kit/SwipeListControl/SwipeListControl.js.map +1 -1
  36. package/dist/ui-kit/SwipeListControl/SwipeListDots.d.ts +8 -3
  37. package/dist/ui-kit/SwipeListControl/SwipeListDots.js +32 -16
  38. package/dist/ui-kit/SwipeListControl/SwipeListDots.js.map +1 -1
  39. package/dist/ui-kit/SwipeListControl/SwipeListScrollButtons.d.ts +1 -0
  40. package/dist/ui-kit/SwipeListControl/SwipeListScrollButtons.js +4 -3
  41. package/dist/ui-kit/SwipeListControl/SwipeListScrollButtons.js.map +1 -1
  42. package/dist/ui-kit/SwipeListControl/renderDotButton.d.ts +3 -0
  43. package/dist/ui-kit/SwipeListControl/renderDotButton.js +13 -0
  44. package/dist/ui-kit/SwipeListControl/renderDotButton.js.map +1 -0
  45. package/dist/ui-kit/SwipeListControl/renderNavButton.d.ts +3 -0
  46. package/dist/ui-kit/SwipeListControl/renderNavButton.js +17 -0
  47. package/dist/ui-kit/SwipeListControl/renderNavButton.js.map +1 -0
  48. package/dist/ui-kit/SwipeListControl/useSwipeListScroll.js +1 -1
  49. package/dist/ui-kit/SwipeListControl/useSwipeListScroll.js.map +1 -1
  50. package/lib/common.css +1 -1
  51. package/lib/components/Carousel/Carousel.fixture.d.ts +1 -0
  52. package/lib/components/Carousel/Carousel.fixture.mobile.d.ts +1 -0
  53. package/lib/components/Carousel/Carousel.js +8 -3
  54. package/lib/components/Carousel/Carousel.js.map +1 -1
  55. package/lib/components/Carousel/CarouselContent.d.ts +2 -0
  56. package/lib/components/Carousel/renderCarouselCards.d.ts +2 -1
  57. package/lib/components/Carousel/renderCarouselCards.js +3 -1
  58. package/lib/components/Carousel/renderCarouselCards.js.map +1 -1
  59. package/lib/components/ProductBlock/ProductBlock.js +1 -1
  60. package/lib/components/ProductBlock/ProductBlock.js.map +1 -1
  61. package/lib/components/ProductBlock/ProductBlockContent.d.ts +2 -1
  62. package/lib/components/StepsBlock/StepsBlockContent.d.ts +1 -2
  63. package/lib/components/StepsBlock/renderStep.js.map +1 -1
  64. package/lib/components/StepsBlock/renderStepMobile.js +6 -19
  65. package/lib/components/StepsBlock/renderStepMobile.js.map +1 -1
  66. package/lib/ui-kit/LinkButton/ButtonInner.js +2 -2
  67. package/lib/ui-kit/LinkButton/ButtonInner.js.map +1 -1
  68. package/lib/ui-kit/SwipeListControl/NavButtonProp.d.ts +9 -0
  69. package/lib/ui-kit/SwipeListControl/NavButtonProp.js +2 -0
  70. package/lib/ui-kit/SwipeListControl/NavButtonProp.js.map +1 -0
  71. package/lib/ui-kit/SwipeListControl/SwipeListControl.d.ts +2 -0
  72. package/lib/ui-kit/SwipeListControl/SwipeListControl.js +2 -2
  73. package/lib/ui-kit/SwipeListControl/SwipeListControl.js.map +1 -1
  74. package/lib/ui-kit/SwipeListControl/SwipeListDots.d.ts +8 -3
  75. package/lib/ui-kit/SwipeListControl/SwipeListDots.js +32 -16
  76. package/lib/ui-kit/SwipeListControl/SwipeListDots.js.map +1 -1
  77. package/lib/ui-kit/SwipeListControl/SwipeListScrollButtons.d.ts +1 -0
  78. package/lib/ui-kit/SwipeListControl/SwipeListScrollButtons.js +4 -3
  79. package/lib/ui-kit/SwipeListControl/SwipeListScrollButtons.js.map +1 -1
  80. package/lib/ui-kit/SwipeListControl/renderDotButton.d.ts +2 -0
  81. package/lib/ui-kit/SwipeListControl/renderDotButton.js +10 -0
  82. package/lib/ui-kit/SwipeListControl/renderDotButton.js.map +1 -0
  83. package/lib/ui-kit/SwipeListControl/renderNavButton.d.ts +2 -0
  84. package/lib/ui-kit/SwipeListControl/renderNavButton.js +14 -0
  85. package/lib/ui-kit/SwipeListControl/renderNavButton.js.map +1 -0
  86. package/lib/ui-kit/SwipeListControl/useSwipeListScroll.js +1 -1
  87. package/lib/ui-kit/SwipeListControl/useSwipeListScroll.js.map +1 -1
  88. package/mobile/bundle/bundle.umd.js +91 -66
  89. package/mobile/bundle/bundle.umd.min.js +1 -1
  90. package/mobile/bundle/components/Carousel/CarouselContent.d.ts +2 -0
  91. package/mobile/bundle/components/Carousel/renderCarouselCards.d.ts +2 -1
  92. package/mobile/bundle/components/ProductBlock/ProductBlockContent.d.ts +2 -1
  93. package/mobile/bundle/components/StepsBlock/StepsBlockContent.d.ts +1 -2
  94. package/mobile/bundle/ui-kit/SwipeListControl/NavButtonProp.d.ts +9 -0
  95. package/mobile/bundle/ui-kit/SwipeListControl/SwipeListControl.d.ts +2 -0
  96. package/mobile/bundle/ui-kit/SwipeListControl/SwipeListDots.d.ts +8 -3
  97. package/mobile/bundle/ui-kit/SwipeListControl/SwipeListScrollButtons.d.ts +1 -0
  98. package/mobile/bundle/ui-kit/SwipeListControl/renderDotButton.d.ts +3 -0
  99. package/mobile/bundle/ui-kit/SwipeListControl/renderNavButton.d.ts +3 -0
  100. package/mobile/dist/components/Carousel/Carousel.js +8 -3
  101. package/mobile/dist/components/Carousel/Carousel.js.map +1 -1
  102. package/mobile/dist/components/Carousel/CarouselContent.d.ts +2 -0
  103. package/mobile/dist/components/Carousel/renderCarouselCards.d.ts +2 -1
  104. package/mobile/dist/components/Carousel/renderCarouselCards.js +3 -1
  105. package/mobile/dist/components/Carousel/renderCarouselCards.js.map +1 -1
  106. package/mobile/dist/components/ProductBlock/ProductBlock.js +1 -1
  107. package/mobile/dist/components/ProductBlock/ProductBlock.js.map +1 -1
  108. package/mobile/dist/components/ProductBlock/ProductBlockContent.d.ts +2 -1
  109. package/mobile/dist/components/StepsBlock/StepsBlockContent.d.ts +1 -2
  110. package/mobile/dist/components/StepsBlock/renderStep.js.map +1 -1
  111. package/mobile/dist/components/StepsBlock/renderStepMobile.js +6 -19
  112. package/mobile/dist/components/StepsBlock/renderStepMobile.js.map +1 -1
  113. package/mobile/dist/ui-kit/LinkButton/ButtonInner.js +2 -2
  114. package/mobile/dist/ui-kit/LinkButton/ButtonInner.js.map +1 -1
  115. package/mobile/dist/ui-kit/SwipeListControl/NavButtonProp.d.ts +9 -0
  116. package/mobile/dist/ui-kit/SwipeListControl/NavButtonProp.js +2 -0
  117. package/mobile/dist/ui-kit/SwipeListControl/NavButtonProp.js.map +1 -0
  118. package/mobile/dist/ui-kit/SwipeListControl/SwipeListControl.d.ts +2 -0
  119. package/mobile/dist/ui-kit/SwipeListControl/SwipeListControl.js +2 -2
  120. package/mobile/dist/ui-kit/SwipeListControl/SwipeListControl.js.map +1 -1
  121. package/mobile/dist/ui-kit/SwipeListControl/SwipeListDots.d.ts +8 -3
  122. package/mobile/dist/ui-kit/SwipeListControl/SwipeListDots.js +32 -16
  123. package/mobile/dist/ui-kit/SwipeListControl/SwipeListDots.js.map +1 -1
  124. package/mobile/dist/ui-kit/SwipeListControl/SwipeListScrollButtons.d.ts +1 -0
  125. package/mobile/dist/ui-kit/SwipeListControl/SwipeListScrollButtons.js +4 -3
  126. package/mobile/dist/ui-kit/SwipeListControl/SwipeListScrollButtons.js.map +1 -1
  127. package/mobile/dist/ui-kit/SwipeListControl/renderDotButton.d.ts +3 -0
  128. package/mobile/dist/ui-kit/SwipeListControl/renderDotButton.js +13 -0
  129. package/mobile/dist/ui-kit/SwipeListControl/renderDotButton.js.map +1 -0
  130. package/mobile/dist/ui-kit/SwipeListControl/renderNavButton.d.ts +3 -0
  131. package/mobile/dist/ui-kit/SwipeListControl/renderNavButton.js +17 -0
  132. package/mobile/dist/ui-kit/SwipeListControl/renderNavButton.js.map +1 -0
  133. package/mobile/dist/ui-kit/SwipeListControl/useSwipeListScroll.js +1 -1
  134. package/mobile/dist/ui-kit/SwipeListControl/useSwipeListScroll.js.map +1 -1
  135. package/mobile/lib/common.css +1 -1
  136. package/mobile/lib/components/Carousel/Carousel.js +8 -3
  137. package/mobile/lib/components/Carousel/Carousel.js.map +1 -1
  138. package/mobile/lib/components/Carousel/CarouselContent.d.ts +2 -0
  139. package/mobile/lib/components/Carousel/renderCarouselCards.d.ts +2 -1
  140. package/mobile/lib/components/Carousel/renderCarouselCards.js +3 -1
  141. package/mobile/lib/components/Carousel/renderCarouselCards.js.map +1 -1
  142. package/mobile/lib/components/ProductBlock/ProductBlock.js +1 -1
  143. package/mobile/lib/components/ProductBlock/ProductBlock.js.map +1 -1
  144. package/mobile/lib/components/ProductBlock/ProductBlockContent.d.ts +2 -1
  145. package/mobile/lib/components/StepsBlock/StepsBlockContent.d.ts +1 -2
  146. package/mobile/lib/components/StepsBlock/renderStep.js.map +1 -1
  147. package/mobile/lib/components/StepsBlock/renderStepMobile.js +6 -19
  148. package/mobile/lib/components/StepsBlock/renderStepMobile.js.map +1 -1
  149. package/mobile/lib/ui-kit/LinkButton/ButtonInner.js +2 -2
  150. package/mobile/lib/ui-kit/LinkButton/ButtonInner.js.map +1 -1
  151. package/mobile/lib/ui-kit/SwipeListControl/NavButtonProp.d.ts +9 -0
  152. package/mobile/lib/ui-kit/SwipeListControl/NavButtonProp.js +2 -0
  153. package/mobile/lib/ui-kit/SwipeListControl/NavButtonProp.js.map +1 -0
  154. package/mobile/lib/ui-kit/SwipeListControl/SwipeListControl.d.ts +2 -0
  155. package/mobile/lib/ui-kit/SwipeListControl/SwipeListControl.js +2 -2
  156. package/mobile/lib/ui-kit/SwipeListControl/SwipeListControl.js.map +1 -1
  157. package/mobile/lib/ui-kit/SwipeListControl/SwipeListDots.d.ts +8 -3
  158. package/mobile/lib/ui-kit/SwipeListControl/SwipeListDots.js +32 -16
  159. package/mobile/lib/ui-kit/SwipeListControl/SwipeListDots.js.map +1 -1
  160. package/mobile/lib/ui-kit/SwipeListControl/SwipeListScrollButtons.d.ts +1 -0
  161. package/mobile/lib/ui-kit/SwipeListControl/SwipeListScrollButtons.js +4 -3
  162. package/mobile/lib/ui-kit/SwipeListControl/SwipeListScrollButtons.js.map +1 -1
  163. package/mobile/lib/ui-kit/SwipeListControl/renderDotButton.d.ts +3 -0
  164. package/mobile/lib/ui-kit/SwipeListControl/renderDotButton.js +10 -0
  165. package/mobile/lib/ui-kit/SwipeListControl/renderDotButton.js.map +1 -0
  166. package/mobile/lib/ui-kit/SwipeListControl/renderNavButton.d.ts +3 -0
  167. package/mobile/lib/ui-kit/SwipeListControl/renderNavButton.js +14 -0
  168. package/mobile/lib/ui-kit/SwipeListControl/renderNavButton.js.map +1 -0
  169. package/mobile/lib/ui-kit/SwipeListControl/useSwipeListScroll.js +1 -1
  170. package/mobile/lib/ui-kit/SwipeListControl/useSwipeListScroll.js.map +1 -1
  171. package/mobile/src/components/Carousel/Carousel.tsx +28 -17
  172. package/mobile/src/components/Carousel/CarouselContent.ts +2 -0
  173. package/mobile/src/components/Carousel/renderCarouselCards.tsx +8 -1
  174. package/mobile/src/components/ProductBlock/ProductBlock.tsx +7 -2
  175. package/mobile/src/components/ProductBlock/ProductBlockContent.ts +3 -1
  176. package/mobile/src/components/StepsBlock/StepsBlockContent.ts +0 -2
  177. package/mobile/src/components/StepsBlock/renderStep.tsx +1 -2
  178. package/mobile/src/components/StepsBlock/renderStepMobile.tsx +16 -38
  179. package/mobile/src/ui-kit/LinkButton/ButtonInner.tsx +2 -2
  180. package/mobile/src/ui-kit/SwipeListControl/NavButtonProp.ts +11 -0
  181. package/mobile/src/ui-kit/SwipeListControl/SwipeListControl.tsx +7 -1
  182. package/mobile/src/ui-kit/SwipeListControl/SwipeListDots.tsx +69 -46
  183. package/mobile/src/ui-kit/SwipeListControl/SwipeListScrollButtons.tsx +9 -5
  184. package/mobile/src/ui-kit/SwipeListControl/renderDotButton.tsx +29 -0
  185. package/mobile/src/ui-kit/SwipeListControl/renderNavButton.tsx +33 -0
  186. package/mobile/src/ui-kit/SwipeListControl/useSwipeListScroll.ts +1 -1
  187. package/package.json +2 -2
  188. package/src/components/Carousel/Carousel.fixture.mobile.tsx +57 -0
  189. package/src/components/Carousel/Carousel.fixture.tsx +56 -0
  190. package/src/components/Carousel/Carousel.tsx +28 -17
  191. package/src/components/Carousel/CarouselContent.ts +2 -0
  192. package/src/components/Carousel/renderCarouselCards.tsx +8 -1
  193. package/src/components/ProductBlock/ProductBlock.tsx +7 -2
  194. package/src/components/ProductBlock/ProductBlockContent.ts +3 -1
  195. package/src/components/ProductGallery/ProductGallery.fixture.tsx +17 -84
  196. package/src/components/StepsBlock/StepsBlock.fixture.mobile.tsx +0 -8
  197. package/src/components/StepsBlock/StepsBlockContent.ts +0 -2
  198. package/src/components/StepsBlock/renderStep.tsx +1 -2
  199. package/src/components/StepsBlock/renderStepMobile.tsx +16 -38
  200. package/src/ui-kit/LinkButton/ButtonInner.tsx +2 -2
  201. package/src/ui-kit/SwipeListControl/NavButtonProp.ts +11 -0
  202. package/src/ui-kit/SwipeListControl/SwipeListControl.tsx +7 -1
  203. package/src/ui-kit/SwipeListControl/SwipeListDots.tsx +69 -46
  204. package/src/ui-kit/SwipeListControl/SwipeListScrollButtons.tsx +9 -5
  205. package/src/ui-kit/SwipeListControl/renderDotButton.tsx +29 -0
  206. package/src/ui-kit/SwipeListControl/renderNavButton.tsx +33 -0
  207. package/src/ui-kit/SwipeListControl/useSwipeListScroll.ts +1 -1
@@ -412,7 +412,7 @@
412
412
  '': '',
413
413
  };
414
414
  /** @deprecated */
415
- const buttonStyle = 'text-center font-sans select-none';
415
+ const buttonStyle$2 = 'text-center font-sans select-none';
416
416
  /** @deprecated */
417
417
  const iconStyleMap = {
418
418
  primary: 'group-hover/btn:brightness-0 group-hover/btn:invert',
@@ -426,7 +426,7 @@
426
426
 
427
427
  /** @deprecated */
428
428
  const getRegularButtonClasses = ({ className, rounded, version, }) => [
429
- buttonStyle,
429
+ buttonStyle$2,
430
430
  'border border-transparent inline-block cursor-pointer no-underline focus:border-primary-text focus:border h-fit',
431
431
  version ? buttonStyleMap$1[version] : '',
432
432
  rounded ? 'rounded-full' : 'rounded-md',
@@ -527,9 +527,9 @@
527
527
  const ButtonInner = JSX((props) => {
528
528
  const { text, aboveText, appendLeft, appendRight, version = 'primary' } = props;
529
529
  const iconHideStyle = isWithText(props) ? 'hidden lg:block' : '';
530
- return (jsxs("div", { className: style(getButtonStyle(props), 'flex gap-xs'), children: [appendLeft ? (jsx("div", { className: style(iconHideStyle, iconStyleMap[version]), children: appendLeft })) : null, isWithText(props) ? (jsxs("div", { className: "whitespace-pre", children: [aboveText ? jsx("div", { className: "text-xs font-light text-left", children: aboveText }) : null, jsx("div", { className: `text-left ${aboveText ? 'text-s -mt-3xs' : 'text-l'}`, children: text })] })) : null, appendRight ? (jsx("div", { className: style(iconHideStyle, iconStyleMap[version]), children: appendRight })) : null] }));
530
+ return (jsxs("div", { className: style(buttonStyle$1(props), 'flex gap-xs'), children: [appendLeft ? (jsx("div", { className: style(iconHideStyle, iconStyleMap[version]), children: appendLeft })) : null, isWithText(props) ? (jsxs("div", { className: "whitespace-pre", children: [aboveText ? jsx("div", { className: "text-xs font-light text-left", children: aboveText }) : null, jsx("div", { className: `text-left ${aboveText ? 'text-s -mt-3xs' : 'text-l'}`, children: text })] })) : null, appendRight ? (jsx("div", { className: style(iconHideStyle, iconStyleMap[version]), children: appendRight })) : null] }));
531
531
  });
532
- const getButtonStyle = (props) => {
532
+ const buttonStyle$1 = (props) => {
533
533
  const { version, aboveText, rounded } = props;
534
534
  if (version === 'link') {
535
535
  return '';
@@ -544,7 +544,7 @@
544
544
  /** @deprecated */
545
545
  const getDisabledButtonClasses = ({ className, rounded, version, }) => [
546
546
  'inline-block',
547
- buttonStyle,
547
+ buttonStyle$2,
548
548
  version ? buttonDisabledStyleMap[version] : '',
549
549
  rounded ? 'rounded-full' : 'rounded-md',
550
550
  className,
@@ -873,7 +873,7 @@
873
873
  return OutputComponent;
874
874
  }
875
875
 
876
- const ProductBlock = UniBlock(({ className, padding, ...rest }) => (jsx(BlockWrapper, { className: style('overflow-hidden flex flex-col gap-3xl box-border', className), padding: "p-0", ...rest, children: jsx(BaseProductTile, { defaultPadding: "p-6xl", padding: padding, className: "grow h-full", ...rest }) })), { childrenTypes: ['UnitBlock'] });
876
+ const ProductBlock = UniBlock(({ className, padding, defaultPadding, ...rest }) => (jsx(BlockWrapper, { className: style('overflow-hidden flex flex-col gap-3xl box-border', className), padding: "p-0", ...rest, children: jsx(BaseProductTile, { defaultPadding: defaultPadding || 'p-6xl', padding: padding, className: "grow h-full", ...rest }) })), { childrenTypes: ['UnitBlock'] });
877
877
 
878
878
  const AdTile = JSX((props) => {
879
879
  const { items } = (props.options?.page?.adSourceBook ?? {});
@@ -2123,46 +2123,25 @@
2123
2123
  .filter(([_]) => _ && _.intersectionRatio >= 0.9)
2124
2124
  .map(([, i]) => i);
2125
2125
 
2126
- const containerStyles = {
2127
- 'horizontal-list': 'mx-auto mt-lg w-fit',
2128
- 'vertical-list': 'absolute flex-col justify-center h-full top-0 left-4',
2129
- };
2130
2126
  const activeDotStyles = {
2131
2127
  'horizontal-list': 'w-6',
2132
2128
  'vertical-list': 'h-6',
2133
2129
  };
2134
2130
  const dotStyle = 'cursor-pointer rounded-full transition-width duration-300 bg-primary-main group-data-secondary:bg-white';
2135
2131
  const inactiveDotStyle = 'w-2 h-2 opacity-30';
2136
- const SwipeListDots = JSX(({ className = '', containerRef, activeIndex, dotCount = 0, listType = 'horizontal-list', version, }) => {
2137
- const handleClick = (idx) => {
2138
- if (idx !== activeIndex && containerRef?.current) {
2139
- containerRef.current.children[idx]?.scrollIntoView({
2140
- behavior: 'smooth',
2141
- block: 'nearest',
2142
- });
2143
- }
2144
- };
2145
- return dotCount ? (jsx("div", { className: style('flex gap-xs', containerStyles[listType], version ? 'group' : '', className), "data-ver": version, children: Array.from({ length: dotCount })
2146
- .fill(null)
2147
- .map((_, idx) => (jsx("div", { className: `${dotStyle} ${idx === activeIndex ? activeDotStyles[listType] : inactiveDotStyle}`, role: "button", "aria-hidden": true, onClick: () => handleClick(idx) }, String(idx)))) })) : null;
2148
- });
2132
+ const renderDotButton = ({ activeIndex, onClick, listType = 'horizontal-list' }) => (_, idx) => (jsx("div", { className: style(dotStyle, idx === activeIndex ? activeDotStyles[listType] : inactiveDotStyle), role: "button", "aria-hidden": true, onClick: () => onClick(idx) }, String(idx)));
2149
2133
 
2150
- /** @deprecated */
2151
- const ArrowButton = JSX(({ className, disabled, ...rest }) => (jsx(LinkButton, { rounded: true, className: style('group/btn w-12 h-12 min-h-12 max-h-12 flex items-center justify-center shadow-main-black', disabled
2152
- ? 'bg-secondary-light text-secondary-text'
2153
- : 'bg-white text-primary-text hover:text-primary-main', className || ''), disabled: disabled, ...rest, children: jsx(Img, { className: "w-4 h-4 min-w-4 min-h-4 rounded-full box-border", image: { icon: 'ArrowLeftIcon', iconVersion: 'black' }, imageClassName: "group-hover/btn:text-primary-main", width: "16", height: "16" }) })));
2154
- /** @deprecated */
2155
- const ScrollLeftButton = JSX((props) => (jsx(ArrowButton, { ...props, ariaLabel: "\u041F\u0440\u043E\u043B\u0438\u0441\u0442\u0430\u0442\u044C \u0432\u043B\u0435\u0432\u043E", "data-block-control": "scroll-left" })));
2156
- /** @deprecated */
2157
- const ScrollRightButton = JSX((props) => (jsx(ArrowButton, { ...props, className: `${props.className || ''} rotate-180`, ariaLabel: "\u041F\u0440\u043E\u043B\u0438\u0441\u0442\u0430\u0442\u044C \u0432\u043F\u0440\u0430\u0432\u043E", "data-block-control": "scroll-right" })));
2158
-
2159
- const scrollButtonStyle$2 = 'absolute top-[calc(50%-24px)] z-40';
2160
- const blurBaseStyle = 'absolute top-0 bottom-0 z-40 hidden @lg:block w-20 pointer-events-none';
2161
- const SwipeListScrollButtons = JSX(({ className, scroll, hasBlur, arrowsPadded }) => {
2162
- const { canScrollLeft, canScrollRight, scrollLeft, scrollRight } = scroll;
2163
- return (jsxs("div", { className: style(className), children: [hasBlur ? renderBlur(scroll) : null, canScrollLeft ? (jsx(ScrollLeftButton, { className: style(scrollButtonStyle$2, arrowsPadded ? 'left-1' : 'left-0'), onClick: scrollLeft })) : null, canScrollRight ? (jsx(ScrollRightButton, { className: style(scrollButtonStyle$2, arrowsPadded ? 'right-1' : 'right-0'), onClick: scrollRight })) : null] }));
2164
- });
2165
- const renderBlur = (scroll) => (jsxs("div", { children: [scroll.canScrollLeft ? (jsx("div", { className: style(blurBaseStyle, 'left-0 bg-opacity-from-white group-data-secondary:bg-none') })) : null, scroll.canScrollRight ? (jsx("div", { className: style(blurBaseStyle, 'right-0 bg-opacity-to-white group-data-secondary:bg-none') })) : null] }));
2134
+ const renderNavButton$3 = ({ activeIndex, onClick }) => (nav, i) => {
2135
+ const isActive = i === activeIndex;
2136
+ const btnClassName = isActive
2137
+ ? 'min-w-[350px] bg-white shadow-dark-blue border-none p-6'
2138
+ : 'min-w-72 ease-in duration-300 bg-white/10 px-xl py-lg hover:backdrop-blur';
2139
+ const btnTitleClassName = isActive
2140
+ ? 'text-primary-text text-h6 py-xs'
2141
+ : 'text-l pb-2xs text-secondary-text group-data-secondary:text-white';
2142
+ const btnDescClassName = isActive ? 'text-l' : 'text-m group-data-secondary:text-white/80';
2143
+ return (jsxs("button", { type: "button", onClick: () => onClick(i), "aria-label": nav?.title, className: style('max-h-28 mt-xs ml-xs relative px-xl box-border overflow-hidden text-left grow basis-0 border border-gray group-data-secondary:border-white/50 whitespace-nowrap', btnClassName), children: [jsx("div", { className: btnTitleClassName, children: nav?.title }), jsx("div", { className: style('text-secondary-text font-light', btnDescClassName), children: nav?.description })] }, String(i)));
2144
+ };
2166
2145
 
2167
2146
  const areArraysEqual = (as, bs) => as === bs || Boolean(as && bs && as?.length === bs?.length && as.every((_, i) => _ === bs[i]));
2168
2147
 
@@ -2192,7 +2171,7 @@
2192
2171
  const handleVisibleIndicesChange = useCallback((indices) => {
2193
2172
  setVisibleIndices((prevIndices) => areArraysEqual(prevIndices, indices) ? prevIndices : indices);
2194
2173
  onVisibleIndicesChange && onVisibleIndicesChange(indices);
2195
- }, [itemCount]);
2174
+ }, [onVisibleIndicesChange]);
2196
2175
  const [minIndex, maxIndex] = visibleIndices.length
2197
2176
  ? [minBy()(visibleIndices), maxBy()(visibleIndices)]
2198
2177
  : [-1, -1];
@@ -2243,6 +2222,58 @@
2243
2222
  ];
2244
2223
  };
2245
2224
 
2225
+ const containerStyles = {
2226
+ 'horizontal-list': 'mx-auto mt-lg w-fit',
2227
+ 'vertical-list': 'absolute flex-col justify-center h-full top-0 left-4',
2228
+ };
2229
+ const SwipeListDots = JSX(({ className = '', activeIndex = 0, dotCount = 0, listType = 'horizontal-list', version, navButtons = [], containerRef, containerScroll, }) => {
2230
+ const isMobileMode = useMobileMode();
2231
+ const [navRef, navScroll] = useSwipeListScroll({
2232
+ itemCount: navButtons.length,
2233
+ });
2234
+ const scrollOption = getOptions(Boolean(navButtons?.length));
2235
+ useEffect(() => {
2236
+ if (navButtons?.length && activeIndex >= 0 && navRef?.current) {
2237
+ navScroll.scrollTo(activeIndex, scrollOption);
2238
+ }
2239
+ }, [activeIndex]);
2240
+ const onChangeActiveIndex = useCallback((idx) => {
2241
+ if (idx !== activeIndex && containerRef?.current) {
2242
+ containerScroll?.scrollTo(idx, scrollOption);
2243
+ }
2244
+ }, [containerRef?.current]);
2245
+ if (navButtons?.length && !isMobileMode) {
2246
+ return (jsx(SwipeListContainer, { containerRef: navRef, snapAlign: "snap-start", itemClassName: "h-36 flex items-stretch w-screen", gap: 8, children: navButtons.map(renderNavButton$3({ activeIndex, onClick: onChangeActiveIndex })) }));
2247
+ }
2248
+ else if (dotCount) {
2249
+ return (jsx("div", { className: style('flex gap-xs', containerStyles[listType], version ? 'group' : '', className, { 'pb-xl': navButtons?.length && isMobileMode }), "data-ver": version, children: Array.from({ length: dotCount })
2250
+ .fill(null)
2251
+ .map(renderDotButton({ activeIndex, onClick: onChangeActiveIndex, listType })) }));
2252
+ }
2253
+ return null;
2254
+ });
2255
+ const getOptions = (isAuto = false) => ({
2256
+ behavior: isAuto ? 'auto' : 'smooth',
2257
+ });
2258
+
2259
+ /** @deprecated */
2260
+ const ArrowButton = JSX(({ className, disabled, ...rest }) => (jsx(LinkButton, { rounded: true, className: style('group/btn w-12 h-12 min-h-12 max-h-12 flex items-center justify-center shadow-main-black', disabled
2261
+ ? 'bg-secondary-light text-secondary-text'
2262
+ : 'bg-white text-primary-text hover:text-primary-main', className || ''), disabled: disabled, ...rest, children: jsx(Img, { className: "w-4 h-4 min-w-4 min-h-4 rounded-full box-border", image: { icon: 'ArrowLeftIcon', iconVersion: 'black' }, imageClassName: "group-hover/btn:text-primary-main", width: "16", height: "16" }) })));
2263
+ /** @deprecated */
2264
+ const ScrollLeftButton = JSX((props) => (jsx(ArrowButton, { ...props, ariaLabel: "\u041F\u0440\u043E\u043B\u0438\u0441\u0442\u0430\u0442\u044C \u0432\u043B\u0435\u0432\u043E", "data-block-control": "scroll-left" })));
2265
+ /** @deprecated */
2266
+ const ScrollRightButton = JSX((props) => (jsx(ArrowButton, { ...props, className: `${props.className || ''} rotate-180`, ariaLabel: "\u041F\u0440\u043E\u043B\u0438\u0441\u0442\u0430\u0442\u044C \u0432\u043F\u0440\u0430\u0432\u043E", "data-block-control": "scroll-right" })));
2267
+
2268
+ const blurBaseStyle = 'absolute top-0 bottom-0 z-40 hidden @lg:block w-20 pointer-events-none';
2269
+ const SwipeListScrollButtons = JSX(({ className, scroll, hasBlur, arrowsPadded, isBottom }) => {
2270
+ const { canScrollLeft, canScrollRight, scrollLeft, scrollRight } = scroll;
2271
+ const isArrowPadded = arrowsPadded && !isBottom;
2272
+ return (jsxs("div", { className: className, children: [hasBlur ? renderBlur(scroll) : null, canScrollLeft ? (jsx(ScrollLeftButton, { className: style(buttonStyle(isBottom), isArrowPadded ? 'left-1' : 'left-0'), onClick: scrollLeft })) : null, canScrollRight ? (jsx(ScrollRightButton, { className: style(buttonStyle(isBottom), isArrowPadded ? 'right-1' : 'right-0'), onClick: scrollRight })) : null] }));
2273
+ });
2274
+ const renderBlur = (scroll) => (jsxs("div", { children: [scroll.canScrollLeft ? (jsx("div", { className: style(blurBaseStyle, 'left-0 bg-opacity-from-white group-data-secondary:bg-none') })) : null, scroll.canScrollRight ? (jsx("div", { className: style(blurBaseStyle, 'right-0 bg-opacity-to-white group-data-secondary:bg-none') })) : null] }));
2275
+ const buttonStyle = (isBottom = false) => style('absolute z-40', isBottom ? 'bottom-[56px]' : 'top-[calc(50%-24px)]');
2276
+
2246
2277
  const DEFAULT_GAP = 14;
2247
2278
  /*
2248
2279
  Horizontal padding used on a container above SwipeListControl.
@@ -2250,14 +2281,14 @@
2250
2281
  and get rid of a clipping effect caused by overflow: hidden.
2251
2282
  */
2252
2283
  const DEFAULT_PADDING = 16;
2253
- const SwipeListControl = JSX(({ className, version, gap = DEFAULT_GAP, padding = DEFAULT_PADDING, visibleItemCount = 1, listType = 'horizontal-list', snapAlign, minHeight, showArrows, hasBlur, arrowsPadded, showDots, children, onVisibleIndicesChange, }) => {
2284
+ const SwipeListControl = JSX(({ className, version, gap = DEFAULT_GAP, padding = DEFAULT_PADDING, visibleItemCount = 1, listType = 'horizontal-list', snapAlign, minHeight, showArrows, hasBlur, arrowsPadded, showDots, children, onVisibleIndicesChange, navButtons, }) => {
2254
2285
  const itemCount = Array.isArray(children) ? children.length : 0;
2255
2286
  const [containerRef, scroll] = useSwipeListScroll({
2256
2287
  itemCount,
2257
2288
  onVisibleIndicesChange,
2258
2289
  });
2259
2290
  const [activeIndex] = scroll.visibleIndicesRange;
2260
- return (jsxs("div", { className: style(className, listType === 'vertical-list' ? 'relative h-full' : ''), children: [jsx(SwipeListContainer, { containerRef: containerRef, activeIndex: activeIndex, visibleItemCount: visibleItemCount, gap: gap, padding: padding, listType: listType, snapAlign: snapAlign, minHeight: minHeight, onVisibleIndicesChange: scroll.handleVisibleIndicesChange, children: children }), jsx(SwipeListScrollButtons, { className: style(!showArrows && 'hidden lg:block'), scroll: scroll, hasBlur: hasBlur, arrowsPadded: arrowsPadded }), jsx(SwipeListDots, { className: style(!showDots && 'lg:hidden'), containerRef: containerRef, activeIndex: activeIndex, dotCount: itemCount, listType: listType, version: version })] }));
2291
+ return (jsxs("div", { className: style(className, listType === 'vertical-list' ? 'relative h-full' : ''), children: [jsx(SwipeListContainer, { containerRef: containerRef, activeIndex: activeIndex, visibleItemCount: visibleItemCount, gap: gap, padding: padding, listType: listType, snapAlign: snapAlign, minHeight: minHeight, onVisibleIndicesChange: scroll.handleVisibleIndicesChange, children: children }), jsx(SwipeListScrollButtons, { className: style(!showArrows && 'hidden lg:block'), scroll: scroll, hasBlur: hasBlur, arrowsPadded: arrowsPadded, isBottom: Boolean(navButtons?.length) }), jsx(SwipeListDots, { className: style(!showDots && 'lg:hidden'), activeIndex: activeIndex, dotCount: itemCount, listType: listType, version: version, navButtons: navButtons, containerRef: containerRef, containerScroll: scroll })] }));
2261
2292
  });
2262
2293
 
2263
2294
  const renderCarouselBlocks = ({ blocksToRender, ...rest }) => (jsx(SwipeListControl, { visibleItemCount: 0, gap: 0, arrowsPadded: true, children: renderBlocksList(blocksToRender, {
@@ -3456,9 +3487,10 @@
3456
3487
  normal: 'lg:min-w-80 xl:min-w-96',
3457
3488
  big: 'lg:min-w-[515px]',
3458
3489
  };
3459
- const renderCarouselCards = ({ noCardBorder, cardSize = 'normal', ...rest }) => {
3490
+ const renderCarouselCards = ({ noCardBorder, cardSize = 'normal', isNavButtons = false, ...rest }) => {
3460
3491
  const { blocks: childBlocks } = rest.block || {};
3461
3492
  const someCardsHighlighted = childBlocks?.some(isCardHighlighted);
3493
+ const defaultPadding = isNavButtons ? { defaultPadding: 'p-6xl pb-m' } : {};
3462
3494
  return renderChildren({
3463
3495
  ...rest,
3464
3496
  renderProps: (block, options, blockIndex) => (jsxs("div", { className: cardWrapperStyle(block, { someCardsHighlighted }), children: [renderBlock$1(block, options, {
@@ -3467,6 +3499,7 @@
3467
3499
  showBorder: !noCardBorder,
3468
3500
  cardSize,
3469
3501
  }),
3502
+ ...defaultPadding,
3470
3503
  blockIndex,
3471
3504
  }), isCardHighlighted(block)
3472
3505
  ? renderCardHighlight({ className: 'absolute top-0 -right-4 z-40' })
@@ -3480,9 +3513,7 @@
3480
3513
 
3481
3514
  const VISIBLE_ITEM_COUNT = 1;
3482
3515
 
3483
- const Carousel = UniBlock(({ className, visibleItemCount = VISIBLE_ITEM_COUNT, noCardBorder, arrowsPadded = true, isGap = true, cardSize = 'normal', ...rest }) => {
3484
- return (jsx(BlockWrapper, { className: style(className), defaultPadding: "p-6xl", ...rest, children: jsx(SwipeListControl, { className: style('relative max-w-full'), visibleItemCount: visibleItemCount, snapAlign: "snap-start", gap: isGap ? ITEMS_GAP : 0, padding: 0, arrowsPadded: arrowsPadded, hasBlur: true, children: renderCarouselCards({ noCardBorder, cardSize, ...rest }) }) }));
3485
- }, {
3516
+ const Carousel = UniBlock(({ className, visibleItemCount = VISIBLE_ITEM_COUNT, noCardBorder, arrowsPadded = true, isGap = true, cardSize = 'normal', isNavButtons = false, ...rest }) => (jsx(BlockWrapper, { className: style(className), defaultPadding: "p-6xl", ...rest, children: jsx(SwipeListControl, { className: style('relative max-w-full'), visibleItemCount: visibleItemCount, snapAlign: "snap-start", gap: isGap ? ITEMS_GAP : 0, padding: 0, arrowsPadded: arrowsPadded, navButtons: isNavButtons ? getNavButton(rest?.block?.blocks) : [], hasBlur: true, children: renderCarouselCards({ noCardBorder, cardSize, isNavButtons, ...rest }) }) })), {
3486
3517
  childrenTypes: [
3487
3518
  'CarouselCard',
3488
3519
  'CarouselCatalogCard',
@@ -3498,6 +3529,13 @@
3498
3529
  },
3499
3530
  }),
3500
3531
  });
3532
+ const getNavButton = (blocks) => blocks?.map((_) => {
3533
+ const content = _?.content;
3534
+ return {
3535
+ title: content?.title,
3536
+ description: content?.additionalDescription || content?.description,
3537
+ };
3538
+ }) ?? [];
3501
3539
 
3502
3540
  const titleSize = 'XS';
3503
3541
 
@@ -6461,7 +6499,7 @@
6461
6499
  slots: () => [HEADER_SLOT, FOOTER_SLOT, STICKY_FOOTER_SLOT],
6462
6500
  });
6463
6501
 
6464
- const packageVersion = "0.14.532";
6502
+ const packageVersion = "0.14.534";
6465
6503
 
6466
6504
  exports.Blocks = Blocks;
6467
6505
  exports.ContentPage = ContentPage;