@redneckz/wildless-cms-uni-blocks 0.14.70 → 0.14.71
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.62.js +3 -1
- package/bundle/blocks.schema.json +1 -1
- package/bundle/bundle.umd.js +8 -10
- package/bundle/bundle.umd.min.js +1 -1
- package/bundle/components/StepsBlock/StepsBlockContent.d.ts +2 -2
- package/bundle/ui-kit/List/ListContent.d.ts +2 -0
- package/dist/components/BenefitsBlock/BenefitsBlock.js +1 -1
- package/dist/components/BenefitsBlock/BenefitsBlock.js.map +1 -1
- package/dist/components/CarouselRecommendationCard/CarouselRecommendationCard.js +1 -3
- package/dist/components/CarouselRecommendationCard/CarouselRecommendationCard.js.map +1 -1
- package/dist/components/StepsBlock/StepsBlock.js +2 -2
- package/dist/components/StepsBlock/StepsBlock.js.map +1 -1
- package/dist/components/StepsBlock/StepsBlockContent.d.ts +2 -2
- package/dist/ui-kit/List/List.js +2 -2
- package/dist/ui-kit/List/List.js.map +1 -1
- package/dist/ui-kit/List/ListContent.d.ts +2 -0
- package/dist/ui-kit/List/ListItem.js +1 -1
- package/dist/ui-kit/List/ListItem.js.map +1 -1
- package/lib/common.css +1 -1
- package/lib/components/BenefitsBlock/BenefitsBlock.js +1 -1
- package/lib/components/BenefitsBlock/BenefitsBlock.js.map +1 -1
- package/lib/components/CarouselRecommendationCard/CarouselRecommendationCard.js +1 -3
- package/lib/components/CarouselRecommendationCard/CarouselRecommendationCard.js.map +1 -1
- package/lib/components/StepsBlock/StepsBlock.js +2 -2
- package/lib/components/StepsBlock/StepsBlock.js.map +1 -1
- package/lib/components/StepsBlock/StepsBlockContent.d.ts +2 -2
- package/lib/ui-kit/List/List.js +2 -2
- package/lib/ui-kit/List/List.js.map +1 -1
- package/lib/ui-kit/List/ListContent.d.ts +2 -0
- package/lib/ui-kit/List/ListItem.js +1 -1
- package/lib/ui-kit/List/ListItem.js.map +1 -1
- package/mobile/bundle/bundle.umd.js +6 -8
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/bundle/components/StepsBlock/StepsBlockContent.d.ts +2 -2
- package/mobile/bundle/ui-kit/List/ListContent.d.ts +2 -0
- package/mobile/dist/components/BenefitsBlock/BenefitsBlock.js +1 -1
- package/mobile/dist/components/BenefitsBlock/BenefitsBlock.js.map +1 -1
- package/mobile/dist/components/CarouselRecommendationCard/CarouselRecommendationCard.js +1 -3
- package/mobile/dist/components/CarouselRecommendationCard/CarouselRecommendationCard.js.map +1 -1
- package/mobile/dist/components/StepsBlock/StepsBlockContent.d.ts +2 -2
- package/mobile/dist/ui-kit/List/List.js +2 -2
- package/mobile/dist/ui-kit/List/List.js.map +1 -1
- package/mobile/dist/ui-kit/List/ListContent.d.ts +2 -0
- package/mobile/dist/ui-kit/List/ListItem.js +1 -1
- package/mobile/dist/ui-kit/List/ListItem.js.map +1 -1
- package/mobile/lib/common.css +1 -1
- package/mobile/lib/components/BenefitsBlock/BenefitsBlock.js +1 -1
- package/mobile/lib/components/BenefitsBlock/BenefitsBlock.js.map +1 -1
- package/mobile/lib/components/CarouselRecommendationCard/CarouselRecommendationCard.js +1 -3
- package/mobile/lib/components/CarouselRecommendationCard/CarouselRecommendationCard.js.map +1 -1
- package/mobile/lib/components/StepsBlock/StepsBlockContent.d.ts +2 -2
- package/mobile/lib/ui-kit/List/List.js +2 -2
- package/mobile/lib/ui-kit/List/List.js.map +1 -1
- package/mobile/lib/ui-kit/List/ListContent.d.ts +2 -0
- package/mobile/lib/ui-kit/List/ListItem.js +1 -1
- package/mobile/lib/ui-kit/List/ListItem.js.map +1 -1
- package/mobile/src/components/BenefitsBlock/BenefitsBlock.tsx +1 -1
- package/mobile/src/components/CarouselRecommendationCard/CarouselRecommendationCard.tsx +37 -39
- package/mobile/src/components/StepsBlock/StepsBlockContent.ts +3 -6
- package/mobile/src/ui-kit/List/List.tsx +6 -2
- package/mobile/src/ui-kit/List/ListContent.ts +2 -0
- package/mobile/src/ui-kit/List/ListItem.tsx +1 -1
- package/package.json +1 -1
- package/src/components/BenefitsBlock/BenefitsBlock.tsx +1 -1
- package/src/components/CarouselRecommendationCard/CarouselRecommendationCard.tsx +37 -39
- package/src/components/StepsBlock/StepsBlock.tsx +1 -2
- package/src/components/StepsBlock/StepsBlockContent.ts +3 -6
- package/src/ui-kit/List/List.tsx +6 -2
- package/src/ui-kit/List/ListContent.ts +2 -0
- package/src/ui-kit/List/ListItem.tsx +1 -1
package/bundle/bundle.umd.js
CHANGED
|
@@ -737,7 +737,7 @@
|
|
|
737
737
|
};
|
|
738
738
|
const renderButtonIcon = (icon) => isIcon(icon) ? (jsx(Img, { image: icon, width: String(icon?.size?.width || DEFAULT_ICON_W), height: String(DEFAULT_ICON_W) })) : null;
|
|
739
739
|
|
|
740
|
-
const ListItem = JSX(({ className, isDotted, dotClassName, children }) => (jsxs("div", { className: style('font-sans flex', className), role: "listitem", children: [isDotted ? (jsx("div", { className: "shrink-0", children: jsx("div", { className: style('align-middle inline-block rounded-full
|
|
740
|
+
const ListItem = JSX(({ className, isDotted, dotClassName, children }) => (jsxs("div", { className: style('font-sans flex', className), role: "listitem", children: [isDotted ? (jsx("div", { className: "shrink-0", children: jsx("div", { className: style('align-middle inline-block rounded-full group-data-secondary:bg-white', dotClassName) }) })) : null, jsx("span", { children: children })] })));
|
|
741
741
|
|
|
742
742
|
const LIST_VERSION_STYLE = {
|
|
743
743
|
S: {
|
|
@@ -756,9 +756,9 @@
|
|
|
756
756
|
dotStyle: 'w-1.5 h-1.5 mr-m',
|
|
757
757
|
},
|
|
758
758
|
};
|
|
759
|
-
const List = JSX(({ className, isDotted = true, items = [], listItemSize = 'M' }) => {
|
|
759
|
+
const List = JSX(({ className, isDotted = true, items = [], listItemSize = 'M', dotClassName = '' }) => {
|
|
760
760
|
const versionStyle = LIST_VERSION_STYLE[listItemSize];
|
|
761
|
-
return items?.length ? (jsx("section", { className: style('flex flex-col gap-xs text-left text-primary-text group-data-secondary:text-white group-data-gray:text-secondary-text', versionStyle.textSize, className), role: "list", children: items.map((item, i) => (jsx(ListItem, { isDotted: isDotted, dotClassName: versionStyle.dotStyle, children: item }, String(i)))) })) : null;
|
|
761
|
+
return items?.length ? (jsx("section", { className: style('flex flex-col gap-xs text-left text-primary-text group-data-secondary:text-white group-data-gray:text-secondary-text', versionStyle.textSize, className), role: "list", children: items.map((item, i) => (jsx(ListItem, { isDotted: isDotted, dotClassName: style(dotClassName || 'bg-primary-text', versionStyle.dotStyle), children: item }, String(i)))) })) : null;
|
|
762
762
|
});
|
|
763
763
|
|
|
764
764
|
const toLocalNumberFormat = (fractionDigits = 0) => (_ = 0) => new Intl.NumberFormat('ru-RU', {
|
|
@@ -1796,7 +1796,7 @@
|
|
|
1796
1796
|
const defaultIconSize = 44;
|
|
1797
1797
|
|
|
1798
1798
|
const BenefitsBlock = JSX(({ className = '', title, benefitList, ...rest }) => (jsxs(BlockWrapper, { className: className, defaultPadding: "p-6xl", ...rest, children: [title ? jsx(Heading, { headingType: "h3", as: "h2", className: AlignStyles, title: title }) : null, benefitList?.length ? (jsx("div", { className: "flex flex-col @md:flex-row flex-wrap w-full @md:justify-center mt-xl gap-5xl", role: "list", children: benefitList.map(renderBenefit) })) : null] })));
|
|
1799
|
-
const renderBenefit = ({ label, description, items, icon, iconBgVersion, isDotted = false }, i) => (jsxs("div", { className: "flex gap-m items-center @md:basis-1/2 @md:max-w-[500px]", role: "listitem", children: [icon?.icon ? (jsx(RoundedIcon, { className: "shrink-0", defaultIconSize: defaultIconSize, iconBgVersion: iconBgVersion || '', ...icon })) : null, icon?.src ? jsx(Img, { className: "shrink-0", image: icon }) : null, label ? (jsxs("div", { className: "@sm:h-full space-y-xs", children: [jsx(Heading, { headingType: "h6", children: label }), jsx(Text, { size: "text-l", color: "text-secondary-text group-data-secondary:text-white/80", font: "font-light", children: description }), jsx(List, {
|
|
1799
|
+
const renderBenefit = ({ label, description, items, icon, iconBgVersion, isDotted = false }, i) => (jsxs("div", { className: "flex gap-m items-center @md:basis-1/2 @md:max-w-[500px]", role: "listitem", children: [icon?.icon ? (jsx(RoundedIcon, { className: "shrink-0", defaultIconSize: defaultIconSize, iconBgVersion: iconBgVersion || '', ...icon })) : null, icon?.src ? jsx(Img, { className: "shrink-0", image: icon }) : null, label ? (jsxs("div", { className: "@sm:h-full space-y-xs", children: [jsx(Heading, { headingType: "h6", children: label }), jsx(Text, { size: "text-l", color: "text-secondary-text group-data-secondary:text-white/80", font: "font-light", children: description }), jsx(List, { dotClassName: "bg-secondary-text", listItemSize: "S", items: items, isDotted: isDotted })] })) : null] }, String(i)));
|
|
1800
1800
|
|
|
1801
1801
|
const Bonus = JSX(({ className = '', title, description, bonusItems = [], align = AlignStyles, ...rest }) => (jsx(BlockWrapper, { className: className, defaultPadding: "p-6xl", ...rest, children: jsxs("div", { className: "container", children: [jsx(Headline, { className: "mb-xl", isEmbedded: true, title: title, description: description, headlineVersion: "M", align: align }), jsx("div", { className: "flex flex-wrap gap-3xl gap-x-m w-full", children: bonusItems.length > 0
|
|
1802
1802
|
? bonusItems.map((_, i) => (jsxs("div", { className: "w-full @xl:w-[48%] sm:space-y-xs flex flex-col grow p-xl sm:p-m border border-gray", children: [jsx("div", { className: "grow", children: jsx(Headline, { title: _?.title, description: _?.description, headlineVersion: "S", isEmbedded: true, align: "text-left" }) }), jsxs("div", { className: "flex justify-center sm:justify-between sm:items-end", children: [jsx("div", { className: "hidden sm:block", children: renderButtonsSection(_?.buttons) }), _.bonusItemContent?.bonusType
|
|
@@ -3118,9 +3118,7 @@
|
|
|
3118
3118
|
const ImageAlwaysOnRight = true;
|
|
3119
3119
|
|
|
3120
3120
|
//TODO: replace SocialMedia with renderButtonSection
|
|
3121
|
-
const CarouselRecommendationCard = JSX(({ className, padding, description, additionalDescription, href, icon, items = [], isDotted, socialMedia = [], target, title, align = 'text-left', benefits, imageOptions: { directionRight = true, isImageAlwaysOnRight = ImageAlwaysOnRight, isImageSecondary = false, } = {}, ...rest }) => {
|
|
3122
|
-
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: jsxs(BaseTile, { className: "h-full", defaultPadding: "p-2xl", padding: padding, insetTitle: jsx(Headline, { title: title, description: description, headlineVersion: "XS", isEmbedded: true, align: align }), ...leftOrRightImage(isIcon(icon) ? jsx(Img, { image: icon }) : null, directionRight), buttons: socialMedia.length ? (jsx(SocialMedia, { media: socialMedia, showButtonText: true, version: rest?.version })) : null, isImageAlwaysOnRight: isImageAlwaysOnRight, isImageSecondary: isImageSecondary, imageAlign: "center", children: [jsx(BenefitsList, { benefits: benefits }), jsx(List, { items: items, isDotted: isDotted, listItemSize: "S" }), renderAdditionalDescription(additionalDescription, align)] }) }) }));
|
|
3123
|
-
});
|
|
3121
|
+
const CarouselRecommendationCard = JSX(({ className, padding, description, additionalDescription, href, icon, items = [], isDotted, socialMedia = [], target, title, align = 'text-left', benefits, imageOptions: { directionRight = true, isImageAlwaysOnRight = ImageAlwaysOnRight, isImageSecondary = false, } = {}, ...rest }) => (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: jsxs(BaseTile, { className: "h-full", defaultPadding: "p-2xl", padding: padding, insetTitle: jsx(Headline, { title: title, description: description, headlineVersion: "XS", isEmbedded: true, align: align }), ...leftOrRightImage(isIcon(icon) ? jsx(Img, { image: icon }) : null, directionRight), buttons: socialMedia.length ? (jsx(SocialMedia, { media: socialMedia, showButtonText: true, version: rest?.version })) : null, isImageAlwaysOnRight: isImageAlwaysOnRight, isImageSecondary: isImageSecondary, imageAlign: "center", children: [jsx(BenefitsList, { benefits: benefits }), jsx(List, { items: items, isDotted: isDotted, listItemSize: "S" }), renderAdditionalDescription(additionalDescription, align)] }) }) })));
|
|
3124
3122
|
const renderAdditionalDescription = (additionalDescription, align) => additionalDescription ? (jsx(Paragraph, { size: "text-m", font: "font-light", color: "text-secondary-text group-data-secondary:text-white/80", align: align, children: additionalDescription })) : null;
|
|
3125
3123
|
|
|
3126
3124
|
const Foldable = JSX(({ className = '', isFoldButtonOnTop = false, unfoldedByDefault = false, renderFoldableSection, renderFoldButton, }) => {
|
|
@@ -5230,13 +5228,13 @@
|
|
|
5230
5228
|
|
|
5231
5229
|
const getLineOpacity = (showLines) => (showLines ? '' : 'opacity-0');
|
|
5232
5230
|
const getPaddingX = (steps) => (steps < 5 ? 'px-24' : 'px-16');
|
|
5233
|
-
const StepsBlock = JSX(({
|
|
5231
|
+
const StepsBlock = JSX(({ buttons, className = '', description, showLines = true, size = 'normal', steps = [], stepVersion = 'gray', title, version = 'primary', ...rest }) => {
|
|
5234
5232
|
const shortGaps = steps.length > 3;
|
|
5235
5233
|
const styleMap = STEPS_BLOCK_STYLE;
|
|
5236
5234
|
const lineOpacity = getLineOpacity(showLines);
|
|
5237
5235
|
const paddingX = getPaddingX(steps.length);
|
|
5238
5236
|
const isMainButton = Boolean(buttons?.every((b) => b?.text));
|
|
5239
|
-
return (jsxs(BlockWrapper, { className: style('box-border flex flex-col items-center overflow-hidden gap-y-3xl', className), defaultPadding: "p-6xl", version: version, ...rest, children: [jsx(Headline, { headlineVersion: "S", title: title, description: description, isEmbedded: true, className: "w-full", align:
|
|
5237
|
+
return (jsxs(BlockWrapper, { className: style('box-border flex flex-col items-center overflow-hidden gap-y-3xl', className), defaultPadding: "p-6xl", version: version, ...rest, children: [jsx(Headline, { headlineVersion: "S", title: title, description: description, isEmbedded: true, className: "w-full", align: AlignStyles }), steps?.length ? (jsxs("div", { className: "box-border space-y-lg", 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', shortGaps ? 'gap-x-s' : 'gap-x-20'), children: steps.map(renderStep({ styleMap, isMainButton, version })) })] })) : null, renderButtonsSection(buttons)] }));
|
|
5240
5238
|
});
|
|
5241
5239
|
const renderStepIcon = (styleMap, size, stepVersion) => ({ icon }, i) => {
|
|
5242
5240
|
const iconVersion = stepVersion === 'secondary' ? 'white' : 'color';
|
|
@@ -5831,7 +5829,7 @@
|
|
|
5831
5829
|
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" }) }));
|
|
5832
5830
|
}
|
|
5833
5831
|
|
|
5834
|
-
const packageVersion = "0.14.
|
|
5832
|
+
const packageVersion = "0.14.70";
|
|
5835
5833
|
|
|
5836
5834
|
exports.Blocks = Blocks;
|
|
5837
5835
|
exports.ContentPage = ContentPage;
|