@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
@@ -1,14 +1,19 @@
1
1
  import { type BlockVersion } from '../../model/BlockVersion';
2
+ import { type NavButtonProp } from './NavButtonProp';
2
3
  import { type SwipeListControlType } from './SwipeListControlContent';
4
+ import { type SwipeListScroll } from './useSwipeListScroll';
3
5
  interface SwipeListDotsProps {
4
6
  className?: string;
5
- containerRef?: {
6
- current: HTMLDivElement | null;
7
- };
8
7
  activeIndex?: number;
9
8
  dotCount?: number;
10
9
  listType?: SwipeListControlType;
11
10
  version?: BlockVersion;
11
+ navButtons?: NavButtonProp[];
12
+ onVisibleIndicesChange?: (indices: number[]) => void;
13
+ containerRef?: {
14
+ current: HTMLDivElement | null;
15
+ };
16
+ containerScroll?: SwipeListScroll;
12
17
  }
13
18
  export declare const SwipeListDots: import("@redneckz/uni-jsx").UNIComponent<SwipeListDotsProps, any, any>;
14
19
  export {};
@@ -1,27 +1,43 @@
1
1
  import { jsx as _jsx } from "@redneckz/uni-jsx/jsx-runtime";
2
2
  import { JSX } from '@redneckz/uni-jsx';
3
+ import { useCallback, useEffect } from '@redneckz/uni-jsx/lib/hooks';
4
+ import { useMobileMode } from '../../hooks/useMobileMode.js';
3
5
  import { style } from '../../utils/style.js';
6
+ import { renderDotButton } from './renderDotButton.js';
7
+ import { renderNavButton } from './renderNavButton.js';
8
+ import { SwipeListContainer } from './SwipeListContainer.js';
9
+ import { useSwipeListScroll } from './useSwipeListScroll.js';
4
10
  const containerStyles = {
5
11
  'horizontal-list': 'mx-auto mt-lg w-fit',
6
12
  'vertical-list': 'absolute flex-col justify-center h-full top-0 left-4',
7
13
  };
8
- const activeDotStyles = {
9
- 'horizontal-list': 'w-6',
10
- 'vertical-list': 'h-6',
11
- };
12
- const dotStyle = 'cursor-pointer rounded-full transition-width duration-300 bg-primary-main group-data-secondary:bg-white';
13
- const inactiveDotStyle = 'w-2 h-2 opacity-30';
14
- export const SwipeListDots = JSX(({ className = '', containerRef, activeIndex, dotCount = 0, listType = 'horizontal-list', version, }) => {
15
- const handleClick = (idx) => {
14
+ export const SwipeListDots = JSX(({ className = '', activeIndex = 0, dotCount = 0, listType = 'horizontal-list', version, navButtons = [], containerRef, containerScroll, }) => {
15
+ const isMobileMode = useMobileMode();
16
+ const [navRef, navScroll] = useSwipeListScroll({
17
+ itemCount: navButtons.length,
18
+ });
19
+ const scrollOption = getOptions(Boolean(navButtons?.length));
20
+ useEffect(() => {
21
+ if (navButtons?.length && activeIndex >= 0 && navRef?.current) {
22
+ navScroll.scrollTo(activeIndex, scrollOption);
23
+ }
24
+ }, [activeIndex]);
25
+ const onChangeActiveIndex = useCallback((idx) => {
16
26
  if (idx !== activeIndex && containerRef?.current) {
17
- containerRef.current.children[idx]?.scrollIntoView({
18
- behavior: 'smooth',
19
- block: 'nearest',
20
- });
27
+ containerScroll?.scrollTo(idx, scrollOption);
21
28
  }
22
- };
23
- return dotCount ? (_jsx("div", { className: style('flex gap-xs', containerStyles[listType], version ? 'group' : '', className), "data-ver": version, children: Array.from({ length: dotCount })
24
- .fill(null)
25
- .map((_, idx) => (_jsx("div", { className: `${dotStyle} ${idx === activeIndex ? activeDotStyles[listType] : inactiveDotStyle}`, role: "button", "aria-hidden": true, onClick: () => handleClick(idx) }, String(idx)))) })) : null;
29
+ }, [containerRef?.current]);
30
+ if (navButtons?.length && !isMobileMode) {
31
+ 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 })) }));
32
+ }
33
+ else if (dotCount) {
34
+ 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 })
35
+ .fill(null)
36
+ .map(renderDotButton({ activeIndex, onClick: onChangeActiveIndex, listType })) }));
37
+ }
38
+ return null;
39
+ });
40
+ const getOptions = (isAuto = false) => ({
41
+ behavior: isAuto ? 'auto' : 'smooth',
26
42
  });
27
43
  //# sourceMappingURL=SwipeListDots.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"SwipeListDots.js","sourceRoot":"","sources":["../../../src/ui-kit/SwipeListControl/SwipeListDots.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAExC,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAG1C,MAAM,eAAe,GAAyC;IAC5D,iBAAiB,EAAE,qBAAqB;IACxC,eAAe,EAAE,sDAAsD;CACxE,CAAC;AAEF,MAAM,eAAe,GAAyC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F,MAAM,UAAU,GAAG,CAAC,MAAM,GAAG,KAAK,EAAyB,EAAE,CAAC,CAAC;IAC7D,QAAQ,EAAE,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,QAAQ;CACrC,CAAC,CAAC"}
@@ -4,5 +4,6 @@ export interface SwipeListScrollButtonsProps extends SwipeListScrollButtonsConte
4
4
  className?: string;
5
5
  scroll: SwipeListScroll;
6
6
  hasBlur?: boolean;
7
+ isBottom?: boolean;
7
8
  }
8
9
  export declare const SwipeListScrollButtons: import("@redneckz/uni-jsx").UNIComponent<SwipeListScrollButtonsProps, any, any>;
@@ -2,11 +2,12 @@ import { jsx as _jsx, jsxs as _jsxs } from "@redneckz/uni-jsx/jsx-runtime";
2
2
  import { JSX } from '@redneckz/uni-jsx';
3
3
  import { style } from '../../utils/style.js';
4
4
  import { ScrollLeftButton, ScrollRightButton } from '../LinkButton/ArrowButton.js';
5
- const scrollButtonStyle = 'absolute top-[calc(50%-24px)] z-40';
6
5
  const blurBaseStyle = 'absolute top-0 bottom-0 z-40 hidden @lg:block w-20 pointer-events-none';
7
- export const SwipeListScrollButtons = JSX(({ className, scroll, hasBlur, arrowsPadded }) => {
6
+ export const SwipeListScrollButtons = JSX(({ className, scroll, hasBlur, arrowsPadded, isBottom }) => {
8
7
  const { canScrollLeft, canScrollRight, scrollLeft, scrollRight } = scroll;
9
- return (_jsxs("div", { className: style(className), children: [hasBlur ? renderBlur(scroll) : null, canScrollLeft ? (_jsx(ScrollLeftButton, { className: style(scrollButtonStyle, arrowsPadded ? 'left-1' : 'left-0'), onClick: scrollLeft })) : null, canScrollRight ? (_jsx(ScrollRightButton, { className: style(scrollButtonStyle, arrowsPadded ? 'right-1' : 'right-0'), onClick: scrollRight })) : null] }));
8
+ const isArrowPadded = arrowsPadded && !isBottom;
9
+ 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] }));
10
10
  });
11
11
  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] }));
12
+ const buttonStyle = (isBottom = false) => style('absolute z-40', isBottom ? 'bottom-[56px]' : 'top-[calc(50%-24px)]');
12
13
  //# sourceMappingURL=SwipeListScrollButtons.js.map
@@ -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,EAAE,MAAM,mBAAmB,CAAC;AAC1C,OAAO,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAIhF,MAAM,iBAAiB,GAAG,oCAAoC,CAAC;AAC/D,MAAM,aAAa,GAAG,wEAAwE,CAAC;AAQ/F,MAAM,CAAC,MAAM,sBAAsB,GAAG,GAAG,CACvC,CAAC,EAAE,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,YAAY,EAAE,EAAE,EAAE;IAC/C,MAAM,EAAE,aAAa,EAAE,cAAc,EAAE,UAAU,EAAE,WAAW,EAAE,GAAG,MAAM,CAAC;IAE1E,OAAO,CACL,eAAK,SAAS,EAAE,KAAK,CAAC,SAAS,CAAC,aAC7B,OAAO,CAAC,CAAC,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,IAAI,EACnC,aAAa,CAAC,CAAC,CAAC,CACf,KAAC,gBAAgB,IACf,SAAS,EAAE,KAAK,CAAC,iBAAiB,EAAE,YAAY,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC,EACvE,OAAO,EAAE,UAAU,GACnB,CACH,CAAC,CAAC,CAAC,IAAI,EACP,cAAc,CAAC,CAAC,CAAC,CAChB,KAAC,iBAAiB,IAChB,SAAS,EAAE,KAAK,CAAC,iBAAiB,EAAE,YAAY,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,EACzE,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"}
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,EAAE,MAAM,mBAAmB,CAAC;AAC1C,OAAO,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAIhF,MAAM,aAAa,GAAG,wEAAwE,CAAC;AAS/F,MAAM,CAAC,MAAM,sBAAsB,GAAG,GAAG,CACvC,CAAC,EAAE,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,YAAY,EAAE,QAAQ,EAAE,EAAE,EAAE;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C,eAAe,CAAC,CAAC,CAAC,sBAAsB,CAAC,CAAC"}
@@ -0,0 +1,3 @@
1
+ /// <reference types="react" />
2
+ import type { DotProp } from './NavButtonProp';
3
+ 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,3 @@
1
+ /// <reference types="react" />
2
+ import { type DotProp, type NavButtonProp } from './NavButtonProp';
3
+ 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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Z;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"}
@@ -3,6 +3,7 @@ import { SwipeListControl } from '../../ui-kit/SwipeListControl/SwipeListControl
3
3
  import { UniBlock } from '../../UniBlock/UniBlock';
4
4
  import { type UniBlockProps } from '../../UniBlock/UniBlockProps';
5
5
  import { style } from '../../utils/style';
6
+ import { type ProductBlockContent } from '../ProductBlock/ProductBlockContent';
6
7
  import { type CarouselContent } from './CarouselContent';
7
8
  import { ITEMS_GAP } from './itemsGap';
8
9
  import { renderCarouselCards } from './renderCarouselCards';
@@ -18,24 +19,24 @@ export const Carousel = UniBlock<CarouselProps>(
18
19
  arrowsPadded = true,
19
20
  isGap = true,
20
21
  cardSize = 'normal',
22
+ isNavButtons = false,
21
23
  ...rest
22
- }) => {
23
- return (
24
- <BlockWrapper className={style(className)} defaultPadding="p-6xl" {...rest}>
25
- <SwipeListControl
26
- className={style('relative max-w-full')}
27
- visibleItemCount={visibleItemCount}
28
- snapAlign="snap-start"
29
- gap={isGap ? ITEMS_GAP : 0}
30
- padding={0}
31
- arrowsPadded={arrowsPadded}
32
- hasBlur
33
- >
34
- {renderCarouselCards({ noCardBorder, cardSize, ...rest })}
35
- </SwipeListControl>
36
- </BlockWrapper>
37
- );
38
- },
24
+ }) => (
25
+ <BlockWrapper className={style(className)} defaultPadding="p-6xl" {...rest}>
26
+ <SwipeListControl
27
+ className={style('relative max-w-full')}
28
+ visibleItemCount={visibleItemCount}
29
+ snapAlign="snap-start"
30
+ gap={isGap ? ITEMS_GAP : 0}
31
+ padding={0}
32
+ arrowsPadded={arrowsPadded}
33
+ navButtons={isNavButtons ? getNavButton(rest?.block?.blocks) : []}
34
+ hasBlur
35
+ >
36
+ {renderCarouselCards({ noCardBorder, cardSize, isNavButtons, ...rest })}
37
+ </SwipeListControl>
38
+ </BlockWrapper>
39
+ ),
39
40
  {
40
41
  childrenTypes: [
41
42
  'CarouselCard',
@@ -53,3 +54,13 @@ export const Carousel = UniBlock<CarouselProps>(
53
54
  }),
54
55
  },
55
56
  );
57
+
58
+ const getNavButton = (blocks?: { content?: ProductBlockContent }[]) =>
59
+ blocks?.map((_) => {
60
+ const content = _?.content;
61
+
62
+ return {
63
+ title: content?.title,
64
+ description: content?.additionalDescription || content?.description,
65
+ };
66
+ }) ?? [];
@@ -16,6 +16,8 @@ export type CarouselContent = UniBlockContent & {
16
16
  arrowsPadded?: boolean;
17
17
  /** @title Отступы между карточками */
18
18
  isGap?: boolean;
19
+ /** @title Показывать кнопки навигации */
20
+ isNavButtons?: boolean;
19
21
  /** @title Не показывать контур на карточках */
20
22
  noCardBorder?: boolean;
21
23
  cardSize?: CardSizeMode;
@@ -19,10 +19,16 @@ const CARD_SIZE_MAP: Record<CardSizeMode, string> = {
19
19
  export const renderCarouselCards = ({
20
20
  noCardBorder,
21
21
  cardSize = 'normal',
22
+ isNavButtons = false,
22
23
  ...rest
23
- }: UniBlockProps & { noCardBorder?: boolean; cardSize?: CardSizeMode }) => {
24
+ }: UniBlockProps & {
25
+ noCardBorder?: boolean;
26
+ cardSize?: CardSizeMode;
27
+ isNavButtons?: boolean;
28
+ }) => {
24
29
  const { blocks: childBlocks } = rest.block || {};
25
30
  const someCardsHighlighted = childBlocks?.some(isCardHighlighted);
31
+ const defaultPadding = isNavButtons ? { defaultPadding: 'p-6xl pb-m' } : {};
26
32
 
27
33
  return renderChildren({
28
34
  ...rest,
@@ -34,6 +40,7 @@ export const renderCarouselCards = ({
34
40
  showBorder: !noCardBorder,
35
41
  cardSize,
36
42
  }),
43
+ ...defaultPadding,
37
44
  blockIndex,
38
45
  })}
39
46
  {isCardHighlighted(block)
@@ -8,13 +8,18 @@ import { type ProductBlockContent } from './ProductBlockContent';
8
8
  export interface ProductBlockProps extends UniBlockProps, ProductBlockContent {}
9
9
 
10
10
  export const ProductBlock = UniBlock<ProductBlockProps>(
11
- ({ className, padding, ...rest }) => (
11
+ ({ className, padding, defaultPadding, ...rest }) => (
12
12
  <BlockWrapper
13
13
  className={style('overflow-hidden flex flex-col gap-3xl box-border', className)}
14
14
  padding="p-0"
15
15
  {...rest}
16
16
  >
17
- <BaseProductTile defaultPadding="p-6xl" padding={padding} className="grow h-full" {...rest} />
17
+ <BaseProductTile
18
+ defaultPadding={defaultPadding || 'p-6xl'}
19
+ padding={padding}
20
+ className="grow h-full"
21
+ {...rest}
22
+ />
18
23
  </BlockWrapper>
19
24
  ),
20
25
  { childrenTypes: ['UnitBlock'] },
@@ -1,3 +1,4 @@
1
+ import { type AdditionalDescriptionProps } from '../../model/HeadlineType';
1
2
  import { type BaseProductTileContent } from '../../ui-kit/BaseProductTile/BaseProductTileContent';
2
3
  import { type UniBlockContent } from '../../UniBlock/UniBlockProps';
3
4
 
@@ -5,7 +6,8 @@ import { type UniBlockContent } from '../../UniBlock/UniBlockProps';
5
6
  * @title Продуктовый блок
6
7
  */
7
8
  export type ProductBlockContent = UniBlockContent &
8
- BaseProductTileContent & {
9
+ BaseProductTileContent &
10
+ AdditionalDescriptionProps & {
9
11
  /** @title Отображать кнопку возврата */
10
12
  backwardButton?: boolean;
11
13
  };
@@ -2,7 +2,6 @@ import { type BlockVersion } from '../../model/BlockVersion';
2
2
  import { type BulletsProps } from '../../model/Bullets';
3
3
  import { type DescriptionProps, type LabelProps, type TitleProps } from '../../model/HeadlineType';
4
4
  import { type IconProps } from '../../model/Picture';
5
- import { type ImageContent } from '../../ui-kit/Img/ImgProps';
6
5
  import { type ButtonsSectionContent } from '../../ui-kit/LinkButton/ButtonsSectionContent';
7
6
  import { type LinkButtonContent } from '../../ui-kit/LinkButton/LinkButtonContent';
8
7
  import type { RichTextProps } from '../../ui-kit/RichText/RichTextProps';
@@ -12,7 +11,6 @@ import { type UniBlockContent } from '../../UniBlock/UniBlockProps';
12
11
  * @title Шаг
13
12
  */
14
13
  export type StepProps = DescriptionProps &
15
- ImageContent &
16
14
  LabelProps &
17
15
  RichTextProps &
18
16
  IconProps &
@@ -1,5 +1,4 @@
1
1
  import { type BlockVersion } from '../../model/BlockVersion';
2
- import { type LinkButtonVersion } from '../../model/LinkButtonVersion';
3
2
  import { type VNode } from '../../model/VNode';
4
3
  import { LinkButton } from '../../ui-kit/LinkButton/LinkButton';
5
4
  import { RichText } from '../../ui-kit/RichText/RichText';
@@ -43,7 +42,7 @@ export const renderStep =
43
42
  {button?.text ? (
44
43
  <LinkButton
45
44
  className="box-border py-s w-full max-w-60 mt-auto"
46
- version={version as LinkButtonVersion}
45
+ version={version}
47
46
  {...button}
48
47
  >
49
48
  {button?.text}
@@ -1,6 +1,5 @@
1
1
  import { type BlockVersion } from '../../model/BlockVersion';
2
2
  import { type IconVersion } from '../../model/IconVersion';
3
- import { type LinkButtonVersion } from '../../model/LinkButtonVersion';
4
3
  import { BlockWrapper } from '../../ui-kit/BlockWrapper';
5
4
  import { Img } from '../../ui-kit/Img/Img';
6
5
  import { LinkButton } from '../../ui-kit/LinkButton/LinkButton';
@@ -17,14 +16,11 @@ const styleMap = STEPS_BLOCK_STYLE;
17
16
  export const renderStepMobile =
18
17
  (stepsSize: boolean, version: BlockVersion, stepVersion: BlockVersion) =>
19
18
  (step: StepProps, i: number) => {
20
- const { button, image } = step;
21
-
22
- const styleStepMobile = button?.text && image?.src;
19
+ const { button } = step;
23
20
 
24
21
  return (
25
22
  <div key={String(i)} className="contents">
26
- <div className={style('flex items-center relative', image?.src ? 'flex-col' : 'flex-row')}>
27
- {image?.src ? renderText(step) : null}
23
+ <div className="flex items-center relative flex-row">
28
24
  <div className="overflow-hidden flex flex-shrink-0 items-center">
29
25
  {renderIconArea(stepsSize, stepVersion)(step, i)}
30
26
  </div>
@@ -33,11 +29,11 @@ export const renderStepMobile =
33
29
  'min-h-6xl': stepsSize,
34
30
  })}
35
31
  >
36
- {image?.src ? null : renderText(step)}
37
- {styleStepMobile ? (
32
+ {renderText(step)}
33
+ {button?.text ? (
38
34
  <LinkButton
39
35
  className="box-border py-s w-full max-w-60 mt-lg"
40
- version={version as LinkButtonVersion}
36
+ version={version}
41
37
  {...button}
42
38
  >
43
39
  {button?.text}
@@ -55,15 +51,10 @@ const renderIconArea =
55
51
  const isImg = Boolean(step?.icon?.src);
56
52
  const iconAreaSize = getIconAreaSize(stepsSize, isImg);
57
53
  const containerVersion = isImg ? stepVersion === 'transparent' : stepVersion;
58
- const isImgSrc = step.image?.src;
59
54
 
60
55
  return (
61
56
  <BlockWrapper
62
- className={style(
63
- { 'w-32': Boolean(isImgSrc) },
64
- 'z-10 mr-s flex justify-center content-center rounded-md',
65
- !isImgSrc && iconAreaSize,
66
- )}
57
+ className={style('z-10 mr-s flex justify-center content-center rounded-md', iconAreaSize)}
67
58
  defaultPadding=""
68
59
  version={containerVersion as BlockVersion}
69
60
  >
@@ -75,14 +66,8 @@ const renderIconArea =
75
66
  };
76
67
 
77
68
  const renderText = (step: StepProps) => {
78
- const visibleStyle = Boolean(step.button?.text && step.image?.src);
79
-
80
69
  return (
81
- <div
82
- className={style({
83
- 'mb-lg w-full': visibleStyle,
84
- })}
85
- >
70
+ <div>
86
71
  {step?.label ? (
87
72
  <Paragraph size="text-l" align="text-left">
88
73
  {step.label}
@@ -112,21 +97,15 @@ const renderIcon = ({
112
97
  iconVersion: IconVersion;
113
98
  i: number;
114
99
  stepVersion: BlockVersion;
115
- }) => {
116
- if (isIcon(step?.icon)) {
117
- return (
118
- <Img
119
- image={{ ...step.icon, iconVersion: step.icon?.iconVersion || iconVersion }}
120
- imageClassName="max-w-full max-h-full"
121
- width="24"
122
- height="24"
123
- />
124
- );
125
- } else if (isIcon(step.image)) {
126
- return <Img image={{ ...step.image, size: { width: 120, height: 120 } }} />;
127
- }
128
-
129
- return (
100
+ }) =>
101
+ isIcon(step?.icon) ? (
102
+ <Img
103
+ image={{ ...step.icon, iconVersion: step.icon?.iconVersion || iconVersion }}
104
+ imageClassName="max-w-full max-h-full"
105
+ width="24"
106
+ height="24"
107
+ />
108
+ ) : (
130
109
  <span
131
110
  className={style(
132
111
  'text-h4',
@@ -136,4 +115,3 @@ const renderIcon = ({
136
115
  {i + 1}
137
116
  </span>
138
117
  );
139
- };
@@ -10,7 +10,7 @@ export const ButtonInner = JSX<LinkButtonProps>((props) => {
10
10
  const iconHideStyle = isWithText(props) ? 'hidden lg:block' : '';
11
11
 
12
12
  return (
13
- <div className={style(getButtonStyle(props), 'flex gap-xs')}>
13
+ <div className={style(buttonStyle(props), 'flex gap-xs')}>
14
14
  {appendLeft ? (
15
15
  <div className={style(iconHideStyle, iconStyleMap[version])}>{appendLeft}</div>
16
16
  ) : null}
@@ -27,7 +27,7 @@ export const ButtonInner = JSX<LinkButtonProps>((props) => {
27
27
  );
28
28
  });
29
29
 
30
- const getButtonStyle = (props: LinkButtonContent) => {
30
+ const buttonStyle = (props: LinkButtonContent) => {
31
31
  const { version, aboveText, rounded } = props;
32
32
 
33
33
  if (version === 'link') {
@@ -0,0 +1,11 @@
1
+ import { type DescriptionProps, type TitleProps } from '../../model/HeadlineType';
2
+ import type { SwipeListControlType } from './SwipeListControlContent';
3
+
4
+ export interface DotProp {
5
+ activeIndex?: number;
6
+ onClick: (i: number) => void;
7
+ listType?: SwipeListControlType;
8
+ }
9
+
10
+ /** @title Кнопка под слайдом */
11
+ export type NavButtonProp = TitleProps & DescriptionProps;
@@ -1,6 +1,7 @@
1
1
  import { JSX } from '@redneckz/uni-jsx';
2
2
  import { type BlockVersion } from '../../model/BlockVersion';
3
3
  import { style } from '../../utils/style';
4
+ import { type NavButtonProp } from './NavButtonProp';
4
5
  import { SwipeListContainer, type SnapAlign } from './SwipeListContainer';
5
6
  import { type SwipeListControlContent } from './SwipeListControlContent';
6
7
  import { SwipeListDots } from './SwipeListDots';
@@ -24,6 +25,7 @@ interface SwipeListControlProps extends SwipeListControlContent {
24
25
  snapAlign?: SnapAlign;
25
26
  hasBlur?: boolean;
26
27
  onVisibleIndicesChange?: (indices: number[]) => void;
28
+ navButtons?: NavButtonProp[];
27
29
  }
28
30
 
29
31
  export const SwipeListControl = JSX<SwipeListControlProps>(
@@ -42,6 +44,7 @@ export const SwipeListControl = JSX<SwipeListControlProps>(
42
44
  showDots,
43
45
  children,
44
46
  onVisibleIndicesChange,
47
+ navButtons,
45
48
  }) => {
46
49
  const itemCount = Array.isArray(children) ? children.length : 0;
47
50
 
@@ -71,14 +74,17 @@ export const SwipeListControl = JSX<SwipeListControlProps>(
71
74
  scroll={scroll}
72
75
  hasBlur={hasBlur}
73
76
  arrowsPadded={arrowsPadded}
77
+ isBottom={Boolean(navButtons?.length)}
74
78
  />
75
79
  <SwipeListDots
76
80
  className={style(!showDots && 'lg:hidden')}
77
- containerRef={containerRef}
78
81
  activeIndex={activeIndex}
79
82
  dotCount={itemCount}
80
83
  listType={listType}
81
84
  version={version}
85
+ navButtons={navButtons}
86
+ containerRef={containerRef}
87
+ containerScroll={scroll}
82
88
  />
83
89
  </div>
84
90
  );