@anker-in/headless-ui 1.1.79 → 1.1.81
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 +36 -1
- package/dist/cjs/biz-components/ActivitySchedule/index.d.ts +3 -1
- package/dist/cjs/biz-components/AiuiProvider/index.d.ts +13 -1
- package/dist/cjs/biz-components/AiuiProvider/index.js +1 -1
- package/dist/cjs/biz-components/AiuiProvider/index.js.map +3 -3
- package/dist/cjs/biz-components/AiuiProvider/useAutoTracking.d.ts +17 -0
- package/dist/cjs/biz-components/AiuiProvider/useAutoTracking.js +2 -0
- package/dist/cjs/biz-components/AiuiProvider/useAutoTracking.js.map +7 -0
- package/dist/cjs/biz-components/AnchorNavigation/index.d.ts +2 -7
- package/dist/cjs/biz-components/AnchorNavigation/index.js +1 -1
- package/dist/cjs/biz-components/AnchorNavigation/index.js.map +3 -3
- package/dist/cjs/biz-components/AplusDesc/index.d.ts +17 -1
- package/dist/cjs/biz-components/BrandCardLink/BrandCardLink.d.ts +2 -1
- package/dist/cjs/biz-components/BrandEquity/BrandEquity.d.ts +2 -1
- package/dist/cjs/biz-components/Category/index.d.ts +1 -1
- package/dist/cjs/biz-components/CreativeModule/index.d.ts +7 -1
- package/dist/cjs/biz-components/DownLoad/index.d.ts +6 -1
- package/dist/cjs/biz-components/Evaluate/index.d.ts +1 -1
- package/dist/cjs/biz-components/Faq/Faq.d.ts +3 -2
- package/dist/cjs/biz-components/Faq/Faq.js +1 -1
- package/dist/cjs/biz-components/Faq/Faq.js.map +2 -2
- package/dist/cjs/biz-components/FeatureCards/FeatureCards.d.ts +3 -1
- package/dist/cjs/biz-components/FeatureShowcase/FeatureShowcase.d.ts +3 -1
- package/dist/cjs/biz-components/Features/index.d.ts +8 -1
- package/dist/cjs/biz-components/Features/index.js +1 -1
- package/dist/cjs/biz-components/Features/index.js.map +2 -2
- package/dist/cjs/biz-components/FootCharger/index.d.ts +7 -1
- package/dist/cjs/biz-components/FooterNavigation/index.d.ts +2 -1
- package/dist/cjs/biz-components/GiftBox/index.d.ts +6 -7
- package/dist/cjs/biz-components/GiftBox/index.js +1 -1
- package/dist/cjs/biz-components/GiftBox/index.js.map +3 -3
- package/dist/cjs/biz-components/GiftBox/types.d.ts +13 -0
- package/dist/cjs/biz-components/GiftBox/types.js +2 -0
- package/dist/cjs/biz-components/GiftBox/types.js.map +7 -0
- package/dist/cjs/biz-components/GiftShelf/index.d.ts +3 -1
- package/dist/cjs/biz-components/GiftTierShelf/index.d.ts +3 -1
- package/dist/cjs/biz-components/Graphic/index.d.ts +8 -1
- package/dist/cjs/biz-components/Graphic/index.js +1 -1
- package/dist/cjs/biz-components/Graphic/index.js.map +3 -3
- package/dist/cjs/biz-components/GraphicAttractionBlock/index.d.ts +1 -1
- package/dist/cjs/biz-components/GraphicMore/index.d.ts +7 -1
- package/dist/cjs/biz-components/GraphicMore/index.js +1 -1
- package/dist/cjs/biz-components/GraphicMore/index.js.map +2 -2
- package/dist/cjs/biz-components/GraphicOverlay/GraphicOverlay.d.ts +10 -2
- package/dist/cjs/biz-components/HeaderNavigation/index.d.ts +3 -1
- package/dist/cjs/biz-components/HeroBanner/HeroBanner.d.ts +5 -1
- package/dist/cjs/biz-components/ImageTextFeature/ImageTextFeature.d.ts +3 -1
- package/dist/cjs/biz-components/ImageWithText/ImageWithText.d.ts +3 -1
- package/dist/cjs/biz-components/Ksp/index.d.ts +1 -1
- package/dist/cjs/biz-components/Listing/components/PaidShipping/ShippingMethod.js +1 -1
- package/dist/cjs/biz-components/Listing/components/PaidShipping/ShippingMethod.js.map +2 -2
- package/dist/cjs/biz-components/Listing/components/PaidShipping/ShippingPolicyModal.js +1 -1
- package/dist/cjs/biz-components/Listing/components/PaidShipping/ShippingPolicyModal.js.map +2 -2
- package/dist/cjs/biz-components/Listing/components/PaidShipping/index.d.ts +11 -1
- package/dist/cjs/biz-components/Listing/components/PaidShipping/index.js +1 -1
- package/dist/cjs/biz-components/Listing/components/PaidShipping/index.js.map +2 -2
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/BenefitsTab.d.ts +26 -1
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/ProductBanner/index.d.ts +20 -0
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/ProductBanner/index.js +2 -0
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/ProductBanner/index.js.map +7 -0
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/ProductBenefits/index.d.ts +18 -0
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/ProductBenefits/index.js +2 -0
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/ProductBenefits/index.js.map +7 -0
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/ProductBenefitsTabs/ModalContainer.js +1 -1
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/ProductBenefitsTabs/ModalContainer.js.map +2 -2
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/ProductBundle/index.d.ts +1 -1
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/ProductBundle/index.js +1 -1
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/ProductBundle/index.js.map +3 -3
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/ProductCoupon/index.d.ts +41 -0
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/ProductCoupon/index.js +2 -0
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/ProductCoupon/index.js.map +7 -0
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/ProductExchangePurchase/index.d.ts +1 -1
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/ProductExchangePurchase/index.js +1 -1
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/ProductExchangePurchase/index.js.map +3 -3
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/ProductFreeGift/index.d.ts +1 -1
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/ProductFreeGift/index.js +1 -1
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/ProductFreeGift/index.js.map +3 -3
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/ProductHighlight/index.d.ts +1 -1
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/ProductHighlight/index.js +2 -2
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/ProductHighlight/index.js.map +2 -2
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/ProductOptions/index.d.ts +1 -1
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/ProductOptions/index.js +1 -1
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/ProductOptions/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.d.ts +1 -1
- 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/ProductGridBox.js +1 -1
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductGridBox.js.map +2 -2
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductPaidShipping/index.d.ts +12 -0
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductPaidShipping/index.js +2 -0
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductPaidShipping/index.js.map +7 -0
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductSummary/index.d.ts +1 -1
- 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 +2 -2
- package/dist/cjs/biz-components/Listing/components/PurchaseBar/ScrollSpyNav/index.js +1 -1
- package/dist/cjs/biz-components/Listing/components/PurchaseBar/ScrollSpyNav/index.js.map +2 -2
- package/dist/cjs/biz-components/Listing/components/PurchaseBar/index.d.ts +2 -1
- package/dist/cjs/biz-components/Listing/hooks/useFollowTooltip.d.ts +19 -0
- package/dist/cjs/biz-components/Listing/hooks/useFollowTooltip.js +2 -0
- package/dist/cjs/biz-components/Listing/hooks/useFollowTooltip.js.map +7 -0
- package/dist/cjs/biz-components/Marquee/Marquee.d.ts +3 -2
- package/dist/cjs/biz-components/MarqueeReview/index.d.ts +1 -1
- package/dist/cjs/biz-components/MediaEndorsement/index.d.ts +2 -1
- package/dist/cjs/biz-components/MediaPlayerBase/index.d.ts +2 -1
- package/dist/cjs/biz-components/MediaPlayerBase/index.js +1 -1
- package/dist/cjs/biz-components/MediaPlayerBase/index.js.map +2 -2
- package/dist/cjs/biz-components/MediaPlayerMulti/index.d.ts +2 -1
- package/dist/cjs/biz-components/MediaPlayerSticky/index.d.ts +5 -1
- package/dist/cjs/biz-components/MediaSceneSwitcher/MediaSceneSwitcher.d.ts +2 -1
- package/dist/cjs/biz-components/MediaSceneSwitcherV2/index.d.ts +1 -1
- package/dist/cjs/biz-components/MemberEquity/index.d.ts +3 -1
- package/dist/cjs/biz-components/MultiLayoutGraphicBlock/MultiLayoutGraphicBlock.d.ts +17 -2
- package/dist/cjs/biz-components/NavigationSearch/index.d.ts +2 -2
- package/dist/cjs/biz-components/NavigationSearch/index.js +2 -2
- package/dist/cjs/biz-components/NavigationSearch/index.js.map +3 -3
- package/dist/cjs/biz-components/ProductCompare/index.d.ts +1 -1
- package/dist/cjs/biz-components/ProductHero/ProductHero.d.ts +3 -1
- package/dist/cjs/biz-components/ProductNav/ProductNav.d.ts +2 -1
- package/dist/cjs/biz-components/PromotionalBar/index.d.ts +1 -1
- package/dist/cjs/biz-components/SecondaryBanner/index.d.ts +2 -7
- package/dist/cjs/biz-components/SecondaryBanner/index.js +1 -1
- package/dist/cjs/biz-components/SecondaryBanner/index.js.map +3 -3
- package/dist/cjs/biz-components/SelectStore/index.d.ts +7 -1
- package/dist/cjs/biz-components/SelectStore/index.js +1 -1
- package/dist/cjs/biz-components/SelectStore/index.js.map +2 -2
- package/dist/cjs/biz-components/ShelfDisplay/index.d.ts +3 -1
- package/dist/cjs/biz-components/Slogan/index.d.ts +3 -1
- package/dist/cjs/biz-components/Spacer/index.d.ts +3 -1
- package/dist/cjs/biz-components/Specs/index.d.ts +1 -1
- package/dist/cjs/biz-components/SpecsComparison/SpecsComparison.d.ts +3 -1
- package/dist/cjs/biz-components/TabWithImage/TabWithImage.d.ts +3 -1
- package/dist/cjs/biz-components/Tabs/Tabs.d.ts +3 -1
- package/dist/cjs/biz-components/Tabs/Tabs.js +1 -1
- package/dist/cjs/biz-components/Tabs/Tabs.js.map +2 -2
- package/dist/cjs/biz-components/TabsGroup/index.d.ts +3 -1
- package/dist/cjs/biz-components/TabsWithMedia/TabsWithMedia.d.ts +3 -1
- package/dist/cjs/biz-components/ThreeDCarousel/ThreeDCarousel.d.ts +3 -1
- package/dist/cjs/biz-components/ThreeDCarousel/ThreeDCarousel.js +1 -1
- package/dist/cjs/biz-components/ThreeDCarousel/ThreeDCarousel.js.map +2 -2
- package/dist/cjs/biz-components/Title/index.d.ts +1 -1
- package/dist/cjs/biz-components/Title/index.js +1 -1
- package/dist/cjs/biz-components/Title/index.js.map +2 -2
- package/dist/cjs/biz-components/VideoFeature/VideoFeature.d.ts +3 -1
- package/dist/cjs/biz-components/WheelLottery/index.d.ts +1 -1
- package/dist/cjs/biz-components/WhyChoose/WhyChoose.d.ts +3 -2
- package/dist/cjs/biz-components/index.d.ts +4 -0
- package/dist/cjs/biz-components/index.js +1 -1
- package/dist/cjs/biz-components/index.js.map +3 -3
- package/dist/cjs/helpers/ScrollLoadVideo.js +1 -1
- package/dist/cjs/helpers/ScrollLoadVideo.js.map +2 -2
- package/dist/cjs/helpers/index.d.ts +1 -0
- package/dist/cjs/helpers/index.js +1 -1
- package/dist/cjs/helpers/index.js.map +3 -3
- package/dist/cjs/helpers/isLexicalEmpty.d.ts +13 -0
- package/dist/cjs/helpers/isLexicalEmpty.js +2 -0
- package/dist/cjs/helpers/isLexicalEmpty.js.map +7 -0
- package/dist/cjs/shared/Styles.d.ts +2 -1
- package/dist/cjs/shared/Styles.js +1 -1
- package/dist/cjs/shared/Styles.js.map +2 -2
- package/dist/esm/biz-components/AccordionCards/index.d.ts +36 -1
- package/dist/esm/biz-components/ActivitySchedule/index.d.ts +3 -1
- package/dist/esm/biz-components/AiuiProvider/index.d.ts +13 -1
- package/dist/esm/biz-components/AiuiProvider/index.js +1 -1
- package/dist/esm/biz-components/AiuiProvider/index.js.map +3 -3
- package/dist/esm/biz-components/AiuiProvider/useAutoTracking.d.ts +17 -0
- package/dist/esm/biz-components/AiuiProvider/useAutoTracking.js +2 -0
- package/dist/esm/biz-components/AiuiProvider/useAutoTracking.js.map +7 -0
- package/dist/esm/biz-components/AnchorNavigation/index.d.ts +2 -7
- package/dist/esm/biz-components/AnchorNavigation/index.js +1 -1
- package/dist/esm/biz-components/AnchorNavigation/index.js.map +3 -3
- package/dist/esm/biz-components/AplusDesc/index.d.ts +17 -1
- package/dist/esm/biz-components/BrandCardLink/BrandCardLink.d.ts +2 -1
- package/dist/esm/biz-components/BrandEquity/BrandEquity.d.ts +2 -1
- package/dist/esm/biz-components/Category/index.d.ts +1 -1
- package/dist/esm/biz-components/CreativeModule/index.d.ts +7 -1
- package/dist/esm/biz-components/DownLoad/index.d.ts +6 -1
- package/dist/esm/biz-components/Evaluate/index.d.ts +1 -1
- package/dist/esm/biz-components/Faq/Faq.d.ts +3 -2
- package/dist/esm/biz-components/Faq/Faq.js +1 -1
- package/dist/esm/biz-components/Faq/Faq.js.map +2 -2
- package/dist/esm/biz-components/FeatureCards/FeatureCards.d.ts +3 -1
- package/dist/esm/biz-components/FeatureShowcase/FeatureShowcase.d.ts +3 -1
- package/dist/esm/biz-components/Features/index.d.ts +8 -1
- package/dist/esm/biz-components/Features/index.js +1 -1
- package/dist/esm/biz-components/Features/index.js.map +2 -2
- package/dist/esm/biz-components/FootCharger/index.d.ts +7 -1
- package/dist/esm/biz-components/FooterNavigation/index.d.ts +2 -1
- package/dist/esm/biz-components/GiftBox/index.d.ts +6 -7
- package/dist/esm/biz-components/GiftBox/index.js +1 -1
- package/dist/esm/biz-components/GiftBox/index.js.map +3 -3
- package/dist/esm/biz-components/GiftBox/types.d.ts +13 -0
- package/dist/esm/biz-components/GiftBox/types.js +1 -0
- package/dist/esm/biz-components/GiftShelf/index.d.ts +3 -1
- package/dist/esm/biz-components/GiftTierShelf/index.d.ts +3 -1
- package/dist/esm/biz-components/Graphic/index.d.ts +8 -1
- package/dist/esm/biz-components/Graphic/index.js +1 -1
- package/dist/esm/biz-components/Graphic/index.js.map +3 -3
- package/dist/esm/biz-components/GraphicAttractionBlock/index.d.ts +1 -1
- package/dist/esm/biz-components/GraphicMore/index.d.ts +7 -1
- package/dist/esm/biz-components/GraphicMore/index.js +1 -1
- package/dist/esm/biz-components/GraphicMore/index.js.map +2 -2
- package/dist/esm/biz-components/GraphicOverlay/GraphicOverlay.d.ts +10 -2
- package/dist/esm/biz-components/HeaderNavigation/index.d.ts +3 -1
- package/dist/esm/biz-components/HeroBanner/HeroBanner.d.ts +5 -1
- package/dist/esm/biz-components/ImageTextFeature/ImageTextFeature.d.ts +3 -1
- package/dist/esm/biz-components/ImageWithText/ImageWithText.d.ts +3 -1
- package/dist/esm/biz-components/Ksp/index.d.ts +1 -1
- package/dist/esm/biz-components/Listing/components/PaidShipping/ShippingMethod.js +1 -1
- package/dist/esm/biz-components/Listing/components/PaidShipping/ShippingMethod.js.map +2 -2
- package/dist/esm/biz-components/Listing/components/PaidShipping/ShippingPolicyModal.js +1 -1
- package/dist/esm/biz-components/Listing/components/PaidShipping/ShippingPolicyModal.js.map +2 -2
- package/dist/esm/biz-components/Listing/components/PaidShipping/index.d.ts +11 -1
- package/dist/esm/biz-components/Listing/components/PaidShipping/index.js +1 -1
- package/dist/esm/biz-components/Listing/components/PaidShipping/index.js.map +2 -2
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/BenefitsTab.d.ts +26 -1
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/ProductBanner/index.d.ts +20 -0
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/ProductBanner/index.js +2 -0
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/ProductBanner/index.js.map +7 -0
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/ProductBenefits/index.d.ts +18 -0
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/ProductBenefits/index.js +2 -0
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/ProductBenefits/index.js.map +7 -0
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/ProductBenefitsTabs/ModalContainer.js +1 -1
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/ProductBenefitsTabs/ModalContainer.js.map +2 -2
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/ProductBundle/index.d.ts +1 -1
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/ProductBundle/index.js +1 -1
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/ProductBundle/index.js.map +3 -3
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/ProductCoupon/index.d.ts +41 -0
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/ProductCoupon/index.js +2 -0
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/ProductCoupon/index.js.map +7 -0
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/ProductExchangePurchase/index.d.ts +1 -1
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/ProductExchangePurchase/index.js +1 -1
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/ProductExchangePurchase/index.js.map +3 -3
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/ProductFreeGift/index.d.ts +1 -1
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/ProductFreeGift/index.js +1 -1
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/ProductFreeGift/index.js.map +3 -3
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/ProductHighlight/index.d.ts +1 -1
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/ProductHighlight/index.js +2 -2
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/ProductHighlight/index.js.map +2 -2
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/ProductOptions/index.d.ts +1 -1
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/ProductOptions/index.js +1 -1
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/ProductOptions/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.d.ts +1 -1
- 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/ProductGridBox.js +1 -1
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductGridBox.js.map +2 -2
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductPaidShipping/index.d.ts +12 -0
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductPaidShipping/index.js +2 -0
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductPaidShipping/index.js.map +7 -0
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductSummary/index.d.ts +1 -1
- 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 +2 -2
- package/dist/esm/biz-components/Listing/components/PurchaseBar/ScrollSpyNav/index.js +1 -1
- package/dist/esm/biz-components/Listing/components/PurchaseBar/ScrollSpyNav/index.js.map +2 -2
- package/dist/esm/biz-components/Listing/components/PurchaseBar/index.d.ts +2 -1
- package/dist/esm/biz-components/Listing/hooks/useFollowTooltip.d.ts +19 -0
- package/dist/esm/biz-components/Listing/hooks/useFollowTooltip.js +2 -0
- package/dist/esm/biz-components/Listing/hooks/useFollowTooltip.js.map +7 -0
- package/dist/esm/biz-components/Marquee/Marquee.d.ts +3 -2
- package/dist/esm/biz-components/MarqueeReview/index.d.ts +1 -1
- package/dist/esm/biz-components/MediaEndorsement/index.d.ts +2 -1
- package/dist/esm/biz-components/MediaPlayerBase/index.d.ts +2 -1
- package/dist/esm/biz-components/MediaPlayerBase/index.js +1 -1
- package/dist/esm/biz-components/MediaPlayerBase/index.js.map +2 -2
- package/dist/esm/biz-components/MediaPlayerMulti/index.d.ts +2 -1
- package/dist/esm/biz-components/MediaPlayerSticky/index.d.ts +5 -1
- package/dist/esm/biz-components/MediaSceneSwitcher/MediaSceneSwitcher.d.ts +2 -1
- package/dist/esm/biz-components/MediaSceneSwitcherV2/index.d.ts +1 -1
- package/dist/esm/biz-components/MemberEquity/index.d.ts +3 -1
- package/dist/esm/biz-components/MultiLayoutGraphicBlock/MultiLayoutGraphicBlock.d.ts +17 -2
- package/dist/esm/biz-components/NavigationSearch/index.d.ts +2 -2
- package/dist/esm/biz-components/NavigationSearch/index.js +2 -2
- package/dist/esm/biz-components/NavigationSearch/index.js.map +3 -3
- package/dist/esm/biz-components/ProductCompare/index.d.ts +1 -1
- package/dist/esm/biz-components/ProductHero/ProductHero.d.ts +3 -1
- package/dist/esm/biz-components/ProductNav/ProductNav.d.ts +2 -1
- package/dist/esm/biz-components/PromotionalBar/index.d.ts +1 -1
- package/dist/esm/biz-components/SecondaryBanner/index.d.ts +2 -7
- package/dist/esm/biz-components/SecondaryBanner/index.js +1 -1
- package/dist/esm/biz-components/SecondaryBanner/index.js.map +3 -3
- package/dist/esm/biz-components/SelectStore/index.d.ts +7 -1
- package/dist/esm/biz-components/SelectStore/index.js +1 -1
- package/dist/esm/biz-components/SelectStore/index.js.map +2 -2
- package/dist/esm/biz-components/ShelfDisplay/index.d.ts +3 -1
- package/dist/esm/biz-components/Slogan/index.d.ts +3 -1
- package/dist/esm/biz-components/Spacer/index.d.ts +3 -1
- package/dist/esm/biz-components/Specs/index.d.ts +1 -1
- package/dist/esm/biz-components/SpecsComparison/SpecsComparison.d.ts +3 -1
- package/dist/esm/biz-components/TabWithImage/TabWithImage.d.ts +3 -1
- package/dist/esm/biz-components/Tabs/Tabs.d.ts +3 -1
- package/dist/esm/biz-components/Tabs/Tabs.js +1 -1
- package/dist/esm/biz-components/Tabs/Tabs.js.map +3 -3
- package/dist/esm/biz-components/TabsGroup/index.d.ts +3 -1
- package/dist/esm/biz-components/TabsWithMedia/TabsWithMedia.d.ts +3 -1
- package/dist/esm/biz-components/ThreeDCarousel/ThreeDCarousel.d.ts +3 -1
- package/dist/esm/biz-components/ThreeDCarousel/ThreeDCarousel.js +1 -1
- package/dist/esm/biz-components/ThreeDCarousel/ThreeDCarousel.js.map +2 -2
- package/dist/esm/biz-components/Title/index.d.ts +1 -1
- package/dist/esm/biz-components/Title/index.js +1 -1
- package/dist/esm/biz-components/Title/index.js.map +2 -2
- package/dist/esm/biz-components/VideoFeature/VideoFeature.d.ts +3 -1
- package/dist/esm/biz-components/WheelLottery/index.d.ts +1 -1
- package/dist/esm/biz-components/WhyChoose/WhyChoose.d.ts +3 -2
- package/dist/esm/biz-components/index.d.ts +4 -0
- package/dist/esm/biz-components/index.js +1 -1
- package/dist/esm/biz-components/index.js.map +2 -2
- package/dist/esm/helpers/ScrollLoadVideo.js +1 -1
- package/dist/esm/helpers/ScrollLoadVideo.js.map +2 -2
- package/dist/esm/helpers/index.d.ts +1 -0
- package/dist/esm/helpers/index.js +1 -1
- package/dist/esm/helpers/index.js.map +3 -3
- package/dist/esm/helpers/isLexicalEmpty.d.ts +13 -0
- package/dist/esm/helpers/isLexicalEmpty.js +2 -0
- package/dist/esm/helpers/isLexicalEmpty.js.map +7 -0
- package/dist/esm/shared/Styles.d.ts +2 -1
- package/dist/esm/shared/Styles.js +1 -1
- package/dist/esm/shared/Styles.js.map +2 -2
- package/package.json +1 -1
- package/style.css +194 -35
- package/dist/cjs/biz-components/Listing/index.d.ts +0 -0
- package/dist/cjs/biz-components/Listing/index.js +0 -2
- package/dist/esm/biz-components/Listing/index.d.ts +0 -0
- package/dist/esm/biz-components/Listing/index.js +0 -2
- package/dist/esm/biz-components/Listing/index.js.map +0 -7
- /package/dist/{cjs/biz-components/Listing/index.js.map → esm/biz-components/GiftBox/types.js.map} +0 -0
|
@@ -48,5 +48,40 @@ export type AccordionCardsType = Omit<React.HTMLAttributes<HTMLDivElement>, 'cla
|
|
|
48
48
|
primaryButton?: (_v: any, _index: number) => void;
|
|
49
49
|
};
|
|
50
50
|
};
|
|
51
|
-
declare const _default:
|
|
51
|
+
declare const _default: React.ForwardRefExoticComponent<Omit<React.HTMLAttributes<HTMLDivElement>, "className"> & {
|
|
52
|
+
className?: string;
|
|
53
|
+
data: {
|
|
54
|
+
key?: string;
|
|
55
|
+
title?: string;
|
|
56
|
+
products: Array<ItemType>;
|
|
57
|
+
/** 按钮形状 */
|
|
58
|
+
shape?: "round" | "square";
|
|
59
|
+
/** 卡片形状 */
|
|
60
|
+
itemShape?: "round" | "square";
|
|
61
|
+
/** 主按钮配置 */
|
|
62
|
+
primaryButton?: string;
|
|
63
|
+
theme?: "light" | "dark";
|
|
64
|
+
};
|
|
65
|
+
/**
|
|
66
|
+
* 自动播放配置
|
|
67
|
+
*/
|
|
68
|
+
autoplay?: {
|
|
69
|
+
/**
|
|
70
|
+
* 是否开启自动播放
|
|
71
|
+
*/
|
|
72
|
+
enabled: boolean;
|
|
73
|
+
/**
|
|
74
|
+
* 是否循环播放
|
|
75
|
+
*/
|
|
76
|
+
loop?: boolean;
|
|
77
|
+
/**
|
|
78
|
+
* 自动播放间隔时间,单位毫秒
|
|
79
|
+
*/
|
|
80
|
+
interval?: number;
|
|
81
|
+
};
|
|
82
|
+
/** 按钮事件*/
|
|
83
|
+
event?: {
|
|
84
|
+
primaryButton?: (_v: any, _index: number) => void;
|
|
85
|
+
};
|
|
86
|
+
} & React.RefAttributes<HTMLDivElement> & Partial<import("../../shared/Styles.js").StylesProps & import("../../shared/Styles.js").ContainerProps>>;
|
|
52
87
|
export default _default;
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import type { ActivityScheduleProps } from './types.js';
|
|
3
|
+
declare const _default: React.ForwardRefExoticComponent<ActivityScheduleProps & React.RefAttributes<HTMLDivElement> & Partial<import("../../shared/Styles.js").StylesProps & import("../../shared/Styles.js").ContainerProps>>;
|
|
2
4
|
export default _default;
|
|
3
5
|
export type { ActivityScheduleProps, ActivityScheduleData, ActivityScheduleItem } from './types.js';
|
|
@@ -54,6 +54,18 @@ interface AiuiContextType {
|
|
|
54
54
|
* 文案配置,商户可通过此字段覆盖默认文案
|
|
55
55
|
*/
|
|
56
56
|
copyWriting?: Record<string, string>;
|
|
57
|
+
/**
|
|
58
|
+
* 是否启用自动埋点(点击事件追踪),默认为 true
|
|
59
|
+
* 设置为 false 可关闭自动埋点,适用于需要完全自定义埋点的场景
|
|
60
|
+
*
|
|
61
|
+
* @default true
|
|
62
|
+
* @example
|
|
63
|
+
* // 关闭自动埋点
|
|
64
|
+
* <AiuiProvider trackingData={{ pageGroup: 'Home' }} autoTracking={false}>
|
|
65
|
+
* {children}
|
|
66
|
+
* </AiuiProvider>
|
|
67
|
+
*/
|
|
68
|
+
autoTracking?: boolean;
|
|
57
69
|
/**
|
|
58
70
|
* 自定义曝光回调。传入后会替代默认的 GA 埋点逻辑。
|
|
59
71
|
*
|
|
@@ -72,7 +84,7 @@ interface AiuiContextType {
|
|
|
72
84
|
}
|
|
73
85
|
export declare const AiuiContext: React.Context<AiuiContextType>;
|
|
74
86
|
export declare const useAiuiContext: () => AiuiContextType;
|
|
75
|
-
declare const AiuiProvider: ({ children, ...rest }: {
|
|
87
|
+
declare const AiuiProvider: ({ children, autoTracking, ...rest }: {
|
|
76
88
|
children: React.ReactNode;
|
|
77
89
|
} & AiuiContextType) => import("react/jsx-runtime").JSX.Element;
|
|
78
90
|
export default AiuiProvider;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";var
|
|
1
|
+
"use strict";var i=Object.defineProperty;var u=Object.getOwnPropertyDescriptor;var g=Object.getOwnPropertyNames;var l=Object.prototype.hasOwnProperty;var y=(e,t)=>{for(var r in t)i(e,r,{get:t[r],enumerable:!0})},m=(e,t,r,s)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of g(t))!l.call(e,o)&&o!==r&&i(e,o,{get:()=>t[o],enumerable:!(s=u(t,o))||s.enumerable});return e};var x=e=>m(i({},"__esModule",{value:!0}),e);var T={};y(T,{AiuiContext:()=>a,default:()=>A,useAiuiContext:()=>d});module.exports=x(T);var c=require("react/jsx-runtime"),n=require("react"),p=require("./useAutoTracking.js");const a=(0,n.createContext)({trackingData:{},locale:void 0,copyWriting:{}}),d=()=>{const e=(0,n.useContext)(a);if(!e)throw new Error("useAiui must be used in <AiuiProvider>");return e},C=({children:e,autoTracking:t=!0,...r})=>((0,p.useAutoTracking)(r?.trackingData,t),(0,c.jsx)(a.Provider,{value:r,children:e}));var A=C;
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/biz-components/AiuiProvider/index.tsx"],
|
|
4
|
-
"sourcesContent": ["import
|
|
5
|
-
"mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,iBAAAE,EAAA,YAAAC,EAAA,mBAAAC,IAAA,eAAAC,EAAAL,
|
|
6
|
-
"names": ["AiuiProvider_exports", "__export", "AiuiContext", "AiuiProvider_default", "useAiuiContext", "__toCommonJS", "import_jsx_runtime", "
|
|
4
|
+
"sourcesContent": ["import React, { createContext, useContext } from 'react'\nimport type { CurrencyDisplayType } from '../../types/props.js'\nimport { useAutoTracking } from './useAutoTracking.js'\n\n/**\n * Exposure tracking parameters\n */\nexport interface ExposureParams {\n componentType: string\n componentName: string\n componentTitle?: string\n componentDescription?: string\n navigation?: string\n pageGroup?: string\n position?: number\n}\n\n/**\n * Callback function for custom exposure handling\n */\nexport type OnExposureCallback = (params: ExposureParams) => void\n\ninterface AiuiContextType {\n /**\n * \u5168\u5C40\u57CB\u70B9\u6570\u636E\uFF0C\u81F3\u5C11\u5E94\u5305\u542B pageGroup \u5B57\u6BB5\u7528\u4E8E\u533A\u5206\u9875\u9762\uFF0C\u5176\u4ED6\u5B57\u6BB5\u53EF\u6839\u636E\u9700\u8981\u6DFB\u52A0\n */\n trackingData: Record<string, any>\n /**\n * \u5F53\u524D\u8BED\u8A00\u73AF\u5883\uFF0C\u9ED8\u8BA4\u4E3A\u6D4F\u89C8\u5668\u8BED\u8A00\n */\n locale?: string\n /**\n * \u5F53\u524D\u9875\u9762\u8DEF\u5F84\uFF0C\u7528\u4E8E\u57CB\u70B9\u533A\u5206\u4E0D\u540C\u9875\u9762\uFF0C\u9ED8\u8BA4\u4E3A window.location.pathname\n */\n pathname?: string\n /**\n * \u5546\u6237\u81EA\u5B9A\u4E49\u7684\u5E97\u94FA\u57DF\u540D\uFF0C\u7528\u4E8E\u57CB\u70B9\u533A\u5206\u4E0D\u540C\u5546\u6237\uFF0C\u9ED8\u8BA4\u4E3A\u7A7A\u5B57\u7B26\u4E32\n */\n storeDomain?: string\n /**\n * \u7528\u6237\u662F\u5426\u767B\u5F55\n */\n isLogin?: boolean\n\n /**\n * \u7528\u6237\u662F\u5426\u4E3APlus\u4F1A\u5458\n */\n isPlusMember?: boolean\n /**\n * \u8D27\u5E01\u4EE3\u7801\uFF0C\u9ED8\u8BA4\u4E3AUSD\n */\n currencyCode?: string\n /**\n * \u8D27\u5E01\u663E\u793A\u65B9\u5F0F\uFF0C\u9ED8\u8BA4\u4E3Asymbol\uFF08\u7B26\u53F7\uFF09\uFF0C\u53EF\u9009\u503C\u5305\u62EC\uFF1A'symbol'\uFF08\u7B26\u53F7\uFF0C\u5982$\uFF09\u3001'code'\uFF08\u8D27\u5E01\u4EE3\u7801\uFF0C\u5982USD\uFF09\u548C'name'\uFF08\u8D27\u5E01\u540D\u79F0\uFF0C\u5982\u7F8E\u5143\uFF09\u3002\n * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat/NumberFormat#currencydisplay for more details\n */\n currencyDisplay?: CurrencyDisplayType\n /**\n * \u6587\u6848\u914D\u7F6E\uFF0C\u5546\u6237\u53EF\u901A\u8FC7\u6B64\u5B57\u6BB5\u8986\u76D6\u9ED8\u8BA4\u6587\u6848\n */\n copyWriting?: Record<string, string>\n /**\n * \u662F\u5426\u542F\u7528\u81EA\u52A8\u57CB\u70B9\uFF08\u70B9\u51FB\u4E8B\u4EF6\u8FFD\u8E2A\uFF09\uFF0C\u9ED8\u8BA4\u4E3A true\n * \u8BBE\u7F6E\u4E3A false \u53EF\u5173\u95ED\u81EA\u52A8\u57CB\u70B9\uFF0C\u9002\u7528\u4E8E\u9700\u8981\u5B8C\u5168\u81EA\u5B9A\u4E49\u57CB\u70B9\u7684\u573A\u666F\n *\n * @default true\n * @example\n * // \u5173\u95ED\u81EA\u52A8\u57CB\u70B9\n * <AiuiProvider trackingData={{ pageGroup: 'Home' }} autoTracking={false}>\n * {children}\n * </AiuiProvider>\n */\n autoTracking?: boolean\n /**\n * \u81EA\u5B9A\u4E49\u66DD\u5149\u56DE\u8C03\u3002\u4F20\u5165\u540E\u4F1A\u66FF\u4EE3\u9ED8\u8BA4\u7684 GA \u57CB\u70B9\u903B\u8F91\u3002\n *\n * @example\n * <AiuiProvider\n * trackingData={{ pageGroup: 'Home Page' }}\n * onExposure={(params) => {\n * // \u4F7F\u7528\u5546\u6237\u81EA\u5DF1\u7684\u57CB\u70B9\u7CFB\u7EDF\u8BB0\u5F55\u66DD\u5149\u4E8B\u4EF6\n * ga.track('component_impression', params)\n * }}\n * >\n * {children}\n * </AiuiProvider>\n */\n onExposure?: OnExposureCallback\n}\n\nexport const AiuiContext = createContext<AiuiContextType>({\n trackingData: {},\n locale: undefined,\n copyWriting: {},\n})\n\nexport const useAiuiContext = () => {\n const context = useContext(AiuiContext)\n if (!context) {\n throw new Error('useAiui must be used in <AiuiProvider>')\n }\n return context\n}\n\nconst AiuiProvider = ({\n children,\n autoTracking = true,\n ...rest\n}: {\n children: React.ReactNode\n} & AiuiContextType) => {\n // \u4F7F\u7528\u81EA\u52A8\u57CB\u70B9 Hook\n useAutoTracking(rest?.trackingData, autoTracking)\n\n return <AiuiContext.Provider value={rest}>{children}</AiuiContext.Provider>\n}\n\nexport default AiuiProvider\n"],
|
|
5
|
+
"mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,iBAAAE,EAAA,YAAAC,EAAA,mBAAAC,IAAA,eAAAC,EAAAL,GAkHS,IAAAM,EAAA,6BAlHTC,EAAiD,iBAEjDC,EAAgC,gCAwFzB,MAAMN,KAAc,iBAA+B,CACxD,aAAc,CAAC,EACf,OAAQ,OACR,YAAa,CAAC,CAChB,CAAC,EAEYE,EAAiB,IAAM,CAClC,MAAMK,KAAU,cAAWP,CAAW,EACtC,GAAI,CAACO,EACH,MAAM,IAAI,MAAM,wCAAwC,EAE1D,OAAOA,CACT,EAEMC,EAAe,CAAC,CACpB,SAAAC,EACA,aAAAC,EAAe,GACf,GAAGC,CACL,QAIE,mBAAgBA,GAAM,aAAcD,CAAY,KAEzC,OAACV,EAAY,SAAZ,CAAqB,MAAOW,EAAO,SAAAF,EAAS,GAGtD,IAAOR,EAAQO",
|
|
6
|
+
"names": ["AiuiProvider_exports", "__export", "AiuiContext", "AiuiProvider_default", "useAiuiContext", "__toCommonJS", "import_jsx_runtime", "import_react", "import_useAutoTracking", "context", "AiuiProvider", "children", "autoTracking", "rest"]
|
|
7
7
|
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 自动点击埋点 Hook
|
|
3
|
+
*
|
|
4
|
+
* 通过事件委托监听所有带有 `data-headless-type-name` 属性的元素点击事件
|
|
5
|
+
*
|
|
6
|
+
* @param trackingData - 埋点数据对象,包含 pageGroup 等字段
|
|
7
|
+
* @param enabled - 是否启用自动埋点,默认为 true
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* ```tsx
|
|
11
|
+
* function App() {
|
|
12
|
+
* useAutoTracking({ pageGroup: 'Home Page' }, true)
|
|
13
|
+
* return <div>...</div>
|
|
14
|
+
* }
|
|
15
|
+
* ```
|
|
16
|
+
*/
|
|
17
|
+
export declare function useAutoTracking(trackingData: Record<string, any>, enabled?: boolean): void;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";var u=Object.defineProperty;var v=Object.getOwnPropertyDescriptor;var y=Object.getOwnPropertyNames;var h=Object.prototype.hasOwnProperty;var k=(e,t)=>{for(var o in t)u(e,o,{get:t[o],enumerable:!0})},w=(e,t,o,s)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of y(t))!h.call(e,n)&&n!==o&&u(e,n,{get:()=>t[n],enumerable:!(s=v(t,n))||s.enumerable});return e};var E=e=>w(u({},"__esModule",{value:!0}),e);var A={};k(A,{useAutoTracking:()=>b});module.exports=E(A);var r=require("react"),l=require("../../shared/track.js");function b(e,t=!0){const o=(0,r.useRef)(e);(0,r.useEffect)(()=>{o.current=e},[e]),(0,r.useEffect)(()=>{if(!t||typeof window>"u")return;const s="__headless_ui_tracking_bound__";if(window[s])return;const n=f=>{const i=f.target.closest("[data-headless-type-name]");if(!i)return;const a={};for(const g of Array.from(i.attributes)){const d=g?.name;d?.startsWith("data-headless-")&&(a[d]=i.getAttribute(d)||"")}const _=a["data-headless-sku"],m=a["data-headless-type-name"]?.split?.("#"),c=a["data-headless-title-desc-button"]?.split?.("#"),p=a["data-headless-nav-position"]?.split?.("#");(0,l.gaTrack)({event:"ga4Event",event_name:"component_click",event_parameters:{page_group:o.current?.pageGroup||"Home Page",component_type:m?.[0]||"",component_name:m?.[1]||"",position:p?.[1]||"",navigation:p?.[0]||"",button_name:c?.[2]||"",SKU:_||"",component_title:c?.[0]||"",component_description:c?.[1]||""}})};return document.addEventListener("click",n),window[s]=!0,()=>{document.removeEventListener("click",n),delete window[s]}},[t])}
|
|
2
|
+
//# sourceMappingURL=useAutoTracking.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../src/biz-components/AiuiProvider/useAutoTracking.ts"],
|
|
4
|
+
"sourcesContent": ["import { useEffect, useRef } from 'react'\nimport { gaTrack } from '../../shared/track.js'\n\n/**\n * \u81EA\u52A8\u70B9\u51FB\u57CB\u70B9 Hook\n *\n * \u901A\u8FC7\u4E8B\u4EF6\u59D4\u6258\u76D1\u542C\u6240\u6709\u5E26\u6709 `data-headless-type-name` \u5C5E\u6027\u7684\u5143\u7D20\u70B9\u51FB\u4E8B\u4EF6\n *\n * @param trackingData - \u57CB\u70B9\u6570\u636E\u5BF9\u8C61\uFF0C\u5305\u542B pageGroup \u7B49\u5B57\u6BB5\n * @param enabled - \u662F\u5426\u542F\u7528\u81EA\u52A8\u57CB\u70B9\uFF0C\u9ED8\u8BA4\u4E3A true\n *\n * @example\n * ```tsx\n * function App() {\n * useAutoTracking({ pageGroup: 'Home Page' }, true)\n * return <div>...</div>\n * }\n * ```\n */\nexport function useAutoTracking(trackingData: Record<string, any>, enabled: boolean = true) {\n // \u4F7F\u7528 ref \u4FDD\u5B58\u6700\u65B0\u7684 trackingData\uFF0C\u907F\u514D\u95ED\u5305\u9648\u65E7\n const trackingDataRef = useRef(trackingData)\n\n useEffect(() => {\n trackingDataRef.current = trackingData\n }, [trackingData])\n\n useEffect(() => {\n // \u5982\u679C\u5173\u95ED\u4E86\u81EA\u52A8\u57CB\u70B9\uFF0C\u76F4\u63A5\u8FD4\u56DE\n if (!enabled) return\n\n // SSR \u73AF\u5883\u68C0\u6D4B\n if (typeof window === 'undefined') return\n\n // \u5168\u5C40\u6807\u8BB0\uFF1A\u9632\u6B62\u591A\u4E2A Provider \u5B9E\u4F8B\u91CD\u590D\u7ED1\u5B9A\n const TRACKING_KEY = '__headless_ui_tracking_bound__'\n if ((window as any)[TRACKING_KEY]) return\n\n /**\n * \u4E8B\u4EF6\u59D4\u6258\u5904\u7406\u51FD\u6570\n * \u70B9\u51FB\u4E8B\u4EF6\u5192\u6CE1\u5230 document\uFF0C\u68C0\u6D4B\u662F\u5426\u70B9\u51FB\u4E86\u8FFD\u8E2A\u5143\u7D20\n */\n const handleClick = (e: MouseEvent) => {\n const target = e.target as Element\n const el = target.closest('[data-headless-type-name]')\n if (!el) return\n\n // \u63D0\u53D6 data-headless-* \u5C5E\u6027\n const out: Record<string, string> = {}\n for (const attr of Array.from(el.attributes)) {\n const name = (attr as Attr)?.name\n if (name?.startsWith('data-headless-')) {\n out[name] = el.getAttribute(name) || ''\n }\n }\n\n // \u89E3\u6790\u8FFD\u8E2A\u6570\u636E\n const sku = out['data-headless-sku']\n const nameType = out['data-headless-type-name']?.split?.('#')\n const titleDesc = out['data-headless-title-desc-button']?.split?.('#')\n const navPosition = out['data-headless-nav-position']?.split?.('#')\n\n // \u53D1\u9001 GA \u57CB\u70B9\u4E8B\u4EF6\n gaTrack({\n event: 'ga4Event',\n event_name: 'component_click',\n event_parameters: {\n page_group: trackingDataRef.current?.pageGroup || 'Home Page',\n component_type: nameType?.[0] || '',\n component_name: nameType?.[1] || '',\n position: navPosition?.[1] || '',\n navigation: navPosition?.[0] || '',\n button_name: titleDesc?.[2] || '',\n SKU: sku || '',\n component_title: titleDesc?.[0] || '',\n component_description: titleDesc?.[1] || '',\n },\n })\n }\n\n // \u7ED1\u5B9A\u5168\u5C40\u70B9\u51FB\u4E8B\u4EF6\n document.addEventListener('click', handleClick)\n ;(window as any)[TRACKING_KEY] = true\n\n // \u6E05\u7406\u51FD\u6570\n return () => {\n document.removeEventListener('click', handleClick)\n delete (window as any)[TRACKING_KEY]\n }\n }, [enabled])\n}\n"],
|
|
5
|
+
"mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,qBAAAE,IAAA,eAAAC,EAAAH,GAAA,IAAAI,EAAkC,iBAClCC,EAAwB,iCAkBjB,SAASH,EAAgBI,EAAmCC,EAAmB,GAAM,CAE1F,MAAMC,KAAkB,UAAOF,CAAY,KAE3C,aAAU,IAAM,CACdE,EAAgB,QAAUF,CAC5B,EAAG,CAACA,CAAY,CAAC,KAEjB,aAAU,IAAM,CAKd,GAHI,CAACC,GAGD,OAAO,OAAW,IAAa,OAGnC,MAAME,EAAe,iCACrB,GAAK,OAAeA,CAAY,EAAG,OAMnC,MAAMC,EAAeC,GAAkB,CAErC,MAAMC,EADSD,EAAE,OACC,QAAQ,2BAA2B,EACrD,GAAI,CAACC,EAAI,OAGT,MAAMC,EAA8B,CAAC,EACrC,UAAWC,KAAQ,MAAM,KAAKF,EAAG,UAAU,EAAG,CAC5C,MAAMG,EAAQD,GAAe,KACzBC,GAAM,WAAW,gBAAgB,IACnCF,EAAIE,CAAI,EAAIH,EAAG,aAAaG,CAAI,GAAK,GAEzC,CAGA,MAAMC,EAAMH,EAAI,mBAAmB,EAC7BI,EAAWJ,EAAI,yBAAyB,GAAG,QAAQ,GAAG,EACtDK,EAAYL,EAAI,iCAAiC,GAAG,QAAQ,GAAG,EAC/DM,EAAcN,EAAI,4BAA4B,GAAG,QAAQ,GAAG,KAGlE,WAAQ,CACN,MAAO,WACP,WAAY,kBACZ,iBAAkB,CAChB,WAAYL,EAAgB,SAAS,WAAa,YAClD,eAAgBS,IAAW,CAAC,GAAK,GACjC,eAAgBA,IAAW,CAAC,GAAK,GACjC,SAAUE,IAAc,CAAC,GAAK,GAC9B,WAAYA,IAAc,CAAC,GAAK,GAChC,YAAaD,IAAY,CAAC,GAAK,GAC/B,IAAKF,GAAO,GACZ,gBAAiBE,IAAY,CAAC,GAAK,GACnC,sBAAuBA,IAAY,CAAC,GAAK,EAC3C,CACF,CAAC,CACH,EAGA,gBAAS,iBAAiB,QAASR,CAAW,EAC5C,OAAeD,CAAY,EAAI,GAG1B,IAAM,CACX,SAAS,oBAAoB,QAASC,CAAW,EACjD,OAAQ,OAAeD,CAAY,CACrC,CACF,EAAG,CAACF,CAAO,CAAC,CACd",
|
|
6
|
+
"names": ["useAutoTracking_exports", "__export", "useAutoTracking", "__toCommonJS", "import_react", "import_track", "trackingData", "enabled", "trackingDataRef", "TRACKING_KEY", "handleClick", "e", "el", "out", "attr", "name", "sku", "nameType", "titleDesc", "navPosition"]
|
|
7
|
+
}
|
|
@@ -60,10 +60,5 @@ export interface AnchorNavigationProps extends React.HTMLAttributes<HTMLDivEleme
|
|
|
60
60
|
*/
|
|
61
61
|
buttonStyle?: AnchorButtonStyle;
|
|
62
62
|
}
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
*
|
|
66
|
-
* @description 锚点导航
|
|
67
|
-
*/
|
|
68
|
-
declare const AnchorNavigation: React.ForwardRefExoticComponent<AnchorNavigationProps & React.RefAttributes<HTMLDivElement>>;
|
|
69
|
-
export default AnchorNavigation;
|
|
63
|
+
declare const _default: React.ForwardRefExoticComponent<AnchorNavigationProps & React.RefAttributes<HTMLDivElement> & Partial<import("../../shared/Styles.js").StylesProps & import("../../shared/Styles.js").ContainerProps>>;
|
|
64
|
+
export default _default;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";"use client";var
|
|
1
|
+
"use strict";"use client";var B=Object.create;var d=Object.defineProperty;var V=Object.getOwnPropertyDescriptor;var z=Object.getOwnPropertyNames;var M=Object.getPrototypeOf,P=Object.prototype.hasOwnProperty;var q=(t,e)=>{for(var r in e)d(t,r,{get:e[r],enumerable:!0})},R=(t,e,r,c)=>{if(e&&typeof e=="object"||typeof e=="function")for(let l of z(e))!P.call(t,l)&&l!==r&&d(t,l,{get:()=>e[l],enumerable:!(c=V(e,l))||c.enumerable});return t};var x=(t,e,r)=>(r=t!=null?B(M(t)):{},R(e||!t||!t.__esModule?d(r,"default",{value:t,enumerable:!0}):r,t)),F=t=>R(d({},"__esModule",{value:!0}),t);var Y={};q(Y,{default:()=>K});module.exports=F(Y);var g=require("react/jsx-runtime"),i=x(require("react")),m=require("../../helpers/utils.js"),v=require("class-variance-authority"),w=x(require("./useAnchorPosition.js")),L=require("../../components/container.js"),S=require("../../shared/Styles.js");const j=(0,v.cva)("anchor-navigation-content flex items-center overflow-x-auto [&::-webkit-scrollbar]:hidden",{variants:{alignment:{start:"tablet:justify-start",center:"tablet:justify-center",end:"tablet:justify-end"},size:{small:"gap-3",large:"gap-6"}},defaultVariants:{alignment:"start",size:"small"}}),U=(0,v.cva)("anchor-navigation-item relative shrink-0 text-sm font-bold after:absolute after:bottom-0 after:left-0 after:h-1 after:w-0 after:opacity-0 after:transition-all after:duration-300",{variants:{size:{small:"py-3",large:"py-4"}},defaultVariants:{size:"small"}}),W=(0,v.cva)("!sticky top-0 !z-40 w-full",{variants:{theme:{light:"bg-white",dark:"bg-[#1E2024]"}},defaultVariants:{theme:"light"}}),_={defaultColor:"text-[#4A4C56]",activeColor:"text-[#080A0F]",activeIndicatorColor:"after:bg-brand-0"},G={defaultColor:"text-[#8A8D92]",activeColor:"text-white",activeIndicatorColor:"after:bg-brand-0"},T=i.forwardRef(({classNames:t={},data:e,onItemClick:r,buttonStyle:c,className:l,...D},E)=>{const{alignment:H="start",theme:b="light",size:y="small"}=e,f=(0,w.default)(e.sectionIds?.map(o=>o.targetId)||[]),u=i.useRef(null),h=i.useRef(null),N=i.useRef([]);i.useImperativeHandle(E,()=>u.current);const p=b==="dark"?G:_,I={defaultColor:c?.defaultColor??p.defaultColor,activeColor:c?.activeColor??p.activeColor,activeIndicatorColor:c?.activeIndicatorColor??p.activeIndicatorColor},C=i.useCallback(o=>{const n=N.current[o];if(n&&h.current){const s=h.current,a=n,A=a.offsetLeft-s.offsetWidth/2+a.offsetWidth/2;typeof s.scrollTo=="function"&&s.scrollTo({left:A,behavior:"smooth"})}},[]);return i.useEffect(()=>{if(!f)return;const o=e.sectionIds?.findIndex(n=>n.targetId===f);o!==void 0&&o!==-1&&C(o)},[f,e.sectionIds,C]),(0,g.jsx)(L.Container,{ref:u,className:(0,m.cn)(W({theme:b}),t?.root),...D,children:(0,g.jsx)("div",{ref:h,className:(0,m.cn)(j({alignment:H,size:y}),"relative",t?.content),children:e.sectionIds?.map((o,n)=>{const s=f===o.targetId;return(0,g.jsx)("button",{ref:a=>{a&&(N.current[n]=a)},"aria-current":s?!0:void 0,onClick:()=>{if(C(n),r){r(o,n);return}const a=document.getElementById(o.targetId);if(a&&u.current){const A=u.current.offsetHeight,k=a.getBoundingClientRect().top+window.scrollY-A;window.scrollTo({top:k,behavior:"smooth"})}},className:(0,m.cn)(U({size:y}),s?[I.activeColor,I.activeIndicatorColor,"after:w-full after:opacity-100"]:I.defaultColor,t?.item),children:o.label},o.targetId)})})})});T.displayName="AnchorNavigation";var K=(0,S.withLayout)(T);
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/biz-components/AnchorNavigation/index.tsx"],
|
|
4
|
-
"sourcesContent": ["'use client'\n\nimport * as React from 'react'\nimport { cn } from '../../helpers/utils.js'\nimport { cva, type VariantProps } from 'class-variance-authority'\nimport useAnchorPosition from './useAnchorPosition.js'\nimport { Container } from '../../components/container.js'\n\nexport interface AnchorNavigationSemanticName {\n root: 'root'\n content: 'content'\n item: 'item'\n}\n\n/**\n * \u5BFC\u822A\u9879\u5BF9\u9F50\u65B9\u5411\u6837\u5F0F\u53D8\u4F53\n */\nconst anchorNavigationVariants = cva(\n 'anchor-navigation-content flex items-center overflow-x-auto [&::-webkit-scrollbar]:hidden',\n {\n variants: {\n alignment: {\n start: 'tablet:justify-start',\n center: 'tablet:justify-center',\n end: 'tablet:justify-end',\n },\n size: {\n small: 'gap-3',\n large: 'gap-6',\n },\n },\n defaultVariants: {\n alignment: 'start',\n size: 'small',\n },\n }\n)\n\n/**\n * \u5BFC\u822A\u9879\u6837\u5F0F\u53D8\u4F53\uFF08\u4E0D\u542B\u989C\u8272\uFF0C\u989C\u8272\u7531 buttonStyle \u63A7\u5236\uFF09\n */\nconst anchorItemVariants = cva(\n 'anchor-navigation-item relative shrink-0 text-sm font-bold after:absolute after:bottom-0 after:left-0 after:h-1 after:w-0 after:opacity-0 after:transition-all after:duration-300',\n {\n variants: {\n size: {\n small: 'py-3',\n large: 'py-4',\n },\n },\n defaultVariants: {\n size: 'small',\n },\n }\n)\n\n/**\n * \u5BB9\u5668\u4E3B\u9898\u6837\u5F0F\u53D8\u4F53\n */\nconst containerVariants = cva('!sticky top-0 !z-40 w-full', {\n variants: {\n theme: {\n light: 'bg-white',\n dark: 'bg-[#1E2024]',\n },\n },\n defaultVariants: {\n theme: 'light',\n },\n})\n\n/**\n * \u6309\u94AE\u989C\u8272\u914D\u7F6E\uFF0C\u5141\u8BB8\u6309 theme \u5206\u522B\u8986\u76D6\u9ED8\u8BA4\u8272\u3001\u6FC0\u6D3B\u6587\u5B57\u8272\u3001\u6FC0\u6D3B\u6307\u793A\u5668\u8272\n */\nexport interface AnchorButtonStyle {\n /** \u9ED8\u8BA4\uFF08\u672A\u6FC0\u6D3B\uFF09\u6587\u5B57\u8272\uFF0CTailwind class\uFF0C\u5982 'text-info-secondary' */\n defaultColor?: string\n /** \u6FC0\u6D3B\u6587\u5B57\u8272\uFF0CTailwind class\uFF0C\u5982 'text-info-primary' */\n activeColor?: string\n /** \u6FC0\u6D3B\u6307\u793A\u5668\uFF08\u4E0B\u5212\u7EBF\uFF09\u80CC\u666F\u8272\uFF0CTailwind class\uFF0C\u5982 'after:bg-brand-0' */\n activeIndicatorColor?: string\n}\n\n/**\n * \u951A\u70B9\u9879\u63A5\u53E3\n */\nexport interface AnchorSectionItem {\n targetId: string\n label: string\n}\n\n/**\n * AnchorNavigation \u4E1A\u52A1\u7EC4\u4EF6\u6570\u636E\u63A5\u53E3\n */\nexport interface AnchorNavigationData {\n /** \u951A\u70B9\u5217\u8868 */\n sectionIds: AnchorSectionItem[]\n /** \u5BFC\u822A\u9879\u6C34\u5E73\u5BF9\u9F50\u65B9\u5F0F */\n alignment?: 'start' | 'center' | 'end'\n /** \u4E3B\u9898\u6A21\u5F0F */\n theme?: 'light' | 'dark'\n /** \u5BFC\u822A\u5927\u5C0F */\n size?: 'small' | 'large'\n}\n\nexport interface AnchorNavigationProps\n extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof anchorNavigationVariants> {\n /** \u4E1A\u52A1\u6570\u636E */\n data: AnchorNavigationData\n /** \u8BED\u4E49\u5316\u7C7B\u540D */\n classNames?: Partial<Record<keyof AnchorNavigationSemanticName, string>>\n /** \u81EA\u5B9A\u4E49\u70B9\u51FB\u4E8B\u4EF6\uFF0C\u4F20\u5165\u65F6\u4F1A\u66FF\u4EE3\u9ED8\u8BA4\u7684\u6EDA\u52A8\u884C\u4E3A */\n onItemClick?: (item: AnchorSectionItem, index: number) => void\n /**\n * \u6309\u94AE\u989C\u8272\u914D\u7F6E\uFF0C\u8986\u76D6 light/dark \u4E3B\u9898\u4E0B\u7684\u9ED8\u8BA4\u989C\u8272\u3002\n * \u672A\u4F20\u65F6\u6309\u4E3B\u9898\u4F7F\u7528\u5185\u7F6E\u9ED8\u8BA4\u503C\u3002\n *\n * @example\n * // \u81EA\u5B9A\u4E49\u989C\u8272\n * buttonStyle={{ defaultColor: 'text-info-secondary', activeColor: 'text-info-primary', activeIndicatorColor: 'after:bg-brand-3' }}\n */\n buttonStyle?: AnchorButtonStyle\n}\n\n/** light \u4E3B\u9898\u9ED8\u8BA4\u989C\u8272 */\nconst LIGHT_DEFAULTS: Required<AnchorButtonStyle> = {\n defaultColor: 'text-[#4A4C56]',\n activeColor: 'text-[#080A0F]',\n activeIndicatorColor: 'after:bg-brand-0',\n}\n\n/** dark \u4E3B\u9898\u9ED8\u8BA4\u989C\u8272 */\nconst DARK_DEFAULTS: Required<AnchorButtonStyle> = {\n defaultColor: 'text-[#8A8D92]',\n activeColor: 'text-white',\n activeIndicatorColor: 'after:bg-brand-0',\n}\n\n/**\n * AnchorNavigation - \u951A\u70B9\u5BFC\u822A\n *\n * @description \u951A\u70B9\u5BFC\u822A\n */\nconst AnchorNavigation = React.forwardRef<HTMLDivElement, AnchorNavigationProps>(\n ({ classNames = {}, data, onItemClick, buttonStyle, className, ...rest }, ref) => {\n const { alignment = 'start', theme = 'light', size = 'small' } = data\n const activeId = useAnchorPosition(data.sectionIds?.map(item => item.targetId) || [])\n const rootRef = React.useRef<HTMLDivElement>(null)\n const containerRef = React.useRef<HTMLDivElement>(null)\n const sectionRefs = React.useRef<HTMLButtonElement[]>([])\n\n // \u66B4\u9732 rootRef \u7ED9\u5916\u90E8 ref\n React.useImperativeHandle(ref, () => rootRef.current as HTMLDivElement)\n\n // \u5408\u5E76\u4E3B\u9898\u9ED8\u8BA4\u503C\u4E0E\u5916\u90E8\u4F20\u5165\u7684 buttonStyle\n const themeDefaults = theme === 'dark' ? DARK_DEFAULTS : LIGHT_DEFAULTS\n const resolvedButtonStyle: Required<AnchorButtonStyle> = {\n defaultColor: buttonStyle?.defaultColor ?? themeDefaults.defaultColor,\n activeColor: buttonStyle?.activeColor ?? themeDefaults.activeColor,\n activeIndicatorColor: buttonStyle?.activeIndicatorColor ?? themeDefaults.activeIndicatorColor,\n }\n\n const autoScrollToActiveItem = React.useCallback((activeIdIndex: number) => {\n const curRef = sectionRefs.current[activeIdIndex]\n\n if (curRef && containerRef.current) {\n const container = containerRef.current\n const button = curRef\n const scrollLeft = button.offsetLeft - container.offsetWidth / 2 + button.offsetWidth / 2\n\n // \u68C0\u67E5 scrollTo \u65B9\u6CD5\u662F\u5426\u5B58\u5728\uFF08\u517C\u5BB9\u6D4B\u8BD5\u73AF\u5883\u548C\u65E7\u6D4F\u89C8\u5668\uFF09\n if (typeof container.scrollTo === 'function') {\n container.scrollTo({\n left: scrollLeft,\n behavior: 'smooth',\n })\n }\n }\n }, [])\n\n // \u5F53\u5C4F\u5E55\u6EDA\u52A8\u5BFC\u81F4 activeId \u53D8\u5316\u65F6\uFF0C\u81EA\u52A8\u6EDA\u52A8\u5BFC\u822A\u680F\u5230\u5BF9\u5E94\u9879\n React.useEffect(() => {\n if (!activeId) return\n\n const activeIndex = data.sectionIds?.findIndex(item => item.targetId === activeId)\n if (activeIndex !== undefined && activeIndex !== -1) {\n autoScrollToActiveItem(activeIndex)\n }\n }, [activeId, data.sectionIds, autoScrollToActiveItem])\n\n return (\n <Container ref={rootRef} className={cn(containerVariants({ theme }), classNames?.root)} {...rest}>\n <div\n ref={containerRef}\n className={cn(anchorNavigationVariants({ alignment, size }), 'relative', classNames?.content)}\n >\n {data.sectionIds?.map((item, index) => {\n const isActive = activeId === item.targetId\n\n return (\n <button\n key={item.targetId}\n ref={el => {\n if (el) {\n sectionRefs.current[index] = el\n }\n }}\n aria-current={isActive ? true : undefined}\n onClick={() => {\n // \u9ED8\u8BA4\u884C\u4E3A\uFF1A\u6EDA\u52A8\u5230\u5BF9\u5E94\u951A\u70B9\n autoScrollToActiveItem(index)\n\n // \u5982\u679C\u6709\u81EA\u5B9A\u4E49\u70B9\u51FB\u4E8B\u4EF6\uFF0C\u4F7F\u7528\u81EA\u5B9A\u4E49\u4E8B\u4EF6\n if (onItemClick) {\n onItemClick(item, index)\n return\n }\n\n // \u624B\u52A8\u8BA1\u7B97\u6EDA\u52A8\u4F4D\u7F6E\uFF0C\u8003\u8651\u5BFC\u822A\u680F\u9AD8\u5EA6\n const targetElement = document.getElementById(item.targetId)\n if (targetElement && rootRef.current) {\n const navHeight = rootRef.current.offsetHeight\n const targetPosition = targetElement.getBoundingClientRect().top + window.scrollY - navHeight\n\n window.scrollTo({\n top: targetPosition,\n behavior: 'smooth',\n })\n }\n }}\n className={cn(\n anchorItemVariants({ size }),\n isActive\n ? [\n resolvedButtonStyle.activeColor,\n resolvedButtonStyle.activeIndicatorColor,\n 'after:w-full after:opacity-100',\n ]\n : resolvedButtonStyle.defaultColor,\n classNames?.item\n )}\n >\n {item.label}\n </button>\n )\n })}\n </div>\n </Container>\n )\n }\n)\n\nAnchorNavigation.displayName = 'AnchorNavigation'\nexport default AnchorNavigation\n"],
|
|
5
|
-
"mappings": "ukBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,IAAA,eAAAC,EAAAH,
|
|
6
|
-
"names": ["AnchorNavigation_exports", "__export", "AnchorNavigation_default", "__toCommonJS", "import_jsx_runtime", "React", "import_utils", "import_class_variance_authority", "import_useAnchorPosition", "import_container", "anchorNavigationVariants", "anchorItemVariants", "containerVariants", "LIGHT_DEFAULTS", "DARK_DEFAULTS", "AnchorNavigation", "classNames", "data", "onItemClick", "buttonStyle", "className", "rest", "ref", "alignment", "theme", "size", "activeId", "useAnchorPosition", "item", "rootRef", "containerRef", "sectionRefs", "themeDefaults", "resolvedButtonStyle", "autoScrollToActiveItem", "activeIdIndex", "curRef", "container", "button", "scrollLeft", "activeIndex", "index", "isActive", "el", "targetElement", "navHeight", "targetPosition"]
|
|
4
|
+
"sourcesContent": ["'use client'\n\nimport * as React from 'react'\nimport { cn } from '../../helpers/utils.js'\nimport { cva, type VariantProps } from 'class-variance-authority'\nimport useAnchorPosition from './useAnchorPosition.js'\nimport { Container } from '../../components/container.js'\nimport { withLayout } from '../../shared/Styles.js'\n\nexport interface AnchorNavigationSemanticName {\n root: 'root'\n content: 'content'\n item: 'item'\n}\n\n/**\n * \u5BFC\u822A\u9879\u5BF9\u9F50\u65B9\u5411\u6837\u5F0F\u53D8\u4F53\n */\nconst anchorNavigationVariants = cva(\n 'anchor-navigation-content flex items-center overflow-x-auto [&::-webkit-scrollbar]:hidden',\n {\n variants: {\n alignment: {\n start: 'tablet:justify-start',\n center: 'tablet:justify-center',\n end: 'tablet:justify-end',\n },\n size: {\n small: 'gap-3',\n large: 'gap-6',\n },\n },\n defaultVariants: {\n alignment: 'start',\n size: 'small',\n },\n }\n)\n\n/**\n * \u5BFC\u822A\u9879\u6837\u5F0F\u53D8\u4F53\uFF08\u4E0D\u542B\u989C\u8272\uFF0C\u989C\u8272\u7531 buttonStyle \u63A7\u5236\uFF09\n */\nconst anchorItemVariants = cva(\n 'anchor-navigation-item relative shrink-0 text-sm font-bold after:absolute after:bottom-0 after:left-0 after:h-1 after:w-0 after:opacity-0 after:transition-all after:duration-300',\n {\n variants: {\n size: {\n small: 'py-3',\n large: 'py-4',\n },\n },\n defaultVariants: {\n size: 'small',\n },\n }\n)\n\n/**\n * \u5BB9\u5668\u4E3B\u9898\u6837\u5F0F\u53D8\u4F53\n */\nconst containerVariants = cva('!sticky top-0 !z-40 w-full', {\n variants: {\n theme: {\n light: 'bg-white',\n dark: 'bg-[#1E2024]',\n },\n },\n defaultVariants: {\n theme: 'light',\n },\n})\n\n/**\n * \u6309\u94AE\u989C\u8272\u914D\u7F6E\uFF0C\u5141\u8BB8\u6309 theme \u5206\u522B\u8986\u76D6\u9ED8\u8BA4\u8272\u3001\u6FC0\u6D3B\u6587\u5B57\u8272\u3001\u6FC0\u6D3B\u6307\u793A\u5668\u8272\n */\nexport interface AnchorButtonStyle {\n /** \u9ED8\u8BA4\uFF08\u672A\u6FC0\u6D3B\uFF09\u6587\u5B57\u8272\uFF0CTailwind class\uFF0C\u5982 'text-info-secondary' */\n defaultColor?: string\n /** \u6FC0\u6D3B\u6587\u5B57\u8272\uFF0CTailwind class\uFF0C\u5982 'text-info-primary' */\n activeColor?: string\n /** \u6FC0\u6D3B\u6307\u793A\u5668\uFF08\u4E0B\u5212\u7EBF\uFF09\u80CC\u666F\u8272\uFF0CTailwind class\uFF0C\u5982 'after:bg-brand-0' */\n activeIndicatorColor?: string\n}\n\n/**\n * \u951A\u70B9\u9879\u63A5\u53E3\n */\nexport interface AnchorSectionItem {\n targetId: string\n label: string\n}\n\n/**\n * AnchorNavigation \u4E1A\u52A1\u7EC4\u4EF6\u6570\u636E\u63A5\u53E3\n */\nexport interface AnchorNavigationData {\n /** \u951A\u70B9\u5217\u8868 */\n sectionIds: AnchorSectionItem[]\n /** \u5BFC\u822A\u9879\u6C34\u5E73\u5BF9\u9F50\u65B9\u5F0F */\n alignment?: 'start' | 'center' | 'end'\n /** \u4E3B\u9898\u6A21\u5F0F */\n theme?: 'light' | 'dark'\n /** \u5BFC\u822A\u5927\u5C0F */\n size?: 'small' | 'large'\n}\n\nexport interface AnchorNavigationProps\n extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof anchorNavigationVariants> {\n /** \u4E1A\u52A1\u6570\u636E */\n data: AnchorNavigationData\n /** \u8BED\u4E49\u5316\u7C7B\u540D */\n classNames?: Partial<Record<keyof AnchorNavigationSemanticName, string>>\n /** \u81EA\u5B9A\u4E49\u70B9\u51FB\u4E8B\u4EF6\uFF0C\u4F20\u5165\u65F6\u4F1A\u66FF\u4EE3\u9ED8\u8BA4\u7684\u6EDA\u52A8\u884C\u4E3A */\n onItemClick?: (item: AnchorSectionItem, index: number) => void\n /**\n * \u6309\u94AE\u989C\u8272\u914D\u7F6E\uFF0C\u8986\u76D6 light/dark \u4E3B\u9898\u4E0B\u7684\u9ED8\u8BA4\u989C\u8272\u3002\n * \u672A\u4F20\u65F6\u6309\u4E3B\u9898\u4F7F\u7528\u5185\u7F6E\u9ED8\u8BA4\u503C\u3002\n *\n * @example\n * // \u81EA\u5B9A\u4E49\u989C\u8272\n * buttonStyle={{ defaultColor: 'text-info-secondary', activeColor: 'text-info-primary', activeIndicatorColor: 'after:bg-brand-3' }}\n */\n buttonStyle?: AnchorButtonStyle\n}\n\n/** light \u4E3B\u9898\u9ED8\u8BA4\u989C\u8272 */\nconst LIGHT_DEFAULTS: Required<AnchorButtonStyle> = {\n defaultColor: 'text-[#4A4C56]',\n activeColor: 'text-[#080A0F]',\n activeIndicatorColor: 'after:bg-brand-0',\n}\n\n/** dark \u4E3B\u9898\u9ED8\u8BA4\u989C\u8272 */\nconst DARK_DEFAULTS: Required<AnchorButtonStyle> = {\n defaultColor: 'text-[#8A8D92]',\n activeColor: 'text-white',\n activeIndicatorColor: 'after:bg-brand-0',\n}\n\n/**\n * AnchorNavigation - \u951A\u70B9\u5BFC\u822A\n *\n * @description \u951A\u70B9\u5BFC\u822A\n */\nconst AnchorNavigation = React.forwardRef<HTMLDivElement, AnchorNavigationProps>(\n ({ classNames = {}, data, onItemClick, buttonStyle, className, ...rest }, ref) => {\n const { alignment = 'start', theme = 'light', size = 'small' } = data\n const activeId = useAnchorPosition(data.sectionIds?.map(item => item.targetId) || [])\n const rootRef = React.useRef<HTMLDivElement>(null)\n const containerRef = React.useRef<HTMLDivElement>(null)\n const sectionRefs = React.useRef<HTMLButtonElement[]>([])\n\n // \u66B4\u9732 rootRef \u7ED9\u5916\u90E8 ref\n React.useImperativeHandle(ref, () => rootRef.current as HTMLDivElement)\n\n // \u5408\u5E76\u4E3B\u9898\u9ED8\u8BA4\u503C\u4E0E\u5916\u90E8\u4F20\u5165\u7684 buttonStyle\n const themeDefaults = theme === 'dark' ? DARK_DEFAULTS : LIGHT_DEFAULTS\n const resolvedButtonStyle: Required<AnchorButtonStyle> = {\n defaultColor: buttonStyle?.defaultColor ?? themeDefaults.defaultColor,\n activeColor: buttonStyle?.activeColor ?? themeDefaults.activeColor,\n activeIndicatorColor: buttonStyle?.activeIndicatorColor ?? themeDefaults.activeIndicatorColor,\n }\n\n const autoScrollToActiveItem = React.useCallback((activeIdIndex: number) => {\n const curRef = sectionRefs.current[activeIdIndex]\n\n if (curRef && containerRef.current) {\n const container = containerRef.current\n const button = curRef\n const scrollLeft = button.offsetLeft - container.offsetWidth / 2 + button.offsetWidth / 2\n\n // \u68C0\u67E5 scrollTo \u65B9\u6CD5\u662F\u5426\u5B58\u5728\uFF08\u517C\u5BB9\u6D4B\u8BD5\u73AF\u5883\u548C\u65E7\u6D4F\u89C8\u5668\uFF09\n if (typeof container.scrollTo === 'function') {\n container.scrollTo({\n left: scrollLeft,\n behavior: 'smooth',\n })\n }\n }\n }, [])\n\n // \u5F53\u5C4F\u5E55\u6EDA\u52A8\u5BFC\u81F4 activeId \u53D8\u5316\u65F6\uFF0C\u81EA\u52A8\u6EDA\u52A8\u5BFC\u822A\u680F\u5230\u5BF9\u5E94\u9879\n React.useEffect(() => {\n if (!activeId) return\n\n const activeIndex = data.sectionIds?.findIndex(item => item.targetId === activeId)\n if (activeIndex !== undefined && activeIndex !== -1) {\n autoScrollToActiveItem(activeIndex)\n }\n }, [activeId, data.sectionIds, autoScrollToActiveItem])\n\n return (\n <Container ref={rootRef} className={cn(containerVariants({ theme }), classNames?.root)} {...rest}>\n <div\n ref={containerRef}\n className={cn(anchorNavigationVariants({ alignment, size }), 'relative', classNames?.content)}\n >\n {data.sectionIds?.map((item, index) => {\n const isActive = activeId === item.targetId\n\n return (\n <button\n key={item.targetId}\n ref={el => {\n if (el) {\n sectionRefs.current[index] = el\n }\n }}\n aria-current={isActive ? true : undefined}\n onClick={() => {\n // \u9ED8\u8BA4\u884C\u4E3A\uFF1A\u6EDA\u52A8\u5230\u5BF9\u5E94\u951A\u70B9\n autoScrollToActiveItem(index)\n\n // \u5982\u679C\u6709\u81EA\u5B9A\u4E49\u70B9\u51FB\u4E8B\u4EF6\uFF0C\u4F7F\u7528\u81EA\u5B9A\u4E49\u4E8B\u4EF6\n if (onItemClick) {\n onItemClick(item, index)\n return\n }\n\n // \u624B\u52A8\u8BA1\u7B97\u6EDA\u52A8\u4F4D\u7F6E\uFF0C\u8003\u8651\u5BFC\u822A\u680F\u9AD8\u5EA6\n const targetElement = document.getElementById(item.targetId)\n if (targetElement && rootRef.current) {\n const navHeight = rootRef.current.offsetHeight\n const targetPosition = targetElement.getBoundingClientRect().top + window.scrollY - navHeight\n\n window.scrollTo({\n top: targetPosition,\n behavior: 'smooth',\n })\n }\n }}\n className={cn(\n anchorItemVariants({ size }),\n isActive\n ? [\n resolvedButtonStyle.activeColor,\n resolvedButtonStyle.activeIndicatorColor,\n 'after:w-full after:opacity-100',\n ]\n : resolvedButtonStyle.defaultColor,\n classNames?.item\n )}\n >\n {item.label}\n </button>\n )\n })}\n </div>\n </Container>\n )\n }\n)\n\nAnchorNavigation.displayName = 'AnchorNavigation'\nexport default withLayout(AnchorNavigation)\n"],
|
|
5
|
+
"mappings": "ukBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,IAAA,eAAAC,EAAAH,GAyMc,IAAAI,EAAA,6BAvMdC,EAAuB,oBACvBC,EAAmB,kCACnBC,EAAuC,oCACvCC,EAA8B,qCAC9BC,EAA0B,yCAC1BC,EAA2B,kCAW3B,MAAMC,KAA2B,OAC/B,4FACA,CACE,SAAU,CACR,UAAW,CACT,MAAO,uBACP,OAAQ,wBACR,IAAK,oBACP,EACA,KAAM,CACJ,MAAO,QACP,MAAO,OACT,CACF,EACA,gBAAiB,CACf,UAAW,QACX,KAAM,OACR,CACF,CACF,EAKMC,KAAqB,OACzB,oLACA,CACE,SAAU,CACR,KAAM,CACJ,MAAO,OACP,MAAO,MACT,CACF,EACA,gBAAiB,CACf,KAAM,OACR,CACF,CACF,EAKMC,KAAoB,OAAI,6BAA8B,CAC1D,SAAU,CACR,MAAO,CACL,MAAO,WACP,KAAM,cACR,CACF,EACA,gBAAiB,CACf,MAAO,OACT,CACF,CAAC,EAwDKC,EAA8C,CAClD,aAAc,iBACd,YAAa,iBACb,qBAAsB,kBACxB,EAGMC,EAA6C,CACjD,aAAc,iBACd,YAAa,aACb,qBAAsB,kBACxB,EAOMC,EAAmBX,EAAM,WAC7B,CAAC,CAAE,WAAAY,EAAa,CAAC,EAAG,KAAAC,EAAM,YAAAC,EAAa,YAAAC,EAAa,UAAAC,EAAW,GAAGC,CAAK,EAAGC,IAAQ,CAChF,KAAM,CAAE,UAAAC,EAAY,QAAS,MAAAC,EAAQ,QAAS,KAAAC,EAAO,OAAQ,EAAIR,EAC3DS,KAAW,EAAAC,SAAkBV,EAAK,YAAY,IAAIW,GAAQA,EAAK,QAAQ,GAAK,CAAC,CAAC,EAC9EC,EAAUzB,EAAM,OAAuB,IAAI,EAC3C0B,EAAe1B,EAAM,OAAuB,IAAI,EAChD2B,EAAc3B,EAAM,OAA4B,CAAC,CAAC,EAGxDA,EAAM,oBAAoBkB,EAAK,IAAMO,EAAQ,OAAyB,EAGtE,MAAMG,EAAgBR,IAAU,OAASV,EAAgBD,EACnDoB,EAAmD,CACvD,aAAcd,GAAa,cAAgBa,EAAc,aACzD,YAAab,GAAa,aAAea,EAAc,YACvD,qBAAsBb,GAAa,sBAAwBa,EAAc,oBAC3E,EAEME,EAAyB9B,EAAM,YAAa+B,GAA0B,CAC1E,MAAMC,EAASL,EAAY,QAAQI,CAAa,EAEhD,GAAIC,GAAUN,EAAa,QAAS,CAClC,MAAMO,EAAYP,EAAa,QACzBQ,EAASF,EACTG,EAAaD,EAAO,WAAaD,EAAU,YAAc,EAAIC,EAAO,YAAc,EAGpF,OAAOD,EAAU,UAAa,YAChCA,EAAU,SAAS,CACjB,KAAME,EACN,SAAU,QACZ,CAAC,CAEL,CACF,EAAG,CAAC,CAAC,EAGL,OAAAnC,EAAM,UAAU,IAAM,CACpB,GAAI,CAACsB,EAAU,OAEf,MAAMc,EAAcvB,EAAK,YAAY,UAAUW,GAAQA,EAAK,WAAaF,CAAQ,EAC7Ec,IAAgB,QAAaA,IAAgB,IAC/CN,EAAuBM,CAAW,CAEtC,EAAG,CAACd,EAAUT,EAAK,WAAYiB,CAAsB,CAAC,KAGpD,OAAC,aAAU,IAAKL,EAAS,aAAW,MAAGjB,EAAkB,CAAE,MAAAY,CAAM,CAAC,EAAGR,GAAY,IAAI,EAAI,GAAGK,EAC1F,mBAAC,OACC,IAAKS,EACL,aAAW,MAAGpB,EAAyB,CAAE,UAAAa,EAAW,KAAAE,CAAK,CAAC,EAAG,WAAYT,GAAY,OAAO,EAE3F,SAAAC,EAAK,YAAY,IAAI,CAACW,EAAMa,IAAU,CACrC,MAAMC,EAAWhB,IAAaE,EAAK,SAEnC,SACE,OAAC,UAEC,IAAKe,GAAM,CACLA,IACFZ,EAAY,QAAQU,CAAK,EAAIE,EAEjC,EACA,eAAcD,EAAW,GAAO,OAChC,QAAS,IAAM,CAKb,GAHAR,EAAuBO,CAAK,EAGxBvB,EAAa,CACfA,EAAYU,EAAMa,CAAK,EACvB,MACF,CAGA,MAAMG,EAAgB,SAAS,eAAehB,EAAK,QAAQ,EAC3D,GAAIgB,GAAiBf,EAAQ,QAAS,CACpC,MAAMgB,EAAYhB,EAAQ,QAAQ,aAC5BiB,EAAiBF,EAAc,sBAAsB,EAAE,IAAM,OAAO,QAAUC,EAEpF,OAAO,SAAS,CACd,IAAKC,EACL,SAAU,QACZ,CAAC,CACH,CACF,EACA,aAAW,MACTnC,EAAmB,CAAE,KAAAc,CAAK,CAAC,EAC3BiB,EACI,CACET,EAAoB,YACpBA,EAAoB,qBACpB,gCACF,EACAA,EAAoB,aACxBjB,GAAY,IACd,EAEC,SAAAY,EAAK,OAzCDA,EAAK,QA0CZ,CAEJ,CAAC,EACH,EACF,CAEJ,CACF,EAEAb,EAAiB,YAAc,mBAC/B,IAAOd,KAAQ,cAAWc,CAAgB",
|
|
6
|
+
"names": ["AnchorNavigation_exports", "__export", "AnchorNavigation_default", "__toCommonJS", "import_jsx_runtime", "React", "import_utils", "import_class_variance_authority", "import_useAnchorPosition", "import_container", "import_Styles", "anchorNavigationVariants", "anchorItemVariants", "containerVariants", "LIGHT_DEFAULTS", "DARK_DEFAULTS", "AnchorNavigation", "classNames", "data", "onItemClick", "buttonStyle", "className", "rest", "ref", "alignment", "theme", "size", "activeId", "useAnchorPosition", "item", "rootRef", "containerRef", "sectionRefs", "themeDefaults", "resolvedButtonStyle", "autoScrollToActiveItem", "activeIdIndex", "curRef", "container", "button", "scrollLeft", "activeIndex", "index", "isActive", "el", "targetElement", "navHeight", "targetPosition"]
|
|
7
7
|
}
|
|
@@ -1,2 +1,18 @@
|
|
|
1
|
-
|
|
1
|
+
import type { Img } from '../../types/props.js';
|
|
2
|
+
type AplusItem = {
|
|
3
|
+
img: Img;
|
|
4
|
+
mobileImg: Img;
|
|
5
|
+
title: string;
|
|
6
|
+
desc: string;
|
|
7
|
+
theme: 'light' | 'dark';
|
|
8
|
+
};
|
|
9
|
+
interface AplusDescType extends React.HTMLAttributes<HTMLDivElement> {
|
|
10
|
+
data: {
|
|
11
|
+
title: string;
|
|
12
|
+
img: Img;
|
|
13
|
+
mobileImg: Img;
|
|
14
|
+
list: AplusItem[];
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
declare const _default: import("react").ForwardRefExoticComponent<AplusDescType & Partial<import("../../shared/Styles.js").StylesProps & import("../../shared/Styles.js").ContainerProps> & import("react").RefAttributes<any>>;
|
|
2
18
|
export default _default;
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
|
|
1
|
+
import type { BrandCardLinkProps } from './types.js';
|
|
2
|
+
declare const _default: import("react").ForwardRefExoticComponent<BrandCardLinkProps & import("react").RefAttributes<HTMLDivElement> & Partial<import("../../shared/Styles.js").StylesProps & import("../../shared/Styles.js").ContainerProps>>;
|
|
2
3
|
export default _default;
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
|
|
1
|
+
import type { BrandEquityProps } from './types.js';
|
|
2
|
+
declare const _default: import("react").ForwardRefExoticComponent<BrandEquityProps & import("react").RefAttributes<HTMLDivElement> & Partial<import("../../shared/Styles.js").StylesProps & import("../../shared/Styles.js").ContainerProps>>;
|
|
2
3
|
export default _default;
|
|
@@ -27,5 +27,5 @@ export interface CategoryProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
|
27
27
|
};
|
|
28
28
|
key?: string;
|
|
29
29
|
}
|
|
30
|
-
declare const _default:
|
|
30
|
+
declare const _default: React.ForwardRefExoticComponent<CategoryProps & React.RefAttributes<HTMLDivElement> & Partial<import("../../shared/Styles.js").StylesProps & import("../../shared/Styles.js").ContainerProps>>;
|
|
31
31
|
export default _default;
|
|
@@ -7,5 +7,11 @@ export type CreativeModuleDataType = {
|
|
|
7
7
|
theme: 'light' | 'dark';
|
|
8
8
|
span: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12;
|
|
9
9
|
};
|
|
10
|
-
|
|
10
|
+
interface CreativeModuleType extends React.HTMLAttributes<HTMLDivElement> {
|
|
11
|
+
data: {
|
|
12
|
+
shape?: 'rounded' | 'square';
|
|
13
|
+
productsTab: CreativeModuleDataType[];
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
declare const _default: import("react").ForwardRefExoticComponent<CreativeModuleType & Partial<import("../../shared/Styles.js").StylesProps & import("../../shared/Styles.js").ContainerProps> & import("react").RefAttributes<any>>;
|
|
11
17
|
export default _default;
|
|
@@ -7,5 +7,10 @@ export type DownLoadDataType = {
|
|
|
7
7
|
line: Img;
|
|
8
8
|
icon: Img;
|
|
9
9
|
};
|
|
10
|
-
|
|
10
|
+
interface DownLoadType extends React.HTMLAttributes<HTMLDivElement> {
|
|
11
|
+
data: {
|
|
12
|
+
list: DownLoadDataType[];
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
declare const _default: import("react").ForwardRefExoticComponent<DownLoadType & Partial<import("../../shared/Styles.js").StylesProps & import("../../shared/Styles.js").ContainerProps> & import("react").RefAttributes<any>>;
|
|
11
16
|
export default _default;
|
|
@@ -29,5 +29,5 @@ export interface EvaluateProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
|
29
29
|
};
|
|
30
30
|
key?: string;
|
|
31
31
|
}
|
|
32
|
-
declare const _default:
|
|
32
|
+
declare const _default: React.ForwardRefExoticComponent<EvaluateProps & React.RefAttributes<HTMLDivElement> & Partial<import("../../shared/Styles.js").StylesProps & import("../../shared/Styles.js").ContainerProps>>;
|
|
33
33
|
export default _default;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { FaqProps, FaqItem as ItemType, FaqSemanticName } from './types.js';
|
|
2
3
|
interface FaqItemProps {
|
|
3
4
|
data: ItemType;
|
|
4
5
|
defaultOpen?: boolean;
|
|
@@ -8,6 +9,6 @@ declare const FaqItem: {
|
|
|
8
9
|
({ data, defaultOpen, classNames }: FaqItemProps): import("react/jsx-runtime").JSX.Element;
|
|
9
10
|
displayName: string;
|
|
10
11
|
};
|
|
11
|
-
declare const _default:
|
|
12
|
+
declare const _default: React.ForwardRefExoticComponent<FaqProps & React.RefAttributes<HTMLDivElement> & Partial<import("../../shared/Styles.js").StylesProps & import("../../shared/Styles.js").ContainerProps>>;
|
|
12
13
|
export default _default;
|
|
13
14
|
export { FaqItem };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";"use client";var x=Object.create;var d=Object.defineProperty;var h=Object.getOwnPropertyDescriptor;var b=Object.getOwnPropertyNames;var F=Object.getPrototypeOf,q=Object.prototype.hasOwnProperty;var w=(e,a)=>{for(var t in a)d(e,t,{get:a[t],enumerable:!0})},f=(e,a,t,i)=>{if(a&&typeof a=="object"||typeof a=="function")for(let r of b(a))!q.call(e,r)&&r!==t&&d(e,r,{get:()=>a[r],enumerable:!(i=h(a,r))||i.enumerable});return e};var N=(e,a,t)=>(t=e!=null?x(F(e)):{},f(a||!e||!e.__esModule?d(t,"default",{value:e,enumerable:!0}):t,e)),
|
|
1
|
+
"use strict";"use client";var x=Object.create;var d=Object.defineProperty;var h=Object.getOwnPropertyDescriptor;var b=Object.getOwnPropertyNames;var F=Object.getPrototypeOf,q=Object.prototype.hasOwnProperty;var w=(e,a)=>{for(var t in a)d(e,t,{get:a[t],enumerable:!0})},f=(e,a,t,i)=>{if(a&&typeof a=="object"||typeof a=="function")for(let r of b(a))!q.call(e,r)&&r!==t&&d(e,r,{get:()=>a[r],enumerable:!(i=h(a,r))||i.enumerable});return e};var N=(e,a,t)=>(t=e!=null?x(F(e)):{},f(a||!e||!e.__esModule?d(t,"default",{value:e,enumerable:!0}):t,e)),C=e=>f(d({},"__esModule",{value:!0}),e);var k={};w(k,{FaqItem:()=>l,default:()=>L});module.exports=C(k);var o=require("react/jsx-runtime"),s=N(require("react")),p=require("../../components/index.js"),n=require("../../helpers/index.js"),y=require("../../shared/Styles.js");const v=s.default.forwardRef(({data:e,className:a,defaultOpenIndex:t,classNames:i={}},r)=>{const m=(0,s.useRef)(null);(0,s.useImperativeHandle)(r,()=>m.current);const g=Array.isArray(t)?t:t!==void 0?[t]:[];return(0,o.jsx)("div",{ref:m,className:(0,n.cn)(a,i.root),children:(0,o.jsx)("div",{children:e?.productData?.map((u,c)=>(0,o.jsx)(l,{data:u,defaultOpen:g.includes(c),classNames:i},c))})})});v.displayName="Faq";const l=({data:e,defaultOpen:a=!1,classNames:t={}})=>{const[i,r]=(0,s.useState)(a),m=()=>{r(!i)};return(0,o.jsx)("div",{className:(0,n.cn)("tablet:py-6 border-b border-[#E4E5E6] py-4",t.item),children:(0,o.jsxs)("div",{children:[(0,o.jsxs)("div",{onClick:m,className:(0,n.cn)("tablet:gap-[128px] flex cursor-pointer items-center justify-between gap-4",t.itemHeader),children:[(0,o.jsx)(p.Heading,{as:"h3",html:e?.title,className:(0,n.cn)("desktop:text-base lg-desktop:text-lg text-info-primary text-sm font-bold leading-[1.4]",t.title)}),(0,o.jsx)("div",{className:(0,n.cn)("transition-transform duration-300",t.icon),children:(0,o.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",className:(0,n.cn)("w-[20px] transition-transform duration-300",i&&"rotate-180"),width:"20",height:"21",viewBox:"0 0 20 21",fill:"none",children:(0,o.jsx)("path",{d:"M14.4111 7.41107C14.7365 7.08563 15.264 7.08563 15.5895 7.41107C15.9149 7.73651 15.9149 8.26402 15.5895 8.58946L10.5895 13.5895C10.264 13.9149 9.73651 13.9149 9.41107 13.5895L4.41107 8.58946C4.08563 8.26402 4.08563 7.73651 4.41107 7.41107C4.73651 7.08563 5.26402 7.08563 5.58946 7.41107L10.0003 11.8219L14.4111 7.41107Z",fill:"#1D1D1F"})})})]}),(0,o.jsx)("div",{className:(0,n.cn)("overflow-hidden text-[#4A4C56] transition-all duration-300",i?"mt-2 max-h-[500px] opacity-100":"max-h-0 opacity-0",t.content),children:(0,o.jsx)(p.Text,{html:e?.desc,className:(0,n.cn)("desktop:text-base lg-desktop:text-lg text-info-secondary text-sm font-bold leading-[1.4]",t.description)})})]})})};l.displayName="FaqItem";var L=(0,y.withLayout)(v);
|
|
2
2
|
//# sourceMappingURL=Faq.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/biz-components/Faq/Faq.tsx"],
|
|
4
|
-
"sourcesContent": ["'use client'\nimport React, { useImperativeHandle, useRef, useState } from 'react'\nimport type { FaqProps, FaqItem as ItemType, FaqSemanticName } from './types.js'\nimport { Text, Heading } from '../../components/index.js'\nimport { cn } from '../../helpers/index.js'\nimport { withLayout } from '../../shared/Styles.js'\n\nconst Faq = React.forwardRef<HTMLDivElement, FaqProps>(\n ({ data, className, defaultOpenIndex, classNames = {} }, ref) => {\n const innerRef = useRef<HTMLDivElement>(null)\n useImperativeHandle(ref, () => innerRef.current!)\n\n // \u5C06 defaultOpenIndex \u8F6C\u6362\u4E3A\u6570\u7EC4\u65B9\u4FBF\u5224\u65AD\n const openIndexes = Array.isArray(defaultOpenIndex)\n ? defaultOpenIndex\n : defaultOpenIndex !== undefined\n ? [defaultOpenIndex]\n : []\n\n return (\n <div ref={innerRef} className={cn(className, classNames.root)}>\n <div>\n {data?.productData?.map((item: any, index: number) => (\n <FaqItem key={index} data={item} defaultOpen={openIndexes.includes(index)} classNames={classNames} />\n ))}\n </div>\n </div>\n )\n }\n)\n\nFaq.displayName = 'Faq'\n\ninterface FaqItemProps {\n data: ItemType\n defaultOpen?: boolean\n classNames?: Partial<Record<FaqSemanticName, string>>\n}\n\nconst FaqItem = ({ data, defaultOpen = false, classNames = {} }: FaqItemProps) => {\n const [open, setOpen] = useState(defaultOpen)\n\n const handleToggle = () => {\n setOpen(!open)\n }\n\n return (\n <div className={cn('tablet:py-6 border-b border-[#E4E5E6] py-4', classNames.item)}>\n <div>\n <div\n onClick={handleToggle}\n className={cn(\n 'tablet:gap-[128px] flex cursor-pointer items-center justify-between gap-4',\n classNames.itemHeader\n )}\n >\n <Heading\n as=\"h3\"\n html={data?.title}\n className={cn(\n 'desktop:text-base lg-desktop:text-lg text-info-primary text-sm font-bold leading-[1.4]',\n classNames.title\n )}\n />\n <div className={cn('transition-transform duration-300', classNames.icon)}>\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n className={cn('w-[20px] transition-transform duration-300', open && 'rotate-180')}\n width=\"20\"\n height=\"21\"\n viewBox=\"0 0 20 21\"\n fill=\"none\"\n >\n <path\n d=\"M14.4111 7.41107C14.7365 7.08563 15.264 7.08563 15.5895 7.41107C15.9149 7.73651 15.9149 8.26402 15.5895 8.58946L10.5895 13.5895C10.264 13.9149 9.73651 13.9149 9.41107 13.5895L4.41107 8.58946C4.08563 8.26402 4.08563 7.73651 4.41107 7.41107C4.73651 7.08563 5.26402 7.08563 5.58946 7.41107L10.0003 11.8219L14.4111 7.41107Z\"\n fill=\"#1D1D1F\"\n />\n </svg>\n </div>\n </div>\n\n {/* \u5E26\u8FC7\u6E21\u7684\u5185\u5BB9\u533A\u57DF */}\n <div\n className={cn(\n 'overflow-hidden transition-all duration-300',\n open ? 'mt-2 max-h-[500px] opacity-100' : 'max-h-0 opacity-0',\n classNames.content\n )}\n >\n <Text\n html={data?.desc}\n className={cn(\n 'desktop:text-base lg-desktop:text-lg text-info-secondary text-sm font-bold leading-[1.4]',\n classNames.description\n )}\n />\n </div>\n </div>\n </div>\n )\n}\n\nFaqItem.displayName = 'FaqItem'\n\nexport default withLayout(Faq)\nexport { FaqItem }\n"],
|
|
5
|
-
"mappings": "ukBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,EAAA,YAAAC,IAAA,eAAAC,EAAAJ,GAuBY,IAAAK,EAAA,6BAtBZC,EAA6D,oBAE7DC,EAA8B,qCAC9BC,EAAmB,kCACnBC,EAA2B,kCAE3B,MAAMC,EAAM,EAAAC,QAAM,WAChB,CAAC,CAAE,KAAAC,EAAM,UAAAC,EAAW,iBAAAC,EAAkB,WAAAC,EAAa,CAAC,CAAE,EAAGC,IAAQ,CAC/D,MAAMC,KAAW,UAAuB,IAAI,KAC5C,uBAAoBD,EAAK,IAAMC,EAAS,OAAQ,EAGhD,MAAMC,EAAc,MAAM,QAAQJ,CAAgB,EAC9CA,EACAA,IAAqB,OACnB,CAACA,CAAgB,EACjB,CAAC,EAEP,SACE,OAAC,OAAI,IAAKG,EAAU,aAAW,MAAGJ,EAAWE,EAAW,IAAI,EAC1D,mBAAC,OACE,SAAAH,GAAM,aAAa,IAAI,CAACO,EAAWC,OAClC,OAAClB,EAAA,CAAoB,KAAMiB,EAAM,YAAaD,EAAY,SAASE,CAAK,EAAG,WAAYL,GAAzEK,CAAqF,CACpG,EACH,EACF,CAEJ,CACF,EAEAV,EAAI,YAAc,MAQlB,MAAMR,EAAU,CAAC,CAAE,KAAAU,EAAM,YAAAS,EAAc,GAAO,WAAAN,EAAa,CAAC,CAAE,IAAoB,CAChF,KAAM,CAACO,EAAMC,CAAO,KAAI,YAASF,CAAW,EAEtCG,EAAe,IAAM,CACzBD,EAAQ,CAACD,CAAI,CACf,EAEA,SACE,OAAC,OAAI,aAAW,MAAG,6CAA8CP,EAAW,IAAI,EAC9E,oBAAC,OACC,qBAAC,OACC,QAASS,EACT,aAAW,MACT,4EACAT,EAAW,UACb,EAEA,oBAAC,WACC,GAAG,KACH,KAAMH,GAAM,MACZ,aAAW,MACT,yFACAG,EAAW,KACb,EACF,KACA,OAAC,OAAI,aAAW,MAAG,oCAAqCA,EAAW,IAAI,EACrE,mBAAC,OACC,MAAM,6BACN,aAAW,MAAG,6CAA8CO,GAAQ,YAAY,EAChF,MAAM,KACN,OAAO,KACP,QAAQ,YACR,KAAK,OAEL,mBAAC,QACC,EAAE,kUACF,KAAK,UACP,EACF,EACF,GACF,KAGA,OAAC,OACC,aAAW,MACT,
|
|
4
|
+
"sourcesContent": ["'use client'\nimport React, { useImperativeHandle, useRef, useState } from 'react'\nimport type { FaqProps, FaqItem as ItemType, FaqSemanticName } from './types.js'\nimport { Text, Heading } from '../../components/index.js'\nimport { cn } from '../../helpers/index.js'\nimport { withLayout } from '../../shared/Styles.js'\n\nconst Faq = React.forwardRef<HTMLDivElement, FaqProps>(\n ({ data, className, defaultOpenIndex, classNames = {} }, ref) => {\n const innerRef = useRef<HTMLDivElement>(null)\n useImperativeHandle(ref, () => innerRef.current!)\n\n // \u5C06 defaultOpenIndex \u8F6C\u6362\u4E3A\u6570\u7EC4\u65B9\u4FBF\u5224\u65AD\n const openIndexes = Array.isArray(defaultOpenIndex)\n ? defaultOpenIndex\n : defaultOpenIndex !== undefined\n ? [defaultOpenIndex]\n : []\n\n return (\n <div ref={innerRef} className={cn(className, classNames.root)}>\n <div>\n {data?.productData?.map((item: any, index: number) => (\n <FaqItem key={index} data={item} defaultOpen={openIndexes.includes(index)} classNames={classNames} />\n ))}\n </div>\n </div>\n )\n }\n)\n\nFaq.displayName = 'Faq'\n\ninterface FaqItemProps {\n data: ItemType\n defaultOpen?: boolean\n classNames?: Partial<Record<FaqSemanticName, string>>\n}\n\nconst FaqItem = ({ data, defaultOpen = false, classNames = {} }: FaqItemProps) => {\n const [open, setOpen] = useState(defaultOpen)\n\n const handleToggle = () => {\n setOpen(!open)\n }\n\n return (\n <div className={cn('tablet:py-6 border-b border-[#E4E5E6] py-4', classNames.item)}>\n <div>\n <div\n onClick={handleToggle}\n className={cn(\n 'tablet:gap-[128px] flex cursor-pointer items-center justify-between gap-4',\n classNames.itemHeader\n )}\n >\n <Heading\n as=\"h3\"\n html={data?.title}\n className={cn(\n 'desktop:text-base lg-desktop:text-lg text-info-primary text-sm font-bold leading-[1.4]',\n classNames.title\n )}\n />\n <div className={cn('transition-transform duration-300', classNames.icon)}>\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n className={cn('w-[20px] transition-transform duration-300', open && 'rotate-180')}\n width=\"20\"\n height=\"21\"\n viewBox=\"0 0 20 21\"\n fill=\"none\"\n >\n <path\n d=\"M14.4111 7.41107C14.7365 7.08563 15.264 7.08563 15.5895 7.41107C15.9149 7.73651 15.9149 8.26402 15.5895 8.58946L10.5895 13.5895C10.264 13.9149 9.73651 13.9149 9.41107 13.5895L4.41107 8.58946C4.08563 8.26402 4.08563 7.73651 4.41107 7.41107C4.73651 7.08563 5.26402 7.08563 5.58946 7.41107L10.0003 11.8219L14.4111 7.41107Z\"\n fill=\"#1D1D1F\"\n />\n </svg>\n </div>\n </div>\n\n {/* \u5E26\u8FC7\u6E21\u7684\u5185\u5BB9\u533A\u57DF */}\n <div\n className={cn(\n 'overflow-hidden text-[#4A4C56] transition-all duration-300',\n open ? 'mt-2 max-h-[500px] opacity-100' : 'max-h-0 opacity-0',\n classNames.content\n )}\n >\n <Text\n html={data?.desc}\n className={cn(\n 'desktop:text-base lg-desktop:text-lg text-info-secondary text-sm font-bold leading-[1.4]',\n classNames.description\n )}\n />\n </div>\n </div>\n </div>\n )\n}\n\nFaqItem.displayName = 'FaqItem'\n\nexport default withLayout(Faq)\nexport { FaqItem }\n"],
|
|
5
|
+
"mappings": "ukBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,EAAA,YAAAC,IAAA,eAAAC,EAAAJ,GAuBY,IAAAK,EAAA,6BAtBZC,EAA6D,oBAE7DC,EAA8B,qCAC9BC,EAAmB,kCACnBC,EAA2B,kCAE3B,MAAMC,EAAM,EAAAC,QAAM,WAChB,CAAC,CAAE,KAAAC,EAAM,UAAAC,EAAW,iBAAAC,EAAkB,WAAAC,EAAa,CAAC,CAAE,EAAGC,IAAQ,CAC/D,MAAMC,KAAW,UAAuB,IAAI,KAC5C,uBAAoBD,EAAK,IAAMC,EAAS,OAAQ,EAGhD,MAAMC,EAAc,MAAM,QAAQJ,CAAgB,EAC9CA,EACAA,IAAqB,OACnB,CAACA,CAAgB,EACjB,CAAC,EAEP,SACE,OAAC,OAAI,IAAKG,EAAU,aAAW,MAAGJ,EAAWE,EAAW,IAAI,EAC1D,mBAAC,OACE,SAAAH,GAAM,aAAa,IAAI,CAACO,EAAWC,OAClC,OAAClB,EAAA,CAAoB,KAAMiB,EAAM,YAAaD,EAAY,SAASE,CAAK,EAAG,WAAYL,GAAzEK,CAAqF,CACpG,EACH,EACF,CAEJ,CACF,EAEAV,EAAI,YAAc,MAQlB,MAAMR,EAAU,CAAC,CAAE,KAAAU,EAAM,YAAAS,EAAc,GAAO,WAAAN,EAAa,CAAC,CAAE,IAAoB,CAChF,KAAM,CAACO,EAAMC,CAAO,KAAI,YAASF,CAAW,EAEtCG,EAAe,IAAM,CACzBD,EAAQ,CAACD,CAAI,CACf,EAEA,SACE,OAAC,OAAI,aAAW,MAAG,6CAA8CP,EAAW,IAAI,EAC9E,oBAAC,OACC,qBAAC,OACC,QAASS,EACT,aAAW,MACT,4EACAT,EAAW,UACb,EAEA,oBAAC,WACC,GAAG,KACH,KAAMH,GAAM,MACZ,aAAW,MACT,yFACAG,EAAW,KACb,EACF,KACA,OAAC,OAAI,aAAW,MAAG,oCAAqCA,EAAW,IAAI,EACrE,mBAAC,OACC,MAAM,6BACN,aAAW,MAAG,6CAA8CO,GAAQ,YAAY,EAChF,MAAM,KACN,OAAO,KACP,QAAQ,YACR,KAAK,OAEL,mBAAC,QACC,EAAE,kUACF,KAAK,UACP,EACF,EACF,GACF,KAGA,OAAC,OACC,aAAW,MACT,6DACAA,EAAO,iCAAmC,oBAC1CP,EAAW,OACb,EAEA,mBAAC,QACC,KAAMH,GAAM,KACZ,aAAW,MACT,2FACAG,EAAW,WACb,EACF,EACF,GACF,EACF,CAEJ,EAEAb,EAAQ,YAAc,UAEtB,IAAOC,KAAQ,cAAWO,CAAG",
|
|
6
6
|
"names": ["Faq_exports", "__export", "FaqItem", "Faq_default", "__toCommonJS", "import_jsx_runtime", "import_react", "import_components", "import_helpers", "import_Styles", "Faq", "React", "data", "className", "defaultOpenIndex", "classNames", "ref", "innerRef", "openIndexes", "item", "index", "defaultOpen", "open", "setOpen", "handleToggle"]
|
|
7
7
|
}
|
|
@@ -1,2 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { FeatureCardsProps } from './types.js';
|
|
3
|
+
declare const _default: React.ForwardRefExoticComponent<FeatureCardsProps & React.RefAttributes<HTMLDivElement> & Partial<import("../../shared/Styles.js").StylesProps & import("../../shared/Styles.js").ContainerProps>>;
|
|
2
4
|
export default _default;
|
|
@@ -1,2 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { FeatureShowcaseProps } from './types.js';
|
|
3
|
+
declare const _default: React.ForwardRefExoticComponent<FeatureShowcaseProps & React.RefAttributes<HTMLDivElement> & Partial<import("../../shared/Styles.js").StylesProps & import("../../shared/Styles.js").ContainerProps>>;
|
|
2
4
|
export default _default;
|
|
@@ -10,5 +10,12 @@ export type FeaturesDataType = {
|
|
|
10
10
|
textTwo: string;
|
|
11
11
|
icon: Img;
|
|
12
12
|
};
|
|
13
|
-
declare const _default:
|
|
13
|
+
declare const _default: import("react").ForwardRefExoticComponent<import("react").HTMLAttributes<HTMLDivElement> & {
|
|
14
|
+
data: {
|
|
15
|
+
title: string;
|
|
16
|
+
img: Img;
|
|
17
|
+
mobileImg: Img;
|
|
18
|
+
list: FeaturesDataType[];
|
|
19
|
+
};
|
|
20
|
+
} & Partial<import("../../shared/Styles.js").StylesProps & import("../../shared/Styles.js").ContainerProps> & import("react").RefAttributes<any>>;
|
|
14
21
|
export default _default;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";"use client";var d=Object.defineProperty;var x=Object.getOwnPropertyDescriptor;var g=Object.getOwnPropertyNames;var
|
|
1
|
+
"use strict";"use client";var d=Object.defineProperty;var x=Object.getOwnPropertyDescriptor;var g=Object.getOwnPropertyNames;var m=Object.prototype.hasOwnProperty;var c=(p,e)=>{for(var o in e)d(p,o,{get:e[o],enumerable:!0})},u=(p,e,o,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of g(e))!m.call(p,s)&&s!==o&&d(p,s,{get:()=>e[s],enumerable:!(i=x(e,s))||i.enumerable});return p};var b=p=>u(d({},"__esModule",{value:!0}),p);var N={};c(N,{default:()=>v});module.exports=b(N);var t=require("react/jsx-runtime"),n=require("../../shared/Styles.js"),a=require("../../components/index.js");const k=p=>{const{data:e,className:o,...i}=p,{list:s}=e;return(0,t.jsx)(t.Fragment,{children:(0,t.jsxs)("div",{...i,className:o,children:[e?.title&&(0,t.jsx)("div",{className:"desktop:w-[800px] pb-[24px]",children:(0,t.jsx)(a.Text,{html:e?.title,className:" desktop:!text-[32px] lg-desktop:text-lg line-clamp-3 !text-[24px] !leading-[1.2] [&_*_strong]:!font-bold"})}),e?.img?.url&&(0,t.jsx)(a.Picture,{className:"md-tablet:hidden aspect-[1664/560] rounded-2xl",imgClassName:"",source:e?.img?.url,alt:e?.img?.alt||""}),e?.mobileImg?.url&&(0,t.jsx)(a.Picture,{className:"tablet:hidden aspect-[358/360] rounded-2xl",imgClassName:"",source:e?.mobileImg?.url,alt:e?.mobileImg?.alt||""}),(0,t.jsx)("div",{className:"",children:(0,t.jsx)("div",{className:"flex flex-col gap-0",children:s.map((l,r)=>(0,t.jsxs)("div",{className:`desktop:flex tablet:gap-8 laptop:gap-[64px] gap-4 pt-[64px] ${r%2===0?"laptop:flex-row-reverse":""}`,children:[(0,t.jsxs)("div",{className:"desktop:w-[500px] lg-desktop:w-[640px] flex shrink-0 flex-col justify-center",children:[(0,t.jsx)(a.Text,{html:l?.title,className:"graphic-title desktop:text-[32px] line-clamp-3 text-[24px] leading-[1.2] [&_*_strong]:!font-bold"}),(0,t.jsx)(a.Text,{html:l?.description,className:"graphic-title desktop:pt-[8px] lg-desktop:text-[18px] tablet:max-w-[463px] laptop:max-w-[563px] desktop:max-w-none desktop:text-[16px] pt-[4px] text-[14px] leading-[1.4] [&_*_strong]:!font-bold"}),l?.numberOne&&(0,t.jsxs)("div",{className:"desktop:pt-[48px] desktop:flex-col desktop:gap-[48px] flex flex-row gap-[24px] pt-[24px]",children:[(0,t.jsxs)("div",{className:"",children:[(0,t.jsx)(a.Text,{style:{background:"var(--1, linear-gradient(90deg, #3AD1FF 0%, #008CD6 100%))",backgroundClip:"text",WebkitBackgroundClip:"text",WebkitTextFillColor:"transparent",color:"transparent"},html:l?.numberOne,className:"graphic-title desktop:text-[64px] line-clamp-3 text-[40px] leading-none [&_*_strong]:!font-bold"}),(0,t.jsx)(a.Text,{html:l?.textOne,className:"graphic-title lg-desktop:text-lg desktop:text-[18px] line-clamp-3 text-[14px] leading-[1.4] [&_*_strong]:!font-bold"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(a.Text,{style:{background:"var(--1, linear-gradient(90deg, #3AD1FF 0%, #008CD6 100%))",backgroundClip:"text",WebkitBackgroundClip:"text",WebkitTextFillColor:"transparent",color:"transparent"},html:l?.numberTwo,className:"graphic-title desktop:text-[64px] line-clamp-3 text-[40px] leading-none [&_*_strong]:!font-bold"}),(0,t.jsx)(a.Text,{html:l?.textTwo,className:"graphic-title lg-desktop:text-lg desktop:text-[18px] line-clamp-3 text-[14px] leading-[1.4] [&_*_strong]:!font-bold"})]})]}),l?.icon?.url&&(0,t.jsx)("div",{className:"desktop:pt-[24px] lg-desktop:pt-[48px] pt-[24px]",children:(0,t.jsx)(a.Picture,{className:"desktop:w-[368px] lg-desktop:w-[488px] w-[358px]",source:l?.icon?.url,alt:l?.icon?.alt||""})})]}),(0,t.jsx)("div",{className:"md-tablet:hidden laptop:mt-[24px] desktop:pt-0 mt-[24px] aspect-[964/560] overflow-hidden rounded-2xl",children:(0,t.jsx)(a.Picture,{className:"size-full object-cover ",source:l?.img?.url,alt:l?.img?.alt||""})}),(0,t.jsx)("div",{className:"tablet:hidden mt-[24px] aspect-[358/360] overflow-hidden rounded-2xl",children:(0,t.jsx)(a.Picture,{className:"size-full object-cover",source:l?.mobileImg?.url,alt:l?.mobileImg?.alt||""})})]},r))})})]})})};var v=(0,n.withLayout)(k);
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/biz-components/Features/index.tsx"],
|
|
4
|
-
"sourcesContent": ["'use client'\nimport type { Img } from '../../types/props.js'\nimport { withLayout } from '../../shared/Styles.js'\nimport { Picture, Text } from '../../components/index.js'\nexport type FeaturesDataType = {\n img: Img\n mobileImg: Img\n title: string\n description: string\n numberOne: string\n textOne: string\n numberTwo: string\n textTwo: string\n icon: Img\n}\ntype FeaturesType = React.HTMLAttributes<HTMLDivElement> & {\n data: {\n title: string\n img: Img\n mobileImg: Img\n list: FeaturesDataType[]\n }\n}\n\nconst Features = (props: FeaturesType) => {\n const { data, className, ...rest } = props\n const { list } = data\n\n return (\n <>\n <div {...rest} className={className}>\n {data?.title && (\n <div className=\"desktop:w-[800px] pb-[24px]\">\n <Text\n html={data?.title}\n className=\" desktop:!text-[32px] lg-desktop:text-lg line-clamp-3 !text-[24px] !leading-[1.2] [&_*_strong]:!font-bold\"\n />\n </div>\n )}\n {data?.img?.url && (\n <Picture\n className=\"md-tablet:hidden aspect-[1664/560] rounded-2xl\"\n imgClassName=\"\"\n source={data?.img?.url}\n alt={data?.img?.alt || ''}\n />\n )}\n {data?.mobileImg?.url && (\n <Picture\n className=\"tablet:hidden aspect-[358/360] rounded-2xl\"\n imgClassName=\"\"\n source={data?.mobileImg?.url}\n alt={data?.mobileImg?.alt || ''}\n />\n )}\n <div className=\"\">\n <div className=\"flex flex-col gap-0\">\n {list.map((item, index) => (\n <div\n key={index}\n className={`desktop:flex tablet:gap-8 laptop:gap-[64px] gap-4 pt-[64px] ${index % 2 === 0 ? 'laptop:flex-row-reverse' : ''}`}\n >\n <div className=\"desktop:w-[500px] lg-desktop:w-[640px] flex shrink-0 flex-col justify-center\">\n <Text\n html={item?.title}\n className=\"graphic-title desktop:text-[32px] line-clamp-3 text-[24px] leading-[1.2] [&_*_strong]:!font-bold\"\n />\n <Text\n html={item?.description}\n className=\"graphic-title desktop:pt-[8px] lg-desktop:text-[18px] desktop:text-[16px] pt-[4px] text-[14px] leading-[1.
|
|
5
|
-
"mappings": "sbAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,IAAA,eAAAC,EAAAH,GA6BI,IAAAI,EAAA,6BA3BJC,EAA2B,kCAC3BC,EAA8B,qCAqB9B,MAAMC,EAAYC,GAAwB,CACxC,KAAM,CAAE,KAAAC,EAAM,UAAAC,EAAW,GAAGC,CAAK,EAAIH,EAC/B,CAAE,KAAAI,CAAK,EAAIH,EAEjB,SACE,mBACE,oBAAC,OAAK,GAAGE,EAAM,UAAWD,EACvB,UAAAD,GAAM,UACL,OAAC,OAAI,UAAU,8BACb,mBAAC,QACC,KAAMA,GAAM,MACZ,UAAU,4GACZ,EACF,EAEDA,GAAM,KAAK,QACV,OAAC,WACC,UAAU,iDACV,aAAa,GACb,OAAQA,GAAM,KAAK,IACnB,IAAKA,GAAM,KAAK,KAAO,GACzB,EAEDA,GAAM,WAAW,QAChB,OAAC,WACC,UAAU,6CACV,aAAa,GACb,OAAQA,GAAM,WAAW,IACzB,IAAKA,GAAM,WAAW,KAAO,GAC/B,KAEF,OAAC,OAAI,UAAU,GACb,mBAAC,OAAI,UAAU,sBACZ,SAAAG,EAAK,IAAI,CAACC,EAAMC,OACf,QAAC,OAEC,UAAW,+DAA+DA,EAAQ,IAAM,EAAI,0BAA4B,EAAE,GAE1H,qBAAC,OAAI,UAAU,+EACb,oBAAC,QACC,KAAMD,GAAM,MACZ,UAAU,oGACZ,KACA,OAAC,QACC,KAAMA,GAAM,YACZ,UAAU,
|
|
4
|
+
"sourcesContent": ["'use client'\nimport type { Img } from '../../types/props.js'\nimport { withLayout } from '../../shared/Styles.js'\nimport { Picture, Text } from '../../components/index.js'\nexport type FeaturesDataType = {\n img: Img\n mobileImg: Img\n title: string\n description: string\n numberOne: string\n textOne: string\n numberTwo: string\n textTwo: string\n icon: Img\n}\ntype FeaturesType = React.HTMLAttributes<HTMLDivElement> & {\n data: {\n title: string\n img: Img\n mobileImg: Img\n list: FeaturesDataType[]\n }\n}\n\nconst Features = (props: FeaturesType) => {\n const { data, className, ...rest } = props\n const { list } = data\n\n return (\n <>\n <div {...rest} className={className}>\n {data?.title && (\n <div className=\"desktop:w-[800px] pb-[24px]\">\n <Text\n html={data?.title}\n className=\" desktop:!text-[32px] lg-desktop:text-lg line-clamp-3 !text-[24px] !leading-[1.2] [&_*_strong]:!font-bold\"\n />\n </div>\n )}\n {data?.img?.url && (\n <Picture\n className=\"md-tablet:hidden aspect-[1664/560] rounded-2xl\"\n imgClassName=\"\"\n source={data?.img?.url}\n alt={data?.img?.alt || ''}\n />\n )}\n {data?.mobileImg?.url && (\n <Picture\n className=\"tablet:hidden aspect-[358/360] rounded-2xl\"\n imgClassName=\"\"\n source={data?.mobileImg?.url}\n alt={data?.mobileImg?.alt || ''}\n />\n )}\n <div className=\"\">\n <div className=\"flex flex-col gap-0\">\n {list.map((item, index) => (\n <div\n key={index}\n className={`desktop:flex tablet:gap-8 laptop:gap-[64px] gap-4 pt-[64px] ${index % 2 === 0 ? 'laptop:flex-row-reverse' : ''}`}\n >\n <div className=\"desktop:w-[500px] lg-desktop:w-[640px] flex shrink-0 flex-col justify-center\">\n <Text\n html={item?.title}\n className=\"graphic-title desktop:text-[32px] line-clamp-3 text-[24px] leading-[1.2] [&_*_strong]:!font-bold\"\n />\n <Text\n html={item?.description}\n className=\"graphic-title desktop:pt-[8px] lg-desktop:text-[18px] tablet:max-w-[463px] laptop:max-w-[563px] desktop:max-w-none desktop:text-[16px] pt-[4px] text-[14px] leading-[1.4] [&_*_strong]:!font-bold\"\n />\n {/* \u6E10\u53D8\u8272 */}\n {item?.numberOne && (\n <div className=\"desktop:pt-[48px] desktop:flex-col desktop:gap-[48px] flex flex-row gap-[24px] pt-[24px]\">\n <div className=\"\">\n <Text\n style={{\n background: 'var(--1, linear-gradient(90deg, #3AD1FF 0%, #008CD6 100%))',\n backgroundClip: 'text',\n WebkitBackgroundClip: 'text',\n WebkitTextFillColor: 'transparent',\n color: 'transparent', // \u5EFA\u8BAE\u52A0\u4E0A\uFF0C\u517C\u5BB9\u90E8\u5206\u6D4F\u89C8\u5668\n }}\n html={item?.numberOne}\n className=\"graphic-title desktop:text-[64px] line-clamp-3 text-[40px] leading-none [&_*_strong]:!font-bold\"\n />\n <Text\n html={item?.textOne}\n className=\"graphic-title lg-desktop:text-lg desktop:text-[18px] line-clamp-3 text-[14px] leading-[1.4] [&_*_strong]:!font-bold\"\n />\n </div>\n <div>\n <Text\n style={{\n background: 'var(--1, linear-gradient(90deg, #3AD1FF 0%, #008CD6 100%))',\n backgroundClip: 'text',\n WebkitBackgroundClip: 'text',\n WebkitTextFillColor: 'transparent',\n color: 'transparent', // \u5EFA\u8BAE\u52A0\u4E0A\uFF0C\u517C\u5BB9\u90E8\u5206\u6D4F\u89C8\u5668\n }}\n html={item?.numberTwo}\n className=\"graphic-title desktop:text-[64px] line-clamp-3 text-[40px] leading-none [&_*_strong]:!font-bold\"\n />\n <Text\n html={item?.textTwo}\n className=\"graphic-title lg-desktop:text-lg desktop:text-[18px] line-clamp-3 text-[14px] leading-[1.4] [&_*_strong]:!font-bold\"\n />\n </div>\n </div>\n )}\n {item?.icon?.url && (\n <div className=\"desktop:pt-[24px] lg-desktop:pt-[48px] pt-[24px]\">\n <Picture\n className=\"desktop:w-[368px] lg-desktop:w-[488px] w-[358px]\"\n source={item?.icon?.url}\n alt={item?.icon?.alt || ''}\n />\n </div>\n )}\n </div>\n <div className=\"md-tablet:hidden laptop:mt-[24px] desktop:pt-0 mt-[24px] aspect-[964/560] overflow-hidden rounded-2xl\">\n <Picture className=\"size-full object-cover \" source={item?.img?.url} alt={item?.img?.alt || ''} />\n </div>\n <div className=\"tablet:hidden mt-[24px] aspect-[358/360] overflow-hidden rounded-2xl\">\n <Picture\n className=\"size-full object-cover\"\n source={item?.mobileImg?.url}\n alt={item?.mobileImg?.alt || ''}\n />\n </div>\n </div>\n ))}\n </div>\n </div>\n </div>\n </>\n )\n}\n\nexport default withLayout(Features)\n"],
|
|
5
|
+
"mappings": "sbAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,IAAA,eAAAC,EAAAH,GA6BI,IAAAI,EAAA,6BA3BJC,EAA2B,kCAC3BC,EAA8B,qCAqB9B,MAAMC,EAAYC,GAAwB,CACxC,KAAM,CAAE,KAAAC,EAAM,UAAAC,EAAW,GAAGC,CAAK,EAAIH,EAC/B,CAAE,KAAAI,CAAK,EAAIH,EAEjB,SACE,mBACE,oBAAC,OAAK,GAAGE,EAAM,UAAWD,EACvB,UAAAD,GAAM,UACL,OAAC,OAAI,UAAU,8BACb,mBAAC,QACC,KAAMA,GAAM,MACZ,UAAU,4GACZ,EACF,EAEDA,GAAM,KAAK,QACV,OAAC,WACC,UAAU,iDACV,aAAa,GACb,OAAQA,GAAM,KAAK,IACnB,IAAKA,GAAM,KAAK,KAAO,GACzB,EAEDA,GAAM,WAAW,QAChB,OAAC,WACC,UAAU,6CACV,aAAa,GACb,OAAQA,GAAM,WAAW,IACzB,IAAKA,GAAM,WAAW,KAAO,GAC/B,KAEF,OAAC,OAAI,UAAU,GACb,mBAAC,OAAI,UAAU,sBACZ,SAAAG,EAAK,IAAI,CAACC,EAAMC,OACf,QAAC,OAEC,UAAW,+DAA+DA,EAAQ,IAAM,EAAI,0BAA4B,EAAE,GAE1H,qBAAC,OAAI,UAAU,+EACb,oBAAC,QACC,KAAMD,GAAM,MACZ,UAAU,oGACZ,KACA,OAAC,QACC,KAAMA,GAAM,YACZ,UAAU,oMACZ,EAECA,GAAM,cACL,QAAC,OAAI,UAAU,2FACb,qBAAC,OAAI,UAAU,GACb,oBAAC,QACC,MAAO,CACL,WAAY,6DACZ,eAAgB,OAChB,qBAAsB,OACtB,oBAAqB,cACrB,MAAO,aACT,EACA,KAAMA,GAAM,UACZ,UAAU,kGACZ,KACA,OAAC,QACC,KAAMA,GAAM,QACZ,UAAU,sHACZ,GACF,KACA,QAAC,OACC,oBAAC,QACC,MAAO,CACL,WAAY,6DACZ,eAAgB,OAChB,qBAAsB,OACtB,oBAAqB,cACrB,MAAO,aACT,EACA,KAAMA,GAAM,UACZ,UAAU,kGACZ,KACA,OAAC,QACC,KAAMA,GAAM,QACZ,UAAU,sHACZ,GACF,GACF,EAEDA,GAAM,MAAM,QACX,OAAC,OAAI,UAAU,mDACb,mBAAC,WACC,UAAU,mDACV,OAAQA,GAAM,MAAM,IACpB,IAAKA,GAAM,MAAM,KAAO,GAC1B,EACF,GAEJ,KACA,OAAC,OAAI,UAAU,wGACb,mBAAC,WAAQ,UAAU,0BAA0B,OAAQA,GAAM,KAAK,IAAK,IAAKA,GAAM,KAAK,KAAO,GAAI,EAClG,KACA,OAAC,OAAI,UAAU,uEACb,mBAAC,WACC,UAAU,yBACV,OAAQA,GAAM,WAAW,IACzB,IAAKA,GAAM,WAAW,KAAO,GAC/B,EACF,IAtEKC,CAuEP,CACD,EACH,EACF,GACF,EACF,CAEJ,EAEA,IAAOZ,KAAQ,cAAWK,CAAQ",
|
|
6
6
|
"names": ["Features_exports", "__export", "Features_default", "__toCommonJS", "import_jsx_runtime", "import_Styles", "import_components", "Features", "props", "data", "className", "rest", "list", "item", "index"]
|
|
7
7
|
}
|
|
@@ -1,2 +1,8 @@
|
|
|
1
|
-
|
|
1
|
+
interface FootChargerType extends React.HTMLAttributes<HTMLDivElement> {
|
|
2
|
+
data: {
|
|
3
|
+
title: string;
|
|
4
|
+
text: string;
|
|
5
|
+
};
|
|
6
|
+
}
|
|
7
|
+
declare const _default: import("react").ForwardRefExoticComponent<FootChargerType & Partial<import("../../shared/Styles.js").StylesProps & import("../../shared/Styles.js").ContainerProps> & import("react").RefAttributes<any>>;
|
|
2
8
|
export default _default;
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
|
|
1
|
+
import type { FooterNavigationProps } from './types.js';
|
|
2
|
+
declare const _default: import("react").ForwardRefExoticComponent<FooterNavigationProps & Partial<import("../../shared/Styles.js").StylesProps & import("../../shared/Styles.js").ContainerProps> & import("react").RefAttributes<any>>;
|
|
2
3
|
export default _default;
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
declare const _default: any;
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import 'swiper/css';
|
|
3
|
+
import 'swiper/css/navigation';
|
|
4
|
+
import 'swiper/css/pagination';
|
|
5
|
+
import type { GiftBoxType } from './types.js';
|
|
6
|
+
declare const _default: React.ForwardRefExoticComponent<GiftBoxType & Partial<import("../../shared/Styles.js").StylesProps & import("../../shared/Styles.js").ContainerProps> & React.RefAttributes<any>>;
|
|
8
7
|
export default _default;
|