@gem-sdk/components 2.0.0-dev.278 → 2.0.0-dev.289
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/accordion/components/Accordion.js +60 -179
- package/dist/cjs/accordion/components/Accordion.liquid.js +77 -101
- package/dist/cjs/accordion/components/AccordionItem.js +126 -280
- package/dist/cjs/accordion/components/AccordionItem.liquid.js +77 -215
- package/dist/cjs/accordion/components/common/classes.js +55 -0
- package/dist/cjs/accordion/components/common/index.js +146 -0
- package/dist/cjs/accordion/components/common/styles.js +131 -0
- package/dist/cjs/accordion/hooks/useAccordion.js +145 -0
- package/dist/cjs/accordion/hooks/useAccordionItem.js +119 -0
- package/dist/cjs/article/components/ArticleImage.js +0 -1
- package/dist/cjs/article/components/ArticlePagination.js +1 -1
- package/dist/cjs/article/components/ArticlePagination.liquid.js +3 -3
- package/dist/cjs/article/setting/configs/ArticleImage/settings.js +5 -5
- package/dist/cjs/banner/components/HeroBannerItem.js +0 -6
- package/dist/cjs/banner/components/HeroBannerItem.liquid.js +3 -0
- package/dist/cjs/banner/setting/setting.js +28 -3
- package/dist/cjs/banner/setting/uiV2.js +10 -97
- package/dist/cjs/builder.js +18 -20
- package/dist/cjs/cart/components/CartLineImage.js +0 -2
- package/dist/cjs/code/common/classes.js +11 -0
- package/dist/cjs/code/common/styles.js +15 -0
- package/dist/cjs/code/components/CSSCode.js +9 -99
- package/dist/cjs/code/components/CSSCode.liquid.js +11 -11
- package/dist/cjs/code/hooks/useCSSCode.js +102 -0
- package/dist/cjs/code/setting/CSSCode.js +7 -121
- package/dist/cjs/code/setting/config/setting.js +77 -0
- package/dist/cjs/code/setting/config/uiV1.js +52 -0
- package/dist/cjs/code/setting/config/uiV2.js +58 -0
- package/dist/cjs/estimate-delivery/components/EstimateDate.liquid.js +4 -1
- package/dist/cjs/form/components/contact/Contact.js +6 -2
- package/dist/cjs/form/components/contact/common/composeStyles.js +21 -0
- package/dist/cjs/form/components/form-checkbox/FormCheckbox.js +6 -4
- package/dist/cjs/form/components/form-checkbox/FormCheckbox.liquid.js +2 -4
- package/dist/cjs/form/components/form-checkbox/common/composeClasses.js +2 -2
- package/dist/cjs/form/components/form-checkbox/common/composeStyles.js +23 -10
- package/dist/cjs/form/components/form-dropdown/common/composeClasses.js +1 -1
- package/dist/cjs/form/components/form-email/FormEmail.js +18 -10
- package/dist/cjs/form/components/form-email/common/composeClasses.js +2 -1
- package/dist/cjs/form/components/newsletter/Newsletter.js +7 -2
- package/dist/cjs/form/components/newsletter/Newsletter.liquid.js +1 -1
- package/dist/cjs/form/components/newsletter/common/composeStyles.js +4 -2
- package/dist/cjs/form/components/textarea/TextArea.js +16 -8
- package/dist/cjs/form/components/textarea/common/composeClasses.js +1 -1
- package/dist/cjs/form/components/textfield/TextField.js +17 -9
- package/dist/cjs/form/components/textfield/common/composeClasses.js +2 -2
- package/dist/cjs/form/setting/contact/Contact.js +5 -1
- package/dist/cjs/form/setting/form-checkbox/configs/settings.js +153 -6
- package/dist/cjs/form/setting/form-checkbox/configs/uiV2.js +137 -0
- package/dist/cjs/form/setting/form-dropdown/configs/settings.js +147 -0
- package/dist/cjs/form/setting/form-dropdown/configs/uiV2.js +156 -4
- package/dist/cjs/form/setting/newsletter/configs/settings.js +132 -3
- package/dist/cjs/form/setting/newsletter/configs/uiV2.js +93 -0
- package/dist/cjs/form/setting/submit-button/configs/settings.js +37 -0
- package/dist/cjs/form/setting/submit-button/configs/uiV2.js +13 -0
- package/dist/cjs/grid/row/commons/getInnerRadius.js +11 -10
- package/dist/cjs/grid/row/setting/configs/uiV2.js +1 -1
- package/dist/cjs/header/components/kind/basic/index.js +1 -0
- package/dist/cjs/header/components/kind/modern/index.js +1 -1
- package/dist/cjs/helpers.js +53 -0
- package/dist/cjs/icon-list/setting/configs/uiV2.js +1 -1
- package/dist/cjs/icon-list-v2/setting/configs/settings.js +5 -5
- package/dist/cjs/image/components/AdaptiveImage.js +63 -49
- package/dist/cjs/image/components/AdaptiveImage.liquid.js +56 -44
- package/dist/cjs/image/components/Image.js +65 -154
- package/dist/cjs/image/components/Image.liquid.js +68 -103
- package/dist/cjs/image/components/Modal3d.liquid.js +54 -21
- package/dist/cjs/image/components/NextImage.js +26 -59
- package/dist/cjs/image/components/NextImage.liquid.js +27 -115
- package/dist/cjs/image/components/Video.liquid.js +38 -13
- package/dist/cjs/image/components/common/attributes.js +115 -0
- package/dist/cjs/image/components/common/classes.js +57 -0
- package/dist/cjs/image/components/common/constants.js +15 -0
- package/dist/cjs/image/components/common/data.js +24 -0
- package/dist/cjs/image/components/common/helpers.js +75 -0
- package/dist/cjs/image/components/common/styles.js +88 -0
- package/dist/cjs/image/components/helpers/getNextImageLiquidAttrs.js +80 -0
- package/dist/cjs/image/components/helpers/getNextImageReactAttrs.js +40 -0
- package/dist/cjs/image/components/hooks/useCheckNoImage.js +25 -0
- package/dist/cjs/image/helpers/getSrcSet.js +0 -2
- package/dist/cjs/image/next.js +1 -5
- package/dist/cjs/image/setting/configs/settings.js +14 -8
- package/dist/cjs/image/setting/configs/uiV2.js +61 -15
- package/dist/cjs/image/setting/index.js +1 -3
- package/dist/cjs/image-comparison/components/CompareImage.js +1 -1
- package/dist/cjs/image-comparison/components/CompareImage.liquid.js +1 -1
- package/dist/cjs/index.js +91 -91
- package/dist/cjs/index.liquid.js +8 -8
- package/dist/cjs/post-purchase/callout-banner/components/CalloutText.js +2 -1
- package/dist/cjs/post-purchase/callout-banner/components/common/getClasses.js +5 -2
- package/dist/cjs/post-purchase/callout-banner/components/common/getStyles.js +2 -4
- package/dist/cjs/post-purchase/callout-banner/setting/config/callout-box/setting.js +4 -10
- package/dist/cjs/post-purchase/callout-banner/setting/config/callout-text/setting.js +1 -11
- package/dist/cjs/post-purchase/countdown-timer/components/PostPurchaseCountdownTimer.js +9 -23
- package/dist/cjs/post-purchase/countdown-timer/components/TextCountdown.js +12 -26
- package/dist/cjs/post-purchase/countdown-timer/components/common/getClasses.js +24 -0
- package/dist/cjs/post-purchase/countdown-timer/components/common/getStyles.js +21 -0
- package/dist/cjs/post-purchase/countdown-timer/hooks/useCountdownTimer.js +18 -1
- package/dist/cjs/post-purchase/countdown-timer/hooks/useGetTimeExpired.js +18 -0
- package/dist/cjs/post-purchase/countdown-timer/settings/CountdownTimer.js +9 -358
- package/dist/cjs/post-purchase/countdown-timer/settings/config/preset.js +26 -0
- package/dist/cjs/post-purchase/countdown-timer/settings/config/setting.js +243 -0
- package/dist/cjs/post-purchase/countdown-timer/settings/config/uiV1.js +125 -0
- package/dist/cjs/post-purchase/countdown-timer/settings/config/uiV2.js +185 -0
- package/dist/cjs/post-purchase/image/common/getClasses.js +1 -1
- package/dist/cjs/post-purchase/image/setting/setting-v2.js +5 -5
- package/dist/cjs/post-purchase/product/components/product-image/carousel-post-purchase/CarouselWrapperPostPurchase.js +24 -26
- package/dist/cjs/post-purchase/product/settings/product-image/setting-v2.js +5 -5
- package/dist/cjs/post-purchase/product/settings/product-price-breakdown/configs/settings.js +2 -2
- package/dist/cjs/post-purchase/product/settings/product-quantity/configs/settings.js +1 -1
- package/dist/cjs/product/components/FileUpload/components/common/index.js +3 -0
- package/dist/cjs/product/components/Product.liquid.js +1 -1
- package/dist/cjs/product/components/ProductBundle/common/classes.js +25 -0
- package/dist/cjs/product/components/ProductBundle/common/index.js +5 -0
- package/dist/cjs/product/components/ProductBundle/common/styles.js +89 -0
- package/dist/cjs/product/components/ProductBundle/components/ProductBundleDiscount.js +82 -0
- package/dist/cjs/product/components/ProductBundle/components/ProductBundleDiscount.liquid.js +74 -0
- package/dist/cjs/product/components/ProductBundle/components/ProductBundleDiscountChildrenItem.js +69 -0
- package/dist/cjs/product/components/ProductBundle/components/ProductBundleDiscountChildrenItem.liquid.js +46 -0
- package/dist/cjs/product/components/ProductBundle/components/ProductBundleDiscountItem.js +23 -0
- package/dist/cjs/product/components/ProductBundle/components/ProductBundleDiscountItem.liquid.js +14 -0
- package/dist/cjs/product/components/{ProductBundleDiscount.js → ProductBundle/hooks/useProductBundleDataState.js} +20 -215
- package/dist/cjs/product/components/ProductBundle/hooks/useProductBundleDiscountState.js +56 -0
- package/dist/cjs/product/{setting → components/ProductBundle/setting}/ProductBundleDiscount.js +7 -7
- package/dist/cjs/product/{setting → components/ProductBundle/setting}/ProductBundleDiscountItem.js +3 -0
- package/dist/cjs/product/components/ProductButton.js +2 -2
- package/dist/cjs/product/components/ProductButton.liquid.js +2 -2
- package/dist/cjs/product/components/ProductPrice/common/getAttr.js +23 -0
- package/dist/cjs/product/components/ProductPrice/common/getClasses.js +19 -0
- package/dist/cjs/product/components/ProductPrice/common/getTextData.js +40 -0
- package/dist/cjs/product/components/ProductPrice/hooks/useGpPrice.js +126 -0
- package/dist/cjs/product/components/ProductPrice/index.js +54 -0
- package/dist/cjs/product/components/ProductPrice/index.liquid.js +43 -0
- package/dist/cjs/product/components/ProductQuickView/ProductQuickView.js +5 -5
- package/dist/cjs/product/next.js +3 -3
- package/dist/cjs/product/setting/index.js +2 -2
- package/dist/cjs/product/setting/product/configs/presets.js +1 -0
- package/dist/cjs/product/setting/product-image-v2/configs/setting-v2/ProductFeatureImage.js +6 -7
- package/dist/cjs/product/setting/product-image-v2/configs/setting-v2/ProductGalleryImage.js +11 -12
- package/dist/cjs/product/setting/product-image-v2/configs/setting-v2/index.js +6 -5
- package/dist/cjs/product/setting/product-list/configs/settingsV2.js +10 -8
- package/dist/cjs/setting.js +5 -2
- package/dist/esm/accordion/components/Accordion.js +61 -180
- package/dist/esm/accordion/components/Accordion.liquid.js +78 -102
- package/dist/esm/accordion/components/AccordionItem.js +129 -281
- package/dist/esm/accordion/components/AccordionItem.liquid.js +76 -214
- package/dist/esm/accordion/components/common/classes.js +44 -0
- package/dist/esm/accordion/components/common/index.js +136 -0
- package/dist/esm/accordion/components/common/styles.js +122 -0
- package/dist/esm/accordion/hooks/useAccordion.js +141 -0
- package/dist/esm/accordion/hooks/useAccordionItem.js +115 -0
- package/dist/esm/article/components/ArticleImage.js +0 -1
- package/dist/esm/article/components/ArticlePagination.js +1 -1
- package/dist/esm/article/components/ArticlePagination.liquid.js +3 -3
- package/dist/esm/article/setting/configs/ArticleImage/settings.js +5 -5
- package/dist/esm/banner/components/HeroBannerItem.js +0 -6
- package/dist/esm/banner/components/HeroBannerItem.liquid.js +3 -0
- package/dist/esm/banner/setting/setting.js +28 -3
- package/dist/esm/banner/setting/uiV2.js +10 -97
- package/dist/esm/builder.js +3 -5
- package/dist/esm/cart/components/CartLineImage.js +0 -2
- package/dist/esm/code/common/classes.js +9 -0
- package/dist/esm/code/common/styles.js +13 -0
- package/dist/esm/code/components/CSSCode.js +9 -99
- package/dist/esm/code/components/CSSCode.liquid.js +12 -12
- package/dist/esm/code/hooks/useCSSCode.js +98 -0
- package/dist/esm/code/setting/CSSCode.js +7 -121
- package/dist/esm/code/setting/config/setting.js +75 -0
- package/dist/esm/code/setting/config/uiV1.js +50 -0
- package/dist/esm/code/setting/config/uiV2.js +56 -0
- package/dist/esm/estimate-delivery/components/EstimateDate.liquid.js +4 -1
- package/dist/esm/form/components/contact/Contact.js +7 -3
- package/dist/esm/form/components/contact/common/composeStyles.js +19 -0
- package/dist/esm/form/components/form-checkbox/FormCheckbox.js +7 -5
- package/dist/esm/form/components/form-checkbox/FormCheckbox.liquid.js +3 -5
- package/dist/esm/form/components/form-checkbox/common/composeClasses.js +2 -2
- package/dist/esm/form/components/form-checkbox/common/composeStyles.js +25 -11
- package/dist/esm/form/components/form-dropdown/common/composeClasses.js +1 -1
- package/dist/esm/form/components/form-email/FormEmail.js +18 -10
- package/dist/esm/form/components/form-email/common/composeClasses.js +2 -1
- package/dist/esm/form/components/newsletter/Newsletter.js +8 -3
- package/dist/esm/form/components/newsletter/Newsletter.liquid.js +1 -1
- package/dist/esm/form/components/newsletter/common/composeStyles.js +4 -2
- package/dist/esm/form/components/textarea/TextArea.js +16 -8
- package/dist/esm/form/components/textarea/common/composeClasses.js +1 -1
- package/dist/esm/form/components/textfield/TextField.js +17 -9
- package/dist/esm/form/components/textfield/common/composeClasses.js +2 -2
- package/dist/esm/form/setting/contact/Contact.js +5 -1
- package/dist/esm/form/setting/form-checkbox/configs/settings.js +153 -6
- package/dist/esm/form/setting/form-checkbox/configs/uiV2.js +137 -0
- package/dist/esm/form/setting/form-dropdown/configs/settings.js +147 -0
- package/dist/esm/form/setting/form-dropdown/configs/uiV2.js +156 -4
- package/dist/esm/form/setting/newsletter/configs/settings.js +132 -3
- package/dist/esm/form/setting/newsletter/configs/uiV2.js +93 -0
- package/dist/esm/form/setting/submit-button/configs/settings.js +37 -0
- package/dist/esm/form/setting/submit-button/configs/uiV2.js +13 -0
- package/dist/esm/grid/row/commons/getInnerRadius.js +11 -10
- package/dist/esm/grid/row/setting/configs/uiV2.js +1 -1
- package/dist/esm/header/components/kind/basic/index.js +1 -0
- package/dist/esm/header/components/kind/modern/index.js +1 -1
- package/dist/esm/helpers.js +52 -1
- package/dist/esm/icon-list/setting/configs/uiV2.js +1 -1
- package/dist/esm/icon-list-v2/setting/configs/settings.js +5 -5
- package/dist/esm/image/components/AdaptiveImage.js +64 -50
- package/dist/esm/image/components/AdaptiveImage.liquid.js +57 -45
- package/dist/esm/image/components/Image.js +66 -155
- package/dist/esm/image/components/Image.liquid.js +69 -104
- package/dist/esm/image/components/Modal3d.liquid.js +55 -22
- package/dist/esm/image/components/NextImage.js +26 -59
- package/dist/esm/image/components/NextImage.liquid.js +28 -116
- package/dist/esm/image/components/Video.liquid.js +38 -13
- package/dist/esm/image/components/common/attributes.js +108 -0
- package/dist/esm/image/components/common/classes.js +51 -0
- package/dist/esm/image/components/common/constants.js +11 -0
- package/dist/esm/image/components/common/data.js +22 -0
- package/dist/esm/image/components/common/helpers.js +69 -0
- package/dist/esm/image/components/common/styles.js +80 -0
- package/dist/esm/image/components/helpers/getNextImageLiquidAttrs.js +78 -0
- package/dist/esm/image/components/helpers/getNextImageReactAttrs.js +38 -0
- package/dist/esm/image/components/hooks/useCheckNoImage.js +23 -0
- package/dist/esm/image/helpers/getSrcSet.js +1 -2
- package/dist/esm/image/next.js +1 -5
- package/dist/esm/image/setting/configs/settings.js +14 -8
- package/dist/esm/image/setting/configs/uiV2.js +61 -15
- package/dist/esm/image/setting/index.js +1 -3
- package/dist/esm/image-comparison/components/CompareImage.js +1 -1
- package/dist/esm/image-comparison/components/CompareImage.liquid.js +1 -1
- package/dist/esm/index.js +4 -5
- package/dist/esm/index.liquid.js +3 -3
- package/dist/esm/post-purchase/callout-banner/components/CalloutText.js +2 -1
- package/dist/esm/post-purchase/callout-banner/components/common/getClasses.js +5 -2
- package/dist/esm/post-purchase/callout-banner/components/common/getStyles.js +2 -4
- package/dist/esm/post-purchase/callout-banner/setting/config/callout-box/setting.js +4 -10
- package/dist/esm/post-purchase/callout-banner/setting/config/callout-text/setting.js +1 -11
- package/dist/esm/post-purchase/countdown-timer/components/PostPurchaseCountdownTimer.js +9 -23
- package/dist/esm/post-purchase/countdown-timer/components/TextCountdown.js +13 -27
- package/dist/esm/post-purchase/countdown-timer/components/common/getClasses.js +21 -0
- package/dist/esm/post-purchase/countdown-timer/components/common/getStyles.js +19 -0
- package/dist/esm/post-purchase/countdown-timer/hooks/useCountdownTimer.js +19 -3
- package/dist/esm/post-purchase/countdown-timer/hooks/useGetTimeExpired.js +16 -0
- package/dist/esm/post-purchase/countdown-timer/settings/CountdownTimer.js +9 -358
- package/dist/esm/post-purchase/countdown-timer/settings/config/preset.js +24 -0
- package/dist/esm/post-purchase/countdown-timer/settings/config/setting.js +241 -0
- package/dist/esm/post-purchase/countdown-timer/settings/config/uiV1.js +123 -0
- package/dist/esm/post-purchase/countdown-timer/settings/config/uiV2.js +183 -0
- package/dist/esm/post-purchase/image/common/getClasses.js +1 -1
- package/dist/esm/post-purchase/image/setting/setting-v2.js +5 -5
- package/dist/esm/post-purchase/product/components/product-image/carousel-post-purchase/CarouselWrapperPostPurchase.js +25 -27
- package/dist/esm/post-purchase/product/settings/product-image/setting-v2.js +5 -5
- package/dist/esm/post-purchase/product/settings/product-price-breakdown/configs/settings.js +2 -2
- package/dist/esm/post-purchase/product/settings/product-quantity/configs/settings.js +1 -1
- package/dist/esm/product/components/FileUpload/components/common/index.js +3 -0
- package/dist/esm/product/components/Product.liquid.js +1 -1
- package/dist/esm/product/components/ProductBundle/common/classes.js +19 -0
- package/dist/esm/product/components/ProductBundle/common/index.js +3 -0
- package/dist/esm/product/components/ProductBundle/common/styles.js +80 -0
- package/dist/esm/product/components/ProductBundle/components/ProductBundleDiscount.js +78 -0
- package/dist/esm/product/components/ProductBundle/components/ProductBundleDiscount.liquid.js +70 -0
- package/dist/esm/product/components/ProductBundle/components/ProductBundleDiscountChildrenItem.js +65 -0
- package/dist/esm/product/components/ProductBundle/components/ProductBundleDiscountChildrenItem.liquid.js +42 -0
- package/dist/esm/product/components/ProductBundle/components/ProductBundleDiscountItem.js +19 -0
- package/dist/esm/product/components/ProductBundle/components/ProductBundleDiscountItem.liquid.js +10 -0
- package/dist/esm/product/components/{ProductBundleDiscount.js → ProductBundle/hooks/useProductBundleDataState.js} +21 -216
- package/dist/esm/product/components/ProductBundle/hooks/useProductBundleDiscountState.js +52 -0
- package/dist/esm/product/{setting → components/ProductBundle/setting}/ProductBundleDiscount.js +7 -7
- package/dist/esm/product/{setting → components/ProductBundle/setting}/ProductBundleDiscountItem.js +3 -0
- package/dist/esm/product/components/ProductButton.js +1 -1
- package/dist/esm/product/components/ProductButton.liquid.js +1 -1
- package/dist/esm/product/components/ProductPrice/common/getAttr.js +21 -0
- package/dist/esm/product/components/ProductPrice/common/getClasses.js +17 -0
- package/dist/esm/product/components/ProductPrice/common/getTextData.js +38 -0
- package/dist/esm/product/components/ProductPrice/hooks/useGpPrice.js +124 -0
- package/dist/esm/product/components/ProductPrice/index.js +50 -0
- package/dist/esm/product/components/ProductPrice/index.liquid.js +38 -0
- package/dist/esm/product/components/ProductQuickView/ProductQuickView.js +1 -1
- package/dist/esm/product/next.js +3 -3
- package/dist/esm/product/setting/index.js +2 -2
- package/dist/esm/product/setting/product/configs/presets.js +1 -0
- package/dist/esm/product/setting/product-image-v2/configs/setting-v2/ProductFeatureImage.js +6 -7
- package/dist/esm/product/setting/product-image-v2/configs/setting-v2/ProductGalleryImage.js +11 -12
- package/dist/esm/product/setting/product-image-v2/configs/setting-v2/index.js +6 -5
- package/dist/esm/product/setting/product-list/configs/settingsV2.js +10 -8
- package/dist/esm/setting.js +5 -2
- package/dist/types/index.d.ts +174 -257
- package/package.json +2 -2
- package/dist/cjs/image/components/BackgroundImage.js +0 -102
- package/dist/cjs/image/components/Img.js +0 -28
- package/dist/cjs/image/components/helpers.js +0 -12
- package/dist/cjs/image/setting/BackgroundImage.js +0 -364
- package/dist/cjs/product/components/ProductBundleDiscount.liquid.js +0 -81
- package/dist/cjs/product/components/ProductBundleDiscountItem.js +0 -42
- package/dist/cjs/product/components/ProductBundleDiscountItem.liquid.js +0 -103
- package/dist/cjs/product/components/ProductPrice.js +0 -209
- package/dist/cjs/product/components/ProductPrice.liquid.js +0 -88
- package/dist/esm/image/components/BackgroundImage.js +0 -98
- package/dist/esm/image/components/Img.js +0 -24
- package/dist/esm/image/components/helpers.js +0 -9
- package/dist/esm/image/setting/BackgroundImage.js +0 -360
- package/dist/esm/product/components/ProductBundleDiscount.liquid.js +0 -77
- package/dist/esm/product/components/ProductBundleDiscountItem.js +0 -36
- package/dist/esm/product/components/ProductBundleDiscountItem.liquid.js +0 -99
- package/dist/esm/product/components/ProductPrice.js +0 -205
- package/dist/esm/product/components/ProductPrice.liquid.js +0 -83
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
import { useRef, useState, useMemo, useEffect, Children } from 'react';
|
|
2
|
+
import { useEditorMode, useInteraction } from '@gem-sdk/core';
|
|
3
|
+
|
|
4
|
+
const useAccordion = (props)=>{
|
|
5
|
+
const { setting, builderProps, children } = props;
|
|
6
|
+
const { activeKey, expandItem, expandedMode } = setting ?? {};
|
|
7
|
+
const currentAccordions = useRef([]);
|
|
8
|
+
const [accordions, setAccordions] = useState([]);
|
|
9
|
+
const mode = useEditorMode();
|
|
10
|
+
const { onListener, saveToElementInteractionData, ref, findElementIncludingSelf } = useInteraction();
|
|
11
|
+
const expanded = useMemo(()=>expandedMode === 'multiple', [
|
|
12
|
+
expandedMode
|
|
13
|
+
]);
|
|
14
|
+
useEffect(()=>{
|
|
15
|
+
if (!expandItem) {
|
|
16
|
+
currentAccordions.current = [];
|
|
17
|
+
setAccordions([]);
|
|
18
|
+
}
|
|
19
|
+
}, [
|
|
20
|
+
expandItem
|
|
21
|
+
]);
|
|
22
|
+
useEffect(()=>{
|
|
23
|
+
if (!expanded && !activeKey) {
|
|
24
|
+
currentAccordions.current = [
|
|
25
|
+
'0'
|
|
26
|
+
];
|
|
27
|
+
setAccordions([
|
|
28
|
+
'0'
|
|
29
|
+
]);
|
|
30
|
+
}
|
|
31
|
+
if (!activeKey) {
|
|
32
|
+
currentAccordions.current = [];
|
|
33
|
+
setAccordions([]);
|
|
34
|
+
}
|
|
35
|
+
}, [
|
|
36
|
+
expanded,
|
|
37
|
+
activeKey
|
|
38
|
+
]);
|
|
39
|
+
useEffect(()=>{
|
|
40
|
+
if (activeKey && expandItem) {
|
|
41
|
+
const composeActiveKeys = activeKey?.toString()?.toLowerCase()?.split(',')?.map((item)=>parseInt(item.trim()) - 1)?.map((item)=>item.toString());
|
|
42
|
+
setAccordions(composeActiveKeys);
|
|
43
|
+
currentAccordions.current = composeActiveKeys;
|
|
44
|
+
}
|
|
45
|
+
}, [
|
|
46
|
+
activeKey,
|
|
47
|
+
expandItem
|
|
48
|
+
]);
|
|
49
|
+
useEffect(()=>{
|
|
50
|
+
if (!expandItem) {
|
|
51
|
+
setAccordions([]);
|
|
52
|
+
currentAccordions.current = [];
|
|
53
|
+
}
|
|
54
|
+
if (activeKey?.toString()?.toLowerCase() === 'all' && expandItem) {
|
|
55
|
+
const list = Array.from(Children?.map(children, (_, index)=>index.toString()));
|
|
56
|
+
setAccordions(list);
|
|
57
|
+
currentAccordions.current = list;
|
|
58
|
+
}
|
|
59
|
+
}, [
|
|
60
|
+
activeKey,
|
|
61
|
+
children,
|
|
62
|
+
expandItem
|
|
63
|
+
]);
|
|
64
|
+
const setActive = (id)=>{
|
|
65
|
+
if (accordions.includes(id)) {
|
|
66
|
+
setAccordions([]);
|
|
67
|
+
currentAccordions.current = [];
|
|
68
|
+
} else {
|
|
69
|
+
setAccordions([
|
|
70
|
+
id
|
|
71
|
+
]);
|
|
72
|
+
currentAccordions.current = [
|
|
73
|
+
id
|
|
74
|
+
];
|
|
75
|
+
}
|
|
76
|
+
};
|
|
77
|
+
const setToggle = (id)=>{
|
|
78
|
+
let newActive = [];
|
|
79
|
+
if (accordions.includes(id)) {
|
|
80
|
+
newActive = accordions.filter((accordion)=>accordion !== id);
|
|
81
|
+
} else {
|
|
82
|
+
newActive = [
|
|
83
|
+
...accordions,
|
|
84
|
+
id
|
|
85
|
+
];
|
|
86
|
+
}
|
|
87
|
+
setAccordions(newActive);
|
|
88
|
+
currentAccordions.current = newActive;
|
|
89
|
+
};
|
|
90
|
+
const handleDropdown = (id)=>{
|
|
91
|
+
expanded ? setToggle(id.toString()) : setActive(id.toString());
|
|
92
|
+
};
|
|
93
|
+
useEffect(()=>{
|
|
94
|
+
const selector = `[data-id="${builderProps?.uid}"]`;
|
|
95
|
+
onListener({
|
|
96
|
+
event: 'gp:change-expanded-item-original',
|
|
97
|
+
selector
|
|
98
|
+
}, (params)=>{
|
|
99
|
+
const element = findElementIncludingSelf(ref.current || document, selector);
|
|
100
|
+
const { data, isRollback, key } = params || {};
|
|
101
|
+
if (data === undefined && isRollback) return;
|
|
102
|
+
if (isRollback) {
|
|
103
|
+
setAccordions(data);
|
|
104
|
+
return;
|
|
105
|
+
}
|
|
106
|
+
let interactionAccordion = [
|
|
107
|
+
...currentAccordions.current
|
|
108
|
+
];
|
|
109
|
+
saveToElementInteractionData(element, key, JSON.stringify({
|
|
110
|
+
data: interactionAccordion
|
|
111
|
+
}));
|
|
112
|
+
const id = data.toString();
|
|
113
|
+
if (expanded) {
|
|
114
|
+
interactionAccordion = [
|
|
115
|
+
...interactionAccordion.filter((accordion)=>accordion !== id),
|
|
116
|
+
id
|
|
117
|
+
];
|
|
118
|
+
} else {
|
|
119
|
+
interactionAccordion = [
|
|
120
|
+
id
|
|
121
|
+
];
|
|
122
|
+
}
|
|
123
|
+
setAccordions(interactionAccordion);
|
|
124
|
+
});
|
|
125
|
+
}, []);
|
|
126
|
+
useEffect(()=>{
|
|
127
|
+
currentAccordions.current = accordions;
|
|
128
|
+
}, [
|
|
129
|
+
accordions
|
|
130
|
+
]);
|
|
131
|
+
return {
|
|
132
|
+
ref,
|
|
133
|
+
mode,
|
|
134
|
+
accordions,
|
|
135
|
+
activeKey,
|
|
136
|
+
setAccordions,
|
|
137
|
+
handleDropdown
|
|
138
|
+
};
|
|
139
|
+
};
|
|
140
|
+
|
|
141
|
+
export { useAccordion as default };
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
import { makeGlobalSize, useEditorMode, makeStyle, getGlobalColorStateStyle, composeSize, removePaddingYInStyle } from '@gem-sdk/core';
|
|
2
|
+
import { useState, useEffect, useMemo } from 'react';
|
|
3
|
+
import useMountTransition from './useMountTransition.js';
|
|
4
|
+
import { useGetProductId } from '../../components/hooks/useGetProductId.js';
|
|
5
|
+
import { ICON_MINUS, ICON_PLUS } from '../components/common/index.js';
|
|
6
|
+
|
|
7
|
+
const useAccordionItem = (props)=>{
|
|
8
|
+
const { accordions, index, builderProps, parentSetting = {}, parentStyle = {}, handleDropDown } = props;
|
|
9
|
+
const { iconSvg, iconPosition, titleTypo, iconCollapse, iconExpand } = parentSetting;
|
|
10
|
+
delete titleTypo?.attrs?.color;
|
|
11
|
+
const { itemContentSpacing, iconColor, contentSizePadding } = parentStyle;
|
|
12
|
+
const isShow = accordions?.includes(index?.toString() ?? '');
|
|
13
|
+
const contentSizePaddingSize = makeGlobalSize(contentSizePadding);
|
|
14
|
+
const mode = useEditorMode();
|
|
15
|
+
const [isMounted, setIsMounted] = useState(isShow);
|
|
16
|
+
const hasTransitionedIn = useMountTransition(isMounted || false, 500);
|
|
17
|
+
useEffect(()=>{
|
|
18
|
+
setIsMounted(isShow);
|
|
19
|
+
}, [
|
|
20
|
+
isShow
|
|
21
|
+
]);
|
|
22
|
+
const makeIcon = useMemo(()=>{
|
|
23
|
+
if (iconExpand && isShow) {
|
|
24
|
+
return iconExpand;
|
|
25
|
+
}
|
|
26
|
+
if (iconCollapse && !isShow) {
|
|
27
|
+
return iconCollapse;
|
|
28
|
+
}
|
|
29
|
+
if (iconSvg === 'plus') {
|
|
30
|
+
if (isShow) {
|
|
31
|
+
return ICON_MINUS;
|
|
32
|
+
}
|
|
33
|
+
return ICON_PLUS;
|
|
34
|
+
}
|
|
35
|
+
if (iconSvg) {
|
|
36
|
+
return iconSvg;
|
|
37
|
+
}
|
|
38
|
+
}, [
|
|
39
|
+
iconSvg,
|
|
40
|
+
isShow,
|
|
41
|
+
iconCollapse,
|
|
42
|
+
iconExpand
|
|
43
|
+
]);
|
|
44
|
+
const composePosition = useMemo(()=>{
|
|
45
|
+
return makeStyle({
|
|
46
|
+
fd: iconPosition === 'left' ? 'row' : 'row-reverse',
|
|
47
|
+
jc: iconPosition === 'right' ? 'space-between' : ''
|
|
48
|
+
});
|
|
49
|
+
}, [
|
|
50
|
+
iconPosition
|
|
51
|
+
]);
|
|
52
|
+
const getIdDropdownItem = (event, id)=>{
|
|
53
|
+
if (event.target.closest('.gp-text')) return;
|
|
54
|
+
if (handleDropDown && id) {
|
|
55
|
+
setIsMounted(!isMounted);
|
|
56
|
+
handleDropDown(id);
|
|
57
|
+
}
|
|
58
|
+
};
|
|
59
|
+
const composeIconColor = useMemo(()=>{
|
|
60
|
+
if (isShow) {
|
|
61
|
+
return makeStyle({
|
|
62
|
+
c: iconColor?.active
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
return getGlobalColorStateStyle('c', iconColor);
|
|
66
|
+
}, [
|
|
67
|
+
iconColor,
|
|
68
|
+
isShow
|
|
69
|
+
]);
|
|
70
|
+
const { refContainer, productID } = useGetProductId();
|
|
71
|
+
const uniqueId = useMemo(()=>{
|
|
72
|
+
const prefix = `gp-accordion-item-${builderProps?.uid}-${index}`;
|
|
73
|
+
return productID ? `${prefix}-${productID}` : prefix;
|
|
74
|
+
}, [
|
|
75
|
+
builderProps?.uid,
|
|
76
|
+
index,
|
|
77
|
+
productID
|
|
78
|
+
]);
|
|
79
|
+
const composeContentSizeStyle = useMemo(()=>{
|
|
80
|
+
const contentSizeStyle = {
|
|
81
|
+
...contentSizePadding && contentSizePaddingSize.padding,
|
|
82
|
+
...!itemContentSpacing?.type && !contentSizePadding ? composeSize(itemContentSpacing?.custom) : {}
|
|
83
|
+
};
|
|
84
|
+
if (!isShow) {
|
|
85
|
+
return removePaddingYInStyle(contentSizeStyle);
|
|
86
|
+
}
|
|
87
|
+
return contentSizeStyle;
|
|
88
|
+
}, [
|
|
89
|
+
contentSizePadding,
|
|
90
|
+
itemContentSpacing,
|
|
91
|
+
isShow,
|
|
92
|
+
contentSizePaddingSize
|
|
93
|
+
]);
|
|
94
|
+
const isRenderChildren = useMemo(()=>hasTransitionedIn || isMounted || mode !== 'edit', [
|
|
95
|
+
hasTransitionedIn,
|
|
96
|
+
isMounted,
|
|
97
|
+
mode
|
|
98
|
+
]);
|
|
99
|
+
return {
|
|
100
|
+
productID,
|
|
101
|
+
isShow,
|
|
102
|
+
getIdDropdownItem,
|
|
103
|
+
makeIcon,
|
|
104
|
+
refContainer,
|
|
105
|
+
uniqueId,
|
|
106
|
+
isRenderChildren,
|
|
107
|
+
composePosition,
|
|
108
|
+
composeIconColor,
|
|
109
|
+
composeContentSizeStyle,
|
|
110
|
+
hasTransitionedIn,
|
|
111
|
+
isMounted
|
|
112
|
+
};
|
|
113
|
+
};
|
|
114
|
+
|
|
115
|
+
export { useAccordionItem as default };
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
import { jsx } from 'react/jsx-runtime';
|
|
3
3
|
import { useArticleStore, cls } from '@gem-sdk/core';
|
|
4
4
|
import Image from '../../image/components/Image.js';
|
|
5
|
-
import 'next/image';
|
|
6
5
|
import { useMemo } from 'react';
|
|
7
6
|
|
|
8
7
|
const ArticleImage = ({ className, setting = {}, styles = {}, advanced, builderProps })=>{
|
|
@@ -3,10 +3,10 @@ import { jsx } from 'react/jsx-runtime';
|
|
|
3
3
|
import '@gem-sdk/core';
|
|
4
4
|
import 'react';
|
|
5
5
|
import '@gem-sdk/system';
|
|
6
|
+
import 'next/link';
|
|
6
7
|
import 'next/head';
|
|
7
8
|
import 'next/image';
|
|
8
9
|
import 'react-youtube';
|
|
9
|
-
import 'next/link';
|
|
10
10
|
import CollectionPaginator from '../../collection/components/CollectionPaginator.js';
|
|
11
11
|
|
|
12
12
|
const ArticlePagination = (props)=>{
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import '@gem-sdk/core';
|
|
3
|
-
import '@gem-sdk/system';
|
|
4
|
-
import CollectionPaginator from '../../collection/components/CollectionPaginator.liquid.js';
|
|
5
3
|
import 'react/jsx-runtime';
|
|
6
4
|
import 'react';
|
|
7
|
-
import '
|
|
5
|
+
import 'next/link';
|
|
6
|
+
import '@gem-sdk/system';
|
|
7
|
+
import CollectionPaginator from '../../collection/components/CollectionPaginator.liquid.js';
|
|
8
8
|
|
|
9
9
|
const ArticlePagination = (props)=>{
|
|
10
10
|
return CollectionPaginator(props);
|
|
@@ -96,21 +96,21 @@ const ArticleImageSettings = [
|
|
|
96
96
|
},
|
|
97
97
|
{
|
|
98
98
|
id: 'objectFit',
|
|
99
|
-
type: '
|
|
100
|
-
iconViewBox: '0 0 66 48',
|
|
101
|
-
enableItemBackground: true,
|
|
99
|
+
type: 'option:illustration',
|
|
102
100
|
enableTooltip: true,
|
|
103
101
|
label: 'Image scale',
|
|
104
102
|
options: [
|
|
105
103
|
{
|
|
106
104
|
label: 'Fill image',
|
|
107
105
|
value: 'cover',
|
|
108
|
-
type: 'image'
|
|
106
|
+
type: 'image',
|
|
107
|
+
svgName: 'gp-image-cover'
|
|
109
108
|
},
|
|
110
109
|
{
|
|
111
110
|
label: 'Fit image',
|
|
112
111
|
value: 'contain',
|
|
113
|
-
type: 'image'
|
|
112
|
+
type: 'image',
|
|
113
|
+
svgName: 'gp-image-contain'
|
|
114
114
|
}
|
|
115
115
|
],
|
|
116
116
|
devices: {
|
|
@@ -10,7 +10,6 @@ import { getContainerStyle, getOverlayStyle, getRowStyle, getAdaptiveStyle, getB
|
|
|
10
10
|
import { getContainerClasses, getOverlayClasses, getRowClasses, getAdaptivePictureClasses, getAdaptiveClasses, getBackgroundClasses, getContainBackgroundClasses, getHtml5VideoClasses, getWrapperYoutubeClasses, getIframeYoutubeClasses } from './common/getClasses.js';
|
|
11
11
|
import { getAspectRatioSettings, getBackgroundImageHeroBanner, showVideoType, horizontalAlign, getWidth, scrollToContentBanner, getBgImage } from './common/common.js';
|
|
12
12
|
import LiteYouTubeEmbed from '../../video/components/LiteYouTubeEmbed.js';
|
|
13
|
-
import { imageNoVideoPlaceholder } from '../../image/components/helpers.js';
|
|
14
13
|
import { getYoutubeVideoId, youtubeVideoRegex } from '../../video/helpers/common.js';
|
|
15
14
|
|
|
16
15
|
const HeroBannerItem = (props)=>{
|
|
@@ -110,11 +109,6 @@ const HeroBannerItem = (props)=>{
|
|
|
110
109
|
iframeClass: iframeYoutubeClasses
|
|
111
110
|
});
|
|
112
111
|
}
|
|
113
|
-
return /*#__PURE__*/ jsx("img", {
|
|
114
|
-
src: imageNoVideoPlaceholder,
|
|
115
|
-
alt: "no-video",
|
|
116
|
-
className: "gp-w-full gp-h-full gp-object-cover"
|
|
117
|
-
});
|
|
118
112
|
}, [
|
|
119
113
|
dataVideo,
|
|
120
114
|
background,
|
|
@@ -7,11 +7,14 @@ import Row from '../../grid/row/Row.liquid.js';
|
|
|
7
7
|
import NextImage from '../../image/components/NextImage.liquid.js';
|
|
8
8
|
import HTML5Embed from '../../video/components/HTML5Embed.liquid.js';
|
|
9
9
|
import '../../product/components/ProductVariants/variants/index.js';
|
|
10
|
+
import '../../product/components/ProductBundle/common/styles.js';
|
|
11
|
+
import '../../product/components/ProductBundle/common/classes.js';
|
|
10
12
|
import '../../product/components/ProductBadge/constants.js';
|
|
11
13
|
import '../../product/components/constants/product-bundle.js';
|
|
12
14
|
import '../../product/components/ProductBadge/types.js';
|
|
13
15
|
import '../../product/components/ProductBadge/utils/shape.js';
|
|
14
16
|
import '../../accordion/setting/configs/settings.js';
|
|
17
|
+
import '../../accordion/components/common/classes.js';
|
|
15
18
|
import '@gem-sdk/keen-slider/react';
|
|
16
19
|
import 'next/head';
|
|
17
20
|
import 'next/image';
|
|
@@ -1302,21 +1302,21 @@ const SettingsV2 = [
|
|
|
1302
1302
|
'full',
|
|
1303
1303
|
'default'
|
|
1304
1304
|
],
|
|
1305
|
-
name: '
|
|
1305
|
+
name: 'Width'
|
|
1306
1306
|
},
|
|
1307
1307
|
height: {
|
|
1308
1308
|
displayOptions: [
|
|
1309
1309
|
'fit-content',
|
|
1310
1310
|
'fit-screen'
|
|
1311
1311
|
],
|
|
1312
|
-
name: '
|
|
1312
|
+
name: 'Height'
|
|
1313
1313
|
},
|
|
1314
1314
|
shape: {
|
|
1315
1315
|
displayOptions: [
|
|
1316
1316
|
'original',
|
|
1317
1317
|
'custom'
|
|
1318
1318
|
],
|
|
1319
|
-
name: '
|
|
1319
|
+
name: 'Frame',
|
|
1320
1320
|
shapeTitleConfig: {
|
|
1321
1321
|
original: 'As banner source'
|
|
1322
1322
|
}
|
|
@@ -1356,6 +1356,31 @@ const SettingsV2 = [
|
|
|
1356
1356
|
lazyLoad: false
|
|
1357
1357
|
}
|
|
1358
1358
|
}
|
|
1359
|
+
},
|
|
1360
|
+
compoDefaultValue: {
|
|
1361
|
+
desktop: {
|
|
1362
|
+
default: {
|
|
1363
|
+
type: 'image',
|
|
1364
|
+
color: 'bg-2',
|
|
1365
|
+
image: {
|
|
1366
|
+
src: 'https://cdn.shopify.com/s/files/1/0703/5214/2562/files/gempages_518090459516502570-3ecdd107-d16d-4cc1-a5f1-00e38afef3eb.png',
|
|
1367
|
+
width: 1920,
|
|
1368
|
+
height: 900
|
|
1369
|
+
},
|
|
1370
|
+
size: 'cover',
|
|
1371
|
+
position: {
|
|
1372
|
+
x: 50,
|
|
1373
|
+
y: 50
|
|
1374
|
+
},
|
|
1375
|
+
repeat: 'no-repeat',
|
|
1376
|
+
attachment: 'scroll',
|
|
1377
|
+
video: 'https://www.youtube.com/watch?v=cyzh48XRS4M',
|
|
1378
|
+
videoHtml5: 'https://media.w3.org/2010/05/sintel/trailer.mp4',
|
|
1379
|
+
videoType: 'youtube',
|
|
1380
|
+
loop: true,
|
|
1381
|
+
lazyLoad: false
|
|
1382
|
+
}
|
|
1383
|
+
}
|
|
1359
1384
|
}
|
|
1360
1385
|
},
|
|
1361
1386
|
{
|
|
@@ -41,100 +41,10 @@ const SettingUIV2 = [
|
|
|
41
41
|
},
|
|
42
42
|
controls: [
|
|
43
43
|
{
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
en: 'Frame'
|
|
47
|
-
},
|
|
48
|
-
controlConfig: {
|
|
49
|
-
id: 'shape',
|
|
50
|
-
type: 'dropdown:input',
|
|
51
|
-
linkWithSetting: {
|
|
52
|
-
name: 'sizeSetting',
|
|
53
|
-
field: 'shape'
|
|
54
|
-
},
|
|
55
|
-
displayOptions: [
|
|
56
|
-
{
|
|
57
|
-
label: 'As image background',
|
|
58
|
-
value: 'original'
|
|
59
|
-
},
|
|
60
|
-
{
|
|
61
|
-
label: 'Custom',
|
|
62
|
-
value: 'custom'
|
|
63
|
-
}
|
|
64
|
-
]
|
|
65
|
-
}
|
|
66
|
-
},
|
|
67
|
-
{
|
|
68
|
-
id: 'Width',
|
|
69
|
-
label: {
|
|
70
|
-
en: 'Width'
|
|
71
|
-
},
|
|
72
|
-
controlConfig: {
|
|
73
|
-
id: 'width',
|
|
74
|
-
type: 'dropdown:input',
|
|
75
|
-
label: 'Width',
|
|
76
|
-
inputType: 'number',
|
|
77
|
-
units: [
|
|
78
|
-
'px',
|
|
79
|
-
'%'
|
|
80
|
-
],
|
|
81
|
-
hideUnit: false,
|
|
82
|
-
linkWithSetting: {
|
|
83
|
-
name: 'sizeSetting',
|
|
84
|
-
field: 'width'
|
|
85
|
-
},
|
|
86
|
-
displayOptions: [
|
|
87
|
-
{
|
|
88
|
-
label: 'Fit content',
|
|
89
|
-
value: 'Auto',
|
|
90
|
-
showValue: true
|
|
91
|
-
},
|
|
92
|
-
{
|
|
93
|
-
label: 'Full',
|
|
94
|
-
value: '100%',
|
|
95
|
-
showValue: true
|
|
96
|
-
},
|
|
97
|
-
{
|
|
98
|
-
label: 'Default',
|
|
99
|
-
value: 'default',
|
|
100
|
-
showValue: true
|
|
101
|
-
}
|
|
102
|
-
]
|
|
103
|
-
},
|
|
104
|
-
layout: 'horizontal'
|
|
105
|
-
},
|
|
106
|
-
{
|
|
107
|
-
id: 'Height',
|
|
108
|
-
label: {
|
|
109
|
-
en: 'Height'
|
|
110
|
-
},
|
|
111
|
-
controlConfig: {
|
|
112
|
-
id: 'height',
|
|
113
|
-
type: 'dropdown:input',
|
|
114
|
-
label: 'Height',
|
|
115
|
-
inputType: 'number',
|
|
116
|
-
units: [
|
|
117
|
-
'px'
|
|
118
|
-
],
|
|
119
|
-
hideUnit: false,
|
|
120
|
-
linkWithSetting: {
|
|
121
|
-
name: 'sizeSetting',
|
|
122
|
-
field: 'height'
|
|
123
|
-
},
|
|
124
|
-
displayOptions: [
|
|
125
|
-
{
|
|
126
|
-
label: 'Fit content',
|
|
127
|
-
value: 'Auto',
|
|
128
|
-
showValue: true
|
|
129
|
-
},
|
|
130
|
-
{
|
|
131
|
-
label: 'Fit screen',
|
|
132
|
-
value: '100vh',
|
|
133
|
-
showValue: true
|
|
134
|
-
}
|
|
135
|
-
]
|
|
44
|
+
setting: {
|
|
45
|
+
id: 'sizeSetting'
|
|
136
46
|
},
|
|
137
|
-
layout: '
|
|
47
|
+
layout: 'vertical'
|
|
138
48
|
}
|
|
139
49
|
]
|
|
140
50
|
},
|
|
@@ -182,15 +92,18 @@ const SettingUIV2 = [
|
|
|
182
92
|
label: {
|
|
183
93
|
en: 'Padding'
|
|
184
94
|
},
|
|
95
|
+
setting: {
|
|
96
|
+
id: 'contentPadding'
|
|
97
|
+
},
|
|
185
98
|
controlConfig: {
|
|
186
99
|
id: 'contentPadding',
|
|
187
100
|
type: 'padding-v2',
|
|
188
101
|
compoDefaultValue: {
|
|
189
102
|
default: {
|
|
190
|
-
top: '
|
|
191
|
-
right: '
|
|
192
|
-
bottom: '
|
|
193
|
-
left: '
|
|
103
|
+
top: '4px',
|
|
104
|
+
right: '16px',
|
|
105
|
+
bottom: '4px',
|
|
106
|
+
left: '16px',
|
|
194
107
|
linked: false
|
|
195
108
|
}
|
|
196
109
|
}
|
package/dist/esm/builder.js
CHANGED
|
@@ -153,7 +153,6 @@ import MobileMenu from './header/components/kind/basic/MobileMenu.js';
|
|
|
153
153
|
import DesktopMenu from './header/components/kind/basic/DesktopMenu.js';
|
|
154
154
|
import Icon from './icon/components/Icon.js';
|
|
155
155
|
import Image from './image/components/Image.js';
|
|
156
|
-
import BgImage from './image/components/BackgroundImage.js';
|
|
157
156
|
import ImageComparison from './image-comparison/components/ImageComparison.js';
|
|
158
157
|
import Input from './input/Input.js';
|
|
159
158
|
import Line from './line/Line.js';
|
|
@@ -177,7 +176,7 @@ import Product from './product/components/Product.js';
|
|
|
177
176
|
import ProductTitle from './product/components/ProductTitle/index.js';
|
|
178
177
|
import ProductQuantity from './product/components/ProductQuantity.js';
|
|
179
178
|
import ProductDescription from './product/components/ProductDescription/index.js';
|
|
180
|
-
import ProductPrice from './product/components/ProductPrice.js';
|
|
179
|
+
import ProductPrice from './product/components/ProductPrice/index.js';
|
|
181
180
|
import ProductButton from './product/components/ProductButton.js';
|
|
182
181
|
import ProductVariants from './product/components/ProductVariants/index.js';
|
|
183
182
|
import ProductImages from './product/components/ProductImages.js';
|
|
@@ -187,13 +186,13 @@ import QuickView from './product/components/ProductQuickView/index.js';
|
|
|
187
186
|
import ProductTag from './product/components/ProductTag.js';
|
|
188
187
|
import ProductList from './product/components/ProductList.js';
|
|
189
188
|
import DynamicCheckout from './product/components/DynamicCheckout/DynamicCheckout.js';
|
|
190
|
-
import ProductBundleDiscount from './product/components/ProductBundleDiscount.js';
|
|
191
|
-
import ProductBundleDiscountItem from './product/components/ProductBundleDiscountItem.js';
|
|
189
|
+
import ProductBundleDiscount from './product/components/ProductBundle/components/ProductBundleDiscount.js';
|
|
192
190
|
import ProductVendor from './product/components/Vendor.js';
|
|
193
191
|
import ProductSku from './product/components/Sku.js';
|
|
194
192
|
import ProductViewMore from './product/components/ProductViewMore.js';
|
|
195
193
|
import ProductBadge from './product/components/ProductBadge/index.js';
|
|
196
194
|
import FileUpload from './product/components/FileUpload/components/UploadFile.js';
|
|
195
|
+
import ProductBundleDiscountItem from './product/components/ProductBundle/components/ProductBundleDiscountItem.js';
|
|
197
196
|
import ArticleList from './article/components/ArticleList.js';
|
|
198
197
|
import ArticleTitle from './article/components/ArticleTitle.js';
|
|
199
198
|
import ArticleExcerpt from './article/components/ArticleExcerpt.js';
|
|
@@ -356,7 +355,6 @@ var builder = {
|
|
|
356
355
|
Icon,
|
|
357
356
|
Image,
|
|
358
357
|
ImageComparison,
|
|
359
|
-
BackgroundImage: BgImage,
|
|
360
358
|
Input,
|
|
361
359
|
Line,
|
|
362
360
|
Link,
|
|
@@ -2,8 +2,6 @@
|
|
|
2
2
|
import { jsx } from 'react/jsx-runtime';
|
|
3
3
|
import { useCartLine, cls } from '@gem-sdk/core';
|
|
4
4
|
import Image from '../../image/components/Image.js';
|
|
5
|
-
import 'next/image';
|
|
6
|
-
import 'react';
|
|
7
5
|
|
|
8
6
|
const CartLineImage = ({ className, style, setting = {}, styles = {}, builderProps })=>{
|
|
9
7
|
const line = useCartLine();
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { makeStyleResponsive, getStyleBackgroundByDevice } from '@gem-sdk/core';
|
|
2
|
+
|
|
3
|
+
const getCodeStyle = (style, setting, isLiquid)=>{
|
|
4
|
+
return {
|
|
5
|
+
...style,
|
|
6
|
+
...makeStyleResponsive('ta', setting?.align),
|
|
7
|
+
...getStyleBackgroundByDevice(setting?.background, {
|
|
8
|
+
liquid: isLiquid
|
|
9
|
+
})
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
export { getCodeStyle };
|