@ubnt/store.core 9.59.0-beta.0 → 9.59.0-new-design
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 +113 -565
- package/lib/_virtual/_virtual_multi-entry.js +15 -25
- package/lib/_virtual/_virtual_multi-entry.js.map +1 -1
- package/lib/_virtual/_virtual_multi-entry.mjs +13 -13
- package/lib/apis/smartcat.d.ts +12 -2
- package/lib/apis/smartcat.js +27 -4
- package/lib/apis/smartcat.js.map +1 -1
- package/lib/apis/smartcat.mjs +27 -4
- package/lib/apis/smartcat.mjs.map +1 -1
- package/lib/assets/cart-secondary.svg +5 -0
- package/lib/assets/close2.svg +2 -3
- package/lib/assets/close3.svg +3 -2
- package/lib/assets/icon-location-pin.svg +5 -0
- package/lib/assets/icons/{menu/icon-globe.svg.js → cart-secondary.svg.js} +6 -6
- package/lib/assets/icons/cart-secondary.svg.js.map +1 -0
- package/lib/assets/icons/cart-secondary.svg.mjs +3 -0
- package/lib/assets/icons/cart-secondary.svg.mjs.map +1 -0
- package/lib/{components/ModelCompareV3/assets/crestron.svg.js → assets/icons/menu/icon-location-pin.svg.js} +6 -6
- 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/logoUnifi.svg +10 -2
- package/lib/assets/minus4.svg +8 -8
- package/lib/assets/minus5.svg +8 -8
- package/lib/assets/pause.svg +3 -3
- package/lib/assets/pause2.svg +3 -3
- package/lib/assets/plus5.svg +9 -9
- package/lib/assets/plus6.svg +9 -9
- package/lib/assets/ucgMax.jpg +0 -0
- package/lib/assets/ucgMax2.jpg +0 -0
- package/lib/assets/ucgUltra.jpg +0 -0
- package/lib/assets/ucgUltra2.jpg +0 -0
- package/lib/assets/udmPro.jpg +0 -0
- package/lib/assets/udmPro2.jpg +0 -0
- package/lib/assets/udmProMax.jpg +0 -0
- package/lib/assets/udmProMax2.jpg +0 -0
- package/lib/assets/udmProSpecial.jpg +0 -0
- package/lib/assets/udmProSpecial2.jpg +0 -0
- package/lib/components/Accordion/Accordion.js +4 -4
- package/lib/components/Avatar/Avatar.js +2 -2
- package/lib/components/Button/Button.js +12 -5
- package/lib/components/Button/Button.js.map +1 -1
- package/lib/components/Button/Button.mjs +8 -1
- package/lib/components/Button/Button.mjs.map +1 -1
- package/lib/components/Button/CartButton.d.ts +3 -1
- package/lib/components/Button/CartButton.js +11 -6
- package/lib/components/Button/CartButton.js.map +1 -1
- package/lib/components/Button/CartButton.mjs +8 -4
- package/lib/components/Button/CartButton.mjs.map +1 -1
- package/lib/components/ButtonGroup/ButtonGroup.d.ts +1 -1
- package/lib/components/ButtonGroup/ButtonGroup.js +16 -9
- package/lib/components/ButtonGroup/ButtonGroup.js.map +1 -1
- package/lib/components/ButtonGroup/ButtonGroup.mjs +16 -9
- package/lib/components/ButtonGroup/ButtonGroup.mjs.map +1 -1
- package/lib/components/ButtonGroup/ButtonGroup.styles.d.ts +10 -6
- package/lib/components/ButtonGroup/ButtonGroup.styles.js +60 -20
- package/lib/components/ButtonGroup/ButtonGroup.styles.js.map +1 -1
- package/lib/components/ButtonGroup/ButtonGroup.styles.mjs +60 -20
- package/lib/components/ButtonGroup/ButtonGroup.styles.mjs.map +1 -1
- package/lib/components/ButtonGroup/ButtonGroup.types.d.ts +5 -0
- package/lib/components/ButtonGroupBasic/index.stories.d.ts +6 -0
- package/lib/components/CardSection/Card/Card.js +6 -6
- package/lib/components/CardSection/CardSection.js +3 -4
- package/lib/components/CardSection/CardSection.js.map +1 -1
- package/lib/components/CardSection/CardSection.mjs +1 -2
- package/lib/components/CardSection/CardSection.mjs.map +1 -1
- package/lib/components/CardSection/CardSection.styles.d.ts +1 -1
- package/lib/components/CartIcon/CartIcon.js +2 -2
- package/lib/components/CategoryTabs/CategoryTabs.styles.d.ts +4 -2
- package/lib/components/CategoryTabs/CategoryTabs.styles.js +8 -5
- package/lib/components/CategoryTabs/CategoryTabs.styles.js.map +1 -1
- package/lib/components/CategoryTabs/CategoryTabs.styles.mjs +7 -6
- package/lib/components/CategoryTabs/CategoryTabs.styles.mjs.map +1 -1
- package/lib/components/Checkbox/Checkbox.js +4 -4
- package/lib/components/CloserLookSection/CloserLookSection.js +11 -11
- package/lib/components/CloserLookSection/RecommendedAddons/RecommendedAddons.js +5 -5
- package/lib/components/Compare/Compare.styles.d.ts +5 -5
- package/lib/components/Container/Container.d.ts +1 -1
- package/lib/components/Container/Container.js +5 -4
- 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/Container/index.stories.d.ts +5 -5
- package/lib/components/CustomImage/CustomImage.js +12 -12
- package/lib/components/Explore/Explore.js +5 -5
- package/lib/components/FeaturesSection_deprecated/Features/Features.js +2 -2
- package/lib/components/FeaturesSection_deprecated/FeaturesSection.js +23 -23
- 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/Footer/Footer.js +2 -2
- package/lib/components/Footer/hooks/useFooterContent.js +5 -5
- package/lib/components/Gallery/Gallery.context.js +17 -17
- package/lib/components/Gallery/Gallery.js +9 -9
- package/lib/components/Gallery/GalleryControls/GalleryControls.js +4 -4
- package/lib/components/Gallery/GalleryItem/GalleryItem.js +8 -8
- package/lib/components/Gallery/GalleryThumbnails/GalleryThumbnails.js +8 -8
- package/lib/components/GridGallery/GridGallery.js +8 -8
- package/lib/components/GridGallery/GridModal/GridModal.js +6 -6
- package/lib/components/Header/AccountFrame/AccountFrame.js +11 -11
- package/lib/components/Header/AccountFrame/Mobile/Mobile.js +4 -4
- package/lib/components/Header/AccountMenu/AccountMenu.js +30 -20
- 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/CartModal/Empty/Empty.js +3 -3
- package/lib/components/Header/CartModalV2/CartModal.js +5 -5
- package/lib/components/Header/CartModalV2/Item/Item.js +4 -4
- package/lib/components/Header/CartModalV2/Item/Item.styles.d.ts +1 -1
- package/lib/components/Header/Header.js +40 -40
- 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.stories.d.ts +111 -0
- package/lib/components/Header/Header.styles.d.ts +7 -12
- package/lib/components/Header/Header.styles.js +10 -32
- package/lib/components/Header/Header.styles.js.map +1 -1
- package/lib/components/Header/Header.styles.mjs +10 -31
- package/lib/components/Header/Header.styles.mjs.map +1 -1
- package/lib/components/Header/Header.types.d.ts +29 -5
- 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/IsolatedHeader.d.ts +1 -0
- package/lib/components/Header/IsolatedHeader.js +50 -50
- package/lib/components/Header/IsolatedHeader.js.map +1 -1
- package/lib/components/Header/IsolatedHeader.mjs +47 -46
- package/lib/components/Header/IsolatedHeader.mjs.map +1 -1
- package/lib/components/Header/LanguageFrame/LanguageFrame.js +6 -6
- package/lib/components/Header/LogoIcon/LogoIcon.d.ts +7 -0
- package/lib/components/Header/LogoIcon/LogoIcon.js +46 -0
- package/lib/components/Header/LogoIcon/LogoIcon.js.map +1 -0
- package/lib/components/Header/LogoIcon/LogoIcon.mjs +36 -0
- package/lib/components/Header/LogoIcon/LogoIcon.mjs.map +1 -0
- package/lib/components/Header/LogoIcon/index.d.ts +1 -0
- package/lib/components/Header/LogoIcon/index.js +6 -0
- package/lib/components/Header/LogoIcon/index.js.map +1 -0
- package/lib/components/Header/LogoIcon/index.mjs +3 -0
- package/lib/components/Header/LogoIcon/index.mjs.map +1 -0
- 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/Carousel/Carousel.js +5 -5
- package/lib/components/Header/Navigation/MicrositeMenu/MicrositeMenu.js +12 -12
- package/lib/components/Header/Navigation/MicrositeMenu/MicrositeMenu.styles.d.ts +1 -1
- package/lib/components/Header/Navigation/MobileMenu/MobileMenu.js +6 -6
- package/lib/components/Header/Navigation/MobileMenu/MobileMenu.styles.d.ts +1 -1
- package/lib/components/Header/Navigation/ProMobileMenu/ProMobileMenu.d.ts +1 -1
- package/lib/components/Header/Navigation/ProMobileMenu/ProMobileMenu.js +116 -109
- package/lib/components/Header/Navigation/ProMobileMenu/ProMobileMenu.js.map +1 -1
- package/lib/components/Header/Navigation/ProMobileMenu/ProMobileMenu.mjs +111 -104
- 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 +12 -6
- package/lib/components/Header/Overlay/Overlay.js +3 -3
- package/lib/components/Header/ProHeader/ProHeader.d.ts +9 -5
- package/lib/components/Header/ProHeader/ProHeader.js +270 -189
- package/lib/components/Header/ProHeader/ProHeader.js.map +1 -1
- package/lib/components/Header/ProHeader/ProHeader.mjs +251 -171
- package/lib/components/Header/ProHeader/ProHeader.mjs.map +1 -1
- package/lib/components/Header/ProHeader/ProHeader.styles.d.ts +30 -25
- package/lib/components/Header/ProHeader/ProHeader.styles.js +119 -66
- package/lib/components/Header/ProHeader/ProHeader.styles.js.map +1 -1
- package/lib/components/Header/ProHeader/ProHeader.styles.mjs +112 -65
- 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 +7 -1
- package/lib/components/Header/translations/en.json.js.map +1 -1
- package/lib/components/Header/translations/en.json.mjs +6 -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.js +5 -5
- package/lib/components/Hero/Hero.styles.d.ts +2 -2
- package/lib/components/HeroFadeGallery/HeroFadeGallery.styles.d.ts +1 -1
- package/lib/components/HeroVideo/HeroVideo.js +5 -5
- package/lib/components/HowToUseSection/HowToUseSection.styles.d.ts +2 -2
- package/lib/components/ImageCarousel/ImageCarousel.js +30 -30
- package/lib/components/ImageSequence/ImageSequence.js +8 -8
- package/lib/components/LandingPage/Cards/Card/Card.js +4 -4
- package/lib/components/LandingPage/Cards/Cards.js +10 -10
- package/lib/components/LandingPage/LandingPage.js +2 -2
- package/lib/components/LandingPagePro/LandingPagePro.js +13 -13
- package/lib/components/LandingPagePro/LandingPagePro.styles.d.ts +1 -1
- package/lib/components/LandingPageSearch/LandingPageSearch.js +2 -2
- package/lib/components/LandingPageSearch/Modal/Modal.js +9 -9
- package/lib/components/LandingPageSidebar/LandingPageSidebar.js +12 -12
- package/lib/components/LayoutRenderer/LayoutRenderer.js +8 -8
- package/lib/components/LayoutRenderer/LayoutRenderer.styles.d.ts +1 -1
- package/lib/components/LayoutRendererV1/LayoutRenderer.styles.d.ts +3 -3
- package/lib/components/LayoutRendererV2/LayoutRenderer.styles.d.ts +3 -3
- package/lib/components/LoaderDots/LoaderDots.d.ts +1 -1
- package/lib/components/LoaderDots/LoaderDots.js +3 -1
- package/lib/components/LoaderDots/LoaderDots.js.map +1 -1
- package/lib/components/LoaderDots/LoaderDots.mjs +3 -1
- package/lib/components/LoaderDots/LoaderDots.mjs.map +1 -1
- package/lib/components/LoaderDots/LoaderDots.styles.d.ts +2 -1
- package/lib/components/LoaderDots/LoaderDots.styles.js +11 -1
- package/lib/components/LoaderDots/LoaderDots.styles.js.map +1 -1
- package/lib/components/LoaderDots/LoaderDots.styles.mjs +11 -1
- package/lib/components/LoaderDots/LoaderDots.styles.mjs.map +1 -1
- package/lib/components/LoaderDots/LoaderDots.types.d.ts +2 -0
- package/lib/components/MeetUniFiVideoPlayer/EpisodeCard/EpisodeCard.js +7 -7
- package/lib/components/MeetUniFiVideoPlayer/MeetUniFiVideoPlayer.js +18 -18
- package/lib/components/MeetUniFiVideoPlayer/MeetUniFiVideoPlayer.styles.d.ts +1 -1
- package/lib/components/MicrositeColumnFeatureProgressBar/MicrositeColumnFeatureProgressBar.js +2 -2
- package/lib/components/MicrositeFeatureChecklist/MicrositeFeatureChecklist.js +3 -3
- package/lib/components/MicrositeFeatureProgressBar/MicrositeFeatureProgressBar.js +3 -3
- package/lib/components/MicrositeHero/MicrositeHero.js +18 -18
- package/lib/components/MicrositeIntroductionBlock/MicrositeIntroductionBlock.js +4 -4
- package/lib/components/MicrositeMediaGrid/MicrositeMediaGrid.js +9 -9
- package/lib/components/MicrositeProductGrid/MicrositeProductGrid.js +8 -8
- package/lib/components/MicrositeProductLearnMoreBlock/MicrositeProductLearnMoreBlockWrap.js +2 -2
- package/lib/components/MicrositeSectionWrap/MicrositeSectionWrap.styles.d.ts +1 -1
- package/lib/components/MicrositeSubSubNavigation/MicrositeSubSubNavigation.js +3 -3
- package/lib/components/MicrositeVideoSlideshow/MicrositeVideoSlideshow.js +13 -13
- 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/Microsites/MicrositePageContext.js +2 -2
- package/lib/components/Microsites/MicrositeProductPage.js +3 -3
- package/lib/components/Microsites/context/MicrositeProductPageContext.js +3 -3
- package/lib/components/MobileModal/MobileModal.js +4 -4
- package/lib/components/Modal/Modal.js +3 -3
- package/lib/components/ModelCompareV3/ModelCompareOverflowScrollButton.js +3 -3
- package/lib/components/ModelCompareV3/ModelComparePropertyValueGridItem.js +2 -2
- package/lib/components/ModelCompareV3/ModelCompareV3.js +14 -14
- package/lib/components/ModelCompareV3/ModelCompareV3.types.d.ts +0 -1
- package/lib/components/ModelCompareV3/ProductGroupsGrid.js +3 -3
- package/lib/components/ModelCompareV3/ScrollGroup/ScrollGroup.js +5 -5
- package/lib/components/ModelCompareV3/ScrollGroup/context.js +3 -3
- package/lib/components/ModelCompareV3/ScrollGroup/useScrollGroupItem.js +8 -8
- package/lib/components/ModelCompareV3/ScrollGroup/useScrollGroupSetScroll.js +2 -2
- package/lib/components/ModelCompareV3/ScrollGroup/useScrollGroupTo.js +2 -2
- package/lib/components/ModelCompareV3/StickyGrid/StickyGrid.js +7 -7
- package/lib/components/ModelCompareV3/StickyGrid/StickyGridBody.js +2 -2
- package/lib/components/ModelCompareV3/StickyGrid/StickyGridHeader.js +5 -5
- package/lib/components/ModelCompareV3/StickyGrid/StickyGridItem.js +2 -2
- package/lib/components/ModelCompareV3/StickyGrid/context.js +3 -3
- package/lib/components/ModelCompareV3/assets/Consoles/bigCompare/ucgMax.jpg.js +5 -5
- package/lib/components/ModelCompareV3/assets/Consoles/bigCompare/ucgMax.jpg.mjs +2 -2
- package/lib/components/ModelCompareV3/assets/Consoles/bigCompare/ucgUltra.jpg.js +5 -5
- package/lib/components/ModelCompareV3/assets/Consoles/bigCompare/ucgUltra.jpg.mjs +2 -2
- package/lib/components/ModelCompareV3/assets/Consoles/bigCompare/udmPro.jpg.js +5 -5
- package/lib/components/ModelCompareV3/assets/Consoles/bigCompare/udmPro.jpg.mjs +2 -2
- package/lib/components/ModelCompareV3/assets/Consoles/bigCompare/udmProMax.jpg.js +5 -5
- package/lib/components/ModelCompareV3/assets/Consoles/bigCompare/udmProMax.jpg.mjs +2 -2
- package/lib/components/ModelCompareV3/assets/Consoles/bigCompare/udmProSpecial.jpg.js +5 -5
- package/lib/components/ModelCompareV3/assets/Consoles/bigCompare/udmProSpecial.jpg.mjs +2 -2
- package/lib/components/ModelCompareV3/assets/Consoles/ucgMax.jpg.js +1 -1
- package/lib/components/ModelCompareV3/assets/Consoles/ucgMax.jpg.mjs +2 -2
- package/lib/components/ModelCompareV3/assets/Consoles/ucgUltra.jpg.js +1 -1
- package/lib/components/ModelCompareV3/assets/Consoles/ucgUltra.jpg.mjs +2 -2
- package/lib/components/ModelCompareV3/assets/Consoles/udmPro.jpg.js +1 -1
- package/lib/components/ModelCompareV3/assets/Consoles/udmPro.jpg.mjs +2 -2
- package/lib/components/ModelCompareV3/assets/Consoles/udmProMax.jpg.js +1 -1
- package/lib/components/ModelCompareV3/assets/Consoles/udmProMax.jpg.mjs +2 -2
- package/lib/components/ModelCompareV3/assets/Consoles/udmProSpecial.jpg.js +1 -1
- package/lib/components/ModelCompareV3/assets/Consoles/udmProSpecial.jpg.mjs +2 -2
- package/lib/components/ModelCompareV3/data/CloudGateways.js +15 -15
- package/lib/components/ModelCompareV3/data/CloudGateways.mjs +10 -10
- package/lib/components/ModelCompareV3/data/EnterpriseSwitching.js +2 -3
- package/lib/components/ModelCompareV3/data/EnterpriseSwitching.js.map +1 -1
- package/lib/components/ModelCompareV3/data/EnterpriseSwitching.mjs +2 -3
- package/lib/components/ModelCompareV3/data/EnterpriseSwitching.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/ProfessionalMaxSwitching.js +3 -10
- package/lib/components/ModelCompareV3/data/ProfessionalMaxSwitching.js.map +1 -1
- package/lib/components/ModelCompareV3/data/ProfessionalMaxSwitching.mjs +3 -10
- package/lib/components/ModelCompareV3/data/ProfessionalMaxSwitching.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/Switching.js +2 -3
- package/lib/components/ModelCompareV3/data/Switching.js.map +1 -1
- package/lib/components/ModelCompareV3/data/Switching.mjs +2 -3
- package/lib/components/ModelCompareV3/data/Switching.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/products/aggregation.js +0 -7
- package/lib/components/ModelCompareV3/data/products/aggregation.js.map +1 -1
- package/lib/components/ModelCompareV3/data/products/aggregation.mjs +0 -7
- package/lib/components/ModelCompareV3/data/products/aggregation.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/products/cloudKeyEnterprise.js +1 -1
- package/lib/components/ModelCompareV3/data/products/cloudKeyEnterprise.js.map +1 -1
- package/lib/components/ModelCompareV3/data/products/cloudKeyEnterprise.mjs +1 -1
- package/lib/components/ModelCompareV3/data/products/cloudKeyEnterprise.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/products/enterpriseAggregation.js +0 -7
- package/lib/components/ModelCompareV3/data/products/enterpriseAggregation.js.map +1 -1
- package/lib/components/ModelCompareV3/data/products/enterpriseAggregation.mjs +0 -7
- package/lib/components/ModelCompareV3/data/products/enterpriseAggregation.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/products/enterpriseCampus24PoE.js +0 -7
- package/lib/components/ModelCompareV3/data/products/enterpriseCampus24PoE.js.map +1 -1
- package/lib/components/ModelCompareV3/data/products/enterpriseCampus24PoE.mjs +0 -7
- package/lib/components/ModelCompareV3/data/products/enterpriseCampus24PoE.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/products/enterpriseCampus48PoE.js +0 -7
- package/lib/components/ModelCompareV3/data/products/enterpriseCampus48PoE.js.map +1 -1
- package/lib/components/ModelCompareV3/data/products/enterpriseCampus48PoE.mjs +0 -7
- package/lib/components/ModelCompareV3/data/products/enterpriseCampus48PoE.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/products/highCapacityAggregation.js +0 -7
- package/lib/components/ModelCompareV3/data/products/highCapacityAggregation.js.map +1 -1
- package/lib/components/ModelCompareV3/data/products/highCapacityAggregation.mjs +0 -7
- package/lib/components/ModelCompareV3/data/products/highCapacityAggregation.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/products/missionCritical.js +0 -7
- package/lib/components/ModelCompareV3/data/products/missionCritical.js.map +1 -1
- package/lib/components/ModelCompareV3/data/products/missionCritical.mjs +0 -7
- package/lib/components/ModelCompareV3/data/products/missionCritical.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/products/professionalHd24.js +0 -7
- package/lib/components/ModelCompareV3/data/products/professionalHd24.js.map +1 -1
- package/lib/components/ModelCompareV3/data/products/professionalHd24.mjs +0 -7
- package/lib/components/ModelCompareV3/data/products/professionalHd24.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/products/professionalHd24Poe.js +0 -7
- package/lib/components/ModelCompareV3/data/products/professionalHd24Poe.js.map +1 -1
- package/lib/components/ModelCompareV3/data/products/professionalHd24Poe.mjs +0 -7
- package/lib/components/ModelCompareV3/data/products/professionalHd24Poe.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/products/professionalMax16.js +0 -7
- package/lib/components/ModelCompareV3/data/products/professionalMax16.js.map +1 -1
- package/lib/components/ModelCompareV3/data/products/professionalMax16.mjs +0 -7
- package/lib/components/ModelCompareV3/data/products/professionalMax16.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/products/professionalMax16PoE.js +0 -7
- package/lib/components/ModelCompareV3/data/products/professionalMax16PoE.js.map +1 -1
- package/lib/components/ModelCompareV3/data/products/professionalMax16PoE.mjs +0 -7
- package/lib/components/ModelCompareV3/data/products/professionalMax16PoE.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/products/professionalMax24.js +0 -7
- package/lib/components/ModelCompareV3/data/products/professionalMax24.js.map +1 -1
- package/lib/components/ModelCompareV3/data/products/professionalMax24.mjs +0 -7
- package/lib/components/ModelCompareV3/data/products/professionalMax24.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/products/professionalMax24PoE.js +0 -7
- package/lib/components/ModelCompareV3/data/products/professionalMax24PoE.js.map +1 -1
- package/lib/components/ModelCompareV3/data/products/professionalMax24PoE.mjs +0 -7
- package/lib/components/ModelCompareV3/data/products/professionalMax24PoE.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/products/professionalMax48.js +0 -7
- package/lib/components/ModelCompareV3/data/products/professionalMax48.js.map +1 -1
- package/lib/components/ModelCompareV3/data/products/professionalMax48.mjs +0 -7
- package/lib/components/ModelCompareV3/data/products/professionalMax48.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/products/professionalMax48PoE.js +0 -7
- package/lib/components/ModelCompareV3/data/products/professionalMax48PoE.js.map +1 -1
- package/lib/components/ModelCompareV3/data/products/professionalMax48PoE.mjs +0 -7
- package/lib/components/ModelCompareV3/data/products/professionalMax48PoE.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/products/switchesEnterprise.js +0 -8
- package/lib/components/ModelCompareV3/data/products/switchesEnterprise.js.map +1 -1
- package/lib/components/ModelCompareV3/data/products/switchesEnterprise.mjs +0 -8
- package/lib/components/ModelCompareV3/data/products/switchesEnterprise.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/products/switchesProfessional.js +0 -7
- package/lib/components/ModelCompareV3/data/products/switchesProfessional.js.map +1 -1
- package/lib/components/ModelCompareV3/data/products/switchesProfessional.mjs +0 -7
- package/lib/components/ModelCompareV3/data/products/switchesProfessional.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/products/switchesProfessionalHd.js +0 -7
- package/lib/components/ModelCompareV3/data/products/switchesProfessionalHd.js.map +1 -1
- package/lib/components/ModelCompareV3/data/products/switchesProfessionalHd.mjs +0 -7
- package/lib/components/ModelCompareV3/data/products/switchesProfessionalHd.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/products/switchesProfessionalMax.js +1 -10
- package/lib/components/ModelCompareV3/data/products/switchesProfessionalMax.js.map +1 -1
- package/lib/components/ModelCompareV3/data/products/switchesProfessionalMax.mjs +1 -10
- package/lib/components/ModelCompareV3/data/products/switchesProfessionalMax.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/products/switchesStandard.js +0 -7
- package/lib/components/ModelCompareV3/data/products/switchesStandard.js.map +1 -1
- package/lib/components/ModelCompareV3/data/products/switchesStandard.mjs +0 -7
- package/lib/components/ModelCompareV3/data/products/switchesStandard.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/products/ucgMax.js +1 -1
- package/lib/components/ModelCompareV3/data/products/ucgMax.mjs +1 -1
- package/lib/components/ModelCompareV3/data/products/ucgUltra.js +1 -1
- package/lib/components/ModelCompareV3/data/products/ucgUltra.mjs +1 -1
- package/lib/components/ModelCompareV3/data/products/udmPro.js +1 -1
- package/lib/components/ModelCompareV3/data/products/udmPro.mjs +1 -1
- 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/ModelCompareV3/data/properties/index.d.ts +0 -1
- package/lib/components/ModelCompareV3/data/properties/index.js +0 -2
- package/lib/components/ModelCompareV3/data/properties/index.js.map +1 -1
- package/lib/components/ModelCompareV3/data/properties/index.mjs +0 -1
- package/lib/components/ModelCompareV3/data/properties/index.mjs.map +1 -1
- package/lib/components/ModelCompareV3/translations/ar.json.js +10 -10
- package/lib/components/ModelCompareV3/translations/ar.json.mjs +10 -10
- package/lib/components/ModelCompareV3/translations/de.json.js +2 -2
- package/lib/components/ModelCompareV3/translations/de.json.mjs +2 -2
- package/lib/components/ModelCompareV3/translations/el.json.js +1 -1
- package/lib/components/ModelCompareV3/translations/el.json.mjs +1 -1
- package/lib/components/ModelCompareV3/translations/en.json.js +1 -3
- package/lib/components/ModelCompareV3/translations/en.json.js.map +1 -1
- package/lib/components/ModelCompareV3/translations/en.json.mjs +1 -3
- package/lib/components/ModelCompareV3/translations/en.json.mjs.map +1 -1
- package/lib/components/ModelCompareV3/translations/es.json.js +2 -2
- package/lib/components/ModelCompareV3/translations/es.json.mjs +2 -2
- package/lib/components/ModelCompareV3/translations/fr.json.js +1 -1
- package/lib/components/ModelCompareV3/translations/fr.json.mjs +1 -1
- package/lib/components/ModelCompareV3/translations/it.json.js +1 -1
- package/lib/components/ModelCompareV3/translations/it.json.mjs +1 -1
- package/lib/components/ModelCompareV3/translations/ja.json.js +7 -7
- package/lib/components/ModelCompareV3/translations/ja.json.mjs +7 -7
- package/lib/components/ModelCompareV3/translations/pt-BR.json.js +1 -1
- package/lib/components/ModelCompareV3/translations/pt-BR.json.mjs +1 -1
- package/lib/components/ModelCompareV3/translations/useModelCompareTranslation.d.ts +2 -2
- package/lib/components/ModelCompareV3/translations/zh-Hans.json.js +5 -5
- package/lib/components/ModelCompareV3/translations/zh-Hans.json.mjs +5 -5
- package/lib/components/ModelCompareV3/translations/zh-Hant-TW.json.js +8 -8
- package/lib/components/ModelCompareV3/translations/zh-Hant-TW.json.mjs +8 -8
- package/lib/components/Pagination/Pagination.js +3 -3
- package/lib/components/PriceRangeSlider/PriceRangeSlider.js +16 -16
- package/lib/components/ProductCard/ProductCard.js +7 -7
- package/lib/components/ProductCardPopup/ProductCardPopup.js +8 -8
- package/lib/components/ProductCompare/ProductCompare.js +7 -7
- package/lib/components/ProductDetails/ProductDetails.js +5 -5
- package/lib/components/ProductGrid/ProductGrid.js +10 -10
- package/lib/components/ProductKeyFeatures/ProductKeyFeatures.js +3 -3
- package/lib/components/ProductSectionNavigation/ProductSectionNavigation.styles.d.ts +1 -1
- package/lib/components/ProductSectionNavigationV2/ProductSectionNavigation.styles.d.ts +1 -1
- package/lib/components/ProductSectionTabs/ProductSectionTabs.js +2 -2
- package/lib/components/ProductTechSpecs/ProductTechSpecs.styles.d.ts +2 -2
- package/lib/components/ProductTechSpecsV2/ProductTechSpecs.d.ts +2 -0
- package/lib/components/ProductTechSpecsV2/ProductTechSpecs.js +79 -0
- package/lib/components/ProductTechSpecsV2/ProductTechSpecs.js.map +1 -0
- package/lib/components/ProductTechSpecsV2/ProductTechSpecs.mjs +71 -0
- package/lib/components/ProductTechSpecsV2/ProductTechSpecs.mjs.map +1 -0
- package/lib/components/ProductTechSpecsV2/ProductTechSpecs.stories.d.ts +5 -0
- package/lib/components/ProductTechSpecsV2/ProductTechSpecs.styles.d.ts +11 -0
- package/lib/components/ProductTechSpecsV2/ProductTechSpecs.styles.js +86 -0
- package/lib/components/ProductTechSpecsV2/ProductTechSpecs.styles.js.map +1 -0
- package/lib/components/ProductTechSpecsV2/ProductTechSpecs.styles.mjs +72 -0
- package/lib/components/ProductTechSpecsV2/ProductTechSpecs.styles.mjs.map +1 -0
- package/lib/components/ProductTechSpecsV2/ProductTechSpecs.types.d.ts +12 -0
- package/lib/components/ProductTechSpecsV2/index.d.ts +1 -0
- package/lib/components/ProductTechSpecsV2/index.js +6 -0
- package/lib/components/ProductTechSpecsV2/index.js.map +1 -0
- package/lib/components/ProductTechSpecsV2/index.mjs +3 -0
- package/lib/components/ProductTechSpecsV2/index.mjs.map +1 -0
- package/lib/components/ProductWizard/Options/Options.js +3 -3
- package/lib/components/ProductWizard/ProductWizard.js +2 -2
- package/lib/components/ProductWizardFootnotes/ProductWizardFootnotes.js +5 -5
- package/lib/components/ProgressCircle/ProgressCircle.js +4 -4
- package/lib/components/QuantityControls/QuantityControls.js +6 -6
- package/lib/components/QuantityControls/QuantityControls.js.map +1 -1
- package/lib/components/QuantityControls/QuantityControls.mjs +2 -2
- package/lib/components/QuantityControls/QuantityControls.mjs.map +1 -1
- package/lib/components/QuantityControls/QuantityControls.types.d.ts +1 -1
- package/lib/components/QuantityInput/QuantityInput.js +6 -1
- package/lib/components/QuantityInput/QuantityInput.js.map +1 -1
- package/lib/components/QuantityInput/QuantityInput.mjs +6 -1
- package/lib/components/QuantityInput/QuantityInput.mjs.map +1 -1
- package/lib/components/RelatedProducts/RelatedProducts.js +5 -5
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/ComputeResourceCalculator.js +36 -36
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/DeviceSelect/DeviceSelect.js +12 -12
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/InputCard/InputCard.js +5 -5
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/InputCard/InputSections/CheckboxSection.js +2 -2
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/InputCard/InputSections/CounterSection.js +6 -6
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/InputCard/InputSections/CounterSection.mjs +2 -2
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/InputCard/InputSections/SliderSection.js +3 -3
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/InputCard/assets/minus.svg.js +1 -1
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/InputCard/assets/minus.svg.mjs +2 -2
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/InputCard/assets/plus.svg.js +1 -1
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/InputCard/assets/plus.svg.mjs +2 -2
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/ProgressBarChart/ProgressBarChart.js +7 -7
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/useComputeResourceCalculator.js +6 -6
- package/lib/components/ResourceCalculatorV1/PoeCalculator/PoeCalculator.js +9 -9
- package/lib/components/ResourceCalculatorV1/PoeCalculator/components/PoeConsumerConfigurator/PoeConsumerConfigurator.js +10 -10
- package/lib/components/ResourceCalculatorV1/PoeCalculator/components/PoeConsumerConfigurator/PoeConsumerSelectModal/PoeConsumerSelectModal.js +17 -17
- package/lib/components/ResourceCalculatorV1/PoeCalculator/components/PoeConsumerConfigurator/PoeConsumerSelectModal/PoeConsumerSelectModal.mjs +2 -2
- package/lib/components/ResourceCalculatorV1/PoeCalculator/components/PoeConsumerConfigurator/assets/minus.svg.js +1 -1
- package/lib/components/ResourceCalculatorV1/PoeCalculator/components/PoeConsumerConfigurator/assets/minus.svg.mjs +2 -2
- package/lib/components/ResourceCalculatorV1/PoeCalculator/components/PoeConsumerConfigurator/assets/plus.svg.js +1 -1
- package/lib/components/ResourceCalculatorV1/PoeCalculator/components/PoeConsumerConfigurator/assets/plus.svg.mjs +2 -2
- package/lib/components/ResourceCalculatorV1/PoeCalculator/components/RecommendedPoeSwitches/RecommendedPoeSwitches.js +2 -2
- package/lib/components/ResourceCalculatorV1/ResourceCalculator.js +6 -6
- package/lib/components/ReverseLoopingVideo/ReverseLoopingVideo.js +5 -5
- package/lib/components/ScrollWrapper/ScrollWrapper.d.ts +1 -1
- package/lib/components/ScrollWrapper/ScrollWrapper.js +32 -94
- package/lib/components/ScrollWrapper/ScrollWrapper.js.map +1 -1
- package/lib/components/ScrollWrapper/ScrollWrapper.mjs +15 -77
- package/lib/components/ScrollWrapper/ScrollWrapper.mjs.map +1 -1
- package/lib/components/ScrollWrapper/ScrollWrapper.styles.d.ts +1 -3
- package/lib/components/ScrollWrapper/ScrollWrapper.styles.js +0 -10
- package/lib/components/ScrollWrapper/ScrollWrapper.styles.js.map +1 -1
- package/lib/components/ScrollWrapper/ScrollWrapper.styles.mjs +0 -10
- package/lib/components/ScrollWrapper/ScrollWrapper.styles.mjs.map +1 -1
- package/lib/components/ScrollWrapper/ScrollWrapper.types.d.ts +2 -4
- package/lib/components/Search/Input/Input.d.ts +1 -1
- package/lib/components/Search/Input/Input.js +8 -8
- package/lib/components/Search/Input/Input.js.map +1 -1
- package/lib/components/Search/Input/Input.mjs +4 -4
- package/lib/components/Search/Input/Input.mjs.map +1 -1
- package/lib/components/Search/Input/Input.styles.js +0 -1
- package/lib/components/Search/Input/Input.styles.js.map +1 -1
- package/lib/components/Search/Input/Input.styles.mjs +0 -1
- package/lib/components/Search/Input/Input.styles.mjs.map +1 -1
- package/lib/components/Search/Input/Input.types.d.ts +3 -2
- package/lib/components/Search/Modal/Modal.js +3 -3
- package/lib/components/StorageSliders/Slider/Slider.js +3 -3
- package/lib/components/StorageSliders/StorageSliders.context.js +20 -20
- package/lib/components/StorageSliders/StorageSliders.js +4 -4
- package/lib/components/Tooltip/Tooltip.js +5 -5
- package/lib/components/VariantSelector/Variant/Compatibility/Compatibility.js +7 -7
- package/lib/components/VariantSelector/Variant/Variant.js +40 -40
- package/lib/components/VariantSelector/VariantSelector.js +16 -16
- package/lib/components/VideoPlayerNew/VideoPlayer.js +21 -21
- 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/icons/options/colors/black.svg.js +5 -5
- package/lib/constants/icons/options/colors/index.js +3 -3
- package/lib/constants/icons/options/styles/black.svg.js +5 -5
- package/lib/constants/icons/options/styles/index.js +3 -3
- package/lib/constants/optionIcons.js +6 -6
- package/lib/constants/optionIcons.mjs +4 -4
- package/lib/constants/proStoreCategories/mapping/filters.d.ts +17 -0
- package/lib/constants/proStoreCategories/mapping/filters.js +17 -0
- package/lib/constants/proStoreCategories/mapping/filters.js.map +1 -1
- package/lib/constants/proStoreCategories/mapping/filters.mjs +17 -0
- package/lib/constants/proStoreCategories/mapping/filters.mjs.map +1 -1
- package/lib/constants/proStoreCategories/mapping/index.d.ts +2 -0
- package/lib/constants/proStoreCategories/mapping/index.js +20 -6
- package/lib/constants/proStoreCategories/mapping/index.js.map +1 -1
- package/lib/constants/proStoreCategories/mapping/index.mjs +20 -6
- package/lib/constants/proStoreCategories/mapping/index.mjs.map +1 -1
- package/lib/constants/proStoreCategories/mapping/mapping.d.ts +5 -0
- package/lib/constants/proStoreCategories/mapping/unifi.d.ts +2 -0
- package/lib/constants/proStoreCategories/mapping/unifi.js +2 -0
- package/lib/constants/proStoreCategories/mapping/unifi.js.map +1 -1
- package/lib/constants/proStoreCategories/mapping/unifi.mjs +2 -0
- package/lib/constants/proStoreCategories/mapping/unifi.mjs.map +1 -1
- package/lib/constants/proStoreCategories/translations/ar.json.js +5 -4
- package/lib/constants/proStoreCategories/translations/ar.json.js.map +1 -1
- package/lib/constants/proStoreCategories/translations/ar.json.mjs +5 -4
- package/lib/constants/proStoreCategories/translations/ar.json.mjs.map +1 -1
- package/lib/constants/proStoreCategories/translations/de.json.js +5 -4
- package/lib/constants/proStoreCategories/translations/de.json.js.map +1 -1
- package/lib/constants/proStoreCategories/translations/de.json.mjs +5 -4
- package/lib/constants/proStoreCategories/translations/de.json.mjs.map +1 -1
- package/lib/constants/proStoreCategories/translations/el.json.js +6 -5
- package/lib/constants/proStoreCategories/translations/el.json.js.map +1 -1
- package/lib/constants/proStoreCategories/translations/el.json.mjs +6 -5
- package/lib/constants/proStoreCategories/translations/el.json.mjs.map +1 -1
- package/lib/constants/proStoreCategories/translations/en.json.js +5 -1
- package/lib/constants/proStoreCategories/translations/en.json.js.map +1 -1
- package/lib/constants/proStoreCategories/translations/en.json.mjs +5 -2
- package/lib/constants/proStoreCategories/translations/en.json.mjs.map +1 -1
- package/lib/constants/proStoreCategories/translations/es.json.js +5 -4
- package/lib/constants/proStoreCategories/translations/es.json.js.map +1 -1
- package/lib/constants/proStoreCategories/translations/es.json.mjs +5 -4
- package/lib/constants/proStoreCategories/translations/es.json.mjs.map +1 -1
- package/lib/constants/proStoreCategories/translations/fr.json.js +5 -1
- package/lib/constants/proStoreCategories/translations/fr.json.js.map +1 -1
- package/lib/constants/proStoreCategories/translations/fr.json.mjs +5 -2
- package/lib/constants/proStoreCategories/translations/fr.json.mjs.map +1 -1
- package/lib/constants/proStoreCategories/translations/it.json.js +5 -4
- package/lib/constants/proStoreCategories/translations/it.json.js.map +1 -1
- package/lib/constants/proStoreCategories/translations/it.json.mjs +5 -4
- package/lib/constants/proStoreCategories/translations/it.json.mjs.map +1 -1
- package/lib/constants/proStoreCategories/translations/ja.json.js +5 -4
- package/lib/constants/proStoreCategories/translations/ja.json.js.map +1 -1
- package/lib/constants/proStoreCategories/translations/ja.json.mjs +5 -4
- package/lib/constants/proStoreCategories/translations/ja.json.mjs.map +1 -1
- package/lib/constants/proStoreCategories/translations/pt-BR.json.js +5 -4
- package/lib/constants/proStoreCategories/translations/pt-BR.json.js.map +1 -1
- package/lib/constants/proStoreCategories/translations/pt-BR.json.mjs +5 -4
- package/lib/constants/proStoreCategories/translations/pt-BR.json.mjs.map +1 -1
- package/lib/constants/proStoreCategories/translations/zh-Hans.json.js +5 -1
- package/lib/constants/proStoreCategories/translations/zh-Hans.json.js.map +1 -1
- package/lib/constants/proStoreCategories/translations/zh-Hans.json.mjs +5 -2
- package/lib/constants/proStoreCategories/translations/zh-Hans.json.mjs.map +1 -1
- package/lib/constants/proStoreCategories/translations/zh-Hant-TW.json.js +5 -1
- package/lib/constants/proStoreCategories/translations/zh-Hant-TW.json.js.map +1 -1
- package/lib/constants/proStoreCategories/translations/zh-Hant-TW.json.mjs +5 -2
- package/lib/constants/proStoreCategories/translations/zh-Hant-TW.json.mjs.map +1 -1
- package/lib/constants/proStoreFilters/mapping.d.ts +43 -7
- package/lib/constants/proStoreFilters/mapping.js +129 -15
- package/lib/constants/proStoreFilters/mapping.js.map +1 -1
- package/lib/constants/proStoreFilters/mapping.mjs +129 -15
- package/lib/constants/proStoreFilters/mapping.mjs.map +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/constants/url.d.ts +1 -1
- package/lib/constants/url.js +1 -1
- package/lib/constants/url.js.map +1 -1
- package/lib/constants/url.mjs +1 -1
- package/lib/constants/url.mjs.map +1 -1
- package/lib/contexts/MenuContext/context.js +34 -34
- package/lib/contexts/MenuContext/context.js.map +1 -1
- package/lib/contexts/MenuContext/context.mjs +1 -1
- package/lib/contexts/MenuContext/context.mjs.map +1 -1
- package/lib/contexts/MenuContext/mapping.js.map +1 -1
- package/lib/contexts/MenuContext/mapping.mjs.map +1 -1
- package/lib/contexts/MenuContext/presets.d.ts +1 -1
- package/lib/contexts/MenuContext/presets.js +2 -4
- package/lib/contexts/MenuContext/presets.js.map +1 -1
- package/lib/contexts/MenuContext/presets.mjs +2 -4
- package/lib/contexts/MenuContext/presets.mjs.map +1 -1
- package/lib/helpers/index.d.ts +0 -1
- package/lib/helpers/index.js +1 -11
- package/lib/helpers/index.js.map +1 -1
- package/lib/helpers/index.mjs +1 -2
- package/lib/helpers/index.mjs.map +1 -1
- package/lib/helpers/proStoreCategories.js +2 -2
- package/lib/helpers/ux.d.ts +8 -0
- 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/hooks/useHasTouch.js +3 -3
- package/lib/hooks/useHddRetentionCalculator.js +5 -5
- package/lib/hooks/useHorizontalScroll.js +2 -2
- package/lib/hooks/useLockBodyScrollCustom.js +3 -3
- package/lib/hooks/useScrollToY.js +2 -2
- package/lib/hooks/useTestMediaElementVolumeSetter.js +3 -3
- package/lib/hooks/useTranslation.js +6 -6
- package/lib/types/generated.d.ts +1 -1
- package/lib/types/generated.js.map +1 -1
- package/lib/types/generated.mjs.map +1 -1
- package/lib/types/index.d.ts +0 -1
- package/lib/types/index.js +0 -2
- package/lib/types/index.js.map +1 -1
- package/lib/types/index.mjs +0 -1
- package/lib/types/index.mjs.map +1 -1
- package/lib/utils/address.d.ts +62 -278
- package/lib/utils/address.js +8 -11
- package/lib/utils/address.js.map +1 -1
- package/lib/utils/address.mjs +8 -11
- package/lib/utils/address.mjs.map +1 -1
- package/lib/utils/array.d.ts +0 -4
- package/lib/utils/array.js +0 -10
- package/lib/utils/array.js.map +1 -1
- package/lib/utils/array.mjs +1 -10
- package/lib/utils/array.mjs.map +1 -1
- package/lib/utils/nextjs/ssr/registry.js +2 -2
- package/package.json +42 -42
- package/lib/assets/crestron.svg +0 -3
- 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/CardSection/CardSection.stories.d.ts +0 -7
- package/lib/components/ModelCompareV3/assets/crestron.svg.js.map +0 -1
- package/lib/components/ModelCompareV3/assets/crestron.svg.mjs +0 -3
- package/lib/components/ModelCompareV3/assets/crestron.svg.mjs.map +0 -1
- package/lib/components/ModelCompareV3/data/properties/crestronNaxNvxCertified.d.ts +0 -2
- package/lib/components/ModelCompareV3/data/properties/crestronNaxNvxCertified.js +0 -18
- package/lib/components/ModelCompareV3/data/properties/crestronNaxNvxCertified.js.map +0 -1
- package/lib/components/ModelCompareV3/data/properties/crestronNaxNvxCertified.mjs +0 -10
- package/lib/components/ModelCompareV3/data/properties/crestronNaxNvxCertified.mjs.map +0 -1
- package/lib/helpers/product.d.ts +0 -87
- package/lib/helpers/product.js +0 -346
- package/lib/helpers/product.js.map +0 -1
- package/lib/helpers/product.mjs +0 -335
- package/lib/helpers/product.mjs.map +0 -1
- package/lib/helpers/product.test.d.ts +0 -1
- package/lib/types/product.d.ts +0 -87
- package/lib/types/product.js +0 -14
- package/lib/types/product.js.map +0 -1
- package/lib/types/product.mjs +0 -13
- package/lib/types/product.mjs.map +0 -1
- package/lib/utils/productSort.d.ts +0 -41
- package/lib/utils/productSort.js +0 -67
- package/lib/utils/productSort.js.map +0 -1
- package/lib/utils/productSort.mjs +0 -60
- package/lib/utils/productSort.mjs.map +0 -1
- package/lib/utils/validations/lastNameSuperRefinement.d.ts +0 -11
- package/lib/utils/validations/lastNameSuperRefinement.js +0 -25
- package/lib/utils/validations/lastNameSuperRefinement.js.map +0 -1
- package/lib/utils/validations/lastNameSuperRefinement.mjs +0 -21
- package/lib/utils/validations/lastNameSuperRefinement.mjs.map +0 -1
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
4
|
+
var React = require('react');
|
|
5
|
+
var typeGuards = require('../../utils/typeGuards.js');
|
|
6
|
+
var ProductTechSpecs_styles = require('./ProductTechSpecs.styles.js');
|
|
7
|
+
function _interopDefault(e) {
|
|
8
|
+
return e && e.__esModule ? e : {
|
|
9
|
+
default: e
|
|
10
|
+
};
|
|
11
|
+
}
|
|
12
|
+
var React__default = /*#__PURE__*/_interopDefault(React);
|
|
13
|
+
"use strict";
|
|
14
|
+
const ProductTechSpecs = ({
|
|
15
|
+
sections
|
|
16
|
+
}) => {
|
|
17
|
+
const renderFeatureValue = React.useCallback(value => {
|
|
18
|
+
return /* @__PURE__ */jsxRuntime.jsx(ProductTechSpecs_styles.Cell, {
|
|
19
|
+
dangerouslySetInnerHTML: {
|
|
20
|
+
__html: value
|
|
21
|
+
}
|
|
22
|
+
});
|
|
23
|
+
}, []);
|
|
24
|
+
const parsedSections = React.useMemo(() => {
|
|
25
|
+
return sections.map(section => {
|
|
26
|
+
const {
|
|
27
|
+
withParentId,
|
|
28
|
+
withoutParentId
|
|
29
|
+
} = section.features.reduce((acc, feature) => {
|
|
30
|
+
if (feature.parentId === null) {
|
|
31
|
+
acc.withoutParentId.push(feature);
|
|
32
|
+
} else {
|
|
33
|
+
acc.withParentId.push(feature);
|
|
34
|
+
}
|
|
35
|
+
return acc;
|
|
36
|
+
}, {
|
|
37
|
+
withParentId: [],
|
|
38
|
+
withoutParentId: []
|
|
39
|
+
});
|
|
40
|
+
const features = withoutParentId.map(parentFeature => {
|
|
41
|
+
const children = withParentId.filter(childFeature => childFeature.parentId === parentFeature.id);
|
|
42
|
+
const mappedFeature = {
|
|
43
|
+
...parentFeature,
|
|
44
|
+
children
|
|
45
|
+
};
|
|
46
|
+
return mappedFeature.children.length > 0 || !!mappedFeature.value ? mappedFeature : null;
|
|
47
|
+
}).filter(typeGuards.isNonNullish);
|
|
48
|
+
return {
|
|
49
|
+
id: section.id,
|
|
50
|
+
label: section.label,
|
|
51
|
+
features
|
|
52
|
+
};
|
|
53
|
+
}).filter(section => section.features.length > 0);
|
|
54
|
+
}, [sections]);
|
|
55
|
+
return /* @__PURE__ */jsxRuntime.jsx(ProductTechSpecs_styles.Wrap, {
|
|
56
|
+
children: parsedSections.map((section, i) => /* @__PURE__ */jsxRuntime.jsxs(React__default["default"].Fragment, {
|
|
57
|
+
children: [i > 0 && /* @__PURE__ */jsxRuntime.jsx(ProductTechSpecs_styles.SectionDivider, {}), /* @__PURE__ */jsxRuntime.jsx(ProductTechSpecs_styles.Row, {
|
|
58
|
+
children: /* @__PURE__ */jsxRuntime.jsx(ProductTechSpecs_styles.Heading, {
|
|
59
|
+
children: section.label
|
|
60
|
+
})
|
|
61
|
+
}), section.features.map(feature => /* @__PURE__ */jsxRuntime.jsxs(React__default["default"].Fragment, {
|
|
62
|
+
children: [/* @__PURE__ */jsxRuntime.jsxs(ProductTechSpecs_styles.Row, {
|
|
63
|
+
children: [/* @__PURE__ */jsxRuntime.jsx(ProductTechSpecs_styles.Cell, {
|
|
64
|
+
children: feature.label
|
|
65
|
+
}), feature.value && renderFeatureValue(feature.value)]
|
|
66
|
+
}, feature.id), feature.children.length > 0 && feature.children.map((childFeature, i2) => /* @__PURE__ */jsxRuntime.jsxs(ProductTechSpecs_styles.Row, {
|
|
67
|
+
children: [/* @__PURE__ */jsxRuntime.jsx(ProductTechSpecs_styles.Tree, {
|
|
68
|
+
$isLast: i2 === feature.children.length - 1
|
|
69
|
+
}), /* @__PURE__ */jsxRuntime.jsx(ProductTechSpecs_styles.Branch, {}), /* @__PURE__ */jsxRuntime.jsx(ProductTechSpecs_styles.Cell, {
|
|
70
|
+
$isChildRowFirstCell: true,
|
|
71
|
+
children: childFeature.label
|
|
72
|
+
}), childFeature.value && renderFeatureValue(childFeature.value)]
|
|
73
|
+
}, childFeature.id))]
|
|
74
|
+
}, feature.id))]
|
|
75
|
+
}, section.id))
|
|
76
|
+
});
|
|
77
|
+
};
|
|
78
|
+
exports.ProductTechSpecs = ProductTechSpecs;
|
|
79
|
+
//# sourceMappingURL=ProductTechSpecs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ProductTechSpecs.js","sources":["../../../src/components/ProductTechSpecsV2/ProductTechSpecs.tsx"],"sourcesContent":["import React, { useCallback, useMemo } from \"react\";\n\nimport { isNonNullish } from \"../../utils/typeGuards\";\nimport * as S from \"./ProductTechSpecs.styles\";\nimport type { ProductTechSpecsProps } from \"./ProductTechSpecs.types\";\n\nexport const ProductTechSpecs = ({\n sections,\n}: ProductTechSpecsProps): JSX.Element => {\n /**\n * Break value into lines\n */\n const renderFeatureValue = useCallback((value: string): JSX.Element => {\n return <S.Cell dangerouslySetInnerHTML={{ __html: value }} />;\n }, []);\n\n const parsedSections = useMemo(() => {\n return sections\n .map((section) => {\n const { withParentId, withoutParentId } = section.features.reduce<{\n withParentId: ProductTechSpecsProps[\"sections\"][number][\"features\"];\n withoutParentId: ProductTechSpecsProps[\"sections\"][number][\"features\"];\n }>(\n (acc, feature) => {\n if (feature.parentId === null) {\n acc.withoutParentId.push(feature);\n } else {\n acc.withParentId.push(feature);\n }\n return acc;\n },\n { withParentId: [], withoutParentId: [] },\n );\n\n const features = withoutParentId\n .map((parentFeature) => {\n const children = withParentId.filter(\n (childFeature) => childFeature.parentId === parentFeature.id,\n );\n\n const mappedFeature = {\n ...parentFeature,\n children,\n };\n\n return mappedFeature.children.length > 0 || !!mappedFeature.value\n ? mappedFeature\n : null;\n })\n .filter(isNonNullish);\n\n return {\n id: section.id,\n label: section.label,\n features,\n };\n })\n .filter((section) => section.features.length > 0);\n }, [sections]);\n\n return (\n <S.Wrap>\n {parsedSections.map((section, i) => (\n <React.Fragment key={section.id}>\n {i > 0 && <S.SectionDivider />}\n {/* Section heading */}\n <S.Row>\n <S.Heading>{section.label}</S.Heading>\n </S.Row>\n\n {/* Section feature key value pairs */}\n {section.features.map((feature) => (\n <React.Fragment key={feature.id}>\n <S.Row key={feature.id}>\n <S.Cell>{feature.label}</S.Cell>\n {feature.value && renderFeatureValue(feature.value)}\n </S.Row>\n\n {/* Child features */}\n {feature.children.length > 0 &&\n feature.children.map((childFeature, i) => (\n <S.Row key={childFeature.id}>\n <S.Tree $isLast={i === feature.children.length - 1} />\n <S.Branch />\n\n <S.Cell $isChildRowFirstCell>{childFeature.label}</S.Cell>\n {childFeature.value &&\n renderFeatureValue(childFeature.value)}\n </S.Row>\n ))}\n </React.Fragment>\n ))}\n </React.Fragment>\n ))}\n </S.Wrap>\n );\n};\n"],"names":["ProductTechSpecs","sections","renderFeatureValue","useCallback","value","jsx","S.Cell","dangerouslySetInnerHTML","__html","parsedSections","useMemo","map","section","withParentId","withoutParentId","features","reduce","acc","feature","parentId","push","parentFeature","children","filter","childFeature","id","mappedFeature","length","isNonNullish","label","S.Wrap","Wrap","i","jsxs","React","Fragment","S.SectionDivider","S.Row","Row","S.Heading","S.Tree","$isLast","S.Branch","Branch","Cell","$isChildRowFirstCell"],"mappings":"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"}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
2
|
+
import React, { useCallback, useMemo } from 'react';
|
|
3
|
+
import { isNonNullish } from '../../utils/typeGuards.mjs';
|
|
4
|
+
import { Cell, Wrap, SectionDivider, Row, Heading, Tree, Branch } from './ProductTechSpecs.styles.mjs';
|
|
5
|
+
"use strict";
|
|
6
|
+
const ProductTechSpecs = ({
|
|
7
|
+
sections
|
|
8
|
+
}) => {
|
|
9
|
+
const renderFeatureValue = useCallback(value => {
|
|
10
|
+
return /* @__PURE__ */jsx(Cell, {
|
|
11
|
+
dangerouslySetInnerHTML: {
|
|
12
|
+
__html: value
|
|
13
|
+
}
|
|
14
|
+
});
|
|
15
|
+
}, []);
|
|
16
|
+
const parsedSections = useMemo(() => {
|
|
17
|
+
return sections.map(section => {
|
|
18
|
+
const {
|
|
19
|
+
withParentId,
|
|
20
|
+
withoutParentId
|
|
21
|
+
} = section.features.reduce((acc, feature) => {
|
|
22
|
+
if (feature.parentId === null) {
|
|
23
|
+
acc.withoutParentId.push(feature);
|
|
24
|
+
} else {
|
|
25
|
+
acc.withParentId.push(feature);
|
|
26
|
+
}
|
|
27
|
+
return acc;
|
|
28
|
+
}, {
|
|
29
|
+
withParentId: [],
|
|
30
|
+
withoutParentId: []
|
|
31
|
+
});
|
|
32
|
+
const features = withoutParentId.map(parentFeature => {
|
|
33
|
+
const children = withParentId.filter(childFeature => childFeature.parentId === parentFeature.id);
|
|
34
|
+
const mappedFeature = {
|
|
35
|
+
...parentFeature,
|
|
36
|
+
children
|
|
37
|
+
};
|
|
38
|
+
return mappedFeature.children.length > 0 || !!mappedFeature.value ? mappedFeature : null;
|
|
39
|
+
}).filter(isNonNullish);
|
|
40
|
+
return {
|
|
41
|
+
id: section.id,
|
|
42
|
+
label: section.label,
|
|
43
|
+
features
|
|
44
|
+
};
|
|
45
|
+
}).filter(section => section.features.length > 0);
|
|
46
|
+
}, [sections]);
|
|
47
|
+
return /* @__PURE__ */jsx(Wrap, {
|
|
48
|
+
children: parsedSections.map((section, i) => /* @__PURE__ */jsxs(React.Fragment, {
|
|
49
|
+
children: [i > 0 && /* @__PURE__ */jsx(SectionDivider, {}), /* @__PURE__ */jsx(Row, {
|
|
50
|
+
children: /* @__PURE__ */jsx(Heading, {
|
|
51
|
+
children: section.label
|
|
52
|
+
})
|
|
53
|
+
}), section.features.map(feature => /* @__PURE__ */jsxs(React.Fragment, {
|
|
54
|
+
children: [/* @__PURE__ */jsxs(Row, {
|
|
55
|
+
children: [/* @__PURE__ */jsx(Cell, {
|
|
56
|
+
children: feature.label
|
|
57
|
+
}), feature.value && renderFeatureValue(feature.value)]
|
|
58
|
+
}, feature.id), feature.children.length > 0 && feature.children.map((childFeature, i2) => /* @__PURE__ */jsxs(Row, {
|
|
59
|
+
children: [/* @__PURE__ */jsx(Tree, {
|
|
60
|
+
$isLast: i2 === feature.children.length - 1
|
|
61
|
+
}), /* @__PURE__ */jsx(Branch, {}), /* @__PURE__ */jsx(Cell, {
|
|
62
|
+
$isChildRowFirstCell: true,
|
|
63
|
+
children: childFeature.label
|
|
64
|
+
}), childFeature.value && renderFeatureValue(childFeature.value)]
|
|
65
|
+
}, childFeature.id))]
|
|
66
|
+
}, feature.id))]
|
|
67
|
+
}, section.id))
|
|
68
|
+
});
|
|
69
|
+
};
|
|
70
|
+
export { ProductTechSpecs };
|
|
71
|
+
//# sourceMappingURL=ProductTechSpecs.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ProductTechSpecs.mjs","sources":["../../../src/components/ProductTechSpecsV2/ProductTechSpecs.tsx"],"sourcesContent":["import React, { useCallback, useMemo } from \"react\";\n\nimport { isNonNullish } from \"../../utils/typeGuards\";\nimport * as S from \"./ProductTechSpecs.styles\";\nimport type { ProductTechSpecsProps } from \"./ProductTechSpecs.types\";\n\nexport const ProductTechSpecs = ({\n sections,\n}: ProductTechSpecsProps): JSX.Element => {\n /**\n * Break value into lines\n */\n const renderFeatureValue = useCallback((value: string): JSX.Element => {\n return <S.Cell dangerouslySetInnerHTML={{ __html: value }} />;\n }, []);\n\n const parsedSections = useMemo(() => {\n return sections\n .map((section) => {\n const { withParentId, withoutParentId } = section.features.reduce<{\n withParentId: ProductTechSpecsProps[\"sections\"][number][\"features\"];\n withoutParentId: ProductTechSpecsProps[\"sections\"][number][\"features\"];\n }>(\n (acc, feature) => {\n if (feature.parentId === null) {\n acc.withoutParentId.push(feature);\n } else {\n acc.withParentId.push(feature);\n }\n return acc;\n },\n { withParentId: [], withoutParentId: [] },\n );\n\n const features = withoutParentId\n .map((parentFeature) => {\n const children = withParentId.filter(\n (childFeature) => childFeature.parentId === parentFeature.id,\n );\n\n const mappedFeature = {\n ...parentFeature,\n children,\n };\n\n return mappedFeature.children.length > 0 || !!mappedFeature.value\n ? mappedFeature\n : null;\n })\n .filter(isNonNullish);\n\n return {\n id: section.id,\n label: section.label,\n features,\n };\n })\n .filter((section) => section.features.length > 0);\n }, [sections]);\n\n return (\n <S.Wrap>\n {parsedSections.map((section, i) => (\n <React.Fragment key={section.id}>\n {i > 0 && <S.SectionDivider />}\n {/* Section heading */}\n <S.Row>\n <S.Heading>{section.label}</S.Heading>\n </S.Row>\n\n {/* Section feature key value pairs */}\n {section.features.map((feature) => (\n <React.Fragment key={feature.id}>\n <S.Row key={feature.id}>\n <S.Cell>{feature.label}</S.Cell>\n {feature.value && renderFeatureValue(feature.value)}\n </S.Row>\n\n {/* Child features */}\n {feature.children.length > 0 &&\n feature.children.map((childFeature, i) => (\n <S.Row key={childFeature.id}>\n <S.Tree $isLast={i === feature.children.length - 1} />\n <S.Branch />\n\n <S.Cell $isChildRowFirstCell>{childFeature.label}</S.Cell>\n {childFeature.value &&\n renderFeatureValue(childFeature.value)}\n </S.Row>\n ))}\n </React.Fragment>\n ))}\n </React.Fragment>\n ))}\n </S.Wrap>\n );\n};\n"],"names":["ProductTechSpecs","sections","renderFeatureValue","useCallback","value","jsx","S.Cell","dangerouslySetInnerHTML","__html","parsedSections","useMemo","map","section","withParentId","withoutParentId","features","reduce","acc","feature","parentId","push","parentFeature","children","filter","childFeature","id","mappedFeature","length","isNonNullish","label","S.Wrap","i","jsxs","React","Fragment","S.SectionDivider","S.Row","S.Heading","S.Tree","$isLast","S.Branch","$isChildRowFirstCell"],"mappings":"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"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { Meta } from "@storybook/react";
|
|
2
|
+
import { ProductTechSpecs } from "./ProductTechSpecs";
|
|
3
|
+
declare const _default: Meta<typeof ProductTechSpecs>;
|
|
4
|
+
export default _default;
|
|
5
|
+
export declare const Base: import("@storybook/core/types").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, import("./ProductTechSpecs.types").ProductTechSpecsProps>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export declare const Wrap: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
2
|
+
export declare const Row: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
3
|
+
export declare const Heading: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
4
|
+
export declare const SectionDivider: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
5
|
+
export declare const Cell: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {
|
|
6
|
+
$isChildRowFirstCell?: boolean;
|
|
7
|
+
}, never>;
|
|
8
|
+
export declare const Tree: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {
|
|
9
|
+
$isLast: boolean;
|
|
10
|
+
}, never>;
|
|
11
|
+
export declare const Branch: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var styled = require('styled-components');
|
|
4
|
+
var layout = require('../../constants/layout.js');
|
|
5
|
+
function _interopDefault(e) {
|
|
6
|
+
return e && e.__esModule ? e : {
|
|
7
|
+
default: e
|
|
8
|
+
};
|
|
9
|
+
}
|
|
10
|
+
var styled__default = /*#__PURE__*/_interopDefault(styled);
|
|
11
|
+
"use strict";
|
|
12
|
+
const TABLE_LEFT_MARGIN = "0px";
|
|
13
|
+
const TREE_LEFT_MARGIN = "8px";
|
|
14
|
+
const Wrap = styled__default["default"].div``;
|
|
15
|
+
const Row = styled__default["default"].div`
|
|
16
|
+
display: grid;
|
|
17
|
+
grid-template-columns: 300px 1fr;
|
|
18
|
+
position: relative;
|
|
19
|
+
padding-left: ${TABLE_LEFT_MARGIN};
|
|
20
|
+
|
|
21
|
+
@media ${layout.BREAKPOINTS.MOBILE_AND_DOWN} {
|
|
22
|
+
grid-template-columns: 170px 1fr;
|
|
23
|
+
}
|
|
24
|
+
`;
|
|
25
|
+
const Heading = styled__default["default"].div`
|
|
26
|
+
font-size: 20px;
|
|
27
|
+
line-height: 24px;
|
|
28
|
+
font-weight: 700;
|
|
29
|
+
color: #212427;
|
|
30
|
+
margin-bottom: 16px;
|
|
31
|
+
grid-column: 1 / 3;
|
|
32
|
+
`;
|
|
33
|
+
const SectionDivider = styled__default["default"].div`
|
|
34
|
+
height: 1px;
|
|
35
|
+
background-color: #dbdce1;
|
|
36
|
+
margin: 16px 0;
|
|
37
|
+
grid-column: 1 / 3;
|
|
38
|
+
`;
|
|
39
|
+
const Cell = styled__default["default"].div`
|
|
40
|
+
padding: 8px 28px 8px 0;
|
|
41
|
+
font-size: 14px;
|
|
42
|
+
line-height: 20px;
|
|
43
|
+
color: #50565e;
|
|
44
|
+
white-space: pre-wrap;
|
|
45
|
+
|
|
46
|
+
${({
|
|
47
|
+
$isChildRowFirstCell
|
|
48
|
+
}) => $isChildRowFirstCell && styled.css`
|
|
49
|
+
margin-left: 24px;
|
|
50
|
+
`}
|
|
51
|
+
`;
|
|
52
|
+
const Tree = styled__default["default"].div`
|
|
53
|
+
${({
|
|
54
|
+
$isLast
|
|
55
|
+
}) => $isLast ? styled.css`
|
|
56
|
+
height: 18px;
|
|
57
|
+
` : styled.css`
|
|
58
|
+
height: 100%;
|
|
59
|
+
`};
|
|
60
|
+
|
|
61
|
+
position: absolute;
|
|
62
|
+
top: 0;
|
|
63
|
+
left: calc(${TABLE_LEFT_MARGIN} + ${TREE_LEFT_MARGIN});
|
|
64
|
+
width: 1px;
|
|
65
|
+
background-color: #c5c5c5;
|
|
66
|
+
display: flex;
|
|
67
|
+
justify-content: center;
|
|
68
|
+
align-items: center;
|
|
69
|
+
z-index: 1;
|
|
70
|
+
`;
|
|
71
|
+
const Branch = styled__default["default"].div`
|
|
72
|
+
position: absolute;
|
|
73
|
+
left: calc(${TABLE_LEFT_MARGIN} + ${TREE_LEFT_MARGIN});
|
|
74
|
+
top: 17px;
|
|
75
|
+
width: 11px;
|
|
76
|
+
height: 1px;
|
|
77
|
+
background-color: #c5c5c5;
|
|
78
|
+
`;
|
|
79
|
+
exports.Branch = Branch;
|
|
80
|
+
exports.Cell = Cell;
|
|
81
|
+
exports.Heading = Heading;
|
|
82
|
+
exports.Row = Row;
|
|
83
|
+
exports.SectionDivider = SectionDivider;
|
|
84
|
+
exports.Tree = Tree;
|
|
85
|
+
exports.Wrap = Wrap;
|
|
86
|
+
//# sourceMappingURL=ProductTechSpecs.styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ProductTechSpecs.styles.js","sources":["../../../src/components/ProductTechSpecsV2/ProductTechSpecs.styles.tsx"],"sourcesContent":["import styled, { css } from \"styled-components\";\n\nimport { BREAKPOINTS } from \"../../constants/layout\";\n\nconst TABLE_LEFT_MARGIN = \"0px\";\nconst TREE_LEFT_MARGIN = \"8px\";\n\nexport const Wrap = styled.div``;\n\nexport const Row = styled.div`\n display: grid;\n grid-template-columns: 300px 1fr;\n position: relative;\n padding-left: ${TABLE_LEFT_MARGIN};\n\n @media ${BREAKPOINTS.MOBILE_AND_DOWN} {\n grid-template-columns: 170px 1fr;\n }\n`;\n\nexport const Heading = styled.div`\n font-size: 20px;\n line-height: 24px;\n font-weight: 700;\n color: #212427;\n margin-bottom: 16px;\n grid-column: 1 / 3;\n`;\n\nexport const SectionDivider = styled.div`\n height: 1px;\n background-color: #dbdce1;\n margin: 16px 0;\n grid-column: 1 / 3;\n`;\n\nexport const Cell = styled.div<{\n // Cell is a child and its the first item on the row.\n $isChildRowFirstCell?: boolean;\n}>`\n padding: 8px 28px 8px 0;\n font-size: 14px;\n line-height: 20px;\n color: #50565e;\n white-space: pre-wrap;\n\n ${({ $isChildRowFirstCell }) =>\n $isChildRowFirstCell &&\n css`\n margin-left: 24px;\n `}\n`;\n\nexport const Tree = styled.div<{\n $isLast: boolean;\n}>`\n ${({ $isLast }) =>\n $isLast\n ? css`\n height: 18px;\n `\n : css`\n height: 100%;\n `};\n\n position: absolute;\n top: 0;\n left: calc(${TABLE_LEFT_MARGIN} + ${TREE_LEFT_MARGIN});\n width: 1px;\n background-color: #c5c5c5;\n display: flex;\n justify-content: center;\n align-items: center;\n z-index: 1;\n`;\n\nexport const Branch = styled.div`\n position: absolute;\n left: calc(${TABLE_LEFT_MARGIN} + ${TREE_LEFT_MARGIN});\n top: 17px;\n width: 11px;\n height: 1px;\n background-color: #c5c5c5;\n`;\n"],"names":["TABLE_LEFT_MARGIN","TREE_LEFT_MARGIN","Wrap","styled","div","Row","BREAKPOINTS","MOBILE_AND_DOWN","Heading","SectionDivider","Cell","$isChildRowFirstCell","css","Tree","$isLast","Branch"],"mappings":";;;;;;;;;;;AAIA,MAAMA,iBAAoB,GAAA,KAAA;AAC1B,MAAMC,gBAAmB,GAAA,KAAA;AAElB,MAAMC,OAAOC,eAAAA,CAAAA,SAAAA,CAAO,CAAAC,GAAA,EAAA;AAEpB,MAAMC,MAAMF,eAAO,CAAA,SAAA,CAAA,CAAAC,GAAA;AAAA;AAAA;AAAA;AAAA,kBAIRJ,iBAAiB;AAAA;AAAA,WAExBM,MAAAA,CAAAA,YAAYC,eAAe;AAAA;AAAA;AAAA,CAAA;AAK/B,MAAMC,UAAUL,eAAO,CAAA,SAAA,CAAA,CAAAC,GAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,CAAA;AASvB,MAAMK,iBAAiBN,eAAO,CAAA,SAAA,CAAA,CAAAC,GAAA;AAAA;AAAA;AAAA;AAAA;AAAA,CAAA;AAO9B,MAAMM,OAAOP,eAAO,CAAA,SAAA,CAAA,CAAAC,GAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAUvB,CAAC;EAAEO;CAAqB,KACxBA,oBACA,IAAAC,MAAAA,CAAAA,GAAA;AAAA;AAAA,KAEC;AAAA,CAAA;AAGE,MAAMC,OAAOV,eAAO,CAAA,SAAA,CAAA,CAAAC,GAAA;AAAA,IAGvB,CAAC;EAAEU;CAAQ,KACXA,OACI,GAAAF,MAAAA,CAAAA,GAAA;AAAA;AAAA,SAGA,GAAAA,MAAAA,CAAAA,GAAA;AAAA;AAAA,SAEC;AAAA;AAAA;AAAA;AAAA,eAIMZ,iBAAiB,MAAMC,gBAAgB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,CAAA;AAS/C,MAAMc,SAASZ,eAAO,CAAA,SAAA,CAAA,CAAAC,GAAA;AAAA;AAAA,eAEdJ,iBAAiB,MAAMC,gBAAgB;AAAA;AAAA;AAAA;AAAA;AAAA,CAAA;;;;;;;"}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import styled, { css } from 'styled-components';
|
|
2
|
+
import { BREAKPOINTS } from '../../constants/layout.mjs';
|
|
3
|
+
"use strict";
|
|
4
|
+
const TABLE_LEFT_MARGIN = "0px";
|
|
5
|
+
const TREE_LEFT_MARGIN = "8px";
|
|
6
|
+
const Wrap = styled.div``;
|
|
7
|
+
const Row = styled.div`
|
|
8
|
+
display: grid;
|
|
9
|
+
grid-template-columns: 300px 1fr;
|
|
10
|
+
position: relative;
|
|
11
|
+
padding-left: ${TABLE_LEFT_MARGIN};
|
|
12
|
+
|
|
13
|
+
@media ${BREAKPOINTS.MOBILE_AND_DOWN} {
|
|
14
|
+
grid-template-columns: 170px 1fr;
|
|
15
|
+
}
|
|
16
|
+
`;
|
|
17
|
+
const Heading = styled.div`
|
|
18
|
+
font-size: 20px;
|
|
19
|
+
line-height: 24px;
|
|
20
|
+
font-weight: 700;
|
|
21
|
+
color: #212427;
|
|
22
|
+
margin-bottom: 16px;
|
|
23
|
+
grid-column: 1 / 3;
|
|
24
|
+
`;
|
|
25
|
+
const SectionDivider = styled.div`
|
|
26
|
+
height: 1px;
|
|
27
|
+
background-color: #dbdce1;
|
|
28
|
+
margin: 16px 0;
|
|
29
|
+
grid-column: 1 / 3;
|
|
30
|
+
`;
|
|
31
|
+
const Cell = styled.div`
|
|
32
|
+
padding: 8px 28px 8px 0;
|
|
33
|
+
font-size: 14px;
|
|
34
|
+
line-height: 20px;
|
|
35
|
+
color: #50565e;
|
|
36
|
+
white-space: pre-wrap;
|
|
37
|
+
|
|
38
|
+
${({
|
|
39
|
+
$isChildRowFirstCell
|
|
40
|
+
}) => $isChildRowFirstCell && css`
|
|
41
|
+
margin-left: 24px;
|
|
42
|
+
`}
|
|
43
|
+
`;
|
|
44
|
+
const Tree = styled.div`
|
|
45
|
+
${({
|
|
46
|
+
$isLast
|
|
47
|
+
}) => $isLast ? css`
|
|
48
|
+
height: 18px;
|
|
49
|
+
` : css`
|
|
50
|
+
height: 100%;
|
|
51
|
+
`};
|
|
52
|
+
|
|
53
|
+
position: absolute;
|
|
54
|
+
top: 0;
|
|
55
|
+
left: calc(${TABLE_LEFT_MARGIN} + ${TREE_LEFT_MARGIN});
|
|
56
|
+
width: 1px;
|
|
57
|
+
background-color: #c5c5c5;
|
|
58
|
+
display: flex;
|
|
59
|
+
justify-content: center;
|
|
60
|
+
align-items: center;
|
|
61
|
+
z-index: 1;
|
|
62
|
+
`;
|
|
63
|
+
const Branch = styled.div`
|
|
64
|
+
position: absolute;
|
|
65
|
+
left: calc(${TABLE_LEFT_MARGIN} + ${TREE_LEFT_MARGIN});
|
|
66
|
+
top: 17px;
|
|
67
|
+
width: 11px;
|
|
68
|
+
height: 1px;
|
|
69
|
+
background-color: #c5c5c5;
|
|
70
|
+
`;
|
|
71
|
+
export { Branch, Cell, Heading, Row, SectionDivider, Tree, Wrap };
|
|
72
|
+
//# sourceMappingURL=ProductTechSpecs.styles.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ProductTechSpecs.styles.mjs","sources":["../../../src/components/ProductTechSpecsV2/ProductTechSpecs.styles.tsx"],"sourcesContent":["import styled, { css } from \"styled-components\";\n\nimport { BREAKPOINTS } from \"../../constants/layout\";\n\nconst TABLE_LEFT_MARGIN = \"0px\";\nconst TREE_LEFT_MARGIN = \"8px\";\n\nexport const Wrap = styled.div``;\n\nexport const Row = styled.div`\n display: grid;\n grid-template-columns: 300px 1fr;\n position: relative;\n padding-left: ${TABLE_LEFT_MARGIN};\n\n @media ${BREAKPOINTS.MOBILE_AND_DOWN} {\n grid-template-columns: 170px 1fr;\n }\n`;\n\nexport const Heading = styled.div`\n font-size: 20px;\n line-height: 24px;\n font-weight: 700;\n color: #212427;\n margin-bottom: 16px;\n grid-column: 1 / 3;\n`;\n\nexport const SectionDivider = styled.div`\n height: 1px;\n background-color: #dbdce1;\n margin: 16px 0;\n grid-column: 1 / 3;\n`;\n\nexport const Cell = styled.div<{\n // Cell is a child and its the first item on the row.\n $isChildRowFirstCell?: boolean;\n}>`\n padding: 8px 28px 8px 0;\n font-size: 14px;\n line-height: 20px;\n color: #50565e;\n white-space: pre-wrap;\n\n ${({ $isChildRowFirstCell }) =>\n $isChildRowFirstCell &&\n css`\n margin-left: 24px;\n `}\n`;\n\nexport const Tree = styled.div<{\n $isLast: boolean;\n}>`\n ${({ $isLast }) =>\n $isLast\n ? css`\n height: 18px;\n `\n : css`\n height: 100%;\n `};\n\n position: absolute;\n top: 0;\n left: calc(${TABLE_LEFT_MARGIN} + ${TREE_LEFT_MARGIN});\n width: 1px;\n background-color: #c5c5c5;\n display: flex;\n justify-content: center;\n align-items: center;\n z-index: 1;\n`;\n\nexport const Branch = styled.div`\n position: absolute;\n left: calc(${TABLE_LEFT_MARGIN} + ${TREE_LEFT_MARGIN});\n top: 17px;\n width: 11px;\n height: 1px;\n background-color: #c5c5c5;\n`;\n"],"names":["TABLE_LEFT_MARGIN","TREE_LEFT_MARGIN","Wrap","styled","div","Row","BREAKPOINTS","MOBILE_AND_DOWN","Heading","SectionDivider","Cell","$isChildRowFirstCell","css","Tree","$isLast","Branch"],"mappings":";;;AAIA,MAAMA,iBAAoB,GAAA,KAAA;AAC1B,MAAMC,gBAAmB,GAAA,KAAA;AAElB,MAAMC,OAAOC,MAAO,CAAAC,GAAA,EAAA;AAEpB,MAAMC,MAAMF,MAAO,CAAAC,GAAA;AAAA;AAAA;AAAA;AAAA,kBAIRJ,iBAAiB;AAAA;AAAA,WAExBM,YAAYC,eAAe;AAAA;AAAA;AAAA,CAAA;AAK/B,MAAMC,UAAUL,MAAO,CAAAC,GAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,CAAA;AASvB,MAAMK,iBAAiBN,MAAO,CAAAC,GAAA;AAAA;AAAA;AAAA;AAAA;AAAA,CAAA;AAO9B,MAAMM,OAAOP,MAAO,CAAAC,GAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAUvB,CAAC;EAAEO;CAAqB,KACxBA,oBACA,IAAAC,GAAA;AAAA;AAAA,KAEC;AAAA,CAAA;AAGE,MAAMC,OAAOV,MAAO,CAAAC,GAAA;AAAA,IAGvB,CAAC;EAAEU;CAAQ,KACXA,OACI,GAAAF,GAAA;AAAA;AAAA,SAGA,GAAAA,GAAA;AAAA;AAAA,SAEC;AAAA;AAAA;AAAA;AAAA,eAIMZ,iBAAiB,MAAMC,gBAAgB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,CAAA;AAS/C,MAAMc,SAASZ,MAAO,CAAAC,GAAA;AAAA;AAAA,eAEdJ,iBAAiB,MAAMC,gBAAgB;AAAA;AAAA;AAAA;AAAA;AAAA,CAAA;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { ProductTechSpecs } from "./ProductTechSpecs";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var jsxRuntime = require('react/jsx-runtime');
|
|
4
|
-
var
|
|
4
|
+
var React = require('react');
|
|
5
5
|
var optionIcons = require('../../../constants/optionIcons.js');
|
|
6
6
|
var asset = require('../../../utils/asset.js');
|
|
7
7
|
require('../../ButtonGroup/index.js');
|
|
@@ -15,7 +15,7 @@ const ProductWizardOptions = function ProductWizardOptions2({
|
|
|
15
15
|
onlyIcons,
|
|
16
16
|
className
|
|
17
17
|
}) {
|
|
18
|
-
const getOptionIcon =
|
|
18
|
+
const getOptionIcon = React.useCallback((optionSlug, optionValueSlug) => {
|
|
19
19
|
const option = optionSlug.toLowerCase();
|
|
20
20
|
const value = optionValueSlug.toLowerCase();
|
|
21
21
|
const icon = optionIcons.OPTION_ICONS[option]?.[value];
|
|
@@ -24,7 +24,7 @@ const ProductWizardOptions = function ProductWizardOptions2({
|
|
|
24
24
|
}
|
|
25
25
|
return asset.imageSrc(icon);
|
|
26
26
|
}, []);
|
|
27
|
-
const getItemsWithIcons =
|
|
27
|
+
const getItemsWithIcons = React.useCallback(option => option.values.map(({
|
|
28
28
|
id,
|
|
29
29
|
title,
|
|
30
30
|
slug,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var jsxRuntime = require('react/jsx-runtime');
|
|
4
|
-
var
|
|
4
|
+
var React = require('react');
|
|
5
5
|
require('../../assets/icons/wizard/index.js');
|
|
6
6
|
require('../NormalisedImage/index.js');
|
|
7
7
|
require('../ProductWizardFootnotes/index.js');
|
|
@@ -43,7 +43,7 @@ const ProductWizard = function ProductWizard2({
|
|
|
43
43
|
updateQuantity,
|
|
44
44
|
translations
|
|
45
45
|
}) {
|
|
46
|
-
const addToCartBtnText =
|
|
46
|
+
const addToCartBtnText = React.useMemo(() => {
|
|
47
47
|
if (isVariantSoldOut) {
|
|
48
48
|
return translations.addToCartButton.soldOut;
|
|
49
49
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var jsxRuntime = require('react/jsx-runtime');
|
|
4
|
-
var
|
|
4
|
+
var React = require('react');
|
|
5
5
|
require('../../assets/icons/payment-apple-pay.svg.js');
|
|
6
6
|
require('../../assets/icons/payment-card.svg.js');
|
|
7
7
|
require('../../assets/icons/payment-google-pay.svg.js');
|
|
@@ -77,7 +77,7 @@ const ProductWizardFootnotes = ({
|
|
|
77
77
|
availablePaymentMethods,
|
|
78
78
|
renderImage
|
|
79
79
|
}) => {
|
|
80
|
-
const limitErrorNode =
|
|
80
|
+
const limitErrorNode = React.useMemo(() => {
|
|
81
81
|
if (limitsDisabled) {
|
|
82
82
|
return;
|
|
83
83
|
}
|
|
@@ -101,7 +101,7 @@ const ProductWizardFootnotes = ({
|
|
|
101
101
|
}
|
|
102
102
|
return void 0;
|
|
103
103
|
}, [limitsDisabled, requiresLogin, maxRelevantLimitAddToCartQuantity, showLimitError, translations.errors.limitedToBuy, translations.errors.limitReached, translations.errors.limitErrorPer]);
|
|
104
|
-
const getCardIcons =
|
|
104
|
+
const getCardIcons = React.useCallback(() => {
|
|
105
105
|
const hasPaymentMethods = availablePaymentMethods && Object.keys(availablePaymentMethods).filter(item => {
|
|
106
106
|
return !!availablePaymentMethods[item];
|
|
107
107
|
}).length > 0;
|
|
@@ -119,7 +119,7 @@ const ProductWizardFootnotes = ({
|
|
|
119
119
|
})
|
|
120
120
|
});
|
|
121
121
|
}, [availablePaymentMethods, renderImage]);
|
|
122
|
-
const footnotes =
|
|
122
|
+
const footnotes = React.useMemo(() => /* @__PURE__ */jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
123
123
|
children: [getCardIcons(), translations?.footnotes?.shipping?.loading ? /* @__PURE__ */jsxRuntime.jsx(ProductWizardFootnotes_styles.SkeletonFootnote, {
|
|
124
124
|
maxWidth: 120
|
|
125
125
|
}) : translations?.footnotes?.shipping?.value && /* @__PURE__ */jsxRuntime.jsxs(ProductWizardFootnotes_styles.IconTextWrap, {
|
|
@@ -144,7 +144,7 @@ const ProductWizardFootnotes = ({
|
|
|
144
144
|
})]
|
|
145
145
|
})]
|
|
146
146
|
}), [getCardIcons, translations.footnotes.shipping?.loading, translations.footnotes.shipping.value, translations.footnotes.warranty]);
|
|
147
|
-
const hasFootnotes =
|
|
147
|
+
const hasFootnotes = React.useMemo(() => !!footnotes.props.children.filter(child => !!child).length, [footnotes.props.children]);
|
|
148
148
|
if (!hasFootnotes && !enableLimitAndBackInStock && !limitErrorNode) {
|
|
149
149
|
return null;
|
|
150
150
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var jsxRuntime = require('react/jsx-runtime');
|
|
4
|
-
var
|
|
4
|
+
var React = require('react');
|
|
5
5
|
var theme = require('../../constants/theme.js');
|
|
6
6
|
"use strict";
|
|
7
7
|
const ProgressCircle = ({
|
|
@@ -13,9 +13,9 @@ const ProgressCircle = ({
|
|
|
13
13
|
backgroundColor = theme.theme.colors.white,
|
|
14
14
|
className
|
|
15
15
|
}) => {
|
|
16
|
-
const radius =
|
|
17
|
-
const circumference =
|
|
18
|
-
const strokeDashoffset =
|
|
16
|
+
const radius = React.useMemo(() => (diameter - strokeWidth) / 2, [diameter, strokeWidth]);
|
|
17
|
+
const circumference = React.useMemo(() => radius * 2 * Math.PI, [radius]);
|
|
18
|
+
const strokeDashoffset = React.useMemo(() => circumference - (value ? value / 100 : 0) * circumference, [circumference, value]);
|
|
19
19
|
return /* @__PURE__ */jsxRuntime.jsxs("svg", {
|
|
20
20
|
className,
|
|
21
21
|
width: diameter,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var jsxRuntime = require('react/jsx-runtime');
|
|
4
|
-
var
|
|
4
|
+
var React = require('react');
|
|
5
5
|
require('../Button/index.js');
|
|
6
6
|
var QuantityControls_styles = require('./QuantityControls.styles.js');
|
|
7
7
|
var CartButton = require('../Button/CartButton.js');
|
|
@@ -16,15 +16,15 @@ const QuantityControls = function QuantityControls2({
|
|
|
16
16
|
cartButton,
|
|
17
17
|
allowZero
|
|
18
18
|
}) {
|
|
19
|
-
const handleOnUpdateQuantity =
|
|
19
|
+
const handleOnUpdateQuantity = React.useCallback(e => {
|
|
20
20
|
const value = Math.max(0, parseInt(e.target.value) || 0);
|
|
21
21
|
onUpdateQuantity(value);
|
|
22
22
|
}, [onUpdateQuantity]);
|
|
23
|
-
const handleOnAddToCart =
|
|
23
|
+
const handleOnAddToCart = React.useCallback(() => {
|
|
24
24
|
if (!allowZero && quantity < 1) return;
|
|
25
|
-
onAddToCart();
|
|
25
|
+
onAddToCart?.();
|
|
26
26
|
}, [allowZero, onAddToCart, quantity]);
|
|
27
|
-
const cartButtonDisabled =
|
|
27
|
+
const cartButtonDisabled = React.useMemo(() => {
|
|
28
28
|
return disabled || !allowZero && quantity < 1 || cartButton?.disabled;
|
|
29
29
|
}, [allowZero, cartButton?.disabled, disabled, quantity]);
|
|
30
30
|
return /* @__PURE__ */jsxRuntime.jsxs(QuantityControls_styles.Wrap, {
|
|
@@ -35,7 +35,7 @@ const QuantityControls = function QuantityControls2({
|
|
|
35
35
|
onUpdateQuantity: handleOnUpdateQuantity,
|
|
36
36
|
onIncreaseQuantity: () => onUpdateQuantity(quantity + 1),
|
|
37
37
|
onDecreaseQuantity: () => onUpdateQuantity(quantity > 0 ? quantity - 1 : 0)
|
|
38
|
-
}), /* @__PURE__ */jsxRuntime.jsx(CartButton.CartButton, {
|
|
38
|
+
}), onAddToCart && /* @__PURE__ */jsxRuntime.jsx(CartButton.CartButton, {
|
|
39
39
|
"data-test-id": "add-to-cart-btn",
|
|
40
40
|
variant: "primary",
|
|
41
41
|
...cartButton,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"QuantityControls.js","sources":["../../../src/components/QuantityControls/QuantityControls.tsx"],"sourcesContent":["import type { ChangeEvent } from \"react\";\nimport { useCallback, useMemo } from \"react\";\n\nimport { CartButton } from \"../Button\";\nimport * as S from \"./QuantityControls.styles\";\nimport type { QuantityControlsProps } from \"./QuantityControls.types\";\n\nexport const QuantityControls = function QuantityControls({\n className,\n disabled,\n quantity,\n onUpdateQuantity,\n onAddToCart,\n hideQuantityInput,\n cartButton,\n allowZero,\n}: QuantityControlsProps) {\n const handleOnUpdateQuantity = useCallback(\n (e: ChangeEvent<HTMLInputElement>) => {\n const value = Math.max(0, parseInt(e.target.value) || 0);\n\n onUpdateQuantity(value);\n },\n [onUpdateQuantity],\n );\n\n const handleOnAddToCart = useCallback(() => {\n if (!allowZero && quantity < 1) return;\n\n onAddToCart();\n }, [allowZero, onAddToCart, quantity]);\n\n const cartButtonDisabled = useMemo(() => {\n return disabled || (!allowZero && quantity < 1) || cartButton?.disabled;\n }, [allowZero, cartButton?.disabled, disabled, quantity]);\n\n // #############################################################################\n // Render\n // #############################################################################\n return (\n <S.Wrap className={className}>\n {!hideQuantityInput && (\n <S.QuantityInput\n disabled={disabled}\n quantity={quantity}\n onUpdateQuantity={handleOnUpdateQuantity}\n onIncreaseQuantity={() => onUpdateQuantity(quantity + 1)}\n onDecreaseQuantity={() =>\n onUpdateQuantity(quantity > 0 ? quantity - 1 : 0)\n }\n />\n )}\n <CartButton\n
|
|
1
|
+
{"version":3,"file":"QuantityControls.js","sources":["../../../src/components/QuantityControls/QuantityControls.tsx"],"sourcesContent":["import type { ChangeEvent } from \"react\";\nimport { useCallback, useMemo } from \"react\";\n\nimport { CartButton } from \"../Button\";\nimport * as S from \"./QuantityControls.styles\";\nimport type { QuantityControlsProps } from \"./QuantityControls.types\";\n\nexport const QuantityControls = function QuantityControls({\n className,\n disabled,\n quantity,\n onUpdateQuantity,\n onAddToCart,\n hideQuantityInput,\n cartButton,\n allowZero,\n}: QuantityControlsProps) {\n const handleOnUpdateQuantity = useCallback(\n (e: ChangeEvent<HTMLInputElement>) => {\n const value = Math.max(0, parseInt(e.target.value) || 0);\n\n onUpdateQuantity(value);\n },\n [onUpdateQuantity],\n );\n\n const handleOnAddToCart = useCallback(() => {\n if (!allowZero && quantity < 1) return;\n\n onAddToCart?.();\n }, [allowZero, onAddToCart, quantity]);\n\n const cartButtonDisabled = useMemo(() => {\n return disabled || (!allowZero && quantity < 1) || cartButton?.disabled;\n }, [allowZero, cartButton?.disabled, disabled, quantity]);\n\n // #############################################################################\n // Render\n // #############################################################################\n return (\n <S.Wrap className={className}>\n {!hideQuantityInput && (\n <S.QuantityInput\n disabled={disabled}\n quantity={quantity}\n onUpdateQuantity={handleOnUpdateQuantity}\n onIncreaseQuantity={() => onUpdateQuantity(quantity + 1)}\n onDecreaseQuantity={() =>\n onUpdateQuantity(quantity > 0 ? quantity - 1 : 0)\n }\n />\n )}\n {onAddToCart && (\n <CartButton\n data-test-id=\"add-to-cart-btn\"\n variant=\"primary\"\n {...cartButton}\n disabled={cartButtonDisabled}\n onClick={(e) => {\n e.stopPropagation();\n handleOnAddToCart();\n }}\n />\n )}\n </S.Wrap>\n );\n};\n"],"names":["QuantityControls","QuantityControls2","className","disabled","quantity","onUpdateQuantity","onAddToCart","hideQuantityInput","cartButton","allowZero","handleOnUpdateQuantity","useCallback","e","value","Math","max","parseInt","target","handleOnAddToCart","cartButtonDisabled","useMemo","jsxs","S.Wrap","children","jsx","S.QuantityInput","QuantityInput","onIncreaseQuantity","onDecreaseQuantity","CartButton","variant","onClick","stopPropagation"],"mappings":";;;;;;;;AAOa,MAAAA,gBAAA,GAAmB,SAASA,iBAAiBC,CAAA;EACxDC,SAAA;EACAC,QAAA;EACAC,QAAA;EACAC,gBAAA;EACAC,WAAA;EACAC,iBAAA;EACAC,UAAA;EACAC;AACF,CAA0B,EAAA;EACxB,MAAMC,sBAAyB,GAAAC,KAAA,CAAAA,WAAA,CAC5BC,CAAqC,IAAA;IAC9B,MAAAC,KAAA,GAAQC,KAAKC,GAAI,CAAA,CAAA,EAAGC,SAASJ,CAAE,CAAAK,MAAA,CAAOJ,KAAK,CAAA,IAAK,CAAC,CAAA;IAEvDR,gBAAA,CAAiBQ,KAAK,CAAA;EACxB,CAAA,EACA,CAACR,gBAAgB,CAAA,CACnB;EAEM,MAAAa,iBAAA,GAAoBP,KAAAA,CAAAA,YAAY,MAAM;IACtC,IAAA,CAACF,SAAa,IAAAL,QAAA,GAAW,CAAG,EAAA;IAElBE,WAAA,IAAA;EACb,CAAA,EAAA,CAACG,SAAW,EAAAH,WAAA,EAAaF,QAAQ,CAAC,CAAA;EAE/B,MAAAe,kBAAA,GAAqBC,KAAAA,CAAAA,QAAQ,MAAM;IACvC,OAAOjB,QAAa,IAAA,CAACM,SAAa,IAAAL,QAAA,GAAW,KAAMI,UAAY,EAAAL,QAAA;EAAA,GAC9D,CAACM,SAAA,EAAWD,YAAYL,QAAU,EAAAA,QAAA,EAAUC,QAAQ,CAAC,CAAA;EAKxD,OAAA,eACGiB,eAAA,CAAAC,uBAAAA,CAAAA,IAAA,EAAA;IAAOpB,SACL;IAAAqB,QAAA,EAAA,CAAA,CAAChB,iBACA,IAAA,eAAAiB,UAAA,CAAAA,GAAA,CAACC,uBAAE,CAAAC,aAAA,EAAF;MACCvB,QAAA;MACAC,QAAA;MACAC,gBAAkB,EAAAK,sBAAA;MAClBiB,kBAAoB,EAAAA,CAAA,KAAMtB,gBAAiB,CAAAD,QAAA,GAAW,CAAC,CAAA;MACvDwB,oBAAoBA,CAAA,KAClBvB,gBAAA,CAAiBD,WAAW,CAAI,GAAAA,QAAA,GAAW,IAAI,CAAC;IAAA,CAEpD,CAAA,EAEDE,WACC,mBAAAkB,UAAA,CAAAA,GAAA,CAACK,UAAA,CAAAA,UAAA,EAAA;MACC,cAAa,EAAA,iBAAA;MACbC,OAAQ,EAAA,SAAA;MACP,GAAGtB,UAAA;MACJL,QAAU,EAAAgB,kBAAA;MACVY,OAAA,EAAUnB,CAAM,IAAA;QACdA,CAAA,CAAEoB,eAAgB,CAAA,CAAA;QACAd,iBAAA,EAAA;MACpB;IAAA,CACF,CAAA;EAEJ,CAAA,CAAA;AAEJ,CAAA;"}
|
|
@@ -20,7 +20,7 @@ const QuantityControls = function QuantityControls2({
|
|
|
20
20
|
}, [onUpdateQuantity]);
|
|
21
21
|
const handleOnAddToCart = useCallback(() => {
|
|
22
22
|
if (!allowZero && quantity < 1) return;
|
|
23
|
-
onAddToCart();
|
|
23
|
+
onAddToCart?.();
|
|
24
24
|
}, [allowZero, onAddToCart, quantity]);
|
|
25
25
|
const cartButtonDisabled = useMemo(() => {
|
|
26
26
|
return disabled || !allowZero && quantity < 1 || cartButton?.disabled;
|
|
@@ -33,7 +33,7 @@ const QuantityControls = function QuantityControls2({
|
|
|
33
33
|
onUpdateQuantity: handleOnUpdateQuantity,
|
|
34
34
|
onIncreaseQuantity: () => onUpdateQuantity(quantity + 1),
|
|
35
35
|
onDecreaseQuantity: () => onUpdateQuantity(quantity > 0 ? quantity - 1 : 0)
|
|
36
|
-
}), /* @__PURE__ */jsx(CartButton, {
|
|
36
|
+
}), onAddToCart && /* @__PURE__ */jsx(CartButton, {
|
|
37
37
|
"data-test-id": "add-to-cart-btn",
|
|
38
38
|
variant: "primary",
|
|
39
39
|
...cartButton,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"QuantityControls.mjs","sources":["../../../src/components/QuantityControls/QuantityControls.tsx"],"sourcesContent":["import type { ChangeEvent } from \"react\";\nimport { useCallback, useMemo } from \"react\";\n\nimport { CartButton } from \"../Button\";\nimport * as S from \"./QuantityControls.styles\";\nimport type { QuantityControlsProps } from \"./QuantityControls.types\";\n\nexport const QuantityControls = function QuantityControls({\n className,\n disabled,\n quantity,\n onUpdateQuantity,\n onAddToCart,\n hideQuantityInput,\n cartButton,\n allowZero,\n}: QuantityControlsProps) {\n const handleOnUpdateQuantity = useCallback(\n (e: ChangeEvent<HTMLInputElement>) => {\n const value = Math.max(0, parseInt(e.target.value) || 0);\n\n onUpdateQuantity(value);\n },\n [onUpdateQuantity],\n );\n\n const handleOnAddToCart = useCallback(() => {\n if (!allowZero && quantity < 1) return;\n\n onAddToCart();\n }, [allowZero, onAddToCart, quantity]);\n\n const cartButtonDisabled = useMemo(() => {\n return disabled || (!allowZero && quantity < 1) || cartButton?.disabled;\n }, [allowZero, cartButton?.disabled, disabled, quantity]);\n\n // #############################################################################\n // Render\n // #############################################################################\n return (\n <S.Wrap className={className}>\n {!hideQuantityInput && (\n <S.QuantityInput\n disabled={disabled}\n quantity={quantity}\n onUpdateQuantity={handleOnUpdateQuantity}\n onIncreaseQuantity={() => onUpdateQuantity(quantity + 1)}\n onDecreaseQuantity={() =>\n onUpdateQuantity(quantity > 0 ? quantity - 1 : 0)\n }\n />\n )}\n <CartButton\n
|
|
1
|
+
{"version":3,"file":"QuantityControls.mjs","sources":["../../../src/components/QuantityControls/QuantityControls.tsx"],"sourcesContent":["import type { ChangeEvent } from \"react\";\nimport { useCallback, useMemo } from \"react\";\n\nimport { CartButton } from \"../Button\";\nimport * as S from \"./QuantityControls.styles\";\nimport type { QuantityControlsProps } from \"./QuantityControls.types\";\n\nexport const QuantityControls = function QuantityControls({\n className,\n disabled,\n quantity,\n onUpdateQuantity,\n onAddToCart,\n hideQuantityInput,\n cartButton,\n allowZero,\n}: QuantityControlsProps) {\n const handleOnUpdateQuantity = useCallback(\n (e: ChangeEvent<HTMLInputElement>) => {\n const value = Math.max(0, parseInt(e.target.value) || 0);\n\n onUpdateQuantity(value);\n },\n [onUpdateQuantity],\n );\n\n const handleOnAddToCart = useCallback(() => {\n if (!allowZero && quantity < 1) return;\n\n onAddToCart?.();\n }, [allowZero, onAddToCart, quantity]);\n\n const cartButtonDisabled = useMemo(() => {\n return disabled || (!allowZero && quantity < 1) || cartButton?.disabled;\n }, [allowZero, cartButton?.disabled, disabled, quantity]);\n\n // #############################################################################\n // Render\n // #############################################################################\n return (\n <S.Wrap className={className}>\n {!hideQuantityInput && (\n <S.QuantityInput\n disabled={disabled}\n quantity={quantity}\n onUpdateQuantity={handleOnUpdateQuantity}\n onIncreaseQuantity={() => onUpdateQuantity(quantity + 1)}\n onDecreaseQuantity={() =>\n onUpdateQuantity(quantity > 0 ? quantity - 1 : 0)\n }\n />\n )}\n {onAddToCart && (\n <CartButton\n data-test-id=\"add-to-cart-btn\"\n variant=\"primary\"\n {...cartButton}\n disabled={cartButtonDisabled}\n onClick={(e) => {\n e.stopPropagation();\n handleOnAddToCart();\n }}\n />\n )}\n </S.Wrap>\n );\n};\n"],"names":["QuantityControls","QuantityControls2","className","disabled","quantity","onUpdateQuantity","onAddToCart","hideQuantityInput","cartButton","allowZero","handleOnUpdateQuantity","useCallback","e","value","Math","max","parseInt","target","handleOnAddToCart","cartButtonDisabled","useMemo","jsxs","S.Wrap","children","jsx","S.QuantityInput","onIncreaseQuantity","onDecreaseQuantity","CartButton","variant","onClick","stopPropagation"],"mappings":";;;;;;AAOa,MAAAA,gBAAA,GAAmB,SAASA,iBAAiBC,CAAA;EACxDC,SAAA;EACAC,QAAA;EACAC,QAAA;EACAC,gBAAA;EACAC,WAAA;EACAC,iBAAA;EACAC,UAAA;EACAC;AACF,CAA0B,EAAA;EACxB,MAAMC,sBAAyB,GAAAC,WAAA,CAC5BC,CAAqC,IAAA;IAC9B,MAAAC,KAAA,GAAQC,KAAKC,GAAI,CAAA,CAAA,EAAGC,SAASJ,CAAE,CAAAK,MAAA,CAAOJ,KAAK,CAAA,IAAK,CAAC,CAAA;IAEvDR,gBAAA,CAAiBQ,KAAK,CAAA;EACxB,CAAA,EACA,CAACR,gBAAgB,CAAA,CACnB;EAEM,MAAAa,iBAAA,GAAoBP,YAAY,MAAM;IACtC,IAAA,CAACF,SAAa,IAAAL,QAAA,GAAW,CAAG,EAAA;IAElBE,WAAA,IAAA;EACb,CAAA,EAAA,CAACG,SAAW,EAAAH,WAAA,EAAaF,QAAQ,CAAC,CAAA;EAE/B,MAAAe,kBAAA,GAAqBC,QAAQ,MAAM;IACvC,OAAOjB,QAAa,IAAA,CAACM,SAAa,IAAAL,QAAA,GAAW,KAAMI,UAAY,EAAAL,QAAA;EAAA,GAC9D,CAACM,SAAA,EAAWD,YAAYL,QAAU,EAAAA,QAAA,EAAUC,QAAQ,CAAC,CAAA;EAKxD,OAAA,eACGiB,IAAA,CAAAC,IAAA,EAAA;IAAOpB,SACL;IAAAqB,QAAA,EAAA,CAAA,CAAChB,iBACA,IAAA,eAAAiB,GAAA,CAACC,aAAE,EAAF;MACCtB,QAAA;MACAC,QAAA;MACAC,gBAAkB,EAAAK,sBAAA;MAClBgB,kBAAoB,EAAAA,CAAA,KAAMrB,gBAAiB,CAAAD,QAAA,GAAW,CAAC,CAAA;MACvDuB,oBAAoBA,CAAA,KAClBtB,gBAAA,CAAiBD,WAAW,CAAI,GAAAA,QAAA,GAAW,IAAI,CAAC;IAAA,CAEpD,CAAA,EAEDE,WACC,mBAAAkB,GAAA,CAACI,UAAA,EAAA;MACC,cAAa,EAAA,iBAAA;MACbC,OAAQ,EAAA,SAAA;MACP,GAAGrB,UAAA;MACJL,QAAU,EAAAgB,kBAAA;MACVW,OAAA,EAAUlB,CAAM,IAAA;QACdA,CAAA,CAAEmB,eAAgB,CAAA,CAAA;QACAb,iBAAA,EAAA;MACpB;IAAA,CACF,CAAA;EAEJ,CAAA,CAAA;AAEJ,CAAA;"}
|