@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
|
@@ -1319,7 +1319,9 @@
|
|
|
1319
1319
|
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;
|
|
1320
1320
|
};
|
|
1321
1321
|
|
|
1322
|
-
const renderButtonsSection = (buttons, { className, buttonClassName, isVertical } = {}) => buttons?.length && buttons.some((_) => _?.text || _?.icon?.icon) ? (jsx("div", { className: style('flex', isVertical
|
|
1322
|
+
const renderButtonsSection = (buttons, { className, buttonClassName, isVertical } = {}) => buttons?.length && buttons.some((_) => _?.text || _?.icon?.icon) ? (jsx("div", { className: style('flex', isVertical
|
|
1323
|
+
? 'flex-col gap-xs justify-items-stretch'
|
|
1324
|
+
: 'flex-wrap @xl:flex-nowrap gap-lg sm:gap-m', className), children: buttons.map(renderButton$1(buttonClassName)) })) : null;
|
|
1323
1325
|
const renderButton$1 = (buttonClassName = '') => (button, index) => {
|
|
1324
1326
|
const { text, icon, iconRight, version, ...rest } = button || {};
|
|
1325
1327
|
const iconVersion = getIconVersion(icon, version);
|
|
@@ -2586,8 +2588,8 @@
|
|
|
2586
2588
|
center: '@xl:self-center',
|
|
2587
2589
|
end: '@xl:self-end',
|
|
2588
2590
|
};
|
|
2589
|
-
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, {
|
|
2590
|
-
className: style('@xl:justify-self-end row-start-1 @xl:row-end-3 @xl:col-start-2', positionStyle(isImageAlwaysOnRight), isImageSecondary ? 'hidden @xl:block' : ''),
|
|
2591
|
+
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, {
|
|
2592
|
+
className: style('@xl:justify-self-end @xl:row-start-1 @xl:row-end-3 @xl:col-start-2 ', positionStyle(isImageAlwaysOnRight), isImageSecondary ? 'hidden @xl:block' : ''),
|
|
2591
2593
|
imageAlign,
|
|
2592
2594
|
}), jsx("div", { className: "self-end", children: buttons })] })] })] })));
|
|
2593
2595
|
const positionStyle = (isImageAlwaysOnRight) => isImageAlwaysOnRight
|
|
@@ -2710,7 +2712,7 @@
|
|
|
2710
2712
|
const img = image?.src ? jsx(Img, { image: image }) : null;
|
|
2711
2713
|
const headline = renderHeadline({ title, description, headlineVersion, align });
|
|
2712
2714
|
const filteredBenefits = benefits?.filter((_) => _?.type === 'rte' || 'label' in _ || 'description' in _);
|
|
2713
|
-
return (jsx(BaseTile, { className: className, padding: padding, defaultPadding: defaultPadding, ...(isFullWidthTitle ? {
|
|
2715
|
+
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)] }) }));
|
|
2714
2716
|
});
|
|
2715
2717
|
const leftOrRightImage = (img, directionRight) => directionRight ? { rightImage: img } : { leftImage: img };
|
|
2716
2718
|
const renderTags = (tags) => (tags?.length ? jsx(Tags, { tags: tags }) : null);
|
|
@@ -3265,7 +3267,7 @@
|
|
|
3265
3267
|
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;
|
|
3266
3268
|
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"] })] }));
|
|
3267
3269
|
|
|
3268
|
-
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:
|
|
3270
|
+
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)) }) })));
|
|
3269
3271
|
|
|
3270
3272
|
const GOLDEN_RATIO = 1.618;
|
|
3271
3273
|
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() })] })));
|
|
@@ -4466,7 +4468,7 @@
|
|
|
4466
4468
|
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}`))) }));
|
|
4467
4469
|
};
|
|
4468
4470
|
|
|
4469
|
-
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 }) })));
|
|
4471
|
+
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 }) })));
|
|
4470
4472
|
|
|
4471
4473
|
const ICONS = ['ArrowDownIcon', 'ArrowUpIcon'];
|
|
4472
4474
|
const resultsGridStyle = 'space-y-px lg:space-y-0 lg:grid lg:grid-cols-12 gap-2xs border-box';
|
|
@@ -4916,7 +4918,7 @@
|
|
|
4916
4918
|
|
|
4917
4919
|
const joinList = (sep) => (list) => list.reduce((acc, el, i) => (acc.length ? acc.concat({ ...sep, key: `sep-${i}` }, el) : [el]), []);
|
|
4918
4920
|
|
|
4919
|
-
const packageVersion = "0.14.
|
|
4921
|
+
const packageVersion = "0.14.13";
|
|
4920
4922
|
|
|
4921
4923
|
exports.Blocks = Blocks;
|
|
4922
4924
|
exports.ContentPage = ContentPage;
|