@redneckz/wildless-cms-uni-blocks 0.6.39 → 0.6.40
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/BlockRenderer/BlockRendererOptions.d.ts +1 -0
- package/bundle/blocks.schema.json +1 -1
- package/bundle/bundle.umd.js +139 -111
- package/bundle/bundle.umd.min.js +1 -1
- package/bundle/components/Carousel/CarouselContent.d.ts +1 -1
- package/bundle/components/CarouselCatalogCard/CarouselCatalogCard.d.ts +7 -0
- package/bundle/components/CarouselCatalogCard/CarouselCatalogCardContent.d.ts +23 -0
- package/bundle/components/CarouselInvestmentCard/CarouselInvestmentCard.d.ts +1 -1
- package/bundle/components/CarouselInvestmentCard/CarouselInvestmentCardContent.d.ts +4 -4
- package/bundle/components/CarouselProductCard/CarouselProductCard.d.ts +5 -0
- package/bundle/components/CarouselProductCard/CarouselProductCardContent.d.ts +49 -0
- package/bundle/components/CarouselProgramsCard/CarouselProgramsCardContent.d.ts +1 -1
- package/bundle/components/VerticalLayout/VerticalLayoutContent.d.ts +4 -0
- package/bundle/model/BlockVersion.d.ts +1 -0
- package/bundle/ui-kit/Button/ButtonSection.d.ts +1 -1
- package/bundle/ui-kit/SwipeListControl/SwipeListContainer.d.ts +1 -1
- package/dist/BlockRenderer/BlockRendererOptions.d.ts +1 -0
- package/dist/BlockRenderer/renderBlock.js +2 -2
- package/dist/BlockRenderer/renderBlock.js.map +1 -1
- package/dist/components/Blocks.js +6 -2
- package/dist/components/Blocks.js.map +1 -1
- package/dist/components/Carousel/Carousel.js +3 -2
- package/dist/components/Carousel/Carousel.js.map +1 -1
- package/dist/components/Carousel/CarouselContent.d.ts +1 -1
- package/dist/components/CarouselCatalogCard/CarouselCatalogCard.d.ts +7 -0
- package/dist/components/CarouselCatalogCard/CarouselCatalogCard.js +17 -0
- package/dist/components/CarouselCatalogCard/CarouselCatalogCard.js.map +1 -0
- package/dist/components/CarouselCatalogCard/CarouselCatalogCardContent.d.ts +23 -0
- package/dist/components/CarouselCatalogCard/CarouselCatalogCardContent.js +2 -0
- package/dist/components/CarouselCatalogCard/CarouselCatalogCardContent.js.map +1 -0
- package/dist/components/CarouselInvestmentCard/CarouselInvestmentCard.d.ts +1 -1
- package/dist/components/CarouselInvestmentCard/CarouselInvestmentCard.js +12 -8
- package/dist/components/CarouselInvestmentCard/CarouselInvestmentCard.js.map +1 -1
- package/dist/components/CarouselInvestmentCard/CarouselInvestmentCardContent.d.ts +4 -4
- package/dist/components/CarouselProductCard/CarouselProductCard.d.ts +5 -0
- package/dist/components/CarouselProductCard/CarouselProductCard.js +32 -0
- package/dist/components/CarouselProductCard/CarouselProductCard.js.map +1 -0
- package/dist/components/CarouselProductCard/CarouselProductCardContent.d.ts +49 -0
- package/dist/components/CarouselProductCard/CarouselProductCardContent.js +2 -0
- package/dist/components/CarouselProductCard/CarouselProductCardContent.js.map +1 -0
- package/dist/components/CarouselProgramsCard/CarouselProgramsCardContent.d.ts +1 -1
- package/dist/components/Gallery/GalleryCardInner.js +3 -2
- package/dist/components/Gallery/GalleryCardInner.js.map +1 -1
- package/dist/components/ProductTile/ProductTile.js +10 -22
- package/dist/components/ProductTile/ProductTile.js.map +1 -1
- package/dist/components/VerticalLayout/VerticalLayout.js +18 -13
- package/dist/components/VerticalLayout/VerticalLayout.js.map +1 -1
- package/dist/components/VerticalLayout/VerticalLayoutContent.d.ts +4 -0
- package/dist/model/BlockVersion.d.ts +1 -0
- package/dist/model/BlockVersion.js +5 -1
- package/dist/model/BlockVersion.js.map +1 -1
- package/dist/ui-kit/Button/ButtonSection.d.ts +1 -1
- package/dist/ui-kit/Button/ButtonSection.js +2 -2
- package/dist/ui-kit/Button/ButtonSection.js.map +1 -1
- package/dist/ui-kit/SwipeListControl/SwipeListContainer.d.ts +1 -1
- package/dist/ui-kit/SwipeListControl/SwipeListContainer.js +1 -1
- package/dist/ui-kit/SwipeListControl/SwipeListContainer.js.map +1 -1
- package/lib/BlockRenderer/BlockRendererOptions.d.ts +1 -0
- package/lib/BlockRenderer/renderBlock.js +2 -2
- package/lib/BlockRenderer/renderBlock.js.map +1 -1
- package/lib/common.css +1 -1
- package/lib/components/Blocks.js +6 -2
- package/lib/components/Blocks.js.map +1 -1
- package/lib/components/Carousel/Carousel.fixture.d.ts +4 -1
- package/lib/components/Carousel/Carousel.js +3 -2
- package/lib/components/Carousel/Carousel.js.map +1 -1
- package/lib/components/Carousel/CarouselContent.d.ts +1 -1
- package/lib/components/CarouselCatalogCard/CarouselCatalogCard.d.ts +7 -0
- package/lib/components/CarouselCatalogCard/CarouselCatalogCard.fixture.d.ts +16 -0
- package/lib/components/CarouselCatalogCard/CarouselCatalogCard.js +15 -0
- package/lib/components/CarouselCatalogCard/CarouselCatalogCard.js.map +1 -0
- package/lib/components/CarouselCatalogCard/CarouselCatalogCardContent.d.ts +23 -0
- package/lib/components/CarouselCatalogCard/CarouselCatalogCardContent.js +2 -0
- package/lib/components/CarouselCatalogCard/CarouselCatalogCardContent.js.map +1 -0
- package/lib/components/CarouselInvestmentCard/CarouselInvestmentCard.d.ts +1 -1
- package/lib/components/CarouselInvestmentCard/CarouselInvestmentCard.js +12 -8
- package/lib/components/CarouselInvestmentCard/CarouselInvestmentCard.js.map +1 -1
- package/lib/components/CarouselInvestmentCard/CarouselInvestmentCardContent.d.ts +4 -4
- package/lib/components/CarouselProductCard/CarouselProductCard.d.ts +5 -0
- package/lib/components/CarouselProductCard/CarouselProductCard.fixture.d.ts +8 -0
- package/lib/components/CarouselProductCard/CarouselProductCard.js +30 -0
- package/lib/components/CarouselProductCard/CarouselProductCard.js.map +1 -0
- package/lib/components/CarouselProductCard/CarouselProductCardContent.d.ts +49 -0
- package/lib/components/CarouselProductCard/CarouselProductCardContent.js +2 -0
- package/lib/components/CarouselProductCard/CarouselProductCardContent.js.map +1 -0
- package/lib/components/CarouselProgramsCard/CarouselProgramsCard.fixture.d.ts +1 -1
- package/lib/components/CarouselProgramsCard/CarouselProgramsCardContent.d.ts +1 -1
- package/lib/components/Gallery/GalleryCardInner.js +3 -2
- package/lib/components/Gallery/GalleryCardInner.js.map +1 -1
- package/lib/components/ProductTile/ProductTile.fixture.d.ts +2 -1
- package/lib/components/ProductTile/ProductTile.js +11 -23
- package/lib/components/ProductTile/ProductTile.js.map +1 -1
- package/lib/components/VerticalLayout/VerticalLayout.fixture.d.ts +2 -1
- package/lib/components/VerticalLayout/VerticalLayout.js +18 -13
- package/lib/components/VerticalLayout/VerticalLayout.js.map +1 -1
- package/lib/components/VerticalLayout/VerticalLayoutContent.d.ts +4 -0
- package/lib/model/BlockVersion.d.ts +1 -0
- package/lib/model/BlockVersion.js +4 -0
- package/lib/model/BlockVersion.js.map +1 -1
- package/lib/ui-kit/Button/ButtonSection.d.ts +1 -1
- package/lib/ui-kit/Button/ButtonSection.js +2 -2
- package/lib/ui-kit/Button/ButtonSection.js.map +1 -1
- package/lib/ui-kit/SwipeListControl/SwipeListContainer.d.ts +1 -1
- package/lib/ui-kit/SwipeListControl/SwipeListContainer.js +1 -1
- package/lib/ui-kit/SwipeListControl/SwipeListContainer.js.map +1 -1
- package/mobile/bundle/BlockRenderer/BlockRendererOptions.d.ts +1 -0
- package/mobile/bundle/bundle.umd.js +6 -6
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/bundle/components/Carousel/CarouselContent.d.ts +1 -1
- package/mobile/bundle/components/CarouselCatalogCard/CarouselCatalogCard.d.ts +7 -0
- package/mobile/bundle/components/CarouselCatalogCard/CarouselCatalogCardContent.d.ts +23 -0
- package/mobile/bundle/components/CarouselInvestmentCard/CarouselInvestmentCard.d.ts +1 -1
- package/mobile/bundle/components/CarouselInvestmentCard/CarouselInvestmentCardContent.d.ts +4 -4
- package/mobile/bundle/components/CarouselProductCard/CarouselProductCard.d.ts +5 -0
- package/mobile/bundle/components/CarouselProductCard/CarouselProductCardContent.d.ts +49 -0
- package/mobile/bundle/components/CarouselProgramsCard/CarouselProgramsCardContent.d.ts +1 -1
- package/mobile/bundle/components/VerticalLayout/VerticalLayoutContent.d.ts +4 -0
- package/mobile/bundle/model/BlockVersion.d.ts +1 -0
- package/mobile/bundle/ui-kit/Button/ButtonSection.d.ts +1 -1
- package/mobile/bundle/ui-kit/SwipeListControl/SwipeListContainer.d.ts +1 -1
- package/mobile/dist/BlockRenderer/BlockRendererOptions.d.ts +1 -0
- package/mobile/dist/BlockRenderer/renderBlock.js +2 -2
- package/mobile/dist/BlockRenderer/renderBlock.js.map +1 -1
- package/mobile/dist/components/Carousel/Carousel.js +3 -2
- package/mobile/dist/components/Carousel/Carousel.js.map +1 -1
- package/mobile/dist/components/Carousel/CarouselContent.d.ts +1 -1
- package/mobile/dist/components/CarouselCatalogCard/CarouselCatalogCard.d.ts +7 -0
- package/mobile/dist/components/CarouselCatalogCard/CarouselCatalogCard.js +17 -0
- package/mobile/dist/components/CarouselCatalogCard/CarouselCatalogCard.js.map +1 -0
- package/mobile/dist/components/CarouselCatalogCard/CarouselCatalogCardContent.d.ts +23 -0
- package/mobile/dist/components/CarouselCatalogCard/CarouselCatalogCardContent.js +2 -0
- package/mobile/dist/components/CarouselCatalogCard/CarouselCatalogCardContent.js.map +1 -0
- package/mobile/dist/components/CarouselInvestmentCard/CarouselInvestmentCard.d.ts +1 -1
- package/mobile/dist/components/CarouselInvestmentCard/CarouselInvestmentCard.js +12 -8
- package/mobile/dist/components/CarouselInvestmentCard/CarouselInvestmentCard.js.map +1 -1
- package/mobile/dist/components/CarouselInvestmentCard/CarouselInvestmentCardContent.d.ts +4 -4
- package/mobile/dist/components/CarouselProductCard/CarouselProductCard.d.ts +5 -0
- package/mobile/dist/components/CarouselProductCard/CarouselProductCard.js +32 -0
- package/mobile/dist/components/CarouselProductCard/CarouselProductCard.js.map +1 -0
- package/mobile/dist/components/CarouselProductCard/CarouselProductCardContent.d.ts +49 -0
- package/mobile/dist/components/CarouselProductCard/CarouselProductCardContent.js +2 -0
- package/mobile/dist/components/CarouselProductCard/CarouselProductCardContent.js.map +1 -0
- package/mobile/dist/components/CarouselProgramsCard/CarouselProgramsCardContent.d.ts +1 -1
- package/mobile/dist/components/Gallery/GalleryCardInner.js +3 -2
- package/mobile/dist/components/Gallery/GalleryCardInner.js.map +1 -1
- package/mobile/dist/components/ProductTile/ProductTile.js +10 -22
- package/mobile/dist/components/ProductTile/ProductTile.js.map +1 -1
- package/mobile/dist/components/VerticalLayout/VerticalLayout.js +18 -13
- package/mobile/dist/components/VerticalLayout/VerticalLayout.js.map +1 -1
- package/mobile/dist/components/VerticalLayout/VerticalLayoutContent.d.ts +4 -0
- package/mobile/dist/model/BlockVersion.d.ts +1 -0
- package/mobile/dist/model/BlockVersion.js +5 -1
- package/mobile/dist/model/BlockVersion.js.map +1 -1
- package/mobile/dist/ui-kit/Button/ButtonSection.d.ts +1 -1
- package/mobile/dist/ui-kit/Button/ButtonSection.js +2 -2
- package/mobile/dist/ui-kit/Button/ButtonSection.js.map +1 -1
- package/mobile/dist/ui-kit/SwipeListControl/SwipeListContainer.d.ts +1 -1
- package/mobile/dist/ui-kit/SwipeListControl/SwipeListContainer.js +1 -1
- package/mobile/dist/ui-kit/SwipeListControl/SwipeListContainer.js.map +1 -1
- package/mobile/lib/BlockRenderer/BlockRendererOptions.d.ts +1 -0
- package/mobile/lib/BlockRenderer/renderBlock.js +2 -2
- package/mobile/lib/BlockRenderer/renderBlock.js.map +1 -1
- package/mobile/lib/components/Carousel/Carousel.js +3 -2
- package/mobile/lib/components/Carousel/Carousel.js.map +1 -1
- package/mobile/lib/components/Carousel/CarouselContent.d.ts +1 -1
- package/mobile/lib/components/CarouselCatalogCard/CarouselCatalogCard.d.ts +7 -0
- package/mobile/lib/components/CarouselCatalogCard/CarouselCatalogCard.js +15 -0
- package/mobile/lib/components/CarouselCatalogCard/CarouselCatalogCard.js.map +1 -0
- package/mobile/lib/components/CarouselCatalogCard/CarouselCatalogCardContent.d.ts +23 -0
- package/mobile/lib/components/CarouselCatalogCard/CarouselCatalogCardContent.js +2 -0
- package/mobile/lib/components/CarouselCatalogCard/CarouselCatalogCardContent.js.map +1 -0
- package/mobile/lib/components/CarouselInvestmentCard/CarouselInvestmentCard.d.ts +1 -1
- package/mobile/lib/components/CarouselInvestmentCard/CarouselInvestmentCard.js +12 -8
- package/mobile/lib/components/CarouselInvestmentCard/CarouselInvestmentCard.js.map +1 -1
- package/mobile/lib/components/CarouselInvestmentCard/CarouselInvestmentCardContent.d.ts +4 -4
- package/mobile/lib/components/CarouselProductCard/CarouselProductCard.d.ts +5 -0
- package/mobile/lib/components/CarouselProductCard/CarouselProductCard.js +30 -0
- package/mobile/lib/components/CarouselProductCard/CarouselProductCard.js.map +1 -0
- package/mobile/lib/components/CarouselProductCard/CarouselProductCardContent.d.ts +49 -0
- package/mobile/lib/components/CarouselProductCard/CarouselProductCardContent.js +2 -0
- package/mobile/lib/components/CarouselProductCard/CarouselProductCardContent.js.map +1 -0
- package/mobile/lib/components/CarouselProgramsCard/CarouselProgramsCardContent.d.ts +1 -1
- package/mobile/lib/components/Gallery/GalleryCardInner.js +3 -2
- package/mobile/lib/components/Gallery/GalleryCardInner.js.map +1 -1
- package/mobile/lib/components/ProductTile/ProductTile.js +11 -23
- package/mobile/lib/components/ProductTile/ProductTile.js.map +1 -1
- package/mobile/lib/components/VerticalLayout/VerticalLayout.js +18 -13
- package/mobile/lib/components/VerticalLayout/VerticalLayout.js.map +1 -1
- package/mobile/lib/components/VerticalLayout/VerticalLayoutContent.d.ts +4 -0
- package/mobile/lib/model/BlockVersion.d.ts +1 -0
- package/mobile/lib/model/BlockVersion.js +4 -0
- package/mobile/lib/model/BlockVersion.js.map +1 -1
- package/mobile/lib/ui-kit/Button/ButtonSection.d.ts +1 -1
- package/mobile/lib/ui-kit/Button/ButtonSection.js +2 -2
- package/mobile/lib/ui-kit/Button/ButtonSection.js.map +1 -1
- package/mobile/lib/ui-kit/SwipeListControl/SwipeListContainer.d.ts +1 -1
- package/mobile/lib/ui-kit/SwipeListControl/SwipeListContainer.js +1 -1
- package/mobile/lib/ui-kit/SwipeListControl/SwipeListContainer.js.map +1 -1
- package/mobile/src/BlockRenderer/BlockRendererOptions.ts +1 -0
- package/mobile/src/BlockRenderer/renderBlock.tsx +2 -1
- package/mobile/src/components/Carousel/Carousel.example.json +0 -1
- package/mobile/src/components/Carousel/Carousel.tsx +21 -18
- package/mobile/src/components/Carousel/CarouselContent.ts +1 -1
- package/mobile/src/components/CarouselCatalogCard/CarouselCatalogCard.example.json +17 -0
- package/mobile/src/components/CarouselCatalogCard/CarouselCatalogCard.tsx +62 -0
- package/mobile/src/components/CarouselCatalogCard/CarouselCatalogCard.ui.json +10 -0
- package/mobile/src/components/CarouselCatalogCard/CarouselCatalogCardContent.ts +25 -0
- package/mobile/src/components/CarouselInvestmentCard/CarouselInvestmentCard.tsx +33 -14
- package/mobile/src/components/CarouselInvestmentCard/CarouselInvestmentCardContent.ts +5 -5
- package/mobile/src/components/CarouselProductCard/CarouselProductCard.example.json +21 -0
- package/mobile/src/components/CarouselProductCard/CarouselProductCard.tsx +102 -0
- package/mobile/src/components/CarouselProductCard/CarouselProductCard.ui.json +18 -0
- package/mobile/src/components/CarouselProductCard/CarouselProductCardContent.ts +51 -0
- package/mobile/src/components/CarouselProgramsCard/CarouselProgramsCardContent.ts +1 -1
- package/mobile/src/components/ContactsBlock/ContactsBlock.example.json +1 -1
- package/mobile/src/components/Gallery/GalleryCardInner.tsx +6 -3
- package/mobile/src/components/ProductTile/ProductTile.tsx +8 -26
- package/mobile/src/components/VerticalLayout/VerticalLayout.example.json +7 -4
- package/mobile/src/components/VerticalLayout/VerticalLayout.tsx +35 -20
- package/mobile/src/components/VerticalLayout/VerticalLayoutContent.ts +4 -0
- package/mobile/src/model/BlockVersion.ts +5 -0
- package/mobile/src/ui-kit/Button/ButtonSection.tsx +4 -4
- package/mobile/src/ui-kit/SwipeListControl/SwipeListContainer.tsx +2 -2
- package/package.json +1 -1
- package/src/BlockRenderer/BlockRendererOptions.ts +1 -0
- package/src/BlockRenderer/renderBlock.tsx +2 -1
- package/src/components/Blocks.ts +6 -2
- package/src/components/Carousel/Carousel.example.json +0 -1
- package/src/components/Carousel/Carousel.fixture.tsx +64 -4
- package/src/components/Carousel/Carousel.tsx +21 -18
- package/src/components/Carousel/CarouselContent.ts +1 -1
- package/src/components/CarouselCatalogCard/CarouselCatalogCard.example.json +17 -0
- package/src/components/CarouselCatalogCard/CarouselCatalogCard.fixture.tsx +43 -0
- package/src/components/CarouselCatalogCard/CarouselCatalogCard.tsx +62 -0
- package/src/components/CarouselCatalogCard/CarouselCatalogCard.ui.json +10 -0
- package/src/components/CarouselCatalogCard/CarouselCatalogCardContent.ts +25 -0
- package/src/components/CarouselInvestmentCard/CarouselInvestmentCard.tsx +33 -14
- package/src/components/CarouselInvestmentCard/CarouselInvestmentCardContent.ts +5 -5
- package/src/components/CarouselProductCard/CarouselProductCard.example.json +21 -0
- package/src/components/CarouselProductCard/CarouselProductCard.fixture.tsx +62 -0
- package/src/components/CarouselProductCard/CarouselProductCard.tsx +102 -0
- package/src/components/CarouselProductCard/CarouselProductCard.ui.json +18 -0
- package/src/components/CarouselProductCard/CarouselProductCardContent.ts +51 -0
- package/src/components/CarouselProgramsCard/CarouselProgramsCard.fixture.tsx +1 -1
- package/src/components/CarouselProgramsCard/CarouselProgramsCardContent.ts +1 -1
- package/src/components/ContactsBlock/ContactsBlock.example.json +1 -1
- package/src/components/Gallery/GalleryCardInner.tsx +6 -3
- package/src/components/ProductTile/ProductTile.fixture.tsx +2 -1
- package/src/components/ProductTile/ProductTile.tsx +8 -26
- package/src/components/VerticalLayout/VerticalLayout.example.json +7 -4
- package/src/components/VerticalLayout/VerticalLayout.fixture.tsx +59 -2
- package/src/components/VerticalLayout/VerticalLayout.tsx +35 -20
- package/src/components/VerticalLayout/VerticalLayoutContent.ts +4 -0
- package/src/model/BlockVersion.ts +5 -0
- package/src/ui-kit/Button/ButtonSection.tsx +4 -4
- package/src/ui-kit/SwipeListControl/SwipeListContainer.tsx +2 -2
package/bundle/bundle.umd.js
CHANGED
|
@@ -242,14 +242,14 @@
|
|
|
242
242
|
const DEFAULT_ANCESTORS = [];
|
|
243
243
|
const DEFAULT_STYLE = ['col-span-12'];
|
|
244
244
|
function renderBlock(block, options) {
|
|
245
|
-
const { key, blockDecorator = defaultBlockDecorator, blocksRegistry = {}, ancestors = DEFAULT_ANCESTORS, } = options;
|
|
245
|
+
const { key, blockDecorator = defaultBlockDecorator, blocksRegistry = {}, ancestors = DEFAULT_ANCESTORS, className = '', } = options;
|
|
246
246
|
const { type } = block;
|
|
247
247
|
if (!(type && type in blocksRegistry)) {
|
|
248
248
|
console.warn(`No block with "${type}" is registered`);
|
|
249
249
|
}
|
|
250
250
|
const BlockComponent = type && blocksRegistry[type];
|
|
251
251
|
return blockDecorator({
|
|
252
|
-
blockClassName: `scroll-mt-12 ${style2className(block.style || DEFAULT_STYLE)}`,
|
|
252
|
+
blockClassName: `scroll-mt-12 ${className} ${style2className(block.style || DEFAULT_STYLE)}`,
|
|
253
253
|
block,
|
|
254
254
|
ancestors,
|
|
255
255
|
// Adjusted by decorator block and blockClassName
|
|
@@ -534,6 +534,10 @@
|
|
|
534
534
|
primary: 'bg-white text-primary-text',
|
|
535
535
|
secondary: 'bg-primary-main text-white',
|
|
536
536
|
};
|
|
537
|
+
const VersionAdditionalStyleMap = {
|
|
538
|
+
primary: 'text-secondary-text',
|
|
539
|
+
secondary: 'text-white',
|
|
540
|
+
};
|
|
537
541
|
|
|
538
542
|
const getIconWithVersion = (icon, version = 'primary') => ({
|
|
539
543
|
...icon,
|
|
@@ -555,9 +559,9 @@
|
|
|
555
559
|
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] })));
|
|
556
560
|
const renderStep = (version) => (benefit, i) => {
|
|
557
561
|
const description = benefit.description;
|
|
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$
|
|
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$4(description, version)] })] }, String(i)));
|
|
559
563
|
};
|
|
560
|
-
const renderDescription$
|
|
564
|
+
const renderDescription$4 = (description, version) => {
|
|
561
565
|
const benefitType = description?.benefitType || null;
|
|
562
566
|
return description && benefitType ? (jsx("div", { className: `text-l-light mt-2 ${benefitsDescriptionStyleMap[version]}`, children: benefitType === 'list'
|
|
563
567
|
? renderListBenefit(description)
|
|
@@ -734,11 +738,11 @@
|
|
|
734
738
|
|
|
735
739
|
const ButtonSection = JSX(({ className = '', buttons }) => buttons && buttons?.length ? (jsx("div", { className: className, children: buttons.map((button, index) => renderButton({ button, index })) })) : null);
|
|
736
740
|
function renderButton({ button, buttonClassName, index }) {
|
|
737
|
-
const { icon, iconRight, version, ...rest } = button;
|
|
741
|
+
const { icon, iconRight, version, text, ...rest } = button;
|
|
738
742
|
const iconVersion = version === 'secondary' ? 'color' : 'white';
|
|
739
743
|
const leftIcon = renderButtonIcon({ ...icon, iconVersion: iconVersion });
|
|
740
744
|
const rightIcon = renderButtonIcon({ ...iconRight, iconVersion: iconVersion });
|
|
741
|
-
return (jsx(Button, { className: buttonClassName, appendLeft: leftIcon, appendRight: rightIcon, version: version, ...rest }, index ? String(index) : ''));
|
|
745
|
+
return text ? (jsx(Button, { className: buttonClassName, appendLeft: leftIcon, appendRight: rightIcon, version: version, text: text, ...rest }, index ? String(index) : '')) : null;
|
|
742
746
|
}
|
|
743
747
|
const renderButtonIcon = (icon) => {
|
|
744
748
|
if (!icon?.icon && !icon?.src) {
|
|
@@ -1434,7 +1438,7 @@
|
|
|
1434
1438
|
return (jsx("div", { className: `inline-block snap-always box-border ${className}`, style: style, role: "listitem", "aria-current": Boolean(idx === activeIndex), ref: ref, children: children }));
|
|
1435
1439
|
});
|
|
1436
1440
|
|
|
1437
|
-
const childStyleMap = ['min-w-[100%]', 'min-w-[50%]', 'min-w-[33.33%]'];
|
|
1441
|
+
const childStyleMap = ['min-w-[100%]', 'min-w-[50%]', 'min-w-[33.33%]', 'min-w-[25%]'];
|
|
1438
1442
|
const SwipeListContainer = JSX(({ className = '', containerRef, activeIndex, visibleItemCount, gap = 0, padding = 0, snapAlign = 'snap-center', children, onVisibleItemsChange, onVisibleIndicesChange, }) => {
|
|
1439
1443
|
const observerOptions = {
|
|
1440
1444
|
sensitivity: 1,
|
|
@@ -1539,12 +1543,13 @@
|
|
|
1539
1543
|
itemCount: count,
|
|
1540
1544
|
isCyclic,
|
|
1541
1545
|
});
|
|
1542
|
-
return (
|
|
1546
|
+
return (jsx(BlockWrapper, { className: `font-sans p-12 ${className}`, ...rest, children: jsxs("div", { className: "relative max-w-full", children: [jsx(SwipeListContainer, { containerRef: containerRef, visibleItemCount: visibleItemCount, snapAlign: "snap-start", gap: ITEMS_GAP, onVisibleIndicesChange: scroll.handleVisibleIndicesChange, children: renderChildren(rest) }), (scroll.canScrollLeft || scroll.canScrollRight) && isBlur ? (jsxs("div", { children: [jsx("div", { className: `${blurBaseStyle} left-0 bg-opacity-from-white` }), jsx("div", { className: `${blurBaseStyle} right-0 bg-opacity-to-white` })] })) : null, renderScrollButtons(scroll)] }) }));
|
|
1543
1547
|
});
|
|
1544
1548
|
Carousel.childrenTypes = [
|
|
1545
1549
|
'CarouselCard',
|
|
1550
|
+
'CarouselCatalogCard',
|
|
1546
1551
|
'CarouselTariffsCard',
|
|
1547
|
-
'
|
|
1552
|
+
'CarouselProductCard',
|
|
1548
1553
|
'CarouselProgramsCard',
|
|
1549
1554
|
'CarouselInvestmentCard',
|
|
1550
1555
|
];
|
|
@@ -1557,6 +1562,41 @@
|
|
|
1557
1562
|
};
|
|
1558
1563
|
const CarouselCard = JSX(({ className = '', button, description, title, version = 'normal' }) => (jsx("section", { className: `flex pb-9 pl-12 ${CARD_WIDTH_MAP[version]} ${className}`, children: jsxs("div", { className: "relative w-full", children: [jsx("div", { className: `${BLOCK_CLASSES} z-10 top-9 right-12 bg-green-dark` }), jsx("div", { className: `${BLOCK_CLASSES} z-10 top-6 right-8 bg-green` }), jsx("div", { className: `${BLOCK_CLASSES} z-10 top-3 right-4 bg-green-light` }), jsxs("div", { className: "relative bg-white z-10 py-6 px-10 border border-solid border-green-light", children: [jsx(Headline, { className: "!p-0", title: title, description: description, headlineVersion: "M", align: "center" }), button ? jsx("div", { className: "mt-6", children: renderButton({ button }) }) : null] })] }) })));
|
|
1559
1564
|
|
|
1565
|
+
const cardStyleMap$2 = {
|
|
1566
|
+
black: 'bg-black',
|
|
1567
|
+
white: 'bg-white',
|
|
1568
|
+
};
|
|
1569
|
+
const CarouselCatalogCard = JSX(({ className = '', title, description, image, price, button, colors, version = 'primary' }) => (jsxs("section", { className: `border box-border border-main-stroke p-7 min-w-[392px] flex flex-col justify-left ${VersionStyleMap[version]} ${className}`, role: "listitem", children: [image?.src ? jsx(ImgInner, { className: "mb-5 flex justify-center", image: image }) : null, title ? (jsx(Heading, { headingType: "h6", as: "h4", className: "text-left mb-1.5", title: title })) : null, description ? (jsx("div", { className: "mb-4", children: jsx(Paragraph, { size: "text-m", align: "text-left", font: "font-light", children: description }) })) : null, colors?.length ? (jsxs("div", { className: "flex mb-4 text-s-light text-secondary-text", children: [jsx("div", { className: "mr-1.5", children: jsx(Text, { children: "\u0414\u043E\u0441\u0442\u0443\u043F\u043D\u044B\u0435 \u0446\u0432\u0435\u0442\u0430: " }) }), colors.map(renderColorOption$1)] })) : null, price ? (jsxs(Text, { size: "text-h3", align: "text-left", children: [price, "\u00A0\u20BD"] })) : null, button ? renderButton({ button, buttonClassName: 'mt-5 w-full' }) : null] })));
|
|
1570
|
+
const renderColorOption$1 = (color, i) => (jsx("span", { className: `w-6 h-6 ml-3 border border-solid border-main-divider rounded-full ${cardStyleMap$2[color]}` }, String(i)));
|
|
1571
|
+
|
|
1572
|
+
const BorderVersionStyleMap = {
|
|
1573
|
+
primary: 'border-main-stroke',
|
|
1574
|
+
secondary: 'border-white/50',
|
|
1575
|
+
};
|
|
1576
|
+
|
|
1577
|
+
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] })] })));
|
|
1578
|
+
|
|
1579
|
+
const getItemListFontSize = (colValue) => (colValue === 1 ? 'text-h6' : 'text-l');
|
|
1580
|
+
const cardColumnsModeStyleMap = {
|
|
1581
|
+
1: 'flex gap-y-2 flex-col',
|
|
1582
|
+
2: 'flex gap-y-2 gap-x-10 flex-wrap',
|
|
1583
|
+
};
|
|
1584
|
+
const CarouselInvestmentCard = JSX(({ additionalDescription, cardsList = [], className = '', columnsMode = 1, description, image, title, version = 'primary', ...rest }) => {
|
|
1585
|
+
const tileTitle = title ? (jsx(Heading, { headingType: "h4", as: "h3", className: "mb-3.5 z-10", title: title })) : null;
|
|
1586
|
+
const tileImage = image?.src ? (jsx(ImgInner, { className: "absolute bottom-0 right-0 m-0", image: image })) : null;
|
|
1587
|
+
return (jsx(BlockWrapper, { className: [
|
|
1588
|
+
'relative text-left border border-solid box-border p-9 w-[697px]',
|
|
1589
|
+
VersionStyleMap[version],
|
|
1590
|
+
BorderVersionStyleMap[version],
|
|
1591
|
+
className,
|
|
1592
|
+
].join(' '), ...rest, children: jsxs(BaseTile, { title: tileTitle, image: tileImage, children: [jsxs("div", { className: "flex justify-between mb-4", children: [description ? (jsx("div", { className: "w-1/3", children: jsx(Text, { size: "text-h6", children: description }) })) : null, additionalDescription ? (jsx(Text, { size: "text-m", font: "font-light", color: VersionAdditionalStyleMap[version], children: additionalDescription })) : null] }), cardsList.length ? (jsx("ul", { className: `list-none m-0 p-0 ${cardColumnsModeStyleMap[columnsMode]}`, children: renderCardList(cardsList, columnsMode) })) : null] }) }));
|
|
1593
|
+
});
|
|
1594
|
+
const renderCardList = (cardsList, columnsMode) => {
|
|
1595
|
+
const CARDS_COUNT_MAP = [4, 9];
|
|
1596
|
+
const visibleCardsList = cardsList.slice(0, CARDS_COUNT_MAP[columnsMode - 1]);
|
|
1597
|
+
return visibleCardsList.map((item, i) => (jsxs("li", { className: columnsMode === 2 ? 'basis-[calc(50%-20px)]' : '', children: [item?.parameter ? (jsx("div", { className: "pr-2.5", children: jsx(Text, { size: getItemListFontSize(columnsMode), children: item.parameter }) })) : null, item?.parameterDescription ? (jsx(Text, { size: "text-m", font: "font-light", color: "text-secondary-text", children: item.parameterDescription })) : null] }, String(i))));
|
|
1598
|
+
};
|
|
1599
|
+
|
|
1560
1600
|
const LINK_CLASS_NAME = `absolute border border-primary-main ml-3 px-6 py-5
|
|
1561
1601
|
text-l-light bg-white text-primary-text flex w-[316px]
|
|
1562
1602
|
justify-between items-center group-hover:text-primary-main z-10`;
|
|
@@ -1579,6 +1619,62 @@
|
|
|
1579
1619
|
.map((link, index) => (jsx(LinkButton, { className: "m-1", ...link }, String(index)))) }, String(groupIndex)))) }));
|
|
1580
1620
|
};
|
|
1581
1621
|
|
|
1622
|
+
const LIST_DOT_STYLE_MAP = {
|
|
1623
|
+
primary: 'bg-primary-text',
|
|
1624
|
+
secondary: 'bg-white',
|
|
1625
|
+
gray: 'bg-secondary-text',
|
|
1626
|
+
};
|
|
1627
|
+
const DOT_SIZE_MAP = {
|
|
1628
|
+
L: 'w-1.5 h-1.5 min-w-1.5 min-h-1.5 mr-4',
|
|
1629
|
+
M: 'w-1.5 h-1.5 min-w-1.5 min-h-1.5 mr-3',
|
|
1630
|
+
S: 'w-1 h-1 min-w-1 min-h-1 mr-2',
|
|
1631
|
+
};
|
|
1632
|
+
const ListItem = JSX(({ className = '', isDotted = true, children, version = 'primary', size = 'M' }) => {
|
|
1633
|
+
return (jsxs("div", { className: `font-sans flex items-baseline ${className}`, role: "listitem", children: [isDotted ? (jsx("div", { children: jsx("div", { className: `rounded-full align-middle inline-block ${LIST_DOT_STYLE_MAP[version]} ${DOT_SIZE_MAP[size]}` }) })) : null, jsx("span", { children: children })] }));
|
|
1634
|
+
});
|
|
1635
|
+
|
|
1636
|
+
const TEXT_STYLE_MAP = {
|
|
1637
|
+
primary: 'text-primary-text',
|
|
1638
|
+
secondary: 'text-white',
|
|
1639
|
+
gray: 'text-secondary-text',
|
|
1640
|
+
};
|
|
1641
|
+
const TEXT_SIZE_MAP = {
|
|
1642
|
+
S: 'text-l-light',
|
|
1643
|
+
M: 'text-h6',
|
|
1644
|
+
L: 'text-h5',
|
|
1645
|
+
};
|
|
1646
|
+
const ITEM_INDENT_MAP = {
|
|
1647
|
+
S: 'ml-2',
|
|
1648
|
+
M: 'ml-3',
|
|
1649
|
+
L: 'ml-4',
|
|
1650
|
+
};
|
|
1651
|
+
const List = JSX((props) => {
|
|
1652
|
+
const { className = '', hasIndent, isDotted, itemClassName = '', items, listItemSize = 'M', version = 'primary', } = props;
|
|
1653
|
+
if (!items?.length) {
|
|
1654
|
+
return null;
|
|
1655
|
+
}
|
|
1656
|
+
return (jsx("section", { className: `${TEXT_STYLE_MAP[version]} ${TEXT_SIZE_MAP[listItemSize]} ${className} ${hasIndent ? ITEM_INDENT_MAP[listItemSize] : ''}`, role: "list", children: items.map((item, i) => (jsx(ListItem, { className: `${itemClassName} mb-1.5`, isDotted: isDotted, version: version, size: listItemSize, children: item }, String(i)))) }));
|
|
1657
|
+
});
|
|
1658
|
+
|
|
1659
|
+
const descriptionStyleMap = {
|
|
1660
|
+
primary: 'text-secondary-text',
|
|
1661
|
+
secondary: 'text-white/80',
|
|
1662
|
+
};
|
|
1663
|
+
const BORDER_STYLE = 'box-border border-solid border border-main-stroke ';
|
|
1664
|
+
const CarouselProductCard = JSX(({ title, headlineSmallVersion = 'H6', description, additionalDescription, icon, items = [], button = {}, version = 'primary', isDotted = true, align = 'center', }) => {
|
|
1665
|
+
return (jsxs("section", { className: [
|
|
1666
|
+
'flex flex-col justify-between items-stretch min-w-[260px] h-full w-full p-6',
|
|
1667
|
+
BORDER_STYLE,
|
|
1668
|
+
AlignText[align],
|
|
1669
|
+
VersionStyleMap[version],
|
|
1670
|
+
].join(' '), role: "listitem", children: [jsxs("div", { className: "flex flex-col h-full", children: [renderImage$2(icon, version), renderCardTitle$1(headlineSmallVersion, title), renderDescription$3(description, title), renderItems$2(items, isDotted, version), renderAdditionalDescription$2(additionalDescription, version)] }), renderButton({ button, buttonClassName: 'mt-6' })] }));
|
|
1671
|
+
});
|
|
1672
|
+
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-[32px] h-[32px] min-w-[32px] mb-5 rounded-full`, image: getIconWithVersion(image, version), asSVG: true })) : null] }));
|
|
1673
|
+
const renderCardTitle$1 = (headlineSmallVersion, title) => title ? jsx(Text, { size: HEADLINE_SMALL_VERSION[headlineSmallVersion], children: title }) : null;
|
|
1674
|
+
const renderDescription$3 = (description, title) => description ? (jsx("div", { className: title ? 'mt-2' : '', children: jsx(Paragraph, { size: "text-l", children: description }) })) : null;
|
|
1675
|
+
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;
|
|
1676
|
+
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;
|
|
1677
|
+
|
|
1582
1678
|
const CarouselProgramsCard = JSX(({ className = '', title, icon, list = [], version = 'primary', ...rest }) => (jsxs(BlockWrapper, { className: `font-sans border border-main-stroke flex min-w-[536px] ${VersionStyleMap[version]} ${className}`, ...rest, children: [jsxs("div", { className: "w-[200px] min-w-[200px] self-end", children: [icon?.icon ? jsx(ImgInner, { image: getIconWithVersion(icon), asSVG: true }) : null, icon?.src ? jsx(ImgInner, { image: icon }) : null] }), jsxs("div", { className: "p-8 pl-3 w-full", children: [title ? jsx(Heading, { className: " mb-3.5", headingType: "h5", title: title }) : null, list.length ? jsx("div", { className: "flex flex-col gap-3", children: list?.map(renderList$2) }) : null] })] })));
|
|
1583
1679
|
const renderList$2 = (_, i) => (jsxs("div", { className: "break-words", children: [_.title ? jsx("div", { className: `text-h6`, children: _.title }) : null, _.description ? jsx("span", { className: "text-l-light mt-1", children: _.description }) : null] }, String(i)));
|
|
1584
1680
|
|
|
@@ -1702,8 +1798,6 @@
|
|
|
1702
1798
|
};
|
|
1703
1799
|
const ErrorBlock = JSX(({ className = '', title, subtitle, error, button }) => (jsxs("section", { className: `flex flex-col justify-center items-center mt-12 ${className}`, children: [jsx("div", { className: "flex justify-center py-20", children: renderErrorContent(error) }), title ? jsx(Heading, { headingType: "h1", className: "text-left mb-4", title: title }) : null, subtitle ? (jsx("div", { className: "font-sans text-xl-light mb-7 max-w-[613px] text-center", children: subtitle })) : null, button?.text ? (jsx(Button, { className: "py-4 px-9", version: button?.version, ...button, children: button.text })) : null] })));
|
|
1704
1800
|
|
|
1705
|
-
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] })] })));
|
|
1706
|
-
|
|
1707
1801
|
var Currency;
|
|
1708
1802
|
(function (Currency) {
|
|
1709
1803
|
Currency["RUB"] = "RUB";
|
|
@@ -2096,44 +2190,7 @@
|
|
|
2096
2190
|
mini: 276,
|
|
2097
2191
|
};
|
|
2098
2192
|
|
|
2099
|
-
const
|
|
2100
|
-
primary: 'bg-primary-text',
|
|
2101
|
-
secondary: 'bg-white',
|
|
2102
|
-
gray: 'bg-secondary-text',
|
|
2103
|
-
};
|
|
2104
|
-
const DOT_SIZE_MAP = {
|
|
2105
|
-
L: 'w-1.5 h-1.5 min-w-1.5 min-h-1.5 mr-4',
|
|
2106
|
-
M: 'w-1.5 h-1.5 min-w-1.5 min-h-1.5 mr-3',
|
|
2107
|
-
S: 'w-1 h-1 min-w-1 min-h-1 mr-2',
|
|
2108
|
-
};
|
|
2109
|
-
const ListItem = JSX(({ className = '', isDotted = true, children, version = 'primary', size = 'M' }) => {
|
|
2110
|
-
return (jsxs("div", { className: `font-sans flex items-baseline ${className}`, role: "listitem", children: [isDotted ? (jsx("div", { children: jsx("div", { className: `rounded-full align-middle inline-block ${LIST_DOT_STYLE_MAP[version]} ${DOT_SIZE_MAP[size]}` }) })) : null, jsx("span", { children: children })] }));
|
|
2111
|
-
});
|
|
2112
|
-
|
|
2113
|
-
const TEXT_STYLE_MAP = {
|
|
2114
|
-
primary: 'text-primary-text',
|
|
2115
|
-
secondary: 'text-white',
|
|
2116
|
-
gray: 'text-secondary-text',
|
|
2117
|
-
};
|
|
2118
|
-
const TEXT_SIZE_MAP = {
|
|
2119
|
-
S: 'text-l-light',
|
|
2120
|
-
M: 'text-h6',
|
|
2121
|
-
L: 'text-h5',
|
|
2122
|
-
};
|
|
2123
|
-
const ITEM_INDENT_MAP = {
|
|
2124
|
-
S: 'ml-2',
|
|
2125
|
-
M: 'ml-3',
|
|
2126
|
-
L: 'ml-4',
|
|
2127
|
-
};
|
|
2128
|
-
const List = JSX((props) => {
|
|
2129
|
-
const { className = '', hasIndent, isDotted, itemClassName = '', items, listItemSize = 'M', version = 'primary', } = props;
|
|
2130
|
-
if (!items?.length) {
|
|
2131
|
-
return null;
|
|
2132
|
-
}
|
|
2133
|
-
return (jsx("section", { className: `${TEXT_STYLE_MAP[version]} ${TEXT_SIZE_MAP[listItemSize]} ${className} ${hasIndent ? ITEM_INDENT_MAP[listItemSize] : ''}`, role: "list", children: items.map((item, i) => (jsx(ListItem, { className: `${itemClassName} mb-1.5`, isDotted: isDotted, version: version, size: listItemSize, children: item }, String(i)))) }));
|
|
2134
|
-
});
|
|
2135
|
-
|
|
2136
|
-
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$1(icon, version), renderCardTitle(headlineSmallVersion, title), renderDescription$2(description, title), items?.length ? renderItems$1(items, isDotted, version) : null, renderAdditionalDescription$1(additionalDescription)] }), button?.text
|
|
2193
|
+
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$1(icon, version), renderCardTitle(headlineSmallVersion, title), renderDescription$2(description, title), items?.length ? renderItems$1(items, isDotted, version) : null, renderAdditionalDescription$1(additionalDescription, version)] }), button?.text
|
|
2137
2194
|
? renderButton({
|
|
2138
2195
|
button,
|
|
2139
2196
|
buttonClassName: `mt-6 ${isFullWidth ? '' : 'self-center'}`,
|
|
@@ -2142,7 +2199,7 @@
|
|
|
2142
2199
|
const renderImage$1 = (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] }));
|
|
2143
2200
|
const renderCardTitle = (headlineSmallVersion, title) => title ? jsx("div", { className: HEADLINE_SMALL_VERSION[headlineSmallVersion], children: title }) : null;
|
|
2144
2201
|
const renderDescription$2 = (description, title) => description ? jsx("div", { className: `text-l ${title ? 'mt-2' : ''}`, children: description }) : null;
|
|
2145
|
-
const renderAdditionalDescription$1 = (additionalDescription) => additionalDescription ? (jsx("div", { className:
|
|
2202
|
+
const renderAdditionalDescription$1 = (additionalDescription, version) => additionalDescription ? (jsx("div", { className: `text-m-light mt-auto ${VersionAdditionalStyleMap[version ?? 'primary']}`, children: additionalDescription })) : null;
|
|
2146
2203
|
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 }));
|
|
2147
2204
|
|
|
2148
2205
|
const GalleryContainer = JSX(({ headlineVersion = 'M', cards = [], version = 'normal', activeIndex, ...rest }) => (jsxs("div", { children: [jsx(Headline, { ...rest, className: "!p-0", headlineVersion: headlineVersion, align: "center" }), jsx("div", { className: `flex mt-8 ${cards?.length <= galleryLengthForScrollMap[version] ? 'justify-center' : ''} duration-1000`, style: { transform: `translateX(-${activeIndex * cardWidthMap[version]}px)` }, role: "list", children: cards?.map((card, i) => renderCard({ card, version }, i)) })] })));
|
|
@@ -3086,11 +3143,6 @@
|
|
|
3086
3143
|
: null, breadcrumbs?.length ? (jsx("div", { className: "text-xs-light mb-6", children: joinList(jsx("span", { className: `mx-2 ${breadcrumbsStyleMap[version]}`, children: "/" }))(breadcrumbs.map((breadcrumb, i) => (jsx(Breadcrumb, { className: breadcrumbsStyleMap[version], ...breadcrumb }, String(i))))) })) : null, jsx(ProductBlockInner, { version: version, ...rest })] }));
|
|
3087
3144
|
});
|
|
3088
3145
|
|
|
3089
|
-
const BorderVersionStyleMap = {
|
|
3090
|
-
primary: 'border-main-stroke',
|
|
3091
|
-
secondary: 'border-white/50',
|
|
3092
|
-
};
|
|
3093
|
-
|
|
3094
3146
|
const productBlockStyleMap = {
|
|
3095
3147
|
primary: { title: 'text-secondary-text', text: 'text-secondary-text' },
|
|
3096
3148
|
secondary: { title: 'text-white', text: 'text-white/80' },
|
|
@@ -3131,36 +3183,24 @@
|
|
|
3131
3183
|
}
|
|
3132
3184
|
|
|
3133
3185
|
const ProductTile = JSX(({ className = '', title, headlineVersion = 'S', description, additionalDescription, benefits = [], buttons, image, version = 'primary', ...rest }) => (jsxs(BlockWrapper, { className: `overflow-hidden font-sans p-9 box-border relative justify-between grid min-h-[364px]
|
|
3134
|
-
${className} ${VersionStyleMap[version]} ${getTileRightPadding(className)}`, ...rest, 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), additionalDescription
|
|
3135
|
-
? renderAdditionalDescription(additionalDescription, image, version)
|
|
3136
|
-
: null, buttons?.length ? (jsx(ButtonSection, { buttons: buttons, className: "flex self-end mt-5 gap-4 z-10 text-l" })) : null, image?.src ? jsx(ImgInner, { className: "absolute right-0 bottom-0", image: image }) : null] })));
|
|
3186
|
+
${className} ${VersionStyleMap[version]} ${getTileRightPadding(className)}`, ...rest, 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), additionalDescription ? renderAdditionalDescription(additionalDescription, image) : null, buttons?.length ? (jsx(ButtonSection, { buttons: buttons, className: "flex self-end mt-5 gap-4 z-10 text-l" })) : null, image?.src ? jsx(ImgInner, { className: "absolute right-0 bottom-0", image: image }) : null] })));
|
|
3137
3187
|
function renderBenefits(benefits, version, image) {
|
|
3138
3188
|
// picture width = 242px. Text can overlay picture 20px deep. Outer paddings_x = 36px. 242-36-20 = 186px
|
|
3139
3189
|
const BENEFITS_WIDTH = image?.src ? 'max-w-[calc(100%-186px)]' : '100%';
|
|
3140
3190
|
return (jsx("div", { className: `z-10 grid grid-cols-[max-content_1fr] auto-rows-auto gap-x-6 gap-y-2.5 items-baseline
|
|
3141
3191
|
${BENEFITS_WIDTH}`, children: benefits.length ? benefits.map(renderBenefit(version)) : null }));
|
|
3142
3192
|
}
|
|
3143
|
-
|
|
3144
|
-
const
|
|
3145
|
-
|
|
3146
|
-
|
|
3147
|
-
|
|
3148
|
-
|
|
3149
|
-
|
|
3150
|
-
|
|
3151
|
-
jsx("div", { className: "text-h6", children: label }, `label-${i}`),
|
|
3152
|
-
jsx("div", { className: `text-m-light ${labelStyleMap[version]}`, children: description }, `desc-${i}`),
|
|
3153
|
-
];
|
|
3154
|
-
};
|
|
3155
|
-
}
|
|
3156
|
-
function renderAdditionalDescription(additionalDescription, image, version = 'primary') {
|
|
3157
|
-
const descStyleMap = {
|
|
3158
|
-
primary: 'text-secondary-text',
|
|
3159
|
-
secondary: 'text-white',
|
|
3160
|
-
};
|
|
3193
|
+
const renderBenefit = (version = 'primary') => (benefit, i) => {
|
|
3194
|
+
const { label = '', description = '' } = benefit;
|
|
3195
|
+
return [
|
|
3196
|
+
jsx("div", { className: "text-h6", children: label }, `label-${i}`),
|
|
3197
|
+
jsx("div", { className: `text-m-light ${VersionAdditionalStyleMap[version]}`, children: description }, `desc-${i}`),
|
|
3198
|
+
];
|
|
3199
|
+
};
|
|
3200
|
+
function renderAdditionalDescription(additionalDescription, image) {
|
|
3161
3201
|
// picture width = 242px. Text can overlay picture 20px deep. Outer paddings_x = 36px. 242-36-20 = 186px
|
|
3162
3202
|
const DESCRIPTION_WIDTH = image?.src ? 'max-w-[calc(100%-186px)]' : '100%';
|
|
3163
|
-
return (jsx("div", { className: `text-m-light mt-2.5 z-10 ${DESCRIPTION_WIDTH}
|
|
3203
|
+
return (jsx("div", { className: `text-m-light mt-2.5 z-10 ${DESCRIPTION_WIDTH}`, children: additionalDescription }));
|
|
3164
3204
|
}
|
|
3165
3205
|
|
|
3166
3206
|
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 })] }) }) })));
|
|
@@ -3719,10 +3759,10 @@
|
|
|
3719
3759
|
right: 'items-end',
|
|
3720
3760
|
};
|
|
3721
3761
|
const gapStyleMap = {
|
|
3722
|
-
XXL: 'gap-
|
|
3723
|
-
XL: 'gap-
|
|
3724
|
-
L: 'gap-
|
|
3725
|
-
M: 'gap-
|
|
3762
|
+
XXL: 'gap-12',
|
|
3763
|
+
XL: 'gap-10',
|
|
3764
|
+
L: 'gap-8',
|
|
3765
|
+
M: 'gap-4',
|
|
3726
3766
|
S: 'gap-2',
|
|
3727
3767
|
XS: 'gap-1',
|
|
3728
3768
|
'': '',
|
|
@@ -3732,15 +3772,20 @@
|
|
|
3732
3772
|
primary: 'bg-white',
|
|
3733
3773
|
secondary: 'bg-primary-main',
|
|
3734
3774
|
};
|
|
3735
|
-
const VerticalLayout = JSX(({ className = '', gap = '', align, version = 'transparent', ...rest }) =>
|
|
3736
|
-
|
|
3737
|
-
|
|
3738
|
-
|
|
3739
|
-
|
|
3740
|
-
|
|
3741
|
-
|
|
3742
|
-
|
|
3743
|
-
|
|
3775
|
+
const VerticalLayout = JSX(({ className = '', gap = '', align, isPadding = false, isInnerPadding = true, version = 'transparent', options, ...rest }) => {
|
|
3776
|
+
const paddingStyle = isPadding ? 'p-12' : '';
|
|
3777
|
+
const innerPaddingStyle = isInnerPadding ? '' : '!p-0';
|
|
3778
|
+
return (jsx(BlockWrapper, { className: [
|
|
3779
|
+
'flex flex-col [&>*]:max-w-full',
|
|
3780
|
+
paddingStyle,
|
|
3781
|
+
gapStyleMap[gap],
|
|
3782
|
+
align && alignStyle[align],
|
|
3783
|
+
backgroundStyleMap[version],
|
|
3784
|
+
className,
|
|
3785
|
+
]
|
|
3786
|
+
.filter(Boolean)
|
|
3787
|
+
.join(' '), ...rest, children: renderChildren({ ...rest, options: { ...options, className: innerPaddingStyle } }) }));
|
|
3788
|
+
});
|
|
3744
3789
|
VerticalLayout.childrenTypes = {
|
|
3745
3790
|
exclude: ['VerticalLayout'],
|
|
3746
3791
|
};
|
|
@@ -3753,25 +3798,6 @@
|
|
|
3753
3798
|
return (jsxs(BlockWrapper, { className: `bg-white ${getPaddings(className)} ${className}`, ...rest, children: [jsx(Headline, { title: title, headlineVersion: "M" }), src ? (jsx("video", { className: "m-auto w-full object-fill", preload: "metadata", poster: previewImg?.src, style: { maxHeight: 524 }, controls: true, children: jsx("source", { src: src }) })) : null] }));
|
|
3754
3799
|
});
|
|
3755
3800
|
|
|
3756
|
-
const getItemListFontSize = (colValue) => (colValue === 1 ? 'text-h6' : 'text-l');
|
|
3757
|
-
const cardColumnsModeStyleMap = {
|
|
3758
|
-
1: 'flex gap-y-2 flex-col',
|
|
3759
|
-
2: 'flex gap-y-2 gap-x-10 flex-wrap',
|
|
3760
|
-
};
|
|
3761
|
-
const CarouselInvestmentCard = JSX(({ additionalDescription, cardsList = [], className = '', columnsMode = 1, description, image, title, version = 'primary', ...rest }) => {
|
|
3762
|
-
const tileTitle = title ? (jsx(Heading, { headingType: "h4", as: "h3", className: "mb-3.5 z-10", title: title })) : null;
|
|
3763
|
-
const tileImage = image?.src ? (jsx(ImgInner, { className: "absolute bottom-0 right-0 m-0", image: image })) : null;
|
|
3764
|
-
return (jsx(BlockWrapper, { className: `relative text-left border border-solid box-border
|
|
3765
|
-
p-9 w-[697px]
|
|
3766
|
-
${BorderVersionStyleMap[version]}
|
|
3767
|
-
${className}`, ...rest, children: jsxs(BaseTile, { title: tileTitle, image: tileImage, children: [jsxs("div", { className: "flex justify-between mb-4", children: [description ? jsx("span", { className: "text-h6 w-1/3", children: description }) : null, additionalDescription ? (jsx("span", { className: "text-m-light text-secondary-text", children: additionalDescription })) : null] }), cardsList.length ? (jsx("ul", { className: `list-none m-0 p-0 ${cardColumnsModeStyleMap[columnsMode]}`, children: renderCardList(cardsList, columnsMode) })) : null] }) }));
|
|
3768
|
-
});
|
|
3769
|
-
const renderCardList = (cardsList, columnsMode) => {
|
|
3770
|
-
const CARDS_COUNT_MAP = [4, 9];
|
|
3771
|
-
const visibleCardsList = cardsList.slice(0, CARDS_COUNT_MAP[columnsMode - 1]);
|
|
3772
|
-
return visibleCardsList.map((item, i) => (jsxs("li", { className: columnsMode === 2 ? 'basis-[calc(50%-20px)]' : '', children: [item?.parameter ? (jsx("span", { className: `pr-2.5 ${getItemListFontSize(columnsMode)}`, children: item.parameter })) : null, item?.parameterDescription ? (jsx("span", { className: "text-m-light text-secondary-text", children: item.parameterDescription })) : null] }, String(i))));
|
|
3773
|
-
};
|
|
3774
|
-
|
|
3775
3801
|
const Blocks = {
|
|
3776
3802
|
Accordion,
|
|
3777
3803
|
AccordionItem,
|
|
@@ -3783,7 +3809,10 @@
|
|
|
3783
3809
|
Calculator,
|
|
3784
3810
|
Carousel,
|
|
3785
3811
|
CarouselCard,
|
|
3812
|
+
CarouselCatalogCard,
|
|
3813
|
+
CarouselInvestmentCard,
|
|
3786
3814
|
CarouselLinks,
|
|
3815
|
+
CarouselProductCard,
|
|
3787
3816
|
CarouselProgramsCard,
|
|
3788
3817
|
CarouselTariffsCard,
|
|
3789
3818
|
Catalog,
|
|
@@ -3823,7 +3852,6 @@
|
|
|
3823
3852
|
Tile,
|
|
3824
3853
|
VerticalLayout,
|
|
3825
3854
|
Video,
|
|
3826
|
-
CarouselInvestmentCard,
|
|
3827
3855
|
};
|
|
3828
3856
|
|
|
3829
3857
|
const debounce = (fn, delay = 600) => {
|
|
@@ -3951,7 +3979,7 @@
|
|
|
3951
3979
|
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" }) }));
|
|
3952
3980
|
}
|
|
3953
3981
|
|
|
3954
|
-
const packageVersion = "0.6.
|
|
3982
|
+
const packageVersion = "0.6.40";
|
|
3955
3983
|
|
|
3956
3984
|
exports.Blocks = Blocks;
|
|
3957
3985
|
exports.ContentPage = ContentPage;
|