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