@anker-in/headless-ui 1.3.13 → 1.3.14-alpha.1780978714203
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/dist/cjs/biz-components/AccordionCards/index.js +1 -1
- package/dist/cjs/biz-components/AccordionCards/index.js.map +3 -3
- package/dist/cjs/biz-components/ActiveShelf/ProductCard.d.ts +1 -1
- package/dist/cjs/biz-components/ActiveShelf/ProductCard.js +1 -1
- package/dist/cjs/biz-components/ActiveShelf/ProductCard.js.map +2 -2
- package/dist/cjs/biz-components/ActivityMechanism/index.js +1 -1
- package/dist/cjs/biz-components/ActivityMechanism/index.js.map +3 -3
- package/dist/cjs/biz-components/ActivitySchedule/index.js +1 -1
- package/dist/cjs/biz-components/ActivitySchedule/index.js.map +3 -3
- package/dist/cjs/biz-components/AiuiProvider/index.js +1 -1
- package/dist/cjs/biz-components/AiuiProvider/index.js.map +3 -3
- package/dist/cjs/biz-components/AnchorNavigation/index.js +1 -1
- package/dist/cjs/biz-components/AnchorNavigation/index.js.map +3 -3
- package/dist/cjs/biz-components/BrandCardLink/BrandCardLink.js +1 -1
- package/dist/cjs/biz-components/BrandCardLink/BrandCardLink.js.map +3 -3
- package/dist/cjs/biz-components/BrandEquity/BrandEquity.js +1 -1
- package/dist/cjs/biz-components/BrandEquity/BrandEquity.js.map +3 -3
- package/dist/cjs/biz-components/BuyOneGetOneShelf/PriceAndActions.d.ts +2 -14
- package/dist/cjs/biz-components/BuyOneGetOneShelf/PriceAndActions.js +1 -1
- package/dist/cjs/biz-components/BuyOneGetOneShelf/PriceAndActions.js.map +3 -3
- package/dist/cjs/biz-components/BuyOneGetOneShelf/ProductCard.d.ts +1 -1
- package/dist/cjs/biz-components/BuyOneGetOneShelf/ProductCard.js +1 -1
- package/dist/cjs/biz-components/BuyOneGetOneShelf/ProductCard.js.map +3 -3
- package/dist/cjs/biz-components/BuyOneGetOneShelf/context.d.ts +4 -0
- package/dist/cjs/biz-components/BuyOneGetOneShelf/context.js +2 -0
- package/dist/cjs/biz-components/BuyOneGetOneShelf/context.js.map +7 -0
- package/dist/cjs/biz-components/BuyOneGetOneShelf/types.d.ts +2 -2
- package/dist/cjs/biz-components/BuyOneGetOneShelf/types.js.map +1 -1
- package/dist/cjs/biz-components/Category/SwiperCategory.js +1 -1
- package/dist/cjs/biz-components/Category/SwiperCategory.js.map +3 -3
- package/dist/cjs/biz-components/Category/index.js +1 -1
- package/dist/cjs/biz-components/Category/index.js.map +3 -3
- package/dist/cjs/biz-components/CreditsShelf/ProductCard.js +1 -1
- package/dist/cjs/biz-components/CreditsShelf/ProductCard.js.map +2 -2
- package/dist/cjs/biz-components/CreditsShelf/types.d.ts +1 -1
- package/dist/cjs/biz-components/CreditsShelf/types.js.map +1 -1
- package/dist/cjs/biz-components/Evaluate/index.js +1 -1
- package/dist/cjs/biz-components/Evaluate/index.js.map +3 -3
- package/dist/cjs/biz-components/EventSchedule/index.js +1 -1
- package/dist/cjs/biz-components/EventSchedule/index.js.map +3 -3
- package/dist/cjs/biz-components/FeatureCards/FeatureCards.js +1 -1
- package/dist/cjs/biz-components/FeatureCards/FeatureCards.js.map +3 -3
- package/dist/cjs/biz-components/FeaturedBlogPosts/index.js +1 -1
- package/dist/cjs/biz-components/FeaturedBlogPosts/index.js.map +2 -2
- package/dist/cjs/biz-components/FooterNavigation/index.js +1 -1
- package/dist/cjs/biz-components/FooterNavigation/index.js.map +3 -3
- package/dist/cjs/biz-components/GiftShelf/index.js +1 -1
- package/dist/cjs/biz-components/GiftShelf/index.js.map +2 -2
- package/dist/cjs/biz-components/Graphic/index.js +1 -1
- package/dist/cjs/biz-components/Graphic/index.js.map +3 -3
- package/dist/cjs/biz-components/GraphicOverlay/GraphicOverlay.d.ts +2 -2
- package/dist/cjs/biz-components/GraphicOverlay/GraphicOverlay.js +1 -1
- package/dist/cjs/biz-components/GraphicOverlay/GraphicOverlay.js.map +3 -3
- package/dist/cjs/biz-components/HeaderNavigation/MobileTextLinksMenu.d.ts +12 -0
- package/dist/cjs/biz-components/HeaderNavigation/MobileTextLinksMenu.js +2 -0
- package/dist/cjs/biz-components/HeaderNavigation/MobileTextLinksMenu.js.map +7 -0
- package/dist/cjs/biz-components/HeaderNavigation/TextLinksDropdown.d.ts +10 -0
- package/dist/cjs/biz-components/HeaderNavigation/TextLinksDropdown.js +2 -0
- package/dist/cjs/biz-components/HeaderNavigation/TextLinksDropdown.js.map +7 -0
- package/dist/cjs/biz-components/HeaderNavigation/index.js +1 -1
- package/dist/cjs/biz-components/HeaderNavigation/index.js.map +3 -3
- package/dist/cjs/biz-components/HeaderNavigation/types.d.ts +8 -1
- package/dist/cjs/biz-components/HeaderNavigation/types.js +1 -1
- package/dist/cjs/biz-components/HeaderNavigation/types.js.map +2 -2
- package/dist/cjs/biz-components/HeaderNavigation/withCategory.d.ts +1 -0
- package/dist/cjs/biz-components/HeaderNavigation/withCategory.js +1 -1
- package/dist/cjs/biz-components/HeaderNavigation/withCategory.js.map +3 -3
- package/dist/cjs/biz-components/HeroBanner/HeroBanner.js +1 -1
- package/dist/cjs/biz-components/HeroBanner/HeroBanner.js.map +3 -3
- package/dist/cjs/biz-components/HeroBanner/HeroBannerCarousel.js +1 -1
- package/dist/cjs/biz-components/HeroBanner/HeroBannerCarousel.js.map +3 -3
- package/dist/cjs/biz-components/ImageOverlayShelf/ProductCard.js +1 -1
- package/dist/cjs/biz-components/ImageOverlayShelf/ProductCard.js.map +1 -1
- package/dist/cjs/biz-components/ImageOverlayShelf/index.d.ts +11 -3
- package/dist/cjs/biz-components/ImageOverlayShelf/index.js +1 -1
- package/dist/cjs/biz-components/ImageOverlayShelf/index.js.map +3 -3
- package/dist/cjs/biz-components/ImageOverlayShelf/types.d.ts +11 -0
- package/dist/cjs/biz-components/ImageOverlayShelf/types.js +1 -1
- package/dist/cjs/biz-components/ImageOverlayShelf/types.js.map +1 -1
- package/dist/cjs/biz-components/ImageTextOverlay/index.js +2 -2
- package/dist/cjs/biz-components/ImageTextOverlay/index.js.map +3 -3
- package/dist/cjs/biz-components/ImageWithText/ImageWithText.js +1 -1
- package/dist/cjs/biz-components/ImageWithText/ImageWithText.js.map +3 -3
- package/dist/cjs/biz-components/Ksp/index.js +1 -1
- package/dist/cjs/biz-components/Ksp/index.js.map +3 -3
- package/dist/cjs/biz-components/LotteryShared/ErrorModal.d.ts +4 -0
- package/dist/cjs/biz-components/LotteryShared/ErrorModal.js.map +2 -2
- package/dist/cjs/biz-components/LotteryShared/MyRewardsModal.d.ts +13 -13
- package/dist/cjs/biz-components/LotteryShared/MyRewardsModal.js +1 -1
- package/dist/cjs/biz-components/LotteryShared/MyRewardsModal.js.map +3 -3
- package/dist/cjs/biz-components/LotteryShared/types.d.ts +9 -0
- package/dist/cjs/biz-components/LotteryShared/types.js.map +2 -2
- package/dist/cjs/biz-components/Media/index.js +1 -1
- package/dist/cjs/biz-components/Media/index.js.map +3 -3
- package/dist/cjs/biz-components/MediaEndorsement/index.js +2 -2
- package/dist/cjs/biz-components/MediaEndorsement/index.js.map +3 -3
- package/dist/cjs/biz-components/MediaPlayerBase/index.js +1 -1
- package/dist/cjs/biz-components/MediaPlayerBase/index.js.map +3 -3
- package/dist/cjs/biz-components/MediaPlayerMulti/index.js +1 -1
- package/dist/cjs/biz-components/MediaPlayerMulti/index.js.map +3 -3
- package/dist/cjs/biz-components/MediaPlayerSticky/index.js +1 -1
- package/dist/cjs/biz-components/MediaPlayerSticky/index.js.map +3 -3
- package/dist/cjs/biz-components/MediaSceneSwitcher/MediaSceneSwitcher.js +2 -2
- package/dist/cjs/biz-components/MediaSceneSwitcher/MediaSceneSwitcher.js.map +3 -3
- package/dist/cjs/biz-components/MediaSceneSwitcherV2/index.js +1 -1
- package/dist/cjs/biz-components/MediaSceneSwitcherV2/index.js.map +3 -3
- package/dist/cjs/biz-components/MediaShelf/ProductCard.js +1 -1
- package/dist/cjs/biz-components/MediaShelf/ProductCard.js.map +2 -2
- package/dist/cjs/biz-components/MediaShelf/types.d.ts +1 -1
- package/dist/cjs/biz-components/MediaShelf/types.js +1 -1
- package/dist/cjs/biz-components/MediaShelf/types.js.map +1 -1
- package/dist/cjs/biz-components/MediaTextOverlay/MediaTextOverlay.js +1 -1
- package/dist/cjs/biz-components/MediaTextOverlay/MediaTextOverlay.js.map +3 -3
- package/dist/cjs/biz-components/MemberEquity/index.js +2 -2
- package/dist/cjs/biz-components/MemberEquity/index.js.map +3 -3
- package/dist/cjs/biz-components/MultiLayoutGraphicBlock/MultiLayoutGraphicBlock.d.ts +4 -2
- package/dist/cjs/biz-components/MultiLayoutGraphicBlock/MultiLayoutGraphicBlock.js +1 -1
- package/dist/cjs/biz-components/MultiLayoutGraphicBlock/MultiLayoutGraphicBlock.js.map +3 -3
- package/dist/cjs/biz-components/MultiLayoutGraphicBlock/MultiLayoutGraphicBlockCarousel.d.ts +22 -0
- package/dist/cjs/biz-components/MultiLayoutGraphicBlock/MultiLayoutGraphicBlockCarousel.js +2 -0
- package/dist/cjs/biz-components/MultiLayoutGraphicBlock/MultiLayoutGraphicBlockCarousel.js.map +7 -0
- package/dist/cjs/biz-components/MultiLayoutGraphicBlock/types.d.ts +18 -0
- package/dist/cjs/biz-components/MultiLayoutGraphicBlock/types.js +1 -1
- package/dist/cjs/biz-components/MultiLayoutGraphicBlock/types.js.map +1 -1
- package/dist/cjs/biz-components/NavigationSearch/index.js +2 -2
- package/dist/cjs/biz-components/NavigationSearch/index.js.map +2 -2
- package/dist/cjs/biz-components/ProductCompare/index.js +1 -1
- package/dist/cjs/biz-components/ProductCompare/index.js.map +2 -2
- package/dist/cjs/biz-components/ProductHero/ProductHero.js +1 -1
- package/dist/cjs/biz-components/ProductHero/ProductHero.js.map +3 -3
- package/dist/cjs/biz-components/ProductLottery/types.d.ts +62 -5
- package/dist/cjs/biz-components/ProductLottery/types.js +1 -1
- package/dist/cjs/biz-components/ProductLottery/types.js.map +2 -2
- package/dist/cjs/biz-components/ProductNav/ProductNav.js +1 -1
- package/dist/cjs/biz-components/ProductNav/ProductNav.js.map +3 -3
- package/dist/cjs/biz-components/PromotionalBar/index.js +1 -1
- package/dist/cjs/biz-components/PromotionalBar/index.js.map +3 -3
- package/dist/cjs/biz-components/SceneShelfV3/ProductCard.d.ts +1 -1
- package/dist/cjs/biz-components/SceneShelfV3/ProductCard.js +1 -1
- package/dist/cjs/biz-components/SceneShelfV3/ProductCard.js.map +2 -2
- package/dist/cjs/biz-components/SecondaryBanner/index.js +1 -1
- package/dist/cjs/biz-components/SecondaryBanner/index.js.map +2 -2
- package/dist/cjs/biz-components/ShelfDisplay/index.js +1 -1
- package/dist/cjs/biz-components/ShelfDisplay/index.js.map +3 -3
- package/dist/cjs/biz-components/ShelfDisplay/shelfDisplay.d.ts +11 -1
- package/dist/cjs/biz-components/ShelfDisplay/shelfDisplay.js +1 -1
- package/dist/cjs/biz-components/ShelfDisplay/shelfDisplay.js.map +3 -3
- package/dist/cjs/biz-components/ShelfDisplay/shelfDisplayItem.js +1 -1
- package/dist/cjs/biz-components/ShelfDisplay/shelfDisplayItem.js.map +3 -3
- package/dist/cjs/biz-components/Specs/index.js +1 -1
- package/dist/cjs/biz-components/Specs/index.js.map +3 -3
- package/dist/cjs/biz-components/Subscribe/index.js +1 -1
- package/dist/cjs/biz-components/Subscribe/index.js.map +2 -2
- package/dist/cjs/biz-components/SwiperBox/index.js +1 -1
- package/dist/cjs/biz-components/SwiperBox/index.js.map +3 -3
- package/dist/cjs/biz-components/Tabs/Tabs.js +1 -1
- package/dist/cjs/biz-components/Tabs/Tabs.js.map +3 -3
- package/dist/cjs/biz-components/Tabs/types.d.ts +3 -0
- package/dist/cjs/biz-components/Tabs/types.js +1 -1
- package/dist/cjs/biz-components/Tabs/types.js.map +1 -1
- package/dist/cjs/biz-components/TabsWithMedia/TabsWithMedia.js +1 -1
- package/dist/cjs/biz-components/TabsWithMedia/TabsWithMedia.js.map +3 -3
- package/dist/cjs/biz-components/ThreeDCarousel/ThreeDCarousel.js +1 -1
- package/dist/cjs/biz-components/ThreeDCarousel/ThreeDCarousel.js.map +3 -3
- package/dist/cjs/biz-components/Title/index.js +1 -1
- package/dist/cjs/biz-components/Title/index.js.map +3 -3
- package/dist/cjs/biz-components/VideoModal/index.d.ts +1 -0
- package/dist/cjs/biz-components/VideoModal/index.js +1 -1
- package/dist/cjs/biz-components/VideoModal/index.js.map +3 -3
- package/dist/cjs/biz-components/WheelLottery/index.js +1 -1
- package/dist/cjs/biz-components/WheelLottery/index.js.map +3 -3
- package/dist/cjs/components/Countdown.js +1 -1
- package/dist/cjs/components/Countdown.js.map +3 -3
- package/dist/cjs/components/alert.d.ts +1 -0
- package/dist/cjs/components/alert.js +1 -1
- package/dist/cjs/components/alert.js.map +2 -2
- package/dist/cjs/components/badge.js +1 -1
- package/dist/cjs/components/badge.js.map +2 -2
- package/dist/cjs/components/checkbox.js +1 -1
- package/dist/cjs/components/checkbox.js.map +2 -2
- package/dist/cjs/components/dialog.js +1 -1
- package/dist/cjs/components/dialog.js.map +3 -3
- package/dist/cjs/components/index.d.ts +1 -0
- package/dist/cjs/components/index.js +1 -1
- package/dist/cjs/components/index.js.map +3 -3
- package/dist/cjs/components/link.js +1 -1
- package/dist/cjs/components/link.js.map +2 -2
- package/dist/cjs/components/otp-input.d.ts +18 -0
- package/dist/cjs/components/otp-input.js +2 -0
- package/dist/cjs/components/otp-input.js.map +7 -0
- package/dist/cjs/components/tabs.js +1 -1
- package/dist/cjs/components/tabs.js.map +2 -2
- package/dist/cjs/helpers/index.d.ts +1 -1
- package/dist/cjs/helpers/index.js +1 -1
- package/dist/cjs/helpers/index.js.map +2 -2
- package/dist/cjs/helpers/isLexicalEmpty.d.ts +5 -0
- package/dist/cjs/helpers/isLexicalEmpty.js +1 -1
- package/dist/cjs/helpers/isLexicalEmpty.js.map +3 -3
- package/dist/cjs/hooks/useIsomorphicMediaQuery.d.ts +14 -0
- package/dist/cjs/hooks/useIsomorphicMediaQuery.js +2 -0
- package/dist/cjs/hooks/useIsomorphicMediaQuery.js.map +7 -0
- package/dist/cjs/hooks/useProductListTrack.d.ts +43 -0
- package/dist/cjs/hooks/useProductListTrack.js +2 -0
- package/dist/cjs/hooks/useProductListTrack.js.map +7 -0
- package/dist/esm/biz-components/AccordionCards/index.js +1 -1
- package/dist/esm/biz-components/AccordionCards/index.js.map +3 -3
- package/dist/esm/biz-components/ActiveShelf/ProductCard.d.ts +1 -1
- package/dist/esm/biz-components/ActiveShelf/ProductCard.js +1 -1
- package/dist/esm/biz-components/ActiveShelf/ProductCard.js.map +2 -2
- package/dist/esm/biz-components/ActivityMechanism/index.js +1 -1
- package/dist/esm/biz-components/ActivityMechanism/index.js.map +3 -3
- package/dist/esm/biz-components/ActivitySchedule/index.js +1 -1
- package/dist/esm/biz-components/ActivitySchedule/index.js.map +3 -3
- package/dist/esm/biz-components/AiuiProvider/index.js +1 -1
- package/dist/esm/biz-components/AiuiProvider/index.js.map +3 -3
- package/dist/esm/biz-components/AnchorNavigation/index.js +1 -1
- package/dist/esm/biz-components/AnchorNavigation/index.js.map +3 -3
- package/dist/esm/biz-components/BrandCardLink/BrandCardLink.js +1 -1
- package/dist/esm/biz-components/BrandCardLink/BrandCardLink.js.map +3 -3
- package/dist/esm/biz-components/BrandEquity/BrandEquity.js +1 -1
- package/dist/esm/biz-components/BrandEquity/BrandEquity.js.map +3 -3
- package/dist/esm/biz-components/BuyOneGetOneShelf/PriceAndActions.d.ts +2 -14
- package/dist/esm/biz-components/BuyOneGetOneShelf/PriceAndActions.js +1 -1
- package/dist/esm/biz-components/BuyOneGetOneShelf/PriceAndActions.js.map +3 -3
- package/dist/esm/biz-components/BuyOneGetOneShelf/ProductCard.d.ts +1 -1
- package/dist/esm/biz-components/BuyOneGetOneShelf/ProductCard.js +1 -1
- package/dist/esm/biz-components/BuyOneGetOneShelf/ProductCard.js.map +3 -3
- package/dist/esm/biz-components/BuyOneGetOneShelf/context.d.ts +4 -0
- package/dist/esm/biz-components/BuyOneGetOneShelf/context.js +2 -0
- package/dist/esm/biz-components/BuyOneGetOneShelf/context.js.map +7 -0
- package/dist/esm/biz-components/BuyOneGetOneShelf/types.d.ts +2 -2
- package/dist/esm/biz-components/BuyOneGetOneShelf/types.js.map +1 -1
- package/dist/esm/biz-components/Category/SwiperCategory.js +1 -1
- package/dist/esm/biz-components/Category/SwiperCategory.js.map +3 -3
- package/dist/esm/biz-components/Category/index.js +1 -1
- package/dist/esm/biz-components/Category/index.js.map +3 -3
- package/dist/esm/biz-components/CreditsShelf/ProductCard.js +1 -1
- package/dist/esm/biz-components/CreditsShelf/ProductCard.js.map +2 -2
- package/dist/esm/biz-components/CreditsShelf/types.d.ts +1 -1
- package/dist/esm/biz-components/Evaluate/index.js +1 -1
- package/dist/esm/biz-components/Evaluate/index.js.map +3 -3
- package/dist/esm/biz-components/EventSchedule/index.js +1 -1
- package/dist/esm/biz-components/EventSchedule/index.js.map +3 -3
- package/dist/esm/biz-components/FeatureCards/FeatureCards.js +1 -1
- package/dist/esm/biz-components/FeatureCards/FeatureCards.js.map +3 -3
- package/dist/esm/biz-components/FeaturedBlogPosts/index.js +1 -1
- package/dist/esm/biz-components/FeaturedBlogPosts/index.js.map +2 -2
- package/dist/esm/biz-components/FooterNavigation/index.js +1 -1
- package/dist/esm/biz-components/FooterNavigation/index.js.map +3 -3
- package/dist/esm/biz-components/GiftShelf/index.js +1 -1
- package/dist/esm/biz-components/GiftShelf/index.js.map +2 -2
- package/dist/esm/biz-components/Graphic/index.js +1 -1
- package/dist/esm/biz-components/Graphic/index.js.map +3 -3
- package/dist/esm/biz-components/GraphicOverlay/GraphicOverlay.d.ts +2 -2
- package/dist/esm/biz-components/GraphicOverlay/GraphicOverlay.js +1 -1
- package/dist/esm/biz-components/GraphicOverlay/GraphicOverlay.js.map +3 -3
- package/dist/esm/biz-components/HeaderNavigation/MobileTextLinksMenu.d.ts +12 -0
- package/dist/esm/biz-components/HeaderNavigation/MobileTextLinksMenu.js +2 -0
- package/dist/esm/biz-components/HeaderNavigation/MobileTextLinksMenu.js.map +7 -0
- package/dist/esm/biz-components/HeaderNavigation/TextLinksDropdown.d.ts +10 -0
- package/dist/esm/biz-components/HeaderNavigation/TextLinksDropdown.js +2 -0
- package/dist/esm/biz-components/HeaderNavigation/TextLinksDropdown.js.map +7 -0
- package/dist/esm/biz-components/HeaderNavigation/index.js +1 -1
- package/dist/esm/biz-components/HeaderNavigation/index.js.map +3 -3
- package/dist/esm/biz-components/HeaderNavigation/types.d.ts +8 -1
- package/dist/esm/biz-components/HeaderNavigation/types.js +1 -1
- package/dist/esm/biz-components/HeaderNavigation/types.js.map +2 -2
- package/dist/esm/biz-components/HeaderNavigation/withCategory.d.ts +1 -0
- package/dist/esm/biz-components/HeaderNavigation/withCategory.js +1 -1
- package/dist/esm/biz-components/HeaderNavigation/withCategory.js.map +3 -3
- package/dist/esm/biz-components/HeroBanner/HeroBanner.js +1 -1
- package/dist/esm/biz-components/HeroBanner/HeroBanner.js.map +3 -3
- package/dist/esm/biz-components/HeroBanner/HeroBannerCarousel.js +1 -1
- package/dist/esm/biz-components/HeroBanner/HeroBannerCarousel.js.map +3 -3
- package/dist/esm/biz-components/ImageOverlayShelf/ProductCard.js +1 -1
- package/dist/esm/biz-components/ImageOverlayShelf/ProductCard.js.map +1 -1
- package/dist/esm/biz-components/ImageOverlayShelf/index.d.ts +11 -3
- package/dist/esm/biz-components/ImageOverlayShelf/index.js +1 -1
- package/dist/esm/biz-components/ImageOverlayShelf/index.js.map +3 -3
- package/dist/esm/biz-components/ImageOverlayShelf/types.d.ts +11 -0
- package/dist/esm/biz-components/ImageTextOverlay/index.js +2 -2
- package/dist/esm/biz-components/ImageTextOverlay/index.js.map +3 -3
- package/dist/esm/biz-components/ImageWithText/ImageWithText.js +1 -1
- package/dist/esm/biz-components/ImageWithText/ImageWithText.js.map +3 -3
- package/dist/esm/biz-components/Ksp/index.js +1 -1
- package/dist/esm/biz-components/Ksp/index.js.map +3 -3
- package/dist/esm/biz-components/LotteryShared/ErrorModal.d.ts +4 -0
- package/dist/esm/biz-components/LotteryShared/ErrorModal.js.map +2 -2
- package/dist/esm/biz-components/LotteryShared/MyRewardsModal.d.ts +13 -13
- package/dist/esm/biz-components/LotteryShared/MyRewardsModal.js +1 -1
- package/dist/esm/biz-components/LotteryShared/MyRewardsModal.js.map +3 -3
- package/dist/esm/biz-components/LotteryShared/types.d.ts +9 -0
- package/dist/esm/biz-components/LotteryShared/types.js.map +2 -2
- package/dist/esm/biz-components/Media/index.js +1 -1
- package/dist/esm/biz-components/Media/index.js.map +3 -3
- package/dist/esm/biz-components/MediaEndorsement/index.js +2 -2
- package/dist/esm/biz-components/MediaEndorsement/index.js.map +3 -3
- package/dist/esm/biz-components/MediaPlayerBase/index.js +1 -1
- package/dist/esm/biz-components/MediaPlayerBase/index.js.map +3 -3
- package/dist/esm/biz-components/MediaPlayerMulti/index.js +1 -1
- package/dist/esm/biz-components/MediaPlayerMulti/index.js.map +3 -3
- package/dist/esm/biz-components/MediaPlayerSticky/index.js +1 -1
- package/dist/esm/biz-components/MediaPlayerSticky/index.js.map +3 -3
- package/dist/esm/biz-components/MediaSceneSwitcher/MediaSceneSwitcher.js +2 -2
- package/dist/esm/biz-components/MediaSceneSwitcher/MediaSceneSwitcher.js.map +3 -3
- package/dist/esm/biz-components/MediaSceneSwitcherV2/index.js +1 -1
- package/dist/esm/biz-components/MediaSceneSwitcherV2/index.js.map +3 -3
- package/dist/esm/biz-components/MediaShelf/ProductCard.js +1 -1
- package/dist/esm/biz-components/MediaShelf/ProductCard.js.map +2 -2
- package/dist/esm/biz-components/MediaShelf/types.d.ts +1 -1
- package/dist/esm/biz-components/MediaShelf/types.js.map +1 -1
- package/dist/esm/biz-components/MediaTextOverlay/MediaTextOverlay.js +1 -1
- package/dist/esm/biz-components/MediaTextOverlay/MediaTextOverlay.js.map +3 -3
- package/dist/esm/biz-components/MemberEquity/index.js +2 -2
- package/dist/esm/biz-components/MemberEquity/index.js.map +3 -3
- package/dist/esm/biz-components/MultiLayoutGraphicBlock/MultiLayoutGraphicBlock.d.ts +4 -2
- package/dist/esm/biz-components/MultiLayoutGraphicBlock/MultiLayoutGraphicBlock.js +1 -1
- package/dist/esm/biz-components/MultiLayoutGraphicBlock/MultiLayoutGraphicBlock.js.map +3 -3
- package/dist/esm/biz-components/MultiLayoutGraphicBlock/MultiLayoutGraphicBlockCarousel.d.ts +22 -0
- package/dist/esm/biz-components/MultiLayoutGraphicBlock/MultiLayoutGraphicBlockCarousel.js +2 -0
- package/dist/esm/biz-components/MultiLayoutGraphicBlock/MultiLayoutGraphicBlockCarousel.js.map +7 -0
- package/dist/esm/biz-components/MultiLayoutGraphicBlock/types.d.ts +18 -0
- package/dist/esm/biz-components/NavigationSearch/index.js +2 -2
- package/dist/esm/biz-components/NavigationSearch/index.js.map +3 -3
- package/dist/esm/biz-components/ProductCompare/index.js +1 -1
- package/dist/esm/biz-components/ProductCompare/index.js.map +2 -2
- package/dist/esm/biz-components/ProductHero/ProductHero.js +1 -1
- package/dist/esm/biz-components/ProductHero/ProductHero.js.map +3 -3
- package/dist/esm/biz-components/ProductLottery/types.d.ts +62 -5
- package/dist/esm/biz-components/ProductLottery/types.js.map +2 -2
- package/dist/esm/biz-components/ProductNav/ProductNav.js +1 -1
- package/dist/esm/biz-components/ProductNav/ProductNav.js.map +3 -3
- package/dist/esm/biz-components/PromotionalBar/index.js +1 -1
- package/dist/esm/biz-components/PromotionalBar/index.js.map +3 -3
- package/dist/esm/biz-components/SceneShelfV3/ProductCard.d.ts +1 -1
- package/dist/esm/biz-components/SceneShelfV3/ProductCard.js +1 -1
- package/dist/esm/biz-components/SceneShelfV3/ProductCard.js.map +2 -2
- package/dist/esm/biz-components/SecondaryBanner/index.js +1 -1
- package/dist/esm/biz-components/SecondaryBanner/index.js.map +2 -2
- package/dist/esm/biz-components/ShelfDisplay/index.js +1 -1
- package/dist/esm/biz-components/ShelfDisplay/index.js.map +3 -3
- package/dist/esm/biz-components/ShelfDisplay/shelfDisplay.d.ts +11 -1
- package/dist/esm/biz-components/ShelfDisplay/shelfDisplay.js +1 -1
- package/dist/esm/biz-components/ShelfDisplay/shelfDisplay.js.map +3 -3
- package/dist/esm/biz-components/ShelfDisplay/shelfDisplayItem.js +1 -1
- package/dist/esm/biz-components/ShelfDisplay/shelfDisplayItem.js.map +3 -3
- package/dist/esm/biz-components/Specs/index.js +1 -1
- package/dist/esm/biz-components/Specs/index.js.map +3 -3
- package/dist/esm/biz-components/Subscribe/index.js +1 -1
- package/dist/esm/biz-components/Subscribe/index.js.map +2 -2
- package/dist/esm/biz-components/SwiperBox/index.js +1 -1
- package/dist/esm/biz-components/SwiperBox/index.js.map +3 -3
- package/dist/esm/biz-components/Tabs/Tabs.js +1 -1
- package/dist/esm/biz-components/Tabs/Tabs.js.map +3 -3
- package/dist/esm/biz-components/Tabs/types.d.ts +3 -0
- package/dist/esm/biz-components/TabsWithMedia/TabsWithMedia.js +1 -1
- package/dist/esm/biz-components/TabsWithMedia/TabsWithMedia.js.map +3 -3
- package/dist/esm/biz-components/ThreeDCarousel/ThreeDCarousel.js +1 -1
- package/dist/esm/biz-components/ThreeDCarousel/ThreeDCarousel.js.map +3 -3
- package/dist/esm/biz-components/Title/index.js +1 -1
- package/dist/esm/biz-components/Title/index.js.map +3 -3
- package/dist/esm/biz-components/VideoModal/index.d.ts +1 -0
- package/dist/esm/biz-components/VideoModal/index.js +1 -1
- package/dist/esm/biz-components/VideoModal/index.js.map +3 -3
- package/dist/esm/biz-components/WheelLottery/index.js +1 -1
- package/dist/esm/biz-components/WheelLottery/index.js.map +2 -2
- package/dist/esm/components/Countdown.js +1 -1
- package/dist/esm/components/Countdown.js.map +3 -3
- package/dist/esm/components/alert.d.ts +1 -0
- package/dist/esm/components/alert.js +1 -1
- package/dist/esm/components/alert.js.map +2 -2
- package/dist/esm/components/badge.js +1 -1
- package/dist/esm/components/badge.js.map +2 -2
- package/dist/esm/components/checkbox.js +1 -1
- package/dist/esm/components/checkbox.js.map +2 -2
- package/dist/esm/components/dialog.js +1 -1
- package/dist/esm/components/dialog.js.map +3 -3
- package/dist/esm/components/index.d.ts +1 -0
- package/dist/esm/components/index.js +1 -1
- package/dist/esm/components/index.js.map +2 -2
- package/dist/esm/components/link.js +1 -1
- package/dist/esm/components/link.js.map +2 -2
- package/dist/esm/components/otp-input.d.ts +18 -0
- package/dist/esm/components/otp-input.js +2 -0
- package/dist/esm/components/otp-input.js.map +7 -0
- package/dist/esm/components/tabs.js +1 -1
- package/dist/esm/components/tabs.js.map +2 -2
- package/dist/esm/helpers/index.d.ts +1 -1
- package/dist/esm/helpers/index.js +1 -1
- package/dist/esm/helpers/index.js.map +3 -3
- package/dist/esm/helpers/isLexicalEmpty.d.ts +5 -0
- package/dist/esm/helpers/isLexicalEmpty.js +1 -1
- package/dist/esm/helpers/isLexicalEmpty.js.map +3 -3
- package/dist/esm/hooks/useIsomorphicMediaQuery.d.ts +14 -0
- package/dist/esm/hooks/useIsomorphicMediaQuery.js +2 -0
- package/dist/esm/hooks/useIsomorphicMediaQuery.js.map +7 -0
- package/dist/esm/hooks/useProductListTrack.d.ts +43 -0
- package/dist/esm/hooks/useProductListTrack.js +2 -0
- package/dist/esm/hooks/useProductListTrack.js.map +7 -0
- package/dist/tokens/eufyMake.css +3 -2
- package/package.json +1 -1
- package/style.css +101 -13
- package/tailwind.config.js +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/biz-components/HeaderNavigation/types.ts"],
|
|
4
|
-
"sourcesContent": ["import type React from 'react'\nimport type { Product } from '../../cpn-components/CpnProductCard/types.js'\n\nexport interface HeaderNavigationProps extends Omit<React.HTMLAttributes<HTMLElement>, 'className'> {\n data: any\n menuData: any\n onPrimaryNavClick?: (_category: any, _position: number) => void\n onSidebarNavClick?: (_series: any, _index: number) => void\n onSeriesProductClick?: (_product: any, _position: number, _seriesLabel?: string) => void\n searchResult?: any\n onSearch?: (_value?: string) => void\n isSearching?: boolean\n keywords?: {\n search_term: string\n search_date: string\n shopify_domain: string\n counts: number\n }[]\n headerId?: string\n cartCount: number\n event?: {\n search?: () => void\n cart?: () => void\n profile?: () => void\n livestream?: () => void\n join?: () => void\n login?: () => void\n }\n buildProps: {\n products?: Product[]\n categories?: Record<string, any>\n }\n profile?: UserProfile // \u7528\u6237\u4FE1\u606F\n theme?: string\n isTop?: boolean // \u662F\u5426\u5728\u9876\u90E8\n}\n\nexport interface MobilePrimaryNavigationData {\n actions: any\n menuOpen?: boolean\n onMenuOpenClick: () => void\n onMenuOpenClose: () => void\n}\n\nexport interface MobileSecondaryNavigationData {\n title?: string\n onMenuOpenClose: () => void\n onMenuBackClick: () => void\n}\n\nexport enum HeaderNavigationMenu {\n Primary = 'primary',\n Secondary = 'secondary',\n Third = 'third',\n}\n\nexport enum HeaderNavigationBlockType {\n Sidebar = 'ipc-navigation-sidebar',\n Supports = 'ipc-navigation-supports',\n Multicol = 'ipc-navigation-multicol',\n Links = 'ipc-navigation-links',\n Resource = 'ipc-navigation-resource',\n}\n\nexport enum HeaderNavigationActionBlockType {\n Search = 'ipc-navigation-action-search',\n Cart = 'ipc-navigation-action-cart',\n Profile = 'ipc-navigation-action-profile',\n Livestream = 'ipc-navigation-action-livestream',\n}\n\nexport interface MobileNavigationProps {\n data: any\n menuData: any\n className?: string\n onPrimaryNavClick?: (_category: any, _position: number) => void\n}\n\nexport interface DesktopNavigationProps {\n data: any\n onNavItemClick?: () => void\n className?: string\n theme?: string\n onPrimaryNavClick?: (_category: any, _position: number) => void\n onSidebarNavClick?: (_series: any, _index: number, _subSubindex?: number) => void\n}\n\ntype Country = {\n id?: number\n name?: string\n code?: string\n}\n\nexport type UserProfile = {\n user_id: string\n email: string\n nick_name?: string\n full_name?: string\n first_name?: string\n last_name?: string\n dob?: string\n gender?: string\n phone_number?: string\n phone_account?: string\n country?: Country\n is_subscribe?: boolean\n avatar?: string\n can_change_password?: boolean\n invitation_code?: string\n phone_carrier?: string\n dob_programmed?: boolean\n activated?: boolean\n registed_at?: number\n activated_at?: number\n token?: string\n}\n"],
|
|
5
|
-
"mappings": "AAkDO,IAAKA,OACVA,EAAA,QAAU,UACVA,EAAA,UAAY,YACZA,EAAA,MAAQ,QAHEA,OAAA,IAMAC,OACVA,EAAA,QAAU,yBACVA,EAAA,SAAW,0BACXA,EAAA,SAAW,0BACXA,EAAA,MAAQ,uBACRA,EAAA,SAAW,
|
|
4
|
+
"sourcesContent": ["import type React from 'react'\nimport type { Product } from '../../cpn-components/CpnProductCard/types.js'\n\nexport interface HeaderNavigationProps extends Omit<React.HTMLAttributes<HTMLElement>, 'className'> {\n data: any\n menuData: any\n onPrimaryNavClick?: (_category: any, _position: number) => void\n onSidebarNavClick?: (_series: any, _index: number) => void\n onSeriesProductClick?: (_product: any, _position: number, _seriesLabel?: string) => void\n searchResult?: any\n onSearch?: (_value?: string) => void\n isSearching?: boolean\n keywords?: {\n search_term: string\n search_date: string\n shopify_domain: string\n counts: number\n }[]\n headerId?: string\n cartCount: number\n event?: {\n search?: () => void\n cart?: () => void\n profile?: () => void\n livestream?: () => void\n join?: () => void\n login?: () => void\n }\n buildProps: {\n products?: Product[]\n categories?: Record<string, any>\n }\n profile?: UserProfile // \u7528\u6237\u4FE1\u606F\n theme?: string\n isTop?: boolean // \u662F\u5426\u5728\u9876\u90E8\n}\n\nexport interface MobilePrimaryNavigationData {\n actions: any\n menuOpen?: boolean\n onMenuOpenClick: () => void\n onMenuOpenClose: () => void\n}\n\nexport interface MobileSecondaryNavigationData {\n title?: string\n onMenuOpenClose: () => void\n onMenuBackClick: () => void\n}\n\nexport enum HeaderNavigationMenu {\n Primary = 'primary',\n Secondary = 'secondary',\n Third = 'third',\n}\n\nexport enum HeaderNavigationBlockType {\n Sidebar = 'ipc-navigation-sidebar',\n Supports = 'ipc-navigation-supports',\n Multicol = 'ipc-navigation-multicol',\n Links = 'ipc-navigation-links',\n Resource = 'ipc-navigation-resource',\n TextLinks = 'ipc-navigation-textlinks',\n}\n\nexport enum HeaderNavigationActionBlockType {\n Search = 'ipc-navigation-action-search',\n Cart = 'ipc-navigation-action-cart',\n Profile = 'ipc-navigation-action-profile',\n Livestream = 'ipc-navigation-action-livestream',\n}\n\n/**\n * Search action \u7684\u6837\u5F0F\u6A21\u5F0F\n * - 'icon' \uFF08\u9ED8\u8BA4\uFF09\u88F8\u56FE\u6807\uFF0C\u4E0E\u5176\u4ED6 action \u5916\u89C2\u4E00\u81F4\n * - 'capsule' \u80F6\u56CA\u641C\u7D22\u6846\uFF0C\u5E26\u80CC\u666F\u8272\u548C\u56FA\u5B9A\u5BBD\u5EA6\n */\nexport type HeaderNavigationSearchStyle = 'icon' | 'capsule'\n\nexport interface MobileNavigationProps {\n data: any\n menuData: any\n className?: string\n onPrimaryNavClick?: (_category: any, _position: number) => void\n}\n\nexport interface DesktopNavigationProps {\n data: any\n onNavItemClick?: () => void\n className?: string\n theme?: string\n onPrimaryNavClick?: (_category: any, _position: number) => void\n onSidebarNavClick?: (_series: any, _index: number, _subSubindex?: number) => void\n}\n\ntype Country = {\n id?: number\n name?: string\n code?: string\n}\n\nexport type UserProfile = {\n user_id: string\n email: string\n nick_name?: string\n full_name?: string\n first_name?: string\n last_name?: string\n dob?: string\n gender?: string\n phone_number?: string\n phone_account?: string\n country?: Country\n is_subscribe?: boolean\n avatar?: string\n can_change_password?: boolean\n invitation_code?: string\n phone_carrier?: string\n dob_programmed?: boolean\n activated?: boolean\n registed_at?: number\n activated_at?: number\n token?: string\n}\n"],
|
|
5
|
+
"mappings": "AAkDO,IAAKA,OACVA,EAAA,QAAU,UACVA,EAAA,UAAY,YACZA,EAAA,MAAQ,QAHEA,OAAA,IAMAC,OACVA,EAAA,QAAU,yBACVA,EAAA,SAAW,0BACXA,EAAA,SAAW,0BACXA,EAAA,MAAQ,uBACRA,EAAA,SAAW,0BACXA,EAAA,UAAY,2BANFA,OAAA,IASAC,OACVA,EAAA,OAAS,+BACTA,EAAA,KAAO,6BACPA,EAAA,QAAU,gCACVA,EAAA,WAAa,mCAJHA,OAAA",
|
|
6
6
|
"names": ["HeaderNavigationMenu", "HeaderNavigationBlockType", "HeaderNavigationActionBlockType"]
|
|
7
7
|
}
|
|
@@ -8,3 +8,4 @@ export declare function WithSupports<P extends object>(WrappedComponent: React.C
|
|
|
8
8
|
export declare function WithMulticol<P extends object>(WrappedComponent: React.ComponentType<any>, categoriesItem: any): React.ForwardRefExoticComponent<React.PropsWithoutRef<P> & React.RefAttributes<any>>;
|
|
9
9
|
export declare function WithResource<P extends object>(WrappedComponent: React.ComponentType<any>, categoriesItem: any): React.ForwardRefExoticComponent<React.PropsWithoutRef<P> & React.RefAttributes<any>>;
|
|
10
10
|
export declare function WithGroupCategory(categories: any): unknown[];
|
|
11
|
+
export declare function WithTextLinks<P extends object>(WrappedComponent: React.ComponentType<any>, categoriesItem: any): React.ForwardRefExoticComponent<React.PropsWithoutRef<P> & React.RefAttributes<any>>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{jsx as
|
|
1
|
+
import{jsx as l}from"react/jsx-runtime";import c,{useMemo as u}from"react";function y(r,e){const n=u(()=>{let t=null;try{t=JSON.parse(e?.components?.[0]?.sidebar?.categoriesMetadata||"{}")}catch(a){console.log("categoriesMetadata Parse error",a)}return t},[e]),s=u(()=>{let t=null;try{t=JSON.parse(e?.components?.[0]?.sidebar?.seriesMetadata||"[]")}catch(a){console.log("seriesMetadata Parse error",a)}return t},[e]),o=c.forwardRef((t,a)=>l(r,{...t,ref:a,seriesMetadata:s,sidebarCategoriesMetadata:n}));return o.displayName=r.displayName||r.name||"WithSidebarDropdown",o}function p(r,{categoriesItem:e,currentNavItemRef:n}){const s=u(()=>e?.components?.[0]?.supports,[e]),o=c.forwardRef((t,a)=>l(r,{...t,supportsMetadata:s,currentNavItemRef:n,ref:a}));return o.displayName=r.displayName||r.name||"WithSupportsDropdown",o}function M(r,e){const n=e?.components?.[0]?.showStatsBanner,s=e?.components?.[0]?.statsBanner?.[0],o=u(()=>{try{return JSON.parse(e?.components?.[0]?.multicol?.multicolMetadata||"{}")}catch(a){console.log("multicolMetadata Parse error",a)}return null},[e]),t=c.forwardRef((a,d)=>l(r,{...a,ref:d,multicolMetadata:o,showStatsBanner:n,statsBannerData:s}));return t.displayName=r.displayName||r.name||"WithMulticolDropdown",t}function f(r,e){const n=u(()=>{let t=null;try{t=JSON.parse(e?.components?.[0]?.resource?.categoriesMetadata||"{}")}catch(a){console.log("resourceCategoriesMetadata Parse error",a)}return t},[e]),s=u(()=>{let t=null;try{t=JSON.parse(e?.components?.[0]?.resource?.resourceMetadata||"[]")}catch(a){console.log("resourcesMetadata Parse error",a)}return t},[e]),o=c.forwardRef((t,a)=>l(r,{...t,ref:a,resourcesMetadata:s,resourceCategoriesMetadata:n}));return o.displayName=r.displayName||r.name||"WithResourceDropdown",o}function w(r){return r?Object.values(r?.reduce((e,n)=>(e[n.group]||(e[n.group]=[]),e[n.group].push(n),e),{})):[[]]}function h(r,e){const n=u(()=>{let t=null;try{t=JSON.parse(e?.components?.[0]?.textlinks?.categoriesMetadata||"{}")}catch(a){console.log("textlinksCategoriesMetadata Parse error",a)}return t},[e]),s=u(()=>{let t=null;try{t=JSON.parse(e?.components?.[0]?.textlinks?.columnsMetadata||"[]")}catch(a){console.log("textlinksColumnsMetadata Parse error",a)}return t},[e]),o=c.forwardRef((t,a)=>l(r,{...t,ref:a,textlinksCategoriesMetadata:n,textlinksColumnsMetadata:s}));return o.displayName=r.displayName||r.name||"WithTextLinksDropdown",o}export{w as WithGroupCategory,M as WithMulticol,f as WithResource,y as WithSidebar,p as WithSupports,h as WithTextLinks};
|
|
2
2
|
//# sourceMappingURL=withCategory.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/biz-components/HeaderNavigation/withCategory.tsx"],
|
|
4
|
-
"sourcesContent": ["import React, { useMemo } from 'react'\n\nexport function WithSidebar<P extends object>(WrappedComponent: React.ComponentType<any>, categoriesItem: any) {\n // \u4FA7\u8FB9\u680F\u5206\u7C7B\u5143\u6570\u636E\n const sidebarCategoriesMetadata = useMemo(() => {\n let categoriesMetadata = null\n try {\n categoriesMetadata = JSON.parse(categoriesItem?.components?.[0]?.sidebar?.categoriesMetadata || '{}')\n } catch (error) {\n console.log('categoriesMetadata Parse error', error)\n }\n return categoriesMetadata\n }, [categoriesItem])\n\n // \u4FA7\u8FB9\u680F\u7CFB\u5217\u5143\u6570\u636E\n const seriesMetadata = useMemo(() => {\n let seriesMetadata = null\n try {\n seriesMetadata = JSON.parse(categoriesItem?.components?.[0]?.sidebar?.seriesMetadata || '[]')\n } catch (error) {\n console.log('seriesMetadata Parse error', error)\n }\n return seriesMetadata\n }, [categoriesItem])\n\n const withSidebarDropdown = React.forwardRef<any, P>((props, ref) => {\n return (\n <WrappedComponent\n {...(props as unknown as P)}\n ref={ref}\n seriesMetadata={seriesMetadata}\n sidebarCategoriesMetadata={sidebarCategoriesMetadata}\n />\n )\n })\n\n withSidebarDropdown.displayName = WrappedComponent.displayName || WrappedComponent.name || 'WithSidebarDropdown'\n return withSidebarDropdown\n}\n\nexport function WithSupports<P extends object>(\n WrappedComponent: React.ComponentType<any>,\n { categoriesItem, currentNavItemRef }: { categoriesItem: any; currentNavItemRef?: any; onMouseLeave?: () => void }\n) {\n const supportsMetadata = useMemo(() => {\n return categoriesItem?.components?.[0]?.supports\n }, [categoriesItem])\n\n const supportsDropdown = React.forwardRef<any, P>((props, ref) => {\n return (\n <WrappedComponent\n {...(props as unknown as P)}\n supportsMetadata={supportsMetadata}\n currentNavItemRef={currentNavItemRef}\n ref={ref}\n />\n )\n })\n\n supportsDropdown.displayName = WrappedComponent.displayName || WrappedComponent.name || 'WithSupportsDropdown'\n return supportsDropdown\n}\n\nexport function WithMulticol<P extends object>(WrappedComponent: React.ComponentType<any>, categoriesItem: any) {\n const showStatsBanner = categoriesItem?.components?.[0]?.showStatsBanner\n const statsBannerData = categoriesItem?.components?.[0]?.statsBanner?.[0]\n const multicolMetadata = useMemo(() => {\n try {\n return JSON.parse(categoriesItem?.components?.[0]?.multicol?.multicolMetadata || '{}')\n } catch (error) {\n console.log('multicolMetadata Parse error', error)\n }\n return null\n }, [categoriesItem])\n const multicolDropdown = React.forwardRef<any, P>((props, ref) => {\n return (\n <WrappedComponent\n {...(props as unknown as P)}\n ref={ref}\n multicolMetadata={multicolMetadata}\n showStatsBanner={showStatsBanner}\n statsBannerData={statsBannerData}\n />\n )\n })\n\n multicolDropdown.displayName = WrappedComponent.displayName || WrappedComponent.name || 'WithMulticolDropdown'\n return multicolDropdown\n}\n\nexport function WithResource<P extends object>(WrappedComponent: React.ComponentType<any>, categoriesItem: any) {\n // \u8D44\u6E90\u4F4D\u5206\u7C7B\u5143\u6570\u636E\n const resourceCategoriesMetadata = useMemo(() => {\n let categoriesMetadata = null\n try {\n categoriesMetadata = JSON.parse(categoriesItem?.components?.[0]?.resource?.categoriesMetadata || '{}')\n } catch (error) {\n console.log('resourceCategoriesMetadata Parse error', error)\n }\n return categoriesMetadata\n }, [categoriesItem])\n\n // \u8D44\u6E90\u4F4D\u5143\u6570\u636E\n const resourcesMetadata = useMemo(() => {\n let resourcesMetadata = null\n try {\n resourcesMetadata = JSON.parse(categoriesItem?.components?.[0]?.resource?.resourceMetadata || '[]')\n } catch (error) {\n console.log('resourcesMetadata Parse error', error)\n }\n return resourcesMetadata\n }, [categoriesItem])\n\n const withResourceDropdown = React.forwardRef<any, P>((props, ref) => {\n return (\n <WrappedComponent\n {...(props as unknown as P)}\n ref={ref}\n resourcesMetadata={resourcesMetadata}\n resourceCategoriesMetadata={resourceCategoriesMetadata}\n />\n )\n })\n\n withResourceDropdown.displayName = WrappedComponent.displayName || WrappedComponent.name || 'WithResourceDropdown'\n return withResourceDropdown\n}\n\nexport function WithGroupCategory(categories: any) {\n if (!categories) return [[]]\n return Object.values(\n categories?.reduce((acc: any, item: any) => {\n if (!acc[item.group]) {\n acc[item.group] = []\n }\n acc[item.group].push(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AASC,EAAkBC,EAAiB,CACjD,OAAKA,EACE,OAAO,OACZA,GAAY,OAAO,CAACC,EAAUC,KACvBD,EAAIC,EAAK,KAAK,IACjBD,EAAIC,EAAK,KAAK,EAAI,CAAC,GAErBD,EAAIC,EAAK,KAAK,EAAE,KAAKA,CAAI,EAClBD,GACN,CAAC,CAAC,CACP,EATwB,CAAC,CAAC,CAAC,CAU7B",
|
|
6
|
-
"names": ["jsx", "React", "useMemo", "WithSidebar", "WrappedComponent", "categoriesItem", "sidebarCategoriesMetadata", "categoriesMetadata", "error", "seriesMetadata", "withSidebarDropdown", "props", "ref", "WithSupports", "currentNavItemRef", "supportsMetadata", "supportsDropdown", "WithMulticol", "showStatsBanner", "statsBannerData", "multicolMetadata", "multicolDropdown", "WithResource", "resourceCategoriesMetadata", "resourcesMetadata", "withResourceDropdown", "WithGroupCategory", "categories", "acc", "item"]
|
|
4
|
+
"sourcesContent": ["import React, { useMemo } from 'react'\n\nexport function WithSidebar<P extends object>(WrappedComponent: React.ComponentType<any>, categoriesItem: any) {\n // \u4FA7\u8FB9\u680F\u5206\u7C7B\u5143\u6570\u636E\n const sidebarCategoriesMetadata = useMemo(() => {\n let categoriesMetadata = null\n try {\n categoriesMetadata = JSON.parse(categoriesItem?.components?.[0]?.sidebar?.categoriesMetadata || '{}')\n } catch (error) {\n console.log('categoriesMetadata Parse error', error)\n }\n return categoriesMetadata\n }, [categoriesItem])\n\n // \u4FA7\u8FB9\u680F\u7CFB\u5217\u5143\u6570\u636E\n const seriesMetadata = useMemo(() => {\n let seriesMetadata = null\n try {\n seriesMetadata = JSON.parse(categoriesItem?.components?.[0]?.sidebar?.seriesMetadata || '[]')\n } catch (error) {\n console.log('seriesMetadata Parse error', error)\n }\n return seriesMetadata\n }, [categoriesItem])\n\n const withSidebarDropdown = React.forwardRef<any, P>((props, ref) => {\n return (\n <WrappedComponent\n {...(props as unknown as P)}\n ref={ref}\n seriesMetadata={seriesMetadata}\n sidebarCategoriesMetadata={sidebarCategoriesMetadata}\n />\n )\n })\n\n withSidebarDropdown.displayName = WrappedComponent.displayName || WrappedComponent.name || 'WithSidebarDropdown'\n return withSidebarDropdown\n}\n\nexport function WithSupports<P extends object>(\n WrappedComponent: React.ComponentType<any>,\n { categoriesItem, currentNavItemRef }: { categoriesItem: any; currentNavItemRef?: any; onMouseLeave?: () => void }\n) {\n const supportsMetadata = useMemo(() => {\n return categoriesItem?.components?.[0]?.supports\n }, [categoriesItem])\n\n const supportsDropdown = React.forwardRef<any, P>((props, ref) => {\n return (\n <WrappedComponent\n {...(props as unknown as P)}\n supportsMetadata={supportsMetadata}\n currentNavItemRef={currentNavItemRef}\n ref={ref}\n />\n )\n })\n\n supportsDropdown.displayName = WrappedComponent.displayName || WrappedComponent.name || 'WithSupportsDropdown'\n return supportsDropdown\n}\n\nexport function WithMulticol<P extends object>(WrappedComponent: React.ComponentType<any>, categoriesItem: any) {\n const showStatsBanner = categoriesItem?.components?.[0]?.showStatsBanner\n const statsBannerData = categoriesItem?.components?.[0]?.statsBanner?.[0]\n const multicolMetadata = useMemo(() => {\n try {\n return JSON.parse(categoriesItem?.components?.[0]?.multicol?.multicolMetadata || '{}')\n } catch (error) {\n console.log('multicolMetadata Parse error', error)\n }\n return null\n }, [categoriesItem])\n const multicolDropdown = React.forwardRef<any, P>((props, ref) => {\n return (\n <WrappedComponent\n {...(props as unknown as P)}\n ref={ref}\n multicolMetadata={multicolMetadata}\n showStatsBanner={showStatsBanner}\n statsBannerData={statsBannerData}\n />\n )\n })\n\n multicolDropdown.displayName = WrappedComponent.displayName || WrappedComponent.name || 'WithMulticolDropdown'\n return multicolDropdown\n}\n\nexport function WithResource<P extends object>(WrappedComponent: React.ComponentType<any>, categoriesItem: any) {\n // \u8D44\u6E90\u4F4D\u5206\u7C7B\u5143\u6570\u636E\n const resourceCategoriesMetadata = useMemo(() => {\n let categoriesMetadata = null\n try {\n categoriesMetadata = JSON.parse(categoriesItem?.components?.[0]?.resource?.categoriesMetadata || '{}')\n } catch (error) {\n console.log('resourceCategoriesMetadata Parse error', error)\n }\n return categoriesMetadata\n }, [categoriesItem])\n\n // \u8D44\u6E90\u4F4D\u5143\u6570\u636E\n const resourcesMetadata = useMemo(() => {\n let resourcesMetadata = null\n try {\n resourcesMetadata = JSON.parse(categoriesItem?.components?.[0]?.resource?.resourceMetadata || '[]')\n } catch (error) {\n console.log('resourcesMetadata Parse error', error)\n }\n return resourcesMetadata\n }, [categoriesItem])\n\n const withResourceDropdown = React.forwardRef<any, P>((props, ref) => {\n return (\n <WrappedComponent\n {...(props as unknown as P)}\n ref={ref}\n resourcesMetadata={resourcesMetadata}\n resourceCategoriesMetadata={resourceCategoriesMetadata}\n />\n )\n })\n\n withResourceDropdown.displayName = WrappedComponent.displayName || WrappedComponent.name || 'WithResourceDropdown'\n return withResourceDropdown\n}\n\nexport function WithGroupCategory(categories: any) {\n if (!categories) return [[]]\n return Object.values(\n categories?.reduce((acc: any, item: any) => {\n if (!acc[item.group]) {\n acc[item.group] = []\n }\n acc[item.group].push(item)\n return acc\n }, {})\n )\n}\n\nexport function WithTextLinks<P extends object>(WrappedComponent: React.ComponentType<any>, categoriesItem: any) {\n // textlinks \u5206\u7C7B\u5143\u6570\u636E\uFF08\u5DE6\u4FA7\u6298\u53E0\u5BFC\u822A\uFF09\n const textlinksCategoriesMetadata = useMemo(() => {\n let categoriesMetadata = null\n try {\n categoriesMetadata = JSON.parse(categoriesItem?.components?.[0]?.textlinks?.categoriesMetadata || '{}')\n } catch (error) {\n console.log('textlinksCategoriesMetadata Parse error', error)\n }\n return categoriesMetadata\n }, [categoriesItem])\n\n // textlinks \u5217\u6570\u636E\uFF08\u53F3\u4FA7\u591A\u5217\u6587\u5B57\u94FE\u63A5\uFF09\n const textlinksColumnsMetadata = useMemo(() => {\n let columnsMetadata = null\n try {\n columnsMetadata = JSON.parse(categoriesItem?.components?.[0]?.textlinks?.columnsMetadata || '[]')\n } catch (error) {\n console.log('textlinksColumnsMetadata Parse error', error)\n }\n return columnsMetadata\n }, [categoriesItem])\n\n const withTextLinksDropdown = React.forwardRef<any, P>((props, ref) => {\n return (\n <WrappedComponent\n {...(props as unknown as P)}\n ref={ref}\n textlinksCategoriesMetadata={textlinksCategoriesMetadata}\n textlinksColumnsMetadata={textlinksColumnsMetadata}\n />\n )\n })\n\n withTextLinksDropdown.displayName = WrappedComponent.displayName || WrappedComponent.name || 'WithTextLinksDropdown'\n return withTextLinksDropdown\n}\n"],
|
|
5
|
+
"mappings": "AA2BM,cAAAA,MAAA,oBA3BN,OAAOC,GAAS,WAAAC,MAAe,QAExB,SAASC,EAA8BC,EAA4CC,EAAqB,CAE7G,MAAMC,EAA4BJ,EAAQ,IAAM,CAC9C,IAAIK,EAAqB,KACzB,GAAI,CACFA,EAAqB,KAAK,MAAMF,GAAgB,aAAa,CAAC,GAAG,SAAS,oBAAsB,IAAI,CACtG,OAASG,EAAO,CACd,QAAQ,IAAI,iCAAkCA,CAAK,CACrD,CACA,OAAOD,CACT,EAAG,CAACF,CAAc,CAAC,EAGbI,EAAiBP,EAAQ,IAAM,CACnC,IAAIO,EAAiB,KACrB,GAAI,CACFA,EAAiB,KAAK,MAAMJ,GAAgB,aAAa,CAAC,GAAG,SAAS,gBAAkB,IAAI,CAC9F,OAASG,EAAO,CACd,QAAQ,IAAI,6BAA8BA,CAAK,CACjD,CACA,OAAOC,CACT,EAAG,CAACJ,CAAc,CAAC,EAEbK,EAAsBT,EAAM,WAAmB,CAACU,EAAOC,IAEzDZ,EAACI,EAAA,CACE,GAAIO,EACL,IAAKC,EACL,eAAgBH,EAChB,0BAA2BH,EAC7B,CAEH,EAED,OAAAI,EAAoB,YAAcN,EAAiB,aAAeA,EAAiB,MAAQ,sBACpFM,CACT,CAEO,SAASG,EACdT,EACA,CAAE,eAAAC,EAAgB,kBAAAS,CAAkB,EACpC,CACA,MAAMC,EAAmBb,EAAQ,IACxBG,GAAgB,aAAa,CAAC,GAAG,SACvC,CAACA,CAAc,CAAC,EAEbW,EAAmBf,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|
6
|
+
"names": ["jsx", "React", "useMemo", "WithSidebar", "WrappedComponent", "categoriesItem", "sidebarCategoriesMetadata", "categoriesMetadata", "error", "seriesMetadata", "withSidebarDropdown", "props", "ref", "WithSupports", "currentNavItemRef", "supportsMetadata", "supportsDropdown", "WithMulticol", "showStatsBanner", "statsBannerData", "multicolMetadata", "multicolDropdown", "WithResource", "resourceCategoriesMetadata", "resourcesMetadata", "withResourceDropdown", "WithGroupCategory", "categories", "acc", "item", "WithTextLinks", "textlinksCategoriesMetadata", "textlinksColumnsMetadata", "columnsMetadata", "withTextLinksDropdown"]
|
|
7
7
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use client";import{Fragment as _e,jsx as e,jsxs as d}from"react/jsx-runtime";import re,{useImperativeHandle as ke,useRef as v,useState as we,useEffect as $e}from"react";import B from"gsap";import{ScrollTrigger as N}from"gsap/dist/ScrollTrigger";import M from"jump.js";import{
|
|
1
|
+
"use client";import{Fragment as _e,jsx as e,jsxs as d}from"react/jsx-runtime";import re,{useImperativeHandle as ke,useRef as v,useState as we,useEffect as $e}from"react";import B from"gsap";import{ScrollTrigger as N}from"gsap/dist/ScrollTrigger";import M from"jump.js";import{useIsomorphicMediaQuery as oe}from"../../hooks/useIsomorphicMediaQuery.js";import{useInView as Be}from"react-intersection-observer";import Ne from"../../helpers/ScrollLoadVideo.js";import{Button as T,Heading as Te,Picture as R,Text as D,Countdown as Ve}from"../../components/index.js";import{cn as p}from"../../helpers/index.js";import{cva as V}from"class-variance-authority";import{withLayout as He}from"../../shared/Styles.js";import{useExposure as ze}from"../../hooks/useExposure.js";import{trackUrlRef as H}from"../../shared/trackUrlRef.js";import{getLocalizedPath as Ce}from"../../helpers/utils.js";import{useAiuiContext as Le}from"../AiuiProvider/index.js";import{sizeMap as Ie}from"../../components/button.js";import{VideoModal as Pe}from"../VideoModal/index.js";import Se from"./HeroBannerCarousel.js";const c="image",m="hero_banner",Ee=V("hero-banner-content lg-desktop:gap-[32px] absolute top-24 z-10 flex w-full flex-col gap-[24px]",{variants:{align:{left:"tablet:px-[32px] laptop:top-1/2 laptop:px-[64px] lg-desktop:px-[calc(50%-832px)] laptop:-translate-y-1/2 left-0 px-[16px]",center:"tablet:top-[84px] laptop:top-[76px] desktop:top-[176px] lg-desktop:top-[192px] left-1/2 top-[84px] -translate-x-1/2 translate-y-0 items-center text-center"}},defaultVariants:{align:"left"}}),Me=V("hero-banner-wrap-text lg-desktop:max-w-[824px] desktop:max-w-[648px] laptop:max-w-[440px] tablet:max-w-[704px] max-w-[358px]",{variants:{align:{left:"laptop:text-left",center:"text-center"}},defaultVariants:{align:"left"}}),Re=V("hero-banner-button-group lg-desktop:gap-x-3 flex flex-wrap items-center gap-x-2 gap-y-3",{variants:{align:{left:"laptop:justify-start",center:"justify-center"}},defaultVariants:{align:"left"}}),De=V("hero-banner-icon-group flex items-center gap-2",{variants:{align:{left:"justify-start",center:"justify-center"}},defaultVariants:{align:"left"}}),je=({size:i="base"})=>{const{width:k,height:u}=Ie[i];return e("svg",{width:k,height:u,viewBox:"0 0 20 20",fill:"currentcolor",xmlns:"http://www.w3.org/2000/svg",children:e("path",{d:"M13.9599 9.30662C14.4547 9.63647 14.4547 10.3635 13.9599 10.6934L6.29558 15.8029C5.74179 16.1721 5 15.7751 5 15.1096V4.89042C5 4.22484 5.74179 3.82785 6.29558 4.19705L13.9599 9.30662Z",fill:"currentcolor"})})},ne=re.forwardRef(({data:i,className:k,classNames:u={},onSecondaryClick:j,onPrimaryClick:_,onTertiaryClick:A,jumpOptions:le={},...O},U)=>{const{locale:q}=Le(),z={...{duration:500,offset:0},...le},w=t=>!t||!q?t:Ce(t,q),{label:G,title:o,subtitle:r,endDate:J,endDate_tz:se,dateFormat:ie,pcImage:g,padImage:F,mobileImage:$,pcVideo:pe,padVideo:ue,mobileVideo:W,isShowVideo:ce,isVideoLoop:me=!0,primaryButton:n,secondaryButton:a,tertiaryButton:l,theme:de="light",size:C="default",titleSize:L,caption:Y=[],blockLink:Q,iconArray:Z,align:b="left",enableParallax:K=!0}=i,I=Array.isArray(Y)?Y:[],fe=Array.isArray(Z)?Z:void 0,ge=oe({query:"(max-width: 768px)"}),be=oe({query:"(max-width: 1024px)"}),[X,ee]=we(!1),{ref:xe,inView:te}=Be(),P=v(null),S=v(null),E=v(null),x=v(null),f=v(null),ye=o?.trim()||r?.trim()||g?.alt?.trim()||void 0,he=o!==void 0?o?.trim()||r?.trim()||g?.alt?.trim()||void 0:r&&r.trim()||"",ve=r&&r.trim()||"";return ze(f,{componentType:c,componentName:m,componentTitle:he,componentDescription:ve}),ke(U,()=>f.current),$e(()=>{if(i.items&&i.items.length>0||!K)return;B.registerPlugin(N);function t(){if(!x.current)return;const s=f.current?.clientHeight||100;window.innerHeight<=s?P.current=N.create({trigger:f.current,start:"top bottom",end:"bottom top",scrub:!0,onUpdate:y=>{const h=y.progress*40-20;B.set(x.current,{yPercent:h})}}):(E.current=N.create({trigger:f.current,start:"top bottom",end:"bottom bottom",scrub:!0,onUpdate:y=>{const h=y.progress*20-20;B.set(x.current,{yPercent:h})}}),S.current=N.create({trigger:f.current,start:"top top",end:"bottom top",scrub:!0,onUpdate:y=>{const h=y.progress*20;B.set(x.current,{yPercent:h})}}))}return te&&t(),()=>{P.current&&P.current.kill(),E.current&&E.current.kill(),S.current&&S.current.kill()}},[te,i.items,K]),i.items&&i.items.length>0?e(Se,{data:i,className:k,classNames:u,onPrimaryClick:_,onSecondaryClick:j,onTertiaryClick:A,ref:U,...O}):e("div",{...O,ref:xe,"data-ui-component-id":"HeroBanner",children:d("div",{ref:f,className:p(de==="dark"?"aiui-dark":"","text-info-primary relative w-full overflow-hidden",{"lg-desktop:aspect-[1920/930] desktop:aspect-[1440/700] laptop:aspect-[1024/520] tablet:aspect-[768/660] aspect-[390/660]":C==="default","lg-desktop:aspect-[1920/800] desktop:aspect-[1440/640] laptop:aspect-[1024/480] tablet:aspect-[768/560] aspect-[390/560]":C==="sm"},k),children:[Q&&e("a",{className:"absolute inset-0 z-10",href:H(w(Q),`${c}_${m}`),"data-headless-type-name":`${c}#${m}`,"data-headless-title-desc-button":`${o}#${r}`,tabIndex:-1,"aria-hidden":"true","aria-label":ye}),e("div",{ref:x,className:p("absolute left-0 top-0 size-full"),children:ce?d(_e,{children:[e("div",{"data-video-poster":"true",className:"laptop:w-full absolute inset-0 h-full transition-opacity duration-500",children:e(R,{className:"absolute inset-0 size-full",imgClassName:"size-full object-cover",loading:"eager",fetchPriority:"high",alt:g?.alt||"",source:`${g?.url||""} , ${F?.url??($?.url||"")} 1024, ${$?.url||""} 767`})}),e(Ne,{poster:void 0,src:ge?W?.url:be?ue?.url||W?.url:pe?.url,className:"laptop:w-full absolute inset-0 h-full",videoClassName:"h-full object-cover",muted:!0,loop:me,playsInline:!0,onPlaying:t=>{t.currentTarget.closest('[data-ui-component-id="HeroBanner"]')?.querySelector('[data-video-poster="true"]')?.classList.add("opacity-0")}})]}):e(R,{className:"laptop:w-full h-full",imgClassName:"h-full object-cover",loading:"eager",fetchPriority:"high",alt:g?.alt||"",source:`${g?.url||""} , ${F?.url??($?.url||"")} 1024, ${$?.url||""} 767`})}),d("div",{className:Ee({align:b}),children:[d("div",{className:Me({align:b}),children:[G&&e(D,{size:2,as:"p",className:p("hero-banner-label font-heading lg-desktop:text-[18px] desktop:text-base text-sm"),html:G}),o&&e(Te,{as:L==="4"?"h1":"h2",html:o,className:p("hero-banner-title",u.title),size:L?Number(L||"5"):C==="sm"?4:5}),r&&e(D,{as:"p",size:2,className:p("hero-banner-subtitle font-heading lg-desktop:text-[18px] desktop:text-base laptop:mt-2 lg-desktop:mt-4 mt-1 text-sm",u.subtitle),html:r}),J&&e("div",{className:"mt-3",children:e(Ve,{endDate:J,endDate_tz:se,dateFormat:ie,variant:"spacious",align:b})})]}),d("div",{className:p(Re({align:b}),u.buttonGroup),children:[d("div",{className:"lg-desktop:gap-3 flex items-center gap-2",children:[a?.isShowPlayVideoButton&&a?.playVideoButtonText?d(T,{onClick:()=>ee(!0),size:"lg",variant:"secondary",className:"hero-banner-play-video-button","data-headless-type-name":`${c}#${m}`,"data-headless-title-desc-button":`${o}#${r}#${a?.playVideoButtonText}`,children:[a?.playVideoButtonText," ",e(je,{size:"lg"})]}):a?.text?d(T,{"aria-label":o??r,size:"lg",variant:"secondary",className:p("hero-banner-secondary-button",u.secondaryButton),as:a?.isCustomSecondaryButton?"button":"a",href:H(w(a?.link),`${c}_${m}`),target:a?.target,rel:a?.target==="_blank"?a?.rel??"noopener noreferrer":a?.rel,onClick:t=>{if(a.link?.startsWith("#")){t.preventDefault();const s=document.querySelector(a.link);s&&M(s,z)}a?.isCustomSecondaryButton&&j?.(i,t,a?.customSecondaryEventId)},"data-headless-type-name":`${c}#${m}`,"data-headless-title-desc-button":`${o}#${r}#${a?.text}`,children:[a?.text,e("span",{className:"sr-only",children:o??r})]}):null,n&&n.text&&e(T,{"aria-label":o??r,size:"lg",variant:"primary",className:p("hero-banner-primary-button",u.primaryButton),as:n?.isCustomPrimaryButton?"button":"a",href:H(w(n.link),`${c}_${m}`),target:n?.target,rel:n?.target==="_blank"?n?.rel??"noopener noreferrer":n?.rel,onClick:t=>{if(n.link?.startsWith("#")){t.preventDefault();const s=document.querySelector(n.link);s&&M(s,z)}n?.isCustomPrimaryButton&&_?.(i,t,n?.customPrimaryEventId)},"data-headless-type-name":`${c}#${m}`,"data-headless-title-desc-button":`${o}#${r}#${n?.text}`,children:n.text})]}),l&&l.text&&d(T,{"aria-label":o??r,size:"lg",variant:"link",className:p("hero-banner-tertiary-button w-auto p-0",u.tertiaryButton),as:l?.isCustomTertiaryButton?"button":"a",href:H(w(l.link),`${c}_${m}`),target:l?.target,rel:l?.target==="_blank"?l?.rel??"noopener noreferrer":l?.rel,onClick:t=>{if(l.link?.startsWith("#")){t.preventDefault();const s=document.querySelector(l.link);s&&M(s,z)}l?.isCustomTertiaryButton&&A?.(i,t,l?.customTertiaryEventId)},"data-headless-type-name":`${c}#${m}`,"data-headless-title-desc-button":`${o}#${r}#${l?.text}`,children:[l.text,e("span",{className:"sr-only",children:o??r})]})]}),e("div",{className:De({align:b}),children:fe?.map(t=>e("div",{className:"h-12",children:e(R,{className:"laptop:w-full h-full",imgClassName:"h-full object-cover",loading:"eager",alt:t?.pcImage?.alt||"",source:t?.pcImage?.url})},t?.pcImage?.url||t?.pcImage?.alt))})]}),I.length>0&&e("div",{className:p("hero-banner-caption-group laptop:gap-3 tablet:px-[32px] laptop:px-[64px] lg-desktop:px-[calc(50%-832px)] desktop:pb-[24px] absolute bottom-0 z-10 flex items-stretch gap-2 px-[16px] pb-[16px]",u.captionGroup),children:I.map((t,s)=>d(re.Fragment,{children:[e(D,{size:2,className:p("hero-banner-product-text tablet:w-[108px] loptop:w-[150px] desktop:w-[156px] lg-desktop:w-[180px] laptop:text-[14px] flex-1 text-[12px]"),html:t.title}),s<I.length-1&&e("div",{className:p("bg-info-primary w-px")})]},t.title))}),X&&e(Pe,{visible:X,videoUrl:a?.isYoutubeVideo?void 0:a?.videoUrl?.url,youTubeId:a?.isYoutubeVideo?a?.youtubeId:void 0,onCloseModal:()=>ee(!1)})]})})});ne.displayName="HeroBanner";var st=He(ne);export{st as default};
|
|
2
2
|
//# sourceMappingURL=HeroBanner.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/biz-components/HeroBanner/HeroBanner.tsx"],
|
|
4
|
-
"sourcesContent": ["'use client'\nimport React, { useImperativeHandle, useRef, useState, useEffect } from 'react'\nimport gsap from 'gsap'\nimport { ScrollTrigger } from 'gsap/dist/ScrollTrigger'\nimport jump from 'jump.js'\nimport type { HeroBannerProps } from './types.js'\nimport { useMediaQuery } from 'react-responsive'\nimport { useInView } from 'react-intersection-observer'\nimport ScrollLoadVideo from '../../helpers/ScrollLoadVideo.js'\nimport { Button, Heading, Picture, Text, Countdown } from '../../components/index.js'\nimport { cn } from '../../helpers/index.js'\nimport { cva } from 'class-variance-authority'\nimport { withLayout } from '../../shared/Styles.js'\nimport { useExposure } from '../../hooks/useExposure.js'\nimport { trackUrlRef } from '../../shared/trackUrlRef.js'\nimport { getLocalizedPath } from '../../helpers/utils.js'\nimport { useAiuiContext } from '../AiuiProvider/index.js'\nimport { sizeMap } from '../../components/button.js'\nimport { VideoModal } from '../VideoModal/index.js'\n// Task 18: import carousel implementation for early-return delegation (DECISION-A002)\nimport HeroBannerCarousel from './HeroBannerCarousel.js'\n\n/**\n * jump.js \u914D\u7F6E\u9009\u9879\n */\nexport interface JumpOptions {\n /** \u52A8\u753B\u6301\u7EED\u65F6\u95F4\uFF08\u6BEB\u79D2\uFF09 @default 500 */\n duration?: number\n /** \u504F\u79FB\u91CF\uFF08\u50CF\u7D20\uFF09 @default 0 */\n offset?: number\n /** \u52A8\u753B\u5B8C\u6210\u56DE\u8C03 */\n callback?: () => void\n /** \u7F13\u52A8\u51FD\u6570 */\n easing?: (t: number, b: number, c: number, d: number) => number\n /** \u662F\u5426\u8003\u8651 a11y @default false */\n a11y?: boolean\n}\n\nconst componentType = 'image'\nconst componentName = 'hero_banner'\n\n// CVA variants for align\nconst contentVariants = cva(\n 'hero-banner-content lg-desktop:gap-[32px] absolute top-24 z-10 flex w-full flex-col gap-[24px]',\n {\n variants: {\n align: {\n left: 'tablet:px-[32px] laptop:top-1/2 laptop:px-[64px] lg-desktop:px-[calc(50%-832px)] laptop:-translate-y-1/2 left-0 px-[16px]',\n center:\n 'tablet:top-[84px] laptop:top-[76px] desktop:top-[176px] lg-desktop:top-[192px] left-1/2 top-[84px] -translate-x-1/2 translate-y-0 items-center text-center',\n },\n },\n defaultVariants: {\n align: 'left',\n },\n }\n)\n\nconst textVariants = cva(\n 'hero-banner-wrap-text lg-desktop:max-w-[824px] desktop:max-w-[648px] laptop:max-w-[440px] tablet:max-w-[704px] max-w-[358px]',\n {\n variants: {\n align: {\n left: 'laptop:text-left',\n center: 'text-center',\n },\n },\n defaultVariants: {\n align: 'left',\n },\n }\n)\n\nconst buttonGroupVariants = cva(\n 'hero-banner-button-group lg-desktop:gap-x-3 flex flex-wrap items-center gap-x-2 gap-y-3',\n {\n variants: {\n align: {\n left: 'laptop:justify-start',\n center: 'justify-center',\n },\n },\n defaultVariants: {\n align: 'left',\n },\n }\n)\n\nconst iconGroupVariants = cva('hero-banner-icon-group flex items-center gap-2', {\n variants: {\n align: {\n left: 'justify-start',\n center: 'justify-center',\n },\n },\n defaultVariants: {\n align: 'left',\n },\n})\n\nexport type HeroBannerSemanticName =\n | 'root'\n | 'title'\n | 'subtitle'\n | 'buttonGroup'\n | 'primaryButton'\n | 'secondaryButton'\n | 'tertiaryButton'\n | 'captionGroup'\n\nconst PlayButtonAppendIcon = ({ size = 'base' }: { size: 'base' | 'lg' | 'sm' }) => {\n const { width, height } = sizeMap[size]\n return (\n <svg width={width} height={height} viewBox=\"0 0 20 20\" fill=\"currentcolor\" xmlns=\"http://www.w3.org/2000/svg\">\n <path\n d=\"M13.9599 9.30662C14.4547 9.63647 14.4547 10.3635 13.9599 10.6934L6.29558 15.8029C5.74179 16.1721 5 15.7751 5 15.1096V4.89042C5 4.22484 5.74179 3.82785 6.29558 4.19705L13.9599 9.30662Z\"\n fill=\"currentcolor\"\n />\n </svg>\n )\n}\n\nconst HeroBanner = React.forwardRef<\n HTMLDivElement,\n HeroBannerProps & {\n classNames?: Partial<Record<HeroBannerSemanticName, string>>\n /**\n * \u951A\u70B9\u8DF3\u8F6C\u914D\u7F6E\uFF08\u7528\u4E8E # \u5F00\u5934\u7684\u94FE\u63A5\uFF09\n * @default { duration: 500, offset: 0 }\n */\n jumpOptions?: JumpOptions\n }\n>(\n (\n { data, className, classNames = {}, onSecondaryClick, onPrimaryClick, onTertiaryClick, jumpOptions = {}, ...rest },\n ref\n ) => {\n const { locale } = useAiuiContext()\n\n // \u9ED8\u8BA4 jump \u914D\u7F6E\n const defaultJumpOptions: JumpOptions = { duration: 500, offset: 0 }\n const mergedJumpOptions = { ...defaultJumpOptions, ...jumpOptions }\n\n // \u5305\u88C5\u94FE\u63A5\uFF0C\u81EA\u52A8\u6DFB\u52A0 locale \u524D\u7F00\n const localizeUrl = (url?: string) => {\n if (!url || !locale) return url\n return getLocalizedPath(url, locale)\n }\n\n const {\n label,\n title,\n subtitle,\n endDate,\n endDate_tz,\n dateFormat,\n pcImage,\n padImage,\n mobileImage,\n pcVideo,\n padVideo,\n mobileVideo,\n isShowVideo,\n isVideoLoop = true,\n primaryButton,\n secondaryButton,\n tertiaryButton,\n theme = 'light',\n size = 'default',\n titleSize,\n caption = [],\n blockLink,\n iconArray,\n align = 'left',\n enableParallax = true,\n } = data\n\n const safeCaption = Array.isArray(caption) ? caption : []\n const safeIconArray = Array.isArray(iconArray) ? iconArray : undefined\n\n const isMobile = useMediaQuery({ query: '(max-width: 768px)' })\n const isPad = useMediaQuery({ query: '(max-width: 1024px)' })\n const [visible, setVisible] = useState<boolean>(false)\n const { ref: inViewRef, inView } = useInView()\n const scrollTriggerRef = useRef<ScrollTrigger | null>(null)\n const bgTriggerRef = useRef<ScrollTrigger | null>(null)\n const boxTriggerRef = useRef<ScrollTrigger | null>(null)\n\n const bgRef = useRef<HTMLImageElement>(null)\n const boxRef = useRef<HTMLDivElement>(null)\n\n // Task 7: Compute accessibility / tracking fallback values (Rule 2/3/4 \u2014 DECISION-T3)\n // blockLink aria-label: title \u2192 subtitle \u2192 pcImage.alt \u2192 undefined (absent attr)\n const blockLinkLabel = title?.trim() || subtitle?.trim() || pcImage?.alt?.trim() || undefined\n // componentTitle: title=undefined \u2192 coerce '' via subtitle only (no pcImage.alt for undefined title);\n // title='' (intentional) \u2192 cascade: subtitle \u2192 pcImage.alt \u2192 undefined\n const resolvedComponentTitle =\n title !== undefined\n ? title?.trim() || subtitle?.trim() || pcImage?.alt?.trim() || undefined\n : (subtitle && subtitle.trim()) || ''\n // componentDescription: subtitle with undefined guard\n const resolvedComponentDescription = (subtitle && subtitle.trim()) || ''\n\n useExposure(boxRef, {\n componentType,\n componentName,\n componentTitle: resolvedComponentTitle,\n componentDescription: resolvedComponentDescription,\n })\n\n useImperativeHandle(ref, () => boxRef.current as HTMLDivElement)\n\n useEffect(() => {\n // Task 18: GSAP bypass \u2014 skip ALL GSAP setup in carousel mode (DECISION-A002/DECISION-009)\n if (data.items && data.items.length > 0) return\n if (!enableParallax) return\n gsap.registerPlugin(ScrollTrigger)\n function gsapResize() {\n if (!bgRef.current) return\n const clientHeight = boxRef.current?.clientHeight || 100\n const screenHeight = window.innerHeight\n\n if (screenHeight <= clientHeight) {\n scrollTriggerRef.current = ScrollTrigger.create({\n trigger: boxRef.current,\n start: 'top bottom',\n end: 'bottom top',\n scrub: true,\n onUpdate: (self: any) => {\n const base = 40\n const value = self.progress * base - base / 2\n gsap.set(bgRef.current, { yPercent: value })\n },\n })\n } else {\n boxTriggerRef.current = ScrollTrigger.create({\n trigger: boxRef.current,\n start: 'top bottom',\n end: 'bottom bottom',\n scrub: true,\n onUpdate: (self: any) => {\n const base = 20\n const value = self.progress * base - base\n gsap.set(bgRef.current, { yPercent: value })\n },\n })\n bgTriggerRef.current = ScrollTrigger.create({\n trigger: boxRef.current,\n start: 'top top',\n end: 'bottom top',\n scrub: true,\n onUpdate: (self: any) => {\n const base = 20\n const value = self.progress * base\n gsap.set(bgRef.current, { yPercent: value })\n },\n })\n }\n }\n if (inView) gsapResize()\n return () => {\n // ScrollTrigger.getAll().forEach((t: any) => t.kill())\n scrollTriggerRef.current && scrollTriggerRef.current.kill()\n boxTriggerRef.current && boxTriggerRef.current.kill()\n bgTriggerRef.current && bgTriggerRef.current.kill()\n }\n }, [inView, data.items, enableParallax])\n\n // Task 18: Carousel mode early return (DECISION-A002 / DECISION-011)\n // All hooks above have already run. Delegate entirely to HeroBannerCarousel\n // when data.items is non-empty; GSAP was already bypassed in the useEffect above.\n if (data.items && data.items.length > 0) {\n return (\n <HeroBannerCarousel\n data={data}\n className={className}\n classNames={classNames}\n onPrimaryClick={onPrimaryClick}\n onSecondaryClick={onSecondaryClick}\n onTertiaryClick={onTertiaryClick}\n ref={ref as React.Ref<HTMLDivElement>}\n {...rest}\n />\n )\n }\n return (\n <div {...rest} ref={inViewRef} data-ui-component-id=\"HeroBanner\">\n <div\n ref={boxRef}\n className={cn(\n theme === 'dark' ? 'aiui-dark' : '',\n 'text-info-primary relative w-full overflow-hidden',\n {\n 'lg-desktop:aspect-[1920/930] desktop:aspect-[1440/700] laptop:aspect-[1024/520] tablet:aspect-[768/660] aspect-[390/660]':\n size === 'default',\n 'lg-desktop:aspect-[1920/800] desktop:aspect-[1440/640] laptop:aspect-[1024/480] tablet:aspect-[768/560] aspect-[390/560]':\n size === 'sm',\n },\n className\n )}\n >\n {blockLink && (\n <a\n className=\"absolute inset-0 z-10\"\n href={trackUrlRef(localizeUrl(blockLink), `${componentType}_${componentName}`)}\n data-headless-type-name={`${componentType}#${componentName}`}\n data-headless-title-desc-button={`${title}#${subtitle}`}\n tabIndex={-1}\n aria-hidden=\"true\"\n aria-label={blockLinkLabel}\n ></a>\n )}\n <div ref={bgRef} className={cn('absolute left-0 top-0 size-full')}>\n {isShowVideo ? (\n <>\n {/* Poster cover layer: eager + high priority, decoupled from JS lazy-load, participates in LCP */}\n {/* Wrap in div so data-video-poster + transition-opacity are on the container, not the <img> */}\n <div\n data-video-poster=\"true\"\n className=\"laptop:w-full absolute inset-0 h-full transition-opacity duration-500\"\n >\n <Picture\n className=\"absolute inset-0 size-full\"\n imgClassName=\"size-full object-cover\"\n loading=\"eager\"\n fetchPriority=\"high\"\n alt={pcImage?.alt || ''}\n source={`${pcImage?.url || ''} , ${padImage?.url ?? (mobileImage?.url || '')} 1024, ${mobileImage?.url || ''} 767`}\n />\n </div>\n {/* Video layer: lazy-loaded, overlays Picture via DOM order (both z-auto, video is after Picture) */}\n <ScrollLoadVideo\n poster={undefined}\n src={\n isMobile\n ? (mobileVideo?.url as string)\n : isPad\n ? (padVideo?.url as string) || (mobileVideo?.url as string)\n : (pcVideo?.url as string)\n }\n className=\"laptop:w-full absolute inset-0 h-full\"\n videoClassName=\"h-full object-cover\"\n muted\n loop={isVideoLoop}\n playsInline\n onPlaying={(e: React.SyntheticEvent<HTMLVideoElement>) => {\n const banner = (e.currentTarget as HTMLVideoElement).closest('[data-ui-component-id=\"HeroBanner\"]')\n banner?.querySelector<HTMLElement>('[data-video-poster=\"true\"]')?.classList.add('opacity-0')\n }}\n />\n </>\n ) : (\n <Picture\n className=\"laptop:w-full h-full\"\n imgClassName=\"h-full object-cover\"\n loading=\"eager\"\n fetchPriority=\"high\"\n alt={pcImage?.alt || ''}\n source={`${pcImage?.url || ''} , ${padImage?.url ?? (mobileImage?.url || '')} 1024, ${mobileImage?.url || ''} 767`}\n />\n )}\n </div>\n\n {/* \u5185\u5BB9\u533A\u57DF */}\n <div className={contentVariants({ align })}>\n <div className={textVariants({ align })}>\n {label && (\n <Text\n size={2}\n as=\"p\"\n className={cn('hero-banner-label font-heading lg-desktop:text-[18px] desktop:text-base text-sm')}\n html={label}\n />\n )}\n {title && (\n <Heading\n as={titleSize === '4' ? 'h1' : 'h2'}\n html={title}\n className={cn('hero-banner-title', classNames.title)}\n size={titleSize ? (Number(titleSize || '5') as any) : size === 'sm' ? 4 : 5}\n />\n )}\n {subtitle && (\n <Text\n as=\"p\"\n size={2}\n className={cn(\n 'hero-banner-subtitle font-heading lg-desktop:text-[18px] desktop:text-base laptop:mt-2 lg-desktop:mt-4 mt-1 text-sm',\n classNames.subtitle\n )}\n html={subtitle}\n />\n )}\n {endDate && (\n <div className=\"mt-3\">\n <Countdown\n endDate={endDate}\n endDate_tz={endDate_tz}\n dateFormat={dateFormat}\n variant=\"spacious\"\n align={align}\n />\n </div>\n )}\n </div>\n {/* \u6309\u94AE\u7EC4 */}\n <div className={cn(buttonGroupVariants({ align }), classNames.buttonGroup)}>\n {/* secondary + primary \u59CB\u7EC8\u540C\u884C */}\n <div className=\"lg-desktop:gap-3 flex items-center gap-2\">\n {secondaryButton?.isShowPlayVideoButton && secondaryButton?.playVideoButtonText ? (\n <Button\n onClick={() => setVisible(true)}\n size=\"lg\"\n variant=\"secondary\"\n className=\"hero-banner-play-video-button\"\n data-headless-type-name={`${componentType}#${componentName}`}\n data-headless-title-desc-button={`${title}#${subtitle}#${secondaryButton?.playVideoButtonText}`}\n >\n {secondaryButton?.playVideoButtonText} <PlayButtonAppendIcon size=\"lg\" />\n </Button>\n ) : secondaryButton?.text ? (\n <Button\n aria-label={title ?? subtitle}\n size=\"lg\"\n variant=\"secondary\"\n className={cn('hero-banner-secondary-button', classNames.secondaryButton)}\n as={secondaryButton?.isCustomSecondaryButton ? 'button' : 'a'}\n href={trackUrlRef(localizeUrl(secondaryButton?.link), `${componentType}_${componentName}`)}\n target={secondaryButton?.target}\n rel={\n secondaryButton?.target === '_blank'\n ? (secondaryButton?.rel ?? 'noopener noreferrer')\n : secondaryButton?.rel\n }\n onClick={e => {\n if (secondaryButton.link?.startsWith('#')) {\n e.preventDefault()\n const element = document.querySelector(secondaryButton.link)\n if (element) {\n jump(element as HTMLElement, mergedJumpOptions)\n }\n }\n secondaryButton?.isCustomSecondaryButton &&\n onSecondaryClick?.(data, e, secondaryButton?.customSecondaryEventId)\n }}\n data-headless-type-name={`${componentType}#${componentName}`}\n data-headless-title-desc-button={`${title}#${subtitle}#${secondaryButton?.text}`}\n >\n {secondaryButton?.text}\n <span className=\"sr-only\">{title ?? subtitle}</span>\n </Button>\n ) : null}\n {primaryButton && primaryButton.text && (\n <Button\n aria-label={title ?? subtitle}\n size=\"lg\"\n variant=\"primary\"\n className={cn('hero-banner-primary-button', classNames.primaryButton)}\n as={primaryButton?.isCustomPrimaryButton ? 'button' : 'a'}\n href={trackUrlRef(localizeUrl(primaryButton.link), `${componentType}_${componentName}`)}\n target={primaryButton?.target}\n rel={\n primaryButton?.target === '_blank'\n ? (primaryButton?.rel ?? 'noopener noreferrer')\n : primaryButton?.rel\n }\n onClick={e => {\n if (primaryButton.link?.startsWith('#')) {\n e.preventDefault()\n const element = document.querySelector(primaryButton.link)\n if (element) {\n jump(element as HTMLElement, mergedJumpOptions)\n }\n }\n primaryButton?.isCustomPrimaryButton &&\n onPrimaryClick?.(data, e, primaryButton?.customPrimaryEventId)\n }}\n data-headless-type-name={`${componentType}#${componentName}`}\n data-headless-title-desc-button={`${title}#${subtitle}#${primaryButton?.text}`}\n >\n {primaryButton.text}\n </Button>\n )}\n </div>\n {tertiaryButton && tertiaryButton.text && (\n <Button\n aria-label={title ?? subtitle}\n size=\"lg\"\n variant=\"link\"\n className={cn('hero-banner-tertiary-button w-auto p-0', classNames.tertiaryButton)}\n as={tertiaryButton?.isCustomTertiaryButton ? 'button' : 'a'}\n href={trackUrlRef(localizeUrl(tertiaryButton.link), `${componentType}_${componentName}`)}\n target={tertiaryButton?.target}\n rel={\n tertiaryButton?.target === '_blank'\n ? (tertiaryButton?.rel ?? 'noopener noreferrer')\n : tertiaryButton?.rel\n }\n onClick={e => {\n if (tertiaryButton.link?.startsWith('#')) {\n e.preventDefault()\n const element = document.querySelector(tertiaryButton.link)\n if (element) {\n jump(element as HTMLElement, mergedJumpOptions)\n }\n }\n tertiaryButton?.isCustomTertiaryButton &&\n onTertiaryClick?.(data, e, tertiaryButton?.customTertiaryEventId)\n }}\n data-headless-type-name={`${componentType}#${componentName}`}\n data-headless-title-desc-button={`${title}#${subtitle}#${tertiaryButton?.text}`}\n >\n {tertiaryButton.text}\n <span className=\"sr-only\">{title ?? subtitle}</span>\n </Button>\n )}\n </div>\n <div className={iconGroupVariants({ align })}>\n {safeIconArray?.map(icon => (\n <div key={icon?.pcImage?.url || icon?.pcImage?.alt} className=\"h-12\">\n <Picture\n className=\"laptop:w-full h-full\"\n imgClassName=\"h-full object-cover\"\n loading=\"eager\"\n alt={icon?.pcImage?.alt || ''}\n source={icon?.pcImage?.url}\n />\n </div>\n ))}\n </div>\n </div>\n\n {safeCaption.length > 0 && (\n <div\n className={cn(\n 'hero-banner-caption-group laptop:gap-3 tablet:px-[32px] laptop:px-[64px] lg-desktop:px-[calc(50%-832px)] desktop:pb-[24px] absolute bottom-0 z-10 flex items-stretch gap-2 px-[16px] pb-[16px]',\n classNames.captionGroup\n )}\n >\n {safeCaption.map((c, index) => (\n <React.Fragment key={c.title}>\n <Text\n size={2}\n className={cn(\n 'hero-banner-product-text tablet:w-[108px] loptop:w-[150px] desktop:w-[156px] lg-desktop:w-[180px] laptop:text-[14px] flex-1 text-[12px]'\n )}\n html={c.title}\n />\n {index < safeCaption.length - 1 && <div className={cn('bg-info-primary w-px')} />}\n </React.Fragment>\n ))}\n </div>\n )}\n\n {/* \u89C6\u9891\u5F39\u7A97 */}\n {visible && (\n <VideoModal\n visible={visible}\n videoUrl={secondaryButton?.isYoutubeVideo ? undefined : secondaryButton?.videoUrl?.url}\n youTubeId={secondaryButton?.isYoutubeVideo ? secondaryButton?.youtubeId : undefined}\n onCloseModal={() => setVisible(false)}\n />\n )}\n </div>\n </div>\n )\n }\n)\n\nHeroBanner.displayName = 'HeroBanner'\n\nexport default withLayout(HeroBanner)\n"],
|
|
5
|
-
"mappings": "aAkHM,OAwMQ,YAAAA,GAxMR,OAAAC,EAwMQ,QAAAC,MAxMR,oBAjHN,OAAOC,IAAS,uBAAAC,GAAqB,UAAAC,EAAQ,YAAAC,GAAU,aAAAC,OAAiB,QACxE,OAAOC,MAAU,OACjB,OAAS,iBAAAC,MAAqB,0BAC9B,OAAOC,MAAU,UAEjB,OAAS,
|
|
6
|
-
"names": ["Fragment", "jsx", "jsxs", "React", "useImperativeHandle", "useRef", "useState", "useEffect", "gsap", "ScrollTrigger", "jump", "
|
|
4
|
+
"sourcesContent": ["'use client'\nimport React, { useImperativeHandle, useRef, useState, useEffect } from 'react'\nimport gsap from 'gsap'\nimport { ScrollTrigger } from 'gsap/dist/ScrollTrigger'\nimport jump from 'jump.js'\nimport type { HeroBannerProps } from './types.js'\nimport { useIsomorphicMediaQuery } from '../../hooks/useIsomorphicMediaQuery.js'\nimport { useInView } from 'react-intersection-observer'\nimport ScrollLoadVideo from '../../helpers/ScrollLoadVideo.js'\nimport { Button, Heading, Picture, Text, Countdown } from '../../components/index.js'\nimport { cn } from '../../helpers/index.js'\nimport { cva } from 'class-variance-authority'\nimport { withLayout } from '../../shared/Styles.js'\nimport { useExposure } from '../../hooks/useExposure.js'\nimport { trackUrlRef } from '../../shared/trackUrlRef.js'\nimport { getLocalizedPath } from '../../helpers/utils.js'\nimport { useAiuiContext } from '../AiuiProvider/index.js'\nimport { sizeMap } from '../../components/button.js'\nimport { VideoModal } from '../VideoModal/index.js'\n// Task 18: import carousel implementation for early-return delegation (DECISION-A002)\nimport HeroBannerCarousel from './HeroBannerCarousel.js'\n\n/**\n * jump.js \u914D\u7F6E\u9009\u9879\n */\nexport interface JumpOptions {\n /** \u52A8\u753B\u6301\u7EED\u65F6\u95F4\uFF08\u6BEB\u79D2\uFF09 @default 500 */\n duration?: number\n /** \u504F\u79FB\u91CF\uFF08\u50CF\u7D20\uFF09 @default 0 */\n offset?: number\n /** \u52A8\u753B\u5B8C\u6210\u56DE\u8C03 */\n callback?: () => void\n /** \u7F13\u52A8\u51FD\u6570 */\n easing?: (t: number, b: number, c: number, d: number) => number\n /** \u662F\u5426\u8003\u8651 a11y @default false */\n a11y?: boolean\n}\n\nconst componentType = 'image'\nconst componentName = 'hero_banner'\n\n// CVA variants for align\nconst contentVariants = cva(\n 'hero-banner-content lg-desktop:gap-[32px] absolute top-24 z-10 flex w-full flex-col gap-[24px]',\n {\n variants: {\n align: {\n left: 'tablet:px-[32px] laptop:top-1/2 laptop:px-[64px] lg-desktop:px-[calc(50%-832px)] laptop:-translate-y-1/2 left-0 px-[16px]',\n center:\n 'tablet:top-[84px] laptop:top-[76px] desktop:top-[176px] lg-desktop:top-[192px] left-1/2 top-[84px] -translate-x-1/2 translate-y-0 items-center text-center',\n },\n },\n defaultVariants: {\n align: 'left',\n },\n }\n)\n\nconst textVariants = cva(\n 'hero-banner-wrap-text lg-desktop:max-w-[824px] desktop:max-w-[648px] laptop:max-w-[440px] tablet:max-w-[704px] max-w-[358px]',\n {\n variants: {\n align: {\n left: 'laptop:text-left',\n center: 'text-center',\n },\n },\n defaultVariants: {\n align: 'left',\n },\n }\n)\n\nconst buttonGroupVariants = cva(\n 'hero-banner-button-group lg-desktop:gap-x-3 flex flex-wrap items-center gap-x-2 gap-y-3',\n {\n variants: {\n align: {\n left: 'laptop:justify-start',\n center: 'justify-center',\n },\n },\n defaultVariants: {\n align: 'left',\n },\n }\n)\n\nconst iconGroupVariants = cva('hero-banner-icon-group flex items-center gap-2', {\n variants: {\n align: {\n left: 'justify-start',\n center: 'justify-center',\n },\n },\n defaultVariants: {\n align: 'left',\n },\n})\n\nexport type HeroBannerSemanticName =\n | 'root'\n | 'title'\n | 'subtitle'\n | 'buttonGroup'\n | 'primaryButton'\n | 'secondaryButton'\n | 'tertiaryButton'\n | 'captionGroup'\n\nconst PlayButtonAppendIcon = ({ size = 'base' }: { size: 'base' | 'lg' | 'sm' }) => {\n const { width, height } = sizeMap[size]\n return (\n <svg width={width} height={height} viewBox=\"0 0 20 20\" fill=\"currentcolor\" xmlns=\"http://www.w3.org/2000/svg\">\n <path\n d=\"M13.9599 9.30662C14.4547 9.63647 14.4547 10.3635 13.9599 10.6934L6.29558 15.8029C5.74179 16.1721 5 15.7751 5 15.1096V4.89042C5 4.22484 5.74179 3.82785 6.29558 4.19705L13.9599 9.30662Z\"\n fill=\"currentcolor\"\n />\n </svg>\n )\n}\n\nconst HeroBanner = React.forwardRef<\n HTMLDivElement,\n HeroBannerProps & {\n classNames?: Partial<Record<HeroBannerSemanticName, string>>\n /**\n * \u951A\u70B9\u8DF3\u8F6C\u914D\u7F6E\uFF08\u7528\u4E8E # \u5F00\u5934\u7684\u94FE\u63A5\uFF09\n * @default { duration: 500, offset: 0 }\n */\n jumpOptions?: JumpOptions\n }\n>(\n (\n { data, className, classNames = {}, onSecondaryClick, onPrimaryClick, onTertiaryClick, jumpOptions = {}, ...rest },\n ref\n ) => {\n const { locale } = useAiuiContext()\n\n // \u9ED8\u8BA4 jump \u914D\u7F6E\n const defaultJumpOptions: JumpOptions = { duration: 500, offset: 0 }\n const mergedJumpOptions = { ...defaultJumpOptions, ...jumpOptions }\n\n // \u5305\u88C5\u94FE\u63A5\uFF0C\u81EA\u52A8\u6DFB\u52A0 locale \u524D\u7F00\n const localizeUrl = (url?: string) => {\n if (!url || !locale) return url\n return getLocalizedPath(url, locale)\n }\n\n const {\n label,\n title,\n subtitle,\n endDate,\n endDate_tz,\n dateFormat,\n pcImage,\n padImage,\n mobileImage,\n pcVideo,\n padVideo,\n mobileVideo,\n isShowVideo,\n isVideoLoop = true,\n primaryButton,\n secondaryButton,\n tertiaryButton,\n theme = 'light',\n size = 'default',\n titleSize,\n caption = [],\n blockLink,\n iconArray,\n align = 'left',\n enableParallax = true,\n } = data\n\n const safeCaption = Array.isArray(caption) ? caption : []\n const safeIconArray = Array.isArray(iconArray) ? iconArray : undefined\n\n const isMobile = useIsomorphicMediaQuery({ query: '(max-width: 768px)' })\n const isPad = useIsomorphicMediaQuery({ query: '(max-width: 1024px)' })\n const [visible, setVisible] = useState<boolean>(false)\n const { ref: inViewRef, inView } = useInView()\n const scrollTriggerRef = useRef<ScrollTrigger | null>(null)\n const bgTriggerRef = useRef<ScrollTrigger | null>(null)\n const boxTriggerRef = useRef<ScrollTrigger | null>(null)\n\n const bgRef = useRef<HTMLImageElement>(null)\n const boxRef = useRef<HTMLDivElement>(null)\n\n // Task 7: Compute accessibility / tracking fallback values (Rule 2/3/4 \u2014 DECISION-T3)\n // blockLink aria-label: title \u2192 subtitle \u2192 pcImage.alt \u2192 undefined (absent attr)\n const blockLinkLabel = title?.trim() || subtitle?.trim() || pcImage?.alt?.trim() || undefined\n // componentTitle: title=undefined \u2192 coerce '' via subtitle only (no pcImage.alt for undefined title);\n // title='' (intentional) \u2192 cascade: subtitle \u2192 pcImage.alt \u2192 undefined\n const resolvedComponentTitle =\n title !== undefined\n ? title?.trim() || subtitle?.trim() || pcImage?.alt?.trim() || undefined\n : (subtitle && subtitle.trim()) || ''\n // componentDescription: subtitle with undefined guard\n const resolvedComponentDescription = (subtitle && subtitle.trim()) || ''\n\n useExposure(boxRef, {\n componentType,\n componentName,\n componentTitle: resolvedComponentTitle,\n componentDescription: resolvedComponentDescription,\n })\n\n useImperativeHandle(ref, () => boxRef.current as HTMLDivElement)\n\n useEffect(() => {\n // Task 18: GSAP bypass \u2014 skip ALL GSAP setup in carousel mode (DECISION-A002/DECISION-009)\n if (data.items && data.items.length > 0) return\n if (!enableParallax) return\n gsap.registerPlugin(ScrollTrigger)\n function gsapResize() {\n if (!bgRef.current) return\n const clientHeight = boxRef.current?.clientHeight || 100\n const screenHeight = window.innerHeight\n\n if (screenHeight <= clientHeight) {\n scrollTriggerRef.current = ScrollTrigger.create({\n trigger: boxRef.current,\n start: 'top bottom',\n end: 'bottom top',\n scrub: true,\n onUpdate: (self: any) => {\n const base = 40\n const value = self.progress * base - base / 2\n gsap.set(bgRef.current, { yPercent: value })\n },\n })\n } else {\n boxTriggerRef.current = ScrollTrigger.create({\n trigger: boxRef.current,\n start: 'top bottom',\n end: 'bottom bottom',\n scrub: true,\n onUpdate: (self: any) => {\n const base = 20\n const value = self.progress * base - base\n gsap.set(bgRef.current, { yPercent: value })\n },\n })\n bgTriggerRef.current = ScrollTrigger.create({\n trigger: boxRef.current,\n start: 'top top',\n end: 'bottom top',\n scrub: true,\n onUpdate: (self: any) => {\n const base = 20\n const value = self.progress * base\n gsap.set(bgRef.current, { yPercent: value })\n },\n })\n }\n }\n if (inView) gsapResize()\n return () => {\n // ScrollTrigger.getAll().forEach((t: any) => t.kill())\n scrollTriggerRef.current && scrollTriggerRef.current.kill()\n boxTriggerRef.current && boxTriggerRef.current.kill()\n bgTriggerRef.current && bgTriggerRef.current.kill()\n }\n }, [inView, data.items, enableParallax])\n\n // Task 18: Carousel mode early return (DECISION-A002 / DECISION-011)\n // All hooks above have already run. Delegate entirely to HeroBannerCarousel\n // when data.items is non-empty; GSAP was already bypassed in the useEffect above.\n if (data.items && data.items.length > 0) {\n return (\n <HeroBannerCarousel\n data={data}\n className={className}\n classNames={classNames}\n onPrimaryClick={onPrimaryClick}\n onSecondaryClick={onSecondaryClick}\n onTertiaryClick={onTertiaryClick}\n ref={ref as React.Ref<HTMLDivElement>}\n {...rest}\n />\n )\n }\n return (\n <div {...rest} ref={inViewRef} data-ui-component-id=\"HeroBanner\">\n <div\n ref={boxRef}\n className={cn(\n theme === 'dark' ? 'aiui-dark' : '',\n 'text-info-primary relative w-full overflow-hidden',\n {\n 'lg-desktop:aspect-[1920/930] desktop:aspect-[1440/700] laptop:aspect-[1024/520] tablet:aspect-[768/660] aspect-[390/660]':\n size === 'default',\n 'lg-desktop:aspect-[1920/800] desktop:aspect-[1440/640] laptop:aspect-[1024/480] tablet:aspect-[768/560] aspect-[390/560]':\n size === 'sm',\n },\n className\n )}\n >\n {blockLink && (\n <a\n className=\"absolute inset-0 z-10\"\n href={trackUrlRef(localizeUrl(blockLink), `${componentType}_${componentName}`)}\n data-headless-type-name={`${componentType}#${componentName}`}\n data-headless-title-desc-button={`${title}#${subtitle}`}\n tabIndex={-1}\n aria-hidden=\"true\"\n aria-label={blockLinkLabel}\n ></a>\n )}\n <div ref={bgRef} className={cn('absolute left-0 top-0 size-full')}>\n {isShowVideo ? (\n <>\n {/* Poster cover layer: eager + high priority, decoupled from JS lazy-load, participates in LCP */}\n {/* Wrap in div so data-video-poster + transition-opacity are on the container, not the <img> */}\n <div\n data-video-poster=\"true\"\n className=\"laptop:w-full absolute inset-0 h-full transition-opacity duration-500\"\n >\n <Picture\n className=\"absolute inset-0 size-full\"\n imgClassName=\"size-full object-cover\"\n loading=\"eager\"\n fetchPriority=\"high\"\n alt={pcImage?.alt || ''}\n source={`${pcImage?.url || ''} , ${padImage?.url ?? (mobileImage?.url || '')} 1024, ${mobileImage?.url || ''} 767`}\n />\n </div>\n {/* Video layer: lazy-loaded, overlays Picture via DOM order (both z-auto, video is after Picture) */}\n <ScrollLoadVideo\n poster={undefined}\n src={\n isMobile\n ? (mobileVideo?.url as string)\n : isPad\n ? (padVideo?.url as string) || (mobileVideo?.url as string)\n : (pcVideo?.url as string)\n }\n className=\"laptop:w-full absolute inset-0 h-full\"\n videoClassName=\"h-full object-cover\"\n muted\n loop={isVideoLoop}\n playsInline\n onPlaying={(e: React.SyntheticEvent<HTMLVideoElement>) => {\n const banner = (e.currentTarget as HTMLVideoElement).closest('[data-ui-component-id=\"HeroBanner\"]')\n banner?.querySelector<HTMLElement>('[data-video-poster=\"true\"]')?.classList.add('opacity-0')\n }}\n />\n </>\n ) : (\n <Picture\n className=\"laptop:w-full h-full\"\n imgClassName=\"h-full object-cover\"\n loading=\"eager\"\n fetchPriority=\"high\"\n alt={pcImage?.alt || ''}\n source={`${pcImage?.url || ''} , ${padImage?.url ?? (mobileImage?.url || '')} 1024, ${mobileImage?.url || ''} 767`}\n />\n )}\n </div>\n\n {/* \u5185\u5BB9\u533A\u57DF */}\n <div className={contentVariants({ align })}>\n <div className={textVariants({ align })}>\n {label && (\n <Text\n size={2}\n as=\"p\"\n className={cn('hero-banner-label font-heading lg-desktop:text-[18px] desktop:text-base text-sm')}\n html={label}\n />\n )}\n {title && (\n <Heading\n as={titleSize === '4' ? 'h1' : 'h2'}\n html={title}\n className={cn('hero-banner-title', classNames.title)}\n size={titleSize ? (Number(titleSize || '5') as any) : size === 'sm' ? 4 : 5}\n />\n )}\n {subtitle && (\n <Text\n as=\"p\"\n size={2}\n className={cn(\n 'hero-banner-subtitle font-heading lg-desktop:text-[18px] desktop:text-base laptop:mt-2 lg-desktop:mt-4 mt-1 text-sm',\n classNames.subtitle\n )}\n html={subtitle}\n />\n )}\n {endDate && (\n <div className=\"mt-3\">\n <Countdown\n endDate={endDate}\n endDate_tz={endDate_tz}\n dateFormat={dateFormat}\n variant=\"spacious\"\n align={align}\n />\n </div>\n )}\n </div>\n {/* \u6309\u94AE\u7EC4 */}\n <div className={cn(buttonGroupVariants({ align }), classNames.buttonGroup)}>\n {/* secondary + primary \u59CB\u7EC8\u540C\u884C */}\n <div className=\"lg-desktop:gap-3 flex items-center gap-2\">\n {secondaryButton?.isShowPlayVideoButton && secondaryButton?.playVideoButtonText ? (\n <Button\n onClick={() => setVisible(true)}\n size=\"lg\"\n variant=\"secondary\"\n className=\"hero-banner-play-video-button\"\n data-headless-type-name={`${componentType}#${componentName}`}\n data-headless-title-desc-button={`${title}#${subtitle}#${secondaryButton?.playVideoButtonText}`}\n >\n {secondaryButton?.playVideoButtonText} <PlayButtonAppendIcon size=\"lg\" />\n </Button>\n ) : secondaryButton?.text ? (\n <Button\n aria-label={title ?? subtitle}\n size=\"lg\"\n variant=\"secondary\"\n className={cn('hero-banner-secondary-button', classNames.secondaryButton)}\n as={secondaryButton?.isCustomSecondaryButton ? 'button' : 'a'}\n href={trackUrlRef(localizeUrl(secondaryButton?.link), `${componentType}_${componentName}`)}\n target={secondaryButton?.target}\n rel={\n secondaryButton?.target === '_blank'\n ? (secondaryButton?.rel ?? 'noopener noreferrer')\n : secondaryButton?.rel\n }\n onClick={e => {\n if (secondaryButton.link?.startsWith('#')) {\n e.preventDefault()\n const element = document.querySelector(secondaryButton.link)\n if (element) {\n jump(element as HTMLElement, mergedJumpOptions)\n }\n }\n secondaryButton?.isCustomSecondaryButton &&\n onSecondaryClick?.(data, e, secondaryButton?.customSecondaryEventId)\n }}\n data-headless-type-name={`${componentType}#${componentName}`}\n data-headless-title-desc-button={`${title}#${subtitle}#${secondaryButton?.text}`}\n >\n {secondaryButton?.text}\n <span className=\"sr-only\">{title ?? subtitle}</span>\n </Button>\n ) : null}\n {primaryButton && primaryButton.text && (\n <Button\n aria-label={title ?? subtitle}\n size=\"lg\"\n variant=\"primary\"\n className={cn('hero-banner-primary-button', classNames.primaryButton)}\n as={primaryButton?.isCustomPrimaryButton ? 'button' : 'a'}\n href={trackUrlRef(localizeUrl(primaryButton.link), `${componentType}_${componentName}`)}\n target={primaryButton?.target}\n rel={\n primaryButton?.target === '_blank'\n ? (primaryButton?.rel ?? 'noopener noreferrer')\n : primaryButton?.rel\n }\n onClick={e => {\n if (primaryButton.link?.startsWith('#')) {\n e.preventDefault()\n const element = document.querySelector(primaryButton.link)\n if (element) {\n jump(element as HTMLElement, mergedJumpOptions)\n }\n }\n primaryButton?.isCustomPrimaryButton &&\n onPrimaryClick?.(data, e, primaryButton?.customPrimaryEventId)\n }}\n data-headless-type-name={`${componentType}#${componentName}`}\n data-headless-title-desc-button={`${title}#${subtitle}#${primaryButton?.text}`}\n >\n {primaryButton.text}\n </Button>\n )}\n </div>\n {tertiaryButton && tertiaryButton.text && (\n <Button\n aria-label={title ?? subtitle}\n size=\"lg\"\n variant=\"link\"\n className={cn('hero-banner-tertiary-button w-auto p-0', classNames.tertiaryButton)}\n as={tertiaryButton?.isCustomTertiaryButton ? 'button' : 'a'}\n href={trackUrlRef(localizeUrl(tertiaryButton.link), `${componentType}_${componentName}`)}\n target={tertiaryButton?.target}\n rel={\n tertiaryButton?.target === '_blank'\n ? (tertiaryButton?.rel ?? 'noopener noreferrer')\n : tertiaryButton?.rel\n }\n onClick={e => {\n if (tertiaryButton.link?.startsWith('#')) {\n e.preventDefault()\n const element = document.querySelector(tertiaryButton.link)\n if (element) {\n jump(element as HTMLElement, mergedJumpOptions)\n }\n }\n tertiaryButton?.isCustomTertiaryButton &&\n onTertiaryClick?.(data, e, tertiaryButton?.customTertiaryEventId)\n }}\n data-headless-type-name={`${componentType}#${componentName}`}\n data-headless-title-desc-button={`${title}#${subtitle}#${tertiaryButton?.text}`}\n >\n {tertiaryButton.text}\n <span className=\"sr-only\">{title ?? subtitle}</span>\n </Button>\n )}\n </div>\n <div className={iconGroupVariants({ align })}>\n {safeIconArray?.map(icon => (\n <div key={icon?.pcImage?.url || icon?.pcImage?.alt} className=\"h-12\">\n <Picture\n className=\"laptop:w-full h-full\"\n imgClassName=\"h-full object-cover\"\n loading=\"eager\"\n alt={icon?.pcImage?.alt || ''}\n source={icon?.pcImage?.url}\n />\n </div>\n ))}\n </div>\n </div>\n\n {safeCaption.length > 0 && (\n <div\n className={cn(\n 'hero-banner-caption-group laptop:gap-3 tablet:px-[32px] laptop:px-[64px] lg-desktop:px-[calc(50%-832px)] desktop:pb-[24px] absolute bottom-0 z-10 flex items-stretch gap-2 px-[16px] pb-[16px]',\n classNames.captionGroup\n )}\n >\n {safeCaption.map((c, index) => (\n <React.Fragment key={c.title}>\n <Text\n size={2}\n className={cn(\n 'hero-banner-product-text tablet:w-[108px] loptop:w-[150px] desktop:w-[156px] lg-desktop:w-[180px] laptop:text-[14px] flex-1 text-[12px]'\n )}\n html={c.title}\n />\n {index < safeCaption.length - 1 && <div className={cn('bg-info-primary w-px')} />}\n </React.Fragment>\n ))}\n </div>\n )}\n\n {/* \u89C6\u9891\u5F39\u7A97 */}\n {visible && (\n <VideoModal\n visible={visible}\n videoUrl={secondaryButton?.isYoutubeVideo ? undefined : secondaryButton?.videoUrl?.url}\n youTubeId={secondaryButton?.isYoutubeVideo ? secondaryButton?.youtubeId : undefined}\n onCloseModal={() => setVisible(false)}\n />\n )}\n </div>\n </div>\n )\n }\n)\n\nHeroBanner.displayName = 'HeroBanner'\n\nexport default withLayout(HeroBanner)\n"],
|
|
5
|
+
"mappings": "aAkHM,OAwMQ,YAAAA,GAxMR,OAAAC,EAwMQ,QAAAC,MAxMR,oBAjHN,OAAOC,IAAS,uBAAAC,GAAqB,UAAAC,EAAQ,YAAAC,GAAU,aAAAC,OAAiB,QACxE,OAAOC,MAAU,OACjB,OAAS,iBAAAC,MAAqB,0BAC9B,OAAOC,MAAU,UAEjB,OAAS,2BAAAC,OAA+B,yCACxC,OAAS,aAAAC,OAAiB,8BAC1B,OAAOC,OAAqB,mCAC5B,OAAS,UAAAC,EAAQ,WAAAC,GAAS,WAAAC,EAAS,QAAAC,EAAM,aAAAC,OAAiB,4BAC1D,OAAS,MAAAC,MAAU,yBACnB,OAAS,OAAAC,MAAW,2BACpB,OAAS,cAAAC,OAAkB,yBAC3B,OAAS,eAAAC,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,OAAmD,UAAU,OAC5D,SAAAA,EAACe,EAAA,CACC,UAAU,uBACV,aAAa,sBACb,QAAQ,QACR,IAAKmF,GAAM,SAAS,KAAO,GAC3B,OAAQA,GAAM,SAAS,IACzB,GAPQA,GAAM,SAAS,KAAOA,GAAM,SAAS,GAQ/C,CACD,EACH,GACF,EAECtB,EAAY,OAAS,GACpB5E,EAAC,OACC,UAAWkB,EACT,iMACAuB,EAAW,YACb,EAEC,SAAAmC,EAAY,IAAI,CAACuB,EAAGC,IACnBnG,EAACC,GAAM,SAAN,CACC,UAAAF,EAACgB,EAAA,CACC,KAAM,EACN,UAAWE,EACT,yIACF,EACA,KAAMiF,EAAE,MACV,EACCC,EAAQxB,EAAY,OAAS,GAAK5E,EAAC,OAAI,UAAWkB,EAAG,sBAAsB,EAAG,IAR5DiF,EAAE,KASvB,CACD,EACH,EAIDnB,GACChF,EAAC0B,GAAA,CACC,QAASsD,EACT,SAAUb,GAAiB,eAAiB,OAAYA,GAAiB,UAAU,IACnF,UAAWA,GAAiB,eAAiBA,GAAiB,UAAY,OAC1E,aAAc,IAAMc,GAAW,EAAK,EACtC,GAEJ,EACF,CAEJ,CACF,EAEA3C,GAAW,YAAc,aAEzB,IAAO+D,GAAQjF,GAAWkB,EAAU",
|
|
6
|
+
"names": ["Fragment", "jsx", "jsxs", "React", "useImperativeHandle", "useRef", "useState", "useEffect", "gsap", "ScrollTrigger", "jump", "useIsomorphicMediaQuery", "useInView", "ScrollLoadVideo", "Button", "Heading", "Picture", "Text", "Countdown", "cn", "cva", "withLayout", "useExposure", "trackUrlRef", "getLocalizedPath", "useAiuiContext", "sizeMap", "VideoModal", "HeroBannerCarousel", "componentType", "componentName", "contentVariants", "textVariants", "buttonGroupVariants", "iconGroupVariants", "PlayButtonAppendIcon", "size", "width", "height", "HeroBanner", "data", "className", "classNames", "onSecondaryClick", "onPrimaryClick", "onTertiaryClick", "jumpOptions", "rest", "ref", "locale", "mergedJumpOptions", "localizeUrl", "url", "label", "title", "subtitle", "endDate", "endDate_tz", "dateFormat", "pcImage", "padImage", "mobileImage", "pcVideo", "padVideo", "mobileVideo", "isShowVideo", "isVideoLoop", "primaryButton", "secondaryButton", "tertiaryButton", "theme", "titleSize", "caption", "blockLink", "iconArray", "align", "enableParallax", "safeCaption", "safeIconArray", "isMobile", "isPad", "visible", "setVisible", "inViewRef", "inView", "scrollTriggerRef", "bgTriggerRef", "boxTriggerRef", "bgRef", "boxRef", "blockLinkLabel", "resolvedComponentTitle", "resolvedComponentDescription", "gsapResize", "clientHeight", "self", "value", "e", "element", "icon", "c", "index", "HeroBanner_default"]
|
|
7
7
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use client";import{Fragment as ne,jsx as e,jsxs as
|
|
1
|
+
"use client";import{Fragment as ne,jsx as e,jsxs as r}from"react/jsx-runtime";import I,{useRef as A,useEffect as $,useCallback as U,useState as O}from"react";import{Swiper as X,SwiperSlide as Y}from"swiper/react";import{Navigation as q,Pagination as F,Autoplay as Z}from"swiper/modules";import{useIsomorphicMediaQuery as W}from"../../hooks/useIsomorphicMediaQuery.js";import ee from"../../helpers/ScrollLoadVideo.js";import{cn as p}from"../../helpers/index.js";import{Button as _,Heading as te,Text as E,Countdown as ae,Picture as M}from"../../components/index.js";import"swiper/css";import"swiper/css/navigation";import"swiper/css/pagination";const ie=()=>r("svg",{className:"lg-desktop:size-14 size-10",viewBox:"0 0 40 40",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",children:[e("circle",{cx:"20",cy:"20",r:"20",fill:"currentColor",fillOpacity:"0.2"}),e("path",{d:"M23 13L16 20L23 27",stroke:"white",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})]}),oe=()=>r("svg",{className:"lg-desktop:size-14 size-10",viewBox:"0 0 40 40",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",children:[e("circle",{cx:"20",cy:"20",r:"20",fill:"currentColor",fillOpacity:"0.2"}),e("path",{d:"M17 13L24 20L17 27",stroke:"white",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})]}),re=({data:l,isActive:j,videoRef:R,slideIndex:w,onPrimaryClick:z,onSecondaryClick:B,onTertiaryClick:T})=>{const{pcVideo:v,padVideo:c,mobileVideo:d,pcImage:y,padImage:u,mobileImage:m,isVideoLoop:H=!0,isShowVideo:b,title:k,subtitle:P,label:C,endDate:g,endDate_tz:L,dateFormat:S,iconArray:n,caption:x,blockLink:N,primaryButton:s,secondaryButton:t,tertiaryButton:a,theme:f="light",align:o="left",titleSize:h,size:D="default"}=l,G=W({query:"(max-width: 768px)"}),J=W({query:"(max-width: 1024px)"}),K=G?d?.url||v?.url||"":J?c?.url||v?.url||d?.url||"":v?.url||d?.url||"";return r("div",{"data-ui-component-id":"HeroBannerSlide",className:p("text-info-primary relative w-full overflow-hidden",f==="dark"?"aiui-dark":"",D==="default"?"lg-desktop:aspect-[1920/930] desktop:aspect-[1440/700] laptop:aspect-[1024/520] tablet:aspect-[768/660] aspect-[390/660]":"lg-desktop:aspect-[1920/800] desktop:aspect-[1440/640] laptop:aspect-[1024/480] tablet:aspect-[768/560] aspect-[390/560]"),children:[N&&e("a",{className:"absolute inset-0 z-10",href:N,tabIndex:-1,"aria-hidden":"true"}),b?r(ne,{children:[e("div",{"data-video-poster":"true",className:"absolute inset-0 size-full transition-opacity duration-500",children:e(M,{className:"absolute inset-0 size-full",imgClassName:"size-full object-cover",loading:w===0?"eager":"lazy",fetchPriority:w===0?"high":"auto",alt:y?.alt||"",source:`${y?.url||""} , ${u?.url??(m?.url||"")} 1024, ${m?.url||""} 767`})}),e(ee,{videoRef:R,src:K,poster:void 0,className:"absolute inset-0 size-full",videoClassName:"size-full object-cover",muted:!0,loop:H,playsInline:!0,onPlaying:i=>{i.currentTarget.closest('[data-ui-component-id="HeroBannerSlide"]')?.querySelector('[data-video-poster="true"]')?.classList.add("opacity-0")}})]}):e(M,{className:"absolute inset-0 size-full",imgClassName:"size-full object-cover",loading:"eager",fetchPriority:"high",alt:y?.alt||"",source:`${y?.url||""} , ${u?.url??(m?.url||"")} 1024, ${m?.url||""} 767`}),r("div",{className:p("laptop:top-1/2 laptop:-translate-y-1/2 lg-desktop:gap-[32px] absolute top-24 z-10 flex w-full flex-col gap-[24px]",o==="center"?"left-1/2 -translate-x-1/2 items-center text-center":"tablet:px-[32px] laptop:px-[64px] lg-desktop:px-[calc(50%-832px)] left-0 px-[16px]"),children:[r("div",{className:p("tablet:max-w-[704px] laptop:max-w-[440px] desktop:max-w-[648px] lg-desktop:max-w-[824px] max-w-[358px]",o==="center"?"text-center":"laptop:text-left"),children:[C&&e(E,{size:2,as:"p",className:p("hero-banner-label font-heading lg-desktop:text-[18px] desktop:text-base text-sm"),html:C}),k&&e(te,{as:h==="4"?"h1":"h2",html:k,size:h?Number(h||"5"):D==="sm"?4:5}),P&&e(E,{as:"p",size:2,className:"font-heading lg-desktop:text-[18px] desktop:text-base laptop:mt-2 lg-desktop:mt-4 mt-1 text-sm",html:P}),g&&e("div",{className:"mt-3",children:e(ae,{endDate:g,endDate_tz:L,dateFormat:S,variant:"spacious",align:o})})]}),(s?.text||t?.text||a?.text)&&r("div",{className:p("lg-desktop:gap-3 flex flex-wrap items-center gap-2",o==="center"?"justify-center":"laptop:justify-start"),children:[t?.text&&e(_,{size:"lg",variant:"secondary",as:t?.isCustomSecondaryButton?"button":"a",href:t.link,onClick:i=>t?.isCustomSecondaryButton&&B?.(l,i,t?.customSecondaryEventId),children:t.text}),s?.text&&e(_,{size:"lg",variant:"primary",as:s?.isCustomPrimaryButton?"button":"a",href:s.link,onClick:i=>s?.isCustomPrimaryButton&&z?.(l,i,s?.customPrimaryEventId),children:s.text}),a?.text&&e(_,{size:"lg",variant:"link",className:"tablet:basis-auto basis-full",as:a?.isCustomTertiaryButton?"button":"a",href:a.link,target:a?.target,rel:a?.target==="_blank"?a?.rel??"noopener noreferrer":a?.rel,onClick:i=>a?.isCustomTertiaryButton&&T?.(l,i,a?.customTertiaryEventId),children:a.text})]}),n&&n.length>0&&e("div",{className:p("flex items-center gap-2",o==="center"?"justify-center":"justify-start"),children:n.map(i=>e("div",{className:"h-12",children:e(M,{className:"laptop:w-full h-full",imgClassName:"h-full object-cover",loading:"eager",alt:i?.pcImage?.alt||"",source:i?.pcImage?.url})},i?.pcImage?.url||i?.pcImage?.alt))})]}),x&&x.length>0&&e("div",{className:"hero-banner-caption-group laptop:gap-3 tablet:px-[32px] laptop:px-[64px] lg-desktop:px-[calc(50%-832px)] desktop:pb-[24px] absolute bottom-0 z-10 flex items-stretch gap-2 px-[16px] pb-[16px]",children:x.map((i,V)=>r(I.Fragment,{children:[e(E,{size:2,className:"hero-banner-product-text tablet:w-[108px] desktop:w-[156px] lg-desktop:w-[180px] laptop:text-[14px] flex-1 text-[12px]",html:i.title}),V<x.length-1&&e("div",{className:"bg-info-primary w-px"})]},i.title))})]})},Q=I.forwardRef(({data:l,className:j,classNames:R={},onPrimaryClick:w,onSecondaryClick:z,onTertiaryClick:B,...T},v)=>{const c=l.items||[],d=l.carousel,y=l.size??"default",u=A(null),[m,H]=O(0),[b,k]=O(null),C=(c[m]?.theme??"light")==="dark";$(()=>{const t=u.current;!t||!b||t.pagination&&(t.pagination.el=b,t.pagination.init(),t.pagination.render(),t.pagination.update())},[b]);const g=A(c.map(()=>I.createRef())),L=(d?.showArrows??!0)&&c.length>1,S=d?.showDots??!0,n=d?.autoplaySeconds,x=n!==void 0&&n>0?[q,F,Z]:[q,F],N=n!==void 0&&n>0?{delay:Math.max(n*1e3,3e3),disableOnInteraction:!1}:!1;$(()=>{g.current.forEach((t,a)=>{a!==0&&t.current&&(t.current.pause(),t.current.currentTime=0)})},[]);const s=U(t=>{const a=t.realIndex;g.current.forEach((o,h)=>{h!==a&&o.current&&(o.current.pause(),o.current.currentTime=0)});const f=g.current[a];f?.current&&f.current.paused&&f.current.play()?.catch(()=>{}),H(a)},[]);return r("div",{ref:v,className:p("hero-banner-carousel group relative w-full overflow-hidden",y==="default"?"lg-desktop:aspect-[1920/930] desktop:aspect-[1440/700] laptop:aspect-[1024/520] tablet:aspect-[768/660] aspect-[390/660]":"lg-desktop:aspect-[1920/800] desktop:aspect-[1440/640] laptop:aspect-[1024/480] tablet:aspect-[768/560] aspect-[390/560]",{"aiui-dark":c[m]?.theme==="dark"},j),...T,children:[e(X,{onSwiper:t=>u.current=t,onSlideChange:s,modules:x,slidesPerView:1,loop:!0,initialSlide:0,allowTouchMove:!0,autoplay:N,pagination:S?{clickable:!0,el:b,renderBullet:(t,a)=>`<span class="${a} banner-dot"></span>`}:!1,children:c.map((t,a)=>e(Y,{children:({isActive:f})=>e(re,{data:t,isActive:f,slideIndex:a,videoRef:g.current[a],onPrimaryClick:w,onSecondaryClick:z,onTertiaryClick:B})},a))}),L&&r("div",{className:"pointer-events-none absolute inset-0 z-20 flex items-center justify-between px-4",children:[e("button",{type:"button",className:"tablet:flex pointer-events-auto hidden scale-95 items-center justify-center opacity-0 transition-all duration-300 ease-out hover:scale-105 focus-visible:scale-105 group-focus-within:scale-100 group-focus-within:opacity-100 group-hover:scale-100 group-hover:opacity-100",onClick:()=>u.current?.slidePrev(),"aria-label":"Previous banner",children:e(ie,{})}),e("button",{type:"button",className:"tablet:flex pointer-events-auto hidden scale-95 items-center justify-center opacity-0 transition-all duration-300 ease-out hover:scale-105 focus-visible:scale-105 group-focus-within:scale-100 group-focus-within:opacity-100 group-hover:scale-100 group-hover:opacity-100",onClick:()=>u.current?.slideNext(),"aria-label":"Next banner",children:e(oe,{})})]}),S&&e("div",{ref:k,style:{"--swiper-pagination-bottom":"0px"},className:p("hero-banner-pagination swiper-pagination lg-desktop:!bottom-6 [&_.banner-dot.swiper-pagination-bullet-active]:bg-info-primary [&_.banner-dot]:bg-info-quaternary absolute !bottom-4 !left-1/2 z-20 flex !w-auto !-translate-x-1/2 items-center justify-center gap-2 [&_.banner-dot.swiper-pagination-bullet-active]:h-2 [&_.banner-dot.swiper-pagination-bullet-active]:w-8 [&_.banner-dot.swiper-pagination-bullet-active]:rounded-full [&_.banner-dot]:size-2 [&_.banner-dot]:rounded-full [&_.banner-dot]:transition-all [&_.banner-dot]:duration-300 [&_.banner-dot]:ease-out [&_.swiper-pagination-bullet]:m-0 [&_.swiper-pagination-bullet]:shrink-0 [&_.swiper-pagination-bullet]:opacity-100",{"aiui-dark":C})})]})});Q.displayName="HeroBannerCarousel";var be=Q;export{be as default};
|
|
2
2
|
//# sourceMappingURL=HeroBannerCarousel.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/biz-components/HeroBanner/HeroBannerCarousel.tsx"],
|
|
4
|
-
"sourcesContent": ["'use client'\nimport React, { useRef, useEffect, useCallback, useState } from 'react'\nimport { Swiper, SwiperSlide } from 'swiper/react'\nimport { Navigation, Pagination, Autoplay } from 'swiper/modules'\nimport type { Swiper as SwiperType } from 'swiper'\nimport { useMediaQuery } from 'react-responsive'\nimport ScrollLoadVideo from '../../helpers/ScrollLoadVideo.js'\nimport { cn } from '../../helpers/index.js'\nimport type { HeroBannerProps, HeroBannerSlideData } from './types.js'\nimport { Button, Heading, Text, Countdown, Picture } from '../../components/index.js'\n\nimport 'swiper/css'\nimport 'swiper/css/navigation'\nimport 'swiper/css/pagination'\n\n// \u2500\u2500 Arrow icons \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n\nconst ChevronLeft = () => (\n <svg\n className=\"lg-desktop:size-14 size-10\"\n viewBox=\"0 0 40 40\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n aria-hidden=\"true\"\n >\n <circle cx=\"20\" cy=\"20\" r=\"20\" fill=\"currentColor\" fillOpacity=\"0.2\" />\n <path d=\"M23 13L16 20L23 27\" stroke=\"white\" strokeWidth=\"2\" strokeLinecap=\"round\" strokeLinejoin=\"round\" />\n </svg>\n)\n\nconst ChevronRight = () => (\n <svg\n className=\"lg-desktop:size-14 size-10\"\n viewBox=\"0 0 40 40\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n aria-hidden=\"true\"\n >\n <circle cx=\"20\" cy=\"20\" r=\"20\" fill=\"currentColor\" fillOpacity=\"0.2\" />\n <path d=\"M17 13L24 20L17 27\" stroke=\"white\" strokeWidth=\"2\" strokeLinecap=\"round\" strokeLinejoin=\"round\" />\n </svg>\n)\n\n// \u2500\u2500 HeroBannerSlide \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n// Minimal per-slide content unit. No GSAP, no withLayout, no useExposure.\n// videoRef is the imperative pause/play channel (DECISION-A003).\n\ninterface HeroBannerSlideProps {\n data: HeroBannerSlideData\n isActive: boolean\n videoRef: React.RefObject<HTMLVideoElement>\n slideIndex: number\n onPrimaryClick?: (data: any, e: any, id?: string) => void\n onSecondaryClick?: (data: any, e: any, id?: string) => void\n onTertiaryClick?: (data: any, e: any, id?: string) => void\n}\n\nconst HeroBannerSlide = ({\n data,\n isActive: _isActive,\n videoRef,\n slideIndex,\n onPrimaryClick,\n onSecondaryClick,\n onTertiaryClick,\n}: HeroBannerSlideProps) => {\n const {\n pcVideo,\n padVideo,\n mobileVideo,\n pcImage,\n padImage,\n mobileImage,\n isVideoLoop = true,\n isShowVideo,\n title,\n subtitle,\n label,\n endDate,\n endDate_tz,\n dateFormat,\n iconArray,\n caption,\n blockLink,\n primaryButton,\n secondaryButton,\n tertiaryButton,\n theme = 'light',\n align = 'left',\n titleSize,\n size = 'default',\n } = data\n\n const isMobile = useMediaQuery({ query: '(max-width: 768px)' })\n const isPad = useMediaQuery({ query: '(max-width: 1024px)' })\n\n const videoSrc = isMobile\n ? mobileVideo?.url || pcVideo?.url || ''\n : isPad\n ? padVideo?.url || pcVideo?.url || mobileVideo?.url || ''\n : pcVideo?.url || mobileVideo?.url || ''\n\n return (\n <div\n data-ui-component-id=\"HeroBannerSlide\"\n className={cn(\n 'text-info-primary relative w-full overflow-hidden',\n theme === 'dark' ? 'aiui-dark' : '',\n size === 'default'\n ? 'lg-desktop:aspect-[1920/930] desktop:aspect-[1440/700] laptop:aspect-[1024/520] tablet:aspect-[768/660] aspect-[390/660]'\n : 'lg-desktop:aspect-[1920/800] desktop:aspect-[1440/640] laptop:aspect-[1024/480] tablet:aspect-[768/560] aspect-[390/560]'\n )}\n >\n {blockLink && <a className=\"absolute inset-0 z-10\" href={blockLink} tabIndex={-1} aria-hidden=\"true\"></a>}\n {isShowVideo ? (\n <>\n {/* Poster cover layer: slide 0 = eager+high, others = lazy+auto */}\n <div data-video-poster=\"true\" className=\"absolute inset-0 size-full transition-opacity duration-500\">\n <Picture\n className=\"absolute inset-0 size-full\"\n imgClassName=\"size-full object-cover\"\n loading={slideIndex === 0 ? 'eager' : 'lazy'}\n fetchPriority={slideIndex === 0 ? 'high' : 'auto'}\n alt={pcImage?.alt || ''}\n source={`${pcImage?.url || ''} , ${padImage?.url ?? (mobileImage?.url || '')} 1024, ${mobileImage?.url || ''} 767`}\n />\n </div>\n {/* Video layer: lazy-loaded, overlays Picture via DOM order */}\n <ScrollLoadVideo\n videoRef={videoRef}\n src={videoSrc}\n poster={undefined}\n className=\"absolute inset-0 size-full\"\n videoClassName=\"size-full object-cover\"\n muted\n loop={isVideoLoop}\n playsInline\n onPlaying={(e: React.SyntheticEvent<HTMLVideoElement>) => {\n const slide = (e.currentTarget as HTMLVideoElement).closest('[data-ui-component-id=\"HeroBannerSlide\"]')\n slide?.querySelector<HTMLElement>('[data-video-poster=\"true\"]')?.classList.add('opacity-0')\n }}\n />\n </>\n ) : (\n <Picture\n className=\"absolute inset-0 size-full\"\n imgClassName=\"size-full object-cover\"\n loading=\"eager\"\n fetchPriority=\"high\"\n alt={pcImage?.alt || ''}\n source={`${pcImage?.url || ''} , ${padImage?.url ?? (mobileImage?.url || '')} 1024, ${mobileImage?.url || ''} 767`}\n />\n )}\n\n {/* Content Overlay */}\n <div\n className={cn(\n 'laptop:top-1/2 laptop:-translate-y-1/2 lg-desktop:gap-[32px] absolute top-24 z-10 flex w-full flex-col gap-[24px]',\n align === 'center'\n ? 'left-1/2 -translate-x-1/2 items-center text-center'\n : 'tablet:px-[32px] laptop:px-[64px] lg-desktop:px-[calc(50%-832px)] left-0 px-[16px]'\n )}\n >\n <div\n className={cn(\n 'tablet:max-w-[704px] laptop:max-w-[440px] desktop:max-w-[648px] lg-desktop:max-w-[824px] max-w-[358px]',\n align === 'center' ? 'text-center' : 'laptop:text-left'\n )}\n >\n {label && (\n <Text\n size={2}\n as=\"p\"\n className={cn('hero-banner-label font-heading lg-desktop:text-[18px] desktop:text-base text-sm')}\n html={label}\n />\n )}\n {title && (\n <Heading\n as={titleSize === '4' ? 'h1' : 'h2'}\n html={title}\n size={titleSize ? (Number(titleSize || '5') as any) : size === 'sm' ? 4 : 5}\n />\n )}\n {subtitle && (\n <Text\n as=\"p\"\n size={2}\n className=\"font-heading lg-desktop:text-[18px] desktop:text-base laptop:mt-2 lg-desktop:mt-4 mt-1 text-sm\"\n html={subtitle}\n />\n )}\n {endDate && (\n <div className=\"mt-3\">\n <Countdown\n endDate={endDate}\n endDate_tz={endDate_tz}\n dateFormat={dateFormat}\n variant=\"spacious\"\n align={align}\n />\n </div>\n )}\n </div>\n\n {(primaryButton?.text || secondaryButton?.text || tertiaryButton?.text) && (\n <div\n className={cn(\n 'lg-desktop:gap-3 flex flex-wrap items-center gap-2',\n align === 'center' ? 'justify-center' : 'laptop:justify-start'\n )}\n >\n {secondaryButton?.text && (\n <Button\n size=\"lg\"\n variant=\"secondary\"\n as={secondaryButton?.isCustomSecondaryButton ? 'button' : 'a'}\n href={secondaryButton.link}\n target={secondaryButton?.target}\n rel={\n secondaryButton?.target === '_blank'\n ? (secondaryButton?.rel ?? 'noopener noreferrer')\n : secondaryButton?.rel\n }\n onClick={e =>\n secondaryButton?.isCustomSecondaryButton &&\n onSecondaryClick?.(data, e, secondaryButton?.customSecondaryEventId)\n }\n >\n {secondaryButton.text}\n </Button>\n )}\n {primaryButton?.text && (\n <Button\n size=\"lg\"\n variant=\"primary\"\n as={primaryButton?.isCustomPrimaryButton ? 'button' : 'a'}\n href={primaryButton.link}\n target={primaryButton?.target}\n rel={\n primaryButton?.target === '_blank'\n ? (primaryButton?.rel ?? 'noopener noreferrer')\n : primaryButton?.rel\n }\n onClick={e =>\n primaryButton?.isCustomPrimaryButton && onPrimaryClick?.(data, e, primaryButton?.customPrimaryEventId)\n }\n >\n {primaryButton.text}\n </Button>\n )}\n {tertiaryButton?.text && (\n <Button\n size=\"lg\"\n variant=\"link\"\n className=\"tablet:basis-auto basis-full\"\n as={tertiaryButton?.isCustomTertiaryButton ? 'button' : 'a'}\n href={tertiaryButton.link}\n target={tertiaryButton?.target}\n rel={\n tertiaryButton?.target === '_blank'\n ? (tertiaryButton?.rel ?? 'noopener noreferrer')\n : tertiaryButton?.rel\n }\n onClick={e =>\n tertiaryButton?.isCustomTertiaryButton &&\n onTertiaryClick?.(data, e, tertiaryButton?.customTertiaryEventId)\n }\n >\n {tertiaryButton.text}\n </Button>\n )}\n </div>\n )}\n {iconArray && iconArray.length > 0 && (\n <div className={cn('flex items-center gap-2', align === 'center' ? 'justify-center' : 'justify-start')}>\n {iconArray.map((icon: any) => (\n <div key={icon?.pcImage?.url || icon?.pcImage?.alt} className=\"h-12\">\n <Picture\n className=\"laptop:w-full h-full\"\n imgClassName=\"h-full object-cover\"\n loading=\"eager\"\n alt={icon?.pcImage?.alt || ''}\n source={icon?.pcImage?.url}\n />\n </div>\n ))}\n </div>\n )}\n </div>\n\n {caption && caption.length > 0 && (\n <div className=\"hero-banner-caption-group laptop:gap-3 tablet:px-[32px] laptop:px-[64px] lg-desktop:px-[calc(50%-832px)] desktop:pb-[24px] absolute bottom-0 z-10 flex items-stretch gap-2 px-[16px] pb-[16px]\">\n {caption.map((c: { title: string }, index: number) => (\n <React.Fragment key={c.title}>\n <Text\n size={2}\n className=\"hero-banner-product-text tablet:w-[108px] desktop:w-[156px] lg-desktop:w-[180px] laptop:text-[14px] flex-1 text-[12px]\"\n html={c.title}\n />\n {index < caption.length - 1 && <div className=\"bg-info-primary w-px\" />}\n </React.Fragment>\n ))}\n </div>\n )}\n </div>\n )\n}\n\n// \u2500\u2500 HeroBannerCarousel \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n\ninterface HeroBannerCarouselProps extends React.HTMLAttributes<HTMLDivElement> {\n data: HeroBannerProps['data']\n classNames?: Record<string, string>\n onPrimaryClick?: (data: any, e: any, id?: string) => void\n onSecondaryClick?: (data: any, e: any, id?: string) => void\n onTertiaryClick?: (data: any, e: any, id?: string) => void\n}\n\n/**\n * HeroBannerCarousel \u2014 arrows-only Navigation Swiper wrapping HeroBannerSlide units.\n *\n * Architecture:\n * - DECISION-A007: Navigation only, loop=false, slidesPerView=1\n * - DECISION-A003: ScrollLoadVideo videoRef as imperative pause channel\n * - DECISION-A010: initial activeIndex=0; useEffect pauses slides 1..N on mount\n * - DECISION-A006: arrow buttons at z-[20], above blockLink overlay z-10\n * - ISSUE-017: post-mount pause wins over IO rootMargin='200px' race\n */\nconst HeroBannerCarousel = React.forwardRef<HTMLDivElement, HeroBannerCarouselProps>(\n (\n {\n data,\n className,\n classNames: _classNames = {},\n onPrimaryClick: _onPrimaryClick,\n onSecondaryClick: _onSecondaryClick,\n onTertiaryClick: _onTertiaryClick,\n ...rest\n },\n ref\n ) => {\n const items = data.items || []\n const carousel = data.carousel\n const containerSize = data.size ?? 'default'\n\n const swiperRef = useRef<SwiperType | null>(null)\n const [activeIndex, setActiveIndex] = useState(0)\n const [paginationEl, setPaginationEl] = useState<HTMLDivElement | null>(null)\n\n const activeTheme = items[activeIndex]?.theme ?? 'light'\n const isDark = activeTheme === 'dark'\n\n useEffect(() => {\n const swiper = swiperRef.current\n if (!swiper || !paginationEl) return\n if (swiper.pagination) {\n swiper.pagination.el = paginationEl\n swiper.pagination.init()\n swiper.pagination.render()\n swiper.pagination.update()\n }\n }, [paginationEl])\n\n const videoRefs = useRef<React.RefObject<HTMLVideoElement>[]>(items.map(() => React.createRef<HTMLVideoElement>()))\n\n const showArrowControls = (carousel?.showArrows ?? true) && items.length > 1\n const showDots = carousel?.showDots ?? true\n\n const autoplaySeconds = carousel?.autoplaySeconds\n const swiperModules =\n autoplaySeconds !== undefined && autoplaySeconds > 0\n ? [Navigation, Pagination, Autoplay]\n : [Navigation, Pagination]\n const autoplayConfig =\n autoplaySeconds !== undefined && autoplaySeconds > 0\n ? { delay: Math.max(autoplaySeconds * 1000, 3000), disableOnInteraction: false }\n : false\n\n useEffect(() => {\n videoRefs.current.forEach((vRef, i) => {\n if (i !== 0 && vRef.current) {\n vRef.current.pause()\n vRef.current.currentTime = 0\n }\n })\n }, [])\n\n const handleSlideChange = useCallback((swiper: SwiperType) => {\n const newIndex = swiper.realIndex\n videoRefs.current.forEach((vRef, i) => {\n if (i !== newIndex && vRef.current) {\n vRef.current.pause()\n vRef.current.currentTime = 0\n }\n })\n const incoming = videoRefs.current[newIndex]\n if (incoming?.current && incoming.current.paused) {\n const p = incoming.current.play()\n p?.catch(() => {})\n }\n setActiveIndex(newIndex)\n }, [])\n\n return (\n <div\n ref={ref}\n className={cn(\n 'hero-banner-carousel group relative w-full overflow-hidden',\n containerSize === 'default'\n ? 'lg-desktop:aspect-[1920/930] desktop:aspect-[1440/700] laptop:aspect-[1024/520] tablet:aspect-[768/660] aspect-[390/660]'\n : 'lg-desktop:aspect-[1920/800] desktop:aspect-[1440/640] laptop:aspect-[1024/480] tablet:aspect-[768/560] aspect-[390/560]',\n { 'aiui-dark': items[activeIndex]?.theme === 'dark' },\n className\n )}\n {...rest}\n >\n <Swiper\n onSwiper={s => (swiperRef.current = s)}\n onSlideChange={handleSlideChange}\n modules={swiperModules}\n slidesPerView={1}\n loop={true}\n initialSlide={0}\n allowTouchMove={true}\n autoplay={autoplayConfig}\n pagination={\n showDots\n ? {\n clickable: true,\n el: paginationEl,\n renderBullet: (_index: number, className: string) => `<span class=\"${className} banner-dot\"></span>`,\n }\n : false\n }\n >\n {items.map((slideData, index) => (\n <SwiperSlide key={index}>\n {({ isActive }) => (\n <HeroBannerSlide\n data={slideData}\n isActive={isActive}\n slideIndex={index}\n videoRef={videoRefs.current[index]}\n onPrimaryClick={_onPrimaryClick}\n onSecondaryClick={_onSecondaryClick}\n onTertiaryClick={_onTertiaryClick}\n />\n )}\n </SwiperSlide>\n ))}\n </Swiper>\n\n {showArrowControls && (\n <div className=\"pointer-events-none absolute inset-0 z-20 flex items-center justify-between px-4\">\n <button\n type=\"button\"\n className=\"tablet:flex pointer-events-auto hidden scale-95 items-center justify-center opacity-0 transition-all duration-300 ease-out hover:scale-105 focus-visible:scale-105 group-focus-within:scale-100 group-focus-within:opacity-100 group-hover:scale-100 group-hover:opacity-100\"\n onClick={() => swiperRef.current?.slidePrev()}\n aria-label=\"Previous banner\"\n >\n <ChevronLeft />\n </button>\n <button\n type=\"button\"\n className=\"tablet:flex pointer-events-auto hidden scale-95 items-center justify-center opacity-0 transition-all duration-300 ease-out hover:scale-105 focus-visible:scale-105 group-focus-within:scale-100 group-focus-within:opacity-100 group-hover:scale-100 group-hover:opacity-100\"\n onClick={() => swiperRef.current?.slideNext()}\n aria-label=\"Next banner\"\n >\n <ChevronRight />\n </button>\n </div>\n )}\n\n {showDots && (\n <div\n ref={setPaginationEl}\n style={{ '--swiper-pagination-bottom': '0px' } as React.CSSProperties}\n className={cn(\n 'hero-banner-pagination swiper-pagination lg-desktop:!bottom-6 [&_.banner-dot.swiper-pagination-bullet-active]:bg-info-primary [&_.banner-dot]:bg-info-quaternary absolute !bottom-4 !left-1/2 z-20 flex !w-auto !-translate-x-1/2 items-center justify-center gap-2 [&_.banner-dot.swiper-pagination-bullet-active]:h-2 [&_.banner-dot.swiper-pagination-bullet-active]:w-8 [&_.banner-dot.swiper-pagination-bullet-active]:rounded-full [&_.banner-dot]:size-2 [&_.banner-dot]:rounded-full [&_.banner-dot]:transition-all [&_.banner-dot]:duration-300 [&_.banner-dot]:ease-out [&_.swiper-pagination-bullet]:m-0 [&_.swiper-pagination-bullet]:shrink-0 [&_.swiper-pagination-bullet]:opacity-100',\n { 'aiui-dark': isDark }\n )}\n />\n )}\n </div>\n )\n }\n)\n\nHeroBannerCarousel.displayName = 'HeroBannerCarousel'\n\nexport default HeroBannerCarousel\n"],
|
|
5
|
-
"mappings": "aAkBE,OAiGM,YAAAA,GA1FJ,OAAAC,EAPF,QAAAC,MAAA,oBAjBF,OAAOC,GAAS,UAAAC,EAAQ,aAAAC,EAAW,eAAAC,EAAa,YAAAC,MAAgB,QAChE,OAAS,UAAAC,EAAQ,eAAAC,MAAmB,eACpC,OAAS,cAAAC,EAAY,cAAAC,EAAY,YAAAC,MAAgB,iBAEjD,OAAS,
|
|
6
|
-
"names": ["Fragment", "jsx", "jsxs", "React", "useRef", "useEffect", "useCallback", "useState", "Swiper", "SwiperSlide", "Navigation", "Pagination", "Autoplay", "
|
|
4
|
+
"sourcesContent": ["'use client'\nimport React, { useRef, useEffect, useCallback, useState } from 'react'\nimport { Swiper, SwiperSlide } from 'swiper/react'\nimport { Navigation, Pagination, Autoplay } from 'swiper/modules'\nimport type { Swiper as SwiperType } from 'swiper'\nimport { useIsomorphicMediaQuery } from '../../hooks/useIsomorphicMediaQuery.js'\nimport ScrollLoadVideo from '../../helpers/ScrollLoadVideo.js'\nimport { cn } from '../../helpers/index.js'\nimport type { HeroBannerProps, HeroBannerSlideData } from './types.js'\nimport { Button, Heading, Text, Countdown, Picture } from '../../components/index.js'\n\nimport 'swiper/css'\nimport 'swiper/css/navigation'\nimport 'swiper/css/pagination'\n\n// \u2500\u2500 Arrow icons \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n\nconst ChevronLeft = () => (\n <svg\n className=\"lg-desktop:size-14 size-10\"\n viewBox=\"0 0 40 40\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n aria-hidden=\"true\"\n >\n <circle cx=\"20\" cy=\"20\" r=\"20\" fill=\"currentColor\" fillOpacity=\"0.2\" />\n <path d=\"M23 13L16 20L23 27\" stroke=\"white\" strokeWidth=\"2\" strokeLinecap=\"round\" strokeLinejoin=\"round\" />\n </svg>\n)\n\nconst ChevronRight = () => (\n <svg\n className=\"lg-desktop:size-14 size-10\"\n viewBox=\"0 0 40 40\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n aria-hidden=\"true\"\n >\n <circle cx=\"20\" cy=\"20\" r=\"20\" fill=\"currentColor\" fillOpacity=\"0.2\" />\n <path d=\"M17 13L24 20L17 27\" stroke=\"white\" strokeWidth=\"2\" strokeLinecap=\"round\" strokeLinejoin=\"round\" />\n </svg>\n)\n\n// \u2500\u2500 HeroBannerSlide \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n// Minimal per-slide content unit. No GSAP, no withLayout, no useExposure.\n// videoRef is the imperative pause/play channel (DECISION-A003).\n\ninterface HeroBannerSlideProps {\n data: HeroBannerSlideData\n isActive: boolean\n videoRef: React.RefObject<HTMLVideoElement>\n slideIndex: number\n onPrimaryClick?: (data: any, e: any, id?: string) => void\n onSecondaryClick?: (data: any, e: any, id?: string) => void\n onTertiaryClick?: (data: any, e: any, id?: string) => void\n}\n\nconst HeroBannerSlide = ({\n data,\n isActive: _isActive,\n videoRef,\n slideIndex,\n onPrimaryClick,\n onSecondaryClick,\n onTertiaryClick,\n}: HeroBannerSlideProps) => {\n const {\n pcVideo,\n padVideo,\n mobileVideo,\n pcImage,\n padImage,\n mobileImage,\n isVideoLoop = true,\n isShowVideo,\n title,\n subtitle,\n label,\n endDate,\n endDate_tz,\n dateFormat,\n iconArray,\n caption,\n blockLink,\n primaryButton,\n secondaryButton,\n tertiaryButton,\n theme = 'light',\n align = 'left',\n titleSize,\n size = 'default',\n } = data\n\n const isMobile = useIsomorphicMediaQuery({ query: '(max-width: 768px)' })\n const isPad = useIsomorphicMediaQuery({ query: '(max-width: 1024px)' })\n\n const videoSrc = isMobile\n ? mobileVideo?.url || pcVideo?.url || ''\n : isPad\n ? padVideo?.url || pcVideo?.url || mobileVideo?.url || ''\n : pcVideo?.url || mobileVideo?.url || ''\n\n return (\n <div\n data-ui-component-id=\"HeroBannerSlide\"\n className={cn(\n 'text-info-primary relative w-full overflow-hidden',\n theme === 'dark' ? 'aiui-dark' : '',\n size === 'default'\n ? 'lg-desktop:aspect-[1920/930] desktop:aspect-[1440/700] laptop:aspect-[1024/520] tablet:aspect-[768/660] aspect-[390/660]'\n : 'lg-desktop:aspect-[1920/800] desktop:aspect-[1440/640] laptop:aspect-[1024/480] tablet:aspect-[768/560] aspect-[390/560]'\n )}\n >\n {blockLink && <a className=\"absolute inset-0 z-10\" href={blockLink} tabIndex={-1} aria-hidden=\"true\"></a>}\n {isShowVideo ? (\n <>\n {/* Poster cover layer: slide 0 = eager+high, others = lazy+auto */}\n <div data-video-poster=\"true\" className=\"absolute inset-0 size-full transition-opacity duration-500\">\n <Picture\n className=\"absolute inset-0 size-full\"\n imgClassName=\"size-full object-cover\"\n loading={slideIndex === 0 ? 'eager' : 'lazy'}\n fetchPriority={slideIndex === 0 ? 'high' : 'auto'}\n alt={pcImage?.alt || ''}\n source={`${pcImage?.url || ''} , ${padImage?.url ?? (mobileImage?.url || '')} 1024, ${mobileImage?.url || ''} 767`}\n />\n </div>\n {/* Video layer: lazy-loaded, overlays Picture via DOM order */}\n <ScrollLoadVideo\n videoRef={videoRef}\n src={videoSrc}\n poster={undefined}\n className=\"absolute inset-0 size-full\"\n videoClassName=\"size-full object-cover\"\n muted\n loop={isVideoLoop}\n playsInline\n onPlaying={(e: React.SyntheticEvent<HTMLVideoElement>) => {\n const slide = (e.currentTarget as HTMLVideoElement).closest('[data-ui-component-id=\"HeroBannerSlide\"]')\n slide?.querySelector<HTMLElement>('[data-video-poster=\"true\"]')?.classList.add('opacity-0')\n }}\n />\n </>\n ) : (\n <Picture\n className=\"absolute inset-0 size-full\"\n imgClassName=\"size-full object-cover\"\n loading=\"eager\"\n fetchPriority=\"high\"\n alt={pcImage?.alt || ''}\n source={`${pcImage?.url || ''} , ${padImage?.url ?? (mobileImage?.url || '')} 1024, ${mobileImage?.url || ''} 767`}\n />\n )}\n\n {/* Content Overlay */}\n <div\n className={cn(\n 'laptop:top-1/2 laptop:-translate-y-1/2 lg-desktop:gap-[32px] absolute top-24 z-10 flex w-full flex-col gap-[24px]',\n align === 'center'\n ? 'left-1/2 -translate-x-1/2 items-center text-center'\n : 'tablet:px-[32px] laptop:px-[64px] lg-desktop:px-[calc(50%-832px)] left-0 px-[16px]'\n )}\n >\n <div\n className={cn(\n 'tablet:max-w-[704px] laptop:max-w-[440px] desktop:max-w-[648px] lg-desktop:max-w-[824px] max-w-[358px]',\n align === 'center' ? 'text-center' : 'laptop:text-left'\n )}\n >\n {label && (\n <Text\n size={2}\n as=\"p\"\n className={cn('hero-banner-label font-heading lg-desktop:text-[18px] desktop:text-base text-sm')}\n html={label}\n />\n )}\n {title && (\n <Heading\n as={titleSize === '4' ? 'h1' : 'h2'}\n html={title}\n size={titleSize ? (Number(titleSize || '5') as any) : size === 'sm' ? 4 : 5}\n />\n )}\n {subtitle && (\n <Text\n as=\"p\"\n size={2}\n className=\"font-heading lg-desktop:text-[18px] desktop:text-base laptop:mt-2 lg-desktop:mt-4 mt-1 text-sm\"\n html={subtitle}\n />\n )}\n {endDate && (\n <div className=\"mt-3\">\n <Countdown\n endDate={endDate}\n endDate_tz={endDate_tz}\n dateFormat={dateFormat}\n variant=\"spacious\"\n align={align}\n />\n </div>\n )}\n </div>\n\n {(primaryButton?.text || secondaryButton?.text || tertiaryButton?.text) && (\n <div\n className={cn(\n 'lg-desktop:gap-3 flex flex-wrap items-center gap-2',\n align === 'center' ? 'justify-center' : 'laptop:justify-start'\n )}\n >\n {secondaryButton?.text && (\n <Button\n size=\"lg\"\n variant=\"secondary\"\n as={secondaryButton?.isCustomSecondaryButton ? 'button' : 'a'}\n href={secondaryButton.link}\n onClick={e =>\n secondaryButton?.isCustomSecondaryButton &&\n onSecondaryClick?.(data, e, secondaryButton?.customSecondaryEventId)\n }\n >\n {secondaryButton.text}\n </Button>\n )}\n {primaryButton?.text && (\n <Button\n size=\"lg\"\n variant=\"primary\"\n as={primaryButton?.isCustomPrimaryButton ? 'button' : 'a'}\n href={primaryButton.link}\n onClick={e =>\n primaryButton?.isCustomPrimaryButton && onPrimaryClick?.(data, e, primaryButton?.customPrimaryEventId)\n }\n >\n {primaryButton.text}\n </Button>\n )}\n {tertiaryButton?.text && (\n <Button\n size=\"lg\"\n variant=\"link\"\n className=\"tablet:basis-auto basis-full\"\n as={tertiaryButton?.isCustomTertiaryButton ? 'button' : 'a'}\n href={tertiaryButton.link}\n target={tertiaryButton?.target}\n rel={\n tertiaryButton?.target === '_blank'\n ? (tertiaryButton?.rel ?? 'noopener noreferrer')\n : tertiaryButton?.rel\n }\n onClick={e =>\n tertiaryButton?.isCustomTertiaryButton &&\n onTertiaryClick?.(data, e, tertiaryButton?.customTertiaryEventId)\n }\n >\n {tertiaryButton.text}\n </Button>\n )}\n </div>\n )}\n {iconArray && iconArray.length > 0 && (\n <div className={cn('flex items-center gap-2', align === 'center' ? 'justify-center' : 'justify-start')}>\n {iconArray.map((icon: any) => (\n <div key={icon?.pcImage?.url || icon?.pcImage?.alt} className=\"h-12\">\n <Picture\n className=\"laptop:w-full h-full\"\n imgClassName=\"h-full object-cover\"\n loading=\"eager\"\n alt={icon?.pcImage?.alt || ''}\n source={icon?.pcImage?.url}\n />\n </div>\n ))}\n </div>\n )}\n </div>\n\n {caption && caption.length > 0 && (\n <div className=\"hero-banner-caption-group laptop:gap-3 tablet:px-[32px] laptop:px-[64px] lg-desktop:px-[calc(50%-832px)] desktop:pb-[24px] absolute bottom-0 z-10 flex items-stretch gap-2 px-[16px] pb-[16px]\">\n {caption.map((c: { title: string }, index: number) => (\n <React.Fragment key={c.title}>\n <Text\n size={2}\n className=\"hero-banner-product-text tablet:w-[108px] desktop:w-[156px] lg-desktop:w-[180px] laptop:text-[14px] flex-1 text-[12px]\"\n html={c.title}\n />\n {index < caption.length - 1 && <div className=\"bg-info-primary w-px\" />}\n </React.Fragment>\n ))}\n </div>\n )}\n </div>\n )\n}\n\n// \u2500\u2500 HeroBannerCarousel \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n\ninterface HeroBannerCarouselProps extends React.HTMLAttributes<HTMLDivElement> {\n data: HeroBannerProps['data']\n classNames?: Record<string, string>\n onPrimaryClick?: (data: any, e: any, id?: string) => void\n onSecondaryClick?: (data: any, e: any, id?: string) => void\n onTertiaryClick?: (data: any, e: any, id?: string) => void\n}\n\n/**\n * HeroBannerCarousel \u2014 arrows-only Navigation Swiper wrapping HeroBannerSlide units.\n *\n * Architecture:\n * - DECISION-A007: Navigation only, loop=false, slidesPerView=1\n * - DECISION-A003: ScrollLoadVideo videoRef as imperative pause channel\n * - DECISION-A010: initial activeIndex=0; useEffect pauses slides 1..N on mount\n * - DECISION-A006: arrow buttons at z-[20], above blockLink overlay z-10\n * - ISSUE-017: post-mount pause wins over IO rootMargin='200px' race\n */\nconst HeroBannerCarousel = React.forwardRef<HTMLDivElement, HeroBannerCarouselProps>(\n (\n {\n data,\n className,\n classNames: _classNames = {},\n onPrimaryClick: _onPrimaryClick,\n onSecondaryClick: _onSecondaryClick,\n onTertiaryClick: _onTertiaryClick,\n ...rest\n },\n ref\n ) => {\n const items = data.items || []\n const carousel = data.carousel\n const containerSize = data.size ?? 'default'\n\n const swiperRef = useRef<SwiperType | null>(null)\n const [activeIndex, setActiveIndex] = useState(0)\n const [paginationEl, setPaginationEl] = useState<HTMLDivElement | null>(null)\n\n const activeTheme = items[activeIndex]?.theme ?? 'light'\n const isDark = activeTheme === 'dark'\n\n useEffect(() => {\n const swiper = swiperRef.current\n if (!swiper || !paginationEl) return\n if (swiper.pagination) {\n swiper.pagination.el = paginationEl\n swiper.pagination.init()\n swiper.pagination.render()\n swiper.pagination.update()\n }\n }, [paginationEl])\n\n const videoRefs = useRef<React.RefObject<HTMLVideoElement>[]>(items.map(() => React.createRef<HTMLVideoElement>()))\n\n const showArrowControls = (carousel?.showArrows ?? true) && items.length > 1\n const showDots = carousel?.showDots ?? true\n\n const autoplaySeconds = carousel?.autoplaySeconds\n const swiperModules =\n autoplaySeconds !== undefined && autoplaySeconds > 0\n ? [Navigation, Pagination, Autoplay]\n : [Navigation, Pagination]\n const autoplayConfig =\n autoplaySeconds !== undefined && autoplaySeconds > 0\n ? { delay: Math.max(autoplaySeconds * 1000, 3000), disableOnInteraction: false }\n : false\n\n useEffect(() => {\n videoRefs.current.forEach((vRef, i) => {\n if (i !== 0 && vRef.current) {\n vRef.current.pause()\n vRef.current.currentTime = 0\n }\n })\n }, [])\n\n const handleSlideChange = useCallback((swiper: SwiperType) => {\n const newIndex = swiper.realIndex\n videoRefs.current.forEach((vRef, i) => {\n if (i !== newIndex && vRef.current) {\n vRef.current.pause()\n vRef.current.currentTime = 0\n }\n })\n const incoming = videoRefs.current[newIndex]\n if (incoming?.current && incoming.current.paused) {\n const p = incoming.current.play()\n p?.catch(() => {})\n }\n setActiveIndex(newIndex)\n }, [])\n\n return (\n <div\n ref={ref}\n className={cn(\n 'hero-banner-carousel group relative w-full overflow-hidden',\n containerSize === 'default'\n ? 'lg-desktop:aspect-[1920/930] desktop:aspect-[1440/700] laptop:aspect-[1024/520] tablet:aspect-[768/660] aspect-[390/660]'\n : 'lg-desktop:aspect-[1920/800] desktop:aspect-[1440/640] laptop:aspect-[1024/480] tablet:aspect-[768/560] aspect-[390/560]',\n { 'aiui-dark': items[activeIndex]?.theme === 'dark' },\n className\n )}\n {...rest}\n >\n <Swiper\n onSwiper={s => (swiperRef.current = s)}\n onSlideChange={handleSlideChange}\n modules={swiperModules}\n slidesPerView={1}\n loop={true}\n initialSlide={0}\n allowTouchMove={true}\n autoplay={autoplayConfig}\n pagination={\n showDots\n ? {\n clickable: true,\n el: paginationEl,\n renderBullet: (_index: number, className: string) => `<span class=\"${className} banner-dot\"></span>`,\n }\n : false\n }\n >\n {items.map((slideData, index) => (\n <SwiperSlide key={index}>\n {({ isActive }) => (\n <HeroBannerSlide\n data={slideData}\n isActive={isActive}\n slideIndex={index}\n videoRef={videoRefs.current[index]}\n onPrimaryClick={_onPrimaryClick}\n onSecondaryClick={_onSecondaryClick}\n onTertiaryClick={_onTertiaryClick}\n />\n )}\n </SwiperSlide>\n ))}\n </Swiper>\n\n {showArrowControls && (\n <div className=\"pointer-events-none absolute inset-0 z-20 flex items-center justify-between px-4\">\n <button\n type=\"button\"\n className=\"tablet:flex pointer-events-auto hidden scale-95 items-center justify-center opacity-0 transition-all duration-300 ease-out hover:scale-105 focus-visible:scale-105 group-focus-within:scale-100 group-focus-within:opacity-100 group-hover:scale-100 group-hover:opacity-100\"\n onClick={() => swiperRef.current?.slidePrev()}\n aria-label=\"Previous banner\"\n >\n <ChevronLeft />\n </button>\n <button\n type=\"button\"\n className=\"tablet:flex pointer-events-auto hidden scale-95 items-center justify-center opacity-0 transition-all duration-300 ease-out hover:scale-105 focus-visible:scale-105 group-focus-within:scale-100 group-focus-within:opacity-100 group-hover:scale-100 group-hover:opacity-100\"\n onClick={() => swiperRef.current?.slideNext()}\n aria-label=\"Next banner\"\n >\n <ChevronRight />\n </button>\n </div>\n )}\n\n {showDots && (\n <div\n ref={setPaginationEl}\n style={{ '--swiper-pagination-bottom': '0px' } as React.CSSProperties}\n className={cn(\n 'hero-banner-pagination swiper-pagination lg-desktop:!bottom-6 [&_.banner-dot.swiper-pagination-bullet-active]:bg-info-primary [&_.banner-dot]:bg-info-quaternary absolute !bottom-4 !left-1/2 z-20 flex !w-auto !-translate-x-1/2 items-center justify-center gap-2 [&_.banner-dot.swiper-pagination-bullet-active]:h-2 [&_.banner-dot.swiper-pagination-bullet-active]:w-8 [&_.banner-dot.swiper-pagination-bullet-active]:rounded-full [&_.banner-dot]:size-2 [&_.banner-dot]:rounded-full [&_.banner-dot]:transition-all [&_.banner-dot]:duration-300 [&_.banner-dot]:ease-out [&_.swiper-pagination-bullet]:m-0 [&_.swiper-pagination-bullet]:shrink-0 [&_.swiper-pagination-bullet]:opacity-100',\n { 'aiui-dark': isDark }\n )}\n />\n )}\n </div>\n )\n }\n)\n\nHeroBannerCarousel.displayName = 'HeroBannerCarousel'\n\nexport default HeroBannerCarousel\n"],
|
|
5
|
+
"mappings": "aAkBE,OAiGM,YAAAA,GA1FJ,OAAAC,EAPF,QAAAC,MAAA,oBAjBF,OAAOC,GAAS,UAAAC,EAAQ,aAAAC,EAAW,eAAAC,EAAa,YAAAC,MAAgB,QAChE,OAAS,UAAAC,EAAQ,eAAAC,MAAmB,eACpC,OAAS,cAAAC,EAAY,cAAAC,EAAY,YAAAC,MAAgB,iBAEjD,OAAS,2BAAAC,MAA+B,yCACxC,OAAOC,OAAqB,mCAC5B,OAAS,MAAAC,MAAU,yBAEnB,OAAS,UAAAC,EAAQ,WAAAC,GAAS,QAAAC,EAAM,aAAAC,GAAW,WAAAC,MAAe,4BAE1D,MAAO,aACP,MAAO,wBACP,MAAO,wBAIP,MAAMC,GAAc,IAClBnB,EAAC,OACC,UAAU,6BACV,QAAQ,YACR,KAAK,OACL,MAAM,6BACN,cAAY,OAEZ,UAAAD,EAAC,UAAO,GAAG,KAAK,GAAG,KAAK,EAAE,KAAK,KAAK,eAAe,YAAY,MAAM,EACrEA,EAAC,QAAK,EAAE,qBAAqB,OAAO,QAAQ,YAAY,IAAI,cAAc,QAAQ,eAAe,QAAQ,GAC3G,EAGIqB,GAAe,IACnBpB,EAAC,OACC,UAAU,6BACV,QAAQ,YACR,KAAK,OACL,MAAM,6BACN,cAAY,OAEZ,UAAAD,EAAC,UAAO,GAAG,KAAK,GAAG,KAAK,EAAE,KAAK,KAAK,eAAe,Y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AAI,UAAU,mFACb,UAAAD,EAAC,UACC,KAAK,SACL,UAAU,+QACV,QAAS,IAAMwE,EAAU,SAAS,UAAU,EAC5C,aAAW,kBAEX,SAAAxE,EAACoB,GAAA,EAAY,EACf,EACApB,EAAC,UACC,KAAK,SACL,UAAU,+QACV,QAAS,IAAMwE,EAAU,SAAS,UAAU,EAC5C,aAAW,cAEX,SAAAxE,EAACqB,GAAA,EAAa,EAChB,GACF,EAGD4D,GACCjF,EAAC,OACC,IAAK4E,EACL,MAAO,CAAE,6BAA8B,KAAM,EAC7C,UAAW9D,EACT,uqBACA,CAAE,YAAa+D,CAAO,CACxB,EACF,GAEJ,CAEJ,CACF,EAEAhB,EAAmB,YAAc,qBAEjC,IAAOiC,GAAQjC",
|
|
6
|
+
"names": ["Fragment", "jsx", "jsxs", "React", "useRef", "useEffect", "useCallback", "useState", "Swiper", "SwiperSlide", "Navigation", "Pagination", "Autoplay", "useIsomorphicMediaQuery", "ScrollLoadVideo", "cn", "Button", "Heading", "Text", "Countdown", "Picture", "ChevronLeft", "ChevronRight", "HeroBannerSlide", "data", "_isActive", "videoRef", "slideIndex", "onPrimaryClick", "onSecondaryClick", "onTertiaryClick", "pcVideo", "padVideo", "mobileVideo", "pcImage", "padImage", "mobileImage", "isVideoLoop", "isShowVideo", "title", "subtitle", "label", "endDate", "endDate_tz", "dateFormat", "iconArray", "caption", "blockLink", "primaryButton", "secondaryButton", "tertiaryButton", "theme", "align", "titleSize", "size", "isMobile", "isPad", "videoSrc", "e", "icon", "c", "index", "HeroBannerCarousel", "className", "_classNames", "_onPrimaryClick", "_onSecondaryClick", "_onTertiaryClick", "rest", "ref", "items", "carousel", "containerSize", "swiperRef", "activeIndex", "setActiveIndex", "paginationEl", "setPaginationEl", "isDark", "swiper", "videoRefs", "showArrowControls", "showDots", "autoplaySeconds", "swiperModules", "autoplayConfig", "vRef", "i", "handleSlideChange", "newIndex", "incoming", "s", "_index", "slideData", "isActive", "HeroBannerCarousel_default"]
|
|
7
7
|
}
|