@anker-in/headless-ui 1.1.87 → 1.1.88
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.d.ts +1 -1
- package/dist/cjs/biz-components/ActiveShelf/index.d.ts +1 -1
- package/dist/cjs/biz-components/ActivitySchedule/index.d.ts +1 -1
- package/dist/cjs/biz-components/AiuiProvider/index.d.ts +6 -0
- 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.d.ts +1 -1
- package/dist/cjs/biz-components/AplusDesc/index.d.ts +1 -1
- package/dist/cjs/biz-components/BrandCardLink/BrandCardLink.d.ts +1 -1
- package/dist/cjs/biz-components/BrandEquity/BrandEquity.d.ts +1 -1
- 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/BrandEquity/types.d.ts +8 -0
- package/dist/cjs/biz-components/BrandEquity/types.js +1 -1
- package/dist/cjs/biz-components/BrandEquity/types.js.map +1 -1
- package/dist/cjs/biz-components/Category/index.d.ts +1 -1
- package/dist/cjs/biz-components/CreativeModule/index.d.ts +1 -1
- package/dist/cjs/biz-components/DownLoad/index.d.ts +1 -1
- package/dist/cjs/biz-components/Evaluate/index.d.ts +1 -1
- package/dist/cjs/biz-components/EventSchedule/index.d.ts +1 -1
- package/dist/cjs/biz-components/Faq/Faq.d.ts +1 -1
- package/dist/cjs/biz-components/Faq/Faq.js +1 -1
- package/dist/cjs/biz-components/Faq/Faq.js.map +2 -2
- package/dist/cjs/biz-components/Faq/types.d.ts +1 -0
- package/dist/cjs/biz-components/Faq/types.js +1 -1
- package/dist/cjs/biz-components/Faq/types.js.map +1 -1
- package/dist/cjs/biz-components/FeatureCards/FeatureCards.d.ts +1 -1
- package/dist/cjs/biz-components/FeatureShowcase/FeatureShowcase.d.ts +1 -1
- package/dist/cjs/biz-components/FeaturedBlogPosts/index.d.ts +1 -1
- package/dist/cjs/biz-components/Features/index.d.ts +1 -1
- package/dist/cjs/biz-components/FootCharger/index.d.ts +1 -1
- package/dist/cjs/biz-components/FooterNavigation/index.d.ts +1 -1
- package/dist/cjs/biz-components/GiftBox/index.d.ts +1 -1
- package/dist/cjs/biz-components/GiftShelf/index.d.ts +1 -1
- package/dist/cjs/biz-components/GiftTierShelf/index.d.ts +1 -1
- package/dist/cjs/biz-components/Graphic/index.d.ts +1 -1
- package/dist/cjs/biz-components/GraphicAttractionBlock/index.d.ts +1 -1
- package/dist/cjs/biz-components/GraphicMore/index.d.ts +1 -1
- package/dist/cjs/biz-components/GraphicOverlay/GraphicOverlay.d.ts +1 -1
- package/dist/cjs/biz-components/HeaderNavigation/index.d.ts +1 -1
- package/dist/cjs/biz-components/HeroBanner/HeroBanner.d.ts +21 -1
- 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.d.ts +23 -0
- package/dist/cjs/biz-components/HeroBanner/HeroBannerCarousel.js +2 -0
- package/dist/cjs/biz-components/HeroBanner/HeroBannerCarousel.js.map +7 -0
- package/dist/cjs/biz-components/HeroBanner/index.d.ts +1 -0
- package/dist/cjs/biz-components/HeroBanner/index.js +1 -1
- package/dist/cjs/biz-components/HeroBanner/index.js.map +1 -1
- package/dist/cjs/biz-components/HeroBanner/types.d.ts +73 -0
- package/dist/cjs/biz-components/HeroBanner/types.js +1 -1
- package/dist/cjs/biz-components/HeroBanner/types.js.map +1 -1
- package/dist/cjs/biz-components/ImageOverlayShelf/index.d.ts +2 -2
- 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/ImageTextFeature/ImageTextFeature.d.ts +1 -1
- package/dist/cjs/biz-components/ImageTextOverlay/index.d.ts +9 -0
- package/dist/cjs/biz-components/ImageTextOverlay/index.js +18 -0
- package/dist/cjs/biz-components/ImageTextOverlay/index.js.map +7 -0
- package/dist/cjs/biz-components/ImageTextOverlay/types.d.ts +58 -0
- package/dist/cjs/biz-components/ImageTextOverlay/types.js +2 -0
- package/dist/cjs/biz-components/ImageTextOverlay/types.js.map +7 -0
- package/dist/cjs/biz-components/ImageWithText/ImageWithText.d.ts +1 -1
- package/dist/cjs/biz-components/ImageWithText/ImageWithText.js +1 -1
- package/dist/cjs/biz-components/ImageWithText/ImageWithText.js.map +2 -2
- package/dist/cjs/biz-components/Ksp/index.d.ts +1 -1
- package/dist/cjs/biz-components/Listing/components/PaidShipping/index.d.ts +1 -1
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/BenefitsTab.d.ts +1 -1
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/ProductBundle/index.d.ts +1 -1
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/ProductExchangePurchase/index.d.ts +1 -1
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/ProductFreeGift/index.d.ts +1 -1
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/ProductHighlight/index.d.ts +1 -1
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/ProductOptions/index.d.ts +1 -1
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductGallery/index.d.ts +1 -1
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductPaidShipping/index.d.ts +1 -1
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductSummary/index.d.ts +1 -1
- package/dist/cjs/biz-components/Listing/components/PurchaseBar/index.d.ts +1 -1
- package/dist/cjs/biz-components/LotteryShared/BaseModal.js +1 -1
- package/dist/cjs/biz-components/LotteryShared/BaseModal.js.map +2 -2
- package/dist/cjs/biz-components/LotteryShared/ChanceMethods.js +1 -1
- package/dist/cjs/biz-components/LotteryShared/ChanceMethods.js.map +3 -3
- package/dist/cjs/biz-components/LotteryShared/ErrorModal.js +1 -1
- package/dist/cjs/biz-components/LotteryShared/ErrorModal.js.map +2 -2
- package/dist/cjs/biz-components/LotteryShared/MyRewardsModal.d.ts +33 -0
- 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/PrizePool.js +1 -1
- package/dist/cjs/biz-components/LotteryShared/PrizePool.js.map +3 -3
- package/dist/cjs/biz-components/LotteryShared/WinnerModal.d.ts +1 -1
- package/dist/cjs/biz-components/LotteryShared/WinnerModal.js +1 -1
- package/dist/cjs/biz-components/LotteryShared/WinnerModal.js.map +3 -3
- package/dist/cjs/biz-components/LotteryShared/types.d.ts +101 -0
- package/dist/cjs/biz-components/LotteryShared/types.js +1 -1
- package/dist/cjs/biz-components/LotteryShared/types.js.map +2 -2
- package/dist/cjs/biz-components/Marquee/Marquee.d.ts +2 -1
- package/dist/cjs/biz-components/Marquee/Marquee.js +1 -1
- package/dist/cjs/biz-components/Marquee/Marquee.js.map +3 -3
- package/dist/cjs/biz-components/MarqueeReview/index.d.ts +1 -1
- package/dist/cjs/biz-components/Media/index.d.ts +15 -3
- 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.d.ts +1 -1
- 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.d.ts +1 -1
- 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/MediaPlayerBase/types.d.ts +26 -0
- package/dist/cjs/biz-components/MediaPlayerBase/types.js +1 -1
- package/dist/cjs/biz-components/MediaPlayerBase/types.js.map +1 -1
- package/dist/cjs/biz-components/MediaPlayerMulti/index.d.ts +1 -1
- package/dist/cjs/biz-components/MediaPlayerSticky/index.d.ts +1 -1
- package/dist/cjs/biz-components/MediaSceneSwitcher/MediaSceneSwitcher.d.ts +1 -1
- package/dist/cjs/biz-components/MediaSceneSwitcherV2/index.d.ts +1 -1
- package/dist/cjs/biz-components/MediaShelf/index.d.ts +1 -1
- package/dist/cjs/biz-components/MemberEquity/index.d.ts +1 -1
- package/dist/cjs/biz-components/MiniCart/index.js +1 -1
- package/dist/cjs/biz-components/MiniCart/index.js.map +2 -2
- package/dist/cjs/biz-components/MultiLayoutGraphicBlock/MultiLayoutGraphicBlock.d.ts +1 -1
- package/dist/cjs/biz-components/MultiLayoutGraphicBlock/MultiLayoutGraphicBlock.js +1 -1
- package/dist/cjs/biz-components/MultiLayoutGraphicBlock/MultiLayoutGraphicBlock.js.map +2 -2
- package/dist/cjs/biz-components/NavigationSearch/index.d.ts +1 -1
- package/dist/cjs/biz-components/ProductCompare/index.d.ts +1 -1
- package/dist/cjs/biz-components/ProductHero/ProductHero.d.ts +1 -1
- package/dist/cjs/biz-components/ProductLottery/MediaDrawArea.js +1 -1
- package/dist/cjs/biz-components/ProductLottery/MediaDrawArea.js.map +3 -3
- package/dist/cjs/biz-components/ProductLottery/index.d.ts +3 -2
- package/dist/cjs/biz-components/ProductLottery/index.js +1 -1
- package/dist/cjs/biz-components/ProductLottery/index.js.map +3 -3
- package/dist/cjs/biz-components/ProductLottery/types.d.ts +75 -89
- 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.d.ts +1 -1
- package/dist/cjs/biz-components/PromotionalBar/index.d.ts +3 -2
- 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/SceneShelfV2/index.d.ts +113 -0
- package/dist/cjs/biz-components/SceneShelfV2/index.js +2 -0
- package/dist/cjs/biz-components/SceneShelfV2/index.js.map +7 -0
- package/dist/cjs/biz-components/SceneShelfV3/ProductCard.d.ts +89 -0
- package/dist/cjs/biz-components/SceneShelfV3/ProductCard.js +2 -0
- package/dist/cjs/biz-components/SceneShelfV3/ProductCard.js.map +7 -0
- package/dist/cjs/biz-components/SceneShelfV3/index.d.ts +79 -0
- package/dist/cjs/biz-components/SceneShelfV3/index.js +2 -0
- package/dist/cjs/biz-components/SceneShelfV3/index.js.map +7 -0
- package/dist/cjs/biz-components/SceneShelfV3/types.d.ts +19 -0
- package/dist/cjs/biz-components/SceneShelfV3/types.js +2 -0
- package/dist/cjs/biz-components/SceneShelfV3/types.js.map +7 -0
- package/dist/cjs/biz-components/SecondaryBanner/SecondaryBannerCarousel.d.ts +21 -0
- package/dist/cjs/biz-components/SecondaryBanner/SecondaryBannerCarousel.js +2 -0
- package/dist/cjs/biz-components/SecondaryBanner/SecondaryBannerCarousel.js.map +7 -0
- package/dist/cjs/biz-components/SecondaryBanner/index.d.ts +65 -1
- package/dist/cjs/biz-components/SecondaryBanner/index.js +1 -1
- package/dist/cjs/biz-components/SecondaryBanner/index.js.map +3 -3
- package/dist/cjs/biz-components/SelectStore/index.d.ts +1 -1
- package/dist/cjs/biz-components/ShelfDisplay/index.d.ts +1 -1
- package/dist/cjs/biz-components/Slogan/index.d.ts +1 -1
- package/dist/cjs/biz-components/Spacer/index.d.ts +1 -1
- package/dist/cjs/biz-components/Specs/index.d.ts +1 -1
- package/dist/cjs/biz-components/SpecsComparison/SpecsComparison.d.ts +1 -1
- package/dist/cjs/biz-components/TabWithImage/TabWithImage.d.ts +1 -1
- package/dist/cjs/biz-components/Tabs/Tabs.d.ts +1 -1
- package/dist/cjs/biz-components/TabsGroup/index.d.ts +1 -1
- package/dist/cjs/biz-components/TabsWithMedia/TabsWithMedia.d.ts +1 -1
- package/dist/cjs/biz-components/ThreeDCarousel/ThreeDCarousel.d.ts +1 -1
- package/dist/cjs/biz-components/Title/index.d.ts +1 -1
- 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/Title/types.d.ts +53 -1
- package/dist/cjs/biz-components/Title/types.js +1 -1
- package/dist/cjs/biz-components/Title/types.js.map +1 -1
- package/dist/cjs/biz-components/VideoFeature/VideoFeature.d.ts +1 -1
- package/dist/cjs/biz-components/WheelLottery/BaseModal.js +1 -1
- package/dist/cjs/biz-components/WheelLottery/BaseModal.js.map +2 -2
- package/dist/cjs/biz-components/WheelLottery/ErrorModal.js +1 -1
- package/dist/cjs/biz-components/WheelLottery/ErrorModal.js.map +2 -2
- package/dist/cjs/biz-components/WheelLottery/MyRewardsModal.js +1 -1
- package/dist/cjs/biz-components/WheelLottery/MyRewardsModal.js.map +2 -2
- package/dist/cjs/biz-components/WheelLottery/WinnerModal.js +1 -1
- package/dist/cjs/biz-components/WheelLottery/WinnerModal.js.map +2 -2
- package/dist/cjs/biz-components/WheelLottery/index.d.ts +2 -1
- package/dist/cjs/biz-components/WheelLottery/index.js +1 -1
- package/dist/cjs/biz-components/WheelLottery/index.js.map +3 -3
- package/dist/cjs/biz-components/WheelLottery/types.d.ts +6 -0
- package/dist/cjs/biz-components/WheelLottery/types.js.map +2 -2
- package/dist/cjs/biz-components/WhyChoose/WhyChoose.d.ts +1 -1
- package/dist/cjs/biz-components/index.d.ts +7 -0
- package/dist/cjs/biz-components/index.js +1 -1
- package/dist/cjs/biz-components/index.js.map +3 -3
- package/dist/cjs/hooks/useExposure.d.ts +4 -3
- package/dist/cjs/hooks/useExposure.js +1 -1
- package/dist/cjs/hooks/useExposure.js.map +3 -3
- package/dist/cjs/hooks/useGridRowCount.d.ts +16 -0
- package/dist/cjs/hooks/useGridRowCount.js +2 -0
- package/dist/cjs/hooks/useGridRowCount.js.map +7 -0
- package/dist/cjs/hooks/useViewItemList.d.ts +21 -0
- package/dist/cjs/hooks/useViewItemList.js +2 -0
- package/dist/cjs/hooks/useViewItemList.js.map +7 -0
- package/dist/cjs/index.d.ts +1 -0
- package/dist/cjs/index.js +1 -1
- package/dist/cjs/index.js.map +3 -3
- package/dist/cjs/shared/Styles.js +1 -1
- package/dist/cjs/shared/Styles.js.map +3 -3
- package/dist/cjs/shared/trackUrlRef.d.ts +9 -0
- package/dist/cjs/shared/trackUrlRef.js +1 -1
- package/dist/cjs/shared/trackUrlRef.js.map +3 -3
- package/dist/cjs/types/props.d.ts +18 -1
- package/dist/cjs/types/props.js +1 -1
- package/dist/cjs/types/props.js.map +1 -1
- package/dist/esm/biz-components/AccordionCards/index.d.ts +1 -1
- package/dist/esm/biz-components/ActiveShelf/index.d.ts +1 -1
- package/dist/esm/biz-components/ActivitySchedule/index.d.ts +1 -1
- package/dist/esm/biz-components/AiuiProvider/index.d.ts +6 -0
- 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.d.ts +1 -1
- package/dist/esm/biz-components/AplusDesc/index.d.ts +1 -1
- package/dist/esm/biz-components/BrandCardLink/BrandCardLink.d.ts +1 -1
- package/dist/esm/biz-components/BrandEquity/BrandEquity.d.ts +1 -1
- 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/BrandEquity/types.d.ts +8 -0
- package/dist/esm/biz-components/Category/index.d.ts +1 -1
- package/dist/esm/biz-components/CreativeModule/index.d.ts +1 -1
- package/dist/esm/biz-components/DownLoad/index.d.ts +1 -1
- package/dist/esm/biz-components/Evaluate/index.d.ts +1 -1
- package/dist/esm/biz-components/EventSchedule/index.d.ts +1 -1
- package/dist/esm/biz-components/Faq/Faq.d.ts +1 -1
- package/dist/esm/biz-components/Faq/Faq.js +1 -1
- package/dist/esm/biz-components/Faq/Faq.js.map +2 -2
- package/dist/esm/biz-components/Faq/types.d.ts +1 -0
- package/dist/esm/biz-components/FeatureCards/FeatureCards.d.ts +1 -1
- package/dist/esm/biz-components/FeatureShowcase/FeatureShowcase.d.ts +1 -1
- package/dist/esm/biz-components/FeaturedBlogPosts/index.d.ts +1 -1
- package/dist/esm/biz-components/Features/index.d.ts +1 -1
- package/dist/esm/biz-components/FootCharger/index.d.ts +1 -1
- package/dist/esm/biz-components/FooterNavigation/index.d.ts +1 -1
- package/dist/esm/biz-components/GiftBox/index.d.ts +1 -1
- package/dist/esm/biz-components/GiftShelf/index.d.ts +1 -1
- package/dist/esm/biz-components/GiftTierShelf/index.d.ts +1 -1
- package/dist/esm/biz-components/Graphic/index.d.ts +1 -1
- package/dist/esm/biz-components/GraphicAttractionBlock/index.d.ts +1 -1
- package/dist/esm/biz-components/GraphicMore/index.d.ts +1 -1
- package/dist/esm/biz-components/GraphicOverlay/GraphicOverlay.d.ts +1 -1
- package/dist/esm/biz-components/HeaderNavigation/index.d.ts +1 -1
- package/dist/esm/biz-components/HeroBanner/HeroBanner.d.ts +21 -1
- 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.d.ts +23 -0
- package/dist/esm/biz-components/HeroBanner/HeroBannerCarousel.js +2 -0
- package/dist/esm/biz-components/HeroBanner/HeroBannerCarousel.js.map +7 -0
- package/dist/esm/biz-components/HeroBanner/index.d.ts +1 -0
- package/dist/esm/biz-components/HeroBanner/index.js +1 -1
- package/dist/esm/biz-components/HeroBanner/index.js.map +1 -1
- package/dist/esm/biz-components/HeroBanner/types.d.ts +73 -0
- package/dist/esm/biz-components/ImageOverlayShelf/index.d.ts +2 -2
- 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/ImageTextFeature/ImageTextFeature.d.ts +1 -1
- package/dist/esm/biz-components/ImageTextOverlay/index.d.ts +9 -0
- package/dist/esm/biz-components/ImageTextOverlay/index.js +18 -0
- package/dist/esm/biz-components/ImageTextOverlay/index.js.map +7 -0
- package/dist/esm/biz-components/ImageTextOverlay/types.d.ts +58 -0
- package/dist/esm/biz-components/ImageTextOverlay/types.js +1 -0
- package/dist/esm/biz-components/ImageTextOverlay/types.js.map +7 -0
- package/dist/esm/biz-components/ImageWithText/ImageWithText.d.ts +1 -1
- package/dist/esm/biz-components/ImageWithText/ImageWithText.js +1 -1
- package/dist/esm/biz-components/ImageWithText/ImageWithText.js.map +2 -2
- package/dist/esm/biz-components/Ksp/index.d.ts +1 -1
- package/dist/esm/biz-components/Listing/components/PaidShipping/index.d.ts +1 -1
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/BenefitsTab.d.ts +1 -1
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/ProductBundle/index.d.ts +1 -1
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/ProductExchangePurchase/index.d.ts +1 -1
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/ProductFreeGift/index.d.ts +1 -1
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/ProductHighlight/index.d.ts +1 -1
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/ProductOptions/index.d.ts +1 -1
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductGallery/index.d.ts +1 -1
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductPaidShipping/index.d.ts +1 -1
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductSummary/index.d.ts +1 -1
- package/dist/esm/biz-components/Listing/components/PurchaseBar/index.d.ts +1 -1
- package/dist/esm/biz-components/LotteryShared/BaseModal.js +1 -1
- package/dist/esm/biz-components/LotteryShared/BaseModal.js.map +2 -2
- package/dist/esm/biz-components/LotteryShared/ChanceMethods.js +1 -1
- package/dist/esm/biz-components/LotteryShared/ChanceMethods.js.map +3 -3
- package/dist/esm/biz-components/LotteryShared/ErrorModal.js +1 -1
- package/dist/esm/biz-components/LotteryShared/ErrorModal.js.map +2 -2
- package/dist/esm/biz-components/LotteryShared/MyRewardsModal.d.ts +33 -0
- 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/PrizePool.js +1 -1
- package/dist/esm/biz-components/LotteryShared/PrizePool.js.map +3 -3
- package/dist/esm/biz-components/LotteryShared/WinnerModal.d.ts +1 -1
- package/dist/esm/biz-components/LotteryShared/WinnerModal.js +1 -1
- package/dist/esm/biz-components/LotteryShared/WinnerModal.js.map +3 -3
- package/dist/esm/biz-components/LotteryShared/types.d.ts +101 -0
- package/dist/esm/biz-components/LotteryShared/types.js +1 -1
- package/dist/esm/biz-components/LotteryShared/types.js.map +2 -2
- package/dist/esm/biz-components/Marquee/Marquee.d.ts +2 -1
- package/dist/esm/biz-components/Marquee/Marquee.js +1 -1
- package/dist/esm/biz-components/Marquee/Marquee.js.map +2 -2
- package/dist/esm/biz-components/MarqueeReview/index.d.ts +1 -1
- package/dist/esm/biz-components/Media/index.d.ts +15 -3
- 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.d.ts +1 -1
- 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.d.ts +1 -1
- 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/MediaPlayerBase/types.d.ts +26 -0
- package/dist/esm/biz-components/MediaPlayerMulti/index.d.ts +1 -1
- package/dist/esm/biz-components/MediaPlayerSticky/index.d.ts +1 -1
- package/dist/esm/biz-components/MediaSceneSwitcher/MediaSceneSwitcher.d.ts +1 -1
- package/dist/esm/biz-components/MediaSceneSwitcherV2/index.d.ts +1 -1
- package/dist/esm/biz-components/MediaShelf/index.d.ts +1 -1
- package/dist/esm/biz-components/MemberEquity/index.d.ts +1 -1
- package/dist/esm/biz-components/MiniCart/index.js +1 -1
- package/dist/esm/biz-components/MiniCart/index.js.map +2 -2
- package/dist/esm/biz-components/MultiLayoutGraphicBlock/MultiLayoutGraphicBlock.d.ts +1 -1
- package/dist/esm/biz-components/MultiLayoutGraphicBlock/MultiLayoutGraphicBlock.js +1 -1
- package/dist/esm/biz-components/MultiLayoutGraphicBlock/MultiLayoutGraphicBlock.js.map +2 -2
- package/dist/esm/biz-components/NavigationSearch/index.d.ts +1 -1
- package/dist/esm/biz-components/ProductCompare/index.d.ts +1 -1
- package/dist/esm/biz-components/ProductHero/ProductHero.d.ts +1 -1
- package/dist/esm/biz-components/ProductLottery/MediaDrawArea.js +1 -1
- package/dist/esm/biz-components/ProductLottery/MediaDrawArea.js.map +3 -3
- package/dist/esm/biz-components/ProductLottery/index.d.ts +3 -2
- package/dist/esm/biz-components/ProductLottery/index.js +1 -1
- package/dist/esm/biz-components/ProductLottery/index.js.map +3 -3
- package/dist/esm/biz-components/ProductLottery/types.d.ts +75 -89
- package/dist/esm/biz-components/ProductLottery/types.js.map +2 -2
- package/dist/esm/biz-components/ProductNav/ProductNav.d.ts +1 -1
- package/dist/esm/biz-components/PromotionalBar/index.d.ts +3 -2
- 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/SceneShelfV2/index.d.ts +113 -0
- package/dist/esm/biz-components/SceneShelfV2/index.js +2 -0
- package/dist/esm/biz-components/SceneShelfV2/index.js.map +7 -0
- package/dist/esm/biz-components/SceneShelfV3/ProductCard.d.ts +89 -0
- package/dist/esm/biz-components/SceneShelfV3/ProductCard.js +2 -0
- package/dist/esm/biz-components/SceneShelfV3/ProductCard.js.map +7 -0
- package/dist/esm/biz-components/SceneShelfV3/index.d.ts +79 -0
- package/dist/esm/biz-components/SceneShelfV3/index.js +2 -0
- package/dist/esm/biz-components/SceneShelfV3/index.js.map +7 -0
- package/dist/esm/biz-components/SceneShelfV3/types.d.ts +19 -0
- package/dist/esm/biz-components/SceneShelfV3/types.js +1 -0
- package/dist/esm/biz-components/SceneShelfV3/types.js.map +7 -0
- package/dist/esm/biz-components/SecondaryBanner/SecondaryBannerCarousel.d.ts +21 -0
- package/dist/esm/biz-components/SecondaryBanner/SecondaryBannerCarousel.js +2 -0
- package/dist/esm/biz-components/SecondaryBanner/SecondaryBannerCarousel.js.map +7 -0
- package/dist/esm/biz-components/SecondaryBanner/index.d.ts +65 -1
- package/dist/esm/biz-components/SecondaryBanner/index.js +1 -1
- package/dist/esm/biz-components/SecondaryBanner/index.js.map +3 -3
- package/dist/esm/biz-components/SelectStore/index.d.ts +1 -1
- package/dist/esm/biz-components/ShelfDisplay/index.d.ts +1 -1
- package/dist/esm/biz-components/Slogan/index.d.ts +1 -1
- package/dist/esm/biz-components/Spacer/index.d.ts +1 -1
- package/dist/esm/biz-components/Specs/index.d.ts +1 -1
- package/dist/esm/biz-components/SpecsComparison/SpecsComparison.d.ts +1 -1
- package/dist/esm/biz-components/TabWithImage/TabWithImage.d.ts +1 -1
- package/dist/esm/biz-components/Tabs/Tabs.d.ts +1 -1
- package/dist/esm/biz-components/TabsGroup/index.d.ts +1 -1
- package/dist/esm/biz-components/TabsWithMedia/TabsWithMedia.d.ts +1 -1
- package/dist/esm/biz-components/ThreeDCarousel/ThreeDCarousel.d.ts +1 -1
- package/dist/esm/biz-components/Title/index.d.ts +1 -1
- 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/Title/types.d.ts +53 -1
- package/dist/esm/biz-components/VideoFeature/VideoFeature.d.ts +1 -1
- package/dist/esm/biz-components/WheelLottery/BaseModal.js +1 -1
- package/dist/esm/biz-components/WheelLottery/BaseModal.js.map +2 -2
- package/dist/esm/biz-components/WheelLottery/ErrorModal.js +1 -1
- package/dist/esm/biz-components/WheelLottery/ErrorModal.js.map +2 -2
- package/dist/esm/biz-components/WheelLottery/MyRewardsModal.js +1 -1
- package/dist/esm/biz-components/WheelLottery/MyRewardsModal.js.map +2 -2
- package/dist/esm/biz-components/WheelLottery/WinnerModal.js +1 -1
- package/dist/esm/biz-components/WheelLottery/WinnerModal.js.map +2 -2
- package/dist/esm/biz-components/WheelLottery/index.d.ts +2 -1
- package/dist/esm/biz-components/WheelLottery/index.js +1 -1
- package/dist/esm/biz-components/WheelLottery/index.js.map +3 -3
- package/dist/esm/biz-components/WheelLottery/types.d.ts +6 -0
- package/dist/esm/biz-components/WheelLottery/types.js.map +2 -2
- package/dist/esm/biz-components/WhyChoose/WhyChoose.d.ts +1 -1
- package/dist/esm/biz-components/index.d.ts +7 -0
- package/dist/esm/biz-components/index.js +1 -1
- package/dist/esm/biz-components/index.js.map +3 -3
- package/dist/esm/hooks/useExposure.d.ts +4 -3
- package/dist/esm/hooks/useExposure.js +1 -1
- package/dist/esm/hooks/useExposure.js.map +3 -3
- package/dist/esm/hooks/useGridRowCount.d.ts +16 -0
- package/dist/esm/hooks/useGridRowCount.js +2 -0
- package/dist/esm/hooks/useGridRowCount.js.map +7 -0
- package/dist/esm/hooks/useViewItemList.d.ts +21 -0
- package/dist/esm/hooks/useViewItemList.js +2 -0
- package/dist/esm/hooks/useViewItemList.js.map +7 -0
- package/dist/esm/index.d.ts +1 -0
- package/dist/esm/index.js +1 -1
- package/dist/esm/index.js.map +3 -3
- package/dist/esm/shared/Styles.js +1 -1
- package/dist/esm/shared/Styles.js.map +3 -3
- package/dist/esm/shared/trackUrlRef.d.ts +9 -0
- package/dist/esm/shared/trackUrlRef.js +1 -1
- package/dist/esm/shared/trackUrlRef.js.map +3 -3
- package/dist/esm/types/props.d.ts +18 -1
- package/dist/tokens/anker.css +2 -2
- package/dist/tokens/eufy.css +2 -2
- package/dist/tokens/eufyMake.css +2 -2
- package/dist/tokens/soundcore.css +2 -2
- package/package.json +1 -1
- package/style.css +215 -26
- package/tailwind.config.js +14 -2
|
@@ -54,7 +54,7 @@ export interface MediaSceneSwitcherV2Props extends React.HTMLAttributes<HTMLDivE
|
|
|
54
54
|
/** 场景切换回调 */
|
|
55
55
|
onSceneChange?: (index: number, scene: MediaSceneSwitcherV2Item) => void;
|
|
56
56
|
}
|
|
57
|
-
declare const _default: React.ForwardRefExoticComponent<Omit<MediaSceneSwitcherV2Props & React.RefAttributes<HTMLDivElement>, "container" | keyof import("../../shared/Styles.js").StylesProps> & import("../../shared/Styles.js").StylesProps & import("
|
|
57
|
+
declare const _default: React.ForwardRefExoticComponent<Omit<MediaSceneSwitcherV2Props & React.RefAttributes<HTMLDivElement>, "container" | keyof import("../../shared/Styles.js").StylesProps> & import("../../shared/Styles.js").StylesProps & import("../WheelLottery/index.js").ContainerProps & React.RefAttributes<unknown>> & {
|
|
58
58
|
readonly $$typeof: symbol;
|
|
59
59
|
};
|
|
60
60
|
export default _default;
|
|
@@ -114,7 +114,7 @@ export interface MediaShelfComponent extends React.ForwardRefExoticComponent<Med
|
|
|
114
114
|
/** 独立的 ProductCard 组件 */
|
|
115
115
|
ProductCard: typeof ProductCard;
|
|
116
116
|
}
|
|
117
|
-
declare const MediaShelfWrapped: React.ForwardRefExoticComponent<Omit<MediaShelfProps & React.RefAttributes<HTMLDivElement>, "container" | keyof import("../../shared/Styles.js").StylesProps> & import("../../shared/Styles.js").StylesProps & import("
|
|
117
|
+
declare const MediaShelfWrapped: React.ForwardRefExoticComponent<Omit<MediaShelfProps & React.RefAttributes<HTMLDivElement>, "container" | keyof import("../../shared/Styles.js").StylesProps> & import("../../shared/Styles.js").StylesProps & import("../WheelLottery/index.js").ContainerProps & React.RefAttributes<unknown>> & {
|
|
118
118
|
readonly $$typeof: symbol;
|
|
119
119
|
ProductCard: typeof ProductCard;
|
|
120
120
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { MemberEquityProps } from './types.js';
|
|
3
|
-
declare const _default: React.ForwardRefExoticComponent<Omit<MemberEquityProps, "container" | keyof import("../../shared/Styles.js").StylesProps> & import("../../shared/Styles.js").StylesProps & import("
|
|
3
|
+
declare const _default: React.ForwardRefExoticComponent<Omit<MemberEquityProps, "container" | keyof import("../../shared/Styles.js").StylesProps> & import("../../shared/Styles.js").StylesProps & import("../WheelLottery/index.js").ContainerProps & React.RefAttributes<unknown>> & {};
|
|
4
4
|
export default _default;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";"use client";var Lt=Object.create;var v=Object.defineProperty;var Mt=Object.getOwnPropertyDescriptor;var Nt=Object.getOwnPropertyNames;var St=Object.getPrototypeOf,It=Object.prototype.hasOwnProperty;var Pt=(i,e)=>{for(var c in e)v(i,c,{get:e[c],enumerable:!0})},G=(i,e,c,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of Nt(e))!It.call(i,a)&&a!==c&&v(i,a,{get:()=>e[a],enumerable:!(s=Mt(e,a))||s.enumerable});return i};var U=(i,e,c)=>(c=i!=null?Lt(St(i)):{},G(e||!i||!i.__esModule?v(c,"default",{value:i,enumerable:!0}):c,i)),zt=i=>G(v({},"__esModule",{value:!0}),i);var Dt={};Pt(Dt,{default:()=>Bt});module.exports=zt(Dt);var t=require("react/jsx-runtime"),l=U(require("react")),o=require("../../helpers/index.js"),F=require("../../components/index.js"),x=require("../../components/index.js"),g=require("../../components/index.js"),O=U(require("./CircleProgress.js")),Y=require("../../hooks/useExposure.js");const Tt="cart",At="mini_cart",X=l.forwardRef(({className:i,classNames:e={},data:c,cart:s,progressConfig:a,onRemoveItem:Z,onCheckout:_,onClickToView:M,...$},J)=>{const w=l.useRef(null),{copy:p,theme:N="light",locale:jt="us",showMobileViewMore:K=!0}=c||{};(0,Y.useExposure)(w,{componentType:Tt,componentName:At,componentTitle:p?.itemsInCart||"Mini Cart",componentDescription:p?.description}),l.useImperativeHandle(J,()=>w.current);const Q=p?.emptyCart||"Your Cart is Empty",S=p?.description||"",tt=p?.itemsInCart||"You have selected {count} items",et=p?.total||"Total {total}",Rt=p?.totalWithCoupon||"total: {total} ({subtotal})",I=p?.clickToView||"Click to view cart",ot=p?.buyNowText||"Buy Now",rt=p?.savingText||"Saving {amount}",u=l.useMemo(()=>s?.lineItems||[],[s?.lineItems]),P=u.reduce((r,n)=>r+(n?.quantity||0),0),nt=P===0,at=parseFloat(s?.cost?.totalAmount?.amount||"0"),it=parseFloat(s?.cost?.subtotalAmount?.amount||"0"),lt=parseFloat(s?.cost?.savingAmount?.amount||"0"),st=s?.cost?.totalAmount?.formattedPrice||"",z=it>at?s?.cost?.subtotalAmount?.formattedPrice:null,T=lt>0?s?.cost?.savingAmount?.formattedPrice:null,d=l.useRef(null),[y,ct]=l.useState(!1),[A,B]=l.useState(!1),[D,j]=l.useState(null),R=async r=>{if(!D){j(r);try{await Z?.(r,s)}finally{j(null)}}},[E,C]=l.useState(!1),[pt,dt]=l.useState(0),[ut,mt]=l.useState(0),[H,gt]=l.useState(!1),[V,ft]=l.useState(!0),h=l.useCallback(()=>{const r=d.current;if(!r)return;const{scrollLeft:n,scrollWidth:m,clientWidth:b}=r;gt(n>0),ft(n<m-b-1)},[]),xt=l.useCallback(()=>{h()},[h]);l.useEffect(()=>{h()},[u.length,h]);const ht=r=>{d.current&&(C(!0),dt(r.pageX-d.current.offsetLeft),mt(d.current.scrollLeft))},bt=r=>{if(!E||!d.current)return;r.preventDefault();const m=(r.pageX-d.current.offsetLeft-pt)*1.5;d.current.scrollLeft=ut-m},vt=()=>{C(!1)},wt=()=>{C(!1)},W=r=>{if(d.current){const n=d.current,m=100;n.scrollBy({left:r==="right"?m:-m,behavior:"smooth"})}},k=({className:r})=>(0,t.jsx)("svg",{className:r,width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,t.jsx)("path",{d:"M6 4L10 8L6 12",stroke:"currentColor",strokeWidth:"1.33",strokeLinecap:"round",strokeLinejoin:"round"})}),yt=({className:r})=>(0,t.jsx)("svg",{className:r,width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,t.jsx)("path",{d:"M2.5 5H17.5M8.33333 9.16667V14.1667M11.6667 9.16667V14.1667M3.33333 5L4.16667 16.6667C4.16667 17.1087 4.34226 17.5326 4.65482 17.8452C4.96738 18.1577 5.39131 18.3333 5.83333 18.3333H14.1667C14.6087 18.3333 15.0326 18.1577 15.3452 17.8452C15.6577 17.5326 15.8333 17.1087 15.8333 16.6667L16.6667 5M7.5 5V2.5C7.5 2.27899 7.5878 2.06702 7.74408 1.91074C7.90036 1.75446 8.11232 1.66667 8.33333 1.66667H11.6667C11.8877 1.66667 12.0996 1.75446 12.2559 1.91074C12.4122 2.06702 12.5 2.27899 12.5 2.5V5",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round"})}),Ct=r=>u.length?(0,t.jsxs)("div",{className:(0,o.cn)("laptop:bg-container-secondary-0 flex gap-1 rounded-lg p-1",e?.itemsGrid),children:[u.length>=5&&(0,t.jsx)("button",{onClick:()=>W("left"),className:(0,o.cn)("border-border laptop:flex hover:bg-muted-foreground/10 hidden w-[32px] shrink-0 items-center justify-center rounded-lg px-2 transition-colors",!H&&"laptop:bg-container-secondary-1 laptop:text-transparent laptop:pointer-events-none laptop:-my-1 laptop:-ml-1 laptop:py-1 laptop:pl-1 laptop:rounded-r-none",e?.expandButton,{"laptop:bg-container-secondary-0":r==="dark","laptop:bg-container-primary":r==="dark"&&!H}),"aria-label":"Scroll left to see more items",children:(0,t.jsx)(k,{className:"laptop:size-4 size-5 rotate-180"})}),(0,t.jsxs)("div",{ref:d,onMouseDown:ht,onMouseMove:bt,onMouseUp:vt,onMouseLeave:wt,onScroll:xt,className:(0,o.cn)("scrollbar-hide laptop:gap-1 laptop:w-[256px] laptop:shrink-0 flex w-full gap-1 overflow-x-auto [-ms-overflow-style:none] [scrollbar-width:none] [&::-webkit-scrollbar]:hidden",E?"cursor-grabbing":"cursor-grab",e?.itemGridContainer),children:[u.filter(n=>n&&n.id).map(n=>{const b=(n.merchandise||{}).image||{},q=b.url,kt=b.altText||"Product image",L=D===n.id;return(0,t.jsxs)("div",{className:(0,o.cn)("laptop:size-12 group relative size-16 shrink-0",e?.gridItem),children:[q&&(0,t.jsx)("img",{src:q,alt:kt,draggable:!1,className:"pointer-events-none size-full select-none rounded-lg object-cover"}),L&&(0,t.jsx)("div",{className:"absolute inset-0 flex items-center justify-center rounded-lg bg-black/50",children:(0,t.jsxs)("svg",{width:"20",height:"20",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"animate-spin text-white",children:[(0,t.jsx)("circle",{cx:"8",cy:"8",r:"6",stroke:"currentColor",strokeWidth:"2",opacity:"0.3"}),(0,t.jsx)("path",{d:"M14 8a6 6 0 0 0-6-6",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"})]})}),(0,t.jsx)("span",{role:"button",onClick:()=>R(n.id),className:(0,o.cn)("laptop:hidden absolute right-[2px] top-[2px] cursor-pointer",L&&"pointer-events-none opacity-0"),"aria-label":"delete",children:(0,t.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"pointer-events-none",children:[(0,t.jsx)("rect",{x:"1.33301",y:"1.33301",width:"13.3333",height:"13.3333",rx:"6.66667",fill:"white"}),(0,t.jsx)("path",{d:"M5.37705 5.28896C5.57234 5.09402 5.88839 5.09442 6.08347 5.28965L8.08602 7.29358L10.0906 5.28896C10.2858 5.09402 10.6026 5.09395 10.7977 5.28896C10.9928 5.48418 10.9926 5.80078 10.7977 5.99607L8.79312 8.00069L10.7964 10.0053C10.9913 10.2007 10.9909 10.5179 10.7957 10.7131C10.6005 10.908 10.2844 10.9074 10.0893 10.7124L8.08602 8.7078L6.08347 10.7103C5.88821 10.9056 5.57155 10.9057 5.37636 10.7103C5.18148 10.515 5.18132 10.1984 5.37636 10.0032L7.37891 8.00069L5.37636 5.99676C5.18119 5.80143 5.18181 5.48423 5.37705 5.28896Z",fill:"#767880"})]})}),n.productLabel&&(0,t.jsx)("div",{className:"absolute inset-x-0 bottom-0 flex items-center justify-center",children:(0,t.jsx)("div",{className:"relative flex w-full items-center justify-center rounded-b-lg px-1 py-px backdrop-blur-sm",style:{backgroundColor:"rgba(251, 148, 63, 0.60)"},children:(0,t.jsx)(x.Text,{size:1,className:"relative text-center text-white",html:n.productLabel})})}),n.quantity>1&&!n.productLabel&&(0,t.jsx)("div",{className:"mini-cart-quantity bg-brand-0 laptop:size-4 absolute bottom-0 right-0 flex size-4 items-center justify-center rounded-full text-white",children:(0,t.jsx)(x.Text,{className:"text-sm",html:String(n.quantity)})}),(0,t.jsx)("div",{role:"button",onClick:()=>R(n.id),className:(0,o.cn)("absolute inset-0 hidden cursor-pointer items-center justify-center rounded-lg bg-black/60 transition-opacity","laptop:flex laptop:opacity-0 laptop:group-hover:opacity-100",L&&"laptop:hidden",e?.gridItemOverlay),"aria-label":"Remove item",children:(0,t.jsx)(yt,{className:"pointer-events-none size-[20px] text-white"})})]},n.id)}),K&&(0,t.jsx)("button",{onClick:()=>M?.(s),className:(0,o.cn)("bg-container-secondary-0 laptop:hidden flex size-16 shrink-0 items-center justify-center rounded-md",e?.mobileViewMoreButton),"aria-label":I,children:(0,t.jsx)("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"text-info-quaternary",children:(0,t.jsx)("path",{d:"M7.5 5L12.5 10L7.5 15",stroke:"currentColor",strokeWidth:"1.67",strokeLinecap:"round",strokeLinejoin:"round"})})})]}),u.length>=5&&(0,t.jsx)("button",{onClick:()=>W("right"),className:(0,o.cn)("border-border laptop:flex hover:bg-muted-foreground/10 hidden w-[32px] shrink-0 items-center justify-center rounded-lg px-2 transition-colors",!V&&"laptop:bg-container-secondary-1 laptop:text-transparent laptop:pointer-events-none laptop:-my-1 laptop:-mr-1 laptop:py-1 laptop:pr-1 laptop:rounded-l-none",e?.expandButton,{"laptop:bg-container-secondary-0":r==="dark","laptop:bg-container-primary":r==="dark"&&!V}),"aria-label":"Scroll right to see more items",children:(0,t.jsx)(k,{className:"laptop:size-4 size-5"})})]}):null,f=!nt&&u.length>0;return(0,t.jsx)("div",{ref:w,className:(0,o.cn)("bg-container-secondary-1 text-info-primary tablet:px-6 laptop:px-12 desktop:px-12 lg-desktop:px-[128px] laptop:py-[16px] flex w-full px-4 py-[12px]","flex-col items-stretch gap-3","laptop:flex-row laptop:items-center laptop:justify-around","laptop:items-center laptop:gap-4","tablet:gap-6 laptop:gap-8",i,e?.root,{"aiui-dark bg-container-primary":N==="dark"}),...$,children:(0,t.jsxs)("div",{className:(0,o.cn)("laptop:flex-row flex w-full flex-col gap-4","laptop:flex-1 laptop:items-center laptop:justify-between","tablet:gap-6 laptop:gap-8",e?.content),children:[(0,t.jsxs)("div",{className:(0,o.cn)("relative flex shrink flex-row items-center gap-2","desktop:gap-4",a&&"laptop:pl-[104px] pl-[72px]"),children:[a&&(0,t.jsx)(O.default,{totalSteps:a.totalSteps,currentStep:a.currentStep,image:a.image,label:a.label,progressColor:a.progressColor,labelColor:a.labelColor,backgroundColor:a.backgroundColor,size:a.size,laptopSize:a.laptopSize,className:(0,o.cn)("absolute bottom-0 left-0","lg-desktop:bottom-auto lg-desktop:top-[-46px] desktop:bottom-auto desktop:top-[-52px]",e?.circleProgress)}),(0,t.jsxs)("div",{className:"laptop:flex-1 flex w-full flex-col",children:[(0,t.jsx)("div",{className:(0,o.cn)("tablet:gap-2 flex flex-col gap-1",e?.cartInfo),children:f?(0,t.jsxs)("div",{className:"flex w-full items-center gap-2",children:[(0,t.jsx)(g.Heading,{size:2,as:"h3",className:(0,o.cn)("",e?.cartTitle),html:tt.replace("{count}",`<span class="text-brand-0">${P||0}</span>`)}),(0,t.jsxs)(g.Heading,{size:1,as:"h5",onClick:()=>{window.innerWidth<1025?ct(!y):M?.(s)},className:(0,o.cn)("flex cursor-pointer items-center gap-1",e?.expandButton),children:[(0,t.jsx)(x.Text,{as:"span",size:1,className:"desktop:block hidden text-nowrap text-[16px] ",html:I}),(0,t.jsx)(k,{className:(0,o.cn)("size-4 transition-transform",y?"laptop:rotate-0 -rotate-90":"laptop:rotate-0 rotate-90")})]})]}):(0,t.jsx)(g.Heading,{as:"h3",size:2,className:(0,o.cn)("tablet:text-2xl text-xl font-semibold",e?.cartTitle),html:Q})}),S&&(0,t.jsx)(x.Text,{size:2,className:(0,o.cn)("mini-cart-description text-info-tertiary desktop:text-[16px] lg-desktop:text-[18px] text-[14px]",e?.cartDescription),html:S})]})]}),f&&(0,t.jsx)("div",{className:(0,o.cn)("laptop:block laptop:shrink",y?"block":"hidden"),children:Ct(N)}),f&&(0,t.jsx)("hr",{className:"laptop:hidden border-lines w-full border-t"}),(0,t.jsxs)("div",{className:(0,o.cn)("tablet:gap-6 laptop:gap-4 laptop:justify-end flex flex-row items-stretch justify-between gap-4",e?.priceSection),children:[(0,t.jsxs)("div",{className:"flex flex-col items-end justify-center",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(g.Heading,{as:"h6",size:2,className:(0,o.cn)("whitespace-nowrap text-nowrap",e?.totalPrice),html:et.replace("{total}",st)}),z&&(0,t.jsx)(g.Heading,{as:"h6",size:2,className:(0,o.cn)("text-info-tertiary whitespace-nowrap line-through",e?.originalPrice),html:z})]}),T&&(0,t.jsx)(g.Heading,{size:2,as:"h6",className:(0,o.cn)("laptop:text-right text-marketing-1 w-full whitespace-nowrap text-nowrap text-left",e?.saveAmount),html:rt.replace("{amount}",T)})]}),(0,t.jsx)(F.Button,{disabled:!f,loading:A,onClick:async()=>{if(!A){B(!0);try{await _?.(s)}finally{B(!1)}}},className:(0,o.cn)("whitespace-nowrap",e?.actionButton),children:ot})]})]})})});X.displayName="MiniCart";var Bt=X;
|
|
1
|
+
"use strict";"use client";var Lt=Object.create;var v=Object.defineProperty;var Mt=Object.getOwnPropertyDescriptor;var Nt=Object.getOwnPropertyNames;var St=Object.getPrototypeOf,It=Object.prototype.hasOwnProperty;var Pt=(i,e)=>{for(var c in e)v(i,c,{get:e[c],enumerable:!0})},G=(i,e,c,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of Nt(e))!It.call(i,a)&&a!==c&&v(i,a,{get:()=>e[a],enumerable:!(s=Mt(e,a))||s.enumerable});return i};var U=(i,e,c)=>(c=i!=null?Lt(St(i)):{},G(e||!i||!i.__esModule?v(c,"default",{value:i,enumerable:!0}):c,i)),zt=i=>G(v({},"__esModule",{value:!0}),i);var Dt={};Pt(Dt,{default:()=>Bt});module.exports=zt(Dt);var t=require("react/jsx-runtime"),l=U(require("react")),o=require("../../helpers/index.js"),F=require("../../components/index.js"),x=require("../../components/index.js"),g=require("../../components/index.js"),O=U(require("./CircleProgress.js")),Y=require("../../hooks/useExposure.js");const Tt="cart",At="mini_cart",X=l.forwardRef(({className:i,classNames:e={},data:c,cart:s,progressConfig:a,onRemoveItem:Z,onCheckout:_,onClickToView:M,...$},J)=>{const w=l.useRef(null),{copy:p,theme:N="light",locale:jt="us",showMobileViewMore:K=!0}=c||{};(0,Y.useExposure)(w,{componentType:Tt,componentName:At,componentTitle:p?.itemsInCart||"Mini Cart",componentDescription:p?.description}),l.useImperativeHandle(J,()=>w.current);const Q=p?.emptyCart||"Your Cart is Empty",S=p?.description||"",tt=p?.itemsInCart||"You have selected {count} items",et=p?.total||"Total {total}",Rt=p?.totalWithCoupon||"total: {total} ({subtotal})",I=p?.clickToView||"Click to view cart",ot=p?.buyNowText||"Buy Now",rt=p?.savingText||"Saving {amount}",u=l.useMemo(()=>s?.lineItems||[],[s?.lineItems]),P=u.reduce((r,n)=>r+(n?.quantity||0),0),nt=P===0,at=parseFloat(s?.cost?.totalAmount?.amount||"0"),it=parseFloat(s?.cost?.subtotalAmount?.amount||"0"),lt=parseFloat(s?.cost?.savingAmount?.amount||"0"),st=s?.cost?.totalAmount?.formattedPrice||"",z=it>at?s?.cost?.subtotalAmount?.formattedPrice:null,T=lt>0?s?.cost?.savingAmount?.formattedPrice:null,d=l.useRef(null),[y,ct]=l.useState(!1),[A,B]=l.useState(!1),[D,j]=l.useState(null),R=async r=>{if(!D){j(r);try{await Z?.(r,s)}finally{j(null)}}},[E,C]=l.useState(!1),[pt,dt]=l.useState(0),[ut,mt]=l.useState(0),[H,gt]=l.useState(!1),[V,ft]=l.useState(!0),h=l.useCallback(()=>{const r=d.current;if(!r)return;const{scrollLeft:n,scrollWidth:m,clientWidth:b}=r;gt(n>0),ft(n<m-b-1)},[]),xt=l.useCallback(()=>{h()},[h]);l.useEffect(()=>{h()},[u.length,h]);const ht=r=>{d.current&&(C(!0),dt(r.pageX-d.current.offsetLeft),mt(d.current.scrollLeft))},bt=r=>{if(!E||!d.current)return;r.preventDefault();const m=(r.pageX-d.current.offsetLeft-pt)*1.5;d.current.scrollLeft=ut-m},vt=()=>{C(!1)},wt=()=>{C(!1)},W=r=>{if(d.current){const n=d.current,m=100;n.scrollBy({left:r==="right"?m:-m,behavior:"smooth"})}},k=({className:r})=>(0,t.jsx)("svg",{className:r,width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,t.jsx)("path",{d:"M6 4L10 8L6 12",stroke:"currentColor",strokeWidth:"1.33",strokeLinecap:"round",strokeLinejoin:"round"})}),yt=({className:r})=>(0,t.jsx)("svg",{className:r,width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,t.jsx)("path",{d:"M2.5 5H17.5M8.33333 9.16667V14.1667M11.6667 9.16667V14.1667M3.33333 5L4.16667 16.6667C4.16667 17.1087 4.34226 17.5326 4.65482 17.8452C4.96738 18.1577 5.39131 18.3333 5.83333 18.3333H14.1667C14.6087 18.3333 15.0326 18.1577 15.3452 17.8452C15.6577 17.5326 15.8333 17.1087 15.8333 16.6667L16.6667 5M7.5 5V2.5C7.5 2.27899 7.5878 2.06702 7.74408 1.91074C7.90036 1.75446 8.11232 1.66667 8.33333 1.66667H11.6667C11.8877 1.66667 12.0996 1.75446 12.2559 1.91074C12.4122 2.06702 12.5 2.27899 12.5 2.5V5",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round"})}),Ct=r=>u.length?(0,t.jsxs)("div",{className:(0,o.cn)("laptop:bg-container-secondary-0 rounded-box-small flex gap-1 p-1",e?.itemsGrid),children:[u.length>=5&&(0,t.jsx)("button",{onClick:()=>W("left"),className:(0,o.cn)("border-border laptop:flex hover:bg-muted-foreground/10 rounded-box-small hidden w-[32px] shrink-0 items-center justify-center px-2 transition-colors",!H&&"laptop:bg-container-secondary-1 laptop:text-transparent laptop:pointer-events-none laptop:-my-1 laptop:-ml-1 laptop:py-1 laptop:pl-1 laptop:rounded-r-none",e?.expandButton,{"laptop:bg-container-secondary-0":r==="dark","laptop:bg-container-primary":r==="dark"&&!H}),"aria-label":"Scroll left to see more items",children:(0,t.jsx)(k,{className:"laptop:size-4 size-5 rotate-180"})}),(0,t.jsxs)("div",{ref:d,onMouseDown:ht,onMouseMove:bt,onMouseUp:vt,onMouseLeave:wt,onScroll:xt,className:(0,o.cn)("scrollbar-hide laptop:gap-1 laptop:w-[256px] laptop:shrink-0 flex w-full gap-1 overflow-x-auto [-ms-overflow-style:none] [scrollbar-width:none] [&::-webkit-scrollbar]:hidden",E?"cursor-grabbing":"cursor-grab",e?.itemGridContainer),children:[u.filter(n=>n&&n.id).map(n=>{const b=(n.merchandise||{}).image||{},q=b.url,kt=b.altText||"Product image",L=D===n.id;return(0,t.jsxs)("div",{className:(0,o.cn)("laptop:size-12 bg-container-primary laptop:bg-white rounded-box-small group relative size-16 shrink-0 overflow-hidden",e?.gridItem),children:[q&&(0,t.jsx)("img",{src:q,alt:kt,draggable:!1,className:"rounded-box-small pointer-events-none size-full select-none object-cover"}),L&&(0,t.jsx)("div",{className:"rounded-box-small absolute inset-0 flex items-center justify-center bg-black/50",children:(0,t.jsxs)("svg",{width:"20",height:"20",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"animate-spin text-white",children:[(0,t.jsx)("circle",{cx:"8",cy:"8",r:"6",stroke:"currentColor",strokeWidth:"2",opacity:"0.3"}),(0,t.jsx)("path",{d:"M14 8a6 6 0 0 0-6-6",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"})]})}),(0,t.jsx)("span",{role:"button",onClick:()=>R(n.id),className:(0,o.cn)("laptop:hidden absolute right-[2px] top-[2px] cursor-pointer",L&&"pointer-events-none opacity-0"),"aria-label":"delete",children:(0,t.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"pointer-events-none",children:[(0,t.jsx)("rect",{x:"1.33301",y:"1.33301",width:"13.3333",height:"13.3333",rx:"6.66667",fill:"white"}),(0,t.jsx)("path",{d:"M5.37705 5.28896C5.57234 5.09402 5.88839 5.09442 6.08347 5.28965L8.08602 7.29358L10.0906 5.28896C10.2858 5.09402 10.6026 5.09395 10.7977 5.28896C10.9928 5.48418 10.9926 5.80078 10.7977 5.99607L8.79312 8.00069L10.7964 10.0053C10.9913 10.2007 10.9909 10.5179 10.7957 10.7131C10.6005 10.908 10.2844 10.9074 10.0893 10.7124L8.08602 8.7078L6.08347 10.7103C5.88821 10.9056 5.57155 10.9057 5.37636 10.7103C5.18148 10.515 5.18132 10.1984 5.37636 10.0032L7.37891 8.00069L5.37636 5.99676C5.18119 5.80143 5.18181 5.48423 5.37705 5.28896Z",fill:"#767880"})]})}),n.productLabel&&(0,t.jsx)("div",{className:"absolute inset-x-0 bottom-0 flex items-center justify-center",children:(0,t.jsx)("div",{className:"relative flex w-full items-center justify-center rounded-b-lg px-1 py-px backdrop-blur-sm",style:{backgroundColor:"rgba(251, 148, 63, 0.60)"},children:(0,t.jsx)(x.Text,{size:1,className:"relative text-center text-white",html:n.productLabel})})}),n.quantity>1&&!n.productLabel&&(0,t.jsx)("div",{className:"mini-cart-quantity bg-brand-0 laptop:size-4 absolute bottom-0 right-0 flex size-4 items-center justify-center rounded-full text-white",children:(0,t.jsx)(x.Text,{className:"text-sm",html:String(n.quantity)})}),(0,t.jsx)("div",{role:"button",onClick:()=>R(n.id),className:(0,o.cn)("rounded-box-small absolute inset-0 hidden cursor-pointer items-center justify-center bg-black/60 transition-opacity","laptop:flex laptop:opacity-0 laptop:group-hover:opacity-100",L&&"laptop:hidden",e?.gridItemOverlay),"aria-label":"Remove item",children:(0,t.jsx)(yt,{className:"pointer-events-none size-[20px] text-white"})})]},n.id)}),K&&(0,t.jsx)("button",{onClick:()=>M?.(s),className:(0,o.cn)("bg-container-secondary-0 laptop:hidden flex size-16 shrink-0 items-center justify-center rounded-md",e?.mobileViewMoreButton),"aria-label":I,children:(0,t.jsx)("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"text-info-quaternary",children:(0,t.jsx)("path",{d:"M7.5 5L12.5 10L7.5 15",stroke:"currentColor",strokeWidth:"1.67",strokeLinecap:"round",strokeLinejoin:"round"})})})]}),u.length>=5&&(0,t.jsx)("button",{onClick:()=>W("right"),className:(0,o.cn)("border-border laptop:flex hover:bg-muted-foreground/10 rounded-box-small hidden w-[32px] shrink-0 items-center justify-center px-2 transition-colors",!V&&"laptop:bg-container-secondary-1 laptop:text-transparent laptop:pointer-events-none laptop:-my-1 laptop:-mr-1 laptop:py-1 laptop:pr-1 laptop:rounded-l-none",e?.expandButton,{"laptop:bg-container-secondary-0":r==="dark","laptop:bg-container-primary":r==="dark"&&!V}),"aria-label":"Scroll right to see more items",children:(0,t.jsx)(k,{className:"laptop:size-4 size-5"})})]}):null,f=!nt&&u.length>0;return(0,t.jsx)("div",{ref:w,className:(0,o.cn)("bg-container-secondary-1 text-info-primary tablet:px-6 laptop:px-12 desktop:px-12 lg-desktop:px-[128px] laptop:py-[16px] flex w-full px-4 py-[12px]","flex-col items-stretch gap-3","laptop:flex-row laptop:items-center laptop:justify-around","laptop:items-center laptop:gap-4","tablet:gap-6 laptop:gap-8",i,e?.root,{"aiui-dark bg-container-primary":N==="dark"}),...$,children:(0,t.jsxs)("div",{className:(0,o.cn)("laptop:flex-row flex w-full flex-col gap-4","laptop:flex-1 laptop:items-center laptop:justify-between","tablet:gap-6 laptop:gap-8",e?.content),children:[(0,t.jsxs)("div",{className:(0,o.cn)("relative flex shrink flex-row items-center gap-2","desktop:gap-4",a&&"laptop:pl-[104px] pl-[72px]"),children:[a&&(0,t.jsx)(O.default,{totalSteps:a.totalSteps,currentStep:a.currentStep,image:a.image,label:a.label,progressColor:a.progressColor,labelColor:a.labelColor,backgroundColor:a.backgroundColor,size:a.size,laptopSize:a.laptopSize,className:(0,o.cn)("absolute bottom-0 left-0","lg-desktop:bottom-auto lg-desktop:top-[-46px] desktop:bottom-auto desktop:top-[-52px]",e?.circleProgress)}),(0,t.jsxs)("div",{className:"laptop:flex-1 flex w-full flex-col",children:[(0,t.jsx)("div",{className:(0,o.cn)("tablet:gap-2 flex flex-col gap-1",e?.cartInfo),children:f?(0,t.jsxs)("div",{className:"flex w-full items-center gap-2",children:[(0,t.jsx)(g.Heading,{size:2,as:"h3",className:(0,o.cn)("",e?.cartTitle),html:tt.replace("{count}",`<span class="text-brand-0">${P||0}</span>`)}),(0,t.jsxs)(g.Heading,{size:1,as:"h5",onClick:()=>{window.innerWidth<1025?ct(!y):M?.(s)},className:(0,o.cn)("flex cursor-pointer items-center gap-1",e?.expandButton),children:[(0,t.jsx)(x.Text,{as:"span",size:1,className:"desktop:block hidden text-nowrap text-[16px] ",html:I}),(0,t.jsx)(k,{className:(0,o.cn)("size-4 transition-transform",y?"laptop:rotate-0 -rotate-90":"laptop:rotate-0 rotate-90")})]})]}):(0,t.jsx)(g.Heading,{as:"h3",size:2,className:(0,o.cn)("tablet:text-2xl text-xl",e?.cartTitle),html:Q})}),S&&(0,t.jsx)(x.Text,{size:2,className:(0,o.cn)("mini-cart-description text-info-tertiary desktop:text-[16px] lg-desktop:text-[18px] text-[14px]",e?.cartDescription),html:S})]})]}),f&&(0,t.jsx)("div",{className:(0,o.cn)("laptop:block laptop:shrink",y?"block":"hidden"),children:Ct(N)}),f&&(0,t.jsx)("hr",{className:"laptop:hidden border-lines w-full border-t"}),(0,t.jsxs)("div",{className:(0,o.cn)("tablet:gap-6 laptop:gap-4 laptop:justify-end flex flex-row items-stretch justify-between gap-4",e?.priceSection),children:[(0,t.jsxs)("div",{className:"flex flex-col items-end justify-center",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(g.Heading,{as:"h6",size:2,className:(0,o.cn)("whitespace-nowrap text-nowrap",e?.totalPrice),html:et.replace("{total}",st)}),z&&(0,t.jsx)(g.Heading,{as:"h6",size:2,className:(0,o.cn)("text-info-tertiary whitespace-nowrap line-through",e?.originalPrice),html:z})]}),T&&(0,t.jsx)(g.Heading,{size:2,as:"h6",className:(0,o.cn)("laptop:text-right text-marketing-1 w-full whitespace-nowrap text-nowrap text-left",e?.saveAmount),html:rt.replace("{amount}",T)})]}),(0,t.jsx)(F.Button,{disabled:!f,loading:A,onClick:async()=>{if(!A){B(!0);try{await _?.(s)}finally{B(!1)}}},className:(0,o.cn)("whitespace-nowrap",e?.actionButton),children:ot})]})]})})});X.displayName="MiniCart";var Bt=X;
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/biz-components/MiniCart/index.tsx"],
|
|
4
|
-
"sourcesContent": ["'use client'\n\nimport * as React from 'react'\nimport { cn } from '../../helpers/index.js'\nimport { Button } from '../../components/index.js'\nimport { Text } from '../../components/index.js'\nimport { Heading } from '../../components/index.js'\nimport type { Theme, Img } from '../../types/props.js'\nimport CircleProgress from './CircleProgress.js'\nimport { useExposure } from '../../hooks/useExposure.js'\n\nconst componentType = 'cart'\nconst componentName = 'mini_cart'\n\nexport type MiniCartSemanticName =\n | 'root'\n | 'content'\n | 'cartInfo'\n | 'cartTitle'\n | 'cartDescription'\n | 'priceSection'\n | 'totalPrice'\n | 'originalPrice'\n | 'saveAmount'\n | 'actionButton'\n | 'itemsGrid'\n | 'itemGridContainer'\n | 'gridItem'\n | 'gridItemOverlay'\n | 'expandButton'\n | 'circleProgress'\n | 'mobileViewMoreButton'\n\n/**\n * \u5706\u5F62\u8FDB\u5EA6\u6761\u914D\u7F6E\n */\nexport interface CircleProgressConfig {\n /** \u603B\u9636\u6BB5\u6570 (1-4) */\n totalSteps?: 1 | 2 | 3 | 4\n /** \u5F53\u524D\u5B8C\u6210\u7684\u9636\u6BB5 (0 \u5230 totalSteps) */\n currentStep?: number\n /** \u4E2D\u95F4\u663E\u793A\u7684\u56FE\u7247 */\n image?: Img\n /** \u5E95\u90E8\u663E\u793A\u7684\u6587\u6848 */\n label?: string\n /** \u8FDB\u5EA6\u6761\u989C\u8272\uFF0C\u9ED8\u8BA4\u4E3A\u54C1\u724C\u8272 */\n progressColor?: string\n /** \u5E95\u90E8\u6587\u6848\u80CC\u666F\u8272\uFF0C\u9ED8\u8BA4\u4E3A\u54C1\u724C\u8425\u9500\u8272 */\n labelColor?: string\n /** \u80CC\u666F\u989C\u8272\uFF0C\u9ED8\u8BA4\u4E3A\u5BB9\u5668\u80CC\u666F\u8272 */\n backgroundColor?: string\n /** \u79FB\u52A8\u7AEF\u7EC4\u4EF6\u5C3A\u5BF8\uFF0C\u9ED8\u8BA4 48 */\n size?: number\n /** laptop \u4EE5\u4E0A\u7EC4\u4EF6\u5C3A\u5BF8\uFF0C\u9ED8\u8BA4 80 */\n laptopSize?: number\n}\n\n/**\n * \u6587\u6848\u914D\u7F6E\n */\nexport interface MiniCartCopy {\n emptyCart: string\n description: string\n total: string\n itemsInCart: string\n totalWithCoupon: string\n clickToView: string\n buyNowText: string\n savingText: string\n}\n\n/**\n * MiniCart \u4E1A\u52A1\u7EC4\u4EF6\u6570\u636E\u63A5\u53E3\n */\nexport interface MiniCartData {\n /** \u6587\u6848\u914D\u7F6E */\n copy?: MiniCartCopy\n theme?: 'light' | 'dark'\n /** \u5730\u533A\u4EE3\u7801\uFF0C\u7528\u4E8E\u4EF7\u683C\u683C\u5F0F\u5316 */\n locale?: string\n /** \u662F\u5426\u663E\u793A\u624B\u673A\u7AEF\u67E5\u770B\u66F4\u591A\u6309\u94AE\uFF0C\u9ED8\u8BA4 true */\n showMobileViewMore?: boolean\n}\n\n/**\n * \u8D2D\u7269\u8F66\u5546\u54C1\u9879\u7C7B\u578B\n */\nexport type CartLineItem = {\n id: string\n quantity: number\n /** \u5546\u54C1\u6807\u7B7E\uFF0C\u5982 \"Free\"\u3001\"Gift\" \u7B49\uFF0C\u663E\u793A\u5728\u5546\u54C1\u56FE\u7247\u5E95\u90E8 */\n productLabel?: string\n cost: {\n totalAmount: {\n amount: string\n currencyCode: string\n formattedPrice: string\n }\n subtotalAmount?: {\n amount: string\n currencyCode: string\n formattedPrice?: string\n }\n }\n merchandise: {\n id: string\n sku: string\n /** \u5546\u54C1\u6807\u9898 - MiniCartDialog \u9700\u8981 */\n title?: string\n image: {\n url: string\n altText: string | null\n }\n }\n}\n\n/**\n * \u8D2D\u7269\u8F66\u7C7B\u578B\n */\nexport type Cart = {\n id: string\n checkoutUrl: string\n lineItems: CartLineItem[]\n cost: {\n totalAmount: {\n amount: string\n currencyCode: string\n formattedPrice: string\n }\n subtotalAmount?: {\n amount: string\n currencyCode: string\n formattedPrice?: string\n }\n savingAmount?: {\n amount?: string\n currencyCode: string\n formattedPrice?: string\n }\n }\n}\n\nexport interface MiniCartProps extends React.HTMLAttributes<HTMLDivElement> {\n /** \u4E1A\u52A1\u6570\u636E */\n data: MiniCartData\n /**\n * \u5404\u90E8\u5206\u7684\u81EA\u5B9A\u4E49\u6837\u5F0F\u7C7B\u540D\n */\n classNames?: Partial<Record<MiniCartSemanticName, string>>\n /**\n * \u4EA7\u54C1\u4FE1\u606F\uFF08\u7528\u4E8E\u4E3B\u8981\u5C55\u793A\u7684\u4EA7\u54C1\uFF09\n */\n cart: Cart\n /**\n * \u5706\u5F62\u8FDB\u5EA6\u6761\u914D\u7F6E\uFF0C\u4E0D\u4F20\u5219\u4E0D\u663E\u793A\u8FDB\u5EA6\u6761\n */\n progressConfig?: CircleProgressConfig\n /**\n * \u5220\u9664\u5546\u54C1\u9879\u7684\u56DE\u8C03\u51FD\u6570\n * @param id \u5546\u54C1 ID\n * @param cart \u8D2D\u7269\u8F66\u6570\u636E\n * @returns \u652F\u6301\u8FD4\u56DE Promise\uFF0C\u5185\u90E8\u81EA\u52A8\u5904\u7406 loading \u72B6\u6001\n */\n onRemoveItem?: (id: string, cart: Cart) => void | Promise<void>\n /**\n * \u70B9\u51FB\u7ED3\u7B97\u6309\u94AE\u7684\u56DE\u8C03\u51FD\u6570\n * @param cart\n * @returns \u652F\u6301\u8FD4\u56DE Promise\uFF0C\u5185\u90E8\u81EA\u52A8\u5904\u7406 loading \u72B6\u6001\n */\n onCheckout?: (cart: Cart) => void | Promise<void>\n /**\n * \u70B9\u51FBclick to view\u7684\u56DE\u8C03\u51FD\u6570\n * @param cart\n * @returns\n */\n onClickToView?: (cart: Cart) => void\n}\n\n/**\n * MiniCart - \u8FF7\u4F60\u8D2D\u7269\u8F66\n *\n * @description \u8FF7\u4F60\u8D2D\u7269\u8F66\uFF08Mini Cart\uFF09\u662F\u4E00\u4E2A\u5E38\u89C1\u7684\u7535\u5546UI\u7EC4\u4EF6\uFF0C\u901A\u5E38\u5728\u7528\u6237\u6D4F\u89C8\u5546\u54C1\u65F6\u4EE5\u5E95\u90E8\u60AC\u6D6E\u7684\u5F62\u5F0F\u51FA\u73B0\uFF0C\u5141\u8BB8\u7528\u6237\u5FEB\u901F\u67E5\u770B\u3001\u7F16\u8F91\u8D2D\u7269\u8F66\u5185\u5BB9\u800C\u4E0D\u79BB\u5F00\u5F53\u524D\u9875\u9762\uFF0C\u540C\u65F6\u53EF\u4EE5\u627F\u8F7D\u6EE1\u8D60\uFF0C\u6EE1\u51CF\u7B49\u6D3B\u52A8\u3002\n */\nconst MiniCart = React.forwardRef<HTMLDivElement, MiniCartProps>(\n (\n { className, classNames = {}, data, cart, progressConfig, onRemoveItem, onCheckout, onClickToView, ...props },\n ref\n ) => {\n const boxRef = React.useRef<HTMLDivElement>(null)\n const { copy, theme = 'light', locale = 'us', showMobileViewMore = true } = data || {}\n\n useExposure(boxRef, {\n componentType,\n componentName,\n componentTitle: copy?.itemsInCart || 'Mini Cart',\n componentDescription: copy?.description,\n })\n\n React.useImperativeHandle(ref, () => boxRef.current as HTMLDivElement)\n\n // \u6587\u6848\u914D\u7F6E\uFF0C\u5E26\u9ED8\u8BA4\u503C\n const emptyCart = copy?.emptyCart || 'Your Cart is Empty'\n const description = copy?.description || ''\n const itemsInCart = copy?.itemsInCart || 'You have selected {count} items'\n const total = copy?.total || 'Total {total}'\n const totalWithCoupon = copy?.totalWithCoupon || 'total: {total} ({subtotal})'\n const clickToView = copy?.clickToView || 'Click to view cart'\n const buyNowText = copy?.buyNowText || 'Buy Now'\n const savingText = copy?.savingText || 'Saving {amount}'\n\n // \u4ECECart\u5BF9\u8C61\u4E2D\u63D0\u53D6\u6570\u636E\uFF0C\u4F7F\u7528\u53EF\u9009\u94FE\u548C\u9ED8\u8BA4\u503C\n const items = React.useMemo(() => cart?.lineItems || [], [cart?.lineItems])\n const itemCount = items.reduce((total, item) => total + (item?.quantity || 0), 0)\n const isEmpty = itemCount === 0\n\n // \u63D0\u524D\u8D4B\u503C\u6240\u6709\u91D1\u989D\u76F8\u5173\u53D8\u91CF\n const totalAmount = parseFloat(cart?.cost?.totalAmount?.amount || '0')\n const subtotalAmount = parseFloat(cart?.cost?.subtotalAmount?.amount || '0')\n const savingAmount = parseFloat(cart?.cost?.savingAmount?.amount || '0')\n\n // \u8BA1\u7B97\u4EF7\u683C\u4FE1\u606F\n const finalPrice = cart?.cost?.totalAmount?.formattedPrice || ''\n const originalPrice = subtotalAmount > totalAmount ? cart?.cost?.subtotalAmount?.formattedPrice : null\n const savingPrice = savingAmount > 0 ? cart?.cost?.savingAmount?.formattedPrice : null\n\n // \u6EDA\u52A8\u5BB9\u5668\u5F15\u7528\n const scrollContainerRef = React.useRef<HTMLDivElement>(null)\n\n // \u79FB\u52A8\u7AEF\u4EA7\u54C1\u5C55\u5F00\u72B6\u6001\n const [isProductsExpanded, setIsProductsExpanded] = React.useState(false)\n\n // checkout loading \u72B6\u6001\n const [checkoutLoading, setCheckoutLoading] = React.useState(false)\n\n // \u5220\u9664\u5546\u54C1 loading \u72B6\u6001\n const [removingItemId, setRemovingItemId] = React.useState<string | null>(null)\n\n // \u5904\u7406\u5220\u9664\u5546\u54C1\n const handleRemoveItem = async (id: string) => {\n if (removingItemId) return\n setRemovingItemId(id)\n try {\n await onRemoveItem?.(id, cart)\n } finally {\n setRemovingItemId(null)\n }\n }\n\n // \u9F20\u6807\u62D6\u62FD\u6EDA\u52A8\u72B6\u6001\n const [isDragging, setIsDragging] = React.useState(false)\n const [startX, setStartX] = React.useState(0)\n const [scrollLeft, setScrollLeft] = React.useState(0)\n\n // \u6EDA\u52A8\u4F4D\u7F6E\u72B6\u6001\uFF08\u63A7\u5236\u5DE6\u53F3\u6309\u94AE\u663E\u793A\uFF09\n const [canScrollLeft, setCanScrollLeft] = React.useState(false)\n const [canScrollRight, setCanScrollRight] = React.useState(true)\n\n // \u68C0\u67E5\u6EDA\u52A8\u4F4D\u7F6E\uFF0C\u66F4\u65B0\u6309\u94AE\u663E\u793A\u72B6\u6001\n const updateScrollButtons = React.useCallback(() => {\n const container = scrollContainerRef.current\n if (!container) return\n\n const { scrollLeft, scrollWidth, clientWidth } = container\n setCanScrollLeft(scrollLeft > 0)\n setCanScrollRight(scrollLeft < scrollWidth - clientWidth - 1)\n }, [])\n\n // \u76D1\u542C\u6EDA\u52A8\u4E8B\u4EF6\n const handleScroll = React.useCallback(() => {\n updateScrollButtons()\n }, [updateScrollButtons])\n\n // \u521D\u59CB\u5316\u548C items \u53D8\u5316\u65F6\u66F4\u65B0\u6EDA\u52A8\u72B6\u6001\n React.useEffect(() => {\n updateScrollButtons()\n }, [items.length, updateScrollButtons])\n\n // \u9F20\u6807\u62D6\u62FD\u6EDA\u52A8\u5904\u7406\n const handleMouseDown = (e: React.MouseEvent<HTMLDivElement>) => {\n if (!scrollContainerRef.current) return\n setIsDragging(true)\n setStartX(e.pageX - scrollContainerRef.current.offsetLeft)\n setScrollLeft(scrollContainerRef.current.scrollLeft)\n }\n\n const handleMouseMove = (e: React.MouseEvent<HTMLDivElement>) => {\n if (!isDragging || !scrollContainerRef.current) return\n e.preventDefault()\n const x = e.pageX - scrollContainerRef.current.offsetLeft\n const walk = (x - startX) * 1.5 // \u6EDA\u52A8\u901F\u5EA6\u500D\u6570\n scrollContainerRef.current.scrollLeft = scrollLeft - walk\n }\n\n const handleMouseUp = () => {\n setIsDragging(false)\n }\n\n const handleMouseLeave = () => {\n setIsDragging(false)\n }\n\n // \u6C34\u5E73\u6EDA\u52A8\u51FD\u6570\n const scrollHorizontally = (direction: 'left' | 'right') => {\n if (scrollContainerRef.current) {\n const container = scrollContainerRef.current\n const scrollAmount = 100 // \u6BCF\u6B21\u6EDA\u52A8\u7684\u50CF\u7D20\u6570\uFF08\u8C03\u5C0F\u4E00\u4E9B\uFF09\n container.scrollBy({ left: direction === 'right' ? scrollAmount : -scrollAmount, behavior: 'smooth' })\n }\n }\n\n // \u7BAD\u5934\u56FE\u6807\u7EC4\u4EF6\n const ArrowIcon = ({ className }: { className?: string }) => (\n <svg\n className={className}\n width=\"16\"\n height=\"16\"\n viewBox=\"0 0 16 16\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M6 4L10 8L6 12\"\n stroke=\"currentColor\"\n strokeWidth=\"1.33\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n />\n </svg>\n )\n\n // \u5220\u9664\u56FE\u6807\u7EC4\u4EF6\n const DeleteIcon = ({ className }: { className?: string }) => (\n <svg\n className={className}\n width=\"20\"\n height=\"20\"\n viewBox=\"0 0 20 20\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M2.5 5H17.5M8.33333 9.16667V14.1667M11.6667 9.16667V14.1667M3.33333 5L4.16667 16.6667C4.16667 17.1087 4.34226 17.5326 4.65482 17.8452C4.96738 18.1577 5.39131 18.3333 5.83333 18.3333H14.1667C14.6087 18.3333 15.0326 18.1577 15.3452 17.8452C15.6577 17.5326 15.8333 17.1087 15.8333 16.6667L16.6667 5M7.5 5V2.5C7.5 2.27899 7.5878 2.06702 7.74408 1.91074C7.90036 1.75446 8.11232 1.66667 8.33333 1.66667H11.6667C11.8877 1.66667 12.0996 1.75446 12.2559 1.91074C12.4122 2.06702 12.5 2.27899 12.5 2.5V5\"\n stroke=\"currentColor\"\n strokeWidth=\"1.25\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n />\n </svg>\n )\n\n // Render items grid\n const renderItemsGrid = (theme: Theme) => {\n if (!items.length) return null\n\n return (\n <div className={cn('laptop:bg-container-secondary-0 flex gap-1 rounded-lg p-1', classNames?.itemsGrid)}>\n {/* \u5DE6\u6EDA\u52A8\u6309\u94AE - \u684C\u9762\u7AEF\u663E\u793A\uFF0C\u5C11\u4E8E5\u4E2A\u5546\u54C1\u65F6\u4E0D\u6E32\u67D3\uFF0C\u6EDA\u52A8\u5230\u5F00\u5934\u65F6\u9690\u85CF\u4F46\u4FDD\u6301\u5360\u4F4D */}\n {items.length >= 5 && (\n <button\n onClick={() => scrollHorizontally('left')}\n className={cn(\n 'border-border laptop:flex hover:bg-muted-foreground/10 hidden w-[32px] shrink-0 items-center justify-center rounded-lg px-2 transition-colors',\n !canScrollLeft &&\n 'laptop:bg-container-secondary-1 laptop:text-transparent laptop:pointer-events-none laptop:-my-1 laptop:-ml-1 laptop:py-1 laptop:pl-1 laptop:rounded-r-none',\n classNames?.expandButton,\n {\n 'laptop:bg-container-secondary-0': theme === 'dark',\n 'laptop:bg-container-primary': theme === 'dark' && !canScrollLeft,\n }\n )}\n aria-label=\"Scroll left to see more items\"\n >\n <ArrowIcon className=\"laptop:size-4 size-5 rotate-180\" />\n </button>\n )}\n\n <div\n ref={scrollContainerRef}\n onMouseDown={handleMouseDown}\n onMouseMove={handleMouseMove}\n onMouseUp={handleMouseUp}\n onMouseLeave={handleMouseLeave}\n onScroll={handleScroll}\n className={cn(\n 'scrollbar-hide laptop:gap-1 laptop:w-[256px] laptop:shrink-0 flex w-full gap-1 overflow-x-auto [-ms-overflow-style:none] [scrollbar-width:none] [&::-webkit-scrollbar]:hidden',\n isDragging ? 'cursor-grabbing' : 'cursor-grab',\n classNames?.itemGridContainer\n )}\n >\n {items\n .filter(line => line && line.id)\n .map(line => {\n const safeProduct = line.merchandise || {}\n const safeImage = safeProduct.image || {}\n const imageUrl = safeImage.url\n const imageAlt = safeImage.altText || 'Product image'\n const isLoading = removingItemId === line.id\n\n return (\n <div\n key={line.id}\n className={cn('laptop:size-12 group relative size-16 shrink-0', classNames?.gridItem)}\n >\n {imageUrl && (\n <img\n src={imageUrl}\n alt={imageAlt}\n draggable={false}\n className=\"pointer-events-none size-full select-none rounded-lg object-cover\"\n />\n )}\n {/* \u5220\u9664 loading \u906E\u7F69 */}\n {isLoading && (\n <div className=\"absolute inset-0 flex items-center justify-center rounded-lg bg-black/50\">\n <svg\n width=\"20\"\n height=\"20\"\n viewBox=\"0 0 16 16\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n className=\"animate-spin text-white\"\n >\n <circle cx=\"8\" cy=\"8\" r=\"6\" stroke=\"currentColor\" strokeWidth=\"2\" opacity=\"0.3\" />\n <path d=\"M14 8a6 6 0 0 0-6-6\" stroke=\"currentColor\" strokeWidth=\"2\" strokeLinecap=\"round\" />\n </svg>\n </div>\n )}\n <span\n role=\"button\"\n onClick={() => handleRemoveItem(line.id)}\n className={cn(\n 'laptop:hidden absolute right-[2px] top-[2px] cursor-pointer',\n isLoading && 'pointer-events-none opacity-0'\n )}\n aria-label=\"delete\"\n >\n <svg\n width=\"16\"\n height=\"16\"\n viewBox=\"0 0 16 16\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n className=\"pointer-events-none\"\n >\n <rect x=\"1.33301\" y=\"1.33301\" width=\"13.3333\" height=\"13.3333\" rx=\"6.66667\" fill=\"white\" />\n <path\n d=\"M5.37705 5.28896C5.57234 5.09402 5.88839 5.09442 6.08347 5.28965L8.08602 7.29358L10.0906 5.28896C10.2858 5.09402 10.6026 5.09395 10.7977 5.28896C10.9928 5.48418 10.9926 5.80078 10.7977 5.99607L8.79312 8.00069L10.7964 10.0053C10.9913 10.2007 10.9909 10.5179 10.7957 10.7131C10.6005 10.908 10.2844 10.9074 10.0893 10.7124L8.08602 8.7078L6.08347 10.7103C5.88821 10.9056 5.57155 10.9057 5.37636 10.7103C5.18148 10.515 5.18132 10.1984 5.37636 10.0032L7.37891 8.00069L5.37636 5.99676C5.18119 5.80143 5.18181 5.48423 5.37705 5.28896Z\"\n fill=\"#767880\"\n />\n </svg>\n </span>\n {/* \u5546\u54C1\u6807\u7B7E (\u5982 Free Gift) */}\n {line.productLabel && (\n <div className=\"absolute inset-x-0 bottom-0 flex items-center justify-center\">\n <div\n className=\"relative flex w-full items-center justify-center rounded-b-lg px-1 py-px backdrop-blur-sm\"\n style={{\n backgroundColor: 'rgba(251, 148, 63, 0.60)',\n }}\n >\n <Text size={1} className=\"relative text-center text-white\" html={line.productLabel} />\n </div>\n </div>\n )}\n {line.quantity > 1 && !line.productLabel && (\n <div className=\"mini-cart-quantity bg-brand-0 laptop:size-4 absolute bottom-0 right-0 flex size-4 items-center justify-center rounded-full text-white\">\n <Text className=\"text-sm\" html={String(line.quantity)} />\n </div>\n )}\n\n <div\n role=\"button\"\n onClick={() => handleRemoveItem(line.id)}\n className={cn(\n 'absolute inset-0 hidden cursor-pointer items-center justify-center rounded-lg bg-black/60 transition-opacity',\n 'laptop:flex laptop:opacity-0 laptop:group-hover:opacity-100',\n isLoading && 'laptop:hidden',\n classNames?.gridItemOverlay\n )}\n aria-label=\"Remove item\"\n >\n <DeleteIcon className=\"pointer-events-none size-[20px] text-white\" />\n </div>\n </div>\n )\n })}\n\n {/* \u624B\u673A\u7AEF\u67E5\u770B\u66F4\u591A\u6309\u94AE */}\n {showMobileViewMore && (\n <button\n onClick={() => onClickToView?.(cart)}\n className={cn(\n 'bg-container-secondary-0 laptop:hidden flex size-16 shrink-0 items-center justify-center rounded-md',\n classNames?.mobileViewMoreButton\n )}\n aria-label={clickToView}\n >\n <svg\n width=\"20\"\n height=\"20\"\n viewBox=\"0 0 20 20\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n className=\"text-info-quaternary\"\n >\n <path\n d=\"M7.5 5L12.5 10L7.5 15\"\n stroke=\"currentColor\"\n strokeWidth=\"1.67\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n />\n </svg>\n </button>\n )}\n </div>\n\n {/* \u53F3\u6EDA\u52A8\u6309\u94AE - \u684C\u9762\u7AEF\u663E\u793A\uFF0C\u5C11\u4E8E5\u4E2A\u5546\u54C1\u65F6\u4E0D\u6E32\u67D3\uFF0C\u6EDA\u52A8\u5230\u7ED3\u5C3E\u65F6\u9690\u85CF\u4F46\u4FDD\u6301\u5360\u4F4D */}\n {items.length >= 5 && (\n <button\n onClick={() => scrollHorizontally('right')}\n className={cn(\n 'border-border laptop:flex hover:bg-muted-foreground/10 hidden w-[32px] shrink-0 items-center justify-center rounded-lg px-2 transition-colors',\n !canScrollRight &&\n 'laptop:bg-container-secondary-1 laptop:text-transparent laptop:pointer-events-none laptop:-my-1 laptop:-mr-1 laptop:py-1 laptop:pr-1 laptop:rounded-l-none',\n classNames?.expandButton,\n {\n 'laptop:bg-container-secondary-0': theme === 'dark',\n 'laptop:bg-container-primary': theme === 'dark' && !canScrollRight,\n }\n )}\n aria-label=\"Scroll right to see more items\"\n >\n <ArrowIcon className=\"laptop:size-4 size-5\" />\n </button>\n )}\n </div>\n )\n }\n\n // Check if cart has items\n const hasItems = !isEmpty && items.length > 0\n\n return (\n <div\n ref={boxRef}\n className={cn(\n 'bg-container-secondary-1 text-info-primary tablet:px-6 laptop:px-12 desktop:px-12 lg-desktop:px-[128px] laptop:py-[16px] flex w-full px-4 py-[12px]',\n // \u79FB\u52A8\u7AEF\u5782\u76F4\u5E03\u5C40\uFF0C\u5927\u5C4F\u5E55\u6C34\u5E73\u5E03\u5C40\n 'flex-col items-stretch gap-3',\n 'laptop:flex-row laptop:items-center laptop:justify-around',\n hasItems ? 'laptop:items-center laptop:gap-4' : 'laptop:items-center laptop:gap-4',\n 'tablet:gap-6 laptop:gap-8',\n className,\n classNames?.root,\n {\n 'aiui-dark bg-container-primary': theme === 'dark',\n }\n )}\n {...props}\n >\n {/* \u79FB\u52A8\u7AEF\uFF1A\u5782\u76F4\u6392\u5217 | \u684C\u9762\u7AEF\uFF1A\u6C34\u5E73\u4E09\u5217\u5E03\u5C40 */}\n <div\n className={cn(\n 'laptop:flex-row flex w-full flex-col gap-4',\n 'laptop:flex-1 laptop:items-center laptop:justify-between',\n 'tablet:gap-6 laptop:gap-8',\n classNames?.content\n )}\n >\n <div\n className={cn(\n 'relative flex shrink flex-row items-center gap-2',\n 'desktop:gap-4',\n progressConfig && 'laptop:pl-[104px] pl-[72px]'\n )}\n >\n {/* \u5DE6\u4FA7\u5706\u5F62\u8FDB\u5EA6\u6761 - \u53EA\u6709\u914D\u7F6E\u4E86\u624D\u663E\u793A */}\n {progressConfig && (\n <CircleProgress\n totalSteps={progressConfig.totalSteps}\n currentStep={progressConfig.currentStep}\n image={progressConfig.image}\n label={progressConfig.label}\n progressColor={progressConfig.progressColor}\n labelColor={progressConfig.labelColor}\n backgroundColor={progressConfig.backgroundColor}\n size={progressConfig.size}\n laptopSize={progressConfig.laptopSize}\n className={cn(\n 'absolute bottom-0 left-0',\n 'lg-desktop:bottom-auto lg-desktop:top-[-46px] desktop:bottom-auto desktop:top-[-52px]',\n classNames?.circleProgress\n )}\n />\n )}\n {/* Center: Cart info and dynamic content */}\n <div className=\"laptop:flex-1 flex w-full flex-col\">\n {/* Cart title area */}\n <div className={cn('tablet:gap-2 flex flex-col gap-1', classNames?.cartInfo)}>\n {hasItems ? (\n <div className=\"flex w-full items-center gap-2\">\n <Heading\n size={2}\n as=\"h3\"\n className={cn('', classNames?.cartTitle)}\n html={itemsInCart.replace('{count}', `<span class=\"text-brand-0\">${itemCount || 0}</span>`)}\n />\n\n {/* Click to view link / Toggle products */}\n <Heading\n size={1}\n as=\"h5\"\n onClick={() => {\n // \u79FB\u52A8\u7AEF\uFF1A\u5207\u6362\u4EA7\u54C1\u5C55\u5F00\u72B6\u6001\uFF0C\u684C\u9762\u7AEF\uFF1A\u8C03\u7528\u539F\u56DE\u8C03\n const isMobile = window.innerWidth < 1025\n if (isMobile) {\n setIsProductsExpanded(!isProductsExpanded)\n } else {\n onClickToView?.(cart)\n }\n }}\n className={cn('flex cursor-pointer items-center gap-1', classNames?.expandButton)}\n >\n {/* \u684C\u9762\u7AEF\u663E\u793A\u6587\u5B57 + \u56FE\u6807\uFF0C\u79FB\u52A8\u7AEF\u53EA\u663E\u793A\u56FE\u6807 */}\n <Text\n as=\"span\"\n size={1}\n className=\"desktop:block hidden text-nowrap text-[16px] \"\n html={clickToView}\n />\n <ArrowIcon\n className={cn(\n 'size-4 transition-transform',\n isProductsExpanded ? 'laptop:rotate-0 -rotate-90' : 'laptop:rotate-0 rotate-90'\n )}\n />\n </Heading>\n </div>\n ) : (\n <Heading\n as=\"h3\"\n size={2}\n className={cn('tablet:text-2xl text-xl font-semibold', classNames?.cartTitle)}\n html={emptyCart}\n />\n )}\n </div>\n\n {description && (\n <Text\n size={2}\n className={cn(\n 'mini-cart-description text-info-tertiary desktop:text-[16px] lg-desktop:text-[18px] text-[14px]',\n classNames?.cartDescription\n )}\n html={description}\n />\n )}\n </div>\n </div>\n\n {/* Items grid (\u79FB\u52A8\u7AEF\uFF1A\u6839\u636E\u5C55\u5F00\u72B6\u6001\u663E\u793A\uFF0C\u684C\u9762\u7AEF\uFF1A\u59CB\u7EC8\u663E\u793A) */}\n {hasItems && (\n <div className={cn('laptop:block laptop:shrink', isProductsExpanded ? 'block' : 'hidden')}>\n {renderItemsGrid(theme)}\n </div>\n )}\n {/* \u79FB\u52A8\u7AEF\uFF1A\u5206\u5272\u7EBF\uFF08\u53EA\u5728\u6709\u5546\u54C1\u65F6\u663E\u793A\uFF09 */}\n {hasItems && <hr className=\"laptop:hidden border-lines w-full border-t\" />}\n\n {/* Price and button area */}\n <div\n className={cn(\n 'tablet:gap-6 laptop:gap-4 laptop:justify-end flex flex-row items-stretch justify-between gap-4',\n classNames?.priceSection\n )}\n >\n {/* Price info */}\n <div className=\"flex flex-col items-end justify-center\">\n {/* Main price row */}\n <div className=\"flex items-center gap-2\">\n <Heading\n as=\"h6\"\n size={2}\n className={cn('whitespace-nowrap text-nowrap', classNames?.totalPrice)}\n html={total.replace('{total}', finalPrice)}\n />\n\n {/* Original price (if discounted) */}\n {originalPrice && (\n <Heading\n as=\"h6\"\n size={2}\n className={cn('text-info-tertiary whitespace-nowrap line-through', classNames?.originalPrice)}\n html={originalPrice}\n />\n )}\n </div>\n\n {/* Save amount */}\n {savingPrice && (\n <Heading\n size={2}\n as=\"h6\"\n className={cn(\n 'laptop:text-right text-marketing-1 w-full whitespace-nowrap text-nowrap text-left',\n classNames?.saveAmount\n )}\n html={savingText.replace('{amount}', savingPrice)}\n />\n )}\n </div>\n\n {/* Action button */}\n <Button\n disabled={!hasItems}\n loading={checkoutLoading}\n onClick={async () => {\n if (checkoutLoading) return\n setCheckoutLoading(true)\n try {\n await onCheckout?.(cart)\n } finally {\n setCheckoutLoading(false)\n }\n }}\n className={cn('whitespace-nowrap', classNames?.actionButton)}\n >\n {buyNowText}\n </Button>\n </div>\n </div>\n </div>\n )\n }\n)\n\nMiniCart.displayName = 'MiniCart'\nexport default MiniCart\n"],
|
|
5
|
-
"mappings": "mlBAAA,IAAAA,GAAA,GAAAC,GAAAD,GAAA,aAAAE,KAAA,eAAAC,GAAAH,IAgUQ,IAAAI,EAAA,6BA9TRC,EAAuB,oBACvBC,EAAmB,kCACnBC,EAAuB,qCACvBA,EAAqB,qCACrBA,EAAwB,qCAExBC,EAA2B,kCAC3BC,EAA4B,sCAE5B,MAAMC,GAAgB,OAChBC,GAAgB,YA2KhBC,EAAWP,EAAM,WACrB,CACE,CAAE,UAAAQ,EAAW,WAAAC,EAAa,CAAC,EAAG,KAAAC,EAAM,KAAAC,EAAM,eAAAC,EAAgB,aAAAC,EAAc,WAAAC,EAAY,cAAAC,EAAe,GAAGC,CAAM,EAC5GC,IACG,CACH,MAAMC,EAASlB,EAAM,OAAuB,IAAI,EAC1C,CAAE,KAAAmB,EAAM,MAAAC,EAAQ,QAAS,OAAAC,GAAS,KAAM,mBAAAC,EAAqB,EAAK,EAAIZ,GAAQ,CAAC,KAErF,eAAYQ,EAAQ,CAClB,cAAAb,GACA,cAAAC,GACA,eAAgBa,GAAM,aAAe,YACrC,qBAAsBA,GAAM,WAC9B,CAAC,EAEDnB,EAAM,oBAAoBiB,EAAK,IAAMC,EAAO,OAAyB,EAGrE,MAAMK,EAAYJ,GAAM,WAAa,qBAC/BK,EAAcL,GAAM,aAAe,GACnCM,GAAcN,GAAM,aAAe,kCACnCO,GAAQP,GAAM,OAAS,gBACvBQ,GAAkBR,GAAM,iBAAmB,8BAC3CS,EAAcT,GAAM,aAAe,qBACnCU,GAAaV,GAAM,YAAc,UACjCW,GAAaX,GAAM,YAAc,kBAGjCY,EAAQ/B,EAAM,QAAQ,IAAMW,GAAM,WAAa,CAAC,EAAG,CAACA,GAAM,SAAS,CAAC,EACpEqB,EAAYD,EAAM,O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QACC,EAAE,+eACF,OAAO,eACP,YAAY,OACZ,cAAc,QACd,eAAe,QACjB,EACF,EAIIoE,GAAmBxD,GAClBW,EAAM,UAGT,QAAC,OAAI,aAAW,MAAG,
|
|
4
|
+
"sourcesContent": ["'use client'\n\nimport * as React from 'react'\nimport { cn } from '../../helpers/index.js'\nimport { Button } from '../../components/index.js'\nimport { Text } from '../../components/index.js'\nimport { Heading } from '../../components/index.js'\nimport type { Theme, Img } from '../../types/props.js'\nimport CircleProgress from './CircleProgress.js'\nimport { useExposure } from '../../hooks/useExposure.js'\n\nconst componentType = 'cart'\nconst componentName = 'mini_cart'\n\nexport type MiniCartSemanticName =\n | 'root'\n | 'content'\n | 'cartInfo'\n | 'cartTitle'\n | 'cartDescription'\n | 'priceSection'\n | 'totalPrice'\n | 'originalPrice'\n | 'saveAmount'\n | 'actionButton'\n | 'itemsGrid'\n | 'itemGridContainer'\n | 'gridItem'\n | 'gridItemOverlay'\n | 'expandButton'\n | 'circleProgress'\n | 'mobileViewMoreButton'\n\n/**\n * \u5706\u5F62\u8FDB\u5EA6\u6761\u914D\u7F6E\n */\nexport interface CircleProgressConfig {\n /** \u603B\u9636\u6BB5\u6570 (1-4) */\n totalSteps?: 1 | 2 | 3 | 4\n /** \u5F53\u524D\u5B8C\u6210\u7684\u9636\u6BB5 (0 \u5230 totalSteps) */\n currentStep?: number\n /** \u4E2D\u95F4\u663E\u793A\u7684\u56FE\u7247 */\n image?: Img\n /** \u5E95\u90E8\u663E\u793A\u7684\u6587\u6848 */\n label?: string\n /** \u8FDB\u5EA6\u6761\u989C\u8272\uFF0C\u9ED8\u8BA4\u4E3A\u54C1\u724C\u8272 */\n progressColor?: string\n /** \u5E95\u90E8\u6587\u6848\u80CC\u666F\u8272\uFF0C\u9ED8\u8BA4\u4E3A\u54C1\u724C\u8425\u9500\u8272 */\n labelColor?: string\n /** \u80CC\u666F\u989C\u8272\uFF0C\u9ED8\u8BA4\u4E3A\u5BB9\u5668\u80CC\u666F\u8272 */\n backgroundColor?: string\n /** \u79FB\u52A8\u7AEF\u7EC4\u4EF6\u5C3A\u5BF8\uFF0C\u9ED8\u8BA4 48 */\n size?: number\n /** laptop \u4EE5\u4E0A\u7EC4\u4EF6\u5C3A\u5BF8\uFF0C\u9ED8\u8BA4 80 */\n laptopSize?: number\n}\n\n/**\n * \u6587\u6848\u914D\u7F6E\n */\nexport interface MiniCartCopy {\n emptyCart: string\n description: string\n total: string\n itemsInCart: string\n totalWithCoupon: string\n clickToView: string\n buyNowText: string\n savingText: string\n}\n\n/**\n * MiniCart \u4E1A\u52A1\u7EC4\u4EF6\u6570\u636E\u63A5\u53E3\n */\nexport interface MiniCartData {\n /** \u6587\u6848\u914D\u7F6E */\n copy?: MiniCartCopy\n theme?: 'light' | 'dark'\n /** \u5730\u533A\u4EE3\u7801\uFF0C\u7528\u4E8E\u4EF7\u683C\u683C\u5F0F\u5316 */\n locale?: string\n /** \u662F\u5426\u663E\u793A\u624B\u673A\u7AEF\u67E5\u770B\u66F4\u591A\u6309\u94AE\uFF0C\u9ED8\u8BA4 true */\n showMobileViewMore?: boolean\n}\n\n/**\n * \u8D2D\u7269\u8F66\u5546\u54C1\u9879\u7C7B\u578B\n */\nexport type CartLineItem = {\n id: string\n quantity: number\n /** \u5546\u54C1\u6807\u7B7E\uFF0C\u5982 \"Free\"\u3001\"Gift\" \u7B49\uFF0C\u663E\u793A\u5728\u5546\u54C1\u56FE\u7247\u5E95\u90E8 */\n productLabel?: string\n cost: {\n totalAmount: {\n amount: string\n currencyCode: string\n formattedPrice: string\n }\n subtotalAmount?: {\n amount: string\n currencyCode: string\n formattedPrice?: string\n }\n }\n merchandise: {\n id: string\n sku: string\n /** \u5546\u54C1\u6807\u9898 - MiniCartDialog \u9700\u8981 */\n title?: string\n image: {\n url: string\n altText: string | null\n }\n }\n}\n\n/**\n * \u8D2D\u7269\u8F66\u7C7B\u578B\n */\nexport type Cart = {\n id: string\n checkoutUrl: string\n lineItems: CartLineItem[]\n cost: {\n totalAmount: {\n amount: string\n currencyCode: string\n formattedPrice: string\n }\n subtotalAmount?: {\n amount: string\n currencyCode: string\n formattedPrice?: string\n }\n savingAmount?: {\n amount?: string\n currencyCode: string\n formattedPrice?: string\n }\n }\n}\n\nexport interface MiniCartProps extends React.HTMLAttributes<HTMLDivElement> {\n /** \u4E1A\u52A1\u6570\u636E */\n data: MiniCartData\n /**\n * \u5404\u90E8\u5206\u7684\u81EA\u5B9A\u4E49\u6837\u5F0F\u7C7B\u540D\n */\n classNames?: Partial<Record<MiniCartSemanticName, string>>\n /**\n * \u4EA7\u54C1\u4FE1\u606F\uFF08\u7528\u4E8E\u4E3B\u8981\u5C55\u793A\u7684\u4EA7\u54C1\uFF09\n */\n cart: Cart\n /**\n * \u5706\u5F62\u8FDB\u5EA6\u6761\u914D\u7F6E\uFF0C\u4E0D\u4F20\u5219\u4E0D\u663E\u793A\u8FDB\u5EA6\u6761\n */\n progressConfig?: CircleProgressConfig\n /**\n * \u5220\u9664\u5546\u54C1\u9879\u7684\u56DE\u8C03\u51FD\u6570\n * @param id \u5546\u54C1 ID\n * @param cart \u8D2D\u7269\u8F66\u6570\u636E\n * @returns \u652F\u6301\u8FD4\u56DE Promise\uFF0C\u5185\u90E8\u81EA\u52A8\u5904\u7406 loading \u72B6\u6001\n */\n onRemoveItem?: (id: string, cart: Cart) => void | Promise<void>\n /**\n * \u70B9\u51FB\u7ED3\u7B97\u6309\u94AE\u7684\u56DE\u8C03\u51FD\u6570\n * @param cart\n * @returns \u652F\u6301\u8FD4\u56DE Promise\uFF0C\u5185\u90E8\u81EA\u52A8\u5904\u7406 loading \u72B6\u6001\n */\n onCheckout?: (cart: Cart) => void | Promise<void>\n /**\n * \u70B9\u51FBclick to view\u7684\u56DE\u8C03\u51FD\u6570\n * @param cart\n * @returns\n */\n onClickToView?: (cart: Cart) => void\n}\n\n/**\n * MiniCart - \u8FF7\u4F60\u8D2D\u7269\u8F66\n *\n * @description \u8FF7\u4F60\u8D2D\u7269\u8F66\uFF08Mini Cart\uFF09\u662F\u4E00\u4E2A\u5E38\u89C1\u7684\u7535\u5546UI\u7EC4\u4EF6\uFF0C\u901A\u5E38\u5728\u7528\u6237\u6D4F\u89C8\u5546\u54C1\u65F6\u4EE5\u5E95\u90E8\u60AC\u6D6E\u7684\u5F62\u5F0F\u51FA\u73B0\uFF0C\u5141\u8BB8\u7528\u6237\u5FEB\u901F\u67E5\u770B\u3001\u7F16\u8F91\u8D2D\u7269\u8F66\u5185\u5BB9\u800C\u4E0D\u79BB\u5F00\u5F53\u524D\u9875\u9762\uFF0C\u540C\u65F6\u53EF\u4EE5\u627F\u8F7D\u6EE1\u8D60\uFF0C\u6EE1\u51CF\u7B49\u6D3B\u52A8\u3002\n */\nconst MiniCart = React.forwardRef<HTMLDivElement, MiniCartProps>(\n (\n { className, classNames = {}, data, cart, progressConfig, onRemoveItem, onCheckout, onClickToView, ...props },\n ref\n ) => {\n const boxRef = React.useRef<HTMLDivElement>(null)\n const { copy, theme = 'light', locale = 'us', showMobileViewMore = true } = data || {}\n\n useExposure(boxRef, {\n componentType,\n componentName,\n componentTitle: copy?.itemsInCart || 'Mini Cart',\n componentDescription: copy?.description,\n })\n\n React.useImperativeHandle(ref, () => boxRef.current as HTMLDivElement)\n\n // \u6587\u6848\u914D\u7F6E\uFF0C\u5E26\u9ED8\u8BA4\u503C\n const emptyCart = copy?.emptyCart || 'Your Cart is Empty'\n const description = copy?.description || ''\n const itemsInCart = copy?.itemsInCart || 'You have selected {count} items'\n const total = copy?.total || 'Total {total}'\n const totalWithCoupon = copy?.totalWithCoupon || 'total: {total} ({subtotal})'\n const clickToView = copy?.clickToView || 'Click to view cart'\n const buyNowText = copy?.buyNowText || 'Buy Now'\n const savingText = copy?.savingText || 'Saving {amount}'\n\n // \u4ECECart\u5BF9\u8C61\u4E2D\u63D0\u53D6\u6570\u636E\uFF0C\u4F7F\u7528\u53EF\u9009\u94FE\u548C\u9ED8\u8BA4\u503C\n const items = React.useMemo(() => cart?.lineItems || [], [cart?.lineItems])\n const itemCount = items.reduce((total, item) => total + (item?.quantity || 0), 0)\n const isEmpty = itemCount === 0\n\n // \u63D0\u524D\u8D4B\u503C\u6240\u6709\u91D1\u989D\u76F8\u5173\u53D8\u91CF\n const totalAmount = parseFloat(cart?.cost?.totalAmount?.amount || '0')\n const subtotalAmount = parseFloat(cart?.cost?.subtotalAmount?.amount || '0')\n const savingAmount = parseFloat(cart?.cost?.savingAmount?.amount || '0')\n\n // \u8BA1\u7B97\u4EF7\u683C\u4FE1\u606F\n const finalPrice = cart?.cost?.totalAmount?.formattedPrice || ''\n const originalPrice = subtotalAmount > totalAmount ? cart?.cost?.subtotalAmount?.formattedPrice : null\n const savingPrice = savingAmount > 0 ? cart?.cost?.savingAmount?.formattedPrice : null\n\n // \u6EDA\u52A8\u5BB9\u5668\u5F15\u7528\n const scrollContainerRef = React.useRef<HTMLDivElement>(null)\n\n // \u79FB\u52A8\u7AEF\u4EA7\u54C1\u5C55\u5F00\u72B6\u6001\n const [isProductsExpanded, setIsProductsExpanded] = React.useState(false)\n\n // checkout loading \u72B6\u6001\n const [checkoutLoading, setCheckoutLoading] = React.useState(false)\n\n // \u5220\u9664\u5546\u54C1 loading \u72B6\u6001\n const [removingItemId, setRemovingItemId] = React.useState<string | null>(null)\n\n // \u5904\u7406\u5220\u9664\u5546\u54C1\n const handleRemoveItem = async (id: string) => {\n if (removingItemId) return\n setRemovingItemId(id)\n try {\n await onRemoveItem?.(id, cart)\n } finally {\n setRemovingItemId(null)\n }\n }\n\n // \u9F20\u6807\u62D6\u62FD\u6EDA\u52A8\u72B6\u6001\n const [isDragging, setIsDragging] = React.useState(false)\n const [startX, setStartX] = React.useState(0)\n const [scrollLeft, setScrollLeft] = React.useState(0)\n\n // \u6EDA\u52A8\u4F4D\u7F6E\u72B6\u6001\uFF08\u63A7\u5236\u5DE6\u53F3\u6309\u94AE\u663E\u793A\uFF09\n const [canScrollLeft, setCanScrollLeft] = React.useState(false)\n const [canScrollRight, setCanScrollRight] = React.useState(true)\n\n // \u68C0\u67E5\u6EDA\u52A8\u4F4D\u7F6E\uFF0C\u66F4\u65B0\u6309\u94AE\u663E\u793A\u72B6\u6001\n const updateScrollButtons = React.useCallback(() => {\n const container = scrollContainerRef.current\n if (!container) return\n\n const { scrollLeft, scrollWidth, clientWidth } = container\n setCanScrollLeft(scrollLeft > 0)\n setCanScrollRight(scrollLeft < scrollWidth - clientWidth - 1)\n }, [])\n\n // \u76D1\u542C\u6EDA\u52A8\u4E8B\u4EF6\n const handleScroll = React.useCallback(() => {\n updateScrollButtons()\n }, [updateScrollButtons])\n\n // \u521D\u59CB\u5316\u548C items \u53D8\u5316\u65F6\u66F4\u65B0\u6EDA\u52A8\u72B6\u6001\n React.useEffect(() => {\n updateScrollButtons()\n }, [items.length, updateScrollButtons])\n\n // \u9F20\u6807\u62D6\u62FD\u6EDA\u52A8\u5904\u7406\n const handleMouseDown = (e: React.MouseEvent<HTMLDivElement>) => {\n if (!scrollContainerRef.current) return\n setIsDragging(true)\n setStartX(e.pageX - scrollContainerRef.current.offsetLeft)\n setScrollLeft(scrollContainerRef.current.scrollLeft)\n }\n\n const handleMouseMove = (e: React.MouseEvent<HTMLDivElement>) => {\n if (!isDragging || !scrollContainerRef.current) return\n e.preventDefault()\n const x = e.pageX - scrollContainerRef.current.offsetLeft\n const walk = (x - startX) * 1.5 // \u6EDA\u52A8\u901F\u5EA6\u500D\u6570\n scrollContainerRef.current.scrollLeft = scrollLeft - walk\n }\n\n const handleMouseUp = () => {\n setIsDragging(false)\n }\n\n const handleMouseLeave = () => {\n setIsDragging(false)\n }\n\n // \u6C34\u5E73\u6EDA\u52A8\u51FD\u6570\n const scrollHorizontally = (direction: 'left' | 'right') => {\n if (scrollContainerRef.current) {\n const container = scrollContainerRef.current\n const scrollAmount = 100 // \u6BCF\u6B21\u6EDA\u52A8\u7684\u50CF\u7D20\u6570\uFF08\u8C03\u5C0F\u4E00\u4E9B\uFF09\n container.scrollBy({ left: direction === 'right' ? scrollAmount : -scrollAmount, behavior: 'smooth' })\n }\n }\n\n // \u7BAD\u5934\u56FE\u6807\u7EC4\u4EF6\n const ArrowIcon = ({ className }: { className?: string }) => (\n <svg\n className={className}\n width=\"16\"\n height=\"16\"\n viewBox=\"0 0 16 16\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M6 4L10 8L6 12\"\n stroke=\"currentColor\"\n strokeWidth=\"1.33\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n />\n </svg>\n )\n\n // \u5220\u9664\u56FE\u6807\u7EC4\u4EF6\n const DeleteIcon = ({ className }: { className?: string }) => (\n <svg\n className={className}\n width=\"20\"\n height=\"20\"\n viewBox=\"0 0 20 20\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M2.5 5H17.5M8.33333 9.16667V14.1667M11.6667 9.16667V14.1667M3.33333 5L4.16667 16.6667C4.16667 17.1087 4.34226 17.5326 4.65482 17.8452C4.96738 18.1577 5.39131 18.3333 5.83333 18.3333H14.1667C14.6087 18.3333 15.0326 18.1577 15.3452 17.8452C15.6577 17.5326 15.8333 17.1087 15.8333 16.6667L16.6667 5M7.5 5V2.5C7.5 2.27899 7.5878 2.06702 7.74408 1.91074C7.90036 1.75446 8.11232 1.66667 8.33333 1.66667H11.6667C11.8877 1.66667 12.0996 1.75446 12.2559 1.91074C12.4122 2.06702 12.5 2.27899 12.5 2.5V5\"\n stroke=\"currentColor\"\n strokeWidth=\"1.25\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n />\n </svg>\n )\n\n // Render items grid\n const renderItemsGrid = (theme: Theme) => {\n if (!items.length) return null\n\n return (\n <div className={cn('laptop:bg-container-secondary-0 rounded-box-small flex gap-1 p-1', classNames?.itemsGrid)}>\n {/* \u5DE6\u6EDA\u52A8\u6309\u94AE - \u684C\u9762\u7AEF\u663E\u793A\uFF0C\u5C11\u4E8E5\u4E2A\u5546\u54C1\u65F6\u4E0D\u6E32\u67D3\uFF0C\u6EDA\u52A8\u5230\u5F00\u5934\u65F6\u9690\u85CF\u4F46\u4FDD\u6301\u5360\u4F4D */}\n {items.length >= 5 && (\n <button\n onClick={() => scrollHorizontally('left')}\n className={cn(\n 'border-border laptop:flex hover:bg-muted-foreground/10 rounded-box-small hidden w-[32px] shrink-0 items-center justify-center px-2 transition-colors',\n !canScrollLeft &&\n 'laptop:bg-container-secondary-1 laptop:text-transparent laptop:pointer-events-none laptop:-my-1 laptop:-ml-1 laptop:py-1 laptop:pl-1 laptop:rounded-r-none',\n classNames?.expandButton,\n {\n 'laptop:bg-container-secondary-0': theme === 'dark',\n 'laptop:bg-container-primary': theme === 'dark' && !canScrollLeft,\n }\n )}\n aria-label=\"Scroll left to see more items\"\n >\n <ArrowIcon className=\"laptop:size-4 size-5 rotate-180\" />\n </button>\n )}\n\n <div\n ref={scrollContainerRef}\n onMouseDown={handleMouseDown}\n onMouseMove={handleMouseMove}\n onMouseUp={handleMouseUp}\n onMouseLeave={handleMouseLeave}\n onScroll={handleScroll}\n className={cn(\n 'scrollbar-hide laptop:gap-1 laptop:w-[256px] laptop:shrink-0 flex w-full gap-1 overflow-x-auto [-ms-overflow-style:none] [scrollbar-width:none] [&::-webkit-scrollbar]:hidden',\n isDragging ? 'cursor-grabbing' : 'cursor-grab',\n classNames?.itemGridContainer\n )}\n >\n {items\n .filter(line => line && line.id)\n .map(line => {\n const safeProduct = line.merchandise || {}\n const safeImage = safeProduct.image || {}\n const imageUrl = safeImage.url\n const imageAlt = safeImage.altText || 'Product image'\n const isLoading = removingItemId === line.id\n\n return (\n <div\n key={line.id}\n className={cn(\n 'laptop:size-12 bg-container-primary laptop:bg-white rounded-box-small group relative size-16 shrink-0 overflow-hidden',\n classNames?.gridItem\n )}\n >\n {imageUrl && (\n <img\n src={imageUrl}\n alt={imageAlt}\n draggable={false}\n className=\"rounded-box-small pointer-events-none size-full select-none object-cover\"\n />\n )}\n {/* \u5220\u9664 loading \u906E\u7F69 */}\n {isLoading && (\n <div className=\"rounded-box-small absolute inset-0 flex items-center justify-center bg-black/50\">\n <svg\n width=\"20\"\n height=\"20\"\n viewBox=\"0 0 16 16\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n className=\"animate-spin text-white\"\n >\n <circle cx=\"8\" cy=\"8\" r=\"6\" stroke=\"currentColor\" strokeWidth=\"2\" opacity=\"0.3\" />\n <path d=\"M14 8a6 6 0 0 0-6-6\" stroke=\"currentColor\" strokeWidth=\"2\" strokeLinecap=\"round\" />\n </svg>\n </div>\n )}\n <span\n role=\"button\"\n onClick={() => handleRemoveItem(line.id)}\n className={cn(\n 'laptop:hidden absolute right-[2px] top-[2px] cursor-pointer',\n isLoading && 'pointer-events-none opacity-0'\n )}\n aria-label=\"delete\"\n >\n <svg\n width=\"16\"\n height=\"16\"\n viewBox=\"0 0 16 16\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n className=\"pointer-events-none\"\n >\n <rect x=\"1.33301\" y=\"1.33301\" width=\"13.3333\" height=\"13.3333\" rx=\"6.66667\" fill=\"white\" />\n <path\n d=\"M5.37705 5.28896C5.57234 5.09402 5.88839 5.09442 6.08347 5.28965L8.08602 7.29358L10.0906 5.28896C10.2858 5.09402 10.6026 5.09395 10.7977 5.28896C10.9928 5.48418 10.9926 5.80078 10.7977 5.99607L8.79312 8.00069L10.7964 10.0053C10.9913 10.2007 10.9909 10.5179 10.7957 10.7131C10.6005 10.908 10.2844 10.9074 10.0893 10.7124L8.08602 8.7078L6.08347 10.7103C5.88821 10.9056 5.57155 10.9057 5.37636 10.7103C5.18148 10.515 5.18132 10.1984 5.37636 10.0032L7.37891 8.00069L5.37636 5.99676C5.18119 5.80143 5.18181 5.48423 5.37705 5.28896Z\"\n fill=\"#767880\"\n />\n </svg>\n </span>\n {/* \u5546\u54C1\u6807\u7B7E (\u5982 Free Gift) */}\n {line.productLabel && (\n <div className=\"absolute inset-x-0 bottom-0 flex items-center justify-center\">\n <div\n className=\"relative flex w-full items-center justify-center rounded-b-lg px-1 py-px backdrop-blur-sm\"\n style={{\n backgroundColor: 'rgba(251, 148, 63, 0.60)',\n }}\n >\n <Text size={1} className=\"relative text-center text-white\" html={line.productLabel} />\n </div>\n </div>\n )}\n {line.quantity > 1 && !line.productLabel && (\n <div className=\"mini-cart-quantity bg-brand-0 laptop:size-4 absolute bottom-0 right-0 flex size-4 items-center justify-center rounded-full text-white\">\n <Text className=\"text-sm\" html={String(line.quantity)} />\n </div>\n )}\n\n <div\n role=\"button\"\n onClick={() => handleRemoveItem(line.id)}\n className={cn(\n 'rounded-box-small absolute inset-0 hidden cursor-pointer items-center justify-center bg-black/60 transition-opacity',\n 'laptop:flex laptop:opacity-0 laptop:group-hover:opacity-100',\n isLoading && 'laptop:hidden',\n classNames?.gridItemOverlay\n )}\n aria-label=\"Remove item\"\n >\n <DeleteIcon className=\"pointer-events-none size-[20px] text-white\" />\n </div>\n </div>\n )\n })}\n\n {/* \u624B\u673A\u7AEF\u67E5\u770B\u66F4\u591A\u6309\u94AE */}\n {showMobileViewMore && (\n <button\n onClick={() => onClickToView?.(cart)}\n className={cn(\n 'bg-container-secondary-0 laptop:hidden flex size-16 shrink-0 items-center justify-center rounded-md',\n classNames?.mobileViewMoreButton\n )}\n aria-label={clickToView}\n >\n <svg\n width=\"20\"\n height=\"20\"\n viewBox=\"0 0 20 20\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n className=\"text-info-quaternary\"\n >\n <path\n d=\"M7.5 5L12.5 10L7.5 15\"\n stroke=\"currentColor\"\n strokeWidth=\"1.67\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n />\n </svg>\n </button>\n )}\n </div>\n\n {/* \u53F3\u6EDA\u52A8\u6309\u94AE - \u684C\u9762\u7AEF\u663E\u793A\uFF0C\u5C11\u4E8E5\u4E2A\u5546\u54C1\u65F6\u4E0D\u6E32\u67D3\uFF0C\u6EDA\u52A8\u5230\u7ED3\u5C3E\u65F6\u9690\u85CF\u4F46\u4FDD\u6301\u5360\u4F4D */}\n {items.length >= 5 && (\n <button\n onClick={() => scrollHorizontally('right')}\n className={cn(\n 'border-border laptop:flex hover:bg-muted-foreground/10 rounded-box-small hidden w-[32px] shrink-0 items-center justify-center px-2 transition-colors',\n !canScrollRight &&\n 'laptop:bg-container-secondary-1 laptop:text-transparent laptop:pointer-events-none laptop:-my-1 laptop:-mr-1 laptop:py-1 laptop:pr-1 laptop:rounded-l-none',\n classNames?.expandButton,\n {\n 'laptop:bg-container-secondary-0': theme === 'dark',\n 'laptop:bg-container-primary': theme === 'dark' && !canScrollRight,\n }\n )}\n aria-label=\"Scroll right to see more items\"\n >\n <ArrowIcon className=\"laptop:size-4 size-5\" />\n </button>\n )}\n </div>\n )\n }\n\n // Check if cart has items\n const hasItems = !isEmpty && items.length > 0\n\n return (\n <div\n ref={boxRef}\n className={cn(\n 'bg-container-secondary-1 text-info-primary tablet:px-6 laptop:px-12 desktop:px-12 lg-desktop:px-[128px] laptop:py-[16px] flex w-full px-4 py-[12px]',\n // \u79FB\u52A8\u7AEF\u5782\u76F4\u5E03\u5C40\uFF0C\u5927\u5C4F\u5E55\u6C34\u5E73\u5E03\u5C40\n 'flex-col items-stretch gap-3',\n 'laptop:flex-row laptop:items-center laptop:justify-around',\n hasItems ? 'laptop:items-center laptop:gap-4' : 'laptop:items-center laptop:gap-4',\n 'tablet:gap-6 laptop:gap-8',\n className,\n classNames?.root,\n {\n 'aiui-dark bg-container-primary': theme === 'dark',\n }\n )}\n {...props}\n >\n {/* \u79FB\u52A8\u7AEF\uFF1A\u5782\u76F4\u6392\u5217 | \u684C\u9762\u7AEF\uFF1A\u6C34\u5E73\u4E09\u5217\u5E03\u5C40 */}\n <div\n className={cn(\n 'laptop:flex-row flex w-full flex-col gap-4',\n 'laptop:flex-1 laptop:items-center laptop:justify-between',\n 'tablet:gap-6 laptop:gap-8',\n classNames?.content\n )}\n >\n <div\n className={cn(\n 'relative flex shrink flex-row items-center gap-2',\n 'desktop:gap-4',\n progressConfig && 'laptop:pl-[104px] pl-[72px]'\n )}\n >\n {/* \u5DE6\u4FA7\u5706\u5F62\u8FDB\u5EA6\u6761 - \u53EA\u6709\u914D\u7F6E\u4E86\u624D\u663E\u793A */}\n {progressConfig && (\n <CircleProgress\n totalSteps={progressConfig.totalSteps}\n currentStep={progressConfig.currentStep}\n image={progressConfig.image}\n label={progressConfig.label}\n progressColor={progressConfig.progressColor}\n labelColor={progressConfig.labelColor}\n backgroundColor={progressConfig.backgroundColor}\n size={progressConfig.size}\n laptopSize={progressConfig.laptopSize}\n className={cn(\n 'absolute bottom-0 left-0',\n 'lg-desktop:bottom-auto lg-desktop:top-[-46px] desktop:bottom-auto desktop:top-[-52px]',\n classNames?.circleProgress\n )}\n />\n )}\n {/* Center: Cart info and dynamic content */}\n <div className=\"laptop:flex-1 flex w-full flex-col\">\n {/* Cart title area */}\n <div className={cn('tablet:gap-2 flex flex-col gap-1', classNames?.cartInfo)}>\n {hasItems ? (\n <div className=\"flex w-full items-center gap-2\">\n <Heading\n size={2}\n as=\"h3\"\n className={cn('', classNames?.cartTitle)}\n html={itemsInCart.replace('{count}', `<span class=\"text-brand-0\">${itemCount || 0}</span>`)}\n />\n\n {/* Click to view link / Toggle products */}\n <Heading\n size={1}\n as=\"h5\"\n onClick={() => {\n // \u79FB\u52A8\u7AEF\uFF1A\u5207\u6362\u4EA7\u54C1\u5C55\u5F00\u72B6\u6001\uFF0C\u684C\u9762\u7AEF\uFF1A\u8C03\u7528\u539F\u56DE\u8C03\n const isMobile = window.innerWidth < 1025\n if (isMobile) {\n setIsProductsExpanded(!isProductsExpanded)\n } else {\n onClickToView?.(cart)\n }\n }}\n className={cn('flex cursor-pointer items-center gap-1', classNames?.expandButton)}\n >\n {/* \u684C\u9762\u7AEF\u663E\u793A\u6587\u5B57 + \u56FE\u6807\uFF0C\u79FB\u52A8\u7AEF\u53EA\u663E\u793A\u56FE\u6807 */}\n <Text\n as=\"span\"\n size={1}\n className=\"desktop:block hidden text-nowrap text-[16px] \"\n html={clickToView}\n />\n <ArrowIcon\n className={cn(\n 'size-4 transition-transform',\n isProductsExpanded ? 'laptop:rotate-0 -rotate-90' : 'laptop:rotate-0 rotate-90'\n )}\n />\n </Heading>\n </div>\n ) : (\n <Heading\n as=\"h3\"\n size={2}\n className={cn('tablet:text-2xl text-xl', classNames?.cartTitle)}\n html={emptyCart}\n />\n )}\n </div>\n\n {description && (\n <Text\n size={2}\n className={cn(\n 'mini-cart-description text-info-tertiary desktop:text-[16px] lg-desktop:text-[18px] text-[14px]',\n classNames?.cartDescription\n )}\n html={description}\n />\n )}\n </div>\n </div>\n\n {/* Items grid (\u79FB\u52A8\u7AEF\uFF1A\u6839\u636E\u5C55\u5F00\u72B6\u6001\u663E\u793A\uFF0C\u684C\u9762\u7AEF\uFF1A\u59CB\u7EC8\u663E\u793A) */}\n {hasItems && (\n <div className={cn('laptop:block laptop:shrink', isProductsExpanded ? 'block' : 'hidden')}>\n {renderItemsGrid(theme)}\n </div>\n )}\n {/* \u79FB\u52A8\u7AEF\uFF1A\u5206\u5272\u7EBF\uFF08\u53EA\u5728\u6709\u5546\u54C1\u65F6\u663E\u793A\uFF09 */}\n {hasItems && <hr className=\"laptop:hidden border-lines w-full border-t\" />}\n\n {/* Price and button area */}\n <div\n className={cn(\n 'tablet:gap-6 laptop:gap-4 laptop:justify-end flex flex-row items-stretch justify-between gap-4',\n classNames?.priceSection\n )}\n >\n {/* Price info */}\n <div className=\"flex flex-col items-end justify-center\">\n {/* Main price row */}\n <div className=\"flex items-center gap-2\">\n <Heading\n as=\"h6\"\n size={2}\n className={cn('whitespace-nowrap text-nowrap', classNames?.totalPrice)}\n html={total.replace('{total}', finalPrice)}\n />\n\n {/* Original price (if discounted) */}\n {originalPrice && (\n <Heading\n as=\"h6\"\n size={2}\n className={cn('text-info-tertiary whitespace-nowrap line-through', classNames?.originalPrice)}\n html={originalPrice}\n />\n )}\n </div>\n\n {/* Save amount */}\n {savingPrice && (\n <Heading\n size={2}\n as=\"h6\"\n className={cn(\n 'laptop:text-right text-marketing-1 w-full whitespace-nowrap text-nowrap text-left',\n classNames?.saveAmount\n )}\n html={savingText.replace('{amount}', savingPrice)}\n />\n )}\n </div>\n\n {/* Action button */}\n <Button\n disabled={!hasItems}\n loading={checkoutLoading}\n onClick={async () => {\n if (checkoutLoading) return\n setCheckoutLoading(true)\n try {\n await onCheckout?.(cart)\n } finally {\n setCheckoutLoading(false)\n }\n }}\n className={cn('whitespace-nowrap', classNames?.actionButton)}\n >\n {buyNowText}\n </Button>\n </div>\n </div>\n </div>\n )\n }\n)\n\nMiniCart.displayName = 'MiniCart'\nexport default MiniCart\n"],
|
|
5
|
+
"mappings": "mlBAAA,IAAAA,GAAA,GAAAC,GAAAD,GAAA,aAAAE,KAAA,eAAAC,GAAAH,IAgUQ,IAAAI,EAAA,6BA9TRC,EAAuB,oBACvBC,EAAmB,kCACnBC,EAAuB,qCACvBA,EAAqB,qCACrBA,EAAwB,qCAExBC,EAA2B,kCAC3BC,EAA4B,sCAE5B,MAAMC,GAAgB,OAChBC,GAAgB,YA2KhBC,EAAWP,EAAM,WACrB,CACE,CAAE,UAAAQ,EAAW,WAAAC,EAAa,CAAC,EAAG,KAAAC,EAAM,KAAAC,EAAM,eAAAC,EAAgB,aAAAC,EAAc,WAAAC,EAAY,cAAAC,EAAe,GAAGC,CAAM,EAC5GC,IACG,CACH,MAAMC,EAASlB,EAAM,OAAuB,IAAI,EAC1C,CAAE,KAAAmB,EAAM,MAAAC,EAAQ,QAAS,OAAAC,GAAS,KAAM,mBAAAC,EAAqB,EAAK,EAAIZ,GAAQ,CAAC,KAErF,eAAYQ,EAAQ,CAClB,cAAAb,GACA,cAAAC,GACA,eAAgBa,GAAM,aAAe,YACrC,qBAAsBA,GAAM,WAC9B,CAAC,EAEDnB,EAAM,oBAAoBiB,EAAK,IAAMC,EAAO,OAAyB,EAGrE,MAAMK,EAAYJ,GAA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I,CACF,MAAM/B,IAAaH,CAAI,CACzB,QAAE,CACAkC,EAAmB,EAAK,CAC1B,EACF,EACA,aAAW,MAAG,oBAAqBpC,GAAY,YAAY,EAE1D,SAAAoB,GACH,GACF,GACF,EACF,CAEJ,CACF,EAEAtB,EAAS,YAAc,WACvB,IAAOV,GAAQU",
|
|
6
6
|
"names": ["MiniCart_exports", "__export", "MiniCart_default", "__toCommonJS", "import_jsx_runtime", "React", "import_helpers", "import_components", "import_CircleProgress", "import_useExposure", "componentType", "componentName", "MiniCart", "className", "classNames", "data", "cart", "progressConfig", "onRemoveItem", "onCheckout", "onClickToView", "props", "ref", "boxRef", "copy", "theme", "locale", "showMobileViewMore", "emptyCart", "description", "itemsInCart", "total", "totalWithCoupon", "clickToView", "buyNowText", "savingText", "items", "itemCount", "item", "isEmpty", "totalAmount", "subtotalAmount", "savingAmount", "finalPrice", "originalPrice", "savingPrice", "scrollContainerRef", "isProductsExpanded", "setIsProductsExpanded", "checkoutLoading", "setCheckoutLoading", "removingItemId", "setRemovingItemId", "handleRemoveItem", "id", "isDragging", "setIsDragging", "startX", "setStartX", "scrollLeft", "setScrollLeft", "canScrollLeft", "setCanScrollLeft", "canScrollRight", "setCanScrollRight", "updateScrollButtons", "container", "scrollWidth", "clientWidth", "handleScroll", "handleMouseDown", "e", "handleMouseMove", "walk", "handleMouseUp", "handleMouseLeave", "scrollHorizontally", "direction", "scrollAmount", "ArrowIcon", "DeleteIcon", "renderItemsGrid", "line", "safeImage", "imageUrl", "imageAlt", "isLoading", "hasItems", "CircleProgress"]
|
|
7
7
|
}
|
|
@@ -14,7 +14,7 @@ declare const _default: React.ForwardRefExoticComponent<Omit<React.HTMLAttribute
|
|
|
14
14
|
items: Item[];
|
|
15
15
|
};
|
|
16
16
|
};
|
|
17
|
-
} & React.RefAttributes<HTMLDivElement>, "container" | keyof import("../../shared/Styles.js").StylesProps> & import("../../shared/Styles.js").StylesProps & import("
|
|
17
|
+
} & React.RefAttributes<HTMLDivElement>, "container" | keyof import("../../shared/Styles.js").StylesProps> & import("../../shared/Styles.js").StylesProps & import("../WheelLottery").ContainerProps & React.RefAttributes<unknown>> & {
|
|
18
18
|
readonly $$typeof: symbol;
|
|
19
19
|
};
|
|
20
20
|
export default _default;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";var W=Object.create;var _=Object.defineProperty;var X=Object.getOwnPropertyDescriptor;var ee=Object.getOwnPropertyNames;var te=Object.getPrototypeOf,ae=Object.prototype.hasOwnProperty;var se=(s,a)=>{for(var o in a)_(s,o,{get:a[o],enumerable:!0})},D=(s,a,o,v)=>{if(a&&typeof a=="object"||typeof a=="function")for(let p of ee(a))!ae.call(s,p)&&p!==o&&_(s,p,{get:()=>a[p],enumerable:!(v=X(a,p))||v.enumerable});return s};var V=(s,a,o)=>(o=s!=null?W(te(s)):{},D(a||!s||!s.__esModule?_(o,"default",{value:s,enumerable:!0}):o,s)),le=s=>D(_({},"__esModule",{value:!0}),s);var ie={};se(ie,{default:()=>oe});module.exports=le(ie);var e=require("react/jsx-runtime"),r=V(require("react")),Q=require("react-responsive"),Y=require("../../shared/Styles.js"),U=V(require("../../components/picture.js")),E=V(require("../../components/button.js")),H=require("../../components/heading.js"),q=require("../VideoModal/index.js"),L=require("../../components/grid.js"),O=V(require("../Title/index.js")),i=require("../../helpers/utils.js"),z=V(require("../SwiperBox/index.js")),j=require("../../shared/mimeType.js"),y=require("../../components/tabs.js"),Z=require("../../hooks/useExposure.js"),S=require("../../shared/trackUrlRef.js"),F=require("../AiuiProvider/index.js"),J=require("../../shared/track.js");const w="image",g="p1_banner",C=({data:s,configuration:a,jIndex:o,spanType:v,title:p,onSecondaryButtonClick:M,onPrimaryButtonClick:R})=>{const[f,c]=(0,r.useState)(!1),P=(0,Q.useMediaQuery)({query:"(max-width: 768px)"}),B=(0,r.useRef)(null),k=()=>{if(v)switch(v){case"full":return"tablet:aspect-w-[704] tablet:aspect-h-[400] laptop:aspect-w-[896] laptop:aspect-h-[384] desktop:aspect-w-[1312] desktop:aspect-h-[512] lg-desktop:aspect-w-[1664] lg-desktop:aspect-h-[640]";case"half":return"tablet:aspect-w-[704] tablet:aspect-h-[480] laptop:aspect-w-[440] laptop:aspect-h-[384] desktop:aspect-w-[648] desktop:aspect-h-[512] lg-desktop:aspect-w-[824] lg-desktop:aspect-h-[640]";case"one-third":return"tablet:aspect-w-[296] tablet:aspect-h-[400] laptop:aspect-w-[288] laptop:aspect-h-[384] desktop:aspect-w-[427] desktop:aspect-h-[512] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[640]";default:return"tablet:aspect-w-[296] tablet:aspect-h-[400] laptop:aspect-w-[288] laptop:aspect-h-[384] desktop:aspect-w-[427] desktop:aspect-h-[512] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[640]"}else switch(a?.num){case 1:return"tablet:aspect-w-[704] tablet:aspect-h-[400] laptop:aspect-w-[896] laptop:aspect-h-[384] desktop:aspect-w-[1312] desktop:aspect-h-[512] lg-desktop:aspect-w-[1664] lg-desktop:aspect-h-[640]";case 2:return"tablet:aspect-w-[704] tablet:aspect-h-[480] laptop:aspect-w-[440] laptop:aspect-h-[384] desktop:aspect-w-[648] desktop:aspect-h-[512] lg-desktop:aspect-w-[824] lg-desktop:aspect-h-[640]";case 3:return"tablet:aspect-w-[296] tablet:aspect-h-[400] laptop:aspect-w-[288] laptop:aspect-h-[384] desktop:aspect-w-[427] desktop:aspect-h-[512] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[640]";default:return"tablet:aspect-w-[296] tablet:aspect-h-[400] laptop:aspect-w-[288] laptop:aspect-h-[384] desktop:aspect-w-[427] desktop:aspect-h-[512] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[640]"}};(0,Z.useExposure)(B,{componentType:w,componentName:g,position:o,componentTitle:s.title,componentDescription:s.description,navigation:a?.activeTab}),(0,r.useEffect)(()=>{c(P)},[P]);const{theme:I="light",title:n,description:m,imageUrl:d,primaryButton:x,secondaryButton:h,imageMobileUrl:u,blockLink:N,video:T,youtubeId:b,isYouTube:G,id:$}=s,t="lg-desktop:px-7 lg-desktop:pb-[14px] lg-desktop:pt-[15px] lg-desktop:text-[16px]";return(0,e.jsxs)("div",{className:(0,i.cn)("item-wrapper cursor-pointer","text-info-primary group relative box-border w-full overflow-hidden",k(),{"rounded-2xl":a?.shape==="rounded","aiui-dark":I==="dark","h-[400px]":f},"text-info-primary"),ref:B,children:[(N||h.link)&&(0,e.jsx)("a",{className:"absolute inset-0 z-10",href:(0,S.trackUrlRef)((0,i.getLocalizedPath)(N||h.link||"",a?.locale||"us"),`${w}_${g}`),"data-headless-type-name":`${w}#${g}`,"data-headless-title-desc-button":`${n}#${m}`,"data-headless-nav-position":`${a?.activeTab}#${o}`,"aria-hidden":"true",tabIndex:-1}),(0,e.jsxs)("div",{className:"absolute inset-0",children:[(0,j.isVideo)(d?.mimeType)?(0,e.jsx)("video",{autoPlay:!0,muted:!0,playsInline:!0,loop:!0,className:"tablet:block hidden size-full overflow-hidden object-cover",children:(0,e.jsx)("source",{src:d?.url,type:"video/mp4"})}):(0,e.jsx)(U.default,{source:d?.url,alt:d?.alt||"",className:"tablet:block hidden h-full overflow-hidden",imgClassName:"h-full transition-all duration-300 group-hover:scale-105 object-cover",style:{aspectRatio:`${d?.width}/${d?.height}`}}),(0,j.isVideo)(u?.mimeType)?(0,e.jsx)("video",{autoPlay:!0,muted:!0,playsInline:!0,loop:!0,className:"tablet:hidden block size-full overflow-hidden object-cover",children:(0,e.jsx)("source",{src:u?.url,type:"video/mp4"})}):(0,e.jsx)(U.default,{source:u?.url||d?.url,alt:u?.alt||d?.alt||"",className:"tablet:hidden block h-full overflow-hidden",imgClassName:"h-full transition-all duration-300 object-cover"}),(0,e.jsxs)("div",{className:(0,i.cn)("absolutestyle laptop:p-6 desktop:p-[32px] laptop:gap-4 desktop:gap-6 absolute inset-x-0 bottom-0 z-20 flex w-fit flex-col gap-6 p-4",{"fullstyle laptop:top-1/2 laptop:-translate-y-1/2 laptop:bottom-auto":s?.width==="full"}),children:[(0,e.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,e.jsx)(H.Heading,{size:3,as:"h3",className:"item-title",html:n}),(0,e.jsx)(H.Heading,{as:"h4",className:"item-description desktop:text-[16px] lg-desktop:text-[18px] line-clamp-1 text-[14px]",html:m})]}),(0,e.jsxs)("div",{className:"lg-desktop:gap-3 flex gap-2",children:[h&&h.text&&(0,e.jsxs)(E.default,{"aria-label":n??m,className:(0,i.cn)(t,"link-left"),variant:"secondary",as:"a","data-track":`${$}-link-left`,onClick:()=>{M?.(s)},href:(0,S.trackUrlRef)((0,i.getLocalizedPath)(h.link||"",a?.locale||"us"),`${w}_${g}`),"data-headless-type-name":`${w}#${g}`,"data-headless-title-desc-button":`${n}#${m}#${h.text}`,"data-headless-nav-position":`${a?.activeTab}#${o}`,children:[h.text,(0,e.jsx)("span",{className:"sr-only",children:n??m})]}),x&&x.text&&(0,e.jsx)(E.default,{"aria-label":n??m,className:(0,i.cn)(t,"link-right"),variant:"primary","data-track":`${$}-link-right`,as:"a",onClick:()=>{R?.(s)},href:(0,S.trackUrlRef)((0,i.getLocalizedPath)(x.link||"",a?.locale||"us"),`${w}_${g}`),"data-headless-type-name":`${w}#${g}`,"data-headless-title-desc-button":`${n}#${m}#${x.text}`,"data-headless-nav-position":`${a?.activeTab}#${o}`,children:x.text})]})]})]}),(0,e.jsx)("div",{children:(0,e.jsx)("div",{className:"laptop:bottom-6 laptop:right-6 absolute bottom-4 right-4 z-20",children:(T?.url||b)&&(0,e.jsx)("button",{onClick:()=>{a?.onVideoPlayBtnClick?.(T?.url||b,G)},className:"laptop:size-12 flex size-8 items-center justify-center rounded-full bg-white bg-opacity-20 hover:bg-black/75",children:(0,e.jsx)("svg",{width:"12",height:"14",viewBox:"0 0 12 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,e.jsx)("path",{d:"M12 7L0 14L0 0L12 7Z",fill:"white"})})})})})]})},A=r.default.forwardRef((s,a)=>{const{data:o,className:v,onSecondaryButtonClick:p,onPrimaryButtonClick:M,...R}=s,{shape:f,sectionTitle:c,groupByTab:P=!1,items:B=[],carousel:k}=o,[I,n]=(0,r.useState)(!1),[m,d]=(0,r.useState)(""),[x,h]=(0,r.useState)(""),{locale:u="us"}=(0,F.useAiuiContext)(),N=t=>{switch(t){case"full":return 12;case"half":return 6;case"one-third":return 4}},T=B.map(t=>t.tabName).filter(Boolean).filter((t,l,K)=>K.indexOf(t)===l),b=(t,l)=>{n(!0),l?h?.(t||""):d?.(t||"")},G=(t,l)=>{switch(t){case 1:return 1;case 2:return 2;default:return l?2.3:3}},$=T.map(t=>({tabName:t,items:B.filter(l=>l.tabName===t)})).reduce((t,l)=>(t[l.tabName]=l.items,t),{});return(0,e.jsxs)("section",{"data-ui-component-id":"MultiLayoutGraphicBlock",ref:a,...R,className:(0,i.cn)("multiLayoutGraphicBlock","text-info-primary",v),children:[c&&(0,e.jsx)(O.default,{data:{title:c},className:"section-title"}),P?(0,e.jsxs)(y.Tabs,{shape:f,align:"left",defaultValue:(0,i.spaceToHyphen)(T[0]),children:[(0,e.jsx)(y.TabsList,{children:T.map((t,l)=>(0,e.jsx)(y.TabsTrigger,{value:(0,i.spaceToHyphen)(t),onClick:()=>{(0,J.gaTrack)({event:"ga4Event",event_name:"component_click",event_parameters:{page_group:"Home Page",component_type:w,component_name:g,component_title:c,component_position:1,navigation:t,button_name:t}})},children:t},l))}),T.map((t,l)=>(0,e.jsx)(y.TabsContent,{value:(0,i.spaceToHyphen)(t),className:"desktop:mt-[36px] mt-[24px] w-full",children:(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)(z.default,{className:"!overflow-visible",id:"MultiLayoutGraphicBlock1",data:{list:$?.[t]||[],configuration:{shape:f,isTab:P,activeTab:t,title:c,num:$?.[t]?.length||0,locale:u,onVideoPlayBtnClick:b,onSecondaryButtonClick:p,onPrimaryButtonClick:M}},Slide:C,breakpoints:{0:{spaceBetween:12,freeMode:!1,slidesPerView:1},374:{spaceBetween:12,freeMode:!1,slidesPerView:1.2},768:{spaceBetween:16,freeMode:!1,slidesPerView:G($?.[t]?.length||0,!0)},1024:{spaceBetween:16,freeMode:!1,slidesPerView:G($?.[t]?.length||0)}}}),k&&k?.items.length>0?(0,e.jsx)(z.default,{className:"!overflow-visible",id:"MultiLayoutGraphicBlock2",data:{list:k?.items||[],configuration:{shape:f,isTab:P,locale:u,onVideoPlayBtnClick:b,title:c,onSecondaryButtonClick:p,onPrimaryButtonClick:M}},Slide:C,breakpoints:{0:{spaceBetween:12,freeMode:!1,slidesPerView:1},374:{spaceBetween:12,freeMode:!1,slidesPerView:1.2},768:{spaceBetween:16,freeMode:!1,slidesPerView:2.3},1024:{spaceBetween:16,freeMode:!1,slidesPerView:3.1},1440:{spaceBetween:16,freeMode:!1,slidesPerView:4}}}):null]})},l))]}):(0,e.jsxs)(e.Fragment,{children:[(0,e.jsxs)(L.Grid,{className:"w-full",children:[B.map((t,l)=>(0,e.jsx)(L.GridItem,{span:N(t.width??"full"),className:"laptop:block hidden",children:(0,e.jsx)(C,{data:t,configuration:{shape:f,locale:u,onVideoPlayBtnClick:b,title:c},jIndex:l,spanType:t.width,onSecondaryButtonClick:p,onPrimaryButtonClick:M})},`${t?.title||""}${l}`)),B.map((t,l)=>(0,e.jsx)(L.GridItem,{span:N("full"),className:"laptop:hidden block",children:(0,e.jsx)(C,{data:t,configuration:{shape:f,locale:u,onVideoPlayBtnClick:b,title:c},jIndex:l,spanType:"full"})},`${t?.title||""}${l}`))]}),k&&k?.items.length>0?(0,e.jsx)(z.default,{className:"!overflow-visible",id:"MultiLayoutGraphicBlock3",data:{list:k?.items||[],configuration:{shape:f,locale:u,onVideoPlayBtnClick:b,title:c,onSecondaryButtonClick:p,onPrimaryButtonClick:M}},Slide:C,breakpoints:{0:{spaceBetween:12,freeMode:!1,slidesPerView:1},374:{spaceBetween:12,freeMode:!1,slidesPerView:1.2},768:{spaceBetween:16,freeMode:!1,slidesPerView:2.3},1024:{spaceBetween:16,freeMode:!1,slidesPerView:3.1},1440:{spaceBetween:16,freeMode:!1,slidesPerView:4}}}):null]}),I&&(0,e.jsx)(q.VideoModal,{visible:I,youTubeId:x,videoUrl:m,onCloseModal:()=>n(!1)})]})});A.displayName="MultiLayoutGraphicBlock";var oe=(0,Y.withLayout)(A);
|
|
1
|
+
"use strict";var W=Object.create;var _=Object.defineProperty;var X=Object.getOwnPropertyDescriptor;var ee=Object.getOwnPropertyNames;var te=Object.getPrototypeOf,ae=Object.prototype.hasOwnProperty;var se=(s,a)=>{for(var o in a)_(s,o,{get:a[o],enumerable:!0})},D=(s,a,o,v)=>{if(a&&typeof a=="object"||typeof a=="function")for(let p of ee(a))!ae.call(s,p)&&p!==o&&_(s,p,{get:()=>a[p],enumerable:!(v=X(a,p))||v.enumerable});return s};var V=(s,a,o)=>(o=s!=null?W(te(s)):{},D(a||!s||!s.__esModule?_(o,"default",{value:s,enumerable:!0}):o,s)),le=s=>D(_({},"__esModule",{value:!0}),s);var ie={};se(ie,{default:()=>oe});module.exports=le(ie);var e=require("react/jsx-runtime"),r=V(require("react")),Q=require("react-responsive"),Y=require("../../shared/Styles.js"),U=V(require("../../components/picture.js")),E=V(require("../../components/button.js")),H=require("../../components/heading.js"),q=require("../VideoModal/index.js"),L=require("../../components/grid.js"),O=V(require("../Title/index.js")),i=require("../../helpers/utils.js"),z=V(require("../SwiperBox/index.js")),j=require("../../shared/mimeType.js"),y=require("../../components/tabs.js"),Z=require("../../hooks/useExposure.js"),S=require("../../shared/trackUrlRef.js"),F=require("../AiuiProvider/index.js"),J=require("../../shared/track.js");const w="image",g="p1_banner",C=({data:s,configuration:a,jIndex:o,spanType:v,title:p,onSecondaryButtonClick:M,onPrimaryButtonClick:R})=>{const[f,c]=(0,r.useState)(!1),P=(0,Q.useMediaQuery)({query:"(max-width: 768px)"}),B=(0,r.useRef)(null),k=()=>{if(v)switch(v){case"full":return"tablet:aspect-w-[704] tablet:aspect-h-[400] laptop:aspect-w-[896] laptop:aspect-h-[384] desktop:aspect-w-[1312] desktop:aspect-h-[512] lg-desktop:aspect-w-[1664] lg-desktop:aspect-h-[640]";case"half":return"tablet:aspect-w-[704] tablet:aspect-h-[480] laptop:aspect-w-[440] laptop:aspect-h-[384] desktop:aspect-w-[648] desktop:aspect-h-[512] lg-desktop:aspect-w-[824] lg-desktop:aspect-h-[640]";case"one-third":return"tablet:aspect-w-[296] tablet:aspect-h-[400] laptop:aspect-w-[288] laptop:aspect-h-[384] desktop:aspect-w-[427] desktop:aspect-h-[512] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[640]";default:return"tablet:aspect-w-[296] tablet:aspect-h-[400] laptop:aspect-w-[288] laptop:aspect-h-[384] desktop:aspect-w-[427] desktop:aspect-h-[512] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[640]"}else switch(a?.num){case 1:return"tablet:aspect-w-[704] tablet:aspect-h-[400] laptop:aspect-w-[896] laptop:aspect-h-[384] desktop:aspect-w-[1312] desktop:aspect-h-[512] lg-desktop:aspect-w-[1664] lg-desktop:aspect-h-[640]";case 2:return"tablet:aspect-w-[704] tablet:aspect-h-[480] laptop:aspect-w-[440] laptop:aspect-h-[384] desktop:aspect-w-[648] desktop:aspect-h-[512] lg-desktop:aspect-w-[824] lg-desktop:aspect-h-[640]";case 3:return"tablet:aspect-w-[296] tablet:aspect-h-[400] laptop:aspect-w-[288] laptop:aspect-h-[384] desktop:aspect-w-[427] desktop:aspect-h-[512] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[640]";default:return"tablet:aspect-w-[296] tablet:aspect-h-[400] laptop:aspect-w-[288] laptop:aspect-h-[384] desktop:aspect-w-[427] desktop:aspect-h-[512] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[640]"}};(0,Z.useExposure)(B,{componentType:w,componentName:g,position:o,componentTitle:s.title,componentDescription:s.description,navigation:a?.activeTab}),(0,r.useEffect)(()=>{c(P)},[P]);const{theme:I="light",title:n,description:m,imageUrl:d,primaryButton:x,secondaryButton:h,imageMobileUrl:u,blockLink:N,video:T,youtubeId:b,isYouTube:G,id:$}=s,t="lg-desktop:px-7 lg-desktop:pb-[14px] lg-desktop:pt-[15px] lg-desktop:text-[16px]";return(0,e.jsxs)("div",{className:(0,i.cn)("item-wrapper cursor-pointer","text-info-primary group relative box-border w-full overflow-hidden",k(),{"rounded-2xl":a?.shape==="rounded","aiui-dark":I==="dark","h-[400px]":f},"text-info-primary"),ref:B,children:[(N||h.link)&&(0,e.jsx)("a",{className:"absolute inset-0 z-10",href:(0,S.trackUrlRef)((0,i.getLocalizedPath)(N||h.link||"",a?.locale||"us"),`${w}_${g}`),"data-headless-type-name":`${w}#${g}`,"data-headless-title-desc-button":`${n}#${m}`,"data-headless-nav-position":`${a?.activeTab}#${o}`,"aria-hidden":"true",tabIndex:-1}),(0,e.jsxs)("div",{className:"absolute inset-0",children:[(0,j.isVideo)(d?.mimeType)?(0,e.jsx)("video",{autoPlay:!0,muted:!0,playsInline:!0,loop:!0,className:"tablet:block hidden size-full overflow-hidden object-cover",children:(0,e.jsx)("source",{src:d?.url,type:"video/mp4"})}):(0,e.jsx)(U.default,{source:d?.url,alt:d?.alt||"",className:"tablet:block hidden h-full overflow-hidden",imgClassName:"h-full transition-all duration-300 group-hover:scale-105 object-cover",style:{aspectRatio:`${d?.width}/${d?.height}`}}),(0,j.isVideo)(u?.mimeType)?(0,e.jsx)("video",{autoPlay:!0,muted:!0,playsInline:!0,loop:!0,className:"tablet:hidden block size-full overflow-hidden object-cover",children:(0,e.jsx)("source",{src:u?.url,type:"video/mp4"})}):(0,e.jsx)(U.default,{source:u?.url||d?.url,alt:u?.alt||d?.alt||"",className:"tablet:hidden block h-full overflow-hidden",imgClassName:"h-full transition-all duration-300 object-cover"})]}),(0,e.jsxs)("div",{className:(0,i.cn)("absolutestyle laptop:p-6 desktop:p-[32px] laptop:gap-4 desktop:gap-6 absolute inset-x-0 bottom-0 z-20 flex w-fit flex-col gap-6 p-4",{"fullstyle laptop:top-1/2 laptop:-translate-y-1/2 laptop:bottom-auto":s?.width==="full"}),children:[(0,e.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,e.jsx)(H.Heading,{size:3,as:"h3",className:"item-title",html:n}),(0,e.jsx)(H.Heading,{as:"h4",className:"item-description desktop:text-[16px] lg-desktop:text-[18px] line-clamp-1 text-[14px]",html:m})]}),(0,e.jsxs)("div",{className:"lg-desktop:gap-3 flex gap-2",children:[h&&h.text&&(0,e.jsxs)(E.default,{"aria-label":n??m,className:(0,i.cn)(t,"link-left"),variant:"secondary",as:"a","data-track":`${$}-link-left`,onClick:()=>{M?.(s)},href:(0,S.trackUrlRef)((0,i.getLocalizedPath)(h.link||"",a?.locale||"us"),`${w}_${g}`),"data-headless-type-name":`${w}#${g}`,"data-headless-title-desc-button":`${n}#${m}#${h.text}`,"data-headless-nav-position":`${a?.activeTab}#${o}`,children:[h.text,(0,e.jsx)("span",{className:"sr-only",children:n??m})]}),x&&x.text&&(0,e.jsx)(E.default,{"aria-label":n??m,className:(0,i.cn)(t,"link-right"),variant:"primary","data-track":`${$}-link-right`,as:"a",onClick:()=>{R?.(s)},href:(0,S.trackUrlRef)((0,i.getLocalizedPath)(x.link||"",a?.locale||"us"),`${w}_${g}`),"data-headless-type-name":`${w}#${g}`,"data-headless-title-desc-button":`${n}#${m}#${x.text}`,"data-headless-nav-position":`${a?.activeTab}#${o}`,children:x.text})]})]}),(0,e.jsx)("div",{children:(0,e.jsx)("div",{className:"laptop:bottom-6 laptop:right-6 absolute bottom-4 right-4 z-20",children:(T?.url||b)&&(0,e.jsx)("button",{onClick:()=>{a?.onVideoPlayBtnClick?.(T?.url||b,G)},className:"laptop:size-12 flex size-8 items-center justify-center rounded-full bg-white bg-opacity-20 hover:bg-black/75",children:(0,e.jsx)("svg",{width:"12",height:"14",viewBox:"0 0 12 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,e.jsx)("path",{d:"M12 7L0 14L0 0L12 7Z",fill:"white"})})})})})]})},A=r.default.forwardRef((s,a)=>{const{data:o,className:v,onSecondaryButtonClick:p,onPrimaryButtonClick:M,...R}=s,{shape:f,sectionTitle:c,groupByTab:P=!1,items:B=[],carousel:k}=o,[I,n]=(0,r.useState)(!1),[m,d]=(0,r.useState)(""),[x,h]=(0,r.useState)(""),{locale:u="us"}=(0,F.useAiuiContext)(),N=t=>{switch(t){case"full":return 12;case"half":return 6;case"one-third":return 4}},T=B.map(t=>t.tabName).filter(Boolean).filter((t,l,K)=>K.indexOf(t)===l),b=(t,l)=>{n(!0),l?h?.(t||""):d?.(t||"")},G=(t,l)=>{switch(t){case 1:return 1;case 2:return 2;default:return l?2.3:3}},$=T.map(t=>({tabName:t,items:B.filter(l=>l.tabName===t)})).reduce((t,l)=>(t[l.tabName]=l.items,t),{});return(0,e.jsxs)("section",{"data-ui-component-id":"MultiLayoutGraphicBlock",ref:a,...R,className:(0,i.cn)("multiLayoutGraphicBlock","text-info-primary",v),children:[c&&(0,e.jsx)(O.default,{data:{title:c},className:"section-title"}),P?(0,e.jsxs)(y.Tabs,{shape:f,align:"left",defaultValue:(0,i.spaceToHyphen)(T[0]),children:[(0,e.jsx)(y.TabsList,{children:T.map((t,l)=>(0,e.jsx)(y.TabsTrigger,{value:(0,i.spaceToHyphen)(t),onClick:()=>{(0,J.gaTrack)({event:"ga4Event",event_name:"component_click",event_parameters:{page_group:"Home Page",component_type:w,component_name:g,component_title:c,component_position:1,navigation:t,button_name:t}})},children:t},l))}),T.map((t,l)=>(0,e.jsx)(y.TabsContent,{value:(0,i.spaceToHyphen)(t),className:"desktop:mt-[36px] mt-[24px] w-full",children:(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)(z.default,{className:"!overflow-visible",id:"MultiLayoutGraphicBlock1",data:{list:$?.[t]||[],configuration:{shape:f,isTab:P,activeTab:t,title:c,num:$?.[t]?.length||0,locale:u,onVideoPlayBtnClick:b,onSecondaryButtonClick:p,onPrimaryButtonClick:M}},Slide:C,breakpoints:{0:{spaceBetween:12,freeMode:!1,slidesPerView:1},374:{spaceBetween:12,freeMode:!1,slidesPerView:1.2},768:{spaceBetween:16,freeMode:!1,slidesPerView:G($?.[t]?.length||0,!0)},1024:{spaceBetween:16,freeMode:!1,slidesPerView:G($?.[t]?.length||0)}}}),k&&k?.items.length>0?(0,e.jsx)(z.default,{className:"!overflow-visible",id:"MultiLayoutGraphicBlock2",data:{list:k?.items||[],configuration:{shape:f,isTab:P,locale:u,onVideoPlayBtnClick:b,title:c,onSecondaryButtonClick:p,onPrimaryButtonClick:M}},Slide:C,breakpoints:{0:{spaceBetween:12,freeMode:!1,slidesPerView:1},374:{spaceBetween:12,freeMode:!1,slidesPerView:1.2},768:{spaceBetween:16,freeMode:!1,slidesPerView:2.3},1024:{spaceBetween:16,freeMode:!1,slidesPerView:3.1},1440:{spaceBetween:16,freeMode:!1,slidesPerView:4}}}):null]})},l))]}):(0,e.jsxs)(e.Fragment,{children:[(0,e.jsxs)(L.Grid,{className:"w-full",children:[B.map((t,l)=>(0,e.jsx)(L.GridItem,{span:N(t.width??"full"),className:"laptop:block hidden",children:(0,e.jsx)(C,{data:t,configuration:{shape:f,locale:u,onVideoPlayBtnClick:b,title:c},jIndex:l,spanType:t.width,onSecondaryButtonClick:p,onPrimaryButtonClick:M})},`${t?.title||""}${l}`)),B.map((t,l)=>(0,e.jsx)(L.GridItem,{span:N("full"),className:"laptop:hidden block",children:(0,e.jsx)(C,{data:t,configuration:{shape:f,locale:u,onVideoPlayBtnClick:b,title:c},jIndex:l,spanType:"full"})},`${t?.title||""}${l}`))]}),k&&k?.items.length>0?(0,e.jsx)(z.default,{className:"!overflow-visible",id:"MultiLayoutGraphicBlock3",data:{list:k?.items||[],configuration:{shape:f,locale:u,onVideoPlayBtnClick:b,title:c,onSecondaryButtonClick:p,onPrimaryButtonClick:M}},Slide:C,breakpoints:{0:{spaceBetween:12,freeMode:!1,slidesPerView:1},374:{spaceBetween:12,freeMode:!1,slidesPerView:1.2},768:{spaceBetween:16,freeMode:!1,slidesPerView:2.3},1024:{spaceBetween:16,freeMode:!1,slidesPerView:3.1},1440:{spaceBetween:16,freeMode:!1,slidesPerView:4}}}):null]}),I&&(0,e.jsx)(q.VideoModal,{visible:I,youTubeId:x,videoUrl:m,onCloseModal:()=>n(!1)})]})});A.displayName="MultiLayoutGraphicBlock";var oe=(0,Y.withLayout)(A);
|
|
2
2
|
//# sourceMappingURL=MultiLayoutGraphicBlock.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/biz-components/MultiLayoutGraphicBlock/MultiLayoutGraphicBlock.tsx"],
|
|
4
|
-
"sourcesContent": ["import React, { useState, useEffect, useRef } from 'react'\nimport { useMediaQuery } from 'react-responsive'\nimport type { MultiLayoutGraphicBlockProps, Item } from './types'\nimport { withLayout } from '../../shared/Styles.js'\nimport Picture from '../../components/picture.js'\nimport Button from '../../components/button.js'\nimport { Heading } from '../../components/heading.js'\nimport { VideoModal } from '../VideoModal/index.js'\nimport { Grid, GridItem } from '../../components/grid.js'\nimport Title from '../Title/index.js'\nimport { cn, spaceToHyphen, getLocalizedPath } from '../../helpers/utils.js'\nimport SwiperBox from '../SwiperBox/index.js'\nimport { isVideo } from '../../shared/mimeType.js'\nimport { Tabs, TabsList, TabsTrigger, TabsContent } from '../../components/tabs.js'\nimport { useExposure } from '../../hooks/useExposure.js'\nimport { trackUrlRef } from '../../shared/trackUrlRef.js'\nimport { useAiuiContext } from '../AiuiProvider/index.js'\nimport { gaTrack } from '../../shared/track.js'\n\nconst componentType = 'image'\nconst componentName = 'p1_banner'\n\nconst ItemBlock = ({\n data: item,\n configuration,\n jIndex,\n spanType,\n title: titleProp,\n onSecondaryButtonClick,\n onPrimaryButtonClick,\n}: {\n data: Item\n configuration?: any\n jIndex?: number\n spanType?: string\n title?: string\n onSecondaryButtonClick?: (data: Item) => void\n onPrimaryButtonClick?: (data: Item) => void\n}) => {\n const [isMobile, setIsMobile] = useState<boolean>(false)\n const mediaQuery = useMediaQuery({ query: '(max-width: 768px)' })\n\n const ref = useRef<HTMLDivElement>(null)\n\n const handleAspect = () => {\n if (spanType) {\n switch (spanType) {\n case 'full':\n return 'tablet:aspect-w-[704] tablet:aspect-h-[400] laptop:aspect-w-[896] laptop:aspect-h-[384] desktop:aspect-w-[1312] desktop:aspect-h-[512] lg-desktop:aspect-w-[1664] lg-desktop:aspect-h-[640]'\n case 'half':\n return 'tablet:aspect-w-[704] tablet:aspect-h-[480] laptop:aspect-w-[440] laptop:aspect-h-[384] desktop:aspect-w-[648] desktop:aspect-h-[512] lg-desktop:aspect-w-[824] lg-desktop:aspect-h-[640]'\n case 'one-third':\n return 'tablet:aspect-w-[296] tablet:aspect-h-[400] laptop:aspect-w-[288] laptop:aspect-h-[384] desktop:aspect-w-[427] desktop:aspect-h-[512] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[640]'\n default:\n return 'tablet:aspect-w-[296] tablet:aspect-h-[400] laptop:aspect-w-[288] laptop:aspect-h-[384] desktop:aspect-w-[427] desktop:aspect-h-[512] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[640]'\n }\n } else {\n switch (configuration?.num) {\n case 1:\n return 'tablet:aspect-w-[704] tablet:aspect-h-[400] laptop:aspect-w-[896] laptop:aspect-h-[384] desktop:aspect-w-[1312] desktop:aspect-h-[512] lg-desktop:aspect-w-[1664] lg-desktop:aspect-h-[640]'\n case 2:\n return 'tablet:aspect-w-[704] tablet:aspect-h-[480] laptop:aspect-w-[440] laptop:aspect-h-[384] desktop:aspect-w-[648] desktop:aspect-h-[512] lg-desktop:aspect-w-[824] lg-desktop:aspect-h-[640]'\n case 3:\n return 'tablet:aspect-w-[296] tablet:aspect-h-[400] laptop:aspect-w-[288] laptop:aspect-h-[384] desktop:aspect-w-[427] desktop:aspect-h-[512] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[640]'\n default:\n return 'tablet:aspect-w-[296] tablet:aspect-h-[400] laptop:aspect-w-[288] laptop:aspect-h-[384] desktop:aspect-w-[427] desktop:aspect-h-[512] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[640]'\n }\n }\n }\n\n useExposure(ref, {\n componentType: componentType,\n componentName: componentName,\n position: jIndex,\n componentTitle: item.title,\n componentDescription: item.description,\n navigation: configuration?.activeTab,\n })\n\n useEffect(() => {\n setIsMobile(mediaQuery)\n }, [mediaQuery])\n\n const {\n theme = 'light',\n title,\n description,\n imageUrl,\n primaryButton,\n secondaryButton,\n imageMobileUrl,\n blockLink,\n video,\n youtubeId,\n isYouTube,\n id,\n } = item\n const lgButtonSize = 'lg-desktop:px-7 lg-desktop:pb-[14px] lg-desktop:pt-[15px] lg-desktop:text-[16px]'\n\n return (\n <div\n className={cn(\n 'item-wrapper cursor-pointer',\n 'text-info-primary group relative box-border w-full overflow-hidden',\n handleAspect(),\n {\n 'rounded-2xl': configuration?.shape === 'rounded',\n 'aiui-dark': theme === 'dark',\n 'h-[400px]': isMobile,\n },\n `text-info-primary`\n )}\n ref={ref}\n >\n {(blockLink || secondaryButton.link) && (\n <a\n className=\"absolute inset-0 z-10\"\n href={trackUrlRef(\n getLocalizedPath(blockLink || secondaryButton.link || '', configuration?.locale || 'us'),\n `${componentType}_${componentName}`\n )}\n data-headless-type-name={`${componentType}#${componentName}`}\n data-headless-title-desc-button={`${title}#${description}`}\n data-headless-nav-position={`${configuration?.activeTab}#${jIndex}`}\n aria-hidden=\"true\"\n tabIndex={-1}\n />\n )}\n <div className=\"absolute inset-0\">\n {isVideo(imageUrl?.mimeType) ? (\n <video autoPlay muted playsInline loop className=\"tablet:block hidden size-full overflow-hidden object-cover\">\n <source src={imageUrl?.url} type=\"video/mp4\" />\n </video>\n ) : (\n <Picture\n source={imageUrl?.url}\n alt={imageUrl?.alt || ''}\n className=\"tablet:block hidden h-full overflow-hidden\"\n imgClassName=\"h-full transition-all duration-300 group-hover:scale-105 object-cover\"\n style={{ aspectRatio: `${imageUrl?.width}/${imageUrl?.height}` }}\n />\n )}\n {isVideo(imageMobileUrl?.mimeType) ? (\n <video autoPlay muted playsInline loop className=\"tablet:hidden block size-full overflow-hidden object-cover\">\n <source src={imageMobileUrl?.url} type=\"video/mp4\" />\n </video>\n ) : (\n <Picture\n source={imageMobileUrl?.url || imageUrl?.url}\n alt={imageMobileUrl?.alt || imageUrl?.alt || ''}\n className=\"tablet:hidden block h-full overflow-hidden\"\n imgClassName=\"h-full transition-all duration-300 object-cover\"\n />\n )}\n <div\n className={cn(\n 'absolutestyle laptop:p-6 desktop:p-[32px] laptop:gap-4 desktop:gap-6 absolute inset-x-0 bottom-0 z-20 flex w-fit flex-col gap-6 p-4',\n {\n 'fullstyle laptop:top-1/2 laptop:-translate-y-1/2 laptop:bottom-auto': item?.width === 'full',\n }\n )}\n >\n <div className=\"flex flex-col gap-1\">\n <Heading size={3} as=\"h3\" className=\"item-title\" html={title} />\n <Heading\n as=\"h4\"\n className=\"item-description desktop:text-[16px] lg-desktop:text-[18px] line-clamp-1 text-[14px]\"\n html={description}\n />\n </div>\n <div className=\"lg-desktop:gap-3 flex gap-2\">\n {secondaryButton && secondaryButton.text && (\n <Button\n aria-label={title ?? description}\n className={cn(lgButtonSize, 'link-left')}\n variant=\"secondary\"\n as=\"a\"\n data-track={`${id}-link-left`}\n onClick={() => {\n onSecondaryButtonClick?.(item)\n }}\n href={trackUrlRef(\n getLocalizedPath(secondaryButton.link || '', configuration?.locale || 'us'),\n `${componentType}_${componentName}`\n )}\n data-headless-type-name={`${componentType}#${componentName}`}\n data-headless-title-desc-button={`${title}#${description}#${secondaryButton.text}`}\n data-headless-nav-position={`${configuration?.activeTab}#${jIndex}`}\n >\n {secondaryButton.text}\n <span className=\"sr-only\">{title ?? description}</span>\n </Button>\n )}\n {primaryButton && primaryButton.text && (\n <Button\n aria-label={title ?? description}\n className={cn(lgButtonSize, 'link-right')}\n variant=\"primary\"\n data-track={`${id}-link-right`}\n as=\"a\"\n onClick={() => {\n onPrimaryButtonClick?.(item)\n }}\n href={trackUrlRef(\n getLocalizedPath(primaryButton.link || '', configuration?.locale || 'us'),\n `${componentType}_${componentName}`\n )}\n data-headless-type-name={`${componentType}#${componentName}`}\n data-headless-title-desc-button={`${title}#${description}#${primaryButton.text}`}\n data-headless-nav-position={`${configuration?.activeTab}#${jIndex}`}\n >\n {primaryButton.text}\n </Button>\n )}\n </div>\n </div>\n </div>\n <div>\n <div className=\"laptop:bottom-6 laptop:right-6 absolute bottom-4 right-4 z-20\">\n {(video?.url || youtubeId) && (\n <button\n onClick={() => {\n configuration?.onVideoPlayBtnClick?.(video?.url || youtubeId, isYouTube)\n }}\n className=\"laptop:size-12 flex size-8 items-center justify-center rounded-full bg-white bg-opacity-20 hover:bg-black/75\"\n >\n <svg width=\"12\" height=\"14\" viewBox=\"0 0 12 14\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M12 7L0 14L0 0L12 7Z\" fill=\"white\" />\n </svg>\n </button>\n )}\n </div>\n </div>\n </div>\n )\n}\n\nconst MultiLayoutGraphicBlock = React.forwardRef<HTMLDivElement, MultiLayoutGraphicBlockProps>((props, ref) => {\n const { data, className, onSecondaryButtonClick, onPrimaryButtonClick, ...rest } = props\n const { shape, sectionTitle, groupByTab = false, items = [], carousel } = data\n const [visible, setVisible] = useState<boolean>(false)\n const [videoUrl, setVideoUrl] = useState<string>('')\n const [youTubeId, setYouTubeId] = useState<string>('')\n const { locale = 'us' } = useAiuiContext()\n\n const getSpan = (width: 'full' | 'half' | 'one-third') => {\n switch (width) {\n case 'full':\n return 12\n case 'half':\n return 6\n case 'one-third':\n return 4\n }\n }\n\n const tabNames = items\n .map(item => item.tabName)\n .filter(Boolean)\n .filter((item, index, arr) => arr.indexOf(item) === index) as string[]\n\n const handleVideoPlayBtnClick = (url: string, isYouTube: boolean) => {\n setVisible(true)\n if (isYouTube) {\n setYouTubeId?.(url || '')\n } else {\n setVideoUrl?.(url || '')\n }\n }\n const handleTabNumber = (num: Number, flag?: boolean) => {\n switch (num) {\n case 1:\n return 1\n case 2:\n return 2\n default:\n return flag ? 2.3 : 3\n }\n }\n\n const tabItemsMaps = tabNames\n .map(tabName => ({\n tabName,\n items: items.filter(item => item.tabName === tabName),\n }))\n .reduce(\n (acc, cur) => {\n acc[cur.tabName] = cur.items\n return acc\n },\n {} as Record<string, (Item & { width?: 'full' | 'half' | 'one-third' })[]>\n )\n\n return (\n <section\n data-ui-component-id=\"MultiLayoutGraphicBlock\"\n ref={ref}\n {...rest}\n className={cn('multiLayoutGraphicBlock', 'text-info-primary', className)}\n >\n {sectionTitle && <Title data={{ title: sectionTitle }} className=\"section-title\" />}\n\n {groupByTab ? (\n <Tabs shape={shape} align=\"left\" defaultValue={spaceToHyphen(tabNames[0]!)}>\n <TabsList>\n {tabNames.map((tabName, index) => (\n <TabsTrigger\n key={index}\n value={spaceToHyphen(tabName!)}\n onClick={() => {\n gaTrack({\n event: 'ga4Event',\n event_name: 'component_click',\n event_parameters: {\n page_group: 'Home Page',\n component_type: componentType,\n component_name: componentName,\n component_title: sectionTitle,\n component_position: 1,\n navigation: tabName,\n button_name: tabName,\n },\n })\n }}\n >\n {tabName}\n </TabsTrigger>\n ))}\n </TabsList>\n {tabNames.map((tabName, index) => (\n <TabsContent key={index} value={spaceToHyphen(tabName!)} className=\"desktop:mt-[36px] mt-[24px] w-full\">\n <>\n <SwiperBox\n className=\"!overflow-visible\"\n id={'MultiLayoutGraphicBlock1'}\n data={{\n list: tabItemsMaps?.[tabName] || [],\n configuration: {\n shape: shape,\n isTab: groupByTab,\n activeTab: tabName,\n title: sectionTitle,\n num: tabItemsMaps?.[tabName]?.length || 0,\n locale,\n onVideoPlayBtnClick: handleVideoPlayBtnClick,\n onSecondaryButtonClick,\n onPrimaryButtonClick,\n },\n }}\n Slide={ItemBlock}\n breakpoints={{\n 0: {\n spaceBetween: 12,\n freeMode: false,\n slidesPerView: 1,\n },\n 374: {\n spaceBetween: 12,\n freeMode: false,\n slidesPerView: 1.2,\n },\n 768: {\n spaceBetween: 16,\n freeMode: false,\n slidesPerView: handleTabNumber(tabItemsMaps?.[tabName]?.length || 0, true),\n },\n 1024: {\n spaceBetween: 16,\n freeMode: false,\n slidesPerView: handleTabNumber(tabItemsMaps?.[tabName]?.length || 0),\n },\n }}\n />\n {carousel && carousel?.items.length > 0 ? (\n <SwiperBox\n className=\"!overflow-visible\"\n id={'MultiLayoutGraphicBlock2'}\n data={{\n list: carousel?.items || [],\n configuration: {\n shape: shape,\n isTab: groupByTab,\n locale,\n onVideoPlayBtnClick: handleVideoPlayBtnClick,\n title: sectionTitle,\n onSecondaryButtonClick,\n onPrimaryButtonClick,\n },\n }}\n Slide={ItemBlock}\n breakpoints={{\n 0: {\n spaceBetween: 12,\n freeMode: false,\n slidesPerView: 1,\n },\n 374: {\n spaceBetween: 12,\n freeMode: false,\n slidesPerView: 1.2,\n },\n 768: {\n spaceBetween: 16,\n freeMode: false,\n slidesPerView: 2.3,\n },\n 1024: {\n spaceBetween: 16,\n freeMode: false,\n slidesPerView: 3.1,\n },\n 1440: {\n spaceBetween: 16,\n freeMode: false,\n slidesPerView: 4,\n },\n }}\n />\n ) : null}\n </>\n </TabsContent>\n ))}\n </Tabs>\n ) : (\n <>\n <Grid className=\"w-full\">\n {items.map((item, index) => {\n return (\n <GridItem\n key={`${item?.title || ''}${index}`}\n span={getSpan(item.width ?? 'full')}\n className=\"laptop:block hidden\"\n >\n <ItemBlock\n data={item}\n configuration={{\n shape: shape,\n locale,\n onVideoPlayBtnClick: handleVideoPlayBtnClick,\n title: sectionTitle,\n }}\n jIndex={index}\n spanType={item.width}\n onSecondaryButtonClick={onSecondaryButtonClick}\n onPrimaryButtonClick={onPrimaryButtonClick}\n />\n </GridItem>\n )\n })}\n {items.map((item, index) => (\n <GridItem key={`${item?.title || ''}${index}`} span={getSpan('full')} className=\"laptop:hidden block\">\n <ItemBlock\n data={item}\n configuration={{\n shape: shape,\n locale,\n onVideoPlayBtnClick: handleVideoPlayBtnClick,\n title: sectionTitle,\n }}\n jIndex={index}\n spanType={'full'}\n />\n </GridItem>\n ))}\n </Grid>\n {carousel && carousel?.items.length > 0 ? (\n <SwiperBox\n className=\"!overflow-visible\"\n id={'MultiLayoutGraphicBlock3'}\n data={{\n list: carousel?.items || [],\n configuration: {\n shape: shape,\n locale,\n onVideoPlayBtnClick: handleVideoPlayBtnClick,\n title: sectionTitle,\n onSecondaryButtonClick,\n onPrimaryButtonClick,\n },\n }}\n Slide={ItemBlock}\n breakpoints={{\n 0: {\n spaceBetween: 12,\n freeMode: false,\n slidesPerView: 1,\n },\n 374: {\n spaceBetween: 12,\n freeMode: false,\n slidesPerView: 1.2,\n },\n 768: {\n spaceBetween: 16,\n freeMode: false,\n slidesPerView: 2.3,\n },\n 1024: {\n spaceBetween: 16,\n freeMode: false,\n slidesPerView: 3.1,\n },\n 1440: {\n spaceBetween: 16,\n freeMode: false,\n slidesPerView: 4,\n },\n }}\n />\n ) : null}\n </>\n )}\n {visible && (\n <VideoModal\n visible={visible}\n youTubeId={youTubeId}\n videoUrl={videoUrl}\n onCloseModal={() => setVisible(false)}\n />\n )}\n </section>\n )\n})\n\nMultiLayoutGraphicBlock.displayName = 'MultiLayoutGraphicBlock'\n\nexport default withLayout(MultiLayoutGraphicBlock)\nexport type { MultiLayoutGraphicBlockProps }\n"],
|
|
5
|
-
"mappings": "kkBAAA,IAAAA,GAAA,GAAAC,GAAAD,GAAA,aAAAE,KAAA,eAAAC,GAAAH,IAmHQ,IAAAI,EAAA,6BAnHRC,EAAmD,oBACnDC,EAA8B,4BAE9BC,EAA2B,kCAC3BC,EAAoB,0CACpBC,EAAmB,yCACnBC,EAAwB,uCACxBC,EAA2B,kCAC3BC,EAA+B,oCAC/BC,EAAkB,gCAClBC,EAAoD,kCACpDC,EAAsB,oCACtBC,EAAwB,oCACxBC,EAAyD,oCACzDC,EAA4B,sCAC5BC,EAA4B,uCAC5BC,EAA+B,oCAC/BC,EAAwB,iCAExB,MAAMC,EAAgB,QAChB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B,GAAGD,CAAa,IAAIC,CAAa,GAC1D,kCAAiC,GAAGe,CAAK,IAAIC,CAAW,GACxD,6BAA4B,GAAGb,GAAe,SAAS,IAAIC,CAAM,GACjE,cAAY,OACZ,SAAU,GACZ,KAEF,QAAC,OAAI,UAAU,mBACZ,wBAAQa,GAAU,QAAQ,KACzB,OAAC,SAAM,SAAQ,GAAC,MAAK,GAAC,YAAW,GAAC,KAAI,GAAC,UAAU,6DAC/C,mBAAC,UAAO,IAAKA,GAAU,IAAK,KAAK,YAAY,EAC/C,KAEA,OAAC,EAAAU,QAAA,CACC,OAAQV,GAAU,IAClB,IAAKA,GAAU,KAAO,GACtB,UAAU,6CACV,aAAa,wEACb,MAAO,CAAE,YAAa,GAAGA,GAAU,KAAK,IAAIA,GAAU,MAAM,EAAG,EACjE,KAED,WAAQG,GAAgB,QAAQ,KAC/B,OAAC,SAAM,SAAQ,GAAC,MAAK,GAAC,YAAW,GAAC,KAAI,GAAC,UAAU,6DAC/C,mBAAC,UAAO,IAAKA,GAAgB,IAAK,KAAK,YAAY,EACrD,KAEA,OAAC,EAAAO,QAAA,CACC,OAAQP,GAAgB,KAAOH,GAAU,IACzC,IAAKG,GAAgB,KAAOH,GAAU,KAAO,GAC7C,UAAU,6CACV,aAAa,kDACf,
|
|
4
|
+
"sourcesContent": ["import React, { useState, useEffect, useRef } from 'react'\nimport { useMediaQuery } from 'react-responsive'\nimport type { MultiLayoutGraphicBlockProps, Item } from './types'\nimport { withLayout } from '../../shared/Styles.js'\nimport Picture from '../../components/picture.js'\nimport Button from '../../components/button.js'\nimport { Heading } from '../../components/heading.js'\nimport { VideoModal } from '../VideoModal/index.js'\nimport { Grid, GridItem } from '../../components/grid.js'\nimport Title from '../Title/index.js'\nimport { cn, spaceToHyphen, getLocalizedPath } from '../../helpers/utils.js'\nimport SwiperBox from '../SwiperBox/index.js'\nimport { isVideo } from '../../shared/mimeType.js'\nimport { Tabs, TabsList, TabsTrigger, TabsContent } from '../../components/tabs.js'\nimport { useExposure } from '../../hooks/useExposure.js'\nimport { trackUrlRef } from '../../shared/trackUrlRef.js'\nimport { useAiuiContext } from '../AiuiProvider/index.js'\nimport { gaTrack } from '../../shared/track.js'\n\nconst componentType = 'image'\nconst componentName = 'p1_banner'\n\nconst ItemBlock = ({\n data: item,\n configuration,\n jIndex,\n spanType,\n title: titleProp,\n onSecondaryButtonClick,\n onPrimaryButtonClick,\n}: {\n data: Item\n configuration?: any\n jIndex?: number\n spanType?: string\n title?: string\n onSecondaryButtonClick?: (data: Item) => void\n onPrimaryButtonClick?: (data: Item) => void\n}) => {\n const [isMobile, setIsMobile] = useState<boolean>(false)\n const mediaQuery = useMediaQuery({ query: '(max-width: 768px)' })\n\n const ref = useRef<HTMLDivElement>(null)\n\n const handleAspect = () => {\n if (spanType) {\n switch (spanType) {\n case 'full':\n return 'tablet:aspect-w-[704] tablet:aspect-h-[400] laptop:aspect-w-[896] laptop:aspect-h-[384] desktop:aspect-w-[1312] desktop:aspect-h-[512] lg-desktop:aspect-w-[1664] lg-desktop:aspect-h-[640]'\n case 'half':\n return 'tablet:aspect-w-[704] tablet:aspect-h-[480] laptop:aspect-w-[440] laptop:aspect-h-[384] desktop:aspect-w-[648] desktop:aspect-h-[512] lg-desktop:aspect-w-[824] lg-desktop:aspect-h-[640]'\n case 'one-third':\n return 'tablet:aspect-w-[296] tablet:aspect-h-[400] laptop:aspect-w-[288] laptop:aspect-h-[384] desktop:aspect-w-[427] desktop:aspect-h-[512] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[640]'\n default:\n return 'tablet:aspect-w-[296] tablet:aspect-h-[400] laptop:aspect-w-[288] laptop:aspect-h-[384] desktop:aspect-w-[427] desktop:aspect-h-[512] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[640]'\n }\n } else {\n switch (configuration?.num) {\n case 1:\n return 'tablet:aspect-w-[704] tablet:aspect-h-[400] laptop:aspect-w-[896] laptop:aspect-h-[384] desktop:aspect-w-[1312] desktop:aspect-h-[512] lg-desktop:aspect-w-[1664] lg-desktop:aspect-h-[640]'\n case 2:\n return 'tablet:aspect-w-[704] tablet:aspect-h-[480] laptop:aspect-w-[440] laptop:aspect-h-[384] desktop:aspect-w-[648] desktop:aspect-h-[512] lg-desktop:aspect-w-[824] lg-desktop:aspect-h-[640]'\n case 3:\n return 'tablet:aspect-w-[296] tablet:aspect-h-[400] laptop:aspect-w-[288] laptop:aspect-h-[384] desktop:aspect-w-[427] desktop:aspect-h-[512] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[640]'\n default:\n return 'tablet:aspect-w-[296] tablet:aspect-h-[400] laptop:aspect-w-[288] laptop:aspect-h-[384] desktop:aspect-w-[427] desktop:aspect-h-[512] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[640]'\n }\n }\n }\n\n useExposure(ref, {\n componentType: componentType,\n componentName: componentName,\n position: jIndex,\n componentTitle: item.title,\n componentDescription: item.description,\n navigation: configuration?.activeTab,\n })\n\n useEffect(() => {\n setIsMobile(mediaQuery)\n }, [mediaQuery])\n\n const {\n theme = 'light',\n title,\n description,\n imageUrl,\n primaryButton,\n secondaryButton,\n imageMobileUrl,\n blockLink,\n video,\n youtubeId,\n isYouTube,\n id,\n } = item\n const lgButtonSize = 'lg-desktop:px-7 lg-desktop:pb-[14px] lg-desktop:pt-[15px] lg-desktop:text-[16px]'\n\n return (\n <div\n className={cn(\n 'item-wrapper cursor-pointer',\n 'text-info-primary group relative box-border w-full overflow-hidden',\n handleAspect(),\n {\n 'rounded-2xl': configuration?.shape === 'rounded',\n 'aiui-dark': theme === 'dark',\n 'h-[400px]': isMobile,\n },\n `text-info-primary`\n )}\n ref={ref}\n >\n {(blockLink || secondaryButton.link) && (\n <a\n className=\"absolute inset-0 z-10\"\n href={trackUrlRef(\n getLocalizedPath(blockLink || secondaryButton.link || '', configuration?.locale || 'us'),\n `${componentType}_${componentName}`\n )}\n data-headless-type-name={`${componentType}#${componentName}`}\n data-headless-title-desc-button={`${title}#${description}`}\n data-headless-nav-position={`${configuration?.activeTab}#${jIndex}`}\n aria-hidden=\"true\"\n tabIndex={-1}\n />\n )}\n <div className=\"absolute inset-0\">\n {isVideo(imageUrl?.mimeType) ? (\n <video autoPlay muted playsInline loop className=\"tablet:block hidden size-full overflow-hidden object-cover\">\n <source src={imageUrl?.url} type=\"video/mp4\" />\n </video>\n ) : (\n <Picture\n source={imageUrl?.url}\n alt={imageUrl?.alt || ''}\n className=\"tablet:block hidden h-full overflow-hidden\"\n imgClassName=\"h-full transition-all duration-300 group-hover:scale-105 object-cover\"\n style={{ aspectRatio: `${imageUrl?.width}/${imageUrl?.height}` }}\n />\n )}\n {isVideo(imageMobileUrl?.mimeType) ? (\n <video autoPlay muted playsInline loop className=\"tablet:hidden block size-full overflow-hidden object-cover\">\n <source src={imageMobileUrl?.url} type=\"video/mp4\" />\n </video>\n ) : (\n <Picture\n source={imageMobileUrl?.url || imageUrl?.url}\n alt={imageMobileUrl?.alt || imageUrl?.alt || ''}\n className=\"tablet:hidden block h-full overflow-hidden\"\n imgClassName=\"h-full transition-all duration-300 object-cover\"\n />\n )}\n </div>\n {/* Title and subtitle are direct siblings of the overlay link in the card stacking context\n to ensure z-20 > z-10 is evaluated without z-auto parent ambiguity (#381) */}\n <div\n className={cn(\n 'absolutestyle laptop:p-6 desktop:p-[32px] laptop:gap-4 desktop:gap-6 absolute inset-x-0 bottom-0 z-20 flex w-fit flex-col gap-6 p-4',\n {\n 'fullstyle laptop:top-1/2 laptop:-translate-y-1/2 laptop:bottom-auto': item?.width === 'full',\n }\n )}\n >\n <div className=\"flex flex-col gap-1\">\n <Heading size={3} as=\"h3\" className=\"item-title\" html={title} />\n <Heading\n as=\"h4\"\n className=\"item-description desktop:text-[16px] lg-desktop:text-[18px] line-clamp-1 text-[14px]\"\n html={description}\n />\n </div>\n <div className=\"lg-desktop:gap-3 flex gap-2\">\n {secondaryButton && secondaryButton.text && (\n <Button\n aria-label={title ?? description}\n className={cn(lgButtonSize, 'link-left')}\n variant=\"secondary\"\n as=\"a\"\n data-track={`${id}-link-left`}\n onClick={() => {\n onSecondaryButtonClick?.(item)\n }}\n href={trackUrlRef(\n getLocalizedPath(secondaryButton.link || '', configuration?.locale || 'us'),\n `${componentType}_${componentName}`\n )}\n data-headless-type-name={`${componentType}#${componentName}`}\n data-headless-title-desc-button={`${title}#${description}#${secondaryButton.text}`}\n data-headless-nav-position={`${configuration?.activeTab}#${jIndex}`}\n >\n {secondaryButton.text}\n <span className=\"sr-only\">{title ?? description}</span>\n </Button>\n )}\n {primaryButton && primaryButton.text && (\n <Button\n aria-label={title ?? description}\n className={cn(lgButtonSize, 'link-right')}\n variant=\"primary\"\n data-track={`${id}-link-right`}\n as=\"a\"\n onClick={() => {\n onPrimaryButtonClick?.(item)\n }}\n href={trackUrlRef(\n getLocalizedPath(primaryButton.link || '', configuration?.locale || 'us'),\n `${componentType}_${componentName}`\n )}\n data-headless-type-name={`${componentType}#${componentName}`}\n data-headless-title-desc-button={`${title}#${description}#${primaryButton.text}`}\n data-headless-nav-position={`${configuration?.activeTab}#${jIndex}`}\n >\n {primaryButton.text}\n </Button>\n )}\n </div>\n </div>\n <div>\n <div className=\"laptop:bottom-6 laptop:right-6 absolute bottom-4 right-4 z-20\">\n {(video?.url || youtubeId) && (\n <button\n onClick={() => {\n configuration?.onVideoPlayBtnClick?.(video?.url || youtubeId, isYouTube)\n }}\n className=\"laptop:size-12 flex size-8 items-center justify-center rounded-full bg-white bg-opacity-20 hover:bg-black/75\"\n >\n <svg width=\"12\" height=\"14\" viewBox=\"0 0 12 14\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M12 7L0 14L0 0L12 7Z\" fill=\"white\" />\n </svg>\n </button>\n )}\n </div>\n </div>\n </div>\n )\n}\n\nconst MultiLayoutGraphicBlock = React.forwardRef<HTMLDivElement, MultiLayoutGraphicBlockProps>((props, ref) => {\n const { data, className, onSecondaryButtonClick, onPrimaryButtonClick, ...rest } = props\n const { shape, sectionTitle, groupByTab = false, items = [], carousel } = data\n const [visible, setVisible] = useState<boolean>(false)\n const [videoUrl, setVideoUrl] = useState<string>('')\n const [youTubeId, setYouTubeId] = useState<string>('')\n const { locale = 'us' } = useAiuiContext()\n\n const getSpan = (width: 'full' | 'half' | 'one-third') => {\n switch (width) {\n case 'full':\n return 12\n case 'half':\n return 6\n case 'one-third':\n return 4\n }\n }\n\n const tabNames = items\n .map(item => item.tabName)\n .filter(Boolean)\n .filter((item, index, arr) => arr.indexOf(item) === index) as string[]\n\n const handleVideoPlayBtnClick = (url: string, isYouTube: boolean) => {\n setVisible(true)\n if (isYouTube) {\n setYouTubeId?.(url || '')\n } else {\n setVideoUrl?.(url || '')\n }\n }\n const handleTabNumber = (num: Number, flag?: boolean) => {\n switch (num) {\n case 1:\n return 1\n case 2:\n return 2\n default:\n return flag ? 2.3 : 3\n }\n }\n\n const tabItemsMaps = tabNames\n .map(tabName => ({\n tabName,\n items: items.filter(item => item.tabName === tabName),\n }))\n .reduce(\n (acc, cur) => {\n acc[cur.tabName] = cur.items\n return acc\n },\n {} as Record<string, (Item & { width?: 'full' | 'half' | 'one-third' })[]>\n )\n\n return (\n <section\n data-ui-component-id=\"MultiLayoutGraphicBlock\"\n ref={ref}\n {...rest}\n className={cn('multiLayoutGraphicBlock', 'text-info-primary', className)}\n >\n {sectionTitle && <Title data={{ title: sectionTitle }} className=\"section-title\" />}\n\n {groupByTab ? (\n <Tabs shape={shape} align=\"left\" defaultValue={spaceToHyphen(tabNames[0]!)}>\n <TabsList>\n {tabNames.map((tabName, index) => (\n <TabsTrigger\n key={index}\n value={spaceToHyphen(tabName!)}\n onClick={() => {\n gaTrack({\n event: 'ga4Event',\n event_name: 'component_click',\n event_parameters: {\n page_group: 'Home Page',\n component_type: componentType,\n component_name: componentName,\n component_title: sectionTitle,\n component_position: 1,\n navigation: tabName,\n button_name: tabName,\n },\n })\n }}\n >\n {tabName}\n </TabsTrigger>\n ))}\n </TabsList>\n {tabNames.map((tabName, index) => (\n <TabsContent key={index} value={spaceToHyphen(tabName!)} className=\"desktop:mt-[36px] mt-[24px] w-full\">\n <>\n <SwiperBox\n className=\"!overflow-visible\"\n id={'MultiLayoutGraphicBlock1'}\n data={{\n list: tabItemsMaps?.[tabName] || [],\n configuration: {\n shape: shape,\n isTab: groupByTab,\n activeTab: tabName,\n title: sectionTitle,\n num: tabItemsMaps?.[tabName]?.length || 0,\n locale,\n onVideoPlayBtnClick: handleVideoPlayBtnClick,\n onSecondaryButtonClick,\n onPrimaryButtonClick,\n },\n }}\n Slide={ItemBlock}\n breakpoints={{\n 0: {\n spaceBetween: 12,\n freeMode: false,\n slidesPerView: 1,\n },\n 374: {\n spaceBetween: 12,\n freeMode: false,\n slidesPerView: 1.2,\n },\n 768: {\n spaceBetween: 16,\n freeMode: false,\n slidesPerView: handleTabNumber(tabItemsMaps?.[tabName]?.length || 0, true),\n },\n 1024: {\n spaceBetween: 16,\n freeMode: false,\n slidesPerView: handleTabNumber(tabItemsMaps?.[tabName]?.length || 0),\n },\n }}\n />\n {carousel && carousel?.items.length > 0 ? (\n <SwiperBox\n className=\"!overflow-visible\"\n id={'MultiLayoutGraphicBlock2'}\n data={{\n list: carousel?.items || [],\n configuration: {\n shape: shape,\n isTab: groupByTab,\n locale,\n onVideoPlayBtnClick: handleVideoPlayBtnClick,\n title: sectionTitle,\n onSecondaryButtonClick,\n onPrimaryButtonClick,\n },\n }}\n Slide={ItemBlock}\n breakpoints={{\n 0: {\n spaceBetween: 12,\n freeMode: false,\n slidesPerView: 1,\n },\n 374: {\n spaceBetween: 12,\n freeMode: false,\n slidesPerView: 1.2,\n },\n 768: {\n spaceBetween: 16,\n freeMode: false,\n slidesPerView: 2.3,\n },\n 1024: {\n spaceBetween: 16,\n freeMode: false,\n slidesPerView: 3.1,\n },\n 1440: {\n spaceBetween: 16,\n freeMode: false,\n slidesPerView: 4,\n },\n }}\n />\n ) : null}\n </>\n </TabsContent>\n ))}\n </Tabs>\n ) : (\n <>\n <Grid className=\"w-full\">\n {items.map((item, index) => {\n return (\n <GridItem\n key={`${item?.title || ''}${index}`}\n span={getSpan(item.width ?? 'full')}\n className=\"laptop:block hidden\"\n >\n <ItemBlock\n data={item}\n configuration={{\n shape: shape,\n locale,\n onVideoPlayBtnClick: handleVideoPlayBtnClick,\n title: sectionTitle,\n }}\n jIndex={index}\n spanType={item.width}\n onSecondaryButtonClick={onSecondaryButtonClick}\n onPrimaryButtonClick={onPrimaryButtonClick}\n />\n </GridItem>\n )\n })}\n {items.map((item, index) => (\n <GridItem key={`${item?.title || ''}${index}`} span={getSpan('full')} className=\"laptop:hidden block\">\n <ItemBlock\n data={item}\n configuration={{\n shape: shape,\n locale,\n onVideoPlayBtnClick: handleVideoPlayBtnClick,\n title: sectionTitle,\n }}\n jIndex={index}\n spanType={'full'}\n />\n </GridItem>\n ))}\n </Grid>\n {carousel && carousel?.items.length > 0 ? (\n <SwiperBox\n className=\"!overflow-visible\"\n id={'MultiLayoutGraphicBlock3'}\n data={{\n list: carousel?.items || [],\n configuration: {\n shape: shape,\n locale,\n onVideoPlayBtnClick: handleVideoPlayBtnClick,\n title: sectionTitle,\n onSecondaryButtonClick,\n onPrimaryButtonClick,\n },\n }}\n Slide={ItemBlock}\n breakpoints={{\n 0: {\n spaceBetween: 12,\n freeMode: false,\n slidesPerView: 1,\n },\n 374: {\n spaceBetween: 12,\n freeMode: false,\n slidesPerView: 1.2,\n },\n 768: {\n spaceBetween: 16,\n freeMode: false,\n slidesPerView: 2.3,\n },\n 1024: {\n spaceBetween: 16,\n freeMode: false,\n slidesPerView: 3.1,\n },\n 1440: {\n spaceBetween: 16,\n freeMode: false,\n slidesPerView: 4,\n },\n }}\n />\n ) : null}\n </>\n )}\n {visible && (\n <VideoModal\n visible={visible}\n youTubeId={youTubeId}\n videoUrl={videoUrl}\n onCloseModal={() => setVisible(false)}\n />\n )}\n </section>\n )\n})\n\nMultiLayoutGraphicBlock.displayName = 'MultiLayoutGraphicBlock'\n\nexport default withLayout(MultiL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,GAhBK,GAAGN,GAAM,OAAS,EAAE,GAAGgD,CAAK,EAiBnC,CAEH,EACAZ,EAAM,IAAI,CAACpC,EAAMgD,OAChB,OAAC,YAA8C,KAAMH,EAAQ,MAAM,EAAG,UAAU,sBAC9E,mBAAC9C,EAAA,CACC,KAAMC,EACN,cAAe,CACb,MAAOiC,EACP,OAAAW,EACA,oBAAqBM,EACrB,MAAOhB,CACT,EACA,OAAQc,EACR,SAAU,OACZ,GAXa,GAAGhD,GAAM,OAAS,EAAE,GAAGgD,CAAK,EAY3C,CACD,GACH,EACCX,GAAYA,GAAU,MAAM,OAAS,KACpC,OAAC,EAAAuB,QAAA,CACC,UAAU,oBACV,GAAI,2BACJ,KAAM,CACJ,KAAMvB,GAAU,OAAS,CAAC,EAC1B,cAAe,CACb,MAAOJ,EACP,OAAAW,EACA,oBAAqBM,EACrB,MAAOhB,EACP,uBAAA7B,EACA,qBAAAC,CACF,CACF,EACA,MAAOP,EACP,YAAa,CACX,EAAG,CACD,aAAc,GACd,SAAU,GACV,cAAe,CACjB,EACA,IAAK,CACH,aAAc,GACd,SAAU,GACV,cAAe,GACjB,EACA,IAAK,CACH,aAAc,GACd,SAAU,GACV,cAAe,GACjB,EACA,KAAM,CACJ,aAAc,GACd,SAAU,GACV,cAAe,GACjB,EACA,KAAM,CACJ,aAAc,GACd,SAAU,GACV,cAAe,CACjB,CACF,EACF,EACE,MACN,EAEDuC,MACC,OAAC,cACC,QAASA,EACT,UAAWI,EACX,SAAUF,EACV,aAAc,IAAMD,EAAW,EAAK,EACtC,GAEJ,CAEJ,CAAC,EAEDZ,EAAwB,YAAc,0BAEtC,IAAOlD,MAAQ,cAAWkD,CAAuB",
|
|
6
6
|
"names": ["MultiLayoutGraphicBlock_exports", "__export", "MultiLayoutGraphicBlock_default", "__toCommonJS", "import_jsx_runtime", "import_react", "import_react_responsive", "import_Styles", "import_picture", "import_button", "import_heading", "import_VideoModal", "import_grid", "import_Title", "import_utils", "import_SwiperBox", "import_mimeType", "import_tabs", "import_useExposure", "import_trackUrlRef", "import_AiuiProvider", "import_track", "componentType", "componentName", "ItemBlock", "item", "configuration", "jIndex", "spanType", "titleProp", "onSecondaryButtonClick", "onPrimaryButtonClick", "isMobile", "setIsMobile", "mediaQuery", "ref", "handleAspect", "theme", "title", "description", "imageUrl", "primaryButton", "secondaryButton", "imageMobileUrl", "blockLink", "video", "youtubeId", "isYouTube", "id", "lgButtonSize", "Picture", "Button", "MultiLayoutGraphicBlock", "React", "props", "data", "className", "rest", "shape", "sectionTitle", "groupByTab", "items", "carousel", "visible", "setVisible", "videoUrl", "setVideoUrl", "youTubeId", "setYouTubeId", "locale", "getSpan", "width", "tabNames", "index", "arr", "handleVideoPlayBtnClick", "url", "handleTabNumber", "num", "flag", "tabItemsMaps", "tabName", "acc", "cur", "Title", "SwiperBox"]
|
|
7
7
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { NavigationSearchProps } from './types.js';
|
|
2
2
|
export declare const canSearch: (target: any) => boolean;
|
|
3
|
-
declare const _default: import("react").ForwardRefExoticComponent<Omit<NavigationSearchProps & import("react").RefAttributes<HTMLDivElement>, "container" | keyof import("../../shared/Styles.js").StylesProps> & import("../../shared/Styles.js").StylesProps & import("
|
|
3
|
+
declare const _default: import("react").ForwardRefExoticComponent<Omit<NavigationSearchProps & import("react").RefAttributes<HTMLDivElement>, "container" | keyof import("../../shared/Styles.js").StylesProps> & import("../../shared/Styles.js").StylesProps & import("../WheelLottery/index.js").ContainerProps & import("react").RefAttributes<unknown>> & {
|
|
4
4
|
readonly $$typeof: symbol;
|
|
5
5
|
};
|
|
6
6
|
export default _default;
|
|
@@ -44,5 +44,5 @@ export interface ProductCompareProps extends React.HTMLAttributes<HTMLElement> {
|
|
|
44
44
|
theme?: Theme;
|
|
45
45
|
};
|
|
46
46
|
}
|
|
47
|
-
declare const _default: import("react").ForwardRefExoticComponent<Omit<ProductCompareProps, "container" | keyof import("../../shared/Styles.js").StylesProps> & import("../../shared/Styles.js").StylesProps & import("
|
|
47
|
+
declare const _default: import("react").ForwardRefExoticComponent<Omit<ProductCompareProps, "container" | keyof import("../../shared/Styles.js").StylesProps> & import("../../shared/Styles.js").StylesProps & import("../WheelLottery/index.js").ContainerProps & import("react").RefAttributes<unknown>> & {};
|
|
48
48
|
export default _default;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { ProductHeroProps } from './types.js';
|
|
3
|
-
declare const _default: React.ForwardRefExoticComponent<Omit<ProductHeroProps & React.RefAttributes<HTMLDivElement>, "container" | keyof import("../../shared/Styles.js").StylesProps> & import("../../shared/Styles.js").StylesProps & import("
|
|
3
|
+
declare const _default: React.ForwardRefExoticComponent<Omit<ProductHeroProps & React.RefAttributes<HTMLDivElement>, "container" | keyof import("../../shared/Styles.js").StylesProps> & import("../../shared/Styles.js").StylesProps & import("../WheelLottery/index.js").ContainerProps & React.RefAttributes<unknown>> & {
|
|
4
4
|
readonly $$typeof: symbol;
|
|
5
5
|
};
|
|
6
6
|
export default _default;
|