@ubnt/store.core 9.64.0-new-design → 9.64.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +1 -139
- package/lib/_virtual/_virtual_multi-entry.js +10 -13
- package/lib/_virtual/_virtual_multi-entry.js.map +1 -1
- package/lib/_virtual/_virtual_multi-entry.mjs +11 -13
- package/lib/_virtual/_virtual_multi-entry.mjs.map +1 -1
- package/lib/apis/smartcat.d.ts +2 -12
- package/lib/apis/smartcat.js +4 -27
- package/lib/apis/smartcat.js.map +1 -1
- package/lib/apis/smartcat.mjs +4 -27
- package/lib/apis/smartcat.mjs.map +1 -1
- package/lib/assets/attention.svg +5 -5
- package/lib/assets/attention2.svg +5 -5
- package/lib/assets/close2.svg +3 -2
- package/lib/assets/close3.svg +2 -3
- package/lib/assets/express.jpg +0 -0
- package/lib/assets/express2.jpg +0 -0
- package/lib/assets/express7.jpg +0 -0
- package/lib/assets/express72.jpg +0 -0
- package/lib/assets/icons/menu/{icon-location-pin.svg.js → icon-globe.svg.js} +6 -6
- package/lib/assets/icons/menu/icon-globe.svg.js.map +1 -0
- package/lib/assets/icons/menu/icon-globe.svg.mjs +3 -0
- package/lib/assets/icons/menu/icon-globe.svg.mjs.map +1 -0
- package/lib/assets/logoUnifi.svg +2 -10
- package/lib/assets/minus4.svg +8 -8
- package/lib/assets/minus5.svg +8 -8
- package/lib/assets/plus5.svg +9 -9
- package/lib/assets/plus6.svg +9 -9
- package/lib/assets/udr2.jpg +0 -0
- package/lib/assets/udr3.jpg +0 -0
- package/lib/assets/udr7.jpg +0 -0
- package/lib/assets/udr72.jpg +0 -0
- package/lib/components/Accordion/Accordion.js +4 -4
- package/lib/components/Avatar/Avatar.js +2 -2
- package/lib/components/BackInStock/BackInStock.types.d.ts +0 -1
- package/lib/components/Button/Button.js +5 -12
- package/lib/components/Button/Button.js.map +1 -1
- package/lib/components/Button/Button.mjs +1 -8
- package/lib/components/Button/Button.mjs.map +1 -1
- package/lib/components/Button/CartButton.d.ts +1 -3
- package/lib/components/Button/CartButton.js +6 -11
- package/lib/components/Button/CartButton.js.map +1 -1
- package/lib/components/Button/CartButton.mjs +4 -8
- package/lib/components/Button/CartButton.mjs.map +1 -1
- package/lib/components/ButtonGroup/ButtonGroup.d.ts +1 -1
- package/lib/components/ButtonGroup/ButtonGroup.js +9 -16
- package/lib/components/ButtonGroup/ButtonGroup.js.map +1 -1
- package/lib/components/ButtonGroup/ButtonGroup.mjs +9 -16
- package/lib/components/ButtonGroup/ButtonGroup.mjs.map +1 -1
- package/lib/components/ButtonGroup/ButtonGroup.styles.d.ts +6 -10
- package/lib/components/ButtonGroup/ButtonGroup.styles.js +20 -60
- package/lib/components/ButtonGroup/ButtonGroup.styles.js.map +1 -1
- package/lib/components/ButtonGroup/ButtonGroup.styles.mjs +20 -60
- package/lib/components/ButtonGroup/ButtonGroup.styles.mjs.map +1 -1
- package/lib/components/ButtonGroup/ButtonGroup.types.d.ts +0 -5
- package/lib/components/ButtonGroupBasic/ButtonGroupBasic.d.ts +1 -1
- package/lib/components/ButtonGroupBasic/ButtonGroupBasic.js +4 -16
- package/lib/components/ButtonGroupBasic/ButtonGroupBasic.js.map +1 -1
- package/lib/components/ButtonGroupBasic/ButtonGroupBasic.mjs +5 -17
- package/lib/components/ButtonGroupBasic/ButtonGroupBasic.mjs.map +1 -1
- package/lib/components/ButtonGroupBasic/ButtonGroupBasic.styles.d.ts +1 -5
- package/lib/components/ButtonGroupBasic/ButtonGroupBasic.styles.js +17 -82
- package/lib/components/ButtonGroupBasic/ButtonGroupBasic.styles.js.map +1 -1
- package/lib/components/ButtonGroupBasic/ButtonGroupBasic.styles.mjs +17 -82
- package/lib/components/ButtonGroupBasic/ButtonGroupBasic.styles.mjs.map +1 -1
- package/lib/components/ButtonGroupBasic/ButtonGroupBasic.types.d.ts +0 -4
- package/lib/components/CardSection/Card/Card.js +6 -6
- package/lib/components/CardSection/CardSection.js +2 -2
- package/lib/components/CardSection/CardSection.styles.d.ts +1 -1
- package/lib/components/CartIcon/CartIcon.js +2 -2
- package/lib/components/CategoryTabs/CategoryTabs.styles.d.ts +2 -4
- package/lib/components/CategoryTabs/CategoryTabs.styles.js +5 -8
- package/lib/components/CategoryTabs/CategoryTabs.styles.js.map +1 -1
- package/lib/components/CategoryTabs/CategoryTabs.styles.mjs +6 -7
- package/lib/components/CategoryTabs/CategoryTabs.styles.mjs.map +1 -1
- package/lib/components/Checkbox/Checkbox.js +4 -4
- package/lib/components/CloserLookSection/CloserLookSection.js +11 -11
- package/lib/components/CloserLookSection/RecommendedAddons/RecommendedAddons.js +5 -5
- package/lib/components/Compare/Compare.styles.d.ts +5 -5
- package/lib/components/Container/Container.d.ts +1 -1
- package/lib/components/Container/Container.js +4 -5
- package/lib/components/Container/Container.js.map +1 -1
- package/lib/components/Container/Container.mjs +4 -5
- package/lib/components/Container/Container.mjs.map +1 -1
- package/lib/components/Container/index.stories.d.ts +5 -5
- package/lib/components/CustomImage/CustomImage.js +12 -12
- package/lib/components/Explore/Explore.js +5 -5
- package/lib/components/Explore/ExploreData.js +11 -11
- package/lib/components/Explore/ExploreData.js.map +1 -1
- package/lib/components/Explore/ExploreData.mjs +11 -11
- package/lib/components/Explore/ExploreData.mjs.map +1 -1
- 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 +20 -30
- package/lib/components/Header/AccountMenu/AccountMenu.js.map +1 -1
- package/lib/components/Header/AccountMenu/AccountMenu.mjs +3 -13
- package/lib/components/Header/AccountMenu/AccountMenu.mjs.map +1 -1
- package/lib/components/Header/CartModal/Empty/Empty.js +3 -3
- package/lib/components/Header/CartModalV2/CartModal.js +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 +43 -43
- package/lib/components/Header/Header.js.map +1 -1
- package/lib/components/Header/Header.mjs +9 -9
- package/lib/components/Header/Header.mjs.map +1 -1
- package/lib/components/Header/Header.styles.d.ts +12 -7
- package/lib/components/Header/Header.styles.js +32 -10
- package/lib/components/Header/Header.styles.js.map +1 -1
- package/lib/components/Header/Header.styles.mjs +31 -10
- package/lib/components/Header/Header.styles.mjs.map +1 -1
- package/lib/components/Header/Header.types.d.ts +5 -29
- package/lib/components/Header/Header.types.js +1 -2
- package/lib/components/Header/Header.types.js.map +1 -1
- package/lib/components/Header/Header.types.mjs +1 -2
- package/lib/components/Header/Header.types.mjs.map +1 -1
- package/lib/components/Header/IsolatedHeader.d.ts +0 -1
- package/lib/components/Header/IsolatedHeader.js +50 -50
- package/lib/components/Header/IsolatedHeader.js.map +1 -1
- package/lib/components/Header/IsolatedHeader.mjs +46 -47
- package/lib/components/Header/IsolatedHeader.mjs.map +1 -1
- package/lib/components/Header/LanguageFrame/LanguageFrame.js +6 -6
- package/lib/components/Header/MenuItem/MenuItem.styles.d.ts +1 -1
- package/lib/components/Header/MenuItem/MenuItem.styles.js +3 -3
- package/lib/components/Header/MenuItem/MenuItem.styles.js.map +1 -1
- package/lib/components/Header/MenuItem/MenuItem.styles.mjs +3 -3
- package/lib/components/Header/MenuItem/MenuItem.styles.mjs.map +1 -1
- package/lib/components/Header/MenuItem/MenuItem.types.d.ts +0 -1
- package/lib/components/Header/Navigation/Carousel/Carousel.js +5 -5
- package/lib/components/Header/Navigation/MicrositeMenu/MicrositeMenu.js +12 -12
- package/lib/components/Header/Navigation/MicrositeMenu/MicrositeMenu.styles.d.ts +1 -1
- package/lib/components/Header/Navigation/MobileMenu/MobileMenu.js +6 -6
- package/lib/components/Header/Navigation/MobileMenu/MobileMenu.styles.d.ts +1 -1
- package/lib/components/Header/Navigation/ProMobileMenu/ProMobileMenu.d.ts +1 -1
- package/lib/components/Header/Navigation/ProMobileMenu/ProMobileMenu.js +109 -116
- package/lib/components/Header/Navigation/ProMobileMenu/ProMobileMenu.js.map +1 -1
- package/lib/components/Header/Navigation/ProMobileMenu/ProMobileMenu.mjs +104 -111
- package/lib/components/Header/Navigation/ProMobileMenu/ProMobileMenu.mjs.map +1 -1
- package/lib/components/Header/Navigation/ProMobileMenu/ProMobileMenu.styles.d.ts +0 -9
- package/lib/components/Header/Navigation/ProMobileMenu/ProMobileMenu.styles.js +1 -15
- package/lib/components/Header/Navigation/ProMobileMenu/ProMobileMenu.styles.js.map +1 -1
- package/lib/components/Header/Navigation/ProMobileMenu/ProMobileMenu.styles.mjs +2 -13
- package/lib/components/Header/Navigation/ProMobileMenu/ProMobileMenu.styles.mjs.map +1 -1
- package/lib/components/Header/Navigation/ProMobileMenu/ProMobileMenu.types.d.ts +6 -12
- package/lib/components/Header/Overlay/Overlay.js +3 -3
- package/lib/components/Header/ProHeader/ProHeader.d.ts +5 -9
- package/lib/components/Header/ProHeader/ProHeader.js +189 -290
- package/lib/components/Header/ProHeader/ProHeader.js.map +1 -1
- package/lib/components/Header/ProHeader/ProHeader.mjs +171 -270
- package/lib/components/Header/ProHeader/ProHeader.mjs.map +1 -1
- package/lib/components/Header/ProHeader/ProHeader.styles.d.ts +23 -38
- package/lib/components/Header/ProHeader/ProHeader.styles.js +67 -205
- package/lib/components/Header/ProHeader/ProHeader.styles.js.map +1 -1
- package/lib/components/Header/ProHeader/ProHeader.styles.mjs +66 -194
- package/lib/components/Header/ProHeader/ProHeader.styles.mjs.map +1 -1
- package/lib/components/Header/translations/ar.json.js +1 -4
- package/lib/components/Header/translations/ar.json.js.map +1 -1
- package/lib/components/Header/translations/ar.json.mjs +2 -4
- package/lib/components/Header/translations/ar.json.mjs.map +1 -1
- package/lib/components/Header/translations/de.json.js +1 -4
- package/lib/components/Header/translations/de.json.js.map +1 -1
- package/lib/components/Header/translations/de.json.mjs +2 -4
- package/lib/components/Header/translations/de.json.mjs.map +1 -1
- package/lib/components/Header/translations/el.json.js +1 -4
- package/lib/components/Header/translations/el.json.js.map +1 -1
- package/lib/components/Header/translations/el.json.mjs +2 -4
- package/lib/components/Header/translations/el.json.mjs.map +1 -1
- package/lib/components/Header/translations/en.json.js +1 -7
- package/lib/components/Header/translations/en.json.js.map +1 -1
- package/lib/components/Header/translations/en.json.mjs +2 -6
- package/lib/components/Header/translations/en.json.mjs.map +1 -1
- package/lib/components/Header/translations/es.json.js +1 -4
- package/lib/components/Header/translations/es.json.js.map +1 -1
- package/lib/components/Header/translations/es.json.mjs +2 -4
- package/lib/components/Header/translations/es.json.mjs.map +1 -1
- package/lib/components/Header/translations/fr.json.js +1 -4
- package/lib/components/Header/translations/fr.json.js.map +1 -1
- package/lib/components/Header/translations/fr.json.mjs +2 -4
- package/lib/components/Header/translations/fr.json.mjs.map +1 -1
- package/lib/components/Header/translations/it.json.js +1 -4
- package/lib/components/Header/translations/it.json.js.map +1 -1
- package/lib/components/Header/translations/it.json.mjs +2 -4
- package/lib/components/Header/translations/it.json.mjs.map +1 -1
- package/lib/components/Header/translations/ja.json.js +1 -4
- package/lib/components/Header/translations/ja.json.js.map +1 -1
- package/lib/components/Header/translations/ja.json.mjs +2 -4
- package/lib/components/Header/translations/ja.json.mjs.map +1 -1
- package/lib/components/Header/translations/pt-BR.json.js +1 -4
- package/lib/components/Header/translations/pt-BR.json.js.map +1 -1
- package/lib/components/Header/translations/pt-BR.json.mjs +2 -4
- package/lib/components/Header/translations/pt-BR.json.mjs.map +1 -1
- package/lib/components/Header/translations/zh-Hans.json.js +1 -4
- package/lib/components/Header/translations/zh-Hans.json.js.map +1 -1
- package/lib/components/Header/translations/zh-Hans.json.mjs +2 -4
- package/lib/components/Header/translations/zh-Hans.json.mjs.map +1 -1
- package/lib/components/Header/translations/zh-Hant-TW.json.js +1 -4
- package/lib/components/Header/translations/zh-Hant-TW.json.js.map +1 -1
- package/lib/components/Header/translations/zh-Hant-TW.json.mjs +2 -4
- package/lib/components/Header/translations/zh-Hant-TW.json.mjs.map +1 -1
- package/lib/components/Hero/Hero.js +5 -5
- package/lib/components/Hero/Hero.styles.d.ts +2 -2
- package/lib/components/HeroFadeGallery/HeroFadeGallery.styles.d.ts +1 -1
- package/lib/components/HeroVideo/HeroVideo.js +5 -5
- package/lib/components/HowToUseSection/HowToUseSection.styles.d.ts +2 -2
- package/lib/components/ImageCarousel/ImageCarousel.js +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 +1 -3
- package/lib/components/LoaderDots/LoaderDots.js.map +1 -1
- package/lib/components/LoaderDots/LoaderDots.mjs +1 -3
- package/lib/components/LoaderDots/LoaderDots.mjs.map +1 -1
- package/lib/components/LoaderDots/LoaderDots.styles.d.ts +1 -2
- package/lib/components/LoaderDots/LoaderDots.styles.js +1 -11
- package/lib/components/LoaderDots/LoaderDots.styles.js.map +1 -1
- package/lib/components/LoaderDots/LoaderDots.styles.mjs +1 -11
- package/lib/components/LoaderDots/LoaderDots.styles.mjs.map +1 -1
- package/lib/components/LoaderDots/LoaderDots.types.d.ts +0 -2
- package/lib/components/MeetUniFiVideoPlayer/EpisodeCard/EpisodeCard.js +7 -7
- package/lib/components/MeetUniFiVideoPlayer/MeetUniFiVideoPlayer.js +18 -18
- package/lib/components/MeetUniFiVideoPlayer/MeetUniFiVideoPlayer.styles.d.ts +1 -1
- package/lib/components/MicrositeColumnFeatureProgressBar/MicrositeColumnFeatureProgressBar.js +2 -2
- package/lib/components/MicrositeFeatureChecklist/MicrositeFeatureChecklist.js +3 -3
- package/lib/components/MicrositeFeatureProgressBar/MicrositeFeatureProgressBar.js +3 -3
- package/lib/components/MicrositeHero/MicrositeHero.js +18 -18
- package/lib/components/MicrositeIntroductionBlock/MicrositeIntroductionBlock.js +4 -4
- package/lib/components/MicrositeMediaGrid/MicrositeMediaGrid.js +9 -9
- package/lib/components/MicrositeProductGrid/MicrositeProductGrid.js +8 -8
- package/lib/components/MicrositeProductLearnMoreBlock/MicrositeProductLearnMoreBlockWrap.js +2 -2
- package/lib/components/MicrositeSectionWrap/MicrositeSectionWrap.styles.d.ts +1 -1
- package/lib/components/MicrositeSubSubNavigation/MicrositeSubSubNavigation.js +3 -3
- package/lib/components/MicrositeVideoSlideshow/MicrositeVideoSlideshow.js +12 -12
- package/lib/components/Microsites/MicrositePageContext.js +2 -2
- package/lib/components/Microsites/MicrositeProductPage.js +3 -3
- package/lib/components/Microsites/context/MicrositeProductPageContext.js +3 -3
- package/lib/components/MobileModal/MobileModal.js +4 -4
- package/lib/components/Modal/Modal.js +3 -3
- package/lib/components/ModelCompareV3/ModelCompareOverflowScrollButton.js +3 -3
- package/lib/components/ModelCompareV3/ModelComparePropertyValueGridItem.js +2 -2
- package/lib/components/ModelCompareV3/ModelCompareV3.js +14 -14
- package/lib/components/ModelCompareV3/ProductGroupsGrid.js +3 -3
- package/lib/components/ModelCompareV3/ScrollGroup/ScrollGroup.js +5 -5
- package/lib/components/ModelCompareV3/ScrollGroup/context.js +3 -3
- package/lib/components/ModelCompareV3/ScrollGroup/useScrollGroupItem.js +8 -8
- package/lib/components/ModelCompareV3/ScrollGroup/useScrollGroupSetScroll.js +2 -2
- package/lib/components/ModelCompareV3/ScrollGroup/useScrollGroupTo.js +2 -2
- package/lib/components/ModelCompareV3/StickyGrid/StickyGrid.js +7 -7
- package/lib/components/ModelCompareV3/StickyGrid/StickyGridBody.js +2 -2
- package/lib/components/ModelCompareV3/StickyGrid/StickyGridHeader.js +5 -5
- package/lib/components/ModelCompareV3/StickyGrid/StickyGridItem.js +2 -2
- package/lib/components/ModelCompareV3/StickyGrid/context.js +3 -3
- package/lib/components/ModelCompareV3/assets/Consoles/bigCompare/express.jpg.js +5 -5
- package/lib/components/ModelCompareV3/assets/Consoles/bigCompare/express.jpg.mjs +2 -2
- package/lib/components/ModelCompareV3/assets/Consoles/bigCompare/express7.jpg.js +5 -5
- package/lib/components/ModelCompareV3/assets/Consoles/bigCompare/express7.jpg.mjs +2 -2
- package/lib/components/ModelCompareV3/assets/Consoles/bigCompare/udr.jpg.js +5 -5
- package/lib/components/ModelCompareV3/assets/Consoles/bigCompare/udr.jpg.mjs +2 -2
- package/lib/components/ModelCompareV3/assets/Consoles/bigCompare/udr7.jpg.js +5 -5
- package/lib/components/ModelCompareV3/assets/Consoles/bigCompare/udr7.jpg.mjs +2 -2
- package/lib/components/ModelCompareV3/assets/Consoles/express.jpg.js +1 -1
- package/lib/components/ModelCompareV3/assets/Consoles/express.jpg.mjs +2 -2
- package/lib/components/ModelCompareV3/assets/Consoles/express7.jpg.js +1 -1
- package/lib/components/ModelCompareV3/assets/Consoles/express7.jpg.mjs +2 -2
- package/lib/components/ModelCompareV3/assets/Consoles/udr.jpg.js +1 -1
- package/lib/components/ModelCompareV3/assets/Consoles/udr.jpg.mjs +2 -2
- package/lib/components/ModelCompareV3/assets/Consoles/udr7.jpg.js +1 -1
- package/lib/components/ModelCompareV3/assets/Consoles/udr7.jpg.mjs +2 -2
- package/lib/components/ModelCompareV3/data/CloudGateways.js +6 -6
- package/lib/components/ModelCompareV3/data/CloudGateways.mjs +4 -4
- package/lib/components/ModelCompareV3/data/products/cloudKeyEnterprise.js +2 -4
- package/lib/components/ModelCompareV3/data/products/cloudKeyEnterprise.js.map +1 -1
- package/lib/components/ModelCompareV3/data/products/cloudKeyEnterprise.mjs +2 -4
- package/lib/components/ModelCompareV3/data/products/cloudKeyEnterprise.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/products/cloudKeyG2Plus.js +2 -2
- package/lib/components/ModelCompareV3/data/products/cloudKeyG2Plus.js.map +1 -1
- package/lib/components/ModelCompareV3/data/products/cloudKeyG2Plus.mjs +2 -2
- package/lib/components/ModelCompareV3/data/products/cloudKeyG2Plus.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/products/express.js +4 -4
- package/lib/components/ModelCompareV3/data/products/express.js.map +1 -1
- package/lib/components/ModelCompareV3/data/products/express.mjs +4 -4
- package/lib/components/ModelCompareV3/data/products/express.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/products/express7.js +2 -2
- package/lib/components/ModelCompareV3/data/products/express7.js.map +1 -1
- package/lib/components/ModelCompareV3/data/products/express7.mjs +2 -2
- package/lib/components/ModelCompareV3/data/products/express7.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/products/gatewayEnterprise.js +2 -4
- package/lib/components/ModelCompareV3/data/products/gatewayEnterprise.js.map +1 -1
- package/lib/components/ModelCompareV3/data/products/gatewayEnterprise.mjs +2 -4
- package/lib/components/ModelCompareV3/data/products/gatewayEnterprise.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/products/gatewayLite.js +2 -4
- package/lib/components/ModelCompareV3/data/products/gatewayLite.js.map +1 -1
- package/lib/components/ModelCompareV3/data/products/gatewayLite.mjs +2 -4
- package/lib/components/ModelCompareV3/data/products/gatewayLite.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/products/gatewayMax.js +2 -4
- package/lib/components/ModelCompareV3/data/products/gatewayMax.js.map +1 -1
- package/lib/components/ModelCompareV3/data/products/gatewayMax.mjs +2 -4
- package/lib/components/ModelCompareV3/data/products/gatewayMax.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/products/gatewayProfessional.js +2 -4
- package/lib/components/ModelCompareV3/data/products/gatewayProfessional.js.map +1 -1
- package/lib/components/ModelCompareV3/data/products/gatewayProfessional.mjs +2 -4
- package/lib/components/ModelCompareV3/data/products/gatewayProfessional.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/products/officialUniFiHosting.js +1 -3
- package/lib/components/ModelCompareV3/data/products/officialUniFiHosting.js.map +1 -1
- package/lib/components/ModelCompareV3/data/products/officialUniFiHosting.mjs +1 -3
- package/lib/components/ModelCompareV3/data/products/officialUniFiHosting.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/products/ucgFiber.js +1 -1
- package/lib/components/ModelCompareV3/data/products/ucgFiber.js.map +1 -1
- package/lib/components/ModelCompareV3/data/products/ucgFiber.mjs +1 -1
- package/lib/components/ModelCompareV3/data/products/ucgFiber.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/products/ucgMax.js +1 -1
- package/lib/components/ModelCompareV3/data/products/ucgMax.js.map +1 -1
- package/lib/components/ModelCompareV3/data/products/ucgMax.mjs +1 -1
- package/lib/components/ModelCompareV3/data/products/ucgMax.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/products/ucgUltra.js +3 -3
- package/lib/components/ModelCompareV3/data/products/ucgUltra.js.map +1 -1
- package/lib/components/ModelCompareV3/data/products/ucgUltra.mjs +3 -3
- package/lib/components/ModelCompareV3/data/products/ucgUltra.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/products/udmPro.js +3 -3
- package/lib/components/ModelCompareV3/data/products/udmPro.js.map +1 -1
- package/lib/components/ModelCompareV3/data/products/udmPro.mjs +3 -3
- package/lib/components/ModelCompareV3/data/products/udmPro.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/products/udmProMax.js +3 -3
- package/lib/components/ModelCompareV3/data/products/udmProMax.js.map +1 -1
- package/lib/components/ModelCompareV3/data/products/udmProMax.mjs +3 -3
- package/lib/components/ModelCompareV3/data/products/udmProMax.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/products/udmProSpecial.js +3 -3
- package/lib/components/ModelCompareV3/data/products/udmProSpecial.js.map +1 -1
- package/lib/components/ModelCompareV3/data/products/udmProSpecial.mjs +3 -3
- package/lib/components/ModelCompareV3/data/products/udmProSpecial.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/products/udr.js +2 -2
- package/lib/components/ModelCompareV3/data/products/udr.js.map +1 -1
- package/lib/components/ModelCompareV3/data/products/udr.mjs +2 -2
- package/lib/components/ModelCompareV3/data/products/udr.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/products/udr7.js +2 -2
- package/lib/components/ModelCompareV3/data/products/udr7.js.map +1 -1
- package/lib/components/ModelCompareV3/data/products/udr7.mjs +2 -2
- package/lib/components/ModelCompareV3/data/products/udr7.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/products/udw.js +3 -3
- package/lib/components/ModelCompareV3/data/products/udw.js.map +1 -1
- package/lib/components/ModelCompareV3/data/products/udw.mjs +3 -3
- package/lib/components/ModelCompareV3/data/products/udw.mjs.map +1 -1
- package/lib/components/Pagination/Pagination.js +3 -3
- package/lib/components/PriceRangeSlider/PriceRangeSlider.js +16 -16
- package/lib/components/ProductCard/ProductCard.js +7 -7
- package/lib/components/ProductCardPopup/ProductCardPopup.js +8 -8
- package/lib/components/ProductCompare/ProductCompare.js +7 -7
- package/lib/components/ProductDetails/ProductDetails.js +5 -5
- package/lib/components/ProductGrid/ProductGrid.js +10 -10
- package/lib/components/ProductKeyFeatures/ProductKeyFeatures.js +3 -3
- package/lib/components/ProductSectionNavigation/ProductSectionNavigation.styles.d.ts +1 -1
- package/lib/components/ProductSectionNavigationV2/ProductSectionNavigation.styles.d.ts +1 -1
- package/lib/components/ProductSectionTabs/ProductSectionTabs.js +2 -2
- package/lib/components/ProductTechSpecs/ProductTechSpecs.styles.d.ts +2 -2
- package/lib/components/ProductWizard/Options/Options.js +3 -3
- package/lib/components/ProductWizard/ProductWizard.js +2 -2
- package/lib/components/ProductWizardFootnotes/ProductWizardFootnotes.js +5 -5
- package/lib/components/ProgressCircle/ProgressCircle.js +4 -4
- package/lib/components/QuantityControls/QuantityControls.js +6 -6
- package/lib/components/QuantityControls/QuantityControls.js.map +1 -1
- package/lib/components/QuantityControls/QuantityControls.mjs +2 -2
- package/lib/components/QuantityControls/QuantityControls.mjs.map +1 -1
- package/lib/components/QuantityControls/QuantityControls.types.d.ts +1 -1
- package/lib/components/QuantityInput/QuantityInput.js +1 -6
- package/lib/components/QuantityInput/QuantityInput.js.map +1 -1
- package/lib/components/QuantityInput/QuantityInput.mjs +1 -6
- package/lib/components/QuantityInput/QuantityInput.mjs.map +1 -1
- package/lib/components/RelatedProducts/RelatedProducts.js +5 -5
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/ComputeResourceCalculator.constants.js +2 -2
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/ComputeResourceCalculator.constants.js.map +1 -1
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/ComputeResourceCalculator.constants.mjs +2 -2
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/ComputeResourceCalculator.constants.mjs.map +1 -1
- 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 +6 -6
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/InputCard/InputCard.mjs +1 -1
- 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/attention.svg.js +1 -1
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/InputCard/assets/attention.svg.mjs +2 -2
- 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 +8 -8
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/ProgressBarChart/ProgressBarChart.mjs +1 -1
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/ProgressBarChart/assets/attention.svg.js +1 -1
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/ProgressBarChart/assets/attention.svg.mjs +2 -2
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/useComputeResourceCalculator.js +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/ResourceCalculatorV1/translations/en.json.js +1 -1
- package/lib/components/ResourceCalculatorV1/translations/en.json.mjs +1 -1
- package/lib/components/ReverseLoopingVideo/ReverseLoopingVideo.js +5 -5
- package/lib/components/ScrollWrapper/ScrollWrapper.d.ts +1 -1
- package/lib/components/ScrollWrapper/ScrollWrapper.js +26 -34
- package/lib/components/ScrollWrapper/ScrollWrapper.js.map +1 -1
- package/lib/components/ScrollWrapper/ScrollWrapper.mjs +8 -16
- package/lib/components/ScrollWrapper/ScrollWrapper.mjs.map +1 -1
- package/lib/components/ScrollWrapper/ScrollWrapper.types.d.ts +0 -2
- package/lib/components/Search/Input/Input.d.ts +1 -1
- package/lib/components/Search/Input/Input.js +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 +1 -0
- package/lib/components/Search/Input/Input.styles.js.map +1 -1
- package/lib/components/Search/Input/Input.styles.mjs +1 -0
- package/lib/components/Search/Input/Input.styles.mjs.map +1 -1
- package/lib/components/Search/Input/Input.types.d.ts +2 -3
- package/lib/components/Search/Modal/Modal.js +3 -3
- package/lib/components/StorageSliders/Slider/Slider.js +3 -3
- package/lib/components/StorageSliders/StorageSliders.context.js +20 -20
- package/lib/components/StorageSliders/StorageSliders.js +4 -4
- package/lib/components/Tooltip/Tooltip.js +5 -5
- package/lib/components/VariantSelector/Variant/Compatibility/Compatibility.js +7 -7
- package/lib/components/VariantSelector/Variant/Variant.js +40 -40
- package/lib/components/VariantSelector/VariantSelector.js +16 -16
- package/lib/components/VideoPlayerNew/VideoPlayer.js +20 -20
- package/lib/components/VideoPlayerNew/VideoPlayer.mjs +1 -1
- package/lib/components/VideoPlayerNew/assets/close.svg.js +1 -1
- package/lib/components/VideoPlayerNew/assets/close.svg.mjs +2 -2
- package/lib/components/index.d.ts +0 -1
- package/lib/components/index.js +0 -2
- package/lib/components/index.js.map +1 -1
- package/lib/components/index.mjs +0 -2
- package/lib/components/index.mjs.map +1 -1
- package/lib/constants/icons/header/index.d.ts +0 -1
- package/lib/constants/icons/header/index.js +0 -9
- package/lib/constants/icons/header/index.js.map +1 -1
- package/lib/constants/icons/header/index.mjs +0 -2
- package/lib/constants/icons/header/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 +0 -17
- package/lib/constants/proStoreCategories/mapping/filters.js +0 -17
- package/lib/constants/proStoreCategories/mapping/filters.js.map +1 -1
- package/lib/constants/proStoreCategories/mapping/filters.mjs +0 -17
- package/lib/constants/proStoreCategories/mapping/filters.mjs.map +1 -1
- package/lib/constants/proStoreCategories/mapping/index.d.ts +2 -5
- package/lib/constants/proStoreCategories/mapping/index.js +51 -55
- package/lib/constants/proStoreCategories/mapping/index.js.map +1 -1
- package/lib/constants/proStoreCategories/mapping/index.mjs +49 -54
- package/lib/constants/proStoreCategories/mapping/index.mjs.map +1 -1
- package/lib/constants/proStoreCategories/mapping/mapping.d.ts +0 -5
- package/lib/constants/proStoreCategories/mapping/redirects.js +3 -18
- package/lib/constants/proStoreCategories/mapping/redirects.js.map +1 -1
- package/lib/constants/proStoreCategories/mapping/redirects.mjs +3 -18
- package/lib/constants/proStoreCategories/mapping/redirects.mjs.map +1 -1
- package/lib/constants/proStoreCategories/mapping/unifi.d.ts +9 -10
- package/lib/constants/proStoreCategories/mapping/unifi.js +9 -10
- package/lib/constants/proStoreCategories/mapping/unifi.js.map +1 -1
- package/lib/constants/proStoreCategories/mapping/unifi.mjs +9 -10
- package/lib/constants/proStoreCategories/mapping/unifi.mjs.map +1 -1
- package/lib/constants/proStoreCategories/translations/ar.json.js +1 -8
- package/lib/constants/proStoreCategories/translations/ar.json.js.map +1 -1
- package/lib/constants/proStoreCategories/translations/ar.json.mjs +2 -8
- package/lib/constants/proStoreCategories/translations/ar.json.mjs.map +1 -1
- package/lib/constants/proStoreCategories/translations/de.json.js +0 -7
- package/lib/constants/proStoreCategories/translations/de.json.js.map +1 -1
- package/lib/constants/proStoreCategories/translations/de.json.mjs +1 -7
- package/lib/constants/proStoreCategories/translations/de.json.mjs.map +1 -1
- package/lib/constants/proStoreCategories/translations/el.json.js +1 -8
- package/lib/constants/proStoreCategories/translations/el.json.js.map +1 -1
- package/lib/constants/proStoreCategories/translations/el.json.mjs +2 -8
- package/lib/constants/proStoreCategories/translations/el.json.mjs.map +1 -1
- package/lib/constants/proStoreCategories/translations/en.json.js +2 -7
- package/lib/constants/proStoreCategories/translations/en.json.js.map +1 -1
- package/lib/constants/proStoreCategories/translations/en.json.mjs +3 -7
- package/lib/constants/proStoreCategories/translations/en.json.mjs.map +1 -1
- package/lib/constants/proStoreCategories/translations/es.json.js +1 -8
- package/lib/constants/proStoreCategories/translations/es.json.js.map +1 -1
- package/lib/constants/proStoreCategories/translations/es.json.mjs +2 -8
- package/lib/constants/proStoreCategories/translations/es.json.mjs.map +1 -1
- package/lib/constants/proStoreCategories/translations/fr.json.js +1 -8
- package/lib/constants/proStoreCategories/translations/fr.json.js.map +1 -1
- package/lib/constants/proStoreCategories/translations/fr.json.mjs +2 -8
- package/lib/constants/proStoreCategories/translations/fr.json.mjs.map +1 -1
- package/lib/constants/proStoreCategories/translations/it.json.js +1 -8
- package/lib/constants/proStoreCategories/translations/it.json.js.map +1 -1
- package/lib/constants/proStoreCategories/translations/it.json.mjs +2 -8
- package/lib/constants/proStoreCategories/translations/it.json.mjs.map +1 -1
- package/lib/constants/proStoreCategories/translations/ja.json.js +1 -8
- package/lib/constants/proStoreCategories/translations/ja.json.js.map +1 -1
- package/lib/constants/proStoreCategories/translations/ja.json.mjs +2 -8
- package/lib/constants/proStoreCategories/translations/ja.json.mjs.map +1 -1
- package/lib/constants/proStoreCategories/translations/pt-BR.json.js +0 -7
- package/lib/constants/proStoreCategories/translations/pt-BR.json.js.map +1 -1
- package/lib/constants/proStoreCategories/translations/pt-BR.json.mjs +1 -7
- package/lib/constants/proStoreCategories/translations/pt-BR.json.mjs.map +1 -1
- package/lib/constants/proStoreCategories/translations/zh-Hans.json.js +1 -8
- package/lib/constants/proStoreCategories/translations/zh-Hans.json.js.map +1 -1
- package/lib/constants/proStoreCategories/translations/zh-Hans.json.mjs +2 -8
- package/lib/constants/proStoreCategories/translations/zh-Hans.json.mjs.map +1 -1
- package/lib/constants/proStoreCategories/translations/zh-Hant-TW.json.js +1 -8
- package/lib/constants/proStoreCategories/translations/zh-Hant-TW.json.js.map +1 -1
- package/lib/constants/proStoreCategories/translations/zh-Hant-TW.json.mjs +2 -8
- package/lib/constants/proStoreCategories/translations/zh-Hant-TW.json.mjs.map +1 -1
- package/lib/constants/proStoreFilters/mapping.d.ts +4 -56
- package/lib/constants/proStoreFilters/mapping.js +11 -141
- package/lib/constants/proStoreFilters/mapping.js.map +1 -1
- package/lib/constants/proStoreFilters/mapping.mjs +11 -141
- package/lib/constants/proStoreFilters/mapping.mjs.map +1 -1
- package/lib/constants/theme.js +0 -4
- package/lib/constants/theme.js.map +1 -1
- package/lib/constants/theme.mjs +0 -4
- package/lib/constants/theme.mjs.map +1 -1
- package/lib/contexts/MenuContext/context.js +34 -34
- package/lib/contexts/MenuContext/context.js.map +1 -1
- package/lib/contexts/MenuContext/context.mjs +1 -1
- package/lib/contexts/MenuContext/context.mjs.map +1 -1
- package/lib/contexts/MenuContext/mapping.js.map +1 -1
- package/lib/contexts/MenuContext/mapping.mjs.map +1 -1
- package/lib/helpers/index.js +0 -1
- package/lib/helpers/index.js.map +1 -1
- package/lib/helpers/index.mjs +1 -1
- package/lib/helpers/proStoreCategories.js +2 -2
- package/lib/helpers/ux.d.ts +0 -8
- package/lib/helpers/ux.js +0 -15
- package/lib/helpers/ux.js.map +1 -1
- package/lib/helpers/ux.mjs +1 -15
- package/lib/helpers/ux.mjs.map +1 -1
- package/lib/hooks/useHasTouch.js +3 -3
- package/lib/hooks/useHddRetentionCalculator.js +5 -5
- package/lib/hooks/useHorizontalScroll.js +2 -2
- package/lib/hooks/useLockBodyScrollCustom.js +3 -3
- package/lib/hooks/useScrollToY.js +2 -2
- package/lib/hooks/useTestMediaElementVolumeSetter.js +3 -3
- package/lib/hooks/useTranslation.js +6 -6
- package/lib/utils/nextjs/ssr/registry.js +2 -2
- package/package.json +1 -1
- package/lib/assets/arrow2.svg +0 -3
- package/lib/assets/cart-secondary.svg +0 -5
- package/lib/assets/icon-location-pin.svg +0 -5
- package/lib/assets/icons/cart-secondary.svg.js +0 -27
- package/lib/assets/icons/cart-secondary.svg.js.map +0 -1
- package/lib/assets/icons/cart-secondary.svg.mjs +0 -3
- package/lib/assets/icons/cart-secondary.svg.mjs.map +0 -1
- package/lib/assets/icons/menu/icon-location-pin.svg.js.map +0 -1
- package/lib/assets/icons/menu/icon-location-pin.svg.mjs +0 -3
- package/lib/assets/icons/menu/icon-location-pin.svg.mjs.map +0 -1
- package/lib/components/ButtonGroupBasic/index.stories.d.ts +0 -6
- package/lib/components/Header/Header.stories.d.ts +0 -111
- package/lib/components/Header/LogoIcon/LogoIcon.d.ts +0 -7
- package/lib/components/Header/LogoIcon/LogoIcon.js +0 -46
- package/lib/components/Header/LogoIcon/LogoIcon.js.map +0 -1
- package/lib/components/Header/LogoIcon/LogoIcon.mjs +0 -36
- package/lib/components/Header/LogoIcon/LogoIcon.mjs.map +0 -1
- package/lib/components/Header/LogoIcon/index.d.ts +0 -1
- package/lib/components/Header/LogoIcon/index.js +0 -6
- package/lib/components/Header/LogoIcon/index.js.map +0 -1
- package/lib/components/Header/LogoIcon/index.mjs +0 -3
- package/lib/components/Header/LogoIcon/index.mjs.map +0 -1
- package/lib/components/ProductTechSpecsV2/ProductTechSpecs.d.ts +0 -2
- package/lib/components/ProductTechSpecsV2/ProductTechSpecs.js +0 -79
- package/lib/components/ProductTechSpecsV2/ProductTechSpecs.js.map +0 -1
- package/lib/components/ProductTechSpecsV2/ProductTechSpecs.mjs +0 -71
- package/lib/components/ProductTechSpecsV2/ProductTechSpecs.mjs.map +0 -1
- package/lib/components/ProductTechSpecsV2/ProductTechSpecs.stories.d.ts +0 -5
- package/lib/components/ProductTechSpecsV2/ProductTechSpecs.styles.d.ts +0 -11
- package/lib/components/ProductTechSpecsV2/ProductTechSpecs.styles.js +0 -86
- package/lib/components/ProductTechSpecsV2/ProductTechSpecs.styles.js.map +0 -1
- package/lib/components/ProductTechSpecsV2/ProductTechSpecs.styles.mjs +0 -72
- package/lib/components/ProductTechSpecsV2/ProductTechSpecs.styles.mjs.map +0 -1
- package/lib/components/ProductTechSpecsV2/ProductTechSpecs.types.d.ts +0 -12
- package/lib/components/ProductTechSpecsV2/index.d.ts +0 -1
- package/lib/components/ProductTechSpecsV2/index.js +0 -6
- package/lib/components/ProductTechSpecsV2/index.js.map +0 -1
- package/lib/components/ProductTechSpecsV2/index.mjs +0 -3
- package/lib/components/ProductTechSpecsV2/index.mjs.map +0 -1
- package/lib/constants/icons/header/arrow.svg.js +0 -27
- package/lib/constants/icons/header/arrow.svg.js.map +0 -1
- package/lib/constants/icons/header/arrow.svg.mjs +0 -3
- package/lib/constants/icons/header/arrow.svg.mjs.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ScrollWrapper.mjs","sources":["../../../src/components/ScrollWrapper/ScrollWrapper.tsx"],"sourcesContent":["import { useCallback, useEffect, useMemo, useRef, useState } from \"react\";\nimport { useMeasure, useScroll, useWindowSize } from \"react-use\";\n\nimport ArrowRightIcon from \"../../assets/icons/arrowRight.svg\";\nimport { useHorizontalScroll } from \"../../hooks/useHorizontalScroll\";\nimport * as S from \"./ScrollWrapper.styles\";\nimport { FADE_BUTTON_SIZE } from \"./ScrollWrapper.styles\";\nimport type { ScrollWrapperProps } from \"./ScrollWrapper.types\";\n\nconst SCROLL_CONTAINER_ITEM_CLASS_NAME = \"scroll-container-item\";\n\nconst NEAR_BOUNDARY_WIDTH = 10;\n\nexport const ScrollWrapper = function ScrollWrapper({\n align,\n direction,\n items,\n fillType,\n fillColor,\n accentColor,\n arrowColor,\n scrollStepType = \"scrollScreen\",\n gap,\n className,\n arrowFadeColor,\n activeIndex,\n circleArrowBackground,\n arrowGap,\n gradientSize,\n hideArrows,\n onScrollChange,\n enableWheelScroll,\n arrowIcon,\n draggable,\n alignActive = \"center\",\n disableScrollToActive,\n}: ScrollWrapperProps) {\n // #############################################################################\n // Container ref\n // #############################################################################\n const containerRef = useRef<null | HTMLDivElement>(null);\n const [containerMeasureRef, containerSize] = useMeasure<HTMLDivElement>();\n\n useHorizontalScroll(containerRef, !!enableWheelScroll);\n\n // Set measure ref\n useEffect(() => {\n if (containerRef.current) {\n containerMeasureRef(containerRef.current);\n }\n }, [containerMeasureRef]);\n\n const getContainerItemWidth = useCallback((): number => {\n const containerItem = containerRef.current?.querySelector(\n `.${SCROLL_CONTAINER_ITEM_CLASS_NAME}`,\n );\n\n if (!containerItem) {\n return 0;\n }\n\n return containerItem.getBoundingClientRect().width;\n }, []);\n\n const getInvisibleItemOffset = useCallback(\n ({ scrollDirection }: { scrollDirection: 1 | -1 }): number => {\n if (!containerRef.current) {\n return 0; // If container is not available, return 0\n }\n\n const container = containerRef.current;\n const items = container.querySelectorAll(\n `.${SCROLL_CONTAINER_ITEM_CLASS_NAME}`,\n );\n const containerRect = container.getBoundingClientRect();\n const isHorizontal = direction === \"horizontal\";\n\n // Offset for gradient element, as it covers the last item\n const fadeSize = 20;\n\n if (isHorizontal) {\n const padding =\n scrollDirection === 1\n ? parseFloat(window.getComputedStyle(container)[\"paddingRight\"])\n : parseFloat(window.getComputedStyle(container)[\"paddingLeft\"]);\n const offset = Math.max(padding, fadeSize);\n const containerEdgeWithoutPadding =\n scrollDirection === 1\n ? containerRect[\"right\"] - offset\n : containerRect[\"left\"] + offset;\n\n if (scrollDirection === 1) {\n for (const item of Array.from(items)) {\n const itemRect = item.getBoundingClientRect();\n // Check if item is partially or fully invisible horizontally\n if (itemRect.right > containerEdgeWithoutPadding) {\n return Math.abs(itemRect.right - containerEdgeWithoutPadding);\n }\n }\n } else {\n for (let i = items.length - 1; i >= 0; i--) {\n const item = items[i];\n if (item) {\n const itemRect = item.getBoundingClientRect();\n // Check if item is partially or fully invisible horizontally\n if (itemRect.left < containerEdgeWithoutPadding) {\n return Math.abs(containerEdgeWithoutPadding - itemRect.left);\n }\n }\n }\n }\n } else {\n const padding =\n scrollDirection === 1\n ? parseFloat(window.getComputedStyle(container)[\"paddingBottom\"])\n : parseFloat(window.getComputedStyle(container)[\"paddingTop\"]);\n const offset = Math.max(padding, fadeSize);\n\n const containerEdgeWithoutPadding =\n scrollDirection === 1\n ? containerRect[\"bottom\"] - offset\n : containerRect[\"top\"] + offset;\n\n if (scrollDirection === 1) {\n for (const item of Array.from(items)) {\n const itemRect = item.getBoundingClientRect();\n // Check if item is partially or fully invisible vertically\n if (itemRect.bottom > containerEdgeWithoutPadding) {\n return Math.abs(itemRect.bottom - containerEdgeWithoutPadding);\n }\n }\n } else {\n for (let i = items.length - 1; i >= 0; i--) {\n const item = items[i];\n if (item) {\n const itemRect = item.getBoundingClientRect();\n // Check if item is partially or fully invisible vertically\n if (itemRect.top < containerEdgeWithoutPadding) {\n return Math.abs(containerEdgeWithoutPadding - itemRect.top);\n }\n }\n }\n }\n }\n\n // If all items are fully visible, return 0\n return 0;\n },\n [direction],\n );\n\n const getVisibleItemsWidth = useCallback((): number => {\n if (!containerRef.current) {\n return 0;\n }\n\n const containerRect = containerRef.current.getBoundingClientRect();\n const containerItems = containerRef.current.querySelectorAll(\n `.${SCROLL_CONTAINER_ITEM_CLASS_NAME}`,\n );\n\n let visibleItemsWidth = 0;\n\n containerItems.forEach((item) => {\n const itemRect = item.getBoundingClientRect();\n\n if (\n (direction === \"horizontal\" &&\n itemRect.left >= containerRect.left &&\n itemRect.right <= containerRect.right) ||\n (direction === \"vertical\" &&\n itemRect.top >= containerRect.top &&\n itemRect.bottom <= containerRect.bottom)\n ) {\n // Do not add gap for first item because gaps should always be \"gaps = items - 1\"\n if (visibleItemsWidth !== 0 && gap !== undefined) {\n visibleItemsWidth += gap;\n }\n\n visibleItemsWidth +=\n direction === \"horizontal\" ? itemRect.width : itemRect.height;\n }\n });\n\n return visibleItemsWidth;\n }, [direction, gap]);\n\n const getActiveIndexOffset = useCallback(\n (index: number): { left: number | undefined; top: number | undefined } => {\n const offset: { left: undefined | number; top: undefined | number } = {\n left: undefined,\n top: undefined,\n };\n if (!containerRef.current) {\n return offset;\n }\n\n const containerRect = containerRef.current.getBoundingClientRect();\n const actNav = containerRef.current.children[index] as HTMLElement;\n\n if (actNav) {\n const actNavRect = actNav.getBoundingClientRect();\n\n if (direction === \"horizontal\") {\n if (alignActive === \"left\") {\n // Align active item to the left\n if (\n actNavRect.left < containerRect.left ||\n actNavRect.right > containerRect.right\n ) {\n offset.left =\n actNavRect.left -\n containerRect.left +\n containerRef.current.scrollLeft;\n }\n } else {\n // Default behavior: Align active item to the center\n if (actNavRect.right > containerRect.right) {\n offset.left =\n actNavRect.right -\n containerRect.right +\n containerRef.current.scrollLeft +\n (!hideArrows ? FADE_BUTTON_SIZE : 0) +\n containerRect.width / 2 -\n actNavRect.width / 2;\n } else if (actNavRect.left < containerRect.left) {\n offset.left =\n actNavRect.left -\n containerRect.left +\n containerRef.current.scrollLeft -\n (!hideArrows ? FADE_BUTTON_SIZE : 0) -\n containerRect.width / 2 +\n actNavRect.width / 2;\n }\n }\n } else if (direction === \"vertical\") {\n if (actNavRect.bottom > containerRect.bottom) {\n offset.top =\n actNavRect.bottom -\n containerRect.bottom +\n containerRef.current.scrollTop +\n (!hideArrows ? FADE_BUTTON_SIZE : 0);\n } else if (actNavRect.top < containerRect.top) {\n offset.top =\n actNavRect.top -\n containerRect.top +\n containerRef.current.scrollTop +\n (!hideArrows ? FADE_BUTTON_SIZE : 0);\n }\n }\n }\n\n return offset;\n },\n [direction, alignActive, hideArrows],\n );\n\n // #############################################################################\n // Handle scrolling\n // #############################################################################\n const { x: refScrollX, y: refScrollY } = useScroll(containerRef);\n // Keep track of window size to detect resize\n const windowSize = useWindowSize();\n\n // Keep track of the current scroll position and size\n // State is needed due to initial not being tracked by useScroll\n const [scrollX, setScrollX] = useState(0);\n const [scrollY, setScrollY] = useState(0);\n\n // Set initial data\n useEffect(() => {\n if (!containerRef.current) return;\n\n const initScrollX = containerRef.current.scrollLeft;\n const initScrollY = containerRef.current.scrollTop;\n\n setScrollX(initScrollX);\n setScrollY(initScrollY);\n\n onScrollChange?.({\n scrollX: initScrollX,\n scrollY: initScrollY,\n scrollWidth: containerRef.current.scrollWidth,\n });\n }, [onScrollChange]);\n\n // Set scroll positions on scroll and resize\n useEffect(() => {\n setScrollX(refScrollX);\n setScrollY(refScrollY);\n\n onScrollChange?.({\n scrollX: refScrollX,\n scrollY: refScrollY,\n scrollWidth: containerRef.current?.scrollWidth ?? 0,\n });\n }, [\n // HACK: needed windowSize to retrigger the effect\n windowSize,\n // #############################################################################\n onScrollChange,\n refScrollX,\n refScrollY,\n ]);\n\n // #############################################################################\n // Parse fade display state\n // #############################################################################\n const [showFadeStart, setShowFadeStart] = useState(false);\n const [showFadeEnd, setShowFadeEnd] = useState(false);\n\n useEffect(() => {\n if (!containerRef.current) return;\n\n const width = containerRef.current.offsetWidth;\n const height = containerRef.current.offsetHeight;\n const scrollWidth = containerRef.current.scrollWidth;\n const scrollHeight = containerRef.current.scrollHeight;\n\n // 1px added to fix issue with 1 pixel (sometimes arrow doesn't disappear when it should)\n // happens only when scroll behavior is smooth\n const scrollXFixOffset = 1;\n\n switch (direction) {\n case \"horizontal\":\n setShowFadeStart(scrollX > 0);\n\n setShowFadeEnd(\n Math.ceil(scrollX + scrollXFixOffset) < scrollWidth - width,\n );\n break;\n case \"vertical\":\n setShowFadeStart(scrollY > 0);\n setShowFadeEnd(\n Math.ceil(scrollY + scrollXFixOffset) < scrollHeight - height,\n );\n break;\n }\n }, [\n // HACK: needed windowSize, containerSize.width to retrigger the effect\n containerSize.width,\n windowSize,\n // #############################################################################\n direction,\n scrollX,\n scrollY,\n items,\n ]);\n\n // #############################################################################\n // Handle arrow click scroll\n // #############################################################################\n const handleArrowClick = useCallback(\n (first: boolean) => {\n // Ensure the container reference is available\n const container = containerRef.current;\n if (!container) return;\n\n // Determine the scroll direction based on the `first` parameter\n const scrollDirection = first ? -1 : 1;\n\n // Destructure properties from the container for ease of use\n const {\n scrollWidth,\n scrollHeight,\n offsetWidth,\n offsetHeight,\n clientWidth,\n } = container;\n\n // Determine if the scrolling direction is horizontal or vertical\n const isHorizontal = direction === \"horizontal\";\n const scrollPosition = isHorizontal ? scrollX : scrollY;\n const scrollSize = isHorizontal ? scrollWidth : scrollHeight;\n\n // Calculate the scroll step based on the scrollStepType\n let scrollStep = 0;\n switch (scrollStepType) {\n case \"scrollScreen\":\n scrollStep = isHorizontal ? offsetWidth : offsetHeight;\n break;\n case \"itemWidth\":\n scrollStep = getContainerItemWidth();\n break;\n case \"visibleItemsWidth\":\n scrollStep = getVisibleItemsWidth();\n break;\n case \"nextItem\":\n scrollStep = getInvisibleItemOffset({\n scrollDirection,\n });\n break;\n }\n\n // Calculate the new scroll position\n const newScrollPosition =\n scrollPosition + scrollDirection * (scrollStep + (gap ?? 0));\n\n // Ensure the new scroll position is within bounds\n const newScrollPositionWithinBounds = Math.max(\n 0,\n Math.min(scrollSize - scrollStep, newScrollPosition),\n );\n\n // Calculate the possible scroll amount\n const possibleScroll = scrollSize - clientWidth;\n const nearBoundary = NEAR_BOUNDARY_WIDTH;\n\n // Scroll to the beginning if the new position is near the start\n if (newScrollPosition < nearBoundary || newScrollPosition < 0) {\n container.scrollTo({\n left: 0,\n top: 0,\n behavior: \"smooth\",\n });\n return;\n }\n\n // Scroll to the end if the new position is near the end\n if (\n possibleScroll - newScrollPosition < nearBoundary ||\n newScrollPosition > possibleScroll\n ) {\n container.scrollTo({\n left: possibleScroll,\n top: possibleScroll,\n behavior: \"smooth\",\n });\n return;\n }\n\n // Smooth scroll to the new position within bounds\n container.scrollTo({\n left: isHorizontal ? newScrollPositionWithinBounds : undefined,\n top: !isHorizontal ? newScrollPositionWithinBounds : undefined,\n behavior: \"smooth\",\n });\n },\n [\n direction,\n scrollX,\n scrollY,\n scrollStepType,\n gap,\n getContainerItemWidth,\n getVisibleItemsWidth,\n getInvisibleItemOffset,\n ],\n );\n\n // #############################################################################\n // Scroll to start or active index on mount\n // #############################################################################\n useEffect(() => {\n window.setTimeout(() => {\n if (!containerRef.current || disableScrollToActive) return;\n\n // Scroll into view, if activeIndex is provided\n if (activeIndex !== undefined && activeIndex > -1) {\n const offset = getActiveIndexOffset(activeIndex);\n\n if (offset.left !== undefined) {\n containerRef.current.scrollLeft = offset.left;\n }\n if (offset.top !== undefined) {\n containerRef.current.scrollTop = offset.top;\n }\n } else {\n containerRef.current.scrollTo({\n left: 0,\n top: 0,\n behavior: \"smooth\",\n });\n }\n }, 0);\n }, [activeIndex, getActiveIndexOffset, disableScrollToActive]);\n\n // #############################################################################\n // Arrow icon\n // #############################################################################\n const arrowIconSrc = useMemo(() => {\n const icon = arrowIcon?.icon ?? ArrowRightIcon;\n\n return typeof icon === \"string\" ? icon : icon.src;\n }, [arrowIcon]);\n\n // #############################################################################\n // Handle drag scroll\n // #############################################################################\n useEffect(() => {\n if (!draggable || !containerRef.current) return;\n\n const container = containerRef.current;\n let isDragging = false;\n let hasDragged = false;\n let startX = 0;\n let startY = 0;\n let scrollLeft = 0;\n let scrollTop = 0;\n\n const onPointerDown = (e: PointerEvent) => {\n if (e.pointerType !== \"mouse\" || e.buttons !== 1) return;\n\n isDragging = true;\n hasDragged = false;\n startX = e.pageX - container.offsetLeft;\n startY = e.pageY - container.offsetTop;\n scrollLeft = container.scrollLeft;\n scrollTop = container.scrollTop;\n document.body.style.cursor = \"grabbing\";\n container.style.cursor = \"grabbing\";\n };\n\n const onPointerMove = (e: PointerEvent) => {\n if (e.pointerType !== \"mouse\") return;\n\n if (!isDragging) return;\n\n e.preventDefault();\n hasDragged = true;\n\n const walkMultiplier = 1; // Adjust the multiplier for faster/slower scrolling\n\n const x = e.pageX - container.offsetLeft;\n const y = e.pageY - container.offsetTop;\n const walkX = (x - startX) * walkMultiplier;\n const walkY = (y - startY) * walkMultiplier;\n container.scrollLeft = scrollLeft - walkX;\n container.scrollTop = scrollTop - walkY;\n };\n\n const onPointerUp = (e: PointerEvent) => {\n if (e.pointerType !== \"mouse\") return;\n\n isDragging = false;\n document.body.style.cursor = \"unset\";\n container.style.cursor = \"unset\";\n };\n\n const onVisibilityChange = () => {\n isDragging = false;\n document.body.style.cursor = \"unset\";\n container.style.cursor = \"unset\";\n hasDragged = false;\n };\n\n const onClick = (e: MouseEvent) => {\n if (hasDragged) {\n e.preventDefault(); // Prevents anchor tag from navigating if dragging occurred\n e.stopPropagation();\n }\n };\n\n container.addEventListener(\"pointerdown\", onPointerDown);\n document.addEventListener(\"pointermove\", onPointerMove);\n document.addEventListener(\"pointerup\", onPointerUp);\n\n document.addEventListener(\"visibilitychange\", onVisibilityChange);\n\n // Prevent clicks on anchor tags after dragging\n container.querySelectorAll(\"a\").forEach((anchor) => {\n anchor.addEventListener(\"click\", onClick);\n });\n\n return () => {\n container.removeEventListener(\"pointerdown\", onPointerDown);\n document.removeEventListener(\"pointermove\", onPointerMove);\n document.removeEventListener(\"pointerup\", onPointerUp);\n\n document.removeEventListener(\"visibilitychange\", onVisibilityChange);\n\n container.querySelectorAll(\"a\").forEach((anchor) => {\n anchor.removeEventListener(\"click\", onClick);\n });\n };\n }, [draggable]);\n\n // #############################################################################\n // Render\n // #############################################################################\n return (\n <S.OuterContainer\n $align={align}\n $direction={direction}\n $showFadeStart={showFadeStart}\n $showFadeEnd={showFadeEnd}\n $fillType={fillType}\n $fillColor={fillColor}\n $gradientSize={gradientSize}\n className={className}\n >\n <S.ScrollContainer ref={containerRef} $direction={direction} $gap={gap}>\n {items.map((item, i) => (\n <S.Item\n key={item.id + i}\n className={SCROLL_CONTAINER_ITEM_CLASS_NAME}\n $draggable={!!draggable}\n >\n {item.render()}\n </S.Item>\n ))}\n </S.ScrollContainer>\n\n <S.LeftArrowIcon\n $show={showFadeStart && !hideArrows}\n $first\n $fillType={fillType}\n $fillColor={fillColor}\n $accentColor={accentColor}\n $direction={direction}\n $arrowFadeColor={arrowFadeColor}\n $circleArrowBackground={circleArrowBackground}\n onClick={() => handleArrowClick(true)}\n $arrowGap={arrowGap}\n >\n <S.ArrowIconSvg\n $arrowColor={arrowColor}\n width={arrowIcon?.width ?? (circleArrowBackground ? 10 : 8)}\n height={arrowIcon?.height ?? (circleArrowBackground ? 16 : 13)}\n src={arrowIconSrc}\n />\n </S.LeftArrowIcon>\n\n <S.RightArrowIcon\n $show={showFadeEnd && !hideArrows}\n $fillType={fillType}\n $fillColor={fillColor}\n $accentColor={accentColor}\n $direction={direction}\n $arrowFadeColor={arrowFadeColor}\n $circleArrowBackground={circleArrowBackground}\n onClick={() => handleArrowClick(false)}\n $arrowGap={arrowGap}\n >\n <S.ArrowIconSvg\n $arrowColor={arrowColor}\n width={arrowIcon?.width ?? (circleArrowBackground ? 10 : 8)}\n height={arrowIcon?.height ?? (circleArrowBackground ? 16 : 13)}\n src={arrowIconSrc}\n />\n </S.RightArrowIcon>\n </S.OuterContainer>\n );\n};\n"],"names":["SCROLL_CONTAINER_ITEM_CLASS_NAME","NEAR_BOUNDARY_WIDTH","ScrollWrapper","ScrollWrapper2","align","direction","items","fillType","fillColor","accentColor","arrowColor","scrollStepType","gap","className","arrowFadeColor","activeIndex","circleArrowBackground","arrowGap","gradientSize","hideArrows","onScrollChange","enableWheelScroll","arrowIcon","draggable","alignActive","disableScrollToActive","containerRef","useRef","containerMeasureRef","containerSize","useMeasure","useHorizontalScroll","useEffect","current","getContainerItemWidth","useCallback","containerItem","querySelector","getBoundingClientRect","width","getInvisibleItemOffset","scrollDirection","container","querySelectorAll","containerRect","isHorizontal","fadeSize","padding","parseFloat","window","getComputedStyle","offset","Math","max","containerEdgeWithoutPadding","item","Array","from","itemRect","right","abs","i","length","left","bottom","top","getVisibleItemsWidth","containerItems","visibleItemsWidth","forEach","height","getActiveIndexOffset","index","actNav","children","actNavRect","scrollLeft","FADE_BUTTON_SIZE","scrollTop","x","refScrollX","y","refScrollY","useScroll","windowSize","useWindowSize","scrollX","setScrollX","useState","scrollY","setScrollY","initScrollX","initScrollY","scrollWidth","showFadeStart","setShowFadeStart","showFadeEnd","setShowFadeEnd","offsetWidth","offsetHeight","scrollHeight","scrollXFixOffset","ceil","handleArrowClick","first","clientWidth","scrollPosition","scrollSize","scrollStep","newScrollPosition","newScrollPositionWithinBounds","min","possibleScroll","nearBoundary","scrollTo","behavior","setTimeout","arrowIconSrc","useMemo","icon","ArrowRightIcon","src","isDragging","hasDragged","startX","startY","onPointerDown","e","pointerType","buttons","pageX","offsetLeft","pageY","offsetTop","document","body","style","cursor","onPointerMove","preventDefault","walkMultiplier","walkX","walkY","onPointerUp","onVisibilityChange","onClick","stopPropagation","addEventListener","anchor","removeEventListener","jsxs","S.OuterContainer","$align","$direction","$showFadeStart","$showFadeEnd","$fillType","$fillColor","$gradientSize","jsx","S.ScrollContainer","ref","$gap","map","S.Item","$draggable","render","id","S.LeftArrowIcon","$show","$first","$accentColor","$arrowFadeColor","$circleArrowBackground","$arrowGap","S.ArrowIconSvg","$arrowColor","S.RightArrowIcon"],"mappings":";;;;;;;;AASA,MAAMA,gCAAmC,GAAA,uBAAA;AAEzC,MAAMC,mBAAsB,GAAA,EAAA;AAEf,MAAAC,aAAA,GAAgB,SAASA,cAAcC,CAAA;EAClDC,KAAA;EACAC,SAAA;EACAC,KAAA;EACAC,QAAA;EACAC,SAAA;EACAC,WAAA;EACAC,UAAA;EACAC,cAAiB,GAAA,cAAA;EACjBC,GAAA;EACAC,SAAA;EACAC,cAAA;EACAC,WAAA;EACAC,qBAAA;EACAC,QAAA;EACAC,YAAA;EACAC,UAAA;EACAC,cAAA;EACAC,iBAAA;EACAC,SAAA;EACAC,SAAA;EACAC,WAAc,GAAA,QAAA;EACdC;AACF,CAAuB,EAAA;EAIf,MAAAC,YAAA,GAAeC,OAA8B,IAAI,CAAA;EACvD,MAAM,CAACC,mBAAA,EAAqBC,aAAa,CAAA,GAAIC,UAA2B,CAAA,CAAA;EAEpDC,mBAAA,CAAAL,YAAA,EAAc,CAAC,CAACL,iBAAiB,CAAA;EAGrDW,SAAA,CAAU,MAAM;IACd,IAAIN,aAAaO,OAAS,EAAA;MACxBL,mBAAA,CAAoBF,aAAaO,OAAO,CAAA;IAC1C;EAAA,CACF,EAAG,CAACL,mBAAmB,CAAC,C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AAU,KAAAvB,qBAAA,GAAwB,EAAK,GAAA,CAAA,CAAA;QACzDsD,MAAQ,EAAAhD,SAAA,EAAWgD,MAAW,KAAAtD,qBAAA,GAAwB,EAAK,GAAA,EAAA,CAAA;QAC3DyG,GAAK,EAAAJ;MAAA,CACP;IAAA,CACF,CAAA,EAAA,eAEA0C,GAAA,CAACkB,cAAE,EAAF;MACCR,KAAA,EAAOzE,eAAe,CAAC7E,UAAA;MACvByI,SAAW,EAAArJ,QAAA;MACXsJ,UAAY,EAAArJ,SAAA;MACZmK,YAAc,EAAAlK,WAAA;MACdgJ,UAAY,EAAApJ,SAAA;MACZuK,eAAiB,EAAA9J,cAAA;MACjB+J,sBAAwB,EAAA7J,qBAAA;MACxBiI,OAAA,EAASA,CAAA,KAAM1C,gBAAA,CAAiB,KAAK,CAAA;MACrCuE,SAAW,EAAA7J,QAAA;MAEXyD,QAAA,iBAAAqF,GAAA,CAACgB,YAAE,EAAF;QACCC,WAAa,EAAAtK,UAAA;QACb6B,KAAO,EAAAjB,SAAA,EAAWiB,KAAU,KAAAvB,qBAAA,GAAwB,EAAK,GAAA,CAAA,CAAA;QACzDsD,MAAQ,EAAAhD,SAAA,EAAWgD,MAAW,KAAAtD,qBAAA,GAAwB,EAAK,GAAA,EAAA,CAAA;QAC3DyG,GAAK,EAAAJ;MAAA,CACP;IAAA,CACF,CAAA;EAAA,CAAA,CACF;AAEJ,CAAA;"}
|
|
1
|
+
{"version":3,"file":"ScrollWrapper.mjs","sources":["../../../src/components/ScrollWrapper/ScrollWrapper.tsx"],"sourcesContent":["import { useCallback, useEffect, useMemo, useRef, useState } from \"react\";\nimport { useMeasure, useScroll, useWindowSize } from \"react-use\";\n\nimport ArrowRightIcon from \"../../assets/icons/arrowRight.svg\";\nimport { useHorizontalScroll } from \"../../hooks/useHorizontalScroll\";\nimport * as S from \"./ScrollWrapper.styles\";\nimport { FADE_BUTTON_SIZE } from \"./ScrollWrapper.styles\";\nimport type { ScrollWrapperProps } from \"./ScrollWrapper.types\";\n\nconst SCROLL_CONTAINER_ITEM_CLASS_NAME = \"scroll-container-item\";\n\nconst NEAR_BOUNDARY_WIDTH = 10;\n\nexport const ScrollWrapper = function ScrollWrapper({\n align,\n direction,\n items,\n fillType,\n fillColor,\n accentColor,\n arrowColor,\n scrollStepType = \"scrollScreen\",\n gap,\n className,\n arrowFadeColor,\n activeIndex,\n circleArrowBackground,\n arrowGap,\n gradientSize,\n hideArrows,\n onScrollChange,\n enableWheelScroll,\n arrowIcon,\n draggable,\n}: ScrollWrapperProps) {\n // #############################################################################\n // Container ref\n // #############################################################################\n const containerRef = useRef<null | HTMLDivElement>(null);\n const [containerMeasureRef, containerSize] = useMeasure<HTMLDivElement>();\n\n useHorizontalScroll(containerRef, !!enableWheelScroll);\n\n // Set measure ref\n useEffect(() => {\n if (containerRef.current) {\n containerMeasureRef(containerRef.current);\n }\n }, [containerMeasureRef]);\n\n const getContainerItemWidth = useCallback((): number => {\n const containerItem = containerRef.current?.querySelector(\n `.${SCROLL_CONTAINER_ITEM_CLASS_NAME}`,\n );\n\n if (!containerItem) {\n return 0;\n }\n\n return containerItem.getBoundingClientRect().width;\n }, []);\n\n const getInvisibleItemOffset = useCallback(\n ({ scrollDirection }: { scrollDirection: 1 | -1 }): number => {\n if (!containerRef.current) {\n return 0; // If container is not available, return 0\n }\n\n const container = containerRef.current;\n const items = container.querySelectorAll(\n `.${SCROLL_CONTAINER_ITEM_CLASS_NAME}`,\n );\n const containerRect = container.getBoundingClientRect();\n const isHorizontal = direction === \"horizontal\";\n\n // Offset for gradient element, as it covers the last item\n const fadeSize = 20;\n\n if (isHorizontal) {\n const padding =\n scrollDirection === 1\n ? parseFloat(window.getComputedStyle(container)[\"paddingRight\"])\n : parseFloat(window.getComputedStyle(container)[\"paddingLeft\"]);\n const offset = Math.max(padding, fadeSize);\n const containerEdgeWithoutPadding =\n scrollDirection === 1\n ? containerRect[\"right\"] - offset\n : containerRect[\"left\"] + offset;\n\n if (scrollDirection === 1) {\n for (const item of Array.from(items)) {\n const itemRect = item.getBoundingClientRect();\n // Check if item is partially or fully invisible horizontally\n if (itemRect.right > containerEdgeWithoutPadding) {\n return Math.abs(itemRect.right - containerEdgeWithoutPadding);\n }\n }\n } else {\n for (let i = items.length - 1; i >= 0; i--) {\n const item = items[i];\n if (item) {\n const itemRect = item.getBoundingClientRect();\n // Check if item is partially or fully invisible horizontally\n if (itemRect.left < containerEdgeWithoutPadding) {\n return Math.abs(containerEdgeWithoutPadding - itemRect.left);\n }\n }\n }\n }\n } else {\n const padding =\n scrollDirection === 1\n ? parseFloat(window.getComputedStyle(container)[\"paddingBottom\"])\n : parseFloat(window.getComputedStyle(container)[\"paddingTop\"]);\n const offset = Math.max(padding, fadeSize);\n\n const containerEdgeWithoutPadding =\n scrollDirection === 1\n ? containerRect[\"bottom\"] - offset\n : containerRect[\"top\"] + offset;\n\n if (scrollDirection === 1) {\n for (const item of Array.from(items)) {\n const itemRect = item.getBoundingClientRect();\n // Check if item is partially or fully invisible vertically\n if (itemRect.bottom > containerEdgeWithoutPadding) {\n return Math.abs(itemRect.bottom - containerEdgeWithoutPadding);\n }\n }\n } else {\n for (let i = items.length - 1; i >= 0; i--) {\n const item = items[i];\n if (item) {\n const itemRect = item.getBoundingClientRect();\n // Check if item is partially or fully invisible vertically\n if (itemRect.top < containerEdgeWithoutPadding) {\n return Math.abs(containerEdgeWithoutPadding - itemRect.top);\n }\n }\n }\n }\n }\n\n // If all items are fully visible, return 0\n return 0;\n },\n [direction],\n );\n\n const getVisibleItemsWidth = useCallback((): number => {\n if (!containerRef.current) {\n return 0;\n }\n\n const containerRect = containerRef.current.getBoundingClientRect();\n const containerItems = containerRef.current.querySelectorAll(\n `.${SCROLL_CONTAINER_ITEM_CLASS_NAME}`,\n );\n\n let visibleItemsWidth = 0;\n\n containerItems.forEach((item) => {\n const itemRect = item.getBoundingClientRect();\n\n if (\n (direction === \"horizontal\" &&\n itemRect.left >= containerRect.left &&\n itemRect.right <= containerRect.right) ||\n (direction === \"vertical\" &&\n itemRect.top >= containerRect.top &&\n itemRect.bottom <= containerRect.bottom)\n ) {\n // Do not add gap for first item because gaps should always be \"gaps = items - 1\"\n if (visibleItemsWidth !== 0 && gap !== undefined) {\n visibleItemsWidth += gap;\n }\n\n visibleItemsWidth +=\n direction === \"horizontal\" ? itemRect.width : itemRect.height;\n }\n });\n\n return visibleItemsWidth;\n }, [direction, gap]);\n\n const getActiveIndexOffset = useCallback(\n (index: number): { left: number | undefined; top: number | undefined } => {\n const offset: { left: undefined | number; top: undefined | number } = {\n left: undefined,\n top: undefined,\n };\n if (!containerRef.current) {\n return offset;\n }\n\n const containerRect = containerRef.current.getBoundingClientRect();\n const actNav = containerRef.current.children[index] as HTMLElement;\n\n if (actNav) {\n const actNavRect = actNav.getBoundingClientRect();\n\n if (direction === \"horizontal\") {\n if (actNavRect.right > containerRect.right) {\n offset.left =\n actNavRect.right -\n containerRect.right +\n containerRef.current.scrollLeft +\n (!hideArrows ? FADE_BUTTON_SIZE : 0) +\n containerRect.width / 2 -\n actNavRect.width / 2;\n } else if (actNavRect.left < containerRect.left) {\n offset.left =\n actNavRect.left -\n containerRect.left +\n containerRef.current.scrollLeft -\n (!hideArrows ? FADE_BUTTON_SIZE : 0) -\n containerRect.width / 2 +\n actNavRect.width / 2;\n }\n } else if (direction === \"vertical\") {\n if (actNavRect.bottom > containerRect.bottom) {\n offset.top =\n actNavRect.bottom -\n containerRect.bottom +\n containerRef.current.scrollTop +\n (!hideArrows ? FADE_BUTTON_SIZE : 0);\n } else if (actNavRect.top < containerRect.top) {\n offset.top =\n actNavRect.top -\n containerRect.top +\n containerRef.current.scrollTop +\n (!hideArrows ? FADE_BUTTON_SIZE : 0);\n }\n }\n }\n return offset;\n },\n [direction, hideArrows],\n );\n\n // #############################################################################\n // Handle scrolling\n // #############################################################################\n const { x: refScrollX, y: refScrollY } = useScroll(containerRef);\n // Keep track of window size to detect resize\n const windowSize = useWindowSize();\n\n // Keep track of the current scroll position and size\n // State is needed due to initial not being tracked by useScroll\n const [scrollX, setScrollX] = useState(0);\n const [scrollY, setScrollY] = useState(0);\n\n // Set initial data\n useEffect(() => {\n if (!containerRef.current) return;\n\n const initScrollX = containerRef.current.scrollLeft;\n const initScrollY = containerRef.current.scrollTop;\n\n setScrollX(initScrollX);\n setScrollY(initScrollY);\n\n onScrollChange?.({\n scrollX: initScrollX,\n scrollY: initScrollY,\n scrollWidth: containerRef.current.scrollWidth,\n });\n }, [onScrollChange]);\n\n // Set scroll positions on scroll and resize\n useEffect(() => {\n setScrollX(refScrollX);\n setScrollY(refScrollY);\n\n onScrollChange?.({\n scrollX: refScrollX,\n scrollY: refScrollY,\n scrollWidth: containerRef.current?.scrollWidth ?? 0,\n });\n }, [\n // HACK: needed windowSize to retrigger the effect\n windowSize,\n // #############################################################################\n onScrollChange,\n refScrollX,\n refScrollY,\n ]);\n\n // #############################################################################\n // Parse fade display state\n // #############################################################################\n const [showFadeStart, setShowFadeStart] = useState(false);\n const [showFadeEnd, setShowFadeEnd] = useState(false);\n\n useEffect(() => {\n if (!containerRef.current) return;\n\n const width = containerRef.current.offsetWidth;\n const height = containerRef.current.offsetHeight;\n const scrollWidth = containerRef.current.scrollWidth;\n const scrollHeight = containerRef.current.scrollHeight;\n\n // 1px added to fix issue with 1 pixel (sometimes arrow doesn't disappear when it should)\n // happens only when scroll behavior is smooth\n const scrollXFixOffset = 1;\n\n switch (direction) {\n case \"horizontal\":\n setShowFadeStart(scrollX > 0);\n\n setShowFadeEnd(\n Math.ceil(scrollX + scrollXFixOffset) < scrollWidth - width,\n );\n break;\n case \"vertical\":\n setShowFadeStart(scrollY > 0);\n setShowFadeEnd(\n Math.ceil(scrollY + scrollXFixOffset) < scrollHeight - height,\n );\n break;\n }\n }, [\n // HACK: needed windowSize, containerSize.width to retrigger the effect\n containerSize.width,\n windowSize,\n // #############################################################################\n direction,\n scrollX,\n scrollY,\n items,\n ]);\n\n // #############################################################################\n // Handle arrow click scroll\n // #############################################################################\n const handleArrowClick = useCallback(\n (first: boolean) => {\n // Ensure the container reference is available\n const container = containerRef.current;\n if (!container) return;\n\n // Determine the scroll direction based on the `first` parameter\n const scrollDirection = first ? -1 : 1;\n\n // Destructure properties from the container for ease of use\n const {\n scrollWidth,\n scrollHeight,\n offsetWidth,\n offsetHeight,\n clientWidth,\n } = container;\n\n // Determine if the scrolling direction is horizontal or vertical\n const isHorizontal = direction === \"horizontal\";\n const scrollPosition = isHorizontal ? scrollX : scrollY;\n const scrollSize = isHorizontal ? scrollWidth : scrollHeight;\n\n // Calculate the scroll step based on the scrollStepType\n let scrollStep = 0;\n switch (scrollStepType) {\n case \"scrollScreen\":\n scrollStep = isHorizontal ? offsetWidth : offsetHeight;\n break;\n case \"itemWidth\":\n scrollStep = getContainerItemWidth();\n break;\n case \"visibleItemsWidth\":\n scrollStep = getVisibleItemsWidth();\n break;\n case \"nextItem\":\n scrollStep = getInvisibleItemOffset({\n scrollDirection,\n });\n break;\n }\n\n // Calculate the new scroll position\n const newScrollPosition =\n scrollPosition + scrollDirection * (scrollStep + (gap ?? 0));\n\n // Ensure the new scroll position is within bounds\n const newScrollPositionWithinBounds = Math.max(\n 0,\n Math.min(scrollSize - scrollStep, newScrollPosition),\n );\n\n // Calculate the possible scroll amount\n const possibleScroll = scrollSize - clientWidth;\n const nearBoundary = NEAR_BOUNDARY_WIDTH;\n\n // Scroll to the beginning if the new position is near the start\n if (newScrollPosition < nearBoundary || newScrollPosition < 0) {\n container.scrollTo({\n left: 0,\n top: 0,\n behavior: \"smooth\",\n });\n return;\n }\n\n // Scroll to the end if the new position is near the end\n if (\n possibleScroll - newScrollPosition < nearBoundary ||\n newScrollPosition > possibleScroll\n ) {\n container.scrollTo({\n left: possibleScroll,\n top: possibleScroll,\n behavior: \"smooth\",\n });\n return;\n }\n\n // Smooth scroll to the new position within bounds\n container.scrollTo({\n left: isHorizontal ? newScrollPositionWithinBounds : undefined,\n top: !isHorizontal ? newScrollPositionWithinBounds : undefined,\n behavior: \"smooth\",\n });\n },\n [\n direction,\n scrollX,\n scrollY,\n scrollStepType,\n gap,\n getContainerItemWidth,\n getVisibleItemsWidth,\n getInvisibleItemOffset,\n ],\n );\n\n // #############################################################################\n // Scroll to start or active index on mount\n // #############################################################################\n useEffect(() => {\n window.setTimeout(() => {\n if (!containerRef.current) return;\n\n // Scroll into view, if activeIndex is provided\n if (activeIndex !== undefined && activeIndex > -1) {\n const offset = getActiveIndexOffset(activeIndex);\n\n if (offset.left !== undefined) {\n containerRef.current.scrollLeft = offset.left;\n }\n if (offset.top !== undefined) {\n containerRef.current.scrollTop = offset.top;\n }\n } else {\n containerRef.current.scrollTo({\n left: 0,\n top: 0,\n behavior: \"smooth\",\n });\n }\n }, 0);\n }, [activeIndex, getActiveIndexOffset]);\n\n // #############################################################################\n // Arrow icon\n // #############################################################################\n const arrowIconSrc = useMemo(() => {\n const icon = arrowIcon?.icon ?? ArrowRightIcon;\n\n return typeof icon === \"string\" ? icon : icon.src;\n }, [arrowIcon]);\n\n // #############################################################################\n // Handle drag scroll\n // #############################################################################\n useEffect(() => {\n if (!draggable || !containerRef.current) return;\n\n const container = containerRef.current;\n let isDragging = false;\n let hasDragged = false;\n let startX = 0;\n let startY = 0;\n let scrollLeft = 0;\n let scrollTop = 0;\n\n const onPointerDown = (e: PointerEvent) => {\n if (e.pointerType !== \"mouse\" || e.buttons !== 1) return;\n\n isDragging = true;\n hasDragged = false;\n startX = e.pageX - container.offsetLeft;\n startY = e.pageY - container.offsetTop;\n scrollLeft = container.scrollLeft;\n scrollTop = container.scrollTop;\n document.body.style.cursor = \"grabbing\";\n container.style.cursor = \"grabbing\";\n };\n\n const onPointerMove = (e: PointerEvent) => {\n if (e.pointerType !== \"mouse\") return;\n\n if (!isDragging) return;\n\n e.preventDefault();\n hasDragged = true;\n\n const walkMultiplier = 1; // Adjust the multiplier for faster/slower scrolling\n\n const x = e.pageX - container.offsetLeft;\n const y = e.pageY - container.offsetTop;\n const walkX = (x - startX) * walkMultiplier;\n const walkY = (y - startY) * walkMultiplier;\n container.scrollLeft = scrollLeft - walkX;\n container.scrollTop = scrollTop - walkY;\n };\n\n const onPointerUp = (e: PointerEvent) => {\n if (e.pointerType !== \"mouse\") return;\n\n isDragging = false;\n document.body.style.cursor = \"unset\";\n container.style.cursor = \"unset\";\n };\n\n const onVisibilityChange = () => {\n isDragging = false;\n document.body.style.cursor = \"unset\";\n container.style.cursor = \"unset\";\n hasDragged = false;\n };\n\n const onClick = (e: MouseEvent) => {\n if (hasDragged) {\n e.preventDefault(); // Prevents anchor tag from navigating if dragging occurred\n e.stopPropagation();\n }\n };\n\n container.addEventListener(\"pointerdown\", onPointerDown);\n document.addEventListener(\"pointermove\", onPointerMove);\n document.addEventListener(\"pointerup\", onPointerUp);\n\n document.addEventListener(\"visibilitychange\", onVisibilityChange);\n\n // Prevent clicks on anchor tags after dragging\n container.querySelectorAll(\"a\").forEach((anchor) => {\n anchor.addEventListener(\"click\", onClick);\n });\n\n return () => {\n container.removeEventListener(\"pointerdown\", onPointerDown);\n document.removeEventListener(\"pointermove\", onPointerMove);\n document.removeEventListener(\"pointerup\", onPointerUp);\n\n document.removeEventListener(\"visibilitychange\", onVisibilityChange);\n\n container.querySelectorAll(\"a\").forEach((anchor) => {\n anchor.removeEventListener(\"click\", onClick);\n });\n };\n }, [draggable]);\n\n // #############################################################################\n // Render\n // #############################################################################\n return (\n <S.OuterContainer\n $align={align}\n $direction={direction}\n $showFadeStart={showFadeStart}\n $showFadeEnd={showFadeEnd}\n $fillType={fillType}\n $fillColor={fillColor}\n $gradientSize={gradientSize}\n className={className}\n >\n <S.ScrollContainer ref={containerRef} $direction={direction} $gap={gap}>\n {items.map((item, i) => (\n <S.Item\n key={item.id + i}\n className={SCROLL_CONTAINER_ITEM_CLASS_NAME}\n $draggable={!!draggable}\n >\n {item.render()}\n </S.Item>\n ))}\n </S.ScrollContainer>\n\n <S.LeftArrowIcon\n $show={showFadeStart && !hideArrows}\n $first\n $fillType={fillType}\n $fillColor={fillColor}\n $accentColor={accentColor}\n $direction={direction}\n $arrowFadeColor={arrowFadeColor}\n $circleArrowBackground={circleArrowBackground}\n onClick={() => handleArrowClick(true)}\n $arrowGap={arrowGap}\n >\n <S.ArrowIconSvg\n $arrowColor={arrowColor}\n width={arrowIcon?.width ?? (circleArrowBackground ? 10 : 8)}\n height={arrowIcon?.height ?? (circleArrowBackground ? 16 : 13)}\n src={arrowIconSrc}\n />\n </S.LeftArrowIcon>\n\n <S.RightArrowIcon\n $show={showFadeEnd && !hideArrows}\n $fillType={fillType}\n $fillColor={fillColor}\n $accentColor={accentColor}\n $direction={direction}\n $arrowFadeColor={arrowFadeColor}\n $circleArrowBackground={circleArrowBackground}\n onClick={() => handleArrowClick(false)}\n $arrowGap={arrowGap}\n >\n <S.ArrowIconSvg\n $arrowColor={arrowColor}\n width={arrowIcon?.width ?? (circleArrowBackground ? 10 : 8)}\n height={arrowIcon?.height ?? (circleArrowBackground ? 16 : 13)}\n src={arrowIconSrc}\n />\n </S.RightArrowIcon>\n </S.OuterContainer>\n );\n};\n"],"names":["SCROLL_CONTAINER_ITEM_CLASS_NAME","NEAR_BOUNDARY_WIDTH","ScrollWrapper","ScrollWrapper2","align","direction","items","fillType","fillColor","accentColor","arrowColor","scrollStepType","gap","className","arrowFadeColor","activeIndex","circleArrowBackground","arrowGap","gradientSize","hideArrows","onScrollChange","enableWheelScroll","arrowIcon","draggable","containerRef","useRef","containerMeasureRef","containerSize","useMeasure","useHorizontalScroll","useEffect","current","getContainerItemWidth","useCallback","containerItem","querySelector","getBoundingClientRect","width","getInvisibleItemOffset","scrollDirection","container","querySelectorAll","containerRect","isHorizontal","fadeSize","padding","parseFloat","window","getComputedStyle","offset","Math","max","containerEdgeWithoutPadding","item","Array","from","itemRect","right","abs","i","length","left","bottom","top","getVisibleItemsWidth","containerItems","visibleItemsWidth","forEach","height","getActiveIndexOffset","index","actNav","children","actNavRect","scrollLeft","FADE_BUTTON_SIZE","scrollTop","x","refScrollX","y","refScrollY","useScroll","windowSize","useWindowSize","scrollX","setScrollX","useState","scrollY","setScrollY","initScrollX","initScrollY","scrollWidth","showFadeStart","setShowFadeStart","showFadeEnd","setShowFadeEnd","offsetWidth","offsetHeight","scrollHeight","scrollXFixOffset","ceil","handleArrowClick","first","clientWidth","scrollPosition","scrollSize","scrollStep","newScrollPosition","newScrollPositionWithinBounds","min","possibleScroll","nearBoundary","scrollTo","behavior","setTimeout","arrowIconSrc","useMemo","icon","ArrowRightIcon","src","isDragging","hasDragged","startX","startY","onPointerDown","e","pointerType","buttons","pageX","offsetLeft","pageY","offsetTop","document","body","style","cursor","onPointerMove","preventDefault","walkMultiplier","walkX","walkY","onPointerUp","onVisibilityChange","onClick","stopPropagation","addEventListener","anchor","removeEventListener","jsxs","S.OuterContainer","$align","$direction","$showFadeStart","$showFadeEnd","$fillType","$fillColor","$gradientSize","jsx","S.ScrollContainer","ref","$gap","map","S.Item","$draggable","render","id","S.LeftArrowIcon","$show","$first","$accentColor","$arrowFadeColor","$circleArrowBackground","$arrowGap","S.ArrowIconSvg","$arrowColor","S.RightArrowIcon"],"mappings":";;;;;;;;AASA,MAAMA,gCAAmC,GAAA,uBAAA;AAEzC,MAAMC,mBAAsB,GAAA,EAAA;AAEf,MAAAC,aAAA,GAAgB,SAASA,cAAcC,CAAA;EAClDC,KAAA;EACAC,SAAA;EACAC,KAAA;EACAC,QAAA;EACAC,SAAA;EACAC,WAAA;EACAC,UAAA;EACAC,cAAiB,GAAA,cAAA;EACjBC,GAAA;EACAC,SAAA;EACAC,cAAA;EACAC,WAAA;EACAC,qBAAA;EACAC,QAAA;EACAC,YAAA;EACAC,UAAA;EACAC,cAAA;EACAC,iBAAA;EACAC,SAAA;EACAC;AACF,CAAuB,EAAA;EAIf,MAAAC,YAAA,GAAeC,OAA8B,IAAI,CAAA;EACvD,MAAM,CAACC,mBAAA,EAAqBC,aAAa,CAAA,GAAIC,UAA2B,CAAA,CAAA;EAEpDC,mBAAA,CAAAL,YAAA,E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AAJ;MAAA,CACP;IAAA,CACF,CAAA,EAAA,eAEA0C,GAAA,CAACkB,cAAE,EAAF;MACCR,KAAA,EAAOzE,eAAe,CAAC3E,UAAA;MACvBuI,SAAW,EAAAnJ,QAAA;MACXoJ,UAAY,EAAAnJ,SAAA;MACZiK,YAAc,EAAAhK,WAAA;MACd8I,UAAY,EAAAlJ,SAAA;MACZqK,eAAiB,EAAA5J,cAAA;MACjB6J,sBAAwB,EAAA3J,qBAAA;MACxB+H,OAAA,EAASA,CAAA,KAAM1C,gBAAA,CAAiB,KAAK,CAAA;MACrCuE,SAAW,EAAA3J,QAAA;MAEXuD,QAAA,iBAAAqF,GAAA,CAACgB,YAAE,EAAF;QACCC,WAAa,EAAApK,UAAA;QACb2B,KAAO,EAAAf,SAAA,EAAWe,KAAU,KAAArB,qBAAA,GAAwB,EAAK,GAAA,CAAA,CAAA;QACzDoD,MAAQ,EAAA9C,SAAA,EAAW8C,MAAW,KAAApD,qBAAA,GAAwB,EAAK,GAAA,EAAA,CAAA;QAC3DuG,GAAK,EAAAJ;MAAA,CACP;IAAA,CACF,CAAA;EAAA,CAAA,CACF;AAEJ,CAAA;"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import type { SearchInputProps } from "./Input.types";
|
|
2
|
-
export declare const SearchInput: ({ value, onValueChange, onCancelClick, showCancel, placeholder, height, width, onFocus, onBlur, onKeyPress, setInputRef, transparent, motif, loading, className,
|
|
2
|
+
export declare const SearchInput: ({ value, onValueChange, onCancelClick, showCancel, placeholder, height, width, onFocus, onBlur, onKeyPress, setInputRef, transparent, motif, loading, className, }: SearchInputProps) => JSX.Element;
|
|
@@ -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('../../../constants/icons/index.js');
|
|
6
6
|
var theme = require('../../../constants/theme.js');
|
|
7
7
|
require('../../Loader/index.js');
|
|
@@ -35,14 +35,13 @@ const SearchInput = function SearchInput2({
|
|
|
35
35
|
transparent,
|
|
36
36
|
motif = theme.DEFAULT_MOTIF,
|
|
37
37
|
loading,
|
|
38
|
-
className
|
|
39
|
-
children
|
|
38
|
+
className
|
|
40
39
|
}) {
|
|
41
|
-
const ref =
|
|
42
|
-
|
|
40
|
+
const ref = react.useRef(null);
|
|
41
|
+
react.useEffect(() => {
|
|
43
42
|
setInputRef?.(ref.current);
|
|
44
|
-
}, [setInputRef]);
|
|
45
|
-
const handleInputWrapClick =
|
|
43
|
+
}, [setInputRef, ref]);
|
|
44
|
+
const handleInputWrapClick = react.useCallback(() => {
|
|
46
45
|
ref.current?.focus();
|
|
47
46
|
}, [ref]);
|
|
48
47
|
return /* @__PURE__ */jsxRuntime.jsx(Input_styles.SearchInputContainer, {
|
|
@@ -64,6 +63,7 @@ const SearchInput = function SearchInput2({
|
|
|
64
63
|
height: 20
|
|
65
64
|
})
|
|
66
65
|
}), /* @__PURE__ */jsxRuntime.jsx(Input_styles.Input, {
|
|
66
|
+
id: "search-input",
|
|
67
67
|
maxLength: MAX_CHARACTERS,
|
|
68
68
|
ref,
|
|
69
69
|
placeholder,
|
|
@@ -85,7 +85,7 @@ const SearchInput = function SearchInput2({
|
|
|
85
85
|
height: 10
|
|
86
86
|
})
|
|
87
87
|
})]
|
|
88
|
-
})
|
|
88
|
+
})]
|
|
89
89
|
})
|
|
90
90
|
});
|
|
91
91
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Input.js","sources":["../../../../src/components/Search/Input/Input.tsx"],"sourcesContent":["import { useCallback, useEffect, useRef } from \"react\";\n\nimport * as icons from \"../../../constants/icons\";\nimport { DEFAULT_MOTIF } from \"../../../constants/theme\";\nimport { Spinner } from \"../../Loader\";\nimport { StyleableSvgImage } from \"../../StyleableSvgImage\";\nimport * as S from \"./Input.styles\";\nimport type { SearchInputProps } from \"./Input.types\";\n\nconst MAX_CHARACTERS = 250;\n\nexport const SearchInput = function SearchInput({\n value,\n onValueChange,\n onCancelClick,\n showCancel,\n placeholder,\n height,\n width,\n onFocus,\n onBlur,\n onKeyPress,\n setInputRef,\n transparent,\n motif = DEFAULT_MOTIF,\n loading,\n className,\n
|
|
1
|
+
{"version":3,"file":"Input.js","sources":["../../../../src/components/Search/Input/Input.tsx"],"sourcesContent":["import { useCallback, useEffect, useRef } from \"react\";\n\nimport * as icons from \"../../../constants/icons\";\nimport { DEFAULT_MOTIF } from \"../../../constants/theme\";\nimport { Spinner } from \"../../Loader\";\nimport { StyleableSvgImage } from \"../../StyleableSvgImage\";\nimport * as S from \"./Input.styles\";\nimport type { SearchInputProps } from \"./Input.types\";\n\nconst MAX_CHARACTERS = 250;\n\nexport const SearchInput = function SearchInput({\n value,\n onValueChange,\n onCancelClick,\n showCancel,\n placeholder,\n height,\n width,\n onFocus,\n onBlur,\n onKeyPress,\n setInputRef,\n transparent,\n motif = DEFAULT_MOTIF,\n loading,\n className,\n}: SearchInputProps): JSX.Element {\n const ref = useRef<HTMLInputElement>(null);\n\n useEffect(() => {\n setInputRef?.(ref.current);\n }, [setInputRef, ref]);\n\n /**\n * Sets focus on the input when the user clicks on the input wrap.\n */\n const handleInputWrapClick = useCallback(() => {\n ref.current?.focus();\n }, [ref]);\n\n // #############################################################################\n // Render\n // #############################################################################\n\n return (\n <S.SearchInputContainer\n height={height}\n width={width}\n motif={motif}\n transparent={transparent}\n className={className}\n >\n <S.InputWrap transparent={transparent} onClick={handleInputWrapClick}>\n <S.IconWrap show motif={motif} active={value.length > 0}>\n <StyleableSvgImage\n src={icons.generic.search}\n width={20}\n height={20}\n />\n </S.IconWrap>\n <S.Input\n id=\"search-input\"\n maxLength={MAX_CHARACTERS}\n ref={ref}\n placeholder={placeholder}\n value={value}\n onChange={onValueChange}\n onFocus={onFocus}\n onBlur={onBlur}\n onKeyPress={onKeyPress}\n autoComplete=\"off\"\n motif={motif}\n />\n <S.IconAfterWrap>\n {loading && <Spinner />}\n {!loading && onCancelClick && (\n <S.CancelIconWrap\n onClick={onCancelClick}\n show={showCancel}\n motif={motif}\n >\n <StyleableSvgImage\n src={icons.generic.close}\n width={10}\n height={10}\n />\n </S.CancelIconWrap>\n )}\n </S.IconAfterWrap>\n </S.InputWrap>\n </S.SearchInputContainer>\n );\n};\n"],"names":["MAX_CHARACTERS","SearchInput","SearchInput2","value","onValueChange","onCancelClick","showCancel","placeholder","height","width","onFocus","onBlur","onKeyPress","setInputRef","transparent","motif","DEFAULT_MOTIF","loading","className","ref","useRef","useEffect","current","handleInputWrapClick","useCallback","focus","jsx","S.SearchInputContainer","SearchInputContainer","children","S.InputWrap","onClick","S.IconWrap","show","active","length","StyleableSvgImage","src","icons.generic.search","S.Input","Input","id","maxLength","onChange","autoComplete","jsxs","S.IconAfterWrap","Spinner","S.CancelIconWrap","CancelIconWrap","icons.generic.close"],"mappings":";;;;;;;;;;;;;;;;;;;;;AASA,MAAMA,cAAiB,GAAA,GAAA;AAEV,MAAAC,WAAA,GAAc,SAASA,YAAYC,CAAA;EAC9CC,KAAA;EACAC,aAAA;EACAC,aAAA;EACAC,UAAA;EACAC,WAAA;EACAC,MAAA;EACAC,KAAA;EACAC,OAAA;EACAC,MAAA;EACAC,UAAA;EACAC,WAAA;EACAC,WAAA;EACAC,KAAQ,GAAAC,KAAA,CAAAA,aAAA;EACRC,OAAA;EACAC;AACF,CAAkC,EAAA;EAC1B,MAAAC,GAAA,GAAMC,aAAyB,IAAI,CAAA;EAEzCC,KAAAA,CAAAA,SAAA,CAAU,MAAM;IACdR,WAAA,GAAcM,IAAIG,OAAO,CAAA;EAAA,CACxB,EAAA,CAACT,WAAa,EAAAM,GAAG,CAAC,CAAA;EAKf,MAAAI,oBAAA,GAAuBC,KAAAA,CAAAA,YAAY,MAAM;IAC7CL,GAAA,CAAIG,SAASG,KAAM,EAAA;EAAA,CACrB,EAAG,CAACN,GAAG,CAAC,CAAA;EAON,sBAAAO,UAAA,CAAAA,GAAA,CAACC,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CACV;QAAA,CACF,CAAA;OAEJ,CAAA;KACF;EAAA,CAAA,CACF;AAEJ,CAAA;"}
|
|
@@ -26,13 +26,12 @@ const SearchInput = function SearchInput2({
|
|
|
26
26
|
transparent,
|
|
27
27
|
motif = DEFAULT_MOTIF,
|
|
28
28
|
loading,
|
|
29
|
-
className
|
|
30
|
-
children
|
|
29
|
+
className
|
|
31
30
|
}) {
|
|
32
31
|
const ref = useRef(null);
|
|
33
32
|
useEffect(() => {
|
|
34
33
|
setInputRef?.(ref.current);
|
|
35
|
-
}, [setInputRef]);
|
|
34
|
+
}, [setInputRef, ref]);
|
|
36
35
|
const handleInputWrapClick = useCallback(() => {
|
|
37
36
|
ref.current?.focus();
|
|
38
37
|
}, [ref]);
|
|
@@ -55,6 +54,7 @@ const SearchInput = function SearchInput2({
|
|
|
55
54
|
height: 20
|
|
56
55
|
})
|
|
57
56
|
}), /* @__PURE__ */jsx(Input, {
|
|
57
|
+
id: "search-input",
|
|
58
58
|
maxLength: MAX_CHARACTERS,
|
|
59
59
|
ref,
|
|
60
60
|
placeholder,
|
|
@@ -76,7 +76,7 @@ const SearchInput = function SearchInput2({
|
|
|
76
76
|
height: 10
|
|
77
77
|
})
|
|
78
78
|
})]
|
|
79
|
-
})
|
|
79
|
+
})]
|
|
80
80
|
})
|
|
81
81
|
});
|
|
82
82
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Input.mjs","sources":["../../../../src/components/Search/Input/Input.tsx"],"sourcesContent":["import { useCallback, useEffect, useRef } from \"react\";\n\nimport * as icons from \"../../../constants/icons\";\nimport { DEFAULT_MOTIF } from \"../../../constants/theme\";\nimport { Spinner } from \"../../Loader\";\nimport { StyleableSvgImage } from \"../../StyleableSvgImage\";\nimport * as S from \"./Input.styles\";\nimport type { SearchInputProps } from \"./Input.types\";\n\nconst MAX_CHARACTERS = 250;\n\nexport const SearchInput = function SearchInput({\n value,\n onValueChange,\n onCancelClick,\n showCancel,\n placeholder,\n height,\n width,\n onFocus,\n onBlur,\n onKeyPress,\n setInputRef,\n transparent,\n motif = DEFAULT_MOTIF,\n loading,\n className,\n
|
|
1
|
+
{"version":3,"file":"Input.mjs","sources":["../../../../src/components/Search/Input/Input.tsx"],"sourcesContent":["import { useCallback, useEffect, useRef } from \"react\";\n\nimport * as icons from \"../../../constants/icons\";\nimport { DEFAULT_MOTIF } from \"../../../constants/theme\";\nimport { Spinner } from \"../../Loader\";\nimport { StyleableSvgImage } from \"../../StyleableSvgImage\";\nimport * as S from \"./Input.styles\";\nimport type { SearchInputProps } from \"./Input.types\";\n\nconst MAX_CHARACTERS = 250;\n\nexport const SearchInput = function SearchInput({\n value,\n onValueChange,\n onCancelClick,\n showCancel,\n placeholder,\n height,\n width,\n onFocus,\n onBlur,\n onKeyPress,\n setInputRef,\n transparent,\n motif = DEFAULT_MOTIF,\n loading,\n className,\n}: SearchInputProps): JSX.Element {\n const ref = useRef<HTMLInputElement>(null);\n\n useEffect(() => {\n setInputRef?.(ref.current);\n }, [setInputRef, ref]);\n\n /**\n * Sets focus on the input when the user clicks on the input wrap.\n */\n const handleInputWrapClick = useCallback(() => {\n ref.current?.focus();\n }, [ref]);\n\n // #############################################################################\n // Render\n // #############################################################################\n\n return (\n <S.SearchInputContainer\n height={height}\n width={width}\n motif={motif}\n transparent={transparent}\n className={className}\n >\n <S.InputWrap transparent={transparent} onClick={handleInputWrapClick}>\n <S.IconWrap show motif={motif} active={value.length > 0}>\n <StyleableSvgImage\n src={icons.generic.search}\n width={20}\n height={20}\n />\n </S.IconWrap>\n <S.Input\n id=\"search-input\"\n maxLength={MAX_CHARACTERS}\n ref={ref}\n placeholder={placeholder}\n value={value}\n onChange={onValueChange}\n onFocus={onFocus}\n onBlur={onBlur}\n onKeyPress={onKeyPress}\n autoComplete=\"off\"\n motif={motif}\n />\n <S.IconAfterWrap>\n {loading && <Spinner />}\n {!loading && onCancelClick && (\n <S.CancelIconWrap\n onClick={onCancelClick}\n show={showCancel}\n motif={motif}\n >\n <StyleableSvgImage\n src={icons.generic.close}\n width={10}\n height={10}\n />\n </S.CancelIconWrap>\n )}\n </S.IconAfterWrap>\n </S.InputWrap>\n </S.SearchInputContainer>\n );\n};\n"],"names":["MAX_CHARACTERS","SearchInput","SearchInput2","value","onValueChange","onCancelClick","showCancel","placeholder","height","width","onFocus","onBlur","onKeyPress","setInputRef","transparent","motif","DEFAULT_MOTIF","loading","className","ref","useRef","useEffect","current","handleInputWrapClick","useCallback","focus","jsx","S.SearchInputContainer","children","S.InputWrap","onClick","S.IconWrap","show","active","length","StyleableSvgImage","src","icons.generic.search","S.Input","id","maxLength","onChange","autoComplete","jsxs","S.IconAfterWrap","Spinner","S.CancelIconWrap","icons.generic.close"],"mappings":";;;;;;;;;;;;AASA,MAAMA,cAAiB,GAAA,GAAA;AAEV,MAAAC,WAAA,GAAc,SAASA,YAAYC,CAAA;EAC9CC,KAAA;EACAC,aAAA;EACAC,aAAA;EACAC,UAAA;EACAC,WAAA;EACAC,MAAA;EACAC,KAAA;EACAC,OAAA;EACAC,MAAA;EACAC,UAAA;EACAC,WAAA;EACAC,WAAA;EACAC,KAAQ,GAAAC,aAAA;EACRC,OAAA;EACAC;AACF,CAAkC,EAAA;EAC1B,MAAAC,GAAA,GAAMC,OAAyB,IAAI,CAAA;EAEzCC,SAAA,CAAU,MAAM;IACdR,WAAA,GAAcM,IAAIG,OAAO,CAAA;EAAA,CACxB,EAAA,CAACT,WAAa,EAAAM,GAAG,CAAC,CAAA;EAKf,MAAAI,oBAAA,GAAuBC,YAAY,MAAM;IAC7CL,GAAA,CAAIG,SAASG,KAAM,EAAA;EAAA,CACrB,EAAG,CAACN,GAAG,CAAC,CAAA;EAON,sBAAAO,GAAA,CAACC,oBAAE,EAAF;IACCnB,MAAA;IACAC,KAAA;IACAM,KAAA;IACAD,WAAA;IACAI,SAAA;IAEAU,8BAACC,SAAE,EAAF;MAAYf,WAAA;MAA0BgB,SAASP,oBAC9C;MAAAK,QAAA,EAAA,CAAC,eAAAF,GAAA,CAAAK,UAAA;QAAWC,IAAA,EAAI;QAACjB,KAAc;QAAAkB,MAAA,EAAQ9B,KAAM,CAAA+B,MAAA,GAAS,CACpD;QAAAN,QAAA,EAAA,eAAAF,GAAA,CAACS,iBAAA,EAAA;UACCC,GAAA,EAAKC,iCAAc;UACnB5B,KAAO,EAAA,EAAA;UACPD,MAAQ,EAAA;QAAA,CAAA;OAEZ,CAAA,EAAA,eACAkB,GAAA,CAACY,KAAE,EAAF;QACCC,EAAG,EAAA,cAAA;QACHC,SAAW,EAAAxC,cAAA;QACXmB,GAAA;QACAZ,WAAA;QACAJ,KAAA;QACAsC,QAAU,EAAArC,aAAA;QACVM,OAAA;QACAC,MAAA;QACAC,UAAA;QACA8B,YAAa,EAAA,KAAA;QACb3B;MAAA,CACF,CAAA,EAAA,eACA4B,IAAA,CAACC,aAAE,EAAF;QACEhB,QAAA,EAAA,CAAAX,OAAA,uBAAY4B,OAAQ,EAAA,EAAA,CAAA,EACpB,CAAC5B,WAAWZ,aACX,mBAAAqB,GAAA,CAACoB,cAAE,EAAF;UACChB,OAAS,EAAAzB,aAAA;UACT2B,IAAM,EAAA1B,UAAA;UACNS,KAAA;UAEAa,QAAA,iBAAAF,GAAA,CAACS,iBAAA,EAAA;YACCC,GAAA,EAAKW,kBAAc;YACnBtC,KAAO,EAAA,EAAA;YACPD,MAAQ,EAAA;UAAA,CACV;QAAA,CACF,CAAA;OAEJ,CAAA;KACF;EAAA,CAAA,CACF;AAEJ,CAAA;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Input.styles.js","sources":["../../../../src/components/Search/Input/Input.styles.ts"],"sourcesContent":["import type { Motif } from \"@ubnt/ui-components/utils\";\nimport styled, { css } from \"styled-components\";\n\nimport { BREAKPOINTS } from \"../../../constants/layout\";\nimport { theme } from \"../../../constants/theme\";\n\nexport const SearchInputContainer = styled.div<{\n height?: number;\n width?: number;\n transparent?: boolean;\n motif: Motif;\n}>`\n position: relative;\n display: flex;\n height: ${({ height }) => (height ? `${height}px` : \"32px\")};\n align-items: center;\n flex-wrap: nowrap;\n max-width: ${({ width }) => (width ? `${width}px` : \"100%\")};\n width: 100%;\n`;\n\nexport const IconWrap = styled.div<{\n show: boolean;\n motif: Motif;\n active?: boolean;\n}>`\n display: flex;\n align-items: center;\n margin: 0 8px;\n visibility: ${(props) => (props.show ? \"visible\" : \"hidden\")};\n color: ${({ motif, active }) =>\n active\n ? theme.colors.menu.active[motif]\n : motif === \"dark\"\n ? \"#909090\"\n : theme.colors.menu.text[motif]};\n`;\n\nexport const CancelIconWrap = styled(IconWrap)`\n cursor: pointer;\n`;\n\nexport const IconAfterWrap = styled.div`\n display: flex;\n justify-content: flex-end;\n align-items: center;\n gap: 10px;\n`;\n\nexport const InputWrap = styled.div<{\n transparent?: boolean;\n}>`\n display: flex;\n width: 100%;\n border-radius: 4px;\n background-color: ${theme.colors.athensGreyLight};\n height: 100%;\n padding: 0 8px;\n border: 1px solid ${theme.colors.mischka};\n\n /* &:hover {\n background-color: ${theme.colors.athensGreyLight};\n } */\n\n ${({ transparent }) =>\n transparent &&\n css`\n &,\n &:hover {\n background-color: transparent;\n }\n `}\n`;\n\nexport const Input = styled.input<{\n motif: Motif;\n}>`\n border: 0;\n width: 100%;\n background-color: transparent;\n color: ${({ motif }) =>\n motif === \"dark\" ? theme.colors.athensGreyLight : theme.colors.black65};\n padding: 0 8px;\n font-size: 14px;\n\n caret-color: ${theme.colors.primaryBlue};\n text-overflow: ellipsis;\n\n ::placeholder {\n color: ${({ motif }) =>\n motif === \"dark\" ? \"hsla(0,0%,100%,.45)\" : theme.colors.black45};\n font-size: 14px;\n }\n\n &:focus {\n outline: none;\n }\n\n @media ${BREAKPOINTS.MOBILE_AND_DOWN} {\n /** @see https://stackoverflow.com/a/7655319 */\n font-size: ${theme.font.size16};\n }\n`;\n"],"names":["SearchInputContainer","styled","div","height","width","IconWrap","props","show","motif","active","theme","colors","menu","text","CancelIconWrap","IconAfterWrap","InputWrap","athensGreyLight","mischka","transparent","css","Input","input","black65","primaryBlue","black45","BREAKPOINTS","MOBILE_AND_DOWN","font","size16"],"mappings":";;;;;;;;;;;;AAMO,MAAMA,uBAAuBC,eAAO,CAAA,SAAA,CAAA,CAAAC,GAAA;AAAA;AAAA;AAAA,
|
|
1
|
+
{"version":3,"file":"Input.styles.js","sources":["../../../../src/components/Search/Input/Input.styles.ts"],"sourcesContent":["import type { Motif } from \"@ubnt/ui-components/utils\";\nimport styled, { css } from \"styled-components\";\n\nimport { BREAKPOINTS } from \"../../../constants/layout\";\nimport { theme } from \"../../../constants/theme\";\n\nexport const SearchInputContainer = styled.div<{\n height?: number;\n width?: number;\n transparent?: boolean;\n motif: Motif;\n}>`\n position: relative;\n display: flex;\n overflow: hidden;\n height: ${({ height }) => (height ? `${height}px` : \"32px\")};\n align-items: center;\n flex-wrap: nowrap;\n max-width: ${({ width }) => (width ? `${width}px` : \"100%\")};\n width: 100%;\n`;\n\nexport const IconWrap = styled.div<{\n show: boolean;\n motif: Motif;\n active?: boolean;\n}>`\n display: flex;\n align-items: center;\n margin: 0 8px;\n visibility: ${(props) => (props.show ? \"visible\" : \"hidden\")};\n color: ${({ motif, active }) =>\n active\n ? theme.colors.menu.active[motif]\n : motif === \"dark\"\n ? \"#909090\"\n : theme.colors.menu.text[motif]};\n`;\n\nexport const CancelIconWrap = styled(IconWrap)`\n cursor: pointer;\n`;\n\nexport const IconAfterWrap = styled.div`\n display: flex;\n justify-content: flex-end;\n align-items: center;\n gap: 10px;\n`;\n\nexport const InputWrap = styled.div<{\n transparent?: boolean;\n}>`\n display: flex;\n width: 100%;\n border-radius: 4px;\n background-color: ${theme.colors.athensGreyLight};\n height: 100%;\n padding: 0 8px;\n border: 1px solid ${theme.colors.mischka};\n\n /* &:hover {\n background-color: ${theme.colors.athensGreyLight};\n } */\n\n ${({ transparent }) =>\n transparent &&\n css`\n &,\n &:hover {\n background-color: transparent;\n }\n `}\n`;\n\nexport const Input = styled.input<{\n motif: Motif;\n}>`\n border: 0;\n width: 100%;\n background-color: transparent;\n color: ${({ motif }) =>\n motif === \"dark\" ? theme.colors.athensGreyLight : theme.colors.black65};\n padding: 0 8px;\n font-size: 14px;\n\n caret-color: ${theme.colors.primaryBlue};\n text-overflow: ellipsis;\n\n ::placeholder {\n color: ${({ motif }) =>\n motif === \"dark\" ? \"hsla(0,0%,100%,.45)\" : theme.colors.black45};\n font-size: 14px;\n }\n\n &:focus {\n outline: none;\n }\n\n @media ${BREAKPOINTS.MOBILE_AND_DOWN} {\n /** @see https://stackoverflow.com/a/7655319 */\n font-size: ${theme.font.size16};\n }\n`;\n"],"names":["SearchInputContainer","styled","div","height","width","IconWrap","props","show","motif","active","theme","colors","menu","text","CancelIconWrap","IconAfterWrap","InputWrap","athensGreyLight","mischka","transparent","css","Input","input","black65","primaryBlue","black45","BREAKPOINTS","MOBILE_AND_DOWN","font","size16"],"mappings":";;;;;;;;;;;;AAMO,MAAMA,uBAAuBC,eAAO,CAAA,SAAA,CAAA,CAAAC,GAAA;AAAA;AAAA;AAAA;AAAA,YAS/B,CAAC;EAAEC;AAAO,CAAA,KAAOA,SAAS,GAAGA,MAAM,OAAO,MAAO;AAAA;AAAA;AAAA,eAG9C,CAAC;EAAEC;AAAM,CAAA,KAAOA,QAAQ,GAAGA,KAAK,OAAO,MAAO;AAAA;AAAA,CAAA;AAItD,MAAMC,WAAWJ,eAAO,CAAA,SAAA,CAAA,CAAAC,GAAA;AAAA;AAAA;AAAA;AAAA,gBAQdI,KAAA,IAAWA,KAAM,CAAAC,IAAA,GAAO,YAAY,QAAS;AAAA,WACnD,CAAC;EAAEC,KAAO;EAAAC;MACjBA,MACI,GAAAC,WAAA,CAAMC,OAAOC,IAAK,CAAAH,MAAA,CAAOD,KAAK,CAC9B,GAAAA,KAAA,KAAU,SACR,SACA,GAAAE,KAAAA,CAAAA,KAAA,CAAMC,OAAOC,IAAK,CAAAC,IAAA,CAAKL,KAAK,CAAC;AAAA,CAAA;AAG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file":"Input.styles.mjs","sources":["../../../../src/components/Search/Input/Input.styles.ts"],"sourcesContent":["import type { Motif } from \"@ubnt/ui-components/utils\";\nimport styled, { css } from \"styled-components\";\n\nimport { BREAKPOINTS } from \"../../../constants/layout\";\nimport { theme } from \"../../../constants/theme\";\n\nexport const SearchInputContainer = styled.div<{\n height?: number;\n width?: number;\n transparent?: boolean;\n motif: Motif;\n}>`\n position: relative;\n display: flex;\n height: ${({ height }) => (height ? `${height}px` : \"32px\")};\n align-items: center;\n flex-wrap: nowrap;\n max-width: ${({ width }) => (width ? `${width}px` : \"100%\")};\n width: 100%;\n`;\n\nexport const IconWrap = styled.div<{\n show: boolean;\n motif: Motif;\n active?: boolean;\n}>`\n display: flex;\n align-items: center;\n margin: 0 8px;\n visibility: ${(props) => (props.show ? \"visible\" : \"hidden\")};\n color: ${({ motif, active }) =>\n active\n ? theme.colors.menu.active[motif]\n : motif === \"dark\"\n ? \"#909090\"\n : theme.colors.menu.text[motif]};\n`;\n\nexport const CancelIconWrap = styled(IconWrap)`\n cursor: pointer;\n`;\n\nexport const IconAfterWrap = styled.div`\n display: flex;\n justify-content: flex-end;\n align-items: center;\n gap: 10px;\n`;\n\nexport const InputWrap = styled.div<{\n transparent?: boolean;\n}>`\n display: flex;\n width: 100%;\n border-radius: 4px;\n background-color: ${theme.colors.athensGreyLight};\n height: 100%;\n padding: 0 8px;\n border: 1px solid ${theme.colors.mischka};\n\n /* &:hover {\n background-color: ${theme.colors.athensGreyLight};\n } */\n\n ${({ transparent }) =>\n transparent &&\n css`\n &,\n &:hover {\n background-color: transparent;\n }\n `}\n`;\n\nexport const Input = styled.input<{\n motif: Motif;\n}>`\n border: 0;\n width: 100%;\n background-color: transparent;\n color: ${({ motif }) =>\n motif === \"dark\" ? theme.colors.athensGreyLight : theme.colors.black65};\n padding: 0 8px;\n font-size: 14px;\n\n caret-color: ${theme.colors.primaryBlue};\n text-overflow: ellipsis;\n\n ::placeholder {\n color: ${({ motif }) =>\n motif === \"dark\" ? \"hsla(0,0%,100%,.45)\" : theme.colors.black45};\n font-size: 14px;\n }\n\n &:focus {\n outline: none;\n }\n\n @media ${BREAKPOINTS.MOBILE_AND_DOWN} {\n /** @see https://stackoverflow.com/a/7655319 */\n font-size: ${theme.font.size16};\n }\n`;\n"],"names":["SearchInputContainer","styled","div","height","width","IconWrap","props","show","motif","active","theme","colors","menu","text","CancelIconWrap","IconAfterWrap","InputWrap","athensGreyLight","mischka","transparent","css","Input","input","black65","primaryBlue","black45","BREAKPOINTS","MOBILE_AND_DOWN","font","size16"],"mappings":";;;;AAMO,MAAMA,uBAAuBC,MAAO,CAAAC,GAAA;AAAA;AAAA;AAAA,
|
|
1
|
+
{"version":3,"file":"Input.styles.mjs","sources":["../../../../src/components/Search/Input/Input.styles.ts"],"sourcesContent":["import type { Motif } from \"@ubnt/ui-components/utils\";\nimport styled, { css } from \"styled-components\";\n\nimport { BREAKPOINTS } from \"../../../constants/layout\";\nimport { theme } from \"../../../constants/theme\";\n\nexport const SearchInputContainer = styled.div<{\n height?: number;\n width?: number;\n transparent?: boolean;\n motif: Motif;\n}>`\n position: relative;\n display: flex;\n overflow: hidden;\n height: ${({ height }) => (height ? `${height}px` : \"32px\")};\n align-items: center;\n flex-wrap: nowrap;\n max-width: ${({ width }) => (width ? `${width}px` : \"100%\")};\n width: 100%;\n`;\n\nexport const IconWrap = styled.div<{\n show: boolean;\n motif: Motif;\n active?: boolean;\n}>`\n display: flex;\n align-items: center;\n margin: 0 8px;\n visibility: ${(props) => (props.show ? \"visible\" : \"hidden\")};\n color: ${({ motif, active }) =>\n active\n ? theme.colors.menu.active[motif]\n : motif === \"dark\"\n ? \"#909090\"\n : theme.colors.menu.text[motif]};\n`;\n\nexport const CancelIconWrap = styled(IconWrap)`\n cursor: pointer;\n`;\n\nexport const IconAfterWrap = styled.div`\n display: flex;\n justify-content: flex-end;\n align-items: center;\n gap: 10px;\n`;\n\nexport const InputWrap = styled.div<{\n transparent?: boolean;\n}>`\n display: flex;\n width: 100%;\n border-radius: 4px;\n background-color: ${theme.colors.athensGreyLight};\n height: 100%;\n padding: 0 8px;\n border: 1px solid ${theme.colors.mischka};\n\n /* &:hover {\n background-color: ${theme.colors.athensGreyLight};\n } */\n\n ${({ transparent }) =>\n transparent &&\n css`\n &,\n &:hover {\n background-color: transparent;\n }\n `}\n`;\n\nexport const Input = styled.input<{\n motif: Motif;\n}>`\n border: 0;\n width: 100%;\n background-color: transparent;\n color: ${({ motif }) =>\n motif === \"dark\" ? theme.colors.athensGreyLight : theme.colors.black65};\n padding: 0 8px;\n font-size: 14px;\n\n caret-color: ${theme.colors.primaryBlue};\n text-overflow: ellipsis;\n\n ::placeholder {\n color: ${({ motif }) =>\n motif === \"dark\" ? \"hsla(0,0%,100%,.45)\" : theme.colors.black45};\n font-size: 14px;\n }\n\n &:focus {\n outline: none;\n }\n\n @media ${BREAKPOINTS.MOBILE_AND_DOWN} {\n /** @see https://stackoverflow.com/a/7655319 */\n font-size: ${theme.font.size16};\n }\n`;\n"],"names":["SearchInputContainer","styled","div","height","width","IconWrap","props","show","motif","active","theme","colors","menu","text","CancelIconWrap","IconAfterWrap","InputWrap","athensGreyLight","mischka","transparent","css","Input","input","black65","primaryBlue","black45","BREAKPOINTS","MOBILE_AND_DOWN","font","size16"],"mappings":";;;;AAMO,MAAMA,uBAAuBC,MAAO,CAAAC,GAAA;AAAA;AAAA;AAAA;AAAA,YAS/B,CAAC;EAAEC;AAAO,CAAA,KAAOA,SAAS,GAAGA,MAAM,OAAO,MAAO;AAAA;AAAA;AAAA,eAG9C,CAAC;EAAEC;AAAM,CAAA,KAAOA,QAAQ,GAAGA,KAAK,OAAO,MAAO;AAAA;AAAA,CAAA;AAItD,MAAMC,WAAWJ,MAAO,CAAAC,GAAA;AAAA;AAAA;AAAA;AAAA,gBAQdI,KAAA,IAAWA,KAAM,CAAAC,IAAA,GAAO,YAAY,QAAS;AAAA,WACnD,CAAC;EAAEC,KAAO;EAAAC;MACjBA,MACI,GAAAC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/utils";
|
|
2
|
-
import type { ChangeEventHandler, FocusEventHandler, KeyboardEventHandler, MouseEventHandler,
|
|
2
|
+
import type { ChangeEventHandler, Dispatch, FocusEventHandler, KeyboardEventHandler, MouseEventHandler, SetStateAction } from "react";
|
|
3
3
|
export interface SearchInputProps {
|
|
4
4
|
value: string;
|
|
5
5
|
onValueChange: ChangeEventHandler<HTMLInputElement>;
|
|
@@ -11,10 +11,9 @@ export interface SearchInputProps {
|
|
|
11
11
|
onFocus?: FocusEventHandler<HTMLInputElement>;
|
|
12
12
|
onBlur?: FocusEventHandler<HTMLInputElement>;
|
|
13
13
|
onKeyPress?: KeyboardEventHandler<HTMLInputElement>;
|
|
14
|
-
setInputRef?:
|
|
14
|
+
setInputRef?: Dispatch<SetStateAction<HTMLInputElement | null>>;
|
|
15
15
|
motif?: Motif;
|
|
16
16
|
transparent?: boolean;
|
|
17
17
|
loading?: boolean;
|
|
18
18
|
className?: string;
|
|
19
|
-
children?: ReactNode;
|
|
20
19
|
}
|
|
@@ -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/carouselArrow.svg.js');
|
|
6
6
|
require('../../CustomImage/index.js');
|
|
7
7
|
require('../../Loader/index.js');
|
|
@@ -29,8 +29,8 @@ const SearchModal = function SearchModal2({
|
|
|
29
29
|
search,
|
|
30
30
|
mobileMenu
|
|
31
31
|
}) {
|
|
32
|
-
const noResults =
|
|
33
|
-
const showSearchResultsLink =
|
|
32
|
+
const noResults = react.useMemo(() => !search.loading && !search.items?.length && !!formattedQuerySearchTerm, [formattedQuerySearchTerm, search.items?.length, search.loading]);
|
|
33
|
+
const showSearchResultsLink = react.useMemo(() => search.totalItemsCount > MAX_SEARCH_RESULTS, [search]);
|
|
34
34
|
return /* @__PURE__ */jsxRuntime.jsxs(Modal_styles.Container, {
|
|
35
35
|
center: !!(search.loading || noResults),
|
|
36
36
|
mobileMenu,
|
|
@@ -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 Slider_styles = require('./Slider.styles.js');
|
|
6
6
|
"use strict";
|
|
7
7
|
const StorageSlidersSlider = function StorageSlidersSlider2({
|
|
@@ -11,14 +11,14 @@ const StorageSlidersSlider = function StorageSlidersSlider2({
|
|
|
11
11
|
min = 0,
|
|
12
12
|
max = 100
|
|
13
13
|
}) {
|
|
14
|
-
const handleOnChange =
|
|
14
|
+
const handleOnChange = react.useCallback(e => {
|
|
15
15
|
if (disabled) return;
|
|
16
16
|
const newValue = parseInt(e.target.value);
|
|
17
17
|
if (!Number.isNaN(newValue)) {
|
|
18
18
|
onChange?.(newValue);
|
|
19
19
|
}
|
|
20
20
|
}, [disabled, onChange]);
|
|
21
|
-
const thumbLeftPercent =
|
|
21
|
+
const thumbLeftPercent = react.useMemo(() => {
|
|
22
22
|
return (value - min) / (max - min) * 100;
|
|
23
23
|
}, [max, min, value]);
|
|
24
24
|
return /* @__PURE__ */jsxRuntime.jsxs(Slider_styles.Wrap, {
|
|
@@ -1,35 +1,35 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var jsxRuntime = require('react/jsx-runtime');
|
|
4
|
-
var
|
|
4
|
+
var react = require('react');
|
|
5
5
|
var StorageSliders_constants = require('./StorageSliders.constants.js');
|
|
6
6
|
var StorageSliders_types = require('./StorageSliders.types.js');
|
|
7
7
|
var StorageSliders_utils = require('./StorageSliders.utils.js');
|
|
8
8
|
"use strict";
|
|
9
|
-
const StorageSlidersContext =
|
|
9
|
+
const StorageSlidersContext = react.createContext(null);
|
|
10
10
|
const StorageSlidersProvider = ({
|
|
11
11
|
hddTerabytes = 8,
|
|
12
12
|
sku,
|
|
13
13
|
children
|
|
14
14
|
}) => {
|
|
15
|
-
const data =
|
|
15
|
+
const data = react.useMemo(() => {
|
|
16
16
|
return StorageSliders_constants.storageSlidersDataBySku[sku] ?? null;
|
|
17
17
|
}, [sku]);
|
|
18
|
-
const [cameraType, setCameraType] =
|
|
19
|
-
const [cameras, setCameras] =
|
|
20
|
-
const [hours, setHours] =
|
|
21
|
-
const reset =
|
|
18
|
+
const [cameraType, setCameraType] = react.useState(StorageSliders_types.CameraType.Camera2K);
|
|
19
|
+
const [cameras, setCameras] = react.useState(0);
|
|
20
|
+
const [hours, setHours] = react.useState(0);
|
|
21
|
+
const reset = react.useCallback(() => {
|
|
22
22
|
setCameraType(StorageSliders_types.CameraType.Camera2K);
|
|
23
23
|
setCameras(0);
|
|
24
24
|
setHours(0);
|
|
25
25
|
}, []);
|
|
26
|
-
const cameraTypeData =
|
|
26
|
+
const cameraTypeData = react.useMemo(() => {
|
|
27
27
|
return data?.cameraTypeData[cameraType] ?? null;
|
|
28
28
|
}, [cameraType, data?.cameraTypeData]);
|
|
29
|
-
const maxCameras =
|
|
29
|
+
const maxCameras = react.useMemo(() => {
|
|
30
30
|
return cameraTypeData?.maxCameras ?? 0;
|
|
31
31
|
}, [cameraTypeData?.maxCameras]);
|
|
32
|
-
const storageHoursPerHdd =
|
|
32
|
+
const storageHoursPerHdd = react.useMemo(() => {
|
|
33
33
|
if (!data?.maxHdds || !cameraTypeData?.powerUsage || !cameras) {
|
|
34
34
|
return [];
|
|
35
35
|
}
|
|
@@ -58,7 +58,7 @@ const StorageSlidersProvider = ({
|
|
|
58
58
|
storageHours.reverse();
|
|
59
59
|
return storageHours;
|
|
60
60
|
}, [cameraTypeData?.powerUsage, cameras, data?.maxHdds, hddTerabytes]);
|
|
61
|
-
const maxHours =
|
|
61
|
+
const maxHours = react.useMemo(() => {
|
|
62
62
|
if (!data?.maxHdds || !cameraTypeData?.powerUsage) {
|
|
63
63
|
return 0;
|
|
64
64
|
}
|
|
@@ -70,7 +70,7 @@ const StorageSlidersProvider = ({
|
|
|
70
70
|
terabytes: hddTerabytes
|
|
71
71
|
});
|
|
72
72
|
}, [cameraTypeData?.powerUsage, cameras, data?.maxHdds, hddTerabytes]);
|
|
73
|
-
|
|
73
|
+
react.useEffect(() => {
|
|
74
74
|
if (hours > maxHours) {
|
|
75
75
|
setHours(maxHours);
|
|
76
76
|
}
|
|
@@ -78,21 +78,21 @@ const StorageSlidersProvider = ({
|
|
|
78
78
|
setCameras(maxCameras);
|
|
79
79
|
}
|
|
80
80
|
}, [cameras, hours, maxCameras, maxHours]);
|
|
81
|
-
const hdds =
|
|
81
|
+
const hdds = react.useMemo(() => {
|
|
82
82
|
if (!storageHoursPerHdd || !cameras || !hours) {
|
|
83
83
|
return 0;
|
|
84
84
|
}
|
|
85
85
|
const item = [...storageHoursPerHdd].reverse().find(el => el.hours <= hours);
|
|
86
86
|
return item?.hdds ?? 1;
|
|
87
87
|
}, [cameras, hours, storageHoursPerHdd]);
|
|
88
|
-
const [queuedSetHdds, setQueuedSetHdds] =
|
|
89
|
-
const handleSetHdds =
|
|
88
|
+
const [queuedSetHdds, setQueuedSetHdds] = react.useState();
|
|
89
|
+
const handleSetHdds = react.useCallback(count => {
|
|
90
90
|
if (!cameras) {
|
|
91
91
|
setCameras(1);
|
|
92
92
|
}
|
|
93
93
|
setQueuedSetHdds(count);
|
|
94
94
|
}, [cameras]);
|
|
95
|
-
|
|
95
|
+
react.useEffect(() => {
|
|
96
96
|
if (queuedSetHdds == null) return;
|
|
97
97
|
const item = storageHoursPerHdd.find(({
|
|
98
98
|
hdds: hdds2
|
|
@@ -100,7 +100,7 @@ const StorageSlidersProvider = ({
|
|
|
100
100
|
setHours(item?.hours ?? 0);
|
|
101
101
|
setQueuedSetHdds(void 0);
|
|
102
102
|
}, [queuedSetHdds, storageHoursPerHdd]);
|
|
103
|
-
const handleSetCameras =
|
|
103
|
+
const handleSetCameras = react.useCallback(value2 => {
|
|
104
104
|
if (hours === 0 && value2 > 0) {
|
|
105
105
|
setHours(1);
|
|
106
106
|
} else if (value2 === 0) {
|
|
@@ -108,13 +108,13 @@ const StorageSlidersProvider = ({
|
|
|
108
108
|
}
|
|
109
109
|
setCameras(value2);
|
|
110
110
|
}, [hours]);
|
|
111
|
-
const handleSetHours =
|
|
111
|
+
const handleSetHours = react.useCallback(value2 => {
|
|
112
112
|
if (cameras === 0 && value2 > 0) {
|
|
113
113
|
setCameras(1);
|
|
114
114
|
}
|
|
115
115
|
setHours(value2);
|
|
116
116
|
}, [cameras]);
|
|
117
|
-
const value =
|
|
117
|
+
const value = react.useMemo(() => {
|
|
118
118
|
return {
|
|
119
119
|
cameraType,
|
|
120
120
|
setCameraType,
|
|
@@ -137,7 +137,7 @@ const StorageSlidersProvider = ({
|
|
|
137
137
|
});
|
|
138
138
|
};
|
|
139
139
|
function useStorageSliders() {
|
|
140
|
-
const context =
|
|
140
|
+
const context = react.useContext(StorageSlidersContext);
|
|
141
141
|
if (context === null) {
|
|
142
142
|
throw new Error("useStorageSliders must be used within a StorageSlidersProvider");
|
|
143
143
|
}
|