@anker-in/headless-ui 1.1.28-alpha.1768202456200 → 1.1.29
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 +3 -3
- package/dist/cjs/biz-components/AiuiProvider/index.d.ts +0 -7
- package/dist/cjs/biz-components/AiuiProvider/index.js +1 -1
- package/dist/cjs/biz-components/AiuiProvider/index.js.map +2 -2
- package/dist/cjs/biz-components/AplusDesc/index.d.ts +3 -3
- package/dist/cjs/biz-components/BrandEquity/BrandEquity.d.ts +3 -3
- package/dist/cjs/biz-components/BrandEquity/BrandEquity.js +1 -1
- package/dist/cjs/biz-components/BrandEquity/BrandEquity.js.map +2 -2
- package/dist/cjs/biz-components/BrandEquity/types.d.ts +0 -1
- 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 +3 -3
- package/dist/cjs/biz-components/CreativeModule/index.d.ts +3 -3
- package/dist/cjs/biz-components/DownLoad/index.d.ts +3 -3
- package/dist/cjs/biz-components/Evaluate/index.d.ts +3 -3
- package/dist/cjs/biz-components/Evaluate/index.js +1 -1
- package/dist/cjs/biz-components/Evaluate/index.js.map +2 -2
- package/dist/cjs/biz-components/Faq/Faq.d.ts +3 -3
- package/dist/cjs/biz-components/FeatureCards/FeatureCards.d.ts +3 -3
- package/dist/cjs/biz-components/FeatureShowcase/FeatureShowcase.d.ts +3 -3
- package/dist/cjs/biz-components/Features/index.d.ts +3 -3
- package/dist/cjs/biz-components/FootCharger/index.d.ts +3 -3
- package/dist/cjs/biz-components/FooterNavigation/index.d.ts +3 -3
- package/dist/cjs/biz-components/GiftBox/index.d.ts +3 -3
- package/dist/cjs/biz-components/Graphic/index.d.ts +3 -3
- package/dist/cjs/biz-components/GraphicAttractionBlock/index.d.ts +3 -3
- package/dist/cjs/biz-components/GraphicMore/index.d.ts +3 -3
- package/dist/cjs/biz-components/GraphicOverlay/GraphicOverlay.d.ts +3 -3
- package/dist/cjs/biz-components/HeaderNavigation/index.d.ts +3 -3
- package/dist/cjs/biz-components/HeroBanner/Countdown.js +1 -1
- package/dist/cjs/biz-components/HeroBanner/Countdown.js.map +2 -2
- package/dist/cjs/biz-components/HeroBanner/HeroBanner.d.ts +3 -6
- 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/types.d.ts +0 -4
- 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/ImageTextFeature/ImageTextFeature.d.ts +3 -3
- package/dist/cjs/biz-components/ImageTextFeature/ImageTextFeature.js +1 -1
- package/dist/cjs/biz-components/ImageTextFeature/ImageTextFeature.js.map +3 -3
- package/dist/cjs/biz-components/ImageTextFeature/types.d.ts +0 -1
- package/dist/cjs/biz-components/ImageTextFeature/types.js +1 -1
- package/dist/cjs/biz-components/ImageTextFeature/types.js.map +1 -1
- package/dist/cjs/biz-components/ImageWithText/ImageWithText.d.ts +3 -3
- package/dist/cjs/biz-components/Ksp/index.d.ts +3 -3
- package/dist/cjs/biz-components/Listing/components/PaidShipping/index.d.ts +4 -4
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/BenefitsTab.d.ts +3 -3
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/ProductBundle/index.d.ts +3 -3
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/ProductExchangePurchase/index.d.ts +3 -3
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/ProductFreeGift/index.d.ts +3 -3
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/ProductHighlight/index.d.ts +3 -3
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/ProductOptions/index.d.ts +3 -3
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductGallery/index.d.ts +3 -3
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductSummary/index.d.ts +3 -3
- package/dist/cjs/biz-components/Listing/components/PurchaseBar/index.d.ts +3 -3
- package/dist/cjs/biz-components/Marquee/Marquee.d.ts +3 -3
- 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 +3 -3
- package/dist/cjs/biz-components/MediaPlayerBase/index.d.ts +3 -3
- package/dist/cjs/biz-components/MediaPlayerMulti/index.d.ts +3 -3
- package/dist/cjs/biz-components/MediaPlayerSticky/index.d.ts +4 -4
- package/dist/cjs/biz-components/MediaPlayerSticky/types.d.ts +0 -1
- package/dist/cjs/biz-components/MediaPlayerSticky/types.js +1 -1
- package/dist/cjs/biz-components/MediaPlayerSticky/types.js.map +1 -1
- package/dist/cjs/biz-components/MediaSceneSwitcher/MediaSceneSwitcher.d.ts +3 -3
- package/dist/cjs/biz-components/MemberEquity/index.d.ts +3 -3
- package/dist/cjs/biz-components/MultiLayoutGraphicBlock/MultiLayoutGraphicBlock.d.ts +3 -3
- package/dist/cjs/biz-components/ProductCompare/index.d.ts +3 -3
- package/dist/cjs/biz-components/ProductHero/ProductHero.d.ts +3 -3
- package/dist/cjs/biz-components/ProductNav/ProductNav.d.ts +3 -3
- package/dist/cjs/biz-components/SelectStore/index.d.ts +3 -3
- package/dist/cjs/biz-components/ShelfDisplay/index.d.ts +3 -3
- package/dist/cjs/biz-components/ShelfDisplay/shelfDisplay.d.ts +11 -0
- package/dist/cjs/biz-components/ShelfDisplay/shelfDisplay.js +1 -1
- package/dist/cjs/biz-components/ShelfDisplay/shelfDisplay.js.map +3 -3
- package/dist/cjs/biz-components/ShelfDisplay/shelfDisplayItem.js +4 -4
- package/dist/cjs/biz-components/ShelfDisplay/shelfDisplayItem.js.map +3 -3
- package/dist/cjs/biz-components/Slogan/index.d.ts +3 -3
- package/dist/cjs/biz-components/Spacer/index.d.ts +3 -3
- package/dist/cjs/biz-components/Specs/index.d.ts +3 -3
- package/dist/cjs/biz-components/SpecsComparison/SpecsComparison.d.ts +3 -3
- package/dist/cjs/biz-components/TabWithImage/TabWithImage.d.ts +3 -3
- package/dist/cjs/biz-components/Tabs/Tabs.d.ts +3 -3
- package/dist/cjs/biz-components/Tabs/Tabs.js +1 -1
- package/dist/cjs/biz-components/Tabs/Tabs.js.map +3 -3
- package/dist/cjs/biz-components/Tabs/types.d.ts +0 -9
- package/dist/cjs/biz-components/Tabs/types.js +1 -1
- package/dist/cjs/biz-components/Tabs/types.js.map +1 -1
- package/dist/cjs/biz-components/TabsGroup/index.d.ts +3 -3
- package/dist/cjs/biz-components/TabsWithMedia/TabsWithMedia.d.ts +3 -3
- package/dist/cjs/biz-components/ThreeDCarousel/ThreeDCarousel.d.ts +3 -3
- package/dist/cjs/biz-components/Title/index.d.ts +3 -3
- package/dist/cjs/biz-components/Title/index.js +1 -1
- package/dist/cjs/biz-components/Title/index.js.map +3 -3
- package/dist/cjs/biz-components/Title/types.d.ts +0 -55
- 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 +3 -3
- package/dist/cjs/biz-components/WhyChoose/WhyChoose.d.ts +3 -3
- package/dist/cjs/biz-components/index.d.ts +0 -32
- package/dist/cjs/biz-components/index.js +1 -1
- package/dist/cjs/biz-components/index.js.map +3 -3
- package/dist/cjs/components/badge.d.ts +2 -5
- package/dist/cjs/components/badge.js +1 -1
- package/dist/cjs/components/badge.js.map +3 -3
- package/dist/cjs/components/index.d.ts +0 -2
- package/dist/cjs/components/index.js +1 -1
- package/dist/cjs/components/index.js.map +3 -3
- package/dist/cjs/components/tabs.d.ts +1 -2
- package/dist/cjs/components/tabs.js +1 -1
- package/dist/cjs/components/tabs.js.map +2 -2
- package/dist/cjs/helpers/index.d.ts +0 -1
- package/dist/cjs/helpers/index.js +1 -1
- package/dist/cjs/helpers/index.js.map +3 -3
- package/dist/cjs/shared/Styles.d.ts +4 -5
- package/dist/cjs/shared/Styles.js +1 -1
- package/dist/cjs/shared/Styles.js.map +3 -3
- package/dist/cjs/stories/HeroBanner.stories.d.ts +28 -0
- package/dist/cjs/stories/HeroBanner.stories.js +11 -0
- package/dist/cjs/stories/HeroBanner.stories.js.map +7 -0
- package/dist/cjs/stories/InlineVideo.stories.d.ts +37 -0
- package/dist/cjs/stories/InlineVideo.stories.js +164 -0
- package/dist/cjs/stories/InlineVideo.stories.js.map +7 -0
- package/dist/cjs/stories/MarqueeReview.stories.d.ts +72 -0
- package/dist/cjs/stories/MarqueeReview.stories.js +19 -0
- package/dist/cjs/stories/MarqueeReview.stories.js.map +7 -0
- package/dist/cjs/stories/MediaSceneSwitcher.stories.d.ts +47 -0
- package/dist/cjs/stories/MediaSceneSwitcher.stories.js +2 -0
- package/dist/cjs/stories/MediaSceneSwitcher.stories.js.map +7 -0
- package/dist/cjs/stories/MemberEquity.stories.d.ts +9 -0
- package/dist/cjs/stories/MemberEquity.stories.js +31 -0
- package/dist/cjs/stories/MemberEquity.stories.js.map +7 -0
- package/dist/cjs/stories/MultiLayoutGraphicBlock.stories.d.ts +9 -0
- package/dist/cjs/stories/MultiLayoutGraphicBlock.stories.js +2 -0
- package/dist/cjs/stories/MultiLayoutGraphicBlock.stories.js.map +7 -0
- package/dist/cjs/stories/ProductNav.stories.d.ts +55 -0
- package/dist/cjs/stories/ProductNav.stories.js +2 -0
- package/dist/cjs/stories/ProductNav.stories.js.map +7 -0
- package/dist/cjs/stories/ThreeDCarousel.stories.d.ts +27 -0
- package/dist/cjs/stories/ThreeDCarousel.stories.js +118 -0
- package/dist/cjs/stories/ThreeDCarousel.stories.js.map +7 -0
- package/dist/cjs/stories/accordionCards.stories.d.ts +38 -0
- package/dist/cjs/stories/accordionCards.stories.js +2 -0
- package/dist/cjs/stories/accordionCards.stories.js.map +7 -0
- package/dist/cjs/stories/alert.stories.d.ts +27 -0
- package/dist/cjs/stories/alert.stories.js +2 -0
- package/dist/cjs/stories/alert.stories.js.map +7 -0
- package/dist/cjs/stories/avatar.stories.d.ts +39 -0
- package/dist/cjs/stories/avatar.stories.js +2 -0
- package/dist/cjs/stories/avatar.stories.js.map +7 -0
- package/dist/cjs/stories/badge.stories.d.ts +31 -0
- package/dist/cjs/stories/badge.stories.js +2 -0
- package/dist/cjs/stories/badge.stories.js.map +7 -0
- package/dist/cjs/stories/bizTabs.stories.d.ts +7 -0
- package/dist/cjs/stories/bizTabs.stories.js +2 -0
- package/dist/cjs/stories/bizTabs.stories.js.map +7 -0
- package/dist/cjs/stories/board.stories.d.ts +6 -0
- package/dist/cjs/stories/board.stories.js +2 -0
- package/dist/cjs/stories/board.stories.js.map +7 -0
- package/dist/cjs/stories/brandEquity.stories.d.ts +16 -0
- package/dist/cjs/stories/brandEquity.stories.js +2 -0
- package/dist/cjs/stories/brandEquity.stories.js.map +7 -0
- package/dist/cjs/stories/brandStrip.stories.d.ts +12 -0
- package/dist/cjs/stories/brandStrip.stories.js +2 -0
- package/dist/cjs/stories/brandStrip.stories.js.map +7 -0
- package/dist/cjs/stories/button.stories.d.ts +56 -0
- package/dist/cjs/stories/button.stories.js +2 -0
- package/dist/cjs/stories/button.stories.js.map +7 -0
- package/dist/cjs/stories/card.stories.d.ts +27 -0
- package/dist/cjs/stories/card.stories.js +2 -0
- package/dist/cjs/stories/card.stories.js.map +7 -0
- package/dist/cjs/stories/carousel.stories.d.ts +8 -0
- package/dist/cjs/stories/carousel.stories.js +2 -0
- package/dist/cjs/stories/carousel.stories.js.map +7 -0
- package/dist/cjs/stories/category.stories.d.ts +17 -0
- package/dist/cjs/stories/category.stories.js +2 -0
- package/dist/cjs/stories/category.stories.js.map +7 -0
- package/dist/cjs/stories/checkbox.stories.d.ts +46 -0
- package/dist/cjs/stories/checkbox.stories.js +2 -0
- package/dist/cjs/stories/checkbox.stories.js.map +7 -0
- package/dist/cjs/stories/container.stories.d.ts +28 -0
- package/dist/cjs/stories/container.stories.js +15 -0
- package/dist/cjs/stories/container.stories.js.map +7 -0
- package/dist/cjs/stories/cpnBanner.stories.d.ts +14 -0
- package/dist/cjs/stories/cpnBanner.stories.js +2 -0
- package/dist/cjs/stories/cpnBanner.stories.js.map +7 -0
- package/dist/cjs/stories/cpnCountdown.stories.d.ts +12 -0
- package/dist/cjs/stories/cpnCountdown.stories.js +2 -0
- package/dist/cjs/stories/cpnCountdown.stories.js.map +7 -0
- package/dist/cjs/stories/cpnNavigation.stories.d.ts +14 -0
- package/dist/cjs/stories/cpnNavigation.stories.js +2 -0
- package/dist/cjs/stories/cpnNavigation.stories.js.map +7 -0
- package/dist/cjs/stories/cpnProductcard.stories.d.ts +14 -0
- package/dist/cjs/stories/cpnProductcard.stories.js +2 -0
- package/dist/cjs/stories/cpnProductcard.stories.js.map +7 -0
- package/dist/cjs/stories/cpnTitle.stories.d.ts +14 -0
- package/dist/cjs/stories/cpnTitle.stories.js +2 -0
- package/dist/cjs/stories/cpnTitle.stories.js.map +7 -0
- package/dist/cjs/stories/creativeModule.stories.d.ts +19 -0
- package/dist/cjs/stories/creativeModule.stories.js +2 -0
- package/dist/cjs/stories/creativeModule.stories.js.map +7 -0
- package/dist/cjs/stories/dialog.stories.d.ts +20 -0
- package/dist/cjs/stories/dialog.stories.js +2 -0
- package/dist/cjs/stories/dialog.stories.js.map +7 -0
- package/dist/cjs/stories/drawer.stories.d.ts +20 -0
- package/dist/cjs/stories/drawer.stories.js +2 -0
- package/dist/cjs/stories/drawer.stories.js.map +7 -0
- package/dist/cjs/stories/drop-down.stories.d.ts +16 -0
- package/dist/cjs/stories/drop-down.stories.js +2 -0
- package/dist/cjs/stories/drop-down.stories.js.map +7 -0
- package/dist/cjs/stories/evaluate.stories.d.ts +16 -0
- package/dist/cjs/stories/evaluate.stories.js +2 -0
- package/dist/cjs/stories/evaluate.stories.js.map +7 -0
- package/dist/cjs/stories/faq.stories.d.ts +21 -0
- package/dist/cjs/stories/faq.stories.js +2 -0
- package/dist/cjs/stories/faq.stories.js.map +7 -0
- package/dist/cjs/stories/featureCards.stories.d.ts +30 -0
- package/dist/cjs/stories/featureCards.stories.js +61 -0
- package/dist/cjs/stories/featureCards.stories.js.map +7 -0
- package/dist/cjs/stories/featureShowcase.stories.d.ts +29 -0
- package/dist/cjs/stories/featureShowcase.stories.js +44 -0
- package/dist/cjs/stories/featureShowcase.stories.js.map +7 -0
- package/dist/cjs/stories/graphic.stories.d.ts +64 -0
- package/dist/cjs/stories/graphic.stories.js +2 -0
- package/dist/cjs/stories/graphic.stories.js.map +7 -0
- package/dist/cjs/stories/graphicAttractionBlock.stories.d.ts +6 -0
- package/dist/cjs/stories/graphicAttractionBlock.stories.js +2 -0
- package/dist/cjs/stories/graphicAttractionBlock.stories.js.map +7 -0
- package/dist/cjs/stories/grid.stories.d.ts +22 -0
- package/dist/cjs/stories/grid.stories.js +13 -0
- package/dist/cjs/stories/grid.stories.js.map +7 -0
- package/dist/cjs/stories/heading.stories.d.ts +84 -0
- package/dist/cjs/stories/heading.stories.js +15 -0
- package/dist/cjs/stories/heading.stories.js.map +7 -0
- package/dist/cjs/stories/imageTextFeature.stories.d.ts +28 -0
- package/dist/cjs/stories/imageTextFeature.stories.js +50 -0
- package/dist/cjs/stories/imageTextFeature.stories.js.map +7 -0
- package/dist/cjs/stories/imageWithText.stories.d.ts +51 -0
- package/dist/cjs/stories/imageWithText.stories.js +84 -0
- package/dist/cjs/stories/imageWithText.stories.js.map +7 -0
- package/dist/cjs/stories/input-number.stories.d.ts +39 -0
- package/dist/cjs/stories/input-number.stories.js +2 -0
- package/dist/cjs/stories/input-number.stories.js.map +7 -0
- package/dist/cjs/stories/input.stories.d.ts +35 -0
- package/dist/cjs/stories/input.stories.js +2 -0
- package/dist/cjs/stories/input.stories.js.map +7 -0
- package/dist/cjs/stories/ksp.stories.d.ts +63 -0
- package/dist/cjs/stories/ksp.stories.js +128 -0
- package/dist/cjs/stories/ksp.stories.js.map +7 -0
- package/dist/cjs/stories/link.stories.d.ts +69 -0
- package/dist/cjs/stories/link.stories.js +2 -0
- package/dist/cjs/stories/link.stories.js.map +7 -0
- package/dist/cjs/stories/marquee.stories.d.ts +30 -0
- package/dist/cjs/stories/marquee.stories.js +2 -0
- package/dist/cjs/stories/marquee.stories.js.map +7 -0
- package/dist/cjs/stories/mediaplayerBase.stories.d.ts +6 -0
- package/dist/cjs/stories/mediaplayerBase.stories.js +2 -0
- package/dist/cjs/stories/mediaplayerBase.stories.js.map +7 -0
- package/dist/cjs/stories/mediaplayerMulti.stories.d.ts +16 -0
- package/dist/cjs/stories/mediaplayerMulti.stories.js +2 -0
- package/dist/cjs/stories/mediaplayerMulti.stories.js.map +7 -0
- package/dist/cjs/stories/picture.stories.d.ts +23 -0
- package/dist/cjs/stories/picture.stories.js +9 -0
- package/dist/cjs/stories/picture.stories.js.map +7 -0
- package/dist/cjs/stories/popover.stories.d.ts +17 -0
- package/dist/cjs/stories/popover.stories.js +2 -0
- package/dist/cjs/stories/popover.stories.js.map +7 -0
- package/dist/cjs/stories/productCompare.stories.d.ts +54 -0
- package/dist/cjs/stories/productCompare.stories.js +54 -0
- package/dist/cjs/stories/productCompare.stories.js.map +7 -0
- package/dist/cjs/stories/productHero.stories.d.ts +29 -0
- package/dist/cjs/stories/productHero.stories.js +50 -0
- package/dist/cjs/stories/productHero.stories.js.map +7 -0
- package/dist/cjs/stories/radio.stories.d.ts +39 -0
- package/dist/cjs/stories/radio.stories.js +2 -0
- package/dist/cjs/stories/radio.stories.js.map +7 -0
- package/dist/cjs/stories/shelfDisplay.stories.d.ts +16 -0
- package/dist/cjs/stories/shelfDisplay.stories.js +2 -0
- package/dist/cjs/stories/shelfDisplay.stories.js.map +7 -0
- package/dist/cjs/stories/skeleton.stories.d.ts +20 -0
- package/dist/cjs/stories/skeleton.stories.js +2 -0
- package/dist/cjs/stories/skeleton.stories.js.map +7 -0
- package/dist/cjs/stories/slogan.stories.d.ts +20 -0
- package/dist/cjs/stories/slogan.stories.js +6 -0
- package/dist/cjs/stories/slogan.stories.js.map +7 -0
- package/dist/cjs/stories/specs.stories.d.ts +13 -0
- package/dist/cjs/stories/specs.stories.js +57 -0
- package/dist/cjs/stories/specs.stories.js.map +7 -0
- package/dist/cjs/stories/specsComparison.stories.d.ts +28 -0
- package/dist/cjs/stories/specsComparison.stories.js +105 -0
- package/dist/cjs/stories/specsComparison.stories.js.map +7 -0
- package/dist/cjs/stories/tabWithImage.stories.d.ts +28 -0
- package/dist/cjs/stories/tabWithImage.stories.js +53 -0
- package/dist/cjs/stories/tabWithImage.stories.js.map +7 -0
- package/dist/cjs/stories/tabs.stories.d.ts +373 -0
- package/dist/cjs/stories/tabs.stories.js +2 -0
- package/dist/cjs/stories/tabs.stories.js.map +7 -0
- package/dist/cjs/stories/tabsWithMedia.stories.d.ts +28 -0
- package/dist/cjs/stories/tabsWithMedia.stories.js +68 -0
- package/dist/cjs/stories/tabsWithMedia.stories.js.map +7 -0
- package/dist/cjs/stories/text.stories.d.ts +86 -0
- package/dist/cjs/stories/text.stories.js +21 -0
- package/dist/cjs/stories/text.stories.js.map +7 -0
- package/dist/cjs/stories/videoFeature.stories.d.ts +29 -0
- package/dist/cjs/stories/videoFeature.stories.js +56 -0
- package/dist/cjs/stories/videoFeature.stories.js.map +7 -0
- package/dist/cjs/stories/whychoose.stories.d.ts +21 -0
- package/dist/cjs/stories/whychoose.stories.js +2 -0
- package/dist/cjs/stories/whychoose.stories.js.map +7 -0
- package/dist/cjs/types/props.d.ts +3 -0
- 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 +3 -3
- package/dist/esm/biz-components/AiuiProvider/index.d.ts +0 -7
- package/dist/esm/biz-components/AiuiProvider/index.js +1 -1
- package/dist/esm/biz-components/AiuiProvider/index.js.map +2 -2
- package/dist/esm/biz-components/AplusDesc/index.d.ts +3 -3
- package/dist/esm/biz-components/BrandEquity/BrandEquity.d.ts +3 -3
- package/dist/esm/biz-components/BrandEquity/BrandEquity.js +1 -1
- package/dist/esm/biz-components/BrandEquity/BrandEquity.js.map +2 -2
- package/dist/esm/biz-components/BrandEquity/types.d.ts +0 -1
- package/dist/esm/biz-components/Category/index.d.ts +3 -3
- package/dist/esm/biz-components/CreativeModule/index.d.ts +3 -3
- package/dist/esm/biz-components/DownLoad/index.d.ts +3 -3
- package/dist/esm/biz-components/Evaluate/index.d.ts +3 -3
- package/dist/esm/biz-components/Evaluate/index.js +1 -1
- package/dist/esm/biz-components/Evaluate/index.js.map +2 -2
- package/dist/esm/biz-components/Faq/Faq.d.ts +3 -3
- package/dist/esm/biz-components/FeatureCards/FeatureCards.d.ts +3 -3
- package/dist/esm/biz-components/FeatureShowcase/FeatureShowcase.d.ts +3 -3
- package/dist/esm/biz-components/Features/index.d.ts +3 -3
- package/dist/esm/biz-components/FootCharger/index.d.ts +3 -3
- package/dist/esm/biz-components/FooterNavigation/index.d.ts +3 -3
- package/dist/esm/biz-components/GiftBox/index.d.ts +3 -3
- package/dist/esm/biz-components/Graphic/index.d.ts +3 -3
- package/dist/esm/biz-components/GraphicAttractionBlock/index.d.ts +3 -3
- package/dist/esm/biz-components/GraphicMore/index.d.ts +3 -3
- package/dist/esm/biz-components/GraphicOverlay/GraphicOverlay.d.ts +3 -3
- package/dist/esm/biz-components/HeaderNavigation/index.d.ts +3 -3
- package/dist/esm/biz-components/HeroBanner/Countdown.js +1 -1
- package/dist/esm/biz-components/HeroBanner/Countdown.js.map +2 -2
- package/dist/esm/biz-components/HeroBanner/HeroBanner.d.ts +3 -6
- 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/types.d.ts +0 -4
- package/dist/esm/biz-components/ImageTextFeature/ImageTextFeature.d.ts +3 -3
- package/dist/esm/biz-components/ImageTextFeature/ImageTextFeature.js +1 -1
- package/dist/esm/biz-components/ImageTextFeature/ImageTextFeature.js.map +3 -3
- package/dist/esm/biz-components/ImageTextFeature/types.d.ts +0 -1
- package/dist/esm/biz-components/ImageWithText/ImageWithText.d.ts +3 -3
- package/dist/esm/biz-components/Ksp/index.d.ts +3 -3
- package/dist/esm/biz-components/Listing/components/PaidShipping/index.d.ts +4 -4
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/BenefitsTab.d.ts +3 -3
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/ProductBundle/index.d.ts +3 -3
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/ProductExchangePurchase/index.d.ts +3 -3
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/ProductFreeGift/index.d.ts +3 -3
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/ProductHighlight/index.d.ts +3 -3
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/ProductOptions/index.d.ts +3 -3
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductGallery/index.d.ts +3 -3
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductSummary/index.d.ts +3 -3
- package/dist/esm/biz-components/Listing/components/PurchaseBar/index.d.ts +3 -3
- package/dist/esm/biz-components/Marquee/Marquee.d.ts +3 -3
- package/dist/esm/biz-components/Marquee/Marquee.js +1 -1
- package/dist/esm/biz-components/Marquee/Marquee.js.map +3 -3
- package/dist/esm/biz-components/MarqueeReview/index.d.ts +3 -3
- package/dist/esm/biz-components/MediaPlayerBase/index.d.ts +3 -3
- package/dist/esm/biz-components/MediaPlayerMulti/index.d.ts +3 -3
- package/dist/esm/biz-components/MediaPlayerSticky/index.d.ts +4 -4
- package/dist/esm/biz-components/MediaPlayerSticky/types.d.ts +0 -1
- package/dist/esm/biz-components/MediaSceneSwitcher/MediaSceneSwitcher.d.ts +3 -3
- package/dist/esm/biz-components/MemberEquity/index.d.ts +3 -3
- package/dist/esm/biz-components/MultiLayoutGraphicBlock/MultiLayoutGraphicBlock.d.ts +3 -3
- package/dist/esm/biz-components/ProductCompare/index.d.ts +3 -3
- package/dist/esm/biz-components/ProductHero/ProductHero.d.ts +3 -3
- package/dist/esm/biz-components/ProductNav/ProductNav.d.ts +3 -3
- package/dist/esm/biz-components/SelectStore/index.d.ts +3 -3
- package/dist/esm/biz-components/ShelfDisplay/index.d.ts +3 -3
- package/dist/esm/biz-components/ShelfDisplay/shelfDisplay.d.ts +11 -0
- package/dist/esm/biz-components/ShelfDisplay/shelfDisplay.js +1 -1
- package/dist/esm/biz-components/ShelfDisplay/shelfDisplay.js.map +3 -3
- package/dist/esm/biz-components/ShelfDisplay/shelfDisplayItem.js +5 -5
- package/dist/esm/biz-components/ShelfDisplay/shelfDisplayItem.js.map +3 -3
- package/dist/esm/biz-components/Slogan/index.d.ts +3 -3
- package/dist/esm/biz-components/Spacer/index.d.ts +3 -3
- package/dist/esm/biz-components/Specs/index.d.ts +3 -3
- package/dist/esm/biz-components/SpecsComparison/SpecsComparison.d.ts +3 -3
- package/dist/esm/biz-components/TabWithImage/TabWithImage.d.ts +3 -3
- package/dist/esm/biz-components/Tabs/Tabs.d.ts +3 -3
- package/dist/esm/biz-components/Tabs/Tabs.js +1 -1
- package/dist/esm/biz-components/Tabs/Tabs.js.map +3 -3
- package/dist/esm/biz-components/Tabs/types.d.ts +0 -9
- package/dist/esm/biz-components/TabsGroup/index.d.ts +3 -3
- package/dist/esm/biz-components/TabsWithMedia/TabsWithMedia.d.ts +3 -3
- package/dist/esm/biz-components/ThreeDCarousel/ThreeDCarousel.d.ts +3 -3
- package/dist/esm/biz-components/Title/index.d.ts +3 -3
- package/dist/esm/biz-components/Title/index.js +1 -1
- package/dist/esm/biz-components/Title/index.js.map +3 -3
- package/dist/esm/biz-components/Title/types.d.ts +0 -55
- package/dist/esm/biz-components/VideoFeature/VideoFeature.d.ts +3 -3
- package/dist/esm/biz-components/WhyChoose/WhyChoose.d.ts +3 -3
- package/dist/esm/biz-components/index.d.ts +0 -32
- package/dist/esm/biz-components/index.js +1 -1
- package/dist/esm/biz-components/index.js.map +3 -3
- package/dist/esm/components/badge.d.ts +2 -5
- package/dist/esm/components/badge.js +1 -1
- package/dist/esm/components/badge.js.map +3 -3
- package/dist/esm/components/index.d.ts +0 -2
- package/dist/esm/components/index.js +1 -1
- package/dist/esm/components/index.js.map +2 -2
- package/dist/esm/components/tabs.d.ts +1 -2
- package/dist/esm/components/tabs.js +1 -1
- package/dist/esm/components/tabs.js.map +2 -2
- package/dist/esm/helpers/index.d.ts +0 -1
- package/dist/esm/helpers/index.js +1 -1
- package/dist/esm/helpers/index.js.map +3 -3
- package/dist/esm/shared/Styles.d.ts +4 -5
- package/dist/esm/shared/Styles.js +1 -1
- package/dist/esm/shared/Styles.js.map +3 -3
- package/dist/esm/stories/HeroBanner.stories.d.ts +28 -0
- package/dist/esm/stories/HeroBanner.stories.js +11 -0
- package/dist/esm/stories/HeroBanner.stories.js.map +7 -0
- package/dist/esm/stories/InlineVideo.stories.d.ts +37 -0
- package/dist/esm/stories/InlineVideo.stories.js +164 -0
- package/dist/esm/stories/InlineVideo.stories.js.map +7 -0
- package/dist/esm/stories/MarqueeReview.stories.d.ts +72 -0
- package/dist/esm/stories/MarqueeReview.stories.js +19 -0
- package/dist/esm/stories/MarqueeReview.stories.js.map +7 -0
- package/dist/esm/stories/MediaSceneSwitcher.stories.d.ts +47 -0
- package/dist/esm/stories/MediaSceneSwitcher.stories.js +2 -0
- package/dist/esm/stories/MediaSceneSwitcher.stories.js.map +7 -0
- package/dist/esm/stories/MemberEquity.stories.d.ts +9 -0
- package/dist/esm/stories/MemberEquity.stories.js +31 -0
- package/dist/esm/stories/MemberEquity.stories.js.map +7 -0
- package/dist/esm/stories/MultiLayoutGraphicBlock.stories.d.ts +9 -0
- package/dist/esm/stories/MultiLayoutGraphicBlock.stories.js +2 -0
- package/dist/esm/stories/MultiLayoutGraphicBlock.stories.js.map +7 -0
- package/dist/esm/stories/ProductNav.stories.d.ts +55 -0
- package/dist/esm/stories/ProductNav.stories.js +2 -0
- package/dist/esm/stories/ProductNav.stories.js.map +7 -0
- package/dist/esm/stories/ThreeDCarousel.stories.d.ts +27 -0
- package/dist/esm/stories/ThreeDCarousel.stories.js +118 -0
- package/dist/esm/stories/ThreeDCarousel.stories.js.map +7 -0
- package/dist/esm/stories/accordionCards.stories.d.ts +38 -0
- package/dist/esm/stories/accordionCards.stories.js +2 -0
- package/dist/esm/stories/accordionCards.stories.js.map +7 -0
- package/dist/esm/stories/alert.stories.d.ts +27 -0
- package/dist/esm/stories/alert.stories.js +2 -0
- package/dist/esm/stories/alert.stories.js.map +7 -0
- package/dist/esm/stories/avatar.stories.d.ts +39 -0
- package/dist/esm/stories/avatar.stories.js +2 -0
- package/dist/esm/stories/avatar.stories.js.map +7 -0
- package/dist/esm/stories/badge.stories.d.ts +31 -0
- package/dist/esm/stories/badge.stories.js +2 -0
- package/dist/esm/stories/badge.stories.js.map +7 -0
- package/dist/esm/stories/bizTabs.stories.d.ts +7 -0
- package/dist/esm/stories/bizTabs.stories.js +2 -0
- package/dist/esm/stories/bizTabs.stories.js.map +7 -0
- package/dist/esm/stories/board.stories.d.ts +6 -0
- package/dist/esm/stories/board.stories.js +2 -0
- package/dist/esm/stories/board.stories.js.map +7 -0
- package/dist/esm/stories/brandEquity.stories.d.ts +16 -0
- package/dist/esm/stories/brandEquity.stories.js +2 -0
- package/dist/esm/stories/brandEquity.stories.js.map +7 -0
- package/dist/esm/stories/brandStrip.stories.d.ts +12 -0
- package/dist/esm/stories/brandStrip.stories.js +2 -0
- package/dist/esm/stories/brandStrip.stories.js.map +7 -0
- package/dist/esm/stories/button.stories.d.ts +56 -0
- package/dist/esm/stories/button.stories.js +2 -0
- package/dist/esm/stories/button.stories.js.map +7 -0
- package/dist/esm/stories/card.stories.d.ts +27 -0
- package/dist/esm/stories/card.stories.js +2 -0
- package/dist/esm/stories/card.stories.js.map +7 -0
- package/dist/esm/stories/carousel.stories.d.ts +8 -0
- package/dist/esm/stories/carousel.stories.js +2 -0
- package/dist/esm/stories/carousel.stories.js.map +7 -0
- package/dist/esm/stories/category.stories.d.ts +17 -0
- package/dist/esm/stories/category.stories.js +2 -0
- package/dist/esm/stories/category.stories.js.map +7 -0
- package/dist/esm/stories/checkbox.stories.d.ts +46 -0
- package/dist/esm/stories/checkbox.stories.js +2 -0
- package/dist/esm/stories/checkbox.stories.js.map +7 -0
- package/dist/esm/stories/container.stories.d.ts +28 -0
- package/dist/esm/stories/container.stories.js +15 -0
- package/dist/esm/stories/container.stories.js.map +7 -0
- package/dist/esm/stories/cpnBanner.stories.d.ts +14 -0
- package/dist/esm/stories/cpnBanner.stories.js +2 -0
- package/dist/esm/stories/cpnBanner.stories.js.map +7 -0
- package/dist/esm/stories/cpnCountdown.stories.d.ts +12 -0
- package/dist/esm/stories/cpnCountdown.stories.js +2 -0
- package/dist/esm/stories/cpnCountdown.stories.js.map +7 -0
- package/dist/esm/stories/cpnNavigation.stories.d.ts +14 -0
- package/dist/esm/stories/cpnNavigation.stories.js +2 -0
- package/dist/esm/stories/cpnNavigation.stories.js.map +7 -0
- package/dist/esm/stories/cpnProductcard.stories.d.ts +14 -0
- package/dist/esm/stories/cpnProductcard.stories.js +2 -0
- package/dist/esm/stories/cpnProductcard.stories.js.map +7 -0
- package/dist/esm/stories/cpnTitle.stories.d.ts +14 -0
- package/dist/esm/stories/cpnTitle.stories.js +2 -0
- package/dist/esm/stories/cpnTitle.stories.js.map +7 -0
- package/dist/esm/stories/creativeModule.stories.d.ts +19 -0
- package/dist/esm/stories/creativeModule.stories.js +2 -0
- package/dist/esm/stories/creativeModule.stories.js.map +7 -0
- package/dist/esm/stories/dialog.stories.d.ts +20 -0
- package/dist/esm/stories/dialog.stories.js +2 -0
- package/dist/esm/stories/dialog.stories.js.map +7 -0
- package/dist/esm/stories/drawer.stories.d.ts +20 -0
- package/dist/esm/stories/drawer.stories.js +2 -0
- package/dist/esm/stories/drawer.stories.js.map +7 -0
- package/dist/esm/stories/drop-down.stories.d.ts +16 -0
- package/dist/esm/stories/drop-down.stories.js +2 -0
- package/dist/esm/stories/drop-down.stories.js.map +7 -0
- package/dist/esm/stories/evaluate.stories.d.ts +16 -0
- package/dist/esm/stories/evaluate.stories.js +2 -0
- package/dist/esm/stories/evaluate.stories.js.map +7 -0
- package/dist/esm/stories/faq.stories.d.ts +21 -0
- package/dist/esm/stories/faq.stories.js +2 -0
- package/dist/esm/stories/faq.stories.js.map +7 -0
- package/dist/esm/stories/featureCards.stories.d.ts +30 -0
- package/dist/esm/stories/featureCards.stories.js +61 -0
- package/dist/esm/stories/featureCards.stories.js.map +7 -0
- package/dist/esm/stories/featureShowcase.stories.d.ts +29 -0
- package/dist/esm/stories/featureShowcase.stories.js +44 -0
- package/dist/esm/stories/featureShowcase.stories.js.map +7 -0
- package/dist/esm/stories/graphic.stories.d.ts +64 -0
- package/dist/esm/stories/graphic.stories.js +2 -0
- package/dist/esm/stories/graphic.stories.js.map +7 -0
- package/dist/esm/stories/graphicAttractionBlock.stories.d.ts +6 -0
- package/dist/esm/stories/graphicAttractionBlock.stories.js +2 -0
- package/dist/esm/stories/graphicAttractionBlock.stories.js.map +7 -0
- package/dist/esm/stories/grid.stories.d.ts +22 -0
- package/dist/esm/stories/grid.stories.js +13 -0
- package/dist/esm/stories/grid.stories.js.map +7 -0
- package/dist/esm/stories/heading.stories.d.ts +84 -0
- package/dist/esm/stories/heading.stories.js +15 -0
- package/dist/esm/stories/heading.stories.js.map +7 -0
- package/dist/esm/stories/imageTextFeature.stories.d.ts +28 -0
- package/dist/esm/stories/imageTextFeature.stories.js +50 -0
- package/dist/esm/stories/imageTextFeature.stories.js.map +7 -0
- package/dist/esm/stories/imageWithText.stories.d.ts +51 -0
- package/dist/esm/stories/imageWithText.stories.js +84 -0
- package/dist/esm/stories/imageWithText.stories.js.map +7 -0
- package/dist/esm/stories/input-number.stories.d.ts +39 -0
- package/dist/esm/stories/input-number.stories.js +2 -0
- package/dist/esm/stories/input-number.stories.js.map +7 -0
- package/dist/esm/stories/input.stories.d.ts +35 -0
- package/dist/esm/stories/input.stories.js +2 -0
- package/dist/esm/stories/input.stories.js.map +7 -0
- package/dist/esm/stories/ksp.stories.d.ts +63 -0
- package/dist/esm/stories/ksp.stories.js +128 -0
- package/dist/esm/stories/ksp.stories.js.map +7 -0
- package/dist/esm/stories/link.stories.d.ts +69 -0
- package/dist/esm/stories/link.stories.js +2 -0
- package/dist/esm/stories/link.stories.js.map +7 -0
- package/dist/esm/stories/marquee.stories.d.ts +30 -0
- package/dist/esm/stories/marquee.stories.js +2 -0
- package/dist/esm/stories/marquee.stories.js.map +7 -0
- package/dist/esm/stories/mediaplayerBase.stories.d.ts +6 -0
- package/dist/esm/stories/mediaplayerBase.stories.js +2 -0
- package/dist/esm/stories/mediaplayerBase.stories.js.map +7 -0
- package/dist/esm/stories/mediaplayerMulti.stories.d.ts +16 -0
- package/dist/esm/stories/mediaplayerMulti.stories.js +2 -0
- package/dist/esm/stories/mediaplayerMulti.stories.js.map +7 -0
- package/dist/esm/stories/picture.stories.d.ts +23 -0
- package/dist/esm/stories/picture.stories.js +9 -0
- package/dist/esm/stories/picture.stories.js.map +7 -0
- package/dist/esm/stories/popover.stories.d.ts +17 -0
- package/dist/esm/stories/popover.stories.js +2 -0
- package/dist/esm/stories/popover.stories.js.map +7 -0
- package/dist/esm/stories/productCompare.stories.d.ts +54 -0
- package/dist/esm/stories/productCompare.stories.js +54 -0
- package/dist/esm/stories/productCompare.stories.js.map +7 -0
- package/dist/esm/stories/productHero.stories.d.ts +29 -0
- package/dist/esm/stories/productHero.stories.js +50 -0
- package/dist/esm/stories/productHero.stories.js.map +7 -0
- package/dist/esm/stories/radio.stories.d.ts +39 -0
- package/dist/esm/stories/radio.stories.js +2 -0
- package/dist/esm/stories/radio.stories.js.map +7 -0
- package/dist/esm/stories/shelfDisplay.stories.d.ts +16 -0
- package/dist/esm/stories/shelfDisplay.stories.js +2 -0
- package/dist/esm/stories/shelfDisplay.stories.js.map +7 -0
- package/dist/esm/stories/skeleton.stories.d.ts +20 -0
- package/dist/esm/stories/skeleton.stories.js +2 -0
- package/dist/esm/stories/skeleton.stories.js.map +7 -0
- package/dist/esm/stories/slogan.stories.d.ts +20 -0
- package/dist/esm/stories/slogan.stories.js +6 -0
- package/dist/esm/stories/slogan.stories.js.map +7 -0
- package/dist/esm/stories/specs.stories.d.ts +13 -0
- package/dist/esm/stories/specs.stories.js +57 -0
- package/dist/esm/stories/specs.stories.js.map +7 -0
- package/dist/esm/stories/specsComparison.stories.d.ts +28 -0
- package/dist/esm/stories/specsComparison.stories.js +105 -0
- package/dist/esm/stories/specsComparison.stories.js.map +7 -0
- package/dist/esm/stories/tabWithImage.stories.d.ts +28 -0
- package/dist/esm/stories/tabWithImage.stories.js +53 -0
- package/dist/esm/stories/tabWithImage.stories.js.map +7 -0
- package/dist/esm/stories/tabs.stories.d.ts +373 -0
- package/dist/esm/stories/tabs.stories.js +2 -0
- package/dist/esm/stories/tabs.stories.js.map +7 -0
- package/dist/esm/stories/tabsWithMedia.stories.d.ts +28 -0
- package/dist/esm/stories/tabsWithMedia.stories.js +68 -0
- package/dist/esm/stories/tabsWithMedia.stories.js.map +7 -0
- package/dist/esm/stories/text.stories.d.ts +86 -0
- package/dist/esm/stories/text.stories.js +21 -0
- package/dist/esm/stories/text.stories.js.map +7 -0
- package/dist/esm/stories/videoFeature.stories.d.ts +29 -0
- package/dist/esm/stories/videoFeature.stories.js +56 -0
- package/dist/esm/stories/videoFeature.stories.js.map +7 -0
- package/dist/esm/stories/whychoose.stories.d.ts +21 -0
- package/dist/esm/stories/whychoose.stories.js +2 -0
- package/dist/esm/stories/whychoose.stories.js.map +7 -0
- package/dist/esm/types/props.d.ts +3 -0
- package/dist/tokens/base.css +3 -4
- package/dist/tokens/eufy.css +0 -1
- package/dist/tokens/soundcore.css +3 -4
- package/package.json +3 -8
- package/style.css +118 -4968
- package/tailwind.config.js +2 -19
- package/dist/cjs/biz-components/ActiveShelf/index.d.ts +0 -174
- package/dist/cjs/biz-components/ActiveShelf/index.js +0 -2
- package/dist/cjs/biz-components/ActiveShelf/index.js.map +0 -7
- package/dist/cjs/biz-components/ActiveShelf/types.d.ts +0 -89
- package/dist/cjs/biz-components/ActiveShelf/types.js +0 -2
- package/dist/cjs/biz-components/ActiveShelf/types.js.map +0 -7
- package/dist/cjs/biz-components/AnchorNavigation/index.d.ts +0 -42
- package/dist/cjs/biz-components/AnchorNavigation/index.js +0 -2
- package/dist/cjs/biz-components/AnchorNavigation/index.js.map +0 -7
- package/dist/cjs/biz-components/AnchorNavigation/useAnchorPosition.d.ts +0 -2
- package/dist/cjs/biz-components/AnchorNavigation/useAnchorPosition.js +0 -2
- package/dist/cjs/biz-components/AnchorNavigation/useAnchorPosition.js.map +0 -7
- package/dist/cjs/biz-components/BrandCardLink/BrandCardLink.d.ts +0 -6
- package/dist/cjs/biz-components/BrandCardLink/BrandCardLink.js +0 -2
- package/dist/cjs/biz-components/BrandCardLink/BrandCardLink.js.map +0 -7
- package/dist/cjs/biz-components/BrandCardLink/index.d.ts +0 -1
- package/dist/cjs/biz-components/BrandCardLink/index.js +0 -2
- package/dist/cjs/biz-components/BrandCardLink/index.js.map +0 -7
- package/dist/cjs/biz-components/BrandCardLink/types.d.ts +0 -19
- package/dist/cjs/biz-components/BrandCardLink/types.js +0 -2
- package/dist/cjs/biz-components/BrandCardLink/types.js.map +0 -7
- package/dist/cjs/biz-components/BuyOneGetOneShelf/ProductCard.d.ts +0 -74
- package/dist/cjs/biz-components/BuyOneGetOneShelf/ProductCard.js +0 -2
- package/dist/cjs/biz-components/BuyOneGetOneShelf/ProductCard.js.map +0 -7
- package/dist/cjs/biz-components/BuyOneGetOneShelf/hooks/useBogoDataTransform.d.ts +0 -36
- package/dist/cjs/biz-components/BuyOneGetOneShelf/hooks/useBogoDataTransform.js +0 -2
- package/dist/cjs/biz-components/BuyOneGetOneShelf/hooks/useBogoDataTransform.js.map +0 -7
- package/dist/cjs/biz-components/BuyOneGetOneShelf/index.d.ts +0 -193
- package/dist/cjs/biz-components/BuyOneGetOneShelf/index.js +0 -2
- package/dist/cjs/biz-components/BuyOneGetOneShelf/index.js.map +0 -7
- package/dist/cjs/biz-components/EventSchedule/index.d.ts +0 -63
- package/dist/cjs/biz-components/EventSchedule/index.js +0 -2
- package/dist/cjs/biz-components/EventSchedule/index.js.map +0 -7
- package/dist/cjs/biz-components/IPRedirect/RegionBanner.d.ts +0 -37
- package/dist/cjs/biz-components/IPRedirect/RegionBanner.js +0 -60
- package/dist/cjs/biz-components/IPRedirect/RegionBanner.js.map +0 -7
- package/dist/cjs/biz-components/IPRedirect/RegionSelectorModal.d.ts +0 -47
- package/dist/cjs/biz-components/IPRedirect/RegionSelectorModal.js +0 -33
- package/dist/cjs/biz-components/IPRedirect/RegionSelectorModal.js.map +0 -7
- package/dist/cjs/biz-components/IPRedirect/index.d.ts +0 -9
- package/dist/cjs/biz-components/IPRedirect/index.js +0 -2
- package/dist/cjs/biz-components/IPRedirect/index.js.map +0 -7
- package/dist/cjs/biz-components/IPRedirect/type.d.ts +0 -36
- package/dist/cjs/biz-components/IPRedirect/type.js +0 -2
- package/dist/cjs/biz-components/IPRedirect/type.js.map +0 -7
- package/dist/cjs/biz-components/IPRedirect/useAutoRedirect.d.ts +0 -66
- package/dist/cjs/biz-components/IPRedirect/useAutoRedirect.js +0 -2
- package/dist/cjs/biz-components/IPRedirect/useAutoRedirect.js.map +0 -7
- package/dist/cjs/biz-components/IPRedirect/useDetectedRegionRedirect.d.ts +0 -51
- package/dist/cjs/biz-components/IPRedirect/useDetectedRegionRedirect.js +0 -2
- package/dist/cjs/biz-components/IPRedirect/useDetectedRegionRedirect.js.map +0 -7
- package/dist/cjs/biz-components/IPRedirect/useIPRedirect.d.ts +0 -42
- package/dist/cjs/biz-components/IPRedirect/useIPRedirect.js +0 -2
- package/dist/cjs/biz-components/IPRedirect/useIPRedirect.js.map +0 -7
- package/dist/cjs/biz-components/IPRedirect/useRedirectBanner.d.ts +0 -108
- package/dist/cjs/biz-components/IPRedirect/useRedirectBanner.js +0 -2
- package/dist/cjs/biz-components/IPRedirect/useRedirectBanner.js.map +0 -7
- package/dist/cjs/biz-components/IPRedirect/useRegionRedirectManager.d.ts +0 -152
- package/dist/cjs/biz-components/IPRedirect/useRegionRedirectManager.js +0 -2
- package/dist/cjs/biz-components/IPRedirect/useRegionRedirectManager.js.map +0 -7
- package/dist/cjs/biz-components/IPRedirect/useSavedRegionRedirect.d.ts +0 -51
- package/dist/cjs/biz-components/IPRedirect/useSavedRegionRedirect.js +0 -2
- package/dist/cjs/biz-components/IPRedirect/useSavedRegionRedirect.js.map +0 -7
- package/dist/cjs/biz-components/IPRedirect/utils.d.ts +0 -222
- package/dist/cjs/biz-components/IPRedirect/utils.js +0 -2
- package/dist/cjs/biz-components/IPRedirect/utils.js.map +0 -7
- package/dist/cjs/biz-components/ImageOverlayShelf/index.d.ts +0 -114
- package/dist/cjs/biz-components/ImageOverlayShelf/index.js +0 -2
- package/dist/cjs/biz-components/ImageOverlayShelf/index.js.map +0 -7
- package/dist/cjs/biz-components/Media/index.d.ts +0 -32
- package/dist/cjs/biz-components/Media/index.js +0 -2
- package/dist/cjs/biz-components/Media/index.js.map +0 -7
- package/dist/cjs/biz-components/MediaShelf/index.d.ts +0 -231
- package/dist/cjs/biz-components/MediaShelf/index.js +0 -2
- package/dist/cjs/biz-components/MediaShelf/index.js.map +0 -7
- package/dist/cjs/biz-components/MediaShelf/types.d.ts +0 -37
- package/dist/cjs/biz-components/MediaShelf/types.js +0 -2
- package/dist/cjs/biz-components/MediaShelf/types.js.map +0 -7
- package/dist/cjs/biz-components/MiniCart/index.d.ts +0 -88
- package/dist/cjs/biz-components/MiniCart/index.js +0 -2
- package/dist/cjs/biz-components/MiniCart/index.js.map +0 -7
- package/dist/cjs/biz-components/PromotionalBar/index.d.ts +0 -49
- package/dist/cjs/biz-components/PromotionalBar/index.js +0 -2
- package/dist/cjs/biz-components/PromotionalBar/index.js.map +0 -7
- package/dist/cjs/biz-components/SecondaryBanner/index.d.ts +0 -69
- package/dist/cjs/biz-components/SecondaryBanner/index.js +0 -2
- package/dist/cjs/biz-components/SecondaryBanner/index.js.map +0 -7
- package/dist/cjs/biz-components/Title/Countdown.d.ts +0 -14
- package/dist/cjs/biz-components/Title/Countdown.js +0 -2
- package/dist/cjs/biz-components/Title/Countdown.js.map +0 -7
- package/dist/cjs/biz-components/WheelLottery/BaseModal.d.ts +0 -55
- package/dist/cjs/biz-components/WheelLottery/BaseModal.js +0 -12
- package/dist/cjs/biz-components/WheelLottery/BaseModal.js.map +0 -7
- package/dist/cjs/biz-components/WheelLottery/ChanceMethods.d.ts +0 -30
- package/dist/cjs/biz-components/WheelLottery/ChanceMethods.js +0 -2
- package/dist/cjs/biz-components/WheelLottery/ChanceMethods.js.map +0 -7
- package/dist/cjs/biz-components/WheelLottery/ErrorModal.d.ts +0 -42
- package/dist/cjs/biz-components/WheelLottery/ErrorModal.js +0 -2
- package/dist/cjs/biz-components/WheelLottery/ErrorModal.js.map +0 -7
- package/dist/cjs/biz-components/WheelLottery/MyRewardsModal.d.ts +0 -91
- package/dist/cjs/biz-components/WheelLottery/MyRewardsModal.js +0 -2
- package/dist/cjs/biz-components/WheelLottery/MyRewardsModal.js.map +0 -7
- package/dist/cjs/biz-components/WheelLottery/PrizePool.d.ts +0 -26
- package/dist/cjs/biz-components/WheelLottery/PrizePool.js +0 -2
- package/dist/cjs/biz-components/WheelLottery/PrizePool.js.map +0 -7
- package/dist/cjs/biz-components/WheelLottery/RulesModal.d.ts +0 -47
- package/dist/cjs/biz-components/WheelLottery/RulesModal.js +0 -2
- package/dist/cjs/biz-components/WheelLottery/RulesModal.js.map +0 -7
- package/dist/cjs/biz-components/WheelLottery/ShareModal.d.ts +0 -74
- package/dist/cjs/biz-components/WheelLottery/ShareModal.js +0 -2
- package/dist/cjs/biz-components/WheelLottery/ShareModal.js.map +0 -7
- package/dist/cjs/biz-components/WheelLottery/Wheel.d.ts +0 -27
- package/dist/cjs/biz-components/WheelLottery/Wheel.js +0 -2
- package/dist/cjs/biz-components/WheelLottery/Wheel.js.map +0 -7
- package/dist/cjs/biz-components/WheelLottery/WinnerModal.d.ts +0 -25
- package/dist/cjs/biz-components/WheelLottery/WinnerModal.js +0 -2
- package/dist/cjs/biz-components/WheelLottery/WinnerModal.js.map +0 -7
- package/dist/cjs/biz-components/WheelLottery/index.d.ts +0 -52
- package/dist/cjs/biz-components/WheelLottery/index.js +0 -2
- package/dist/cjs/biz-components/WheelLottery/index.js.map +0 -7
- package/dist/cjs/biz-components/WheelLottery/types.d.ts +0 -1219
- package/dist/cjs/biz-components/WheelLottery/types.js +0 -2
- package/dist/cjs/biz-components/WheelLottery/types.js.map +0 -7
- package/dist/cjs/components/paginator.d.ts +0 -12
- package/dist/cjs/components/paginator.js +0 -7
- package/dist/cjs/components/paginator.js.map +0 -7
- package/dist/cjs/components/progress.d.ts +0 -46
- package/dist/cjs/components/progress.js +0 -2
- package/dist/cjs/components/progress.js.map +0 -7
- package/dist/cjs/helpers/priceFormatting.d.ts +0 -11
- package/dist/cjs/helpers/priceFormatting.js +0 -2
- package/dist/cjs/helpers/priceFormatting.js.map +0 -7
- package/dist/cjs/hooks/index.d.ts +0 -2
- package/dist/cjs/hooks/index.js +0 -2
- package/dist/cjs/hooks/index.js.map +0 -7
- package/dist/cjs/hooks/useCoupon.d.ts +0 -111
- package/dist/cjs/hooks/useCoupon.js +0 -2
- package/dist/cjs/hooks/useCoupon.js.map +0 -7
- package/dist/cjs/hooks/useMemberPrice.d.ts +0 -155
- package/dist/cjs/hooks/useMemberPrice.js +0 -2
- package/dist/cjs/hooks/useMemberPrice.js.map +0 -7
- package/dist/esm/biz-components/ActiveShelf/index.d.ts +0 -174
- package/dist/esm/biz-components/ActiveShelf/index.js +0 -2
- package/dist/esm/biz-components/ActiveShelf/index.js.map +0 -7
- package/dist/esm/biz-components/ActiveShelf/types.d.ts +0 -89
- package/dist/esm/biz-components/ActiveShelf/types.js +0 -2
- package/dist/esm/biz-components/ActiveShelf/types.js.map +0 -7
- package/dist/esm/biz-components/AnchorNavigation/index.d.ts +0 -42
- package/dist/esm/biz-components/AnchorNavigation/index.js +0 -2
- package/dist/esm/biz-components/AnchorNavigation/index.js.map +0 -7
- package/dist/esm/biz-components/AnchorNavigation/useAnchorPosition.d.ts +0 -2
- package/dist/esm/biz-components/AnchorNavigation/useAnchorPosition.js +0 -2
- package/dist/esm/biz-components/AnchorNavigation/useAnchorPosition.js.map +0 -7
- package/dist/esm/biz-components/BrandCardLink/BrandCardLink.d.ts +0 -6
- package/dist/esm/biz-components/BrandCardLink/BrandCardLink.js +0 -2
- package/dist/esm/biz-components/BrandCardLink/BrandCardLink.js.map +0 -7
- package/dist/esm/biz-components/BrandCardLink/index.d.ts +0 -1
- package/dist/esm/biz-components/BrandCardLink/index.js +0 -2
- package/dist/esm/biz-components/BrandCardLink/index.js.map +0 -7
- package/dist/esm/biz-components/BrandCardLink/types.d.ts +0 -19
- package/dist/esm/biz-components/BrandCardLink/types.js +0 -1
- package/dist/esm/biz-components/BrandCardLink/types.js.map +0 -7
- package/dist/esm/biz-components/BuyOneGetOneShelf/ProductCard.d.ts +0 -74
- package/dist/esm/biz-components/BuyOneGetOneShelf/ProductCard.js +0 -2
- package/dist/esm/biz-components/BuyOneGetOneShelf/ProductCard.js.map +0 -7
- package/dist/esm/biz-components/BuyOneGetOneShelf/hooks/useBogoDataTransform.d.ts +0 -36
- package/dist/esm/biz-components/BuyOneGetOneShelf/hooks/useBogoDataTransform.js +0 -2
- package/dist/esm/biz-components/BuyOneGetOneShelf/hooks/useBogoDataTransform.js.map +0 -7
- package/dist/esm/biz-components/BuyOneGetOneShelf/index.d.ts +0 -193
- package/dist/esm/biz-components/BuyOneGetOneShelf/index.js +0 -2
- package/dist/esm/biz-components/BuyOneGetOneShelf/index.js.map +0 -7
- package/dist/esm/biz-components/EventSchedule/index.d.ts +0 -63
- package/dist/esm/biz-components/EventSchedule/index.js +0 -2
- package/dist/esm/biz-components/EventSchedule/index.js.map +0 -7
- package/dist/esm/biz-components/IPRedirect/RegionBanner.d.ts +0 -37
- package/dist/esm/biz-components/IPRedirect/RegionBanner.js +0 -60
- package/dist/esm/biz-components/IPRedirect/RegionBanner.js.map +0 -7
- package/dist/esm/biz-components/IPRedirect/RegionSelectorModal.d.ts +0 -47
- package/dist/esm/biz-components/IPRedirect/RegionSelectorModal.js +0 -33
- package/dist/esm/biz-components/IPRedirect/RegionSelectorModal.js.map +0 -7
- package/dist/esm/biz-components/IPRedirect/index.d.ts +0 -9
- package/dist/esm/biz-components/IPRedirect/index.js +0 -2
- package/dist/esm/biz-components/IPRedirect/index.js.map +0 -7
- package/dist/esm/biz-components/IPRedirect/type.d.ts +0 -36
- package/dist/esm/biz-components/IPRedirect/type.js +0 -1
- package/dist/esm/biz-components/IPRedirect/type.js.map +0 -7
- package/dist/esm/biz-components/IPRedirect/useAutoRedirect.d.ts +0 -66
- package/dist/esm/biz-components/IPRedirect/useAutoRedirect.js +0 -2
- package/dist/esm/biz-components/IPRedirect/useAutoRedirect.js.map +0 -7
- package/dist/esm/biz-components/IPRedirect/useDetectedRegionRedirect.d.ts +0 -51
- package/dist/esm/biz-components/IPRedirect/useDetectedRegionRedirect.js +0 -2
- package/dist/esm/biz-components/IPRedirect/useDetectedRegionRedirect.js.map +0 -7
- package/dist/esm/biz-components/IPRedirect/useIPRedirect.d.ts +0 -42
- package/dist/esm/biz-components/IPRedirect/useIPRedirect.js +0 -2
- package/dist/esm/biz-components/IPRedirect/useIPRedirect.js.map +0 -7
- package/dist/esm/biz-components/IPRedirect/useRedirectBanner.d.ts +0 -108
- package/dist/esm/biz-components/IPRedirect/useRedirectBanner.js +0 -2
- package/dist/esm/biz-components/IPRedirect/useRedirectBanner.js.map +0 -7
- package/dist/esm/biz-components/IPRedirect/useRegionRedirectManager.d.ts +0 -152
- package/dist/esm/biz-components/IPRedirect/useRegionRedirectManager.js +0 -2
- package/dist/esm/biz-components/IPRedirect/useRegionRedirectManager.js.map +0 -7
- package/dist/esm/biz-components/IPRedirect/useSavedRegionRedirect.d.ts +0 -51
- package/dist/esm/biz-components/IPRedirect/useSavedRegionRedirect.js +0 -2
- package/dist/esm/biz-components/IPRedirect/useSavedRegionRedirect.js.map +0 -7
- package/dist/esm/biz-components/IPRedirect/utils.d.ts +0 -222
- package/dist/esm/biz-components/IPRedirect/utils.js +0 -2
- package/dist/esm/biz-components/IPRedirect/utils.js.map +0 -7
- package/dist/esm/biz-components/ImageOverlayShelf/index.d.ts +0 -114
- package/dist/esm/biz-components/ImageOverlayShelf/index.js +0 -2
- package/dist/esm/biz-components/ImageOverlayShelf/index.js.map +0 -7
- package/dist/esm/biz-components/Media/index.d.ts +0 -32
- package/dist/esm/biz-components/Media/index.js +0 -2
- package/dist/esm/biz-components/Media/index.js.map +0 -7
- package/dist/esm/biz-components/MediaShelf/index.d.ts +0 -231
- package/dist/esm/biz-components/MediaShelf/index.js +0 -2
- package/dist/esm/biz-components/MediaShelf/index.js.map +0 -7
- package/dist/esm/biz-components/MediaShelf/types.d.ts +0 -37
- package/dist/esm/biz-components/MediaShelf/types.js +0 -2
- package/dist/esm/biz-components/MediaShelf/types.js.map +0 -7
- package/dist/esm/biz-components/MiniCart/index.d.ts +0 -88
- package/dist/esm/biz-components/MiniCart/index.js +0 -2
- package/dist/esm/biz-components/MiniCart/index.js.map +0 -7
- package/dist/esm/biz-components/PromotionalBar/index.d.ts +0 -49
- package/dist/esm/biz-components/PromotionalBar/index.js +0 -2
- package/dist/esm/biz-components/PromotionalBar/index.js.map +0 -7
- package/dist/esm/biz-components/SecondaryBanner/index.d.ts +0 -69
- package/dist/esm/biz-components/SecondaryBanner/index.js +0 -2
- package/dist/esm/biz-components/SecondaryBanner/index.js.map +0 -7
- package/dist/esm/biz-components/Title/Countdown.d.ts +0 -14
- package/dist/esm/biz-components/Title/Countdown.js +0 -2
- package/dist/esm/biz-components/Title/Countdown.js.map +0 -7
- package/dist/esm/biz-components/WheelLottery/BaseModal.d.ts +0 -55
- package/dist/esm/biz-components/WheelLottery/BaseModal.js +0 -12
- package/dist/esm/biz-components/WheelLottery/BaseModal.js.map +0 -7
- package/dist/esm/biz-components/WheelLottery/ChanceMethods.d.ts +0 -30
- package/dist/esm/biz-components/WheelLottery/ChanceMethods.js +0 -2
- package/dist/esm/biz-components/WheelLottery/ChanceMethods.js.map +0 -7
- package/dist/esm/biz-components/WheelLottery/ErrorModal.d.ts +0 -42
- package/dist/esm/biz-components/WheelLottery/ErrorModal.js +0 -2
- package/dist/esm/biz-components/WheelLottery/ErrorModal.js.map +0 -7
- package/dist/esm/biz-components/WheelLottery/MyRewardsModal.d.ts +0 -91
- package/dist/esm/biz-components/WheelLottery/MyRewardsModal.js +0 -2
- package/dist/esm/biz-components/WheelLottery/MyRewardsModal.js.map +0 -7
- package/dist/esm/biz-components/WheelLottery/PrizePool.d.ts +0 -26
- package/dist/esm/biz-components/WheelLottery/PrizePool.js +0 -2
- package/dist/esm/biz-components/WheelLottery/PrizePool.js.map +0 -7
- package/dist/esm/biz-components/WheelLottery/RulesModal.d.ts +0 -47
- package/dist/esm/biz-components/WheelLottery/RulesModal.js +0 -2
- package/dist/esm/biz-components/WheelLottery/RulesModal.js.map +0 -7
- package/dist/esm/biz-components/WheelLottery/ShareModal.d.ts +0 -74
- package/dist/esm/biz-components/WheelLottery/ShareModal.js +0 -2
- package/dist/esm/biz-components/WheelLottery/ShareModal.js.map +0 -7
- package/dist/esm/biz-components/WheelLottery/Wheel.d.ts +0 -27
- package/dist/esm/biz-components/WheelLottery/Wheel.js +0 -2
- package/dist/esm/biz-components/WheelLottery/Wheel.js.map +0 -7
- package/dist/esm/biz-components/WheelLottery/WinnerModal.d.ts +0 -25
- package/dist/esm/biz-components/WheelLottery/WinnerModal.js +0 -2
- package/dist/esm/biz-components/WheelLottery/WinnerModal.js.map +0 -7
- package/dist/esm/biz-components/WheelLottery/index.d.ts +0 -52
- package/dist/esm/biz-components/WheelLottery/index.js +0 -2
- package/dist/esm/biz-components/WheelLottery/index.js.map +0 -7
- package/dist/esm/biz-components/WheelLottery/types.d.ts +0 -1219
- package/dist/esm/biz-components/WheelLottery/types.js +0 -2
- package/dist/esm/biz-components/WheelLottery/types.js.map +0 -7
- package/dist/esm/components/paginator.d.ts +0 -12
- package/dist/esm/components/paginator.js +0 -7
- package/dist/esm/components/paginator.js.map +0 -7
- package/dist/esm/components/progress.d.ts +0 -46
- package/dist/esm/components/progress.js +0 -2
- package/dist/esm/components/progress.js.map +0 -7
- package/dist/esm/helpers/priceFormatting.d.ts +0 -11
- package/dist/esm/helpers/priceFormatting.js +0 -2
- package/dist/esm/helpers/priceFormatting.js.map +0 -7
- package/dist/esm/hooks/index.d.ts +0 -2
- package/dist/esm/hooks/index.js +0 -2
- package/dist/esm/hooks/index.js.map +0 -7
- package/dist/esm/hooks/useCoupon.d.ts +0 -111
- package/dist/esm/hooks/useCoupon.js +0 -2
- package/dist/esm/hooks/useCoupon.js.map +0 -7
- package/dist/esm/hooks/useMemberPrice.d.ts +0 -155
- package/dist/esm/hooks/useMemberPrice.js +0 -2
- package/dist/esm/hooks/useMemberPrice.js.map +0 -7
|
@@ -1,193 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { type ProductCardData, type FreeGift } from './ProductCard.js';
|
|
3
|
-
/**
|
|
4
|
-
* 产品标签接口
|
|
5
|
-
*/
|
|
6
|
-
export interface ProductTag {
|
|
7
|
-
/** 标签文本 */
|
|
8
|
-
text: string;
|
|
9
|
-
/** 标签类型 */
|
|
10
|
-
type: 'discount' | 'new' | 'default';
|
|
11
|
-
/** 标签样式变体 */
|
|
12
|
-
variant: 'filled' | 'outlined';
|
|
13
|
-
}
|
|
14
|
-
export type BuyOneGetOneShelfSemanticName = 'root' | 'title' | 'description' | 'content' | 'productCard' | 'productCardImage' | 'productCardTitle' | 'productCardDescription' | 'productCardPrice' | 'productCardGiftsContainer' | 'productCardBtnGroup';
|
|
15
|
-
/**
|
|
16
|
-
* 响应式图片接口
|
|
17
|
-
*/
|
|
18
|
-
export interface ResponsiveImage {
|
|
19
|
-
id: number;
|
|
20
|
-
baseUrl: string;
|
|
21
|
-
url: string;
|
|
22
|
-
thumbnailURL: string;
|
|
23
|
-
filename: string;
|
|
24
|
-
mimeType: string;
|
|
25
|
-
width: number;
|
|
26
|
-
height: number;
|
|
27
|
-
}
|
|
28
|
-
/**
|
|
29
|
-
* 响应式图片集合接口
|
|
30
|
-
*/
|
|
31
|
-
export interface ResponsiveImages {
|
|
32
|
-
laptop?: ResponsiveImage;
|
|
33
|
-
mobile?: ResponsiveImage;
|
|
34
|
-
tablet?: ResponsiveImage;
|
|
35
|
-
desktop?: ResponsiveImage;
|
|
36
|
-
lgDesktop?: ResponsiveImage;
|
|
37
|
-
}
|
|
38
|
-
/**
|
|
39
|
-
* 产品基础数据接口
|
|
40
|
-
*/
|
|
41
|
-
export interface ProductData {
|
|
42
|
-
sku: string;
|
|
43
|
-
name: string;
|
|
44
|
-
image: string;
|
|
45
|
-
value: string;
|
|
46
|
-
handle: string;
|
|
47
|
-
shopify_id: string;
|
|
48
|
-
}
|
|
49
|
-
/**
|
|
50
|
-
* 文案配置接口
|
|
51
|
-
*/
|
|
52
|
-
export interface CopyConfig {
|
|
53
|
-
shopNowText: string;
|
|
54
|
-
freeGiftLabel: string;
|
|
55
|
-
learnMoreText: string;
|
|
56
|
-
freeGiftHeading: string;
|
|
57
|
-
}
|
|
58
|
-
/**
|
|
59
|
-
* 买赠项目接口
|
|
60
|
-
*/
|
|
61
|
-
export interface BogoItem {
|
|
62
|
-
id: string;
|
|
63
|
-
data: ProductData[];
|
|
64
|
-
images: ResponsiveImages;
|
|
65
|
-
shopNowFun: string;
|
|
66
|
-
shopNowText: string;
|
|
67
|
-
learnMoreText: string;
|
|
68
|
-
}
|
|
69
|
-
/**
|
|
70
|
-
* 赠品变体接口
|
|
71
|
-
*/
|
|
72
|
-
export interface RewardVariant {
|
|
73
|
-
variant_id: string;
|
|
74
|
-
sku: string;
|
|
75
|
-
handle: string;
|
|
76
|
-
}
|
|
77
|
-
/**
|
|
78
|
-
* 赠品奖励接口
|
|
79
|
-
*/
|
|
80
|
-
export interface RewardItem {
|
|
81
|
-
get_unit: number;
|
|
82
|
-
variant_list: RewardVariant[];
|
|
83
|
-
}
|
|
84
|
-
/**
|
|
85
|
-
* 免费赠品对象接口
|
|
86
|
-
*/
|
|
87
|
-
export interface FuncFreeGiftObj {
|
|
88
|
-
rule_id: number;
|
|
89
|
-
rule_type: number;
|
|
90
|
-
discount_label: {
|
|
91
|
-
cart_checkout_label: string;
|
|
92
|
-
product_label: string;
|
|
93
|
-
sold_out_label: string;
|
|
94
|
-
};
|
|
95
|
-
frontend_labels?: any[];
|
|
96
|
-
apply_unit: number;
|
|
97
|
-
discount_combinations: {
|
|
98
|
-
other_order_discounts: boolean;
|
|
99
|
-
other_product_discounts: boolean;
|
|
100
|
-
shipping_discounts: boolean;
|
|
101
|
-
};
|
|
102
|
-
gift_type: number;
|
|
103
|
-
reward_list: RewardItem[];
|
|
104
|
-
}
|
|
105
|
-
/**
|
|
106
|
-
* 产品变体接口 (BuildData)
|
|
107
|
-
*/
|
|
108
|
-
export interface BuildProductVariant {
|
|
109
|
-
sku: string;
|
|
110
|
-
price: number;
|
|
111
|
-
availableForSale: boolean;
|
|
112
|
-
metafields: {
|
|
113
|
-
coupons?: any[];
|
|
114
|
-
infos?: any;
|
|
115
|
-
funcFreeGiftObj?: FuncFreeGiftObj;
|
|
116
|
-
};
|
|
117
|
-
id: string;
|
|
118
|
-
name: string;
|
|
119
|
-
image?: {
|
|
120
|
-
url: string;
|
|
121
|
-
altText?: string;
|
|
122
|
-
};
|
|
123
|
-
quantityAvailable?: number;
|
|
124
|
-
}
|
|
125
|
-
/**
|
|
126
|
-
* 构建产品接口 (BuildData)
|
|
127
|
-
*/
|
|
128
|
-
export interface BuildProduct {
|
|
129
|
-
handle: string;
|
|
130
|
-
variants: BuildProductVariant[];
|
|
131
|
-
id: string;
|
|
132
|
-
name: string;
|
|
133
|
-
title: string;
|
|
134
|
-
description: string;
|
|
135
|
-
totalInventory?: number;
|
|
136
|
-
tags?: string[];
|
|
137
|
-
price: {
|
|
138
|
-
value: number;
|
|
139
|
-
currencyCode: string;
|
|
140
|
-
};
|
|
141
|
-
images: {
|
|
142
|
-
url: string;
|
|
143
|
-
altText?: string;
|
|
144
|
-
}[];
|
|
145
|
-
}
|
|
146
|
-
/**
|
|
147
|
-
* BuildData 类型定义
|
|
148
|
-
*/
|
|
149
|
-
export type BuildData = BuildProduct[];
|
|
150
|
-
/**
|
|
151
|
-
* BuyOneGetOneShelf 业务组件数据接口 - 新格式
|
|
152
|
-
*/
|
|
153
|
-
export interface BuyOneGetOneShelfData {
|
|
154
|
-
id: string;
|
|
155
|
-
copy: CopyConfig;
|
|
156
|
-
theme: string;
|
|
157
|
-
title: string;
|
|
158
|
-
display: string;
|
|
159
|
-
subtitle: string;
|
|
160
|
-
blockName: string;
|
|
161
|
-
blockType: string;
|
|
162
|
-
bogoItems: BogoItem[];
|
|
163
|
-
}
|
|
164
|
-
export interface BuyOneGetOneShelfProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
165
|
-
/** 业务数据 */
|
|
166
|
-
data: BuyOneGetOneShelfData;
|
|
167
|
-
/** 构建时数据 - 产品详细信息,包含赠品数据 */
|
|
168
|
-
buildData?: BuildData;
|
|
169
|
-
/** 礼品数据源,用于匹配实际的价格、图片、标题 */
|
|
170
|
-
giftData?: any;
|
|
171
|
-
/** 布局模式:一排一个或一排两个 */
|
|
172
|
-
layout?: 'single' | 'double';
|
|
173
|
-
/** 产品卡片点击事件 */
|
|
174
|
-
onProductClick?: (product: ProductCardData, bogoItem?: BogoItem) => void;
|
|
175
|
-
/** 产品图片点击事件 */
|
|
176
|
-
onProductImageClick?: (product: ProductCardData, bogoItem?: BogoItem) => void;
|
|
177
|
-
/** Learn More按钮点击事件 */
|
|
178
|
-
onLearnMore?: (product: ProductCardData, bogoItem?: BogoItem) => void;
|
|
179
|
-
/** Shop Now按钮点击事件 */
|
|
180
|
-
onShopNow?: (product: ProductCardData, bogoItem?: BogoItem) => void;
|
|
181
|
-
/** 赠品点击事件 */
|
|
182
|
-
onGiftClick?: (gift: FreeGift, product: ProductCardData) => void;
|
|
183
|
-
/** 赠品选择变化事件 */
|
|
184
|
-
onGiftSelectionChange?: (selectedGifts: FreeGift[], product: ProductCardData) => void;
|
|
185
|
-
classNames?: Partial<Record<BuyOneGetOneShelfSemanticName, string>>;
|
|
186
|
-
}
|
|
187
|
-
/**
|
|
188
|
-
* BuyOneGetOneShelf - (WIP)买赠货架
|
|
189
|
-
*
|
|
190
|
-
* @description 这是一个买主商品赠送赠品的活动组件,展示产品卡片,支持一排一个或一排两个的布局
|
|
191
|
-
*/
|
|
192
|
-
declare const BuyOneGetOneShelf: React.ForwardRefExoticComponent<BuyOneGetOneShelfProps & React.RefAttributes<HTMLDivElement>>;
|
|
193
|
-
export default BuyOneGetOneShelf;
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use client";import{jsx as a,jsxs as w}from"react/jsx-runtime";import*as n from"react";import{cn as i}from"../../helpers/index.js";import O from"./ProductCard.js";import{useBogoDataTransform as R}from"./hooks/useBogoDataTransform.js";const f=n.forwardRef(({className:b,classNames:s={},data:t,buildData:y,giftData:C,layout:l="single",onProductClick:u,onProductImageClick:c,onLearnMore:d,onShopNow:g,onGiftClick:h,onGiftSelectionChange:I,...v},P)=>{const x=R(t.bogoItems,t.copy,y),D=n.useCallback((r,e)=>{u?.(r,t.bogoItems[e])},[u,t]),G=n.useCallback((r,e)=>{c?.(r,t.bogoItems[e])},[c,t]),B=n.useCallback((r,e)=>{d?.(r,t.bogoItems[e])},[d,t]),_=n.useCallback((r,e)=>{g?.(r,t.bogoItems[e])},[g,t]),p=t.title,m=t.subtitle;return w("div",{ref:P,className:i("w-full px-32 py-0",b,s?.root),...v,children:[p&&a("h2",{className:i("mb-4 text-2xl font-bold",s?.title),children:p}),m&&a("p",{className:i("mb-6 text-gray-600",s?.description),children:m}),a("div",{className:i("flex flex-wrap",l==="single"?"flex-col gap-6":"flex-row gap-6"),children:x.map((r,e)=>{const k=t.bogoItems[e]?.id||e;return a(O,{data:r,giftData:C,layout:l,onProductClick:o=>D(o,e),onProductImageClick:o=>G(o,e),onLearnMore:o=>B(o,e),onShopNow:o=>_(o,e),onGiftClick:h,onGiftSelectionChange:I},k)})})]})});f.displayName="BuyOneGetOneShelf";var F=f;export{F as default};
|
|
2
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../../src/biz-components/BuyOneGetOneShelf/index.tsx"],
|
|
4
|
-
"sourcesContent": ["'use client'\n\nimport * as React from 'react'\nimport { cn } from '../../helpers/index.js'\nimport ProductCard, { type ProductCardData, type FreeGift } from './ProductCard.js'\nimport { useBogoDataTransform } from './hooks/useBogoDataTransform.js'\n\n/**\n * \u4EA7\u54C1\u6807\u7B7E\u63A5\u53E3\n */\nexport interface ProductTag {\n /** \u6807\u7B7E\u6587\u672C */\n text: string\n /** \u6807\u7B7E\u7C7B\u578B */\n type: 'discount' | 'new' | 'default'\n /** \u6807\u7B7E\u6837\u5F0F\u53D8\u4F53 */\n variant: 'filled' | 'outlined'\n}\n\nexport type BuyOneGetOneShelfSemanticName =\n | 'root'\n | 'title'\n | 'description'\n | 'content'\n | 'productCard'\n | 'productCardImage'\n | 'productCardTitle'\n | 'productCardDescription'\n | 'productCardPrice'\n | 'productCardGiftsContainer'\n | 'productCardBtnGroup'\n\n/**\n * \u54CD\u5E94\u5F0F\u56FE\u7247\u63A5\u53E3\n */\nexport interface ResponsiveImage {\n id: number\n baseUrl: string\n url: string\n thumbnailURL: string\n filename: string\n mimeType: string\n width: number\n height: number\n}\n\n/**\n * \u54CD\u5E94\u5F0F\u56FE\u7247\u96C6\u5408\u63A5\u53E3\n */\nexport interface ResponsiveImages {\n laptop?: ResponsiveImage\n mobile?: ResponsiveImage\n tablet?: ResponsiveImage\n desktop?: ResponsiveImage\n lgDesktop?: ResponsiveImage\n}\n\n/**\n * \u4EA7\u54C1\u57FA\u7840\u6570\u636E\u63A5\u53E3\n */\nexport interface ProductData {\n sku: string\n name: string\n image: string\n value: string\n handle: string\n shopify_id: string\n}\n\n/**\n * \u6587\u6848\u914D\u7F6E\u63A5\u53E3\n */\nexport interface CopyConfig {\n shopNowText: string\n freeGiftLabel: string\n learnMoreText: string\n freeGiftHeading: string\n}\n\n/**\n * \u4E70\u8D60\u9879\u76EE\u63A5\u53E3\n */\nexport interface BogoItem {\n id: string\n data: ProductData[]\n images: ResponsiveImages\n shopNowFun: string\n shopNowText: string\n learnMoreText: string\n}\n\n/**\n * \u8D60\u54C1\u53D8\u4F53\u63A5\u53E3\n */\nexport interface RewardVariant {\n variant_id: string\n sku: string\n handle: string\n}\n\n/**\n * \u8D60\u54C1\u5956\u52B1\u63A5\u53E3\n */\nexport interface RewardItem {\n get_unit: number\n variant_list: RewardVariant[]\n}\n\n/**\n * \u514D\u8D39\u8D60\u54C1\u5BF9\u8C61\u63A5\u53E3\n */\nexport interface FuncFreeGiftObj {\n rule_id: number\n rule_type: number\n discount_label: {\n cart_checkout_label: string\n product_label: string\n sold_out_label: string\n }\n frontend_labels?: any[]\n apply_unit: number\n discount_combinations: {\n other_order_discounts: boolean\n other_product_discounts: boolean\n shipping_discounts: boolean\n }\n gift_type: number\n reward_list: RewardItem[]\n}\n\n/**\n * \u4EA7\u54C1\u53D8\u4F53\u63A5\u53E3 (BuildData)\n */\nexport interface BuildProductVariant {\n sku: string\n price: number\n availableForSale: boolean\n metafields: {\n coupons?: any[]\n infos?: any\n funcFreeGiftObj?: FuncFreeGiftObj\n }\n id: string\n name: string\n image?: {\n url: string\n altText?: string\n }\n quantityAvailable?: number\n}\n\n/**\n * \u6784\u5EFA\u4EA7\u54C1\u63A5\u53E3 (BuildData)\n */\nexport interface BuildProduct {\n handle: string\n variants: BuildProductVariant[]\n id: string\n name: string\n title: string\n description: string\n totalInventory?: number\n tags?: string[]\n price: {\n value: number\n currencyCode: string\n }\n images: {\n url: string\n altText?: string\n }[]\n}\n\n/**\n * BuildData \u7C7B\u578B\u5B9A\u4E49\n */\nexport type BuildData = BuildProduct[]\n\n/**\n * BuyOneGetOneShelf \u4E1A\u52A1\u7EC4\u4EF6\u6570\u636E\u63A5\u53E3 - \u65B0\u683C\u5F0F\n */\nexport interface BuyOneGetOneShelfData {\n id: string\n copy: CopyConfig\n theme: string\n title: string\n display: string\n subtitle: string\n blockName: string\n blockType: string\n bogoItems: BogoItem[]\n}\n\nexport interface BuyOneGetOneShelfProps extends React.HTMLAttributes<HTMLDivElement> {\n /** \u4E1A\u52A1\u6570\u636E */\n data: BuyOneGetOneShelfData\n /** \u6784\u5EFA\u65F6\u6570\u636E - \u4EA7\u54C1\u8BE6\u7EC6\u4FE1\u606F\uFF0C\u5305\u542B\u8D60\u54C1\u6570\u636E */\n buildData?: BuildData\n /** \u793C\u54C1\u6570\u636E\u6E90\uFF0C\u7528\u4E8E\u5339\u914D\u5B9E\u9645\u7684\u4EF7\u683C\u3001\u56FE\u7247\u3001\u6807\u9898 */\n giftData?: any\n /** \u5E03\u5C40\u6A21\u5F0F\uFF1A\u4E00\u6392\u4E00\u4E2A\u6216\u4E00\u6392\u4E24\u4E2A */\n layout?: 'single' | 'double'\n /** \u4EA7\u54C1\u5361\u7247\u70B9\u51FB\u4E8B\u4EF6 */\n onProductClick?: (product: ProductCardData, bogoItem?: BogoItem) => void\n /** \u4EA7\u54C1\u56FE\u7247\u70B9\u51FB\u4E8B\u4EF6 */\n onProductImageClick?: (product: ProductCardData, bogoItem?: BogoItem) => void\n /** Learn More\u6309\u94AE\u70B9\u51FB\u4E8B\u4EF6 */\n onLearnMore?: (product: ProductCardData, bogoItem?: BogoItem) => void\n /** Shop Now\u6309\u94AE\u70B9\u51FB\u4E8B\u4EF6 */\n onShopNow?: (product: ProductCardData, bogoItem?: BogoItem) => void\n /** \u8D60\u54C1\u70B9\u51FB\u4E8B\u4EF6 */\n onGiftClick?: (gift: FreeGift, product: ProductCardData) => void\n /** \u8D60\u54C1\u9009\u62E9\u53D8\u5316\u4E8B\u4EF6 */\n onGiftSelectionChange?: (selectedGifts: FreeGift[], product: ProductCardData) => void\n classNames?: Partial<Record<BuyOneGetOneShelfSemanticName, string>>\n}\n\n// \u65E7\u7684\u8F6C\u6362\u51FD\u6570\u5DF2\u79FB\u81F3 hooks/useBogoDataTransform.ts \u4E2D\n// \u8FD9\u91CC\u5220\u9664\u4E86\uFF1A\n// - getResponsiveImageUrl\n// - findProductBySku\n// - getGiftProductsBySku\n// - extractFreeGifts\n// - transformBogoItemToProductCard\n\n/**\n * BuyOneGetOneShelf - (WIP)\u4E70\u8D60\u8D27\u67B6\n *\n * @description \u8FD9\u662F\u4E00\u4E2A\u4E70\u4E3B\u5546\u54C1\u8D60\u9001\u8D60\u54C1\u7684\u6D3B\u52A8\u7EC4\u4EF6\uFF0C\u5C55\u793A\u4EA7\u54C1\u5361\u7247\uFF0C\u652F\u6301\u4E00\u6392\u4E00\u4E2A\u6216\u4E00\u6392\u4E24\u4E2A\u7684\u5E03\u5C40\n */\nconst BuyOneGetOneShelf = React.forwardRef<HTMLDivElement, BuyOneGetOneShelfProps>(\n (\n {\n className,\n classNames = {},\n data,\n buildData,\n giftData,\n layout = 'single',\n onProductClick,\n onProductImageClick,\n onLearnMore,\n onShopNow,\n onGiftClick,\n onGiftSelectionChange,\n ...props\n },\n ref\n ) => {\n // \u4F7F\u7528 Hook \u5C06 bogoItems \u8F6C\u6362\u4E3A ProductCardData \u683C\u5F0F\n const products = useBogoDataTransform(data.bogoItems, data.copy, buildData)\n\n // \u5904\u7406\u4E8B\u4EF6\n const handleProductClick = React.useCallback(\n (product: ProductCardData, index: number) => {\n onProductClick?.(product, data.bogoItems[index])\n },\n [onProductClick, data]\n )\n\n const handleProductImageClick = React.useCallback(\n (product: ProductCardData, index: number) => {\n onProductImageClick?.(product, data.bogoItems[index])\n },\n [onProductImageClick, data]\n )\n\n const handleLearnMore = React.useCallback(\n (product: ProductCardData, index: number) => {\n onLearnMore?.(product, data.bogoItems[index])\n },\n [onLearnMore, data]\n )\n\n const handleShopNow = React.useCallback(\n (product: ProductCardData, index: number) => {\n onShopNow?.(product, data.bogoItems[index])\n },\n [onShopNow, data]\n )\n\n // \u83B7\u53D6\u6807\u9898\u548C\u63CF\u8FF0\n const title = data.title\n const description = data.subtitle\n\n return (\n <div ref={ref} className={cn('w-full px-32 py-0', className, classNames?.root)} {...props}>\n {title && <h2 className={cn('mb-4 text-2xl font-bold', classNames?.title)}>{title}</h2>}\n {description && <p className={cn('mb-6 text-gray-600', classNames?.description)}>{description}</p>}\n\n {/* \u4E70\u8D60\u8D27\u67B6\u4EA7\u54C1\u533A\u57DF */}\n <div className={cn('flex flex-wrap', layout === 'single' ? 'flex-col gap-6' : 'flex-row gap-6')}>\n {products.map((product, index) => {\n const key = data.bogoItems[index]?.id || index\n return (\n <ProductCard\n key={key}\n data={product}\n giftData={giftData}\n layout={layout}\n onProductClick={productData => handleProductClick(productData, index)}\n onProductImageClick={productData => handleProductImageClick(productData, index)}\n onLearnMore={productData => handleLearnMore(productData, index)}\n onShopNow={productData => handleShopNow(productData, index)}\n onGiftClick={onGiftClick}\n onGiftSelectionChange={onGiftSelectionChange}\n />\n )\n })}\n </div>\n </div>\n )\n }\n)\n\nBuyOneGetOneShelf.displayName = 'BuyOneGetOneShelf'\n\nexport default BuyOneGetOneShelf\n"],
|
|
5
|
-
"mappings": "aA8RM,OACY,OAAAA,EADZ,QAAAC,MAAA,oBA5RN,UAAYC,MAAW,QACvB,OAAS,MAAAC,MAAU,yBACnB,OAAOC,MAA0D,mBACjE,OAAS,wBAAAC,MAA4B,kCAiOrC,MAAMC,EAAoBJ,EAAM,WAC9B,CACE,CACE,UAAAK,EACA,WAAAC,EAAa,CAAC,EACd,KAAAC,EACA,UAAAC,EACA,SAAAC,EACA,OAAAC,EAAS,SACT,eAAAC,EACA,oBAAAC,EACA,YAAAC,EACA,UAAAC,EACA,YAAAC,EACA,sBAAAC,EACA,GAAGC,CACL,EACAC,IACG,CAEH,MAAMC,EAAWhB,EAAqBI,EAAK,UAAWA,EAAK,KAAMC,CAAS,EAGpEY,EAAqBpB,EAAM,YAC/B,CAACqB,EAA0BC,IAAkB,CAC3CX,IAAiBU,EAASd,EAAK,UAAUe,CAAK,CAAC,CACjD,EACA,CAACX,EAAgBJ,CAAI,CACvB,EAEMgB,EAA0BvB,EAAM,YACpC,CAACqB,EAA0BC,IAAkB,CAC3CV,IAAsBS,EAASd,EAAK,UAAUe,CAAK,CAAC,CACtD,EACA,CAACV,EAAqBL,CAAI,CAC5B,EAEMiB,EAAkBxB,EAAM,YAC5B,CAACqB,EAA0BC,IAAkB,CAC3CT,IAAcQ,EAASd,EAAK,UAAUe,CAAK,CAAC,CAC9C,EACA,CAACT,EAAaN,CAAI,CACpB,EAEMkB,EAAgBzB,EAAM,YAC1B,CAACqB,EAA0BC,IAAkB,CAC3CR,IAAYO,EAASd,EAAK,UAAUe,CAAK,CAAC,CAC5C,EACA,CAACR,EAAWP,CAAI,CAClB,EAGMmB,EAAQnB,EAAK,MACboB,EAAcpB,EAAK,SAEzB,OACER,EAAC,OAAI,IAAKmB,EAAK,UAAWjB,EAAG,oBAAqBI,EAAWC,GAAY,IAAI,EAAI,GAAGW,EACjF,UAAAS,GAAS5B,EAAC,MAAG,UAAWG,EAAG,0BAA2BK,GAAY,KAAK,EAAI,SAAAoB,EAAM,EACjFC,GAAe7B,EAAC,KAAE,UAAWG,EAAG,qBAAsBK,GAAY,WAAW,EAAI,SAAAqB,EAAY,EAG9F7B,EAAC,OAAI,UAAWG,EAAG,iBAAkBS,IAAW,SAAW,iBAAmB,gBAAgB,EAC3F,SAAAS,EAAS,IAAI,CAACE,EAASC,IAAU,CAChC,MAAMM,EAAMrB,EAAK,UAAUe,CAAK,GAAG,IAAMA,EACzC,OACExB,EAACI,EAAA,CAEC,KAAMmB,EACN,SAAUZ,EACV,OAAQC,EACR,eAAgBmB,GAAeT,EAAmBS,EAAaP,CAAK,EACpE,oBAAqBO,GAAeN,EAAwBM,EAAaP,CAAK,EAC9E,YAAaO,GAAeL,EAAgBK,EAAaP,CAAK,EAC9D,UAAWO,GAAeJ,EAAcI,EAAaP,CAAK,EAC1D,YAAaP,EACb,sBAAuBC,GATlBY,CAUP,CAEJ,CAAC,EACH,GACF,CAEJ,CACF,EAEAxB,EAAkB,YAAc,oBAEhC,IAAO0B,EAAQ1B",
|
|
6
|
-
"names": ["jsx", "jsxs", "React", "cn", "ProductCard", "useBogoDataTransform", "BuyOneGetOneShelf", "className", "classNames", "data", "buildData", "giftData", "layout", "onProductClick", "onProductImageClick", "onLearnMore", "onShopNow", "onGiftClick", "onGiftSelectionChange", "props", "ref", "products", "handleProductClick", "product", "index", "handleProductImageClick", "handleLearnMore", "handleShopNow", "title", "description", "key", "productData", "BuyOneGetOneShelf_default"]
|
|
7
|
-
}
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import type { Media } from '../../types/props.js';
|
|
3
|
-
export type EventScheduleSemanticName = 'root' | 'timeline' | 'eventScheduleCard';
|
|
4
|
-
/**
|
|
5
|
-
* 状态化图标配置
|
|
6
|
-
*/
|
|
7
|
-
export interface StateIcon {
|
|
8
|
-
/** 激活状态的图标 */
|
|
9
|
-
active: Media;
|
|
10
|
-
/** 非激活状态的图标 */
|
|
11
|
-
inactive: Media;
|
|
12
|
-
}
|
|
13
|
-
/**
|
|
14
|
-
* 活动日程项数据接口
|
|
15
|
-
*/
|
|
16
|
-
export interface EventScheduleItem {
|
|
17
|
-
/** 标题 */
|
|
18
|
-
title: string;
|
|
19
|
-
/** 开始日期(ISO 8601 格式或任何 dayjs 支持的格式,如 '2024-12-01') */
|
|
20
|
-
startDate: string;
|
|
21
|
-
/** 结束日期(ISO 8601 格式或任何 dayjs 支持的格式,如 '2024-12-31') */
|
|
22
|
-
endDate: string;
|
|
23
|
-
/**
|
|
24
|
-
* 卡片背景图标配置,状态化图标(必须包含 active 和 inactive)
|
|
25
|
-
*
|
|
26
|
-
* @example
|
|
27
|
-
* icon: {
|
|
28
|
-
* active: { url: "https://example.com/active-icon.svg", alt: "Active Icon" },
|
|
29
|
-
* inactive: { url: "https://example.com/inactive-icon.svg", alt: "Inactive Icon" }
|
|
30
|
-
* }
|
|
31
|
-
*/
|
|
32
|
-
icon?: StateIcon;
|
|
33
|
-
/** 详细信息列表 */
|
|
34
|
-
items: {
|
|
35
|
-
/** 图标 (SVG 字符串或 URL) */
|
|
36
|
-
icon?: Media;
|
|
37
|
-
/** 文本内容 */
|
|
38
|
-
label: string;
|
|
39
|
-
}[];
|
|
40
|
-
}
|
|
41
|
-
/**
|
|
42
|
-
* EventSchedule 业务组件数据接口
|
|
43
|
-
*/
|
|
44
|
-
export interface EventScheduleData {
|
|
45
|
-
/** 日程列表 */
|
|
46
|
-
scheduleList: EventScheduleItem[];
|
|
47
|
-
/** 是否显示时间轴,默认为 true */
|
|
48
|
-
showTimeline?: boolean;
|
|
49
|
-
/** 主题模式 */
|
|
50
|
-
theme?: 'light' | 'dark';
|
|
51
|
-
}
|
|
52
|
-
export interface EventScheduleProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
53
|
-
/** 业务数据 */
|
|
54
|
-
data: EventScheduleData;
|
|
55
|
-
classNames?: Partial<Record<EventScheduleSemanticName, string>>;
|
|
56
|
-
}
|
|
57
|
-
/**
|
|
58
|
-
* EventSchedule - 活动日程组件
|
|
59
|
-
*
|
|
60
|
-
* @description 显示活动日程时间轴和活动卡片列表
|
|
61
|
-
*/
|
|
62
|
-
declare const EventSchedule: React.ForwardRefExoticComponent<EventScheduleProps & React.RefAttributes<HTMLDivElement>>;
|
|
63
|
-
export default EventSchedule;
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use client";import{jsx as i,jsxs as v}from"react/jsx-runtime";import*as o from"react";import{cn as d}from"../../helpers/index.js";import{Text as k,Picture as x,Heading as E}from"../../components/index.js";import{Swiper as N,SwiperSlide as P}from"swiper/react";import f from"dayjs";import{cva as m}from"class-variance-authority";const V=(t,e)=>{const r=f(),l=f(t).startOf("day"),a=f(e).endOf("day");return r.isAfter(l)&&r.isBefore(a)},w=t=>V(t.startDate,t.endDate),y=m("h-2 w-full overflow-hidden",{variants:{state:{"active-light":"bg-[#F6CD4E]","inactive-light":"bg-[#EAEAEC]","active-dark":"bg-[#D79941]","inactive-dark":"bg-[#75787F]"}},defaultVariants:{state:"inactive-light"}}),B=m("size-4 rounded-full transition-colors",{variants:{state:{"active-light":"bg-[#F6CD4E]","inactive-light":"bg-[#EAEAEC]","active-dark":"bg-[#D79941]","inactive-dark":"bg-[#75787F]"}},defaultVariants:{state:"inactive-light"}}),S=m("font-bold leading-[1.2]",{variants:{state:{"active-light":"text-[#080A0F]","inactive-light":"text-[#4A4C56]","active-dark":"text-white","inactive-dark":"text-[#8A8D92]"}},defaultVariants:{state:"inactive-light"}}),A=m("laptop:h-[160px] rounded-box relative flex h-[120px] min-w-0 flex-col justify-between gap-2 overflow-hidden",{variants:{state:{"active-light":"bg-[#F4E8BC]","inactive-light":"bg-[#EAEAEC]","active-dark":"bg-[#D79941]","inactive-dark":"bg-[#1E2024]"}},defaultVariants:{state:"inactive-light"}}),T=({active:t,theme:e="light",className:r,index:l,nodeLength:a})=>{const s=`${t?"active":"inactive"}-${e}`,n=l===0,p=l===a-1;return v("div",{className:"relative flex h-2 w-full items-center justify-center",children:[i("div",{className:d(y({state:s}),n&&"rounded-l-full",p&&"rounded-r-full",r)}),i("div",{className:"absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2",children:i("div",{className:B({state:s})})})]})},D=(t,e)=>{if(t)return e?t.active:t.inactive},I=({active:t,item:e,theme:r="light",className:l})=>{const a=o.useMemo(()=>D(e.icon,t),[e.icon,t]),s=`${t?"active":"inactive"}-${r}`;return v("div",{className:d(A({state:s}),l),children:[a&&i("div",{className:"laptop:w-[128px] desktop:w-[160px] absolute bottom-0 right-0 z-10 w-[120px]",children:i(x,{source:a.url,alt:a.alt,className:"aspect-square"})}),v("div",{className:"tablet:px-4 tablet:py-3 laptop:p-4 desktop:px-6 relative z-20 flex h-full flex-col justify-between px-6 py-4",children:[i(E,{html:e.title,className:d("desktop:text-[32px] laptop:text-[24px] line-clamp-1 text-[20px]",S({state:s}))}),i("div",{className:"flex flex-col gap-0.5",children:e.items.map((n,p)=>v("div",{className:"flex items-center gap-2",children:[n.icon&&i("div",{className:"desktop:size-6 size-5 shrink-0",children:i(x,{source:n.icon.url,alt:n.icon.alt,className:"size-full"})}),i(k,{html:n.label,className:d("lg-desktop:text-[18px] desktop:text-[16px] flex-1 text-[14px] leading-[1.4]",S({state:s}))})]},p))})]})]})},b=o.forwardRef(({classNames:t={},data:e},r)=>{const l=e.theme||"light",a=o.useRef(null),s=o.useMemo(()=>e?.scheduleList?.length||2,[e?.scheduleList]),n=o.useMemo(()=>e.scheduleList.findIndex(c=>w(c)),[e.scheduleList]),p=o.useMemo(()=>{switch(s){case 2:return{0:{slidesPerView:1.17,spaceBetween:12},768:{slidesPerView:2},1024:{spaceBetween:16},1440:{spaceBetween:16,slidesPerView:2}};case 3:return{0:{slidesPerView:1.17,spaceBetween:12},768:{slidesPerView:2.4},1024:{slidesPerView:s,spaceBetween:16},1440:{spaceBetween:16,slidesPerView:s}};case 4:return{0:{slidesPerView:1.17,spaceBetween:12},768:{slidesPerView:2.4},1024:{slidesPerView:3.2,spaceBetween:16},1440:{slidesPerView:s,spaceBetween:16}};default:return{0:{slidesPerView:1.17,spaceBetween:12},768:{slidesPerView:1,spaceBetween:12},1024:{slidesPerView:s,spaceBetween:16},1440:{slidesPerView:s,spaceBetween:16}}}},[s]),g=e.showTimeline!==!1;return o.useEffect(()=>{a.current&&n>=0&&setTimeout(()=>{a.current?.slideTo(n,500)},100)},[n]),v("div",{ref:r,className:d("tablet:px-8 laptop:px-16 desktop:px-16 lg-desktop:px-[calc(50%-832px)] flex w-full flex-col gap-4 overflow-hidden px-4",t?.root),children:[g&&i("div",{className:"flex h-4 items-center overflow-hidden",children:e.scheduleList.map((c,u)=>{const h=w(c);return i(T,{className:t?.timeline,active:h,theme:l,index:u,nodeLength:e.scheduleList.length},"timelineNode"+u)})}),i(N,{breakpoints:p,className:"w-full !overflow-visible",onSwiper:c=>{a.current=c},children:e.scheduleList.map((c,u)=>{const h=w(c);return i(P,{children:i(I,{active:h,className:d(g?"mt-4":"",t?.eventScheduleCard),item:c,theme:l})},"SwiperSlideItem"+u)})})]})});b.displayName="EventSchedule";var z=b;export{z as default};
|
|
2
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../../src/biz-components/EventSchedule/index.tsx"],
|
|
4
|
-
"sourcesContent": ["'use client'\n\nimport * as React from 'react'\nimport { cn } from '../../helpers/index.js'\nimport { Text, Picture, Heading } from '../../components/index.js'\nimport { Swiper, SwiperSlide } from 'swiper/react'\nimport type { Swiper as SwiperType } from 'swiper'\nimport dayjs from 'dayjs'\nimport { cva } from 'class-variance-authority'\nimport type { Media } from '../../types/props.js'\nexport type EventScheduleSemanticName = 'root' | 'timeline' | 'eventScheduleCard'\n\n/**\n * \u72B6\u6001\u5316\u56FE\u6807\u914D\u7F6E\n */\nexport interface StateIcon {\n /** \u6FC0\u6D3B\u72B6\u6001\u7684\u56FE\u6807 */\n active: Media\n /** \u975E\u6FC0\u6D3B\u72B6\u6001\u7684\u56FE\u6807 */\n inactive: Media\n}\n\n/**\n * \u6D3B\u52A8\u65E5\u7A0B\u9879\u6570\u636E\u63A5\u53E3\n */\nexport interface EventScheduleItem {\n /** \u6807\u9898 */\n title: string\n /** \u5F00\u59CB\u65E5\u671F\uFF08ISO 8601 \u683C\u5F0F\u6216\u4EFB\u4F55 dayjs \u652F\u6301\u7684\u683C\u5F0F\uFF0C\u5982 '2024-12-01'\uFF09 */\n startDate: string\n /** \u7ED3\u675F\u65E5\u671F\uFF08ISO 8601 \u683C\u5F0F\u6216\u4EFB\u4F55 dayjs \u652F\u6301\u7684\u683C\u5F0F\uFF0C\u5982 '2024-12-31'\uFF09 */\n endDate: string\n /**\n * \u5361\u7247\u80CC\u666F\u56FE\u6807\u914D\u7F6E\uFF0C\u72B6\u6001\u5316\u56FE\u6807\uFF08\u5FC5\u987B\u5305\u542B active \u548C inactive\uFF09\n *\n * @example\n * icon: {\n * active: { url: \"https://example.com/active-icon.svg\", alt: \"Active Icon\" },\n * inactive: { url: \"https://example.com/inactive-icon.svg\", alt: \"Inactive Icon\" }\n * }\n */\n icon?: StateIcon\n /** \u8BE6\u7EC6\u4FE1\u606F\u5217\u8868 */\n items: {\n /** \u56FE\u6807 (SVG \u5B57\u7B26\u4E32\u6216 URL) */\n icon?: Media\n /** \u6587\u672C\u5185\u5BB9 */\n label: string\n }[]\n}\n\n/**\n * EventSchedule \u4E1A\u52A1\u7EC4\u4EF6\u6570\u636E\u63A5\u53E3\n */\nexport interface EventScheduleData {\n /** \u65E5\u7A0B\u5217\u8868 */\n scheduleList: EventScheduleItem[]\n /** \u662F\u5426\u663E\u793A\u65F6\u95F4\u8F74\uFF0C\u9ED8\u8BA4\u4E3A true */\n showTimeline?: boolean\n /** \u4E3B\u9898\u6A21\u5F0F */\n theme?: 'light' | 'dark'\n}\n\nexport interface EventScheduleProps extends React.HTMLAttributes<HTMLDivElement> {\n /** \u4E1A\u52A1\u6570\u636E */\n data: EventScheduleData\n classNames?: Partial<Record<EventScheduleSemanticName, string>>\n}\n\n/**\n * \u5224\u65AD\u5F53\u524D\u65F6\u95F4\u662F\u5426\u5728\u6307\u5B9A\u7684\u65F6\u95F4\u533A\u95F4\u5185\n * @param startDate \u5F00\u59CB\u65E5\u671F\n * @param endDate \u7ED3\u675F\u65E5\u671F\n * @returns \u662F\u5426\u5728\u533A\u95F4\u5185\n */\nconst isInTimeRange = (startDate: string, endDate: string): boolean => {\n const now = dayjs()\n const start = dayjs(startDate).startOf('day')\n const end = dayjs(endDate).endOf('day')\n return now.isAfter(start) && now.isBefore(end)\n}\n\n/**\n * \u83B7\u53D6\u6D3B\u52A8\u9879\u7684\u6FC0\u6D3B\u72B6\u6001\n * @param item \u6D3B\u52A8\u9879\n * @returns \u662F\u5426\u6FC0\u6D3B\n */\nconst getItemActiveStatus = (item: EventScheduleItem): boolean => {\n // \u5426\u5219\u6839\u636E\u65F6\u95F4\u533A\u95F4\u81EA\u52A8\u5224\u65AD\n return isInTimeRange(item.startDate, item.endDate)\n}\n\n/**\n * \u65F6\u95F4\u8F74\u8FDB\u5EA6\u6761\u6FC0\u6D3B\u72B6\u6001\u6837\u5F0F\u53D8\u4F53\n */\nconst timelineProgressActiveVariants = cva('h-2 w-full overflow-hidden', {\n variants: {\n state: {\n 'active-light': 'bg-[#F6CD4E]',\n 'inactive-light': 'bg-[#EAEAEC]',\n 'active-dark': 'bg-[#D79941]',\n 'inactive-dark': 'bg-[#75787F]',\n },\n },\n defaultVariants: {\n state: 'inactive-light',\n },\n})\n\n/**\n * \u65F6\u95F4\u8F74\u8282\u70B9\u6FC0\u6D3B\u72B6\u6001\u6837\u5F0F\u53D8\u4F53\n */\nconst timelineNodeActiveVariants = cva('size-4 rounded-full transition-colors', {\n variants: {\n state: {\n 'active-light': 'bg-[#F6CD4E]',\n 'inactive-light': 'bg-[#EAEAEC]',\n 'active-dark': 'bg-[#D79941]',\n 'inactive-dark': 'bg-[#75787F]',\n },\n },\n defaultVariants: {\n state: 'inactive-light',\n },\n})\n\n/**\n * \u5361\u7247\u6587\u672C\u6837\u5F0F\u53D8\u4F53\n */\nconst cardTextVariants = cva('font-bold leading-[1.2]', {\n variants: {\n state: {\n 'active-light': 'text-[#080A0F]',\n 'inactive-light': 'text-[#4A4C56]',\n 'active-dark': 'text-white',\n 'inactive-dark': 'text-[#8A8D92]',\n },\n },\n defaultVariants: {\n state: 'inactive-light',\n },\n})\n\n/**\n * \u5361\u7247\u5BB9\u5668\u6837\u5F0F\u53D8\u4F53\n */\nconst eventScheduleCardVariants = cva(\n 'laptop:h-[160px] rounded-box relative flex h-[120px] min-w-0 flex-col justify-between gap-2 overflow-hidden',\n {\n variants: {\n state: {\n 'active-light': 'bg-[#F4E8BC]',\n 'inactive-light': 'bg-[#EAEAEC]',\n 'active-dark': 'bg-[#D79941]',\n 'inactive-dark': 'bg-[#1E2024]',\n },\n },\n defaultVariants: {\n state: 'inactive-light',\n },\n }\n)\n\n/**\n * \u65F6\u95F4\u8F74\u8282\u70B9\u7EC4\u4EF6 Props\n */\ninterface TimelineNodeProps {\n /** \u662F\u5426\u6FC0\u6D3B\u72B6\u6001 */\n active: boolean\n /** \u4E3B\u9898\u6A21\u5F0F */\n theme?: 'light' | 'dark'\n /** \u81EA\u5B9A\u4E49\u7C7B\u540D */\n className?: string\n /** \u5F53\u524D\u8282\u70B9\u7D22\u5F15 */\n index: number\n /** \u8282\u70B9\u603B\u6570 */\n nodeLength: number\n}\n\n/**\n * \u65F6\u95F4\u8F74\u8282\u70B9\u7EC4\u4EF6\n */\nconst TimelineNode = ({ active, theme = 'light', className, index, nodeLength }: TimelineNodeProps) => {\n // \u8BA1\u7B97\u7EC4\u5408\u72B6\u6001\n const state = `${active ? 'active' : 'inactive'}-${theme}` as\n | 'active-light'\n | 'inactive-light'\n | 'active-dark'\n | 'inactive-dark'\n\n // \u5224\u65AD\u9996\u5C3E\u4F4D\u7F6E\n const isFirst = index === 0\n const isLast = index === nodeLength - 1\n\n return (\n <div className=\"relative flex h-2 w-full items-center justify-center\">\n {/* \u8FDB\u5EA6\u6761\u80CC\u666F */}\n <div\n className={cn(\n timelineProgressActiveVariants({ state }),\n isFirst && 'rounded-l-full',\n isLast && 'rounded-r-full',\n className\n )}\n />\n {/* \u65F6\u95F4\u8282\u70B9\u5706\u70B9 */}\n <div className=\"absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2\">\n <div className={timelineNodeActiveVariants({ state })} />\n </div>\n </div>\n )\n}\n\n/**\n * \u6839\u636E\u6FC0\u6D3B\u72B6\u6001\u83B7\u53D6\u5BF9\u5E94\u7684\u56FE\u6807\n * @param icon \u72B6\u6001\u5316\u56FE\u6807\u914D\u7F6E\n * @param isActive \u662F\u5426\u6FC0\u6D3B\u72B6\u6001\n * @returns \u56FE\u6807 Media \u5BF9\u8C61\n */\nconst getIconByState = (icon: StateIcon | undefined, isActive: boolean): Media | undefined => {\n if (!icon) return undefined\n return isActive ? icon.active : icon.inactive\n}\n\n/**\n * \u6D3B\u52A8\u65E5\u7A0B\u5361\u7247\u7EC4\u4EF6\n */\nconst EventScheduleCard = ({\n active,\n item,\n theme = 'light',\n className,\n}: {\n active: boolean\n item: EventScheduleItem\n theme?: 'light' | 'dark'\n className?: string\n}) => {\n const currentIcon = React.useMemo(() => {\n return getIconByState(item.icon, active)\n }, [item.icon, active])\n\n // \u8BA1\u7B97\u7EC4\u5408\u72B6\u6001\n const cardState = `${active ? 'active' : 'inactive'}-${theme}` as\n | 'active-light'\n | 'inactive-light'\n | 'active-dark'\n | 'inactive-dark'\n\n return (\n <div className={cn(eventScheduleCardVariants({ state: cardState }), className)}>\n {/* \u80CC\u666F\u56FE\u6807 */}\n {currentIcon && (\n <div className=\"laptop:w-[128px] desktop:w-[160px] absolute bottom-0 right-0 z-10 w-[120px]\">\n <Picture source={currentIcon.url} alt={currentIcon.alt} className=\"aspect-square\" />\n </div>\n )}\n {/* \u5185\u5BB9\u533A\u57DF */}\n <div className=\"tablet:px-4 tablet:py-3 laptop:p-4 desktop:px-6 relative z-20 flex h-full flex-col justify-between px-6 py-4\">\n <Heading\n html={item.title}\n className={cn(\n 'desktop:text-[32px] laptop:text-[24px] line-clamp-1 text-[20px]',\n cardTextVariants({ state: cardState })\n )}\n />\n {/* \u8BE6\u7EC6\u4FE1\u606F\u5217\u8868 */}\n <div className=\"flex flex-col gap-0.5\">\n {item.items.map((detail, index) => (\n <div key={index} className=\"flex items-center gap-2\">\n {/* \u56FE\u6807 */}\n {detail.icon && (\n <div className=\"desktop:size-6 size-5 shrink-0\">\n <Picture source={detail.icon.url} alt={detail.icon.alt} className=\"size-full\" />\n </div>\n )}\n {/* \u6587\u672C */}\n <Text\n html={detail.label}\n className={cn(\n 'lg-desktop:text-[18px] desktop:text-[16px] flex-1 text-[14px] leading-[1.4]',\n cardTextVariants({ state: cardState })\n )}\n />\n </div>\n ))}\n </div>\n </div>\n </div>\n )\n}\n\n/**\n * EventSchedule - \u6D3B\u52A8\u65E5\u7A0B\u7EC4\u4EF6\n *\n * @description \u663E\u793A\u6D3B\u52A8\u65E5\u7A0B\u65F6\u95F4\u8F74\u548C\u6D3B\u52A8\u5361\u7247\u5217\u8868\n */\nconst EventSchedule = React.forwardRef<HTMLDivElement, EventScheduleProps>(({ classNames = {}, data }, ref) => {\n const theme = data.theme || 'light'\n const swiperRef = React.useRef<SwiperType | null>(null)\n const itemsPerRow = React.useMemo(() => {\n return data?.scheduleList?.length || 2\n }, [data?.scheduleList])\n\n // \u8BA1\u7B97 active item \u7684\u7D22\u5F15\n const activeIndex = React.useMemo(() => {\n return data.scheduleList.findIndex(item => getItemActiveStatus(item))\n }, [data.scheduleList])\n\n // \u6839\u636E itemsPerRow \u914D\u7F6E\u54CD\u5E94\u5F0F\u65AD\u70B9\n const swiperBreakpoints = React.useMemo(() => {\n switch (itemsPerRow) {\n case 2:\n return {\n 0: {\n slidesPerView: 1.17,\n spaceBetween: 12,\n },\n 768: {\n slidesPerView: 2,\n },\n 1024: {\n spaceBetween: 16,\n },\n 1440: {\n spaceBetween: 16,\n slidesPerView: 2,\n },\n }\n case 3:\n return {\n 0: {\n slidesPerView: 1.17,\n spaceBetween: 12,\n },\n 768: {\n slidesPerView: 2.4,\n },\n 1024: {\n slidesPerView: itemsPerRow,\n spaceBetween: 16,\n },\n 1440: {\n spaceBetween: 16,\n slidesPerView: itemsPerRow,\n },\n }\n case 4:\n return {\n 0: {\n slidesPerView: 1.17,\n spaceBetween: 12,\n },\n 768: {\n slidesPerView: 2.4,\n },\n 1024: {\n slidesPerView: 3.2,\n spaceBetween: 16,\n },\n 1440: {\n slidesPerView: itemsPerRow,\n spaceBetween: 16,\n },\n }\n default:\n return {\n 0: {\n slidesPerView: 1.17,\n spaceBetween: 12,\n },\n 768: {\n slidesPerView: 1,\n spaceBetween: 12,\n },\n 1024: {\n slidesPerView: itemsPerRow,\n spaceBetween: 16,\n },\n 1440: {\n slidesPerView: itemsPerRow,\n spaceBetween: 16,\n },\n }\n }\n }, [itemsPerRow])\n\n const showTimeline = data.showTimeline !== false // \u9ED8\u8BA4\u4E3A true\n\n // \u81EA\u52A8\u6EDA\u52A8\u5230 active item\n React.useEffect(() => {\n if (swiperRef.current && activeIndex >= 0) {\n // \u5EF6\u8FDF\u6267\u884C\uFF0C\u786E\u4FDD Swiper \u5DF2\u7ECF\u5B8C\u5168\u521D\u59CB\u5316\n setTimeout(() => {\n swiperRef.current?.slideTo(activeIndex, 500)\n }, 100)\n }\n }, [activeIndex])\n\n return (\n <div\n ref={ref}\n className={cn(\n 'tablet:px-8 laptop:px-16 desktop:px-16 lg-desktop:px-[calc(50%-832px)] flex w-full flex-col gap-4 overflow-hidden px-4',\n classNames?.root\n )}\n >\n {showTimeline && (\n <div className=\"flex h-4 items-center overflow-hidden\">\n {data.scheduleList.map((item, index) => {\n const isActive = getItemActiveStatus(item)\n return (\n <TimelineNode\n key={'timelineNode' + index}\n className={classNames?.timeline}\n active={isActive}\n theme={theme}\n index={index}\n nodeLength={data.scheduleList.length}\n />\n )\n })}\n </div>\n )}\n <Swiper\n breakpoints={swiperBreakpoints}\n className=\"w-full !overflow-visible\"\n onSwiper={swiper => {\n swiperRef.current = swiper\n }}\n >\n {data.scheduleList.map((item, index) => {\n const isActive = getItemActiveStatus(item)\n return (\n <SwiperSlide key={'SwiperSlideItem' + index}>\n <EventScheduleCard\n active={isActive}\n className={cn(showTimeline ? 'mt-4' : '', classNames?.eventScheduleCard)}\n item={item}\n theme={theme}\n />\n </SwiperSlide>\n )\n })}\n </Swiper>\n </div>\n )\n})\n\nEventSchedule.displayName = 'EventSchedule'\nexport default EventSchedule\n\n// \u5BFC\u51FA\u7C7B\u578B\u4F9B\u5916\u90E8\u4F7F\u7528\n// export type { StateIcon, EventScheduleItem, EventScheduleData, EventScheduleProps }\n"],
|
|
5
|
-
"mappings": "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",
|
|
6
|
-
"names": ["jsx", "jsxs", "React", "cn", "Text", "Picture", "Heading", "Swiper", "SwiperSlide", "dayjs", "cva", "isInTimeRange", "startDate", "endDate", "now", "start", "end", "getItemActiveStatus", "item", "timelineProgressActiveVariants", "timelineNodeActiveVariants", "cardTextVariants", "eventScheduleCardVariants", "TimelineNode", "active", "theme", "className", "index", "nodeLength", "state", "isFirst", "isLast", "getIconByState", "icon", "isActive", "EventScheduleCard", "currentIcon", "cardState", "detail", "EventSchedule", "classNames", "data", "ref", "swiperRef", "itemsPerRow", "activeIndex", "swiperBreakpoints", "showTimeline", "swiper", "EventSchedule_default"]
|
|
7
|
-
}
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import type { RegionConfig, IPRedirectBannerCopy } from './type.js';
|
|
2
|
-
/** 横幅样式配置 */
|
|
3
|
-
export type RegionBannerStyles = {
|
|
4
|
-
/** 背景色,默认 #fff */
|
|
5
|
-
backgroundColor?: string;
|
|
6
|
-
/** 按钮圆角,默认 9999px */
|
|
7
|
-
buttonBorderRadius?: string;
|
|
8
|
-
/** 文案字号,默认 14px */
|
|
9
|
-
fontSize?: string;
|
|
10
|
-
/** Stay Here 按钮背景色,默认 #000 */
|
|
11
|
-
stayButtonBgColor?: string;
|
|
12
|
-
/** Stay Here 按钮文字颜色,默认 #fff */
|
|
13
|
-
stayButtonTextColor?: string;
|
|
14
|
-
/** Switch Site 按钮边框颜色,默认 #000 */
|
|
15
|
-
switchButtonBorderColor?: string;
|
|
16
|
-
/** Switch Site 按钮文字颜色,默认 #000 */
|
|
17
|
-
switchButtonTextColor?: string;
|
|
18
|
-
};
|
|
19
|
-
export type RegionBannerProps = {
|
|
20
|
-
/** 控制横幅显示/隐藏 */
|
|
21
|
-
visible: boolean;
|
|
22
|
-
/** 横幅状态变化回调 */
|
|
23
|
-
onVisibleChange: (visible: boolean) => void;
|
|
24
|
-
/** 文案配置 */
|
|
25
|
-
copy: IPRedirectBannerCopy;
|
|
26
|
-
/** 点击 Stay Here 按钮的回调 */
|
|
27
|
-
onStayHere: () => void;
|
|
28
|
-
/** 点击 Switch Site 按钮的回调 */
|
|
29
|
-
onSwitchSite: () => void;
|
|
30
|
-
/** 样式配置 */
|
|
31
|
-
styles?: RegionBannerStyles;
|
|
32
|
-
/** 当前站点地区配置(用于显示国旗图标) */
|
|
33
|
-
currentRegion?: RegionConfig;
|
|
34
|
-
/** 自定义类名 */
|
|
35
|
-
className?: string;
|
|
36
|
-
};
|
|
37
|
-
export declare function RegionBanner({ visible, onVisibleChange, copy, onStayHere, onSwitchSite, styles: customStyles, currentRegion, className, }: RegionBannerProps): import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
"use client";import{Fragment as u,jsx as t,jsxs as o}from"react/jsx-runtime";const x={backgroundColor:"#fff",buttonBorderRadius:"9999px",fontSize:"14px",stayButtonBgColor:"#000",stayButtonTextColor:"#fff",switchButtonBorderColor:"#000",switchButtonTextColor:"#000"};function C({visible:s,onVisibleChange:r,copy:n,onStayHere:i,onSwitchSite:l,styles:d,currentRegion:a,className:g}){const e={...x,...d};if(!s)return null;const p=()=>{i(),r(!1)},c=()=>{i(),r(!1)};return o(u,{children:[t("style",{children:`
|
|
2
|
-
.region-banner-wrapper {
|
|
3
|
-
height: auto;
|
|
4
|
-
min-height: 74px;
|
|
5
|
-
}
|
|
6
|
-
@media (min-width: 1024px) {
|
|
7
|
-
.region-banner-wrapper {
|
|
8
|
-
height: 54px;
|
|
9
|
-
}
|
|
10
|
-
}
|
|
11
|
-
.region-banner-content {
|
|
12
|
-
padding: 0 12px;
|
|
13
|
-
flex-direction: column;
|
|
14
|
-
gap: 8px;
|
|
15
|
-
align-items: flex-start;
|
|
16
|
-
}
|
|
17
|
-
.region-banner-title-row {
|
|
18
|
-
display: flex;
|
|
19
|
-
align-items: center;
|
|
20
|
-
width: 100%;
|
|
21
|
-
gap: 8px;
|
|
22
|
-
height: 20px;
|
|
23
|
-
margin-top: 8px;
|
|
24
|
-
}
|
|
25
|
-
.region-banner-content h1 {
|
|
26
|
-
flex: 1;
|
|
27
|
-
min-width: 0;
|
|
28
|
-
}
|
|
29
|
-
.region-banner-close-btn {
|
|
30
|
-
position: static;
|
|
31
|
-
flex-shrink: 0;
|
|
32
|
-
}
|
|
33
|
-
@media (min-width: 1024px) {
|
|
34
|
-
.region-banner-content {
|
|
35
|
-
padding: 0 64px;
|
|
36
|
-
flex-direction: row;
|
|
37
|
-
align-items: center;
|
|
38
|
-
}
|
|
39
|
-
.region-banner-title-row {
|
|
40
|
-
flex: 1;
|
|
41
|
-
}
|
|
42
|
-
.region-banner-close-btn {
|
|
43
|
-
position: absolute;
|
|
44
|
-
right: 16px;
|
|
45
|
-
top: 50%;
|
|
46
|
-
transform: translateY(-50%);
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
@media (min-width: 1920px) {
|
|
50
|
-
.region-banner-content {
|
|
51
|
-
padding: 0 128px;
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
@media (min-width: 1025px) and (max-width: 1440px) {
|
|
55
|
-
.region-banner-title {
|
|
56
|
-
max-width: 623px;
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
`}),t("div",{className:`region-banner-wrapper relative left-0 top-0 w-full ${g||""}`,style:{backgroundColor:e.backgroundColor,boxShadow:"0 2px 8px rgba(0,0,0,0.1)",zIndex:1e3},children:o("div",{className:"region-banner-content flex h-full justify-between text-black",children:[o("div",{className:"region-banner-title-row",children:[t("h1",{className:"region-banner-title truncate font-bold",style:{fontSize:e.fontSize,color:"#1F2021"},children:n.message}),t("button",{onClick:c,className:"region-banner-close-btn inline-flex size-[28px] items-center justify-center rounded-full hover:bg-[#f5f5f5] focus:outline-none",style:{color:"#767880"},"aria-label":"Close",children:t("svg",{width:"20",height:"20",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:t("path",{d:"M13.5 4.5L4.5 13.5M4.5 4.5L13.5 13.5",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})})]}),o("div",{className:"ml-4 flex gap-3",children:[o("button",{onClick:p,className:"box-border flex h-[38px] items-center gap-1 whitespace-nowrap px-4 py-2 hover:opacity-80",style:{backgroundColor:e.stayButtonBgColor,color:e.stayButtonTextColor,fontWeight:"700",fontSize:e.fontSize,borderRadius:e.buttonBorderRadius,border:"none"},children:[a?.icon&&t("img",{src:a.icon,alt:"",style:{width:"16px",height:"16px",borderRadius:"100%"}}),n.stayButtonText]}),o("button",{onClick:l,className:"box-border flex h-[38px] items-center gap-1 whitespace-nowrap px-4 py-2 hover:opacity-80",style:{backgroundColor:"transparent",color:e.switchButtonTextColor,border:`1.6px solid ${e.switchButtonBorderColor}`,fontWeight:"700",fontSize:e.fontSize,borderRadius:e.buttonBorderRadius},children:[t("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:t("path",{d:"M8.29883 1.2041C12.216 1.20425 15.3923 4.37181 15.3926 8.28027C15.3926 12.189 12.2162 15.3563 8.29883 15.3564C4.38145 15.3563 1.2041 12.189 1.2041 8.28027C1.20439 4.37183 4.38163 1.20428 8.29883 1.2041ZM3.58105 11.4795C4.31053 12.5471 5.39411 13.3542 6.66406 13.7324C6.21155 13.0301 5.86128 12.2699 5.60938 11.4795H3.58105ZM11.0166 11.4795C10.7696 12.2779 10.4256 13.0347 9.98438 13.7178C11.2325 13.3333 12.2971 12.5331 13.0166 11.4795H11.0166ZM7.0791 11.4795C7.3755 12.2654 7.78717 12.9997 8.31445 13.6455C8.83791 13.0305 9.25428 12.2929 9.55273 11.4795H7.0791ZM2.85645 6.56738C2.6854 7.10801 2.59283 7.68338 2.59277 8.28027C2.59277 8.91383 2.69891 9.52251 2.89063 10.0918H5.27148C5.15636 9.42693 5.10277 8.75388 5.11133 8.08789C5.11789 7.57837 5.1619 7.06931 5.23926 6.56738L2.85645 6.56738ZM11.3447 6.56738C11.4483 7.20036 11.4944 7.84036 11.4863 8.47363C11.4793 9.01629 11.4291 9.55828 11.3418 10.0918H13.707C13.8986 9.52259 14.0039 8.91374 14.0039 8.28027C14.0039 7.68337 13.9112 7.10802 13.7402 6.56738H11.3447ZM6.64648 6.56738C6.55761 7.06802 6.50673 7.58339 6.5 8.10547C6.49143 8.7725 6.55341 9.44067 6.68359 10.0918L9.93457 10.0918C10.0348 9.56074 10.0905 9.01207 10.0977 8.45605C10.1058 7.82231 10.0497 7.18763 9.93262 6.56738L6.64648 6.56738ZM6.6123 2.84277C5.32602 3.23909 4.23535 4.07819 3.51563 5.17969L5.5498 5.17969C5.79857 4.34514 6.15294 3.55384 6.6123 2.84277ZM9.93262 2.8291C10.4039 3.56047 10.7656 4.35407 11.0195 5.17969H13.0811C12.3519 4.06343 11.2413 3.21866 9.93262 2.8291ZM8.28223 2.91504C7.73775 3.55467 7.30932 4.32752 7.00879 5.17969L9.55566 5.17969C9.25672 4.35642 8.83179 3.58782 8.28223 2.91504Z",fill:"currentColor"})}),n.switchButtonText]})]})]})})]})}export{C as RegionBanner};
|
|
60
|
-
//# sourceMappingURL=RegionBanner.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../../src/biz-components/IPRedirect/RegionBanner.tsx"],
|
|
4
|
-
"sourcesContent": ["'use client'\n\nimport type { RegionConfig, IPRedirectBannerCopy } from './type.js'\n\n/** \u6A2A\u5E45\u6837\u5F0F\u914D\u7F6E */\nexport type RegionBannerStyles = {\n /** \u80CC\u666F\u8272\uFF0C\u9ED8\u8BA4 #fff */\n backgroundColor?: string\n /** \u6309\u94AE\u5706\u89D2\uFF0C\u9ED8\u8BA4 9999px */\n buttonBorderRadius?: string\n /** \u6587\u6848\u5B57\u53F7\uFF0C\u9ED8\u8BA4 14px */\n fontSize?: string\n /** Stay Here \u6309\u94AE\u80CC\u666F\u8272\uFF0C\u9ED8\u8BA4 #000 */\n stayButtonBgColor?: string\n /** Stay Here \u6309\u94AE\u6587\u5B57\u989C\u8272\uFF0C\u9ED8\u8BA4 #fff */\n stayButtonTextColor?: string\n /** Switch Site \u6309\u94AE\u8FB9\u6846\u989C\u8272\uFF0C\u9ED8\u8BA4 #000 */\n switchButtonBorderColor?: string\n /** Switch Site \u6309\u94AE\u6587\u5B57\u989C\u8272\uFF0C\u9ED8\u8BA4 #000 */\n switchButtonTextColor?: string\n}\n\nexport type RegionBannerProps = {\n /** \u63A7\u5236\u6A2A\u5E45\u663E\u793A/\u9690\u85CF */\n visible: boolean\n /** \u6A2A\u5E45\u72B6\u6001\u53D8\u5316\u56DE\u8C03 */\n onVisibleChange: (visible: boolean) => void\n /** \u6587\u6848\u914D\u7F6E */\n copy: IPRedirectBannerCopy\n /** \u70B9\u51FB Stay Here \u6309\u94AE\u7684\u56DE\u8C03 */\n onStayHere: () => void\n /** \u70B9\u51FB Switch Site \u6309\u94AE\u7684\u56DE\u8C03 */\n onSwitchSite: () => void\n /** \u6837\u5F0F\u914D\u7F6E */\n styles?: RegionBannerStyles\n /** \u5F53\u524D\u7AD9\u70B9\u5730\u533A\u914D\u7F6E\uFF08\u7528\u4E8E\u663E\u793A\u56FD\u65D7\u56FE\u6807\uFF09 */\n currentRegion?: RegionConfig\n /** \u81EA\u5B9A\u4E49\u7C7B\u540D */\n className?: string\n}\n\n// \u9ED8\u8BA4\u6837\u5F0F\nconst defaultStyles: Required<RegionBannerStyles> = {\n backgroundColor: '#fff',\n buttonBorderRadius: '9999px',\n fontSize: '14px',\n stayButtonBgColor: '#000',\n stayButtonTextColor: '#fff',\n switchButtonBorderColor: '#000',\n switchButtonTextColor: '#000',\n}\n\nexport function RegionBanner({\n visible,\n onVisibleChange,\n copy,\n onStayHere,\n onSwitchSite,\n styles: customStyles,\n currentRegion,\n className,\n}: RegionBannerProps) {\n // \u5408\u5E76\u6837\u5F0F\n const styles = { ...defaultStyles, ...customStyles }\n\n if (!visible) return null\n\n const handleStayHere = () => {\n onStayHere()\n onVisibleChange(false)\n }\n\n const handleClose = () => {\n // \u5173\u95ED\u6309\u94AE\u548C Stay Here \u6309\u94AE\u884C\u4E3A\u4E00\u81F4\n onStayHere()\n onVisibleChange(false)\n }\n\n return (\n <>\n <style>{`\n .region-banner-wrapper {\n height: auto;\n min-height: 74px;\n }\n @media (min-width: 1024px) {\n .region-banner-wrapper {\n height: 54px;\n }\n }\n .region-banner-content {\n padding: 0 12px;\n flex-direction: column;\n gap: 8px;\n align-items: flex-start;\n }\n .region-banner-title-row {\n display: flex;\n align-items: center;\n width: 100%;\n gap: 8px;\n height: 20px;\n margin-top: 8px;\n }\n .region-banner-content h1 {\n flex: 1;\n min-width: 0;\n }\n .region-banner-close-btn {\n position: static;\n flex-shrink: 0;\n }\n @media (min-width: 1024px) {\n .region-banner-content {\n padding: 0 64px;\n flex-direction: row;\n align-items: center;\n }\n .region-banner-title-row {\n flex: 1;\n }\n .region-banner-close-btn {\n position: absolute;\n right: 16px;\n top: 50%;\n transform: translateY(-50%);\n }\n }\n @media (min-width: 1920px) {\n .region-banner-content {\n padding: 0 128px;\n }\n }\n @media (min-width: 1025px) and (max-width: 1440px) {\n .region-banner-title {\n max-width: 623px;\n }\n }\n `}</style>\n\n <div\n className={`region-banner-wrapper relative left-0 top-0 w-full ${className || ''}`}\n style={{ backgroundColor: styles.backgroundColor, boxShadow: '0 2px 8px rgba(0,0,0,0.1)', zIndex: 1000 }}\n >\n <div className=\"region-banner-content flex h-full justify-between text-black\">\n <div className=\"region-banner-title-row\">\n <h1\n className=\"region-banner-title truncate font-bold\"\n style={{ fontSize: styles.fontSize, color: '#1F2021' }}\n >\n {copy.message}\n </h1>\n\n {/* \u5173\u95ED\u6309\u94AE */}\n <button\n onClick={handleClose}\n className=\"region-banner-close-btn inline-flex size-[28px] items-center justify-center rounded-full hover:bg-[#f5f5f5] focus:outline-none\"\n style={{ color: '#767880' }}\n aria-label=\"Close\"\n >\n <svg width=\"20\" height=\"20\" viewBox=\"0 0 18 18\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path\n d=\"M13.5 4.5L4.5 13.5M4.5 4.5L13.5 13.5\"\n stroke=\"currentColor\"\n strokeWidth=\"1.5\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n />\n </svg>\n </button>\n </div>\n\n <div className=\"ml-4 flex gap-3\">\n {/* Stay Here \u6309\u94AE */}\n <button\n onClick={handleStayHere}\n className=\"box-border flex h-[38px] items-center gap-1 whitespace-nowrap px-4 py-2 hover:opacity-80\"\n style={{\n backgroundColor: styles.stayButtonBgColor,\n color: styles.stayButtonTextColor,\n fontWeight: '700',\n fontSize: styles.fontSize,\n borderRadius: styles.buttonBorderRadius,\n border: 'none',\n }}\n >\n {currentRegion?.icon && (\n <img src={currentRegion.icon} alt=\"\" style={{ width: '16px', height: '16px', borderRadius: '100%' }} />\n )}\n {copy.stayButtonText}\n </button>\n\n {/* Switch Site \u6309\u94AE */}\n <button\n onClick={onSwitchSite}\n className=\"box-border flex h-[38px] items-center gap-1 whitespace-nowrap px-4 py-2 hover:opacity-80\"\n style={{\n backgroundColor: 'transparent',\n color: styles.switchButtonTextColor,\n border: `1.6px solid ${styles.switchButtonBorderColor}`,\n fontWeight: '700',\n fontSize: styles.fontSize,\n borderRadius: styles.buttonBorderRadius,\n }}\n >\n <svg width=\"16\" height=\"16\" viewBox=\"0 0 16 16\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path\n d=\"M8.29883 1.2041C12.216 1.20425 15.3923 4.37181 15.3926 8.28027C15.3926 12.189 12.2162 15.3563 8.29883 15.3564C4.38145 15.3563 1.2041 12.189 1.2041 8.28027C1.20439 4.37183 4.38163 1.20428 8.29883 1.2041ZM3.58105 11.4795C4.31053 12.5471 5.39411 13.3542 6.66406 13.7324C6.21155 13.0301 5.86128 12.2699 5.60938 11.4795H3.58105ZM11.0166 11.4795C10.7696 12.2779 10.4256 13.0347 9.98438 13.7178C11.2325 13.3333 12.2971 12.5331 13.0166 11.4795H11.0166ZM7.0791 11.4795C7.3755 12.2654 7.78717 12.9997 8.31445 13.6455C8.83791 13.0305 9.25428 12.2929 9.55273 11.4795H7.0791ZM2.85645 6.56738C2.6854 7.10801 2.59283 7.68338 2.59277 8.28027C2.59277 8.91383 2.69891 9.52251 2.89063 10.0918H5.27148C5.15636 9.42693 5.10277 8.75388 5.11133 8.08789C5.11789 7.57837 5.1619 7.06931 5.23926 6.56738L2.85645 6.56738ZM11.3447 6.56738C11.4483 7.20036 11.4944 7.84036 11.4863 8.47363C11.4793 9.01629 11.4291 9.55828 11.3418 10.0918H13.707C13.8986 9.52259 14.0039 8.91374 14.0039 8.28027C14.0039 7.68337 13.9112 7.10802 13.7402 6.56738H11.3447ZM6.64648 6.56738C6.55761 7.06802 6.50673 7.58339 6.5 8.10547C6.49143 8.7725 6.55341 9.44067 6.68359 10.0918L9.93457 10.0918C10.0348 9.56074 10.0905 9.01207 10.0977 8.45605C10.1058 7.82231 10.0497 7.18763 9.93262 6.56738L6.64648 6.56738ZM6.6123 2.84277C5.32602 3.23909 4.23535 4.07819 3.51563 5.17969L5.5498 5.17969C5.79857 4.34514 6.15294 3.55384 6.6123 2.84277ZM9.93262 2.8291C10.4039 3.56047 10.7656 4.35407 11.0195 5.17969H13.0811C12.3519 4.06343 11.2413 3.21866 9.93262 2.8291ZM8.28223 2.91504C7.73775 3.55467 7.30932 4.32752 7.00879 5.17969L9.55566 5.17969C9.25672 4.35642 8.83179 3.58782 8.28223 2.91504Z\"\n fill=\"currentColor\"\n />\n </svg>\n {copy.switchButtonText}\n </button>\n </div>\n </div>\n </div>\n </>\n )\n}\n"],
|
|
5
|
-
"mappings": "aA+EI,mBAAAA,EACE,OAAAC,EAiEI,QAAAC,MAlEN,oBArCJ,MAAMC,EAA8C,CAClD,gBAAiB,OACjB,mBAAoB,SACpB,SAAU,OACV,kBAAmB,OACnB,oBAAqB,OACrB,wBAAyB,OACzB,sBAAuB,MACzB,EAEO,SAASC,EAAa,CAC3B,QAAAC,EACA,gBAAAC,EACA,KAAAC,EACA,WAAAC,EACA,aAAAC,EACA,OAAQC,EACR,cAAAC,EACA,UAAAC,CACF,EAAsB,CAEpB,MAAMC,EAAS,CAAE,GAAGV,EAAe,GAAGO,CAAa,EAEnD,GAAI,CAACL,EAAS,OAAO,KAErB,MAAMS,EAAiB,IAAM,CAC3BN,EAAW,EACXF,EAAgB,EAAK,CACvB,EAEMS,EAAc,IAAM,CAExBP,EAAW,EACXF,EAAgB,EAAK,CACvB,EAEA,OACEJ,EAAAF,EAAA,CACE,UAAAC,EAAC,SAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,QA0DN,EAEFA,EAAC,OACC,UAAW,sDAAsDW,GAAa,EAAE,GAChF,MAAO,CAAE,gBAAiBC,EAAO,gBAAiB,UAAW,4BAA6B,OAAQ,GAAK,EAEvG,SAAAX,EAAC,OAAI,UAAU,+DACb,UAAAA,EAAC,OAAI,UAAU,0BACb,UAAAD,EAAC,MACC,UAAU,yCACV,MAAO,CAAE,SAAUY,EAAO,SAAU,MAAO,SAAU,EAEpD,SAAAN,EAAK,QACR,EAGAN,EAAC,UACC,QAASc,EACT,UAAU,iIACV,MAAO,CAAE,MAAO,SAAU,EAC1B,aAAW,QAEX,SAAAd,EAAC,OAAI,MAAM,KAAK,OAAO,KAAK,QAAQ,YAAY,KAAK,OAAO,MAAM,6BAChE,SAAAA,EAAC,QACC,EAAE,uCACF,OAAO,eACP,YAAY,MACZ,cAAc,QACd,eAAe,QACjB,EACF,EACF,GACF,EAEAC,EAAC,OAAI,UAAU,kBAEb,UAAAA,EAAC,UACC,QAASY,EACT,UAAU,2FACV,MAAO,CACL,gBAAiBD,EAAO,kBACxB,MAAOA,EAAO,oBACd,WAAY,MACZ,SAAUA,EAAO,SACjB,aAAcA,EAAO,mBACrB,OAAQ,MACV,EAEC,UAAAF,GAAe,MACdV,EAAC,OAAI,IAAKU,EAAc,KAAM,IAAI,GAAG,MAAO,CAAE,MAAO,OAAQ,OAAQ,OAAQ,aAAc,MAAO,EAAG,EAEtGJ,EAAK,gBACR,EAGAL,EAAC,UACC,QAASO,EACT,UAAU,2FACV,MAAO,CACL,gBAAiB,cACjB,MAAOI,EAAO,sBACd,OAAQ,eAAeA,EAAO,uBAAuB,GACrD,WAAY,MACZ,SAAUA,EAAO,SACjB,aAAcA,EAAO,kBACvB,EAEA,UAAAZ,EAAC,OAAI,MAAM,KAAK,OAAO,KAAK,QAAQ,YAAY,KAAK,OAAO,MAAM,6BAChE,SAAAA,EAAC,QACC,EAAE,8lDACF,KAAK,eACP,EACF,EACCM,EAAK,kBACR,GACF,GACF,EACF,GACF,CAEJ",
|
|
6
|
-
"names": ["Fragment", "jsx", "jsxs", "defaultStyles", "RegionBanner", "visible", "onVisibleChange", "copy", "onStayHere", "onSwitchSite", "customStyles", "currentRegion", "className", "styles", "handleStayHere", "handleClose"]
|
|
7
|
-
}
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
import type { RegionConfig, IPRedirectModalCopy } from './type.js';
|
|
2
|
-
/** 样式配置 */
|
|
3
|
-
export type RegionSelectorModalStyles = {
|
|
4
|
-
/** 弹窗宽度,默认 80% */
|
|
5
|
-
width?: string;
|
|
6
|
-
/** 弹窗最大宽度,默认 1000px */
|
|
7
|
-
maxWidth?: string;
|
|
8
|
-
/** 弹窗内边距,默认 '30px 32px' */
|
|
9
|
-
padding?: string;
|
|
10
|
-
/** 弹窗圆角,默认 16px */
|
|
11
|
-
borderRadius?: string;
|
|
12
|
-
/** 标题字号,默认 20px */
|
|
13
|
-
titleFontSize?: string;
|
|
14
|
-
/** 分组标题字号,默认 inherit */
|
|
15
|
-
groupTitleFontSize?: string;
|
|
16
|
-
/** 卡片高度,默认 56px */
|
|
17
|
-
itemHeight?: string;
|
|
18
|
-
/** 卡片背景色,默认 #f5f5f5 */
|
|
19
|
-
itemBgColor?: string;
|
|
20
|
-
/** 卡片圆角,默认 8px */
|
|
21
|
-
itemBorderRadius?: string;
|
|
22
|
-
/** 卡片间距,默认 8px */
|
|
23
|
-
itemGap?: string;
|
|
24
|
-
/** 每行卡片数量,默认 3 */
|
|
25
|
-
columns?: number;
|
|
26
|
-
};
|
|
27
|
-
export type RegionSelectorModalProps = {
|
|
28
|
-
/** 控制弹窗显示/隐藏 */
|
|
29
|
-
open: boolean;
|
|
30
|
-
/** 弹窗状态变化回调 */
|
|
31
|
-
onOpenChange: (open: boolean) => void;
|
|
32
|
-
/** 地区配置列表 */
|
|
33
|
-
regions: RegionConfig[];
|
|
34
|
-
/** 文案配置 */
|
|
35
|
-
copy: IPRedirectModalCopy;
|
|
36
|
-
/** 用户选择地区后的回调 */
|
|
37
|
-
onConfirm?: (region: RegionConfig) => void;
|
|
38
|
-
/** 是否自动跳转,默认 false */
|
|
39
|
-
autoRedirect?: boolean;
|
|
40
|
-
/** 是否跳转到首页(仅在 autoRedirect 为 true 时生效),默认 false(保留当前路径) */
|
|
41
|
-
redirectToHomepage?: boolean;
|
|
42
|
-
/** 样式配置 */
|
|
43
|
-
styles?: RegionSelectorModalStyles;
|
|
44
|
-
/** 自定义类名 */
|
|
45
|
-
className?: string;
|
|
46
|
-
};
|
|
47
|
-
export declare function RegionSelectorModal({ open, onOpenChange, regions, copy, onConfirm, autoRedirect, redirectToHomepage, styles: customStyles, className, }: RegionSelectorModalProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import{jsx as t,jsxs as l}from"react/jsx-runtime";import{Heading as k,Text as d}from"../../components/index.js";import*as n from"@radix-ui/react-dialog";import{useMemo as M}from"react";import{hasUtmParams as f,buildGeoRedirectRefManual as u,appendRefParam as x}from"./utils.js";const F={width:"80%",maxWidth:"1000px",padding:"0px",borderRadius:"12px",titleFontSize:"24px",groupTitleFontSize:"18px",itemHeight:"54px",itemBgColor:"#F5F6F7",itemBorderRadius:"0px",itemGap:"8px",columns:3};function W({open:h,onOpenChange:c,regions:m,copy:y,onConfirm:p,autoRedirect:w=!1,redirectToHomepage:R=!1,styles:b,className:v}){const o={...F,...b},C=a=>{if(p&&p(a),w){const i=window.location.search;if(R){let e=a.url;if(f(i)){const s=u(a.code);e=x(e,s)}window.location.href=e}else{const e=window.location.pathname,s=window.location.hash,g=`${a.url.replace(/\/$/,"")}${e}${i}`;let r=g;if(f(i)){const N=u(a.code);r=x(g,N)}r+=s,window.location.href=r}}c(!1)},S=`calc((100% - ${o.itemGap} * ${o.columns-1}) / ${o.columns})`,z=M(()=>{const a={};return m.forEach(i=>{const e=i.group||"Other";a[e]||(a[e]=[]),a[e].push(i)}),a},[m]);return t(n.Root,{open:h,onOpenChange:c,children:l(n.Portal,{children:[t("style",{children:`
|
|
2
|
-
.region-item {
|
|
3
|
-
width: 100%;
|
|
4
|
-
}
|
|
5
|
-
@media (min-width: 1024px) {
|
|
6
|
-
.region-item {
|
|
7
|
-
width: ${S};
|
|
8
|
-
}
|
|
9
|
-
}
|
|
10
|
-
.modal-content {
|
|
11
|
-
padding: 0 16px 32px 16px;
|
|
12
|
-
overflow-y: auto;
|
|
13
|
-
max-height: calc(90vh - 60px);
|
|
14
|
-
-webkit-overflow-scrolling: touch;
|
|
15
|
-
}
|
|
16
|
-
@media (min-width: 1024px) {
|
|
17
|
-
.modal-content {
|
|
18
|
-
padding: 0 32px 32px 32px;
|
|
19
|
-
max-height: none;
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
.modal-dialog {
|
|
23
|
-
width: 100% !important;
|
|
24
|
-
max-width: 100% !important;
|
|
25
|
-
}
|
|
26
|
-
@media (min-width: 1024px) {
|
|
27
|
-
.modal-dialog {
|
|
28
|
-
width: ${o.width} !important;
|
|
29
|
-
max-width: ${o.maxWidth} !important;
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
`}),t(n.Overlay,{className:"data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-[9998] bg-black/50"}),t(n.Content,{className:`modal-dialog data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed left-1/2 top-1/2 z-[9999] max-h-[90vh] -translate-x-1/2 -translate-y-1/2 overflow-y-auto bg-white shadow-lg duration-200 ${v||""}`,style:{padding:o.padding,borderRadius:o.borderRadius},children:l("div",{className:"flex flex-col",children:[t("div",{className:"relative flex items-center justify-end p-[16px]",children:t(n.Close,{asChild:!0,children:t("button",{className:"inline-flex size-[28px] items-center justify-center rounded-full text-[#666] hover:bg-[#f5f5f5] focus:outline-none","aria-label":"Close",children:t("svg",{width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:t("path",{d:"M13.5 4.5L4.5 13.5M4.5 4.5L13.5 13.5",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})})})}),l("div",{className:"modal-content flex flex-col gap-[24px]",children:[t(n.Title,{asChild:!0,children:t(k,{as:"h2",className:"text-center text-[#1F2021]",style:{fontSize:o.titleFontSize,fontWeight:"700"},children:y.title})}),Object.entries(z).map(([a,i])=>l("div",{className:"flex flex-col gap-[12px]",children:[t(d,{size:3,className:"text-left font-semibold text-[#1F2021]",style:{fontSize:o.groupTitleFontSize,fontWeight:"700",marginBottom:"8px"},children:a}),t("div",{className:"flex flex-wrap justify-start",style:{gap:o.itemGap},children:i.map(e=>l("button",{onClick:()=>C(e),className:"region-item flex items-center gap-[12px] px-[16px] transition-colors hover:opacity-80",style:{height:o.itemHeight,backgroundColor:o.itemBgColor,borderRadius:o.itemBorderRadius},children:[t(d,{size:2,className:"flex-1 text-left font-medium",style:{color:"#000",fontWeight:"700"},children:e.name}),(e.language||e.currency)&&l(d,{size:2,className:"shrink-0 text-[16px]",style:{color:"#767880"},children:[e.language,e.language&&e.currency&&" / ",e.currency]})]},e.code))})]},a))]})]})})]})})}export{W as RegionSelectorModal};
|
|
33
|
-
//# sourceMappingURL=RegionSelectorModal.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../../src/biz-components/IPRedirect/RegionSelectorModal.tsx"],
|
|
4
|
-
"sourcesContent": ["import { Heading, Text } from '../../components/index.js'\nimport * as Dialog from '@radix-ui/react-dialog'\nimport { useMemo } from 'react'\nimport type { RegionConfig, IPRedirectModalCopy } from './type.js'\nimport { hasUtmParams, buildGeoRedirectRefManual, appendRefParam } from './utils.js'\n\n/** \u6837\u5F0F\u914D\u7F6E */\nexport type RegionSelectorModalStyles = {\n /** \u5F39\u7A97\u5BBD\u5EA6\uFF0C\u9ED8\u8BA4 80% */\n width?: string\n /** \u5F39\u7A97\u6700\u5927\u5BBD\u5EA6\uFF0C\u9ED8\u8BA4 1000px */\n maxWidth?: string\n /** \u5F39\u7A97\u5185\u8FB9\u8DDD\uFF0C\u9ED8\u8BA4 '30px 32px' */\n padding?: string\n /** \u5F39\u7A97\u5706\u89D2\uFF0C\u9ED8\u8BA4 16px */\n borderRadius?: string\n /** \u6807\u9898\u5B57\u53F7\uFF0C\u9ED8\u8BA4 20px */\n titleFontSize?: string\n /** \u5206\u7EC4\u6807\u9898\u5B57\u53F7\uFF0C\u9ED8\u8BA4 inherit */\n groupTitleFontSize?: string\n /** \u5361\u7247\u9AD8\u5EA6\uFF0C\u9ED8\u8BA4 56px */\n itemHeight?: string\n /** \u5361\u7247\u80CC\u666F\u8272\uFF0C\u9ED8\u8BA4 #f5f5f5 */\n itemBgColor?: string\n /** \u5361\u7247\u5706\u89D2\uFF0C\u9ED8\u8BA4 8px */\n itemBorderRadius?: string\n /** \u5361\u7247\u95F4\u8DDD\uFF0C\u9ED8\u8BA4 8px */\n itemGap?: string\n /** \u6BCF\u884C\u5361\u7247\u6570\u91CF\uFF0C\u9ED8\u8BA4 3 */\n columns?: number\n}\n\nexport type RegionSelectorModalProps = {\n /** \u63A7\u5236\u5F39\u7A97\u663E\u793A/\u9690\u85CF */\n open: boolean\n /** \u5F39\u7A97\u72B6\u6001\u53D8\u5316\u56DE\u8C03 */\n onOpenChange: (open: boolean) => void\n /** \u5730\u533A\u914D\u7F6E\u5217\u8868 */\n regions: RegionConfig[]\n /** \u6587\u6848\u914D\u7F6E */\n copy: IPRedirectModalCopy\n /** \u7528\u6237\u9009\u62E9\u5730\u533A\u540E\u7684\u56DE\u8C03 */\n onConfirm?: (region: RegionConfig) => void\n /** \u662F\u5426\u81EA\u52A8\u8DF3\u8F6C\uFF0C\u9ED8\u8BA4 false */\n autoRedirect?: boolean\n /** \u662F\u5426\u8DF3\u8F6C\u5230\u9996\u9875\uFF08\u4EC5\u5728 autoRedirect \u4E3A true \u65F6\u751F\u6548\uFF09\uFF0C\u9ED8\u8BA4 false\uFF08\u4FDD\u7559\u5F53\u524D\u8DEF\u5F84\uFF09 */\n redirectToHomepage?: boolean\n /** \u6837\u5F0F\u914D\u7F6E */\n styles?: RegionSelectorModalStyles\n /** \u81EA\u5B9A\u4E49\u7C7B\u540D */\n className?: string\n}\n\n// \u9ED8\u8BA4\u6837\u5F0F\nconst defaultStyles: Required<RegionSelectorModalStyles> = {\n width: '80%',\n maxWidth: '1000px',\n padding: '0px',\n borderRadius: '12px',\n titleFontSize: '24px',\n groupTitleFontSize: '18px',\n itemHeight: '54px',\n itemBgColor: '#F5F6F7',\n itemBorderRadius: '0px',\n itemGap: '8px',\n columns: 3,\n}\n\nexport function RegionSelectorModal({\n open,\n onOpenChange,\n regions,\n copy,\n onConfirm,\n autoRedirect = false,\n redirectToHomepage = false,\n styles: customStyles,\n className,\n}: RegionSelectorModalProps) {\n // \u5408\u5E76\u9ED8\u8BA4\u6837\u5F0F\u548C\u81EA\u5B9A\u4E49\u6837\u5F0F\n const styles = { ...defaultStyles, ...customStyles }\n\n // \u5904\u7406\u5730\u533A\u9009\u62E9\n const handleRegionClick = (region: RegionConfig) => {\n // \u5982\u679C\u6709\u81EA\u5B9A\u4E49\u56DE\u8C03\uFF0C\u5148\u6267\u884C\u56DE\u8C03\n if (onConfirm) {\n onConfirm(region)\n }\n\n // \u5982\u679C\u5F00\u542F\u4E86\u81EA\u52A8\u8DF3\u8F6C\n if (autoRedirect) {\n const currentSearch = window.location.search\n\n if (redirectToHomepage) {\n // \u8DF3\u8F6C\u5230\u76EE\u6807\u5730\u533A\u9996\u9875\n let targetUrl = region.url\n\n // \u5982\u679C\u6709 UTM \u53C2\u6570\uFF0C\u6DFB\u52A0 ref \u53C2\u6570\n if (hasUtmParams(currentSearch)) {\n const refValue = buildGeoRedirectRefManual(region.code)\n targetUrl = appendRefParam(targetUrl, refValue)\n }\n\n window.location.href = targetUrl\n } else {\n // \u4FDD\u7559\u5F53\u524D\u8DEF\u5F84\u548C\u53C2\u6570\u8DF3\u8F6C\n const currentPath = window.location.pathname\n const currentHash = window.location.hash\n const targetBaseUrl = region.url.replace(/\\/$/, '')\n const baseUrl = `${targetBaseUrl}${currentPath}${currentSearch}`\n\n // \u5982\u679C\u6709 UTM \u53C2\u6570\uFF0C\u6DFB\u52A0 ref \u53C2\u6570\n let fullTargetUrl = baseUrl\n if (hasUtmParams(currentSearch)) {\n const refValue = buildGeoRedirectRefManual(region.code)\n fullTargetUrl = appendRefParam(baseUrl, refValue)\n }\n\n // \u6DFB\u52A0 hash\n fullTargetUrl += currentHash\n\n window.location.href = fullTargetUrl\n }\n }\n\n // \u5173\u95ED\u5F39\u7A97\n onOpenChange(false)\n }\n\n // \u8BA1\u7B97\u5361\u7247\u5BBD\u5EA6\n const itemWidth = `calc((100% - ${styles.itemGap} * ${styles.columns - 1}) / ${styles.columns})`\n\n // \u6309\u5206\u7EC4\u6574\u7406\u5730\u533A\n const groupedRegions = useMemo(() => {\n const groups: Record<string, RegionConfig[]> = {}\n regions.forEach(region => {\n const group = region.group || 'Other'\n if (!groups[group]) {\n groups[group] = []\n }\n groups[group].push(region)\n })\n return groups\n }, [regions])\n\n return (\n <Dialog.Root open={open} onOpenChange={onOpenChange}>\n <Dialog.Portal>\n <style>{`\n .region-item {\n width: 100%;\n }\n @media (min-width: 1024px) {\n .region-item {\n width: ${itemWidth};\n }\n }\n .modal-content {\n padding: 0 16px 32px 16px;\n overflow-y: auto;\n max-height: calc(90vh - 60px);\n -webkit-overflow-scrolling: touch;\n }\n @media (min-width: 1024px) {\n .modal-content {\n padding: 0 32px 32px 32px;\n max-height: none;\n }\n }\n .modal-dialog {\n width: 100% !important;\n max-width: 100% !important;\n }\n @media (min-width: 1024px) {\n .modal-dialog {\n width: ${styles.width} !important;\n max-width: ${styles.maxWidth} !important;\n }\n }\n `}</style>\n <Dialog.Overlay className=\"data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-[9998] bg-black/50\" />\n <Dialog.Content\n className={`modal-dialog data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed left-1/2 top-1/2 z-[9999] max-h-[90vh] -translate-x-1/2 -translate-y-1/2 overflow-y-auto bg-white shadow-lg duration-200 ${className || ''}`}\n style={{\n padding: styles.padding,\n borderRadius: styles.borderRadius,\n }}\n >\n <div className=\"flex flex-col\">\n {/* \u5934\u90E8\uFF1A\u5173\u95ED\u6309\u94AE */}\n <div className=\"relative flex items-center justify-end p-[16px]\">\n <Dialog.Close asChild>\n <button\n className=\"inline-flex size-[28px] items-center justify-center rounded-full text-[#666] hover:bg-[#f5f5f5] focus:outline-none\"\n aria-label=\"Close\"\n >\n <svg width=\"18\" height=\"18\" viewBox=\"0 0 18 18\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path\n d=\"M13.5 4.5L4.5 13.5M4.5 4.5L13.5 13.5\"\n stroke=\"currentColor\"\n strokeWidth=\"1.5\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n />\n </svg>\n </button>\n </Dialog.Close>\n </div>\n\n {/* \u5185\u5BB9\u533A\u57DF */}\n <div className=\"modal-content flex flex-col gap-[24px]\">\n {/* \u6807\u9898 */}\n <Dialog.Title asChild>\n <Heading\n as=\"h2\"\n className=\"text-center text-[#1F2021]\"\n style={{ fontSize: styles.titleFontSize, fontWeight: '700' }}\n >\n {copy.title}\n </Heading>\n </Dialog.Title>\n {Object.entries(groupedRegions).map(([groupName, groupRegions]) => (\n <div key={groupName} className=\"flex flex-col gap-[12px]\">\n {/* \u5206\u7EC4\u6807\u9898 */}\n <Text\n size={3 as any}\n className=\"text-left font-semibold text-[#1F2021]\"\n style={{ fontSize: styles.groupTitleFontSize, fontWeight: '700', marginBottom: '8px' }}\n >\n {groupName}\n </Text>\n {/* \u5730\u533A\u5361\u7247\u7F51\u683C */}\n <div className=\"flex flex-wrap justify-start\" style={{ gap: styles.itemGap }}>\n {groupRegions.map(region => (\n <button\n key={region.code}\n onClick={() => handleRegionClick(region)}\n className=\"region-item flex items-center gap-[12px] px-[16px] transition-colors hover:opacity-80\"\n style={{\n height: styles.itemHeight,\n backgroundColor: styles.itemBgColor,\n borderRadius: styles.itemBorderRadius,\n }}\n >\n {/* \u56FD\u5BB6\u540D\u79F0 */}\n <Text\n size={2 as any}\n className=\"flex-1 text-left font-medium\"\n style={{ color: '#000', fontWeight: '700' }}\n >\n {region.name}\n </Text>\n {/* \u8BED\u8A00 / \u8D27\u5E01 */}\n {(region.language || region.currency) && (\n <Text size={2 as any} className=\"shrink-0 text-[16px]\" style={{ color: '#767880' }}>\n {region.language}\n {region.language && region.currency && ' / '}\n {region.currency}\n </Text>\n )}\n </button>\n ))}\n </div>\n </div>\n ))}\n </div>\n </div>\n </Dialog.Content>\n </Dialog.Portal>\n </Dialog.Root>\n )\n}\n"],
|
|
5
|
-
"mappings": "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",
|
|
6
|
-
"names": ["jsx", "jsxs", "Heading", "Text", "Dialog", "useMemo", "hasUtmParams", "buildGeoRedirectRefManual", "appendRefParam", "defaultStyles", "RegionSelectorModal", "open", "onOpenChange", "regions", "copy", "onConfirm", "autoRedirect", "redirectToHomepage", "customStyles", "className", "styles", "handleRegionClick", "region", "currentSearch", "targetUrl", "refValue", "currentPath", "currentHash", "baseUrl", "fullTargetUrl", "itemWidth", "groupedRegions", "groups", "group", "groupName", "groupRegions"]
|
|
7
|
-
}
|