@redneckz/wildless-cms-uni-blocks 0.14.147 → 0.14.149

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 (217) hide show
  1. package/bundle/blocks.schema.json +1 -1
  2. package/bundle/bundle.umd.js +67 -14
  3. package/bundle/bundle.umd.min.js +1 -1
  4. package/bundle/components/OfficesAtmsMap/OfficesAtmsMapContent.d.ts +2 -3
  5. package/bundle/components/TabsLayout/TabsLayout.d.ts +5 -0
  6. package/bundle/components/TabsLayout/TabsLayoutButton.d.ts +10 -0
  7. package/bundle/components/TabsLayout/TabsLayoutContent.d.ts +21 -0
  8. package/bundle/components/TabsLayout/TabsLayoutRedirectTab.d.ts +6 -0
  9. package/bundle/components/TabsLayout/alignTabStyle.d.ts +2 -0
  10. package/bundle/ui-kit/Shimmer/Shimmer.d.ts +5 -0
  11. package/bundle/ui-kit/SwipeListControl/SwipeListContainer.d.ts +2 -2
  12. package/bundle/ui-kit/SwipeListControl/useSwipeListScroll.d.ts +1 -1
  13. package/dist/components/Blocks.js +3 -1
  14. package/dist/components/Blocks.js.map +1 -1
  15. package/dist/components/Blocks.mobile.js +3 -1
  16. package/dist/components/Blocks.mobile.js.map +1 -1
  17. package/dist/components/ContentPage/ContentPage.page.json +0 -37
  18. package/dist/components/OfficesAtmsMap/OfficesAtmsMapContent.d.ts +2 -3
  19. package/dist/components/OfficesAtmsMap/OfficesAtmsMapLayout.js +2 -2
  20. package/dist/components/OfficesAtmsMap/OfficesAtmsMapLayout.js.map +1 -1
  21. package/dist/components/Placeholder/Placeholder.js +2 -7
  22. package/dist/components/Placeholder/Placeholder.js.map +1 -1
  23. package/dist/components/TabsLayout/TabsLayout.d.ts +5 -0
  24. package/dist/components/TabsLayout/TabsLayout.js +32 -0
  25. package/dist/components/TabsLayout/TabsLayout.js.map +1 -0
  26. package/dist/components/TabsLayout/TabsLayoutButton.d.ts +10 -0
  27. package/dist/components/TabsLayout/TabsLayoutButton.js +23 -0
  28. package/dist/components/TabsLayout/TabsLayoutButton.js.map +1 -0
  29. package/dist/components/TabsLayout/TabsLayoutContent.d.ts +21 -0
  30. package/dist/components/TabsLayout/TabsLayoutContent.js +2 -0
  31. package/dist/components/TabsLayout/TabsLayoutContent.js.map +1 -0
  32. package/dist/components/TabsLayout/TabsLayoutRedirectTab.d.ts +6 -0
  33. package/dist/components/TabsLayout/TabsLayoutRedirectTab.js +17 -0
  34. package/dist/components/TabsLayout/TabsLayoutRedirectTab.js.map +1 -0
  35. package/dist/components/TabsLayout/alignTabStyle.d.ts +2 -0
  36. package/dist/components/TabsLayout/alignTabStyle.js +8 -0
  37. package/dist/components/TabsLayout/alignTabStyle.js.map +1 -0
  38. package/dist/setup-fixture.js +1 -1
  39. package/dist/setup-fixture.js.map +1 -1
  40. package/dist/ui-kit/Shimmer/Shimmer.d.ts +5 -0
  41. package/dist/ui-kit/Shimmer/Shimmer.js +13 -0
  42. package/dist/ui-kit/Shimmer/Shimmer.js.map +1 -0
  43. package/dist/ui-kit/SwipeListControl/SwipeListContainer.d.ts +2 -2
  44. package/dist/ui-kit/SwipeListControl/SwipeListContainer.js +2 -2
  45. package/dist/ui-kit/SwipeListControl/SwipeListContainer.js.map +1 -1
  46. package/dist/ui-kit/SwipeListControl/SwipeListItem.js +3 -2
  47. package/dist/ui-kit/SwipeListControl/SwipeListItem.js.map +1 -1
  48. package/dist/ui-kit/SwipeListControl/useSwipeListScroll.d.ts +1 -1
  49. package/dist/ui-kit/SwipeListControl/useSwipeListScroll.js +6 -6
  50. package/dist/ui-kit/SwipeListControl/useSwipeListScroll.js.map +1 -1
  51. package/lib/common.css +1 -1
  52. package/lib/components/Blocks.js +3 -1
  53. package/lib/components/Blocks.js.map +1 -1
  54. package/lib/components/Blocks.mobile.js +3 -1
  55. package/lib/components/Blocks.mobile.js.map +1 -1
  56. package/lib/components/ContentPage/ContentPage.page.json +0 -37
  57. package/lib/components/OfficesAtmsMap/OfficesAtmsMapContent.d.ts +2 -3
  58. package/lib/components/OfficesAtmsMap/OfficesAtmsMapLayout.js +2 -2
  59. package/lib/components/OfficesAtmsMap/OfficesAtmsMapLayout.js.map +1 -1
  60. package/lib/components/Placeholder/Placeholder.js +2 -7
  61. package/lib/components/Placeholder/Placeholder.js.map +1 -1
  62. package/lib/components/TabsLayout/TabsLayout.d.ts +5 -0
  63. package/lib/components/TabsLayout/TabsLayout.fixture.d.ts +6 -0
  64. package/lib/components/TabsLayout/TabsLayout.fixture.mobile.d.ts +6 -0
  65. package/lib/components/TabsLayout/TabsLayout.js +30 -0
  66. package/lib/components/TabsLayout/TabsLayout.js.map +1 -0
  67. package/lib/components/TabsLayout/TabsLayoutButton.d.ts +10 -0
  68. package/lib/components/TabsLayout/TabsLayoutButton.js +21 -0
  69. package/lib/components/TabsLayout/TabsLayoutButton.js.map +1 -0
  70. package/lib/components/TabsLayout/TabsLayoutContent.d.ts +21 -0
  71. package/lib/components/TabsLayout/TabsLayoutContent.js +2 -0
  72. package/lib/components/TabsLayout/TabsLayoutContent.js.map +1 -0
  73. package/lib/components/TabsLayout/TabsLayoutRedirectTab.d.ts +6 -0
  74. package/lib/components/TabsLayout/TabsLayoutRedirectTab.js +15 -0
  75. package/lib/components/TabsLayout/TabsLayoutRedirectTab.js.map +1 -0
  76. package/lib/components/TabsLayout/alignTabStyle.d.ts +2 -0
  77. package/lib/components/TabsLayout/alignTabStyle.js +6 -0
  78. package/lib/components/TabsLayout/alignTabStyle.js.map +1 -0
  79. package/lib/setup-fixture.js +1 -1
  80. package/lib/setup-fixture.js.map +1 -1
  81. package/lib/ui-kit/Shimmer/Shimmer.d.ts +5 -0
  82. package/lib/ui-kit/Shimmer/Shimmer.js +11 -0
  83. package/lib/ui-kit/Shimmer/Shimmer.js.map +1 -0
  84. package/lib/ui-kit/SwipeListControl/SwipeListContainer.d.ts +2 -2
  85. package/lib/ui-kit/SwipeListControl/SwipeListContainer.js +2 -2
  86. package/lib/ui-kit/SwipeListControl/SwipeListContainer.js.map +1 -1
  87. package/lib/ui-kit/SwipeListControl/SwipeListItem.js +3 -2
  88. package/lib/ui-kit/SwipeListControl/SwipeListItem.js.map +1 -1
  89. package/lib/ui-kit/SwipeListControl/useSwipeListScroll.d.ts +1 -1
  90. package/lib/ui-kit/SwipeListControl/useSwipeListScroll.js +6 -6
  91. package/lib/ui-kit/SwipeListControl/useSwipeListScroll.js.map +1 -1
  92. package/mobile/bundle/bundle.umd.js +76 -23
  93. package/mobile/bundle/bundle.umd.min.js +1 -1
  94. package/mobile/bundle/components/OfficesAtmsMap/OfficesAtmsMapContent.d.ts +2 -3
  95. package/mobile/bundle/components/TabsLayout/TabsLayout.d.ts +5 -0
  96. package/mobile/bundle/components/TabsLayout/TabsLayoutButton.d.ts +10 -0
  97. package/mobile/bundle/components/TabsLayout/TabsLayoutContent.d.ts +21 -0
  98. package/mobile/bundle/components/TabsLayout/TabsLayoutRedirectTab.d.ts +6 -0
  99. package/mobile/bundle/components/TabsLayout/alignTabStyle.d.ts +2 -0
  100. package/mobile/bundle/ui-kit/Shimmer/Shimmer.d.ts +5 -0
  101. package/mobile/bundle/ui-kit/SwipeListControl/SwipeListContainer.d.ts +2 -2
  102. package/mobile/bundle/ui-kit/SwipeListControl/useSwipeListScroll.d.ts +1 -1
  103. package/mobile/dist/components/Blocks.js +3 -1
  104. package/mobile/dist/components/Blocks.js.map +1 -1
  105. package/mobile/dist/components/ContentPage/ContentPage.page.json +0 -37
  106. package/mobile/dist/components/OfficesAtmsMap/OfficesAtmsMapContent.d.ts +2 -3
  107. package/mobile/dist/components/OfficesAtmsMap/OfficesAtmsMapLayout.js +2 -2
  108. package/mobile/dist/components/OfficesAtmsMap/OfficesAtmsMapLayout.js.map +1 -1
  109. package/mobile/dist/components/Placeholder/Placeholder.js +2 -7
  110. package/mobile/dist/components/Placeholder/Placeholder.js.map +1 -1
  111. package/mobile/dist/components/TabsLayout/TabsLayout.d.ts +5 -0
  112. package/mobile/dist/components/TabsLayout/TabsLayout.js +32 -0
  113. package/mobile/dist/components/TabsLayout/TabsLayout.js.map +1 -0
  114. package/mobile/dist/components/TabsLayout/TabsLayoutButton.d.ts +10 -0
  115. package/mobile/dist/components/TabsLayout/TabsLayoutButton.js +23 -0
  116. package/mobile/dist/components/TabsLayout/TabsLayoutButton.js.map +1 -0
  117. package/mobile/dist/components/TabsLayout/TabsLayoutContent.d.ts +21 -0
  118. package/mobile/dist/components/TabsLayout/TabsLayoutContent.js +2 -0
  119. package/mobile/dist/components/TabsLayout/TabsLayoutContent.js.map +1 -0
  120. package/mobile/dist/components/TabsLayout/TabsLayoutRedirectTab.d.ts +6 -0
  121. package/mobile/dist/components/TabsLayout/TabsLayoutRedirectTab.js +17 -0
  122. package/mobile/dist/components/TabsLayout/TabsLayoutRedirectTab.js.map +1 -0
  123. package/mobile/dist/components/TabsLayout/alignTabStyle.d.ts +2 -0
  124. package/mobile/dist/components/TabsLayout/alignTabStyle.js +8 -0
  125. package/mobile/dist/components/TabsLayout/alignTabStyle.js.map +1 -0
  126. package/mobile/dist/setup-fixture.js +1 -1
  127. package/mobile/dist/setup-fixture.js.map +1 -1
  128. package/mobile/dist/ui-kit/Shimmer/Shimmer.d.ts +5 -0
  129. package/mobile/dist/ui-kit/Shimmer/Shimmer.js +13 -0
  130. package/mobile/dist/ui-kit/Shimmer/Shimmer.js.map +1 -0
  131. package/mobile/dist/ui-kit/SwipeListControl/SwipeListContainer.d.ts +2 -2
  132. package/mobile/dist/ui-kit/SwipeListControl/SwipeListContainer.js +2 -2
  133. package/mobile/dist/ui-kit/SwipeListControl/SwipeListContainer.js.map +1 -1
  134. package/mobile/dist/ui-kit/SwipeListControl/SwipeListItem.js +3 -2
  135. package/mobile/dist/ui-kit/SwipeListControl/SwipeListItem.js.map +1 -1
  136. package/mobile/dist/ui-kit/SwipeListControl/useSwipeListScroll.d.ts +1 -1
  137. package/mobile/dist/ui-kit/SwipeListControl/useSwipeListScroll.js +6 -6
  138. package/mobile/dist/ui-kit/SwipeListControl/useSwipeListScroll.js.map +1 -1
  139. package/mobile/lib/common.css +1 -1
  140. package/mobile/lib/components/Blocks.js +3 -1
  141. package/mobile/lib/components/Blocks.js.map +1 -1
  142. package/mobile/lib/components/ContentPage/ContentPage.page.json +0 -37
  143. package/mobile/lib/components/OfficesAtmsMap/OfficesAtmsMapContent.d.ts +2 -3
  144. package/mobile/lib/components/OfficesAtmsMap/OfficesAtmsMapLayout.js +2 -2
  145. package/mobile/lib/components/OfficesAtmsMap/OfficesAtmsMapLayout.js.map +1 -1
  146. package/mobile/lib/components/Placeholder/Placeholder.js +2 -7
  147. package/mobile/lib/components/Placeholder/Placeholder.js.map +1 -1
  148. package/mobile/lib/components/TabsLayout/TabsLayout.d.ts +5 -0
  149. package/mobile/lib/components/TabsLayout/TabsLayout.js +30 -0
  150. package/mobile/lib/components/TabsLayout/TabsLayout.js.map +1 -0
  151. package/mobile/lib/components/TabsLayout/TabsLayoutButton.d.ts +10 -0
  152. package/mobile/lib/components/TabsLayout/TabsLayoutButton.js +21 -0
  153. package/mobile/lib/components/TabsLayout/TabsLayoutButton.js.map +1 -0
  154. package/mobile/lib/components/TabsLayout/TabsLayoutContent.d.ts +21 -0
  155. package/mobile/lib/components/TabsLayout/TabsLayoutContent.js +2 -0
  156. package/mobile/lib/components/TabsLayout/TabsLayoutContent.js.map +1 -0
  157. package/mobile/lib/components/TabsLayout/TabsLayoutRedirectTab.d.ts +6 -0
  158. package/mobile/lib/components/TabsLayout/TabsLayoutRedirectTab.js +15 -0
  159. package/mobile/lib/components/TabsLayout/TabsLayoutRedirectTab.js.map +1 -0
  160. package/mobile/lib/components/TabsLayout/alignTabStyle.d.ts +2 -0
  161. package/mobile/lib/components/TabsLayout/alignTabStyle.js +6 -0
  162. package/mobile/lib/components/TabsLayout/alignTabStyle.js.map +1 -0
  163. package/mobile/lib/setup-fixture.js +1 -1
  164. package/mobile/lib/setup-fixture.js.map +1 -1
  165. package/mobile/lib/ui-kit/Shimmer/Shimmer.d.ts +5 -0
  166. package/mobile/lib/ui-kit/Shimmer/Shimmer.js +11 -0
  167. package/mobile/lib/ui-kit/Shimmer/Shimmer.js.map +1 -0
  168. package/mobile/lib/ui-kit/SwipeListControl/SwipeListContainer.d.ts +2 -2
  169. package/mobile/lib/ui-kit/SwipeListControl/SwipeListContainer.js +2 -2
  170. package/mobile/lib/ui-kit/SwipeListControl/SwipeListContainer.js.map +1 -1
  171. package/mobile/lib/ui-kit/SwipeListControl/SwipeListItem.js +3 -2
  172. package/mobile/lib/ui-kit/SwipeListControl/SwipeListItem.js.map +1 -1
  173. package/mobile/lib/ui-kit/SwipeListControl/useSwipeListScroll.d.ts +1 -1
  174. package/mobile/lib/ui-kit/SwipeListControl/useSwipeListScroll.js +6 -6
  175. package/mobile/lib/ui-kit/SwipeListControl/useSwipeListScroll.js.map +1 -1
  176. package/mobile/src/components/Blocks.ts +3 -1
  177. package/mobile/src/components/ContentPage/ContentPage.page.json +0 -37
  178. package/mobile/src/components/OfficesAtmsMap/OfficesAtmsMap.ui.json +3 -0
  179. package/mobile/src/components/OfficesAtmsMap/OfficesAtmsMapContent.ts +2 -3
  180. package/mobile/src/components/OfficesAtmsMap/OfficesAtmsMapLayout.tsx +4 -8
  181. package/mobile/src/components/Placeholder/Placeholder.tsx +2 -19
  182. package/mobile/src/components/TabsLayout/TabsLayout.example.json +8 -0
  183. package/mobile/src/components/TabsLayout/TabsLayout.tsx +88 -0
  184. package/mobile/src/components/TabsLayout/TabsLayout.ui.json +11 -0
  185. package/mobile/src/components/TabsLayout/TabsLayoutButton.tsx +60 -0
  186. package/mobile/src/components/TabsLayout/TabsLayoutContent.ts +26 -0
  187. package/mobile/src/components/TabsLayout/TabsLayoutRedirectTab.tsx +26 -0
  188. package/mobile/src/components/TabsLayout/alignTabStyle.ts +7 -0
  189. package/mobile/src/setup-fixture.ts +1 -1
  190. package/mobile/src/ui-kit/Shimmer/Shimmer.tsx +29 -0
  191. package/mobile/src/ui-kit/SwipeListControl/SwipeListContainer.tsx +5 -4
  192. package/mobile/src/ui-kit/SwipeListControl/SwipeListItem.tsx +12 -3
  193. package/mobile/src/ui-kit/SwipeListControl/useSwipeListScroll.ts +10 -7
  194. package/package.json +2 -2
  195. package/src/components/Blocks.mobile.ts +3 -1
  196. package/src/components/Blocks.ts +3 -1
  197. package/src/components/ContentPage/ContentPage.page.json +0 -37
  198. package/src/components/OfficesAtmsMap/OfficesAtmsMap.fixture.mobile.tsx +4 -2
  199. package/src/components/OfficesAtmsMap/OfficesAtmsMap.fixture.tsx +4 -2
  200. package/src/components/OfficesAtmsMap/OfficesAtmsMap.ui.json +3 -0
  201. package/src/components/OfficesAtmsMap/OfficesAtmsMapContent.ts +2 -3
  202. package/src/components/OfficesAtmsMap/OfficesAtmsMapLayout.tsx +4 -8
  203. package/src/components/Placeholder/Placeholder.tsx +2 -19
  204. package/src/components/TabsLayout/TabsLayout.example.json +8 -0
  205. package/src/components/TabsLayout/TabsLayout.fixture.mobile.tsx +53 -0
  206. package/src/components/TabsLayout/TabsLayout.fixture.tsx +53 -0
  207. package/src/components/TabsLayout/TabsLayout.tsx +88 -0
  208. package/src/components/TabsLayout/TabsLayout.ui.json +11 -0
  209. package/src/components/TabsLayout/TabsLayoutButton.tsx +60 -0
  210. package/src/components/TabsLayout/TabsLayoutContent.ts +26 -0
  211. package/src/components/TabsLayout/TabsLayoutRedirectTab.tsx +26 -0
  212. package/src/components/TabsLayout/alignTabStyle.ts +7 -0
  213. package/src/setup-fixture.ts +1 -1
  214. package/src/ui-kit/Shimmer/Shimmer.tsx +29 -0
  215. package/src/ui-kit/SwipeListControl/SwipeListContainer.tsx +5 -4
  216. package/src/ui-kit/SwipeListControl/SwipeListItem.tsx +12 -3
  217. package/src/ui-kit/SwipeListControl/useSwipeListScroll.ts +10 -7
@@ -3064,18 +3064,18 @@
3064
3064
  .concat(1);
3065
3065
  }
3066
3066
 
3067
- const SwipeListItem = JSX(({ className = '', style, idx, activeIndex, observerOptions, children, onIntersection }) => {
3067
+ const SwipeListItem = JSX(({ className, style: inlineStyle, idx, activeIndex, observerOptions, children, onIntersection, }) => {
3068
3068
  const observerCallback = useCallback((entries) => {
3069
3069
  if (entries.length && onIntersection) {
3070
3070
  onIntersection(idx || 0, entries[entries.length - 1]);
3071
3071
  }
3072
3072
  }, [onIntersection, idx]);
3073
3073
  const ref = useIntersectionObserver(observerCallback, observerOptions);
3074
- return (jsx("div", { className: `inline-block snap-always box-border ${className}`, style: style, "aria-current": Boolean(idx === activeIndex), ref: ref, children: children }));
3074
+ return (jsx("div", { className: style('inline-block snap-always box-border', className), style: inlineStyle, "aria-current": Boolean(idx === activeIndex), ref: ref, children: children }));
3075
3075
  });
3076
3076
 
3077
3077
  const childStyleMap = ['min-w-full', '@lg:min-w-[50%]', '@lg:min-w-[33.3%]', '@lg:min-w-[25%]'];
3078
- const SwipeListContainer = JSX(({ className = '', containerRef, activeIndex, visibleItemCount = 0, gap = 0, padding = 0, listType = 'horizontal-list', snapAlign = 'snap-center', minHeight, children, onVisibleItemsChange, onVisibleIndicesChange, }) => {
3078
+ const SwipeListContainer = JSX(({ className, itemClassName, containerRef, activeIndex, visibleItemCount = 0, gap = 0, padding = 0, listType = 'horizontal-list', snapAlign = 'snap-center', minHeight, children, onVisibleItemsChange, onVisibleIndicesChange, }) => {
3079
3079
  const observerOptions = {
3080
3080
  sensitivity: 1,
3081
3081
  rootRef: containerRef,
@@ -3096,7 +3096,7 @@
3096
3096
  ...(isVerticalList ? getContainerHeight(minHeight) : {}),
3097
3097
  gap: `${gap}px`,
3098
3098
  };
3099
- return (jsx("div", { className: style('box-border overflow-auto no-scrollbar', listType, className), style: containerStyle, ref: containerRef, children: mapChildren((child, idx) => (jsx(SwipeListItem, { className: style(snapAlign, visibleItemCount ? childStyleMap[visibleItemCount - 1] : '', isVerticalList ? 'h-full' : ''), style: isHorizontalList ? getContainerOffset(padding / 4) : {}, activeIndex: activeIndex, idx: idx, observerOptions: observerOptions, onIntersection: handleIntersection, children: child }, String(idx))))(children) }));
3099
+ return (jsx("div", { className: style('box-border overflow-auto no-scrollbar', listType, className), style: containerStyle, ref: containerRef, children: mapChildren((child, idx) => (jsx(SwipeListItem, { className: style(snapAlign, visibleItemCount ? childStyleMap[visibleItemCount - 1] : '', isVerticalList ? 'h-full' : '', itemClassName), style: isHorizontalList ? getContainerOffset(padding / 4) : {}, activeIndex: activeIndex, idx: idx, observerOptions: observerOptions, onIntersection: handleIntersection, children: child }, String(idx))))(children) }));
3100
3100
  });
3101
3101
  // Styles used to compensate outer container padding to get rid of clipping effect
3102
3102
  const getContainerOffset = (padding, additionalPadding = 0) => ({
@@ -3183,13 +3183,13 @@
3183
3183
  scrollToStart(containerRef.current);
3184
3184
  }
3185
3185
  }, [itemCount, canScrollRight]);
3186
- const scrollTo = useCallback((idx) => {
3186
+ const scrollTo = useCallback((idx, options = {
3187
+ behavior: 'smooth',
3188
+ block: 'nearest',
3189
+ inline: 'center',
3190
+ }) => {
3187
3191
  if (containerRef?.current) {
3188
- containerRef.current.children[idx]?.scrollIntoView({
3189
- behavior: 'smooth',
3190
- block: 'nearest',
3191
- inline: 'center',
3192
- });
3192
+ containerRef.current.children[idx]?.scrollIntoView(options);
3193
3193
  }
3194
3194
  }, [containerRef]);
3195
3195
  return [
@@ -5064,7 +5064,7 @@
5064
5064
  }, [data, filtrationState]);
5065
5065
  return (jsxs("div", { className: style('space-y-1', className), children: [jsxs("div", { className: "bg-white", children: [jsxs("div", { className: "pt-6xl px-6xl", children: [jsxs("div", { className: "flex gap-xs pb-2xl", children: [jsx(Heading, { headingType: "h2", children: title }), lengthItems ? (jsx(Text, { size: "text-h2", color: "text-secondary-text", children: `(${lengthItems})` })) : null] }), descriptionData ? renderDescriptionBlock$1(descriptionData) : null, renderFiltrationForm(Object.keys(initFilterState), { field, reset })] }), jsx("div", { className: "h-[600px]", children: jsx(ClientOnly, { children: jsx(YandexMap, { points: points, className: "h-full" }) }) })] }), filteredItems.map(renderCard)] }));
5066
5066
  });
5067
- const renderDescriptionBlock$1 = ({ description, list }) => description || list?.length ? (jsxs("div", { className: "p-xl mb-2xl border-b sm:border border-main-divider sm:rounded-md", children: [description ? (jsx(Paragraph, { size: "text-l", font: "font-light", children: description })) : null, list?.length ? (jsx("div", { className: "flex flex-col sm:flex-row gap-2xl sm:flex-wrap pt-xs", children: list.map((item, i) => (jsxs("div", { className: "flex gap-xs items-center", children: [item?.image ? jsx(Img, { image: item.image }) : null, item?.text ? (jsx(Text, { size: "text-m", font: "font-light", children: item.text })) : null] }, String(i)))) })) : null] })) : null;
5067
+ const renderDescriptionBlock$1 = ({ __html, list }) => __html || list?.length ? (jsxs("div", { className: "p-xl mb-2xl border-b sm:border border-main-divider sm:rounded-md", children: [__html ? jsx(RichText, { __html: __html }) : null, list?.length ? (jsx("div", { className: "flex flex-col sm:flex-row gap-2xl sm:flex-wrap pt-xs", children: list.map((item, i) => (jsxs("div", { className: "flex gap-xs items-center", children: [item?.image ? jsx(Img, { image: item.image }) : null, item?.text ? (jsx(Text, { size: "text-m", font: "font-light", children: item.text })) : null] }, String(i)))) })) : null] })) : null;
5068
5068
 
5069
5069
  const colorStyle = {
5070
5070
  yellow: { border: 'border-yellow-light', text: 'text-yellow' },
@@ -5328,13 +5328,15 @@
5328
5328
  });
5329
5329
 
5330
5330
  const GOLDEN_RATIO = 1.618;
5331
- const Placeholder = JSX(({ className, title, description = 'Блок в разработке...', ...rest }) => (jsxs(BlockWrapper, { className: style('box-border', className), ...rest, children: [jsx(Headline, { className: "max-w-[600px]", title: title, description: description, headlineVersion: "L", align: "text-left", isEmbedded: true }), jsx("figure", { className: "m-0 mt-xl min-w-[80%]", children: renderShimmer() })] })));
5331
+ const Shimmer = JSX(({ className, size }) => (jsx("figure", { className: style('m-0 mt-xl min-w-[80%]', className), children: renderShimmer(size) })));
5332
5332
  const renderShimmer = (size = 3) => goldenSequence(100, size)
5333
5333
  .map((_) => Math.floor(_))
5334
5334
  .map(renderShimmerItem);
5335
5335
  const renderShimmerItem = (width, index) => (jsx("div", { style: { width: `${width || 100}%` }, className: "h-4 mt-xs bg-secondary-light" }, String(index)));
5336
5336
  const goldenSequence = (first, size) => [first].concat(size > 0 ? goldenSequence(first / GOLDEN_RATIO, size - 1) : []);
5337
5337
 
5338
+ const Placeholder = JSX(({ className, title, description = 'Блок в разработке...', ...rest }) => (jsxs(BlockWrapper, { className: style('box-border', className), ...rest, children: [jsx(Headline, { className: "max-w-[600px]", title: title, description: description, headlineVersion: "L", align: "text-left", isEmbedded: true }), jsx(Shimmer, {})] })));
5339
+
5338
5340
  const ProductGallery = JSX(({ className = '', padding, slides = [], ...rest }) => {
5339
5341
  const [activeSlideIndex, setActiveSlideIndex] = useState(0);
5340
5342
  return (jsxs(BlockWrapper, { className: style('box-border overflow-hidden', className), defaultPadding: "py-6xl", padding: padding, ...rest, children: [jsx("div", { className: "flex duration-1000", style: { transform: `translateX(-${activeSlideIndex * 100}%)` }, role: "list", children: slides.map(({ productBlock }, i) => (jsx("div", { className: "box-border grow-0 shrink-0 basis-full", role: "listitem", children: jsx(BaseProductTile, { className: "pl-6xl h-full", headlineVersion: "M", isFullWidthTitle: false, ...productBlock, ...rest }) }, String(i)))) }), jsx("div", { className: "h-28 px-xs mt-m -mb-m flex gap-xs box-border", children: slides.map(renderNavButton({ activeSlideIndex, onClick: setActiveSlideIndex })) })] }));
@@ -5686,6 +5688,56 @@
5686
5688
  };
5687
5689
  const normalizeTab = (_) => _?.type === 'group' ? { text: _.title, name: _.ref } : _;
5688
5690
 
5691
+ const alignTabStyle = {
5692
+ start: 'text-start',
5693
+ center: 'text-center',
5694
+ end: 'text-end',
5695
+ };
5696
+
5697
+ const getButtonClassNames = (isActive) => ({
5698
+ btn: `w-96 ${isActive
5699
+ ? 'p-m border-none bg-primary-main text-white'
5700
+ : 'p-s ease-in duration-300 bg-white text-primary-text'}`,
5701
+ title: isActive ? 'mb-xs text-xl' : 'mb-2xs text-l',
5702
+ desc: `font-light ${isActive ? 'text-l text-white' : 'text-m text-secondary-text'}`,
5703
+ icon: isActive ? '' : 'text-primary-main',
5704
+ iconVersion: (isActive ? 'white' : 'normal'),
5705
+ });
5706
+ const TabsLayoutButton = JSX(({ tab, className, onClick, isActive }) => {
5707
+ const buttonClassNames = getButtonClassNames(isActive);
5708
+ return (jsxs("button", { type: "button", onClick: onClick, "aria-label": tab?.title, className: style('border border-gray cursor-pointer text-left border-b-0 mt-auto flex gap-2xs', buttonClassNames.btn, className), children: [tab?.icon ? (jsx(Img, { className: style('h-6 w-6 min-w-6 min-h-6', buttonClassNames.icon), image: {
5709
+ ...tab?.icon,
5710
+ iconVersion: tab?.icon?.iconVersion ?? buttonClassNames.iconVersion,
5711
+ }, width: "24", height: "24" })) : null, jsxs("div", { className: "border-0", children: [tab?.title ? jsx("div", { className: buttonClassNames.title, children: tab.title }) : null, tab?.description ? jsx("div", { className: buttonClassNames.desc, children: tab.description }) : null] })] }));
5712
+ });
5713
+
5714
+ const REDIRECT_DELAY = 0.5 * 1000;
5715
+ const TabsLayoutRedirectTab = JSX(({ tab }) => {
5716
+ const link = useLink();
5717
+ useDebouncedEffect(() => {
5718
+ const { onClick } = link(tab);
5719
+ onClick();
5720
+ }, [tab], REDIRECT_DELAY);
5721
+ return jsx(Shimmer, { className: "col-span-12 p-xl", size: 5 });
5722
+ });
5723
+
5724
+ const TabsLayout = JSX(({ className = '', tabs = [], block, tabAlign, ...rest }) => {
5725
+ const [activeTabIndex, setActiveTabIndex] = useState(getInitSelectedIndex(tabs));
5726
+ const slotName = getSlotName(tabs[activeTabIndex], activeTabIndex);
5727
+ const itemCount = tabs.length;
5728
+ const [activeSlideIndex, { inc: incActiveSlideIndex, dec: decActiveSlideIndex }] = useCarouselControls({ itemCount }, activeTabIndex);
5729
+ const [containerRef, scroll] = useSwipeListScroll({ itemCount });
5730
+ useEffect(() => {
5731
+ scroll.scrollTo(activeTabIndex, { behavior: 'auto' });
5732
+ }, []);
5733
+ return (jsxs(BlockWrapper, { className: style(className), defaultPadding: "p-0", ...rest, children: [jsxs("div", { className: "relative border-b-8 border-primary-main", children: [jsx(SwipeListContainer, { itemClassName: "flex", containerRef: containerRef, snapAlign: "snap-end", gap: 8, onVisibleIndicesChange: scroll.handleVisibleIndicesChange, children: tabs.map(renderTabButton(activeTabIndex, setActiveTabIndex, tabAlign)) }), jsx(CarouselScrollButtons, { scroll: scroll, arrowsPadded: true, onScrollLeft: decActiveSlideIndex, onScrollRight: incActiveSlideIndex, activeIndex: activeSlideIndex, itemCount: itemCount })] }), jsx("div", { className: "space-y-px @5xl:space-y-0 @5xl:grid @5xl:grid-cols-12 @5xl:gap-2xs", children: tabs[activeTabIndex]?.href ? (jsx(TabsLayoutRedirectTab, { tab: tabs[activeTabIndex] })) : (renderBlocksList(block?.slots?.[slotName], { ...rest?.options, slotName })) })] }));
5734
+ });
5735
+ TabsLayout.slots = ({ tabs }) => tabs?.filter((_) => !_.href).map(getSlotName) || [];
5736
+ TabsLayout.childrenTypes = { exclude: ['TabsLayout'] };
5737
+ const getSlotName = (tab, index) => tab?.title || `Слот №${index}`;
5738
+ const getInitSelectedIndex = (tabs) => tabs.reduce((selectedIndex, tab, i) => (tab.selected ? i : selectedIndex), 0);
5739
+ const renderTabButton = (activeTabIndex, onClick, tabAlign = 'start') => (tab, i) => (jsx(TabsLayoutButton, { className: alignTabStyle[tabAlign], tab: tab, isActive: activeTabIndex === i, onClick: () => onClick(i) }, String(i)));
5740
+
5689
5741
  const dividerStyle = '@4xl:border-main-divider @4xl:border-b';
5690
5742
  const firstCellStyle = 'w-80 flex-shrink-0';
5691
5743
  const COLS_LENGTH_FOR_SCROLL = 2;
@@ -5927,7 +5979,6 @@
5927
5979
  Placeholder,
5928
5980
  ProductBlock,
5929
5981
  ProductGallery,
5930
- UnitBlock,
5931
5982
  RepresentativeOfficeInfo,
5932
5983
  RichTextBlock,
5933
5984
  RollupItem,
@@ -5935,8 +5986,10 @@
5935
5986
  StepsBlock,
5936
5987
  SwipeListControlBlock,
5937
5988
  Tabs,
5989
+ TabsLayout,
5938
5990
  TariffsTable,
5939
5991
  TextBlock,
5992
+ UnitBlock,
5940
5993
  VerticalLayout,
5941
5994
  Video,
5942
5995
  };
@@ -6119,7 +6172,7 @@
6119
6172
  return (jsx("div", { className: "flex items-end absolute bottom-0 right-0 h-full pointer-events-none", children: jsx(LikeControl, { className: "rounded-tl-3xl sticky bottom-0 pointer-events-auto" }) }));
6120
6173
  }
6121
6174
 
6122
- const packageVersion = "0.14.146";
6175
+ const packageVersion = "0.14.148";
6123
6176
 
6124
6177
  exports.Blocks = Blocks;
6125
6178
  exports.ContentPage = ContentPage;