@gem-sdk/components 2.0.0-dev.442 → 2.0.0-dev.445

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/form/components/contact/common/composeStyles.js +0 -2
  2. package/dist/cjs/form/components/form-email/FormEmail.liquid.js +1 -1
  3. package/dist/cjs/form/setting/contact/ContactInitConfig.js +271 -150
  4. package/dist/cjs/form/setting/contact/configs/settings.js +20 -13
  5. package/dist/cjs/form/setting/contact/configs/uiV2.js +3 -12
  6. package/dist/cjs/form/setting/form-textarea/configs/uiV2.js +1 -1
  7. package/dist/cjs/form/setting/text-field/configs/settings.js +2 -2
  8. package/dist/cjs/icon/setting/configs/uiV2.js +31 -28
  9. package/dist/cjs/product/components/ProductBadge/common/getClasses.js +1 -1
  10. package/dist/cjs/product/components/ProductBadge/common/getStyles.js +2 -2
  11. package/dist/cjs/product/components/ProductBadge/constants.js +3 -0
  12. package/dist/cjs/product/components/ProductBadge/index.liquid.js +3 -4
  13. package/dist/cjs/product/components/ProductBadge/utils/shape.js +6 -6
  14. package/dist/cjs/product/components/ProductBundle/components/ProductBundleDiscountChildrenItem.js +4 -2
  15. package/dist/cjs/product/components/ProductDiscountTag/common/getStyle.js +6 -1
  16. package/dist/cjs/product/components/ProductQuantity/common/common.js +12 -13
  17. package/dist/cjs/product/components/ProductQuantity/index.js +2 -2
  18. package/dist/cjs/product/components/ProductQuantity/index.liquid.js +1 -1
  19. package/dist/cjs/product/setting/product-price/configs/uiV2.js +2 -0
  20. package/dist/cjs/sticky/setting/preset-config.js +15 -0
  21. package/dist/cjs/text/components/Text.liquid.js +1 -0
  22. package/dist/esm/form/components/contact/common/composeStyles.js +1 -3
  23. package/dist/esm/form/components/form-email/FormEmail.liquid.js +1 -1
  24. package/dist/esm/form/setting/contact/ContactInitConfig.js +271 -150
  25. package/dist/esm/form/setting/contact/configs/settings.js +20 -13
  26. package/dist/esm/form/setting/contact/configs/uiV2.js +3 -12
  27. package/dist/esm/form/setting/form-textarea/configs/uiV2.js +1 -1
  28. package/dist/esm/form/setting/text-field/configs/settings.js +2 -2
  29. package/dist/esm/icon/setting/configs/uiV2.js +31 -28
  30. package/dist/esm/product/components/ProductBadge/common/getClasses.js +1 -1
  31. package/dist/esm/product/components/ProductBadge/common/getStyles.js +2 -2
  32. package/dist/esm/product/components/ProductBadge/constants.js +2 -1
  33. package/dist/esm/product/components/ProductBadge/index.liquid.js +3 -4
  34. package/dist/esm/product/components/ProductBadge/utils/shape.js +6 -6
  35. package/dist/esm/product/components/ProductBundle/components/ProductBundleDiscountChildrenItem.js +4 -2
  36. package/dist/esm/product/components/ProductDiscountTag/common/getStyle.js +6 -1
  37. package/dist/esm/product/components/ProductQuantity/common/common.js +12 -13
  38. package/dist/esm/product/components/ProductQuantity/index.js +3 -3
  39. package/dist/esm/product/components/ProductQuantity/index.liquid.js +2 -2
  40. package/dist/esm/product/setting/product-price/configs/uiV2.js +2 -0
  41. package/dist/esm/sticky/setting/preset-config.js +15 -0
  42. package/dist/esm/text/components/Text.liquid.js +1 -0
  43. package/package.json +1 -1
@@ -9,14 +9,12 @@ const composeContainerStyles = (setting, styles)=>{
9
9
  const { globalSize } = styles ?? {};
10
10
  const composeGlobalSize = core.makeGlobalSize(globalSize);
11
11
  return composeStyles({
12
- ...styles,
13
12
  ...composeGlobalSize?.width?.['--w'] ? composeGlobalSize.width : {
14
13
  '--w': '100%'
15
14
  },
16
15
  ...composeGlobalSize.padding,
17
16
  ...core.composeBorderResponsive(styles?.border),
18
17
  ...core.composeRadiusResponsive(styles?.rounded),
19
- ...core.getResponsiveStyleShadowWithoutState(styles?.boxShadow, 'box-shadow', styles?.boxShadow),
20
18
  ...core.getStyleBackgroundByDevice(background),
21
19
  ...core.getGradientBgrStyleByDevice(background)
22
20
  });
@@ -46,7 +46,7 @@ const FormEmail = ({ builderProps, builderAttrs, setting, advanced, pageContext,
46
46
  name="${name}"
47
47
  ${system.If(required, 'required')}
48
48
  autocomplete="email"
49
- ${system.If(hideOnClient, `value="${defaultEmail}`)}
49
+ ${system.If(hideOnClient, `value="${defaultEmail}"`)}
50
50
  ></input>
51
51
  </div>
52
52
  `;
@@ -7,10 +7,10 @@ const contactInitConfig = [
7
7
  'spacing-setting': {
8
8
  desktop: {
9
9
  padding: {
10
- top: 'var(--g-s-xl)',
11
- bottom: 'var(--g-s-xl)',
12
- left: 'var(--g-s-l)',
13
- right: 'var(--g-s-l)'
10
+ top: '24px',
11
+ bottom: '24px',
12
+ left: '',
13
+ right: ''
14
14
  }
15
15
  },
16
16
  tablet: {
@@ -60,6 +60,25 @@ const contactInitConfig = [
60
60
  desktop: true
61
61
  }
62
62
  },
63
+ advanced: {
64
+ 'spacing-setting': {
65
+ desktop: {
66
+ margin: {
67
+ bottom: '16px'
68
+ }
69
+ },
70
+ tablet: {
71
+ margin: {
72
+ bottom: '16px'
73
+ }
74
+ },
75
+ mobile: {
76
+ margin: {
77
+ bottom: '0px'
78
+ }
79
+ }
80
+ }
81
+ },
63
82
  childrens: [
64
83
  {
65
84
  tag: 'Col',
@@ -134,6 +153,11 @@ const contactInitConfig = [
134
153
  advanced: {
135
154
  'spacing-setting': {
136
155
  desktop: {
156
+ margin: {
157
+ bottom: '0'
158
+ }
159
+ },
160
+ mobile: {
137
161
  margin: {
138
162
  bottom: 'var(--g-s-l)'
139
163
  }
@@ -238,6 +262,11 @@ const contactInitConfig = [
238
262
  advanced: {
239
263
  'spacing-setting': {
240
264
  desktop: {
265
+ margin: {
266
+ bottom: '0'
267
+ }
268
+ },
269
+ mobile: {
241
270
  margin: {
242
271
  bottom: 'var(--g-s-l)'
243
272
  }
@@ -273,202 +302,294 @@ const contactInitConfig = [
273
302
  ]
274
303
  },
275
304
  {
276
- tag: 'Text',
277
- label: 'Text Block',
305
+ tag: 'Row',
278
306
  settings: {
279
- text: 'Phone Number'
307
+ layout: {
308
+ desktop: {
309
+ cols: [
310
+ 12
311
+ ],
312
+ display: 'fill'
313
+ },
314
+ mobile: {
315
+ cols: [
316
+ 12
317
+ ]
318
+ }
319
+ }
280
320
  },
281
321
  styles: {
282
- typo: {
283
- type: 'paragraph-1',
284
- attrs: {
285
- color: 'text-1'
286
- }
287
- },
288
- textAlign: {
289
- desktop: 'left'
322
+ verticalGutter: {
323
+ desktop: '16px',
324
+ mobile: '0px'
290
325
  },
291
- align: {
292
- desktop: 'left'
326
+ fullWidth: {
327
+ desktop: true
293
328
  }
294
329
  },
295
330
  advanced: {
296
331
  'spacing-setting': {
297
- edited: [
298
- 'desktop'
299
- ],
300
332
  desktop: {
301
333
  margin: {
302
- bottom: '0px'
334
+ bottom: '16px'
303
335
  }
304
336
  },
305
337
  tablet: {
306
338
  margin: {
307
- bottom: '0px'
339
+ bottom: '16px'
308
340
  }
309
341
  },
310
342
  mobile: {
311
343
  margin: {
312
- bottom: '0px'
344
+ bottom: '16px'
313
345
  }
314
346
  }
315
- },
316
- op: {
317
- desktop: '100%'
318
347
  }
319
- }
320
- },
321
- {
322
- tag: 'TextField',
323
- settings: {
324
- name: 'contact[phone]',
325
- placeholder: 'Phone Number'
326
348
  },
327
- styles: {
328
- globalSize: {
329
- desktop: {
330
- width: '100%',
331
- height: 'Auto',
332
- padding: {
333
- type: 'medium',
334
- top: '12px',
335
- bottom: '12px',
336
- left: '12px',
337
- right: '12px'
338
- }
339
- }
340
- }
341
- },
342
- advanced: {
343
- 'spacing-setting': {
344
- desktop: {
345
- margin: {
346
- bottom: 'var(--g-s-l)'
347
- }
348
- }
349
- },
350
- border: {
351
- desktop: {
352
- normal: {
353
- borderType: 'style-2',
354
- borderLabel: 'Style 2',
355
- border: 'solid',
356
- color: 'line-2',
357
- isCustom: false,
358
- width: '1px 1px 1px 1px'
359
- }
360
- }
361
- },
362
- rounded: {
363
- desktop: {
364
- normal: {
365
- btrr: '0px',
366
- bblr: '0px',
367
- bbrr: '0px',
368
- btlr: '0px',
369
- radiusType: 'none'
349
+ childrens: [
350
+ {
351
+ tag: 'Col',
352
+ childrens: [
353
+ {
354
+ tag: 'Text',
355
+ label: 'Text Block',
356
+ settings: {
357
+ text: 'Phone'
358
+ },
359
+ styles: {
360
+ typo: {
361
+ type: 'paragraph-1',
362
+ attrs: {
363
+ color: 'text-1'
364
+ }
365
+ },
366
+ textAlign: {
367
+ desktop: 'left'
368
+ },
369
+ align: {
370
+ desktop: 'left'
371
+ }
372
+ },
373
+ advanced: {
374
+ 'spacing-setting': {
375
+ edited: [
376
+ 'desktop'
377
+ ],
378
+ desktop: {
379
+ margin: {
380
+ bottom: '0px'
381
+ }
382
+ },
383
+ tablet: {
384
+ margin: {
385
+ bottom: '0px'
386
+ }
387
+ },
388
+ mobile: {
389
+ margin: {
390
+ bottom: '0px'
391
+ }
392
+ }
393
+ },
394
+ op: {
395
+ desktop: '100%'
396
+ }
397
+ }
398
+ },
399
+ {
400
+ tag: 'TextField',
401
+ settings: {
402
+ name: 'contact[phone]',
403
+ placeholder: 'Phone'
404
+ },
405
+ styles: {
406
+ globalSize: {
407
+ desktop: {
408
+ width: '100%',
409
+ height: 'Auto',
410
+ padding: {
411
+ type: 'medium',
412
+ top: '12px',
413
+ bottom: '12px',
414
+ left: '12px',
415
+ right: '12px'
416
+ }
417
+ }
418
+ }
419
+ },
420
+ advanced: {
421
+ border: {
422
+ desktop: {
423
+ normal: {
424
+ borderType: 'style-2',
425
+ borderLabel: 'Style 2',
426
+ border: 'solid',
427
+ color: 'line-2',
428
+ isCustom: false,
429
+ width: '1px 1px 1px 1px'
430
+ }
431
+ }
432
+ },
433
+ rounded: {
434
+ desktop: {
435
+ normal: {
436
+ btrr: '0px',
437
+ bblr: '0px',
438
+ bbrr: '0px',
439
+ btlr: '0px',
440
+ radiusType: 'none'
441
+ }
442
+ }
443
+ }
444
+ }
370
445
  }
371
- }
446
+ ]
372
447
  }
373
- }
448
+ ]
374
449
  },
375
450
  {
376
- tag: 'Text',
377
- label: 'Text Block',
451
+ tag: 'Row',
378
452
  settings: {
379
- text: 'Message'
453
+ layout: {
454
+ desktop: {
455
+ cols: [
456
+ 12
457
+ ],
458
+ display: 'fill'
459
+ },
460
+ mobile: {
461
+ cols: [
462
+ 12
463
+ ]
464
+ }
465
+ }
380
466
  },
381
467
  styles: {
382
- typo: {
383
- type: 'paragraph-1',
384
- attrs: {
385
- color: 'text-1'
386
- }
387
- },
388
- textAlign: {
389
- desktop: 'left'
468
+ verticalGutter: {
469
+ desktop: '16px',
470
+ mobile: '0px'
390
471
  },
391
- align: {
392
- desktop: 'left'
472
+ fullWidth: {
473
+ desktop: true
393
474
  }
394
475
  },
395
476
  advanced: {
396
477
  'spacing-setting': {
397
- edited: [
398
- 'desktop'
399
- ],
400
478
  desktop: {
401
479
  margin: {
402
- bottom: '0px'
480
+ bottom: '16px'
403
481
  }
404
482
  },
405
483
  tablet: {
406
484
  margin: {
407
- bottom: '0px'
485
+ bottom: '16px'
408
486
  }
409
487
  },
410
488
  mobile: {
411
489
  margin: {
412
- bottom: '0px'
490
+ bottom: '16px'
413
491
  }
414
492
  }
415
- },
416
- op: {
417
- desktop: '100%'
418
- }
419
- }
420
- },
421
- {
422
- tag: 'FormTextarea',
423
- name: 'contact[message]',
424
- settings: {
425
- placeholder: 'Message'
426
- },
427
- globalSize: {
428
- desktop: {
429
- width: '100%',
430
- height: 'Auto',
431
- padding: {
432
- type: 'medium',
433
- top: '12px',
434
- bottom: '12px',
435
- left: '12px',
436
- right: '12px'
437
- }
438
493
  }
439
494
  },
440
- advanced: {
441
- 'spacing-setting': {
442
- desktop: {
443
- margin: {
444
- bottom: 'var(--g-s-l)'
445
- }
446
- }
447
- },
448
- border: {
449
- desktop: {
450
- normal: {
451
- borderType: 'style-2',
452
- borderLabel: 'Style 2',
453
- border: 'solid',
454
- color: 'line-2',
455
- isCustom: false,
456
- width: '1px 1px 1px 1px'
457
- }
458
- }
459
- },
460
- rounded: {
461
- desktop: {
462
- normal: {
463
- btrr: '0px',
464
- bblr: '0px',
465
- bbrr: '0px',
466
- btlr: '0px',
467
- radiusType: 'none'
495
+ childrens: [
496
+ {
497
+ tag: 'Col',
498
+ childrens: [
499
+ {
500
+ tag: 'Text',
501
+ label: 'Text Block',
502
+ settings: {
503
+ text: 'Message'
504
+ },
505
+ styles: {
506
+ typo: {
507
+ type: 'paragraph-1',
508
+ attrs: {
509
+ color: 'text-1'
510
+ }
511
+ },
512
+ textAlign: {
513
+ desktop: 'left'
514
+ },
515
+ align: {
516
+ desktop: 'left'
517
+ }
518
+ },
519
+ advanced: {
520
+ 'spacing-setting': {
521
+ edited: [
522
+ 'desktop'
523
+ ],
524
+ desktop: {
525
+ margin: {
526
+ bottom: '0px'
527
+ }
528
+ },
529
+ tablet: {
530
+ margin: {
531
+ bottom: '0px'
532
+ }
533
+ },
534
+ mobile: {
535
+ margin: {
536
+ bottom: '0px'
537
+ }
538
+ }
539
+ },
540
+ op: {
541
+ desktop: '100%'
542
+ }
543
+ }
544
+ },
545
+ {
546
+ tag: 'FormTextarea',
547
+ name: 'contact[message]',
548
+ settings: {
549
+ placeholder: 'Message'
550
+ },
551
+ globalSize: {
552
+ desktop: {
553
+ width: '100%',
554
+ height: 'Auto',
555
+ padding: {
556
+ type: 'medium',
557
+ top: '12px',
558
+ bottom: '12px',
559
+ left: '12px',
560
+ right: '12px'
561
+ }
562
+ }
563
+ },
564
+ advanced: {
565
+ border: {
566
+ desktop: {
567
+ normal: {
568
+ borderType: 'style-2',
569
+ borderLabel: 'Style 2',
570
+ border: 'solid',
571
+ color: 'line-2',
572
+ isCustom: false,
573
+ width: '1px 1px 1px 1px'
574
+ }
575
+ }
576
+ },
577
+ rounded: {
578
+ desktop: {
579
+ normal: {
580
+ btrr: '0px',
581
+ bblr: '0px',
582
+ bbrr: '0px',
583
+ btlr: '0px',
584
+ radiusType: 'none'
585
+ }
586
+ }
587
+ }
588
+ }
468
589
  }
469
- }
590
+ ]
470
591
  }
471
- }
592
+ ]
472
593
  },
473
594
  {
474
595
  tag: 'SubmitButton',
@@ -32,13 +32,15 @@ const ContactSettings = [
32
32
  label: 'Success Message',
33
33
  default: "Thanks for contacting us. We'll get back to you as soon as possible.",
34
34
  autoHeight: true,
35
- minHeight: 58
35
+ minHeight: 58,
36
+ compoDefaultValue: "Thanks for contacting us. We'll get back to you as soon as possible."
36
37
  },
37
38
  {
38
39
  id: 'successColor',
39
40
  type: 'color-picker-v2',
40
41
  label: 'Color',
41
- default: '#00A042'
42
+ default: '#00A042',
43
+ compoDefaultValue: '#00A042'
42
44
  },
43
45
  {
44
46
  id: 'errorMessage',
@@ -46,13 +48,15 @@ const ContactSettings = [
46
48
  label: 'Error Message',
47
49
  default: 'Can’t send email. Please try again later.',
48
50
  autoHeight: true,
49
- minHeight: 58
51
+ minHeight: 58,
52
+ compoDefaultValue: 'Can’t send email. Please try again later.'
50
53
  },
51
54
  {
52
55
  id: 'errorColor',
53
56
  type: 'color-picker-v2',
54
57
  label: 'Color',
55
- default: '#F44336'
58
+ default: '#F44336',
59
+ compoDefaultValue: '#F44336'
56
60
  },
57
61
  {
58
62
  id: 'translate',
@@ -153,15 +157,18 @@ const ContactSettings = [
153
157
  devices: {
154
158
  desktop: {
155
159
  default: {
156
- width: 'Auto',
157
- height: 'Auto',
158
- padding: {
159
- type: 'medium',
160
- top: '12px',
161
- bottom: '12px',
162
- left: '24px',
163
- right: '24px'
164
- }
160
+ width: '1200px',
161
+ height: 'Auto'
162
+ }
163
+ },
164
+ mobile: {
165
+ default: {
166
+ width: '100%'
167
+ }
168
+ },
169
+ tablet: {
170
+ default: {
171
+ width: '100%'
165
172
  }
166
173
  }
167
174
  },
@@ -13,6 +13,7 @@ const SettingUIV2 = [
13
13
  },
14
14
  iconName: 'polaris-text-block',
15
15
  getValueFromSettingID: 'successMessage',
16
+ compoDefaultValue: "Thanks for contacting us. We'll get back to you as soon as possible.",
16
17
  isHideClear: true,
17
18
  disableScrollbar: true,
18
19
  popoverLabel: {
@@ -47,6 +48,7 @@ const SettingUIV2 = [
47
48
  getValueFromSettingID: 'errorMessage',
48
49
  isHideClear: true,
49
50
  disableScrollbar: true,
51
+ compoDefaultValue: 'Can’t send email. Please try again later.',
50
52
  popoverLabel: {
51
53
  en: 'Error message'
52
54
  },
@@ -114,19 +116,8 @@ const SettingUIV2 = [
114
116
  id: 'padding',
115
117
  type: 'padding-v2',
116
118
  linkWithSetting: {
117
- name: 'globalSize',
119
+ name: 'spacing-setting',
118
120
  field: 'padding'
119
- },
120
- compoDefaultValue: {
121
- desktop: {
122
- default: {
123
- type: 'medium',
124
- top: '12px',
125
- bottom: '12px',
126
- left: '24px',
127
- right: '24px'
128
- }
129
- }
130
121
  }
131
122
  }
132
123
  }
@@ -139,7 +139,7 @@ const SettingUIV2 = [
139
139
  label: {
140
140
  en: 'Align'
141
141
  },
142
- conditionEnable: '!(parseInt(width) >= 100 && width?.includes("%"))',
142
+ conditionEnable: '!(parseInt(globalSize.width) >= 100 && globalSize.width?.includes("%"))',
143
143
  setting: {
144
144
  id: 'align'
145
145
  },
@@ -10,8 +10,8 @@ const TextFieldSettings = [
10
10
  id: 'name',
11
11
  label: 'Name',
12
12
  type: 'input',
13
- placeholder: 'E.g. contact[first_name]',
14
- default: 'contact[first_name]'
13
+ placeholder: 'E.g. contact[name]',
14
+ default: 'contact[name]'
15
15
  },
16
16
  {
17
17
  id: 'placeholder',