@gem-sdk/components 2.0.0-dev.568 → 2.0.0-dev.572

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/ArticleImage/settings.js +7 -6
  2. package/dist/cjs/article/setting/configs/ArticleImage/uiV2.js +6 -4
  3. package/dist/cjs/article/setting/configs/ArticleList/settings.js +3 -2
  4. package/dist/cjs/article/setting/configs/ArticleReadMore/settings.js +3 -1
  5. package/dist/cjs/article/setting/configs/ArticleReadMore/uiV2.js +20 -11
  6. package/dist/cjs/product/components/ProductButton/common/constants.js +3 -3
  7. package/dist/cjs/product/components/ProductButton/common/data.js +2 -2
  8. package/dist/cjs/product/components/ProductButton/common/helpers.js +4 -12
  9. package/dist/cjs/product/components/ProductButton/common/styles.js +2 -1
  10. package/dist/cjs/product/components/ProductButton/components/PriceLayout.liquid.js +2 -2
  11. package/dist/cjs/product/components/ProductButton/components/ProductButtonPrice.js +1 -1
  12. package/dist/cjs/product/components/ProductButton/components/ProductButtonPrice.liquid.js +1 -1
  13. package/dist/cjs/product/setting/product-button/configs/settings.js +12 -3
  14. package/dist/cjs/product/setting/product-button/configs/uiV2.js +429 -37
  15. package/dist/cjs/video/components/HTML5Embed.js +1 -1
  16. package/dist/cjs/video/components/HTML5Embed.liquid.js +1 -1
  17. package/dist/cjs/video/components/common/getClasses.js +1 -4
  18. package/dist/esm/article/setting/configs/ArticleImage/settings.js +7 -6
  19. package/dist/esm/article/setting/configs/ArticleImage/uiV2.js +6 -4
  20. package/dist/esm/article/setting/configs/ArticleList/settings.js +3 -2
  21. package/dist/esm/article/setting/configs/ArticleReadMore/settings.js +3 -1
  22. package/dist/esm/article/setting/configs/ArticleReadMore/uiV2.js +20 -11
  23. package/dist/esm/product/components/ProductButton/common/constants.js +3 -3
  24. package/dist/esm/product/components/ProductButton/common/data.js +2 -2
  25. package/dist/esm/product/components/ProductButton/common/helpers.js +4 -12
  26. package/dist/esm/product/components/ProductButton/common/styles.js +2 -1
  27. package/dist/esm/product/components/ProductButton/components/PriceLayout.liquid.js +2 -2
  28. package/dist/esm/product/components/ProductButton/components/ProductButtonPrice.js +1 -1
  29. package/dist/esm/product/components/ProductButton/components/ProductButtonPrice.liquid.js +1 -1
  30. package/dist/esm/product/setting/product-button/configs/settings.js +12 -3
  31. package/dist/esm/product/setting/product-button/configs/uiV2.js +429 -37
  32. package/dist/esm/video/components/HTML5Embed.js +1 -1
  33. package/dist/esm/video/components/HTML5Embed.liquid.js +1 -1
  34. package/dist/esm/video/components/common/getClasses.js +1 -4
  35. package/dist/types/index.d.ts +1 -0
  36. package/package.json +3 -3
@@ -305,13 +305,14 @@ const ArticleImageSettings = [
305
305
  id: 'shadow',
306
306
  type: 'shadow-v2',
307
307
  label: 'Button Shadow',
308
- default: {
309
- type: 'none',
310
- distance: '10px',
311
- blur: '12px',
312
- spread: '10px',
308
+ compoDefaultValue: {
309
+ type: 'shadow-1',
310
+ distance: '4px',
311
+ blur: '4px',
312
+ spread: '0px',
313
313
  color: 'rgba(18, 18, 18, 0.77)',
314
- angle: 40
314
+ angle: 45,
315
+ enable: true
315
316
  }
316
317
  }
317
318
  ]
@@ -84,8 +84,8 @@ const uiV2 = [
84
84
  ],
85
85
  action: {
86
86
  controlId: 'hasActiveShadow',
87
- groupType: 'advanced',
88
- controlType: 'advanced',
87
+ groupType: 'style',
88
+ controlType: 'style',
89
89
  newValue: true
90
90
  }
91
91
  },
@@ -97,8 +97,8 @@ const uiV2 = [
97
97
  ],
98
98
  action: {
99
99
  controlId: 'hasActiveShadow',
100
- groupType: 'advanced',
101
- controlType: 'advanced',
100
+ groupType: 'style',
101
+ controlType: 'style',
102
102
  newValue: false
103
103
  }
104
104
  }
@@ -165,6 +165,7 @@ const uiV2 = [
165
165
  },
166
166
  iconName: 'polaris-text-block',
167
167
  getValueFromSettingID: 'alt',
168
+ compoDefaultValue: 'Describes the appearance of the image',
168
169
  isHideClear: true,
169
170
  controls: [
170
171
  {
@@ -185,6 +186,7 @@ const uiV2 = [
185
186
  },
186
187
  iconName: 'polaris-text-block',
187
188
  getValueFromSettingID: 'title',
189
+ compoDefaultValue: 'Title',
188
190
  isHideClear: true,
189
191
  controls: [
190
192
  {
@@ -254,8 +254,9 @@ const ArticleListSettings = [
254
254
  distance: '4px',
255
255
  blur: '4px',
256
256
  spread: '0px',
257
- color: '#121212',
258
- angle: 45
257
+ color: 'rgba(18, 18, 18, 0.77)',
258
+ angle: 45,
259
+ enable: true
259
260
  }
260
261
  }
261
262
  ]
@@ -183,10 +183,12 @@ const ArticleReadMoreSettings = [
183
183
  controls: [
184
184
  {
185
185
  id: 'iconSpacing',
186
- type: 'input:unit',
186
+ type: 'input:slider',
187
187
  units: [
188
188
  'px'
189
189
  ],
190
+ step: 1,
191
+ max: 40,
190
192
  devices: {
191
193
  desktop: {
192
194
  default: '8px'
@@ -142,11 +142,6 @@ const uiV2 = [
142
142
  label: 'Full',
143
143
  value: '100%',
144
144
  showValue: true
145
- },
146
- {
147
- label: 'Default',
148
- value: 'default',
149
- showValue: true
150
145
  }
151
146
  ]
152
147
  },
@@ -316,7 +311,7 @@ const uiV2 = [
316
311
  setting: {
317
312
  id: 'iconAlign'
318
313
  },
319
- conditionDisplay: 'iconVisible == true'
314
+ conditionDisplay: `iconVisible == true && readMoreType != 'text'`
320
315
  },
321
316
  {
322
317
  type: 'control',
@@ -324,9 +319,9 @@ const uiV2 = [
324
319
  en: 'Gap'
325
320
  },
326
321
  setting: {
327
- id: 'spacing'
322
+ id: 'iconSpacing'
328
323
  },
329
- conditionDisplay: 'iconVisible == true'
324
+ conditionDisplay: `iconVisible == true && readMoreType != 'text'`
330
325
  }
331
326
  ]
332
327
  },
@@ -393,10 +388,24 @@ const uiV2 = [
393
388
  label: {
394
389
  en: 'Content'
395
390
  },
391
+ getValueFromSettingID: 'label',
392
+ iconName: 'gp-prefix',
393
+ type: 'combo',
396
394
  conditionDisplay: `readMoreType === 'text'`,
397
- setting: {
398
- id: 'label'
399
- }
395
+ defaultValueWhenClear: '',
396
+ controls: [
397
+ {
398
+ label: {
399
+ en: 'Content'
400
+ },
401
+ type: 'control',
402
+ setting: {
403
+ id: 'label'
404
+ },
405
+ layout: 'vertical',
406
+ defaultValueWhenClear: ''
407
+ }
408
+ ]
400
409
  },
401
410
  {
402
411
  id: 'typo',
@@ -2,7 +2,7 @@
2
2
 
3
3
  const SEPARATOR = {
4
4
  VERTICAL_LINE: `
5
- <svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
5
+ <svg width="1em" height="1em" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
6
6
  <path
7
7
  fill-rule="evenodd"
8
8
  clip-rule="evenodd"
@@ -11,14 +11,14 @@ const SEPARATOR = {
11
11
  </svg>
12
12
  `,
13
13
  HORIZONTAL_LINE: `
14
- <svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
14
+ <svg width="1em" height="1em" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
15
15
  <path
16
16
  d="M1.10522 9C1.10522 8.72386 1.32908 8.5 1.60522 8.5H18.1062C18.3823 8.5 18.6062 8.72386 18.6062 9V11C18.6062 11.2761 18.3823 11.5 18.1062 11.5H1.60522C1.32908 11.5 1.10522 11.2761 1.10522 11V9Z"
17
17
  fill="currentColor" />
18
18
  </svg>
19
19
  `,
20
20
  DOT: `
21
- <svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
21
+ <svg width="1em" height="1em" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
22
22
  <path
23
23
  fill-rule="evenodd"
24
24
  clip-rule="evenodd"
@@ -6,12 +6,12 @@ var styles = require('./styles.js');
6
6
  const getBaseButtonData = ({ style, styles: styles$1, setting })=>{
7
7
  const { iconSvg, iconAlign, shouldClearSpace } = setting ?? {};
8
8
  return {
9
- iconVisible: helpers.checkIconVisibility(styles$1, setting),
9
+ iconVisible: helpers.checkIconVisibility(styles$1),
10
10
  buttonStyle: styles.getButtonStyle(style, styles$1),
11
11
  buttonSettings: {
12
12
  iconSvg,
13
13
  iconAlign,
14
- iconVisible: helpers.checkIconVisibility(styles$1, setting),
14
+ iconVisible: helpers.checkIconVisibility(styles$1),
15
15
  shouldClearSpace
16
16
  }
17
17
  };
@@ -2,19 +2,11 @@
2
2
 
3
3
  var constants = require('./constants.js');
4
4
 
5
- const checkIconVisibility = (styles, setting)=>{
6
- return styles?.enableIcon === true && [
7
- 'cart-full',
8
- 'cart-icon',
9
- 'cart-price-icon',
10
- 'icon-only'
11
- ].includes(setting?.buttonLayout ?? '');
5
+ const checkIconVisibility = (styles)=>{
6
+ return styles?.enableIcon === true;
12
7
  };
13
- const shouldRenderPrice = (styles, setting)=>{
14
- return styles?.enablePrice && setting?.buttonLayout && ![
15
- 'cart-only',
16
- 'cart-icon'
17
- ].includes(setting.buttonLayout);
8
+ const shouldRenderPrice = (styles)=>{
9
+ return styles?.enablePrice;
18
10
  };
19
11
  const getRenderRegularPriceSettings = (setting)=>{
20
12
  return {
@@ -144,7 +144,8 @@ const getSeparatorStyle = ()=>{
144
144
  const getBlankSpaceStyle = ()=>{
145
145
  return {
146
146
  '--mr': '2px',
147
- '--ml': '2px'
147
+ '--ml': '2px',
148
+ display: 'block !important'
148
149
  };
149
150
  };
150
151
 
@@ -15,8 +15,8 @@ const PriceLayout = ({ components, separator, showSeparator })=>{
15
15
  ${separatorComponent}
16
16
  ${components.map((component, index)=>core.template`
17
17
  ${component()}
18
- ${index < components.length - 1 ? BlankSpace_liquid.default() : ''}
19
- `)}
18
+ ${index < components.length - 1 ? BlankSpace_liquid.default() : ''}
19
+ `).join('')}
20
20
  `;
21
21
  };
22
22
 
@@ -11,7 +11,7 @@ var PriceLayout = require('./PriceLayout.js');
11
11
  var PriceComponent = require('./PriceComponent.js');
12
12
 
13
13
  const ProductButtonPrice = ({ setting, styles })=>{
14
- if (!helpers.shouldRenderPrice(styles, setting)) {
14
+ if (!helpers.shouldRenderPrice(styles)) {
15
15
  return null;
16
16
  }
17
17
  const createPriceComponents = ({ includeCompare })=>{
@@ -9,7 +9,7 @@ var PriceLayout_liquid = require('./PriceLayout.liquid.js');
9
9
  var PriceComponent_liquid = require('./PriceComponent.liquid.js');
10
10
 
11
11
  const ProductButtonPrice = ({ setting, styles })=>{
12
- if (!helpers.shouldRenderPrice(styles, setting)) {
12
+ if (!helpers.shouldRenderPrice(styles)) {
13
13
  return '';
14
14
  }
15
15
  const createPriceComponents = ({ includeCompare })=>{
@@ -63,6 +63,12 @@ const ProductButtonSettings = [
63
63
  value: 'cart-icon',
64
64
  name: `<div class="h-40 w-[200px] rounded-medium bg-dark-200 p-10 flex items-center justify-center gap-4">${cartIcon} Add to cart</div>`,
65
65
  icon: true
66
+ },
67
+ {
68
+ id: 'icon-only',
69
+ value: 'icon-only',
70
+ name: `<div class="h-40 w-[200px] rounded-medium bg-dark-200 p-10 flex items-center justify-center gap-4">${cartIcon}</div>`,
71
+ icon: true
66
72
  }
67
73
  ]
68
74
  },
@@ -72,7 +78,7 @@ const ProductButtonSettings = [
72
78
  default: {
73
79
  type: 'paragraph-1',
74
80
  attrs: {
75
- color: 'text-1'
81
+ color: 'text-3'
76
82
  }
77
83
  },
78
84
  hiddenSetting: {
@@ -88,7 +94,7 @@ const ProductButtonSettings = [
88
94
  default: {
89
95
  type: 'paragraph-1',
90
96
  attrs: {
91
- color: 'text-1'
97
+ color: 'text-3'
92
98
  }
93
99
  },
94
100
  hiddenSetting: {
@@ -120,6 +126,7 @@ const ProductButtonSettings = [
120
126
  id: 'outOfStockLabel',
121
127
  type: 'input',
122
128
  label: 'Out Of Stock Message',
129
+ clearButton: false,
123
130
  default: 'Out of stock'
124
131
  },
125
132
  {
@@ -205,6 +212,8 @@ const ProductButtonSettings = [
205
212
  type: 'icon',
206
213
  hide: true,
207
214
  default: `<svg height="20" width="20" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 256" fill="currentColor" data-id="508414779109605736">
215
+ <path fill="currentColor" strokelinecap="round" strokelinejoin="round" d="M233.21,56.31A12,12,0,0,0,224,52H66L60.53,21.85A12,12,0,0,0,48.73,12H24a12,12,0,0,0,0,24H38.71L63.62,173a28,28,0,0,0,4.07,10.21A32,32,0,1,0,123,196h34a32,32,0,1,0,31-24H91.17a4,4,0,0,1-3.93-3.28L84.92,156H196.1a28,28,0,0,0,27.55-23l12.16-66.86A12,12,0,0,0,233.21,56.31ZM100,204a8,8,0,1,1-8-8A8,8,0,0,1,100,204Zm88,8a8,8,0,1,1,8-8A8,8,0,0,1,188,212Zm12-83.28A4,4,0,0,1,196.1,132H80.56L70.38,76H209.62Z"></path></svg>`,
216
+ compoDefaultValue: `<svg height="20" width="20" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 256" fill="currentColor" data-id="508414779109605736">
208
217
  <path fill="currentColor" strokelinecap="round" strokelinejoin="round" d="M233.21,56.31A12,12,0,0,0,224,52H66L60.53,21.85A12,12,0,0,0,48.73,12H24a12,12,0,0,0,0,24H38.71L63.62,173a28,28,0,0,0,4.07,10.21A32,32,0,1,0,123,196h34a32,32,0,1,0,31-24H91.17a4,4,0,0,1-3.93-3.28L84.92,156H196.1a28,28,0,0,0,27.55-23l12.16-66.86A12,12,0,0,0,233.21,56.31ZM100,204a8,8,0,1,1-8-8A8,8,0,0,1,100,204Zm88,8a8,8,0,1,1,8-8A8,8,0,0,1,188,212Zm12-83.28A4,4,0,0,1,196.1,132H80.56L70.38,76H209.62Z"></path></svg>`
209
218
  },
210
219
  {
@@ -741,7 +750,7 @@ const ProductButtonSettings = [
741
750
  default: {
742
751
  type: 'paragraph-1',
743
752
  attrs: {
744
- color: 'text-1'
753
+ color: 'text-3'
745
754
  }
746
755
  },
747
756
  hiddenSetting: {