@ubnt/store.core 9.19.1 → 9.20.0-alpha.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 +205 -1
- package/lib/_virtual/_virtual_multi-entry.js +27 -12
- package/lib/_virtual/_virtual_multi-entry.js.map +1 -1
- package/lib/_virtual/_virtual_multi-entry.mjs +14 -10
- package/lib/_virtual/_virtual_multi-entry.mjs.map +1 -1
- package/lib/assets/attention.svg +5 -5
- package/lib/assets/attention2.svg +5 -5
- package/lib/assets/close2.svg +2 -3
- package/lib/assets/close3.svg +3 -2
- package/lib/assets/efg.png +0 -0
- package/lib/assets/icon-location-pin.svg +5 -0
- package/lib/assets/icons/menu/icon-location-pin.svg.js +27 -0
- package/lib/assets/icons/menu/icon-location-pin.svg.js.map +1 -0
- package/lib/assets/icons/menu/icon-location-pin.svg.mjs +3 -0
- package/lib/assets/icons/menu/icon-location-pin.svg.mjs.map +1 -0
- package/lib/assets/pause.svg +3 -3
- package/lib/assets/pause2.svg +3 -3
- package/lib/assets/ucg-max.png +0 -0
- package/lib/assets/udmProMax.jpg +0 -0
- package/lib/assets/udmProMax2.jpg +0 -0
- package/lib/assets/udmProSpecial.jpg +0 -0
- package/lib/assets/udmProSpecial2.jpg +0 -0
- package/lib/components/CategoryTabs/CategoryTabs.styles.d.ts +1 -1
- package/lib/components/CategoryTabs/CategoryTabs.styles.js +2 -3
- package/lib/components/CategoryTabs/CategoryTabs.styles.js.map +1 -1
- package/lib/components/CategoryTabs/CategoryTabs.styles.mjs +2 -3
- package/lib/components/CategoryTabs/CategoryTabs.styles.mjs.map +1 -1
- 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 -3
- package/lib/components/Container/Container.js.map +1 -1
- package/lib/components/Container/Container.mjs +5 -4
- package/lib/components/Container/Container.mjs.map +1 -1
- package/lib/components/FeaturesSection_deprecated/FeaturesSection.js +1 -1
- package/lib/components/FeaturesSection_deprecated/FeaturesSection.mjs +1 -1
- package/lib/components/FeaturesSection_deprecated/assets/close.svg.js +1 -1
- package/lib/components/FeaturesSection_deprecated/assets/close.svg.mjs +2 -2
- package/lib/components/Header/AccountMenu/AccountMenu.js +11 -1
- package/lib/components/Header/AccountMenu/AccountMenu.js.map +1 -1
- package/lib/components/Header/AccountMenu/AccountMenu.mjs +13 -3
- package/lib/components/Header/AccountMenu/AccountMenu.mjs.map +1 -1
- package/lib/components/Header/Header.js +6 -6
- package/lib/components/Header/Header.js.map +1 -1
- package/lib/components/Header/Header.mjs +6 -6
- package/lib/components/Header/Header.mjs.map +1 -1
- package/lib/components/Header/Header.styles.d.ts +2 -2
- package/lib/components/Header/Header.types.d.ts +12 -4
- package/lib/components/Header/Header.types.js +2 -1
- package/lib/components/Header/Header.types.js.map +1 -1
- package/lib/components/Header/Header.types.mjs +2 -1
- package/lib/components/Header/Header.types.mjs.map +1 -1
- 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 +1 -0
- package/lib/components/Header/Navigation/MicrositeMenu/MicrositeMenu.styles.d.ts +1 -1
- package/lib/components/Header/Navigation/MobileMenu/MobileMenu.styles.d.ts +1 -1
- package/lib/components/Header/Navigation/ProMenu/ProMenu.d.ts +2 -0
- package/lib/components/Header/Navigation/ProMenu/ProMenu.js +103 -0
- package/lib/components/Header/Navigation/ProMenu/ProMenu.js.map +1 -0
- package/lib/components/Header/Navigation/ProMenu/ProMenu.mjs +81 -0
- package/lib/components/Header/Navigation/ProMenu/ProMenu.mjs.map +1 -0
- package/lib/components/Header/Navigation/ProMenu/ProMenu.styles.d.ts +23 -0
- package/lib/components/Header/Navigation/ProMenu/ProMenu.styles.js +121 -0
- package/lib/components/Header/Navigation/ProMenu/ProMenu.styles.js.map +1 -0
- package/lib/components/Header/Navigation/ProMenu/ProMenu.styles.mjs +106 -0
- package/lib/components/Header/Navigation/ProMenu/ProMenu.styles.mjs.map +1 -0
- package/lib/components/Header/Navigation/ProMenu/ProMenu.types.d.ts +12 -0
- package/lib/components/Header/Navigation/ProMenu/index.d.ts +1 -0
- package/lib/components/Header/Navigation/ProMenu/index.js +6 -0
- package/lib/components/{ResourceCalculatorV1/components → Header/Navigation/ProMenu}/index.js.map +1 -1
- package/lib/components/Header/Navigation/ProMenu/index.mjs +3 -0
- package/lib/components/Header/Navigation/ProMobileMenu/ProMobileMenu.d.ts +1 -1
- package/lib/components/Header/Navigation/ProMobileMenu/ProMobileMenu.js +92 -95
- package/lib/components/Header/Navigation/ProMobileMenu/ProMobileMenu.js.map +1 -1
- package/lib/components/Header/Navigation/ProMobileMenu/ProMobileMenu.mjs +92 -95
- package/lib/components/Header/Navigation/ProMobileMenu/ProMobileMenu.mjs.map +1 -1
- package/lib/components/Header/Navigation/ProMobileMenu/ProMobileMenu.styles.d.ts +9 -0
- package/lib/components/Header/Navigation/ProMobileMenu/ProMobileMenu.styles.js +15 -1
- package/lib/components/Header/Navigation/ProMobileMenu/ProMobileMenu.styles.js.map +1 -1
- package/lib/components/Header/Navigation/ProMobileMenu/ProMobileMenu.styles.mjs +13 -2
- package/lib/components/Header/Navigation/ProMobileMenu/ProMobileMenu.styles.mjs.map +1 -1
- package/lib/components/Header/Navigation/ProMobileMenu/ProMobileMenu.types.d.ts +10 -4
- package/lib/components/Header/ProHeader/ProHeader.d.ts +3 -4
- package/lib/components/Header/ProHeader/ProHeader.js +247 -120
- package/lib/components/Header/ProHeader/ProHeader.js.map +1 -1
- package/lib/components/Header/ProHeader/ProHeader.mjs +249 -124
- package/lib/components/Header/ProHeader/ProHeader.mjs.map +1 -1
- package/lib/components/Header/ProHeader/ProHeader.styles.d.ts +4 -1
- package/lib/components/Header/ProHeader/ProHeader.styles.js +23 -17
- package/lib/components/Header/ProHeader/ProHeader.styles.js.map +1 -1
- package/lib/components/Header/ProHeader/ProHeader.styles.mjs +21 -18
- package/lib/components/Header/ProHeader/ProHeader.styles.mjs.map +1 -1
- package/lib/components/Header/translations/ar.json.js +4 -1
- package/lib/components/Header/translations/ar.json.js.map +1 -1
- package/lib/components/Header/translations/ar.json.mjs +4 -2
- package/lib/components/Header/translations/ar.json.mjs.map +1 -1
- package/lib/components/Header/translations/de.json.js +4 -1
- package/lib/components/Header/translations/de.json.js.map +1 -1
- package/lib/components/Header/translations/de.json.mjs +4 -2
- package/lib/components/Header/translations/de.json.mjs.map +1 -1
- package/lib/components/Header/translations/el.json.js +4 -1
- package/lib/components/Header/translations/el.json.js.map +1 -1
- package/lib/components/Header/translations/el.json.mjs +4 -2
- package/lib/components/Header/translations/el.json.mjs.map +1 -1
- package/lib/components/Header/translations/en.json.js +4 -1
- package/lib/components/Header/translations/en.json.js.map +1 -1
- package/lib/components/Header/translations/en.json.mjs +4 -2
- package/lib/components/Header/translations/en.json.mjs.map +1 -1
- package/lib/components/Header/translations/es.json.js +4 -1
- package/lib/components/Header/translations/es.json.js.map +1 -1
- package/lib/components/Header/translations/es.json.mjs +4 -2
- package/lib/components/Header/translations/es.json.mjs.map +1 -1
- package/lib/components/Header/translations/fr.json.js +4 -1
- package/lib/components/Header/translations/fr.json.js.map +1 -1
- package/lib/components/Header/translations/fr.json.mjs +4 -2
- package/lib/components/Header/translations/fr.json.mjs.map +1 -1
- package/lib/components/Header/translations/it.json.js +4 -1
- package/lib/components/Header/translations/it.json.js.map +1 -1
- package/lib/components/Header/translations/it.json.mjs +4 -2
- package/lib/components/Header/translations/it.json.mjs.map +1 -1
- package/lib/components/Header/translations/ja.json.js +4 -1
- package/lib/components/Header/translations/ja.json.js.map +1 -1
- package/lib/components/Header/translations/ja.json.mjs +4 -2
- package/lib/components/Header/translations/ja.json.mjs.map +1 -1
- package/lib/components/Header/translations/pt-BR.json.js +4 -1
- package/lib/components/Header/translations/pt-BR.json.js.map +1 -1
- package/lib/components/Header/translations/pt-BR.json.mjs +4 -2
- package/lib/components/Header/translations/pt-BR.json.mjs.map +1 -1
- package/lib/components/Header/translations/zh-Hans.json.js +4 -1
- package/lib/components/Header/translations/zh-Hans.json.js.map +1 -1
- package/lib/components/Header/translations/zh-Hans.json.mjs +4 -2
- package/lib/components/Header/translations/zh-Hans.json.mjs.map +1 -1
- package/lib/components/Header/translations/zh-Hant-TW.json.js +4 -1
- package/lib/components/Header/translations/zh-Hant-TW.json.js.map +1 -1
- package/lib/components/Header/translations/zh-Hant-TW.json.mjs +4 -2
- package/lib/components/Header/translations/zh-Hant-TW.json.mjs.map +1 -1
- package/lib/components/Hero/Hero.styles.d.ts +2 -2
- package/lib/components/HeroFadeGallery/HeroFadeGallery.styles.d.ts +1 -1
- package/lib/components/{ResourceCalculatorV1/components/HorizontalOptionSelect → HorizontalOptionSelect}/HorizontalOptionSelect.d.ts +1 -1
- package/lib/components/{ResourceCalculatorV1/components/HorizontalOptionSelect → HorizontalOptionSelect}/HorizontalOptionSelect.js +3 -1
- package/lib/components/HorizontalOptionSelect/HorizontalOptionSelect.js.map +1 -0
- package/lib/components/{ResourceCalculatorV1/components/HorizontalOptionSelect → HorizontalOptionSelect}/HorizontalOptionSelect.mjs +3 -1
- package/lib/components/HorizontalOptionSelect/HorizontalOptionSelect.mjs.map +1 -0
- package/lib/components/{ResourceCalculatorV1/components/HorizontalOptionSelect → HorizontalOptionSelect}/HorizontalOptionSelect.styles.d.ts +1 -0
- package/lib/components/{ResourceCalculatorV1/components/HorizontalOptionSelect → HorizontalOptionSelect}/HorizontalOptionSelect.styles.js +10 -7
- package/lib/components/HorizontalOptionSelect/HorizontalOptionSelect.styles.js.map +1 -0
- package/lib/components/{ResourceCalculatorV1/components/HorizontalOptionSelect → HorizontalOptionSelect}/HorizontalOptionSelect.styles.mjs +10 -7
- package/lib/components/HorizontalOptionSelect/HorizontalOptionSelect.styles.mjs.map +1 -0
- package/lib/components/{ResourceCalculatorV1/components/HorizontalOptionSelect → HorizontalOptionSelect}/HorizontalOptionSelect.types.d.ts +1 -0
- package/lib/components/HowToUseSection/HowToUseSection.styles.d.ts +2 -2
- package/lib/components/LandingPagePro/LandingPagePro.d.ts +3 -0
- package/lib/components/LandingPagePro/LandingPagePro.js +3 -3
- package/lib/components/LandingPagePro/LandingPagePro.js.map +1 -1
- package/lib/components/LandingPagePro/LandingPagePro.mjs +2 -2
- package/lib/components/LandingPagePro/LandingPagePro.mjs.map +1 -1
- package/lib/components/LandingPagePro/LandingPagePro.styles.d.ts +1 -1
- 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/MicrositeSectionWrap/MicrositeSectionWrap.styles.d.ts +1 -1
- package/lib/components/MicrositeVideoSlideshow/MicrositeVideoSlideshow.js +1 -1
- package/lib/components/MicrositeVideoSlideshow/MicrositeVideoSlideshow.mjs +1 -1
- package/lib/components/MicrositeVideoSlideshow/assets/pause.svg.js +1 -1
- package/lib/components/MicrositeVideoSlideshow/assets/pause.svg.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/bigCompare/udmProSpecial.jpg.js +5 -5
- package/lib/components/ModelCompareV3/assets/Consoles/bigCompare/udmProSpecial.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/Consoles/udmProSpecial.jpg.js +1 -1
- package/lib/components/ModelCompareV3/assets/Consoles/udmProSpecial.jpg.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/udmProMax.js +1 -1
- package/lib/components/ModelCompareV3/data/products/udmProMax.mjs +1 -1
- package/lib/components/ModelCompareV3/data/products/udmProSpecial.js +1 -1
- package/lib/components/ModelCompareV3/data/products/udmProSpecial.mjs +1 -1
- package/lib/components/ProductSectionNavigation/ProductSectionNavigation.styles.d.ts +1 -1
- package/lib/components/ProductSectionNavigationV2/ProductSectionNavigation.styles.d.ts +1 -1
- package/lib/components/ProductTechSpecs/ProductTechSpecs.styles.d.ts +1 -1
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/ComputeResourceCalculator.constants.js +313 -17
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/ComputeResourceCalculator.constants.js.map +1 -1
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/ComputeResourceCalculator.constants.mjs +311 -17
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/ComputeResourceCalculator.constants.mjs.map +1 -1
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/ComputeResourceCalculator.types.d.ts +3 -2
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/ComputeResourceCalculator.types.js +2 -0
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/ComputeResourceCalculator.types.js.map +1 -1
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/ComputeResourceCalculator.types.mjs +2 -0
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/ComputeResourceCalculator.types.mjs.map +1 -1
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/DeviceSelect/DeviceSelect.js +120 -34
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/DeviceSelect/DeviceSelect.js.map +1 -1
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/DeviceSelect/DeviceSelect.mjs +120 -34
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/DeviceSelect/DeviceSelect.mjs.map +1 -1
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/DeviceSelect/DeviceSelect.styles.d.ts +16 -2
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/DeviceSelect/DeviceSelect.styles.js +54 -12
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/DeviceSelect/DeviceSelect.styles.js.map +1 -1
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/DeviceSelect/DeviceSelect.styles.mjs +50 -11
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/DeviceSelect/DeviceSelect.styles.mjs.map +1 -1
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/DeviceSelect/assets/ArrowLeftPrimary.svg.js +5 -5
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/DeviceSelect/assets/ArrowRightPrimary.svg.js +5 -5
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/InputCard/InputCard.js +2 -2
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/InputCard/InputCard.js.map +1 -1
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/InputCard/InputCard.mjs +2 -2
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/InputCard/InputCard.mjs.map +1 -1
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/InputCard/InputCard.styles.js +2 -0
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/InputCard/InputCard.styles.js.map +1 -1
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/InputCard/InputCard.styles.mjs +2 -0
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/InputCard/InputCard.styles.mjs.map +1 -1
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/InputCard/assets/attention.svg.js +1 -1
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/InputCard/assets/attention.svg.mjs +2 -2
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/ProgressBarChart/ProgressBarChart.js +1 -1
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/ProgressBarChart/ProgressBarChart.mjs +1 -1
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/ProgressBarChart/assets/attention.svg.js +1 -1
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/ProgressBarChart/assets/attention.svg.mjs +2 -2
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/useComputeResourceCalculator.js +1 -1
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/useComputeResourceCalculator.js.map +1 -1
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/useComputeResourceCalculator.mjs +1 -1
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/useComputeResourceCalculator.mjs.map +1 -1
- package/lib/components/ResourceCalculatorV1/PoeCalculator/components/PoeConsumerConfigurator/PoeConsumerSelectModal/PoeConsumerSelectModal.js +2 -2
- package/lib/components/ResourceCalculatorV1/PoeCalculator/components/PoeConsumerConfigurator/PoeConsumerSelectModal/PoeConsumerSelectModal.js.map +1 -1
- package/lib/components/ResourceCalculatorV1/PoeCalculator/components/PoeConsumerConfigurator/PoeConsumerSelectModal/PoeConsumerSelectModal.mjs +2 -2
- package/lib/components/ResourceCalculatorV1/PoeCalculator/components/PoeConsumerConfigurator/PoeConsumerSelectModal/PoeConsumerSelectModal.mjs.map +1 -1
- package/lib/components/ResourceCalculatorV1/ResourceCalculator.js +1 -2
- package/lib/components/ResourceCalculatorV1/ResourceCalculator.js.map +1 -1
- package/lib/components/ResourceCalculatorV1/ResourceCalculator.mjs +1 -2
- package/lib/components/ResourceCalculatorV1/ResourceCalculator.mjs.map +1 -1
- package/lib/{assets/icons/menu/icon-globe.svg.js → components/ResourceCalculatorV1/assets/consoles/efg.png.js} +6 -6
- package/lib/components/ResourceCalculatorV1/assets/consoles/efg.png.js.map +1 -0
- package/lib/components/ResourceCalculatorV1/assets/consoles/efg.png.mjs +3 -0
- package/lib/components/ResourceCalculatorV1/assets/consoles/efg.png.mjs.map +1 -0
- package/lib/components/ResourceCalculatorV1/assets/consoles/ucg-max.png.js +27 -0
- package/lib/components/ResourceCalculatorV1/assets/consoles/ucg-max.png.js.map +1 -0
- package/lib/components/ResourceCalculatorV1/assets/consoles/ucg-max.png.mjs +3 -0
- package/lib/components/ResourceCalculatorV1/assets/consoles/ucg-max.png.mjs.map +1 -0
- package/lib/components/ResourceCalculatorV1/translations/en.json.js +6 -4
- package/lib/components/ResourceCalculatorV1/translations/en.json.js.map +1 -1
- package/lib/components/ResourceCalculatorV1/translations/en.json.mjs +6 -4
- package/lib/components/ResourceCalculatorV1/translations/en.json.mjs.map +1 -1
- package/lib/components/ResourceCalculatorV1/translations/useResourceCalculatorTranslation.d.ts +2 -2
- package/lib/components/VideoPlayerNew/VideoPlayer.js +2 -2
- package/lib/components/VideoPlayerNew/VideoPlayer.mjs +2 -2
- package/lib/components/VideoPlayerNew/assets/close.svg.js +1 -1
- package/lib/components/VideoPlayerNew/assets/close.svg.mjs +2 -2
- package/lib/components/VideoPlayerNew/assets/pause.svg.js +1 -1
- package/lib/components/VideoPlayerNew/assets/pause.svg.mjs +2 -2
- package/lib/components/index.d.ts +1 -0
- package/lib/components/index.js +2 -0
- package/lib/components/index.js.map +1 -1
- package/lib/components/index.mjs +2 -0
- package/lib/components/index.mjs.map +1 -1
- package/lib/constants/proStoreCategories/mapping/index.d.ts +1 -0
- package/lib/constants/proStoreCategories/mapping/index.js +15 -10
- package/lib/constants/proStoreCategories/mapping/index.js.map +1 -1
- package/lib/constants/proStoreCategories/mapping/index.mjs +15 -10
- package/lib/constants/proStoreCategories/mapping/index.mjs.map +1 -1
- package/lib/constants/proStoreCategories/mapping/unifi.d.ts +2 -1
- package/lib/constants/proStoreCategories/mapping/unifi.js +1 -0
- package/lib/constants/proStoreCategories/mapping/unifi.js.map +1 -1
- package/lib/constants/proStoreCategories/mapping/unifi.mjs +1 -0
- package/lib/constants/proStoreCategories/mapping/unifi.mjs.map +1 -1
- package/lib/constants/proStoreCategories/translations/en.json.js +3 -0
- package/lib/constants/proStoreCategories/translations/en.json.js.map +1 -1
- package/lib/constants/proStoreCategories/translations/en.json.mjs +3 -1
- package/lib/constants/proStoreCategories/translations/en.json.mjs.map +1 -1
- package/lib/constants/proStoreCategories/translations/fr.json.js +1 -1
- package/lib/constants/proStoreCategories/translations/fr.json.mjs +1 -1
- package/lib/constants/proStoreCategories/translations/zh-Hans.json.js +1 -1
- package/lib/constants/proStoreCategories/translations/zh-Hans.json.mjs +1 -1
- package/lib/constants/proStoreCategories/translations/zh-Hant-TW.json.js +1 -1
- package/lib/constants/proStoreCategories/translations/zh-Hant-TW.json.mjs +1 -1
- package/lib/constants/theme.js +4 -0
- package/lib/constants/theme.js.map +1 -1
- package/lib/constants/theme.mjs +4 -0
- package/lib/constants/theme.mjs.map +1 -1
- package/lib/contexts/MenuContext/context.js +1 -1
- 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/helpers/index.d.ts +1 -0
- package/lib/helpers/index.js +11 -0
- package/lib/helpers/index.js.map +1 -1
- package/lib/helpers/index.mjs +1 -0
- package/lib/helpers/index.mjs.map +1 -1
- package/lib/helpers/product.d.ts +87 -0
- package/lib/helpers/product.js +346 -0
- package/lib/helpers/product.js.map +1 -0
- package/lib/helpers/product.mjs +335 -0
- package/lib/helpers/product.mjs.map +1 -0
- package/lib/helpers/ux.d.ts +9 -1
- package/lib/helpers/ux.js +15 -0
- package/lib/helpers/ux.js.map +1 -1
- package/lib/helpers/ux.mjs +15 -1
- package/lib/helpers/ux.mjs.map +1 -1
- package/lib/types/index.d.ts +1 -0
- package/lib/types/index.js +2 -0
- package/lib/types/index.js.map +1 -1
- package/lib/types/index.mjs +1 -0
- package/lib/types/index.mjs.map +1 -1
- package/lib/types/product.d.ts +87 -0
- package/lib/types/product.js +14 -0
- package/lib/types/product.js.map +1 -0
- package/lib/types/product.mjs +13 -0
- package/lib/types/product.mjs.map +1 -0
- package/lib/utils/array.d.ts +4 -0
- package/lib/utils/array.js +10 -0
- package/lib/utils/array.js.map +1 -1
- package/lib/utils/array.mjs +10 -1
- package/lib/utils/array.mjs.map +1 -1
- package/lib/utils/money/allocators/fixedAmount.d.ts +26 -0
- package/lib/utils/money/allocators/fixedAmount.js +52 -0
- package/lib/utils/money/allocators/fixedAmount.js.map +1 -0
- package/lib/utils/money/allocators/fixedAmount.mjs +50 -0
- package/lib/utils/money/allocators/fixedAmount.mjs.map +1 -0
- package/lib/utils/money/allocators/index.d.ts +2 -0
- package/lib/utils/money/allocators/index.js +8 -0
- package/lib/utils/money/allocators/index.js.map +1 -0
- package/lib/utils/money/allocators/index.mjs +4 -0
- package/lib/utils/money/allocators/index.mjs.map +1 -0
- package/lib/utils/money/allocators/productAmount.d.ts +13 -0
- package/lib/utils/money/allocators/productAmount.js +98 -0
- package/lib/utils/money/allocators/productAmount.js.map +1 -0
- package/lib/utils/money/allocators/productAmount.mjs +96 -0
- package/lib/utils/money/allocators/productAmount.mjs.map +1 -0
- package/lib/utils/money/constants.d.ts +56 -25
- package/lib/utils/money/constants.js +72 -7
- package/lib/utils/money/constants.js.map +1 -1
- package/lib/utils/money/constants.mjs +70 -7
- package/lib/utils/money/constants.mjs.map +1 -1
- package/lib/utils/money/exchangeRate.d.ts +31 -0
- package/lib/utils/money/exchangeRate.js +27 -0
- package/lib/utils/money/exchangeRate.js.map +1 -0
- package/lib/utils/money/exchangeRate.mjs +23 -0
- package/lib/utils/money/exchangeRate.mjs.map +1 -0
- package/lib/utils/money/format.d.ts +10 -5
- package/lib/utils/money/format.js +22 -14
- package/lib/utils/money/format.js.map +1 -1
- package/lib/utils/money/format.mjs +23 -16
- package/lib/utils/money/format.mjs.map +1 -1
- package/lib/utils/money/index.d.ts +4 -1
- package/lib/utils/money/index.js +26 -8
- package/lib/utils/money/index.js.map +1 -1
- package/lib/utils/money/index.mjs +8 -4
- package/lib/utils/money/index.mjs.map +1 -1
- package/lib/utils/money/misc.d.ts +68 -28
- package/lib/utils/money/misc.js +35 -64
- package/lib/utils/money/misc.js.map +1 -1
- package/lib/utils/money/misc.mjs +32 -43
- package/lib/utils/money/misc.mjs.map +1 -1
- package/lib/utils/money/misc.private.d.ts +23 -0
- package/lib/utils/money/misc.private.js +46 -0
- package/lib/utils/money/misc.private.js.map +1 -0
- package/lib/utils/money/misc.private.mjs +21 -0
- package/lib/utils/money/misc.private.mjs.map +1 -0
- package/lib/utils/money/shipping.d.ts +5 -0
- package/lib/utils/money/shipping.js +8 -0
- package/lib/utils/money/shipping.js.map +1 -0
- package/lib/utils/money/shipping.mjs +6 -0
- package/lib/utils/money/shipping.mjs.map +1 -0
- package/lib/utils/money/tax.d.ts +38 -2
- package/lib/utils/money/tax.js +46 -10
- package/lib/utils/money/tax.js.map +1 -1
- package/lib/utils/money/tax.mjs +42 -11
- package/lib/utils/money/tax.mjs.map +1 -1
- package/lib/utils/money/tax.private.d.ts +17 -0
- package/lib/utils/money/tax.private.js +65 -0
- package/lib/utils/money/tax.private.js.map +1 -0
- package/lib/utils/money/tax.private.mjs +60 -0
- package/lib/utils/money/tax.private.mjs.map +1 -0
- package/lib/utils/money/types.d.ts +78 -3
- package/lib/utils/number.d.ts +1 -1
- package/lib/utils/number.js +1 -1
- package/lib/utils/number.js.map +1 -1
- package/lib/utils/number.mjs +1 -1
- package/lib/utils/number.mjs.map +1 -1
- package/lib/utils/productSort.d.ts +41 -0
- package/lib/utils/productSort.js +67 -0
- package/lib/utils/productSort.js.map +1 -0
- package/lib/utils/productSort.mjs +60 -0
- package/lib/utils/productSort.mjs.map +1 -0
- package/package.json +1 -1
- package/lib/assets/icons/menu/icon-globe.svg.js.map +0 -1
- package/lib/assets/icons/menu/icon-globe.svg.mjs +0 -3
- package/lib/assets/icons/menu/icon-globe.svg.mjs.map +0 -1
- package/lib/components/ResourceCalculatorV1/components/HorizontalOptionSelect/HorizontalOptionSelect.js.map +0 -1
- package/lib/components/ResourceCalculatorV1/components/HorizontalOptionSelect/HorizontalOptionSelect.mjs.map +0 -1
- package/lib/components/ResourceCalculatorV1/components/HorizontalOptionSelect/HorizontalOptionSelect.styles.js.map +0 -1
- package/lib/components/ResourceCalculatorV1/components/HorizontalOptionSelect/HorizontalOptionSelect.styles.mjs.map +0 -1
- package/lib/components/ResourceCalculatorV1/components/index.d.ts +0 -1
- package/lib/components/ResourceCalculatorV1/components/index.js +0 -5
- package/lib/components/ResourceCalculatorV1/components/index.mjs +0 -3
- package/lib/utils/validations.d.ts +0 -15
- package/lib/utils/validations.js +0 -23
- package/lib/utils/validations.js.map +0 -1
- package/lib/utils/validations.mjs +0 -21
- package/lib/utils/validations.mjs.map +0 -1
- /package/lib/components/{ResourceCalculatorV1/components → Header/Navigation/ProMenu}/index.mjs.map +0 -0
- /package/lib/components/{ResourceCalculatorV1/components/HorizontalOptionSelect → HorizontalOptionSelect}/index.d.ts +0 -0
- /package/lib/components/{ResourceCalculatorV1/components/HorizontalOptionSelect → HorizontalOptionSelect}/index.js +0 -0
- /package/lib/components/{ResourceCalculatorV1/components/HorizontalOptionSelect → HorizontalOptionSelect}/index.js.map +0 -0
- /package/lib/components/{ResourceCalculatorV1/components/HorizontalOptionSelect → HorizontalOptionSelect}/index.mjs +0 -0
- /package/lib/components/{ResourceCalculatorV1/components/HorizontalOptionSelect → HorizontalOptionSelect}/index.mjs.map +0 -0
|
@@ -48,6 +48,7 @@ export declare const defaultHeaderTranslations: {
|
|
|
48
48
|
upsellTitle: string;
|
|
49
49
|
};
|
|
50
50
|
language: {};
|
|
51
|
+
region: string;
|
|
51
52
|
};
|
|
52
53
|
export interface HeaderAccountCustomer {
|
|
53
54
|
id: string;
|
|
@@ -213,6 +214,14 @@ export interface ProHeaderEarlyAccess {
|
|
|
213
214
|
loading?: boolean;
|
|
214
215
|
onClick: () => void;
|
|
215
216
|
}
|
|
217
|
+
export interface HeaderProductLineOption {
|
|
218
|
+
value: ProductLine;
|
|
219
|
+
label: string;
|
|
220
|
+
}
|
|
221
|
+
export interface ProHeaderCategories {
|
|
222
|
+
items: ProMobileMenuSectionItem[];
|
|
223
|
+
activeIndex: number;
|
|
224
|
+
}
|
|
216
225
|
export type ProHeaderProps = Pick<HeaderProps, "className" | "motif" | "cart" | "account" | "translations" | "onModalOpen" | "onCartClick" | "showLineLoader" | "accountMenu"> & {
|
|
217
226
|
/**
|
|
218
227
|
* Header customizations for embed context like WebView
|
|
@@ -223,10 +232,7 @@ export type ProHeaderProps = Pick<HeaderProps, "className" | "motif" | "cart" |
|
|
|
223
232
|
earlyAccess?: ProHeaderEarlyAccess;
|
|
224
233
|
handlePurchaseHistoryClick?: () => void;
|
|
225
234
|
handleOrderHistoryClick?: () => void;
|
|
226
|
-
productLineOptions?:
|
|
227
|
-
value: ProductLine;
|
|
228
|
-
label: string;
|
|
229
|
-
}[];
|
|
235
|
+
productLineOptions?: HeaderProductLineOption[];
|
|
230
236
|
productLineValue?: ProductLine;
|
|
231
237
|
handleProductLineChange?: (type: ProductLine) => void;
|
|
232
238
|
handleMobileMenuClick?: () => void;
|
|
@@ -236,4 +242,6 @@ export type ProHeaderProps = Pick<HeaderProps, "className" | "motif" | "cart" |
|
|
|
236
242
|
onSearchFocus?: () => void;
|
|
237
243
|
onSearchBlur?: () => void;
|
|
238
244
|
onSearchClick?: () => void;
|
|
245
|
+
categories: ProHeaderCategories;
|
|
246
|
+
useInlineCategories?: boolean;
|
|
239
247
|
};
|
|
@@ -43,7 +43,8 @@ const defaultHeaderTranslations = {
|
|
|
43
43
|
itemsTitle: "Your Cart",
|
|
44
44
|
upsellTitle: "Usually bought together"
|
|
45
45
|
},
|
|
46
|
-
language: {}
|
|
46
|
+
language: {},
|
|
47
|
+
region: "Region"
|
|
47
48
|
};
|
|
48
49
|
exports.defaultHeaderTranslations = defaultHeaderTranslations;
|
|
49
50
|
//# sourceMappingURL=Header.types.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Header.types.js","sources":["../../../src/components/Header/Header.types.tsx"],"sourcesContent":["import type { Motif } from \"@ubnt/ui-components/utils\";\n\nimport type { Language } from \"../../contexts/MenuContext/mapping\";\nimport type {\n ModalId,\n ParsedNavigationItem,\n ParsedNavigationSubItem,\n ParsedNavigationSubSubItem,\n} from \"../../contexts/MenuContext/types\";\nimport type { Nullish, ProductLine } from \"../../types\";\nimport type {\n CustomImageAsset,\n RenderImageFn,\n} from \"../CustomImage/CustomImage.types\";\nimport type { NavigationMicrositeMenuProps } from \"./Navigation/MicrositeMenu/MicrositeMenu.types\";\nimport type { ProMobileMenuSectionItem } from \"./Navigation/ProMobileMenu/ProMobileMenu.types\";\n\nexport const defaultHeaderTranslations = {\n new: \"New\",\n support: \"Support\",\n purchasedProductHistory: \"Purchased Product History\",\n orderHistory: \"Order History\",\n earlyAccess: \"Early Access\",\n store: \"Store\",\n links: \"Links\",\n company: \"Company\",\n social: \"Social\",\n tools: \"Tools\",\n training: \"Training\",\n continueShopping: \"Continue Shopping\",\n search: {\n placeholder: \"Search...\",\n noMatchesFound: \"Sorry, we couldn't find any matches.\",\n seeAllResults: \"See all results\",\n searchUniFiProducts: \"Search UniFi products\",\n searchUISPProducts: \"Search UISP products\",\n searchAmpliFiProducts: \"Search AmpliFi products\",\n },\n account: {\n login: \"Log In\",\n signUp: \"Sign Up\",\n signOut: \"Sign Out\",\n uiAccount: \"UI Account\",\n unifiSiteManager: \"UniFi Site Manager\",\n manageAccount: \"Manage Account\",\n orderHistory: \"Orders & Addresses\",\n },\n cart: {\n VATincluded: \"VAT Incl.\",\n includesVat: \"Includes VAT of\",\n discount: \"Discount\",\n empty: \"Your cart is empty\",\n review: \"Checkout\",\n shipping: \"Shipping\",\n subtotal: \"Subtotal\",\n total: \"Total price:\",\n itemsTitle: \"Your Cart\",\n upsellTitle: \"Usually bought together\",\n },\n language: {},\n};\n\nexport interface HeaderAccountCustomer {\n id: string;\n email: string;\n displayName: string;\n picture?: string | null;\n}\n\nexport interface HeaderAccount {\n loading?: boolean;\n customer?: Nullish<HeaderAccountCustomer>;\n handleLogin?: () => void;\n handleLogout?: () => void;\n handleRegister?: () => void;\n handleManageAccount?: () => void;\n handleOrderHistory?: () => void;\n renderStorePicker?: (onClose: () => void) => JSX.Element;\n}\n\nexport interface HeaderSearch {\n /** Trigger search */\n onSearch: (formattedQuerySearchTerm: string) => void;\n loading?: boolean;\n totalItemsCount: number;\n items: Array<{\n id: string;\n url: string;\n image?: CustomImageAsset | null;\n title: string;\n family?: string | null;\n }>;\n}\n\nexport interface HeaderCartItemControls {\n loading?: boolean;\n quantityMax?: number;\n onQuantityChange: (newQuantity: number) => void;\n}\n\nexport interface HeaderCartItem {\n id: string;\n url: string;\n image: Nullish<CustomImageAsset>;\n quantity: number;\n title: string;\n controls: HeaderCartItemControls;\n price: string;\n priceIncludingVAT?: string;\n}\n\nexport interface HeaderCart {\n onReview: () => void;\n loading?: boolean;\n items: HeaderCartItem[];\n upsellItems?: HeaderCartItem[];\n totals: Nullish<{\n shipping: Nullish<string>;\n discount: Nullish<string>;\n finalTax: Nullish<string>;\n total: string;\n totalIncludingVAT?: string;\n }>;\n}\n\nexport type HeaderTranslations = typeof defaultHeaderTranslations;\n\nexport type HeaderEmbedConfig = {\n /**\n * Allows to configure custom callback on home link click\n */\n homeLinkClickHandler?: () => void;\n\n /**\n * Allows to render custom extra section items in Pro Mobile Menu\n */\n mobileMenuExtraSectionItems?: Array<ProMobileMenuSectionItem>;\n\n /**\n * Moves Avatar icon to the left side of the header\n */\n moveAvatarIconToLeft?: boolean;\n\n /**\n * Allows to display avatar as image instead of icon\n */\n displayAvatarAsImage?: boolean;\n\n /**\n * Allows to configure custom callback on avatar click\n */\n avatarClickHandler?: () => void;\n\n /**\n * Allows to hide logo / site title\n */\n hideLogo?: boolean;\n\n /**\n * Allows to hide Avatar icon from the header\n */\n hideAvatarIcon?: boolean;\n\n /**\n * Hide language picker\n */\n hideLanguagePicker?: boolean;\n\n fullWidthHeader?: boolean;\n\n /**\n * Renders site title instead of UI logo\n */\n siteTitle?: string;\n\n /**\n * Blurs search input and dismissed virtual keyboard on touchmove\n */\n /** @deprecated Use blurSearchOnTouchmove */\n hideSearchOnTouchmove?: boolean;\n blurSearchOnTouchmove?: boolean;\n};\n\nexport interface HeaderProps {\n className?: string;\n motif: Motif;\n /**\n * Main header bar becomes fixed position at the top\n */\n sticky?: boolean;\n /**\n * Navigation carousel becomes fixed position at the top\n */\n stickyCarousel?: boolean;\n translations?: HeaderTranslations;\n renderImage: RenderImageFn;\n showLineLoader?: boolean;\n onModalOpen?: () => void;\n onMenuItemLinkClick?: (\n e: React.MouseEvent<HTMLElement>,\n item: ParsedNavigationItem,\n ) => void;\n onMenuSubItemLinkClick?: (\n e: React.MouseEvent<HTMLElement>,\n item: ParsedNavigationSubItem | ParsedNavigationSubSubItem,\n ) => void;\n\n onLanguageChange?: (\n e: React.MouseEvent<HTMLElement>,\n link: string,\n language: Language,\n ) => void;\n\n // Account\n account?: HeaderAccount;\n\n // Search\n onSearchResultsAction?: (searchTerm: string) => void;\n search?: HeaderSearch;\n\n // Cart\n onCartClick?: () => void;\n cart?: HeaderCart;\n\n // Set specific modal to be open initially\n initialActiveModal?: Nullish<ModalId>;\n /**\n * Triggers on active modal change\n */\n onActiveModal?: (id: ModalId | null, prevModalId: ModalId | null) => void;\n\n /**\n * Will be called before navigating to store search, the tracking request in this callback will only\n * finish if called from store side as microsites are not using next router.\n */\n trackStoreSearchClick?: () => void;\n\n transparentHeader?: boolean;\n\n /**\n * Sub-menu used for microsites\n */\n micrositeMenu?: NavigationMicrositeMenuProps;\n\n /**\n * Header customizations for embed context like WebView\n */\n embedConfig?: HeaderEmbedConfig;\n\n accountMenu?: React.ReactNode;\n}\n\nexport type IsolatedHeaderProps = {\n className?: string;\n motif: Motif;\n translations?: HeaderTranslations;\n handleContinueShopping: () => void;\n showLineLoader?: boolean;\n account?: {\n loading?: HeaderAccount[\"loading\"];\n customer?: {\n picture?: HeaderAccountCustomer[\"picture\"];\n };\n };\n} & Pick<HeaderProps, \"embedConfig\">;\n\nexport interface ProHeaderEarlyAccess {\n loading?: boolean;\n onClick: () => void;\n}\n\nexport type ProHeaderProps = Pick<\n HeaderProps,\n | \"className\"\n | \"motif\"\n | \"cart\"\n | \"account\"\n | \"translations\"\n | \"onModalOpen\"\n | \"onCartClick\"\n | \"showLineLoader\"\n | \"accountMenu\"\n> & {\n /**\n * Header customizations for embed context like WebView\n */\n embedConfig?: HeaderEmbedConfig;\n\n // Country picker\n currentCountryName?: string;\n handleStorePickerClick?: () => void;\n\n // Early access button\n earlyAccess?: ProHeaderEarlyAccess;\n\n // Purchase History button\n handlePurchaseHistoryClick?: () => void;\n\n // Order button\n handleOrderHistoryClick?: () => void;\n\n // Product line picker\n productLineOptions?: { value: ProductLine; label: string }[];\n productLineValue?: ProductLine;\n handleProductLineChange?: (type: ProductLine) => void;\n\n // Mobile menu aka \"hamburger\" button click\n handleMobileMenuClick?: () => void;\n\n onLanguageChange?: (\n e: React.MouseEvent<HTMLElement>,\n link: string,\n language: Language,\n ) => void;\n\n // Search\n searchValue?: string;\n onSearch?: (searchTerm: string) => void;\n\n onSearchFocus?: () => void;\n onSearchBlur?: () => void;\n onSearchClick?: () => void;\n};\n"],"names":["defaultHeaderTranslations","new","support","purchasedProductHistory","orderHistory","earlyAccess","store","links","company","social","tools","training","continueShopping","search","placeholder","noMatchesFound","seeAllResults","searchUniFiProducts","searchUISPProducts","searchAmpliFiProducts","account","login","signUp","signOut","uiAccount","unifiSiteManager","manageAccount","cart","VATincluded","includesVat","discount","empty","review","shipping","subtotal","total","itemsTitle","upsellTitle","language"],"mappings":";;;AAiBO,MAAMA,yBAA4B,GAAA;EACvCC,GAAK,EAAA,KAAA;EACLC,OAAS,EAAA,SAAA;EACTC,uBAAyB,EAAA,2BAAA;EACzBC,YAAc,EAAA,eAAA;EACdC,WAAa,EAAA,cAAA;EACbC,KAAO,EAAA,OAAA;EACPC,KAAO,EAAA,OAAA;EACPC,OAAS,EAAA,SAAA;EACTC,MAAQ,EAAA,QAAA;EACRC,KAAO,EAAA,OAAA;EACPC,QAAU,EAAA,UAAA;EACVC,gBAAkB,EAAA,mBAAA;EAClBC,MAAQ,EAAA;IACNC,WAAa,EAAA,WAAA;IACbC,cAAgB,EAAA,sCAAA;IAChBC,aAAe,EAAA,iBAAA;IACfC,mBAAqB,EAAA,uBAAA;IACrBC,kBAAoB,EAAA,sBAAA;IACpBC,qBAAuB,EAAA;EACzB,CAAA;EACAC,OAAS,EAAA;IACPC,KAAO,EAAA,QAAA;IACPC,MAAQ,EAAA,SAAA;IACRC,OAAS,EAAA,UAAA;IACTC,SAAW,EAAA,YAAA;IACXC,gBAAkB,EAAA,oBAAA;IAClBC,aAAe,EAAA,gBAAA;IACftB,YAAc,EAAA;EAChB,CAAA;EACAuB,IAAM,EAAA;IACJC,WAAa,EAAA,WAAA;IACbC,WAAa,EAAA,iBAAA;IACbC,QAAU,EAAA,UAAA;IACVC,KAAO,EAAA,oBAAA;IACPC,MAAQ,EAAA,UAAA;IACRC,QAAU,EAAA,UAAA;IACVC,QAAU,EAAA,UAAA;IACVC,KAAO,EAAA,cAAA;IACPC,UAAY,EAAA,WAAA;IACZC,WAAa,EAAA;EACf,CAAA;EACAC,UAAU,CAAC;AACb,CAAA;"}
|
|
1
|
+
{"version":3,"file":"Header.types.js","sources":["../../../src/components/Header/Header.types.tsx"],"sourcesContent":["import type { Motif } from \"@ubnt/ui-components/utils\";\n\nimport type { Language } from \"../../contexts/MenuContext/mapping\";\nimport type {\n ModalId,\n ParsedNavigationItem,\n ParsedNavigationSubItem,\n ParsedNavigationSubSubItem,\n} from \"../../contexts/MenuContext/types\";\nimport type { Nullish, ProductLine } from \"../../types\";\nimport type {\n CustomImageAsset,\n RenderImageFn,\n} from \"../CustomImage/CustomImage.types\";\nimport type { NavigationMicrositeMenuProps } from \"./Navigation/MicrositeMenu/MicrositeMenu.types\";\nimport type { ProMobileMenuSectionItem } from \"./Navigation/ProMobileMenu/ProMobileMenu.types\";\n\nexport const defaultHeaderTranslations = {\n new: \"New\",\n support: \"Support\",\n purchasedProductHistory: \"Purchased Product History\",\n orderHistory: \"Order History\",\n earlyAccess: \"Early Access\",\n store: \"Store\",\n links: \"Links\",\n company: \"Company\",\n social: \"Social\",\n tools: \"Tools\",\n training: \"Training\",\n continueShopping: \"Continue Shopping\",\n search: {\n placeholder: \"Search...\",\n noMatchesFound: \"Sorry, we couldn't find any matches.\",\n seeAllResults: \"See all results\",\n searchUniFiProducts: \"Search UniFi products\",\n searchUISPProducts: \"Search UISP products\",\n searchAmpliFiProducts: \"Search AmpliFi products\",\n },\n account: {\n login: \"Log In\",\n signUp: \"Sign Up\",\n signOut: \"Sign Out\",\n uiAccount: \"UI Account\",\n unifiSiteManager: \"UniFi Site Manager\",\n manageAccount: \"Manage Account\",\n orderHistory: \"Orders & Addresses\",\n },\n cart: {\n VATincluded: \"VAT Incl.\",\n includesVat: \"Includes VAT of\",\n discount: \"Discount\",\n empty: \"Your cart is empty\",\n review: \"Checkout\",\n shipping: \"Shipping\",\n subtotal: \"Subtotal\",\n total: \"Total price:\",\n itemsTitle: \"Your Cart\",\n upsellTitle: \"Usually bought together\",\n },\n language: {},\n region: \"Region\",\n};\n\nexport interface HeaderAccountCustomer {\n id: string;\n email: string;\n displayName: string;\n picture?: string | null;\n}\n\nexport interface HeaderAccount {\n loading?: boolean;\n customer?: Nullish<HeaderAccountCustomer>;\n handleLogin?: () => void;\n handleLogout?: () => void;\n handleRegister?: () => void;\n handleManageAccount?: () => void;\n handleOrderHistory?: () => void;\n renderStorePicker?: (onClose: () => void) => JSX.Element;\n}\n\nexport interface HeaderSearch {\n /** Trigger search */\n onSearch: (formattedQuerySearchTerm: string) => void;\n loading?: boolean;\n totalItemsCount: number;\n items: Array<{\n id: string;\n url: string;\n image?: CustomImageAsset | null;\n title: string;\n family?: string | null;\n }>;\n}\n\nexport interface HeaderCartItemControls {\n loading?: boolean;\n quantityMax?: number;\n onQuantityChange: (newQuantity: number) => void;\n}\n\nexport interface HeaderCartItem {\n id: string;\n url: string;\n image: Nullish<CustomImageAsset>;\n quantity: number;\n title: string;\n controls: HeaderCartItemControls;\n price: string;\n priceIncludingVAT?: string;\n}\n\nexport interface HeaderCart {\n onReview: () => void;\n loading?: boolean;\n items: HeaderCartItem[];\n upsellItems?: HeaderCartItem[];\n totals: Nullish<{\n shipping: Nullish<string>;\n discount: Nullish<string>;\n finalTax: Nullish<string>;\n total: string;\n totalIncludingVAT?: string;\n }>;\n}\n\nexport type HeaderTranslations = typeof defaultHeaderTranslations;\n\nexport type HeaderEmbedConfig = {\n /**\n * Allows to configure custom callback on home link click\n */\n homeLinkClickHandler?: () => void;\n\n /**\n * Allows to render custom extra section items in Pro Mobile Menu\n */\n mobileMenuExtraSectionItems?: Array<ProMobileMenuSectionItem>;\n\n /**\n * Moves Avatar icon to the left side of the header\n */\n moveAvatarIconToLeft?: boolean;\n\n /**\n * Allows to display avatar as image instead of icon\n */\n displayAvatarAsImage?: boolean;\n\n /**\n * Allows to configure custom callback on avatar click\n */\n avatarClickHandler?: () => void;\n\n /**\n * Allows to hide logo / site title\n */\n hideLogo?: boolean;\n\n /**\n * Allows to hide Avatar icon from the header\n */\n hideAvatarIcon?: boolean;\n\n /**\n * Hide language picker\n */\n hideLanguagePicker?: boolean;\n\n fullWidthHeader?: boolean;\n\n /**\n * Renders site title instead of UI logo\n */\n siteTitle?: string;\n\n /**\n * Blurs search input and dismissed virtual keyboard on touchmove\n */\n /** @deprecated Use blurSearchOnTouchmove */\n hideSearchOnTouchmove?: boolean;\n blurSearchOnTouchmove?: boolean;\n};\n\nexport interface HeaderProps {\n className?: string;\n motif: Motif;\n /**\n * Main header bar becomes fixed position at the top\n */\n sticky?: boolean;\n /**\n * Navigation carousel becomes fixed position at the top\n */\n stickyCarousel?: boolean;\n translations?: HeaderTranslations;\n renderImage: RenderImageFn;\n showLineLoader?: boolean;\n onModalOpen?: () => void;\n onMenuItemLinkClick?: (\n e: React.MouseEvent<HTMLElement>,\n item: ParsedNavigationItem,\n ) => void;\n onMenuSubItemLinkClick?: (\n e: React.MouseEvent<HTMLElement>,\n item: ParsedNavigationSubItem | ParsedNavigationSubSubItem,\n ) => void;\n\n onLanguageChange?: (\n e: React.MouseEvent<HTMLElement>,\n link: string,\n language: Language,\n ) => void;\n\n // Account\n account?: HeaderAccount;\n\n // Search\n onSearchResultsAction?: (searchTerm: string) => void;\n search?: HeaderSearch;\n\n // Cart\n onCartClick?: () => void;\n cart?: HeaderCart;\n\n // Set specific modal to be open initially\n initialActiveModal?: Nullish<ModalId>;\n /**\n * Triggers on active modal change\n */\n onActiveModal?: (id: ModalId | null, prevModalId: ModalId | null) => void;\n\n /**\n * Will be called before navigating to store search, the tracking request in this callback will only\n * finish if called from store side as microsites are not using next router.\n */\n trackStoreSearchClick?: () => void;\n\n transparentHeader?: boolean;\n\n /**\n * Sub-menu used for microsites\n */\n micrositeMenu?: NavigationMicrositeMenuProps;\n\n /**\n * Header customizations for embed context like WebView\n */\n embedConfig?: HeaderEmbedConfig;\n\n accountMenu?: React.ReactNode;\n}\n\nexport type IsolatedHeaderProps = {\n className?: string;\n motif: Motif;\n translations?: HeaderTranslations;\n handleContinueShopping: () => void;\n showLineLoader?: boolean;\n account?: {\n loading?: HeaderAccount[\"loading\"];\n customer?: {\n picture?: HeaderAccountCustomer[\"picture\"];\n };\n };\n} & Pick<HeaderProps, \"embedConfig\">;\n\nexport interface ProHeaderEarlyAccess {\n loading?: boolean;\n onClick: () => void;\n}\n\nexport interface HeaderProductLineOption {\n value: ProductLine;\n label: string;\n}\n\nexport interface ProHeaderCategories {\n items: ProMobileMenuSectionItem[];\n activeIndex: number;\n}\n\nexport type ProHeaderProps = Pick<\n HeaderProps,\n | \"className\"\n | \"motif\"\n | \"cart\"\n | \"account\"\n | \"translations\"\n | \"onModalOpen\"\n | \"onCartClick\"\n | \"showLineLoader\"\n | \"accountMenu\"\n> & {\n /**\n * Header customizations for embed context like WebView\n */\n embedConfig?: HeaderEmbedConfig;\n\n // Country picker\n currentCountryName?: string;\n handleStorePickerClick?: () => void;\n\n // Early access button\n earlyAccess?: ProHeaderEarlyAccess;\n\n // Purchase History button\n handlePurchaseHistoryClick?: () => void;\n\n // Order button\n handleOrderHistoryClick?: () => void;\n\n // Product line picker\n productLineOptions?: HeaderProductLineOption[];\n productLineValue?: ProductLine;\n handleProductLineChange?: (type: ProductLine) => void;\n\n // Mobile menu aka \"hamburger\" button click\n handleMobileMenuClick?: () => void;\n\n onLanguageChange?: (\n e: React.MouseEvent<HTMLElement>,\n link: string,\n language: Language,\n ) => void;\n\n // Search\n searchValue?: string;\n onSearch?: (searchTerm: string) => void;\n\n onSearchFocus?: () => void;\n onSearchBlur?: () => void;\n onSearchClick?: () => void;\n\n // Categories used for mobile menu\n categories: ProHeaderCategories;\n useInlineCategories?: boolean;\n};\n"],"names":["defaultHeaderTranslations","new","support","purchasedProductHistory","orderHistory","earlyAccess","store","links","company","social","tools","training","continueShopping","search","placeholder","noMatchesFound","seeAllResults","searchUniFiProducts","searchUISPProducts","searchAmpliFiProducts","account","login","signUp","signOut","uiAccount","unifiSiteManager","manageAccount","cart","VATincluded","includesVat","discount","empty","review","shipping","subtotal","total","itemsTitle","upsellTitle","language","region"],"mappings":";;;AAiBO,MAAMA,yBAA4B,GAAA;EACvCC,GAAK,EAAA,KAAA;EACLC,OAAS,EAAA,SAAA;EACTC,uBAAyB,EAAA,2BAAA;EACzBC,YAAc,EAAA,eAAA;EACdC,WAAa,EAAA,cAAA;EACbC,KAAO,EAAA,OAAA;EACPC,KAAO,EAAA,OAAA;EACPC,OAAS,EAAA,SAAA;EACTC,MAAQ,EAAA,QAAA;EACRC,KAAO,EAAA,OAAA;EACPC,QAAU,EAAA,UAAA;EACVC,gBAAkB,EAAA,mBAAA;EAClBC,MAAQ,EAAA;IACNC,WAAa,EAAA,WAAA;IACbC,cAAgB,EAAA,sCAAA;IAChBC,aAAe,EAAA,iBAAA;IACfC,mBAAqB,EAAA,uBAAA;IACrBC,kBAAoB,EAAA,sBAAA;IACpBC,qBAAuB,EAAA;EACzB,CAAA;EACAC,OAAS,EAAA;IACPC,KAAO,EAAA,QAAA;IACPC,MAAQ,EAAA,SAAA;IACRC,OAAS,EAAA,UAAA;IACTC,SAAW,EAAA,YAAA;IACXC,gBAAkB,EAAA,oBAAA;IAClBC,aAAe,EAAA,gBAAA;IACftB,YAAc,EAAA;EAChB,CAAA;EACAuB,IAAM,EAAA;IACJC,WAAa,EAAA,WAAA;IACbC,WAAa,EAAA,iBAAA;IACbC,QAAU,EAAA,UAAA;IACVC,KAAO,EAAA,oBAAA;IACPC,MAAQ,EAAA,UAAA;IACRC,QAAU,EAAA,UAAA;IACVC,QAAU,EAAA,UAAA;IACVC,KAAO,EAAA,cAAA;IACPC,UAAY,EAAA,WAAA;IACZC,WAAa,EAAA;EACf,CAAA;EACAC,UAAU,CAAC,CAAA;EACXC,MAAQ,EAAA;AACV,CAAA;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Header.types.mjs","sources":["../../../src/components/Header/Header.types.tsx"],"sourcesContent":["import type { Motif } from \"@ubnt/ui-components/utils\";\n\nimport type { Language } from \"../../contexts/MenuContext/mapping\";\nimport type {\n ModalId,\n ParsedNavigationItem,\n ParsedNavigationSubItem,\n ParsedNavigationSubSubItem,\n} from \"../../contexts/MenuContext/types\";\nimport type { Nullish, ProductLine } from \"../../types\";\nimport type {\n CustomImageAsset,\n RenderImageFn,\n} from \"../CustomImage/CustomImage.types\";\nimport type { NavigationMicrositeMenuProps } from \"./Navigation/MicrositeMenu/MicrositeMenu.types\";\nimport type { ProMobileMenuSectionItem } from \"./Navigation/ProMobileMenu/ProMobileMenu.types\";\n\nexport const defaultHeaderTranslations = {\n new: \"New\",\n support: \"Support\",\n purchasedProductHistory: \"Purchased Product History\",\n orderHistory: \"Order History\",\n earlyAccess: \"Early Access\",\n store: \"Store\",\n links: \"Links\",\n company: \"Company\",\n social: \"Social\",\n tools: \"Tools\",\n training: \"Training\",\n continueShopping: \"Continue Shopping\",\n search: {\n placeholder: \"Search...\",\n noMatchesFound: \"Sorry, we couldn't find any matches.\",\n seeAllResults: \"See all results\",\n searchUniFiProducts: \"Search UniFi products\",\n searchUISPProducts: \"Search UISP products\",\n searchAmpliFiProducts: \"Search AmpliFi products\",\n },\n account: {\n login: \"Log In\",\n signUp: \"Sign Up\",\n signOut: \"Sign Out\",\n uiAccount: \"UI Account\",\n unifiSiteManager: \"UniFi Site Manager\",\n manageAccount: \"Manage Account\",\n orderHistory: \"Orders & Addresses\",\n },\n cart: {\n VATincluded: \"VAT Incl.\",\n includesVat: \"Includes VAT of\",\n discount: \"Discount\",\n empty: \"Your cart is empty\",\n review: \"Checkout\",\n shipping: \"Shipping\",\n subtotal: \"Subtotal\",\n total: \"Total price:\",\n itemsTitle: \"Your Cart\",\n upsellTitle: \"Usually bought together\",\n },\n language: {},\n};\n\nexport interface HeaderAccountCustomer {\n id: string;\n email: string;\n displayName: string;\n picture?: string | null;\n}\n\nexport interface HeaderAccount {\n loading?: boolean;\n customer?: Nullish<HeaderAccountCustomer>;\n handleLogin?: () => void;\n handleLogout?: () => void;\n handleRegister?: () => void;\n handleManageAccount?: () => void;\n handleOrderHistory?: () => void;\n renderStorePicker?: (onClose: () => void) => JSX.Element;\n}\n\nexport interface HeaderSearch {\n /** Trigger search */\n onSearch: (formattedQuerySearchTerm: string) => void;\n loading?: boolean;\n totalItemsCount: number;\n items: Array<{\n id: string;\n url: string;\n image?: CustomImageAsset | null;\n title: string;\n family?: string | null;\n }>;\n}\n\nexport interface HeaderCartItemControls {\n loading?: boolean;\n quantityMax?: number;\n onQuantityChange: (newQuantity: number) => void;\n}\n\nexport interface HeaderCartItem {\n id: string;\n url: string;\n image: Nullish<CustomImageAsset>;\n quantity: number;\n title: string;\n controls: HeaderCartItemControls;\n price: string;\n priceIncludingVAT?: string;\n}\n\nexport interface HeaderCart {\n onReview: () => void;\n loading?: boolean;\n items: HeaderCartItem[];\n upsellItems?: HeaderCartItem[];\n totals: Nullish<{\n shipping: Nullish<string>;\n discount: Nullish<string>;\n finalTax: Nullish<string>;\n total: string;\n totalIncludingVAT?: string;\n }>;\n}\n\nexport type HeaderTranslations = typeof defaultHeaderTranslations;\n\nexport type HeaderEmbedConfig = {\n /**\n * Allows to configure custom callback on home link click\n */\n homeLinkClickHandler?: () => void;\n\n /**\n * Allows to render custom extra section items in Pro Mobile Menu\n */\n mobileMenuExtraSectionItems?: Array<ProMobileMenuSectionItem>;\n\n /**\n * Moves Avatar icon to the left side of the header\n */\n moveAvatarIconToLeft?: boolean;\n\n /**\n * Allows to display avatar as image instead of icon\n */\n displayAvatarAsImage?: boolean;\n\n /**\n * Allows to configure custom callback on avatar click\n */\n avatarClickHandler?: () => void;\n\n /**\n * Allows to hide logo / site title\n */\n hideLogo?: boolean;\n\n /**\n * Allows to hide Avatar icon from the header\n */\n hideAvatarIcon?: boolean;\n\n /**\n * Hide language picker\n */\n hideLanguagePicker?: boolean;\n\n fullWidthHeader?: boolean;\n\n /**\n * Renders site title instead of UI logo\n */\n siteTitle?: string;\n\n /**\n * Blurs search input and dismissed virtual keyboard on touchmove\n */\n /** @deprecated Use blurSearchOnTouchmove */\n hideSearchOnTouchmove?: boolean;\n blurSearchOnTouchmove?: boolean;\n};\n\nexport interface HeaderProps {\n className?: string;\n motif: Motif;\n /**\n * Main header bar becomes fixed position at the top\n */\n sticky?: boolean;\n /**\n * Navigation carousel becomes fixed position at the top\n */\n stickyCarousel?: boolean;\n translations?: HeaderTranslations;\n renderImage: RenderImageFn;\n showLineLoader?: boolean;\n onModalOpen?: () => void;\n onMenuItemLinkClick?: (\n e: React.MouseEvent<HTMLElement>,\n item: ParsedNavigationItem,\n ) => void;\n onMenuSubItemLinkClick?: (\n e: React.MouseEvent<HTMLElement>,\n item: ParsedNavigationSubItem | ParsedNavigationSubSubItem,\n ) => void;\n\n onLanguageChange?: (\n e: React.MouseEvent<HTMLElement>,\n link: string,\n language: Language,\n ) => void;\n\n // Account\n account?: HeaderAccount;\n\n // Search\n onSearchResultsAction?: (searchTerm: string) => void;\n search?: HeaderSearch;\n\n // Cart\n onCartClick?: () => void;\n cart?: HeaderCart;\n\n // Set specific modal to be open initially\n initialActiveModal?: Nullish<ModalId>;\n /**\n * Triggers on active modal change\n */\n onActiveModal?: (id: ModalId | null, prevModalId: ModalId | null) => void;\n\n /**\n * Will be called before navigating to store search, the tracking request in this callback will only\n * finish if called from store side as microsites are not using next router.\n */\n trackStoreSearchClick?: () => void;\n\n transparentHeader?: boolean;\n\n /**\n * Sub-menu used for microsites\n */\n micrositeMenu?: NavigationMicrositeMenuProps;\n\n /**\n * Header customizations for embed context like WebView\n */\n embedConfig?: HeaderEmbedConfig;\n\n accountMenu?: React.ReactNode;\n}\n\nexport type IsolatedHeaderProps = {\n className?: string;\n motif: Motif;\n translations?: HeaderTranslations;\n handleContinueShopping: () => void;\n showLineLoader?: boolean;\n account?: {\n loading?: HeaderAccount[\"loading\"];\n customer?: {\n picture?: HeaderAccountCustomer[\"picture\"];\n };\n };\n} & Pick<HeaderProps, \"embedConfig\">;\n\nexport interface ProHeaderEarlyAccess {\n loading?: boolean;\n onClick: () => void;\n}\n\nexport type ProHeaderProps = Pick<\n HeaderProps,\n | \"className\"\n | \"motif\"\n | \"cart\"\n | \"account\"\n | \"translations\"\n | \"onModalOpen\"\n | \"onCartClick\"\n | \"showLineLoader\"\n | \"accountMenu\"\n> & {\n /**\n * Header customizations for embed context like WebView\n */\n embedConfig?: HeaderEmbedConfig;\n\n // Country picker\n currentCountryName?: string;\n handleStorePickerClick?: () => void;\n\n // Early access button\n earlyAccess?: ProHeaderEarlyAccess;\n\n // Purchase History button\n handlePurchaseHistoryClick?: () => void;\n\n // Order button\n handleOrderHistoryClick?: () => void;\n\n // Product line picker\n productLineOptions?: { value: ProductLine; label: string }[];\n productLineValue?: ProductLine;\n handleProductLineChange?: (type: ProductLine) => void;\n\n // Mobile menu aka \"hamburger\" button click\n handleMobileMenuClick?: () => void;\n\n onLanguageChange?: (\n e: React.MouseEvent<HTMLElement>,\n link: string,\n language: Language,\n ) => void;\n\n // Search\n searchValue?: string;\n onSearch?: (searchTerm: string) => void;\n\n onSearchFocus?: () => void;\n onSearchBlur?: () => void;\n onSearchClick?: () => void;\n};\n"],"names":["defaultHeaderTranslations","new","support","purchasedProductHistory","orderHistory","earlyAccess","store","links","company","social","tools","training","continueShopping","search","placeholder","noMatchesFound","seeAllResults","searchUniFiProducts","searchUISPProducts","searchAmpliFiProducts","account","login","signUp","signOut","uiAccount","unifiSiteManager","manageAccount","cart","VATincluded","includesVat","discount","empty","review","shipping","subtotal","total","itemsTitle","upsellTitle","language"],"mappings":";;AAiBO,MAAMA,yBAA4B,GAAA;EACvCC,GAAK,EAAA,KAAA;EACLC,OAAS,EAAA,SAAA;EACTC,uBAAyB,EAAA,2BAAA;EACzBC,YAAc,EAAA,eAAA;EACdC,WAAa,EAAA,cAAA;EACbC,KAAO,EAAA,OAAA;EACPC,KAAO,EAAA,OAAA;EACPC,OAAS,EAAA,SAAA;EACTC,MAAQ,EAAA,QAAA;EACRC,KAAO,EAAA,OAAA;EACPC,QAAU,EAAA,UAAA;EACVC,gBAAkB,EAAA,mBAAA;EAClBC,MAAQ,EAAA;IACNC,WAAa,EAAA,WAAA;IACbC,cAAgB,EAAA,sCAAA;IAChBC,aAAe,EAAA,iBAAA;IACfC,mBAAqB,EAAA,uBAAA;IACrBC,kBAAoB,EAAA,sBAAA;IACpBC,qBAAuB,EAAA;EACzB,CAAA;EACAC,OAAS,EAAA;IACPC,KAAO,EAAA,QAAA;IACPC,MAAQ,EAAA,SAAA;IACRC,OAAS,EAAA,UAAA;IACTC,SAAW,EAAA,YAAA;IACXC,gBAAkB,EAAA,oBAAA;IAClBC,aAAe,EAAA,gBAAA;IACftB,YAAc,EAAA;EAChB,CAAA;EACAuB,IAAM,EAAA;IACJC,WAAa,EAAA,WAAA;IACbC,WAAa,EAAA,iBAAA;IACbC,QAAU,EAAA,UAAA;IACVC,KAAO,EAAA,oBAAA;IACPC,MAAQ,EAAA,UAAA;IACRC,QAAU,EAAA,UAAA;IACVC,QAAU,EAAA,UAAA;IACVC,KAAO,EAAA,cAAA;IACPC,UAAY,EAAA,WAAA;IACZC,WAAa,EAAA;EACf,CAAA;EACAC,UAAU,CAAC;AACb,CAAA;"}
|
|
1
|
+
{"version":3,"file":"Header.types.mjs","sources":["../../../src/components/Header/Header.types.tsx"],"sourcesContent":["import type { Motif } from \"@ubnt/ui-components/utils\";\n\nimport type { Language } from \"../../contexts/MenuContext/mapping\";\nimport type {\n ModalId,\n ParsedNavigationItem,\n ParsedNavigationSubItem,\n ParsedNavigationSubSubItem,\n} from \"../../contexts/MenuContext/types\";\nimport type { Nullish, ProductLine } from \"../../types\";\nimport type {\n CustomImageAsset,\n RenderImageFn,\n} from \"../CustomImage/CustomImage.types\";\nimport type { NavigationMicrositeMenuProps } from \"./Navigation/MicrositeMenu/MicrositeMenu.types\";\nimport type { ProMobileMenuSectionItem } from \"./Navigation/ProMobileMenu/ProMobileMenu.types\";\n\nexport const defaultHeaderTranslations = {\n new: \"New\",\n support: \"Support\",\n purchasedProductHistory: \"Purchased Product History\",\n orderHistory: \"Order History\",\n earlyAccess: \"Early Access\",\n store: \"Store\",\n links: \"Links\",\n company: \"Company\",\n social: \"Social\",\n tools: \"Tools\",\n training: \"Training\",\n continueShopping: \"Continue Shopping\",\n search: {\n placeholder: \"Search...\",\n noMatchesFound: \"Sorry, we couldn't find any matches.\",\n seeAllResults: \"See all results\",\n searchUniFiProducts: \"Search UniFi products\",\n searchUISPProducts: \"Search UISP products\",\n searchAmpliFiProducts: \"Search AmpliFi products\",\n },\n account: {\n login: \"Log In\",\n signUp: \"Sign Up\",\n signOut: \"Sign Out\",\n uiAccount: \"UI Account\",\n unifiSiteManager: \"UniFi Site Manager\",\n manageAccount: \"Manage Account\",\n orderHistory: \"Orders & Addresses\",\n },\n cart: {\n VATincluded: \"VAT Incl.\",\n includesVat: \"Includes VAT of\",\n discount: \"Discount\",\n empty: \"Your cart is empty\",\n review: \"Checkout\",\n shipping: \"Shipping\",\n subtotal: \"Subtotal\",\n total: \"Total price:\",\n itemsTitle: \"Your Cart\",\n upsellTitle: \"Usually bought together\",\n },\n language: {},\n region: \"Region\",\n};\n\nexport interface HeaderAccountCustomer {\n id: string;\n email: string;\n displayName: string;\n picture?: string | null;\n}\n\nexport interface HeaderAccount {\n loading?: boolean;\n customer?: Nullish<HeaderAccountCustomer>;\n handleLogin?: () => void;\n handleLogout?: () => void;\n handleRegister?: () => void;\n handleManageAccount?: () => void;\n handleOrderHistory?: () => void;\n renderStorePicker?: (onClose: () => void) => JSX.Element;\n}\n\nexport interface HeaderSearch {\n /** Trigger search */\n onSearch: (formattedQuerySearchTerm: string) => void;\n loading?: boolean;\n totalItemsCount: number;\n items: Array<{\n id: string;\n url: string;\n image?: CustomImageAsset | null;\n title: string;\n family?: string | null;\n }>;\n}\n\nexport interface HeaderCartItemControls {\n loading?: boolean;\n quantityMax?: number;\n onQuantityChange: (newQuantity: number) => void;\n}\n\nexport interface HeaderCartItem {\n id: string;\n url: string;\n image: Nullish<CustomImageAsset>;\n quantity: number;\n title: string;\n controls: HeaderCartItemControls;\n price: string;\n priceIncludingVAT?: string;\n}\n\nexport interface HeaderCart {\n onReview: () => void;\n loading?: boolean;\n items: HeaderCartItem[];\n upsellItems?: HeaderCartItem[];\n totals: Nullish<{\n shipping: Nullish<string>;\n discount: Nullish<string>;\n finalTax: Nullish<string>;\n total: string;\n totalIncludingVAT?: string;\n }>;\n}\n\nexport type HeaderTranslations = typeof defaultHeaderTranslations;\n\nexport type HeaderEmbedConfig = {\n /**\n * Allows to configure custom callback on home link click\n */\n homeLinkClickHandler?: () => void;\n\n /**\n * Allows to render custom extra section items in Pro Mobile Menu\n */\n mobileMenuExtraSectionItems?: Array<ProMobileMenuSectionItem>;\n\n /**\n * Moves Avatar icon to the left side of the header\n */\n moveAvatarIconToLeft?: boolean;\n\n /**\n * Allows to display avatar as image instead of icon\n */\n displayAvatarAsImage?: boolean;\n\n /**\n * Allows to configure custom callback on avatar click\n */\n avatarClickHandler?: () => void;\n\n /**\n * Allows to hide logo / site title\n */\n hideLogo?: boolean;\n\n /**\n * Allows to hide Avatar icon from the header\n */\n hideAvatarIcon?: boolean;\n\n /**\n * Hide language picker\n */\n hideLanguagePicker?: boolean;\n\n fullWidthHeader?: boolean;\n\n /**\n * Renders site title instead of UI logo\n */\n siteTitle?: string;\n\n /**\n * Blurs search input and dismissed virtual keyboard on touchmove\n */\n /** @deprecated Use blurSearchOnTouchmove */\n hideSearchOnTouchmove?: boolean;\n blurSearchOnTouchmove?: boolean;\n};\n\nexport interface HeaderProps {\n className?: string;\n motif: Motif;\n /**\n * Main header bar becomes fixed position at the top\n */\n sticky?: boolean;\n /**\n * Navigation carousel becomes fixed position at the top\n */\n stickyCarousel?: boolean;\n translations?: HeaderTranslations;\n renderImage: RenderImageFn;\n showLineLoader?: boolean;\n onModalOpen?: () => void;\n onMenuItemLinkClick?: (\n e: React.MouseEvent<HTMLElement>,\n item: ParsedNavigationItem,\n ) => void;\n onMenuSubItemLinkClick?: (\n e: React.MouseEvent<HTMLElement>,\n item: ParsedNavigationSubItem | ParsedNavigationSubSubItem,\n ) => void;\n\n onLanguageChange?: (\n e: React.MouseEvent<HTMLElement>,\n link: string,\n language: Language,\n ) => void;\n\n // Account\n account?: HeaderAccount;\n\n // Search\n onSearchResultsAction?: (searchTerm: string) => void;\n search?: HeaderSearch;\n\n // Cart\n onCartClick?: () => void;\n cart?: HeaderCart;\n\n // Set specific modal to be open initially\n initialActiveModal?: Nullish<ModalId>;\n /**\n * Triggers on active modal change\n */\n onActiveModal?: (id: ModalId | null, prevModalId: ModalId | null) => void;\n\n /**\n * Will be called before navigating to store search, the tracking request in this callback will only\n * finish if called from store side as microsites are not using next router.\n */\n trackStoreSearchClick?: () => void;\n\n transparentHeader?: boolean;\n\n /**\n * Sub-menu used for microsites\n */\n micrositeMenu?: NavigationMicrositeMenuProps;\n\n /**\n * Header customizations for embed context like WebView\n */\n embedConfig?: HeaderEmbedConfig;\n\n accountMenu?: React.ReactNode;\n}\n\nexport type IsolatedHeaderProps = {\n className?: string;\n motif: Motif;\n translations?: HeaderTranslations;\n handleContinueShopping: () => void;\n showLineLoader?: boolean;\n account?: {\n loading?: HeaderAccount[\"loading\"];\n customer?: {\n picture?: HeaderAccountCustomer[\"picture\"];\n };\n };\n} & Pick<HeaderProps, \"embedConfig\">;\n\nexport interface ProHeaderEarlyAccess {\n loading?: boolean;\n onClick: () => void;\n}\n\nexport interface HeaderProductLineOption {\n value: ProductLine;\n label: string;\n}\n\nexport interface ProHeaderCategories {\n items: ProMobileMenuSectionItem[];\n activeIndex: number;\n}\n\nexport type ProHeaderProps = Pick<\n HeaderProps,\n | \"className\"\n | \"motif\"\n | \"cart\"\n | \"account\"\n | \"translations\"\n | \"onModalOpen\"\n | \"onCartClick\"\n | \"showLineLoader\"\n | \"accountMenu\"\n> & {\n /**\n * Header customizations for embed context like WebView\n */\n embedConfig?: HeaderEmbedConfig;\n\n // Country picker\n currentCountryName?: string;\n handleStorePickerClick?: () => void;\n\n // Early access button\n earlyAccess?: ProHeaderEarlyAccess;\n\n // Purchase History button\n handlePurchaseHistoryClick?: () => void;\n\n // Order button\n handleOrderHistoryClick?: () => void;\n\n // Product line picker\n productLineOptions?: HeaderProductLineOption[];\n productLineValue?: ProductLine;\n handleProductLineChange?: (type: ProductLine) => void;\n\n // Mobile menu aka \"hamburger\" button click\n handleMobileMenuClick?: () => void;\n\n onLanguageChange?: (\n e: React.MouseEvent<HTMLElement>,\n link: string,\n language: Language,\n ) => void;\n\n // Search\n searchValue?: string;\n onSearch?: (searchTerm: string) => void;\n\n onSearchFocus?: () => void;\n onSearchBlur?: () => void;\n onSearchClick?: () => void;\n\n // Categories used for mobile menu\n categories: ProHeaderCategories;\n useInlineCategories?: boolean;\n};\n"],"names":["defaultHeaderTranslations","new","support","purchasedProductHistory","orderHistory","earlyAccess","store","links","company","social","tools","training","continueShopping","search","placeholder","noMatchesFound","seeAllResults","searchUniFiProducts","searchUISPProducts","searchAmpliFiProducts","account","login","signUp","signOut","uiAccount","unifiSiteManager","manageAccount","cart","VATincluded","includesVat","discount","empty","review","shipping","subtotal","total","itemsTitle","upsellTitle","language","region"],"mappings":";;AAiBO,MAAMA,yBAA4B,GAAA;EACvCC,GAAK,EAAA,KAAA;EACLC,OAAS,EAAA,SAAA;EACTC,uBAAyB,EAAA,2BAAA;EACzBC,YAAc,EAAA,eAAA;EACdC,WAAa,EAAA,cAAA;EACbC,KAAO,EAAA,OAAA;EACPC,KAAO,EAAA,OAAA;EACPC,OAAS,EAAA,SAAA;EACTC,MAAQ,EAAA,QAAA;EACRC,KAAO,EAAA,OAAA;EACPC,QAAU,EAAA,UAAA;EACVC,gBAAkB,EAAA,mBAAA;EAClBC,MAAQ,EAAA;IACNC,WAAa,EAAA,WAAA;IACbC,cAAgB,EAAA,sCAAA;IAChBC,aAAe,EAAA,iBAAA;IACfC,mBAAqB,EAAA,uBAAA;IACrBC,kBAAoB,EAAA,sBAAA;IACpBC,qBAAuB,EAAA;EACzB,CAAA;EACAC,OAAS,EAAA;IACPC,KAAO,EAAA,QAAA;IACPC,MAAQ,EAAA,SAAA;IACRC,OAAS,EAAA,UAAA;IACTC,SAAW,EAAA,YAAA;IACXC,gBAAkB,EAAA,oBAAA;IAClBC,aAAe,EAAA,gBAAA;IACftB,YAAc,EAAA;EAChB,CAAA;EACAuB,IAAM,EAAA;IACJC,WAAa,EAAA,WAAA;IACbC,WAAa,EAAA,iBAAA;IACbC,QAAU,EAAA,UAAA;IACVC,KAAO,EAAA,oBAAA;IACPC,MAAQ,EAAA,UAAA;IACRC,QAAU,EAAA,UAAA;IACVC,QAAU,EAAA,UAAA;IACVC,KAAO,EAAA,cAAA;IACPC,UAAY,EAAA,WAAA;IACZC,WAAa,EAAA;EACf,CAAA;EACAC,UAAU,CAAC,CAAA;EACXC,MAAQ,EAAA;AACV,CAAA;"}
|
|
@@ -9,7 +9,7 @@ export declare const MenuButtonLink: import("styled-components").StyledComponent
|
|
|
9
9
|
secondary?: boolean;
|
|
10
10
|
}, never>;
|
|
11
11
|
export declare const TextWrap: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
12
|
-
export declare const Text: import("styled-components").StyledComponent<"
|
|
12
|
+
export declare const Text: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
13
13
|
export declare const Arrow: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {
|
|
14
14
|
motif: Motif;
|
|
15
15
|
}, never>;
|
|
@@ -108,13 +108,13 @@ const TextWrap = styled__default["default"].div`
|
|
|
108
108
|
position: relative;
|
|
109
109
|
height: 100%;
|
|
110
110
|
`;
|
|
111
|
-
const Text = styled__default["default"].
|
|
111
|
+
const Text = styled__default["default"].div`
|
|
112
112
|
white-space: nowrap;
|
|
113
113
|
text-overflow: ellipsis;
|
|
114
114
|
overflow: hidden;
|
|
115
115
|
transition: color 0.2s linear;
|
|
116
|
-
font-size:
|
|
117
|
-
line-height: ${
|
|
116
|
+
font-size: 14px;
|
|
117
|
+
line-height: ${20 / 14};
|
|
118
118
|
`;
|
|
119
119
|
const Arrow = styled__default["default"].div`
|
|
120
120
|
border: 3px solid transparent;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MenuItem.styles.js","sources":["../../../../src/components/Header/MenuItem/MenuItem.styles.tsx"],"sourcesContent":["import type { Motif } from \"@ubnt/ui-components/utils\";\nimport styled, { css } from \"styled-components\";\n\nimport { BREAKPOINTS } from \"../../../constants/layout\";\nimport { theme } from \"../../../constants/theme\";\nimport { Button as ButtonBase } from \"../../Button\";\n\n// #############################################################################\n// Shared\n// #############################################################################\ntype VisibilityProps = { hideOnMobile?: boolean; hideOnDesktop?: boolean };\n\nconst visbility = css<{ hideOnMobile?: boolean; hideOnDesktop?: boolean }>`\n ${({ hideOnMobile }) =>\n hideOnMobile &&\n css`\n @media ${BREAKPOINTS.TOP_NAV_MOBILE_AND_DOWN} {\n display: none;\n }\n `}\n\n ${({ hideOnDesktop }) =>\n hideOnDesktop &&\n css`\n @media ${BREAKPOINTS.TOP_NAV_MOBILE_UP} {\n display: none;\n }\n `}\n`;\n\n// #############################################################################\n// MenuButton\n// #############################################################################\nexport const MenuButtonWrap = styled.div<VisibilityProps>`\n display: flex;\n align-items: center;\n\n ${visbility}\n`;\n\nexport const MenuButtonLink = styled.a<{ motif: Motif; secondary?: boolean }>`\n display: flex;\n flex-direction: row;\n align-items: center;\n gap: 8px;\n padding: 8px 12px;\n border-radius: 4px;\n font-size: 13px;\n line-height: 1;\n letter-spacing: -0.02em;\n\n transition: background-color 0.3s ease 0s;\n\n ${({ motif }) => {\n switch (motif) {\n case \"dark\":\n return css`\n color: ${theme.colors.white};\n background-color: #005ed9;\n\n &:focus,\n &:hover {\n color: ${theme.colors.white};\n background-color: #004cad;\n }\n `;\n case \"light\":\n default:\n return css`\n color: ${theme.colors.white};\n background-color: ${theme.colors.primaryBlue};\n\n &:focus,\n &:hover {\n color: ${theme.colors.white};\n background-color: ${theme.colors.dodgerblue};\n }\n `;\n }\n }}\n\n ${({ secondary, motif }) =>\n secondary &&\n css`\n border: 1px solid #595959;\n background-color: transparent;\n\n ${motif === \"light\" &&\n css`\n color: ${theme.colors.menu.text.light};\n\n &:focus,\n &:hover {\n color: ${theme.colors.primaryBlue};\n }\n `}\n\n &:focus,\n &:hover {\n background-color: transparent;\n border-color: ${theme.colors.primaryBlue};\n }\n `}\n`;\n\n// #############################################################################\n// MenuItem\n// #############################################################################\n\nexport const TextWrap = styled.div`\n display: flex;\n align-items: center;\n justify-content: center;\n position: relative;\n height: 100%;\n`;\n\nexport const Text = styled.
|
|
1
|
+
{"version":3,"file":"MenuItem.styles.js","sources":["../../../../src/components/Header/MenuItem/MenuItem.styles.tsx"],"sourcesContent":["import type { Motif } from \"@ubnt/ui-components/utils\";\nimport styled, { css } from \"styled-components\";\n\nimport { BREAKPOINTS } from \"../../../constants/layout\";\nimport { theme } from \"../../../constants/theme\";\nimport { Button as ButtonBase } from \"../../Button\";\n\n// #############################################################################\n// Shared\n// #############################################################################\ntype VisibilityProps = { hideOnMobile?: boolean; hideOnDesktop?: boolean };\n\nconst visbility = css<{ hideOnMobile?: boolean; hideOnDesktop?: boolean }>`\n ${({ hideOnMobile }) =>\n hideOnMobile &&\n css`\n @media ${BREAKPOINTS.TOP_NAV_MOBILE_AND_DOWN} {\n display: none;\n }\n `}\n\n ${({ hideOnDesktop }) =>\n hideOnDesktop &&\n css`\n @media ${BREAKPOINTS.TOP_NAV_MOBILE_UP} {\n display: none;\n }\n `}\n`;\n\n// #############################################################################\n// MenuButton\n// #############################################################################\nexport const MenuButtonWrap = styled.div<VisibilityProps>`\n display: flex;\n align-items: center;\n\n ${visbility}\n`;\n\nexport const MenuButtonLink = styled.a<{ motif: Motif; secondary?: boolean }>`\n display: flex;\n flex-direction: row;\n align-items: center;\n gap: 8px;\n padding: 8px 12px;\n border-radius: 4px;\n font-size: 13px;\n line-height: 1;\n letter-spacing: -0.02em;\n\n transition: background-color 0.3s ease 0s;\n\n ${({ motif }) => {\n switch (motif) {\n case \"dark\":\n return css`\n color: ${theme.colors.white};\n background-color: #005ed9;\n\n &:focus,\n &:hover {\n color: ${theme.colors.white};\n background-color: #004cad;\n }\n `;\n case \"light\":\n default:\n return css`\n color: ${theme.colors.white};\n background-color: ${theme.colors.primaryBlue};\n\n &:focus,\n &:hover {\n color: ${theme.colors.white};\n background-color: ${theme.colors.dodgerblue};\n }\n `;\n }\n }}\n\n ${({ secondary, motif }) =>\n secondary &&\n css`\n border: 1px solid #595959;\n background-color: transparent;\n\n ${motif === \"light\" &&\n css`\n color: ${theme.colors.menu.text.light};\n\n &:focus,\n &:hover {\n color: ${theme.colors.primaryBlue};\n }\n `}\n\n &:focus,\n &:hover {\n background-color: transparent;\n border-color: ${theme.colors.primaryBlue};\n }\n `}\n`;\n\n// #############################################################################\n// MenuItem\n// #############################################################################\n\nexport const TextWrap = styled.div`\n display: flex;\n align-items: center;\n justify-content: center;\n position: relative;\n height: 100%;\n`;\n\nexport const Text = styled.div`\n white-space: nowrap;\n text-overflow: ellipsis;\n overflow: hidden;\n transition: color 0.2s linear;\n font-size: 14px;\n line-height: ${20 / 14};\n`;\n\nexport const Arrow = styled.div<{\n motif: Motif;\n}>`\n border: 3px solid transparent;\n border-bottom: none;\n border-top: 5px solid currentcolor;\n transition: color 0.2s linear;\n`;\n\nexport const ArrowIconWrap = styled.div<{ $flip?: boolean }>`\n position: absolute;\n top: 50%;\n left: 100%;\n transform: translateY(-50%);\n display: flex;\n margin: 1px 0 0 4px;\n\n ${({ $flip }) =>\n $flip &&\n css`\n margin-top: 0;\n\n ${Arrow} {\n transform: rotate(180deg);\n }\n `}\n`;\n\nexport const Button = styled(ButtonBase)<\n {\n motif: Motif;\n $minWidth?: number;\n $active?: boolean;\n $showArrow?: boolean;\n } & VisibilityProps\n>`\n display: flex;\n border: none;\n background: none;\n align-items: center;\n justify-content: center;\n outline: none;\n white-space: nowrap;\n height: 100%;\n cursor: pointer;\n padding: 0;\n color: ${({ motif }) => theme.colors.menu.text[motif]};\n position: relative;\n\n :hover,\n :focus {\n ${Text},\n ${ArrowIconWrap} {\n color: ${({ motif }) => theme.colors.menu.active[motif]};\n }\n }\n\n ${({ $showArrow }) =>\n $showArrow &&\n css`\n margin-right: 5px;\n `}\n\n ${({ $minWidth }) =>\n $minWidth != null &&\n css`\n min-width: ${$minWidth}px;\n `};\n\n ${({ $active, motif }) =>\n $active &&\n css`\n ${Text} {\n color: ${theme.colors.menu.active[motif]};\n }\n\n ${ArrowIconWrap} {\n color: ${theme.colors.menu.active[motif]};\n }\n `}\n\n ${visbility}\n`;\n"],"names":["visbility","css","hideOnMobile","BREAKPOINTS","TOP_NAV_MOBILE_AND_DOWN","hideOnDesktop","TOP_NAV_MOBILE_UP","MenuButtonWrap","styled","div","MenuButtonLink","a","motif","theme","colors","white","primaryBlue","dodgerblue","secondary","menu","text","light","TextWrap","Text","Arrow","ArrowIconWrap","$flip","Button","ButtonBase","active","$showArrow","$minWidth","$active"],"mappings":"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"}
|
|
@@ -100,13 +100,13 @@ const TextWrap = styled.div`
|
|
|
100
100
|
position: relative;
|
|
101
101
|
height: 100%;
|
|
102
102
|
`;
|
|
103
|
-
const Text = styled.
|
|
103
|
+
const Text = styled.div`
|
|
104
104
|
white-space: nowrap;
|
|
105
105
|
text-overflow: ellipsis;
|
|
106
106
|
overflow: hidden;
|
|
107
107
|
transition: color 0.2s linear;
|
|
108
|
-
font-size:
|
|
109
|
-
line-height: ${
|
|
108
|
+
font-size: 14px;
|
|
109
|
+
line-height: ${20 / 14};
|
|
110
110
|
`;
|
|
111
111
|
const Arrow = styled.div`
|
|
112
112
|
border: 3px solid transparent;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MenuItem.styles.mjs","sources":["../../../../src/components/Header/MenuItem/MenuItem.styles.tsx"],"sourcesContent":["import type { Motif } from \"@ubnt/ui-components/utils\";\nimport styled, { css } from \"styled-components\";\n\nimport { BREAKPOINTS } from \"../../../constants/layout\";\nimport { theme } from \"../../../constants/theme\";\nimport { Button as ButtonBase } from \"../../Button\";\n\n// #############################################################################\n// Shared\n// #############################################################################\ntype VisibilityProps = { hideOnMobile?: boolean; hideOnDesktop?: boolean };\n\nconst visbility = css<{ hideOnMobile?: boolean; hideOnDesktop?: boolean }>`\n ${({ hideOnMobile }) =>\n hideOnMobile &&\n css`\n @media ${BREAKPOINTS.TOP_NAV_MOBILE_AND_DOWN} {\n display: none;\n }\n `}\n\n ${({ hideOnDesktop }) =>\n hideOnDesktop &&\n css`\n @media ${BREAKPOINTS.TOP_NAV_MOBILE_UP} {\n display: none;\n }\n `}\n`;\n\n// #############################################################################\n// MenuButton\n// #############################################################################\nexport const MenuButtonWrap = styled.div<VisibilityProps>`\n display: flex;\n align-items: center;\n\n ${visbility}\n`;\n\nexport const MenuButtonLink = styled.a<{ motif: Motif; secondary?: boolean }>`\n display: flex;\n flex-direction: row;\n align-items: center;\n gap: 8px;\n padding: 8px 12px;\n border-radius: 4px;\n font-size: 13px;\n line-height: 1;\n letter-spacing: -0.02em;\n\n transition: background-color 0.3s ease 0s;\n\n ${({ motif }) => {\n switch (motif) {\n case \"dark\":\n return css`\n color: ${theme.colors.white};\n background-color: #005ed9;\n\n &:focus,\n &:hover {\n color: ${theme.colors.white};\n background-color: #004cad;\n }\n `;\n case \"light\":\n default:\n return css`\n color: ${theme.colors.white};\n background-color: ${theme.colors.primaryBlue};\n\n &:focus,\n &:hover {\n color: ${theme.colors.white};\n background-color: ${theme.colors.dodgerblue};\n }\n `;\n }\n }}\n\n ${({ secondary, motif }) =>\n secondary &&\n css`\n border: 1px solid #595959;\n background-color: transparent;\n\n ${motif === \"light\" &&\n css`\n color: ${theme.colors.menu.text.light};\n\n &:focus,\n &:hover {\n color: ${theme.colors.primaryBlue};\n }\n `}\n\n &:focus,\n &:hover {\n background-color: transparent;\n border-color: ${theme.colors.primaryBlue};\n }\n `}\n`;\n\n// #############################################################################\n// MenuItem\n// #############################################################################\n\nexport const TextWrap = styled.div`\n display: flex;\n align-items: center;\n justify-content: center;\n position: relative;\n height: 100%;\n`;\n\nexport const Text = styled.
|
|
1
|
+
{"version":3,"file":"MenuItem.styles.mjs","sources":["../../../../src/components/Header/MenuItem/MenuItem.styles.tsx"],"sourcesContent":["import type { Motif } from \"@ubnt/ui-components/utils\";\nimport styled, { css } from \"styled-components\";\n\nimport { BREAKPOINTS } from \"../../../constants/layout\";\nimport { theme } from \"../../../constants/theme\";\nimport { Button as ButtonBase } from \"../../Button\";\n\n// #############################################################################\n// Shared\n// #############################################################################\ntype VisibilityProps = { hideOnMobile?: boolean; hideOnDesktop?: boolean };\n\nconst visbility = css<{ hideOnMobile?: boolean; hideOnDesktop?: boolean }>`\n ${({ hideOnMobile }) =>\n hideOnMobile &&\n css`\n @media ${BREAKPOINTS.TOP_NAV_MOBILE_AND_DOWN} {\n display: none;\n }\n `}\n\n ${({ hideOnDesktop }) =>\n hideOnDesktop &&\n css`\n @media ${BREAKPOINTS.TOP_NAV_MOBILE_UP} {\n display: none;\n }\n `}\n`;\n\n// #############################################################################\n// MenuButton\n// #############################################################################\nexport const MenuButtonWrap = styled.div<VisibilityProps>`\n display: flex;\n align-items: center;\n\n ${visbility}\n`;\n\nexport const MenuButtonLink = styled.a<{ motif: Motif; secondary?: boolean }>`\n display: flex;\n flex-direction: row;\n align-items: center;\n gap: 8px;\n padding: 8px 12px;\n border-radius: 4px;\n font-size: 13px;\n line-height: 1;\n letter-spacing: -0.02em;\n\n transition: background-color 0.3s ease 0s;\n\n ${({ motif }) => {\n switch (motif) {\n case \"dark\":\n return css`\n color: ${theme.colors.white};\n background-color: #005ed9;\n\n &:focus,\n &:hover {\n color: ${theme.colors.white};\n background-color: #004cad;\n }\n `;\n case \"light\":\n default:\n return css`\n color: ${theme.colors.white};\n background-color: ${theme.colors.primaryBlue};\n\n &:focus,\n &:hover {\n color: ${theme.colors.white};\n background-color: ${theme.colors.dodgerblue};\n }\n `;\n }\n }}\n\n ${({ secondary, motif }) =>\n secondary &&\n css`\n border: 1px solid #595959;\n background-color: transparent;\n\n ${motif === \"light\" &&\n css`\n color: ${theme.colors.menu.text.light};\n\n &:focus,\n &:hover {\n color: ${theme.colors.primaryBlue};\n }\n `}\n\n &:focus,\n &:hover {\n background-color: transparent;\n border-color: ${theme.colors.primaryBlue};\n }\n `}\n`;\n\n// #############################################################################\n// MenuItem\n// #############################################################################\n\nexport const TextWrap = styled.div`\n display: flex;\n align-items: center;\n justify-content: center;\n position: relative;\n height: 100%;\n`;\n\nexport const Text = styled.div`\n white-space: nowrap;\n text-overflow: ellipsis;\n overflow: hidden;\n transition: color 0.2s linear;\n font-size: 14px;\n line-height: ${20 / 14};\n`;\n\nexport const Arrow = styled.div<{\n motif: Motif;\n}>`\n border: 3px solid transparent;\n border-bottom: none;\n border-top: 5px solid currentcolor;\n transition: color 0.2s linear;\n`;\n\nexport const ArrowIconWrap = styled.div<{ $flip?: boolean }>`\n position: absolute;\n top: 50%;\n left: 100%;\n transform: translateY(-50%);\n display: flex;\n margin: 1px 0 0 4px;\n\n ${({ $flip }) =>\n $flip &&\n css`\n margin-top: 0;\n\n ${Arrow} {\n transform: rotate(180deg);\n }\n `}\n`;\n\nexport const Button = styled(ButtonBase)<\n {\n motif: Motif;\n $minWidth?: number;\n $active?: boolean;\n $showArrow?: boolean;\n } & VisibilityProps\n>`\n display: flex;\n border: none;\n background: none;\n align-items: center;\n justify-content: center;\n outline: none;\n white-space: nowrap;\n height: 100%;\n cursor: pointer;\n padding: 0;\n color: ${({ motif }) => theme.colors.menu.text[motif]};\n position: relative;\n\n :hover,\n :focus {\n ${Text},\n ${ArrowIconWrap} {\n color: ${({ motif }) => theme.colors.menu.active[motif]};\n }\n }\n\n ${({ $showArrow }) =>\n $showArrow &&\n css`\n margin-right: 5px;\n `}\n\n ${({ $minWidth }) =>\n $minWidth != null &&\n css`\n min-width: ${$minWidth}px;\n `};\n\n ${({ $active, motif }) =>\n $active &&\n css`\n ${Text} {\n color: ${theme.colors.menu.active[motif]};\n }\n\n ${ArrowIconWrap} {\n color: ${theme.colors.menu.active[motif]};\n }\n `}\n\n ${visbility}\n`;\n"],"names":["visbility","css","hideOnMobile","BREAKPOINTS","TOP_NAV_MOBILE_AND_DOWN","hideOnDesktop","TOP_NAV_MOBILE_UP","MenuButtonWrap","styled","div","MenuButtonLink","a","motif","theme","colors","white","primaryBlue","dodgerblue","secondary","menu","text","light","TextWrap","Text","Arrow","ArrowIconWrap","$flip","Button","ButtonBase","active","$showArrow","$minWidth","$active"],"mappings":"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"}
|
|
@@ -12,7 +12,7 @@ export declare const Wrap: import("styled-components").StyledComponent<"div", im
|
|
|
12
12
|
slideInView?: boolean;
|
|
13
13
|
noTransition?: boolean;
|
|
14
14
|
}, never>;
|
|
15
|
-
export declare const Container: import("styled-components").StyledComponent<import("react").
|
|
15
|
+
export declare const Container: import("styled-components").StyledComponent<import("react").MemoExoticComponent<import("react").ForwardRefExoticComponent<import("../../../Container/Container.types").ContainerProps & import("react").RefAttributes<HTMLDivElement>>>, import("styled-components").DefaultTheme, {}, never>;
|
|
16
16
|
export declare const PrimaryList: import("styled-components").StyledComponent<"ul", import("styled-components").DefaultTheme, {}, never>;
|
|
17
17
|
export declare const Button: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("../../../Button/Button.types").ButtonProps & {
|
|
18
18
|
children?: import("react").ReactNode;
|
|
@@ -4,7 +4,7 @@ export declare const SECTION_SEARCH_RESULTS_ITEM_HEIGHT = 76;
|
|
|
4
4
|
export declare const SECTION_ITEM_IMAGE_SIZE = 56;
|
|
5
5
|
export declare const SECTION_ITEM_IMAGE_MARGIN = 10;
|
|
6
6
|
export declare const IOS_GHOST_MENU_HEIGHT = 69;
|
|
7
|
-
export declare const Container: import("styled-components").StyledComponent<import("react").
|
|
7
|
+
export declare const Container: import("styled-components").StyledComponent<import("react").MemoExoticComponent<import("react").ForwardRefExoticComponent<import("../../../Container/Container.types").ContainerProps & import("react").RefAttributes<HTMLDivElement>>>, import("styled-components").DefaultTheme, {}, never>;
|
|
8
8
|
export declare const SearchTextDot: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
9
9
|
export declare const Wrap: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {
|
|
10
10
|
motif: Motif;
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
4
|
+
var react = require('react');
|
|
5
|
+
var reactUse = require('react-use');
|
|
6
|
+
require('../../../../contexts/MenuContext/index.js');
|
|
7
|
+
require('../../../../contexts/MenuContext/mapping.js');
|
|
8
|
+
require('../../../../hooks/index.js');
|
|
9
|
+
var useHasTouch = require('../../../../hooks/useHasTouch.js');
|
|
10
|
+
require('../../translations/index.js');
|
|
11
|
+
var ProMenu_styles = require('./ProMenu.styles.js');
|
|
12
|
+
var context = require('../../../../contexts/MenuContext/context.js');
|
|
13
|
+
var useTranslation = require('../../../../hooks/useTranslation.js');
|
|
14
|
+
var en = require('../../translations/en.json.js');
|
|
15
|
+
var constants = require('../../../../types/constants.js');
|
|
16
|
+
"use strict";
|
|
17
|
+
const NavigationProMenu = ({
|
|
18
|
+
show,
|
|
19
|
+
currentCountryName,
|
|
20
|
+
handleStorePickerClick,
|
|
21
|
+
productLineValue,
|
|
22
|
+
productLineOptions,
|
|
23
|
+
onProductLineChange
|
|
24
|
+
}) => {
|
|
25
|
+
const {
|
|
26
|
+
motif
|
|
27
|
+
} = context.useMenu();
|
|
28
|
+
const {
|
|
29
|
+
formatMessage
|
|
30
|
+
} = useTranslation.useTranslation({
|
|
31
|
+
defaultTranslation: en["default"],
|
|
32
|
+
additionalTranslations: {
|
|
33
|
+
[constants.Language.Ja]: () => Promise.resolve().then(function () {
|
|
34
|
+
return require('../../translations/ja.json.js');
|
|
35
|
+
}).then(res => res.default),
|
|
36
|
+
[constants.Language.Ar]: () => Promise.resolve().then(function () {
|
|
37
|
+
return require('../../translations/ar.json.js');
|
|
38
|
+
}).then(res => res.default),
|
|
39
|
+
[constants.Language.De]: () => Promise.resolve().then(function () {
|
|
40
|
+
return require('../../translations/de.json.js');
|
|
41
|
+
}).then(res => res.default),
|
|
42
|
+
[constants.Language.Es]: () => Promise.resolve().then(function () {
|
|
43
|
+
return require('../../translations/es.json.js');
|
|
44
|
+
}).then(res => res.default),
|
|
45
|
+
[constants.Language.El]: () => Promise.resolve().then(function () {
|
|
46
|
+
return require('../../translations/el.json.js');
|
|
47
|
+
}).then(res => res.default),
|
|
48
|
+
[constants.Language.It]: () => Promise.resolve().then(function () {
|
|
49
|
+
return require('../../translations/it.json.js');
|
|
50
|
+
}).then(res => res.default),
|
|
51
|
+
[constants.Language.Pt]: () => Promise.resolve().then(function () {
|
|
52
|
+
return require('../../translations/pt-BR.json.js');
|
|
53
|
+
}).then(res => res.default),
|
|
54
|
+
[constants.Language.Zh]: () => Promise.resolve().then(function () {
|
|
55
|
+
return require('../../translations/zh-Hans.json.js');
|
|
56
|
+
}).then(res => res.default),
|
|
57
|
+
[constants.Language.Fr]: () => Promise.resolve().then(function () {
|
|
58
|
+
return require('../../translations/fr.json.js');
|
|
59
|
+
}).then(res => res.default),
|
|
60
|
+
[constants.Language.Tw]: () => Promise.resolve().then(function () {
|
|
61
|
+
return require('../../translations/zh-Hant-TW.json.js');
|
|
62
|
+
}).then(res => res.default)
|
|
63
|
+
}
|
|
64
|
+
});
|
|
65
|
+
const wrapRef = react.useRef(null);
|
|
66
|
+
const wrapHover = reactUse.useHoverDirty(wrapRef);
|
|
67
|
+
const hasTouch = useHasTouch.useHasTouch();
|
|
68
|
+
const slideInView = react.useMemo(() => {
|
|
69
|
+
const hasHover = !hasTouch && wrapHover;
|
|
70
|
+
return show || hasHover;
|
|
71
|
+
}, [hasTouch, show, wrapHover]);
|
|
72
|
+
return /* @__PURE__ */jsxRuntime.jsx(ProMenu_styles.Wrap, {
|
|
73
|
+
ref: wrapRef,
|
|
74
|
+
motif,
|
|
75
|
+
slideInView,
|
|
76
|
+
children: /* @__PURE__ */jsxRuntime.jsx(ProMenu_styles.MenuWrap, {
|
|
77
|
+
motif,
|
|
78
|
+
children: /* @__PURE__ */jsxRuntime.jsx(ProMenu_styles.MenuWrapInner, {
|
|
79
|
+
children: /* @__PURE__ */jsxRuntime.jsxs(ProMenu_styles.Container, {
|
|
80
|
+
size: "desktop",
|
|
81
|
+
noVerticalMargin: true,
|
|
82
|
+
children: [/* @__PURE__ */jsxRuntime.jsx(ProMenu_styles.ContainerRow, {
|
|
83
|
+
children: productLineOptions.map(option => /* @__PURE__ */jsxRuntime.jsx(ProMenu_styles.LinkButton, {
|
|
84
|
+
motif,
|
|
85
|
+
$active: option.value === productLineValue,
|
|
86
|
+
onClick: () => onProductLineChange?.(option.value),
|
|
87
|
+
children: option.label
|
|
88
|
+
}, option.value))
|
|
89
|
+
}), currentCountryName && /* @__PURE__ */jsxRuntime.jsxs(ProMenu_styles.ContainerRow, {
|
|
90
|
+
children: [currentCountryName, /* @__PURE__ */jsxRuntime.jsx(ProMenu_styles.LinkButton, {
|
|
91
|
+
motif,
|
|
92
|
+
$active: true,
|
|
93
|
+
onClick: handleStorePickerClick,
|
|
94
|
+
children: formatMessage("Change")
|
|
95
|
+
})]
|
|
96
|
+
})]
|
|
97
|
+
})
|
|
98
|
+
})
|
|
99
|
+
})
|
|
100
|
+
});
|
|
101
|
+
};
|
|
102
|
+
exports.NavigationProMenu = NavigationProMenu;
|
|
103
|
+
//# sourceMappingURL=ProMenu.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ProMenu.js","sources":["../../../../../src/components/Header/Navigation/ProMenu/ProMenu.tsx"],"sourcesContent":["import { useMemo, useRef } from \"react\";\nimport { useHoverDirty } from \"react-use\";\n\nimport { useMenu } from \"../../../../contexts/MenuContext\";\nimport { Language } from \"../../../../contexts/MenuContext/mapping\";\nimport { useTranslation } from \"../../../../hooks\";\nimport { useHasTouch } from \"../../../../hooks/useHasTouch\";\nimport { en as EN_TRANSLATION } from \"../../translations\";\nimport * as S from \"./ProMenu.styles\";\nimport type { NavigationProMenuPrivateProps } from \"./ProMenu.types\";\n\nexport const NavigationProMenu = ({\n show,\n currentCountryName,\n handleStorePickerClick,\n productLineValue,\n productLineOptions,\n onProductLineChange,\n}: NavigationProMenuPrivateProps) => {\n const { motif } = useMenu();\n const { formatMessage } = useTranslation({\n defaultTranslation: EN_TRANSLATION,\n additionalTranslations: {\n [Language.Ja]: () =>\n import(\"../../translations/ja.json\").then((res) => res.default),\n [Language.Ar]: () =>\n import(\"../../translations/ar.json\").then((res) => res.default),\n [Language.De]: () =>\n import(\"../../translations/de.json\").then((res) => res.default),\n [Language.Es]: () =>\n import(\"../../translations/es.json\").then((res) => res.default),\n [Language.El]: () =>\n import(\"../../translations/el.json\").then((res) => res.default),\n [Language.It]: () =>\n import(\"../../translations/it.json\").then((res) => res.default),\n [Language.Pt]: () =>\n import(\"../../translations/pt-BR.json\").then((res) => res.default),\n [Language.Zh]: () =>\n import(\"../../translations/zh-Hans.json\").then((res) => res.default),\n [Language.Fr]: () =>\n import(\"../../translations/fr.json\").then((res) => res.default),\n [Language.Tw]: () =>\n import(\"../../translations/zh-Hant-TW.json\").then((res) => res.default),\n },\n });\n\n // #############################################################################\n // Refs\n // #############################################################################\n const wrapRef = useRef<HTMLDivElement>(null);\n\n // #############################################################################\n // Handle show\n // #############################################################################\n const wrapHover = useHoverDirty(wrapRef);\n const hasTouch = useHasTouch();\n\n const slideInView = useMemo((): boolean => {\n // Ignore hover on touch devices\n const hasHover = !hasTouch && wrapHover;\n\n // Show when parent or wrap has hover\n return show || hasHover;\n }, [hasTouch, show, wrapHover]);\n\n // #############################################################################\n // Render\n // #############################################################################\n return (\n <S.Wrap ref={wrapRef} motif={motif} slideInView={slideInView}>\n <S.MenuWrap motif={motif}>\n <S.MenuWrapInner>\n <S.Container size=\"desktop\" noVerticalMargin>\n {/* Product line */}\n <S.ContainerRow>\n {productLineOptions.map((option) => (\n <S.LinkButton\n key={option.value}\n motif={motif}\n $active={option.value === productLineValue}\n onClick={() => onProductLineChange?.(option.value)}\n >\n {option.label}\n </S.LinkButton>\n ))}\n </S.ContainerRow>\n\n {/* Country */}\n {currentCountryName && (\n <S.ContainerRow>\n {currentCountryName}\n <S.LinkButton\n motif={motif}\n $active\n onClick={handleStorePickerClick}\n >\n {formatMessage(\"Change\")}\n </S.LinkButton>\n </S.ContainerRow>\n )}\n </S.Container>\n </S.MenuWrapInner>\n </S.MenuWrap>\n </S.Wrap>\n );\n};\n"],"names":["NavigationProMenu","show","currentCountryName","handleStorePickerClick","productLineValue","productLineOptions","onProductLineChange","motif","useMenu","formatMessage","useTranslation","defaultTranslation","EN_TRANSLATION","additionalTranslations","Language","Ja","Promise","then","res","default","Ar","De","Es","El","It","Pt","Zh","Fr","Tw","wrapRef","useRef","wrapHover","useHoverDirty","hasTouch","useHasTouch","slideInView","useMemo","hasHover","jsx","S.Wrap","ref","children","S.MenuWrap","S.MenuWrapInner","MenuWrapInner","jsxs","S.Container","size","noVerticalMargin","S.ContainerRow","ContainerRow","map","option","S.LinkButton","LinkButton","$active","value","onClick","label"],"mappings":"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"}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
2
|
+
import { useRef, useMemo } from 'react';
|
|
3
|
+
import { useHoverDirty } from 'react-use';
|
|
4
|
+
import '../../../../contexts/MenuContext/index.mjs';
|
|
5
|
+
import '../../../../contexts/MenuContext/mapping.mjs';
|
|
6
|
+
import '../../../../hooks/index.mjs';
|
|
7
|
+
import { useHasTouch } from '../../../../hooks/useHasTouch.mjs';
|
|
8
|
+
import '../../translations/index.mjs';
|
|
9
|
+
import { Wrap, MenuWrap, MenuWrapInner, Container, ContainerRow, LinkButton } from './ProMenu.styles.mjs';
|
|
10
|
+
import { useMenu } from '../../../../contexts/MenuContext/context.mjs';
|
|
11
|
+
import { useTranslation } from '../../../../hooks/useTranslation.mjs';
|
|
12
|
+
import EN_TRANSLATION from '../../translations/en.json.mjs';
|
|
13
|
+
import { Language } from '../../../../types/constants.mjs';
|
|
14
|
+
"use strict";
|
|
15
|
+
const NavigationProMenu = ({
|
|
16
|
+
show,
|
|
17
|
+
currentCountryName,
|
|
18
|
+
handleStorePickerClick,
|
|
19
|
+
productLineValue,
|
|
20
|
+
productLineOptions,
|
|
21
|
+
onProductLineChange
|
|
22
|
+
}) => {
|
|
23
|
+
const {
|
|
24
|
+
motif
|
|
25
|
+
} = useMenu();
|
|
26
|
+
const {
|
|
27
|
+
formatMessage
|
|
28
|
+
} = useTranslation({
|
|
29
|
+
defaultTranslation: EN_TRANSLATION,
|
|
30
|
+
additionalTranslations: {
|
|
31
|
+
[Language.Ja]: () => import('../../translations/ja.json.mjs').then(res => res.default),
|
|
32
|
+
[Language.Ar]: () => import('../../translations/ar.json.mjs').then(res => res.default),
|
|
33
|
+
[Language.De]: () => import('../../translations/de.json.mjs').then(res => res.default),
|
|
34
|
+
[Language.Es]: () => import('../../translations/es.json.mjs').then(res => res.default),
|
|
35
|
+
[Language.El]: () => import('../../translations/el.json.mjs').then(res => res.default),
|
|
36
|
+
[Language.It]: () => import('../../translations/it.json.mjs').then(res => res.default),
|
|
37
|
+
[Language.Pt]: () => import('../../translations/pt-BR.json.mjs').then(res => res.default),
|
|
38
|
+
[Language.Zh]: () => import('../../translations/zh-Hans.json.mjs').then(res => res.default),
|
|
39
|
+
[Language.Fr]: () => import('../../translations/fr.json.mjs').then(res => res.default),
|
|
40
|
+
[Language.Tw]: () => import('../../translations/zh-Hant-TW.json.mjs').then(res => res.default)
|
|
41
|
+
}
|
|
42
|
+
});
|
|
43
|
+
const wrapRef = useRef(null);
|
|
44
|
+
const wrapHover = useHoverDirty(wrapRef);
|
|
45
|
+
const hasTouch = useHasTouch();
|
|
46
|
+
const slideInView = useMemo(() => {
|
|
47
|
+
const hasHover = !hasTouch && wrapHover;
|
|
48
|
+
return show || hasHover;
|
|
49
|
+
}, [hasTouch, show, wrapHover]);
|
|
50
|
+
return /* @__PURE__ */jsx(Wrap, {
|
|
51
|
+
ref: wrapRef,
|
|
52
|
+
motif,
|
|
53
|
+
slideInView,
|
|
54
|
+
children: /* @__PURE__ */jsx(MenuWrap, {
|
|
55
|
+
motif,
|
|
56
|
+
children: /* @__PURE__ */jsx(MenuWrapInner, {
|
|
57
|
+
children: /* @__PURE__ */jsxs(Container, {
|
|
58
|
+
size: "desktop",
|
|
59
|
+
noVerticalMargin: true,
|
|
60
|
+
children: [/* @__PURE__ */jsx(ContainerRow, {
|
|
61
|
+
children: productLineOptions.map(option => /* @__PURE__ */jsx(LinkButton, {
|
|
62
|
+
motif,
|
|
63
|
+
$active: option.value === productLineValue,
|
|
64
|
+
onClick: () => onProductLineChange?.(option.value),
|
|
65
|
+
children: option.label
|
|
66
|
+
}, option.value))
|
|
67
|
+
}), currentCountryName && /* @__PURE__ */jsxs(ContainerRow, {
|
|
68
|
+
children: [currentCountryName, /* @__PURE__ */jsx(LinkButton, {
|
|
69
|
+
motif,
|
|
70
|
+
$active: true,
|
|
71
|
+
onClick: handleStorePickerClick,
|
|
72
|
+
children: formatMessage("Change")
|
|
73
|
+
})]
|
|
74
|
+
})]
|
|
75
|
+
})
|
|
76
|
+
})
|
|
77
|
+
})
|
|
78
|
+
});
|
|
79
|
+
};
|
|
80
|
+
export { NavigationProMenu };
|
|
81
|
+
//# sourceMappingURL=ProMenu.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ProMenu.mjs","sources":["../../../../../src/components/Header/Navigation/ProMenu/ProMenu.tsx"],"sourcesContent":["import { useMemo, useRef } from \"react\";\nimport { useHoverDirty } from \"react-use\";\n\nimport { useMenu } from \"../../../../contexts/MenuContext\";\nimport { Language } from \"../../../../contexts/MenuContext/mapping\";\nimport { useTranslation } from \"../../../../hooks\";\nimport { useHasTouch } from \"../../../../hooks/useHasTouch\";\nimport { en as EN_TRANSLATION } from \"../../translations\";\nimport * as S from \"./ProMenu.styles\";\nimport type { NavigationProMenuPrivateProps } from \"./ProMenu.types\";\n\nexport const NavigationProMenu = ({\n show,\n currentCountryName,\n handleStorePickerClick,\n productLineValue,\n productLineOptions,\n onProductLineChange,\n}: NavigationProMenuPrivateProps) => {\n const { motif } = useMenu();\n const { formatMessage } = useTranslation({\n defaultTranslation: EN_TRANSLATION,\n additionalTranslations: {\n [Language.Ja]: () =>\n import(\"../../translations/ja.json\").then((res) => res.default),\n [Language.Ar]: () =>\n import(\"../../translations/ar.json\").then((res) => res.default),\n [Language.De]: () =>\n import(\"../../translations/de.json\").then((res) => res.default),\n [Language.Es]: () =>\n import(\"../../translations/es.json\").then((res) => res.default),\n [Language.El]: () =>\n import(\"../../translations/el.json\").then((res) => res.default),\n [Language.It]: () =>\n import(\"../../translations/it.json\").then((res) => res.default),\n [Language.Pt]: () =>\n import(\"../../translations/pt-BR.json\").then((res) => res.default),\n [Language.Zh]: () =>\n import(\"../../translations/zh-Hans.json\").then((res) => res.default),\n [Language.Fr]: () =>\n import(\"../../translations/fr.json\").then((res) => res.default),\n [Language.Tw]: () =>\n import(\"../../translations/zh-Hant-TW.json\").then((res) => res.default),\n },\n });\n\n // #############################################################################\n // Refs\n // #############################################################################\n const wrapRef = useRef<HTMLDivElement>(null);\n\n // #############################################################################\n // Handle show\n // #############################################################################\n const wrapHover = useHoverDirty(wrapRef);\n const hasTouch = useHasTouch();\n\n const slideInView = useMemo((): boolean => {\n // Ignore hover on touch devices\n const hasHover = !hasTouch && wrapHover;\n\n // Show when parent or wrap has hover\n return show || hasHover;\n }, [hasTouch, show, wrapHover]);\n\n // #############################################################################\n // Render\n // #############################################################################\n return (\n <S.Wrap ref={wrapRef} motif={motif} slideInView={slideInView}>\n <S.MenuWrap motif={motif}>\n <S.MenuWrapInner>\n <S.Container size=\"desktop\" noVerticalMargin>\n {/* Product line */}\n <S.ContainerRow>\n {productLineOptions.map((option) => (\n <S.LinkButton\n key={option.value}\n motif={motif}\n $active={option.value === productLineValue}\n onClick={() => onProductLineChange?.(option.value)}\n >\n {option.label}\n </S.LinkButton>\n ))}\n </S.ContainerRow>\n\n {/* Country */}\n {currentCountryName && (\n <S.ContainerRow>\n {currentCountryName}\n <S.LinkButton\n motif={motif}\n $active\n onClick={handleStorePickerClick}\n >\n {formatMessage(\"Change\")}\n </S.LinkButton>\n </S.ContainerRow>\n )}\n </S.Container>\n </S.MenuWrapInner>\n </S.MenuWrap>\n </S.Wrap>\n );\n};\n"],"names":["NavigationProMenu","show","currentCountryName","handleStorePickerClick","productLineValue","productLineOptions","onProductLineChange","motif","useMenu","formatMessage","useTranslation","defaultTranslation","EN_TRANSLATION","additionalTranslations","Language","Ja","then","res","default","Ar","De","Es","El","It","Pt","Zh","Fr","Tw","wrapRef","useRef","wrapHover","useHoverDirty","hasTouch","useHasTouch","slideInView","useMemo","hasHover","jsx","S.Wrap","ref","children","S.MenuWrap","S.MenuWrapInner","jsxs","S.Container","size","noVerticalMargin","S.ContainerRow","map","option","S.LinkButton","$active","value","onClick","label"],"mappings":";;;;;;;;;;;;;;AAWO,MAAMA,oBAAoBA,CAAC;EAChCC,IAAA;EACAC,kBAAA;EACAC,sBAAA;EACAC,gBAAA;EACAC,kBAAA;EACAC;AACF,CAAqC,KAAA;EAC7B,MAAA;IAAEC;GAAM,GAAIC,OAAQ,EAAA;EACpB,MAAA;IAAEC;EAAc,CAAA,GAAIC,cAAe,CAAA;IACvCC,kBAAoB,EAAAC,cAAA;IACpBC,sBAAwB,EAAA;MACtB,CAACC,QAAA,CAASC,EAAE,GAAG,MACb,OAAO,gCAA4B,CAAA,CAAEC,IAAK,CAACC,GAAQ,IAAAA,GAAA,CAAIC,OAAO,CAAA;MAChE,CAACJ,QAAA,CAASK,EAAE,GAAG,MACb,OAAO,gCAA4B,CAAA,CAAEH,IAAK,CAACC,GAAQ,IAAAA,GAAA,CAAIC,OAAO,CAAA;MAChE,CAACJ,QAAA,CAASM,EAAE,GAAG,MACb,OAAO,gCAA4B,CAAA,CAAEJ,IAAK,CAACC,GAAQ,IAAAA,GAAA,CAAIC,OAAO,CAAA;MAChE,CAACJ,QAAA,CAASO,EAAE,GAAG,MACb,OAAO,gCAA4B,CAAA,CAAEL,IAAK,CAACC,GAAQ,IAAAA,GAAA,CAAIC,OAAO,CAAA;MAChE,CAACJ,QAAA,CAASQ,EAAE,GAAG,MACb,OAAO,gCAA4B,CAAA,CAAEN,IAAK,CAACC,GAAQ,IAAAA,GAAA,CAAIC,OAAO,CAAA;MAChE,CAACJ,QAAA,CAASS,EAAE,GAAG,MACb,OAAO,gCAA4B,CAAA,CAAEP,IAAK,CAACC,GAAQ,IAAAA,GAAA,CAAIC,OAAO,CAAA;MAChE,CAACJ,QAAA,CAASU,EAAE,GAAG,MACb,OAAO,mCAA+B,CAAA,CAAER,IAAK,CAACC,GAAQ,IAAAA,GAAA,CAAIC,OAAO,CAAA;MACnE,CAACJ,QAAA,CAASW,EAAE,GAAG,MACb,OAAO,qCAAiC,CAAA,CAAET,IAAK,CAACC,GAAQ,IAAAA,GAAA,CAAIC,OAAO,CAAA;MACrE,CAACJ,QAAA,CAASY,EAAE,GAAG,MACb,OAAO,gCAA4B,CAAA,CAAEV,IAAK,CAACC,GAAQ,IAAAA,GAAA,CAAIC,OAAO,CAAA;MAChE,CAACJ,QAAA,CAASa,EAAE,GAAG,MACb,OAAO,wCAAoC,CAAA,CAAEX,IAAK,CAACC,GAAQ,IAAAA,GAAA,CAAIC,OAAO;IAC1E;EAAA,CACD,CAAA;EAKK,MAAAU,OAAA,GAAUC,OAAuB,IAAI,CAAA;EAKrC,MAAAC,SAAA,GAAYC,cAAcH,OAAO,CAAA;EACvC,MAAMI,WAAWC,WAAY,EAAA;EAEvB,MAAAC,WAAA,GAAcC,QAAQ,MAAe;IAEnC,MAAAC,QAAA,GAAW,CAACJ,QAAY,IAAAF,SAAA;IAG9B,OAAO7B,IAAQ,IAAAmC,QAAA;EACd,CAAA,EAAA,CAACJ,QAAU,EAAA/B,IAAA,EAAM6B,SAAS,CAAC,CAAA;EAM5B,OAAA,eAAAO,GAAA,CAACC,IAAE,EAAF;IAAOC,GAAA,EAAKX;IAASrB,KAAc;IAAA2B,WAAA;IAClCM,QAAC,EAAA,eAAAH,GAAA,CAAAI,QAAA,EAAA;MAAWlC;MACViC,QAAC,EAAA,eAAAH,GAAA,CAAAK,aAAA,EAAA;QACCF,QAAC,EAAA,eAAAG,IAAA,CAAAC,WAAA;UAAYC,IAAA,EAAK,SAAU;UAAAC,gBAAA,EAAgB,IAE1C;UAAAN,QAAA,EAAA,CAAA,eAAAH,GAAA,CAACU,YAAA,EAAA;YACEP,QAAmB,EAAAnC,kBAAA,CAAA2C,GAAA,CAAKC,MACvB,mBAAAZ,GAAA,CAACa,UAAE,EAAF;cAEC3C,KAAA;cACA4C,OAAA,EAASF,OAAOG,KAAU,KAAAhD,gBAAA;cAC1BiD,OAAS,EAAAA,CAAA,KAAM/C,mBAAsB,GAAA2C,MAAA,CAAOG,KAAK,CAAA;cAEhDZ,QAAO,EAAAS,MAAA,CAAAK;YAAA,CAAA,EALHL,MAAO,CAAAG,KAOf,CAAA;WACH,CAAA,EAGClD,kBACC,mBAAAyC,IAAA,CAACI,YAAE,EAAF;YACEP,QAAA,EAAA,CAAAtC,kBAAA,EAAA,eACDmC,GAAA,CAACa,UAAE,EAAF;cACC3C,KAAA;cACA4C,OAAO,EAAA,IAAA;cACPE,OAAS,EAAAlD,sBAAA;cAERqC,wBAAc,QAAQ;YAAA,CACzB,CAAA;WACF,CAAA;QAEJ,CAAA;MACF,CAAA;KACF;EACF,CAAA,CAAA;AAEJ,CAAA;"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { Motif } from "@ubnt/ui-components/utils";
|
|
2
|
+
export declare const TRANSITION_DURATION_MS = 250;
|
|
3
|
+
export declare const GLASS_COVER_Z_INDEX: number;
|
|
4
|
+
export declare const MenuWrapInner: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
5
|
+
export declare const MenuWrap: import("styled-components").StyledComponent<"nav", import("styled-components").DefaultTheme, {
|
|
6
|
+
motif: Motif;
|
|
7
|
+
}, never>;
|
|
8
|
+
export declare const Wrap: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {
|
|
9
|
+
motif: Motif;
|
|
10
|
+
slideInView: boolean;
|
|
11
|
+
}, never>;
|
|
12
|
+
export declare const Container: import("styled-components").StyledComponent<import("react").MemoExoticComponent<import("react").ForwardRefExoticComponent<import("../../../Container/Container.types").ContainerProps & import("react").RefAttributes<HTMLDivElement>>>, import("styled-components").DefaultTheme, {}, never>;
|
|
13
|
+
export declare const ContainerRow: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
14
|
+
interface LinkButtonProps {
|
|
15
|
+
$active?: boolean;
|
|
16
|
+
motif: Motif;
|
|
17
|
+
}
|
|
18
|
+
export declare const LinkButton: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("../../../Button/Button.types").ButtonProps & {
|
|
19
|
+
children?: import("react").ReactNode;
|
|
20
|
+
} & import("react").RefAttributes<HTMLAnchorElement | HTMLButtonElement | null>>, import("styled-components").DefaultTheme, {
|
|
21
|
+
variant: "link";
|
|
22
|
+
} & LinkButtonProps, "variant">;
|
|
23
|
+
export {};
|