@redneckz/wildless-cms-uni-blocks 0.10.7 → 0.10.9
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 +63 -43
- 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/bundle/utils/appendSlash.d.ts +1 -0
- package/dist/ProjectSettings.js +3 -3
- package/dist/ProjectSettings.js.map +1 -1
- package/dist/components/Blocks.mobile.js +2 -0
- package/dist/components/Blocks.mobile.js.map +1 -1
- package/dist/components/Calculator/useCreditCalculatorParams.js +1 -1
- package/dist/components/Calculator/useCreditCalculatorParams.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/dist/ui-kit/Sitemap/Sitemap.js +2 -1
- package/dist/ui-kit/Sitemap/Sitemap.js.map +1 -1
- package/dist/utils/appendSlash.d.ts +1 -0
- package/dist/utils/appendSlash.js +5 -0
- package/dist/utils/appendSlash.js.map +1 -0
- package/lib/ProjectSettings.js +1 -1
- package/lib/ProjectSettings.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/Calculator/useCreditCalculatorParams.js +1 -1
- package/lib/components/Calculator/useCreditCalculatorParams.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/lib/ui-kit/Sitemap/Sitemap.js +2 -1
- package/lib/ui-kit/Sitemap/Sitemap.js.map +1 -1
- package/lib/utils/appendSlash.d.ts +1 -0
- package/lib/utils/appendSlash.js +2 -0
- package/lib/utils/appendSlash.js.map +1 -0
- package/mobile/bundle/bundle.umd.js +146 -137
- 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/bundle/utils/appendSlash.d.ts +1 -0
- package/mobile/dist/ProjectSettings.js +3 -3
- package/mobile/dist/ProjectSettings.js.map +1 -1
- package/mobile/dist/components/Blocks.js +2 -0
- package/mobile/dist/components/Blocks.js.map +1 -1
- package/mobile/dist/components/Calculator/useCreditCalculatorParams.js +1 -1
- package/mobile/dist/components/Calculator/useCreditCalculatorParams.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/dist/ui-kit/Sitemap/Sitemap.js +2 -1
- package/mobile/dist/ui-kit/Sitemap/Sitemap.js.map +1 -1
- package/mobile/dist/utils/appendSlash.d.ts +1 -0
- package/mobile/dist/utils/appendSlash.js +5 -0
- package/mobile/dist/utils/appendSlash.js.map +1 -0
- package/mobile/lib/ProjectSettings.js +1 -1
- package/mobile/lib/ProjectSettings.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/Calculator/useCreditCalculatorParams.js +1 -1
- package/mobile/lib/components/Calculator/useCreditCalculatorParams.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/lib/ui-kit/Sitemap/Sitemap.js +2 -1
- package/mobile/lib/ui-kit/Sitemap/Sitemap.js.map +1 -1
- package/mobile/lib/utils/appendSlash.d.ts +1 -0
- package/mobile/lib/utils/appendSlash.js +2 -0
- package/mobile/lib/utils/appendSlash.js.map +1 -0
- package/mobile/src/ProjectSettings.ts +2 -2
- package/mobile/src/components/Blocks.ts +2 -0
- package/mobile/src/components/Calculator/useCreditCalculatorParams.ts +1 -1
- 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/mobile/src/ui-kit/Sitemap/Sitemap.tsx +2 -1
- package/mobile/src/utils/appendSlash.ts +2 -0
- package/package.json +6 -1
- package/src/ProjectSettings.ts +2 -2
- package/src/components/Blocks.mobile.ts +2 -0
- package/src/components/Calculator/useCreditCalculatorParams.ts +1 -1
- 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
- package/src/ui-kit/Sitemap/Sitemap.tsx +2 -1
- package/src/utils/appendSlash.ts +2 -0
package/bundle/bundle.umd.js
CHANGED
|
@@ -53,6 +53,8 @@
|
|
|
53
53
|
};
|
|
54
54
|
}
|
|
55
55
|
|
|
56
|
+
const appendSlash = (url) => url && !url.endsWith('/') ? `${url}/` : url;
|
|
57
|
+
|
|
56
58
|
const DEFAULT_PROJECT_SETTINGS = { PROD_BRANCH: 'master' };
|
|
57
59
|
const projectSettings = new (class {
|
|
58
60
|
_ = DEFAULT_PROJECT_SETTINGS;
|
|
@@ -96,7 +98,6 @@
|
|
|
96
98
|
return this._.YANDEX_METRIKA_ID;
|
|
97
99
|
}
|
|
98
100
|
})();
|
|
99
|
-
const appendSlash = (url) => (url && !url.endsWith('/') ? `${url}/` : url);
|
|
100
101
|
|
|
101
102
|
const AUTH_PREFIX = 'guest';
|
|
102
103
|
const STORAGE_KEY = 'likesToken';
|
|
@@ -556,7 +557,7 @@
|
|
|
556
557
|
const { close } = useDialog();
|
|
557
558
|
return (props) => ({
|
|
558
559
|
...props,
|
|
559
|
-
href: isRemote ? props.href : adjustHref(router)(props.href, basePath),
|
|
560
|
+
href: isRemote && !basePath ? props.href : adjustHref(router)(props.href, basePath),
|
|
560
561
|
'aria-label': props.text,
|
|
561
562
|
onClick: handlerDecorator(handleHref(props), props),
|
|
562
563
|
});
|
|
@@ -1628,7 +1629,7 @@
|
|
|
1628
1629
|
...getLimitRangeByKeys(['minMonths', 'maxMonths'], creditCalculatorSourceBookLimitParams, rateRows),
|
|
1629
1630
|
...userInputParams,
|
|
1630
1631
|
monthlyPayment,
|
|
1631
|
-
}), [userInputParams]);
|
|
1632
|
+
}), [userInputParams, data]);
|
|
1632
1633
|
};
|
|
1633
1634
|
const checkRowCommonParams = (props) => checkRowParam({
|
|
1634
1635
|
...props,
|
|
@@ -1814,7 +1815,7 @@
|
|
|
1814
1815
|
visibleItemCount: COLUMNS_FOR_SCROLL,
|
|
1815
1816
|
});
|
|
1816
1817
|
return (jsxs(BlockWrapper, { className: style('box-border overflow-hidden relative w-100', className), ...rest, children: [jsxs("div", { className: "bg-white", children: [tabsNav.length > 1
|
|
1817
|
-
? renderTabs({ activeIndex, tabsNav, slideIndexShift, onClick: handleSlideIndexShift })
|
|
1818
|
+
? renderTabs$1({ activeIndex, tabsNav, slideIndexShift, onClick: handleSlideIndexShift })
|
|
1818
1819
|
: null, renderArrows({
|
|
1819
1820
|
...controls,
|
|
1820
1821
|
btnClass: ['left-3', 'right-3'],
|
|
@@ -1837,7 +1838,7 @@
|
|
|
1837
1838
|
iconVersion: iconVersion ?? activeIconStyle,
|
|
1838
1839
|
}, width: "24", height: "24" }), jsxs("div", { className: "border-0", children: [jsx("div", { className: btnTitleClassName, children: tab?.title }), jsx("div", { className: btnDescClassName, children: tab.description })] })] }, String(i)));
|
|
1839
1840
|
}
|
|
1840
|
-
function renderTabs({ activeIndex, tabsNav, slideIndexShift, onClick }) {
|
|
1841
|
+
function renderTabs$1({ activeIndex, tabsNav, slideIndexShift, onClick }) {
|
|
1841
1842
|
const CARD_SHIFT = 388;
|
|
1842
1843
|
return (jsxs("div", { children: [jsx("div", { style: { transform: `translateX(-${activeIndex * CARD_SHIFT}px)` }, className: "flex flex-col justify-end items-center h-[126px] pt-9 box-border duration-1000", children: jsx("div", { className: "w-full flex flex-nowrap items-end gap-2", children: tabsNav.map((tab, i) => renderNavButton$3({
|
|
1843
1844
|
tab,
|
|
@@ -2351,6 +2352,7 @@
|
|
|
2351
2352
|
const SocialMedia = JSX(({ className = '', media, children, buttonSize }) => (jsxs("div", { className: "font-sans", children: [jsx("div", { className: `flex gap-1 ${className}`, children: media?.map((_, index) => (jsx(MediaButton, { buttonSize: buttonSize, ..._ }, String(index)))) }), jsx(Text, { size: "text-s-light", color: "text-secondary-text", children: children })] })));
|
|
2352
2353
|
|
|
2353
2354
|
const BORDER_STYLE = 'border border-solid border-gray group-data-secondary:border-white/50 group-data-gray:border-main-divider';
|
|
2355
|
+
|
|
2354
2356
|
const CarouselRecommendationCard = JSX(({ className = '', description, href, icon, items = [], socialMedia = [], target, title, align = 'text-left', version = 'primary', ...rest }) => {
|
|
2355
2357
|
return (jsx(BlockWrapper, { className: style('relative p-7 min-w-[524px] min-h-[218px] h-full box-border group-data-gray:bg-main-divider/50', BORDER_STYLE, className), version: version, ...rest, children: jsxs(LinkWrapper, { href: href, target: target, children: [jsx(Headline, { className: "mb-4", title: title, description: description, headlineVersion: "S", isPadding: false, align: align }), jsxs("div", { className: "w-1/2 h-full flex flex-col flex-1 justify-end", children: [items.length ? (jsx(List, { className: "flex flex-col gap-2", itemClassName: "text-l-light", items: items })) : null, socialMedia.length ? jsx(SocialMedia, { className: "pt-10", media: socialMedia }) : null] }), renderIconBlock$2(icon)] }) }));
|
|
2356
2358
|
});
|
|
@@ -2385,7 +2387,7 @@
|
|
|
2385
2387
|
return (jsx("div", { ref: containerRef, className: `transition-max-h duration-300 overflow-hidden ${containerRef.current || !isUnfolded ? 'max-h-0' : ''} ${className}`, children: children }));
|
|
2386
2388
|
});
|
|
2387
2389
|
|
|
2388
|
-
const getPaddingStyle = (isHighlighting) => isHighlighting ? 'p-8 mt-8 pt-20' : 'p-8 mt-20';
|
|
2390
|
+
const getPaddingStyle = (isHighlighting = false) => isHighlighting ? 'p-8 mt-8 pt-20' : 'p-8 mt-20';
|
|
2389
2391
|
|
|
2390
2392
|
const descriptionSize = 'text-h6';
|
|
2391
2393
|
|
|
@@ -3039,7 +3041,7 @@
|
|
|
3039
3041
|
});
|
|
3040
3042
|
const renderColumn = (menuItem, index) => {
|
|
3041
3043
|
const { text, items, href, target, onClick } = menuItem;
|
|
3042
|
-
return (jsxs("div", { className: "flex flex-col gap-3.5 w-1/4", children: [jsx("a", { className: "leading-5 text-l text-primary-text hover:text-primary-main no-underline", href: href, target: target || '_self', onClick: onClick, children: text || `Раздел ${index}` }), items?.map((_, i) => (jsx(ColumnItem, { ..._, basePath: href, index: i }, String(i))))] }, String(index)));
|
|
3044
|
+
return (jsxs("div", { className: "flex flex-col gap-3.5 w-1/4", children: [jsx("a", { className: "leading-5 text-l text-primary-text hover:text-primary-main no-underline", href: href, target: target || '_self', onClick: onClick, children: text || `Раздел ${index}` }), items?.map((_, i) => (jsx(ColumnItem, { ..._, basePath: appendSlash(href), index: i }, String(i))))] }, String(index)));
|
|
3043
3045
|
};
|
|
3044
3046
|
const ColumnItem = JSX(({ text, index, basePath, ...rest }) => {
|
|
3045
3047
|
const isAnotherPortal = projectSettings.BASE_PATH && basePath ? !projectSettings.BASE_PATH.startsWith(basePath) : false;
|
|
@@ -4424,7 +4426,11 @@
|
|
|
4424
4426
|
active: `inline-flex px-4 grow whitespace-nowrap ${LINK_CLASSES} ${SCROLLABLE_ACTIVE_LINK_CLASSES}`,
|
|
4425
4427
|
default: `inline-flex px-4 grow whitespace-nowrap ${LINK_CLASSES} ${INACTIVE_LINK_CLASSES}`,
|
|
4426
4428
|
},
|
|
4427
|
-
|
|
4429
|
+
centered: {
|
|
4430
|
+
active: `px-4 rounded-md ${LINK_CLASSES} ${WIDESCREEN_ACTIVE_LINK_CLASSES} whitespace-nowrap`,
|
|
4431
|
+
default: `px-4 rounded-md ${LINK_CLASSES} group/btn bg-transparent whitespace-nowrap`,
|
|
4432
|
+
},
|
|
4433
|
+
wideScreen: {
|
|
4428
4434
|
active: `${LINK_CLASSES} ${WIDESCREEN_ACTIVE_LINK_CLASSES} whitespace-nowrap`,
|
|
4429
4435
|
default: `${LINK_CLASSES} ${INACTIVE_LINK_CLASSES} whitespace-nowrap`,
|
|
4430
4436
|
},
|
|
@@ -4434,7 +4440,11 @@
|
|
|
4434
4440
|
active: `h-full border-0 border-b-2`,
|
|
4435
4441
|
default: ``,
|
|
4436
4442
|
},
|
|
4437
|
-
|
|
4443
|
+
centered: {
|
|
4444
|
+
active: '',
|
|
4445
|
+
default: '',
|
|
4446
|
+
},
|
|
4447
|
+
wideScreen: {
|
|
4438
4448
|
active: '',
|
|
4439
4449
|
default: '',
|
|
4440
4450
|
},
|
|
@@ -4446,7 +4456,11 @@
|
|
|
4446
4456
|
active: `inline-flex px-4 grow whitespace-nowrap ${LINK_CLASSES} ${SCROLLABLE_ACTIVE_LINK_CLASSES}`,
|
|
4447
4457
|
default: `inline-flex px-4 grow whitespace-nowrap ${LINK_CLASSES} ${INACTIVE_LINK_CLASSES}`,
|
|
4448
4458
|
},
|
|
4449
|
-
|
|
4459
|
+
centered: {
|
|
4460
|
+
active: `px-4 rounded-md ${LINK_CLASSES} ${WIDESCREEN_ACTIVE_LINK_CLASSES} whitespace-nowrap`,
|
|
4461
|
+
default: `px-4 rounded-md ${LINK_CLASSES} group/btn bg-transparent whitespace-nowrap`,
|
|
4462
|
+
},
|
|
4463
|
+
wideScreen: {
|
|
4450
4464
|
active: `${LINK_CLASSES} ${WIDESCREEN_ACTIVE_LINK_CLASSES}`,
|
|
4451
4465
|
default: `${LINK_CLASSES} ${INACTIVE_LINK_CLASSES}`,
|
|
4452
4466
|
},
|
|
@@ -4456,25 +4470,29 @@
|
|
|
4456
4470
|
active: `${TEXT_CLASSES} flex items-center h-full border-0 border-b-2 ${WHITE_ACTIVE_TEXT_CLASSES}`,
|
|
4457
4471
|
default: `${TEXT_CLASSES} ${INACTIVE_TEXT_CLASSES}`,
|
|
4458
4472
|
},
|
|
4459
|
-
|
|
4473
|
+
centered: {
|
|
4474
|
+
active: `${TEXT_CLASSES} ${ACTIVE_TEXT_CLASSES}`,
|
|
4475
|
+
default: `${TEXT_CLASSES} ${INACTIVE_TEXT_CLASSES}`,
|
|
4476
|
+
},
|
|
4477
|
+
wideScreen: {
|
|
4460
4478
|
active: `${TEXT_CLASSES} ${ACTIVE_TEXT_CLASSES}`,
|
|
4461
4479
|
default: `${TEXT_CLASSES} ${INACTIVE_TEXT_CLASSES}`,
|
|
4462
4480
|
},
|
|
4463
4481
|
},
|
|
4464
4482
|
};
|
|
4465
|
-
const getGroupTabClassName = (type, active,
|
|
4466
|
-
const styleType = isScrollable ? 'scrollable' : 'default';
|
|
4483
|
+
const getGroupTabClassName = (type, active, tabsMode) => {
|
|
4467
4484
|
const styleActive = active ? 'active' : 'default';
|
|
4468
|
-
|
|
4485
|
+
const mode = tabsMode || 'wideScreen';
|
|
4486
|
+
return GROUP_TAB_CLASSES[type][mode][styleActive];
|
|
4469
4487
|
};
|
|
4470
|
-
const getLinkTabClassName = (type, active,
|
|
4471
|
-
const styleType = isScrollable ? 'scrollable' : 'default';
|
|
4488
|
+
const getLinkTabClassName = (type, active, tabsMode) => {
|
|
4472
4489
|
const styleActive = active ? 'active' : 'default';
|
|
4473
|
-
|
|
4490
|
+
const mode = tabsMode || 'wideScreen';
|
|
4491
|
+
return LINK_TAB_CLASSES[type][mode][styleActive];
|
|
4474
4492
|
};
|
|
4475
4493
|
|
|
4476
4494
|
const LinkTab = JSX((props) => {
|
|
4477
|
-
const { tab, currentTab, onClick,
|
|
4495
|
+
const { tab, currentTab, onClick, tabsMode } = props;
|
|
4478
4496
|
const active = currentTab?.type === 'link' && currentTab.href === tab.href;
|
|
4479
4497
|
const link = useLink();
|
|
4480
4498
|
const adjustedProps = link(tab);
|
|
@@ -4482,22 +4500,22 @@
|
|
|
4482
4500
|
adjustedProps.onClick(ev);
|
|
4483
4501
|
onClick(tab);
|
|
4484
4502
|
};
|
|
4485
|
-
return (jsx("a", { role: "tab", className: getLinkTabClassName('link', active,
|
|
4503
|
+
return (jsx("a", { role: "tab", className: getLinkTabClassName('link', active, tabsMode), target: tab.target, href: adjustedProps.href, onClick: handleClick, children: jsx("span", { className: getLinkTabClassName('text', active, tabsMode), children: tab.text }) }));
|
|
4486
4504
|
});
|
|
4487
4505
|
|
|
4488
4506
|
const BADGE_CLASSES = 'min-w-[22px] h-[22px] rounded-full text-xs ml-2 flex justify-center items-center';
|
|
4489
4507
|
const ACTIVE_BADGE_CLASSES = 'bg-white/30 text-white';
|
|
4490
4508
|
const INACTIVE_BADGE_CLASSES = 'bg-main-divider text-secondary-text group-hover/btn:text-primary-main';
|
|
4491
|
-
const renderGroupTab = ({ page, currentTab, showCounter, onClick,
|
|
4509
|
+
const renderGroupTab = ({ page, currentTab, showCounter, onClick, tabsMode }) => (tab, i) => {
|
|
4492
4510
|
const active = currentTab === tab;
|
|
4493
4511
|
const count = tab.ref && page?.blocks
|
|
4494
4512
|
? page.blocks.filter((block) => block?.labels?.includes(tab.ref)).length
|
|
4495
4513
|
: 0;
|
|
4496
|
-
return (jsx("div", { className: getGroupTabClassName('div', active,
|
|
4514
|
+
return (jsx("div", { className: getGroupTabClassName('div', active, tabsMode), role: "tab", "aria-selected": active, onClick: () => onClick(tab), children: jsxs("div", { className: `flex flex-1 items-center justify-center ${getGroupTabClassName('text', active, tabsMode)}`, children: [renderTitle$1(tab.title, active, tabsMode), renderCount(showCounter, count, active)] }) }, `group-${String(i)}`));
|
|
4497
4515
|
};
|
|
4498
|
-
const renderTitle$1 = (title, active,
|
|
4516
|
+
const renderTitle$1 = (title, active, tabsMode) => {
|
|
4499
4517
|
const activeClassName = active ? WHITE_ACTIVE_TEXT_CLASSES : INACTIVE_TEXT_CLASSES;
|
|
4500
|
-
const titleClassName =
|
|
4518
|
+
const titleClassName = tabsMode === 'scrollable'
|
|
4501
4519
|
? `${TEXT_CLASSES} ${activeClassName}`
|
|
4502
4520
|
: `${TEXT_CLASSES} ${active ? ACTIVE_TEXT_CLASSES : INACTIVE_TEXT_CLASSES}`;
|
|
4503
4521
|
return title ? jsx("h3", { className: titleClassName, children: title }) : null;
|
|
@@ -4506,16 +4524,16 @@
|
|
|
4506
4524
|
return showCounter && count ? (jsx("div", { className: `${BADGE_CLASSES} ${active ? ACTIVE_BADGE_CLASSES : INACTIVE_BADGE_CLASSES}`, children: count })) : null;
|
|
4507
4525
|
};
|
|
4508
4526
|
|
|
4509
|
-
const renderTab = ({ page,
|
|
4527
|
+
const renderTab = ({ page, showCounter, ...rest }) => (tab, i) => {
|
|
4510
4528
|
const type = tab.type;
|
|
4511
4529
|
if (!(type === 'group' || type === 'link')) {
|
|
4512
4530
|
return null;
|
|
4513
4531
|
}
|
|
4514
4532
|
switch (type) {
|
|
4515
4533
|
case 'group':
|
|
4516
|
-
return renderGroupTab({ page,
|
|
4534
|
+
return renderGroupTab({ page, showCounter, ...rest })(tab, i);
|
|
4517
4535
|
case 'link': {
|
|
4518
|
-
return
|
|
4536
|
+
return jsx(LinkTab, { tab: tab, ...rest }, String(i));
|
|
4519
4537
|
}
|
|
4520
4538
|
default:
|
|
4521
4539
|
assertUnreachable(type);
|
|
@@ -4523,24 +4541,20 @@
|
|
|
4523
4541
|
return null;
|
|
4524
4542
|
};
|
|
4525
4543
|
|
|
4544
|
+
const CenteredTabs = JSX(({ tabs, ...rest }) => (jsx("div", { className: "flex p-1 m-auto bg-main-gray rounded-md", children: tabs?.map(renderTab({ ...rest })) })));
|
|
4545
|
+
|
|
4526
4546
|
const scrollButtonStyle = 'absolute z-40 top-0';
|
|
4527
4547
|
const ScrollableTabs = JSX((props) => {
|
|
4528
|
-
const { tabs,
|
|
4548
|
+
const { tabs, ...rest } = props;
|
|
4529
4549
|
const [containerRef, scroll] = useSwipeListScroll({
|
|
4530
4550
|
itemCount: tabs?.length || 0,
|
|
4531
4551
|
isCyclic: false,
|
|
4532
4552
|
});
|
|
4533
|
-
return (jsxs("div", { className: "relative max-w-full m-auto", children: [jsx("div", { className: `font-sans max-w-full w-full overflow-hidden relative bg-white`, children: jsx(SwipeListContainer, { containerRef: containerRef, snapAlign: "snap-start", onVisibleIndicesChange: scroll.handleVisibleIndicesChange, children: tabs?.map(renderTab({
|
|
4534
|
-
onClick,
|
|
4535
|
-
currentTab,
|
|
4536
|
-
showCounter,
|
|
4537
|
-
page,
|
|
4538
|
-
isScrollable: true,
|
|
4539
|
-
})) }) }), scroll.canScrollLeft ? (jsx(ScrollLeftButton, { className: `${scrollButtonStyle} left-6`, onClick: scroll.scrollLeft })) : null, scroll.canScrollRight ? (jsx(ScrollRightButton, { className: `${scrollButtonStyle} rotate-180 right-6`, onClick: scroll.scrollRight })) : null] }));
|
|
4553
|
+
return (jsxs("div", { className: "relative max-w-full m-auto", children: [jsx("div", { className: `font-sans max-w-full w-full overflow-hidden relative bg-white`, children: jsx(SwipeListContainer, { containerRef: containerRef, snapAlign: "snap-start", onVisibleIndicesChange: scroll.handleVisibleIndicesChange, children: tabs?.map(renderTab({ ...rest })) }) }), scroll.canScrollLeft ? (jsx(ScrollLeftButton, { className: `${scrollButtonStyle} left-6`, onClick: scroll.scrollLeft })) : null, scroll.canScrollRight ? (jsx(ScrollRightButton, { className: `${scrollButtonStyle} rotate-180 right-6`, onClick: scroll.scrollRight })) : null] }));
|
|
4540
4554
|
});
|
|
4541
4555
|
|
|
4542
4556
|
const Tabs = JSX((props) => {
|
|
4543
|
-
const { className = '', tabs,
|
|
4557
|
+
const { className = '', tabs, isSticky, ...rest } = props;
|
|
4544
4558
|
const [currentTab, setCurrentTab] = useState(tabs ? tabs[0] : undefined);
|
|
4545
4559
|
useEffect(() => {
|
|
4546
4560
|
if (!tabs || !tabs[0]) {
|
|
@@ -4557,13 +4571,19 @@
|
|
|
4557
4571
|
fireTabEvent(selectedTab);
|
|
4558
4572
|
setCurrentTab(selectedTab);
|
|
4559
4573
|
}, []);
|
|
4560
|
-
return (jsx(BlockWrapper, { className: `relative box-border flex gap-x-1 w-full ${isSticky ? 'sticky top-1 z-20' : ''} ${className}`, role: "tablist", ...rest, children:
|
|
4561
|
-
|
|
4562
|
-
|
|
4563
|
-
|
|
4564
|
-
|
|
4565
|
-
|
|
4566
|
-
|
|
4574
|
+
return (jsx(BlockWrapper, { className: `relative box-border flex gap-x-1 w-full ${isSticky ? 'sticky top-1 z-20' : ''} ${className}`, role: "tablist", ...rest, children: renderTabs({ tabs, onClick: handleClick, currentTab, ...rest }) }));
|
|
4575
|
+
});
|
|
4576
|
+
const renderTabs = ({ tabsMode, tabs, ...rest }) => {
|
|
4577
|
+
switch (tabsMode) {
|
|
4578
|
+
case 'wideScreen':
|
|
4579
|
+
return tabs?.map(renderTab({ tabsMode, ...rest }));
|
|
4580
|
+
case 'centered':
|
|
4581
|
+
return jsx(CenteredTabs, { tabs: tabs, tabsMode: tabsMode, ...rest });
|
|
4582
|
+
case 'scrollable':
|
|
4583
|
+
return jsx(ScrollableTabs, { tabs: tabs, tabsMode: tabsMode, ...rest });
|
|
4584
|
+
}
|
|
4585
|
+
return null;
|
|
4586
|
+
};
|
|
4567
4587
|
const fireTabEvent = (tab) => {
|
|
4568
4588
|
if (tab.type === 'group') {
|
|
4569
4589
|
defaultEventBus.fire('tab', { type: tab.type, label: tab.ref });
|
|
@@ -5006,7 +5026,7 @@
|
|
|
5006
5026
|
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" }) }));
|
|
5007
5027
|
}
|
|
5008
5028
|
|
|
5009
|
-
const packageVersion = "0.10.
|
|
5029
|
+
const packageVersion = "0.10.9";
|
|
5010
5030
|
|
|
5011
5031
|
exports.Blocks = Blocks;
|
|
5012
5032
|
exports.ContentPage = ContentPage;
|