@redneckz/wildless-cms-uni-blocks 0.3.29 → 0.3.32
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/README.md +1 -1
- package/bundle/blocks.schema.json +1 -1
- package/bundle/bundle.umd.js +70 -55
- package/bundle/bundle.umd.min.js +1 -1
- package/dist/components/Accordion/Accordion.js +2 -6
- package/dist/components/Accordion/Accordion.js.map +1 -1
- package/dist/components/Accordion/AccordionContent.d.ts +3 -3
- package/dist/components/Accordion/AccordionItem.js +4 -11
- package/dist/components/Accordion/AccordionItem.js.map +1 -1
- package/dist/components/Accordion/AccordionItem.mobile.js +6 -3
- package/dist/components/Accordion/AccordionItem.mobile.js.map +1 -1
- package/dist/components/Accordion/AccordionItemInner.js +2 -2
- package/dist/components/Accordion/AccordionItemInner.js.map +1 -1
- package/dist/components/Accordion/AccordionItemInner.mobile.js +2 -3
- package/dist/components/Accordion/AccordionItemInner.mobile.js.map +1 -1
- package/dist/components/Footer/MediaButton.js +1 -1
- package/dist/components/Footer/MediaButton.js.map +1 -1
- package/dist/components/Header/Header.js +1 -1
- package/dist/components/Header/Header.js.map +1 -1
- package/dist/components/MobileAppTile/MobileAppTile.js +1 -1
- package/dist/components/MobileAppTile/MobileAppTile.js.map +1 -1
- package/dist/components/OtherProducts/OtherProductsContent.d.ts +3 -12
- package/dist/components/PictureText/PictureText.js +8 -4
- package/dist/components/PictureText/PictureText.js.map +1 -1
- package/dist/components/PictureText/PictureTextContent.d.ts +7 -0
- package/dist/components/ProductGalleryGreen/ProductGalleryGreen.js +31 -15
- package/dist/components/ProductGalleryGreen/ProductGalleryGreen.js.map +1 -1
- package/dist/components/ProductGalleryGreen/ProductGalleryGreenContent.d.ts +2 -0
- package/dist/components/Recommendation/Recommendation.js +1 -1
- package/dist/components/Recommendation/RecommendationCard.js +1 -1
- package/dist/components/Recommendation/RecommendationCard.js.map +1 -1
- package/dist/components/StepsBlock/StepsBlock.js +8 -2
- package/dist/components/StepsBlock/StepsBlock.js.map +1 -1
- package/dist/components/StepsBlock/StepsBlock.mobile.js +10 -4
- package/dist/components/StepsBlock/StepsBlock.mobile.js.map +1 -1
- package/dist/components/StepsBlock/StepsBlockContent.d.ts +3 -2
- package/dist/components/TextBlock/TextBlockContent.d.ts +1 -1
- package/dist/ui-kit/BlocksList/EmbeddableBlocks.mobile.d.ts +8 -0
- package/dist/ui-kit/BlocksList/EmbeddableBlocks.mobile.js +17 -0
- package/dist/ui-kit/BlocksList/EmbeddableBlocks.mobile.js.map +1 -0
- package/dist/ui-kit/BlocksList/renderBlocksList.d.ts +2 -4
- package/dist/ui-kit/BlocksList/renderBlocksList.js +3 -3
- package/dist/ui-kit/BlocksList/renderBlocksList.js.map +1 -1
- package/dist/ui-kit/Button/ButtonInner.js +1 -1
- package/dist/ui-kit/Button/ButtonInner.js.map +1 -1
- package/dist/ui-kit/Heading/Heading.js +1 -1
- package/dist/ui-kit/Heading/Heading.js.map +1 -1
- package/dist/ui-kit/SwipeListControl/SwipeListControlDots.js +1 -1
- package/dist/ui-kit/SwipeListControl/SwipeListControlDots.js.map +1 -1
- package/dist/ui-kit/SwipeListControl/utils/getScrollPoints.js +7 -1
- package/dist/ui-kit/SwipeListControl/utils/getScrollPoints.js.map +1 -1
- package/dist/ui-kit/Tabs/Tabs.js +1 -1
- package/dist/ui-kit/Tabs/Tabs.js.map +1 -1
- package/lib/common.css +1 -1
- package/lib/components/Accordion/Accordion.js +2 -6
- package/lib/components/Accordion/Accordion.js.map +1 -1
- package/lib/components/Accordion/AccordionContent.d.ts +3 -3
- package/lib/components/Accordion/AccordionItem.js +4 -11
- package/lib/components/Accordion/AccordionItem.js.map +1 -1
- package/lib/components/Accordion/AccordionItem.mobile.js +6 -3
- package/lib/components/Accordion/AccordionItem.mobile.js.map +1 -1
- package/lib/components/Accordion/AccordionItemInner.js +2 -2
- package/lib/components/Accordion/AccordionItemInner.js.map +1 -1
- package/lib/components/Accordion/AccordionItemInner.mobile.js +2 -3
- package/lib/components/Accordion/AccordionItemInner.mobile.js.map +1 -1
- package/lib/components/Footer/MediaButton.js +1 -1
- package/lib/components/Footer/MediaButton.js.map +1 -1
- package/lib/components/Header/Header.js +1 -1
- package/lib/components/Header/Header.js.map +1 -1
- package/lib/components/MobileAppTile/MobileAppTile.js +1 -1
- package/lib/components/MobileAppTile/MobileAppTile.js.map +1 -1
- package/lib/components/OtherProducts/OtherProductsContent.d.ts +3 -12
- package/lib/components/PictureText/PictureText.js +8 -4
- package/lib/components/PictureText/PictureText.js.map +1 -1
- package/lib/components/PictureText/PictureTextContent.d.ts +7 -0
- package/lib/components/ProductGalleryGreen/ProductGalleryGreen.fixture.d.ts +1 -0
- package/lib/components/ProductGalleryGreen/ProductGalleryGreen.js +31 -15
- package/lib/components/ProductGalleryGreen/ProductGalleryGreen.js.map +1 -1
- package/lib/components/ProductGalleryGreen/ProductGalleryGreenContent.d.ts +2 -0
- package/lib/components/Recommendation/Recommendation.js +1 -1
- package/lib/components/Recommendation/RecommendationCard.js +1 -1
- package/lib/components/Recommendation/RecommendationCard.js.map +1 -1
- package/lib/components/StepsBlock/StepsBlock.fixture.d.ts +1 -0
- package/lib/components/StepsBlock/StepsBlock.js +8 -2
- package/lib/components/StepsBlock/StepsBlock.js.map +1 -1
- package/lib/components/StepsBlock/StepsBlock.mobile.js +10 -4
- package/lib/components/StepsBlock/StepsBlock.mobile.js.map +1 -1
- package/lib/components/StepsBlock/StepsBlockContent.d.ts +3 -2
- package/lib/components/TextBlock/TextBlockContent.d.ts +1 -1
- package/lib/ui-kit/BlocksList/EmbeddableBlocks.mobile.d.ts +8 -0
- package/lib/ui-kit/BlocksList/EmbeddableBlocks.mobile.js +15 -0
- package/lib/ui-kit/BlocksList/EmbeddableBlocks.mobile.js.map +1 -0
- package/lib/ui-kit/BlocksList/renderBlocksList.d.ts +2 -4
- package/lib/ui-kit/BlocksList/renderBlocksList.js +3 -3
- package/lib/ui-kit/BlocksList/renderBlocksList.js.map +1 -1
- package/lib/ui-kit/Button/ButtonInner.js +1 -1
- package/lib/ui-kit/Button/ButtonInner.js.map +1 -1
- package/lib/ui-kit/Heading/Heading.js +1 -1
- package/lib/ui-kit/Heading/Heading.js.map +1 -1
- package/lib/ui-kit/SwipeListControl/SwipeListControl.fixture.mobile.d.ts +3 -0
- package/lib/ui-kit/SwipeListControl/SwipeListControlDots.js +1 -1
- package/lib/ui-kit/SwipeListControl/SwipeListControlDots.js.map +1 -1
- package/lib/ui-kit/SwipeListControl/utils/getScrollPoints.d.ts +4 -1
- package/lib/ui-kit/SwipeListControl/utils/getScrollPoints.js +7 -1
- package/lib/ui-kit/SwipeListControl/utils/getScrollPoints.js.map +1 -1
- package/lib/ui-kit/Tabs/Tabs.js +1 -1
- package/lib/ui-kit/Tabs/Tabs.js.map +1 -1
- package/mobile/bundle/bundle.umd.js +87 -189
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/dist/components/Accordion/AccordionContent.d.ts +3 -3
- package/mobile/dist/components/Accordion/AccordionItem.js +6 -3
- package/mobile/dist/components/Accordion/AccordionItem.js.map +1 -1
- package/mobile/dist/components/Accordion/AccordionItemInner.js +2 -3
- package/mobile/dist/components/Accordion/AccordionItemInner.js.map +1 -1
- package/mobile/dist/components/Footer/MediaButton.js +1 -1
- package/mobile/dist/components/Footer/MediaButton.js.map +1 -1
- package/mobile/dist/components/OtherProducts/OtherProductsContent.d.ts +3 -12
- package/mobile/dist/components/PictureText/PictureText.js +8 -4
- package/mobile/dist/components/PictureText/PictureText.js.map +1 -1
- package/mobile/dist/components/PictureText/PictureTextContent.d.ts +7 -0
- package/mobile/dist/components/ProductGalleryGreen/ProductGalleryGreen.js +31 -15
- package/mobile/dist/components/ProductGalleryGreen/ProductGalleryGreen.js.map +1 -1
- package/mobile/dist/components/ProductGalleryGreen/ProductGalleryGreenContent.d.ts +2 -0
- package/mobile/dist/components/Recommendation/Recommendation.js +1 -1
- package/mobile/dist/components/Recommendation/RecommendationCard.js +1 -1
- package/mobile/dist/components/Recommendation/RecommendationCard.js.map +1 -1
- package/mobile/dist/components/StepsBlock/StepsBlock.js +10 -4
- package/mobile/dist/components/StepsBlock/StepsBlock.js.map +1 -1
- package/mobile/dist/components/StepsBlock/StepsBlockContent.d.ts +3 -2
- package/mobile/dist/components/TextBlock/TextBlockContent.d.ts +1 -1
- package/mobile/dist/ui-kit/BlocksList/EmbeddableBlocks.d.ts +0 -4
- package/mobile/dist/ui-kit/BlocksList/EmbeddableBlocks.js +0 -8
- package/mobile/dist/ui-kit/BlocksList/EmbeddableBlocks.js.map +1 -1
- package/mobile/dist/ui-kit/BlocksList/renderBlocksList.d.ts +2 -4
- package/mobile/dist/ui-kit/BlocksList/renderBlocksList.js +3 -3
- package/mobile/dist/ui-kit/BlocksList/renderBlocksList.js.map +1 -1
- package/mobile/dist/ui-kit/Button/ButtonInner.js +1 -1
- package/mobile/dist/ui-kit/Button/ButtonInner.js.map +1 -1
- package/mobile/dist/ui-kit/SwipeListControl/SwipeListControlDots.js +1 -1
- package/mobile/dist/ui-kit/SwipeListControl/SwipeListControlDots.js.map +1 -1
- package/mobile/dist/ui-kit/SwipeListControl/utils/getScrollPoints.js +7 -1
- package/mobile/dist/ui-kit/SwipeListControl/utils/getScrollPoints.js.map +1 -1
- package/mobile/dist/ui-kit/Tabs/Tabs.js +1 -1
- package/mobile/dist/ui-kit/Tabs/Tabs.js.map +1 -1
- package/mobile/lib/components/Accordion/AccordionContent.d.ts +3 -3
- package/mobile/lib/components/Accordion/AccordionItem.js +6 -3
- package/mobile/lib/components/Accordion/AccordionItem.js.map +1 -1
- package/mobile/lib/components/Accordion/AccordionItemInner.js +2 -3
- package/mobile/lib/components/Accordion/AccordionItemInner.js.map +1 -1
- package/mobile/lib/components/Footer/MediaButton.js +1 -1
- package/mobile/lib/components/Footer/MediaButton.js.map +1 -1
- package/mobile/lib/components/OtherProducts/OtherProductsContent.d.ts +3 -12
- package/mobile/lib/components/PictureText/PictureText.js +8 -4
- package/mobile/lib/components/PictureText/PictureText.js.map +1 -1
- package/mobile/lib/components/PictureText/PictureTextContent.d.ts +7 -0
- package/mobile/lib/components/ProductGalleryGreen/ProductGalleryGreen.js +31 -15
- package/mobile/lib/components/ProductGalleryGreen/ProductGalleryGreen.js.map +1 -1
- package/mobile/lib/components/ProductGalleryGreen/ProductGalleryGreenContent.d.ts +2 -0
- package/mobile/lib/components/Recommendation/Recommendation.js +1 -1
- package/mobile/lib/components/Recommendation/RecommendationCard.js +1 -1
- package/mobile/lib/components/Recommendation/RecommendationCard.js.map +1 -1
- package/mobile/lib/components/StepsBlock/StepsBlock.js +10 -4
- package/mobile/lib/components/StepsBlock/StepsBlock.js.map +1 -1
- package/mobile/lib/components/StepsBlock/StepsBlockContent.d.ts +3 -2
- package/mobile/lib/components/TextBlock/TextBlockContent.d.ts +1 -1
- package/mobile/lib/ui-kit/BlocksList/EmbeddableBlocks.d.ts +0 -4
- package/mobile/lib/ui-kit/BlocksList/EmbeddableBlocks.js +0 -8
- package/mobile/lib/ui-kit/BlocksList/EmbeddableBlocks.js.map +1 -1
- package/mobile/lib/ui-kit/BlocksList/renderBlocksList.d.ts +2 -4
- package/mobile/lib/ui-kit/BlocksList/renderBlocksList.js +3 -3
- package/mobile/lib/ui-kit/BlocksList/renderBlocksList.js.map +1 -1
- package/mobile/lib/ui-kit/Button/ButtonInner.js +1 -1
- package/mobile/lib/ui-kit/Button/ButtonInner.js.map +1 -1
- package/mobile/lib/ui-kit/SwipeListControl/SwipeListControlDots.js +1 -1
- package/mobile/lib/ui-kit/SwipeListControl/SwipeListControlDots.js.map +1 -1
- package/mobile/lib/ui-kit/SwipeListControl/utils/getScrollPoints.js +7 -1
- package/mobile/lib/ui-kit/SwipeListControl/utils/getScrollPoints.js.map +1 -1
- package/mobile/lib/ui-kit/Tabs/Tabs.js +1 -1
- package/mobile/lib/ui-kit/Tabs/Tabs.js.map +1 -1
- package/mobile/src/components/Accordion/Accordion.example.json +3 -0
- package/mobile/src/components/Accordion/AccordionContent.ts +4 -5
- package/mobile/src/components/Accordion/AccordionItem.tsx +32 -27
- package/mobile/src/components/Accordion/AccordionItemInner.tsx +8 -11
- package/mobile/src/components/Footer/MediaButton.tsx +1 -1
- package/mobile/src/components/Header/Header.example.json +3 -0
- package/mobile/src/components/OtherProducts/OtherProductsContent.ts +3 -12
- package/mobile/src/components/PictureText/PictureText.example.json +2 -0
- package/mobile/src/components/PictureText/PictureText.tsx +33 -7
- package/mobile/src/components/PictureText/PictureTextContent.ts +7 -0
- package/mobile/src/components/ProductGalleryGreen/ProductGalleryGreen.example.json +2 -1
- package/mobile/src/components/ProductGalleryGreen/ProductGalleryGreen.tsx +40 -17
- package/mobile/src/components/ProductGalleryGreen/ProductGalleryGreenContent.ts +2 -0
- package/mobile/src/components/Recommendation/Recommendation.tsx +1 -1
- package/mobile/src/components/Recommendation/RecommendationCard.tsx +1 -1
- package/mobile/src/components/StepsBlock/StepsBlock.tsx +14 -5
- package/mobile/src/components/StepsBlock/StepsBlockContent.ts +3 -2
- package/mobile/src/components/TextBlock/TextBlockContent.ts +1 -1
- package/mobile/src/ui-kit/BlocksList/EmbeddableBlocks.tsx +0 -8
- package/mobile/src/ui-kit/BlocksList/renderBlocksList.tsx +4 -12
- package/mobile/src/ui-kit/Button/ButtonInner.tsx +2 -2
- package/mobile/src/ui-kit/SwipeListControl/SwipeListControlDots.tsx +1 -1
- package/mobile/src/ui-kit/SwipeListControl/utils/getScrollPoints.spec.ts +18 -0
- package/mobile/src/ui-kit/SwipeListControl/utils/getScrollPoints.ts +10 -2
- package/mobile/src/ui-kit/Tabs/Tabs.tsx +1 -1
- package/package.json +2 -3
- package/src/components/Accordion/Accordion.example.json +3 -0
- package/src/components/Accordion/Accordion.fixture.mobile.tsx +1 -0
- package/src/components/Accordion/Accordion.fixture.tsx +2 -0
- package/src/components/Accordion/Accordion.tsx +4 -17
- package/src/components/Accordion/AccordionContent.ts +4 -5
- package/src/components/Accordion/AccordionItem.mobile.tsx +32 -27
- package/src/components/Accordion/AccordionItem.tsx +23 -49
- package/src/components/Accordion/AccordionItemInner.mobile.tsx +8 -11
- package/src/components/Accordion/AccordionItemInner.tsx +8 -10
- package/src/components/Footer/MediaButton.tsx +1 -1
- package/src/components/Header/Header.example.json +3 -0
- package/src/components/Header/Header.tsx +8 -1
- package/src/components/MobileAppTile/MobileAppTile.tsx +3 -3
- package/src/components/OtherProducts/OtherProducts.fixture.tsx +61 -6
- package/src/components/OtherProducts/OtherProductsContent.ts +3 -12
- package/src/components/PictureText/PictureText.example.json +2 -0
- package/src/components/PictureText/PictureText.tsx +33 -7
- package/src/components/PictureText/PictureTextContent.ts +7 -0
- package/src/components/ProductGalleryGreen/ProductGalleryGreen.example.json +2 -1
- package/src/components/ProductGalleryGreen/ProductGalleryGreen.fixture.tsx +74 -1
- package/src/components/ProductGalleryGreen/ProductGalleryGreen.tsx +40 -17
- package/src/components/ProductGalleryGreen/ProductGalleryGreenContent.ts +2 -0
- package/src/components/Recommendation/Recommendation.tsx +1 -1
- package/src/components/Recommendation/RecommendationCard.tsx +1 -1
- package/src/components/StepsBlock/StepsBlock.fixture.tsx +14 -0
- package/src/components/StepsBlock/StepsBlock.mobile.tsx +14 -5
- package/src/components/StepsBlock/StepsBlock.tsx +13 -6
- package/src/components/StepsBlock/StepsBlockContent.ts +3 -2
- package/src/components/TextBlock/TextBlockContent.ts +1 -1
- package/src/ui-kit/BlocksList/EmbeddableBlocks.mobile.tsx +15 -0
- package/src/ui-kit/BlocksList/renderBlocksList.tsx +4 -12
- package/src/ui-kit/Button/ButtonInner.tsx +2 -2
- package/src/ui-kit/Heading/Heading.tsx +1 -3
- package/src/ui-kit/SwipeListControl/SwipeListControl.fixture.mobile.tsx +24 -6
- package/src/ui-kit/SwipeListControl/SwipeListControlDots.tsx +1 -1
- package/src/ui-kit/SwipeListControl/utils/getScrollPoints.spec.ts +18 -0
- package/src/ui-kit/SwipeListControl/utils/getScrollPoints.ts +10 -2
- package/src/ui-kit/Tabs/Tabs.tsx +1 -1
package/bundle/bundle.umd.js
CHANGED
|
@@ -200,7 +200,7 @@
|
|
|
200
200
|
return;
|
|
201
201
|
}
|
|
202
202
|
const Tag = headingType;
|
|
203
|
-
return (jsx(Tag, { className: `font-sans
|
|
203
|
+
return (jsx(Tag, { className: `font-sans m-0 ${HEADING_STYLE_MAP[headingType]} ${className}`, children: title }));
|
|
204
204
|
});
|
|
205
205
|
|
|
206
206
|
const projectSettings = new (class {
|
|
@@ -489,11 +489,15 @@
|
|
|
489
489
|
return format ? `image/${String(format)}` : undefined;
|
|
490
490
|
}
|
|
491
491
|
|
|
492
|
-
const
|
|
493
|
-
|
|
492
|
+
const pictureTextStyleMap = {
|
|
493
|
+
primary: 'bg-white text-primary-text',
|
|
494
|
+
secondary: 'bg-primary-main text-white',
|
|
495
|
+
};
|
|
496
|
+
const PictureText = JSX(({ className = '', title, image, benefits, version = 'primary', directionRight = false, anchor = null, }) => {
|
|
497
|
+
return (jsxs("section", { className: `relative font-sans p-14 ${pictureTextStyleMap[version]} ${className}`, id: anchor, children: [jsx(Heading, { headingType: "h2", className: "text-center", title: title }), jsxs("div", { className: 'flex justify-center mt-9', children: [image?.src && jsx(Img, { className: directionRight ? 'order-2 ml-6' : 'mr-6', image: image }), benefits?.length ? (jsx("div", { className: "flex flex-col", children: benefits.map((_, i) => renderBenefit$1(_, i, version)) })) : null] })] }));
|
|
494
498
|
});
|
|
495
|
-
function renderBenefit$1(benefit, i) {
|
|
496
|
-
return (jsxs("div", { className: "flex flex-row mb-8", children: [benefit.icon && (jsx(Icon, { className: "w-[48px] h-[48px] bg-main rounded-full box-border p-[12px]", name: benefit.icon, width: "48", height: "48", asSVG: true })), jsxs("div", { className: "flex gap-1 flex-col h-full ml-5 max-w-[490px]", children: [benefit.label && (jsx("div", { className:
|
|
499
|
+
function renderBenefit$1(benefit, i, version) {
|
|
500
|
+
return (jsxs("div", { className: "flex flex-row mb-8", children: [benefit.icon && (jsx(Icon, { className: "w-[48px] h-[48px] bg-main rounded-full box-border p-[12px]", name: benefit.icon, width: "48", height: "48", asSVG: true })), jsxs("div", { className: "flex gap-1 flex-col h-full ml-5 max-w-[490px]", children: [benefit.label && (jsx("div", { className: `font-medium text-xl m-0 ${version === 'primary' ? 'text-primary-text' : ''}`, children: benefit.label })), benefit.description && (jsx("div", { className: `font-normal text-sm ${version === 'primary' ? 'text-secondary-text' : ''}`, children: benefit.description }))] })] }, String(i)));
|
|
497
501
|
}
|
|
498
502
|
|
|
499
503
|
const isURL = (href) => href?.includes('//');
|
|
@@ -576,7 +580,7 @@
|
|
|
576
580
|
|
|
577
581
|
const ButtonInner = JSX((props) => {
|
|
578
582
|
const { text, aboveText, appendLeft } = props;
|
|
579
|
-
return (jsxs("div", { className: getButtonStyle(props), children: [appendLeft ? appendLeft : null, isWithText(props) ? (jsxs("div", { children: [jsx("div", { className: "text-m-2xs text-left", children: aboveText }), jsx("div", { className: "text-m-button
|
|
583
|
+
return (jsxs("div", { className: getButtonStyle(props), children: [appendLeft ? appendLeft : null, isWithText(props) ? (jsxs("div", { children: [jsx("div", { className: "text-m-2xs font-light text-left", children: aboveText }), jsx("div", { className: "text-m-button text-left", children: text })] })) : null] }));
|
|
580
584
|
});
|
|
581
585
|
const getButtonStyle = (props) => {
|
|
582
586
|
const { version, aboveText, rounded } = props;
|
|
@@ -592,7 +596,7 @@
|
|
|
592
596
|
};
|
|
593
597
|
const isWithText = ({ text, aboveText, appendLeft }) => Boolean(text || aboveText || !appendLeft);
|
|
594
598
|
|
|
595
|
-
const buttonStyleMap
|
|
599
|
+
const buttonStyleMap = {
|
|
596
600
|
primary: 'text-white bg-primary-main hover:bg-primary-hover active:bg-primary-active',
|
|
597
601
|
secondary: 'text-primary-main bg-secondary-light hover:bg-secondary-hover active:bg-secondary-active',
|
|
598
602
|
link: '',
|
|
@@ -608,7 +612,7 @@
|
|
|
608
612
|
const buttonInner = children ?? (jsx(ButtonInner, { text: text, aboveText: aboveText, appendLeft: appendLeft, rounded: rounded }));
|
|
609
613
|
return disabled ? (jsx(DisabledButton, { ...props, children: buttonInner })) : (jsx(RegularButton, { ...props, children: buttonInner }));
|
|
610
614
|
});
|
|
611
|
-
const RegularButton = JSX(({ className, ariaLabel, version = 'none', rounded, href, target, children, onClick, ...rest }) => (jsx("a", { className: `${buttonStyle} inline-block cursor-pointer no-underline ${buttonStyleMap
|
|
615
|
+
const RegularButton = JSX(({ className, ariaLabel, version = 'none', rounded, href, target, children, onClick, ...rest }) => (jsx("a", { className: `${buttonStyle} inline-block cursor-pointer no-underline ${buttonStyleMap[version] || ''} ${rounded ? 'rounded-full' : 'rounded-md'} ${className || ''}`, href: href, target: target, onClick: onClick, "aria-label": ariaLabel, role: href ? 'link' : 'button', ...rest, children: children })));
|
|
612
616
|
const DisabledButton = JSX(({ className, children, ariaLabel, version = 'none', rounded }) => (jsx("div", { role: "button", "aria-disabled": "true", "aria-label": ariaLabel, tabIndex: "-1", className: `inline-block ${buttonStyle} ${buttonDisabledStyleMap[version] || ''} ${rounded ? 'rounded-full' : 'rounded-md'} ${className || ''}`, children: children })));
|
|
613
617
|
|
|
614
618
|
const ButtonSection = JSX(({ context, className = '', buttons }) => {
|
|
@@ -684,7 +688,7 @@
|
|
|
684
688
|
return buttons?.length ? (jsx(ButtonSection, { context: context, buttons: buttons, className: "flex mt-9 gap-3" })) : null;
|
|
685
689
|
};
|
|
686
690
|
|
|
687
|
-
const productBlockStyleMap = {
|
|
691
|
+
const productBlockStyleMap$1 = {
|
|
688
692
|
primary: 'bg-white text-primary-text',
|
|
689
693
|
secondary: 'bg-primary-main text-white',
|
|
690
694
|
};
|
|
@@ -696,7 +700,7 @@
|
|
|
696
700
|
const { context, className, breadcrumbs, version = 'primary', anchor = null, ...otherProps } = props;
|
|
697
701
|
const router = context.useRouter();
|
|
698
702
|
const { handlerDecorator } = context;
|
|
699
|
-
return (jsxs("section", { className: `font-sans pt-10 pl-[50px] pb-[50px] pr-[7.5rem] box-border min-h-[420px] ${className || ''} ${productBlockStyleMap[version]}`, id: anchor, children: [breadcrumbs?.length ? (jsx("div", { className: "text-xs mb-6", children: joinList(jsx("span", { className: `mx-2 ${breadcrumbsStyleMap[version]}`, children: "/" }))(breadcrumbs.map((breadcrumb, i) => (jsx(Breadcrumb, { ...useLink({ router, handlerDecorator }, { className: breadcrumbsStyleMap[version], ...breadcrumb }) }, String(i))))) })) : null, jsx(ProductBlockInner, { context: context, version: version, ...otherProps })] }));
|
|
703
|
+
return (jsxs("section", { className: `font-sans pt-10 pl-[50px] pb-[50px] pr-[7.5rem] box-border min-h-[420px] ${className || ''} ${productBlockStyleMap$1[version]}`, id: anchor, children: [breadcrumbs?.length ? (jsx("div", { className: "text-xs mb-6", children: joinList(jsx("span", { className: `mx-2 ${breadcrumbsStyleMap[version]}`, children: "/" }))(breadcrumbs.map((breadcrumb, i) => (jsx(Breadcrumb, { ...useLink({ router, handlerDecorator }, { className: breadcrumbsStyleMap[version], ...breadcrumb }) }, String(i))))) })) : null, jsx(ProductBlockInner, { context: context, version: version, ...otherProps })] }));
|
|
700
704
|
});
|
|
701
705
|
|
|
702
706
|
const textBlockStyleMaps = {
|
|
@@ -909,20 +913,20 @@
|
|
|
909
913
|
LinkList,
|
|
910
914
|
};
|
|
911
915
|
|
|
912
|
-
const renderBlocksList = ({ blocks, context, className, columns
|
|
913
|
-
const renderBlock$1 = ({ context, columns, className
|
|
916
|
+
const renderBlocksList = ({ blocks, context, className, columns }) => blocks?.length ? blocks.map(renderBlock$1({ context, className, columns })) : null;
|
|
917
|
+
const renderBlock$1 = ({ context, columns, className }) => (block, i) => {
|
|
914
918
|
const type = block?.blockListType;
|
|
915
919
|
if (!type || !(type in EmbeddableBlocks)) {
|
|
916
920
|
return null;
|
|
917
921
|
}
|
|
918
922
|
const columnsCountClass = columns === 2 ? 'w-1/2' : '';
|
|
919
923
|
const EmbeddedBlock = EmbeddableBlocks[type];
|
|
920
|
-
return (jsx("div", { className: `${className} ${columnsCountClass}`, children: jsx(EmbeddedBlock, { context: context, ...block,
|
|
924
|
+
return (jsx("div", { className: `${className} ${columnsCountClass}`, children: jsx(EmbeddedBlock, { context: context, ...block, className: "!p-0" }) }, `block_${i}`));
|
|
921
925
|
};
|
|
922
926
|
|
|
923
|
-
const AccordionItemInner = JSX(({ blocks,
|
|
927
|
+
const AccordionItemInner = JSX(({ blocks, context }) => {
|
|
924
928
|
const className = 'mb-5 last:mb-0 pb-5';
|
|
925
|
-
return (jsx("div", { className: "transition-all duration-300 max-h-0 overflow-hidden", children: renderBlocksList({ context, className,
|
|
929
|
+
return (jsx("div", { className: "transition-all duration-300 max-h-0 overflow-hidden", children: renderBlocksList({ context, className, blocks }) }));
|
|
926
930
|
});
|
|
927
931
|
|
|
928
932
|
const useActiveHandler$1 = ({ context, blocks, initialState = false }) => {
|
|
@@ -943,30 +947,19 @@
|
|
|
943
947
|
return { isActive, hasContent, icon, handleToggle };
|
|
944
948
|
};
|
|
945
949
|
|
|
946
|
-
const
|
|
947
|
-
primary: 'text-primary-text',
|
|
948
|
-
secondary: 'text-white',
|
|
949
|
-
};
|
|
950
|
-
const buttonHoverStyleMap = {
|
|
951
|
-
primary: 'group-hover:text-primary-main',
|
|
952
|
-
secondary: 'group-hover:text-white',
|
|
953
|
-
};
|
|
954
|
-
const AccordionItem = JSX(({ label, isExpanded, blocks, columns, context, version = 'primary' }) => {
|
|
950
|
+
const AccordionItem = JSX(({ label, isExpanded, blocks, context }) => {
|
|
955
951
|
const { isActive, hasContent, icon, handleToggle } = useActiveHandler$1({
|
|
956
952
|
context,
|
|
957
953
|
blocks,
|
|
958
954
|
initialState: isExpanded,
|
|
959
955
|
});
|
|
960
|
-
return (jsxs("li", { className: "border-0 border-b border-solid border-main-divider last:border-b-0", children: [jsxs("button", { className: `border-none bg-transparent px-0 py-5 flex justify-between text-left w-full font-sans
|
|
961
|
-
|
|
956
|
+
return (jsxs("li", { className: "border-0 border-b border-solid border-main-divider last:border-b-0", children: [jsxs("button", { className: `border-none bg-transparent px-0 py-5 flex justify-between text-left w-full font-sans
|
|
957
|
+
${hasContent ? 'group cursor-pointer' : ''}
|
|
958
|
+
`, onClick: handleToggle, children: [jsx("span", { className: `text-xl pr-2.5 font-medium`, children: label }), hasContent ? jsx(Icon, { name: icon, width: "24", height: "24", asSVG: true }) : null] }), hasContent ? (jsx(AccordionItemInner, { isExpanded: isActive, blocks: blocks, context: context })) : null] }));
|
|
962
959
|
});
|
|
963
960
|
|
|
964
|
-
const
|
|
965
|
-
|
|
966
|
-
secondary: 'bg-primary-main text-white',
|
|
967
|
-
};
|
|
968
|
-
const Accordion = JSX(({ title, accordionItems, context, className = '', version = 'primary', anchor = null }) => {
|
|
969
|
-
return (jsxs("section", { className: `p-[50px] font-sans ${className} ${accordionStyleMap[version]}`, id: anchor, children: [title ? jsx(Heading, { headingType: "h4", className: "mb-2.5", title: title }) : null, accordionItems?.length ? (jsx("ul", { className: "list-none m-0 p-0", children: accordionItems.map((item, i) => (jsx(AccordionItem, { ...item, version: version, context: context }, `AccordionItem${i}`))) })) : null] }));
|
|
961
|
+
const Accordion = JSX(({ title, description, accordionItems, context, className = '', anchor = null }) => {
|
|
962
|
+
return (jsxs("section", { className: `p-[50px] font-sans bg-white text-primary-text ${className}`, id: anchor, children: [title ? jsx(Heading, { headingType: "h4", className: "mb-2.5", title: title }) : null, description ? jsx("div", { className: "mb-2.5 text-base", children: description }) : null, accordionItems?.length ? (jsx("ul", { className: "list-none m-0 p-0", children: accordionItems.map((item, i) => (jsx(AccordionItem, { ...item, context: context }, `AccordionItem${i}`))) })) : null] }));
|
|
970
963
|
});
|
|
971
964
|
|
|
972
965
|
const BenefitsBlock = JSX(({ className, title, benefits, anchor = null }) => {
|
|
@@ -1063,7 +1056,7 @@
|
|
|
1063
1056
|
});
|
|
1064
1057
|
const renderTab$1 = (currentTabIndex, onTabClick) => (tab, index) => {
|
|
1065
1058
|
const isActive = currentTabIndex === index;
|
|
1066
|
-
return (jsxs("div", { className: `flex h-full flex-1 cursor-pointer mr-2 last:mr-0 ${isActive ? ACTIVE_TAB_STYLE : TAB_STYLE}`, role: "tab", onClick: () => onTabClick(index), "aria-selected": String(isActive), children: [tab?.icon ? renderIcon(tab, isActive) : null, jsxs("div", { children: [tab?.title ? jsx("h3", { className: "font-medium m-0 text-base", children: tab?.title }) : null, tab?.description ? (jsx("span", { className: `font-light text-xs ${isActive ? '' : 'text-secondary-text'}`, children: tab?.description })) : null] })] }, String(index)));
|
|
1059
|
+
return (jsxs("div", { className: `flex h-full flex-1 cursor-pointer mr-2 last:mr-0 box-content ${isActive ? ACTIVE_TAB_STYLE : TAB_STYLE}`, role: "tab", onClick: () => onTabClick(index), "aria-selected": String(isActive), children: [tab?.icon ? renderIcon(tab, isActive) : null, jsxs("div", { children: [tab?.title ? jsx("h3", { className: "font-medium m-0 text-base", children: tab?.title }) : null, tab?.description ? (jsx("span", { className: `font-light text-xs ${isActive ? '' : 'text-secondary-text'}`, children: tab?.description })) : null] })] }, String(index)));
|
|
1067
1060
|
};
|
|
1068
1061
|
const renderIcon = (tab, isActive) => (jsx("div", { className: "h-full mt-1", style: isActive ? { filter: 'invert(1)' } : null, children: jsx(Icon, { className: "w-5 h-5 mr-3", name: tab?.icon || 'CardIcon', asSVG: !isActive }) }));
|
|
1069
1062
|
|
|
@@ -1449,7 +1442,7 @@
|
|
|
1449
1442
|
const { icon, width, height, label } = ICONS_MAP.find(({ origins }) => origins.some((_) => href?.includes(_))) || {};
|
|
1450
1443
|
if (!icon)
|
|
1451
1444
|
return null;
|
|
1452
|
-
return (jsx("a", { className: "flex items-center justify-center border border-solid border-main-divider rounded-full no-underline outline-none w-[
|
|
1445
|
+
return (jsx("a", { className: "flex items-center justify-center border border-solid border-main-divider rounded-full no-underline outline-none w-[40px] h-[40px] box-border hover:text-primary-main", href: href, "aria-label": label, target: "_blank", rel: "noopener noreferrer", children: Icon && (jsx(Icon, { name: icon, width: width, height: height, asSVG: true, className: "block", color: "none" })) }));
|
|
1453
1446
|
});
|
|
1454
1447
|
|
|
1455
1448
|
const SocialMedia = JSX(({ className, media, context }) => {
|
|
@@ -1553,7 +1546,7 @@
|
|
|
1553
1546
|
'bg-white': 'bg-main-divider',
|
|
1554
1547
|
transparent: 'bg-main-divider opacity-30',
|
|
1555
1548
|
};
|
|
1556
|
-
const Header = JSX(({ className, defaultLocation, bgColor = 'bg-white', context, topItems, anchor = null }) => {
|
|
1549
|
+
const Header = JSX(({ className, defaultLocation = 'Москва', bgColor = 'bg-white', context, topItems, anchor = null, }) => {
|
|
1557
1550
|
const router = context.useRouter();
|
|
1558
1551
|
const sitemap = useSitemap(context.useAsyncData);
|
|
1559
1552
|
const { handlerDecorator } = context;
|
|
@@ -1567,7 +1560,7 @@
|
|
|
1567
1560
|
});
|
|
1568
1561
|
|
|
1569
1562
|
const MobileAppTile = JSX(({ className = '', context, title = 'Мобильное приложение', qr, buttons = [], anchor = null, }) => {
|
|
1570
|
-
return (jsx("section", { className: `bg-white text-primary-text font-sans p-9 box-border ${className} ${getTileRightPadding(className)} ${getTileMinHeight(className)} `, id: anchor, children: jsx(BaseTile, { context: context, title: title && (jsx(Heading, { headingType: getTileHeadingType(className), title: title, className: `whitespace-pre-wrap max-w-[600px]` })), buttons: buttons?.length ? (jsx(ButtonSection, { context: context, buttons: buttons, className: "flex mt-
|
|
1563
|
+
return (jsx("section", { className: `bg-white text-primary-text font-sans p-9 box-border ${className} ${getTileRightPadding(className)} ${getTileMinHeight(className)} `, id: anchor, children: jsx(BaseTile, { context: context, title: title && (jsx(Heading, { headingType: getTileHeadingType(className), title: title, className: `whitespace-pre-wrap max-w-[600px] mb-7` })), buttons: buttons?.length ? (jsx(ButtonSection, { context: context, buttons: buttons, className: "flex mt-7 gap-4" })) : null, children: jsxs("div", { className: "flex items-center", children: [qr?.src && qr?.href && (jsx("a", { href: qr.href, target: "_blank", "aria-label": title, children: jsx("img", { src: qr.src, alt: title, title: title, width: "164", height: "164", className: "w-[90px] h-[90px] min-w-[90px] min-h-[90px] bg-secondary-light" }) })), jsx("span", { className: "font-light text-secondary-text ml-4", children: "\u041D\u0430\u0432\u0435\u0434\u0438\u0442\u0435 \u043A\u0430\u043C\u0435\u0440\u0443 \u0442\u0435\u043B\u0435\u0444\u043E\u043D\u0430 \u043D\u0430 QR-\u043A\u043E\u0434 \u0438 \u0441\u043A\u0430\u0447\u0430\u0439\u0442\u0435 \u043F\u0440\u0438\u043B\u043E\u0436\u0435\u043D\u0438\u0435" })] }) }) }));
|
|
1571
1564
|
});
|
|
1572
1565
|
|
|
1573
1566
|
const NavigationItem = JSX(({ className, text, onClick, href, target, isActive }) => (jsx("a", { className: `bg-inherit no-underline px-4 py-2.5 cursor-pointer rounded text-sm border border-solid hover:text-primary-main ${className || ''} ${isActive ? 'border-primary-main text-primary-main' : 'border-white text-secondary-text'}`, onClick: onClick, href: href, target: target, children: text })));
|
|
@@ -1636,34 +1629,50 @@
|
|
|
1636
1629
|
return (jsxs("button", { type: "button", onClick: onClick, "aria-label": slide?.title, className: `font-sans group relative overflow-hidden border-0 bg-inherit cursor-pointer text-left px-0 pt-4 pb-[23px] grow basis-0`, children: [jsxs("div", { className: "border-0 border-r border-solid border-main-divider px-6", children: [jsx("div", { className: `text-sm font-medium pb-[3px] group-hover:text-primary-text ${btnTitleClassName}`, children: slide?.title }), jsx("div", { className: "text-xs text-secondary-text", children: slide.desc })] }), jsx("div", { className: `absolute bottom-0 left-0 w-full h-[3px] bg-primary-main -translate-x-full ${progressBarClassName}`, style: { animationDuration: `${duration}s`, animationFillMode: 'forwards' } })] }, String(i)));
|
|
1637
1630
|
}
|
|
1638
1631
|
|
|
1639
|
-
const
|
|
1632
|
+
const productGalleryGreenStyleMap = {
|
|
1633
|
+
primary: 'bg-white text-primary-text',
|
|
1634
|
+
secondary: 'bg-primary-main text-white',
|
|
1635
|
+
};
|
|
1636
|
+
const productBlockStyleMap = {
|
|
1637
|
+
primary: 'text-secondary-text',
|
|
1638
|
+
secondary: 'text-white/80',
|
|
1639
|
+
};
|
|
1640
|
+
const productSlideStyleMap = {
|
|
1641
|
+
primary: 'bg-white text-primary-text',
|
|
1642
|
+
secondary: 'bg-primary-main text-white',
|
|
1643
|
+
};
|
|
1644
|
+
const ProductGalleryGreen = JSX(({ className = '', context, slides = [], version = 'primary', duration = 0, anchor = null }) => {
|
|
1640
1645
|
const galleryNav = slides.map((s) => s.nav);
|
|
1641
1646
|
const galleryBlocks = slides.map((s) => s.productBlock);
|
|
1642
1647
|
const [activeSlideIndex, setActiveSlideIndex] = context.useState(0);
|
|
1643
|
-
return (jsxs("section", { className: `box-border pt-[70px] relative font-sans
|
|
1648
|
+
return (jsxs("section", { id: anchor, className: `box-border pt-[70px] overflow-hidden relative font-sans w-100 ${className}
|
|
1649
|
+
${productGalleryGreenStyleMap[version]}`, children: [jsx("div", { className: "flex duration-1000 pb-14", style: { transform: `translateX(-${activeSlideIndex}00%)` }, role: "list", children: galleryBlocks.map((_, i) => renderProductBlock({ ..._, version }, i, context)) }), jsx("div", { className: "flex items-center absolute bottom-6 left-0 right-0 px-9 box-border", children: galleryNav.map((slide, i) => renderNavButton({
|
|
1644
1650
|
slide,
|
|
1645
1651
|
i,
|
|
1646
1652
|
activeSlideIndex,
|
|
1647
1653
|
onClick: () => setActiveSlideIndex(i),
|
|
1654
|
+
version,
|
|
1655
|
+
duration,
|
|
1648
1656
|
})) })] }));
|
|
1649
1657
|
});
|
|
1650
1658
|
function renderProductBlock(block, i, context) {
|
|
1651
|
-
|
|
1659
|
+
const { version } = block;
|
|
1660
|
+
const additionalClass = version ? productBlockStyleMap[version] : '';
|
|
1661
|
+
return (jsx("section", { className: "box-border relative flex grow-0 shrink-0 basis-full px-9", role: "listitem", children: jsxs("div", { className: "flex grow", children: [block.backgroundText ? (jsx("div", { className: "absolute text-[454px] font-bold text-white tracking-[-10px] leading-[299px] opacity-[.1] right-12 top-20 z-0", children: block.backgroundText })) : null, jsx(ProductBlockInner, { className: `pl-2.5 pt-2.5 pb-1.5 pr-[6.25rem] z-[1] ${additionalClass}`, context: context, textBlockClassName: "mb-[154px]", ...block }), jsx(Icon, { className: "absolute right-[460px] top-[200px] z-0 mb-4", name: "ArrowsRewindRight", width: "230", height: "187" })] }) }, String(i)));
|
|
1652
1662
|
}
|
|
1653
|
-
function renderNavButton({ slide, i, activeSlideIndex, onClick }) {
|
|
1663
|
+
function renderNavButton({ slide, i, activeSlideIndex, onClick, version, duration }) {
|
|
1654
1664
|
const isActiveBtn = i === activeSlideIndex;
|
|
1655
1665
|
const btnClassName = isActiveBtn
|
|
1656
|
-
? 'bg-white shadow-dark-blue/42 h-[102px] w-[354px] min-w-[354px] max-w-[354px] p-0'
|
|
1657
|
-
:
|
|
1658
|
-
|
|
1659
|
-
|
|
1660
|
-
|
|
1661
|
-
const
|
|
1662
|
-
|
|
1663
|
-
|
|
1664
|
-
|
|
1665
|
-
|
|
1666
|
-
`, children: jsxs("div", { className: "border-0 px-6", children: [jsx("div", { className: `font-medium ${btnTitleClassName}`, children: slide?.title }), jsx("div", { className: `text-secondary-text ${btnDescClassName}`, children: slide.description })] }) }, String(i)));
|
|
1666
|
+
? 'bg-white shadow-dark-blue/42 h-[102px] w-[354px] min-w-[354px] max-w-[354px] p-0 border-none'
|
|
1667
|
+
: `min-w-[277px] px-0 pt-4 pb-[23px] hover:py-[26px] hover:py-[26px] ease-in duration-300
|
|
1668
|
+
${productSlideStyleMap[version]}`;
|
|
1669
|
+
const btnTitleClassName = isActiveBtn ? 'text-primary-text' : productBlockStyleMap[version];
|
|
1670
|
+
const btnDescClassName = isActiveBtn ? 'text-secondary-text' : productBlockStyleMap[version];
|
|
1671
|
+
const additionalBorder = version === 'secondary' ? 'border-white/50' : '';
|
|
1672
|
+
const progressBarClassName = isActiveBtn ? 'animate-slide' : '';
|
|
1673
|
+
return (jsxs("button", { type: "button", onClick: onClick, "aria-label": slide?.title, className: `box-border font-sans group relative overflow-hidden border-[1px] cursor-pointer text-left mx-1 grow basis-0 backdrop-blur-sm
|
|
1674
|
+
${btnClassName} ${additionalBorder}
|
|
1675
|
+
`, children: [jsxs("div", { className: "border-0 px-6", children: [jsx("div", { className: `font-medium ${btnTitleClassName}`, children: slide?.title }), jsx("div", { className: `text-secondary-text ${btnDescClassName}`, children: slide.description })] }), jsx("div", { className: `absolute bottom-0 left-0 w-full h-[3px] bg-primary-main -translate-x-full ${progressBarClassName}`, style: { animationDuration: `${duration}s`, animationFillMode: 'forwards' } })] }, String(i)));
|
|
1667
1676
|
}
|
|
1668
1677
|
|
|
1669
1678
|
const promoTileStyleMap = {
|
|
@@ -1720,7 +1729,7 @@
|
|
|
1720
1729
|
});
|
|
1721
1730
|
|
|
1722
1731
|
const RecommendationCard = JSX(({ context, className = '', title, description, items, image, version }) => {
|
|
1723
|
-
return (jsx("section", { className: `border border-solid box-border rounded-md p-7 min-w-[515px] max-w-[515px] ${className}`, role: "listitem", children: jsxs(BaseTile, { context: context, title: title && jsx(Heading, { headingType: "h4", title: title, className: "mb-4" }), image: image?.src && jsx(Img, { className: "mt-auto ml-7", image: image }), children: [description ? jsx(Description, { description: description }) : null, items?.length ? jsx(List, { items: items, version: version }) : null] }) }));
|
|
1732
|
+
return (jsx("section", { className: `border border-solid box-border rounded-md p-7 min-w-[515px] max-w-[515px] ${className}`, role: "listitem", children: jsxs(BaseTile, { context: context, title: title && jsx(Heading, { headingType: "h4", title: title, className: "mb-4" }), image: image?.src && jsx(Img, { className: "mt-auto ml-7", image: image }), children: [description ? jsx(Description, { description: description }) : null, items?.length ? jsx(List, { className: "text-m-base", items: items, version: version }) : null] }) }));
|
|
1724
1733
|
});
|
|
1725
1734
|
|
|
1726
1735
|
const BLUR_BLOCK_CLASSES = 'absolute top-0 bottom-0 w-[84px]';
|
|
@@ -1730,7 +1739,7 @@
|
|
|
1730
1739
|
const [activeCardIndex, setActiveCardIndex] = context.useState(0);
|
|
1731
1740
|
const blockClassName = version === 'secondary' ? 'bg-primary-main text-white' : 'bg-white text-primary-text';
|
|
1732
1741
|
const cardClassName = version === 'secondary' ? 'border-main-divider' : 'border-main-stroke';
|
|
1733
|
-
return (jsxs("section", { className: `relative font-sans p-[50px] overflow-hidden ${blockClassName} ${className}`, id: anchor, children: [title ? jsx(Heading, { headingType: "
|
|
1742
|
+
return (jsxs("section", { className: `relative font-sans p-[50px] overflow-hidden ${blockClassName} ${className}`, id: anchor, children: [title ? jsx(Heading, { headingType: "h2", className: "mb-8", title: title }) : null, jsx("div", { className: "flex duration-1000 gap-4", style: { transform: `translateX(-${activeCardIndex * CARD_SHIFT}px)` }, role: "list", children: recommendations?.length
|
|
1734
1743
|
? recommendations.map(renderRecommendationCard({ context, version, className: cardClassName }))
|
|
1735
1744
|
: null }), renderNavButtons({
|
|
1736
1745
|
cardsCount: recommendations.length,
|
|
@@ -1750,8 +1759,14 @@
|
|
|
1750
1759
|
return (jsxs("div", { children: [showPrevButton && (jsx(ArrowButton, { className: "absolute top-1/2 left-8 rotate-180 z-10 mt-6", onClick: handlePrevClick, ariaLabel: "\u041F\u0440\u043E\u043B\u0438\u0441\u0442\u0430\u0442\u044C \u0432\u043B\u0435\u0432\u043E" })), showNextButton && (jsx(ArrowButton, { className: "absolute top-1/2 right-8 z-10 mt-6", onClick: handleNextClick, ariaLabel: "\u041F\u0440\u043E\u043B\u0438\u0441\u0442\u0430\u0442\u044C \u0432\u043F\u0440\u0430\u0432\u043E" }))] }));
|
|
1751
1760
|
};
|
|
1752
1761
|
|
|
1753
|
-
const StepsBlock = JSX(({ className, title, showLines = true, steps, anchor = null }) => {
|
|
1754
|
-
|
|
1762
|
+
const StepsBlock = JSX(({ className = '', title, showLines = true, steps = [], anchor = null }) => {
|
|
1763
|
+
const shortGaps = steps.length > 3;
|
|
1764
|
+
return (jsxs("section", { className: [
|
|
1765
|
+
'box-border font-sans text-primary-text bg-white',
|
|
1766
|
+
shortGaps ? 'px-20' : 'px-[70px]',
|
|
1767
|
+
'py-[50px] flex flex-col items-center',
|
|
1768
|
+
className,
|
|
1769
|
+
].join(' '), id: anchor, children: [jsx(Heading, { headingType: "h2", className: "max-w-[47rem] text-center", title: title }), steps?.length ? (jsxs("div", { className: `box-border py-0.5 mb-0.5 ${title ? 'mt-9' : ''}`, children: [jsx("div", { className: "flex items-center px-[88px]", children: joinList(jsx("div", { className: `h-0.5 w-full bg-secondary-light ${!showLines ? 'opacity-0' : ''}` }))(steps.map(renderStepIcon)) }), jsx("div", { className: `flex justify-between ${shortGaps ? 'gap-x-3' : 'gap-x-[101px]'}`, children: steps.map(renderStepTitle) })] })) : null] }));
|
|
1755
1770
|
});
|
|
1756
1771
|
const renderStepIcon = (step, i) => {
|
|
1757
1772
|
return (jsx("div", { className: "flex flex-col items-center text-center relative", children: jsx("div", { className: "h-[100px] w-[100px] min-w-[100px] min-h-[100px] bg-secondary-light rounded-full p-[26px] box-border z-10", children: (step.icon && jsx(Icon, { name: step.icon, width: "48", height: "48" })) || (jsx("span", { className: "font-medium text-title-sm text-secondary-text", children: i + 1 })) }) }, String(i)));
|