@gem-sdk/components 2.0.0-dev.294 → 2.0.0-dev.304
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/banner/setting/presets/heroBanner1Col.js +14 -0
- package/dist/cjs/banner/setting/presets/heroBannerContentLeft.js +13 -0
- package/dist/cjs/banner/setting/presets/heroBannerContentRight.js +12 -0
- package/dist/cjs/banner/setting/presets/heroBannerParallax.js +14 -0
- package/dist/cjs/banner/setting/setting.js +6 -18
- package/dist/cjs/banner/setting/uiV1.js +1 -2
- package/dist/cjs/banner/setting/uiV2.js +4 -5
- 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/form-dropdown/configs/uiV2.js +12 -0
- 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/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/ProductTag.js +9 -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-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/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/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/banner/setting/presets/heroBanner1Col.js +14 -0
- package/dist/esm/banner/setting/presets/heroBannerContentLeft.js +13 -0
- package/dist/esm/banner/setting/presets/heroBannerContentRight.js +12 -0
- package/dist/esm/banner/setting/presets/heroBannerParallax.js +14 -0
- package/dist/esm/banner/setting/setting.js +6 -18
- package/dist/esm/banner/setting/uiV1.js +1 -2
- package/dist/esm/banner/setting/uiV2.js +4 -5
- 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/form-dropdown/configs/uiV2.js +12 -0
- 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/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/ProductTag.js +10 -2
- 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-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/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/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,94 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
3
|
+
import Divider from './Divider.js';
|
|
4
|
+
import { createClass, createStyle, If } from '@gem-sdk/system';
|
|
5
|
+
import { getClassContainerLine, getClassWrapNotIcon, getClassWrapIcon, getClassIcon, getClassText } from '../common/classes.js';
|
|
6
|
+
import { getStyleWrapNotIcon, getStyleWrapIcon, getStyleIcon, getStyleContainerText } from '../common/styles.js';
|
|
7
|
+
import { getConfigLine } from '../common/index.js';
|
|
8
|
+
|
|
9
|
+
const Line = (props)=>{
|
|
10
|
+
const { className, setting, styles, advanced, builderProps } = props;
|
|
11
|
+
const { text, iconSvg } = setting ?? {};
|
|
12
|
+
const configLine = getConfigLine({
|
|
13
|
+
styles,
|
|
14
|
+
setting
|
|
15
|
+
});
|
|
16
|
+
const classContainerLine = createClass(getClassContainerLine({
|
|
17
|
+
className,
|
|
18
|
+
styles,
|
|
19
|
+
advanced
|
|
20
|
+
}));
|
|
21
|
+
const classWrapNotIcon = createClass(getClassWrapNotIcon({
|
|
22
|
+
className,
|
|
23
|
+
setting
|
|
24
|
+
}));
|
|
25
|
+
const classWrapIcon = createClass(getClassWrapIcon({
|
|
26
|
+
className,
|
|
27
|
+
setting
|
|
28
|
+
}));
|
|
29
|
+
const classIcon = createClass(getClassIcon());
|
|
30
|
+
const classText = createClass(getClassText({
|
|
31
|
+
styles
|
|
32
|
+
}));
|
|
33
|
+
const styleWrapNotIcon = createStyle(getStyleWrapNotIcon({
|
|
34
|
+
styles
|
|
35
|
+
}));
|
|
36
|
+
const styleWrapIcon = createStyle(getStyleWrapIcon({
|
|
37
|
+
styles
|
|
38
|
+
}));
|
|
39
|
+
const styleIcon = createStyle(getStyleIcon({
|
|
40
|
+
styles,
|
|
41
|
+
setting
|
|
42
|
+
}));
|
|
43
|
+
const styleContainerText = createStyle(getStyleContainerText({
|
|
44
|
+
styles
|
|
45
|
+
}));
|
|
46
|
+
const propsDividerLeft = {
|
|
47
|
+
config: configLine,
|
|
48
|
+
fixedSide: 'left',
|
|
49
|
+
className
|
|
50
|
+
};
|
|
51
|
+
const propsDividerRight = {
|
|
52
|
+
config: configLine,
|
|
53
|
+
fixedSide: 'right',
|
|
54
|
+
className
|
|
55
|
+
};
|
|
56
|
+
return /*#__PURE__*/ jsxs("div", {
|
|
57
|
+
"data-id": builderProps?.uid,
|
|
58
|
+
className: classContainerLine,
|
|
59
|
+
children: [
|
|
60
|
+
/*#__PURE__*/ jsx("div", {
|
|
61
|
+
style: styleWrapNotIcon,
|
|
62
|
+
className: classWrapNotIcon
|
|
63
|
+
}),
|
|
64
|
+
/*#__PURE__*/ jsxs("div", {
|
|
65
|
+
className: classWrapIcon,
|
|
66
|
+
style: styleWrapIcon,
|
|
67
|
+
children: [
|
|
68
|
+
/*#__PURE__*/ jsx(Divider, {
|
|
69
|
+
...propsDividerLeft
|
|
70
|
+
}),
|
|
71
|
+
If(!!iconSvg, /*#__PURE__*/ jsx("span", {
|
|
72
|
+
className: classIcon,
|
|
73
|
+
style: styleIcon,
|
|
74
|
+
dangerouslySetInnerHTML: {
|
|
75
|
+
__html: iconSvg ?? ''
|
|
76
|
+
}
|
|
77
|
+
})),
|
|
78
|
+
If(!!text, /*#__PURE__*/ jsx("span", {
|
|
79
|
+
className: classText,
|
|
80
|
+
style: styleContainerText,
|
|
81
|
+
dangerouslySetInnerHTML: {
|
|
82
|
+
__html: text ?? ''
|
|
83
|
+
}
|
|
84
|
+
})),
|
|
85
|
+
/*#__PURE__*/ jsx(Divider, {
|
|
86
|
+
...propsDividerRight
|
|
87
|
+
})
|
|
88
|
+
]
|
|
89
|
+
})
|
|
90
|
+
]
|
|
91
|
+
});
|
|
92
|
+
};
|
|
93
|
+
|
|
94
|
+
export { Line as default };
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import { template } from '@gem-sdk/core';
|
|
2
|
+
import Divider from './Divider.liquid.js';
|
|
3
|
+
import { createClass, createStyle, If } from '@gem-sdk/system';
|
|
4
|
+
import { getClassContainerLine, getClassWrapNotIcon, getClassWrapIcon, getClassIcon, getClassText } from '../common/classes.js';
|
|
5
|
+
import { getStyleWrapNotIcon, getStyleWrapIcon, getStyleIcon, getStyleContainerText } from '../common/styles.js';
|
|
6
|
+
import { getConfigLine } from '../common/index.js';
|
|
7
|
+
|
|
8
|
+
const Line = (props)=>{
|
|
9
|
+
const { className, setting, styles, advanced, builderProps } = props;
|
|
10
|
+
const { text, iconSvg } = setting ?? {};
|
|
11
|
+
const configLine = getConfigLine({
|
|
12
|
+
styles,
|
|
13
|
+
setting
|
|
14
|
+
});
|
|
15
|
+
const classContainerLine = createClass(getClassContainerLine({
|
|
16
|
+
className,
|
|
17
|
+
styles,
|
|
18
|
+
advanced
|
|
19
|
+
}));
|
|
20
|
+
const classWrapNotIcon = createClass(getClassWrapNotIcon({
|
|
21
|
+
className,
|
|
22
|
+
setting
|
|
23
|
+
}));
|
|
24
|
+
const classWrapIcon = createClass(getClassWrapIcon({
|
|
25
|
+
className,
|
|
26
|
+
setting
|
|
27
|
+
}));
|
|
28
|
+
const classIcon = createClass(getClassIcon());
|
|
29
|
+
const classText = createClass(getClassText({
|
|
30
|
+
styles
|
|
31
|
+
}));
|
|
32
|
+
const styleWrapNotIcon = createStyle(getStyleWrapNotIcon({
|
|
33
|
+
styles
|
|
34
|
+
}));
|
|
35
|
+
const styleWrapIcon = createStyle(getStyleWrapIcon({
|
|
36
|
+
styles
|
|
37
|
+
}));
|
|
38
|
+
const styleIcon = createStyle(getStyleIcon({
|
|
39
|
+
styles,
|
|
40
|
+
setting
|
|
41
|
+
}));
|
|
42
|
+
const styleContainerText = createStyle(getStyleContainerText({
|
|
43
|
+
styles
|
|
44
|
+
}));
|
|
45
|
+
const propsDividerLeft = {
|
|
46
|
+
config: configLine,
|
|
47
|
+
fixedSide: 'left',
|
|
48
|
+
className
|
|
49
|
+
};
|
|
50
|
+
const propsDividerRight = {
|
|
51
|
+
config: configLine,
|
|
52
|
+
fixedSide: 'right',
|
|
53
|
+
className
|
|
54
|
+
};
|
|
55
|
+
return template`
|
|
56
|
+
<div data-id="${builderProps?.uid}" class="${classContainerLine}">
|
|
57
|
+
<div style="${styleWrapNotIcon}" class="${classWrapNotIcon}"/>
|
|
58
|
+
<div class="${classWrapIcon}" style="${styleWrapIcon}">
|
|
59
|
+
${Divider(propsDividerLeft)}
|
|
60
|
+
${If(!!iconSvg, template`
|
|
61
|
+
<span
|
|
62
|
+
class="${classIcon}"
|
|
63
|
+
style="${styleIcon}"
|
|
64
|
+
>
|
|
65
|
+
${iconSvg}
|
|
66
|
+
</span>
|
|
67
|
+
`)}
|
|
68
|
+
${If(!!text, template`
|
|
69
|
+
<span
|
|
70
|
+
class="${classText}"
|
|
71
|
+
style="${styleContainerText}"
|
|
72
|
+
>
|
|
73
|
+
${text}
|
|
74
|
+
</span>
|
|
75
|
+
`)}
|
|
76
|
+
${Divider(propsDividerRight)}
|
|
77
|
+
</div>
|
|
78
|
+
</div>
|
|
79
|
+
`;
|
|
80
|
+
};
|
|
81
|
+
|
|
82
|
+
export { Line as default };
|
package/dist/esm/line/next.js
CHANGED
|
@@ -154,7 +154,7 @@ const ProductVariantsSettingUIV2 = [
|
|
|
154
154
|
setting: {
|
|
155
155
|
id: 'align'
|
|
156
156
|
},
|
|
157
|
-
conditionEnable: '!(parseInt(width)
|
|
157
|
+
conditionEnable: '!(parseInt(width) >= 100 && width?.includes("%"))',
|
|
158
158
|
options: {
|
|
159
159
|
labelVariant: 'primary',
|
|
160
160
|
fullWidth: true,
|
|
@@ -41,7 +41,7 @@ const Settings = [
|
|
|
41
41
|
id: 'arrangeContent',
|
|
42
42
|
label: 'Arrange content',
|
|
43
43
|
type: 'segment',
|
|
44
|
-
default: '
|
|
44
|
+
default: 'left',
|
|
45
45
|
options: [
|
|
46
46
|
{
|
|
47
47
|
label: 'Left',
|
|
@@ -125,13 +125,13 @@ const Settings = [
|
|
|
125
125
|
id: 'isRequired',
|
|
126
126
|
label: 'Required',
|
|
127
127
|
type: 'toggle',
|
|
128
|
-
default:
|
|
128
|
+
default: true
|
|
129
129
|
},
|
|
130
130
|
{
|
|
131
131
|
id: 'isShowPreviewImage',
|
|
132
132
|
label: 'Click image to preview',
|
|
133
133
|
type: 'toggle',
|
|
134
|
-
default:
|
|
134
|
+
default: true
|
|
135
135
|
},
|
|
136
136
|
{
|
|
137
137
|
id: 'numberOfFiles',
|
|
@@ -159,7 +159,7 @@ const Settings = [
|
|
|
159
159
|
{
|
|
160
160
|
id: 'iconVisible',
|
|
161
161
|
label: 'Icon Visible',
|
|
162
|
-
type: '
|
|
162
|
+
type: 'toggle',
|
|
163
163
|
default: true
|
|
164
164
|
},
|
|
165
165
|
{
|
|
@@ -325,10 +325,11 @@ const Settings = [
|
|
|
325
325
|
controls: [
|
|
326
326
|
{
|
|
327
327
|
id: 'backgroundColor',
|
|
328
|
-
type: '
|
|
328
|
+
type: 'color-picker-v2',
|
|
329
329
|
label: 'Background Color',
|
|
330
330
|
default: {
|
|
331
|
-
normal: '
|
|
331
|
+
normal: '#FFFFFF',
|
|
332
|
+
hover: '#DDDDDD'
|
|
332
333
|
},
|
|
333
334
|
state: {
|
|
334
335
|
hover: true,
|
|
@@ -337,10 +338,11 @@ const Settings = [
|
|
|
337
338
|
},
|
|
338
339
|
{
|
|
339
340
|
id: 'textColor',
|
|
340
|
-
type: '
|
|
341
|
+
type: 'color-picker-v2',
|
|
341
342
|
label: 'Text Color',
|
|
342
343
|
default: {
|
|
343
|
-
normal: 'text-1'
|
|
344
|
+
normal: 'text-1',
|
|
345
|
+
hover: 'transparent'
|
|
344
346
|
},
|
|
345
347
|
state: {
|
|
346
348
|
hover: true,
|
|
@@ -359,6 +361,9 @@ const Settings = [
|
|
|
359
361
|
borderWidth: '1px',
|
|
360
362
|
width: '1px 1px 1px 1px',
|
|
361
363
|
color: '#BBBBBB'
|
|
364
|
+
},
|
|
365
|
+
hover: {
|
|
366
|
+
border: 'none'
|
|
362
367
|
}
|
|
363
368
|
},
|
|
364
369
|
state: {
|
|
@@ -371,8 +376,8 @@ const Settings = [
|
|
|
371
376
|
type: 'toggle',
|
|
372
377
|
label: 'Enable Button Shadow',
|
|
373
378
|
default: {
|
|
374
|
-
normal:
|
|
375
|
-
hover:
|
|
379
|
+
normal: true,
|
|
380
|
+
hover: true
|
|
376
381
|
},
|
|
377
382
|
state: {
|
|
378
383
|
normal: true,
|
|
@@ -387,16 +392,6 @@ const Settings = [
|
|
|
387
392
|
normal: true,
|
|
388
393
|
hover: true
|
|
389
394
|
},
|
|
390
|
-
default: {
|
|
391
|
-
normal: {
|
|
392
|
-
type: 'shadow-1',
|
|
393
|
-
distance: '4px',
|
|
394
|
-
blur: '12px',
|
|
395
|
-
spread: '0px',
|
|
396
|
-
color: 'rgba(0, 0, 0, 0.20)',
|
|
397
|
-
angle: 90
|
|
398
|
-
}
|
|
399
|
-
},
|
|
400
395
|
state: {
|
|
401
396
|
normal: true,
|
|
402
397
|
hover: true
|
|
@@ -408,11 +403,14 @@ const Settings = [
|
|
|
408
403
|
label: 'Border Radius',
|
|
409
404
|
default: {
|
|
410
405
|
normal: {
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
406
|
+
btrr: '8px',
|
|
407
|
+
bblr: '8px',
|
|
408
|
+
bbrr: '8px',
|
|
409
|
+
btlr: '8px',
|
|
410
|
+
radiusType: 'rounded'
|
|
411
|
+
},
|
|
412
|
+
hover: {
|
|
413
|
+
radiusType: 'none'
|
|
416
414
|
}
|
|
417
415
|
},
|
|
418
416
|
state: {
|
|
@@ -426,7 +424,7 @@ const Settings = [
|
|
|
426
424
|
id: 'typo',
|
|
427
425
|
type: 'typography-v2',
|
|
428
426
|
default: {
|
|
429
|
-
type: 'paragraph-
|
|
427
|
+
type: 'paragraph-1',
|
|
430
428
|
attrs: {
|
|
431
429
|
color: 'text-1'
|
|
432
430
|
}
|
|
@@ -79,12 +79,15 @@ const SettingUIV2 = [
|
|
|
79
79
|
{
|
|
80
80
|
controls: [
|
|
81
81
|
{
|
|
82
|
-
type: 'control',
|
|
83
82
|
label: {
|
|
84
83
|
en: 'Icon'
|
|
85
84
|
},
|
|
86
85
|
setting: {
|
|
87
86
|
id: 'iconVisible'
|
|
87
|
+
},
|
|
88
|
+
options: {
|
|
89
|
+
labelVariant: 'primary',
|
|
90
|
+
toggleStyle: 'switch'
|
|
88
91
|
}
|
|
89
92
|
},
|
|
90
93
|
{
|
|
@@ -306,164 +309,6 @@ const SettingUIV2 = [
|
|
|
306
309
|
}
|
|
307
310
|
]
|
|
308
311
|
},
|
|
309
|
-
// {
|
|
310
|
-
// label: {
|
|
311
|
-
// en: 'States',
|
|
312
|
-
// },
|
|
313
|
-
// controls: [
|
|
314
|
-
// {
|
|
315
|
-
// type: 'tab',
|
|
316
|
-
// controls: [
|
|
317
|
-
// {
|
|
318
|
-
// type: 'toggleGroup',
|
|
319
|
-
// label: {
|
|
320
|
-
// en: 'Normal',
|
|
321
|
-
// },
|
|
322
|
-
// controls: [
|
|
323
|
-
// {
|
|
324
|
-
// type: 'control',
|
|
325
|
-
// label: {
|
|
326
|
-
// en: 'Background color',
|
|
327
|
-
// },
|
|
328
|
-
// setting: {
|
|
329
|
-
// id: 'backgroundColor',
|
|
330
|
-
// state: 'normal',
|
|
331
|
-
// },
|
|
332
|
-
// },
|
|
333
|
-
// {
|
|
334
|
-
// type: 'control',
|
|
335
|
-
// label: {
|
|
336
|
-
// en: 'Text color',
|
|
337
|
-
// },
|
|
338
|
-
// setting: {
|
|
339
|
-
// id: 'textColor',
|
|
340
|
-
// state: 'normal',
|
|
341
|
-
// },
|
|
342
|
-
// },
|
|
343
|
-
// {
|
|
344
|
-
// type: 'control',
|
|
345
|
-
// // options: {
|
|
346
|
-
// // labelPosition: 'start',
|
|
347
|
-
// // },
|
|
348
|
-
// label: {
|
|
349
|
-
// en: 'Border',
|
|
350
|
-
// },
|
|
351
|
-
// setting: {
|
|
352
|
-
// id: 'borderBtn',
|
|
353
|
-
// state: 'normal',
|
|
354
|
-
// },
|
|
355
|
-
// },
|
|
356
|
-
// {
|
|
357
|
-
// type: 'control',
|
|
358
|
-
// label: {
|
|
359
|
-
// en: 'Corner',
|
|
360
|
-
// },
|
|
361
|
-
// setting: {
|
|
362
|
-
// id: 'roundedBtn',
|
|
363
|
-
// state: 'normal',
|
|
364
|
-
// },
|
|
365
|
-
// },
|
|
366
|
-
// {
|
|
367
|
-
// type: 'control',
|
|
368
|
-
// label: {
|
|
369
|
-
// en: 'Shadow',
|
|
370
|
-
// },
|
|
371
|
-
// setting: {
|
|
372
|
-
// id: 'hasBoxShadowBtn',
|
|
373
|
-
// state: 'normal',
|
|
374
|
-
// },
|
|
375
|
-
// },
|
|
376
|
-
// {
|
|
377
|
-
// type: 'control',
|
|
378
|
-
// label: {
|
|
379
|
-
// en: '',
|
|
380
|
-
// },
|
|
381
|
-
// conditionDisplay: 'hasBoxShadowBtn.normal == true',
|
|
382
|
-
// layout: 'vertical',
|
|
383
|
-
// setting: {
|
|
384
|
-
// id: 'boxShadowBtn',
|
|
385
|
-
// state: 'normal',
|
|
386
|
-
// },
|
|
387
|
-
// },
|
|
388
|
-
// ],
|
|
389
|
-
// },
|
|
390
|
-
// {
|
|
391
|
-
// type: 'toggleGroup',
|
|
392
|
-
// label: {
|
|
393
|
-
// en: 'Hover',
|
|
394
|
-
// },
|
|
395
|
-
// controls: [
|
|
396
|
-
// {
|
|
397
|
-
// type: 'control',
|
|
398
|
-
// label: {
|
|
399
|
-
// en: 'Background color',
|
|
400
|
-
// },
|
|
401
|
-
// setting: {
|
|
402
|
-
// id: 'backgroundColor',
|
|
403
|
-
// state: 'hover',
|
|
404
|
-
// },
|
|
405
|
-
// },
|
|
406
|
-
// {
|
|
407
|
-
// type: 'control',
|
|
408
|
-
// label: {
|
|
409
|
-
// en: 'Text color',
|
|
410
|
-
// },
|
|
411
|
-
// setting: {
|
|
412
|
-
// id: 'textColor',
|
|
413
|
-
// state: 'hover',
|
|
414
|
-
// },
|
|
415
|
-
// },
|
|
416
|
-
// {
|
|
417
|
-
// type: 'control',
|
|
418
|
-
// // options: {
|
|
419
|
-
// // labelPosition: 'start',
|
|
420
|
-
// // },
|
|
421
|
-
// label: {
|
|
422
|
-
// en: 'Border',
|
|
423
|
-
// },
|
|
424
|
-
// setting: {
|
|
425
|
-
// id: 'borderBtn',
|
|
426
|
-
// state: 'hover',
|
|
427
|
-
// },
|
|
428
|
-
// },
|
|
429
|
-
// {
|
|
430
|
-
// type: 'control',
|
|
431
|
-
// label: {
|
|
432
|
-
// en: 'Corner',
|
|
433
|
-
// },
|
|
434
|
-
// setting: {
|
|
435
|
-
// id: 'roundedBtn',
|
|
436
|
-
// state: 'hover',
|
|
437
|
-
// },
|
|
438
|
-
// },
|
|
439
|
-
// {
|
|
440
|
-
// type: 'control',
|
|
441
|
-
// label: {
|
|
442
|
-
// en: 'Shadow',
|
|
443
|
-
// },
|
|
444
|
-
// setting: {
|
|
445
|
-
// id: 'hasBoxShadowBtn',
|
|
446
|
-
// state: 'hover',
|
|
447
|
-
// },
|
|
448
|
-
// },
|
|
449
|
-
// {
|
|
450
|
-
// type: 'control',
|
|
451
|
-
// label: {
|
|
452
|
-
// en: '',
|
|
453
|
-
// },
|
|
454
|
-
// layout: 'vertical',
|
|
455
|
-
// conditionDisplay: 'hasBoxShadowBtn.hover == true',
|
|
456
|
-
// setting: {
|
|
457
|
-
// id: 'boxShadowBtn',
|
|
458
|
-
// state: 'hover',
|
|
459
|
-
// },
|
|
460
|
-
// },
|
|
461
|
-
// ],
|
|
462
|
-
// },
|
|
463
|
-
// ],
|
|
464
|
-
// },
|
|
465
|
-
// ],
|
|
466
|
-
// },
|
|
467
312
|
{
|
|
468
313
|
label: {
|
|
469
314
|
en: 'Text style'
|
|
@@ -571,7 +416,7 @@ const SettingUIV2 = [
|
|
|
571
416
|
en: 'Corner'
|
|
572
417
|
},
|
|
573
418
|
setting: {
|
|
574
|
-
id: '
|
|
419
|
+
id: 'roundedBtn',
|
|
575
420
|
state: 'hover'
|
|
576
421
|
}
|
|
577
422
|
},
|
|
@@ -580,7 +425,7 @@ const SettingUIV2 = [
|
|
|
580
425
|
en: 'Shadow'
|
|
581
426
|
},
|
|
582
427
|
setting: {
|
|
583
|
-
id: '
|
|
428
|
+
id: 'boxShadowBtn',
|
|
584
429
|
state: 'hover'
|
|
585
430
|
},
|
|
586
431
|
controlConfig: {
|
|
@@ -606,32 +451,20 @@ const SettingUIV2 = [
|
|
|
606
451
|
}
|
|
607
452
|
]
|
|
608
453
|
},
|
|
609
|
-
// {
|
|
610
|
-
// controls: [
|
|
611
|
-
// {
|
|
612
|
-
// label: {
|
|
613
|
-
// en: 'Text align',
|
|
614
|
-
// },
|
|
615
|
-
// type: 'control',
|
|
616
|
-
// setting: {
|
|
617
|
-
// id: 'textAlign',
|
|
618
|
-
// },
|
|
619
|
-
// options: {
|
|
620
|
-
// fullWidth: true,
|
|
621
|
-
// },
|
|
622
|
-
// },
|
|
623
|
-
// ],
|
|
624
|
-
// },
|
|
625
454
|
{
|
|
626
|
-
conditionDisplay: `size.width !== '100%'`,
|
|
627
455
|
controls: [
|
|
628
456
|
{
|
|
629
457
|
label: {
|
|
630
458
|
en: 'Align'
|
|
631
459
|
},
|
|
632
|
-
|
|
460
|
+
conditionEnable: `size.width !== '100%'`,
|
|
633
461
|
setting: {
|
|
634
462
|
id: 'align'
|
|
463
|
+
},
|
|
464
|
+
options: {
|
|
465
|
+
labelVariant: 'primary',
|
|
466
|
+
fullWidth: true,
|
|
467
|
+
disableMessage: 'Horizontal alignment is disabled when the width is set to 100% or greater'
|
|
635
468
|
}
|
|
636
469
|
}
|
|
637
470
|
]
|
|
@@ -12,7 +12,7 @@ import { getUpdatedDotStyle } from '../../carousel/components/common/dots.js';
|
|
|
12
12
|
import { getInitialWidthForCarouselItem } from '../../carousel/components/common/carousel.js';
|
|
13
13
|
import { getSizeSetting } from '../helpers/product.js';
|
|
14
14
|
import SalePageProductListWarning from './SalePageProductListWarning.js';
|
|
15
|
-
import { getPropertyByDevice } from '../../dialog/
|
|
15
|
+
import { getPropertyByDevice } from '../../dialog/components/common/common.js';
|
|
16
16
|
import Head from 'next/head';
|
|
17
17
|
import { createStyleObject } from '../../grid/row/commons/helpers.js';
|
|
18
18
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
3
|
-
import { useMoneyFormat, makeGlobalSize, useEditorMode, useProduct, useCurrentVariant, useFormatMoney, useProductBundleDiscount, formatMoney, getGlobalColorClass, cls, makeStyleResponsive, makeStyle, getRadiusCSSFromGlobal, getCustomRadius } from '@gem-sdk/core';
|
|
3
|
+
import { useMoneyFormat, makeGlobalSize, useEditorMode, useProduct, useCurrentVariant, useQuantity, useFormatMoney, useProductBundleDiscount, formatMoney, getGlobalColorClass, cls, makeStyleResponsive, makeStyle, getRadiusCSSFromGlobal, getCustomRadius } from '@gem-sdk/core';
|
|
4
4
|
import { useMemo } from 'react';
|
|
5
5
|
import Text from '../../text/components/Text.js';
|
|
6
6
|
import { DiscountType } from './constants/product-bundle.js';
|
|
@@ -17,9 +17,17 @@ const ProductTag = ({ setting, styles, builderProps, ...passProps })=>{
|
|
|
17
17
|
const mode = useEditorMode();
|
|
18
18
|
const product = useProduct();
|
|
19
19
|
const currentVariant = useCurrentVariant();
|
|
20
|
+
const { quantity, hasUpdatePrice } = useQuantity();
|
|
21
|
+
const quantityProduct = useMemo(()=>{
|
|
22
|
+
return hasUpdatePrice && customContent?.unit !== 'percentage' ? quantity || 1 : 1;
|
|
23
|
+
}, [
|
|
24
|
+
hasUpdatePrice,
|
|
25
|
+
customContent?.unit,
|
|
26
|
+
quantity
|
|
27
|
+
]);
|
|
20
28
|
const price = currentVariant?.price ?? 0;
|
|
21
29
|
const salePrice = currentVariant?.salePrice ?? 0;
|
|
22
|
-
const priceSave = salePrice - price;
|
|
30
|
+
const priceSave = (salePrice - price) * quantityProduct;
|
|
23
31
|
const moneyFormatted = useFormatMoney(priceSave < 0 ? 0 : priceSave, setting?.moneyWithCurrentFormat || false);
|
|
24
32
|
const customDisplayWithUnit = useMemo(()=>{
|
|
25
33
|
if (!salePrice && salePrice !== 0 || !price && price !== 0) return `${customContent?.unit === 'percentage' ? '0%' : moneyFormatted}`;
|
|
@@ -22,7 +22,7 @@ const DEVICES = [
|
|
|
22
22
|
const VARIANT_PARAM_PATH = 'variant';
|
|
23
23
|
let isMounted = false;
|
|
24
24
|
const ProductVariants = ({ builderProps, style, styles, setting })=>{
|
|
25
|
-
const {
|
|
25
|
+
const { width, align, optionTypo, swatchItemWidth, dropdownItemWidth, marginBottom, swatchSpacing, labelGap } = styles ?? {};
|
|
26
26
|
const { label, optionType, showAsSwatches, layout, column, hasPreSelected } = setting ?? {};
|
|
27
27
|
const { uid } = builderProps ?? {};
|
|
28
28
|
const variants = useVariants();
|
|
@@ -38,7 +38,7 @@ const ProductVariants = ({ builderProps, style, styles, setting })=>{
|
|
|
38
38
|
const mode = useEditorMode();
|
|
39
39
|
const { selectedOptions, setSelectedOption, forceSelectedOption } = useSelectedOption();
|
|
40
40
|
const { setHasPreSelected } = useHasPreSelected();
|
|
41
|
-
const variantsWidth = makeStyleResponsive('w', makeWidth(width
|
|
41
|
+
const variantsWidth = makeStyleResponsive('w', makeWidth(width));
|
|
42
42
|
const [variantId, setVariantId] = useState('');
|
|
43
43
|
useEffect(()=>{
|
|
44
44
|
const url = new URL(window.location.href);
|
|
@@ -14,12 +14,12 @@ const DEVICES = [
|
|
|
14
14
|
'mobile'
|
|
15
15
|
];
|
|
16
16
|
const ProductVariants = ({ builderProps, style, styles, setting, advanced })=>{
|
|
17
|
-
const { width,
|
|
17
|
+
const { width, align, swatchItemWidth, dropdownItemWidth, marginBottom, swatchSpacing, optionTypo, labelGap } = styles ?? {};
|
|
18
18
|
const { label, optionType, showAsSwatches, layout, column, hasPreSelected } = setting ?? {};
|
|
19
19
|
const advancedDisplay = advanced?.d;
|
|
20
20
|
const { uid } = builderProps ?? {};
|
|
21
21
|
// full width
|
|
22
|
-
const variantsWidth = makeStyleResponsive('w', makeWidth(width
|
|
22
|
+
const variantsWidth = makeStyleResponsive('w', makeWidth(width));
|
|
23
23
|
const variantGroup = optionType === 'groupOption';
|
|
24
24
|
const getSwatchAutoWidth = ()=>{
|
|
25
25
|
const result = {};
|