@gem-sdk/components 2.0.0-dev.393 → 2.0.0-dev.395

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 (43) hide show
  1. package/dist/cjs/builder.js +4 -4
  2. package/dist/cjs/index.js +30 -30
  3. package/dist/cjs/index.liquid.js +4 -4
  4. package/dist/cjs/product/components/ProductBundle/common/styles.js +22 -6
  5. package/dist/cjs/product/components/ProductBundle/components/ProductBundleDiscountChildrenItem.js +2 -1
  6. package/dist/cjs/product/components/ProductBundle/components/ProductBundleDiscountChildrenItem.liquid.js +1 -1
  7. package/dist/cjs/product/components/ProductBundle/setting/ProductBundleDiscount.js +47 -415
  8. package/dist/cjs/product/components/ProductBundle/setting/uiV1.js +404 -0
  9. package/dist/cjs/product/components/ProductBundle/setting/uiV2.js +728 -0
  10. package/dist/cjs/product/components/ProductDiscountTag/common/getClasses.js +38 -0
  11. package/dist/cjs/product/components/ProductDiscountTag/common/getStyle.js +42 -0
  12. package/dist/cjs/product/components/ProductDiscountTag/hooks/useGpDiscountTag.js +108 -0
  13. package/dist/cjs/product/components/ProductDiscountTag/index.js +110 -0
  14. package/dist/cjs/product/components/ProductDiscountTag/index.liquid.js +91 -0
  15. package/dist/cjs/product/index.js +4 -4
  16. package/dist/cjs/product/next.js +1 -1
  17. package/dist/cjs/product/setting/ProductTag.js +7 -299
  18. package/dist/cjs/product/setting/product-discount-tag/configs/settings.js +191 -0
  19. package/dist/cjs/product/setting/product-discount-tag/configs/uiV2.js +190 -0
  20. package/dist/esm/builder.js +1 -1
  21. package/dist/esm/index.js +1 -1
  22. package/dist/esm/index.liquid.js +1 -1
  23. package/dist/esm/product/components/ProductBundle/common/styles.js +23 -7
  24. package/dist/esm/product/components/ProductBundle/components/ProductBundleDiscountChildrenItem.js +2 -1
  25. package/dist/esm/product/components/ProductBundle/components/ProductBundleDiscountChildrenItem.liquid.js +1 -1
  26. package/dist/esm/product/components/ProductBundle/setting/ProductBundleDiscount.js +47 -415
  27. package/dist/esm/product/components/ProductBundle/setting/uiV1.js +400 -0
  28. package/dist/esm/product/components/ProductBundle/setting/uiV2.js +724 -0
  29. package/dist/esm/product/components/ProductDiscountTag/common/getClasses.js +33 -0
  30. package/dist/esm/product/components/ProductDiscountTag/common/getStyle.js +38 -0
  31. package/dist/esm/product/components/ProductDiscountTag/hooks/useGpDiscountTag.js +106 -0
  32. package/dist/esm/product/components/ProductDiscountTag/index.js +106 -0
  33. package/dist/esm/product/components/ProductDiscountTag/index.liquid.js +87 -0
  34. package/dist/esm/product/next.js +1 -1
  35. package/dist/esm/product/setting/ProductTag.js +7 -299
  36. package/dist/esm/product/setting/product-discount-tag/configs/settings.js +189 -0
  37. package/dist/esm/product/setting/product-discount-tag/configs/uiV2.js +188 -0
  38. package/dist/types/index.d.ts +2 -0
  39. package/package.json +1 -1
  40. package/dist/cjs/product/components/ProductTag/ProductTag.js +0 -200
  41. package/dist/cjs/product/components/ProductTag/ProductTag.liquid.js +0 -107
  42. package/dist/esm/product/components/ProductTag/ProductTag.js +0 -196
  43. package/dist/esm/product/components/ProductTag/ProductTag.liquid.js +0 -103
@@ -0,0 +1,400 @@
1
+ const ControlUIV1 = [
2
+ {
3
+ type: 'group',
4
+ label: {
5
+ en: 'Item management'
6
+ },
7
+ controls: [
8
+ {
9
+ type: 'control',
10
+ layout: 'vertical',
11
+ setting: {
12
+ id: 'childItem'
13
+ }
14
+ }
15
+ ]
16
+ },
17
+ {
18
+ type: 'control',
19
+ label: {
20
+ en: 'Use product compare-at price'
21
+ },
22
+ setting: {
23
+ id: 'useProductCompareAtPrice'
24
+ }
25
+ },
26
+ {
27
+ type: 'control',
28
+ label: {
29
+ en: 'Hide no-discount items'
30
+ },
31
+ setting: {
32
+ id: 'hideNoDiscountItem'
33
+ }
34
+ },
35
+ {
36
+ type: 'group',
37
+ label: {
38
+ en: ''
39
+ },
40
+ controls: [
41
+ {
42
+ type: 'control',
43
+ label: {
44
+ en: 'Pre-selected item'
45
+ },
46
+ setting: {
47
+ id: 'hasPreSelectItem'
48
+ },
49
+ options: {
50
+ label: 'large',
51
+ styleControl: {
52
+ width: 'auto'
53
+ }
54
+ }
55
+ },
56
+ {
57
+ type: 'control',
58
+ condition: 'hasPreSelectItem == true',
59
+ layout: 'vertical',
60
+ setting: {
61
+ id: 'selectItemDefault'
62
+ },
63
+ options: {
64
+ styleControl: {
65
+ 'max-width': '100%'
66
+ }
67
+ }
68
+ }
69
+ ]
70
+ },
71
+ {
72
+ type: 'group',
73
+ controls: [
74
+ {
75
+ type: 'control',
76
+ label: {
77
+ en: 'Icon'
78
+ },
79
+ options: {
80
+ label: 'large'
81
+ },
82
+ setting: {
83
+ id: 'enableIcon'
84
+ }
85
+ },
86
+ {
87
+ type: 'control',
88
+ condition: 'enableIcon == true && layout == "vertical-layout"',
89
+ label: {
90
+ en: 'Icon position'
91
+ },
92
+ setting: {
93
+ id: 'iconPosition'
94
+ }
95
+ },
96
+ {
97
+ type: 'control',
98
+ condition: 'enableIcon == true && layout == "horizontal-layout"',
99
+ label: {
100
+ en: 'Icon position'
101
+ },
102
+ setting: {
103
+ id: 'iconHorizontalPosition'
104
+ }
105
+ },
106
+ {
107
+ type: 'control',
108
+ condition: 'enableIcon == true',
109
+ label: {
110
+ en: 'Icon size'
111
+ },
112
+ setting: {
113
+ id: 'iconSize'
114
+ }
115
+ },
116
+ {
117
+ type: 'control',
118
+ condition: 'enableIcon == true',
119
+ label: {
120
+ en: 'Icon spacing'
121
+ },
122
+ setting: {
123
+ id: 'iconSpacing'
124
+ }
125
+ }
126
+ ]
127
+ },
128
+ {
129
+ label: {
130
+ en: 'Size'
131
+ },
132
+ type: 'group',
133
+ controls: [
134
+ {
135
+ type: 'control',
136
+ setting: {
137
+ id: 'size'
138
+ },
139
+ options: {
140
+ noGap: true
141
+ }
142
+ }
143
+ ]
144
+ },
145
+ {
146
+ type: 'group',
147
+ label: {
148
+ en: 'Item states'
149
+ },
150
+ options: {
151
+ labelSpacing: 'small'
152
+ },
153
+ controls: [
154
+ {
155
+ type: 'tab',
156
+ controls: [
157
+ {
158
+ type: 'group',
159
+ label: {
160
+ en: 'Default'
161
+ },
162
+ controls: [
163
+ {
164
+ type: 'control',
165
+ label: {
166
+ en: 'Icon'
167
+ },
168
+ setting: {
169
+ id: 'iconColor',
170
+ state: 'normal'
171
+ }
172
+ },
173
+ {
174
+ type: 'control',
175
+ label: {
176
+ en: 'Background'
177
+ },
178
+ setting: {
179
+ id: 'backgroundColor',
180
+ state: 'normal'
181
+ }
182
+ },
183
+ {
184
+ type: 'control',
185
+ options: {
186
+ labelPosition: 'start'
187
+ },
188
+ label: {
189
+ en: 'Border'
190
+ },
191
+ setting: {
192
+ id: 'borderBundle',
193
+ state: 'normal'
194
+ }
195
+ },
196
+ {
197
+ type: 'control',
198
+ label: {
199
+ en: 'Corner'
200
+ },
201
+ setting: {
202
+ id: 'roundedBundle',
203
+ state: 'normal'
204
+ }
205
+ },
206
+ {
207
+ type: 'control',
208
+ label: {
209
+ en: 'Shadow'
210
+ },
211
+ setting: {
212
+ id: 'hasBoxShadowBundle',
213
+ state: 'normal'
214
+ }
215
+ },
216
+ {
217
+ type: 'group',
218
+ condition: 'hasBoxShadowBundle.normal == true',
219
+ controls: [
220
+ {
221
+ type: 'control',
222
+ layout: 'vertical',
223
+ setting: {
224
+ id: 'boxShadowBundle',
225
+ state: 'normal'
226
+ }
227
+ }
228
+ ]
229
+ }
230
+ ]
231
+ },
232
+ {
233
+ type: 'group',
234
+ label: {
235
+ en: 'Hover'
236
+ },
237
+ controls: [
238
+ {
239
+ type: 'control',
240
+ label: {
241
+ en: 'Icon'
242
+ },
243
+ setting: {
244
+ id: 'iconColor',
245
+ state: 'hover'
246
+ }
247
+ },
248
+ {
249
+ type: 'control',
250
+ label: {
251
+ en: 'Background'
252
+ },
253
+ setting: {
254
+ id: 'backgroundColor',
255
+ state: 'hover'
256
+ }
257
+ },
258
+ {
259
+ type: 'control',
260
+ options: {
261
+ labelPosition: 'start'
262
+ },
263
+ label: {
264
+ en: 'Border'
265
+ },
266
+ setting: {
267
+ id: 'borderBundle',
268
+ state: 'hover'
269
+ }
270
+ },
271
+ {
272
+ type: 'control',
273
+ label: {
274
+ en: 'Corner'
275
+ },
276
+ setting: {
277
+ id: 'roundedBundle',
278
+ state: 'hover'
279
+ }
280
+ },
281
+ {
282
+ type: 'control',
283
+ label: {
284
+ en: 'Shadow'
285
+ },
286
+ setting: {
287
+ id: 'hasBoxShadowBundle',
288
+ state: 'hover'
289
+ }
290
+ },
291
+ {
292
+ type: 'group',
293
+ condition: 'hasBoxShadowBundle.hover == true',
294
+ controls: [
295
+ {
296
+ type: 'control',
297
+ setting: {
298
+ id: 'boxShadowBundle',
299
+ state: 'hover'
300
+ },
301
+ layout: 'vertical'
302
+ }
303
+ ]
304
+ }
305
+ ]
306
+ },
307
+ {
308
+ type: 'group',
309
+ label: {
310
+ en: 'Active'
311
+ },
312
+ controls: [
313
+ {
314
+ type: 'control',
315
+ label: {
316
+ en: 'Icon'
317
+ },
318
+ setting: {
319
+ id: 'iconColor',
320
+ state: 'active'
321
+ }
322
+ },
323
+ {
324
+ type: 'control',
325
+ label: {
326
+ en: 'Background'
327
+ },
328
+ setting: {
329
+ id: 'backgroundColor',
330
+ state: 'active'
331
+ }
332
+ },
333
+ {
334
+ type: 'control',
335
+ options: {
336
+ labelPosition: 'start'
337
+ },
338
+ label: {
339
+ en: 'Border'
340
+ },
341
+ setting: {
342
+ id: 'borderBundle',
343
+ state: 'active'
344
+ }
345
+ },
346
+ {
347
+ type: 'control',
348
+ label: {
349
+ en: 'Corner'
350
+ },
351
+ setting: {
352
+ id: 'roundedBundle',
353
+ state: 'active'
354
+ }
355
+ },
356
+ {
357
+ type: 'control',
358
+ label: {
359
+ en: 'Shadow'
360
+ },
361
+ setting: {
362
+ id: 'hasBoxShadowBundle',
363
+ state: 'active'
364
+ }
365
+ },
366
+ {
367
+ type: 'group',
368
+ condition: 'hasBoxShadowBundle.active == true',
369
+ controls: [
370
+ {
371
+ type: 'control',
372
+ setting: {
373
+ id: 'boxShadowBundle',
374
+ state: 'active'
375
+ },
376
+ layout: 'vertical'
377
+ }
378
+ ]
379
+ }
380
+ ]
381
+ }
382
+ ]
383
+ }
384
+ ]
385
+ },
386
+ {
387
+ type: 'control',
388
+ label: {
389
+ en: 'Align'
390
+ },
391
+ options: {
392
+ label: 'large'
393
+ },
394
+ setting: {
395
+ id: 'align'
396
+ }
397
+ }
398
+ ];
399
+
400
+ export { ControlUIV1 as default };