@anker-in/headless-ui 1.1.1 → 1.1.4
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/AiuiProvider/index.d.ts +4 -0
- package/dist/cjs/biz-components/AiuiProvider/index.js +1 -1
- package/dist/cjs/biz-components/AiuiProvider/index.js.map +2 -2
- package/dist/cjs/biz-components/AplusDesc/index.d.ts +22 -0
- package/dist/cjs/biz-components/AplusDesc/index.js +2 -0
- package/dist/cjs/biz-components/AplusDesc/index.js.map +7 -0
- package/dist/cjs/biz-components/DownLoad/index.d.ts +20 -0
- package/dist/cjs/biz-components/DownLoad/index.js +2 -0
- package/dist/cjs/biz-components/DownLoad/index.js.map +7 -0
- 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/Features/index.js +1 -1
- package/dist/cjs/biz-components/Features/index.js.map +2 -2
- package/dist/cjs/biz-components/FootCharger/index.js.map +2 -2
- package/dist/cjs/biz-components/GiftBox/index.d.ts +17 -0
- package/dist/cjs/biz-components/GiftBox/index.js +2 -0
- package/dist/cjs/biz-components/GiftBox/index.js.map +7 -0
- package/dist/cjs/biz-components/Graphic/index.js +1 -1
- package/dist/cjs/biz-components/Graphic/index.js.map +2 -2
- 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/Listing/BizProductProvider.d.ts +126 -0
- package/dist/cjs/biz-components/Listing/BizProductProvider.js +2 -0
- package/dist/cjs/biz-components/Listing/BizProductProvider.js.map +7 -0
- package/dist/cjs/biz-components/Listing/components/PaidShipping/LearnMore.d.ts +2 -0
- package/dist/cjs/biz-components/Listing/components/PaidShipping/LearnMore.js +2 -0
- package/dist/cjs/biz-components/Listing/components/PaidShipping/LearnMore.js.map +7 -0
- package/dist/cjs/biz-components/Listing/components/PaidShipping/ShippingMethod.d.ts +10 -0
- package/dist/cjs/biz-components/Listing/components/PaidShipping/ShippingMethod.js +2 -0
- package/dist/cjs/biz-components/Listing/components/PaidShipping/ShippingMethod.js.map +7 -0
- package/dist/cjs/biz-components/Listing/components/PaidShipping/ShippingPolicyModal.d.ts +25 -0
- package/dist/cjs/biz-components/Listing/components/PaidShipping/ShippingPolicyModal.js +2 -0
- package/dist/cjs/biz-components/Listing/components/PaidShipping/ShippingPolicyModal.js.map +7 -0
- package/dist/cjs/biz-components/Listing/components/PaidShipping/index.d.ts +15 -0
- package/dist/cjs/biz-components/Listing/components/PaidShipping/index.js +2 -0
- package/dist/cjs/biz-components/Listing/components/PaidShipping/index.js.map +7 -0
- package/dist/cjs/biz-components/Listing/components/PaidShipping/type.d.ts +30 -0
- package/dist/cjs/biz-components/Listing/components/PaidShipping/type.js +2 -0
- package/dist/cjs/biz-components/Listing/components/PaidShipping/type.js.map +7 -0
- package/dist/cjs/biz-components/Listing/components/PaidShipping/utils.d.ts +2 -0
- package/dist/cjs/biz-components/Listing/components/PaidShipping/utils.js +2 -0
- package/dist/cjs/biz-components/Listing/components/PaidShipping/utils.js.map +7 -0
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/BenefitsTab.d.ts +39 -0
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/BenefitsTab.js +40 -0
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/BenefitsTab.js.map +7 -0
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/ProductBenefitsTabs/ModalContainer.d.ts +10 -0
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/ProductBenefitsTabs/ModalContainer.js +2 -0
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/ProductBenefitsTabs/ModalContainer.js.map +7 -0
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/ProductBenefitsTabs/index.d.ts +30 -0
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/ProductBenefitsTabs/index.js +2 -0
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/ProductBenefitsTabs/index.js.map +7 -0
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/ProductBundle/index.d.ts +5 -0
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/ProductBundle/index.js +2 -0
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/ProductBundle/index.js.map +7 -0
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/ProductExchangePurchase/index.d.ts +5 -0
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/ProductExchangePurchase/index.js +2 -0
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/ProductExchangePurchase/index.js.map +7 -0
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/ProductFreeGift/index.d.ts +5 -0
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/ProductFreeGift/index.js +2 -0
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/ProductFreeGift/index.js.map +7 -0
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/ProductHighlight/index.d.ts +5 -0
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/ProductHighlight/index.js +2 -0
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/ProductHighlight/index.js.map +7 -0
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/ProductOptions/index.d.ts +5 -0
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/ProductOptions/index.js +2 -0
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/ProductOptions/index.js.map +7 -0
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/index.d.ts +2 -0
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/index.js +2 -0
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/index.js.map +7 -0
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/types.d.ts +43 -0
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/types.js +2 -0
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/types.js.map +7 -0
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductGallery/components/CompareModal.d.ts +2 -0
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductGallery/components/CompareModal.js +2 -0
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductGallery/components/CompareModal.js.map +7 -0
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductGallery/components/Select.d.ts +21 -0
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductGallery/components/Select.js +2 -0
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductGallery/components/Select.js.map +7 -0
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductGallery/components/ShopifyColorOption.d.ts +5 -0
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductGallery/components/ShopifyColorOption.js +2 -0
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductGallery/components/ShopifyColorOption.js.map +7 -0
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductGallery/components/SpecsModal.d.ts +1 -0
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductGallery/components/SpecsModal.js +2 -0
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductGallery/components/SpecsModal.js.map +7 -0
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductGallery/index.d.ts +8 -0
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductGallery/index.js +2 -0
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductGallery/index.js.map +7 -0
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductGallery/types.d.ts +73 -0
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductGallery/types.js +2 -0
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductGallery/types.js.map +7 -0
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductGridBox.d.ts +6 -0
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductGridBox.js +2 -0
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductGridBox.js.map +7 -0
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductSummary/index.d.ts +5 -0
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductSummary/index.js +2 -0
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductSummary/index.js.map +7 -0
- package/dist/cjs/biz-components/Listing/components/ProductCard/index.d.ts +2 -0
- package/dist/cjs/biz-components/Listing/components/ProductCard/index.js +2 -0
- package/dist/cjs/biz-components/Listing/components/ProductCard/index.js.map +7 -0
- package/dist/cjs/biz-components/Listing/components/PurchaseBar/ProductActions/index.d.ts +2 -0
- package/dist/cjs/biz-components/Listing/components/PurchaseBar/ProductActions/index.js +2 -0
- package/dist/cjs/biz-components/Listing/components/PurchaseBar/ProductActions/index.js.map +7 -0
- package/dist/cjs/biz-components/Listing/components/PurchaseBar/ScrollSpyNav/index.d.ts +3 -0
- package/dist/cjs/biz-components/Listing/components/PurchaseBar/ScrollSpyNav/index.js +2 -0
- package/dist/cjs/biz-components/Listing/components/PurchaseBar/ScrollSpyNav/index.js.map +7 -0
- package/dist/cjs/biz-components/Listing/components/PurchaseBar/ScrollSpyNav/types.d.ts +12 -0
- package/dist/cjs/biz-components/Listing/components/PurchaseBar/ScrollSpyNav/types.js +2 -0
- package/dist/cjs/biz-components/Listing/components/PurchaseBar/ScrollSpyNav/types.js.map +7 -0
- package/dist/cjs/biz-components/Listing/components/PurchaseBar/index.d.ts +6 -0
- package/dist/cjs/biz-components/Listing/components/PurchaseBar/index.js +2 -0
- package/dist/cjs/biz-components/Listing/components/PurchaseBar/index.js.map +7 -0
- package/dist/cjs/biz-components/Listing/components/PurchaseBar/types.d.ts +12 -0
- package/dist/cjs/biz-components/Listing/components/PurchaseBar/types.js +2 -0
- package/dist/cjs/biz-components/Listing/components/PurchaseBar/types.js.map +7 -0
- package/dist/cjs/biz-components/Listing/components/index.d.ts +3 -0
- package/dist/cjs/biz-components/Listing/components/index.js +2 -0
- package/dist/cjs/biz-components/Listing/components/index.js.map +7 -0
- package/dist/cjs/biz-components/Listing/const.d.ts +29 -0
- package/dist/cjs/biz-components/Listing/const.js +2 -0
- package/dist/cjs/biz-components/Listing/const.js.map +7 -0
- package/dist/cjs/biz-components/Listing/hooks/use-variant-media.d.ts +14 -0
- package/dist/cjs/biz-components/Listing/hooks/use-variant-media.js +2 -0
- package/dist/cjs/biz-components/Listing/hooks/use-variant-media.js.map +7 -0
- package/dist/cjs/biz-components/Listing/hooks/use-variant.d.ts +5 -0
- package/dist/cjs/biz-components/Listing/hooks/use-variant.js +2 -0
- package/dist/cjs/biz-components/Listing/hooks/use-variant.js.map +7 -0
- package/dist/cjs/biz-components/Listing/hooks/useBenefits.d.ts +50 -0
- package/dist/cjs/biz-components/Listing/hooks/useBenefits.js +2 -0
- package/dist/cjs/biz-components/Listing/hooks/useBenefits.js.map +7 -0
- package/dist/cjs/biz-components/Listing/hooks/useCopy.d.ts +5 -0
- package/dist/cjs/biz-components/Listing/hooks/useCopy.js +2 -0
- package/dist/cjs/biz-components/Listing/hooks/useCopy.js.map +7 -0
- package/dist/cjs/biz-components/Listing/hooks/useDiscountEnable.d.ts +14 -0
- package/dist/cjs/biz-components/Listing/hooks/useDiscountEnable.js +2 -0
- package/dist/cjs/biz-components/Listing/hooks/useDiscountEnable.js.map +7 -0
- package/dist/cjs/biz-components/Listing/index.d.ts +3 -0
- package/dist/cjs/biz-components/Listing/index.js +2 -0
- package/dist/cjs/biz-components/Listing/index.js.map +7 -0
- package/dist/cjs/biz-components/Listing/types/graphql.d.ts +7473 -0
- package/dist/cjs/biz-components/Listing/types/graphql.js +2 -0
- package/dist/cjs/biz-components/Listing/types/graphql.js.map +7 -0
- package/dist/cjs/biz-components/Listing/types/product.d.ts +141 -0
- package/dist/cjs/biz-components/Listing/types/product.js +2 -0
- package/dist/cjs/biz-components/Listing/types/product.js.map +7 -0
- package/dist/cjs/biz-components/Listing/types/productMetafields.d.js +2 -0
- package/dist/cjs/biz-components/Listing/types/productMetafields.d.js.map +7 -0
- package/dist/cjs/biz-components/Listing/types/type-helper.d.ts +5 -0
- package/dist/cjs/biz-components/Listing/types/type-helper.js +2 -0
- package/dist/cjs/biz-components/Listing/types/type-helper.js.map +7 -0
- package/dist/cjs/biz-components/Listing/types.d.ts +29 -0
- package/dist/cjs/biz-components/Listing/types.js +2 -0
- package/dist/cjs/biz-components/Listing/types.js.map +7 -0
- package/dist/cjs/biz-components/Listing/utils/helper.d.ts +36 -0
- package/dist/cjs/biz-components/Listing/utils/helper.js +2 -0
- package/dist/cjs/biz-components/Listing/utils/helper.js.map +7 -0
- package/dist/cjs/biz-components/Listing/utils/index.d.ts +37 -0
- package/dist/cjs/biz-components/Listing/utils/index.js +2 -0
- package/dist/cjs/biz-components/Listing/utils/index.js.map +7 -0
- package/dist/cjs/biz-components/Listing/utils/textFormat.d.ts +73 -0
- package/dist/cjs/biz-components/Listing/utils/textFormat.js +2 -0
- package/dist/cjs/biz-components/Listing/utils/textFormat.js.map +7 -0
- package/dist/cjs/biz-components/MultiLayoutGraphicBlock/MultiLayoutGraphicBlock.js +1 -1
- package/dist/cjs/biz-components/MultiLayoutGraphicBlock/MultiLayoutGraphicBlock.js.map +3 -3
- package/dist/cjs/biz-components/MultiLayoutGraphicBlock/types.d.ts +2 -0
- package/dist/cjs/biz-components/MultiLayoutGraphicBlock/types.js +1 -1
- package/dist/cjs/biz-components/MultiLayoutGraphicBlock/types.js.map +1 -1
- package/dist/cjs/biz-components/SelectStore/index.d.ts +20 -0
- package/dist/cjs/biz-components/SelectStore/index.js +2 -0
- package/dist/cjs/biz-components/SelectStore/index.js.map +7 -0
- package/dist/cjs/biz-components/ShelfDisplay/shelfDisplayItem.js +2 -2
- package/dist/cjs/biz-components/ShelfDisplay/shelfDisplayItem.js.map +3 -3
- package/dist/cjs/biz-components/Specs/dropdown.js +2 -2
- package/dist/cjs/biz-components/Specs/dropdown.js.map +2 -2
- package/dist/cjs/biz-components/Specs/index.js +1 -1
- package/dist/cjs/biz-components/Specs/index.js.map +3 -3
- 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/Title/index.js +1 -1
- package/dist/cjs/biz-components/Title/index.js.map +2 -2
- package/dist/cjs/biz-components/index.d.ts +57 -1
- package/dist/cjs/biz-components/index.js +1 -1
- package/dist/cjs/biz-components/index.js.map +3 -3
- package/dist/cjs/components/ExposureDetector.d.ts +45 -0
- package/dist/cjs/components/ExposureDetector.js +2 -0
- package/dist/cjs/components/ExposureDetector.js.map +7 -0
- package/dist/cjs/components/checkbox.d.ts +1 -0
- package/dist/cjs/components/checkbox.js +1 -1
- package/dist/cjs/components/checkbox.js.map +3 -3
- package/dist/cjs/components/dialog.d.ts +1 -1
- package/dist/cjs/components/dialog.js +1 -1
- package/dist/cjs/components/dialog.js.map +2 -2
- package/dist/cjs/components/index.d.ts +1 -0
- package/dist/cjs/components/index.js +1 -1
- package/dist/cjs/components/index.js.map +3 -3
- package/dist/cjs/components/picture.js +1 -1
- package/dist/cjs/components/picture.js.map +2 -2
- package/dist/cjs/hooks/useExposureDetection.d.ts +69 -0
- package/dist/cjs/hooks/useExposureDetection.js +2 -0
- package/dist/cjs/hooks/useExposureDetection.js.map +7 -0
- package/dist/cjs/stories/carousel.stories.d.ts +3 -57
- package/dist/cjs/stories/carousel.stories.js.map +2 -2
- package/dist/esm/biz-components/AiuiProvider/index.d.ts +4 -0
- package/dist/esm/biz-components/AiuiProvider/index.js +1 -1
- package/dist/esm/biz-components/AiuiProvider/index.js.map +2 -2
- package/dist/esm/biz-components/AplusDesc/index.d.ts +22 -0
- package/dist/esm/biz-components/AplusDesc/index.js +2 -0
- package/dist/esm/biz-components/AplusDesc/index.js.map +7 -0
- package/dist/esm/biz-components/DownLoad/index.d.ts +20 -0
- package/dist/esm/biz-components/DownLoad/index.js +2 -0
- package/dist/esm/biz-components/DownLoad/index.js.map +7 -0
- package/dist/esm/biz-components/Faq/Faq.js +1 -1
- package/dist/esm/biz-components/Faq/Faq.js.map +3 -3
- 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.js.map +2 -2
- package/dist/esm/biz-components/GiftBox/index.d.ts +17 -0
- package/dist/esm/biz-components/GiftBox/index.js +2 -0
- package/dist/esm/biz-components/GiftBox/index.js.map +7 -0
- package/dist/esm/biz-components/Graphic/index.js +1 -1
- package/dist/esm/biz-components/Graphic/index.js.map +2 -2
- 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/Listing/BizProductProvider.d.ts +126 -0
- package/dist/esm/biz-components/Listing/BizProductProvider.js +2 -0
- package/dist/esm/biz-components/Listing/BizProductProvider.js.map +7 -0
- package/dist/esm/biz-components/Listing/components/PaidShipping/LearnMore.d.ts +2 -0
- package/dist/esm/biz-components/Listing/components/PaidShipping/LearnMore.js +2 -0
- package/dist/esm/biz-components/Listing/components/PaidShipping/LearnMore.js.map +7 -0
- package/dist/esm/biz-components/Listing/components/PaidShipping/ShippingMethod.d.ts +10 -0
- package/dist/esm/biz-components/Listing/components/PaidShipping/ShippingMethod.js +2 -0
- package/dist/esm/biz-components/Listing/components/PaidShipping/ShippingMethod.js.map +7 -0
- package/dist/esm/biz-components/Listing/components/PaidShipping/ShippingPolicyModal.d.ts +25 -0
- package/dist/esm/biz-components/Listing/components/PaidShipping/ShippingPolicyModal.js +2 -0
- package/dist/esm/biz-components/Listing/components/PaidShipping/ShippingPolicyModal.js.map +7 -0
- package/dist/esm/biz-components/Listing/components/PaidShipping/index.d.ts +15 -0
- package/dist/esm/biz-components/Listing/components/PaidShipping/index.js +2 -0
- package/dist/esm/biz-components/Listing/components/PaidShipping/index.js.map +7 -0
- package/dist/esm/biz-components/Listing/components/PaidShipping/type.d.ts +30 -0
- package/dist/esm/biz-components/Listing/components/PaidShipping/type.js +2 -0
- package/dist/esm/biz-components/Listing/components/PaidShipping/type.js.map +7 -0
- package/dist/esm/biz-components/Listing/components/PaidShipping/utils.d.ts +2 -0
- package/dist/esm/biz-components/Listing/components/PaidShipping/utils.js +2 -0
- package/dist/esm/biz-components/Listing/components/PaidShipping/utils.js.map +7 -0
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/BenefitsTab.d.ts +39 -0
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/BenefitsTab.js +40 -0
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/BenefitsTab.js.map +7 -0
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/ProductBenefitsTabs/ModalContainer.d.ts +10 -0
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/ProductBenefitsTabs/ModalContainer.js +2 -0
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/ProductBenefitsTabs/ModalContainer.js.map +7 -0
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/ProductBenefitsTabs/index.d.ts +30 -0
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/ProductBenefitsTabs/index.js +2 -0
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/ProductBenefitsTabs/index.js.map +7 -0
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/ProductBundle/index.d.ts +5 -0
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/ProductBundle/index.js +2 -0
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/ProductBundle/index.js.map +7 -0
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/ProductExchangePurchase/index.d.ts +5 -0
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/ProductExchangePurchase/index.js +2 -0
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/ProductExchangePurchase/index.js.map +7 -0
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/ProductFreeGift/index.d.ts +5 -0
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/ProductFreeGift/index.js +2 -0
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/ProductFreeGift/index.js.map +7 -0
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/ProductHighlight/index.d.ts +5 -0
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/ProductHighlight/index.js +2 -0
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/ProductHighlight/index.js.map +7 -0
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/ProductOptions/index.d.ts +5 -0
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/ProductOptions/index.js +2 -0
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/ProductOptions/index.js.map +7 -0
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/index.d.ts +2 -0
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/index.js +2 -0
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/index.js.map +7 -0
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/types.d.ts +43 -0
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/types.js +2 -0
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/types.js.map +7 -0
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductGallery/components/CompareModal.d.ts +2 -0
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductGallery/components/CompareModal.js +2 -0
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductGallery/components/CompareModal.js.map +7 -0
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductGallery/components/Select.d.ts +21 -0
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductGallery/components/Select.js +2 -0
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductGallery/components/Select.js.map +7 -0
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductGallery/components/ShopifyColorOption.d.ts +5 -0
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductGallery/components/ShopifyColorOption.js +2 -0
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductGallery/components/ShopifyColorOption.js.map +7 -0
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductGallery/components/SpecsModal.d.ts +1 -0
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductGallery/components/SpecsModal.js +2 -0
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductGallery/components/SpecsModal.js.map +7 -0
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductGallery/index.d.ts +8 -0
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductGallery/index.js +2 -0
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductGallery/index.js.map +7 -0
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductGallery/types.d.ts +73 -0
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductGallery/types.js +2 -0
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductGallery/types.js.map +7 -0
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductGridBox.d.ts +6 -0
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductGridBox.js +2 -0
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductGridBox.js.map +7 -0
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductSummary/index.d.ts +5 -0
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductSummary/index.js +2 -0
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductSummary/index.js.map +7 -0
- package/dist/esm/biz-components/Listing/components/ProductCard/index.d.ts +2 -0
- package/dist/esm/biz-components/Listing/components/ProductCard/index.js +2 -0
- package/dist/esm/biz-components/Listing/components/ProductCard/index.js.map +7 -0
- package/dist/esm/biz-components/Listing/components/PurchaseBar/ProductActions/index.d.ts +2 -0
- package/dist/esm/biz-components/Listing/components/PurchaseBar/ProductActions/index.js +2 -0
- package/dist/esm/biz-components/Listing/components/PurchaseBar/ProductActions/index.js.map +7 -0
- package/dist/esm/biz-components/Listing/components/PurchaseBar/ScrollSpyNav/index.d.ts +3 -0
- package/dist/esm/biz-components/Listing/components/PurchaseBar/ScrollSpyNav/index.js +2 -0
- package/dist/esm/biz-components/Listing/components/PurchaseBar/ScrollSpyNav/index.js.map +7 -0
- package/dist/esm/biz-components/Listing/components/PurchaseBar/ScrollSpyNav/types.d.ts +12 -0
- package/dist/esm/biz-components/Listing/components/PurchaseBar/ScrollSpyNav/types.js +1 -0
- package/dist/esm/biz-components/Listing/components/PurchaseBar/ScrollSpyNav/types.js.map +7 -0
- package/dist/esm/biz-components/Listing/components/PurchaseBar/index.d.ts +6 -0
- package/dist/esm/biz-components/Listing/components/PurchaseBar/index.js +2 -0
- package/dist/esm/biz-components/Listing/components/PurchaseBar/index.js.map +7 -0
- package/dist/esm/biz-components/Listing/components/PurchaseBar/types.d.ts +12 -0
- package/dist/esm/biz-components/Listing/components/PurchaseBar/types.js +1 -0
- package/dist/esm/biz-components/Listing/components/PurchaseBar/types.js.map +7 -0
- package/dist/esm/biz-components/Listing/components/index.d.ts +3 -0
- package/dist/esm/biz-components/Listing/components/index.js +2 -0
- package/dist/esm/biz-components/Listing/components/index.js.map +7 -0
- package/dist/esm/biz-components/Listing/const.d.ts +29 -0
- package/dist/esm/biz-components/Listing/const.js +2 -0
- package/dist/esm/biz-components/Listing/const.js.map +7 -0
- package/dist/esm/biz-components/Listing/hooks/use-variant-media.d.ts +14 -0
- package/dist/esm/biz-components/Listing/hooks/use-variant-media.js +2 -0
- package/dist/esm/biz-components/Listing/hooks/use-variant-media.js.map +7 -0
- package/dist/esm/biz-components/Listing/hooks/use-variant.d.ts +5 -0
- package/dist/esm/biz-components/Listing/hooks/use-variant.js +2 -0
- package/dist/esm/biz-components/Listing/hooks/use-variant.js.map +7 -0
- package/dist/esm/biz-components/Listing/hooks/useBenefits.d.ts +50 -0
- package/dist/esm/biz-components/Listing/hooks/useBenefits.js +2 -0
- package/dist/esm/biz-components/Listing/hooks/useBenefits.js.map +7 -0
- package/dist/esm/biz-components/Listing/hooks/useCopy.d.ts +5 -0
- package/dist/esm/biz-components/Listing/hooks/useCopy.js +2 -0
- package/dist/esm/biz-components/Listing/hooks/useCopy.js.map +7 -0
- package/dist/esm/biz-components/Listing/hooks/useDiscountEnable.d.ts +14 -0
- package/dist/esm/biz-components/Listing/hooks/useDiscountEnable.js +2 -0
- package/dist/esm/biz-components/Listing/hooks/useDiscountEnable.js.map +7 -0
- package/dist/esm/biz-components/Listing/index.d.ts +3 -0
- package/dist/esm/biz-components/Listing/index.js +2 -0
- package/dist/esm/biz-components/Listing/index.js.map +7 -0
- package/dist/esm/biz-components/Listing/types/graphql.d.ts +7473 -0
- package/dist/esm/biz-components/Listing/types/graphql.js +2 -0
- package/dist/esm/biz-components/Listing/types/graphql.js.map +7 -0
- package/dist/esm/biz-components/Listing/types/product.d.ts +141 -0
- package/dist/esm/biz-components/Listing/types/product.js +2 -0
- package/dist/esm/biz-components/Listing/types/product.js.map +7 -0
- package/dist/esm/biz-components/Listing/types/productMetafields.d.js +2 -0
- package/dist/esm/biz-components/Listing/types/productMetafields.d.js.map +7 -0
- package/dist/esm/biz-components/Listing/types/type-helper.d.ts +5 -0
- package/dist/esm/biz-components/Listing/types/type-helper.js +1 -0
- package/dist/esm/biz-components/Listing/types/type-helper.js.map +7 -0
- package/dist/esm/biz-components/Listing/types.d.ts +29 -0
- package/dist/esm/biz-components/Listing/types.js +1 -0
- package/dist/esm/biz-components/Listing/types.js.map +7 -0
- package/dist/esm/biz-components/Listing/utils/helper.d.ts +36 -0
- package/dist/esm/biz-components/Listing/utils/helper.js +2 -0
- package/dist/esm/biz-components/Listing/utils/helper.js.map +7 -0
- package/dist/esm/biz-components/Listing/utils/index.d.ts +37 -0
- package/dist/esm/biz-components/Listing/utils/index.js +2 -0
- package/dist/esm/biz-components/Listing/utils/index.js.map +7 -0
- package/dist/esm/biz-components/Listing/utils/textFormat.d.ts +73 -0
- package/dist/esm/biz-components/Listing/utils/textFormat.js +2 -0
- package/dist/esm/biz-components/Listing/utils/textFormat.js.map +7 -0
- package/dist/esm/biz-components/MultiLayoutGraphicBlock/MultiLayoutGraphicBlock.js +1 -1
- package/dist/esm/biz-components/MultiLayoutGraphicBlock/MultiLayoutGraphicBlock.js.map +3 -3
- package/dist/esm/biz-components/MultiLayoutGraphicBlock/types.d.ts +2 -0
- package/dist/esm/biz-components/SelectStore/index.d.ts +20 -0
- package/dist/esm/biz-components/SelectStore/index.js +2 -0
- package/dist/esm/biz-components/SelectStore/index.js.map +7 -0
- package/dist/esm/biz-components/ShelfDisplay/shelfDisplayItem.js +3 -3
- package/dist/esm/biz-components/ShelfDisplay/shelfDisplayItem.js.map +3 -3
- package/dist/esm/biz-components/Specs/dropdown.js +2 -2
- package/dist/esm/biz-components/Specs/dropdown.js.map +2 -2
- package/dist/esm/biz-components/Specs/index.js +1 -1
- package/dist/esm/biz-components/Specs/index.js.map +3 -3
- package/dist/esm/biz-components/Tabs/Tabs.js +1 -1
- package/dist/esm/biz-components/Tabs/Tabs.js.map +2 -2
- 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/index.d.ts +57 -1
- package/dist/esm/biz-components/index.js +1 -1
- package/dist/esm/biz-components/index.js.map +3 -3
- package/dist/esm/components/ExposureDetector.d.ts +45 -0
- package/dist/esm/components/ExposureDetector.js +2 -0
- package/dist/esm/components/ExposureDetector.js.map +7 -0
- package/dist/esm/components/checkbox.d.ts +1 -0
- package/dist/esm/components/checkbox.js +1 -1
- package/dist/esm/components/checkbox.js.map +3 -3
- package/dist/esm/components/dialog.d.ts +1 -1
- package/dist/esm/components/dialog.js +1 -1
- package/dist/esm/components/dialog.js.map +2 -2
- package/dist/esm/components/index.d.ts +1 -0
- package/dist/esm/components/index.js +1 -1
- package/dist/esm/components/index.js.map +3 -3
- package/dist/esm/components/picture.js +1 -1
- package/dist/esm/components/picture.js.map +2 -2
- package/dist/esm/hooks/useExposureDetection.d.ts +69 -0
- package/dist/esm/hooks/useExposureDetection.js +2 -0
- package/dist/esm/hooks/useExposureDetection.js.map +7 -0
- package/dist/esm/stories/carousel.stories.d.ts +3 -57
- package/dist/esm/stories/carousel.stories.js.map +2 -2
- package/dist/tokens/anker.css +1 -0
- package/dist/tokens/base.css +1 -1
- package/dist/tokens/eufy.css +1 -0
- package/dist/tokens/eufyMake.css +1 -0
- package/dist/tokens/solix.css +1 -0
- package/dist/tokens/soundcore.css +1 -0
- package/package.json +4 -1
- package/style.css +0 -8
- package/tailwind.config.js +20 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/biz-components/Specs/index.tsx"],
|
|
4
|
-
"sourcesContent": ["'use client'\n\nimport DropDown from './dropdown'\nimport { useAiuiContext } from '../AiuiProvider/index.js'\nimport { useMediaQuery } from 'react-responsive'\nimport { useMemo, useState, useEffect } from 'react'\nimport { withLayout } from '../../shared/Styles.js'\nimport { formatVariantPrice } from '../ShelfDisplay/shelfDisplay.js'\nimport { Picture, Text, Button, Container, Heading } from '../../components/index.js'\nimport React, { useImperativeHandle, useRef } from 'react'\n\nconst Specs = React.forwardRef<HTMLDivElement, any>((page: any, ref) => {\n const { data, buildData, onChange } = page || {}\n\n const isMobile = useMediaQuery({ query: '(max-width: 768px)' })\n\n const [active, setActive] = useState<any>({})\n const [visibleActive, setVisibleActive] = useState<{ [key: number]: boolean }>({})\n\n const innerRef = useRef<HTMLDivElement>(null)\n\n const { locale = 'us' } = useAiuiContext()\n\n const { LeftMenu, RightMenu, DefaultSelectMenu } = useMemo(() => data?.data || {}, [data?.data])\n\n const isImageUrl = (urlPath: string) => {\n try {\n const url = new URL(urlPath)\n const path = url.pathname.toLowerCase()\n return /\\.(jpeg|jpg|gif|png|webp|bmp|svg|tiff)$/.test(path)\n } catch (e) {\n // \u5982\u679C\u4F20\u5165\u7684\u4E0D\u662F\u6709\u6548URL\uFF08\u5982\u76F8\u5BF9\u8DEF\u5F84\uFF09\uFF0C\u76F4\u63A5\u68C0\u67E5\u8DEF\u5F84\n return /\\.(jpeg|jpg|gif|png|webp|bmp|svg|tiff)$/i.test(urlPath)\n }\n }\n\n const skuNode = (product: any, index: number) => {\n const findCurrentData = RightMenu?.menus?.find?.((item: any) => item?.handle === product?.handle)\n const findSku = product?.variants?.find?.((item: any) => item?.sku === product?.sku || findCurrentData?.sku)\n const coupon = findSku?.coupons?.[0]\n const { price, basePrice } = formatVariantPrice({\n locale: locale || 'us',\n amount: coupon ? coupon?.variant_price4wscode : findSku?.price,\n baseAmount: coupon ? findSku?.price : 0,\n currencyCode: product?.price?.currencyCode || 'USD',\n })\n const buttonTextValue =\n typeof DefaultSelectMenu?.buttonText === 'string'\n ? DefaultSelectMenu?.buttonText\n : DefaultSelectMenu?.buttonText?.[String(index)] || ''\n return (\n <div className=\"box-border specs-sku-node-wrap\">\n <Text\n className={`relative mb-6 box-border block rounded-[50px] border border-[#E4E5E6] bg-[#F5F5F7] px-6 py-4 text-base font-bold md-tablet:p-2 l-tablet:mb-4 l-tablet:text-sm desktop:px-6 lg-desktop:mb-8 lg-desktop:text-lg openDropDown specs-sku-node-text`}\n onClick={() => setVisibleActive({ ...visibleActive, [index]: !visibleActive?.[index] })}\n >\n <div className=\"flex items-center justify-between overflow-hidden\">\n <div\n className=\"openDropDown flex-1 truncate text-base md-tablet:text-sm lg-desktop:text-lg specs-sku-node-title\"\n title={active?.[index]?.name}\n >\n {active?.[index]?.name || ''}\n </div>\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"24\"\n height=\"25\"\n viewBox=\"0 0 24 25\"\n fill=\"none\"\n className=\"openDropDown\"\n >\n <path\n d=\"M6 9.5L12 15.5L18 9.5\"\n stroke=\"#1D1D1F\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n />\n </svg>\n </div>\n <DropDown\n index={index}\n list={buildData?.products}\n active={active}\n filterActive={active}\n setActive={setActive}\n visible={visibleActive}\n setVisible={setVisibleActive}\n />\n </Text>\n <div className=\"max-h-[138px] max-w-[138px] lg-desktop:max-h-[196px] lg-desktop:max-w-[196px]\">\n <Picture\n source={findSku?.image?.url || ''}\n className=\"aspect-h-[280] aspect-w-[280]\"\n imgClassName=\"w-full h-full object-cover hover:scale-105 transition-all duration-300\"\n />\n </div>\n {findSku?.availableForSale ? (\n <div className=\"mb-2 mt-6 flex items-center text-xl font-bold lg-desktop:text-2xl\">\n <div className=\"text-[#1D1D1F] specs-sku-node-price\">{price || ''}</div>\n {basePrice && (\n <div className=\"ml-1 text-xl text-[#86868C] line-through lg-desktop:text-2xl specs-sku-node-base-price\">\n {basePrice}\n </div>\n )}\n </div>\n ) : (\n false\n )}\n {buttonTextValue ? (\n <Button\n onClick={() => {\n onChange?.(product, index)\n }}\n className=\"specs-sku-node-button\"\n >\n {buttonTextValue}\n </Button>\n ) : null}\n </div>\n )\n }\n\n const normalNode = (v: any) => {\n if (!v) return\n if (v && typeof v !== 'string') {\n return (\n <div className=\"size-full\">\n <p\n className=\"text-base font-bold text-[#1D1D1F] md:text-sm min-xxl:text-lg specs-normal-node-text\"\n dangerouslySetInnerHTML={{\n __html: v?.text || '',\n }}\n />\n <Picture\n source={v?.imgUrl}\n className=\"m-auto max-h-[360px] max-w-[360px] l:max-h-[174px] l:max-w-[174px]\"\n imgClassName=\"w-full h-full object-cover\"\n />\n </div>\n )\n }\n return (\n <div className=\"break-all\">\n {isImageUrl(v) ? (\n <Picture\n source={v}\n className=\"m-auto max-h-[360px] max-w-[360px] l:max-h-[174px] l:max-w-[174px]\"\n imgClassName=\"w-full h-full object-cover\"\n />\n ) : (\n <p\n className=\"text-base font-bold text-[#1D1D1F] md:text-sm min-xxl:text-lg specs-normal-node-text\"\n dangerouslySetInnerHTML={{\n __html: v || '',\n }}\n />\n )}\n </div>\n )\n }\n\n const productNode = (data: any) => {\n return data.map((st: any, idx: number) => {\n const isFirstParameter = idx === 0\n return (\n <div\n key={st}\n className={`box-border grid w-full cursor-pointer grid-cols-3 overflow-hidden border-t border-t-[#E4E5E6] l-tablet:flex l-tablet:flex-col ${isFirstParameter ? '' : ''} specs-product-node-wrap`}\n >\n <Heading\n as=\"h3\"\n html={st || ''}\n className=\"mr-4 flex-1 pt-4 tablet:py-6 text-base font-bold md:text-sm l-tablet:text-[#86868C] desktop:p-6 lg-desktop:text-lg specs-product-node-title\"\n />\n <div\n className={`col-span-2 grid flex-1 py-6 l-tablet:w-full l-tablet:gap-4 laptop:gap-8 desktop:gap-12 desktop:p-6 lg-desktop:gap-16 grid-cols-2 specs-product-node-body`}\n >\n {Object.keys(active)?.map?.((item: string) => {\n const currentData = active?.[item]\n const currentMenus = RightMenu?.menus?.find?.(\n (item: any) => item?.handle === currentData?.handle\n )?.subTitle\n return normalNode(currentMenus?.[st])\n })}\n </div>\n </div>\n )\n })\n }\n\n // \u5DE6\u4FA7\u6807\u9898\u83DC\u5355\n const childrenNode = (node: any) => {\n if (!active) return\n const { subTitle, isProduct } = node\n // \u5982\u679C\u662F\u4EA7\u54C1\n if (isProduct) {\n return (\n <>\n <div\n className={`box-border grid w-full cursor-pointer grid-cols-3 border-t-[#E4E5E6] l-tablet:flex l-tablet:flex-col border-t-0 specs-content-item-product`}\n >\n {node?.title && <Heading as=\"h3\" html={node?.title || ''} className=\"l:hidden specs-item-product-title\" />}\n <div\n className={`col-span-2 grid flex-1 pb-4 l-tablet:w-full l-tablet:gap-4 laptop:gap-8 desktop:gap-12 desktop:p-6 lg-desktop:gap-16 grid-cols-2 pr-0 specs-item-product-body`}\n >\n {Object.keys(active)?.map((item: string, index: number) => {\n const currentData = active?.[item]\n const currentProduct = buildData?.products?.find?.((item: any) => item?.handle === currentData?.handle)\n return <div key={item}>{skuNode({ ...currentProduct, sku: currentData?.sku, item: item }, index)}</div>\n })}\n </div>\n </div>\n {subTitle?.length ? productNode(subTitle) : null}\n </>\n )\n }\n return productNode(subTitle)\n }\n\n useImperativeHandle(ref, () => innerRef.current as HTMLDivElement)\n\n useEffect(() => {\n if (!buildData?.products?.length) return\n const skus = DefaultSelectMenu?.sku?.split?.(',') || []\n let currentActive = {}\n skus?.forEach?.((sku: string, index: number) => {\n const findData = buildData?.products?.find?.((item: any) => {\n const findSku = item?.variants?.find?.((v: any) => v?.sku === sku)\n if (findSku) return true\n })\n if (findData) {\n currentActive = {\n ...currentActive,\n [index]: {\n sku: sku,\n name: findData?.name,\n handle: findData?.handle,\n },\n }\n }\n })\n setActive(currentActive)\n }, [buildData])\n\n useEffect(() => {\n if (isMobile) {\n const currentActive = Object.keys(active || {})\n if (currentActive?.length > 2) {\n const newActive = currentActive?.slice?.(0, 2)\n let newShowActive = {}\n newActive?.forEach?.((item: string) => {\n newShowActive = { ...newShowActive, [item]: active?.[item] }\n })\n setActive(newShowActive)\n }\n }\n }, [isMobile])\n\n return (\n <div className=\"w-full overflow-hidden bg-[#F5F5F7] specs-wrapper\" ref={innerRef}>\n {LeftMenu?.data ? (\n <div className=\"box-border w-full overflow-hidden specs-wrapper-content\">\n {LeftMenu?.data?.map?.((item: any, index: number) => {\n return (\n <div key={index} className=\"w-full overflow-hidden pt-10 [&:first-child]:pt-0 specs-wrapper-content-item\">\n {childrenNode(item)}\n </div>\n )\n })}\n </div>\n ) : null}\n </div>\n )\n})\n\nSpecs.displayName = 'Specs'\n\nexport default withLayout(Specs)\n"],
|
|
5
|
-
"mappings": "
|
|
6
|
-
"names": ["Fragment", "jsx", "jsxs", "DropDown", "useAiuiContext", "useMediaQuery", "useMemo", "useState", "useEffect", "withLayout", "formatVariantPrice", "Picture", "Text", "Button", "Heading", "React", "useImperativeHandle", "useRef", "Specs", "page", "ref", "data", "buildData", "onChange", "isMobile", "active", "setActive", "visibleActive", "setVisibleActive", "innerRef", "locale", "LeftMenu", "RightMenu", "DefaultSelectMenu", "isImageUrl", "urlPath", "path", "skuNode", "product", "index", "findCurrentData", "item", "findSku", "coupon", "price", "basePrice", "buttonTextValue", "normalNode", "v", "productNode", "st", "idx", "isFirstParameter", "currentData", "currentMenus", "childrenNode", "node", "subTitle", "isProduct", "currentProduct", "skus", "currentActive", "sku", "findData", "newActive", "newShowActive", "Specs_default"]
|
|
4
|
+
"sourcesContent": ["'use client'\n\nimport DropDown from './dropdown'\nimport { useAiuiContext } from '../AiuiProvider/index.js'\nimport { useMediaQuery } from 'react-responsive'\nimport { useMemo, useState, useEffect } from 'react'\nimport { withLayout } from '../../shared/Styles.js'\nimport { formatVariantPrice } from '../ShelfDisplay/shelfDisplay.js'\nimport { Picture, Text, Button, Container, Heading } from '../../components/index.js'\nimport React, { useImperativeHandle, useRef } from 'react'\n\nconst Specs = React.forwardRef<HTMLDivElement, any>((page: any, ref) => {\n const { data, buildData, onChange, onSecondaryChange } = page || {}\n\n const isMobile = useMediaQuery({ query: '(max-width: 768px)' })\n\n const [active, setActive] = useState<any>({})\n const [isShowMax, setIsShowMax] = useState<boolean>(false)\n const [visibleActive, setVisibleActive] = useState<{ [key: number]: boolean }>({})\n\n const innerRef = useRef<HTMLDivElement>(null)\n\n const { locale = 'us' } = useAiuiContext()\n\n const { LeftMenu, RightMenu, DefaultSelectMenu } = useMemo(() => data?.data || {}, [data?.data])\n\n const isImageUrl = (urlPath: string) => {\n try {\n const url = new URL(urlPath)\n const path = url.pathname.toLowerCase()\n return /\\.(jpeg|jpg|gif|png|webp|bmp|svg|tiff)$/.test(path)\n } catch (e) {\n // \u5982\u679C\u4F20\u5165\u7684\u4E0D\u662F\u6709\u6548URL\uFF08\u5982\u76F8\u5BF9\u8DEF\u5F84\uFF09\uFF0C\u76F4\u63A5\u68C0\u67E5\u8DEF\u5F84\n return /\\.(jpeg|jpg|gif|png|webp|bmp|svg|tiff)$/i.test(urlPath)\n }\n }\n\n const skuNode = (product: any, index: number) => {\n const findCurrentData = RightMenu?.menus?.find?.((item: any) => item?.handle === product?.handle)\n const findSku = product?.variants?.find?.((item: any) => item?.sku === product?.sku || findCurrentData?.sku)\n const coupon = findSku?.coupons?.[0]\n const { price, basePrice } = formatVariantPrice({\n locale: locale || 'us',\n amount: coupon ? coupon?.variant_price4wscode : findSku?.price,\n baseAmount: coupon ? findSku?.price : 0,\n currencyCode: product?.price?.currencyCode || 'USD',\n })\n const buttonTextValue =\n typeof DefaultSelectMenu?.buttonText === 'string'\n ? DefaultSelectMenu?.buttonText\n : DefaultSelectMenu?.buttonText?.[String(index)] || ''\n return (\n <div className=\"box-border specs-sku-node-wrap\">\n <Text\n className={`relative mb-6 box-border block rounded-[50px] border border-[#E4E5E6] bg-[#F5F5F7] px-6 py-4 text-base font-bold md-tablet:p-2 l-tablet:mb-4 l-tablet:text-sm desktop:px-6 lg-desktop:mb-8 lg-desktop:text-lg openDropDown specs-sku-node-text`}\n onClick={() => setVisibleActive({ ...visibleActive, [index]: !visibleActive?.[index] })}\n >\n <div className=\"flex items-center justify-between overflow-hidden\">\n <div\n className=\"openDropDown flex-1 truncate text-base md-tablet:text-sm lg-desktop:text-lg specs-sku-node-title\"\n title={active?.[index]?.name || ''}\n >\n {active?.[index]?.name || ''}\n </div>\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"24\"\n height=\"25\"\n viewBox=\"0 0 24 25\"\n fill=\"none\"\n className=\"openDropDown\"\n >\n <path\n d=\"M6 9.5L12 15.5L18 9.5\"\n stroke=\"#1D1D1F\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n />\n </svg>\n </div>\n <DropDown\n index={index}\n list={buildData?.products}\n active={active}\n filterActive={active}\n setActive={setActive}\n visible={visibleActive}\n setVisible={setVisibleActive}\n />\n </Text>\n <div className=\"max-h-[138px] max-w-[138px] lg-desktop:max-h-[196px] lg-desktop:max-w-[196px]\">\n <Picture\n source={findSku?.image?.url || ''}\n className=\"aspect-h-[280] aspect-w-[280]\"\n imgClassName=\"w-full h-full object-cover hover:scale-105 transition-all duration-300\"\n />\n </div>\n {findSku?.availableForSale ? (\n <div className=\"mb-2 mt-6 flex items-center text-xl font-bold lg-desktop:text-2xl\">\n <div className=\"text-[#1D1D1F] specs-sku-node-price\">{price || ''}</div>\n {basePrice && (\n <div className=\"ml-1 text-xl text-[#86868C] line-through lg-desktop:text-2xl specs-sku-node-base-price\">\n {basePrice}\n </div>\n )}\n </div>\n ) : (\n false\n )}\n {buttonTextValue ? (\n <Button\n onClick={() => {\n onChange?.(product, index)\n }}\n className=\"specs-sku-node-button\"\n >\n {buttonTextValue}\n </Button>\n ) : null}\n </div>\n )\n }\n\n const normalNode = (v: any) => {\n if (!v) return\n if (v && typeof v !== 'string') {\n return (\n <div className=\"size-full\">\n <p\n className=\"text-base font-bold text-[#1D1D1F] md:text-sm min-xxl:text-lg specs-normal-node-text\"\n dangerouslySetInnerHTML={{\n __html: v?.text || '',\n }}\n />\n <Picture\n source={v?.imgUrl}\n className=\"m-auto max-h-[360px] max-w-[360px] l:max-h-[174px] l:max-w-[174px]\"\n imgClassName=\"w-full h-full object-cover\"\n />\n </div>\n )\n }\n return (\n <div className=\"break-all\">\n {isImageUrl(v) ? (\n <Picture\n source={v}\n className=\"m-auto max-h-[360px] max-w-[360px] l:max-h-[174px] l:max-w-[174px]\"\n imgClassName=\"w-full h-full object-cover\"\n />\n ) : (\n <p\n className=\"text-base font-bold text-[#1D1D1F] md:text-sm min-xxl:text-lg specs-normal-node-text\"\n dangerouslySetInnerHTML={{\n __html: v || '',\n }}\n />\n )}\n </div>\n )\n }\n\n const productNode = (data: any) => {\n return data.map((st: any, idx: number) => {\n const isFirstParameter = idx === 0\n return (\n <div\n key={st}\n className={`box-border grid w-full cursor-pointer grid-cols-3 overflow-hidden border-t border-t-[#E4E5E6] l-tablet:flex l-tablet:flex-col ${isFirstParameter ? '' : ''} specs-product-node-wrap`}\n >\n <Heading\n as=\"h3\"\n html={st || ''}\n className=\"mr-4 flex-1 pt-4 tablet:py-6 text-base font-bold md:text-sm l-tablet:text-[#86868C] desktop:p-6 lg-desktop:text-lg specs-product-node-title\"\n />\n <div\n className={`col-span-2 grid flex-1 py-6 l-tablet:w-full l-tablet:gap-4 laptop:gap-8 desktop:gap-12 desktop:p-6 lg-desktop:gap-16 grid-cols-${isShowMax ? 3 : 2} specs-product-node-body`}\n >\n {Object.keys(active)?.map?.((item: string) => {\n const currentData = active?.[item]\n const currentMenus = RightMenu?.menus?.find?.(\n (item: any) => item?.handle === currentData?.handle\n )?.subTitle\n return normalNode(currentMenus?.[st])\n })}\n </div>\n </div>\n )\n })\n }\n\n // \u5DE6\u4FA7\u6807\u9898\u83DC\u5355\n const childrenNode = (node: any) => {\n if (!active) return\n const { subTitle, isProduct } = node\n // \u5982\u679C\u662F\u4EA7\u54C1\n if (isProduct) {\n return (\n <>\n <div\n className={`box-border grid w-full cursor-pointer grid-cols-3 border-t-[#E4E5E6] l-tablet:flex l-tablet:flex-col border-t-0 specs-content-item-product`}\n >\n {node?.title && <Heading as=\"h3\" html={node?.title || ''} className=\"l:hidden specs-item-product-title\" />}\n <div\n className={`col-span-2 grid flex-1 pb-4 l-tablet:w-full l-tablet:gap-4 laptop:gap-8 desktop:gap-12 desktop:p-6 lg-desktop:gap-16 grid-cols-${isShowMax ? 3 : 2} pr-0 specs-item-product-body`}\n >\n {Object.keys(active)?.map((item: string, index: number) => {\n const currentData = active?.[item]\n const currentProduct = buildData?.products?.find?.((item: any) => item?.handle === currentData?.handle)\n return <div key={item}>{skuNode({ ...currentProduct, sku: currentData?.sku, item: item }, index)}</div>\n })}\n </div>\n </div>\n {subTitle?.length ? productNode(subTitle) : null}\n </>\n )\n }\n return productNode(subTitle)\n }\n\n useImperativeHandle(ref, () => innerRef.current as HTMLDivElement)\n\n useEffect(() => {\n if (!buildData?.products?.length) return\n const skus = DefaultSelectMenu?.sku?.split?.(',') || []\n let currentActive = {}\n skus?.forEach?.((sku: string, index: number) => {\n const findData = buildData?.products?.find?.((item: any) => {\n const findSku = item?.variants?.find?.((v: any) => v?.sku === sku)\n if (findSku) return true\n })\n if (findData) {\n currentActive = {\n ...currentActive,\n [index]: {\n sku: sku,\n name: findData?.name || findData?.title,\n handle: findData?.handle,\n },\n }\n }\n })\n setActive(currentActive)\n setIsShowMax(skus?.length > 2)\n }, [buildData])\n\n useEffect(() => {\n if (isMobile) {\n const currentActive = Object.keys(active || {})\n if (currentActive?.length > 2) {\n const newActive = currentActive?.slice?.(0, 2)\n let newShowActive = {}\n newActive?.forEach?.((item: string) => {\n newShowActive = { ...newShowActive, [item]: active?.[item] }\n })\n setIsShowMax(false)\n setActive(newShowActive)\n }\n }\n }, [isMobile])\n\n return (\n <div className=\"w-full overflow-hidden bg-[#F5F5F7] specs-wrapper\" ref={innerRef}>\n {LeftMenu?.data ? (\n <div className=\"box-border w-full overflow-hidden specs-wrapper-content\">\n {LeftMenu?.data?.map?.((item: any, index: number) => {\n return (\n <div key={index} className=\"w-full overflow-hidden pt-10 [&:first-child]:pt-0 specs-wrapper-content-item\">\n {childrenNode(item)}\n </div>\n )\n })}\n </div>\n ) : null}\n </div>\n )\n})\n\nSpecs.displayName = 'Specs'\n\nexport default withLayout(Specs)\n"],
|
|
5
|
+
"mappings": "aAyDU,OA8IF,YAAAA,EA7II,OAAAC,EADF,QAAAC,MAAA,oBAvDV,OAAOC,MAAc,aACrB,OAAS,kBAAAC,MAAsB,2BAC/B,OAAS,iBAAAC,MAAqB,mBAC9B,OAAS,WAAAC,EAAS,YAAAC,EAAU,aAAAC,MAAiB,QAC7C,OAAS,cAAAC,MAAkB,yBAC3B,OAAS,sBAAAC,MAA0B,kCACnC,OAAS,WAAAC,EAAS,QAAAC,EAAM,UAAAC,EAAmB,WAAAC,MAAe,4BAC1D,OAAOC,GAAS,uBAAAC,EAAqB,UAAAC,MAAc,QAEnD,MAAMC,EAAQH,EAAM,WAAgC,CAACI,EAAWC,IAAQ,CACtE,KAAM,CAAE,KAAAC,EAAM,UAAAC,EAAW,SAAAC,E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AM,MAAM,CAACU,EAAWF,IAE/BzC,EAAC,OAAgB,UAAU,+EACxB,SAAAyD,EAAad,CAAI,GADVF,CAEV,CAEH,EACH,EACE,KACN,CAEJ,CAAC,EAEDxB,EAAM,YAAc,QAEpB,IAAOmD,GAAQ5D,EAAWS,CAAK",
|
|
6
|
+
"names": ["Fragment", "jsx", "jsxs", "DropDown", "useAiuiContext", "useMediaQuery", "useMemo", "useState", "useEffect", "withLayout", "formatVariantPrice", "Picture", "Text", "Button", "Heading", "React", "useImperativeHandle", "useRef", "Specs", "page", "ref", "data", "buildData", "onChange", "onSecondaryChange", "isMobile", "active", "setActive", "isShowMax", "setIsShowMax", "visibleActive", "setVisibleActive", "innerRef", "locale", "LeftMenu", "RightMenu", "DefaultSelectMenu", "isImageUrl", "urlPath", "path", "skuNode", "product", "index", "findCurrentData", "item", "findSku", "coupon", "price", "basePrice", "buttonTextValue", "normalNode", "v", "productNode", "st", "idx", "isFirstParameter", "currentData", "currentMenus", "childrenNode", "node", "subTitle", "isProduct", "currentProduct", "skus", "currentActive", "sku", "findData", "newActive", "newShowActive", "Specs_default"]
|
|
7
7
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use client";import{jsx as r,jsxs as t}from"react/jsx-runtime";import{withLayout as
|
|
1
|
+
"use client";import{jsx as r,jsxs as t}from"react/jsx-runtime";import{withLayout as b}from"../../shared/Styles.js";import*as i from"../../components/tabs.js";import{cn as n}from"../../helpers/index.js";import u from"react";import d from"../ShelfDisplay/index.js";import y from"../AccordionCards/index.js";import k from"../Faq/index.js";import N from"../MultiLayoutGraphicBlock/MultiLayoutGraphicBlock.js";import h from"../Title/index.js";import g from"../Graphic/index.js";const v=u.forwardRef(({data:o,className:m},l)=>{const{theme:p,shape:c,align:T,tabs:e=[],sectionTitle:s}=o,f=a=>a?.blockType==="ipc-shelfdisplay"?r(d,{data:a}):a?.blockType==="ipc-multiLayoutGraphicBlock"?r(N,{data:a}):a?.blockType==="ipc-accordioncards"?r(y,{data:a}):a?.blockType==="ipc-faq"?r(k,{data:a}):a?.blockType==="ipc-graphic"?r(g,{data:a}):null;return t("section",{ref:l,className:n(p==="dark"?"aiui-dark":"",m),children:[s&&r(h,{className:"section-title",data:{title:s}}),t(i.Tabs,{shape:c,align:T,defaultValue:e?.[0]?.id||e?.[0]?.tabName,children:[r(i.TabsList,{className:"tabs-list",children:(Array.isArray(e)?e:[])?.map(a=>r(i.TabsTrigger,{value:a.id||a.tabName,className:"tabs-trigger",children:a.tabName},a.id||a.tabName))}),(Array.isArray(e)?e:[])?.map(a=>r(i.TabsContent,{value:a.tabName,className:"tabs-content mt-[24px]",children:a.tabContent?.[0]?f(a.tabContent?.[0]):null},a.tabName))]})]})});var R=b(v);export{R as default};
|
|
2
2
|
//# sourceMappingURL=Tabs.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/biz-components/Tabs/Tabs.tsx"],
|
|
4
|
-
"sourcesContent": ["'use client'\nimport { withLayout } from '../../shared/Styles.js'\nimport * as TabsPrimitive from '../../components/tabs.js'\nimport { cn } from '../../helpers/index.js'\nimport type { TabsProps } from './types.js'\nimport React from 'react'\nimport ShelfDisplay from '../ShelfDisplay/index.js'\nimport AccordionCards from '../AccordionCards/index.js'\nimport Faq from '../Faq/index.js'\nimport MultiLayoutGraphicBlock from '../MultiLayoutGraphicBlock/MultiLayoutGraphicBlock.js'\nimport Title from '../Title/index.js'\nimport Graphic from '../Graphic/index.js'\n\nconst Tabs = React.forwardRef<HTMLDivElement, TabsProps>(({ data, className }, forwardedRef) => {\n const { theme, shape, align, tabs = [], sectionTitle } = data\n\n const renderTabContent = (tabContent: TabsProps['data']['tabs'][number]['tabContent'][number]) => {\n if (tabContent?.blockType === 'ipc-shelfdisplay') {\n return <ShelfDisplay data={tabContent} />\n } else if (tabContent?.blockType === 'ipc-multiLayoutGraphicBlock') {\n return <MultiLayoutGraphicBlock data={tabContent} />\n } else if (tabContent?.blockType === 'ipc-accordioncards') {\n return <AccordionCards data={tabContent} />\n } else if (tabContent?.blockType === 'ipc-faq') {\n return <Faq data={tabContent} />\n } else if (tabContent?.blockType === 'ipc-graphic') {\n return <Graphic data={tabContent} />\n } else {\n return null\n }\n }\n\n return (\n <section ref={forwardedRef} className={cn(theme === 'dark' ? 'aiui-dark' : '', className)}>\n {sectionTitle && <Title className=\"section-title\" data={{ title: sectionTitle }} />}\n <TabsPrimitive.Tabs shape={shape} align={align} defaultValue={tabs?.[0]?.id || tabs?.[0]?.tabName}>\n <TabsPrimitive.TabsList className=\"tabs-list\">\n {(Array.isArray(tabs) ? tabs : [])?.map(tab => (\n <TabsPrimitive.TabsTrigger\n key={tab.id || tab.tabName}\n value={tab.id || tab.tabName}\n className=\"tabs-trigger\"\n >\n {tab.tabName}\n </TabsPrimitive.TabsTrigger>\n ))}\n </TabsPrimitive.TabsList>\n {(Array.isArray(tabs)
|
|
5
|
-
"mappings": "aAkBa,cAAAA,EAiBP,QAAAC,MAjBO,oBAjBb,OAAS,cAAAC,MAAkB,yBAC3B,UAAYC,MAAmB,2BAC/B,OAAS,MAAAC,MAAU,yBAEnB,OAAOC,MAAW,QAClB,OAAOC,MAAkB,2BACzB,OAAOC,MAAoB,6BAC3B,OAAOC,MAAS,kBAChB,OAAOC,MAA6B,wDACpC,OAAOC,MAAW,oBAClB,OAAOC,MAAa,sBAEpB,MAAMC,EAAOP,EAAM,WAAsC,CAAC,CAAE,KAAAQ,EAAM,UAAAC,CAAU,EAAGC,IAAiB,CAC9F,KAAM,CAAE,MAAAC,EAAO,MAAAC,EAAO,MAAAC,EAAO,KAAAC,EAAO,CAAC,EAAG,aAAAC,CAAa,EAAIP,EAEnDQ,EAAoBC,GACpBA,GAAY,YAAc,mBACrBtB,EAACM,EAAA,CAAa,KAAMgB,EAAY,EAC9BA,GAAY,YAAc,8BAC5BtB,EAACS,EAAA,CAAwB,KAAMa,EAAY,EACzCA,GAAY,YAAc,qBAC5BtB,EAACO,EAAA,CAAe,KAAMe,EAAY,EAChCA,GAAY,YAAc,UAC5BtB,EAACQ,EAAA,CAAI,KAAMc,EAAY,EACrBA,GAAY,YAAc,cAC5BtB,EAACW,EAAA,CAAQ,KAAMW,EAAY,EAE3B,KAIX,OACErB,EAAC,WAAQ,IAAKc,EAAc,UAAWX,EAAGY,IAAU,OAAS,YAAc,GAAIF,CAAS,EACrF,UAAAM,GAAgBpB,EAACU,EAAA,CAAM,UAAU,gBAAgB,KAAM,CAAE,MAAOU,CAAa,EAAG,EACjFnB,EAACE,EAAc,KAAd,CAAmB,MAAOc,EAAO,MAAOC,EAAO,aAAcC,IAAO,CAAC,GAAG,IAAMA,IAAO,CAAC,GAAG,QACxF,UAAAnB,EAACG,EAAc,SAAd,CAAuB,UAAU,YAC9B,gBAAM,QAAQgB,CAAI,EAAIA,EAAO,CAAC,IAAI,IAAII,GACtCvB,EAACG,EAAc,YAAd,CAEC,MAAOoB,EAAI,IAAMA,EAAI,QACrB,UAAU,eAET,SAAAA,EAAI,SAJAA,EAAI,IAAMA,EAAI,OAKrB,CACD,EACH,GACE,MAAM,QAAQJ,CAAI,
|
|
4
|
+
"sourcesContent": ["'use client'\nimport { withLayout } from '../../shared/Styles.js'\nimport * as TabsPrimitive from '../../components/tabs.js'\nimport { cn } from '../../helpers/index.js'\nimport type { TabsProps } from './types.js'\nimport React from 'react'\nimport ShelfDisplay from '../ShelfDisplay/index.js'\nimport AccordionCards from '../AccordionCards/index.js'\nimport Faq from '../Faq/index.js'\nimport MultiLayoutGraphicBlock from '../MultiLayoutGraphicBlock/MultiLayoutGraphicBlock.js'\nimport Title from '../Title/index.js'\nimport Graphic from '../Graphic/index.js'\n\nconst Tabs = React.forwardRef<HTMLDivElement, TabsProps>(({ data, className }, forwardedRef) => {\n const { theme, shape, align, tabs = [], sectionTitle } = data\n\n const renderTabContent = (tabContent: TabsProps['data']['tabs'][number]['tabContent'][number]) => {\n if (tabContent?.blockType === 'ipc-shelfdisplay') {\n return <ShelfDisplay data={tabContent} />\n } else if (tabContent?.blockType === 'ipc-multiLayoutGraphicBlock') {\n return <MultiLayoutGraphicBlock data={tabContent} />\n } else if (tabContent?.blockType === 'ipc-accordioncards') {\n return <AccordionCards data={tabContent} />\n } else if (tabContent?.blockType === 'ipc-faq') {\n return <Faq data={tabContent} />\n } else if (tabContent?.blockType === 'ipc-graphic') {\n return <Graphic data={tabContent} />\n } else {\n return null\n }\n }\n\n return (\n <section ref={forwardedRef} className={cn(theme === 'dark' ? 'aiui-dark' : '', className)}>\n {sectionTitle && <Title className=\"section-title\" data={{ title: sectionTitle }} />}\n <TabsPrimitive.Tabs shape={shape} align={align} defaultValue={tabs?.[0]?.id || tabs?.[0]?.tabName}>\n <TabsPrimitive.TabsList className=\"tabs-list\">\n {(Array.isArray(tabs) ? tabs : [])?.map(tab => (\n <TabsPrimitive.TabsTrigger\n key={tab.id || tab.tabName}\n value={tab.id || tab.tabName}\n className=\"tabs-trigger\"\n >\n {tab.tabName}\n </TabsPrimitive.TabsTrigger>\n ))}\n </TabsPrimitive.TabsList>\n {(Array.isArray(tabs)\n ? tabs\n : [])?.map((tab: any) => (\n <TabsPrimitive.TabsContent key={tab.tabName} value={tab.tabName} className=\"tabs-content mt-[24px]\">\n {tab.tabContent?.[0] ? renderTabContent(tab.tabContent?.[0]) : null}\n </TabsPrimitive.TabsContent>\n ))}\n </TabsPrimitive.Tabs>\n </section>\n )\n})\n\nexport default withLayout(Tabs)\n"],
|
|
5
|
+
"mappings": "aAkBa,cAAAA,EAiBP,QAAAC,MAjBO,oBAjBb,OAAS,cAAAC,MAAkB,yBAC3B,UAAYC,MAAmB,2BAC/B,OAAS,MAAAC,MAAU,yBAEnB,OAAOC,MAAW,QAClB,OAAOC,MAAkB,2BACzB,OAAOC,MAAoB,6BAC3B,OAAOC,MAAS,kBAChB,OAAOC,MAA6B,wDACpC,OAAOC,MAAW,oBAClB,OAAOC,MAAa,sBAEpB,MAAMC,EAAOP,EAAM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EpC,CACD,GACP,GACF,CAEJ,CAAC,EAED,IAAOC,EAAQtB,EAAWU,CAAI",
|
|
6
6
|
"names": ["jsx", "jsxs", "withLayout", "TabsPrimitive", "cn", "React", "ShelfDisplay", "AccordionCards", "Faq", "MultiLayoutGraphicBlock", "Title", "Graphic", "Tabs", "data", "className", "forwardedRef", "theme", "shape", "align", "tabs", "sectionTitle", "renderTabContent", "tabContent", "tab", "Tabs_default"]
|
|
7
7
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use client";import{jsx as e,jsxs as L}from"react/jsx-runtime";import O,{useEffect as _,useRef as o,useImperativeHandle as q}from"react";import{gsap as f}from"gsap";import{SplitText as x}from"gsap/dist/SplitText";import{ScrollTrigger as T}from"gsap/dist/ScrollTrigger";import{cn as k}from"../../helpers/utils.js";import{Heading as A}from"../../components/index.js";import{withLayout as G}from"../../shared/Styles.js";import{trackUrlRef as J}from"../../shared/trackUrlRef.js";import{useInView as K}from"react-intersection-observer";const b="link",y="title",R=O.forwardRef(({data:N,className:H,as:M="h2",weight:E="bold"},$)=>{const{title:s,caption:l,theme:
|
|
1
|
+
"use client";import{jsx as e,jsxs as L}from"react/jsx-runtime";import O,{useEffect as _,useRef as o,useImperativeHandle as q}from"react";import{gsap as f}from"gsap";import{SplitText as x}from"gsap/dist/SplitText";import{ScrollTrigger as T}from"gsap/dist/ScrollTrigger";import{cn as k}from"../../helpers/utils.js";import{Heading as A}from"../../components/index.js";import{withLayout as G}from"../../shared/Styles.js";import{trackUrlRef as J}from"../../shared/trackUrlRef.js";import{useInView as K}from"react-intersection-observer";const b="link",y="title",R=O.forwardRef(({data:N,className:H,as:M="h2",weight:E="bold"},$)=>{const{title:s,caption:l,theme:u,extensions:i,align:a="left"}=N,p=o(null),r=o(null),t=o(null),n=o(null),{ref:D,inView:h}=K();return q($,()=>p.current),_(()=>{f.registerPlugin(x,T);function z(){if(!r.current)return;const P=r.current?.clientHeight||80;t.current&&t.current.revert(),n.current&&n.current.kill(),t.current=new x(r.current,{type:"words",wordsClass:"word"});const c=t.current.words;f.set(c,{opacity:0}),n.current=T.create({trigger:r.current,start:"bottom bottom-=4%",end:`bottom+=${P*1.5+60}px bottom-=4%`,scrub:!0,invalidateOnRefresh:!0,onUpdate:S=>{const I=S.progress,g=c.length||1,V=.5,m=1/g,w=m*(1-V),v=(g-1)*w+m,B=Math.min(1,v>0?I/v:0);c.forEach((U,j)=>{const C=j*w,F=m;let d=(B-C)/F;d=Math.max(0,Math.min(1,d)),f.set(U,{opacity:d})})}})}return h&&z(),()=>{t.current&&t.current.revert(),n.current&&n.current.kill()}},[h]),(s||l)&&L("div",{id:i?.id,className:"titleBottom mb-6 flex items-end justify-between overflow-hidden title-box",ref:p,children:[e("div",{ref:D,className:k("space-y-4 flex-1",H,{"aiui-dark":u==="dark","text-center":a==="center","text-right":a==="right","text-left":a==="left"}),children:e(A,{ref:r,as:M,size:4,html:l||s,weight:E})}),i?.textLink&&L("a",{className:k({"aiui-dark":u==="dark"},"flex items-center text-base font-[700] leading-[1.4] text-[#777] overflow-hidden transition-all duration-[0.4s] hover:text-[#1D1D1F]"),href:J(i?.link,`${b}_${y}`),"data-headless-type-name":`${b}#${y}`,"data-headless-title-desc-button":`${s}#${l}`,children:[e("div",{className:"flex-1 truncate whitespace-nowrap",children:i?.textLink}),e("div",{className:"size-6",children:e("svg",{width:"24",height:"24",className:"mb-[3px]",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",children:e("path",{className:"transition-all duration-[0.4s]",d:"M10.5 8L14.5 12L10.5 16",stroke:"#777","stroke-width":"1.5","stroke-linecap":"round"})})})]})]})});R.displayName="Title";var it=G(R);export{it as default};
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/biz-components/Title/index.tsx"],
|
|
4
|
-
"sourcesContent": ["'use client'\nimport React, { useEffect, useRef, useImperativeHandle } from 'react'\nimport { gsap } from 'gsap'\nimport { SplitText } from 'gsap/dist/SplitText'\nimport { ScrollTrigger } from 'gsap/dist/ScrollTrigger'\nimport { cn } from '../../helpers/utils.js'\nimport { Heading } from '../../components/index.js'\nimport { withLayout } from '../../shared/Styles.js'\nimport type { TitleProps } from './types.js'\nimport { trackUrlRef } from '../../shared/trackUrlRef.js'\nimport { useInView } from 'react-intersection-observer'\n\nconst componentType = 'link'\nconst componentName = 'title'\n\nconst Title = React.forwardRef<HTMLDivElement, TitleProps>(({ data, className, as = 'h2', weight = 'bold' }, ref) => {\n const { title, caption, theme, extensions, align = 'left' } = data\n const innerRef = useRef<HTMLDivElement>(null)\n const titleRef = useRef<HTMLHeadingElement>(null)\n const splitTextInstance = useRef<SplitText | null>(null)\n const scrollTriggerRef = useRef<ScrollTrigger | null>(null)\n\n const { ref: inViewRef, inView } = useInView()\n\n useImperativeHandle(ref, () => innerRef.current as HTMLDivElement)\n\n useEffect(() => {\n gsap.registerPlugin(SplitText, ScrollTrigger)\n function gsapResize() {\n if (!titleRef.current) return\n const height = titleRef.current?.clientHeight || 80\n if (splitTextInstance.current) {\n splitTextInstance.current.revert()\n }\n if (scrollTriggerRef.current) {\n scrollTriggerRef.current.kill()\n }\n splitTextInstance.current = new SplitText(titleRef.current, {\n type: 'words',\n wordsClass: 'word',\n })\n const words = splitTextInstance.current.words\n gsap.set(words, { opacity: 0 })\n scrollTriggerRef.current = ScrollTrigger.create({\n trigger: titleRef.current,\n start: 'bottom bottom-=4%',\n end: `bottom+=${height * 1.5 + 60}px bottom-=4%`,\n scrub: true,\n invalidateOnRefresh: true,\n onUpdate: (self: any) => {\n const progress = self.progress\n const total = words.length || 1\n const overlap = 0.5\n const interval = 1 / total\n const step = interval * (1 - overlap)\n const lastEnd = (total - 1) * step + interval\n const normalizedProgress = Math.min(1, lastEnd > 0 ? progress / lastEnd : 0)\n words.forEach((word: any, i: number) => {\n const start = i * step\n const width = interval\n let opacity = (normalizedProgress - start) / width\n opacity = Math.max(0, Math.min(1, opacity))\n gsap.set(word, { opacity })\n })\n },\n })\n }\n\n if (inView) {\n gsapResize()\n }\n\n return () => {\n splitTextInstance.current && splitTextInstance.current.revert()\n // ScrollTrigger.getAll().forEach((t: { kill: () => any }) => t.kill())\n scrollTriggerRef.current && scrollTriggerRef.current.kill()\n }\n }, [inView])\n\n return (\n (title || caption) && (\n <div\n id={extensions?.id}\n className=\"titleBottom mb-6 flex
|
|
5
|
-
"mappings": "aA+FU,cAAAA,EAGA,QAAAC,MAHA,oBA9FV,OAAOC,GAAS,aAAAC,EAAW,UAAAC,EAAQ,uBAAAC,MAA2B,QAC9D,OAAS,QAAAC,MAAY,OACrB,OAAS,aAAAC,MAAiB,sBAC1B,OAAS,iBAAAC,MAAqB,0BAC9B,OAAS,MAAAC,MAAU,yBACnB,OAAS,WAAAC,MAAe,4BACxB,OAAS,cAAAC,MAAkB,yBAE3B,OAAS,eAAAC,MAAmB,8BAC5B,OAAS,aAAAC,MAAiB,8BAE1B,MAAMC,EAAgB,OAChBC,EAAgB,QAEhBC,EAAQd,EAAM,WAAuC,CAAC,CAAE,KAAAe,EAAM,UAAAC,EAAW,GAAAC,EAAK,KAAM,OAAAC,EAAS,MAAO,EAAGC,IAAQ,CACnH,KAAM,CAAE,MAAAC,EAAO,QAAAC,EAAS,MAAAC,EAAO,WAAAC,EAAY,MAAAC,EAAQ,MAAO,EAAIT,EACxDU,EAAWvB,EAAuB,IAAI,EACtCwB,EAAWxB,EAA2B,IAAI,EAC1CyB,EAAoBzB,EAAyB,IAAI,EACjD0B,EAAmB1B,EAA6B,IAAI,EAEpD,CAAE,IAAK2B,EAAW,OAAAC,CAAO,EAAInB,EAAU,EAE7C,OAAAR,EAAoBgB,EAAK,IAAMM,EAAS,OAAyB,EAEjExB,EAAU,IAAM,CACdG,EAAK,eAAeC,EAAWC,CAAa,EAC5C,SAASyB,GAAa,CACpB,GAAI,CAACL,EAAS,QAAS,OACvB,MAAMM,EAASN,EAAS,SAAS,cAAgB,GAC7CC,EAAkB,SACpBA,EAAkB,QAAQ,OAAO,EAE/BC,EAAiB,SACnBA,EAAiB,QAAQ,KAAK,EAEhCD,EAAkB,QAAU,IAAItB,EAAUqB,EAAS,QAAS,CAC1D,KAAM,QACN,WAAY,MACd,CAAC,EACD,MAAMO,EAAQN,EAAkB,QAAQ,MACxCvB,EAAK,IAAI6B,EAAO,CAAE,QAAS,CAAE,CAAC,EAC9BL,EAAiB,QAAUtB,EAAc,OAAO,CAC9C,QAASoB,EAAS,QAClB,MAAO,oBACP,IAAK,WAAWM,EAAS,IAAM,EAAE,gBACjC,MAAO,GACP,oBAAqB,GACrB,SAAWE,GAAc,CACvB,MAAMC,EAAWD,EAAK,SAChBE,EAAQH,EAAM,QAAU,EACxBI,EAAU,GACVC,EAAW,EAAIF,EACfG,EAAOD,GAAY,EAAID,GACvBG,GAAWJ,EAAQ,GAAKG,EAAOD,EAC/BG,EAAqB,KAAK,IAAI,EAAGD,EAAU,EAAIL,EAAWK,EAAU,CAAC,EAC3EP,EAAM,QAAQ,CAACS,EAAWC,IAAc,CACtC,MAAMC,EAAQD,EAAIJ,EACZM,EAAQP,EACd,IAAIQ,GAAWL,EAAqBG,GAASC,EAC7CC,EAAU,KAAK,IAAI,EAAG,KAAK,IAAI,EAAGA,CAAO,CAAC,EAC1C1C,EAAK,IAAIsC,EAAM,CAAE,QAAAI,CAAQ,CAAC,CAC5B,CAAC,CACH,CACF,CAAC,CACH,CAEA,OAAIhB,GACFC,EAAW,EAGN,IAAM,CACXJ,EAAkB,SAAWA,EAAkB,QAAQ,OAAO,EAE9DC,EAAiB,SAAWA,EAAiB,QAAQ,KAAK,CAC5D,CACF,EAAG,CAACE,CAAM,CAAC,GAGRV,GAASC,IACRtB,EAAC,OACC,GAAIwB,GAAY,GAChB,UAAU,
|
|
4
|
+
"sourcesContent": ["'use client'\nimport React, { useEffect, useRef, useImperativeHandle } from 'react'\nimport { gsap } from 'gsap'\nimport { SplitText } from 'gsap/dist/SplitText'\nimport { ScrollTrigger } from 'gsap/dist/ScrollTrigger'\nimport { cn } from '../../helpers/utils.js'\nimport { Heading } from '../../components/index.js'\nimport { withLayout } from '../../shared/Styles.js'\nimport type { TitleProps } from './types.js'\nimport { trackUrlRef } from '../../shared/trackUrlRef.js'\nimport { useInView } from 'react-intersection-observer'\n\nconst componentType = 'link'\nconst componentName = 'title'\n\nconst Title = React.forwardRef<HTMLDivElement, TitleProps>(({ data, className, as = 'h2', weight = 'bold' }, ref) => {\n const { title, caption, theme, extensions, align = 'left' } = data\n const innerRef = useRef<HTMLDivElement>(null)\n const titleRef = useRef<HTMLHeadingElement>(null)\n const splitTextInstance = useRef<SplitText | null>(null)\n const scrollTriggerRef = useRef<ScrollTrigger | null>(null)\n\n const { ref: inViewRef, inView } = useInView()\n\n useImperativeHandle(ref, () => innerRef.current as HTMLDivElement)\n\n useEffect(() => {\n gsap.registerPlugin(SplitText, ScrollTrigger)\n function gsapResize() {\n if (!titleRef.current) return\n const height = titleRef.current?.clientHeight || 80\n if (splitTextInstance.current) {\n splitTextInstance.current.revert()\n }\n if (scrollTriggerRef.current) {\n scrollTriggerRef.current.kill()\n }\n splitTextInstance.current = new SplitText(titleRef.current, {\n type: 'words',\n wordsClass: 'word',\n })\n const words = splitTextInstance.current.words\n gsap.set(words, { opacity: 0 })\n scrollTriggerRef.current = ScrollTrigger.create({\n trigger: titleRef.current,\n start: 'bottom bottom-=4%',\n end: `bottom+=${height * 1.5 + 60}px bottom-=4%`,\n scrub: true,\n invalidateOnRefresh: true,\n onUpdate: (self: any) => {\n const progress = self.progress\n const total = words.length || 1\n const overlap = 0.5\n const interval = 1 / total\n const step = interval * (1 - overlap)\n const lastEnd = (total - 1) * step + interval\n const normalizedProgress = Math.min(1, lastEnd > 0 ? progress / lastEnd : 0)\n words.forEach((word: any, i: number) => {\n const start = i * step\n const width = interval\n let opacity = (normalizedProgress - start) / width\n opacity = Math.max(0, Math.min(1, opacity))\n gsap.set(word, { opacity })\n })\n },\n })\n }\n\n if (inView) {\n gsapResize()\n }\n\n return () => {\n splitTextInstance.current && splitTextInstance.current.revert()\n // ScrollTrigger.getAll().forEach((t: { kill: () => any }) => t.kill())\n scrollTriggerRef.current && scrollTriggerRef.current.kill()\n }\n }, [inView])\n\n return (\n (title || caption) && (\n <div\n id={extensions?.id}\n className=\"titleBottom mb-6 flex items-end justify-between overflow-hidden title-box\"\n ref={innerRef}\n >\n <div\n ref={inViewRef}\n className={cn('space-y-4 flex-1', className, {\n 'aiui-dark': theme === 'dark',\n 'text-center': align === 'center',\n 'text-right': align === 'right',\n 'text-left': align === 'left',\n })}\n >\n <Heading ref={titleRef} as={as} size={4} html={caption || title} weight={weight} />\n </div>\n {extensions?.textLink && (\n <a\n className={cn(\n { 'aiui-dark': theme === 'dark' },\n 'flex items-center text-base font-[700] leading-[1.4] text-[#777] overflow-hidden transition-all duration-[0.4s] hover:text-[#1D1D1F]'\n )}\n href={trackUrlRef(extensions?.link, `${componentType}_${componentName}`)}\n data-headless-type-name={`${componentType}#${componentName}`}\n data-headless-title-desc-button={`${title}#${caption}`}\n >\n <div className=\"flex-1 truncate whitespace-nowrap\">{extensions?.textLink}</div>\n <div className=\"size-6\">\n <svg\n width=\"24\"\n height=\"24\"\n className=\"mb-[3px]\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n >\n <path\n className=\"transition-all duration-[0.4s]\"\n d=\"M10.5 8L14.5 12L10.5 16\"\n stroke=\"#777\"\n stroke-width=\"1.5\"\n stroke-linecap=\"round\"\n ></path>\n </svg>\n </div>\n </a>\n )}\n </div>\n )\n )\n})\n\nTitle.displayName = 'Title'\n\nexport default withLayout(Title)\n"],
|
|
5
|
+
"mappings": "aA+FU,cAAAA,EAGA,QAAAC,MAHA,oBA9FV,OAAOC,GAAS,aAAAC,EAAW,UAAAC,EAAQ,uBAAAC,MAA2B,QAC9D,OAAS,QAAAC,MAAY,OACrB,OAAS,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UAAU,oCAAqC,SAAAyB,GAAY,SAAS,EACzEzB,EAAC,OAAI,UAAU,SACb,SAAAA,EAAC,OACC,MAAM,KACN,OAAO,KACP,UAAU,WACV,MAAM,6BACN,QAAQ,YACR,KAAK,OAEL,SAAAA,EAAC,QACC,UAAU,iCACV,EAAE,0BACF,OAAO,OACP,eAAa,MACb,iBAAe,QAChB,EACH,EACF,GACF,GAEJ,CAGN,CAAC,EAEDgB,EAAM,YAAc,QAEpB,IAAOiC,GAAQtC,EAAWK,CAAK",
|
|
6
6
|
"names": ["jsx", "jsxs", "React", "useEffect", "useRef", "useImperativeHandle", "gsap", "SplitText", "ScrollTrigger", "cn", "Heading", "withLayout", "trackUrlRef", "useInView", "componentType", "componentName", "Title", "data", "className", "as", "weight", "ref", "title", "caption", "theme", "extensions", "align", "innerRef", "titleRef", "splitTextInstance", "scrollTriggerRef", "inViewRef", "inView", "gsapResize", "height", "words", "self", "progress", "total", "overlap", "interval", "step", "lastEnd", "normalizedProgress", "word", "i", "start", "width", "opacity", "Title_default"]
|
|
7
7
|
}
|
|
@@ -32,6 +32,62 @@ export { default as CreativeModule } from './CreativeModule/index.js';
|
|
|
32
32
|
export { default as GraphicOverlay } from './GraphicOverlay/index.js';
|
|
33
33
|
export { default as Specs } from './Specs/index.js';
|
|
34
34
|
export { default as TabGroup } from './TabsGroup/index.js';
|
|
35
|
+
export { default as Listing } from './Listing/index.js';
|
|
36
|
+
export { default as BizProductProvider } from './Listing/BizProductProvider.js';
|
|
37
|
+
export { default as PurchaseBar } from './Listing/components/PurchaseBar/index.js';
|
|
38
|
+
export { default as ProductActions } from './Listing/components/PurchaseBar/ProductActions/index.js';
|
|
39
|
+
export { default as ProductCard } from './Listing/components/ProductCard/index.js';
|
|
40
|
+
export { default as ProductBenefitsTabs } from './Listing/components/ProductCard/ProductDetail/ProductBenefitsTabs/index.js';
|
|
41
|
+
export { default as ProductHighlight } from './Listing/components/ProductCard/ProductDetail/ProductHighlight/index.js';
|
|
42
|
+
export { default as ProductFreeGift } from './Listing/components/ProductCard/ProductDetail/ProductFreeGift/index.js';
|
|
43
|
+
export { default as ProductExchangePurchase } from './Listing/components/ProductCard/ProductDetail/ProductExchangePurchase/index.js';
|
|
44
|
+
export { default as ProductOptions } from './Listing/components/ProductCard/ProductDetail/ProductOptions/index.js';
|
|
45
|
+
export { default as ProductBundle } from './Listing/components/ProductCard/ProductDetail/ProductBundle/index.js';
|
|
46
|
+
export { default as ProductGridBox } from './Listing/components/ProductCard/ProductGridBox.js';
|
|
47
|
+
export { default as ProductGallery } from './Listing/components/ProductCard/ProductGallery/index.js';
|
|
48
|
+
export { default as ProductDetail } from './Listing/components/ProductCard/ProductDetail/index.js';
|
|
49
|
+
export { default as ProductSummary } from './Listing/components/ProductCard/ProductSummary/index.js';
|
|
50
|
+
export { default as BenefitsTab } from './Listing/components/ProductCard/ProductDetail/BenefitsTab';
|
|
51
|
+
export { default as PaidShipping } from './Listing/components/PaidShipping/index.js';
|
|
52
|
+
export { default as GraphicMore } from './GraphicMore/index.js';
|
|
35
53
|
export { default as Features } from './Features/index.js';
|
|
54
|
+
export { default as AplusDesc } from './AplusDesc/index.js';
|
|
55
|
+
export { default as GiftBox } from './GiftBox/index.js';
|
|
56
|
+
export { default as SelectStore } from './SelectStore/index.js';
|
|
57
|
+
export { default as DownLoad } from './DownLoad/index.js';
|
|
36
58
|
export { default as FootCharger } from './FootCharger/index.js';
|
|
37
|
-
export
|
|
59
|
+
export declare const PAYLOAD_COMPONENT_MAP: {
|
|
60
|
+
'ipc-aplusdesc': string;
|
|
61
|
+
'ipc-banner': string;
|
|
62
|
+
'ipc-brand-equity': string;
|
|
63
|
+
'ipc-category': string;
|
|
64
|
+
'ipc-collection-banner': string;
|
|
65
|
+
'ipc-collection-shelves': string;
|
|
66
|
+
'ipc-creativemodule': string;
|
|
67
|
+
'ipc-download': string;
|
|
68
|
+
'ipc-evaluate': string;
|
|
69
|
+
'ipc-faq': string;
|
|
70
|
+
'ipc-features': string;
|
|
71
|
+
'ipc-footcharger': string;
|
|
72
|
+
'ipc-ga-block': string;
|
|
73
|
+
'ipc-giftbox': string;
|
|
74
|
+
'ipc-graphic': string;
|
|
75
|
+
'ipc-graphicmore': string;
|
|
76
|
+
'ipc-graphicoverlay': string;
|
|
77
|
+
'ipc-marquee': string;
|
|
78
|
+
'ipc-mediaplayerbase': string;
|
|
79
|
+
'ipc-mediaplayermulti': string;
|
|
80
|
+
'ipc-mediaplayersticky': string;
|
|
81
|
+
'ipc-member-equity': string;
|
|
82
|
+
'ipc-mlg-block': string;
|
|
83
|
+
'ipc-search-page-tabs': string;
|
|
84
|
+
'ipc-selectstore': string;
|
|
85
|
+
'ipc-shelfdisplay': string;
|
|
86
|
+
'ipc-slogan': string;
|
|
87
|
+
'ipc-spacer': string;
|
|
88
|
+
'ipc-specs': string;
|
|
89
|
+
'ipc-tabs': string;
|
|
90
|
+
'ipc-text-marquee': string;
|
|
91
|
+
'ipc-title': string;
|
|
92
|
+
'ipc-whychoose': string;
|
|
93
|
+
};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{default as
|
|
1
|
+
import{default as t}from"./BrandEquity/index.js";import{default as p}from"./MemberEquity/index.js";import{default as f}from"./Slogan/index.js";import{default as c}from"./Title/index.js";import{default as s}from"./Spacer/index.js";import{default as m}from"./ShelfDisplay/index.js";import{default as n}from"./Evaluate/index.js";import{default as y}from"./Category/index.js";import{default as g}from"./HeroBanner/index.js";import{default as B}from"./AccordionCards/index.js";import{default as G}from"./Graphic/index.js";import{default as q}from"./MediaPlayerBase/index.js";import{default as v}from"./MediaPlayerSticky/index.js";import{default as A}from"./MediaPlayerMulti/index.js";import{default as E}from"./Marquee/index.js";import{default as D}from"./WhyChoose/index.js";import{default as O}from"./Faq/index.js";import{MarqueeItem as H,MarqueeImageContent as N,MarqueeTextContent as _}from"./Marquee/index.js";import{default as I}from"./MultiLayoutGraphicBlock/index.js";import{default as z}from"./GraphicAttractionBlock/index.js";import{default as Y}from"./HeaderNavigation/index.js";import{default as K}from"./FooterNavigation/index.js";import{default as U}from"./SearchPage/index.js";import{IPC_SEARCH_PAGE as X,SearchPageTabType as Z}from"./SearchPage/types.js";import{withLayout as ee}from"../shared/Styles.js";import{default as re}from"./AiuiProvider/index.js";import{default as oe}from"./Tabs/index.js";import{default as le}from"./CreativeModule/index.js";import{default as ie}from"./GraphicOverlay/index.js";import{default as ue}from"./Specs/index.js";import{default as de}from"./TabsGroup/index.js";import{default as xe}from"./Listing/index.js";import{default as he}from"./Listing/BizProductProvider.js";import{default as Pe}from"./Listing/components/PurchaseBar/index.js";import{default as Me}from"./Listing/components/PurchaseBar/ProductActions/index.js";import{default as Se}from"./Listing/components/ProductCard/index.js";import{default as be}from"./Listing/components/ProductCard/ProductDetail/ProductBenefitsTabs/index.js";import{default as Ce}from"./Listing/components/ProductCard/ProductDetail/ProductHighlight/index.js";import{default as ke}from"./Listing/components/ProductCard/ProductDetail/ProductFreeGift/index.js";import{default as Te}from"./Listing/components/ProductCard/ProductDetail/ProductExchangePurchase/index.js";import{default as Le}from"./Listing/components/ProductCard/ProductDetail/ProductOptions/index.js";import{default as Fe}from"./Listing/components/ProductCard/ProductDetail/ProductBundle/index.js";import{default as we}from"./Listing/components/ProductCard/ProductGridBox.js";import{default as Ne}from"./Listing/components/ProductCard/ProductGallery/index.js";import{default as je}from"./Listing/components/ProductCard/ProductDetail/index.js";import{default as We}from"./Listing/components/ProductCard/ProductSummary/index.js";import{default as Re}from"./Listing/components/ProductCard/ProductDetail/BenefitsTab";import{default as Je}from"./Listing/components/PaidShipping/index.js";import{default as Qe}from"./GraphicMore/index.js";import{default as Ve}from"./Features/index.js";import{default as Ze}from"./AplusDesc/index.js";import{default as ea}from"./GiftBox/index.js";import{default as ra}from"./SelectStore/index.js";import{default as oa}from"./DownLoad/index.js";import{default as la}from"./FootCharger/index.js";const e={"ipc-aplusdesc":"AplusDesc","ipc-banner":"Banner","ipc-brand-equity":"BrandEquity","ipc-category":"Category","ipc-collection-banner":"CollectionBanner","ipc-collection-shelves":"CollectionShelves","ipc-creativemodule":"CreativeModule","ipc-download":"DownLoad","ipc-evaluate":"Evaluate","ipc-faq":"Faq","ipc-features":"Features","ipc-footcharger":"FootCharger","ipc-ga-block":"GraphicAttractionBlock","ipc-giftbox":"GiftBox","ipc-graphic":"Graphic","ipc-graphicmore":"GraphicMore","ipc-graphicoverlay":"GraphicOverlay","ipc-marquee":"Marquee","ipc-mediaplayerbase":"MediaPlayerBase","ipc-mediaplayermulti":"MediaPlayerMulti","ipc-mediaplayersticky":"MediaPlayerSticky","ipc-member-equity":"MemberEquity","ipc-mlg-block":"MultiLayoutGraphicBlock","ipc-search-page-tabs":"SearchPageBlock","ipc-selectstore":"SelectStore","ipc-shelfdisplay":"ShelfDisplay","ipc-slogan":"Slogan","ipc-spacer":"Spacer","ipc-specs":"Specs","ipc-tabs":"Tabs","ipc-text-marquee":"TextMarquee","ipc-title":"Title","ipc-whychoose":"WhyChoose"};export{B as AccordionCards,re as AiuiProvider,Ze as AplusDesc,Re as BenefitsTab,he as BizProductProvider,t as BrandEquity,y as Category,le as CreativeModule,oa as DownLoad,n as Evaluate,O as Faq,Ve as Features,la as FootCharger,K as FooterNavigation,ea as GiftBox,G as Graphic,z as GraphicAttractionBlock,Qe as GraphicMore,ie as GraphicOverlay,Y as HeaderNavigation,g as HeroBanner,X as IPC_SEARCH_PAGE,xe as Listing,E as Marquee,N as MarqueeImageContent,H as MarqueeItem,_ as MarqueeTextContent,q as MediaPlayerBase,A as MediaPlayerMulti,v as MediaPlayerSticky,p as MemberEquity,I as MultiLayoutGraphicBlock,e as PAYLOAD_COMPONENT_MAP,Je as PaidShipping,Me as ProductActions,be as ProductBenefitsTabs,Fe as ProductBundle,Se as ProductCard,je as ProductDetail,Te as ProductExchangePurchase,ke as ProductFreeGift,Ne as ProductGallery,we as ProductGridBox,Ce as ProductHighlight,Le as ProductOptions,We as ProductSummary,Pe as PurchaseBar,U as SearchPage,Z as SearchPageTabType,ra as SelectStore,m as ShelfDisplay,f as Slogan,s as Spacer,ue as Specs,de as TabGroup,oe as Tabs,c as Title,D as WhyChoose,ee as withLayout};
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/biz-components/index.ts"],
|
|
4
|
-
"sourcesContent": ["export { default as BrandEquity } from './BrandEquity/index.js'\nexport { default as MemberEquity } from './MemberEquity/index.js'\nexport { default as Slogan } from './Slogan/index.js'\nexport { default as Title } from './Title/index.js'\nexport { default as Spacer } from './Spacer/index.js'\nexport { default as ShelfDisplay } from './ShelfDisplay/index.js'\nexport { default as Evaluate } from './Evaluate/index.js'\nexport { default as Category } from './Category/index.js'\nexport { default as HeroBanner } from './HeroBanner/index.js'\nexport { default as AccordionCards } from './AccordionCards/index.js'\nexport { default as Graphic } from './Graphic/index.js'\nexport { default as MediaPlayerBase } from './MediaPlayerBase/index.js'\nexport { default as MediaPlayerSticky } from './MediaPlayerSticky/index.js'\nexport { default as MediaPlayerMulti } from './MediaPlayerMulti/index.js'\nexport { default as Marquee } from './Marquee/index.js'\nexport { default as WhyChoose } from './WhyChoose/index.js'\nexport { default as Faq } from './Faq/index.js'\nexport { MarqueeItem, MarqueeImageContent, MarqueeTextContent } from './Marquee/index.js'\nexport { default as MultiLayoutGraphicBlock } from './MultiLayoutGraphicBlock/index.js'\nexport type { MultiLayoutGraphicBlockProps } from './MultiLayoutGraphicBlock/index.js'\nexport { default as GraphicAttractionBlock } from './GraphicAttractionBlock/index.js'\nexport type { GraphicAttractionBlockProps } from './GraphicAttractionBlock/index.js'\nexport { default as HeaderNavigation } from './HeaderNavigation/index.js'\nexport { default as FooterNavigation } from './FooterNavigation/index.js'\nexport { default as SearchPage } from './SearchPage/index.js'\nexport type { SearchPageProps } from './SearchPage/types.js'\nexport { IPC_SEARCH_PAGE, SearchPageTabType } from './SearchPage/types.js'\n\nexport { withLayout } from '../shared/Styles.js'\nexport { default as AiuiProvider } from './AiuiProvider/index.js'\nexport { default as Tabs } from './Tabs/index.js'\nexport { default as CreativeModule } from './CreativeModule/index.js'\nexport { default as GraphicOverlay } from './GraphicOverlay/index.js'\nexport { default as Specs } from './Specs/index.js'\nexport { default as TabGroup } from './TabsGroup/index.js'\n\nexport { default as
|
|
5
|
-
"mappings": "AAAA,OAAoB,WAAXA,MAA8B,yBACvC,OAAoB,WAAXA,MAA+B,0BACxC,OAAoB,WAAXA,MAAyB,oBAClC,OAAoB,WAAXA,MAAwB,mBACjC,OAAoB,WAAXA,MAAyB,oBAClC,OAAoB,WAAXA,MAA+B,0BACxC,OAAoB,WAAXA,MAA2B,sBACpC,OAAoB,WAAXA,MAA2B,sBACpC,OAAoB,WAAXA,MAA6B,wBACtC,OAAoB,WAAXA,MAAiC,4BAC1C,OAAoB,WAAXA,MAA0B,qBACnC,OAAoB,WAAXA,MAAkC,6BAC3C,OAAoB,WAAXA,MAAoC,+BAC7C,OAAoB,WAAXA,MAAmC,8BAC5C,OAAoB,WAAXA,MAA0B,qBACnC,OAAoB,WAAXA,MAA4B,uBACrC,OAAoB,WAAXA,MAAsB,iBAC/B,OAAS,eAAAC,EAAa,uBAAAC,EAAqB,sBAAAC,MAA0B,qBACrE,OAAoB,WAAXH,MAA0C,qCAEnD,OAAoB,WAAXA,MAAyC,oCAElD,OAAoB,WAAXA,MAAmC,8BAC5C,OAAoB,WAAXA,MAAmC,8BAC5C,OAAoB,WAAXA,MAA6B,wBAEtC,OAAS,mBAAAI,EAAiB,qBAAAC,MAAyB,wBAEnD,OAAS,cAAAC,
|
|
6
|
-
"names": ["default", "MarqueeItem", "MarqueeImageContent", "MarqueeTextContent", "IPC_SEARCH_PAGE", "SearchPageTabType", "withLayout"]
|
|
4
|
+
"sourcesContent": ["export { default as BrandEquity } from './BrandEquity/index.js'\nexport { default as MemberEquity } from './MemberEquity/index.js'\nexport { default as Slogan } from './Slogan/index.js'\nexport { default as Title } from './Title/index.js'\nexport { default as Spacer } from './Spacer/index.js'\nexport { default as ShelfDisplay } from './ShelfDisplay/index.js'\nexport { default as Evaluate } from './Evaluate/index.js'\nexport { default as Category } from './Category/index.js'\nexport { default as HeroBanner } from './HeroBanner/index.js'\nexport { default as AccordionCards } from './AccordionCards/index.js'\nexport { default as Graphic } from './Graphic/index.js'\nexport { default as MediaPlayerBase } from './MediaPlayerBase/index.js'\nexport { default as MediaPlayerSticky } from './MediaPlayerSticky/index.js'\nexport { default as MediaPlayerMulti } from './MediaPlayerMulti/index.js'\nexport { default as Marquee } from './Marquee/index.js'\nexport { default as WhyChoose } from './WhyChoose/index.js'\nexport { default as Faq } from './Faq/index.js'\nexport { MarqueeItem, MarqueeImageContent, MarqueeTextContent } from './Marquee/index.js'\nexport { default as MultiLayoutGraphicBlock } from './MultiLayoutGraphicBlock/index.js'\nexport type { MultiLayoutGraphicBlockProps } from './MultiLayoutGraphicBlock/index.js'\nexport { default as GraphicAttractionBlock } from './GraphicAttractionBlock/index.js'\nexport type { GraphicAttractionBlockProps } from './GraphicAttractionBlock/index.js'\nexport { default as HeaderNavigation } from './HeaderNavigation/index.js'\nexport { default as FooterNavigation } from './FooterNavigation/index.js'\nexport { default as SearchPage } from './SearchPage/index.js'\nexport type { SearchPageProps } from './SearchPage/types.js'\nexport { IPC_SEARCH_PAGE, SearchPageTabType } from './SearchPage/types.js'\n\nexport { withLayout } from '../shared/Styles.js'\nexport { default as AiuiProvider } from './AiuiProvider/index.js'\nexport { default as Tabs } from './Tabs/index.js'\nexport { default as CreativeModule } from './CreativeModule/index.js'\nexport { default as GraphicOverlay } from './GraphicOverlay/index.js'\nexport { default as Specs } from './Specs/index.js'\nexport { default as TabGroup } from './TabsGroup/index.js'\n\nexport { default as Listing } from './Listing/index.js'\nexport { default as BizProductProvider } from './Listing/BizProductProvider.js'\nexport { default as PurchaseBar } from './Listing/components/PurchaseBar/index.js'\nexport { default as ProductActions } from './Listing/components/PurchaseBar/ProductActions/index.js'\nexport { default as ProductCard } from './Listing/components/ProductCard/index.js'\nexport { default as ProductBenefitsTabs } from './Listing/components/ProductCard/ProductDetail/ProductBenefitsTabs/index.js'\nexport { default as ProductHighlight } from './Listing/components/ProductCard/ProductDetail/ProductHighlight/index.js'\nexport { default as ProductFreeGift } from './Listing/components/ProductCard/ProductDetail/ProductFreeGift/index.js'\nexport { default as ProductExchangePurchase } from './Listing/components/ProductCard/ProductDetail/ProductExchangePurchase/index.js'\nexport { default as ProductOptions } from './Listing/components/ProductCard/ProductDetail/ProductOptions/index.js'\nexport { default as ProductBundle } from './Listing/components/ProductCard/ProductDetail/ProductBundle/index.js'\nexport { default as ProductGridBox } from './Listing/components/ProductCard/ProductGridBox.js'\nexport { default as ProductGallery } from './Listing/components/ProductCard/ProductGallery/index.js'\nexport { default as ProductDetail } from './Listing/components/ProductCard/ProductDetail/index.js'\nexport { default as ProductSummary } from './Listing/components/ProductCard/ProductSummary/index.js'\nexport { default as BenefitsTab } from './Listing/components/ProductCard/ProductDetail/BenefitsTab'\nexport { default as PaidShipping } from './Listing/components/PaidShipping/index.js'\n\nexport { default as GraphicMore } from './GraphicMore/index.js'\nexport { default as Features } from './Features/index.js'\nexport { default as AplusDesc } from './AplusDesc/index.js'\nexport { default as GiftBox } from './GiftBox/index.js'\nexport { default as SelectStore } from './SelectStore/index.js'\nexport { default as DownLoad } from './DownLoad/index.js'\nexport { default as FootCharger } from './FootCharger/index.js'\n\nexport const PAYLOAD_COMPONENT_MAP = {\n 'ipc-aplusdesc': 'AplusDesc',\n 'ipc-banner': 'Banner',\n 'ipc-brand-equity': 'BrandEquity',\n 'ipc-category': 'Category',\n 'ipc-collection-banner': 'CollectionBanner',\n 'ipc-collection-shelves': 'CollectionShelves',\n 'ipc-creativemodule': 'CreativeModule',\n 'ipc-download': 'DownLoad',\n 'ipc-evaluate': 'Evaluate',\n 'ipc-faq': 'Faq',\n 'ipc-features': 'Features',\n 'ipc-footcharger': 'FootCharger',\n 'ipc-ga-block': 'GraphicAttractionBlock',\n 'ipc-giftbox': 'GiftBox',\n 'ipc-graphic': 'Graphic',\n 'ipc-graphicmore': 'GraphicMore',\n 'ipc-graphicoverlay': 'GraphicOverlay',\n 'ipc-marquee': 'Marquee',\n 'ipc-mediaplayerbase': 'MediaPlayerBase',\n 'ipc-mediaplayermulti': 'MediaPlayerMulti',\n 'ipc-mediaplayersticky': 'MediaPlayerSticky',\n 'ipc-member-equity': 'MemberEquity',\n 'ipc-mlg-block': 'MultiLayoutGraphicBlock',\n 'ipc-search-page-tabs': 'SearchPageBlock',\n 'ipc-selectstore': 'SelectStore',\n 'ipc-shelfdisplay': 'ShelfDisplay',\n 'ipc-slogan': 'Slogan',\n 'ipc-spacer': 'Spacer',\n 'ipc-specs': 'Specs',\n 'ipc-tabs': 'Tabs',\n 'ipc-text-marquee': 'TextMarquee',\n 'ipc-title': 'Title',\n 'ipc-whychoose': 'WhyChoose',\n}\n"],
|
|
5
|
+
"mappings": "AAAA,OAAoB,WAAXA,MAA8B,yBACvC,OAAoB,WAAXA,MAA+B,0BACxC,OAAoB,WAAXA,MAAyB,oBAClC,OAAoB,WAAXA,MAAwB,mBACjC,OAAoB,WAAXA,MAAyB,oBAClC,OAAoB,WAAXA,MAA+B,0BACxC,OAAoB,WAAXA,MAA2B,sBACpC,OAAoB,WAAXA,MAA2B,sBACpC,OAAoB,WAAXA,MAA6B,wBACtC,OAAoB,WAAXA,MAAiC,4BAC1C,OAAoB,WAAXA,MAA0B,qBACnC,OAAoB,WAAXA,MAAkC,6BAC3C,OAAoB,WAAXA,MAAoC,+BAC7C,OAAoB,WAAXA,MAAmC,8BAC5C,OAAoB,WAAXA,MAA0B,qBACnC,OAAoB,WAAXA,MAA4B,uBACrC,OAAoB,WAAXA,MAAsB,iBAC/B,OAAS,eAAAC,EAAa,uBAAAC,EAAqB,sBAAAC,MAA0B,qBACrE,OAAoB,WAAXH,MAA0C,qCAEnD,OAAoB,WAAXA,MAAyC,oCAElD,OAAoB,WAAXA,MAAmC,8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ACf,cAAe,UACf,kBAAmB,cACnB,qBAAsB,iBACtB,cAAe,UACf,sBAAuB,kBACvB,uBAAwB,mBACxB,wBAAyB,oBACzB,oBAAqB,eACrB,gBAAiB,0BACjB,uBAAwB,kBACxB,kBAAmB,cACnB,mBAAoB,eACpB,aAAc,SACd,aAAc,SACd,YAAa,QACb,WAAY,OACZ,mBAAoB,cACpB,YAAa,QACb,gBAAiB,WACnB",
|
|
6
|
+
"names": ["default", "MarqueeItem", "MarqueeImageContent", "MarqueeTextContent", "IPC_SEARCH_PAGE", "SearchPageTabType", "withLayout", "PAYLOAD_COMPONENT_MAP"]
|
|
7
7
|
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import React, { type ReactNode } from 'react';
|
|
2
|
+
import { type UseExposureDetectionOptions } from '../hooks/useExposureDetection.js';
|
|
3
|
+
export interface ExposureDetectorProps extends Omit<UseExposureDetectionOptions, 'onExposure'> {
|
|
4
|
+
/**
|
|
5
|
+
* 子元素
|
|
6
|
+
*/
|
|
7
|
+
children: ReactNode;
|
|
8
|
+
/**
|
|
9
|
+
* 曝光回调函数
|
|
10
|
+
*/
|
|
11
|
+
onExposure?: () => void;
|
|
12
|
+
/**
|
|
13
|
+
* 包装元素的标签,默认 'div'
|
|
14
|
+
*/
|
|
15
|
+
as?: keyof JSX.IntrinsicElements;
|
|
16
|
+
/**
|
|
17
|
+
* 包装元素的 className
|
|
18
|
+
*/
|
|
19
|
+
className?: string;
|
|
20
|
+
/**
|
|
21
|
+
* 包装元素的 style
|
|
22
|
+
*/
|
|
23
|
+
style?: React.CSSProperties;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* 曝光检测组件
|
|
27
|
+
* 使用 IntersectionObserver 检测子元素是否至少 50% 可见且停留时间超过指定时间
|
|
28
|
+
* 确保在整个页面生命周期中只曝光一次
|
|
29
|
+
*
|
|
30
|
+
* @example
|
|
31
|
+
* ```tsx
|
|
32
|
+
* <ExposureDetector
|
|
33
|
+
* exposureKey="my-component-1"
|
|
34
|
+
* threshold={0.5}
|
|
35
|
+
* duration={2000}
|
|
36
|
+
* onExposure={() => {
|
|
37
|
+
* console.log('元素已曝光')
|
|
38
|
+
* }}
|
|
39
|
+
* >
|
|
40
|
+
* <div>内容</div>
|
|
41
|
+
* </ExposureDetector>
|
|
42
|
+
* ```
|
|
43
|
+
*/
|
|
44
|
+
export declare const ExposureDetector: React.FC<ExposureDetectorProps>;
|
|
45
|
+
export default ExposureDetector;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import E,{useRef as l}from"react";import{useExposureDetection as m}from"../hooks/useExposureDetection.js";const f=({children:t,onExposure:o,exposureKey:r,threshold:s=.5,duration:n=2e3,once:p=!0,rootMargin:c="0px",as:i="div",className:u,style:x,...a})=>{const e=l(null);return m(e,{exposureKey:r,threshold:s,duration:n,once:p,onExposure:o,rootMargin:c}),E.createElement(i,{ref:e,className:u,style:x,...a},t)};var D=f;export{f as ExposureDetector,D as default};
|
|
2
|
+
//# sourceMappingURL=ExposureDetector.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/components/ExposureDetector.tsx"],
|
|
4
|
+
"sourcesContent": ["import React, { useRef, type ReactNode } from 'react'\nimport { useExposureDetection, type UseExposureDetectionOptions } from '../hooks/useExposureDetection.js'\n\nexport interface ExposureDetectorProps extends Omit<UseExposureDetectionOptions, 'onExposure'> {\n /**\n * \u5B50\u5143\u7D20\n */\n children: ReactNode\n /**\n * \u66DD\u5149\u56DE\u8C03\u51FD\u6570\n */\n onExposure?: () => void\n /**\n * \u5305\u88C5\u5143\u7D20\u7684\u6807\u7B7E\uFF0C\u9ED8\u8BA4 'div'\n */\n as?: keyof JSX.IntrinsicElements\n /**\n * \u5305\u88C5\u5143\u7D20\u7684 className\n */\n className?: string\n /**\n * \u5305\u88C5\u5143\u7D20\u7684 style\n */\n style?: React.CSSProperties\n}\n\n/**\n * \u66DD\u5149\u68C0\u6D4B\u7EC4\u4EF6\n * \u4F7F\u7528 IntersectionObserver \u68C0\u6D4B\u5B50\u5143\u7D20\u662F\u5426\u81F3\u5C11 50% \u53EF\u89C1\u4E14\u505C\u7559\u65F6\u95F4\u8D85\u8FC7\u6307\u5B9A\u65F6\u95F4\n * \u786E\u4FDD\u5728\u6574\u4E2A\u9875\u9762\u751F\u547D\u5468\u671F\u4E2D\u53EA\u66DD\u5149\u4E00\u6B21\n *\n * @example\n * ```tsx\n * <ExposureDetector\n * exposureKey=\"my-component-1\"\n * threshold={0.5}\n * duration={2000}\n * onExposure={() => {\n * console.log('\u5143\u7D20\u5DF2\u66DD\u5149')\n * }}\n * >\n * <div>\u5185\u5BB9</div>\n * </ExposureDetector>\n * ```\n */\nexport const ExposureDetector: React.FC<ExposureDetectorProps> = ({\n children,\n onExposure,\n exposureKey,\n threshold = 0.5,\n duration = 2000,\n once = true,\n rootMargin = '0px',\n as: Component = 'div',\n className,\n style,\n ...rest\n}) => {\n const elementRef = useRef<HTMLElement>(null)\n\n useExposureDetection(elementRef, {\n exposureKey,\n threshold,\n duration,\n once,\n onExposure,\n rootMargin,\n })\n\n return React.createElement(\n Component,\n {\n ref: elementRef,\n className,\n style,\n ...rest,\n },\n children\n )\n}\n\nexport default ExposureDetector\n\n"],
|
|
5
|
+
"mappings": "AAAA,OAAOA,GAAS,UAAAC,MAA8B,QAC9C,OAAS,wBAAAC,MAA8D,mCA4ChE,MAAMC,EAAoD,CAAC,CAChE,SAAAC,EACA,WAAAC,EACA,YAAAC,EACA,UAAAC,EAAY,GACZ,SAAAC,EAAW,IACX,KAAAC,EAAO,GACP,WAAAC,EAAa,MACb,GAAIC,EAAY,MAChB,UAAAC,EACA,MAAAC,EACA,GAAGC,CACL,IAAM,CACJ,MAAMC,EAAad,EAAoB,IAAI,EAE3C,OAAAC,EAAqBa,EAAY,CAC/B,YAAAT,EACA,UAAAC,EACA,SAAAC,EACA,KAAAC,EACA,WAAAJ,EACA,WAAAK,CACF,CAAC,EAEMV,EAAM,cACXW,EACA,CACE,IAAKI,EACL,UAAAH,EACA,MAAAC,EACA,GAAGC,CACL,EACAV,CACF,CACF,EAEA,IAAOY,EAAQb",
|
|
6
|
+
"names": ["React", "useRef", "useExposureDetection", "ExposureDetector", "children", "onExposure", "exposureKey", "threshold", "duration", "once", "rootMargin", "Component", "className", "style", "rest", "elementRef", "ExposureDetector_default"]
|
|
7
|
+
}
|
|
@@ -5,6 +5,7 @@ declare const checkboxVariants: (props?: ({
|
|
|
5
5
|
size?: "base" | "lg" | "sm" | null | undefined;
|
|
6
6
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
7
7
|
interface CheckboxProps extends React.ComponentPropsWithoutRef<typeof CheckboxPrimitive.Root>, VariantProps<typeof checkboxVariants> {
|
|
8
|
+
iconClassName?: string;
|
|
8
9
|
}
|
|
9
10
|
declare const Checkbox: React.ForwardRefExoticComponent<CheckboxProps & React.RefAttributes<HTMLButtonElement>>;
|
|
10
11
|
export default Checkbox;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use client";import{jsx as e}from"react/jsx-runtime";import*as
|
|
1
|
+
"use client";import{jsx as e}from"react/jsx-runtime";import*as l from"react";import*as t from"@radix-ui/react-checkbox";import{cn as i}from"../helpers/index.js";import{cva as d}from"class-variance-authority";const f=o=>e("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",...o,children:e("path",{d:"M7.5 15.8333L1.66667 10L3.75 7.91667L7.5 11.6667L16.25 3L18.3333 5.08333L7.5 15.8333Z",fill:"currentColor"})}),p=d("border-primary ring-offset-background focus-visible:ring-ring data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground disabled:bg-btn-primary-disabled peer shrink-0 rounded-sm border focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",{variants:{size:{sm:"size-[14px]",base:"size-4",lg:"size-5"}},defaultVariants:{size:"base"}}),r=l.forwardRef(({className:o,size:s,iconClassName:a,...c},n)=>e(t.Root,{ref:n,className:i(p({size:s}),o),...c,children:e(t.Indicator,{className:i("flex size-full items-center justify-center text-current"),children:e(f,{width:16,height:12,className:a})})}));r.displayName="Checkbox";var h=r;export{h as default};
|
|
2
2
|
//# sourceMappingURL=checkbox.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/components/checkbox.tsx"],
|
|
4
|
-
"sourcesContent": ["'use client'\n\nimport * as React from 'react'\nimport * as CheckboxPrimitive from '@radix-ui/react-checkbox'\
|
|
5
|
-
"mappings": "
|
|
6
|
-
"names": ["jsx", "React", "CheckboxPrimitive", "
|
|
4
|
+
"sourcesContent": ["'use client'\n\nimport * as React from 'react'\nimport * as CheckboxPrimitive from '@radix-ui/react-checkbox'\n// import { CheckIcon } from '@radix-ui/react-icons'\n\nimport { cn } from '../helpers/index.js'\nimport { cva, type VariantProps } from 'class-variance-authority'\n\n\nconst CheckIcon = (props: React.SVGProps<SVGSVGElement>) => {\n return (\n <svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\" {...props}>\n <path\n d=\"M7.5 15.8333L1.66667 10L3.75 7.91667L7.5 11.6667L16.25 3L18.3333 5.08333L7.5 15.8333Z\"\n fill=\"currentColor\"\n />\n </svg>\n )\n}\n\nconst checkboxVariants = cva(\n 'border-primary ring-offset-background focus-visible:ring-ring data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground disabled:bg-btn-primary-disabled peer shrink-0 rounded-sm border focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50',\n {\n variants: {\n size: {\n sm: 'size-[14px]',\n base: 'size-4',\n lg: 'size-5',\n },\n },\n defaultVariants: {\n size: 'base',\n },\n }\n)\n\ninterface CheckboxProps\n extends React.ComponentPropsWithoutRef<typeof CheckboxPrimitive.Root>,\n VariantProps<typeof checkboxVariants> {\n iconClassName?: string\n}\n\nconst Checkbox = React.forwardRef<React.ElementRef<typeof CheckboxPrimitive.Root>, CheckboxProps>(\n ({ className, size, iconClassName, ...props }, ref) => (\n <CheckboxPrimitive.Root ref={ref} className={cn(checkboxVariants({ size }), className)} {...props}>\n <CheckboxPrimitive.Indicator className={cn('flex size-full items-center justify-center text-current')}>\n <CheckIcon width={16} height={12} className={iconClassName} />\n </CheckboxPrimitive.Indicator>\n </CheckboxPrimitive.Root>\n )\n)\nCheckbox.displayName = 'Checkbox'\n\nexport default Checkbox\nexport type { CheckboxProps }\n"],
|
|
5
|
+
"mappings": "aAaM,cAAAA,MAAA,oBAXN,UAAYC,MAAW,QACvB,UAAYC,MAAuB,2BAGnC,OAAS,MAAAC,MAAU,sBACnB,OAAS,OAAAC,MAA8B,2BAGvC,MAAMC,EAAaC,GAEfN,EAAC,OAAI,MAAM,KAAK,OAAO,KAAK,QAAQ,YAAY,KAAK,OAAO,MAAM,6BAA8B,GAAGM,EACjG,SAAAN,EAAC,QACC,EAAE,wFACF,KAAK,eACP,EACF,EAIEO,EAAmBH,EACvB,0UACA,CACE,SAAU,CACR,KAAM,CACJ,GAAI,cACJ,KAAM,SACN,GAAI,QACN,CACF,EACA,gBAAiB,CACf,KAAM,MACR,CACF,CACF,EAQMI,EAAWP,EAAM,WACrB,CAAC,CAAE,UAAAQ,EAAW,KAAAC,EAAM,cAAAC,EAAe,GAAGL,CAAM,EAAGM,IAC7CZ,EAACE,EAAkB,KAAlB,CAAuB,IAAKU,EAAK,UAAWT,EAAGI,EAAiB,CAAE,KAAAG,CAAK,CAAC,EAAGD,CAAS,EAAI,GAAGH,EAC1F,SAAAN,EAACE,EAAkB,UAAlB,CAA4B,UAAWC,EAAG,yDAAyD,EAClG,SAAAH,EAACK,EAAA,CAAU,MAAO,GAAI,OAAQ,GAAI,UAAWM,EAAe,EAC9D,EACF,CAEJ,EACAH,EAAS,YAAc,WAEvB,IAAOK,EAAQL",
|
|
6
|
+
"names": ["jsx", "React", "CheckboxPrimitive", "cn", "cva", "CheckIcon", "props", "checkboxVariants", "Checkbox", "className", "size", "iconClassName", "ref", "checkbox_default"]
|
|
7
7
|
}
|
|
@@ -4,7 +4,7 @@ declare const Dialog: React.FC<DialogPrimitive.DialogProps>;
|
|
|
4
4
|
declare const DialogTrigger: React.ForwardRefExoticComponent<DialogPrimitive.DialogTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
5
5
|
declare const DialogPortal: React.FC<DialogPrimitive.DialogPortalProps>;
|
|
6
6
|
declare const DialogClose: React.ForwardRefExoticComponent<DialogPrimitive.DialogCloseProps & React.RefAttributes<HTMLButtonElement>>;
|
|
7
|
-
declare const DialogOverlay: React.ForwardRefExoticComponent<
|
|
7
|
+
declare const DialogOverlay: React.ForwardRefExoticComponent<DialogPrimitive.DialogOverlayProps & React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
8
8
|
declare const DialogContent: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
|
|
9
9
|
overlayClassName?: string;
|
|
10
10
|
} & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use client";import{jsx as o,jsxs as r}from"react/jsx-runtime";import*as
|
|
1
|
+
"use client";import{jsx as o,jsxs as r}from"react/jsx-runtime";import*as s from"react";import*as e from"@radix-ui/react-dialog";import{Cross2Icon as v}from"@radix-ui/react-icons";import{cn as l}from"../helpers/index.js";const d=e.Root;d.displayName="Dialog";const N=e.Trigger,m=e.Portal,R=e.Close,n=s.forwardRef(({className:t,...a},i)=>o(e.Overlay,{ref:i,className:l("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-[1000] bg-black/80",t),...a}));n.displayName=e.Overlay.displayName;const c=s.forwardRef(({className:t,children:a,overlayClassName:i,...y},u)=>r(m,{children:[o(n,{className:i}),r(e.Content,{ref:u,className:l("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] tablet:rounded-lg fixed left-1/2 top-1/2 z-[1001] grid w-full max-w-lg -translate-x-1/2 -translate-y-1/2 gap-4 border p-6 shadow-lg duration-200",t),...y,children:[a,r(e.Close,{className:"dialog-close-button ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute right-4 top-4 rounded-sm opacity-70 transition-opacity hover:opacity-100 disabled:pointer-events-none",children:[o(v,{className:"size-4 dialog-close-icon"}),o("span",{className:"sr-only",children:"Close"})]})]})]}));c.displayName=e.Content.displayName;const p=({className:t,...a})=>o("div",{className:l("tablet:text-left flex flex-col space-y-1.5 text-center",t),...a});p.displayName="DialogHeader";const f=({className:t,...a})=>o("div",{className:l("tablet:flex-row tablet:justify-end tablet:space-x-2 flex flex-col-reverse",t),...a});f.displayName="DialogFooter";const g=s.forwardRef(({className:t,...a},i)=>o(e.Title,{ref:i,className:l("text-lg font-semibold leading-none tracking-tight",t),...a}));g.displayName=e.Title.displayName;const D=s.forwardRef(({className:t,...a},i)=>o(e.Description,{ref:i,className:l("text-muted-foreground text-sm",t),...a}));D.displayName=e.Description.displayName;export{d as Dialog,R as DialogClose,c as DialogContent,D as DialogDescription,f as DialogFooter,p as DialogHeader,n as DialogOverlay,m as DialogPortal,g as DialogTitle,N as DialogTrigger};
|
|
2
2
|
//# sourceMappingURL=dialog.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/components/dialog.tsx"],
|
|
4
|
-
"sourcesContent": ["'use client'\n\nimport * as React from 'react'\nimport * as DialogPrimitive from '@radix-ui/react-dialog'\nimport { Cross2Icon } from '@radix-ui/react-icons'\n\nimport { cn } from '../helpers/index.js'\n\nconst Dialog = DialogPrimitive.Root\nDialog.displayName = 'Dialog'\n\nconst DialogTrigger = DialogPrimitive.Trigger\n\nconst DialogPortal = DialogPrimitive.Portal\n\nconst DialogClose = DialogPrimitive.Close\n\
|
|
5
|
-
"mappings": "
|
|
4
|
+
"sourcesContent": ["'use client'\n\nimport * as React from 'react'\nimport * as DialogPrimitive from '@radix-ui/react-dialog'\nimport { Cross2Icon } from '@radix-ui/react-icons'\n\nimport { cn } from '../helpers/index.js'\n\nconst Dialog = DialogPrimitive.Root\nDialog.displayName = 'Dialog'\n\nconst DialogTrigger = DialogPrimitive.Trigger\n\nconst DialogPortal = DialogPrimitive.Portal\n\nconst DialogClose = DialogPrimitive.Close\n\ntype OverlayProps = DialogPrimitive.DialogOverlayProps & React.HTMLAttributes<HTMLDivElement>\n\nconst DialogOverlay = React.forwardRef<HTMLDivElement, OverlayProps>(({ className, ...props }, ref) => (\n <DialogPrimitive.Overlay\n ref={ref}\n className={cn(\n 'data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-[1000] bg-black/80',\n className\n )}\n {...props}\n />\n))\nDialogOverlay.displayName = DialogPrimitive.Overlay.displayName\n\nconst DialogContent = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Content> & {\n overlayClassName?: string\n }\n>(({ className, children, overlayClassName, ...props }, ref) => (\n <DialogPortal>\n <DialogOverlay className={overlayClassName} />\n <DialogPrimitive.Content\n ref={ref}\n className={cn(\n 'bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] tablet:rounded-lg fixed left-1/2 top-1/2 z-[1001] grid w-full max-w-lg -translate-x-1/2 -translate-y-1/2 gap-4 border p-6 shadow-lg duration-200',\n className\n )}\n {...props}\n >\n {children}\n <DialogPrimitive.Close className=\"dialog-close-button ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute right-4 top-4 rounded-sm opacity-70 transition-opacity hover:opacity-100 disabled:pointer-events-none\">\n <Cross2Icon className=\"size-4 dialog-close-icon\" />\n <span className=\"sr-only\">Close</span>\n </DialogPrimitive.Close>\n </DialogPrimitive.Content>\n </DialogPortal>\n))\nDialogContent.displayName = DialogPrimitive.Content.displayName\n\nconst DialogHeader = ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) => (\n <div className={cn('tablet:text-left flex flex-col space-y-1.5 text-center', className)} {...props} />\n)\nDialogHeader.displayName = 'DialogHeader'\n\nconst DialogFooter = ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) => (\n <div\n className={cn('tablet:flex-row tablet:justify-end tablet:space-x-2 flex flex-col-reverse', className)}\n {...props}\n />\n)\nDialogFooter.displayName = 'DialogFooter'\n\nconst DialogTitle = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Title>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Title>\n>(({ className, ...props }, ref) => (\n <DialogPrimitive.Title\n ref={ref}\n className={cn('text-lg font-semibold leading-none tracking-tight', className)}\n {...props}\n />\n))\nDialogTitle.displayName = DialogPrimitive.Title.displayName\n\nconst DialogDescription = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Description>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Description>\n>(({ className, ...props }, ref) => (\n <DialogPrimitive.Description ref={ref} className={cn('text-muted-foreground text-sm', className)} {...props} />\n))\nDialogDescription.displayName = DialogPrimitive.Description.displayName\n\nexport {\n Dialog,\n DialogPortal,\n DialogOverlay,\n DialogClose,\n DialogTrigger,\n DialogContent,\n DialogHeader,\n DialogFooter,\n DialogTitle,\n DialogDescription,\n}\n"],
|
|
5
|
+
"mappings": "aAoBE,cAAAA,EA4BI,QAAAC,MA5BJ,oBAlBF,UAAYC,MAAW,QACvB,UAAYC,MAAqB,yBACjC,OAAS,cAAAC,MAAkB,wBAE3B,OAAS,MAAAC,MAAU,sBAEnB,MAAMC,EAASH,EAAgB,KAC/BG,EAAO,YAAc,SAErB,MAAMC,EAAgBJ,EAAgB,QAEhCK,EAAeL,EAAgB,OAE/BM,EAAcN,EAAgB,MAI9BO,EAAgBR,EAAM,WAAyC,CAAC,CAAE,UAAAS,EAAW,GAAGC,CAAM,EAAGC,IAC7Fb,EAACG,EAAgB,QAAhB,CACC,IAAKU,EACL,UAAWR,EACT,8JACAM,CACF,EACC,GAAGC,EACN,CACD,EACDF,EAAc,YAAcP,EAAgB,QAAQ,YAEpD,MAAMW,EAAgBZ,EAAM,WAK1B,CAAC,CAAE,UAAAS,EAAW,SAAAI,EAAU,iBAAAC,EAAkB,GAAGJ,CAAM,EAAGC,IACtDZ,EAACO,EAAA,CACC,UAAAR,EAACU,EAAA,CAAc,UAAWM,EAAkB,EAC5Cf,EAACE,EAAgB,QAAhB,CACC,IAAKU,EACL,UAAWR,EACT,8fACAM,CACF,EACC,GAAGC,EAEH,UAAAG,EACDd,EAACE,EAAgB,MAAhB,CAAsB,UAAU,gPAC/B,UAAAH,EAACI,EAAA,CAAW,UAAU,2BAA2B,EACjDJ,EAAC,QAAK,UAAU,UAAU,iBAAK,GACjC,GACF,GACF,CACD,EACDc,EAAc,YAAcX,EAAgB,QAAQ,YAEpD,MAAMc,EAAe,CAAC,CAAE,UAAAN,EAAW,GAAGC,CAAM,IAC1CZ,EAAC,OAAI,UAAWK,EAAG,yDAA0DM,CAAS,EAAI,GAAGC,EAAO,EAEtGK,EAAa,YAAc,eAE3B,MAAMC,EAAe,CAAC,CAAE,UAAAP,EAAW,GAAGC,CAAM,IAC1CZ,EAAC,OACC,UAAWK,EAAG,4EAA6EM,CAAS,EACnG,GAAGC,EACN,EAEFM,EAAa,YAAc,eAE3B,MAAMC,EAAcjB,EAAM,WAGxB,CAAC,CAAE,UAAAS,EAAW,GAAGC,CAAM,EAAGC,IAC1Bb,EAACG,EAAgB,MAAhB,CACC,IAAKU,EACL,UAAWR,EAAG,oDAAqDM,CAAS,EAC3E,GAAGC,EACN,CACD,EACDO,EAAY,YAAchB,EAAgB,MAAM,YAEhD,MAAMiB,EAAoBlB,EAAM,WAG9B,CAAC,CAAE,UAAAS,EAAW,GAAGC,CAAM,EAAGC,IAC1Bb,EAACG,EAAgB,YAAhB,CAA4B,IAAKU,EAAK,UAAWR,EAAG,gCAAiCM,CAAS,EAAI,GAAGC,EAAO,CAC9G,EACDQ,EAAkB,YAAcjB,EAAgB,YAAY",
|
|
6
6
|
"names": ["jsx", "jsxs", "React", "DialogPrimitive", "Cross2Icon", "cn", "Dialog", "DialogTrigger", "DialogPortal", "DialogClose", "DialogOverlay", "className", "props", "ref", "DialogContent", "children", "overlayClassName", "DialogHeader", "DialogFooter", "DialogTitle", "DialogDescription"]
|
|
7
7
|
}
|
|
@@ -24,3 +24,4 @@ export { default as Picture } from './picture.js';
|
|
|
24
24
|
export { default as Theme } from './theme.js';
|
|
25
25
|
export { default as Board } from './board.js';
|
|
26
26
|
export { default as LoadingDots } from './loadingDots.js';
|
|
27
|
+
export { ExposureDetector, type ExposureDetectorProps } from './ExposureDetector.js';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{default as e}from"./button.js";import{default as a}from"./badge.js";import{Input as n,InputSlot as u}from"./input.js";import{default as i}from"./checkbox.js";import{default as
|
|
1
|
+
import{default as e}from"./button.js";import{default as a}from"./badge.js";import{Input as n,InputSlot as u}from"./input.js";import{default as i}from"./checkbox.js";import{default as s}from"./skeleton.js";import{Dialog as m,DialogPortal as f,DialogOverlay as x,DialogClose as C,DialogTrigger as g,DialogContent as w,DialogHeader as P,DialogFooter as T,DialogTitle as M,DialogDescription as y}from"./dialog.js";import{Popover as I,PopoverTrigger as c,PopoverContent as G}from"./popover.js";import{RadioGroup as A,RadioGroupItem as S}from"./radio.js";import{Text as R}from"./text.js";import{Grid as L,GridItem as h}from"./gird.js";import{Heading as B}from"./heading.js";import{Container as E}from"./container.js";import{Color as j}from"./color.js";import{Drawer as z,DrawerPortal as J,DrawerOverlay as K,DrawerTrigger as Q,DrawerClose as U,DrawerContent as V,DrawerHeader as W,DrawerFooter as X,DrawerTitle as Y,DrawerDescription as Z}from"./drawer.js";import{default as $}from"./link.js";import{Avatar as or,AvatarImage as er,AvatarFallback as tr}from"./avatar.js";import{default as pr}from"./input-number.js";import{DropdownMenu as ur,DropdownMenuTrigger as dr,DropdownMenuContent as ir,DropdownMenuItem as lr,DropdownMenuCheckboxItem as sr,DropdownMenuRadioItem as Dr,DropdownMenuLabel as mr,DropdownMenuSeparator as fr,DropdownMenuShortcut as xr,DropdownMenuGroup as Cr,DropdownMenuPortal as gr,DropdownMenuSub as wr,DropdownMenuSubContent as Pr,DropdownMenuSubTrigger as Tr,DropdownMenuRadioGroup as Mr}from"./drop-down.js";import{Card as br,CardHeader as Ir,CardFooter as cr,CardTitle as Gr,CardDescription as vr,CardContent as Ar}from"./card.js";import{Carousel as kr,CarouselContent as Rr,CarouselItem as Hr,CarouselPrevious as Lr,CarouselNext as hr}from"./carousel.js";import{Tabs as Br,TabsList as Nr,TabsTrigger as Er,TabsContent as Or}from"./tabs.js";import{Alert as qr,AlertTitle as zr,AlertDescription as Jr}from"./alert.js";import{default as Qr}from"./picture.js";import{default as Vr}from"./theme.js";import{default as Xr}from"./board.js";import{default as Zr}from"./loadingDots.js";import{ExposureDetector as $r}from"./ExposureDetector.js";export{qr as Alert,Jr as AlertDescription,zr as AlertTitle,or as Avatar,tr as AvatarFallback,er as AvatarImage,a as Badge,Xr as Board,e as Button,br as Card,Ar as CardContent,vr as CardDescription,cr as CardFooter,Ir as CardHeader,Gr as CardTitle,kr as Carousel,Rr as CarouselContent,Hr as CarouselItem,hr as CarouselNext,Lr as CarouselPrevious,i as Checkbox,j as Color,E as Container,m as Dialog,C as DialogClose,w as DialogContent,y as DialogDescription,T as DialogFooter,P as DialogHeader,x as DialogOverlay,f as DialogPortal,M as DialogTitle,g as DialogTrigger,z as Drawer,U as DrawerClose,V as DrawerContent,Z as DrawerDescription,X as DrawerFooter,W as DrawerHeader,K as DrawerOverlay,J as DrawerPortal,Y as DrawerTitle,Q as DrawerTrigger,ur as DropdownMenu,sr as DropdownMenuCheckboxItem,ir as DropdownMenuContent,Cr as DropdownMenuGroup,lr as DropdownMenuItem,mr as DropdownMenuLabel,gr as DropdownMenuPortal,Mr as DropdownMenuRadioGroup,Dr as DropdownMenuRadioItem,fr as DropdownMenuSeparator,xr as DropdownMenuShortcut,wr as DropdownMenuSub,Pr as DropdownMenuSubContent,Tr as DropdownMenuSubTrigger,dr as DropdownMenuTrigger,$r as ExposureDetector,L as Grid,h as GridItem,B as Heading,n as Input,pr as InputNumber,u as InputSlot,$ as Link,Zr as LoadingDots,Qr as Picture,I as Popover,G as PopoverContent,c as PopoverTrigger,A as RadioGroup,S as RadioGroupItem,s as Skeleton,Br as Tabs,Or as TabsContent,Nr as TabsList,Er as TabsTrigger,R as Text,Vr as Theme};
|
|
2
2
|
//# sourceMappingURL=index.js.map
|