@redneckz/wildless-cms-uni-blocks 0.14.12 → 0.14.13
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.14.12.js +34 -0
- package/bundle/blocks.schema.json +1 -1
- package/bundle/bundle.umd.js +11 -9
- package/bundle/bundle.umd.min.js +1 -1
- package/bundle/components/DepositFiltration/DepositFiltrationContent.d.ts +0 -4
- package/dist/components/CarouselRecommendationCard/CarouselRecommendationCard.js +2 -2
- package/dist/components/CarouselRecommendationCard/CarouselRecommendationCard.js.map +1 -1
- package/dist/components/DepositFiltration/DepositFiltrationContent.d.ts +0 -4
- package/dist/components/PictureText/PictureText.js +1 -1
- package/dist/components/PictureText/PictureText.js.map +1 -1
- package/dist/components/Tile/Tile.js +1 -1
- package/dist/components/Tile/Tile.js.map +1 -1
- package/dist/ui-kit/BaseProductTile/BaseProductTile.js +1 -1
- package/dist/ui-kit/BaseProductTile/BaseProductTile.js.map +1 -1
- package/dist/ui-kit/BaseTile/BaseTile.js +2 -2
- package/dist/ui-kit/BaseTile/BaseTile.js.map +1 -1
- package/dist/ui-kit/Button/renderButtonsSection.js +3 -1
- package/dist/ui-kit/Button/renderButtonsSection.js.map +1 -1
- package/lib/common.css +1 -1
- package/lib/components/CarouselRecommendationCard/CarouselRecommendationCard.js +2 -2
- package/lib/components/CarouselRecommendationCard/CarouselRecommendationCard.js.map +1 -1
- package/lib/components/DepositFiltration/DepositFiltrationContent.d.ts +0 -4
- package/lib/components/PictureText/PictureText.js +1 -1
- package/lib/components/PictureText/PictureText.js.map +1 -1
- package/lib/components/Tile/Tile.js +1 -1
- package/lib/components/Tile/Tile.js.map +1 -1
- package/lib/ui-kit/BaseProductTile/BaseProductTile.js +1 -1
- package/lib/ui-kit/BaseProductTile/BaseProductTile.js.map +1 -1
- package/lib/ui-kit/BaseTile/BaseTile.js +2 -2
- package/lib/ui-kit/BaseTile/BaseTile.js.map +1 -1
- package/lib/ui-kit/Button/renderButtonsSection.js +3 -1
- package/lib/ui-kit/Button/renderButtonsSection.js.map +1 -1
- package/mobile/bundle/bundle.umd.js +9 -7
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/bundle/components/DepositFiltration/DepositFiltrationContent.d.ts +0 -4
- package/mobile/dist/components/DepositFiltration/DepositFiltrationContent.d.ts +0 -4
- package/mobile/dist/components/PictureText/PictureText.js +1 -1
- package/mobile/dist/components/PictureText/PictureText.js.map +1 -1
- package/mobile/dist/components/Tile/Tile.js +1 -1
- package/mobile/dist/components/Tile/Tile.js.map +1 -1
- package/mobile/dist/ui-kit/BaseProductTile/BaseProductTile.js +1 -1
- package/mobile/dist/ui-kit/BaseProductTile/BaseProductTile.js.map +1 -1
- package/mobile/dist/ui-kit/BaseTile/BaseTile.js +2 -2
- package/mobile/dist/ui-kit/BaseTile/BaseTile.js.map +1 -1
- package/mobile/dist/ui-kit/Button/renderButtonsSection.js +3 -1
- package/mobile/dist/ui-kit/Button/renderButtonsSection.js.map +1 -1
- package/mobile/lib/common.css +1 -1
- package/mobile/lib/components/DepositFiltration/DepositFiltrationContent.d.ts +0 -4
- package/mobile/lib/components/PictureText/PictureText.js +1 -1
- package/mobile/lib/components/PictureText/PictureText.js.map +1 -1
- package/mobile/lib/components/Tile/Tile.js +1 -1
- package/mobile/lib/components/Tile/Tile.js.map +1 -1
- package/mobile/lib/ui-kit/BaseProductTile/BaseProductTile.js +1 -1
- package/mobile/lib/ui-kit/BaseProductTile/BaseProductTile.js.map +1 -1
- package/mobile/lib/ui-kit/BaseTile/BaseTile.js +2 -2
- package/mobile/lib/ui-kit/BaseTile/BaseTile.js.map +1 -1
- package/mobile/lib/ui-kit/Button/renderButtonsSection.js +3 -1
- package/mobile/lib/ui-kit/Button/renderButtonsSection.js.map +1 -1
- package/mobile/src/components/CarouselRecommendationCard/CarouselRecommendationCard.example.json +2 -1
- package/mobile/src/components/DepositFiltration/DepositFiltration.example.json +0 -14
- package/mobile/src/components/DepositFiltration/DepositFiltrationContent.ts +0 -4
- package/mobile/src/components/PictureText/PictureText.tsx +1 -1
- package/mobile/src/components/Tile/Tile.tsx +1 -0
- package/mobile/src/ui-kit/BaseProductTile/BaseProductTile.tsx +1 -1
- package/mobile/src/ui-kit/BaseTile/BaseTile.tsx +2 -2
- package/mobile/src/ui-kit/Button/renderButtonsSection.tsx +3 -1
- package/package.json +1 -1
- package/src/components/CarouselRecommendationCard/CarouselRecommendationCard.example.json +2 -1
- package/src/components/CarouselRecommendationCard/CarouselRecommendationCard.tsx +2 -2
- package/src/components/DepositFiltration/DepositFiltration.example.json +0 -14
- package/src/components/DepositFiltration/DepositFiltration.fixture.mobile.tsx +1 -15
- package/src/components/DepositFiltration/DepositFiltration.fixture.tsx +0 -14
- package/src/components/DepositFiltration/DepositFiltrationContent.ts +0 -4
- package/src/components/PictureText/PictureText.tsx +1 -1
- package/src/components/Tile/Tile.tsx +1 -0
- package/src/ui-kit/BaseProductTile/BaseProductTile.tsx +1 -1
- package/src/ui-kit/BaseTile/BaseTile.tsx +2 -2
- package/src/ui-kit/Button/renderButtonsSection.tsx +3 -1
package/bundle/bundle.umd.js
CHANGED
|
@@ -1311,7 +1311,9 @@
|
|
|
1311
1311
|
return description?.items && description.items.length > 0 ? (jsx("ul", { className: listStyleType, children: description.items.map((_, i) => (jsx("li", { children: jsx(Text, { size: "text-l", color: "text-secondary-text group-data-secondary:text-white/80", font: "font-light", children: _ }) }, `benefitListItem-${i}`))) })) : null;
|
|
1312
1312
|
};
|
|
1313
1313
|
|
|
1314
|
-
const renderButtonsSection = (buttons, { className, buttonClassName, isVertical } = {}) => buttons?.length && buttons.some((_) => _?.text || _?.icon?.icon) ? (jsx("div", { className: style('flex', isVertical
|
|
1314
|
+
const renderButtonsSection = (buttons, { className, buttonClassName, isVertical } = {}) => buttons?.length && buttons.some((_) => _?.text || _?.icon?.icon) ? (jsx("div", { className: style('flex', isVertical
|
|
1315
|
+
? 'flex-col gap-xs justify-items-stretch'
|
|
1316
|
+
: 'flex-wrap @xl:flex-nowrap gap-lg sm:gap-m', className), children: buttons.map(renderButton(buttonClassName)) })) : null;
|
|
1315
1317
|
const renderButton = (buttonClassName = '') => (button, index) => {
|
|
1316
1318
|
const { text, icon, iconRight, version, ...rest } = button || {};
|
|
1317
1319
|
const iconVersion = getIconVersion(icon, version);
|
|
@@ -2622,8 +2624,8 @@
|
|
|
2622
2624
|
center: '@xl:self-center',
|
|
2623
2625
|
end: '@xl:self-end',
|
|
2624
2626
|
};
|
|
2625
|
-
const BaseTile = JSX(({ className, defaultPadding, padding, title = '', insetTitle = '', buttons, leftImage, rightImage, imageAlign, isImageAlwaysOnRight = false, isImageSecondary, children, }) => (jsxs("div", { className: style('relative flex flex-col gap-3xl font-sans overflow-hidden', padding || defaultPadding, className), children: [title ? jsx("div", { className: "relative", children: title }) : null, jsxs("div", { className: style('grow relative flex flex-col-reverse @xl:flex-row justify-around @xl:justify-between items-stretch gap-3xl'), children: [renderImageContainer(leftImage, { imageAlign }), jsxs("div", { className: style('grid gap-3xl', rightImage ? '@xl:grid-cols-2' : '', leftImage ? '' : 'grow'), children: [jsxs("div", { className: "grow grid gap-3xl row-span-1", children: [insetTitle, children] }), renderImageContainer(rightImage, {
|
|
2626
|
-
className: style('@xl:justify-self-end row-start-1 @xl:row-end-3 @xl:col-start-2', positionStyle(isImageAlwaysOnRight), isImageSecondary ? 'hidden @xl:block' : ''),
|
|
2627
|
+
const BaseTile = JSX(({ className, defaultPadding, padding, title = '', insetTitle = '', buttons, leftImage, rightImage, imageAlign, isImageAlwaysOnRight = false, isImageSecondary = false, children, }) => (jsxs("div", { className: style('relative flex flex-col gap-3xl font-sans overflow-hidden', padding || defaultPadding, className), children: [title ? jsx("div", { className: "relative", children: title }) : null, jsxs("div", { className: style('grow relative flex flex-col-reverse @xl:flex-row justify-around @xl:justify-between items-stretch gap-3xl'), children: [renderImageContainer(leftImage, { imageAlign }), jsxs("div", { className: style('grid gap-3xl', rightImage ? '@xl:grid-cols-2' : '', leftImage ? '' : 'grow'), children: [jsxs("div", { className: "grow grid gap-3xl row-span-1", children: [insetTitle, children] }), renderImageContainer(rightImage, {
|
|
2628
|
+
className: style('@xl:justify-self-end @xl:row-start-1 @xl:row-end-3 @xl:col-start-2 ', positionStyle(isImageAlwaysOnRight), isImageSecondary ? 'hidden @xl:block' : ''),
|
|
2627
2629
|
imageAlign,
|
|
2628
2630
|
}), jsx("div", { className: "self-end", children: buttons })] })] })] })));
|
|
2629
2631
|
const positionStyle = (isImageAlwaysOnRight) => isImageAlwaysOnRight
|
|
@@ -2753,7 +2755,7 @@
|
|
|
2753
2755
|
const img = image?.src ? jsx(Img, { image: image }) : null;
|
|
2754
2756
|
const headline = renderHeadline({ title, description, headlineVersion, align });
|
|
2755
2757
|
const filteredBenefits = benefits?.filter((_) => _?.type === 'rte' || 'label' in _ || 'description' in _);
|
|
2756
|
-
return (jsx(BaseTile, { className: className, padding: padding, defaultPadding: defaultPadding, ...(isFullWidthTitle ? {
|
|
2758
|
+
return (jsx(BaseTile, { className: className, padding: padding, defaultPadding: defaultPadding, ...(isFullWidthTitle ? { title: headline } : { insetTitle: headline }), ...leftOrRightImage(img, directionRight), isImageSecondary: isImageSecondary, imageAlign: imageAlign, isImageAlwaysOnRight: isImageAlwaysOnRight, buttons: renderButtonsSection(buttons), children: jsxs("div", { className: "flex flex-col sm:gap-xl gap-4xl", children: [filteredBenefits?.length ? (jsx(BenefitsList, { benefitsVersion: benefitsVersion, isTabularBenefits: isTabularBenefits, benefits: filteredBenefits })) : null, __html ? jsx(RichText, { __html: __html }) : null, items?.length ? (jsx(List, { items: items, isDotted: isDotted, listItemSize: listItemSize })) : null, children, renderTags(tags)] }) }));
|
|
2757
2759
|
});
|
|
2758
2760
|
const leftOrRightImage = (img, directionRight) => directionRight ? { rightImage: img } : { leftImage: img };
|
|
2759
2761
|
const renderTags = (tags) => (tags?.length ? jsx(Tags, { tags: tags }) : null);
|
|
@@ -2823,8 +2825,8 @@
|
|
|
2823
2825
|
const getFilteredIcon = (icon) => (icon?.src || icon?.icon ? icon : undefined);
|
|
2824
2826
|
|
|
2825
2827
|
//TODO: replace SocialMedia with renderButtonSection
|
|
2826
|
-
const CarouselRecommendationCard = JSX(({ className, padding, description, href, icon, items = [], listItemSize = 'S', socialMedia = [], target, title, align = 'text-left', isImageAlwaysOnRight, ...rest }) => {
|
|
2827
|
-
return (jsx(BlockWrapper, { className: style('relative min-h-28 group-data-gray:bg-main-divider/50', className), defaultPadding: "p-0", ...rest, children: jsx(LinkWrapper, { href: href, target: target, className: "h-full", children: jsx(BaseTile, { className: "h-full", defaultPadding: "p-m", padding: padding,
|
|
2828
|
+
const CarouselRecommendationCard = JSX(({ className, padding, description, href, icon, items = [], listItemSize = 'S', socialMedia = [], target, title, align = 'text-left', isImageAlwaysOnRight = true, ...rest }) => {
|
|
2829
|
+
return (jsx(BlockWrapper, { className: style('relative min-h-28 group-data-gray:bg-main-divider/50', className), defaultPadding: "p-0", ...rest, children: jsx(LinkWrapper, { href: href, target: target, className: "h-full", children: jsx(BaseTile, { className: "h-full", defaultPadding: "p-m", padding: padding, insetTitle: title ? (jsx(Headline, { title: title, description: description, headlineVersion: "S", isEmbedded: true, align: align })) : null, rightImage: icon?.icon || icon?.src ? jsx(Img, { image: icon }) : null, buttons: socialMedia.length ? jsx(SocialMedia, { media: socialMedia, showButtonText: true }) : null, isImageAlwaysOnRight: isImageAlwaysOnRight, children: items.length ? jsx(List, { items: items, listItemSize: listItemSize }) : null }) }) }));
|
|
2828
2830
|
});
|
|
2829
2831
|
|
|
2830
2832
|
const CarouselRichTextCard = JSX(({ className = '', __html, richVersion = 'striped', ...rest }) => (jsx(BlockWrapper, { className: className, ...rest, children: jsx(RichText, { __html: __html, richVersion: richVersion }) })));
|
|
@@ -4580,7 +4582,7 @@
|
|
|
4580
4582
|
const renderInsuranceSumMonth = (sum, monthLimit) => sum || monthLimit ? (jsxs("div", { className: "flex flex-wrap xl:flex-nowrap xl:bg-main-divider xl:rounded-md p-xs gap-xl", children: [Number(sum) > 0 ? renderValueBlock('Страховая сумма', sum) : null, Number(monthLimit) > 0 ? renderValueBlock('Ежемесячный лимит', monthLimit) : null] })) : null;
|
|
4581
4583
|
const renderValueBlock = (title, value = 0) => (jsxs("div", { className: "basis-full flex flex-col-reverse sm:flex-row sm:justify-between sm:bg-main-divider sm:py-m sm:px-lg sm:rounded-md items-baseline whitespace-pre", children: [jsx(Text, { font: "font-light", size: "text-l", color: "text-secondary-text", children: title }), jsxs("span", { className: "font-sans text-h6 sm:text-primary-main text-primary-text", children: [toLocalNumberFormat(2)(value), " \u20BD"] })] }));
|
|
4582
4584
|
|
|
4583
|
-
const PictureText = JSX(({ className, padding, headlineVersion = 'M', align = 'text-center', sum, monthLimit, imageOptions, ...rest }) => (jsx(BlockWrapper, { className: className, padding: "p-0", ...rest, children: jsx(BaseProductTile, { className: "h-full", defaultPadding: "p-6xl", padding: padding, headlineVersion: headlineVersion, align: align, isFullWidthTitle:
|
|
4585
|
+
const PictureText = JSX(({ className, padding, headlineVersion = 'M', align = 'text-center', sum, monthLimit, imageOptions, ...rest }) => (jsx(BlockWrapper, { className: className, padding: "p-0", ...rest, children: jsx(BaseProductTile, { className: "h-full", defaultPadding: "p-6xl", padding: padding, headlineVersion: headlineVersion, align: align, isFullWidthTitle: true, imageOptions: { directionRight: false, imageAlign: 'center', ...imageOptions }, ...rest, children: renderInsuranceSumMonth(Number(sum), Number(monthLimit)) }) })));
|
|
4584
4586
|
|
|
4585
4587
|
const GOLDEN_RATIO = 1.618;
|
|
4586
4588
|
const Placeholder = JSX(({ className, title, description = 'Блок в разработке...', ...rest }) => (jsxs(BlockWrapper, { className: style('box-border', className), ...rest, children: [jsx(Headline, { className: "max-w-[600px]", title: title, description: description, headlineVersion: "L", align: "text-left", isEmbedded: true }), jsx("figure", { className: "m-0 mt-xl min-w-[80%]", children: renderShimmer() })] })));
|
|
@@ -5132,7 +5134,7 @@
|
|
|
5132
5134
|
return (jsx("ul", { className: style('text-secondary-text group-data-secondary:text-white/80', listStyle), children: items.map((_, i) => (jsx("li", { children: jsx(Text, { size: "text-s", font: "font-light", children: _ }) }, `listItem-${i}`))) }));
|
|
5133
5135
|
};
|
|
5134
5136
|
|
|
5135
|
-
const Tile = JSX(({ className, padding, headlineVersion = 'S', listItemSize = 'M', ...rest }) => (jsx(BlockWrapper, { className: className, padding: "p-0", ...rest, children: jsx(BaseProductTile, { className: "h-full", defaultPadding: "p-xl", padding: padding, headlineVersion: headlineVersion, listItemSize: listItemSize, ...rest }) })));
|
|
5137
|
+
const Tile = JSX(({ className, padding, headlineVersion = 'S', listItemSize = 'M', ...rest }) => (jsx(BlockWrapper, { className: className, padding: "p-0", ...rest, children: jsx(BaseProductTile, { className: "h-full", defaultPadding: "p-xl", padding: padding, headlineVersion: headlineVersion, listItemSize: listItemSize, isFullWidthTitle: false, ...rest }) })));
|
|
5136
5138
|
|
|
5137
5139
|
const VerticalLayout = JSX(({ className = '', gap = '', isPadding = false, isInnerPadding = true, version = 'transparent', isTheme = false, ...rest }) => (jsx(BlockWrapper, { className: style('relative flex flex-col', gapStyles[gap], className), defaultPadding: isPadding ? 'p-6xl' : '', version: version, isTheme: isTheme, ...rest, children: renderChildren({
|
|
5138
5140
|
...rest,
|
|
@@ -5449,7 +5451,7 @@
|
|
|
5449
5451
|
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" }) }));
|
|
5450
5452
|
}
|
|
5451
5453
|
|
|
5452
|
-
const packageVersion = "0.14.
|
|
5454
|
+
const packageVersion = "0.14.13";
|
|
5453
5455
|
|
|
5454
5456
|
exports.Blocks = Blocks;
|
|
5455
5457
|
exports.ContentPage = ContentPage;
|