@redneckz/wildless-cms-uni-blocks 0.3.78 → 0.3.80
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/bundle/bundle.umd.js +13 -13
- package/bundle/bundle.umd.min.js +1 -1
- package/dist/components/Accordion/AccordionItem.js +1 -1
- package/dist/components/Accordion/AccordionItem.js.map +1 -1
- package/dist/components/BenefitsBlock/BenefitsBlock.js +1 -1
- package/dist/components/BenefitsBlock/BenefitsBlock.js.map +1 -1
- package/dist/components/ComparisonTable/TableCell.js +1 -1
- package/dist/components/ComparisonTable/TableCell.js.map +1 -1
- package/dist/components/Footer/Contacts.js +2 -2
- package/dist/components/Footer/Contacts.js.map +1 -1
- package/dist/components/Gallery/GalleryCardInner.js +2 -2
- package/dist/components/Gallery/GalleryCardInner.js.map +1 -1
- package/dist/components/Navigation/Navigation.js +1 -1
- package/dist/components/Navigation/Navigation.js.map +1 -1
- package/dist/components/PictureText/PictureText.js +1 -1
- package/dist/components/PictureText/PictureText.js.map +1 -1
- package/dist/components/ProductBlock/renderBenefit.js +1 -1
- package/dist/components/ProductBlock/renderBenefit.js.map +1 -1
- package/dist/components/StepsBlock/StepsBlock.js +2 -2
- package/dist/components/StepsBlock/StepsBlock.js.map +1 -1
- package/dist/ui-kit/Logo/Logo.js +2 -2
- package/dist/ui-kit/Logo/Logo.js.map +1 -1
- package/lib/common.css +1 -1
- package/lib/components/Accordion/AccordionItem.js +1 -1
- package/lib/components/Accordion/AccordionItem.js.map +1 -1
- package/lib/components/BenefitsBlock/BenefitsBlock.js +1 -1
- package/lib/components/BenefitsBlock/BenefitsBlock.js.map +1 -1
- package/lib/components/ComparisonTable/TableCell.js +1 -1
- package/lib/components/ComparisonTable/TableCell.js.map +1 -1
- package/lib/components/Footer/Contacts.js +2 -2
- package/lib/components/Footer/Contacts.js.map +1 -1
- package/lib/components/Gallery/GalleryCardInner.js +2 -2
- package/lib/components/Gallery/GalleryCardInner.js.map +1 -1
- package/lib/components/Navigation/Navigation.js +1 -1
- package/lib/components/Navigation/Navigation.js.map +1 -1
- package/lib/components/PictureText/PictureText.js +1 -1
- package/lib/components/PictureText/PictureText.js.map +1 -1
- package/lib/components/ProductBlock/renderBenefit.js +1 -1
- package/lib/components/ProductBlock/renderBenefit.js.map +1 -1
- package/lib/components/StepsBlock/StepsBlock.js +2 -2
- package/lib/components/StepsBlock/StepsBlock.js.map +1 -1
- package/lib/ui-kit/Logo/Logo.js +2 -2
- package/lib/ui-kit/Logo/Logo.js.map +1 -1
- package/mobile/bundle/bundle.umd.js +2 -2
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/dist/components/BenefitsBlock/BenefitsBlock.js +1 -1
- package/mobile/dist/components/BenefitsBlock/BenefitsBlock.js.map +1 -1
- package/mobile/dist/components/Footer/Contacts.js +2 -2
- package/mobile/dist/components/Footer/Contacts.js.map +1 -1
- package/mobile/dist/components/Gallery/GalleryCardInner.js +2 -2
- package/mobile/dist/components/Gallery/GalleryCardInner.js.map +1 -1
- package/mobile/dist/components/Navigation/Navigation.js +1 -1
- package/mobile/dist/components/Navigation/Navigation.js.map +1 -1
- package/mobile/dist/components/PictureText/PictureText.js +1 -1
- package/mobile/dist/components/PictureText/PictureText.js.map +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/Footer/Contacts.js +2 -2
- package/mobile/lib/components/Footer/Contacts.js.map +1 -1
- package/mobile/lib/components/Gallery/GalleryCardInner.js +2 -2
- package/mobile/lib/components/Gallery/GalleryCardInner.js.map +1 -1
- package/mobile/lib/components/Navigation/Navigation.js +1 -1
- package/mobile/lib/components/Navigation/Navigation.js.map +1 -1
- package/mobile/lib/components/PictureText/PictureText.js +1 -1
- package/mobile/lib/components/PictureText/PictureText.js.map +1 -1
- package/mobile/src/components/BenefitsBlock/BenefitsBlock.tsx +1 -1
- package/mobile/src/components/Footer/Contacts.tsx +5 -2
- package/mobile/src/components/Gallery/GalleryCardInner.tsx +2 -2
- package/mobile/src/components/Navigation/Navigation.tsx +1 -1
- package/mobile/src/components/PictureText/PictureText.tsx +1 -1
- package/mobile/src/components/StepsBlock/StepsBlock.example.json +6 -1
- package/package.json +1 -1
- package/src/components/Accordion/AccordionItem.tsx +1 -1
- package/src/components/BenefitsBlock/BenefitsBlock.tsx +1 -1
- package/src/components/ComparisonTable/TableCell.tsx +1 -1
- package/src/components/Footer/Contacts.tsx +5 -2
- package/src/components/Gallery/GalleryCardInner.tsx +2 -2
- package/src/components/Navigation/Navigation.tsx +1 -1
- package/src/components/PictureText/PictureText.tsx +1 -1
- package/src/components/ProductBlock/renderBenefit.tsx +1 -1
- package/src/components/StepsBlock/StepsBlock.example.json +6 -1
- package/src/components/StepsBlock/StepsBlock.fixture.tsx +5 -1
- package/src/components/StepsBlock/StepsBlock.tsx +3 -9
- package/src/ui-kit/Logo/Logo.tsx +3 -3
package/bundle/bundle.umd.js
CHANGED
|
@@ -518,7 +518,7 @@
|
|
|
518
518
|
return (jsxs("section", { className: `relative font-sans p-14 ${pictureTextStyleMap[version]} ${className}`, id: anchor, children: [jsx(Heading, { headingType: "h2", className: "text-center", title: title }), jsxs("div", { className: 'flex justify-center mt-9', children: [image?.src && jsx(Img, { className: directionRight ? 'order-2 ml-6' : 'mr-6', image: image }), benefits?.length ? (jsx("div", { className: "flex flex-col", children: benefits.map((_, i) => renderBenefit$2(_, i, version)) })) : null] })] }));
|
|
519
519
|
});
|
|
520
520
|
function renderBenefit$2(benefit, i, version) {
|
|
521
|
-
return (jsxs("div", { className: "flex flex-row mb-8", children: [benefit.icon ? (jsx(Img, { className: "w-[48px] h-[48px] bg-main rounded-full box-border p-[12px]", image: benefit.icon, width: "48", height: "48", asSVG: true })) : null, jsxs("div", { className: "flex gap-1 flex-col h-full ml-5 max-w-[490px]", children: [benefit?.label ? (jsx("div", { className: `font-medium text-xl m-0 ${version === 'primary' ? 'text-primary-text' : ''}`, children: benefit.label })) : null, benefit?.description ? (jsx("div", { className: `font-normal text-sm ${version === 'primary' ? 'text-secondary-text' : ''}`, children: benefit.description })) : null] })] }, String(i)));
|
|
521
|
+
return (jsxs("div", { className: "flex flex-row mb-8", children: [benefit.icon ? (jsx(Img, { className: "w-[48px] h-[48px] bg-main rounded-full box-border p-[12px]", image: benefit.icon, width: "48", height: "48", asSVG: true })) : null, jsxs("div", { className: "flex gap-1 flex-col h-full ml-5 max-w-[490px]", children: [benefit?.label ? (jsx("div", { className: `font-medium text-xl-light m-0 ${version === 'primary' ? 'text-primary-text' : ''}`, children: benefit.label })) : null, benefit?.description ? (jsx("div", { className: `font-normal text-sm ${version === 'primary' ? 'text-secondary-text' : ''}`, children: benefit.description })) : null] })] }, String(i)));
|
|
522
522
|
}
|
|
523
523
|
|
|
524
524
|
const isURL = (href) => href?.includes('//');
|
|
@@ -713,7 +713,7 @@
|
|
|
713
713
|
};
|
|
714
714
|
function renderBenefit$1({ benefit, version = 'primary', benefitsVersion = 'normal' }, i) {
|
|
715
715
|
const isIconWhite = benefitsVersion === 'white' || version === 'secondary';
|
|
716
|
-
return (jsxs("div", { className: "flex gap-4 items-center", children: [benefit.icon ? (jsx(Img, { className: renderBenefitIconBgStyle(version, benefitsVersion), image: { ...benefit?.icon, iconVersion: isIconWhite ? 'white' : 'normal' }, width: "24", height: "24", asSVG: true })) : null, jsxs("div", { className: "flex gap-0.5 flex-col h-full max-w-[149px] min-w-[149px]", children: [jsx("div", { className: `text-xl m-0 ${benefitTitleStyleMap[version]}`, children: benefit.label }), benefit.description ? (jsx("div", { className: `font-light text-m-md ${benefitDescStyleMap[version]}`, children: benefit.description })) : null] })] }, String(i)));
|
|
716
|
+
return (jsxs("div", { className: "flex gap-4 items-center", children: [benefit.icon ? (jsx(Img, { className: renderBenefitIconBgStyle(version, benefitsVersion), image: { ...benefit?.icon, iconVersion: isIconWhite ? 'white' : 'normal' }, width: "24", height: "24", asSVG: true })) : null, jsxs("div", { className: "flex gap-0.5 flex-col h-full max-w-[149px] min-w-[149px]", children: [jsx("div", { className: `text-xl-light m-0 ${benefitTitleStyleMap[version]}`, children: benefit.label }), benefit.description ? (jsx("div", { className: `font-light text-m-md ${benefitDescStyleMap[version]}`, children: benefit.description })) : null] })] }, String(i)));
|
|
717
717
|
}
|
|
718
718
|
function renderBenefitIconBgStyle(version, benefitsVersion) {
|
|
719
719
|
let bgColorStyle = 'bg-primary-main text-black';
|
|
@@ -889,13 +889,13 @@
|
|
|
889
889
|
return (jsx(Button, { className: "mt-6 w-full", appendLeft: button.icon && jsx(Img, { image: button.icon, width: "24px", height: "24px", asSVG: true }), ...button }));
|
|
890
890
|
}
|
|
891
891
|
function renderCardTitle(title, className) {
|
|
892
|
-
return jsx("div", { className: `text-xl m-0 ${className}`, children: title });
|
|
892
|
+
return jsx("div", { className: `text-xl-light m-0 ${className}`, children: title });
|
|
893
893
|
}
|
|
894
894
|
function renderItems(items, isDotted, version = 'primary') {
|
|
895
895
|
return (jsx(List, { className: `max-w-[308px] mt-2 text-sm ${version === 'primary' ? '!text-secondary-text' : ''}`, itemClassName: "mt-1 first:mt-0", items: items.filter((item) => item?.text).map((item) => item.text), isDotted: isDotted, version: version }));
|
|
896
896
|
}
|
|
897
897
|
function getTitleStyle(version) {
|
|
898
|
-
return `text-xl m-0
|
|
898
|
+
return `text-xl-light m-0
|
|
899
899
|
${version !== 'secondary' ? 'text-primary-text' : ''}
|
|
900
900
|
`;
|
|
901
901
|
}
|
|
@@ -1000,7 +1000,7 @@
|
|
|
1000
1000
|
});
|
|
1001
1001
|
return (jsxs("li", { className: "border-0 border-b border-solid border-main-divider last:border-b-0", children: [jsxs("button", { className: `border-none bg-transparent px-0 py-5 flex justify-between text-left w-full font-sans
|
|
1002
1002
|
${hasContent ? 'group cursor-pointer' : ''}
|
|
1003
|
-
`, onClick: handleToggle, children: [jsx("span", { className: `text-xl pr-2.5 font-medium`, children: label }), hasContent ? (jsx(Img, { image: icon, className: "text-primary-main", width: "24", height: "24", asSVG: true })) : null] }), hasContent ? (jsx(AccordionItemInner, { isExpanded: isActive, blocks: blocks, context: context })) : null] }));
|
|
1003
|
+
`, onClick: handleToggle, children: [jsx("span", { className: `text-xl-light pr-2.5 font-medium`, children: label }), hasContent ? (jsx(Img, { image: icon, className: "text-primary-main", width: "24", height: "24", asSVG: true })) : null] }), hasContent ? (jsx(AccordionItemInner, { isExpanded: isActive, blocks: blocks, context: context })) : null] }));
|
|
1004
1004
|
});
|
|
1005
1005
|
|
|
1006
1006
|
const ALIGN_TITLE = {
|
|
@@ -1020,7 +1020,7 @@
|
|
|
1020
1020
|
};
|
|
1021
1021
|
const renderStep = (benefit, i) => {
|
|
1022
1022
|
const description = benefit?.description || undefined;
|
|
1023
|
-
return (jsxs("div", { className: "flex items-center basis-1/2 max-w-[500px] mb-[46px]", children: [benefit?.icon ? (jsx(Img, { className: "h-[70px] w-[70px] min-w-[70px] min-h-[70px] mr-5", image: benefit.icon, width: "70", height: "70" })) : null, jsxs("div", { children: [benefit?.label ? jsx("h3", { className: "font-medium text-xl m-0", children: benefit.label }) : null, renderDescription(description)] })] }, String(i)));
|
|
1023
|
+
return (jsxs("div", { className: "flex items-center basis-1/2 max-w-[500px] mb-[46px]", children: [benefit?.icon ? (jsx(Img, { className: "h-[70px] w-[70px] min-w-[70px] min-h-[70px] mr-5", image: benefit.icon, width: "70", height: "70" })) : null, jsxs("div", { children: [benefit?.label ? jsx("h3", { className: "font-medium text-xl-light m-0", children: benefit.label }) : null, renderDescription(description)] })] }, String(i)));
|
|
1024
1024
|
};
|
|
1025
1025
|
const renderDescription = (description) => {
|
|
1026
1026
|
const benefitType = description ? description?.benefitType : null;
|
|
@@ -1476,7 +1476,7 @@
|
|
|
1476
1476
|
const cellClasses = `mx-7 h-full ${DIVIDER_CLASSES$1} ${isFillGradient && isFirstRow ? 'border-t' : ''} ${!isLastRow ? 'border-solid' : 'border-b-0'}`;
|
|
1477
1477
|
return (jsx("div", { className: cellWrapperClasses, role: "cell", children: jsx("div", { className: cellClasses, children: cell.map((item, i) => renderCellInner$1(item, i, isFillGradient)) }) }));
|
|
1478
1478
|
});
|
|
1479
|
-
const labelStyle = (isFillGradient = false) => `text-xl font-medium m-0 ${isFillGradient ? 'text-white' : ''}`;
|
|
1479
|
+
const labelStyle = (isFillGradient = false) => `text-xl-light font-medium m-0 ${isFillGradient ? 'text-white' : ''}`;
|
|
1480
1480
|
const descriptionStyle = (isFillGradient = false) => `text-sm opacity-80 ${isFillGradient ? 'text-white' : 'text-secondary-text'}`;
|
|
1481
1481
|
const renderCellInner$1 = ({ label, description }, i, isFillGradient) => (jsxs("div", { className: "first:pt-7 pt-6 last:pb-7", children: [label ? jsx("h4", { className: labelStyle(isFillGradient), children: label }) : null, description ? jsx("div", { className: descriptionStyle(isFillGradient), children: description }) : null] }, String(i)));
|
|
1482
1482
|
|
|
@@ -1791,7 +1791,7 @@
|
|
|
1791
1791
|
transparent: 'text-white',
|
|
1792
1792
|
};
|
|
1793
1793
|
const Logo = JSX(({ className = '', href, logo, children = logo?.title, targetBlank, bgColor = 'bg-white', hideTitle, }) => {
|
|
1794
|
-
return (jsxs("a", { className: `inline-flex items-center font-sans no-underline ${className}`, href: href || '
|
|
1794
|
+
return (jsxs("a", { className: `inline-flex items-center font-sans no-underline ${className}`, href: href || '/', target: targetBlank ? '_blank' : '_self', "aria-label": logo?.title || 'Россельхозбанк', children: [logo?.image?.src ? (jsx(Img, { image: logo.image, className: SVG_COLOR[bgColor], width: "40", height: "45", asSVG: true })) : (jsx(SVG, { className: `${SVG_COLOR[bgColor]} w-10`, viewBox: "0 0 40 45", paths: LOGO_PATHS.map((d) => ({ d })) })), hideTitle ? null : renderTitle(children, bgColor, logo?.title)] }));
|
|
1795
1795
|
});
|
|
1796
1796
|
const renderTitle = (children, bgColor, title) => {
|
|
1797
1797
|
const text = children || title || 'Россельхозбанк';
|
|
@@ -1822,9 +1822,9 @@
|
|
|
1822
1822
|
const renderText = (type, text = '') => {
|
|
1823
1823
|
switch (type) {
|
|
1824
1824
|
case 'tel':
|
|
1825
|
-
return (jsx("a", { className: "font-sans text-xl text-primary-text no-underline", href: `tel:${formatTel(text)}`, children: text }));
|
|
1825
|
+
return (jsx("a", { className: "font-sans text-xl-light text-primary-text no-underline", href: `tel:${formatTel(text)}`, children: text }));
|
|
1826
1826
|
case 'email':
|
|
1827
|
-
return (jsx("a", { className: "font-sans text-xl text-primary-text no-underline", href: `mailto:${text}`, children: text }));
|
|
1827
|
+
return (jsx("a", { className: "font-sans text-xl-light text-primary-text no-underline", href: `mailto:${text}`, children: text }));
|
|
1828
1828
|
default:
|
|
1829
1829
|
return jsx("span", { children: text });
|
|
1830
1830
|
}
|
|
@@ -2231,7 +2231,7 @@
|
|
|
2231
2231
|
const router = context.useRouter();
|
|
2232
2232
|
const { handlerDecorator } = context;
|
|
2233
2233
|
const activeButton = findActiveSubItem(router)(buttons);
|
|
2234
|
-
return (jsxs("section", { className: `font-sans text-primary-text rounded-[40px] flex items-center justify-between ${className || ''}`, id: anchor, children: [jsx("h2", { className: "font-medium text-xl m-0", children: title }), buttons?.length ? (jsx("div", { className: "flex rounded-md overflow-hidden bg-white", children: buttons
|
|
2234
|
+
return (jsxs("section", { className: `font-sans text-primary-text rounded-[40px] flex items-center justify-between ${className || ''}`, id: anchor, children: [jsx("h2", { className: "font-medium text-xl-light m-0", children: title }), buttons?.length ? (jsx("div", { className: "flex rounded-md overflow-hidden bg-white", children: buttons
|
|
2235
2235
|
.filter(({ text }) => text)
|
|
2236
2236
|
.map((button, i) => (jsx(NavigationItem, { className: "first:rounded-tl-md first:rounded-bl-md last:rounded-tr-md last:rounded-br-md", isActive: button === activeButton, ...useLink({ router, handlerDecorator }, button) }, String(i)))) })) : null] }));
|
|
2237
2237
|
});
|
|
@@ -2450,13 +2450,13 @@
|
|
|
2450
2450
|
styleMap.background,
|
|
2451
2451
|
styleMap.title,
|
|
2452
2452
|
className,
|
|
2453
|
-
].join(' '), id: anchor, children: [jsx(Heading, { headingType: "h2", className: "max-w-[47rem] text-center", title: title }), steps?.length ? (jsxs("div", { className: `box-border ${title ? 'mt-9' : ''}`, children: [jsx("div", { className: "flex items-center px-[88px]", children: joinList(jsx("div", { className: `h-0.5 w-full bg-secondary-light ${!showLines ? 'opacity-0' : ''}` }))(steps.map(renderStepIcon(styleMap))) }), jsx("div", { className: `flex justify-between ${shortGaps ? 'gap-x-3' : 'gap-x-[101px]'}`, children: steps.map(renderStepTitle(styleMap, Boolean(button?.text))) })] })) : null, button?.text ? (jsx(Button, { className: "
|
|
2453
|
+
].join(' '), id: anchor, children: [jsx(Heading, { headingType: "h2", className: "max-w-[47rem] text-center", title: title }), steps?.length ? (jsxs("div", { className: `box-border ${title ? 'mt-9' : ''}`, children: [jsx("div", { className: "flex items-center px-[88px]", children: joinList(jsx("div", { className: `h-0.5 w-full bg-secondary-light ${!showLines ? 'opacity-0' : ''}` }))(steps.map(renderStepIcon(styleMap))) }), jsx("div", { className: `flex justify-between ${shortGaps ? 'gap-x-3' : 'gap-x-[101px]'}`, children: steps.map(renderStepTitle(styleMap, Boolean(button?.text))) })] })) : null, button?.text ? (jsx(Button, { className: "mt-8 w-full max-w-[240px]", version: "primary", ...button })) : null] }));
|
|
2454
2454
|
});
|
|
2455
2455
|
const renderStepIcon = (styleMap) => ({ icon }, i) => {
|
|
2456
2456
|
return (jsx("div", { className: "flex flex-col items-center text-center relative", children: jsx("div", { className: `h-[100px] w-[100px] min-w-[100px] min-h-[100px] rounded-full p-[26px] box-border z-10 ${styleMap.iconBackground}`, children: checkIsIconRenderable(icon) ? (jsx(Img, { image: icon, width: "48", height: "48", asSVG: true })) : (jsx("span", { className: `font-normal text-title-sm ${styleMap.title}`, children: i + 1 })) }) }, String(i)));
|
|
2457
2457
|
};
|
|
2458
2458
|
const renderStepTitle = (styleMap, isMainButton) => (step, i) => {
|
|
2459
|
-
return (jsxs("div", { className: "flex flex-col items-center justify-between text-center relative w-[276px] whitespace-pre-line overflow-hidden", children: [jsxs("div", { children: [step.label ? jsx("div", { className: "font-normal text-xl m-0 mt-4", children: step.label }) : null, step.description ? (jsx("div", { className: `font-light text-base ${styleMap.description} ${step.label ? 'mt-2' : 'mt-4'}`, children: step.description })) : null] }), step?.button?.text && !isMainButton ? (jsx(Button, { className: "box-border mt-8 py-3 h-12 w-full max-w-[240px]", version: "primary", href: step
|
|
2459
|
+
return (jsxs("div", { className: "flex flex-col items-center justify-between text-center relative w-[276px] whitespace-pre-line overflow-hidden", children: [jsxs("div", { children: [step.label ? jsx("div", { className: "font-normal text-xl-light m-0 mt-4", children: step.label }) : null, step.description ? (jsx("div", { className: `font-light text-base ${styleMap.description} ${step.label ? 'mt-2' : 'mt-4'}`, children: step.description })) : null] }), step?.button?.text && !isMainButton ? (jsx(Button, { className: "box-border mt-8 py-3 h-12 w-full max-w-[240px]", version: "primary", href: step?.button?.href, children: step.button.text })) : null] }, String(i)));
|
|
2460
2460
|
};
|
|
2461
2461
|
|
|
2462
2462
|
const DIVIDER_CLASSES = 'border-main-divider border border-t-0 border-x-0';
|