@gem-sdk/components 2.0.0-dev.293 → 2.0.0-dev.303
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/common/index.js +2 -2
- package/dist/cjs/article/components/ArticleAuthor.js +1 -1
- package/dist/cjs/article/components/ArticleTitle.js +3 -1
- package/dist/cjs/article/components/ArticleTitle.liquid.js +5 -2
- package/dist/cjs/article/setting/ArticleList.js +0 -30
- package/dist/cjs/article/setting/configs/ArticleAuthor/presets.js +0 -9
- package/dist/cjs/article/setting/configs/ArticleAuthor/settings.js +9 -5
- package/dist/cjs/article/setting/configs/ArticleAuthor/uiV2.js +16 -0
- package/dist/cjs/article/setting/configs/ArticleCategory/presets.js +0 -9
- package/dist/cjs/article/setting/configs/ArticleCategory/settings.js +9 -5
- package/dist/cjs/article/setting/configs/ArticleDate/presets.js +0 -9
- package/dist/cjs/article/setting/configs/ArticleDate/settings.js +9 -5
- package/dist/cjs/article/setting/configs/ArticleImage/settings.js +22 -1
- package/dist/cjs/article/setting/configs/ArticleTitle/settings.js +36 -7
- package/dist/cjs/article/setting/configs/ArticleTitle/uiV2.js +47 -2
- package/dist/cjs/builder.js +6 -2
- package/dist/cjs/button/components/Button.js +1 -1
- package/dist/cjs/button/components/Button.liquid.js +1 -1
- package/dist/cjs/button/components/ButtonIcon.liquid.js +3 -1
- package/dist/cjs/button/components/ButtonLabel.liquid.js +3 -1
- package/dist/cjs/button/components/common/attributes.js +2 -2
- package/dist/cjs/button/components/common/classes.js +2 -1
- package/dist/cjs/button/components/common/styles.js +9 -11
- package/dist/cjs/button/setting/configs/settings.js +7 -8
- package/dist/cjs/button/setting/configs/uiV2.js +4 -50
- package/dist/cjs/dialog/components/Dialog.js +109 -394
- package/dist/cjs/dialog/components/Dialog.liquid.js +129 -153
- package/dist/cjs/dialog/components/common/common.js +130 -0
- package/dist/cjs/dialog/components/common/getAttr.js +27 -0
- package/dist/cjs/dialog/components/common/getClasses.js +88 -0
- package/dist/cjs/dialog/components/common/getStyle.js +107 -0
- package/dist/cjs/dialog/components/hooks/useDialog.js +233 -0
- package/dist/cjs/dialog/setting/configs/settings.js +1 -1
- package/dist/cjs/dialog/setting/configs/uiV2.js +35 -25
- package/dist/cjs/form/components/form-checkbox/FormCheckbox.js +0 -4
- package/dist/cjs/form/components/textinput/TextInput.js +58 -0
- package/dist/cjs/form/components/textinput/TextInput.liquid.js +60 -0
- package/dist/cjs/form/components/textinput/common/composeClasses.js +33 -0
- package/dist/cjs/form/components/textinput/common/composeStyles.js +70 -0
- package/dist/cjs/form/next.js +5 -1
- package/dist/cjs/form/setting/index.js +3 -1
- package/dist/cjs/form/setting/newsletter/configs/settings.js +4 -2
- package/dist/cjs/form/setting/newsletter/configs/uiV2.js +2 -0
- package/dist/cjs/form/setting/text-input/TextInput.js +53 -0
- package/dist/cjs/form/setting/text-input/configs/settings.js +307 -0
- package/dist/cjs/form/setting/text-input/configs/uiV1.js +106 -0
- package/dist/cjs/form/setting/text-input/configs/uiV2.js +303 -0
- package/dist/cjs/grid/row/setting/configs/settings.js +6 -3
- package/dist/cjs/helpers.js +8 -0
- package/dist/cjs/icon-list/common/attrs.js +10 -0
- package/dist/cjs/icon-list/common/classes.js +9 -0
- package/dist/cjs/icon-list/common/styles.js +29 -0
- package/dist/cjs/icon-list/components/IconList.js +19 -30
- package/dist/cjs/icon-list/components/IconList.liquid.js +21 -24
- package/dist/cjs/icon-list/components/IconListItem.js +13 -7
- package/dist/cjs/icon-list/components/IconListItem.liquid.js +13 -7
- package/dist/cjs/icon-list-hoz/components/IconListHoz.js +37 -25
- package/dist/cjs/icon-list-hoz/components/IconListHoz.liquid.js +31 -25
- package/dist/cjs/icon-list-hoz/components/IconListHozItem.js +12 -6
- package/dist/cjs/icon-list-hoz/components/IconListIHozItem.liquid.js +26 -0
- package/dist/cjs/icon-list-hoz/components/common/getAttr.js +9 -0
- package/dist/cjs/icon-list-hoz/components/common/getClasses.js +24 -0
- package/dist/cjs/icon-list-hoz/components/common/getStyle.js +30 -0
- package/dist/cjs/image/components/AdaptiveImage.js +1 -1
- package/dist/cjs/image/components/AdaptiveImage.liquid.js +4 -4
- package/dist/cjs/image/components/Image.js +1 -5
- package/dist/cjs/image/components/common/styles.js +2 -2
- package/dist/cjs/image/components/helpers/getNextImageLiquidAttrs.js +6 -24
- package/dist/cjs/image/components/helpers/getNextImageReactAttrs.js +3 -3
- package/dist/cjs/index.js +6 -1
- package/dist/cjs/index.liquid.js +7 -3
- package/dist/cjs/line/common/classes.js +66 -0
- package/dist/cjs/line/common/index.js +16 -0
- package/dist/cjs/line/common/styles.js +120 -0
- package/dist/cjs/line/components/Divider.js +26 -0
- package/dist/cjs/line/components/Divider.liquid.js +22 -0
- package/dist/cjs/line/components/Line.js +98 -0
- package/dist/cjs/line/components/Line.liquid.js +86 -0
- package/dist/cjs/line/next.js +1 -1
- package/dist/cjs/post-purchase/line/setting/configs/uiV2.js +1 -1
- package/dist/cjs/post-purchase/link/setting/configs/settings.js +2 -1
- package/dist/cjs/post-purchase/link/setting/configs/uiV2.js +1 -1
- package/dist/cjs/post-purchase/product/settings/product-variants/configs/uiV2.js +1 -1
- package/dist/cjs/product/components/FileUpload/components/config/setting.js +24 -26
- package/dist/cjs/product/components/FileUpload/components/config/uiV2.js +12 -179
- package/dist/cjs/product/components/ProductList.js +1 -1
- package/dist/cjs/product/components/ProductVariants/index.js +2 -2
- package/dist/cjs/product/components/ProductVariants/index.liquid.js +2 -2
- package/dist/cjs/product/components/ProductVariants/variants/Dropdown.js +8 -3
- package/dist/cjs/product/components/ProductVariants/variants/Dropdown.liquid.js +7 -2
- package/dist/cjs/product/setting/ProductVariants.js +8 -1374
- package/dist/cjs/product/setting/product/configs/uiV2.js +2 -2
- package/dist/cjs/product/setting/product-list/configs/uiV2.js +0 -3
- package/dist/cjs/product/setting/product-variant/configs/presets.js +168 -0
- package/dist/cjs/product/setting/product-variant/configs/settings.js +732 -0
- package/dist/cjs/product/setting/product-variant/configs/uiV1.js +509 -0
- package/dist/cjs/product/setting/product-variant/configs/uiV2.js +347 -0
- package/dist/cjs/third-party/components/EcoboostifyShoppableReelUgc.js +33 -0
- package/dist/cjs/third-party/components/EcoboostifyShoppableReelUgc.liquid.js +12 -0
- package/dist/cjs/third-party/components/RechargeSubscriptions.liquid.js +1 -1
- package/dist/cjs/third-party/configs/EcoboostifyShoppableReelUgc.js +12 -0
- package/dist/cjs/third-party/next.js +5 -0
- package/dist/cjs/third-party/setting/EcoboostifyShoppableReelUgc.js +142 -0
- package/dist/cjs/third-party/setting/RechargeSubscriptions.js +5 -2
- package/dist/cjs/third-party/setting/index.js +3 -1
- package/dist/esm/accordion/components/common/index.js +2 -2
- package/dist/esm/article/components/ArticleAuthor.js +1 -1
- package/dist/esm/article/components/ArticleTitle.js +3 -1
- package/dist/esm/article/components/ArticleTitle.liquid.js +5 -2
- package/dist/esm/article/setting/ArticleList.js +0 -30
- package/dist/esm/article/setting/configs/ArticleAuthor/presets.js +0 -9
- package/dist/esm/article/setting/configs/ArticleAuthor/settings.js +9 -5
- package/dist/esm/article/setting/configs/ArticleAuthor/uiV2.js +16 -0
- package/dist/esm/article/setting/configs/ArticleCategory/presets.js +0 -9
- package/dist/esm/article/setting/configs/ArticleCategory/settings.js +9 -5
- package/dist/esm/article/setting/configs/ArticleDate/presets.js +0 -9
- package/dist/esm/article/setting/configs/ArticleDate/settings.js +9 -5
- package/dist/esm/article/setting/configs/ArticleImage/settings.js +22 -1
- package/dist/esm/article/setting/configs/ArticleTitle/settings.js +36 -7
- package/dist/esm/article/setting/configs/ArticleTitle/uiV2.js +47 -2
- package/dist/esm/builder.js +6 -2
- package/dist/esm/button/components/Button.js +1 -1
- package/dist/esm/button/components/Button.liquid.js +1 -1
- package/dist/esm/button/components/ButtonIcon.liquid.js +3 -1
- package/dist/esm/button/components/ButtonLabel.liquid.js +3 -1
- package/dist/esm/button/components/common/attributes.js +2 -2
- package/dist/esm/button/components/common/classes.js +3 -2
- package/dist/esm/button/components/common/styles.js +10 -12
- package/dist/esm/button/setting/configs/settings.js +7 -8
- package/dist/esm/button/setting/configs/uiV2.js +4 -50
- package/dist/esm/dialog/components/Dialog.js +110 -395
- package/dist/esm/dialog/components/Dialog.liquid.js +130 -154
- package/dist/esm/dialog/components/common/common.js +117 -0
- package/dist/esm/dialog/components/common/getAttr.js +22 -0
- package/dist/esm/dialog/components/common/getClasses.js +79 -0
- package/dist/esm/dialog/components/common/getStyle.js +98 -0
- package/dist/esm/dialog/components/hooks/useDialog.js +231 -0
- package/dist/esm/dialog/setting/configs/settings.js +1 -1
- package/dist/esm/dialog/setting/configs/uiV2.js +35 -25
- package/dist/esm/form/components/form-checkbox/FormCheckbox.js +0 -4
- package/dist/esm/form/components/textinput/TextInput.js +54 -0
- package/dist/esm/form/components/textinput/TextInput.liquid.js +56 -0
- package/dist/esm/form/components/textinput/common/composeClasses.js +29 -0
- package/dist/esm/form/components/textinput/common/composeStyles.js +67 -0
- package/dist/esm/form/next.js +5 -1
- package/dist/esm/form/setting/index.js +3 -1
- package/dist/esm/form/setting/newsletter/configs/settings.js +4 -2
- package/dist/esm/form/setting/newsletter/configs/uiV2.js +2 -0
- package/dist/esm/form/setting/text-input/TextInput.js +49 -0
- package/dist/esm/form/setting/text-input/configs/settings.js +305 -0
- package/dist/esm/form/setting/text-input/configs/uiV1.js +104 -0
- package/dist/esm/form/setting/text-input/configs/uiV2.js +301 -0
- package/dist/esm/grid/row/setting/configs/settings.js +6 -3
- package/dist/esm/helpers.js +8 -1
- package/dist/esm/icon-list/common/attrs.js +8 -0
- package/dist/esm/icon-list/common/classes.js +6 -0
- package/dist/esm/icon-list/common/styles.js +25 -0
- package/dist/esm/icon-list/components/IconList.js +21 -32
- package/dist/esm/icon-list/components/IconList.liquid.js +21 -24
- package/dist/esm/icon-list/components/IconListItem.js +13 -7
- package/dist/esm/icon-list/components/IconListItem.liquid.js +14 -8
- package/dist/esm/icon-list-hoz/components/IconListHoz.js +38 -26
- package/dist/esm/icon-list-hoz/components/IconListHoz.liquid.js +32 -26
- package/dist/esm/icon-list-hoz/components/IconListHozItem.js +12 -6
- package/dist/esm/icon-list-hoz/components/IconListIHozItem.liquid.js +22 -0
- package/dist/esm/icon-list-hoz/components/common/getAttr.js +7 -0
- package/dist/esm/icon-list-hoz/components/common/getClasses.js +21 -0
- package/dist/esm/icon-list-hoz/components/common/getStyle.js +27 -0
- package/dist/esm/image/components/AdaptiveImage.js +2 -2
- package/dist/esm/image/components/AdaptiveImage.liquid.js +4 -4
- package/dist/esm/image/components/Image.js +2 -6
- package/dist/esm/image/components/common/styles.js +2 -2
- package/dist/esm/image/components/helpers/getNextImageLiquidAttrs.js +6 -24
- package/dist/esm/image/components/helpers/getNextImageReactAttrs.js +3 -3
- package/dist/esm/index.js +4 -2
- package/dist/esm/index.liquid.js +4 -2
- package/dist/esm/line/common/classes.js +59 -0
- package/dist/esm/line/common/index.js +14 -0
- package/dist/esm/line/common/styles.js +114 -0
- package/dist/esm/line/components/Divider.js +22 -0
- package/dist/esm/line/components/Divider.liquid.js +18 -0
- package/dist/esm/line/components/Line.js +94 -0
- package/dist/esm/line/components/Line.liquid.js +82 -0
- package/dist/esm/line/next.js +1 -1
- package/dist/esm/post-purchase/line/setting/configs/uiV2.js +1 -1
- package/dist/esm/post-purchase/link/setting/configs/settings.js +2 -1
- package/dist/esm/post-purchase/link/setting/configs/uiV2.js +1 -1
- package/dist/esm/post-purchase/product/settings/product-variants/configs/uiV2.js +1 -1
- package/dist/esm/product/components/FileUpload/components/config/setting.js +24 -26
- package/dist/esm/product/components/FileUpload/components/config/uiV2.js +12 -179
- package/dist/esm/product/components/ProductList.js +1 -1
- package/dist/esm/product/components/ProductVariants/index.js +2 -2
- package/dist/esm/product/components/ProductVariants/index.liquid.js +2 -2
- package/dist/esm/product/components/ProductVariants/variants/Dropdown.js +8 -3
- package/dist/esm/product/components/ProductVariants/variants/Dropdown.liquid.js +7 -2
- package/dist/esm/product/setting/ProductVariants.js +8 -1374
- package/dist/esm/product/setting/product/configs/uiV2.js +2 -2
- package/dist/esm/product/setting/product-list/configs/uiV2.js +0 -3
- package/dist/esm/product/setting/product-variant/configs/presets.js +166 -0
- package/dist/esm/product/setting/product-variant/configs/settings.js +730 -0
- package/dist/esm/product/setting/product-variant/configs/uiV1.js +507 -0
- package/dist/esm/product/setting/product-variant/configs/uiV2.js +345 -0
- package/dist/esm/third-party/components/EcoboostifyShoppableReelUgc.js +29 -0
- package/dist/esm/third-party/components/EcoboostifyShoppableReelUgc.liquid.js +8 -0
- package/dist/esm/third-party/components/RechargeSubscriptions.liquid.js +1 -1
- package/dist/esm/third-party/configs/EcoboostifyShoppableReelUgc.js +8 -0
- package/dist/esm/third-party/next.js +5 -0
- package/dist/esm/third-party/setting/EcoboostifyShoppableReelUgc.js +138 -0
- package/dist/esm/third-party/setting/RechargeSubscriptions.js +5 -2
- package/dist/esm/third-party/setting/index.js +3 -1
- package/dist/types/index.d.ts +184 -166
- package/package.json +2 -2
- package/dist/cjs/dialog/helpers/common.js +0 -55
- package/dist/cjs/icon-list-hoz/components/IconListItemHoz.liquid.js +0 -23
- package/dist/cjs/line/Divider.js +0 -35
- package/dist/cjs/line/Divider.liquid.js +0 -35
- package/dist/cjs/line/Line.js +0 -167
- package/dist/cjs/line/Line.liquid.js +0 -163
- package/dist/esm/dialog/helpers/common.js +0 -47
- package/dist/esm/icon-list-hoz/components/IconListItemHoz.liquid.js +0 -19
- package/dist/esm/line/Divider.js +0 -31
- package/dist/esm/line/Divider.liquid.js +0 -31
- package/dist/esm/line/Line.js +0 -163
- package/dist/esm/line/Line.liquid.js +0 -159
- /package/dist/cjs/dialog/{hooks/use-scroll-percentage.js → components/hooks/useScrollPercentage.js} +0 -0
- /package/dist/cjs/product/setting/{swatches-style-config → product-variant/swatches-style-config}/color.js +0 -0
- /package/dist/cjs/product/setting/{swatches-style-config → product-variant/swatches-style-config}/dropdown.js +0 -0
- /package/dist/cjs/product/setting/{swatches-style-config → product-variant/swatches-style-config}/image-shopify.js +0 -0
- /package/dist/cjs/product/setting/{swatches-style-config → product-variant/swatches-style-config}/image.js +0 -0
- /package/dist/cjs/product/setting/{swatches-style-config → product-variant/swatches-style-config}/rectangle-list.js +0 -0
- /package/dist/esm/dialog/{hooks/use-scroll-percentage.js → components/hooks/useScrollPercentage.js} +0 -0
- /package/dist/esm/product/setting/{swatches-style-config → product-variant/swatches-style-config}/color.js +0 -0
- /package/dist/esm/product/setting/{swatches-style-config → product-variant/swatches-style-config}/dropdown.js +0 -0
- /package/dist/esm/product/setting/{swatches-style-config → product-variant/swatches-style-config}/image-shopify.js +0 -0
- /package/dist/esm/product/setting/{swatches-style-config → product-variant/swatches-style-config}/image.js +0 -0
- /package/dist/esm/product/setting/{swatches-style-config → product-variant/swatches-style-config}/rectangle-list.js +0 -0
|
@@ -1,12 +1,39 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
|
|
3
|
-
import {
|
|
3
|
+
import { isEmptyChildren, filterToolbarPreview } from '@gem-sdk/core';
|
|
4
4
|
import { Children, isValidElement } from 'react';
|
|
5
5
|
import Head from 'next/head';
|
|
6
|
+
import { createAttr, createStyle, createClass, If } from '@gem-sdk/system';
|
|
7
|
+
import { getAttr } from './common/getAttr.js';
|
|
8
|
+
import { getWrapperStyle, getContainStyle } from './common/getStyle.js';
|
|
9
|
+
import { getContainClasses } from './common/getClasses.js';
|
|
6
10
|
|
|
7
|
-
const IconListHoz = (
|
|
11
|
+
const IconListHoz = (props)=>{
|
|
12
|
+
const { builderAttrs, style, setting, children, styles, advanced, builderProps } = props;
|
|
8
13
|
const { preload } = setting || {};
|
|
9
|
-
const { background
|
|
14
|
+
const { background } = styles || {};
|
|
15
|
+
const attrs = createAttr({
|
|
16
|
+
...getAttr({
|
|
17
|
+
uid: builderProps?.uid || ''
|
|
18
|
+
})
|
|
19
|
+
});
|
|
20
|
+
const wrapperDialogStyle = createStyle({
|
|
21
|
+
...getWrapperStyle(style, background)
|
|
22
|
+
});
|
|
23
|
+
const containClasses = createClass({
|
|
24
|
+
...getContainClasses(advanced?.cssClass)
|
|
25
|
+
});
|
|
26
|
+
const containStyle = createStyle({
|
|
27
|
+
...getContainStyle(styles)
|
|
28
|
+
});
|
|
29
|
+
const renderChildren = ()=>Children.map(filterToolbarPreview(children), (child)=>{
|
|
30
|
+
if (/*#__PURE__*/ isValidElement(child)) {
|
|
31
|
+
return /*#__PURE__*/ jsx(child.type, {
|
|
32
|
+
...child.props
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
return null;
|
|
36
|
+
});
|
|
10
37
|
return /*#__PURE__*/ jsxs(Fragment, {
|
|
11
38
|
children: [
|
|
12
39
|
!!preload && /*#__PURE__*/ jsxs(Head, {
|
|
@@ -29,37 +56,22 @@ const IconListHoz = ({ builderAttrs, style, styles, setting, children, builderPr
|
|
|
29
56
|
]
|
|
30
57
|
}),
|
|
31
58
|
/*#__PURE__*/ jsx("div", {
|
|
59
|
+
...attrs,
|
|
32
60
|
...builderAttrs,
|
|
33
61
|
"data-id": builderProps?.uid,
|
|
34
|
-
style:
|
|
35
|
-
|
|
36
|
-
...getStyleBackgroundByDevice(background)
|
|
37
|
-
},
|
|
38
|
-
children: isEmptyChildren(children) ? /*#__PURE__*/ jsx("div", {
|
|
62
|
+
style: wrapperDialogStyle,
|
|
63
|
+
children: If(isEmptyChildren(children), /*#__PURE__*/ jsx("div", {
|
|
39
64
|
children: "Icons not found"
|
|
40
|
-
})
|
|
65
|
+
}), /*#__PURE__*/ jsxs(Fragment, {
|
|
41
66
|
children: [
|
|
42
67
|
/*#__PURE__*/ jsx("div", {
|
|
43
|
-
className:
|
|
44
|
-
style:
|
|
45
|
-
|
|
46
|
-
cg: horizontalSpacing
|
|
47
|
-
}),
|
|
48
|
-
...makeStyleResponsive('jc', align),
|
|
49
|
-
...makeStyleResponsive('ai', verticalAlign)
|
|
50
|
-
},
|
|
51
|
-
children: Children.map(filterToolbarPreview(children), (child)=>{
|
|
52
|
-
if (/*#__PURE__*/ isValidElement(child)) {
|
|
53
|
-
return /*#__PURE__*/ jsx(child.type, {
|
|
54
|
-
...child.props
|
|
55
|
-
});
|
|
56
|
-
}
|
|
57
|
-
return null;
|
|
58
|
-
})
|
|
68
|
+
className: containClasses,
|
|
69
|
+
style: containStyle,
|
|
70
|
+
children: renderChildren()
|
|
59
71
|
}),
|
|
60
72
|
filterToolbarPreview(children, true)
|
|
61
73
|
]
|
|
62
|
-
})
|
|
74
|
+
}))
|
|
63
75
|
})
|
|
64
76
|
]
|
|
65
77
|
});
|
|
@@ -1,37 +1,43 @@
|
|
|
1
|
-
import { template, RenderIf,
|
|
1
|
+
import { template, RenderIf, isEmptyChildren } from '@gem-sdk/core';
|
|
2
2
|
import { getStaticLocale } from '../../helpers.js';
|
|
3
|
+
import { createAttr, createStyle, createClass, If } from '@gem-sdk/system';
|
|
4
|
+
import { getAttr } from './common/getAttr.js';
|
|
5
|
+
import { getWrapperStyle, getContainStyle } from './common/getStyle.js';
|
|
6
|
+
import { getContainClasses } from './common/getClasses.js';
|
|
3
7
|
|
|
4
|
-
const IconListHoz = (
|
|
8
|
+
const IconListHoz = (props)=>{
|
|
9
|
+
const { builderAttrs, style, setting, children, styles, advanced, builderProps } = props;
|
|
5
10
|
const { preload } = setting || {};
|
|
6
|
-
const { background
|
|
11
|
+
const { background } = styles || {};
|
|
12
|
+
const attrs = createAttr({
|
|
13
|
+
...getAttr({
|
|
14
|
+
uid: builderProps?.uid || ''
|
|
15
|
+
})
|
|
16
|
+
});
|
|
17
|
+
const wrapperDialogStyle = createStyle({
|
|
18
|
+
...getWrapperStyle(style, background)
|
|
19
|
+
});
|
|
20
|
+
const containClasses = createClass({
|
|
21
|
+
...getContainClasses(advanced?.cssClass)
|
|
22
|
+
});
|
|
23
|
+
const containStyle = createStyle({
|
|
24
|
+
...getContainStyle(styles)
|
|
25
|
+
});
|
|
26
|
+
const renderChildren = ()=>children;
|
|
7
27
|
return template`
|
|
8
28
|
${RenderIf(!!preload, `${RenderIf(!!background?.desktop?.image?.src, `<link rel="preload" href="${background?.desktop?.image?.src}" as="image" />`)}
|
|
9
29
|
${RenderIf(!!background?.tablet?.image?.src, `<link rel="preload" href="${background?.tablet?.image?.src}" as="image" />`)}
|
|
10
30
|
${RenderIf(!!background?.mobile?.image?.src, `<link rel="preload" href="${background?.mobile?.image?.src}" as="image" />`)}`)}
|
|
11
|
-
<div
|
|
12
|
-
|
|
13
|
-
|
|
31
|
+
<div ${{
|
|
32
|
+
...attrs
|
|
33
|
+
}} ${{
|
|
14
34
|
...builderAttrs
|
|
15
|
-
}}
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
})
|
|
22
|
-
}}">
|
|
23
|
-
|
|
24
|
-
${isEmptyChildren(children) ? `<div>${getStaticLocale('IconListHoz', 'icons_not_found')}</div>` : template`<div
|
|
25
|
-
class="${cls('gp-flex gp-flex-wrap', advanced?.cssClass)}"
|
|
26
|
-
style="${{
|
|
27
|
-
...makeStyle({
|
|
28
|
-
cg: horizontalSpacing
|
|
29
|
-
}),
|
|
30
|
-
...makeStyleResponsive('jc', align),
|
|
31
|
-
...makeStyleResponsive('ai', verticalAlign)
|
|
32
|
-
}}">
|
|
33
|
-
${children}
|
|
34
|
-
</div>`}
|
|
35
|
+
}} style="${wrapperDialogStyle}">
|
|
36
|
+
${If(isEmptyChildren(children), `<div>${getStaticLocale('IconListHoz', 'icons_not_found')}</div>`, `<>
|
|
37
|
+
<div class="${containClasses}" style="${containStyle}">
|
|
38
|
+
${renderChildren()}
|
|
39
|
+
</div>
|
|
40
|
+
</>`)}
|
|
35
41
|
</div>
|
|
36
42
|
`;
|
|
37
43
|
};
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsx } from 'react/jsx-runtime';
|
|
3
|
-
import { isEmptyChildren } from '@gem-sdk/core';
|
|
4
3
|
import { Children, isValidElement } from 'react';
|
|
5
4
|
import ChildrenDroppable from '../../grid/components/ChildrenDroppable.js';
|
|
5
|
+
import { isEmptyChildren } from '@gem-sdk/core';
|
|
6
|
+
import { createClass } from '@gem-sdk/system';
|
|
7
|
+
import { getItemClasses } from './common/getClasses.js';
|
|
6
8
|
|
|
7
9
|
const IconListHozItem = ({ children, builderAttrs })=>{
|
|
8
10
|
if (isEmptyChildren(children)) {
|
|
@@ -10,17 +12,21 @@ const IconListHozItem = ({ children, builderAttrs })=>{
|
|
|
10
12
|
className: "gp-min-w-[50px]"
|
|
11
13
|
});
|
|
12
14
|
}
|
|
13
|
-
|
|
14
|
-
...
|
|
15
|
-
|
|
16
|
-
|
|
15
|
+
const itemClasses = createClass({
|
|
16
|
+
...getItemClasses()
|
|
17
|
+
});
|
|
18
|
+
const renderChildren = ()=>Children.map(children, (child)=>{
|
|
17
19
|
if (/*#__PURE__*/ isValidElement(child)) {
|
|
18
20
|
return /*#__PURE__*/ jsx(child.type, {
|
|
19
21
|
...child.props
|
|
20
22
|
});
|
|
21
23
|
}
|
|
22
24
|
return null;
|
|
23
|
-
})
|
|
25
|
+
});
|
|
26
|
+
return /*#__PURE__*/ jsx("div", {
|
|
27
|
+
...builderAttrs,
|
|
28
|
+
className: itemClasses,
|
|
29
|
+
children: renderChildren()
|
|
24
30
|
});
|
|
25
31
|
};
|
|
26
32
|
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { isEmptyChildren, template } from '@gem-sdk/core';
|
|
2
|
+
import { createClass } from '@gem-sdk/system';
|
|
3
|
+
import { getItemClasses } from './common/getClasses.js';
|
|
4
|
+
|
|
5
|
+
const IconListIHozItemLiquid = ({ children, builderAttrs })=>{
|
|
6
|
+
if (isEmptyChildren(children)) {
|
|
7
|
+
return '';
|
|
8
|
+
}
|
|
9
|
+
const itemClasses = createClass({
|
|
10
|
+
...getItemClasses()
|
|
11
|
+
});
|
|
12
|
+
const renderChildren = ()=>children;
|
|
13
|
+
return template`
|
|
14
|
+
<div ${{
|
|
15
|
+
...builderAttrs
|
|
16
|
+
}} class="${itemClasses}">
|
|
17
|
+
${renderChildren()}
|
|
18
|
+
</div>
|
|
19
|
+
`;
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
export { IconListIHozItemLiquid as default };
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
function composeClasses(classList) {
|
|
2
|
+
return classList.split(' ').reduce((acc, item)=>{
|
|
3
|
+
acc[item] = true;
|
|
4
|
+
return acc;
|
|
5
|
+
}, {});
|
|
6
|
+
}
|
|
7
|
+
const getContainClasses = (advancedCssClass)=>{
|
|
8
|
+
let classList = 'gp-flex gp-flex-wrap';
|
|
9
|
+
if (advancedCssClass) classList += ` ${advancedCssClass}`;
|
|
10
|
+
return {
|
|
11
|
+
...composeClasses(classList)
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
const getItemClasses = ()=>{
|
|
15
|
+
const classList = 'gp-flex gp-w-full gp-flex-col gp-items-center';
|
|
16
|
+
return {
|
|
17
|
+
...composeClasses(classList)
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
export { getContainClasses, getItemClasses };
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { getStyleBackgroundByDevice, makeStyle, makeStyleResponsive } from '@gem-sdk/core';
|
|
2
|
+
|
|
3
|
+
function filterTruthyStyles(styles) {
|
|
4
|
+
return Object.fromEntries(Object.entries(styles || {}).filter(([, value])=>!!value));
|
|
5
|
+
}
|
|
6
|
+
const getWrapperStyle = (style, background)=>{
|
|
7
|
+
const composeStyles = {
|
|
8
|
+
...style,
|
|
9
|
+
...getStyleBackgroundByDevice(background, {
|
|
10
|
+
liquid: true
|
|
11
|
+
})
|
|
12
|
+
};
|
|
13
|
+
return filterTruthyStyles(composeStyles);
|
|
14
|
+
};
|
|
15
|
+
const getContainStyle = (styles)=>{
|
|
16
|
+
const { horizontalSpacing, align, verticalAlign } = styles || {};
|
|
17
|
+
const composeStyles = {
|
|
18
|
+
...makeStyle({
|
|
19
|
+
cg: horizontalSpacing
|
|
20
|
+
}),
|
|
21
|
+
...makeStyleResponsive('jc', align),
|
|
22
|
+
...makeStyleResponsive('ai', verticalAlign)
|
|
23
|
+
};
|
|
24
|
+
return filterTruthyStyles(composeStyles);
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
export { getContainStyle, getWrapperStyle };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsx, Fragment, jsxs } from 'react/jsx-runtime';
|
|
3
3
|
import { IMAGE_PLACEHOLDER } from './common/constants.js';
|
|
4
|
-
import { createAttr, createStyle, createClass } from '@gem-sdk/system';
|
|
4
|
+
import { createAttr, createStyleReact, createStyle, createClass } from '@gem-sdk/system';
|
|
5
5
|
import { getLoadingAdaptiveImageAttrs } from './common/attributes.js';
|
|
6
6
|
import { getAdaptiveImageClasses } from './common/classes.js';
|
|
7
7
|
import { getAdaptiveImageData } from './common/data.js';
|
|
@@ -15,7 +15,7 @@ const AdaptiveImage = (props)=>{
|
|
|
15
15
|
srcDesktop,
|
|
16
16
|
enableLazyLoadImage: enableLazyloadImage
|
|
17
17
|
}));
|
|
18
|
-
const pictureStyle =
|
|
18
|
+
const pictureStyle = createStyleReact({
|
|
19
19
|
...getAdaptivePictureStyles()
|
|
20
20
|
});
|
|
21
21
|
const adaptiveImageStyles = createStyle({
|
|
@@ -35,13 +35,13 @@ const AdaptiveImage = (props)=>{
|
|
|
35
35
|
})
|
|
36
36
|
});
|
|
37
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}" />` : ``}
|
|
38
|
+
return template`
|
|
39
|
+
${srcMobile ? `<source media="(max-width: 767px)" data-srcSet="${srcMobile}" srcset="${enableLazyLoadImage ? IMAGE_PLACEHOLDER : srcMobile}" />` : ``}
|
|
40
|
+
${srcTablet ? `<source media="(max-width: 1024px)" data-srcSet="${srcTablet}" srcset="${enableLazyLoadImage ? IMAGE_PLACEHOLDER : srcTablet}" />` : ``}
|
|
41
41
|
`;
|
|
42
42
|
};
|
|
43
43
|
const renderImage = ()=>{
|
|
44
|
-
return `
|
|
44
|
+
return template`
|
|
45
45
|
<img
|
|
46
46
|
${{
|
|
47
47
|
...restProps
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
3
|
-
import { createStyle, createClass, createAttr, If } from '@gem-sdk/system';
|
|
3
|
+
import { createStyleReact, createStyle, createClass, createAttr, If } from '@gem-sdk/system';
|
|
4
4
|
import AdaptiveImage from './AdaptiveImage.js';
|
|
5
5
|
import NextImage from './NextImage.js';
|
|
6
6
|
import NoDataImage from './NoDataImage.js';
|
|
@@ -18,11 +18,7 @@ const Image = ({ style, styles, setting, children, advanced, className, builderA
|
|
|
18
18
|
setting: imageLink,
|
|
19
19
|
enableImageLink
|
|
20
20
|
});
|
|
21
|
-
|
|
22
|
-
setting,
|
|
23
|
-
styles
|
|
24
|
-
});
|
|
25
|
-
const wrapperStyles = createStyle(getWrapperStyles(styles));
|
|
21
|
+
const wrapperStyles = createStyleReact(getWrapperStyles(styles));
|
|
26
22
|
const noDataImageStyles = createStyle(getNoDataImageStyles(styles));
|
|
27
23
|
const imageStyles = createStyle(getImageStyles(styles, builderProps));
|
|
28
24
|
const containerStyles = createStyle(getContainerStyles(style, styles));
|
|
@@ -9,7 +9,7 @@ const getContainerStyles = (style, styles)=>{
|
|
|
9
9
|
};
|
|
10
10
|
const getWrapperStyles = (styles)=>{
|
|
11
11
|
return {
|
|
12
|
-
|
|
12
|
+
'border-radius': 'inherit',
|
|
13
13
|
overflow: 'hidden',
|
|
14
14
|
...makeStyleResponsive('jc', styles?.align)
|
|
15
15
|
};
|
|
@@ -60,7 +60,7 @@ const getAdaptiveImageStyles = ({ layout, aspectRatio, borderRadius })=>{
|
|
|
60
60
|
};
|
|
61
61
|
const getAdaptivePictureStyles = ()=>{
|
|
62
62
|
return {
|
|
63
|
-
|
|
63
|
+
'border-radius': 'inherit'
|
|
64
64
|
};
|
|
65
65
|
};
|
|
66
66
|
const getNoDataImageStyles = (styles)=>{
|
|
@@ -6,6 +6,7 @@ const getNextImageLiquidAttrs = (props)=>{
|
|
|
6
6
|
const { srcset, setting, storage, baseSrc, priority, customAttrs, width = 2237, height = 1678, isNotLazyload, backupFileKey, backupFilePath, srcIsLiquidCode, enableLazyLoadImage, alt = NEXT_IMAGE_CONFIG.DEFAULT_ALT, src = NEXT_IMAGE_CONFIG.DEFAULT_SRC, sizes = NEXT_IMAGE_CONFIG.DEFAULT_SIZES } = props;
|
|
7
7
|
const hasLazyLoad = !isNotLazyload && enableLazyLoadImage && !priority;
|
|
8
8
|
const getLoadingAttrs = ()=>{
|
|
9
|
+
const { qualityPercent, qualityType } = setting ?? {};
|
|
9
10
|
const newBackupFileKey = backupFileKey ? getNewBackupFileKey(backupFileKey ?? '', src) : '';
|
|
10
11
|
const srcImage = srcIsLiquidCode ? baseSrc : getImageSrc({
|
|
11
12
|
src,
|
|
@@ -35,43 +36,24 @@ const getNextImageLiquidAttrs = (props)=>{
|
|
|
35
36
|
srcset: srcset || ''
|
|
36
37
|
};
|
|
37
38
|
return {
|
|
39
|
+
'data-sizes': 'auto',
|
|
40
|
+
'quality-type': JSON.stringify(qualityType) || '{}',
|
|
41
|
+
'quality-percent': JSON.stringify(qualityPercent) || '{}',
|
|
38
42
|
...hasLazyLoad ? lazyLoadAttrs : priorityLoadAttrs
|
|
39
43
|
};
|
|
40
44
|
};
|
|
41
45
|
const getBaseAttrs = ()=>{
|
|
42
|
-
const { qualityPercent, qualityType } = setting ?? {};
|
|
43
46
|
return {
|
|
44
47
|
alt,
|
|
45
48
|
width,
|
|
46
49
|
height,
|
|
47
|
-
draggable: 'false'
|
|
48
|
-
'data-sizes': 'auto',
|
|
49
|
-
'quality-type': JSON.stringify(qualityType) || '{}',
|
|
50
|
-
'quality-percent': JSON.stringify(qualityPercent) || '{}'
|
|
50
|
+
draggable: 'false'
|
|
51
51
|
};
|
|
52
52
|
};
|
|
53
|
-
const getFilteredAttrs = ()=>{
|
|
54
|
-
const ignoreAttrs = [
|
|
55
|
-
'src',
|
|
56
|
-
'srcset',
|
|
57
|
-
'width',
|
|
58
|
-
'height',
|
|
59
|
-
'alt',
|
|
60
|
-
'base-src'
|
|
61
|
-
];
|
|
62
|
-
const filteredAttrs = {};
|
|
63
|
-
Object.entries(props).forEach(([key, value])=>{
|
|
64
|
-
if (!ignoreAttrs.includes(key) && (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean')) {
|
|
65
|
-
filteredAttrs[key] = value;
|
|
66
|
-
}
|
|
67
|
-
});
|
|
68
|
-
return filteredAttrs;
|
|
69
|
-
};
|
|
70
53
|
return createAttr({
|
|
71
54
|
...customAttrs,
|
|
72
55
|
...getBaseAttrs(),
|
|
73
|
-
...getLoadingAttrs()
|
|
74
|
-
...getFilteredAttrs()
|
|
56
|
+
...getLoadingAttrs()
|
|
75
57
|
});
|
|
76
58
|
};
|
|
77
59
|
|
|
@@ -2,7 +2,7 @@ import { createAttr } from '@gem-sdk/system';
|
|
|
2
2
|
import { NEXT_IMAGE_CONFIG, IMAGE_PLACEHOLDER } from '../common/constants.js';
|
|
3
3
|
|
|
4
4
|
const getNextImageReactAttrs = (props)=>{
|
|
5
|
-
const { width = NEXT_IMAGE_CONFIG.DEFAULT_WIDTH_PROPS, height = NEXT_IMAGE_CONFIG.DEFAULT_HEIGHT_PROPS, priority, isNotLazyload, enableLazyLoadImage, base64 = IMAGE_PLACEHOLDER, alt = NEXT_IMAGE_CONFIG.DEFAULT_ALT, src = NEXT_IMAGE_CONFIG.DEFAULT_SRC } = props;
|
|
5
|
+
const { width = NEXT_IMAGE_CONFIG.DEFAULT_WIDTH_PROPS, height = NEXT_IMAGE_CONFIG.DEFAULT_HEIGHT_PROPS, quality, priority, isNotLazyload, enableLazyLoadImage, base64 = IMAGE_PLACEHOLDER, alt = NEXT_IMAGE_CONFIG.DEFAULT_ALT, src = NEXT_IMAGE_CONFIG.DEFAULT_SRC } = props;
|
|
6
6
|
const hasLazyLoad = !isNotLazyload && enableLazyLoadImage && !priority;
|
|
7
7
|
const getLoadingAttrs = ()=>{
|
|
8
8
|
const lazyLoadAttrs = {
|
|
@@ -24,12 +24,12 @@ const getNextImageReactAttrs = (props)=>{
|
|
|
24
24
|
src,
|
|
25
25
|
alt,
|
|
26
26
|
width,
|
|
27
|
-
height
|
|
27
|
+
height,
|
|
28
|
+
quality
|
|
28
29
|
});
|
|
29
30
|
const baseAttrs = getBaseAttrs();
|
|
30
31
|
const loadingAttrs = createAttr(getLoadingAttrs());
|
|
31
32
|
return {
|
|
32
|
-
...props,
|
|
33
33
|
...baseAttrs,
|
|
34
34
|
...loadingAttrs
|
|
35
35
|
};
|
package/dist/esm/index.js
CHANGED
|
@@ -54,7 +54,7 @@ export { default as Image } from './image/components/Image.js';
|
|
|
54
54
|
export { default as inputSetting } from './input/setting/index.js';
|
|
55
55
|
export { default as Input } from './input/Input.js';
|
|
56
56
|
export { default as lineSetting } from './line/setting/index.js';
|
|
57
|
-
export { default as Line } from './line/Line.js';
|
|
57
|
+
export { default as Line } from './line/components/Line.js';
|
|
58
58
|
export { default as linkSetting } from './link/setting/index.js';
|
|
59
59
|
export { default as Link } from './link/components/Link.js';
|
|
60
60
|
export { default as modalSetting } from './modal/setting/index.js';
|
|
@@ -215,6 +215,7 @@ export { default as GloColorSwatchvariantImage } from './third-party/components/
|
|
|
215
215
|
export { default as BfSizeChartSizeGuide } from './third-party/components/BfSizeChartSizeGuide.js';
|
|
216
216
|
export { default as AlsoBoughtCbb } from './third-party/components/AlsoBoughtCbb.js';
|
|
217
217
|
export { default as HextomFreeShippingBar } from './third-party/components/HextomFreeShippingBar.js';
|
|
218
|
+
export { default as EcoboostifyShoppableReelUgc } from './third-party/components/EcoboostifyShoppableReelUgc.js';
|
|
218
219
|
export { default as thirdPartyInstantSetting } from './third-party-instant/setting/index.js';
|
|
219
220
|
export { default as InstantJudgemeReviews } from './third-party-instant/components/InstantJudgemeReviews.js';
|
|
220
221
|
export { default as InstantLooxReviews } from './third-party-instant/components/InstantLooxReviews.js';
|
|
@@ -243,6 +244,7 @@ export { default as TextField } from './form/components/textfield/TextField.js';
|
|
|
243
244
|
export { default as FormTextarea } from './form/components/textarea/TextArea.js';
|
|
244
245
|
export { default as FormDropdown } from './form/components/form-dropdown/FormDropdown.js';
|
|
245
246
|
export { default as FormCheckbox } from './form/components/form-checkbox/FormCheckbox.js';
|
|
247
|
+
export { default as TextInput } from './form/components/textinput/TextInput.js';
|
|
246
248
|
export { default as imageDetectionSetting } from './image-detection/setting/index.js';
|
|
247
249
|
export { default as ImageDetection } from './image-detection/ImageDetection.js';
|
|
248
250
|
export { default as imageComparisonSetting } from './image-comparison/setting/index.js';
|
|
@@ -312,6 +314,6 @@ import 'react/jsx-runtime';
|
|
|
312
314
|
import 'react';
|
|
313
315
|
import '@gem-sdk/core';
|
|
314
316
|
export { ELEMENT_Z_INDEX } from './common/const.js';
|
|
315
|
-
export { filterTruthyObject, filterTruthyStyles, getDynamicSourceLocales, getInsertLinkData, getLinkData, getSettingPreloadData, getStaticLocale, isHexTransparent, isTransparentColor, isTransparentRGBA, replaceLinkData, youtubeShortsRegex } from './helpers.js';
|
|
317
|
+
export { filterTruthyObject, filterTruthyStyles, getDynamicSourceLocales, getInsertLinkData, getLinkData, getSettingPreloadData, getStaticLocale, isHexTransparent, isMobile, isTransparentColor, isTransparentRGBA, replaceLinkData, youtubeShortsRegex } from './helpers.js';
|
|
316
318
|
export { default as postPurchaseTextSetting } from './post-purchase/text/settings/index.js';
|
|
317
319
|
export { default as PostPurchaseText } from './post-purchase/text/components/Text.js';
|
package/dist/esm/index.liquid.js
CHANGED
|
@@ -30,9 +30,9 @@ export { default as FileUpload } from './product/components/FileUpload/component
|
|
|
30
30
|
export { default as Heading } from './heading/Heading.liquid.js';
|
|
31
31
|
export { default as CarouselItem } from './carousel/components/CarouselItem.liquid.js';
|
|
32
32
|
export { default as Carousel } from './carousel/components/Carousel.liquid.js';
|
|
33
|
-
export { default as Line } from './line/Line.liquid.js';
|
|
33
|
+
export { default as Line } from './line/components/Line.liquid.js';
|
|
34
34
|
export { default as IconListHoz } from './icon-list-hoz/components/IconListHoz.liquid.js';
|
|
35
|
-
export { default as
|
|
35
|
+
export { default as IconListHozItem } from './icon-list-hoz/components/IconListIHozItem.liquid.js';
|
|
36
36
|
export { default as IconListItem } from './icon-list/components/IconListItem.liquid.js';
|
|
37
37
|
export { default as IconList } from './icon-list/components/IconList.liquid.js';
|
|
38
38
|
export { default as Countdown } from './countdown-timer/components/Countdown.liquid.js';
|
|
@@ -55,6 +55,7 @@ export { default as TextField } from './form/components/textfield/TextField.liqu
|
|
|
55
55
|
export { default as FormTextarea } from './form/components/textarea/TextArea.liquid.js';
|
|
56
56
|
export { default as FormDropdown } from './form/components/form-dropdown/FormDropdown.liquid.js';
|
|
57
57
|
export { default as FormCheckbox } from './form/components/form-checkbox/FormCheckbox.liquid.js';
|
|
58
|
+
export { default as TextInput } from './form/components/textinput/TextInput.liquid.js';
|
|
58
59
|
export { default as CollectionToolbar } from './collection/components/CollectionToolbar.liquid.js';
|
|
59
60
|
export { default as CollectionTitle } from './collection/components/CollectionTitle.liquid.js';
|
|
60
61
|
export { default as CollectionDescription } from './collection/components/CollectionDescription.liquid.js';
|
|
@@ -170,6 +171,7 @@ export { default as GloColorSwatchvariantImage } from './third-party/components/
|
|
|
170
171
|
export { default as BfSizeChartSizeGuide } from './third-party/components/BfSizeChartSizeGuide.liquid.js';
|
|
171
172
|
export { default as AlsoBoughtCbb } from './third-party/components/AlsoBoughtCbb.liquid.js';
|
|
172
173
|
export { default as HextomFreeShippingBar } from './third-party/components/HextomFreeShippingBar.liquid.js';
|
|
174
|
+
export { default as EcoboostifyShoppableReelUgc } from './third-party/components/EcoboostifyShoppableReelUgc.liquid.js';
|
|
173
175
|
export { default as TrustshopProductReviews } from './third-party/components/TrustshopProductReviews.liquid.js';
|
|
174
176
|
export { default as StellarDeliveryDatePickup } from './third-party/components/StellarDeliveryDatePickup.liquid.js';
|
|
175
177
|
export { default as ImageComparison } from './image-comparison/components/ImageComparison.liquid.js';
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { cls, composeTypographyClassName } from '@gem-sdk/core';
|
|
2
|
+
|
|
3
|
+
const getClassContainerLine = ({ className, styles, advanced })=>{
|
|
4
|
+
const { align } = styles ?? {};
|
|
5
|
+
return composeClasses(cls('gp-flex', {
|
|
6
|
+
'gp-justify-start': align?.desktop === 'left',
|
|
7
|
+
'gp-justify-center': align?.desktop === 'center',
|
|
8
|
+
'gp-justify-end': align?.desktop === 'right',
|
|
9
|
+
'tablet:gp-justify-start': align?.tablet === 'left',
|
|
10
|
+
'tablet:gp-justify-center': align?.tablet === 'center',
|
|
11
|
+
'tablet:gp-justify-end': align?.tablet === 'right',
|
|
12
|
+
'mobile:gp-justify-start': align?.mobile === 'left',
|
|
13
|
+
'mobile:gp-justify-center': align?.mobile === 'center',
|
|
14
|
+
'mobile:gp-justify-end': align?.mobile === 'right'
|
|
15
|
+
}, className, advanced?.cssClass));
|
|
16
|
+
};
|
|
17
|
+
const getClassWrapNotIcon = ({ className, setting })=>{
|
|
18
|
+
const { enableIconText } = setting ?? {};
|
|
19
|
+
return composeClasses(cls({
|
|
20
|
+
'gp-hidden': enableIconText?.desktop,
|
|
21
|
+
'gp-block': !enableIconText?.desktop,
|
|
22
|
+
'tablet:gp-hidden': enableIconText?.tablet,
|
|
23
|
+
'tablet:gp-block': !enableIconText?.tablet,
|
|
24
|
+
'mobile:gp-hidden': enableIconText?.mobile,
|
|
25
|
+
'mobile:gp-block': !enableIconText?.mobile
|
|
26
|
+
}, className));
|
|
27
|
+
};
|
|
28
|
+
const getClassWrapIcon = ({ className, setting })=>{
|
|
29
|
+
const { enableIconText } = setting ?? {};
|
|
30
|
+
return composeClasses(cls('gp-items-center', {
|
|
31
|
+
'gp-hidden': !enableIconText?.desktop,
|
|
32
|
+
'gp-flex': enableIconText?.desktop,
|
|
33
|
+
'tablet:gp-hidden': !enableIconText?.tablet,
|
|
34
|
+
'tablet:gp-flex': enableIconText?.tablet,
|
|
35
|
+
'mobile:gp-hidden': !enableIconText?.mobile,
|
|
36
|
+
'mobile:gp-flex': enableIconText?.mobile
|
|
37
|
+
}, className));
|
|
38
|
+
};
|
|
39
|
+
const getClassIcon = ()=>{
|
|
40
|
+
return composeClasses(cls('gp-inline-flex gp-flex-none gp-items-center gp-justify-center'));
|
|
41
|
+
};
|
|
42
|
+
const getClassText = ({ styles })=>{
|
|
43
|
+
const appendTypoClass = composeTypographyClassName(styles?.typo, styles?.typography);
|
|
44
|
+
return composeClasses(cls('gp-inline-flex gp-flex-none gp-items-center gp-justify-center', appendTypoClass));
|
|
45
|
+
};
|
|
46
|
+
const getClassContainerDivider = ({ className, fixedSide, config })=>{
|
|
47
|
+
return composeClasses(cls({
|
|
48
|
+
'gp-hidden': config?.position === fixedSide,
|
|
49
|
+
'gp-flex': config?.position !== fixedSide
|
|
50
|
+
}, className));
|
|
51
|
+
};
|
|
52
|
+
function composeClasses(classList) {
|
|
53
|
+
return classList.split(' ').reduce((acc, item)=>{
|
|
54
|
+
acc[item] = true;
|
|
55
|
+
return acc;
|
|
56
|
+
}, {});
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export { getClassContainerDivider, getClassContainerLine, getClassIcon, getClassText, getClassWrapIcon, getClassWrapNotIcon };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
const getConfigLine = ({ styles, setting })=>{
|
|
2
|
+
const { fullWidth, width, color, thickness, lineStyle } = styles ?? {};
|
|
3
|
+
const { position } = setting ?? {};
|
|
4
|
+
return {
|
|
5
|
+
fullWidth,
|
|
6
|
+
width,
|
|
7
|
+
position,
|
|
8
|
+
color,
|
|
9
|
+
lineStyle,
|
|
10
|
+
thickness
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
export { getConfigLine };
|