@redneckz/wildless-cms-uni-blocks 0.6.31 → 0.6.33
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.32.js +26 -0
- package/bundle/blocks.schema.json +1 -1
- package/bundle/bundle.umd.js +152 -110
- package/bundle/bundle.umd.min.js +1 -1
- package/bundle/components/CarouselLinks/CarouselLinks.d.ts +5 -0
- package/bundle/components/CarouselLinks/CarouselLinksContent.d.ts +9 -0
- package/bundle/components/ContactsBlock/ContactsBlockContent.d.ts +11 -20
- package/bundle/components/StepsBlock/renderStepContent.d.ts +1 -1
- package/bundle/icons/IconName.d.ts +6 -4
- package/bundle/model/HeadlineType.d.ts +2 -2
- package/bundle/ui-kit/LinkButton/LinkButton.d.ts +5 -0
- package/bundle/ui-kit/Paragraph/Paragraph.d.ts +9 -0
- package/bundle/ui-kit/Text/Text.d.ts +34 -0
- package/bundle/utils/sliceArray.d.ts +1 -0
- package/cosmos-static/icons/ArrowRightIcon.svg +1 -0
- package/dist/components/Accordion/Accordion.js +2 -1
- package/dist/components/Accordion/Accordion.js.map +1 -1
- package/dist/components/Accordion/Accordion.mobile.js +2 -1
- package/dist/components/Accordion/Accordion.mobile.js.map +1 -1
- package/dist/components/AccordionItem/AccordionItem.js +2 -1
- package/dist/components/AccordionItem/AccordionItem.js.map +1 -1
- package/dist/components/AccordionItem/AccordionItem.mobile.js +2 -1
- package/dist/components/AccordionItem/AccordionItem.mobile.js.map +1 -1
- package/dist/components/Blocks.js +2 -0
- package/dist/components/Blocks.js.map +1 -1
- package/dist/components/CarouselLinks/CarouselLinks.d.ts +5 -0
- package/dist/components/CarouselLinks/CarouselLinks.js +20 -0
- package/dist/components/CarouselLinks/CarouselLinks.js.map +1 -0
- package/dist/components/CarouselLinks/CarouselLinksContent.d.ts +9 -0
- package/dist/components/CarouselLinks/CarouselLinksContent.js +2 -0
- package/dist/components/CarouselLinks/CarouselLinksContent.js.map +1 -0
- package/dist/components/ContactsBlock/ContactsBlock.js +6 -10
- package/dist/components/ContactsBlock/ContactsBlock.js.map +1 -1
- package/dist/components/ContactsBlock/ContactsBlockContent.d.ts +11 -20
- package/dist/components/Headline/Headline.js +1 -2
- package/dist/components/Headline/Headline.js.map +1 -1
- package/dist/components/Headline/constants.js +6 -0
- package/dist/components/Headline/constants.js.map +1 -1
- package/dist/components/InvestmentGallery/InvestmentGalleryCard.js +1 -2
- package/dist/components/InvestmentGallery/InvestmentGalleryCard.js.map +1 -1
- package/dist/components/Recommendation/RecommendationCard.js +1 -2
- package/dist/components/Recommendation/RecommendationCard.js.map +1 -1
- package/dist/components/StepsBlock/renderStepContent.d.ts +1 -1
- package/dist/components/TariffsTable/TariffsTable.mobile.js +1 -1
- package/dist/components/TariffsTable/TariffsTable.mobile.js.map +1 -1
- package/dist/components/Tile/Tile.js +2 -2
- package/dist/components/Tile/Tile.js.map +1 -1
- package/dist/icons/IconName.d.ts +6 -4
- package/dist/icons/IconName.js +4 -2
- package/dist/icons/IconName.js.map +1 -1
- package/dist/model/HeadlineType.d.ts +2 -2
- package/dist/ui-kit/LinkButton/LinkButton.d.ts +5 -0
- package/dist/ui-kit/LinkButton/LinkButton.js +16 -0
- package/dist/ui-kit/LinkButton/LinkButton.js.map +1 -0
- package/dist/ui-kit/Paragraph/Paragraph.d.ts +9 -0
- package/dist/ui-kit/Paragraph/Paragraph.js +10 -0
- package/dist/ui-kit/Paragraph/Paragraph.js.map +1 -0
- package/dist/ui-kit/Text/Text.d.ts +34 -0
- package/dist/ui-kit/Text/Text.js +10 -0
- package/dist/ui-kit/Text/Text.js.map +1 -0
- package/dist/utils/sliceArray.d.ts +1 -0
- package/dist/utils/sliceArray.js +15 -0
- package/dist/utils/sliceArray.js.map +1 -0
- package/lib/common.css +1 -1
- package/lib/components/Accordion/Accordion.js +2 -1
- package/lib/components/Accordion/Accordion.js.map +1 -1
- package/lib/components/Accordion/Accordion.mobile.js +2 -1
- package/lib/components/Accordion/Accordion.mobile.js.map +1 -1
- package/lib/components/AccordionItem/AccordionItem.js +2 -1
- package/lib/components/AccordionItem/AccordionItem.js.map +1 -1
- package/lib/components/AccordionItem/AccordionItem.mobile.js +2 -1
- package/lib/components/AccordionItem/AccordionItem.mobile.js.map +1 -1
- package/lib/components/Blocks.js +2 -0
- package/lib/components/Blocks.js.map +1 -1
- package/lib/components/CarouselLinks/CarouselLinks.d.ts +5 -0
- package/lib/components/CarouselLinks/CarouselLinks.fixture.d.ts +5 -0
- package/lib/components/CarouselLinks/CarouselLinks.js +18 -0
- package/lib/components/CarouselLinks/CarouselLinks.js.map +1 -0
- package/lib/components/CarouselLinks/CarouselLinksContent.d.ts +9 -0
- package/lib/components/CarouselLinks/CarouselLinksContent.js +2 -0
- package/lib/components/CarouselLinks/CarouselLinksContent.js.map +1 -0
- package/lib/components/ContactsBlock/ContactsBlock.js +6 -10
- package/lib/components/ContactsBlock/ContactsBlock.js.map +1 -1
- package/lib/components/ContactsBlock/ContactsBlockContent.d.ts +11 -20
- package/lib/components/Headline/Headline.js +1 -2
- package/lib/components/Headline/Headline.js.map +1 -1
- package/lib/components/Headline/constants.js +6 -0
- package/lib/components/Headline/constants.js.map +1 -1
- package/lib/components/InvestmentGallery/InvestmentGalleryCard.js +1 -2
- package/lib/components/InvestmentGallery/InvestmentGalleryCard.js.map +1 -1
- package/lib/components/Recommendation/RecommendationCard.js +1 -2
- package/lib/components/Recommendation/RecommendationCard.js.map +1 -1
- package/lib/components/StepsBlock/renderStepContent.d.ts +1 -1
- package/lib/components/TariffsTable/TariffsTable.mobile.js +1 -1
- package/lib/components/TariffsTable/TariffsTable.mobile.js.map +1 -1
- package/lib/components/Tile/Tile.js +2 -2
- package/lib/components/Tile/Tile.js.map +1 -1
- package/lib/icons/IconName.d.ts +6 -4
- package/lib/icons/IconName.js +4 -2
- package/lib/icons/IconName.js.map +1 -1
- package/lib/model/HeadlineType.d.ts +2 -2
- package/lib/ui-kit/LinkButton/LinkButton.d.ts +5 -0
- package/lib/ui-kit/LinkButton/LinkButton.fixture.d.ts +5 -0
- package/lib/ui-kit/LinkButton/LinkButton.js +14 -0
- package/lib/ui-kit/LinkButton/LinkButton.js.map +1 -0
- package/lib/ui-kit/Paragraph/Paragraph.d.ts +9 -0
- package/lib/ui-kit/Paragraph/Paragraph.js +8 -0
- package/lib/ui-kit/Paragraph/Paragraph.js.map +1 -0
- package/lib/ui-kit/Text/Text.d.ts +34 -0
- package/lib/ui-kit/Text/Text.js +8 -0
- package/lib/ui-kit/Text/Text.js.map +1 -0
- package/lib/utils/sliceArray.d.ts +1 -0
- package/lib/utils/sliceArray.js +12 -0
- package/lib/utils/sliceArray.js.map +1 -0
- package/mobile/bundle/bundle.umd.js +16 -4
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/bundle/components/CarouselLinks/CarouselLinks.d.ts +5 -0
- package/mobile/bundle/components/CarouselLinks/CarouselLinksContent.d.ts +9 -0
- package/mobile/bundle/components/ContactsBlock/ContactsBlockContent.d.ts +11 -20
- package/mobile/bundle/components/StepsBlock/renderStepContent.d.ts +1 -1
- package/mobile/bundle/icons/IconName.d.ts +6 -4
- package/mobile/bundle/model/HeadlineType.d.ts +2 -2
- package/mobile/bundle/ui-kit/LinkButton/LinkButton.d.ts +5 -0
- package/mobile/bundle/ui-kit/Paragraph/Paragraph.d.ts +9 -0
- package/mobile/bundle/ui-kit/Text/Text.d.ts +34 -0
- package/mobile/bundle/utils/sliceArray.d.ts +1 -0
- package/mobile/dist/components/Accordion/Accordion.js +2 -1
- package/mobile/dist/components/Accordion/Accordion.js.map +1 -1
- package/mobile/dist/components/AccordionItem/AccordionItem.js +2 -1
- package/mobile/dist/components/AccordionItem/AccordionItem.js.map +1 -1
- package/mobile/dist/components/CarouselLinks/CarouselLinks.d.ts +5 -0
- package/mobile/dist/components/CarouselLinks/CarouselLinks.js +20 -0
- package/mobile/dist/components/CarouselLinks/CarouselLinks.js.map +1 -0
- package/mobile/dist/components/CarouselLinks/CarouselLinksContent.d.ts +9 -0
- package/mobile/dist/components/CarouselLinks/CarouselLinksContent.js +2 -0
- package/mobile/dist/components/CarouselLinks/CarouselLinksContent.js.map +1 -0
- package/mobile/dist/components/ContactsBlock/ContactsBlock.js +6 -10
- package/mobile/dist/components/ContactsBlock/ContactsBlock.js.map +1 -1
- package/mobile/dist/components/ContactsBlock/ContactsBlockContent.d.ts +11 -20
- package/mobile/dist/components/Headline/constants.js +6 -0
- package/mobile/dist/components/Headline/constants.js.map +1 -1
- package/mobile/dist/components/InvestmentGallery/InvestmentGalleryCard.js +1 -2
- package/mobile/dist/components/InvestmentGallery/InvestmentGalleryCard.js.map +1 -1
- package/mobile/dist/components/Recommendation/RecommendationCard.js +1 -2
- package/mobile/dist/components/Recommendation/RecommendationCard.js.map +1 -1
- package/mobile/dist/components/StepsBlock/renderStepContent.d.ts +1 -1
- package/mobile/dist/components/TariffsTable/TariffsTable.js +1 -1
- package/mobile/dist/components/TariffsTable/TariffsTable.js.map +1 -1
- package/mobile/dist/components/Tile/Tile.js +2 -2
- package/mobile/dist/components/Tile/Tile.js.map +1 -1
- package/mobile/dist/icons/IconName.d.ts +6 -4
- package/mobile/dist/icons/IconName.js +4 -2
- package/mobile/dist/icons/IconName.js.map +1 -1
- package/mobile/dist/model/HeadlineType.d.ts +2 -2
- package/mobile/dist/ui-kit/LinkButton/LinkButton.d.ts +5 -0
- package/mobile/dist/ui-kit/LinkButton/LinkButton.js +16 -0
- package/mobile/dist/ui-kit/LinkButton/LinkButton.js.map +1 -0
- package/mobile/dist/ui-kit/Paragraph/Paragraph.d.ts +9 -0
- package/mobile/dist/ui-kit/Paragraph/Paragraph.js +10 -0
- package/mobile/dist/ui-kit/Paragraph/Paragraph.js.map +1 -0
- package/mobile/dist/ui-kit/Text/Text.d.ts +34 -0
- package/mobile/dist/ui-kit/Text/Text.js +10 -0
- package/mobile/dist/ui-kit/Text/Text.js.map +1 -0
- package/mobile/dist/utils/sliceArray.d.ts +1 -0
- package/mobile/dist/utils/sliceArray.js +15 -0
- package/mobile/dist/utils/sliceArray.js.map +1 -0
- package/mobile/lib/components/Accordion/Accordion.js +2 -1
- package/mobile/lib/components/Accordion/Accordion.js.map +1 -1
- package/mobile/lib/components/AccordionItem/AccordionItem.js +2 -1
- package/mobile/lib/components/AccordionItem/AccordionItem.js.map +1 -1
- package/mobile/lib/components/CarouselLinks/CarouselLinks.d.ts +5 -0
- package/mobile/lib/components/CarouselLinks/CarouselLinks.js +18 -0
- package/mobile/lib/components/CarouselLinks/CarouselLinks.js.map +1 -0
- package/mobile/lib/components/CarouselLinks/CarouselLinksContent.d.ts +9 -0
- package/mobile/lib/components/CarouselLinks/CarouselLinksContent.js +2 -0
- package/mobile/lib/components/CarouselLinks/CarouselLinksContent.js.map +1 -0
- package/mobile/lib/components/ContactsBlock/ContactsBlock.js +6 -10
- package/mobile/lib/components/ContactsBlock/ContactsBlock.js.map +1 -1
- package/mobile/lib/components/ContactsBlock/ContactsBlockContent.d.ts +11 -20
- package/mobile/lib/components/Headline/constants.js +6 -0
- package/mobile/lib/components/Headline/constants.js.map +1 -1
- package/mobile/lib/components/InvestmentGallery/InvestmentGalleryCard.js +1 -2
- package/mobile/lib/components/InvestmentGallery/InvestmentGalleryCard.js.map +1 -1
- package/mobile/lib/components/Recommendation/RecommendationCard.js +1 -2
- package/mobile/lib/components/Recommendation/RecommendationCard.js.map +1 -1
- package/mobile/lib/components/StepsBlock/renderStepContent.d.ts +1 -1
- package/mobile/lib/components/TariffsTable/TariffsTable.js +1 -1
- package/mobile/lib/components/TariffsTable/TariffsTable.js.map +1 -1
- package/mobile/lib/components/Tile/Tile.js +2 -2
- package/mobile/lib/components/Tile/Tile.js.map +1 -1
- package/mobile/lib/icons/IconName.d.ts +6 -4
- package/mobile/lib/icons/IconName.js +4 -2
- package/mobile/lib/icons/IconName.js.map +1 -1
- package/mobile/lib/model/HeadlineType.d.ts +2 -2
- package/mobile/lib/ui-kit/LinkButton/LinkButton.d.ts +5 -0
- package/mobile/lib/ui-kit/LinkButton/LinkButton.js +14 -0
- package/mobile/lib/ui-kit/LinkButton/LinkButton.js.map +1 -0
- package/mobile/lib/ui-kit/Paragraph/Paragraph.d.ts +9 -0
- package/mobile/lib/ui-kit/Paragraph/Paragraph.js +8 -0
- package/mobile/lib/ui-kit/Paragraph/Paragraph.js.map +1 -0
- package/mobile/lib/ui-kit/Text/Text.d.ts +34 -0
- package/mobile/lib/ui-kit/Text/Text.js +8 -0
- package/mobile/lib/ui-kit/Text/Text.js.map +1 -0
- package/mobile/lib/utils/sliceArray.d.ts +1 -0
- package/mobile/lib/utils/sliceArray.js +12 -0
- package/mobile/lib/utils/sliceArray.js.map +1 -0
- package/mobile/src/components/Accordion/Accordion.tsx +9 -5
- package/mobile/src/components/AccordionItem/AccordionItem.tsx +7 -4
- package/mobile/src/components/CarouselLinks/CarouselLinks.example.json +55 -0
- package/mobile/src/components/CarouselLinks/CarouselLinks.json +8 -0
- package/mobile/src/components/CarouselLinks/CarouselLinks.tsx +67 -0
- package/mobile/src/components/CarouselLinks/CarouselLinksContent.ts +10 -0
- package/mobile/src/components/ContactsBlock/ContactsBlock.example.json +22 -18
- package/mobile/src/components/ContactsBlock/ContactsBlock.tsx +29 -40
- package/mobile/src/components/ContactsBlock/ContactsBlockContent.ts +12 -22
- package/mobile/src/components/Headline/constants.ts +6 -0
- package/mobile/src/components/InvestmentGallery/InvestmentGalleryCard.tsx +2 -3
- package/mobile/src/components/Recommendation/RecommendationCard.tsx +1 -2
- package/mobile/src/components/StepsBlock/renderStepContent.tsx +1 -1
- package/mobile/src/components/TariffsTable/TariffsTable.tsx +1 -1
- package/mobile/src/components/Tile/Tile.tsx +4 -2
- package/mobile/src/icons/ArrowLeftIcon.svg +1 -1
- package/mobile/src/icons/ArrowRightIcon.svg +1 -0
- package/mobile/src/icons/ArrowUpIcon.svg +1 -1
- package/mobile/src/icons/IconName.ts +4 -4
- package/mobile/src/model/HeadlineType.ts +2 -2
- package/mobile/src/ui-kit/LinkButton/LinkButton.tsx +42 -0
- package/mobile/src/ui-kit/Paragraph/Paragraph.tsx +17 -0
- package/mobile/src/ui-kit/Text/Text.tsx +79 -0
- package/mobile/src/utils/sliceArray.ts +15 -0
- package/package.json +2 -2
- package/src/components/Accordion/Accordion.mobile.tsx +9 -5
- package/src/components/Accordion/Accordion.tsx +7 -2
- package/src/components/AccordionItem/AccordionItem.mobile.tsx +7 -4
- package/src/components/AccordionItem/AccordionItem.tsx +4 -1
- package/src/components/Blocks.ts +2 -0
- package/src/components/CarouselLinks/CarouselLinks.example.json +55 -0
- package/src/components/CarouselLinks/CarouselLinks.fixture.tsx +28 -0
- package/src/components/CarouselLinks/CarouselLinks.json +8 -0
- package/src/components/CarouselLinks/CarouselLinks.tsx +67 -0
- package/src/components/CarouselLinks/CarouselLinksContent.ts +10 -0
- package/src/components/ContactsBlock/ContactsBlock.example.json +22 -18
- package/src/components/ContactsBlock/ContactsBlock.fixture.tsx +21 -15
- package/src/components/ContactsBlock/ContactsBlock.tsx +29 -40
- package/src/components/ContactsBlock/ContactsBlockContent.ts +12 -22
- package/src/components/Headline/Headline.tsx +3 -5
- package/src/components/Headline/constants.ts +6 -0
- package/src/components/InvestmentGallery/InvestmentGalleryCard.tsx +2 -3
- package/src/components/Recommendation/RecommendationCard.tsx +1 -2
- package/src/components/StepsBlock/renderStepContent.tsx +1 -1
- package/src/components/TariffsTable/TariffsTable.mobile.tsx +1 -1
- package/src/components/Tile/Tile.tsx +4 -2
- package/src/icons/ArrowLeftIcon.svg +1 -1
- package/src/icons/ArrowRightIcon.svg +1 -0
- package/src/icons/ArrowUpIcon.svg +1 -1
- package/src/icons/IconName.ts +6 -327
- package/src/model/HeadlineType.ts +2 -2
- package/src/ui-kit/LinkButton/LinkButton.fixture.tsx +9 -0
- package/src/ui-kit/LinkButton/LinkButton.tsx +42 -0
- package/src/ui-kit/Paragraph/Paragraph.tsx +17 -0
- package/src/ui-kit/Text/Text.tsx +79 -0
- package/src/utils/sliceArray.ts +15 -0
- package/bundle/ui-kit/Description/Description.d.ts +0 -5
- package/dist/ui-kit/Description/Description.d.ts +0 -5
- package/dist/ui-kit/Description/Description.js +0 -9
- package/dist/ui-kit/Description/Description.js.map +0 -1
- package/lib/ui-kit/Description/Description.d.ts +0 -5
- package/lib/ui-kit/Description/Description.js +0 -7
- package/lib/ui-kit/Description/Description.js.map +0 -1
- package/mobile/bundle/ui-kit/Description/Description.d.ts +0 -5
- package/mobile/dist/ui-kit/Description/Description.d.ts +0 -5
- package/mobile/dist/ui-kit/Description/Description.js +0 -9
- package/mobile/dist/ui-kit/Description/Description.js.map +0 -1
- package/mobile/lib/ui-kit/Description/Description.d.ts +0 -5
- package/mobile/lib/ui-kit/Description/Description.js +0 -7
- package/mobile/lib/ui-kit/Description/Description.js.map +0 -1
- package/mobile/src/ui-kit/Description/Description.tsx +0 -12
- package/src/ui-kit/Description/Description.tsx +0 -12
package/bundle/bundle.umd.js
CHANGED
|
@@ -349,9 +349,15 @@
|
|
|
349
349
|
return (jsx(Tag, { className: `font-sans m-0 ${HEADING_STYLE_MAP[headingType]} ${className}`, children: title }));
|
|
350
350
|
});
|
|
351
351
|
|
|
352
|
+
const Paragraph = JSX((props) => {
|
|
353
|
+
const { size = '', color = '', align = '', font = '', children } = props;
|
|
354
|
+
const textClasses = `font-sans ${size} ${color} ${align} ${font}`;
|
|
355
|
+
return jsx("p", { className: textClasses, children: children });
|
|
356
|
+
});
|
|
357
|
+
|
|
352
358
|
const AccordionItemsList = JSX(({ children }) => (jsx("ul", { className: "list-none m-0 p-0", children: children })));
|
|
353
359
|
|
|
354
|
-
const Accordion = JSX(({ className = '', title, accordionAlignTitle = 'center', description, children, ...rest }) => (jsxs(BlockWrapper, { className: `p-[50px] mb-1 last:mb-0
|
|
360
|
+
const Accordion = JSX(({ className = '', title, accordionAlignTitle = 'center', description, children, ...rest }) => (jsxs(BlockWrapper, { className: `p-[50px] mb-1 last:mb-0 bg-white text-primary-text ${className}`, ...rest, children: [title ? (jsx(Heading, { headingType: "h3", as: "h2", className: `mb-2.5 ${AlignText[accordionAlignTitle]}`, title: title })) : null, description ? (jsx("div", { className: "mb-2.5", children: jsx(Paragraph, { size: "text-l", children: description }) })) : null, jsx(AccordionItemsList, { children: children })] })));
|
|
355
361
|
Accordion.childrenTypes = ['AccordionItem'];
|
|
356
362
|
|
|
357
363
|
const Foldable = JSX(({ isFoldButtonOnTop = false, unfoldedByDefault = false, renderFoldableSection, renderFoldButton, }) => {
|
|
@@ -445,48 +451,58 @@
|
|
|
445
451
|
return (jsx(ImgAsPicture, { className: className, imageClassName: imageClassName, image: image, isMobile: isMobile }));
|
|
446
452
|
});
|
|
447
453
|
|
|
454
|
+
const Text = JSX((props) => {
|
|
455
|
+
const { size = '', color = '', align = '', font = '', children } = props;
|
|
456
|
+
const textClasses = `font-sans ${size} ${color} ${align} ${font}`;
|
|
457
|
+
return jsx("span", { className: textClasses, children: children });
|
|
458
|
+
});
|
|
459
|
+
|
|
448
460
|
const icons$1 = ['PlusIcon', 'MinusIcon'];
|
|
449
461
|
const AccordionItem = JSX(({ className = '', label = '', isExpanded, children }) => (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: children })), renderFoldButton: ({ isUnfolded, onToggle }) => (jsx(FoldButton$1, { label: label, icon: icons$1[Number(isUnfolded)], onClick: onToggle })) }) })));
|
|
450
462
|
AccordionItem.childrenTypes = [];
|
|
451
|
-
const FoldButton$1 = JSX(({ label, icon, onClick }) => (jsxs("button", { className: "border-none bg-transparent px-0 pt-5 pb-3.5 flex justify-between text-left w-full font-sans text-h6 group cursor-pointer", onClick: onClick, children: [jsx(
|
|
452
|
-
|
|
453
|
-
const
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
463
|
+
const FoldButton$1 = JSX(({ label, icon, onClick }) => (jsxs("button", { className: "border-none bg-transparent px-0 pt-5 pb-3.5 flex justify-between text-left w-full font-sans text-h6 group cursor-pointer", onClick: onClick, children: [jsx(Text, { size: "text-xl", font: "font-medium", children: label }), jsx(ImgInner, { image: icon, className: "text-primary-main flex-shrink-0", width: "24", height: "24", asSVG: true })] })));
|
|
464
|
+
|
|
465
|
+
const LINK_CLASS_NAME = `absolute border border-primary-main ml-3 px-6 py-5
|
|
466
|
+
text-l-light bg-white text-primary-text flex w-[316px]
|
|
467
|
+
justify-between items-center group-hover:text-primary-main z-10`;
|
|
468
|
+
const LINK_BORDER_CLASS_NAME = 'bg-transparent border-white border h-[70px] absolute w-[316px] top-0';
|
|
469
|
+
const LinkButton = JSX(({ text, href = '', target = '', className = '' }) => {
|
|
470
|
+
if (!text) {
|
|
471
|
+
return null;
|
|
472
|
+
}
|
|
473
|
+
return (jsxs("div", { className: `relative group cursor-pointer w-[328px] h-[82px] ${className}`, children: [jsxs("a", { className: LINK_CLASS_NAME, role: "link", href: href, target: target, children: [jsx("div", { className: "p-0.5", children: text }), jsx("div", { className: "w-6 h-6", children: jsx(ImgInner, { className: "w-4 h-4 min-w-4 min-h-4 rounded-full box-border brightness-0 group-hover:brightness-100", image: { icon: 'ArrowRightIcon', iconVersion: 'black' }, imageClassName: "group-hover:text-primary-main", width: "24", height: "24", asSVG: true }) })] }), jsx("div", { className: `${LINK_BORDER_CLASS_NAME} mx-1.5 mt-1.5` }), jsx("div", { className: `${LINK_BORDER_CLASS_NAME} mt-3 mr-3` })] }));
|
|
461
474
|
});
|
|
462
475
|
|
|
463
|
-
const
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
secondary: 'bg-white/30 text-black',
|
|
474
|
-
};
|
|
475
|
-
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] })));
|
|
476
|
-
const renderStep = (version) => (benefit, i) => {
|
|
477
|
-
const description = benefit.description;
|
|
478
|
-
return (jsxs("div", { className: "flex items-center basis-1/2 max-w-[500px] mb-14", children: [benefit?.icon?.icon ? (jsx(ImgInner, { className: `w-[50px] h-[50px] min-w-[50px] 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$3(description, version)] })] }, String(i)));
|
|
479
|
-
};
|
|
480
|
-
const renderDescription$3 = (description, version) => {
|
|
481
|
-
const benefitType = description?.benefitType || null;
|
|
482
|
-
return description && benefitType ? (jsx("div", { className: `text-l-light mt-2 ${benefitsDescriptionStyleMap[version]}`, children: benefitType === 'list'
|
|
483
|
-
? renderListBenefit(description)
|
|
484
|
-
: renderTextBenefit(description) })) : null;
|
|
476
|
+
const sliceArray = (items, size) => {
|
|
477
|
+
const result = items.reduce((resultArray, item, index) => {
|
|
478
|
+
const chunkIndex = Math.floor(index / (size - 1));
|
|
479
|
+
if (!resultArray[chunkIndex]) {
|
|
480
|
+
resultArray[chunkIndex] = [item];
|
|
481
|
+
}
|
|
482
|
+
resultArray[chunkIndex].push(item);
|
|
483
|
+
return resultArray;
|
|
484
|
+
}, []);
|
|
485
|
+
return result;
|
|
485
486
|
};
|
|
486
|
-
|
|
487
|
-
const
|
|
488
|
-
const
|
|
489
|
-
|
|
487
|
+
|
|
488
|
+
const useCarouselControls = ({ itemsCount, visibleItemCount = itemsCount, isCyclic, }) => {
|
|
489
|
+
const [activeIndex, setActiveIndex] = useState(0);
|
|
490
|
+
const inc = useCallback(() => setActiveIndex((_) => (isCyclic ? (_ + 1) % itemsCount : Math.min(_ + 1, itemsCount - 1))), [isCyclic, itemsCount]);
|
|
491
|
+
const dec = useCallback(() => setActiveIndex((_) => (isCyclic ? (itemsCount + _ - 1) % itemsCount : Math.max(_ - 1, 0))), [isCyclic, itemsCount]);
|
|
492
|
+
const isScrollAvailable = itemsCount > visibleItemCount;
|
|
493
|
+
const isCyclicAndScrollAvailable = isCyclic && isScrollAvailable;
|
|
494
|
+
const canInc = isCyclicAndScrollAvailable ||
|
|
495
|
+
(isScrollAvailable && itemsCount - activeIndex > visibleItemCount);
|
|
496
|
+
const canDec = isCyclicAndScrollAvailable || Boolean(isScrollAvailable && activeIndex > 0);
|
|
497
|
+
return [
|
|
498
|
+
activeIndex,
|
|
499
|
+
{
|
|
500
|
+
inc,
|
|
501
|
+
dec,
|
|
502
|
+
canInc,
|
|
503
|
+
canDec,
|
|
504
|
+
},
|
|
505
|
+
];
|
|
490
506
|
};
|
|
491
507
|
|
|
492
508
|
const isURL = (href) => href?.includes('//');
|
|
@@ -640,6 +656,90 @@
|
|
|
640
656
|
const RegularButton = JSX(({ className = '', href, rel, target, ariaLabel, version, rounded, onClick, children }) => (jsx("a", { className: getRegularButtonClasses({ className, version, rounded }), href: href, rel: rel, target: target, "aria-label": ariaLabel, role: href ? 'link' : 'button', onClick: onClick, children: children })));
|
|
641
657
|
const DisabledButton = JSX(({ className, ariaLabel, version, rounded, children }) => (jsx("div", { role: "button", "aria-disabled": "true", "aria-label": ariaLabel, tabIndex: -1, className: getDisabledButtonClasses({ className, rounded, version }), children: children })));
|
|
642
658
|
|
|
659
|
+
const ArrowButton = JSX(({ className, disabled, ...rest }) => (jsx(Button, { rounded: true, className: `group shadow-[0_4px_25px_rgba(0,0,0,0.07)] w-12 h-12 min-h-12 max-h-12 flex items-center justify-center ${disabled
|
|
660
|
+
? 'bg-secondary-light text-secondary-text'
|
|
661
|
+
: 'bg-white text-primary-text hover:text-primary-main'} ${className || ''}`, disabled: disabled, ...rest, children: jsx(ImgInner, { className: "w-4 h-4 min-w-4 min-h-4 rounded-full box-border", image: { icon: 'ArrowLeftIcon', iconVersion: 'black' }, imageClassName: "group-hover:text-primary-main", width: "16", height: "16", asSVG: true }) })));
|
|
662
|
+
|
|
663
|
+
function renderArrows({ handler, isShown, btnClass, className = '', isDisabled = false, }) {
|
|
664
|
+
return (jsxs("div", { children: [isShown[0] || isDisabled ? (jsx(ArrowButton, { className: `absolute z-10 ${btnClass[0]} ${className}`, onClick: handler[0], ariaLabel: "\u041F\u0440\u043E\u043B\u0438\u0441\u0442\u0430\u0442\u044C \u0432\u043B\u0435\u0432\u043E", "data-block-control": "scroll-left", disabled: !isShown[0] })) : null, isShown[1] || isDisabled ? (jsx(ArrowButton, { className: `absolute z-10 rotate-180 ${btnClass[1]} ${className}`, onClick: handler[1], ariaLabel: "\u041F\u0440\u043E\u043B\u0438\u0441\u0442\u0430\u0442\u044C \u0432\u043F\u0440\u0430\u0432\u043E", "data-block-control": "scroll-right", disabled: !isShown[1] })) : null] }));
|
|
665
|
+
}
|
|
666
|
+
|
|
667
|
+
const CarouselContainer = JSX(({ children, activeItem, cardFullViewCount, cardWidth }) => {
|
|
668
|
+
const cardFullViewStyles = cardFullViewCount === 1
|
|
669
|
+
? `translateX(-${activeItem}00%)`
|
|
670
|
+
: `translateX(-${activeItem * Number(cardWidth)}px)`;
|
|
671
|
+
return (jsx("div", { className: "w-auto flex flex-1 duration-1000", style: { transform: `${cardFullViewStyles}` }, role: "list", children: children }));
|
|
672
|
+
});
|
|
673
|
+
|
|
674
|
+
const Carousel = JSX(({ cardFullViewCount = 1, children, cardWidth = '1007', className = '', isBlur = true, isCyclic = false, block, ...rest }) => {
|
|
675
|
+
const blurClasses = isBlur ? 'absolute top-0 bottom-0 w-[84px]' : '';
|
|
676
|
+
const { blocks: childBlocks } = block || {};
|
|
677
|
+
const childBlocksLength = childBlocks !== undefined ? childBlocks.length : 0;
|
|
678
|
+
const isScrollAvailable = childBlocksLength > cardFullViewCount;
|
|
679
|
+
const [activeIndex, controls] = useCarouselControls({
|
|
680
|
+
itemsCount: childBlocksLength,
|
|
681
|
+
visibleItemCount: cardFullViewCount,
|
|
682
|
+
isCyclic,
|
|
683
|
+
});
|
|
684
|
+
const { inc, dec, canDec, canInc } = controls;
|
|
685
|
+
return (jsxs(BlockWrapper, { className: `box-border h-full relative font-sans flex flex-col justify-center overflow-hidden ${className}`, ...rest, children: [jsx(CarouselContainer, { activeItem: activeIndex, cardFullViewCount: cardFullViewCount, cardWidth: cardWidth, children: children }), isScrollAvailable ? (jsx("div", { children: renderArrows({
|
|
686
|
+
handler: [dec, inc],
|
|
687
|
+
isShown: [canDec, canInc],
|
|
688
|
+
btnClass: ['left-8', 'right-8'],
|
|
689
|
+
className: 'top-1/2 z-10',
|
|
690
|
+
}) })) : null, isScrollAvailable ? (jsxs("div", { children: [jsx("div", { className: `${blurClasses} left-0 bg-opacity-from-white` }), jsx("div", { className: `${blurClasses} right-0 bg-opacity-to-white` })] })) : null] }));
|
|
691
|
+
});
|
|
692
|
+
Carousel.childrenTypes = ['CarouselCard', 'CarouselTariffsCard'];
|
|
693
|
+
|
|
694
|
+
const MAX_LINKS_COUNT = 12;
|
|
695
|
+
const CarouselLinks = JSX(({ additionalDescription, description, links, title, className = '', ...rest }) => {
|
|
696
|
+
return (jsxs(BlockWrapper, { className: `bg-primary-main flex w-full p-10 overflow-hidden justify-between font-sans ${className}`, ...rest, children: [jsxs("div", { className: "flex flex-col max-w-96 pr-9 text-white text-xl-light", children: [title ? jsx(Heading, { title: title, as: "h1", headingType: "h0", className: "pb-0.5" }) : null, description ? (jsx("div", { className: "pt-5", children: jsx(Paragraph, { size: "text-xl", font: "font-light", children: description }) })) : null, additionalDescription ? (jsx("div", { className: "pt-6", children: jsx(Paragraph, { children: additionalDescription }) })) : null] }), links?.length ? renderLinks(links) : null] }));
|
|
697
|
+
});
|
|
698
|
+
const renderLinks = (links) => {
|
|
699
|
+
const slicedLinks = sliceArray(links, MAX_LINKS_COUNT);
|
|
700
|
+
const slides = slicedLinks.map((slide) => (jsx("div", { className: "w-[672px] min-w-[672px] ml-20 mr-20 flex flex-wrap self-start", children: slide.map((link, index) => (jsx(LinkButton, { className: "m-1", ...link }, String(index)))) })));
|
|
701
|
+
return (jsx(Carousel, { className: "min-w-[832px] w-[832px]", isBlur: false, cardFullViewCount: 1, cardWidth: '832', isCyclic: true, block: { type: 'Carousel', blocks: slides }, children: slides }));
|
|
702
|
+
};
|
|
703
|
+
|
|
704
|
+
const VersionStyleMap = {
|
|
705
|
+
primary: 'bg-white text-primary-text',
|
|
706
|
+
secondary: 'bg-primary-main text-white',
|
|
707
|
+
};
|
|
708
|
+
|
|
709
|
+
const getIconWithVersion = (icon, version = 'primary') => ({
|
|
710
|
+
...icon,
|
|
711
|
+
iconVersion: icon?.iconVersion ?? (version === 'secondary' ? 'white' : 'color'),
|
|
712
|
+
});
|
|
713
|
+
|
|
714
|
+
const benefitsTextStyleMap = {
|
|
715
|
+
primary: '',
|
|
716
|
+
secondary: 'text-white',
|
|
717
|
+
};
|
|
718
|
+
const benefitsDescriptionStyleMap = {
|
|
719
|
+
primary: 'text-secondary-text',
|
|
720
|
+
secondary: 'text-white opacity-80',
|
|
721
|
+
};
|
|
722
|
+
const benefitsIconStyleMap = {
|
|
723
|
+
primary: 'bg-main-divider text-primary-main',
|
|
724
|
+
secondary: 'bg-white/30 text-black',
|
|
725
|
+
};
|
|
726
|
+
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] })));
|
|
727
|
+
const renderStep = (version) => (benefit, i) => {
|
|
728
|
+
const description = benefit.description;
|
|
729
|
+
return (jsxs("div", { className: "flex items-center basis-1/2 max-w-[500px] mb-14", children: [benefit?.icon?.icon ? (jsx(ImgInner, { className: `w-[50px] h-[50px] min-w-[50px] 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$3(description, version)] })] }, String(i)));
|
|
730
|
+
};
|
|
731
|
+
const renderDescription$3 = (description, version) => {
|
|
732
|
+
const benefitType = description?.benefitType || null;
|
|
733
|
+
return description && benefitType ? (jsx("div", { className: `text-l-light mt-2 ${benefitsDescriptionStyleMap[version]}`, children: benefitType === 'list'
|
|
734
|
+
? renderListBenefit(description)
|
|
735
|
+
: renderTextBenefit(description) })) : null;
|
|
736
|
+
};
|
|
737
|
+
const renderTextBenefit = (description) => description?.name || null;
|
|
738
|
+
const renderListBenefit = (description) => {
|
|
739
|
+
const listStyleType = description?.bullets ? 'list-disc pl-6' : '';
|
|
740
|
+
return description?.items && description.items.length > 0 ? (jsx("ul", { className: listStyleType, children: description.items.map((_, i) => (jsx("li", { children: _ }, `benefitListItem-${i}`))) })) : null;
|
|
741
|
+
};
|
|
742
|
+
|
|
643
743
|
const ButtonSection = JSX(({ className = '', buttons }) => buttons && buttons?.length ? (jsx("div", { className: className, children: buttons.map((button, index) => renderButton({ button, index })) })) : null);
|
|
644
744
|
function renderButton({ button, buttonClassName, index }) {
|
|
645
745
|
const { icon, iconRight, version, ...rest } = button;
|
|
@@ -656,11 +756,6 @@
|
|
|
656
756
|
return jsx(ImgInner, { image: { ...icon }, width: iconWidth, height: "24", asSVG: true });
|
|
657
757
|
};
|
|
658
758
|
|
|
659
|
-
const Description = JSX((props) => {
|
|
660
|
-
const { className = '', description } = props;
|
|
661
|
-
return jsx("div", { className: `${className}`, children: description });
|
|
662
|
-
});
|
|
663
|
-
|
|
664
759
|
const HEADLINE_BLOCK_STYLE_MAPS = {
|
|
665
760
|
transparent: {
|
|
666
761
|
background: 'bg-transparent',
|
|
@@ -709,6 +804,12 @@
|
|
|
709
804
|
headingType: 'h4',
|
|
710
805
|
as: 'h4',
|
|
711
806
|
},
|
|
807
|
+
XS: {
|
|
808
|
+
descriptionFont: 'text-l-light',
|
|
809
|
+
gap: 'gap-2',
|
|
810
|
+
headingType: 'h5',
|
|
811
|
+
as: 'h5',
|
|
812
|
+
},
|
|
712
813
|
};
|
|
713
814
|
const HEADLINE_SMALL_VERSION = {
|
|
714
815
|
H6: 'text-h6',
|
|
@@ -724,7 +825,7 @@
|
|
|
724
825
|
const Headline = JSX(({ className = '', bgColorHeadline = 'transparent', align = 'center', title, description, headlineVersion = 'XL', as, ...rest }) => {
|
|
725
826
|
const STYLE_MAPS = HEADLINE_BLOCK_STYLE_MAPS[bgColorHeadline];
|
|
726
827
|
const SIZE_MAPS = HEADLINE_VERSION[headlineVersion];
|
|
727
|
-
return (jsxs(BlockWrapper, { className: `font-sans flex flex-col p-[50px] ${SIZE_MAPS.gap} ${STYLE_MAPS.background} ${className}`, ...rest, children: [title ? (jsx(Heading, { headingType: SIZE_MAPS?.headingType, as: as || SIZE_MAPS?.as, className: `whitespace-pre-wrap ${STYLE_MAPS.text} ${AlignText[align]}`, title: title })) : null, description ? (jsx(
|
|
828
|
+
return (jsxs(BlockWrapper, { className: `font-sans flex flex-col p-[50px] ${SIZE_MAPS.gap} ${STYLE_MAPS.background} ${className}`, ...rest, children: [title ? (jsx(Heading, { headingType: SIZE_MAPS?.headingType, as: as || SIZE_MAPS?.as, className: `whitespace-pre-wrap ${STYLE_MAPS.text} ${AlignText[align]}`, title: title })) : null, description ? (jsx("p", { className: `${SIZE_MAPS.descriptionFont} ${STYLE_MAPS.text} ${AlignText[align]}`, children: description })) : null] }));
|
|
728
829
|
});
|
|
729
830
|
|
|
730
831
|
const Bonus = JSX((props) => {
|
|
@@ -760,14 +861,6 @@
|
|
|
760
861
|
|
|
761
862
|
const BusinessBlock = JSX(({ className = '', title, cards, ...rest }) => (jsxs(BlockWrapper, { className: `font-sans bg-white p-[50px] pb-9 ${className}`, ...rest, children: [jsx(Heading, { headingType: "h3", title: title, className: "text-center mb-8" }), jsx("div", { className: "flex gap-5", children: cards?.length ? cards.map((_, i) => jsx(BusinessCard, { ..._ }, String(i))) : null })] })));
|
|
762
863
|
|
|
763
|
-
const ArrowButton = JSX(({ className, disabled, ...rest }) => (jsx(Button, { rounded: true, className: `group shadow-[0_4px_25px_rgba(0,0,0,0.07)] w-12 h-12 min-h-12 max-h-12 flex items-center justify-center ${disabled
|
|
764
|
-
? 'bg-secondary-light text-secondary-text'
|
|
765
|
-
: 'bg-white text-primary-text hover:text-primary-main'} ${className || ''}`, disabled: disabled, ...rest, children: jsx(ImgInner, { className: "w-4 h-4 min-w-4 min-h-4 rounded-full box-border", image: { icon: 'ArrowLeftIcon', iconVersion: 'black' }, imageClassName: "group-hover:text-primary-main", width: "16", height: "16", asSVG: true }) })));
|
|
766
|
-
|
|
767
|
-
function renderArrows({ handler, isShown, btnClass, className = '', isDisabled = false, }) {
|
|
768
|
-
return (jsxs("div", { children: [isShown[0] || isDisabled ? (jsx(ArrowButton, { className: `absolute z-10 ${btnClass[0]} ${className}`, onClick: handler[0], ariaLabel: "\u041F\u0440\u043E\u043B\u0438\u0441\u0442\u0430\u0442\u044C \u0432\u043B\u0435\u0432\u043E", "data-block-control": "scroll-left", disabled: !isShown[0] })) : null, isShown[1] || isDisabled ? (jsx(ArrowButton, { className: `absolute z-10 rotate-180 ${btnClass[1]} ${className}`, onClick: handler[1], ariaLabel: "\u041F\u0440\u043E\u043B\u0438\u0441\u0442\u0430\u0442\u044C \u0432\u043F\u0440\u0430\u0432\u043E", "data-block-control": "scroll-right", disabled: !isShown[1] })) : null] }));
|
|
769
|
-
}
|
|
770
|
-
|
|
771
864
|
const addSpacesBetweenNumbers = (number) => new Intl.NumberFormat('ru-RU', { maximumSignificantDigits: 3 }).format(number);
|
|
772
865
|
|
|
773
866
|
const CalculatorValueBlock = JSX(({ title, value, postfix = '', prefix, className = '' }) => {
|
|
@@ -1242,53 +1335,6 @@
|
|
|
1242
1335
|
return (jsxs(BlockWrapper, { className: `p-[50px] flex flex-col items-center font-sans bg-white ${className}`, ...rest, children: [title ? jsx(Heading, { className: "max-w-[684px] pb-9", headingType: "h2", title: title }) : null, jsxs("form", { className: "w-[468px]", method: "POST", action: FORM_URL, children: [jsx(CurrencyInput, { name: AMOUNT_KEY, value: value, onChange: setValue, valid: value === '' || !isDisabled, placeholder: placeholder, label: label }), button?.text ? (jsx("button", { type: "submit", className: `w-full p-4 mt-6 ${buttonStyle} `, disabled: isDisabled, ...link(button), children: button.text })) : null] })] }));
|
|
1243
1336
|
});
|
|
1244
1337
|
|
|
1245
|
-
const useCarouselControls = ({ itemsCount, visibleItemCount = itemsCount, isCyclic, }) => {
|
|
1246
|
-
const [activeIndex, setActiveIndex] = useState(0);
|
|
1247
|
-
const inc = useCallback(() => setActiveIndex((_) => (isCyclic ? (_ + 1) % itemsCount : Math.min(_ + 1, itemsCount - 1))), [isCyclic, itemsCount]);
|
|
1248
|
-
const dec = useCallback(() => setActiveIndex((_) => (isCyclic ? (itemsCount + _ - 1) % itemsCount : Math.max(_ - 1, 0))), [isCyclic, itemsCount]);
|
|
1249
|
-
const isScrollAvailable = itemsCount > visibleItemCount;
|
|
1250
|
-
const isCyclicAndScrollAvailable = isCyclic && isScrollAvailable;
|
|
1251
|
-
const canInc = isCyclicAndScrollAvailable ||
|
|
1252
|
-
(isScrollAvailable && itemsCount - activeIndex > visibleItemCount);
|
|
1253
|
-
const canDec = isCyclicAndScrollAvailable || Boolean(isScrollAvailable && activeIndex > 0);
|
|
1254
|
-
return [
|
|
1255
|
-
activeIndex,
|
|
1256
|
-
{
|
|
1257
|
-
inc,
|
|
1258
|
-
dec,
|
|
1259
|
-
canInc,
|
|
1260
|
-
canDec,
|
|
1261
|
-
},
|
|
1262
|
-
];
|
|
1263
|
-
};
|
|
1264
|
-
|
|
1265
|
-
const CarouselContainer = JSX(({ children, activeItem, cardFullViewCount, cardWidth }) => {
|
|
1266
|
-
const cardFullViewStyles = cardFullViewCount === 1
|
|
1267
|
-
? `translateX(-${activeItem}00%)`
|
|
1268
|
-
: `translateX(-${activeItem * Number(cardWidth)}px)`;
|
|
1269
|
-
return (jsx("div", { className: "w-auto flex flex-1 duration-1000", style: { transform: `${cardFullViewStyles}` }, role: "list", children: children }));
|
|
1270
|
-
});
|
|
1271
|
-
|
|
1272
|
-
const Carousel = JSX(({ cardFullViewCount = 1, children, cardWidth = '1007', className = '', isBlur = true, isCyclic = false, block, ...rest }) => {
|
|
1273
|
-
const blurClasses = isBlur ? 'absolute top-0 bottom-0 w-[84px]' : '';
|
|
1274
|
-
const { blocks: childBlocks } = block || {};
|
|
1275
|
-
const childBlocksLength = childBlocks !== undefined ? childBlocks.length : 0;
|
|
1276
|
-
const isScrollAvailable = childBlocksLength > cardFullViewCount;
|
|
1277
|
-
const [activeIndex, controls] = useCarouselControls({
|
|
1278
|
-
itemsCount: childBlocksLength,
|
|
1279
|
-
visibleItemCount: cardFullViewCount,
|
|
1280
|
-
isCyclic,
|
|
1281
|
-
});
|
|
1282
|
-
const { inc, dec, canDec, canInc } = controls;
|
|
1283
|
-
return (jsxs(BlockWrapper, { className: `box-border h-full relative font-sans flex flex-col justify-center overflow-hidden ${className}`, ...rest, children: [jsx(CarouselContainer, { activeItem: activeIndex, cardFullViewCount: cardFullViewCount, cardWidth: cardWidth, children: children }), isScrollAvailable ? (jsx("div", { children: renderArrows({
|
|
1284
|
-
handler: [dec, inc],
|
|
1285
|
-
isShown: [canDec, canInc],
|
|
1286
|
-
btnClass: ['left-8', 'right-8'],
|
|
1287
|
-
className: 'top-1/2 z-10',
|
|
1288
|
-
}) })) : null, isScrollAvailable ? (jsxs("div", { children: [jsx("div", { className: `${blurClasses} left-0 bg-opacity-from-white` }), jsx("div", { className: `${blurClasses} right-0 bg-opacity-to-white` })] })) : null] }));
|
|
1289
|
-
});
|
|
1290
|
-
Carousel.childrenTypes = ['CarouselCard', 'CarouselTariffsCard'];
|
|
1291
|
-
|
|
1292
1338
|
const BLOCK_CLASSES = 'absolute border border-solid border-main-stroke w-[100%] h-[100%]';
|
|
1293
1339
|
const CARD_STYLE_MAP = {
|
|
1294
1340
|
normal: 'min-w-[100%] justify-center items-center my-7 col-span-12',
|
|
@@ -1414,16 +1460,11 @@
|
|
|
1414
1460
|
});
|
|
1415
1461
|
const renderShowMoreToggleButton = ({ isShowAllRow, onClick, }) => (jsx("div", { className: "pr-[50px]", children: jsxs("div", { className: "flex w-full", children: [jsx("div", { className: FIRST_CELL_CLASSES$1 }), jsx("button", { onClick: onClick, className: "mt-5 flex-1 border-main-stroke border-solid border text-primary-text bg-white hover:border-primary-main hover:text-primary-main", children: jsx("div", { className: "font-sans text-xs-light font-medium py-3", children: !isShowAllRow ? 'Показать все параметры' : 'Скрыть' }) })] }) }));
|
|
1416
1462
|
|
|
1417
|
-
const contactsBlockStyleMap = {
|
|
1418
|
-
primary: 'bg-white',
|
|
1419
|
-
secondary: 'bg-primary-main text-white',
|
|
1420
|
-
};
|
|
1421
1463
|
const ContactsBlock = JSX(({ className = '', contacts, info, version = 'secondary', ...rest }) => {
|
|
1422
|
-
return (jsxs(BlockWrapper, { className: `${
|
|
1464
|
+
return (jsxs(BlockWrapper, { className: `${VersionStyleMap[version]} flex p-[50px] ${className}`, ...rest, children: [info?.length ? renderBlocks(info, version) : null, contacts?.length ? renderBlocks(contacts, version) : null] }));
|
|
1423
1465
|
});
|
|
1424
|
-
const
|
|
1425
|
-
const
|
|
1426
|
-
const renderContactsColumn = ({ contactsColumn, index }) => contactsColumn ? (jsx("div", { className: "flex flex-col grow basis-0 pr-11", children: contactsColumn.map(({ title, description, additionalDescription }, key) => (jsxs("div", { className: "pr-11 last:pr-0 last:mt-5", children: [jsx(Heading, { as: "h5", headingType: "h5", title: title }), jsx(Description, { className: "text-l-light mt-2.5", description: description }), additionalDescription ? (jsx(Description, { className: "text-m-light mt-1.5 opacity-80", description: additionalDescription })) : null] }, String(key)))) }, String(index))) : null;
|
|
1466
|
+
const renderBlocks = (info, version) => (jsx("div", { className: "flex grow basis-0", children: info.map((column, index) => renderBlocksColumn({ column, index, version })) }));
|
|
1467
|
+
const renderBlocksColumn = ({ column, index, version }) => column ? (jsx("div", { className: "flex flex-col grow basis-0 pr-11 last:pr-0", children: column.map(({ title = '', description, additionalDescription, button }, key) => (jsxs("div", { className: "mt-6 first:mt-0", children: [jsx(Headline, { className: "!p-0", title: title, description: description, headlineVersion: "XS", align: "left", bgColorHeadline: version }), additionalDescription ? (jsx("div", { className: "mt-1.5 opacity-80", children: jsx(Paragraph, { size: "text-m-light", children: additionalDescription }) })) : null, button ? jsx(Button, { className: "mt-6", ...button }) : null] }, String(key)))) }, `col-${String(index)}`)) : null;
|
|
1427
1468
|
|
|
1428
1469
|
const renderErrorContent = (error) => {
|
|
1429
1470
|
if (error?.errorContentType === 'Image' && error?.image) {
|
|
@@ -2174,7 +2215,7 @@
|
|
|
2174
2215
|
return (jsx("section", { className: `relative overflow-hidden text-left border border-solid box-border
|
|
2175
2216
|
p-9 min-w-[697px] min-h-[319px]
|
|
2176
2217
|
${BorderVersionStyleMap[version]}
|
|
2177
|
-
${className}`, role: "listitem", children: jsx(BaseTile, { className: "flex justify-between", title: tileTitle, image: tileImage, children: jsxs("div", { className: "flex flex-col justify-between", children: [jsxs("div", { className: "flex itens-center justify-between mb-4", children: [description ? jsx(
|
|
2218
|
+
${className}`, role: "listitem", children: jsx(BaseTile, { className: "flex justify-between", title: tileTitle, image: tileImage, children: jsxs("div", { className: "flex flex-col justify-between", children: [jsxs("div", { className: "flex itens-center justify-between mb-4", children: [description ? jsx("span", { className: "text-h6", children: description }) : null, additionalDescription ? (jsxs("span", { className: "text-m-light text-secondary-text", children: [" ", additionalDescription, " "] })) : null] }), cardList?.length ? (jsx("div", { className: `${cardColumnsModeStyleMap[columnsMode]}`, role: "list", children: renderCardList(cardList, columnsMode) })) : null] }) }) }));
|
|
2178
2219
|
});
|
|
2179
2220
|
const renderCardList = (cardList, columnsMode) => cardList.map((item, i) => (jsxs("div", { className: columnsMode === 'double' ? 'basis-[calc(50%-20px)]' : '', role: "listitem", children: [item?.parameter ? (jsx("span", { className: `pr-2.5 ${getItemListFontSize(columnsMode)}`, children: item.parameter })) : null, item?.parameterDesccription ? (jsx("span", { className: "text-m-light text-secondary-text", children: item.parameterDesccription })) : null] }, String(i))));
|
|
2180
2221
|
|
|
@@ -2960,7 +3001,7 @@
|
|
|
2960
3001
|
const RecommendationCard = JSX(({ className = '', title, description, items, image, version, socialMedia, button }) => {
|
|
2961
3002
|
const tileTitle = title ? (jsx(Heading, { headingType: "h5", as: "h3", className: "mb-3.5 z-10", title: title })) : null;
|
|
2962
3003
|
const tileImage = image?.src ? (jsx(ImgInner, { className: "absolute bottom-0 right-0 m-0", image: image })) : null;
|
|
2963
|
-
return (jsx("section", { className: `relative overflow-hidden text-left border border-solid box-border p-7 min-w-[524px] min-h-[218px] ${className}`, role: "listitem", children: jsx(BaseTile, { className: "flex justify-between", title: tileTitle, image: tileImage, children: jsxs("div", { className: "h-full flex flex-col justify-between", children: [description ? jsx(
|
|
3004
|
+
return (jsx("section", { className: `relative overflow-hidden text-left border border-solid box-border p-7 min-w-[524px] min-h-[218px] ${className}`, role: "listitem", children: jsx(BaseTile, { className: "flex justify-between", title: tileTitle, image: tileImage, children: jsxs("div", { className: "h-full flex flex-col justify-between", children: [description ? jsx("span", { className: "mb-2", children: description }) : null, items?.length ? (jsx(List, { className: "text-xl-light flex flex-col flex-1 gap-2 max-w-[236px]", items: items, version: version })) : null, socialMedia ? (jsx(SocialMedia, { className: "pt-10 pb-0", media: socialMedia, version: version })) : null, button?.text ? (jsx("div", { className: "pt-2", children: renderButton({ button, buttonClassName: 'mt-16' }) })) : null] }) }) }));
|
|
2964
3005
|
});
|
|
2965
3006
|
|
|
2966
3007
|
const BLUR_BLOCK_CLASSES = 'absolute top-0 bottom-0 w-[84px]';
|
|
@@ -3508,7 +3549,7 @@
|
|
|
3508
3549
|
const Tile = JSX((props) => {
|
|
3509
3550
|
const { title, headingType = 'h3', description, items, buttons, image, isDotted = true, listItemSize = 'M', className = '', version = 'primary', tags, children, ...rest } = props;
|
|
3510
3551
|
const headingClassName = version === 'primary' ? 'text-primary-text' : '';
|
|
3511
|
-
return (jsx(BlockWrapper, { className: `overflow-hidden font-sans p-9 pr-3 box-border ${className} ${VersionStyleMap[version]} ${getTileRightPadding(className)} ${getTileMinHeight(className)} `, ...rest, children: jsxs(BaseTile, { title: title ? (jsx(Heading, { headingType: headingType, as: "h2", title: title, className: `whitespace-pre-wrap max-w-[600px] ${headingClassName}` })) : null, buttons: buttons?.length ? (jsx(ButtonSection, { buttons: buttons.map((button) => ({ ...button, className: 'min-w-[158px]' })), className: "flex mt-8 gap-3", ...rest })) : null, image: image?.src ? jsx(ImgInner, { className: "mt-auto ml-7", image: image }) : null, children: [description ? (jsx(
|
|
3552
|
+
return (jsx(BlockWrapper, { className: `overflow-hidden font-sans p-9 pr-3 box-border ${className} ${VersionStyleMap[version]} ${getTileRightPadding(className)} ${getTileMinHeight(className)} `, ...rest, children: jsxs(BaseTile, { title: title ? (jsx(Heading, { headingType: headingType, as: "h2", title: title, className: `whitespace-pre-wrap max-w-[600px] ${headingClassName}` })) : null, buttons: buttons?.length ? (jsx(ButtonSection, { buttons: buttons.map((button) => ({ ...button, className: 'min-w-[158px]' })), className: "flex mt-8 gap-3", ...rest })) : null, image: image?.src ? jsx(ImgInner, { className: "mt-auto ml-7", image: image }) : null, children: [description ? (jsx("div", { className: "max-w-[600px] mt-2.5", children: jsx(Paragraph, { size: "text-xl-light", children: description }) })) : null, children, renderList({ version, isDotted, listItemSize }, items), tags?.length ? jsx(Tags, { tags: tags, className: "mt-5" }) : null] }) }));
|
|
3512
3553
|
});
|
|
3513
3554
|
function renderList({ version, isDotted, listItemSize }, items) {
|
|
3514
3555
|
return items?.length ? (jsx(List, { items: items, isDotted: isDotted, className: "mt-2.5", listItemSize: listItemSize, itemClassName: "mb-1.5", version: version })) : null;
|
|
@@ -3547,6 +3588,7 @@
|
|
|
3547
3588
|
const Blocks = {
|
|
3548
3589
|
Accordion,
|
|
3549
3590
|
AccordionItem,
|
|
3591
|
+
CarouselLinks,
|
|
3550
3592
|
BenefitsBlock,
|
|
3551
3593
|
BusinessBlock,
|
|
3552
3594
|
Bonus,
|
|
@@ -3698,7 +3740,7 @@
|
|
|
3698
3740
|
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" }) }));
|
|
3699
3741
|
}
|
|
3700
3742
|
|
|
3701
|
-
const packageVersion = "0.6.
|
|
3743
|
+
const packageVersion = "0.6.33";
|
|
3702
3744
|
|
|
3703
3745
|
exports.Blocks = Blocks;
|
|
3704
3746
|
exports.ContentPage = ContentPage;
|