@redneckz/wildless-cms-uni-blocks 0.6.42 → 0.6.43
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.6.34.js +2 -0
- package/bin/migration-scripts/0.6.43.js +29 -0
- package/bundle/blocks.schema.json +1 -1
- package/bundle/bundle.umd.js +84 -70
- package/bundle/bundle.umd.min.js +1 -1
- package/bundle/components/ProductTile/ProductTileContent.d.ts +24 -2
- package/bundle/components/ProductTile/renderAdditionalDescription.d.ts +4 -0
- package/bundle/components/ProductTile/renderBenefit.d.ts +4 -0
- package/bundle/components/ProductTile/renderImage.d.ts +3 -0
- package/bundle/content-page-repository/transformImg.d.ts +1 -1
- package/bundle/ui-kit/MarkdownText/MarkdownText.d.ts +2 -0
- package/bundle/ui-kit/MarkdownText/MarkdownTextProps.d.ts +6 -0
- package/dist/components/ProductTile/ProductTile.js +9 -22
- package/dist/components/ProductTile/ProductTile.js.map +1 -1
- package/dist/components/ProductTile/ProductTileContent.d.ts +24 -2
- package/dist/components/ProductTile/renderAdditionalDescription.d.ts +4 -0
- package/dist/components/ProductTile/renderAdditionalDescription.js +18 -0
- package/dist/components/ProductTile/renderAdditionalDescription.js.map +1 -0
- package/dist/components/ProductTile/renderBenefit.d.ts +4 -0
- package/dist/components/ProductTile/renderBenefit.js +32 -0
- package/dist/components/ProductTile/renderBenefit.js.map +1 -0
- package/dist/components/ProductTile/renderImage.d.ts +3 -0
- package/dist/components/ProductTile/renderImage.js +12 -0
- package/dist/components/ProductTile/renderImage.js.map +1 -0
- package/dist/components/TextBlock/TextBlock.js +13 -28
- package/dist/components/TextBlock/TextBlock.js.map +1 -1
- package/dist/content-page-repository/transformImg.d.ts +1 -1
- package/dist/content-page-repository/transformImg.js +4 -10
- package/dist/content-page-repository/transformImg.js.map +1 -1
- package/dist/content-page-repository/transformMarkdown.js +3 -3
- package/dist/content-page-repository/transformMarkdown.js.map +1 -1
- package/dist/ui-kit/MarkdownText/MarkdownText.d.ts +2 -0
- package/dist/ui-kit/MarkdownText/MarkdownText.js +9 -0
- package/dist/ui-kit/MarkdownText/MarkdownText.js.map +1 -0
- package/dist/ui-kit/MarkdownText/MarkdownTextProps.d.ts +6 -0
- package/dist/ui-kit/MarkdownText/MarkdownTextProps.js +2 -0
- package/dist/ui-kit/MarkdownText/MarkdownTextProps.js.map +1 -0
- package/dist/ui-kit/Text/Text.js +1 -5
- package/dist/ui-kit/Text/Text.js.map +1 -1
- package/lib/common.css +1 -1
- package/lib/components/ProductTile/ProductTile.js +10 -23
- package/lib/components/ProductTile/ProductTile.js.map +1 -1
- package/lib/components/ProductTile/ProductTileContent.d.ts +24 -2
- package/lib/components/ProductTile/renderAdditionalDescription.d.ts +4 -0
- package/lib/components/ProductTile/renderAdditionalDescription.js +15 -0
- package/lib/components/ProductTile/renderAdditionalDescription.js.map +1 -0
- package/lib/components/ProductTile/renderBenefit.d.ts +4 -0
- package/lib/components/ProductTile/renderBenefit.js +29 -0
- package/lib/components/ProductTile/renderBenefit.js.map +1 -0
- package/lib/components/ProductTile/renderImage.d.ts +3 -0
- package/lib/components/ProductTile/renderImage.js +9 -0
- package/lib/components/ProductTile/renderImage.js.map +1 -0
- package/lib/components/TextBlock/TextBlock.js +13 -28
- package/lib/components/TextBlock/TextBlock.js.map +1 -1
- package/lib/content-page-repository/transformImg.d.ts +1 -1
- package/lib/content-page-repository/transformImg.js +4 -10
- package/lib/content-page-repository/transformImg.js.map +1 -1
- package/lib/content-page-repository/transformMarkdown.js +3 -3
- package/lib/content-page-repository/transformMarkdown.js.map +1 -1
- package/lib/ui-kit/MarkdownText/MarkdownText.d.ts +2 -0
- package/lib/ui-kit/MarkdownText/MarkdownText.js +7 -0
- package/lib/ui-kit/MarkdownText/MarkdownText.js.map +1 -0
- package/lib/ui-kit/MarkdownText/MarkdownTextProps.d.ts +6 -0
- package/lib/ui-kit/MarkdownText/MarkdownTextProps.js +2 -0
- package/lib/ui-kit/MarkdownText/MarkdownTextProps.js.map +1 -0
- package/lib/ui-kit/Text/Text.js +1 -5
- package/lib/ui-kit/Text/Text.js.map +1 -1
- package/mobile/bundle/bundle.umd.js +2 -6
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/bundle/components/ProductTile/ProductTileContent.d.ts +24 -2
- package/mobile/bundle/components/ProductTile/renderAdditionalDescription.d.ts +4 -0
- package/mobile/bundle/components/ProductTile/renderBenefit.d.ts +4 -0
- package/mobile/bundle/components/ProductTile/renderImage.d.ts +3 -0
- package/mobile/bundle/content-page-repository/transformImg.d.ts +1 -1
- package/mobile/bundle/ui-kit/MarkdownText/MarkdownText.d.ts +2 -0
- package/mobile/bundle/ui-kit/MarkdownText/MarkdownTextProps.d.ts +6 -0
- package/mobile/dist/components/ProductTile/ProductTile.js +9 -22
- package/mobile/dist/components/ProductTile/ProductTile.js.map +1 -1
- package/mobile/dist/components/ProductTile/ProductTileContent.d.ts +24 -2
- package/mobile/dist/components/ProductTile/renderAdditionalDescription.d.ts +4 -0
- package/mobile/dist/components/ProductTile/renderAdditionalDescription.js +18 -0
- package/mobile/dist/components/ProductTile/renderAdditionalDescription.js.map +1 -0
- package/mobile/dist/components/ProductTile/renderBenefit.d.ts +4 -0
- package/mobile/dist/components/ProductTile/renderBenefit.js +32 -0
- package/mobile/dist/components/ProductTile/renderBenefit.js.map +1 -0
- package/mobile/dist/components/ProductTile/renderImage.d.ts +3 -0
- package/mobile/dist/components/ProductTile/renderImage.js +12 -0
- package/mobile/dist/components/ProductTile/renderImage.js.map +1 -0
- package/mobile/dist/content-page-repository/transformImg.d.ts +1 -1
- package/mobile/dist/content-page-repository/transformImg.js +4 -10
- package/mobile/dist/content-page-repository/transformImg.js.map +1 -1
- package/mobile/dist/content-page-repository/transformMarkdown.js +3 -3
- package/mobile/dist/content-page-repository/transformMarkdown.js.map +1 -1
- package/mobile/dist/ui-kit/MarkdownText/MarkdownText.d.ts +2 -0
- package/mobile/dist/ui-kit/MarkdownText/MarkdownText.js +9 -0
- package/mobile/dist/ui-kit/MarkdownText/MarkdownText.js.map +1 -0
- package/mobile/dist/ui-kit/MarkdownText/MarkdownTextProps.d.ts +6 -0
- package/mobile/dist/ui-kit/MarkdownText/MarkdownTextProps.js +2 -0
- package/mobile/dist/ui-kit/MarkdownText/MarkdownTextProps.js.map +1 -0
- package/mobile/dist/ui-kit/Text/Text.js +1 -5
- package/mobile/dist/ui-kit/Text/Text.js.map +1 -1
- package/mobile/lib/components/ProductTile/ProductTile.js +10 -23
- package/mobile/lib/components/ProductTile/ProductTile.js.map +1 -1
- package/mobile/lib/components/ProductTile/ProductTileContent.d.ts +24 -2
- package/mobile/lib/components/ProductTile/renderAdditionalDescription.d.ts +4 -0
- package/mobile/lib/components/ProductTile/renderAdditionalDescription.js +15 -0
- package/mobile/lib/components/ProductTile/renderAdditionalDescription.js.map +1 -0
- package/mobile/lib/components/ProductTile/renderBenefit.d.ts +4 -0
- package/mobile/lib/components/ProductTile/renderBenefit.js +29 -0
- package/mobile/lib/components/ProductTile/renderBenefit.js.map +1 -0
- package/mobile/lib/components/ProductTile/renderImage.d.ts +3 -0
- package/mobile/lib/components/ProductTile/renderImage.js +9 -0
- package/mobile/lib/components/ProductTile/renderImage.js.map +1 -0
- package/mobile/lib/content-page-repository/transformImg.d.ts +1 -1
- package/mobile/lib/content-page-repository/transformImg.js +4 -10
- package/mobile/lib/content-page-repository/transformImg.js.map +1 -1
- package/mobile/lib/content-page-repository/transformMarkdown.js +3 -3
- package/mobile/lib/content-page-repository/transformMarkdown.js.map +1 -1
- package/mobile/lib/ui-kit/MarkdownText/MarkdownText.d.ts +2 -0
- package/mobile/lib/ui-kit/MarkdownText/MarkdownText.js +7 -0
- package/mobile/lib/ui-kit/MarkdownText/MarkdownText.js.map +1 -0
- package/mobile/lib/ui-kit/MarkdownText/MarkdownTextProps.d.ts +6 -0
- package/mobile/lib/ui-kit/MarkdownText/MarkdownTextProps.js +2 -0
- package/mobile/lib/ui-kit/MarkdownText/MarkdownTextProps.js.map +1 -0
- package/mobile/lib/ui-kit/Text/Text.js +1 -5
- package/mobile/lib/ui-kit/Text/Text.js.map +1 -1
- package/mobile/src/common.css +50 -0
- package/mobile/src/components/ProductTile/ProductTile.example.json +3 -0
- package/mobile/src/components/ProductTile/ProductTile.tsx +13 -44
- package/mobile/src/components/ProductTile/ProductTile.ui.json +14 -1
- package/mobile/src/components/ProductTile/ProductTileContent.ts +26 -2
- package/mobile/src/components/ProductTile/renderAdditionalDescription.tsx +30 -0
- package/mobile/src/components/ProductTile/renderBenefit.tsx +39 -0
- package/mobile/src/components/ProductTile/renderImage.tsx +15 -0
- package/mobile/src/content-page-repository/transformImg.ts +6 -14
- package/mobile/src/content-page-repository/transformMarkdown.ts +3 -3
- package/mobile/src/ui-kit/MarkdownText/MarkdownText.tsx +8 -0
- package/mobile/src/ui-kit/MarkdownText/MarkdownTextProps.ts +6 -0
- package/mobile/src/ui-kit/Text/Text.tsx +5 -7
- package/package.json +1 -1
- package/src/common.css +50 -0
- package/src/components/ProductTile/ProductTile.example.json +3 -0
- package/src/components/ProductTile/ProductTile.fixture.tsx +11 -4
- package/src/components/ProductTile/ProductTile.tsx +13 -44
- package/src/components/ProductTile/ProductTile.ui.json +14 -1
- package/src/components/ProductTile/ProductTileContent.ts +26 -2
- package/src/components/ProductTile/renderAdditionalDescription.tsx +30 -0
- package/src/components/ProductTile/renderBenefit.tsx +39 -0
- package/src/components/ProductTile/renderImage.tsx +15 -0
- package/src/components/TextBlock/TextBlock.tsx +49 -41
- package/src/content-page-repository/transformImg.ts +6 -14
- package/src/content-page-repository/transformMarkdown.ts +3 -3
- package/src/ui-kit/MarkdownText/MarkdownText.tsx +8 -0
- package/src/ui-kit/MarkdownText/MarkdownTextProps.ts +6 -0
- package/src/ui-kit/Text/Text.tsx +5 -7
package/bundle/bundle.umd.js
CHANGED
|
@@ -519,11 +519,7 @@
|
|
|
519
519
|
return (jsx(ImgAsPicture, { className: className, imageClassName: imageClassName, image: image, isMobile: isMobile }));
|
|
520
520
|
});
|
|
521
521
|
|
|
522
|
-
const Text = JSX((
|
|
523
|
-
const { size = '', color = '', align = '', font = '', children } = props;
|
|
524
|
-
const textClasses = `font-sans ${size} ${color} ${align} ${font}`;
|
|
525
|
-
return jsx("span", { className: textClasses, children: children });
|
|
526
|
-
});
|
|
522
|
+
const Text = JSX(({ size, color, align, font, children }) => (jsx("span", { className: ['font-sans', size, color, align, font].filter(Boolean).join(' '), children: children })));
|
|
527
523
|
|
|
528
524
|
const icons$1 = ['PlusIcon', 'MinusIcon'];
|
|
529
525
|
const AccordionItem = JSX(({ className = '', label = '', isExpanded, ...rest }) => (jsx("li", { className: `border-0 border-b border-solid border-main-divider last:border-b-0 ${className}`, children: jsx(Foldable, { isFoldButtonOnTop: true, unfoldedByDefault: isExpanded, renderFoldableSection: ({ isUnfolded }) => (jsx(FoldableSection, { className: "grid grid-cols-12 gap-5 [&>*]:p-0", isUnfolded: isUnfolded, children: renderChildren(rest) })), renderFoldButton: ({ isUnfolded, onToggle }) => (jsx(FoldButton$1, { label: label, icon: icons$1[Number(isUnfolded)], onClick: onToggle })) }) })));
|
|
@@ -559,9 +555,9 @@
|
|
|
559
555
|
const BenefitsBlock = JSX(({ className = '', title, benefitList, version = 'primary', ...rest }) => (jsxs(BlockWrapper, { className: `font-sans text-primary-text p-12 flex flex-col items-center ${className} ${VersionStyleMap[version]}`, ...rest, children: [title ? (jsx(Heading, { headingType: "h3", as: "h2", className: `max-w-[47rem] text-center ${benefitsTextStyleMap[version]}`, title: title })) : null, benefitList?.length ? (jsx("div", { className: "flex flex-wrap w-full justify-center gap-x-20 mt-8", children: benefitList.map(renderStep(version)) })) : null] })));
|
|
560
556
|
const renderStep = (version) => (benefit, i) => {
|
|
561
557
|
const description = benefit.description;
|
|
562
|
-
return (jsxs("div", { className: "flex items-center basis-1/2 max-w-[500px] mb-14", children: [benefit?.icon?.icon ? (jsx(ImgInner, { className: `w-12 h-12 min-w-12 p-3 rounded-full ${benefitsIconStyleMap[version]}`, image: getIconWithVersion(benefit.icon, version), asSVG: true })) : null, benefit?.icon?.src ? jsx(ImgInner, { image: benefit.icon }) : null, jsxs("div", { className: "ml-5", children: [benefit?.label ? (jsx("h3", { className: `text-h6 m-0 ${benefitsTextStyleMap[version]}`, children: benefit.label })) : null, renderDescription$
|
|
558
|
+
return (jsxs("div", { className: "flex items-center basis-1/2 max-w-[500px] mb-14", children: [benefit?.icon?.icon ? (jsx(ImgInner, { className: `w-12 h-12 min-w-12 p-3 rounded-full ${benefitsIconStyleMap[version]}`, image: getIconWithVersion(benefit.icon, version), asSVG: true })) : null, benefit?.icon?.src ? jsx(ImgInner, { image: benefit.icon }) : null, jsxs("div", { className: "ml-5", children: [benefit?.label ? (jsx("h3", { className: `text-h6 m-0 ${benefitsTextStyleMap[version]}`, children: benefit.label })) : null, renderDescription$5(description, version)] })] }, String(i)));
|
|
563
559
|
};
|
|
564
|
-
const renderDescription$
|
|
560
|
+
const renderDescription$5 = (description, version) => {
|
|
565
561
|
const benefitType = description?.benefitType || null;
|
|
566
562
|
return description && benefitType ? (jsx("div", { className: `text-l-light mt-2 ${benefitsDescriptionStyleMap[version]}`, children: benefitType === 'list'
|
|
567
563
|
? renderListBenefit(description)
|
|
@@ -1676,11 +1672,11 @@
|
|
|
1676
1672
|
BORDER_STYLE,
|
|
1677
1673
|
AlignText[align],
|
|
1678
1674
|
VersionStyleMap[version],
|
|
1679
|
-
].join(' '), role: "listitem", children: [jsxs("div", { className: "flex flex-col h-full", children: [renderImage$4(icon, version), renderCardTitle$1(headlineSmallVersion, title), renderDescription$
|
|
1675
|
+
].join(' '), role: "listitem", children: [jsxs("div", { className: "flex flex-col h-full", children: [renderImage$4(icon, version), renderCardTitle$1(headlineSmallVersion, title), renderDescription$4(description, title), renderItems$2(items, isDotted, version), renderAdditionalDescription$2(additionalDescription, version)] }), renderButton({ button, buttonClassName: 'mt-6' })] }));
|
|
1680
1676
|
});
|
|
1681
1677
|
const renderImage$4 = (image, version) => (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: getIconWithVersion(image, version), asSVG: true })) : null] }));
|
|
1682
1678
|
const renderCardTitle$1 = (headlineSmallVersion, title) => title ? jsx(Text, { size: HEADLINE_SMALL_VERSION[headlineSmallVersion], children: title }) : null;
|
|
1683
|
-
const renderDescription$
|
|
1679
|
+
const renderDescription$4 = (description, title) => description ? (jsx("div", { className: title ? 'mt-2' : '', children: jsx(Paragraph, { size: "text-l", children: description }) })) : null;
|
|
1684
1680
|
const renderAdditionalDescription$2 = (additionalDescription, version = 'primary') => additionalDescription ? (jsx("div", { className: "mt-auto", children: jsx(Text, { size: "text-m", font: "font-light", color: descriptionStyleMap[version], children: additionalDescription }) })) : null;
|
|
1685
1681
|
const renderItems$2 = (items, isDotted, version = 'primary') => items?.length ? (jsx(List, { className: `max-w-[308px] mt-2 text-s ${version === 'primary' ? '!text-secondary-text' : ''}`, itemClassName: "text-left", items: items.filter((item) => item?.text).map((item) => item.text), isDotted: isDotted, version: version })) : null;
|
|
1686
1682
|
|
|
@@ -2050,12 +2046,12 @@
|
|
|
2050
2046
|
'bg-white': 'text-primary-text',
|
|
2051
2047
|
transparent: 'text-white',
|
|
2052
2048
|
};
|
|
2053
|
-
const renderTitle$
|
|
2049
|
+
const renderTitle$3 = (title, bgColor, className) => {
|
|
2054
2050
|
return (jsx("span", { className: `${TEXT_COLOR[bgColor]} ml-2.5 font-medium ${className || ''}`, children: title || 'Россельхозбанк' }));
|
|
2055
2051
|
};
|
|
2056
2052
|
|
|
2057
2053
|
const Logo = JSX(({ className = '', href, logo, children = logo?.title, targetBlank, bgColor = 'bg-white', showTitle = true, }) => {
|
|
2058
|
-
return (jsxs("a", { className: `inline-flex items-center font-sans no-underline ${className}`, href: href || '/', target: targetBlank ? '_blank' : '_self', "aria-label": logo?.title || 'Россельхозбанк', children: [renderImage$3(bgColor, logo?.image, { width: '40', height: '45' }), showTitle ? renderTitle$
|
|
2054
|
+
return (jsxs("a", { className: `inline-flex items-center font-sans no-underline ${className}`, href: href || '/', target: targetBlank ? '_blank' : '_self', "aria-label": logo?.title || 'Россельхозбанк', children: [renderImage$3(bgColor, logo?.image, { width: '40', height: '45' }), showTitle ? renderTitle$3(children || logo?.title, bgColor) : null] }));
|
|
2059
2055
|
});
|
|
2060
2056
|
|
|
2061
2057
|
const useSearch = () => {
|
|
@@ -2203,7 +2199,7 @@
|
|
|
2203
2199
|
mini: 276,
|
|
2204
2200
|
};
|
|
2205
2201
|
|
|
2206
|
-
const GalleryCardInner = JSX(({ title, headlineSmallVersion = 'H6', description, additionalDescription, icon, items, button, version, isFullWidth = true, isDotted = true, align = 'center', }) => (jsxs("div", { className: `h-full flex flex-col justify-between ${AlignText[align]}`, children: [jsxs("div", { className: "flex flex-col h-full", children: [renderImage$2(icon, version), renderCardTitle(headlineSmallVersion, title), renderDescription$
|
|
2202
|
+
const GalleryCardInner = JSX(({ title, headlineSmallVersion = 'H6', description, additionalDescription, icon, items, button, version, isFullWidth = true, isDotted = true, align = 'center', }) => (jsxs("div", { className: `h-full flex flex-col justify-between ${AlignText[align]}`, children: [jsxs("div", { className: "flex flex-col h-full", children: [renderImage$2(icon, version), renderCardTitle(headlineSmallVersion, title), renderDescription$3(description, title), items?.length ? renderItems$1(items, isDotted, version) : null, renderAdditionalDescription$1(additionalDescription, version)] }), button?.text
|
|
2207
2203
|
? renderButton({
|
|
2208
2204
|
button,
|
|
2209
2205
|
buttonClassName: `mt-6 ${isFullWidth ? '' : 'self-center'}`,
|
|
@@ -2211,7 +2207,7 @@
|
|
|
2211
2207
|
: null] })));
|
|
2212
2208
|
const renderImage$2 = (image, version) => (jsxs("div", { className: "flex justify-center", children: [image?.src ? jsx(ImgInner, { className: "mb-5", image: image }) : null, image?.icon ? (jsx(ImgInner, { className: `w-8 h-8 min-w-8 mb-5 rounded-full`, image: getIconWithVersion(image, version), asSVG: true })) : null] }));
|
|
2213
2209
|
const renderCardTitle = (headlineSmallVersion, title) => title ? jsx("div", { className: HEADLINE_SMALL_VERSION[headlineSmallVersion], children: title }) : null;
|
|
2214
|
-
const renderDescription$
|
|
2210
|
+
const renderDescription$3 = (description, title) => description ? jsx("div", { className: `text-l ${title ? 'mt-2' : ''}`, children: description }) : null;
|
|
2215
2211
|
const renderAdditionalDescription$1 = (additionalDescription, version) => additionalDescription ? (jsx("div", { className: `text-m-light mt-auto ${VersionAdditionalStyleMap[version ?? 'primary']}`, children: additionalDescription })) : null;
|
|
2216
2212
|
const renderItems$1 = (items, isDotted, version = 'primary') => (jsx(List, { className: `max-w-[308px] mt-2 text-s ${version === 'primary' ? '!text-secondary-text' : ''}`, itemClassName: "text-left", items: items.filter((item) => item?.text).map((item) => item.text), isDotted: isDotted, version: version }));
|
|
2217
2213
|
|
|
@@ -2675,12 +2671,12 @@
|
|
|
2675
2671
|
${getTileMinHeight(className)}
|
|
2676
2672
|
${VersionStyleMap[version]}
|
|
2677
2673
|
${className}`, ...rest, children: [jsxs(BaseTile, { className: "z-10", title: title ? (jsx(Heading, { headingType: headingType, as: "h3", title: title, className: `whitespace-pre-wrap mb-7 w-full
|
|
2678
|
-
${textColorClass} ${AlignText[alignTitle]}` })) : null, buttons: buttons?.length ? (jsx(ButtonSection, { buttons: buttonsWithClass, className: "flex gap-4 mt-8", ...rest })) : null, children: [renderDescription$
|
|
2674
|
+
${textColorClass} ${AlignText[alignTitle]}` })) : null, buttons: buttons?.length ? (jsx(ButtonSection, { buttons: buttonsWithClass, className: "flex gap-4 mt-8", ...rest })) : null, children: [renderDescription$2(description), jsxs("div", { className: "flex flex-1 items-center mb-3", children: [qr?.src ? (jsx("div", { className: `flex justify-center mr-5 bg-white rounded-md ${containerStyle}`, children: jsx(ImgInner, { className: "w-fit", image: qr }) })) : null, renderList$1(version, items)] })] }), image?.src ? (jsx("div", { className: "absolute right-0 bottom-0", children: jsx(ImgInner, { image: image }) })) : null] }));
|
|
2679
2675
|
});
|
|
2680
2676
|
const renderList$1 = (version, items) => {
|
|
2681
2677
|
return items?.length ? (jsx(List, { items: items, itemClassName: "text-l-light mb-2 last:mb-0", version: version })) : (jsx("span", { className: "text-m-light text-secondary-text", children: "\u041D\u0430\u0432\u0435\u0434\u0438\u0442\u0435 \u043A\u0430\u043C\u0435\u0440\u0443 \u0442\u0435\u043B\u0435\u0444\u043E\u043D\u0430 \u043D\u0430 QR-\u043A\u043E\u0434 \u0438 \u0441\u043A\u0430\u0447\u0430\u0439\u0442\u0435 \u043F\u0440\u0438\u043B\u043E\u0436\u0435\u043D\u0438\u0435" }));
|
|
2682
2678
|
};
|
|
2683
|
-
const renderDescription$
|
|
2679
|
+
const renderDescription$2 = (description) => description ? jsx("p", { className: "text-xl-light mb-5 pt-0.5", children: description }) : null;
|
|
2684
2680
|
|
|
2685
2681
|
function renderClusterer(yandexMaps, map, points) {
|
|
2686
2682
|
map.geoObjects.removeAll();
|
|
@@ -3279,26 +3275,53 @@
|
|
|
3279
3275
|
`, children: jsxs("div", { className: "border-0 px-6", children: [jsx("div", { className: `last:pb-0 ${btnTitleClassName}`, children: slide?.title }), jsx("div", { className: `text-secondary-text ${btnDescClassName}`, children: slide?.description })] }) }, String(i)));
|
|
3280
3276
|
}
|
|
3281
3277
|
|
|
3282
|
-
const
|
|
3283
|
-
|
|
3284
|
-
|
|
3285
|
-
// picture width = 242px. Text can overlay picture 20px deep. Outer paddings_x = 36px. 242-36-20 = 186px
|
|
3286
|
-
const BENEFITS_WIDTH = image?.src ? 'max-w-[calc(100%-186px)]' : '100%';
|
|
3287
|
-
return (jsx("div", { className: `z-10 grid grid-cols-[max-content_1fr] auto-rows-auto gap-x-6 gap-y-2.5 items-baseline
|
|
3288
|
-
${BENEFITS_WIDTH}`, children: benefits.length ? benefits.map(renderBenefit(version)) : null }));
|
|
3289
|
-
}
|
|
3290
|
-
const renderBenefit = (version = 'primary') => (benefit, i) => {
|
|
3291
|
-
const { label = '', description = '' } = benefit;
|
|
3292
|
-
return [
|
|
3293
|
-
jsx("div", { className: "text-h6", children: label }, `label-${i}`),
|
|
3294
|
-
jsx("div", { className: `text-m-light ${VersionAdditionalStyleMap[version]}`, children: description }, `desc-${i}`),
|
|
3295
|
-
];
|
|
3278
|
+
const DESCRIPTION_STYLE_MAP = {
|
|
3279
|
+
primary: 'text-secondary-text',
|
|
3280
|
+
secondary: 'text-white',
|
|
3296
3281
|
};
|
|
3297
|
-
function renderAdditionalDescription(additionalDescription, image) {
|
|
3282
|
+
function renderAdditionalDescription(additionalDescription, image, version = 'primary') {
|
|
3283
|
+
if (!additionalDescription) {
|
|
3284
|
+
return null;
|
|
3285
|
+
}
|
|
3298
3286
|
// picture width = 242px. Text can overlay picture 20px deep. Outer paddings_x = 36px. 242-36-20 = 186px
|
|
3299
|
-
const
|
|
3300
|
-
return (jsx("div", { className: `
|
|
3287
|
+
const descriptionWidth = image?.src ? 'max-w-[calc(100%-186px)]' : '100%';
|
|
3288
|
+
return (jsx("div", { className: `mt-2.5 z-10 ${descriptionWidth}`, children: jsx(Paragraph, { size: "text-m", font: "font-light", color: DESCRIPTION_STYLE_MAP[version], children: additionalDescription }) }));
|
|
3289
|
+
}
|
|
3290
|
+
|
|
3291
|
+
const MarkdownText = JSX((props) => {
|
|
3292
|
+
const { md = '' } = props;
|
|
3293
|
+
return jsx("div", { className: "md-container", dangerouslySetInnerHTML: { __html: md } });
|
|
3294
|
+
});
|
|
3295
|
+
|
|
3296
|
+
function assertUnreachable(x) {
|
|
3297
|
+
throw new Error(x);
|
|
3301
3298
|
}
|
|
3299
|
+
|
|
3300
|
+
const LABEL_STYLE_MAP = {
|
|
3301
|
+
primary: 'text-secondary-text',
|
|
3302
|
+
secondary: 'text-white',
|
|
3303
|
+
};
|
|
3304
|
+
const renderBenefit = (version = 'primary') =>
|
|
3305
|
+
// Linter doesn't understand that switch processes all cases
|
|
3306
|
+
// eslint-disable-next-line consistent-return
|
|
3307
|
+
(benefit, i) => {
|
|
3308
|
+
const { type } = benefit;
|
|
3309
|
+
if (!(type === 'default' || type === 'md')) {
|
|
3310
|
+
return null;
|
|
3311
|
+
}
|
|
3312
|
+
switch (type) {
|
|
3313
|
+
case 'default':
|
|
3314
|
+
return [
|
|
3315
|
+
jsx(Text, { size: "text-h6", children: benefit.label }, `label-${i}`),
|
|
3316
|
+
jsx(Text, { size: "text-m-light", color: LABEL_STYLE_MAP[version], children: benefit.description }, `desc-${i}`),
|
|
3317
|
+
];
|
|
3318
|
+
case 'md':
|
|
3319
|
+
return jsx(MarkdownText, { md: benefit.md });
|
|
3320
|
+
default:
|
|
3321
|
+
assertUnreachable(benefit);
|
|
3322
|
+
}
|
|
3323
|
+
};
|
|
3324
|
+
|
|
3302
3325
|
function renderImage$1(image, isImageOnRightSide) {
|
|
3303
3326
|
if (!image?.src) {
|
|
3304
3327
|
return null;
|
|
@@ -3306,6 +3329,18 @@
|
|
|
3306
3329
|
return (jsx(ImgInner, { className: `absolute ${isImageOnRightSide ? 'right-0' : 'left-0'} bottom-0`, image: image }));
|
|
3307
3330
|
}
|
|
3308
3331
|
|
|
3332
|
+
const ProductTile = JSX(({ className = '', title, headlineVersion = 'S', description, additionalDescription, benefits = [], buttons, image, isImageOnRightSide = true, version = 'primary', ...rest }) => (jsxs(BlockWrapper, { className: `overflow-hidden font-sans p-9 box-border relative min-h-[364px]
|
|
3333
|
+
${VersionStyleMap[version]} ${getTileRightPadding(className)} ${className}`, ...rest, children: [jsxs("div", { className: `flex flex-col ${isImageOnRightSide ? '' : 'items-end'}`, children: [jsx(Headline, { className: `!p-0 !bg-transparent z-10 ${title || description ? 'mb-3.5' : ''}`, as: "h2", title: title, description: description, headlineVersion: headlineVersion, bgColorHeadline: version, align: "left", ...rest }), renderBenefits(benefits, version, image), renderAdditionalDescription(additionalDescription, image), buttons?.length ? (jsx(ButtonSection, { buttons: buttons, className: "mt-5 gap-4 z-10 text-l" })) : null] }), renderImage$1(image, isImageOnRightSide)] })));
|
|
3334
|
+
function renderBenefits(benefits, version, image) {
|
|
3335
|
+
if (!benefits.length) {
|
|
3336
|
+
return null;
|
|
3337
|
+
}
|
|
3338
|
+
// picture width = 242px. Text can overlay picture 20px deep. Outer paddings_x = 36px. 242-36-20 = 186px
|
|
3339
|
+
const benefitsWidth = image?.src ? 'max-w-[calc(100%-186px)]' : '100%';
|
|
3340
|
+
return (jsx("div", { className: `z-10 grid grid-cols-[max-content_1fr] auto-rows-auto gap-x-6 gap-y-2.5 items-baseline
|
|
3341
|
+
${benefitsWidth}`, children: benefits.length ? benefits.map(renderBenefit(version)) : null }));
|
|
3342
|
+
}
|
|
3343
|
+
|
|
3309
3344
|
const PromoTile = JSX(({ className = '', title = 'Акции и спецпредложения', date, description, buttons = [], version = 'primary', ...rest }) => (jsx(BlockWrapper, { className: `bg-white text-primary-text font-sans p-9 box-border ${className} ${VersionStyleMap[version]} ${getTileRightPadding(className)} ${getTileMinHeight(className)} `, ...rest, children: jsx(BaseTile, { title: title ? (jsx(Headline, { title: title, className: `!p-0 max-w-[600px]`, headlineVersion: getTileHeadingType(className), bgColorHeadline: version, align: "left", as: "h2", ...rest })) : null, buttons: buttons?.length ? jsx(ButtonSection, { buttons: buttons, className: "flex gap-3" }) : null, children: jsxs("div", { className: "mt-1.5", children: [date ? jsx("div", { className: "text-s mb-2", children: formatDate(date) }) : null, jsx("div", { className: "text-l", children: description })] }) }) })));
|
|
3310
3345
|
function formatDate(date) {
|
|
3311
3346
|
const dateObj = new Date(date);
|
|
@@ -3564,10 +3599,6 @@
|
|
|
3564
3599
|
const renderStepIcon = (styleMap, version) => ({ icon }, i) => (jsx("div", { className: "flex flex-col items-center text-center", children: jsx("div", { className: `h-[100px] w-[100px] min-w-[100px] min-h-[100px] rounded-full p-[26px] box-border z-10 flex justify-center items-center
|
|
3565
3600
|
${styleMap.iconBackground} ${styleMap.title}`, children: checkIsIconRenderable(icon) ? (jsx(ImgInner, { image: getIconWithVersion(icon || {}, version), width: "48", height: "48", asSVG: true })) : (jsx("span", { className: `text-h4 ${styleMap.iconText}`, children: i + 1 })) }) }, String(i)));
|
|
3566
3601
|
|
|
3567
|
-
function assertUnreachable(x) {
|
|
3568
|
-
throw new Error(x);
|
|
3569
|
-
}
|
|
3570
|
-
|
|
3571
3602
|
const LINK_CLASSES = 'h-12 flex-1 flex items-center justify-center cursor-pointer';
|
|
3572
3603
|
const ACTIVE_LINK_CLASSES = 'bg-primary-main';
|
|
3573
3604
|
const INACTIVE_LINK_CLASSES = 'group bg-white';
|
|
@@ -3591,9 +3622,9 @@
|
|
|
3591
3622
|
const count = tab.ref && page?.blocks
|
|
3592
3623
|
? page.blocks.filter((block) => block?.labels?.includes(tab.ref)).length
|
|
3593
3624
|
: 0;
|
|
3594
|
-
return (jsx("div", { className: `${LINK_CLASSES} ${active ? ACTIVE_LINK_CLASSES : INACTIVE_LINK_CLASSES}`, role: "tab", "aria-selected": active, onClick: () => onClick(tab), children: jsxs("div", { className: "flex flex-1 items-center justify-center", children: [tab?.title ? renderTitle$
|
|
3625
|
+
return (jsx("div", { className: `${LINK_CLASSES} ${active ? ACTIVE_LINK_CLASSES : INACTIVE_LINK_CLASSES}`, role: "tab", "aria-selected": active, onClick: () => onClick(tab), children: jsxs("div", { className: "flex flex-1 items-center justify-center", children: [tab?.title ? renderTitle$2(tab.title, active) : null, showCounter && count ? renderCount(count, active) : null] }) }, String(i)));
|
|
3595
3626
|
};
|
|
3596
|
-
const renderTitle$
|
|
3627
|
+
const renderTitle$2 = (title, active) => (jsx("h3", { className: `${TEXT_CLASSES} ${active ? ACTIVE_TEXT_CLASSES : INACTIVE_TEXT_CLASSES}`, children: title }));
|
|
3597
3628
|
const renderCount = (count, active) => (jsx("div", { className: `${BADGE_CLASSES} ${active ? ACTIVE_BADGE_CLASSES : INACTIVE_BADGE_CLASSES}`, children: count }));
|
|
3598
3629
|
|
|
3599
3630
|
const renderTab = ({ page, currentTab, showCounter, onClick }) =>
|
|
@@ -3802,12 +3833,12 @@
|
|
|
3802
3833
|
});
|
|
3803
3834
|
const rows = (rowData || []).map((row, i) => (jsx(TariffsTableRow, { row: row, activeIndex: activeIndex, rowIdx: i, ...rest }, String(i))));
|
|
3804
3835
|
const [visibleRows, hiddenRows] = hiddenRowsNum > 0 ? [rows.slice(0, -hiddenRowsNum), rows.slice(-hiddenRowsNum)] : [rows, []];
|
|
3805
|
-
return (jsxs(BlockWrapper, { className: `bg-white font-sans p-12 overflow-hidden text-primary-text relative ${itemCount > 1 ? 'pr-0' : ''} ${className}`, ...rest, children: [renderTitle({ title, description }), renderDescription(description), hiddenRowsNum > 0 ? (jsx(Foldable, { renderFoldableSection: ({ isUnfolded }) => (jsxs(Wrapper, { controls: controls, children: [visibleRows, jsx(FoldableSection, { isUnfolded: isUnfolded, children: hiddenRows })] })), renderFoldButton: renderDefaultFoldButton })) : (jsx(Wrapper, { controls: controls, children: rows }))] }));
|
|
3836
|
+
return (jsxs(BlockWrapper, { className: `bg-white font-sans p-12 overflow-hidden text-primary-text relative ${itemCount > 1 ? 'pr-0' : ''} ${className}`, ...rest, children: [renderTitle$1({ title, description }), renderDescription$1(description), hiddenRowsNum > 0 ? (jsx(Foldable, { renderFoldableSection: ({ isUnfolded }) => (jsxs(Wrapper, { controls: controls, children: [visibleRows, jsx(FoldableSection, { isUnfolded: isUnfolded, children: hiddenRows })] })), renderFoldButton: renderDefaultFoldButton })) : (jsx(Wrapper, { controls: controls, children: rows }))] }));
|
|
3806
3837
|
});
|
|
3807
|
-
function renderTitle({ title, description }) {
|
|
3838
|
+
function renderTitle$1({ title, description }) {
|
|
3808
3839
|
return title ? (jsx(Heading, { headingType: "h3", className: `text-center ${description ? 'mb-2.5' : 'mb-8'}`, title: title })) : null;
|
|
3809
3840
|
}
|
|
3810
|
-
function renderDescription(description) {
|
|
3841
|
+
function renderDescription$1(description) {
|
|
3811
3842
|
return description ? jsx("div", { className: "mb-9 text-center text-l", children: description }) : null;
|
|
3812
3843
|
}
|
|
3813
3844
|
const Wrapper = JSX(({ children, controls }) => {
|
|
@@ -3819,36 +3850,19 @@
|
|
|
3819
3850
|
})] }), isScrollAvailable ? (jsx("div", { className: "absolute top-0 right-0 bottom-0 w-[84px] bg-opacity-to-white" })) : null] }));
|
|
3820
3851
|
});
|
|
3821
3852
|
|
|
3822
|
-
const
|
|
3823
|
-
primary:
|
|
3824
|
-
|
|
3825
|
-
|
|
3826
|
-
title: 'text-primary-text',
|
|
3827
|
-
description: 'text-secondary-text',
|
|
3828
|
-
},
|
|
3829
|
-
secondary: {
|
|
3830
|
-
background: 'bg-primary-main',
|
|
3831
|
-
icon: 'bg-white text-primary-main',
|
|
3832
|
-
title: 'text-white',
|
|
3833
|
-
description: 'text-white',
|
|
3834
|
-
},
|
|
3835
|
-
'secondary-light': {
|
|
3836
|
-
background: 'bg-primary-main/10',
|
|
3837
|
-
icon: 'bg-primary-main text-white',
|
|
3838
|
-
title: 'text-primary-text',
|
|
3839
|
-
description: 'text-secondary-text',
|
|
3840
|
-
},
|
|
3853
|
+
const textBlockBack = {
|
|
3854
|
+
primary: 'bg-white',
|
|
3855
|
+
secondary: 'bg-primary-main',
|
|
3856
|
+
'secondary-light': 'bg-primary-main/10',
|
|
3841
3857
|
};
|
|
3842
|
-
const TextBlock = JSX(({ title, description, blockVersion = 'primary', iconVersion, image,
|
|
3843
|
-
const
|
|
3844
|
-
return (jsxs(BlockWrapper, { className: `
|
|
3858
|
+
const TextBlock = JSX(({ className = '', title, description, blockVersion = 'primary', iconVersion, image, ...rest }) => {
|
|
3859
|
+
const isSecondaryBlock = blockVersion === 'secondary';
|
|
3860
|
+
return (jsxs(BlockWrapper, { className: `px-9 py-4 flex gap-3 ${textBlockBack[blockVersion]} ${className}`, ...rest, children: [iconVersion === 'small' ? (jsx("div", { className: "mt-1", children: renderIcon(isSecondaryBlock) })) : null, iconVersion === 'big' ? renderImage(image) : null, jsxs("div", { children: [title ? renderTitle(title, isSecondaryBlock) : null, description ? (jsx("div", { className: "mt-1", children: renderDescription(description, isSecondaryBlock) })) : null] })] }));
|
|
3845
3861
|
});
|
|
3846
|
-
|
|
3847
|
-
|
|
3848
|
-
}
|
|
3849
|
-
|
|
3850
|
-
return image?.src ? jsx(ImgInner, { className: "pt-0.5 pr-3", image: image }) : null;
|
|
3851
|
-
}
|
|
3862
|
+
const renderIcon = (isSecondaryBlock) => (jsx("div", { className: `rounded-full h-4 w-4 text-center text-xs-light ${isSecondaryBlock ? 'bg-white text-primary-main' : 'bg-primary-main text-white'}`, children: "i" }));
|
|
3863
|
+
const renderImage = (image) => (image?.src ? jsx(ImgInner, { image: image }) : null);
|
|
3864
|
+
const renderTitle = (title, isSecondaryBlock) => (jsx(Text, { size: "text-l", font: "font-medium", color: isSecondaryBlock ? 'text-white' : 'text-primary-text', children: title }));
|
|
3865
|
+
const renderDescription = (description, isSecondaryBlock) => (jsx(Paragraph, { size: "text-s", color: isSecondaryBlock ? 'text-white' : 'text-secondary-text', children: description }));
|
|
3852
3866
|
|
|
3853
3867
|
const Tags = JSX((props) => {
|
|
3854
3868
|
const { tags, className = '' } = props;
|
|
@@ -4093,7 +4107,7 @@
|
|
|
4093
4107
|
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" }) }));
|
|
4094
4108
|
}
|
|
4095
4109
|
|
|
4096
|
-
const packageVersion = "0.6.
|
|
4110
|
+
const packageVersion = "0.6.43";
|
|
4097
4111
|
|
|
4098
4112
|
exports.Blocks = Blocks;
|
|
4099
4113
|
exports.ContentPage = ContentPage;
|