@redneckz/wildless-cms-uni-blocks 0.10.7 → 0.10.8
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 +59 -40
- package/bundle/bundle.umd.min.js +1 -1
- package/bundle/components/CarouselRecommendationCard/CarouselRecommendationCard.mobile.d.ts +5 -0
- package/bundle/components/CarouselRecommendationCard/cardStyle.d.ts +1 -0
- package/bundle/components/CarouselTariffsCard/getPaddingStyle.d.ts +1 -1
- package/bundle/components/Tabs/CenteredTabs.d.ts +7 -0
- package/bundle/components/Tabs/LinkTab.d.ts +2 -2
- package/bundle/components/Tabs/TabsContent.d.ts +3 -2
- package/bundle/components/Tabs/renderGroupTab.d.ts +2 -2
- package/bundle/components/Tabs/renderTab.d.ts +3 -3
- package/bundle/components/Tabs/tabItemClasses.d.ts +3 -2
- package/dist/components/Blocks.mobile.js +2 -0
- package/dist/components/Blocks.mobile.js.map +1 -1
- package/dist/components/CarouselRecommendationCard/CarouselRecommendationCard.js +2 -2
- package/dist/components/CarouselRecommendationCard/CarouselRecommendationCard.js.map +1 -1
- package/dist/components/CarouselRecommendationCard/CarouselRecommendationCard.mobile.d.ts +5 -0
- package/dist/components/CarouselRecommendationCard/CarouselRecommendationCard.mobile.js +17 -0
- package/dist/components/CarouselRecommendationCard/CarouselRecommendationCard.mobile.js.map +1 -0
- package/dist/components/CarouselRecommendationCard/cardStyle.d.ts +1 -0
- package/dist/components/CarouselRecommendationCard/cardStyle.js +4 -0
- package/dist/components/CarouselRecommendationCard/cardStyle.js.map +1 -0
- package/dist/components/CarouselTariffsCard/getPaddingStyle.d.ts +1 -1
- package/dist/components/CarouselTariffsCard/getPaddingStyle.js +1 -1
- package/dist/components/CarouselTariffsCard/getPaddingStyle.js.map +1 -1
- package/dist/components/CarouselTariffsCard/getPaddingStyle.mobile.js +1 -1
- package/dist/components/CarouselTariffsCard/getPaddingStyle.mobile.js.map +1 -1
- package/dist/components/Footer/Footer.mobile.js +1 -1
- package/dist/components/Footer/Footer.mobile.js.map +1 -1
- package/dist/components/Footer/SocialMedia.mobile.js +1 -1
- package/dist/components/Footer/SocialMedia.mobile.js.map +1 -1
- package/dist/components/Tabs/CenteredTabs.d.ts +7 -0
- package/dist/components/Tabs/CenteredTabs.js +7 -0
- package/dist/components/Tabs/CenteredTabs.js.map +1 -0
- package/dist/components/Tabs/LinkTab.d.ts +2 -2
- package/dist/components/Tabs/LinkTab.js +2 -2
- package/dist/components/Tabs/LinkTab.js.map +1 -1
- package/dist/components/Tabs/ScrollableTabs.js +3 -9
- package/dist/components/Tabs/ScrollableTabs.js.map +1 -1
- package/dist/components/Tabs/Tabs.js +14 -7
- package/dist/components/Tabs/Tabs.js.map +1 -1
- package/dist/components/Tabs/TabsContent.d.ts +3 -2
- package/dist/components/Tabs/renderGroupTab.d.ts +2 -2
- package/dist/components/Tabs/renderGroupTab.js +4 -4
- package/dist/components/Tabs/renderGroupTab.js.map +1 -1
- package/dist/components/Tabs/renderTab.d.ts +3 -3
- package/dist/components/Tabs/renderTab.js +3 -3
- package/dist/components/Tabs/renderTab.js.map +1 -1
- package/dist/components/Tabs/tabItemClasses.d.ts +3 -2
- package/dist/components/Tabs/tabItemClasses.js +26 -10
- package/dist/components/Tabs/tabItemClasses.js.map +1 -1
- package/dist/hooks/useLink.js +1 -1
- package/dist/hooks/useLink.js.map +1 -1
- package/lib/common.css +1 -1
- package/lib/components/Blocks.mobile.js +2 -0
- package/lib/components/Blocks.mobile.js.map +1 -1
- package/lib/components/CarouselRecommendationCard/CarouselRecommendationCard.fixture.mobile.d.ts +16 -0
- package/lib/components/CarouselRecommendationCard/CarouselRecommendationCard.js +1 -1
- package/lib/components/CarouselRecommendationCard/CarouselRecommendationCard.js.map +1 -1
- package/lib/components/CarouselRecommendationCard/CarouselRecommendationCard.mobile.d.ts +5 -0
- package/lib/components/CarouselRecommendationCard/CarouselRecommendationCard.mobile.js +15 -0
- package/lib/components/CarouselRecommendationCard/CarouselRecommendationCard.mobile.js.map +1 -0
- package/lib/components/CarouselRecommendationCard/cardStyle.d.ts +1 -0
- package/lib/components/CarouselRecommendationCard/cardStyle.js +2 -0
- package/lib/components/CarouselRecommendationCard/cardStyle.js.map +1 -0
- package/lib/components/CarouselTariffsCard/getPaddingStyle.d.ts +1 -1
- package/lib/components/CarouselTariffsCard/getPaddingStyle.js +1 -1
- package/lib/components/CarouselTariffsCard/getPaddingStyle.js.map +1 -1
- package/lib/components/CarouselTariffsCard/getPaddingStyle.mobile.js +1 -1
- package/lib/components/CarouselTariffsCard/getPaddingStyle.mobile.js.map +1 -1
- package/lib/components/Footer/Footer.mobile.js +1 -1
- package/lib/components/Footer/Footer.mobile.js.map +1 -1
- package/lib/components/Footer/SocialMedia.mobile.js +1 -1
- package/lib/components/Footer/SocialMedia.mobile.js.map +1 -1
- package/lib/components/Tabs/CenteredTabs.d.ts +7 -0
- package/lib/components/Tabs/CenteredTabs.js +5 -0
- package/lib/components/Tabs/CenteredTabs.js.map +1 -0
- package/lib/components/Tabs/LinkTab.d.ts +2 -2
- package/lib/components/Tabs/LinkTab.js +2 -2
- package/lib/components/Tabs/LinkTab.js.map +1 -1
- package/lib/components/Tabs/ScrollableTabs.js +3 -9
- package/lib/components/Tabs/ScrollableTabs.js.map +1 -1
- package/lib/components/Tabs/Tabs.fixture.d.ts +1 -0
- package/lib/components/Tabs/Tabs.js +14 -7
- package/lib/components/Tabs/Tabs.js.map +1 -1
- package/lib/components/Tabs/TabsContent.d.ts +3 -2
- package/lib/components/Tabs/renderGroupTab.d.ts +2 -2
- package/lib/components/Tabs/renderGroupTab.js +5 -5
- package/lib/components/Tabs/renderGroupTab.js.map +1 -1
- package/lib/components/Tabs/renderTab.d.ts +3 -3
- package/lib/components/Tabs/renderTab.js +3 -3
- package/lib/components/Tabs/renderTab.js.map +1 -1
- package/lib/components/Tabs/tabItemClasses.d.ts +3 -2
- package/lib/components/Tabs/tabItemClasses.js +26 -10
- package/lib/components/Tabs/tabItemClasses.js.map +1 -1
- package/lib/hooks/useLink.js +1 -1
- package/lib/hooks/useLink.js.map +1 -1
- package/mobile/bundle/bundle.umd.js +143 -135
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/bundle/components/CarouselRecommendationCard/cardStyle.d.ts +1 -0
- package/mobile/bundle/components/Tabs/CenteredTabs.d.ts +7 -0
- package/mobile/bundle/components/Tabs/LinkTab.d.ts +2 -2
- package/mobile/bundle/components/Tabs/TabsContent.d.ts +3 -2
- package/mobile/bundle/components/Tabs/renderGroupTab.d.ts +2 -2
- package/mobile/bundle/components/Tabs/renderTab.d.ts +3 -3
- package/mobile/bundle/components/Tabs/tabItemClasses.d.ts +3 -2
- package/mobile/dist/components/Blocks.js +2 -0
- package/mobile/dist/components/Blocks.js.map +1 -1
- package/mobile/dist/components/CarouselRecommendationCard/CarouselRecommendationCard.js +4 -4
- package/mobile/dist/components/CarouselRecommendationCard/CarouselRecommendationCard.js.map +1 -1
- package/mobile/dist/components/CarouselRecommendationCard/cardStyle.d.ts +1 -0
- package/mobile/dist/components/CarouselRecommendationCard/cardStyle.js +4 -0
- package/mobile/dist/components/CarouselRecommendationCard/cardStyle.js.map +1 -0
- package/mobile/dist/components/CarouselTariffsCard/getPaddingStyle.js +1 -1
- package/mobile/dist/components/CarouselTariffsCard/getPaddingStyle.js.map +1 -1
- package/mobile/dist/components/Footer/Footer.js +1 -1
- package/mobile/dist/components/Footer/Footer.js.map +1 -1
- package/mobile/dist/components/Footer/SocialMedia.js +1 -1
- package/mobile/dist/components/Footer/SocialMedia.js.map +1 -1
- package/mobile/dist/components/Tabs/CenteredTabs.d.ts +7 -0
- package/mobile/dist/components/Tabs/CenteredTabs.js +7 -0
- package/mobile/dist/components/Tabs/CenteredTabs.js.map +1 -0
- package/mobile/dist/components/Tabs/LinkTab.d.ts +2 -2
- package/mobile/dist/components/Tabs/LinkTab.js +2 -2
- package/mobile/dist/components/Tabs/LinkTab.js.map +1 -1
- package/mobile/dist/components/Tabs/ScrollableTabs.js +3 -9
- package/mobile/dist/components/Tabs/ScrollableTabs.js.map +1 -1
- package/mobile/dist/components/Tabs/Tabs.js +14 -7
- package/mobile/dist/components/Tabs/Tabs.js.map +1 -1
- package/mobile/dist/components/Tabs/TabsContent.d.ts +3 -2
- package/mobile/dist/components/Tabs/renderGroupTab.d.ts +2 -2
- package/mobile/dist/components/Tabs/renderGroupTab.js +4 -4
- package/mobile/dist/components/Tabs/renderGroupTab.js.map +1 -1
- package/mobile/dist/components/Tabs/renderTab.d.ts +3 -3
- package/mobile/dist/components/Tabs/renderTab.js +3 -3
- package/mobile/dist/components/Tabs/renderTab.js.map +1 -1
- package/mobile/dist/components/Tabs/tabItemClasses.d.ts +3 -2
- package/mobile/dist/components/Tabs/tabItemClasses.js +26 -10
- package/mobile/dist/components/Tabs/tabItemClasses.js.map +1 -1
- package/mobile/dist/hooks/useLink.js +1 -1
- package/mobile/dist/hooks/useLink.js.map +1 -1
- package/mobile/lib/common.css +1 -1
- package/mobile/lib/components/Blocks.js +2 -0
- package/mobile/lib/components/Blocks.js.map +1 -1
- package/mobile/lib/components/CarouselRecommendationCard/CarouselRecommendationCard.js +4 -4
- package/mobile/lib/components/CarouselRecommendationCard/CarouselRecommendationCard.js.map +1 -1
- package/mobile/lib/components/CarouselRecommendationCard/cardStyle.d.ts +1 -0
- package/mobile/lib/components/CarouselRecommendationCard/cardStyle.js +2 -0
- package/mobile/lib/components/CarouselRecommendationCard/cardStyle.js.map +1 -0
- package/mobile/lib/components/CarouselTariffsCard/getPaddingStyle.js +1 -1
- package/mobile/lib/components/CarouselTariffsCard/getPaddingStyle.js.map +1 -1
- package/mobile/lib/components/Footer/Footer.js +1 -1
- package/mobile/lib/components/Footer/Footer.js.map +1 -1
- package/mobile/lib/components/Footer/SocialMedia.js +1 -1
- package/mobile/lib/components/Footer/SocialMedia.js.map +1 -1
- package/mobile/lib/components/Tabs/CenteredTabs.d.ts +7 -0
- package/mobile/lib/components/Tabs/CenteredTabs.js +5 -0
- package/mobile/lib/components/Tabs/CenteredTabs.js.map +1 -0
- package/mobile/lib/components/Tabs/LinkTab.d.ts +2 -2
- package/mobile/lib/components/Tabs/LinkTab.js +2 -2
- package/mobile/lib/components/Tabs/LinkTab.js.map +1 -1
- package/mobile/lib/components/Tabs/ScrollableTabs.js +3 -9
- package/mobile/lib/components/Tabs/ScrollableTabs.js.map +1 -1
- package/mobile/lib/components/Tabs/Tabs.js +14 -7
- package/mobile/lib/components/Tabs/Tabs.js.map +1 -1
- package/mobile/lib/components/Tabs/TabsContent.d.ts +3 -2
- package/mobile/lib/components/Tabs/renderGroupTab.d.ts +2 -2
- package/mobile/lib/components/Tabs/renderGroupTab.js +5 -5
- package/mobile/lib/components/Tabs/renderGroupTab.js.map +1 -1
- package/mobile/lib/components/Tabs/renderTab.d.ts +3 -3
- package/mobile/lib/components/Tabs/renderTab.js +3 -3
- package/mobile/lib/components/Tabs/renderTab.js.map +1 -1
- package/mobile/lib/components/Tabs/tabItemClasses.d.ts +3 -2
- package/mobile/lib/components/Tabs/tabItemClasses.js +26 -10
- package/mobile/lib/components/Tabs/tabItemClasses.js.map +1 -1
- package/mobile/lib/hooks/useLink.js +1 -1
- package/mobile/lib/hooks/useLink.js.map +1 -1
- package/mobile/src/components/Blocks.ts +2 -0
- package/mobile/src/components/CarouselRecommendationCard/CarouselRecommendationCard.tsx +14 -20
- package/mobile/src/components/CarouselRecommendationCard/cardStyle.ts +2 -0
- package/mobile/src/components/CarouselTariffsCard/getPaddingStyle.tsx +2 -2
- package/mobile/src/components/Footer/Footer.tsx +1 -1
- package/mobile/src/components/Footer/SocialMedia.tsx +1 -1
- package/mobile/src/components/Tabs/CenteredTabs.tsx +12 -0
- package/mobile/src/components/Tabs/LinkTab.tsx +5 -5
- package/mobile/src/components/Tabs/ScrollableTabs.tsx +5 -13
- package/mobile/src/components/Tabs/Tabs.tsx +21 -19
- package/mobile/src/components/Tabs/TabsContent.ts +3 -2
- package/mobile/src/components/Tabs/renderGroupTab.tsx +11 -10
- package/mobile/src/components/Tabs/renderTab.tsx +5 -13
- package/mobile/src/components/Tabs/tabItemClasses.ts +28 -10
- package/mobile/src/hooks/useLink.ts +1 -1
- package/package.json +1 -1
- package/src/components/Blocks.mobile.ts +2 -0
- package/src/components/CarouselRecommendationCard/CarouselRecommendationCard.fixture.mobile.tsx +148 -0
- package/src/components/CarouselRecommendationCard/CarouselRecommendationCard.mobile.tsx +63 -0
- package/src/components/CarouselRecommendationCard/CarouselRecommendationCard.tsx +1 -3
- package/src/components/CarouselRecommendationCard/cardStyle.ts +2 -0
- package/src/components/CarouselTariffsCard/getPaddingStyle.mobile.tsx +2 -2
- package/src/components/CarouselTariffsCard/getPaddingStyle.tsx +1 -1
- package/src/components/Footer/Footer.mobile.tsx +1 -1
- package/src/components/Footer/SocialMedia.mobile.tsx +1 -1
- package/src/components/Tabs/CenteredTabs.tsx +12 -0
- package/src/components/Tabs/LinkTab.tsx +5 -5
- package/src/components/Tabs/ScrollableTabs.tsx +5 -13
- package/src/components/Tabs/Tabs.fixture.tsx +27 -0
- package/src/components/Tabs/Tabs.tsx +21 -19
- package/src/components/Tabs/TabsContent.ts +3 -2
- package/src/components/Tabs/renderGroupTab.tsx +11 -10
- package/src/components/Tabs/renderTab.tsx +5 -13
- package/src/components/Tabs/tabItemClasses.ts +28 -10
- package/src/hooks/useLink.ts +1 -1
|
@@ -642,7 +642,7 @@
|
|
|
642
642
|
const { close } = useDialog();
|
|
643
643
|
return (props) => ({
|
|
644
644
|
...props,
|
|
645
|
-
href: isRemote ? props.href : adjustHref(router)(props.href, basePath),
|
|
645
|
+
href: isRemote && !basePath ? props.href : adjustHref(router)(props.href, basePath),
|
|
646
646
|
'aria-label': props.text,
|
|
647
647
|
onClick: handlerDecorator(handleHref(props), props),
|
|
648
648
|
});
|
|
@@ -809,6 +809,144 @@
|
|
|
809
809
|
const getAlignStyle = (isAlignCenter) => isAlignCenter ? 'flex justify-center' : '';
|
|
810
810
|
const renderDots = (containerRef, dotsActiveIndex, itemCount) => (jsx(SwipeListControlDots, { containerRef: containerRef, activeIndex: dotsActiveIndex, dotCount: itemCount, listType: 'horizontal-list' }));
|
|
811
811
|
|
|
812
|
+
const LinkWrapper = JSX(({ className = '', href, target, isRemote = false, children }) => {
|
|
813
|
+
const link = useLink({ isRemote });
|
|
814
|
+
const linkProps = link({ href, target });
|
|
815
|
+
const Tag = href ? 'a' : 'div';
|
|
816
|
+
return (jsx(Tag, { className: style('block', className), ...(href ? linkProps : {}), children: children }));
|
|
817
|
+
});
|
|
818
|
+
|
|
819
|
+
const DOT_SIZE_MAP = {
|
|
820
|
+
L: 'w-1.5 h-1.5 min-w-1.5 min-h-1.5 mr-4',
|
|
821
|
+
M: 'w-1.5 h-1.5 min-w-1.5 min-h-1.5 mr-3',
|
|
822
|
+
S: 'w-1 h-1 min-w-1 min-h-1 mr-2',
|
|
823
|
+
};
|
|
824
|
+
const ListItem = JSX(({ className = '', isDotted = true, children, size = 'M' }) => (jsxs("div", { className: `font-sans flex items-baseline ${className}`, role: "listitem", children: [isDotted ? (jsx("div", { children: jsx("div", { className: `rounded-full align-middle inline-block bg-primary-text group-data-secondary:bg-white ${DOT_SIZE_MAP[size]}` }) })) : null, jsx("span", { children: children })] })));
|
|
825
|
+
|
|
826
|
+
const TEXT_SIZE_MAP = {
|
|
827
|
+
S: 'text-l-light',
|
|
828
|
+
M: 'text-h6',
|
|
829
|
+
L: 'text-h5',
|
|
830
|
+
};
|
|
831
|
+
const ITEM_INDENT_MAP = {
|
|
832
|
+
S: 'ml-2',
|
|
833
|
+
M: 'ml-3',
|
|
834
|
+
L: 'ml-4',
|
|
835
|
+
};
|
|
836
|
+
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);
|
|
837
|
+
|
|
838
|
+
const ICONS_MAP = [
|
|
839
|
+
{
|
|
840
|
+
origins: ['t.me', 'telegram.org'],
|
|
841
|
+
iconMapped: { icon: 'TelegramIcon' },
|
|
842
|
+
label: 'Телеграм',
|
|
843
|
+
},
|
|
844
|
+
{
|
|
845
|
+
origins: ['vk.com'],
|
|
846
|
+
iconMapped: { icon: 'VKIcon' },
|
|
847
|
+
label: 'ВКонтакте',
|
|
848
|
+
},
|
|
849
|
+
{
|
|
850
|
+
origins: ['ok.ru'],
|
|
851
|
+
iconMapped: { icon: 'OkIcon' },
|
|
852
|
+
label: 'Одноклассники',
|
|
853
|
+
},
|
|
854
|
+
{
|
|
855
|
+
origins: ['apps.apple.com'],
|
|
856
|
+
iconMapped: { icon: 'AppleIcon' },
|
|
857
|
+
label: 'App Store',
|
|
858
|
+
},
|
|
859
|
+
{
|
|
860
|
+
origins: ['play.google.com'],
|
|
861
|
+
iconMapped: { icon: 'PlayMarketIcon' },
|
|
862
|
+
label: 'Google Play',
|
|
863
|
+
},
|
|
864
|
+
{
|
|
865
|
+
origins: ['youtube.com'],
|
|
866
|
+
iconMapped: { icon: 'YoutubeIcon' },
|
|
867
|
+
label: 'Youtube',
|
|
868
|
+
},
|
|
869
|
+
];
|
|
870
|
+
const buttonSizeStyles = {
|
|
871
|
+
default: 'w-14 h-14',
|
|
872
|
+
small: 'w-12 h-12',
|
|
873
|
+
};
|
|
874
|
+
const buttonStylesWithText = (text, buttonSize) => text
|
|
875
|
+
? ''
|
|
876
|
+
: `group/media flex items-center justify-center box-border ${buttonSizeStyles[buttonSize]}`;
|
|
877
|
+
const MediaButton = JSX(({ buttonSize = 'default', rounded = false, icon, ...rest }) => {
|
|
878
|
+
const { href, version, text = '' } = rest;
|
|
879
|
+
const { iconMapped, label } = ICONS_MAP.find(({ origins }) => origins.some((_) => href?.includes(_))) || {};
|
|
880
|
+
const iconCustom = getFilteredIcon(icon) ?? iconMapped;
|
|
881
|
+
return (jsx(Button, { className: style(rounded ? 'rounded-full' : 'rounded-md', 'border border-solid hover:border-transparent', 'group-data-primary:border-main-divider', 'hover:bg-primary-main hover:text-black', 'group-data-secondary:bg-white border-main-divider group-data-secondary:hover:bg-secondary-hover', 'group-data-gray:border-green', buttonStylesWithText(text, buttonSize)), "aria-label": label, rel: "noopener noreferrer", target: "_blank", text: text, version: version, ...rest, children: iconCustom && !text ? (jsx(Img, { image: iconCustom, imageClassName: "group-hover/media:text-white", width: "24", height: "24" })) : null }));
|
|
882
|
+
});
|
|
883
|
+
const getFilteredIcon = (icon) => (icon?.src || icon?.icon ? icon : undefined);
|
|
884
|
+
|
|
885
|
+
const SocialMedia = JSX(({ className = '', media }) => (jsx("div", { className: `flex gap-2 items-start justify-start ${className}`, children: media?.map((_, index) => (jsx(MediaButton, { ..._ }, String(index)))) })));
|
|
886
|
+
|
|
887
|
+
const HeadingClass = {
|
|
888
|
+
h0: 'text-m-title',
|
|
889
|
+
h1: 'text-m-title',
|
|
890
|
+
h2: 'text-m-title',
|
|
891
|
+
h3: 'text-h6',
|
|
892
|
+
h4: 'text-m-title-xs',
|
|
893
|
+
h5: 'text-m-title-xs',
|
|
894
|
+
h6: 'text-m-title-xs',
|
|
895
|
+
};
|
|
896
|
+
const Heading = JSX((props) => {
|
|
897
|
+
const { className, headingType = 'h3', title, as: Tag = 'h3' } = props;
|
|
898
|
+
return (jsx(Tag, { className: `font-sans font-medium m-0 ${HeadingClass[headingType]} ${className || ''}`, children: title }));
|
|
899
|
+
});
|
|
900
|
+
|
|
901
|
+
const Paragraph = JSX(({ children, ...style }) => (jsx("p", { className: ['font-sans', ...Object.values(style)].join(' '), children: children })));
|
|
902
|
+
|
|
903
|
+
const headlineVersionStyles = {
|
|
904
|
+
XXL: {
|
|
905
|
+
title: { headingType: 'h0', as: 'h1' },
|
|
906
|
+
descriptionSize: 'text-h5',
|
|
907
|
+
descriptionStyle: 'mt-5',
|
|
908
|
+
},
|
|
909
|
+
XL: {
|
|
910
|
+
title: { headingType: 'h1', as: 'h1' },
|
|
911
|
+
descriptionSize: 'text-xl-light',
|
|
912
|
+
descriptionStyle: 'mt-4',
|
|
913
|
+
},
|
|
914
|
+
L: {
|
|
915
|
+
title: { headingType: 'h2', as: 'h2' },
|
|
916
|
+
descriptionSize: 'text-xl-light',
|
|
917
|
+
descriptionStyle: 'mt-4',
|
|
918
|
+
},
|
|
919
|
+
M: {
|
|
920
|
+
title: { headingType: 'h3', as: 'h3' },
|
|
921
|
+
descriptionSize: 'text-xl-light',
|
|
922
|
+
descriptionStyle: 'mt-3',
|
|
923
|
+
},
|
|
924
|
+
S: {
|
|
925
|
+
title: { headingType: 'h4', as: 'h4' },
|
|
926
|
+
descriptionSize: 'text-xl-light',
|
|
927
|
+
descriptionStyle: 'mt-2',
|
|
928
|
+
},
|
|
929
|
+
XS: {
|
|
930
|
+
title: { headingType: 'h5', as: 'h5' },
|
|
931
|
+
descriptionSize: 'text-l-light',
|
|
932
|
+
descriptionStyle: 'mt-2',
|
|
933
|
+
},
|
|
934
|
+
};
|
|
935
|
+
|
|
936
|
+
const Headline = JSX(({ className, title, description, headlineVersion = 'XL', align = 'text-center', as, isPadding = true, isTheme = false, version = '', ...rest }) => {
|
|
937
|
+
const versionStyle = headlineVersionStyles[headlineVersion];
|
|
938
|
+
const paddingStyle = isPadding ? 'p-default' : '';
|
|
939
|
+
const descriptionStyle = { marginTop: versionStyle.descriptionStyle };
|
|
940
|
+
return (jsxs(BlockWrapper, { className: style(paddingStyle, className), version: version, isTheme: isTheme, ...rest, children: [title ? (jsx(Heading, { className: style('whitespace-pre-wrap', align), ...versionStyle?.title, as: as || versionStyle?.title.as, title: title })) : null, description ? (jsx(Paragraph, { size: versionStyle.descriptionSize, align: align, ...descriptionStyle, children: description })) : null] }));
|
|
941
|
+
});
|
|
942
|
+
|
|
943
|
+
const BORDER_STYLE = 'border border-solid border-gray group-data-secondary:border-white/50 group-data-gray:border-main-divider';
|
|
944
|
+
|
|
945
|
+
const CarouselRecommendationCard = JSX(({ className = '', description, href, icon, items = [], socialMedia = [], target, title, align = 'text-left', ...rest }) => {
|
|
946
|
+
return (jsx(BlockWrapper, { className: style('relative box-border p-default group-data-gray:bg-main-divider/50', BORDER_STYLE, className), ...rest, children: jsxs(LinkWrapper, { href: href, target: target, children: [jsx(Headline, { className: "mb-2", title: title, description: description, headlineVersion: "S", isPadding: false, align: align }), items.length ? (jsx(List, { className: "flex flex-col gap-2", items: items, listItemSize: "S" })) : null, renderIcon$1(icon), socialMedia.length ? jsx(SocialMedia, { className: "mt-5", media: socialMedia }) : null] }) }));
|
|
947
|
+
});
|
|
948
|
+
const renderIcon$1 = (icon) => icon?.src || icon?.icon ? (jsx("div", { children: jsx(Img, { image: icon }) })) : null;
|
|
949
|
+
|
|
812
950
|
const Foldable = JSX(({ className = '', isFoldButtonOnTop = false, unfoldedByDefault = false, renderFoldableSection, renderFoldButton, }) => {
|
|
813
951
|
const [isUnfolded, setIsUnfolded] = useState(unfoldedByDefault);
|
|
814
952
|
const onToggle = useCallback(() => {
|
|
@@ -831,23 +969,7 @@
|
|
|
831
969
|
return (jsx("div", { ref: containerRef, className: `transition-max-h duration-300 overflow-hidden ${containerRef.current || !isUnfolded ? 'max-h-0' : ''} ${className}`, children: children }));
|
|
832
970
|
});
|
|
833
971
|
|
|
834
|
-
const
|
|
835
|
-
h0: 'text-m-title',
|
|
836
|
-
h1: 'text-m-title',
|
|
837
|
-
h2: 'text-m-title',
|
|
838
|
-
h3: 'text-h6',
|
|
839
|
-
h4: 'text-m-title-xs',
|
|
840
|
-
h5: 'text-m-title-xs',
|
|
841
|
-
h6: 'text-m-title-xs',
|
|
842
|
-
};
|
|
843
|
-
const Heading = JSX((props) => {
|
|
844
|
-
const { className, headingType = 'h3', title, as: Tag = 'h3' } = props;
|
|
845
|
-
return (jsx(Tag, { className: `font-sans font-medium m-0 ${HeadingClass[headingType]} ${className || ''}`, children: title }));
|
|
846
|
-
});
|
|
847
|
-
|
|
848
|
-
const Paragraph = JSX(({ children, ...style }) => (jsx("p", { className: ['font-sans', ...Object.values(style)].join(' '), children: children })));
|
|
849
|
-
|
|
850
|
-
const getPaddingStyle = (isHighlighting) => isHighlighting ? 'p-default mt-6' : 'p-default mt-6';
|
|
972
|
+
const getPaddingStyle = (isHighlighting = false) => isHighlighting ? 'p-default mt-6' : 'mt-6 p-default'; // Хак для мобильной версии т.к. контракт должен быть идентичный
|
|
851
973
|
|
|
852
974
|
const renderButtonsSection = (buttons, { className = '', buttonClassName, isVertical } = {}) => buttons?.length && buttons.some((_) => _?.text || _?.icon?.icon) ? (jsx("div", { className: style('flex', isVertical ? 'flex-col gap-2' : 'gap-4', className), children: buttons.map(renderButton(buttonClassName)) })) : null;
|
|
853
975
|
const renderButton = (buttonClassName = '') => (button, index) => {
|
|
@@ -1407,55 +1529,6 @@
|
|
|
1407
1529
|
|
|
1408
1530
|
const HorizontalNavigation = JSX(({ title, links, className = '' }) => (jsxs("div", { className: className, children: [jsx("span", { className: "text-primary-text text-s font-medium", children: title }), links?.length ? (jsx("div", { className: "flex flex-col gap-2 pt-3", children: links.map((_, i) => (jsx(HorizontalNavigationLink, { index: i, className: "text-s", ..._ }, String(i)))) })) : null] })));
|
|
1409
1531
|
|
|
1410
|
-
const ICONS_MAP = [
|
|
1411
|
-
{
|
|
1412
|
-
origins: ['t.me', 'telegram.org'],
|
|
1413
|
-
iconMapped: { icon: 'TelegramIcon' },
|
|
1414
|
-
label: 'Телеграм',
|
|
1415
|
-
},
|
|
1416
|
-
{
|
|
1417
|
-
origins: ['vk.com'],
|
|
1418
|
-
iconMapped: { icon: 'VKIcon' },
|
|
1419
|
-
label: 'ВКонтакте',
|
|
1420
|
-
},
|
|
1421
|
-
{
|
|
1422
|
-
origins: ['ok.ru'],
|
|
1423
|
-
iconMapped: { icon: 'OkIcon' },
|
|
1424
|
-
label: 'Одноклассники',
|
|
1425
|
-
},
|
|
1426
|
-
{
|
|
1427
|
-
origins: ['apps.apple.com'],
|
|
1428
|
-
iconMapped: { icon: 'AppleIcon' },
|
|
1429
|
-
label: 'App Store',
|
|
1430
|
-
},
|
|
1431
|
-
{
|
|
1432
|
-
origins: ['play.google.com'],
|
|
1433
|
-
iconMapped: { icon: 'PlayMarketIcon' },
|
|
1434
|
-
label: 'Google Play',
|
|
1435
|
-
},
|
|
1436
|
-
{
|
|
1437
|
-
origins: ['youtube.com'],
|
|
1438
|
-
iconMapped: { icon: 'YoutubeIcon' },
|
|
1439
|
-
label: 'Youtube',
|
|
1440
|
-
},
|
|
1441
|
-
];
|
|
1442
|
-
const buttonSizeStyles = {
|
|
1443
|
-
default: 'w-14 h-14',
|
|
1444
|
-
small: 'w-12 h-12',
|
|
1445
|
-
};
|
|
1446
|
-
const buttonStylesWithText = (text, buttonSize) => text
|
|
1447
|
-
? ''
|
|
1448
|
-
: `group/media flex items-center justify-center box-border ${buttonSizeStyles[buttonSize]}`;
|
|
1449
|
-
const MediaButton = JSX(({ buttonSize = 'default', rounded = false, icon, ...rest }) => {
|
|
1450
|
-
const { href, version, text = '' } = rest;
|
|
1451
|
-
const { iconMapped, label } = ICONS_MAP.find(({ origins }) => origins.some((_) => href?.includes(_))) || {};
|
|
1452
|
-
const iconCustom = getFilteredIcon(icon) ?? iconMapped;
|
|
1453
|
-
return (jsx(Button, { className: style(rounded ? 'rounded-full' : 'rounded-md', 'border border-solid hover:border-transparent', 'group-data-primary:border-main-divider', 'hover:bg-primary-main hover:text-black', 'group-data-secondary:bg-white border-main-divider group-data-secondary:hover:bg-secondary-hover', 'group-data-gray:border-green', buttonStylesWithText(text, buttonSize)), "aria-label": label, rel: "noopener noreferrer", target: "_blank", text: text, version: version, ...rest, children: iconCustom && !text ? (jsx(Img, { image: iconCustom, imageClassName: "group-hover/media:text-white", width: "24", height: "24" })) : null }));
|
|
1454
|
-
});
|
|
1455
|
-
const getFilteredIcon = (icon) => (icon?.src || icon?.icon ? icon : undefined);
|
|
1456
|
-
|
|
1457
|
-
const SocialMedia = JSX(({ className = '', media }) => (jsx("div", { className: `flex gap-2 items-start justify-start pt-6 pb-6 ${className}`, children: media?.map((_, index) => (jsx(MediaButton, { ..._ }, String(index)))) })));
|
|
1458
|
-
|
|
1459
1532
|
const TextInformationLink = JSX(({ className = '', index, ...rest }) => {
|
|
1460
1533
|
const link = useLink({ isRemote: true });
|
|
1461
1534
|
const { href, target, text, onClick } = link(rest);
|
|
@@ -1470,7 +1543,7 @@
|
|
|
1470
1543
|
const fallback = rest.options?.page?.fallback;
|
|
1471
1544
|
const sitemap = useSWRResource(projectSettings.SITEMAP || 'sitemap', fallback);
|
|
1472
1545
|
const { documents, relatedEnterprises, contacts, socialMedia, horizontalNavigationTitle } = useSWRResource(projectSettings.FOOTER || 'footer', fallback);
|
|
1473
|
-
return (jsxs(BlockWrapper, { tag: "footer", className: `px-4 py-[26px] ${className}`, ...rest, children: [jsx(Contacts, { className: "overflow-hidden", items: contacts, hasButton: true }), jsx("div", { className: "m-0 p-0", children: sitemap.topItems?.map((item, i) => (jsx(RollupItem, { label: item?.text, children: jsx(LinkList, { documents: item.items }) }, String(i)))) }), jsx("div", { className: "mt-4", children: sitemap?.dispositions?.map(renderSubMenuItem) }), jsx(MobileAppTile, { title: "\u041C\u043E\u0431\u0438\u043B\u044C\u043D\u043E\u0435 \u043F\u0440\u0438\u043B\u043E\u0436\u0435\u043D\u0438\u0435", description: "\u0417\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044C \u0434\u043B\u044F IOS \u0438 Android", ...rest }), jsx(SearchBar, { className: "grow" }), jsx(SocialMedia, { className: "pb-
|
|
1546
|
+
return (jsxs(BlockWrapper, { tag: "footer", className: `px-4 py-[26px] ${className}`, ...rest, children: [jsx(Contacts, { className: "overflow-hidden", items: contacts, hasButton: true }), jsx("div", { className: "m-0 p-0", children: sitemap.topItems?.map((item, i) => (jsx(RollupItem, { label: item?.text, children: jsx(LinkList, { documents: item.items }) }, String(i)))) }), jsx("div", { className: "mt-4", children: sitemap?.dispositions?.map(renderSubMenuItem) }), jsx(MobileAppTile, { title: "\u041C\u043E\u0431\u0438\u043B\u044C\u043D\u043E\u0435 \u043F\u0440\u0438\u043B\u043E\u0436\u0435\u043D\u0438\u0435", description: "\u0417\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044C \u0434\u043B\u044F IOS \u0438 Android", ...rest }), jsx(SearchBar, { className: "grow" }), jsx(SocialMedia, { className: "pt-6 pb-6", media: socialMedia }), jsx(HorizontalNavigation, { title: horizontalNavigationTitle, links: relatedEnterprises }), jsx(TextInformation, { links: documents })] }));
|
|
1474
1547
|
});
|
|
1475
1548
|
const renderSubMenuItem = (menu, i) => {
|
|
1476
1549
|
const { icon, href, text } = menu;
|
|
@@ -1568,46 +1641,6 @@
|
|
|
1568
1641
|
return (jsxs(BlockWrapper, { tag: "header", version: version, ...rest, children: [jsxs("div", { className: "container px-4 py-0 box-border", children: [jsx(HeaderTop, { onClick: handleBurgerMenuShow, bgColor: bgColor, logo: logo }), jsx("nav", { className: "flex items-center m-0 p-0 overflow-y-hidden w-full h-12", children: jsx("div", { className: "flex no-scrollbar horizontal-list h-full items-center", children: subItems?.map((_, i) => (jsx(HeaderItem, { className: "mr-8 whitespace-nowrap text-s", active: _ === activeSubItem, ..._ }, String(i)))) }) })] }), burgerMenuShow ? (jsx(HeaderBurger, { onClick: handleBurgerMenuShow, burgerSubMenu: dispositions, defaultLocation: defaultLocation, children: jsx("div", { className: "list-none m-0 p-0", children: topItems?.map((item, i) => (jsx(RollupItem, { label: item.text, children: jsx(LinkList, { documents: item.items }) }, String(i)))) }) })) : null] }));
|
|
1569
1642
|
});
|
|
1570
1643
|
|
|
1571
|
-
const headlineVersionStyles = {
|
|
1572
|
-
XXL: {
|
|
1573
|
-
title: { headingType: 'h0', as: 'h1' },
|
|
1574
|
-
descriptionSize: 'text-h5',
|
|
1575
|
-
descriptionStyle: 'mt-5',
|
|
1576
|
-
},
|
|
1577
|
-
XL: {
|
|
1578
|
-
title: { headingType: 'h1', as: 'h1' },
|
|
1579
|
-
descriptionSize: 'text-xl-light',
|
|
1580
|
-
descriptionStyle: 'mt-4',
|
|
1581
|
-
},
|
|
1582
|
-
L: {
|
|
1583
|
-
title: { headingType: 'h2', as: 'h2' },
|
|
1584
|
-
descriptionSize: 'text-xl-light',
|
|
1585
|
-
descriptionStyle: 'mt-4',
|
|
1586
|
-
},
|
|
1587
|
-
M: {
|
|
1588
|
-
title: { headingType: 'h3', as: 'h3' },
|
|
1589
|
-
descriptionSize: 'text-xl-light',
|
|
1590
|
-
descriptionStyle: 'mt-3',
|
|
1591
|
-
},
|
|
1592
|
-
S: {
|
|
1593
|
-
title: { headingType: 'h4', as: 'h4' },
|
|
1594
|
-
descriptionSize: 'text-xl-light',
|
|
1595
|
-
descriptionStyle: 'mt-2',
|
|
1596
|
-
},
|
|
1597
|
-
XS: {
|
|
1598
|
-
title: { headingType: 'h5', as: 'h5' },
|
|
1599
|
-
descriptionSize: 'text-l-light',
|
|
1600
|
-
descriptionStyle: 'mt-2',
|
|
1601
|
-
},
|
|
1602
|
-
};
|
|
1603
|
-
|
|
1604
|
-
const Headline = JSX(({ className, title, description, headlineVersion = 'XL', align = 'text-center', as, isPadding = true, isTheme = false, version = '', ...rest }) => {
|
|
1605
|
-
const versionStyle = headlineVersionStyles[headlineVersion];
|
|
1606
|
-
const paddingStyle = isPadding ? 'p-default' : '';
|
|
1607
|
-
const descriptionStyle = { marginTop: versionStyle.descriptionStyle };
|
|
1608
|
-
return (jsxs(BlockWrapper, { className: style(paddingStyle, className), version: version, isTheme: isTheme, ...rest, children: [title ? (jsx(Heading, { className: style('whitespace-pre-wrap', align), ...versionStyle?.title, as: as || versionStyle?.title.as, title: title })) : null, description ? (jsx(Paragraph, { size: versionStyle.descriptionSize, align: align, ...descriptionStyle, children: description })) : null] }));
|
|
1609
|
-
});
|
|
1610
|
-
|
|
1611
1644
|
const ImgBlock = JSX((props) => {
|
|
1612
1645
|
const { className, image, ...rest } = props;
|
|
1613
1646
|
return (jsx(BlockWrapper, { className: className, ...rest, children: jsx(Img, { image: image }) }));
|
|
@@ -1688,25 +1721,6 @@
|
|
|
1688
1721
|
const renderShimmerItem = (width, index) => (jsx("div", { style: { width: `${width || 100}%` }, className: "h-4 mt-2 bg-secondary-light" }, String(index)));
|
|
1689
1722
|
const goldenSequence = (first, size) => [first].concat(size > 0 ? goldenSequence(first / GOLDEN_RATIO, size - 1) : []);
|
|
1690
1723
|
|
|
1691
|
-
const DOT_SIZE_MAP = {
|
|
1692
|
-
L: 'w-1.5 h-1.5 min-w-1.5 min-h-1.5 mr-4',
|
|
1693
|
-
M: 'w-1.5 h-1.5 min-w-1.5 min-h-1.5 mr-3',
|
|
1694
|
-
S: 'w-1 h-1 min-w-1 min-h-1 mr-2',
|
|
1695
|
-
};
|
|
1696
|
-
const ListItem = JSX(({ className = '', isDotted = true, children, size = 'M' }) => (jsxs("div", { className: `font-sans flex items-baseline ${className}`, role: "listitem", children: [isDotted ? (jsx("div", { children: jsx("div", { className: `rounded-full align-middle inline-block bg-primary-text group-data-secondary:bg-white ${DOT_SIZE_MAP[size]}` }) })) : null, jsx("span", { children: children })] })));
|
|
1697
|
-
|
|
1698
|
-
const TEXT_SIZE_MAP = {
|
|
1699
|
-
S: 'text-l-light',
|
|
1700
|
-
M: 'text-h6',
|
|
1701
|
-
L: 'text-h5',
|
|
1702
|
-
};
|
|
1703
|
-
const ITEM_INDENT_MAP = {
|
|
1704
|
-
S: 'ml-2',
|
|
1705
|
-
M: 'ml-3',
|
|
1706
|
-
L: 'ml-4',
|
|
1707
|
-
};
|
|
1708
|
-
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);
|
|
1709
|
-
|
|
1710
1724
|
const BaseTile = JSX(({ className = '', title = '', buttons, image, children }) => (jsxs("div", { className: `font-sans flex flex-col grow h-full items-start ${className}`, children: [title, jsxs("div", { className: "flex grow w-full justify-between", children: [jsxs("div", { className: "flex flex-col justify-between w-full", children: [jsx("div", { className: "h-full", children: children }), buttons ? jsx("div", { className: "mt-auto pt-8", children: buttons }) : null] }), image] })] })));
|
|
1711
1725
|
|
|
1712
1726
|
const BenefitItem = JSX((props) => {
|
|
@@ -1900,6 +1914,7 @@
|
|
|
1900
1914
|
RichTextBlock,
|
|
1901
1915
|
RollupItem,
|
|
1902
1916
|
VerticalLayout,
|
|
1917
|
+
CarouselRecommendationCard,
|
|
1903
1918
|
};
|
|
1904
1919
|
|
|
1905
1920
|
const debounce = (fn, delay = 600) => {
|
|
@@ -1957,13 +1972,6 @@
|
|
|
1957
1972
|
}, [scrollTarget]);
|
|
1958
1973
|
}
|
|
1959
1974
|
|
|
1960
|
-
const LinkWrapper = JSX(({ className = '', href, target, isRemote = false, children }) => {
|
|
1961
|
-
const link = useLink({ isRemote });
|
|
1962
|
-
const linkProps = link({ href, target });
|
|
1963
|
-
const Tag = href ? 'a' : 'div';
|
|
1964
|
-
return (jsx(Tag, { className: style('block', className), ...(href ? linkProps : {}), children: children }));
|
|
1965
|
-
});
|
|
1966
|
-
|
|
1967
1975
|
const COOKIE_DIALOG_ID = 'cookie';
|
|
1968
1976
|
const LOCAL_STORAGE_NAME = 'cookieClose';
|
|
1969
1977
|
const CookiePopup = JSX(({ termLink, personalDataPolicyLink }) => {
|
|
@@ -2053,7 +2061,7 @@
|
|
|
2053
2061
|
return (list) => list.reduce((acc, el, i) => (acc.length ? acc.concat({ ...sep, key: i }, el) : [el]), []);
|
|
2054
2062
|
}
|
|
2055
2063
|
|
|
2056
|
-
const packageVersion = "0.10.
|
|
2064
|
+
const packageVersion = "0.10.8";
|
|
2057
2065
|
|
|
2058
2066
|
exports.Blocks = Blocks;
|
|
2059
2067
|
exports.ContentPage = ContentPage;
|