@ubnt/store.core 9.62.0-beta.1 → 9.62.1-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 +13 -593
- package/lib/_virtual/_virtual_multi-entry.js +2 -15
- package/lib/_virtual/_virtual_multi-entry.js.map +1 -1
- package/lib/_virtual/_virtual_multi-entry.mjs +0 -2
- package/lib/_virtual/_virtual_multi-entry.mjs.map +1 -1
- package/lib/assets/attention.svg +5 -5
- package/lib/assets/attention2.svg +5 -5
- package/lib/assets/close2.svg +2 -3
- package/lib/assets/close3.svg +3 -2
- package/lib/assets/poe2.svg +3 -2
- package/lib/assets/poe3.svg +2 -3
- package/lib/assets/port.svg +4 -2
- package/lib/assets/port2.svg +2 -4
- package/lib/assets/udmPro.jpg +0 -0
- package/lib/assets/udmPro2.jpg +0 -0
- package/lib/assets/udmProMax.jpg +0 -0
- package/lib/assets/udmProMax2.jpg +0 -0
- package/lib/assets/udmProSpecial.jpg +0 -0
- package/lib/assets/udmProSpecial2.jpg +0 -0
- package/lib/components/Accordion/Accordion.js +9 -9
- package/lib/components/Accordion/Accordion.js.map +1 -1
- package/lib/components/Accordion/Accordion.mjs +9 -9
- package/lib/components/Accordion/Accordion.mjs.map +1 -1
- package/lib/components/Accordion/Accordion.styles.d.ts +18 -18
- package/lib/components/Accordion/Accordion.styles.js +22 -28
- package/lib/components/Accordion/Accordion.styles.js.map +1 -1
- package/lib/components/Accordion/Accordion.styles.mjs +22 -28
- package/lib/components/Accordion/Accordion.styles.mjs.map +1 -1
- package/lib/components/AppDownloadBanner/AppDownloadBanner.styles.d.ts +21 -23
- package/lib/components/Avatar/Avatar.js +3 -4
- package/lib/components/Avatar/Avatar.js.map +1 -1
- package/lib/components/Avatar/Avatar.mjs +3 -4
- package/lib/components/Avatar/Avatar.mjs.map +1 -1
- package/lib/components/Avatar/Avatar.styles.d.ts +2 -2
- package/lib/components/BackInStock/BackInStock.styles.d.ts +7 -12
- package/lib/components/BackInStock/BackInStock.types.d.ts +0 -1
- package/lib/components/Badge/Badge.styles.d.ts +2 -2
- package/lib/components/Banner/Banner.js +4 -4
- package/lib/components/Banner/Banner.js.map +1 -1
- package/lib/components/Banner/Banner.mjs +4 -4
- package/lib/components/Banner/Banner.mjs.map +1 -1
- package/lib/components/Banner/Banner.styles.d.ts +16 -16
- package/lib/components/Banner/Banner.styles.js +9 -9
- package/lib/components/Banner/Banner.styles.js.map +1 -1
- package/lib/components/Banner/Banner.styles.mjs +9 -9
- package/lib/components/Banner/Banner.styles.mjs.map +1 -1
- package/lib/components/Breadcrumbs/Breadcrumbs.styles.d.ts +2 -2
- package/lib/components/BuiltFeaturesSection/BuiltFeaturesSection.styles.d.ts +9 -9
- package/lib/components/Button/Button.styles.d.ts +4 -4
- package/lib/components/ButtonGroup/ButtonGroup.js +5 -5
- package/lib/components/ButtonGroup/ButtonGroup.js.map +1 -1
- package/lib/components/ButtonGroup/ButtonGroup.mjs +5 -5
- package/lib/components/ButtonGroup/ButtonGroup.mjs.map +1 -1
- package/lib/components/ButtonGroup/ButtonGroup.styles.d.ts +13 -13
- package/lib/components/ButtonGroup/ButtonGroup.styles.js +15 -15
- package/lib/components/ButtonGroup/ButtonGroup.styles.js.map +1 -1
- package/lib/components/ButtonGroup/ButtonGroup.styles.mjs +15 -15
- package/lib/components/ButtonGroup/ButtonGroup.styles.mjs.map +1 -1
- 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 +4 -8
- 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 +10 -10
- package/lib/components/CardSection/Card/Card.js.map +1 -1
- package/lib/components/CardSection/Card/Card.mjs +10 -10
- package/lib/components/CardSection/Card/Card.mjs.map +1 -1
- package/lib/components/CardSection/Card/Card.styles.d.ts +21 -21
- package/lib/components/CardSection/Card/Card.styles.js +22 -22
- package/lib/components/CardSection/Card/Card.styles.js.map +1 -1
- package/lib/components/CardSection/Card/Card.styles.mjs +22 -22
- package/lib/components/CardSection/Card/Card.styles.mjs.map +1 -1
- package/lib/components/CardSection/CardSection.styles.d.ts +4 -4
- package/lib/components/CarouselGallery/CarouselGallery.styles.d.ts +11 -11
- package/lib/components/CartIcon/CartIcon.js +2 -2
- package/lib/components/CartIcon/CartIcon.js.map +1 -1
- package/lib/components/CartIcon/CartIcon.mjs +2 -2
- package/lib/components/CartIcon/CartIcon.mjs.map +1 -1
- package/lib/components/CartIcon/CartIcon.styles.d.ts +5 -5
- package/lib/components/CartIcon/CartIcon.styles.js +4 -4
- package/lib/components/CartIcon/CartIcon.styles.js.map +1 -1
- package/lib/components/CartIcon/CartIcon.styles.mjs +4 -4
- package/lib/components/CartIcon/CartIcon.styles.mjs.map +1 -1
- package/lib/components/CartSummary/CartSummary.js +1 -1
- package/lib/components/CartSummary/CartSummary.js.map +1 -1
- package/lib/components/CartSummary/CartSummary.mjs +1 -1
- package/lib/components/CartSummary/CartSummary.mjs.map +1 -1
- package/lib/components/CartSummary/CartSummary.styles.d.ts +13 -19
- package/lib/components/CartSummary/CartSummary.styles.js +2 -2
- package/lib/components/CartSummary/CartSummary.styles.js.map +1 -1
- package/lib/components/CartSummary/CartSummary.styles.mjs +2 -2
- package/lib/components/CartSummary/CartSummary.styles.mjs.map +1 -1
- package/lib/components/CategoryTabs/CategoryTabs.styles.d.ts +6 -6
- package/lib/components/CategoryTabs/CategoryTabs.styles.js +1 -1
- package/lib/components/CategoryTabs/CategoryTabs.styles.js.map +1 -1
- package/lib/components/CategoryTabs/CategoryTabs.styles.mjs +1 -1
- package/lib/components/CategoryTabs/CategoryTabs.styles.mjs.map +1 -1
- package/lib/components/Checkbox/Checkbox.js +0 -3
- package/lib/components/Checkbox/Checkbox.js.map +1 -1
- package/lib/components/Checkbox/Checkbox.mjs +0 -3
- package/lib/components/Checkbox/Checkbox.mjs.map +1 -1
- package/lib/components/Checkbox/Checkbox.styles.d.ts +3 -3
- package/lib/components/Checkbox/Checkbox.types.d.ts +1 -1
- package/lib/components/CloserLookSection/CloserLookSection.styles.d.ts +8 -8
- package/lib/components/CloserLookSection/RecommendedAddons/RecommendedAddons.styles.d.ts +3 -3
- package/lib/components/Compare/Compare.styles.d.ts +34 -36
- package/lib/components/CompareChart/CompareChart.styles.d.ts +36 -40
- package/lib/components/CompareSection/CompareSection.styles.d.ts +16 -18
- package/lib/components/Container/Container.styles.d.ts +3 -3
- package/lib/components/CustomImage/CustomImage.styles.d.ts +12 -12
- package/lib/components/DeploymentGallery/DeploymentGallery.styles.d.ts +4 -4
- package/lib/components/Explore/Explore.styles.d.ts +28 -36
- package/lib/components/Explore/Explore.styles.js +6 -6
- package/lib/components/Explore/Explore.styles.js.map +1 -1
- package/lib/components/Explore/Explore.styles.mjs +6 -6
- package/lib/components/Explore/Explore.styles.mjs.map +1 -1
- package/lib/components/Explore/ExploreData.js +12 -12
- package/lib/components/Explore/ExploreData.js.map +1 -1
- package/lib/components/Explore/ExploreData.mjs +12 -12
- package/lib/components/Explore/ExploreData.mjs.map +1 -1
- package/lib/components/FeaturesSection_deprecated/AllFeaturesButton/AllFeaturesButton.styles.d.ts +3 -5
- package/lib/components/FeaturesSection_deprecated/Features/Features.styles.d.ts +15 -15
- package/lib/components/FeaturesSection_deprecated/FeaturesSection.js +1 -1
- package/lib/components/FeaturesSection_deprecated/FeaturesSection.mjs +1 -1
- package/lib/components/FeaturesSection_deprecated/FeaturesSection.styles.d.ts +22 -22
- 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 +1 -0
- package/lib/components/Footer/Footer.js.map +1 -1
- package/lib/components/Footer/Footer.mjs +1 -0
- package/lib/components/Footer/Footer.mjs.map +1 -1
- package/lib/components/Footer/Footer.styles.d.ts +34 -39
- package/lib/components/Footer/Footer.styles.js +1 -1
- package/lib/components/Footer/Footer.styles.js.map +1 -1
- package/lib/components/Footer/Footer.styles.mjs +1 -1
- package/lib/components/Footer/Footer.styles.mjs.map +1 -1
- package/lib/components/Gallery/Gallery.js +1 -1
- package/lib/components/Gallery/Gallery.js.map +1 -1
- package/lib/components/Gallery/Gallery.mjs +1 -1
- package/lib/components/Gallery/Gallery.mjs.map +1 -1
- package/lib/components/Gallery/Gallery.styles.d.ts +8 -12
- package/lib/components/Gallery/Gallery.styles.js +1 -3
- package/lib/components/Gallery/Gallery.styles.js.map +1 -1
- package/lib/components/Gallery/Gallery.styles.mjs +1 -3
- package/lib/components/Gallery/Gallery.styles.mjs.map +1 -1
- package/lib/components/Gallery/GalleryControls/GalleryControls.js +1 -1
- package/lib/components/Gallery/GalleryControls/GalleryControls.js.map +1 -1
- package/lib/components/Gallery/GalleryControls/GalleryControls.mjs +1 -1
- package/lib/components/Gallery/GalleryControls/GalleryControls.mjs.map +1 -1
- package/lib/components/Gallery/GalleryControls/GalleryControls.styles.d.ts +9 -9
- package/lib/components/Gallery/GalleryControls/GalleryControls.styles.js +2 -2
- package/lib/components/Gallery/GalleryControls/GalleryControls.styles.js.map +1 -1
- package/lib/components/Gallery/GalleryControls/GalleryControls.styles.mjs +2 -2
- package/lib/components/Gallery/GalleryControls/GalleryControls.styles.mjs.map +1 -1
- package/lib/components/Gallery/GalleryItem/GalleryItem.js +5 -5
- package/lib/components/Gallery/GalleryItem/GalleryItem.js.map +1 -1
- package/lib/components/Gallery/GalleryItem/GalleryItem.mjs +5 -5
- package/lib/components/Gallery/GalleryItem/GalleryItem.mjs.map +1 -1
- package/lib/components/Gallery/GalleryItem/GalleryItem.styles.d.ts +10 -10
- package/lib/components/Gallery/GalleryItem/GalleryItem.styles.js +11 -11
- package/lib/components/Gallery/GalleryItem/GalleryItem.styles.js.map +1 -1
- package/lib/components/Gallery/GalleryItem/GalleryItem.styles.mjs +11 -11
- package/lib/components/Gallery/GalleryItem/GalleryItem.styles.mjs.map +1 -1
- package/lib/components/Gallery/GalleryThumbnails/GalleryThumbnails.styles.d.ts +8 -8
- package/lib/components/GradientButton/GradientButton.d.ts +1 -1
- package/lib/components/GradientButton/GradientButton.js +0 -2
- package/lib/components/GradientButton/GradientButton.js.map +1 -1
- package/lib/components/GradientButton/GradientButton.mjs +0 -2
- package/lib/components/GradientButton/GradientButton.mjs.map +1 -1
- package/lib/components/GradientButton/GradientButton.styles.d.ts +4 -4
- package/lib/components/GradientButton/GradientButton.styles.js +6 -6
- package/lib/components/GradientButton/GradientButton.styles.js.map +1 -1
- package/lib/components/GradientButton/GradientButton.styles.mjs +6 -6
- package/lib/components/GradientButton/GradientButton.styles.mjs.map +1 -1
- package/lib/components/GridGallery/GridGallery.js +1 -1
- package/lib/components/GridGallery/GridGallery.js.map +1 -1
- package/lib/components/GridGallery/GridGallery.mjs +1 -1
- package/lib/components/GridGallery/GridGallery.mjs.map +1 -1
- package/lib/components/GridGallery/GridGallery.styles.d.ts +13 -13
- package/lib/components/GridGallery/GridGallery.styles.js +2 -2
- package/lib/components/GridGallery/GridGallery.styles.js.map +1 -1
- package/lib/components/GridGallery/GridGallery.styles.mjs +2 -2
- package/lib/components/GridGallery/GridGallery.styles.mjs.map +1 -1
- package/lib/components/GridGallery/GridModal/GridModal.js +1 -1
- package/lib/components/GridGallery/GridModal/GridModal.js.map +1 -1
- package/lib/components/GridGallery/GridModal/GridModal.mjs +1 -1
- package/lib/components/GridGallery/GridModal/GridModal.mjs.map +1 -1
- package/lib/components/GridGallery/GridModal/GridModal.styles.d.ts +7 -7
- package/lib/components/GridGallery/GridModal/GridModal.styles.js +4 -4
- package/lib/components/GridGallery/GridModal/GridModal.styles.js.map +1 -1
- package/lib/components/GridGallery/GridModal/GridModal.styles.mjs +4 -4
- package/lib/components/GridGallery/GridModal/GridModal.styles.mjs.map +1 -1
- package/lib/components/Header/AccountFrame/AccountFrame.js +1 -1
- package/lib/components/Header/AccountFrame/AccountFrame.js.map +1 -1
- package/lib/components/Header/AccountFrame/AccountFrame.mjs +1 -1
- package/lib/components/Header/AccountFrame/AccountFrame.mjs.map +1 -1
- package/lib/components/Header/AccountFrame/AccountFrame.styles.d.ts +15 -19
- package/lib/components/Header/AccountFrame/AccountFrame.styles.js +2 -2
- package/lib/components/Header/AccountFrame/AccountFrame.styles.js.map +1 -1
- package/lib/components/Header/AccountFrame/AccountFrame.styles.mjs +2 -2
- package/lib/components/Header/AccountFrame/AccountFrame.styles.mjs.map +1 -1
- package/lib/components/Header/AccountFrame/Mobile/Mobile.styles.d.ts +3 -3
- package/lib/components/Header/AccountMenu/AccountMenu.styles.d.ts +12 -30
- package/lib/components/Header/CartModal/CartModal.styles.d.ts +13 -15
- package/lib/components/Header/CartModal/Empty/Empty.styles.d.ts +1 -1
- package/lib/components/Header/CartModal/Item/Item.styles.d.ts +10 -10
- package/lib/components/Header/CartModalV2/CartModal.styles.d.ts +21 -23
- package/lib/components/Header/CartModalV2/Item/Item.styles.d.ts +13 -13
- package/lib/components/Header/Header.js +3 -3
- package/lib/components/Header/Header.js.map +1 -1
- package/lib/components/Header/Header.mjs +3 -3
- package/lib/components/Header/Header.mjs.map +1 -1
- package/lib/components/Header/Header.styles.d.ts +41 -45
- package/lib/components/Header/Header.styles.js +1 -1
- package/lib/components/Header/Header.styles.js.map +1 -1
- package/lib/components/Header/Header.styles.mjs +1 -1
- package/lib/components/Header/Header.styles.mjs.map +1 -1
- package/lib/components/Header/LanguageFrame/LanguageFrame.styles.d.ts +17 -14
- package/lib/components/Header/LanguageFrame/LanguageFrame.styles.js +51 -0
- package/lib/components/Header/LanguageFrame/LanguageFrame.styles.js.map +1 -1
- package/lib/components/Header/LanguageFrame/LanguageFrame.styles.mjs +47 -1
- package/lib/components/Header/LanguageFrame/LanguageFrame.styles.mjs.map +1 -1
- package/lib/components/Header/LanguageFrame/Mobile/Mobile.styles.d.ts +3 -3
- package/lib/components/Header/LinksModal/LinksModal.styles.d.ts +4 -4
- package/lib/components/Header/MenuItem/MenuItem.js +5 -4
- package/lib/components/Header/MenuItem/MenuItem.js.map +1 -1
- package/lib/components/Header/MenuItem/MenuItem.mjs +5 -4
- package/lib/components/Header/MenuItem/MenuItem.mjs.map +1 -1
- package/lib/components/Header/MenuItem/MenuItem.styles.d.ts +15 -15
- package/lib/components/Header/MenuItem/MenuItem.styles.js +8 -8
- package/lib/components/Header/MenuItem/MenuItem.styles.js.map +1 -1
- package/lib/components/Header/MenuItem/MenuItem.styles.mjs +8 -8
- package/lib/components/Header/MenuItem/MenuItem.styles.mjs.map +1 -1
- package/lib/components/Header/Navigation/Carousel/Carousel.js +6 -6
- package/lib/components/Header/Navigation/Carousel/Carousel.js.map +1 -1
- package/lib/components/Header/Navigation/Carousel/Carousel.mjs +6 -6
- package/lib/components/Header/Navigation/Carousel/Carousel.mjs.map +1 -1
- package/lib/components/Header/Navigation/Carousel/Carousel.styles.d.ts +20 -20
- package/lib/components/Header/Navigation/Carousel/Carousel.styles.js +16 -16
- package/lib/components/Header/Navigation/Carousel/Carousel.styles.js.map +1 -1
- package/lib/components/Header/Navigation/Carousel/Carousel.styles.mjs +16 -16
- package/lib/components/Header/Navigation/Carousel/Carousel.styles.mjs.map +1 -1
- package/lib/components/Header/Navigation/MicrositeMenu/MicrositeMenu.js +7 -7
- package/lib/components/Header/Navigation/MicrositeMenu/MicrositeMenu.js.map +1 -1
- package/lib/components/Header/Navigation/MicrositeMenu/MicrositeMenu.mjs +7 -7
- package/lib/components/Header/Navigation/MicrositeMenu/MicrositeMenu.mjs.map +1 -1
- package/lib/components/Header/Navigation/MicrositeMenu/MicrositeMenu.styles.d.ts +23 -29
- package/lib/components/Header/Navigation/MicrositeMenu/MicrositeMenu.styles.js +19 -19
- package/lib/components/Header/Navigation/MicrositeMenu/MicrositeMenu.styles.js.map +1 -1
- package/lib/components/Header/Navigation/MicrositeMenu/MicrositeMenu.styles.mjs +19 -19
- package/lib/components/Header/Navigation/MicrositeMenu/MicrositeMenu.styles.mjs.map +1 -1
- package/lib/components/Header/Navigation/MobileMenu/MobileMenu.js +9 -9
- package/lib/components/Header/Navigation/MobileMenu/MobileMenu.js.map +1 -1
- package/lib/components/Header/Navigation/MobileMenu/MobileMenu.mjs +9 -9
- package/lib/components/Header/Navigation/MobileMenu/MobileMenu.mjs.map +1 -1
- package/lib/components/Header/Navigation/MobileMenu/MobileMenu.styles.d.ts +36 -40
- package/lib/components/Header/Navigation/MobileMenu/MobileMenu.styles.js +18 -18
- package/lib/components/Header/Navigation/MobileMenu/MobileMenu.styles.js.map +1 -1
- package/lib/components/Header/Navigation/MobileMenu/MobileMenu.styles.mjs +18 -18
- package/lib/components/Header/Navigation/MobileMenu/MobileMenu.styles.mjs.map +1 -1
- package/lib/components/Header/Navigation/ProMobileMenu/ProMobileMenu.js +9 -9
- package/lib/components/Header/Navigation/ProMobileMenu/ProMobileMenu.js.map +1 -1
- package/lib/components/Header/Navigation/ProMobileMenu/ProMobileMenu.mjs +9 -9
- package/lib/components/Header/Navigation/ProMobileMenu/ProMobileMenu.mjs.map +1 -1
- package/lib/components/Header/Navigation/ProMobileMenu/ProMobileMenu.styles.d.ts +5 -7
- package/lib/components/Header/Overlay/Overlay.styles.d.ts +2 -2
- package/lib/components/Header/ProHeader/ProHeader.styles.d.ts +28 -34
- package/lib/components/Header/ProHeader/ProHeader.styles.js +2 -2
- package/lib/components/Header/ProHeader/ProHeader.styles.js.map +1 -1
- package/lib/components/Header/ProHeader/ProHeader.styles.mjs +2 -2
- package/lib/components/Header/ProHeader/ProHeader.styles.mjs.map +1 -1
- package/lib/components/Header/SearchTab/SearchTab.styles.d.ts +3 -3
- package/lib/components/Hero/Hero.styles.d.ts +28 -28
- package/lib/components/HeroFadeGallery/HeroFadeGallery.styles.d.ts +12 -12
- package/lib/components/HeroVideo/HeroVideo.styles.d.ts +7 -7
- package/lib/components/HowToUseSection/HowToUseSection.styles.d.ts +14 -14
- package/lib/components/ImageCarousel/ImageCarousel.styles.d.ts +34 -38
- package/lib/components/ImageCarousel/ImageCarousel.styles.js +4 -5
- package/lib/components/ImageCarousel/ImageCarousel.styles.js.map +1 -1
- package/lib/components/ImageCarousel/ImageCarousel.styles.mjs +4 -5
- package/lib/components/ImageCarousel/ImageCarousel.styles.mjs.map +1 -1
- package/lib/components/ImageModal/ImageModal.styles.d.ts +6 -8
- package/lib/components/ImageSequence/ImageSequence.styles.d.ts +8 -8
- package/lib/components/InputSelect/InputSelect.styles.d.ts +8 -4
- package/lib/components/LandingPage/Block/Block.styles.d.ts +4 -4
- package/lib/components/LandingPage/Cards/Card/Card.styles.d.ts +17 -17
- package/lib/components/LandingPage/Cards/Cards.styles.d.ts +9 -9
- package/lib/components/LandingPage/Cards/Cards.styles.js +1 -1
- package/lib/components/LandingPage/Cards/Cards.styles.js.map +1 -1
- package/lib/components/LandingPage/Cards/Cards.styles.mjs +1 -1
- package/lib/components/LandingPage/Cards/Cards.styles.mjs.map +1 -1
- package/lib/components/LandingPage/LandingPage.styles.d.ts +5 -5
- package/lib/components/LandingPagePro/LandingPagePro.styles.d.ts +3 -3
- package/lib/components/LandingPageSearch/LandingPageSearch.styles.d.ts +2 -2
- package/lib/components/LandingPageSearch/Modal/Modal.styles.d.ts +22 -26
- package/lib/components/LandingPageSidebar/LandingPageSidebar.styles.d.ts +22 -22
- package/lib/components/LayoutRenderer/LayoutRenderer.styles.d.ts +21 -23
- package/lib/components/LayoutRendererV1/LayoutRenderer.styles.d.ts +54 -60
- package/lib/components/LayoutRendererV2/LayoutRenderer.styles.d.ts +49 -57
- package/lib/components/LearnMoreLink/LearnMoreLink.styles.d.ts +2 -2
- package/lib/components/Loader/Loader.styles.d.ts +4 -4
- package/lib/components/Loader/Spinner/Spinner.styles.d.ts +3 -3
- package/lib/components/LoaderDots/LoaderDots.styles.d.ts +2 -2
- package/lib/components/MeetUniFiVideoPlayer/EpisodeCard/EpisodeCard.styles.d.ts +9 -11
- package/lib/components/MeetUniFiVideoPlayer/MeetUniFiVideoPlayer.styles.d.ts +25 -25
- package/lib/components/MicrositeBuyButton/MicrositeBuyButton.js +2 -2
- package/lib/components/MicrositeBuyButton/MicrositeBuyButton.js.map +1 -1
- package/lib/components/MicrositeBuyButton/MicrositeBuyButton.mjs +2 -2
- package/lib/components/MicrositeBuyButton/MicrositeBuyButton.mjs.map +1 -1
- package/lib/components/MicrositeColumnFeatureProgressBar/MicrositeColumnFeatureProgressBar.styles.d.ts +6 -6
- package/lib/components/MicrositeExploreCards/MicrositeExploreCards.styles.d.ts +8 -8
- package/lib/components/MicrositeFeatureChecklist/MicrositeFeatureChecklist.styles.d.ts +18 -20
- package/lib/components/MicrositeFeatureChecklist/MicrositeFeatureChecklist.styles.js +2 -2
- package/lib/components/MicrositeFeatureChecklist/MicrositeFeatureChecklist.styles.js.map +1 -1
- package/lib/components/MicrositeFeatureChecklist/MicrositeFeatureChecklist.styles.mjs +2 -2
- package/lib/components/MicrositeFeatureChecklist/MicrositeFeatureChecklist.styles.mjs.map +1 -1
- package/lib/components/MicrositeFeatureIcons/MicrositeFeatureIcons.styles.d.ts +11 -11
- package/lib/components/MicrositeFeatureList/MicrositeFeatureList.styles.d.ts +14 -14
- package/lib/components/MicrositeFeatureProgressBar/MicrositeFeatureProgressBar.styles.d.ts +24 -28
- package/lib/components/MicrositeFeatureProgressBar/MicrositeFeatureProgressBar.styles.js +2 -2
- package/lib/components/MicrositeFeatureProgressBar/MicrositeFeatureProgressBar.styles.js.map +1 -1
- package/lib/components/MicrositeFeatureProgressBar/MicrositeFeatureProgressBar.styles.mjs +2 -2
- package/lib/components/MicrositeFeatureProgressBar/MicrositeFeatureProgressBar.styles.mjs.map +1 -1
- package/lib/components/MicrositeHero/MicrositeHero.styles.d.ts +41 -41
- package/lib/components/MicrositeIntroductionBlock/MicrositeIntroductionBlock.styles.d.ts +6 -6
- package/lib/components/MicrositeMediaGrid/MicrositeMediaGrid.styles.d.ts +15 -15
- package/lib/components/MicrositeProductGrid/MicrositeProductGrid.styles.d.ts +15 -15
- package/lib/components/MicrositeProductLearnMoreBlock/MicrositeProductLearnMoreBlock.styles.d.ts +12 -14
- package/lib/components/MicrositeProductLearnMoreBlock/MicrositeProductLearnMoreBlock.styles.js +2 -2
- package/lib/components/MicrositeProductLearnMoreBlock/MicrositeProductLearnMoreBlock.styles.js.map +1 -1
- package/lib/components/MicrositeProductLearnMoreBlock/MicrositeProductLearnMoreBlock.styles.mjs +2 -2
- package/lib/components/MicrositeProductLearnMoreBlock/MicrositeProductLearnMoreBlock.styles.mjs.map +1 -1
- package/lib/components/MicrositeSection/AllFeaturesButton/AllFeaturesButton.styles.d.ts +3 -5
- package/lib/components/MicrositeSection/Features/Features.styles.d.ts +15 -15
- package/lib/components/MicrositeSection/MicrositeSection.styles.d.ts +24 -24
- package/lib/components/MicrositeSectionWrap/MicrositeSectionWrap.styles.d.ts +6 -8
- package/lib/components/MicrositeSubSubNavigation/MicrositeSubSubNavigation.styles.d.ts +2 -2
- package/lib/components/MicrositeVideoSlideshow/MicrositeVideoSlideshow.styles.d.ts +17 -17
- package/lib/components/Microsites/MicrositeProductPage.styles.d.ts +8 -16
- package/lib/components/MobileModal/MobileModal.styles.d.ts +8 -8
- package/lib/components/Modal/Modal.styles.d.ts +1 -1
- package/lib/components/ModelCompareV3/ModelCompareV3.styles.d.ts +34 -84
- package/lib/components/ModelCompareV3/ModelCompareV3.styles.js +7 -8
- package/lib/components/ModelCompareV3/ModelCompareV3.styles.js.map +1 -1
- package/lib/components/ModelCompareV3/ModelCompareV3.styles.mjs +7 -8
- package/lib/components/ModelCompareV3/ModelCompareV3.styles.mjs.map +1 -1
- package/lib/components/ModelCompareV3/ModelCompareV3.types.d.ts +0 -1
- package/lib/components/ModelCompareV3/StickyGrid/StickyGridItem.d.ts +2 -2
- package/lib/components/ModelCompareV3/StickyGrid/StickyGridOverlay.d.ts +1 -1
- package/lib/components/ModelCompareV3/assets/Consoles/bigCompare/udmPro.jpg.js +5 -5
- package/lib/components/ModelCompareV3/assets/Consoles/bigCompare/udmPro.jpg.mjs +2 -2
- package/lib/components/ModelCompareV3/assets/Consoles/bigCompare/udmProMax.jpg.js +5 -5
- package/lib/components/ModelCompareV3/assets/Consoles/bigCompare/udmProMax.jpg.mjs +2 -2
- package/lib/components/ModelCompareV3/assets/Consoles/bigCompare/udmProSpecial.jpg.js +5 -5
- package/lib/components/ModelCompareV3/assets/Consoles/bigCompare/udmProSpecial.jpg.mjs +2 -2
- package/lib/components/ModelCompareV3/assets/Consoles/udmPro.jpg.js +1 -1
- package/lib/components/ModelCompareV3/assets/Consoles/udmPro.jpg.mjs +2 -2
- package/lib/components/ModelCompareV3/assets/Consoles/udmProMax.jpg.js +1 -1
- package/lib/components/ModelCompareV3/assets/Consoles/udmProMax.jpg.mjs +2 -2
- package/lib/components/ModelCompareV3/assets/Consoles/udmProSpecial.jpg.js +1 -1
- package/lib/components/ModelCompareV3/assets/Consoles/udmProSpecial.jpg.mjs +2 -2
- package/lib/components/ModelCompareV3/assets/poe.svg.js +1 -1
- package/lib/components/ModelCompareV3/assets/poe.svg.mjs +2 -2
- package/lib/components/ModelCompareV3/assets/port.svg.js +1 -1
- package/lib/components/ModelCompareV3/assets/port.svg.mjs +2 -2
- package/lib/components/ModelCompareV3/data/CloudGateways.js +9 -9
- package/lib/components/ModelCompareV3/data/CloudGateways.mjs +6 -6
- package/lib/components/ModelCompareV3/data/EnterpriseSwitching.js +2 -3
- package/lib/components/ModelCompareV3/data/EnterpriseSwitching.js.map +1 -1
- package/lib/components/ModelCompareV3/data/EnterpriseSwitching.mjs +2 -3
- package/lib/components/ModelCompareV3/data/EnterpriseSwitching.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/ProfessionalMaxSwitching.js +3 -10
- package/lib/components/ModelCompareV3/data/ProfessionalMaxSwitching.js.map +1 -1
- package/lib/components/ModelCompareV3/data/ProfessionalMaxSwitching.mjs +3 -10
- package/lib/components/ModelCompareV3/data/ProfessionalMaxSwitching.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/Switching.js +2 -3
- package/lib/components/ModelCompareV3/data/Switching.js.map +1 -1
- package/lib/components/ModelCompareV3/data/Switching.mjs +2 -3
- package/lib/components/ModelCompareV3/data/Switching.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/products/aggregation.js +0 -7
- package/lib/components/ModelCompareV3/data/products/aggregation.js.map +1 -1
- package/lib/components/ModelCompareV3/data/products/aggregation.mjs +0 -7
- package/lib/components/ModelCompareV3/data/products/aggregation.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/products/cloudKeyEnterprise.js +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/enterpriseAggregation.js +0 -7
- package/lib/components/ModelCompareV3/data/products/enterpriseAggregation.js.map +1 -1
- package/lib/components/ModelCompareV3/data/products/enterpriseAggregation.mjs +0 -7
- package/lib/components/ModelCompareV3/data/products/enterpriseAggregation.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/products/enterpriseCampus24PoE.js +0 -8
- package/lib/components/ModelCompareV3/data/products/enterpriseCampus24PoE.js.map +1 -1
- package/lib/components/ModelCompareV3/data/products/enterpriseCampus24PoE.mjs +0 -8
- package/lib/components/ModelCompareV3/data/products/enterpriseCampus24PoE.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/products/enterpriseCampus48PoE.js +0 -8
- package/lib/components/ModelCompareV3/data/products/enterpriseCampus48PoE.js.map +1 -1
- package/lib/components/ModelCompareV3/data/products/enterpriseCampus48PoE.mjs +0 -8
- package/lib/components/ModelCompareV3/data/products/enterpriseCampus48PoE.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/products/express.js +3 -3
- package/lib/components/ModelCompareV3/data/products/express.js.map +1 -1
- package/lib/components/ModelCompareV3/data/products/express.mjs +3 -3
- package/lib/components/ModelCompareV3/data/products/express.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/products/g4Instant.js +2 -2
- package/lib/components/ModelCompareV3/data/products/g4Instant.js.map +1 -1
- package/lib/components/ModelCompareV3/data/products/g4Instant.mjs +2 -2
- package/lib/components/ModelCompareV3/data/products/g4Instant.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/highCapacityAggregation.js +0 -7
- package/lib/components/ModelCompareV3/data/products/highCapacityAggregation.js.map +1 -1
- package/lib/components/ModelCompareV3/data/products/highCapacityAggregation.mjs +0 -7
- package/lib/components/ModelCompareV3/data/products/highCapacityAggregation.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/products/missionCritical.js +0 -7
- package/lib/components/ModelCompareV3/data/products/missionCritical.js.map +1 -1
- package/lib/components/ModelCompareV3/data/products/missionCritical.mjs +0 -7
- package/lib/components/ModelCompareV3/data/products/missionCritical.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/products/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/professionalHd24.js +2 -11
- package/lib/components/ModelCompareV3/data/products/professionalHd24.js.map +1 -1
- package/lib/components/ModelCompareV3/data/products/professionalHd24.mjs +2 -11
- package/lib/components/ModelCompareV3/data/products/professionalHd24.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/products/professionalHd24Poe.js +2 -9
- package/lib/components/ModelCompareV3/data/products/professionalHd24Poe.js.map +1 -1
- package/lib/components/ModelCompareV3/data/products/professionalHd24Poe.mjs +2 -9
- package/lib/components/ModelCompareV3/data/products/professionalHd24Poe.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/products/professionalMax16.js +0 -7
- package/lib/components/ModelCompareV3/data/products/professionalMax16.js.map +1 -1
- package/lib/components/ModelCompareV3/data/products/professionalMax16.mjs +0 -7
- package/lib/components/ModelCompareV3/data/products/professionalMax16.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/products/professionalMax16PoE.js +0 -7
- package/lib/components/ModelCompareV3/data/products/professionalMax16PoE.js.map +1 -1
- package/lib/components/ModelCompareV3/data/products/professionalMax16PoE.mjs +0 -7
- package/lib/components/ModelCompareV3/data/products/professionalMax16PoE.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/products/professionalMax24.js +0 -7
- package/lib/components/ModelCompareV3/data/products/professionalMax24.js.map +1 -1
- package/lib/components/ModelCompareV3/data/products/professionalMax24.mjs +0 -7
- package/lib/components/ModelCompareV3/data/products/professionalMax24.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/products/professionalMax24PoE.js +0 -7
- package/lib/components/ModelCompareV3/data/products/professionalMax24PoE.js.map +1 -1
- package/lib/components/ModelCompareV3/data/products/professionalMax24PoE.mjs +0 -7
- package/lib/components/ModelCompareV3/data/products/professionalMax24PoE.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/products/professionalMax48.js +0 -7
- package/lib/components/ModelCompareV3/data/products/professionalMax48.js.map +1 -1
- package/lib/components/ModelCompareV3/data/products/professionalMax48.mjs +0 -7
- package/lib/components/ModelCompareV3/data/products/professionalMax48.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/products/professionalMax48PoE.js +0 -7
- package/lib/components/ModelCompareV3/data/products/professionalMax48PoE.js.map +1 -1
- package/lib/components/ModelCompareV3/data/products/professionalMax48PoE.mjs +0 -7
- package/lib/components/ModelCompareV3/data/products/professionalMax48PoE.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/products/switchesEnterprise.js +0 -8
- package/lib/components/ModelCompareV3/data/products/switchesEnterprise.js.map +1 -1
- package/lib/components/ModelCompareV3/data/products/switchesEnterprise.mjs +0 -8
- package/lib/components/ModelCompareV3/data/products/switchesEnterprise.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/products/switchesProfessional.js +0 -7
- package/lib/components/ModelCompareV3/data/products/switchesProfessional.js.map +1 -1
- package/lib/components/ModelCompareV3/data/products/switchesProfessional.mjs +0 -7
- package/lib/components/ModelCompareV3/data/products/switchesProfessional.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/products/switchesProfessionalHd.js +0 -7
- package/lib/components/ModelCompareV3/data/products/switchesProfessionalHd.js.map +1 -1
- package/lib/components/ModelCompareV3/data/products/switchesProfessionalHd.mjs +0 -7
- package/lib/components/ModelCompareV3/data/products/switchesProfessionalHd.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/products/switchesProfessionalMax.js +1 -10
- package/lib/components/ModelCompareV3/data/products/switchesProfessionalMax.js.map +1 -1
- package/lib/components/ModelCompareV3/data/products/switchesProfessionalMax.mjs +1 -10
- package/lib/components/ModelCompareV3/data/products/switchesProfessionalMax.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/products/switchesStandard.js +0 -7
- package/lib/components/ModelCompareV3/data/products/switchesStandard.js.map +1 -1
- package/lib/components/ModelCompareV3/data/products/switchesStandard.mjs +0 -7
- package/lib/components/ModelCompareV3/data/products/switchesStandard.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/products/ucgMax.js +1 -1
- package/lib/components/ModelCompareV3/data/products/ucgMax.js.map +1 -1
- package/lib/components/ModelCompareV3/data/products/ucgMax.mjs +1 -1
- package/lib/components/ModelCompareV3/data/products/ucgMax.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/products/ucgUltra.js +3 -3
- package/lib/components/ModelCompareV3/data/products/ucgUltra.js.map +1 -1
- package/lib/components/ModelCompareV3/data/products/ucgUltra.mjs +3 -3
- package/lib/components/ModelCompareV3/data/products/ucgUltra.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/products/udmPro.js +4 -4
- package/lib/components/ModelCompareV3/data/products/udmPro.js.map +1 -1
- package/lib/components/ModelCompareV3/data/products/udmPro.mjs +4 -4
- package/lib/components/ModelCompareV3/data/products/udmPro.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/products/udmProMax.js +4 -4
- package/lib/components/ModelCompareV3/data/products/udmProMax.js.map +1 -1
- package/lib/components/ModelCompareV3/data/products/udmProMax.mjs +4 -4
- package/lib/components/ModelCompareV3/data/products/udmProMax.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/products/udmProSpecial.js +4 -4
- package/lib/components/ModelCompareV3/data/products/udmProSpecial.js.map +1 -1
- package/lib/components/ModelCompareV3/data/products/udmProSpecial.mjs +4 -4
- package/lib/components/ModelCompareV3/data/products/udmProSpecial.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/products/udr.js +41 -5
- package/lib/components/ModelCompareV3/data/products/udr.js.map +1 -1
- package/lib/components/ModelCompareV3/data/products/udr.mjs +21 -5
- package/lib/components/ModelCompareV3/data/products/udr.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/products/udw.js +3 -3
- package/lib/components/ModelCompareV3/data/products/udw.js.map +1 -1
- package/lib/components/ModelCompareV3/data/products/udw.mjs +3 -3
- package/lib/components/ModelCompareV3/data/products/udw.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/properties/index.d.ts +0 -1
- package/lib/components/ModelCompareV3/data/properties/index.js +0 -2
- package/lib/components/ModelCompareV3/data/properties/index.js.map +1 -1
- package/lib/components/ModelCompareV3/data/properties/index.mjs +0 -1
- package/lib/components/ModelCompareV3/data/properties/index.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/properties/powerMethodPoe.js +1 -1
- package/lib/components/ModelCompareV3/data/properties/powerMethodPoe.mjs +1 -1
- package/lib/components/ModelCompareV3/data/properties/readerPowerMethod.js +1 -1
- package/lib/components/ModelCompareV3/data/properties/readerPowerMethod.mjs +1 -1
- package/lib/components/ModelCompareV3/data/properties/redundantRj45Port.js +1 -1
- package/lib/components/ModelCompareV3/data/properties/redundantRj45Port.mjs +1 -1
- package/lib/components/ModelCompareV3/translations/ar.json.js +10 -11
- package/lib/components/ModelCompareV3/translations/ar.json.js.map +1 -1
- package/lib/components/ModelCompareV3/translations/ar.json.mjs +10 -11
- package/lib/components/ModelCompareV3/translations/ar.json.mjs.map +1 -1
- package/lib/components/ModelCompareV3/translations/de.json.js +2 -3
- package/lib/components/ModelCompareV3/translations/de.json.js.map +1 -1
- package/lib/components/ModelCompareV3/translations/de.json.mjs +2 -3
- package/lib/components/ModelCompareV3/translations/de.json.mjs.map +1 -1
- package/lib/components/ModelCompareV3/translations/el.json.js +1 -2
- package/lib/components/ModelCompareV3/translations/el.json.js.map +1 -1
- package/lib/components/ModelCompareV3/translations/el.json.mjs +1 -2
- package/lib/components/ModelCompareV3/translations/el.json.mjs.map +1 -1
- package/lib/components/ModelCompareV3/translations/en.json.js +0 -3
- package/lib/components/ModelCompareV3/translations/en.json.js.map +1 -1
- package/lib/components/ModelCompareV3/translations/en.json.mjs +0 -3
- package/lib/components/ModelCompareV3/translations/en.json.mjs.map +1 -1
- package/lib/components/ModelCompareV3/translations/es.json.js +2 -3
- package/lib/components/ModelCompareV3/translations/es.json.js.map +1 -1
- package/lib/components/ModelCompareV3/translations/es.json.mjs +2 -3
- package/lib/components/ModelCompareV3/translations/es.json.mjs.map +1 -1
- package/lib/components/ModelCompareV3/translations/fr.json.js +1 -2
- package/lib/components/ModelCompareV3/translations/fr.json.js.map +1 -1
- package/lib/components/ModelCompareV3/translations/fr.json.mjs +1 -2
- package/lib/components/ModelCompareV3/translations/fr.json.mjs.map +1 -1
- package/lib/components/ModelCompareV3/translations/it.json.js +1 -2
- package/lib/components/ModelCompareV3/translations/it.json.js.map +1 -1
- package/lib/components/ModelCompareV3/translations/it.json.mjs +1 -2
- package/lib/components/ModelCompareV3/translations/it.json.mjs.map +1 -1
- package/lib/components/ModelCompareV3/translations/ja.json.js +7 -8
- package/lib/components/ModelCompareV3/translations/ja.json.js.map +1 -1
- package/lib/components/ModelCompareV3/translations/ja.json.mjs +7 -8
- package/lib/components/ModelCompareV3/translations/ja.json.mjs.map +1 -1
- package/lib/components/ModelCompareV3/translations/pt-BR.json.js +1 -2
- package/lib/components/ModelCompareV3/translations/pt-BR.json.js.map +1 -1
- package/lib/components/ModelCompareV3/translations/pt-BR.json.mjs +1 -2
- package/lib/components/ModelCompareV3/translations/pt-BR.json.mjs.map +1 -1
- package/lib/components/ModelCompareV3/translations/useModelCompareTranslation.d.ts +2 -2
- package/lib/components/ModelCompareV3/translations/zh-Hans.json.js +5 -6
- package/lib/components/ModelCompareV3/translations/zh-Hans.json.js.map +1 -1
- package/lib/components/ModelCompareV3/translations/zh-Hans.json.mjs +5 -6
- package/lib/components/ModelCompareV3/translations/zh-Hans.json.mjs.map +1 -1
- package/lib/components/ModelCompareV3/translations/zh-Hant-TW.json.js +8 -9
- package/lib/components/ModelCompareV3/translations/zh-Hant-TW.json.js.map +1 -1
- package/lib/components/ModelCompareV3/translations/zh-Hant-TW.json.mjs +8 -9
- package/lib/components/ModelCompareV3/translations/zh-Hant-TW.json.mjs.map +1 -1
- package/lib/components/NewToUnifiBox/NewToUnifiBox.styles.d.ts +5 -5
- package/lib/components/Pagination/Pagination.styles.d.ts +4 -4
- package/lib/components/Popover/Popover.styles.d.ts +7 -11
- package/lib/components/PriceRangeSlider/PriceRangeSlider.styles.d.ts +7 -7
- package/lib/components/ProductCard/ProductCard.styles.d.ts +16 -16
- package/lib/components/ProductCardPopup/ProductCardPopup.styles.d.ts +37 -45
- package/lib/components/ProductCardPopup/ProductCardPopup.styles.js +3 -3
- package/lib/components/ProductCardPopup/ProductCardPopup.styles.js.map +1 -1
- package/lib/components/ProductCardPopup/ProductCardPopup.styles.mjs +3 -3
- package/lib/components/ProductCardPopup/ProductCardPopup.styles.mjs.map +1 -1
- package/lib/components/ProductCompare/ProductCompare.styles.d.ts +18 -18
- package/lib/components/ProductDetails/ProductDetails.styles.d.ts +2 -2
- package/lib/components/ProductGrid/ProductGrid.styles.d.ts +13 -10
- package/lib/components/ProductKeyFeatures/ProductKeyFeatures.styles.d.ts +6 -6
- package/lib/components/ProductRecommendedAccessories/ProductRecommendedAccessories.styles.d.ts +9 -11
- package/lib/components/ProductSectionNavigation/ProductSectionNavigation.styles.d.ts +6 -6
- package/lib/components/ProductSectionNavigationV2/ProductSectionNavigation.styles.d.ts +7 -7
- package/lib/components/ProductSectionTabs/ProductSectionTabs.styles.d.ts +6 -6
- package/lib/components/ProductTechSpecs/ProductTechSpecs.styles.d.ts +14 -14
- package/lib/components/ProductUpsell/ProductUpsell.styles.d.ts +18 -20
- package/lib/components/ProductWizard/Options/Options.styles.d.ts +2 -2
- package/lib/components/ProductWizard/ProductWizard.styles.d.ts +16 -22
- package/lib/components/ProductWizardFootnotes/ProductWizardFootnotes.styles.d.ts +9 -9
- package/lib/components/ProductWizardFootnotes/ProductWizardFootnotes.styles.js +1 -1
- package/lib/components/ProductWizardFootnotes/ProductWizardFootnotes.styles.js.map +1 -1
- package/lib/components/ProductWizardFootnotes/ProductWizardFootnotes.styles.mjs +1 -1
- package/lib/components/ProductWizardFootnotes/ProductWizardFootnotes.styles.mjs.map +1 -1
- package/lib/components/QuantityControls/QuantityControls.styles.d.ts +2 -2
- package/lib/components/QuantityInput/QuantityInput.styles.d.ts +12 -16
- package/lib/components/RelatedProducts/RelatedProducts.styles.d.ts +14 -14
- package/lib/components/RelatedProducts/RelatedProducts.styles.js +2 -2
- package/lib/components/RelatedProducts/RelatedProducts.styles.js.map +1 -1
- package/lib/components/RelatedProducts/RelatedProducts.styles.mjs +2 -2
- package/lib/components/RelatedProducts/RelatedProducts.styles.mjs.map +1 -1
- package/lib/components/RelatedProductsVariantSelector/RelatedProductsVariantSelector.styles.d.ts +21 -23
- package/lib/components/RelatedProductsVariantSelectorV1/RelatedProductsVariantSelector.styles.d.ts +16 -36
- package/lib/components/RelatedProductsVariantSelectorV2/RelatedProductsVariantSelector.styles.d.ts +16 -38
- package/lib/components/RelatedProductsVariantSelectorsV2/RelatedProductsVariantSelectors.styles.d.ts +1 -1
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/ComputeResourceCalculator.styles.d.ts +6 -6
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/DeviceSelect/DeviceSelect.styles.d.ts +13 -13
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/InputCard/InputCard.js +1 -1
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/InputCard/InputCard.mjs +1 -1
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/InputCard/InputCard.styles.d.ts +20 -20
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/InputCard/InputSections/Layout.styles.d.ts +6 -6
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/InputCard/assets/attention.svg.js +1 -1
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/InputCard/assets/attention.svg.mjs +2 -2
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/ProgressBarChart/ProgressBarChart.js +1 -1
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/ProgressBarChart/ProgressBarChart.mjs +1 -1
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/ProgressBarChart/ProgressBarChart.styles.d.ts +9 -9
- 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/PoeCalculator/PoeCalculator.styles.d.ts +1 -1
- package/lib/components/ResourceCalculatorV1/PoeCalculator/components/DesignCenterBanner/DesignCenterBanner.styles.d.ts +5 -5
- package/lib/components/ResourceCalculatorV1/PoeCalculator/components/PoeConsumerConfigurator/PoeConsumerConfigurator.styles.d.ts +10 -10
- package/lib/components/ResourceCalculatorV1/PoeCalculator/components/PoeConsumerConfigurator/PoeConsumerSelectModal/PoeConsumerSelectModal.styles.d.ts +17 -19
- package/lib/components/ResourceCalculatorV1/PoeCalculator/components/RecommendedPoeSwitches/RecommendedPoeSwitches.js +2 -2
- package/lib/components/ResourceCalculatorV1/PoeCalculator/components/RecommendedPoeSwitches/RecommendedPoeSwitches.mjs +2 -2
- package/lib/components/ResourceCalculatorV1/PoeCalculator/components/RecommendedPoeSwitches/RecommendedPoeSwitches.styles.d.ts +16 -16
- package/lib/components/ResourceCalculatorV1/PoeCalculator/components/RecommendedPoeSwitches/assets/poe.svg.js +1 -1
- package/lib/components/ResourceCalculatorV1/PoeCalculator/components/RecommendedPoeSwitches/assets/poe.svg.mjs +2 -2
- package/lib/components/ResourceCalculatorV1/PoeCalculator/components/RecommendedPoeSwitches/assets/port.svg.js +1 -1
- package/lib/components/ResourceCalculatorV1/PoeCalculator/components/RecommendedPoeSwitches/assets/port.svg.mjs +2 -2
- package/lib/components/ResourceCalculatorV1/ResourceCalculator.styles.d.ts +3 -3
- package/lib/components/ResourceCalculatorV1/components/HorizontalOptionSelect/HorizontalOptionSelect.styles.d.ts +3 -3
- package/lib/components/ReverseLoopingVideo/ReverseLoopingVideo.styles.d.ts +3 -3
- package/lib/components/ScrollWrapper/ScrollWrapper.styles.d.ts +14 -18
- package/lib/components/Search/Input/Input.styles.d.ts +11 -13
- package/lib/components/Search/Input/Input.styles.js +1 -1
- package/lib/components/Search/Input/Input.styles.js.map +1 -1
- package/lib/components/Search/Input/Input.styles.mjs +1 -1
- package/lib/components/Search/Input/Input.styles.mjs.map +1 -1
- package/lib/components/Search/Modal/Modal.styles.d.ts +18 -20
- package/lib/components/SearchInput/Input.styles.d.ts +7 -9
- package/lib/components/SkeletonFootnote/SkeletonFootnote.d.ts +1 -1
- package/lib/components/SkeletonLoader/SkeletonCircleLoader/SkeletonCircleLoader.styles.d.ts +3 -3
- package/lib/components/SkeletonLoader/SkeletonLinearLoader/SkeletonLinearLoader.styles.d.ts +3 -3
- package/lib/components/SkeletonLoader/SkeletonLoaderTable/SkeletonLoaderTable.styles.d.ts +8 -8
- package/lib/components/StaticModal/StaticModal.styles.d.ts +2 -2
- package/lib/components/StorageSliders/Slider/Slider.styles.d.ts +5 -7
- package/lib/components/StorageSliders/StorageSliders.styles.d.ts +12 -12
- package/lib/components/StorybookUtils/StoryButtonColumn.d.ts +1 -1
- package/lib/components/StorybookUtils/StoryButtonRow.d.ts +1 -1
- package/lib/components/StorybookUtils/StoryWrapper.d.ts +2 -2
- package/lib/components/TabinationButtons/TabinationButtons.styles.d.ts +9 -9
- package/lib/components/Toggle/Toggle.styles.d.ts +3 -3
- package/lib/components/Toggle/Toggle.styles.js +1 -1
- package/lib/components/Toggle/Toggle.styles.js.map +1 -1
- package/lib/components/Toggle/Toggle.styles.mjs +1 -1
- package/lib/components/Toggle/Toggle.styles.mjs.map +1 -1
- package/lib/components/Tooltip/Tooltip.styles.d.ts +3 -33
- package/lib/components/TopologyScheme/TopologyScheme.styles.d.ts +17 -17
- package/lib/components/UICare/UICare.styles.d.ts +16 -19
- package/lib/components/VariantSelector/CheckBox/CheckBox.styles.d.ts +6 -6
- package/lib/components/VariantSelector/Variant/BundleOffer/BundleOffer.styles.d.ts +7 -7
- package/lib/components/VariantSelector/Variant/Compatibility/Compatibility.styles.d.ts +18 -18
- package/lib/components/VariantSelector/Variant/Variant.styles.d.ts +65 -75
- package/lib/components/VariantSelector/VariantSelector.styles.d.ts +13 -17
- package/lib/components/VariantSelectorItem/VariantSelectorItem.styles.d.ts +3 -3
- package/lib/components/VariantSelectorV1/VariantSelector.styles.d.ts +28 -32
- package/lib/components/VariantSelectorV2/VariantSelector.styles.d.ts +19 -23
- package/lib/components/VideoCookiesConsent/VideoCookiesConsent.styles.d.ts +6 -8
- package/lib/components/VideoPlayer/VideoPlayer.styles.d.ts +5 -5
- package/lib/components/VideoPlayerNew/VideoPlayer.js +1 -1
- package/lib/components/VideoPlayerNew/VideoPlayer.mjs +1 -1
- package/lib/components/VideoPlayerNew/VideoPlayer.styles.d.ts +28 -31
- package/lib/components/VideoPlayerNew/VideoPlayer.styles.js +2 -2
- package/lib/components/VideoPlayerNew/VideoPlayer.styles.js.map +1 -1
- package/lib/components/VideoPlayerNew/VideoPlayer.styles.mjs +2 -2
- package/lib/components/VideoPlayerNew/VideoPlayer.styles.mjs.map +1 -1
- package/lib/components/VideoPlayerNew/assets/close.svg.js +1 -1
- package/lib/components/VideoPlayerNew/assets/close.svg.mjs +2 -2
- package/lib/constants/mixin.d.ts +3 -3
- package/lib/constants/proStoreCategories/mapping/index.d.ts +2 -2
- package/lib/constants/proStoreCategories/mapping/index.js +47 -32
- package/lib/constants/proStoreCategories/mapping/index.js.map +1 -1
- package/lib/constants/proStoreCategories/mapping/index.mjs +45 -31
- package/lib/constants/proStoreCategories/mapping/index.mjs.map +1 -1
- 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 -7
- package/lib/constants/proStoreCategories/mapping/unifi.js +9 -7
- package/lib/constants/proStoreCategories/mapping/unifi.js.map +1 -1
- package/lib/constants/proStoreCategories/mapping/unifi.mjs +9 -7
- package/lib/constants/proStoreCategories/mapping/unifi.mjs.map +1 -1
- package/lib/constants/proStoreCategories/translations/ar.json.js +2 -5
- package/lib/constants/proStoreCategories/translations/ar.json.js.map +1 -1
- package/lib/constants/proStoreCategories/translations/ar.json.mjs +3 -5
- package/lib/constants/proStoreCategories/translations/ar.json.mjs.map +1 -1
- package/lib/constants/proStoreCategories/translations/de.json.js +2 -5
- package/lib/constants/proStoreCategories/translations/de.json.js.map +1 -1
- package/lib/constants/proStoreCategories/translations/de.json.mjs +3 -5
- package/lib/constants/proStoreCategories/translations/de.json.mjs.map +1 -1
- package/lib/constants/proStoreCategories/translations/el.json.js +2 -5
- package/lib/constants/proStoreCategories/translations/el.json.js.map +1 -1
- package/lib/constants/proStoreCategories/translations/el.json.mjs +3 -5
- package/lib/constants/proStoreCategories/translations/el.json.mjs.map +1 -1
- package/lib/constants/proStoreCategories/translations/en.json.js +2 -2
- package/lib/constants/proStoreCategories/translations/en.json.mjs +2 -2
- package/lib/constants/proStoreCategories/translations/es.json.js +2 -5
- package/lib/constants/proStoreCategories/translations/es.json.js.map +1 -1
- package/lib/constants/proStoreCategories/translations/es.json.mjs +3 -5
- package/lib/constants/proStoreCategories/translations/es.json.mjs.map +1 -1
- package/lib/constants/proStoreCategories/translations/fr.json.js +2 -2
- package/lib/constants/proStoreCategories/translations/fr.json.mjs +2 -2
- package/lib/constants/proStoreCategories/translations/it.json.js +2 -5
- package/lib/constants/proStoreCategories/translations/it.json.js.map +1 -1
- package/lib/constants/proStoreCategories/translations/it.json.mjs +3 -5
- package/lib/constants/proStoreCategories/translations/it.json.mjs.map +1 -1
- package/lib/constants/proStoreCategories/translations/ja.json.js +2 -5
- package/lib/constants/proStoreCategories/translations/ja.json.js.map +1 -1
- package/lib/constants/proStoreCategories/translations/ja.json.mjs +3 -5
- package/lib/constants/proStoreCategories/translations/ja.json.mjs.map +1 -1
- package/lib/constants/proStoreCategories/translations/pt-BR.json.js +2 -5
- package/lib/constants/proStoreCategories/translations/pt-BR.json.js.map +1 -1
- package/lib/constants/proStoreCategories/translations/pt-BR.json.mjs +3 -5
- package/lib/constants/proStoreCategories/translations/pt-BR.json.mjs.map +1 -1
- package/lib/constants/proStoreCategories/translations/zh-Hans.json.js +2 -2
- package/lib/constants/proStoreCategories/translations/zh-Hans.json.mjs +2 -2
- package/lib/constants/proStoreCategories/translations/zh-Hant-TW.json.js +2 -2
- package/lib/constants/proStoreCategories/translations/zh-Hant-TW.json.mjs +2 -2
- package/lib/constants/proStoreFilters/mapping.d.ts +1 -17
- package/lib/constants/proStoreFilters/mapping.js +0 -16
- package/lib/constants/proStoreFilters/mapping.js.map +1 -1
- package/lib/constants/proStoreFilters/mapping.mjs +0 -16
- package/lib/constants/proStoreFilters/mapping.mjs.map +1 -1
- package/lib/contexts/MenuContext/presets.d.ts +1 -1
- package/lib/contexts/MenuContext/presets.js +2 -4
- package/lib/contexts/MenuContext/presets.js.map +1 -1
- package/lib/contexts/MenuContext/presets.mjs +2 -4
- package/lib/contexts/MenuContext/presets.mjs.map +1 -1
- package/lib/helpers/index.d.ts +0 -1
- package/lib/helpers/index.js +0 -11
- package/lib/helpers/index.js.map +1 -1
- package/lib/helpers/index.mjs +0 -1
- package/lib/helpers/index.mjs.map +1 -1
- package/lib/types/generated.d.ts +1 -1
- package/lib/types/generated.js.map +1 -1
- package/lib/types/generated.mjs.map +1 -1
- package/lib/types/index.d.ts +0 -1
- package/lib/types/index.js +0 -2
- package/lib/types/index.js.map +1 -1
- package/lib/types/index.mjs +0 -1
- package/lib/types/index.mjs.map +1 -1
- package/lib/utils/address.d.ts +62 -278
- package/lib/utils/address.js +8 -11
- package/lib/utils/address.js.map +1 -1
- package/lib/utils/address.mjs +8 -11
- package/lib/utils/address.mjs.map +1 -1
- package/lib/utils/array.d.ts +0 -4
- package/lib/utils/array.js +0 -10
- package/lib/utils/array.js.map +1 -1
- package/lib/utils/array.mjs +1 -10
- package/lib/utils/array.mjs.map +1 -1
- package/package.json +43 -42
- package/lib/assets/crestron.svg +0 -3
- package/lib/components/ModelCompareV3/assets/crestron.svg.js +0 -27
- package/lib/components/ModelCompareV3/assets/crestron.svg.js.map +0 -1
- package/lib/components/ModelCompareV3/assets/crestron.svg.mjs +0 -3
- package/lib/components/ModelCompareV3/assets/crestron.svg.mjs.map +0 -1
- package/lib/components/ModelCompareV3/data/properties/crestronNaxNvxCertified.d.ts +0 -2
- package/lib/components/ModelCompareV3/data/properties/crestronNaxNvxCertified.js +0 -18
- package/lib/components/ModelCompareV3/data/properties/crestronNaxNvxCertified.js.map +0 -1
- package/lib/components/ModelCompareV3/data/properties/crestronNaxNvxCertified.mjs +0 -10
- package/lib/components/ModelCompareV3/data/properties/crestronNaxNvxCertified.mjs.map +0 -1
- package/lib/helpers/product.d.ts +0 -87
- package/lib/helpers/product.js +0 -346
- package/lib/helpers/product.js.map +0 -1
- package/lib/helpers/product.mjs +0 -335
- package/lib/helpers/product.mjs.map +0 -1
- package/lib/helpers/product.test.d.ts +0 -1
- package/lib/types/product.d.ts +0 -87
- package/lib/types/product.js +0 -14
- package/lib/types/product.js.map +0 -1
- package/lib/types/product.mjs +0 -13
- package/lib/types/product.mjs.map +0 -1
- package/lib/utils/productSort.d.ts +0 -41
- package/lib/utils/productSort.js +0 -67
- package/lib/utils/productSort.js.map +0 -1
- package/lib/utils/productSort.mjs +0 -60
- package/lib/utils/productSort.mjs.map +0 -1
- package/lib/utils/validations/lastNameSuperRefinement.d.ts +0 -11
- package/lib/utils/validations/lastNameSuperRefinement.js +0 -25
- package/lib/utils/validations/lastNameSuperRefinement.js.map +0 -1
- package/lib/utils/validations/lastNameSuperRefinement.mjs +0 -21
- package/lib/utils/validations/lastNameSuperRefinement.mjs.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Footer.mjs","sources":["../../../src/components/Footer/Footer.tsx"],"sourcesContent":["import { useMemo } from \"react\";\n\nimport { useMenu } from \"../../contexts/MenuContext\";\nimport { Language, SiteId } from \"../../contexts/MenuContext/mapping\";\nimport { useTranslation } from \"../../hooks\";\nimport { GlobalStoreId } from \"../../types\";\nimport { imageSrc } from \"../../utils/asset\";\nimport { Container } from \"../Container\";\nimport {\n Anchor,\n AnchorDivider,\n AnchorGroup,\n Break,\n ContainerWrap,\n CookieBtn,\n Copyright,\n FlexWrap,\n FlexWrapResponsive,\n Form,\n Header,\n IconsWrapper,\n IconWrapper,\n InnerContainer,\n InnerWrap,\n Input,\n InputWrap,\n List,\n ListItem,\n ListItemAnchor,\n ListItemWrap,\n ListsWrap,\n StoreAddress,\n SubmitButton,\n TermsWrap,\n Wrap,\n} from \"./Footer.styles\";\nimport type { FooterProps } from \"./Footer.types\";\nimport {\n COOKIE_POLICY_BTN_ID,\n COOKIE_POLICY_BTN_ID_CLASSNAME,\n FooterLinkId,\n useFooterContent,\n} from \"./hooks/useFooterContent\";\nimport EN_TRANSLATION from \"./translations/en.json\";\n\n/**\n * NOTE: All commented out code is here because the BE is not implemented yet.\n * BE needs a lot of work to be done but the FE is ready to use the old way\n * of subscribing to the newsletter.\n */\n// const translationKeys = {\n// footerNewsletterError: \"footer.newsletter.error\",\n// } as const;\n\n// const getNewsletterSubscribeErrorCodeTranslationKey = (\n// errorCode?: NewsletterSubscribeErrorCode,\n// ): FooterTranslationKey => {\n// switch (errorCode) {\n// case NewsletterSubscribeErrorCode.MissingEmail:\n// return \"footer.newsletter.error.missingEmail\";\n// case NewsletterSubscribeErrorCode.InvalidEmail:\n// return \"footer.newsletter.error.invalidEmail\";\n// case NewsletterSubscribeErrorCode.TooManyRequests:\n// return \"footer.newsletter.error.tooManyRequests\";\n// // Don't want to show error message about Store ID being invalid because it is added in the background\n// case NewsletterSubscribeErrorCode.InvalidStoreId:\n// case NewsletterSubscribeErrorCode.Generic:\n// return translationKeys.footerNewsletterError;\n// default:\n// return translationKeys.footerNewsletterError;\n// }\n// };\n\n/**\n * Map store ID to Mailchimp region value\n */\nconst subscribeRegionValue = {\n [GlobalStoreId.Us]: \"United States\",\n [GlobalStoreId.Eu]: \"Europe\",\n [GlobalStoreId.Ca]: \"Canada\",\n [GlobalStoreId.Za]: \"South Africa\",\n [GlobalStoreId.Me]: \"Middle East\",\n [GlobalStoreId.Uk]: \"United Kingdom\",\n [GlobalStoreId.In]: \"India\",\n [GlobalStoreId.Sg]: \"Singapore\",\n [GlobalStoreId.Br]: \"Brazil\",\n [GlobalStoreId.Jp]: \"Japan\",\n [GlobalStoreId.Mx]: \"Mexico\",\n [GlobalStoreId.Ph]: \"Philippines\",\n [GlobalStoreId.Tw]: \"Taiwan\",\n [GlobalStoreId.Cn]: \"China\",\n} satisfies Record<GlobalStoreId, string>;\n\nexport const Footer = ({\n legalOnly,\n motif = \"light\",\n id,\n customer,\n storePicker,\n // storeBackendUrl,\n storeAddress,\n className,\n}: FooterProps) => {\n // const formRef = useRef<HTMLFormElement>(null);\n const { storeId, context } = useMenu();\n\n // const [formStatus, setFormStatus] = useState<\n // | {\n // status: FormStatus;\n // message: string;\n // }\n // | undefined\n // >(undefined);\n\n // const [loading, setLoading] = useState<boolean>(false);\n // const [emailValue, setEmailValue] = useState<string>(\"\");\n\n // #############################################################################\n // Content\n // #############################################################################\n const { footerContent, socialContent, termsContent } = useFooterContent();\n\n // #############################################################################\n // Translations\n // #############################################################################\n const { formatMessage } = useTranslation({\n defaultTranslation: EN_TRANSLATION,\n additionalTranslations: {\n [Language.Ja]: () =>\n import(\"./translations/ja.json\").then((res) => res.default),\n [Language.Ar]: () =>\n import(\"./translations/ar.json\").then((res) => res.default),\n [Language.De]: () =>\n import(\"./translations/de.json\").then((res) => res.default),\n [Language.Es]: () =>\n import(\"./translations/es.json\").then((res) => res.default),\n [Language.El]: () =>\n import(\"./translations/el.json\").then((res) => res.default),\n [Language.It]: () =>\n import(\"./translations/it.json\").then((res) => res.default),\n [Language.Pt]: () =>\n import(\"./translations/pt-BR.json\").then((res) => res.default),\n [Language.Zh]: () =>\n import(\"./translations/zh-Hans.json\").then((res) => res.default),\n [Language.Fr]: () =>\n import(\"./translations/fr.json\").then((res) => res.default),\n [Language.Tw]: () =>\n import(\"./translations/zh-Hant-TW.json\").then((res) => res.default),\n },\n });\n\n // #############################################################################\n // Hidden fields\n // #############################################################################\n // const hiddenFields = useMemo(() => {\n // const fields = {\n // ...customer,\n // storeId,\n // };\n\n // return (\n // Object.entries(fields)\n // // Remove empty values\n // .reduce(\n // (acc, [key, value]) => {\n // if (value) {\n // acc[key] = value;\n // }\n\n // return acc;\n // },\n // {} as Record<string, string>,\n // )\n // );\n // }, [customer, storeId]);\n\n const hiddenFields = useMemo(() => {\n return {\n // Merge fields are based on Mailchimp settings\n u: \"bc856e62a9254399365d0277b\",\n id: \"1c1b02cb37\",\n MERGE1: customer?.firstName,\n MERGE2: customer?.lastName,\n // Always set the user as residential as we don't have any other type of user\n MERGE4: \"Residential (home use)\",\n // Always set the user as subscribed to all lists\n MERGE3: \"subscribed\",\n MERGE7: \"subscribed\",\n MERGE8: \"subscribed\",\n // Store region value expected in two fields\n MERGE6: subscribeRegionValue[storeId],\n MERGE9: subscribeRegionValue[storeId],\n };\n }, [customer?.firstName, customer?.lastName, storeId]);\n\n // #############################################################################\n // Newsletter form\n // #############################################################################\n // const handleNewsletterSubmit = useCallback(\n // async (e) => {\n // setLoading(true);\n // setFormStatus(undefined);\n\n // e.preventDefault();\n\n // const data = {\n // email: emailValue,\n // ...hiddenFields,\n // };\n\n // const url = new URL(storeBackendUrl);\n // url.pathname = \"/newsletter/subscribe\";\n\n // try {\n // const response = await fetch(url, {\n // method: \"POST\",\n // body: JSON.stringify(data),\n // headers: {\n // \"Content-Type\": \"application/json\",\n // },\n // });\n\n // const json = (await response.json()) as NewsletterSubscribeResult;\n\n // if (!response.ok) {\n // const errorCode =\n // json?.result === \"error\" ? json?.[\"code\"] : undefined;\n\n // setFormStatus({\n // status: FormStatus.Error,\n // message: formatMessage(\n // getNewsletterSubscribeErrorCodeTranslationKey(errorCode),\n // ),\n // });\n // } else {\n // if (json.result === \"success\") {\n // setFormStatus({\n // status: FormStatus.Success,\n // message: formatMessage(\"footer.newsletter.success\"),\n // });\n\n // formRef.current?.reset();\n // } else {\n // setFormStatus({\n // status: FormStatus.Error,\n // message: getNewsletterSubscribeErrorCodeTranslationKey(\n // json?.[\"code\"],\n // ),\n // });\n // }\n // }\n // } catch (error) {\n // console.error(error);\n // setFormStatus({\n // status: FormStatus.Error,\n // message: formatMessage(translationKeys.footerNewsletterError),\n // });\n // }\n\n // // Reset loading state\n // setLoading(false);\n // },\n // [emailValue, formatMessage, hiddenFields, storeBackendUrl],\n // );\n\n // #############################################################################\n // Render\n // #############################################################################\n return (\n <ContainerWrap\n $motif={motif}\n // This id is important for injecting sidekick mobile embed styles\n id={id}\n className={className}\n >\n <Container size=\"desktop\" noVerticalMargin>\n <InnerContainer>\n {!legalOnly && (\n <>\n <Wrap>\n <ListsWrap>\n {Object.values(footerContent).map((list, i) => (\n <ListItemWrap key={`footer-list-${i}`}>\n <Header> {list.header.label}</Header>\n <List>\n {list.items.map((item, j) => (\n <ListItem key={`footer-list-${i}-item-${j}`}>\n <ListItemAnchor\n href={item.src}\n target={item.target}\n >\n {item.label}\n </ListItemAnchor>\n </ListItem>\n ))}\n </List>\n </ListItemWrap>\n ))}\n </ListsWrap>\n <InnerWrap>\n <Form\n method=\"get\"\n action=\"https://ui.us8.list-manage.com/subscribe\"\n target=\"_blank\"\n >\n <Header>{formatMessage(\"footer.newsletter.touch\")}</Header>\n\n {/* Hidden fields */}\n {Object.entries(hiddenFields).map(([key, value]) => (\n <input key={key} type=\"hidden\" name={key} value={value} />\n ))}\n\n <InputWrap>\n <Input\n /**\n * According to StackOverflow, using type=\"text\" together\n * with pattern attribute is a better way to validate email\n * addresses than using the `type=\"email\"`.\n * Code below is partly taken old ui.com Footer component.\n * @see https://stackoverflow.com/a/36379040\n */\n type=\"text\"\n pattern=\"[^@\\s]+@[^@\\s]+\\.[^@\\s]+\"\n minLength={6}\n maxLength={254}\n required\n autoCapitalize=\"off\"\n autoCorrect=\"off\"\n placeholder={formatMessage(\"footer.newsletter.email\")}\n name=\"EMAIL\"\n // value={emailValue}\n // onChange={(e) => setEmailValue(e.target.value)}\n // disabled={loading}\n />\n\n <SubmitButton\n type=\"submit\"\n className={motif}\n variant=\"primary\"\n // loading={loading}\n >\n {formatMessage(\"footer.newsletter.subscribe\")}\n </SubmitButton>\n </InputWrap>\n\n {/* {formStatus && (\n <FormMessage $status={formStatus.status}>\n {formStatus.message}\n </FormMessage>\n )} */}\n </Form>\n <IconsWrapper>\n {socialContent.items.map((socialItem) => (\n <IconWrapper\n href={socialItem.src}\n key={`footer-social-link-${socialItem.label}`}\n target={socialItem.target}\n >\n {socialItem.icon ? (\n <img\n src={imageSrc(socialItem.icon)}\n alt={socialItem.label}\n />\n ) : (\n socialItem.label\n )}\n </IconWrapper>\n ))}\n </IconsWrapper>\n </InnerWrap>\n </Wrap>\n <Break $motif={motif} />\n </>\n )}\n {/**\n * Some stores have an extra row with a non-translated hardcoded address\n */}\n {context === SiteId.Store && storeAddress && (\n <>\n <StoreAddress>{storeAddress}</StoreAddress>\n <Break $motif={motif} />\n </>\n )}\n\n <TermsWrap>\n <FlexWrap>\n {termsContent.items.map((term, i) => (\n <AnchorGroup key={`footer-term-${term.id}`}>\n {term.id === FooterLinkId.Cookie ? (\n <CookieBtn\n type=\"button\"\n id={COOKIE_POLICY_BTN_ID}\n className={COOKIE_POLICY_BTN_ID_CLASSNAME}\n key={`footer-term-${term.id}`}\n >\n {term.label}\n </CookieBtn>\n ) : (\n <Anchor href={term.src} target={term.target}>\n {term.label}\n </Anchor>\n )}\n <AnchorDivider>\n {i !== termsContent.items.length - 1 && \"|\"}\n </AnchorDivider>\n </AnchorGroup>\n ))}\n </FlexWrap>\n\n <FlexWrapResponsive>\n {/**\n * Renders store picker component if provided (needed only in SF)\n */}\n {storePicker}\n\n <Copyright>\n © {new Date().getFullYear()}{\" \"}\n {formatMessage(\"footer.copyright\")}\n </Copyright>\n </FlexWrapResponsive>\n </TermsWrap>\n </InnerContainer>\n </Container>\n </ContainerWrap>\n );\n};\n"],"names":["subscribeRegionValue","GlobalStoreId","Us","Eu","Ca","Za","Me","Uk","In","Sg","Br","Jp","Mx","Ph","Tw","Cn","Footer","legalOnly","motif","id","customer","storePicker","storeAddress","className","storeId","context","useMenu","footerContent","socialContent","termsContent","useFooterContent","formatMessage","useTranslation","defaultTranslation","EN_TRANSLATION","additionalTranslations","Language","Ja","then","res","default","Ar","De","Es","El","It","Pt","Zh","Fr","hiddenFields","useMemo","u","MERGE1","firstName","MERGE2","lastName","MERGE4","MERGE3","MERGE7","MERGE8","MERGE6","MERGE9","jsx","ContainerWrap","$motif","children","Container","size","noVerticalMargin","InnerContainer","jsxs","Fragment","Wrap","ListsWrap","Object","values","map","list","i","ListItemWrap","Header","header","label","List","items","item","j","ListItem","ListItemAnchor","href","src","target","InnerWrap","Form","method","action","entries","key","value","type","name","InputWrap","Input","pattern","minLength","maxLength","required","autoCapitalize","autoCorrect","placeholder","SubmitButton","variant","IconsWrapper","socialItem","IconWrapper","icon","imageSrc","alt","Break","SiteId","Store","StoreAddress","TermsWrap","FlexWrap","term","AnchorGroup","FooterLinkId","Cookie","CookieBtn","COOKIE_POLICY_BTN_ID","COOKIE_POLICY_BTN_ID_CLASSNAME","Anchor","AnchorDivider","length","FlexWrapResponsive","Copyright","Date","getFullYear"],"mappings":";;;;;;;;;;;;;;;;;AA4EA,MAAMA,oBAAuB,GAAA;EAC3B,CAACC,aAAc,CAAAC,EAAE,GAAG,eAAA;EACpB,CAACD,aAAc,CAAAE,EAAE,GAAG,QAAA;EACpB,CAACF,aAAc,CAAAG,EAAE,GAAG,QAAA;EACpB,CAACH,aAAc,CAAAI,EAAE,GAAG,cAAA;EACpB,CAACJ,aAAc,CAAAK,EAAE,GAAG,aAAA;EACpB,CAACL,aAAc,CAAAM,EAAE,GAAG,gBAAA;EACpB,CAACN,aAAc,CAAAO,EAAE,GAAG,OAAA;EACpB,CAACP,aAAc,CAAAQ,EAAE,GAAG,WAAA;EACpB,CAACR,aAAc,CAAAS,EAAE,GAAG,QAAA;EACpB,CAACT,aAAc,CAAAU,EAAE,GAAG,OAAA;EACpB,CAACV,aAAc,CAAAW,EAAE,GAAG,QAAA;EACpB,CAACX,aAAc,CAAAY,EAAE,GAAG,aAAA;EACpB,CAACZ,aAAc,CAAAa,EAAE,GAAG,QAAA;EACpB,CAACb,aAAc,CAAAc,EAAE,GAAG;AACtB,CAAA;AAEO,MAAMC,SAASA,CAAC;EACrBC,SAAA;EACAC,KAAQ,GAAA,OAAA;EACRC,EAAA;EACAC,QAAA;EACAC,WAAA;EAAA;EAEAC,YAAA;EACAC;AACF,CAAmB,KAAA;EAEjB,M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/Footer/Footer.tsx"],"sourcesContent":["import { useMemo } from \"react\";\n\nimport { useMenu } from \"../../contexts/MenuContext\";\nimport { Language, SiteId } from \"../../contexts/MenuContext/mapping\";\nimport { useTranslation } from \"../../hooks\";\nimport { GlobalStoreId } from \"../../types\";\nimport { imageSrc } from \"../../utils/asset\";\nimport { Container } from \"../Container\";\nimport {\n Anchor,\n AnchorDivider,\n AnchorGroup,\n Break,\n ContainerWrap,\n CookieBtn,\n Copyright,\n FlexWrap,\n FlexWrapResponsive,\n Form,\n Header,\n IconsWrapper,\n IconWrapper,\n InnerContainer,\n InnerWrap,\n Input,\n InputWrap,\n List,\n ListItem,\n ListItemAnchor,\n ListItemWrap,\n ListsWrap,\n StoreAddress,\n SubmitButton,\n TermsWrap,\n Wrap,\n} from \"./Footer.styles\";\nimport type { FooterProps } from \"./Footer.types\";\nimport {\n COOKIE_POLICY_BTN_ID,\n COOKIE_POLICY_BTN_ID_CLASSNAME,\n FooterLinkId,\n useFooterContent,\n} from \"./hooks/useFooterContent\";\nimport EN_TRANSLATION from \"./translations/en.json\";\n\n/**\n * NOTE: All commented out code is here because the BE is not implemented yet.\n * BE needs a lot of work to be done but the FE is ready to use the old way\n * of subscribing to the newsletter.\n */\n// const translationKeys = {\n// footerNewsletterError: \"footer.newsletter.error\",\n// } as const;\n\n// const getNewsletterSubscribeErrorCodeTranslationKey = (\n// errorCode?: NewsletterSubscribeErrorCode,\n// ): FooterTranslationKey => {\n// switch (errorCode) {\n// case NewsletterSubscribeErrorCode.MissingEmail:\n// return \"footer.newsletter.error.missingEmail\";\n// case NewsletterSubscribeErrorCode.InvalidEmail:\n// return \"footer.newsletter.error.invalidEmail\";\n// case NewsletterSubscribeErrorCode.TooManyRequests:\n// return \"footer.newsletter.error.tooManyRequests\";\n// // Don't want to show error message about Store ID being invalid because it is added in the background\n// case NewsletterSubscribeErrorCode.InvalidStoreId:\n// case NewsletterSubscribeErrorCode.Generic:\n// return translationKeys.footerNewsletterError;\n// default:\n// return translationKeys.footerNewsletterError;\n// }\n// };\n\n/**\n * Map store ID to Mailchimp region value\n */\nconst subscribeRegionValue = {\n [GlobalStoreId.Us]: \"United States\",\n [GlobalStoreId.Eu]: \"Europe\",\n [GlobalStoreId.Ca]: \"Canada\",\n [GlobalStoreId.Za]: \"South Africa\",\n [GlobalStoreId.Me]: \"Middle East\",\n [GlobalStoreId.Uk]: \"United Kingdom\",\n [GlobalStoreId.In]: \"India\",\n [GlobalStoreId.Sg]: \"Singapore\",\n [GlobalStoreId.Br]: \"Brazil\",\n [GlobalStoreId.Jp]: \"Japan\",\n [GlobalStoreId.Mx]: \"Mexico\",\n [GlobalStoreId.Ph]: \"Philippines\",\n [GlobalStoreId.Tw]: \"Taiwan\",\n [GlobalStoreId.Cn]: \"China\",\n} satisfies Record<GlobalStoreId, string>;\n\nexport const Footer = ({\n legalOnly,\n motif = \"light\",\n id,\n customer,\n storePicker,\n // storeBackendUrl,\n storeAddress,\n className,\n}: FooterProps) => {\n // const formRef = useRef<HTMLFormElement>(null);\n const { storeId, context } = useMenu();\n\n // const [formStatus, setFormStatus] = useState<\n // | {\n // status: FormStatus;\n // message: string;\n // }\n // | undefined\n // >(undefined);\n\n // const [loading, setLoading] = useState<boolean>(false);\n // const [emailValue, setEmailValue] = useState<string>(\"\");\n\n // #############################################################################\n // Content\n // #############################################################################\n const { footerContent, socialContent, termsContent } = useFooterContent();\n\n // #############################################################################\n // Translations\n // #############################################################################\n const { formatMessage } = useTranslation({\n defaultTranslation: EN_TRANSLATION,\n additionalTranslations: {\n [Language.Ja]: () =>\n import(\"./translations/ja.json\").then((res) => res.default),\n [Language.Ar]: () =>\n import(\"./translations/ar.json\").then((res) => res.default),\n [Language.De]: () =>\n import(\"./translations/de.json\").then((res) => res.default),\n [Language.Es]: () =>\n import(\"./translations/es.json\").then((res) => res.default),\n [Language.El]: () =>\n import(\"./translations/el.json\").then((res) => res.default),\n [Language.It]: () =>\n import(\"./translations/it.json\").then((res) => res.default),\n [Language.Pt]: () =>\n import(\"./translations/pt-BR.json\").then((res) => res.default),\n [Language.Zh]: () =>\n import(\"./translations/zh-Hans.json\").then((res) => res.default),\n [Language.Fr]: () =>\n import(\"./translations/fr.json\").then((res) => res.default),\n [Language.Tw]: () =>\n import(\"./translations/zh-Hant-TW.json\").then((res) => res.default),\n },\n });\n\n // #############################################################################\n // Hidden fields\n // #############################################################################\n // const hiddenFields = useMemo(() => {\n // const fields = {\n // ...customer,\n // storeId,\n // };\n\n // return (\n // Object.entries(fields)\n // // Remove empty values\n // .reduce(\n // (acc, [key, value]) => {\n // if (value) {\n // acc[key] = value;\n // }\n\n // return acc;\n // },\n // {} as Record<string, string>,\n // )\n // );\n // }, [customer, storeId]);\n\n const hiddenFields = useMemo(() => {\n return {\n // Merge fields are based on Mailchimp settings\n u: \"bc856e62a9254399365d0277b\",\n id: \"1c1b02cb37\",\n MERGE1: customer?.firstName,\n MERGE2: customer?.lastName,\n // Always set the user as residential as we don't have any other type of user\n MERGE4: \"Residential (home use)\",\n // Always set the user as subscribed to all lists\n MERGE3: \"subscribed\",\n MERGE7: \"subscribed\",\n MERGE8: \"subscribed\",\n // Store region value expected in two fields\n MERGE6: subscribeRegionValue[storeId],\n MERGE9: subscribeRegionValue[storeId],\n };\n }, [customer?.firstName, customer?.lastName, storeId]);\n\n // #############################################################################\n // Newsletter form\n // #############################################################################\n // const handleNewsletterSubmit = useCallback(\n // async (e) => {\n // setLoading(true);\n // setFormStatus(undefined);\n\n // e.preventDefault();\n\n // const data = {\n // email: emailValue,\n // ...hiddenFields,\n // };\n\n // const url = new URL(storeBackendUrl);\n // url.pathname = \"/newsletter/subscribe\";\n\n // try {\n // const response = await fetch(url, {\n // method: \"POST\",\n // body: JSON.stringify(data),\n // headers: {\n // \"Content-Type\": \"application/json\",\n // },\n // });\n\n // const json = (await response.json()) as NewsletterSubscribeResult;\n\n // if (!response.ok) {\n // const errorCode =\n // json?.result === \"error\" ? json?.[\"code\"] : undefined;\n\n // setFormStatus({\n // status: FormStatus.Error,\n // message: formatMessage(\n // getNewsletterSubscribeErrorCodeTranslationKey(errorCode),\n // ),\n // });\n // } else {\n // if (json.result === \"success\") {\n // setFormStatus({\n // status: FormStatus.Success,\n // message: formatMessage(\"footer.newsletter.success\"),\n // });\n\n // formRef.current?.reset();\n // } else {\n // setFormStatus({\n // status: FormStatus.Error,\n // message: getNewsletterSubscribeErrorCodeTranslationKey(\n // json?.[\"code\"],\n // ),\n // });\n // }\n // }\n // } catch (error) {\n // console.error(error);\n // setFormStatus({\n // status: FormStatus.Error,\n // message: formatMessage(translationKeys.footerNewsletterError),\n // });\n // }\n\n // // Reset loading state\n // setLoading(false);\n // },\n // [emailValue, formatMessage, hiddenFields, storeBackendUrl],\n // );\n\n // #############################################################################\n // Render\n // #############################################################################\n return (\n <ContainerWrap\n condensed={legalOnly}\n $motif={motif}\n // This id is important for injecting sidekick mobile embed styles\n id={id}\n className={className}\n >\n <Container size=\"desktop\" noVerticalMargin>\n <InnerContainer>\n {!legalOnly && (\n <>\n <Wrap>\n <ListsWrap>\n {Object.values(footerContent).map((list, i) => (\n <ListItemWrap key={`footer-list-${i}`}>\n <Header> {list.header.label}</Header>\n <List>\n {list.items.map((item, j) => (\n <ListItem key={`footer-list-${i}-item-${j}`}>\n <ListItemAnchor\n href={item.src}\n target={item.target}\n >\n {item.label}\n </ListItemAnchor>\n </ListItem>\n ))}\n </List>\n </ListItemWrap>\n ))}\n </ListsWrap>\n <InnerWrap>\n <Form\n method=\"get\"\n action=\"https://ui.us8.list-manage.com/subscribe\"\n target=\"_blank\"\n >\n <Header>{formatMessage(\"footer.newsletter.touch\")}</Header>\n\n {/* Hidden fields */}\n {Object.entries(hiddenFields).map(([key, value]) => (\n <input key={key} type=\"hidden\" name={key} value={value} />\n ))}\n\n <InputWrap>\n <Input\n /**\n * According to StackOverflow, using type=\"text\" together\n * with pattern attribute is a better way to validate email\n * addresses than using the `type=\"email\"`.\n * Code below is partly taken old ui.com Footer component.\n * @see https://stackoverflow.com/a/36379040\n */\n type=\"text\"\n pattern=\"[^@\\s]+@[^@\\s]+\\.[^@\\s]+\"\n minLength={6}\n maxLength={254}\n required\n autoCapitalize=\"off\"\n autoCorrect=\"off\"\n placeholder={formatMessage(\"footer.newsletter.email\")}\n name=\"EMAIL\"\n // value={emailValue}\n // onChange={(e) => setEmailValue(e.target.value)}\n // disabled={loading}\n />\n\n <SubmitButton\n type=\"submit\"\n className={motif}\n variant=\"primary\"\n // loading={loading}\n >\n {formatMessage(\"footer.newsletter.subscribe\")}\n </SubmitButton>\n </InputWrap>\n\n {/* {formStatus && (\n <FormMessage $status={formStatus.status}>\n {formStatus.message}\n </FormMessage>\n )} */}\n </Form>\n <IconsWrapper>\n {socialContent.items.map((socialItem) => (\n <IconWrapper\n href={socialItem.src}\n key={`footer-social-link-${socialItem.label}`}\n target={socialItem.target}\n >\n {socialItem.icon ? (\n <img\n src={imageSrc(socialItem.icon)}\n alt={socialItem.label}\n />\n ) : (\n socialItem.label\n )}\n </IconWrapper>\n ))}\n </IconsWrapper>\n </InnerWrap>\n </Wrap>\n <Break $motif={motif} />\n </>\n )}\n {/**\n * Some stores have an extra row with a non-translated hardcoded address\n */}\n {context === SiteId.Store && storeAddress && (\n <>\n <StoreAddress>{storeAddress}</StoreAddress>\n <Break $motif={motif} />\n </>\n )}\n\n <TermsWrap>\n <FlexWrap>\n {termsContent.items.map((term, i) => (\n <AnchorGroup key={`footer-term-${term.id}`}>\n {term.id === FooterLinkId.Cookie ? (\n <CookieBtn\n type=\"button\"\n id={COOKIE_POLICY_BTN_ID}\n className={COOKIE_POLICY_BTN_ID_CLASSNAME}\n key={`footer-term-${term.id}`}\n >\n {term.label}\n </CookieBtn>\n ) : (\n <Anchor href={term.src} target={term.target}>\n {term.label}\n </Anchor>\n )}\n <AnchorDivider>\n {i !== termsContent.items.length - 1 && \"|\"}\n </AnchorDivider>\n </AnchorGroup>\n ))}\n </FlexWrap>\n\n <FlexWrapResponsive>\n {/**\n * Renders store picker component if provided (needed only in SF)\n */}\n {storePicker}\n\n <Copyright>\n © {new Date().getFullYear()}{\" \"}\n {formatMessage(\"footer.copyright\")}\n </Copyright>\n </FlexWrapResponsive>\n </TermsWrap>\n </InnerContainer>\n </Container>\n </ContainerWrap>\n );\n};\n"],"names":["subscribeRegionValue","GlobalStoreId","Us","Eu","Ca","Za","Me","Uk","In","Sg","Br","Jp","Mx","Ph","Tw","Cn","Footer","legalOnly","motif","id","customer","storePicker","storeAddress","className","storeId","context","useMenu","footerContent","socialContent","termsContent","useFooterContent","formatMessage","useTranslation","defaultTranslation","EN_TRANSLATION","additionalTranslations","Language","Ja","then","res","default","Ar","De","Es","El","It","Pt","Zh","Fr","hiddenFields","useMemo","u","MERGE1","firstName","MERGE2","lastName","MERGE4","MERGE3","MERGE7","MERGE8","MERGE6","MERGE9","jsx","ContainerWrap","condensed","$motif","children","Container","size","noVerticalMargin","InnerContainer","jsxs","Fragment","Wrap","ListsWrap","Object","values","map","list","i","ListItemWrap","Header","header","label","List","items","item","j","ListItem","ListItemAnchor","href","src","target","InnerWrap","Form","method","action","entries","key","value","type","name","InputWrap","Input","pattern","minLength","maxLength","required","autoCapitalize","autoCorrect","placeholder","SubmitButton","variant","IconsWrapper","socialItem","IconWrapper","icon","imageSrc","alt","Break","SiteId","Store","StoreAddress","TermsWrap","FlexWrap","term","AnchorGroup","FooterLinkId","Cookie","CookieBtn","COOKIE_POLICY_BTN_ID","COOKIE_POLICY_BTN_ID_CLASSNAME","Anchor","AnchorDivider","length","FlexWrapResponsive","Copyright","Date","getFullYear"],"mappings":";;;;;;;;;;;;;;;;;AA4EA,MAAMA,oBAAuB,GAAA;EAC3B,CAACC,aAAc,CAAAC,EAAE,GAAG,eAAA;EACpB,CAACD,aAAc,CAAAE,EAAE,GAAG,QAAA;EACpB,CAACF,aAAc,CAAAG,EAAE,GAAG,QAAA;EACpB,CAACH,aAAc,CAAAI,EAAE,GAAG,cAAA;EACpB,CAACJ,aAAc,CAAAK,EAAE,GAAG,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AA,EAAA2D,IAAA,CAAK1C;cACR,CAAA,CAAA,EAAA,mBAEDkD,aACE,EAAA;gBAAAnE,QAAA,EAAAa,CAAA,KAAMlD,aAAawD,KAAM,CAAAiD,MAAA,GAAS,KAAK;eAC1C,CAAA;YAAA,CAAA,EAjBgB,eAAeT,IAAA,CAAK1G,EAAE,EAkBxC,CACD;WACH,CAAA,EAAA,oBAECoH,kBAIE,EAAA;YAAArE,QAAA,EAAA,CAAA7C,WAAA,EAAA,oBAEAmH,SAAU,EAAA;cAAAtE,QAAA,EAAA,CAAA,OAAA,EACN,gBAAA,IAAIuE,IAAK,CAAA,CAAA,EAAEC,WAAY,CAAA,CAAA,EAAG,GAAA,EAC5B3G,cAAc,kBAAkB,CAAA;aACnC,CAAA;WACF,CAAA;SACF,CAAA;MAAA,CACF;IACF,CAAA;EAAA,CAAA,CACF;AAEJ,CAAA;"}
|
|
@@ -1,46 +1,41 @@
|
|
|
1
1
|
import type { Motif } from "@ubnt/ui-components/utils";
|
|
2
2
|
import { FormStatus } from "./Footer.types";
|
|
3
|
-
export declare const AnchorGroup: import("styled-components
|
|
4
|
-
export declare const Anchor: import("styled-components
|
|
5
|
-
export declare const CookieBtn: import("styled-components
|
|
6
|
-
export declare const AnchorDivider: import("styled-components
|
|
7
|
-
export declare const Break: import("styled-components
|
|
3
|
+
export declare const AnchorGroup: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
4
|
+
export declare const Anchor: import("styled-components").StyledComponent<"a", import("styled-components").DefaultTheme, {}, never>;
|
|
5
|
+
export declare const CookieBtn: import("styled-components").StyledComponent<"button", import("styled-components").DefaultTheme, {}, never>;
|
|
6
|
+
export declare const AnchorDivider: import("styled-components").StyledComponent<"span", import("styled-components").DefaultTheme, {}, never>;
|
|
7
|
+
export declare const Break: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {
|
|
8
8
|
$motif: Motif;
|
|
9
|
-
}
|
|
10
|
-
export declare const Copyright: import("styled-components
|
|
11
|
-
export declare const Form: import("styled-components
|
|
12
|
-
export declare const Header: import("styled-components
|
|
13
|
-
export declare const IconsWrapper: import("styled-components
|
|
14
|
-
export declare const IconWrapper: import("styled-components
|
|
15
|
-
export declare const InnerWrap: import("styled-components
|
|
16
|
-
export declare const Input: import("styled-components
|
|
9
|
+
}, never>;
|
|
10
|
+
export declare const Copyright: import("styled-components").StyledComponent<"span", import("styled-components").DefaultTheme, {}, never>;
|
|
11
|
+
export declare const Form: import("styled-components").StyledComponent<"form", import("styled-components").DefaultTheme, {}, never>;
|
|
12
|
+
export declare const Header: import("styled-components").StyledComponent<"h1", import("styled-components").DefaultTheme, {}, never>;
|
|
13
|
+
export declare const IconsWrapper: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
14
|
+
export declare const IconWrapper: import("styled-components").StyledComponent<"a", import("styled-components").DefaultTheme, {}, never>;
|
|
15
|
+
export declare const InnerWrap: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
16
|
+
export declare const Input: import("styled-components").StyledComponent<"input", import("styled-components").DefaultTheme, {
|
|
17
17
|
$error?: boolean;
|
|
18
|
-
}
|
|
19
|
-
export declare const InputWrap: import("styled-components
|
|
20
|
-
export declare const List: import("styled-components
|
|
21
|
-
export declare const ListItem: import("styled-components
|
|
22
|
-
export declare const ListItemAnchor: import("styled-components
|
|
23
|
-
export declare const ListItemWrap: import("styled-components
|
|
24
|
-
export declare const ListsWrap: import("styled-components
|
|
25
|
-
export declare const FlexWrap: import("styled-components
|
|
26
|
-
export declare const FlexWrapResponsive: import("styled-components
|
|
27
|
-
|
|
28
|
-
}, never
|
|
29
|
-
export declare const
|
|
30
|
-
|
|
31
|
-
}, never>, never>> & string;
|
|
32
|
-
export declare const Wrap: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
33
|
-
export declare const ContainerWrap: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, {
|
|
18
|
+
}, never>;
|
|
19
|
+
export declare const InputWrap: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
20
|
+
export declare const List: import("styled-components").StyledComponent<"ul", import("styled-components").DefaultTheme, {}, never>;
|
|
21
|
+
export declare const ListItem: import("styled-components").StyledComponent<"li", import("styled-components").DefaultTheme, {}, never>;
|
|
22
|
+
export declare const ListItemAnchor: import("styled-components").StyledComponent<"a", import("styled-components").DefaultTheme, {}, never>;
|
|
23
|
+
export declare const ListItemWrap: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
24
|
+
export declare const ListsWrap: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
25
|
+
export declare const FlexWrap: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
26
|
+
export declare const FlexWrapResponsive: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
27
|
+
export declare const TermsWrap: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
28
|
+
export declare const Wrap: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
29
|
+
export declare const ContainerWrap: import("styled-components").StyledComponent<"footer", import("styled-components").DefaultTheme, {
|
|
30
|
+
condensed?: boolean;
|
|
34
31
|
$motif: Motif;
|
|
35
|
-
}
|
|
36
|
-
export declare const Container: import("styled-components
|
|
37
|
-
export declare const SubmitButton: import("styled-components
|
|
32
|
+
}, never>;
|
|
33
|
+
export declare const Container: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
34
|
+
export declare const SubmitButton: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("../Button/Button.types").ButtonProps & {
|
|
38
35
|
children?: import("react").ReactNode;
|
|
39
|
-
} & import("react").RefAttributes<HTMLAnchorElement | HTMLButtonElement | null
|
|
40
|
-
|
|
41
|
-
} & import("react").RefAttributes<HTMLAnchorElement | HTMLButtonElement | null>>, keyof import("react").Component<any, {}, any>>;
|
|
42
|
-
export declare const FormMessage: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>, {
|
|
36
|
+
} & import("react").RefAttributes<HTMLAnchorElement | HTMLButtonElement | null>>, import("styled-components").DefaultTheme, {}, never>;
|
|
37
|
+
export declare const FormMessage: import("styled-components").StyledComponent<"p", import("styled-components").DefaultTheme, {
|
|
43
38
|
$status?: FormStatus;
|
|
44
|
-
}
|
|
45
|
-
export declare const StoreAddress: import("styled-components
|
|
46
|
-
export declare const InnerContainer: import("styled-components
|
|
39
|
+
}, never>;
|
|
40
|
+
export declare const StoreAddress: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
41
|
+
export declare const InnerContainer: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Footer.styles.js","sources":["../../../src/components/Footer/Footer.styles.tsx"],"sourcesContent":["import type { Motif } from \"@ubnt/ui-components/utils\";\nimport styled, { css } from \"styled-components\";\n\nimport { BREAKPOINTS } from \"../../constants/layout\";\nimport { theme } from \"../../constants/theme\";\nimport { Button } from \"../Button\";\nimport { FormStatus } from \"./Footer.types\";\n\nexport const AnchorGroup = styled.div`\n line-height: 20px;\n display: flex;\n flex-wrap: nowrap;\n`;\n\nexport const Anchor = styled.a`\n text-decoration: none;\n font-size: 12px;\n color: rgb(0 0 0 / 0.65);\n line-height: 20px;\n cursor: pointer;\n\n &:hover {\n color: #006fff;\n }\n\n &:hover,\n &:focus {\n text-decoration: none;\n }\n`;\n\n// HACK !important used to override .ot-sdk-show-settings styling from One trust\nexport const CookieBtn = styled.button`\n padding: 0 !important;\n background: none !important;\n border: none !important;\n font-size: 12px !important;\n color: rgb(0 0 0 / 0.65) !important;\n line-height: 20px !important;\n font-family: ${theme.fontFamily.default} !important;\n\n &:hover {\n color: ${theme.colors.primaryBlue} !important;\n }\n`;\n\nexport const AnchorDivider = styled.span`\n margin: 0 8px;\n color: rgb(0 0 0 / 0.2);\n`;\n\nexport const Break = styled.div<{ $motif: Motif }>`\n border-top: ${({ $motif }) =>\n `1px solid ${$motif === \"dark\" ? \"#cecece33\" : \"#dbdce1\"}`};\n\n @media ${BREAKPOINTS.TABLET_AND_DOWN} {\n display: none;\n }\n`;\n\nexport const Copyright = styled.span`\n font-size: 12px;\n color: rgb(0 0 0 / 0.45);\n line-height: 20px;\n`;\n\nexport const Form = styled.form`\n width: 100%;\n max-width: 340px;\n`;\n\nexport const Header = styled.h1`\n color: rgb(0 0 0 / 0.65);\n font-size: 14px;\n line-height: 24px;\n font-weight: bold;\n margin: 0;\n`;\n\nexport const IconsWrapper = styled.div`\n display: flex;\n column-gap: 24px;\n margin-top: 30px;\n\n @media ${BREAKPOINTS.DESKTOP_AND_DOWN} {\n margin-left: 32px;\n }\n\n @media ${BREAKPOINTS.TABLET_AND_DOWN} {\n margin-left: unset;\n }\n`;\n\nexport const IconWrapper = styled.a`\n width: 20px;\n height: 20px;\n display: flex;\n align-items: center;\n justify-content: center;\n transition: opacity 0.2s;\n\n img {\n display: block;\n opacity: 1;\n }\n\n &:hover {\n cursor: pointer;\n > img {\n opacity: 0.8;\n }\n }\n`;\n\nexport const InnerWrap = styled.div`\n display: flex;\n flex-direction: column;\n width: 25%;\n\n @media ${BREAKPOINTS.DESKTOP_AND_DOWN} {\n width: unset;\n }\n\n @media ${BREAKPOINTS.DESKTOP_AND_DOWN} {\n flex-direction: row;\n align-items: center;\n margin-top: 32px;\n }\n\n @media ${BREAKPOINTS.TABLET_AND_DOWN} {\n flex-direction: column;\n margin-top: unset;\n align-items: center;\n }\n`;\n\nexport const Input = styled.input<{ $error?: boolean }>`\n border: 1px solid #dbdce1;\n margin: 0;\n width: 100%;\n padding: 9px 8px;\n font-weight: 400;\n border-radius: 4px;\n margin-right: 8px;\n line-height: 19px;\n font-size: 16px;\n\n &:focus {\n outline: none;\n border-color: #dbdce1;\n }\n\n &::placeholder {\n font-size: 14px;\n line-height: 24px;\n color: rgb(0 0 0 / 0.45);\n font-family: ${theme.fontFamily.default};\n }\n\n ${({ $error }) =>\n $error &&\n css`\n border-color: ${theme.colors.pomegranate};\n `}\n`;\n\nexport const InputWrap = styled.div`\n display: flex;\n width: 100%;\n margin-top: 4px;\n`;\n\nexport const List = styled.ul`\n list-style: none outside;\n padding-left: 0;\n margin: 8px 0 0;\n`;\n\nexport const ListItem = styled.li`\n margin-top: 4px;\n line-height: 24px;\n font-size: 14px;\n`;\n\nexport const ListItemAnchor = styled.a`\n color: rgb(0 0 0 / 0.45);\n font-weight: normal;\n cursor: pointer;\n text-decoration: none;\n\n &:hover {\n color: #006fff;\n }\n\n &:hover,\n &:focus {\n text-decoration: none;\n }\n`;\n\nexport const ListItemWrap = styled.div`\n margin-right: auto;\n\n @media ${BREAKPOINTS.TABLET_AND_DOWN} {\n display: none;\n }\n`;\n\nexport const ListsWrap = styled.div`\n display: flex;\n flex-grow: 1;\n`;\n\nexport const FlexWrap = styled.div`\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n justify-content: flex-start;\n\n @media ${BREAKPOINTS.TABLET_AND_DOWN} {\n justify-content: center;\n }\n`;\n\nexport const FlexWrapResponsive = styled(FlexWrap)`\n @media ${BREAKPOINTS.DESKTOP_AND_DOWN} {\n gap: 16px;\n flex-direction: column;\n justify-content: center;\n }\n`;\n\nexport const TermsWrap = styled(FlexWrapResponsive)`\n justify-content: space-between;\n gap: 16px;\n\n @media ${BREAKPOINTS.DESKTOP_AND_DOWN} {\n gap: 24px;\n }\n`;\n\nexport const Wrap = styled.div`\n display: flex;\n margin: 16px 0;\n\n @media ${BREAKPOINTS.DESKTOP_AND_DOWN} {\n flex-direction: column;\n }\n`;\n\nexport const ContainerWrap = styled.footer<{\n $motif: Motif;\n}>`\n background: #f6f6f8;\n box-sizing: border-box;\n width: 100%;\n overflow: hidden;\n\n padding: 16px 0;\n\n /* dark styling */\n ${({ $motif }) =>\n $motif === \"dark\" &&\n css`\n background-color: #070b0f;\n\n h1,\n a,\n span {\n color: #525461;\n }\n button#ot-sdk-btn {\n color: #525461 !important;\n }\n\n button.dark {\n transition: all 0.2s;\n background: #525461;\n border-color: #525461;\n color: white;\n\n &:hover {\n background: #006fff;\n border-color: #006fff;\n }\n }\n\n input {\n border: 1px solid #909090;\n background: transparent;\n color: #525461;\n\n &::placeholder {\n color: #525461;\n }\n }\n `}\n`;\n\nexport const Container = styled.div`\n display: flex;\n flex-direction: column;\n`;\n\nexport const SubmitButton = styled(Button)`\n text-wrap: nowrap;\n`;\n\nexport const FormMessage = styled.p<{ $status?: FormStatus }>`\n font-size: 12px;\n color: ${({ $status }) =>\n $status === FormStatus.Error\n ? theme.colors.pomegranate\n : theme.colors.black45};\n line-height: 20px;\n margin: 8px 0 0 9px;\n\n @media ${BREAKPOINTS.TABLET_AND_DOWN} {\n text-align: center;\n }\n`;\n\nexport const StoreAddress = styled.div`\n font-size: ${theme.font.size12};\n color: ${theme.colors.black65};\n line-height: 20px;\n\n @media ${BREAKPOINTS.DESKTOP_AND_DOWN} {\n text-align: center;\n }\n`;\n\nexport const InnerContainer = styled.div`\n display: flex;\n flex-direction: column;\n gap: 16px;\n\n @media ${BREAKPOINTS.TABLET_AND_DOWN} {\n gap: 32px;\n }\n`;\n"],"names":["AnchorGroup","styled","div","Anchor","a","CookieBtn","button","theme","fontFamily","default","colors","primaryBlue","AnchorDivider","span","Break","$motif","BREAKPOINTS","TABLET_AND_DOWN","Copyright","Form","form","Header","h1","IconsWrapper","DESKTOP_AND_DOWN","IconWrapper","InnerWrap","Input","input","$error","css","pomegranate","InputWrap","List","ul","ListItem","li","ListItemAnchor","ListItemWrap","ListsWrap","FlexWrap","FlexWrapResponsive","TermsWrap","Wrap","ContainerWrap","footer","Container","SubmitButton","Button","FormMessage","p","$status","FormStatus","Error","black45","StoreAddress","font","size12","black65","InnerContainer"],"mappings":";;;;;;;;;;;;;;;AAQO,MAAMA,cAAcC,eAAO,CAAA,SAAA,CAAA,CAAAC,GAAA;AAAA;AAAA;AAAA;AAAA,CAAA;AAM3B,MAAMC,SAASF,eAAO,CAAA,SAAA,CAAA,CAAAG,CAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,CAAA;AAkBtB,MAAMC,YAAYJ,eAAO,CAAA,SAAA,CAAA,CAAAK,MAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,iBAOfC,KAAA,CAAAA,KAAA,CAAMC,WAAWC,OAAO;AAAA;AAAA;AAAA,aAG5BF,KAAA,CAAAA,KAAA,CAAMG,OAAOC,WAAW;AAAA;AAAA,CAAA;AAI9B,MAAMC,gBAAgBX,eAAO,CAAA,SAAA,CAAA,CAAAY,IAAA;AAAA;AAAA;AAAA,CAAA;AAK7B,MAAMC,QAAQb,eAAO,CAAA,SAAA,CAAA,CAAAC,GAAA;AAAA,gBACZ,CAAC;EAAEa;AAAO,CAAA,KACtB,aAAaA,MAAW,KAAA,MAAA,GAAS,WAAc,GAAA,SAAS,EAAE;AAAA;AAAA,WAEnDC,MAAAA,CAAAA,YAAYC,eAAe;AAAA;AAAA;AAAA,CAAA;AAK/B,MAAMC,YAAYjB,eAAO,CAAA,SAAA,CAAA,CAAAY,IAAA;AAAA;AAAA;AAAA;AAAA,CAAA;AAMzB,MAAMM,OAAOlB,eAAO,CAAA,SAAA,CAAA,CAAAmB,IAAA;AAAA;AAAA;AAAA,CAAA;AAKpB,MAAMC,SAASpB,eAAO,CAAA,SAAA,CAAA,CAAAqB,EAAA;AAAA;AAAA;AAAA;AAAA;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,CAAAA,YAAYC,eAAe;AAAA;AAAA;AAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"Footer.styles.js","sources":["../../../src/components/Footer/Footer.styles.tsx"],"sourcesContent":["import type { Motif } from \"@ubnt/ui-components/utils\";\nimport styled, { css } from \"styled-components\";\n\nimport { BREAKPOINTS } from \"../../constants/layout\";\nimport { theme } from \"../../constants/theme\";\nimport { Button } from \"../Button\";\nimport { FormStatus } from \"./Footer.types\";\n\nexport const AnchorGroup = styled.div`\n line-height: 20px;\n display: flex;\n flex-wrap: nowrap;\n`;\n\nexport const Anchor = styled.a`\n text-decoration: none;\n font-size: 12px;\n color: rgb(0 0 0 / 0.65);\n line-height: 20px;\n cursor: pointer;\n\n &:hover {\n color: #006fff;\n }\n\n &:hover,\n &:focus {\n text-decoration: none;\n }\n`;\n\n// HACK !important used to override .ot-sdk-show-settings styling from One trust\nexport const CookieBtn = styled.button`\n padding: 0 !important;\n background: none !important;\n border: none !important;\n font-size: 12px !important;\n color: rgb(0 0 0 / 0.65) !important;\n line-height: 20px !important;\n font-family: ${theme.fontFamily.default} !important;\n\n &:hover {\n color: ${theme.colors.primaryBlue} !important;\n }\n`;\n\nexport const AnchorDivider = styled.span`\n margin: 0 8px;\n color: rgb(0 0 0 / 0.2);\n`;\n\nexport const Break = styled.div<{ $motif: Motif }>`\n border-top: ${({ $motif }) =>\n `1px solid ${$motif === \"dark\" ? \"#cecece33\" : \"#dbdce1\"}`};\n\n @media ${BREAKPOINTS.TABLET_AND_DOWN} {\n display: none;\n }\n`;\n\nexport const Copyright = styled.span`\n font-size: 12px;\n color: rgb(0 0 0 / 0.45);\n line-height: 20px;\n`;\n\nexport const Form = styled.form`\n width: 100%;\n max-width: 340px;\n`;\n\nexport const Header = styled.h1`\n color: rgb(0 0 0 / 0.65);\n font-size: 14px;\n line-height: 24px;\n font-weight: bold;\n margin: 0;\n`;\n\nexport const IconsWrapper = styled.div`\n display: flex;\n column-gap: 24px;\n margin-top: 30px;\n\n @media ${BREAKPOINTS.DESKTOP_AND_DOWN} {\n margin-left: 32px;\n }\n\n @media ${BREAKPOINTS.TABLET_AND_DOWN} {\n margin-left: unset;\n }\n`;\n\nexport const IconWrapper = styled.a`\n width: 20px;\n height: 20px;\n display: flex;\n align-items: center;\n justify-content: center;\n transition: opacity 0.2s;\n\n img {\n display: block;\n opacity: 1;\n }\n\n &:hover {\n cursor: pointer;\n > img {\n opacity: 0.8;\n }\n }\n`;\n\nexport const InnerWrap = styled.div`\n display: flex;\n flex-direction: column;\n width: 25%;\n\n @media ${BREAKPOINTS.DESKTOP_AND_DOWN} {\n width: unset;\n }\n\n @media ${BREAKPOINTS.DESKTOP_AND_DOWN} {\n flex-direction: row;\n align-items: center;\n margin-top: 32px;\n }\n\n @media ${BREAKPOINTS.TABLET_AND_DOWN} {\n flex-direction: column;\n margin-top: unset;\n align-items: center;\n }\n`;\n\nexport const Input = styled.input<{ $error?: boolean }>`\n border: 1px solid #dbdce1;\n margin: 0;\n width: 100%;\n padding: 9px 8px;\n font-weight: 400;\n border-radius: 4px;\n margin-right: 8px;\n line-height: 19px;\n font-size: 16px;\n\n &:focus {\n outline: none;\n border-color: #dbdce1;\n }\n\n ::placeholder {\n font-size: 14px;\n line-height: 24px;\n color: rgb(0 0 0 / 0.45);\n font-family: ${theme.fontFamily.default};\n }\n\n ${({ $error }) =>\n $error &&\n css`\n border-color: ${theme.colors.pomegranate};\n `}\n`;\n\nexport const InputWrap = styled.div`\n display: flex;\n width: 100%;\n margin-top: 4px;\n`;\n\nexport const List = styled.ul`\n list-style: none outside;\n padding-left: 0;\n margin: 8px 0 0;\n`;\n\nexport const ListItem = styled.li`\n margin-top: 4px;\n line-height: 24px;\n font-size: 14px;\n`;\n\nexport const ListItemAnchor = styled.a`\n color: rgb(0 0 0 / 0.45);\n font-weight: normal;\n cursor: pointer;\n text-decoration: none;\n\n &:hover {\n color: #006fff;\n }\n\n &:hover,\n &:focus {\n text-decoration: none;\n }\n`;\n\nexport const ListItemWrap = styled.div`\n margin-right: auto;\n\n @media ${BREAKPOINTS.TABLET_AND_DOWN} {\n display: none;\n }\n`;\n\nexport const ListsWrap = styled.div`\n display: flex;\n flex-grow: 1;\n`;\n\nexport const FlexWrap = styled.div`\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n justify-content: flex-start;\n\n @media ${BREAKPOINTS.TABLET_AND_DOWN} {\n justify-content: center;\n }\n`;\n\nexport const FlexWrapResponsive = styled(FlexWrap)`\n @media ${BREAKPOINTS.DESKTOP_AND_DOWN} {\n gap: 16px;\n flex-direction: column;\n justify-content: center;\n }\n`;\n\nexport const TermsWrap = styled(FlexWrapResponsive)`\n justify-content: space-between;\n gap: 16px;\n\n @media ${BREAKPOINTS.DESKTOP_AND_DOWN} {\n gap: 24px;\n }\n`;\n\nexport const Wrap = styled.div`\n display: flex;\n margin: 16px 0;\n\n @media ${BREAKPOINTS.DESKTOP_AND_DOWN} {\n flex-direction: column;\n }\n`;\n\nexport const ContainerWrap = styled.footer<{\n condensed?: boolean;\n $motif: Motif;\n}>`\n background: #f6f6f8;\n box-sizing: border-box;\n width: 100%;\n overflow: hidden;\n\n padding: 16px 0;\n\n /* dark styling */\n ${({ $motif }) =>\n $motif === \"dark\" &&\n css`\n background-color: #070b0f;\n\n h1,\n a,\n span {\n color: #525461;\n }\n button#ot-sdk-btn {\n color: #525461 !important;\n }\n\n button.dark {\n transition: all 0.2s;\n background: #525461;\n border-color: #525461;\n color: white;\n\n &:hover {\n background: #006fff;\n border-color: #006fff;\n }\n }\n\n input {\n border: 1px solid #909090;\n background: transparent;\n color: #525461;\n\n &::placeholder {\n color: #525461;\n }\n }\n `}\n`;\n\nexport const Container = styled.div`\n display: flex;\n flex-direction: column;\n`;\n\nexport const SubmitButton = styled(Button)`\n text-wrap: nowrap;\n`;\n\nexport const FormMessage = styled.p<{ $status?: FormStatus }>`\n font-size: 12px;\n color: ${({ $status }) =>\n $status === FormStatus.Error\n ? theme.colors.pomegranate\n : theme.colors.black45};\n line-height: 20px;\n margin: 8px 0 0 9px;\n\n @media ${BREAKPOINTS.TABLET_AND_DOWN} {\n text-align: center;\n }\n`;\n\nexport const StoreAddress = styled.div`\n font-size: ${theme.font.size12};\n color: ${theme.colors.black65};\n line-height: 20px;\n\n @media ${BREAKPOINTS.DESKTOP_AND_DOWN} {\n text-align: center;\n }\n`;\n\nexport const InnerContainer = styled.div`\n display: flex;\n flex-direction: column;\n gap: 16px;\n\n @media ${BREAKPOINTS.TABLET_AND_DOWN} {\n gap: 32px;\n }\n`;\n"],"names":["AnchorGroup","styled","div","Anchor","a","CookieBtn","button","theme","fontFamily","default","colors","primaryBlue","AnchorDivider","span","Break","$motif","BREAKPOINTS","TABLET_AND_DOWN","Copyright","Form","form","Header","h1","IconsWrapper","DESKTOP_AND_DOWN","IconWrapper","InnerWrap","Input","input","$error","css","pomegranate","InputWrap","List","ul","ListItem","li","ListItemAnchor","ListItemWrap","ListsWrap","FlexWrap","FlexWrapResponsive","TermsWrap","Wrap","ContainerWrap","footer","Container","SubmitButton","Button","FormMessage","p","$status","FormStatus","Error","black45","StoreAddress","font","size12","black65","InnerContainer"],"mappings":";;;;;;;;;;;;;;;AAQO,MAAMA,cAAcC,eAAO,CAAA,SAAA,CAAA,CAAAC,GAAA;AAAA;AAAA;AAAA;AAAA,CAAA;AAM3B,MAAMC,SAASF,eAAO,CAAA,SAAA,CAAA,CAAAG,CAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,CAAA;AAkBtB,MAAMC,YAAYJ,eAAO,CAAA,SAAA,CAAA,CAAAK,MAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,iBAOfC,KAAA,CAAAA,KAAA,CAAMC,WAAWC,OAAO;AAAA;AAAA;AAAA,aAG5BF,KAAA,CAAAA,KAAA,CAAMG,OAAOC,WAAW;AAAA;AAAA,CAAA;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AAAA,CAAAA,UAAA,CAAWC,KACnB,GAAA9C,KAAA,CAAAA,KAAA,CAAMG,MAAO,CAAAqB,WAAA,GACbxB,WAAM,CAAAG,MAAA,CAAO4C,OAAO;AAAA;AAAA;AAAA;AAAA,WAIjBtC,MAAAA,CAAAA,YAAYC,eAAe;AAAA;AAAA;AAAA,CAAA;AAK/B,MAAMsC,eAAetD,eAAO,CAAA,SAAA,CAAA,CAAAC,GAAA;AAAA,eACpBK,KAAA,CAAAA,KAAA,CAAMiD,KAAKC,MAAM;AAAA,WACrBlD,KAAA,CAAAA,KAAA,CAAMG,OAAOgD,OAAO;AAAA;AAAA;AAAA,WAGpB1C,MAAAA,CAAAA,YAAYQ,gBAAgB;AAAA;AAAA;AAAA,CAAA;AAKhC,MAAMmC,iBAAiB1D,eAAO,CAAA,SAAA,CAAA,CAAAC,GAAA;AAAA;AAAA;AAAA;AAAA;AAAA,WAK1Bc,MAAAA,CAAAA,YAAYC,eAAe;AAAA;AAAA;AAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Footer.styles.mjs","sources":["../../../src/components/Footer/Footer.styles.tsx"],"sourcesContent":["import type { Motif } from \"@ubnt/ui-components/utils\";\nimport styled, { css } from \"styled-components\";\n\nimport { BREAKPOINTS } from \"../../constants/layout\";\nimport { theme } from \"../../constants/theme\";\nimport { Button } from \"../Button\";\nimport { FormStatus } from \"./Footer.types\";\n\nexport const AnchorGroup = styled.div`\n line-height: 20px;\n display: flex;\n flex-wrap: nowrap;\n`;\n\nexport const Anchor = styled.a`\n text-decoration: none;\n font-size: 12px;\n color: rgb(0 0 0 / 0.65);\n line-height: 20px;\n cursor: pointer;\n\n &:hover {\n color: #006fff;\n }\n\n &:hover,\n &:focus {\n text-decoration: none;\n }\n`;\n\n// HACK !important used to override .ot-sdk-show-settings styling from One trust\nexport const CookieBtn = styled.button`\n padding: 0 !important;\n background: none !important;\n border: none !important;\n font-size: 12px !important;\n color: rgb(0 0 0 / 0.65) !important;\n line-height: 20px !important;\n font-family: ${theme.fontFamily.default} !important;\n\n &:hover {\n color: ${theme.colors.primaryBlue} !important;\n }\n`;\n\nexport const AnchorDivider = styled.span`\n margin: 0 8px;\n color: rgb(0 0 0 / 0.2);\n`;\n\nexport const Break = styled.div<{ $motif: Motif }>`\n border-top: ${({ $motif }) =>\n `1px solid ${$motif === \"dark\" ? \"#cecece33\" : \"#dbdce1\"}`};\n\n @media ${BREAKPOINTS.TABLET_AND_DOWN} {\n display: none;\n }\n`;\n\nexport const Copyright = styled.span`\n font-size: 12px;\n color: rgb(0 0 0 / 0.45);\n line-height: 20px;\n`;\n\nexport const Form = styled.form`\n width: 100%;\n max-width: 340px;\n`;\n\nexport const Header = styled.h1`\n color: rgb(0 0 0 / 0.65);\n font-size: 14px;\n line-height: 24px;\n font-weight: bold;\n margin: 0;\n`;\n\nexport const IconsWrapper = styled.div`\n display: flex;\n column-gap: 24px;\n margin-top: 30px;\n\n @media ${BREAKPOINTS.DESKTOP_AND_DOWN} {\n margin-left: 32px;\n }\n\n @media ${BREAKPOINTS.TABLET_AND_DOWN} {\n margin-left: unset;\n }\n`;\n\nexport const IconWrapper = styled.a`\n width: 20px;\n height: 20px;\n display: flex;\n align-items: center;\n justify-content: center;\n transition: opacity 0.2s;\n\n img {\n display: block;\n opacity: 1;\n }\n\n &:hover {\n cursor: pointer;\n > img {\n opacity: 0.8;\n }\n }\n`;\n\nexport const InnerWrap = styled.div`\n display: flex;\n flex-direction: column;\n width: 25%;\n\n @media ${BREAKPOINTS.DESKTOP_AND_DOWN} {\n width: unset;\n }\n\n @media ${BREAKPOINTS.DESKTOP_AND_DOWN} {\n flex-direction: row;\n align-items: center;\n margin-top: 32px;\n }\n\n @media ${BREAKPOINTS.TABLET_AND_DOWN} {\n flex-direction: column;\n margin-top: unset;\n align-items: center;\n }\n`;\n\nexport const Input = styled.input<{ $error?: boolean }>`\n border: 1px solid #dbdce1;\n margin: 0;\n width: 100%;\n padding: 9px 8px;\n font-weight: 400;\n border-radius: 4px;\n margin-right: 8px;\n line-height: 19px;\n font-size: 16px;\n\n &:focus {\n outline: none;\n border-color: #dbdce1;\n }\n\n &::placeholder {\n font-size: 14px;\n line-height: 24px;\n color: rgb(0 0 0 / 0.45);\n font-family: ${theme.fontFamily.default};\n }\n\n ${({ $error }) =>\n $error &&\n css`\n border-color: ${theme.colors.pomegranate};\n `}\n`;\n\nexport const InputWrap = styled.div`\n display: flex;\n width: 100%;\n margin-top: 4px;\n`;\n\nexport const List = styled.ul`\n list-style: none outside;\n padding-left: 0;\n margin: 8px 0 0;\n`;\n\nexport const ListItem = styled.li`\n margin-top: 4px;\n line-height: 24px;\n font-size: 14px;\n`;\n\nexport const ListItemAnchor = styled.a`\n color: rgb(0 0 0 / 0.45);\n font-weight: normal;\n cursor: pointer;\n text-decoration: none;\n\n &:hover {\n color: #006fff;\n }\n\n &:hover,\n &:focus {\n text-decoration: none;\n }\n`;\n\nexport const ListItemWrap = styled.div`\n margin-right: auto;\n\n @media ${BREAKPOINTS.TABLET_AND_DOWN} {\n display: none;\n }\n`;\n\nexport const ListsWrap = styled.div`\n display: flex;\n flex-grow: 1;\n`;\n\nexport const FlexWrap = styled.div`\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n justify-content: flex-start;\n\n @media ${BREAKPOINTS.TABLET_AND_DOWN} {\n justify-content: center;\n }\n`;\n\nexport const FlexWrapResponsive = styled(FlexWrap)`\n @media ${BREAKPOINTS.DESKTOP_AND_DOWN} {\n gap: 16px;\n flex-direction: column;\n justify-content: center;\n }\n`;\n\nexport const TermsWrap = styled(FlexWrapResponsive)`\n justify-content: space-between;\n gap: 16px;\n\n @media ${BREAKPOINTS.DESKTOP_AND_DOWN} {\n gap: 24px;\n }\n`;\n\nexport const Wrap = styled.div`\n display: flex;\n margin: 16px 0;\n\n @media ${BREAKPOINTS.DESKTOP_AND_DOWN} {\n flex-direction: column;\n }\n`;\n\nexport const ContainerWrap = styled.footer<{\n $motif: Motif;\n}>`\n background: #f6f6f8;\n box-sizing: border-box;\n width: 100%;\n overflow: hidden;\n\n padding: 16px 0;\n\n /* dark styling */\n ${({ $motif }) =>\n $motif === \"dark\" &&\n css`\n background-color: #070b0f;\n\n h1,\n a,\n span {\n color: #525461;\n }\n button#ot-sdk-btn {\n color: #525461 !important;\n }\n\n button.dark {\n transition: all 0.2s;\n background: #525461;\n border-color: #525461;\n color: white;\n\n &:hover {\n background: #006fff;\n border-color: #006fff;\n }\n }\n\n input {\n border: 1px solid #909090;\n background: transparent;\n color: #525461;\n\n &::placeholder {\n color: #525461;\n }\n }\n `}\n`;\n\nexport const Container = styled.div`\n display: flex;\n flex-direction: column;\n`;\n\nexport const SubmitButton = styled(Button)`\n text-wrap: nowrap;\n`;\n\nexport const FormMessage = styled.p<{ $status?: FormStatus }>`\n font-size: 12px;\n color: ${({ $status }) =>\n $status === FormStatus.Error\n ? theme.colors.pomegranate\n : theme.colors.black45};\n line-height: 20px;\n margin: 8px 0 0 9px;\n\n @media ${BREAKPOINTS.TABLET_AND_DOWN} {\n text-align: center;\n }\n`;\n\nexport const StoreAddress = styled.div`\n font-size: ${theme.font.size12};\n color: ${theme.colors.black65};\n line-height: 20px;\n\n @media ${BREAKPOINTS.DESKTOP_AND_DOWN} {\n text-align: center;\n }\n`;\n\nexport const InnerContainer = styled.div`\n display: flex;\n flex-direction: column;\n gap: 16px;\n\n @media ${BREAKPOINTS.TABLET_AND_DOWN} {\n gap: 32px;\n }\n`;\n"],"names":["AnchorGroup","styled","div","Anchor","a","CookieBtn","button","theme","fontFamily","default","colors","primaryBlue","AnchorDivider","span","Break","$motif","BREAKPOINTS","TABLET_AND_DOWN","Copyright","Form","form","Header","h1","IconsWrapper","DESKTOP_AND_DOWN","IconWrapper","InnerWrap","Input","input","$error","css","pomegranate","InputWrap","List","ul","ListItem","li","ListItemAnchor","ListItemWrap","ListsWrap","FlexWrap","FlexWrapResponsive","TermsWrap","Wrap","ContainerWrap","footer","Container","SubmitButton","Button","FormMessage","p","$status","FormStatus","Error","black45","StoreAddress","font","size12","black65","InnerContainer"],"mappings":";;;;;;;AAQO,MAAMA,cAAcC,MAAO,CAAAC,GAAA;AAAA;AAAA;AAAA;AAAA,CAAA;AAM3B,MAAMC,SAASF,MAAO,CAAAG,CAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,CAAA;AAkBtB,MAAMC,YAAYJ,MAAO,CAAAK,MAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,iBAOfC,KAAA,CAAMC,WAAWC,OAAO;AAAA;AAAA;AAAA,aAG5BF,KAAA,CAAMG,OAAOC,WAAW;AAAA;AAAA,CAAA;AAI9B,MAAMC,gBAAgBX,MAAO,CAAAY,IAAA;AAAA;AAAA;AAAA,CAAA;AAK7B,MAAMC,QAAQb,MAAO,CAAAC,GAAA;AAAA,gBACZ,CAAC;EAAEa;AAAO,CAAA,KACtB,aAAaA,MAAW,KAAA,MAAA,GAAS,WAAc,GAAA,SAAS,EAAE;AAAA;AAAA,WAEnDC,YAAYC,eAAe;AAAA;AAAA;AAAA,CAAA;AAK/B,MAAMC,YAAYjB,MAAO,CAAAY,IAAA;AAAA;AAAA;AAAA;AAAA,CAAA;AAMzB,MAAMM,OAAOlB,MAAO,CAAAmB,IAAA;AAAA;AAAA;AAAA,CAAA;AAKpB,MAAMC,SAASpB,MAAO,CAAAqB,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,CAAA;AAQtB,MAAMC,eAAetB,MAAO,CAAAC,GAAA;AAAA;AAAA;AAAA;AAAA;AAAA,WAKxBc,YAAYQ,gBAAgB;AAAA;AAAA;AAAA;AAAA,WAI5BR,YAAYC,eAAe;AAAA;AAAA;AAAA,CAAA;AAK/B,MAAMQ,cAAcxB,MAAO,CAAAG,CAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;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A;AAAA,CAAA;AAK/B,MAAMsC,eAAetD,MAAO,CAAAC,GAAA;AAAA,eACpBK,KAAA,CAAMiD,KAAKC,MAAM;AAAA,WACrBlD,KAAA,CAAMG,OAAOgD,OAAO;AAAA;AAAA;AAAA,WAGpB1C,YAAYQ,gBAAgB;AAAA;AAAA;AAAA,CAAA;AAKhC,MAAMmC,iBAAiB1D,MAAO,CAAAC,GAAA;AAAA;AAAA;AAAA;AAAA;AAAA,WAK1Bc,YAAYC,eAAe;AAAA;AAAA;AAAA,CAAA;"}
|
|
1
|
+
{"version":3,"file":"Footer.styles.mjs","sources":["../../../src/components/Footer/Footer.styles.tsx"],"sourcesContent":["import type { Motif } from \"@ubnt/ui-components/utils\";\nimport styled, { css } from \"styled-components\";\n\nimport { BREAKPOINTS } from \"../../constants/layout\";\nimport { theme } from \"../../constants/theme\";\nimport { Button } from \"../Button\";\nimport { FormStatus } from \"./Footer.types\";\n\nexport const AnchorGroup = styled.div`\n line-height: 20px;\n display: flex;\n flex-wrap: nowrap;\n`;\n\nexport const Anchor = styled.a`\n text-decoration: none;\n font-size: 12px;\n color: rgb(0 0 0 / 0.65);\n line-height: 20px;\n cursor: pointer;\n\n &:hover {\n color: #006fff;\n }\n\n &:hover,\n &:focus {\n text-decoration: none;\n }\n`;\n\n// HACK !important used to override .ot-sdk-show-settings styling from One trust\nexport const CookieBtn = styled.button`\n padding: 0 !important;\n background: none !important;\n border: none !important;\n font-size: 12px !important;\n color: rgb(0 0 0 / 0.65) !important;\n line-height: 20px !important;\n font-family: ${theme.fontFamily.default} !important;\n\n &:hover {\n color: ${theme.colors.primaryBlue} !important;\n }\n`;\n\nexport const AnchorDivider = styled.span`\n margin: 0 8px;\n color: rgb(0 0 0 / 0.2);\n`;\n\nexport const Break = styled.div<{ $motif: Motif }>`\n border-top: ${({ $motif }) =>\n `1px solid ${$motif === \"dark\" ? \"#cecece33\" : \"#dbdce1\"}`};\n\n @media ${BREAKPOINTS.TABLET_AND_DOWN} {\n display: none;\n }\n`;\n\nexport const Copyright = styled.span`\n font-size: 12px;\n color: rgb(0 0 0 / 0.45);\n line-height: 20px;\n`;\n\nexport const Form = styled.form`\n width: 100%;\n max-width: 340px;\n`;\n\nexport const Header = styled.h1`\n color: rgb(0 0 0 / 0.65);\n font-size: 14px;\n line-height: 24px;\n font-weight: bold;\n margin: 0;\n`;\n\nexport const IconsWrapper = styled.div`\n display: flex;\n column-gap: 24px;\n margin-top: 30px;\n\n @media ${BREAKPOINTS.DESKTOP_AND_DOWN} {\n margin-left: 32px;\n }\n\n @media ${BREAKPOINTS.TABLET_AND_DOWN} {\n margin-left: unset;\n }\n`;\n\nexport const IconWrapper = styled.a`\n width: 20px;\n height: 20px;\n display: flex;\n align-items: center;\n justify-content: center;\n transition: opacity 0.2s;\n\n img {\n display: block;\n opacity: 1;\n }\n\n &:hover {\n cursor: pointer;\n > img {\n opacity: 0.8;\n }\n }\n`;\n\nexport const InnerWrap = styled.div`\n display: flex;\n flex-direction: column;\n width: 25%;\n\n @media ${BREAKPOINTS.DESKTOP_AND_DOWN} {\n width: unset;\n }\n\n @media ${BREAKPOINTS.DESKTOP_AND_DOWN} {\n flex-direction: row;\n align-items: center;\n margin-top: 32px;\n }\n\n @media ${BREAKPOINTS.TABLET_AND_DOWN} {\n flex-direction: column;\n margin-top: unset;\n align-items: center;\n }\n`;\n\nexport const Input = styled.input<{ $error?: boolean }>`\n border: 1px solid #dbdce1;\n margin: 0;\n width: 100%;\n padding: 9px 8px;\n font-weight: 400;\n border-radius: 4px;\n margin-right: 8px;\n line-height: 19px;\n font-size: 16px;\n\n &:focus {\n outline: none;\n border-color: #dbdce1;\n }\n\n ::placeholder {\n font-size: 14px;\n line-height: 24px;\n color: rgb(0 0 0 / 0.45);\n font-family: ${theme.fontFamily.default};\n }\n\n ${({ $error }) =>\n $error &&\n css`\n border-color: ${theme.colors.pomegranate};\n `}\n`;\n\nexport const InputWrap = styled.div`\n display: flex;\n width: 100%;\n margin-top: 4px;\n`;\n\nexport const List = styled.ul`\n list-style: none outside;\n padding-left: 0;\n margin: 8px 0 0;\n`;\n\nexport const ListItem = styled.li`\n margin-top: 4px;\n line-height: 24px;\n font-size: 14px;\n`;\n\nexport const ListItemAnchor = styled.a`\n color: rgb(0 0 0 / 0.45);\n font-weight: normal;\n cursor: pointer;\n text-decoration: none;\n\n &:hover {\n color: #006fff;\n }\n\n &:hover,\n &:focus {\n text-decoration: none;\n }\n`;\n\nexport const ListItemWrap = styled.div`\n margin-right: auto;\n\n @media ${BREAKPOINTS.TABLET_AND_DOWN} {\n display: none;\n }\n`;\n\nexport const ListsWrap = styled.div`\n display: flex;\n flex-grow: 1;\n`;\n\nexport const FlexWrap = styled.div`\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n justify-content: flex-start;\n\n @media ${BREAKPOINTS.TABLET_AND_DOWN} {\n justify-content: center;\n }\n`;\n\nexport const FlexWrapResponsive = styled(FlexWrap)`\n @media ${BREAKPOINTS.DESKTOP_AND_DOWN} {\n gap: 16px;\n flex-direction: column;\n justify-content: center;\n }\n`;\n\nexport const TermsWrap = styled(FlexWrapResponsive)`\n justify-content: space-between;\n gap: 16px;\n\n @media ${BREAKPOINTS.DESKTOP_AND_DOWN} {\n gap: 24px;\n }\n`;\n\nexport const Wrap = styled.div`\n display: flex;\n margin: 16px 0;\n\n @media ${BREAKPOINTS.DESKTOP_AND_DOWN} {\n flex-direction: column;\n }\n`;\n\nexport const ContainerWrap = styled.footer<{\n condensed?: boolean;\n $motif: Motif;\n}>`\n background: #f6f6f8;\n box-sizing: border-box;\n width: 100%;\n overflow: hidden;\n\n padding: 16px 0;\n\n /* dark styling */\n ${({ $motif }) =>\n $motif === \"dark\" &&\n css`\n background-color: #070b0f;\n\n h1,\n a,\n span {\n color: #525461;\n }\n button#ot-sdk-btn {\n color: #525461 !important;\n }\n\n button.dark {\n transition: all 0.2s;\n background: #525461;\n border-color: #525461;\n color: white;\n\n &:hover {\n background: #006fff;\n border-color: #006fff;\n }\n }\n\n input {\n border: 1px solid #909090;\n background: transparent;\n color: #525461;\n\n &::placeholder {\n color: #525461;\n }\n }\n `}\n`;\n\nexport const Container = styled.div`\n display: flex;\n flex-direction: column;\n`;\n\nexport const SubmitButton = styled(Button)`\n text-wrap: nowrap;\n`;\n\nexport const FormMessage = styled.p<{ $status?: FormStatus }>`\n font-size: 12px;\n color: ${({ $status }) =>\n $status === FormStatus.Error\n ? theme.colors.pomegranate\n : theme.colors.black45};\n line-height: 20px;\n margin: 8px 0 0 9px;\n\n @media ${BREAKPOINTS.TABLET_AND_DOWN} {\n text-align: center;\n }\n`;\n\nexport const StoreAddress = styled.div`\n font-size: ${theme.font.size12};\n color: ${theme.colors.black65};\n line-height: 20px;\n\n @media ${BREAKPOINTS.DESKTOP_AND_DOWN} {\n text-align: center;\n }\n`;\n\nexport const InnerContainer = styled.div`\n display: flex;\n flex-direction: column;\n gap: 16px;\n\n @media ${BREAKPOINTS.TABLET_AND_DOWN} {\n gap: 32px;\n }\n`;\n"],"names":["AnchorGroup","styled","div","Anchor","a","CookieBtn","button","theme","fontFamily","default","colors","primaryBlue","AnchorDivider","span","Break","$motif","BREAKPOINTS","TABLET_AND_DOWN","Copyright","Form","form","Header","h1","IconsWrapper","DESKTOP_AND_DOWN","IconWrapper","InnerWrap","Input","input","$error","css","pomegranate","InputWrap","List","ul","ListItem","li","ListItemAnchor","ListItemWrap","ListsWrap","FlexWrap","FlexWrapResponsive","TermsWrap","Wrap","ContainerWrap","footer","Container","SubmitButton","Button","FormMessage","p","$status","FormStatus","Error","black45","StoreAddress","font","size12","black65","InnerContainer"],"mappings":";;;;;;;AAQO,MAAMA,cAAcC,MAAO,CAAAC,GAAA;AAAA;AAAA;AAAA;AAAA,CAAA;AAM3B,MAAMC,SAASF,MAAO,CAAAG,CAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,CAAA;AAkBtB,MAAMC,YAAYJ,MA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}
|
|
@@ -85,7 +85,7 @@ const Gallery = react.memo(function Gallery2({
|
|
|
85
85
|
objectFit
|
|
86
86
|
}) : /* @__PURE__ */jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
87
87
|
children: [/* @__PURE__ */jsxRuntime.jsx(Gallery_styles.GalleryTrack, {
|
|
88
|
-
|
|
88
|
+
withTransition,
|
|
89
89
|
style: {
|
|
90
90
|
transform: !fade ? `translate3d(-${visibleSlide * 100}%, 0, 0)` : ""
|
|
91
91
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Gallery.js","sources":["../../../src/components/Gallery/Gallery.tsx"],"sourcesContent":["import { memo, useCallback, useEffect, useMemo, useRef, useState } from \"react\";\nimport { useDebounce, useHoverDirty, useMedia } from \"react-use\";\n\nimport { BREAKPOINTS } from \"../../constants/layout\";\nimport type { CustomMediaAsset } from \"../CustomImage/CustomImage.types\";\nimport { useGalleryControls } from \"./Gallery.context\";\nimport * as S from \"./Gallery.styles\";\nimport type { GalleryProps } from \"./Gallery.types\";\nimport { GalleryControls } from \"./Gallery.types\";\nimport {\n GalleryBottomControls,\n GalleryInsideControls,\n} from \"./GalleryControls\";\nimport { GalleryItem } from \"./GalleryItem\";\nimport { GalleryThumbnails } from \"./GalleryThumbnails\";\n\nexport const parseGalleryEntries = (\n entries: CustomMediaAsset[],\n fade?: boolean,\n) => {\n // move entry with isVideo key to the front of the array\n const videoEntry = entries.find((entry) => entry.isVideo);\n const entriesWithoutVideo = entries.filter((entry) => !entry.isVideo);\n const newEntries = videoEntry\n ? [videoEntry, ...entriesWithoutVideo]\n : entries;\n\n if (newEntries.length <= 1 || fade) {\n return newEntries;\n }\n\n // Shallow-copy entries\n const slidesWithClones = [...newEntries];\n // Add copy of the last element to the front of the array\n slidesWithClones.unshift(slidesWithClones[slidesWithClones.length - 1]!);\n // Add a copy of the first (now due to the previous step is at index 1) the element to the end of the array\n slidesWithClones.push(slidesWithClones[1]!);\n return slidesWithClones;\n};\n\nexport const Gallery = memo(function Gallery({\n controls,\n entries,\n parsed,\n className,\n size,\n priority,\n renderImage,\n fade,\n thumbnails,\n objectFit,\n onChange,\n}: GalleryProps) {\n const {\n reset,\n setControlsType,\n withTransition,\n visibleSlide,\n resetTransitionState,\n } = useGalleryControls();\n\n const galleryRef = useRef<HTMLDivElement>(null);\n\n // Parse entries\n const entriesParsed = useMemo<CustomMediaAsset[]>(() => {\n return parsed ? entries : parseGalleryEntries(entries, fade);\n }, [entries, fade, parsed]);\n\n // Update provider state if gallery controls change\n useEffect(() => {\n setControlsType(controls);\n }, [controls, setControlsType]);\n\n // Update image count and reset index when images change\n useEffect(() => {\n reset(entriesParsed.length);\n }, [entriesParsed, reset]);\n\n const activeEntry = useMemo(\n () => entriesParsed[visibleSlide],\n [entriesParsed, visibleSlide],\n );\n\n /**\n * Calculates, based on the given slide index and currently visible slide index,\n * if the provided index could be the next one to be shown (both ways - left and right).\n */\n const couldBeNext = useCallback(\n (index: number) => {\n const potentialNextRightSlideIndex =\n visibleSlide + 1 > entriesParsed.length - 1 ? 0 : visibleSlide + 1;\n\n const potentialNextLeftSlideIndex =\n visibleSlide - 1 < 0 ? entriesParsed.length - 1 : visibleSlide - 1;\n\n return !!(\n potentialNextRightSlideIndex === index ||\n potentialNextLeftSlideIndex === index\n );\n },\n [entriesParsed.length, visibleSlide],\n );\n\n // #############################################################################\n // Hover state\n // #############################################################################\n const isTabletUp = useMedia(BREAKPOINTS.TABLET_UP, false);\n const hoveredRaw = useHoverDirty(galleryRef, isTabletUp);\n\n // Debounce hovered to prevent stutter\n const [hovered, setHovered] = useState(false);\n\n useDebounce(\n () => {\n setHovered(hoveredRaw);\n },\n 10,\n [hoveredRaw],\n );\n\n // #############################################################################\n // Render\n // #############################################################################\n if (!activeEntry || !entriesParsed.length) {\n return null;\n }\n\n return (\n <S.GalleryWrapper className={className} ref={galleryRef}>\n <S.GalleryImageContainer>\n {/* Using entries instead of parsedEntries to determine actual length */}\n {entriesParsed.length === 1 ? (\n <GalleryItem\n // Note: \"key\" needed to reset fade-in animation\n // key={activeEntry.src}\n item={activeEntry}\n size={size}\n priority={priority}\n renderImage={renderImage}\n onTransitionEnd={resetTransitionState}\n isActive={true}\n objectFit={objectFit}\n />\n ) : (\n <>\n <S.GalleryTrack\n $withTransition={withTransition}\n style={{\n transform: !fade\n ? `translate3d(-${visibleSlide * 100}%, 0, 0)`\n : \"\",\n }}\n onTransitionEnd={resetTransitionState}\n >\n {entriesParsed.map((entry, index) => {\n const isCurrentActive = index === visibleSlide;\n\n return (\n <GalleryItem\n // Note: \"key\" needed to reset fade-in animation\n // key={entry.src}\n key={`gallery-item-${entry.id}-${index}`}\n item={entry}\n size={size}\n // Have to additionally check to only priority the first item of the gallery\n priority={priority && isCurrentActive}\n isActive={isCurrentActive}\n couldBeNext={couldBeNext(index)}\n renderImage={renderImage}\n onTransitionEnd={resetTransitionState}\n fade={fade}\n objectFit={objectFit}\n />\n );\n })}\n </S.GalleryTrack>\n {thumbnails && (\n <GalleryThumbnails\n items={entriesParsed}\n renderImage={renderImage}\n expanded={hovered}\n onControl={onChange}\n />\n )}\n </>\n )}\n {entriesParsed.length > 1 && controls === GalleryControls.Bottom && (\n <GalleryBottomControls onControl={onChange} />\n )}\n {entriesParsed.length > 1 && controls === GalleryControls.Inside && (\n <GalleryInsideControls onControl={onChange} />\n )}\n </S.GalleryImageContainer>\n </S.GalleryWrapper>\n );\n});\n"],"names":["parseGalleryEntries","entries","fade","videoEntry","find","entry","isVideo","entriesWithoutVideo","filter","newEntries","length","slidesWithClones","unshift","push","Gallery","memo","Gallery2","controls","parsed","className","size","priority","renderImage","thumbnails","objectFit","onChange","reset","setControlsType","withTransition","visibleSlide","resetTransitionState","useGalleryControls","galleryRef","useRef","entriesParsed","useMemo","useEffect","activeEntry","couldBeNext","useCallback","index","potentialNextRightSlideIndex","potentialNextLeftSlideIndex","isTabletUp","useMedia","BREAKPOINTS","TABLET_UP","hoveredRaw","useHoverDirty","hovered","setHovered","useState","useDebounce","jsx","S.GalleryWrapper","ref","children","jsxs","S.GalleryImageContainer","GalleryItem","item","onTransitionEnd","isActive","Fragment","S.GalleryTrack","GalleryTrack","$withTransition","style","transform","map","isCurrentActive","id","GalleryThumbnails","items","expanded","onControl","GalleryControls","Bottom","GalleryBottomControls","Inside","GalleryInsideControls"],"mappings":";;;;;;;;;;;;;;;;AAgBa,MAAAA,mBAAA,GAAsBA,CACjCC,OAAA,EACAC,IACG,KAAA;EAEH,MAAMC,aAAaF,OAAQ,CAAAG,IAAA,CAAMC,KAAA,IAAUA,MAAMC,OAAO,CAAA;EACxD,MAAMC,sBAAsBN,OAAQ,CAAAO,MAAA,CAAQH,KAAU,IAAA,CAACA,MAAMC,OAAO,CAAA;EACpE,MAAMG,aAAaN,UACf,GAAA,CAACA,UAAY,EAAA,GAAGI,mBAAmB,CACnC,GAAAN,OAAA;EAEA,IAAAQ,UAAA,CAAWC,MAAU,IAAA,CAAA,IAAKR,IAAM,EAAA;IAC3B,OAAAO,UAAA;EACT;EAGM,MAAAE,gBAAA,GAAmB,CAAC,GAAGF,UAAU,CAAA;EAEvCE,gBAAA,CAAiBC,OAAQ,CAAAD,gBAAA,CAAiBA,gBAAiB,CAAAD,MAAA,GAAS,CAAC,CAAE,CAAA;EAEtDC,gBAAA,CAAAE,IAAA,CAAKF,gBAAiB,CAAA,CAAC,CAAE,CAAA;EACnC,OAAAA,gBAAA;AACT,CAAA;AAEa,MAAAG,OAAA,GAAUC,KAAAA,CAAAA,IAAK,CAAA,SAASD,QAAQE,CAAA;EAC3CC,QAAA;EACAhB,OAAA;EACAiB,MAAA;EACAC,SAAA;EACAC,IAAA;EACAC,QAAA;EACAC,WAAA;EACApB,IAAA;EACAqB,UAAA;EACAC,SAAA;EACAC;AACF,CAAiB,EAAA;EACT,MAAA;IACJC,KAAA;IACAC,eAAA;IACAC,cAAA;IACAC,YAAA;IACAC;MACEC,eAAmB,CAAAA,kBAAA,CAAA,CAAA;EAEjB,MAAAC,UA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UAAUA,QAAY,IAAAiD,eAAA;cACtBR,QAAU,EAAAQ,eAAA;cACVhC,WAAA,EAAaA,YAAYE,KAAK,CAAA;cAC9BlB,WAAA;cACAuC,eAAiB,EAAA/B,oBAAA;cACjB5B,IAAA;cACAsB;YAAA,CAAA,EAVK,gBAAgBnB,KAAA,CAAMkE,EAAE,IAAI/B,KAAK,EAAA,CAWxC;UAAA,CAEH;QAAA,CACH,CAAA,EACCjB,UACC,mBAAA8B,UAAA,CAAAA,GAAA,CAACmB,iBAAA,CAAAA,iBAAA,EAAA;UACCC,KAAO,EAAAvC,aAAA;UACPZ,WAAA;UACAoD,QAAU,EAAAzB,OAAA;UACV0B,SAAW,EAAAlD;QAAA,CACb,CAAA;OAEJ,CAAA,EAEDS,aAAA,CAAcxB,SAAS,CAAK,IAAAO,QAAA,KAAa2D,8BAAgBC,MACxD,IAAAxB,eAAAA,UAAAA,CAAAA,GAAA,CAACyB,eAAsB,CAAAA,qBAAA,EAAA;QAAAH,SAAA,EAAWlD;MAAU,CAAA,CAAA,EAE7CS,aAAA,CAAcxB,SAAS,CAAK,IAAAO,QAAA,KAAa2D,8BAAgBG,MACxD,IAAA1B,eAAAA,UAAAA,CAAAA,GAAA,CAAC2B,eAAsB,CAAAA,qBAAA,EAAA;QAAAL,SAAA,EAAWlD;MAAU,CAAA,CAAA;IAEhD,CAAA;EACF,CAAA,CAAA;AAEJ,CAAC,CAAA;;"}
|
|
1
|
+
{"version":3,"file":"Gallery.js","sources":["../../../src/components/Gallery/Gallery.tsx"],"sourcesContent":["import { memo, useCallback, useEffect, useMemo, useRef, useState } from \"react\";\nimport { useDebounce, useHoverDirty, useMedia } from \"react-use\";\n\nimport { BREAKPOINTS } from \"../../constants/layout\";\nimport type { CustomMediaAsset } from \"../CustomImage/CustomImage.types\";\nimport { useGalleryControls } from \"./Gallery.context\";\nimport * as S from \"./Gallery.styles\";\nimport type { GalleryProps } from \"./Gallery.types\";\nimport { GalleryControls } from \"./Gallery.types\";\nimport {\n GalleryBottomControls,\n GalleryInsideControls,\n} from \"./GalleryControls\";\nimport { GalleryItem } from \"./GalleryItem\";\nimport { GalleryThumbnails } from \"./GalleryThumbnails\";\n\nexport const parseGalleryEntries = (\n entries: CustomMediaAsset[],\n fade?: boolean,\n) => {\n // move entry with isVideo key to the front of the array\n const videoEntry = entries.find((entry) => entry.isVideo);\n const entriesWithoutVideo = entries.filter((entry) => !entry.isVideo);\n const newEntries = videoEntry\n ? [videoEntry, ...entriesWithoutVideo]\n : entries;\n\n if (newEntries.length <= 1 || fade) {\n return newEntries;\n }\n\n // Shallow-copy entries\n const slidesWithClones = [...newEntries];\n // Add copy of the last element to the front of the array\n slidesWithClones.unshift(slidesWithClones[slidesWithClones.length - 1]!);\n // Add a copy of the first (now due to the previous step is at index 1) the element to the end of the array\n slidesWithClones.push(slidesWithClones[1]!);\n return slidesWithClones;\n};\n\nexport const Gallery = memo(function Gallery({\n controls,\n entries,\n parsed,\n className,\n size,\n priority,\n renderImage,\n fade,\n thumbnails,\n objectFit,\n onChange,\n}: GalleryProps) {\n const {\n reset,\n setControlsType,\n withTransition,\n visibleSlide,\n resetTransitionState,\n } = useGalleryControls();\n\n const galleryRef = useRef<HTMLDivElement>(null);\n\n // Parse entries\n const entriesParsed = useMemo<CustomMediaAsset[]>(() => {\n return parsed ? entries : parseGalleryEntries(entries, fade);\n }, [entries, fade, parsed]);\n\n // Update provider state if gallery controls change\n useEffect(() => {\n setControlsType(controls);\n }, [controls, setControlsType]);\n\n // Update image count and reset index when images change\n useEffect(() => {\n reset(entriesParsed.length);\n }, [entriesParsed, reset]);\n\n const activeEntry = useMemo(\n () => entriesParsed[visibleSlide],\n [entriesParsed, visibleSlide],\n );\n\n /**\n * Calculates, based on the given slide index and currently visible slide index,\n * if the provided index could be the next one to be shown (both ways - left and right).\n */\n const couldBeNext = useCallback(\n (index: number) => {\n const potentialNextRightSlideIndex =\n visibleSlide + 1 > entriesParsed.length - 1 ? 0 : visibleSlide + 1;\n\n const potentialNextLeftSlideIndex =\n visibleSlide - 1 < 0 ? entriesParsed.length - 1 : visibleSlide - 1;\n\n return !!(\n potentialNextRightSlideIndex === index ||\n potentialNextLeftSlideIndex === index\n );\n },\n [entriesParsed.length, visibleSlide],\n );\n\n // #############################################################################\n // Hover state\n // #############################################################################\n const isTabletUp = useMedia(BREAKPOINTS.TABLET_UP, false);\n const hoveredRaw = useHoverDirty(galleryRef, isTabletUp);\n\n // Debounce hovered to prevent stutter\n const [hovered, setHovered] = useState(false);\n\n useDebounce(\n () => {\n setHovered(hoveredRaw);\n },\n 10,\n [hoveredRaw],\n );\n\n // #############################################################################\n // Render\n // #############################################################################\n if (!activeEntry || !entriesParsed.length) {\n return null;\n }\n\n return (\n <S.GalleryWrapper className={className} ref={galleryRef}>\n <S.GalleryImageContainer>\n {/* Using entries instead of parsedEntries to determine actual length */}\n {entriesParsed.length === 1 ? (\n <GalleryItem\n // Note: \"key\" needed to reset fade-in animation\n // key={activeEntry.src}\n item={activeEntry}\n size={size}\n priority={priority}\n renderImage={renderImage}\n onTransitionEnd={resetTransitionState}\n isActive={true}\n objectFit={objectFit}\n />\n ) : (\n <>\n <S.GalleryTrack\n withTransition={withTransition}\n style={{\n transform: !fade\n ? `translate3d(-${visibleSlide * 100}%, 0, 0)`\n : \"\",\n }}\n onTransitionEnd={resetTransitionState}\n >\n {entriesParsed.map((entry, index) => {\n const isCurrentActive = index === visibleSlide;\n\n return (\n <GalleryItem\n // Note: \"key\" needed to reset fade-in animation\n // key={entry.src}\n key={`gallery-item-${entry.id}-${index}`}\n item={entry}\n size={size}\n // Have to additionally check to only priority the first item of the gallery\n priority={priority && isCurrentActive}\n isActive={isCurrentActive}\n couldBeNext={couldBeNext(index)}\n renderImage={renderImage}\n onTransitionEnd={resetTransitionState}\n fade={fade}\n objectFit={objectFit}\n />\n );\n })}\n </S.GalleryTrack>\n {thumbnails && (\n <GalleryThumbnails\n items={entriesParsed}\n renderImage={renderImage}\n expanded={hovered}\n onControl={onChange}\n />\n )}\n </>\n )}\n {entriesParsed.length > 1 && controls === GalleryControls.Bottom && (\n <GalleryBottomControls onControl={onChange} />\n )}\n {entriesParsed.length > 1 && controls === GalleryControls.Inside && (\n <GalleryInsideControls onControl={onChange} />\n )}\n </S.GalleryImageContainer>\n </S.GalleryWrapper>\n );\n});\n"],"names":["parseGalleryEntries","entries","fade","videoEntry","find","entry","isVideo","entriesWithoutVideo","filter","newEntries","length","slidesWithClones","unshift","push","Gallery","memo","Gallery2","controls","parsed","className","size","priority","renderImage","thumbnails","objectFit","onChange","reset","setControlsType","withTransition","visibleSlide","resetTransitionState","useGalleryControls","galleryRef","useRef","entriesParsed","useMemo","useEffect","activeEntry","couldBeNext","useCallback","index","potentialNextRightSlideIndex","potentialNextLeftSlideIndex","isTabletUp","useMedia","BREAKPOINTS","TABLET_UP","hoveredRaw","useHoverDirty","hovered","setHovered","useState","useDebounce","jsx","S.GalleryWrapper","ref","children","jsxs","S.GalleryImageContainer","GalleryItem","item","onTransitionEnd","isActive","Fragment","S.GalleryTrack","GalleryTrack","style","transform","map","isCurrentActive","id","GalleryThumbnails","items","expanded","onControl","GalleryControls","Bottom","GalleryBottomControls","Inside","GalleryInsideControls"],"mappings":";;;;;;;;;;;;;;;;AAgBa,MAAAA,mBAAA,GAAsBA,CACjCC,OAAA,EACAC,IACG,KAAA;EAEH,MAAMC,aAAaF,OAAQ,CAAAG,IAAA,CAAMC,KAAA,IAAUA,MAAMC,OAAO,CAAA;EACxD,MAAMC,sBAAsBN,OAAQ,CAAAO,MAAA,CAAQH,KAAU,IAAA,CAACA,MAAMC,OAAO,CAAA;EACpE,MAAMG,aAAaN,UACf,GAAA,CAACA,UAAY,EAAA,GAAGI,mBAAmB,CACnC,GAAAN,OAAA;EAEA,IAAAQ,UAAA,CAAWC,MAAU,IAAA,CAAA,IAAKR,IAAM,EAAA;IAC3B,OAAAO,UAAA;EACT;EAGM,MAAAE,gBAAA,GAAmB,CAAC,GAAGF,UAAU,CAAA;EAEvCE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MACxD,IAAAzB,eAAAA,UAAAA,CAAAA,GAAA,CAAC0B,eAAsB,CAAAA,qBAAA,EAAA;QAAAL,SAAA,EAAWjD;MAAU,CAAA,CAAA;IAEhD,CAAA;EACF,CAAA,CAAA;AAEJ,CAAC,CAAA;;"}
|
|
@@ -83,7 +83,7 @@ const Gallery = memo(function Gallery2({
|
|
|
83
83
|
objectFit
|
|
84
84
|
}) : /* @__PURE__ */jsxs(Fragment, {
|
|
85
85
|
children: [/* @__PURE__ */jsx(GalleryTrack, {
|
|
86
|
-
|
|
86
|
+
withTransition,
|
|
87
87
|
style: {
|
|
88
88
|
transform: !fade ? `translate3d(-${visibleSlide * 100}%, 0, 0)` : ""
|
|
89
89
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Gallery.mjs","sources":["../../../src/components/Gallery/Gallery.tsx"],"sourcesContent":["import { memo, useCallback, useEffect, useMemo, useRef, useState } from \"react\";\nimport { useDebounce, useHoverDirty, useMedia } from \"react-use\";\n\nimport { BREAKPOINTS } from \"../../constants/layout\";\nimport type { CustomMediaAsset } from \"../CustomImage/CustomImage.types\";\nimport { useGalleryControls } from \"./Gallery.context\";\nimport * as S from \"./Gallery.styles\";\nimport type { GalleryProps } from \"./Gallery.types\";\nimport { GalleryControls } from \"./Gallery.types\";\nimport {\n GalleryBottomControls,\n GalleryInsideControls,\n} from \"./GalleryControls\";\nimport { GalleryItem } from \"./GalleryItem\";\nimport { GalleryThumbnails } from \"./GalleryThumbnails\";\n\nexport const parseGalleryEntries = (\n entries: CustomMediaAsset[],\n fade?: boolean,\n) => {\n // move entry with isVideo key to the front of the array\n const videoEntry = entries.find((entry) => entry.isVideo);\n const entriesWithoutVideo = entries.filter((entry) => !entry.isVideo);\n const newEntries = videoEntry\n ? [videoEntry, ...entriesWithoutVideo]\n : entries;\n\n if (newEntries.length <= 1 || fade) {\n return newEntries;\n }\n\n // Shallow-copy entries\n const slidesWithClones = [...newEntries];\n // Add copy of the last element to the front of the array\n slidesWithClones.unshift(slidesWithClones[slidesWithClones.length - 1]!);\n // Add a copy of the first (now due to the previous step is at index 1) the element to the end of the array\n slidesWithClones.push(slidesWithClones[1]!);\n return slidesWithClones;\n};\n\nexport const Gallery = memo(function Gallery({\n controls,\n entries,\n parsed,\n className,\n size,\n priority,\n renderImage,\n fade,\n thumbnails,\n objectFit,\n onChange,\n}: GalleryProps) {\n const {\n reset,\n setControlsType,\n withTransition,\n visibleSlide,\n resetTransitionState,\n } = useGalleryControls();\n\n const galleryRef = useRef<HTMLDivElement>(null);\n\n // Parse entries\n const entriesParsed = useMemo<CustomMediaAsset[]>(() => {\n return parsed ? entries : parseGalleryEntries(entries, fade);\n }, [entries, fade, parsed]);\n\n // Update provider state if gallery controls change\n useEffect(() => {\n setControlsType(controls);\n }, [controls, setControlsType]);\n\n // Update image count and reset index when images change\n useEffect(() => {\n reset(entriesParsed.length);\n }, [entriesParsed, reset]);\n\n const activeEntry = useMemo(\n () => entriesParsed[visibleSlide],\n [entriesParsed, visibleSlide],\n );\n\n /**\n * Calculates, based on the given slide index and currently visible slide index,\n * if the provided index could be the next one to be shown (both ways - left and right).\n */\n const couldBeNext = useCallback(\n (index: number) => {\n const potentialNextRightSlideIndex =\n visibleSlide + 1 > entriesParsed.length - 1 ? 0 : visibleSlide + 1;\n\n const potentialNextLeftSlideIndex =\n visibleSlide - 1 < 0 ? entriesParsed.length - 1 : visibleSlide - 1;\n\n return !!(\n potentialNextRightSlideIndex === index ||\n potentialNextLeftSlideIndex === index\n );\n },\n [entriesParsed.length, visibleSlide],\n );\n\n // #############################################################################\n // Hover state\n // #############################################################################\n const isTabletUp = useMedia(BREAKPOINTS.TABLET_UP, false);\n const hoveredRaw = useHoverDirty(galleryRef, isTabletUp);\n\n // Debounce hovered to prevent stutter\n const [hovered, setHovered] = useState(false);\n\n useDebounce(\n () => {\n setHovered(hoveredRaw);\n },\n 10,\n [hoveredRaw],\n );\n\n // #############################################################################\n // Render\n // #############################################################################\n if (!activeEntry || !entriesParsed.length) {\n return null;\n }\n\n return (\n <S.GalleryWrapper className={className} ref={galleryRef}>\n <S.GalleryImageContainer>\n {/* Using entries instead of parsedEntries to determine actual length */}\n {entriesParsed.length === 1 ? (\n <GalleryItem\n // Note: \"key\" needed to reset fade-in animation\n // key={activeEntry.src}\n item={activeEntry}\n size={size}\n priority={priority}\n renderImage={renderImage}\n onTransitionEnd={resetTransitionState}\n isActive={true}\n objectFit={objectFit}\n />\n ) : (\n <>\n <S.GalleryTrack\n $withTransition={withTransition}\n style={{\n transform: !fade\n ? `translate3d(-${visibleSlide * 100}%, 0, 0)`\n : \"\",\n }}\n onTransitionEnd={resetTransitionState}\n >\n {entriesParsed.map((entry, index) => {\n const isCurrentActive = index === visibleSlide;\n\n return (\n <GalleryItem\n // Note: \"key\" needed to reset fade-in animation\n // key={entry.src}\n key={`gallery-item-${entry.id}-${index}`}\n item={entry}\n size={size}\n // Have to additionally check to only priority the first item of the gallery\n priority={priority && isCurrentActive}\n isActive={isCurrentActive}\n couldBeNext={couldBeNext(index)}\n renderImage={renderImage}\n onTransitionEnd={resetTransitionState}\n fade={fade}\n objectFit={objectFit}\n />\n );\n })}\n </S.GalleryTrack>\n {thumbnails && (\n <GalleryThumbnails\n items={entriesParsed}\n renderImage={renderImage}\n expanded={hovered}\n onControl={onChange}\n />\n )}\n </>\n )}\n {entriesParsed.length > 1 && controls === GalleryControls.Bottom && (\n <GalleryBottomControls onControl={onChange} />\n )}\n {entriesParsed.length > 1 && controls === GalleryControls.Inside && (\n <GalleryInsideControls onControl={onChange} />\n )}\n </S.GalleryImageContainer>\n </S.GalleryWrapper>\n );\n});\n"],"names":["parseGalleryEntries","entries","fade","videoEntry","find","entry","isVideo","entriesWithoutVideo","filter","newEntries","length","slidesWithClones","unshift","push","Gallery","memo","Gallery2","controls","parsed","className","size","priority","renderImage","thumbnails","objectFit","onChange","reset","setControlsType","withTransition","visibleSlide","resetTransitionState","useGalleryControls","galleryRef","useRef","entriesParsed","useMemo","useEffect","activeEntry","couldBeNext","useCallback","index","potentialNextRightSlideIndex","potentialNextLeftSlideIndex","isTabletUp","useMedia","BREAKPOINTS","TABLET_UP","hoveredRaw","useHoverDirty","hovered","setHovered","useState","useDebounce","jsx","S.GalleryWrapper","ref","children","jsxs","S.GalleryImageContainer","GalleryItem","item","onTransitionEnd","isActive","Fragment","S.GalleryTrack","$withTransition","style","transform","map","isCurrentActive","id","GalleryThumbnails","items","expanded","onControl","GalleryControls","Bottom","GalleryBottomControls","Inside","GalleryInsideControls"],"mappings":";;;;;;;;;;;;;;AAgBa,MAAAA,mBAAA,GAAsBA,CACjCC,OAAA,EACAC,IACG,KAAA;EAEH,MAAMC,aAAaF,OAAQ,CAAAG,IAAA,CAAMC,KAAA,IAAUA,MAAMC,OAAO,CAAA;EACxD,MAAMC,sBAAsBN,OAAQ,CAAAO,MAAA,CAAQH,KAAU,IAAA,CAACA,MAAMC,OAAO,CAAA;EACpE,MAAMG,aAAaN,UACf,GAAA,CAACA,UAAY,EAAA,GAAGI,mBAAmB,CACnC,GAAAN,OAAA;EAEA,IAAAQ,UAAA,CAAWC,MAAU,IAAA,CAAA,IAAKR,IAAM,EAAA;IAC3B,OAAAO,UAAA;EACT;EAGM,MAAAE,gBAAA,GAAmB,CAAC,GAAGF,UAAU,CAAA;EAEvCE,gBAAA,CAAiBC,OAAQ,CAAAD,gBAAA,CAAiBA,gBAAiB,CAAAD,MAAA,GAAS,CAAC,CAAE,CAAA;EAEtDC,gBAAA,CAAAE,IAAA,CAAKF,gBAAiB,CAAA,CAAC,CAAE,CAAA;EACnC,OAAAA,gBAAA;AACT,CAAA;AAEa,MAAAG,OAAA,GAAUC,IAAK,CAAA,SAASD,QAAQE,CAAA;EAC3CC,QAAA;EACAhB,OAAA;EACAiB,MAAA;EACAC,SAAA;EACAC,IAAA;EACAC,QAAA;EACAC,WAAA;EACApB,IAAA;EACAqB,UAAA;EACAC,SAAA;EACAC;AACF,CAAiB,EAAA;EACT,MAAA;IACJC,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cACAsB;YAAA,CAAA,EAVK,gBAAgBnB,KAAA,CAAMiE,EAAE,IAAI9B,KAAK,EAAA,CAWxC;UAAA,CAEH;QAAA,CACH,CAAA,EACCjB,UACC,mBAAA8B,GAAA,CAACkB,iBAAA,EAAA;UACCC,KAAO,EAAAtC,aAAA;UACPZ,WAAA;UACAmD,QAAU,EAAAxB,OAAA;UACVyB,SAAW,EAAAjD;QAAA,CACb,CAAA;OAEJ,CAAA,EAEDS,aAAA,CAAcxB,SAAS,CAAK,IAAAO,QAAA,KAAa0D,gBAAgBC,MACxD,IAAA,eAAAvB,GAAA,CAACwB,qBAAsB,EAAA;QAAAH,SAAA,EAAWjD;MAAU,CAAA,CAAA,EAE7CS,aAAA,CAAcxB,SAAS,CAAK,IAAAO,QAAA,KAAa0D,gBAAgBG,MACxD,IAAA,eAAAzB,GAAA,CAAC0B,qBAAsB,EAAA;QAAAL,SAAA,EAAWjD;MAAU,CAAA,CAAA;IAEhD,CAAA;EACF,CAAA,CAAA;AAEJ,CAAC,CAAA;"}
|
|
1
|
+
{"version":3,"file":"Gallery.mjs","sources":["../../../src/components/Gallery/Gallery.tsx"],"sourcesContent":["import { memo, useCallback, useEffect, useMemo, useRef, useState } from \"react\";\nimport { useDebounce, useHoverDirty, useMedia } from \"react-use\";\n\nimport { BREAKPOINTS } from \"../../constants/layout\";\nimport type { CustomMediaAsset } from \"../CustomImage/CustomImage.types\";\nimport { useGalleryControls } from \"./Gallery.context\";\nimport * as S from \"./Gallery.styles\";\nimport type { GalleryProps } from \"./Gallery.types\";\nimport { GalleryControls } from \"./Gallery.types\";\nimport {\n GalleryBottomControls,\n GalleryInsideControls,\n} from \"./GalleryControls\";\nimport { GalleryItem } from \"./GalleryItem\";\nimport { GalleryThumbnails } from \"./GalleryThumbnails\";\n\nexport const parseGalleryEntries = (\n entries: CustomMediaAsset[],\n fade?: boolean,\n) => {\n // move entry with isVideo key to the front of the array\n const videoEntry = entries.find((entry) => entry.isVideo);\n const entriesWithoutVideo = entries.filter((entry) => !entry.isVideo);\n const newEntries = videoEntry\n ? [videoEntry, ...entriesWithoutVideo]\n : entries;\n\n if (newEntries.length <= 1 || fade) {\n return newEntries;\n }\n\n // Shallow-copy entries\n const slidesWithClones = [...newEntries];\n // Add copy of the last element to the front of the array\n slidesWithClones.unshift(slidesWithClones[slidesWithClones.length - 1]!);\n // Add a copy of the first (now due to the previous step is at index 1) the element to the end of the array\n slidesWithClones.push(slidesWithClones[1]!);\n return slidesWithClones;\n};\n\nexport const Gallery = memo(function Gallery({\n controls,\n entries,\n parsed,\n className,\n size,\n priority,\n renderImage,\n fade,\n thumbnails,\n objectFit,\n onChange,\n}: GalleryProps) {\n const {\n reset,\n setControlsType,\n withTransition,\n visibleSlide,\n resetTransitionState,\n } = useGalleryControls();\n\n const galleryRef = useRef<HTMLDivElement>(null);\n\n // Parse entries\n const entriesParsed = useMemo<CustomMediaAsset[]>(() => {\n return parsed ? entries : parseGalleryEntries(entries, fade);\n }, [entries, fade, parsed]);\n\n // Update provider state if gallery controls change\n useEffect(() => {\n setControlsType(controls);\n }, [controls, setControlsType]);\n\n // Update image count and reset index when images change\n useEffect(() => {\n reset(entriesParsed.length);\n }, [entriesParsed, reset]);\n\n const activeEntry = useMemo(\n () => entriesParsed[visibleSlide],\n [entriesParsed, visibleSlide],\n );\n\n /**\n * Calculates, based on the given slide index and currently visible slide index,\n * if the provided index could be the next one to be shown (both ways - left and right).\n */\n const couldBeNext = useCallback(\n (index: number) => {\n const potentialNextRightSlideIndex =\n visibleSlide + 1 > entriesParsed.length - 1 ? 0 : visibleSlide + 1;\n\n const potentialNextLeftSlideIndex =\n visibleSlide - 1 < 0 ? entriesParsed.length - 1 : visibleSlide - 1;\n\n return !!(\n potentialNextRightSlideIndex === index ||\n potentialNextLeftSlideIndex === index\n );\n },\n [entriesParsed.length, visibleSlide],\n );\n\n // #############################################################################\n // Hover state\n // #############################################################################\n const isTabletUp = useMedia(BREAKPOINTS.TABLET_UP, false);\n const hoveredRaw = useHoverDirty(galleryRef, isTabletUp);\n\n // Debounce hovered to prevent stutter\n const [hovered, setHovered] = useState(false);\n\n useDebounce(\n () => {\n setHovered(hoveredRaw);\n },\n 10,\n [hoveredRaw],\n );\n\n // #############################################################################\n // Render\n // #############################################################################\n if (!activeEntry || !entriesParsed.length) {\n return null;\n }\n\n return (\n <S.GalleryWrapper className={className} ref={galleryRef}>\n <S.GalleryImageContainer>\n {/* Using entries instead of parsedEntries to determine actual length */}\n {entriesParsed.length === 1 ? (\n <GalleryItem\n // Note: \"key\" needed to reset fade-in animation\n // key={activeEntry.src}\n item={activeEntry}\n size={size}\n priority={priority}\n renderImage={renderImage}\n onTransitionEnd={resetTransitionState}\n isActive={true}\n objectFit={objectFit}\n />\n ) : (\n <>\n <S.GalleryTrack\n withTransition={withTransition}\n style={{\n transform: !fade\n ? `translate3d(-${visibleSlide * 100}%, 0, 0)`\n : \"\",\n }}\n onTransitionEnd={resetTransitionState}\n >\n {entriesParsed.map((entry, index) => {\n const isCurrentActive = index === visibleSlide;\n\n return (\n <GalleryItem\n // Note: \"key\" needed to reset fade-in animation\n // key={entry.src}\n key={`gallery-item-${entry.id}-${index}`}\n item={entry}\n size={size}\n // Have to additionally check to only priority the first item of the gallery\n priority={priority && isCurrentActive}\n isActive={isCurrentActive}\n couldBeNext={couldBeNext(index)}\n renderImage={renderImage}\n onTransitionEnd={resetTransitionState}\n fade={fade}\n objectFit={objectFit}\n />\n );\n })}\n </S.GalleryTrack>\n {thumbnails && (\n <GalleryThumbnails\n items={entriesParsed}\n renderImage={renderImage}\n expanded={hovered}\n onControl={onChange}\n />\n )}\n </>\n )}\n {entriesParsed.length > 1 && controls === GalleryControls.Bottom && (\n <GalleryBottomControls onControl={onChange} />\n )}\n {entriesParsed.length > 1 && controls === GalleryControls.Inside && (\n <GalleryInsideControls onControl={onChange} />\n )}\n </S.GalleryImageContainer>\n </S.GalleryWrapper>\n );\n});\n"],"names":["parseGalleryEntries","entries","fade","videoEntry","find","entry","isVideo","entriesWithoutVideo","filter","newEntries","length","slidesWithClones","unshift","push","Gallery","memo","Gallery2","controls","parsed","className","size","priority","renderImage","thumbnails","objectFit","onChange","reset","setControlsType","withTransition","visibleSlide","resetTransitionState","useGalleryControls","galleryRef","useRef","entriesParsed","useMemo","useEffect","activeEntry","couldBeNext","useCallback","index","potentialNextRightSlideIndex","potentialNextLeftSlideIndex","isTabletUp","useMedia","BREAKPOINTS","TABLET_UP","hoveredRaw","useHoverDirty","hovered","setHovered","useState","useDebounce","jsx","S.GalleryWrapper","ref","children","jsxs","S.GalleryImageContainer","GalleryItem","item","onTransitionEnd","isActive","Fragment","S.GalleryTrack","style","transform","map","isCurrentActive","id","GalleryThumbnails","items","expanded","onControl","GalleryControls","Bottom","GalleryBottomControls","Inside","GalleryInsideControls"],"mappings":";;;;;;;;;;;;;;AAgBa,MAAAA,mBAAA,GAAsBA,CACjCC,OAAA,EACAC,IACG,KAAA;EAEH,MAAMC,aAAaF,OAAQ,CAAAG,IAAA,CAAMC,KAAA,IAAUA,MAAMC,OAAO,CAAA;EACxD,MAAMC,sBAAsBN,OAAQ,CAAAO,MAAA,CAAQH,KAAU,IAAA,CAACA,MAAMC,OAAO,CAAA;EACpE,MAAMG,aAAaN,UACf,GAAA,CAACA,UAAY,EAAA,GAAGI,mBAAmB,CACnC,GAAAN,OAAA;EAEA,IAAAQ,UAAA,CAAWC,MAAU,IAAA,CAAA,IAAKR,IAAM,EAAA;IAC3B,OAAAO,UAAA;EACT;EAGM,MAAAE,gBAAA,GAAmB,CAAC,GAAGF,UAAU,CAAA;EAEvCE,gBAAA,CAAiBC,OAAQ,CAAAD,gBAAA,CAAiBA,gBAAiB,CAAAD,MAAA,GAAS,CAAC,CAAE,CAAA;EAEtDC,gBAAA,CAAAE,IAAA,CAAKF,gBAAiB,CAAA,CAAC,CAAE,CAAA;EACnC,OAAAA,gBAAA;AACT,CAAA;AAEa,MAAAG,OAAA,GAAUC,IAAK,CAAA,SAASD,QAAQE,CAAA;E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AUA,QAAY,IAAA+C,eAAA;cACtBN,QAAU,EAAAM,eAAA;cACV9B,WAAA,EAAaA,YAAYE,KAAK,CAAA;cAC9BlB,WAAA;cACAuC,eAAiB,EAAA/B,oBAAA;cACjB5B,IAAA;cACAsB;YAAA,CAAA,EAVK,gBAAgBnB,KAAA,CAAMgE,EAAE,IAAI7B,KAAK,EAAA,CAWxC;UAAA,CAEH;QAAA,CACH,CAAA,EACCjB,UACC,mBAAA8B,GAAA,CAACiB,iBAAA,EAAA;UACCC,KAAO,EAAArC,aAAA;UACPZ,WAAA;UACAkD,QAAU,EAAAvB,OAAA;UACVwB,SAAW,EAAAhD;QAAA,CACb,CAAA;OAEJ,CAAA,EAEDS,aAAA,CAAcxB,SAAS,CAAK,IAAAO,QAAA,KAAayD,gBAAgBC,MACxD,IAAA,eAAAtB,GAAA,CAACuB,qBAAsB,EAAA;QAAAH,SAAA,EAAWhD;MAAU,CAAA,CAAA,EAE7CS,aAAA,CAAcxB,SAAS,CAAK,IAAAO,QAAA,KAAayD,gBAAgBG,MACxD,IAAA,eAAAxB,GAAA,CAACyB,qBAAsB,EAAA;QAAAL,SAAA,EAAWhD;MAAU,CAAA,CAAA;IAEhD,CAAA;EACF,CAAA,CAAA;AAEJ,CAAC,CAAA;"}
|
|
@@ -2,15 +2,11 @@ import type { GalleryProps } from "./Gallery.types";
|
|
|
2
2
|
/**
|
|
3
3
|
* For gallery with outside (side) controls add flex container with spacing
|
|
4
4
|
*/
|
|
5
|
-
export declare const GalleryWrapper: import("styled-components
|
|
6
|
-
export declare const GalleryImageContainer: import("styled-components
|
|
7
|
-
export declare const GalleryLabel: import("styled-components
|
|
8
|
-
export declare const GalleryClickThirdLeft: import("styled-components
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
}, never>> & string;
|
|
14
|
-
export declare const GalleryTrack: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
|
|
15
|
-
$withTransition: boolean;
|
|
16
|
-
}>> & string;
|
|
5
|
+
export declare const GalleryWrapper: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
6
|
+
export declare const GalleryImageContainer: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, Pick<GalleryProps, "aspectRatio">, never>;
|
|
7
|
+
export declare const GalleryLabel: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
8
|
+
export declare const GalleryClickThirdLeft: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
9
|
+
export declare const GalleryClickThirdRight: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
10
|
+
export declare const GalleryTrack: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {
|
|
11
|
+
withTransition: boolean;
|
|
12
|
+
}, never>;
|
|
@@ -63,9 +63,7 @@ const GalleryTrack = styled__default["default"].div`
|
|
|
63
63
|
inset: 0;
|
|
64
64
|
display: flex;
|
|
65
65
|
will-change: transform;
|
|
66
|
-
transition: ${
|
|
67
|
-
$withTransition
|
|
68
|
-
}) => $withTransition ? `transform 0.2s` : "none"};
|
|
66
|
+
transition: ${props => props.withTransition ? `transform 0.2s` : "none"};
|
|
69
67
|
|
|
70
68
|
/**
|
|
71
69
|
* Hack: to make sure the gallery track doesn't flicker on changing slides just for good old Safari. Nothing else
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Gallery.styles.js","sources":["../../../src/components/Gallery/Gallery.styles.tsx"],"sourcesContent":["import styled from \"styled-components\";\n\nimport type { GalleryProps } from \"./Gallery.types\";\n\n/**\n * For gallery with outside (side) controls add flex container with spacing\n */\nexport const GalleryWrapper = styled.div`\n display: flex;\n flex-direction: row;\n column-gap: 50vw;\n overflow: hidden;\n height: 100%;\n width: 100%;\n\n /* Center the image vertically if the only child in the container */\n &:only-child {\n margin-top: auto;\n margin-bottom: auto;\n }\n`;\n\nexport const GalleryImageContainer = styled.div<\n Pick<GalleryProps, \"aspectRatio\">\n>`\n position: relative;\n width: 100%;\n height: auto;\n\n /* In certain conditions need to gallery to be certain aspect-ratio */\n aspect-ratio: ${(props) =>\n props.aspectRatio\n ? `${props.aspectRatio[0]} / ${props.aspectRatio[1]}`\n : \"auto\"};\n`;\n\nexport const GalleryLabel = styled.div`\n text-align: center;\n /* Make it allocate space even tho there isn't anything */\n white-space: pre;\n\n /**\n * HACK: Using margin-bottom usual margin-top way of combining things as this makes it in this case a bit easier to\n * conditionally render the labels without requiring css in other places\n */\n margin-bottom: 24px;\n`;\n\nconst GalleryClickThird = styled.div`\n position: absolute;\n top: 0;\n height: 100%;\n width: 33.3%;\n z-index: 2;\n\n &:hover {\n cursor: pointer;\n }\n`;\n\nexport const GalleryClickThirdLeft = styled(GalleryClickThird)`\n left: 0;\n`;\n\nexport const GalleryClickThirdRight = styled(GalleryClickThird)`\n right: 0;\n`;\n\nexport const GalleryTrack = styled.div<{
|
|
1
|
+
{"version":3,"file":"Gallery.styles.js","sources":["../../../src/components/Gallery/Gallery.styles.tsx"],"sourcesContent":["import styled from \"styled-components\";\n\nimport type { GalleryProps } from \"./Gallery.types\";\n\n/**\n * For gallery with outside (side) controls add flex container with spacing\n */\nexport const GalleryWrapper = styled.div`\n display: flex;\n flex-direction: row;\n column-gap: 50vw;\n overflow: hidden;\n height: 100%;\n width: 100%;\n\n /* Center the image vertically if the only child in the container */\n &:only-child {\n margin-top: auto;\n margin-bottom: auto;\n }\n`;\n\nexport const GalleryImageContainer = styled.div<\n Pick<GalleryProps, \"aspectRatio\">\n>`\n position: relative;\n width: 100%;\n height: auto;\n\n /* In certain conditions need to gallery to be certain aspect-ratio */\n aspect-ratio: ${(props) =>\n props.aspectRatio\n ? `${props.aspectRatio[0]} / ${props.aspectRatio[1]}`\n : \"auto\"};\n`;\n\nexport const GalleryLabel = styled.div`\n text-align: center;\n /* Make it allocate space even tho there isn't anything */\n white-space: pre;\n\n /**\n * HACK: Using margin-bottom usual margin-top way of combining things as this makes it in this case a bit easier to\n * conditionally render the labels without requiring css in other places\n */\n margin-bottom: 24px;\n`;\n\nconst GalleryClickThird = styled.div`\n position: absolute;\n top: 0;\n height: 100%;\n width: 33.3%;\n z-index: 2;\n\n &:hover {\n cursor: pointer;\n }\n`;\n\nexport const GalleryClickThirdLeft = styled(GalleryClickThird)`\n left: 0;\n`;\n\nexport const GalleryClickThirdRight = styled(GalleryClickThird)`\n right: 0;\n`;\n\nexport const GalleryTrack = styled.div<{ withTransition: boolean }>`\n position: absolute;\n inset: 0;\n display: flex;\n will-change: transform;\n transition: ${(props) => (props.withTransition ? `transform 0.2s` : \"none\")};\n\n /**\n * Hack: to make sure the gallery track doesn't flicker on changing slides just for good old Safari. Nothing else\n * worked.\n * @see https://stackoverflow.com/a/15918159/1378261\n */\n -webkit-backface-visibility: hidden;\n * {\n -webkit-transform: translate3d(0, 0, 0);\n }\n`;\n"],"names":["GalleryWrapper","styled","div","GalleryImageContainer","props","aspectRatio","GalleryLabel","GalleryClickThird","GalleryClickThirdLeft","GalleryClickThirdRight","GalleryTrack","withTransition"],"mappings":";;;;;;;;;;AAOO,MAAMA,iBAAiBC,eAAO,CAAA,SAAA,CAAA,CAAAC,GAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,CAAA;AAe9B,MAAMC,wBAAwBF,eAAO,CAAA,SAAA,CAAA,CAAAC,GAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAQzBE,KAAA,IACfA,KAAM,CAAAC,WAAA,GACF,GAAGD,KAAM,CAAAC,WAAA,CAAY,CAAC,CAAC,MAAMD,KAAM,CAAAC,WAAA,CAAY,CAAC,CAAC,KACjD,MAAM;AAAA,CAAA;AAGP,MAAMC,eAAeL,eAAO,CAAA,SAAA,CAAA,CAAAC,GAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,CAAA;AAYnC,MAAMK,oBAAoBN,eAAO,CAAA,SAAA,CAAA,CAAAC,GAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,CAAA;AAYpB,MAAAM,qBAAA,GAAwBP,eAAAA,CAAAA,SAAAA,EAAOM,iBAAiB,CAAA;AAAA;AAAA,CAAA;AAIhD,MAAAE,sBAAA,GAAyBR,eAAAA,CAAAA,SAAAA,EAAOM,iBAAiB,CAAA;AAAA;AAAA,CAAA;AAIvD,MAAMG,eAAeT,eAAO,CAAA,SAAA,CAAA,CAAAC,GAAA;AAAA;AAAA;AAAA;AAAA;AAAA,gBAKlBE,KAAA,IAAWA,KAAM,CAAAO,cAAA,GAAiB,mBAAmB,MAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,CAAA;;;;;;"}
|