@anker-in/headless-ui 1.0.26-alpha.1762421089853 → 1.0.26-alpha.1762425612656
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 +38 -0
- package/dist/cjs/biz-components/AiuiProvider/index.d.ts +12 -0
- package/dist/cjs/biz-components/BrandEquity/BrandEquity.d.ts +6 -0
- package/dist/cjs/biz-components/BrandEquity/index.d.ts +1 -0
- package/dist/cjs/biz-components/BrandEquity/types.d.ts +18 -0
- package/dist/cjs/biz-components/Category/SwiperCategory.d.ts +19 -0
- package/dist/cjs/biz-components/Category/index.d.ts +35 -0
- package/dist/cjs/biz-components/CreativeModule/index.d.ts +21 -0
- package/dist/cjs/biz-components/Evaluate/index.d.ts +37 -0
- package/dist/cjs/biz-components/Faq/Faq.d.ts +14 -0
- package/dist/cjs/biz-components/Faq/index.d.ts +2 -0
- package/dist/cjs/biz-components/Faq/types.d.ts +12 -0
- package/dist/cjs/biz-components/FooterNavigation/icons/Add.d.ts +3 -0
- package/dist/cjs/biz-components/FooterNavigation/icons/ArrowRight.d.ts +3 -0
- package/dist/cjs/biz-components/FooterNavigation/icons/Country.d.ts +3 -0
- package/dist/cjs/biz-components/FooterNavigation/icons/Subtract.d.ts +3 -0
- package/dist/cjs/biz-components/FooterNavigation/icons/index.d.ts +5 -0
- package/dist/cjs/biz-components/FooterNavigation/index.d.ts +6 -0
- package/dist/cjs/biz-components/FooterNavigation/types.d.ts +13 -0
- package/dist/cjs/biz-components/Graphic/index.d.ts +38 -0
- package/dist/cjs/biz-components/GraphicAttractionBlock/index.d.ts +25 -0
- package/dist/cjs/biz-components/GraphicOverlay/GraphicOverlay.d.ts +8 -0
- package/dist/cjs/biz-components/GraphicOverlay/index.d.ts +2 -0
- package/dist/cjs/biz-components/GraphicOverlay/types.d.ts +33 -0
- package/dist/cjs/biz-components/HeaderNavigation/NavProvider.d.ts +32 -0
- package/dist/cjs/biz-components/HeaderNavigation/icons/AnkerLogo.d.ts +3 -0
- package/dist/cjs/biz-components/HeaderNavigation/icons/Cart.d.ts +3 -0
- package/dist/cjs/biz-components/HeaderNavigation/icons/Close.d.ts +3 -0
- package/dist/cjs/biz-components/HeaderNavigation/icons/DownArrow.d.ts +3 -0
- package/dist/cjs/biz-components/HeaderNavigation/icons/LeftArrow.d.ts +3 -0
- package/dist/cjs/biz-components/HeaderNavigation/icons/LogoLine.d.ts +3 -0
- package/dist/cjs/biz-components/HeaderNavigation/icons/Menu.d.ts +3 -0
- package/dist/cjs/biz-components/HeaderNavigation/icons/RightArrow.d.ts +3 -0
- package/dist/cjs/biz-components/HeaderNavigation/icons/Search.d.ts +3 -0
- package/dist/cjs/biz-components/HeaderNavigation/icons/User.d.ts +3 -0
- package/dist/cjs/biz-components/HeaderNavigation/icons/index.d.ts +11 -0
- package/dist/cjs/biz-components/HeaderNavigation/index.d.ts +7 -0
- package/dist/cjs/biz-components/HeaderNavigation/types.d.ts +77 -0
- package/dist/cjs/biz-components/HeaderNavigation/withCategory.d.ts +9 -0
- package/dist/cjs/biz-components/HeroBanner/HeroBanner.d.ts +7 -0
- package/dist/cjs/biz-components/HeroBanner/index.d.ts +1 -0
- package/dist/cjs/biz-components/HeroBanner/types.d.ts +43 -0
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/ProductHighlight/index.js +1 -1
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/ProductHighlight/index.js.map +2 -2
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductGallery/components/CompareModal.js +1 -1
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductGallery/components/CompareModal.js.map +2 -2
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductGallery/components/SpecsModal.js +1 -1
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductGallery/components/SpecsModal.js.map +2 -2
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductGallery/index.js +1 -1
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductGallery/index.js.map +2 -2
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductSummary/index.js +1 -1
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductSummary/index.js.map +3 -3
- package/dist/cjs/biz-components/Listing/components/PurchaseBar/ProductActions/index.js +1 -1
- package/dist/cjs/biz-components/Listing/components/PurchaseBar/ProductActions/index.js.map +3 -3
- package/dist/cjs/biz-components/Marquee/Marquee.d.ts +18 -0
- package/dist/cjs/biz-components/Marquee/index.d.ts +2 -0
- package/dist/cjs/biz-components/Marquee/type.d.ts +33 -0
- package/dist/cjs/biz-components/MediaPlayerBase/index.d.ts +6 -0
- package/dist/cjs/biz-components/MediaPlayerBase/right.d.ts +1 -0
- package/dist/cjs/biz-components/MediaPlayerBase/types.d.ts +18 -0
- package/dist/cjs/biz-components/MediaPlayerMulti/index.d.ts +6 -0
- package/dist/cjs/biz-components/MediaPlayerMulti/types.d.ts +22 -0
- package/dist/cjs/biz-components/MediaPlayerSticky/index.d.ts +9 -0
- package/dist/cjs/biz-components/MediaPlayerSticky/types.d.ts +21 -0
- package/dist/cjs/biz-components/MemberEquity/index.d.ts +7 -0
- package/dist/cjs/biz-components/MemberEquity/types.d.ts +30 -0
- package/dist/cjs/biz-components/MultiLayoutGraphicBlock/MultiLayoutGraphicBlock.d.ts +8 -0
- package/dist/cjs/biz-components/MultiLayoutGraphicBlock/index.d.ts +2 -0
- package/dist/cjs/biz-components/MultiLayoutGraphicBlock/types.d.ts +38 -0
- package/dist/cjs/biz-components/ShelfDisplay/index.d.ts +7 -0
- package/dist/cjs/biz-components/ShelfDisplay/index.js +1 -1
- package/dist/cjs/biz-components/ShelfDisplay/index.js.map +2 -2
- package/dist/cjs/biz-components/ShelfDisplay/shelfDisplay.d.ts +97 -0
- package/dist/cjs/biz-components/ShelfDisplay/shelfDisplayItem.d.ts +8 -0
- package/dist/cjs/biz-components/ShelfDisplay/shelfDisplayItem.js +2 -2
- package/dist/cjs/biz-components/ShelfDisplay/shelfDisplayItem.js.map +2 -2
- package/dist/cjs/biz-components/ShelfDisplay/tabSwitch.d.ts +9 -0
- package/dist/cjs/biz-components/Slogan/index.d.ts +9 -0
- package/dist/cjs/biz-components/Slogan/types.d.ts +31 -0
- package/dist/cjs/biz-components/Spacer/index.d.ts +7 -0
- package/dist/cjs/biz-components/Spacer/types.d.ts +10 -0
- package/dist/cjs/biz-components/Specs/dropdown.js +2 -2
- package/dist/cjs/biz-components/Specs/dropdown.js.map +3 -3
- package/dist/cjs/biz-components/Subscribe/index.d.ts +13 -0
- package/dist/cjs/biz-components/SwiperBox/index.d.ts +4 -0
- package/dist/cjs/biz-components/SwiperBox/types.d.ts +17 -0
- package/dist/cjs/biz-components/Tabs/Tabs.d.ts +7 -0
- package/dist/cjs/biz-components/Tabs/index.d.ts +1 -0
- package/dist/cjs/biz-components/Tabs/types.d.ts +29 -0
- package/dist/cjs/biz-components/TextModal/index.d.ts +14 -0
- package/dist/cjs/biz-components/Title/index.d.ts +7 -0
- package/dist/cjs/biz-components/Title/types.d.ts +33 -0
- package/dist/cjs/biz-components/VideoModal/YouTubePlayer.d.ts +4 -0
- package/dist/cjs/biz-components/VideoModal/index.d.ts +8 -0
- package/dist/cjs/biz-components/WhyChoose/WhyChoose.d.ts +14 -0
- package/dist/cjs/biz-components/WhyChoose/index.d.ts +2 -0
- package/dist/cjs/biz-components/WhyChoose/types.d.ts +12 -0
- package/dist/cjs/biz-components/index.d.ts +29 -0
- package/dist/cjs/components/alert.d.ts +17 -0
- package/dist/cjs/components/avatar.d.ts +26 -0
- package/dist/cjs/components/badge.d.ts +9 -0
- package/dist/cjs/components/board.d.ts +4 -0
- package/dist/cjs/components/button.d.ts +41 -0
- package/dist/cjs/components/card.d.ts +8 -0
- package/dist/cjs/components/carousel.d.ts +28 -0
- package/dist/cjs/components/checkbox.d.ts +11 -0
- package/dist/cjs/components/color.d.ts +13 -0
- package/dist/cjs/components/container.d.ts +24 -0
- package/dist/cjs/components/dialog.d.ts +19 -0
- package/dist/cjs/components/dialog.js +1 -1
- package/dist/cjs/components/dialog.js.map +2 -2
- package/dist/cjs/components/drawer.d.ts +13 -0
- package/dist/cjs/components/drop-down.d.ts +27 -0
- package/dist/cjs/components/gird.d.ts +17 -0
- package/dist/cjs/components/heading.d.ts +17 -0
- package/dist/cjs/components/index.d.ts +25 -0
- package/dist/cjs/components/input-number.d.ts +78 -0
- package/dist/cjs/components/input.d.ts +22 -0
- package/dist/cjs/components/link.d.ts +45 -0
- package/dist/cjs/components/picture.d.ts +13 -0
- package/dist/cjs/components/popover.d.ts +6 -0
- package/dist/cjs/components/radio.d.ts +16 -0
- package/dist/cjs/components/skeleton.d.ts +9 -0
- package/dist/cjs/components/tabs.d.ts +11 -0
- package/dist/cjs/components/text.d.ts +32 -0
- package/dist/cjs/components/theme.d.ts +12 -0
- package/dist/cjs/cpn-components/CpnBanner/index.d.ts +3 -0
- package/dist/cjs/cpn-components/CpnBanner/types.d.ts +43 -0
- package/dist/cjs/cpn-components/CpnCountDown/index.d.ts +3 -0
- package/dist/cjs/cpn-components/CpnCountDown/types.d.ts +29 -0
- package/dist/cjs/cpn-components/CpnNavigation/index.d.ts +3 -0
- package/dist/cjs/cpn-components/CpnNavigation/types.d.ts +20 -0
- package/dist/cjs/cpn-components/CpnProductCard/index.d.ts +3 -0
- package/dist/cjs/cpn-components/CpnProductCard/types.d.ts +109 -0
- package/dist/cjs/cpn-components/CpnTitle/index.d.ts +3 -0
- package/dist/cjs/cpn-components/CpnTitle/types.d.ts +10 -0
- package/dist/cjs/cpn-components/index.d.ts +5 -0
- package/dist/cjs/helpers/ScrollLoadVideo.d.ts +15 -0
- package/dist/cjs/helpers/component-props.d.ts +7 -0
- package/dist/cjs/helpers/constants.d.ts +0 -0
- package/dist/cjs/helpers/index.d.ts +2 -0
- package/dist/cjs/helpers/utils.d.ts +5 -0
- package/dist/cjs/hooks/useCountDown.d.ts +10 -0
- package/dist/cjs/hooks/useExposure.d.ts +12 -0
- package/dist/cjs/hooks/useIntersectionObserver.d.ts +17 -0
- package/dist/cjs/icons/spinner.d.ts +5 -0
- package/dist/cjs/index.d.ts +1 -0
- package/dist/cjs/shared/Styles.d.ts +39 -0
- package/dist/cjs/shared/getKeyPropsString.d.ts +4 -0
- package/dist/cjs/shared/mimeType.d.ts +1 -0
- package/dist/cjs/shared/simpleHash.d.ts +1 -0
- package/dist/cjs/shared/throttle.d.ts +1 -0
- package/dist/cjs/shared/track.d.ts +1 -0
- package/dist/cjs/shared/trackUrlRef.d.ts +7 -0
- package/dist/cjs/stories/HeroBanner.stories.d.ts +26 -0
- package/dist/cjs/stories/MemberEquity.stories.d.ts +9 -0
- package/dist/cjs/stories/MultiLayoutGraphicBlock.stories.d.ts +9 -0
- package/dist/cjs/stories/accordionCards.stories.d.ts +17 -0
- package/dist/cjs/stories/alert.stories.d.ts +27 -0
- package/dist/cjs/stories/avatar.stories.d.ts +39 -0
- package/dist/cjs/stories/badge.stories.d.ts +31 -0
- package/dist/cjs/stories/bizTabs.stories.d.ts +7 -0
- package/dist/cjs/stories/board.stories.d.ts +6 -0
- package/dist/cjs/stories/brandEquity.stories.d.ts +16 -0
- package/dist/cjs/stories/button.stories.d.ts +56 -0
- package/dist/cjs/stories/card.stories.d.ts +27 -0
- package/dist/cjs/stories/carousel.stories.d.ts +62 -0
- package/dist/cjs/stories/category.stories.d.ts +17 -0
- package/dist/cjs/stories/checkbox.stories.d.ts +46 -0
- package/dist/cjs/stories/container.stories.d.ts +28 -0
- package/dist/cjs/stories/cpnBanner.stories.d.ts +14 -0
- package/dist/cjs/stories/cpnCountdown.stories.d.ts +12 -0
- package/dist/cjs/stories/cpnNavigation.stories.d.ts +14 -0
- package/dist/cjs/stories/cpnProductcard.stories.d.ts +14 -0
- package/dist/cjs/stories/cpnTitle.stories.d.ts +14 -0
- package/dist/cjs/stories/creativeModule.stories.d.ts +19 -0
- package/dist/cjs/stories/dialog.stories.d.ts +20 -0
- package/dist/cjs/stories/drawer.stories.d.ts +20 -0
- package/dist/cjs/stories/drop-down.stories.d.ts +16 -0
- package/dist/cjs/stories/evaluate.stories.d.ts +16 -0
- package/dist/cjs/stories/faq.stories.d.ts +21 -0
- package/dist/cjs/stories/graphic.stories.d.ts +63 -0
- package/dist/cjs/stories/graphicAttractionBlock.stories.d.ts +6 -0
- package/dist/cjs/stories/grid.stories.d.ts +22 -0
- package/dist/cjs/stories/heading.stories.d.ts +84 -0
- package/dist/cjs/stories/input-number.stories.d.ts +39 -0
- package/dist/cjs/stories/input.stories.d.ts +35 -0
- package/dist/cjs/stories/link.stories.d.ts +69 -0
- package/dist/cjs/stories/marquee.stories.d.ts +30 -0
- package/dist/cjs/stories/mediaplayerBase.stories.d.ts +6 -0
- package/dist/cjs/stories/mediaplayerMulti.stories.d.ts +16 -0
- package/dist/cjs/stories/picture.stories.d.ts +18 -0
- package/dist/cjs/stories/popover.stories.d.ts +17 -0
- package/dist/cjs/stories/radio.stories.d.ts +39 -0
- package/dist/cjs/stories/shelfDisplay.stories.d.ts +16 -0
- package/dist/cjs/stories/skeleton.stories.d.ts +20 -0
- package/dist/cjs/stories/slogan.stories.d.ts +20 -0
- package/dist/cjs/stories/tabs.stories.d.ts +373 -0
- package/dist/cjs/stories/text.stories.d.ts +86 -0
- package/dist/cjs/stories/whychoose.stories.d.ts +21 -0
- package/dist/cjs/tsconfig.tsbuildinfo +1 -0
- package/dist/cjs/types/index.d.ts +0 -0
- package/dist/cjs/types/props.d.ts +43 -0
- package/dist/esm/biz-components/AccordionCards/index.d.ts +38 -0
- package/dist/esm/biz-components/AiuiProvider/index.d.ts +12 -0
- package/dist/esm/biz-components/BrandEquity/BrandEquity.d.ts +6 -0
- package/dist/esm/biz-components/BrandEquity/index.d.ts +1 -0
- package/dist/esm/biz-components/BrandEquity/types.d.ts +18 -0
- package/dist/esm/biz-components/Category/SwiperCategory.d.ts +19 -0
- package/dist/esm/biz-components/Category/index.d.ts +35 -0
- package/dist/esm/biz-components/CreativeModule/index.d.ts +21 -0
- package/dist/esm/biz-components/Evaluate/index.d.ts +37 -0
- package/dist/esm/biz-components/Faq/Faq.d.ts +14 -0
- package/dist/esm/biz-components/Faq/index.d.ts +2 -0
- package/dist/esm/biz-components/Faq/types.d.ts +12 -0
- package/dist/esm/biz-components/FooterNavigation/icons/Add.d.ts +3 -0
- package/dist/esm/biz-components/FooterNavigation/icons/ArrowRight.d.ts +3 -0
- package/dist/esm/biz-components/FooterNavigation/icons/Country.d.ts +3 -0
- package/dist/esm/biz-components/FooterNavigation/icons/Subtract.d.ts +3 -0
- package/dist/esm/biz-components/FooterNavigation/icons/index.d.ts +5 -0
- package/dist/esm/biz-components/FooterNavigation/index.d.ts +6 -0
- package/dist/esm/biz-components/FooterNavigation/types.d.ts +13 -0
- package/dist/esm/biz-components/Graphic/index.d.ts +38 -0
- package/dist/esm/biz-components/GraphicAttractionBlock/index.d.ts +25 -0
- package/dist/esm/biz-components/GraphicOverlay/GraphicOverlay.d.ts +8 -0
- package/dist/esm/biz-components/GraphicOverlay/index.d.ts +2 -0
- package/dist/esm/biz-components/GraphicOverlay/types.d.ts +33 -0
- package/dist/esm/biz-components/HeaderNavigation/NavProvider.d.ts +32 -0
- package/dist/esm/biz-components/HeaderNavigation/icons/AnkerLogo.d.ts +3 -0
- package/dist/esm/biz-components/HeaderNavigation/icons/Cart.d.ts +3 -0
- package/dist/esm/biz-components/HeaderNavigation/icons/Close.d.ts +3 -0
- package/dist/esm/biz-components/HeaderNavigation/icons/DownArrow.d.ts +3 -0
- package/dist/esm/biz-components/HeaderNavigation/icons/LeftArrow.d.ts +3 -0
- package/dist/esm/biz-components/HeaderNavigation/icons/LogoLine.d.ts +3 -0
- package/dist/esm/biz-components/HeaderNavigation/icons/Menu.d.ts +3 -0
- package/dist/esm/biz-components/HeaderNavigation/icons/RightArrow.d.ts +3 -0
- package/dist/esm/biz-components/HeaderNavigation/icons/Search.d.ts +3 -0
- package/dist/esm/biz-components/HeaderNavigation/icons/User.d.ts +3 -0
- package/dist/esm/biz-components/HeaderNavigation/icons/index.d.ts +11 -0
- package/dist/esm/biz-components/HeaderNavigation/index.d.ts +7 -0
- package/dist/esm/biz-components/HeaderNavigation/types.d.ts +77 -0
- package/dist/esm/biz-components/HeaderNavigation/withCategory.d.ts +9 -0
- package/dist/esm/biz-components/HeroBanner/HeroBanner.d.ts +7 -0
- package/dist/esm/biz-components/HeroBanner/index.d.ts +1 -0
- package/dist/esm/biz-components/HeroBanner/types.d.ts +43 -0
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/ProductHighlight/index.js +1 -1
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/ProductHighlight/index.js.map +2 -2
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductGallery/components/CompareModal.js +1 -1
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductGallery/components/CompareModal.js.map +2 -2
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductGallery/components/SpecsModal.js +1 -1
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductGallery/components/SpecsModal.js.map +2 -2
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductGallery/index.js +1 -1
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductGallery/index.js.map +2 -2
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductSummary/index.js +1 -1
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductSummary/index.js.map +3 -3
- package/dist/esm/biz-components/Listing/components/PurchaseBar/ProductActions/index.js +1 -1
- package/dist/esm/biz-components/Listing/components/PurchaseBar/ProductActions/index.js.map +3 -3
- package/dist/esm/biz-components/Marquee/Marquee.d.ts +18 -0
- package/dist/esm/biz-components/Marquee/index.d.ts +2 -0
- package/dist/esm/biz-components/Marquee/type.d.ts +33 -0
- package/dist/esm/biz-components/MediaPlayerBase/index.d.ts +6 -0
- package/dist/esm/biz-components/MediaPlayerBase/right.d.ts +1 -0
- package/dist/esm/biz-components/MediaPlayerBase/types.d.ts +18 -0
- package/dist/esm/biz-components/MediaPlayerMulti/index.d.ts +6 -0
- package/dist/esm/biz-components/MediaPlayerMulti/types.d.ts +22 -0
- package/dist/esm/biz-components/MediaPlayerSticky/index.d.ts +9 -0
- package/dist/esm/biz-components/MediaPlayerSticky/types.d.ts +21 -0
- package/dist/esm/biz-components/MemberEquity/index.d.ts +7 -0
- package/dist/esm/biz-components/MemberEquity/types.d.ts +30 -0
- package/dist/esm/biz-components/MultiLayoutGraphicBlock/MultiLayoutGraphicBlock.d.ts +8 -0
- package/dist/esm/biz-components/MultiLayoutGraphicBlock/index.d.ts +2 -0
- package/dist/esm/biz-components/MultiLayoutGraphicBlock/types.d.ts +38 -0
- package/dist/esm/biz-components/ShelfDisplay/index.d.ts +7 -0
- package/dist/esm/biz-components/ShelfDisplay/index.js +1 -1
- package/dist/esm/biz-components/ShelfDisplay/index.js.map +2 -2
- package/dist/esm/biz-components/ShelfDisplay/shelfDisplay.d.ts +97 -0
- package/dist/esm/biz-components/ShelfDisplay/shelfDisplayItem.d.ts +8 -0
- package/dist/esm/biz-components/ShelfDisplay/shelfDisplayItem.js +4 -4
- package/dist/esm/biz-components/ShelfDisplay/shelfDisplayItem.js.map +2 -2
- package/dist/esm/biz-components/ShelfDisplay/tabSwitch.d.ts +9 -0
- package/dist/esm/biz-components/Slogan/index.d.ts +9 -0
- package/dist/esm/biz-components/Slogan/types.d.ts +31 -0
- package/dist/esm/biz-components/Spacer/index.d.ts +7 -0
- package/dist/esm/biz-components/Spacer/types.d.ts +10 -0
- package/dist/esm/biz-components/Specs/dropdown.js +1 -1
- package/dist/esm/biz-components/Specs/dropdown.js.map +3 -3
- package/dist/esm/biz-components/Subscribe/index.d.ts +13 -0
- package/dist/esm/biz-components/SwiperBox/index.d.ts +4 -0
- package/dist/esm/biz-components/SwiperBox/types.d.ts +17 -0
- package/dist/esm/biz-components/Tabs/Tabs.d.ts +7 -0
- package/dist/esm/biz-components/Tabs/index.d.ts +1 -0
- package/dist/esm/biz-components/Tabs/types.d.ts +29 -0
- package/dist/esm/biz-components/TextModal/index.d.ts +14 -0
- package/dist/esm/biz-components/Title/index.d.ts +7 -0
- package/dist/esm/biz-components/Title/types.d.ts +33 -0
- package/dist/esm/biz-components/VideoModal/YouTubePlayer.d.ts +4 -0
- package/dist/esm/biz-components/VideoModal/index.d.ts +8 -0
- package/dist/esm/biz-components/WhyChoose/WhyChoose.d.ts +14 -0
- package/dist/esm/biz-components/WhyChoose/index.d.ts +2 -0
- package/dist/esm/biz-components/WhyChoose/types.d.ts +12 -0
- package/dist/esm/biz-components/index.d.ts +29 -0
- package/dist/esm/components/alert.d.ts +17 -0
- package/dist/esm/components/avatar.d.ts +26 -0
- package/dist/esm/components/badge.d.ts +9 -0
- package/dist/esm/components/board.d.ts +4 -0
- package/dist/esm/components/button.d.ts +41 -0
- package/dist/esm/components/card.d.ts +8 -0
- package/dist/esm/components/carousel.d.ts +28 -0
- package/dist/esm/components/checkbox.d.ts +11 -0
- package/dist/esm/components/color.d.ts +13 -0
- package/dist/esm/components/container.d.ts +24 -0
- package/dist/esm/components/dialog.d.ts +19 -0
- package/dist/esm/components/dialog.js +1 -1
- package/dist/esm/components/dialog.js.map +2 -2
- package/dist/esm/components/drawer.d.ts +13 -0
- package/dist/esm/components/drop-down.d.ts +27 -0
- package/dist/esm/components/gird.d.ts +17 -0
- package/dist/esm/components/heading.d.ts +17 -0
- package/dist/esm/components/index.d.ts +25 -0
- package/dist/esm/components/input-number.d.ts +78 -0
- package/dist/esm/components/input.d.ts +22 -0
- package/dist/esm/components/link.d.ts +45 -0
- package/dist/esm/components/picture.d.ts +13 -0
- package/dist/esm/components/popover.d.ts +6 -0
- package/dist/esm/components/radio.d.ts +16 -0
- package/dist/esm/components/skeleton.d.ts +9 -0
- package/dist/esm/components/tabs.d.ts +11 -0
- package/dist/esm/components/text.d.ts +32 -0
- package/dist/esm/components/theme.d.ts +12 -0
- package/dist/esm/cpn-components/CpnBanner/index.d.ts +3 -0
- package/dist/esm/cpn-components/CpnBanner/types.d.ts +43 -0
- package/dist/esm/cpn-components/CpnCountDown/index.d.ts +3 -0
- package/dist/esm/cpn-components/CpnCountDown/types.d.ts +29 -0
- package/dist/esm/cpn-components/CpnNavigation/index.d.ts +3 -0
- package/dist/esm/cpn-components/CpnNavigation/types.d.ts +20 -0
- package/dist/esm/cpn-components/CpnProductCard/index.d.ts +3 -0
- package/dist/esm/cpn-components/CpnProductCard/types.d.ts +109 -0
- package/dist/esm/cpn-components/CpnTitle/index.d.ts +3 -0
- package/dist/esm/cpn-components/CpnTitle/types.d.ts +10 -0
- package/dist/esm/cpn-components/index.d.ts +5 -0
- package/dist/esm/helpers/ScrollLoadVideo.d.ts +15 -0
- package/dist/esm/helpers/component-props.d.ts +7 -0
- package/dist/esm/helpers/constants.d.ts +0 -0
- package/dist/esm/helpers/index.d.ts +2 -0
- package/dist/esm/helpers/utils.d.ts +5 -0
- package/dist/esm/hooks/useCountDown.d.ts +10 -0
- package/dist/esm/hooks/useExposure.d.ts +12 -0
- package/dist/esm/hooks/useIntersectionObserver.d.ts +17 -0
- package/dist/esm/icons/spinner.d.ts +5 -0
- package/dist/esm/index.d.ts +1 -0
- package/dist/esm/shared/Styles.d.ts +39 -0
- package/dist/esm/shared/getKeyPropsString.d.ts +4 -0
- package/dist/esm/shared/mimeType.d.ts +1 -0
- package/dist/esm/shared/simpleHash.d.ts +1 -0
- package/dist/esm/shared/throttle.d.ts +1 -0
- package/dist/esm/shared/track.d.ts +1 -0
- package/dist/esm/shared/trackUrlRef.d.ts +7 -0
- package/dist/esm/stories/HeroBanner.stories.d.ts +26 -0
- package/dist/esm/stories/MemberEquity.stories.d.ts +9 -0
- package/dist/esm/stories/MultiLayoutGraphicBlock.stories.d.ts +9 -0
- package/dist/esm/stories/accordionCards.stories.d.ts +17 -0
- package/dist/esm/stories/alert.stories.d.ts +27 -0
- package/dist/esm/stories/avatar.stories.d.ts +39 -0
- package/dist/esm/stories/badge.stories.d.ts +31 -0
- package/dist/esm/stories/bizTabs.stories.d.ts +7 -0
- package/dist/esm/stories/board.stories.d.ts +6 -0
- package/dist/esm/stories/brandEquity.stories.d.ts +16 -0
- package/dist/esm/stories/button.stories.d.ts +56 -0
- package/dist/esm/stories/card.stories.d.ts +27 -0
- package/dist/esm/stories/carousel.stories.d.ts +62 -0
- package/dist/esm/stories/category.stories.d.ts +17 -0
- package/dist/esm/stories/checkbox.stories.d.ts +46 -0
- package/dist/esm/stories/container.stories.d.ts +28 -0
- package/dist/esm/stories/cpnBanner.stories.d.ts +14 -0
- package/dist/esm/stories/cpnCountdown.stories.d.ts +12 -0
- package/dist/esm/stories/cpnNavigation.stories.d.ts +14 -0
- package/dist/esm/stories/cpnProductcard.stories.d.ts +14 -0
- package/dist/esm/stories/cpnTitle.stories.d.ts +14 -0
- package/dist/esm/stories/creativeModule.stories.d.ts +19 -0
- package/dist/esm/stories/dialog.stories.d.ts +20 -0
- package/dist/esm/stories/drawer.stories.d.ts +20 -0
- package/dist/esm/stories/drop-down.stories.d.ts +16 -0
- package/dist/esm/stories/evaluate.stories.d.ts +16 -0
- package/dist/esm/stories/faq.stories.d.ts +21 -0
- package/dist/esm/stories/graphic.stories.d.ts +63 -0
- package/dist/esm/stories/graphicAttractionBlock.stories.d.ts +6 -0
- package/dist/esm/stories/grid.stories.d.ts +22 -0
- package/dist/esm/stories/heading.stories.d.ts +84 -0
- package/dist/esm/stories/input-number.stories.d.ts +39 -0
- package/dist/esm/stories/input.stories.d.ts +35 -0
- package/dist/esm/stories/link.stories.d.ts +69 -0
- package/dist/esm/stories/marquee.stories.d.ts +30 -0
- package/dist/esm/stories/mediaplayerBase.stories.d.ts +6 -0
- package/dist/esm/stories/mediaplayerMulti.stories.d.ts +16 -0
- package/dist/esm/stories/picture.stories.d.ts +18 -0
- package/dist/esm/stories/popover.stories.d.ts +17 -0
- package/dist/esm/stories/radio.stories.d.ts +39 -0
- package/dist/esm/stories/shelfDisplay.stories.d.ts +16 -0
- package/dist/esm/stories/skeleton.stories.d.ts +20 -0
- package/dist/esm/stories/slogan.stories.d.ts +20 -0
- package/dist/esm/stories/tabs.stories.d.ts +373 -0
- package/dist/esm/stories/text.stories.d.ts +86 -0
- package/dist/esm/tsconfig.tsbuildinfo +1 -0
- package/dist/esm/types/index.d.ts +0 -0
- package/dist/esm/types/props.d.ts +43 -0
- package/package.json +1 -1
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import type { ContainerProps } from '../../types/props.js';
|
|
2
|
+
export declare const PRICE_SYMBOL: any;
|
|
3
|
+
export declare const languageTerritory: (locale: string) => string;
|
|
4
|
+
export declare function formatPrice({ amount, currencyCode, locale, maximumFractionDigits, minimumFractionDigits, removeTrailingZeros, }: {
|
|
5
|
+
amount: number;
|
|
6
|
+
currencyCode: string;
|
|
7
|
+
locale: string;
|
|
8
|
+
maximumFractionDigits?: number;
|
|
9
|
+
minimumFractionDigits?: number;
|
|
10
|
+
removeTrailingZeros?: boolean;
|
|
11
|
+
}): string;
|
|
12
|
+
export declare function formatVariantPrice({ amount, baseAmount, currencyCode, locale, maximumFractionDigits, minimumFractionDigits, removeTrailingZeros, }: {
|
|
13
|
+
baseAmount: number;
|
|
14
|
+
amount: number;
|
|
15
|
+
currencyCode: string;
|
|
16
|
+
locale: string;
|
|
17
|
+
maximumFractionDigits?: number;
|
|
18
|
+
minimumFractionDigits?: number;
|
|
19
|
+
removeTrailingZeros?: boolean;
|
|
20
|
+
}): {
|
|
21
|
+
price: string;
|
|
22
|
+
basePrice: string | undefined;
|
|
23
|
+
discount: string | null;
|
|
24
|
+
};
|
|
25
|
+
type EventType = {
|
|
26
|
+
primaryButton?: (v: any, index: number, data: ShelfDisplayType) => void;
|
|
27
|
+
secondaryButton?: (v: any, index: number, data: ShelfDisplayType) => void;
|
|
28
|
+
};
|
|
29
|
+
export interface ShelfDisplayItem {
|
|
30
|
+
id?: string;
|
|
31
|
+
/** 产品图片*/
|
|
32
|
+
img?: {
|
|
33
|
+
url: string;
|
|
34
|
+
};
|
|
35
|
+
handle?: string;
|
|
36
|
+
sku?: string;
|
|
37
|
+
/** 折扣后价格*/
|
|
38
|
+
price?: string;
|
|
39
|
+
title?: string;
|
|
40
|
+
/** 折扣前价格*/
|
|
41
|
+
basePrice?: string;
|
|
42
|
+
subTitle?: string;
|
|
43
|
+
/** 标签*/
|
|
44
|
+
tagItems?: string[];
|
|
45
|
+
tab?: string;
|
|
46
|
+
data?: ShelfDisplayItem[];
|
|
47
|
+
custom_name?: string;
|
|
48
|
+
custom_description?: string;
|
|
49
|
+
}
|
|
50
|
+
export type ShelfDisplayType = {
|
|
51
|
+
title?: string;
|
|
52
|
+
isShowTab?: boolean;
|
|
53
|
+
isShowTag?: boolean;
|
|
54
|
+
isShowRecommendedCard?: boolean;
|
|
55
|
+
isShowOriginalPrice?: boolean;
|
|
56
|
+
direction?: 'horizontal' | 'vertical';
|
|
57
|
+
align?: 'left' | 'center' | 'right';
|
|
58
|
+
productsTab?: any[];
|
|
59
|
+
productsCard?: any[];
|
|
60
|
+
/** 卡片形状 */
|
|
61
|
+
itemShape?: 'round' | 'square';
|
|
62
|
+
/** 按钮形状 */
|
|
63
|
+
shape?: 'round' | 'square';
|
|
64
|
+
/** 标签页形状*/
|
|
65
|
+
tabShape?: 'rounded' | 'square';
|
|
66
|
+
/** 主按钮配置 */
|
|
67
|
+
primaryButton?: string;
|
|
68
|
+
primaryFun?: 'AddCart' | 'BuyNow' | 'LearnMore';
|
|
69
|
+
/** 副按钮配置 */
|
|
70
|
+
secondaryButton?: string;
|
|
71
|
+
secondaryFun?: 'AddCart' | 'BuyNow' | 'LearnMore';
|
|
72
|
+
theme?: 'light' | 'dark';
|
|
73
|
+
containerProps?: ContainerProps;
|
|
74
|
+
};
|
|
75
|
+
export interface ShelfDisplayProps {
|
|
76
|
+
data: ShelfDisplayType;
|
|
77
|
+
buildData?: {
|
|
78
|
+
categories: any[];
|
|
79
|
+
products: any[];
|
|
80
|
+
};
|
|
81
|
+
recommendedData?: any[];
|
|
82
|
+
/** 按钮事件*/
|
|
83
|
+
event?: EventType;
|
|
84
|
+
className?: string;
|
|
85
|
+
key?: string;
|
|
86
|
+
target?: '_self' | '_blank';
|
|
87
|
+
breakpoints?: {
|
|
88
|
+
[key: number]: {
|
|
89
|
+
spaceBetween: number;
|
|
90
|
+
freeMode: boolean;
|
|
91
|
+
slidesPerView: number;
|
|
92
|
+
};
|
|
93
|
+
};
|
|
94
|
+
isDisplayGudgments?: boolean;
|
|
95
|
+
isDisplayBackImage?: boolean;
|
|
96
|
+
}
|
|
97
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export declare const ShelfDisplayWrapItem: ({ data, configuration }: {
|
|
2
|
+
data: any;
|
|
3
|
+
configuration?: any;
|
|
4
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
export declare const ShelfDisplayHorizontalItem: ({ data, configuration }: {
|
|
6
|
+
data: any;
|
|
7
|
+
configuration?: any;
|
|
8
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
"use strict";var K=Object.create;var
|
|
1
|
+
"use strict";var K=Object.create;var N=Object.defineProperty;var Q=Object.getOwnPropertyDescriptor;var X=Object.getOwnPropertyNames;var Y=Object.getPrototypeOf,Z=Object.prototype.hasOwnProperty;var ee=(e,t)=>{for(var n in t)N(e,n,{get:t[n],enumerable:!0})},q=(e,t,n,x)=>{if(t&&typeof t=="object"||typeof t=="function")for(let c of X(t))!Z.call(e,c)&&c!==n&&N(e,c,{get:()=>t[c],enumerable:!(x=Q(t,c))||x.enumerable});return e};var z=(e,t,n)=>(n=e!=null?K(Y(e)):{},q(t||!e||!e.__esModule?N(n,"default",{value:e,enumerable:!0}):n,e)),te=e=>q(N({},"__esModule",{value:!0}),e);var oe={};ee(oe,{ShelfDisplayHorizontalItem:()=>le,ShelfDisplayWrapItem:()=>se});module.exports=te(oe);var s=require("react/jsx-runtime"),E=require("../AiuiProvider/index.js"),F=require("./shelfDisplay.js"),D=z(require("../../components/picture.js")),U=z(require("../../components/badge.js")),d=require("../../helpers/utils.js"),W=require("../../components/text.js"),k=z(require("../../components/button.js")),A=require("../../shared/track.js"),R=require("../../shared/trackUrlRef.js"),M=require("../../components/heading.js"),V=require("../../hooks/useExposure.js"),u=require("react");const T="image",B="product_shelf",G=999999999e-2,se=({data:e,configuration:t})=>{const{isDisplayBackImage:n=!1,itemShape:x,metafields:c}=t||{},{locale:f="us",copyWriting:b}=(0,E.useAiuiContext)(),{discounts:C}=c||{},w=(0,u.useRef)(null),[$,S]=(0,u.useState)([]),I=(i,l,a)=>t?.event?.primaryButton?.(i,l+1,a),P=(i,l,a)=>t?.event?.secondaryButton?.(i,l+1,a),o=e?.variants?.find(i=>i?.sku===e?.sku)||e?.variants?.[0]||{},j=!o?.availableForSale&&o?.price?.amount===G,O=t?.isShowTag,g=t?.isShowOriginalPrice,h=o?.coupons?.[0],{price:H,basePrice:L,discount:m}=(0,F.formatVariantPrice)({locale:f,amount:g&&h?h.variant_price4wscode:o.price,baseAmount:g&&h?o.price:0,currencyCode:e?.price?.currencyCode||"USD"}),_=()=>{const i=e?.sku,l=e?.variants;return l?.find(r=>r?.sku===i)?.image?.url||l?.[0]?.image?.url||""},p=e?.custom_name||e?.title,v=e?.custom_description||e?.description;(0,u.useEffect)(()=>{let i=[];if(m){const a=`${m}${C?.off||""}`;i.push(a)}const l=e?.tags?.filter?.(a=>a?.startsWith?.("CLtag"))?.map?.(a=>a?.replace?.("CLtag:",""))?.slice?.(0,m?1:2);S(i.concat(l))},[e?.tags,m]),(0,V.useExposure)(w,{componentType:T,componentName:B,componentTitle:p,componentDescription:v,position:t?.index+1});const y=()=>(0,s.jsxs)(s.Fragment,{children:[O?(0,s.jsx)("div",{className:"mb-1 box-border flex h-8 flex-wrap gap-1 overflow-hidden",children:$?.map?.((i,l)=>(0,s.jsx)(U.default,{children:i},l))}):null,p?(0,s.jsx)(M.Heading,{as:"h3",title:p||"",size:2,className:"shelf-display-product-title mb-1 line-clamp-2",html:p||""}):null,v?(0,s.jsx)(W.Text,{size:2,className:"lg-desktop:text-lg lg-desktop:h-[26px] desktop:text-base desktop:h-6 shelf-display-product-description line-clamp-1 h-5 text-sm",html:v||""}):null,(0,s.jsx)("div",{className:"mb-2 mt-5 flex items-center",children:j?(0,s.jsx)("div",{className:"tablet:text-2xl text-info-primary text-xl font-bold",children:b?.soldOutText}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("div",{className:"final-price tablet:text-2xl text-info-primary text-xl font-bold",children:o?.availableForSale&&H||""}),(0,s.jsx)("div",{className:"origin-price tablet:text-xl text-info-secondary ml-1 text-lg font-bold line-through",children:o?.availableForSale&&L||""})]})}),(0,s.jsxs)("div",{className:(0,d.cn)("shelf-flex-button-group","lg-desktop:gap-3 flex items-center gap-2",t.direction==="vertical"?"flex-col":""),children:[t?.secondaryButton?(0,s.jsx)(k.default,{variant:"secondary",onClick:()=>P(e,t?.index,t),className:`
|
|
2
2
|
${t.direction==="vertical"?"w-full":""}
|
|
3
3
|
`,children:t?.secondaryButton||""}):null,t?.primaryButton?(0,s.jsx)(k.default,{variant:"primary",onClick:()=>I(e,t?.index,t),className:`
|
|
4
4
|
${t.direction==="vertical"?"w-full":""}
|
|
5
|
-
`,children:t?.primaryButton||""}):null]})]});return(0,s.jsx)("div",{ref:w,className:(0,d.cn)("bg-container-secondary-1 tablet:hover:bg-info-white box-border w-full cursor-pointer overflow-hidden duration-300",x==="round"?"rounded-2xl":"rounded-none","lg-desktop:aspect-w-[404] lg-desktop:aspect-h-[480] desktop:aspect-w-[316] desktop:aspect-h-[384]","laptop:aspect-w-[288] laptop:aspect-h-[360] aspect-w-[296] aspect-h-[360] relative","md-tablet:h-[360px]
|
|
5
|
+
`,children:t?.primaryButton||""}):null]})]});return(0,s.jsx)("div",{ref:w,className:(0,d.cn)("bg-container-secondary-1 tablet:hover:bg-info-white box-border w-full cursor-pointer overflow-hidden duration-300",x==="round"?"rounded-2xl":"rounded-none","lg-desktop:aspect-w-[404] lg-desktop:aspect-h-[480] desktop:aspect-w-[316] desktop:aspect-h-[384]","laptop:aspect-w-[288] laptop:aspect-h-[360] aspect-w-[296] aspect-h-[360] relative","md-tablet:h-[360px]"),children:n?(0,s.jsx)("div",{className:"absolute inset-0 box-border overflow-hidden",children:(0,s.jsxs)("div",{className:"relative inset-0 size-full",children:[(0,s.jsx)(D.default,{source:_(),alt:"",className:"flex h-full justify-center object-cover [&_img]:w-auto"}),(0,s.jsx)("div",{className:"desktop:p-6 absolute inset-x-0 bottom-0 box-border overflow-hidden p-4",children:y()})]})}):(0,s.jsxs)("div",{className:"desktop:p-6 absolute inset-0 box-border flex flex-col justify-between overflow-hidden p-4",children:[(0,s.jsx)("div",{className:(0,d.cn)("lg-desktop:mb-3 lg-desktop:h-[195px] relative mb-2 inline-block h-[140px] w-full flex-1 overflow-hidden"),children:(0,s.jsx)("a",{"aria-label":p,target:t?.target,href:(0,R.trackUrlRef)(`${f==="us"||!f?"":`/${f}`}/products/${e?.handle}`,`${T}_${B}`),onClick:()=>{(0,A.gaTrack)({event:"ga4Event",event_name:"select_item",event_parameters:{page_group:"Home Page",item_list_name:"Home_Page_Bundle",items:[{item_id:e?.sku||o?.sku,item_name:e?.name,item_variant:o?.name,price:o?.price,index:t?.index+1}]}})},children:(0,s.jsx)(D.default,{source:_(),alt:"",className:"flex h-full justify-center object-cover [&_img]:w-auto"})})}),y()]})},e?.id||e?.handle)},le=({data:e,configuration:t})=>{const{itemShape:n,itemLength:x,metafields:c}=t||{},{discounts:f}=c||{},{locale:b="us",copyWriting:C}=(0,E.useAiuiContext)(),[w,$]=(0,u.useState)([]),S=(0,u.useRef)(null),I=(l,a,r)=>t?.event?.primaryButton?.(l,a+1,r),P=(l,a,r)=>t?.event?.secondaryButton?.(l,a+1,r),o=e?.variants?.find(l=>l?.sku===e?.sku)||e?.variants?.[0]||{},j=!o?.availableForSale&&o?.price?.amount===G,O=t?.isShowTag,g=t?.isShowOriginalPrice,h=o?.coupons?.[0],{price:H,basePrice:L,discount:m}=(0,F.formatVariantPrice)({locale:b,amount:g&&h?h.variant_price4wscode:o.price,baseAmount:g&&h?o.price:0,currencyCode:e?.price?.currencyCode||"USD"}),_=()=>{const l=e?.sku,a=e?.variants;return a?.find(J=>J?.sku===l)?.image?.url||a?.[0]?.image?.url||""},p=e?.custom_name||e?.title,v=e?.custom_description||e?.description;(0,V.useExposure)(S,{componentType:T,componentName:B,componentTitle:p,componentDescription:v,position:t?.index+1});const y=()=>x>=2?{boxItem:"lg-desktop:max-w-[401px] desktop:max-w-[292px] max-w-full",imgItem:"m-tablet:m-auto lg-desktop:max-w-[330px] lg-desktop:max-h-[330px] desktop:max-w-[260px] desktop:max-h-[260px] max-w-[138px] max-h-[138px]",wrap:"lg-desktop:aspect-w-[824] lg-desktop:aspect-h-[480] desktop:aspect-w-[648] desktop:aspect-h-[380] laptop:aspect-w-[440] laptop:aspect-h-[356] tablet:aspect-w-[346] tablet:aspect-h-[360] md-tablet:w-full"}:{boxItem:"lg-desktop:max-w-[401px] desktop:max-w-[292px] laptop:max-w-[289px] max-w-[262px]",imgItem:"md-tablet:m-auto lg-desktop:max-w-[450px] lg-desktop:max-h-[450px] desktop:max-w-[332px] desktop:max-h-[332px] max-w-[312px] max-h-[312px]",wrap:"lg-desktop:aspect-w-[1664] lg-desktop:aspect-h-[480] desktop:aspect-w-[1312] desktop:aspect-h-[380] laptop:aspect-w-[896] laptop:aspect-h-[356] tablet:aspect-w-[704] tablet:aspect-h-[360] md-tablet:w-full"},i=()=>x>=2?"flex flex-col justify-between desktop:gap-12 desktop:flex-row desktop:justify-center desktop:items-center":"flex justify-center items-center gap-6 md-tablet:flex-col";return(0,u.useEffect)(()=>{let l=[];if(m){const r=`${m}${f?.off||""}`;l.push(r)}const a=e?.tags?.filter?.(r=>r?.startsWith?.("CLtag"))?.map?.(r=>r?.replace?.("CLtag:",""))?.slice?.(0,m?1:2);$(l.concat(a))},[e?.tags,m]),(0,s.jsx)("div",{ref:S,className:(0,d.cn)(y().wrap,n==="round"?"rounded-2xl":"rounded-none","bg-container-secondary-1 tablet:hover:bg-info-white duration-300 gap-6","box-border w-full cursor-pointer overflow-hidden relative md-tablet:h-[360px]"),children:(0,s.jsxs)("div",{className:(0,d.cn)(i(),"desktop:p-6 absolute inset-0 box-border overflow-hidden p-4"),children:[(0,s.jsx)("div",{className:(0,d.cn)(y().imgItem,"relative overflow-hidden desktop:mb-0 mb-1"),children:(0,s.jsx)("a",{"aria-label":p,target:t?.target,href:(0,R.trackUrlRef)(`${b==="us"||!b?"":`/${b}`}/products/${e?.handle}`,`${T}_${B}`),onClick:()=>{(0,A.gaTrack)({event:"ga4Event",event_name:"select_item",event_parameters:{page_group:"Home Page",item_list_name:"Home_Page_Bundle",items:[{item_id:e?.sku||o?.sku,item_name:e?.name,item_variant:o?.name,price:o?.price,index:t?.index+1}]}})},children:(0,s.jsx)(D.default,{source:_(),alt:"",className:"flex h-full justify-center object-cover [&_img]:w-auto"})})}),(0,s.jsxs)("div",{className:(0,d.cn)("flex flex-col justify-center items-start",y().boxItem),children:[O?(0,s.jsx)("div",{className:"mb-1 box-border flex h-8 flex-wrap gap-1 overflow-hidden",children:w?.map?.((l,a)=>(0,s.jsx)(U.default,{children:l},a))}):null,p?(0,s.jsx)(M.Heading,{as:"h3",title:p||"",size:2,className:"shelf-display-product-title mb-1 line-clamp-2",html:p||""}):null,v?(0,s.jsx)(W.Text,{size:2,className:"lg-desktop:text-lg lg-desktop:h-[26px] desktop:text-base desktop:h-6 shelf-display-product-description line-clamp-1 h-5 text-sm",html:v||""}):null,(0,s.jsx)("div",{className:"mb-2 mt-5 flex items-center",children:j?(0,s.jsx)("div",{className:"tablet:text-2xl text-info-primary text-xl font-bold",children:C?.soldOutText}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("div",{className:"final-price tablet:text-2xl text-info-primary text-xl font-bold",children:o?.availableForSale&&H||""}),(0,s.jsx)("div",{className:"origin-price tablet:text-xl text-info-secondary ml-1 text-lg font-bold line-through",children:o?.availableForSale&&L||""})]})}),(0,s.jsxs)("div",{className:(0,d.cn)("shelf-flex-button-group","lg-desktop:gap-3 flex items-center gap-2",t.direction==="vertical"?"flex-col":""),children:[t?.secondaryButton?(0,s.jsx)(k.default,{variant:"secondary",onClick:()=>P(e,t?.index,t),className:`
|
|
6
6
|
${t.direction==="vertical"?"w-full":""}
|
|
7
7
|
`,children:t?.secondaryButton||""}):null,t?.primaryButton?(0,s.jsx)(k.default,{variant:"primary",onClick:()=>I(e,t?.index,t),className:`
|
|
8
8
|
${t.direction==="vertical"?"w-full":""}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/biz-components/ShelfDisplay/shelfDisplayItem.tsx"],
|
|
4
|
-
"sourcesContent": ["import { useAiuiContext } from '../AiuiProvider/index.js'\nimport { formatVariantPrice } from './shelfDisplay.js'\nimport Picture from '../../components/picture.js'\nimport Badge from '../../components/badge.js'\nimport { cn } from '../../helpers/utils.js'\nimport { Text } from '../../components/text.js'\nimport Button from '../../components/button.js'\nimport { gaTrack } from '../../shared/track.js'\nimport { trackUrlRef } from '../../shared/trackUrlRef.js'\nimport { Heading } from '../../components/heading.js'\nimport type { ShelfDisplayItem, ShelfDisplayType } from './shelfDisplay.js'\nimport { useExposure } from '../../hooks/useExposure.js'\nimport { useRef, useEffect, useState } from 'react'\n\nconst componentType = 'image'\nconst componentName = 'product_shelf'\n\nconst SOLD_OUT_PRICE = 9999999.99\n\nexport const ShelfDisplayWrapItem = ({ data, configuration }: { data: any; configuration?: any }) => {\n const { isDisplayBackImage = false, itemShape, metafields } = configuration || {}\n const { locale = 'us', copyWriting } = useAiuiContext()\n const { discounts } = metafields || {}\n const ref = useRef<HTMLDivElement>(null)\n const [showTags, setShowTags] = useState<string[]>([])\n\n const onPrimaryButton = (params: ShelfDisplayItem, index: number, data: ShelfDisplayType) =>\n configuration?.event?.primaryButton?.(params, index + 1, data)\n\n const onSecondaryButton = (params: ShelfDisplayItem, index: number, data: ShelfDisplayType) =>\n configuration?.event?.secondaryButton?.(params, index + 1, data)\n\n const variant = data?.variants?.find((item: any) => item?.sku === data?.sku) || data?.variants?.[0] || {}\n\n const isSoldOut = !variant?.availableForSale && variant?.price?.amount === SOLD_OUT_PRICE\n const isShowTag = configuration?.isShowTag\n const isShowOriginalPrice = configuration?.isShowOriginalPrice\n\n // active \u7684 \u901A\u7528\u6298\u6263\n const coupon = variant?.coupons?.[0]\n\n const { price, basePrice, discount } = formatVariantPrice({\n locale: locale,\n amount: isShowOriginalPrice && coupon ? coupon.variant_price4wscode : variant.price,\n baseAmount: isShowOriginalPrice && coupon ? variant.price : 0,\n currencyCode: data?.price?.currencyCode || 'USD',\n })\n\n const handleUrl = () => {\n const sku = data?.sku\n const skuArray = data?.variants\n const findSku = skuArray?.find((item: any) => item?.sku === sku)\n return findSku?.image?.url || skuArray?.[0]?.image?.url || ''\n }\n\n const displayTitle = data?.custom_name || data?.title\n const displayDescription = data?.custom_description || data?.description\n\n // \u5904\u7406\u6807\u7B7E\n useEffect(() => {\n let handleTags: string[] = []\n if (discount) {\n const discountTag = `${discount}${discounts?.off || ''}`\n handleTags.push(discountTag)\n }\n const newTags = data?.tags\n ?.filter?.((item: string) => item?.startsWith?.('CLtag'))\n ?.map?.((item: string) => item?.replace?.('CLtag:', ''))\n ?.slice?.(0, discount ? 1 : 2)\n setShowTags(handleTags.concat(newTags))\n }, [data?.tags, discount])\n\n useExposure(ref, {\n componentType,\n componentName,\n componentTitle: displayTitle,\n componentDescription: displayDescription,\n position: configuration?.index + 1,\n })\n\n const bottomContent = () => {\n return (\n <>\n {isShowTag && showTags?.length > 0 ? (\n <div className=\"mb-1 box-border flex h-8 flex-wrap gap-1 overflow-hidden\">\n {showTags?.map?.((item: any, index: number) => <Badge key={index} className=\"shelf-items-tag\">{item}</Badge>)}\n </div>\n ) : null}\n {displayTitle ? (\n <Heading\n as=\"h3\"\n title={displayTitle || ''}\n size={2}\n className=\"shelf-display-product-title mb-1 line-clamp-2\"\n html={displayTitle || ''}\n />\n ) : null}\n {displayDescription ? (\n <Text\n size={2}\n className=\"lg-desktop:text-lg lg-desktop:h-[26px] desktop:text-base desktop:h-6 shelf-display-product-description line-clamp-1 h-5 text-sm\"\n html={displayDescription || ''}\n />\n ) : null}\n <div className=\"mb-3 mt-5 flex items-center\">\n {isSoldOut ? (\n <div className=\"tablet:text-2xl text-info-primary text-xl font-bold\">{copyWriting?.soldOutText}</div>\n ) : (\n <>\n <div className=\"final-price tablet:text-2xl text-info-primary text-xl font-bold\">\n {variant?.availableForSale ? price || '' : ''}\n </div>\n <div className=\"origin-price tablet:text-xl text-info-secondary ml-1 text-lg font-bold line-through\">\n {variant?.availableForSale ? basePrice || '' : ''}\n </div>\n </>\n )}\n </div>\n {/* \u6309\u94AE\u7EC4 */}\n <div\n className={cn(\n 'shelf-flex-button-group',\n 'lg-desktop:gap-3 flex items-center gap-2',\n configuration.direction === 'vertical' ? 'flex-col' : ''\n )}\n >\n {configuration?.secondaryButton ? (\n <Button\n variant=\"secondary\"\n onClick={() => onSecondaryButton(data, configuration?.index, configuration)}\n className={`\n ${configuration.direction === 'vertical' ? 'w-full' : ''}\n `}\n >\n {configuration?.secondaryButton || ''}\n </Button>\n ) : null}\n {configuration?.primaryButton ? (\n <Button\n variant=\"primary\"\n onClick={() => onPrimaryButton(data, configuration?.index, configuration)}\n className={`\n ${configuration.direction === 'vertical' ? 'w-full' : ''}\n `}\n >\n {configuration?.primaryButton || ''}\n </Button>\n ) : null}\n </div>\n </>\n )\n }\n\n return (\n <div\n ref={ref}\n key={data?.id || data?.handle}\n className={cn(\n 'bg-container-secondary-1 tablet:hover:bg-info-white box-border w-full cursor-pointer overflow-hidden duration-300',\n itemShape === 'round' ? 'rounded-2xl' : 'rounded-none',\n 'lg-desktop:aspect-w-[404] lg-desktop:aspect-h-[480] desktop:aspect-w-[316] desktop:aspect-h-[384]',\n 'laptop:aspect-w-[288] laptop:aspect-h-[360] aspect-w-[296] aspect-h-[360] relative',\n 'md-tablet:h-[360px] shelf-display-item'\n )}\n >\n {isDisplayBackImage ? (\n <div className=\"absolute inset-0 box-border overflow-hidden\">\n <div className=\"relative inset-0 size-full\">\n <Picture source={handleUrl()} alt=\"\" className=\"flex h-full justify-center object-cover [&_img]:w-auto\" />\n <div className=\"desktop:p-6 absolute inset-x-0 bottom-0 box-border overflow-hidden p-4\">\n {bottomContent()}\n </div>\n </div>\n </div>\n ) : (\n <div className=\"desktop:p-6 absolute inset-0 box-border flex flex-col justify-between overflow-hidden p-4\">\n <div\n className={cn(\n 'lg-desktop:mb-3 lg-desktop:h-[195px] relative mb-2 inline-block h-[140px] w-full flex-1 overflow-hidden'\n )}\n >\n <a\n aria-label={displayTitle}\n target={configuration?.target}\n href={trackUrlRef(\n `${locale === 'us' || !locale ? '' : `/${locale}`}/products/${data?.handle}`,\n `${componentType}_${componentName}`\n )}\n onClick={() => {\n gaTrack({\n event: 'ga4Event',\n event_name: 'select_item',\n event_parameters: {\n page_group: 'Home Page',\n item_list_name: 'Home_Page_Bundle',\n items: [\n {\n item_id: data?.sku || variant?.sku,\n item_name: data?.name,\n item_variant: variant?.name,\n price: variant?.price,\n index: configuration?.index + 1,\n },\n ],\n },\n })\n }}\n >\n <Picture source={handleUrl()} alt=\"\" className=\"flex h-full justify-center object-cover [&_img]:w-auto\" />\n </a>\n </div> \n {bottomContent()}\n </div>\n )}\n </div>\n )\n}\n\nexport const ShelfDisplayHorizontalItem = ({ data, configuration }: { data: any; configuration?: any }) => {\n const { itemShape, itemLength, metafields } = configuration || {}\n const { discounts } = metafields || {}\n const { locale = 'us', copyWriting } = useAiuiContext()\n const [showTags, setShowTags] = useState<string[]>([])\n const ref = useRef<HTMLDivElement>(null)\n\n const onPrimaryButton = (params: ShelfDisplayItem, index: number, data: ShelfDisplayType) =>\n configuration?.event?.primaryButton?.(params, index + 1, data)\n\n const onSecondaryButton = (params: ShelfDisplayItem, index: number, data: ShelfDisplayType) =>\n configuration?.event?.secondaryButton?.(params, index + 1, data)\n\n const variant = data?.variants?.find((item: any) => item?.sku === data?.sku) || data?.variants?.[0] || {}\n\n const isSoldOut = !variant?.availableForSale && variant?.price?.amount === SOLD_OUT_PRICE\n const isShowTag = configuration?.isShowTag\n const isShowOriginalPrice = configuration?.isShowOriginalPrice\n\n // active \u7684 \u901A\u7528\u6298\u6263\n const coupon = variant?.coupons?.[0]\n\n const { price, basePrice, discount } = formatVariantPrice({\n locale: locale,\n amount: isShowOriginalPrice && coupon ? coupon.variant_price4wscode : variant.price,\n baseAmount: isShowOriginalPrice && coupon ? variant.price : 0,\n currencyCode: data?.price?.currencyCode || 'USD',\n })\n\n const handleUrl = () => {\n const sku = data?.sku\n const skuArray = data?.variants\n const findSku = skuArray?.find((item: any) => item?.sku === sku)\n return findSku?.image?.url || skuArray?.[0]?.image?.url || ''\n }\n\n const displayTitle = data?.custom_name || data?.title\n const displayDescription = data?.custom_description || data?.description\n\n useExposure(ref, {\n componentType,\n componentName,\n componentTitle: displayTitle,\n componentDescription: displayDescription,\n position: configuration?.index + 1,\n })\n\n const showSizeClass = (): {\n boxItem: string\n imgItem: string\n wrap: string\n } => {\n if (itemLength >= 2) {\n return {\n boxItem: 'lg-desktop:max-w-[401px] desktop:max-w-[292px] max-w-full',\n imgItem:\n 'm-tablet:m-auto lg-desktop:max-w-[330px] lg-desktop:max-h-[330px] desktop:max-w-[260px] desktop:max-h-[260px] max-w-[138px] max-h-[138px]',\n wrap: 'lg-desktop:aspect-w-[824] lg-desktop:aspect-h-[480] desktop:aspect-w-[648] desktop:aspect-h-[380] laptop:aspect-w-[440] laptop:aspect-h-[356] tablet:aspect-w-[346] tablet:aspect-h-[360] md-tablet:w-full',\n }\n }\n return {\n boxItem: 'lg-desktop:max-w-[401px] desktop:max-w-[292px] laptop:max-w-[289px] max-w-[262px]',\n imgItem:\n 'md-tablet:m-auto lg-desktop:max-w-[450px] lg-desktop:max-h-[450px] desktop:max-w-[332px] desktop:max-h-[332px] max-w-[312px] max-h-[312px]',\n wrap: 'lg-desktop:aspect-w-[1664] lg-desktop:aspect-h-[480] desktop:aspect-w-[1312] desktop:aspect-h-[380] laptop:aspect-w-[896] laptop:aspect-h-[356] tablet:aspect-w-[704] tablet:aspect-h-[360] md-tablet:w-full',\n }\n }\n\n const handleWrapClass = () => {\n if (itemLength >= 2) {\n return 'flex flex-col justify-between desktop:gap-12 desktop:flex-row desktop:justify-center desktop:items-center'\n }\n return 'flex justify-center items-center gap-6 md-tablet:flex-col'\n }\n\n // \u5904\u7406\u6807\u7B7E\n useEffect(() => {\n let handleTags: string[] = []\n if (discount) {\n const discountTag = `${discount}${discounts?.off || ''}`\n handleTags.push(discountTag)\n }\n const newTags = data?.tags\n ?.filter?.((item: string) => item?.startsWith?.('CLtag'))\n ?.map?.((item: string) => item?.replace?.('CLtag:', ''))\n ?.slice?.(0, discount ? 1 : 2)\n setShowTags(handleTags.concat(newTags))\n }, [data?.tags, discount])\n\n return (\n <div\n ref={ref}\n key={data?.id || data?.handle}\n className={cn(\n showSizeClass().wrap,\n itemShape === 'round' ? 'rounded-2xl' : 'rounded-none',\n 'shelf-display-item',\n 'bg-container-secondary-1 tablet:hover:bg-info-white duration-300 gap-6',\n 'box-border w-full cursor-pointer overflow-hidden relative md-tablet:h-[360px]'\n )}\n >\n <div className={cn(handleWrapClass(), 'desktop:p-6 absolute inset-0 box-border overflow-hidden p-4')}>\n <div className={cn(showSizeClass().imgItem, 'relative overflow-hidden desktop:mb-0 mb-1')}>\n <a\n aria-label={displayTitle}\n target={configuration?.target}\n href={trackUrlRef(\n `${locale === 'us' || !locale ? '' : `/${locale}`}/products/${data?.handle}`,\n `${componentType}_${componentName}`\n )}\n onClick={() => {\n gaTrack({\n event: 'ga4Event',\n event_name: 'select_item',\n event_parameters: {\n page_group: 'Home Page',\n item_list_name: 'Home_Page_Bundle',\n items: [\n {\n item_id: data?.sku || variant?.sku,\n item_name: data?.name,\n item_variant: variant?.name,\n price: variant?.price,\n index: configuration?.index + 1,\n },\n ],\n },\n })\n }}\n >\n <Picture source={handleUrl()} alt=\"\" className=\"flex h-full justify-center object-cover [&_img]:w-auto\" />\n </a>\n </div>\n <div className={cn('flex flex-col justify-center items-start', showSizeClass().boxItem)}>\n {isShowTag ? (\n <div className=\"mb-1 box-border flex h-8 flex-wrap gap-1 overflow-hidden\">\n {showTags?.map?.((item: any, index: number) => (\n <Badge key={index} className=\"shelf-items-tag\">\n {item}\n </Badge>\n ))}\n </div>\n ) : null}\n {displayTitle ? (\n <Heading\n as=\"h3\"\n title={displayTitle || ''}\n size={2}\n className=\"shelf-display-product-title mb-1 line-clamp-2\"\n html={displayTitle || ''}\n />\n ) : null}\n {displayDescription ? (\n <Text\n size={2}\n className=\"lg-desktop:text-lg lg-desktop:h-[26px] desktop:text-base desktop:h-6 shelf-display-product-description line-clamp-1 h-5 text-sm\"\n html={displayDescription || ''}\n />\n ) : null}\n <div className=\"mb-2 mt-5 flex items-center\">\n {isSoldOut ? (\n <div className=\"tablet:text-2xl text-info-primary text-xl font-bold\">{copyWriting?.soldOutText}</div>\n ) : (\n <>\n <div className=\"final-price tablet:text-2xl text-info-primary text-xl font-bold\">\n {variant?.availableForSale ? price || '' : ''}\n </div>\n <div className=\"origin-price tablet:text-xl text-info-secondary ml-1 text-lg font-bold line-through\">\n {variant?.availableForSale ? basePrice || '' : ''}\n </div>\n </>\n )}\n </div>\n {/* \u6309\u94AE\u7EC4 */}\n <div\n className={cn(\n 'shelf-flex-button-group',\n 'lg-desktop:gap-3 flex items-center gap-2',\n configuration.direction === 'vertical' ? 'flex-col' : ''\n )}\n >\n {configuration?.secondaryButton ? (\n <Button\n variant=\"secondary\"\n onClick={() => onSecondaryButton(data, configuration?.index, configuration)}\n className={`\n ${configuration.direction === 'vertical' ? 'w-full' : ''}\n `}\n >\n {configuration?.secondaryButton || ''}\n </Button>\n ) : null}\n {configuration?.primaryButton ? (\n <Button\n variant=\"primary\"\n onClick={() => onPrimaryButton(data, configuration?.index, configuration)}\n className={`\n ${configuration.direction === 'vertical' ? 'w-full' : ''}\n `}\n >\n {configuration?.primaryButton || ''}\n </Button>\n ) : null}\n </div>\n </div>\n </div>\n </div>\n )\n}\n"],
|
|
5
|
-
"mappings": "4jBAAA,IAAAA,GAAA,GAAAC,GAAAD,GAAA,gCAAAE,GAAA,yBAAAC,KAAA,eAAAC,GAAAJ,IAqF2D,IAAAK,EAAA,6BArF3DC,EAA+B,oCAC/BC,EAAmC,6BACnCC,EAAoB,0CACpBC,EAAkB,wCAClBC,EAAmB,kCACnBC,EAAqB,oCACrBC,EAAmB,yCACnBC,EAAwB,iCACxBC,EAA4B,uCAC5BC,EAAwB,uCAExBC,EAA4B,sCAC5BC,EAA4C,iBAE5C,MAAMC,EAAgB,QAChBC,EAAgB,gBAEhBC,EAAiB,aAEVjB,GAAuB,CAAC,CAAE,KAAAkB,EAAM,cAAAC,CAAc,IAA0C,CACnG,KAAM,CAAE,mBAAAC,EAAqB,GAAO,UAAAC,EAAW,WAAAC,CAAW,EAAIH,GAAiB,CAAC,EAC1E,CAAE,OAAAI,EAAS,KAAM,YAAAC,CAAY,KAAI,kBAAe,EAChD,CAAE,UAAAC,CAAU,EAAIH,GAAc,CAAC,EAC/BI,KAAM,UAAuB,IAAI,EACjC,CAACC,EAAUC,CAAW,KAAI,YAAmB,CAAC,CAAC,EAE/CC,EAAkB,CAACC,EAA0BC,EAAeb,IAChEC,GAAe,OAAO,gBAAgBW,EAAQC,EAAQ,EAAGb,CAAI,EAEzDc,EAAoB,CAACF,EAA0BC,EAAeb,IAClEC,GAAe,OAAO,kBAAkBW,EAAQC,EAAQ,EAAGb,CAAI,EAE3De,EAAUf,GAAM,UAAU,KAAMgB,GAAcA,GAAM,MAAQhB,GAAM,GAAG,GAAKA,GAAM,WAAW,CAAC,GAAK,CAAC,EAElGiB,EAAY,CAACF,GAAS,kBAAoBA,GAAS,OAAO,SAAWhB,EACrEmB,EAAYjB,GAAe,UAC3BkB,EAAsBlB,GAAe,oBAGrCmB,EAASL,GAAS,UAAU,CAAC,EAE7B,CAAE,MAAAM,EAAO,UAAAC,EAAW,SAAAC,CAAS,KAAI,sBAAmB,CACxD,OAAQlB,EACR,OAAQc,GAAuBC,EAASA,EAAO,qBAAuBL,EAAQ,MAC9E,WAAYI,GAAuBC,EAASL,EAAQ,MAAQ,EAC5D,aAAcf,GAAM,OAAO,cAAgB,KAC7C,CAAC,EAEKwB,EAAY,IAAM,CACtB,MAAMC,EAAMzB,GAAM,IACZ0B,EAAW1B,GAAM,SAEvB,OADgB0B,GAAU,KAAMV,GAAcA,GAAM,MAAQS,CAAG,GAC/C,OAAO,KAAOC,IAAW,CAAC,GAAG,OAAO,KAAO,EAC7D,EAEMC,EAAe3B,GAAM,aAAeA,GAAM,MAC1C4B,EAAqB5B,GAAM,oBAAsBA,GAAM,eAG7D,aAAU,IAAM,CACd,IAAI6B,EAAuB,CAAC,EAC5B,GAAIN,EAAU,CACZ,MAAMO,EAAc,GAAGP,CAAQ,GAAGhB,GAAW,KAAO,EAAE,GACtDsB,EAAW,KAAKC,CAAW,CAC7B,CACA,MAAMC,EAAU/B,GAAM,MAClB,SAAUgB,GAAiBA,GAAM,aAAa,OAAO,CAAC,GACtD,MAAOA,GAAiBA,GAAM,UAAU,SAAU,EAAE,CAAC,GACrD,QAAQ,EAAGO,EAAW,EAAI,CAAC,EAC/Bb,EAAYmB,EAAW,OAAOE,CAAO,CAAC,CACxC,EAAG,CAAC/B,GAAM,KAAMuB,CAAQ,CAAC,KAEzB,eAAYf,EAAK,CACf,cAAAX,EACA,cAAAC,EACA,eAAgB6B,EAChB,qBAAsBC,EACtB,SAAU3B,GAAe,MAAQ,CACnC,CAAC,EAED,MAAM+B,EAAgB,OAElB,oBACG,UAAAd,
|
|
4
|
+
"sourcesContent": ["import { useAiuiContext } from '../AiuiProvider/index.js'\nimport { formatVariantPrice } from './shelfDisplay.js'\nimport Picture from '../../components/picture.js'\nimport Badge from '../../components/badge.js'\nimport { cn } from '../../helpers/utils.js'\nimport { Text } from '../../components/text.js'\nimport Button from '../../components/button.js'\nimport { gaTrack } from '../../shared/track.js'\nimport { trackUrlRef } from '../../shared/trackUrlRef.js'\nimport { Heading } from '../../components/heading.js'\nimport type { ShelfDisplayItem, ShelfDisplayType } from './shelfDisplay.js'\nimport { useExposure } from '../../hooks/useExposure.js'\nimport { useRef, useEffect, useState } from 'react'\n\nconst componentType = 'image'\nconst componentName = 'product_shelf'\n\nconst SOLD_OUT_PRICE = 9999999.99\n\nexport const ShelfDisplayWrapItem = ({ data, configuration }: { data: any; configuration?: any }) => {\n const { isDisplayBackImage = false, itemShape, metafields } = configuration || {}\n const { locale = 'us', copyWriting } = useAiuiContext()\n const { discounts } = metafields || {}\n const ref = useRef<HTMLDivElement>(null)\n const [showTags, setShowTags] = useState<string[]>([])\n\n const onPrimaryButton = (params: ShelfDisplayItem, index: number, data: ShelfDisplayType) =>\n configuration?.event?.primaryButton?.(params, index + 1, data)\n\n const onSecondaryButton = (params: ShelfDisplayItem, index: number, data: ShelfDisplayType) =>\n configuration?.event?.secondaryButton?.(params, index + 1, data)\n\n const variant = data?.variants?.find((item: any) => item?.sku === data?.sku) || data?.variants?.[0] || {}\n\n const isSoldOut = !variant?.availableForSale && variant?.price?.amount === SOLD_OUT_PRICE\n const isShowTag = configuration?.isShowTag\n const isShowOriginalPrice = configuration?.isShowOriginalPrice\n\n // active \u7684 \u901A\u7528\u6298\u6263\n const coupon = variant?.coupons?.[0]\n\n const { price, basePrice, discount } = formatVariantPrice({\n locale: locale,\n amount: isShowOriginalPrice && coupon ? coupon.variant_price4wscode : variant.price,\n baseAmount: isShowOriginalPrice && coupon ? variant.price : 0,\n currencyCode: data?.price?.currencyCode || 'USD',\n })\n\n const handleUrl = () => {\n const sku = data?.sku\n const skuArray = data?.variants\n const findSku = skuArray?.find((item: any) => item?.sku === sku)\n return findSku?.image?.url || skuArray?.[0]?.image?.url || ''\n }\n\n const displayTitle = data?.custom_name || data?.title\n const displayDescription = data?.custom_description || data?.description\n\n // \u5904\u7406\u6807\u7B7E\n useEffect(() => {\n let handleTags: string[] = []\n if (discount) {\n const discountTag = `${discount}${discounts?.off || ''}`\n handleTags.push(discountTag)\n }\n const newTags = data?.tags\n ?.filter?.((item: string) => item?.startsWith?.('CLtag'))\n ?.map?.((item: string) => item?.replace?.('CLtag:', ''))\n ?.slice?.(0, discount ? 1 : 2)\n setShowTags(handleTags.concat(newTags))\n }, [data?.tags, discount])\n\n useExposure(ref, {\n componentType,\n componentName,\n componentTitle: displayTitle,\n componentDescription: displayDescription,\n position: configuration?.index + 1,\n })\n\n const bottomContent = () => {\n return (\n <>\n {isShowTag ? (\n <div className=\"mb-1 box-border flex h-8 flex-wrap gap-1 overflow-hidden\">\n {showTags?.map?.((item: any, index: number) => <Badge key={index}>{item}</Badge>)}\n </div>\n ) : null}\n {displayTitle ? (\n <Heading\n as=\"h3\"\n title={displayTitle || ''}\n size={2}\n className=\"shelf-display-product-title mb-1 line-clamp-2\"\n html={displayTitle || ''}\n />\n ) : null}\n {displayDescription ? (\n <Text\n size={2}\n className=\"lg-desktop:text-lg lg-desktop:h-[26px] desktop:text-base desktop:h-6 shelf-display-product-description line-clamp-1 h-5 text-sm\"\n html={displayDescription || ''}\n />\n ) : null}\n <div className=\"mb-2 mt-5 flex items-center\">\n {isSoldOut ? (\n <div className=\"tablet:text-2xl text-info-primary text-xl font-bold\">{copyWriting?.soldOutText}</div>\n ) : (\n <>\n <div className=\"final-price tablet:text-2xl text-info-primary text-xl font-bold\">\n {variant?.availableForSale ? price || '' : ''}\n </div>\n <div className=\"origin-price tablet:text-xl text-info-secondary ml-1 text-lg font-bold line-through\">\n {variant?.availableForSale ? basePrice || '' : ''}\n </div>\n </>\n )}\n </div>\n {/* \u6309\u94AE\u7EC4 */}\n <div\n className={cn(\n 'shelf-flex-button-group',\n 'lg-desktop:gap-3 flex items-center gap-2',\n configuration.direction === 'vertical' ? 'flex-col' : ''\n )}\n >\n {configuration?.secondaryButton ? (\n <Button\n variant=\"secondary\"\n onClick={() => onSecondaryButton(data, configuration?.index, configuration)}\n className={`\n ${configuration.direction === 'vertical' ? 'w-full' : ''}\n `}\n >\n {configuration?.secondaryButton || ''}\n </Button>\n ) : null}\n {configuration?.primaryButton ? (\n <Button\n variant=\"primary\"\n onClick={() => onPrimaryButton(data, configuration?.index, configuration)}\n className={`\n ${configuration.direction === 'vertical' ? 'w-full' : ''}\n `}\n >\n {configuration?.primaryButton || ''}\n </Button>\n ) : null}\n </div>\n </>\n )\n }\n\n return (\n <div\n ref={ref}\n key={data?.id || data?.handle}\n className={cn(\n 'bg-container-secondary-1 tablet:hover:bg-info-white box-border w-full cursor-pointer overflow-hidden duration-300',\n itemShape === 'round' ? 'rounded-2xl' : 'rounded-none',\n 'lg-desktop:aspect-w-[404] lg-desktop:aspect-h-[480] desktop:aspect-w-[316] desktop:aspect-h-[384]',\n 'laptop:aspect-w-[288] laptop:aspect-h-[360] aspect-w-[296] aspect-h-[360] relative',\n 'md-tablet:h-[360px]'\n )}\n >\n {isDisplayBackImage ? (\n <div className=\"absolute inset-0 box-border overflow-hidden\">\n <div className=\"relative inset-0 size-full\">\n <Picture source={handleUrl()} alt=\"\" className=\"flex h-full justify-center object-cover [&_img]:w-auto\" />\n <div className=\"desktop:p-6 absolute inset-x-0 bottom-0 box-border overflow-hidden p-4\">\n {bottomContent()}\n </div>\n </div>\n </div>\n ) : (\n <div className=\"desktop:p-6 absolute inset-0 box-border flex flex-col justify-between overflow-hidden p-4\">\n <div\n className={cn(\n 'lg-desktop:mb-3 lg-desktop:h-[195px] relative mb-2 inline-block h-[140px] w-full flex-1 overflow-hidden'\n )}\n >\n <a\n aria-label={displayTitle}\n target={configuration?.target}\n href={trackUrlRef(\n `${locale === 'us' || !locale ? '' : `/${locale}`}/products/${data?.handle}`,\n `${componentType}_${componentName}`\n )}\n onClick={() => {\n gaTrack({\n event: 'ga4Event',\n event_name: 'select_item',\n event_parameters: {\n page_group: 'Home Page',\n item_list_name: 'Home_Page_Bundle',\n items: [\n {\n item_id: data?.sku || variant?.sku,\n item_name: data?.name,\n item_variant: variant?.name,\n price: variant?.price,\n index: configuration?.index + 1,\n },\n ],\n },\n })\n }}\n >\n <Picture source={handleUrl()} alt=\"\" className=\"flex h-full justify-center object-cover [&_img]:w-auto\" />\n </a>\n </div>\n {bottomContent()}\n </div>\n )}\n </div>\n )\n}\n\nexport const ShelfDisplayHorizontalItem = ({ data, configuration }: { data: any; configuration?: any }) => {\n const { itemShape, itemLength, metafields } = configuration || {}\n const { discounts } = metafields || {}\n const { locale = 'us', copyWriting } = useAiuiContext()\n const [showTags, setShowTags] = useState<string[]>([])\n const ref = useRef<HTMLDivElement>(null)\n\n const onPrimaryButton = (params: ShelfDisplayItem, index: number, data: ShelfDisplayType) =>\n configuration?.event?.primaryButton?.(params, index + 1, data)\n\n const onSecondaryButton = (params: ShelfDisplayItem, index: number, data: ShelfDisplayType) =>\n configuration?.event?.secondaryButton?.(params, index + 1, data)\n\n const variant = data?.variants?.find((item: any) => item?.sku === data?.sku) || data?.variants?.[0] || {}\n\n const isSoldOut = !variant?.availableForSale && variant?.price?.amount === SOLD_OUT_PRICE\n const isShowTag = configuration?.isShowTag\n const isShowOriginalPrice = configuration?.isShowOriginalPrice\n\n // active \u7684 \u901A\u7528\u6298\u6263\n const coupon = variant?.coupons?.[0]\n\n const { price, basePrice, discount } = formatVariantPrice({\n locale: locale,\n amount: isShowOriginalPrice && coupon ? coupon.variant_price4wscode : variant.price,\n baseAmount: isShowOriginalPrice && coupon ? variant.price : 0,\n currencyCode: data?.price?.currencyCode || 'USD',\n })\n\n const handleUrl = () => {\n const sku = data?.sku\n const skuArray = data?.variants\n const findSku = skuArray?.find((item: any) => item?.sku === sku)\n return findSku?.image?.url || skuArray?.[0]?.image?.url || ''\n }\n\n const displayTitle = data?.custom_name || data?.title\n const displayDescription = data?.custom_description || data?.description\n\n useExposure(ref, {\n componentType,\n componentName,\n componentTitle: displayTitle,\n componentDescription: displayDescription,\n position: configuration?.index + 1,\n })\n\n const showSizeClass = (): {\n boxItem: string\n imgItem: string\n wrap: string\n } => {\n if (itemLength >= 2) {\n return {\n boxItem: 'lg-desktop:max-w-[401px] desktop:max-w-[292px] max-w-full',\n imgItem:\n 'm-tablet:m-auto lg-desktop:max-w-[330px] lg-desktop:max-h-[330px] desktop:max-w-[260px] desktop:max-h-[260px] max-w-[138px] max-h-[138px]',\n wrap: 'lg-desktop:aspect-w-[824] lg-desktop:aspect-h-[480] desktop:aspect-w-[648] desktop:aspect-h-[380] laptop:aspect-w-[440] laptop:aspect-h-[356] tablet:aspect-w-[346] tablet:aspect-h-[360] md-tablet:w-full',\n }\n }\n return {\n boxItem: 'lg-desktop:max-w-[401px] desktop:max-w-[292px] laptop:max-w-[289px] max-w-[262px]',\n imgItem:\n 'md-tablet:m-auto lg-desktop:max-w-[450px] lg-desktop:max-h-[450px] desktop:max-w-[332px] desktop:max-h-[332px] max-w-[312px] max-h-[312px]',\n wrap: 'lg-desktop:aspect-w-[1664] lg-desktop:aspect-h-[480] desktop:aspect-w-[1312] desktop:aspect-h-[380] laptop:aspect-w-[896] laptop:aspect-h-[356] tablet:aspect-w-[704] tablet:aspect-h-[360] md-tablet:w-full',\n }\n }\n\n const handleWrapClass = () => {\n if (itemLength >= 2) {\n return 'flex flex-col justify-between desktop:gap-12 desktop:flex-row desktop:justify-center desktop:items-center'\n }\n return 'flex justify-center items-center gap-6 md-tablet:flex-col'\n }\n\n // \u5904\u7406\u6807\u7B7E\n useEffect(() => {\n let handleTags: string[] = []\n if (discount) {\n const discountTag = `${discount}${discounts?.off || ''}`\n handleTags.push(discountTag)\n }\n const newTags = data?.tags\n ?.filter?.((item: string) => item?.startsWith?.('CLtag'))\n ?.map?.((item: string) => item?.replace?.('CLtag:', ''))\n ?.slice?.(0, discount ? 1 : 2)\n setShowTags(handleTags.concat(newTags))\n }, [data?.tags, discount])\n\n return (\n <div\n ref={ref}\n key={data?.id || data?.handle}\n className={cn(\n showSizeClass().wrap,\n itemShape === 'round' ? 'rounded-2xl' : 'rounded-none',\n 'bg-container-secondary-1 tablet:hover:bg-info-white duration-300 gap-6',\n 'box-border w-full cursor-pointer overflow-hidden relative md-tablet:h-[360px]'\n )}\n >\n <div className={cn(handleWrapClass(), 'desktop:p-6 absolute inset-0 box-border overflow-hidden p-4')}>\n <div className={cn(showSizeClass().imgItem, 'relative overflow-hidden desktop:mb-0 mb-1')}>\n <a\n aria-label={displayTitle}\n target={configuration?.target}\n href={trackUrlRef(\n `${locale === 'us' || !locale ? '' : `/${locale}`}/products/${data?.handle}`,\n `${componentType}_${componentName}`\n )}\n onClick={() => {\n gaTrack({\n event: 'ga4Event',\n event_name: 'select_item',\n event_parameters: {\n page_group: 'Home Page',\n item_list_name: 'Home_Page_Bundle',\n items: [\n {\n item_id: data?.sku || variant?.sku,\n item_name: data?.name,\n item_variant: variant?.name,\n price: variant?.price,\n index: configuration?.index + 1,\n },\n ],\n },\n })\n }}\n >\n <Picture source={handleUrl()} alt=\"\" className=\"flex h-full justify-center object-cover [&_img]:w-auto\" />\n </a>\n </div>\n <div className={cn('flex flex-col justify-center items-start', showSizeClass().boxItem)}>\n {isShowTag ? (\n <div className=\"mb-1 box-border flex h-8 flex-wrap gap-1 overflow-hidden\">\n {showTags?.map?.((item: any, index: number) => <Badge key={index}>{item}</Badge>)}\n </div>\n ) : null}\n {displayTitle ? (\n <Heading\n as=\"h3\"\n title={displayTitle || ''}\n size={2}\n className=\"shelf-display-product-title mb-1 line-clamp-2\"\n html={displayTitle || ''}\n />\n ) : null}\n {displayDescription ? (\n <Text\n size={2}\n className=\"lg-desktop:text-lg lg-desktop:h-[26px] desktop:text-base desktop:h-6 shelf-display-product-description line-clamp-1 h-5 text-sm\"\n html={displayDescription || ''}\n />\n ) : null}\n <div className=\"mb-2 mt-5 flex items-center\">\n {isSoldOut ? (\n <div className=\"tablet:text-2xl text-info-primary text-xl font-bold\">{copyWriting?.soldOutText}</div>\n ) : (\n <>\n <div className=\"final-price tablet:text-2xl text-info-primary text-xl font-bold\">\n {variant?.availableForSale ? price || '' : ''}\n </div>\n <div className=\"origin-price tablet:text-xl text-info-secondary ml-1 text-lg font-bold line-through\">\n {variant?.availableForSale ? basePrice || '' : ''}\n </div>\n </>\n )}\n </div>\n {/* \u6309\u94AE\u7EC4 */}\n <div\n className={cn(\n 'shelf-flex-button-group',\n 'lg-desktop:gap-3 flex items-center gap-2',\n configuration.direction === 'vertical' ? 'flex-col' : ''\n )}\n >\n {configuration?.secondaryButton ? (\n <Button\n variant=\"secondary\"\n onClick={() => onSecondaryButton(data, configuration?.index, configuration)}\n className={`\n ${configuration.direction === 'vertical' ? 'w-full' : ''}\n `}\n >\n {configuration?.secondaryButton || ''}\n </Button>\n ) : null}\n {configuration?.primaryButton ? (\n <Button\n variant=\"primary\"\n onClick={() => onPrimaryButton(data, configuration?.index, configuration)}\n className={`\n ${configuration.direction === 'vertical' ? 'w-full' : ''}\n `}\n >\n {configuration?.primaryButton || ''}\n </Button>\n ) : null}\n </div>\n </div>\n </div>\n </div>\n )\n}\n"],
|
|
5
|
+
"mappings": "4jBAAA,IAAAA,GAAA,GAAAC,GAAAD,GAAA,gCAAAE,GAAA,yBAAAC,KAAA,eAAAC,GAAAJ,IAqF2D,IAAAK,EAAA,6BArF3DC,EAA+B,oCAC/BC,EAAmC,6BACnCC,EAAoB,0CACpBC,EAAkB,wCAClBC,EAAmB,kCACnBC,EAAqB,oCACrBC,EAAmB,yCACnBC,EAAwB,iCACxBC,EAA4B,uCAC5BC,EAAwB,uCAExBC,EAA4B,sCAC5BC,EAA4C,iBAE5C,MAAMC,EAAgB,QAChBC,EAAgB,gBAEhBC,EAAiB,aAEVjB,GAAuB,CAAC,CAAE,KAAAkB,EAAM,cAAAC,CAAc,IAA0C,CACnG,KAAM,CAAE,mBAAAC,EAAqB,GAAO,UAAAC,EAAW,WAAAC,CAAW,EAAIH,GAAiB,CAAC,EAC1E,CAAE,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SAAW,EAAE;AAAA,cAGrD,SAAAA,GAAe,eAAiB,GACnC,EACE,MACN,GACF,GACF,GA5GKD,GAAM,IAAMA,GAAM,MA6GzB,CAEJ",
|
|
6
6
|
"names": ["shelfDisplayItem_exports", "__export", "ShelfDisplayHorizontalItem", "ShelfDisplayWrapItem", "__toCommonJS", "import_jsx_runtime", "import_AiuiProvider", "import_shelfDisplay", "import_picture", "import_badge", "import_utils", "import_text", "import_button", "import_track", "import_trackUrlRef", "import_heading", "import_useExposure", "import_react", "componentType", "componentName", "SOLD_OUT_PRICE", "data", "configuration", "isDisplayBackImage", "itemShape", "metafields", "locale", "copyWriting", "discounts", "ref", "showTags", "setShowTags", "onPrimaryButton", "params", "index", "onSecondaryButton", "variant", "item", "isSoldOut", "isShowTag", "isShowOriginalPrice", "coupon", "price", "basePrice", "discount", "handleUrl", "sku", "skuArray", "displayTitle", "displayDescription", "handleTags", "discountTag", "newTags", "bottomContent", "Badge", "Button", "Picture", "itemLength", "showSizeClass", "handleWrapClass"]
|
|
7
7
|
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { SloganProps } from './types.js';
|
|
3
|
+
export declare const componentType = "copy";
|
|
4
|
+
export declare const componentName = "brand_slogan";
|
|
5
|
+
declare const _default: React.ForwardRefExoticComponent<Omit<Omit<SloganProps & React.RefAttributes<HTMLDivElement>, keyof import("../../shared/Styles.js").StylesProps> & Partial<import("../../shared/Styles.js").StylesProps & import("../../shared/Styles.js").ContainerProps> & {
|
|
6
|
+
className?: string;
|
|
7
|
+
data?: Record<string, any>;
|
|
8
|
+
}, "ref"> & React.RefAttributes<any>>;
|
|
9
|
+
export default _default;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type { Theme } from '../../types/props.js';
|
|
2
|
+
export interface Feature {
|
|
3
|
+
/**
|
|
4
|
+
* 特性标题
|
|
5
|
+
*/
|
|
6
|
+
title: string;
|
|
7
|
+
}
|
|
8
|
+
export interface SloganProps {
|
|
9
|
+
data: {
|
|
10
|
+
/**
|
|
11
|
+
* 主标题
|
|
12
|
+
*/
|
|
13
|
+
title: string;
|
|
14
|
+
/**
|
|
15
|
+
* 特性分组大小 默认为3
|
|
16
|
+
*/
|
|
17
|
+
featureChunkSize?: number;
|
|
18
|
+
/**
|
|
19
|
+
* 特性列表
|
|
20
|
+
*/
|
|
21
|
+
features?: Feature[];
|
|
22
|
+
/**
|
|
23
|
+
* 主题
|
|
24
|
+
*/
|
|
25
|
+
theme?: Theme;
|
|
26
|
+
};
|
|
27
|
+
/**
|
|
28
|
+
* 自定义类名
|
|
29
|
+
*/
|
|
30
|
+
className?: string;
|
|
31
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { SpacerProps } from './types.js';
|
|
3
|
+
declare const _default: React.ForwardRefExoticComponent<Omit<Omit<SpacerProps & React.RefAttributes<HTMLDivElement>, keyof import("../../shared/Styles.js").StylesProps> & Partial<import("../../shared/Styles.js").StylesProps & import("../../shared/Styles.js").ContainerProps> & {
|
|
4
|
+
className?: string;
|
|
5
|
+
data?: Record<string, any>;
|
|
6
|
+
}, "ref"> & React.RefAttributes<any>>;
|
|
7
|
+
export default _default;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
"use strict";var p=Object.defineProperty;var x=Object.getOwnPropertyDescriptor;var m=Object.getOwnPropertyNames;var v=Object.prototype.hasOwnProperty;var y=(e
|
|
2
|
-
${
|
|
1
|
+
"use strict";var p=Object.defineProperty;var x=Object.getOwnPropertyDescriptor;var m=Object.getOwnPropertyNames;var v=Object.prototype.hasOwnProperty;var y=(o,e)=>{for(var a in e)p(o,a,{get:e[a],enumerable:!0})},D=(o,e,a,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let t of m(e))!v.call(o,t)&&t!==a&&p(o,t,{get:()=>e[t],enumerable:!(s=x(e,t))||s.enumerable});return o};var k=o=>D(p({},"__esModule",{value:!0}),o);var C={};y(C,{default:()=>E});module.exports=k(C);var c=require("react/jsx-runtime"),l=require("react");const g="openDropDown",w=({index:o,active:e,list:a,setActive:s,setVisible:t,visible:u,filterActive:i})=>{const f=(0,l.useRef)(null);(0,l.useEffect)(()=>{const n=r=>{const d=r?.target?.getAttribute?.("class");!f?.current?.contains(r?.target)&&!d?.includes(g)&&t({...u,[o]:!1})};return document.addEventListener("click",n),()=>document.removeEventListener("click",n)},[]);const h=(0,l.useMemo)(()=>{const n=Object.keys(i||{});return a?.filter(r=>!n?.find(b=>i?.[b]?.handle===r?.handle))},[i,a]);return(0,c.jsx)("div",{ref:f,className:`absolute left-0 top-[104%] z-30 box-border max-h-[340px] w-full overflow-hidden rounded-lg bg-[#F5F5F7] ${u?.[o]?"block":"hidden"}`,children:(0,c.jsx)("div",{className:"m-0 box-border h-full flex-1 overflow-y-auto overflow-x-hidden p-0 [&:last-child]:border-r-0",children:h?.map((n,r)=>{const d=n?.sku||n?.variants?.[0]?.sku;return(0,c.jsx)("div",{onClick:()=>{s({...e,[r]:{sku:d,name:n?.name,handle:n?.handle}}),t({...u,[r]:!1})},title:n?.name,className:`openDropDown box-border cursor-pointer truncate px-6 py-4 text-base font-bold min-xl:text-lg min-xxl:text-lg [&:hover]:bg-[#EAEAEC]
|
|
2
|
+
${n?.handle===e?.handle?"bg-[#EAEAEC]":""}`,children:n?.name},r)})})})};var E=w;
|
|
3
3
|
//# sourceMappingURL=dropdown.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/biz-components/Specs/dropdown.tsx"],
|
|
4
|
-
"sourcesContent": ["import { useEffect, useRef, useMemo } from 'react'\n\nconst clickContent = 'openDropDown'\n\nexport type DropDownProps = {\n index: number\n active: any\n list: any\n setActive: any\n setVisible: any\n visible: any\n filterActive: any\n}\n\nconst DropDown = ({ index, active, list, setActive, setVisible, visible, filterActive }: DropDownProps) => {\n const dropDownRef = useRef<HTMLDivElement>(null)\n\n useEffect(() => {\n const handleClickOutside = (event: any) => {\n const isDel = event?.target?.getAttribute?.('class')\n const isContainer = !dropDownRef?.current?.contains(event?.target)\n if (isContainer && !isDel?.includes(clickContent)) {\n setVisible({ ...visible, [index]: false })\n }\n }\n document.addEventListener('click', handleClickOutside)\n return () => document.removeEventListener('click', handleClickOutside)\n }, [])\n\n const handleList = useMemo(() => {\n const activeIndex = Object.keys(filterActive || {})\n return list?.filter((item: { handle: any }) => {\n const currentIndex = activeIndex?.find((items: string) => filterActive?.[items]?.handle === item?.handle)\n return !currentIndex\n })\n }, [filterActive, list])\n\n return (\n <div\n ref={dropDownRef}\n className={`absolute left-0 top-[104%] z-30 box-border max-h-[340px] w-full overflow-hidden rounded-lg bg-[#F5F5F7] ${visible?.[index] ? 'block' : 'hidden'}`}\n >\n <div className={'m-0 box-border h-full flex-1 overflow-y-auto overflow-x-hidden p-0 [&:last-child]:border-r-0'}>\n {handleList?.map((item: any,
|
|
5
|
-
"mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,IAAA,eAAAC,EAAAH,GA8CY,IAAAI,EAAA,6BA9CZC,EAA2C,iBAE3C,MAAMC,EAAe,eAYfC,EAAW,CAAC,CAAE,MAAAC,EAAO,OAAAC,EAAQ,KAAAC,EAAM,UAAAC,EAAW,WAAAC,EAAY,QAAAC,EAAS,aAAAC,CAAa,IAAqB,CACzG,MAAMC,KAAc,UAAuB,IAAI,KAE/C,aAAU,IAAM,CACd,MAAMC,EAAsBC,GAAe,CACzC,MAAMC,EAAQD,GAAO,QAAQ,eAAe,OAAO,EAC/B,CAACF,GAAa,SAAS,SAASE,GAAO,MAAM,GAC9C,CAACC,GAAO,SAASZ,CAAY,GAC9CM,EAAW,CAAE,GAAGC,EAAS,CAACL,CAAK,EAAG,EAAM,CAAC,CAE7C,EACA,gBAAS,iBAAiB,QAASQ,CAAkB,EAC9C,IAAM,SAAS,oBAAoB,QAASA,CAAkB,CACvE,EAAG,CAAC,CAAC,EAEL,MAAMG,KAAa,WAAQ,IAAM,CAC/B,MAAMC,EAAc,OAAO,KAAKN,GAAgB,CAAC,CAAC,EAClD,OAAOJ,GAAM,OAAQW,GAEZ,CADcD,GAAa,KAAME,GAAkBR,IAAeQ,CAAK,GAAG,SAAWD,GAAM,MAAM,CAEzG,CACH,EAAG,CAACP,EAAcJ,CAAI,CAAC,EAEvB,SACE,OAAC,OACC,IAAKK,EACL,UAAW,2GAA2GF,IAAUL,CAAK,EAAI,QAAU,QAAQ,GAE3J,mBAAC,OAAI,UAAW,+FACb,SAAAW,GAAY,IAAI,CAACE,
|
|
6
|
-
"names": ["dropdown_exports", "__export", "dropdown_default", "__toCommonJS", "import_jsx_runtime", "import_react", "clickContent", "DropDown", "index", "active", "list", "setActive", "setVisible", "visible", "filterActive", "dropDownRef", "handleClickOutside", "event", "isDel", "handleList", "activeIndex", "item", "items", "
|
|
4
|
+
"sourcesContent": ["import { useEffect, useRef, useMemo } from 'react'\n\nconst clickContent = 'openDropDown'\n\nexport type DropDownProps = {\n index: number\n active: any\n list: any\n setActive: any\n setVisible: any\n visible: any\n filterActive: any\n}\n\nconst DropDown = ({ index, active, list, setActive, setVisible, visible, filterActive }: DropDownProps) => {\n const dropDownRef = useRef<HTMLDivElement>(null)\n\n useEffect(() => {\n const handleClickOutside = (event: any) => {\n const isDel = event?.target?.getAttribute?.('class')\n const isContainer = !dropDownRef?.current?.contains(event?.target)\n if (isContainer && !isDel?.includes(clickContent)) {\n setVisible({ ...visible, [index]: false })\n }\n }\n document.addEventListener('click', handleClickOutside)\n return () => document.removeEventListener('click', handleClickOutside)\n }, [])\n\n const handleList = useMemo(() => {\n const activeIndex = Object.keys(filterActive || {})\n return list?.filter((item: { handle: any }) => {\n const currentIndex = activeIndex?.find((items: string) => filterActive?.[items]?.handle === item?.handle)\n return !currentIndex\n })\n }, [filterActive, list])\n\n return (\n <div\n ref={dropDownRef}\n className={`absolute left-0 top-[104%] z-30 box-border max-h-[340px] w-full overflow-hidden rounded-lg bg-[#F5F5F7] ${visible?.[index] ? 'block' : 'hidden'}`}\n >\n <div className={'m-0 box-border h-full flex-1 overflow-y-auto overflow-x-hidden p-0 [&:last-child]:border-r-0'}>\n {handleList?.map((item: any, index: number) => {\n const currentSku = item?.sku || item?.variants?.[0]?.sku\n return (\n <div\n key={index}\n onClick={() => {\n setActive({\n ...active,\n [index]: {\n sku: currentSku,\n name: item?.name,\n handle: item?.handle,\n },\n })\n setVisible({ ...visible, [index]: false })\n }}\n title={item?.name}\n className={`openDropDown box-border cursor-pointer truncate px-6 py-4 text-base font-bold min-xl:text-lg min-xxl:text-lg [&:hover]:bg-[#EAEAEC]\n ${item?.handle === active?.handle ? 'bg-[#EAEAEC]' : ''}`}\n >\n {item?.name}\n </div>\n )\n })}\n </div>\n </div>\n )\n}\n\nexport default DropDown\n"],
|
|
5
|
+
"mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,IAAA,eAAAC,EAAAH,GA8CY,IAAAI,EAAA,6BA9CZC,EAA2C,iBAE3C,MAAMC,EAAe,eAYfC,EAAW,CAAC,CAAE,MAAAC,EAAO,OAAAC,EAAQ,KAAAC,EAAM,UAAAC,EAAW,WAAAC,EAAY,QAAAC,EAAS,aAAAC,CAAa,IAAqB,CACzG,MAAMC,KAAc,UAAuB,IAAI,KAE/C,aAAU,IAAM,CACd,MAAMC,EAAsBC,GAAe,CACzC,MAAMC,EAAQD,GAAO,QAAQ,eAAe,OAAO,EAC/B,CAACF,GAAa,SAAS,SAASE,GAAO,MAAM,GAC9C,CAACC,GAAO,SAASZ,CAAY,GAC9CM,EAAW,CAAE,GAAGC,EAAS,CAACL,CAAK,EAAG,EAAM,CAAC,CAE7C,EACA,gBAAS,iBAAiB,QAASQ,CAAkB,EAC9C,IAAM,SAAS,oBAAoB,QAASA,CAAkB,CACvE,EAAG,CAAC,CAAC,EAEL,MAAMG,KAAa,WAAQ,IAAM,CAC/B,MAAMC,EAAc,OAAO,KAAKN,GAAgB,CAAC,CAAC,EAClD,OAAOJ,GAAM,OAAQW,GAEZ,CADcD,GAAa,KAAME,GAAkBR,IAAeQ,CAAK,GAAG,SAAWD,GAAM,MAAM,CAEzG,CACH,EAAG,CAACP,EAAcJ,CAAI,CAAC,EAEvB,SACE,OAAC,OACC,IAAKK,EACL,UAAW,2GAA2GF,IAAUL,CAAK,EAAI,QAAU,QAAQ,GAE3J,mBAAC,OAAI,UAAW,+FACb,SAAAW,GAAY,IAAI,CAACE,EAAWb,IAAkB,CAC7C,MAAMe,EAAaF,GAAM,KAAOA,GAAM,WAAW,CAAC,GAAG,IACrD,SACE,OAAC,OAEC,QAAS,IAAM,CACbV,EAAU,CACR,GAAGF,EACH,CAACD,CAAK,EAAG,CACP,IAAKe,EACL,KAAMF,GAAM,KACZ,OAAQA,GAAM,MAChB,CACF,CAAC,EACDT,EAAW,CAAE,GAAGC,EAAS,CAACL,CAAK,EAAG,EAAM,CAAC,CAC3C,EACA,MAAOa,GAAM,KACb,UAAW;AAAA,kBACPA,GAAM,SAAWZ,GAAQ,OAAS,eAAiB,EAAE,GAExD,SAAAY,GAAM,MAhBFb,CAiBP,CAEJ,CAAC,EACH,EACF,CAEJ,EAEA,IAAON,EAAQK",
|
|
6
|
+
"names": ["dropdown_exports", "__export", "dropdown_default", "__toCommonJS", "import_jsx_runtime", "import_react", "clickContent", "DropDown", "index", "active", "list", "setActive", "setVisible", "visible", "filterActive", "dropDownRef", "handleClickOutside", "event", "isDel", "handleList", "activeIndex", "item", "items", "currentSku"]
|
|
7
7
|
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Subscribe 订阅模块
|
|
3
|
+
* @param subscribeMetadata 订阅模块数据
|
|
4
|
+
* @param onSubmit 提交事件
|
|
5
|
+
* @param className 类名
|
|
6
|
+
* @returns
|
|
7
|
+
*/
|
|
8
|
+
declare const Subscribe: ({ subscribeMetadata, onSubmit, className, }: {
|
|
9
|
+
subscribeMetadata: any;
|
|
10
|
+
onSubmit?: (formData: FormData) => void;
|
|
11
|
+
className?: string;
|
|
12
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
export default Subscribe;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface SwiperBoxProps {
|
|
3
|
+
data: {
|
|
4
|
+
list: any[];
|
|
5
|
+
configuration?: any;
|
|
6
|
+
onVideoPlayBtnClick?: (jIndex: number) => void;
|
|
7
|
+
};
|
|
8
|
+
id: string;
|
|
9
|
+
className?: string;
|
|
10
|
+
itemClassName?: string;
|
|
11
|
+
breakpoints?: Record<number, Object>;
|
|
12
|
+
Slide: React.ComponentType<{
|
|
13
|
+
data: any;
|
|
14
|
+
configuration?: any;
|
|
15
|
+
jIndex?: number;
|
|
16
|
+
}>;
|
|
17
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { TabsProps } from './types.js';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
declare const _default: React.ForwardRefExoticComponent<Omit<Omit<TabsProps & React.RefAttributes<HTMLDivElement>, keyof import("../../shared/Styles.js").StylesProps> & Partial<import("../../shared/Styles.js").StylesProps & import("../../shared/Styles.js").ContainerProps> & {
|
|
4
|
+
className?: string;
|
|
5
|
+
data?: Record<string, any>;
|
|
6
|
+
}, "ref"> & React.RefAttributes<any>>;
|
|
7
|
+
export default _default;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './Tabs.js';
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { Align, Shape, Theme } from '../../types/props.js';
|
|
2
|
+
import type { MultiLayoutGraphicBlockProps } from '../MultiLayoutGraphicBlock/types.js';
|
|
3
|
+
import type { ShelfDisplayProps } from '../ShelfDisplay/shelfDisplay.js';
|
|
4
|
+
import type { AccordionCardsType } from '../AccordionCards/index.js';
|
|
5
|
+
import type { FaqProps } from '../Faq/types.js';
|
|
6
|
+
import type { GraphicProps } from '../Graphic/index.js';
|
|
7
|
+
export type TabsProps = {
|
|
8
|
+
data: {
|
|
9
|
+
sectionTitle?: string;
|
|
10
|
+
theme: Theme;
|
|
11
|
+
shape: Shape;
|
|
12
|
+
align: Align;
|
|
13
|
+
tabs: {
|
|
14
|
+
tabName: string;
|
|
15
|
+
tabContent: (ShelfDisplayProps['data'] & {
|
|
16
|
+
blockType: 'ipc-shelfdisplay';
|
|
17
|
+
})[] | (MultiLayoutGraphicBlockProps['data'] & {
|
|
18
|
+
blockType: 'ipc-multiLayoutGraphicBlock';
|
|
19
|
+
})[] | (AccordionCardsType['data'] & {
|
|
20
|
+
blockType: 'ipc-accordioncards';
|
|
21
|
+
})[] | (FaqProps['data'] & {
|
|
22
|
+
blockType: 'ipc-faq';
|
|
23
|
+
})[] | (GraphicProps['data'] & {
|
|
24
|
+
blockType: 'ipc-graphic';
|
|
25
|
+
})[];
|
|
26
|
+
}[];
|
|
27
|
+
};
|
|
28
|
+
className?: string;
|
|
29
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { Img } from '../../types/props.js';
|
|
2
|
+
export type TextModalType = {
|
|
3
|
+
textVisible: boolean;
|
|
4
|
+
extension?: {
|
|
5
|
+
textPcImg: Img;
|
|
6
|
+
textMobileImg: Img;
|
|
7
|
+
textTitle: string;
|
|
8
|
+
text: string;
|
|
9
|
+
textDesc: string;
|
|
10
|
+
};
|
|
11
|
+
onCloseModal: () => void;
|
|
12
|
+
};
|
|
13
|
+
declare const TextModal: (props: TextModalType) => import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
export { TextModal };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { TitleProps } from './types.js';
|
|
3
|
+
declare const _default: React.ForwardRefExoticComponent<Omit<Omit<TitleProps & React.RefAttributes<HTMLDivElement>, keyof import("../../shared/Styles.js").StylesProps> & Partial<import("../../shared/Styles.js").StylesProps & import("../../shared/Styles.js").ContainerProps> & {
|
|
4
|
+
className?: string;
|
|
5
|
+
data?: Record<string, any>;
|
|
6
|
+
}, "ref"> & React.RefAttributes<any>>;
|
|
7
|
+
export default _default;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import type { Theme } from '../../types/props.js';
|
|
2
|
+
export interface Feature {
|
|
3
|
+
/**
|
|
4
|
+
* 特性标题
|
|
5
|
+
*/
|
|
6
|
+
title: string;
|
|
7
|
+
}
|
|
8
|
+
export interface TitleProps {
|
|
9
|
+
data: {
|
|
10
|
+
/**
|
|
11
|
+
* 主标题
|
|
12
|
+
*/
|
|
13
|
+
title?: string;
|
|
14
|
+
caption?: string;
|
|
15
|
+
/**
|
|
16
|
+
* 特性列表,最多支持3个
|
|
17
|
+
*/
|
|
18
|
+
features?: Feature[];
|
|
19
|
+
/**
|
|
20
|
+
* 主题色
|
|
21
|
+
*/
|
|
22
|
+
theme?: Theme;
|
|
23
|
+
/**
|
|
24
|
+
* 扩展数据
|
|
25
|
+
*/
|
|
26
|
+
extensions?: any;
|
|
27
|
+
};
|
|
28
|
+
/**
|
|
29
|
+
* 自定义类名
|
|
30
|
+
*/
|
|
31
|
+
className?: string;
|
|
32
|
+
as?: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6';
|
|
33
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { WhyChooseProps, WhyChooseItem as ItemType } from './types.js';
|
|
3
|
+
declare const WhyChooseItem: {
|
|
4
|
+
({ data }: {
|
|
5
|
+
data: ItemType;
|
|
6
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
displayName: string;
|
|
8
|
+
};
|
|
9
|
+
declare const _default: React.ForwardRefExoticComponent<Omit<Omit<WhyChooseProps & React.RefAttributes<HTMLDivElement>, keyof import("../../shared/Styles.js").StylesProps> & Partial<import("../../shared/Styles.js").StylesProps & import("../../shared/Styles.js").ContainerProps> & {
|
|
10
|
+
className?: string;
|
|
11
|
+
data?: Record<string, any>;
|
|
12
|
+
}, "ref"> & React.RefAttributes<any>>;
|
|
13
|
+
export default _default;
|
|
14
|
+
export { WhyChooseItem };
|