@redneckz/wildless-cms-uni-blocks 0.9.8 → 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 +11 -34
- 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/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/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/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/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/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/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/src/components/CarouselRecommendationCard/CarouselRecommendationCard.example.json +1 -0
- package/mobile/src/components/CarouselRecommendationCard/CarouselRecommendationCard.tsx +18 -34
- 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/package.json +1 -1
- package/src/components/Blocks.ts +0 -2
- package/src/components/Carousel/Carousel.fixture.tsx +25 -2
- package/src/components/CarouselRecommendationCard/CarouselRecommendationCard.example.json +1 -0
- package/src/components/CarouselRecommendationCard/CarouselRecommendationCard.fixture.tsx +28 -1
- package/src/components/CarouselRecommendationCard/CarouselRecommendationCard.tsx +18 -34
- 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/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
|
@@ -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 box-border group-data-gray:bg-main-divider/50', BORDER_STYLE, className), version: version, ...rest, children: jsxs(LinkWrapper, { href: href, target: target, children: [title ? (jsx(Heading, { headingType: "h3", as: "h3", className: "text-center 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", children: [jsxs("div", { className: style('flex flex-col w-1/2', items?.length ? 'justify-between' : 'justify-end'), children: [items.length ? (jsx(List, { className: "text-xl-light flex flex-col gap-2 mt-14", 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;
|