@gem-sdk/components 2.0.0-dev.278 → 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/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/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/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
|
@@ -1,109 +1,85 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { makeStyleResponsive, template, WrapRenderChildren, RenderChildren, RenderIf, isLocalEnv, baseAssetURL } from '@gem-sdk/core';
|
|
2
2
|
import { getDynamicSourceLocales, getSettingPreloadData } from '../../helpers.js';
|
|
3
|
+
import { createStateOrContext, createClass, createStyle, createAttr } from '@gem-sdk/system';
|
|
4
|
+
import { getDataState } from './common/index.js';
|
|
5
|
+
import { getContainerStyles } from './common/styles.js';
|
|
6
|
+
import { getContainerClasses, extendClasses } from './common/classes.js';
|
|
3
7
|
|
|
4
|
-
const Accordion = ({ rawChildren, setting, styles, builderProps, pageContext, advanced })=>{
|
|
5
|
-
const {
|
|
6
|
-
const {
|
|
7
|
-
const
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
const
|
|
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
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
itemHeaderSpacing,
|
|
61
|
-
textColor,
|
|
62
|
-
iconColor,
|
|
63
|
-
contentSizePadding,
|
|
64
|
-
headerContentPadding,
|
|
65
|
-
widthHeightSize
|
|
66
|
-
},
|
|
67
|
-
uid: builderProps?.uid
|
|
68
|
-
}).replaceAll("'", ''')}'
|
|
69
|
-
>
|
|
70
|
-
<div class="gp-hidden gp-rotate-90 -gp-rotate-90 gp-rotate-180"></div>
|
|
71
|
-
${WrapRenderChildren({
|
|
72
|
-
uid: builderProps?.uid || '',
|
|
73
|
-
customProps: rawChildren?.[0].customProps
|
|
74
|
-
}, rawChildren?.map((child, index)=>{
|
|
75
|
-
if (child) {
|
|
76
|
-
const title = getDynamicSourceLocales({
|
|
77
|
-
val: childItem?.[index],
|
|
78
|
-
uid: builderProps?.uid,
|
|
79
|
-
settingId: `childItem_${index}`,
|
|
80
|
-
pageContext,
|
|
81
|
-
isCapitalize: setting?.titleTypo?.attrs?.transform === 'capitalize',
|
|
82
|
-
translate
|
|
83
|
-
});
|
|
84
|
-
return template`<div
|
|
85
|
-
class="gp-flex"
|
|
86
|
-
style="${{
|
|
87
|
-
...makeStyleResponsive('jc', align)
|
|
88
|
-
}}"
|
|
89
|
-
>
|
|
90
|
-
${RenderChildren({
|
|
91
|
-
...child,
|
|
92
|
-
index: index,
|
|
93
|
-
title: title,
|
|
94
|
-
accordions: accordions,
|
|
95
|
-
parentSetting: setting,
|
|
96
|
-
parentStyle: styles,
|
|
97
|
-
parentUid: builderProps?.uid,
|
|
98
|
-
childrenIcon: setting?.childConfig?.[index],
|
|
99
|
-
activeKey: activeKey
|
|
100
|
-
})}
|
|
101
|
-
</div>
|
|
8
|
+
const Accordion = ({ rawChildren, setting, styles, builderProps, pageContext, advanced, style, builderAttrs })=>{
|
|
9
|
+
const { align } = styles ?? {};
|
|
10
|
+
const { translate, childItem, activeKey } = setting ?? {};
|
|
11
|
+
const { uidState, settingState, stylesState, accordions } = getDataState({
|
|
12
|
+
setting,
|
|
13
|
+
styles,
|
|
14
|
+
builderProps
|
|
15
|
+
}, rawChildren);
|
|
16
|
+
const createDataState = createStateOrContext({
|
|
17
|
+
uid: uidState,
|
|
18
|
+
setting: settingState,
|
|
19
|
+
styles: stylesState
|
|
20
|
+
});
|
|
21
|
+
const createContainerClasses = createClass(getContainerClasses(advanced?.cssClass));
|
|
22
|
+
const createContainerStyles = createStyle({
|
|
23
|
+
...getContainerStyles(style, styles)
|
|
24
|
+
});
|
|
25
|
+
const createContainerAttr = createAttr({
|
|
26
|
+
...builderAttrs,
|
|
27
|
+
'data-id': builderProps?.uid ?? ''
|
|
28
|
+
});
|
|
29
|
+
const createChildrenContainerStyles = createStyle({
|
|
30
|
+
...makeStyleResponsive('jc', align)
|
|
31
|
+
});
|
|
32
|
+
const createChildrenContainerClasses = createClass({
|
|
33
|
+
'gp-flex': true
|
|
34
|
+
});
|
|
35
|
+
const createExtendClasses = createClass(extendClasses());
|
|
36
|
+
const composeChildren = ()=>{
|
|
37
|
+
return WrapRenderChildren({
|
|
38
|
+
uid: builderProps?.uid ?? '',
|
|
39
|
+
customProps: rawChildren?.[0].customProps
|
|
40
|
+
}, rawChildren?.map((child, index)=>{
|
|
41
|
+
if (child) {
|
|
42
|
+
const title = getDynamicSourceLocales({
|
|
43
|
+
val: childItem?.[index],
|
|
44
|
+
uid: builderProps?.uid,
|
|
45
|
+
settingId: `childItem_${index}`,
|
|
46
|
+
pageContext,
|
|
47
|
+
isCapitalize: setting?.titleTypo?.attrs?.transform === 'capitalize',
|
|
48
|
+
translate
|
|
49
|
+
});
|
|
50
|
+
return template`
|
|
51
|
+
<div class="${createChildrenContainerClasses}" style="${createChildrenContainerStyles}">
|
|
52
|
+
${RenderChildren({
|
|
53
|
+
...child,
|
|
54
|
+
index: index,
|
|
55
|
+
title: title,
|
|
56
|
+
accordions: accordions,
|
|
57
|
+
parentSetting: setting,
|
|
58
|
+
parentStyle: styles,
|
|
59
|
+
parentUid: builderProps?.uid,
|
|
60
|
+
childrenIcon: setting?.childConfig?.[index],
|
|
61
|
+
activeKey: activeKey
|
|
62
|
+
})}
|
|
63
|
+
</div>
|
|
102
64
|
`;
|
|
103
|
-
|
|
104
|
-
|
|
65
|
+
}
|
|
66
|
+
}));
|
|
67
|
+
};
|
|
68
|
+
const renderScript = ()=>{
|
|
69
|
+
return RenderIf(isLocalEnv, `
|
|
70
|
+
<script ${getSettingPreloadData('class="gps-link" delay', 'src')}="{{ 'gp-accordion.js' | asset_url }}"
|
|
71
|
+
defer="defer"></script>`, `
|
|
72
|
+
<script ${getSettingPreloadData('class="gps-link" delay', 'src')}="${baseAssetURL}/assets-v2/gp-accordion.js?v={{ shop.metafields.GEMPAGES.ASSETS_VERSION }}" defer="defer"></script>
|
|
73
|
+
`);
|
|
74
|
+
};
|
|
75
|
+
return template`
|
|
76
|
+
<gp-accordion ${createContainerAttr} class="${createContainerClasses}" style="${createContainerStyles}"
|
|
77
|
+
gp-data='${JSON.stringify(createDataState).replaceAll("'", ''')}'
|
|
78
|
+
>
|
|
79
|
+
<div class=" ${createExtendClasses}"></div>
|
|
80
|
+
${composeChildren()}
|
|
105
81
|
</gp-accordion>
|
|
106
|
-
${
|
|
82
|
+
${renderScript()}
|
|
107
83
|
`;
|
|
108
84
|
};
|
|
109
85
|
|
|
@@ -1,305 +1,153 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
3
|
+
import { useMemo, Children } from 'react';
|
|
4
|
+
import { composeClasses } from '@gem-sdk/core';
|
|
5
5
|
import ChildrenDroppable from '../../grid/components/ChildrenDroppable.js';
|
|
6
6
|
import Text from '../../text/components/Text.js';
|
|
7
|
-
import
|
|
8
|
-
import
|
|
7
|
+
import useAccordionItem from '../hooks/useAccordionItem.js';
|
|
8
|
+
import { createClass, createStyle, If } from '@gem-sdk/system';
|
|
9
|
+
import { getItemContainerStyles, getDropdownStyles, getIconRotateStyles, getIconGlobalSize, getGapStyles, getLayoutTextStyles, getRenderChildrenStyles } from './common/styles.js';
|
|
10
|
+
import { getItemContainerClasses, getDropdownClasses, getIconClasses, getIconRotateClasses, getContentClasses, getGapClasses, getLayoutTextClasses, getRenderChildrenClasses } from './common/classes.js';
|
|
11
|
+
import { getParentSettings, MINIMUM_CHILD, BODY_CHILD_INDEX, DEFAULT_BEFORE_ICON, DEFAULT_AFTER_ICON } from './common/index.js';
|
|
9
12
|
|
|
10
|
-
const
|
|
11
|
-
const
|
|
12
|
-
const
|
|
13
|
-
const {
|
|
14
|
-
|
|
15
|
-
const
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
const
|
|
22
|
-
const
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
const hasTransitionedIn = useMountTransition(isMounted || false, 500);
|
|
26
|
-
useEffect(()=>{
|
|
27
|
-
setIsMounted(isShow);
|
|
28
|
-
}, [
|
|
29
|
-
isShow
|
|
30
|
-
]);
|
|
31
|
-
const widthStyle = widthHeightSizeControl.width['--w'] ? widthHeightSizeControl.width : makeStyleResponsive('w', makeWidth(width, fullWidth));
|
|
32
|
-
const makeIcon = useMemo(()=>{
|
|
33
|
-
if (iconExpand && isShow) {
|
|
34
|
-
return iconExpand;
|
|
35
|
-
}
|
|
36
|
-
if (iconCollapse && !isShow) {
|
|
37
|
-
return iconCollapse;
|
|
38
|
-
}
|
|
39
|
-
if (iconSvg === 'plus') {
|
|
40
|
-
if (isShow) {
|
|
41
|
-
return iconNimbus;
|
|
42
|
-
}
|
|
43
|
-
return iconPlus;
|
|
44
|
-
}
|
|
45
|
-
if (iconSvg) {
|
|
46
|
-
return iconSvg;
|
|
47
|
-
}
|
|
48
|
-
}, [
|
|
49
|
-
iconNimbus,
|
|
50
|
-
iconPlus,
|
|
13
|
+
const AccordionItem = (props)=>{
|
|
14
|
+
const { children, index, parentUid, title, childrenIcon } = props;
|
|
15
|
+
const { iconSvg, titleTypo, layoutHeader, iconGlobalSize, iconCollapseSize, iconCollapse, iconExpand, alignment, configIconSize, iconPosition } = getParentSettings(props.parentSetting) ?? {};
|
|
16
|
+
const { refContainer, getIdDropdownItem, makeIcon, isShow, uniqueId, composeIconColor, isRenderChildren, composeContentSizeStyle, hasTransitionedIn, isMounted, productID } = useAccordionItem(props);
|
|
17
|
+
const composeContainerClasses = createClass(getItemContainerClasses);
|
|
18
|
+
const composeDropdownClasses = createClass(getDropdownClasses(props.parentStyle, {
|
|
19
|
+
isShow,
|
|
20
|
+
uniqueId,
|
|
21
|
+
makeIcon,
|
|
22
|
+
index
|
|
23
|
+
}));
|
|
24
|
+
const composeIconClasses = createClass(getIconClasses);
|
|
25
|
+
const composeIconRotateClasses = createClass(getIconRotateClasses(props.parentStyle, {
|
|
26
|
+
isShow,
|
|
27
|
+
iconExpand,
|
|
51
28
|
iconSvg,
|
|
29
|
+
iconCollapse
|
|
30
|
+
}));
|
|
31
|
+
const composeContentClasses = createClass(getContentClasses(parentUid));
|
|
32
|
+
const composeGapClasses = createClass(getGapClasses);
|
|
33
|
+
const composeContainerStyles = createStyle(getItemContainerStyles(props.parentStyle, isShow));
|
|
34
|
+
const composeDropdownStyles = createStyle(getDropdownStyles(props.parentStyle, {
|
|
52
35
|
isShow,
|
|
53
|
-
iconCollapse,
|
|
54
|
-
iconExpand
|
|
55
|
-
]);
|
|
56
|
-
const composePosition = useMemo(()=>{
|
|
57
|
-
return makeStyle({
|
|
58
|
-
fd: iconPosition === 'left' ? 'row' : 'row-reverse',
|
|
59
|
-
jc: iconPosition === 'right' ? 'space-between' : ''
|
|
60
|
-
});
|
|
61
|
-
}, [
|
|
62
36
|
iconPosition
|
|
63
|
-
|
|
64
|
-
const
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
37
|
+
}));
|
|
38
|
+
const composeIconRotateStyles = createStyle(getIconRotateStyles(props.parentStyle, isShow, iconCollapseSize));
|
|
39
|
+
const composeIconPaddingGlobalSize = createStyle(getIconGlobalSize(iconGlobalSize));
|
|
40
|
+
const composeGapStyles = createStyle(getGapStyles(iconGlobalSize, alignment));
|
|
41
|
+
const inlineFlexClass = createClass(composeClasses('gp-inline-flex'));
|
|
42
|
+
const composeLayoutTextClasses = createClass(getLayoutTextClasses);
|
|
43
|
+
const composeLayoutTextStyles = createStyle(getLayoutTextStyles(composeIconColor, configIconSize));
|
|
44
|
+
const composeRenderChildrenClasses = createClass(getRenderChildrenClasses(props.parentStyle, {
|
|
45
|
+
isShow,
|
|
46
|
+
hasTransitionedIn,
|
|
47
|
+
isMounted
|
|
48
|
+
}));
|
|
49
|
+
const composeRenderChildrenStyles = createStyle(getRenderChildrenStyles(composeContentSizeStyle));
|
|
50
|
+
const composeItemBodyClasses = createClass(composeClasses('gp-accordion-item_body-inner gp-transition-all gp-duration-500 gp-min-h-0'));
|
|
51
|
+
const composeTextClasses = createClass(composeClasses('gp-border gp-border-transparent'));
|
|
71
52
|
const childForBody = useMemo(()=>{
|
|
72
|
-
|
|
73
|
-
|
|
53
|
+
const childrenArray = Children.toArray(children);
|
|
54
|
+
if (childrenArray.length >= MINIMUM_CHILD) {
|
|
55
|
+
return childrenArray[BODY_CHILD_INDEX];
|
|
74
56
|
}
|
|
75
57
|
return /*#__PURE__*/ jsx(ChildrenDroppable, {});
|
|
76
58
|
}, [
|
|
77
59
|
children
|
|
78
60
|
]);
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
return makeStyle({
|
|
82
|
-
c: iconColor?.active
|
|
83
|
-
});
|
|
84
|
-
}
|
|
85
|
-
return getGlobalColorStateStyle('c', iconColor);
|
|
86
|
-
}, [
|
|
87
|
-
iconColor,
|
|
88
|
-
isShow
|
|
89
|
-
]);
|
|
90
|
-
const { refContainer, productID } = useGetProductId();
|
|
91
|
-
const uniqueId = useMemo(()=>{
|
|
92
|
-
const prefix = `gp-accordion-item-${builderProps?.uid}-${index}`;
|
|
93
|
-
return productID ? `${prefix}-${productID}` : prefix;
|
|
94
|
-
}, [
|
|
95
|
-
builderProps?.uid,
|
|
96
|
-
index,
|
|
97
|
-
productID
|
|
98
|
-
]);
|
|
99
|
-
const composeColorIconStyle = useMemo(()=>{
|
|
100
|
-
return `.${uniqueId}:hover {
|
|
101
|
-
.gp-collapsible-icon {
|
|
102
|
-
color: ${isShow ? color?.active : color?.hover}
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
.gp-icon {
|
|
106
|
-
color: ${isShow ? iconColor?.active : iconColor?.hover}
|
|
107
|
-
}
|
|
108
|
-
}`;
|
|
109
|
-
}, [
|
|
110
|
-
isShow,
|
|
111
|
-
color,
|
|
112
|
-
iconColor,
|
|
113
|
-
uniqueId
|
|
114
|
-
]);
|
|
115
|
-
const composeContentSizeStyle = useMemo(()=>{
|
|
116
|
-
const constentSizeStyle = {
|
|
117
|
-
...contentSizePadding && contentSizePaddingSize.padding,
|
|
118
|
-
...!itemContentSpacing?.type && !contentSizePadding ? composeSize(itemContentSpacing?.custom) : {}
|
|
119
|
-
};
|
|
120
|
-
if (!isShow) {
|
|
121
|
-
return removePaddingYInStyle(constentSizeStyle);
|
|
122
|
-
}
|
|
123
|
-
return constentSizeStyle;
|
|
124
|
-
}, [
|
|
125
|
-
contentSizePadding,
|
|
126
|
-
itemContentSpacing,
|
|
127
|
-
isShow,
|
|
128
|
-
contentSizePaddingSize
|
|
129
|
-
]);
|
|
130
|
-
const isRenderChildren = useMemo(()=>hasTransitionedIn || isMounted || mode !== 'edit', [
|
|
131
|
-
hasTransitionedIn,
|
|
132
|
-
isMounted,
|
|
133
|
-
mode
|
|
134
|
-
]);
|
|
135
|
-
return /*#__PURE__*/ jsxs("div", {
|
|
136
|
-
className: "gp-overflow-clip",
|
|
61
|
+
return /*#__PURE__*/ jsx("div", {
|
|
62
|
+
className: composeContainerClasses,
|
|
137
63
|
ref: refContainer,
|
|
138
|
-
style:
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
/*#__PURE__*/ jsxs("div", {
|
|
168
|
-
"aria-hidden": true,
|
|
169
|
-
onClick: (event)=>{
|
|
170
|
-
getIdDropdownItem(event, index?.toString());
|
|
171
|
-
},
|
|
172
|
-
className: cls('gp-flex gp-cursor-pointer gp-items-center', makeIcon ? 'gp-gap-[16px]' : '', uniqueId, itemHeaderSpacing?.type && !headerContentPadding ? genSizeClass(itemHeaderSpacing?.type) : '', {
|
|
173
|
-
[getGlobalColorClass('bg', bgColor?.active)]: isShow,
|
|
174
|
-
[getGlobalColorClass('text', textColor?.active)]: isShow,
|
|
175
|
-
[getGlobalColorStateClass('bg', bgColor)]: !isShow,
|
|
176
|
-
[getGlobalColorStateClass('text', textColor)]: !isShow
|
|
177
|
-
}),
|
|
178
|
-
style: {
|
|
179
|
-
...headerContentPadding && headerContentPaddingSize.padding,
|
|
180
|
-
...!itemHeaderSpacing?.type && !headerContentPadding ? composeSize(itemHeaderSpacing?.custom) : {},
|
|
181
|
-
...widthHeightSizeControl.height,
|
|
182
|
-
...composePosition,
|
|
183
|
-
...isShow ? makeStyle({
|
|
184
|
-
bgc: getSingleColorVariable(bgColor?.active ?? bgColor?.normal),
|
|
185
|
-
bs: headerBorder?.active?.border,
|
|
186
|
-
bw: headerBorder?.active?.width,
|
|
187
|
-
bc: getSingleColorVariable(headerBorder?.active?.color),
|
|
188
|
-
c: getSingleColorVariable(textColor?.active ?? textColor?.normal)
|
|
189
|
-
}) : {
|
|
190
|
-
...getGlobalColorStateStyle('bgc', bgColor),
|
|
191
|
-
...getGlobalColorStateStyle('c', textColor),
|
|
192
|
-
...handleConvertBorderStyle(headerBorder),
|
|
193
|
-
...handleConvertBorderWidth(headerBorder),
|
|
194
|
-
...handleConvertBorderColor(headerBorder),
|
|
195
|
-
...getGlobalColorStateStyle('bgc', bgColor)
|
|
196
|
-
}
|
|
197
|
-
},
|
|
198
|
-
children: [
|
|
199
|
-
makeIcon && /*#__PURE__*/ jsx("div", {
|
|
200
|
-
className: "gp-inline-flex",
|
|
201
|
-
children: /*#__PURE__*/ jsx("span", {
|
|
64
|
+
style: composeContainerStyles,
|
|
65
|
+
children: /*#__PURE__*/ jsxs("div", {
|
|
66
|
+
"data-index": index?.toString(),
|
|
67
|
+
className: composeContentClasses,
|
|
68
|
+
children: [
|
|
69
|
+
/*#__PURE__*/ jsxs("div", {
|
|
70
|
+
"aria-hidden": true,
|
|
71
|
+
onClick: (event)=>{
|
|
72
|
+
getIdDropdownItem(event, index?.toString());
|
|
73
|
+
},
|
|
74
|
+
className: composeDropdownClasses,
|
|
75
|
+
style: composeDropdownStyles,
|
|
76
|
+
children: [
|
|
77
|
+
If(Boolean(makeIcon), /*#__PURE__*/ jsx("div", {
|
|
78
|
+
className: composeIconClasses,
|
|
79
|
+
children: /*#__PURE__*/ jsx("span", {
|
|
80
|
+
style: composeIconRotateStyles,
|
|
81
|
+
className: composeIconRotateClasses,
|
|
82
|
+
dangerouslySetInnerHTML: {
|
|
83
|
+
__html: makeIcon ?? ''
|
|
84
|
+
}
|
|
85
|
+
})
|
|
86
|
+
})),
|
|
87
|
+
/*#__PURE__*/ jsxs("div", {
|
|
88
|
+
className: composeGapClasses,
|
|
89
|
+
style: composeGapStyles,
|
|
90
|
+
children: [
|
|
91
|
+
If(Boolean(layoutHeader === 'before-text'), /*#__PURE__*/ jsx("div", {
|
|
92
|
+
className: inlineFlexClass,
|
|
202
93
|
style: {
|
|
203
|
-
...
|
|
204
|
-
c: getSingleColorVariable(color?.active ?? color?.normal)
|
|
205
|
-
}) : {
|
|
206
|
-
...getGlobalColorStateStyle('c', color)
|
|
207
|
-
},
|
|
208
|
-
width: `${iconCollapseSize ? iconCollapseSize : 16}px`,
|
|
209
|
-
height: `${iconCollapseSize ? iconCollapseSize : 16}px`,
|
|
210
|
-
'--height': `${iconCollapseSize ? iconCollapseSize : 16}px`
|
|
94
|
+
...composeIconPaddingGlobalSize
|
|
211
95
|
},
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
}
|
|
219
|
-
})
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
layoutHeader === 'before-text' && /*#__PURE__*/ jsx("div", {
|
|
229
|
-
className: "gp-inline-flex",
|
|
230
|
-
style: {
|
|
231
|
-
...composeIconGlobalSize.padding
|
|
232
|
-
},
|
|
233
|
-
children: /*#__PURE__*/ jsx("span", {
|
|
234
|
-
className: "gp-icon gp-inline-flex gp-items-center gp-justify-center gp-overflow-hidden [&>svg]:!gp-h-[var(--height)] [&>svg]:!gp-w-auto",
|
|
235
|
-
style: {
|
|
236
|
-
...composeIconColor,
|
|
237
|
-
width: configIconSize ? `${configIconSize}px` : '16px',
|
|
238
|
-
height: configIconSize ? `${configIconSize}px` : '16px',
|
|
239
|
-
'--height': `${configIconSize ? `${configIconSize}px` : '16px'}`
|
|
240
|
-
},
|
|
241
|
-
dangerouslySetInnerHTML: {
|
|
242
|
-
__html: childrenIcon ?? '<svg height="100%" width="100%" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" fill="currentColor"><path fill="currentColor" strokelinecap="round" strokelinejoin="round" d="M504 256c0 136.967-111.033 248-248 248S8 392.967 8 256 119.033 8 256 8s248 111.033 248 248zM227.314 387.314l184-184c6.248-6.248 6.248-16.379 0-22.627l-22.627-22.627c-6.248-6.249-16.379-6.249-22.628 0L216 308.118l-70.059-70.059c-6.248-6.248-16.379-6.248-22.628 0l-22.627 22.627c-6.248 6.248-6.248 16.379 0 22.627l104 104c6.249 6.249 16.379 6.249 22.628.001z"></path></svg>'
|
|
243
|
-
}
|
|
244
|
-
})
|
|
245
|
-
}),
|
|
246
|
-
/*#__PURE__*/ jsx(Text, {
|
|
247
|
-
setting: {
|
|
248
|
-
text: title,
|
|
249
|
-
htmlTag: 'div',
|
|
250
|
-
options: {
|
|
251
|
-
uniqueId,
|
|
252
|
-
productID,
|
|
253
|
-
useState: true
|
|
254
|
-
},
|
|
255
|
-
excludeFlex: true
|
|
256
|
-
},
|
|
257
|
-
styles: {
|
|
258
|
-
typo: titleTypo
|
|
259
|
-
},
|
|
260
|
-
className: "gp-border gp-border-transparent"
|
|
261
|
-
}),
|
|
262
|
-
layoutHeader === 'after-text' && /*#__PURE__*/ jsx("div", {
|
|
263
|
-
className: "gp-inline-flex",
|
|
264
|
-
style: {
|
|
265
|
-
...composeIconGlobalSize.padding
|
|
96
|
+
children: /*#__PURE__*/ jsx("span", {
|
|
97
|
+
className: composeLayoutTextClasses,
|
|
98
|
+
style: composeLayoutTextStyles,
|
|
99
|
+
dangerouslySetInnerHTML: {
|
|
100
|
+
__html: childrenIcon ?? DEFAULT_BEFORE_ICON
|
|
101
|
+
}
|
|
102
|
+
})
|
|
103
|
+
})),
|
|
104
|
+
/*#__PURE__*/ jsx(Text, {
|
|
105
|
+
setting: {
|
|
106
|
+
text: title,
|
|
107
|
+
htmlTag: 'div',
|
|
108
|
+
options: {
|
|
109
|
+
uniqueId,
|
|
110
|
+
productID,
|
|
111
|
+
useState: true
|
|
266
112
|
},
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
113
|
+
excludeFlex: true
|
|
114
|
+
},
|
|
115
|
+
styles: {
|
|
116
|
+
typo: titleTypo
|
|
117
|
+
},
|
|
118
|
+
className: composeTextClasses
|
|
119
|
+
}),
|
|
120
|
+
If(Boolean(layoutHeader === 'after-text'), /*#__PURE__*/ jsx("div", {
|
|
121
|
+
className: inlineFlexClass,
|
|
122
|
+
style: {
|
|
123
|
+
...composeIconPaddingGlobalSize
|
|
124
|
+
},
|
|
125
|
+
children: /*#__PURE__*/ jsx("span", {
|
|
126
|
+
style: composeLayoutTextStyles,
|
|
127
|
+
className: composeLayoutTextClasses,
|
|
128
|
+
dangerouslySetInnerHTML: {
|
|
129
|
+
__html: childrenIcon ?? DEFAULT_AFTER_ICON
|
|
130
|
+
}
|
|
279
131
|
})
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
]
|
|
283
|
-
}),
|
|
284
|
-
isRenderChildren && /*#__PURE__*/ jsx("div", {
|
|
285
|
-
...builderAttrs,
|
|
286
|
-
className: cls('gp-grid gp-overflow-hidden gp-transition-all gp-duration-500', {
|
|
287
|
-
'gp-grid-rows-[1fr]': isShow ? hasTransitionedIn : isMounted,
|
|
288
|
-
'gp-grid-rows-[0fr]': !isShow ? !isMounted : !hasTransitionedIn
|
|
289
|
-
}, itemContentSpacing?.type && !contentSizePadding ? genSizeClass(itemContentSpacing?.type) : ''),
|
|
290
|
-
style: {
|
|
291
|
-
...composeContentSizeStyle,
|
|
292
|
-
gridTemplateColumns: 'minmax(auto, 100%)'
|
|
293
|
-
},
|
|
294
|
-
children: /*#__PURE__*/ jsx("div", {
|
|
295
|
-
className: "gp-min-h-0",
|
|
296
|
-
children: childForBody
|
|
132
|
+
}))
|
|
133
|
+
]
|
|
297
134
|
})
|
|
135
|
+
]
|
|
136
|
+
}),
|
|
137
|
+
isRenderChildren && /*#__PURE__*/ jsx("div", {
|
|
138
|
+
...props?.builderAttrs,
|
|
139
|
+
className: composeRenderChildrenClasses,
|
|
140
|
+
style: composeRenderChildrenStyles,
|
|
141
|
+
"data-index": index,
|
|
142
|
+
"data-show": isShow,
|
|
143
|
+
children: /*#__PURE__*/ jsx("div", {
|
|
144
|
+
className: composeItemBodyClasses,
|
|
145
|
+
children: childForBody
|
|
298
146
|
})
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
147
|
+
})
|
|
148
|
+
]
|
|
149
|
+
})
|
|
302
150
|
});
|
|
303
151
|
};
|
|
304
152
|
|
|
305
|
-
export {
|
|
153
|
+
export { AccordionItem as default };
|