@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,301 @@
|
|
|
1
|
+
const SettingUIV2 = [
|
|
2
|
+
{
|
|
3
|
+
label: {
|
|
4
|
+
en: 'Text style'
|
|
5
|
+
},
|
|
6
|
+
controls: [
|
|
7
|
+
{
|
|
8
|
+
type: 'combo',
|
|
9
|
+
label: {
|
|
10
|
+
en: 'Placeholder'
|
|
11
|
+
},
|
|
12
|
+
iconName: 'polaris-text-block',
|
|
13
|
+
getValueFromSettingID: 'placeholder',
|
|
14
|
+
isHideClear: true,
|
|
15
|
+
controls: [
|
|
16
|
+
{
|
|
17
|
+
layout: 'vertical',
|
|
18
|
+
setting: {
|
|
19
|
+
id: 'placeholder'
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
]
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
layout: 'vertical',
|
|
26
|
+
setting: {
|
|
27
|
+
id: 'typo'
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
]
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
label: {
|
|
34
|
+
en: 'Size'
|
|
35
|
+
},
|
|
36
|
+
controls: [
|
|
37
|
+
{
|
|
38
|
+
label: {
|
|
39
|
+
en: 'Width'
|
|
40
|
+
},
|
|
41
|
+
controlConfig: {
|
|
42
|
+
id: 'width',
|
|
43
|
+
type: 'dropdown:input',
|
|
44
|
+
label: 'Width',
|
|
45
|
+
inputType: 'number',
|
|
46
|
+
units: [
|
|
47
|
+
'px',
|
|
48
|
+
'%'
|
|
49
|
+
],
|
|
50
|
+
hideUnit: false,
|
|
51
|
+
linkWithSetting: {
|
|
52
|
+
name: 'globalSize',
|
|
53
|
+
field: 'width'
|
|
54
|
+
},
|
|
55
|
+
displayOptions: [
|
|
56
|
+
{
|
|
57
|
+
label: 'Fit content',
|
|
58
|
+
value: 'Auto',
|
|
59
|
+
showValue: true
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
label: 'Full',
|
|
63
|
+
value: '100%',
|
|
64
|
+
showValue: true
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
label: 'Small',
|
|
68
|
+
value: '100px',
|
|
69
|
+
showValue: true
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
label: 'Medium',
|
|
73
|
+
value: '116px',
|
|
74
|
+
showValue: true
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
label: 'Large',
|
|
78
|
+
value: '132px',
|
|
79
|
+
showValue: true
|
|
80
|
+
}
|
|
81
|
+
]
|
|
82
|
+
},
|
|
83
|
+
layout: 'horizontal'
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
label: {
|
|
87
|
+
en: 'Height'
|
|
88
|
+
},
|
|
89
|
+
controlConfig: {
|
|
90
|
+
id: 'height',
|
|
91
|
+
type: 'dropdown:input',
|
|
92
|
+
label: 'Height',
|
|
93
|
+
inputType: 'number',
|
|
94
|
+
units: [
|
|
95
|
+
'px',
|
|
96
|
+
'%'
|
|
97
|
+
],
|
|
98
|
+
hideUnit: false,
|
|
99
|
+
linkWithSetting: {
|
|
100
|
+
name: 'globalSize',
|
|
101
|
+
field: 'height'
|
|
102
|
+
}
|
|
103
|
+
},
|
|
104
|
+
layout: 'horizontal'
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
label: {
|
|
108
|
+
en: 'Padding'
|
|
109
|
+
},
|
|
110
|
+
controlConfig: {
|
|
111
|
+
id: 'padding',
|
|
112
|
+
type: 'padding-v2',
|
|
113
|
+
linkWithSetting: {
|
|
114
|
+
name: 'globalSize',
|
|
115
|
+
field: 'padding'
|
|
116
|
+
},
|
|
117
|
+
compoDefaultValue: {
|
|
118
|
+
desktop: {
|
|
119
|
+
default: {
|
|
120
|
+
type: 'medium',
|
|
121
|
+
top: '12px',
|
|
122
|
+
bottom: '12px',
|
|
123
|
+
left: '24px',
|
|
124
|
+
right: '24px'
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
]
|
|
131
|
+
},
|
|
132
|
+
{
|
|
133
|
+
label: {
|
|
134
|
+
en: 'Background'
|
|
135
|
+
},
|
|
136
|
+
controls: [
|
|
137
|
+
{
|
|
138
|
+
setting: {
|
|
139
|
+
id: 'background'
|
|
140
|
+
},
|
|
141
|
+
layout: 'vertical'
|
|
142
|
+
}
|
|
143
|
+
]
|
|
144
|
+
},
|
|
145
|
+
{
|
|
146
|
+
label: {
|
|
147
|
+
en: 'Shape'
|
|
148
|
+
},
|
|
149
|
+
controls: [
|
|
150
|
+
{
|
|
151
|
+
label: {
|
|
152
|
+
en: 'Border'
|
|
153
|
+
},
|
|
154
|
+
controlConfig: {
|
|
155
|
+
id: 'border',
|
|
156
|
+
type: 'border-v2',
|
|
157
|
+
linkWithSetting: {
|
|
158
|
+
name: 'wrapperBorder'
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
},
|
|
162
|
+
{
|
|
163
|
+
label: {
|
|
164
|
+
en: 'Corner'
|
|
165
|
+
},
|
|
166
|
+
controlConfig: {
|
|
167
|
+
id: 'corner',
|
|
168
|
+
type: 'corner-v2',
|
|
169
|
+
linkWithSetting: {
|
|
170
|
+
name: 'borderRadius'
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
},
|
|
174
|
+
{
|
|
175
|
+
label: {
|
|
176
|
+
en: 'Shadow'
|
|
177
|
+
},
|
|
178
|
+
controlConfig: {
|
|
179
|
+
id: 'shadow',
|
|
180
|
+
type: 'shadow-v2',
|
|
181
|
+
linkWithSetting: {
|
|
182
|
+
name: 'shadow'
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
]
|
|
187
|
+
},
|
|
188
|
+
{
|
|
189
|
+
label: {
|
|
190
|
+
en: 'Configuration'
|
|
191
|
+
},
|
|
192
|
+
controls: [
|
|
193
|
+
{
|
|
194
|
+
label: {
|
|
195
|
+
en: 'Type'
|
|
196
|
+
},
|
|
197
|
+
setting: {
|
|
198
|
+
id: 'formType'
|
|
199
|
+
}
|
|
200
|
+
},
|
|
201
|
+
{
|
|
202
|
+
label: {
|
|
203
|
+
en: 'Required'
|
|
204
|
+
},
|
|
205
|
+
setting: {
|
|
206
|
+
id: 'required'
|
|
207
|
+
}
|
|
208
|
+
},
|
|
209
|
+
{
|
|
210
|
+
label: {
|
|
211
|
+
en: 'Field name'
|
|
212
|
+
},
|
|
213
|
+
conditionDisplay: `formType === 'text'`,
|
|
214
|
+
controlConfig: {
|
|
215
|
+
id: 'name_text',
|
|
216
|
+
type: 'input',
|
|
217
|
+
linkWithSetting: {
|
|
218
|
+
name: 'name',
|
|
219
|
+
field: 'text'
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
},
|
|
223
|
+
{
|
|
224
|
+
label: {
|
|
225
|
+
en: 'Field name'
|
|
226
|
+
},
|
|
227
|
+
conditionDisplay: `formType === 'textarea'`,
|
|
228
|
+
controlConfig: {
|
|
229
|
+
id: 'name_textarea',
|
|
230
|
+
type: 'input',
|
|
231
|
+
linkWithSetting: {
|
|
232
|
+
name: 'name',
|
|
233
|
+
field: 'textarea'
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
},
|
|
237
|
+
{
|
|
238
|
+
label: {
|
|
239
|
+
en: 'Field name'
|
|
240
|
+
},
|
|
241
|
+
conditionDisplay: `formType === 'email'`,
|
|
242
|
+
controlConfig: {
|
|
243
|
+
id: 'name_email',
|
|
244
|
+
type: 'input',
|
|
245
|
+
linkWithSetting: {
|
|
246
|
+
name: 'name',
|
|
247
|
+
field: 'email'
|
|
248
|
+
}
|
|
249
|
+
}
|
|
250
|
+
},
|
|
251
|
+
{
|
|
252
|
+
label: {
|
|
253
|
+
en: 'Field name'
|
|
254
|
+
},
|
|
255
|
+
conditionDisplay: `formType === 'number'`,
|
|
256
|
+
controlConfig: {
|
|
257
|
+
id: 'name_number',
|
|
258
|
+
type: 'input',
|
|
259
|
+
linkWithSetting: {
|
|
260
|
+
name: 'name',
|
|
261
|
+
field: 'number'
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
},
|
|
265
|
+
{
|
|
266
|
+
label: {
|
|
267
|
+
en: 'Field name'
|
|
268
|
+
},
|
|
269
|
+
conditionDisplay: `formType === 'phone'`,
|
|
270
|
+
controlConfig: {
|
|
271
|
+
id: 'name_phone',
|
|
272
|
+
type: 'input',
|
|
273
|
+
linkWithSetting: {
|
|
274
|
+
name: 'name',
|
|
275
|
+
field: 'phone'
|
|
276
|
+
}
|
|
277
|
+
}
|
|
278
|
+
}
|
|
279
|
+
]
|
|
280
|
+
},
|
|
281
|
+
{
|
|
282
|
+
controls: [
|
|
283
|
+
{
|
|
284
|
+
label: {
|
|
285
|
+
en: 'Align'
|
|
286
|
+
},
|
|
287
|
+
conditionEnable: '!(parseInt(globalSize.width) >= 100 && globalSize.width?.includes("%"))',
|
|
288
|
+
setting: {
|
|
289
|
+
id: 'align'
|
|
290
|
+
},
|
|
291
|
+
options: {
|
|
292
|
+
labelVariant: 'primary',
|
|
293
|
+
fullWidth: true,
|
|
294
|
+
disableMessage: `Align is not supported when width is 100%`
|
|
295
|
+
}
|
|
296
|
+
}
|
|
297
|
+
]
|
|
298
|
+
}
|
|
299
|
+
];
|
|
300
|
+
|
|
301
|
+
export { SettingUIV2 };
|
|
@@ -94,17 +94,20 @@ const RowSettings = [
|
|
|
94
94
|
{
|
|
95
95
|
label: 'Start',
|
|
96
96
|
value: 'start',
|
|
97
|
-
tooltip: 'Align top'
|
|
97
|
+
tooltip: 'Align top',
|
|
98
|
+
iconName: 'gp-align-left'
|
|
98
99
|
},
|
|
99
100
|
{
|
|
100
101
|
label: 'Center',
|
|
101
102
|
value: 'center',
|
|
102
|
-
tooltip: 'Align center'
|
|
103
|
+
tooltip: 'Align center',
|
|
104
|
+
iconName: 'gp-align-center'
|
|
103
105
|
},
|
|
104
106
|
{
|
|
105
107
|
label: 'End',
|
|
106
108
|
value: 'end',
|
|
107
|
-
tooltip: 'Align end'
|
|
109
|
+
tooltip: 'Align end',
|
|
110
|
+
iconName: 'gp-align-right'
|
|
108
111
|
}
|
|
109
112
|
],
|
|
110
113
|
default: 'start'
|
package/dist/esm/helpers.js
CHANGED
|
@@ -181,5 +181,12 @@ function filterTruthyStyles(styles) {
|
|
|
181
181
|
function filterTruthyObject(obj) {
|
|
182
182
|
return Object.fromEntries(Object.entries(obj || {}).filter(([, value])=>!!value));
|
|
183
183
|
}
|
|
184
|
+
const isMobile = (userAgent)=>{
|
|
185
|
+
if (/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(userAgent)) {
|
|
186
|
+
return true;
|
|
187
|
+
} else {
|
|
188
|
+
return false;
|
|
189
|
+
}
|
|
190
|
+
};
|
|
184
191
|
|
|
185
|
-
export { filterTruthyObject, filterTruthyStyles, getDynamicSourceLocales, getInsertLinkData, getLinkData, getSettingPreloadData, getStaticLocale, isHexTransparent, isTransparentColor, isTransparentRGBA, replaceLinkData, youtubeShortsRegex };
|
|
192
|
+
export { filterTruthyObject, filterTruthyStyles, getDynamicSourceLocales, getInsertLinkData, getLinkData, getSettingPreloadData, getStaticLocale, isHexTransparent, isMobile, isTransparentColor, isTransparentRGBA, replaceLinkData, youtubeShortsRegex };
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { composeClasses, cls } from '@gem-sdk/core';
|
|
2
|
+
|
|
3
|
+
const getItemClasses = (parentUid)=>composeClasses(`gp-icon-list-item gp-flex gp-w-full gp-items-center gp-child-item-${parentUid}`);
|
|
4
|
+
const getUlClasses = (cssClass)=>composeClasses(cls('gp-inline-flex gp-flex-col', cssClass));
|
|
5
|
+
|
|
6
|
+
export { getItemClasses, getUlClasses };
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { makeStyleResponsive, getStyleBackgroundByDevice } from '@gem-sdk/core';
|
|
2
|
+
|
|
3
|
+
const getContainerStyles = (style, styles, extraData)=>{
|
|
4
|
+
const { align, background } = styles || {};
|
|
5
|
+
return {
|
|
6
|
+
...style,
|
|
7
|
+
...extraData?.advancedClasses,
|
|
8
|
+
...makeStyleResponsive('ta', align),
|
|
9
|
+
...getStyleBackgroundByDevice(background, {
|
|
10
|
+
liquid: extraData?.isLiquid
|
|
11
|
+
})
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
const getItemStyles = (horizontalSpacing)=>{
|
|
15
|
+
return {
|
|
16
|
+
...makeStyleResponsive('cg', horizontalSpacing)
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
const getUlStyles = (verticalSpacing)=>{
|
|
20
|
+
return {
|
|
21
|
+
...makeStyleResponsive('rg', verticalSpacing)
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
export { getContainerStyles, getItemStyles, getUlStyles };
|
|
@@ -1,28 +1,24 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
3
|
+
import { composeAdvanceStyle, isEmptyChildren, filterToolbarPreview } from '@gem-sdk/core';
|
|
4
|
+
import { Children, isValidElement } from 'react';
|
|
5
5
|
import Head from 'next/head';
|
|
6
|
+
import { createStyle, createClass, If } from '@gem-sdk/system';
|
|
7
|
+
import { getContainerStyles, getUlStyles } from '../common/styles.js';
|
|
8
|
+
import { getUlClasses } from '../common/classes.js';
|
|
6
9
|
|
|
7
|
-
const IconList = ({
|
|
10
|
+
const IconList = ({ style, setting, children, styles, builderProps, advanced })=>{
|
|
8
11
|
const { preload } = setting || {};
|
|
9
|
-
const { background, horizontalSpacing, verticalSpacing
|
|
10
|
-
const
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
delList.forEach((element)=>{
|
|
17
|
-
delete style?.[element];
|
|
18
|
-
});
|
|
19
|
-
return style;
|
|
20
|
-
}, [
|
|
21
|
-
style
|
|
22
|
-
]);
|
|
12
|
+
const { background, horizontalSpacing, verticalSpacing } = styles ?? {};
|
|
13
|
+
const advancedStyle = composeAdvanceStyle(advanced);
|
|
14
|
+
const computedContainerStyles = createStyle(getContainerStyles(style, styles, {
|
|
15
|
+
advancedClasses: advancedStyle
|
|
16
|
+
}));
|
|
17
|
+
const computedUlClasses = createClass(getUlClasses(advanced?.cssClass));
|
|
18
|
+
const computedUlStyles = createStyle(getUlStyles(verticalSpacing));
|
|
23
19
|
return /*#__PURE__*/ jsxs(Fragment, {
|
|
24
20
|
children: [
|
|
25
|
-
|
|
21
|
+
If(preload, /*#__PURE__*/ jsxs(Head, {
|
|
26
22
|
children: [
|
|
27
23
|
!!background?.desktop?.image?.src && /*#__PURE__*/ jsx("link", {
|
|
28
24
|
rel: "preload",
|
|
@@ -40,24 +36,17 @@ const IconList = ({ builderAttrs, style, setting, children, styles, builderProps
|
|
|
40
36
|
as: "image"
|
|
41
37
|
})
|
|
42
38
|
]
|
|
43
|
-
}),
|
|
39
|
+
})),
|
|
44
40
|
/*#__PURE__*/ jsx("div", {
|
|
45
|
-
...builderAttrs,
|
|
46
41
|
"data-id": builderProps?.uid,
|
|
47
|
-
style:
|
|
48
|
-
|
|
49
|
-
...makeStyleResponsive('ta', align),
|
|
50
|
-
...getStyleBackgroundByDevice(background)
|
|
51
|
-
},
|
|
52
|
-
children: isEmptyChildren(children) ? /*#__PURE__*/ jsx("div", {
|
|
42
|
+
style: computedContainerStyles,
|
|
43
|
+
children: If(isEmptyChildren(children), /*#__PURE__*/ jsx("div", {
|
|
53
44
|
children: "Icons not found"
|
|
54
|
-
})
|
|
45
|
+
}), /*#__PURE__*/ jsxs(Fragment, {
|
|
55
46
|
children: [
|
|
56
47
|
/*#__PURE__*/ jsx("ul", {
|
|
57
|
-
className:
|
|
58
|
-
style:
|
|
59
|
-
...makeStyleResponsive('rg', verticalSpacing)
|
|
60
|
-
},
|
|
48
|
+
className: computedUlClasses,
|
|
49
|
+
style: computedUlStyles,
|
|
61
50
|
children: Children.map(filterToolbarPreview(children), (child, key)=>{
|
|
62
51
|
if (/*#__PURE__*/ isValidElement(child)) {
|
|
63
52
|
return /*#__PURE__*/ jsx(child.type, {
|
|
@@ -72,7 +61,7 @@ const IconList = ({ builderAttrs, style, setting, children, styles, builderProps
|
|
|
72
61
|
}),
|
|
73
62
|
filterToolbarPreview(children, true)
|
|
74
63
|
]
|
|
75
|
-
})
|
|
64
|
+
}))
|
|
76
65
|
})
|
|
77
66
|
]
|
|
78
67
|
});
|
|
@@ -1,43 +1,40 @@
|
|
|
1
|
-
import { composeAdvanceStyle, template,
|
|
1
|
+
import { composeAdvanceStyle, template, WrapRenderChildren, RenderChildren } from '@gem-sdk/core';
|
|
2
2
|
import { getStaticLocale } from '../../helpers.js';
|
|
3
|
+
import { createStyle, createClass, If } from '@gem-sdk/system';
|
|
4
|
+
import { getContainerStyles, getUlStyles } from '../common/styles.js';
|
|
5
|
+
import { getUlClasses } from '../common/classes.js';
|
|
3
6
|
|
|
4
7
|
const IconList = ({ builderProps, style, setting, rawChildren, styles, advanced })=>{
|
|
5
8
|
const { preload } = setting || {};
|
|
6
|
-
const { background, horizontalSpacing, verticalSpacing
|
|
9
|
+
const { background, horizontalSpacing, verticalSpacing } = styles || {};
|
|
7
10
|
const advancedStyle = composeAdvanceStyle(advanced);
|
|
11
|
+
const computedContainerStyles = createStyle(getContainerStyles(style, styles, {
|
|
12
|
+
advancedClasses: advancedStyle,
|
|
13
|
+
isLiquid: true
|
|
14
|
+
}));
|
|
15
|
+
const computedUlClasses = createClass(getUlClasses(advanced?.cssClass));
|
|
16
|
+
const computedUlStyles = createStyle(getUlStyles(verticalSpacing));
|
|
8
17
|
return template`
|
|
9
|
-
${
|
|
10
|
-
${
|
|
11
|
-
${
|
|
18
|
+
${If(!!preload, `${If(!!background?.desktop?.image?.src, `<link rel="preload" href="${background?.desktop?.image?.src}" as="image" />`)}
|
|
19
|
+
${If(!!background?.tablet?.image?.src, `<link rel="preload" href="${background?.tablet?.image?.src}" as="image" />`)}
|
|
20
|
+
${If(!!background?.mobile?.image?.src, `<link rel="preload" href="${background?.mobile?.image?.src}" as="image" />`)}`)}
|
|
12
21
|
<div
|
|
13
|
-
${{
|
|
14
|
-
...builderProps
|
|
15
|
-
}}
|
|
16
22
|
data-id="${builderProps?.uid}"
|
|
17
|
-
style="${
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
liquid: true
|
|
23
|
-
})
|
|
24
|
-
}}">
|
|
25
|
-
${RenderIf(!rawChildren, template`<div>${getStaticLocale('IconList', 'icons_not_found')}</div>`)}
|
|
26
|
-
${RenderIf(!!rawChildren, template`<ul
|
|
27
|
-
class="${cls('gp-inline-flex gp-flex-col', advanced?.cssClass)}"
|
|
28
|
-
style="${{
|
|
29
|
-
...makeStyleResponsive('rg', verticalSpacing)
|
|
30
|
-
}}"
|
|
23
|
+
style="${computedContainerStyles}">
|
|
24
|
+
${If(!rawChildren, template`<div>${getStaticLocale('IconList', 'icons_not_found')}</div>`)}
|
|
25
|
+
${If(!!rawChildren, template`<ul
|
|
26
|
+
class="${computedUlClasses}"
|
|
27
|
+
style="${computedUlStyles}"
|
|
31
28
|
>
|
|
32
29
|
${WrapRenderChildren({
|
|
33
|
-
uid: builderProps?.uid
|
|
30
|
+
uid: builderProps?.uid ?? '',
|
|
34
31
|
customProps: rawChildren?.[0].customProps
|
|
35
32
|
}, rawChildren?.map((child, index)=>{
|
|
36
33
|
if (child) {
|
|
37
34
|
return RenderChildren({
|
|
38
35
|
...child,
|
|
39
36
|
horizontalSpacing: horizontalSpacing,
|
|
40
|
-
index,
|
|
37
|
+
dataIndex: index,
|
|
41
38
|
parentUid: builderProps?.uid
|
|
42
39
|
});
|
|
43
40
|
}
|
|
@@ -1,19 +1,25 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsx } from 'react/jsx-runtime';
|
|
3
|
-
import { isEmptyChildren, makeStyleResponsive } from '@gem-sdk/core';
|
|
4
3
|
import { Children, isValidElement } from 'react';
|
|
4
|
+
import { isEmptyChildren } from '@gem-sdk/core';
|
|
5
|
+
import { createClass, createAttr, createStyle } from '@gem-sdk/system';
|
|
6
|
+
import { getItemClasses } from '../common/classes.js';
|
|
7
|
+
import { getItemAttrs } from '../common/attrs.js';
|
|
8
|
+
import { getItemStyles } from '../common/styles.js';
|
|
5
9
|
|
|
6
10
|
const IconListItem = ({ children, horizontalSpacing, parentUid, builderProps, dataIndex })=>{
|
|
7
11
|
if (isEmptyChildren(children)) {
|
|
8
12
|
return null;
|
|
9
13
|
}
|
|
14
|
+
const computedItemClasses = createClass(getItemClasses(parentUid));
|
|
15
|
+
const computedItemAttrs = createAttr({
|
|
16
|
+
...getItemAttrs(builderProps?.uid, dataIndex)
|
|
17
|
+
});
|
|
18
|
+
const computedItemStyles = createStyle(getItemStyles(horizontalSpacing));
|
|
10
19
|
return /*#__PURE__*/ jsx("li", {
|
|
11
|
-
className:
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
style: {
|
|
15
|
-
...makeStyleResponsive('cg', horizontalSpacing)
|
|
16
|
-
},
|
|
20
|
+
className: computedItemClasses,
|
|
21
|
+
...computedItemAttrs,
|
|
22
|
+
style: computedItemStyles,
|
|
17
23
|
children: Children.map(children, (child)=>{
|
|
18
24
|
if (/*#__PURE__*/ isValidElement(child)) {
|
|
19
25
|
return /*#__PURE__*/ jsx(child.type, {
|
|
@@ -1,17 +1,23 @@
|
|
|
1
|
-
import { isEmptyChildren, template
|
|
1
|
+
import { isEmptyChildren, template } from '@gem-sdk/core';
|
|
2
|
+
import { createClass, createAttr, createStyle } from '@gem-sdk/system';
|
|
3
|
+
import { getItemClasses } from '../common/classes.js';
|
|
4
|
+
import { getItemAttrs } from '../common/attrs.js';
|
|
5
|
+
import { getItemStyles } from '../common/styles.js';
|
|
2
6
|
|
|
3
|
-
const IconListItem = ({ children, horizontalSpacing,
|
|
7
|
+
const IconListItem = ({ children, horizontalSpacing, dataIndex, parentUid, builderProps })=>{
|
|
4
8
|
if (isEmptyChildren(children)) {
|
|
5
9
|
return null;
|
|
6
10
|
}
|
|
11
|
+
const computedItemClasses = createClass(getItemClasses(parentUid));
|
|
12
|
+
const computedItemAttrs = createAttr({
|
|
13
|
+
...getItemAttrs(builderProps?.uid, dataIndex)
|
|
14
|
+
});
|
|
15
|
+
const computedItemStyles = createStyle(getItemStyles(horizontalSpacing));
|
|
7
16
|
return template`
|
|
8
17
|
<li
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
style="${{
|
|
13
|
-
...makeStyleResponsive('cg', horizontalSpacing)
|
|
14
|
-
}}"
|
|
18
|
+
${computedItemAttrs}
|
|
19
|
+
class="${computedItemClasses}"
|
|
20
|
+
style="${computedItemStyles}"
|
|
15
21
|
>
|
|
16
22
|
${children}
|
|
17
23
|
</li>`;
|