@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.
Files changed (236) hide show
  1. package/dist/cjs/accordion/components/common/index.js +2 -2
  2. package/dist/cjs/article/components/ArticleAuthor.js +1 -1
  3. package/dist/cjs/article/components/ArticleTitle.js +3 -1
  4. package/dist/cjs/article/components/ArticleTitle.liquid.js +5 -2
  5. package/dist/cjs/article/setting/ArticleList.js +0 -30
  6. package/dist/cjs/article/setting/configs/ArticleAuthor/presets.js +0 -9
  7. package/dist/cjs/article/setting/configs/ArticleAuthor/settings.js +9 -5
  8. package/dist/cjs/article/setting/configs/ArticleAuthor/uiV2.js +16 -0
  9. package/dist/cjs/article/setting/configs/ArticleCategory/presets.js +0 -9
  10. package/dist/cjs/article/setting/configs/ArticleCategory/settings.js +9 -5
  11. package/dist/cjs/article/setting/configs/ArticleDate/presets.js +0 -9
  12. package/dist/cjs/article/setting/configs/ArticleDate/settings.js +9 -5
  13. package/dist/cjs/article/setting/configs/ArticleImage/settings.js +22 -1
  14. package/dist/cjs/article/setting/configs/ArticleTitle/settings.js +36 -7
  15. package/dist/cjs/article/setting/configs/ArticleTitle/uiV2.js +47 -2
  16. package/dist/cjs/builder.js +6 -2
  17. package/dist/cjs/button/components/Button.js +1 -1
  18. package/dist/cjs/button/components/Button.liquid.js +1 -1
  19. package/dist/cjs/button/components/ButtonIcon.liquid.js +3 -1
  20. package/dist/cjs/button/components/ButtonLabel.liquid.js +3 -1
  21. package/dist/cjs/button/components/common/attributes.js +2 -2
  22. package/dist/cjs/button/components/common/classes.js +2 -1
  23. package/dist/cjs/button/components/common/styles.js +9 -11
  24. package/dist/cjs/button/setting/configs/settings.js +7 -8
  25. package/dist/cjs/button/setting/configs/uiV2.js +4 -50
  26. package/dist/cjs/dialog/components/Dialog.js +109 -394
  27. package/dist/cjs/dialog/components/Dialog.liquid.js +129 -153
  28. package/dist/cjs/dialog/components/common/common.js +130 -0
  29. package/dist/cjs/dialog/components/common/getAttr.js +27 -0
  30. package/dist/cjs/dialog/components/common/getClasses.js +88 -0
  31. package/dist/cjs/dialog/components/common/getStyle.js +107 -0
  32. package/dist/cjs/dialog/components/hooks/useDialog.js +233 -0
  33. package/dist/cjs/dialog/setting/configs/settings.js +1 -1
  34. package/dist/cjs/dialog/setting/configs/uiV2.js +35 -25
  35. package/dist/cjs/form/components/form-checkbox/FormCheckbox.js +0 -4
  36. package/dist/cjs/form/components/textinput/TextInput.js +58 -0
  37. package/dist/cjs/form/components/textinput/TextInput.liquid.js +60 -0
  38. package/dist/cjs/form/components/textinput/common/composeClasses.js +33 -0
  39. package/dist/cjs/form/components/textinput/common/composeStyles.js +70 -0
  40. package/dist/cjs/form/next.js +5 -1
  41. package/dist/cjs/form/setting/index.js +3 -1
  42. package/dist/cjs/form/setting/newsletter/configs/settings.js +4 -2
  43. package/dist/cjs/form/setting/newsletter/configs/uiV2.js +2 -0
  44. package/dist/cjs/form/setting/text-input/TextInput.js +53 -0
  45. package/dist/cjs/form/setting/text-input/configs/settings.js +307 -0
  46. package/dist/cjs/form/setting/text-input/configs/uiV1.js +106 -0
  47. package/dist/cjs/form/setting/text-input/configs/uiV2.js +303 -0
  48. package/dist/cjs/grid/row/setting/configs/settings.js +6 -3
  49. package/dist/cjs/helpers.js +8 -0
  50. package/dist/cjs/icon-list/common/attrs.js +10 -0
  51. package/dist/cjs/icon-list/common/classes.js +9 -0
  52. package/dist/cjs/icon-list/common/styles.js +29 -0
  53. package/dist/cjs/icon-list/components/IconList.js +19 -30
  54. package/dist/cjs/icon-list/components/IconList.liquid.js +21 -24
  55. package/dist/cjs/icon-list/components/IconListItem.js +13 -7
  56. package/dist/cjs/icon-list/components/IconListItem.liquid.js +13 -7
  57. package/dist/cjs/icon-list-hoz/components/IconListHoz.js +37 -25
  58. package/dist/cjs/icon-list-hoz/components/IconListHoz.liquid.js +31 -25
  59. package/dist/cjs/icon-list-hoz/components/IconListHozItem.js +12 -6
  60. package/dist/cjs/icon-list-hoz/components/IconListIHozItem.liquid.js +26 -0
  61. package/dist/cjs/icon-list-hoz/components/common/getAttr.js +9 -0
  62. package/dist/cjs/icon-list-hoz/components/common/getClasses.js +24 -0
  63. package/dist/cjs/icon-list-hoz/components/common/getStyle.js +30 -0
  64. package/dist/cjs/image/components/AdaptiveImage.js +1 -1
  65. package/dist/cjs/image/components/AdaptiveImage.liquid.js +4 -4
  66. package/dist/cjs/image/components/Image.js +1 -5
  67. package/dist/cjs/image/components/common/styles.js +2 -2
  68. package/dist/cjs/image/components/helpers/getNextImageLiquidAttrs.js +6 -24
  69. package/dist/cjs/image/components/helpers/getNextImageReactAttrs.js +3 -3
  70. package/dist/cjs/index.js +6 -1
  71. package/dist/cjs/index.liquid.js +7 -3
  72. package/dist/cjs/line/common/classes.js +66 -0
  73. package/dist/cjs/line/common/index.js +16 -0
  74. package/dist/cjs/line/common/styles.js +120 -0
  75. package/dist/cjs/line/components/Divider.js +26 -0
  76. package/dist/cjs/line/components/Divider.liquid.js +22 -0
  77. package/dist/cjs/line/components/Line.js +98 -0
  78. package/dist/cjs/line/components/Line.liquid.js +86 -0
  79. package/dist/cjs/line/next.js +1 -1
  80. package/dist/cjs/post-purchase/line/setting/configs/uiV2.js +1 -1
  81. package/dist/cjs/post-purchase/link/setting/configs/settings.js +2 -1
  82. package/dist/cjs/post-purchase/link/setting/configs/uiV2.js +1 -1
  83. package/dist/cjs/post-purchase/product/settings/product-variants/configs/uiV2.js +1 -1
  84. package/dist/cjs/product/components/FileUpload/components/config/setting.js +24 -26
  85. package/dist/cjs/product/components/FileUpload/components/config/uiV2.js +12 -179
  86. package/dist/cjs/product/components/ProductList.js +1 -1
  87. package/dist/cjs/product/components/ProductVariants/index.js +2 -2
  88. package/dist/cjs/product/components/ProductVariants/index.liquid.js +2 -2
  89. package/dist/cjs/product/components/ProductVariants/variants/Dropdown.js +8 -3
  90. package/dist/cjs/product/components/ProductVariants/variants/Dropdown.liquid.js +7 -2
  91. package/dist/cjs/product/setting/ProductVariants.js +8 -1374
  92. package/dist/cjs/product/setting/product/configs/uiV2.js +2 -2
  93. package/dist/cjs/product/setting/product-list/configs/uiV2.js +0 -3
  94. package/dist/cjs/product/setting/product-variant/configs/presets.js +168 -0
  95. package/dist/cjs/product/setting/product-variant/configs/settings.js +732 -0
  96. package/dist/cjs/product/setting/product-variant/configs/uiV1.js +509 -0
  97. package/dist/cjs/product/setting/product-variant/configs/uiV2.js +347 -0
  98. package/dist/cjs/third-party/components/EcoboostifyShoppableReelUgc.js +33 -0
  99. package/dist/cjs/third-party/components/EcoboostifyShoppableReelUgc.liquid.js +12 -0
  100. package/dist/cjs/third-party/components/RechargeSubscriptions.liquid.js +1 -1
  101. package/dist/cjs/third-party/configs/EcoboostifyShoppableReelUgc.js +12 -0
  102. package/dist/cjs/third-party/next.js +5 -0
  103. package/dist/cjs/third-party/setting/EcoboostifyShoppableReelUgc.js +142 -0
  104. package/dist/cjs/third-party/setting/RechargeSubscriptions.js +5 -2
  105. package/dist/cjs/third-party/setting/index.js +3 -1
  106. package/dist/esm/accordion/components/common/index.js +2 -2
  107. package/dist/esm/article/components/ArticleAuthor.js +1 -1
  108. package/dist/esm/article/components/ArticleTitle.js +3 -1
  109. package/dist/esm/article/components/ArticleTitle.liquid.js +5 -2
  110. package/dist/esm/article/setting/ArticleList.js +0 -30
  111. package/dist/esm/article/setting/configs/ArticleAuthor/presets.js +0 -9
  112. package/dist/esm/article/setting/configs/ArticleAuthor/settings.js +9 -5
  113. package/dist/esm/article/setting/configs/ArticleAuthor/uiV2.js +16 -0
  114. package/dist/esm/article/setting/configs/ArticleCategory/presets.js +0 -9
  115. package/dist/esm/article/setting/configs/ArticleCategory/settings.js +9 -5
  116. package/dist/esm/article/setting/configs/ArticleDate/presets.js +0 -9
  117. package/dist/esm/article/setting/configs/ArticleDate/settings.js +9 -5
  118. package/dist/esm/article/setting/configs/ArticleImage/settings.js +22 -1
  119. package/dist/esm/article/setting/configs/ArticleTitle/settings.js +36 -7
  120. package/dist/esm/article/setting/configs/ArticleTitle/uiV2.js +47 -2
  121. package/dist/esm/builder.js +6 -2
  122. package/dist/esm/button/components/Button.js +1 -1
  123. package/dist/esm/button/components/Button.liquid.js +1 -1
  124. package/dist/esm/button/components/ButtonIcon.liquid.js +3 -1
  125. package/dist/esm/button/components/ButtonLabel.liquid.js +3 -1
  126. package/dist/esm/button/components/common/attributes.js +2 -2
  127. package/dist/esm/button/components/common/classes.js +3 -2
  128. package/dist/esm/button/components/common/styles.js +10 -12
  129. package/dist/esm/button/setting/configs/settings.js +7 -8
  130. package/dist/esm/button/setting/configs/uiV2.js +4 -50
  131. package/dist/esm/dialog/components/Dialog.js +110 -395
  132. package/dist/esm/dialog/components/Dialog.liquid.js +130 -154
  133. package/dist/esm/dialog/components/common/common.js +117 -0
  134. package/dist/esm/dialog/components/common/getAttr.js +22 -0
  135. package/dist/esm/dialog/components/common/getClasses.js +79 -0
  136. package/dist/esm/dialog/components/common/getStyle.js +98 -0
  137. package/dist/esm/dialog/components/hooks/useDialog.js +231 -0
  138. package/dist/esm/dialog/setting/configs/settings.js +1 -1
  139. package/dist/esm/dialog/setting/configs/uiV2.js +35 -25
  140. package/dist/esm/form/components/form-checkbox/FormCheckbox.js +0 -4
  141. package/dist/esm/form/components/textinput/TextInput.js +54 -0
  142. package/dist/esm/form/components/textinput/TextInput.liquid.js +56 -0
  143. package/dist/esm/form/components/textinput/common/composeClasses.js +29 -0
  144. package/dist/esm/form/components/textinput/common/composeStyles.js +67 -0
  145. package/dist/esm/form/next.js +5 -1
  146. package/dist/esm/form/setting/index.js +3 -1
  147. package/dist/esm/form/setting/newsletter/configs/settings.js +4 -2
  148. package/dist/esm/form/setting/newsletter/configs/uiV2.js +2 -0
  149. package/dist/esm/form/setting/text-input/TextInput.js +49 -0
  150. package/dist/esm/form/setting/text-input/configs/settings.js +305 -0
  151. package/dist/esm/form/setting/text-input/configs/uiV1.js +104 -0
  152. package/dist/esm/form/setting/text-input/configs/uiV2.js +301 -0
  153. package/dist/esm/grid/row/setting/configs/settings.js +6 -3
  154. package/dist/esm/helpers.js +8 -1
  155. package/dist/esm/icon-list/common/attrs.js +8 -0
  156. package/dist/esm/icon-list/common/classes.js +6 -0
  157. package/dist/esm/icon-list/common/styles.js +25 -0
  158. package/dist/esm/icon-list/components/IconList.js +21 -32
  159. package/dist/esm/icon-list/components/IconList.liquid.js +21 -24
  160. package/dist/esm/icon-list/components/IconListItem.js +13 -7
  161. package/dist/esm/icon-list/components/IconListItem.liquid.js +14 -8
  162. package/dist/esm/icon-list-hoz/components/IconListHoz.js +38 -26
  163. package/dist/esm/icon-list-hoz/components/IconListHoz.liquid.js +32 -26
  164. package/dist/esm/icon-list-hoz/components/IconListHozItem.js +12 -6
  165. package/dist/esm/icon-list-hoz/components/IconListIHozItem.liquid.js +22 -0
  166. package/dist/esm/icon-list-hoz/components/common/getAttr.js +7 -0
  167. package/dist/esm/icon-list-hoz/components/common/getClasses.js +21 -0
  168. package/dist/esm/icon-list-hoz/components/common/getStyle.js +27 -0
  169. package/dist/esm/image/components/AdaptiveImage.js +2 -2
  170. package/dist/esm/image/components/AdaptiveImage.liquid.js +4 -4
  171. package/dist/esm/image/components/Image.js +2 -6
  172. package/dist/esm/image/components/common/styles.js +2 -2
  173. package/dist/esm/image/components/helpers/getNextImageLiquidAttrs.js +6 -24
  174. package/dist/esm/image/components/helpers/getNextImageReactAttrs.js +3 -3
  175. package/dist/esm/index.js +4 -2
  176. package/dist/esm/index.liquid.js +4 -2
  177. package/dist/esm/line/common/classes.js +59 -0
  178. package/dist/esm/line/common/index.js +14 -0
  179. package/dist/esm/line/common/styles.js +114 -0
  180. package/dist/esm/line/components/Divider.js +22 -0
  181. package/dist/esm/line/components/Divider.liquid.js +18 -0
  182. package/dist/esm/line/components/Line.js +94 -0
  183. package/dist/esm/line/components/Line.liquid.js +82 -0
  184. package/dist/esm/line/next.js +1 -1
  185. package/dist/esm/post-purchase/line/setting/configs/uiV2.js +1 -1
  186. package/dist/esm/post-purchase/link/setting/configs/settings.js +2 -1
  187. package/dist/esm/post-purchase/link/setting/configs/uiV2.js +1 -1
  188. package/dist/esm/post-purchase/product/settings/product-variants/configs/uiV2.js +1 -1
  189. package/dist/esm/product/components/FileUpload/components/config/setting.js +24 -26
  190. package/dist/esm/product/components/FileUpload/components/config/uiV2.js +12 -179
  191. package/dist/esm/product/components/ProductList.js +1 -1
  192. package/dist/esm/product/components/ProductVariants/index.js +2 -2
  193. package/dist/esm/product/components/ProductVariants/index.liquid.js +2 -2
  194. package/dist/esm/product/components/ProductVariants/variants/Dropdown.js +8 -3
  195. package/dist/esm/product/components/ProductVariants/variants/Dropdown.liquid.js +7 -2
  196. package/dist/esm/product/setting/ProductVariants.js +8 -1374
  197. package/dist/esm/product/setting/product/configs/uiV2.js +2 -2
  198. package/dist/esm/product/setting/product-list/configs/uiV2.js +0 -3
  199. package/dist/esm/product/setting/product-variant/configs/presets.js +166 -0
  200. package/dist/esm/product/setting/product-variant/configs/settings.js +730 -0
  201. package/dist/esm/product/setting/product-variant/configs/uiV1.js +507 -0
  202. package/dist/esm/product/setting/product-variant/configs/uiV2.js +345 -0
  203. package/dist/esm/third-party/components/EcoboostifyShoppableReelUgc.js +29 -0
  204. package/dist/esm/third-party/components/EcoboostifyShoppableReelUgc.liquid.js +8 -0
  205. package/dist/esm/third-party/components/RechargeSubscriptions.liquid.js +1 -1
  206. package/dist/esm/third-party/configs/EcoboostifyShoppableReelUgc.js +8 -0
  207. package/dist/esm/third-party/next.js +5 -0
  208. package/dist/esm/third-party/setting/EcoboostifyShoppableReelUgc.js +138 -0
  209. package/dist/esm/third-party/setting/RechargeSubscriptions.js +5 -2
  210. package/dist/esm/third-party/setting/index.js +3 -1
  211. package/dist/types/index.d.ts +184 -166
  212. package/package.json +2 -2
  213. package/dist/cjs/dialog/helpers/common.js +0 -55
  214. package/dist/cjs/icon-list-hoz/components/IconListItemHoz.liquid.js +0 -23
  215. package/dist/cjs/line/Divider.js +0 -35
  216. package/dist/cjs/line/Divider.liquid.js +0 -35
  217. package/dist/cjs/line/Line.js +0 -167
  218. package/dist/cjs/line/Line.liquid.js +0 -163
  219. package/dist/esm/dialog/helpers/common.js +0 -47
  220. package/dist/esm/icon-list-hoz/components/IconListItemHoz.liquid.js +0 -19
  221. package/dist/esm/line/Divider.js +0 -31
  222. package/dist/esm/line/Divider.liquid.js +0 -31
  223. package/dist/esm/line/Line.js +0 -163
  224. package/dist/esm/line/Line.liquid.js +0 -159
  225. /package/dist/cjs/dialog/{hooks/use-scroll-percentage.js → components/hooks/useScrollPercentage.js} +0 -0
  226. /package/dist/cjs/product/setting/{swatches-style-config → product-variant/swatches-style-config}/color.js +0 -0
  227. /package/dist/cjs/product/setting/{swatches-style-config → product-variant/swatches-style-config}/dropdown.js +0 -0
  228. /package/dist/cjs/product/setting/{swatches-style-config → product-variant/swatches-style-config}/image-shopify.js +0 -0
  229. /package/dist/cjs/product/setting/{swatches-style-config → product-variant/swatches-style-config}/image.js +0 -0
  230. /package/dist/cjs/product/setting/{swatches-style-config → product-variant/swatches-style-config}/rectangle-list.js +0 -0
  231. /package/dist/esm/dialog/{hooks/use-scroll-percentage.js → components/hooks/useScrollPercentage.js} +0 -0
  232. /package/dist/esm/product/setting/{swatches-style-config → product-variant/swatches-style-config}/color.js +0 -0
  233. /package/dist/esm/product/setting/{swatches-style-config → product-variant/swatches-style-config}/dropdown.js +0 -0
  234. /package/dist/esm/product/setting/{swatches-style-config → product-variant/swatches-style-config}/image-shopify.js +0 -0
  235. /package/dist/esm/product/setting/{swatches-style-config → product-variant/swatches-style-config}/image.js +0 -0
  236. /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'
@@ -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,8 @@
1
+ const getItemAttrs = (uid, index)=>{
2
+ return {
3
+ 'data-index': index?.toString(),
4
+ 'data-id': uid
5
+ };
6
+ };
7
+
8
+ export { getItemAttrs };
@@ -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 { makeStyleResponsive, getStyleBackgroundByDevice, isEmptyChildren, cls, filterToolbarPreview } from '@gem-sdk/core';
4
- import { useMemo, Children, isValidElement } from 'react';
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 = ({ builderAttrs, style, setting, children, styles, builderProps })=>{
10
+ const IconList = ({ style, setting, children, styles, builderProps, advanced })=>{
8
11
  const { preload } = setting || {};
9
- const { background, horizontalSpacing, verticalSpacing, align } = styles || {};
10
- const filterStyles = useMemo(()=>{
11
- const delList = [
12
- '--mb',
13
- '--mb-mobile',
14
- '--mb-tablet'
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
- !!preload && /*#__PURE__*/ jsxs(Head, {
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
- ...filterStyles,
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
- }) : /*#__PURE__*/ jsxs(Fragment, {
45
+ }), /*#__PURE__*/ jsxs(Fragment, {
55
46
  children: [
56
47
  /*#__PURE__*/ jsx("ul", {
57
- className: cls('gp-inline-flex gp-flex-col'),
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, RenderIf, makeStyleResponsive, getStyleBackgroundByDevice, cls, WrapRenderChildren, RenderChildren } from '@gem-sdk/core';
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, align } = styles || {};
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
- ${RenderIf(!!preload, `${RenderIf(!!background?.desktop?.image?.src, `<link rel="preload" href="${background?.desktop?.image?.src}" as="image" />`)}
10
- ${RenderIf(!!background?.tablet?.image?.src, `<link rel="preload" href="${background?.tablet?.image?.src}" as="image" />`)}
11
- ${RenderIf(!!background?.mobile?.image?.src, `<link rel="preload" href="${background?.mobile?.image?.src}" as="image" />`)}`)}
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
- ...style,
19
- ...advancedStyle,
20
- ...makeStyleResponsive('ta', align),
21
- ...getStyleBackgroundByDevice(background, {
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: `gp-flex gp-w-full gp-items-center gp-child-item-${parentUid}`,
12
- "data-id": builderProps?.uid,
13
- "data-index": dataIndex,
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, makeStyleResponsive } from '@gem-sdk/core';
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, index, parentUid, builderProps })=>{
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
- data-index="${index?.toString()}"
10
- data-id="${builderProps?.uid}"
11
- class="gp-flex gp-w-full gp-items-center gp-icon-list-item gp-child-item-${parentUid}"
12
- style="${{
13
- ...makeStyleResponsive('cg', horizontalSpacing)
14
- }}"
18
+ ${computedItemAttrs}
19
+ class="${computedItemClasses}"
20
+ style="${computedItemStyles}"
15
21
  >
16
22
  ${children}
17
23
  </li>`;