@redneckz/wildless-cms-uni-blocks 0.2.100 → 0.2.104
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 +126 -64
- package/bundle/bundle.umd.min.js +1 -1
- package/dist/components/BlockContent.d.ts +3 -2
- package/dist/components/Blocks.d.ts +1 -0
- package/dist/components/Blocks.js +2 -0
- package/dist/components/Blocks.js.map +1 -1
- package/dist/components/Footer/FooterContent.d.ts +1 -1
- package/dist/components/Footer/Sitemap.d.ts +1 -1
- package/dist/components/Footer/Sitemap.js +2 -2
- package/dist/components/Footer/Sitemap.js.map +1 -1
- package/dist/components/Header/Header.js +13 -9
- package/dist/components/Header/Header.js.map +1 -1
- package/dist/components/Header/HeaderContent.d.ts +8 -1
- package/dist/components/Header/HeaderSecondaryMenu.d.ts +2 -1
- package/dist/components/Header/HeaderSecondaryMenu.js +14 -2
- package/dist/components/Header/HeaderSecondaryMenu.js.map +1 -1
- package/dist/components/Header/HeaderSecondaryMenuButton.js +1 -1
- package/dist/components/Header/HeaderSecondaryMenuButton.js.map +1 -1
- package/dist/components/Headline/HeadlineContent.d.ts +2 -9
- package/dist/components/MobileBlocks.d.ts +1 -0
- package/dist/components/MobileBlocks.js +2 -0
- package/dist/components/MobileBlocks.js.map +1 -1
- package/dist/components/Navigation/Navigation.d.ts +5 -0
- package/dist/components/Navigation/Navigation.js +16 -0
- package/dist/components/Navigation/Navigation.js.map +1 -0
- package/dist/components/Navigation/NavigationContent.d.ts +10 -0
- package/dist/components/Navigation/NavigationContent.js +2 -0
- package/dist/components/Navigation/NavigationContent.js.map +1 -0
- package/dist/components/Navigation/NavigationItem.d.ts +4 -0
- package/dist/components/Navigation/NavigationItem.js +6 -0
- package/dist/components/Navigation/NavigationItem.js.map +1 -0
- package/dist/components/StepsBlock/StepsBlock.d.ts +1 -1
- package/dist/components/StepsBlock/StepsBlock.js +3 -3
- package/dist/components/StepsBlock/StepsBlock.js.map +1 -1
- package/dist/components/StepsBlock/StepsBlockContent.d.ts +5 -2
- package/dist/hooks/useLink.js +2 -1
- package/dist/hooks/useLink.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js.map +1 -1
- package/dist/model/BgColorVersion.d.ts +8 -0
- package/dist/model/BgColorVersion.js +2 -0
- package/dist/model/BgColorVersion.js.map +1 -0
- package/dist/services/sitemap/SitemapProps.d.ts +13 -0
- package/dist/services/sitemap/SitemapProps.js +2 -0
- package/dist/services/sitemap/SitemapProps.js.map +1 -0
- package/dist/services/sitemap/findActiveSubItem.d.ts +3 -0
- package/dist/services/sitemap/findActiveSubItem.js +13 -0
- package/dist/services/sitemap/findActiveSubItem.js.map +1 -0
- package/dist/services/sitemap/isHrefActive.d.ts +4 -0
- package/dist/services/sitemap/isHrefActive.js +9 -0
- package/dist/services/sitemap/isHrefActive.js.map +1 -0
- package/dist/services/sitemap/isSubItemActive.d.ts +3 -0
- package/dist/services/sitemap/isSubItemActive.js +6 -0
- package/dist/services/sitemap/isSubItemActive.js.map +1 -0
- package/dist/services/sitemap/isTopItemActive.d.ts +3 -0
- package/dist/services/sitemap/isTopItemActive.js +7 -0
- package/dist/services/sitemap/isTopItemActive.js.map +1 -0
- package/dist/services/sitemap/mergeTopItems.d.ts +2 -0
- package/dist/{mergeTopItems.js → services/sitemap/mergeTopItems.js} +1 -3
- package/dist/services/sitemap/mergeTopItems.js.map +1 -0
- package/dist/services/sitemap/useSitemap.d.ts +3 -0
- package/dist/{hooks → services/sitemap}/useSitemap.js +1 -1
- package/dist/services/sitemap/useSitemap.js.map +1 -0
- package/dist/ui-kit/HeaderItem/HeaderItem.js +16 -4
- package/dist/ui-kit/HeaderItem/HeaderItem.js.map +1 -1
- package/dist/ui-kit/Icon/IconProps.d.ts +83 -45
- package/dist/ui-kit/Icon/IconProps.js +62 -43
- package/dist/ui-kit/Icon/IconProps.js.map +1 -1
- package/dist/ui-kit/Logo/Logo.d.ts +1 -0
- package/dist/ui-kit/Logo/Logo.js +10 -2
- package/dist/ui-kit/Logo/Logo.js.map +1 -1
- package/dist/ui-kit/SearchBar.js +2 -3
- package/dist/ui-kit/SearchBar.js.map +1 -1
- package/dist/ui-kit/TopItem/TopItem.d.ts +2 -0
- package/dist/ui-kit/TopItem/TopItem.js +19 -7
- package/dist/ui-kit/TopItem/TopItem.js.map +1 -1
- package/dist/utils/adjustHref.d.ts +4 -0
- package/dist/utils/adjustHref.js +21 -0
- package/dist/utils/adjustHref.js.map +1 -0
- package/dist/utils/maxBy.d.ts +2 -0
- package/dist/utils/maxBy.js +7 -0
- package/dist/utils/maxBy.js.map +1 -0
- package/dist/utils/url.d.ts +0 -13
- package/dist/utils/url.js +2 -26
- package/dist/utils/url.js.map +1 -1
- package/dist/utils/withoutMobilePath.d.ts +2 -0
- package/dist/utils/withoutMobilePath.js +6 -0
- package/dist/utils/withoutMobilePath.js.map +1 -0
- package/lib/common.css +1 -1
- package/lib/components/BlockContent.d.ts +3 -2
- package/lib/components/Blocks.d.ts +1 -0
- package/lib/components/Blocks.js +2 -0
- package/lib/components/Blocks.js.map +1 -1
- package/lib/components/Footer/FooterContent.d.ts +1 -1
- package/lib/components/Footer/Sitemap.d.ts +1 -1
- package/lib/components/Footer/Sitemap.js +2 -2
- package/lib/components/Footer/Sitemap.js.map +1 -1
- package/lib/components/Header/Header.fixture.d.ts +4 -1
- package/lib/components/Header/Header.js +13 -9
- package/lib/components/Header/Header.js.map +1 -1
- package/lib/components/Header/HeaderContent.d.ts +8 -1
- package/lib/components/Header/HeaderSecondaryMenu.d.ts +2 -1
- package/lib/components/Header/HeaderSecondaryMenu.js +14 -2
- package/lib/components/Header/HeaderSecondaryMenu.js.map +1 -1
- package/lib/components/Header/HeaderSecondaryMenuButton.js +1 -1
- package/lib/components/Header/HeaderSecondaryMenuButton.js.map +1 -1
- package/lib/components/Headline/HeadlineContent.d.ts +2 -9
- package/lib/components/MobileBlocks.d.ts +1 -0
- package/lib/components/MobileBlocks.js +2 -0
- package/lib/components/MobileBlocks.js.map +1 -1
- package/lib/components/Navigation/Navigation.d.ts +5 -0
- package/lib/components/Navigation/Navigation.fixture.d.ts +2 -0
- package/lib/components/Navigation/Navigation.js +14 -0
- package/lib/components/Navigation/Navigation.js.map +1 -0
- package/lib/components/Navigation/NavigationContent.d.ts +10 -0
- package/lib/components/Navigation/NavigationContent.js +2 -0
- package/lib/components/Navigation/NavigationContent.js.map +1 -0
- package/lib/components/Navigation/NavigationItem.d.ts +4 -0
- package/lib/components/Navigation/NavigationItem.js +4 -0
- package/lib/components/Navigation/NavigationItem.js.map +1 -0
- package/lib/components/StepsBlock/StepsBlock.d.ts +1 -1
- package/lib/components/StepsBlock/StepsBlock.js +3 -3
- package/lib/components/StepsBlock/StepsBlock.js.map +1 -1
- package/lib/components/StepsBlock/StepsBlockContent.d.ts +5 -2
- package/lib/hooks/useLink.js +2 -1
- package/lib/hooks/useLink.js.map +1 -1
- package/lib/index.d.ts +1 -1
- package/lib/index.js.map +1 -1
- package/lib/model/BgColorVersion.d.ts +8 -0
- package/lib/model/BgColorVersion.js +2 -0
- package/lib/model/BgColorVersion.js.map +1 -0
- package/lib/services/sitemap/SitemapProps.d.ts +13 -0
- package/lib/services/sitemap/SitemapProps.js +2 -0
- package/lib/services/sitemap/SitemapProps.js.map +1 -0
- package/lib/services/sitemap/findActiveSubItem.d.ts +3 -0
- package/lib/services/sitemap/findActiveSubItem.js +10 -0
- package/lib/services/sitemap/findActiveSubItem.js.map +1 -0
- package/lib/services/sitemap/isHrefActive.d.ts +4 -0
- package/lib/services/sitemap/isHrefActive.js +6 -0
- package/lib/services/sitemap/isHrefActive.js.map +1 -0
- package/lib/services/sitemap/isSubItemActive.d.ts +3 -0
- package/lib/services/sitemap/isSubItemActive.js +3 -0
- package/lib/services/sitemap/isSubItemActive.js.map +1 -0
- package/lib/services/sitemap/isTopItemActive.d.ts +3 -0
- package/lib/services/sitemap/isTopItemActive.js +4 -0
- package/lib/services/sitemap/isTopItemActive.js.map +1 -0
- package/lib/services/sitemap/mergeTopItems.d.ts +2 -0
- package/lib/{mergeTopItems.js → services/sitemap/mergeTopItems.js} +1 -3
- package/lib/services/sitemap/mergeTopItems.js.map +1 -0
- package/lib/services/sitemap/useSitemap.d.ts +3 -0
- package/lib/{hooks → services/sitemap}/useSitemap.js +1 -1
- package/lib/services/sitemap/useSitemap.js.map +1 -0
- package/lib/ui-kit/HeaderItem/HeaderItem.js +16 -4
- package/lib/ui-kit/HeaderItem/HeaderItem.js.map +1 -1
- package/lib/ui-kit/Icon/IconProps.d.ts +83 -45
- package/lib/ui-kit/Icon/IconProps.js +62 -43
- package/lib/ui-kit/Icon/IconProps.js.map +1 -1
- package/lib/ui-kit/Logo/Logo.d.ts +1 -0
- package/lib/ui-kit/Logo/Logo.js +10 -2
- package/lib/ui-kit/Logo/Logo.js.map +1 -1
- package/lib/ui-kit/SearchBar.js +2 -3
- package/lib/ui-kit/SearchBar.js.map +1 -1
- package/lib/ui-kit/TopItem/TopItem.d.ts +2 -0
- package/lib/ui-kit/TopItem/TopItem.js +19 -7
- package/lib/ui-kit/TopItem/TopItem.js.map +1 -1
- package/lib/utils/adjustHref.d.ts +4 -0
- package/lib/utils/adjustHref.js +18 -0
- package/lib/utils/adjustHref.js.map +1 -0
- package/lib/utils/maxBy.d.ts +2 -0
- package/lib/utils/maxBy.js +3 -0
- package/lib/utils/maxBy.js.map +1 -0
- package/lib/utils/url.d.ts +0 -13
- package/lib/utils/url.js +1 -21
- package/lib/utils/url.js.map +1 -1
- package/lib/utils/withoutMobilePath.d.ts +2 -0
- package/lib/utils/withoutMobilePath.js +3 -0
- package/lib/utils/withoutMobilePath.js.map +1 -0
- package/package.json +4 -2
- package/src/components/BlockContent.ts +4 -2
- package/src/components/Blocks.ts +2 -0
- package/src/components/ContentPage/ContentPage.page.json +28 -15
- package/src/components/Footer/FooterContent.ts +1 -1
- package/src/components/Footer/Sitemap.tsx +4 -3
- package/src/components/Header/Header.fixture.tsx +4 -18
- package/src/components/Header/Header.tsx +56 -45
- package/src/components/Header/HeaderContent.ts +8 -1
- package/src/components/Header/HeaderSecondaryMenu.tsx +25 -12
- package/src/components/Header/HeaderSecondaryMenuButton.tsx +2 -4
- package/src/components/Headline/HeadlineContent.ts +2 -10
- package/src/components/MobileBlocks.ts +2 -0
- package/src/components/Navigation/Navigation.fixture.tsx +28 -0
- package/src/components/Navigation/Navigation.tsx +39 -0
- package/src/components/Navigation/NavigationContent.ts +11 -0
- package/src/components/Navigation/NavigationItem.tsx +17 -0
- package/src/components/PictureText/PictureText.example.json +2 -2
- package/src/components/PictureText/PictureText.fixture.tsx +2 -2
- package/src/components/StepsBlock/StepsBlock.example.json +3 -1
- package/src/components/StepsBlock/StepsBlock.tsx +21 -16
- package/src/components/StepsBlock/StepsBlockContent.ts +5 -2
- package/src/hooks/useLink.ts +2 -1
- package/src/icons/Calendar2Icon.svg +1 -0
- package/src/icons/CalendarCircleIcon.svg +1 -0
- package/src/icons/CalendarTickIcon.svg +1 -0
- package/src/icons/CardIcon.svg +1 -0
- package/src/icons/CardPosIcon.svg +1 -0
- package/src/icons/CardTickIcon.svg +1 -0
- package/src/icons/CardWithGemIcon.svg +1 -0
- package/src/icons/ChartSquareIcon.svg +1 -0
- package/src/icons/CreditCardsIcon.svg +1 -0
- package/src/icons/DischountStarIcon.svg +1 -0
- package/src/icons/{DiscountShape.svg → DiscountShapeIcon.svg} +0 -0
- package/src/icons/{DocumentText.svg → DocumentTextIcon.svg} +0 -0
- package/src/icons/EarthIcon.svg +1 -0
- package/src/icons/EmptyWalletChangeIcon.svg +1 -0
- package/src/icons/GlobalIcon.svg +1 -0
- package/src/icons/GridIcon.svg +1 -1
- package/src/icons/GridIconWhite.svg +4 -0
- package/src/icons/InterestGrowthIcon.svg +1 -0
- package/src/icons/InterestIcon.svg +1 -0
- package/src/icons/JCBIcon.svg +1 -0
- package/src/icons/MasterCardIcon.svg +1 -0
- package/src/icons/MinusIcon.svg +1 -0
- package/src/icons/MirIcon.svg +1 -0
- package/src/icons/MoneyIcon.svg +1 -0
- package/src/icons/MoneyInsuranceIcon.svg +1 -0
- package/src/icons/MonitorMobileIcon.svg +1 -0
- package/src/icons/OfficeIcon.svg +1 -0
- package/src/icons/PercentageRoundIcon.svg +1 -0
- package/src/icons/PersonalCardIcon.svg +1 -0
- package/src/icons/PlusIcon.svg +1 -0
- package/src/icons/Profile2UserIcon.svg +1 -0
- package/src/icons/RoundRubleIcon.svg +1 -0
- package/src/icons/SafeIcon.svg +1 -0
- package/src/icons/ShieldTickIcon.svg +1 -0
- package/src/icons/SmallClockIcon.svg +1 -0
- package/src/icons/UnionPayIcon.svg +1 -0
- package/src/icons/UserTickIcon.svg +1 -0
- package/src/icons/VisaIcon.svg +1 -0
- package/src/icons/WalletAdd2Icon.svg +1 -0
- package/src/icons/WalletAddIcon.svg +1 -0
- package/src/icons/WalletWithMoneyIcon.svg +1 -0
- package/src/index.ts +1 -1
- package/src/model/BgColorVersion.ts +8 -0
- package/src/services/sitemap/SitemapProps.ts +15 -0
- package/src/services/sitemap/findActiveSubItem.ts +14 -0
- package/src/services/sitemap/isHrefActive.ts +13 -0
- package/src/services/sitemap/isSubItemActive.ts +8 -0
- package/src/services/sitemap/isTopItemActive.ts +9 -0
- package/src/{mergeTopItems.spec.ts → services/sitemap/mergeTopItems.spec.ts} +0 -0
- package/src/{mergeTopItems.ts → services/sitemap/mergeTopItems.ts} +3 -4
- package/src/{hooks → services/sitemap}/useSitemap.ts +3 -3
- package/src/ui-kit/HeaderItem/HeaderItem.tsx +32 -18
- package/src/ui-kit/Icon/IconProps.ts +44 -6
- package/src/ui-kit/Logo/Logo.tsx +30 -18
- package/src/ui-kit/SearchBar.tsx +13 -18
- package/src/ui-kit/TopItem/TopItem.tsx +46 -19
- package/src/utils/adjustHref.spec.ts +25 -0
- package/src/utils/adjustHref.ts +24 -0
- package/src/utils/maxBy.spec.ts +11 -0
- package/src/utils/maxBy.ts +7 -0
- package/src/utils/url.spec.ts +1 -37
- package/src/utils/url.ts +2 -39
- package/src/utils/withoutMobilePath.ts +3 -0
- package/dist/components/Header/isSubItemActive.d.ts +0 -3
- package/dist/components/Header/isSubItemActive.js +0 -8
- package/dist/components/Header/isSubItemActive.js.map +0 -1
- package/dist/components/Header/isTopItemActive.d.ts +0 -3
- package/dist/components/Header/isTopItemActive.js +0 -8
- package/dist/components/Header/isTopItemActive.js.map +0 -1
- package/dist/hooks/useSitemap.d.ts +0 -3
- package/dist/hooks/useSitemap.js.map +0 -1
- package/dist/mergeTopItems.d.ts +0 -2
- package/dist/mergeTopItems.js.map +0 -1
- package/lib/components/Header/isSubItemActive.d.ts +0 -3
- package/lib/components/Header/isSubItemActive.js +0 -5
- package/lib/components/Header/isSubItemActive.js.map +0 -1
- package/lib/components/Header/isTopItemActive.d.ts +0 -3
- package/lib/components/Header/isTopItemActive.js +0 -5
- package/lib/components/Header/isTopItemActive.js.map +0 -1
- package/lib/hooks/useSitemap.d.ts +0 -3
- package/lib/hooks/useSitemap.js.map +0 -1
- package/lib/mergeTopItems.d.ts +0 -2
- package/lib/mergeTopItems.js.map +0 -1
- package/src/components/Header/isSubItemActive.ts +0 -7
- package/src/components/Header/isTopItemActive.ts +0 -8
|
@@ -1,24 +1,28 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "@redneckz/uni-jsx/jsx-runtime";
|
|
2
2
|
import { JSX } from '@redneckz/uni-jsx';
|
|
3
3
|
import { useLink } from '../../hooks/useLink.js';
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
4
|
+
import { findActiveSubItem } from '../../services/sitemap/findActiveSubItem.js';
|
|
5
|
+
import { isTopItemActive } from '../../services/sitemap/isTopItemActive.js';
|
|
6
|
+
import { mergeTopItems } from '../../services/sitemap/mergeTopItems.js';
|
|
7
|
+
import { useSitemap } from '../../services/sitemap/useSitemap.js';
|
|
6
8
|
import { HeaderItem } from '../../ui-kit/HeaderItem/HeaderItem.js';
|
|
7
9
|
import { Logo } from '../../ui-kit/Logo/Logo.js';
|
|
8
10
|
import { TopItem } from '../../ui-kit/TopItem/TopItem.js';
|
|
9
11
|
import { HeaderSecondaryMenu } from './HeaderSecondaryMenu.js';
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
12
|
+
const BORDER_COLORS = {
|
|
13
|
+
'bg-white': 'bg-main-divider',
|
|
14
|
+
transparent: 'bg-main-divider opacity-30',
|
|
15
|
+
};
|
|
16
|
+
export const Header = JSX(({ className, defaultLocation, bgColor = 'bg-white', context, topItems }) => {
|
|
13
17
|
const router = context.useRouter();
|
|
14
18
|
const sitemap = useSitemap(context.useAsyncData);
|
|
15
19
|
const { handlerDecorator } = context;
|
|
16
20
|
const mergedItems = mergeTopItems(sitemap.topItems, topItems);
|
|
17
21
|
const activeTopItem = mergedItems.find(isTopItemActive(router));
|
|
18
22
|
const subItems = activeTopItem?.items;
|
|
19
|
-
const activeSubItem =
|
|
20
|
-
const topMenu = mergedItems.map((_, i) => (_jsx(TopItem, { active: _ === activeTopItem, ...useLink({ router, handlerDecorator }, _), ariaLabel: _.text }, String(i))));
|
|
21
|
-
const subMenu = subItems?.map((_) => (_jsx(HeaderItem, { className: "mr-8", active: _ === activeSubItem, ...useLink({ router, handlerDecorator }, _) }, _.href)));
|
|
22
|
-
return (_jsx("header", { className: `pt-5 pb-8 px-20
|
|
23
|
+
const activeSubItem = findActiveSubItem(router)(subItems);
|
|
24
|
+
const topMenu = mergedItems.map((_, i) => (_jsx(TopItem, { active: _ === activeTopItem, ...useLink({ router, handlerDecorator }, _), ariaLabel: _.text, bgColor: bgColor }, String(i))));
|
|
25
|
+
const subMenu = subItems?.map((_) => (_jsx(HeaderItem, { className: "mr-8", active: _ === activeSubItem, ...useLink({ router, handlerDecorator }, _), bgColor: bgColor }, _.href)));
|
|
26
|
+
return (_jsx("header", { className: `pt-5 pb-8 px-20 ${bgColor} ${className || ''}`, children: _jsxs("div", { className: "container", children: [_jsxs("div", { className: "flex items-center", children: [_jsx(Logo, { className: "mr-8", bgColor: bgColor }), topMenu, _jsx(HeaderSecondaryMenu, { context: context, className: "ml-auto", defaultLocation: defaultLocation, bgColor: bgColor })] }), _jsx("div", { className: `mt-5 h-[1px] ${BORDER_COLORS[bgColor]}` }), _jsx("nav", { className: "mt-5", children: subMenu })] }) }));
|
|
23
27
|
});
|
|
24
28
|
//# sourceMappingURL=Header.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Header.js","sourceRoot":"","sources":["../../../src/components/Header/Header.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AACxC,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"Header.js","sourceRoot":"","sources":["../../../src/components/Header/Header.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AACxC,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAE9C,OAAO,EAAE,iBAAiB,EAAE,MAAM,0CAA0C,CAAC;AAC7E,OAAO,EAAE,eAAe,EAAE,MAAM,wCAAwC,CAAC;AACzE,OAAO,EAAE,aAAa,EAAE,MAAM,sCAAsC,CAAC;AACrE,OAAO,EAAE,UAAU,EAAE,MAAM,mCAAmC,CAAC;AAE/D,OAAO,EAAE,UAAU,EAAE,MAAM,oCAAoC,CAAC;AAChE,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAC9C,OAAO,EAAE,OAAO,EAAE,MAAM,8BAA8B,CAAC;AAEvD,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAE5D,MAAM,aAAa,GAAmC;IACpD,UAAU,EAAE,iBAAiB;IAC7B,WAAW,EAAE,4BAA4B;CAC1C,CAAC;AAIF,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CACvB,CAAC,EAAE,SAAS,EAAE,eAAe,EAAE,O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AChE,eAAK,SAAS,EAAC,WAAW,aACxB,eAAK,SAAS,EAAC,mBAAmB,aAChC,KAAC,IAAI,IAAC,SAAS,EAAC,MAAM,EAAC,OAAO,EAAE,OAAO,GAAI,EAC1C,OAAO,EACR,KAAC,mBAAmB,IAClB,OAAO,EAAE,OAAO,EAChB,SAAS,EAAC,SAAS,EACnB,eAAe,EAAE,eAAe,EAChC,OAAO,EAAE,OAAO,GAChB,IACE,EACN,cAAK,SAAS,EAAE,gBAAgB,aAAa,CAAC,OAAO,CAAC,EAAE,GAAI,EAC5D,cAAK,SAAS,EAAC,MAAM,YAAE,OAAO,GAAO,IACjC,GACC,CACV,CAAC;AACJ,CAAC,CACF,CAAC"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { BgColorVersion } from '../../model/BgColorVersion';
|
|
2
|
+
import type { SitemapProps } from '../../services/sitemap/SitemapProps';
|
|
2
3
|
/**
|
|
3
4
|
* @title Шапка
|
|
4
5
|
* @required ["defaultLocation", "topItems"]
|
|
@@ -9,4 +10,10 @@ export interface HeaderContent extends SitemapProps {
|
|
|
9
10
|
* @default Москва
|
|
10
11
|
*/
|
|
11
12
|
defaultLocation?: string;
|
|
13
|
+
/**
|
|
14
|
+
* @title Фон элемента
|
|
15
|
+
* @hidden
|
|
16
|
+
* @default white
|
|
17
|
+
*/
|
|
18
|
+
bgColor?: BgColorVersion;
|
|
12
19
|
}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
import type { BgColorVersion } from '../../model/BgColorVersion';
|
|
1
2
|
import type { UniBlockProps } from '../../types';
|
|
2
3
|
interface HeaderSecondaryMenuContent {
|
|
3
4
|
defaultLocation?: string;
|
|
4
|
-
|
|
5
|
+
bgColor?: BgColorVersion;
|
|
5
6
|
}
|
|
6
7
|
export interface HeaderSecondaryMenuProps extends HeaderSecondaryMenuContent, UniBlockProps {
|
|
7
8
|
}
|
|
@@ -3,8 +3,20 @@ import { JSX } from '@redneckz/uni-jsx';
|
|
|
3
3
|
import { Icon } from '../../ui-kit/Icon/Icon.js';
|
|
4
4
|
import { TopItem } from '../../ui-kit/TopItem/TopItem.js';
|
|
5
5
|
import { HeaderSecondaryMenuButton } from './HeaderSecondaryMenuButton.js';
|
|
6
|
-
|
|
6
|
+
const COLORS_MAP = {
|
|
7
|
+
'bg-white': 'text-primary-text hover:text-primary-main',
|
|
8
|
+
transparent: 'text-white',
|
|
9
|
+
};
|
|
10
|
+
const DOP_LINKS_COLORS_MAP = {
|
|
11
|
+
'bg-white': 'text-secondary-light hover:text-secondary-hover',
|
|
12
|
+
transparent: 'text-white',
|
|
13
|
+
};
|
|
14
|
+
const DOP_LINKS_ICON_NAME_MAP = {
|
|
15
|
+
'bg-white': 'GridIcon',
|
|
16
|
+
transparent: 'GridIconWhite',
|
|
17
|
+
};
|
|
18
|
+
export const HeaderSecondaryMenu = JSX(({ context, className, defaultLocation = '', bgColor = 'bg-white' }) => {
|
|
7
19
|
const [city, getCity] = context.useGeolocation(defaultLocation);
|
|
8
|
-
return (_jsxs("div", { className: `flex items-center ${className || ''}`, children: [_jsx(TopItem, { className: "mr-5", flat: true, href: "#", text: city, ariaLabel: "\u041C\u0435\u0441\u0442\u043E\u043F\u043E\u043B\u043E\u0436\u0435\u043D\u0438\u0435", onClick: getCity }), _jsx(TopItem, { className: "mr-7", flat: true, href: "#", text: "\u041E\u0444\u0438\u0441\u044B \u0438 \u0431\u0430\u043D\u043A\u043E\u043C\u0430\u0442\u044B", ariaLabel: "\u0421\u043F\u0438\u0441\u043E\u043A \u0432\u0441\u0435\u0445 \u0434\u043E\u0441\u0442\u0443\u043F\u043D\u044B\u0445 \u043E\u0444\u0438\u0441\u043E\u0432 \u0438 \u0431\u0430\u043D\u043A\u043E\u043C\u0430\u0442\u043E\u0432" }), _jsx(HeaderSecondaryMenuButton, { className:
|
|
20
|
+
return (_jsxs("div", { className: `flex items-center ${className || ''}`, children: [_jsx(TopItem, { className: "mr-5", flat: true, href: "#", text: city, ariaLabel: "\u041C\u0435\u0441\u0442\u043E\u043F\u043E\u043B\u043E\u0436\u0435\u043D\u0438\u0435", onClick: getCity, bgColor: bgColor }), _jsx(TopItem, { className: "mr-7", flat: true, href: "#", text: "\u041E\u0444\u0438\u0441\u044B \u0438 \u0431\u0430\u043D\u043A\u043E\u043C\u0430\u0442\u044B", ariaLabel: "\u0421\u043F\u0438\u0441\u043E\u043A \u0432\u0441\u0435\u0445 \u0434\u043E\u0441\u0442\u0443\u043F\u043D\u044B\u0445 \u043E\u0444\u0438\u0441\u043E\u0432 \u0438 \u0431\u0430\u043D\u043A\u043E\u043C\u0430\u0442\u043E\u0432", bgColor: bgColor }), _jsx(HeaderSecondaryMenuButton, { className: `mr-5 ${COLORS_MAP[bgColor]}`, ariaLabel: "\u041F\u043E\u0438\u0441\u043A \u043F\u043E \u0441\u0430\u0439\u0442\u0443", children: _jsx(Icon, { name: "LoupeIcon", className: "h-full", asSVG: true }) }), _jsx(HeaderSecondaryMenuButton, { className: `mr-5 ${COLORS_MAP[bgColor]}`, ariaLabel: "\u041F\u0440\u043E\u0444\u0438\u043B\u044C", children: _jsx(Icon, { name: "ProfileIcon", className: "h-full", asSVG: true }) }), _jsx(HeaderSecondaryMenuButton, { className: `${DOP_LINKS_COLORS_MAP[bgColor]} min-w-[32px] min-h-[32px]`, ariaLabel: "\u0414\u043E\u043F\u043E\u043B\u043D\u0438\u0442\u0435\u043B\u044C\u043D\u044B\u0435 \u0441\u0441\u044B\u043B\u043A\u0438", children: _jsx(Icon, { name: DOP_LINKS_ICON_NAME_MAP[bgColor], className: "h-full", asSVG: true }) })] }));
|
|
9
21
|
});
|
|
10
22
|
//# sourceMappingURL=HeaderSecondaryMenu.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HeaderSecondaryMenu.js","sourceRoot":"","sources":["../../../src/components/Header/HeaderSecondaryMenu.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"HeaderSecondaryMenu.js","sourceRoot":"","sources":["../../../src/components/Header/HeaderSecondaryMenu.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAGxC,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAE9C,OAAO,EAAE,OAAO,EAAE,MAAM,8BAA8B,CAAC;AACvD,OAAO,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAC;AASxE,MAAM,UAAU,GAAmC;IACjD,UAAU,EAAE,2CAA2C;IACvD,WAAW,EAAE,YAAY;CAC1B,CAAC;AACF,MAAM,oBAAoB,GAAmC;IAC3D,UAAU,EAAE,iDAAiD;IAC7D,WAAW,EAAE,YAAY;CAC1B,CAAC;AACF,MAAM,uBAAuB,GAAqC;IAChE,UAAU,EAAE,UAAU;IACtB,WAAW,EAAE,eAAe;CAC7B,CAAC;AAEF,MAAM,CAAC,MAAM,mBAAmB,GAAG,GAAG,CACpC,CAAC,EAAE,OAAO,EAAE,SAAS,EAAE,eAAe,GAAG,EAAE,EAAE,OAAO,GAAG,UAAU,EAAE,EAAE,EAAE;IACrE,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,GAAG,OAAO,CAAC,cAAc,CAAC,eAAe,CAAC,CAAC;IAChE,OAAO,CACL,eAAK,SAAS,EAAE,qBAAqB,SAAS,IAAI,EAAE,EAAE,aACpD,KAAC,OAAO,IACN,SAAS,EAAC,MAAM,EAChB,IAAI,EAAE,IAAI,EACV,IAAI,EAAC,GAAG,EACR,IAAI,EAAE,IAAI,EACV,SAAS,EAAC,sFAAgB,EAC1B,OAAO,EAAE,OAAO,EAChB,OAAO,EAAE,OAAO,GAChB,EACF,KAAC,OAAO,IACN,SAAS,EAAC,MAAM,EAChB,IAAI,EAAE,IAAI,EACV,IAAI,EAAC,GAAG,EACR,IAAI,EAAC,8FAAmB,EACxB,SAAS,EAAC,+NAA2C,EACrD,OAAO,EAAE,OAAO,GAChB,EACF,KAAC,yBAAyB,IACxB,SAAS,EAAE,QAAQ,UAAU,CAAC,OAAO,CAAC,EAAE,EACxC,SAAS,EAAC,4EAAgB,YAE1B,KAAC,IAAI,IAAC,IAAI,EAAC,WAAW,EAAC,SAAS,EAAC,QAAQ,EAAC,KAAK,SAAG,GACxB,EAC5B,KAAC,yBAAyB,IAAC,SAAS,EAAE,QAAQ,UAAU,CAAC,OAAO,CAAC,EAAE,EAAE,SAAS,EAAC,4CAAS,YACtF,KAAC,IAAI,IAAC,IAAI,EAAC,aAAa,EAAC,SAAS,EAAC,QAAQ,EAAC,KAAK,SAAG,GAC1B,EAC5B,KAAC,yBAAyB,IACxB,SAAS,EAAE,GAAG,oBAAoB,CAAC,OAAO,CAAC,4BAA4B,EACvE,SAAS,EAAC,2HAAuB,YAEjC,KAAC,IAAI,IAAC,IAAI,EAAE,uBAAuB,CAAC,OAAO,CAAC,EAAE,SAAS,EAAC,QAAQ,EAAC,KAAK,SAAG,GAC/C,IACxB,CACP,CAAC;AACJ,CAAC,CACF,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { jsx as _jsx } from "@redneckz/uni-jsx/jsx-runtime";
|
|
2
2
|
import { JSX } from '@redneckz/uni-jsx';
|
|
3
|
-
export const HeaderSecondaryMenuButton = JSX(({ className, children, ariaLabel }) => (_jsx("button", { type: "button", className: `border-0 p-0 w-[24px] h-[24px] flex items-center bg-inherit cursor-pointer ${className
|
|
3
|
+
export const HeaderSecondaryMenuButton = JSX(({ className = '', children, ariaLabel }) => (_jsx("button", { type: "button", className: `border-0 p-0 w-[24px] h-[24px] flex items-center bg-inherit cursor-pointer ${className}`, disabled: true, "aria-label": ariaLabel, children: children })));
|
|
4
4
|
//# sourceMappingURL=HeaderSecondaryMenuButton.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HeaderSecondaryMenuButton.js","sourceRoot":"","sources":["../../../src/components/Header/HeaderSecondaryMenuButton.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAOxC,MAAM,CAAC,MAAM,yBAAyB,GAAG,GAAG,CAC1C,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAE,SAAS,EAAE,EAAE,EAAE,CAAC,
|
|
1
|
+
{"version":3,"file":"HeaderSecondaryMenuButton.js","sourceRoot":"","sources":["../../../src/components/Header/HeaderSecondaryMenuButton.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAOxC,MAAM,CAAC,MAAM,yBAAyB,GAAG,GAAG,CAC1C,CAAC,EAAE,SAAS,GAAG,EAAE,EAAE,QAAQ,EAAE,SAAS,EAAE,EAAE,EAAE,CAAC,CAC3C,iBACE,IAAI,EAAC,QAAQ,EACb,SAAS,EAAE,8EAA8E,SAAS,EAAE,EACpG,QAAQ,EAAE,IAAI,gBACF,SAAS,YAEpB,QAAQ,GACF,CACV,CACF,CAAC"}
|
|
@@ -1,15 +1,8 @@
|
|
|
1
|
+
import type { BgColorVersion } from '../../model/BgColorVersion';
|
|
1
2
|
import type { BaseTileCommonProps } from '../BaseTile/BaseTileProps';
|
|
2
|
-
/**
|
|
3
|
-
* @title Цвет фона
|
|
4
|
-
* @enumNames [
|
|
5
|
-
* "Прозрачный",
|
|
6
|
-
* "Белый"
|
|
7
|
-
* ]
|
|
8
|
-
*/
|
|
9
|
-
export declare type HeadlineBgColor = 'transparent' | 'bg-white';
|
|
10
3
|
/**
|
|
11
4
|
* @title Заголовок
|
|
12
5
|
*/
|
|
13
6
|
export interface HeadlineContent extends Pick<BaseTileCommonProps, 'title' | 'titleSize' | 'description' | 'align'> {
|
|
14
|
-
bgColor?:
|
|
7
|
+
bgColor?: BgColorVersion;
|
|
15
8
|
}
|
|
@@ -11,4 +11,5 @@ export declare const MobileBlocks: {
|
|
|
11
11
|
ProductTile: (props: import("@redneckz/uni-jsx").PropsWithChildren<import("./ProductTile/ProductTile").ProductTileProps, any>, context?: any) => any;
|
|
12
12
|
TextBlock: (props: import("@redneckz/uni-jsx").PropsWithChildren<import("./TextBlock/TextBlock").TextBlockProps, any>, context?: any) => any;
|
|
13
13
|
Tile: (props: import("@redneckz/uni-jsx").PropsWithChildren<import("./Tile/Tile").TileProps, any>, context?: any) => any;
|
|
14
|
+
Navigation: (props: import("@redneckz/uni-jsx").PropsWithChildren<import("./Navigation/Navigation").NavigationProps, any>, context?: any) => any;
|
|
14
15
|
};
|
|
@@ -4,6 +4,7 @@ import { Gallery } from './Gallery/Gallery.mobile.js';
|
|
|
4
4
|
import { Header } from './Header/Header.js';
|
|
5
5
|
import { Headline } from './Headline/Headline.js';
|
|
6
6
|
import { MobileAppTile } from './MobileAppTile/MobileAppTile.js';
|
|
7
|
+
import { Navigation } from './Navigation/Navigation.js';
|
|
7
8
|
import { PictureText } from './PictureText/PictureText.js';
|
|
8
9
|
import { Placeholder } from './Placeholder/Placeholder.js';
|
|
9
10
|
import { ProductBlock } from './ProductBlock/ProductBlock.mobile.js';
|
|
@@ -23,5 +24,6 @@ export const MobileBlocks = {
|
|
|
23
24
|
ProductTile,
|
|
24
25
|
TextBlock,
|
|
25
26
|
Tile,
|
|
27
|
+
Navigation,
|
|
26
28
|
};
|
|
27
29
|
//# sourceMappingURL=MobileBlocks.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MobileBlocks.js","sourceRoot":"","sources":["../../src/components/MobileBlocks.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,qCAAqC,CAAC;AACvE,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAChD,OAAO,EAAE,OAAO,EAAE,MAAM,0BAA0B,CAAC;AACnD,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AACzC,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAC/C,OAAO,EAAE,aAAa,EAAE,M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,aAAa,CAAC;AAEnC,MAAM,CAAC,MAAM,YAAY,GAAG;IAC1B,gBAAgB;IAChB,MAAM;IACN,OAAO;IACP,MAAM;IACN,QAAQ;IACR,aAAa;IACb,WAAW;IACX,WAAW;IACX,YAAY;IACZ,WAAW;IACX,SAAS;IACT,IAAI;IACJ,UAAU;CACX,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { UniBlockProps } from '../../types';
|
|
2
|
+
import { NavigationContent } from './NavigationContent';
|
|
3
|
+
export interface NavigationProps extends NavigationContent, UniBlockProps {
|
|
4
|
+
}
|
|
5
|
+
export declare const Navigation: (props: import("@redneckz/uni-jsx").PropsWithChildren<NavigationProps, any>, context?: any) => any;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "@redneckz/uni-jsx/jsx-runtime";
|
|
2
|
+
import { JSX } from '@redneckz/uni-jsx';
|
|
3
|
+
import { useLink } from '../../hooks/useLink.js';
|
|
4
|
+
import { findActiveSubItem } from '../../services/sitemap/findActiveSubItem.js';
|
|
5
|
+
import { NavigationItem } from './NavigationItem.js';
|
|
6
|
+
export const Navigation = JSX(({ className, context, title, buttons }) => {
|
|
7
|
+
const router = context.useRouter();
|
|
8
|
+
const { handlerDecorator } = context;
|
|
9
|
+
const activeButton = findActiveSubItem(router)(buttons);
|
|
10
|
+
return (_jsxs("section", { className: `font-sans text-primary-text rounded-[40px] flex items-center justify-between ${className || ''}`, children: [_jsx("h2", { className: "font-medium text-xl m-0", children: title }), buttons?.length ? (_jsx("div", { className: "flex rounded-md overflow-hidden bg-white", children: buttons
|
|
11
|
+
.filter(({ text }) => text)
|
|
12
|
+
.map((button, i) => (_jsx(NavigationItem, { className: "first:rounded-tl-md first:rounded-bl-md last:rounded-tr-md last:rounded-br-md", isActive: button === activeButton, ...useLink({ router, handlerDecorator }, button) }, String(i)))) })) : null] }));
|
|
13
|
+
});
|
|
14
|
+
//# sourceMappingURL=Navigation.js.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
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NavigationContent.js","sourceRoot":"","sources":["../../../src/components/Navigation/NavigationContent.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { jsx as _jsx } from "@redneckz/uni-jsx/jsx-runtime";
|
|
2
|
+
import { JSX } from '@redneckz/uni-jsx';
|
|
3
|
+
export const NavigationItem = JSX(({ className, text, onClick, href, target, isActive }) => (_jsx("a", { className: `bg-inherit no-underline px-4 py-2.5 cursor-pointer rounded text-sm border border-solid hover:text-primary-main ${className || ''} ${isActive ? 'border-primary-main text-primary-main' : 'border-white text-secondary-text'}`, onClick: onClick, href: href, target: target, children: text })));
|
|
4
|
+
//# sourceMappingURL=NavigationItem.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NavigationItem.js","sourceRoot":"","sources":["../../../src/components/Navigation/NavigationItem.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAGxC,MAAM,CAAC,MAAM,cAAc,GAAG,GAAG,CAC/B,CAAC,EAAE,SAAS,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,EAAE,EAAE,CAAC,CACxD,YACE,SAAS,EAAE,kHACT,SAAS,IAAI,EACf,IAAI,QAAQ,CAAC,CAAC,CAAC,uCAAuC,CAAC,CAAC,CAAC,kCAAkC,EAAE,EAC7F,OAAO,EAAE,OAAO,EAChB,IAAI,EAAE,IAAI,EACV,MAAM,EAAE,MAAM,YAEb,IAAI,GACH,CACL,CACF,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { StepsBlockContent } from './StepsBlockContent';
|
|
2
1
|
import type { UniBlockProps } from '../../types';
|
|
2
|
+
import type { StepsBlockContent } from './StepsBlockContent';
|
|
3
3
|
export interface StepsBlockProps extends StepsBlockContent, UniBlockProps {
|
|
4
4
|
}
|
|
5
5
|
export declare const StepsBlock: (props: import("@redneckz/uni-jsx").PropsWithChildren<StepsBlockProps, any>, context?: any) => any;
|
|
@@ -3,13 +3,13 @@ import { JSX } from '@redneckz/uni-jsx';
|
|
|
3
3
|
import { Icon } from '../../ui-kit/Icon/Icon.js';
|
|
4
4
|
import { Title } from '../../ui-kit/Title/Title.js';
|
|
5
5
|
import { joinList } from '../../utils/joinList.js';
|
|
6
|
-
export const StepsBlock = JSX(({ className, title, steps }) => {
|
|
7
|
-
return (_jsxs("section", { className: `font-sans text-primary-text bg-white px-
|
|
6
|
+
export const StepsBlock = JSX(({ className, title, showLines = true, steps }) => {
|
|
7
|
+
return (_jsxs("section", { className: `box-border font-sans text-primary-text bg-white px-20 py-[50px] flex flex-col items-center ${className || ''}`, children: [_jsx(Title, { className: "font-medium m-0 max-w-[47rem] text-center", children: title }), steps?.length ? (_jsxs("div", { className: `box-border py-0.5 mb-0.5 ${title ? 'mt-9' : ''}`, children: [_jsx("div", { className: "flex items-center px-[88px]", children: joinList(_jsx("div", { className: `h-0.5 w-full bg-secondary-light ${!showLines ? 'opacity-0' : ''}` }))(steps.map((step, i) => renderStepIcon(step, i))) }), _jsx("div", { className: "flex justify-between gap-x-[101px]", children: steps.map(renderStepTitle) })] })) : null] }));
|
|
8
8
|
});
|
|
9
9
|
const renderStepIcon = (step, i) => {
|
|
10
10
|
return (_jsx("div", { className: "flex flex-col items-center text-center relative", children: _jsx("div", { className: "h-[100px] w-[100px] min-w-[100px] min-h-[100px] bg-secondary-light rounded-full p-[26px] box-border z-10", children: (step.icon && _jsx(Icon, { name: step.icon, width: "48", height: "48" })) || (_jsx("span", { className: "font-medium text-title-sm text-secondary-text", children: i + 1 })) }) }, String(i)));
|
|
11
11
|
};
|
|
12
12
|
const renderStepTitle = (step, i) => {
|
|
13
|
-
return (
|
|
13
|
+
return (_jsxs("div", { className: "flex flex-col items-center text-center relative w-[276px] whitespace-pre-line overflow-hidden", children: [step.label && _jsx("div", { className: "font-medium text-xl m-0 mt-4", children: step.label }), step.description && (_jsx("div", { className: `font-normal text-sm text-secondary-text ${step.label ? 'mt-2' : 'mt-4'}`, children: step.description }))] }, String(i)));
|
|
14
14
|
};
|
|
15
15
|
//# sourceMappingURL=StepsBlock.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StepsBlock.js","sourceRoot":"","sources":["../../../src/components/StepsBlock/StepsBlock.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"StepsBlock.js","sourceRoot":"","sources":["../../../src/components/StepsBlock/StepsBlock.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAExC,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAC9C,OAAO,EAAE,KAAK,EAAE,MAAM,0BAA0B,CAAC;AACjD,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAKhD,MAAM,CAAC,MAAM,UAAU,GAAG,GAAG,CAAkB,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,SAAS,GAAG,IAAI,EAAE,KAAK,EAAE,EAAE,EAAE;IAC/F,OAAO,CACL,mBACE,SAAS,EAAE,8FACT,SAAS,IAAI,EACf,EAAE,aAEF,KAAC,KAAK,IAAC,SAAS,EAAC,2CAA2C,YAAE,KAAK,GAAS,EAC3E,KAAK,EAAE,MAAM,CAAC,CAAC,CAAC,CACf,eAAK,SAAS,EAAE,4BAA4B,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,aAC/D,cAAK,SAAS,EAAC,6BAA6B,YACzC,QAAQ,CACP,cACE,SAAS,EAAE,mCAAmC,CAAC,SAAS,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,EAAE,EAAE,GAC7E,CACH,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAA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
label?: string;
|
|
8
8
|
/** @title Описание */
|
|
9
9
|
description?: string;
|
|
10
10
|
icon?: IconName;
|
|
@@ -15,9 +15,12 @@ export interface Step {
|
|
|
15
15
|
export interface StepsBlockContent {
|
|
16
16
|
/** @title Заголовок */
|
|
17
17
|
title?: string;
|
|
18
|
+
/** @title Линии */
|
|
19
|
+
showLines?: boolean;
|
|
18
20
|
/**
|
|
19
21
|
* @title Шаги
|
|
20
|
-
* @
|
|
22
|
+
* @minItems 2
|
|
23
|
+
* @maxItems 3
|
|
21
24
|
*/
|
|
22
25
|
steps?: Step[];
|
|
23
26
|
}
|
package/lib/hooks/useLink.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { adjustHref
|
|
1
|
+
import { adjustHref } from '../utils/adjustHref.js';
|
|
2
|
+
import { isURL } from '../utils/url.js';
|
|
2
3
|
const defaultHandlerDecorator = (handler) => handler;
|
|
3
4
|
export function useLink({ router, handlerDecorator = defaultHandlerDecorator, }, link) {
|
|
4
5
|
const href = adjustHref(link.href, router);
|
package/lib/hooks/useLink.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useLink.js","sourceRoot":"","sources":["../../src/hooks/useLink.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"useLink.js","sourceRoot":"","sources":["../../src/hooks/useLink.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACjD,OAAO,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AAErC,MAAM,uBAAuB,GAAqB,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC;AAEvE,MAAM,UAAU,OAAO,CACrB,EACE,MAAM,EACN,gBAAgB,GAAG,uBAAuB,GACc,EAC1D,IAAgD;IAEhD,MAAM,IAAI,GAAG,UAAU,CAAC,IAAI,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;IAC3C,OAAO;QACL,GAAG,IAAI;QACP,IAAI;QACJ,SAAS,EAAE,IAAI,CAAC,IAAI;QACpB,OAAO,EAAE,gBAAgB,CAAC,CAAC,EAAc,EAAE,EAAE;YAC3C,MAAM,WAAW,GAAG,IAAI,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;YACzC,MAAM,aAAa,GAAG,CAAC,IAAI,CAAC,MAAM,IAAI,IAAI,CAAC,MAAM,KAAK,OAAO,CAAC;YAC9D,IAAI,WAAW,IAAI,aAAa,EAAE;gBAChC,EAAE,CAAC,cAAc,EAAE,CAAC;gBACpB,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;aACnB;QACH,CAAC,EAAE,IAAI,CAAC;KACT,CAAC;AACJ,CAAC"}
|
package/lib/index.d.ts
CHANGED
|
@@ -10,9 +10,9 @@ export { ContentPageHead } from './components/ContentPage/ContentPageHead';
|
|
|
10
10
|
export { toMobilePage } from './components/ContentPage/toMobilePage';
|
|
11
11
|
export { MobileBlocks } from './components/MobileBlocks';
|
|
12
12
|
export type { Img, ImgSource, Picture } from './model/Picture';
|
|
13
|
-
export type { SitemapProps as SitemapContent } from './model/SitemapProps';
|
|
14
13
|
export { projectSettings } from './ProjectSettings';
|
|
15
14
|
export type { ProjectSettings } from './ProjectSettings';
|
|
15
|
+
export type { SitemapProps as SitemapContent } from './services/sitemap/SitemapProps';
|
|
16
16
|
export type { BlockDef, ContentPageDef, ContentPageMeta, UniBlockProps } from './types';
|
|
17
17
|
export { joinList } from './utils/joinList';
|
|
18
18
|
export * as url from './utils/url';
|
package/lib/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAC1C,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAExC,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAC7C,OAAO,EAAE,WAAW,EAAE,MAAM,sCAAsC,CAAC;AAWnE,OAAO,EAAE,eAAe,EAAE,MAAM,0CAA0C,CAAC;AAC3E,OAAO,EAAE,YAAY,EAAE,MAAM,uCAAuC,CAAC;AACrE,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAC1C,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAExC,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAC7C,OAAO,EAAE,WAAW,EAAE,MAAM,sCAAsC,CAAC;AAWnE,OAAO,EAAE,eAAe,EAAE,MAAM,0CAA0C,CAAC;AAC3E,OAAO,EAAE,YAAY,EAAE,MAAM,uCAAuC,CAAC;AACrE,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAEzD,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAIpD,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,KAAK,GAAG,MAAM,aAAa,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BgColorVersion.js","sourceRoot":"","sources":["../../src/model/BgColorVersion.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { LinkProps } from '../../model/LinkProps';
|
|
2
|
+
/**
|
|
3
|
+
* @title Ссылка
|
|
4
|
+
* @required ["text", "href"]
|
|
5
|
+
*/
|
|
6
|
+
export interface TopMenuItem extends LinkProps {
|
|
7
|
+
/** @hidden */
|
|
8
|
+
items?: LinkProps[];
|
|
9
|
+
}
|
|
10
|
+
export interface SitemapProps {
|
|
11
|
+
/** @title Дополнительное меню */
|
|
12
|
+
topItems?: TopMenuItem[];
|
|
13
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SitemapProps.js","sourceRoot":"","sources":["../../../src/services/sitemap/SitemapProps.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { maxBy } from '../../utils/maxBy.js';
|
|
2
|
+
import { isSubItemActive } from './isSubItemActive.js';
|
|
3
|
+
export const findActiveSubItem = (router) => (items = []) => {
|
|
4
|
+
const possibleActiveSubItems = items?.filter(isSubItemActive(router));
|
|
5
|
+
const activeSubItem = possibleActiveSubItems?.length
|
|
6
|
+
? maxBy((_) => _.href?.length || 0)(possibleActiveSubItems) // More specific item with max length
|
|
7
|
+
: null;
|
|
8
|
+
return activeSubItem;
|
|
9
|
+
};
|
|
10
|
+
//# sourceMappingURL=findActiveSubItem.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"findActiveSubItem.js","sourceRoot":"","sources":["../../../src/services/sitemap/findActiveSubItem.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAC1C,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAEpD,MAAM,CAAC,MAAM,iBAAiB,GAC5B,CAAC,MAAc,EAAE,EAAE,CACnB,CAAsB,QAAa,EAAE,EAAY,EAAE;IACjD,MAAM,sBAAsB,GAAG,KAAK,EAAE,MAAM,CAAC,eAAe,CAAC,MAAM,CAAC,CAAC,CAAC;IACtE,MAAM,aAAa,GAAG,sBAAsB,EAAE,MAAM;QAClD,CAAC,CAAC,KAAK,CAAC,CAAC,CAAI,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,EAAE,MAAM,IAAI,CAAC,CAAC,CAAC,sBAAsB,CAAC,CAAC,qCAAqC;QACpG,CAAC,CAAC,IAAI,CAAC;IACT,OAAO,aAAa,CAAC;AACvB,CAAC,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { isURL, withoutQuery } from '../../utils/url.js';
|
|
2
|
+
import { withoutMobilePath } from '../../utils/withoutMobilePath.js';
|
|
3
|
+
export const isHrefActive = (href, router, cmp = (href, baseHref) => baseHref.startsWith(href)) => {
|
|
4
|
+
return cmp(withoutQuery(href), withoutMobilePath(withoutQuery(isURL(href) ? router.href : router.pathname)));
|
|
5
|
+
};
|
|
6
|
+
//# sourceMappingURL=isHrefActive.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"isHrefActive.js","sourceRoot":"","sources":["../../../src/services/sitemap/isHrefActive.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AACtD,OAAO,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAElE,MAAM,CAAC,MAAM,YAAY,GAAG,CAC1B,IAAwB,EACxB,MAA4C,EAC5C,MAAmD,CAAC,IAAI,EAAE,QAAQ,EAAE,EAAE,CAAC,QAAQ,CAAC,UAAU,CAAC,IAAI,CAAC,EAChG,EAAE;IACF,OAAO,GAAG,CACR,YAAY,CAAC,IAAI,CAAC,EAClB,iBAAiB,CAAC,YAAY,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,CAC7E,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"isSubItemActive.js","sourceRoot":"","sources":["../../../src/services/sitemap/isSubItemActive.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAE9C,MAAM,CAAC,MAAM,eAAe,GAC1B,CAAC,MAAc,EAAE,EAAE,CACnB,CAAC,OAAkB,EAAW,EAAE,CAC9B,YAAY,CAAC,OAAO,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { isHrefActive } from './isHrefActive.js';
|
|
2
|
+
import { isSubItemActive } from './isSubItemActive.js';
|
|
3
|
+
export const isTopItemActive = (router) => (topItem) => topItem.items?.some(isSubItemActive(router)) || isHrefActive(topItem.href, router);
|
|
4
|
+
//# sourceMappingURL=isTopItemActive.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"isTopItemActive.js","sourceRoot":"","sources":["../../../src/services/sitemap/isTopItemActive.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAGpD,MAAM,CAAC,MAAM,eAAe,GAC1B,CAAC,MAAc,EAAE,EAAE,CACnB,CAAC,OAAoB,EAAW,EAAE,CAChC,OAAO,CAAC,KAAK,EAAE,IAAI,CAAC,eAAe,CAAC,MAAM,CAAC,CAAC,IAAI,YAAY,CAAC,OAAO,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC"}
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
const cmp = (a) => (b) => a?.href === b?.href;
|
|
2
2
|
const substitute = (items, substitution) => (items || []).map((_) => substitution?.find(cmp(_)) || _);
|
|
3
3
|
const subtract = (minuend, subtrahend) => (minuend || []).filter((_) => !subtrahend?.find(cmp(_)));
|
|
4
|
-
export
|
|
5
|
-
return substitute(left, right).concat(subtract(right, left));
|
|
6
|
-
}
|
|
4
|
+
export const mergeTopItems = (left, right) => substitute(left, right).concat(subtract(right, left));
|
|
7
5
|
//# sourceMappingURL=mergeTopItems.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mergeTopItems.js","sourceRoot":"","sources":["../../../src/services/sitemap/mergeTop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M,QAAQ,CAAC,IAAI,EAAE,CAAC;AAC/B,CAAC;AAED,SAAS,UAAU;IACjB,OAAO,mBAAmB,eAAe,CAAC,OAAO,IAAI,SAAS,OAAO,CAAC;AACxE,CAAC"}
|
|
@@ -1,7 +1,19 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "@redneckz/uni-jsx/jsx-runtime";
|
|
2
2
|
import { JSX } from '@redneckz/uni-jsx';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
3
|
+
const TEXT_CLASSES = 'font-sans font-normal text-base';
|
|
4
|
+
const BORDER_CLASSES = 'absolute left-0 -bottom-2 w-full h-[2px]';
|
|
5
|
+
export const HeaderItem = JSX(({ className, text, href, target, active, onClick, children, bgColor = 'bg-white' }) => (_jsxs("a", { className: `relative inline-block bg-transparent text-center no-underline ${className || ''}`, href: href, target: target, onClick: onClick, children: [_jsx("span", { className: getTextClasses(bgColor, active), children: text || children }), active ? _jsx("div", { className: getBorderClasses(bgColor, active) }) : null] })));
|
|
6
|
+
const getTextClasses = (bgColor, active) => {
|
|
7
|
+
let classes = 'text-white';
|
|
8
|
+
if (bgColor === 'bg-white') {
|
|
9
|
+
classes = active ? 'text-primary-main' : 'text-primary-text hover:text-primary-main';
|
|
10
|
+
}
|
|
11
|
+
return `${classes} ${TEXT_CLASSES}`;
|
|
12
|
+
};
|
|
13
|
+
const getBorderClasses = (bgColor, active) => {
|
|
14
|
+
if (!active) {
|
|
15
|
+
return BORDER_CLASSES;
|
|
16
|
+
}
|
|
17
|
+
return `${bgColor === 'bg-white' ? bgColor : 'bg-primary-main'} ${BORDER_CLASSES}`;
|
|
18
|
+
};
|
|
7
19
|
//# sourceMappingURL=HeaderItem.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HeaderItem.js","sourceRoot":"","sources":["../../../src/ui-kit/HeaderItem/HeaderItem.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,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