@redneckz/wildless-cms-uni-blocks 0.6.50 → 0.7.1

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 (188) hide show
  1. package/bundle/blocks.schema.json +1 -1
  2. package/bundle/bundle.umd.js +71 -19
  3. package/bundle/bundle.umd.min.js +1 -1
  4. package/bundle/components/CarouselTariffsCard/CarouselTariffsCard.d.ts +1 -1
  5. package/bundle/components/CarouselTariffsCard/CarouselTariffsCardContent.d.ts +1 -1
  6. package/bundle/components/LinkDocs/LinkDocsContent.d.ts +4 -0
  7. package/bundle/components/SwipeListControlBlock/SwipeListControlBlock.d.ts +6 -0
  8. package/bundle/components/SwipeListControlBlock/SwipeListControlBlockContent.d.ts +5 -0
  9. package/bundle/ui-kit/SwipeListControl/SwipeListContainer.d.ts +2 -1
  10. package/bundle/ui-kit/SwipeListControl/SwipeListControlDots.d.ts +2 -0
  11. package/bundle/ui-kit/SwipeListControl/SwipeListControlProps.d.ts +7 -0
  12. package/bundle/utils/style.d.ts +1 -0
  13. package/dist/components/Blocks.js +2 -0
  14. package/dist/components/Blocks.js.map +1 -1
  15. package/dist/components/CarouselCard/CarouselCard.js +2 -2
  16. package/dist/components/CarouselCard/CarouselCard.js.map +1 -1
  17. package/dist/components/CarouselProgramsCard/CarouselProgramsCard.js +1 -1
  18. package/dist/components/CarouselProgramsCard/CarouselProgramsCard.js.map +1 -1
  19. package/dist/components/CarouselTariffsCard/CarouselTariffsCard.d.ts +1 -1
  20. package/dist/components/CarouselTariffsCard/CarouselTariffsCard.js +12 -9
  21. package/dist/components/CarouselTariffsCard/CarouselTariffsCard.js.map +1 -1
  22. package/dist/components/CarouselTariffsCard/CarouselTariffsCardContent.d.ts +1 -1
  23. package/dist/components/LinkDocs/LinkDocsContent.d.ts +4 -0
  24. package/dist/components/SwipeListControlBlock/SwipeListControlBlock.d.ts +6 -0
  25. package/dist/components/SwipeListControlBlock/SwipeListControlBlock.js +14 -0
  26. package/dist/components/SwipeListControlBlock/SwipeListControlBlock.js.map +1 -0
  27. package/dist/components/SwipeListControlBlock/SwipeListControlBlockContent.d.ts +5 -0
  28. package/dist/components/SwipeListControlBlock/SwipeListControlBlockContent.js +2 -0
  29. package/dist/components/SwipeListControlBlock/SwipeListControlBlockContent.js.map +1 -0
  30. package/dist/ui-kit/BlockWrapper.js +1 -1
  31. package/dist/ui-kit/BlockWrapper.js.map +1 -1
  32. package/dist/ui-kit/SwipeListControl/SwipeListContainer.d.ts +2 -1
  33. package/dist/ui-kit/SwipeListControl/SwipeListContainer.js +8 -5
  34. package/dist/ui-kit/SwipeListControl/SwipeListContainer.js.map +1 -1
  35. package/dist/ui-kit/SwipeListControl/SwipeListControl.js +3 -2
  36. package/dist/ui-kit/SwipeListControl/SwipeListControl.js.map +1 -1
  37. package/dist/ui-kit/SwipeListControl/SwipeListControlDots.d.ts +2 -0
  38. package/dist/ui-kit/SwipeListControl/SwipeListControlDots.js +12 -3
  39. package/dist/ui-kit/SwipeListControl/SwipeListControlDots.js.map +1 -1
  40. package/dist/ui-kit/SwipeListControl/SwipeListControlProps.d.ts +7 -0
  41. package/dist/utils/style.d.ts +1 -0
  42. package/dist/utils/style.js +5 -0
  43. package/dist/utils/style.js.map +1 -0
  44. package/lib/common.css +1 -1
  45. package/lib/components/Blocks.js +2 -0
  46. package/lib/components/Blocks.js.map +1 -1
  47. package/lib/components/CarouselCard/CarouselCard.js +2 -2
  48. package/lib/components/CarouselCard/CarouselCard.js.map +1 -1
  49. package/lib/components/CarouselProgramsCard/CarouselProgramsCard.js +1 -1
  50. package/lib/components/CarouselProgramsCard/CarouselProgramsCard.js.map +1 -1
  51. package/lib/components/CarouselTariffsCard/CarouselTariffsCard.d.ts +1 -1
  52. package/lib/components/CarouselTariffsCard/CarouselTariffsCard.js +12 -9
  53. package/lib/components/CarouselTariffsCard/CarouselTariffsCard.js.map +1 -1
  54. package/lib/components/CarouselTariffsCard/CarouselTariffsCardContent.d.ts +1 -1
  55. package/lib/components/LinkDocs/LinkDocsContent.d.ts +4 -0
  56. package/lib/components/SwipeListControlBlock/SwipeListControlBlock.d.ts +6 -0
  57. package/lib/components/SwipeListControlBlock/SwipeListControlBlock.fixture.d.ts +5 -0
  58. package/lib/components/SwipeListControlBlock/SwipeListControlBlock.js +12 -0
  59. package/lib/components/SwipeListControlBlock/SwipeListControlBlock.js.map +1 -0
  60. package/lib/components/SwipeListControlBlock/SwipeListControlBlockContent.d.ts +5 -0
  61. package/lib/components/SwipeListControlBlock/SwipeListControlBlockContent.js +2 -0
  62. package/lib/components/SwipeListControlBlock/SwipeListControlBlockContent.js.map +1 -0
  63. package/lib/ui-kit/BlockWrapper.js +1 -1
  64. package/lib/ui-kit/BlockWrapper.js.map +1 -1
  65. package/lib/ui-kit/SwipeListControl/SwipeListContainer.d.ts +2 -1
  66. package/lib/ui-kit/SwipeListControl/SwipeListContainer.js +8 -5
  67. package/lib/ui-kit/SwipeListControl/SwipeListContainer.js.map +1 -1
  68. package/lib/ui-kit/SwipeListControl/SwipeListControl.fixture.mobile.d.ts +1 -0
  69. package/lib/ui-kit/SwipeListControl/SwipeListControl.js +3 -2
  70. package/lib/ui-kit/SwipeListControl/SwipeListControl.js.map +1 -1
  71. package/lib/ui-kit/SwipeListControl/SwipeListControlDots.d.ts +2 -0
  72. package/lib/ui-kit/SwipeListControl/SwipeListControlDots.js +12 -3
  73. package/lib/ui-kit/SwipeListControl/SwipeListControlDots.js.map +1 -1
  74. package/lib/ui-kit/SwipeListControl/SwipeListControlProps.d.ts +7 -0
  75. package/lib/utils/style.d.ts +1 -0
  76. package/lib/utils/style.js +2 -0
  77. package/lib/utils/style.js.map +1 -0
  78. package/mobile/bundle/bundle.umd.js +25 -12
  79. package/mobile/bundle/bundle.umd.min.js +1 -1
  80. package/mobile/bundle/components/CarouselTariffsCard/CarouselTariffsCard.d.ts +1 -1
  81. package/mobile/bundle/components/CarouselTariffsCard/CarouselTariffsCardContent.d.ts +1 -1
  82. package/mobile/bundle/components/LinkDocs/LinkDocsContent.d.ts +4 -0
  83. package/mobile/bundle/components/SwipeListControlBlock/SwipeListControlBlock.d.ts +6 -0
  84. package/mobile/bundle/components/SwipeListControlBlock/SwipeListControlBlockContent.d.ts +5 -0
  85. package/mobile/bundle/ui-kit/SwipeListControl/SwipeListContainer.d.ts +2 -1
  86. package/mobile/bundle/ui-kit/SwipeListControl/SwipeListControlDots.d.ts +2 -0
  87. package/mobile/bundle/ui-kit/SwipeListControl/SwipeListControlProps.d.ts +7 -0
  88. package/mobile/bundle/utils/style.d.ts +1 -0
  89. package/mobile/dist/components/CarouselCard/CarouselCard.js +2 -2
  90. package/mobile/dist/components/CarouselCard/CarouselCard.js.map +1 -1
  91. package/mobile/dist/components/CarouselProgramsCard/CarouselProgramsCard.js +1 -1
  92. package/mobile/dist/components/CarouselProgramsCard/CarouselProgramsCard.js.map +1 -1
  93. package/mobile/dist/components/CarouselTariffsCard/CarouselTariffsCard.d.ts +1 -1
  94. package/mobile/dist/components/CarouselTariffsCard/CarouselTariffsCard.js +12 -9
  95. package/mobile/dist/components/CarouselTariffsCard/CarouselTariffsCard.js.map +1 -1
  96. package/mobile/dist/components/CarouselTariffsCard/CarouselTariffsCardContent.d.ts +1 -1
  97. package/mobile/dist/components/LinkDocs/LinkDocsContent.d.ts +4 -0
  98. package/mobile/dist/components/SwipeListControlBlock/SwipeListControlBlock.d.ts +6 -0
  99. package/mobile/dist/components/SwipeListControlBlock/SwipeListControlBlock.js +14 -0
  100. package/mobile/dist/components/SwipeListControlBlock/SwipeListControlBlock.js.map +1 -0
  101. package/mobile/dist/components/SwipeListControlBlock/SwipeListControlBlockContent.d.ts +5 -0
  102. package/mobile/dist/components/SwipeListControlBlock/SwipeListControlBlockContent.js +2 -0
  103. package/mobile/dist/components/SwipeListControlBlock/SwipeListControlBlockContent.js.map +1 -0
  104. package/mobile/dist/ui-kit/BlockWrapper.js +1 -1
  105. package/mobile/dist/ui-kit/BlockWrapper.js.map +1 -1
  106. package/mobile/dist/ui-kit/SwipeListControl/SwipeListContainer.d.ts +2 -1
  107. package/mobile/dist/ui-kit/SwipeListControl/SwipeListContainer.js +8 -5
  108. package/mobile/dist/ui-kit/SwipeListControl/SwipeListContainer.js.map +1 -1
  109. package/mobile/dist/ui-kit/SwipeListControl/SwipeListControl.js +3 -2
  110. package/mobile/dist/ui-kit/SwipeListControl/SwipeListControl.js.map +1 -1
  111. package/mobile/dist/ui-kit/SwipeListControl/SwipeListControlDots.d.ts +2 -0
  112. package/mobile/dist/ui-kit/SwipeListControl/SwipeListControlDots.js +12 -3
  113. package/mobile/dist/ui-kit/SwipeListControl/SwipeListControlDots.js.map +1 -1
  114. package/mobile/dist/ui-kit/SwipeListControl/SwipeListControlProps.d.ts +7 -0
  115. package/mobile/dist/utils/style.d.ts +1 -0
  116. package/mobile/dist/utils/style.js +5 -0
  117. package/mobile/dist/utils/style.js.map +1 -0
  118. package/mobile/lib/components/CarouselCard/CarouselCard.js +2 -2
  119. package/mobile/lib/components/CarouselCard/CarouselCard.js.map +1 -1
  120. package/mobile/lib/components/CarouselProgramsCard/CarouselProgramsCard.js +1 -1
  121. package/mobile/lib/components/CarouselProgramsCard/CarouselProgramsCard.js.map +1 -1
  122. package/mobile/lib/components/CarouselTariffsCard/CarouselTariffsCard.d.ts +1 -1
  123. package/mobile/lib/components/CarouselTariffsCard/CarouselTariffsCard.js +12 -9
  124. package/mobile/lib/components/CarouselTariffsCard/CarouselTariffsCard.js.map +1 -1
  125. package/mobile/lib/components/CarouselTariffsCard/CarouselTariffsCardContent.d.ts +1 -1
  126. package/mobile/lib/components/LinkDocs/LinkDocsContent.d.ts +4 -0
  127. package/mobile/lib/components/SwipeListControlBlock/SwipeListControlBlock.d.ts +6 -0
  128. package/mobile/lib/components/SwipeListControlBlock/SwipeListControlBlock.js +12 -0
  129. package/mobile/lib/components/SwipeListControlBlock/SwipeListControlBlock.js.map +1 -0
  130. package/mobile/lib/components/SwipeListControlBlock/SwipeListControlBlockContent.d.ts +5 -0
  131. package/mobile/lib/components/SwipeListControlBlock/SwipeListControlBlockContent.js +2 -0
  132. package/mobile/lib/components/SwipeListControlBlock/SwipeListControlBlockContent.js.map +1 -0
  133. package/mobile/lib/ui-kit/BlockWrapper.js +1 -1
  134. package/mobile/lib/ui-kit/BlockWrapper.js.map +1 -1
  135. package/mobile/lib/ui-kit/SwipeListControl/SwipeListContainer.d.ts +2 -1
  136. package/mobile/lib/ui-kit/SwipeListControl/SwipeListContainer.js +8 -5
  137. package/mobile/lib/ui-kit/SwipeListControl/SwipeListContainer.js.map +1 -1
  138. package/mobile/lib/ui-kit/SwipeListControl/SwipeListControl.js +3 -2
  139. package/mobile/lib/ui-kit/SwipeListControl/SwipeListControl.js.map +1 -1
  140. package/mobile/lib/ui-kit/SwipeListControl/SwipeListControlDots.d.ts +2 -0
  141. package/mobile/lib/ui-kit/SwipeListControl/SwipeListControlDots.js +12 -3
  142. package/mobile/lib/ui-kit/SwipeListControl/SwipeListControlDots.js.map +1 -1
  143. package/mobile/lib/ui-kit/SwipeListControl/SwipeListControlProps.d.ts +7 -0
  144. package/mobile/lib/utils/style.d.ts +1 -0
  145. package/mobile/lib/utils/style.js +2 -0
  146. package/mobile/lib/utils/style.js.map +1 -0
  147. package/mobile/src/common.css +11 -0
  148. package/mobile/src/components/Carousel/Carousel.ui.json +8 -0
  149. package/mobile/src/components/CarouselCard/CarouselCard.tsx +11 -5
  150. package/mobile/src/components/CarouselProgramsCard/CarouselProgramsCard.tsx +1 -1
  151. package/mobile/src/components/CarouselTariffsCard/CarouselTariffsCard.example.json +11 -3
  152. package/mobile/src/components/CarouselTariffsCard/CarouselTariffsCard.tsx +29 -17
  153. package/mobile/src/components/CarouselTariffsCard/CarouselTariffsCardContent.ts +1 -1
  154. package/mobile/src/components/LinkDocs/LinkDocsContent.ts +4 -0
  155. package/mobile/src/components/SwipeListControlBlock/SwipeListControlBlock.example.json +18 -0
  156. package/mobile/src/components/SwipeListControlBlock/SwipeListControlBlock.tsx +23 -0
  157. package/mobile/src/components/SwipeListControlBlock/SwipeListControlBlock.ui.json +1 -0
  158. package/mobile/src/components/SwipeListControlBlock/SwipeListControlBlockContent.ts +6 -0
  159. package/mobile/src/ui-kit/BlockWrapper.tsx +1 -1
  160. package/mobile/src/ui-kit/SwipeListControl/SwipeListContainer.tsx +19 -10
  161. package/mobile/src/ui-kit/SwipeListControl/SwipeListControl.tsx +6 -2
  162. package/mobile/src/ui-kit/SwipeListControl/SwipeListControlDots.tsx +20 -4
  163. package/mobile/src/ui-kit/SwipeListControl/SwipeListControlProps.ts +8 -0
  164. package/mobile/src/utils/style.ts +2 -0
  165. package/package.json +2 -2
  166. package/src/common.css +11 -0
  167. package/src/components/Blocks.ts +2 -0
  168. package/src/components/Carousel/Carousel.ui.json +8 -0
  169. package/src/components/CarouselCard/CarouselCard.tsx +11 -5
  170. package/src/components/CarouselProgramsCard/CarouselProgramsCard.tsx +1 -1
  171. package/src/components/CarouselTariffsCard/CarouselTariffsCard.example.json +11 -3
  172. package/src/components/CarouselTariffsCard/CarouselTariffsCard.fixture.tsx +3 -3
  173. package/src/components/CarouselTariffsCard/CarouselTariffsCard.tsx +29 -17
  174. package/src/components/CarouselTariffsCard/CarouselTariffsCardContent.ts +1 -1
  175. package/src/components/LinkDocs/LinkDocsContent.ts +4 -0
  176. package/src/components/SwipeListControlBlock/SwipeListControlBlock.example.json +18 -0
  177. package/src/components/SwipeListControlBlock/SwipeListControlBlock.fixture.tsx +27 -0
  178. package/src/components/SwipeListControlBlock/SwipeListControlBlock.tsx +23 -0
  179. package/src/components/SwipeListControlBlock/SwipeListControlBlock.ui.json +1 -0
  180. package/src/components/SwipeListControlBlock/SwipeListControlBlockContent.ts +6 -0
  181. package/src/icons/IconName.ts +333 -6
  182. package/src/ui-kit/BlockWrapper.tsx +1 -1
  183. package/src/ui-kit/SwipeListControl/SwipeListContainer.tsx +19 -10
  184. package/src/ui-kit/SwipeListControl/SwipeListControl.fixture.mobile.tsx +6 -1
  185. package/src/ui-kit/SwipeListControl/SwipeListControl.tsx +6 -2
  186. package/src/ui-kit/SwipeListControl/SwipeListControlDots.tsx +20 -4
  187. package/src/ui-kit/SwipeListControl/SwipeListControlProps.ts +8 -0
  188. package/src/utils/style.ts +2 -0
@@ -1 +1 @@
1
- {"version":3,"file":"SwipeListContainer.js","sourceRoot":"","sources":["../../../src/ui-kit/SwipeListControl/SwipeListContainer.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AACxC,OAAO,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,6BAA6B,CAAC;AAElE,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAEtD,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAmBhD,MAAM,aAAa,GAAG,CAAC,cAAc,EAAE,aAAa,EAAE,gBAAgB,EAAE,aAAa,CAAC,CAAC;AAEvF,MAAM,CAAC,MAAM,kBAAkB,GAAG,GAAG,CACnC,CAAC,EACC,SAAS,GAAG,EAAE,EACd,YAAY,EACZ,WAAW,EACX,gBAAgB,GAAG,CAAC,EACpB,GAAG,GAAG,CAAC,EACP,OAAO,GAAG,CAAC,EACX,SAAS,GAAG,aAAa,EACzB,QAAQ,EACR,oBAAoB,EACpB,sBAAsB,GACvB,EAAE,EAAE;IACH,MAAM,eAAe,GAAgC;QACnD,WAAW,EAAE,CAAC;QACd,OAAO,EAAE,YAAY;KACtB,CAAC;IAEF,MAAM,sBAAsB,GAAG,MAAM,CAAsB,EAAE,CAAC,CAAC;IAC/D,MAAM,kBAAkB,GAAG,WAAW,CACpC,CAAC,GAAW,EAAE,KAAgC,EAAE,EAAE;QAChD,MAAM,mBAAmB,GAAG,CAAC,GAAG,CAAC,sBAAsB,CAAC,OAAO,IAAI,EAAE,CAAC,CAAC,CAAC;QACxE,mBAAmB,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC;QACjC,sBAAsB,CAAC,OAAO,GAAG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xs } from "@redneckz/uni-jsx/jsx-runtime";
2
2
  import { JSX } from '@redneckz/uni-jsx';
3
+ import { style } from '../../utils/style.js';
3
4
  import { SwipeListContainer } from './SwipeListContainer.js';
4
5
  import { SwipeListControlDots } from './SwipeListControlDots.js';
5
6
  import { useSwipeListScroll } from './useSwipeListScroll.js';
@@ -10,13 +11,13 @@ const DEFAULT_GAP = 14;
10
11
  and get rid of a clipping effect caused by overflow: hidden.
11
12
  */
12
13
  const DEFAULT_PADDING = 16;
13
- export const SwipeListControl = JSX(({ className, gap = DEFAULT_GAP, padding = DEFAULT_PADDING, showDots = true, children, onVisibleIndicesChange, }) => {
14
+ export const SwipeListControl = JSX(({ className = '', gap = DEFAULT_GAP, padding = DEFAULT_PADDING, showDots = true, children, onVisibleIndicesChange, listType = 'horizontal-list', }) => {
14
15
  const itemCount = Array.isArray(children) ? children.length : 0;
15
16
  const [containerRef, scroll] = useSwipeListScroll({
16
17
  itemCount,
17
18
  onVisibleIndicesChange,
18
19
  });
19
20
  const [activeIndex] = scroll.visibleIndicesRange;
20
- return (_jsxs("div", { className: className, children: [_jsx(SwipeListContainer, { containerRef: containerRef, activeIndex: activeIndex, visibleItemCount: 1, gap: gap, padding: padding, onVisibleIndicesChange: scroll.handleVisibleIndicesChange, children: children }), showDots ? (_jsx(SwipeListControlDots, { containerRef: containerRef, activeIndex: activeIndex, dotCount: itemCount })) : null] }));
21
+ return (_jsxs("div", { className: style(className, listType === 'vertical-list' ? 'relative h-full' : ''), children: [_jsx(SwipeListContainer, { containerRef: containerRef, activeIndex: activeIndex, visibleItemCount: 1, gap: gap, padding: padding, onVisibleIndicesChange: scroll.handleVisibleIndicesChange, listType: listType, children: children }), showDots ? (_jsx(SwipeListControlDots, { containerRef: containerRef, activeIndex: activeIndex, dotCount: itemCount, listType: listType })) : null] }));
21
22
  });
22
23
  //# sourceMappingURL=SwipeListControl.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"SwipeListControl.js","sourceRoot":"","sources":["../../../src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B,EAAE,CAAC,EACnB,GAAG,EAAE,GAAG,EACR,OAAO,EAAE,OAAO,EAChB,sBAAsB,EAAE,MAAM,CAAC,0BAA0B,EACzD,QAAQ,EAAE,QAAQ,YAEjB,QAAQ,GACU,EACpB,QAAQ,CAAC,CAAC,CAAC,CACV,KAAC,oBAAoB,IACnB,YAAY,EAAE,YAAY,EAC1B,WAAW,EAAE,WAAW,EACxB,QAAQ,EAAE,SAAS,EACnB,QAAQ,EAAE,QAAQ,GAClB,CACH,CAAC,CAAC,CAAC,IAAI,IACJ,CACP,CAAC;AACJ,CAAC,CACF,CAAC"}
@@ -1,9 +1,11 @@
1
+ import type { SwipeListControlType } from './SwipeListControlProps';
1
2
  interface SwipeListControlDotsProps {
2
3
  containerRef?: {
3
4
  current: HTMLDivElement | null;
4
5
  };
5
6
  activeIndex?: number;
6
7
  dotCount?: number;
8
+ listType?: SwipeListControlType;
7
9
  }
8
10
  export declare const SwipeListControlDots: import("@redneckz/uni-jsx").UNIComponent<SwipeListControlDotsProps, any, any>;
9
11
  export {};
@@ -1,7 +1,16 @@
1
1
  import { jsx as _jsx } from "@redneckz/uni-jsx/jsx-runtime";
2
2
  import { JSX } from '@redneckz/uni-jsx';
3
- const dotStyle = 'cursor-pointer bg-primary-main h-2 rounded-full transition-width duration-300';
4
- export const SwipeListControlDots = JSX(({ containerRef, activeIndex, dotCount = 0 }) => {
3
+ const containerStyles = {
4
+ 'horizontal-list': 'mx-auto mt-5 w-fit',
5
+ 'vertical-list': 'absolute flex-col justify-center h-full top-0 left-4',
6
+ };
7
+ const activeDotStyles = {
8
+ 'horizontal-list': 'w-6',
9
+ 'vertical-list': 'h-6',
10
+ };
11
+ const dotStyle = 'cursor-pointer bg-primary-main rounded-full transition-width duration-300';
12
+ const inactiveDotStyle = 'w-2 h-2 opacity-30';
13
+ export const SwipeListControlDots = JSX(({ containerRef, activeIndex, dotCount = 0, listType = 'horizontal-list' }) => {
5
14
  const handleClick = (idx) => {
6
15
  if (idx !== activeIndex && containerRef?.current) {
7
16
  containerRef.current.children[idx]?.scrollIntoView({
@@ -10,6 +19,6 @@ export const SwipeListControlDots = JSX(({ containerRef, activeIndex, dotCount =
10
19
  });
11
20
  }
12
21
  };
13
- return dotCount ? (_jsx("div", { className: "flex gap-2 mx-auto mt-5 w-fit", children: new Array(dotCount).fill(null).map((_, idx) => (_jsx("div", { className: `${dotStyle} ${idx === activeIndex ? 'w-6' : 'w-2 opacity-30'}`, role: "button", "aria-hidden": true, onClick: () => handleClick(idx) }, String(idx)))) })) : null;
22
+ return dotCount ? (_jsx("div", { className: `flex gap-2 ${containerStyles[listType]}`, children: new Array(dotCount).fill(null).map((_, idx) => (_jsx("div", { className: `${dotStyle} ${idx === activeIndex ? activeDotStyles[listType] : inactiveDotStyle}`, role: "button", "aria-hidden": true, onClick: () => handleClick(idx) }, String(idx)))) })) : null;
14
23
  });
15
24
  //# sourceMappingURL=SwipeListControlDots.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"SwipeListControlDots.js","sourceRoot":"","sources":["../../../src/ui-kit/SwipeListControl/SwipeListControlDots.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAExC,MAAM,QAAQ,GAAG,+EAA+E,CAAC;AAQjG,MAAM,CAAC,MAAM,oBAAoB,GAAG,GAAG,CACrC,CAAC,EAAE,YAAY,EAAE,WAAW,EAAE,QAAQ,GAAG,CAAC,EAAE,EAAE,EAAE;IAC9C,MAAM,WAAW,GAAG,CAAC,GAAW,EAAE,EAAE;QAClC,IAAI,GAAG,KAAK,WAAW,IAAI,YAAY,EAAE,OAAO,EAAE;YAChD,YAAY,CAAC,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE,cAAc,CAAC;gBACjD,QAAQ,EAAE,QAAQ;gBAClB,KAAK,EAAE,SAAS;aACjB,CAAC,CAAC;SACJ;IACH,CAAC,CAAC;IAEF,OAAO,QAAQ,CAAC,CAAC,CAAC,CAChB,c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D,QAAQ,EAAE,QAAQ;gBAClB,KAAK,EAAE,SAAS;aACjB,CAAC,CAAC;SACJ;IACH,CAAC,CAAC;IAEF,OAAO,QAAQ,CAAC,CAAC,CAAC,CAChB,cAAK,SAAS,EAAE,cAAc,eAAe,CAAC,QAAQ,CAAC,EAAE,YACtD,IAAI,KAAK,CAAC,QAAQ,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,GAAW,EAAE,EAAE,CAAC,CACtD,cAEE,SAAS,EAAE,GAAG,QAAQ,IACpB,GAAG,KAAK,WAAW,CAAC,CAAC,CAAC,eAAe,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,gBACpD,EAAE,EACF,IAAI,EAAC,QAAQ,uBAEb,OAAO,EAAE,GAAG,EAAE,CAAC,WAAW,CAAC,GAAG,CAAC,IAN1B,MAAM,CAAC,GAAG,CAAC,CAOhB,CACH,CAAC,GACE,CACP,CAAC,CAAC,CAAC,IAAI,CAAC;AACX,CAAC,CACF,CAAC"}
@@ -1,3 +1,8 @@
1
+ /**
2
+ * @title Вид
3
+ * @enumNames ["Горизонтальный", "Вертикальный"]
4
+ */
5
+ export declare type SwipeListControlType = 'horizontal-list' | 'vertical-list';
1
6
  /**
2
7
  * @title Контейнер
3
8
  */
@@ -14,5 +19,7 @@ export interface SwipeListControlProps extends SwipeContainerProps {
14
19
  className?: string;
15
20
  /** @title Точки-индикаторы */
16
21
  showDots?: boolean;
22
+ /** @hidden */
17
23
  onVisibleIndicesChange?: (indices: number[]) => void;
24
+ listType?: SwipeListControlType;
18
25
  }
@@ -0,0 +1 @@
1
+ export declare const style: (...atoms: (string | null | undefined)[]) => string;
@@ -0,0 +1,2 @@
1
+ export const style = (...atoms) => atoms.filter(Boolean).join(' ');
2
+ //# sourceMappingURL=style.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"style.js","sourceRoot":"","sources":["../../src/utils/style.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,KAAK,GAAG,CAAC,GAAG,KAAoC,EAAU,EAAE,CACvE,KAAK,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC"}
@@ -71,9 +71,20 @@ html {
71
71
  display: flex;
72
72
  overflow-x: scroll;
73
73
  -webkit-overflow-scrolling: touch;
74
+ -webkit-scroll-snap-type: x mandatory;
75
+ -ms-scroll-snap-type: x mandatory;
74
76
  scroll-snap-type: x mandatory;
75
77
  }
76
78
 
79
+ .vertical-list {
80
+ height: 100%;
81
+ overflow-y: scroll;
82
+ -webkit-overflow-scrolling: touch;
83
+ -webkit-scroll-snap-type: y mandatory;
84
+ -ms-scroll-snap-type: y mandatory;
85
+ scroll-snap-type: y mandatory;
86
+ }
87
+
77
88
  .gradient-color-text {
78
89
  background: linear-gradient(180deg, #42ab44 0%, #f6db7d 100%);
79
90
  -webkit-background-clip: text;
@@ -0,0 +1,8 @@
1
+ {
2
+ "content": {},
3
+ "style": {
4
+ "ui:options": {
5
+ "minCols": 12
6
+ }
7
+ }
8
+ }
@@ -10,20 +10,26 @@ export interface CarouselCardProps extends CarouselCardContent, UniBlockProps {}
10
10
  const BLOCK_CLASSES = 'absolute border border-solid border-gray w-full h-full';
11
11
 
12
12
  const CARD_WIDTH_MAP: Record<CarouselCardVersion, string> = {
13
- normal: 'min-w-[1007px]',
13
+ normal: 'min-w-[970px]',
14
14
  mini: 'min-w-[355px]',
15
15
  };
16
16
 
17
17
  export const CarouselCard = JSX<CarouselCardProps>(
18
18
  ({ className = '', button, description, title, version = 'normal' }) => (
19
- <section className={`flex pb-9 pl-12 ${CARD_WIDTH_MAP[version]} ${className}`}>
19
+ <section className={`flex pb-9 pl-12 border-box ${CARD_WIDTH_MAP[version]} ${className}`}>
20
20
  <div className="relative w-full">
21
21
  <div className={`${BLOCK_CLASSES} z-10 top-9 right-12 bg-green-dark`} />
22
22
  <div className={`${BLOCK_CLASSES} z-10 top-6 right-8 bg-green`} />
23
23
  <div className={`${BLOCK_CLASSES} z-10 top-3 right-4 bg-green-light`} />
24
- <div className="relative bg-white z-10 py-6 px-10 border border-solid border-green-light">
25
- <Headline className="!p-0" title={title} description={description} headlineVersion="M" />
26
- {button ? <div className="mt-6">{renderButton({ button })}</div> : null}
24
+ <div className="relative bg-white z-10 p-10 border border-solid border-green-light">
25
+ <Headline
26
+ className="!p-0"
27
+ title={title}
28
+ description={description}
29
+ headlineVersion="L"
30
+ align="text-left"
31
+ />
32
+ {button ? <div className="mt-14">{renderButton({ button })}</div> : null}
27
33
  </div>
28
34
  </div>
29
35
  </section>
@@ -16,7 +16,7 @@ export const CarouselProgramsCard = JSX<CarouselTariffsCardProps>(
16
16
  className={`font-sans border border-gray flex min-w-[536px] ${VersionStyleMap[version]} ${className}`}
17
17
  {...rest}
18
18
  >
19
- <div className="w-[200px] min-w-[200px] self-end">
19
+ <div className="w-[200px] min-w-[200px] self-center">
20
20
  {icon?.icon ? <Img image={getIconWithVersion(icon)} asSVG /> : null}
21
21
  {icon?.src ? <Img image={icon} /> : null}
22
22
  </div>
@@ -1,13 +1,21 @@
1
1
  {
2
- "title": "Заголовок",
2
+ "title": "Заголовок карточки",
3
3
  "button": {
4
4
  "href": "",
5
5
  "text": "Кнопка",
6
6
  "target": "_self",
7
- "version": "primary"
7
+ "version": "secondary"
8
+ },
9
+ "icon": {
10
+ "icon": "",
11
+ "format": "webp",
12
+ "size": {
13
+ "width": 267,
14
+ "height": 73
15
+ }
8
16
  },
9
17
  "isHighlighting": false,
10
- "rows": [
18
+ "cardCells": [
11
19
  {
12
20
  "title": "Ячейка 1-1",
13
21
  "description": "Описание 1-1"
@@ -1,49 +1,52 @@
1
1
  import { JSX } from '@redneckz/uni-jsx';
2
- import type { HeadlineCommonProps } from '../../model/HeadlineType';
3
- import type { UniBlockProps } from '../../model/JSXBlock';
4
- import { VNode } from '../../model/VNode';
5
2
  import { BlockWrapper } from '../../ui-kit/BlockWrapper';
6
3
  import { Button } from '../../ui-kit/Button/Button';
7
4
  import { Foldable } from '../../ui-kit/Foldable/Foldable';
8
5
  import { FoldablePartProps } from '../../ui-kit/Foldable/FoldablePartProps';
9
6
  import { FoldableSection } from '../../ui-kit/Foldable/FoldableSection';
7
+ import { getIconWithVersion } from '../../utils/getIconWithVersion';
10
8
  import { Heading } from '../../ui-kit/Heading/Heading';
11
9
  import { Icon } from '../../ui-kit/Icon/Icon';
12
10
  import { Img } from '../../ui-kit/Img/Img';
11
+ import { Paragraph } from '../../ui-kit/Paragraph/Paragraph';
13
12
  import type { CarouselTariffsCardContent } from './CarouselTariffsCardContent';
13
+ import type { HeadlineCommonProps } from '../../model/HeadlineType';
14
+ import type { Picture } from '../../model/Picture';
15
+ import type { UniBlockProps } from '../../model/JSXBlock';
16
+ import type { VNode } from '../../model/VNode';
14
17
 
15
18
  export interface CarouselTariffsCardProps extends CarouselTariffsCardContent, UniBlockProps {}
16
19
 
17
- const VISIBLE_ROWS_COUNT = 1;
20
+ const VISIBLE_CELLS_COUNT = 1;
18
21
 
19
22
  export const CarouselTariffsCard = JSX<CarouselTariffsCardProps>(
20
- ({ className = '', title, icon, isHighlighting, button, rows = [], ...rest }) => {
21
- const rowsNode = rows.map(renderCardInfo);
22
- const visibleRows = rowsNode.slice(0, VISIBLE_ROWS_COUNT);
23
- const hiddenRows = rowsNode.slice(VISIBLE_ROWS_COUNT);
23
+ ({ className = '', title, icon, isHighlighting, button, cardCells = [], ...rest }) => {
24
+ const cellsNode = cardCells.map(renderCardInfo);
25
+ const visibleCells = cellsNode.slice(0, VISIBLE_CELLS_COUNT);
26
+ const hiddenCells = cellsNode.slice(VISIBLE_CELLS_COUNT);
24
27
 
25
28
  return (
26
29
  <BlockWrapper
27
- className={`font-sans relative bg-white border border-gray min-w-[322px] p-8
30
+ className={`font-sans relative bg-white border border-gray min-w-[322px] p-8 flex flex-col
28
31
  ${getHitStyle(isHighlighting)}
29
32
  ${className}`}
30
33
  {...rest}
31
34
  >
32
35
  {isHighlighting ? renderHitIcon() : null}
33
- {icon?.src ? <Img image={icon} /> : null}
36
+ {renderIconBlock(icon)}
34
37
  {title ? (
35
38
  <Heading className="text-primary-text text-center pt-2" headingType="h5" title={title} />
36
39
  ) : null}
37
40
  {button ? <Button className="w-full mt-4" {...button} /> : null}
38
- {rows.length ? (
41
+ {cardCells.length ? (
39
42
  <Foldable
40
43
  renderFoldableSection={({ isUnfolded }) => (
41
44
  <div>
42
- {visibleRows}
43
- <FoldableSection isUnfolded={isUnfolded}>{hiddenRows}</FoldableSection>
45
+ {visibleCells}
46
+ <FoldableSection isUnfolded={isUnfolded}>{hiddenCells}</FoldableSection>
44
47
  </div>
45
48
  )}
46
- renderFoldButton={rows.length > 1 ? renderFoldButton : null}
49
+ renderFoldButton={cardCells.length > 1 ? renderFoldButton : null}
47
50
  />
48
51
  ) : null}
49
52
  </BlockWrapper>
@@ -51,8 +54,15 @@ export const CarouselTariffsCard = JSX<CarouselTariffsCardProps>(
51
54
  },
52
55
  );
53
56
 
57
+ const renderIconBlock = (icon?: Picture) => (
58
+ <div className="w-[267px] min-w-[267px] self-center">
59
+ {icon?.src ? <Img image={icon} /> : null}
60
+ {icon?.icon ? <Img image={getIconWithVersion(icon)} asSVG /> : null}
61
+ </div>
62
+ );
63
+
54
64
  const getHitStyle = (isHighlighting?: boolean): string =>
55
- isHighlighting ? 'mt-9 pt-[70px]' : 'mt-[70px] pt-9';
65
+ isHighlighting ? 'mt-9 pt-[70px]' : 'mt-[70px] pt-7';
56
66
 
57
67
  const renderFoldButton = ({ isUnfolded, onToggle }: FoldablePartProps): VNode => (
58
68
  <button
@@ -82,8 +92,10 @@ const renderCardInfo = (cell: HeadlineCommonProps, i: number): VNode => (
82
92
  );
83
93
 
84
94
  const renderHitIcon = (): VNode => (
85
- <div className="absolute -top-7 -right-4 h-[60px] w-[60px] bg-white flex flex-col items-center justify-center shadow-[0_4px_25px_rgba(0,0,0,0.07)]">
95
+ <div className="absolute -top-7 -right-4 h-[60px] w-[60px] bg-white flex flex-col items-center justify-center rounded-md shadow-[0_4px_25px_rgba(0,0,0,0.07)]">
86
96
  <Icon iconVersion="black" name="HeartIcon" width="23" height="22" asSVG />
87
- <div className="text-center">Хит</div>
97
+ <Paragraph size="text-s" font="font-normal" align="text-center" color="text-primary-text">
98
+ ХИТ
99
+ </Paragraph>
88
100
  </div>
89
101
  );
@@ -12,5 +12,5 @@ export type CarouselTariffsCardContent = TitleProps & {
12
12
  /** @title Кнопка */
13
13
  button?: ButtonProps;
14
14
  /** @title Ячейка */
15
- rows?: HeadlineCommonProps[];
15
+ cardCells?: HeadlineCommonProps[];
16
16
  };
@@ -43,5 +43,9 @@ export type LinkDocsContent = HeadlineCommonProps & {
43
43
  orientation?: ListOrientation; // TODO: мобильный проп
44
44
  /** @title Рамка элементов (моб.) */ // TODO: мобильный проп
45
45
  hasBorder?: boolean;
46
+ /**
47
+ * @title Выравнивание
48
+ * @default text-center
49
+ */
46
50
  align?: TextAlign;
47
51
  };
@@ -0,0 +1,18 @@
1
+ {
2
+ "content": {
3
+ "listType": "vertical-list"
4
+ },
5
+ "style": ["col-span-12", "h-96"],
6
+ "type": "SwipeListControlBlock",
7
+ "blocks": [
8
+ {
9
+ "type": "Headline",
10
+ "content": {
11
+ "title": "Заголовок блока",
12
+ "description": "Описание блока",
13
+ "headlineVersion": "M"
14
+ },
15
+ "style": ["col-span-12"]
16
+ }
17
+ ]
18
+ }
@@ -0,0 +1,23 @@
1
+ import { JSX } from '@redneckz/uni-jsx';
2
+ import { renderChildren } from '../../BlockRenderer/renderChildren';
3
+ import type { JSXBlock, UniBlockProps } from '../../model/JSXBlock';
4
+ import { BlockWrapper } from '../../ui-kit/BlockWrapper';
5
+ import { SwipeListControl } from '../../ui-kit/SwipeListControl/SwipeListControl';
6
+ import type { SwipeListControlBlockContent } from './SwipeListControlBlockContent';
7
+
8
+ interface SwipeListControlBlockProps extends SwipeListControlBlockContent, UniBlockProps {}
9
+
10
+ export const SwipeListControlBlock: JSXBlock<SwipeListControlBlockProps> =
11
+ JSX<SwipeListControlBlockProps>(({ gap, listType, padding, showDots, options, ...rest }) => {
12
+ return (
13
+ <BlockWrapper {...rest}>
14
+ <SwipeListControl gap={gap} listType={listType} padding={padding} showDots={showDots}>
15
+ {renderChildren({ ...rest, options })}
16
+ </SwipeListControl>
17
+ </BlockWrapper>
18
+ );
19
+ });
20
+
21
+ SwipeListControlBlock.childrenTypes = {
22
+ exclude: ['SwipeListControlBlock'],
23
+ };
@@ -0,0 +1,6 @@
1
+ import type { SwipeListControlProps } from '../../ui-kit/SwipeListControl/SwipeListControlProps';
2
+
3
+ /**
4
+ * @title Swipe-контроллер
5
+ */
6
+ export type SwipeListControlBlockContent = SwipeListControlProps;
@@ -10,7 +10,7 @@ interface BlockWrapperProps extends UniBlockProps {
10
10
  }
11
11
 
12
12
  export const BlockWrapper = JSX<BlockWrapperProps>(
13
- ({ className, block, tag = 'section', role, children }) => {
13
+ ({ className = '', block, tag = 'section', role, children }) => {
14
14
  const Tag: any = tag;
15
15
 
16
16
  const ref = useBlockIntersectionObserver(block);
@@ -2,7 +2,8 @@ import { JSX } from '@redneckz/uni-jsx';
2
2
  import { useCallback, useRef } from '@redneckz/uni-jsx/lib/hooks';
3
3
  import type { IntersectionObserverOptions } from '../../hooks/useIntersectionObserver';
4
4
  import { mapChildren } from '../../utils/mapChildren';
5
- import type { SwipeContainerProps } from './SwipeListControlProps';
5
+ import { style } from '../../utils/style';
6
+ import type { SwipeContainerProps, SwipeListControlType } from './SwipeListControlProps';
6
7
  import { SwipeListItem } from './SwipeListItem';
7
8
 
8
9
  type ItemsVisibilityList = Array<IntersectionObserverEntry | undefined>;
@@ -20,6 +21,7 @@ interface SwipeListContainerProps extends SwipeContainerProps {
20
21
  snapAlign?: 'snap-start' | 'snap-center' | 'snap-end';
21
22
  onVisibleItemsChange?: (itemsVisibilityList: ItemsVisibilityList) => void;
22
23
  onVisibleIndicesChange?: (indices: number[]) => void;
24
+ listType?: SwipeListControlType;
23
25
  }
24
26
 
25
27
  const childStyleMap = ['min-w-[100%]', 'min-w-[50%]', 'min-w-[33.33%]', 'min-w-[25%]'];
@@ -32,6 +34,7 @@ export const SwipeListContainer = JSX<SwipeListContainerProps>(
32
34
  visibleItemCount = 0,
33
35
  gap = 0,
34
36
  padding = 0,
37
+ listType = 'horizontal-list',
35
38
  snapAlign = 'snap-center',
36
39
  children,
37
40
  onVisibleItemsChange,
@@ -54,25 +57,31 @@ export const SwipeListContainer = JSX<SwipeListContainerProps>(
54
57
  },
55
58
  [onVisibleItemsChange, onVisibleIndicesChange],
56
59
  );
60
+
57
61
  const additionPadding = visibleItemCount > 0 ? gap * Number(visibleItemCount) - 1 : 0;
58
62
 
63
+ const isHorizontalList = listType === 'horizontal-list';
64
+ const containerStyle = {
65
+ ...(isHorizontalList ? getContainerStyle(padding, additionPadding) : {}),
66
+ gap: `${gap}px`,
67
+ };
68
+
59
69
  return (
60
70
  <div
61
- className={`box-border overflow-auto flex horizontal-list no-scrollbar ${className}`}
62
- style={{
63
- ...getContainerStyle(padding, additionPadding),
64
- gap: `${gap}px`,
65
- }}
71
+ className={style('box-border overflow-auto no-scrollbar', listType, className)}
72
+ style={containerStyle}
66
73
  role="list"
67
74
  ref={containerRef}
68
75
  >
69
76
  {mapChildren((child, idx) => (
70
77
  <SwipeListItem
71
78
  key={String(idx)}
72
- className={`${snapAlign} ${
73
- visibleItemCount ? childStyleMap[visibleItemCount - 1] : ''
74
- }`}
75
- style={getContainerStyle(padding / 4)}
79
+ className={style(
80
+ snapAlign,
81
+ visibleItemCount ? childStyleMap[visibleItemCount - 1] : '',
82
+ listType === 'vertical-list' ? 'h-full' : '',
83
+ )}
84
+ style={isHorizontalList ? getContainerStyle(padding / 4) : {}}
76
85
  activeIndex={activeIndex}
77
86
  idx={idx}
78
87
  observerOptions={observerOptions}
@@ -1,4 +1,5 @@
1
1
  import { JSX } from '@redneckz/uni-jsx';
2
+ import { style } from '../../utils/style';
2
3
  import { SwipeListContainer } from './SwipeListContainer';
3
4
  import { SwipeListControlDots } from './SwipeListControlDots';
4
5
  import type { SwipeListControlProps } from './SwipeListControlProps';
@@ -15,12 +16,13 @@ const DEFAULT_PADDING = 16;
15
16
 
16
17
  export const SwipeListControl = JSX<SwipeListControlProps>(
17
18
  ({
18
- className,
19
+ className = '',
19
20
  gap = DEFAULT_GAP,
20
21
  padding = DEFAULT_PADDING,
21
22
  showDots = true,
22
23
  children,
23
24
  onVisibleIndicesChange,
25
+ listType = 'horizontal-list',
24
26
  }) => {
25
27
  const itemCount = Array.isArray(children) ? children.length : 0;
26
28
 
@@ -31,7 +33,7 @@ export const SwipeListControl = JSX<SwipeListControlProps>(
31
33
  const [activeIndex] = scroll.visibleIndicesRange;
32
34
 
33
35
  return (
34
- <div className={className}>
36
+ <div className={style(className, listType === 'vertical-list' ? 'relative h-full' : '')}>
35
37
  <SwipeListContainer
36
38
  containerRef={containerRef}
37
39
  activeIndex={activeIndex}
@@ -39,6 +41,7 @@ export const SwipeListControl = JSX<SwipeListControlProps>(
39
41
  gap={gap}
40
42
  padding={padding}
41
43
  onVisibleIndicesChange={scroll.handleVisibleIndicesChange}
44
+ listType={listType}
42
45
  >
43
46
  {children}
44
47
  </SwipeListContainer>
@@ -47,6 +50,7 @@ export const SwipeListControl = JSX<SwipeListControlProps>(
47
50
  containerRef={containerRef}
48
51
  activeIndex={activeIndex}
49
52
  dotCount={itemCount}
53
+ listType={listType}
50
54
  />
51
55
  ) : null}
52
56
  </div>
@@ -1,15 +1,29 @@
1
1
  import { JSX } from '@redneckz/uni-jsx';
2
+ import type { SwipeListControlType } from './SwipeListControlProps';
2
3
 
3
- const dotStyle = 'cursor-pointer bg-primary-main h-2 rounded-full transition-width duration-300';
4
+ const containerStyles: Record<SwipeListControlType, string> = {
5
+ 'horizontal-list': 'mx-auto mt-5 w-fit',
6
+ 'vertical-list': 'absolute flex-col justify-center h-full top-0 left-4',
7
+ };
8
+
9
+ const activeDotStyles: Record<SwipeListControlType, string> = {
10
+ 'horizontal-list': 'w-6',
11
+ 'vertical-list': 'h-6',
12
+ };
13
+
14
+ const dotStyle = 'cursor-pointer bg-primary-main rounded-full transition-width duration-300';
15
+
16
+ const inactiveDotStyle = 'w-2 h-2 opacity-30';
4
17
 
5
18
  interface SwipeListControlDotsProps {
6
19
  containerRef?: { current: HTMLDivElement | null };
7
20
  activeIndex?: number;
8
21
  dotCount?: number;
22
+ listType?: SwipeListControlType;
9
23
  }
10
24
 
11
25
  export const SwipeListControlDots = JSX<SwipeListControlDotsProps>(
12
- ({ containerRef, activeIndex, dotCount = 0 }) => {
26
+ ({ containerRef, activeIndex, dotCount = 0, listType = 'horizontal-list' }) => {
13
27
  const handleClick = (idx: number) => {
14
28
  if (idx !== activeIndex && containerRef?.current) {
15
29
  containerRef.current.children[idx]?.scrollIntoView({
@@ -20,11 +34,13 @@ export const SwipeListControlDots = JSX<SwipeListControlDotsProps>(
20
34
  };
21
35
 
22
36
  return dotCount ? (
23
- <div className="flex gap-2 mx-auto mt-5 w-fit">
37
+ <div className={`flex gap-2 ${containerStyles[listType]}`}>
24
38
  {new Array(dotCount).fill(null).map((_, idx: number) => (
25
39
  <div
26
40
  key={String(idx)}
27
- className={`${dotStyle} ${idx === activeIndex ? 'w-6' : 'w-2 opacity-30'}`}
41
+ className={`${dotStyle} ${
42
+ idx === activeIndex ? activeDotStyles[listType] : inactiveDotStyle
43
+ }`}
28
44
  role="button"
29
45
  aria-hidden
30
46
  onClick={() => handleClick(idx)}
@@ -1,3 +1,9 @@
1
+ /**
2
+ * @title Вид
3
+ * @enumNames ["Горизонтальный", "Вертикальный"]
4
+ */
5
+ export type SwipeListControlType = 'horizontal-list' | 'vertical-list';
6
+
1
7
  /**
2
8
  * @title Контейнер
3
9
  */
@@ -15,5 +21,7 @@ export interface SwipeListControlProps extends SwipeContainerProps {
15
21
  className?: string;
16
22
  /** @title Точки-индикаторы */
17
23
  showDots?: boolean;
24
+ /** @hidden */
18
25
  onVisibleIndicesChange?: (indices: number[]) => void;
26
+ listType?: SwipeListControlType;
19
27
  }
@@ -0,0 +1,2 @@
1
+ export const style = (...atoms: (string | null | undefined)[]): string =>
2
+ atoms.filter(Boolean).join(' ');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@redneckz/wildless-cms-uni-blocks",
3
- "version": "0.6.50",
3
+ "version": "0.7.1",
4
4
  "private": false,
5
5
  "license": "MIT",
6
6
  "author": "ЦК",
@@ -188,7 +188,7 @@
188
188
  "path": "lib/common.css"
189
189
  },
190
190
  {
191
- "limit": "45 kB",
191
+ "limit": "47 kB",
192
192
  "path": "bundle/bundle.umd.min.js"
193
193
  }
194
194
  ],
package/src/common.css CHANGED
@@ -71,9 +71,20 @@ html {
71
71
  display: flex;
72
72
  overflow-x: scroll;
73
73
  -webkit-overflow-scrolling: touch;
74
+ -webkit-scroll-snap-type: x mandatory;
75
+ -ms-scroll-snap-type: x mandatory;
74
76
  scroll-snap-type: x mandatory;
75
77
  }
76
78
 
79
+ .vertical-list {
80
+ height: 100%;
81
+ overflow-y: scroll;
82
+ -webkit-overflow-scrolling: touch;
83
+ -webkit-scroll-snap-type: y mandatory;
84
+ -ms-scroll-snap-type: y mandatory;
85
+ scroll-snap-type: y mandatory;
86
+ }
87
+
77
88
  .gradient-color-text {
78
89
  background: linear-gradient(180deg, #42ab44 0%, #f6db7d 100%);
79
90
  -webkit-background-clip: text;