@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,10 +1,10 @@
|
|
|
1
|
-
import{Fragment as L,jsx as s,jsxs as c}from"react/jsx-runtime";import{useAiuiContext as z}from"../AiuiProvider/index.js";import{formatVariantPrice as E}from"./shelfDisplay.js";import H from"../../components/picture.js";import F from"../../components/badge.js";import{cn as m}from"../../helpers/utils.js";import{Text as U}from"../../components/text.js";import
|
|
1
|
+
import{Fragment as L,jsx as s,jsxs as c}from"react/jsx-runtime";import{useAiuiContext as z}from"../AiuiProvider/index.js";import{formatVariantPrice as E}from"./shelfDisplay.js";import H from"../../components/picture.js";import F from"../../components/badge.js";import{cn as m}from"../../helpers/utils.js";import{Text as U}from"../../components/text.js";import w from"../../components/button.js";import{gaTrack as W}from"../../shared/track.js";import{trackUrlRef as A}from"../../shared/trackUrlRef.js";import{Heading as R}from"../../components/heading.js";import{useExposure as M}from"../../hooks/useExposure.js";import{useRef as V,useEffect as q,useState as G}from"react";const S="image",_="product_shelf",J=999999999e-2,re=({data:e,configuration:t})=>{const{isDisplayBackImage:N=!1,itemShape:b,metafields:T}=t||{},{locale:x="us",copyWriting:h}=z(),{discounts:B}=T||{},y=V(null),[D,g]=G([]),C=(i,l,a)=>t?.event?.primaryButton?.(i,l+1,a),$=(i,l,a)=>t?.event?.secondaryButton?.(i,l+1,a),o=e?.variants?.find(i=>i?.sku===e?.sku)||e?.variants?.[0]||{},I=!o?.availableForSale&&o?.price?.amount===J,P=t?.isShowTag,f=t?.isShowOriginalPrice,d=o?.coupons?.[0],{price:j,basePrice:O,discount:p}=E({locale:x,amount:f&&d?d.variant_price4wscode:o.price,baseAmount:f&&d?o.price:0,currencyCode:e?.price?.currencyCode||"USD"}),k=()=>{const i=e?.sku,l=e?.variants;return l?.find(n=>n?.sku===i)?.image?.url||l?.[0]?.image?.url||""},r=e?.custom_name||e?.title,u=e?.custom_description||e?.description;q(()=>{let i=[];if(p){const a=`${p}${B?.off||""}`;i.push(a)}const l=e?.tags?.filter?.(a=>a?.startsWith?.("CLtag"))?.map?.(a=>a?.replace?.("CLtag:",""))?.slice?.(0,p?1:2);g(i.concat(l))},[e?.tags,p]),M(y,{componentType:S,componentName:_,componentTitle:r,componentDescription:u,position:t?.index+1});const v=()=>c(L,{children:[P?s("div",{className:"mb-1 box-border flex h-8 flex-wrap gap-1 overflow-hidden",children:D?.map?.((i,l)=>s(F,{children:i},l))}):null,r?s(R,{as:"h3",title:r||"",size:2,className:"shelf-display-product-title mb-1 line-clamp-2",html:r||""}):null,u?s(U,{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:u||""}):null,s("div",{className:"mb-2 mt-5 flex items-center",children:I?s("div",{className:"tablet:text-2xl text-info-primary text-xl font-bold",children:h?.soldOutText}):c(L,{children:[s("div",{className:"final-price tablet:text-2xl text-info-primary text-xl font-bold",children:o?.availableForSale&&j||""}),s("div",{className:"origin-price tablet:text-xl text-info-secondary ml-1 text-lg font-bold line-through",children:o?.availableForSale&&O||""})]})}),c("div",{className:m("shelf-flex-button-group","lg-desktop:gap-3 flex items-center gap-2",t.direction==="vertical"?"flex-col":""),children:[t?.secondaryButton?s(w,{variant:"secondary",onClick:()=>$(e,t?.index,t),className:`
|
|
2
2
|
${t.direction==="vertical"?"w-full":""}
|
|
3
|
-
`,children:t?.secondaryButton||""}):null,t?.primaryButton?s(
|
|
3
|
+
`,children:t?.secondaryButton||""}):null,t?.primaryButton?s(w,{variant:"primary",onClick:()=>C(e,t?.index,t),className:`
|
|
4
4
|
${t.direction==="vertical"?"w-full":""}
|
|
5
|
-
`,children:t?.primaryButton||""}):null]})]});return s("div",{ref:y,className:m("bg-container-secondary-1 tablet:hover:bg-info-white box-border w-full cursor-pointer overflow-hidden duration-300",b==="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 s("div",{ref:y,className:m("bg-container-secondary-1 tablet:hover:bg-info-white box-border w-full cursor-pointer overflow-hidden duration-300",b==="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?s("div",{className:"absolute inset-0 box-border overflow-hidden",children:c("div",{className:"relative inset-0 size-full",children:[s(H,{source:k(),alt:"",className:"flex h-full justify-center object-cover [&_img]:w-auto"}),s("div",{className:"desktop:p-6 absolute inset-x-0 bottom-0 box-border overflow-hidden p-4",children:v()})]})}):c("div",{className:"desktop:p-6 absolute inset-0 box-border flex flex-col justify-between overflow-hidden p-4",children:[s("div",{className:m("lg-desktop:mb-3 lg-desktop:h-[195px] relative mb-2 inline-block h-[140px] w-full flex-1 overflow-hidden"),children:s("a",{"aria-label":r,target:t?.target,href:A(`${x==="us"||!x?"":`/${x}`}/products/${e?.handle}`,`${S}_${_}`),onClick:()=>{W({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:s(H,{source:k(),alt:"",className:"flex h-full justify-center object-cover [&_img]:w-auto"})})}),v()]})},e?.id||e?.handle)},pe=({data:e,configuration:t})=>{const{itemShape:N,itemLength:b,metafields:T}=t||{},{discounts:x}=T||{},{locale:h="us",copyWriting:B}=z(),[y,D]=G([]),g=V(null),C=(l,a,n)=>t?.event?.primaryButton?.(l,a+1,n),$=(l,a,n)=>t?.event?.secondaryButton?.(l,a+1,n),o=e?.variants?.find(l=>l?.sku===e?.sku)||e?.variants?.[0]||{},I=!o?.availableForSale&&o?.price?.amount===J,P=t?.isShowTag,f=t?.isShowOriginalPrice,d=o?.coupons?.[0],{price:j,basePrice:O,discount:p}=E({locale:h,amount:f&&d?d.variant_price4wscode:o.price,baseAmount:f&&d?o.price:0,currencyCode:e?.price?.currencyCode||"USD"}),k=()=>{const l=e?.sku,a=e?.variants;return a?.find(K=>K?.sku===l)?.image?.url||a?.[0]?.image?.url||""},r=e?.custom_name||e?.title,u=e?.custom_description||e?.description;M(g,{componentType:S,componentName:_,componentTitle:r,componentDescription:u,position:t?.index+1});const v=()=>b>=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=()=>b>=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 q(()=>{let l=[];if(p){const n=`${p}${x?.off||""}`;l.push(n)}const a=e?.tags?.filter?.(n=>n?.startsWith?.("CLtag"))?.map?.(n=>n?.replace?.("CLtag:",""))?.slice?.(0,p?1:2);D(l.concat(a))},[e?.tags,p]),s("div",{ref:g,className:m(v().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:c("div",{className:m(i(),"desktop:p-6 absolute inset-0 box-border overflow-hidden p-4"),children:[s("div",{className:m(v().imgItem,"relative overflow-hidden desktop:mb-0 mb-1"),children:s("a",{"aria-label":r,target:t?.target,href:A(`${h==="us"||!h?"":`/${h}`}/products/${e?.handle}`,`${S}_${_}`),onClick:()=>{W({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:s(H,{source:k(),alt:"",className:"flex h-full justify-center object-cover [&_img]:w-auto"})})}),c("div",{className:m("flex flex-col justify-center items-start",v().boxItem),children:[P?s("div",{className:"mb-1 box-border flex h-8 flex-wrap gap-1 overflow-hidden",children:y?.map?.((l,a)=>s(F,{children:l},a))}):null,r?s(R,{as:"h3",title:r||"",size:2,className:"shelf-display-product-title mb-1 line-clamp-2",html:r||""}):null,u?s(U,{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:u||""}):null,s("div",{className:"mb-2 mt-5 flex items-center",children:I?s("div",{className:"tablet:text-2xl text-info-primary text-xl font-bold",children:B?.soldOutText}):c(L,{children:[s("div",{className:"final-price tablet:text-2xl text-info-primary text-xl font-bold",children:o?.availableForSale&&j||""}),s("div",{className:"origin-price tablet:text-xl text-info-secondary ml-1 text-lg font-bold line-through",children:o?.availableForSale&&O||""})]})}),c("div",{className:m("shelf-flex-button-group","lg-desktop:gap-3 flex items-center gap-2",t.direction==="vertical"?"flex-col":""),children:[t?.secondaryButton?s(w,{variant:"secondary",onClick:()=>$(e,t?.index,t),className:`
|
|
6
6
|
${t.direction==="vertical"?"w-full":""}
|
|
7
|
-
`,children:t?.secondaryButton||""}):null,t?.primaryButton?s(
|
|
7
|
+
`,children:t?.secondaryButton||""}):null,t?.primaryButton?s(w,{variant:"primary",onClick:()=>C(e,t?.index,t),className:`
|
|
8
8
|
${t.direction==="vertical"?"w-full":""}
|
|
9
9
|
`,children:t?.primaryButton||""}):null]})]})]})},e?.id||e?.handle)};export{pe as ShelfDisplayHorizontalItem,re as ShelfDisplayWrapItem};
|
|
10
10
|
//# sourceMappingURL=shelfDisplayItem.js.map
|
|
@@ -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": "AAqF2D,OAuB/C,YAAAA,EAvB+C,OAAAC,EAuB/C,QAAAC,MAvB+C,oBArF3D,OAAS,kBAAAC,MAAsB,2BAC/B,OAAS,sBAAAC,MAA0B,oBACnC,OAAOC,MAAa,8BACpB,OAAOC,MAAW,4BAClB,OAAS,MAAAC,MAAU,yBACnB,OAAS,QAAAC,MAAY,2BACrB,OAAOC,MAAY,6BACnB,OAAS,WAAAC,MAAe,wBACxB,OAAS,eAAAC,MAAmB,8BAC5B,OAAS,WAAAC,MAAe,8BAExB,OAAS,eAAAC,MAAmB,6BAC5B,OAAS,UAAAC,EAAQ,aAAAC,EAAW,YAAAC,MAAgB,QAE5C,MAAMC,EAAgB,QAChBC,EAAgB,gBAEhBC,EAAiB,aAEVC,GAAuB,CAAC,CAAE,KAAAC,EAAM,cAAAC,CAAc,IAA0C,CACnG,KAAM,CAA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IN,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,EAEzB/B,EAAYgB,EAAK,CACf,cAAAZ,EACA,cAAAC,EACA,eAAgB8B,EAChB,qBAAsBC,EACtB,SAAU3B,GAAe,MAAQ,CACnC,CAAC,EAED,MAAM+B,EAAgB,IAElBnD,EAAAF,EAAA,CACG,UAAAuC,
|
|
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": "AAqF2D,OAuB/C,YAAAA,EAvB+C,OAAAC,EAuB/C,QAAAC,MAvB+C,oBArF3D,OAAS,kBAAAC,MAAsB,2BAC/B,OAAS,sBAAAC,MAA0B,oBACnC,OAAOC,MAAa,8BACpB,OAAOC,MAAW,4BAClB,OAAS,MAAAC,MAAU,yBACnB,OAAS,QAAAC,MAAY,2BACrB,OAAOC,MAAY,6BACnB,OAAS,WAAAC,MAAe,wBACxB,OAAS,eAAAC,MAAmB,8BAC5B,OAAS,WAAAC,MAAe,8BAExB,OAAS,eAAAC,MAAmB,6BAC5B,OAAS,UAAAC,EAAQ,aAAAC,EAAW,YAAAC,MAAgB,QAE5C,MAAMC,EAAgB,QAChBC,EAAgB,gBAEhBC,EAAiB,aAEVC,GAAuB,CAAC,CAAE,KAAAC,EAAM,cAAAC,CAAc,IAA0C,CACnG,KAAM,CAAE,mBAAAC,EAAqB,GAAO,UAAAC,EAAW,WAAAC,CAAW,EAAIH,GAAiB,CAAC,EAC1E,CAAE,OAAAI,EAAS,KAAM,YAAAC,CAAY,EAAIxB,EAAe,EAChD,CAAE,UAAAyB,CAAU,EAAIH,GAAc,CAAC,EAC/BI,EAAMf,EAAuB,IAAI,EACjC,CAACgB,EAAUC,CAAW,EAAIf,EAAmB,CAAC,CAAC,EAE/CgB,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,EAA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BjC,EAACK,EAAA,CAAmB,SAAA+B,GAARH,CAAa,CAAQ,EAClF,EACE,KACHc,EACC/C,EAACW,EAAA,CACC,GAAG,KACH,MAAOoC,GAAgB,GACvB,KAAM,EACN,UAAU,gDACV,KAAMA,GAAgB,GACxB,EACE,KACHC,EACChD,EAACO,EAAA,CACC,KAAM,EACN,UAAU,kIACV,KAAMyC,GAAsB,GAC9B,EACE,KACJhD,EAAC,OAAI,UAAU,8BACZ,SAAAqC,EACCrC,EAAC,OAAI,UAAU,sDAAuD,SAAA0B,GAAa,YAAY,EAE/FzB,EAAAF,EAAA,CACE,UAAAC,EAAC,OAAI,UAAU,kEACZ,SAAAmC,GAAS,kBAAmBM,GAAS,GACxC,EACAzC,EAAC,OAAI,UAAU,sFACZ,SAAAmC,GAAS,kBAAmBO,GAAa,GAC5C,GACF,EAEJ,EAEAzC,EAAC,OACC,UAAWK,EACT,0BACA,2CACAe,EAAc,YAAc,WAAa,WAAa,EACxD,EAEC,UAAAA,GAAe,gBACdrB,EAACQ,EAAA,CACC,QAAQ,YACR,QAAS,IAAM0B,EAAkBd,EAAMC,GAAe,MAAOA,CAAa,EAC1E,UAAW;AAAA,kBACTA,EAAc,YAAc,WAAa,SAAW,EAAE;AAAA,gBAGvD,SAAAA,GAAe,iBAAmB,GACrC,EACE,KACHA,GAAe,cACdrB,EAACQ,EAAA,CACC,QAAQ,UACR,QAAS,IAAMuB,EAAgBX,EAAMC,GAAe,MAAOA,CAAa,EACxE,UAAW;AAAA,gBACXA,EAAc,YAAc,WAAa,SAAW,EAAE;AAAA,cAGrD,SAAAA,GAAe,eAAiB,GACnC,EACE,MACN,GACF,GACF,GA5GKD,GAAM,IAAMA,GAAM,MA6GzB,CAEJ",
|
|
6
6
|
"names": ["Fragment", "jsx", "jsxs", "useAiuiContext", "formatVariantPrice", "Picture", "Badge", "cn", "Text", "Button", "gaTrack", "trackUrlRef", "Heading", "useExposure", "useRef", "useEffect", "useState", "componentType", "componentName", "SOLD_OUT_PRICE", "ShelfDisplayWrapItem", "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", "ShelfDisplayHorizontalItem", "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
|
-
import{jsx as
|
|
1
|
+
import{jsx as a}from"react/jsx-runtime";import{useEffect as b,useRef as h,useMemo as x}from"react";const m="openDropDown",v=({index:l,active:s,list:d,setActive:p,setVisible:c,visible:t,filterActive:r})=>{const u=h(null);b(()=>{const e=n=>{const o=n?.target?.getAttribute?.("class");!u?.current?.contains(n?.target)&&!o?.includes(m)&&c({...t,[l]:!1})};return document.addEventListener("click",e),()=>document.removeEventListener("click",e)},[]);const f=x(()=>{const e=Object.keys(r||{});return d?.filter(n=>!e?.find(i=>r?.[i]?.handle===n?.handle))},[r,d]);return a("div",{ref:u,className:`absolute left-0 top-[104%] z-30 box-border max-h-[340px] w-full overflow-hidden rounded-lg bg-[#F5F5F7] ${t?.[l]?"block":"hidden"}`,children:a("div",{className:"m-0 box-border h-full flex-1 overflow-y-auto overflow-x-hidden p-0 [&:last-child]:border-r-0",children:f?.map((e,n)=>{const o=e?.sku||e?.variants?.[0]?.sku;return a("div",{onClick:()=>{p({...s,[n]:{sku:o,name:e?.name,handle:e?.handle}}),c({...t,[n]:!1})},title:e?.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
2
|
${e?.handle===s?.handle?"bg-[#EAEAEC]":""}`,children:e?.name},n)})})})};var D=v;export{D as default};
|
|
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": "AA8CY,cAAAA,MAAA,oBA9CZ,OAAS,aAAAC,EAAW,UAAAC,EAAQ,WAAAC,MAAe,QAE3C,MAAMC,EAAe,eAYfC,EAAW,CAAC,CAAE,MAAAC,EAAO,OAAAC,EAAQ,KAAAC,EAAM,UAAAC,EAAW,WAAAC,EAAY,QAAAC,EAAS,aAAAC,CAAa,IAAqB,CACzG,MAAMC,EAAcX,EAAuB,IAAI,EAE/CD,EAAU,IAAM,CACd,MAAMa,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,EAAad,EAAQ,IAAM,CAC/B,MAAMe,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,OACER,EAAC,OACC,IAAKa,EACL,UAAW,2GAA2GF,IAAUL,CAAK,EAAI,QAAU,QAAQ,GAE3J,SAAAN,EAAC,OAAI,UAAW,+FACb,SAAAiB,GAAY,IAAI,CAACE,
|
|
6
|
-
"names": ["jsx", "useEffect", "useRef", "useMemo", "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": "AA8CY,cAAAA,MAAA,oBA9CZ,OAAS,aAAAC,EAAW,UAAAC,EAAQ,WAAAC,MAAe,QAE3C,MAAMC,EAAe,eAYfC,EAAW,CAAC,CAAE,MAAAC,EAAO,OAAAC,EAAQ,KAAAC,EAAM,UAAAC,EAAW,WAAAC,EAAY,QAAAC,EAAS,aAAAC,CAAa,IAAqB,CACzG,MAAMC,EAAcX,EAAuB,IAAI,EAE/CD,EAAU,I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"list", "setActive", "setVisible", "visible", "filterActive", "dropDownRef", "handleClickOutside", "event", "isDel", "handleList", "activeIndex", "item", "items", "currentSku", "dropdown_default"]
|
|
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 };
|