@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
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var core = require('@gem-sdk/core');
|
|
4
|
+
|
|
5
|
+
const getStyleWrapNotIcon = ({ styles })=>{
|
|
6
|
+
const { width, lineStyle, thickness, transform, customTransform, color } = styles ?? {};
|
|
7
|
+
return {
|
|
8
|
+
...wWidthFull(width ?? {}),
|
|
9
|
+
...core.makeStyleResponsive('bs', lineStyle),
|
|
10
|
+
...core.makeStyleResponsive('bbw', thicknessToUnit(thickness)),
|
|
11
|
+
...core.makeStyle({
|
|
12
|
+
t: `gp-rotate(${getTransformAngle(transform, customTransform)}deg)`
|
|
13
|
+
}),
|
|
14
|
+
...core.makeStyle({
|
|
15
|
+
bc: core.getSingleColorVariable(color)
|
|
16
|
+
})
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
const getStyleWrapIcon = ({ styles })=>{
|
|
20
|
+
const { width, transform, customTransform, color } = styles ?? {};
|
|
21
|
+
return {
|
|
22
|
+
...wWidthFull(width ?? {}),
|
|
23
|
+
...core.makeStyle({
|
|
24
|
+
bc: core.getSingleColorVariable(color)
|
|
25
|
+
}),
|
|
26
|
+
...core.makeStyle({
|
|
27
|
+
t: `gp-rotate(${getTransformAngle(transform, customTransform)}deg)`
|
|
28
|
+
})
|
|
29
|
+
};
|
|
30
|
+
};
|
|
31
|
+
const getStyleIcon = ({ styles, setting })=>{
|
|
32
|
+
const { position } = setting ?? {};
|
|
33
|
+
const { iconSpacing, iconSize, iconColor, iconRotate } = styles ?? {};
|
|
34
|
+
return {
|
|
35
|
+
...getStyleSpacing(iconSpacing, position),
|
|
36
|
+
...core.makeStyleResponsive('w', iconSize),
|
|
37
|
+
...core.makeStyleResponsive('h', iconSize),
|
|
38
|
+
...core.makeStyle({
|
|
39
|
+
t: `gp-rotate(${iconRotate})`
|
|
40
|
+
}),
|
|
41
|
+
...core.makeStyle({
|
|
42
|
+
c: core.getSingleColorVariable(iconColor)
|
|
43
|
+
})
|
|
44
|
+
};
|
|
45
|
+
};
|
|
46
|
+
const getStyleContainerText = ({ styles })=>{
|
|
47
|
+
const { textColor, textSpacing, typo, typography } = styles ?? {};
|
|
48
|
+
const appendTypoStyle = core.composeTypographyStyle(typo, typography);
|
|
49
|
+
return {
|
|
50
|
+
...core.makeStyle({
|
|
51
|
+
tt: styles?.transform
|
|
52
|
+
}),
|
|
53
|
+
...appendTypoStyle,
|
|
54
|
+
...core.makeStyle({
|
|
55
|
+
c: core.getSingleColorVariable(textColor)
|
|
56
|
+
}),
|
|
57
|
+
...getStyleSpacing(textSpacing)
|
|
58
|
+
};
|
|
59
|
+
};
|
|
60
|
+
const getStyleContainerDivider = ({ config })=>{
|
|
61
|
+
return {
|
|
62
|
+
...core.makeStyle({
|
|
63
|
+
bc: core.getSingleColorVariable(config?.color)
|
|
64
|
+
}),
|
|
65
|
+
...core.makeStyleResponsive('bs', config?.lineStyle),
|
|
66
|
+
...core.makeStyleResponsive('bbw', thicknessToUnit(config?.thickness)),
|
|
67
|
+
...core.makeStyleResponsive('minw', config?.width),
|
|
68
|
+
...wWidthFull(config?.width ?? {})
|
|
69
|
+
};
|
|
70
|
+
};
|
|
71
|
+
const getTransformAngle = (transform, customTransform)=>{
|
|
72
|
+
switch(transform){
|
|
73
|
+
case 'horizontal':
|
|
74
|
+
return 0;
|
|
75
|
+
case 'vertical':
|
|
76
|
+
return 90;
|
|
77
|
+
case 'custom':
|
|
78
|
+
return customTransform || 0;
|
|
79
|
+
default:
|
|
80
|
+
return 0;
|
|
81
|
+
}
|
|
82
|
+
};
|
|
83
|
+
const wWidthFull = (width)=>{
|
|
84
|
+
Object.keys(width).forEach((key)=>{
|
|
85
|
+
if (width[key] === 'default') {
|
|
86
|
+
width[key] = '1200px';
|
|
87
|
+
}
|
|
88
|
+
});
|
|
89
|
+
return core.makeStyleResponsive('w', core.makeWidth(width));
|
|
90
|
+
};
|
|
91
|
+
const thicknessToUnit = (thickness)=>{
|
|
92
|
+
return {
|
|
93
|
+
desktop: thickness?.desktop ? `${thickness.desktop}px` : '1px',
|
|
94
|
+
tablet: thickness?.desktop ? `${thickness.tablet}px` : '1px',
|
|
95
|
+
mobile: thickness?.desktop ? `${thickness.mobile}px` : '1px'
|
|
96
|
+
};
|
|
97
|
+
};
|
|
98
|
+
const getStyleSpacing = (spacing, position)=>{
|
|
99
|
+
switch(position){
|
|
100
|
+
case 'left':
|
|
101
|
+
return core.makeStyle({
|
|
102
|
+
mr: spacing
|
|
103
|
+
});
|
|
104
|
+
case 'right':
|
|
105
|
+
return core.makeStyle({
|
|
106
|
+
ml: spacing
|
|
107
|
+
});
|
|
108
|
+
default:
|
|
109
|
+
return core.makeStyle({
|
|
110
|
+
mr: spacing,
|
|
111
|
+
ml: spacing
|
|
112
|
+
});
|
|
113
|
+
}
|
|
114
|
+
};
|
|
115
|
+
|
|
116
|
+
exports.getStyleContainerDivider = getStyleContainerDivider;
|
|
117
|
+
exports.getStyleContainerText = getStyleContainerText;
|
|
118
|
+
exports.getStyleIcon = getStyleIcon;
|
|
119
|
+
exports.getStyleWrapIcon = getStyleWrapIcon;
|
|
120
|
+
exports.getStyleWrapNotIcon = getStyleWrapNotIcon;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
5
|
+
|
|
6
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
7
|
+
var system = require('@gem-sdk/system');
|
|
8
|
+
var classes = require('../common/classes.js');
|
|
9
|
+
var styles = require('../common/styles.js');
|
|
10
|
+
|
|
11
|
+
const Divider = ({ className, fixedSide, config })=>{
|
|
12
|
+
const classContainerDivider = system.createClass(classes.getClassContainerDivider({
|
|
13
|
+
className,
|
|
14
|
+
fixedSide,
|
|
15
|
+
config
|
|
16
|
+
}));
|
|
17
|
+
const styleContainerDivider = styles.getStyleContainerDivider({
|
|
18
|
+
config
|
|
19
|
+
});
|
|
20
|
+
return /*#__PURE__*/ jsxRuntime.jsx("div", {
|
|
21
|
+
className: classContainerDivider,
|
|
22
|
+
style: styleContainerDivider
|
|
23
|
+
});
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
exports.default = Divider;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var core = require('@gem-sdk/core');
|
|
6
|
+
var system = require('@gem-sdk/system');
|
|
7
|
+
var classes = require('../common/classes.js');
|
|
8
|
+
var styles = require('../common/styles.js');
|
|
9
|
+
|
|
10
|
+
const Divider = ({ className, fixedSide, config })=>{
|
|
11
|
+
const classContainerDivider = system.createClass(classes.getClassContainerDivider({
|
|
12
|
+
className,
|
|
13
|
+
fixedSide,
|
|
14
|
+
config
|
|
15
|
+
}));
|
|
16
|
+
const styleContainerDivider = styles.getStyleContainerDivider({
|
|
17
|
+
config
|
|
18
|
+
});
|
|
19
|
+
return core.template`<div class="${classContainerDivider}" style="${styleContainerDivider}" />`;
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
exports.default = Divider;
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
5
|
+
|
|
6
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
7
|
+
var Divider = require('./Divider.js');
|
|
8
|
+
var system = require('@gem-sdk/system');
|
|
9
|
+
var classes = require('../common/classes.js');
|
|
10
|
+
var styles = require('../common/styles.js');
|
|
11
|
+
var index = require('../common/index.js');
|
|
12
|
+
|
|
13
|
+
const Line = (props)=>{
|
|
14
|
+
const { className, setting, styles: styles$1, advanced, builderProps } = props;
|
|
15
|
+
const { text, iconSvg } = setting ?? {};
|
|
16
|
+
const configLine = index.getConfigLine({
|
|
17
|
+
styles: styles$1,
|
|
18
|
+
setting
|
|
19
|
+
});
|
|
20
|
+
const classContainerLine = system.createClass(classes.getClassContainerLine({
|
|
21
|
+
className,
|
|
22
|
+
styles: styles$1,
|
|
23
|
+
advanced
|
|
24
|
+
}));
|
|
25
|
+
const classWrapNotIcon = system.createClass(classes.getClassWrapNotIcon({
|
|
26
|
+
className,
|
|
27
|
+
setting
|
|
28
|
+
}));
|
|
29
|
+
const classWrapIcon = system.createClass(classes.getClassWrapIcon({
|
|
30
|
+
className,
|
|
31
|
+
setting
|
|
32
|
+
}));
|
|
33
|
+
const classIcon = system.createClass(classes.getClassIcon());
|
|
34
|
+
const classText = system.createClass(classes.getClassText({
|
|
35
|
+
styles: styles$1
|
|
36
|
+
}));
|
|
37
|
+
const styleWrapNotIcon = system.createStyle(styles.getStyleWrapNotIcon({
|
|
38
|
+
styles: styles$1
|
|
39
|
+
}));
|
|
40
|
+
const styleWrapIcon = system.createStyle(styles.getStyleWrapIcon({
|
|
41
|
+
styles: styles$1
|
|
42
|
+
}));
|
|
43
|
+
const styleIcon = system.createStyle(styles.getStyleIcon({
|
|
44
|
+
styles: styles$1,
|
|
45
|
+
setting
|
|
46
|
+
}));
|
|
47
|
+
const styleContainerText = system.createStyle(styles.getStyleContainerText({
|
|
48
|
+
styles: styles$1
|
|
49
|
+
}));
|
|
50
|
+
const propsDividerLeft = {
|
|
51
|
+
config: configLine,
|
|
52
|
+
fixedSide: 'left',
|
|
53
|
+
className
|
|
54
|
+
};
|
|
55
|
+
const propsDividerRight = {
|
|
56
|
+
config: configLine,
|
|
57
|
+
fixedSide: 'right',
|
|
58
|
+
className
|
|
59
|
+
};
|
|
60
|
+
return /*#__PURE__*/ jsxRuntime.jsxs("div", {
|
|
61
|
+
"data-id": builderProps?.uid,
|
|
62
|
+
className: classContainerLine,
|
|
63
|
+
children: [
|
|
64
|
+
/*#__PURE__*/ jsxRuntime.jsx("div", {
|
|
65
|
+
style: styleWrapNotIcon,
|
|
66
|
+
className: classWrapNotIcon
|
|
67
|
+
}),
|
|
68
|
+
/*#__PURE__*/ jsxRuntime.jsxs("div", {
|
|
69
|
+
className: classWrapIcon,
|
|
70
|
+
style: styleWrapIcon,
|
|
71
|
+
children: [
|
|
72
|
+
/*#__PURE__*/ jsxRuntime.jsx(Divider.default, {
|
|
73
|
+
...propsDividerLeft
|
|
74
|
+
}),
|
|
75
|
+
system.If(!!iconSvg, /*#__PURE__*/ jsxRuntime.jsx("span", {
|
|
76
|
+
className: classIcon,
|
|
77
|
+
style: styleIcon,
|
|
78
|
+
dangerouslySetInnerHTML: {
|
|
79
|
+
__html: iconSvg ?? ''
|
|
80
|
+
}
|
|
81
|
+
})),
|
|
82
|
+
system.If(!!text, /*#__PURE__*/ jsxRuntime.jsx("span", {
|
|
83
|
+
className: classText,
|
|
84
|
+
style: styleContainerText,
|
|
85
|
+
dangerouslySetInnerHTML: {
|
|
86
|
+
__html: text ?? ''
|
|
87
|
+
}
|
|
88
|
+
})),
|
|
89
|
+
/*#__PURE__*/ jsxRuntime.jsx(Divider.default, {
|
|
90
|
+
...propsDividerRight
|
|
91
|
+
})
|
|
92
|
+
]
|
|
93
|
+
})
|
|
94
|
+
]
|
|
95
|
+
});
|
|
96
|
+
};
|
|
97
|
+
|
|
98
|
+
exports.default = Line;
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var core = require('@gem-sdk/core');
|
|
6
|
+
var Divider_liquid = require('./Divider.liquid.js');
|
|
7
|
+
var system = require('@gem-sdk/system');
|
|
8
|
+
var classes = require('../common/classes.js');
|
|
9
|
+
var styles = require('../common/styles.js');
|
|
10
|
+
var index = require('../common/index.js');
|
|
11
|
+
|
|
12
|
+
const Line = (props)=>{
|
|
13
|
+
const { className, setting, styles: styles$1, advanced, builderProps } = props;
|
|
14
|
+
const { text, iconSvg } = setting ?? {};
|
|
15
|
+
const configLine = index.getConfigLine({
|
|
16
|
+
styles: styles$1,
|
|
17
|
+
setting
|
|
18
|
+
});
|
|
19
|
+
const classContainerLine = system.createClass(classes.getClassContainerLine({
|
|
20
|
+
className,
|
|
21
|
+
styles: styles$1,
|
|
22
|
+
advanced
|
|
23
|
+
}));
|
|
24
|
+
const classWrapNotIcon = system.createClass(classes.getClassWrapNotIcon({
|
|
25
|
+
className,
|
|
26
|
+
setting
|
|
27
|
+
}));
|
|
28
|
+
const classWrapIcon = system.createClass(classes.getClassWrapIcon({
|
|
29
|
+
className,
|
|
30
|
+
setting
|
|
31
|
+
}));
|
|
32
|
+
const classIcon = system.createClass(classes.getClassIcon());
|
|
33
|
+
const classText = system.createClass(classes.getClassText({
|
|
34
|
+
styles: styles$1
|
|
35
|
+
}));
|
|
36
|
+
const styleWrapNotIcon = system.createStyle(styles.getStyleWrapNotIcon({
|
|
37
|
+
styles: styles$1
|
|
38
|
+
}));
|
|
39
|
+
const styleWrapIcon = system.createStyle(styles.getStyleWrapIcon({
|
|
40
|
+
styles: styles$1
|
|
41
|
+
}));
|
|
42
|
+
const styleIcon = system.createStyle(styles.getStyleIcon({
|
|
43
|
+
styles: styles$1,
|
|
44
|
+
setting
|
|
45
|
+
}));
|
|
46
|
+
const styleContainerText = system.createStyle(styles.getStyleContainerText({
|
|
47
|
+
styles: styles$1
|
|
48
|
+
}));
|
|
49
|
+
const propsDividerLeft = {
|
|
50
|
+
config: configLine,
|
|
51
|
+
fixedSide: 'left',
|
|
52
|
+
className
|
|
53
|
+
};
|
|
54
|
+
const propsDividerRight = {
|
|
55
|
+
config: configLine,
|
|
56
|
+
fixedSide: 'right',
|
|
57
|
+
className
|
|
58
|
+
};
|
|
59
|
+
return core.template`
|
|
60
|
+
<div data-id="${builderProps?.uid}" class="${classContainerLine}">
|
|
61
|
+
<div style="${styleWrapNotIcon}" class="${classWrapNotIcon}"/>
|
|
62
|
+
<div class="${classWrapIcon}" style="${styleWrapIcon}">
|
|
63
|
+
${Divider_liquid.default(propsDividerLeft)}
|
|
64
|
+
${system.If(!!iconSvg, core.template`
|
|
65
|
+
<span
|
|
66
|
+
class="${classIcon}"
|
|
67
|
+
style="${styleIcon}"
|
|
68
|
+
>
|
|
69
|
+
${iconSvg}
|
|
70
|
+
</span>
|
|
71
|
+
`)}
|
|
72
|
+
${system.If(!!text, core.template`
|
|
73
|
+
<span
|
|
74
|
+
class="${classText}"
|
|
75
|
+
style="${styleContainerText}"
|
|
76
|
+
>
|
|
77
|
+
${text}
|
|
78
|
+
</span>
|
|
79
|
+
`)}
|
|
80
|
+
${Divider_liquid.default(propsDividerRight)}
|
|
81
|
+
</div>
|
|
82
|
+
</div>
|
|
83
|
+
`;
|
|
84
|
+
};
|
|
85
|
+
|
|
86
|
+
exports.default = Line;
|
package/dist/cjs/line/next.js
CHANGED
|
@@ -8,7 +8,7 @@ require('react/jsx-runtime');
|
|
|
8
8
|
require('react');
|
|
9
9
|
require('@gem-sdk/core');
|
|
10
10
|
|
|
11
|
-
const Line = dynamic(()=>Promise.resolve().then(function () { return require('./Line.js'); }), {
|
|
11
|
+
const Line = dynamic(()=>Promise.resolve().then(function () { return require('./components/Line.js'); }), {
|
|
12
12
|
loading: Loading.default
|
|
13
13
|
});
|
|
14
14
|
var line = {
|
|
@@ -156,7 +156,7 @@ const ProductVariantsSettingUIV2 = [
|
|
|
156
156
|
setting: {
|
|
157
157
|
id: 'align'
|
|
158
158
|
},
|
|
159
|
-
conditionEnable: '!(parseInt(width)
|
|
159
|
+
conditionEnable: '!(parseInt(width) >= 100 && width?.includes("%"))',
|
|
160
160
|
options: {
|
|
161
161
|
labelVariant: 'primary',
|
|
162
162
|
fullWidth: true,
|
|
@@ -43,7 +43,7 @@ const Settings = [
|
|
|
43
43
|
id: 'arrangeContent',
|
|
44
44
|
label: 'Arrange content',
|
|
45
45
|
type: 'segment',
|
|
46
|
-
default: '
|
|
46
|
+
default: 'left',
|
|
47
47
|
options: [
|
|
48
48
|
{
|
|
49
49
|
label: 'Left',
|
|
@@ -127,13 +127,13 @@ const Settings = [
|
|
|
127
127
|
id: 'isRequired',
|
|
128
128
|
label: 'Required',
|
|
129
129
|
type: 'toggle',
|
|
130
|
-
default:
|
|
130
|
+
default: true
|
|
131
131
|
},
|
|
132
132
|
{
|
|
133
133
|
id: 'isShowPreviewImage',
|
|
134
134
|
label: 'Click image to preview',
|
|
135
135
|
type: 'toggle',
|
|
136
|
-
default:
|
|
136
|
+
default: true
|
|
137
137
|
},
|
|
138
138
|
{
|
|
139
139
|
id: 'numberOfFiles',
|
|
@@ -161,7 +161,7 @@ const Settings = [
|
|
|
161
161
|
{
|
|
162
162
|
id: 'iconVisible',
|
|
163
163
|
label: 'Icon Visible',
|
|
164
|
-
type: '
|
|
164
|
+
type: 'toggle',
|
|
165
165
|
default: true
|
|
166
166
|
},
|
|
167
167
|
{
|
|
@@ -327,10 +327,11 @@ const Settings = [
|
|
|
327
327
|
controls: [
|
|
328
328
|
{
|
|
329
329
|
id: 'backgroundColor',
|
|
330
|
-
type: '
|
|
330
|
+
type: 'color-picker-v2',
|
|
331
331
|
label: 'Background Color',
|
|
332
332
|
default: {
|
|
333
|
-
normal: '
|
|
333
|
+
normal: '#FFFFFF',
|
|
334
|
+
hover: '#DDDDDD'
|
|
334
335
|
},
|
|
335
336
|
state: {
|
|
336
337
|
hover: true,
|
|
@@ -339,10 +340,11 @@ const Settings = [
|
|
|
339
340
|
},
|
|
340
341
|
{
|
|
341
342
|
id: 'textColor',
|
|
342
|
-
type: '
|
|
343
|
+
type: 'color-picker-v2',
|
|
343
344
|
label: 'Text Color',
|
|
344
345
|
default: {
|
|
345
|
-
normal: 'text-1'
|
|
346
|
+
normal: 'text-1',
|
|
347
|
+
hover: 'transparent'
|
|
346
348
|
},
|
|
347
349
|
state: {
|
|
348
350
|
hover: true,
|
|
@@ -361,6 +363,9 @@ const Settings = [
|
|
|
361
363
|
borderWidth: '1px',
|
|
362
364
|
width: '1px 1px 1px 1px',
|
|
363
365
|
color: '#BBBBBB'
|
|
366
|
+
},
|
|
367
|
+
hover: {
|
|
368
|
+
border: 'none'
|
|
364
369
|
}
|
|
365
370
|
},
|
|
366
371
|
state: {
|
|
@@ -373,8 +378,8 @@ const Settings = [
|
|
|
373
378
|
type: 'toggle',
|
|
374
379
|
label: 'Enable Button Shadow',
|
|
375
380
|
default: {
|
|
376
|
-
normal:
|
|
377
|
-
hover:
|
|
381
|
+
normal: true,
|
|
382
|
+
hover: true
|
|
378
383
|
},
|
|
379
384
|
state: {
|
|
380
385
|
normal: true,
|
|
@@ -389,16 +394,6 @@ const Settings = [
|
|
|
389
394
|
normal: true,
|
|
390
395
|
hover: true
|
|
391
396
|
},
|
|
392
|
-
default: {
|
|
393
|
-
normal: {
|
|
394
|
-
type: 'shadow-1',
|
|
395
|
-
distance: '4px',
|
|
396
|
-
blur: '12px',
|
|
397
|
-
spread: '0px',
|
|
398
|
-
color: 'rgba(0, 0, 0, 0.20)',
|
|
399
|
-
angle: 90
|
|
400
|
-
}
|
|
401
|
-
},
|
|
402
397
|
state: {
|
|
403
398
|
normal: true,
|
|
404
399
|
hover: true
|
|
@@ -410,11 +405,14 @@ const Settings = [
|
|
|
410
405
|
label: 'Border Radius',
|
|
411
406
|
default: {
|
|
412
407
|
normal: {
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
408
|
+
btrr: '8px',
|
|
409
|
+
bblr: '8px',
|
|
410
|
+
bbrr: '8px',
|
|
411
|
+
btlr: '8px',
|
|
412
|
+
radiusType: 'rounded'
|
|
413
|
+
},
|
|
414
|
+
hover: {
|
|
415
|
+
radiusType: 'none'
|
|
418
416
|
}
|
|
419
417
|
},
|
|
420
418
|
state: {
|
|
@@ -428,7 +426,7 @@ const Settings = [
|
|
|
428
426
|
id: 'typo',
|
|
429
427
|
type: 'typography-v2',
|
|
430
428
|
default: {
|
|
431
|
-
type: 'paragraph-
|
|
429
|
+
type: 'paragraph-1',
|
|
432
430
|
attrs: {
|
|
433
431
|
color: 'text-1'
|
|
434
432
|
}
|