@gem-sdk/components 2.0.0-dev.457 → 2.0.0-dev.460

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 (34) hide show
  1. package/dist/cjs/breadcrumb/components/Breadcrumb.js +1 -0
  2. package/dist/cjs/breadcrumb/components/Breadcrumb.liquid.js +1 -0
  3. package/dist/cjs/breadcrumb/setting/configs/settings.js +29 -2
  4. package/dist/cjs/breadcrumb/setting/configs/uiV2.js +230 -114
  5. package/dist/cjs/button/setting/configs/settings.js +2 -1
  6. package/dist/cjs/coupon/common/classes.js +16 -2
  7. package/dist/cjs/coupon/common/index.js +2 -2
  8. package/dist/cjs/coupon/common/styles.js +44 -26
  9. package/dist/cjs/coupon/components/Coupon.js +3 -6
  10. package/dist/cjs/coupon/components/Coupon.liquid.js +4 -7
  11. package/dist/cjs/coupon/setting/config/settings.js +194 -131
  12. package/dist/cjs/coupon/setting/config/uiV2.js +349 -142
  13. package/dist/cjs/product/components/FileUpload/components/config/uiV2.js +15 -0
  14. package/dist/cjs/product/setting/product/configs/settings.js +1 -1
  15. package/dist/cjs/sticky/components/Sticky.js +0 -2
  16. package/dist/cjs/sticky/components/Sticky.liquid.js +1 -2
  17. package/dist/esm/breadcrumb/components/Breadcrumb.js +2 -1
  18. package/dist/esm/breadcrumb/components/Breadcrumb.liquid.js +2 -1
  19. package/dist/esm/breadcrumb/setting/configs/settings.js +29 -2
  20. package/dist/esm/breadcrumb/setting/configs/uiV2.js +230 -114
  21. package/dist/esm/button/setting/configs/settings.js +2 -1
  22. package/dist/esm/coupon/common/classes.js +16 -2
  23. package/dist/esm/coupon/common/index.js +2 -2
  24. package/dist/esm/coupon/common/styles.js +45 -26
  25. package/dist/esm/coupon/components/Coupon.js +5 -8
  26. package/dist/esm/coupon/components/Coupon.liquid.js +6 -9
  27. package/dist/esm/coupon/setting/config/settings.js +194 -131
  28. package/dist/esm/coupon/setting/config/uiV2.js +349 -142
  29. package/dist/esm/product/components/FileUpload/components/config/uiV2.js +15 -0
  30. package/dist/esm/product/setting/product/configs/settings.js +1 -1
  31. package/dist/esm/sticky/components/Sticky.js +2 -4
  32. package/dist/esm/sticky/components/Sticky.liquid.js +1 -2
  33. package/dist/types/index.d.ts +1 -0
  34. package/package.json +2 -2
@@ -11,20 +11,17 @@ var styles = require('../common/styles.js');
11
11
  var classes = require('../common/classes.js');
12
12
 
13
13
  const Coupon = ({ setting, builderProps, builderAttrs, style, styles: styles$1, advanced, pageContext })=>{
14
- const { backgroundColor, textColor, borderBtn, roundedBtn } = styles$1 ?? {};
14
+ const { backgroundColorV2, textColorHover } = styles$1 ?? {};
15
15
  const { defaultLabel, clickedLabel, copyContent } = setting ?? {};
16
- const computedRemovedActiveShadow = system.createStyle(styles.removedActiveShadow(styles$1));
17
16
  const composeContextState = system.createStateOrContext({
18
17
  defaultLabel,
19
18
  clickedLabel,
20
19
  copyContent,
21
20
  uid: builderProps?.uid
22
21
  });
23
- const composeCouponComponentClasses = system.createClass(classes.getActiveClasses(backgroundColor?.active, textColor?.active));
22
+ const composeCouponComponentClasses = system.createClass(classes.getActiveClasses(backgroundColorV2, textColorHover));
24
23
  const computedInnerBorderCornerCss = styles.getInnerBorderCornerCss({
25
24
  uid: builderProps?.uid,
26
- borderActive: borderBtn?.active,
27
- cornerActive: roundedBtn?.active,
28
25
  styles: styles$1
29
26
  });
30
27
  const renderScript = ()=>{
@@ -40,13 +37,13 @@ const Coupon = ({ setting, builderProps, builderAttrs, style, styles: styles$1,
40
37
  },
41
38
  builderAttrs: builderAttrs,
42
39
  setting: {
43
- ...index.getButtonSetting(setting, defaultLabel, 'submit')
40
+ ...index.getButtonSetting(setting, defaultLabel, 'button')
44
41
  },
45
42
  style: {
46
43
  ...styles.getButtonStyle(style, styles$1)
47
44
  },
48
45
  styles: {
49
- ...styles.getButtonStyles(styles$1, computedRemovedActiveShadow)
46
+ ...styles.getButtonStyles(styles$1)
50
47
  },
51
48
  advanced,
52
49
  pageContext
@@ -52,7 +52,7 @@ const CouponSettings = [
52
52
  id: 'iconVisible',
53
53
  label: 'Icon Visible',
54
54
  type: 'toggle',
55
- default: false
55
+ default: true
56
56
  },
57
57
  {
58
58
  id: 'iconSvg',
@@ -128,50 +128,86 @@ const CouponSettings = [
128
128
  id: 'style',
129
129
  controls: [
130
130
  {
131
- id: 'borderBtn',
132
- type: 'border',
133
- label: 'Border',
134
- emptyOnClear: true,
135
- default: {
136
- normal: {
137
- borderType: 'none',
138
- border: 'none',
139
- isCustom: false,
140
- borderWidth: '1px',
141
- width: '1px 1px 1px 1px'
142
- },
143
- hover: {
144
- isCustom: false,
145
- borderType: 'none',
146
- border: 'none',
147
- borderWidth: '1px',
148
- width: '1px 1px 1px 1px'
149
- }
150
- },
151
- state: {
152
- hover: true,
153
- normal: true,
154
- active: true
155
- }
131
+ id: 'enableTextStyle',
132
+ label: '',
133
+ type: 'toggle',
134
+ default: true
156
135
  },
136
+ // {
137
+ // id: 'borderBtn',
138
+ // type: 'border',
139
+ // label: 'Border',
140
+ // emptyOnClear: true,
141
+ // default: {
142
+ // normal: {
143
+ // borderType: 'none',
144
+ // border: 'none',
145
+ // isCustom: false,
146
+ // borderWidth: '1px',
147
+ // width: '1px 1px 1px 1px',
148
+ // },
149
+ // hover: {
150
+ // isCustom: false,
151
+ // borderType: 'none',
152
+ // border: 'none',
153
+ // borderWidth: '1px',
154
+ // width: '1px 1px 1px 1px',
155
+ // },
156
+ // // active: {
157
+ // // isCustom: false,
158
+ // // borderType: 'none',
159
+ // // border: 'none',
160
+ // // borderWidth: '1px',
161
+ // // width: '1px 1px 1px 1px',
162
+ // // },
163
+ // },
164
+ // state: {
165
+ // hover: true,
166
+ // normal: true,
167
+ // active: true,
168
+ // },
169
+ // },
170
+ // {
171
+ // id: 'backgroundColor',
172
+ // type: 'background-color-picker',
173
+ // label: 'Background Color',
174
+ // default: {
175
+ // normal: 'brand',
176
+ // hover: 'highlight',
177
+ // active: '#00A042',
178
+ // },
179
+ // state: {
180
+ // hover: true,
181
+ // normal: true,
182
+ // active: true,
183
+ // },
184
+ // },
157
185
  {
158
- id: 'backgroundColor',
159
- type: 'colorpicker',
160
- label: 'Background Color',
161
- default: {
162
- normal: 'brand',
163
- hover: '#4D4D4D',
164
- active: '#00A042'
186
+ id: 'backgroundColorV2',
187
+ type: 'color-picker-v2',
188
+ devices: {
189
+ desktop: {
190
+ default: {
191
+ normal: 'brand',
192
+ hover: 'highlight',
193
+ active: '#00A042'
194
+ }
195
+ }
165
196
  },
166
- state: {
167
- hover: true,
168
- normal: true,
169
- active: true
170
- }
197
+ compoDefaultValue: {
198
+ desktop: {
199
+ default: {
200
+ normal: 'brand',
201
+ hover: 'highlight',
202
+ active: '#00A042'
203
+ }
204
+ }
205
+ },
206
+ enableGradient: true
171
207
  },
172
208
  {
173
209
  id: 'textColor',
174
- type: 'colorpicker',
210
+ type: 'color-picker-v2',
175
211
  label: 'Text Color',
176
212
  default: {
177
213
  normal: 'text-3'
@@ -183,56 +219,25 @@ const CouponSettings = [
183
219
  }
184
220
  },
185
221
  {
186
- id: 'hasBoxShadowBtn',
187
- type: 'toggle',
188
- label: 'Enable Button Shadow',
189
- default: {
190
- normal: false,
191
- hover: false
192
- },
193
- state: {
194
- normal: true,
195
- hover: true
196
- }
197
- },
198
- {
199
- id: 'boxShadowBtn',
200
- type: 'boxShadow',
201
- label: 'Button Shadow',
202
- hideOnState: {
203
- normal: true,
204
- hover: true,
205
- active: true
206
- },
207
- default: {
208
- normal: {
209
- type: 'shadow-1',
210
- distance: '4px',
211
- blur: '12px',
212
- spread: '0px',
213
- color: 'rgba(0, 0, 0, 0.20)',
214
- angle: 90
222
+ id: 'textColorHover',
223
+ type: 'color-picker-v2',
224
+ devices: {
225
+ desktop: {
226
+ default: {
227
+ hover: 'text-3',
228
+ active: 'text-3'
229
+ }
215
230
  }
216
231
  },
217
- state: {
218
- normal: true,
219
- hover: true,
220
- active: true
221
- }
222
- },
223
- {
224
- id: 'roundedBtn',
225
- type: 'radius-preset',
226
- label: 'Border Radius',
227
- default: {
228
- normal: {
229
- radiusType: 'small'
232
+ compoDefaultValue: {
233
+ desktop: {
234
+ default: {
235
+ hover: 'text-3',
236
+ active: 'text-3'
237
+ }
230
238
  }
231
239
  },
232
- state: {
233
- hover: true,
234
- normal: true
235
- }
240
+ enableGradient: true
236
241
  },
237
242
  {
238
243
  id: 'align',
@@ -268,9 +273,6 @@ const CouponSettings = [
268
273
  default: {
269
274
  type: 'paragraph-1'
270
275
  },
271
- hiddenSetting: {
272
- color: true
273
- },
274
276
  ignoreReRender: true
275
277
  },
276
278
  {
@@ -359,10 +361,12 @@ const CouponSettings = [
359
361
  },
360
362
  {
361
363
  id: 'iconSpacing',
362
- type: 'input:unit',
364
+ type: 'input:slider',
363
365
  units: [
364
366
  'px'
365
367
  ],
368
+ step: 1,
369
+ max: 40,
366
370
  devices: {
367
371
  desktop: {
368
372
  default: '8px'
@@ -379,43 +383,14 @@ const CouponSettings = [
379
383
  height: 'Auto',
380
384
  padding: {
381
385
  type: 'medium',
382
- top: '8px',
383
- bottom: '8px',
386
+ top: '12px',
387
+ bottom: '12px',
384
388
  left: '24px',
385
389
  right: '24px'
386
390
  }
387
391
  }
388
392
  }
389
393
  },
390
- settingConfig: {
391
- width: {
392
- displayOptions: [
393
- 'full',
394
- 'auto',
395
- 'small',
396
- 'large',
397
- 'medium'
398
- ],
399
- sizeConfig: {
400
- small: '100px',
401
- medium: '116px',
402
- large: '132px'
403
- }
404
- },
405
- height: {
406
- displayOptions: [
407
- 'auto',
408
- 'small',
409
- 'large',
410
- 'medium'
411
- ],
412
- sizeConfig: {
413
- small: '28px',
414
- medium: '36px',
415
- large: '44px'
416
- }
417
- }
418
- },
419
394
  hiddenSettings: [
420
395
  'shape',
421
396
  'gap'
@@ -450,6 +425,105 @@ const CouponSettings = [
450
425
  default: 'left'
451
426
  }
452
427
  }
428
+ },
429
+ {
430
+ id: 'borderBtnV2',
431
+ type: 'border-v2',
432
+ devices: {
433
+ desktop: {
434
+ default: {
435
+ normal: {
436
+ borderType: 'none',
437
+ border: 'none',
438
+ borderWidth: '1px',
439
+ width: '1px 1px 1px 1px',
440
+ color: '#121212',
441
+ isCustom: true
442
+ },
443
+ hover: {
444
+ borderType: 'none',
445
+ border: 'none',
446
+ borderWidth: '1px',
447
+ width: '1px 1px 1px 1px',
448
+ color: '#121212',
449
+ isCustom: true
450
+ }
451
+ }
452
+ }
453
+ },
454
+ compoDefaultValue: {
455
+ desktop: {
456
+ default: {
457
+ normal: {
458
+ border: 'solid',
459
+ color: '#121212',
460
+ width: '1px',
461
+ borderWidth: '1px'
462
+ },
463
+ hover: {
464
+ border: 'solid',
465
+ color: '#121212',
466
+ width: '1px',
467
+ borderWidth: '1px'
468
+ }
469
+ }
470
+ }
471
+ }
472
+ },
473
+ {
474
+ id: 'roundedBtnV2',
475
+ type: 'corner-v2',
476
+ devices: {
477
+ desktop: {
478
+ default: {
479
+ normal: {
480
+ btrr: '0px',
481
+ bblr: '0px',
482
+ bbrr: '0px',
483
+ btlr: '0px',
484
+ radiusType: 'none'
485
+ }
486
+ }
487
+ }
488
+ },
489
+ compoDefaultValue: {
490
+ desktop: {
491
+ default: {
492
+ normal: {
493
+ btrr: '8px',
494
+ bblr: '8px',
495
+ bbrr: '8px',
496
+ btlr: '8px',
497
+ radiusType: 'rounded'
498
+ }
499
+ }
500
+ }
501
+ }
502
+ },
503
+ {
504
+ id: 'boxShadowBtnV2',
505
+ type: 'shadow-v2',
506
+ devices: {
507
+ desktop: {
508
+ default: {
509
+ normal: {}
510
+ }
511
+ }
512
+ },
513
+ compoDefaultValue: {
514
+ desktop: {
515
+ default: {
516
+ normal: {
517
+ type: 'shadow-1',
518
+ distance: '4px',
519
+ blur: '4px',
520
+ spread: '0px',
521
+ color: '#121212',
522
+ angle: 45
523
+ }
524
+ }
525
+ }
526
+ }
453
527
  }
454
528
  ]
455
529
  }
@@ -613,17 +687,6 @@ const CouponPresets = [
613
687
  }
614
688
  }
615
689
  },
616
- rounded: {
617
- desktop: {
618
- normal: {
619
- btrr: '3px',
620
- bblr: '3px',
621
- bbrr: '3px',
622
- btlr: '3px',
623
- radiusType: 'custom'
624
- }
625
- }
626
- },
627
690
  hasBoxShadow: {
628
691
  desktop: {
629
692
  normal: false