@anker-in/headless-ui 1.0.20-alpha.1761623666342 → 1.0.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/biz-components/AccordionCards/index.js.map +2 -2
- package/dist/cjs/biz-components/AiuiProvider/index.d.ts +0 -4
- 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/Faq/Faq.js +1 -1
- package/dist/cjs/biz-components/Faq/Faq.js.map +2 -2
- 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/MultiLayoutGraphicBlock/MultiLayoutGraphicBlock.js +1 -1
- package/dist/cjs/biz-components/MultiLayoutGraphicBlock/MultiLayoutGraphicBlock.js.map +2 -2
- package/dist/cjs/biz-components/ShelfDisplay/index.js +1 -1
- package/dist/cjs/biz-components/ShelfDisplay/index.js.map +3 -3
- package/dist/cjs/biz-components/ShelfDisplay/shelfDisplay.d.ts +2 -11
- package/dist/cjs/biz-components/ShelfDisplay/shelfDisplay.js +1 -1
- package/dist/cjs/biz-components/ShelfDisplay/shelfDisplay.js.map +3 -3
- package/dist/cjs/biz-components/ShelfDisplay/shelfDisplayItem.js +4 -4
- package/dist/cjs/biz-components/ShelfDisplay/shelfDisplayItem.js.map +3 -3
- package/dist/cjs/biz-components/Subscribe/index.js +2 -2
- package/dist/cjs/biz-components/Subscribe/index.js.map +2 -2
- 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 +3 -3
- package/dist/cjs/biz-components/Title/types.d.ts +1 -4
- package/dist/cjs/biz-components/Title/types.js +1 -1
- package/dist/cjs/biz-components/Title/types.js.map +1 -1
- package/dist/cjs/biz-components/index.d.ts +0 -34
- package/dist/cjs/biz-components/index.js +1 -1
- package/dist/cjs/biz-components/index.js.map +3 -3
- package/dist/cjs/components/button.js +1 -1
- package/dist/cjs/components/button.js.map +2 -2
- package/dist/cjs/components/checkbox.js +1 -1
- package/dist/cjs/components/checkbox.js.map +3 -3
- package/dist/cjs/components/index.d.ts +1 -2
- package/dist/cjs/components/index.js +1 -1
- package/dist/cjs/components/index.js.map +3 -3
- package/dist/cjs/components/picture.d.ts +0 -1
- package/dist/cjs/components/picture.js +1 -1
- package/dist/cjs/components/picture.js.map +3 -3
- package/dist/cjs/helpers/utils.d.ts +0 -1
- package/dist/cjs/helpers/utils.js +1 -1
- package/dist/cjs/helpers/utils.js.map +3 -3
- package/dist/cjs/stories/picture.stories.d.ts +0 -4
- package/dist/cjs/stories/picture.stories.js +3 -8
- package/dist/cjs/stories/picture.stories.js.map +3 -3
- package/dist/cjs/stories/shelfDisplay.stories.js +1 -644
- package/dist/cjs/stories/shelfDisplay.stories.js.map +2 -2
- package/dist/cjs/stories/tabs.stories.js +1 -1
- package/dist/cjs/stories/tabs.stories.js.map +3 -3
- package/dist/esm/biz-components/AccordionCards/index.js.map +2 -2
- package/dist/esm/biz-components/AiuiProvider/index.d.ts +0 -4
- 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/Faq/Faq.js +1 -1
- package/dist/esm/biz-components/Faq/Faq.js.map +3 -3
- 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/MultiLayoutGraphicBlock/MultiLayoutGraphicBlock.js +1 -1
- package/dist/esm/biz-components/MultiLayoutGraphicBlock/MultiLayoutGraphicBlock.js.map +2 -2
- package/dist/esm/biz-components/ShelfDisplay/index.js +1 -1
- package/dist/esm/biz-components/ShelfDisplay/index.js.map +3 -3
- package/dist/esm/biz-components/ShelfDisplay/shelfDisplay.d.ts +2 -11
- package/dist/esm/biz-components/ShelfDisplay/shelfDisplay.js +1 -1
- package/dist/esm/biz-components/ShelfDisplay/shelfDisplay.js.map +3 -3
- package/dist/esm/biz-components/ShelfDisplay/shelfDisplayItem.js +9 -9
- package/dist/esm/biz-components/ShelfDisplay/shelfDisplayItem.js.map +3 -3
- package/dist/esm/biz-components/Subscribe/index.js +2 -2
- package/dist/esm/biz-components/Subscribe/index.js.map +2 -2
- 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 +3 -3
- package/dist/esm/biz-components/Title/types.d.ts +1 -4
- package/dist/esm/biz-components/index.d.ts +0 -34
- package/dist/esm/biz-components/index.js +1 -1
- package/dist/esm/biz-components/index.js.map +2 -2
- package/dist/esm/components/button.js +1 -1
- package/dist/esm/components/button.js.map +2 -2
- package/dist/esm/components/checkbox.js +1 -1
- package/dist/esm/components/checkbox.js.map +3 -3
- package/dist/esm/components/index.d.ts +1 -2
- package/dist/esm/components/index.js +1 -1
- package/dist/esm/components/index.js.map +2 -2
- package/dist/esm/components/picture.d.ts +0 -1
- package/dist/esm/components/picture.js +1 -1
- package/dist/esm/components/picture.js.map +3 -3
- package/dist/esm/helpers/utils.d.ts +0 -1
- package/dist/esm/helpers/utils.js +1 -1
- package/dist/esm/helpers/utils.js.map +3 -3
- package/dist/esm/stories/picture.stories.d.ts +0 -4
- package/dist/esm/stories/picture.stories.js +3 -8
- package/dist/esm/stories/picture.stories.js.map +3 -3
- package/dist/esm/stories/shelfDisplay.stories.js +1 -644
- package/dist/esm/stories/shelfDisplay.stories.js.map +2 -2
- package/dist/esm/stories/tabs.stories.js +1 -1
- package/dist/esm/stories/tabs.stories.js.map +3 -3
- package/dist/tokens/base.css +1 -1
- package/package.json +1 -1
- package/style.css +0 -27
- package/dist/cjs/biz-components/AplusDesc/index.d.ts +0 -22
- package/dist/cjs/biz-components/AplusDesc/index.js +0 -2
- package/dist/cjs/biz-components/AplusDesc/index.js.map +0 -7
- package/dist/cjs/biz-components/CollectionShelves/CollectionShelvesItem.d.ts +0 -4
- package/dist/cjs/biz-components/CollectionShelves/CollectionShelvesItem.js +0 -2
- package/dist/cjs/biz-components/CollectionShelves/CollectionShelvesItem.js.map +0 -7
- package/dist/cjs/biz-components/CollectionShelves/index.d.ts +0 -6
- package/dist/cjs/biz-components/CollectionShelves/index.js +0 -2
- package/dist/cjs/biz-components/CollectionShelves/index.js.map +0 -7
- package/dist/cjs/biz-components/CollectionsBanner/index.d.ts +0 -7
- package/dist/cjs/biz-components/CollectionsBanner/index.js +0 -2
- package/dist/cjs/biz-components/CollectionsBanner/index.js.map +0 -7
- package/dist/cjs/biz-components/CollectionsBanner/types.d.ts +0 -43
- package/dist/cjs/biz-components/CollectionsBanner/types.js +0 -2
- package/dist/cjs/biz-components/CollectionsBanner/types.js.map +0 -7
- package/dist/cjs/biz-components/CollectionsFilters/FilterCardWrap.d.ts +0 -17
- package/dist/cjs/biz-components/CollectionsFilters/FilterCardWrap.js +0 -2
- package/dist/cjs/biz-components/CollectionsFilters/FilterCardWrap.js.map +0 -7
- package/dist/cjs/biz-components/CollectionsFilters/FilterCardWrapItem.d.ts +0 -10
- package/dist/cjs/biz-components/CollectionsFilters/FilterCardWrapItem.js +0 -2
- package/dist/cjs/biz-components/CollectionsFilters/FilterCardWrapItem.js.map +0 -7
- package/dist/cjs/biz-components/CollectionsFilters/FilterHeader.d.ts +0 -13
- package/dist/cjs/biz-components/CollectionsFilters/FilterHeader.js +0 -2
- package/dist/cjs/biz-components/CollectionsFilters/FilterHeader.js.map +0 -7
- package/dist/cjs/biz-components/CollectionsFilters/FilterList.d.ts +0 -14
- package/dist/cjs/biz-components/CollectionsFilters/FilterList.js +0 -2
- package/dist/cjs/biz-components/CollectionsFilters/FilterList.js.map +0 -7
- package/dist/cjs/biz-components/CollectionsFilters/component/AnimatedUL.d.ts +0 -5
- package/dist/cjs/biz-components/CollectionsFilters/component/AnimatedUL.js +0 -2
- package/dist/cjs/biz-components/CollectionsFilters/component/AnimatedUL.js.map +0 -7
- package/dist/cjs/biz-components/CollectionsFilters/component/TabFilter.d.ts +0 -12
- package/dist/cjs/biz-components/CollectionsFilters/component/TabFilter.js +0 -2
- package/dist/cjs/biz-components/CollectionsFilters/component/TabFilter.js.map +0 -7
- package/dist/cjs/biz-components/CollectionsFilters/component/filtersFun.d.ts +0 -12
- package/dist/cjs/biz-components/CollectionsFilters/component/filtersFun.js +0 -2
- package/dist/cjs/biz-components/CollectionsFilters/component/filtersFun.js.map +0 -7
- package/dist/cjs/biz-components/CollectionsFilters/component/helper.d.ts +0 -81
- package/dist/cjs/biz-components/CollectionsFilters/component/helper.js +0 -2
- package/dist/cjs/biz-components/CollectionsFilters/component/helper.js.map +0 -7
- package/dist/cjs/biz-components/CollectionsFilters/component/price.d.ts +0 -25
- package/dist/cjs/biz-components/CollectionsFilters/component/price.js +0 -2
- package/dist/cjs/biz-components/CollectionsFilters/component/price.js.map +0 -7
- package/dist/cjs/biz-components/CollectionsFilters/component/priceProps.d.ts +0 -215
- package/dist/cjs/biz-components/CollectionsFilters/component/priceProps.js +0 -2
- package/dist/cjs/biz-components/CollectionsFilters/component/priceProps.js.map +0 -7
- package/dist/cjs/biz-components/CollectionsFilters/index.d.ts +0 -22
- package/dist/cjs/biz-components/CollectionsFilters/index.js +0 -2
- package/dist/cjs/biz-components/CollectionsFilters/index.js.map +0 -7
- package/dist/cjs/biz-components/DownLoad/index.d.ts +0 -20
- package/dist/cjs/biz-components/DownLoad/index.js +0 -2
- package/dist/cjs/biz-components/DownLoad/index.js.map +0 -7
- package/dist/cjs/biz-components/Features/index.d.ts +0 -26
- package/dist/cjs/biz-components/Features/index.js +0 -2
- package/dist/cjs/biz-components/Features/index.js.map +0 -7
- package/dist/cjs/biz-components/FootCharger/index.d.ts +0 -12
- package/dist/cjs/biz-components/FootCharger/index.js +0 -2
- package/dist/cjs/biz-components/FootCharger/index.js.map +0 -7
- package/dist/cjs/biz-components/GiftBox/index.d.ts +0 -17
- package/dist/cjs/biz-components/GiftBox/index.js +0 -2
- package/dist/cjs/biz-components/GiftBox/index.js.map +0 -7
- package/dist/cjs/biz-components/GraphicMore/index.d.ts +0 -22
- package/dist/cjs/biz-components/GraphicMore/index.js +0 -2
- package/dist/cjs/biz-components/GraphicMore/index.js.map +0 -7
- package/dist/cjs/biz-components/Listing/BizProductProvider.d.ts +0 -112
- package/dist/cjs/biz-components/Listing/BizProductProvider.js +0 -2
- package/dist/cjs/biz-components/Listing/BizProductProvider.js.map +0 -7
- package/dist/cjs/biz-components/Listing/components/PaidShipping/LearnMore.d.ts +0 -2
- package/dist/cjs/biz-components/Listing/components/PaidShipping/LearnMore.js +0 -2
- package/dist/cjs/biz-components/Listing/components/PaidShipping/LearnMore.js.map +0 -7
- package/dist/cjs/biz-components/Listing/components/PaidShipping/ShippingMethod.d.ts +0 -10
- package/dist/cjs/biz-components/Listing/components/PaidShipping/ShippingMethod.js +0 -2
- package/dist/cjs/biz-components/Listing/components/PaidShipping/ShippingMethod.js.map +0 -7
- package/dist/cjs/biz-components/Listing/components/PaidShipping/ShippingPolicyModal.d.ts +0 -25
- package/dist/cjs/biz-components/Listing/components/PaidShipping/ShippingPolicyModal.js +0 -2
- package/dist/cjs/biz-components/Listing/components/PaidShipping/ShippingPolicyModal.js.map +0 -7
- package/dist/cjs/biz-components/Listing/components/PaidShipping/index.d.ts +0 -12
- package/dist/cjs/biz-components/Listing/components/PaidShipping/index.js +0 -2
- package/dist/cjs/biz-components/Listing/components/PaidShipping/index.js.map +0 -7
- package/dist/cjs/biz-components/Listing/components/PaidShipping/type.d.ts +0 -30
- package/dist/cjs/biz-components/Listing/components/PaidShipping/type.js +0 -2
- package/dist/cjs/biz-components/Listing/components/PaidShipping/type.js.map +0 -7
- package/dist/cjs/biz-components/Listing/components/PaidShipping/utils.d.ts +0 -2
- package/dist/cjs/biz-components/Listing/components/PaidShipping/utils.js +0 -2
- package/dist/cjs/biz-components/Listing/components/PaidShipping/utils.js.map +0 -7
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/BenefitsTab.d.ts +0 -37
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/BenefitsTab.js +0 -40
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/BenefitsTab.js.map +0 -7
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/ProductBenefitsTabs/index.d.ts +0 -30
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/ProductBenefitsTabs/index.js +0 -2
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/ProductBenefitsTabs/index.js.map +0 -7
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/ProductBundle/index.d.ts +0 -2
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/ProductBundle/index.js +0 -2
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/ProductBundle/index.js.map +0 -7
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/ProductFreeGift/index.d.ts +0 -2
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/ProductFreeGift/index.js +0 -2
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/ProductFreeGift/index.js.map +0 -7
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/ProductHighlight/index.d.ts +0 -2
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/ProductHighlight/index.js +0 -2
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/ProductHighlight/index.js.map +0 -7
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/ProductOptions/index.d.ts +0 -2
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/ProductOptions/index.js +0 -2
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/ProductOptions/index.js.map +0 -7
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/index.d.ts +0 -2
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/index.js +0 -2
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/index.js.map +0 -7
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/types.d.ts +0 -43
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/types.js +0 -2
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/types.js.map +0 -7
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductGallery/components/CompareModal.d.ts +0 -2
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductGallery/components/CompareModal.js +0 -2
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductGallery/components/CompareModal.js.map +0 -7
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductGallery/components/Select.d.ts +0 -21
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductGallery/components/Select.js +0 -2
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductGallery/components/Select.js.map +0 -7
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductGallery/components/ShopifyColorOption.d.ts +0 -5
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductGallery/components/ShopifyColorOption.js +0 -2
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductGallery/components/ShopifyColorOption.js.map +0 -7
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductGallery/components/SpecsModal.d.ts +0 -1
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductGallery/components/SpecsModal.js +0 -2
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductGallery/components/SpecsModal.js.map +0 -7
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductGallery/index.d.ts +0 -2
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductGallery/index.js +0 -2
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductGallery/index.js.map +0 -7
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductGallery/types.d.ts +0 -35
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductGallery/types.js +0 -2
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductGallery/types.js.map +0 -7
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductGridBox.d.ts +0 -6
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductGridBox.js +0 -2
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductGridBox.js.map +0 -7
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductSummary/index.d.ts +0 -3
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductSummary/index.js +0 -2
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductSummary/index.js.map +0 -7
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductSummary/types.d.ts +0 -2
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductSummary/types.js +0 -2
- package/dist/cjs/biz-components/Listing/components/ProductCard/ProductSummary/types.js.map +0 -7
- package/dist/cjs/biz-components/Listing/components/ProductCard/index.d.ts +0 -2
- package/dist/cjs/biz-components/Listing/components/ProductCard/index.js +0 -2
- package/dist/cjs/biz-components/Listing/components/ProductCard/index.js.map +0 -7
- package/dist/cjs/biz-components/Listing/components/PurchaseBar/ProductActions/index.d.ts +0 -2
- package/dist/cjs/biz-components/Listing/components/PurchaseBar/ProductActions/index.js +0 -2
- package/dist/cjs/biz-components/Listing/components/PurchaseBar/ProductActions/index.js.map +0 -7
- package/dist/cjs/biz-components/Listing/components/PurchaseBar/ScrollSpyNav/index.d.ts +0 -4
- package/dist/cjs/biz-components/Listing/components/PurchaseBar/ScrollSpyNav/index.js +0 -2
- package/dist/cjs/biz-components/Listing/components/PurchaseBar/ScrollSpyNav/index.js.map +0 -7
- package/dist/cjs/biz-components/Listing/components/PurchaseBar/ScrollSpyNav/types.d.ts +0 -10
- package/dist/cjs/biz-components/Listing/components/PurchaseBar/ScrollSpyNav/types.js +0 -2
- package/dist/cjs/biz-components/Listing/components/PurchaseBar/ScrollSpyNav/types.js.map +0 -7
- package/dist/cjs/biz-components/Listing/components/PurchaseBar/index.d.ts +0 -3
- package/dist/cjs/biz-components/Listing/components/PurchaseBar/index.js +0 -2
- package/dist/cjs/biz-components/Listing/components/PurchaseBar/index.js.map +0 -7
- package/dist/cjs/biz-components/Listing/components/PurchaseBar/types.d.ts +0 -12
- package/dist/cjs/biz-components/Listing/components/PurchaseBar/types.js +0 -2
- package/dist/cjs/biz-components/Listing/components/PurchaseBar/types.js.map +0 -7
- package/dist/cjs/biz-components/Listing/components/index.d.ts +0 -3
- package/dist/cjs/biz-components/Listing/components/index.js +0 -2
- package/dist/cjs/biz-components/Listing/components/index.js.map +0 -7
- package/dist/cjs/biz-components/Listing/const.d.ts +0 -28
- package/dist/cjs/biz-components/Listing/const.js +0 -2
- package/dist/cjs/biz-components/Listing/const.js.map +0 -7
- package/dist/cjs/biz-components/Listing/hooks/use-options.d.ts +0 -3
- package/dist/cjs/biz-components/Listing/hooks/use-options.js +0 -2
- package/dist/cjs/biz-components/Listing/hooks/use-options.js.map +0 -7
- package/dist/cjs/biz-components/Listing/hooks/use-variant-media.d.ts +0 -14
- package/dist/cjs/biz-components/Listing/hooks/use-variant-media.js +0 -2
- package/dist/cjs/biz-components/Listing/hooks/use-variant-media.js.map +0 -7
- package/dist/cjs/biz-components/Listing/hooks/use-variant.d.ts +0 -5
- package/dist/cjs/biz-components/Listing/hooks/use-variant.js +0 -2
- package/dist/cjs/biz-components/Listing/hooks/use-variant.js.map +0 -7
- package/dist/cjs/biz-components/Listing/hooks/useBenefits.d.ts +0 -50
- package/dist/cjs/biz-components/Listing/hooks/useBenefits.js +0 -2
- package/dist/cjs/biz-components/Listing/hooks/useBenefits.js.map +0 -7
- package/dist/cjs/biz-components/Listing/hooks/useCopy.d.ts +0 -5
- package/dist/cjs/biz-components/Listing/hooks/useCopy.js +0 -2
- package/dist/cjs/biz-components/Listing/hooks/useCopy.js.map +0 -7
- package/dist/cjs/biz-components/Listing/index.d.ts +0 -3
- package/dist/cjs/biz-components/Listing/index.js +0 -2
- package/dist/cjs/biz-components/Listing/index.js.map +0 -7
- package/dist/cjs/biz-components/Listing/types/graphql.d.ts +0 -7473
- package/dist/cjs/biz-components/Listing/types/graphql.js +0 -2
- package/dist/cjs/biz-components/Listing/types/graphql.js.map +0 -7
- package/dist/cjs/biz-components/Listing/types/product.d.ts +0 -141
- package/dist/cjs/biz-components/Listing/types/product.js +0 -2
- package/dist/cjs/biz-components/Listing/types/product.js.map +0 -7
- package/dist/cjs/biz-components/Listing/types/productMetafields.d.js +0 -2
- package/dist/cjs/biz-components/Listing/types/productMetafields.d.js.map +0 -7
- package/dist/cjs/biz-components/Listing/types/type-helper.d.ts +0 -5
- package/dist/cjs/biz-components/Listing/types/type-helper.js +0 -2
- package/dist/cjs/biz-components/Listing/types/type-helper.js.map +0 -7
- package/dist/cjs/biz-components/Listing/types.d.ts +0 -28
- package/dist/cjs/biz-components/Listing/types.js +0 -2
- package/dist/cjs/biz-components/Listing/types.js.map +0 -7
- package/dist/cjs/biz-components/Listing/utils/helper.d.ts +0 -36
- package/dist/cjs/biz-components/Listing/utils/helper.js +0 -2
- package/dist/cjs/biz-components/Listing/utils/helper.js.map +0 -7
- package/dist/cjs/biz-components/Listing/utils/index.d.ts +0 -37
- package/dist/cjs/biz-components/Listing/utils/index.js +0 -2
- package/dist/cjs/biz-components/Listing/utils/index.js.map +0 -7
- package/dist/cjs/biz-components/Listing/utils/textFormat.d.ts +0 -73
- package/dist/cjs/biz-components/Listing/utils/textFormat.js +0 -2
- package/dist/cjs/biz-components/Listing/utils/textFormat.js.map +0 -7
- package/dist/cjs/biz-components/Paginator/index.d.ts +0 -7
- package/dist/cjs/biz-components/Paginator/index.js +0 -7
- package/dist/cjs/biz-components/Paginator/index.js.map +0 -7
- package/dist/cjs/biz-components/SelectStore/index.d.ts +0 -20
- package/dist/cjs/biz-components/SelectStore/index.js +0 -2
- package/dist/cjs/biz-components/SelectStore/index.js.map +0 -7
- package/dist/cjs/biz-components/Specs/dropdown.d.ts +0 -11
- package/dist/cjs/biz-components/Specs/dropdown.js +0 -3
- package/dist/cjs/biz-components/Specs/dropdown.js.map +0 -7
- package/dist/cjs/biz-components/Specs/index.d.ts +0 -6
- package/dist/cjs/biz-components/Specs/index.js +0 -2
- package/dist/cjs/biz-components/Specs/index.js.map +0 -7
- package/dist/cjs/biz-components/TabsGroup/index.d.ts +0 -7
- package/dist/cjs/biz-components/TabsGroup/index.js +0 -2
- package/dist/cjs/biz-components/TabsGroup/index.js.map +0 -7
- package/dist/cjs/biz-components/TabsGroup/types.d.ts +0 -16
- package/dist/cjs/biz-components/TabsGroup/types.js +0 -2
- package/dist/cjs/biz-components/TabsGroup/types.js.map +0 -7
- package/dist/cjs/biz-components/TextMarquee/index.d.ts +0 -9
- package/dist/cjs/biz-components/TextMarquee/index.js +0 -2
- package/dist/cjs/biz-components/TextMarquee/index.js.map +0 -7
- package/dist/cjs/components/breadcrumb.d.ts +0 -12
- package/dist/cjs/components/breadcrumb.js +0 -2
- package/dist/cjs/components/breadcrumb.js.map +0 -7
- package/dist/cjs/hooks/useRollout.d.ts +0 -1
- package/dist/cjs/hooks/useRollout.js +0 -2
- package/dist/cjs/hooks/useRollout.js.map +0 -7
- package/dist/cjs/stories/aplusdesc.stories.d.ts +0 -27
- package/dist/cjs/stories/aplusdesc.stories.js +0 -2
- package/dist/cjs/stories/aplusdesc.stories.js.map +0 -7
- package/dist/cjs/stories/download.stories.d.ts +0 -18
- package/dist/cjs/stories/download.stories.js +0 -2
- package/dist/cjs/stories/download.stories.js.map +0 -7
- package/dist/cjs/stories/features.stories.d.ts +0 -21
- package/dist/cjs/stories/features.stories.js +0 -2
- package/dist/cjs/stories/features.stories.js.map +0 -7
- package/dist/cjs/stories/footcharger.stories.d.ts +0 -19
- package/dist/cjs/stories/footcharger.stories.js +0 -2
- package/dist/cjs/stories/footcharger.stories.js.map +0 -7
- package/dist/cjs/stories/giftbox.stories.d.ts +0 -18
- package/dist/cjs/stories/giftbox.stories.js +0 -2
- package/dist/cjs/stories/giftbox.stories.js.map +0 -7
- package/dist/cjs/stories/graphicMore.stories.d.ts +0 -19
- package/dist/cjs/stories/graphicMore.stories.js +0 -2
- package/dist/cjs/stories/graphicMore.stories.js.map +0 -7
- package/dist/cjs/stories/selectstore.stories.d.ts +0 -18
- package/dist/cjs/stories/selectstore.stories.js +0 -2
- package/dist/cjs/stories/selectstore.stories.js.map +0 -7
- package/dist/esm/biz-components/AplusDesc/index.d.ts +0 -22
- package/dist/esm/biz-components/AplusDesc/index.js +0 -2
- package/dist/esm/biz-components/AplusDesc/index.js.map +0 -7
- package/dist/esm/biz-components/CollectionShelves/CollectionShelvesItem.d.ts +0 -4
- package/dist/esm/biz-components/CollectionShelves/CollectionShelvesItem.js +0 -2
- package/dist/esm/biz-components/CollectionShelves/CollectionShelvesItem.js.map +0 -7
- package/dist/esm/biz-components/CollectionShelves/index.d.ts +0 -6
- package/dist/esm/biz-components/CollectionShelves/index.js +0 -2
- package/dist/esm/biz-components/CollectionShelves/index.js.map +0 -7
- package/dist/esm/biz-components/CollectionsBanner/index.d.ts +0 -7
- package/dist/esm/biz-components/CollectionsBanner/index.js +0 -2
- package/dist/esm/biz-components/CollectionsBanner/index.js.map +0 -7
- package/dist/esm/biz-components/CollectionsBanner/types.d.ts +0 -43
- package/dist/esm/biz-components/CollectionsBanner/types.js +0 -1
- package/dist/esm/biz-components/CollectionsBanner/types.js.map +0 -7
- package/dist/esm/biz-components/CollectionsFilters/FilterCardWrap.d.ts +0 -17
- package/dist/esm/biz-components/CollectionsFilters/FilterCardWrap.js +0 -2
- package/dist/esm/biz-components/CollectionsFilters/FilterCardWrap.js.map +0 -7
- package/dist/esm/biz-components/CollectionsFilters/FilterCardWrapItem.d.ts +0 -10
- package/dist/esm/biz-components/CollectionsFilters/FilterCardWrapItem.js +0 -2
- package/dist/esm/biz-components/CollectionsFilters/FilterCardWrapItem.js.map +0 -7
- package/dist/esm/biz-components/CollectionsFilters/FilterHeader.d.ts +0 -13
- package/dist/esm/biz-components/CollectionsFilters/FilterHeader.js +0 -2
- package/dist/esm/biz-components/CollectionsFilters/FilterHeader.js.map +0 -7
- package/dist/esm/biz-components/CollectionsFilters/FilterList.d.ts +0 -14
- package/dist/esm/biz-components/CollectionsFilters/FilterList.js +0 -2
- package/dist/esm/biz-components/CollectionsFilters/FilterList.js.map +0 -7
- package/dist/esm/biz-components/CollectionsFilters/component/AnimatedUL.d.ts +0 -5
- package/dist/esm/biz-components/CollectionsFilters/component/AnimatedUL.js +0 -2
- package/dist/esm/biz-components/CollectionsFilters/component/AnimatedUL.js.map +0 -7
- package/dist/esm/biz-components/CollectionsFilters/component/TabFilter.d.ts +0 -12
- package/dist/esm/biz-components/CollectionsFilters/component/TabFilter.js +0 -2
- package/dist/esm/biz-components/CollectionsFilters/component/TabFilter.js.map +0 -7
- package/dist/esm/biz-components/CollectionsFilters/component/filtersFun.d.ts +0 -12
- package/dist/esm/biz-components/CollectionsFilters/component/filtersFun.js +0 -2
- package/dist/esm/biz-components/CollectionsFilters/component/filtersFun.js.map +0 -7
- package/dist/esm/biz-components/CollectionsFilters/component/helper.d.ts +0 -81
- package/dist/esm/biz-components/CollectionsFilters/component/helper.js +0 -2
- package/dist/esm/biz-components/CollectionsFilters/component/helper.js.map +0 -7
- package/dist/esm/biz-components/CollectionsFilters/component/price.d.ts +0 -25
- package/dist/esm/biz-components/CollectionsFilters/component/price.js +0 -2
- package/dist/esm/biz-components/CollectionsFilters/component/price.js.map +0 -7
- package/dist/esm/biz-components/CollectionsFilters/component/priceProps.d.ts +0 -215
- package/dist/esm/biz-components/CollectionsFilters/component/priceProps.js +0 -2
- package/dist/esm/biz-components/CollectionsFilters/component/priceProps.js.map +0 -7
- package/dist/esm/biz-components/CollectionsFilters/index.d.ts +0 -22
- package/dist/esm/biz-components/CollectionsFilters/index.js +0 -2
- package/dist/esm/biz-components/CollectionsFilters/index.js.map +0 -7
- package/dist/esm/biz-components/DownLoad/index.d.ts +0 -20
- package/dist/esm/biz-components/DownLoad/index.js +0 -2
- package/dist/esm/biz-components/DownLoad/index.js.map +0 -7
- package/dist/esm/biz-components/Features/index.d.ts +0 -26
- package/dist/esm/biz-components/Features/index.js +0 -2
- package/dist/esm/biz-components/Features/index.js.map +0 -7
- package/dist/esm/biz-components/FootCharger/index.d.ts +0 -12
- package/dist/esm/biz-components/FootCharger/index.js +0 -2
- package/dist/esm/biz-components/FootCharger/index.js.map +0 -7
- package/dist/esm/biz-components/GiftBox/index.d.ts +0 -17
- package/dist/esm/biz-components/GiftBox/index.js +0 -2
- package/dist/esm/biz-components/GiftBox/index.js.map +0 -7
- package/dist/esm/biz-components/GraphicMore/index.d.ts +0 -22
- package/dist/esm/biz-components/GraphicMore/index.js +0 -2
- package/dist/esm/biz-components/GraphicMore/index.js.map +0 -7
- package/dist/esm/biz-components/Listing/BizProductProvider.d.ts +0 -112
- package/dist/esm/biz-components/Listing/BizProductProvider.js +0 -2
- package/dist/esm/biz-components/Listing/BizProductProvider.js.map +0 -7
- package/dist/esm/biz-components/Listing/components/PaidShipping/LearnMore.d.ts +0 -2
- package/dist/esm/biz-components/Listing/components/PaidShipping/LearnMore.js +0 -2
- package/dist/esm/biz-components/Listing/components/PaidShipping/LearnMore.js.map +0 -7
- package/dist/esm/biz-components/Listing/components/PaidShipping/ShippingMethod.d.ts +0 -10
- package/dist/esm/biz-components/Listing/components/PaidShipping/ShippingMethod.js +0 -2
- package/dist/esm/biz-components/Listing/components/PaidShipping/ShippingMethod.js.map +0 -7
- package/dist/esm/biz-components/Listing/components/PaidShipping/ShippingPolicyModal.d.ts +0 -25
- package/dist/esm/biz-components/Listing/components/PaidShipping/ShippingPolicyModal.js +0 -2
- package/dist/esm/biz-components/Listing/components/PaidShipping/ShippingPolicyModal.js.map +0 -7
- package/dist/esm/biz-components/Listing/components/PaidShipping/index.d.ts +0 -12
- package/dist/esm/biz-components/Listing/components/PaidShipping/index.js +0 -2
- package/dist/esm/biz-components/Listing/components/PaidShipping/index.js.map +0 -7
- package/dist/esm/biz-components/Listing/components/PaidShipping/type.d.ts +0 -30
- package/dist/esm/biz-components/Listing/components/PaidShipping/type.js +0 -2
- package/dist/esm/biz-components/Listing/components/PaidShipping/type.js.map +0 -7
- package/dist/esm/biz-components/Listing/components/PaidShipping/utils.d.ts +0 -2
- package/dist/esm/biz-components/Listing/components/PaidShipping/utils.js +0 -2
- package/dist/esm/biz-components/Listing/components/PaidShipping/utils.js.map +0 -7
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/BenefitsTab.d.ts +0 -37
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/BenefitsTab.js +0 -40
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/BenefitsTab.js.map +0 -7
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/ProductBenefitsTabs/index.d.ts +0 -30
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/ProductBenefitsTabs/index.js +0 -2
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/ProductBenefitsTabs/index.js.map +0 -7
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/ProductBundle/index.d.ts +0 -2
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/ProductBundle/index.js +0 -2
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/ProductBundle/index.js.map +0 -7
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/ProductFreeGift/index.d.ts +0 -2
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/ProductFreeGift/index.js +0 -2
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/ProductFreeGift/index.js.map +0 -7
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/ProductHighlight/index.d.ts +0 -2
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/ProductHighlight/index.js +0 -2
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/ProductHighlight/index.js.map +0 -7
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/ProductOptions/index.d.ts +0 -2
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/ProductOptions/index.js +0 -2
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/ProductOptions/index.js.map +0 -7
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/index.d.ts +0 -2
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/index.js +0 -2
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/index.js.map +0 -7
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/types.d.ts +0 -43
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/types.js +0 -2
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/types.js.map +0 -7
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductGallery/components/CompareModal.d.ts +0 -2
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductGallery/components/CompareModal.js +0 -2
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductGallery/components/CompareModal.js.map +0 -7
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductGallery/components/Select.d.ts +0 -21
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductGallery/components/Select.js +0 -2
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductGallery/components/Select.js.map +0 -7
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductGallery/components/ShopifyColorOption.d.ts +0 -5
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductGallery/components/ShopifyColorOption.js +0 -2
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductGallery/components/ShopifyColorOption.js.map +0 -7
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductGallery/components/SpecsModal.d.ts +0 -1
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductGallery/components/SpecsModal.js +0 -2
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductGallery/components/SpecsModal.js.map +0 -7
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductGallery/index.d.ts +0 -2
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductGallery/index.js +0 -2
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductGallery/index.js.map +0 -7
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductGallery/types.d.ts +0 -35
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductGallery/types.js +0 -2
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductGallery/types.js.map +0 -7
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductGridBox.d.ts +0 -6
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductGridBox.js +0 -2
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductGridBox.js.map +0 -7
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductSummary/index.d.ts +0 -3
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductSummary/index.js +0 -2
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductSummary/index.js.map +0 -7
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductSummary/types.d.ts +0 -2
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductSummary/types.js +0 -1
- package/dist/esm/biz-components/Listing/components/ProductCard/ProductSummary/types.js.map +0 -7
- package/dist/esm/biz-components/Listing/components/ProductCard/index.d.ts +0 -2
- package/dist/esm/biz-components/Listing/components/ProductCard/index.js +0 -2
- package/dist/esm/biz-components/Listing/components/ProductCard/index.js.map +0 -7
- package/dist/esm/biz-components/Listing/components/PurchaseBar/ProductActions/index.d.ts +0 -2
- package/dist/esm/biz-components/Listing/components/PurchaseBar/ProductActions/index.js +0 -2
- package/dist/esm/biz-components/Listing/components/PurchaseBar/ProductActions/index.js.map +0 -7
- package/dist/esm/biz-components/Listing/components/PurchaseBar/ScrollSpyNav/index.d.ts +0 -4
- package/dist/esm/biz-components/Listing/components/PurchaseBar/ScrollSpyNav/index.js +0 -2
- package/dist/esm/biz-components/Listing/components/PurchaseBar/ScrollSpyNav/index.js.map +0 -7
- package/dist/esm/biz-components/Listing/components/PurchaseBar/ScrollSpyNav/types.d.ts +0 -10
- package/dist/esm/biz-components/Listing/components/PurchaseBar/ScrollSpyNav/types.js +0 -1
- package/dist/esm/biz-components/Listing/components/PurchaseBar/ScrollSpyNav/types.js.map +0 -7
- package/dist/esm/biz-components/Listing/components/PurchaseBar/index.d.ts +0 -3
- package/dist/esm/biz-components/Listing/components/PurchaseBar/index.js +0 -2
- package/dist/esm/biz-components/Listing/components/PurchaseBar/index.js.map +0 -7
- package/dist/esm/biz-components/Listing/components/PurchaseBar/types.d.ts +0 -12
- package/dist/esm/biz-components/Listing/components/PurchaseBar/types.js +0 -1
- package/dist/esm/biz-components/Listing/components/PurchaseBar/types.js.map +0 -7
- package/dist/esm/biz-components/Listing/components/index.d.ts +0 -3
- package/dist/esm/biz-components/Listing/components/index.js +0 -2
- package/dist/esm/biz-components/Listing/components/index.js.map +0 -7
- package/dist/esm/biz-components/Listing/const.d.ts +0 -28
- package/dist/esm/biz-components/Listing/const.js +0 -2
- package/dist/esm/biz-components/Listing/const.js.map +0 -7
- package/dist/esm/biz-components/Listing/hooks/use-options.d.ts +0 -3
- package/dist/esm/biz-components/Listing/hooks/use-options.js +0 -2
- package/dist/esm/biz-components/Listing/hooks/use-options.js.map +0 -7
- package/dist/esm/biz-components/Listing/hooks/use-variant-media.d.ts +0 -14
- package/dist/esm/biz-components/Listing/hooks/use-variant-media.js +0 -2
- package/dist/esm/biz-components/Listing/hooks/use-variant-media.js.map +0 -7
- package/dist/esm/biz-components/Listing/hooks/use-variant.d.ts +0 -5
- package/dist/esm/biz-components/Listing/hooks/use-variant.js +0 -2
- package/dist/esm/biz-components/Listing/hooks/use-variant.js.map +0 -7
- package/dist/esm/biz-components/Listing/hooks/useBenefits.d.ts +0 -50
- package/dist/esm/biz-components/Listing/hooks/useBenefits.js +0 -2
- package/dist/esm/biz-components/Listing/hooks/useBenefits.js.map +0 -7
- package/dist/esm/biz-components/Listing/hooks/useCopy.d.ts +0 -5
- package/dist/esm/biz-components/Listing/hooks/useCopy.js +0 -2
- package/dist/esm/biz-components/Listing/hooks/useCopy.js.map +0 -7
- package/dist/esm/biz-components/Listing/index.d.ts +0 -3
- package/dist/esm/biz-components/Listing/index.js +0 -2
- package/dist/esm/biz-components/Listing/index.js.map +0 -7
- package/dist/esm/biz-components/Listing/types/graphql.d.ts +0 -7473
- package/dist/esm/biz-components/Listing/types/graphql.js +0 -2
- package/dist/esm/biz-components/Listing/types/graphql.js.map +0 -7
- package/dist/esm/biz-components/Listing/types/product.d.ts +0 -141
- package/dist/esm/biz-components/Listing/types/product.js +0 -2
- package/dist/esm/biz-components/Listing/types/product.js.map +0 -7
- package/dist/esm/biz-components/Listing/types/productMetafields.d.js +0 -2
- package/dist/esm/biz-components/Listing/types/productMetafields.d.js.map +0 -7
- package/dist/esm/biz-components/Listing/types/type-helper.d.ts +0 -5
- package/dist/esm/biz-components/Listing/types/type-helper.js +0 -1
- package/dist/esm/biz-components/Listing/types/type-helper.js.map +0 -7
- package/dist/esm/biz-components/Listing/types.d.ts +0 -28
- package/dist/esm/biz-components/Listing/types.js +0 -1
- package/dist/esm/biz-components/Listing/types.js.map +0 -7
- package/dist/esm/biz-components/Listing/utils/helper.d.ts +0 -36
- package/dist/esm/biz-components/Listing/utils/helper.js +0 -2
- package/dist/esm/biz-components/Listing/utils/helper.js.map +0 -7
- package/dist/esm/biz-components/Listing/utils/index.d.ts +0 -37
- package/dist/esm/biz-components/Listing/utils/index.js +0 -2
- package/dist/esm/biz-components/Listing/utils/index.js.map +0 -7
- package/dist/esm/biz-components/Listing/utils/textFormat.d.ts +0 -73
- package/dist/esm/biz-components/Listing/utils/textFormat.js +0 -2
- package/dist/esm/biz-components/Listing/utils/textFormat.js.map +0 -7
- package/dist/esm/biz-components/Paginator/index.d.ts +0 -7
- package/dist/esm/biz-components/Paginator/index.js +0 -7
- package/dist/esm/biz-components/Paginator/index.js.map +0 -7
- package/dist/esm/biz-components/SelectStore/index.d.ts +0 -20
- package/dist/esm/biz-components/SelectStore/index.js +0 -2
- package/dist/esm/biz-components/SelectStore/index.js.map +0 -7
- package/dist/esm/biz-components/Specs/dropdown.d.ts +0 -11
- package/dist/esm/biz-components/Specs/dropdown.js +0 -3
- package/dist/esm/biz-components/Specs/dropdown.js.map +0 -7
- package/dist/esm/biz-components/Specs/index.d.ts +0 -6
- package/dist/esm/biz-components/Specs/index.js +0 -2
- package/dist/esm/biz-components/Specs/index.js.map +0 -7
- package/dist/esm/biz-components/TabsGroup/index.d.ts +0 -7
- package/dist/esm/biz-components/TabsGroup/index.js +0 -2
- package/dist/esm/biz-components/TabsGroup/index.js.map +0 -7
- package/dist/esm/biz-components/TabsGroup/types.d.ts +0 -16
- package/dist/esm/biz-components/TabsGroup/types.js +0 -1
- package/dist/esm/biz-components/TabsGroup/types.js.map +0 -7
- package/dist/esm/biz-components/TextMarquee/index.d.ts +0 -9
- package/dist/esm/biz-components/TextMarquee/index.js +0 -2
- package/dist/esm/biz-components/TextMarquee/index.js.map +0 -7
- package/dist/esm/components/breadcrumb.d.ts +0 -12
- package/dist/esm/components/breadcrumb.js +0 -2
- package/dist/esm/components/breadcrumb.js.map +0 -7
- package/dist/esm/hooks/useRollout.d.ts +0 -1
- package/dist/esm/hooks/useRollout.js +0 -2
- package/dist/esm/hooks/useRollout.js.map +0 -7
- package/dist/esm/stories/aplusdesc.stories.d.ts +0 -27
- package/dist/esm/stories/aplusdesc.stories.js +0 -2
- package/dist/esm/stories/aplusdesc.stories.js.map +0 -7
- package/dist/esm/stories/download.stories.d.ts +0 -18
- package/dist/esm/stories/download.stories.js +0 -2
- package/dist/esm/stories/download.stories.js.map +0 -7
- package/dist/esm/stories/features.stories.d.ts +0 -21
- package/dist/esm/stories/features.stories.js +0 -2
- package/dist/esm/stories/features.stories.js.map +0 -7
- package/dist/esm/stories/footcharger.stories.d.ts +0 -19
- package/dist/esm/stories/footcharger.stories.js +0 -2
- package/dist/esm/stories/footcharger.stories.js.map +0 -7
- package/dist/esm/stories/giftbox.stories.d.ts +0 -18
- package/dist/esm/stories/giftbox.stories.js +0 -2
- package/dist/esm/stories/giftbox.stories.js.map +0 -7
- package/dist/esm/stories/graphicMore.stories.d.ts +0 -19
- package/dist/esm/stories/graphicMore.stories.js +0 -2
- package/dist/esm/stories/graphicMore.stories.js.map +0 -7
- package/dist/esm/stories/selectstore.stories.d.ts +0 -18
- package/dist/esm/stories/selectstore.stories.js +0 -2
- package/dist/esm/stories/selectstore.stories.js.map +0 -7
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/stories/selectstore.stories.tsx"],
|
|
4
|
-
"sourcesContent": ["import type { Meta } from '@storybook/react'\nimport { SelectStore } from '../biz-components/index.js'\n\nconst meta = {\n title: 'Biz-Components/SelectStore',\n component: SelectStore,\n tags: ['autodocs'],\n parameters: {\n layout: 'centered',\n },\n} satisfies Meta<typeof SelectStore>\n\nexport default meta\n\nconst data = {\n list: [\n {\n title: 'Ultra-Long Playtime:',\n desc: 'Rich and secure payment methods, fast and secure materials',\n img: {\n url: 'https://cdn.shopify.com/s/files/1/0521/9411/5753/files/image_1750.png?v=1758613055',\n alt: 'Creative Module',\n },\n mobileImg: {\n url: 'https://cdn.shopify.com/s/files/1/0521/9411/5753/files/image_1750.png?v=1758613055',\n alt: 'Creative Module',\n },\n padImg: {\n url: 'https://cdn.shopify.com/s/files/1/0521/9411/5753/files/image_1750.png?v=1758613055',\n alt: 'Creative Module',\n },\n miniImg: {\n url: 'https://cdn.shopify.com/s/files/1/0521/9411/5753/files/image_1750.png?v=1758613055',\n alt: 'Creative Module',\n },\n },\n {\n title: 'Delivery Method',\n desc: 'Fast and secure delivery',\n img: {\n url: 'https://cdn.shopify.com/s/files/1/0521/9411/5753/files/image_1750.png?v=1758613055',\n alt: 'Creative Module',\n },\n mobileImg: {\n url: 'https://cdn.shopify.com/s/files/1/0521/9411/5753/files/image_1750.png?v=1758613055',\n alt: 'Creative Module',\n },\n padImg: {\n url: 'https://cdn.shopify.com/s/files/1/0521/9411/5753/files/image_1750.png?v=1758613055',\n alt: 'Creative Module',\n },\n miniImg: {\n url: 'https://cdn.shopify.com/s/files/1/0521/9411/5753/files/image_1750.png?v=1758613055',\n alt: 'Creative Module',\n },\n },\n {\n title: 'Service and Benefits',\n desc: 'Fast and secure delivery',\n img: {\n url: 'https://cdn.shopify.com/s/files/1/0521/9411/5753/files/image_1750.png?v=1758613055',\n alt: 'Creative Module',\n },\n mobileImg: {\n url: 'https://cdn.shopify.com/s/files/1/0521/9411/5753/files/image_1750.png?v=1758613055',\n alt: 'Creative Module',\n },\n padImg: {\n url: 'https://cdn.shopify.com/s/files/1/0521/9411/5753/files/image_1750.png?v=1758613055',\n alt: 'Creative Module',\n },\n miniImg: {\n url: 'https://cdn.shopify.com/s/files/1/0521/9411/5753/files/image_1750.png?v=1758613055',\n alt: 'Creative Module',\n },\n },\n ],\n} as {\n list: {\n title: string\n desc: string\n img: {\n url: string\n alt: string\n }\n mobileImg: {\n url: string\n alt: string\n }\n padImg: {\n url: string\n alt: string\n }\n miniImg: {\n url: string\n alt: string\n }\n }[]\n}\n\nexport const Default = () => <SelectStore data={data} />\n\n// list: [\n// {\n// title: 'Ultra-Long Playtime:',\n// desc: 'Rich and secure payment methods, fast and secure materials',\n// pay: [\n// {\n// img: {\n// url: 'https://cdn.shopify.com/s/files/1/0521/9411/5753/files/image_1750.png?v=1758613055',\n// alt: 'Creative Module',\n// },\n// },\n// {\n// img: {\n// url: 'https://cdn.shopify.com/s/files/1/0521/9411/5753/files/image_1750.png?v=1758613055',\n// alt: 'Creative Module',\n// },\n// },\n// {\n// img: {\n// url: 'https://cdn.shopify.com/s/files/1/0521/9411/5753/files/image_1750.png?v=1758613055',\n// alt: 'Creative Module',\n// },\n// },\n// {\n// img: {\n// url: 'https://cdn.shopify.com/s/files/1/0521/9411/5753/files/image_1750.png?v=1758613055',\n// alt: 'Creative Module',\n// },\n// },\n// {\n// img: {\n// url: 'https://cdn.shopify.com/s/files/1/0521/9411/5753/files/image_1750.png?v=1758613055',\n// alt: 'Creative Module',\n// },\n// },\n// {\n// img: {\n// url: 'https://cdn.shopify.com/s/files/1/0521/9411/5753/files/image_1750.png?v=1758613055',\n// alt: 'Creative Module',\n// },\n// },\n// {\n// img: {\n// url: 'https://cdn.shopify.com/s/files/1/0521/9411/5753/files/image_1750.png?v=1758613055',\n// alt: 'Creative Module',\n// },\n// }\n// ],\n// delivery: [\n// ],\n// service: []\n// },\n// {\n// title: 'Delivery Method',\n// desc: 'Fast and secure delivery',\n// pay: [\n \n// ],\n// service: [\n// ],\n// delivery: [\n// {\n// img: {\n// url: 'https://cdn.shopify.com/s/files/1/0521/9411/5753/files/american-express-png-transparent-image_1.png?v=1758617366',\n// alt: 'Creative Module',\n// },\n// },\n// {\n// img: {\n// url: 'https://cdn.shopify.com/s/files/1/0521/9411/5753/files/image_1750.png?v=1758613055',\n// alt: 'Creative Module',\n// },\n// },\n// {\n// img: {\n// url: 'https://cdn.shopify.com/s/files/1/0521/9411/5753/files/image_1750.png?v=1758613055',\n// alt: 'Creative Module',\n// },\n// },\n// ],\n// },\n// {\n// title: 'Service and Benefits',\n// desc: 'Fast and secure delivery',\n// pay: [\n// ],\n// delivery: [\n// ],\n// service: [\n// {\n// title: 'Fast, Free Shipping',\n// img: {\n// url: 'https://cdn.shopify.com/s/files/1/0521/9411/5753/files/Frame_2121237171.png?v=1758620303',\n// alt: 'Creative Module',\n// },\n// },\n// {\n// title: '30-Day Money-Back Guarantee',\n// img: {\n// url: 'https://cdn.shopify.com/s/files/1/0521/9411/5753/files/Frame_2121237171.png?v=1758620303',\n// alt: 'Creative Module',\n// },\n// },\n// {\n// title: 'Hassle-Free Warranty',\n// img: {\n// url: 'https://cdn.shopify.com/s/files/1/0521/9411/5753/files/Frame_2121237171.png?v=1758620303',\n// alt: 'Creative Module',\n// },\n// },\n// {\n// title: 'Lifetime Customer Support',\n// img: {\n// url: 'https://cdn.shopify.com/s/files/1/0521/9411/5753/files/Frame_2121237171.png?v=1758620303',\n// alt: 'Creative Module',\n// },\n// },\n// {\n// title: 'Lifetime Customer Support',\n// img: {\n// url: 'https://cdn.shopify.com/s/files/1/0521/9411/5753/files/Frame_2121237171.png?v=1758620303',\n// alt: 'Creative Module',\n// },\n// }\n// ],\n// },\n// ],"],
|
|
5
|
-
"mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,EAAA,YAAAC,IAAA,eAAAC,EAAAJ,GAoG6B,IAAAK,EAAA,6BAnG7BC,EAA4B,sCAE5B,MAAMC,EAAO,CACX,MAAO,6BACP,UAAW,cACX,KAAM,CAAC,UAAU,EACjB,WAAY,CACV,OAAQ,UACV,CACF,EAEA,IAAOJ,EAAQI,EAEf,MAAMC,EAAO,CACX,KAAM,CACJ,CACE,MAAO,uBACP,KAAM,6DACN,IAAK,CACH,IAAK,qFACL,IAAK,iBACP,EACA,UAAW,CACT,IAAK,qFACL,IAAK,iBACP,EACA,OAAQ,CACN,IAAK,qFACL,IAAK,iBACP,EACA,QAAS,CACP,IAAK,qFACL,IAAK,iBACP,CACF,EACA,CACE,MAAO,kBACP,KAAM,2BACN,IAAK,CACH,IAAK,qFACL,IAAK,iBACP,EACA,UAAW,CACT,IAAK,qFACL,IAAK,iBACP,EACA,OAAQ,CACN,IAAK,qFACL,IAAK,iBACP,EACA,QAAS,CACP,IAAK,qFACL,IAAK,iBACP,CACF,EACA,CACE,MAAO,uBACP,KAAM,2BACN,IAAK,CACH,IAAK,qFACL,IAAK,iBACP,EACA,UAAW,CACT,IAAK,qFACL,IAAK,iBACP,EACA,OAAQ,CACN,IAAK,qFACL,IAAK,iBACP,EACA,QAAS,CACP,IAAK,qFACL,IAAK,iBACP,CACF,CACF,CACF,EAuBaN,EAAU,OAAM,OAAC,eAAY,KAAMM,EAAM",
|
|
6
|
-
"names": ["selectstore_stories_exports", "__export", "Default", "selectstore_stories_default", "__toCommonJS", "import_jsx_runtime", "import_biz_components", "meta", "data"]
|
|
7
|
-
}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import type { Img } from '../../types/props.js';
|
|
2
|
-
type AplusItem = {
|
|
3
|
-
img: Img;
|
|
4
|
-
mobileImg: Img;
|
|
5
|
-
title: string;
|
|
6
|
-
desc: string;
|
|
7
|
-
theme: 'light' | 'dark';
|
|
8
|
-
};
|
|
9
|
-
type AplusDescType = {
|
|
10
|
-
data: {
|
|
11
|
-
title: string;
|
|
12
|
-
img: Img;
|
|
13
|
-
mobileImg: Img;
|
|
14
|
-
list: AplusItem[];
|
|
15
|
-
};
|
|
16
|
-
className?: string;
|
|
17
|
-
};
|
|
18
|
-
declare const _default: import("react").ForwardRefExoticComponent<Omit<AplusDescType, keyof import("../../shared/Styles.js").StylesProps> & Partial<import("../../shared/Styles.js").StylesProps & import("../../shared/Styles.js").ContainerProps> & {
|
|
19
|
-
className?: string;
|
|
20
|
-
data?: Record<string, any>;
|
|
21
|
-
} & import("react").RefAttributes<any>>;
|
|
22
|
-
export default _default;
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use client";import{Fragment as k,jsx as e,jsxs as s}from"react/jsx-runtime";import{cn as x}from"../../helpers/utils.js";import{withLayout as c}from"../../shared/Styles.js";import{Picture as o,Text as p}from"../../components/index.js";const u=d=>{const{data:t,className:n}=d,{title:a,img:m,mobileImg:i,list:g}=t;return e(k,{children:s("div",{className:"w-full",children:[s("div",{className:"flex desktop:items-center desktop:justify-between desktop:flex-row flex-col w-full",children:[e("div",{className:" desktop:w-[600px] lg-desktop:w-[800px]",children:a&&e(p,{html:a,className:"desktop:text-[16px] lg-desktop:text-[18px] text-[14px] font-bold leading-[1.2]"})}),s("div",{children:[m?.url&&e(o,{className:"w-[464px] rounded-2xl hidden desktop:block",imgClassName:"",source:t?.img?.url,alt:t?.img?.alt||""}),i?.url&&e(o,{className:"w-[224px] rounded-2xl block desktop:hidden",imgClassName:"",source:t?.mobileImg?.url,alt:t?.mobileImg?.alt||""})]})]}),e("div",{className:"mt-[24px] grid tablet:grid-cols-2 desktop:grid-cols-3 grid-cols-1 gap-[16px] desktop:gap-[24px] lg-desktop:gap-[32px]",children:g.map((l,r)=>s("div",{className:"relative",children:[e(o,{className:" rounded-2xl",imgClassName:"",source:l?.img?.url,alt:l?.img?.alt||""}),s("div",{className:x("text-info-primary absolute bottom-[16px] left-[16px] flex flex-col desktop:bottom-[24px] desktop:left-[24px] lg-desktop:bottom-[32px] lg-desktop:left-[32px]",{"aiui-dark":l.theme==="dark"}),children:[e(p,{html:l?.title,className:" lg-desktop:text-[24px] text-[20px] font-bold leading-[1.2]"}),e(p,{html:l?.desc,className:" lg-desktop:text-[16px] text-[14px] font-bold leading-[1.4]"})]})]},r))})]})})};var v=c(u);export{v as default};
|
|
2
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../../src/biz-components/AplusDesc/index.tsx"],
|
|
4
|
-
"sourcesContent": ["'use client'\nimport { cn } from '../../helpers/utils.js'\nimport type { Img } from '../../types/props.js'\nimport { withLayout } from '../../shared/Styles.js'\nimport { Picture, Text } from '../../components/index.js'\n\n\ntype AplusItem = {\n img: Img\n mobileImg: Img\n title: string\n desc: string\n theme: 'light' | 'dark'\n}\n\ntype AplusDescType = {\n data: {\n title: string\n img: Img\n mobileImg: Img\n list: AplusItem[]\n }\n className?: string\n}\n\nconst AplusDesc = (props: AplusDescType) => {\n const { data, className } = props\n const { title, img , mobileImg,list} = data\n\n return (\n <>\n <div className='w-full'>\n <div className='flex desktop:items-center desktop:justify-between desktop:flex-row flex-col w-full'>\n <div className=' desktop:w-[600px] lg-desktop:w-[800px]'>\n {title && (\n <Text\n html={title}\n className=\"desktop:text-[16px] lg-desktop:text-[18px] text-[14px] font-bold leading-[1.2]\"\n />\n )}\n </div>\n <div>\n {img?.url && (\n <Picture\n className=\"w-[464px] rounded-2xl hidden desktop:block\"\n imgClassName=\"\"\n source={data?.img?.url}\n alt={data?.img?.alt || ''}\n />\n )}\n {mobileImg?.url && (\n <Picture\n className=\"w-[224px] rounded-2xl block desktop:hidden\"\n imgClassName=\"\"\n source={data?.mobileImg?.url}\n alt={data?.mobileImg?.alt || ''}\n />\n )}\n </div>\n </div>\n <div className='mt-[24px] grid tablet:grid-cols-2 desktop:grid-cols-3 grid-cols-1 gap-[16px] desktop:gap-[24px] lg-desktop:gap-[32px]'>\n {list.map((item,ind)=>(\n <div key={ind} className='relative'>\n <Picture\n className=\" rounded-2xl\"\n imgClassName=\"\"\n source={item?.img?.url}\n alt={item?.img?.alt || ''}\n />\n <div className={cn(\n 'text-info-primary absolute bottom-[16px] left-[16px] flex flex-col desktop:bottom-[24px] desktop:left-[24px] lg-desktop:bottom-[32px] lg-desktop:left-[32px]',\n {\n 'aiui-dark': item.theme === 'dark',\n }\n )}>\n <Text html={item?.title} className=\" lg-desktop:text-[24px] text-[20px] font-bold leading-[1.2]\" />\n <Text html={item?.desc} className=\" lg-desktop:text-[16px] text-[14px] font-bold leading-[1.4]\" />\n </div>\n </div>\n ))}\n </div>\n </div>\n </>\n )\n}\n\nexport default withLayout(AplusDesc)\n"],
|
|
5
|
-
"mappings": "aA8BI,mBAAAA,EAKY,OAAAC,EAMJ,QAAAC,MAXR,oBA7BJ,OAAS,MAAAC,MAAU,yBAEnB,OAAS,cAAAC,MAAkB,yBAC3B,OAAS,WAAAC,EAAS,QAAAC,MAAY,4BAqB9B,MAAMC,EAAaC,GAAyB,CAC1C,KAAM,CAAE,KAAAC,EAAM,UAAAC,CAAU,EAAIF,EACtB,CAAE,MAAAG,EAAO,IAAAC,EAAM,UAAAC,EAAU,KAAAC,CAAI,EAAIL,EAEvC,OACER,EAAAD,EAAA,CACE,SAAAE,EAAC,OAAI,UAAU,SACb,UAAAA,EAAC,OAAI,UAAU,qFACX,UAAAD,EAAC,OAAI,UAAU,0CACV,SAAAU,GACDV,EAACK,EAAA,CACG,KAAMK,EACN,UAAU,iFACd,EAEJ,EACAT,EAAC,OACI,UAAAU,GAAK,KACNX,EAACI,EAAA,CACG,UAAU,6CACV,aAAa,GACb,OAAQI,GAAM,KAAK,IACnB,IAAKA,GAAM,KAAK,KAAO,GAC3B,EAEHI,GAAW,KACRZ,EAACI,EAAA,CACG,UAAU,6CACV,aAAa,GACb,OAAQI,GAAM,WAAW,IACzB,IAAKA,GAAM,WAAW,KAAO,GACjC,GAEJ,GACJ,EACAR,EAAC,OAAI,UAAU,wHACV,SAAAa,EAAK,IAAI,CAACC,EAAKC,IACZd,EAAC,OAAc,UAAU,WACrB,UAAAD,EAACI,EAAA,CACG,UAAU,eACV,aAAa,GACb,OAAQU,GAAM,KAAK,IACnB,IAAKA,GAAM,KAAK,KAAO,GAC3B,EACAb,EAAC,OAAI,UAAWC,EACZ,+JACA,CACI,YAAaY,EAAK,QAAU,MAChC,CACJ,EACI,UAAAd,EAACK,EAAA,CAAK,KAAMS,GAAM,MAAO,UAAU,8DAA8D,EACjGd,EAACK,EAAA,CAAK,KAAMS,GAAM,KAAM,UAAU,8DAA8D,GACpG,IAfMC,CAgBV,CACH,EACL,GACF,EACF,CAEJ,EAEA,IAAOC,EAAQb,EAAWG,CAAS",
|
|
6
|
-
"names": ["Fragment", "jsx", "jsxs", "cn", "withLayout", "Picture", "Text", "AplusDesc", "props", "data", "className", "title", "img", "mobileImg", "list", "item", "ind", "AplusDesc_default"]
|
|
7
|
-
}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{Fragment as W,jsx as o,jsxs as r}from"react/jsx-runtime";import{cn as d}from"../../helpers/utils.js";import I from"../../components/badge.js";import{Text as E}from"../../components/text.js";import g from"../../components/button.js";import{gaTrack as j}from"../../shared/track.js";import{useState as v,useEffect as k}from"react";import S from"../../components/picture.js";import{Heading as A}from"../../components/heading.js";import{useAiuiContext as L}from"../AiuiProvider/index.js";import{trackUrlRef as U}from"../../shared/trackUrlRef.js";import{formatVariantPrice as H}from"../ShelfDisplay/shelfDisplay.js";const R="image",z="collectio_shelves",M=999999999e-2,le=({data:e,configuration:t})=>{const{itemShape:w}=t||{},{locale:a="us"}=L(),[_,N]=v(""),T=(l,i,n)=>t?.event?.primaryButton?.(l,i+1,n),B=(l,i,n)=>t?.event?.secondaryButton?.(l,i+1,n),s=e?.variants?.find(l=>l?.sku===e?.sku)||e?.variants?.[0]||{},p=!s?.availableForSale||s?.price?.amount===M,C=t?.isShowTag,h=t?.isShowOriginalPrice,[x,D]=v([]),[$,y]=v(!1),u=s?.coupons?.[0],{price:F,basePrice:O,discount:c}=H({locale:a,amount:h&&u?u.variant_price4wscode:s.price,baseAmount:h&&u?s.price:0,currencyCode:e?.price?.currencyCode||"USD"}),P=()=>{const l=e?.sku,i=e?.variants;return i?.find(f=>f?.sku===l)?.image?.url||i?.[0]?.image?.url||""},m=e?.custom_name||e?.title||e?.name,b=e?.custom_description||e?.description;return k(()=>{let l=[];if(c){const n=`${c}${t?.metafields?.discounts?.off||""}`;l.push(n)}const i=e?.tags?.filter?.(n=>n?.startsWith?.("CLtag"))?.map?.(n=>n?.replace?.("CLtag:",""))?.slice?.(0,c?1:2);D(l.concat(i))},[c,t?.metafields?.discounts,e?.tags]),k(()=>{const{infos:l}=s?.metafields||{},{productInfos:i,preRender:n}=e?.metafields||{},{shopCommon:f}=t?.metafields||{};N(l?.comingSoon||i?.comingSoon||n?.soldOut||f?.soldOut||"")},[e,s]),o("div",{className:d(w==="rounded"?"rounded-2xl":"rounded-none","bg-[#EAEAEC] tablet:hover:bg-[#FFFFFF] box-border w-full cursor-pointer overflow-hidden duration-300","collection-shelves-item",{"aiui-dark":e?.custom_theme==="dark"}),children:r("div",{className:"h-full box-border flex flex-col justify-between overflow-hidden",children:[o("div",{onMouseEnter:()=>y(!0),onMouseLeave:()=>y(!1),className:d("desktop:p-6 p-4 relative inline-block w-full lg-desktop:h-[288px] desktop:h-[234px] h-[182px] overflow-hidden cursor-pointer"),children:r("a",{"aria-label":m,target:t?.target,href:U(`${a==="us"||!a?"":`/${a}`}/products/${e?.handle}`,`${R}_${z}`),onClick:()=>{j({event:"ga4Event",event_name:"select_item",event_parameters:{page_group:"Home Page",item_list_name:"Home_Page_Bundle",items:[{item_id:e?.sku||s?.sku,item_name:e?.name,item_variant:s?.name,price:s?.price,index:t?.index+1}]}})},children:[o(S,{alt:"",source:P(),className:"flex h-full justify-center object-cover [&_img]:h-full [&_img]:w-auto"}),o(S,{alt:"",source:e?.custom_image,className:d($?"opacity-100":"opacity-0","absolute inset-x-0 top-0 h-full object-cover [&_img]:size-full transition-all duration-300")})]})}),r("div",{className:"overflow-hidden flex flex-col justify-end desktop:p-6 p-4 flex-1 box-border collection-shelves-product-content",children:[C&&x?.length?o("div",{className:"mb-2 box-border flex flex-wrap gap-1 overflow-hidden",children:x?.map?.((l,i)=>o(I,{children:l},i))}):null,m?o(A,{as:"h3",title:m||"",html:m||"",className:"lg-desktop:text-2xl lg-desktop:leading-7 tablet:text-xl collection-shelves-product-title line-clamp-2 text-info-primary font-bold tablet:leading-6 text-base"}):null,b?o(E,{size:2,html:b||"",className:"lg-desktop:text-lg desktop:text-base collection-shelves-product-description line-clamp-1 text-sm font-bold text-info-primary"}):null,o("div",{className:"mb-1 mt-4 flex items-center",children:p?o("div",{className:"tablet:text-2xl text-info-primary text-xl font-bold",children:_||""}):r(W,{children:[o("div",{className:"final-price tablet:text-2xl text-info-primary text-xl font-bold",children:s?.availableForSale&&F||""}),o("div",{className:"origin-price tablet:text-xl text-info-secondary ml-1 text-lg font-bold line-through",children:s?.availableForSale&&O||""})]})}),r("div",{className:d("shelf-flex-button-group","lg-desktop:gap-3 flex items-center gap-2",t.direction==="vertical"?"flex-col":""),children:[t?.secondaryButton?o(g,{variant:"secondary",onClick:()=>B(e,t?.index,t),className:`overflow-hidden font-bold ${t.direction==="vertical"?"w-full":""} ${t?.shape==="rounded"?"rounded-2xl":""}`,children:t?.secondaryButton||""}):null,t?.primaryButton&&!p?o(g,{variant:"primary",disabled:p,onClick:()=>T(e,t?.index,t),className:`overflow-hidden font-bold ${t.direction==="vertical"?"w-full":""} ${t?.shape==="rounded"?"rounded-2xl":""}`,children:t?.primaryButton||""}):null]})]})]})},e?.id||e?.handle)};export{le as CollectionShelvesWrapItem};
|
|
2
|
-
//# sourceMappingURL=CollectionShelvesItem.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../../src/biz-components/CollectionShelves/CollectionShelvesItem.tsx"],
|
|
4
|
-
"sourcesContent": ["import { cn } from '../../helpers/utils.js'\nimport Badge from '../../components/badge.js'\nimport { Text } from '../../components/text.js'\nimport Button from '../../components/button.js'\nimport { gaTrack } from '../../shared/track.js'\nimport { useState, useEffect } from 'react'\nimport Picture from '../../components/picture.js'\nimport { Heading } from '../../components/heading.js'\nimport { useAiuiContext } from '../AiuiProvider/index.js'\nimport { trackUrlRef } from '../../shared/trackUrlRef.js'\nimport { formatVariantPrice } from '../ShelfDisplay/shelfDisplay.js'\nimport type { ShelfDisplayItem, ShelfDisplayType } from '../ShelfDisplay/shelfDisplay.js'\n\nconst componentType = 'image'\nconst componentName = 'collectio_shelves'\n\nconst SOLD_OUT_PRICE = 9999999.99\n\nexport const CollectionShelvesWrapItem = ({ data, configuration }: { data: any; configuration?: any }) => {\n const { itemShape } = configuration || {}\n const { locale = 'us' } = useAiuiContext()\n\n const [soldOutText, setSoldOutText] = useState<string>('')\n\n const onPrimaryButton = (params: ShelfDisplayItem, index: number, data: ShelfDisplayType) =>\n configuration?.event?.primaryButton?.(params, index + 1, data)\n\n const onSecondaryButton = (params: ShelfDisplayItem, index: number, data: ShelfDisplayType) =>\n configuration?.event?.secondaryButton?.(params, index + 1, data)\n\n const variant = data?.variants?.find((item: any) => item?.sku === data?.sku) || data?.variants?.[0] || {}\n\n const isSoldOut = !variant?.availableForSale || variant?.price?.amount === SOLD_OUT_PRICE\n const isShowTag = configuration?.isShowTag\n const isShowOriginalPrice = configuration?.isShowOriginalPrice\n\n const [showTags, setShowTags] = useState<string[]>([])\n const [showImage, setShowImage] = useState<boolean>(false)\n\n // active \u7684 \u901A\u7528\u6298\u6263\n const coupon = variant?.coupons?.[0]\n\n const { price, basePrice, discount } = formatVariantPrice({\n locale: locale,\n amount: isShowOriginalPrice && coupon ? coupon.variant_price4wscode : variant.price,\n baseAmount: isShowOriginalPrice && coupon ? variant.price : 0,\n currencyCode: data?.price?.currencyCode || 'USD',\n })\n\n const handleUrl = () => {\n const sku = data?.sku\n const skuArray = data?.variants\n const findSku = skuArray?.find((item: any) => item?.sku === sku)\n return findSku?.image?.url || skuArray?.[0]?.image?.url || ''\n }\n\n const displayTitle = data?.custom_name || data?.title || data?.name\n const displayDescription = data?.custom_description || data?.description\n\n useEffect(() => {\n let handleTags: string[] = []\n if (discount) {\n const discountTag = `${discount}${configuration?.metafields?.discounts?.off || ''}`\n handleTags.push(discountTag)\n }\n const newTags = data?.tags\n ?.filter?.((item: string) => item?.startsWith?.('CLtag'))\n ?.map?.((item: string) => item?.replace?.('CLtag:', ''))\n ?.slice?.(0, discount ? 1 : 2)\n setShowTags(handleTags.concat(newTags))\n }, [discount, configuration?.metafields?.discounts, data?.tags])\n\n useEffect(() => {\n const { infos } = variant?.metafields || {}\n const { productInfos, preRender } = data?.metafields || {}\n const { shopCommon } = configuration?.metafields || {}\n setSoldOutText(infos?.comingSoon || productInfos?.comingSoon || preRender?.soldOut || shopCommon?.soldOut || '')\n }, [data, variant])\n\n return (\n <div\n key={data?.id || data?.handle}\n className={cn(\n itemShape === 'rounded' ? 'rounded-2xl' : 'rounded-none',\n 'bg-[#EAEAEC] tablet:hover:bg-[#FFFFFF] box-border w-full cursor-pointer overflow-hidden duration-300',\n 'collection-shelves-item',\n {\n 'aiui-dark': data?.custom_theme === 'dark',\n }\n )}\n >\n <div className=\"h-full box-border flex flex-col justify-between overflow-hidden\">\n <div\n onMouseEnter={() => setShowImage(true)}\n onMouseLeave={() => setShowImage(false)}\n className={cn(\n 'desktop:p-6 p-4 relative inline-block w-full lg-desktop:h-[288px] desktop:h-[234px] h-[182px] overflow-hidden cursor-pointer'\n )}\n >\n <a\n aria-label={displayTitle}\n target={configuration?.target}\n href={trackUrlRef(\n `${locale === 'us' || !locale ? '' : `/${locale}`}/products/${data?.handle}`,\n `${componentType}_${componentName}`\n )}\n onClick={() => {\n gaTrack({\n event: 'ga4Event',\n event_name: 'select_item',\n event_parameters: {\n page_group: 'Home Page',\n item_list_name: 'Home_Page_Bundle',\n items: [\n {\n item_id: data?.sku || variant?.sku,\n item_name: data?.name,\n item_variant: variant?.name,\n price: variant?.price,\n index: configuration?.index + 1,\n },\n ],\n },\n })\n }}\n >\n <Picture\n alt=\"\"\n source={handleUrl()}\n className=\"flex h-full justify-center object-cover [&_img]:h-full [&_img]:w-auto\"\n />\n <Picture\n alt=\"\"\n source={data?.custom_image}\n className={cn(\n showImage ? 'opacity-100' : 'opacity-0',\n 'absolute inset-x-0 top-0 h-full object-cover [&_img]:size-full transition-all duration-300'\n )}\n />\n </a>\n </div>\n <div className=\"overflow-hidden flex flex-col justify-end desktop:p-6 p-4 flex-1 box-border collection-shelves-product-content\">\n {isShowTag && showTags?.length ? (\n <div className=\"mb-2 box-border flex flex-wrap gap-1 overflow-hidden\">\n {showTags?.map?.((item: any, index: number) => <Badge key={index}>{item}</Badge>)}\n </div>\n ) : null}\n {displayTitle ? (\n <Heading\n as=\"h3\"\n title={displayTitle || ''}\n html={displayTitle || ''}\n className=\"lg-desktop:text-2xl lg-desktop:leading-7 tablet:text-xl collection-shelves-product-title line-clamp-2 text-info-primary font-bold tablet:leading-6 text-base\"\n />\n ) : null}\n {displayDescription ? (\n <Text\n size={2}\n html={displayDescription || ''}\n className=\"lg-desktop:text-lg desktop:text-base collection-shelves-product-description line-clamp-1 text-sm font-bold text-info-primary\"\n />\n ) : null}\n <div className=\"mb-1 mt-4 flex items-center\">\n {isSoldOut ? (\n <div className=\"tablet:text-2xl text-info-primary text-xl font-bold\">{soldOutText || ''}</div>\n ) : (\n <>\n <div className=\"final-price tablet:text-2xl text-info-primary text-xl font-bold\">\n {variant?.availableForSale ? price || '' : ''}\n </div>\n <div className=\"origin-price tablet:text-xl text-info-secondary ml-1 text-lg font-bold line-through\">\n {variant?.availableForSale ? basePrice || '' : ''}\n </div>\n </>\n )}\n </div>\n {/* \u6309\u94AE\u7EC4 */}\n <div\n className={cn(\n 'shelf-flex-button-group',\n 'lg-desktop:gap-3 flex items-center gap-2',\n configuration.direction === 'vertical' ? 'flex-col' : ''\n )}\n >\n {configuration?.secondaryButton ? (\n <Button\n variant=\"secondary\"\n onClick={() => onSecondaryButton(data, configuration?.index, configuration)}\n className={`overflow-hidden font-bold ${configuration.direction === 'vertical' ? 'w-full' : ''} ${configuration?.shape === 'rounded' ? 'rounded-2xl' : ''}`}\n >\n {configuration?.secondaryButton || ''}\n </Button>\n ) : null}\n {configuration?.primaryButton && !isSoldOut ? (\n <Button\n variant=\"primary\"\n disabled={isSoldOut}\n onClick={() => onPrimaryButton(data, configuration?.index, configuration)}\n className={`overflow-hidden font-bold ${configuration.direction === 'vertical' ? 'w-full' : ''} ${configuration?.shape === 'rounded' ? 'rounded-2xl' : ''}`}\n >\n {configuration?.primaryButton || ''}\n </Button>\n ) : null}\n </div>\n </div>\n </div>\n </div>\n )\n}\n"],
|
|
5
|
-
"mappings": "AAmGU,OAmEI,YAAAA,EAxCF,OAAAC,EA3BF,QAAAC,MAAA,oBAnGV,OAAS,MAAAC,MAAU,yBACnB,OAAOC,MAAW,4BAClB,OAAS,QAAAC,MAAY,2BACrB,OAAOC,MAAY,6BACnB,OAAS,WAAAC,MAAe,wBACxB,OAAS,YAAAC,EAAU,aAAAC,MAAiB,QACpC,OAAOC,MAAa,8BACpB,OAAS,WAAAC,MAAe,8BACxB,OAAS,kBAAAC,MAAsB,2BAC/B,OAAS,eAAAC,MAAmB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gBACdnB,EAACK,EAAA,CACC,QAAQ,YACR,QAAS,IAAMsB,EAAkBT,EAAMC,GAAe,MAAOA,CAAa,EAC1E,UAAW,6BAA6BA,EAAc,YAAc,WAAa,SAAW,EAAE,IAAIA,GAAe,QAAU,UAAY,cAAgB,EAAE,GAExJ,SAAAA,GAAe,iBAAmB,GACrC,EACE,KACHA,GAAe,eAAiB,CAACW,EAChC9B,EAACK,EAAA,CACC,QAAQ,UACR,SAAUyB,EACV,QAAS,IAAMN,EAAgBN,EAAMC,GAAe,MAAOA,CAAa,EACxE,UAAW,6BAA6BA,EAAc,YAAc,WAAa,SAAW,EAAE,IAAIA,GAAe,QAAU,UAAY,cAAgB,EAAE,GAExJ,SAAAA,GAAe,eAAiB,GACnC,EACE,MACN,GACF,GACF,GA5HKD,GAAM,IAAMA,GAAM,MA6HzB,CAEJ",
|
|
6
|
-
"names": ["Fragment", "jsx", "jsxs", "cn", "Badge", "Text", "Button", "gaTrack", "useState", "useEffect", "Picture", "Heading", "useAiuiContext", "trackUrlRef", "formatVariantPrice", "componentType", "componentName", "SOLD_OUT_PRICE", "CollectionShelvesWrapItem", "data", "configuration", "itemShape", "locale", "soldOutText", "setSoldOutText", "onPrimaryButton", "params", "index", "onSecondaryButton", "variant", "item", "isSoldOut", "isShowTag", "isShowOriginalPrice", "showTags", "setShowTags", "showImage", "setShowImage", "coupon", "price", "basePrice", "discount", "handleUrl", "sku", "skuArray", "displayTitle", "displayDescription", "handleTags", "discountTag", "newTags", "infos", "productInfos", "preRender", "shopCommon"]
|
|
7
|
-
}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import type { ShelfDisplayProps } from '../ShelfDisplay/shelfDisplay.js';
|
|
2
|
-
declare const _default: import("react").ForwardRefExoticComponent<Omit<Omit<ShelfDisplayProps & import("react").RefAttributes<HTMLDivElement>, keyof import("../../shared/Styles.js").StylesProps> & Partial<import("../../shared/Styles.js").StylesProps & import("../../shared/Styles.js").ContainerProps> & {
|
|
3
|
-
className?: string;
|
|
4
|
-
data?: Record<string, any>;
|
|
5
|
-
}, "ref"> & import("react").RefAttributes<any>>;
|
|
6
|
-
export default _default;
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use client";import{jsx as o}from"react/jsx-runtime";import{cn as g}from"../../helpers/utils.js";import T from"../SwiperBox/index.js";import"../../shared/track.js";import{withLayout as k}from"../../shared/Styles.js";import{useExposure as M}from"../../hooks/useExposure.js";import{useRollout as P}from"../../hooks/useRollout.js";import{CollectionShelvesWrapItem as E}from"./CollectionShelvesItem.js";import{forwardRef as I,useEffect as L,useRef as B,useImperativeHandle as C,useState as H}from"react";const R="image",V="collectio_shelves",N=I(({key:n,data:t,event:a,buildData:m,breakpoints:c,className:f="",target:p="_self",metafields:u},d)=>{const{productsCard:h=[],title:b,isShowTag:w=!1,isShowOriginalPrice:v=!0,...D}=t,s=B(null),[S,x]=P({threshold:0}),[i,y]=H([]);return C(d,()=>s.current),M(s,{componentType:R,componentName:V,componentTitle:t?.title}),L(()=>{const l=h?.map?.(e=>{const r=m?.products?.find(_=>_?.handle===e?.handle);if(r)return{sku:e.sku,custom_name:e.custom_name,custom_image:e.custom_image,custom_link:e.custom_link,custom_theme:e.custom_theme,custom_description:e.custom_description,...r}})?.filter(e=>e);y(l?.length?l||[]:[])},[]),o("div",{ref:s,className:g("collection-shelves-wrap w-full",f,{"aiui-dark":t?.theme==="dark"}),children:o("div",{ref:S,children:o(T,{data:{list:i,configuration:{...D,isShowTag:w,event:a,target:p,isShowOriginalPrice:v,metafields:u||{},itemLength:i?.length}},id:`CollectionShelves${n}`,className:"!overflow-visible",Slide:E,breakpoints:c||{0:{spaceBetween:12,freeMode:!1,slidesPerView:1},374:{spaceBetween:12,freeMode:!1,slidesPerView:1.2},768:{spaceBetween:16,freeMode:!1,slidesPerView:2.3},1024:{spaceBetween:16,freeMode:!1,slidesPerView:3}}})})})});var J=k(N);export{J as default};
|
|
2
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../../src/biz-components/CollectionShelves/index.tsx"],
|
|
4
|
-
"sourcesContent": ["'use client'\nimport { cn } from '../../helpers/utils.js'\nimport SwiperBox from '../SwiperBox/index.js'\nimport { gaTrack } from '../../shared/track.js'\nimport { withLayout } from '../../shared/Styles.js'\nimport { useExposure } from '../../hooks/useExposure.js'\nimport { useRollout } from '../../hooks/useRollout.js'\nimport { CollectionShelvesWrapItem } from './CollectionShelvesItem.js'\nimport { forwardRef, useEffect, useRef, useImperativeHandle, useState } from 'react'\nimport type { ShelfDisplayProps, ShelfDisplayItem } from '../ShelfDisplay/shelfDisplay.js'\n\nconst componentType = 'image'\nconst componentName = 'collectio_shelves'\n\nconst ShelfDisplay = forwardRef<HTMLDivElement, ShelfDisplayProps>(\n (\n {\n key,\n data,\n event,\n buildData,\n breakpoints,\n className = '',\n target = '_self',\n metafields,\n },\n ref\n ) => {\n const {\n productsCard = [],\n title,\n isShowTag = false,\n isShowOriginalPrice = true,\n ...other\n } = data\n\n const innerRef = useRef<HTMLDivElement>(null)\n\n const [viewRef, inView] = useRollout<HTMLDivElement>({ threshold: 0 })\n\n const [currentItems, setCurrentItems] = useState<ShelfDisplayItem[]>([])\n\n useImperativeHandle(ref, () => innerRef.current as HTMLDivElement)\n\n useExposure(innerRef, {\n componentType: componentType,\n componentName: componentName,\n componentTitle: data?.title,\n })\n\n useEffect(() => {\n const newCurrentData = productsCard\n ?.map?.(item => {\n const findData = buildData?.products?.find(params => params?.handle === item?.handle)\n if (findData) {\n return {\n sku: item.sku,\n custom_name: item.custom_name,\n custom_image: item.custom_image,\n custom_link: item.custom_link,\n custom_theme: item.custom_theme,\n custom_description: item.custom_description,\n ...findData,\n }\n }\n })\n ?.filter(item => item)\n setCurrentItems(newCurrentData?.length ? newCurrentData || [] : [])\n }, [])\n\n return (\n <div\n ref={innerRef}\n className={cn('collection-shelves-wrap w-full', className, { 'aiui-dark': data?.theme === 'dark' })}\n >\n <div ref={viewRef as any}>\n <SwiperBox\n data={{\n list: currentItems,\n configuration: {\n ...other,\n isShowTag,\n event: event,\n target: target,\n isShowOriginalPrice,\n metafields: metafields || {},\n itemLength: currentItems?.length,\n },\n }}\n id={`CollectionShelves${key}`}\n className={`!overflow-visible`}\n Slide={CollectionShelvesWrapItem}\n breakpoints={\n breakpoints || {\n 0: {\n spaceBetween: 12,\n freeMode: false,\n slidesPerView: 1,\n },\n 374: {\n spaceBetween: 12,\n freeMode: false,\n slidesPerView: 1.2,\n },\n 768: {\n spaceBetween: 16,\n freeMode: false,\n slidesPerView: 2.3,\n },\n 1024: {\n spaceBetween: 16,\n freeMode: false,\n slidesPerView: 3,\n },\n }\n }\n />\n </div>\n </div>\n )\n }\n)\n\nexport default withLayout(ShelfDisplay)\n"],
|
|
5
|
-
"mappings": "aA4EU,cAAAA,MAAA,oBA3EV,OAAS,MAAAC,MAAU,yBACnB,OAAOC,MAAe,wBACtB,MAAwB,wBACxB,OAAS,cAAAC,MAAkB,yBAC3B,OAAS,eAAAC,MAAmB,6BAC5B,OAAS,cAAAC,MAAkB,4BAC3B,OAAS,6BAAAC,MAAiC,6BAC1C,OAAS,cAAAC,EAAY,aAAAC,EAAW,UAAAC,EAAQ,uBAAAC,EAAqB,YAAAC,MAAgB,QAG7E,MAAMC,EAAgB,QAChBC,EAAgB,oBAEhBC,EAAeP,EACnB,CACE,CACE,IAAAQ,EACA,KAAAC,EACA,MAAAC,EACA,UAAAC,EACA,YAAAC,EACA,UAAAC,EAAY,GACZ,OAAAC,EAAS,QACT,WAAAC,CACF,EACAC,IACG,CACH,KAAM,CACJ,aAAAC,EAAe,CAAC,EAChB,MAAAC,EACA,UAAAC,EAAY,GACZ,oBAAAC,EAAsB,GACtB,GAAGC,CACL,EAAIZ,EAEEa,EAAWpB,EAAuB,IAAI,EAEtC,CAACqB,EAASC,CAAM,EAAI1B,EAA2B,CAAE,UAAW,CAAE,CAAC,EAE/D,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AAQnC,EAAWW,CAAY",
|
|
6
|
-
"names": ["jsx", "cn", "SwiperBox", "withLayout", "useExposure", "useRollout", "CollectionShelvesWrapItem", "forwardRef", "useEffect", "useRef", "useImperativeHandle", "useState", "componentType", "componentName", "ShelfDisplay", "key", "data", "event", "buildData", "breakpoints", "className", "target", "metafields", "ref", "productsCard", "title", "isShowTag", "isShowOriginalPrice", "other", "innerRef", "viewRef", "inView", "currentItems", "setCurrentItems", "newCurrentData", "item", "findData", "params", "CollectionShelves_default"]
|
|
7
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import type { CollectionsBannerProps } from './types.js';
|
|
3
|
-
declare const _default: React.ForwardRefExoticComponent<Omit<Omit<CollectionsBannerProps & React.RefAttributes<HTMLDivElement>, keyof import("../../shared/Styles.js").StylesProps> & Partial<import("../../shared/Styles.js").StylesProps & import("../../shared/Styles.js").ContainerProps> & {
|
|
4
|
-
className?: string;
|
|
5
|
-
data?: Record<string, any>;
|
|
6
|
-
}, "ref"> & React.RefAttributes<any>>;
|
|
7
|
-
export default _default;
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use client";import{jsx as e,jsxs as $}from"react/jsx-runtime";import U,{useImperativeHandle as j,useRef as s,useEffect as q}from"react";import c from"gsap";import{ScrollTrigger as p}from"gsap/dist/ScrollTrigger";import{useMediaQuery as R}from"react-responsive";import{useInView as _}from"react-intersection-observer";import Q from"../../helpers/ScrollLoadVideo.js";import{Heading as P,Picture as A}from"../../components/index.js";import{cn as u}from"../../helpers/index.js";import{withLayout as F}from"../../shared/Styles.js";import{useExposure as G}from"../../hooks/useExposure.js";import{trackUrlRef as J}from"../../shared/trackUrlRef.js";import"../../components/button.js";import"../VideoModal/index.js";const f="image",b="collections_banner",V=U.forwardRef(({data:I,className:M},C)=>{const{title:r,subtitle:n,pcImage:h,padImage:L,mobileImage:x,pcVideo:v,padVideo:y,mobileVideo:i,isShowVideo:S,theme:z="light",blockLink:k}=I,w=R({query:"(max-width: 768px)"}),T=R({query:"(max-width: 1024px)"}),{ref:B,inView:N}=_(),m=s(null),d=s(null),g=s(null),o=s(null),t=s(null);return G(t,{componentType:f,componentName:b,componentTitle:r,componentDescription:n}),j(C,()=>t.current),q(()=>{c.registerPlugin(p);function E(){if(!o.current)return;const D=t.current?.clientHeight||100;window.innerHeight<=D?m.current=p.create({trigger:t.current,start:"top bottom",end:"bottom top",scrub:!0,onUpdate:l=>{const a=l.progress*40-20;c.set(o.current,{yPercent:a})}}):(g.current=p.create({trigger:t.current,start:"top bottom",end:"bottom bottom",scrub:!0,onUpdate:l=>{const a=l.progress*20-20;c.set(o.current,{yPercent:a})}}),d.current=p.create({trigger:t.current,start:"top top",end:"bottom top",scrub:!0,onUpdate:l=>{const a=l.progress*20;c.set(o.current,{yPercent:a})}}))}return N&&E(),()=>{m.current&&m.current.kill(),g.current&&g.current.kill(),d.current&&d.current.kill()}},[N]),e("div",{ref:B,"data-ui-component-id":"CollectionsBanner",children:$("div",{ref:t,className:u(z==="dark"?"aiui-dark":"","text-info-primary relative w-full overflow-hidden","lg-desktop:aspect-[1920/480] desktop:aspect-[1440/384] laptop:aspect-[1024/400] tablet:aspect-[768/480] aspect-[390/430]",M),children:[k&&e("a",{tabIndex:-1,"aria-hidden":"true","aria-label":r,className:"absolute inset-0 z-10","data-headless-title-desc-button":`${r}#${n}`,"data-headless-type-name":`${f}#${b}`,href:J(k,`${f}_${b}`)}),e("div",{ref:o,className:u("absolute left-0 top-0 size-full"),children:S?e(Q,{poster:w?i?.url:T?y?.url||i?.url:v?.url,src:w?i?.url:T?y?.url||i?.url:v?.url,className:"laptop:w-full h-full",videoClassName:"h-full object-cover",muted:!0,loop:!0,playsInline:!0}):e(A,{loading:"eager",fetchPriority:"high",className:"laptop:w-full h-full",imgClassName:"h-full object-cover",alt:h?.alt||"",source:`${h?.url||""} , ${L?.url??(x?.url||"")} 1024, ${x?.url||""} 767`})}),e("div",{className:"laptop:top-1/2 laptop:-translate-y-1/2 tablet:px-8 laptop:px-16 lg-desktop:px-[calc(50%-832px)] lg-desktop:gap-8 absolute top-24 md-tablet:top-8 z-10 flex flex-col gap-6 px-4",children:$("div",{className:"laptop:text-left max-w-[686px]",children:[r&&e(P,{as:"h2",size:5,className:u("font-bold hero-banner-title"),html:r}),n&&e(P,{as:"h3",className:u("hero-banner-subtitle font-heading lg-desktop:text-lg desktop:text-base laptop:mt-2 lg-desktop:mt-4 mt-1 text-sm font-bold"),html:n})]})})]})})});V.displayName="CollectionsBanner";var de=F(V);export{de as default};
|
|
2
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../../src/biz-components/CollectionsBanner/index.tsx"],
|
|
4
|
-
"sourcesContent": ["'use client'\nimport React, { useImperativeHandle, useRef, useState, useEffect } from 'react'\nimport gsap from 'gsap'\nimport { ScrollTrigger } from 'gsap/dist/ScrollTrigger'\nimport type { CollectionsBannerProps } from './types.js'\nimport { useMediaQuery } from 'react-responsive'\nimport { useInView } from 'react-intersection-observer'\nimport ScrollLoadVideo from '../../helpers/ScrollLoadVideo.js'\nimport { Button, Heading, Picture, Text } from '../../components/index.js'\nimport { cn } from '../../helpers/index.js'\nimport { withLayout } from '../../shared/Styles.js'\nimport { useExposure } from '../../hooks/useExposure.js'\nimport { trackUrlRef } from '../../shared/trackUrlRef.js'\nimport { sizeMap } from '../../components/button.js'\nimport { VideoModal } from '../VideoModal/index.js'\n\nconst componentType = 'image'\nconst componentName = 'collections_banner'\n\nconst CollectionsBanner = React.forwardRef<HTMLDivElement, CollectionsBannerProps>(({ data, className }, ref) => {\n const {\n title,\n subtitle,\n pcImage,\n padImage,\n mobileImage,\n pcVideo,\n padVideo,\n mobileVideo,\n isShowVideo,\n theme = 'light',\n blockLink,\n } = data\n\n const isMobile = useMediaQuery({ query: '(max-width: 768px)' })\n const isPad = useMediaQuery({ query: '(max-width: 1024px)' })\n const { ref: inViewRef, inView } = useInView()\n const scrollTriggerRef = useRef<ScrollTrigger | null>(null)\n const bgTriggerRef = useRef<ScrollTrigger | null>(null)\n const boxTriggerRef = useRef<ScrollTrigger | null>(null)\n\n const bgRef = useRef<HTMLImageElement>(null)\n const boxRef = useRef<HTMLDivElement>(null)\n\n useExposure(boxRef, {\n componentType,\n componentName,\n componentTitle: title,\n componentDescription: subtitle,\n })\n\n useImperativeHandle(ref, () => boxRef.current as HTMLDivElement)\n\n useEffect(() => {\n gsap.registerPlugin(ScrollTrigger)\n function gsapResize() {\n if (!bgRef.current) return\n const clientHeight = boxRef.current?.clientHeight || 100\n const screenHeight = window.innerHeight\n\n if (screenHeight <= clientHeight) {\n scrollTriggerRef.current = ScrollTrigger.create({\n trigger: boxRef.current,\n start: 'top bottom',\n end: 'bottom top',\n scrub: true,\n onUpdate: (self: any) => {\n const base = 40\n const value = self.progress * base - base / 2\n gsap.set(bgRef.current, { yPercent: value })\n },\n })\n } else {\n boxTriggerRef.current = ScrollTrigger.create({\n trigger: boxRef.current,\n start: 'top bottom',\n end: 'bottom bottom',\n scrub: true,\n onUpdate: (self: any) => {\n const base = 20\n const value = self.progress * base - base\n gsap.set(bgRef.current, { yPercent: value })\n },\n })\n bgTriggerRef.current = ScrollTrigger.create({\n trigger: boxRef.current,\n start: 'top top',\n end: 'bottom top',\n scrub: true,\n onUpdate: (self: any) => {\n const base = 20\n const value = self.progress * base\n gsap.set(bgRef.current, { yPercent: value })\n },\n })\n }\n }\n if (inView) gsapResize()\n return () => {\n scrollTriggerRef.current && scrollTriggerRef.current.kill()\n boxTriggerRef.current && boxTriggerRef.current.kill()\n bgTriggerRef.current && bgTriggerRef.current.kill()\n }\n }, [inView])\n\n return (\n <div ref={inViewRef} data-ui-component-id=\"CollectionsBanner\">\n <div\n ref={boxRef}\n className={cn(\n theme === 'dark' ? 'aiui-dark' : '',\n 'text-info-primary relative w-full overflow-hidden',\n 'lg-desktop:aspect-[1920/480] desktop:aspect-[1440/384] laptop:aspect-[1024/400] tablet:aspect-[768/480] aspect-[390/430]',\n className\n )}\n >\n {blockLink && (\n <a\n tabIndex={-1}\n aria-hidden=\"true\"\n aria-label={title}\n className=\"absolute inset-0 z-10\"\n data-headless-title-desc-button={`${title}#${subtitle}`}\n data-headless-type-name={`${componentType}#${componentName}`}\n href={trackUrlRef(blockLink, `${componentType}_${componentName}`)}\n />\n )}\n <div ref={bgRef} className={cn('absolute left-0 top-0 size-full')}>\n {isShowVideo ? (\n <ScrollLoadVideo\n poster={isMobile ? mobileVideo?.url : isPad ? padVideo?.url || mobileVideo?.url : pcVideo?.url}\n src={\n isMobile\n ? (mobileVideo?.url as string)\n : isPad\n ? (padVideo?.url as string) || (mobileVideo?.url as string)\n : (pcVideo?.url as string)\n }\n className=\"laptop:w-full h-full\"\n videoClassName=\"h-full object-cover\"\n muted\n loop\n playsInline\n />\n ) : (\n <Picture\n loading=\"eager\"\n fetchPriority=\"high\"\n className=\"laptop:w-full h-full\"\n imgClassName=\"h-full object-cover\"\n alt={pcImage?.alt || ''}\n source={`${pcImage?.url || ''} , ${padImage?.url ?? (mobileImage?.url || '')} 1024, ${mobileImage?.url || ''} 767`}\n />\n )}\n </div>\n\n {/* \u5185\u5BB9\u533A\u57DF */}\n <div className=\"laptop:top-1/2 laptop:-translate-y-1/2 tablet:px-8 laptop:px-16 lg-desktop:px-[calc(50%-832px)] lg-desktop:gap-8 absolute top-24 md-tablet:top-8 z-10 flex flex-col gap-6 px-4\">\n <div className=\"laptop:text-left max-w-[686px]\">\n {title && <Heading as=\"h2\" size={5} className={cn('font-bold hero-banner-title')} html={title} />}\n {subtitle && (\n <Heading\n as=\"h3\"\n className={cn(\n 'hero-banner-subtitle font-heading lg-desktop:text-lg desktop:text-base laptop:mt-2 lg-desktop:mt-4 mt-1 text-sm font-bold'\n )}\n html={subtitle}\n />\n )}\n </div>\n </div>\n </div>\n </div>\n )\n})\n\nCollectionsBanner.displayName = 'CollectionsBanner'\n\n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IC,CAAQ,GACrD,0BAAyB,GAAGP,CAAa,IAAIC,CAAa,GAC1D,KAAMF,EAAYiB,EAAW,GAAGhB,CAAa,IAAIC,CAAa,EAAE,EAClE,EAEFlB,EAAC,OAAI,IAAKyC,EAAO,UAAW5B,EAAG,iCAAiC,EAC7D,SAAAkB,EACC/B,EAACU,EAAA,CACC,OAAQwB,EAAWJ,GAAa,IAAMK,EAAQN,GAAU,KAAOC,GAAa,IAAMF,GAAS,IAC3F,IACEM,EACKJ,GAAa,IACdK,EACGN,GAAU,KAAmBC,GAAa,IAC1CF,GAAS,IAElB,UAAU,uBACV,eAAe,sBACf,MAAK,GACL,KAAI,GACJ,YAAW,GACb,EAEA5B,EAACY,EAAA,CACC,QAAQ,QACR,cAAc,OACd,UAAU,uBACV,aAAa,sBACb,IAAKa,GAAS,KAAO,GACrB,OAAQ,GAAGA,GAAS,KAAO,EAAE,MAAMC,GAAU,MAAQC,GAAa,KAAO,GAAG,UAAUA,GAAa,KAAO,EAAE,OAC9G,EAEJ,EAGA3B,EAAC,OAAI,UAAU,iLACb,SAAAC,EAAC,OAAI,UAAU,iCACZ,UAAAsB,GAASvB,EAACW,EAAA,CAAQ,GAAG,KAAK,KAAM,EAAG,UAAWE,EAAG,6BAA6B,EAAG,KAAMU,EAAO,EAC9FC,GACCxB,EAACW,EAAA,CACC,GAAG,KACH,UAAWE,EACT,2HACF,EACA,KAAMW,EACR,GAEJ,EACF,GACF,EACF,CAEJ,CAAC,EAEDL,EAAkB,YAAc,oBAEhC,IAAO4B,GAAQjC,EAAWK,CAAiB",
|
|
6
|
-
"names": ["jsx", "jsxs", "React", "useImperativeHandle", "useRef", "useEffect", "gsap", "ScrollTrigger", "useMediaQuery", "useInView", "ScrollLoadVideo", "Heading", "Picture", "cn", "withLayout", "useExposure", "trackUrlRef", "componentType", "componentName", "CollectionsBanner", "data", "className", "ref", "title", "subtitle", "pcImage", "padImage", "mobileImage", "pcVideo", "padVideo", "mobileVideo", "isShowVideo", "theme", "blockLink", "isMobile", "isPad", "inViewRef", "inView", "scrollTriggerRef", "bgTriggerRef", "boxTriggerRef", "bgRef", "boxRef", "gsapResize", "clientHeight", "self", "value", "CollectionsBanner_default"]
|
|
7
|
-
}
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import type { ButtonProps } from '../../components/button.js';
|
|
2
|
-
import type { Media, Theme } from '../../types/props.js';
|
|
3
|
-
export interface CollectionsBannerProps {
|
|
4
|
-
data: {
|
|
5
|
-
/** 主标题 */
|
|
6
|
-
title: string;
|
|
7
|
-
/** 副标题/描述文本 */
|
|
8
|
-
subtitle: string;
|
|
9
|
-
pcImage: Media;
|
|
10
|
-
padImage?: Media;
|
|
11
|
-
mobileImage: Media;
|
|
12
|
-
pcVideo?: Media;
|
|
13
|
-
padVideo?: Media;
|
|
14
|
-
mobileVideo?: Media;
|
|
15
|
-
isShowVideo?: boolean;
|
|
16
|
-
blockLink?: string;
|
|
17
|
-
/** 主按钮文本和配置 */
|
|
18
|
-
primaryButton?: {
|
|
19
|
-
text: string;
|
|
20
|
-
link?: string;
|
|
21
|
-
} & Omit<ButtonProps, 'children'>;
|
|
22
|
-
/** 次要按钮文本和配置 */
|
|
23
|
-
secondaryButton?: {
|
|
24
|
-
text: string;
|
|
25
|
-
link?: string;
|
|
26
|
-
isShowPlayVideoButton?: boolean;
|
|
27
|
-
playVideoButtonText?: string;
|
|
28
|
-
playIcon?: boolean;
|
|
29
|
-
videoUrl?: Media;
|
|
30
|
-
youtubeId?: string;
|
|
31
|
-
} & Omit<ButtonProps, 'children'>;
|
|
32
|
-
/** 主题 */
|
|
33
|
-
theme?: Theme;
|
|
34
|
-
/** 大小, 默认default,单banner, 可选sm, 用于多banner场景 */
|
|
35
|
-
size?: 'default' | 'sm';
|
|
36
|
-
/** 底部产品列表 */
|
|
37
|
-
caption?: Array<{
|
|
38
|
-
title: string;
|
|
39
|
-
}>;
|
|
40
|
-
};
|
|
41
|
-
/** 自定义类名 */
|
|
42
|
-
className?: string;
|
|
43
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
//# sourceMappingURL=types.js.map
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
type FilterCardWrapProps = {
|
|
2
|
-
isSale?: boolean;
|
|
3
|
-
result?: any;
|
|
4
|
-
total: number;
|
|
5
|
-
shopifyData?: any;
|
|
6
|
-
currentPage?: number;
|
|
7
|
-
closeFilter: boolean;
|
|
8
|
-
page: number;
|
|
9
|
-
metafields: any;
|
|
10
|
-
refreshStarRating?: () => void;
|
|
11
|
-
onPrimaryChange?: (item: any, sku: string) => void;
|
|
12
|
-
onSecondaryChange?: (item: any, sku: string) => void;
|
|
13
|
-
onNextPage?: (v: string) => void;
|
|
14
|
-
onPrevPage?: (v: string) => void;
|
|
15
|
-
};
|
|
16
|
-
declare const _default: import("react").ForwardRefExoticComponent<FilterCardWrapProps & import("react").RefAttributes<unknown>>;
|
|
17
|
-
export default _default;
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{jsx as a,jsxs as v}from"react/jsx-runtime";import{cn as m}from"../../helpers/utils.js";import{useMediaQuery as T}from"react-responsive";import W from"./FilterCardWrapItem";import{useRef as B,useState as A,useEffect as h,forwardRef as O,useImperativeHandle as V}from"react";import{cloneDeep as Y}from"es-toolkit";const q=(k,F)=>{const{shopifyData:w={},isSale:D=!1,total:I,result:n,closeFilter:p,page:f,metafields:y,refreshStarRating:L,onPrimaryChange:N,onSecondaryChange:M,onNextPage:b,onPrevPage:R}=k,{advertisingSpace:x}=y,{buttonText:j,loadMoreText:z}=w,d=x||w?.advertisingSpace,C=B(null),[g,u]=A([]),i=T({query:"(max-width: 1024px)"}),S=r=>{const e=Y(r||[]);if(d){const t=e.findIndex(c=>c.mImage);if(t===-1){const c=Math.min(p?d?.maxLocation||7:d?.minLocation||5,e.length);e.splice(c,0,d)}else{e.splice(t,1);const c=Math.min(p?d?.maxLocation||7:d?.minLocation||5,e.length);e.splice(c,0,d)}}return e};V(F,()=>({clearData(){u([])}}));const P=()=>{const r=C.current;if(!r)return;const e=r.getBoundingClientRect()?.top+window?.pageYOffset-120;window?.scrollTo?.({top:e,behavior:"smooth"})};return h(()=>{(n?.slug||n?.id)&&((f===1||!i)&&u([]),n?.products&&u(r=>{const e=n.products?.filter?.(o=>!r.some(s=>s.id===o.id));let t=[...r,...e];const c=t.filter?.(o=>!(!o?.metafields?.seoSetting?.noindex&&o.availableForSale&&o?.variants?.some(s=>s.availableForSale)));return t.push(...c),t=t.filter?.(o=>!o?.metafields?.seoSetting?.noindex&&o.availableForSale&&o?.variants?.some(s=>s.availableForSale)),D&&(t=t.filter?.(o=>{let s=!1;if(o?.options?.find(l=>l?.displayName==="color"))s=o?.variants?.find(l=>l?.coupons?.length&&l?.coupons?.[0]&&typeof l?.coupons?.[0]=="object");else{const l=o?.variants?.[0]?.coupons;s=l?.length&&l?.[0]&&typeof l?.[0]=="object"}return!!s})),(f===1&&!i||i)&&(t=S(t)),t}))},[n?.products,f,i,x]),h(()=>{g?.length&&f===1&&!i&&u(S(g))},[p]),h(()=>{g?.length&&L?.()},[g]),v("div",{className:"filter-card-wrap-container",ref:C,children:[a("div",{className:m("min-h-[60vh] w-full grid gap-3 md-tablet:grid-cols-2 grid-cols-3",{"laptop:grid-cols-4 tablet:grid-cols-3":p&&!i,"laptop:grid-cols-3 tablet:grid-cols-2":!p&&!i},"filter-card-wrap"),children:g?.map?.(r=>a(W,{data:r,buttonText:j,metafields:y,onPrimaryChange:(e,t)=>N?.(e,t),onSecondaryChange:(e,t)=>M?.(e,t)},r.id))}),i?v("div",{onClick:()=>{b?.(n?.pageInfo?.endCursor)},className:"mt-6 text-sm font-bold cursor-pointer flex items-center justify-center gap-1 filter-card-wrap-more",children:[a("span",{children:z||"View More"}),a("div",{className:"size-[18px]",children:a("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"6",viewBox:"0 0 12 6",fill:"none",children:a("path",{d:"M9.96967 0.21967C10.2626 -0.0732232 10.7373 -0.073223 11.0302 0.21967C11.3231 0.512563 11.3231 0.987324 11.0302 1.28022L6.53022 5.78022C6.23732 6.07311 5.76256 6.07311 5.46967 5.78022L0.96967 1.28022C0.676777 0.987324 0.676777 0.512563 0.96967 0.21967C1.26256 -0.0732233 1.73732 -0.0732233 2.03022 0.21967L5.99994 4.1894L9.96967 0.21967Z",fill:"#1D1D1F"})})})]}):null,!i&&I>18?v("div",{className:"mt-6 flex items-center justify-end gap-4 cursor-pointer",children:[a("button",{name:"perv page",disabled:!n?.pageInfo?.hasPreviousPage,className:m("flex items-center justify-center lg-desktop:size-14 size-10 rounded-full leading-tight overflow-hidden bg-transparent border-[1.5px] border-[#3D3D3F]",{"opacity-50 cursor-not-allowed":!n?.pageInfo?.hasPreviousPage}),onClick:()=>{P?.(),R?.(n?.pageInfo?.startCursor)},children:a("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",children:a("path",{d:"M12 5L7 10L12 15",stroke:"#3D3D3F","stroke-width":"1.66667","stroke-linecap":"round","stroke-linejoin":"round"})})}),a("button",{name:"next page",className:m("flex items-center justify-center lg-desktop:size-14 size-10 rounded-full leading-tight overflow-hidden bg-transparent border-[1.5px] border-[#3D3D3F]",{"opacity-50 cursor-not-allowed":!n?.pageInfo?.hasNextPage}),disabled:!n?.pageInfo?.hasNextPage,onClick:()=>{P?.(),b?.(n?.pageInfo?.endCursor)},children:a("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",children:a("path",{d:"M7.5 5L12.5 10L7.5 15",stroke:"#3D3D3F","stroke-width":"1.66667","stroke-linecap":"round","stroke-linejoin":"round"})})})]}):null]})};var K=O(q);export{K as default};
|
|
2
|
-
//# sourceMappingURL=FilterCardWrap.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../../src/biz-components/CollectionsFilters/FilterCardWrap.tsx"],
|
|
4
|
-
"sourcesContent": ["import { cn } from '../../helpers/utils.js'\nimport { useMediaQuery } from 'react-responsive'\nimport FilterCardWrapItem from './FilterCardWrapItem'\nimport { useRef, useState, useEffect, forwardRef, useImperativeHandle } from 'react'\nimport type { Ref } from 'react'\nimport { cloneDeep } from 'es-toolkit'\n\ntype FilterCardWrapProps = {\n isSale?: boolean\n result?: any\n total: number\n shopifyData?: any\n currentPage?: number\n closeFilter: boolean\n page: number\n metafields: any\n refreshStarRating?: () => void\n onPrimaryChange?: (item: any, sku: string) => void\n onSecondaryChange?: (item: any, sku: string) => void\n onNextPage?: (v: string) => void\n onPrevPage?: (v: string) => void\n}\n\nconst FilterCardWrap = (props: FilterCardWrapProps, ref: Ref<unknown> | undefined) => {\n const {\n shopifyData = {},\n isSale = false,\n total,\n result,\n closeFilter,\n page,\n metafields,\n refreshStarRating,\n onPrimaryChange,\n onSecondaryChange,\n onNextPage,\n onPrevPage,\n } = props\n const { advertisingSpace } = metafields\n const { buttonText, loadMoreText } = shopifyData\n\n const currentAdvertisingSpace = advertisingSpace || shopifyData?.advertisingSpace\n\n const filterCardWrapRef = useRef<any>(null)\n\n const [data, setData] = useState<any[]>([])\n\n const isMobile = useMediaQuery({ query: '(max-width: 1024px)' })\n\n const handleAdvertisingSpace = (products: any[]) => {\n const updatedProducts = cloneDeep(products || [])\n if (currentAdvertisingSpace) {\n const findIndex = updatedProducts.findIndex(item => item.mImage)\n if (findIndex === -1) {\n const insertIndex = closeFilter\n ? Math.min(currentAdvertisingSpace?.maxLocation || 7, updatedProducts.length)\n : Math.min(currentAdvertisingSpace?.minLocation || 5, updatedProducts.length)\n updatedProducts.splice(insertIndex, 0, currentAdvertisingSpace)\n } else {\n updatedProducts.splice(findIndex, 1)\n const insertIndex = closeFilter\n ? Math.min(currentAdvertisingSpace?.maxLocation || 7, updatedProducts.length)\n : Math.min(currentAdvertisingSpace?.minLocation || 5, updatedProducts.length)\n updatedProducts.splice(insertIndex, 0, currentAdvertisingSpace)\n }\n }\n return updatedProducts\n }\n\n useImperativeHandle(ref, () => ({\n clearData() {\n setData([])\n },\n }))\n\n const onScrollTop = () => {\n const target = filterCardWrapRef.current\n if (!target) return\n const targetY = target.getBoundingClientRect()?.top + window?.pageYOffset - 120\n window?.scrollTo?.({\n top: targetY,\n behavior: 'smooth',\n })\n }\n\n // \u5904\u7406\u4EA7\u54C1\u6570\u636E\n useEffect(() => {\n if (result?.slug || result?.id) {\n (page === 1 || !isMobile) && setData([])\n if (result?.products) {\n setData(prevProducts => {\n // \u68C0\u67E5\u662F\u5426\u5DF2\u7ECF\u5B58\u5728\u4E8E prevProducts \u4E2D\uFF0C\u907F\u514D\u91CD\u590D\u6DFB\u52A0\n const newProducts = result.products?.filter?.(\n (product: { id: any }) => !prevProducts.some(prev => prev.id === product.id)\n )\n let updatedProducts = [...prevProducts, ...newProducts]\n /** \u5DF2\u552E\u5B8C\u7684\u4EA7\u54C1 */\n const soldOutProducts = updatedProducts.filter?.(\n item =>\n !(\n !item?.metafields?.seoSetting?.noindex &&\n item.availableForSale &&\n item?.variants?.some((item: { availableForSale: any }) => item.availableForSale)\n )\n )\n // \u5C06\u5DF2\u552E\u5B8C\u7684\u4EA7\u54C1\u6DFB\u52A0\u5230\u6700\u540E\n updatedProducts.push(...soldOutProducts)\n // \u8FC7\u6EE4\u6389 availableForSale \u4E3A false \u7684\u4EA7\u54C1\n updatedProducts = updatedProducts.filter?.(\n item =>\n !item?.metafields?.seoSetting?.noindex &&\n item.availableForSale &&\n item?.variants?.some((item: { availableForSale: any }) => item.availableForSale)\n )\n // \u5982\u679C\u662F\u6709\u6298\u6263\u7684\u4EA7\u54C1\uFF0C\u5219\u8FC7\u6EE4\u6389\u6CA1\u6709\u6298\u6263\u7684\u4EA7\u54C1\n if (isSale) {\n updatedProducts = updatedProducts.filter?.((item: any) => {\n let isShow = false\n const isColor = item?.options?.find((item: any) => item?.displayName === 'color')\n if (isColor) {\n isShow = item?.variants?.find(\n (params: any) =>\n params?.coupons?.length && params?.coupons?.[0] && typeof params?.coupons?.[0] === 'object'\n )\n } else {\n const isVariants = item?.variants?.[0]?.coupons\n isShow = isVariants?.length && isVariants?.[0] && typeof isVariants?.[0] === 'object'\n }\n return !!isShow\n })\n }\n // \u5982\u679C advertisingSpace \u5B58\u5728\u4E14\u5C1A\u672A\u6DFB\u52A0\u5230\u6570\u7EC4\u4E2D\n if ((page === 1 && !isMobile) || isMobile) {\n updatedProducts = handleAdvertisingSpace(updatedProducts)\n }\n return updatedProducts\n })\n }\n }\n }, [result?.products, page, isMobile, advertisingSpace])\n\n useEffect(() => {\n if (!data?.length) return\n if (page === 1 && !isMobile) {\n setData(handleAdvertisingSpace(data))\n }\n }, [closeFilter])\n\n useEffect(() => {\n if (data?.length) {\n refreshStarRating?.()\n }\n }, [data])\n\n return (\n <div className=\"filter-card-wrap-container\" ref={filterCardWrapRef}>\n <div\n className={cn(\n 'min-h-[60vh] w-full grid gap-3 md-tablet:grid-cols-2 grid-cols-3',\n {\n 'laptop:grid-cols-4 tablet:grid-cols-3': closeFilter && !isMobile,\n 'laptop:grid-cols-3 tablet:grid-cols-2': !closeFilter && !isMobile,\n },\n 'filter-card-wrap'\n )}\n >\n {data?.map?.(item => {\n return (\n <FilterCardWrapItem\n data={item}\n key={item.id}\n buttonText={buttonText}\n metafields={metafields}\n onPrimaryChange={(e, data) => onPrimaryChange?.(e, data)}\n onSecondaryChange={(e, data) => onSecondaryChange?.(e, data)}\n />\n )\n })}\n </div>\n {isMobile ? (\n <div\n onClick={() => {\n onNextPage?.(result?.pageInfo?.endCursor)\n }}\n className=\"mt-6 text-sm font-bold cursor-pointer flex items-center justify-center gap-1 filter-card-wrap-more\"\n >\n <span>{loadMoreText || 'View More'}</span>\n <div className=\"size-[18px]\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"12\" height=\"6\" viewBox=\"0 0 12 6\" fill=\"none\">\n <path\n d=\"M9.96967 0.21967C10.2626 -0.0732232 10.7373 -0.073223 11.0302 0.21967C11.3231 0.512563 11.3231 0.987324 11.0302 1.28022L6.53022 5.78022C6.23732 6.07311 5.76256 6.07311 5.46967 5.78022L0.96967 1.28022C0.676777 0.987324 0.676777 0.512563 0.96967 0.21967C1.26256 -0.0732233 1.73732 -0.0732233 2.03022 0.21967L5.99994 4.1894L9.96967 0.21967Z\"\n fill=\"#1D1D1F\"\n />\n </svg>\n </div>\n </div>\n ) : null}\n {!isMobile && total > 18 ? (\n <div className=\"mt-6 flex items-center justify-end gap-4 cursor-pointer\">\n <button\n name=\"perv page\"\n disabled={!result?.pageInfo?.hasPreviousPage}\n className={cn(\n 'flex items-center justify-center lg-desktop:size-14 size-10 rounded-full leading-tight overflow-hidden bg-transparent border-[1.5px] border-[#3D3D3F]',\n {\n 'opacity-50 cursor-not-allowed': !result?.pageInfo?.hasPreviousPage,\n }\n )}\n onClick={() => {\n onScrollTop?.()\n onPrevPage?.(result?.pageInfo?.startCursor)\n }}\n >\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" fill=\"none\">\n <path\n d=\"M12 5L7 10L12 15\"\n stroke=\"#3D3D3F\"\n stroke-width=\"1.66667\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n />\n </svg>\n </button>\n <button\n name=\"next page\"\n className={cn(\n 'flex items-center justify-center lg-desktop:size-14 size-10 rounded-full leading-tight overflow-hidden bg-transparent border-[1.5px] border-[#3D3D3F]',\n {\n 'opacity-50 cursor-not-allowed': !result?.pageInfo?.hasNextPage,\n }\n )}\n disabled={!result?.pageInfo?.hasNextPage}\n onClick={() => {\n onScrollTop?.()\n onNextPage?.(result?.pageInfo?.endCursor)\n }}\n >\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" fill=\"none\">\n <path\n d=\"M7.5 5L12.5 10L7.5 15\"\n stroke=\"#3D3D3F\"\n stroke-width=\"1.66667\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n />\n </svg>\n </button>\n </div>\n ) : // <Paginator\n // className=\"mt-6\"\n // currentPage={currentPage}\n // onPageChange={(v: number) => {\n // setData([])\n // if(v > currentPage) {\n // onNextPage?.(result?.pageInfo?.endCursor)\n // } else {\n // onPrevPage?.(result?.pageInfo?.startCursor)\n // }\n // setCurrentPage(v)\n // }}\n // total={100}\n // />\n null}\n </div>\n )\n}\n\nexport default forwardRef(FilterCardWrap)\n"],
|
|
5
|
-
"mappings": "AAwKY,cAAAA,EAYJ,QAAAC,MAZI,oBAxKZ,OAAS,MAAAC,MAAU,yBACnB,OAAS,iBAAAC,MAAqB,mBAC9B,OAAOC,MAAwB,uBAC/B,OAAS,UAAAC,EAAQ,YAAAC,EAAU,aAAAC,EAAW,cAAAC,EAAY,uBAAAC,MAA2B,QAE7E,OAAS,aAAAC,MAAiB,aAkB1B,MAAMC,EAAiB,CAACC,EAA4BC,IAAkC,CACpF,KAAM,CACJ,YAAAC,EAAc,CAAC,EACf,OAAAC,EAAS,GACT,MAAAC,EACA,OAAAC,EACA,YAAAC,EACA,KAAAC,EACA,WAAAC,EACA,kBAAAC,EACA,gBAAAC,EACA,kBAAAC,EACA,WAAAC,EACA,WAAAC,CACF,EAAIb,EACE,CAAE,iBAAAc,CAAiB,EAAIN,EACvB,CAAE,WAAAO,EAAY,aAAAC,CAAa,EAAId,EAE/Be,EAA0BH,GAAoBZ,GAAa,iBAE3DgB,EAAoBzB,EAAY,IAAI,EAEpC,CAAC0B,EAAMC,CAAO,EAAI1B,EAAgB,CAAC,CAAC,EAEpC2B,EAAW9B,EAAc,CAAE,MAAO,qBAAsB,CAAC,EAEzD+B,EAA0BC,GAAoB,CAClD,MAAMC,EAAkB1B,EAAUyB,GAAY,CAAC,CAAC,EAChD,GAAIN,EAAyB,CAC3B,MAAMQ,EAAYD,EAAgB,UAAUE,GAAQA,EAAK,MAAM,EAC/D,GAAID,IAAc,GAAI,CACpB,MAAME,EACF,KAAK,IADWrB,EACPW,GAA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,GAAgB,YAAY,EACnC5B,EAAC,OAAI,UAAU,cACb,SAAAA,EAAC,OAAI,MAAM,6BAA6B,MAAM,KAAK,OAAO,IAAI,QAAQ,WAAW,KAAK,OACpF,SAAAA,EAAC,QACC,EAAE,oVACF,KAAK,UACP,EACF,EACF,GACF,EACE,KACH,CAACiC,GAAYjB,EAAQ,GACpBf,EAAC,OAAI,UAAU,0DACb,UAAAD,EAAC,UACC,KAAK,YACL,SAAU,CAACiB,GAAQ,UAAU,gBAC7B,UAAWf,EACT,wJACA,CACE,gCAAiC,CAACe,GAAQ,UAAU,eACtD,CACF,EACA,QAAS,IAAM,CACbuB,IAAc,EACdf,IAAaR,GAAQ,UAAU,WAAW,CAC5C,EAEA,SAAAjB,EAAC,OAAI,MAAM,6BAA6B,MAAM,KAAK,OAAO,KAAK,QAAQ,YAAY,KAAK,OACtF,SAAAA,EAAC,QACC,EAAE,mBACF,OAAO,UACP,eAAa,UACb,iBAAe,QACf,kBAAgB,QAClB,EACF,EACF,EACAA,EAAC,UACC,KAAK,YACL,UAAWE,EACT,wJACA,CACE,gCAAiC,CAACe,GAAQ,UAAU,WACtD,CACF,EACA,SAAU,CAACA,GAAQ,UAAU,YAC7B,QAAS,IAAM,CACbuB,IAAc,EACdhB,IAAaP,GAAQ,UAAU,SAAS,CAC1C,EAEA,SAAAjB,EAAC,OAAI,MAAM,6BAA6B,MAAM,KAAK,OAAO,KAAK,QAAQ,YAAY,KAAK,OACtF,SAAAA,EAAC,QACC,EAAE,wBACF,OAAO,UACP,eAAa,UACb,iBAAe,QACf,kBAAgB,QAClB,EACF,EACF,GACF,EAeF,MACF,CAEJ,EAEA,IAAOmD,EAAQ3C,EAAWG,CAAc",
|
|
6
|
-
"names": ["jsx", "jsxs", "cn", "useMediaQuery", "FilterCardWrapItem", "useRef", "useState", "useEffect", "forwardRef", "useImperativeHandle", "cloneDeep", "FilterCardWrap", "props", "ref", "shopifyData", "isSale", "total", "result", "closeFilter", "page", "metafields", "refreshStarRating", "onPrimaryChange", "onSecondaryChange", "onNextPage", "onPrevPage", "advertisingSpace", "buttonText", "loadMoreText", "currentAdvertisingSpace", "filterCardWrapRef", "data", "setData", "isMobile", "handleAdvertisingSpace", "products", "updatedProducts", "findIndex", "item", "insertIndex", "onScrollTop", "target", "targetY", "prevProducts", "newProducts", "product", "prev", "soldOutProducts", "isShow", "params", "isVariants", "FilterCardWrap_default"]
|
|
7
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
type FilterCardWrapItemProps = {
|
|
2
|
-
data: any;
|
|
3
|
-
buttonText?: any;
|
|
4
|
-
itemShape?: string;
|
|
5
|
-
metafields: any;
|
|
6
|
-
onPrimaryChange?: (item: any, sku: string) => void;
|
|
7
|
-
onSecondaryChange?: (item: any, sku: string) => void;
|
|
8
|
-
};
|
|
9
|
-
declare const FilterCardWrapItem: ({ data, buttonText, itemShape, metafields, onPrimaryChange, onSecondaryChange, }: FilterCardWrapItemProps) => import("react/jsx-runtime").JSX.Element;
|
|
10
|
-
export default FilterCardWrapItem;
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{Fragment as Ne,jsx as t,jsxs as d}from"react/jsx-runtime";import{cn as v,atobID as ue,yotpoInstanceId as fe}from"../../helpers/utils.js";import{useAiuiContext as be}from"../AiuiProvider/index.js";import{formatVariantPrice as ge}from"../ShelfDisplay/shelfDisplay.js";import xe from"../../components/badge.js";import{Text as ve}from"../../components/text.js";import E from"../../components/button.js";import R from"../../components/picture.js";import{trackUrlRef as _}from"../../shared/trackUrlRef.js";import{getFunctionMemberPrice as ye}from"./component/price.js";import{useState as i,useEffect as S}from"react";const w="image",$="product_shelf",he=999999999e-2,ke=e=>{let m;return e?.includes("products")?m=e?.split("products")[0]+"files/":m=e?.replace(e?.split("files")?.pop()||"","")+"/",m},Ce=({data:e,buttonText:m,itemShape:V,metafields:q,onPrimaryChange:G,onSecondaryChange:J})=>{const{memberPriceDiscount:K,memberSetting:P,discounts:I,shopCommon:Q}=q,[p,T]=i(""),[X,B]=i(""),[f,M]=i(""),[z,Y]=i(!1),[L,Z]=i({}),[ee,te]=i(!1),[F,oe]=i({price:"",basePrice:""}),[O,se]=i([]),[re,ie]=i([]),[b,ne]=i(""),[le,ae]=i(""),{locale:n="us",currencyCode:ce,isLogin:W}=be(),y=e?.custom_name||e?.title||e?.name,j=e?.custom_description||e?.description||e?.descriptionHtml,l=e?.filter_variants||e?.variants||[],D=ue(e?.id||""),de=o=>M(o),h=(o,r,s,u)=>{te(u),ne(o||""),oe({basePrice:r||"",price:s||""})};return S(()=>{if(f){const s=l?.find(u=>u?.name?.includes?.(f));T(s?.sku||l?.[0]?.sku||""),B(s?.image?.url||l?.[0]?.image?.url||"");return}const o=e?.options?.find(s=>s?.displayName==="color")?.values?.[0]?.label;o&&M(o);const r=l?.find(s=>s?.name?.includes?.(o));T(r?.sku||l?.[0]?.sku||""),B(r?.image?.url||l?.[0]?.image?.url||"")},[f]),S(()=>{if(!p)return;se(e?.tags||[]);const o=l?.find(a=>a?.sku===p)||l?.[0]||{};Z(o),Y(!o?.availableForSale||o?.price?.amount===he);const{infos:r}=o?.metafields||{},{productInfos:s,preRender:u}=e?.metafields||{};ae(r?.comingSoon||s?.comingSoon||u?.soldOut||Q?.soldOut||"");const g=o?.coupons?.[0],{price:H,basePrice:A,discount:me,discountAmount:pe}=ge({locale:n,amount:g?g.variant_price4wscode:o.price,baseAmount:g?o.price:0,currencyCode:e?.price?.currencyCode||"USD"}),U=(()=>{if(g?.value_type==="fixed_amount"){const a=pe||"",x=a.match(/^(.*?)(\d[\d.,]*)(.*)$/);if(x){const[,k,c,C]=x;let N=c;return c.endsWith(".00")?N=c.replace(/\.00$/,""):c.endsWith(",00")&&(N=c.replace(/,00$/,"")),`${k}${N}${C}`}return a}return me||""})();if(W){const a=ye({locale:n,variant:o,shopMemberPriceDiscountConfig:K,currencyCode:ce||e?.price?.currencyCode||"USD"});if(a){const{hasMemberPrice:x,salePriceWithCurrency:k,originalPriceWithCurrency:c,savePriceWithCurrency:C}=a;h(C||"",c||"",x?k:"",a?.hasMemberPrice)}else h(U,A||"",H||"",!1)}else h(U,A||"",H||"",!1)},[e,p]),S(()=>{let o=[];if(b){const s=`${b} ${I?.off}`;o.push(s)}const r=O?.filter?.(s=>s?.startsWith?.("CLtag"))?.map?.(s=>s?.replace?.("CLtag:",""))?.slice?.(0,b?1:2);ie(o.concat(r))},[O,b]),t("div",{className:v(V==="round"?"rounded-2xl":"rounded-none","tablet:hover:bg-info-white bg-container-secondary-1 box-border w-full cursor-pointer overflow-hidden duration-300",{"aiui-dark":e.theme==="dark"}),children:e?.mImage?t("div",{className:"size-full box-border overflow-hidden hover:[&_img]:scale-105",children:t("div",{className:"relative inset-0 size-full",children:d("a",{className:"size-full",href:_(e?.link,`${w}_${$}`),children:[t(R,{alt:"",source:e?.mImage?.url||e?.mImage,className:"size-full [&_img]:object-cover [&_img]:size-full",imgClassName:"size-full object-cover transition-all duration-300"}),d("div",{className:"desktop:p-6 absolute inset-x-0 top-0 box-border overflow-hidden p-4",children:[t("p",{className:"desktop:mb-2 mb-1 text-info-primary desktop:text-base text-sm font-bold",dangerouslySetInnerHTML:{__html:e?.subTitle}}),t("span",{className:"text-info-secondary desktop:text-[32px] text-[20px] font-bold desktop:leading-9 line-clamp-4 leading-6",dangerouslySetInnerHTML:{__html:e?.title}})]})]})})}):d("div",{className:"size-full desktop:p-6 desktop:pt-4 box-border overflow-hidden flex flex-col justify-between tablet:p-4 p-2 pb-4",children:[t("div",{className:"flex flex-wrap gap-1 overflow-hidden collection-filter-tags",children:re?.map?.((o,r)=>t(xe,{className:"whitespace-nowrap max-w-full truncate px-1 box-border font-bold item-badge",children:o},r))}),t("a",{target:"_blank","aria-label":y,className:"my-1",href:_(`${n==="us"||!n?"":`/${n}`}/products/${e?.handle}`,`${w}_${$}`),children:t("div",{className:v("m-auto desktop:size-[196px] size-[120px] overflow-hidden"),children:t(R,{alt:"",source:X,className:"h-full [&_img]:object-cover [&_img]:h-full [&_img]:w-fit"})})}),e?.options?.map(o=>{if(o?.displayName==="color")return t("div",{className:"flex items-center gap-1",children:o?.values?.map(r=>{const s=r?.hexColors?r.hexColors?.[0]:r?.label;return t("button",{onClick:()=>de(r?.label),className:v("size-4 rounded-full cursor-pointer overflow-hidden border-2 border-transparent",`${f===r?.label?"border-[#00BEFA]":""}`),children:t("img",{alt:s,className:"h-full w-full object-cover",src:`${ke(e?.images?.[0]?.url)}${s?.toLowerCase().split(" ")?.join("-")}_50x.png`})},r?.label)})})}),d("div",{children:[y?t("span",{dangerouslySetInnerHTML:{__html:y||""},className:"shelf-display-product-title line-clamp-2 lg-desktop:text-2xl laptop:text-xl text-base font-bold"}):null,e?.metafields?.judgemeBadge?t("a",{target:"_blank",className:"font-bold text-xs [&_.jdgm-star]:text-[#F77234]",dangerouslySetInnerHTML:{__html:e?.metafields?.judgemeBadge},href:_(`${n==="us"||!n?"":`/${n}`}/products/${e?.handle}`,`${w}_${$}`)}):t("div",{className:"font-bold text-xs yotpo-widget-instance [&_.yotpo-sr-bottom-line-new-review]:hidden","data-yotpo-instance-id":fe(n),"data-yotpo-product-id":D,"data-yotpo-cart-product-id":D,"data-yotpo-section-id":""}),j?t(ve,{size:2,html:j||"",className:"desktop:text-base laptop:text-sm shelf-display-product-description line-clamp-1 text-xs font-bold"}):null,d("div",{className:"mt-3 mb-2",children:[t("p",{dangerouslySetInnerHTML:{__html:W&&ee&&(I?.memberPrice||P?.member_price||P?.plus_member_price)||""},className:"text-info-primary lg-desktop:text-lg desktop:text-base laptop:text-sm text-xs font-bold"}),t("div",{className:"flex items-center",children:z?t("div",{className:"desktop:text-2xl tablet:text-xl text-info-primary text-base font-bold",children:le||""}):d(Ne,{children:[t("div",{className:"final-price desktop:text-2xl tablet:text-xl text-info-primary text-base font-bold",children:L?.availableForSale&&F?.price||""}),t("div",{className:"origin-price desktop:text-xl tablet:text-lg text-info-secondary ml-1 text-sm font-bold line-through",children:L?.availableForSale&&F?.basePrice||""})]})})]}),d("div",{className:v("shelf-flex-button-group","lg-desktop:gap-3 flex items-center gap-2 m-tablet:flex-col"),children:[t(E,{variant:"secondary",className:"m-tablet:w-full font-bold",onClick:()=>J?.(e,p),children:m?.secondaryButton||"Learn More"}),t(E,{variant:"primary",className:"m-tablet:w-full font-bold",disabled:z,onClick:()=>G?.(e,p),children:m?.primaryButton||"Shop Now"})]})]})]})},e?.id||e?.handle)};var Le=Ce;export{Le as default};
|
|
2
|
-
//# sourceMappingURL=FilterCardWrapItem.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../../src/biz-components/CollectionsFilters/FilterCardWrapItem.tsx"],
|
|
4
|
-
"sourcesContent": ["import { cn, atobID, yotpoInstanceId } from '../../helpers/utils.js'\nimport { useAiuiContext } from '../AiuiProvider/index.js'\nimport { formatVariantPrice } from '../ShelfDisplay/shelfDisplay.js'\nimport Badge from '../../components/badge.js'\nimport { Text } from '../../components/text.js'\nimport Button from '../../components/button.js'\nimport Picture from '../../components/picture.js'\nimport { trackUrlRef } from '../../shared/trackUrlRef.js'\nimport { getFunctionMemberPrice } from './component/price.js'\nimport { useState, useEffect } from 'react'\n\nconst componentType = 'image'\nconst componentName = 'product_shelf'\n\nconst SOLD_OUT_PRICE = 9999999.99\n\nconst getShopifyCdnBaseUrl = (imagePath: string | null) => {\n // \u76EE\u524D\u77E5\u9053\u7684 shopify \u56FE\u7247\u8DEF\u7531\u7684\u5F62\u5F0F\n // https://cdn.shopify.com/s/files/1/0493/9834/9974/files/Group_5581_2.jpg?v=1662379184\n // https://cdn.shopify.com/s/files/1/0493/9834/9974/products/B2633123.jpg?v=1631264041_3840x\n // \u8FD4\u56DE https://cdn.shopify.com/s/files/1/0493/9834/9974/files/\n let path\n if (imagePath?.includes('products')) {\n path = imagePath?.split('products')[0] + 'files/'\n } else {\n path = imagePath?.replace(imagePath?.split('files')?.pop() || '', '') + '/'\n }\n return path\n}\n\ntype FilterCardWrapItemProps = {\n data: any\n buttonText?: any\n itemShape?: string\n metafields: any\n onPrimaryChange?: (item: any, sku: string) => void\n onSecondaryChange?: (item: any, sku: string) => void\n}\n\nconst FilterCardWrapItem = ({\n data,\n buttonText,\n itemShape,\n metafields,\n onPrimaryChange,\n onSecondaryChange,\n}: FilterCardWrapItemProps) => {\n const { memberPriceDiscount, memberSetting, discounts, shopCommon } = metafields\n const [currentSku, setCurrentSku] = useState<string>('')\n const [currentImage, setCurrentImage] = useState<string>('')\n const [selectedColor, setSelectedColor] = useState<string>('')\n const [isSoldOut, setIsSoldOut] = useState<any>(false)\n const [currentVariant, setCurrentVariant] = useState<any>({})\n const [plusMemberStatus, setPlusMemberStatus] = useState<boolean>(false)\n const [priceCollection, setPriceCollection] = useState<{ price: string; basePrice: string }>({\n price: '',\n basePrice: '',\n })\n const [tags, setTags] = useState<string[]>([])\n const [showTags, setShowTags] = useState<string[]>([])\n const [discountCollection, setDiscountCollection] = useState<string>('')\n const [soldOutText, setSoldOutText] = useState<string>('')\n\n const { locale = 'us', currencyCode, isLogin } = useAiuiContext()\n\n const displayTitle = data?.custom_name || data?.title || data?.name\n const displayDescription = data?.custom_description || data?.description || data?.descriptionHtml\n const skuArray = data?.filter_variants || data?.variants || []\n const id = atobID(data?.id || '')\n\n const onColorClick = (color: string) => setSelectedColor(color)\n\n const handleBasePrice = (discount: string, priceCurrency: string, salePrice: string, status: boolean) => {\n setPlusMemberStatus(status)\n setDiscountCollection(discount || '')\n setPriceCollection({\n basePrice: priceCurrency || '',\n price: salePrice || '',\n })\n }\n\n useEffect(() => {\n if (selectedColor) {\n const findSku = skuArray?.find((item: any) => item?.name?.includes?.(selectedColor))\n setCurrentSku(findSku?.sku || skuArray?.[0]?.sku || '')\n setCurrentImage(findSku?.image?.url || skuArray?.[0]?.image?.url || '')\n return\n }\n const firstOption = data?.options?.find((item: any) => item?.displayName === 'color')?.values?.[0]?.label\n firstOption && setSelectedColor(firstOption)\n const findSku = skuArray?.find((item: any) => item?.name?.includes?.(firstOption))\n setCurrentSku(findSku?.sku || skuArray?.[0]?.sku || '')\n setCurrentImage(findSku?.image?.url || skuArray?.[0]?.image?.url || '')\n }, [selectedColor])\n\n useEffect(() => {\n if (!currentSku) return\n setTags(data?.tags || [])\n const variant = skuArray?.find((item: any) => item?.sku === currentSku) || skuArray?.[0] || {}\n setCurrentVariant(variant)\n setIsSoldOut(!variant?.availableForSale || variant?.price?.amount === SOLD_OUT_PRICE)\n const { infos } = variant?.metafields || {}\n const { productInfos, preRender } = data?.metafields || {}\n setSoldOutText(infos?.comingSoon || productInfos?.comingSoon || preRender?.soldOut || shopCommon?.soldOut || '')\n // active \u7684 \u901A\u7528\u6298\u6263\n const coupon = variant?.coupons?.[0]\n const { price, basePrice, discount, discountAmount } = formatVariantPrice({\n locale: locale,\n amount: coupon ? coupon.variant_price4wscode : variant.price,\n baseAmount: coupon ? variant.price : 0,\n currencyCode: data?.price?.currencyCode || 'USD',\n })\n const showPrice = (() => {\n if (coupon?.value_type === 'fixed_amount') {\n const amountStr = discountAmount || ''\n const match = amountStr.match(/^(.*?)(\\d[\\d.,]*)(.*)$/)\n if (match) {\n const [, prefix, numeric, suffix] = match\n let updatedNumeric = numeric\n if (numeric.endsWith('.00')) {\n updatedNumeric = numeric.replace(/\\.00$/, '')\n } else if (numeric.endsWith(',00')) {\n updatedNumeric = numeric.replace(/,00$/, '')\n }\n return `${prefix}${updatedNumeric}${suffix}`\n }\n return amountStr\n }\n return discount || ''\n })()\n // \u4F1A\u5458\u6298\u6263\n if (isLogin) {\n const result = getFunctionMemberPrice({\n locale: locale,\n variant: variant,\n shopMemberPriceDiscountConfig: memberPriceDiscount,\n currencyCode: currencyCode || data?.price?.currencyCode || 'USD',\n })\n if (result) {\n const { hasMemberPrice, salePriceWithCurrency, originalPriceWithCurrency, savePriceWithCurrency } = result\n handleBasePrice(\n savePriceWithCurrency || '',\n originalPriceWithCurrency || '',\n hasMemberPrice ? salePriceWithCurrency : '',\n result?.hasMemberPrice\n )\n } else {\n handleBasePrice(showPrice, basePrice || '', price || '', false)\n }\n } else {\n handleBasePrice(showPrice, basePrice || '', price || '', false)\n }\n }, [data, currentSku])\n\n // \u5904\u7406\u6807\u7B7E\n useEffect(() => {\n let handleTags: string[] = []\n if (discountCollection) {\n const discountTag = `${discountCollection} ${discounts?.off}`\n handleTags.push(discountTag)\n }\n const newTags = tags\n ?.filter?.((item: string) => item?.startsWith?.('CLtag'))\n ?.map?.((item: string) => item?.replace?.('CLtag:', ''))\n ?.slice?.(0, discountCollection ? 1 : 2)\n setShowTags(handleTags.concat(newTags))\n }, [tags, discountCollection])\n\n return (\n <div\n key={data?.id || data?.handle}\n className={cn(\n itemShape === 'round' ? 'rounded-2xl' : 'rounded-none',\n 'tablet:hover:bg-info-white bg-container-secondary-1 box-border w-full cursor-pointer overflow-hidden duration-300',\n {\n 'aiui-dark': data.theme === 'dark',\n }\n )}\n >\n {data?.mImage ? (\n <div className=\"size-full box-border overflow-hidden hover:[&_img]:scale-105\">\n <div className=\"relative inset-0 size-full\">\n <a className=\"size-full\" href={trackUrlRef(data?.link, `${componentType}_${componentName}`)}>\n <Picture\n alt=\"\"\n source={data?.mImage?.url || data?.mImage}\n className=\"size-full [&_img]:object-cover [&_img]:size-full\"\n imgClassName=\"size-full object-cover transition-all duration-300\"\n />\n <div className=\"desktop:p-6 absolute inset-x-0 top-0 box-border overflow-hidden p-4\">\n <p\n className=\"desktop:mb-2 mb-1 text-info-primary desktop:text-base text-sm font-bold\"\n dangerouslySetInnerHTML={{ __html: data?.subTitle }}\n />\n <span\n className=\"text-info-secondary desktop:text-[32px] text-[20px] font-bold desktop:leading-9 line-clamp-4 leading-6\"\n dangerouslySetInnerHTML={{ __html: data?.title }}\n />\n </div>\n </a>\n </div>\n </div>\n ) : (\n <div className=\"size-full desktop:p-6 desktop:pt-4 box-border overflow-hidden flex flex-col justify-between tablet:p-4 p-2 pb-4\">\n <div className=\"flex flex-wrap gap-1 overflow-hidden collection-filter-tags\">\n {showTags?.map?.((item: string, index: number) => (\n <Badge key={index} className=\"whitespace-nowrap max-w-full truncate px-1 box-border font-bold item-badge\">\n {item}\n </Badge>\n ))}\n </div>\n <a\n target=\"_blank\"\n aria-label={displayTitle}\n className=\"my-1\"\n href={trackUrlRef(\n `${locale === 'us' || !locale ? '' : `/${locale}`}/products/${data?.handle}`,\n `${componentType}_${componentName}`\n )}\n >\n <div className={cn('m-auto desktop:size-[196px] size-[120px] overflow-hidden')}>\n <Picture\n alt=\"\"\n source={currentImage}\n className=\"h-full [&_img]:object-cover [&_img]:h-full [&_img]:w-fit\"\n />\n </div>\n </a>\n {data?.options?.map((option: any) => {\n if (option?.displayName === 'color') {\n return (\n <div className=\"flex items-center gap-1\">\n {option?.values?.map((item: any) => {\n const color = item?.hexColors ? item.hexColors?.[0] : item?.label\n return (\n <button\n key={item?.label}\n onClick={() => onColorClick(item?.label)}\n className={cn(\n 'size-4 rounded-full cursor-pointer overflow-hidden border-2 border-transparent',\n `${selectedColor === item?.label ? 'border-[#00BEFA]' : ''}`\n )}\n >\n <img\n alt={color}\n className=\"h-full w-full object-cover\"\n src={`${getShopifyCdnBaseUrl(data?.images?.[0]?.url)}${color\n ?.toLowerCase()\n .split(' ')\n ?.join('-')}_${'50x'}.png`}\n />\n </button>\n )\n })}\n </div>\n )\n }\n })}\n <div>\n {displayTitle ? (\n <span\n dangerouslySetInnerHTML={{ __html: displayTitle || '' }}\n className=\"shelf-display-product-title line-clamp-2 lg-desktop:text-2xl laptop:text-xl text-base font-bold\"\n />\n ) : null}\n {data?.metafields?.judgemeBadge ? (\n <a\n target=\"_blank\"\n className=\"font-bold text-xs [&_.jdgm-star]:text-[#F77234]\"\n dangerouslySetInnerHTML={{ __html: data?.metafields?.judgemeBadge }}\n href={trackUrlRef(\n `${locale === 'us' || !locale ? '' : `/${locale}`}/products/${data?.handle}`,\n `${componentType}_${componentName}`\n )}\n />\n ) : (\n <div\n className=\"font-bold text-xs yotpo-widget-instance [&_.yotpo-sr-bottom-line-new-review]:hidden\"\n data-yotpo-instance-id={yotpoInstanceId(locale)}\n data-yotpo-product-id={id}\n data-yotpo-cart-product-id={id}\n data-yotpo-section-id=\"\"\n />\n )}\n {displayDescription ? (\n <Text\n size={2}\n html={displayDescription || ''}\n className=\"desktop:text-base laptop:text-sm shelf-display-product-description line-clamp-1 text-xs font-bold\"\n />\n ) : null}\n <div className=\"mt-3 mb-2\">\n <p\n dangerouslySetInnerHTML={{\n __html:\n isLogin && plusMemberStatus\n ? discounts?.memberPrice || memberSetting?.member_price || memberSetting?.plus_member_price || ''\n : '',\n }}\n className=\"text-info-primary lg-desktop:text-lg desktop:text-base laptop:text-sm text-xs font-bold\"\n />\n <div className=\"flex items-center\">\n {isSoldOut ? (\n <div className=\"desktop:text-2xl tablet:text-xl text-info-primary text-base font-bold\">\n {soldOutText || ''}\n </div>\n ) : (\n <>\n <div className=\"final-price desktop:text-2xl tablet:text-xl text-info-primary text-base font-bold\">\n {currentVariant?.availableForSale ? priceCollection?.price || '' : ''}\n </div>\n <div className=\"origin-price desktop:text-xl tablet:text-lg text-info-secondary ml-1 text-sm font-bold line-through\">\n {currentVariant?.availableForSale ? priceCollection?.basePrice || '' : ''}\n </div>\n </>\n )}\n </div>\n </div>\n {/* \u6309\u94AE\u7EC4 */}\n <div\n className={cn('shelf-flex-button-group', 'lg-desktop:gap-3 flex items-center gap-2 m-tablet:flex-col')}\n >\n <Button\n variant=\"secondary\"\n className=\"m-tablet:w-full font-bold\"\n onClick={() => onSecondaryChange?.(data, currentSku)}\n >\n {buttonText?.secondaryButton || 'Learn More'}\n </Button>\n <Button\n variant=\"primary\"\n className=\"m-tablet:w-full font-bold\"\n disabled={isSoldOut}\n onClick={() => onPrimaryChange?.(data, currentSku)}\n >\n {buttonText?.primaryButton || 'Shop Now'}\n </Button>\n </div>\n </div>\n </div>\n )}\n </div>\n )\n}\nexport default FilterCardWrapItem\n"],
|
|
5
|
-
"mappings": "AAuLc,OA4HI,Y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EAAA,CACC,QAAQ,UACR,UAAU,4BACV,SAAU6B,EACV,QAAS,IAAMZ,IAAkBJ,EAAMU,CAAU,EAEhD,SAAAT,GAAY,eAAiB,WAChC,GACF,GACF,GACF,GAzKGD,GAAM,IAAMA,GAAM,MA2KzB,CAEJ,EACA,IAAO0E,GAAQ3E",
|
|
6
|
-
"names": ["Fragment", "jsx", "jsxs", "cn", "atobID", "yotpoInstanceId", "useAiuiContext", "formatVariantPrice", "Badge", "Text", "Button", "Picture", "trackUrlRef", "getFunctionMemberPrice", "useState", "useEffect", "componentType", "componentName", "SOLD_OUT_PRICE", "getShopifyCdnBaseUrl", "imagePath", "path", "FilterCardWrapItem", "data", "buttonText", "itemShape", "metafields", "onPrimaryChange", "onSecondaryChange", "memberPriceDiscount", "memberSetting", "discounts", "shopCommon", "currentSku", "setCurrentSku", "currentImage", "setCurrentImage", "selectedColor", "setSelectedColor", "isSoldOut", "setIsSoldOut", "currentVariant", "setCurrentVariant", "plusMemberStatus", "setPlusMemberStatus", "priceCollection", "setPriceCollection", "tags", "setTags", "showTags", "setShowTags", "discountCollection", "setDiscountCollection", "soldOutText", "setSoldOutText", "locale", "currencyCode", "isLogin", "displayTitle", "displayDescription", "skuArray", "id", "onColorClick", "color", "handleBasePrice", "discount", "priceCurrency", "salePrice", "status", "findSku", "item", "firstOption", "variant", "infos", "productInfos", "preRender", "coupon", "price", "basePrice", "discountAmount", "showPrice", "amountStr", "match", "prefix", "numeric", "suffix", "updatedNumeric", "result", "hasMemberPrice", "salePriceWithCurrency", "originalPriceWithCurrency", "savePriceWithCurrency", "handleTags", "discountTag", "newTags", "index", "option", "FilterCardWrapItem_default"]
|
|
7
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
type FilterHeaderProps = {
|
|
2
|
-
total?: number;
|
|
3
|
-
sortKeyIndx: number;
|
|
4
|
-
metafields: any;
|
|
5
|
-
closeFilter: boolean;
|
|
6
|
-
shopifyData?: any;
|
|
7
|
-
onClearFiltered: () => void;
|
|
8
|
-
onSortChange: (sortKeyIndx: number) => void;
|
|
9
|
-
onCloseFilter: (closeFilter: boolean) => void;
|
|
10
|
-
onMobileOpenDrawer: (openDrawer: boolean) => void;
|
|
11
|
-
};
|
|
12
|
-
export default function FilterHeader(props: FilterHeaderProps): import("react/jsx-runtime").JSX.Element;
|
|
13
|
-
export {};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{jsx as e,jsxs as l}from"react/jsx-runtime";import{cn as i}from"../../helpers/utils";import{Picture as c,Text as n}from"../../components/index.js";import{useState as y,useEffect as _,useRef as w}from"react";function k(p){const{total:a,closeFilter:m,metafields:u,shopifyData:v,onSortChange:h,onCloseFilter:C,onClearFiltered:N,onMobileOpenDrawer:F,sortKeyIndx:b}=p,{drawerText:g}=v,{shop_filters_pair:t}=u,f=w(null),[r,d]=y(!1),x=s=>C?.(s);return _(()=>{const s=o=>{!f.current?.contains(o?.target)&&d(!1)};return document.addEventListener("click",s),()=>document.removeEventListener("click",s)},[]),l("div",{className:"filter-header",children:[l("div",{className:i("desktop:gap-x-16 tablet:gap-x-8","relative flex l-tablet:p-0 text-base font-bold box-border tablet:mb-4 mb-2"),children:[!m&&l("div",{className:i("l-tablet:hidden flex-shrink-0 flex justify-between items-center","desktop:w-60 tablet:w-48 laptop:w-[210px] l-tablet:w-fit box-border"),children:[l("div",{className:"flex items-center cursor-pointer",onClick:()=>x?.(!0),children:[e(c,{className:"mb-0.5 size-5",source:"https://cdn.shopify.com/s/files/1/0508/1815/4652/files/icon_table-of-contents.svg?v=1694054638"}),e("span",{className:"font-bold inline-block pl-2 leading-none",children:t?.filter_txt?.filter||"Close Filter"})]}),e("span",{onClick:()=>N?.(),className:"text-center text-base decoration-1 underline md:hidden font-bold text-[#1D1D1F] cursor-pointer box-border",children:g?.secondaryButton||"Clear"})]}),l("div",{className:"flex-1 flex items-center justify-between",children:[l("div",{className:"l-tablet:hidden flex items-center gap-x-4",children:[m&&l("div",{className:"flex items-center cursor-pointer",onClick:()=>x?.(!1),children:[e(c,{className:"mb-0.5 size-5",source:"https://cdn.shopify.com/s/files/1/0508/1815/4652/files/icon_table-of-contents.svg?v=1694054638"}),e("span",{className:"font-bold inline-block pl-2 leading-none",children:t?.filter_txt?.filter||"Open Filter"})]}),t?.filter_txt?.found?e(n,{className:"text-base font-bold text-[#86868C] md:hidden",html:t?.filter_txt?.found?.replace("${number}",a||0)}):e(n,{className:"text-base font-bold text-[#86868C] md:hidden",html:`${a||0} Item(s) Found`})]}),e("div",{className:"hidden l-tablet:block",children:l("div",{className:"flex items-center",onClick:()=>F?.(!0),children:[e(c,{className:"inline-block size-[20px]",source:"https://cdn.shopify.com/s/files/1/0508/1815/4652/files/icon_table-of-contents.svg?v=1694054638"}),e("span",{className:"font-bold inline-block pl-2 leading-none tablet:text-base text-sm",children:t?.filter_txt?.filter||"Close Filter"})]})}),l("div",{ref:f,className:"flex items-center relative cursor-pointer",onClick:()=>d(!r),children:[e("span",{className:"tablet:text-base text-sm pr-1 text-[#777]",dangerouslySetInnerHTML:{__html:`${t?.filter_txt?.sort||"Sort by"}: `}}),e(n,{html:t?.filter_txt?.sortList?.[b]?.txt||"Recommended",className:"tablet:text-base text-sm font-bold text-[#333]"}),e("div",{className:`ml-1 duration-300 ease-in-out ${r&&"rotate-180"}`,children:e("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"8",viewBox:"0 0 12 8",fill:"none",children:e("path",{d:"M10.412 0.910826C10.7375 0.585389 11.265 0.585389 11.5904 0.910826C11.9159 1.23626 11.9159 1.76377 11.5904 2.08921L6.59043 7.08921C6.265 7.41465 5.73748 7.41465 5.41205 7.08921L0.412046 2.08921C0.0866095 1.76377 0.0866095 1.23626 0.412046 0.910826C0.737483 0.585389 1.26499 0.585389 1.59043 0.910826L6.00124 5.32163L10.412 0.910826Z",fill:"#1D1D1F"})})}),e("ul",{className:i("w-full bg-[#FFFFFF] z-10 py-2 px-0 transition-all duration-400 ease-in-out","l-tablet:left-0 l-tablet:top-[120%] l-tablet:text-left absolute top-[110%] right-0",r?"visibility opacity-100":"invisible opacity-0"),children:t?.filter_txt?.sortList?.map?.((s,o)=>e("li",{className:i("cursor-pointer w-full p-4 text-base font-bold text-[#333] [&:hover]:bg-[#EAEAEC]",o===b?"bg-[#EAEAEC]":""),children:e("button",{name:s?.txt,className:"l-tablet:text-left",dangerouslySetInnerHTML:{__html:s?.txt},onClick:()=>{d(!1),h?.(o)}})},s?.txt+o))})]})]})]}),e("div",{className:"mb-2 hidden l-tablet:block",children:t?.filter_txt?.found?e(n,{className:"tablet:text-base text-sm font-bold text-[#86868C]",html:t?.filter_txt?.found?.replace("${number}",a||0)}):e(n,{className:"tablet:text-base text-sm font-bold text-[#86868C]",html:`${a||0} Item(s) Found`})})]})}export{k as default};
|
|
2
|
-
//# sourceMappingURL=FilterHeader.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../../src/biz-components/CollectionsFilters/FilterHeader.tsx"],
|
|
4
|
-
"sourcesContent": ["import { cn } from '../../helpers/utils'\nimport { Picture, Text } from '../../components/index.js'\nimport { useState, useEffect, useRef } from 'react'\n\ntype FilterHeaderProps = {\n total?: number\n sortKeyIndx: number\n metafields: any\n closeFilter: boolean\n shopifyData?: any\n onClearFiltered: () => void\n onSortChange: (sortKeyIndx: number) => void\n onCloseFilter: (closeFilter: boolean) => void\n onMobileOpenDrawer: (openDrawer: boolean) => void\n}\n\nexport default function FilterHeader(props: FilterHeaderProps) {\n const {\n total,\n closeFilter,\n metafields,\n shopifyData,\n onSortChange,\n onCloseFilter,\n onClearFiltered,\n onMobileOpenDrawer,\n sortKeyIndx,\n } = props\n \n const { drawerText } = shopifyData\n\n const { shop_filters_pair: shopFiltersPair } = metafields\n\n const containerRef = useRef<HTMLDivElement>(null)\n\n const [openSort, setOpenSort] = useState<boolean>(false)\n\n const onCloseOrOpenFilter = (closeFilter: boolean) => onCloseFilter?.(closeFilter)\n\n useEffect(() => {\n const handleClickOutside = (event: MouseEvent) => {\n const isContainer = !containerRef.current?.contains(event?.target as Node)\n if (isContainer) {\n setOpenSort(false)\n }\n }\n document.addEventListener('click', handleClickOutside)\n return () => document.removeEventListener('click', handleClickOutside)\n }, [])\n\n return (\n <div className=\"filter-header\">\n <div\n className={cn(\n 'desktop:gap-x-16 tablet:gap-x-8',\n 'relative flex l-tablet:p-0 text-base font-bold box-border tablet:mb-4 mb-2'\n )}\n >\n {/* pc\u5C55\u793A\u7684\u7B5B\u9009(open\u72B6\u6001) */}\n {!closeFilter && (\n <div\n className={cn(\n 'l-tablet:hidden flex-shrink-0 flex justify-between items-center',\n 'desktop:w-60 tablet:w-48 laptop:w-[210px] l-tablet:w-fit box-border'\n )}\n >\n <div className=\"flex items-center cursor-pointer\" onClick={() => onCloseOrOpenFilter?.(true)}>\n <Picture\n className=\"mb-0.5 size-5\"\n source=\"https://cdn.shopify.com/s/files/1/0508/1815/4652/files/icon_table-of-contents.svg?v=1694054638\"\n />\n <span className=\"font-bold inline-block pl-2 leading-none\">\n {shopFiltersPair?.filter_txt?.filter || 'Close Filter'}\n </span>\n </div>\n <span\n onClick={() => onClearFiltered?.()}\n className=\"text-center text-base decoration-1 underline md:hidden font-bold text-[#1D1D1F] cursor-pointer box-border\"\n >\n {drawerText?.secondaryButton || 'Clear'}\n </span>\n </div>\n )}\n <div className=\"flex-1 flex items-center justify-between\">\n {/* pc\u7AEF\u5C55\u793A\u7684\u7B5B\u9009\uFF08close\u72B6\u6001\uFF09 */}\n <div className=\"l-tablet:hidden flex items-center gap-x-4\">\n {closeFilter && (\n <div className=\"flex items-center cursor-pointer\" onClick={() => onCloseOrOpenFilter?.(false)}>\n <Picture\n className=\"mb-0.5 size-5\"\n source=\"https://cdn.shopify.com/s/files/1/0508/1815/4652/files/icon_table-of-contents.svg?v=1694054638\"\n />\n <span className=\"font-bold inline-block pl-2 leading-none\">\n {shopFiltersPair?.filter_txt?.filter || 'Open Filter'}\n </span>\n </div>\n )}\n {shopFiltersPair?.filter_txt?.found ? (\n <Text\n className=\"text-base font-bold text-[#86868C] md:hidden\"\n html={shopFiltersPair?.filter_txt?.found?.replace('${number}', total || 0)}\n />\n ) : (\n <Text className=\"text-base font-bold text-[#86868C] md:hidden\" html={`${total || 0} Item(s) Found`} />\n )}\n </div>\n {/* \u79FB\u52A8\u7AEF\u5C55\u793A\u7684\u7B5B\u9009 */}\n <div className=\"hidden l-tablet:block\">\n <div className=\"flex items-center\" onClick={() => onMobileOpenDrawer?.(true)}>\n <Picture\n className=\"inline-block size-[20px]\"\n source=\"https://cdn.shopify.com/s/files/1/0508/1815/4652/files/icon_table-of-contents.svg?v=1694054638\"\n />\n <span className=\"font-bold inline-block pl-2 leading-none tablet:text-base text-sm\">\n {shopFiltersPair?.filter_txt?.filter || 'Close Filter'}\n </span>\n </div>\n </div>\n {/* \u6392\u5E8F */}\n <div ref={containerRef} className=\"flex items-center relative cursor-pointer\" onClick={() => setOpenSort(!openSort)}>\n <span\n className=\"tablet:text-base text-sm pr-1 text-[#777]\"\n dangerouslySetInnerHTML={{\n __html: `${shopFiltersPair?.filter_txt?.sort || 'Sort by'}: `,\n }}\n />\n <Text\n html={shopFiltersPair?.filter_txt?.sortList?.[sortKeyIndx]?.txt || 'Recommended'}\n className=\"tablet:text-base text-sm font-bold text-[#333]\"\n />\n <div className={`ml-1 duration-300 ease-in-out ${openSort && 'rotate-180'}`}>\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"12\" height=\"8\" viewBox=\"0 0 12 8\" fill=\"none\">\n <path\n d=\"M10.412 0.910826C10.7375 0.585389 11.265 0.585389 11.5904 0.910826C11.9159 1.23626 11.9159 1.76377 11.5904 2.08921L6.59043 7.08921C6.265 7.41465 5.73748 7.41465 5.41205 7.08921L0.412046 2.08921C0.0866095 1.76377 0.0866095 1.23626 0.412046 0.910826C0.737483 0.585389 1.26499 0.585389 1.59043 0.910826L6.00124 5.32163L10.412 0.910826Z\"\n fill=\"#1D1D1F\"\n />\n </svg>\n </div>\n <ul\n className={cn(\n 'w-full bg-[#FFFFFF] z-10 py-2 px-0 transition-all duration-400 ease-in-out',\n 'l-tablet:left-0 l-tablet:top-[120%] l-tablet:text-left absolute top-[110%] right-0',\n openSort ? 'visibility opacity-100' : 'invisible opacity-0'\n )}\n >\n {shopFiltersPair?.filter_txt?.sortList?.map?.((l: any, k: number) => (\n <li\n key={l?.txt + k}\n className={cn(\n 'cursor-pointer w-full p-4 text-base font-bold text-[#333] [&:hover]:bg-[#EAEAEC]',\n k === sortKeyIndx ? 'bg-[#EAEAEC]' : ''\n )}\n >\n <button\n name={l?.txt}\n className={'l-tablet:text-left'}\n dangerouslySetInnerHTML={{ __html: l?.txt }}\n onClick={() => {\n setOpenSort(false)\n onSortChange?.(k)\n }}\n />\n </li>\n ))}\n </ul>\n </div>\n </div>\n </div>\n <div className=\"mb-2 hidden l-tablet:block\">\n {shopFiltersPair?.filter_txt?.found ? (\n <Text\n className=\"tablet:text-base text-sm font-bold text-[#86868C]\"\n html={shopFiltersPair?.filter_txt?.found?.replace('${number}', total || 0)}\n />\n ) : (\n <Text\n className=\"tablet:text-base text-sm font-bold text-[#86868C]\"\n html={`${total || 0} Item(s) Found`}\n />\n )}\n </div>\n </div>\n )\n}\n"],
|
|
5
|
-
"mappings": "AAkEY,OACE,OAAAA,EADF,QAAAC,MAAA,oBAlEZ,OAAS,MAAAC,MAAU,sBACnB,OAAS,WAAAC,EAAS,QAAAC,MAAY,4BAC9B,OAAS,YAAAC,EAAU,aAAAC,EAAW,UAAAC,MAAc,QAc7B,SAARC,EAA8BC,EAA0B,CAC7D,KAAM,CACJ,MAAAC,EACA,YAAAC,EACA,WAAAC,EACA,YAAAC,EACA,aAAAC,EACA,cAAAC,EACA,gBAAAC,EACA,mBAAAC,EACA,YAAAC,CACF,EAAIT,EAEE,CAAE,WAAAU,CAAW,EAAIN,EAEjB,CAAE,kBAAmBO,CAAgB,EAAIR,EAEzCS,EAAed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ACV,KAAM,GAAGM,GAAS,CAAC,iBACrB,EAEJ,GACF,CAEJ",
|
|
6
|
-
"names": ["jsx", "jsxs", "cn", "Picture", "Text", "useState", "useEffect", "useRef", "FilterHeader", "props", "total", "closeFilter", "metafields", "shopifyData", "onSortChange", "onCloseFilter", "onClearFiltered", "onMobileOpenDrawer", "sortKeyIndx", "drawerText", "shopFiltersPair", "containerRef", "openSort", "setOpenSort", "onCloseOrOpenFilter", "handleClickOutside", "event", "l", "k"]
|
|
7
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
interface FilterListProps {
|
|
2
|
-
onFilteredChange: (filtered: any, filter: any, opt: any) => void;
|
|
3
|
-
onOpenOptions: (openOpt: any[]) => void;
|
|
4
|
-
closeFilter: boolean;
|
|
5
|
-
shopifyData?: any;
|
|
6
|
-
filtersPair: any;
|
|
7
|
-
filtered: any;
|
|
8
|
-
openOptions: any[];
|
|
9
|
-
mobileDrawerVisible: boolean;
|
|
10
|
-
onClearFiltered: () => void;
|
|
11
|
-
onCloseDrawer: (closeDrawer: boolean) => void;
|
|
12
|
-
}
|
|
13
|
-
export default function FilterList(props: FilterListProps): import("react/jsx-runtime").JSX.Element;
|
|
14
|
-
export {};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{jsx as t,jsxs as d}from"react/jsx-runtime";import $ from"./component/AnimatedUL";import{cn as i}from"../../helpers/utils";import{remove as M,cloneDeep as P}from"es-toolkit";import{useEffect as y,useRef as T}from"react";import{useMediaQuery as A}from"react-responsive";import{Button as g,Drawer as H,DrawerContent as R,DrawerHeader as z,DrawerTitle as I,DrawerFooter as U}from"../../components/index.js";const x="!pt-4 transition-all duration-400 ease-in-out";function V(C){const b=A({query:"(max-width: 768px)"}),f=T(!1),{filtersPair:c,closeFilter:h,filtered:N,shopifyData:D,openOptions:p,mobileDrawerVisible:k,onCloseDrawer:m,onFilteredChange:F,onOpenOptions:v,onClearFiltered:L}=C,{drawerText:u}=D,O=(e,o,l,a)=>{const n=e.target,r=P(N)||{};let s=r?.[n?.name]||[];n.checked?a==="checkbox"?s.push(n?.value):s=[n?.value]:M(s,B=>B===n.value),r[n.name]=s,s.length<=0&&Reflect.deleteProperty(r,n.name),F?.({...r},o,l)},E=e=>{let o=p?.concat?.();o?.map?.(l=>l.label===e?l.show=!l.show:l),v?.(o)},w=()=>c?.length>0&&t("div",{className:"filter-list",children:c.map((e,o)=>{const l=p?.find?.(a=>a.label==e.label);return d("div",{className:i("mb-4 overflow-hidden duration-300 ease-in-out"),children:[d("div",{onClick:()=>E(e.label),className:"relative flex items-center justify-between md-tablet:justify-center text-base font-bold cursor-pointer leading-none",children:[t("button",{className:"w-full whitespace-nowrap text-left font-medium overflow-hidden box-border",children:t("span",{className:"pr-2 font-bold truncate",children:e.label})}),t("div",{className:`duration-300 ease-in-out ${l?.show&&"rotate-180"}`,children:t("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"7",viewBox:"0 0 12 7",fill:"none",children:t("path",{d:"M5.5268 0.668525C5.82138 0.428262 6.25563 0.445208 6.53022 0.719795L11.0302 5.2198C11.3231 5.51269 11.3231 5.98745 11.0302 6.28034C10.7373 6.57324 10.2626 6.57324 9.96967 6.28034L5.99994 2.31062L2.03022 6.28034C1.73732 6.57324 1.26256 6.57324 0.96967 6.28034C0.676777 5.98745 0.676777 5.51269 0.96967 5.2198L5.46967 0.719795L5.5268 0.668525Z",fill:"#1D1D1F"})})})]}),t("div",{className:"transition-all duration-400 ease-in-out overflow-hidden",children:t($,{className:"!pt-4 transition-all duration-400 ease-in-out","data-label":e.label,isOpen:!!l?.show,children:e?.options?.map?.((a,n)=>{const r=e.type?e.type==="checkbox"?"checkbox":"radio":"checkbox";return t("li",{className:i("w-full mb-4 box-border",{"text-[#32323266] cursor-not-allowed":a?.count<=0,"mb-0":n>=e?.options?.length-1}),children:d("label",{className:"flex items-center overflow-hidden box-border",htmlFor:`${e.value}-${n}`,children:[t("input",{type:r,name:e.value,value:a.value,id:`${e.value}-${n}`,disabled:a?.count<=0,checked:a.checked,className:i("size-4 cursor-pointer",a.checked?"accent-[#000000]":`appearance-none bg-transparent border border-[#000000] ${r==="radio"?"rounded-full":"rounded-[2px]"}`),onChange:s=>O(s,e,a,r)}),t("p",{className:i("pt-0.5 pl-0.5 inline-block cursor-pointer font-bold leading-none text-base"),children:a.label})]})},a.value)})})})]},`${e.label}${o}`)})});return y(()=>{if(c?.length&&!p?.length&&!f.current){f.current=!0;let e=[];const o=document?.getElementsByClassName(x);for(let l=0;l<o.length;l++){let a={};a.label=o?.[l]?.getAttribute("data-label"),a.show=b?!1:l<6,a.height=document?.getElementsByClassName(x)?.[l]?.clientHeight,e.push(a)}v?.(e)}},[c]),y(()=>{!b&&m?.(!1)},[b]),d("div",{className:i("transition-all duration-400 ease-in-out","desktop:w-60 tablet:w-48 laptop:w-[210px] l-tablet:hidden tablet:pt-4 tablet:border-t tablet:border-[#E4E5E6]","md-tablet:fixed md-tablet:bottom-0 md-tablet:left-0 md-tablet:right-0 md-tablet:top-0 md-tablet:z-[99]",h?"md-tablet:pointer-events-auto md-tablet:opacity-100":"md-tablet:pointer-events-none md-tablet:opacity-0"),children:[t("div",{className:i("transition-all duration-400 ease-in-out md-tablet:absolute md-tablet:bottom-0 md-tablet:h-[90vh] md-tablet:w-full",h?"md-tablet:translate-y-0":"md-tablet:translate-y-[100%]"),children:w()}),t(H,{open:k,onOpenChange:()=>m(!1),children:d(R,{className:"px-4 pb-4 max-h-[94.5vh] flex flex-col",children:[t(z,{className:"sticky top-0 inset-x-0 py-0 mb-6",children:t(I,{children:u?.drawerTitle||"Mobile Filter"})}),t("div",{className:"flex-1 overflow-y-auto",children:w()}),t(U,{className:"pb-0 pt-4",children:d("div",{className:i("shelf-flex-button-group","lg-desktop:gap-3 flex items-center gap-2"),children:[t(g,{variant:"secondary",className:"m-tablet:w-full",onClick:()=>{L?.(),m(!1)},children:u?.secondaryButton||"Clear"}),t(g,{variant:"primary",className:"m-tablet:w-full",onClick:()=>{m(!1)},children:u?.primaryButton||"Apply"})]})})]})})]})}export{V as default};
|
|
2
|
-
//# sourceMappingURL=FilterList.js.map
|