@ubnt/store.core 9.19.0 → 9.20.0-alpha.0
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 +201 -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/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/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/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/ModelCompareV3.js +2 -0
- package/lib/components/ModelCompareV3/ModelCompareV3.js.map +1 -1
- package/lib/components/ModelCompareV3/ModelCompareV3.mjs +3 -1
- package/lib/components/ModelCompareV3/ModelCompareV3.mjs.map +1 -1
- package/lib/components/ModelCompareV3/ModelCompareV3.styles.d.ts +1 -0
- package/lib/components/ModelCompareV3/ModelCompareV3.styles.js +8 -0
- package/lib/components/ModelCompareV3/ModelCompareV3.styles.js.map +1 -1
- package/lib/components/ModelCompareV3/ModelCompareV3.styles.mjs +8 -1
- package/lib/components/ModelCompareV3/ModelCompareV3.styles.mjs.map +1 -1
- package/lib/components/ModelCompareV3/ModelCompareV3.types.d.ts +1 -0
- package/lib/components/ModelCompareV3/data/products/envr.js +1 -1
- package/lib/components/ModelCompareV3/data/products/envr.js.map +1 -1
- package/lib/components/ModelCompareV3/data/products/envr.mjs +1 -1
- package/lib/components/ModelCompareV3/data/products/envr.mjs.map +1 -1
- package/lib/components/ModelCompareV3/translations/ar.json.js +3 -3
- package/lib/components/ModelCompareV3/translations/ar.json.mjs +3 -3
- package/lib/components/ModelCompareV3/translations/de.json.js +3 -3
- package/lib/components/ModelCompareV3/translations/de.json.mjs +3 -3
- package/lib/components/ModelCompareV3/translations/el.json.js +3 -3
- package/lib/components/ModelCompareV3/translations/el.json.mjs +3 -3
- package/lib/components/ModelCompareV3/translations/en.json.js +3 -3
- package/lib/components/ModelCompareV3/translations/en.json.mjs +3 -3
- package/lib/components/ModelCompareV3/translations/es.json.js +3 -3
- package/lib/components/ModelCompareV3/translations/es.json.mjs +3 -3
- package/lib/components/ModelCompareV3/translations/fr.json.js +3 -3
- package/lib/components/ModelCompareV3/translations/fr.json.mjs +3 -3
- package/lib/components/ModelCompareV3/translations/it.json.js +3 -3
- package/lib/components/ModelCompareV3/translations/it.json.mjs +3 -3
- package/lib/components/ModelCompareV3/translations/ja.json.js +3 -3
- package/lib/components/ModelCompareV3/translations/ja.json.mjs +3 -3
- package/lib/components/ModelCompareV3/translations/pt-BR.json.js +3 -3
- package/lib/components/ModelCompareV3/translations/pt-BR.json.mjs +3 -3
- package/lib/components/ModelCompareV3/translations/zh-Hans.json.js +3 -3
- package/lib/components/ModelCompareV3/translations/zh-Hans.json.mjs +3 -3
- package/lib/components/ModelCompareV3/translations/zh-Hant-TW.json.js +3 -3
- package/lib/components/ModelCompareV3/translations/zh-Hant-TW.json.mjs +3 -3
- package/lib/components/ProductSectionNavigation/ProductSectionNavigation.styles.d.ts +1 -1
- package/lib/components/ProductSectionNavigationV2/ProductSectionNavigation.styles.d.ts +1 -1
- package/lib/components/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 +1 -1
- package/lib/components/VideoPlayerNew/VideoPlayer.mjs +1 -1
- 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
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var styled = require('styled-components');
|
|
4
|
+
var theme = require('../../../../constants/theme.js');
|
|
5
|
+
require('../../../Button/index.js');
|
|
6
|
+
require('../../../Container/index.js');
|
|
7
|
+
var Container_styles = require('../../../Container/Container.styles.js');
|
|
8
|
+
var Container$1 = require('../../../Container/Container.js');
|
|
9
|
+
var Button = require('../../../Button/Button.js');
|
|
10
|
+
function _interopDefault(e) {
|
|
11
|
+
return e && e.__esModule ? e : {
|
|
12
|
+
default: e
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
var styled__default = /*#__PURE__*/_interopDefault(styled);
|
|
16
|
+
"use strict";
|
|
17
|
+
const PRO_MENU_Z_INDEX = theme.theme.zIndex.header - 1;
|
|
18
|
+
const TRANSITION_DURATION_MS = 250;
|
|
19
|
+
const GLASS_COVER_Z_INDEX = TRANSITION_DURATION_MS - 1;
|
|
20
|
+
const withCssTransition = props => styled.css`
|
|
21
|
+
transition: ${TRANSITION_DURATION_MS}ms ease-out;
|
|
22
|
+
transition-property: ${props.join(",")};
|
|
23
|
+
`;
|
|
24
|
+
const MenuWrapInner = styled__default["default"].div`
|
|
25
|
+
overflow: hidden;
|
|
26
|
+
|
|
27
|
+
opacity: 0;
|
|
28
|
+
translate: 0 -5px;
|
|
29
|
+
${withCssTransition(["opacity", "translate"])};
|
|
30
|
+
transition-duration: ${TRANSITION_DURATION_MS * 1.5}ms;
|
|
31
|
+
`;
|
|
32
|
+
const MenuWrap = styled__default["default"].nav`
|
|
33
|
+
background: ${({
|
|
34
|
+
motif
|
|
35
|
+
}) => theme.theme.colors.menu.base[motif]};
|
|
36
|
+
display: grid;
|
|
37
|
+
position: absolute;
|
|
38
|
+
width: 100%;
|
|
39
|
+
|
|
40
|
+
grid-template-rows: 0fr;
|
|
41
|
+
${withCssTransition(["grid-template-rows", "height"])};
|
|
42
|
+
`;
|
|
43
|
+
const Wrap = styled__default["default"].div`
|
|
44
|
+
position: relative;
|
|
45
|
+
height: 0;
|
|
46
|
+
|
|
47
|
+
/* General font config */
|
|
48
|
+
font-size: 14px;
|
|
49
|
+
line-height: ${20 / 14};
|
|
50
|
+
color: ${({
|
|
51
|
+
motif
|
|
52
|
+
}) => theme.theme.colors.menu.proSubMenuText[motif]};
|
|
53
|
+
|
|
54
|
+
/* Handle slide in */
|
|
55
|
+
${({
|
|
56
|
+
slideInView
|
|
57
|
+
}) => slideInView && styled.css`
|
|
58
|
+
z-index: ${PRO_MENU_Z_INDEX};
|
|
59
|
+
|
|
60
|
+
${MenuWrap} {
|
|
61
|
+
grid-template-rows: 1fr;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
${MenuWrapInner} {
|
|
65
|
+
opacity: 1;
|
|
66
|
+
translate: 0;
|
|
67
|
+
}
|
|
68
|
+
`}
|
|
69
|
+
`;
|
|
70
|
+
const Container = styled__default["default"](Container$1.Container)`
|
|
71
|
+
padding-top: 16px;
|
|
72
|
+
padding-bottom: 25px;
|
|
73
|
+
|
|
74
|
+
${Container_styles.WrapPadding} {
|
|
75
|
+
flex-direction: column;
|
|
76
|
+
align-items: flex-start;
|
|
77
|
+
gap: 8px;
|
|
78
|
+
}
|
|
79
|
+
`;
|
|
80
|
+
const ContainerRow = styled__default["default"].div`
|
|
81
|
+
display: flex;
|
|
82
|
+
gap: 16px;
|
|
83
|
+
`;
|
|
84
|
+
const LinkButton = styled__default["default"](Button.Button).attrs({
|
|
85
|
+
variant: "link"
|
|
86
|
+
})`
|
|
87
|
+
font-size: inherit;
|
|
88
|
+
line-height: inherit;
|
|
89
|
+
text-align: left;
|
|
90
|
+
font-weight: normal;
|
|
91
|
+
|
|
92
|
+
> * {
|
|
93
|
+
justify-content: flex-start;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
${({
|
|
97
|
+
motif
|
|
98
|
+
}) => styled.css`
|
|
99
|
+
color: ${theme.theme.colors.menu.proSubMenuText[motif]};
|
|
100
|
+
|
|
101
|
+
:hover,
|
|
102
|
+
:focus {
|
|
103
|
+
color: ${theme.theme.colors.menu.active[motif]};
|
|
104
|
+
}
|
|
105
|
+
`}
|
|
106
|
+
${({
|
|
107
|
+
$active,
|
|
108
|
+
motif
|
|
109
|
+
}) => $active && styled.css`
|
|
110
|
+
color: ${theme.theme.colors.menu.active[motif]};
|
|
111
|
+
`};
|
|
112
|
+
`;
|
|
113
|
+
exports.Container = Container;
|
|
114
|
+
exports.ContainerRow = ContainerRow;
|
|
115
|
+
exports.GLASS_COVER_Z_INDEX = GLASS_COVER_Z_INDEX;
|
|
116
|
+
exports.LinkButton = LinkButton;
|
|
117
|
+
exports.MenuWrap = MenuWrap;
|
|
118
|
+
exports.MenuWrapInner = MenuWrapInner;
|
|
119
|
+
exports.TRANSITION_DURATION_MS = TRANSITION_DURATION_MS;
|
|
120
|
+
exports.Wrap = Wrap;
|
|
121
|
+
//# sourceMappingURL=ProMenu.styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ProMenu.styles.js","sources":["../../../../../src/components/Header/Navigation/ProMenu/ProMenu.styles.ts"],"sourcesContent":["import type { Motif } from \"@ubnt/ui-components/utils\";\nimport styled, { css } from \"styled-components\";\n\nimport { theme } from \"../../../../constants/theme\";\nimport { Button as ButtonBase } from \"../../../Button\";\nimport { Container as ContainerBase } from \"../../../Container\";\nimport { WrapPadding } from \"../../../Container/Container.styles\";\n\nconst PRO_MENU_Z_INDEX = theme.zIndex.header - 1;\n\nexport const TRANSITION_DURATION_MS = 250;\nexport const GLASS_COVER_Z_INDEX = TRANSITION_DURATION_MS - 1;\n\nconst withCssTransition = (props: string[]) => css`\n transition: ${TRANSITION_DURATION_MS}ms ease-out;\n transition-property: ${props.join(\",\")};\n`;\n\nexport const MenuWrapInner = styled.div`\n overflow: hidden;\n\n opacity: 0;\n translate: 0 -5px;\n ${withCssTransition([\"opacity\", \"translate\"])};\n transition-duration: ${TRANSITION_DURATION_MS * 1.5}ms;\n`;\n\nexport const MenuWrap = styled.nav<{ motif: Motif }>`\n background: ${({ motif }) => theme.colors.menu.base[motif]};\n display: grid;\n position: absolute;\n width: 100%;\n\n grid-template-rows: 0fr;\n ${withCssTransition([\"grid-template-rows\", \"height\"])};\n`;\n\nexport const Wrap = styled.div<{ motif: Motif; slideInView: boolean }>`\n position: relative;\n height: 0;\n\n /* General font config */\n font-size: 14px;\n line-height: ${20 / 14};\n color: ${({ motif }) => theme.colors.menu.proSubMenuText[motif]};\n\n /* Handle slide in */\n ${({ slideInView }) =>\n slideInView &&\n css`\n z-index: ${PRO_MENU_Z_INDEX};\n\n ${MenuWrap} {\n grid-template-rows: 1fr;\n }\n\n ${MenuWrapInner} {\n opacity: 1;\n translate: 0;\n }\n `}\n`;\n\nexport const Container = styled(ContainerBase)`\n padding-top: 16px;\n padding-bottom: 25px;\n\n ${WrapPadding} {\n flex-direction: column;\n align-items: flex-start;\n gap: 8px;\n }\n`;\n\nexport const ContainerRow = styled.div`\n display: flex;\n gap: 16px;\n`;\n\ninterface LinkButtonProps {\n $active?: boolean;\n motif: Motif;\n}\nexport const LinkButton = styled(ButtonBase).attrs({\n variant: \"link\",\n})<LinkButtonProps>`\n font-size: inherit;\n line-height: inherit;\n text-align: left;\n font-weight: normal;\n\n > * {\n justify-content: flex-start;\n }\n\n ${({ motif }) => css`\n color: ${theme.colors.menu.proSubMenuText[motif]};\n\n :hover,\n :focus {\n color: ${theme.colors.menu.active[motif]};\n }\n `}\n ${({ $active, motif }) =>\n $active &&\n css`\n color: ${theme.colors.menu.active[motif]};\n `};\n`;\n"],"names":["PRO_MENU_Z_INDEX","theme","zIndex","header","TRANSITION_DURATION_MS","GLASS_COVER_Z_INDEX","withCssTransition","props","css","join","MenuWrapInner","styled","div","MenuWrap","nav","motif","colors","menu","base","Wrap","proSubMenuText","slideInView","Container","ContainerBase","WrapPadding","ContainerRow","LinkButton","ButtonBase","attrs","variant","active","$active"],"mappings":";;;;;;;;;;;;;;;;AAQA,MAAMA,gBAAA,GAAmBC,KAAM,CAAAA,KAAA,CAAAC,MAAA,CAAOC,MAAS,GAAA,CAAA;AAExC,MAAMC,sBAAyB,GAAA,GAAA;AAC/B,MAAMC,sBAAsBD,sBAAyB,GAAA,CAAA;AAE5D,MAAME,iBAAA,GAAqBC,KAAoB,IAAAC,UAAA;AAAA,gBAC/BJ,sBAAsB;AAAA,yBACbG,KAAA,CAAME,IAAK,CAAA,GAAG,CAAC;AAAA,CAAA;AAGjC,MAAMC,gBAAgBC,eAAO,CAAA,SAAA,CAAA,CAAAC,GAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAKhCN,iBAAkB,CAAA,CAAC,SAAW,EAAA,WAAW,CAAC,CAAC;AAAA,yBACtBF,yBAAyB,GAAG;AAAA,CAAA;AAG9C,MAAMS,WAAWF,eAAO,CAAA,SAAA,CAAA,CAAAG,GAAA;AAAA,gBACf,CAAC;EAAEC;AAAM,CAAA,KAAMd,YAAMe,MAAO,CAAAC,IAAA,CAAKC,IAAK,CAAAH,KAAK,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMxDT,iBAAkB,CAAA,CAAC,oBAAsB,EAAA,QAAQ,CAAC,CAAC;AAAA,CAAA;AAGhD,MAAMa,OAAOR,eAAO,CAAA,SAAA,CAAA,CAAAC,GAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,iBAMV,KAAK,EAAE;AAAA,WACb,CAAC;EAAEG;AAAM,CAAA,KAAMd,YAAMe,MAAO,CAAAC,IAAA,CAAKG,cAAe,CAAAL,KAAK,CAAC;AAAA;AAAA;AAAA,IAG7D,CAAC;EAAEM;CAAY,KACfA,WACA,IAAAb,MAAAA,CAAAA,GAAA;AAAA,iBACaR,gBAAgB;AAAA;AAAA,QAEzBa,QAAQ;AAAA;AAAA;AAAA;AAAA,QAIRH,aAAa;AAAA;AAAA;AAAA;AAAA,KAIhB;AAAA,CAAA;AAGQ,MAAAY,SAAA,GAAYX,eAAAA,CAAAA,SAAAA,EAAOY,WAAAA,CAAAA,SAAa,CAAA;AAAA;AAAA;AAAA;AAAA,IAIzCC,4BAAW;AAAA;AAAA;AAAA;AAAA;AAAA,CAAA;AAOR,MAAMC,eAAed,eAAO,CAAA,SAAA,CAAA,CAAAC,GAAA;AAAA;AAAA;AAAA,CAAA;AAS5B,MAAMc,UAAa,GAAAf,eAAA,CAAA,SAAA,CAAA,CAAOgB,aAAU,CAAA,CAAEC,KAAM,CAAA;EACjDC,OAAS,EAAA;AACX,CAAC,CAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAUG,CAAC;EAAEd;AAAY,CAAA,KAAAP,UAAA;AAAA,aACNP,KAAM,CAAAA,KAAA,CAAAe,MAAA,CAAOC,IAAK,CAAAG,cAAA,CAAeL,KAAK,CAAC;AAAA;AAAA;AAAA;AAAA,eAIrCd,KAAM,CAAAA,KAAA,CAAAe,MAAA,CAAOC,IAAK,CAAAa,MAAA,CAAOf,KAAK,CAAC;AAAA;AAAA,GAE3C;AAAA,IACC,CAAC;EAAEgB,OAAS;EAAAhB;AAAA,MACZgB,OACA,IAAAvB,MAAAA,CAAAA,GAAA;AAAA,eACWP,KAAM,CAAAA,KAAA,CAAAe,MAAA,CAAOC,IAAK,CAAAa,MAAA,CAAOf,KAAK,CAAC;AAAA,KACzC;AAAA,CAAA;;;;;;;;"}
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
import styled, { css } from 'styled-components';
|
|
2
|
+
import { theme } from '../../../../constants/theme.mjs';
|
|
3
|
+
import '../../../Button/index.mjs';
|
|
4
|
+
import '../../../Container/index.mjs';
|
|
5
|
+
import { WrapPadding } from '../../../Container/Container.styles.mjs';
|
|
6
|
+
import { Container as Container$1 } from '../../../Container/Container.mjs';
|
|
7
|
+
import { Button } from '../../../Button/Button.mjs';
|
|
8
|
+
"use strict";
|
|
9
|
+
const PRO_MENU_Z_INDEX = theme.zIndex.header - 1;
|
|
10
|
+
const TRANSITION_DURATION_MS = 250;
|
|
11
|
+
const GLASS_COVER_Z_INDEX = TRANSITION_DURATION_MS - 1;
|
|
12
|
+
const withCssTransition = props => css`
|
|
13
|
+
transition: ${TRANSITION_DURATION_MS}ms ease-out;
|
|
14
|
+
transition-property: ${props.join(",")};
|
|
15
|
+
`;
|
|
16
|
+
const MenuWrapInner = styled.div`
|
|
17
|
+
overflow: hidden;
|
|
18
|
+
|
|
19
|
+
opacity: 0;
|
|
20
|
+
translate: 0 -5px;
|
|
21
|
+
${withCssTransition(["opacity", "translate"])};
|
|
22
|
+
transition-duration: ${TRANSITION_DURATION_MS * 1.5}ms;
|
|
23
|
+
`;
|
|
24
|
+
const MenuWrap = styled.nav`
|
|
25
|
+
background: ${({
|
|
26
|
+
motif
|
|
27
|
+
}) => theme.colors.menu.base[motif]};
|
|
28
|
+
display: grid;
|
|
29
|
+
position: absolute;
|
|
30
|
+
width: 100%;
|
|
31
|
+
|
|
32
|
+
grid-template-rows: 0fr;
|
|
33
|
+
${withCssTransition(["grid-template-rows", "height"])};
|
|
34
|
+
`;
|
|
35
|
+
const Wrap = styled.div`
|
|
36
|
+
position: relative;
|
|
37
|
+
height: 0;
|
|
38
|
+
|
|
39
|
+
/* General font config */
|
|
40
|
+
font-size: 14px;
|
|
41
|
+
line-height: ${20 / 14};
|
|
42
|
+
color: ${({
|
|
43
|
+
motif
|
|
44
|
+
}) => theme.colors.menu.proSubMenuText[motif]};
|
|
45
|
+
|
|
46
|
+
/* Handle slide in */
|
|
47
|
+
${({
|
|
48
|
+
slideInView
|
|
49
|
+
}) => slideInView && css`
|
|
50
|
+
z-index: ${PRO_MENU_Z_INDEX};
|
|
51
|
+
|
|
52
|
+
${MenuWrap} {
|
|
53
|
+
grid-template-rows: 1fr;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
${MenuWrapInner} {
|
|
57
|
+
opacity: 1;
|
|
58
|
+
translate: 0;
|
|
59
|
+
}
|
|
60
|
+
`}
|
|
61
|
+
`;
|
|
62
|
+
const Container = styled(Container$1)`
|
|
63
|
+
padding-top: 16px;
|
|
64
|
+
padding-bottom: 25px;
|
|
65
|
+
|
|
66
|
+
${WrapPadding} {
|
|
67
|
+
flex-direction: column;
|
|
68
|
+
align-items: flex-start;
|
|
69
|
+
gap: 8px;
|
|
70
|
+
}
|
|
71
|
+
`;
|
|
72
|
+
const ContainerRow = styled.div`
|
|
73
|
+
display: flex;
|
|
74
|
+
gap: 16px;
|
|
75
|
+
`;
|
|
76
|
+
const LinkButton = styled(Button).attrs({
|
|
77
|
+
variant: "link"
|
|
78
|
+
})`
|
|
79
|
+
font-size: inherit;
|
|
80
|
+
line-height: inherit;
|
|
81
|
+
text-align: left;
|
|
82
|
+
font-weight: normal;
|
|
83
|
+
|
|
84
|
+
> * {
|
|
85
|
+
justify-content: flex-start;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
${({
|
|
89
|
+
motif
|
|
90
|
+
}) => css`
|
|
91
|
+
color: ${theme.colors.menu.proSubMenuText[motif]};
|
|
92
|
+
|
|
93
|
+
:hover,
|
|
94
|
+
:focus {
|
|
95
|
+
color: ${theme.colors.menu.active[motif]};
|
|
96
|
+
}
|
|
97
|
+
`}
|
|
98
|
+
${({
|
|
99
|
+
$active,
|
|
100
|
+
motif
|
|
101
|
+
}) => $active && css`
|
|
102
|
+
color: ${theme.colors.menu.active[motif]};
|
|
103
|
+
`};
|
|
104
|
+
`;
|
|
105
|
+
export { Container, ContainerRow, GLASS_COVER_Z_INDEX, LinkButton, MenuWrap, MenuWrapInner, TRANSITION_DURATION_MS, Wrap };
|
|
106
|
+
//# sourceMappingURL=ProMenu.styles.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ProMenu.styles.mjs","sources":["../../../../../src/components/Header/Navigation/ProMenu/ProMenu.styles.ts"],"sourcesContent":["import type { Motif } from \"@ubnt/ui-components/utils\";\nimport styled, { css } from \"styled-components\";\n\nimport { theme } from \"../../../../constants/theme\";\nimport { Button as ButtonBase } from \"../../../Button\";\nimport { Container as ContainerBase } from \"../../../Container\";\nimport { WrapPadding } from \"../../../Container/Container.styles\";\n\nconst PRO_MENU_Z_INDEX = theme.zIndex.header - 1;\n\nexport const TRANSITION_DURATION_MS = 250;\nexport const GLASS_COVER_Z_INDEX = TRANSITION_DURATION_MS - 1;\n\nconst withCssTransition = (props: string[]) => css`\n transition: ${TRANSITION_DURATION_MS}ms ease-out;\n transition-property: ${props.join(\",\")};\n`;\n\nexport const MenuWrapInner = styled.div`\n overflow: hidden;\n\n opacity: 0;\n translate: 0 -5px;\n ${withCssTransition([\"opacity\", \"translate\"])};\n transition-duration: ${TRANSITION_DURATION_MS * 1.5}ms;\n`;\n\nexport const MenuWrap = styled.nav<{ motif: Motif }>`\n background: ${({ motif }) => theme.colors.menu.base[motif]};\n display: grid;\n position: absolute;\n width: 100%;\n\n grid-template-rows: 0fr;\n ${withCssTransition([\"grid-template-rows\", \"height\"])};\n`;\n\nexport const Wrap = styled.div<{ motif: Motif; slideInView: boolean }>`\n position: relative;\n height: 0;\n\n /* General font config */\n font-size: 14px;\n line-height: ${20 / 14};\n color: ${({ motif }) => theme.colors.menu.proSubMenuText[motif]};\n\n /* Handle slide in */\n ${({ slideInView }) =>\n slideInView &&\n css`\n z-index: ${PRO_MENU_Z_INDEX};\n\n ${MenuWrap} {\n grid-template-rows: 1fr;\n }\n\n ${MenuWrapInner} {\n opacity: 1;\n translate: 0;\n }\n `}\n`;\n\nexport const Container = styled(ContainerBase)`\n padding-top: 16px;\n padding-bottom: 25px;\n\n ${WrapPadding} {\n flex-direction: column;\n align-items: flex-start;\n gap: 8px;\n }\n`;\n\nexport const ContainerRow = styled.div`\n display: flex;\n gap: 16px;\n`;\n\ninterface LinkButtonProps {\n $active?: boolean;\n motif: Motif;\n}\nexport const LinkButton = styled(ButtonBase).attrs({\n variant: \"link\",\n})<LinkButtonProps>`\n font-size: inherit;\n line-height: inherit;\n text-align: left;\n font-weight: normal;\n\n > * {\n justify-content: flex-start;\n }\n\n ${({ motif }) => css`\n color: ${theme.colors.menu.proSubMenuText[motif]};\n\n :hover,\n :focus {\n color: ${theme.colors.menu.active[motif]};\n }\n `}\n ${({ $active, motif }) =>\n $active &&\n css`\n color: ${theme.colors.menu.active[motif]};\n `};\n`;\n"],"names":["PRO_MENU_Z_INDEX","theme","zIndex","header","TRANSITION_DURATION_MS","GLASS_COVER_Z_INDEX","withCssTransition","props","css","join","MenuWrapInner","styled","div","MenuWrap","nav","motif","colors","menu","base","Wrap","proSubMenuText","slideInView","Container","ContainerBase","WrapPadding","ContainerRow","LinkButton","ButtonBase","attrs","variant","active","$active"],"mappings":";;;;;;;;AAQA,MAAMA,gBAAA,GAAmBC,KAAM,CAAAC,MAAA,CAAOC,MAAS,GAAA,CAAA;AAExC,MAAMC,sBAAyB,GAAA,GAAA;AAC/B,MAAMC,sBAAsBD,sBAAyB,GAAA,CAAA;AAE5D,MAAME,iBAAA,GAAqBC,KAAoB,IAAAC,GAAA;AAAA,gBAC/BJ,sBAAsB;AAAA,yBACbG,KAAA,CAAME,IAAK,CAAA,GAAG,CAAC;AAAA,CAAA;AAGjC,MAAMC,gBAAgBC,MAAO,CAAAC,GAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAKhCN,iBAAkB,CAAA,CAAC,SAAW,EAAA,WAAW,CAAC,CAAC;AAAA,yBACtBF,yBAAyB,GAAG;AAAA,CAAA;AAG9C,MAAMS,WAAWF,MAAO,CAAAG,GAAA;AAAA,gBACf,CAAC;EAAEC;AAAM,CAAA,KAAMd,MAAMe,MAAO,CAAAC,IAAA,CAAKC,IAAK,CAAAH,KAAK,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMxDT,iBAAkB,CAAA,CAAC,oBAAsB,EAAA,QAAQ,CAAC,CAAC;AAAA,CAAA;AAGhD,MAAMa,OAAOR,MAAO,CAAAC,GAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,iBAMV,KAAK,EAAE;AAAA,WACb,CAAC;EAAEG;AAAM,CAAA,KAAMd,MAAMe,MAAO,CAAAC,IAAA,CAAKG,cAAe,CAAAL,KAAK,CAAC;AAAA;AAAA;AAAA,IAG7D,CAAC;EAAEM;CAAY,KACfA,WACA,IAAAb,GAAA;AAAA,iBACaR,gBAAgB;AAAA;AAAA,QAEzBa,QAAQ;AAAA;AAAA;AAAA;AAAA,QAIRH,aAAa;AAAA;AAAA;AAAA;AAAA,KAIhB;AAAA,CAAA;AAGQ,MAAAY,SAAA,GAAYX,OAAOY,WAAa,CAAA;AAAA;AAAA;AAAA;AAAA,IAIzCC,WAAW;AAAA;AAAA;AAAA;AAAA;AAAA,CAAA;AAOR,MAAMC,eAAed,MAAO,CAAAC,GAAA;AAAA;AAAA;AAAA,CAAA;AAS5B,MAAMc,UAAa,GAAAf,MAAA,CAAOgB,MAAU,CAAA,CAAEC,KAAM,CAAA;EACjDC,OAAS,EAAA;AACX,CAAC,CAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAUG,CAAC;EAAEd;AAAY,CAAA,KAAAP,GAAA;AAAA,aACNP,KAAM,CAAAe,MAAA,CAAOC,IAAK,CAAAG,cAAA,CAAeL,KAAK,CAAC;AAAA;AAAA;AAAA;AAAA,eAIrCd,KAAM,CAAAe,MAAA,CAAOC,IAAK,CAAAa,MAAA,CAAOf,KAAK,CAAC;AAAA;AAAA,GAE3C;AAAA,IACC,CAAC;EAAEgB,OAAS;EAAAhB;AAAA,MACZgB,OACA,IAAAvB,GAAA;AAAA,eACWP,KAAM,CAAAe,MAAA,CAAOC,IAAK,CAAAa,MAAA,CAAOf,KAAK,CAAC;AAAA,KACzC;AAAA,CAAA;"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { ProductLine } from "../../../../types";
|
|
2
|
+
import type { HeaderProductLineOption } from "../../Header.types";
|
|
3
|
+
export interface NavigationProMenuProps {
|
|
4
|
+
}
|
|
5
|
+
export interface NavigationProMenuPrivateProps extends NavigationProMenuProps {
|
|
6
|
+
show: boolean;
|
|
7
|
+
currentCountryName?: string;
|
|
8
|
+
handleStorePickerClick?: () => void;
|
|
9
|
+
productLineValue?: ProductLine;
|
|
10
|
+
productLineOptions: HeaderProductLineOption[];
|
|
11
|
+
onProductLineChange?: (line: ProductLine) => void;
|
|
12
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./ProMenu";
|
package/lib/components/{ResourceCalculatorV1/components → Header/Navigation/ProMenu}/index.js.map
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import type { NavigationProMobileMenuProps } from "./ProMobileMenu.types";
|
|
2
|
-
export declare const NavigationProMobileMenu: ({ translations, onClose, currentCountryName, handleStorePickerClick, handleOrderHistoryClick, handlePurchaseHistoryClick, handleProductLineChange, productLineValue, productLineOptions,
|
|
2
|
+
export declare const NavigationProMobileMenu: ({ translations, onClose, currentCountryName, handleStorePickerClick, handleOrderHistoryClick, handlePurchaseHistoryClick, handleProductLineChange, productLineValue, productLineOptions, categories, hideExtraSection, }: NavigationProMobileMenuProps) => JSX.Element;
|
|
@@ -2,10 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
var jsxRuntime = require('react/jsx-runtime');
|
|
4
4
|
var react = require('react');
|
|
5
|
-
require('../../../../assets/icons/menu/icon-globe.svg.js');
|
|
6
5
|
require('../../../../assets/icons/menu/icon-history.svg.js');
|
|
6
|
+
require('../../../../assets/icons/menu/icon-location-pin.svg.js');
|
|
7
7
|
require('../../../../constants/icons/index.js');
|
|
8
8
|
require('../../../../contexts/MenuContext/index.js');
|
|
9
|
+
var asset = require('../../../../utils/asset.js');
|
|
10
|
+
var typeGuards = require('../../../../utils/typeGuards.js');
|
|
9
11
|
var useFooterContent = require('../../../Footer/hooks/useFooterContent.js');
|
|
10
12
|
require('../../../StyleableSvgImage/index.js');
|
|
11
13
|
var mapping = require('../../LinksModal/mapping.js');
|
|
@@ -13,7 +15,7 @@ var MobileMenu_styles = require('../MobileMenu/MobileMenu.styles.js');
|
|
|
13
15
|
var ProMobileMenu_styles = require('./ProMobileMenu.styles.js');
|
|
14
16
|
var context = require('../../../../contexts/MenuContext/context.js');
|
|
15
17
|
var HistoryIcon = require("../../../../assets/icon-history.svg");
|
|
16
|
-
var
|
|
18
|
+
var LocationPinIcon = require("../../../../assets/icon-location-pin.svg");
|
|
17
19
|
var StyleableSvgImage = require('../../../StyleableSvgImage/StyleableSvgImage.js');
|
|
18
20
|
var _externalAssets_BAXELvSy = require("../../../../assets/collapseArrow.svg");
|
|
19
21
|
function _interopDefault(e) {
|
|
@@ -22,9 +24,10 @@ function _interopDefault(e) {
|
|
|
22
24
|
};
|
|
23
25
|
}
|
|
24
26
|
var HistoryIcon__default = /*#__PURE__*/_interopDefault(HistoryIcon);
|
|
25
|
-
var
|
|
27
|
+
var LocationPinIcon__default = /*#__PURE__*/_interopDefault(LocationPinIcon);
|
|
26
28
|
var _externalAssets_BAXELvSy__default = /*#__PURE__*/_interopDefault(_externalAssets_BAXELvSy);
|
|
27
29
|
"use strict";
|
|
30
|
+
const motif = "light";
|
|
28
31
|
const NavigationProMobileMenu = function NavigationProMobileMenu2({
|
|
29
32
|
translations,
|
|
30
33
|
onClose,
|
|
@@ -36,9 +39,9 @@ const NavigationProMobileMenu = function NavigationProMobileMenu2({
|
|
|
36
39
|
handleProductLineChange,
|
|
37
40
|
productLineValue,
|
|
38
41
|
productLineOptions,
|
|
39
|
-
|
|
42
|
+
categories,
|
|
43
|
+
hideExtraSection
|
|
40
44
|
}) {
|
|
41
|
-
const motif = "light";
|
|
42
45
|
const {
|
|
43
46
|
footerContent,
|
|
44
47
|
socialContent
|
|
@@ -51,111 +54,100 @@ const NavigationProMobileMenu = function NavigationProMobileMenu2({
|
|
|
51
54
|
setExpandedSectionItemId(expandedSectionItemId === itemId ? null : itemId);
|
|
52
55
|
}, [expandedSectionItemId]);
|
|
53
56
|
const sections = react.useMemo(() => {
|
|
54
|
-
const
|
|
57
|
+
const extraSectionItems = [{
|
|
58
|
+
id: "support",
|
|
59
|
+
label: translations.support,
|
|
60
|
+
url: null,
|
|
61
|
+
subItems: mapping.getSupportLinkMapping(context$1).map(item => ({
|
|
62
|
+
id: item.id,
|
|
63
|
+
label: item.name,
|
|
64
|
+
url: item.url
|
|
65
|
+
}))
|
|
66
|
+
}, {
|
|
67
|
+
id: "social",
|
|
68
|
+
label: translations.social,
|
|
69
|
+
url: null,
|
|
70
|
+
subItems: socialContent.items.map(item => ({
|
|
71
|
+
id: item.id,
|
|
72
|
+
label: item.label,
|
|
73
|
+
url: item.src
|
|
74
|
+
}))
|
|
75
|
+
}, ...[{
|
|
76
|
+
key: "company",
|
|
77
|
+
label: translations.company
|
|
78
|
+
}, {
|
|
79
|
+
key: "training",
|
|
80
|
+
label: translations.training
|
|
81
|
+
}, {
|
|
82
|
+
key: "tools",
|
|
83
|
+
label: translations.tools
|
|
84
|
+
}].map(({
|
|
85
|
+
key,
|
|
86
|
+
label
|
|
87
|
+
}) => ({
|
|
88
|
+
id: key,
|
|
89
|
+
label,
|
|
90
|
+
url: null,
|
|
91
|
+
subItems: footerContent[key].items.map(item => ({
|
|
92
|
+
id: item.id,
|
|
93
|
+
label: item.label,
|
|
94
|
+
url: item.src
|
|
95
|
+
}))
|
|
96
|
+
}))];
|
|
97
|
+
return [{
|
|
55
98
|
id: "store-link-stuff",
|
|
56
|
-
items: [
|
|
99
|
+
items: [handleOrderHistoryClick ? {
|
|
57
100
|
id: "order-history",
|
|
58
101
|
label: translations.orderHistory,
|
|
59
102
|
icon: {
|
|
60
|
-
src:
|
|
103
|
+
src: asset.imageSrc(HistoryIcon__default["default"]),
|
|
61
104
|
width: 16,
|
|
62
105
|
height: 16
|
|
63
106
|
},
|
|
64
|
-
url:
|
|
107
|
+
url: null,
|
|
108
|
+
onClick: () => {
|
|
65
109
|
handleOrderHistoryClick?.();
|
|
66
110
|
},
|
|
67
111
|
subItems: []
|
|
68
|
-
}
|
|
112
|
+
} : null, handlePurchaseHistoryClick ? {
|
|
69
113
|
id: "purchased-product-history",
|
|
70
114
|
label: translations.purchasedProductHistory,
|
|
71
115
|
icon: {
|
|
72
|
-
src:
|
|
116
|
+
src: asset.imageSrc(HistoryIcon__default["default"]),
|
|
73
117
|
width: 16,
|
|
74
118
|
height: 16
|
|
75
119
|
},
|
|
76
|
-
url:
|
|
120
|
+
url: null,
|
|
121
|
+
onClick: () => {
|
|
77
122
|
handlePurchaseHistoryClick?.();
|
|
78
123
|
},
|
|
79
124
|
subItems: []
|
|
80
|
-
}
|
|
81
|
-
/**
|
|
82
|
-
* NOTE: Disabled per Kaspars request (09.06.)
|
|
83
|
-
* @see https://ui.slack.com/archives/C050CTJSE80/p1686331781297389
|
|
84
|
-
*/
|
|
85
|
-
// {
|
|
86
|
-
// id: "early-access",
|
|
87
|
-
// label: translations.earlyAccess,
|
|
88
|
-
// icon: {
|
|
89
|
-
// src: typeof EAIcon === "string" ? EAIcon : EAIcon.src,
|
|
90
|
-
// width: 20,
|
|
91
|
-
// height: 16,
|
|
92
|
-
// },
|
|
93
|
-
// url: () => {
|
|
94
|
-
// handleEarlyAccessClick?.();
|
|
95
|
-
// },
|
|
96
|
-
// subItems: [],
|
|
97
|
-
// },
|
|
98
|
-
]
|
|
125
|
+
} : null].filter(typeGuards.isNonNullish)
|
|
99
126
|
}, {
|
|
100
|
-
id: "
|
|
101
|
-
items:
|
|
102
|
-
id: "support",
|
|
103
|
-
label: translations.support,
|
|
104
|
-
url: null,
|
|
105
|
-
subItems: mapping.getSupportLinkMapping(context$1).map(item => ({
|
|
106
|
-
id: item.id,
|
|
107
|
-
label: item.name,
|
|
108
|
-
url: item.url
|
|
109
|
-
}))
|
|
110
|
-
}, {
|
|
111
|
-
id: "social",
|
|
112
|
-
label: translations.social,
|
|
113
|
-
url: null,
|
|
114
|
-
subItems: socialContent.items.map(item => ({
|
|
115
|
-
id: item.id,
|
|
116
|
-
label: item.label,
|
|
117
|
-
url: item.src
|
|
118
|
-
}))
|
|
119
|
-
}, ...[{
|
|
120
|
-
key: "company",
|
|
121
|
-
label: translations.company
|
|
122
|
-
}, {
|
|
123
|
-
key: "training",
|
|
124
|
-
label: translations.training
|
|
125
|
-
}, {
|
|
126
|
-
key: "tools",
|
|
127
|
-
label: translations.tools
|
|
128
|
-
}].map(({
|
|
129
|
-
key,
|
|
130
|
-
label
|
|
131
|
-
}) => ({
|
|
132
|
-
id: key,
|
|
133
|
-
label,
|
|
134
|
-
url: null,
|
|
135
|
-
subItems: footerContent[key].items.map(item => ({
|
|
136
|
-
id: item.id,
|
|
137
|
-
label: item.label,
|
|
138
|
-
url: item.src
|
|
139
|
-
}))
|
|
140
|
-
}))]
|
|
127
|
+
id: "categories",
|
|
128
|
+
items: categories.items
|
|
141
129
|
}, currentCountryName ? {
|
|
142
130
|
id: "country-selector",
|
|
143
131
|
items: [{
|
|
144
132
|
id: "current-country-name",
|
|
145
|
-
label:
|
|
133
|
+
label: translations.region,
|
|
134
|
+
value: currentCountryName,
|
|
146
135
|
icon: {
|
|
147
|
-
src:
|
|
136
|
+
src: asset.imageSrc(LocationPinIcon__default["default"]),
|
|
148
137
|
width: 17,
|
|
149
138
|
height: 17
|
|
150
139
|
},
|
|
151
|
-
url:
|
|
140
|
+
url: null,
|
|
141
|
+
onClick: () => {
|
|
152
142
|
handleStorePickerClick?.();
|
|
153
143
|
},
|
|
154
144
|
subItems: []
|
|
155
145
|
}]
|
|
156
|
-
} : null
|
|
157
|
-
|
|
158
|
-
|
|
146
|
+
} : null, ...(!hideExtraSection ? extraSectionItems.map(item => ({
|
|
147
|
+
id: `extra-${item.id}`,
|
|
148
|
+
items: [item]
|
|
149
|
+
})) : [])].filter(typeGuards.isNonNullish);
|
|
150
|
+
}, [translations.support, translations.social, translations.company, translations.training, translations.tools, translations.orderHistory, translations.purchasedProductHistory, translations.region, context$1, socialContent.items, handleOrderHistoryClick, handlePurchaseHistoryClick, categories.items, currentCountryName, handleStorePickerClick, hideExtraSection, footerContent]);
|
|
159
151
|
const renderSectionItemIcon = react.useCallback(item => {
|
|
160
152
|
return item.icon && /* @__PURE__ */jsxRuntime.jsx(ProMobileMenu_styles.SectionItemIcon, {
|
|
161
153
|
children: /* @__PURE__ */jsxRuntime.jsx(StyleableSvgImage.StyleableSvgImage, {
|
|
@@ -170,35 +162,40 @@ const NavigationProMobileMenu = function NavigationProMobileMenu2({
|
|
|
170
162
|
const NewLabelNode = "isNew" in item && item.isNew ? /* @__PURE__ */jsxRuntime.jsx(MobileMenu_styles.NewLabel, {
|
|
171
163
|
children: translations.new
|
|
172
164
|
}) : null;
|
|
165
|
+
const ValueNode = !!item.value && /* @__PURE__ */jsxRuntime.jsx("div", {
|
|
166
|
+
children: item.value
|
|
167
|
+
});
|
|
173
168
|
const target = "targetBlank" in item && item.targetBlank ? "_blank" : void 0;
|
|
174
169
|
const url = item.url;
|
|
175
170
|
if (!url) {
|
|
176
|
-
return /* @__PURE__ */jsxRuntime.jsxs(
|
|
171
|
+
return /* @__PURE__ */jsxRuntime.jsxs(ProMobileMenu_styles.ProSectionItemButton, {
|
|
177
172
|
motif,
|
|
178
|
-
onClick:
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
as: "a",
|
|
186
|
-
href: url,
|
|
187
|
-
onClick: onClose,
|
|
188
|
-
target,
|
|
189
|
-
children: [IconNode, item.label, NewLabelNode]
|
|
173
|
+
onClick: e => {
|
|
174
|
+
item.onClick?.(e, url);
|
|
175
|
+
toggleExpandedSectionItemId(item.id);
|
|
176
|
+
},
|
|
177
|
+
children: [/* @__PURE__ */jsxRuntime.jsxs(ProMobileMenu_styles.ButtonContent, {
|
|
178
|
+
children: [IconNode, item.label, NewLabelNode]
|
|
179
|
+
}), ValueNode]
|
|
190
180
|
});
|
|
191
181
|
}
|
|
192
182
|
return /* @__PURE__ */jsxRuntime.jsxs(MobileMenu_styles.SectionItemButton, {
|
|
193
183
|
motif,
|
|
194
|
-
onClick:
|
|
195
|
-
url
|
|
184
|
+
onClick: e => {
|
|
185
|
+
item.onClick?.(e, url);
|
|
196
186
|
onClose();
|
|
197
187
|
},
|
|
198
|
-
|
|
188
|
+
...(typeof url === "string" ? {
|
|
189
|
+
as: "a",
|
|
190
|
+
href: url,
|
|
191
|
+
target
|
|
192
|
+
} : {}),
|
|
193
|
+
children: [/* @__PURE__ */jsxRuntime.jsxs(ProMobileMenu_styles.ButtonContent, {
|
|
194
|
+
children: [IconNode, item.label, NewLabelNode]
|
|
195
|
+
}), ValueNode]
|
|
199
196
|
});
|
|
200
197
|
}, [onClose, renderSectionItemIcon, toggleExpandedSectionItemId, translations.new]);
|
|
201
|
-
return /* @__PURE__ */jsxRuntime.jsx(
|
|
198
|
+
return /* @__PURE__ */jsxRuntime.jsx(ProMobileMenu_styles.Wrap, {
|
|
202
199
|
motif,
|
|
203
200
|
children: /* @__PURE__ */jsxRuntime.jsx(MobileMenu_styles.Container, {
|
|
204
201
|
size: "mobile",
|