@redneckz/wildless-cms-uni-blocks 0.9.0 → 0.9.2
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.8.24.js +6 -0
- package/bundle/blocks.schema.json +1 -1
- package/bundle/bundle.umd.js +18 -12
- package/bundle/bundle.umd.min.js +1 -1
- package/bundle/components/CarouselEventCard/CarouselEventCard.d.ts +1 -1
- package/bundle/components/CarouselProductCard/CarouselProductCard.d.ts +1 -1
- package/bundle/components/CarouselProductCard/CarouselProductCardContent.d.ts +2 -1
- package/bundle/components/Footer/FooterContent.d.ts +2 -2
- package/bundle/components/ProductBlock/ProductBlockContent.d.ts +2 -0
- package/dist/components/CarouselEventCard/CarouselEventCard.d.ts +1 -1
- package/dist/components/CarouselEventCard/CarouselEventCard.js +9 -3
- package/dist/components/CarouselEventCard/CarouselEventCard.js.map +1 -1
- package/dist/components/CarouselProductCard/CarouselProductCard.d.ts +1 -1
- package/dist/components/CarouselProductCard/CarouselProductCard.js +9 -5
- package/dist/components/CarouselProductCard/CarouselProductCard.js.map +1 -1
- package/dist/components/CarouselProductCard/CarouselProductCardContent.d.ts +2 -1
- package/dist/components/Filtration/FiltrationInner.js +1 -1
- package/dist/components/Filtration/FiltrationInner.js.map +1 -1
- package/dist/components/Footer/FooterContent.d.ts +2 -2
- package/dist/components/ProductBlock/ProductBlockContent.d.ts +2 -0
- package/dist/components/ProductBlock/ProductBlockInner.js +2 -2
- package/dist/components/ProductBlock/ProductBlockInner.js.map +1 -1
- package/dist/ui-kit/Foldable/DefaultFoldButton.js +3 -5
- package/dist/ui-kit/Foldable/DefaultFoldButton.js.map +1 -1
- package/lib/common.css +1 -1
- package/lib/components/CarouselEventCard/CarouselEventCard.d.ts +1 -1
- package/lib/components/CarouselEventCard/CarouselEventCard.js +9 -3
- package/lib/components/CarouselEventCard/CarouselEventCard.js.map +1 -1
- package/lib/components/CarouselProductCard/CarouselProductCard.d.ts +1 -1
- package/lib/components/CarouselProductCard/CarouselProductCard.js +9 -5
- package/lib/components/CarouselProductCard/CarouselProductCard.js.map +1 -1
- package/lib/components/CarouselProductCard/CarouselProductCardContent.d.ts +2 -1
- package/lib/components/Filtration/FiltrationInner.js +1 -1
- package/lib/components/Filtration/FiltrationInner.js.map +1 -1
- package/lib/components/Footer/FooterContent.d.ts +2 -2
- package/lib/components/ProductBlock/ProductBlock.fixture.d.ts +1 -0
- package/lib/components/ProductBlock/ProductBlockContent.d.ts +2 -0
- package/lib/components/ProductBlock/ProductBlockInner.js +2 -2
- package/lib/components/ProductBlock/ProductBlockInner.js.map +1 -1
- package/lib/ui-kit/Foldable/DefaultFoldButton.js +3 -5
- package/lib/ui-kit/Foldable/DefaultFoldButton.js.map +1 -1
- package/mobile/bundle/bundle.umd.js +4 -6
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/bundle/components/CarouselEventCard/CarouselEventCard.d.ts +1 -1
- package/mobile/bundle/components/CarouselProductCard/CarouselProductCard.d.ts +1 -1
- package/mobile/bundle/components/CarouselProductCard/CarouselProductCardContent.d.ts +2 -1
- package/mobile/bundle/components/Footer/FooterContent.d.ts +2 -2
- package/mobile/bundle/components/ProductBlock/ProductBlockContent.d.ts +2 -0
- package/mobile/dist/components/CarouselEventCard/CarouselEventCard.d.ts +1 -1
- package/mobile/dist/components/CarouselEventCard/CarouselEventCard.js +9 -3
- package/mobile/dist/components/CarouselEventCard/CarouselEventCard.js.map +1 -1
- package/mobile/dist/components/CarouselProductCard/CarouselProductCard.d.ts +1 -1
- package/mobile/dist/components/CarouselProductCard/CarouselProductCard.js +9 -5
- package/mobile/dist/components/CarouselProductCard/CarouselProductCard.js.map +1 -1
- package/mobile/dist/components/CarouselProductCard/CarouselProductCardContent.d.ts +2 -1
- package/mobile/dist/components/Filtration/FiltrationInner.js +1 -1
- package/mobile/dist/components/Filtration/FiltrationInner.js.map +1 -1
- package/mobile/dist/components/Footer/FooterContent.d.ts +2 -2
- package/mobile/dist/components/ProductBlock/ProductBlockContent.d.ts +2 -0
- package/mobile/dist/ui-kit/Foldable/DefaultFoldButton.js +3 -5
- package/mobile/dist/ui-kit/Foldable/DefaultFoldButton.js.map +1 -1
- package/mobile/lib/components/CarouselEventCard/CarouselEventCard.d.ts +1 -1
- package/mobile/lib/components/CarouselEventCard/CarouselEventCard.js +9 -3
- package/mobile/lib/components/CarouselEventCard/CarouselEventCard.js.map +1 -1
- package/mobile/lib/components/CarouselProductCard/CarouselProductCard.d.ts +1 -1
- package/mobile/lib/components/CarouselProductCard/CarouselProductCard.js +9 -5
- package/mobile/lib/components/CarouselProductCard/CarouselProductCard.js.map +1 -1
- package/mobile/lib/components/CarouselProductCard/CarouselProductCardContent.d.ts +2 -1
- package/mobile/lib/components/Filtration/FiltrationInner.js +1 -1
- package/mobile/lib/components/Filtration/FiltrationInner.js.map +1 -1
- package/mobile/lib/components/Footer/FooterContent.d.ts +2 -2
- package/mobile/lib/components/ProductBlock/ProductBlockContent.d.ts +2 -0
- package/mobile/lib/ui-kit/Foldable/DefaultFoldButton.js +3 -5
- package/mobile/lib/ui-kit/Foldable/DefaultFoldButton.js.map +1 -1
- package/mobile/src/components/CarouselCatalogCard/CarouselCatalogCard.example.json +0 -1
- package/mobile/src/components/CarouselEventCard/CarouselEventCard.example.json +1 -3
- package/mobile/src/components/CarouselEventCard/CarouselEventCard.tsx +19 -9
- package/mobile/src/components/CarouselProductCard/CarouselProductCard.example.json +0 -1
- package/mobile/src/components/CarouselProductCard/CarouselProductCard.tsx +21 -12
- package/mobile/src/components/CarouselProductCard/CarouselProductCardContent.ts +3 -1
- package/mobile/src/components/CarouselRecommendationCard/CarouselRecommendationCard.example.json +0 -2
- package/mobile/src/components/CarouselTariffsCard/CarouselTariffsCard.example.json +0 -1
- package/mobile/src/components/Filtration/FiltrationInner.tsx +2 -2
- package/mobile/src/components/Footer/Footer.ui.json +1 -11
- package/mobile/src/components/Footer/FooterContent.ts +2 -3
- package/mobile/src/components/ProductBlock/ProductBlock.example.json +2 -1
- package/mobile/src/components/ProductBlock/ProductBlockContent.ts +2 -0
- package/mobile/src/ui-kit/Foldable/DefaultFoldButton.tsx +3 -9
- package/package.json +1 -1
- package/src/components/CarouselCatalogCard/CarouselCatalogCard.example.json +0 -1
- package/src/components/CarouselEventCard/CarouselEventCard.example.json +1 -3
- package/src/components/CarouselEventCard/CarouselEventCard.tsx +19 -9
- package/src/components/CarouselProductCard/CarouselProductCard.example.json +0 -1
- package/src/components/CarouselProductCard/CarouselProductCard.tsx +21 -12
- package/src/components/CarouselProductCard/CarouselProductCardContent.ts +3 -1
- package/src/components/CarouselRecommendationCard/CarouselRecommendationCard.example.json +0 -2
- package/src/components/CarouselTariffsCard/CarouselTariffsCard.example.json +0 -1
- package/src/components/Filtration/FiltrationInner.tsx +2 -2
- package/src/components/Footer/Footer.ui.json +1 -11
- package/src/components/Footer/FooterContent.ts +2 -3
- package/src/components/ProductBlock/ProductBlock.example.json +2 -1
- package/src/components/ProductBlock/ProductBlock.fixture.tsx +17 -0
- package/src/components/ProductBlock/ProductBlockContent.ts +2 -0
- package/src/components/ProductBlock/ProductBlockInner.tsx +4 -1
- package/src/ui-kit/Foldable/DefaultFoldButton.tsx +3 -9
package/bundle/bundle.umd.js
CHANGED
|
@@ -2088,7 +2088,12 @@
|
|
|
2088
2088
|
iconVersion: icon?.iconVersion ?? (version === 'secondary' ? 'white' : 'color'),
|
|
2089
2089
|
});
|
|
2090
2090
|
|
|
2091
|
-
const CarouselEventCard = JSX(({ className = '', icon, title, description, href, target, ...rest }) =>
|
|
2091
|
+
const CarouselEventCard = JSX(({ className = '', icon, title, description, href, target, ...rest }) => {
|
|
2092
|
+
const link = useLink();
|
|
2093
|
+
const adjustedProps = link({ href, target });
|
|
2094
|
+
const tagName = href ? 'a' : 'section';
|
|
2095
|
+
return (jsxs(BlockWrapper, { className: style('flex flex-col w-[365px]', className), extraProps: adjustedProps, tag: tagName, ...rest, children: [icon?.icon ? jsx(ImgInner, { image: getIconWithVersion(icon), asSVG: true }) : null, icon?.src ? jsx(ImgInner, { image: icon }) : null, title ? (jsx(Heading, { headingType: "h6", as: "h4", className: "text-left mb-2", title: title })) : null, description ? (jsx("div", { className: "mb-4", children: jsx(Text, { font: "font-light", size: "text-s", color: "text-secondary-text", children: description }) })) : null] }));
|
|
2096
|
+
});
|
|
2092
2097
|
|
|
2093
2098
|
const BaseTile = JSX(({ className = '', title = '', buttons, image, children }) => (jsxs("div", { className: `font-sans flex flex-col grow h-full items-start ${className}`, children: [title, jsxs("div", { className: "flex grow w-full justify-between", children: [jsxs("div", { className: "flex flex-col justify-between w-full", children: [jsx("div", { className: "h-full", children: children }), buttons ? jsx("div", { className: "mt-auto pt-8", children: buttons }) : null] }), image] })] })));
|
|
2094
2099
|
|
|
@@ -2152,8 +2157,11 @@
|
|
|
2152
2157
|
};
|
|
2153
2158
|
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);
|
|
2154
2159
|
|
|
2155
|
-
const CarouselProductCard = JSX(({ className = '',
|
|
2156
|
-
|
|
2160
|
+
const CarouselProductCard = JSX(({ additionalDescription, align = 'text-center', button = {}, className = '', description, headlineSmallVersion = 'H6', href, icon, isDotted = true, items = [], target, title, version = 'primary', ...rest }) => {
|
|
2161
|
+
const link = useLink();
|
|
2162
|
+
const adjustedProps = link({ href, target });
|
|
2163
|
+
const tagName = href ? 'a' : 'section';
|
|
2164
|
+
return (jsxs(BlockWrapper, { className: style('flex flex-col justify-between items-stretch min-w-[260px] h-full w-full p-6', 'box-border border-solid border border-gray', align, className), extraProps: adjustedProps, tag: tagName, version: version, ...rest, children: [jsxs("div", { className: "flex flex-col h-full", children: [renderImage$3(icon), renderCardTitle(headlineSmallVersion, title), renderDescription$3(description, title), renderItems(items, isDotted, version), renderAdditionalDescription$1(additionalDescription)] }), renderButtonsSection([button], { buttonClassName: 'mt-6 w-full' })] }));
|
|
2157
2165
|
});
|
|
2158
2166
|
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] }));
|
|
2159
2167
|
const renderCardTitle = (headlineSmallVersion, title) => title ? jsx(Text, { size: HEADLINE_SMALL_VERSION[headlineSmallVersion], children: title }) : null;
|
|
@@ -2542,11 +2550,9 @@
|
|
|
2542
2550
|
};
|
|
2543
2551
|
|
|
2544
2552
|
const DefaultFoldButton = JSX(({ className = '', label, icon, dataTheme = '', disabled = false, onClick }) => {
|
|
2545
|
-
|
|
2546
|
-
|
|
2547
|
-
|
|
2548
|
-
? 'bg-main-divider text-main-disabled cursor-not-allowed hover:bg-main-divider active:bg-main-divider'
|
|
2549
|
-
: '', className), onClick: onClick, disabled: disabled, "data-theme": dataTheme, children: [jsx("span", { className: "text-h4 pr-3", children: label }), icon ? (jsx(ImgInner, { image: {
|
|
2553
|
+
return (jsxs("button", { className: style('flex justify-center w-full px-0 py-5 border border-transparent outline-none focus:border-primary-text', disabled
|
|
2554
|
+
? 'bg-main-divider text-main-disabled hover:bg-main-divider'
|
|
2555
|
+
: 'bg-primary-main text-white hover:bg-primary-hove', className), onClick: onClick, disabled: disabled, "data-theme": dataTheme, children: [jsx("span", { className: "text-h4 pr-3", children: label }), icon ? (jsx(ImgInner, { image: {
|
|
2550
2556
|
icon,
|
|
2551
2557
|
iconVersion: 'white',
|
|
2552
2558
|
}, className: "flex-shrink-0 my-auto", width: "20", height: "20", asSVG: true })) : null] }));
|
|
@@ -2574,7 +2580,7 @@
|
|
|
2574
2580
|
: [blocksToRender, []];
|
|
2575
2581
|
return (jsxs("div", { children: [jsx("div", { className: style(blocksToRender.length ? 'hidden' : ''), children: jsx(ErrorBlock, { error: { errorContentType: 'Image' }, title: "\u041D\u0435\u0442 \u043F\u043E\u0434\u0445\u043E\u0434\u044F\u0449\u0435\u0439 \u0438\u043F\u043E\u0442\u0435\u0447\u043D\u043E\u0439 \u043F\u0440\u043E\u0433\u0440\u0430\u043C\u043C\u044B", subtitle: "\u041F\u043E\u043F\u0440\u043E\u0431\u0443\u0439\u0442\u0435 \u043E\u0447\u0438\u0441\u0442\u0438\u0442\u044C \u0444\u0438\u043B\u044C\u0442\u0440\u044B" }) }), jsxs("div", { className: style(blocksToRender.length ? '' : 'hidden'), children: [jsx("div", { className: resultsGridStyle, children: renderBlocksList(visibleBlocks, { ...rest.options, parent: block }) }), jsx(Foldable, { renderFoldableSection: ({ isUnfolded }) => {
|
|
2576
2582
|
return (jsx(FoldableSection, { className: resultsGridStyle, isUnfolded: isUnfolded, children: renderBlocksList(hiddenBlocks, { ...rest.options, parent: block }) }));
|
|
2577
|
-
}, renderFoldButton: ({ isUnfolded, onToggle }) => (jsx(DefaultFoldButton, { className:
|
|
2583
|
+
}, renderFoldButton: ({ isUnfolded, onToggle }) => (jsx(DefaultFoldButton, { className: style('mt-11', topItemsCount < 1 ? 'hidden' : ''), disabled: !hiddenBlocks?.length, label: label, icon: ICONS[Number(isUnfolded)], dataTheme: rest.options?.page?.colorPalette, onClick: onToggle })) })] })] }));
|
|
2578
2584
|
});
|
|
2579
2585
|
|
|
2580
2586
|
const SlideCheckboxGroup = JSX(({ value, onChange, items = [], multiple }) => {
|
|
@@ -3869,10 +3875,10 @@
|
|
|
3869
3875
|
|
|
3870
3876
|
const renderBenefit$1 = (version = 'primary', benefitsVersion = 'normal') => ({ icon, label, description }, i) => (jsx(BenefitItem, { icon: icon, label: label, description: description, version: version, benefitsVersion: benefitsVersion }, String(i)));
|
|
3871
3877
|
|
|
3872
|
-
const ProductBlockInner = JSX(({ className = '', title, headlineVersion = 'L', description, benefitsCountOfRow = 3, benefits, benefitsVersion, buttons, footnote, image, __html, items, version = 'primary', isDotted = true, textBlockClassName = '', }) => {
|
|
3878
|
+
const ProductBlockInner = JSX(({ className = '', title, headlineVersion = 'L', description, benefitsCountOfRow = 3, benefits, benefitsVersion, buttons, footnote, image, __html, items, version = 'primary', isDotted = true, textBlockClassName = '', directionRight = true, }) => {
|
|
3873
3879
|
const benefitsCount = benefits?.filter((_) => _.label)?.length;
|
|
3874
3880
|
const benefitsContainerStyles = getBenefitsContainerStyles(benefitsCountOfRow);
|
|
3875
|
-
return (jsxs("div", { className: style('flex grow justify-between items-stretch h-full', className), children: [jsxs("div", { className: style('flex flex-col', textBlockClassName), children: [jsx(Headline, { className: "!p-0 max-w-[600px]", title: title, description: description, headlineVersion: headlineVersion, align: "text-left" }), jsxs("div", { className: "flex flex-col justify-between h-full", children: [jsxs(BaseTile, { buttons: renderButtonsSection(buttons), children: [benefitsCount ? (jsx("div", { className: benefitsContainerStyles, children: benefits?.map(renderBenefit$1(version, benefitsVersion)) })) : null, __html ? (jsx("div", { className: "mt-5", children: jsx(RichText, { __html: __html }) })) : null, items?.length ? (jsx(List, { className: "mt-5 text-h6", items: items, itemClassName: "mb-[7px]", isDotted: isDotted })) : null] }), footnote ? jsx("p", { className: "text-m-light pt-12", children: footnote }) : null] })] })
|
|
3881
|
+
return (jsxs("div", { className: style('flex grow justify-between items-stretch h-full', className), children: [image?.src ? (jsx(ImgInner, { className: `mt-[-50px] ${directionRight ? 'order-2' : ''}`, image: image })) : null, jsxs("div", { className: style('flex flex-col', textBlockClassName), children: [jsx(Headline, { className: "!p-0 max-w-[600px]", title: title, description: description, headlineVersion: headlineVersion, align: "text-left" }), jsxs("div", { className: "flex flex-col justify-between h-full", children: [jsxs(BaseTile, { buttons: renderButtonsSection(buttons), children: [benefitsCount ? (jsx("div", { className: benefitsContainerStyles, children: benefits?.map(renderBenefit$1(version, benefitsVersion)) })) : null, __html ? (jsx("div", { className: "mt-5", children: jsx(RichText, { __html: __html }) })) : null, items?.length ? (jsx(List, { className: "mt-5 text-h6", items: items, itemClassName: "mb-[7px]", isDotted: isDotted })) : null] }), footnote ? jsx("p", { className: "text-m-light pt-12", children: footnote }) : null] })] })] }));
|
|
3876
3882
|
});
|
|
3877
3883
|
const getBenefitsContainerStyles = (benefitsCountOfRow = 2) => `gap-6 mt-6 ${benefitsCountOfRow > 2
|
|
3878
3884
|
? 'inline-grid grid-cols-[auto_auto_auto]'
|
|
@@ -4814,7 +4820,7 @@
|
|
|
4814
4820
|
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" }) }));
|
|
4815
4821
|
}
|
|
4816
4822
|
|
|
4817
|
-
const packageVersion = "0.9.
|
|
4823
|
+
const packageVersion = "0.9.2";
|
|
4818
4824
|
|
|
4819
4825
|
exports.Blocks = Blocks;
|
|
4820
4826
|
exports.ContentPage = ContentPage;
|