@redneckz/wildless-cms-uni-blocks 0.2.101 → 0.2.105
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 +128 -67
- 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/Gallery/GalleryContainer.js +1 -1
- package/dist/components/Gallery/GalleryContainer.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/TariffsTable/TariffsTableCell.js +1 -3
- package/dist/components/TariffsTable/TariffsTableCell.js.map +1 -1
- package/dist/components/TariffsTable/TariffsTableRow.js +1 -1
- package/dist/components/TariffsTable/TariffsTableRow.js.map +1 -1
- package/dist/components/Tile/Tile.d.ts +1 -0
- package/dist/components/Tile/Tile.js +2 -2
- package/dist/components/Tile/Tile.js.map +1 -1
- package/dist/hooks/useLink.js +2 -1
- package/dist/hooks/useLink.js.map +1 -1
- package/dist/index.d.ts +2 -2
- 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 +21 -20
- package/dist/ui-kit/Icon/IconProps.js +17 -17
- 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 +3 -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/Gallery/GalleryContainer.js +1 -1
- package/lib/components/Gallery/GalleryContainer.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/TariffsTable/TariffsTableCell.js +1 -3
- package/lib/components/TariffsTable/TariffsTableCell.js.map +1 -1
- package/lib/components/TariffsTable/TariffsTableRow.js +1 -1
- package/lib/components/TariffsTable/TariffsTableRow.js.map +1 -1
- package/lib/components/Tile/Tile.d.ts +1 -0
- package/lib/components/Tile/Tile.js +2 -2
- package/lib/components/Tile/Tile.js.map +1 -1
- package/lib/hooks/useLink.js +2 -1
- package/lib/hooks/useLink.js.map +1 -1
- package/lib/index.d.ts +2 -2
- 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 +21 -20
- package/lib/ui-kit/Icon/IconProps.js +17 -17
- 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 +3 -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 +33 -16
- package/src/components/Footer/FooterContent.ts +1 -1
- package/src/components/Footer/Sitemap.tsx +4 -3
- package/src/components/Gallery/GalleryContainer.tsx +1 -0
- 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 +1 -1
- package/src/components/PictureText/PictureText.fixture.tsx +1 -1
- package/src/components/ProductGallery/ProductGallery.fixture.tsx +2 -2
- package/src/components/TariffsTable/TariffsTableCell.tsx +1 -3
- package/src/components/TariffsTable/TariffsTableRow.tsx +6 -1
- package/src/components/Tile/Tile.tsx +5 -2
- package/src/hooks/useLink.ts +2 -1
- package/src/icons/Calendar2Icon.svg +1 -1
- package/src/icons/CalendarTickIcon.svg +1 -1
- package/src/icons/CalendarWhiteIcon.svg +1 -1
- package/src/icons/CardWithGemIcon.svg +1 -1
- package/src/icons/ChartSquareIcon.svg +1 -1
- package/src/icons/CreditCardsIcon.svg +1 -1
- package/src/icons/DiscountShapeIcon.svg +1 -0
- package/src/icons/EarthIcon.svg +1 -1
- package/src/icons/EmptyWalletWhiteIcon.svg +1 -1
- package/src/icons/GlobalIcon.svg +1 -1
- package/src/icons/GridIcon.svg +1 -1
- package/src/icons/GridIconWhite.svg +4 -0
- package/src/icons/InterestGrowthIcon.svg +1 -1
- package/src/icons/InterestIcon.svg +1 -1
- package/src/icons/MoneyInsuranceIcon.svg +1 -1
- package/src/icons/OfficeIcon.svg +1 -1
- package/src/icons/PercentageRoundIcon.svg +1 -1
- package/src/icons/PercentageSquareWhiteIcon.svg +1 -1
- package/src/icons/PersonalCardIcon.svg +1 -1
- package/src/icons/RoundRubleIcon.svg +1 -1
- package/src/icons/SafeIcon.svg +1 -1
- package/src/icons/SmallClockIcon.svg +1 -1
- package/src/icons/WalletAdd2Icon.svg +1 -1
- package/src/icons/WalletAddIcon.svg +1 -1
- package/src/icons/WalletIcon.svg +1 -0
- package/src/icons/WalletWithMoneyIcon.svg +1 -1
- package/src/index.ts +9 -2
- 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 +7 -6
- package/src/ui-kit/Logo/Logo.tsx +30 -18
- package/src/ui-kit/SearchBar.tsx +15 -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
- package/src/icons/DischountStarIcon.svg +0 -1
- package/src/icons/DiscountShape.svg +0 -7
|
@@ -10,26 +10,26 @@ export var IconMap;
|
|
|
10
10
|
IconMap[IconMap["CalendarIcon"] = 4] = "CalendarIcon";
|
|
11
11
|
IconMap[IconMap["CalendarTickIcon"] = 5] = "CalendarTickIcon";
|
|
12
12
|
IconMap[IconMap["CalendarWhiteIcon"] = 6] = "CalendarWhiteIcon";
|
|
13
|
-
IconMap[IconMap["
|
|
14
|
-
IconMap[IconMap["
|
|
15
|
-
IconMap[IconMap["
|
|
16
|
-
IconMap[IconMap["
|
|
17
|
-
IconMap[IconMap["
|
|
13
|
+
IconMap[IconMap["CardIcon"] = 7] = "CardIcon";
|
|
14
|
+
IconMap[IconMap["CardPosIcon"] = 8] = "CardPosIcon";
|
|
15
|
+
IconMap[IconMap["CardTickIcon"] = 9] = "CardTickIcon";
|
|
16
|
+
IconMap[IconMap["CardWithGemIcon"] = 10] = "CardWithGemIcon";
|
|
17
|
+
IconMap[IconMap["ChartSquareIcon"] = 11] = "ChartSquareIcon";
|
|
18
18
|
IconMap[IconMap["ClockIcon"] = 12] = "ClockIcon";
|
|
19
19
|
IconMap[IconMap["ComfortableCompIcon"] = 13] = "ComfortableCompIcon";
|
|
20
20
|
IconMap[IconMap["CreditCardsIcon"] = 14] = "CreditCardsIcon";
|
|
21
|
-
IconMap[IconMap["
|
|
22
|
-
IconMap[IconMap["
|
|
23
|
-
IconMap[IconMap["
|
|
24
|
-
IconMap[IconMap["
|
|
25
|
-
IconMap[IconMap["
|
|
26
|
-
IconMap[IconMap["
|
|
27
|
-
IconMap[IconMap["
|
|
28
|
-
IconMap[IconMap["
|
|
29
|
-
IconMap[IconMap["
|
|
30
|
-
IconMap[IconMap["
|
|
31
|
-
IconMap[IconMap["
|
|
32
|
-
IconMap[IconMap["
|
|
21
|
+
IconMap[IconMap["DocIcon"] = 15] = "DocIcon";
|
|
22
|
+
IconMap[IconMap["DocumentTextIcon"] = 16] = "DocumentTextIcon";
|
|
23
|
+
IconMap[IconMap["DollarIcon"] = 17] = "DollarIcon";
|
|
24
|
+
IconMap[IconMap["EarthIcon"] = 18] = "EarthIcon";
|
|
25
|
+
IconMap[IconMap["EmptyWalletChangeIcon"] = 19] = "EmptyWalletChangeIcon";
|
|
26
|
+
IconMap[IconMap["EmptyWalletIcon"] = 20] = "EmptyWalletIcon";
|
|
27
|
+
IconMap[IconMap["EmptyWalletWhiteIcon"] = 21] = "EmptyWalletWhiteIcon";
|
|
28
|
+
IconMap[IconMap["EuroIcon"] = 22] = "EuroIcon";
|
|
29
|
+
IconMap[IconMap["GlassIcon"] = 23] = "GlassIcon";
|
|
30
|
+
IconMap[IconMap["GlobalIcon"] = 24] = "GlobalIcon";
|
|
31
|
+
IconMap[IconMap["GridIcon"] = 25] = "GridIcon";
|
|
32
|
+
IconMap[IconMap["GridIconWhite"] = 26] = "GridIconWhite";
|
|
33
33
|
IconMap[IconMap["InterestGrowthIcon"] = 27] = "InterestGrowthIcon";
|
|
34
34
|
IconMap[IconMap["InterestIcon"] = 28] = "InterestIcon";
|
|
35
35
|
IconMap[IconMap["JCBIcon"] = 29] = "JCBIcon";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IconProps.js","sourceRoot":"","sources":["../../../src/ui-kit/Icon/IconProps.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,CAAN,IAAY,OAgEX;AAhED,WAAY,OAAO;IACjB,+DAAmB,CAAA;IACnB,+CAAW,CAAA;IACX,uDAAe,CAAA;IACf,iEAAoB,CAAA;IACpB,qDAAc,CAAA;IACd,6DAAkB,CAAA;IAClB,+DAAmB,CAAA;IACnB,
|
|
1
|
+
{"version":3,"file":"IconProps.js","sourceRoot":"","sources":["../../../src/ui-kit/Icon/IconProps.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,CAAN,IAAY,OAgEX;AAhED,WAAY,OAAO;IACjB,+DAAmB,CAAA;IACnB,+CAAW,CAAA;IACX,uDAAe,CAAA;IACf,iEAAoB,CAAA;IACpB,qDAAc,CAAA;IACd,6DAAkB,CAAA;IAClB,+DAAmB,CAAA;IACnB,6CAAU,CAAA;IACV,mDAAa,CAAA;IACb,qDAAc,CAAA;IACd,4DAAiB,CAAA;IACjB,4DAAiB,CAAA;IACjB,gDAAW,CAAA;IACX,oEAAqB,CAAA;IACrB,4DAAiB,CAAA;IACjB,4CAAS,CAAA;IACT,8DAAkB,CAAA;IAClB,kDAAY,CAAA;IACZ,gDAAW,CAAA;IACX,wEAAuB,CAAA;IACvB,4DAAiB,CAAA;IACjB,sEAAsB,CAAA;IACtB,8CAAU,CAAA;IACV,gDAAW,CAAA;IACX,kDAAY,CAAA;IACZ,8CAAU,CAAA;IACV,wDAAe,CAAA;IACf,kEAAoB,CAAA;IACpB,sDAAc,CAAA;IACd,4CAAS,CAAA;IACT,gDAAW,CAAA;IACX,0DAAgB,CAAA;IAChB,gDAAW,CAAA;IACX,4CAAS,CAAA;IACT,gDAAW,CAAA;IACX,kEAAoB,CAAA;IACpB,gEAAmB,CAAA;IACnB,kDAAY,CAAA;IACZ,kDAAY,CAAA;IACZ,0CAAQ,CAAA;IACR,sDAAc,CAAA;IACd,oEAAqB,CAAA;IACrB,sEAAsB,CAAA;IACtB,gFAA2B,CAAA;IAC3B,8DAAkB,CAAA;IAClB,0DAAgB,CAAA;IAChB,8CAAU,CAAA;IACV,8DAAkB,CAAA;IAClB,oDAAa,CAAA;IACb,0DAAgB,CAAA;IAChB,8CAAU,CAAA;IACV,0DAAgB,CAAA;IAChB,sDAAc,CAAA;IACd,0DAAgB,CAAA;IAChB,sDAAc,CAAA;IACd,sDAAc,CAAA;IACd,sDAAc,CAAA;IACd,8CAAU,CAAA;IACV,0CAAQ,CAAA;IACR,gDAAW,CAAA;IACX,kDAAY,CAAA;IACZ,kDAAY,CAAA;IACZ,oEAAqB,CAAA;AACvB,CAAC,EAhEW,OAAO,KAAP,OAAO,QAgElB"}
|
package/lib/ui-kit/Logo/Logo.js
CHANGED
|
@@ -8,7 +8,15 @@ const LOGO_PATHS = [
|
|
|
8
8
|
'M14.7 27.83h2.58c.67 0 1.14.14 1.4.4.27.25.4.72.4 1.38v7.4c0 .66-.12 1.12-.4 1.38-.4.41-1.16.41-1.78.41l-.4-.01v3.5l.78.14v-2.88c1.2 0 1.97-.4 2.34-1.22v4.29h.26l.5-.01V29.74c0-.68.13-1.16.4-1.43.25-.27.72-.4 1.37-.4.67 0 1.65-.1 2.16.4.26.27.38.76.38 1.43v3.8h-1.77v-4.06h-.77v12.99c.26-.03.5-.07.77-.12V34.3h1.77v7.64c.36-.1.72-.21 1.08-.34v-7c0-.8.19-1.4 1-1.67l-.9-4.87h1.8l.3 5.31h.22l.3-5.31h1.88l-1.01 4.87c.84.3 1.01.81 1.01 1.66v4.53a16.63 16.63 0 0 0 1.5-1.27v-9.83h5.25l.1-.72H24.93l.17.89c-.38-.72-1.12-1.08-2.2-1.08h-.77c-1.3 0-2.1.52-2.4 1.55-.27-1.08-1.1-1.62-2.46-1.62h-3.36v14.52c.26.09.52.18.78.25V27.84Zm16.29 5.58-.85-.8.85-4.37v5.17Z',
|
|
9
9
|
'M27.66 40.79c.27-.14.55-.28.8-.43v-5.98h-.8v6.4Z',
|
|
10
10
|
];
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
const SVG_COLOR = {
|
|
12
|
+
'bg-white': 'text-primary-main',
|
|
13
|
+
transparent: 'text-white',
|
|
14
|
+
};
|
|
15
|
+
const TEXT_COLOR = {
|
|
16
|
+
'bg-white': 'text-black',
|
|
17
|
+
transparent: 'text-white',
|
|
18
|
+
};
|
|
19
|
+
export const Logo = JSX(({ className, href, children, targetBlank, bgColor = 'bg-white' }) => {
|
|
20
|
+
return (_jsxs("a", { className: `inline-flex items-center font-sans no-underline ${className || ''}`, href: href || 'https://rshb.ru/', target: targetBlank ? '_blank' : '_self', children: [_jsx(SVG, { className: `${SVG_COLOR[bgColor]} w-10`, viewBox: "0 0 40 45", paths: LOGO_PATHS.map((d) => ({ d })) }), _jsx("span", { className: `${TEXT_COLOR[bgColor]} text-base font-medium ml-2.5`, children: children || 'Россельхозбанк' })] }));
|
|
13
21
|
});
|
|
14
22
|
//# sourceMappingURL=Logo.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Logo.js","sourceRoot":"","sources":["../../../src/ui-kit/Logo/Logo.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"Logo.js","sourceRoot":"","sources":["../../../src/ui-kit/Logo/Logo.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAExC,OAAO,EAAE,GAAG,EAAE,MAAM,QAAQ,CAAC;AAS7B,MAAM,UAAU,GAAG;IACjB,w5CAAw5C;IACx5C,2OAA2O;IAC3O,0JAA0J;IAC1J,gpBAAgpB;IAChpB,kDAAkD;CACnD,CAAC;AACF,MAAM,SAAS,GAAmC;IAChD,UAAU,EAAE,mBAAmB;IAC/B,WAAW,EAAE,YAAY;CAC1B,CAAC;AACF,MAAM,UAAU,GAAmC;IACjD,UAAU,EAAE,YAAY;IACxB,WAAW,EAAE,YAAY;CAC1B,CAAC;AAEF,MAAM,CAAC,MAAM,IAAI,GAAG,GAAG,CACrB,CAAC,EAAE,SAAS,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,OAAO,GAAG,UAAU,EAAE,EAAE,EAAE;IACnE,OAAO,CACL,aACE,SAAS,EAAE,mDAAmD,SAAS,IAAI,EAAE,EAAE,EAC/E,IAAI,EAAE,IAAI,IAAI,kBAAkB,EAChC,MAAM,EAAE,WAAW,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,OAAO,aAExC,KAAC,GAAG,IACF,SAAS,EAAE,GAAG,SAAS,CAAC,OAAO,CAAC,OAAO,EACvC,OAAO,EAAC,WAAW,EACnB,KAAK,EAAE,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,GACrC,EACF,eAAM,SAAS,EAAE,GAAG,UAAU,CAAC,OAAO,CAAC,+BAA+B,YACnE,QAAQ,IAAI,gBAAgB,GACxB,IACL,CACL,CAAC;AACJ,CAAC,CACF,CAAC"}
|
package/lib/ui-kit/SearchBar.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "@redneckz/uni-jsx/jsx-runtime";
|
|
2
2
|
import { JSX } from '@redneckz/uni-jsx';
|
|
3
|
+
import { Button } from './Button/Button.js';
|
|
3
4
|
import { Icon } from './Icon/Icon.js';
|
|
4
5
|
export const SearchBar = JSX(({ className, context }) => {
|
|
5
6
|
const { term, setTerm } = context.useSearch();
|
|
6
|
-
|
|
7
|
-
return (_jsxs("form", { className: `relative ${className || ''}`, children: [_jsxs("div", { className: "absolute rounded h-full flex items-center justify-center pl-4 max-w-[170px] gap-3.5 pointer-events-none", children: [_jsx("div", { className: "w-[24px] h-[24px]", children: _jsx(Icon, { name: "LoupeIcon", width: "24", height: "24" }) }), !term && (_jsx("label", { htmlFor: "search-bar-input", className: "font-sans font-normal text-base text-secondary-text", children: "\u041F\u043E\u0438\u0441\u043A \u043F\u043E \u0441\u0430\u0439\u0442\u0443" }))] }), _jsx("input", { id: "search-bar-input", className: `${inputHasFocus ? 'border-primary-text' : 'border-main-divider'} h-12 pl-12 w-full font-sans font-normal text-base text-black border border-solid rounded h-full box-border outline-none pr-[6%]`, value: term, onChange: (e) => setTerm(e.target.value), onFocus: (e) => setInputHasFocus(true), onBlur: (e) => setInputHasFocus(false), type: "text", name: "search-bar-input" }), inputHasFocus && (_jsx("button", { type: "submit", className: "absolute font-sans font-normal cursor-pointer text-sm bg-primary-main hover:bg-primary-hover active:bg-primary-active border-none px-9 py-[9px] rounded top-1 right-1 outline-none text-secondary-text text-white", onClick: (e) => {
|
|
7
|
+
return (_jsxs("form", { className: `relative ${className || ''}`, children: [_jsxs("div", { className: "absolute rounded h-full flex items-center justify-center pl-4 max-w-[170px] gap-3.5 pointer-events-none", children: [_jsx("div", { className: "w-[24px] h-[24px]", children: _jsx(Icon, { name: "LoupeIcon", width: "24", height: "24" }) }), !term && (_jsx("label", { htmlFor: "search-bar-input", className: "font-sans font-normal text-base text-secondary-text", children: "\u041F\u043E\u0438\u0441\u043A \u043F\u043E \u0441\u0430\u0439\u0442\u0443" }))] }), _jsx("input", { id: "search-bar-input", className: 'h-12 pl-12 w-full peer font-sans font-normal text-base text-black border border-solid rounded h-full box-border outline-none pr-[6%] border-main-divider focus:border-primary-text', value: term, onChange: (e) => setTerm(e.target.value), type: "text", name: "search-bar-input" }), _jsx(Button, { version: "primary", text: "\u041D\u0430\u0439\u0442\u0438", className: "invisible peer-focus:visible absolute top-1 right-1", onClick: (e) => {
|
|
8
8
|
e.preventDefault();
|
|
9
9
|
console.log('click');
|
|
10
|
-
}, children: "\u041D\u0430\u0439\u0442\u0438" }))] }));
|
|
10
|
+
}, children: _jsx("div", { className: "font-normal text-sm px-9 py-[9px]", children: "\u041D\u0430\u0439\u0442\u0438" }) })] }));
|
|
11
11
|
});
|
|
12
12
|
//# sourceMappingURL=SearchBar.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SearchBar.js","sourceRoot":"","sources":["../../src/ui-kit/SearchBar.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAExC,OAAO,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AAEnC,MAAM,CAAC,MAAM,SAAS,GAAG,GAAG,CAAgB,CAAC,EAAE,SAAS,EAAE,OAAO,EAAE,EAAE,EAAE;IACrE,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,OAAO,CAAC,SAAS,EAAE,CAAC;IAC9C,
|
|
1
|
+
{"version":3,"file":"SearchBar.js","sourceRoot":"","sources":["../../src/ui-kit/SearchBar.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAExC,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AACzC,OAAO,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AAEnC,MAAM,CAAC,MAAM,SAAS,GAAG,GAAG,CAAgB,CAAC,EAAE,SAAS,EAAE,OAAO,EAAE,EAAE,EAAE;IACrE,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,OAAO,CAAC,SAAS,EAAE,CAAC;IAC9C,OAAO,CACL,gBAAM,SAAS,EAAE,YAAY,SAAS,IAAI,EAAE,EAAE,aAC5C,eAAK,SAAS,EAAC,yGAAyG,aACtH,cAAK,SAAS,EAAC,mBAAmB,YAChC,KAAC,IAAI,IAAC,IAAI,EAAC,WAAW,EAAC,KAAK,EAAC,IAAI,EAAC,MAAM,EAAC,IAAI,GAAG,GAC5C,EACL,CAAC,IAAI,IAAI,CACR,gBACE,OAAO,EAAC,kBAAkB,EAC1B,SAAS,EAAC,qDAAqD,2FAGzD,CACT,IACG,EACN,gBACE,EAAE,EAAC,kBAAkB,EACrB,SAAS,EACP,oLAAoL,EAEtL,KAAK,EAAE,IAAI,EACX,QAAQ,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,EACxC,IAAI,EAAC,MAAM,EACX,IAAI,EAAC,kBAAkB,GACvB,EACF,KAAC,MAAM,IACL,OAAO,EAAC,SAAS,EACjB,IAAI,EAAC,gCAAO,EACZ,SAAS,EAAC,qDAAqD,EAC/D,OAAO,EAAE,CAAC,CAAC,EAAE,EAAE;oBACb,CAAC,CAAC,cAAc,EAAE,CAAC;oBACnB,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;gBACvB,CAAC,YAED,cAAK,SAAS,EAAC,mCAAmC,+CAAY,GACvD,IACJ,CACR,CAAC;AACJ,CAAC,CAAC,CAAC"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { BgColorVersion } from '../../model/BgColorVersion';
|
|
1
2
|
import type { LinkProps } from '../../model/LinkProps';
|
|
2
3
|
export interface TopItemContent extends LinkProps {
|
|
3
4
|
active?: boolean;
|
|
@@ -7,5 +8,6 @@ export interface TopItemProps extends TopItemContent {
|
|
|
7
8
|
flat?: boolean;
|
|
8
9
|
ariaLabel?: string;
|
|
9
10
|
onClick?: (ev: MouseEvent) => any;
|
|
11
|
+
bgColor?: BgColorVersion;
|
|
10
12
|
}
|
|
11
13
|
export declare const TopItem: (props: import("@redneckz/uni-jsx").PropsWithChildren<TopItemProps, any>, context?: any) => any;
|
|
@@ -1,10 +1,22 @@
|
|
|
1
1
|
import { jsx as _jsx } from "@redneckz/uni-jsx/jsx-runtime";
|
|
2
2
|
import { JSX } from '@redneckz/uni-jsx';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
}
|
|
3
|
+
const TEXT_CLASSES = 'font-sans font-normal text-sm';
|
|
4
|
+
const LINK_CLASSES = 'inline-block border border-solid bg-transparent text-center no-underline';
|
|
5
|
+
export const TopItem = JSX(({ className = '', text, href, target, active, flat, onClick, children, ariaLabel, bgColor = 'bg-white', }) => (_jsx("a", { className: `${getLinkClasses(bgColor, active, flat)} ${className}`, href: href, target: target, onClick: onClick, rel: "noopener noreferrer", "aria-label": ariaLabel, children: _jsx("span", { className: getTextClasses(bgColor, active, flat), children: text || children }) })));
|
|
6
|
+
const getLinkClasses = (bgColor, active, flat) => {
|
|
7
|
+
let classes = 'border-transparent';
|
|
8
|
+
if (active) {
|
|
9
|
+
classes = `rounded-md ${bgColor === 'bg-white' ? 'border-primary-main' : 'border-white'}`;
|
|
10
|
+
}
|
|
11
|
+
return `${classes} ${LINK_CLASSES} ${flat ? '' : 'px-4 py-2'}`;
|
|
12
|
+
};
|
|
13
|
+
const getTextClasses = (bgColor, active, flat) => {
|
|
14
|
+
let classes = 'text-white';
|
|
15
|
+
if (bgColor === 'bg-white') {
|
|
16
|
+
classes = active
|
|
17
|
+
? 'text-primary-main'
|
|
18
|
+
: `${flat ? 'text-primary-text' : 'text-secondary-text'} hover:text-primary-main`;
|
|
19
|
+
}
|
|
20
|
+
return `${classes} ${TEXT_CLASSES}`;
|
|
21
|
+
};
|
|
10
22
|
//# sourceMappingURL=TopItem.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TopItem.js","sourceRoot":"","sources":["../../../src/ui-kit/TopItem/TopItem.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"TopItem.js","sourceRoot":"","sources":["../../../src/ui-kit/TopItem/TopItem.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAgBxC,MAAM,YAAY,GAAG,+BAA+B,CAAC;AACrD,MAAM,YAAY,GAAG,0EAA0E,CAAC;AAEhG,MAAM,CAAC,MAAM,OAAO,GAAG,GAAG,CACxB,CAAC,EACC,SAAS,GAAG,EAAE,EACd,IAAI,EACJ,IAAI,EACJ,MAAM,EACN,MAAM,EACN,IAAI,EACJ,OAAO,EACP,QAAQ,EACR,SAAS,EACT,OAAO,GAAG,UAAU,GACrB,EAAE,EAAE,CAAC,CACJ,YACE,SAAS,EAAE,GAAG,cAAc,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,CAAC,IAAI,SAAS,EAAE,EAClE,IAAI,EAAE,IAAI,EACV,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,OAAO,EAChB,GAAG,EAAC,qBAAqB,gBACb,SAAS,YAErB,eAAM,SAAS,EAAE,cAAc,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,CAAC,YAAG,IAAI,IAAI,QAAQ,GAAQ,GAC/E,CACL,CACF,CAAC;AAEF,MAAM,cAAc,GAAG,CAAC,OAAuB,EAAE,MAAgB,EAAE,IAAc,EAAE,EAAE;IACnF,IAAI,OAAO,GAAG,oBAAoB,CAAC;IACnC,IAAI,MAAM,EAAE;QACV,OAAO,GAAG,cAAc,OAAO,KAAK,UAAU,CAAC,CAAC,CAAC,qBAAqB,CAAC,CAAC,CAAC,cAAc,EAAE,CAAC;KAC3F;IAED,OAAO,GAAG,OAAO,IAAI,YAAY,IAAI,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC;AACjE,CAAC,CAAC;AAEF,MAAM,cAAc,GAAG,CAAC,OAAuB,EAAE,MAAgB,EAAE,IAAc,EAAE,EAAE;IACnF,IAAI,OAAO,GAAG,YAAY,CAAC;IAC3B,IAAI,OAAO,KAAK,UAAU,EAAE;QAC1B,OAAO,GAAG,MAAM;YACd,CAAC,CAAC,mBAAmB;YACrB,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,mBAAmB,CAAC,CAAC,CAAC,qBAAqB,0BAA0B,CAAC;KACrF;IAED,OAAO,GAAG,OAAO,IAAI,YAAY,EAAE,CAAC;AACtC,CAAC,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { getOrigin, isURL } from './url.js';
|
|
2
|
+
import { MOBILE_URL_PATH } from './withoutMobilePath.js';
|
|
3
|
+
export const adjustHref = (href, router) => {
|
|
4
|
+
if (!href) {
|
|
5
|
+
return href;
|
|
6
|
+
}
|
|
7
|
+
const relativeHref = toRelativeHref(href, router) || '';
|
|
8
|
+
const isMobilePage = router?.pathname.startsWith(MOBILE_URL_PATH);
|
|
9
|
+
return isMobilePage && !isURL(relativeHref) ? `${MOBILE_URL_PATH}${relativeHref}` : relativeHref;
|
|
10
|
+
};
|
|
11
|
+
const toRelativeHref = (href, router) => {
|
|
12
|
+
if (!href) {
|
|
13
|
+
return href;
|
|
14
|
+
}
|
|
15
|
+
const origin = getOrigin(router?.href);
|
|
16
|
+
return origin ? href.replace(origin, '') || '/' : href;
|
|
17
|
+
};
|
|
18
|
+
//# sourceMappingURL=adjustHref.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"adjustHref.js","sourceRoot":"","sources":["../../src/utils/adjustHref.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,OAAO,CAAC;AACzC,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAEtD,MAAM,CAAC,MAAM,UAAU,GAAG,CACxB,IAAwB,EACxB,MAA2C,EAC3C,EAAE;IACF,IAAI,CAAC,IAAI,EAAE;QACT,OAAO,IAAI,CAAC;KACb;IAED,MAAM,YAAY,GAAG,cAAc,CAAC,IAAI,EAAE,MAAM,CAAC,IAAI,EAAE,CAAC;IACxD,MAAM,YAAY,GAAG,MAAM,EAAE,QAAQ,CAAC,UAAU,CAAC,eAAe,CAAC,CAAC;IAClE,OAAO,YAAY,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,GAAG,eAAe,GAAG,YAAY,EAAE,CAAC,CAAC,CAAC,YAAY,CAAC;AACnG,CAAC,CAAC;AAEF,MAAM,cAAc,GAAG,CAAC,IAAwB,EAAE,MAAyB,EAAE,EAAE;IAC7E,IAAI,CAAC,IAAI,EAAE;QACT,OAAO,IAAI,CAAC;KACb;IAED,MAAM,MAAM,GAAG,SAAS,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;IACvC,OAAO,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC,IAAI,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC;AACzD,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"maxBy.js","sourceRoot":"","sources":["../../src/utils/maxBy.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,KAAK,GAChB,CAAc,aAAoC,EAAE,EAAE,CACtD,CAAC,IAAY,EAAQ,EAAE,CACrB,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,GAAG,aAAa,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AAE9E,MAAM,CAAC,MAAM,KAAK,GAAG,CAAc,aAAoC,EAAE,EAAE,CACzE,KAAK,CAAC,CAAC,CAAO,EAAE,EAAE,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,CAAC"}
|
package/lib/utils/url.d.ts
CHANGED
|
@@ -1,16 +1,3 @@
|
|
|
1
|
-
export declare const MOBILE_URL_PATH = "/mobile";
|
|
2
1
|
export declare const isURL: (href?: string) => boolean | undefined;
|
|
3
|
-
export declare const isHrefActive: (href: string | undefined, router: {
|
|
4
|
-
pathname?: string | undefined;
|
|
5
|
-
href?: string | undefined;
|
|
6
|
-
}, cmp?: (href: string, baseHref: string) => boolean) => boolean;
|
|
7
2
|
export declare const withoutQuery: (href?: string) => string;
|
|
8
|
-
export declare const withoutMobilePath: (href?: string) => string;
|
|
9
3
|
export declare const getOrigin: (href?: string) => string | undefined;
|
|
10
|
-
export declare const adjustHref: (href: string | undefined, router: {
|
|
11
|
-
pathname: string;
|
|
12
|
-
href?: string | undefined;
|
|
13
|
-
}) => string | undefined;
|
|
14
|
-
export declare const toRelativeHref: (href: string | undefined, router: {
|
|
15
|
-
href?: string | undefined;
|
|
16
|
-
}) => string | undefined;
|
package/lib/utils/url.js
CHANGED
|
@@ -1,12 +1,7 @@
|
|
|
1
|
-
export const MOBILE_URL_PATH = '/mobile';
|
|
2
1
|
export const isURL = (href) => href?.includes('//');
|
|
3
|
-
export const isHrefActive = (href, router, cmp = (href, baseHref) => href === baseHref) => {
|
|
4
|
-
return cmp(withoutQuery(href), withoutMobilePath(withoutQuery(isURL(href) ? router.href : router.pathname)));
|
|
5
|
-
};
|
|
6
2
|
export const withoutQuery = (href) => (href || '').replace(/\/?\?.*/, '');
|
|
7
|
-
export const withoutMobilePath = (href) => (href || '').replace(MOBILE_URL_PATH, '');
|
|
8
3
|
export const getOrigin = (href) => {
|
|
9
|
-
if (!isURL(href)) {
|
|
4
|
+
if (!href || !isURL(href)) {
|
|
10
5
|
return undefined;
|
|
11
6
|
}
|
|
12
7
|
const url = href;
|
|
@@ -15,19 +10,4 @@ export const getOrigin = (href) => {
|
|
|
15
10
|
const endOfOrigin = url.indexOf('/', endOfProto + protoSeparator.length);
|
|
16
11
|
return endOfOrigin !== -1 ? url.substring(0, endOfOrigin) : url;
|
|
17
12
|
};
|
|
18
|
-
export const adjustHref = (href, router) => {
|
|
19
|
-
if (!href) {
|
|
20
|
-
return href;
|
|
21
|
-
}
|
|
22
|
-
const relativeHref = toRelativeHref(href, router);
|
|
23
|
-
const isMobilePage = router?.pathname.startsWith(MOBILE_URL_PATH);
|
|
24
|
-
return isMobilePage && !isURL(relativeHref) ? `${MOBILE_URL_PATH}${relativeHref}` : relativeHref;
|
|
25
|
-
};
|
|
26
|
-
export const toRelativeHref = (href, router) => {
|
|
27
|
-
if (!href) {
|
|
28
|
-
return href;
|
|
29
|
-
}
|
|
30
|
-
const origin = getOrigin(router?.href);
|
|
31
|
-
return origin ? href.replace(origin, '') || '/' : href;
|
|
32
|
-
};
|
|
33
13
|
//# sourceMappingURL=url.js.map
|
package/lib/utils/url.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"url.js","sourceRoot":"","sources":["../../src/utils/url.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,
|
|
1
|
+
{"version":3,"file":"url.js","sourceRoot":"","sources":["../../src/utils/url.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,KAAK,GAAG,CAAC,IAAa,EAAE,EAAE,CAAC,IAAI,EAAE,QAAQ,CAAC,IAAI,CAAC,CAAC;AAE7D,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,IAAa,EAAE,EAAE,CAAC,CAAC,IAAI,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,SAAS,EAAE,EAAE,CAAC,CAAC;AAEnF,MAAM,CAAC,MAAM,SAAS,GAAG,CAAC,IAAa,EAAE,EAAE;IACzC,IAAI,CAAC,IAAI,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE;QACzB,OAAO,SAAS,CAAC;KAClB;IAED,MAAM,GAAG,GAAG,IAAI,CAAC;IACjB,MAAM,cAAc,GAAG,IAAI,CAAC;IAC5B,MAAM,UAAU,GAAG,GAAG,CAAC,OAAO,CAAC,cAAc,CAAC,CAAC;IAC/C,MAAM,WAAW,GAAG,GAAG,CAAC,OAAO,CAAC,GAAG,EAAE,UAAU,GAAG,cAAc,CAAC,MAAM,CAAC,CAAC;IACzE,OAAO,WAAW,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC,EAAE,WAAW,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC;AAClE,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"withoutMobilePath.js","sourceRoot":"","sources":["../../src/utils/withoutMobilePath.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,eAAe,GAAG,SAAS,CAAC;AAEzC,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,IAAa,EAAE,EAAE,CAAC,CAAC,IAAI,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,eAAe,EAAE,EAAE,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@redneckz/wildless-cms-uni-blocks",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.105",
|
|
4
4
|
"private": false,
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "ЦК",
|
|
@@ -142,7 +142,9 @@
|
|
|
142
142
|
],
|
|
143
143
|
"lint-staged": {
|
|
144
144
|
"src/**/*.{js,jsx,ts,tsx,css}": [
|
|
145
|
-
"prettier --write"
|
|
145
|
+
"prettier --write"
|
|
146
|
+
],
|
|
147
|
+
"src/**/*.{js,jsx,ts,tsx}": [
|
|
146
148
|
"eslint"
|
|
147
149
|
],
|
|
148
150
|
"*.{js,jsx,ts,tsx,css,json}": [
|
|
@@ -6,6 +6,7 @@ import type { GalleryContent } from './Gallery/GalleryContent';
|
|
|
6
6
|
import type { HeaderContent } from './Header/HeaderContent';
|
|
7
7
|
import type { LinkDocsContent } from './LinkDocs/LinkDocsContent';
|
|
8
8
|
import type { MobileAppTileContent } from './MobileAppTile/MobileAppTileContent';
|
|
9
|
+
import type { NavigationContent } from './Navigation/NavigationContent';
|
|
9
10
|
import type { PictureTextContent } from './PictureText/PictureTextContent';
|
|
10
11
|
import type { PlaceholderContent } from './Placeholder/PlaceholderContent';
|
|
11
12
|
import type { ProductBlockContent } from './ProductBlock/ProductBlockContent';
|
|
@@ -13,9 +14,9 @@ import type { ProductGalleryContent } from './ProductGallery/ProductGalleryConte
|
|
|
13
14
|
import type { ProductTileContent } from './ProductTile/ProductTileContent';
|
|
14
15
|
import type { PromoTileContent } from './PromoTile/PromoTileContent';
|
|
15
16
|
import type { StepsBlockContent } from './StepsBlock/StepsBlockContent';
|
|
17
|
+
import type { TariffsTableContent } from './TariffsTable/TariffsTableContent';
|
|
16
18
|
import type { TextBlockContent } from './TextBlock/TextBlockContent';
|
|
17
19
|
import type { TileContent } from './Tile/TileContent';
|
|
18
|
-
import { TariffsTableContent } from './TariffsTable/TariffsTableContent';
|
|
19
20
|
|
|
20
21
|
/**
|
|
21
22
|
* @hidden
|
|
@@ -38,4 +39,5 @@ export type BlockContent =
|
|
|
38
39
|
| StepsBlockContent
|
|
39
40
|
| TariffsTableContent
|
|
40
41
|
| TextBlockContent
|
|
41
|
-
| TileContent
|
|
42
|
+
| TileContent
|
|
43
|
+
| NavigationContent;
|
package/src/components/Blocks.ts
CHANGED
|
@@ -10,6 +10,7 @@ import { Headline } from './Headline/Headline';
|
|
|
10
10
|
import { LinkDocs } from './LinkDocs/LinkDocs';
|
|
11
11
|
import { MiniGallery } from './MiniGallery/MiniGallery';
|
|
12
12
|
import { MobileAppTile } from './MobileAppTile/MobileAppTile';
|
|
13
|
+
import { Navigation } from './Navigation/Navigation';
|
|
13
14
|
import { PictureText } from './PictureText/PictureText';
|
|
14
15
|
import { Placeholder } from './Placeholder/Placeholder';
|
|
15
16
|
import { ProductBlock } from './ProductBlock/ProductBlock';
|
|
@@ -44,4 +45,5 @@ export const Blocks = {
|
|
|
44
45
|
TariffsTable,
|
|
45
46
|
TextBlock,
|
|
46
47
|
Tile,
|
|
48
|
+
Navigation,
|
|
47
49
|
};
|
|
@@ -18,25 +18,38 @@
|
|
|
18
18
|
"type": "Header",
|
|
19
19
|
"style": ["-mx-20", "mb-5", "shadow-[0_8px_32px_0px_#00000014]"],
|
|
20
20
|
"content": {
|
|
21
|
-
"defaultLocation": "Москва"
|
|
22
|
-
"topItems": [
|
|
23
|
-
{
|
|
24
|
-
"href": "https://rshb.ru/",
|
|
25
|
-
"text": "Бизнес клиентам",
|
|
26
|
-
"target": "_blank"
|
|
27
|
-
},
|
|
28
|
-
{
|
|
29
|
-
"href": "https://rshb.ru/",
|
|
30
|
-
"text": "Частным клиентам",
|
|
31
|
-
"target": "_blank"
|
|
32
|
-
}
|
|
33
|
-
]
|
|
21
|
+
"defaultLocation": "Москва"
|
|
34
22
|
}
|
|
35
23
|
}
|
|
36
24
|
]
|
|
37
25
|
}
|
|
38
26
|
},
|
|
39
27
|
"blocks": [
|
|
28
|
+
{
|
|
29
|
+
"type": "Navigation",
|
|
30
|
+
"style": ["col-span-12"],
|
|
31
|
+
"content": {
|
|
32
|
+
"title": "Потребительский кредит наличными",
|
|
33
|
+
"buttons": [
|
|
34
|
+
{
|
|
35
|
+
"href": "/credits",
|
|
36
|
+
"text": "Оформить"
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
"href": "/tariffs",
|
|
40
|
+
"text": "Тарифы"
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
"href": "/harvest",
|
|
44
|
+
"text": "Урожай"
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
"href": "/faq",
|
|
48
|
+
"text": "Частые вопросы"
|
|
49
|
+
}
|
|
50
|
+
]
|
|
51
|
+
}
|
|
52
|
+
},
|
|
40
53
|
{
|
|
41
54
|
"type": "ProductGallery",
|
|
42
55
|
"style": ["col-span-12"],
|
|
@@ -95,8 +108,8 @@
|
|
|
95
108
|
}
|
|
96
109
|
],
|
|
97
110
|
"image": {
|
|
98
|
-
"src": "
|
|
99
|
-
"title": "
|
|
111
|
+
"src": "money-2.png",
|
|
112
|
+
"title": "Деньги",
|
|
100
113
|
"format": "webp",
|
|
101
114
|
"alt": "Кредит наличными",
|
|
102
115
|
"size": {
|
|
@@ -1843,7 +1856,7 @@
|
|
|
1843
1856
|
{
|
|
1844
1857
|
"label": "Кредит на общих условиях",
|
|
1845
1858
|
"description": "До 5 млн ₽ на общих условиях получения кредита",
|
|
1846
|
-
"icon": "
|
|
1859
|
+
"icon": "DocumentTextIcon"
|
|
1847
1860
|
}
|
|
1848
1861
|
],
|
|
1849
1862
|
"image": {
|
|
@@ -1857,6 +1870,10 @@
|
|
|
1857
1870
|
}
|
|
1858
1871
|
}
|
|
1859
1872
|
},
|
|
1873
|
+
{
|
|
1874
|
+
"type": "CreditCalculator",
|
|
1875
|
+
"style": ["col-span-12"]
|
|
1876
|
+
},
|
|
1860
1877
|
{
|
|
1861
1878
|
"type": "Footer",
|
|
1862
1879
|
"style": ["col-span-12"],
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { JSX } from '@redneckz/uni-jsx';
|
|
2
2
|
import { useLink } from '../../hooks/useLink';
|
|
3
|
-
import { useSitemap } from '../../hooks/useSitemap';
|
|
4
|
-
import { mergeTopItems } from '../../mergeTopItems';
|
|
5
3
|
import type { LinkProps } from '../../model/LinkProps';
|
|
6
|
-
import
|
|
4
|
+
import { mergeTopItems } from '../../services/sitemap/mergeTopItems';
|
|
5
|
+
import type { TopMenuItem } from '../../services/sitemap/SitemapProps';
|
|
6
|
+
import { useSitemap } from '../../services/sitemap/useSitemap';
|
|
7
7
|
import type { UniBlockProps } from '../../types';
|
|
8
|
+
|
|
8
9
|
export interface SitemapProps extends UniBlockProps {
|
|
9
10
|
items?: TopMenuItem[];
|
|
10
11
|
}
|
|
@@ -1,21 +1,7 @@
|
|
|
1
1
|
import { context } from '../../setup-fixture';
|
|
2
2
|
import { Header } from './Header';
|
|
3
3
|
|
|
4
|
-
export default
|
|
5
|
-
<Header
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
topItems={[
|
|
9
|
-
{
|
|
10
|
-
href: 'https://rshb.ru/',
|
|
11
|
-
text: 'Бизнес клиентам',
|
|
12
|
-
target: '_blank',
|
|
13
|
-
},
|
|
14
|
-
{
|
|
15
|
-
href: 'https://rshb.ru/',
|
|
16
|
-
text: 'Частным клиентам',
|
|
17
|
-
target: '_blank',
|
|
18
|
-
},
|
|
19
|
-
]}
|
|
20
|
-
/>
|
|
21
|
-
);
|
|
4
|
+
export default {
|
|
5
|
+
default: <Header context={context} defaultLocation="Москва" />,
|
|
6
|
+
transparent: <Header context={context} defaultLocation="Москва" bgColor="transparent" />,
|
|
7
|
+
};
|
|
@@ -1,61 +1,72 @@
|
|
|
1
1
|
import { JSX } from '@redneckz/uni-jsx';
|
|
2
2
|
import { useLink } from '../../hooks/useLink';
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
3
|
+
import type { BgColorVersion } from '../../model/BgColorVersion';
|
|
4
|
+
import { findActiveSubItem } from '../../services/sitemap/findActiveSubItem';
|
|
5
|
+
import { isTopItemActive } from '../../services/sitemap/isTopItemActive';
|
|
6
|
+
import { mergeTopItems } from '../../services/sitemap/mergeTopItems';
|
|
7
|
+
import { useSitemap } from '../../services/sitemap/useSitemap';
|
|
5
8
|
import type { UniBlockProps } from '../../types';
|
|
6
9
|
import { HeaderItem } from '../../ui-kit/HeaderItem/HeaderItem';
|
|
7
10
|
import { Logo } from '../../ui-kit/Logo/Logo';
|
|
8
11
|
import { TopItem } from '../../ui-kit/TopItem/TopItem';
|
|
9
12
|
import type { HeaderContent } from './HeaderContent';
|
|
10
13
|
import { HeaderSecondaryMenu } from './HeaderSecondaryMenu';
|
|
11
|
-
|
|
12
|
-
|
|
14
|
+
|
|
15
|
+
const BORDER_COLORS: Record<BgColorVersion, string> = {
|
|
16
|
+
'bg-white': 'bg-main-divider',
|
|
17
|
+
transparent: 'bg-main-divider opacity-30',
|
|
18
|
+
};
|
|
13
19
|
|
|
14
20
|
export interface HeaderProps extends HeaderContent, UniBlockProps {}
|
|
15
21
|
|
|
16
|
-
export const Header = JSX<HeaderProps>(
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
22
|
+
export const Header = JSX<HeaderProps>(
|
|
23
|
+
({ className, defaultLocation, bgColor = 'bg-white', context, topItems }) => {
|
|
24
|
+
const router = context.useRouter();
|
|
25
|
+
const sitemap = useSitemap(context.useAsyncData);
|
|
26
|
+
const { handlerDecorator } = context;
|
|
20
27
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
28
|
+
const mergedItems = mergeTopItems(sitemap.topItems, topItems);
|
|
29
|
+
const activeTopItem = mergedItems.find(isTopItemActive(router));
|
|
30
|
+
const subItems = activeTopItem?.items;
|
|
31
|
+
const activeSubItem = findActiveSubItem(router)(subItems);
|
|
25
32
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
33
|
+
const topMenu = mergedItems.map((_, i) => (
|
|
34
|
+
<TopItem
|
|
35
|
+
key={String(i)}
|
|
36
|
+
active={_ === activeTopItem}
|
|
37
|
+
{...useLink({ router, handlerDecorator }, _)}
|
|
38
|
+
ariaLabel={_.text}
|
|
39
|
+
bgColor={bgColor}
|
|
40
|
+
/>
|
|
41
|
+
));
|
|
34
42
|
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
+
const subMenu = subItems?.map((_) => (
|
|
44
|
+
<HeaderItem
|
|
45
|
+
key={_.href}
|
|
46
|
+
className="mr-8"
|
|
47
|
+
active={_ === activeSubItem}
|
|
48
|
+
{...useLink({ router, handlerDecorator }, _)}
|
|
49
|
+
bgColor={bgColor}
|
|
50
|
+
/>
|
|
51
|
+
));
|
|
43
52
|
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
53
|
+
return (
|
|
54
|
+
<header className={`pt-5 pb-8 px-20 ${bgColor} ${className || ''}`}>
|
|
55
|
+
<div className="container">
|
|
56
|
+
<div className="flex items-center">
|
|
57
|
+
<Logo className="mr-8" bgColor={bgColor} />
|
|
58
|
+
{topMenu}
|
|
59
|
+
<HeaderSecondaryMenu
|
|
60
|
+
context={context}
|
|
61
|
+
className="ml-auto"
|
|
62
|
+
defaultLocation={defaultLocation}
|
|
63
|
+
bgColor={bgColor}
|
|
64
|
+
/>
|
|
65
|
+
</div>
|
|
66
|
+
<div className={`mt-5 h-[1px] ${BORDER_COLORS[bgColor]}`} />
|
|
67
|
+
<nav className="mt-5">{subMenu}</nav>
|
|
55
68
|
</div>
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
);
|
|
61
|
-
});
|
|
69
|
+
</header>
|
|
70
|
+
);
|
|
71
|
+
},
|
|
72
|
+
);
|