@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.
- package/bundle/blocks.schema.json +1 -1
- package/bundle/bundle.umd.js +67 -14
- package/bundle/bundle.umd.min.js +1 -1
- package/bundle/components/OfficesAtmsMap/OfficesAtmsMapContent.d.ts +2 -3
- package/bundle/components/TabsLayout/TabsLayout.d.ts +5 -0
- package/bundle/components/TabsLayout/TabsLayoutButton.d.ts +10 -0
- package/bundle/components/TabsLayout/TabsLayoutContent.d.ts +21 -0
- package/bundle/components/TabsLayout/TabsLayoutRedirectTab.d.ts +6 -0
- package/bundle/components/TabsLayout/alignTabStyle.d.ts +2 -0
- package/bundle/ui-kit/Shimmer/Shimmer.d.ts +5 -0
- package/bundle/ui-kit/SwipeListControl/SwipeListContainer.d.ts +2 -2
- package/bundle/ui-kit/SwipeListControl/useSwipeListScroll.d.ts +1 -1
- package/dist/components/Blocks.js +3 -1
- package/dist/components/Blocks.js.map +1 -1
- package/dist/components/Blocks.mobile.js +3 -1
- package/dist/components/Blocks.mobile.js.map +1 -1
- package/dist/components/ContentPage/ContentPage.page.json +0 -37
- package/dist/components/OfficesAtmsMap/OfficesAtmsMapContent.d.ts +2 -3
- package/dist/components/OfficesAtmsMap/OfficesAtmsMapLayout.js +2 -2
- package/dist/components/OfficesAtmsMap/OfficesAtmsMapLayout.js.map +1 -1
- package/dist/components/Placeholder/Placeholder.js +2 -7
- package/dist/components/Placeholder/Placeholder.js.map +1 -1
- package/dist/components/TabsLayout/TabsLayout.d.ts +5 -0
- package/dist/components/TabsLayout/TabsLayout.js +32 -0
- package/dist/components/TabsLayout/TabsLayout.js.map +1 -0
- package/dist/components/TabsLayout/TabsLayoutButton.d.ts +10 -0
- package/dist/components/TabsLayout/TabsLayoutButton.js +23 -0
- package/dist/components/TabsLayout/TabsLayoutButton.js.map +1 -0
- package/dist/components/TabsLayout/TabsLayoutContent.d.ts +21 -0
- package/dist/components/TabsLayout/TabsLayoutContent.js +2 -0
- package/dist/components/TabsLayout/TabsLayoutContent.js.map +1 -0
- package/dist/components/TabsLayout/TabsLayoutRedirectTab.d.ts +6 -0
- package/dist/components/TabsLayout/TabsLayoutRedirectTab.js +17 -0
- package/dist/components/TabsLayout/TabsLayoutRedirectTab.js.map +1 -0
- package/dist/components/TabsLayout/alignTabStyle.d.ts +2 -0
- package/dist/components/TabsLayout/alignTabStyle.js +8 -0
- package/dist/components/TabsLayout/alignTabStyle.js.map +1 -0
- package/dist/setup-fixture.js +1 -1
- package/dist/setup-fixture.js.map +1 -1
- package/dist/ui-kit/Shimmer/Shimmer.d.ts +5 -0
- package/dist/ui-kit/Shimmer/Shimmer.js +13 -0
- package/dist/ui-kit/Shimmer/Shimmer.js.map +1 -0
- package/dist/ui-kit/SwipeListControl/SwipeListContainer.d.ts +2 -2
- package/dist/ui-kit/SwipeListControl/SwipeListContainer.js +2 -2
- package/dist/ui-kit/SwipeListControl/SwipeListContainer.js.map +1 -1
- package/dist/ui-kit/SwipeListControl/SwipeListItem.js +3 -2
- package/dist/ui-kit/SwipeListControl/SwipeListItem.js.map +1 -1
- package/dist/ui-kit/SwipeListControl/useSwipeListScroll.d.ts +1 -1
- package/dist/ui-kit/SwipeListControl/useSwipeListScroll.js +6 -6
- package/dist/ui-kit/SwipeListControl/useSwipeListScroll.js.map +1 -1
- package/lib/common.css +1 -1
- package/lib/components/Blocks.js +3 -1
- package/lib/components/Blocks.js.map +1 -1
- package/lib/components/Blocks.mobile.js +3 -1
- package/lib/components/Blocks.mobile.js.map +1 -1
- package/lib/components/ContentPage/ContentPage.page.json +0 -37
- package/lib/components/OfficesAtmsMap/OfficesAtmsMapContent.d.ts +2 -3
- package/lib/components/OfficesAtmsMap/OfficesAtmsMapLayout.js +2 -2
- package/lib/components/OfficesAtmsMap/OfficesAtmsMapLayout.js.map +1 -1
- package/lib/components/Placeholder/Placeholder.js +2 -7
- package/lib/components/Placeholder/Placeholder.js.map +1 -1
- package/lib/components/TabsLayout/TabsLayout.d.ts +5 -0
- package/lib/components/TabsLayout/TabsLayout.fixture.d.ts +6 -0
- package/lib/components/TabsLayout/TabsLayout.fixture.mobile.d.ts +6 -0
- package/lib/components/TabsLayout/TabsLayout.js +30 -0
- package/lib/components/TabsLayout/TabsLayout.js.map +1 -0
- package/lib/components/TabsLayout/TabsLayoutButton.d.ts +10 -0
- package/lib/components/TabsLayout/TabsLayoutButton.js +21 -0
- package/lib/components/TabsLayout/TabsLayoutButton.js.map +1 -0
- package/lib/components/TabsLayout/TabsLayoutContent.d.ts +21 -0
- package/lib/components/TabsLayout/TabsLayoutContent.js +2 -0
- package/lib/components/TabsLayout/TabsLayoutContent.js.map +1 -0
- package/lib/components/TabsLayout/TabsLayoutRedirectTab.d.ts +6 -0
- package/lib/components/TabsLayout/TabsLayoutRedirectTab.js +15 -0
- package/lib/components/TabsLayout/TabsLayoutRedirectTab.js.map +1 -0
- package/lib/components/TabsLayout/alignTabStyle.d.ts +2 -0
- package/lib/components/TabsLayout/alignTabStyle.js +6 -0
- package/lib/components/TabsLayout/alignTabStyle.js.map +1 -0
- package/lib/setup-fixture.js +1 -1
- package/lib/setup-fixture.js.map +1 -1
- package/lib/ui-kit/Shimmer/Shimmer.d.ts +5 -0
- package/lib/ui-kit/Shimmer/Shimmer.js +11 -0
- package/lib/ui-kit/Shimmer/Shimmer.js.map +1 -0
- package/lib/ui-kit/SwipeListControl/SwipeListContainer.d.ts +2 -2
- package/lib/ui-kit/SwipeListControl/SwipeListContainer.js +2 -2
- package/lib/ui-kit/SwipeListControl/SwipeListContainer.js.map +1 -1
- package/lib/ui-kit/SwipeListControl/SwipeListItem.js +3 -2
- package/lib/ui-kit/SwipeListControl/SwipeListItem.js.map +1 -1
- package/lib/ui-kit/SwipeListControl/useSwipeListScroll.d.ts +1 -1
- package/lib/ui-kit/SwipeListControl/useSwipeListScroll.js +6 -6
- package/lib/ui-kit/SwipeListControl/useSwipeListScroll.js.map +1 -1
- package/mobile/bundle/bundle.umd.js +76 -23
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/bundle/components/OfficesAtmsMap/OfficesAtmsMapContent.d.ts +2 -3
- package/mobile/bundle/components/TabsLayout/TabsLayout.d.ts +5 -0
- package/mobile/bundle/components/TabsLayout/TabsLayoutButton.d.ts +10 -0
- package/mobile/bundle/components/TabsLayout/TabsLayoutContent.d.ts +21 -0
- package/mobile/bundle/components/TabsLayout/TabsLayoutRedirectTab.d.ts +6 -0
- package/mobile/bundle/components/TabsLayout/alignTabStyle.d.ts +2 -0
- package/mobile/bundle/ui-kit/Shimmer/Shimmer.d.ts +5 -0
- package/mobile/bundle/ui-kit/SwipeListControl/SwipeListContainer.d.ts +2 -2
- package/mobile/bundle/ui-kit/SwipeListControl/useSwipeListScroll.d.ts +1 -1
- package/mobile/dist/components/Blocks.js +3 -1
- package/mobile/dist/components/Blocks.js.map +1 -1
- package/mobile/dist/components/ContentPage/ContentPage.page.json +0 -37
- package/mobile/dist/components/OfficesAtmsMap/OfficesAtmsMapContent.d.ts +2 -3
- package/mobile/dist/components/OfficesAtmsMap/OfficesAtmsMapLayout.js +2 -2
- package/mobile/dist/components/OfficesAtmsMap/OfficesAtmsMapLayout.js.map +1 -1
- package/mobile/dist/components/Placeholder/Placeholder.js +2 -7
- package/mobile/dist/components/Placeholder/Placeholder.js.map +1 -1
- package/mobile/dist/components/TabsLayout/TabsLayout.d.ts +5 -0
- package/mobile/dist/components/TabsLayout/TabsLayout.js +32 -0
- package/mobile/dist/components/TabsLayout/TabsLayout.js.map +1 -0
- package/mobile/dist/components/TabsLayout/TabsLayoutButton.d.ts +10 -0
- package/mobile/dist/components/TabsLayout/TabsLayoutButton.js +23 -0
- package/mobile/dist/components/TabsLayout/TabsLayoutButton.js.map +1 -0
- package/mobile/dist/components/TabsLayout/TabsLayoutContent.d.ts +21 -0
- package/mobile/dist/components/TabsLayout/TabsLayoutContent.js +2 -0
- package/mobile/dist/components/TabsLayout/TabsLayoutContent.js.map +1 -0
- package/mobile/dist/components/TabsLayout/TabsLayoutRedirectTab.d.ts +6 -0
- package/mobile/dist/components/TabsLayout/TabsLayoutRedirectTab.js +17 -0
- package/mobile/dist/components/TabsLayout/TabsLayoutRedirectTab.js.map +1 -0
- package/mobile/dist/components/TabsLayout/alignTabStyle.d.ts +2 -0
- package/mobile/dist/components/TabsLayout/alignTabStyle.js +8 -0
- package/mobile/dist/components/TabsLayout/alignTabStyle.js.map +1 -0
- package/mobile/dist/setup-fixture.js +1 -1
- package/mobile/dist/setup-fixture.js.map +1 -1
- package/mobile/dist/ui-kit/Shimmer/Shimmer.d.ts +5 -0
- package/mobile/dist/ui-kit/Shimmer/Shimmer.js +13 -0
- package/mobile/dist/ui-kit/Shimmer/Shimmer.js.map +1 -0
- package/mobile/dist/ui-kit/SwipeListControl/SwipeListContainer.d.ts +2 -2
- package/mobile/dist/ui-kit/SwipeListControl/SwipeListContainer.js +2 -2
- package/mobile/dist/ui-kit/SwipeListControl/SwipeListContainer.js.map +1 -1
- package/mobile/dist/ui-kit/SwipeListControl/SwipeListItem.js +3 -2
- package/mobile/dist/ui-kit/SwipeListControl/SwipeListItem.js.map +1 -1
- package/mobile/dist/ui-kit/SwipeListControl/useSwipeListScroll.d.ts +1 -1
- package/mobile/dist/ui-kit/SwipeListControl/useSwipeListScroll.js +6 -6
- package/mobile/dist/ui-kit/SwipeListControl/useSwipeListScroll.js.map +1 -1
- package/mobile/lib/common.css +1 -1
- package/mobile/lib/components/Blocks.js +3 -1
- package/mobile/lib/components/Blocks.js.map +1 -1
- package/mobile/lib/components/ContentPage/ContentPage.page.json +0 -37
- package/mobile/lib/components/OfficesAtmsMap/OfficesAtmsMapContent.d.ts +2 -3
- package/mobile/lib/components/OfficesAtmsMap/OfficesAtmsMapLayout.js +2 -2
- package/mobile/lib/components/OfficesAtmsMap/OfficesAtmsMapLayout.js.map +1 -1
- package/mobile/lib/components/Placeholder/Placeholder.js +2 -7
- package/mobile/lib/components/Placeholder/Placeholder.js.map +1 -1
- package/mobile/lib/components/TabsLayout/TabsLayout.d.ts +5 -0
- package/mobile/lib/components/TabsLayout/TabsLayout.js +30 -0
- package/mobile/lib/components/TabsLayout/TabsLayout.js.map +1 -0
- package/mobile/lib/components/TabsLayout/TabsLayoutButton.d.ts +10 -0
- package/mobile/lib/components/TabsLayout/TabsLayoutButton.js +21 -0
- package/mobile/lib/components/TabsLayout/TabsLayoutButton.js.map +1 -0
- package/mobile/lib/components/TabsLayout/TabsLayoutContent.d.ts +21 -0
- package/mobile/lib/components/TabsLayout/TabsLayoutContent.js +2 -0
- package/mobile/lib/components/TabsLayout/TabsLayoutContent.js.map +1 -0
- package/mobile/lib/components/TabsLayout/TabsLayoutRedirectTab.d.ts +6 -0
- package/mobile/lib/components/TabsLayout/TabsLayoutRedirectTab.js +15 -0
- package/mobile/lib/components/TabsLayout/TabsLayoutRedirectTab.js.map +1 -0
- package/mobile/lib/components/TabsLayout/alignTabStyle.d.ts +2 -0
- package/mobile/lib/components/TabsLayout/alignTabStyle.js +6 -0
- package/mobile/lib/components/TabsLayout/alignTabStyle.js.map +1 -0
- package/mobile/lib/setup-fixture.js +1 -1
- package/mobile/lib/setup-fixture.js.map +1 -1
- package/mobile/lib/ui-kit/Shimmer/Shimmer.d.ts +5 -0
- package/mobile/lib/ui-kit/Shimmer/Shimmer.js +11 -0
- package/mobile/lib/ui-kit/Shimmer/Shimmer.js.map +1 -0
- package/mobile/lib/ui-kit/SwipeListControl/SwipeListContainer.d.ts +2 -2
- package/mobile/lib/ui-kit/SwipeListControl/SwipeListContainer.js +2 -2
- package/mobile/lib/ui-kit/SwipeListControl/SwipeListContainer.js.map +1 -1
- package/mobile/lib/ui-kit/SwipeListControl/SwipeListItem.js +3 -2
- package/mobile/lib/ui-kit/SwipeListControl/SwipeListItem.js.map +1 -1
- package/mobile/lib/ui-kit/SwipeListControl/useSwipeListScroll.d.ts +1 -1
- package/mobile/lib/ui-kit/SwipeListControl/useSwipeListScroll.js +6 -6
- package/mobile/lib/ui-kit/SwipeListControl/useSwipeListScroll.js.map +1 -1
- package/mobile/src/components/Blocks.ts +3 -1
- package/mobile/src/components/ContentPage/ContentPage.page.json +0 -37
- package/mobile/src/components/OfficesAtmsMap/OfficesAtmsMap.ui.json +3 -0
- package/mobile/src/components/OfficesAtmsMap/OfficesAtmsMapContent.ts +2 -3
- package/mobile/src/components/OfficesAtmsMap/OfficesAtmsMapLayout.tsx +4 -8
- package/mobile/src/components/Placeholder/Placeholder.tsx +2 -19
- package/mobile/src/components/TabsLayout/TabsLayout.example.json +8 -0
- package/mobile/src/components/TabsLayout/TabsLayout.tsx +88 -0
- package/mobile/src/components/TabsLayout/TabsLayout.ui.json +11 -0
- package/mobile/src/components/TabsLayout/TabsLayoutButton.tsx +60 -0
- package/mobile/src/components/TabsLayout/TabsLayoutContent.ts +26 -0
- package/mobile/src/components/TabsLayout/TabsLayoutRedirectTab.tsx +26 -0
- package/mobile/src/components/TabsLayout/alignTabStyle.ts +7 -0
- package/mobile/src/setup-fixture.ts +1 -1
- package/mobile/src/ui-kit/Shimmer/Shimmer.tsx +29 -0
- package/mobile/src/ui-kit/SwipeListControl/SwipeListContainer.tsx +5 -4
- package/mobile/src/ui-kit/SwipeListControl/SwipeListItem.tsx +12 -3
- package/mobile/src/ui-kit/SwipeListControl/useSwipeListScroll.ts +10 -7
- package/package.json +2 -2
- package/src/components/Blocks.mobile.ts +3 -1
- package/src/components/Blocks.ts +3 -1
- package/src/components/ContentPage/ContentPage.page.json +0 -37
- package/src/components/OfficesAtmsMap/OfficesAtmsMap.fixture.mobile.tsx +4 -2
- package/src/components/OfficesAtmsMap/OfficesAtmsMap.fixture.tsx +4 -2
- package/src/components/OfficesAtmsMap/OfficesAtmsMap.ui.json +3 -0
- package/src/components/OfficesAtmsMap/OfficesAtmsMapContent.ts +2 -3
- package/src/components/OfficesAtmsMap/OfficesAtmsMapLayout.tsx +4 -8
- package/src/components/Placeholder/Placeholder.tsx +2 -19
- package/src/components/TabsLayout/TabsLayout.example.json +8 -0
- package/src/components/TabsLayout/TabsLayout.fixture.mobile.tsx +53 -0
- package/src/components/TabsLayout/TabsLayout.fixture.tsx +53 -0
- package/src/components/TabsLayout/TabsLayout.tsx +88 -0
- package/src/components/TabsLayout/TabsLayout.ui.json +11 -0
- package/src/components/TabsLayout/TabsLayoutButton.tsx +60 -0
- package/src/components/TabsLayout/TabsLayoutContent.ts +26 -0
- package/src/components/TabsLayout/TabsLayoutRedirectTab.tsx +26 -0
- package/src/components/TabsLayout/alignTabStyle.ts +7 -0
- package/src/setup-fixture.ts +1 -1
- package/src/ui-kit/Shimmer/Shimmer.tsx +29 -0
- package/src/ui-kit/SwipeListControl/SwipeListContainer.tsx +5 -4
- package/src/ui-kit/SwipeListControl/SwipeListItem.tsx +12 -3
- package/src/ui-kit/SwipeListControl/useSwipeListScroll.ts +10 -7
package/bundle/bundle.umd.js
CHANGED
|
@@ -3064,18 +3064,18 @@
|
|
|
3064
3064
|
.concat(1);
|
|
3065
3065
|
}
|
|
3066
3066
|
|
|
3067
|
-
const SwipeListItem = JSX(({ className
|
|
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:
|
|
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
|
|
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 = ({
|
|
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
|
|
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.
|
|
6175
|
+
const packageVersion = "0.14.148";
|
|
6123
6176
|
|
|
6124
6177
|
exports.Blocks = Blocks;
|
|
6125
6178
|
exports.ContentPage = ContentPage;
|