@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
@@ -49,36 +49,36 @@ const getDeviceStyles = ({ uid, device, styles, composeGlobalSize })=>{
49
49
  ${composeSpacing(device, composeGlobalSize.padding)}
50
50
  ${composeSize(composeGlobalSize.width[device] ?? 'auto', composeGlobalSize.height[device] ?? 'auto', false)}
51
51
  ${composeShadowCss({
52
- boxShadowValue: styles?.boxShadowBtnV2?.[device]?.normal,
53
- hasBoxShadow: styles?.boxShadowBtnV2?.[device]?.normal?.type !== 'none'
52
+ boxShadowValue: styles?.boxShadowBtnV2?.normal,
53
+ hasBoxShadow: styles?.boxShadowBtnV2?.normal?.type !== 'none'
54
54
  }) || ''}
55
- ${composeCornerCss(styles?.roundedBtnV2?.[device]?.normal, true)}
55
+ ${composeCornerCss(styles?.roundedBtnV2?.normal, true)}
56
56
  ${device === 'desktop' ? composeTypographyV2Css(styles?.typo, true) : ''}
57
57
  }
58
58
 
59
59
  .wrap__button--unbranded__${uid} .shopify-payment-button .shopify-payment-button__button--unbranded:hover {
60
60
  ${composeShadowCss({
61
- boxShadowValue: styles?.boxShadowBtnV2?.[device]?.hover,
62
- hasBoxShadow: styles?.boxShadowBtnV2?.[device]?.hover?.type !== 'none',
61
+ boxShadowValue: styles?.boxShadowBtnV2?.hover,
62
+ hasBoxShadow: styles?.boxShadowBtnV2?.hover?.type !== 'none',
63
63
  important: true
64
64
  }) || ''}
65
- ${composeTextHoverColorCss(device, styles?.textColorHover, true)}
65
+ ${composeTextHoverColorCss(styles?.textColorHover, true)}
66
66
  }
67
67
 
68
68
  .wrap__button--unbranded__${uid} .shopify-payment-button .shopify-payment-button__button--unbranded::before {
69
- ${composeBorderCss(styles?.borderBtnV2?.[device]?.normal)}
70
- ${composeCornerCss(styles?.roundedBtnV2?.[device]?.normal)}
69
+ ${composeBorderCss(styles?.borderBtnV2?.normal)}
70
+ ${composeCornerCss(styles?.roundedBtnV2?.normal)}
71
71
  ${composeBackgroundImageCss(styles?.backgroundImage, {
72
72
  device,
73
73
  state: 'normal'
74
74
  })}
75
- ${composeBackgroundCss(styles?.backgroundColorV2?.[device]?.normal)}
75
+ ${composeBackgroundCss(styles?.backgroundColorV2?.normal)}
76
76
  }
77
77
 
78
78
  .wrap__button--unbranded__${uid} .shopify-payment-button .shopify-payment-button__button--unbranded:hover::before {
79
- ${composeBorderCss(styles?.borderBtnV2?.[device]?.hover)}
80
- ${composeCornerCss(styles?.roundedBtnV2?.[device]?.hover)}
81
- ${composeBackgroundCss(styles?.backgroundColorV2?.[device]?.hover)}
79
+ ${composeBorderCss(styles?.borderBtnV2?.hover)}
80
+ ${composeCornerCss(styles?.roundedBtnV2?.hover)}
81
+ ${composeBackgroundCss(styles?.backgroundColorV2?.hover)}
82
82
  }
83
83
  `;
84
84
  };
@@ -106,7 +106,7 @@ const ProductBadge = (props)=>{
106
106
  gp-data='${dataStringify(createDataState)}'
107
107
  class="containerClass"
108
108
  style="${containerStyle}"
109
- data-display-content="${pageContext?.isPreviewing ? displayContentVal : `{{${displayContentVal}}}`}"
109
+ data-display-content="${displayContentVal}"
110
110
  >
111
111
  <div class="${wrapperClass}">
112
112
  <div
@@ -49,18 +49,8 @@ const getSoldOutButtonStyles = (styles)=>{
49
49
  const mapStylesByDevice = (target, key, value)=>{
50
50
  if (value) {
51
51
  target[key] = {
52
- desktop: {
53
- normal: value.desktop?.normal,
54
- hover: target[key]?.desktop?.hover
55
- },
56
- tablet: {
57
- normal: value.tablet?.normal,
58
- hover: target[key]?.tablet?.hover
59
- },
60
- mobile: {
61
- normal: value.mobile?.normal,
62
- hover: target[key]?.mobile?.hover
63
- }
52
+ normal: value?.normal,
53
+ hover: target[key]?.hover
64
54
  };
65
55
  }
66
56
  };
@@ -68,10 +58,10 @@ const getSoldOutButtonStyles = (styles)=>{
68
58
  mapStylesByDevice(buttonSoldOutStyles, 'boxShadowBtnV2', oosShadowV2);
69
59
  mapStylesByDevice(buttonSoldOutStyles, 'roundedBtnV2', oosRoundedV2);
70
60
  mapStylesByDevice(buttonSoldOutStyles, 'borderBtnV2', oosBorderV2);
71
- if (oosTextColorV2?.desktop?.normal) {
61
+ if (oosTextColorV2?.normal) {
72
62
  buttonSoldOutStyles.typo = buttonSoldOutStyles.typo ?? {};
73
63
  buttonSoldOutStyles.typo.attrs = buttonSoldOutStyles.typo.attrs ?? {};
74
- buttonSoldOutStyles.typo.attrs.color = oosTextColorV2.desktop.normal;
64
+ buttonSoldOutStyles.typo.attrs.color = oosTextColorV2.normal;
75
65
  }
76
66
  return {
77
67
  ...getButtonBaseStyles(),
@@ -333,7 +333,7 @@ const getPaddingBottomByShapeSetting = (shapeSetting)=>{
333
333
  };
334
334
  return;
335
335
  }
336
- const value = aspectRatio?.[device] !== 'auto' && !!aspectRatio?.[device] ? aspectRatio?.[device]?.split('/').reverse().join('') : '{%if media.height%} {{media.height}} / {{media.width}} {%else%} 100 / 100 {%endif%}';
336
+ const value = aspectRatio?.[device] !== 'auto' && !!aspectRatio?.[device] ? aspectRatio?.[device]?.split('/').reverse().join('/') : '{%if media.height%} {{media.height}} / {{media.width}} {%else%} 100 / 100 {%endif%}';
337
337
  result = {
338
338
  ...result,
339
339
  [device]: `calc((${value})*100%)`
@@ -57,52 +57,36 @@ const DynamicCheckoutSettings = [
57
57
  {
58
58
  id: 'backgroundColorV2',
59
59
  type: 'color-picker-v2',
60
- devices: {
61
- desktop: {
62
- default: {
63
- normal: 'brand',
64
- hover: 'highlight'
65
- }
66
- }
60
+ default: {
61
+ normal: 'brand',
62
+ hover: 'highlight'
67
63
  },
68
64
  compoDefaultValue: {
69
- desktop: {
70
- default: {
71
- normal: 'brand',
72
- hover: 'highlight'
73
- }
74
- }
65
+ normal: 'brand',
66
+ hover: 'highlight'
75
67
  },
76
68
  enableGradient: true
77
69
  },
78
70
  {
79
71
  id: 'backgroundImage',
80
72
  type: 'background-image',
81
- devices: {
82
- desktop: {
83
- default: {
84
- normal: {},
85
- hover: {}
86
- }
87
- }
73
+ default: {
74
+ normal: {},
75
+ hover: {}
88
76
  },
89
77
  compoDefaultValue: {
90
- desktop: {
91
- default: {
92
- normal: {
93
- image: {
94
- src: 'https://ucarecdn.com/06075225-af9e-460c-8e3c-6be63c0b773a/-/format/auto/',
95
- width: 1200,
96
- height: 480
97
- }
98
- },
99
- hover: {
100
- image: {
101
- src: 'https://ucarecdn.com/06075225-af9e-460c-8e3c-6be63c0b773a/-/format/auto/',
102
- width: 1200,
103
- height: 480
104
- }
105
- }
78
+ normal: {
79
+ image: {
80
+ src: 'https://ucarecdn.com/06075225-af9e-460c-8e3c-6be63c0b773a/-/format/auto/',
81
+ width: 1200,
82
+ height: 480
83
+ }
84
+ },
85
+ hover: {
86
+ image: {
87
+ src: 'https://ucarecdn.com/06075225-af9e-460c-8e3c-6be63c0b773a/-/format/auto/',
88
+ width: 1200,
89
+ height: 480
106
90
  }
107
91
  }
108
92
  }
@@ -139,44 +123,36 @@ const DynamicCheckoutSettings = [
139
123
  {
140
124
  id: 'borderBtnV2',
141
125
  type: 'border-v2',
142
- devices: {
143
- desktop: {
144
- default: {
145
- normal: {
146
- borderType: 'none',
147
- border: 'none',
148
- borderWidth: '1px',
149
- width: '1px 1px 1px 1px',
150
- color: '#121212',
151
- isCustom: true
152
- },
153
- hover: {
154
- borderType: 'none',
155
- border: 'none',
156
- borderWidth: '1px',
157
- width: '1px 1px 1px 1px',
158
- color: '#121212',
159
- isCustom: true
160
- }
161
- }
126
+ default: {
127
+ normal: {
128
+ borderType: 'none',
129
+ border: 'none',
130
+ borderWidth: '1px',
131
+ width: '1px 1px 1px 1px',
132
+ color: '#121212',
133
+ isCustom: true
134
+ },
135
+ hover: {
136
+ borderType: 'none',
137
+ border: 'none',
138
+ borderWidth: '1px',
139
+ width: '1px 1px 1px 1px',
140
+ color: '#121212',
141
+ isCustom: true
162
142
  }
163
143
  },
164
144
  compoDefaultValue: {
165
- desktop: {
166
- default: {
167
- normal: {
168
- border: 'solid',
169
- color: '#212121',
170
- width: '1px',
171
- borderWidth: '1px'
172
- },
173
- hover: {
174
- border: 'solid',
175
- color: '#212121',
176
- width: '1px',
177
- borderWidth: '1px'
178
- }
179
- }
145
+ normal: {
146
+ border: 'solid',
147
+ color: '#212121',
148
+ width: '1px',
149
+ borderWidth: '1px'
150
+ },
151
+ hover: {
152
+ border: 'solid',
153
+ color: '#212121',
154
+ width: '1px',
155
+ borderWidth: '1px'
180
156
  }
181
157
  }
182
158
  },
@@ -245,69 +221,53 @@ const DynamicCheckoutSettings = [
245
221
  {
246
222
  id: 'boxShadowBtnV2',
247
223
  type: 'shadow-v2',
248
- devices: {
249
- desktop: {
250
- default: {
251
- normal: {}
252
- }
253
- }
224
+ default: {
225
+ normal: {}
254
226
  },
255
227
  compoDefaultValue: {
256
- desktop: {
257
- default: {
258
- normal: {
259
- type: 'shadow-1',
260
- distance: '4px',
261
- blur: '4px',
262
- spread: '0px',
263
- color: '#121212',
264
- angle: 45
265
- }
266
- }
228
+ normal: {
229
+ type: 'shadow-1',
230
+ distance: '4px',
231
+ blur: '4px',
232
+ spread: '0px',
233
+ color: '#121212',
234
+ angle: 45
267
235
  }
268
236
  }
269
237
  },
270
238
  {
271
239
  id: 'roundedBtnV2',
272
240
  type: 'corner-v2',
273
- devices: {
274
- desktop: {
275
- default: {
276
- normal: {
277
- btrr: '0px',
278
- bblr: '0px',
279
- bbrr: '0px',
280
- btlr: '0px',
281
- radiusType: 'none'
282
- },
283
- hover: {
284
- btrr: '0px',
285
- bblr: '0px',
286
- bbrr: '0px',
287
- btlr: '0px',
288
- radiusType: 'none'
289
- }
290
- }
241
+ default: {
242
+ normal: {
243
+ btrr: '0px',
244
+ bblr: '0px',
245
+ bbrr: '0px',
246
+ btlr: '0px',
247
+ radiusType: 'none'
248
+ },
249
+ hover: {
250
+ btrr: '0px',
251
+ bblr: '0px',
252
+ bbrr: '0px',
253
+ btlr: '0px',
254
+ radiusType: 'none'
291
255
  }
292
256
  },
293
257
  compoDefaultValue: {
294
- desktop: {
295
- default: {
296
- normal: {
297
- btrr: '8px',
298
- bblr: '8px',
299
- bbrr: '8px',
300
- btlr: '8px',
301
- radiusType: 'rounded'
302
- },
303
- hover: {
304
- btrr: '8px',
305
- bblr: '8px',
306
- bbrr: '8px',
307
- btlr: '8px',
308
- radiusType: 'rounded'
309
- }
310
- }
258
+ normal: {
259
+ btrr: '8px',
260
+ bblr: '8px',
261
+ bbrr: '8px',
262
+ btlr: '8px',
263
+ radiusType: 'rounded'
264
+ },
265
+ hover: {
266
+ btrr: '8px',
267
+ bblr: '8px',
268
+ bbrr: '8px',
269
+ btlr: '8px',
270
+ radiusType: 'rounded'
311
271
  }
312
272
  }
313
273
  },
@@ -406,19 +366,11 @@ const DynamicCheckoutSettings = [
406
366
  {
407
367
  id: 'textColorHover',
408
368
  type: 'color-picker-v2',
409
- devices: {
410
- desktop: {
411
- default: {
412
- hover: 'text-3'
413
- }
414
- }
369
+ default: {
370
+ hover: 'text-3'
415
371
  },
416
372
  compoDefaultValue: {
417
- desktop: {
418
- default: {
419
- hover: 'text-3'
420
- }
421
- }
373
+ hover: 'text-3'
422
374
  }
423
375
  },
424
376
  {