@redneckz/wildless-cms-uni-blocks 0.9.7 → 0.9.9
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/bin/migration-scripts/0.9.8.js +29 -0
- package/bin/migration-scripts/0.9.9.js +110 -0
- package/bundle/blocks.schema.json +1 -1
- package/bundle/bundle.umd.js +15 -38
- package/bundle/bundle.umd.min.js +1 -1
- package/bundle/components/CarouselRecommendationCard/CarouselRecommendationCardContent.d.ts +2 -0
- package/bundle/components/StepsBlock/StepsBlockContent.d.ts +10 -1
- package/dist/components/Blocks.js +0 -2
- package/dist/components/Blocks.js.map +1 -1
- package/dist/components/CarouselProductCard/CarouselProductCard.js +1 -1
- package/dist/components/CarouselProductCard/CarouselProductCard.js.map +1 -1
- package/dist/components/CarouselProgramsCard/CarouselProgramsCard.js +2 -2
- package/dist/components/CarouselProgramsCard/CarouselProgramsCard.js.map +1 -1
- package/dist/components/CarouselRecommendationCard/CarouselRecommendationCard.js +4 -6
- package/dist/components/CarouselRecommendationCard/CarouselRecommendationCard.js.map +1 -1
- package/dist/components/CarouselRecommendationCard/CarouselRecommendationCardContent.d.ts +2 -0
- package/dist/components/StepsBlock/StepsBlock.js +5 -3
- package/dist/components/StepsBlock/StepsBlock.js.map +1 -1
- package/dist/components/StepsBlock/StepsBlockContent.d.ts +10 -1
- package/dist/components/StepsBlock/StepsBlockStyleMaps.js +2 -2
- package/dist/components/StepsBlock/StepsBlockStyleMaps.js.map +1 -1
- package/dist/ui-kit/LinkWrapper/LinkWrapper.js +2 -1
- package/dist/ui-kit/LinkWrapper/LinkWrapper.js.map +1 -1
- package/lib/common.css +1 -1
- package/lib/components/Blocks.js +0 -2
- package/lib/components/Blocks.js.map +1 -1
- package/lib/components/Carousel/Carousel.fixture.d.ts +1 -0
- package/lib/components/CarouselProductCard/CarouselProductCard.js +1 -1
- package/lib/components/CarouselProductCard/CarouselProductCard.js.map +1 -1
- package/lib/components/CarouselProgramsCard/CarouselProgramsCard.js +2 -2
- package/lib/components/CarouselProgramsCard/CarouselProgramsCard.js.map +1 -1
- package/lib/components/CarouselRecommendationCard/CarouselRecommendationCard.fixture.d.ts +2 -0
- package/lib/components/CarouselRecommendationCard/CarouselRecommendationCard.js +4 -6
- package/lib/components/CarouselRecommendationCard/CarouselRecommendationCard.js.map +1 -1
- package/lib/components/CarouselRecommendationCard/CarouselRecommendationCardContent.d.ts +2 -0
- package/lib/components/StepsBlock/StepsBlock.js +5 -3
- package/lib/components/StepsBlock/StepsBlock.js.map +1 -1
- package/lib/components/StepsBlock/StepsBlockContent.d.ts +10 -1
- package/lib/components/StepsBlock/StepsBlockStyleMaps.js +2 -2
- package/lib/components/StepsBlock/StepsBlockStyleMaps.js.map +1 -1
- package/lib/ui-kit/LinkWrapper/LinkWrapper.js +2 -1
- package/lib/ui-kit/LinkWrapper/LinkWrapper.js.map +1 -1
- package/lib/ui-kit/SwipeListControl/SwipeListItem.js.map +1 -1
- package/mobile/bundle/bundle.umd.js +3 -3
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/bundle/components/CarouselRecommendationCard/CarouselRecommendationCardContent.d.ts +2 -0
- package/mobile/bundle/components/StepsBlock/StepsBlockContent.d.ts +10 -1
- package/mobile/dist/components/CarouselProductCard/CarouselProductCard.js +1 -1
- package/mobile/dist/components/CarouselProductCard/CarouselProductCard.js.map +1 -1
- package/mobile/dist/components/CarouselProgramsCard/CarouselProgramsCard.js +2 -2
- package/mobile/dist/components/CarouselProgramsCard/CarouselProgramsCard.js.map +1 -1
- package/mobile/dist/components/CarouselRecommendationCard/CarouselRecommendationCard.js +4 -6
- package/mobile/dist/components/CarouselRecommendationCard/CarouselRecommendationCard.js.map +1 -1
- package/mobile/dist/components/CarouselRecommendationCard/CarouselRecommendationCardContent.d.ts +2 -0
- package/mobile/dist/components/StepsBlock/StepsBlockContent.d.ts +10 -1
- package/mobile/dist/components/StepsBlock/StepsBlockStyleMaps.js +2 -2
- package/mobile/dist/components/StepsBlock/StepsBlockStyleMaps.js.map +1 -1
- package/mobile/dist/ui-kit/LinkWrapper/LinkWrapper.js +2 -1
- package/mobile/dist/ui-kit/LinkWrapper/LinkWrapper.js.map +1 -1
- package/mobile/lib/components/CarouselProductCard/CarouselProductCard.js +1 -1
- package/mobile/lib/components/CarouselProductCard/CarouselProductCard.js.map +1 -1
- package/mobile/lib/components/CarouselProgramsCard/CarouselProgramsCard.js +2 -2
- package/mobile/lib/components/CarouselProgramsCard/CarouselProgramsCard.js.map +1 -1
- package/mobile/lib/components/CarouselRecommendationCard/CarouselRecommendationCard.js +4 -6
- package/mobile/lib/components/CarouselRecommendationCard/CarouselRecommendationCard.js.map +1 -1
- package/mobile/lib/components/CarouselRecommendationCard/CarouselRecommendationCardContent.d.ts +2 -0
- package/mobile/lib/components/StepsBlock/StepsBlockContent.d.ts +10 -1
- package/mobile/lib/components/StepsBlock/StepsBlockStyleMaps.js +2 -2
- package/mobile/lib/components/StepsBlock/StepsBlockStyleMaps.js.map +1 -1
- package/mobile/lib/ui-kit/LinkWrapper/LinkWrapper.js +2 -1
- package/mobile/lib/ui-kit/LinkWrapper/LinkWrapper.js.map +1 -1
- package/mobile/lib/ui-kit/SwipeListControl/SwipeListItem.js.map +1 -1
- package/mobile/src/components/CarouselProductCard/CarouselProductCard.tsx +1 -1
- package/mobile/src/components/CarouselProgramsCard/CarouselProgramsCard.tsx +3 -3
- package/mobile/src/components/CarouselRecommendationCard/CarouselRecommendationCard.example.json +1 -0
- package/mobile/src/components/CarouselRecommendationCard/CarouselRecommendationCard.tsx +19 -30
- package/mobile/src/components/CarouselRecommendationCard/CarouselRecommendationCardContent.ts +2 -0
- package/mobile/src/components/StepsBlock/StepsBlock.example.json +7 -5
- package/mobile/src/components/StepsBlock/StepsBlock.ui.json +10 -0
- package/mobile/src/components/StepsBlock/StepsBlockContent.ts +10 -2
- package/mobile/src/components/StepsBlock/StepsBlockStyleMaps.ts +3 -2
- package/mobile/src/ui-kit/LinkWrapper/LinkWrapper.tsx +2 -1
- package/mobile/src/ui-kit/SwipeListControl/SwipeListItem.tsx +1 -1
- package/package.json +1 -1
- package/src/components/Blocks.ts +0 -2
- package/src/components/Carousel/Carousel.fixture.tsx +25 -2
- package/src/components/CarouselProductCard/CarouselProductCard.tsx +1 -1
- package/src/components/CarouselProgramsCard/CarouselProgramsCard.fixture.tsx +2 -2
- package/src/components/CarouselProgramsCard/CarouselProgramsCard.tsx +3 -3
- package/src/components/CarouselRecommendationCard/CarouselRecommendationCard.example.json +1 -0
- package/src/components/CarouselRecommendationCard/CarouselRecommendationCard.fixture.tsx +28 -1
- package/src/components/CarouselRecommendationCard/CarouselRecommendationCard.tsx +19 -30
- package/src/components/CarouselRecommendationCard/CarouselRecommendationCardContent.ts +2 -0
- package/src/components/StepsBlock/StepsBlock.example.json +7 -5
- package/src/components/StepsBlock/StepsBlock.fixture.tsx +14 -8
- package/src/components/StepsBlock/StepsBlock.tsx +13 -4
- package/src/components/StepsBlock/StepsBlock.ui.json +10 -0
- package/src/components/StepsBlock/StepsBlockContent.ts +10 -2
- package/src/components/StepsBlock/StepsBlockStyleMaps.ts +3 -2
- package/src/ui-kit/LinkWrapper/LinkWrapper.tsx +2 -1
- package/src/ui-kit/SwipeListControl/SwipeListItem.tsx +1 -1
- package/bundle/components/Recommendation/Recommendation.d.ts +0 -5
- package/bundle/components/Recommendation/RecommendationCard.d.ts +0 -5
- package/bundle/components/Recommendation/RecommendationContent.d.ts +0 -24
- package/dist/components/Recommendation/Recommendation.d.ts +0 -5
- package/dist/components/Recommendation/Recommendation.js +0 -26
- package/dist/components/Recommendation/Recommendation.js.map +0 -1
- package/dist/components/Recommendation/RecommendationCard.d.ts +0 -5
- package/dist/components/Recommendation/RecommendationCard.js +0 -17
- package/dist/components/Recommendation/RecommendationCard.js.map +0 -1
- package/dist/components/Recommendation/RecommendationContent.d.ts +0 -24
- package/dist/components/Recommendation/RecommendationContent.js +0 -2
- package/dist/components/Recommendation/RecommendationContent.js.map +0 -1
- package/lib/components/Recommendation/Recommendation.d.ts +0 -5
- package/lib/components/Recommendation/Recommendation.fixture.d.ts +0 -15
- package/lib/components/Recommendation/Recommendation.js +0 -24
- package/lib/components/Recommendation/Recommendation.js.map +0 -1
- package/lib/components/Recommendation/RecommendationCard.d.ts +0 -5
- package/lib/components/Recommendation/RecommendationCard.js +0 -15
- package/lib/components/Recommendation/RecommendationCard.js.map +0 -1
- package/lib/components/Recommendation/RecommendationContent.d.ts +0 -24
- package/lib/components/Recommendation/RecommendationContent.js +0 -2
- package/lib/components/Recommendation/RecommendationContent.js.map +0 -1
- package/mobile/bundle/components/Recommendation/Recommendation.d.ts +0 -5
- package/mobile/bundle/components/Recommendation/RecommendationCard.d.ts +0 -5
- package/mobile/bundle/components/Recommendation/RecommendationContent.d.ts +0 -24
- package/mobile/dist/components/Recommendation/Recommendation.d.ts +0 -5
- package/mobile/dist/components/Recommendation/Recommendation.js +0 -26
- package/mobile/dist/components/Recommendation/Recommendation.js.map +0 -1
- package/mobile/dist/components/Recommendation/RecommendationCard.d.ts +0 -5
- package/mobile/dist/components/Recommendation/RecommendationCard.js +0 -17
- package/mobile/dist/components/Recommendation/RecommendationCard.js.map +0 -1
- package/mobile/dist/components/Recommendation/RecommendationContent.d.ts +0 -24
- package/mobile/dist/components/Recommendation/RecommendationContent.js +0 -2
- package/mobile/dist/components/Recommendation/RecommendationContent.js.map +0 -1
- package/mobile/lib/components/Recommendation/Recommendation.d.ts +0 -5
- package/mobile/lib/components/Recommendation/Recommendation.js +0 -24
- package/mobile/lib/components/Recommendation/Recommendation.js.map +0 -1
- package/mobile/lib/components/Recommendation/RecommendationCard.d.ts +0 -5
- package/mobile/lib/components/Recommendation/RecommendationCard.js +0 -15
- package/mobile/lib/components/Recommendation/RecommendationCard.js.map +0 -1
- package/mobile/lib/components/Recommendation/RecommendationContent.d.ts +0 -24
- package/mobile/lib/components/Recommendation/RecommendationContent.js +0 -2
- package/mobile/lib/components/Recommendation/RecommendationContent.js.map +0 -1
- package/mobile/src/components/Catalog/Catalog.ui.json +0 -1
- package/mobile/src/components/Recommendation/Recommendation.example.json +0 -61
- package/mobile/src/components/Recommendation/Recommendation.tsx +0 -66
- package/mobile/src/components/Recommendation/Recommendation.ui.json +0 -19
- package/mobile/src/components/Recommendation/RecommendationCard.tsx +0 -49
- package/mobile/src/components/Recommendation/RecommendationContent.ts +0 -27
- package/src/components/Catalog/Catalog.ui.json +0 -1
- package/src/components/Recommendation/Recommendation.example.json +0 -61
- package/src/components/Recommendation/Recommendation.fixture.tsx +0 -176
- package/src/components/Recommendation/Recommendation.tsx +0 -66
- package/src/components/Recommendation/Recommendation.ui.json +0 -19
- package/src/components/Recommendation/RecommendationCard.tsx +0 -49
- package/src/components/Recommendation/RecommendationContent.ts +0 -27
package/bundle/bundle.umd.js
CHANGED
|
@@ -2130,7 +2130,7 @@
|
|
|
2130
2130
|
const link = useLink();
|
|
2131
2131
|
const linkProps = link({ href, target });
|
|
2132
2132
|
const Tag = href ? 'a' : 'div';
|
|
2133
|
-
return (jsx(Tag, { className: className, ...(href ? linkProps : {}), children: children }));
|
|
2133
|
+
return (jsx(Tag, { className: style('block', className), ...(href ? linkProps : {}), children: children }));
|
|
2134
2134
|
});
|
|
2135
2135
|
|
|
2136
2136
|
const getIconWithVersion = (icon, version = 'primary') => ({
|
|
@@ -2205,7 +2205,7 @@
|
|
|
2205
2205
|
const List = JSX(({ className = '', hasIndent, isDotted, itemClassName = '', items, listItemSize = 'M' }) => items?.length ? (jsx("section", { className: `text-primary-text group-data-secondary:text-white group-data-gray:text-secondary-text ${TEXT_SIZE_MAP[listItemSize]} ${hasIndent ? ITEM_INDENT_MAP[listItemSize] : ''} ${className}`, role: "list", children: items.map((item, i) => (jsx(ListItem, { className: itemClassName, isDotted: isDotted, size: listItemSize, children: item }, String(i)))) })) : null);
|
|
2206
2206
|
|
|
2207
2207
|
const CarouselProductCard = JSX(({ additionalDescription, align = 'text-center', button = {}, className = '', description, headlineSmallVersion = 'H6', href, icon, isDotted = true, items = [], target, title, version = 'primary', ...rest }) => {
|
|
2208
|
-
return (jsxs(BlockWrapper, { className: style('justify-between min-w-[260px]', 'box-border border-solid border border-gray', align, className), version: version, ...rest, children: [jsxs(LinkWrapper, { className: "p-6", href: href, target: target, children: [renderImage$3(icon), renderCardTitle(headlineSmallVersion, title), renderDescription$3(description, title), renderItems(items, isDotted, version), renderAdditionalDescription$1(additionalDescription)] }), renderButtonsSection([button], { className: 'p-6 pt-0', isVertical: true })] }));
|
|
2208
|
+
return (jsxs(BlockWrapper, { className: style('h-full flex flex-col justify-between min-w-[260px]', 'box-border border-solid border border-gray', align, className), version: version, ...rest, children: [jsxs(LinkWrapper, { className: "p-6", href: href, target: target, children: [renderImage$3(icon), renderCardTitle(headlineSmallVersion, title), renderDescription$3(description, title), renderItems(items, isDotted, version), renderAdditionalDescription$1(additionalDescription)] }), renderButtonsSection([button], { className: 'p-6 pt-0', isVertical: true })] }));
|
|
2209
2209
|
});
|
|
2210
2210
|
const renderImage$3 = (image) => (jsxs("div", { className: "flex justify-center", children: [image?.src ? jsx(ImgInner, { className: "mb-5", image: image }) : null, image?.icon ? (jsx(ImgInner, { className: `w-[32px] h-[32px] min-w-[32px] mb-5 rounded-full`, image: image, asSVG: true })) : null] }));
|
|
2211
2211
|
const renderCardTitle = (headlineSmallVersion, title) => title ? (jsx("div", { children: jsx(Text, { size: HEADLINE_SMALL_VERSION[headlineSmallVersion], children: title }) })) : null;
|
|
@@ -2214,9 +2214,9 @@
|
|
|
2214
2214
|
const renderItems = (items, isDotted, version = 'primary') => items?.length ? (jsx(List, { className: `max-w-[308px] mt-2 text-s ${version === 'primary' ? '!text-secondary-text' : ''}`, itemClassName: "text-left", items: items.filter((item) => item?.text).map((item) => item.text), isDotted: isDotted })) : null;
|
|
2215
2215
|
|
|
2216
2216
|
const CarouselProgramsCard = JSX(({ className = '', title, icon, list = [], href, target, ...rest }) => {
|
|
2217
|
-
return (jsx(BlockWrapper, { className: style('border border-gray
|
|
2217
|
+
return (jsx(BlockWrapper, { className: style('border border-gray', className), ...rest, children: jsxs(LinkWrapper, { className: "flex", href: href, target: target, children: [jsxs("div", { className: "w-[200px] min-w-[200px] self-center", children: [icon?.icon ? jsx(ImgInner, { image: getIconWithVersion(icon), asSVG: true }) : null, icon?.src ? jsx(ImgInner, { image: icon }) : null] }), jsxs("div", { className: "p-8 pl-3 w-full", children: [title ? jsx(Heading, { className: "mb-3.5", headingType: "h5", title: title }) : null, list.length ? (jsx("div", { className: "flex flex-col gap-3", children: list?.map(renderList$1) })) : null] })] }) }));
|
|
2218
2218
|
});
|
|
2219
|
-
const renderList$1 = (_, i) => (jsxs("div", { className: "break-words", children: [_.title ? jsx("div", { className:
|
|
2219
|
+
const renderList$1 = (_, i) => (jsxs("div", { className: "break-words", children: [_.title ? jsx("div", { className: "text-h6", children: _.title }) : null, _.description ? jsx("span", { className: "text-l-light mt-1", children: _.description }) : null] }, String(i)));
|
|
2220
2220
|
|
|
2221
2221
|
const ICONS_MAP = [
|
|
2222
2222
|
{
|
|
@@ -2270,11 +2270,10 @@
|
|
|
2270
2270
|
const SocialMedia = JSX(({ className = '', media, children, buttonSize }) => (jsxs("div", { className: "font-sans", children: [jsx("div", { className: `flex gap-1 ${className}`, children: media?.map((_, index) => (jsx(MediaButton, { aboveText: _.aboveText, appendLeft: _.appendLeft, appendRight: _.appendRight, buttonSize: buttonSize, text: _.text, version: _.version, ..._ }, String(index)))) }), jsx(Text, { size: "text-s-light", color: "text-secondary-text", children: children })] })));
|
|
2271
2271
|
|
|
2272
2272
|
const BORDER_STYLE = 'border border-solid border-gray group-data-secondary:border-white/50 group-data-gray:border-main-divider';
|
|
2273
|
-
const
|
|
2274
|
-
|
|
2275
|
-
return (jsx(BlockWrapper, { className: style('relative p-12 min-w-[524px] h-full flex flex-col box-border group-data-gray:bg-main-divider/50', BORDER_STYLE, className), version: version, ...rest, children: jsxs(LinkWrapper, { className: "flex flex-col", href: href, target: target, children: [jsx("div", { className: "self-center", children: title ? jsx(Heading, { headingType: "h3", as: "h3", className: "mb-8", title: title }) : null }), jsx("div", { className: "mb-5", children: description ? (jsx(Paragraph, { size: "text-xl", font: "font-light", color: "group-data-gray:text-secondary-text", children: description })) : null }), jsxs("div", { className: "flex align-center w-full", children: [jsxs("div", { className: "w-1/2 h-full flex flex-col flex-1 justify-end", children: [items.length ? (jsx(List, { className: "text-xl-light flex flex-col gap-2 pb-16 mb-3", items: items })) : null, socialMedia.length ? jsx(SocialMedia, { className: "pb-0", media: socialMedia }) : null] }), renderIconBlock$1(icon, items)] })] }) }));
|
|
2273
|
+
const CarouselRecommendationCard = JSX(({ className = '', description, href, icon, items = [], socialMedia = [], target, title, align = 'text-left', version = 'primary', ...rest }) => {
|
|
2274
|
+
return (jsx(BlockWrapper, { className: style('relative p-7 min-w-[524px] min-h-[218px] h-full box-border group-data-gray:bg-main-divider/50', BORDER_STYLE, className), version: version, ...rest, children: jsxs(LinkWrapper, { href: href, target: target, children: [jsx(Headline, { className: "mb-4", title: title, description: description, headlineVersion: "S", isPadding: false, align: align }), jsxs("div", { className: "w-1/2 h-full flex flex-col flex-1 justify-end", children: [items.length ? (jsx(List, { className: "flex flex-col gap-2", itemClassName: "text-l-light", items: items })) : null, socialMedia.length ? jsx(SocialMedia, { className: "pt-10", media: socialMedia }) : null] }), renderIconBlock$1(icon)] }) }));
|
|
2276
2275
|
});
|
|
2277
|
-
const renderIconBlock$1 = (icon
|
|
2276
|
+
const renderIconBlock$1 = (icon) => (jsxs("div", { className: "absolute bottom-0 right-0", children: [icon?.icon ? jsx(ImgInner, { image: getIconWithVersion(icon), asSVG: true }) : null, icon?.src ? jsx(ImgInner, { image: icon }) : null] }));
|
|
2278
2277
|
|
|
2279
2278
|
const Foldable = JSX(({ className = '', isFoldButtonOnTop = false, unfoldedByDefault = false, renderFoldableSection, renderFoldButton, }) => {
|
|
2280
2279
|
const [isUnfolded, setIsUnfolded] = useState(unfoldedByDefault);
|
|
@@ -4075,29 +4074,6 @@
|
|
|
4075
4074
|
return dateObj.toLocaleString('ru-RU', dateFormat).replace('г.', '');
|
|
4076
4075
|
}
|
|
4077
4076
|
|
|
4078
|
-
const RecommendationCard = JSX(({ className = '', title, description, items, image, socialMedia, button, ...rest }) => {
|
|
4079
|
-
const tileTitle = title ? (jsx(Heading, { headingType: "h5", as: "h3", className: "mb-3.5 z-10", title: title })) : null;
|
|
4080
|
-
const tileImage = image?.src ? (jsx(ImgInner, { className: "absolute bottom-0 right-0 m-0", image: image })) : null;
|
|
4081
|
-
return (jsx(BlockWrapper, { className: `relative overflow-hidden text-left border border-solid box-border p-7 min-w-[524px] min-h-[218px] ${className}`, role: "listitem", ...rest, children: jsx(BaseTile, { className: "flex justify-between", title: tileTitle, image: tileImage, children: jsxs("div", { className: "h-full flex flex-col justify-between", children: [description ? jsx("span", { className: "mb-2", children: description }) : null, items?.length ? (jsx(List, { className: "text-xl-light flex flex-col flex-1 gap-2 max-w-[236px]", items: items })) : null, socialMedia ? jsx(SocialMedia, { className: "pt-10 pb-0", media: socialMedia }) : null, button?.text ? (jsx("div", { className: "pt-2", children: renderButtonsSection([button], { buttonClassName: 'mt-16 px-5' }) })) : null] }) }) }));
|
|
4082
|
-
});
|
|
4083
|
-
|
|
4084
|
-
const BLUR_BLOCK_CLASSES = 'absolute top-0 bottom-0 w-[84px]';
|
|
4085
|
-
const CARD_VIEW_COUNT = 2;
|
|
4086
|
-
const CARD_SHIFT = 525;
|
|
4087
|
-
const Recommendation = JSX(({ recommendations = [], className = '', title, version = 'primary', ...rest }) => {
|
|
4088
|
-
const [activeIndex, controls] = useCarouselControls({
|
|
4089
|
-
itemCount: recommendations.length,
|
|
4090
|
-
visibleItemCount: CARD_VIEW_COUNT,
|
|
4091
|
-
});
|
|
4092
|
-
return (jsxs(BlockWrapper, { className: `relative font-sans p-9 overflow-hidden text-center ${className}`, version: version, ...rest, children: [title ? jsx(Heading, { headingType: "h3", className: "mb-6", title: title }) : null, jsxs("div", { children: [jsx("div", { className: "flex duration-1000 gap-3.5", style: { transform: `translateX(-${activeIndex * CARD_SHIFT}px)` }, role: "list", children: recommendations.length
|
|
4093
|
-
? recommendations.map((card, i) => (jsx(RecommendationCard, { version: version, className: "border-gray group-data-secondary:border-white/50", ...card }, String(i))))
|
|
4094
|
-
: null }), renderArrows({
|
|
4095
|
-
...controls,
|
|
4096
|
-
btnClass: ['left-8', 'right-8'],
|
|
4097
|
-
className: 'top-1/2 mt-3',
|
|
4098
|
-
})] }), jsx("div", { className: `${BLUR_BLOCK_CLASSES} left-0 ${version === 'secondary' ? 'bg-opacity-from-main' : 'bg-opacity-from-white'}` }), jsx("div", { className: `${BLUR_BLOCK_CLASSES} right-0 ${version === 'secondary' ? 'bg-opacity-to-main' : 'bg-opacity-to-white'}` })] }));
|
|
4099
|
-
});
|
|
4100
|
-
|
|
4101
4077
|
const RichTextBlock = JSX((props) => {
|
|
4102
4078
|
const { __html, ...rest } = props;
|
|
4103
4079
|
return (jsx(BlockWrapper, { ...rest, children: jsx(RichText, { __html: __html }) }));
|
|
@@ -4267,8 +4243,8 @@
|
|
|
4267
4243
|
const getContainerWidth = (length) => (length < 5 ? 'w-[276px]' : 'w-[210px]');
|
|
4268
4244
|
|
|
4269
4245
|
const STEPS_BLOCK_STYLE = {
|
|
4270
|
-
description: 'text-white/80 text-l-light group-data-primary:text-secondary-text',
|
|
4271
|
-
iconText: 'text-white group-data-primary:text-secondary-text',
|
|
4246
|
+
description: 'text-white/80 text-l-light group-data-primary:text-secondary-text group-data-gray:text-secondary-text',
|
|
4247
|
+
iconText: 'text-white group-data-primary:text-secondary-text group-data-gray:text-secondary-text',
|
|
4272
4248
|
iconBackground: 'bg-white/30 group-data-primary:bg-main-divider',
|
|
4273
4249
|
iconConnector: 'bg-white group-data-primary:bg-secondary-light',
|
|
4274
4250
|
dot: 'bg-white/80 group-data-primary:bg-secondary-text',
|
|
@@ -4276,16 +4252,18 @@
|
|
|
4276
4252
|
|
|
4277
4253
|
const getLineOpacity = (showLines) => (showLines ? '' : 'opacity-0');
|
|
4278
4254
|
const getPaddingX = (steps) => (steps < 5 ? 'px-[88px]' : 'px-[55px]');
|
|
4279
|
-
const StepsBlock = JSX(({ className = '', showLines = true, steps = [],
|
|
4255
|
+
const StepsBlock = JSX(({ className = '', showLines = true, steps = [], buttons, size = 'normal', version = 'primary', stepVersion = 'gray', title, ...rest }) => {
|
|
4280
4256
|
const shortGaps = steps.length > 3;
|
|
4281
4257
|
const styleMap = STEPS_BLOCK_STYLE;
|
|
4282
4258
|
const lineOpacity = getLineOpacity(showLines);
|
|
4283
4259
|
const paddingX = getPaddingX(steps.length);
|
|
4284
|
-
|
|
4260
|
+
const isMainButton = Boolean(buttons?.every((b) => b?.text));
|
|
4261
|
+
return (jsxs(BlockWrapper, { className: style('box-border py-12', shortGaps ? 'px-20' : 'px-[70px]', 'flex flex-col items-center overflow-hidden', className), version: version, ...rest, children: [title ? (jsx(Heading, { headingType: "h4", className: "max-w-[752px] text-center mb-9", title: title })) : null, steps?.length ? (jsxs("div", { className: "box-border", children: [jsx("div", { className: style('flex items-center', paddingX), children: joinList(jsx("div", { className: style('h-0.5 w-full bg-secondary-light flex-1', lineOpacity) }))(steps.map(renderStepIcon(styleMap, size, stepVersion))) }), jsx("div", { className: style('flex justify-between mt-4', shortGaps ? 'gap-x-3' : 'gap-x-[101px]'), children: steps.map(renderStep({ styleMap, isMainButton, version })) })] })) : null, renderButtonsSection(buttons, { className: 'mt-8' })] }));
|
|
4285
4262
|
});
|
|
4286
4263
|
const renderStepIcon = (styleMap, size, stepVersion) => ({ icon }, i) => {
|
|
4287
4264
|
const styleStepIconSize = size === 'normal' ? 'h-[100px] w-[100px]' : 'h-[63px] w-[63px]';
|
|
4288
|
-
|
|
4265
|
+
const stepVersionIconTextStyles = stepVersion === 'secondary' ? 'group-data-primary:text-white' : 'text-secondary-text';
|
|
4266
|
+
return (jsx(BlockWrapper, { className: `${styleStepIconSize} flex justify-center items-center text-center rounded-full p-[26px] box-border z-10`, version: stepVersion, children: checkCanRenderIcon(icon) ? (jsx(ImgInner, { image: getIconWithVersion(icon || {}, stepVersion), width: "48", height: "48", asSVG: true })) : (jsx("span", { className: style('text-h4', stepVersion === 'transparent' ? styleMap.iconText : stepVersionIconTextStyles), children: i + 1 })) }, String(i)));
|
|
4289
4267
|
};
|
|
4290
4268
|
|
|
4291
4269
|
const containerStyles = {
|
|
@@ -4764,7 +4742,6 @@
|
|
|
4764
4742
|
ProductGallery,
|
|
4765
4743
|
ProductTile,
|
|
4766
4744
|
PromoTile,
|
|
4767
|
-
Recommendation,
|
|
4768
4745
|
RichTextBlock,
|
|
4769
4746
|
RollupItem,
|
|
4770
4747
|
SafeDepositRental,
|
|
@@ -4906,7 +4883,7 @@
|
|
|
4906
4883
|
return (jsx("div", { className: "flex items-end absolute bottom-0 right-0 h-full pointer-events-none", children: jsx(LikeControl, { className: "rounded-tl-lg sticky bottom-0 pointer-events-auto" }) }));
|
|
4907
4884
|
}
|
|
4908
4885
|
|
|
4909
|
-
const packageVersion = "0.9.
|
|
4886
|
+
const packageVersion = "0.9.9";
|
|
4910
4887
|
|
|
4911
4888
|
exports.Blocks = Blocks;
|
|
4912
4889
|
exports.ContentPage = ContentPage;
|