@redneckz/wildless-cms-uni-blocks 0.7.5 → 0.7.7
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 +189 -78
- package/bundle/bundle.umd.min.js +1 -1
- package/bundle/components/CarouselRecommendationCard/CarouselRecommendationCardContent.d.ts +5 -9
- package/bundle/components/Footer/MediaButton.d.ts +3 -4
- package/bundle/components/Footer/SocialMedia.d.ts +2 -3
- package/bundle/components/Header/HeaderChatBotButton.d.ts +11 -0
- package/bundle/components/Header/HeaderContent.d.ts +6 -1
- package/bundle/components/Header/HeaderSecondaryMenu.d.ts +2 -0
- package/bundle/components/Header/HeaderSecondaryMenuButton.d.ts +7 -2
- package/bundle/components/Header/useChatBot.d.ts +2 -0
- package/bundle/components/Tabs/LinkTab.d.ts +1 -0
- package/bundle/components/Tabs/ScrollableTabs.d.ts +8 -0
- package/bundle/components/Tabs/TabsContent.d.ts +12 -0
- package/bundle/components/Tabs/renderGroupTab.d.ts +2 -2
- package/bundle/components/Tabs/renderTab.d.ts +2 -1
- package/bundle/components/Tabs/tabItemClasses.d.ts +6 -1
- package/bundle/hooks/useBool.d.ts +9 -0
- package/bundle/icons/IconName.d.ts +4 -2
- package/bundle/model/ButtonVersion.d.ts +2 -2
- package/cosmos-static/icons/HeadphonesIcon.svg +1 -0
- package/dist/components/CarouselCatalogCard/CarouselCatalogCard.js +1 -1
- package/dist/components/CarouselCatalogCard/CarouselCatalogCard.js.map +1 -1
- package/dist/components/CarouselProductCard/CarouselProductCard.js +1 -1
- package/dist/components/CarouselProductCard/CarouselProductCard.js.map +1 -1
- package/dist/components/CarouselRecommendationCard/CarouselRecommendationCard.js +2 -2
- package/dist/components/CarouselRecommendationCard/CarouselRecommendationCard.js.map +1 -1
- package/dist/components/CarouselRecommendationCard/CarouselRecommendationCardContent.d.ts +5 -9
- package/dist/components/Footer/Footer.js +2 -2
- package/dist/components/Footer/Footer.js.map +1 -1
- package/dist/components/Footer/Footer.mobile.js.map +1 -1
- package/dist/components/Footer/MediaButton.d.ts +3 -4
- package/dist/components/Footer/MediaButton.js +4 -5
- package/dist/components/Footer/MediaButton.js.map +1 -1
- package/dist/components/Footer/SocialMedia.d.ts +2 -3
- package/dist/components/Footer/SocialMedia.js +1 -1
- package/dist/components/Footer/SocialMedia.js.map +1 -1
- package/dist/components/Header/DropdownMenu.js +3 -2
- package/dist/components/Header/DropdownMenu.js.map +1 -1
- package/dist/components/Header/Header.js +3 -2
- package/dist/components/Header/Header.js.map +1 -1
- package/dist/components/Header/HeaderChatBotButton.d.ts +11 -0
- package/dist/components/Header/HeaderChatBotButton.js +19 -0
- package/dist/components/Header/HeaderChatBotButton.js.map +1 -0
- package/dist/components/Header/HeaderContent.d.ts +6 -1
- package/dist/components/Header/HeaderSecondaryMenu.d.ts +2 -0
- package/dist/components/Header/HeaderSecondaryMenu.js +6 -11
- package/dist/components/Header/HeaderSecondaryMenu.js.map +1 -1
- package/dist/components/Header/HeaderSecondaryMenuButton.d.ts +7 -2
- package/dist/components/Header/HeaderSecondaryMenuButton.js +5 -1
- package/dist/components/Header/HeaderSecondaryMenuButton.js.map +1 -1
- package/dist/components/Header/useChatBot.d.ts +2 -0
- package/dist/components/Header/useChatBot.js +15 -0
- package/dist/components/Header/useChatBot.js.map +1 -0
- package/dist/components/Tabs/LinkTab.d.ts +1 -0
- package/dist/components/Tabs/LinkTab.js +2 -2
- package/dist/components/Tabs/LinkTab.js.map +1 -1
- package/dist/components/Tabs/ScrollableTabs.d.ts +8 -0
- package/dist/components/Tabs/ScrollableTabs.js +24 -0
- package/dist/components/Tabs/ScrollableTabs.js.map +1 -0
- package/dist/components/Tabs/Tabs.js +9 -2
- package/dist/components/Tabs/Tabs.js.map +1 -1
- package/dist/components/Tabs/TabsContent.d.ts +12 -0
- package/dist/components/Tabs/renderGroupTab.d.ts +2 -2
- package/dist/components/Tabs/renderGroupTab.js +12 -4
- package/dist/components/Tabs/renderGroupTab.js.map +1 -1
- package/dist/components/Tabs/renderTab.d.ts +2 -1
- package/dist/components/Tabs/renderTab.js +4 -6
- package/dist/components/Tabs/renderTab.js.map +1 -1
- package/dist/components/Tabs/tabItemClasses.d.ts +6 -1
- package/dist/components/Tabs/tabItemClasses.js +61 -2
- package/dist/components/Tabs/tabItemClasses.js.map +1 -1
- package/dist/hooks/useBool.d.ts +9 -0
- package/dist/hooks/useBool.js +12 -0
- package/dist/hooks/useBool.js.map +1 -0
- package/dist/icons/IconName.d.ts +4 -2
- package/dist/icons/IconName.js +3 -1
- package/dist/icons/IconName.js.map +1 -1
- package/dist/model/ButtonVersion.d.ts +2 -2
- package/dist/setup-fixture.js +0 -1
- package/dist/setup-fixture.js.map +1 -1
- package/dist/ui-kit/Button/buttonClassNameConstants.js +3 -0
- package/dist/ui-kit/Button/buttonClassNameConstants.js.map +1 -1
- package/lib/common.css +1 -1
- package/lib/components/CarouselCatalogCard/CarouselCatalogCard.js +1 -1
- package/lib/components/CarouselCatalogCard/CarouselCatalogCard.js.map +1 -1
- package/lib/components/CarouselProductCard/CarouselProductCard.js +1 -1
- package/lib/components/CarouselProductCard/CarouselProductCard.js.map +1 -1
- package/lib/components/CarouselRecommendationCard/CarouselRecommendationCard.js +2 -2
- package/lib/components/CarouselRecommendationCard/CarouselRecommendationCard.js.map +1 -1
- package/lib/components/CarouselRecommendationCard/CarouselRecommendationCardContent.d.ts +5 -9
- package/lib/components/Footer/Footer.js +2 -2
- package/lib/components/Footer/Footer.js.map +1 -1
- package/lib/components/Footer/Footer.mobile.js.map +1 -1
- package/lib/components/Footer/MediaButton.d.ts +3 -4
- package/lib/components/Footer/MediaButton.js +4 -5
- package/lib/components/Footer/MediaButton.js.map +1 -1
- package/lib/components/Footer/SocialMedia.d.ts +2 -3
- package/lib/components/Footer/SocialMedia.js +1 -1
- package/lib/components/Footer/SocialMedia.js.map +1 -1
- package/lib/components/Header/DropdownMenu.js +3 -2
- package/lib/components/Header/DropdownMenu.js.map +1 -1
- package/lib/components/Header/Header.js +3 -2
- package/lib/components/Header/Header.js.map +1 -1
- package/lib/components/Header/HeaderChatBotButton.d.ts +11 -0
- package/lib/components/Header/HeaderChatBotButton.js +17 -0
- package/lib/components/Header/HeaderChatBotButton.js.map +1 -0
- package/lib/components/Header/HeaderContent.d.ts +6 -1
- package/lib/components/Header/HeaderSecondaryMenu.d.ts +2 -0
- package/lib/components/Header/HeaderSecondaryMenu.js +6 -11
- package/lib/components/Header/HeaderSecondaryMenu.js.map +1 -1
- package/lib/components/Header/HeaderSecondaryMenuButton.d.ts +7 -2
- package/lib/components/Header/HeaderSecondaryMenuButton.js +5 -1
- package/lib/components/Header/HeaderSecondaryMenuButton.js.map +1 -1
- package/lib/components/Header/useChatBot.d.ts +2 -0
- package/lib/components/Header/useChatBot.js +12 -0
- package/lib/components/Header/useChatBot.js.map +1 -0
- package/lib/components/Tabs/LinkTab.d.ts +1 -0
- package/lib/components/Tabs/LinkTab.js +3 -3
- package/lib/components/Tabs/LinkTab.js.map +1 -1
- package/lib/components/Tabs/ScrollableTabs.d.ts +8 -0
- package/lib/components/Tabs/ScrollableTabs.js +22 -0
- package/lib/components/Tabs/ScrollableTabs.js.map +1 -0
- package/lib/components/Tabs/Tabs.fixture.d.ts +1 -0
- package/lib/components/Tabs/Tabs.js +9 -2
- package/lib/components/Tabs/Tabs.js.map +1 -1
- package/lib/components/Tabs/TabsContent.d.ts +12 -0
- package/lib/components/Tabs/renderGroupTab.d.ts +2 -2
- package/lib/components/Tabs/renderGroupTab.js +13 -5
- package/lib/components/Tabs/renderGroupTab.js.map +1 -1
- package/lib/components/Tabs/renderTab.d.ts +2 -1
- package/lib/components/Tabs/renderTab.js +4 -6
- package/lib/components/Tabs/renderTab.js.map +1 -1
- package/lib/components/Tabs/tabItemClasses.d.ts +6 -1
- package/lib/components/Tabs/tabItemClasses.js +58 -1
- package/lib/components/Tabs/tabItemClasses.js.map +1 -1
- package/lib/hooks/useBool.d.ts +9 -0
- package/lib/hooks/useBool.js +9 -0
- package/lib/hooks/useBool.js.map +1 -0
- package/lib/icons/IconName.d.ts +4 -2
- package/lib/icons/IconName.js +3 -1
- package/lib/icons/IconName.js.map +1 -1
- package/lib/model/ButtonVersion.d.ts +2 -2
- package/lib/setup-fixture.js +0 -1
- package/lib/setup-fixture.js.map +1 -1
- package/lib/ui-kit/Button/buttonClassNameConstants.js +3 -0
- package/lib/ui-kit/Button/buttonClassNameConstants.js.map +1 -1
- package/mobile/bundle/bundle.umd.js +7 -5
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/bundle/components/CarouselRecommendationCard/CarouselRecommendationCardContent.d.ts +5 -9
- package/mobile/bundle/components/Footer/MediaButton.d.ts +3 -4
- package/mobile/bundle/components/Header/HeaderChatBotButton.d.ts +11 -0
- package/mobile/bundle/components/Header/HeaderContent.d.ts +6 -1
- package/mobile/bundle/components/Header/HeaderSecondaryMenu.d.ts +2 -0
- package/mobile/bundle/components/Header/HeaderSecondaryMenuButton.d.ts +7 -2
- package/mobile/bundle/components/Header/useChatBot.d.ts +2 -0
- package/mobile/bundle/components/Tabs/LinkTab.d.ts +1 -0
- package/mobile/bundle/components/Tabs/ScrollableTabs.d.ts +8 -0
- package/mobile/bundle/components/Tabs/TabsContent.d.ts +12 -0
- package/mobile/bundle/components/Tabs/renderGroupTab.d.ts +2 -2
- package/mobile/bundle/components/Tabs/renderTab.d.ts +2 -1
- package/mobile/bundle/components/Tabs/tabItemClasses.d.ts +6 -1
- package/mobile/bundle/hooks/useBool.d.ts +9 -0
- package/mobile/bundle/icons/IconName.d.ts +4 -2
- package/mobile/bundle/model/ButtonVersion.d.ts +2 -2
- package/mobile/dist/components/CarouselCatalogCard/CarouselCatalogCard.js +1 -1
- package/mobile/dist/components/CarouselCatalogCard/CarouselCatalogCard.js.map +1 -1
- package/mobile/dist/components/CarouselProductCard/CarouselProductCard.js +1 -1
- package/mobile/dist/components/CarouselProductCard/CarouselProductCard.js.map +1 -1
- package/mobile/dist/components/CarouselRecommendationCard/CarouselRecommendationCard.js +2 -2
- package/mobile/dist/components/CarouselRecommendationCard/CarouselRecommendationCard.js.map +1 -1
- package/mobile/dist/components/CarouselRecommendationCard/CarouselRecommendationCardContent.d.ts +5 -9
- package/mobile/dist/components/Footer/Footer.js.map +1 -1
- package/mobile/dist/components/Footer/MediaButton.d.ts +3 -4
- package/mobile/dist/components/Footer/MediaButton.js +4 -5
- package/mobile/dist/components/Footer/MediaButton.js.map +1 -1
- package/mobile/dist/components/Header/DropdownMenu.js +3 -2
- package/mobile/dist/components/Header/DropdownMenu.js.map +1 -1
- package/mobile/dist/components/Header/HeaderChatBotButton.d.ts +11 -0
- package/mobile/dist/components/Header/HeaderChatBotButton.js +19 -0
- package/mobile/dist/components/Header/HeaderChatBotButton.js.map +1 -0
- package/mobile/dist/components/Header/HeaderContent.d.ts +6 -1
- package/mobile/dist/components/Header/HeaderSecondaryMenu.d.ts +2 -0
- package/mobile/dist/components/Header/HeaderSecondaryMenu.js +6 -11
- package/mobile/dist/components/Header/HeaderSecondaryMenu.js.map +1 -1
- package/mobile/dist/components/Header/HeaderSecondaryMenuButton.d.ts +7 -2
- package/mobile/dist/components/Header/HeaderSecondaryMenuButton.js +5 -1
- package/mobile/dist/components/Header/HeaderSecondaryMenuButton.js.map +1 -1
- package/mobile/dist/components/Header/useChatBot.d.ts +2 -0
- package/mobile/dist/components/Header/useChatBot.js +15 -0
- package/mobile/dist/components/Header/useChatBot.js.map +1 -0
- package/mobile/dist/components/Tabs/LinkTab.d.ts +1 -0
- package/mobile/dist/components/Tabs/LinkTab.js +2 -2
- package/mobile/dist/components/Tabs/LinkTab.js.map +1 -1
- package/mobile/dist/components/Tabs/ScrollableTabs.d.ts +8 -0
- package/mobile/dist/components/Tabs/ScrollableTabs.js +24 -0
- package/mobile/dist/components/Tabs/ScrollableTabs.js.map +1 -0
- package/mobile/dist/components/Tabs/Tabs.js +9 -2
- package/mobile/dist/components/Tabs/Tabs.js.map +1 -1
- package/mobile/dist/components/Tabs/TabsContent.d.ts +12 -0
- package/mobile/dist/components/Tabs/renderGroupTab.d.ts +2 -2
- package/mobile/dist/components/Tabs/renderGroupTab.js +12 -4
- package/mobile/dist/components/Tabs/renderGroupTab.js.map +1 -1
- package/mobile/dist/components/Tabs/renderTab.d.ts +2 -1
- package/mobile/dist/components/Tabs/renderTab.js +4 -6
- package/mobile/dist/components/Tabs/renderTab.js.map +1 -1
- package/mobile/dist/components/Tabs/tabItemClasses.d.ts +6 -1
- package/mobile/dist/components/Tabs/tabItemClasses.js +61 -2
- package/mobile/dist/components/Tabs/tabItemClasses.js.map +1 -1
- package/mobile/dist/hooks/useBool.d.ts +9 -0
- package/mobile/dist/hooks/useBool.js +12 -0
- package/mobile/dist/hooks/useBool.js.map +1 -0
- package/mobile/dist/icons/IconName.d.ts +4 -2
- package/mobile/dist/icons/IconName.js +3 -1
- package/mobile/dist/icons/IconName.js.map +1 -1
- package/mobile/dist/model/ButtonVersion.d.ts +2 -2
- package/mobile/dist/setup-fixture.js +0 -1
- package/mobile/dist/setup-fixture.js.map +1 -1
- package/mobile/dist/ui-kit/Button/buttonClassNameConstants.js +3 -0
- package/mobile/dist/ui-kit/Button/buttonClassNameConstants.js.map +1 -1
- package/mobile/lib/components/CarouselCatalogCard/CarouselCatalogCard.js +1 -1
- package/mobile/lib/components/CarouselCatalogCard/CarouselCatalogCard.js.map +1 -1
- package/mobile/lib/components/CarouselProductCard/CarouselProductCard.js +1 -1
- package/mobile/lib/components/CarouselProductCard/CarouselProductCard.js.map +1 -1
- package/mobile/lib/components/CarouselRecommendationCard/CarouselRecommendationCard.js +2 -2
- package/mobile/lib/components/CarouselRecommendationCard/CarouselRecommendationCard.js.map +1 -1
- package/mobile/lib/components/CarouselRecommendationCard/CarouselRecommendationCardContent.d.ts +5 -9
- package/mobile/lib/components/Footer/Footer.js.map +1 -1
- package/mobile/lib/components/Footer/MediaButton.d.ts +3 -4
- package/mobile/lib/components/Footer/MediaButton.js +4 -5
- package/mobile/lib/components/Footer/MediaButton.js.map +1 -1
- package/mobile/lib/components/Header/DropdownMenu.js +3 -2
- package/mobile/lib/components/Header/DropdownMenu.js.map +1 -1
- package/mobile/lib/components/Header/HeaderChatBotButton.d.ts +11 -0
- package/mobile/lib/components/Header/HeaderChatBotButton.js +17 -0
- package/mobile/lib/components/Header/HeaderChatBotButton.js.map +1 -0
- package/mobile/lib/components/Header/HeaderContent.d.ts +6 -1
- package/mobile/lib/components/Header/HeaderSecondaryMenu.d.ts +2 -0
- package/mobile/lib/components/Header/HeaderSecondaryMenu.js +6 -11
- package/mobile/lib/components/Header/HeaderSecondaryMenu.js.map +1 -1
- package/mobile/lib/components/Header/HeaderSecondaryMenuButton.d.ts +7 -2
- package/mobile/lib/components/Header/HeaderSecondaryMenuButton.js +5 -1
- package/mobile/lib/components/Header/HeaderSecondaryMenuButton.js.map +1 -1
- package/mobile/lib/components/Header/useChatBot.d.ts +2 -0
- package/mobile/lib/components/Header/useChatBot.js +12 -0
- package/mobile/lib/components/Header/useChatBot.js.map +1 -0
- package/mobile/lib/components/Tabs/LinkTab.d.ts +1 -0
- package/mobile/lib/components/Tabs/LinkTab.js +3 -3
- package/mobile/lib/components/Tabs/LinkTab.js.map +1 -1
- package/mobile/lib/components/Tabs/ScrollableTabs.d.ts +8 -0
- package/mobile/lib/components/Tabs/ScrollableTabs.js +22 -0
- package/mobile/lib/components/Tabs/ScrollableTabs.js.map +1 -0
- package/mobile/lib/components/Tabs/Tabs.js +9 -2
- package/mobile/lib/components/Tabs/Tabs.js.map +1 -1
- package/mobile/lib/components/Tabs/TabsContent.d.ts +12 -0
- package/mobile/lib/components/Tabs/renderGroupTab.d.ts +2 -2
- package/mobile/lib/components/Tabs/renderGroupTab.js +13 -5
- package/mobile/lib/components/Tabs/renderGroupTab.js.map +1 -1
- package/mobile/lib/components/Tabs/renderTab.d.ts +2 -1
- package/mobile/lib/components/Tabs/renderTab.js +4 -6
- package/mobile/lib/components/Tabs/renderTab.js.map +1 -1
- package/mobile/lib/components/Tabs/tabItemClasses.d.ts +6 -1
- package/mobile/lib/components/Tabs/tabItemClasses.js +58 -1
- package/mobile/lib/components/Tabs/tabItemClasses.js.map +1 -1
- package/mobile/lib/hooks/useBool.d.ts +9 -0
- package/mobile/lib/hooks/useBool.js +9 -0
- package/mobile/lib/hooks/useBool.js.map +1 -0
- package/mobile/lib/icons/IconName.d.ts +4 -2
- package/mobile/lib/icons/IconName.js +3 -1
- package/mobile/lib/icons/IconName.js.map +1 -1
- package/mobile/lib/model/ButtonVersion.d.ts +2 -2
- package/mobile/lib/setup-fixture.js +0 -1
- package/mobile/lib/setup-fixture.js.map +1 -1
- package/mobile/lib/ui-kit/Button/buttonClassNameConstants.js +3 -0
- package/mobile/lib/ui-kit/Button/buttonClassNameConstants.js.map +1 -1
- package/mobile/src/components/CarouselCatalogCard/CarouselCatalogCard.tsx +0 -1
- package/mobile/src/components/CarouselProductCard/CarouselProductCard.tsx +0 -1
- package/mobile/src/components/CarouselRecommendationCard/CarouselRecommendationCard.example.json +6 -3
- package/mobile/src/components/CarouselRecommendationCard/CarouselRecommendationCard.tsx +2 -0
- package/mobile/src/components/CarouselRecommendationCard/CarouselRecommendationCard.ui.json +7 -0
- package/mobile/src/components/CarouselRecommendationCard/CarouselRecommendationCardContent.ts +5 -9
- package/mobile/src/components/Footer/Footer.tsx +1 -1
- package/mobile/src/components/Footer/MediaButton.tsx +19 -17
- package/mobile/src/components/Header/DropdownMenu.tsx +7 -5
- package/mobile/src/components/Header/HeaderChatBotButton.tsx +45 -0
- package/mobile/src/components/Header/HeaderContent.ts +7 -1
- package/mobile/src/components/Header/HeaderSecondaryMenu.tsx +20 -30
- package/mobile/src/components/Header/HeaderSecondaryMenuButton.tsx +24 -5
- package/mobile/src/components/Header/useChatBot.ts +16 -0
- package/mobile/src/components/Tabs/LinkTab.tsx +5 -13
- package/mobile/src/components/Tabs/ScrollableTabs.tsx +55 -0
- package/mobile/src/components/Tabs/Tabs.tsx +26 -4
- package/mobile/src/components/Tabs/TabsContent.ts +13 -0
- package/mobile/src/components/Tabs/renderGroupTab.tsx +30 -20
- package/mobile/src/components/Tabs/renderTab.tsx +8 -5
- package/mobile/src/components/Tabs/tabItemClasses.ts +65 -1
- package/mobile/src/hooks/useBool.ts +19 -0
- package/mobile/src/icons/HeadphonesIcon.svg +5 -0
- package/mobile/src/icons/IconName.ts +5 -5
- package/mobile/src/model/ButtonVersion.ts +9 -2
- package/mobile/src/setup-fixture.ts +0 -1
- package/mobile/src/ui-kit/Button/buttonClassNameConstants.ts +3 -0
- package/mobile/src/ui-kit/Img/ImgProps.ts +1 -0
- package/package.json +1 -1
- package/src/components/CarouselCatalogCard/CarouselCatalogCard.tsx +0 -1
- package/src/components/CarouselProductCard/CarouselProductCard.tsx +0 -1
- package/src/components/CarouselRecommendationCard/CarouselRecommendationCard.example.json +6 -3
- package/src/components/CarouselRecommendationCard/CarouselRecommendationCard.fixture.tsx +20 -5
- package/src/components/CarouselRecommendationCard/CarouselRecommendationCard.tsx +2 -0
- package/src/components/CarouselRecommendationCard/CarouselRecommendationCard.ui.json +7 -0
- package/src/components/CarouselRecommendationCard/CarouselRecommendationCardContent.ts +5 -9
- package/src/components/Footer/Footer.mobile.tsx +1 -1
- package/src/components/Footer/Footer.tsx +2 -2
- package/src/components/Footer/MediaButton.tsx +19 -17
- package/src/components/Footer/SocialMedia.tsx +4 -5
- package/src/components/Header/DropdownMenu.tsx +7 -5
- package/src/components/Header/Header.fixture.tsx +3 -3
- package/src/components/Header/Header.tsx +13 -5
- package/src/components/Header/HeaderChatBotButton.tsx +45 -0
- package/src/components/Header/HeaderContent.ts +7 -1
- package/src/components/Header/HeaderSecondaryMenu.tsx +20 -30
- package/src/components/Header/HeaderSecondaryMenuButton.tsx +24 -5
- package/src/components/Header/useChatBot.ts +16 -0
- package/src/components/Tabs/LinkTab.tsx +5 -13
- package/src/components/Tabs/ScrollableTabs.tsx +55 -0
- package/src/components/Tabs/Tabs.fixture.tsx +22 -0
- package/src/components/Tabs/Tabs.tsx +26 -4
- package/src/components/Tabs/TabsContent.ts +13 -0
- package/src/components/Tabs/renderGroupTab.tsx +30 -20
- package/src/components/Tabs/renderTab.tsx +8 -5
- package/src/components/Tabs/tabItemClasses.ts +65 -1
- package/src/hooks/useBool.ts +19 -0
- package/src/icons/HeadphonesIcon.svg +5 -0
- package/src/icons/IconName.ts +6 -340
- package/src/model/ButtonVersion.ts +9 -2
- package/src/setup-fixture.ts +0 -1
- package/src/ui-kit/Button/buttonClassNameConstants.ts +3 -0
- package/src/ui-kit/Img/ImgProps.ts +1 -0
package/bundle/bundle.umd.js
CHANGED
|
@@ -653,6 +653,7 @@
|
|
|
653
653
|
white: 'text-primary-main bg-white hover:text-white hover:bg-primary-hover active:bg-white active:text-primary-main',
|
|
654
654
|
link: '',
|
|
655
655
|
transparent: '',
|
|
656
|
+
gray: 'text-primary-main bg-main-divider hover:text-white hover:bg-primary-hover active:bg-primary-active',
|
|
656
657
|
'': '',
|
|
657
658
|
};
|
|
658
659
|
const DisabledStyle = 'bg-main-divider text-main-disabled';
|
|
@@ -662,6 +663,7 @@
|
|
|
662
663
|
white: DisabledStyle,
|
|
663
664
|
link: '',
|
|
664
665
|
transparent: '',
|
|
666
|
+
gray: DisabledStyle,
|
|
665
667
|
'': '',
|
|
666
668
|
};
|
|
667
669
|
const buttonStyle = 'text-center font-sans select-none';
|
|
@@ -671,6 +673,7 @@
|
|
|
671
673
|
white: 'group-hover/btn:brightness-0 group-hover/btn:invert',
|
|
672
674
|
link: '',
|
|
673
675
|
transparent: '',
|
|
676
|
+
gray: 'group-hover/btn:brightness-0 group-hover/btn:invert',
|
|
674
677
|
'': '',
|
|
675
678
|
};
|
|
676
679
|
|
|
@@ -1606,7 +1609,7 @@
|
|
|
1606
1609
|
|
|
1607
1610
|
const ITEMS_GAP = 4;
|
|
1608
1611
|
const blurBaseStyle = 'absolute top-0 bottom-0 z-50 w-[84px] pointer-events-none';
|
|
1609
|
-
const scrollButtonStyle = 'absolute top-[calc(50%-12px)] z-50';
|
|
1612
|
+
const scrollButtonStyle$1 = 'absolute top-[calc(50%-12px)] z-50';
|
|
1610
1613
|
const Carousel = JSX(({ className = '', itemCount, visibleItemCount, isBlur = true, isCyclic = false, isPadding = true, ...rest }) => {
|
|
1611
1614
|
const { blocks: childBlocks } = rest.block || {};
|
|
1612
1615
|
const count = itemCount || childBlocks?.length || 0;
|
|
@@ -1626,7 +1629,7 @@
|
|
|
1626
1629
|
'CarouselTariffsCard',
|
|
1627
1630
|
'CarouselInvestmentCard',
|
|
1628
1631
|
];
|
|
1629
|
-
const renderScrollButtons = ({ scrollLeft, scrollRight, canScrollLeft, canScrollRight, }) => (jsxs("div", { children: [canScrollLeft ? (jsx(ScrollLeftButton, { className: `${scrollButtonStyle} left-8`, onClick: scrollLeft })) : null, canScrollRight ? (jsx(ScrollRightButton, { className: `${scrollButtonStyle} right-8`, onClick: scrollRight })) : null] }));
|
|
1632
|
+
const renderScrollButtons = ({ scrollLeft, scrollRight, canScrollLeft, canScrollRight, }) => (jsxs("div", { children: [canScrollLeft ? (jsx(ScrollLeftButton, { className: `${scrollButtonStyle$1} left-8`, onClick: scrollLeft })) : null, canScrollRight ? (jsx(ScrollRightButton, { className: `${scrollButtonStyle$1} right-8`, onClick: scrollRight })) : null] }));
|
|
1630
1633
|
const getPaddingStyle = (isPadding) => (isPadding ? 'p-12' : '');
|
|
1631
1634
|
|
|
1632
1635
|
const BLOCK_CLASSES = 'absolute border border-solid border-gray w-full h-full';
|
|
@@ -1640,7 +1643,7 @@
|
|
|
1640
1643
|
black: 'bg-black',
|
|
1641
1644
|
white: 'bg-white',
|
|
1642
1645
|
};
|
|
1643
|
-
const CarouselCatalogCard = JSX(({ className = '', title, description, image, price, button, colors, ...rest }) => (jsxs(BlockWrapper, { className: `border box-border border-gray p-7 min-w-[392px] flex flex-col justify-left ${className}`,
|
|
1646
|
+
const CarouselCatalogCard = JSX(({ className = '', title, description, image, price, button, colors, ...rest }) => (jsxs(BlockWrapper, { className: `border box-border border-gray p-7 min-w-[392px] flex flex-col justify-left ${className}`, ...rest, children: [image?.src ? jsx(ImgInner, { className: "mb-5 flex justify-center", image: image }) : null, title ? (jsx(Heading, { headingType: "h6", as: "h4", className: "text-left mb-1.5", title: title })) : null, description ? (jsx("div", { className: "mb-4", children: jsx(Paragraph, { size: "text-m", align: "text-left", font: "font-light", children: description }) })) : null, colors?.length ? (jsxs("div", { className: "flex mb-4 text-s-light text-secondary-text", children: [jsx("div", { className: "mr-1.5", children: jsx(Text, { children: "\u0414\u043E\u0441\u0442\u0443\u043F\u043D\u044B\u0435 \u0446\u0432\u0435\u0442\u0430: " }) }), colors.map(renderColorOption$1)] })) : null, price ? (jsxs(Text, { size: "text-h3", align: "text-left", children: [price, "\u00A0\u20BD"] })) : null, renderButtonsSection([button], { buttonClassName: 'mt-5 w-full' })] })));
|
|
1644
1647
|
const renderColorOption$1 = (color, i) => (jsx("span", { className: `w-6 h-6 ml-3 border border-solid border-main-divider rounded-full ${cardStyleMap$2[color]}` }, String(i)));
|
|
1645
1648
|
|
|
1646
1649
|
const BaseTile = JSX(({ className = '', title = '', buttons, image, children }) => (jsxs("div", { className: `font-sans flex flex-col grow h-full items-start ${className}`, children: [title, jsxs("div", { className: "flex grow w-full justify-between", children: [jsxs("div", { className: "flex flex-col justify-between w-full", children: [jsx("div", { className: "h-full", children: children }), buttons ? jsx("div", { className: "mt-auto pt-8", children: buttons }) : null] }), image] })] })));
|
|
@@ -1707,7 +1710,7 @@
|
|
|
1707
1710
|
const List = JSX(({ className = '', hasIndent, isDotted, itemClassName = '', items, listItemSize = 'M' }) => items?.length ? (jsx("section", { className: `text-primary-text group-data-secondary:text-white group-data-gray:text-secondary-text ${TEXT_SIZE_MAP[listItemSize]} ${hasIndent ? ITEM_INDENT_MAP[listItemSize] : ''} ${className}`, role: "list", children: items.map((item, i) => (jsx(ListItem, { className: `${itemClassName} mb-1.5`, isDotted: isDotted, size: listItemSize, children: item }, String(i)))) })) : null);
|
|
1708
1711
|
|
|
1709
1712
|
const CarouselProductCard = JSX(({ className = '', title, headlineSmallVersion = 'H6', description, additionalDescription, icon, items = [], button = {}, version = 'primary', isDotted = true, align = 'text-center', ...rest }) => {
|
|
1710
|
-
return (jsxs(BlockWrapper, { className: style('flex flex-col justify-between items-stretch min-w-[260px] h-full w-full p-6', 'box-border border-solid border border-gray', align, className),
|
|
1713
|
+
return (jsxs(BlockWrapper, { className: style('flex flex-col justify-between items-stretch min-w-[260px] h-full w-full p-6', 'box-border border-solid border border-gray', align, className), version: version, ...rest, children: [jsxs("div", { className: "flex flex-col h-full", children: [renderImage$4(icon), renderCardTitle$1(headlineSmallVersion, title), renderDescription$4(description, title), renderItems$1(items, isDotted, version), renderAdditionalDescription$2(additionalDescription)] }), renderButtonsSection([button], { buttonClassName: 'mt-6 w-full' })] }));
|
|
1711
1714
|
});
|
|
1712
1715
|
const renderImage$4 = (image) => (jsxs("div", { className: "flex justify-center", children: [image?.src ? jsx(ImgInner, { className: "mb-5", image: image }) : null, image?.icon ? (jsx(ImgInner, { className: `w-[32px] h-[32px] min-w-[32px] mb-5 rounded-full`, image: image, asSVG: true })) : null] }));
|
|
1713
1716
|
const renderCardTitle$1 = (headlineSmallVersion, title) => title ? jsx(Text, { size: HEADLINE_SMALL_VERSION[headlineSmallVersion], children: title }) : null;
|
|
@@ -1759,21 +1762,20 @@
|
|
|
1759
1762
|
default: 'w-14 h-14',
|
|
1760
1763
|
small: 'w-12 h-12',
|
|
1761
1764
|
};
|
|
1762
|
-
const MediaButton = JSX(({
|
|
1763
|
-
const
|
|
1764
|
-
const { href, onClick } = link(rest);
|
|
1765
|
+
const MediaButton = JSX(({ iconVersion = 'color', buttonSize = 'default', rounded = false, ...rest }) => {
|
|
1766
|
+
const { href, version } = rest;
|
|
1765
1767
|
const { icon, label } = ICONS_MAP.find(({ origins }) => origins.some((_) => href?.includes(_))) || {};
|
|
1766
1768
|
const iconWithVersion = icon ? { ...getIconWithVersion(icon), iconVersion } : null;
|
|
1767
|
-
return
|
|
1769
|
+
return (jsx(Button, { className: style('group/media flex items-center justify-center box-border', buttonSizeStyles[buttonSize], rounded ? 'rounded-full' : 'rounded-md', 'border border-solid hover:border-transparent', 'group-data-primary:border-main-divider', 'hover:bg-primary-main hover:text-black', 'group-data-secondary:bg-white border-main-divider group-data-secondary:hover:bg-secondary-hover', 'group-data-gray:border-green', buttonSizeStyles[buttonSize]), "aria-label": label, target: "_blank", rel: "noopener noreferrer", version: version, ...rest, children: iconWithVersion ? (jsx(ImgInner, { image: iconWithVersion, imageClassName: "group-hover/media:text-white", width: "24", height: "24", asSVG: true })) : null }));
|
|
1768
1770
|
});
|
|
1769
1771
|
|
|
1770
|
-
const SocialMedia = JSX(({ className = '', media,
|
|
1772
|
+
const SocialMedia = JSX(({ className = '', media, children, buttonSize }) => (jsxs("div", { className: "font-sans", children: [jsx("div", { className: `flex gap-2.5 ${className}`, children: media?.map((_, index) => (jsx(MediaButton, { buttonSize: buttonSize, version: _.version, ..._ }, String(index)))) }), jsx("span", { className: "text-s-light text-secondary-text", children: children })] })));
|
|
1771
1773
|
|
|
1772
|
-
const CarouselRecommendationCard = JSX(({ button, className = '', description, image, items = [], socialMedia = [], title, ...rest }) => {
|
|
1774
|
+
const CarouselRecommendationCard = JSX(({ button, className = '', description, image, items = [], socialMedia = [], title, version = 'primary', ...rest }) => {
|
|
1773
1775
|
const tileTitle = title ? (jsx(Heading, { headingType: "h5", as: "h3", className: "mb-3.5 z-10", title: title })) : null;
|
|
1774
1776
|
const tileImage = image?.src ? (jsx(ImgInner, { className: "absolute bottom-0 right-0 m-0", image: image })) : null;
|
|
1775
1777
|
const BORDER_STYLE = 'border border-solid border-gray group-data-secondary:border-white/50 group-data-gray:border-main-divider';
|
|
1776
|
-
return (jsx(BlockWrapper, { className: style('relative p-7 min-w-[524px] text-left box-border group-data-gray:bg-main-divider/50', BORDER_STYLE, className), ...rest, children: jsx(BaseTile, { className: "flex justify-between", title: tileTitle, image: tileImage, children: jsxs("div", { className: "h-full flex flex-col justify-between", children: [description ? jsx("span", { className: "mb-2", children: description }) : null, items.length ? (jsx(List, { className: "text-xl-light flex flex-col flex-1 gap-2 max-w-[236px]", items: items })) : null, socialMedia.length ? jsx(SocialMedia, { className: "pt-10 pb-0", media: socialMedia }) : null, renderButtonsSection([button], { className: 'pt-2 mt-16' })] }) }) }));
|
|
1778
|
+
return (jsx(BlockWrapper, { className: style('relative p-7 min-w-[524px] text-left box-border group-data-gray:bg-main-divider/50', BORDER_STYLE, className), version: version, ...rest, children: jsx(BaseTile, { className: "flex justify-between", title: tileTitle, image: tileImage, children: jsxs("div", { className: "h-full flex flex-col justify-between", children: [description ? jsx("span", { className: "mb-2", children: description }) : null, items.length ? (jsx(List, { className: "text-xl-light flex flex-col flex-1 gap-2 max-w-[236px]", items: items })) : null, socialMedia.length ? jsx(SocialMedia, { className: "pt-10 pb-0", media: socialMedia }) : null, renderButtonsSection([button], { className: 'pt-2 mt-16' })] }) }) }));
|
|
1777
1779
|
});
|
|
1778
1780
|
|
|
1779
1781
|
const VISIBLE_CELLS_COUNT = 1;
|
|
@@ -2232,8 +2234,8 @@
|
|
|
2232
2234
|
const LEFT_COL_WIDTH_FULL_HD = 'w-[204px]';
|
|
2233
2235
|
const Footer = JSX(({ className = '', ...rest }) => {
|
|
2234
2236
|
const fallback = rest.options?.page?.fallback;
|
|
2235
|
-
const { documents, relatedEnterprises, contacts, socialMedia, mobileApps,
|
|
2236
|
-
return (jsxs(BlockWrapper, { tag: "footer", className: `p-9 ${className}`, ...rest, children: [jsxs("div", { className: "flex items-stretch gap-[54px] pb-[30px] xl:gap-8", children: [jsx(Logo, { className: LEFT_COL_WIDTH_FULL_HD, logo: logo }), jsx(SearchBar$1, { className: "grow" })] }), jsxs("div", { className: "flex items-stretch gap-[54px] xl:gap-8", children: [jsxs("div", { className: `${LEFT_COL_WIDTH_FULL_HD} flex flex-col shrink-0 overflow-hidden`, children: [jsx(Contacts, { items: contacts, hasButton: true }), jsx(SocialMedia, { media: socialMedia, children: "\u0421\u043E\u0446\u0441\u0435\u0442\u0438" }), jsx(SocialMedia, { className: "mt-6", media: mobileApps, children: "\u041C\u043E\u0431\u0438\u043B\u044C\u043D\u043E\u0435 \u043F\u0440\u0438\u043B\u043E\u0436\u0435\u043D\u0438\u0435" })] }), jsx(Sitemap, { className: "pt-[3px]",
|
|
2237
|
+
const { documents, relatedEnterprises, contacts, socialMedia, mobileApps, logo } = useSWRResource(projectSettings.FOOTER || 'footer', fallback);
|
|
2238
|
+
return (jsxs(BlockWrapper, { tag: "footer", className: `p-9 ${className}`, ...rest, children: [jsxs("div", { className: "flex items-stretch gap-[54px] pb-[30px] xl:gap-8", children: [jsx(Logo, { className: LEFT_COL_WIDTH_FULL_HD, logo: logo }), jsx(SearchBar$1, { className: "grow" })] }), jsxs("div", { className: "flex items-stretch gap-[54px] xl:gap-8", children: [jsxs("div", { className: `${LEFT_COL_WIDTH_FULL_HD} flex flex-col shrink-0 overflow-hidden`, children: [jsx(Contacts, { items: contacts, hasButton: true }), jsx(SocialMedia, { media: socialMedia, children: "\u0421\u043E\u0446\u0441\u0435\u0442\u0438" }), jsx(SocialMedia, { className: "mt-6", media: mobileApps, children: "\u041C\u043E\u0431\u0438\u043B\u044C\u043D\u043E\u0435 \u043F\u0440\u0438\u043B\u043E\u0436\u0435\u043D\u0438\u0435" })] }), jsx(Sitemap, { className: "pt-[3px]", fallback: fallback })] }), jsx(HorizontalNavigation, { className: "mt-[98px]", links: relatedEnterprises }), jsx(TextInformation, { links: documents })] }));
|
|
2237
2239
|
});
|
|
2238
2240
|
|
|
2239
2241
|
const galleryLengthForScrollMap = {
|
|
@@ -2326,6 +2328,14 @@
|
|
|
2326
2328
|
? 'text-primary-main'
|
|
2327
2329
|
: style(flat ? 'text-primary-text' : 'text-secondary-text', 'hover:text-primary-main'), 'group-data-transparent:text-white group-data-transparent:hover:text-primary-hover');
|
|
2328
2330
|
|
|
2331
|
+
function useBool(defaultValue = false) {
|
|
2332
|
+
const [value, setValue] = useState(defaultValue);
|
|
2333
|
+
const setTrue = useCallback(() => setValue(true), []);
|
|
2334
|
+
const setFalse = useCallback(() => setValue(false), []);
|
|
2335
|
+
const toggle = useCallback(() => setValue((_) => !_), []);
|
|
2336
|
+
return [value, { setValue, setTrue, setFalse, toggle }];
|
|
2337
|
+
}
|
|
2338
|
+
|
|
2329
2339
|
const STORAGE_DEFAULT_TTL = 86400000; // 24 * 60 * 60 * 1000
|
|
2330
2340
|
function useCachedAsyncData(key, fetcher, storage = globalThis?.localStorage) {
|
|
2331
2341
|
const cachedFetcher = useCallback(async (...args) => {
|
|
@@ -2425,19 +2435,70 @@
|
|
|
2425
2435
|
return (jsxs("div", { className: "flex gap-x-3", children: [icon ? jsx(ImgInner, { pathPrefix: "/wcms-resources/", image: icon }) : null, text ? (jsx("a", { className: "hover:text-primary-hover", href: href, target: target, onClick: onClick, children: text })) : null] }));
|
|
2426
2436
|
});
|
|
2427
2437
|
|
|
2428
|
-
const HeaderSecondaryMenuButton = JSX(({ className
|
|
2438
|
+
const HeaderSecondaryMenuButton = JSX(({ className, isRounded, disabled, ariaLabel, image, onClick }) => (jsx("button", { className: style('group/btn border-0 p-0 flex items-center bg-inherit', isRounded
|
|
2439
|
+
? 'w-8 h-8 text-secondary-light hover:text-secondary-hove'
|
|
2440
|
+
: 'w-6 h-6 text-primary-text hover:text-primary-main', 'group-data-transparent:text-white', className), type: "button", disabled: disabled, "aria-label": ariaLabel, onClick: onClick, children: jsx(ImgInner, { image: image, className: style('h-full', isRounded ? 'bg-main-divider/20 rounded-full' : ''), imageClassName: "group-hover/btn:text-primary-hover group-hover/btn:invert-0", asSVG: true }) })));
|
|
2441
|
+
|
|
2442
|
+
const getNS = (_) => globalThis[_];
|
|
2443
|
+
function useExternalNS(namespaceName, url) {
|
|
2444
|
+
const [externalNS, setExternalNS] = useState();
|
|
2445
|
+
const setNS = useCallback(() => setExternalNS(getNS(namespaceName)), [namespaceName]);
|
|
2446
|
+
useEffect(() => {
|
|
2447
|
+
const script = document.getElementById(url);
|
|
2448
|
+
if (script) {
|
|
2449
|
+
if (getNS(namespaceName)) {
|
|
2450
|
+
setNS();
|
|
2451
|
+
}
|
|
2452
|
+
else {
|
|
2453
|
+
script.addEventListener('load', setNS);
|
|
2454
|
+
return () => {
|
|
2455
|
+
script.removeEventListener('load', setNS);
|
|
2456
|
+
};
|
|
2457
|
+
}
|
|
2458
|
+
}
|
|
2459
|
+
else {
|
|
2460
|
+
const newScript = document.createElement('script');
|
|
2461
|
+
newScript.src = url;
|
|
2462
|
+
newScript.async = true;
|
|
2463
|
+
newScript.id = url;
|
|
2464
|
+
newScript.addEventListener('load', setNS);
|
|
2465
|
+
document.head.appendChild(newScript);
|
|
2466
|
+
return () => {
|
|
2467
|
+
document.head.removeChild(newScript);
|
|
2468
|
+
setExternalNS(undefined);
|
|
2469
|
+
};
|
|
2470
|
+
}
|
|
2471
|
+
return undefined;
|
|
2472
|
+
}, [namespaceName, url]);
|
|
2473
|
+
return externalNS;
|
|
2474
|
+
}
|
|
2475
|
+
|
|
2476
|
+
const CHATBOT_NAMESPACE = 'chatbot';
|
|
2477
|
+
const CHATBOT_URL = {
|
|
2478
|
+
personal: '//chat.mes.rshb.ru/assets/js/webchat_rshb',
|
|
2479
|
+
business: '', //TODO: add url business chat
|
|
2480
|
+
};
|
|
2481
|
+
const useChatBot = (chat) => {
|
|
2482
|
+
useEffect(() => globalThis.localStorage?.setItem('webchat-keep-open', String(Date.now())), []);
|
|
2483
|
+
return useExternalNS(CHATBOT_NAMESPACE, CHATBOT_URL[chat]);
|
|
2484
|
+
};
|
|
2485
|
+
|
|
2486
|
+
const CHAT_BUTTON_EXTERNAL_NAME = 'text-page__btn-chat';
|
|
2487
|
+
const HeaderChatBotButton = JSX((props) => {
|
|
2488
|
+
const [loadRequested, { setTrue: load }] = useBool();
|
|
2489
|
+
return loadRequested ? (jsx(HeaderChatBotButtonWithLoader, { ...props })) : (renderChatBotButton({ ...props, onClick: load }));
|
|
2490
|
+
});
|
|
2491
|
+
const HeaderChatBotButtonWithLoader = JSX(({ chat = 'personal', ...rest }) => {
|
|
2492
|
+
useChatBot(chat);
|
|
2493
|
+
return renderChatBotButton(rest);
|
|
2494
|
+
});
|
|
2495
|
+
const renderChatBotButton = ({ className, iconVersion, onClick }) => (jsx(HeaderSecondaryMenuButton, { className: style(CHAT_BUTTON_EXTERNAL_NAME, className), image: { icon: 'HeadphonesIcon', iconVersion }, ariaLabel: "\u0427\u0430\u0442", onClick: onClick }));
|
|
2429
2496
|
|
|
2430
|
-
const HeaderSecondaryMenu = JSX(({ version, className, officesLink, defaultLocation = 'Москва', foreignOffices }) => {
|
|
2431
|
-
const [isShowLocationModal,
|
|
2497
|
+
const HeaderSecondaryMenu = JSX(({ version, className, officesLink, defaultLocation = 'Москва', foreignOffices, chat }) => {
|
|
2498
|
+
const [isShowLocationModal, { setTrue: showLocationModal, setFalse: hideLocationModal }] = useBool();
|
|
2432
2499
|
const [location, onChangeLocation] = useLocation(defaultLocation);
|
|
2433
|
-
const showLocationModal = useCallback(() => {
|
|
2434
|
-
setShowLocationModal(true);
|
|
2435
|
-
}, []);
|
|
2436
|
-
const hideLocationModal = useCallback(() => {
|
|
2437
|
-
setShowLocationModal(false);
|
|
2438
|
-
}, []);
|
|
2439
2500
|
const iconVersion = version === 'transparent' ? 'white' : 'black';
|
|
2440
|
-
return (jsxs("div", { className:
|
|
2501
|
+
return (jsxs("div", { className: style('flex items-center', className), children: [jsx(TopItem, { className: "mr-5", flat: true, href: "#", text: location.name, ariaLabel: "\u041C\u0435\u0441\u0442\u043E\u043F\u043E\u043B\u043E\u0436\u0435\u043D\u0438\u0435", onClick: showLocationModal }), officesLink ? (jsx(TopItem, { className: "mr-7", flat: true, href: officesLink, 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" })) : null, chat ? (jsx(HeaderChatBotButton, { className: "mr-5", iconVersion: iconVersion, chat: chat })) : null, jsx(HeaderSecondaryMenuButton, { className: "mr-5", image: { icon: 'LoupeIcon', iconVersion }, ariaLabel: "\u041F\u043E\u0438\u0441\u043A \u043F\u043E \u0441\u0430\u0439\u0442\u0443", disabled: true }), jsx(HeaderSecondaryMenuButton, { image: { icon: 'GridIcon', iconVersion }, ariaLabel: "\u0414\u043E\u043F\u043E\u043B\u043D\u0438\u0442\u0435\u043B\u044C\u043D\u044B\u0435 \u0441\u0441\u044B\u043B\u043A\u0438", isRounded: true, disabled: true }), isShowLocationModal ? (jsx(Location, { currentLocation: location, foreignOffices: foreignOffices, onChangeLocation: onChangeLocation, close: hideLocationModal })) : null] }));
|
|
2441
2502
|
});
|
|
2442
2503
|
|
|
2443
2504
|
const findActiveSubItem = (router) => (items = []) => {
|
|
@@ -2453,9 +2514,9 @@
|
|
|
2453
2514
|
const handleToggle = useCallback(() => setVisible((_) => !_), []);
|
|
2454
2515
|
const handleClickOutside = useCallback(() => setVisible(false), []);
|
|
2455
2516
|
const ref = useOutsideClick(handleClickOutside);
|
|
2456
|
-
return (jsxs("div", { className:
|
|
2517
|
+
return (jsxs("div", { className: style(visible ? 'bg-white rounded-md shadow-blue-gray' : '', className), ref: ref, children: [jsx("button", { className: "group/btn flex justify-between items-center h-6 ml-6", "aria-label": `${visible ? 'Скрыть другие разделы' : 'Показать другие разделы'}`, onClick: handleToggle, children: Array(3)
|
|
2457
2518
|
.fill(null)
|
|
2458
|
-
.map((_, i) => (jsx("div", { className: "w-[3px] h-[3px] rounded mr-1 bg-primary-text group-hover/btn:bg-primary-hover group-data-transparent:bg-white" }, String(i)))) }), jsx("div", { className:
|
|
2519
|
+
.map((_, i) => (jsx("div", { className: "w-[3px] h-[3px] rounded mr-1 bg-primary-text group-hover/btn:bg-primary-hover group-data-transparent:bg-white" }, String(i)))) }), jsx("div", { className: style('flex flex-col rounded-md bg-white p-6 pb-2', visible ? '' : 'hidden'), "aria-hidden": !visible, children: items?.map((item, i) => (jsx("a", { className: style('text-l-light pb-4 hover:text-primary-main', item === activeItem ? 'text-primary-main' : ''), ...link(item), children: item.text }, item.href || String(i)))) })] }));
|
|
2459
2520
|
});
|
|
2460
2521
|
|
|
2461
2522
|
const HeaderItem = JSX(({ className = '', active, dataItemName, children, ...rest }) => {
|
|
@@ -2500,12 +2561,12 @@
|
|
|
2500
2561
|
'bg-white': 'primary',
|
|
2501
2562
|
transparent: 'transparent',
|
|
2502
2563
|
};
|
|
2503
|
-
const Header = JSX(({ bgColor = 'bg-white', className
|
|
2564
|
+
const Header = JSX(({ bgColor = 'bg-white', className, showSubMenu = true, version = BG_COLOR_TO_BLOCK_VERSION[bgColor], chat, ...rest }) => {
|
|
2504
2565
|
const router = useRouter();
|
|
2505
2566
|
const { topItems, logo, defaultLocation, foreignOffices, officesLink } = useSWRResource(projectSettings.SITEMAP || 'sitemap', rest.options?.page?.fallback);
|
|
2506
2567
|
const activeTopItem = topItems?.find(isTopItemActive(router));
|
|
2507
2568
|
const topMenu = topItems?.map((_, i) => (jsx(TopItem, { active: _ === activeTopItem, "aria-label": _.text, ..._ }, String(i))));
|
|
2508
|
-
return (jsx(BlockWrapper, { tag: "header", className:
|
|
2569
|
+
return (jsx(BlockWrapper, { tag: "header", className: style('pt-6 px-20', showSubMenu && activeTopItem?.items?.length ? 'pb-4' : 'pb-5', className), version: version, ...rest, children: jsxs("div", { className: "container", children: [jsxs("div", { className: "flex items-center", children: [jsx(Logo, { className: "mr-8", bgColor: bgColor, logo: logo }), topMenu, jsx(HeaderSecondaryMenu, { version: version, className: "ml-auto", foreignOffices: foreignOffices, defaultLocation: defaultLocation, officesLink: officesLink, chat: chat })] }), jsx("div", { className: style('mt-6 h-px bg-main-divider', version === 'transparent' ? 'opacity-30' : '') }), showSubMenu && activeTopItem?.items?.length ? (jsx(HeaderSubMenu, { subItems: activeTopItem.items })) : null] }) }));
|
|
2509
2570
|
});
|
|
2510
2571
|
|
|
2511
2572
|
const gapStyles = {
|
|
@@ -2832,40 +2893,6 @@
|
|
|
2832
2893
|
return (jsx("div", { className: `select-none cursor-pointer py-4 w-12 bg-white ${Object.values(styles$1).join(' ')} ${className}`, onClick: setUserGeoLocation, children: jsx(Icon, { name: "UserGeoLocationIcon", width: "20", height: "16" }) }));
|
|
2833
2894
|
};
|
|
2834
2895
|
|
|
2835
|
-
const getNS = (_) => globalThis[_];
|
|
2836
|
-
function useExternalNS(namespaceName, url) {
|
|
2837
|
-
const [externalNS, setExternalNS] = useState();
|
|
2838
|
-
const setNS = useCallback(() => setExternalNS(getNS(namespaceName)), [namespaceName]);
|
|
2839
|
-
useEffect(() => {
|
|
2840
|
-
const script = document.getElementById(url);
|
|
2841
|
-
if (script) {
|
|
2842
|
-
if (getNS(namespaceName)) {
|
|
2843
|
-
setNS();
|
|
2844
|
-
}
|
|
2845
|
-
else {
|
|
2846
|
-
script.addEventListener('load', setNS);
|
|
2847
|
-
return () => {
|
|
2848
|
-
script.removeEventListener('load', setNS);
|
|
2849
|
-
};
|
|
2850
|
-
}
|
|
2851
|
-
}
|
|
2852
|
-
else {
|
|
2853
|
-
const newScript = document.createElement('script');
|
|
2854
|
-
newScript.src = url;
|
|
2855
|
-
newScript.async = true;
|
|
2856
|
-
newScript.id = url;
|
|
2857
|
-
newScript.addEventListener('load', setNS);
|
|
2858
|
-
document.head.appendChild(newScript);
|
|
2859
|
-
return () => {
|
|
2860
|
-
document.head.removeChild(newScript);
|
|
2861
|
-
setExternalNS(undefined);
|
|
2862
|
-
};
|
|
2863
|
-
}
|
|
2864
|
-
return undefined;
|
|
2865
|
-
}, [namespaceName, url]);
|
|
2866
|
-
return externalNS;
|
|
2867
|
-
}
|
|
2868
|
-
|
|
2869
2896
|
const YMAPS_NAMESPACE = 'ymaps';
|
|
2870
2897
|
const useYandexMaps = () => {
|
|
2871
2898
|
const url = `https://api-maps.yandex.ru/2.1/?apikey=${projectSettings.YANDEX_MAP_API_KEY || ''}&lang=ru_RU`;
|
|
@@ -3638,60 +3665,139 @@
|
|
|
3638
3665
|
};
|
|
3639
3666
|
|
|
3640
3667
|
const LINK_CLASSES = 'h-12 flex-1 flex items-center justify-center cursor-pointer';
|
|
3641
|
-
const ACTIVE_LINK_CLASSES = 'bg-primary-main';
|
|
3642
3668
|
const INACTIVE_LINK_CLASSES = 'group/btn bg-white';
|
|
3643
|
-
const
|
|
3669
|
+
const SCROLLABLE_ACTIVE_LINK_CLASSES = 'bg-white text-primary-main';
|
|
3670
|
+
const WIDESCREEN_ACTIVE_LINK_CLASSES = 'bg-primary-main text-white';
|
|
3671
|
+
const TEXT_CLASSES = 'font-sans text-m text-center';
|
|
3644
3672
|
const ACTIVE_TEXT_CLASSES = 'text-white';
|
|
3645
3673
|
const INACTIVE_TEXT_CLASSES = 'text-secondary-text group-hover/btn:text-primary-main';
|
|
3674
|
+
const WHITE_ACTIVE_TEXT_CLASSES = 'text-primary-main';
|
|
3675
|
+
const GROUP_TAB_CLASSES = {
|
|
3676
|
+
div: {
|
|
3677
|
+
scrollable: {
|
|
3678
|
+
active: `inline-flex px-4 grow whitespace-nowrap ${LINK_CLASSES} ${SCROLLABLE_ACTIVE_LINK_CLASSES}`,
|
|
3679
|
+
default: `inline-flex px-4 grow whitespace-nowrap ${LINK_CLASSES} ${INACTIVE_LINK_CLASSES}`,
|
|
3680
|
+
},
|
|
3681
|
+
default: {
|
|
3682
|
+
active: `${LINK_CLASSES} ${WIDESCREEN_ACTIVE_LINK_CLASSES} whitespace-nowrap`,
|
|
3683
|
+
default: `${LINK_CLASSES} ${INACTIVE_LINK_CLASSES} whitespace-nowrap`,
|
|
3684
|
+
},
|
|
3685
|
+
},
|
|
3686
|
+
text: {
|
|
3687
|
+
scrollable: {
|
|
3688
|
+
active: `h-full border-0 border-b-2`,
|
|
3689
|
+
default: ``,
|
|
3690
|
+
},
|
|
3691
|
+
default: {
|
|
3692
|
+
active: '',
|
|
3693
|
+
default: '',
|
|
3694
|
+
},
|
|
3695
|
+
},
|
|
3696
|
+
};
|
|
3697
|
+
const LINK_TAB_CLASSES = {
|
|
3698
|
+
link: {
|
|
3699
|
+
scrollable: {
|
|
3700
|
+
active: `inline-flex px-4 grow whitespace-nowrap ${LINK_CLASSES} ${SCROLLABLE_ACTIVE_LINK_CLASSES}`,
|
|
3701
|
+
default: `inline-flex px-4 grow whitespace-nowrap ${LINK_CLASSES} ${INACTIVE_LINK_CLASSES}`,
|
|
3702
|
+
},
|
|
3703
|
+
default: {
|
|
3704
|
+
active: `${LINK_CLASSES} ${WIDESCREEN_ACTIVE_LINK_CLASSES}`,
|
|
3705
|
+
default: `${LINK_CLASSES} ${INACTIVE_LINK_CLASSES}`,
|
|
3706
|
+
},
|
|
3707
|
+
},
|
|
3708
|
+
text: {
|
|
3709
|
+
scrollable: {
|
|
3710
|
+
active: `${TEXT_CLASSES} flex items-center h-full border-0 border-b-2 ${WHITE_ACTIVE_TEXT_CLASSES}`,
|
|
3711
|
+
default: `${TEXT_CLASSES} ${INACTIVE_TEXT_CLASSES}`,
|
|
3712
|
+
},
|
|
3713
|
+
default: {
|
|
3714
|
+
active: `${TEXT_CLASSES} ${ACTIVE_TEXT_CLASSES}`,
|
|
3715
|
+
default: `${TEXT_CLASSES} ${INACTIVE_TEXT_CLASSES}`,
|
|
3716
|
+
},
|
|
3717
|
+
},
|
|
3718
|
+
};
|
|
3719
|
+
const getGroupTabClassName = (type, active, isScrollable) => {
|
|
3720
|
+
const styleType = isScrollable ? 'scrollable' : 'default';
|
|
3721
|
+
const styleActive = active ? 'active' : 'default';
|
|
3722
|
+
return GROUP_TAB_CLASSES[type][styleType][styleActive];
|
|
3723
|
+
};
|
|
3724
|
+
const getLinkTabClassName = (type, active, isScrollable) => {
|
|
3725
|
+
const styleType = isScrollable ? 'scrollable' : 'default';
|
|
3726
|
+
const styleActive = active ? 'active' : 'default';
|
|
3727
|
+
return LINK_TAB_CLASSES[type][styleType][styleActive];
|
|
3728
|
+
};
|
|
3646
3729
|
|
|
3647
3730
|
const LinkTab = JSX((props) => {
|
|
3648
|
-
const { tab, currentTab } = props;
|
|
3731
|
+
const { tab, currentTab, isScrollable = false } = props;
|
|
3649
3732
|
const active = currentTab?.type === 'link' && currentTab.href === tab.href;
|
|
3650
3733
|
const link = useLink();
|
|
3651
3734
|
const adjustedProps = link(tab);
|
|
3652
|
-
return (jsx("a", { role: "tab", className:
|
|
3735
|
+
return (jsx("a", { role: "tab", className: getLinkTabClassName('link', active, isScrollable), target: tab.target, href: adjustedProps.href, onClick: adjustedProps.onClick, children: jsx("span", { className: getLinkTabClassName('text', active, isScrollable), children: tab.text }) }));
|
|
3653
3736
|
});
|
|
3654
3737
|
|
|
3655
3738
|
const BADGE_CLASSES = 'min-w-[22px] h-[22px] rounded-full text-xs ml-2 flex justify-center items-center';
|
|
3656
3739
|
const ACTIVE_BADGE_CLASSES = 'bg-white/30 text-white';
|
|
3657
3740
|
const INACTIVE_BADGE_CLASSES = 'bg-main-divider text-secondary-text group-hover/btn:text-primary-main';
|
|
3658
|
-
const renderGroupTab = ({ page, currentTab, showCounter, onClick }) => (tab, i) => {
|
|
3741
|
+
const renderGroupTab = ({ page, currentTab, showCounter, onClick, isScrollable = false }) => (tab, i) => {
|
|
3659
3742
|
const active = currentTab === tab;
|
|
3660
3743
|
const count = tab.ref && page?.blocks
|
|
3661
3744
|
? page.blocks.filter((block) => block?.labels?.includes(tab.ref)).length
|
|
3662
3745
|
: 0;
|
|
3663
|
-
return (jsx("div", { className:
|
|
3746
|
+
return (jsx("div", { className: getGroupTabClassName('div', active, isScrollable), role: "tab", "aria-selected": active, onClick: () => onClick(tab), children: jsxs("div", { className: `flex flex-1 items-center justify-center ${getGroupTabClassName('text', active, isScrollable)}`, children: [renderTitle$2(tab.title, active, isScrollable), renderCount(showCounter, count, active)] }) }, `group-${String(i)}`));
|
|
3747
|
+
};
|
|
3748
|
+
const renderTitle$2 = (title, active, isScrollable) => {
|
|
3749
|
+
const activeClassName = active ? WHITE_ACTIVE_TEXT_CLASSES : INACTIVE_TEXT_CLASSES;
|
|
3750
|
+
const titleClassName = isScrollable
|
|
3751
|
+
? `${TEXT_CLASSES} ${activeClassName}`
|
|
3752
|
+
: `${TEXT_CLASSES} ${active ? ACTIVE_TEXT_CLASSES : INACTIVE_TEXT_CLASSES}`;
|
|
3753
|
+
return title ? jsx("h3", { className: titleClassName, children: title }) : null;
|
|
3754
|
+
};
|
|
3755
|
+
const renderCount = (showCounter, count, active) => {
|
|
3756
|
+
return showCounter && count ? (jsx("div", { className: `${BADGE_CLASSES} ${active ? ACTIVE_BADGE_CLASSES : INACTIVE_BADGE_CLASSES}`, children: count })) : null;
|
|
3664
3757
|
};
|
|
3665
|
-
const renderTitle$2 = (title, active) => (jsx("h3", { className: `${TEXT_CLASSES} ${active ? ACTIVE_TEXT_CLASSES : INACTIVE_TEXT_CLASSES}`, children: title }));
|
|
3666
|
-
const renderCount = (count, active) => (jsx("div", { className: `${BADGE_CLASSES} ${active ? ACTIVE_BADGE_CLASSES : INACTIVE_BADGE_CLASSES}`, children: count }));
|
|
3667
3758
|
|
|
3668
|
-
const renderTab = ({ page, currentTab, showCounter, onClick }) =>
|
|
3669
|
-
// Linter doesn't understand that switch processes all cases
|
|
3670
|
-
// eslint-disable-next-line consistent-return
|
|
3671
|
-
(tab, i) => {
|
|
3759
|
+
const renderTab = ({ page, currentTab, showCounter, onClick, isScrollable = false }) => (tab, i) => {
|
|
3672
3760
|
const type = tab.type;
|
|
3673
3761
|
if (!(type === 'group' || type === 'link')) {
|
|
3674
3762
|
return null;
|
|
3675
3763
|
}
|
|
3676
3764
|
switch (type) {
|
|
3677
3765
|
case 'group':
|
|
3678
|
-
return renderGroupTab({ page, currentTab, showCounter, onClick })(tab, i);
|
|
3766
|
+
return renderGroupTab({ page, currentTab, showCounter, onClick, isScrollable })(tab, i);
|
|
3679
3767
|
case 'link': {
|
|
3680
|
-
return jsx(LinkTab, { tab: tab, currentTab: currentTab }, String(i));
|
|
3768
|
+
return (jsx(LinkTab, { tab: tab, currentTab: currentTab, isScrollable: isScrollable }, String(i)));
|
|
3681
3769
|
}
|
|
3682
3770
|
default:
|
|
3683
3771
|
assertUnreachable(type);
|
|
3684
3772
|
}
|
|
3773
|
+
return null;
|
|
3685
3774
|
};
|
|
3686
3775
|
|
|
3776
|
+
const scrollButtonStyle = 'absolute z-50 top-0';
|
|
3777
|
+
const ScrollableTabs = JSX((props) => {
|
|
3778
|
+
const { tabs, onClick, currentTab, page, showCounter } = props;
|
|
3779
|
+
const [containerRef, scroll] = useSwipeListScroll({
|
|
3780
|
+
itemCount: tabs?.length || 0,
|
|
3781
|
+
isCyclic: false,
|
|
3782
|
+
});
|
|
3783
|
+
return (jsxs("div", { className: "relative max-w-full m-auto", children: [jsx("div", { className: `font-sans max-w-full w-full overflow-hidden relative bg-white`, children: jsx(SwipeListContainer, { containerRef: containerRef, snapAlign: "snap-start", onVisibleIndicesChange: scroll.handleVisibleIndicesChange, children: tabs?.map(renderTab({
|
|
3784
|
+
onClick,
|
|
3785
|
+
currentTab,
|
|
3786
|
+
showCounter,
|
|
3787
|
+
page,
|
|
3788
|
+
isScrollable: true,
|
|
3789
|
+
})) }) }), scroll.canScrollLeft ? (jsx(ScrollLeftButton, { className: `${scrollButtonStyle} left-6`, onClick: scroll.scrollLeft })) : null, scroll.canScrollRight ? (jsx(ScrollRightButton, { className: `${scrollButtonStyle} rotate-180 right-6`, onClick: scroll.scrollRight })) : null] }));
|
|
3790
|
+
});
|
|
3791
|
+
|
|
3687
3792
|
const Tabs = JSX((props) => {
|
|
3688
|
-
const { className = '', tabs, showCounter, isSticky, ...rest } = props;
|
|
3793
|
+
const { className = '', tabs, showCounter, isSticky, tabsMode, ...rest } = props;
|
|
3689
3794
|
const [currentTab, setCurrentTab] = useState(tabs ? tabs[0] : undefined);
|
|
3690
3795
|
useEffect(() => EventBus.inst.subscribe('tab', (event) => {
|
|
3691
3796
|
const tab = tabs?.find(checkTab(event));
|
|
3692
3797
|
if (event.type === 'link' && tab) {
|
|
3693
3798
|
setCurrentTab(tab);
|
|
3694
3799
|
}
|
|
3800
|
+
return [];
|
|
3695
3801
|
}), [tabs]);
|
|
3696
3802
|
useEffect(() => currentTab?.type === 'group'
|
|
3697
3803
|
? EventBus.inst.subject('tab', { label: currentTab.ref })
|
|
@@ -3702,7 +3808,12 @@
|
|
|
3702
3808
|
}
|
|
3703
3809
|
setCurrentTab(selectedTab);
|
|
3704
3810
|
}, []);
|
|
3705
|
-
return (jsx(BlockWrapper, { className:
|
|
3811
|
+
return (jsx(BlockWrapper, { className: `relative box-border flex gap-x-1 w-full ${isSticky ? 'sticky top-1 z-20 ' : ''} ${className}`, role: "tablist", ...rest, children: tabsMode === 'scrollable' ? (jsx(ScrollableTabs, { tabs: tabs, onClick: handleClick, currentTab: currentTab, showCounter: showCounter, ...rest })) : (tabs?.map(renderTab({
|
|
3812
|
+
onClick: handleClick,
|
|
3813
|
+
currentTab,
|
|
3814
|
+
showCounter,
|
|
3815
|
+
...rest,
|
|
3816
|
+
}))) }));
|
|
3706
3817
|
});
|
|
3707
3818
|
const checkTab = (event) => (_) => _.type === 'link' && _.href === `#${event.label}`;
|
|
3708
3819
|
|
|
@@ -4114,7 +4225,7 @@
|
|
|
4114
4225
|
return (jsx("div", { className: "flex items-end absolute bottom-0 right-0 h-full pointer-events-none", children: jsx(LikeControl, { className: "rounded-tl-lg sticky bottom-0 pointer-events-auto" }) }));
|
|
4115
4226
|
}
|
|
4116
4227
|
|
|
4117
|
-
const packageVersion = "0.7.
|
|
4228
|
+
const packageVersion = "0.7.7";
|
|
4118
4229
|
|
|
4119
4230
|
exports.Blocks = Blocks;
|
|
4120
4231
|
exports.ContentPage = ContentPage;
|