@redneckz/wildless-cms-uni-blocks 0.8.24 → 0.8.25
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/blocks.schema.json +1 -1
- package/bundle/bundle.umd.js +159 -178
- package/bundle/bundle.umd.min.js +1 -1
- package/bundle/components/Headline/HeadlineContent.d.ts +2 -0
- package/bundle/components/RollupItem/RollupItem.mobile.d.ts +5 -0
- package/dist/components/Accordion/Accordion.js +2 -3
- package/dist/components/Accordion/Accordion.js.map +1 -1
- package/dist/components/Accordion/Accordion.mobile.js +2 -3
- package/dist/components/Accordion/Accordion.mobile.js.map +1 -1
- package/dist/components/BenefitsBlock/BenefitsBlock.js +1 -1
- package/dist/components/BenefitsBlock/BenefitsBlock.js.map +1 -1
- package/dist/components/Blocks.js +0 -4
- package/dist/components/Blocks.js.map +1 -1
- package/dist/components/Blocks.mobile.js +4 -2
- package/dist/components/Blocks.mobile.js.map +1 -1
- package/dist/components/BonusBenefitsBlock/BonusBenefitsBlock.js +2 -1
- package/dist/components/BonusBenefitsBlock/BonusBenefitsBlock.js.map +1 -1
- package/dist/components/CarouselLinks/CarouselLinks.js +1 -1
- package/dist/components/CarouselLinks/CarouselLinks.js.map +1 -1
- package/dist/components/Footer/Footer.mobile.js +3 -3
- package/dist/components/Footer/Footer.mobile.js.map +1 -1
- package/dist/components/Header/Header.mobile.js +2 -3
- package/dist/components/Header/Header.mobile.js.map +1 -1
- package/dist/components/Headline/Headline.js +3 -2
- package/dist/components/Headline/Headline.js.map +1 -1
- package/dist/components/Headline/HeadlineContent.d.ts +2 -0
- package/dist/components/RollupItem/RollupItem.js +9 -4
- package/dist/components/RollupItem/RollupItem.js.map +1 -1
- package/dist/components/RollupItem/RollupItem.mobile.d.ts +5 -0
- package/dist/components/RollupItem/RollupItem.mobile.js +33 -0
- package/dist/components/RollupItem/RollupItem.mobile.js.map +1 -0
- package/dist/ui-kit/Icon/Icon.js +4 -1
- package/dist/ui-kit/Icon/Icon.js.map +1 -1
- package/dist/ui-kit/List/List.js +1 -1
- package/dist/ui-kit/List/List.js.map +1 -1
- package/dist/ui-kit/SwipeListControl/SwipeListContainer.js +1 -1
- package/dist/ui-kit/SwipeListControl/SwipeListContainer.js.map +1 -1
- package/dist/ui-kit/SwipeListControl/SwipeListItem.js +1 -1
- package/dist/ui-kit/SwipeListControl/SwipeListItem.js.map +1 -1
- package/lib/common.css +1 -1
- package/lib/components/Accordion/Accordion.fixture.d.ts +0 -2
- package/lib/components/Accordion/Accordion.fixture.mobile.d.ts +1 -1
- package/lib/components/Accordion/Accordion.js +2 -3
- package/lib/components/Accordion/Accordion.js.map +1 -1
- package/lib/components/Accordion/Accordion.mobile.js +2 -3
- package/lib/components/Accordion/Accordion.mobile.js.map +1 -1
- package/lib/components/BenefitsBlock/BenefitsBlock.js +1 -1
- package/lib/components/BenefitsBlock/BenefitsBlock.js.map +1 -1
- package/lib/components/Blocks.js +0 -4
- package/lib/components/Blocks.js.map +1 -1
- package/lib/components/Blocks.mobile.js +4 -2
- package/lib/components/Blocks.mobile.js.map +1 -1
- package/lib/components/BonusBenefitsBlock/BonusBenefitsBlock.js +2 -1
- package/lib/components/BonusBenefitsBlock/BonusBenefitsBlock.js.map +1 -1
- package/lib/components/CarouselLinks/CarouselLinks.js +1 -1
- package/lib/components/CarouselLinks/CarouselLinks.js.map +1 -1
- package/lib/components/Footer/Footer.mobile.js +3 -3
- package/lib/components/Footer/Footer.mobile.js.map +1 -1
- package/lib/components/Header/Header.mobile.js +2 -3
- package/lib/components/Header/Header.mobile.js.map +1 -1
- package/lib/components/Headline/Headline.js +3 -2
- package/lib/components/Headline/Headline.js.map +1 -1
- package/lib/components/Headline/HeadlineContent.d.ts +2 -0
- package/lib/components/{AccordionItem/AccordionItem.fixture.d.ts → RollupItem/RollupItem.fixture.mobile.d.ts} +2 -0
- package/lib/components/RollupItem/RollupItem.js +9 -4
- package/lib/components/RollupItem/RollupItem.js.map +1 -1
- package/lib/components/RollupItem/RollupItem.mobile.d.ts +5 -0
- package/lib/components/RollupItem/RollupItem.mobile.js +31 -0
- package/lib/components/RollupItem/RollupItem.mobile.js.map +1 -0
- package/lib/ui-kit/Foldable/DefaultFoldButton.d.ts +0 -1
- package/lib/ui-kit/Icon/Icon.js +4 -1
- package/lib/ui-kit/Icon/Icon.js.map +1 -1
- package/lib/ui-kit/List/List.js +1 -1
- package/lib/ui-kit/List/List.js.map +1 -1
- package/lib/ui-kit/SwipeListControl/SwipeListContainer.js +1 -1
- package/lib/ui-kit/SwipeListControl/SwipeListContainer.js.map +1 -1
- package/lib/ui-kit/SwipeListControl/SwipeListItem.js +1 -1
- package/lib/ui-kit/SwipeListControl/SwipeListItem.js.map +1 -1
- package/mobile/bundle/bundle.umd.js +204 -154
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/bundle/components/Headline/HeadlineContent.d.ts +2 -0
- package/mobile/dist/components/Accordion/Accordion.js +2 -3
- package/mobile/dist/components/Accordion/Accordion.js.map +1 -1
- package/mobile/dist/components/BenefitsBlock/BenefitsBlock.js +1 -1
- package/mobile/dist/components/BenefitsBlock/BenefitsBlock.js.map +1 -1
- package/mobile/dist/components/Blocks.js +4 -2
- package/mobile/dist/components/Blocks.js.map +1 -1
- package/mobile/dist/components/BonusBenefitsBlock/BonusBenefitsBlock.js +2 -1
- package/mobile/dist/components/BonusBenefitsBlock/BonusBenefitsBlock.js.map +1 -1
- package/mobile/dist/components/CarouselLinks/CarouselLinks.js +1 -1
- package/mobile/dist/components/CarouselLinks/CarouselLinks.js.map +1 -1
- package/mobile/dist/components/Footer/Footer.js +3 -3
- package/mobile/dist/components/Footer/Footer.js.map +1 -1
- package/mobile/dist/components/Header/Header.js +2 -3
- package/mobile/dist/components/Header/Header.js.map +1 -1
- package/mobile/dist/components/Headline/Headline.js +3 -2
- package/mobile/dist/components/Headline/Headline.js.map +1 -1
- package/mobile/dist/components/Headline/HeadlineContent.d.ts +2 -0
- package/mobile/dist/components/RollupItem/RollupItem.js +17 -5
- package/mobile/dist/components/RollupItem/RollupItem.js.map +1 -1
- package/mobile/dist/ui-kit/Icon/Icon.js +4 -1
- package/mobile/dist/ui-kit/Icon/Icon.js.map +1 -1
- package/mobile/dist/ui-kit/List/List.js +1 -1
- package/mobile/dist/ui-kit/List/List.js.map +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/dist/ui-kit/SwipeListControl/SwipeListItem.js +1 -1
- package/mobile/dist/ui-kit/SwipeListControl/SwipeListItem.js.map +1 -1
- package/mobile/lib/components/Accordion/Accordion.js +2 -3
- package/mobile/lib/components/Accordion/Accordion.js.map +1 -1
- package/mobile/lib/components/BenefitsBlock/BenefitsBlock.js +1 -1
- package/mobile/lib/components/BenefitsBlock/BenefitsBlock.js.map +1 -1
- package/mobile/lib/components/Blocks.js +4 -2
- package/mobile/lib/components/Blocks.js.map +1 -1
- package/mobile/lib/components/BonusBenefitsBlock/BonusBenefitsBlock.js +2 -1
- package/mobile/lib/components/BonusBenefitsBlock/BonusBenefitsBlock.js.map +1 -1
- package/mobile/lib/components/CarouselLinks/CarouselLinks.js +1 -1
- package/mobile/lib/components/CarouselLinks/CarouselLinks.js.map +1 -1
- package/mobile/lib/components/Footer/Footer.js +3 -3
- package/mobile/lib/components/Footer/Footer.js.map +1 -1
- package/mobile/lib/components/Header/Header.js +2 -3
- package/mobile/lib/components/Header/Header.js.map +1 -1
- package/mobile/lib/components/Headline/Headline.js +3 -2
- package/mobile/lib/components/Headline/Headline.js.map +1 -1
- package/mobile/lib/components/Headline/HeadlineContent.d.ts +2 -0
- package/mobile/lib/components/RollupItem/RollupItem.js +17 -5
- package/mobile/lib/components/RollupItem/RollupItem.js.map +1 -1
- package/mobile/lib/ui-kit/Icon/Icon.js +4 -1
- package/mobile/lib/ui-kit/Icon/Icon.js.map +1 -1
- package/mobile/lib/ui-kit/List/List.js +1 -1
- package/mobile/lib/ui-kit/List/List.js.map +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/lib/ui-kit/SwipeListControl/SwipeListItem.js +1 -1
- package/mobile/lib/ui-kit/SwipeListControl/SwipeListItem.js.map +1 -1
- package/mobile/src/components/Accordion/Accordion.example.json +3 -3
- package/mobile/src/components/Accordion/Accordion.tsx +2 -3
- package/mobile/src/components/BenefitsBlock/BenefitsBlock.tsx +1 -1
- package/mobile/src/components/Blocks.ts +4 -2
- package/mobile/src/components/BonusBenefitsBlock/BonusBenefitsBlock.tsx +10 -3
- package/mobile/src/components/CarouselLinks/CarouselLinks.tsx +1 -1
- package/mobile/src/components/Footer/Footer.tsx +9 -9
- package/mobile/src/components/Header/Header.tsx +5 -6
- package/mobile/src/components/Headline/Headline.tsx +4 -1
- package/mobile/src/components/Headline/HeadlineContent.ts +2 -0
- package/mobile/src/components/RollupItem/RollupItem.tsx +77 -28
- package/mobile/src/ui-kit/Icon/Icon.tsx +4 -1
- package/mobile/src/ui-kit/List/List.tsx +1 -1
- package/mobile/src/ui-kit/SwipeListControl/SwipeListContainer.tsx +0 -1
- package/mobile/src/ui-kit/SwipeListControl/SwipeListItem.tsx +1 -2
- package/package.json +1 -1
- package/src/components/Accordion/Accordion.example.json +3 -3
- package/src/components/Accordion/Accordion.fixture.mobile.tsx +20 -11
- package/src/components/Accordion/Accordion.fixture.tsx +42 -27
- package/src/components/Accordion/Accordion.mobile.tsx +2 -3
- package/src/components/Accordion/Accordion.tsx +2 -3
- package/src/components/BenefitsBlock/BenefitsBlock.tsx +1 -1
- package/src/components/Blocks.mobile.ts +4 -2
- package/src/components/Blocks.ts +0 -4
- package/src/components/BonusBenefitsBlock/BonusBenefitsBlock.tsx +10 -3
- package/src/components/CarouselBankHistoryCard/CarouselBankHistoryCard.fixture.tsx +2 -2
- package/src/components/CarouselLinks/CarouselLinks.tsx +1 -1
- package/src/components/Footer/Footer.mobile.tsx +9 -9
- package/src/components/Header/Header.mobile.tsx +5 -6
- package/src/components/Headline/Headline.tsx +4 -1
- package/src/components/Headline/HeadlineContent.ts +2 -0
- package/src/components/OtherProducts/OtherProducts.fixture.tsx +15 -14
- package/src/components/RollupItem/RollupItem.fixture.mobile.tsx +33 -0
- package/src/components/RollupItem/RollupItem.mobile.tsx +143 -0
- package/src/components/RollupItem/RollupItem.tsx +17 -13
- package/src/components/VerticalLayout/VerticalLayout.fixture.tsx +1 -0
- package/src/ui-kit/Icon/Icon.tsx +4 -1
- package/src/ui-kit/List/List.tsx +1 -1
- package/src/ui-kit/SwipeListControl/SwipeListContainer.tsx +0 -1
- package/src/ui-kit/SwipeListControl/SwipeListItem.tsx +1 -2
- package/bundle/components/Accordion/AccordionItemsList.d.ts +0 -1
- package/bundle/components/AccordionItem/AccordionItem.d.ts +0 -3
- package/bundle/components/AccordionItem/AccordionItem.mobile.d.ts +0 -3
- package/bundle/components/AccordionItem/AccordionItemContent.d.ts +0 -14
- package/bundle/components/AccordionItem/AccordionItemProps.d.ts +0 -4
- package/bundle/components/OtherProductsItem/OtherProductsItem.d.ts +0 -5
- package/bundle/components/OtherProductsItem/OtherProductsItemContent.d.ts +0 -12
- package/dist/components/Accordion/AccordionItemsList.d.ts +0 -1
- package/dist/components/Accordion/AccordionItemsList.js +0 -6
- package/dist/components/Accordion/AccordionItemsList.js.map +0 -1
- package/dist/components/AccordionItem/AccordionItem.d.ts +0 -3
- package/dist/components/AccordionItem/AccordionItem.js +0 -14
- package/dist/components/AccordionItem/AccordionItem.js.map +0 -1
- package/dist/components/AccordionItem/AccordionItem.mobile.d.ts +0 -3
- package/dist/components/AccordionItem/AccordionItem.mobile.js +0 -19
- package/dist/components/AccordionItem/AccordionItem.mobile.js.map +0 -1
- package/dist/components/AccordionItem/AccordionItemContent.d.ts +0 -14
- package/dist/components/AccordionItem/AccordionItemContent.js +0 -2
- package/dist/components/AccordionItem/AccordionItemContent.js.map +0 -1
- package/dist/components/AccordionItem/AccordionItemProps.d.ts +0 -4
- package/dist/components/AccordionItem/AccordionItemProps.js +0 -2
- package/dist/components/AccordionItem/AccordionItemProps.js.map +0 -1
- package/dist/components/OtherProductsItem/OtherProductsItem.d.ts +0 -5
- package/dist/components/OtherProductsItem/OtherProductsItem.js +0 -18
- package/dist/components/OtherProductsItem/OtherProductsItem.js.map +0 -1
- package/dist/components/OtherProductsItem/OtherProductsItemContent.d.ts +0 -12
- package/dist/components/OtherProductsItem/OtherProductsItemContent.js +0 -2
- package/dist/components/OtherProductsItem/OtherProductsItemContent.js.map +0 -1
- package/lib/components/Accordion/AccordionItemsList.d.ts +0 -1
- package/lib/components/Accordion/AccordionItemsList.js +0 -4
- package/lib/components/Accordion/AccordionItemsList.js.map +0 -1
- package/lib/components/AccordionItem/AccordionItem.d.ts +0 -3
- package/lib/components/AccordionItem/AccordionItem.fixture.mobile.d.ts +0 -5
- package/lib/components/AccordionItem/AccordionItem.js +0 -12
- package/lib/components/AccordionItem/AccordionItem.js.map +0 -1
- package/lib/components/AccordionItem/AccordionItem.mobile.d.ts +0 -3
- package/lib/components/AccordionItem/AccordionItem.mobile.js +0 -17
- package/lib/components/AccordionItem/AccordionItem.mobile.js.map +0 -1
- package/lib/components/AccordionItem/AccordionItemContent.d.ts +0 -14
- package/lib/components/AccordionItem/AccordionItemContent.js +0 -2
- package/lib/components/AccordionItem/AccordionItemContent.js.map +0 -1
- package/lib/components/AccordionItem/AccordionItemProps.d.ts +0 -4
- package/lib/components/AccordionItem/AccordionItemProps.js +0 -2
- package/lib/components/AccordionItem/AccordionItemProps.js.map +0 -1
- package/lib/components/OtherProductsItem/OtherProductsItem.d.ts +0 -5
- package/lib/components/OtherProductsItem/OtherProductsItem.fixture.d.ts +0 -5
- package/lib/components/OtherProductsItem/OtherProductsItem.js +0 -16
- package/lib/components/OtherProductsItem/OtherProductsItem.js.map +0 -1
- package/lib/components/OtherProductsItem/OtherProductsItemContent.d.ts +0 -12
- package/lib/components/OtherProductsItem/OtherProductsItemContent.js +0 -2
- package/lib/components/OtherProductsItem/OtherProductsItemContent.js.map +0 -1
- package/mobile/bundle/components/Accordion/AccordionItemsList.d.ts +0 -1
- package/mobile/bundle/components/AccordionItem/AccordionItem.d.ts +0 -3
- package/mobile/bundle/components/AccordionItem/AccordionItemContent.d.ts +0 -14
- package/mobile/bundle/components/AccordionItem/AccordionItemProps.d.ts +0 -4
- package/mobile/bundle/components/OtherProductsItem/OtherProductsItem.d.ts +0 -5
- package/mobile/bundle/components/OtherProductsItem/OtherProductsItemContent.d.ts +0 -12
- package/mobile/dist/components/Accordion/AccordionItemsList.d.ts +0 -1
- package/mobile/dist/components/Accordion/AccordionItemsList.js +0 -6
- package/mobile/dist/components/Accordion/AccordionItemsList.js.map +0 -1
- package/mobile/dist/components/AccordionItem/AccordionItem.d.ts +0 -3
- package/mobile/dist/components/AccordionItem/AccordionItem.js +0 -19
- package/mobile/dist/components/AccordionItem/AccordionItem.js.map +0 -1
- package/mobile/dist/components/AccordionItem/AccordionItemContent.d.ts +0 -14
- package/mobile/dist/components/AccordionItem/AccordionItemContent.js +0 -2
- package/mobile/dist/components/AccordionItem/AccordionItemContent.js.map +0 -1
- package/mobile/dist/components/AccordionItem/AccordionItemProps.d.ts +0 -4
- package/mobile/dist/components/AccordionItem/AccordionItemProps.js +0 -2
- package/mobile/dist/components/AccordionItem/AccordionItemProps.js.map +0 -1
- package/mobile/dist/components/OtherProductsItem/OtherProductsItem.d.ts +0 -5
- package/mobile/dist/components/OtherProductsItem/OtherProductsItem.js +0 -18
- package/mobile/dist/components/OtherProductsItem/OtherProductsItem.js.map +0 -1
- package/mobile/dist/components/OtherProductsItem/OtherProductsItemContent.d.ts +0 -12
- package/mobile/dist/components/OtherProductsItem/OtherProductsItemContent.js +0 -2
- package/mobile/dist/components/OtherProductsItem/OtherProductsItemContent.js.map +0 -1
- package/mobile/lib/components/Accordion/AccordionItemsList.d.ts +0 -1
- package/mobile/lib/components/Accordion/AccordionItemsList.js +0 -4
- package/mobile/lib/components/Accordion/AccordionItemsList.js.map +0 -1
- package/mobile/lib/components/AccordionItem/AccordionItem.d.ts +0 -3
- package/mobile/lib/components/AccordionItem/AccordionItem.js +0 -17
- package/mobile/lib/components/AccordionItem/AccordionItem.js.map +0 -1
- package/mobile/lib/components/AccordionItem/AccordionItemContent.d.ts +0 -14
- package/mobile/lib/components/AccordionItem/AccordionItemContent.js +0 -2
- package/mobile/lib/components/AccordionItem/AccordionItemContent.js.map +0 -1
- package/mobile/lib/components/AccordionItem/AccordionItemProps.d.ts +0 -4
- package/mobile/lib/components/AccordionItem/AccordionItemProps.js +0 -2
- package/mobile/lib/components/AccordionItem/AccordionItemProps.js.map +0 -1
- package/mobile/lib/components/OtherProductsItem/OtherProductsItem.d.ts +0 -5
- package/mobile/lib/components/OtherProductsItem/OtherProductsItem.js +0 -16
- package/mobile/lib/components/OtherProductsItem/OtherProductsItem.js.map +0 -1
- package/mobile/lib/components/OtherProductsItem/OtherProductsItemContent.d.ts +0 -12
- package/mobile/lib/components/OtherProductsItem/OtherProductsItemContent.js +0 -2
- package/mobile/lib/components/OtherProductsItem/OtherProductsItemContent.js.map +0 -1
- package/mobile/src/components/Accordion/AccordionItemsList.tsx +0 -5
- package/mobile/src/components/AccordionItem/AccordionItem.example.json +0 -25
- package/mobile/src/components/AccordionItem/AccordionItem.tsx +0 -90
- package/mobile/src/components/AccordionItem/AccordionItem.ui.json +0 -7
- package/mobile/src/components/AccordionItem/AccordionItemContent.ts +0 -15
- package/mobile/src/components/AccordionItem/AccordionItemProps.ts +0 -4
- package/mobile/src/components/OtherProductsItem/OtherProductsItem.example.json +0 -22
- package/mobile/src/components/OtherProductsItem/OtherProductsItem.tsx +0 -50
- package/mobile/src/components/OtherProductsItem/OtherProductsItem.ui.json +0 -1
- package/mobile/src/components/OtherProductsItem/OtherProductsItemContent.ts +0 -13
- package/src/components/Accordion/AccordionItemsList.tsx +0 -5
- package/src/components/AccordionItem/AccordionItem.example.json +0 -25
- package/src/components/AccordionItem/AccordionItem.fixture.mobile.tsx +0 -17
- package/src/components/AccordionItem/AccordionItem.fixture.tsx +0 -17
- package/src/components/AccordionItem/AccordionItem.mobile.tsx +0 -90
- package/src/components/AccordionItem/AccordionItem.tsx +0 -58
- package/src/components/AccordionItem/AccordionItem.ui.json +0 -7
- package/src/components/AccordionItem/AccordionItemContent.ts +0 -15
- package/src/components/AccordionItem/AccordionItemProps.ts +0 -4
- package/src/components/OtherProductsItem/OtherProductsItem.example.json +0 -22
- package/src/components/OtherProductsItem/OtherProductsItem.fixture.tsx +0 -20
- package/src/components/OtherProductsItem/OtherProductsItem.tsx +0 -50
- package/src/components/OtherProductsItem/OtherProductsItem.ui.json +0 -1
- package/src/components/OtherProductsItem/OtherProductsItemContent.ts +0 -13
package/bundle/bundle.umd.js
CHANGED
|
@@ -388,132 +388,8 @@
|
|
|
388
388
|
|
|
389
389
|
const Paragraph = JSX(({ children, ...style }) => (jsx("p", { className: ['font-sans', ...Object.values(style)].join(' '), children: children })));
|
|
390
390
|
|
|
391
|
-
const
|
|
392
|
-
|
|
393
|
-
const Accordion = JSX(({ className = '', title, accordionAlignTitle = 'center', description, ...rest }) => (jsxs(BlockWrapper, { className: `p-12 mb-1 last:mb-0 ${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: renderChildren(rest) })] })));
|
|
394
|
-
Accordion.childrenTypes = ['AccordionItem'];
|
|
395
|
-
|
|
396
|
-
const Foldable = JSX(({ className = '', isFoldButtonOnTop = false, unfoldedByDefault = false, renderFoldableSection, renderFoldButton, }) => {
|
|
397
|
-
const [isUnfolded, setIsUnfolded] = useState(unfoldedByDefault);
|
|
398
|
-
const onToggle = useCallback(() => {
|
|
399
|
-
setIsUnfolded((_) => !_);
|
|
400
|
-
}, []);
|
|
401
|
-
const sectionNode = renderFoldableSection({ isUnfolded, onToggle });
|
|
402
|
-
const buttonNode = renderFoldButton ? renderFoldButton({ isUnfolded, onToggle }) : null;
|
|
403
|
-
return isFoldButtonOnTop ? (jsxs("div", { className: className, children: [buttonNode, sectionNode] })) : (jsxs("div", { className: className, children: [sectionNode, buttonNode] }));
|
|
404
|
-
});
|
|
405
|
-
|
|
406
|
-
const FoldableSection = JSX(({ className = '', isUnfolded, children }) => {
|
|
407
|
-
const containerRef = useRef(null);
|
|
408
|
-
useEffect(() => {
|
|
409
|
-
if (containerRef.current) {
|
|
410
|
-
containerRef.current.style.maxHeight = isUnfolded
|
|
411
|
-
? `${containerRef.current.scrollHeight}px`
|
|
412
|
-
: '';
|
|
413
|
-
}
|
|
414
|
-
}, [isUnfolded, children?.length]);
|
|
415
|
-
return (jsx("div", { ref: containerRef, className: `transition-max-h duration-300 overflow-hidden ${containerRef.current || !isUnfolded ? 'max-h-0' : ''} ${className}`, children: children }));
|
|
416
|
-
});
|
|
417
|
-
|
|
418
|
-
function useRouter() {
|
|
419
|
-
return useRouter._impl();
|
|
420
|
-
}
|
|
421
|
-
useRouter._impl = () => ({
|
|
422
|
-
href: globalThis.location?.href || '/',
|
|
423
|
-
pathname: globalThis.location?.pathname || '/',
|
|
424
|
-
query: {},
|
|
425
|
-
push: () => {
|
|
426
|
-
// Do nothing
|
|
427
|
-
},
|
|
428
|
-
replace: () => {
|
|
429
|
-
// Do nothing
|
|
430
|
-
},
|
|
431
|
-
});
|
|
432
|
-
useRouter.setup = (impl) => {
|
|
433
|
-
useRouter._impl = impl;
|
|
434
|
-
};
|
|
435
|
-
|
|
436
|
-
const dirname = (path) => path?.split('/').slice(0, -1).join('/');
|
|
437
|
-
|
|
438
|
-
const isURL = (href) => Boolean(href?.includes(':'));
|
|
439
|
-
const isLocalURL = (href, target) => Boolean(href && !isURL(href) && (!target || target === '_self'));
|
|
440
|
-
const isHash = (href) => Boolean(href?.startsWith('#'));
|
|
441
|
-
const withoutQuery = (href) => (href || '').replace(/\?.*/, '').replace(/\/$/, '');
|
|
442
|
-
const joinPath = (...path) => path.filter(Boolean).join('/').replace(/\/+/g, '/');
|
|
443
|
-
|
|
444
|
-
var url = /*#__PURE__*/Object.freeze({
|
|
445
|
-
__proto__: null,
|
|
446
|
-
isURL: isURL,
|
|
447
|
-
isLocalURL: isLocalURL,
|
|
448
|
-
isHash: isHash,
|
|
449
|
-
withoutQuery: withoutQuery,
|
|
450
|
-
joinPath: joinPath
|
|
451
|
-
});
|
|
452
|
-
|
|
453
|
-
const adjustHref = (router) => (href) => {
|
|
454
|
-
if (!href || isURL(href) || (projectSettings.CDN && href.startsWith(projectSettings.CDN))) {
|
|
455
|
-
return href;
|
|
456
|
-
}
|
|
457
|
-
const isRelativeToBase = href.startsWith('/');
|
|
458
|
-
return joinPath(projectSettings.BASE_PATH, isRelativeToBase ? '/' : dirname(router.pathname), href);
|
|
459
|
-
};
|
|
460
|
-
|
|
461
|
-
const svgUseStyleMap = {
|
|
462
|
-
normal: '',
|
|
463
|
-
color: 'text-primary-main',
|
|
464
|
-
black: 'text-black',
|
|
465
|
-
white: 'text-black',
|
|
466
|
-
};
|
|
467
|
-
const Icon = JSX(({ className = '', imageClassName = '', name = '', alt = `Иконка ${name}`, title = alt, iconVersion = 'color', asSVG, ...imgProps }) => {
|
|
468
|
-
const router = useRouter();
|
|
469
|
-
const href = adjustHref(router)(joinPath(projectSettings.CDN, '/icons', `${name}.svg`));
|
|
470
|
-
if (asSVG && iconVersion !== 'normal') {
|
|
471
|
-
return (jsx(Background, { className: className, children: jsxs("svg", { className: style(getSvgSize(imgProps.width), svgUseStyleMap[iconVersion], iconVersion === 'white' ? 'invert' : '', imageClassName), ...imgProps, "aria-hidden": "true", children: [title ? jsx("title", { children: title }) : null, alt ? jsx("desc", { children: alt }) : null, jsx("use", { href: `${href}#icon`, xlinkHref: `${href}#icon` })] }) }));
|
|
472
|
-
}
|
|
473
|
-
return (jsx("img", { className: className, src: href, alt: alt, title: title, ...imgProps, "aria-hidden": "true" }));
|
|
474
|
-
});
|
|
475
|
-
const getSvgSize = (width) => (width ? '' : 'w-full h-full');
|
|
476
|
-
const Background = JSX(({ className, children }) => className ? jsx("div", { className: className, children: children }) : children);
|
|
477
|
-
|
|
478
|
-
const sourcesComparator = (a, b) => a?.media && b?.media ? a.media - b.media : 0;
|
|
479
|
-
const ImgAsPicture = JSX(({ className = '', image, imageClassName = '', isMobile = false, pathPrefix }) => {
|
|
480
|
-
const router = useRouter();
|
|
481
|
-
const pictureStyles = isMobile ? 'flex' : 'flex-none';
|
|
482
|
-
return (jsxs("picture", { className: `${pictureStyles} ${className}`, children: [image?.sources?.length
|
|
483
|
-
? image.sources
|
|
484
|
-
.filter((_) => _?.src)
|
|
485
|
-
.sort(sourcesComparator)
|
|
486
|
-
.map(({ src, format, media }, index) => (jsx("source", { srcSet: adjustSrc(router, pathPrefix)(src), type: formatToMimeType(format), media: media ? `(max-width: ${media}px)` : '', ...image.size }, `${index}_${src}`)))
|
|
487
|
-
: null, image?.src
|
|
488
|
-
? renderImg({ ...image, src: adjustSrc(router, pathPrefix)(image.src) }, imageClassName, isMobile)
|
|
489
|
-
: null] }));
|
|
490
|
-
});
|
|
491
|
-
const renderImg = (image, imageClassName = '', isMobile = false) => {
|
|
492
|
-
const style = {
|
|
493
|
-
width: image.size?.width ? `${image.size?.width}px` : '100%',
|
|
494
|
-
height: image.size?.height ? `${image.size?.height}px` : '100%',
|
|
495
|
-
};
|
|
496
|
-
const title = image.title || '';
|
|
497
|
-
const alt = image.alt || image.title;
|
|
498
|
-
const imgStyle = isMobile ? 'm-auto' : 'm-0';
|
|
499
|
-
return (jsx("img", { src: image.src, className: `${imgStyle} ${imageClassName}`, alt: alt, title: title, style: style, ...image.size }));
|
|
500
|
-
};
|
|
501
|
-
const adjustSrc = (router, pathPrefix) => (src) => src && !isURL(src) ? adjustHref(router)(joinPath(pathPrefix, src)) : src;
|
|
502
|
-
const formatToMimeType = (format) => format ? `image/${String(format)}` : undefined;
|
|
503
|
-
|
|
504
|
-
const ImgInner = JSX(({ className = '', image, imageClassName = '', isMobile, pathPrefix, ...iconProps }) => {
|
|
505
|
-
if (!image?.src && !image?.icon) {
|
|
506
|
-
return null;
|
|
507
|
-
}
|
|
508
|
-
return image.icon ? (jsx(Icon, { className: className, imageClassName: imageClassName, iconVersion: image?.iconVersion || 'normal', name: image.icon, ...iconProps })) : (jsx(ImgAsPicture, { className: className, imageClassName: imageClassName, image: image, isMobile: isMobile, pathPrefix: pathPrefix }));
|
|
509
|
-
});
|
|
510
|
-
|
|
511
|
-
const Text = JSX(({ children, ...style }) => (jsx("span", { className: ['font-sans', ...Object.values(style)].join(' '), children: children })));
|
|
512
|
-
|
|
513
|
-
const icons$1 = ['PlusIcon', 'MinusIcon'];
|
|
514
|
-
const AccordionItem = JSX(({ className = '', label = '', isExpanded, ...rest }) => (jsx("li", { className: `border-0 border-b border-solid border-main-divider last:border-b-0 ${className}`, children: jsx(Foldable, { isFoldButtonOnTop: true, unfoldedByDefault: isExpanded, renderFoldableSection: ({ isUnfolded }) => (jsx(FoldableSection, { className: "grid grid-cols-12 gap-5 [&>*]:p-0", isUnfolded: isUnfolded, children: renderChildren(rest) })), renderFoldButton: ({ isUnfolded, onToggle }) => (jsx(FoldButton, { label: label, icon: icons$1[Number(isUnfolded)], onClick: onToggle })) }) })));
|
|
515
|
-
AccordionItem.childrenTypes = [];
|
|
516
|
-
const FoldButton = 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 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 })] })));
|
|
391
|
+
const Accordion = JSX(({ className = '', title, accordionAlignTitle = 'center', description, ...rest }) => (jsxs(BlockWrapper, { className: `p-12 mb-1 last:mb-0 ${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("div", { className: "list-none m-0 p-0", children: renderChildren(rest) })] })));
|
|
392
|
+
Accordion.childrenTypes = ['Accordion'];
|
|
517
393
|
|
|
518
394
|
function CorporateLeadAPI() {
|
|
519
395
|
async function send(body) {
|
|
@@ -659,6 +535,31 @@
|
|
|
659
535
|
},
|
|
660
536
|
];
|
|
661
537
|
|
|
538
|
+
const dirname = (path) => path?.split('/').slice(0, -1).join('/');
|
|
539
|
+
|
|
540
|
+
const isURL = (href) => Boolean(href?.includes(':'));
|
|
541
|
+
const isLocalURL = (href, target) => Boolean(href && !isURL(href) && (!target || target === '_self'));
|
|
542
|
+
const isHash = (href) => Boolean(href?.startsWith('#'));
|
|
543
|
+
const withoutQuery = (href) => (href || '').replace(/\?.*/, '').replace(/\/$/, '');
|
|
544
|
+
const joinPath = (...path) => path.filter(Boolean).join('/').replace(/\/+/g, '/');
|
|
545
|
+
|
|
546
|
+
var url = /*#__PURE__*/Object.freeze({
|
|
547
|
+
__proto__: null,
|
|
548
|
+
isURL: isURL,
|
|
549
|
+
isLocalURL: isLocalURL,
|
|
550
|
+
isHash: isHash,
|
|
551
|
+
withoutQuery: withoutQuery,
|
|
552
|
+
joinPath: joinPath
|
|
553
|
+
});
|
|
554
|
+
|
|
555
|
+
const adjustHref = (router) => (href) => {
|
|
556
|
+
if (!href || isURL(href) || (projectSettings.CDN && href.startsWith(projectSettings.CDN))) {
|
|
557
|
+
return href;
|
|
558
|
+
}
|
|
559
|
+
const isRelativeToBase = href.startsWith('/');
|
|
560
|
+
return joinPath(projectSettings.BASE_PATH, isRelativeToBase ? '/' : dirname(router.pathname), href);
|
|
561
|
+
};
|
|
562
|
+
|
|
662
563
|
/* eslint-disable @typescript-eslint/ban-types */
|
|
663
564
|
const handlerDecorator = (handler, targetContent) => {
|
|
664
565
|
return handlerDecorator._impl(handler, targetContent);
|
|
@@ -668,6 +569,24 @@
|
|
|
668
569
|
handlerDecorator._impl = impl;
|
|
669
570
|
};
|
|
670
571
|
|
|
572
|
+
function useRouter() {
|
|
573
|
+
return useRouter._impl();
|
|
574
|
+
}
|
|
575
|
+
useRouter._impl = () => ({
|
|
576
|
+
href: globalThis.location?.href || '/',
|
|
577
|
+
pathname: globalThis.location?.pathname || '/',
|
|
578
|
+
query: {},
|
|
579
|
+
push: () => {
|
|
580
|
+
// Do nothing
|
|
581
|
+
},
|
|
582
|
+
replace: () => {
|
|
583
|
+
// Do nothing
|
|
584
|
+
},
|
|
585
|
+
});
|
|
586
|
+
useRouter.setup = (impl) => {
|
|
587
|
+
useRouter._impl = impl;
|
|
588
|
+
};
|
|
589
|
+
|
|
671
590
|
function useLink(isRemote = false) {
|
|
672
591
|
const router = useRouter();
|
|
673
592
|
return (props) => ({
|
|
@@ -763,6 +682,8 @@
|
|
|
763
682
|
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 })));
|
|
764
683
|
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 })));
|
|
765
684
|
|
|
685
|
+
const Text = JSX(({ children, ...style }) => (jsx("span", { className: ['font-sans', ...Object.values(style)].join(' '), children: children })));
|
|
686
|
+
|
|
766
687
|
const Footnote = JSX(({ link }) => (jsxs(Paragraph, { size: "text-s-light", color: "text-secondary-text", children: [jsx(Text, { children: "\u041D\u0430\u0436\u0438\u043C\u0430\u044F \u043A\u043D\u043E\u043F\u043A\u0443 \u0432\u044B \u043F\u043E\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0430\u0435\u0442\u0435 \u0441\u043E\u0433\u043B\u0430\u0441\u0438\u0435 \u0441 " }), link ? (jsx(Button, { href: link.href, ariaLabel: "\u0443\u0441\u043B\u043E\u0432\u0438\u044F \u043F\u0435\u0440\u0435\u0434\u0430\u0447\u0438 \u0434\u0430\u043D\u043D\u044B\u0445", target: link.target, className: "text-primary-main", children: jsx(Text, { children: link.text }) })) : null] })));
|
|
767
688
|
|
|
768
689
|
const normalizeSelectedRegion$1 = (selectedRegion, regions) => !selectedRegion && regions?.length && regions[0]?.code ? regions[0].code : selectedRegion;
|
|
@@ -786,6 +707,26 @@
|
|
|
786
707
|
return targetRef;
|
|
787
708
|
}
|
|
788
709
|
|
|
710
|
+
const svgUseStyleMap = {
|
|
711
|
+
normal: '',
|
|
712
|
+
color: 'text-primary-main',
|
|
713
|
+
black: 'text-black',
|
|
714
|
+
white: 'text-black',
|
|
715
|
+
};
|
|
716
|
+
const Icon = JSX(({ className = '', imageClassName = '', name = '', alt = `Иконка ${name}`, title = alt, iconVersion = 'color', asSVG, ...imgProps }) => {
|
|
717
|
+
const router = useRouter();
|
|
718
|
+
const href = adjustHref(router)(joinPath(projectSettings.CDN, '/icons', `${name}.svg`));
|
|
719
|
+
if (asSVG && iconVersion !== 'normal') {
|
|
720
|
+
return (jsx(Background, { className: className, children: jsxs("svg", { className: style(getSvgSize(imgProps.width), svgUseStyleMap[iconVersion], iconVersion === 'white' ? 'invert' : '', imageClassName), ...imgProps, "aria-hidden": "true", children: [title ? jsx("title", { children: title }) : null, alt ? jsx("desc", { children: alt }) : null, jsx("use", { href: `${href}#icon`, xlinkHref: `${href}#icon` })] }) }));
|
|
721
|
+
}
|
|
722
|
+
if (!className.includes('h-')) {
|
|
723
|
+
imgProps['style'] = { height: `${imgProps.height}px` };
|
|
724
|
+
}
|
|
725
|
+
return (jsx("img", { className: className, src: href, alt: alt, title: title, "aria-hidden": "true", ...imgProps }));
|
|
726
|
+
});
|
|
727
|
+
const getSvgSize = (width) => (width ? '' : 'w-full h-full');
|
|
728
|
+
const Background = JSX(({ className, children }) => className ? jsx("div", { className: className, children: children }) : children);
|
|
729
|
+
|
|
789
730
|
const Select = JSX(({ className = '', isBorder = true, label, options = [], value, onChange, placeholder = '' }) => {
|
|
790
731
|
const [selectedItem, setSelectedItem] = useState(options[0] || { key: '', text: '' });
|
|
791
732
|
const [isOpen, setIsOpen] = useState(false);
|
|
@@ -1065,6 +1006,39 @@
|
|
|
1065
1006
|
});
|
|
1066
1007
|
const renderDataOrganization$1 = ({ name, phone, handleChange }) => (jsxs("div", { className: "max-w-[560px] m-auto", children: [jsx(Input, { className: "shrink-0 text-l w-full mb-5", type: "text", "aria-label": "\u0418\u043C\u044F", label: "\u0418\u043C\u044F", value: name, onChange: (value) => handleChange({ name: value }) }), jsx(Input, { className: "shrink-0 text-l w-full mb-5", type: "text", "aria-label": "\u0422\u0435\u043B\u0435\u0444\u043E\u043D", label: "\u0422\u0435\u043B\u0435\u0444\u043E\u043D", value: phone, onChange: (value) => handleChange({ phone: value }) })] }));
|
|
1067
1008
|
|
|
1009
|
+
const sourcesComparator = (a, b) => a?.media && b?.media ? a.media - b.media : 0;
|
|
1010
|
+
const ImgAsPicture = JSX(({ className = '', image, imageClassName = '', isMobile = false, pathPrefix }) => {
|
|
1011
|
+
const router = useRouter();
|
|
1012
|
+
const pictureStyles = isMobile ? 'flex' : 'flex-none';
|
|
1013
|
+
return (jsxs("picture", { className: `${pictureStyles} ${className}`, children: [image?.sources?.length
|
|
1014
|
+
? image.sources
|
|
1015
|
+
.filter((_) => _?.src)
|
|
1016
|
+
.sort(sourcesComparator)
|
|
1017
|
+
.map(({ src, format, media }, index) => (jsx("source", { srcSet: adjustSrc(router, pathPrefix)(src), type: formatToMimeType(format), media: media ? `(max-width: ${media}px)` : '', ...image.size }, `${index}_${src}`)))
|
|
1018
|
+
: null, image?.src
|
|
1019
|
+
? renderImg({ ...image, src: adjustSrc(router, pathPrefix)(image.src) }, imageClassName, isMobile)
|
|
1020
|
+
: null] }));
|
|
1021
|
+
});
|
|
1022
|
+
const renderImg = (image, imageClassName = '', isMobile = false) => {
|
|
1023
|
+
const style = {
|
|
1024
|
+
width: image.size?.width ? `${image.size?.width}px` : '100%',
|
|
1025
|
+
height: image.size?.height ? `${image.size?.height}px` : '100%',
|
|
1026
|
+
};
|
|
1027
|
+
const title = image.title || '';
|
|
1028
|
+
const alt = image.alt || image.title;
|
|
1029
|
+
const imgStyle = isMobile ? 'm-auto' : 'm-0';
|
|
1030
|
+
return (jsx("img", { src: image.src, className: `${imgStyle} ${imageClassName}`, alt: alt, title: title, style: style, ...image.size }));
|
|
1031
|
+
};
|
|
1032
|
+
const adjustSrc = (router, pathPrefix) => (src) => src && !isURL(src) ? adjustHref(router)(joinPath(pathPrefix, src)) : src;
|
|
1033
|
+
const formatToMimeType = (format) => format ? `image/${String(format)}` : undefined;
|
|
1034
|
+
|
|
1035
|
+
const ImgInner = JSX(({ className = '', image, imageClassName = '', isMobile, pathPrefix, ...iconProps }) => {
|
|
1036
|
+
if (!image?.src && !image?.icon) {
|
|
1037
|
+
return null;
|
|
1038
|
+
}
|
|
1039
|
+
return image.icon ? (jsx(Icon, { className: className, imageClassName: imageClassName, iconVersion: image?.iconVersion || 'normal', name: image.icon, ...iconProps })) : (jsx(ImgAsPicture, { className: className, imageClassName: imageClassName, image: image, isMobile: isMobile, pathPrefix: pathPrefix }));
|
|
1040
|
+
});
|
|
1041
|
+
|
|
1068
1042
|
const renderContacts = () => (jsxs("div", { className: "flex", children: [jsxs("a", { className: "flex items-center text-primary-text no-underline mr-6", href: `tel:8 (800) 200-78-70`, "aria-label": "8 (800) 200-78-70", children: [jsx(ImgInner, { image: { icon: 'PhoneIcon' }, width: "24", height: "24", className: "mr-3" }), jsx("span", { children: "8 (800) 200-78-70" })] }), jsxs("a", { className: "flex items-center text-primary-text no-underline", "aria-label": "ved@rshb.ru", href: `mailto:ved@rshb.ru`, children: [jsx(ImgInner, { image: { icon: 'MailIcon' }, width: "24", height: "24", className: "mr-3" }), jsx("span", { children: "ved@rshb.ru" })] })] }));
|
|
1069
1043
|
|
|
1070
1044
|
const SVG = JSX(({ className, viewBox, fill = 'none', width, height, paths, ...commonOptions }) => {
|
|
@@ -1154,7 +1128,7 @@
|
|
|
1154
1128
|
const BenefitsBlock = JSX(({ className = '', title, benefitList, ...rest }) => (jsxs(BlockWrapper, { className: `p-12 flex flex-col items-center ${className}`, ...rest, children: [title ? (jsx(Heading, { headingType: "h3", as: "h2", className: "max-w-[47rem] text-center", title: title })) : null, benefitList?.length ? (jsx("div", { className: "flex flex-wrap w-full justify-center gap-x-20 mt-8", children: benefitList.map(renderStep$1) })) : null] })));
|
|
1155
1129
|
const renderStep$1 = (benefit, i) => {
|
|
1156
1130
|
const description = benefit.description;
|
|
1157
|
-
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 bg-main-divider text-primary-main group-data-secondary:bg-white/30 group-data-secondary:text-black", image: benefit.icon, asSVG: true })) : null, benefit?.icon?.src ? jsx(ImgInner, { image: benefit.icon }) : null, jsxs("div", { className: "ml-5", children: [benefit?.label ? jsx(Heading, { headingType: "h6", children: benefit.label }) : null, renderDescription$4(description)] })] }, String(i)));
|
|
1131
|
+
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 bg-main-divider text-primary-main group-data-secondary:bg-white/30 group-data-secondary:text-black", image: benefit.icon, asSVG: true })) : null, benefit?.icon?.src ? jsx(ImgInner, { image: benefit.icon }) : null, jsxs("div", { className: "ml-5 h-full", children: [benefit?.label ? jsx(Heading, { headingType: "h6", children: benefit.label }) : null, renderDescription$4(description)] })] }, String(i)));
|
|
1158
1132
|
};
|
|
1159
1133
|
const renderDescription$4 = (description) => {
|
|
1160
1134
|
const benefitType = description?.benefitType || null;
|
|
@@ -1221,9 +1195,10 @@
|
|
|
1221
1195
|
XS: 'text-xs-light',
|
|
1222
1196
|
};
|
|
1223
1197
|
|
|
1224
|
-
const Headline = JSX(({ className, title, description, headlineVersion = 'XL', align = 'text-center', as, ...rest }) => {
|
|
1198
|
+
const Headline = JSX(({ className, title, description, headlineVersion = 'XL', align = 'text-center', as, isPadding = true, ...rest }) => {
|
|
1225
1199
|
const versionStyle = headlineVersionStyles[headlineVersion];
|
|
1226
|
-
|
|
1200
|
+
const paddingStyle = isPadding ? 'p-12' : '';
|
|
1201
|
+
return (jsxs(BlockWrapper, { className: style('flex flex-col group-data-secondary:bg-primary-main group-data-secondary:text-white', paddingStyle, versionStyle.wrapper, className), ...rest, children: [title ? (jsx(Heading, { className: style('whitespace-pre-wrap', align), ...versionStyle?.title, as: as || versionStyle?.title.as, title: title })) : null, description ? (jsx(Paragraph, { color: "group-data-secondary:text-white/80", size: versionStyle.descriptionSize, align: align, children: description })) : null] }));
|
|
1227
1202
|
});
|
|
1228
1203
|
|
|
1229
1204
|
const Bonus = JSX((props) => {
|
|
@@ -1242,7 +1217,7 @@
|
|
|
1242
1217
|
|
|
1243
1218
|
const BonusBenefitsBlock = JSX(({ bonusBenefits, cardTextAlign = 'center', className = '', columnsCount = '4', subtitle, title, ...rest }) => (jsxs(BlockWrapper, { className: `font-sans text-primary-text bg-white p-12 flex flex-col text-center ${className}`, ...rest, children: [jsx(Headline, { className: "!p-0 mb-8", title: title, description: subtitle, headlineVersion: "M" }), bonusBenefits?.length ? (jsx("div", { className: `grid gap-1 ${AlignText[cardTextAlign]} ${getElementsColsValue(columnsCount)}`, children: bonusBenefits.map(renderBonusBenefit) })) : null] })));
|
|
1244
1219
|
const renderBonusBenefit = ({ icon, title, description }, i) => {
|
|
1245
|
-
return (jsxs("div", { className:
|
|
1220
|
+
return (jsxs("div", { className: style('flex flex-col items-center text-h6', !description && !title ? 'justify-center' : ''), children: [title ? jsx("span", { children: title }) : null, icon ? jsx(ImgInner, { image: icon, height: "180", width: "auto", className: "w-auto" }) : null, description ? jsx("span", { children: description }) : null] }, String(i)));
|
|
1246
1221
|
};
|
|
1247
1222
|
const getElementsColsValue = (colValue) => {
|
|
1248
1223
|
switch (colValue) {
|
|
@@ -1891,7 +1866,7 @@
|
|
|
1891
1866
|
}
|
|
1892
1867
|
}, [onIntersection, idx]);
|
|
1893
1868
|
const ref = useIntersectionObserver(observerCallback, observerOptions);
|
|
1894
|
-
return (jsx("div", { className: `inline-block snap-always box-border ${className}`, style: style,
|
|
1869
|
+
return (jsx("div", { className: `inline-block snap-always box-border ${className}`, style: style, "aria-current": Boolean(idx === activeIndex), ref: ref, children: children }));
|
|
1895
1870
|
});
|
|
1896
1871
|
|
|
1897
1872
|
const childStyleMap = ['min-w-[100%]', 'min-w-[50%]', 'min-w-[33.33%]', 'min-w-[25%]'];
|
|
@@ -1916,7 +1891,7 @@
|
|
|
1916
1891
|
...(isVerticalList ? getContainerHeight(minHeight) : {}),
|
|
1917
1892
|
gap: `${gap}px`,
|
|
1918
1893
|
};
|
|
1919
|
-
return (jsx("div", { className: style('box-border overflow-auto no-scrollbar', listType, className), style: containerStyle,
|
|
1894
|
+
return (jsx("div", { className: style('box-border overflow-auto no-scrollbar', listType, className), style: containerStyle, ref: containerRef, children: mapChildren((child, idx) => (jsx(SwipeListItem, { className: style(snapAlign, visibleItemCount ? childStyleMap[visibleItemCount - 1] : '', isVerticalList ? 'h-full' : ''), style: isHorizontalList ? getContainerOffset(padding / 4) : {}, activeIndex: activeIndex, idx: idx, observerOptions: observerOptions, onIntersection: handleIntersection, children: child }, String(idx))))(children) }));
|
|
1920
1895
|
});
|
|
1921
1896
|
// Styles used to compensate outer container padding to get rid of clipping effect
|
|
1922
1897
|
const getContainerOffset = (padding, additionalPadding = 0) => ({
|
|
@@ -2155,7 +2130,7 @@
|
|
|
2155
2130
|
|
|
2156
2131
|
const MAX_LINKS_COUNT = 10;
|
|
2157
2132
|
const CarouselLinks = JSX(({ className = '', additionalDescription, description, links, title, ...rest }) => {
|
|
2158
|
-
return (jsxs(BlockWrapper, { className: `flex w-full p-10 overflow-hidden justify-between ${className}`, ...rest, children: [jsxs("div", { className: "flex flex-col max-w-96 pr-9 text-white text-xl-light", children: [jsx(Headline, {
|
|
2133
|
+
return (jsxs(BlockWrapper, { className: `flex w-full p-10 overflow-hidden justify-between ${className}`, ...rest, children: [jsxs("div", { className: "flex flex-col max-w-96 pr-9 text-white text-xl-light", children: [jsx(Headline, { isPadding: false, title: title, description: description, as: "h1", align: "text-left" }), additionalDescription ? (jsx("div", { className: "pt-6", children: jsx(Paragraph, { children: additionalDescription }) })) : null] }), links?.length ? renderLinks(links) : null] }));
|
|
2159
2134
|
});
|
|
2160
2135
|
const renderLinks = (links) => {
|
|
2161
2136
|
const itemCount = Math.ceil(links.length / MAX_LINKS_COUNT);
|
|
@@ -2181,7 +2156,7 @@
|
|
|
2181
2156
|
M: 'ml-3',
|
|
2182
2157
|
L: 'ml-4',
|
|
2183
2158
|
};
|
|
2184
|
-
const List = JSX(({ className = '', hasIndent, isDotted, itemClassName = '', items, listItemSize = 'M' }) => items?.length ? (jsx("section", { className: `text-primary-text group-data-secondary:text-white group-data-gray:text-secondary-text ${TEXT_SIZE_MAP[listItemSize]} ${hasIndent ? ITEM_INDENT_MAP[listItemSize] : ''} ${className}`, role: "list", children: items.map((item, i) => (jsx(ListItem, { className:
|
|
2159
|
+
const List = JSX(({ className = '', hasIndent, isDotted, itemClassName = '', items, listItemSize = 'M' }) => items?.length ? (jsx("section", { className: `text-primary-text group-data-secondary:text-white group-data-gray:text-secondary-text ${TEXT_SIZE_MAP[listItemSize]} ${hasIndent ? ITEM_INDENT_MAP[listItemSize] : ''} ${className}`, role: "list", children: items.map((item, i) => (jsx(ListItem, { className: itemClassName, isDotted: isDotted, size: listItemSize, children: item }, String(i)))) })) : null);
|
|
2185
2160
|
|
|
2186
2161
|
const CarouselProductCard = JSX(({ className = '', title, headlineSmallVersion = 'H6', description, additionalDescription, icon, items = [], button = {}, version = 'primary', isDotted = true, align = 'text-center', ...rest }) => {
|
|
2187
2162
|
return (jsxs(BlockWrapper, { className: style('flex flex-col justify-between items-stretch min-w-[260px] h-full w-full p-6', 'box-border border-solid border border-gray', align, className), version: version, ...rest, children: [jsxs("div", { className: "flex flex-col h-full", children: [renderImage$3(icon), renderCardTitle(headlineSmallVersion, title), renderDescription$3(description, title), renderItems(items, isDotted, version), renderAdditionalDescription$1(additionalDescription)] }), renderButtonsSection([button], { buttonClassName: 'mt-6 w-full' })] }));
|
|
@@ -2250,6 +2225,28 @@
|
|
|
2250
2225
|
return (jsx(BlockWrapper, { className: style('relative p-7 min-w-[524px] h-full text-left box-border group-data-gray:bg-main-divider/50', BORDER_STYLE, className), version: version, ...rest, 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 group-data-gray:text-secondary-text group-data-gray:max-w-[265px]", children: description })) : null, items.length ? (jsx(List, { className: "text-xl-light flex flex-col flex-1 gap-2 max-w-[236px]", items: items })) : null, socialMedia.length ? jsx(SocialMedia, { className: "pt-10 pb-0", media: socialMedia }) : null] }) }) }));
|
|
2251
2226
|
});
|
|
2252
2227
|
|
|
2228
|
+
const Foldable = JSX(({ className = '', isFoldButtonOnTop = false, unfoldedByDefault = false, renderFoldableSection, renderFoldButton, }) => {
|
|
2229
|
+
const [isUnfolded, setIsUnfolded] = useState(unfoldedByDefault);
|
|
2230
|
+
const onToggle = useCallback(() => {
|
|
2231
|
+
setIsUnfolded((_) => !_);
|
|
2232
|
+
}, []);
|
|
2233
|
+
const sectionNode = renderFoldableSection({ isUnfolded, onToggle });
|
|
2234
|
+
const buttonNode = renderFoldButton ? renderFoldButton({ isUnfolded, onToggle }) : null;
|
|
2235
|
+
return isFoldButtonOnTop ? (jsxs("div", { className: className, children: [buttonNode, sectionNode] })) : (jsxs("div", { className: className, children: [sectionNode, buttonNode] }));
|
|
2236
|
+
});
|
|
2237
|
+
|
|
2238
|
+
const FoldableSection = JSX(({ className = '', isUnfolded, children }) => {
|
|
2239
|
+
const containerRef = useRef(null);
|
|
2240
|
+
useEffect(() => {
|
|
2241
|
+
if (containerRef.current) {
|
|
2242
|
+
containerRef.current.style.maxHeight = isUnfolded
|
|
2243
|
+
? `${containerRef.current.scrollHeight}px`
|
|
2244
|
+
: '';
|
|
2245
|
+
}
|
|
2246
|
+
}, [isUnfolded, children?.length]);
|
|
2247
|
+
return (jsx("div", { ref: containerRef, className: `transition-max-h duration-300 overflow-hidden ${containerRef.current || !isUnfolded ? 'max-h-0' : ''} ${className}`, children: children }));
|
|
2248
|
+
});
|
|
2249
|
+
|
|
2253
2250
|
const VISIBLE_CELLS_COUNT = 1;
|
|
2254
2251
|
const CarouselTariffsCard = JSX(({ className = '', title, icon, isHighlighting, button, cardCells = [], ...rest }) => {
|
|
2255
2252
|
const cellsNode = cardCells.map(renderCardInfo);
|
|
@@ -3490,43 +3487,6 @@
|
|
|
3490
3487
|
const OtherProducts = JSX(({ className = '', ...rest }) => (jsx(BlockWrapper, { className: `font-sans text-primary-text ${className}`, ...rest, children: renderChildren(rest) })));
|
|
3491
3488
|
OtherProducts.childrenTypes = ['OtherProductsItem'];
|
|
3492
3489
|
|
|
3493
|
-
function getParentBlockDef(options) {
|
|
3494
|
-
return options?.parent || {};
|
|
3495
|
-
}
|
|
3496
|
-
|
|
3497
|
-
function getParentBlockContent(options, defaultContent) {
|
|
3498
|
-
const { content } = getParentBlockDef(options);
|
|
3499
|
-
return content || defaultContent;
|
|
3500
|
-
}
|
|
3501
|
-
|
|
3502
|
-
const DefaultFoldButton = JSX(({ className = '', label, icon, dataTheme = '', onClick }) => {
|
|
3503
|
-
const STATE_STYLE = 'hover:bg-primary-hover focus:border-primary-text active:bg-primary-active outline-none';
|
|
3504
|
-
const DIMENSIONS_STYLE = 'flex justify-center w-full px-0 py-5';
|
|
3505
|
-
return (jsxs("button", { className: [
|
|
3506
|
-
'border border-transparent bg-primary-main font-sans text-white cursor-pointer',
|
|
3507
|
-
STATE_STYLE,
|
|
3508
|
-
DIMENSIONS_STYLE,
|
|
3509
|
-
className,
|
|
3510
|
-
].join(' '), "data-theme": dataTheme, onClick: onClick, children: [jsx("span", { className: "text-h4 pr-3", children: label }), icon ? (jsx(ImgInner, { image: {
|
|
3511
|
-
icon,
|
|
3512
|
-
iconVersion: 'white',
|
|
3513
|
-
}, className: "flex-shrink-0 my-auto", width: "20", height: "20", asSVG: true })) : null] }));
|
|
3514
|
-
});
|
|
3515
|
-
const renderDefaultFoldButton = ({ isUnfolded, onToggle }) => {
|
|
3516
|
-
const labels = ['Развернуть', 'Скрыть'];
|
|
3517
|
-
const icons = ['ArrowDownIcon', 'ArrowUpIcon'];
|
|
3518
|
-
return (jsx(DefaultFoldButton, { icon: icons[Number(isUnfolded)], label: labels[Number(isUnfolded)], onClick: onToggle }));
|
|
3519
|
-
};
|
|
3520
|
-
|
|
3521
|
-
const icons = ['ArrowDownIcon', 'ArrowUpIcon'];
|
|
3522
|
-
const OtherProductsItem = JSX(({ className, label = '', isUnfolded: unfoldedByDefault, ...rest }) => {
|
|
3523
|
-
const { colorPalette } = getParentBlockContent(rest.options, {});
|
|
3524
|
-
return (jsx("div", { className: `border-0 border-b border-solid border-main-divider ${className}`, children: jsx(Foldable, { unfoldedByDefault: unfoldedByDefault, renderFoldableSection: ({ isUnfolded }) => (jsx("div", { className: "box-border", children: jsx(FoldableSection, { className: "grid grid-cols-12 gap-1 border-box", isUnfolded: isUnfolded, children: renderChildren(rest) }) })), renderFoldButton: ({ isUnfolded, onToggle }) => (jsx(DefaultFoldButton, { label: label, icon: icons[Number(isUnfolded)], dataTheme: colorPalette || rest.options?.page?.colorPalette, onClick: onToggle })) }) }));
|
|
3525
|
-
});
|
|
3526
|
-
OtherProductsItem.childrenTypes = {
|
|
3527
|
-
exclude: ['OtherProductsItem'],
|
|
3528
|
-
};
|
|
3529
|
-
|
|
3530
3490
|
const ParagraphBlock = JSX(({ text, size, align, font, children, ...rest }) => (jsx(BlockWrapper, { ...rest, children: jsx(Paragraph, { size: size, align: align, font: font, children: text || children }) })));
|
|
3531
3491
|
|
|
3532
3492
|
const BenefitItem = JSX((props) => {
|
|
@@ -3769,15 +3729,38 @@
|
|
|
3769
3729
|
return (jsx(BlockWrapper, { ...rest, children: jsx(RichText, { __html: __html }) }));
|
|
3770
3730
|
});
|
|
3771
3731
|
|
|
3772
|
-
const
|
|
3732
|
+
const DefaultFoldButton = JSX(({ className = '', label, icon, dataTheme = '', onClick }) => {
|
|
3733
|
+
const STATE_STYLE = 'hover:bg-primary-hover focus:border-primary-text active:bg-primary-active outline-none';
|
|
3734
|
+
const DIMENSIONS_STYLE = 'flex justify-center w-full px-0 py-5';
|
|
3735
|
+
return (jsxs("button", { className: [
|
|
3736
|
+
'border border-transparent bg-primary-main font-sans text-white cursor-pointer',
|
|
3737
|
+
STATE_STYLE,
|
|
3738
|
+
DIMENSIONS_STYLE,
|
|
3739
|
+
className,
|
|
3740
|
+
].join(' '), "data-theme": dataTheme, onClick: onClick, children: [jsx("span", { className: "text-h4 pr-3", children: label }), icon ? (jsx(ImgInner, { image: {
|
|
3741
|
+
icon,
|
|
3742
|
+
iconVersion: 'white',
|
|
3743
|
+
}, className: "flex-shrink-0 my-auto", width: "20", height: "20", asSVG: true })) : null] }));
|
|
3744
|
+
});
|
|
3745
|
+
const renderDefaultFoldButton = ({ isUnfolded, onToggle }) => {
|
|
3746
|
+
const labels = ['Развернуть', 'Скрыть'];
|
|
3747
|
+
const icons = ['ArrowDownIcon', 'ArrowUpIcon'];
|
|
3748
|
+
return (jsx(DefaultFoldButton, { icon: icons[Number(isUnfolded)], label: labels[Number(isUnfolded)], onClick: onToggle }));
|
|
3749
|
+
};
|
|
3750
|
+
|
|
3751
|
+
const RollupItem = JSX(({ className = '', label = 'Развернуть', isExpanded, isFoldButtonOnTop = true, version = 'primary', ...rest }) => (jsx(BlockWrapper, { className: `w-full border-0 border-b border-solid border-main-divider last:border-b-0 ${className}`, tag: "div", version: "transparent", ...rest, children: jsx(Foldable, { isFoldButtonOnTop: isFoldButtonOnTop, unfoldedByDefault: isExpanded, renderFoldableSection: ({ isUnfolded }) => (jsx(FoldableSection, { className: `grid grid-cols-12 gap-5 [&>*]:p-0`, isUnfolded: isUnfolded, children: renderChildren(rest) })), renderFoldButton: ({ isUnfolded, onToggle }) => renderFoldButton({ version, label, isUnfolded, onToggle }) }) })));
|
|
3773
3752
|
RollupItem.childrenTypes = {
|
|
3774
|
-
exclude: ['RollupItem', 'Accordion', '
|
|
3753
|
+
exclude: ['RollupItem', 'Accordion', 'OtherProducts'],
|
|
3775
3754
|
};
|
|
3776
3755
|
const renderFoldButton = ({ version, label: defaultLabel, isUnfolded, onToggle, }) => {
|
|
3777
3756
|
const label = defaultLabel || (isUnfolded ? 'Скрыть' : 'Развернуть');
|
|
3778
|
-
return version === 'primary' ? (renderPrimaryFoldButton({
|
|
3757
|
+
return version === 'primary' ? (renderPrimaryFoldButton({
|
|
3758
|
+
label,
|
|
3759
|
+
icon: isUnfolded ? 'MinusIcon' : 'PlusIcon',
|
|
3760
|
+
onToggle,
|
|
3761
|
+
})) : (jsx(DefaultFoldButton, { label: label, icon: isUnfolded ? 'ArrowUpIcon' : 'ArrowDownIcon', onClick: onToggle }));
|
|
3779
3762
|
};
|
|
3780
|
-
const renderPrimaryFoldButton = ({ label, icon, onToggle }) => (jsxs("button", { className:
|
|
3763
|
+
const renderPrimaryFoldButton = ({ label, icon, onToggle }) => (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 cursor-pointer`, onClick: onToggle, children: [jsx(Text, { size: "text-xl", font: "font-medium", children: label }), icon ? jsx(ImgInner, { image: getIconWithVersion({ icon }), width: "24", height: "24", asSVG: true }) : null] }));
|
|
3781
3764
|
|
|
3782
3765
|
const SAFEBOXES_URL = '/api/v1/safeboxes';
|
|
3783
3766
|
const EMPTY_VALUE = [];
|
|
@@ -4384,7 +4367,6 @@
|
|
|
4384
4367
|
|
|
4385
4368
|
const Blocks = {
|
|
4386
4369
|
Accordion,
|
|
4387
|
-
AccordionItem,
|
|
4388
4370
|
ApplicationForm,
|
|
4389
4371
|
BenefitsBlock,
|
|
4390
4372
|
Bonus,
|
|
@@ -4421,7 +4403,6 @@
|
|
|
4421
4403
|
OfficeMap,
|
|
4422
4404
|
OfficeServicesBlock,
|
|
4423
4405
|
OtherProducts,
|
|
4424
|
-
OtherProductsItem,
|
|
4425
4406
|
ParagraphBlock,
|
|
4426
4407
|
PictureText,
|
|
4427
4408
|
Placeholder,
|
|
@@ -4566,7 +4547,7 @@
|
|
|
4566
4547
|
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" }) }));
|
|
4567
4548
|
}
|
|
4568
4549
|
|
|
4569
|
-
const packageVersion = "0.8.
|
|
4550
|
+
const packageVersion = "0.8.25";
|
|
4570
4551
|
|
|
4571
4552
|
exports.Blocks = Blocks;
|
|
4572
4553
|
exports.ContentPage = ContentPage;
|