@gem-sdk/components 2.0.0-dev.277 → 2.0.0-dev.288
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/setting/config/callout-box/setting.js +4 -10
- 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/hooks/product-image/useListCarousel.js +1 -1
- package/dist/cjs/post-purchase/product/hooks/product-image/useProductImagePostPurchase.js +4 -1
- package/dist/cjs/post-purchase/product/settings/product-image/setting-v2.js +20 -7
- package/dist/cjs/post-purchase/product/settings/product-image/uiV2.js +3 -1
- 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/post-purchase/utils/constants.js +1 -1
- package/dist/cjs/product/components/FileUpload/components/common/index.js +3 -0
- 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/setting/config/callout-box/setting.js +4 -10
- 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/hooks/product-image/useListCarousel.js +1 -1
- package/dist/esm/post-purchase/product/hooks/product-image/useProductImagePostPurchase.js +4 -1
- package/dist/esm/post-purchase/product/settings/product-image/setting-v2.js +20 -7
- package/dist/esm/post-purchase/product/settings/product-image/uiV2.js +3 -1
- 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/post-purchase/utils/constants.js +1 -1
- package/dist/esm/product/components/FileUpload/components/common/index.js +3 -0
- 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 +173 -256
- 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
|
@@ -3,11 +3,11 @@ import { jsxs, jsx } from 'react/jsx-runtime';
|
|
|
3
3
|
import { makeStyleResponsive } from '@gem-sdk/core';
|
|
4
4
|
import 'react';
|
|
5
5
|
import '@gem-sdk/system';
|
|
6
|
+
import 'next/link';
|
|
6
7
|
import Cart from '../../../../cart/components/Cart.js';
|
|
7
8
|
import 'next/head';
|
|
8
9
|
import 'next/image';
|
|
9
10
|
import 'react-youtube';
|
|
10
|
-
import 'next/link';
|
|
11
11
|
import '../../../../image/components/AdaptiveImage.js';
|
|
12
12
|
import '../../../../cart/components/ShopPayButton/ShopPayButton.js';
|
|
13
13
|
|
package/dist/esm/helpers.js
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import Link from './link/components/Link.js';
|
|
2
|
+
|
|
1
3
|
const isTransparentColor = (str)=>{
|
|
2
4
|
if (!str) return false;
|
|
3
5
|
if (str.startsWith('#')) {
|
|
@@ -108,6 +110,52 @@ const getInsertLinkData = (defaultWrap, setting, htmlType)=>{
|
|
|
108
110
|
shouldRenderLink
|
|
109
111
|
};
|
|
110
112
|
};
|
|
113
|
+
const getLinkData = ({ setting, htmlType, defaultWrap, isLiquid = false, enableImageLink = false })=>{
|
|
114
|
+
const URL_INCLUDES = [
|
|
115
|
+
'product.url'
|
|
116
|
+
];
|
|
117
|
+
const URL_START_WITH = [
|
|
118
|
+
'#',
|
|
119
|
+
'mailto:',
|
|
120
|
+
'tel:'
|
|
121
|
+
];
|
|
122
|
+
const urlHref = setting?.link ?? '';
|
|
123
|
+
const isHomePageHref = urlHref === '/';
|
|
124
|
+
const isHyperlink = setting?.link !== undefined && setting.link !== '';
|
|
125
|
+
const regexHttp = new RegExp(/^https?:\/\//i);
|
|
126
|
+
const isDomain = isHyperlink && regexHttp.test(urlHref);
|
|
127
|
+
const regexPageType = new RegExp(/^\/?(?:collections|pages|products|blogs|checkout|cart)\/?/i);
|
|
128
|
+
const isShopifyDomain = isHyperlink && !regexHttp.test(urlHref) && regexPageType.test(urlHref);
|
|
129
|
+
const isLink = ()=>{
|
|
130
|
+
if (URL_INCLUDES.find((el)=>urlHref.includes(el))) return true;
|
|
131
|
+
if (URL_START_WITH.find((el)=>urlHref.startsWith(el))) return true;
|
|
132
|
+
return false;
|
|
133
|
+
};
|
|
134
|
+
const shouldRenderLink = enableImageLink && (isDomain || isShopifyDomain || isLink() || isHomePageHref);
|
|
135
|
+
let transformedUrl = urlHref;
|
|
136
|
+
if (isLiquid && (isShopifyDomain || isHomePageHref)) {
|
|
137
|
+
transformedUrl = setting?.isTranslate ? '$locationOrigin' + urlHref : "{{ request.origin }}{{ routes.root_url | split: '/' | join: '/' }}" + urlHref;
|
|
138
|
+
}
|
|
139
|
+
const Wrapper = shouldRenderLink ? isLiquid ? 'a' : Link : defaultWrap;
|
|
140
|
+
const baseUrlData = {
|
|
141
|
+
href: transformedUrl,
|
|
142
|
+
target: setting?.target,
|
|
143
|
+
...setting?.noFollow && {
|
|
144
|
+
rel: 'nofollow'
|
|
145
|
+
}
|
|
146
|
+
};
|
|
147
|
+
const urlData = shouldRenderLink ? baseUrlData : isHyperlink ? {
|
|
148
|
+
...baseUrlData,
|
|
149
|
+
type: htmlType
|
|
150
|
+
} : {
|
|
151
|
+
type: htmlType
|
|
152
|
+
};
|
|
153
|
+
return {
|
|
154
|
+
Wrapper,
|
|
155
|
+
urlData,
|
|
156
|
+
shouldRenderLink
|
|
157
|
+
};
|
|
158
|
+
};
|
|
111
159
|
const replaceLinkData = (text, isTranslate)=>{
|
|
112
160
|
const regex = /<a\s[^>]*>.*?<\/a>/;
|
|
113
161
|
if (text && regex.test(text)) {
|
|
@@ -130,5 +178,8 @@ const replaceLinkData = (text, isTranslate)=>{
|
|
|
130
178
|
function filterTruthyStyles(styles) {
|
|
131
179
|
return Object.fromEntries(Object.entries(styles || {}).filter(([, value])=>!!value));
|
|
132
180
|
}
|
|
181
|
+
function filterTruthyObject(obj) {
|
|
182
|
+
return Object.fromEntries(Object.entries(obj || {}).filter(([, value])=>!!value));
|
|
183
|
+
}
|
|
133
184
|
|
|
134
|
-
export { filterTruthyStyles, getDynamicSourceLocales, getInsertLinkData, getSettingPreloadData, getStaticLocale, isHexTransparent, isTransparentColor, isTransparentRGBA, replaceLinkData, youtubeShortsRegex };
|
|
185
|
+
export { filterTruthyObject, filterTruthyStyles, getDynamicSourceLocales, getInsertLinkData, getLinkData, getSettingPreloadData, getStaticLocale, isHexTransparent, isTransparentColor, isTransparentRGBA, replaceLinkData, youtubeShortsRegex };
|
|
@@ -224,21 +224,21 @@ const IconListSettings = [
|
|
|
224
224
|
},
|
|
225
225
|
{
|
|
226
226
|
id: 'position',
|
|
227
|
-
type: '
|
|
228
|
-
iconViewBox: '0 0 66 48',
|
|
229
|
-
enableItemBackground: true,
|
|
227
|
+
type: 'option:illustration',
|
|
230
228
|
enableTooltip: true,
|
|
231
229
|
label: 'Position',
|
|
232
230
|
options: [
|
|
233
231
|
{
|
|
234
232
|
label: 'Align center',
|
|
235
233
|
value: 'center',
|
|
236
|
-
type: 'align-pos'
|
|
234
|
+
type: 'align-pos',
|
|
235
|
+
svgName: 'gp-align-position-center'
|
|
237
236
|
},
|
|
238
237
|
{
|
|
239
238
|
label: 'Align top',
|
|
240
239
|
value: 'baseline',
|
|
241
|
-
type: 'align-pos'
|
|
240
|
+
type: 'align-pos',
|
|
241
|
+
svgName: 'gp-align-position-top'
|
|
242
242
|
}
|
|
243
243
|
],
|
|
244
244
|
devices: {
|
|
@@ -1,55 +1,69 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
2
|
+
import { jsx, Fragment, jsxs } from 'react/jsx-runtime';
|
|
3
|
+
import { IMAGE_PLACEHOLDER } from './common/constants.js';
|
|
4
|
+
import { createAttr, createStyle, createClass } from '@gem-sdk/system';
|
|
5
|
+
import { getLoadingAdaptiveImageAttrs } from './common/attributes.js';
|
|
6
|
+
import { getAdaptiveImageClasses } from './common/classes.js';
|
|
7
|
+
import { getAdaptiveImageData } from './common/data.js';
|
|
8
|
+
import { getAdaptivePictureStyles, getAdaptiveImageStyles } from './common/styles.js';
|
|
6
9
|
|
|
7
|
-
const AdaptiveImage = (
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
10
|
+
const AdaptiveImage = (props)=>{
|
|
11
|
+
const { alt, style, srcSet, layout, priority, className, aspectRatio, borderRadius, pictureClass, enableLazyloadImage, ...restProps } = props;
|
|
12
|
+
const { getDeviceSource } = getAdaptiveImageData(props);
|
|
13
|
+
const { srcDesktop, srcTablet, srcMobile } = getDeviceSource();
|
|
14
|
+
const loadingAttrs = createAttr(getLoadingAdaptiveImageAttrs({
|
|
15
|
+
srcDesktop,
|
|
16
|
+
enableLazyLoadImage: enableLazyloadImage
|
|
17
|
+
}));
|
|
18
|
+
const pictureStyle = createStyle({
|
|
19
|
+
...getAdaptivePictureStyles()
|
|
20
|
+
});
|
|
21
|
+
const adaptiveImageStyles = createStyle({
|
|
22
|
+
...getAdaptiveImageStyles({
|
|
23
|
+
layout,
|
|
24
|
+
aspectRatio,
|
|
25
|
+
borderRadius
|
|
26
|
+
}),
|
|
27
|
+
...style
|
|
28
|
+
});
|
|
29
|
+
const adaptiveImageClasses = createClass({
|
|
30
|
+
...getAdaptiveImageClasses({
|
|
31
|
+
className,
|
|
32
|
+
hasLazyLoad: enableLazyloadImage
|
|
33
|
+
})
|
|
34
|
+
});
|
|
35
|
+
const renderSource = ()=>{
|
|
36
|
+
return /*#__PURE__*/ jsxs(Fragment, {
|
|
37
|
+
children: [
|
|
38
|
+
srcMobile && /*#__PURE__*/ jsx("source", {
|
|
39
|
+
media: "(max-width: 767px)",
|
|
40
|
+
srcSet: enableLazyloadImage ? IMAGE_PLACEHOLDER : srcMobile
|
|
41
|
+
}),
|
|
42
|
+
srcTablet && /*#__PURE__*/ jsx("source", {
|
|
43
|
+
media: "(max-width: 1024px)",
|
|
44
|
+
srcSet: enableLazyloadImage ? IMAGE_PLACEHOLDER : srcTablet
|
|
45
|
+
})
|
|
46
|
+
]
|
|
47
|
+
});
|
|
48
|
+
};
|
|
49
|
+
const renderImage = ()=>{
|
|
50
|
+
return /*#__PURE__*/ jsx("img", {
|
|
51
|
+
...restProps,
|
|
52
|
+
...loadingAttrs,
|
|
53
|
+
alt: alt,
|
|
54
|
+
style: adaptiveImageStyles,
|
|
55
|
+
className: adaptiveImageClasses
|
|
56
|
+
});
|
|
57
|
+
};
|
|
58
|
+
return /*#__PURE__*/ jsx(Fragment, {
|
|
59
|
+
children: /*#__PURE__*/ jsxs("picture", {
|
|
60
|
+
style: pictureStyle,
|
|
61
|
+
className: pictureClass,
|
|
62
|
+
children: [
|
|
63
|
+
renderSource(),
|
|
64
|
+
renderImage()
|
|
65
|
+
]
|
|
66
|
+
})
|
|
53
67
|
});
|
|
54
68
|
};
|
|
55
69
|
AdaptiveImage.defaultProps = {
|
|
@@ -1,54 +1,66 @@
|
|
|
1
|
-
import { template
|
|
2
|
-
import {
|
|
1
|
+
import { template } from '@gem-sdk/core';
|
|
2
|
+
import { createAttr, createStyle, createClass } from '@gem-sdk/system';
|
|
3
|
+
import { getLoadingAdaptiveImageAttrs } from './common/attributes.js';
|
|
4
|
+
import { getAdaptiveImageClasses } from './common/classes.js';
|
|
5
|
+
import { IMAGE_PLACEHOLDER } from './common/constants.js';
|
|
6
|
+
import { getAdaptiveImageData } from './common/data.js';
|
|
7
|
+
import { getAdaptivePictureStyles, getAdaptiveImageStyles } from './common/styles.js';
|
|
3
8
|
|
|
4
|
-
const AdaptiveImage = (
|
|
5
|
-
const
|
|
6
|
-
const
|
|
7
|
-
const
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
style="${{
|
|
24
|
-
...makeStyleResponsive('aspect', aspectRatio),
|
|
25
|
-
...makeStyleResponsive('objf', layout),
|
|
9
|
+
const AdaptiveImage = (props)=>{
|
|
10
|
+
const { alt, style, layout, srcSet, priority, className, aspectRatio, pageContext, pictureClass, borderRadius, enableLazyLoadImage = true, ...restProps } = props;
|
|
11
|
+
const { getDeviceSource } = getAdaptiveImageData(props);
|
|
12
|
+
const { srcDesktop, srcTablet, srcMobile } = getDeviceSource({
|
|
13
|
+
isLiquid: true
|
|
14
|
+
});
|
|
15
|
+
const loadingAttrs = createAttr(getLoadingAdaptiveImageAttrs({
|
|
16
|
+
srcDesktop,
|
|
17
|
+
enableLazyLoadImage
|
|
18
|
+
}));
|
|
19
|
+
const pictureStyle = createStyle({
|
|
20
|
+
...getAdaptivePictureStyles()
|
|
21
|
+
});
|
|
22
|
+
const adaptiveImageStyles = createStyle({
|
|
23
|
+
...getAdaptiveImageStyles({
|
|
24
|
+
layout,
|
|
25
|
+
aspectRatio,
|
|
26
|
+
borderRadius
|
|
27
|
+
}),
|
|
26
28
|
...style
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
29
|
+
});
|
|
30
|
+
const adaptiveImageClasses = createClass({
|
|
31
|
+
...getAdaptiveImageClasses({
|
|
32
|
+
className,
|
|
33
|
+
hasLazyLoad: enableLazyLoadImage,
|
|
34
|
+
hasForceLoad: pageContext?.isOptimizePlan
|
|
35
|
+
})
|
|
36
|
+
});
|
|
37
|
+
const renderSource = ()=>{
|
|
38
|
+
return `
|
|
39
|
+
${srcMobile ? `<source media="(max-width: 767px)" srcset="${enableLazyLoadImage ? IMAGE_PLACEHOLDER : srcMobile}" />` : ``}
|
|
40
|
+
${srcTablet ? `<source media="(max-width: 1024px)" srcset="${enableLazyLoadImage ? IMAGE_PLACEHOLDER : srcTablet}" />` : ``}
|
|
41
|
+
`;
|
|
42
|
+
};
|
|
43
|
+
const renderImage = ()=>{
|
|
44
|
+
return `
|
|
32
45
|
<img
|
|
33
46
|
${{
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
})}"
|
|
40
|
-
src="${enableLazyLoadImage ? imagePlaceholder : srcDesktop}"
|
|
41
|
-
data-src="${srcDesktop}"
|
|
42
|
-
width="100%"
|
|
47
|
+
...restProps
|
|
48
|
+
}}
|
|
49
|
+
${{
|
|
50
|
+
...loadingAttrs
|
|
51
|
+
}}
|
|
43
52
|
alt="${alt}"
|
|
44
|
-
style="${
|
|
45
|
-
|
|
46
|
-
...makeStyleResponsive('objf', layout),
|
|
47
|
-
...style
|
|
48
|
-
}}"
|
|
53
|
+
style="${adaptiveImageStyles}"
|
|
54
|
+
class="${adaptiveImageClasses}"
|
|
49
55
|
/>
|
|
50
|
-
|
|
51
|
-
|
|
56
|
+
`;
|
|
57
|
+
};
|
|
58
|
+
return template`
|
|
59
|
+
<picture style="${pictureStyle}" class="${pictureClass}">
|
|
60
|
+
${renderSource()}
|
|
61
|
+
${renderImage()}
|
|
62
|
+
</picture>
|
|
63
|
+
`;
|
|
52
64
|
};
|
|
53
65
|
|
|
54
66
|
export { AdaptiveImage as default };
|
|
@@ -1,168 +1,79 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
3
|
-
import {
|
|
4
|
-
import Link from '../../link/components/Link.js';
|
|
2
|
+
import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
3
|
+
import { createStyle, createClass, createAttr, If } from '@gem-sdk/system';
|
|
5
4
|
import AdaptiveImage from './AdaptiveImage.js';
|
|
6
5
|
import NextImage from './NextImage.js';
|
|
7
|
-
import { composeAspectRatio } from './helpers.js';
|
|
8
6
|
import NoDataImage from './NoDataImage.js';
|
|
9
|
-
import {
|
|
7
|
+
import { getWrapperStyles, getNoDataImageStyles, getImageStyles, getContainerStyles } from './common/styles.js';
|
|
8
|
+
import { getWrapperClasses, getImageClasses, getContainerClasses } from './common/classes.js';
|
|
9
|
+
import { getContainerAttrs, getAdaptiveImageAttrs, getNextImageAttrs, getLinkWrapperAttrs } from './common/attributes.js';
|
|
10
|
+
import { getLinkData } from '../../helpers.js';
|
|
11
|
+
import { useCheckNoImage } from './hooks/useCheckNoImage.js';
|
|
10
12
|
|
|
11
|
-
const Image = ({
|
|
12
|
-
const {
|
|
13
|
-
const {
|
|
14
|
-
const
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
const
|
|
24
|
-
const
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
13
|
+
const Image = ({ style, styles, setting, children, advanced, className, builderAttrs, builderProps, onLoad, onClick })=>{
|
|
14
|
+
const { imageLink, isAdaptive, enableImageLink } = setting ?? {};
|
|
15
|
+
const { isShowNoDataState } = useCheckNoImage(setting);
|
|
16
|
+
const { Wrapper: HTMLTag, urlData } = getLinkData({
|
|
17
|
+
defaultWrap: 'div',
|
|
18
|
+
setting: imageLink,
|
|
19
|
+
enableImageLink
|
|
20
|
+
});
|
|
21
|
+
console.log('image', {
|
|
22
|
+
setting,
|
|
23
|
+
styles
|
|
24
|
+
});
|
|
25
|
+
const wrapperStyles = createStyle(getWrapperStyles(styles));
|
|
26
|
+
const noDataImageStyles = createStyle(getNoDataImageStyles(styles));
|
|
27
|
+
const imageStyles = createStyle(getImageStyles(styles, builderProps));
|
|
28
|
+
const containerStyles = createStyle(getContainerStyles(style, styles));
|
|
29
|
+
const wrapperClasses = createClass(getWrapperClasses());
|
|
30
|
+
const imageClasses = createClass(getImageClasses(className, styles));
|
|
31
|
+
const containerClasses = createClass(getContainerClasses(builderProps?.uid, advanced?.cssClass));
|
|
32
|
+
const containerAttrs = createAttr(getContainerAttrs(builderAttrs, builderProps?.uid));
|
|
33
|
+
const linkWrapperAttrs = getLinkWrapperAttrs({
|
|
34
|
+
urlData,
|
|
35
|
+
imageLink,
|
|
36
|
+
title: setting?.title
|
|
37
|
+
});
|
|
38
|
+
const adaptiveImageAttrs = getAdaptiveImageAttrs({
|
|
39
|
+
styles,
|
|
40
|
+
setting
|
|
41
|
+
});
|
|
42
|
+
const nextImageAttrs = getNextImageAttrs({
|
|
43
|
+
styles,
|
|
44
|
+
setting
|
|
45
|
+
});
|
|
46
|
+
const Image = ()=>{
|
|
47
|
+
return /*#__PURE__*/ jsx(Fragment, {
|
|
48
|
+
children: If(isAdaptive, /*#__PURE__*/ jsx(AdaptiveImage, {
|
|
49
|
+
...adaptiveImageAttrs,
|
|
50
|
+
style: imageStyles,
|
|
51
|
+
className: imageClasses
|
|
52
|
+
}), /*#__PURE__*/ jsx(NextImage, {
|
|
53
|
+
...nextImageAttrs,
|
|
54
|
+
style: imageStyles,
|
|
55
|
+
className: imageClasses,
|
|
56
|
+
onLoad: onLoad
|
|
57
|
+
}))
|
|
58
|
+
});
|
|
38
59
|
};
|
|
39
|
-
const
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
auto: setting?.isAdaptive ? srcSet?.desktop : image,
|
|
44
|
-
custom: customAspectRadio
|
|
45
|
-
}),
|
|
46
|
-
tablet: composeAspectRatio({
|
|
47
|
-
device: 'tablet',
|
|
48
|
-
aspect: styles?.aspectRatio,
|
|
49
|
-
auto: setting?.isAdaptive ? srcSet?.tablet : image,
|
|
50
|
-
custom: customAspectRadio
|
|
51
|
-
}),
|
|
52
|
-
mobile: composeAspectRatio({
|
|
53
|
-
device: 'mobile',
|
|
54
|
-
aspect: styles?.aspectRatio,
|
|
55
|
-
auto: setting?.isAdaptive ? srcSet?.mobile : image,
|
|
56
|
-
custom: customAspectRadio
|
|
57
|
-
})
|
|
60
|
+
const renderImage = ()=>{
|
|
61
|
+
return If(isShowNoDataState, /*#__PURE__*/ jsx(NoDataImage, {
|
|
62
|
+
style: noDataImageStyles
|
|
63
|
+
}), /*#__PURE__*/ jsx(Image, {}));
|
|
58
64
|
};
|
|
59
|
-
const isShowNoDataState = useMemo(()=>{
|
|
60
|
-
if (setting?.disableNoDataState) return false;
|
|
61
|
-
if (currentDevice === 'mobile') return !setting?.srcSet?.mobile?.src && !setting?.srcSet?.tablet?.src && !setting?.srcSet?.desktop?.src;
|
|
62
|
-
if (currentDevice === 'tablet') return !setting?.srcSet?.tablet?.src && !setting?.srcSet?.desktop?.src;
|
|
63
|
-
return !setting?.srcSet?.desktop?.src;
|
|
64
|
-
}, [
|
|
65
|
-
currentDevice,
|
|
66
|
-
setting?.disableNoDataState,
|
|
67
|
-
setting?.srcSet?.desktop?.src,
|
|
68
|
-
setting?.srcSet?.mobile?.src,
|
|
69
|
-
setting?.srcSet?.tablet?.src
|
|
70
|
-
]);
|
|
71
65
|
return /*#__PURE__*/ jsxs("div", {
|
|
72
|
-
...builderAttrs,
|
|
73
|
-
"data-id": builderProps?.uid,
|
|
74
|
-
onClick: onClick,
|
|
75
66
|
role: "presentation",
|
|
76
|
-
|
|
77
|
-
style:
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
},
|
|
67
|
+
...containerAttrs,
|
|
68
|
+
style: containerStyles,
|
|
69
|
+
className: containerClasses,
|
|
70
|
+
onClick: onClick,
|
|
81
71
|
children: [
|
|
82
|
-
/*#__PURE__*/
|
|
83
|
-
...
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
target: imageLink?.target,
|
|
88
|
-
noFollow: imageLink?.noFollow
|
|
89
|
-
},
|
|
90
|
-
title: setting?.title
|
|
91
|
-
} : {},
|
|
92
|
-
className: "gp-h-full gp-w-full gp-flex",
|
|
93
|
-
style: {
|
|
94
|
-
// ...getStyleShadowState(styles?.boxShadowImg, 'box-shadow', styles?.hasBoxShadowImg),
|
|
95
|
-
borderRadius: 'inherit',
|
|
96
|
-
overflow: 'hidden',
|
|
97
|
-
...makeStyleResponsive('jc', styles?.align)
|
|
98
|
-
},
|
|
99
|
-
children: [
|
|
100
|
-
isShowNoDataState ? /*#__PURE__*/ jsx(NoDataImage, {
|
|
101
|
-
style: {
|
|
102
|
-
...imageWidth,
|
|
103
|
-
...imageHeight
|
|
104
|
-
}
|
|
105
|
-
}) : setting?.isAdaptive ? /*#__PURE__*/ jsx(AdaptiveImage, {
|
|
106
|
-
srcSet: setting.srcSet,
|
|
107
|
-
pictureClass: "gp-contents",
|
|
108
|
-
className: cls(className, 'gp-inline-block gp-w-full gp-max-w-full', handleConvertClassColor(styles?.borderImg)),
|
|
109
|
-
alt: setting.alt,
|
|
110
|
-
style: {
|
|
111
|
-
...imageWidth,
|
|
112
|
-
...imageHeight,
|
|
113
|
-
// ...handleConvertBorderStyle(styles?.borderImg),
|
|
114
|
-
// ...handleConvertBorderWidth(styles?.borderImg),
|
|
115
|
-
// ...handleConvertBorderColor(styles?.borderImg),
|
|
116
|
-
...overwriteDefaultRadius(builderProps?.builderData?.advanced?.rounded),
|
|
117
|
-
...getBorderStyle(styles?.wrapperBorder),
|
|
118
|
-
...getBorderRadiusStyle(styles?.borderRadius),
|
|
119
|
-
...getStyleShadow({
|
|
120
|
-
value: styles?.shadow,
|
|
121
|
-
styleAppliedFor: 'box-shadow',
|
|
122
|
-
isEnableShadow: styles?.shadow?.type !== 'none'
|
|
123
|
-
})
|
|
124
|
-
},
|
|
125
|
-
aspectRatio: shape ? getAspectRatioGlobalSize(styles?.shape) : aspectRatio,
|
|
126
|
-
layout: styles?.objectFit,
|
|
127
|
-
priority: setting?.priority
|
|
128
|
-
}) : /*#__PURE__*/ jsx(NextImage, {
|
|
129
|
-
...setting?.image,
|
|
130
|
-
priority: setting?.priority,
|
|
131
|
-
quality: setting?.quality,
|
|
132
|
-
isNotLazyload: isNotLazyload,
|
|
133
|
-
className: cls(className, 'gp-inline gp-h-full gp-max-w-full', handleConvertClassColor(styles?.borderImg)),
|
|
134
|
-
onLoad: onLoad,
|
|
135
|
-
style: {
|
|
136
|
-
...imageWidth,
|
|
137
|
-
...imageHeight,
|
|
138
|
-
// ...handleConvertBorderStyle(styles?.borderImg),
|
|
139
|
-
// ...handleConvertBorderWidth(styles?.borderImg),
|
|
140
|
-
// ...handleConvertBorderColor(styles?.borderImg),
|
|
141
|
-
...overwriteDefaultRadius(builderProps?.builderData?.advanced?.rounded),
|
|
142
|
-
...getBorderStyle(styles?.wrapperBorder),
|
|
143
|
-
...getBorderRadiusStyle(styles?.borderRadius),
|
|
144
|
-
...getStyleShadow({
|
|
145
|
-
value: styles?.shadow,
|
|
146
|
-
styleAppliedFor: 'box-shadow',
|
|
147
|
-
isEnableShadow: styles?.shadow?.type !== 'none'
|
|
148
|
-
})
|
|
149
|
-
},
|
|
150
|
-
alt: setting?.alt,
|
|
151
|
-
title: setting?.title,
|
|
152
|
-
vw: setting?.vw,
|
|
153
|
-
setting: {
|
|
154
|
-
aspectRatio: shape ? getAspectRatioGlobalSize(styles?.shape) : aspectRatio,
|
|
155
|
-
layout: styles?.objectFit
|
|
156
|
-
}
|
|
157
|
-
}),
|
|
158
|
-
/*#__PURE__*/ jsx("div", {
|
|
159
|
-
className: cls('gp-absolute gp-inset-0 gp-transition-all gp-duration-300 group-hover/image:gp-bg-[color:var(--hvr-bgc,_var(--bgc))] group-hover/image:gp-opacity-[var(--hvr-op,_var(--op))]', getGlobalColorStateClass('bg', styles?.opacityColor)),
|
|
160
|
-
style: {
|
|
161
|
-
...getGlobalColorStateStyle('bgc', styles?.opacityColor),
|
|
162
|
-
...makeStyleState('op', opacity)
|
|
163
|
-
}
|
|
164
|
-
})
|
|
165
|
-
]
|
|
72
|
+
/*#__PURE__*/ jsx(HTMLTag, {
|
|
73
|
+
...linkWrapperAttrs,
|
|
74
|
+
style: wrapperStyles,
|
|
75
|
+
className: wrapperClasses,
|
|
76
|
+
children: renderImage()
|
|
166
77
|
}),
|
|
167
78
|
children
|
|
168
79
|
]
|