@redneckz/wildless-cms-uni-blocks 0.14.534 → 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 (182) 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/ui-kit/SwipeListControl/NavButtonProp.d.ts +9 -0
  9. package/bundle/ui-kit/SwipeListControl/SwipeListControl.d.ts +2 -0
  10. package/bundle/ui-kit/SwipeListControl/SwipeListDots.d.ts +8 -3
  11. package/bundle/ui-kit/SwipeListControl/SwipeListScrollButtons.d.ts +1 -0
  12. package/bundle/ui-kit/SwipeListControl/renderDotButton.d.ts +3 -0
  13. package/bundle/ui-kit/SwipeListControl/renderNavButton.d.ts +3 -0
  14. package/dist/components/Carousel/Carousel.js +8 -3
  15. package/dist/components/Carousel/Carousel.js.map +1 -1
  16. package/dist/components/Carousel/CarouselContent.d.ts +2 -0
  17. package/dist/components/Carousel/renderCarouselCards.d.ts +2 -1
  18. package/dist/components/Carousel/renderCarouselCards.js +3 -1
  19. package/dist/components/Carousel/renderCarouselCards.js.map +1 -1
  20. package/dist/components/ProductBlock/ProductBlock.js +1 -1
  21. package/dist/components/ProductBlock/ProductBlock.js.map +1 -1
  22. package/dist/components/ProductBlock/ProductBlockContent.d.ts +2 -1
  23. package/dist/ui-kit/LinkButton/ButtonInner.js +2 -2
  24. package/dist/ui-kit/LinkButton/ButtonInner.js.map +1 -1
  25. package/dist/ui-kit/SwipeListControl/NavButtonProp.d.ts +9 -0
  26. package/dist/ui-kit/SwipeListControl/NavButtonProp.js +2 -0
  27. package/dist/ui-kit/SwipeListControl/NavButtonProp.js.map +1 -0
  28. package/dist/ui-kit/SwipeListControl/SwipeListControl.d.ts +2 -0
  29. package/dist/ui-kit/SwipeListControl/SwipeListControl.js +2 -2
  30. package/dist/ui-kit/SwipeListControl/SwipeListControl.js.map +1 -1
  31. package/dist/ui-kit/SwipeListControl/SwipeListDots.d.ts +8 -3
  32. package/dist/ui-kit/SwipeListControl/SwipeListDots.js +32 -16
  33. package/dist/ui-kit/SwipeListControl/SwipeListDots.js.map +1 -1
  34. package/dist/ui-kit/SwipeListControl/SwipeListScrollButtons.d.ts +1 -0
  35. package/dist/ui-kit/SwipeListControl/SwipeListScrollButtons.js +4 -3
  36. package/dist/ui-kit/SwipeListControl/SwipeListScrollButtons.js.map +1 -1
  37. package/dist/ui-kit/SwipeListControl/renderDotButton.d.ts +3 -0
  38. package/dist/ui-kit/SwipeListControl/renderDotButton.js +13 -0
  39. package/dist/ui-kit/SwipeListControl/renderDotButton.js.map +1 -0
  40. package/dist/ui-kit/SwipeListControl/renderNavButton.d.ts +3 -0
  41. package/dist/ui-kit/SwipeListControl/renderNavButton.js +17 -0
  42. package/dist/ui-kit/SwipeListControl/renderNavButton.js.map +1 -0
  43. package/dist/ui-kit/SwipeListControl/useSwipeListScroll.js +1 -1
  44. package/dist/ui-kit/SwipeListControl/useSwipeListScroll.js.map +1 -1
  45. package/lib/common.css +1 -1
  46. package/lib/components/Carousel/Carousel.fixture.d.ts +1 -0
  47. package/lib/components/Carousel/Carousel.fixture.mobile.d.ts +1 -0
  48. package/lib/components/Carousel/Carousel.js +8 -3
  49. package/lib/components/Carousel/Carousel.js.map +1 -1
  50. package/lib/components/Carousel/CarouselContent.d.ts +2 -0
  51. package/lib/components/Carousel/renderCarouselCards.d.ts +2 -1
  52. package/lib/components/Carousel/renderCarouselCards.js +3 -1
  53. package/lib/components/Carousel/renderCarouselCards.js.map +1 -1
  54. package/lib/components/ProductBlock/ProductBlock.js +1 -1
  55. package/lib/components/ProductBlock/ProductBlock.js.map +1 -1
  56. package/lib/components/ProductBlock/ProductBlockContent.d.ts +2 -1
  57. package/lib/ui-kit/LinkButton/ButtonInner.js +2 -2
  58. package/lib/ui-kit/LinkButton/ButtonInner.js.map +1 -1
  59. package/lib/ui-kit/SwipeListControl/NavButtonProp.d.ts +9 -0
  60. package/lib/ui-kit/SwipeListControl/NavButtonProp.js +2 -0
  61. package/lib/ui-kit/SwipeListControl/NavButtonProp.js.map +1 -0
  62. package/lib/ui-kit/SwipeListControl/SwipeListControl.d.ts +2 -0
  63. package/lib/ui-kit/SwipeListControl/SwipeListControl.js +2 -2
  64. package/lib/ui-kit/SwipeListControl/SwipeListControl.js.map +1 -1
  65. package/lib/ui-kit/SwipeListControl/SwipeListDots.d.ts +8 -3
  66. package/lib/ui-kit/SwipeListControl/SwipeListDots.js +32 -16
  67. package/lib/ui-kit/SwipeListControl/SwipeListDots.js.map +1 -1
  68. package/lib/ui-kit/SwipeListControl/SwipeListScrollButtons.d.ts +1 -0
  69. package/lib/ui-kit/SwipeListControl/SwipeListScrollButtons.js +4 -3
  70. package/lib/ui-kit/SwipeListControl/SwipeListScrollButtons.js.map +1 -1
  71. package/lib/ui-kit/SwipeListControl/renderDotButton.d.ts +2 -0
  72. package/lib/ui-kit/SwipeListControl/renderDotButton.js +10 -0
  73. package/lib/ui-kit/SwipeListControl/renderDotButton.js.map +1 -0
  74. package/lib/ui-kit/SwipeListControl/renderNavButton.d.ts +2 -0
  75. package/lib/ui-kit/SwipeListControl/renderNavButton.js +14 -0
  76. package/lib/ui-kit/SwipeListControl/renderNavButton.js.map +1 -0
  77. package/lib/ui-kit/SwipeListControl/useSwipeListScroll.js +1 -1
  78. package/lib/ui-kit/SwipeListControl/useSwipeListScroll.js.map +1 -1
  79. package/mobile/bundle/bundle.umd.js +85 -47
  80. package/mobile/bundle/bundle.umd.min.js +1 -1
  81. package/mobile/bundle/components/Carousel/CarouselContent.d.ts +2 -0
  82. package/mobile/bundle/components/Carousel/renderCarouselCards.d.ts +2 -1
  83. package/mobile/bundle/components/ProductBlock/ProductBlockContent.d.ts +2 -1
  84. package/mobile/bundle/ui-kit/SwipeListControl/NavButtonProp.d.ts +9 -0
  85. package/mobile/bundle/ui-kit/SwipeListControl/SwipeListControl.d.ts +2 -0
  86. package/mobile/bundle/ui-kit/SwipeListControl/SwipeListDots.d.ts +8 -3
  87. package/mobile/bundle/ui-kit/SwipeListControl/SwipeListScrollButtons.d.ts +1 -0
  88. package/mobile/bundle/ui-kit/SwipeListControl/renderDotButton.d.ts +3 -0
  89. package/mobile/bundle/ui-kit/SwipeListControl/renderNavButton.d.ts +3 -0
  90. package/mobile/dist/components/Carousel/Carousel.js +8 -3
  91. package/mobile/dist/components/Carousel/Carousel.js.map +1 -1
  92. package/mobile/dist/components/Carousel/CarouselContent.d.ts +2 -0
  93. package/mobile/dist/components/Carousel/renderCarouselCards.d.ts +2 -1
  94. package/mobile/dist/components/Carousel/renderCarouselCards.js +3 -1
  95. package/mobile/dist/components/Carousel/renderCarouselCards.js.map +1 -1
  96. package/mobile/dist/components/ProductBlock/ProductBlock.js +1 -1
  97. package/mobile/dist/components/ProductBlock/ProductBlock.js.map +1 -1
  98. package/mobile/dist/components/ProductBlock/ProductBlockContent.d.ts +2 -1
  99. package/mobile/dist/ui-kit/LinkButton/ButtonInner.js +2 -2
  100. package/mobile/dist/ui-kit/LinkButton/ButtonInner.js.map +1 -1
  101. package/mobile/dist/ui-kit/SwipeListControl/NavButtonProp.d.ts +9 -0
  102. package/mobile/dist/ui-kit/SwipeListControl/NavButtonProp.js +2 -0
  103. package/mobile/dist/ui-kit/SwipeListControl/NavButtonProp.js.map +1 -0
  104. package/mobile/dist/ui-kit/SwipeListControl/SwipeListControl.d.ts +2 -0
  105. package/mobile/dist/ui-kit/SwipeListControl/SwipeListControl.js +2 -2
  106. package/mobile/dist/ui-kit/SwipeListControl/SwipeListControl.js.map +1 -1
  107. package/mobile/dist/ui-kit/SwipeListControl/SwipeListDots.d.ts +8 -3
  108. package/mobile/dist/ui-kit/SwipeListControl/SwipeListDots.js +32 -16
  109. package/mobile/dist/ui-kit/SwipeListControl/SwipeListDots.js.map +1 -1
  110. package/mobile/dist/ui-kit/SwipeListControl/SwipeListScrollButtons.d.ts +1 -0
  111. package/mobile/dist/ui-kit/SwipeListControl/SwipeListScrollButtons.js +4 -3
  112. package/mobile/dist/ui-kit/SwipeListControl/SwipeListScrollButtons.js.map +1 -1
  113. package/mobile/dist/ui-kit/SwipeListControl/renderDotButton.d.ts +3 -0
  114. package/mobile/dist/ui-kit/SwipeListControl/renderDotButton.js +13 -0
  115. package/mobile/dist/ui-kit/SwipeListControl/renderDotButton.js.map +1 -0
  116. package/mobile/dist/ui-kit/SwipeListControl/renderNavButton.d.ts +3 -0
  117. package/mobile/dist/ui-kit/SwipeListControl/renderNavButton.js +17 -0
  118. package/mobile/dist/ui-kit/SwipeListControl/renderNavButton.js.map +1 -0
  119. package/mobile/dist/ui-kit/SwipeListControl/useSwipeListScroll.js +1 -1
  120. package/mobile/dist/ui-kit/SwipeListControl/useSwipeListScroll.js.map +1 -1
  121. package/mobile/lib/common.css +1 -1
  122. package/mobile/lib/components/Carousel/Carousel.js +8 -3
  123. package/mobile/lib/components/Carousel/Carousel.js.map +1 -1
  124. package/mobile/lib/components/Carousel/CarouselContent.d.ts +2 -0
  125. package/mobile/lib/components/Carousel/renderCarouselCards.d.ts +2 -1
  126. package/mobile/lib/components/Carousel/renderCarouselCards.js +3 -1
  127. package/mobile/lib/components/Carousel/renderCarouselCards.js.map +1 -1
  128. package/mobile/lib/components/ProductBlock/ProductBlock.js +1 -1
  129. package/mobile/lib/components/ProductBlock/ProductBlock.js.map +1 -1
  130. package/mobile/lib/components/ProductBlock/ProductBlockContent.d.ts +2 -1
  131. package/mobile/lib/ui-kit/LinkButton/ButtonInner.js +2 -2
  132. package/mobile/lib/ui-kit/LinkButton/ButtonInner.js.map +1 -1
  133. package/mobile/lib/ui-kit/SwipeListControl/NavButtonProp.d.ts +9 -0
  134. package/mobile/lib/ui-kit/SwipeListControl/NavButtonProp.js +2 -0
  135. package/mobile/lib/ui-kit/SwipeListControl/NavButtonProp.js.map +1 -0
  136. package/mobile/lib/ui-kit/SwipeListControl/SwipeListControl.d.ts +2 -0
  137. package/mobile/lib/ui-kit/SwipeListControl/SwipeListControl.js +2 -2
  138. package/mobile/lib/ui-kit/SwipeListControl/SwipeListControl.js.map +1 -1
  139. package/mobile/lib/ui-kit/SwipeListControl/SwipeListDots.d.ts +8 -3
  140. package/mobile/lib/ui-kit/SwipeListControl/SwipeListDots.js +32 -16
  141. package/mobile/lib/ui-kit/SwipeListControl/SwipeListDots.js.map +1 -1
  142. package/mobile/lib/ui-kit/SwipeListControl/SwipeListScrollButtons.d.ts +1 -0
  143. package/mobile/lib/ui-kit/SwipeListControl/SwipeListScrollButtons.js +4 -3
  144. package/mobile/lib/ui-kit/SwipeListControl/SwipeListScrollButtons.js.map +1 -1
  145. package/mobile/lib/ui-kit/SwipeListControl/renderDotButton.d.ts +3 -0
  146. package/mobile/lib/ui-kit/SwipeListControl/renderDotButton.js +10 -0
  147. package/mobile/lib/ui-kit/SwipeListControl/renderDotButton.js.map +1 -0
  148. package/mobile/lib/ui-kit/SwipeListControl/renderNavButton.d.ts +3 -0
  149. package/mobile/lib/ui-kit/SwipeListControl/renderNavButton.js +14 -0
  150. package/mobile/lib/ui-kit/SwipeListControl/renderNavButton.js.map +1 -0
  151. package/mobile/lib/ui-kit/SwipeListControl/useSwipeListScroll.js +1 -1
  152. package/mobile/lib/ui-kit/SwipeListControl/useSwipeListScroll.js.map +1 -1
  153. package/mobile/src/components/Carousel/Carousel.tsx +28 -17
  154. package/mobile/src/components/Carousel/CarouselContent.ts +2 -0
  155. package/mobile/src/components/Carousel/renderCarouselCards.tsx +8 -1
  156. package/mobile/src/components/ProductBlock/ProductBlock.tsx +7 -2
  157. package/mobile/src/components/ProductBlock/ProductBlockContent.ts +3 -1
  158. package/mobile/src/ui-kit/LinkButton/ButtonInner.tsx +2 -2
  159. package/mobile/src/ui-kit/SwipeListControl/NavButtonProp.ts +11 -0
  160. package/mobile/src/ui-kit/SwipeListControl/SwipeListControl.tsx +7 -1
  161. package/mobile/src/ui-kit/SwipeListControl/SwipeListDots.tsx +69 -46
  162. package/mobile/src/ui-kit/SwipeListControl/SwipeListScrollButtons.tsx +9 -5
  163. package/mobile/src/ui-kit/SwipeListControl/renderDotButton.tsx +29 -0
  164. package/mobile/src/ui-kit/SwipeListControl/renderNavButton.tsx +33 -0
  165. package/mobile/src/ui-kit/SwipeListControl/useSwipeListScroll.ts +1 -1
  166. package/package.json +2 -2
  167. package/src/components/Carousel/Carousel.fixture.mobile.tsx +57 -0
  168. package/src/components/Carousel/Carousel.fixture.tsx +56 -0
  169. package/src/components/Carousel/Carousel.tsx +28 -17
  170. package/src/components/Carousel/CarouselContent.ts +2 -0
  171. package/src/components/Carousel/renderCarouselCards.tsx +8 -1
  172. package/src/components/ProductBlock/ProductBlock.tsx +7 -2
  173. package/src/components/ProductBlock/ProductBlockContent.ts +3 -1
  174. package/src/components/ProductGallery/ProductGallery.fixture.tsx +17 -84
  175. package/src/ui-kit/LinkButton/ButtonInner.tsx +2 -2
  176. package/src/ui-kit/SwipeListControl/NavButtonProp.ts +11 -0
  177. package/src/ui-kit/SwipeListControl/SwipeListControl.tsx +7 -1
  178. package/src/ui-kit/SwipeListControl/SwipeListDots.tsx +69 -46
  179. package/src/ui-kit/SwipeListControl/SwipeListScrollButtons.tsx +9 -5
  180. package/src/ui-kit/SwipeListControl/renderDotButton.tsx +29 -0
  181. package/src/ui-kit/SwipeListControl/renderNavButton.tsx +33 -0
  182. package/src/ui-kit/SwipeListControl/useSwipeListScroll.ts +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"SwipeListScrollButtons.js","sourceRoot":"","sources":["../../../src/ui-kit/SwipeListControl/SwipeListScrollButtons.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AACxC,OAAO,EAAE,KAAK,EA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EAC9E,OAAO,EAAE,WAAW,GACpB,CACH,CAAC,CAAC,CAAC,IAAI,IACJ,CACP,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,MAAM,UAAU,GAAG,CAAC,MAAuB,EAAE,EAAE,CAAC,CAC9C,0BACG,MAAM,CAAC,aAAa,CAAC,CAAC,CAAC,CACtB,cACE,SAAS,EAAE,KAAK,CACd,aAAa,EACb,2DAA2D,CAC5D,GACD,CACH,CAAC,CAAC,CAAC,IAAI,EACP,MAAM,CAAC,cAAc,CAAC,CAAC,CAAC,CACvB,cACE,SAAS,EAAE,KAAK,CAAC,aAAa,EAAE,0DAA0D,CAAC,GAC3F,CACH,CAAC,CAAC,CAAC,IAAI,IACJ,CACP,CAAC;AAEF,MAAM,WAAW,GAAG,CAAC,QAAQ,GAAG,KAAK,EAAE,EAAE,CACvC,KAAK,CAAC,eAAe,EAAE,QAAQ,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,sBAAsB,CAAC,CAAC"}
@@ -0,0 +1,2 @@
1
+ import type { DotProp } from './NavButtonProp';
2
+ export declare const renderDotButton: ({ activeIndex, onClick, listType }: DotProp) => (_: any, idx: number) => JSX.Element;
@@ -0,0 +1,10 @@
1
+ import { jsx as _jsx } from "@redneckz/uni-jsx/jsx-runtime";
2
+ import { style } from '../../utils/style.js';
3
+ const activeDotStyles = {
4
+ 'horizontal-list': 'w-6',
5
+ 'vertical-list': 'h-6',
6
+ };
7
+ const dotStyle = 'cursor-pointer rounded-full transition-width duration-300 bg-primary-main group-data-secondary:bg-white';
8
+ const inactiveDotStyle = 'w-2 h-2 opacity-30';
9
+ export 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)));
10
+ //# sourceMappingURL=renderDotButton.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"renderDotButton.js","sourceRoot":"","sources":["../../../src/ui-kit/SwipeListControl/renderDotButton.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAI1C,MAAM,eAAe,GAAyC;IAC5D,iBAAiB,EAAE,KAAK;IACxB,eAAe,EAAE,KAAK;CACvB,CAAC;AAEF,MAAM,QAAQ,GACZ,yGAAyG,CAAC;AAE5G,MAAM,gBAAgB,GAAG,oBAAoB,CAAC;AAE9C,MAAM,CAAC,MAAM,eAAe,GAC1B,CAAC,EAAE,WAAW,EAAE,OAAO,EAAE,QAAQ,GAAG,iBAAiB,EAAW,EAAE,EAAE,CACpE,CAAC,CAAM,EAAE,GAAW,EAAE,EAAE,CACtB,CACE,cAEE,SAAS,EAAE,KAAK,CACd,QAAQ,EACR,GAAG,KAAK,WAAW,CAAC,CAAC,CAAC,eAAe,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,gBAAgB,CACnE,EACD,IAAI,EAAC,QAAQ,uBAEb,OAAO,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC,IAPtB,MAAM,CAAC,GAAG,CAAC,CAQhB,CACH,CAAC"}
@@ -0,0 +1,2 @@
1
+ import { type DotProp, type NavButtonProp } from './NavButtonProp';
2
+ export declare const renderNavButton: ({ activeIndex, onClick }: DotProp) => (nav: NavButtonProp, i: number) => JSX.Element;
@@ -0,0 +1,14 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "@redneckz/uni-jsx/jsx-runtime";
2
+ import { style } from '../../utils/style.js';
3
+ export const renderNavButton = ({ activeIndex, onClick }) => (nav, i) => {
4
+ const isActive = i === activeIndex;
5
+ const btnClassName = isActive
6
+ ? 'min-w-[350px] bg-white shadow-dark-blue border-none p-6'
7
+ : 'min-w-72 ease-in duration-300 bg-white/10 px-xl py-lg hover:backdrop-blur';
8
+ const btnTitleClassName = isActive
9
+ ? 'text-primary-text text-h6 py-xs'
10
+ : 'text-l pb-2xs text-secondary-text group-data-secondary:text-white';
11
+ const btnDescClassName = isActive ? 'text-l' : 'text-m group-data-secondary:text-white/80';
12
+ 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)));
13
+ };
14
+ //# sourceMappingURL=renderNavButton.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"renderNavButton.js","sourceRoot":"","sources":["../../../src/ui-kit/SwipeListControl/renderNavButton.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAG1C,MAAM,CAAC,MAAM,eAAe,GAC1B,CAAC,EAAE,WAAW,EAAE,OAAO,EAAW,EAAE,EAAE,CACtC,CAAC,GAAkB,EAAE,CAAS,EAAE,EAAE;IAChC,MAAM,QAAQ,GAAG,CAAC,KAAK,WAAW,CAAC;IACnC,MAAM,YAAY,GAAG,QAAQ;QAC3B,CAAC,CAAC,yDAAyD;QAC3D,CAAC,CAAC,2EAA2E,CAAC;IAChF,MAAM,iBAAiB,GAAG,QAAQ;QAChC,CAAC,CAAC,iCAAiC;QACnC,CAAC,CAAC,mEAAmE,CAAC;IACxE,MAAM,gBAAgB,GAAG,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,2CAA2C,CAAC;IAE3F,OAAO,CACL,kBACE,IAAI,EAAC,QAAQ,EAEb,OAAO,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,CAAC,CAAC,gBACb,GAAG,EAAE,KAAK,EACtB,SAAS,EAAE,KAAK,CACd,iKAAiK,EACjK,YAAY,CACb,aAED,cAAK,SAAS,EAAE,iBAAiB,YAAG,GAAG,EAAE,KAAK,GAAO,EACrD,cAAK,SAAS,EAAE,KAAK,CAAC,gCAAgC,EAAE,gBAAgB,CAAC,YACtE,GAAG,EAAE,WAAW,GACb,KAXD,MAAM,CAAC,CAAC,CAAC,CAYP,CACV,CAAC;AACJ,CAAC,CAAC"}
@@ -11,7 +11,7 @@ export const useSwipeListScroll = ({ itemCount, onVisibleIndicesChange, }) => {
11
11
  const handleVisibleIndicesChange = useCallback((indices) => {
12
12
  setVisibleIndices((prevIndices) => areArraysEqual(prevIndices, indices) ? prevIndices : indices);
13
13
  onVisibleIndicesChange && onVisibleIndicesChange(indices);
14
- }, [itemCount]);
14
+ }, [onVisibleIndicesChange]);
15
15
  const [minIndex, maxIndex] = visibleIndices.length
16
16
  ? [minBy()(visibleIndices), maxBy()(visibleIndices)]
17
17
  : [-1, -1];
@@ -1 +1 @@
1
- {"version":3,"file":"useSwipeListScroll.js","sourceRoot":"","sources":["../../../src/ui-kit/SwipeListControl/useSwipeListScroll.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AAC5E,OAAO,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAC5D,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAC1C,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAC1C,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAiBhD,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAwB,EACxD,SAAS,EACT,sBAAsB,GACD,EAAkE,EAAE;IACzF,MAAM,YAAY,GAAG,MAAM,CAAW,IAAI,CAAC,CAAC;IAE5C,MAAM,CAAC,cAAc,EAAE,iBAAiB,CAAC,GAAG,QAAQ,CAAW,EAAE,CAAC,CAAC;IACnE,MAAM,0BAA0B,GAAG,WA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OAAO,CAAC,CAAC,SAAS,EAAE,CAAC,CAAC,CAAC;SAC9C;aAAM;YACL,aAAa,CAAC,YAAY,CAAC,OAAO,CAAC,CAAC;SACrC;IACH,CAAC,EAAE,CAAC,SAAS,EAAE,cAAc,CAAC,CAAC,CAAC;IAEhC,MAAM,QAAQ,GAAG,WAAW,CAC1B,CACE,GAAW,EACX,UAAU;QACR,QAAQ,EAAE,QAAQ;QAClB,KAAK,EAAE,SAAS;QAChB,MAAM,EAAE,QAAQ;KACQ,EAC1B,EAAE;QACF,IAAI,YAAY,EAAE,OAAO,EAAE;YACzB,YAAY,CAAC,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE,cAAc,CAAC,OAAO,CAAC,CAAC;SAC7D;IACH,CAAC,EACD,CAAC,YAAY,CAAC,CACf,CAAC;IAEF,OAAO;QACL,YAAY;QACZ;YACE,UAAU;YACV,WAAW;YACX,QAAQ;YACR,aAAa;YACb,cAAc;YACd,mBAAmB,EAAE,CAAC,QAAQ,EAAE,QAAQ,CAAC;YACzC,0BAA0B;SAC3B;KACF,CAAC;AACJ,CAAC,CAAC"}
@@ -420,7 +420,7 @@
420
420
  '': '',
421
421
  };
422
422
  /** @deprecated */
423
- const buttonStyle = 'text-center font-sans select-none';
423
+ const buttonStyle$2 = 'text-center font-sans select-none';
424
424
  /** @deprecated */
425
425
  const iconStyleMap = {
426
426
  primary: 'group-hover/btn:brightness-0 group-hover/btn:invert',
@@ -434,7 +434,7 @@
434
434
 
435
435
  /** @deprecated */
436
436
  const getRegularButtonClasses = ({ className, rounded, version, }) => [
437
- buttonStyle,
437
+ buttonStyle$2,
438
438
  'border border-transparent inline-block cursor-pointer no-underline focus:border-primary-text focus:border h-fit',
439
439
  version ? buttonStyleMap$1[version] : '',
440
440
  rounded ? 'rounded-full' : 'rounded-md',
@@ -535,9 +535,9 @@
535
535
  const ButtonInner = JSX((props) => {
536
536
  const { text, aboveText, appendLeft, appendRight, version = 'primary' } = props;
537
537
  const iconHideStyle = isWithText(props) ? 'hidden lg:block' : '';
538
- 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] }));
538
+ 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] }));
539
539
  });
540
- const getButtonStyle = (props) => {
540
+ const buttonStyle$1 = (props) => {
541
541
  const { version, aboveText, rounded } = props;
542
542
  if (version === 'link') {
543
543
  return '';
@@ -552,7 +552,7 @@
552
552
  /** @deprecated */
553
553
  const getDisabledButtonClasses = ({ className, rounded, version, }) => [
554
554
  'inline-block',
555
- buttonStyle,
555
+ buttonStyle$2,
556
556
  version ? buttonDisabledStyleMap[version] : '',
557
557
  rounded ? 'rounded-full' : 'rounded-md',
558
558
  className,
@@ -881,7 +881,7 @@
881
881
  return OutputComponent;
882
882
  }
883
883
 
884
- 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'] });
884
+ 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'] });
885
885
 
886
886
  const AdTile = JSX((props) => {
887
887
  const { items } = (props.options?.page?.adSourceBook ?? {});
@@ -2131,46 +2131,25 @@
2131
2131
  .filter(([_]) => _ && _.intersectionRatio >= 0.9)
2132
2132
  .map(([, i]) => i);
2133
2133
 
2134
- const containerStyles = {
2135
- 'horizontal-list': 'mx-auto mt-lg w-fit',
2136
- 'vertical-list': 'absolute flex-col justify-center h-full top-0 left-4',
2137
- };
2138
2134
  const activeDotStyles = {
2139
2135
  'horizontal-list': 'w-6',
2140
2136
  'vertical-list': 'h-6',
2141
2137
  };
2142
2138
  const dotStyle = 'cursor-pointer rounded-full transition-width duration-300 bg-primary-main group-data-secondary:bg-white';
2143
2139
  const inactiveDotStyle = 'w-2 h-2 opacity-30';
2144
- const SwipeListDots = JSX(({ className = '', containerRef, activeIndex, dotCount = 0, listType = 'horizontal-list', version, }) => {
2145
- const handleClick = (idx) => {
2146
- if (idx !== activeIndex && containerRef?.current) {
2147
- containerRef.current.children[idx]?.scrollIntoView({
2148
- behavior: 'smooth',
2149
- block: 'nearest',
2150
- });
2151
- }
2152
- };
2153
- return dotCount ? (jsx("div", { className: style('flex gap-xs', containerStyles[listType], version ? 'group' : '', className), "data-ver": version, children: Array.from({ length: dotCount })
2154
- .fill(null)
2155
- .map((_, idx) => (jsx("div", { className: `${dotStyle} ${idx === activeIndex ? activeDotStyles[listType] : inactiveDotStyle}`, role: "button", "aria-hidden": true, onClick: () => handleClick(idx) }, String(idx)))) })) : null;
2156
- });
2157
-
2158
- /** @deprecated */
2159
- 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
2160
- ? 'bg-secondary-light text-secondary-text'
2161
- : '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" }) })));
2162
- /** @deprecated */
2163
- 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" })));
2164
- /** @deprecated */
2165
- 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" })));
2140
+ 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)));
2166
2141
 
2167
- const scrollButtonStyle$1 = 'absolute top-[calc(50%-24px)] z-40';
2168
- const blurBaseStyle = 'absolute top-0 bottom-0 z-40 hidden @lg:block w-20 pointer-events-none';
2169
- const SwipeListScrollButtons = JSX(({ className, scroll, hasBlur, arrowsPadded }) => {
2170
- const { canScrollLeft, canScrollRight, scrollLeft, scrollRight } = scroll;
2171
- return (jsxs("div", { className: style(className), children: [hasBlur ? renderBlur(scroll) : null, canScrollLeft ? (jsx(ScrollLeftButton, { className: style(scrollButtonStyle$1, arrowsPadded ? 'left-1' : 'left-0'), onClick: scrollLeft })) : null, canScrollRight ? (jsx(ScrollRightButton, { className: style(scrollButtonStyle$1, arrowsPadded ? 'right-1' : 'right-0'), onClick: scrollRight })) : null] }));
2172
- });
2173
- 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] }));
2142
+ const renderNavButton = ({ activeIndex, onClick }) => (nav, i) => {
2143
+ const isActive = i === activeIndex;
2144
+ const btnClassName = isActive
2145
+ ? 'min-w-[350px] bg-white shadow-dark-blue border-none p-6'
2146
+ : 'min-w-72 ease-in duration-300 bg-white/10 px-xl py-lg hover:backdrop-blur';
2147
+ const btnTitleClassName = isActive
2148
+ ? 'text-primary-text text-h6 py-xs'
2149
+ : 'text-l pb-2xs text-secondary-text group-data-secondary:text-white';
2150
+ const btnDescClassName = isActive ? 'text-l' : 'text-m group-data-secondary:text-white/80';
2151
+ 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)));
2152
+ };
2174
2153
 
2175
2154
  const areArraysEqual = (as, bs) => as === bs || Boolean(as && bs && as?.length === bs?.length && as.every((_, i) => _ === bs[i]));
2176
2155
 
@@ -2200,7 +2179,7 @@
2200
2179
  const handleVisibleIndicesChange = useCallback((indices) => {
2201
2180
  setVisibleIndices((prevIndices) => areArraysEqual(prevIndices, indices) ? prevIndices : indices);
2202
2181
  onVisibleIndicesChange && onVisibleIndicesChange(indices);
2203
- }, [itemCount]);
2182
+ }, [onVisibleIndicesChange]);
2204
2183
  const [minIndex, maxIndex] = visibleIndices.length
2205
2184
  ? [minBy()(visibleIndices), maxBy()(visibleIndices)]
2206
2185
  : [-1, -1];
@@ -2251,6 +2230,58 @@
2251
2230
  ];
2252
2231
  };
2253
2232
 
2233
+ const containerStyles = {
2234
+ 'horizontal-list': 'mx-auto mt-lg w-fit',
2235
+ 'vertical-list': 'absolute flex-col justify-center h-full top-0 left-4',
2236
+ };
2237
+ const SwipeListDots = JSX(({ className = '', activeIndex = 0, dotCount = 0, listType = 'horizontal-list', version, navButtons = [], containerRef, containerScroll, }) => {
2238
+ const isMobileMode = useMobileMode();
2239
+ const [navRef, navScroll] = useSwipeListScroll({
2240
+ itemCount: navButtons.length,
2241
+ });
2242
+ const scrollOption = getOptions(Boolean(navButtons?.length));
2243
+ useEffect(() => {
2244
+ if (navButtons?.length && activeIndex >= 0 && navRef?.current) {
2245
+ navScroll.scrollTo(activeIndex, scrollOption);
2246
+ }
2247
+ }, [activeIndex]);
2248
+ const onChangeActiveIndex = useCallback((idx) => {
2249
+ if (idx !== activeIndex && containerRef?.current) {
2250
+ containerScroll?.scrollTo(idx, scrollOption);
2251
+ }
2252
+ }, [containerRef?.current]);
2253
+ if (navButtons?.length && !isMobileMode) {
2254
+ return (jsx(SwipeListContainer, { containerRef: navRef, snapAlign: "snap-start", itemClassName: "h-36 flex items-stretch w-screen", gap: 8, children: navButtons.map(renderNavButton({ activeIndex, onClick: onChangeActiveIndex })) }));
2255
+ }
2256
+ else if (dotCount) {
2257
+ 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 })
2258
+ .fill(null)
2259
+ .map(renderDotButton({ activeIndex, onClick: onChangeActiveIndex, listType })) }));
2260
+ }
2261
+ return null;
2262
+ });
2263
+ const getOptions = (isAuto = false) => ({
2264
+ behavior: isAuto ? 'auto' : 'smooth',
2265
+ });
2266
+
2267
+ /** @deprecated */
2268
+ 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
2269
+ ? 'bg-secondary-light text-secondary-text'
2270
+ : '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" }) })));
2271
+ /** @deprecated */
2272
+ 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" })));
2273
+ /** @deprecated */
2274
+ 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" })));
2275
+
2276
+ const blurBaseStyle = 'absolute top-0 bottom-0 z-40 hidden @lg:block w-20 pointer-events-none';
2277
+ const SwipeListScrollButtons = JSX(({ className, scroll, hasBlur, arrowsPadded, isBottom }) => {
2278
+ const { canScrollLeft, canScrollRight, scrollLeft, scrollRight } = scroll;
2279
+ const isArrowPadded = arrowsPadded && !isBottom;
2280
+ 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] }));
2281
+ });
2282
+ 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] }));
2283
+ const buttonStyle = (isBottom = false) => style('absolute z-40', isBottom ? 'bottom-[56px]' : 'top-[calc(50%-24px)]');
2284
+
2254
2285
  const DEFAULT_GAP = 14;
2255
2286
  /*
2256
2287
  Horizontal padding used on a container above SwipeListControl.
@@ -2258,14 +2289,14 @@
2258
2289
  and get rid of a clipping effect caused by overflow: hidden.
2259
2290
  */
2260
2291
  const DEFAULT_PADDING = 16;
2261
- const SwipeListControl = JSX(({ className, version, gap = DEFAULT_GAP, padding = DEFAULT_PADDING, visibleItemCount = 1, listType = 'horizontal-list', snapAlign, minHeight, showArrows, hasBlur, arrowsPadded, showDots, children, onVisibleIndicesChange, }) => {
2292
+ 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, }) => {
2262
2293
  const itemCount = Array.isArray(children) ? children.length : 0;
2263
2294
  const [containerRef, scroll] = useSwipeListScroll({
2264
2295
  itemCount,
2265
2296
  onVisibleIndicesChange,
2266
2297
  });
2267
2298
  const [activeIndex] = scroll.visibleIndicesRange;
2268
- 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 })] }));
2299
+ 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 })] }));
2269
2300
  });
2270
2301
 
2271
2302
  const renderCarouselBlocks = ({ blocksToRender, ...rest }) => (jsx(SwipeListControl, { visibleItemCount: 0, gap: 0, arrowsPadded: true, children: renderBlocksList(blocksToRender, {
@@ -3452,9 +3483,10 @@
3452
3483
  normal: 'lg:min-w-80 xl:min-w-96',
3453
3484
  big: 'lg:min-w-[515px]',
3454
3485
  };
3455
- const renderCarouselCards = ({ noCardBorder, cardSize = 'normal', ...rest }) => {
3486
+ const renderCarouselCards = ({ noCardBorder, cardSize = 'normal', isNavButtons = false, ...rest }) => {
3456
3487
  const { blocks: childBlocks } = rest.block || {};
3457
3488
  const someCardsHighlighted = childBlocks?.some(isCardHighlighted);
3489
+ const defaultPadding = isNavButtons ? { defaultPadding: 'p-6xl pb-m' } : {};
3458
3490
  return renderChildren({
3459
3491
  ...rest,
3460
3492
  renderProps: (block, options, blockIndex) => (jsxs("div", { className: cardWrapperStyle(block, { someCardsHighlighted }), children: [renderBlock$1(block, options, {
@@ -3463,6 +3495,7 @@
3463
3495
  showBorder: !noCardBorder,
3464
3496
  cardSize,
3465
3497
  }),
3498
+ ...defaultPadding,
3466
3499
  blockIndex,
3467
3500
  }), isCardHighlighted(block)
3468
3501
  ? renderCardHighlight({ className: 'absolute top-0 -right-4 z-40' })
@@ -3476,9 +3509,7 @@
3476
3509
 
3477
3510
  const VISIBLE_ITEM_COUNT = 0;
3478
3511
 
3479
- const Carousel = UniBlock(({ className, visibleItemCount = VISIBLE_ITEM_COUNT, noCardBorder, arrowsPadded = true, isGap = true, cardSize = 'normal', ...rest }) => {
3480
- 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 }) }) }));
3481
- }, {
3512
+ 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 }) }) })), {
3482
3513
  childrenTypes: [
3483
3514
  'CarouselCard',
3484
3515
  'CarouselCatalogCard',
@@ -3494,6 +3525,13 @@
3494
3525
  },
3495
3526
  }),
3496
3527
  });
3528
+ const getNavButton = (blocks) => blocks?.map((_) => {
3529
+ const content = _?.content;
3530
+ return {
3531
+ title: content?.title,
3532
+ description: content?.additionalDescription || content?.description,
3533
+ };
3534
+ }) ?? [];
3497
3535
 
3498
3536
  const titleSize = 'XS';
3499
3537
 
@@ -6089,7 +6127,7 @@
6089
6127
  slots: () => [HEADER_SLOT, FOOTER_SLOT, STICKY_FOOTER_SLOT],
6090
6128
  });
6091
6129
 
6092
- const packageVersion = "0.14.533";
6130
+ const packageVersion = "0.14.534";
6093
6131
 
6094
6132
  exports.Blocks = Blocks;
6095
6133
  exports.ContentPage = ContentPage;