@ubnt/store.core 9.56.1-new-design → 9.56.1
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/CHANGELOG.md +1 -100
- package/lib/_virtual/_virtual_multi-entry.js +10 -13
- package/lib/_virtual/_virtual_multi-entry.js.map +1 -1
- package/lib/_virtual/_virtual_multi-entry.mjs +11 -13
- package/lib/_virtual/_virtual_multi-entry.mjs.map +1 -1
- package/lib/apis/smartcat.d.ts +2 -12
- package/lib/apis/smartcat.js +4 -27
- package/lib/apis/smartcat.js.map +1 -1
- package/lib/apis/smartcat.mjs +4 -27
- package/lib/apis/smartcat.mjs.map +1 -1
- package/lib/assets/close.svg +3 -1
- package/lib/assets/close2.svg +1 -3
- package/lib/assets/icons/menu/{icon-location-pin.svg.js → icon-globe.svg.js} +6 -6
- package/lib/assets/icons/menu/icon-globe.svg.js.map +1 -0
- package/lib/assets/icons/menu/icon-globe.svg.mjs +3 -0
- package/lib/assets/icons/menu/icon-globe.svg.mjs.map +1 -0
- package/lib/assets/logoUnifi.svg +2 -10
- package/lib/assets/minus4.svg +8 -8
- package/lib/assets/minus5.svg +8 -8
- package/lib/assets/plus2.svg +4 -1
- package/lib/assets/plus3.svg +1 -4
- package/lib/assets/plus5.svg +9 -9
- package/lib/assets/plus6.svg +9 -9
- package/lib/assets/poe2.svg +2 -3
- package/lib/assets/poe3.svg +3 -2
- package/lib/assets/port.svg +2 -4
- package/lib/assets/port2.svg +4 -2
- package/lib/assets/udmPro.jpg +0 -0
- package/lib/assets/udmPro2.jpg +0 -0
- package/lib/assets/udmProMax.jpg +0 -0
- package/lib/assets/udmProMax2.jpg +0 -0
- package/lib/components/Accordion/Accordion.js +4 -4
- package/lib/components/Avatar/Avatar.js +2 -2
- package/lib/components/BackInStock/BackInStock.types.d.ts +0 -1
- package/lib/components/Button/Button.js +5 -12
- package/lib/components/Button/Button.js.map +1 -1
- package/lib/components/Button/Button.mjs +1 -8
- package/lib/components/Button/Button.mjs.map +1 -1
- package/lib/components/Button/CartButton.d.ts +1 -3
- package/lib/components/Button/CartButton.js +6 -11
- package/lib/components/Button/CartButton.js.map +1 -1
- package/lib/components/Button/CartButton.mjs +4 -8
- package/lib/components/Button/CartButton.mjs.map +1 -1
- package/lib/components/ButtonGroup/ButtonGroup.d.ts +1 -1
- package/lib/components/ButtonGroup/ButtonGroup.js +9 -16
- package/lib/components/ButtonGroup/ButtonGroup.js.map +1 -1
- package/lib/components/ButtonGroup/ButtonGroup.mjs +9 -16
- package/lib/components/ButtonGroup/ButtonGroup.mjs.map +1 -1
- package/lib/components/ButtonGroup/ButtonGroup.styles.d.ts +6 -10
- package/lib/components/ButtonGroup/ButtonGroup.styles.js +20 -60
- package/lib/components/ButtonGroup/ButtonGroup.styles.js.map +1 -1
- package/lib/components/ButtonGroup/ButtonGroup.styles.mjs +20 -60
- package/lib/components/ButtonGroup/ButtonGroup.styles.mjs.map +1 -1
- package/lib/components/ButtonGroup/ButtonGroup.types.d.ts +0 -5
- package/lib/components/ButtonGroupBasic/ButtonGroupBasic.d.ts +1 -1
- package/lib/components/ButtonGroupBasic/ButtonGroupBasic.js +4 -16
- package/lib/components/ButtonGroupBasic/ButtonGroupBasic.js.map +1 -1
- package/lib/components/ButtonGroupBasic/ButtonGroupBasic.mjs +5 -17
- package/lib/components/ButtonGroupBasic/ButtonGroupBasic.mjs.map +1 -1
- package/lib/components/ButtonGroupBasic/ButtonGroupBasic.styles.d.ts +1 -5
- package/lib/components/ButtonGroupBasic/ButtonGroupBasic.styles.js +17 -82
- package/lib/components/ButtonGroupBasic/ButtonGroupBasic.styles.js.map +1 -1
- package/lib/components/ButtonGroupBasic/ButtonGroupBasic.styles.mjs +17 -82
- package/lib/components/ButtonGroupBasic/ButtonGroupBasic.styles.mjs.map +1 -1
- package/lib/components/ButtonGroupBasic/ButtonGroupBasic.types.d.ts +0 -4
- package/lib/components/CardSection/Card/Card.js +6 -6
- package/lib/components/CardSection/CardSection.js +2 -2
- package/lib/components/CardSection/CardSection.styles.d.ts +1 -1
- package/lib/components/CartIcon/CartIcon.js +2 -2
- package/lib/components/CategoryTabs/CategoryTabs.styles.d.ts +2 -4
- package/lib/components/CategoryTabs/CategoryTabs.styles.js +5 -8
- package/lib/components/CategoryTabs/CategoryTabs.styles.js.map +1 -1
- package/lib/components/CategoryTabs/CategoryTabs.styles.mjs +6 -7
- package/lib/components/CategoryTabs/CategoryTabs.styles.mjs.map +1 -1
- package/lib/components/Checkbox/Checkbox.js +4 -4
- package/lib/components/CloserLookSection/CloserLookSection.js +11 -11
- package/lib/components/CloserLookSection/RecommendedAddons/RecommendedAddons.js +5 -5
- package/lib/components/Compare/Compare.styles.d.ts +5 -5
- package/lib/components/Container/Container.d.ts +1 -1
- package/lib/components/Container/Container.js +4 -5
- package/lib/components/Container/Container.js.map +1 -1
- package/lib/components/Container/Container.mjs +4 -5
- package/lib/components/Container/Container.mjs.map +1 -1
- package/lib/components/Container/index.stories.d.ts +5 -5
- package/lib/components/CustomImage/CustomImage.js +13 -13
- package/lib/components/CustomImage/CustomImage.mjs +1 -1
- package/lib/components/Explore/Explore.js +5 -5
- package/lib/components/Explore/ExploreData.js +12 -12
- package/lib/components/Explore/ExploreData.js.map +1 -1
- package/lib/components/Explore/ExploreData.mjs +12 -12
- package/lib/components/Explore/ExploreData.mjs.map +1 -1
- package/lib/components/FeaturesSection_deprecated/AllFeaturesButton/AllFeaturesButton.js +1 -1
- package/lib/components/FeaturesSection_deprecated/AllFeaturesButton/AllFeaturesButton.mjs +1 -1
- package/lib/components/FeaturesSection_deprecated/Features/Features.js +2 -2
- package/lib/components/FeaturesSection_deprecated/FeaturesSection.js +22 -22
- package/lib/components/FeaturesSection_deprecated/assets/plus.svg.js +1 -1
- package/lib/components/FeaturesSection_deprecated/assets/plus.svg.mjs +2 -2
- package/lib/components/Footer/Footer.js +2 -2
- package/lib/components/Footer/hooks/useFooterContent.js +5 -5
- package/lib/components/Gallery/Gallery.context.js +17 -17
- package/lib/components/Gallery/Gallery.js +9 -9
- package/lib/components/Gallery/GalleryControls/GalleryControls.js +4 -4
- package/lib/components/Gallery/GalleryItem/GalleryItem.js +8 -8
- package/lib/components/Gallery/GalleryThumbnails/GalleryThumbnails.js +8 -8
- package/lib/components/GridGallery/GridGallery.js +8 -8
- package/lib/components/GridGallery/GridModal/GridModal.js +7 -7
- package/lib/components/GridGallery/GridModal/GridModal.mjs +1 -1
- package/lib/components/Header/AccountFrame/AccountFrame.js +11 -11
- package/lib/components/Header/AccountFrame/Mobile/Mobile.js +4 -4
- package/lib/components/Header/AccountMenu/AccountMenu.js +20 -30
- package/lib/components/Header/AccountMenu/AccountMenu.js.map +1 -1
- package/lib/components/Header/AccountMenu/AccountMenu.mjs +3 -13
- package/lib/components/Header/AccountMenu/AccountMenu.mjs.map +1 -1
- package/lib/components/Header/CartModal/Empty/Empty.js +3 -3
- package/lib/components/Header/CartModalV2/CartModal.js +6 -6
- package/lib/components/Header/CartModalV2/CartModal.mjs +1 -1
- package/lib/components/Header/CartModalV2/Item/Item.js +7 -7
- package/lib/components/Header/CartModalV2/Item/Item.mjs +2 -2
- package/lib/components/Header/CartModalV2/Item/Item.styles.d.ts +1 -1
- package/lib/components/Header/Header.js +44 -44
- package/lib/components/Header/Header.js.map +1 -1
- package/lib/components/Header/Header.mjs +10 -10
- package/lib/components/Header/Header.mjs.map +1 -1
- package/lib/components/Header/Header.styles.d.ts +12 -7
- package/lib/components/Header/Header.styles.js +32 -10
- package/lib/components/Header/Header.styles.js.map +1 -1
- package/lib/components/Header/Header.styles.mjs +31 -10
- package/lib/components/Header/Header.styles.mjs.map +1 -1
- package/lib/components/Header/Header.types.d.ts +5 -29
- package/lib/components/Header/Header.types.js +1 -2
- package/lib/components/Header/Header.types.js.map +1 -1
- package/lib/components/Header/Header.types.mjs +1 -2
- package/lib/components/Header/Header.types.mjs.map +1 -1
- package/lib/components/Header/IsolatedHeader.d.ts +0 -1
- package/lib/components/Header/IsolatedHeader.js +50 -50
- package/lib/components/Header/IsolatedHeader.js.map +1 -1
- package/lib/components/Header/IsolatedHeader.mjs +46 -47
- package/lib/components/Header/IsolatedHeader.mjs.map +1 -1
- package/lib/components/Header/LanguageFrame/LanguageFrame.js +6 -6
- package/lib/components/Header/MenuItem/MenuItem.styles.d.ts +1 -1
- package/lib/components/Header/MenuItem/MenuItem.styles.js +3 -3
- package/lib/components/Header/MenuItem/MenuItem.styles.js.map +1 -1
- package/lib/components/Header/MenuItem/MenuItem.styles.mjs +3 -3
- package/lib/components/Header/MenuItem/MenuItem.styles.mjs.map +1 -1
- package/lib/components/Header/MenuItem/MenuItem.types.d.ts +0 -1
- package/lib/components/Header/Navigation/Carousel/Carousel.js +5 -5
- package/lib/components/Header/Navigation/MicrositeMenu/MicrositeMenu.js +12 -12
- package/lib/components/Header/Navigation/MicrositeMenu/MicrositeMenu.styles.d.ts +1 -1
- package/lib/components/Header/Navigation/MobileMenu/MobileMenu.js +6 -6
- package/lib/components/Header/Navigation/MobileMenu/MobileMenu.styles.d.ts +1 -1
- package/lib/components/Header/Navigation/ProMobileMenu/ProMobileMenu.d.ts +1 -1
- package/lib/components/Header/Navigation/ProMobileMenu/ProMobileMenu.js +109 -116
- package/lib/components/Header/Navigation/ProMobileMenu/ProMobileMenu.js.map +1 -1
- package/lib/components/Header/Navigation/ProMobileMenu/ProMobileMenu.mjs +104 -111
- package/lib/components/Header/Navigation/ProMobileMenu/ProMobileMenu.mjs.map +1 -1
- package/lib/components/Header/Navigation/ProMobileMenu/ProMobileMenu.styles.d.ts +0 -9
- package/lib/components/Header/Navigation/ProMobileMenu/ProMobileMenu.styles.js +1 -15
- package/lib/components/Header/Navigation/ProMobileMenu/ProMobileMenu.styles.js.map +1 -1
- package/lib/components/Header/Navigation/ProMobileMenu/ProMobileMenu.styles.mjs +2 -13
- package/lib/components/Header/Navigation/ProMobileMenu/ProMobileMenu.styles.mjs.map +1 -1
- package/lib/components/Header/Navigation/ProMobileMenu/ProMobileMenu.types.d.ts +6 -12
- package/lib/components/Header/Overlay/Overlay.js +3 -3
- package/lib/components/Header/ProHeader/ProHeader.d.ts +5 -9
- package/lib/components/Header/ProHeader/ProHeader.js +189 -270
- package/lib/components/Header/ProHeader/ProHeader.js.map +1 -1
- package/lib/components/Header/ProHeader/ProHeader.mjs +171 -251
- package/lib/components/Header/ProHeader/ProHeader.mjs.map +1 -1
- package/lib/components/Header/ProHeader/ProHeader.styles.d.ts +25 -30
- package/lib/components/Header/ProHeader/ProHeader.styles.js +66 -119
- package/lib/components/Header/ProHeader/ProHeader.styles.js.map +1 -1
- package/lib/components/Header/ProHeader/ProHeader.styles.mjs +65 -112
- package/lib/components/Header/ProHeader/ProHeader.styles.mjs.map +1 -1
- package/lib/components/Header/translations/ar.json.js +1 -4
- package/lib/components/Header/translations/ar.json.js.map +1 -1
- package/lib/components/Header/translations/ar.json.mjs +2 -4
- package/lib/components/Header/translations/ar.json.mjs.map +1 -1
- package/lib/components/Header/translations/de.json.js +1 -4
- package/lib/components/Header/translations/de.json.js.map +1 -1
- package/lib/components/Header/translations/de.json.mjs +2 -4
- package/lib/components/Header/translations/de.json.mjs.map +1 -1
- package/lib/components/Header/translations/el.json.js +1 -4
- package/lib/components/Header/translations/el.json.js.map +1 -1
- package/lib/components/Header/translations/el.json.mjs +2 -4
- package/lib/components/Header/translations/el.json.mjs.map +1 -1
- package/lib/components/Header/translations/en.json.js +1 -7
- package/lib/components/Header/translations/en.json.js.map +1 -1
- package/lib/components/Header/translations/en.json.mjs +2 -6
- package/lib/components/Header/translations/en.json.mjs.map +1 -1
- package/lib/components/Header/translations/es.json.js +1 -4
- package/lib/components/Header/translations/es.json.js.map +1 -1
- package/lib/components/Header/translations/es.json.mjs +2 -4
- package/lib/components/Header/translations/es.json.mjs.map +1 -1
- package/lib/components/Header/translations/fr.json.js +1 -4
- package/lib/components/Header/translations/fr.json.js.map +1 -1
- package/lib/components/Header/translations/fr.json.mjs +2 -4
- package/lib/components/Header/translations/fr.json.mjs.map +1 -1
- package/lib/components/Header/translations/it.json.js +1 -4
- package/lib/components/Header/translations/it.json.js.map +1 -1
- package/lib/components/Header/translations/it.json.mjs +2 -4
- package/lib/components/Header/translations/it.json.mjs.map +1 -1
- package/lib/components/Header/translations/ja.json.js +1 -4
- package/lib/components/Header/translations/ja.json.js.map +1 -1
- package/lib/components/Header/translations/ja.json.mjs +2 -4
- package/lib/components/Header/translations/ja.json.mjs.map +1 -1
- package/lib/components/Header/translations/pt-BR.json.js +1 -4
- package/lib/components/Header/translations/pt-BR.json.js.map +1 -1
- package/lib/components/Header/translations/pt-BR.json.mjs +2 -4
- package/lib/components/Header/translations/pt-BR.json.mjs.map +1 -1
- package/lib/components/Header/translations/zh-Hans.json.js +1 -4
- package/lib/components/Header/translations/zh-Hans.json.js.map +1 -1
- package/lib/components/Header/translations/zh-Hans.json.mjs +2 -4
- package/lib/components/Header/translations/zh-Hans.json.mjs.map +1 -1
- package/lib/components/Header/translations/zh-Hant-TW.json.js +1 -4
- package/lib/components/Header/translations/zh-Hant-TW.json.js.map +1 -1
- package/lib/components/Header/translations/zh-Hant-TW.json.mjs +2 -4
- package/lib/components/Header/translations/zh-Hant-TW.json.mjs.map +1 -1
- package/lib/components/Hero/Hero.js +5 -5
- package/lib/components/Hero/Hero.styles.d.ts +2 -2
- package/lib/components/HeroFadeGallery/HeroFadeGallery.styles.d.ts +1 -1
- package/lib/components/HeroVideo/HeroVideo.js +5 -5
- package/lib/components/HowToUseSection/HowToUseSection.styles.d.ts +2 -2
- package/lib/components/ImageCarousel/ImageCarousel.js +29 -29
- package/lib/components/ImageSequence/ImageSequence.js +8 -8
- package/lib/components/LandingPage/Cards/Card/Card.js +4 -4
- package/lib/components/LandingPage/Cards/Cards.js +10 -10
- package/lib/components/LandingPage/LandingPage.js +2 -2
- package/lib/components/LandingPagePro/LandingPagePro.js +13 -13
- package/lib/components/LandingPagePro/LandingPagePro.styles.d.ts +1 -1
- package/lib/components/LandingPageSearch/LandingPageSearch.js +2 -2
- package/lib/components/LandingPageSearch/Modal/Modal.js +9 -9
- package/lib/components/LandingPageSidebar/LandingPageSidebar.js +13 -13
- package/lib/components/LandingPageSidebar/LandingPageSidebar.mjs +1 -1
- package/lib/components/LayoutRenderer/LayoutRenderer.js +8 -8
- package/lib/components/LayoutRenderer/LayoutRenderer.styles.d.ts +1 -1
- package/lib/components/LayoutRendererV1/LayoutRenderer.styles.d.ts +3 -3
- package/lib/components/LayoutRendererV2/LayoutRenderer.styles.d.ts +3 -3
- package/lib/components/LoaderDots/LoaderDots.d.ts +1 -1
- package/lib/components/LoaderDots/LoaderDots.js +1 -3
- package/lib/components/LoaderDots/LoaderDots.js.map +1 -1
- package/lib/components/LoaderDots/LoaderDots.mjs +1 -3
- package/lib/components/LoaderDots/LoaderDots.mjs.map +1 -1
- package/lib/components/LoaderDots/LoaderDots.styles.d.ts +1 -2
- package/lib/components/LoaderDots/LoaderDots.styles.js +1 -11
- package/lib/components/LoaderDots/LoaderDots.styles.js.map +1 -1
- package/lib/components/LoaderDots/LoaderDots.styles.mjs +1 -11
- package/lib/components/LoaderDots/LoaderDots.styles.mjs.map +1 -1
- package/lib/components/LoaderDots/LoaderDots.types.d.ts +0 -2
- package/lib/components/MeetUniFiVideoPlayer/EpisodeCard/EpisodeCard.js +7 -7
- package/lib/components/MeetUniFiVideoPlayer/MeetUniFiVideoPlayer.js +18 -18
- package/lib/components/MeetUniFiVideoPlayer/MeetUniFiVideoPlayer.styles.d.ts +1 -1
- package/lib/components/MicrositeColumnFeatureProgressBar/MicrositeColumnFeatureProgressBar.js +2 -2
- package/lib/components/MicrositeFeatureChecklist/MicrositeFeatureChecklist.js +3 -3
- package/lib/components/MicrositeFeatureProgressBar/MicrositeFeatureProgressBar.js +3 -3
- package/lib/components/MicrositeHero/MicrositeHero.js +18 -18
- package/lib/components/MicrositeIntroductionBlock/MicrositeIntroductionBlock.js +4 -4
- package/lib/components/MicrositeMediaGrid/MicrositeMediaGrid.js +9 -9
- package/lib/components/MicrositeProductGrid/MicrositeProductGrid.js +8 -8
- package/lib/components/MicrositeProductLearnMoreBlock/MicrositeProductLearnMoreBlockWrap.js +2 -2
- package/lib/components/MicrositeSectionWrap/MicrositeSectionWrap.styles.d.ts +1 -1
- package/lib/components/MicrositeSubSubNavigation/MicrositeSubSubNavigation.js +3 -3
- package/lib/components/MicrositeVideoSlideshow/MicrositeVideoSlideshow.js +12 -12
- package/lib/components/Microsites/MicrositePageContext.js +2 -2
- package/lib/components/Microsites/MicrositeProductPage.js +3 -3
- package/lib/components/Microsites/context/MicrositeProductPageContext.js +3 -3
- package/lib/components/MobileModal/MobileModal.js +4 -4
- package/lib/components/Modal/Modal.js +3 -3
- package/lib/components/ModelCompareV3/ModelCompareOverflowScrollButton.js +3 -3
- package/lib/components/ModelCompareV3/ModelComparePropertyValueGridItem.js +2 -2
- package/lib/components/ModelCompareV3/ModelCompareV3.js +14 -14
- package/lib/components/ModelCompareV3/ProductGroupsGrid.js +3 -3
- package/lib/components/ModelCompareV3/ScrollGroup/ScrollGroup.js +5 -5
- package/lib/components/ModelCompareV3/ScrollGroup/context.js +3 -3
- package/lib/components/ModelCompareV3/ScrollGroup/useScrollGroupItem.js +8 -8
- package/lib/components/ModelCompareV3/ScrollGroup/useScrollGroupSetScroll.js +2 -2
- package/lib/components/ModelCompareV3/ScrollGroup/useScrollGroupTo.js +2 -2
- package/lib/components/ModelCompareV3/StickyGrid/StickyGrid.js +7 -7
- package/lib/components/ModelCompareV3/StickyGrid/StickyGridBody.js +2 -2
- package/lib/components/ModelCompareV3/StickyGrid/StickyGridHeader.js +5 -5
- package/lib/components/ModelCompareV3/StickyGrid/StickyGridItem.js +2 -2
- package/lib/components/ModelCompareV3/StickyGrid/context.js +3 -3
- package/lib/components/ModelCompareV3/assets/Consoles/bigCompare/udmPro.jpg.js +5 -5
- package/lib/components/ModelCompareV3/assets/Consoles/bigCompare/udmPro.jpg.mjs +2 -2
- package/lib/components/ModelCompareV3/assets/Consoles/bigCompare/udmProMax.jpg.js +5 -5
- package/lib/components/ModelCompareV3/assets/Consoles/bigCompare/udmProMax.jpg.mjs +2 -2
- package/lib/components/ModelCompareV3/assets/Consoles/udmPro.jpg.js +1 -1
- package/lib/components/ModelCompareV3/assets/Consoles/udmPro.jpg.mjs +2 -2
- package/lib/components/ModelCompareV3/assets/Consoles/udmProMax.jpg.js +1 -1
- package/lib/components/ModelCompareV3/assets/Consoles/udmProMax.jpg.mjs +2 -2
- package/lib/components/ModelCompareV3/assets/poe.svg.js +1 -1
- package/lib/components/ModelCompareV3/assets/poe.svg.mjs +2 -2
- package/lib/components/ModelCompareV3/assets/port.svg.js +1 -1
- package/lib/components/ModelCompareV3/assets/port.svg.mjs +2 -2
- package/lib/components/ModelCompareV3/data/CloudGateways.js +6 -6
- package/lib/components/ModelCompareV3/data/CloudGateways.mjs +4 -4
- package/lib/components/ModelCompareV3/data/products/cloudKeyEnterprise.js +2 -4
- package/lib/components/ModelCompareV3/data/products/cloudKeyEnterprise.js.map +1 -1
- package/lib/components/ModelCompareV3/data/products/cloudKeyEnterprise.mjs +2 -4
- package/lib/components/ModelCompareV3/data/products/cloudKeyEnterprise.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/products/cloudKeyG2Plus.js +2 -2
- package/lib/components/ModelCompareV3/data/products/cloudKeyG2Plus.js.map +1 -1
- package/lib/components/ModelCompareV3/data/products/cloudKeyG2Plus.mjs +2 -2
- package/lib/components/ModelCompareV3/data/products/cloudKeyG2Plus.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/products/express.js +3 -3
- package/lib/components/ModelCompareV3/data/products/express.js.map +1 -1
- package/lib/components/ModelCompareV3/data/products/express.mjs +3 -3
- package/lib/components/ModelCompareV3/data/products/express.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/products/gatewayEnterprise.js +2 -4
- package/lib/components/ModelCompareV3/data/products/gatewayEnterprise.js.map +1 -1
- package/lib/components/ModelCompareV3/data/products/gatewayEnterprise.mjs +2 -4
- package/lib/components/ModelCompareV3/data/products/gatewayEnterprise.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/products/gatewayLite.js +2 -4
- package/lib/components/ModelCompareV3/data/products/gatewayLite.js.map +1 -1
- package/lib/components/ModelCompareV3/data/products/gatewayLite.mjs +2 -4
- package/lib/components/ModelCompareV3/data/products/gatewayLite.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/products/gatewayMax.js +2 -4
- package/lib/components/ModelCompareV3/data/products/gatewayMax.js.map +1 -1
- package/lib/components/ModelCompareV3/data/products/gatewayMax.mjs +2 -4
- package/lib/components/ModelCompareV3/data/products/gatewayMax.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/products/gatewayProfessional.js +2 -4
- package/lib/components/ModelCompareV3/data/products/gatewayProfessional.js.map +1 -1
- package/lib/components/ModelCompareV3/data/products/gatewayProfessional.mjs +2 -4
- package/lib/components/ModelCompareV3/data/products/gatewayProfessional.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/products/officialUniFiHosting.js +1 -3
- package/lib/components/ModelCompareV3/data/products/officialUniFiHosting.js.map +1 -1
- package/lib/components/ModelCompareV3/data/products/officialUniFiHosting.mjs +1 -3
- package/lib/components/ModelCompareV3/data/products/officialUniFiHosting.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/products/ucgMax.js +1 -1
- package/lib/components/ModelCompareV3/data/products/ucgMax.js.map +1 -1
- package/lib/components/ModelCompareV3/data/products/ucgMax.mjs +1 -1
- package/lib/components/ModelCompareV3/data/products/ucgMax.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/products/ucgUltra.js +3 -3
- package/lib/components/ModelCompareV3/data/products/ucgUltra.js.map +1 -1
- package/lib/components/ModelCompareV3/data/products/ucgUltra.mjs +3 -3
- package/lib/components/ModelCompareV3/data/products/ucgUltra.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/products/udmPro.js +4 -4
- package/lib/components/ModelCompareV3/data/products/udmPro.js.map +1 -1
- package/lib/components/ModelCompareV3/data/products/udmPro.mjs +4 -4
- package/lib/components/ModelCompareV3/data/products/udmPro.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/products/udmProMax.js +4 -4
- package/lib/components/ModelCompareV3/data/products/udmProMax.js.map +1 -1
- package/lib/components/ModelCompareV3/data/products/udmProMax.mjs +4 -4
- package/lib/components/ModelCompareV3/data/products/udmProMax.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/products/udmProSpecial.js +3 -3
- package/lib/components/ModelCompareV3/data/products/udmProSpecial.js.map +1 -1
- package/lib/components/ModelCompareV3/data/products/udmProSpecial.mjs +3 -3
- package/lib/components/ModelCompareV3/data/products/udmProSpecial.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/products/udr.js +41 -5
- package/lib/components/ModelCompareV3/data/products/udr.js.map +1 -1
- package/lib/components/ModelCompareV3/data/products/udr.mjs +21 -5
- package/lib/components/ModelCompareV3/data/products/udr.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/products/udw.js +3 -3
- package/lib/components/ModelCompareV3/data/products/udw.js.map +1 -1
- package/lib/components/ModelCompareV3/data/products/udw.mjs +3 -3
- package/lib/components/ModelCompareV3/data/products/udw.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/properties/powerMethodPoe.js +1 -1
- package/lib/components/ModelCompareV3/data/properties/powerMethodPoe.mjs +1 -1
- package/lib/components/ModelCompareV3/data/properties/readerPowerMethod.js +1 -1
- package/lib/components/ModelCompareV3/data/properties/readerPowerMethod.mjs +1 -1
- package/lib/components/ModelCompareV3/data/properties/redundantRj45Port.js +1 -1
- package/lib/components/ModelCompareV3/data/properties/redundantRj45Port.mjs +1 -1
- package/lib/components/Pagination/Pagination.js +3 -3
- package/lib/components/PriceRangeSlider/PriceRangeSlider.js +16 -16
- package/lib/components/ProductCard/ProductCard.js +7 -7
- package/lib/components/ProductCardPopup/ProductCardPopup.js +8 -8
- package/lib/components/ProductCompare/ProductCompare.js +7 -7
- package/lib/components/ProductDetails/ProductDetails.js +5 -5
- package/lib/components/ProductGrid/ProductGrid.js +10 -10
- package/lib/components/ProductKeyFeatures/ProductKeyFeatures.js +3 -3
- package/lib/components/ProductSectionNavigation/ProductSectionNavigation.styles.d.ts +1 -1
- package/lib/components/ProductSectionNavigationV2/ProductSectionNavigation.styles.d.ts +1 -1
- package/lib/components/ProductSectionTabs/ProductSectionTabs.js +2 -2
- package/lib/components/ProductTechSpecs/ProductTechSpecs.styles.d.ts +2 -2
- package/lib/components/ProductWizard/Options/Options.js +3 -3
- package/lib/components/ProductWizard/ProductWizard.js +2 -2
- package/lib/components/ProductWizardFootnotes/ProductWizardFootnotes.js +5 -5
- package/lib/components/ProgressCircle/ProgressCircle.js +4 -4
- package/lib/components/QuantityControls/QuantityControls.js +6 -6
- package/lib/components/QuantityControls/QuantityControls.js.map +1 -1
- package/lib/components/QuantityControls/QuantityControls.mjs +2 -2
- package/lib/components/QuantityControls/QuantityControls.mjs.map +1 -1
- package/lib/components/QuantityControls/QuantityControls.types.d.ts +1 -1
- package/lib/components/QuantityInput/QuantityInput.js +1 -6
- package/lib/components/QuantityInput/QuantityInput.js.map +1 -1
- package/lib/components/QuantityInput/QuantityInput.mjs +1 -6
- package/lib/components/QuantityInput/QuantityInput.mjs.map +1 -1
- package/lib/components/RelatedProducts/RelatedProducts.js +5 -5
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/ComputeResourceCalculator.js +36 -36
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/DeviceSelect/DeviceSelect.js +12 -12
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/InputCard/InputCard.js +5 -5
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/InputCard/InputSections/CheckboxSection.js +2 -2
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/InputCard/InputSections/CounterSection.js +6 -6
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/InputCard/InputSections/CounterSection.mjs +2 -2
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/InputCard/InputSections/SliderSection.js +3 -3
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/InputCard/assets/minus.svg.js +1 -1
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/InputCard/assets/minus.svg.mjs +2 -2
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/InputCard/assets/plus.svg.js +1 -1
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/InputCard/assets/plus.svg.mjs +2 -2
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/ProgressBarChart/ProgressBarChart.js +7 -7
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/useComputeResourceCalculator.js +6 -6
- package/lib/components/ResourceCalculatorV1/PoeCalculator/PoeCalculator.js +9 -9
- package/lib/components/ResourceCalculatorV1/PoeCalculator/components/PoeConsumerConfigurator/PoeConsumerConfigurator.js +10 -10
- package/lib/components/ResourceCalculatorV1/PoeCalculator/components/PoeConsumerConfigurator/PoeConsumerSelectModal/PoeConsumerSelectModal.js +17 -17
- package/lib/components/ResourceCalculatorV1/PoeCalculator/components/PoeConsumerConfigurator/PoeConsumerSelectModal/PoeConsumerSelectModal.mjs +2 -2
- package/lib/components/ResourceCalculatorV1/PoeCalculator/components/PoeConsumerConfigurator/assets/minus.svg.js +1 -1
- package/lib/components/ResourceCalculatorV1/PoeCalculator/components/PoeConsumerConfigurator/assets/minus.svg.mjs +2 -2
- package/lib/components/ResourceCalculatorV1/PoeCalculator/components/PoeConsumerConfigurator/assets/plus.svg.js +1 -1
- package/lib/components/ResourceCalculatorV1/PoeCalculator/components/PoeConsumerConfigurator/assets/plus.svg.mjs +2 -2
- package/lib/components/ResourceCalculatorV1/PoeCalculator/components/RecommendedPoeSwitches/RecommendedPoeSwitches.js +4 -4
- package/lib/components/ResourceCalculatorV1/PoeCalculator/components/RecommendedPoeSwitches/RecommendedPoeSwitches.mjs +2 -2
- package/lib/components/ResourceCalculatorV1/PoeCalculator/components/RecommendedPoeSwitches/assets/poe.svg.js +1 -1
- package/lib/components/ResourceCalculatorV1/PoeCalculator/components/RecommendedPoeSwitches/assets/poe.svg.mjs +2 -2
- package/lib/components/ResourceCalculatorV1/PoeCalculator/components/RecommendedPoeSwitches/assets/port.svg.js +1 -1
- package/lib/components/ResourceCalculatorV1/PoeCalculator/components/RecommendedPoeSwitches/assets/port.svg.mjs +2 -2
- package/lib/components/ResourceCalculatorV1/ResourceCalculator.js +6 -6
- package/lib/components/ReverseLoopingVideo/ReverseLoopingVideo.js +5 -5
- package/lib/components/ScrollWrapper/ScrollWrapper.d.ts +1 -1
- package/lib/components/ScrollWrapper/ScrollWrapper.js +25 -33
- package/lib/components/ScrollWrapper/ScrollWrapper.js.map +1 -1
- package/lib/components/ScrollWrapper/ScrollWrapper.mjs +8 -16
- package/lib/components/ScrollWrapper/ScrollWrapper.mjs.map +1 -1
- package/lib/components/ScrollWrapper/ScrollWrapper.types.d.ts +0 -2
- package/lib/components/Search/Input/Input.d.ts +1 -1
- package/lib/components/Search/Input/Input.js +9 -9
- package/lib/components/Search/Input/Input.js.map +1 -1
- package/lib/components/Search/Input/Input.mjs +5 -5
- package/lib/components/Search/Input/Input.mjs.map +1 -1
- package/lib/components/Search/Input/Input.styles.js +1 -0
- package/lib/components/Search/Input/Input.styles.js.map +1 -1
- package/lib/components/Search/Input/Input.styles.mjs +1 -0
- package/lib/components/Search/Input/Input.styles.mjs.map +1 -1
- package/lib/components/Search/Input/Input.types.d.ts +2 -3
- package/lib/components/Search/Modal/Modal.js +3 -3
- package/lib/components/StorageSliders/Slider/Slider.js +3 -3
- package/lib/components/StorageSliders/StorageSliders.context.js +20 -20
- package/lib/components/StorageSliders/StorageSliders.js +4 -4
- package/lib/components/Tooltip/Tooltip.js +5 -5
- package/lib/components/VariantSelector/Variant/Compatibility/Compatibility.js +7 -7
- package/lib/components/VariantSelector/Variant/Variant.js +40 -40
- package/lib/components/VariantSelector/VariantSelector.js +16 -16
- package/lib/components/VideoPlayerNew/VideoPlayer.js +20 -20
- package/lib/components/VideoPlayerNew/VideoPlayer.mjs +1 -1
- package/lib/components/VideoPlayerNew/assets/close.svg.js +1 -1
- package/lib/components/VideoPlayerNew/assets/close.svg.mjs +2 -2
- package/lib/components/index.d.ts +0 -1
- package/lib/components/index.js +0 -2
- package/lib/components/index.js.map +1 -1
- package/lib/components/index.mjs +0 -2
- package/lib/components/index.mjs.map +1 -1
- package/lib/constants/icons/generic/close.svg.js +1 -1
- package/lib/constants/icons/generic/close.svg.mjs +2 -2
- package/lib/constants/icons/generic/index.js +4 -4
- package/lib/constants/icons/generic/index.mjs +2 -2
- package/lib/constants/icons/generic/plus.svg.js +5 -5
- package/lib/constants/icons/generic/plus.svg.mjs +2 -2
- package/lib/constants/proStoreCategories/mapping/filters.d.ts +0 -17
- package/lib/constants/proStoreCategories/mapping/filters.js +0 -17
- package/lib/constants/proStoreCategories/mapping/filters.js.map +1 -1
- package/lib/constants/proStoreCategories/mapping/filters.mjs +0 -17
- package/lib/constants/proStoreCategories/mapping/filters.mjs.map +1 -1
- package/lib/constants/proStoreCategories/mapping/index.d.ts +2 -4
- package/lib/constants/proStoreCategories/mapping/index.js +51 -50
- package/lib/constants/proStoreCategories/mapping/index.js.map +1 -1
- package/lib/constants/proStoreCategories/mapping/index.mjs +49 -49
- package/lib/constants/proStoreCategories/mapping/index.mjs.map +1 -1
- package/lib/constants/proStoreCategories/mapping/mapping.d.ts +0 -5
- package/lib/constants/proStoreCategories/mapping/redirects.js +3 -18
- package/lib/constants/proStoreCategories/mapping/redirects.js.map +1 -1
- package/lib/constants/proStoreCategories/mapping/redirects.mjs +3 -18
- package/lib/constants/proStoreCategories/mapping/redirects.mjs.map +1 -1
- package/lib/constants/proStoreCategories/mapping/unifi.d.ts +9 -9
- package/lib/constants/proStoreCategories/mapping/unifi.js +9 -9
- package/lib/constants/proStoreCategories/mapping/unifi.js.map +1 -1
- package/lib/constants/proStoreCategories/mapping/unifi.mjs +9 -9
- package/lib/constants/proStoreCategories/mapping/unifi.mjs.map +1 -1
- package/lib/constants/proStoreCategories/translations/ar.json.js +3 -7
- package/lib/constants/proStoreCategories/translations/ar.json.js.map +1 -1
- package/lib/constants/proStoreCategories/translations/ar.json.mjs +4 -7
- package/lib/constants/proStoreCategories/translations/ar.json.mjs.map +1 -1
- package/lib/constants/proStoreCategories/translations/de.json.js +3 -7
- package/lib/constants/proStoreCategories/translations/de.json.js.map +1 -1
- package/lib/constants/proStoreCategories/translations/de.json.mjs +4 -7
- package/lib/constants/proStoreCategories/translations/de.json.mjs.map +1 -1
- package/lib/constants/proStoreCategories/translations/el.json.js +3 -7
- package/lib/constants/proStoreCategories/translations/el.json.js.map +1 -1
- package/lib/constants/proStoreCategories/translations/el.json.mjs +4 -7
- package/lib/constants/proStoreCategories/translations/el.json.mjs.map +1 -1
- package/lib/constants/proStoreCategories/translations/en.json.js +3 -7
- package/lib/constants/proStoreCategories/translations/en.json.js.map +1 -1
- package/lib/constants/proStoreCategories/translations/en.json.mjs +4 -7
- package/lib/constants/proStoreCategories/translations/en.json.mjs.map +1 -1
- package/lib/constants/proStoreCategories/translations/es.json.js +3 -7
- package/lib/constants/proStoreCategories/translations/es.json.js.map +1 -1
- package/lib/constants/proStoreCategories/translations/es.json.mjs +4 -7
- package/lib/constants/proStoreCategories/translations/es.json.mjs.map +1 -1
- package/lib/constants/proStoreCategories/translations/fr.json.js +3 -7
- package/lib/constants/proStoreCategories/translations/fr.json.js.map +1 -1
- package/lib/constants/proStoreCategories/translations/fr.json.mjs +4 -7
- package/lib/constants/proStoreCategories/translations/fr.json.mjs.map +1 -1
- package/lib/constants/proStoreCategories/translations/it.json.js +3 -7
- package/lib/constants/proStoreCategories/translations/it.json.js.map +1 -1
- package/lib/constants/proStoreCategories/translations/it.json.mjs +4 -7
- package/lib/constants/proStoreCategories/translations/it.json.mjs.map +1 -1
- package/lib/constants/proStoreCategories/translations/ja.json.js +3 -7
- package/lib/constants/proStoreCategories/translations/ja.json.js.map +1 -1
- package/lib/constants/proStoreCategories/translations/ja.json.mjs +4 -7
- package/lib/constants/proStoreCategories/translations/ja.json.mjs.map +1 -1
- package/lib/constants/proStoreCategories/translations/pt-BR.json.js +3 -7
- package/lib/constants/proStoreCategories/translations/pt-BR.json.js.map +1 -1
- package/lib/constants/proStoreCategories/translations/pt-BR.json.mjs +4 -7
- package/lib/constants/proStoreCategories/translations/pt-BR.json.mjs.map +1 -1
- package/lib/constants/proStoreCategories/translations/zh-Hans.json.js +3 -7
- package/lib/constants/proStoreCategories/translations/zh-Hans.json.js.map +1 -1
- package/lib/constants/proStoreCategories/translations/zh-Hans.json.mjs +4 -7
- package/lib/constants/proStoreCategories/translations/zh-Hans.json.mjs.map +1 -1
- package/lib/constants/proStoreCategories/translations/zh-Hant-TW.json.js +3 -7
- package/lib/constants/proStoreCategories/translations/zh-Hant-TW.json.js.map +1 -1
- package/lib/constants/proStoreCategories/translations/zh-Hant-TW.json.mjs +4 -7
- package/lib/constants/proStoreCategories/translations/zh-Hant-TW.json.mjs.map +1 -1
- package/lib/constants/proStoreFilters/mapping.d.ts +3 -55
- package/lib/constants/proStoreFilters/mapping.js +10 -140
- package/lib/constants/proStoreFilters/mapping.js.map +1 -1
- package/lib/constants/proStoreFilters/mapping.mjs +10 -140
- package/lib/constants/proStoreFilters/mapping.mjs.map +1 -1
- package/lib/constants/theme.js +0 -4
- package/lib/constants/theme.js.map +1 -1
- package/lib/constants/theme.mjs +0 -4
- package/lib/constants/theme.mjs.map +1 -1
- package/lib/contexts/MenuContext/context.js +34 -34
- package/lib/contexts/MenuContext/context.js.map +1 -1
- package/lib/contexts/MenuContext/context.mjs +1 -1
- package/lib/contexts/MenuContext/context.mjs.map +1 -1
- package/lib/contexts/MenuContext/mapping.js.map +1 -1
- package/lib/contexts/MenuContext/mapping.mjs.map +1 -1
- package/lib/helpers/index.js +0 -1
- package/lib/helpers/index.js.map +1 -1
- package/lib/helpers/index.mjs +1 -1
- package/lib/helpers/proStoreCategories.js +2 -2
- package/lib/helpers/ux.d.ts +0 -8
- package/lib/helpers/ux.js +0 -15
- package/lib/helpers/ux.js.map +1 -1
- package/lib/helpers/ux.mjs +1 -15
- package/lib/helpers/ux.mjs.map +1 -1
- package/lib/hooks/useHasTouch.js +3 -3
- package/lib/hooks/useHddRetentionCalculator.js +5 -5
- package/lib/hooks/useHorizontalScroll.js +2 -2
- package/lib/hooks/useLockBodyScrollCustom.js +3 -3
- package/lib/hooks/useScrollToY.js +2 -2
- package/lib/hooks/useTestMediaElementVolumeSetter.js +3 -3
- package/lib/hooks/useTranslation.js +6 -6
- package/lib/utils/nextjs/ssr/registry.js +2 -2
- package/package.json +1 -1
- package/lib/assets/cart-secondary.svg +0 -5
- package/lib/assets/icon-location-pin.svg +0 -5
- package/lib/assets/icons/cart-secondary.svg.js +0 -27
- package/lib/assets/icons/cart-secondary.svg.js.map +0 -1
- package/lib/assets/icons/cart-secondary.svg.mjs +0 -3
- package/lib/assets/icons/cart-secondary.svg.mjs.map +0 -1
- package/lib/assets/icons/menu/icon-location-pin.svg.js.map +0 -1
- package/lib/assets/icons/menu/icon-location-pin.svg.mjs +0 -3
- package/lib/assets/icons/menu/icon-location-pin.svg.mjs.map +0 -1
- package/lib/components/ButtonGroupBasic/index.stories.d.ts +0 -6
- package/lib/components/Header/Header.stories.d.ts +0 -111
- package/lib/components/Header/LogoIcon/LogoIcon.d.ts +0 -7
- package/lib/components/Header/LogoIcon/LogoIcon.js +0 -46
- package/lib/components/Header/LogoIcon/LogoIcon.js.map +0 -1
- package/lib/components/Header/LogoIcon/LogoIcon.mjs +0 -36
- package/lib/components/Header/LogoIcon/LogoIcon.mjs.map +0 -1
- package/lib/components/Header/LogoIcon/index.d.ts +0 -1
- package/lib/components/Header/LogoIcon/index.js +0 -6
- package/lib/components/Header/LogoIcon/index.js.map +0 -1
- package/lib/components/Header/LogoIcon/index.mjs +0 -3
- package/lib/components/Header/LogoIcon/index.mjs.map +0 -1
- package/lib/components/ProductTechSpecsV2/ProductTechSpecs.d.ts +0 -2
- package/lib/components/ProductTechSpecsV2/ProductTechSpecs.js +0 -81
- package/lib/components/ProductTechSpecsV2/ProductTechSpecs.js.map +0 -1
- package/lib/components/ProductTechSpecsV2/ProductTechSpecs.mjs +0 -73
- package/lib/components/ProductTechSpecsV2/ProductTechSpecs.mjs.map +0 -1
- package/lib/components/ProductTechSpecsV2/ProductTechSpecs.stories.d.ts +0 -5
- package/lib/components/ProductTechSpecsV2/ProductTechSpecs.styles.d.ts +0 -11
- package/lib/components/ProductTechSpecsV2/ProductTechSpecs.styles.js +0 -80
- package/lib/components/ProductTechSpecsV2/ProductTechSpecs.styles.js.map +0 -1
- package/lib/components/ProductTechSpecsV2/ProductTechSpecs.styles.mjs +0 -66
- package/lib/components/ProductTechSpecsV2/ProductTechSpecs.styles.mjs.map +0 -1
- package/lib/components/ProductTechSpecsV2/ProductTechSpecs.types.d.ts +0 -12
- package/lib/components/ProductTechSpecsV2/index.d.ts +0 -1
- package/lib/components/ProductTechSpecsV2/index.js +0 -6
- package/lib/components/ProductTechSpecsV2/index.js.map +0 -1
- package/lib/components/ProductTechSpecsV2/index.mjs +0 -3
- package/lib/components/ProductTechSpecsV2/index.mjs.map +0 -1
|
@@ -1,28 +1,24 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
2
2
|
import { useState, useCallback, useMemo } from 'react';
|
|
3
|
+
import '../../../../assets/icons/menu/icon-globe.svg.mjs';
|
|
3
4
|
import '../../../../assets/icons/menu/icon-history.svg.mjs';
|
|
4
|
-
import '../../../../assets/icons/menu/icon-location-pin.svg.mjs';
|
|
5
5
|
import '../../../../constants/icons/index.mjs';
|
|
6
6
|
import '../../../../contexts/MenuContext/index.mjs';
|
|
7
|
-
import { imageSrc } from '../../../../utils/asset.mjs';
|
|
8
|
-
import { isNonNullish } from '../../../../utils/typeGuards.mjs';
|
|
9
7
|
import { useFooterContent } from '../../../Footer/hooks/useFooterContent.mjs';
|
|
10
8
|
import '../../../StyleableSvgImage/index.mjs';
|
|
11
9
|
import { getSupportLinkMapping } from '../../LinksModal/mapping.mjs';
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import { SectionItemIcon, ProSectionItemButton, ButtonContent, Wrap, ButtonGroup, CustomButton } from './ProMobileMenu.styles.mjs';
|
|
10
|
+
import { NewLabel, SectionItemButton, Wrap, Container, InnerWrap, Section, SectionItemsGroup, SectionItem, SectionItemArrowButton, ButtonIcon } from '../MobileMenu/MobileMenu.styles.mjs';
|
|
11
|
+
import { SectionItemIcon, ButtonGroup, CustomButton } from './ProMobileMenu.styles.mjs';
|
|
15
12
|
import { useMenu } from '../../../../contexts/MenuContext/context.mjs';
|
|
16
13
|
import HistoryIcon__default from "../../../../assets/icon-history.svg";
|
|
17
|
-
import
|
|
14
|
+
import GlobeIcon__default from "../../../../assets/globe.svg";
|
|
18
15
|
import { StyleableSvgImage } from '../../../StyleableSvgImage/StyleableSvgImage.mjs';
|
|
19
16
|
import _externalAssets_BAXELvSy__default from "../../../../assets/collapseArrow.svg";
|
|
20
17
|
"use strict";
|
|
21
|
-
const motif = "light";
|
|
22
18
|
const NavigationProMobileMenu = function NavigationProMobileMenu2({
|
|
23
19
|
translations,
|
|
24
20
|
onClose,
|
|
25
|
-
|
|
21
|
+
currentCountryName,
|
|
26
22
|
handleStorePickerClick,
|
|
27
23
|
// handleEarlyAccessClick,
|
|
28
24
|
handleOrderHistoryClick,
|
|
@@ -30,9 +26,9 @@ const NavigationProMobileMenu = function NavigationProMobileMenu2({
|
|
|
30
26
|
handleProductLineChange,
|
|
31
27
|
productLineValue,
|
|
32
28
|
productLineOptions,
|
|
33
|
-
|
|
34
|
-
hideExtraSection
|
|
29
|
+
extraSectionItems
|
|
35
30
|
}) {
|
|
31
|
+
const motif = "light";
|
|
36
32
|
const {
|
|
37
33
|
footerContent,
|
|
38
34
|
socialContent
|
|
@@ -45,105 +41,111 @@ const NavigationProMobileMenu = function NavigationProMobileMenu2({
|
|
|
45
41
|
setExpandedSectionItemId(expandedSectionItemId === itemId ? null : itemId);
|
|
46
42
|
}, [expandedSectionItemId]);
|
|
47
43
|
const sections = useMemo(() => {
|
|
48
|
-
const
|
|
49
|
-
id: "support",
|
|
50
|
-
label: translations.support,
|
|
51
|
-
url: null,
|
|
52
|
-
subItems: getSupportLinkMapping(context).map(item => ({
|
|
53
|
-
id: item.id,
|
|
54
|
-
label: item.name,
|
|
55
|
-
url: item.url
|
|
56
|
-
}))
|
|
57
|
-
}, {
|
|
58
|
-
id: "social",
|
|
59
|
-
label: translations.social,
|
|
60
|
-
url: null,
|
|
61
|
-
subItems: socialContent.items.map(item => ({
|
|
62
|
-
id: item.id,
|
|
63
|
-
label: item.label,
|
|
64
|
-
url: item.src
|
|
65
|
-
}))
|
|
66
|
-
}, ...[{
|
|
67
|
-
key: "company",
|
|
68
|
-
label: translations.company
|
|
69
|
-
}, {
|
|
70
|
-
key: "training",
|
|
71
|
-
label: translations.training
|
|
72
|
-
}, {
|
|
73
|
-
key: "tools",
|
|
74
|
-
label: translations.tools
|
|
75
|
-
}].map(({
|
|
76
|
-
key,
|
|
77
|
-
label
|
|
78
|
-
}) => ({
|
|
79
|
-
id: key,
|
|
80
|
-
label,
|
|
81
|
-
url: null,
|
|
82
|
-
subItems: footerContent[key].items.map(item => ({
|
|
83
|
-
id: item.id,
|
|
84
|
-
label: item.label,
|
|
85
|
-
url: item.src
|
|
86
|
-
}))
|
|
87
|
-
}))];
|
|
88
|
-
return [{
|
|
44
|
+
const _sections = [{
|
|
89
45
|
id: "store-link-stuff",
|
|
90
|
-
items: [handleOrderHistoryClick ? {
|
|
46
|
+
items: [...(handleOrderHistoryClick ? [{
|
|
91
47
|
id: "order-history",
|
|
92
48
|
label: translations.orderHistory,
|
|
93
49
|
icon: {
|
|
94
|
-
src:
|
|
50
|
+
src: typeof HistoryIcon__default === "string" ? HistoryIcon__default : HistoryIcon__default.src,
|
|
95
51
|
width: 16,
|
|
96
52
|
height: 16
|
|
97
53
|
},
|
|
98
|
-
url:
|
|
99
|
-
|
|
54
|
+
url: () => {
|
|
55
|
+
handleOrderHistoryClick?.();
|
|
56
|
+
},
|
|
100
57
|
subItems: []
|
|
101
|
-
} :
|
|
58
|
+
}] : []), ...(handlePurchaseHistoryClick ? [{
|
|
102
59
|
id: "purchased-product-history",
|
|
103
60
|
label: translations.purchasedProductHistory,
|
|
104
61
|
icon: {
|
|
105
|
-
src:
|
|
62
|
+
src: typeof HistoryIcon__default === "string" ? HistoryIcon__default : HistoryIcon__default.src,
|
|
106
63
|
width: 16,
|
|
107
64
|
height: 16
|
|
108
65
|
},
|
|
109
|
-
url:
|
|
110
|
-
|
|
66
|
+
url: () => {
|
|
67
|
+
handlePurchaseHistoryClick?.();
|
|
68
|
+
},
|
|
111
69
|
subItems: []
|
|
112
|
-
} :
|
|
70
|
+
}] : [])
|
|
71
|
+
/**
|
|
72
|
+
* NOTE: Disabled per Kaspars request (09.06.)
|
|
73
|
+
* @see https://ui.slack.com/archives/C050CTJSE80/p1686331781297389
|
|
74
|
+
*/
|
|
75
|
+
// {
|
|
76
|
+
// id: "early-access",
|
|
77
|
+
// label: translations.earlyAccess,
|
|
78
|
+
// icon: {
|
|
79
|
+
// src: typeof EAIcon === "string" ? EAIcon : EAIcon.src,
|
|
80
|
+
// width: 20,
|
|
81
|
+
// height: 16,
|
|
82
|
+
// },
|
|
83
|
+
// url: () => {
|
|
84
|
+
// handleEarlyAccessClick?.();
|
|
85
|
+
// },
|
|
86
|
+
// subItems: [],
|
|
87
|
+
// },
|
|
88
|
+
]
|
|
113
89
|
}, {
|
|
114
|
-
id: "
|
|
115
|
-
items:
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
90
|
+
id: "extra",
|
|
91
|
+
items: extraSectionItems ?? [{
|
|
92
|
+
id: "support",
|
|
93
|
+
label: translations.support,
|
|
94
|
+
url: null,
|
|
95
|
+
subItems: getSupportLinkMapping(context).map(item => ({
|
|
96
|
+
id: item.id,
|
|
97
|
+
label: item.name,
|
|
98
|
+
url: item.url
|
|
99
|
+
}))
|
|
100
|
+
}, {
|
|
101
|
+
id: "social",
|
|
102
|
+
label: translations.social,
|
|
103
|
+
url: null,
|
|
104
|
+
subItems: socialContent.items.map(item => ({
|
|
105
|
+
id: item.id,
|
|
106
|
+
label: item.label,
|
|
107
|
+
url: item.src
|
|
108
|
+
}))
|
|
109
|
+
}, ...[{
|
|
110
|
+
key: "company",
|
|
111
|
+
label: translations.company
|
|
112
|
+
}, {
|
|
113
|
+
key: "training",
|
|
114
|
+
label: translations.training
|
|
115
|
+
}, {
|
|
116
|
+
key: "tools",
|
|
117
|
+
label: translations.tools
|
|
118
|
+
}].map(({
|
|
119
|
+
key,
|
|
120
|
+
label
|
|
121
|
+
}) => ({
|
|
122
|
+
id: key,
|
|
123
|
+
label,
|
|
124
|
+
url: null,
|
|
125
|
+
subItems: footerContent[key].items.map(item => ({
|
|
126
|
+
id: item.id,
|
|
127
|
+
label: item.label,
|
|
128
|
+
url: item.src
|
|
129
|
+
}))
|
|
130
|
+
}))]
|
|
131
|
+
}, currentCountryName ? {
|
|
122
132
|
id: "country-selector",
|
|
123
133
|
items: [{
|
|
124
134
|
id: "current-country-name",
|
|
125
|
-
label:
|
|
126
|
-
value: /* @__PURE__ */jsxs(CurrentStoreWrap, {
|
|
127
|
-
onClick: handleStorePickerClick,
|
|
128
|
-
$inheritFonts: true,
|
|
129
|
-
children: [/* @__PURE__ */jsx(CurrentStoreFlag, {
|
|
130
|
-
children: logo.currentStore.flag
|
|
131
|
-
}), logo.currentStore.name]
|
|
132
|
-
}),
|
|
135
|
+
label: currentCountryName,
|
|
133
136
|
icon: {
|
|
134
|
-
src:
|
|
137
|
+
src: typeof GlobeIcon__default === "string" ? GlobeIcon__default : GlobeIcon__default.src,
|
|
135
138
|
width: 17,
|
|
136
139
|
height: 17
|
|
137
140
|
},
|
|
138
|
-
url:
|
|
139
|
-
|
|
141
|
+
url: () => {
|
|
142
|
+
handleStorePickerClick?.();
|
|
143
|
+
},
|
|
140
144
|
subItems: []
|
|
141
145
|
}]
|
|
142
|
-
} : null
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
})) : [])].filter(isNonNullish);
|
|
146
|
-
}, [translations.support, translations.social, translations.company, translations.training, translations.tools, translations.orderHistory, translations.purchasedProductHistory, translations.region, context, socialContent.items, handleOrderHistoryClick, handlePurchaseHistoryClick, categories.items, logo?.currentStore, handleStorePickerClick, hideExtraSection, footerContent]);
|
|
146
|
+
} : null];
|
|
147
|
+
return _sections.filter(el => !!el);
|
|
148
|
+
}, [context, currentCountryName, extraSectionItems, footerContent, handleOrderHistoryClick, handlePurchaseHistoryClick, handleStorePickerClick, socialContent.items, translations.company, translations.orderHistory, translations.purchasedProductHistory, translations.social, translations.support, translations.tools, translations.training]);
|
|
147
149
|
const renderSectionItemIcon = useCallback(item => {
|
|
148
150
|
return item.icon && /* @__PURE__ */jsx(SectionItemIcon, {
|
|
149
151
|
children: /* @__PURE__ */jsx(StyleableSvgImage, {
|
|
@@ -158,41 +160,32 @@ const NavigationProMobileMenu = function NavigationProMobileMenu2({
|
|
|
158
160
|
const NewLabelNode = "isNew" in item && item.isNew ? /* @__PURE__ */jsx(NewLabel, {
|
|
159
161
|
children: translations.new
|
|
160
162
|
}) : null;
|
|
161
|
-
const ValueNode = !!item.value && /* @__PURE__ */jsx("div", {
|
|
162
|
-
children: item.value
|
|
163
|
-
});
|
|
164
163
|
const target = "targetBlank" in item && item.targetBlank ? "_blank" : void 0;
|
|
165
164
|
const url = item.url;
|
|
166
165
|
if (!url) {
|
|
167
|
-
return /* @__PURE__ */jsxs(
|
|
166
|
+
return /* @__PURE__ */jsxs(SectionItemButton, {
|
|
168
167
|
motif,
|
|
169
|
-
onClick:
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
168
|
+
onClick: () => toggleExpandedSectionItemId(item.id),
|
|
169
|
+
children: [IconNode, item.label]
|
|
170
|
+
});
|
|
171
|
+
}
|
|
172
|
+
if (typeof url === "string") {
|
|
173
|
+
return /* @__PURE__ */jsxs(SectionItemButton, {
|
|
174
|
+
motif,
|
|
175
|
+
as: "a",
|
|
176
|
+
href: url,
|
|
177
|
+
onClick: onClose,
|
|
178
|
+
target,
|
|
179
|
+
children: [IconNode, item.label, NewLabelNode]
|
|
180
180
|
});
|
|
181
181
|
}
|
|
182
182
|
return /* @__PURE__ */jsxs(SectionItemButton, {
|
|
183
183
|
motif,
|
|
184
|
-
onClick:
|
|
185
|
-
|
|
184
|
+
onClick: () => {
|
|
185
|
+
url();
|
|
186
186
|
onClose();
|
|
187
187
|
},
|
|
188
|
-
|
|
189
|
-
as: "a",
|
|
190
|
-
href: url,
|
|
191
|
-
target
|
|
192
|
-
} : {}),
|
|
193
|
-
children: [/* @__PURE__ */jsxs(ButtonContent, {
|
|
194
|
-
children: [IconNode, item.label, NewLabelNode]
|
|
195
|
-
}), ValueNode]
|
|
188
|
+
children: [IconNode, item.label]
|
|
196
189
|
});
|
|
197
190
|
}, [onClose, renderSectionItemIcon, toggleExpandedSectionItemId, translations.new]);
|
|
198
191
|
return /* @__PURE__ */jsx(Wrap, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProMobileMenu.mjs","sources":["../../../../../src/components/Header/Navigation/ProMobileMenu/ProMobileMenu.tsx"],"sourcesContent":["/* eslint-disable @next/next/no-img-element */\nimport type { Motif } from \"@ubnt/ui-components/utils\";\nimport { useCallback, useMemo, useState } from \"react\";\n\nimport HistoryIcon from \"../../../../assets/icons/menu/icon-history.svg\";\nimport LocationPinIcon from \"../../../../assets/icons/menu/icon-location-pin.svg\";\nimport * as icons from \"../../../../constants/icons\";\nimport { useMenu } from \"../../../../contexts/MenuContext\";\nimport { imageSrc } from \"../../../../utils/asset\";\nimport { isNonNullish } from \"../../../../utils/typeGuards\";\nimport { useFooterContent } from \"../../../Footer/hooks/useFooterContent\";\nimport { StyleableSvgImage } from \"../../../StyleableSvgImage\";\nimport { getSupportLinkMapping } from \"../../LinksModal/mapping\";\nimport {\n CurrentStoreFlag,\n CurrentStoreWrap,\n} from \"../../ProHeader/ProHeader.styles\";\nimport * as S from \"../MobileMenu/MobileMenu.styles\";\nimport * as S2 from \"./ProMobileMenu.styles\";\nimport type {\n NavigationProMobileMenuProps,\n ProMobileMenuSection,\n ProMobileMenuSectionItem,\n ProMobileMenuSectionSubItem,\n} from \"./ProMobileMenu.types\";\n\nconst motif: Motif = \"light\";\n\nexport const NavigationProMobileMenu = function NavigationProMobileMenu({\n translations,\n onClose,\n logo,\n handleStorePickerClick,\n // handleEarlyAccessClick,\n handleOrderHistoryClick,\n handlePurchaseHistoryClick,\n handleProductLineChange,\n productLineValue,\n productLineOptions,\n categories,\n hideExtraSection,\n}: NavigationProMobileMenuProps) {\n const { footerContent, socialContent } = useFooterContent();\n const { context } = useMenu();\n\n // #############################################################################\n // Section toggling\n // #############################################################################\n const [expandedSectionItemId, setExpandedSectionItemId] = useState<\n string | null\n >(null);\n\n const toggleExpandedSectionItemId = useCallback(\n (itemId: string) => {\n setExpandedSectionItemId(\n expandedSectionItemId === itemId ? null : itemId,\n );\n },\n [expandedSectionItemId],\n );\n\n // #############################################################################\n // Menu sections\n // #############################################################################\n const sections = useMemo((): ProMobileMenuSection[] => {\n const extraSectionItems: ProMobileMenuSectionItem[] = [\n {\n id: \"support\",\n label: translations.support,\n url: null,\n subItems: getSupportLinkMapping(context).map((item) => ({\n id: item.id,\n label: item.name,\n url: item.url,\n })),\n },\n {\n id: \"social\",\n label: translations.social,\n url: null,\n subItems: socialContent.items.map((item) => ({\n id: item.id,\n label: item.label,\n url: item.src,\n })),\n },\n ...(\n [\n { key: \"company\", label: translations.company },\n { key: \"training\", label: translations.training },\n { key: \"tools\", label: translations.tools },\n ] as const\n ).map(({ key, label }) => ({\n id: key,\n label,\n url: null,\n subItems: footerContent[key].items.map((item) => ({\n id: item.id,\n label: item.label,\n url: item.src,\n })),\n })),\n ];\n\n return [\n {\n id: \"store-link-stuff\",\n items: [\n handleOrderHistoryClick\n ? ({\n id: \"order-history\",\n label: translations.orderHistory,\n icon: {\n src: imageSrc(HistoryIcon),\n width: 16,\n height: 16,\n },\n url: null,\n onClick: handleOrderHistoryClick,\n subItems: [],\n } satisfies ProMobileMenuSectionItem)\n : null,\n handlePurchaseHistoryClick\n ? ({\n id: \"purchased-product-history\",\n label: translations.purchasedProductHistory,\n icon: {\n src: imageSrc(HistoryIcon),\n width: 16,\n height: 16,\n },\n url: null,\n onClick: handlePurchaseHistoryClick,\n subItems: [],\n } satisfies ProMobileMenuSectionItem)\n : null,\n ].filter(isNonNullish),\n },\n\n {\n id: \"categories\",\n items: categories.items.map((item) => ({\n ...item,\n // Prevent top level items to be links - the whole item acts as a dropdown\n // Unless it has no sub-items\n url: item.subItems.length ? null : item.url,\n })),\n },\n\n logo?.currentStore\n ? {\n id: \"country-selector\",\n items: [\n {\n id: \"current-country-name\",\n label: translations.region,\n value: (\n <CurrentStoreWrap\n onClick={handleStorePickerClick}\n $inheritFonts\n >\n <CurrentStoreFlag>\n {logo.currentStore.flag}\n </CurrentStoreFlag>\n {logo.currentStore.name}\n </CurrentStoreWrap>\n ),\n icon: {\n src: imageSrc(LocationPinIcon),\n width: 17,\n height: 17,\n },\n url: null,\n onClick: handleStorePickerClick,\n subItems: [],\n },\n ],\n }\n : null,\n\n ...(!hideExtraSection\n ? extraSectionItems.map((item) => ({\n id: `extra-${item.id}`,\n items: [item],\n }))\n : []),\n ].filter(isNonNullish);\n }, [\n translations.support,\n translations.social,\n translations.company,\n translations.training,\n translations.tools,\n translations.orderHistory,\n translations.purchasedProductHistory,\n translations.region,\n context,\n socialContent.items,\n handleOrderHistoryClick,\n handlePurchaseHistoryClick,\n categories.items,\n logo?.currentStore,\n handleStorePickerClick,\n hideExtraSection,\n footerContent,\n ]);\n\n // #############################################################################\n // Render helpers\n // #############################################################################\n const renderSectionItemIcon = useCallback(\n (item: ProMobileMenuSection[\"items\"][number]): React.ReactNode => {\n return (\n item.icon && (\n <S2.SectionItemIcon>\n <StyleableSvgImage\n src={item.icon.src}\n width={item.icon.width}\n height={item.icon.height}\n />\n </S2.SectionItemIcon>\n )\n );\n },\n [],\n );\n\n const renderSectionItemButton = useCallback(\n (\n item: ProMobileMenuSectionItem | ProMobileMenuSectionSubItem,\n ): React.ReactNode => {\n const IconNode = \"subItems\" in item && renderSectionItemIcon(item);\n const NewLabelNode =\n \"isNew\" in item && item.isNew ? (\n <S.NewLabel>{translations.new}</S.NewLabel>\n ) : null;\n const ValueNode = !!item.value && <div>{item.value}</div>;\n\n const target =\n \"targetBlank\" in item && item.targetBlank ? \"_blank\" : undefined;\n const url = item.url;\n\n if (!url) {\n return (\n <S2.ProSectionItemButton\n motif={motif}\n onClick={(e) => {\n if (\"subItems\" in item && item.subItems.length) {\n toggleExpandedSectionItemId(item.id);\n } else {\n // On click callback only when not as a dropdown trigger\n item.onClick?.(e, url);\n onClose();\n }\n }}\n >\n <S2.ButtonContent>\n {IconNode}\n {item.label}\n {NewLabelNode}\n </S2.ButtonContent>\n {ValueNode}\n </S2.ProSectionItemButton>\n );\n }\n\n return (\n <S.SectionItemButton\n motif={motif}\n onClick={(e) => {\n item.onClick?.(e, url);\n onClose();\n }}\n {...(typeof url === \"string\"\n ? {\n as: \"a\",\n href: url,\n target,\n }\n : {})}\n >\n <S2.ButtonContent>\n {IconNode}\n {item.label}\n {NewLabelNode}\n </S2.ButtonContent>\n {ValueNode}\n </S.SectionItemButton>\n );\n },\n [\n onClose,\n renderSectionItemIcon,\n toggleExpandedSectionItemId,\n translations.new,\n ],\n );\n\n // #############################################################################\n // Render\n // #############################################################################\n return (\n <S2.Wrap motif={motif}>\n <S.Container size=\"mobile\" noVerticalMargin>\n <S.InnerWrap>\n {/* Product line */}\n {!!productLineOptions?.length && (\n <S2.ButtonGroup>\n {productLineOptions.map((option) => (\n <S2.CustomButton\n full\n key={option.value}\n variant=\"gray\"\n $active={option.value === productLineValue}\n onClick={() => {\n handleProductLineChange?.(option.value);\n onClose();\n }}\n >\n {option.label}\n </S2.CustomButton>\n ))}\n </S2.ButtonGroup>\n )}\n\n {/* Sections */}\n {sections.map((section) => (\n <S.Section motif={motif} key={section.id}>\n {section.items.map((item) => (\n <S.SectionItemsGroup\n motif={motif}\n key={item.id}\n $active={item.id === expandedSectionItemId}\n >\n <S.SectionItem motif={motif}>\n {renderSectionItemButton(item)}\n\n {item.subItems.length > 0 && (\n <S.SectionItemArrowButton\n motif={motif}\n onClick={() => toggleExpandedSectionItemId(item.id)}\n >\n <S.ButtonIcon>\n <StyleableSvgImage\n src={icons.generic.collapseArrow}\n width={13}\n height={8}\n />\n </S.ButtonIcon>\n </S.SectionItemArrowButton>\n )}\n </S.SectionItem>\n\n {item.id === expandedSectionItemId &&\n item.subItems.length > 0 &&\n item.subItems.map((subItem) => (\n <S.SectionItem key={subItem.id} motif={motif} $secondary>\n {renderSectionItemButton(subItem)}\n </S.SectionItem>\n ))}\n </S.SectionItemsGroup>\n ))}\n </S.Section>\n ))}\n </S.InnerWrap>\n </S.Container>\n </S2.Wrap>\n );\n};\n"],"names":["motif","NavigationProMobileMenu","NavigationProMobileMenu2","translations","onClose","logo","handleStorePickerClick","handleOrderHistoryClick","handlePurchaseHistoryClick","handleProductLineChange","productLineValue","productLineOptions","categories","hideExtraSection","footerContent","socialContent","useFooterContent","context","useMenu","expandedSectionItemId","setExpandedSectionItemId","useState","toggleExpandedSectionItemId","useCallback","itemId","sections","useMemo","extraSectionItems","id","label","support","url","subItems","getSupportLinkMapping","map","item","name","social","items","src","key","company","training","tools","orderHistory","icon","imageSrc","HistoryIcon","width","height","onClick","purchasedProductHistory","filter","isNonNullish","length","currentStore","region","value","jsxs","CurrentStoreWrap","$inheritFonts","children","jsx","CurrentStoreFlag","flag","LocationPinIcon","renderSectionItemIcon","S2.SectionItemIcon","StyleableSvgImage","renderSectionItemButton","IconNode","NewLabelNode","isNew","S.NewLabel","new","ValueNode","target","targetBlank","S2.ProSectionItemButton","e","S2.ButtonContent","S.SectionItemButton","as","href","S2.Wrap","S.Container","size","noVerticalMargin","S.InnerWrap","S2.ButtonGroup","option","S2.CustomButton","full","variant","$active","section","S.Section","S.SectionItemsGroup","S.SectionItem","S.SectionItemArrowButton","S.ButtonIcon","icons.generic.collapseArrow","subItem","$secondary"],"mappings":";;;;;;;;;;;;;;;;;;;;AA0BA,MAAMA,KAAe,GAAA,OAAA;AAER,MAAAC,uBAAA,GAA0B,SAASA,wBAAwBC,CAAA;EACtEC,YAAA;EACAC,OAAA;EACAC,IAAA;EACAC,sBAAA;EAAA;EAEAC,uBAAA;EACAC,0BAAA;EACAC,uBAAA;EACAC,gBAAA;EACAC,kBAAA;EACAC,UAAA;EACAC;AACF,CAAiC,EAAA;EAC/B,MAAM;IAAEC,aAAA;IAAeC;EAAc,CAAA,GAAIC,gBAAiB,CAAA,CAAA;EACpD,MAAA;IAAEC;GAAQ,GAAIC,OAAQ,EAAA;EAK5B,MAAM,CAACC,qBAAA,EAAuBC,wBAAwB,CAAA,GAAIC,SAExD,IAAI,CAAA;EAEN,MAAMC,2BAA8B,GAAAC,WAAA,CACjCC,MAAmB,IAAA;IAClBJ,wBAAA,CACED,qBAAA,KAA0BK,SAAS,IAAO,GAAAA,MAAA,CAC5C;EACF,CAAA,EACA,CAACL,qBAAqB,CAAA,CACxB;EAKM,MAAAM,QAAA,GAAWC,QAAQ,MAA8B;IACrD,MAAMC,iBAAgD,GAAA,CACpD;MACEC,EAAI,EAAA,SAAA;MACJC,OAAO1B,YAAa,CAAA2B,OAAA;MACpBC,GAAK,EAAA,IAAA;MACLC,UAAUC,qBAAsB,CAAAhB,OAAO,CAAE,CAAAiB,GAAA,CAAKC,IAAU,KAAA;QACtDP,IAAIO,IAAK,CAAAP,EAAA;QACTC,OAAOM,IAAK,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A,CAAAQ,uBAAA,CAAwBlC,IAAI,CAAA,EAE5BA,IAAA,CAAKH,QAAS,CAAAsB,MAAA,GAAS,CACtB,mBAAAQ,GAAA,CAACqC,sBAAE,EAAF;gBACCnG,KAAA;gBACAkD,OAAS,EAAAA,CAAA,KAAM5B,2BAA4B,CAAAa,IAAA,CAAKP,EAAE,CAAA;gBAElDiC,QAAA,iBAAAC,GAAA,CAACsC,UAAE,EAAF;kBACCvC,QAAA,EAAA,eAAAC,GAAA,CAACM,iBAAA,EAAA;oBACC7B,GAAA,EAAK8D,iCAAc;oBACnBrD,KAAO,EAAA,EAAA;oBACPC,MAAQ,EAAA;kBAAA,CAAA;iBAEZ;cAAA,CACF,CAAA;aAEJ,CAAA,EAECd,IAAA,CAAKP,EAAO,KAAAT,qBAAA,IACXgB,IAAK,CAAAH,QAAA,CAASsB,SAAS,CACvB,IAAAnB,IAAA,CAAKH,QAAS,CAAAE,GAAA,CAAKoE,OAAA,IAAA,mBAChBJ,WAAE,EAAF;cAA+BlG,KAAA;cAAcuG,UAAU,EAAA,IAAA;cACrD1C,kCAAwByC,OAAO;YAAA,CAAA,EADdA,OAAQ,CAAA1E,EAE5B,CACD,CAAA;UAAA,CAAA,EA5BEO,IAAK,CAAAP,EAAA,CA8Bb;QAAA,CAAA,EAlC2BmE,OAAQ,CAAAnE,EAmCtC,CACD,CAAA;OACH;KACF;EACF,CAAA,CAAA;AAEJ,CAAA;"}
|
|
1
|
+
{"version":3,"file":"ProMobileMenu.mjs","sources":["../../../../../src/components/Header/Navigation/ProMobileMenu/ProMobileMenu.tsx"],"sourcesContent":["/* eslint-disable @next/next/no-img-element */\nimport type { Motif } from \"@ubnt/ui-components/utils\";\nimport { useCallback, useMemo, useState } from \"react\";\n\n// import EAIcon from \"../../../../assets/icons/menu/icon-ea.svg\";\nimport GlobeIcon from \"../../../../assets/icons/menu/icon-globe.svg\";\nimport HistoryIcon from \"../../../../assets/icons/menu/icon-history.svg\";\nimport * as icons from \"../../../../constants/icons\";\nimport { useMenu } from \"../../../../contexts/MenuContext\";\nimport { useFooterContent } from \"../../../Footer/hooks/useFooterContent\";\nimport { StyleableSvgImage } from \"../../../StyleableSvgImage\";\nimport { getSupportLinkMapping } from \"../../LinksModal/mapping\";\nimport * as S from \"../MobileMenu/MobileMenu.styles\";\nimport * as S2 from \"./ProMobileMenu.styles\";\nimport type {\n NavigationProMobileMenuProps,\n ProMobileMenuSection,\n ProMobileMenuSectionItem,\n ProMobileMenuSectionSubItem,\n} from \"./ProMobileMenu.types\";\n\nexport const NavigationProMobileMenu = function NavigationProMobileMenu({\n translations,\n onClose,\n currentCountryName,\n handleStorePickerClick,\n // handleEarlyAccessClick,\n handleOrderHistoryClick,\n handlePurchaseHistoryClick,\n handleProductLineChange,\n productLineValue,\n productLineOptions,\n extraSectionItems,\n}: NavigationProMobileMenuProps) {\n const motif: Motif = \"light\";\n\n const { footerContent, socialContent } = useFooterContent();\n const { context } = useMenu();\n\n // #############################################################################\n // Section toggling\n // #############################################################################\n const [expandedSectionItemId, setExpandedSectionItemId] = useState<\n string | null\n >(null);\n\n const toggleExpandedSectionItemId = useCallback(\n (itemId: string) => {\n setExpandedSectionItemId(\n expandedSectionItemId === itemId ? null : itemId,\n );\n },\n [expandedSectionItemId],\n );\n\n // #############################################################################\n // Menu sections\n // #############################################################################\n const sections = useMemo((): ProMobileMenuSection[] => {\n const _sections: Array<ProMobileMenuSection | null> = [\n {\n id: \"store-link-stuff\",\n items: [\n ...(handleOrderHistoryClick\n ? [\n {\n id: \"order-history\",\n label: translations.orderHistory,\n icon: {\n src:\n typeof HistoryIcon === \"string\"\n ? HistoryIcon\n : HistoryIcon.src,\n width: 16,\n height: 16,\n },\n url: () => {\n handleOrderHistoryClick?.();\n },\n subItems: [],\n },\n ]\n : []),\n ...(handlePurchaseHistoryClick\n ? [\n {\n id: \"purchased-product-history\",\n label: translations.purchasedProductHistory,\n icon: {\n src:\n typeof HistoryIcon === \"string\"\n ? HistoryIcon\n : HistoryIcon.src,\n width: 16,\n height: 16,\n },\n url: () => {\n handlePurchaseHistoryClick?.();\n },\n subItems: [],\n },\n ]\n : []),\n /**\n * NOTE: Disabled per Kaspars request (09.06.)\n * @see https://ui.slack.com/archives/C050CTJSE80/p1686331781297389\n */\n // {\n // id: \"early-access\",\n // label: translations.earlyAccess,\n // icon: {\n // src: typeof EAIcon === \"string\" ? EAIcon : EAIcon.src,\n // width: 20,\n // height: 16,\n // },\n // url: () => {\n // handleEarlyAccessClick?.();\n // },\n // subItems: [],\n // },\n ],\n },\n {\n id: \"extra\",\n items: extraSectionItems ?? [\n {\n id: \"support\",\n label: translations.support,\n url: null,\n subItems: getSupportLinkMapping(context).map((item) => ({\n id: item.id,\n label: item.name,\n url: item.url,\n })),\n },\n {\n id: \"social\",\n label: translations.social,\n url: null,\n subItems: socialContent.items.map((item) => ({\n id: item.id,\n label: item.label,\n url: item.src,\n })),\n },\n ...(\n [\n { key: \"company\", label: translations.company },\n { key: \"training\", label: translations.training },\n { key: \"tools\", label: translations.tools },\n ] as const\n ).map(({ key, label }) => ({\n id: key,\n label,\n url: null,\n subItems: footerContent[key].items.map((item) => ({\n id: item.id,\n label: item.label,\n url: item.src,\n })),\n })),\n ],\n },\n currentCountryName\n ? {\n id: \"country-selector\",\n items: [\n {\n id: \"current-country-name\",\n label: currentCountryName,\n icon: {\n src:\n typeof GlobeIcon === \"string\" ? GlobeIcon : GlobeIcon.src,\n width: 17,\n height: 17,\n },\n url: () => {\n handleStorePickerClick?.();\n },\n subItems: [],\n },\n ],\n }\n : null,\n ];\n\n return _sections.filter((el): el is ProMobileMenuSection => !!el);\n }, [\n context,\n currentCountryName,\n extraSectionItems,\n footerContent,\n handleOrderHistoryClick,\n handlePurchaseHistoryClick,\n handleStorePickerClick,\n socialContent.items,\n translations.company,\n translations.orderHistory,\n translations.purchasedProductHistory,\n translations.social,\n translations.support,\n translations.tools,\n translations.training,\n ]);\n\n // #############################################################################\n // Render helpers\n // #############################################################################\n const renderSectionItemIcon = useCallback(\n (item: ProMobileMenuSection[\"items\"][number]): React.ReactNode => {\n return (\n item.icon && (\n <S2.SectionItemIcon>\n <StyleableSvgImage\n src={item.icon.src}\n width={item.icon.width}\n height={item.icon.height}\n />\n </S2.SectionItemIcon>\n )\n );\n },\n [],\n );\n\n const renderSectionItemButton = useCallback(\n (\n item: ProMobileMenuSectionItem | ProMobileMenuSectionSubItem,\n ): React.ReactNode => {\n const IconNode = \"subItems\" in item && renderSectionItemIcon(item);\n const NewLabelNode =\n \"isNew\" in item && item.isNew ? (\n <S.NewLabel>{translations.new}</S.NewLabel>\n ) : null;\n const target =\n \"targetBlank\" in item && item.targetBlank ? \"_blank\" : undefined;\n const url = item.url;\n\n if (!url) {\n return (\n <S.SectionItemButton\n motif={motif}\n onClick={() => toggleExpandedSectionItemId(item.id)}\n >\n {IconNode}\n {item.label}\n </S.SectionItemButton>\n );\n }\n\n if (typeof url === \"string\") {\n return (\n <S.SectionItemButton\n motif={motif}\n as=\"a\"\n href={url}\n onClick={onClose}\n target={target}\n >\n {IconNode}\n {item.label}\n {NewLabelNode}\n </S.SectionItemButton>\n );\n }\n\n return (\n <S.SectionItemButton\n motif={motif}\n onClick={() => {\n url();\n onClose();\n }}\n >\n {IconNode}\n {item.label}\n </S.SectionItemButton>\n );\n },\n [\n onClose,\n renderSectionItemIcon,\n toggleExpandedSectionItemId,\n translations.new,\n ],\n );\n\n // #############################################################################\n // Render\n // #############################################################################\n return (\n <S.Wrap motif={motif}>\n <S.Container size=\"mobile\" noVerticalMargin>\n <S.InnerWrap>\n {/* Product line */}\n {!!productLineOptions?.length && (\n <S2.ButtonGroup>\n {productLineOptions.map((option) => (\n <S2.CustomButton\n full\n key={option.value}\n variant=\"gray\"\n $active={option.value === productLineValue}\n onClick={() => {\n handleProductLineChange?.(option.value);\n onClose();\n }}\n >\n {option.label}\n </S2.CustomButton>\n ))}\n </S2.ButtonGroup>\n )}\n\n {/* Sections */}\n {sections.map((section) => (\n <S.Section motif={motif} key={section.id}>\n {section.items.map((item) => (\n <S.SectionItemsGroup\n motif={motif}\n key={item.id}\n $active={item.id === expandedSectionItemId}\n >\n <S.SectionItem motif={motif}>\n {renderSectionItemButton(item)}\n\n {item.subItems.length > 0 && (\n <S.SectionItemArrowButton\n motif={motif}\n onClick={() => toggleExpandedSectionItemId(item.id)}\n >\n <S.ButtonIcon>\n <StyleableSvgImage\n src={icons.generic.collapseArrow}\n width={13}\n height={8}\n />\n </S.ButtonIcon>\n </S.SectionItemArrowButton>\n )}\n </S.SectionItem>\n\n {item.id === expandedSectionItemId &&\n item.subItems.length > 0 &&\n item.subItems.map((subItem) => (\n <S.SectionItem key={subItem.id} motif={motif} $secondary>\n {renderSectionItemButton(subItem)}\n </S.SectionItem>\n ))}\n </S.SectionItemsGroup>\n ))}\n </S.Section>\n ))}\n </S.InnerWrap>\n </S.Container>\n </S.Wrap>\n );\n};\n"],"names":["NavigationProMobileMenu","NavigationProMobileMenu2","translations","onClose","currentCountryName","handleStorePickerClick","handleOrderHistoryClick","handlePurchaseHistoryClick","handleProductLineChange","productLineValue","productLineOptions","extraSectionItems","motif","footerContent","socialContent","useFooterContent","context","useMenu","expandedSectionItemId","setExpandedSectionItemId","useState","toggleExpandedSectionItemId","useCallback","itemId","sections","useMemo","_sections","id","items","label","orderHistory","icon","src","HistoryIcon","width","height","url","subItems","purchasedProductHistory","support","getSupportLinkMapping","map","item","name","social","key","company","training","tools","GlobeIcon","filter","el","renderSectionItemIcon","jsx","S2.SectionItemIcon","children","StyleableSvgImage","renderSectionItemButton","IconNode","NewLabelNode","isNew","S.NewLabel","new","target","targetBlank","jsxs","S.SectionItemButton","onClick","as","href","S.Wrap","S.Container","size","noVerticalMargin","S.InnerWrap","length","S2.ButtonGroup","option","S2.CustomButton","full","variant","$active","value","section","S.Section","S.SectionItemsGroup","S.SectionItem","S.SectionItemArrowButton","S.ButtonIcon","icons.generic.collapseArrow","subItem","$secondary"],"mappings":";;;;;;;;;;;;;;;;;AAqBa,MAAAA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1E,KACZ;cAAA2C,QAAA,EAAA,CAAAE,uBAAA,CAAwBf,IAAI,CAAA,EAE5BA,IAAA,CAAKL,QAAS,CAAAsC,MAAA,GAAS,CACtB,mBAAAtB,GAAA,CAACkC,sBAAE,EAAF;gBACC3E,KAAA;gBACAuD,OAAS,EAAAA,CAAA,KAAM9C,2BAA4B,CAAAqB,IAAA,CAAKf,EAAE,CAAA;gBAElD4B,QAAA,iBAAAF,GAAA,CAACmC,UAAE,EAAF;kBACCjC,QAAA,EAAA,eAAAF,GAAA,CAACG,iBAAA,EAAA;oBACCxB,GAAA,EAAKyD,iCAAc;oBACnBvD,KAAO,EAAA,EAAA;oBACPC,MAAQ,EAAA;kBAAA,CAAA;iBAEZ;cAAA,CACF,CAAA;aAEJ,CAAA,EAECO,IAAA,CAAKf,EAAO,KAAAT,qBAAA,IACXwB,IAAK,CAAAL,QAAA,CAASsC,SAAS,CACvB,IAAAjC,IAAA,CAAKL,QAAS,CAAAI,GAAA,CAAKiD,OAAA,IAAA,mBAChBJ,WAAE,EAAF;cAA+B1E,KAAA;cAAc+E,UAAU,EAAA,IAAA;cACrDpC,kCAAwBmC,OAAO;YAAA,CAAA,EADdA,OAAQ,CAAA/D,EAE5B,CACD,CAAA;UAAA,CAAA,EA5BEe,IAAK,CAAAf,EAAA,CA8Bb;QAAA,CAAA,EAlC2BwD,OAAQ,CAAAxD,EAmCtC,CACD,CAAA;OACH;KACF;EACF,CAAA,CAAA;AAEJ,CAAA;"}
|
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
export declare const Wrap: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {
|
|
2
|
-
motif: import("@ubnt/ui-components").Motif;
|
|
3
|
-
}, never>;
|
|
4
1
|
export declare const SectionItemIcon: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
5
2
|
export declare const CustomButton: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("../../../Button/Button.types").ButtonProps & {
|
|
6
3
|
children?: import("react").ReactNode;
|
|
@@ -8,9 +5,3 @@ export declare const CustomButton: import("styled-components").StyledComponent<i
|
|
|
8
5
|
$active?: boolean;
|
|
9
6
|
}, never>;
|
|
10
7
|
export declare const ButtonGroup: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
11
|
-
export declare const ButtonContent: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
12
|
-
export declare const ProSectionItemButton: import("styled-components").StyledComponent<"button", import("styled-components").DefaultTheme, {
|
|
13
|
-
motif: import("@ubnt/ui-components").Motif;
|
|
14
|
-
$link?: boolean;
|
|
15
|
-
$bold?: boolean;
|
|
16
|
-
}, never>;
|
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
var styled = require('styled-components');
|
|
4
4
|
var theme = require('../../../../constants/theme.js');
|
|
5
5
|
require('../../../Button/index.js');
|
|
6
|
-
var MobileMenu_styles = require('../MobileMenu/MobileMenu.styles.js');
|
|
7
6
|
var Button = require('../../../Button/Button.js');
|
|
8
7
|
function _interopDefault(e) {
|
|
9
8
|
return e && e.__esModule ? e : {
|
|
@@ -12,12 +11,10 @@ function _interopDefault(e) {
|
|
|
12
11
|
}
|
|
13
12
|
var styled__default = /*#__PURE__*/_interopDefault(styled);
|
|
14
13
|
"use strict";
|
|
15
|
-
const Wrap = styled__default["default"](MobileMenu_styles.Wrap)`
|
|
16
|
-
padding-top: 8px;
|
|
17
|
-
`;
|
|
18
14
|
const SectionItemIcon = styled__default["default"].div`
|
|
19
15
|
width: 20px;
|
|
20
16
|
height: 20px;
|
|
17
|
+
margin-right: 10px;
|
|
21
18
|
color: ${theme.theme.colors.black};
|
|
22
19
|
|
|
23
20
|
display: flex;
|
|
@@ -42,18 +39,7 @@ const ButtonGroup = styled__default["default"].div`
|
|
|
42
39
|
display: flex;
|
|
43
40
|
gap: 8px;
|
|
44
41
|
`;
|
|
45
|
-
const ButtonContent = styled__default["default"].div`
|
|
46
|
-
display: flex;
|
|
47
|
-
align-items: center;
|
|
48
|
-
gap: 10px;
|
|
49
|
-
`;
|
|
50
|
-
const ProSectionItemButton = styled__default["default"](MobileMenu_styles.SectionItemButton)`
|
|
51
|
-
justify-content: space-between;
|
|
52
|
-
`;
|
|
53
|
-
exports.ButtonContent = ButtonContent;
|
|
54
42
|
exports.ButtonGroup = ButtonGroup;
|
|
55
43
|
exports.CustomButton = CustomButton;
|
|
56
|
-
exports.ProSectionItemButton = ProSectionItemButton;
|
|
57
44
|
exports.SectionItemIcon = SectionItemIcon;
|
|
58
|
-
exports.Wrap = Wrap;
|
|
59
45
|
//# sourceMappingURL=ProMobileMenu.styles.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProMobileMenu.styles.js","sources":["../../../../../src/components/Header/Navigation/ProMobileMenu/ProMobileMenu.styles.tsx"],"sourcesContent":["import styled, { css } from \"styled-components\";\n\nimport { theme } from \"../../../../constants/theme\";\nimport { Button } from \"../../../Button\";\
|
|
1
|
+
{"version":3,"file":"ProMobileMenu.styles.js","sources":["../../../../../src/components/Header/Navigation/ProMobileMenu/ProMobileMenu.styles.tsx"],"sourcesContent":["import styled, { css } from \"styled-components\";\n\nimport { theme } from \"../../../../constants/theme\";\nimport { Button } from \"../../../Button\";\n\nexport const SectionItemIcon = styled.div`\n width: 20px;\n height: 20px;\n margin-right: 10px;\n color: ${theme.colors.black};\n\n display: flex;\n align-items: center;\n justify-content: center;\n`;\n\n// FIXME i should be using Motif here but...\nexport const CustomButton = styled(Button)<{ $active?: boolean }>`\n height: 46px;\n font-size: ${theme.font.size14};\n line-height: 1;\n border-radius: 6px;\n\n ${({ $active }) =>\n $active &&\n css`\n background: ${theme.colors.white} !important;\n border-width: 4px;\n color: ${theme.colors.primaryBlue};\n `}\n`;\n\nexport const ButtonGroup = styled.div`\n display: flex;\n gap: 8px;\n`;\n"],"names":["SectionItemIcon","styled","div","theme","colors","black","CustomButton","Button","font","size14","$active","css","white","primaryBlue","ButtonGroup"],"mappings":";;;;;;;;;;;;;AAKO,MAAMA,kBAAkBC,eAAO,CAAA,SAAA,CAAA,CAAAC,GAAA;AAAA;AAAA;AAAA;AAAA,WAI3BC,KAAA,CAAAA,KAAA,CAAMC,OAAOC,KAAK;AAAA;AAAA;AAAA;AAAA;AAAA,CAAA;AAQhB,MAAAC,YAAA,GAAeL,eAAAA,CAAAA,SAAAA,EAAOM,MAAAA,CAAAA,MAAM,CAAA;AAAA;AAAA,eAE1BJ,KAAA,CAAAA,KAAA,CAAMK,KAAKC,MAAM;AAAA;AAAA;AAAA;AAAA,IAI5B,CAAC;EAAEC;CAAQ,KACXA,OACA,IAAAC,MAAAA,CAAAA,GAAA;AAAA,oBACgBR,KAAA,CAAAA,KAAA,CAAMC,OAAOQ,KAAK;AAAA;AAAA,eAEvBT,KAAA,CAAAA,KAAA,CAAMC,OAAOS,WAAW;AAAA,KAClC;AAAA,CAAA;AAGE,MAAMC,cAAcb,eAAO,CAAA,SAAA,CAAA,CAAAC,GAAA;AAAA;AAAA;AAAA,CAAA;;;"}
|
|
@@ -1,15 +1,12 @@
|
|
|
1
1
|
import styled, { css } from 'styled-components';
|
|
2
2
|
import { theme } from '../../../../constants/theme.mjs';
|
|
3
3
|
import '../../../Button/index.mjs';
|
|
4
|
-
import { Wrap as Wrap$1, SectionItemButton } from '../MobileMenu/MobileMenu.styles.mjs';
|
|
5
4
|
import { Button } from '../../../Button/Button.mjs';
|
|
6
5
|
"use strict";
|
|
7
|
-
const Wrap = styled(Wrap$1)`
|
|
8
|
-
padding-top: 8px;
|
|
9
|
-
`;
|
|
10
6
|
const SectionItemIcon = styled.div`
|
|
11
7
|
width: 20px;
|
|
12
8
|
height: 20px;
|
|
9
|
+
margin-right: 10px;
|
|
13
10
|
color: ${theme.colors.black};
|
|
14
11
|
|
|
15
12
|
display: flex;
|
|
@@ -34,13 +31,5 @@ const ButtonGroup = styled.div`
|
|
|
34
31
|
display: flex;
|
|
35
32
|
gap: 8px;
|
|
36
33
|
`;
|
|
37
|
-
|
|
38
|
-
display: flex;
|
|
39
|
-
align-items: center;
|
|
40
|
-
gap: 10px;
|
|
41
|
-
`;
|
|
42
|
-
const ProSectionItemButton = styled(SectionItemButton)`
|
|
43
|
-
justify-content: space-between;
|
|
44
|
-
`;
|
|
45
|
-
export { ButtonContent, ButtonGroup, CustomButton, ProSectionItemButton, SectionItemIcon, Wrap };
|
|
34
|
+
export { ButtonGroup, CustomButton, SectionItemIcon };
|
|
46
35
|
//# sourceMappingURL=ProMobileMenu.styles.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProMobileMenu.styles.mjs","sources":["../../../../../src/components/Header/Navigation/ProMobileMenu/ProMobileMenu.styles.tsx"],"sourcesContent":["import styled, { css } from \"styled-components\";\n\nimport { theme } from \"../../../../constants/theme\";\nimport { Button } from \"../../../Button\";\
|
|
1
|
+
{"version":3,"file":"ProMobileMenu.styles.mjs","sources":["../../../../../src/components/Header/Navigation/ProMobileMenu/ProMobileMenu.styles.tsx"],"sourcesContent":["import styled, { css } from \"styled-components\";\n\nimport { theme } from \"../../../../constants/theme\";\nimport { Button } from \"../../../Button\";\n\nexport const SectionItemIcon = styled.div`\n width: 20px;\n height: 20px;\n margin-right: 10px;\n color: ${theme.colors.black};\n\n display: flex;\n align-items: center;\n justify-content: center;\n`;\n\n// FIXME i should be using Motif here but...\nexport const CustomButton = styled(Button)<{ $active?: boolean }>`\n height: 46px;\n font-size: ${theme.font.size14};\n line-height: 1;\n border-radius: 6px;\n\n ${({ $active }) =>\n $active &&\n css`\n background: ${theme.colors.white} !important;\n border-width: 4px;\n color: ${theme.colors.primaryBlue};\n `}\n`;\n\nexport const ButtonGroup = styled.div`\n display: flex;\n gap: 8px;\n`;\n"],"names":["SectionItemIcon","styled","div","theme","colors","black","CustomButton","Button","font","size14","$active","css","white","primaryBlue","ButtonGroup"],"mappings":";;;;;AAKO,MAAMA,kBAAkBC,MAAO,CAAAC,GAAA;AAAA;AAAA;AAAA;AAAA,WAI3BC,KAAA,CAAMC,OAAOC,KAAK;AAAA;AAAA;AAAA;AAAA;AAAA,CAAA;AAQhB,MAAAC,YAAA,GAAeL,OAAOM,MAAM,CAAA;AAAA;AAAA,eAE1BJ,KAAA,CAAMK,KAAKC,MAAM;AAAA;AAAA;AAAA;AAAA,IAI5B,CAAC;EAAEC;CAAQ,KACXA,OACA,IAAAC,GAAA;AAAA,oBACgBR,KAAA,CAAMC,OAAOQ,KAAK;AAAA;AAAA,eAEvBT,KAAA,CAAMC,OAAOS,WAAW;AAAA,KAClC;AAAA,CAAA;AAGE,MAAMC,cAAcb,MAAO,CAAAC,GAAA;AAAA;AAAA;AAAA,CAAA;"}
|
|
@@ -1,37 +1,31 @@
|
|
|
1
|
-
import type { MouseEvent, ReactNode } from "react";
|
|
2
1
|
import type { ProductLine } from "../../../../types";
|
|
3
|
-
import type {
|
|
4
|
-
export type ProMobileMenuOnClickFn = (e: MouseEvent, url: string | null) => void;
|
|
2
|
+
import type { HeaderTranslations, ProHeaderProps } from "../../Header.types";
|
|
5
3
|
export type ProMobileMenuSectionSubItem = {
|
|
6
4
|
id: string;
|
|
7
5
|
label: string;
|
|
8
|
-
|
|
9
|
-
url: string;
|
|
10
|
-
onClick?: ProMobileMenuOnClickFn;
|
|
6
|
+
url: string | (() => void);
|
|
11
7
|
isNew?: boolean;
|
|
12
8
|
targetBlank?: boolean;
|
|
13
9
|
};
|
|
14
10
|
export type ProMobileMenuSectionItem = {
|
|
15
11
|
id: string;
|
|
16
12
|
label: string;
|
|
17
|
-
value?: ReactNode;
|
|
18
13
|
icon?: {
|
|
19
14
|
src: string;
|
|
20
15
|
width: number;
|
|
21
16
|
height: number;
|
|
22
17
|
};
|
|
23
|
-
url: string | null;
|
|
24
|
-
onClick?: ProMobileMenuOnClickFn;
|
|
18
|
+
url: string | (() => void) | null;
|
|
25
19
|
subItems: Array<ProMobileMenuSectionSubItem>;
|
|
26
20
|
};
|
|
27
21
|
export interface ProMobileMenuSection {
|
|
28
22
|
id: string;
|
|
29
|
-
items: ProMobileMenuSectionItem
|
|
23
|
+
items: Array<ProMobileMenuSectionItem>;
|
|
30
24
|
}
|
|
31
25
|
export interface NavigationProMobileMenuProps {
|
|
32
26
|
translations: HeaderTranslations;
|
|
33
27
|
onClose: () => void;
|
|
34
|
-
|
|
28
|
+
currentCountryName?: string;
|
|
35
29
|
handleStorePickerClick?: ProHeaderProps["handleStorePickerClick"];
|
|
36
30
|
handleOrderHistoryClick?: ProHeaderProps["handleOrderHistoryClick"];
|
|
37
31
|
handlePurchaseHistoryClick?: ProHeaderProps["handlePurchaseHistoryClick"];
|
|
@@ -41,6 +35,6 @@ export interface NavigationProMobileMenuProps {
|
|
|
41
35
|
value: ProductLine;
|
|
42
36
|
label: string;
|
|
43
37
|
}>;
|
|
44
|
-
categories: ProHeaderProps["categories"];
|
|
45
38
|
hideExtraSection?: boolean;
|
|
39
|
+
extraSectionItems?: Array<ProMobileMenuSectionItem>;
|
|
46
40
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var jsxRuntime = require('react/jsx-runtime');
|
|
4
|
-
var
|
|
4
|
+
var react = require('react');
|
|
5
5
|
var reactUse = require('react-use');
|
|
6
6
|
var types = require('../../../contexts/MenuContext/types.js');
|
|
7
7
|
require('../../../hooks/index.js');
|
|
@@ -14,10 +14,10 @@ const HeaderOverlay = function HeaderOverlay2({
|
|
|
14
14
|
onClose
|
|
15
15
|
}) {
|
|
16
16
|
useLockBodyScrollCustom.useLockBodyScrollCustom(!!showForModal);
|
|
17
|
-
const canManualClose =
|
|
17
|
+
const canManualClose = react.useMemo(() => {
|
|
18
18
|
return showForModal !== types.ModalId.Cart;
|
|
19
19
|
}, [showForModal]);
|
|
20
|
-
const handleManualClose =
|
|
20
|
+
const handleManualClose = react.useCallback(() => {
|
|
21
21
|
if (!canManualClose) return;
|
|
22
22
|
onClose?.();
|
|
23
23
|
}, [canManualClose, onClose]);
|
|
@@ -1,26 +1,22 @@
|
|
|
1
1
|
import { Language, ProductLine } from "../../../types";
|
|
2
|
-
export declare const PRO_HEADER_MOBILE_UP: `(min-width: ${number}px)`;
|
|
3
|
-
export declare const PRO_HEADER_MOBILE_AND_DOWN: `(max-width: ${number}px)`;
|
|
4
2
|
export declare const ProHeader: import("react").NamedExoticComponent<Pick<import("../Header.types").HeaderProps, "className" | "motif" | "cart" | "account" | "translations" | "onModalOpen" | "onCartClick" | "showLineLoader" | "accountMenu"> & {
|
|
5
3
|
embedConfig?: import("../Header.types").HeaderEmbedConfig;
|
|
6
|
-
handleStorePickerClick?: () => void;
|
|
7
4
|
currentCountryName?: string;
|
|
5
|
+
handleStorePickerClick?: () => void;
|
|
8
6
|
earlyAccess?: import("../Header.types").ProHeaderEarlyAccess;
|
|
9
7
|
handlePurchaseHistoryClick?: () => void;
|
|
10
8
|
handleOrderHistoryClick?: () => void;
|
|
11
|
-
productLineOptions?:
|
|
9
|
+
productLineOptions?: {
|
|
10
|
+
value: ProductLine;
|
|
11
|
+
label: string;
|
|
12
|
+
}[];
|
|
12
13
|
productLineValue?: ProductLine;
|
|
13
14
|
handleProductLineChange?: (type: ProductLine) => void;
|
|
14
15
|
handleMobileMenuClick?: () => void;
|
|
15
16
|
onLanguageChange?: (e: React.MouseEvent<HTMLElement>, link: string, language: Language) => void;
|
|
16
17
|
searchValue?: string;
|
|
17
18
|
onSearch?: (searchTerm: string) => void;
|
|
18
|
-
searchInputWidth?: number;
|
|
19
|
-
searchInputChildren?: import("react").ReactNode;
|
|
20
19
|
onSearchFocus?: () => void;
|
|
21
20
|
onSearchBlur?: () => void;
|
|
22
21
|
onSearchClick?: () => void;
|
|
23
|
-
categories: import("../Header.types").ProHeaderCategories;
|
|
24
|
-
hideInlineCategories?: boolean;
|
|
25
|
-
logo?: import("../Header.types").HeaderLogo;
|
|
26
22
|
}>;
|