@gem-sdk/components 2.0.0-dev.703 → 2.0.0-dev.705

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 (36) hide show
  1. package/dist/cjs/article/setting/configs/ArticleReadMore/settings.js +86 -134
  2. package/dist/cjs/button/components/common/helpers.js +2 -9
  3. package/dist/cjs/button/components/common/styles.js +14 -81
  4. package/dist/cjs/button/setting/configs/settings.js +85 -133
  5. package/dist/cjs/coupon/common/classes.js +3 -12
  6. package/dist/cjs/coupon/common/styles.js +7 -17
  7. package/dist/cjs/coupon/setting/config/settings.js +60 -100
  8. package/dist/cjs/form/setting/submit-button/configs/settings.js +103 -250
  9. package/dist/cjs/product/components/DynamicCheckout/common/styles.js +12 -12
  10. package/dist/cjs/product/components/ProductBadge/index.liquid.js +1 -1
  11. package/dist/cjs/product/components/ProductButton/common/styles.js +4 -14
  12. package/dist/cjs/product/components/ProductImagesV2/common/common.js +1 -1
  13. package/dist/cjs/product/setting/dynamic-checkout/configs/settings.js +86 -134
  14. package/dist/cjs/product/setting/product-button/configs/settings.js +142 -222
  15. package/dist/cjs/product/setting/product-view-more/configs/settings.js +100 -148
  16. package/dist/cjs/tab/components/Tabs.liquid.js +2 -2
  17. package/dist/cjs/third-party/setting/Selleasy/index.js +5 -5
  18. package/dist/esm/article/setting/configs/ArticleReadMore/settings.js +86 -134
  19. package/dist/esm/button/components/common/helpers.js +2 -9
  20. package/dist/esm/button/components/common/styles.js +16 -81
  21. package/dist/esm/button/setting/configs/settings.js +85 -133
  22. package/dist/esm/coupon/common/classes.js +3 -12
  23. package/dist/esm/coupon/common/styles.js +7 -17
  24. package/dist/esm/coupon/setting/config/settings.js +60 -100
  25. package/dist/esm/form/setting/submit-button/configs/settings.js +103 -250
  26. package/dist/esm/product/components/DynamicCheckout/common/styles.js +12 -12
  27. package/dist/esm/product/components/ProductBadge/index.liquid.js +1 -1
  28. package/dist/esm/product/components/ProductButton/common/styles.js +4 -14
  29. package/dist/esm/product/components/ProductImagesV2/common/common.js +1 -1
  30. package/dist/esm/product/setting/dynamic-checkout/configs/settings.js +86 -134
  31. package/dist/esm/product/setting/product-button/configs/settings.js +142 -222
  32. package/dist/esm/product/setting/product-view-more/configs/settings.js +100 -148
  33. package/dist/esm/tab/components/Tabs.liquid.js +2 -2
  34. package/dist/esm/third-party/setting/Selleasy/index.js +5 -5
  35. package/dist/types/index.d.ts +23 -23
  36. package/package.json +2 -2
@@ -104,252 +104,116 @@ const SubmitButtonSettings = [
104
104
  {
105
105
  id: 'borderBtnV2',
106
106
  type: 'border-v2',
107
- devices: {
108
- desktop: {
109
- default: {
110
- normal: {
111
- borderType: 'none',
112
- border: 'none',
113
- borderWidth: '1px',
114
- width: '1px 1px 1px 1px',
115
- color: '#121212',
116
- isCustom: true
117
- },
118
- hover: {
119
- borderType: 'none',
120
- border: 'none',
121
- borderWidth: '1px',
122
- width: '1px 1px 1px 1px',
123
- color: '#121212',
124
- isCustom: true
125
- }
126
- }
107
+ default: {
108
+ normal: {
109
+ borderType: 'none',
110
+ border: 'none',
111
+ borderWidth: '1px',
112
+ width: '1px 1px 1px 1px',
113
+ color: '#121212',
114
+ isCustom: true
115
+ },
116
+ hover: {
117
+ borderType: 'none',
118
+ border: 'none',
119
+ borderWidth: '1px',
120
+ width: '1px 1px 1px 1px',
121
+ color: '#121212',
122
+ isCustom: true
127
123
  }
128
124
  },
129
125
  compoDefaultValue: {
130
- desktop: {
131
- default: {
132
- normal: {
133
- border: 'solid',
134
- color: '#121212',
135
- width: '1px',
136
- borderWidth: '1px'
137
- },
138
- hover: {
139
- border: 'solid',
140
- color: '#121212',
141
- width: '1px',
142
- borderWidth: '1px'
143
- }
144
- }
145
- },
146
- tablet: {
147
- default: {
148
- normal: {
149
- border: 'solid',
150
- color: '#121212',
151
- width: '1px',
152
- borderWidth: '1px'
153
- },
154
- hover: {
155
- border: 'solid',
156
- color: '#121212',
157
- width: '1px',
158
- borderWidth: '1px'
159
- }
160
- }
126
+ normal: {
127
+ border: 'solid',
128
+ color: '#121212',
129
+ width: '1px',
130
+ borderWidth: '1px'
161
131
  },
162
- mobile: {
163
- default: {
164
- normal: {
165
- border: 'solid',
166
- color: '#121212',
167
- width: '1px',
168
- borderWidth: '1px'
169
- },
170
- hover: {
171
- border: 'solid',
172
- color: '#121212',
173
- width: '1px',
174
- borderWidth: '1px'
175
- }
176
- }
132
+ hover: {
133
+ border: 'solid',
134
+ color: '#121212',
135
+ width: '1px',
136
+ borderWidth: '1px'
177
137
  }
178
138
  }
179
139
  },
180
140
  {
181
141
  id: 'roundedBtnV2',
182
142
  type: 'corner-v2',
183
- devices: {
184
- desktop: {
185
- default: {
186
- normal: {
187
- btrr: '0px',
188
- bblr: '0px',
189
- bbrr: '0px',
190
- btlr: '0px',
191
- radiusType: 'none'
192
- },
193
- hover: {
194
- btrr: '0px',
195
- bblr: '0px',
196
- bbrr: '0px',
197
- btlr: '0px',
198
- radiusType: 'none'
199
- }
200
- }
143
+ default: {
144
+ normal: {
145
+ btrr: '0px',
146
+ bblr: '0px',
147
+ bbrr: '0px',
148
+ btlr: '0px',
149
+ radiusType: 'none'
150
+ },
151
+ hover: {
152
+ btrr: '0px',
153
+ bblr: '0px',
154
+ bbrr: '0px',
155
+ btlr: '0px',
156
+ radiusType: 'none'
201
157
  }
202
158
  },
203
159
  compoDefaultValue: {
204
- desktop: {
205
- default: {
206
- normal: {
207
- btrr: '8px',
208
- bblr: '8px',
209
- bbrr: '8px',
210
- btlr: '8px',
211
- radiusType: 'rounded'
212
- },
213
- hover: {
214
- btrr: '8px',
215
- bblr: '8px',
216
- bbrr: '8px',
217
- btlr: '8px',
218
- radiusType: 'rounded'
219
- }
220
- }
221
- },
222
- tablet: {
223
- default: {
224
- normal: {
225
- btrr: '8px',
226
- bblr: '8px',
227
- bbrr: '8px',
228
- btlr: '8px',
229
- radiusType: 'rounded'
230
- },
231
- hover: {
232
- btrr: '8px',
233
- bblr: '8px',
234
- bbrr: '8px',
235
- btlr: '8px',
236
- radiusType: 'rounded'
237
- }
238
- }
160
+ normal: {
161
+ btrr: '8px',
162
+ bblr: '8px',
163
+ bbrr: '8px',
164
+ btlr: '8px',
165
+ radiusType: 'rounded'
239
166
  },
240
- mobile: {
241
- default: {
242
- normal: {
243
- btrr: '8px',
244
- bblr: '8px',
245
- bbrr: '8px',
246
- btlr: '8px',
247
- radiusType: 'rounded'
248
- },
249
- hover: {
250
- btrr: '8px',
251
- bblr: '8px',
252
- bbrr: '8px',
253
- btlr: '8px',
254
- radiusType: 'rounded'
255
- }
256
- }
167
+ hover: {
168
+ btrr: '8px',
169
+ bblr: '8px',
170
+ bbrr: '8px',
171
+ btlr: '8px',
172
+ radiusType: 'rounded'
257
173
  }
258
174
  }
259
175
  },
260
176
  {
261
177
  id: 'boxShadowBtnV2',
262
178
  type: 'shadow-v2',
263
- devices: {
264
- desktop: {
265
- default: {
266
- normal: {
267
- type: 'shadow-1',
268
- distance: '4px',
269
- blur: '4px',
270
- spread: '0px',
271
- color: '#121212',
272
- angle: 45,
273
- enable: false
274
- },
275
- hover: {
276
- type: 'shadow-1',
277
- distance: '4px',
278
- blur: '4px',
279
- spread: '0px',
280
- color: '#121212',
281
- angle: 45,
282
- enable: false
283
- }
284
- }
179
+ default: {
180
+ normal: {
181
+ type: 'shadow-1',
182
+ distance: '4px',
183
+ blur: '4px',
184
+ spread: '0px',
185
+ color: '#121212',
186
+ angle: 45,
187
+ enable: false
188
+ },
189
+ hover: {
190
+ type: 'shadow-1',
191
+ distance: '4px',
192
+ blur: '4px',
193
+ spread: '0px',
194
+ color: '#121212',
195
+ angle: 45,
196
+ enable: false
285
197
  }
286
198
  },
287
199
  compoDefaultValue: {
288
- desktop: {
289
- default: {
290
- normal: {
291
- type: 'shadow-1',
292
- distance: '4px',
293
- blur: '4px',
294
- spread: '0px',
295
- color: '#121212',
296
- angle: 45,
297
- enable: true
298
- },
299
- hover: {
300
- type: 'shadow-1',
301
- distance: '4px',
302
- blur: '4px',
303
- spread: '0px',
304
- color: '#121212',
305
- angle: 45,
306
- enable: true
307
- }
308
- }
309
- },
310
- tablet: {
311
- default: {
312
- normal: {
313
- type: 'shadow-1',
314
- distance: '4px',
315
- blur: '4px',
316
- spread: '0px',
317
- color: '#121212',
318
- angle: 45,
319
- enable: true
320
- },
321
- hover: {
322
- type: 'shadow-1',
323
- distance: '4px',
324
- blur: '4px',
325
- spread: '0px',
326
- color: '#121212',
327
- angle: 45,
328
- enable: true
329
- }
330
- }
200
+ normal: {
201
+ type: 'shadow-1',
202
+ distance: '4px',
203
+ blur: '4px',
204
+ spread: '0px',
205
+ color: '#121212',
206
+ angle: 45,
207
+ enable: true
331
208
  },
332
- mobile: {
333
- default: {
334
- normal: {
335
- type: 'shadow-1',
336
- distance: '4px',
337
- blur: '4px',
338
- spread: '0px',
339
- color: '#121212',
340
- angle: 45,
341
- enable: true
342
- },
343
- hover: {
344
- type: 'shadow-1',
345
- distance: '4px',
346
- blur: '4px',
347
- spread: '0px',
348
- color: '#121212',
349
- angle: 45,
350
- enable: true
351
- }
352
- }
209
+ hover: {
210
+ type: 'shadow-1',
211
+ distance: '4px',
212
+ blur: '4px',
213
+ spread: '0px',
214
+ color: '#121212',
215
+ angle: 45,
216
+ enable: true
353
217
  }
354
218
  }
355
219
  },
@@ -381,21 +245,13 @@ const SubmitButtonSettings = [
381
245
  {
382
246
  id: 'backgroundColorV2',
383
247
  type: 'color-picker-v2',
384
- devices: {
385
- desktop: {
386
- default: {
387
- normal: 'brand',
388
- hover: 'highlight'
389
- }
390
- }
248
+ default: {
249
+ normal: 'brand',
250
+ hover: 'highlight'
391
251
  },
392
252
  compoDefaultValue: {
393
- desktop: {
394
- default: {
395
- normal: 'brand',
396
- hover: 'highlight'
397
- }
398
- }
253
+ normal: 'brand',
254
+ hover: 'highlight'
399
255
  },
400
256
  enableGradient: true
401
257
  },
@@ -414,19 +270,11 @@ const SubmitButtonSettings = [
414
270
  {
415
271
  id: 'textColorHover',
416
272
  type: 'color-picker-v2',
417
- devices: {
418
- desktop: {
419
- default: {
420
- hover: 'text-3'
421
- }
422
- }
273
+ default: {
274
+ hover: 'text-3'
423
275
  },
424
276
  compoDefaultValue: {
425
- desktop: {
426
- default: {
427
- hover: 'text-3'
428
- }
429
- }
277
+ hover: 'text-3'
430
278
  }
431
279
  },
432
280
  {
@@ -486,17 +334,23 @@ const SubmitButtonSettings = [
486
334
  {
487
335
  label: 'Left',
488
336
  value: 'left',
489
- type: 'align'
337
+ type: 'align',
338
+ tooltip: 'Align left',
339
+ iconName: 'gp-align-left'
490
340
  },
491
341
  {
492
342
  label: 'Center',
493
343
  value: 'center',
494
- type: 'align'
344
+ type: 'align',
345
+ tooltip: 'Align center',
346
+ iconName: 'gp-align-center'
495
347
  },
496
348
  {
497
349
  label: 'Right',
498
350
  value: 'right',
499
- type: 'align'
351
+ type: 'align',
352
+ tooltip: 'Align right',
353
+ iconName: 'gp-align-right'
500
354
  }
501
355
  ],
502
356
  devices: {
@@ -513,7 +367,6 @@ const SubmitButtonSettings = [
513
367
  type: 'paragraph-1'
514
368
  },
515
369
  hiddenSetting: {
516
- // color: true,
517
370
  transform: true,
518
371
  textAlign: true
519
372
  },
@@ -51,36 +51,36 @@ const getDeviceStyles = ({ uid, device, styles, composeGlobalSize })=>{
51
51
  ${composeSpacing(device, composeGlobalSize.padding)}
52
52
  ${composeSize(composeGlobalSize.width[device] ?? 'auto', composeGlobalSize.height[device] ?? 'auto', false)}
53
53
  ${core.composeShadowCss({
54
- boxShadowValue: styles?.boxShadowBtnV2?.[device]?.normal,
55
- hasBoxShadow: styles?.boxShadowBtnV2?.[device]?.normal?.type !== 'none'
54
+ boxShadowValue: styles?.boxShadowBtnV2?.normal,
55
+ hasBoxShadow: styles?.boxShadowBtnV2?.normal?.type !== 'none'
56
56
  }) || ''}
57
- ${core.composeCornerCss(styles?.roundedBtnV2?.[device]?.normal, true)}
57
+ ${core.composeCornerCss(styles?.roundedBtnV2?.normal, true)}
58
58
  ${device === 'desktop' ? core.composeTypographyV2Css(styles?.typo, true) : ''}
59
59
  }
60
60
 
61
61
  .wrap__button--unbranded__${uid} .shopify-payment-button .shopify-payment-button__button--unbranded:hover {
62
62
  ${core.composeShadowCss({
63
- boxShadowValue: styles?.boxShadowBtnV2?.[device]?.hover,
64
- hasBoxShadow: styles?.boxShadowBtnV2?.[device]?.hover?.type !== 'none',
63
+ boxShadowValue: styles?.boxShadowBtnV2?.hover,
64
+ hasBoxShadow: styles?.boxShadowBtnV2?.hover?.type !== 'none',
65
65
  important: true
66
66
  }) || ''}
67
- ${core.composeTextHoverColorCss(device, styles?.textColorHover, true)}
67
+ ${core.composeTextHoverColorCss(styles?.textColorHover, true)}
68
68
  }
69
69
 
70
70
  .wrap__button--unbranded__${uid} .shopify-payment-button .shopify-payment-button__button--unbranded::before {
71
- ${core.composeBorderCss(styles?.borderBtnV2?.[device]?.normal)}
72
- ${core.composeCornerCss(styles?.roundedBtnV2?.[device]?.normal)}
71
+ ${core.composeBorderCss(styles?.borderBtnV2?.normal)}
72
+ ${core.composeCornerCss(styles?.roundedBtnV2?.normal)}
73
73
  ${core.composeBackgroundImageCss(styles?.backgroundImage, {
74
74
  device,
75
75
  state: 'normal'
76
76
  })}
77
- ${core.composeBackgroundCss(styles?.backgroundColorV2?.[device]?.normal)}
77
+ ${core.composeBackgroundCss(styles?.backgroundColorV2?.normal)}
78
78
  }
79
79
 
80
80
  .wrap__button--unbranded__${uid} .shopify-payment-button .shopify-payment-button__button--unbranded:hover::before {
81
- ${core.composeBorderCss(styles?.borderBtnV2?.[device]?.hover)}
82
- ${core.composeCornerCss(styles?.roundedBtnV2?.[device]?.hover)}
83
- ${core.composeBackgroundCss(styles?.backgroundColorV2?.[device]?.hover)}
81
+ ${core.composeBorderCss(styles?.borderBtnV2?.hover)}
82
+ ${core.composeCornerCss(styles?.roundedBtnV2?.hover)}
83
+ ${core.composeBackgroundCss(styles?.backgroundColorV2?.hover)}
84
84
  }
85
85
  `;
86
86
  };
@@ -110,7 +110,7 @@ const ProductBadge = (props)=>{
110
110
  gp-data='${core.dataStringify(createDataState)}'
111
111
  class="containerClass"
112
112
  style="${containerStyle}"
113
- data-display-content="${pageContext?.isPreviewing ? displayContentVal : `{{${displayContentVal}}}`}"
113
+ data-display-content="${displayContentVal}"
114
114
  >
115
115
  <div class="${wrapperClass}">
116
116
  <div
@@ -51,18 +51,8 @@ const getSoldOutButtonStyles = (styles)=>{
51
51
  const mapStylesByDevice = (target, key, value)=>{
52
52
  if (value) {
53
53
  target[key] = {
54
- desktop: {
55
- normal: value.desktop?.normal,
56
- hover: target[key]?.desktop?.hover
57
- },
58
- tablet: {
59
- normal: value.tablet?.normal,
60
- hover: target[key]?.tablet?.hover
61
- },
62
- mobile: {
63
- normal: value.mobile?.normal,
64
- hover: target[key]?.mobile?.hover
65
- }
54
+ normal: value?.normal,
55
+ hover: target[key]?.hover
66
56
  };
67
57
  }
68
58
  };
@@ -70,10 +60,10 @@ const getSoldOutButtonStyles = (styles)=>{
70
60
  mapStylesByDevice(buttonSoldOutStyles, 'boxShadowBtnV2', oosShadowV2);
71
61
  mapStylesByDevice(buttonSoldOutStyles, 'roundedBtnV2', oosRoundedV2);
72
62
  mapStylesByDevice(buttonSoldOutStyles, 'borderBtnV2', oosBorderV2);
73
- if (oosTextColorV2?.desktop?.normal) {
63
+ if (oosTextColorV2?.normal) {
74
64
  buttonSoldOutStyles.typo = buttonSoldOutStyles.typo ?? {};
75
65
  buttonSoldOutStyles.typo.attrs = buttonSoldOutStyles.typo.attrs ?? {};
76
- buttonSoldOutStyles.typo.attrs.color = oosTextColorV2.desktop.normal;
66
+ buttonSoldOutStyles.typo.attrs.color = oosTextColorV2.normal;
77
67
  }
78
68
  return {
79
69
  ...getButtonBaseStyles(),
@@ -335,7 +335,7 @@ const getPaddingBottomByShapeSetting = (shapeSetting)=>{
335
335
  };
336
336
  return;
337
337
  }
338
- const value = aspectRatio?.[device] !== 'auto' && !!aspectRatio?.[device] ? aspectRatio?.[device]?.split('/').reverse().join('') : '{%if media.height%} {{media.height}} / {{media.width}} {%else%} 100 / 100 {%endif%}';
338
+ const value = aspectRatio?.[device] !== 'auto' && !!aspectRatio?.[device] ? aspectRatio?.[device]?.split('/').reverse().join('/') : '{%if media.height%} {{media.height}} / {{media.width}} {%else%} 100 / 100 {%endif%}';
339
339
  result = {
340
340
  ...result,
341
341
  [device]: `calc((${value})*100%)`