@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 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/biz-components/AccordionCards/index.tsx"],
|
|
4
|
-
"sourcesContent": ["'use client'\nimport Title from '../Title/index.js'\nimport { cn } from '../../helpers/utils.js'\nimport Picture from '../../components/picture.js'\nimport Button from '../../components/button.js'\nimport SwiperBox from '../SwiperBox/index.js'\nimport { withLayout } from '../../shared/Styles.js'\nimport React, { useState, useRef, useCallback, useImperativeHandle, useEffect, type RefObject } from 'react'\nimport { useExposure } from '../../hooks/useExposure.js'\nimport { trackUrlRef } from '../../shared/trackUrlRef.js'\nimport type { Img } from '../../types/props.js'\nimport throttle from '../../shared/throttle.js'\nimport { Heading } from '../../components/heading.js'\n\nconst componentType = 'image'\nconst componentName = 'scene_banner'\n\n/** Hook\uFF1A\u76D1\u542C\u7A97\u53E3\u5BBD\u5EA6 */\ntype ItemType = {\n /** \u6807\u9898\u6587\u672C */\n title: string\n /** \u56FE\u7247*/\n img: Img\n mobileImg?: Img\n /** \u5185\u5BB9\u8282\u70B9 */\n subTitle: string\n link?: string\n imgLink?: string\n}\n\nexport type AccordionCardsType = {\n className?: string\n data: {\n key?: string\n title?: string\n products: Array<ItemType>\n /** \u6309\u94AE\u5F62\u72B6 */\n shape?: 'round' | 'square'\n /** \u5361\u7247\u5F62\u72B6 */\n itemShape?: 'round' | 'square'\n /** \u4E3B\u6309\u94AE\u914D\u7F6E */\n primaryButton?: string\n theme?: 'light' | 'dark'\n }\n /** \u6309\u94AE\u4E8B\u4EF6*/\n event?: {\n primaryButton?: (v: any, index: number) => void\n }\n}\n\nconst AccordionCardsPcItem = ({\n item,\n idx,\n itemShape,\n hoverIndex,\n getRef,\n handleSwiperItemClick,\n isAnimation,\n contentWidth,\n primaryButton,\n event,\n data,\n accordionRef,\n}: {\n item: ItemType\n idx: number\n itemShape: 'round' | 'square' | undefined\n hoverIndex: number | null\n getRef: (idx: number, el: HTMLDivElement) => void\n handleSwiperItemClick: (idx: number) => void\n isAnimation: any\n contentWidth: number\n primaryButton: string | undefined\n event: any\n data: AccordionCardsType['data']\n accordionRef: React.MutableRefObject<HTMLDivElement[]>\n}) => {\n const isExpanded = hoverIndex === idx\n const flexValue = isExpanded ? 8 : 1\n\n useExposure({ current: accordionRef.current[idx] } as RefObject<HTMLDivElement>, {\n componentType,\n componentName,\n componentTitle: item?.title,\n position: idx + 1,\n componentDescription: item?.subTitle,\n })\n\n return (\n <div\n key={idx}\n style={{\n flex: `${flexValue} 1 0%`,\n transition: 'all 0.6s',\n }}\n ref={(el: HTMLDivElement | null) => {\n if (el) getRef(idx, el)\n }}\n className={cn('relative cursor-pointer overflow-hidden', itemShape === 'round' ? 'rounded-2xl' : '')}\n onMouseEnter={() => handleSwiperItemClick(idx)}\n onMouseLeave={() => {\n isAnimation.current = false\n }}\n onClick={() => {\n handleSwiperItemClick(idx)\n }}\n >\n <a\n href={trackUrlRef(item?.imgLink, `${componentType}_${componentName}`)}\n data-headless-type-name={`${componentType}#${componentName}`}\n data-headless-title-desc-button={`${item?.title}#${item?.subTitle}`}\n >\n <Picture\n source={item?.img?.url}\n className=\"size-full object-cover [&_img]:h-full [&_img]:object-cover\"\n alt={item?.img?.alt || ''}\n />\n </a>\n <div\n style={{\n width: contentWidth,\n }}\n className={cn(\n 'absolute inset-x-0 bottom-0 flex w-full items-end justify-between overflow-hidden px-8 pb-8 opacity-0 transition-opacity duration-[600ms] ease-in',\n isExpanded && contentWidth ? 'opacity-100' : 'opacity-0'\n )}\n >\n <div className=\"mr-16 flex-1 overflow-hidden\">\n <Heading as=\"h3\" className=\"laptop:text-2xl desktop:text-[32px] text-info-primary mb-1 text-xl font-bold\">\n {item?.title}\n </Heading>\n <Heading\n as=\"h4\"\n className=\"lg-desktop:text-[18px] desktop:text-[16px] text-info-primary line-clamp-2 text-[14px] font-[700]\"\n >\n {item?.subTitle}\n </Heading>\n </div>\n <Button\n className={cn('mb-1.5 font-bold')}\n as=\"a\"\n href={trackUrlRef(item?.link, `${componentType}_${componentName}`)}\n data-headless-type-name={`${componentType}#${componentName}`}\n data-headless-title-desc-button={`${item?.title}#${item?.subTitle}#${primaryButton}`}\n onClick={() => event?.primaryButton?.(data, idx)}\n >\n {primaryButton}\n <span className=\"sr-only\">{item?.title ?? item?.subTitle}</span>\n </Button>\n </div>\n </div>\n )\n}\n\nconst MobileItem = ({ data, configuration }: { data: ItemType; configuration?: any }) => {\n const ref = useRef<HTMLDivElement>(null)\n\n useExposure(ref, {\n componentType,\n componentName,\n componentTitle: data?.title,\n position: configuration?.index + 1,\n componentDescription: data?.subTitle,\n })\n \n return (\n <div\n ref={ref}\n className={cn(\n 'bg-container-secondary-1 relative w-full shrink-0 grow-0 overflow-hidden border border-solid',\n configuration?.itemShape === 'round' ? 'rounded-2xl' : ''\n )}\n >\n <a\n href={trackUrlRef(data?.imgLink, `${componentType}_${componentName}`)}\n data-headless-type-name={`${componentType}#${componentName}`}\n data-headless-title-desc-button={`${data?.title}@${data?.subTitle}`}\n data-headless-nav-postion={`''#${configuration?.index + 1}`}\n >\n <Picture\n className=\"size-full object-cover [&_img]:h-full [&_img]:object-cover\"\n source={data?.mobileImg?.url || ''}\n alt={data?.mobileImg?.alt || ''}\n />\n </a>\n <div className={cn('absolute inset-x-0 bottom-0 overflow-hidden px-4 pb-4')}>\n <div className=\"tablet:mb-6 mb-4 flex-1 overflow-hidden\">\n <p className=\"text-info-primary text-2xl font-bold leading-[1.2]\">{data?.title}</p>\n <h3 className=\"text-info-primary line-clamp-2 text-sm font-semibold\">{data?.subTitle}</h3>\n </div>\n\n <Button\n as=\"a\"\n variant=\"secondary\"\n aria-label={data?.title ?? data?.subTitle}\n className={cn('text-info-primary text-sm font-bold')}\n href={trackUrlRef(data.link, `${componentType}_${componentName}`)}\n data-headless-type-name={`${componentType}#${componentName}`}\n data-headless-nav-postion={`''#${configuration?.index + 1}`}\n data-headless-title-desc-button={`${data?.title}#${data?.subTitle}#${configuration?.primaryButton}`}\n >\n {configuration?.primaryButton}\n </Button>\n </div>\n </div>\n )\n}\n\nconst AccordionCards = React.forwardRef<HTMLDivElement, AccordionCardsType>(({ data, className = '', event }, ref) => {\n const [hoverIndex, setHoverIndex] = useState<number | null>(0)\n\n const hoverIndexRef = useRef<number>(0)\n const accordionRef = useRef<HTMLDivElement[]>([])\n const isAnimation = useRef<boolean>(false)\n const [contentWidth, setContentWidth] = useState<number>(0)\n\n const innerRef = useRef<HTMLDivElement>(null)\n useImperativeHandle(ref, () => innerRef.current as HTMLDivElement)\n\n const getRef = (index: number, el: HTMLDivElement) => {\n if (el) {\n accordionRef.current[index] = el\n }\n }\n\n useEffect(() => {\n const handleResize = () => {\n if (accordionRef.current[hoverIndexRef.current]) {\n setContentWidth(accordionRef.current[hoverIndexRef.current].offsetWidth)\n }\n }\n handleResize()\n const throttleResize = throttle(handleResize, 300)\n window.addEventListener('resize', throttleResize)\n return () => window.removeEventListener('resize', throttleResize)\n }, [])\n\n const handleSwiperItemClick = useCallback(\n (idx: number) => {\n if (hoverIndex === idx || isAnimation.current) return\n isAnimation.current = true\n // \u66F4\u65B0\u5BBD\u5EA6\u76F8\u5173\u72B6\u6001\n setHoverIndex(idx)\n hoverIndexRef.current = idx\n },\n [data?.products, hoverIndex]\n )\n\n return (\n <>\n {data?.title && <Title data={{ title: data?.title }} />}\n <div ref={innerRef} className={cn('laptop:block hidden', { 'aiui-dark': data?.theme === 'dark' })}>\n <div\n className={cn(\n 'lg-desktop:h-[calc(560_/_1920*100vw)] desktop:h-[calc(448_/_1440*100vw)] laptop:h-[calc(336_/_1025*100vw)] flex max-h-[560px] min-h-[336px] w-full gap-4 overflow-hidden',\n className\n )}\n >\n {data?.products?.map((item, idx) => (\n <AccordionCardsPcItem\n key={idx}\n item={item}\n idx={idx}\n itemShape={data?.itemShape}\n hoverIndex={hoverIndex}\n getRef={getRef}\n handleSwiperItemClick={handleSwiperItemClick}\n isAnimation={isAnimation}\n contentWidth={contentWidth}\n primaryButton={data?.primaryButton}\n event={event}\n data={data}\n accordionRef={accordionRef}\n />\n ))}\n </div>\n </div>\n <div className={cn('laptop:hidden block', { 'aiui-dark': data?.theme === 'dark' })}>\n <SwiperBox\n className={cn('h-[400px] !overflow-visible', className)}\n id={'AccordionCards' + data?.key}\n data={{\n list: data?.products,\n configuration: {\n shape: data?.shape,\n itemShape: data?.itemShape,\n primaryButton: data?.primaryButton,\n event: event,\n title: data?.title,\n },\n }}\n Slide={MobileItem}\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 }}\n />\n </div>\n </>\n )\n})\nexport default withLayout(AccordionCards)\n"],
|
|
5
|
-
"mappings": "ukBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,IAAA,eAAAC,EAAAH,GAgHQ,IAAAI,EAAA,6BA/GRC,EAAkB,gCAClBC,EAAmB,kCACnBC,EAAoB,0CACpBC,EAAmB,yCACnBC,EAAsB,oCACtBC,EAA2B,kCAC3BC,EAAqG,oBACrGC,EAA4B,sCAC5BC,EAA4B,uCAE5BC,EAAqB,uCACrBC,EAAwB,uCAExB,MAAMC,EAAgB,QAChBC,EAAgB,eAmChBC,EAAuB,CAAC,CAC5B,KAAAC,EACA,I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AAG,qCAAqC,EACnD,QAAM,eAAYA,EAAK,KAAM,GAAGb,CAAa,IAAIC,CAAa,EAAE,EAChE,0BAAyB,GAAGD,CAAa,IAAIC,CAAa,GAC1D,4BAA2B,MAAMoB,GAAe,MAAQ,CAAC,GACzD,kCAAiC,GAAGR,GAAM,KAAK,IAAIA,GAAM,QAAQ,IAAIQ,GAAe,aAAa,GAEhG,SAAAA,GAAe,cAClB,GACF,GACF,CAEJ,EAEME,EAAiB,EAAAC,QAAM,WAA+C,CAAC,CAAE,KAAAX,EAAM,UAAAY,EAAY,GAAI,MAAAb,CAAM,EAAGU,IAAQ,CACpH,KAAM,CAAChB,EAAYoB,CAAa,KAAI,YAAwB,CAAC,EAEvDC,KAAgB,UAAe,CAAC,EAChCb,KAAe,UAAyB,CAAC,CAAC,EAC1CL,KAAc,UAAgB,EAAK,EACnC,CAACC,EAAckB,CAAe,KAAI,YAAiB,CAAC,EAEpDC,KAAW,UAAuB,IAAI,KAC5C,uBAAoBP,EAAK,IAAMO,EAAS,OAAyB,EAEjE,MAAMtB,EAAS,CAACuB,EAAeb,IAAuB,CAChDA,IACFH,EAAa,QAAQgB,CAAK,EAAIb,EAElC,KAEA,aAAU,IAAM,CACd,MAAMc,EAAe,IAAM,CACrBjB,EAAa,QAAQa,EAAc,OAAO,GAC5CC,EAAgBd,EAAa,QAAQa,EAAc,OAAO,EAAE,WAAW,CAE3E,EACAI,EAAa,EACb,MAAMC,KAAiB,EAAAC,SAASF,EAAc,GAAG,EACjD,cAAO,iBAAiB,SAAUC,CAAc,EACzC,IAAM,OAAO,oBAAoB,SAAUA,CAAc,CAClE,EAAG,CAAC,CAAC,
|
|
4
|
+
"sourcesContent": ["'use client'\nimport Title from '../Title/index.js'\nimport { cn } from '../../helpers/utils.js'\nimport Picture from '../../components/picture.js'\nimport Button from '../../components/button.js'\nimport SwiperBox from '../SwiperBox/index.js'\nimport { withLayout } from '../../shared/Styles.js'\nimport React, { useState, useRef, useCallback, useImperativeHandle, useEffect, type RefObject } from 'react'\nimport { useExposure } from '../../hooks/useExposure.js'\nimport { trackUrlRef } from '../../shared/trackUrlRef.js'\nimport type { Img } from '../../types/props.js'\nimport throttle from '../../shared/throttle.js'\nimport { Heading } from '../../components/heading.js'\n\nconst componentType = 'image'\nconst componentName = 'scene_banner'\n\n/** Hook\uFF1A\u76D1\u542C\u7A97\u53E3\u5BBD\u5EA6 */\ntype ItemType = {\n /** \u6807\u9898\u6587\u672C */\n title: string\n /** \u56FE\u7247*/\n img: Img\n mobileImg?: Img\n /** \u5185\u5BB9\u8282\u70B9 */\n subTitle: string\n link?: string\n imgLink?: string\n}\n\nexport type AccordionCardsType = {\n className?: string\n data: {\n key?: string\n title?: string\n products: Array<ItemType>\n /** \u6309\u94AE\u5F62\u72B6 */\n shape?: 'round' | 'square'\n /** \u5361\u7247\u5F62\u72B6 */\n itemShape?: 'round' | 'square'\n /** \u4E3B\u6309\u94AE\u914D\u7F6E */\n primaryButton?: string\n theme?: 'light' | 'dark'\n }\n /** \u6309\u94AE\u4E8B\u4EF6*/\n event?: {\n primaryButton?: (v: any, index: number) => void\n }\n}\n\nconst AccordionCardsPcItem = ({\n item,\n idx,\n itemShape,\n hoverIndex,\n getRef,\n handleSwiperItemClick,\n isAnimation,\n contentWidth,\n primaryButton,\n event,\n data,\n accordionRef,\n}: {\n item: ItemType\n idx: number\n itemShape: 'round' | 'square' | undefined\n hoverIndex: number | null\n getRef: (idx: number, el: HTMLDivElement) => void\n handleSwiperItemClick: (idx: number) => void\n isAnimation: any\n contentWidth: number\n primaryButton: string | undefined\n event: any\n data: AccordionCardsType['data']\n accordionRef: React.MutableRefObject<HTMLDivElement[]>\n}) => {\n const isExpanded = hoverIndex === idx\n const flexValue = isExpanded ? 8 : 1\n\n useExposure({ current: accordionRef.current[idx] } as RefObject<HTMLDivElement>, {\n componentType,\n componentName,\n componentTitle: item?.title,\n position: idx + 1,\n componentDescription: item?.subTitle,\n })\n\n return (\n <div\n key={idx}\n style={{\n flex: `${flexValue} 1 0%`,\n transition: 'all 0.6s',\n }}\n ref={(el: HTMLDivElement | null) => {\n if (el) getRef(idx, el)\n }}\n className={cn('relative cursor-pointer overflow-hidden', itemShape === 'round' ? 'rounded-2xl' : '')}\n onMouseEnter={() => handleSwiperItemClick(idx)}\n onMouseLeave={() => {\n isAnimation.current = false\n }}\n onClick={() => {\n handleSwiperItemClick(idx)\n }}\n >\n <a\n href={trackUrlRef(item?.imgLink, `${componentType}_${componentName}`)}\n data-headless-type-name={`${componentType}#${componentName}`}\n data-headless-title-desc-button={`${item?.title}#${item?.subTitle}`}\n >\n <Picture\n source={item?.img?.url}\n className=\"size-full object-cover [&_img]:h-full [&_img]:object-cover\"\n alt={item?.img?.alt || ''}\n />\n </a>\n <div\n style={{\n width: contentWidth,\n }}\n className={cn(\n 'absolute inset-x-0 bottom-0 flex w-full items-end justify-between overflow-hidden px-8 pb-8 opacity-0 transition-opacity duration-[600ms] ease-in',\n isExpanded && contentWidth ? 'opacity-100' : 'opacity-0'\n )}\n >\n <div className=\"mr-16 flex-1 overflow-hidden\">\n <Heading as=\"h3\" className=\"laptop:text-2xl desktop:text-[32px] text-info-primary mb-1 text-xl font-bold\">\n {item?.title}\n </Heading>\n <Heading\n as=\"h4\"\n className=\"lg-desktop:text-[18px] desktop:text-[16px] text-info-primary line-clamp-2 text-[14px] font-[700]\"\n >\n {item?.subTitle}\n </Heading>\n </div>\n <Button\n className={cn('mb-1.5 font-bold')}\n as=\"a\"\n href={trackUrlRef(item?.link, `${componentType}_${componentName}`)}\n data-headless-type-name={`${componentType}#${componentName}`}\n data-headless-title-desc-button={`${item?.title}#${item?.subTitle}#${primaryButton}`}\n onClick={() => event?.primaryButton?.(data, idx)}\n >\n {primaryButton}\n <span className=\"sr-only\">{item?.title ?? item?.subTitle}</span>\n </Button>\n </div>\n </div>\n )\n}\n\nconst MobileItem = ({ data, configuration }: { data: ItemType; configuration?: any }) => {\n const ref = useRef<HTMLDivElement>(null)\n\n useExposure(ref, {\n componentType,\n componentName,\n componentTitle: data?.title,\n position: configuration?.index + 1,\n componentDescription: data?.subTitle,\n })\n \n return (\n <div\n ref={ref}\n className={cn(\n 'bg-container-secondary-1 relative w-full shrink-0 grow-0 overflow-hidden border border-solid',\n configuration?.itemShape === 'round' ? 'rounded-2xl' : ''\n )}\n >\n <a\n href={trackUrlRef(data?.imgLink, `${componentType}_${componentName}`)}\n data-headless-type-name={`${componentType}#${componentName}`}\n data-headless-title-desc-button={`${data?.title}@${data?.subTitle}`}\n data-headless-nav-postion={`''#${configuration?.index + 1}`}\n >\n <Picture\n className=\"size-full object-cover [&_img]:h-full [&_img]:object-cover\"\n source={data?.mobileImg?.url || ''}\n alt={data?.mobileImg?.alt || ''}\n />\n </a>\n <div className={cn('absolute inset-x-0 bottom-0 overflow-hidden px-4 pb-4')}>\n <div className=\"tablet:mb-6 mb-4 flex-1 overflow-hidden\">\n <p className=\"text-info-primary text-2xl font-bold leading-[1.2]\">{data?.title}</p>\n <h3 className=\"text-info-primary line-clamp-2 text-sm font-semibold\">{data?.subTitle}</h3>\n </div>\n\n <Button\n as=\"a\"\n variant=\"secondary\"\n aria-label={data?.title ?? data?.subTitle}\n className={cn('text-info-primary text-sm font-bold')}\n href={trackUrlRef(data.link, `${componentType}_${componentName}`)}\n data-headless-type-name={`${componentType}#${componentName}`}\n data-headless-nav-postion={`''#${configuration?.index + 1}`}\n data-headless-title-desc-button={`${data?.title}#${data?.subTitle}#${configuration?.primaryButton}`}\n >\n {configuration?.primaryButton}\n </Button>\n </div>\n </div>\n )\n}\n\nconst AccordionCards = React.forwardRef<HTMLDivElement, AccordionCardsType>(({ data, className = '', event }, ref) => {\n const [hoverIndex, setHoverIndex] = useState<number | null>(0)\n\n const hoverIndexRef = useRef<number>(0)\n const accordionRef = useRef<HTMLDivElement[]>([])\n const isAnimation = useRef<boolean>(false)\n const [contentWidth, setContentWidth] = useState<number>(0)\n\n const innerRef = useRef<HTMLDivElement>(null)\n useImperativeHandle(ref, () => innerRef.current as HTMLDivElement)\n\n const getRef = (index: number, el: HTMLDivElement) => {\n if (el) {\n accordionRef.current[index] = el\n }\n }\n\n useEffect(() => {\n const handleResize = () => {\n if (accordionRef.current[hoverIndexRef.current]) {\n setContentWidth(accordionRef.current[hoverIndexRef.current].offsetWidth)\n }\n }\n handleResize()\n const throttleResize = throttle(handleResize, 300)\n window.addEventListener('resize', throttleResize)\n return () => window.removeEventListener('resize', throttleResize)\n }, [])\n\n\n\n const handleSwiperItemClick = useCallback(\n (idx: number) => {\n if (hoverIndex === idx || isAnimation.current) return\n isAnimation.current = true\n // \u66F4\u65B0\u5BBD\u5EA6\u76F8\u5173\u72B6\u6001\n setHoverIndex(idx)\n hoverIndexRef.current = idx\n },\n [data?.products, hoverIndex]\n )\n\n return (\n <>\n {data?.title && <Title data={{ title: data?.title }} />}\n <div ref={innerRef} className={cn('laptop:block hidden', { 'aiui-dark': data?.theme === 'dark' })}>\n <div\n className={cn(\n 'lg-desktop:h-[calc(560_/_1920*100vw)] desktop:h-[calc(448_/_1440*100vw)] laptop:h-[calc(336_/_1025*100vw)] flex max-h-[560px] min-h-[336px] w-full gap-4 overflow-hidden',\n className\n )}\n >\n {data?.products?.map((item, idx) => (\n <AccordionCardsPcItem\n key={idx}\n item={item}\n idx={idx}\n itemShape={data?.itemShape}\n hoverIndex={hoverIndex}\n getRef={getRef}\n handleSwiperItemClick={handleSwiperItemClick}\n isAnimation={isAnimation}\n contentWidth={contentWidth}\n primaryButton={data?.primaryButton}\n event={event}\n data={data}\n accordionRef={accordionRef}\n />\n ))}\n </div>\n </div>\n <div className={cn('laptop:hidden block', { 'aiui-dark': data?.theme === 'dark' })}>\n <SwiperBox\n className={cn('h-[400px] !overflow-visible', className)}\n id={'AccordionCards' + data?.key}\n data={{\n list: data?.products,\n configuration: {\n shape: data?.shape,\n itemShape: data?.itemShape,\n primaryButton: data?.primaryButton,\n event: event,\n title: data?.title,\n },\n }}\n Slide={MobileItem}\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 }}\n />\n </div>\n </>\n )\n})\nexport default withLayout(AccordionCards)\n"],
|
|
5
|
+
"mappings": "ukBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,IAAA,eAAAC,EAAAH,GAgHQ,IAAAI,EAAA,6BA/GRC,EAAkB,gCAClBC,EAAmB,kCACnBC,EAAoB,0CACpBC,EAAmB,yCACnBC,EAAsB,oCACtBC,EAA2B,kCAC3BC,EAAqG,oBACrGC,EAA4B,sCAC5BC,EAA4B,uCAE5BC,EAAqB,uCACrBC,EAAwB,uCAExB,MAAMC,EAAgB,QAChBC,EAAgB,eAmChBC,EAAuB,CAAC,CAC5B,KAAAC,EACA,IAAAC,EACA,UAAAC,EACA,WAAAC,EACA,OAAAC,EACA,sBAAAC,EACA,YAAAC,EACA,aAAAC,EACA,cAAAC,EACA,MAAAC,EACA,KAAAC,EACA,aAAAC,CACF,IAaM,CACJ,MAAMC,EAAaT,IAAeF,EAC5BY,EAAYD,EAAa,EAAI,EAEnC,wBAAY,CAAE,QAASD,EAAa,QAAQV,CAAG,CAAE,EAAgC,CAC/E,cAAAJ,EACA,cAAAC,EACA,eAAgBE,GAAM,MACtB,SAAUC,EAAM,EAChB,qBAAsBD,GAAM,QAC9B,CAAC,KAGC,QAAC,OAEC,MAAO,CACL,KAAM,GAAGa,CAAS,QAClB,WAAY,UACd,EACA,IAAMC,GAA8B,CAC9BA,GAAIV,EAAOH,EAAKa,CAAE,CACxB,EACA,aAAW,MAAG,0CAA2CZ,IAAc,QAAU,cAAgB,EAAE,EACnG,aAAc,IAAMG,EAAsBJ,CAAG,EAC7C,aAAc,IAAM,CAClBK,EAAY,QAAU,EACxB,EACA,QAAS,IAAM,CACbD,EAAsBJ,CAAG,CAC3B,EAEA,oBAAC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AAOA,GAAM,MACb,UAAWA,GAAM,UACjB,cAAeA,GAAM,cACrB,MAAOD,EACP,MAAOC,GAAM,KACf,CACF,EACA,MAAOO,EACP,YAAa,CACX,EAAG,CACD,aAAc,GACd,SAAU,GACV,cAAe,CACjB,EACA,IAAK,CACH,aAAc,GACd,SAAU,GACV,cAAe,GACjB,EACA,IAAK,CACH,aAAc,GACd,SAAU,GACV,cAAe,GACjB,CACF,EACF,EACF,GACF,CAEJ,CAAC,EACD,IAAOlC,KAAQ,cAAWqC,CAAc",
|
|
6
6
|
"names": ["AccordionCards_exports", "__export", "AccordionCards_default", "__toCommonJS", "import_jsx_runtime", "import_Title", "import_utils", "import_picture", "import_button", "import_SwiperBox", "import_Styles", "import_react", "import_useExposure", "import_trackUrlRef", "import_throttle", "import_heading", "componentType", "componentName", "AccordionCardsPcItem", "item", "idx", "itemShape", "hoverIndex", "getRef", "handleSwiperItemClick", "isAnimation", "contentWidth", "primaryButton", "event", "data", "accordionRef", "isExpanded", "flexValue", "el", "Picture", "Button", "MobileItem", "configuration", "ref", "AccordionCards", "React", "className", "setHoverIndex", "hoverIndexRef", "setContentWidth", "innerRef", "index", "handleResize", "throttleResize", "throttle", "Title", "SwiperBox"]
|
|
7
7
|
}
|
|
@@ -2,10 +2,6 @@ import React from 'react';
|
|
|
2
2
|
interface AiuiContextType {
|
|
3
3
|
trackingData: Record<string, any>;
|
|
4
4
|
locale?: string;
|
|
5
|
-
pathname?: string;
|
|
6
|
-
storeDomain?: string;
|
|
7
|
-
isLogin?: boolean;
|
|
8
|
-
currencyCode?: string;
|
|
9
5
|
copyWriting?: Record<string, string>;
|
|
10
6
|
}
|
|
11
7
|
export declare const AiuiContext: React.Context<AiuiContextType>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";var p=Object.defineProperty;var
|
|
1
|
+
"use strict";var p=Object.defineProperty;var g=Object.getOwnPropertyDescriptor;var v=Object.getOwnPropertyNames;var A=Object.prototype.hasOwnProperty;var k=(a,e)=>{for(var o in e)p(a,o,{get:e[o],enumerable:!0})},x=(a,e,o,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let t of v(e))!A.call(a,t)&&t!==o&&p(a,t,{get:()=>e[t],enumerable:!(s=g(e,t))||s.enumerable});return a};var C=a=>x(p({},"__esModule",{value:!0}),a);var T={};k(T,{AiuiContext:()=>c,default:()=>P,useAiuiContext:()=>_});module.exports=C(T);var b=require("react/jsx-runtime"),h=require("../../shared/track.js"),r=require("react");const c=(0,r.createContext)({trackingData:{},locale:void 0,copyWriting:{}}),_=()=>{if(!(0,r.useContext)(c))throw new Error("useAiui must be used in <AiuiProvider>");return(0,r.useContext)(c)},E=({children:a,...e})=>((0,r.useEffect)(()=>{const o=(t,n)=>{const i={};if(!n||!n.attributes)return i;for(const f of Array.from(n.attributes)){const u=f?.name;u?.startsWith("data-headless-")&&(i[u]=n.getAttribute(u))}const y=i?.["data-headless-sku"],l=i?.["data-headless-type-name"]?.split?.("#"),d=i?.["data-headless-title-desc-button"]?.split?.("#"),m=i?.["data-headless-nav-postion"]?.split?.("#");(0,h.gaTrack)({event:"ga4Event",event_name:"component_click",event_parameters:{page_group:e?.trackingData?.pageGroup||"Home Page",component_type:l?.[0]||"",component_name:l?.[1]||"",position:m?.[1]||"",navigation:m?.[0]||"",button_name:d?.[2]||"",SKU:y||"",component_title:d?.[0]||"",component_description:d?.[1]||""}})},s=new MutationObserver(()=>{document.querySelectorAll("[data-headless-type-name]").forEach(t=>{t.hasAttribute("data-headless-track-bound")||(t.addEventListener("click",n=>o(n,t)),t.setAttribute("data-headless-track-bound","true"))})});return s.observe(document.body,{childList:!0,subtree:!0}),document.querySelectorAll("[data-headless-type-name]").forEach(t=>{t.hasAttribute("data-headless-track-bound")||(t.addEventListener("click",n=>o(n,t)),t.setAttribute("data-headless-track-bound","true"))}),()=>s.disconnect()},[]),(0,b.jsx)(c.Provider,{value:e,children:a}));var P=E;
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/biz-components/AiuiProvider/index.tsx"],
|
|
4
|
-
"sourcesContent": ["import { gaTrack } from '../../shared/track.js'\nimport React, { createContext, useContext, useEffect } from 'react'\n\ninterface AiuiContextType {\n trackingData: Record<string, any>\n locale?: string\n
|
|
5
|
-
"mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,iBAAAE,EAAA,YAAAC,EAAA,mBAAAC,IAAA,eAAAC,EAAAL,
|
|
4
|
+
"sourcesContent": ["import { gaTrack } from '../../shared/track.js'\nimport React, { createContext, useContext, useEffect } from 'react'\n\ninterface AiuiContextType {\n trackingData: Record<string, any>\n locale?: string\n copyWriting?: Record<string, string>\n}\n\nexport const AiuiContext = createContext<AiuiContextType>({\n trackingData: {},\n locale: undefined,\n copyWriting: {},\n})\n\nexport const useAiuiContext = () => {\n const context = useContext(AiuiContext)\n if (!context) {\n throw new Error('useAiui must be used in <AiuiProvider>')\n }\n return useContext(AiuiContext)\n}\n\nconst AiuiProvider = ({\n children,\n ...rest\n}: {\n children: React.ReactNode\n} & AiuiContextType) => {\n useEffect(() => {\n const handleTrackClick = (e: any, el: any) => {\n // e?.stopPropagation?.()\n const out: any = {}\n if (!el || !el.attributes) return out\n for (const attr of Array.from(el.attributes)) {\n const name = (attr as any)?.name\n if (name?.startsWith('data-headless-')) {\n out[name] = el.getAttribute(name)\n }\n }\n const sku = out?.['data-headless-sku']\n const nameType = out?.['data-headless-type-name']?.split?.('#')\n const titleDesc = out?.['data-headless-title-desc-button']?.split?.('#')\n const navPosition = out?.['data-headless-nav-postion']?.split?.('#')\n gaTrack({\n event: 'ga4Event',\n event_name: 'component_click',\n event_parameters: {\n page_group: rest?.trackingData?.pageGroup || 'Home Page',\n component_type: nameType?.[0] || '',\n component_name: nameType?.[1] || '',\n position: navPosition?.[1] || '',\n navigation: navPosition?.[0] || '',\n button_name: titleDesc?.[2] || '',\n SKU: sku || '',\n component_title: titleDesc?.[0] || '',\n component_description: titleDesc?.[1] || '',\n },\n })\n }\n const observer = new MutationObserver(() => {\n document.querySelectorAll('[data-headless-type-name]').forEach(el => {\n if (!el.hasAttribute('data-headless-track-bound')) {\n el.addEventListener('click', e => handleTrackClick(e, el))\n el.setAttribute('data-headless-track-bound', 'true') // \u907F\u514D\u91CD\u590D\u7ED1\u5B9A\n }\n })\n })\n observer.observe(document.body, { childList: true, subtree: true })\n // \u521D\u59CB\u5316\u4E00\u6B21\u73B0\u6709\u8282\u70B9\n document.querySelectorAll('[data-headless-type-name]').forEach(el => {\n if (!el.hasAttribute('data-headless-track-bound')) {\n el.addEventListener('click', e => handleTrackClick(e, el))\n el.setAttribute('data-headless-track-bound', 'true')\n }\n })\n return () => observer.disconnect()\n }, [])\n\n return <AiuiContext.Provider value={rest}>{children}</AiuiContext.Provider>\n}\n\nexport default AiuiProvider\n"],
|
|
5
|
+
"mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,iBAAAE,EAAA,YAAAC,EAAA,mBAAAC,IAAA,eAAAC,EAAAL,GA+ES,IAAAM,EAAA,6BA/ETC,EAAwB,iCACxBC,EAA4D,iBAQrD,MAAMN,KAAc,iBAA+B,CACxD,aAAc,CAAC,EACf,OAAQ,OACR,YAAa,CAAC,CAChB,CAAC,EAEYE,EAAiB,IAAM,CAElC,GAAI,IADY,cAAWF,CAAW,EAEpC,MAAM,IAAI,MAAM,wCAAwC,EAE1D,SAAO,cAAWA,CAAW,CAC/B,EAEMO,EAAe,CAAC,CACpB,SAAAC,EACA,GAAGC,CACL,QAGE,aAAU,IAAM,CACd,MAAMC,EAAmB,CAACC,EAAQC,IAAY,CAE5C,MAAMC,EAAW,CAAC,EAClB,GAAI,CAACD,GAAM,CAACA,EAAG,WAAY,OAAOC,EAClC,UAAWC,KAAQ,MAAM,KAAKF,EAAG,UAAU,EAAG,CAC5C,MAAMG,EAAQD,GAAc,KACxBC,GAAM,WAAW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
6
|
"names": ["AiuiProvider_exports", "__export", "AiuiContext", "AiuiProvider_default", "useAiuiContext", "__toCommonJS", "import_jsx_runtime", "import_track", "import_react", "AiuiProvider", "children", "rest", "handleTrackClick", "e", "el", "out", "attr", "name", "sku", "nameType", "titleDesc", "navPosition", "observer"]
|
|
7
7
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";"use client";var
|
|
1
|
+
"use strict";"use client";var u=Object.create;var n=Object.defineProperty;var v=Object.getOwnPropertyDescriptor;var y=Object.getOwnPropertyNames;var g=Object.getPrototypeOf,N=Object.prototype.hasOwnProperty;var b=(e,t)=>{for(var o in t)n(e,o,{get:t[o],enumerable:!0})},m=(e,t,o,s)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of y(t))!N.call(e,i)&&i!==o&&n(e,i,{get:()=>t[i],enumerable:!(s=v(t,i))||s.enumerable});return e};var F=(e,t,o)=>(o=e!=null?u(g(e)):{},m(t||!e||!e.__esModule?n(o,"default",{value:e,enumerable:!0}):o,e)),h=e=>m(n({},"__esModule",{value:!0}),e);var D={};b(D,{FaqItem:()=>d,default:()=>q});module.exports=h(D);var a=require("react/jsx-runtime"),r=F(require("react")),p=require("../../components/index.js"),l=require("../../helpers/index.js"),c=require("../../shared/Styles.js");const x=r.default.forwardRef(({data:e,className:t},o)=>{const s=(0,r.useRef)(null);return(0,r.useImperativeHandle)(o,()=>s.current),(0,a.jsx)("div",{ref:s,className:(0,l.cn)(t),children:(0,a.jsx)("div",{children:e?.productData?.map((i,f)=>(0,a.jsx)(d,{data:i},f))})})});x.displayName="Faq";const d=({data:e})=>{const[t,o]=(0,r.useState)(!1);return(0,a.jsx)("div",{className:"tablet:py-[24px] border-b border-[#E4E5E6] py-[16px]",children:(0,a.jsxs)("div",{children:[(0,a.jsxs)("div",{onClick:()=>{o(!t)},className:"tablet:gap-[128px] flex cursor-pointer items-center justify-between gap-[16px]",children:[(0,a.jsx)(p.Text,{html:e?.title,className:"desktop:text-[16px] lg-desktop:text-[18px] text-[14px] font-bold leading-[1.4] text-[#1D1D1F]"}),(0,a.jsx)("div",{className:" transition-transform duration-300",children:(0,a.jsx)(p.Picture,{source:e?.img?.url,className:(0,l.cn)("w-[20px] transition-transform duration-300",t&&"rotate-180")})})]}),(0,a.jsx)("div",{className:(0,l.cn)(" overflow-hidden transition-all duration-500",t?"mt-[8px] max-h-[500px] opacity-100":"max-h-0 opacity-0"),children:(0,a.jsx)(p.Text,{html:e?.desc,className:"desktop:text-[16px] lg-desktop:text-[18px] text-[14px] font-bold leading-[1.4] text-[#6D6D6F]"})})]})})};d.displayName="FaqItem";var q=(0,c.withLayout)(x);
|
|
2
2
|
//# sourceMappingURL=Faq.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/biz-components/Faq/Faq.tsx"],
|
|
4
|
-
"sourcesContent": ["'use client'\nimport React, { useImperativeHandle, useRef, useState } from 'react'\nimport type { FaqProps, FaqItem as ItemType } from './types.js'\nimport { Picture, Text } from '../../components/index.js'\nimport { cn } from '../../helpers/index.js'\nimport { withLayout } from '../../shared/Styles.js'\n\nconst Faq = React.forwardRef<HTMLDivElement, FaqProps>(({ data, className }, ref) => {\n const innerRef = useRef<HTMLDivElement>(null)\n useImperativeHandle(ref, () => innerRef.current!)\n\n return (\n <div ref={innerRef} className={cn(className)}>\n <div>{data?.productData?.map((item: any, index: number) => <FaqItem key={index} data={item} />)}</div>\n </div>\n )\n})\n\nFaq.displayName = 'Faq'\n\nconst FaqItem = ({ data }: { data: ItemType }) => {\n const [open, setOpen] = useState(false)\n\n const handleToggle = () => {\n setOpen(!open)\n }\n\n return (\n <div className=\"tablet:py-
|
|
5
|
-
"mappings": "ukBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,EAAA,YAAAC,IAAA,eAAAC,EAAAJ,
|
|
4
|
+
"sourcesContent": ["'use client'\nimport React, { useImperativeHandle, useRef, useState } from 'react'\nimport type { FaqProps, FaqItem as ItemType } from './types.js'\nimport { Picture, Text } from '../../components/index.js'\nimport { cn } from '../../helpers/index.js'\n// import { withStyles } from '../../shared/Styles.js'\nimport { withLayout } from '../../shared/Styles.js'\n\nconst Faq = React.forwardRef<HTMLDivElement, FaqProps>(({ data, className }, ref) => {\n const innerRef = useRef<HTMLDivElement>(null)\n useImperativeHandle(ref, () => innerRef.current!)\n\n return (\n <div ref={innerRef} className={cn(className)}>\n <div>{data?.productData?.map((item: any, index: number) => <FaqItem key={index} data={item} />)}</div>\n </div>\n )\n})\n\nFaq.displayName = 'Faq'\n\nconst FaqItem = ({ data }: { data: ItemType }) => {\n const [open, setOpen] = useState(false)\n\n const handleToggle = () => {\n setOpen(!open)\n }\n\n return (\n <div className=\"tablet:py-[24px] border-b border-[#E4E5E6] py-[16px]\">\n <div>\n <div\n onClick={handleToggle}\n className=\"tablet:gap-[128px] flex cursor-pointer items-center justify-between gap-[16px]\"\n >\n <Text\n html={data?.title}\n className=\"desktop:text-[16px] lg-desktop:text-[18px] text-[14px] font-bold leading-[1.4] text-[#1D1D1F]\"\n />\n <div className=\" transition-transform duration-300\">\n <Picture\n source={data?.img?.url}\n className={cn('w-[20px] transition-transform duration-300', open && 'rotate-180')}\n />\n </div>\n </div>\n\n {/* \u5E26\u8FC7\u6E21\u7684\u5185\u5BB9\u533A\u57DF */}\n <div\n className={cn(\n ' overflow-hidden transition-all duration-500',\n open ? 'mt-[8px] max-h-[500px] opacity-100' : 'max-h-0 opacity-0'\n )}\n >\n <Text\n html={data?.desc}\n className=\"desktop:text-[16px] lg-desktop:text-[18px] text-[14px] font-bold leading-[1.4] text-[#6D6D6F]\"\n />\n </div>\n </div>\n </div>\n )\n}\n\nFaqItem.displayName = 'FaqItem'\n\nexport default withLayout(Faq)\nexport { FaqItem }\n"],
|
|
5
|
+
"mappings": "ukBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,EAAA,YAAAC,IAAA,eAAAC,EAAAJ,GAciE,IAAAK,EAAA,6BAbjEC,EAA6D,oBAE7DC,EAA8B,qCAC9BC,EAAmB,kCAEnBC,EAA2B,kCAE3B,MAAMC,EAAM,EAAAC,QAAM,WAAqC,CAAC,CAAE,KAAAC,EAAM,UAAAC,CAAU,EAAGC,IAAQ,CACnF,MAAMC,KAAW,UAAuB,IAAI,EAC5C,gCAAoBD,EAAK,IAAMC,EAAS,OAAQ,KAG9C,OAAC,OAAI,IAAKA,EAAU,aAAW,MAAGF,CAAS,EACzC,mBAAC,OAAK,SAAAD,GAAM,aAAa,IAAI,CAACI,EAAWC,OAAkB,OAACf,EAAA,CAAoB,KAAMc,GAAbC,CAAmB,CAAE,EAAE,EAClG,CAEJ,CAAC,EAEDP,EAAI,YAAc,MAElB,MAAMR,EAAU,CAAC,CAAE,KAAAU,CAAK,IAA0B,CAChD,KAAM,CAACM,EAAMC,CAAO,KAAI,YAAS,EAAK,EAMtC,SACE,OAAC,OAAI,UAAU,uDACb,oBAAC,OACC,qBAAC,OACC,QARa,IAAM,CACzBA,EAAQ,CAACD,CAAI,CACf,EAOQ,UAAU,iFAEV,oBAAC,QACC,KAAMN,GAAM,MACZ,UAAU,gGACZ,KACA,OAAC,OAAI,UAAU,qCACb,mBAAC,WACC,OAAQA,GAAM,KAAK,IACnB,aAAW,MAAG,6CAA8CM,GAAQ,YAAY,EAClF,EACF,GACF,KAGA,OAAC,OACC,aAAW,MACT,+CACAA,EAAO,qCAAuC,mBAChD,EAEA,mBAAC,QACC,KAAMN,GAAM,KACZ,UAAU,gGACZ,EACF,GACF,EACF,CAEJ,EAEAV,EAAQ,YAAc,UAEtB,IAAOC,KAAQ,cAAWO,CAAG",
|
|
6
6
|
"names": ["Faq_exports", "__export", "FaqItem", "Faq_default", "__toCommonJS", "import_jsx_runtime", "import_react", "import_components", "import_helpers", "import_Styles", "Faq", "React", "data", "className", "ref", "innerRef", "item", "index", "open", "setOpen"]
|
|
7
7
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";"use client";var z=Object.create;var f=Object.defineProperty;var j=Object.getOwnPropertyDescriptor;var R=Object.getOwnPropertyNames;var q=Object.getPrototypeOf,Y=Object.prototype.hasOwnProperty;var _=(e,s)=>{for(var
|
|
1
|
+
"use strict";"use client";var z=Object.create;var f=Object.defineProperty;var j=Object.getOwnPropertyDescriptor;var R=Object.getOwnPropertyNames;var q=Object.getPrototypeOf,Y=Object.prototype.hasOwnProperty;var _=(e,s)=>{for(var i in s)f(e,i,{get:s[i],enumerable:!0})},T=(e,s,i,a)=>{if(s&&typeof s=="object"||typeof s=="function")for(let o of R(s))!Y.call(e,o)&&o!==i&&f(e,o,{get:()=>s[o],enumerable:!(a=j(s,o))||a.enumerable});return e};var b=(e,s,i)=>(i=e!=null?z(q(e)):{},T(s||!e||!e.__esModule?f(i,"default",{value:e,enumerable:!0}):i,e)),A=e=>T(f({},"__esModule",{value:!0}),e);var F={};_(F,{default:()=>Z});module.exports=A(F);var t=require("react/jsx-runtime"),M=require("react-responsive"),l=b(require("react")),d=require("../../helpers/utils.js"),I=require("../../shared/Styles.js"),V=b(require("../SwiperBox/index.js")),n=require("../../components/index.js"),C=b(require("../Title/index.js")),P=require("../VideoModal/index.js"),$=require("../TextModal/index.js"),g=require("../../hooks/useExposure.js"),x=require("../../shared/trackUrlRef.js");const c="image",m="graphic",Q=({data:e,configuration:s})=>{const i=(0,l.useRef)(null),a=()=>{switch(s.num){case 1:return"tablet:aspect-w-[704] tablet:aspect-h-[400] laptop:aspect-w-[896] laptop:aspect-h-[384] desktop:aspect-w-[1312] desktop:aspect-h-[512] lg-desktop:aspect-w-[1664] lg-desktop:aspect-h-[640]";case 2:return"tablet:aspect-w-[346] tablet:aspect-h-[360] laptop:aspect-w-[440] laptop:aspect-h-[360] desktop:aspect-w-[648] desktop:aspect-h-[384] lg-desktop:aspect-w-[824] lg-desktop:aspect-h-[480]";case 3:return"tablet:aspect-w-[296] tablet:aspect-h-[360] laptop:aspect-w-[288] laptop:aspect-h-[360] desktop:aspect-w-[427] desktop:aspect-h-[384] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[480]";default:return"tablet:aspect-w-[296] tablet:aspect-h-[360] laptop:aspect-w-[288] laptop:aspect-h-[360] desktop:aspect-w-[316] desktop:aspect-h-[384] lg-desktop:aspect-w-[404] lg-desktop:aspect-h-[480]"}};return(0,g.useExposure)(i,{componentType:c,componentName:m,componentTitle:e?.title,componentDescription:e?.description,position:s?.index+1}),(0,t.jsx)("div",{ref:i,className:(0,d.cn)(a(),"graphicItem","laptop:h-auto text-info-primary md-tablet:h-[360px] flex-1 shrink-0 md:basis-[296px]",{"aiui-dark":e.theme==="dark"}),children:(0,t.jsx)("div",{className:(0,d.cn)("absolute inset-0",{"rounded-xl overflow-hidden laptop:rounded-2xl":s?.itemShape==="round"}),children:(0,t.jsxs)("div",{className:"relative block size-full cursor-pointer overflow-hidden",children:[e?.href?(0,t.jsx)("a",{"aria-label":e?.title??e?.description,href:(0,x.trackUrlRef)(e?.href||"",`${c}_${m}`),className:"block size-full cursor-pointer overflow-hidden","data-headless-nav-postion":`''#${s?.index+1}`,"data-headless-type-name":`${c}#${m}`,"data-headless-title-desc-button":`${e?.title}#${e?.description}`,children:(0,t.jsx)(n.Picture,{className:"h-full",imgClassName:"h-full object-cover tablet:hover:scale-110 transition-all duration-300",source:e?.imgUrl?.url,alt:e?.imgUrl?.alt||""})}):(0,t.jsx)("div",{className:"block size-full cursor-pointer overflow-hidden",children:(0,t.jsx)(n.Picture,{className:"h-full",imgClassName:"h-full object-cover tablet:hover:scale-110 transition-all duration-300",source:e?.imgUrl?.url,alt:e?.imgUrl?.alt||""})}),(0,t.jsxs)("div",{className:"laptop:p-6 absolute bottom-0 z-[1] box-border flex w-full flex-col p-4",children:[(0,t.jsxs)("div",{className:(0,d.cn)("flex items-end overflow-hidden","graphic-bottom"),children:[(0,t.jsxs)("div",{className:"flex-1 overflow-hidden",children:[(0,t.jsx)(n.Text,{html:e?.title,style:{color:e?.textColor},className:"graphic-title line-clamp-3 lg-desktop:text-lg desktop:text-base text-sm font-bold leading-[1.2]"}),e?.description&&(0,t.jsx)(n.Heading,{html:e?.description,style:{color:e?.textColor},as:"h3",className:"graphic-description lg-desktop:text-[32px] desktop:mt-2 desktop:text-[24px] text-lines-2 mt-1 line-clamp-3 flex-1 text-[24px] font-bold leading-[1.2]"})]}),!e?.isShowIcon&&(e?.video?.url||e?.youtubeId)&&(0,t.jsx)("button",{"aria-label":"Play Video",onClick:o=>{o.preventDefault(),o.stopPropagation(),s?.onVideoPlayBtnClick?.(s?.index||0,e)},className:"laptop:size-12 flex size-8 items-center justify-center rounded-full bg-white bg-opacity-20 hover:bg-black/75",children:(0,t.jsx)("svg",{width:"12",height:"14",viewBox:"0 0 12 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,t.jsx)("path",{d:"M12 7L0 14L0 0L12 7Z",fill:"white"})})}),e?.isShowIcon&&e?.icon?.url&&(0,t.jsx)("button",{onClick:o=>{o.preventDefault(),o.stopPropagation(),s?.onIconClick?.(e,s)},className:"laptop:size-9 flex size-8 items-center justify-center rounded-full bg-white bg-opacity-20 hover:bg-black/75 overflow-hidden",children:(0,t.jsx)(n.Picture,{className:"h-full",imgClassName:"h-full object-cover",source:e?.icon?.url,alt:e?.icon?.alt||""})})]}),e.buttonText&&(0,t.jsx)(n.Button,{as:"a","aria-label":e?.title??e?.description,variant:"secondary",className:"mt-[8px] self-start",href:(0,x.trackUrlRef)(e?.href,`${c}_${m}`),"data-headless-nav-postion":`''#${s?.index+1}`,"data-headless-type-name":`${c}#${m}`,"data-headless-title-desc-button":`${e?.title}#${e?.description}#${e?.buttonText}`,children:e.buttonText})]})]})})})},N=l.default.forwardRef(({data:e,className:s},i)=>{const a=(0,M.useMediaQuery)({query:"(max-width: 768px)"}),o=(0,l.useRef)(null),[S,v]=(0,l.useState)(!1),[w,G]=(0,l.useState)(""),[B,D]=(0,l.useState)(""),[E,H]=(0,l.useState)(""),[L,y]=(0,l.useState)(null),[U,k]=(0,l.useState)(!1),u=p=>{const r=e?.items?.length>3,h=e?.items?.length>2;switch(p){case 1440:return r?4:e?.items?.length;case 1024:return r?3:e?.items?.length;case 768:return r||h?2.3:2;default:return 1.2}};return(0,l.useImperativeHandle)(i,()=>o.current),(0,g.useExposure)(o,{componentType:c,componentName:m,componentTitle:e?.title}),(0,l.useEffect)(()=>{const p=o.current?.querySelectorAll(".graphic-description");if(p&&p.length>0){let r=0;p.forEach(h=>{r=Math.max(r,h.offsetHeight)}),p.forEach(h=>{h.style.height=`${r}px`})}},[]),(0,t.jsxs)("div",{className:(0,d.cn)("graphicBlock",s),ref:o,children:[(0,t.jsxs)("div",{className:"graphic-box",children:[e?.title&&(0,t.jsx)(C.default,{data:{title:e?.title}}),(0,t.jsx)(V.default,{id:"Graphic",className:(0,d.cn)("!overflow-visible"),data:{list:e?.items||[],configuration:{itemShape:e.itemShape,num:e?.items?.length||0,onVideoPlayBtnClick:(p,r)=>{v(!0),r?.isYouTube?D?.(r?.youtubeId||""):(G?.(r?.video?.url||""),H?.(r?.mobileVideo?.url||""))},onIconClick:p=>{k(!0),y(p)},title:e?.title}},Slide:Q,breakpoints:{0:{spaceBetween:12,freeMode:!1,slidesPerView:1},374:{spaceBetween:12,freeMode:!1,slidesPerView:u()},768:{spaceBetween:16,freeMode:!1,slidesPerView:u(768)},1024:{spaceBetween:16,freeMode:!1,slidesPerView:u(1024)},1440:{spaceBetween:16,freeMode:!1,slidesPerView:u(1440)}}})]}),(0,t.jsx)(P.VideoModal,{visible:S,youTubeId:B,onCloseModal:()=>v(!1),videoUrl:a&&E||w}),(0,t.jsx)($.TextModal,{textVisible:U,extension:L?.extension,onCloseModal:()=>{k(!1),y(null)}})]})});N.displayName="Graphic";var Z=(0,I.withLayout)(N);
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/biz-components/Graphic/index.tsx"],
|
|
4
|
-
"sourcesContent": ["'use client'\nimport { useMediaQuery } from 'react-responsive'\nimport React, { useEffect, useImperativeHandle, useRef, useState } from 'react'\nimport { cn } from '../../helpers/utils.js'\nimport { withLayout } from '../../shared/Styles.js'\nimport SwiperBox from '../SwiperBox/index.js'\nimport { Button, Heading, Picture, Text } from '../../components/index.js'\nimport Title from '../Title/index.js'\nimport { VideoModal } from '../VideoModal/index.js'\nimport { TextModal } from '../TextModal/index.js'\nimport type { ComponentCommonProps, Video, Img, Theme } from '../../types/props.js'\nimport { useExposure } from '../../hooks/useExposure.js'\nimport { trackUrlRef } from '../../shared/trackUrlRef.js'\nimport type { Media } from '../../types/props.js'\n\nconst componentType = 'image'\nconst componentName = 'graphic'\n\ntype GraphicType = {\n imgUrl: Img\n title: string\n description?: string\n textColor?: string\n href?: string\n video?: Video\n mobileVideo?: Video\n youtubeId?: string\n isYouTube?: boolean\n isShowIcon?: boolean\n buttonText?: string\n icon?: Img\n theme?: Theme\n extension?: {\n text: string\n textDesc: string\n textTitle: string\n textPcImg: Img\n textMobileImg: Img\n }\n // textPcImg?: Img\n // textMobileImg?: Img\n // text?: string\n // textDesc?: string\n // textTitle?: string\n}\nexport interface GraphicProps extends ComponentCommonProps {\n className?: string\n data: {\n title?: string\n items?: GraphicType[]\n itemShape?: 'round' | 'square'\n itemTheme?: Theme\n }\n}\n\nconst Item = ({ data, configuration }: { data: GraphicType; configuration?: any }) => {\n const ref = useRef<HTMLDivElement>(null)\n const handleAspect = () => {\n switch (configuration.num) {\n case 1:\n return 'tablet:aspect-w-[704] tablet:aspect-h-[400] laptop:aspect-w-[896] laptop:aspect-h-[384] desktop:aspect-w-[1312] desktop:aspect-h-[512] lg-desktop:aspect-w-[1664] lg-desktop:aspect-h-[640]'\n case 2:\n return 'tablet:aspect-w-[346] tablet:aspect-h-[360] laptop:aspect-w-[440] laptop:aspect-h-[360] desktop:aspect-w-[648] desktop:aspect-h-[384] lg-desktop:aspect-w-[824] lg-desktop:aspect-h-[480]'\n case 3:\n return 'tablet:aspect-w-[296] tablet:aspect-h-[360] laptop:aspect-w-[288] laptop:aspect-h-[360] desktop:aspect-w-[427] desktop:aspect-h-[384] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[480]'\n default:\n return 'tablet:aspect-w-[296] tablet:aspect-h-[360] laptop:aspect-w-[288] laptop:aspect-h-[360] desktop:aspect-w-[316] desktop:aspect-h-[384] lg-desktop:aspect-w-[404] lg-desktop:aspect-h-[480]'\n }\n }\n\n useExposure(ref, {\n componentType,\n componentName,\n componentTitle: data?.title,\n componentDescription: data?.description,\n position: configuration?.index + 1,\n })\n\n return (\n <div\n ref={ref}\n className={cn(\n handleAspect(),\n 'graphicItem',\n 'laptop:h-auto text-info-primary md-tablet:h-[360px] flex-1 shrink-0 md:basis-[296px]',\n {\n 'aiui-dark': data.theme === 'dark',\n }\n )}\n >\n <div\n className={cn('absolute inset-0', {\n ['rounded-xl overflow-hidden laptop:rounded-2xl']: configuration?.itemShape === 'round',\n })}\n >\n <div className=\"relative block size-full cursor-pointer overflow-hidden\">\n {data?.href ? (\n <a\n aria-label={data?.title ?? data?.description}\n href={trackUrlRef(data?.href || '', `${componentType}_${componentName}`)}\n className=\"block size-full cursor-pointer overflow-hidden\"\n data-headless-nav-postion={`''#${configuration?.index + 1}`}\n data-headless-type-name={`${componentType}#${componentName}`}\n data-headless-title-desc-button={`${data?.title}#${data?.description}`}\n >\n <Picture\n className=\"h-full\"\n imgClassName=\"h-full object-cover tablet:hover:scale-110 transition-all duration-300\"\n source={data?.imgUrl?.url}\n alt={data?.imgUrl?.alt || ''}\n />\n </a>\n ) : (\n <div className=\"block size-full cursor-pointer overflow-hidden\">\n <Picture\n className=\"h-full\"\n imgClassName=\"h-full object-cover tablet:hover:scale-110 transition-all duration-300\"\n source={data?.imgUrl?.url}\n alt={data?.imgUrl?.alt || ''}\n />\n </div>\n )}\n <div className=\"laptop:p-6 absolute bottom-0 z-[1] box-border flex w-full flex-col p-4\">\n <div className={cn('flex items-end overflow-hidden', 'graphic-bottom')}>\n <div className=\"flex-1 overflow-hidden\">\n <Text\n html={data?.title}\n style={{ color: data?.textColor }}\n // eslint-disable-next-line tailwindcss/classnames-order\n className=\"graphic-title line-clamp-3 lg-desktop:text-lg desktop:text-base text-sm font-bold leading-[1.2]\"\n />\n {data?.description && (\n <Heading\n html={data?.description}\n style={{\n color: data?.textColor,\n }}\n as=\"h3\"\n className=\"graphic-description lg-desktop:text-[32px] desktop:mt-2 desktop:text-[24px] text-lines-2 mt-1 line-clamp-3 flex-1 text-[24px] font-bold leading-[1.2]\"\n />\n )}\n </div>\n {!data?.isShowIcon && (data?.video?.url || data?.youtubeId) && (\n <button\n aria-label=\"Play Video\"\n onClick={(e: any) => {\n e.preventDefault()\n e.stopPropagation()\n configuration?.onVideoPlayBtnClick?.(configuration?.index || 0, data)\n }}\n className=\"laptop:size-12 flex size-8 items-center justify-center rounded-full bg-white bg-opacity-20 hover:bg-black/75\"\n >\n <svg width=\"12\" height=\"14\" viewBox=\"0 0 12 14\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M12 7L0 14L0 0L12 7Z\" fill=\"white\" />\n </svg>\n </button>\n )}\n {data?.isShowIcon && data?.icon?.url && (\n <button\n onClick={(e: any) => {\n e.preventDefault()\n e.stopPropagation()\n configuration?.onIconClick?.(data, configuration)\n }}\n className=\"laptop:size-9 flex size-8 items-center justify-center rounded-full bg-white bg-opacity-20 hover:bg-black/75 overflow-hidden\"\n >\n <Picture\n className=\"h-full\"\n imgClassName=\"h-full object-cover\"\n source={data?.icon?.url}\n alt={data?.icon?.alt || ''}\n />\n </button>\n )}\n </div>\n {data.buttonText && (\n <Button\n as=\"a\"\n aria-label={data?.title ?? data?.description}\n variant=\"secondary\"\n className=\"mt-[8px] self-start\"\n href={trackUrlRef(data?.href, `${componentType}_${componentName}`)}\n data-headless-nav-postion={`''#${configuration?.index + 1}`}\n data-headless-type-name={`${componentType}#${componentName}`}\n data-headless-title-desc-button={`${data?.title}#${data?.description}#${data?.buttonText}`}\n >\n {data.buttonText}\n </Button>\n )}\n </div>\n </div>\n </div>\n </div>\n )\n}\n\nconst Graphic = React.forwardRef<HTMLDivElement, GraphicProps>(({ data, className }, ref) => {\n const isMobile = useMediaQuery({ query: '(max-width: 768px)' })\n const innerRef = useRef<HTMLDivElement>(null)\n const [visible, setVisible] = useState<boolean>(false)\n const [videoUrl, setVideoUrl] = useState<string>('')\n const [youTubeId, setYouTubeId] = useState<string>('')\n const [mobileVideoUrl, setMobileVideoUrl] = useState<string>('')\n const [currentItem, setCurrentItem] = useState<GraphicType | null>(null)\n const [textVisible, setTextVisible] = useState<boolean>(false)\n\n const handleSwiperShow = (width?: number) => {\n const isShow = (data?.items as GraphicType[])?.length > 3\n const isMobile = (data?.items as GraphicType[])?.length > 2\n\n switch (width) {\n case 1440:\n return isShow ? 4 : data?.items?.length\n case 1024:\n return isShow ? 3 : data?.items?.length\n case 768:\n if ((data?.items as GraphicType[])?.length === 1) return 1 // \u2705 \u65B0\u589E\uFF1A\u53EA\u6709\u4E00\u4E2A item \u65F6\uFF0C\u5C55\u793A 1 \u4E2A\n return isShow ? 2.3 : isMobile ? 2.3 : 2\n default:\n if ((data?.items as GraphicType[])?.length === 1) return 1 // \u2705 \u65B0\u589E\uFF1A\u53EA\u6709\u4E00\u4E2A item \u65F6\uFF0C\u5C55\u793A 1 \u4E2A\n return 1.2\n }\n }\n\n useImperativeHandle(ref, () => innerRef.current as HTMLDivElement)\n\n useExposure(innerRef, {\n componentType,\n componentName,\n componentTitle: data?.title,\n })\n\n useEffect(() => {\n const descriptions = innerRef.current?.querySelectorAll<HTMLDivElement>('.graphic-description')\n if (descriptions && descriptions.length > 0) {\n let maxHeight = 0\n descriptions.forEach((el: HTMLDivElement) => {\n maxHeight = Math.max(maxHeight, el.offsetHeight)\n })\n descriptions.forEach((el: HTMLDivElement) => {\n el.style.height = `${maxHeight}px`\n })\n }\n }, [])\n\n return (\n <div className={cn('graphicBlock', className)} ref={innerRef}>\n <div className=\"graphic-box\">\n {data?.title && <Title data={{ title: data?.title }} />}\n <SwiperBox\n id=\"Graphic\"\n className={cn('!overflow-visible')}\n data={{\n list: data?.items || [],\n configuration: {\n itemShape: data.itemShape,\n num: data?.items?.length || 0,\n onVideoPlayBtnClick: (_: number, data: GraphicType) => {\n setVisible(true)\n if (data?.isYouTube) {\n setYouTubeId?.(data?.youtubeId || '')\n } else {\n setVideoUrl?.(data?.video?.url || '')\n setMobileVideoUrl?.(data?.mobileVideo?.url || '')\n }\n },\n onIconClick: (data: GraphicType) => {\n setTextVisible(true)\n setCurrentItem(data)\n },\n title: data?.title,\n },\n }}\n Slide={Item}\n breakpoints={{\n 0: {\n spaceBetween: 12,\n freeMode: false,\n slidesPerView: 1,\n },\n 374: {\n spaceBetween: 12,\n freeMode: false,\n slidesPerView: handleSwiperShow(),\n },\n 768: {\n spaceBetween: 16,\n freeMode: false,\n slidesPerView: handleSwiperShow(768),\n },\n 1024: {\n spaceBetween: 16,\n freeMode: false,\n slidesPerView: handleSwiperShow(1024),\n },\n 1440: {\n spaceBetween: 16,\n freeMode: false,\n slidesPerView: handleSwiperShow(1440),\n },\n }}\n />\n </div>\n <VideoModal\n visible={visible}\n youTubeId={youTubeId}\n onCloseModal={() => setVisible(false)}\n videoUrl={isMobile ? mobileVideoUrl || videoUrl : videoUrl}\n />\n <TextModal\n textVisible={textVisible}\n extension={currentItem?.extension}\n onCloseModal={() => {\n setTextVisible(false)\n setCurrentItem(null)\n }}\n />\n </div>\n )\n})\n\nGraphic.displayName = 'Graphic'\n\nexport default withLayout(Graphic)\n"],
|
|
5
|
-
"mappings": "ukBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,IAAA,eAAAC,EAAAH,GAyGc,IAAAI,EAAA,6BAxGdC,EAA8B,4BAC9BC,EAAwE,oBACxEC,EAAmB,kCACnBC,EAA2B,kCAC3BC,EAAsB,oCACt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,CAEJ,EAEMK,EAAU,EAAAC,QAAM,WAAyC,CAAC,CAAE,KAAAN,EAAM,UAAAO,CAAU,EAAGL,IAAQ,CAC3F,MAAMM,KAAW,iBAAc,CAAE,MAAO,oBAAqB,CAAC,EACxDC,KAAW,UAAuB,IAAI,EACtC,CAACC,EAASC,CAAU,KAAI,YAAkB,EAAK,EAC/C,CAACC,EAAUC,CAAW,KAAI,YAAiB,EAAE,EAC7C,CAACC,EAAWC,CAAY,KAAI,YAAiB,EAAE,EAC/C,CAACC,EAAgBC,CAAiB,KAAI,YAAiB,EAAE,EACzD,CAACC,EAAaC,CAAc,KAAI,YAA6B,IAAI,EACjE,CAACC,EAAaC,CAAc,KAAI,YAAkB,EAAK,EAEvDC,EAAoBC,GAAmB,CAC3C,MAAMC,EAAUxB,GAAM,OAAyB,OAAS,EAClDQ,EAAYR,GAAM,OAAyB,OAAS,
|
|
4
|
+
"sourcesContent": ["'use client'\nimport { useMediaQuery } from 'react-responsive'\nimport React, { useEffect, useImperativeHandle, useRef, useState } from 'react'\nimport { cn } from '../../helpers/utils.js'\nimport { withLayout } from '../../shared/Styles.js'\nimport SwiperBox from '../SwiperBox/index.js'\nimport { Button, Heading, Picture, Text } from '../../components/index.js'\nimport Title from '../Title/index.js'\nimport { VideoModal } from '../VideoModal/index.js'\nimport { TextModal } from '../TextModal/index.js'\nimport type { ComponentCommonProps, Video, Img, Theme } from '../../types/props.js'\nimport { useExposure } from '../../hooks/useExposure.js'\nimport { trackUrlRef } from '../../shared/trackUrlRef.js'\nimport type { Media } from '../../types/props.js'\n\nconst componentType = 'image'\nconst componentName = 'graphic'\n\ntype GraphicType = {\n imgUrl: Img\n title: string\n description?: string\n textColor?: string\n href?: string\n video?: Video\n mobileVideo?: Video\n youtubeId?: string\n isYouTube?: boolean\n isShowIcon?: boolean\n buttonText?: string\n icon?: Img\n theme?: Theme\n extension?: {\n text: string\n textDesc: string\n textTitle: string\n textPcImg: Img\n textMobileImg: Img\n }\n // textPcImg?: Img\n // textMobileImg?: Img\n // text?: string\n // textDesc?: string\n // textTitle?: string\n}\nexport interface GraphicProps extends ComponentCommonProps {\n className?: string\n data: {\n title?: string\n items?: GraphicType[]\n itemShape?: 'round' | 'square'\n itemTheme?: Theme\n }\n}\n\nconst Item = ({ data, configuration }: { data: GraphicType; configuration?: any }) => {\n const ref = useRef<HTMLDivElement>(null)\n const handleAspect = () => {\n switch (configuration.num) {\n case 1:\n return 'tablet:aspect-w-[704] tablet:aspect-h-[400] laptop:aspect-w-[896] laptop:aspect-h-[384] desktop:aspect-w-[1312] desktop:aspect-h-[512] lg-desktop:aspect-w-[1664] lg-desktop:aspect-h-[640]'\n case 2:\n return 'tablet:aspect-w-[346] tablet:aspect-h-[360] laptop:aspect-w-[440] laptop:aspect-h-[360] desktop:aspect-w-[648] desktop:aspect-h-[384] lg-desktop:aspect-w-[824] lg-desktop:aspect-h-[480]'\n case 3:\n return 'tablet:aspect-w-[296] tablet:aspect-h-[360] laptop:aspect-w-[288] laptop:aspect-h-[360] desktop:aspect-w-[427] desktop:aspect-h-[384] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[480]'\n default:\n return 'tablet:aspect-w-[296] tablet:aspect-h-[360] laptop:aspect-w-[288] laptop:aspect-h-[360] desktop:aspect-w-[316] desktop:aspect-h-[384] lg-desktop:aspect-w-[404] lg-desktop:aspect-h-[480]'\n }\n }\n\n useExposure(ref, {\n componentType,\n componentName,\n componentTitle: data?.title,\n componentDescription: data?.description,\n position: configuration?.index + 1,\n })\n\n return (\n <div\n ref={ref}\n className={cn(\n handleAspect(),\n 'graphicItem',\n 'laptop:h-auto text-info-primary md-tablet:h-[360px] flex-1 shrink-0 md:basis-[296px]',\n {\n 'aiui-dark': data.theme === 'dark',\n }\n )}\n >\n <div\n className={cn('absolute inset-0', {\n ['rounded-xl overflow-hidden laptop:rounded-2xl']: configuration?.itemShape === 'round',\n })}\n >\n <div className=\"relative block size-full cursor-pointer overflow-hidden\">\n {data?.href ? (\n <a\n aria-label={data?.title ?? data?.description}\n href={trackUrlRef(data?.href || '', `${componentType}_${componentName}`)}\n className=\"block size-full cursor-pointer overflow-hidden\"\n data-headless-nav-postion={`''#${configuration?.index + 1}`}\n data-headless-type-name={`${componentType}#${componentName}`}\n data-headless-title-desc-button={`${data?.title}#${data?.description}`}\n >\n <Picture\n className=\"h-full\"\n imgClassName=\"h-full object-cover tablet:hover:scale-110 transition-all duration-300\"\n source={data?.imgUrl?.url}\n alt={data?.imgUrl?.alt || ''}\n />\n </a>\n ) : (\n <div className=\"block size-full cursor-pointer overflow-hidden\">\n <Picture\n className=\"h-full\"\n imgClassName=\"h-full object-cover tablet:hover:scale-110 transition-all duration-300\"\n source={data?.imgUrl?.url}\n alt={data?.imgUrl?.alt || ''}\n />\n </div>\n )}\n <div className=\"laptop:p-6 absolute bottom-0 z-[1] box-border flex w-full flex-col p-4\">\n <div className={cn('flex items-end overflow-hidden', 'graphic-bottom')}>\n <div className=\"flex-1 overflow-hidden\">\n <Text\n html={data?.title}\n style={{ color: data?.textColor }}\n // eslint-disable-next-line tailwindcss/classnames-order\n className=\"graphic-title line-clamp-3 lg-desktop:text-lg desktop:text-base text-sm font-bold leading-[1.2]\"\n />\n {data?.description && (\n <Heading\n html={data?.description}\n style={{\n color: data?.textColor,\n }}\n as=\"h3\"\n className=\"graphic-description lg-desktop:text-[32px] desktop:mt-2 desktop:text-[24px] text-lines-2 mt-1 line-clamp-3 flex-1 text-[24px] font-bold leading-[1.2]\"\n />\n )}\n </div>\n {!data?.isShowIcon && (data?.video?.url || data?.youtubeId) && (\n <button\n aria-label=\"Play Video\"\n onClick={(e: any) => {\n e.preventDefault()\n e.stopPropagation()\n configuration?.onVideoPlayBtnClick?.(configuration?.index || 0, data)\n }}\n className=\"laptop:size-12 flex size-8 items-center justify-center rounded-full bg-white bg-opacity-20 hover:bg-black/75\"\n >\n <svg width=\"12\" height=\"14\" viewBox=\"0 0 12 14\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M12 7L0 14L0 0L12 7Z\" fill=\"white\" />\n </svg>\n </button>\n )}\n {data?.isShowIcon && data?.icon?.url && (\n <button\n onClick={(e: any) => {\n e.preventDefault()\n e.stopPropagation()\n configuration?.onIconClick?.(data, configuration)\n }}\n className=\"laptop:size-9 flex size-8 items-center justify-center rounded-full bg-white bg-opacity-20 hover:bg-black/75 overflow-hidden\"\n >\n <Picture\n className=\"h-full\"\n imgClassName=\"h-full object-cover\"\n source={data?.icon?.url}\n alt={data?.icon?.alt || ''}\n />\n </button>\n )}\n </div>\n {data.buttonText && (\n <Button\n as=\"a\"\n aria-label={data?.title ?? data?.description}\n variant=\"secondary\"\n className=\"mt-[8px] self-start\"\n href={trackUrlRef(data?.href, `${componentType}_${componentName}`)}\n data-headless-nav-postion={`''#${configuration?.index + 1}`}\n data-headless-type-name={`${componentType}#${componentName}`}\n data-headless-title-desc-button={`${data?.title}#${data?.description}#${data?.buttonText}`}\n >\n {data.buttonText}\n </Button>\n )}\n </div>\n </div>\n </div>\n </div>\n )\n}\n\nconst Graphic = React.forwardRef<HTMLDivElement, GraphicProps>(({ data, className }, ref) => {\n const isMobile = useMediaQuery({ query: '(max-width: 768px)' })\n const innerRef = useRef<HTMLDivElement>(null)\n const [visible, setVisible] = useState<boolean>(false)\n const [videoUrl, setVideoUrl] = useState<string>('')\n const [youTubeId, setYouTubeId] = useState<string>('')\n const [mobileVideoUrl, setMobileVideoUrl] = useState<string>('')\n const [currentItem, setCurrentItem] = useState<GraphicType | null>(null)\n const [textVisible, setTextVisible] = useState<boolean>(false)\n\n const handleSwiperShow = (width?: number) => {\n const isShow = (data?.items as GraphicType[])?.length > 3\n const isMobile = (data?.items as GraphicType[])?.length > 2\n switch (width) {\n case 1440:\n return isShow ? 4 : data?.items?.length\n case 1024:\n return isShow ? 3 : data?.items?.length\n case 768:\n return isShow ? 2.3 : isMobile ? 2.3 : 2\n default:\n return 1.2\n }\n }\n\n useImperativeHandle(ref, () => innerRef.current as HTMLDivElement)\n\n useExposure(innerRef, {\n componentType,\n componentName,\n componentTitle: data?.title,\n })\n\n useEffect(() => {\n const descriptions = innerRef.current?.querySelectorAll<HTMLDivElement>('.graphic-description')\n if (descriptions && descriptions.length > 0) {\n let maxHeight = 0\n descriptions.forEach((el: HTMLDivElement) => {\n maxHeight = Math.max(maxHeight, el.offsetHeight)\n })\n descriptions.forEach((el: HTMLDivElement) => {\n el.style.height = `${maxHeight}px`\n })\n }\n }, [])\n\n return (\n <div className={cn('graphicBlock', className)} ref={innerRef}>\n <div className=\"graphic-box\">\n {data?.title && <Title data={{ title: data?.title }} />}\n <SwiperBox\n id=\"Graphic\"\n className={cn('!overflow-visible')}\n data={{\n list: data?.items || [],\n configuration: {\n itemShape: data.itemShape,\n num: data?.items?.length || 0,\n onVideoPlayBtnClick: (_: number, data: GraphicType) => {\n setVisible(true)\n if (data?.isYouTube) {\n setYouTubeId?.(data?.youtubeId || '')\n } else {\n setVideoUrl?.(data?.video?.url || '')\n setMobileVideoUrl?.(data?.mobileVideo?.url || '')\n }\n },\n onIconClick: (data: GraphicType) => {\n setTextVisible(true)\n setCurrentItem(data)\n },\n title: data?.title,\n },\n }}\n Slide={Item}\n breakpoints={{\n 0: {\n spaceBetween: 12,\n freeMode: false,\n slidesPerView: 1,\n },\n 374: {\n spaceBetween: 12,\n freeMode: false,\n slidesPerView: handleSwiperShow(),\n },\n 768: {\n spaceBetween: 16,\n freeMode: false,\n slidesPerView: handleSwiperShow(768),\n },\n 1024: {\n spaceBetween: 16,\n freeMode: false,\n slidesPerView: handleSwiperShow(1024),\n },\n 1440: {\n spaceBetween: 16,\n freeMode: false,\n slidesPerView: handleSwiperShow(1440),\n },\n }}\n />\n </div>\n <VideoModal\n visible={visible}\n youTubeId={youTubeId}\n onCloseModal={() => setVisible(false)}\n videoUrl={isMobile ? mobileVideoUrl || videoUrl : videoUrl}\n />\n <TextModal\n textVisible={textVisible}\n extension={currentItem?.extension}\n onCloseModal={() => {\n setTextVisible(false)\n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EACX,aAAc,IAAMH,EAAW,EAAK,EACpC,SAAUH,GAAWQ,GAAkBJ,EACzC,KACA,OAAC,aACC,YAAaQ,EACb,UAAWF,GAAa,UACxB,aAAc,IAAM,CAClBG,EAAe,EAAK,EACpBF,EAAe,IAAI,CACrB,EACF,GACF,CAEJ,CAAC,EAEDd,EAAQ,YAAc,UAEtB,IAAOtB,KAAQ,cAAWsB,CAAO",
|
|
6
6
|
"names": ["Graphic_exports", "__export", "Graphic_default", "__toCommonJS", "import_jsx_runtime", "import_react_responsive", "import_react", "import_utils", "import_Styles", "import_SwiperBox", "import_components", "import_Title", "import_VideoModal", "import_TextModal", "import_useExposure", "import_trackUrlRef", "componentType", "componentName", "Item", "data", "configuration", "ref", "handleAspect", "e", "Graphic", "React", "className", "isMobile", "innerRef", "visible", "setVisible", "videoUrl", "setVideoUrl", "youTubeId", "setYouTubeId", "mobileVideoUrl", "setMobileVideoUrl", "currentItem", "setCurrentItem", "textVisible", "setTextVisible", "handleSwiperShow", "width", "isShow", "descriptions", "maxHeight", "el", "Title", "SwiperBox", "_"]
|
|
7
7
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";var A=Object.create;var N=Object.defineProperty;var O=Object.getOwnPropertyDescriptor;var Z=Object.getOwnPropertyNames;var F=Object.getPrototypeOf,J=Object.prototype.hasOwnProperty;var K=(s,l)=>{for(var o in l)N(s,o,{get:l[o],enumerable:!0})},U=(s,l,o,p)=>{if(l&&typeof l=="object"||typeof l=="function")for(let n of Z(l))!J.call(s,n)&&n!==o&&N(s,n,{get:()=>l[n],enumerable:!(p=O(l,n))||p.enumerable});return s};var T=(s,l,o)=>(o=s!=null?A(F(s)):{},U(l||!s||!s.__esModule?N(o,"default",{value:s,enumerable:!0}):o,s)),W=s=>U(N({},"__esModule",{value:!0}),s);var ee={};K(ee,{default:()=>X});module.exports=W(ee);var e=require("react/jsx-runtime"),c=T(require("react")),H=require("react-responsive"),j=require("../../shared/Styles.js"),C=T(require("../../components/picture.js")),_=T(require("../../components/button.js")),z=require("../../components/heading.js"),D=require("../VideoModal/index.js"),$=require("../../components/gird.js"),Q=T(require("../Title/index.js")),u=require("../../helpers/utils.js"),P=T(require("../SwiperBox/index.js")),S=require("../../shared/mimeType.js"),k=require("../../components/tabs.js"),Y=require("../../hooks/useExposure.js"),V=require("../../shared/trackUrlRef.js"),q=require("../../shared/track.js");const w="image",b="p1_banner",M=({data:s,configuration:l,jIndex:o,spanType:p,title:n})=>{const[y,f]=(0,c.useState)(!1),B=(0,H.useMediaQuery)({query:"(max-width: 768px)"}),x=(0,c.useRef)(null),L=()=>{if(p)switch(p){case"full":return"tablet:aspect-w-[704] tablet:aspect-h-[400] laptop:aspect-w-[896] laptop:aspect-h-[384] desktop:aspect-w-[1312] desktop:aspect-h-[512] lg-desktop:aspect-w-[1664] lg-desktop:aspect-h-[640]";case"half":return"tablet:aspect-w-[704] tablet:aspect-h-[480] laptop:aspect-w-[440] laptop:aspect-h-[384] desktop:aspect-w-[648] desktop:aspect-h-[512] lg-desktop:aspect-w-[824] lg-desktop:aspect-h-[640]";case"one-third":return"tablet:aspect-w-[296] tablet:aspect-h-[400] laptop:aspect-w-[288] laptop:aspect-h-[384] desktop:aspect-w-[427] desktop:aspect-h-[512] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[640]";default:return"tablet:aspect-w-[296] tablet:aspect-h-[400] laptop:aspect-w-[288] laptop:aspect-h-[384] desktop:aspect-w-[427] desktop:aspect-h-[512] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[640]"}else switch(l?.num){case 1:return"tablet:aspect-w-[704] tablet:aspect-h-[400] laptop:aspect-w-[896] laptop:aspect-h-[384] desktop:aspect-w-[1312] desktop:aspect-h-[512] lg-desktop:aspect-w-[1664] lg-desktop:aspect-h-[640]";case 2:return"tablet:aspect-w-[704] tablet:aspect-h-[480] laptop:aspect-w-[440] laptop:aspect-h-[384] desktop:aspect-w-[648] desktop:aspect-h-[512] lg-desktop:aspect-w-[824] lg-desktop:aspect-h-[640]";case 3:return"tablet:aspect-w-[296] tablet:aspect-h-[400] laptop:aspect-w-[288] laptop:aspect-h-[384] desktop:aspect-w-[427] desktop:aspect-h-[512] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[640]";default:return"tablet:aspect-w-[296] tablet:aspect-h-[400] laptop:aspect-w-[288] laptop:aspect-h-[384] desktop:aspect-w-[427] desktop:aspect-h-[512] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[640]"}};(0,Y.useExposure)(x,{componentType:w,componentName:b,position:o,componentTitle:s.title,componentDescription:s.description,navigation:l?.activeTab}),(0,c.useEffect)(()=>{f(B)},[B]);const{theme:I="light",title:m,description:h,imageUrl:r,primaryButton:d,secondaryButton:i,imageMobileUrl:g,blockLink:v,video:t,youtubeId:a,isYouTube:G}=s,R="lg-desktop:px-7 lg-desktop:pb-[14px] lg-desktop:pt-[15px] lg-desktop:text-[16px]";return(0,e.jsxs)("div",{className:(0,u.cn)("item-wrapper cursor-pointer","text-info-primary group relative box-border w-full overflow-hidden",L(),{"rounded-2xl":l?.shape==="rounded","aiui-dark":I==="dark","h-[400px]":y},"text-info-primary"),ref:x,children:[(v||i.link)&&(0,e.jsx)("a",{className:"absolute inset-0 z-10",href:(0,V.trackUrlRef)(v||i.link,`${w}_${b}`),"data-headless-type-name":`${w}#${b}`,"data-headless-title-desc-button":`${m}#${h}`,"data-headless-nav-postion":`${l?.activeTab}#${o}`,"aria-hidden":"true",tabIndex:-1}),(0,e.jsxs)("div",{className:"absolute inset-0",children:[(0,S.isVideo)(r?.mimeType)?(0,e.jsx)("video",{autoPlay:!0,muted:!0,playsInline:!0,loop:!0,className:"tablet:block hidden overflow-hidden w-full h-full object-cover",children:(0,e.jsx)("source",{src:r?.url,type:"video/mp4"})}):(0,e.jsx)(C.default,{source:r?.url,alt:r?.alt||"",className:"tablet:block hidden h-full overflow-hidden",imgClassName:"h-full transition-all duration-300 group-hover:scale-105 object-cover",style:{aspectRatio:`${r?.width}/${r?.height}`}}),(0,S.isVideo)(g?.mimeType)?(0,e.jsx)("video",{autoPlay:!0,muted:!0,playsInline:!0,loop:!0,className:"tablet:hidden block overflow-hidden w-full h-full object-cover",children:(0,e.jsx)("source",{src:g?.url,type:"video/mp4"})}):(0,e.jsx)(C.default,{source:g?.url||r?.url,alt:g?.alt||r?.alt||"",className:"tablet:hidden block h-full overflow-hidden",imgClassName:"h-full transition-all duration-300 object-cover"}),(0,e.jsxs)("div",{className:(0,u.cn)("absolutestyle laptop:p-6 desktop:p-[32px] laptop:gap-4 desktop:gap-6 absolute inset-x-0 bottom-0 z-20 flex w-fit flex-col gap-6 p-4",{"fullstyle laptop:top-1/2 laptop:-translate-y-1/2 laptop:bottom-auto":s?.width==="full"}),children:[(0,e.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,e.jsx)(z.Heading,{size:3,as:"h3",className:"item-title",html:m}),(0,e.jsx)(z.Heading,{as:"h4",className:"item-description desktop:text-[16px] lg-desktop:text-[18px] line-clamp-1 text-[14px]",html:h})]}),(0,e.jsxs)("div",{className:"lg-desktop:gap-3 flex gap-2",children:[i&&i.text&&(0,e.jsxs)(_.default,{"aria-label":m??h,className:(0,u.cn)(R,"link-left"),variant:"secondary",as:"a",href:(0,V.trackUrlRef)(i.link,`${w}_${b}`),"data-headless-type-name":`${w}#${b}`,"data-headless-title-desc-button":`${m}#${h}#${i.text}`,"data-headless-nav-postion":`${l?.activeTab}#${o}`,children:[i.text,(0,e.jsx)("span",{className:"sr-only",children:m??h})]}),d&&d.text&&(0,e.jsx)(_.default,{"aria-label":m??h,className:(0,u.cn)(R,"link-right"),variant:"primary",as:"a",href:(0,V.trackUrlRef)(d.link,`${w}_${b}`),"data-headless-type-name":`${w}#${b}`,"data-headless-title-desc-button":`${m}#${h}#${d.text}`,"data-headless-nav-postion":`${l?.activeTab}#${o}`,children:d.text})]})]})]}),(0,e.jsx)("div",{children:(0,e.jsx)("div",{className:"laptop:bottom-6 laptop:right-6 absolute bottom-4 right-4 z-20",children:(t?.url||a)&&(0,e.jsx)("button",{onClick:()=>{l?.onVideoPlayBtnClick?.(t?.url||a,G)},className:"laptop:size-12 flex size-8 items-center justify-center rounded-full bg-white bg-opacity-20 hover:bg-black/75",children:(0,e.jsx)("svg",{width:"12",height:"14",viewBox:"0 0 12 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,e.jsx)("path",{d:"M12 7L0 14L0 0L12 7Z",fill:"white"})})})})})]})},E=c.default.forwardRef((s,l)=>{const{shape:o,sectionTitle:p,groupByTab:n=!1,items:y=[],carousel:f}=s.data,[B,x]=(0,c.useState)(!1),[L,I]=(0,c.useState)(""),[m,h]=(0,c.useState)(""),r=t=>{switch(t){case"full":return 12;case"half":return 6;case"one-third":return 4}},d=y.map(t=>t.tabName).filter(Boolean).filter((t,a,G)=>G.indexOf(t)===a),i=(t,a)=>{x(!0),a?h?.(t||""):I?.(t||"")},g=(t,a)=>{switch(t){case 1:return 1;case 2:return 2;default:return a?2.3:3}},v=d.map(t=>({tabName:t,items:y.filter(a=>a.tabName===t)})).reduce((t,a)=>(t[a.tabName]=a.items,t),{});return(0,e.jsxs)("section",{"data-ui-component-id":"MultiLayoutGraphicBlock",ref:l,className:(0,u.cn)("multiLayoutGraphicBlock","text-info-primary",s.className),children:[p&&(0,e.jsx)(Q.default,{data:{title:p},className:"section-title"}),n?(0,e.jsxs)(k.Tabs,{shape:o,align:"left",defaultValue:(0,u.spaceToHyphen)(d[0]),children:[(0,e.jsx)(k.TabsList,{children:d.map((t,a)=>(0,e.jsx)(k.TabsTrigger,{value:(0,u.spaceToHyphen)(t),onClick:()=>{(0,q.gaTrack)({event:"ga4Event",event_name:"component_click",event_parameters:{page_group:"Home Page",component_type:w,component_name:b,component_title:p,component_position:1,navigation:t,button_name:t}})},children:t},a))}),d.map((t,a)=>(0,e.jsx)(k.TabsContent,{value:(0,u.spaceToHyphen)(t),className:"desktop:mt-[36px] mt-[24px] w-full",children:(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)(P.default,{className:"!overflow-visible",id:"MultiLayoutGraphicBlock1",data:{list:v?.[t]||[],configuration:{shape:o,isTab:n,activeTab:t,title:p,num:v?.[t]?.length||0,onVideoPlayBtnClick:i}},Slide:M,breakpoints:{0:{spaceBetween:12,freeMode:!1,slidesPerView:1},374:{spaceBetween:12,freeMode:!1,slidesPerView:1.2},768:{spaceBetween:16,freeMode:!1,slidesPerView:g(v?.[t]?.length||0,!0)},1024:{spaceBetween:16,freeMode:!1,slidesPerView:g(v?.[t]?.length||0)}}}),f&&f?.items.length>0?(0,e.jsx)(P.default,{className:"!overflow-visible",id:"MultiLayoutGraphicBlock2",data:{list:f?.items||[],configuration:{shape:o,isTab:n,onVideoPlayBtnClick:i,title:p}},Slide:M,breakpoints:{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.1},1440:{spaceBetween:16,freeMode:!1,slidesPerView:4}}}):null]})},a))]}):(0,e.jsxs)(e.Fragment,{children:[(0,e.jsxs)($.Grid,{className:"w-full",children:[y.map((t,a)=>(0,e.jsx)($.GridItem,{span:r(t.width??"full"),className:"laptop:block hidden",children:(0,e.jsx)(M,{data:t,configuration:{shape:o,onVideoPlayBtnClick:i,title:p},jIndex:a,spanType:t.width})},`${t?.title||""}${a}`)),y.map((t,a)=>(0,e.jsx)($.GridItem,{span:r("full"),className:"laptop:hidden block",children:(0,e.jsx)(M,{data:t,configuration:{shape:o,onVideoPlayBtnClick:i,title:p},jIndex:a,spanType:"full"})},`${t?.title||""}${a}`))]}),f&&f?.items.length>0?(0,e.jsx)(P.default,{className:"!overflow-visible",id:"MultiLayoutGraphicBlock3",data:{list:f?.items||[],configuration:{shape:o,onVideoPlayBtnClick:i,title:p}},Slide:M,breakpoints:{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.1},1440:{spaceBetween:16,freeMode:!1,slidesPerView:4}}}):null]}),B&&(0,e.jsx)(D.VideoModal,{visible:B,youTubeId:m,videoUrl:L,onCloseModal:()=>x(!1)})]})});E.displayName="MultiLayoutGraphicBlock";var X=(0,j.withLayout)(E);
|
|
1
|
+
"use strict";var A=Object.create;var N=Object.defineProperty;var O=Object.getOwnPropertyDescriptor;var Z=Object.getOwnPropertyNames;var F=Object.getPrototypeOf,J=Object.prototype.hasOwnProperty;var K=(s,l)=>{for(var o in l)N(s,o,{get:l[o],enumerable:!0})},U=(s,l,o,p)=>{if(l&&typeof l=="object"||typeof l=="function")for(let n of Z(l))!J.call(s,n)&&n!==o&&N(s,n,{get:()=>l[n],enumerable:!(p=O(l,n))||p.enumerable});return s};var T=(s,l,o)=>(o=s!=null?A(F(s)):{},U(l||!s||!s.__esModule?N(o,"default",{value:s,enumerable:!0}):o,s)),W=s=>U(N({},"__esModule",{value:!0}),s);var ee={};K(ee,{default:()=>X});module.exports=W(ee);var e=require("react/jsx-runtime"),c=T(require("react")),H=require("react-responsive"),j=require("../../shared/Styles.js"),C=T(require("../../components/picture.js")),_=T(require("../../components/button.js")),z=require("../../components/heading.js"),D=require("../VideoModal/index.js"),$=require("../../components/gird.js"),Q=T(require("../Title/index.js")),u=require("../../helpers/utils.js"),P=T(require("../SwiperBox/index.js")),S=require("../../shared/mimeType.js"),k=require("../../components/tabs.js"),Y=require("../../hooks/useExposure.js"),V=require("../../shared/trackUrlRef.js"),q=require("../../shared/track.js");const w="image",b="p1_banner",M=({data:s,configuration:l,jIndex:o,spanType:p,title:n})=>{const[y,f]=(0,c.useState)(!1),B=(0,H.useMediaQuery)({query:"(max-width: 768px)"}),x=(0,c.useRef)(null),L=()=>{if(p)switch(p){case"full":return"tablet:aspect-w-[704] tablet:aspect-h-[400] laptop:aspect-w-[896] laptop:aspect-h-[384] desktop:aspect-w-[1312] desktop:aspect-h-[512] lg-desktop:aspect-w-[1664] lg-desktop:aspect-h-[640]";case"half":return"tablet:aspect-w-[704] tablet:aspect-h-[480] laptop:aspect-w-[440] laptop:aspect-h-[384] desktop:aspect-w-[648] desktop:aspect-h-[512] lg-desktop:aspect-w-[824] lg-desktop:aspect-h-[640]";case"one-third":return"tablet:aspect-w-[296] tablet:aspect-h-[400] laptop:aspect-w-[288] laptop:aspect-h-[384] desktop:aspect-w-[427] desktop:aspect-h-[512] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[640]";default:return"tablet:aspect-w-[296] tablet:aspect-h-[400] laptop:aspect-w-[288] laptop:aspect-h-[384] desktop:aspect-w-[427] desktop:aspect-h-[512] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[640]"}else switch(l?.num){case 1:return"tablet:aspect-w-[704] tablet:aspect-h-[400] laptop:aspect-w-[896] laptop:aspect-h-[384] desktop:aspect-w-[1312] desktop:aspect-h-[512] lg-desktop:aspect-w-[1664] lg-desktop:aspect-h-[640]";case 2:return"tablet:aspect-w-[704] tablet:aspect-h-[480] laptop:aspect-w-[440] laptop:aspect-h-[384] desktop:aspect-w-[648] desktop:aspect-h-[512] lg-desktop:aspect-w-[824] lg-desktop:aspect-h-[640]";case 3:return"tablet:aspect-w-[296] tablet:aspect-h-[400] laptop:aspect-w-[288] laptop:aspect-h-[384] desktop:aspect-w-[427] desktop:aspect-h-[512] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[640]";default:return"tablet:aspect-w-[296] tablet:aspect-h-[400] laptop:aspect-w-[288] laptop:aspect-h-[384] desktop:aspect-w-[427] desktop:aspect-h-[512] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[640]"}};(0,Y.useExposure)(x,{componentType:w,componentName:b,position:o,componentTitle:s.title,componentDescription:s.description,navigation:l?.activeTab}),(0,c.useEffect)(()=>{f(B)},[B]);const{theme:I="light",title:m,description:h,imageUrl:r,primaryButton:d,secondaryButton:i,imageMobileUrl:g,blockLink:v,video:t,youtubeId:a,isYouTube:G}=s,R="lg-desktop:px-7 lg-desktop:pb-[14px] lg-desktop:pt-[15px] lg-desktop:text-[16px]";return(0,e.jsxs)("div",{className:(0,u.cn)("item-wrapper cursor-pointer","text-info-primary group relative box-border w-full overflow-hidden",L(),{"rounded-2xl":l?.shape==="rounded","aiui-dark":I==="dark","h-[400px]":y},"text-info-primary"),ref:x,children:[(v||i.link)&&(0,e.jsx)("a",{className:"absolute inset-0 z-10",href:(0,V.trackUrlRef)(v||i.link,`${w}_${b}`),"data-headless-type-name":`${w}#${b}`,"data-headless-title-desc-button":`${m}#${h}`,"data-headless-nav-postion":`${l?.activeTab}#${o}`,"aria-hidden":"true",tabIndex:-1}),(0,e.jsxs)("div",{className:"absolute inset-0",children:[(0,S.isVideo)(r?.mimeType)?(0,e.jsx)("video",{autoPlay:!0,muted:!0,playsInline:!0,loop:!0,className:"tablet:block hidden overflow-hidden w-full h-full object-cover",children:(0,e.jsx)("source",{src:r?.url,type:"video/mp4"})}):(0,e.jsx)(C.default,{source:r?.url,alt:r?.alt||"",className:"tablet:block hidden h-full overflow-hidden",imgClassName:"h-full transition-all duration-300 group-hover:scale-105 object-cover",style:{aspectRatio:`${r?.width}/${r?.height}`}}),(0,S.isVideo)(g?.mimeType)?(0,e.jsx)("video",{autoPlay:!0,muted:!0,playsInline:!0,loop:!0,className:"tablet:hidden block overflow-hidden w-full h-full object-cover",children:(0,e.jsx)("source",{src:g?.url,type:"video/mp4"})}):(0,e.jsx)(C.default,{source:g?.url||r?.url,alt:g?.alt||r?.alt||"",className:"tablet:hidden block h-full overflow-hidden",imgClassName:"h-full transition-all duration-300 object-cover"}),(0,e.jsxs)("div",{className:(0,u.cn)("laptop:p-6 desktop:p-[32px] laptop:gap-4 desktop:gap-6 absolute inset-x-0 bottom-0 z-20 flex w-fit flex-col gap-6 p-4",{"laptop:top-1/2 laptop:-translate-y-1/2 laptop:bottom-auto":s?.width==="full"}),children:[(0,e.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,e.jsx)(z.Heading,{size:3,as:"h3",className:"item-title",html:m}),(0,e.jsx)(z.Heading,{as:"h4",className:"item-description desktop:text-[16px] lg-desktop:text-[18px] line-clamp-1 text-[14px]",html:h})]}),(0,e.jsxs)("div",{className:"lg-desktop:gap-3 flex gap-2",children:[i&&i.text&&(0,e.jsxs)(_.default,{"aria-label":m??h,className:(0,u.cn)(R,"link-left"),variant:"secondary",as:"a",href:(0,V.trackUrlRef)(i.link,`${w}_${b}`),"data-headless-type-name":`${w}#${b}`,"data-headless-title-desc-button":`${m}#${h}#${i.text}`,"data-headless-nav-postion":`${l?.activeTab}#${o}`,children:[i.text,(0,e.jsx)("span",{className:"sr-only",children:m??h})]}),d&&d.text&&(0,e.jsx)(_.default,{"aria-label":m??h,className:(0,u.cn)(R,"link-right"),variant:"primary",as:"a",href:(0,V.trackUrlRef)(d.link,`${w}_${b}`),"data-headless-type-name":`${w}#${b}`,"data-headless-title-desc-button":`${m}#${h}#${d.text}`,"data-headless-nav-postion":`${l?.activeTab}#${o}`,children:d.text})]})]})]}),(0,e.jsx)("div",{children:(0,e.jsx)("div",{className:"laptop:bottom-6 laptop:right-6 absolute bottom-4 right-4 z-20",children:(t?.url||a)&&(0,e.jsx)("button",{onClick:()=>{l?.onVideoPlayBtnClick?.(t?.url||a,G)},className:"laptop:size-12 flex size-8 items-center justify-center rounded-full bg-white bg-opacity-20 hover:bg-black/75",children:(0,e.jsx)("svg",{width:"12",height:"14",viewBox:"0 0 12 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,e.jsx)("path",{d:"M12 7L0 14L0 0L12 7Z",fill:"white"})})})})})]})},E=c.default.forwardRef((s,l)=>{const{shape:o,sectionTitle:p,groupByTab:n=!1,items:y=[],carousel:f}=s.data,[B,x]=(0,c.useState)(!1),[L,I]=(0,c.useState)(""),[m,h]=(0,c.useState)(""),r=t=>{switch(t){case"full":return 12;case"half":return 6;case"one-third":return 4}},d=y.map(t=>t.tabName).filter(Boolean).filter((t,a,G)=>G.indexOf(t)===a),i=(t,a)=>{x(!0),a?h?.(t||""):I?.(t||"")},g=(t,a)=>{switch(t){case 1:return 1;case 2:return 2;default:return a?2.3:3}},v=d.map(t=>({tabName:t,items:y.filter(a=>a.tabName===t)})).reduce((t,a)=>(t[a.tabName]=a.items,t),{});return(0,e.jsxs)("section",{"data-ui-component-id":"MultiLayoutGraphicBlock",ref:l,className:(0,u.cn)("multiLayoutGraphicBlock","text-info-primary",s.className),children:[p&&(0,e.jsx)(Q.default,{data:{title:p},className:"section-title"}),n?(0,e.jsxs)(k.Tabs,{shape:o,align:"left",defaultValue:(0,u.spaceToHyphen)(d[0]),children:[(0,e.jsx)(k.TabsList,{children:d.map((t,a)=>(0,e.jsx)(k.TabsTrigger,{value:(0,u.spaceToHyphen)(t),onClick:()=>{(0,q.gaTrack)({event:"ga4Event",event_name:"component_click",event_parameters:{page_group:"Home Page",component_type:w,component_name:b,component_title:p,component_position:1,navigation:t,button_name:t}})},children:t},a))}),d.map((t,a)=>(0,e.jsx)(k.TabsContent,{value:(0,u.spaceToHyphen)(t),className:"desktop:mt-[36px] mt-[24px] w-full",children:(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)(P.default,{className:"!overflow-visible",id:"MultiLayoutGraphicBlock1",data:{list:v?.[t]||[],configuration:{shape:o,isTab:n,activeTab:t,title:p,num:v?.[t]?.length||0,onVideoPlayBtnClick:i}},Slide:M,breakpoints:{0:{spaceBetween:12,freeMode:!1,slidesPerView:1},374:{spaceBetween:12,freeMode:!1,slidesPerView:1.2},768:{spaceBetween:16,freeMode:!1,slidesPerView:g(v?.[t]?.length||0,!0)},1024:{spaceBetween:16,freeMode:!1,slidesPerView:g(v?.[t]?.length||0)}}}),f&&f?.items.length>0?(0,e.jsx)(P.default,{className:"!overflow-visible",id:"MultiLayoutGraphicBlock2",data:{list:f?.items||[],configuration:{shape:o,isTab:n,onVideoPlayBtnClick:i,title:p}},Slide:M,breakpoints:{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.1},1440:{spaceBetween:16,freeMode:!1,slidesPerView:4}}}):null]})},a))]}):(0,e.jsxs)(e.Fragment,{children:[(0,e.jsxs)($.Grid,{className:"w-full",children:[y.map((t,a)=>(0,e.jsx)($.GridItem,{span:r(t.width??"full"),className:"laptop:block hidden",children:(0,e.jsx)(M,{data:t,configuration:{shape:o,onVideoPlayBtnClick:i,title:p},jIndex:a,spanType:t.width})},`${t?.title||""}${a}`)),y.map((t,a)=>(0,e.jsx)($.GridItem,{span:r("full"),className:"laptop:hidden block",children:(0,e.jsx)(M,{data:t,configuration:{shape:o,onVideoPlayBtnClick:i,title:p},jIndex:a,spanType:"full"})},`${t?.title||""}${a}`))]}),f&&f?.items.length>0?(0,e.jsx)(P.default,{className:"!overflow-visible",id:"MultiLayoutGraphicBlock3",data:{list:f?.items||[],configuration:{shape:o,onVideoPlayBtnClick:i,title:p}},Slide:M,breakpoints:{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.1},1440:{spaceBetween:16,freeMode:!1,slidesPerView:4}}}):null]}),B&&(0,e.jsx)(D.VideoModal,{visible:B,youTubeId:m,videoUrl:L,onCloseModal:()=>x(!1)})]})});E.displayName="MultiLayoutGraphicBlock";var X=(0,j.withLayout)(E);
|
|
2
2
|
//# sourceMappingURL=MultiLayoutGraphicBlock.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/biz-components/MultiLayoutGraphicBlock/MultiLayoutGraphicBlock.tsx"],
|
|
4
|
-
"sourcesContent": ["import React, { useState, useEffect, useRef } from 'react'\nimport { useMediaQuery } from 'react-responsive'\nimport type { MultiLayoutGraphicBlockProps, Item } from './types'\nimport { withLayout } from '../../shared/Styles.js'\nimport Picture from '../../components/picture.js'\nimport Button from '../../components/button.js'\nimport { Heading } from '../../components/heading.js'\nimport { VideoModal } from '../VideoModal/index.js'\nimport { Grid, GridItem } from '../../components/gird.js'\nimport Title from '../Title/index.js'\nimport { cn, spaceToHyphen } from '../../helpers/utils.js'\nimport SwiperBox from '../SwiperBox/index.js'\nimport { isVideo } from '../../shared/mimeType.js'\nimport { Tabs, TabsList, TabsTrigger, TabsContent } from '../../components/tabs.js'\nimport { useExposure } from '../../hooks/useExposure.js'\nimport { trackUrlRef } from '../../shared/trackUrlRef.js'\nimport { gaTrack } from '../../shared/track.js'\n\nconst componentType = 'image'\nconst componentName = 'p1_banner'\n\nconst ItemBlock = ({\n data: item,\n configuration,\n jIndex,\n spanType,\n title: titleProp,\n}: {\n data: Item\n configuration?: any\n jIndex?: number\n spanType?: string\n title?: string\n}) => {\n const [isMobile, setIsMobile] = useState<boolean>(false)\n const mediaQuery = useMediaQuery({ query: '(max-width: 768px)' })\n\n const ref = useRef<HTMLDivElement>(null)\n\n const handleAspect = () => {\n if (spanType) {\n switch (spanType) {\n case 'full':\n return 'tablet:aspect-w-[704] tablet:aspect-h-[400] laptop:aspect-w-[896] laptop:aspect-h-[384] desktop:aspect-w-[1312] desktop:aspect-h-[512] lg-desktop:aspect-w-[1664] lg-desktop:aspect-h-[640]'\n case 'half':\n return 'tablet:aspect-w-[704] tablet:aspect-h-[480] laptop:aspect-w-[440] laptop:aspect-h-[384] desktop:aspect-w-[648] desktop:aspect-h-[512] lg-desktop:aspect-w-[824] lg-desktop:aspect-h-[640]'\n case 'one-third':\n return 'tablet:aspect-w-[296] tablet:aspect-h-[400] laptop:aspect-w-[288] laptop:aspect-h-[384] desktop:aspect-w-[427] desktop:aspect-h-[512] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[640]'\n default:\n return 'tablet:aspect-w-[296] tablet:aspect-h-[400] laptop:aspect-w-[288] laptop:aspect-h-[384] desktop:aspect-w-[427] desktop:aspect-h-[512] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[640]'\n }\n } else {\n switch (configuration?.num) {\n case 1:\n return 'tablet:aspect-w-[704] tablet:aspect-h-[400] laptop:aspect-w-[896] laptop:aspect-h-[384] desktop:aspect-w-[1312] desktop:aspect-h-[512] lg-desktop:aspect-w-[1664] lg-desktop:aspect-h-[640]'\n case 2:\n return 'tablet:aspect-w-[704] tablet:aspect-h-[480] laptop:aspect-w-[440] laptop:aspect-h-[384] desktop:aspect-w-[648] desktop:aspect-h-[512] lg-desktop:aspect-w-[824] lg-desktop:aspect-h-[640]'\n case 3:\n return 'tablet:aspect-w-[296] tablet:aspect-h-[400] laptop:aspect-w-[288] laptop:aspect-h-[384] desktop:aspect-w-[427] desktop:aspect-h-[512] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[640]'\n default:\n return 'tablet:aspect-w-[296] tablet:aspect-h-[400] laptop:aspect-w-[288] laptop:aspect-h-[384] desktop:aspect-w-[427] desktop:aspect-h-[512] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[640]'\n }\n }\n }\n\n useExposure(ref, {\n componentType: componentType,\n componentName: componentName,\n position: jIndex,\n componentTitle: item.title,\n componentDescription: item.description,\n navigation: configuration?.activeTab,\n })\n\n useEffect(() => {\n setIsMobile(mediaQuery)\n }, [mediaQuery])\n\n const {\n theme = 'light',\n title,\n description,\n imageUrl,\n primaryButton,\n secondaryButton,\n imageMobileUrl,\n blockLink,\n video,\n youtubeId,\n isYouTube,\n } = item\n const lgButtonSize = 'lg-desktop:px-7 lg-desktop:pb-[14px] lg-desktop:pt-[15px] lg-desktop:text-[16px]'\n\n return (\n <div\n className={cn(\n 'item-wrapper cursor-pointer',\n 'text-info-primary group relative box-border w-full overflow-hidden',\n handleAspect(),\n {\n 'rounded-2xl': configuration?.shape === 'rounded',\n 'aiui-dark': theme === 'dark',\n 'h-[400px]': isMobile,\n },\n `text-info-primary`\n )}\n ref={ref}\n >\n {(blockLink || secondaryButton.link) && (\n <a\n className=\"absolute inset-0 z-10\"\n href={trackUrlRef(blockLink || secondaryButton.link, `${componentType}_${componentName}`)}\n data-headless-type-name={`${componentType}#${componentName}`}\n data-headless-title-desc-button={`${title}#${description}`}\n data-headless-nav-postion={`${configuration?.activeTab}#${jIndex}`}\n aria-hidden=\"true\"\n tabIndex={-1}\n />\n )}\n <div className=\"absolute inset-0\">\n {isVideo(imageUrl?.mimeType) ? (\n <video autoPlay muted playsInline loop className=\"tablet:block hidden overflow-hidden w-full h-full object-cover\">\n <source src={imageUrl?.url} type=\"video/mp4\" />\n </video>\n ) : (\n <Picture\n source={imageUrl?.url}\n alt={imageUrl?.alt || ''}\n className=\"tablet:block hidden h-full overflow-hidden\"\n imgClassName=\"h-full transition-all duration-300 group-hover:scale-105 object-cover\"\n style={{ aspectRatio: `${imageUrl?.width}/${imageUrl?.height}` }}\n />\n )}\n {isVideo(imageMobileUrl?.mimeType) ? (\n <video autoPlay muted playsInline loop className=\"tablet:hidden block overflow-hidden w-full h-full object-cover\">\n <source src={imageMobileUrl?.url} type=\"video/mp4\" />\n </video>\n ) : (\n <Picture\n source={imageMobileUrl?.url || imageUrl?.url}\n alt={imageMobileUrl?.alt || imageUrl?.alt || ''}\n className=\"tablet:hidden block h-full overflow-hidden\"\n imgClassName=\"h-full transition-all duration-300 object-cover\"\n />\n )}\n <div\n className={cn(\n 'absolutestyle laptop:p-6 desktop:p-[32px] laptop:gap-4 desktop:gap-6 absolute inset-x-0 bottom-0 z-20 flex w-fit flex-col gap-6 p-4',\n {\n 'fullstyle laptop:top-1/2 laptop:-translate-y-1/2 laptop:bottom-auto': item?.width === 'full',\n }\n )}\n >\n <div className=\"flex flex-col gap-1\">\n <Heading size={3} as=\"h3\" className=\"item-title\" html={title} />\n <Heading\n as=\"h4\"\n className=\"item-description desktop:text-[16px] lg-desktop:text-[18px] line-clamp-1 text-[14px]\"\n html={description}\n />\n </div>\n <div className=\"lg-desktop:gap-3 flex gap-2\">\n {secondaryButton && secondaryButton.text && (\n <Button\n aria-label={title ?? description}\n className={cn(lgButtonSize, 'link-left')}\n variant=\"secondary\"\n as=\"a\"\n href={trackUrlRef(secondaryButton.link, `${componentType}_${componentName}`)}\n data-headless-type-name={`${componentType}#${componentName}`}\n data-headless-title-desc-button={`${title}#${description}#${secondaryButton.text}`}\n data-headless-nav-postion={`${configuration?.activeTab}#${jIndex}`}\n >\n {secondaryButton.text}\n <span className=\"sr-only\">{title ?? description}</span>\n </Button>\n )}\n {primaryButton && primaryButton.text && (\n <Button\n aria-label={title ?? description}\n className={cn(lgButtonSize, 'link-right')}\n variant=\"primary\"\n as=\"a\"\n href={trackUrlRef(primaryButton.link, `${componentType}_${componentName}`)}\n data-headless-type-name={`${componentType}#${componentName}`}\n data-headless-title-desc-button={`${title}#${description}#${primaryButton.text}`}\n data-headless-nav-postion={`${configuration?.activeTab}#${jIndex}`}\n >\n {primaryButton.text}\n </Button>\n )}\n </div>\n </div>\n </div>\n <div>\n <div className=\"laptop:bottom-6 laptop:right-6 absolute bottom-4 right-4 z-20\">\n {(video?.url || youtubeId) && (\n <button\n onClick={() => {\n configuration?.onVideoPlayBtnClick?.(video?.url || youtubeId, isYouTube)\n }}\n className=\"laptop:size-12 flex size-8 items-center justify-center rounded-full bg-white bg-opacity-20 hover:bg-black/75\"\n >\n <svg width=\"12\" height=\"14\" viewBox=\"0 0 12 14\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M12 7L0 14L0 0L12 7Z\" fill=\"white\" />\n </svg>\n </button>\n )}\n </div>\n </div>\n </div>\n )\n}\n\nconst MultiLayoutGraphicBlock = React.forwardRef<HTMLDivElement, MultiLayoutGraphicBlockProps>((props, ref) => {\n const { shape, sectionTitle, groupByTab = false, items = [], carousel } = props.data\n const [visible, setVisible] = useState<boolean>(false)\n const [videoUrl, setVideoUrl] = useState<string>('')\n const [youTubeId, setYouTubeId] = useState<string>('')\n\n const getSpan = (width: 'full' | 'half' | 'one-third') => {\n switch (width) {\n case 'full':\n return 12\n case 'half':\n return 6\n case 'one-third':\n return 4\n }\n }\n\n const tabNames = items\n .map(item => item.tabName)\n .filter(Boolean)\n .filter((item, index, arr) => arr.indexOf(item) === index) as string[]\n\n const handleVideoPlayBtnClick = (url: string, isYouTube: boolean) => {\n setVisible(true)\n if (isYouTube) {\n setYouTubeId?.(url || '')\n } else {\n setVideoUrl?.(url || '')\n }\n }\n const handleTabNumber = (num: Number, flag?: boolean) => {\n switch (num) {\n case 1:\n return 1\n case 2:\n return 2\n default:\n return flag ? 2.3 : 3\n }\n }\n\n const tabItemsMaps = tabNames\n .map(tabName => ({\n tabName,\n items: items.filter(item => item.tabName === tabName),\n }))\n .reduce(\n (acc, cur) => {\n acc[cur.tabName] = cur.items\n return acc\n },\n {} as Record<string, (Item & { width?: 'full' | 'half' | 'one-third' })[]>\n )\n\n return (\n <section\n data-ui-component-id=\"MultiLayoutGraphicBlock\"\n ref={ref}\n className={cn('multiLayoutGraphicBlock', 'text-info-primary', props.className)}\n >\n {sectionTitle && <Title data={{ title: sectionTitle }} className=\"section-title\" />}\n\n {groupByTab ? (\n <Tabs shape={shape} align=\"left\" defaultValue={spaceToHyphen(tabNames[0]!)}>\n <TabsList>\n {tabNames.map((tabName, index) => (\n <TabsTrigger\n key={index}\n value={spaceToHyphen(tabName!)}\n onClick={() => {\n gaTrack({\n event: 'ga4Event',\n event_name: 'component_click',\n event_parameters: {\n page_group: 'Home Page',\n component_type: componentType,\n component_name: componentName,\n component_title: sectionTitle,\n component_position: 1,\n navigation: tabName,\n button_name: tabName,\n },\n })\n }}\n >\n {tabName}\n </TabsTrigger>\n ))}\n </TabsList>\n {tabNames.map((tabName, index) => (\n <TabsContent key={index} value={spaceToHyphen(tabName!)} className=\"desktop:mt-[36px] mt-[24px] w-full\">\n <>\n <SwiperBox\n className=\"!overflow-visible\"\n id={'MultiLayoutGraphicBlock1'}\n data={{\n list: tabItemsMaps?.[tabName] || [],\n configuration: {\n shape: shape,\n isTab: groupByTab,\n activeTab: tabName,\n title: sectionTitle,\n num: tabItemsMaps?.[tabName]?.length || 0,\n onVideoPlayBtnClick: handleVideoPlayBtnClick,\n },\n }}\n Slide={ItemBlock}\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: handleTabNumber(tabItemsMaps?.[tabName]?.length || 0, true),\n },\n 1024: {\n spaceBetween: 16,\n freeMode: false,\n slidesPerView: handleTabNumber(tabItemsMaps?.[tabName]?.length || 0),\n },\n }}\n />\n {carousel && carousel?.items.length > 0 ? (\n <SwiperBox\n className=\"!overflow-visible\"\n id={'MultiLayoutGraphicBlock2'}\n data={{\n list: carousel?.items || [],\n configuration: {\n shape: shape,\n isTab: groupByTab,\n onVideoPlayBtnClick: handleVideoPlayBtnClick,\n title: sectionTitle,\n },\n }}\n Slide={ItemBlock}\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.1,\n },\n 1440: {\n spaceBetween: 16,\n freeMode: false,\n slidesPerView: 4,\n },\n }}\n />\n ) : null}\n </>\n </TabsContent>\n ))}\n </Tabs>\n ) : (\n <>\n <Grid className=\"w-full\">\n {items.map((item, index) => {\n return (\n <GridItem\n key={`${item?.title || ''}${index}`}\n span={getSpan(item.width ?? 'full')}\n className=\"laptop:block hidden\"\n >\n <ItemBlock\n data={item}\n configuration={{ shape: shape, onVideoPlayBtnClick: handleVideoPlayBtnClick, title: sectionTitle }}\n jIndex={index}\n spanType={item.width}\n />\n </GridItem>\n )\n })}\n {items.map((item, index) => (\n <GridItem key={`${item?.title || ''}${index}`} span={getSpan('full')} className=\"laptop:hidden block\">\n <ItemBlock\n data={item}\n configuration={{ shape: shape, onVideoPlayBtnClick: handleVideoPlayBtnClick, title: sectionTitle }}\n jIndex={index}\n spanType={'full'}\n />\n </GridItem>\n ))}\n </Grid>\n {carousel && carousel?.items.length > 0 ? (\n <SwiperBox\n className=\"!overflow-visible\"\n id={'MultiLayoutGraphicBlock3'}\n data={{\n list: carousel?.items || [],\n configuration: { shape: shape, onVideoPlayBtnClick: handleVideoPlayBtnClick, title: sectionTitle },\n }}\n Slide={ItemBlock}\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.1,\n },\n 1440: {\n spaceBetween: 16,\n freeMode: false,\n slidesPerView: 4,\n },\n }}\n />\n ) : null}\n </>\n )}\n {visible && (\n <VideoModal\n visible={visible}\n youTubeId={youTubeId}\n videoUrl={videoUrl}\n onCloseModal={() => setVisible(false)}\n />\n )}\n </section>\n )\n})\n\nMultiLayoutGraphicBlock.displayName = 'MultiLayoutGraphicBlock'\n\nexport default withLayout(MultiLayoutGraphicBlock)\nexport type { MultiLayoutGraphicBlockProps }\n"],
|
|
5
|
-
"mappings": "0jBAAA,IAAAA,GAAA,GAAAC,EAAAD,GAAA,aAAAE,IAAA,eAAAC,EAAAH,IA6GQ,IAAAI,EAAA,6BA7GRC,EAAmD,oBACnDC,EAA8B,4BAE9BC,EAA2B,kCAC3BC,EAAoB,0CACpBC,EAAmB,yCACnBC,EAAwB,uCACxBC,EAA2B,kCAC3BC,EAA+B,oCAC/BC,EA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AaF,EAAgB,KAAM,GAAGlB,CAAa,IAAIC,CAAa,EAAE,EACxF,0BAAyB,GAAGD,CAAa,IAAIC,CAAa,GAC1D,kCAAiC,GAAGa,CAAK,IAAIC,CAAW,GACxD,4BAA2B,GAAGX,GAAe,SAAS,IAAIC,CAAM,GAChE,cAAY,OACZ,SAAU,GACZ,KAEF,QAAC,OAAI,UAAU,mBACZ,wBAAQW,GAAU,QAAQ,KACzB,OAAC,SAAM,SAAQ,GAAC,MAAK,GAAC,YAAW,GAAC,KAAI,GAAC,UAAU,iEAC/C,mBAAC,UAAO,IAAKA,GAAU,IAAK,KAAK,YAAY,EAC/C,KAEA,OAAC,EAAAS,QAAA,CACC,OAAQT,GAAU,IAClB,IAAKA,GAAU,KAAO,GACtB,UAAU,6CACV,aAAa,wEACb,MAAO,CAAE,YAAa,GAAGA,GAAU,KAAK,IAAIA,GAAU,MAAM,EAAG,EACjE,KAED,WAAQG,GAAgB,QAAQ,KAC/B,OAAC,SAAM,SAAQ,GAAC,MAAK,GAAC,YAAW,GAAC,KAAI,GAAC,UAAU,iEAC/C,mBAAC,UAAO,IAAKA,GAAgB,IAAK,KAAK,YAAY,EACrD,KAEA,OAAC,EAAAM,QAAA,CACC,OAAQN,GAAgB,KAAOH,GAAU,IACzC,IAAKG,GAAgB,KAAOH,GAAU,KAAO,GAC7C,UAAU,6CACV,aAAa,kDACf,KAEF,QAAC,OACC,aAAW,MACT,
|
|
4
|
+
"sourcesContent": ["import React, { useState, useEffect, useRef } from 'react'\nimport { useMediaQuery } from 'react-responsive'\nimport type { MultiLayoutGraphicBlockProps, Item } from './types'\nimport { withLayout } from '../../shared/Styles.js'\nimport Picture from '../../components/picture.js'\nimport Button from '../../components/button.js'\nimport { Heading } from '../../components/heading.js'\nimport { VideoModal } from '../VideoModal/index.js'\nimport { Grid, GridItem } from '../../components/gird.js'\nimport Title from '../Title/index.js'\nimport { cn, spaceToHyphen } from '../../helpers/utils.js'\nimport SwiperBox from '../SwiperBox/index.js'\nimport { isVideo } from '../../shared/mimeType.js'\nimport { Tabs, TabsList, TabsTrigger, TabsContent } from '../../components/tabs.js'\nimport { useExposure } from '../../hooks/useExposure.js'\nimport { trackUrlRef } from '../../shared/trackUrlRef.js'\nimport { gaTrack } from '../../shared/track.js'\n\nconst componentType = 'image'\nconst componentName = 'p1_banner'\n\nconst ItemBlock = ({\n data: item,\n configuration,\n jIndex,\n spanType,\n title: titleProp,\n}: {\n data: Item\n configuration?: any\n jIndex?: number\n spanType?: string\n title?: string\n}) => {\n const [isMobile, setIsMobile] = useState<boolean>(false)\n const mediaQuery = useMediaQuery({ query: '(max-width: 768px)' })\n\n const ref = useRef<HTMLDivElement>(null)\n\n const handleAspect = () => {\n if (spanType) {\n switch (spanType) {\n case 'full':\n return 'tablet:aspect-w-[704] tablet:aspect-h-[400] laptop:aspect-w-[896] laptop:aspect-h-[384] desktop:aspect-w-[1312] desktop:aspect-h-[512] lg-desktop:aspect-w-[1664] lg-desktop:aspect-h-[640]'\n case 'half':\n return 'tablet:aspect-w-[704] tablet:aspect-h-[480] laptop:aspect-w-[440] laptop:aspect-h-[384] desktop:aspect-w-[648] desktop:aspect-h-[512] lg-desktop:aspect-w-[824] lg-desktop:aspect-h-[640]'\n case 'one-third':\n return 'tablet:aspect-w-[296] tablet:aspect-h-[400] laptop:aspect-w-[288] laptop:aspect-h-[384] desktop:aspect-w-[427] desktop:aspect-h-[512] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[640]'\n default:\n return 'tablet:aspect-w-[296] tablet:aspect-h-[400] laptop:aspect-w-[288] laptop:aspect-h-[384] desktop:aspect-w-[427] desktop:aspect-h-[512] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[640]'\n }\n } else {\n switch (configuration?.num) {\n case 1:\n return 'tablet:aspect-w-[704] tablet:aspect-h-[400] laptop:aspect-w-[896] laptop:aspect-h-[384] desktop:aspect-w-[1312] desktop:aspect-h-[512] lg-desktop:aspect-w-[1664] lg-desktop:aspect-h-[640]'\n case 2:\n return 'tablet:aspect-w-[704] tablet:aspect-h-[480] laptop:aspect-w-[440] laptop:aspect-h-[384] desktop:aspect-w-[648] desktop:aspect-h-[512] lg-desktop:aspect-w-[824] lg-desktop:aspect-h-[640]'\n case 3:\n return 'tablet:aspect-w-[296] tablet:aspect-h-[400] laptop:aspect-w-[288] laptop:aspect-h-[384] desktop:aspect-w-[427] desktop:aspect-h-[512] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[640]'\n default:\n return 'tablet:aspect-w-[296] tablet:aspect-h-[400] laptop:aspect-w-[288] laptop:aspect-h-[384] desktop:aspect-w-[427] desktop:aspect-h-[512] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[640]'\n }\n }\n }\n\n useExposure(ref, {\n componentType: componentType,\n componentName: componentName,\n position: jIndex,\n componentTitle: item.title,\n componentDescription: item.description,\n navigation: configuration?.activeTab,\n })\n\n useEffect(() => {\n setIsMobile(mediaQuery)\n }, [mediaQuery])\n\n const {\n theme = 'light',\n title,\n description,\n imageUrl,\n primaryButton,\n secondaryButton,\n imageMobileUrl,\n blockLink,\n video,\n youtubeId,\n isYouTube,\n } = item\n const lgButtonSize = 'lg-desktop:px-7 lg-desktop:pb-[14px] lg-desktop:pt-[15px] lg-desktop:text-[16px]'\n\n return (\n <div\n className={cn(\n 'item-wrapper cursor-pointer',\n 'text-info-primary group relative box-border w-full overflow-hidden',\n handleAspect(),\n {\n 'rounded-2xl': configuration?.shape === 'rounded',\n 'aiui-dark': theme === 'dark',\n 'h-[400px]': isMobile,\n },\n `text-info-primary`\n )}\n ref={ref}\n >\n {(blockLink || secondaryButton.link) && (\n <a\n className=\"absolute inset-0 z-10\"\n href={trackUrlRef(blockLink || secondaryButton.link, `${componentType}_${componentName}`)}\n data-headless-type-name={`${componentType}#${componentName}`}\n data-headless-title-desc-button={`${title}#${description}`}\n data-headless-nav-postion={`${configuration?.activeTab}#${jIndex}`}\n aria-hidden=\"true\"\n tabIndex={-1}\n />\n )}\n <div className=\"absolute inset-0\">\n {isVideo(imageUrl?.mimeType) ? (\n <video autoPlay muted playsInline loop className=\"tablet:block hidden overflow-hidden w-full h-full object-cover\">\n <source src={imageUrl?.url} type=\"video/mp4\" />\n </video>\n ) : (\n <Picture\n source={imageUrl?.url}\n alt={imageUrl?.alt || ''}\n className=\"tablet:block hidden h-full overflow-hidden\"\n imgClassName=\"h-full transition-all duration-300 group-hover:scale-105 object-cover\"\n style={{ aspectRatio: `${imageUrl?.width}/${imageUrl?.height}` }}\n />\n )}\n {isVideo(imageMobileUrl?.mimeType) ? (\n <video autoPlay muted playsInline loop className=\"tablet:hidden block overflow-hidden w-full h-full object-cover\">\n <source src={imageMobileUrl?.url} type=\"video/mp4\" />\n </video>\n ) : (\n <Picture\n source={imageMobileUrl?.url || imageUrl?.url}\n alt={imageMobileUrl?.alt || imageUrl?.alt || ''}\n className=\"tablet:hidden block h-full overflow-hidden\"\n imgClassName=\"h-full transition-all duration-300 object-cover\"\n />\n )}\n <div\n className={cn(\n 'laptop:p-6 desktop:p-[32px] laptop:gap-4 desktop:gap-6 absolute inset-x-0 bottom-0 z-20 flex w-fit flex-col gap-6 p-4',\n {\n 'laptop:top-1/2 laptop:-translate-y-1/2 laptop:bottom-auto': item?.width === 'full',\n }\n )}\n >\n <div className=\"flex flex-col gap-1\">\n <Heading size={3} as=\"h3\" className=\"item-title\" html={title} />\n <Heading\n as=\"h4\"\n className=\"item-description desktop:text-[16px] lg-desktop:text-[18px] line-clamp-1 text-[14px]\"\n html={description}\n />\n </div>\n <div className=\"lg-desktop:gap-3 flex gap-2\">\n {secondaryButton && secondaryButton.text && (\n <Button\n aria-label={title ?? description}\n className={cn(lgButtonSize, 'link-left')}\n variant=\"secondary\"\n as=\"a\"\n href={trackUrlRef(secondaryButton.link, `${componentType}_${componentName}`)}\n data-headless-type-name={`${componentType}#${componentName}`}\n data-headless-title-desc-button={`${title}#${description}#${secondaryButton.text}`}\n data-headless-nav-postion={`${configuration?.activeTab}#${jIndex}`}\n >\n {secondaryButton.text}\n <span className=\"sr-only\">{title ?? description}</span>\n </Button>\n )}\n {primaryButton && primaryButton.text && (\n <Button\n aria-label={title ?? description}\n className={cn(lgButtonSize, 'link-right')}\n variant=\"primary\"\n as=\"a\"\n href={trackUrlRef(primaryButton.link, `${componentType}_${componentName}`)}\n data-headless-type-name={`${componentType}#${componentName}`}\n data-headless-title-desc-button={`${title}#${description}#${primaryButton.text}`}\n data-headless-nav-postion={`${configuration?.activeTab}#${jIndex}`}\n >\n {primaryButton.text}\n </Button>\n )}\n </div>\n </div>\n </div>\n <div>\n <div className=\"laptop:bottom-6 laptop:right-6 absolute bottom-4 right-4 z-20\">\n {(video?.url || youtubeId) && (\n <button\n onClick={() => {\n configuration?.onVideoPlayBtnClick?.(video?.url || youtubeId, isYouTube)\n }}\n className=\"laptop:size-12 flex size-8 items-center justify-center rounded-full bg-white bg-opacity-20 hover:bg-black/75\"\n >\n <svg width=\"12\" height=\"14\" viewBox=\"0 0 12 14\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M12 7L0 14L0 0L12 7Z\" fill=\"white\" />\n </svg>\n </button>\n )}\n </div>\n </div>\n </div>\n )\n}\n\nconst MultiLayoutGraphicBlock = React.forwardRef<HTMLDivElement, MultiLayoutGraphicBlockProps>((props, ref) => {\n const { shape, sectionTitle, groupByTab = false, items = [], carousel } = props.data\n const [visible, setVisible] = useState<boolean>(false)\n const [videoUrl, setVideoUrl] = useState<string>('')\n const [youTubeId, setYouTubeId] = useState<string>('')\n\n const getSpan = (width: 'full' | 'half' | 'one-third') => {\n switch (width) {\n case 'full':\n return 12\n case 'half':\n return 6\n case 'one-third':\n return 4\n }\n }\n\n const tabNames = items\n .map(item => item.tabName)\n .filter(Boolean)\n .filter((item, index, arr) => arr.indexOf(item) === index) as string[]\n\n const handleVideoPlayBtnClick = (url: string, isYouTube: boolean) => {\n setVisible(true)\n if (isYouTube) {\n setYouTubeId?.(url || '')\n } else {\n setVideoUrl?.(url || '')\n }\n }\n const handleTabNumber = (num: Number, flag?: boolean) => {\n switch (num) {\n case 1:\n return 1\n case 2:\n return 2\n default:\n return flag ? 2.3 : 3\n }\n }\n\n const tabItemsMaps = tabNames\n .map(tabName => ({\n tabName,\n items: items.filter(item => item.tabName === tabName),\n }))\n .reduce(\n (acc, cur) => {\n acc[cur.tabName] = cur.items\n return acc\n },\n {} as Record<string, (Item & { width?: 'full' | 'half' | 'one-third' })[]>\n )\n\n return (\n <section\n data-ui-component-id=\"MultiLayoutGraphicBlock\"\n ref={ref}\n className={cn('multiLayoutGraphicBlock', 'text-info-primary', props.className)}\n >\n {sectionTitle && <Title data={{ title: sectionTitle }} className=\"section-title\" />}\n\n {groupByTab ? (\n <Tabs shape={shape} align=\"left\" defaultValue={spaceToHyphen(tabNames[0]!)}>\n <TabsList>\n {tabNames.map((tabName, index) => (\n <TabsTrigger\n key={index}\n value={spaceToHyphen(tabName!)}\n onClick={() => {\n gaTrack({\n event: 'ga4Event',\n event_name: 'component_click',\n event_parameters: {\n page_group: 'Home Page',\n component_type: componentType,\n component_name: componentName,\n component_title: sectionTitle,\n component_position: 1,\n navigation: tabName,\n button_name: tabName,\n },\n })\n }}\n >\n {tabName}\n </TabsTrigger>\n ))}\n </TabsList>\n {tabNames.map((tabName, index) => (\n <TabsContent key={index} value={spaceToHyphen(tabName!)} className=\"desktop:mt-[36px] mt-[24px] w-full\">\n <>\n <SwiperBox\n className=\"!overflow-visible\"\n id={'MultiLayoutGraphicBlock1'}\n data={{\n list: tabItemsMaps?.[tabName] || [],\n configuration: {\n shape: shape,\n isTab: groupByTab,\n activeTab: tabName,\n title: sectionTitle,\n num: tabItemsMaps?.[tabName]?.length || 0,\n onVideoPlayBtnClick: handleVideoPlayBtnClick,\n },\n }}\n Slide={ItemBlock}\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: handleTabNumber(tabItemsMaps?.[tabName]?.length || 0, true),\n },\n 1024: {\n spaceBetween: 16,\n freeMode: false,\n slidesPerView: handleTabNumber(tabItemsMaps?.[tabName]?.length || 0),\n },\n }}\n />\n {carousel && carousel?.items.length > 0 ? (\n <SwiperBox\n className=\"!overflow-visible\"\n id={'MultiLayoutGraphicBlock2'}\n data={{\n list: carousel?.items || [],\n configuration: {\n shape: shape,\n isTab: groupByTab,\n onVideoPlayBtnClick: handleVideoPlayBtnClick,\n title: sectionTitle,\n },\n }}\n Slide={ItemBlock}\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.1,\n },\n 1440: {\n spaceBetween: 16,\n freeMode: false,\n slidesPerView: 4,\n },\n }}\n />\n ) : null}\n </>\n </TabsContent>\n ))}\n </Tabs>\n ) : (\n <>\n <Grid className=\"w-full\">\n {items.map((item, index) => {\n return (\n <GridItem\n key={`${item?.title || ''}${index}`}\n span={getSpan(item.width ?? 'full')}\n className=\"laptop:block hidden\"\n >\n <ItemBlock\n data={item}\n configuration={{ shape: shape, onVideoPlayBtnClick: handleVideoPlayBtnClick, title: sectionTitle }}\n jIndex={index}\n spanType={item.width}\n />\n </GridItem>\n )\n })}\n {items.map((item, index) => (\n <GridItem key={`${item?.title || ''}${index}`} span={getSpan('full')} className=\"laptop:hidden block\">\n <ItemBlock\n data={item}\n configuration={{ shape: shape, onVideoPlayBtnClick: handleVideoPlayBtnClick, title: sectionTitle }}\n jIndex={index}\n spanType={'full'}\n />\n </GridItem>\n ))}\n </Grid>\n {carousel && carousel?.items.length > 0 ? (\n <SwiperBox\n className=\"!overflow-visible\"\n id={'MultiLayoutGraphicBlock3'}\n data={{\n list: carousel?.items || [],\n configuration: { shape: shape, onVideoPlayBtnClick: handleVideoPlayBtnClick, title: sectionTitle },\n }}\n Slide={ItemBlock}\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.1,\n },\n 1440: {\n spaceBetween: 16,\n freeMode: false,\n slidesPerView: 4,\n },\n }}\n />\n ) : null}\n </>\n )}\n {visible && (\n <VideoModal\n visible={visible}\n youTubeId={youTubeId}\n videoUrl={videoUrl}\n onCloseModal={() => setVisible(false)}\n />\n )}\n </section>\n )\n})\n\nMultiLayoutGraphicBlock.displayName = 'MultiLayoutGraphicBlock'\n\nexport default withLayout(MultiLayoutGraphicBlock)\nexport type { MultiLayoutGraphicBlockProps }\n"],
|
|
5
|
+
"mappings": "0jBAAA,IAAAA,GAAA,GAAAC,EAAAD,GAAA,aAAAE,IAAA,eAAAC,EAAAH,IA6GQ,IAAAI,EAAA,6BA7GRC,EAAmD,oBACnDC,EAA8B,4BAE9BC,EAA2B,kCAC3BC,EAAoB,0CACpBC,EAAmB,yCACnBC,EAAwB,uCACxBC,EAA2B,kCAC3BC,EAA+B,oCAC/BC,EAAkB,gCAClBC,EAAkC,kCAClCC,EAAsB,oCACtBC,EAAwB,oCACxBC,EAAyD,oCACzDC,EAA4B,sCAC5BC,EAA4B,uCAC5BC,EAAwB,iCAExB,MAAMC,EAAgB,QAChBC,EAAgB,YAEhBC,EAAY,CAAC,CACjB,KAAMC,EACN,cAAAC,EACA,OAAAC,EACA,SAAAC,EACA,MAAOC,CACT,IAMM,CACJ,KAAM,CAACC,EAAUC,CAAW,KAAI,YAAkB,EAAK,EACjDC,KAAa,iBAAc,CAAE,MAAO,oBAAqB,CAAC,EAE1DC,KA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AAGA,GAAM,OAAS,EAAE,GAAGyC,CAAK,EAUnC,CAEH,EACAX,EAAM,IAAI,CAAC9B,EAAMyC,OAChB,OAAC,YAA8C,KAAMH,EAAQ,MAAM,EAAG,UAAU,sBAC9E,mBAACvC,EAAA,CACC,KAAMC,EACN,cAAe,CAAE,MAAO2B,EAAO,oBAAqBgB,EAAyB,MAAOf,CAAa,EACjG,OAAQa,EACR,SAAU,OACZ,GANa,GAAGzC,GAAM,OAAS,EAAE,GAAGyC,CAAK,EAO3C,CACD,GACH,EACCV,GAAYA,GAAU,MAAM,OAAS,KACpC,OAAC,EAAAsB,QAAA,CACC,UAAU,oBACV,GAAI,2BACJ,KAAM,CACJ,KAAMtB,GAAU,OAAS,CAAC,EAC1B,cAAe,CAAE,MAAOJ,EAAO,oBAAqBgB,EAAyB,MAAOf,CAAa,CACnG,EACA,MAAO7B,EACP,YAAa,CACX,EAAG,CACD,aAAc,GACd,SAAU,GACV,cAAe,CACjB,EACA,IAAK,CACH,aAAc,GACd,SAAU,GACV,cAAe,GACjB,EACA,IAAK,CACH,aAAc,GACd,SAAU,GACV,cAAe,GACjB,EACA,KAAM,CACJ,aAAc,GACd,SAAU,GACV,cAAe,GACjB,EACA,KAAM,CACJ,aAAc,GACd,SAAU,GACV,cAAe,CACjB,CACF,EACF,EACE,MACN,EAEDiC,MACC,OAAC,cACC,QAASA,EACT,UAAWI,EACX,SAAUF,EACV,aAAc,IAAMD,EAAW,EAAK,EACtC,GAEJ,CAEJ,CAAC,EAEDT,EAAwB,YAAc,0BAEtC,IAAO9C,KAAQ,cAAW8C,CAAuB",
|
|
6
6
|
"names": ["MultiLayoutGraphicBlock_exports", "__export", "MultiLayoutGraphicBlock_default", "__toCommonJS", "import_jsx_runtime", "import_react", "import_react_responsive", "import_Styles", "import_picture", "import_button", "import_heading", "import_VideoModal", "import_gird", "import_Title", "import_utils", "import_SwiperBox", "import_mimeType", "import_tabs", "import_useExposure", "import_trackUrlRef", "import_track", "componentType", "componentName", "ItemBlock", "item", "configuration", "jIndex", "spanType", "titleProp", "isMobile", "setIsMobile", "mediaQuery", "ref", "handleAspect", "theme", "title", "description", "imageUrl", "primaryButton", "secondaryButton", "imageMobileUrl", "blockLink", "video", "youtubeId", "isYouTube", "lgButtonSize", "Picture", "Button", "MultiLayoutGraphicBlock", "React", "props", "shape", "sectionTitle", "groupByTab", "items", "carousel", "visible", "setVisible", "videoUrl", "setVideoUrl", "youTubeId", "setYouTubeId", "getSpan", "width", "tabNames", "index", "arr", "handleVideoPlayBtnClick", "url", "handleTabNumber", "num", "flag", "tabItemsMaps", "tabName", "acc", "cur", "Title", "SwiperBox"]
|
|
7
7
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";"use client";var
|
|
1
|
+
"use strict";"use client";var te=Object.create;var g=Object.defineProperty;var ne=Object.getOwnPropertyDescriptor;var se=Object.getOwnPropertyNames;var re=Object.getPrototypeOf,ie=Object.prototype.hasOwnProperty;var ae=(e,t)=>{for(var r in t)g(e,r,{get:t[r],enumerable:!0})},L=(e,t,r,f)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of se(t))!ie.call(e,i)&&i!==r&&g(e,i,{get:()=>t[i],enumerable:!(f=ne(t,i))||f.enumerable});return e};var v=(e,t,r)=>(r=e!=null?te(re(e)):{},L(t||!e||!e.__esModule?g(r,"default",{value:e,enumerable:!0}):r,e)),oe=e=>L(g({},"__esModule",{value:!0}),e);var ue={};ae(ue,{default:()=>pe});module.exports=oe(ue);var c=require("react/jsx-runtime"),n=v(require("react")),N=require("../../helpers/utils.js"),O=v(require("./tabSwitch.js")),A=v(require("../Title/index.js")),$=v(require("../SwiperBox/index.js")),q=require("../../shared/Styles.js"),D=require("../../shared/track.js"),z=require("react-responsive"),b=require("./shelfDisplayItem.js");const le="image",ce="product_shelf";function me(e){const t=(0,n.useRef)(null),[r,f]=(0,n.useState)(!1);return(0,n.useEffect)(()=>{if(r)return;const i=t.current;if(!i||typeof IntersectionObserver>"u")return;const p=new IntersectionObserver(([a])=>{a.isIntersecting&&(f(!0),p.disconnect())},e);return p.observe(i),()=>p.disconnect()},[r,e]),[t,r]}const fe=n.default.forwardRef(({key:e,data:t,event:r,buildData:f,breakpoints:i,className:p="",recommendedData:a,target:Q="_self",isDisplayGudgments:R=!1,isDisplayBackImage:W=!1},j)=>{const{productsTab:d=[],productsCard:F=[],title:M,isShowTab:_=!0,tabShape:G="square",isShowTag:J=!1,isShowOriginalPrice:K=!0,isShowRecommendedCard:U=!1,...X}=t,[P,V]=(0,n.useState)(""),[m,y]=(0,n.useState)([]),x=(0,n.useRef)(!1),S=(0,n.useRef)(!1),E=(0,n.useRef)(null),Y=(0,z.useMediaQuery)({query:"(max-width: 768px)"}),[Z,H]=me({threshold:0}),h=m?.length<=1&&R,u=!Y&&m?.length<=2&&R,T=s=>{switch(s){case 1440:return u?m?.length:4;case 1024:return u?m?.length:3;default:return u?m?.length:2.3}},B=()=>{(0,D.gaTrack)({event:"ga4Event",event_name:"view_item_list",event_parameters:{page_group:"Home Page",item_list_name:"Home_Page_Bundle",items:a?.map((s,k)=>{const o=s?.variants?.find(l=>l?.sku===s?.sku)||s?.variants?.[0];return{item_id:s?.sku||o?.sku,item_name:s?.name,item_variant:o?.name,price:o?.price,index:k+1}})}})},I=(s,k)=>{if(k){const w=a?.map?.(o=>({...o,isShowRecommended:!0}));y(w?.length?w||[]:[])}else if(Array.isArray(s)){const o=s?.map?.(l=>{const C=f?.products?.find(ee=>ee?.handle===l?.handle);if(C)return{sku:l.sku,isShowRecommended:!1,custom_name:l.custom_name,custom_description:l.custom_description,...C}})?.filter(l=>l);y(o?.length?o||[]:[])}else y([])};return(0,n.useImperativeHandle)(j,()=>E.current),(0,n.useEffect)(()=>{H&&a?.length&&!x.current&&(x.current=!0,B())},[H,a]),(0,n.useEffect)(()=>{if(!S.current){if(!S.current&&a?.length&&(S.current=!0),_){V(d?.[0]?.tab||""),I(d?.[0]?.data||[],d?.[0]?.isShowRecommendedTab);return}I(F,U)}},[a]),(0,c.jsxs)("div",{ref:E,className:(0,N.cn)("shelf-display-wrap w-full",p,{"aiui-dark":t?.theme==="dark"}),children:[M&&(0,c.jsx)(A.default,{data:{title:M}}),_&&(0,c.jsx)("div",{className:"md-tablet:w-full md-tablet:overflow-hidden",children:(0,c.jsx)(O.default,{value:P,tabs:d,tabShape:G,onTabClick:s=>{if(V(s?.tab),I(s?.data||[],s?.isShowRecommendedTab),!s?.isShowRecommendedTab){(0,D.gaTrack)({event:"ga4Event",event_name:"component_click",event_parameters:{page_group:"Home Page",component_type:le,component_name:ce,component_title:t?.title,component_position:1,navigation:s?.tab}});return}B()}})}),(0,c.jsx)("div",{ref:Z,className:"tablet:min-h-[393px] laptop:min-h-[425px] desktop:min-h-[405px] lg-desktop:min-h-[409px]",children:(0,c.jsx)($.default,{data:{list:m,configuration:{...X,event:r,isShowTag:J,isShowOriginalPrice:K,target:Q,itemLength:m?.length,isDisplayBackImage:W}},id:`ShelfDisplay${e}${P}`,className:`${_?"mt-6":""} !overflow-visible`,itemClassName:u?"flex-1":"",Slide:u?b.ShelfDisplayHorizontalItem:b.ShelfDisplayWrapItem,breakpoints:i||{0:{spaceBetween:12,freeMode:!1,slidesPerView:1},374:{spaceBetween:12,freeMode:!1,slidesPerView:h?1:1.2},768:{spaceBetween:h?0:16,freeMode:!1,slidesPerView:T()},1024:{spaceBetween:h?0:16,freeMode:!1,slidesPerView:T(1024)},1440:{spaceBetween:h?0:16,freeMode:!1,slidesPerView:T(1440)}}})})]})});var pe=(0,q.withLayout)(fe);
|
|
2
2
|
//# sourceMappingURL=index.js.map
|