@gem-sdk/components 2.0.0-dev.394 → 2.0.0-dev.396

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 (24) hide show
  1. package/dist/cjs/banner/components/common/getStyle.js +3 -1
  2. package/dist/cjs/banner/setting/setting.js +12 -16
  3. package/dist/cjs/banner/setting/uiV2.js +0 -26
  4. package/dist/cjs/product/components/ProductBundle/common/styles.js +17 -6
  5. package/dist/cjs/product/components/ProductBundle/components/ProductBundleDiscountChildrenItem.js +1 -1
  6. package/dist/cjs/product/components/ProductBundle/components/ProductBundleDiscountChildrenItem.liquid.js +1 -1
  7. package/dist/cjs/product/components/ProductBundle/setting/ProductBundleDiscount.js +47 -415
  8. package/dist/cjs/product/components/ProductBundle/setting/uiV1.js +404 -0
  9. package/dist/cjs/product/components/ProductBundle/setting/uiV2.js +728 -0
  10. package/dist/cjs/product/setting/product-badge/configs/settings.js +1 -1
  11. package/dist/cjs/product/setting/product-badge/configs/uiV2.js +2 -5
  12. package/dist/esm/banner/components/common/getStyle.js +4 -2
  13. package/dist/esm/banner/setting/setting.js +12 -16
  14. package/dist/esm/banner/setting/uiV2.js +0 -26
  15. package/dist/esm/product/components/ProductBundle/common/styles.js +17 -6
  16. package/dist/esm/product/components/ProductBundle/components/ProductBundleDiscountChildrenItem.js +1 -1
  17. package/dist/esm/product/components/ProductBundle/components/ProductBundleDiscountChildrenItem.liquid.js +1 -1
  18. package/dist/esm/product/components/ProductBundle/setting/ProductBundleDiscount.js +47 -415
  19. package/dist/esm/product/components/ProductBundle/setting/uiV1.js +400 -0
  20. package/dist/esm/product/components/ProductBundle/setting/uiV2.js +724 -0
  21. package/dist/esm/product/setting/product-badge/configs/settings.js +1 -1
  22. package/dist/esm/product/setting/product-badge/configs/uiV2.js +2 -5
  23. package/dist/types/index.d.ts +3 -1
  24. package/package.json +2 -2
@@ -4,6 +4,8 @@ import { verticalThree } from '../../../setting/constant/bundle-layout/verticalT
4
4
  import { horizontalThree } from '../../../setting/constant/bundle-layout/horizontalThree.js';
5
5
  import { horizontalTwo } from '../../../setting/constant/bundle-layout/horizontalTwo.js';
6
6
  import { horizontalOne } from '../../../setting/constant/bundle-layout/horizontalOne.js';
7
+ import ControlUIV2 from './uiV2.js';
8
+ import ControlUIV1 from './uiV1.js';
7
9
 
8
10
  const config = {
9
11
  tag: 'ProductBundleDiscount',
@@ -168,12 +170,42 @@ const config = {
168
170
  showValue: true
169
171
  }
170
172
  ]
173
+ },
174
+ {
175
+ id: 'iconItemColor',
176
+ type: 'color-picker-v2',
177
+ label: 'Icon',
178
+ default: 'line-2'
171
179
  }
172
180
  ]
173
181
  },
174
182
  {
175
183
  id: 'style',
176
184
  controls: [
185
+ {
186
+ id: 'itemSpacing',
187
+ type: 'dropdown:input',
188
+ hideUnit: false,
189
+ inputType: 'number',
190
+ default: '12px',
191
+ displayOptions: [
192
+ {
193
+ label: 'Small',
194
+ value: '8px',
195
+ showValue: true
196
+ },
197
+ {
198
+ label: 'Medium',
199
+ value: '16px',
200
+ showValue: true
201
+ },
202
+ {
203
+ label: 'Large',
204
+ value: '24px',
205
+ showValue: true
206
+ }
207
+ ]
208
+ },
177
209
  {
178
210
  id: 'size',
179
211
  type: 'size-setting',
@@ -187,7 +219,7 @@ const config = {
187
219
  bottom: '24px',
188
220
  right: '16px'
189
221
  },
190
- gap: '12px',
222
+ // gap: '12px',
191
223
  width: '100%'
192
224
  }
193
225
  }
@@ -199,19 +231,15 @@ const config = {
199
231
  'full'
200
232
  ]
201
233
  },
202
- gap: {
203
- name: 'Item gap',
204
- displayOptions: [
205
- 'small',
206
- 'medium',
207
- 'large'
208
- ],
209
- sizeConfig: {
210
- small: '8px',
211
- medium: '16px',
212
- large: '24px'
213
- }
214
- },
234
+ // gap: {
235
+ // name: 'Item gap',
236
+ // displayOptions: ['small', 'medium', 'large'],
237
+ // sizeConfig: {
238
+ // small: '8px',
239
+ // medium: '16px',
240
+ // large: '24px',
241
+ // },
242
+ // },
215
243
  padding: {
216
244
  name: 'Padding',
217
245
  paddingConfig: {
@@ -275,7 +303,7 @@ const config = {
275
303
  },
276
304
  {
277
305
  id: 'iconColor',
278
- type: 'colorpicker',
306
+ type: 'color-picker-v2',
279
307
  label: 'Icon',
280
308
  default: {
281
309
  normal: '#B4B4B4',
@@ -289,7 +317,7 @@ const config = {
289
317
  },
290
318
  {
291
319
  id: 'backgroundColor',
292
- type: 'background-color-picker',
320
+ type: 'color-picker-v2',
293
321
  label: 'Background',
294
322
  default: {
295
323
  normal: '#FFFFFF',
@@ -318,7 +346,7 @@ const config = {
318
346
  },
319
347
  {
320
348
  id: 'boxShadowBundle',
321
- type: 'boxShadow',
349
+ type: 'shadow-v2',
322
350
  hideOnState: {
323
351
  normal: true,
324
352
  hover: true,
@@ -383,404 +411,8 @@ const config = {
383
411
  ]
384
412
  }
385
413
  ],
386
- ui: [
387
- {
388
- type: 'group',
389
- label: {
390
- en: 'Item management'
391
- },
392
- controls: [
393
- {
394
- type: 'control',
395
- layout: 'vertical',
396
- setting: {
397
- id: 'childItem'
398
- }
399
- }
400
- ]
401
- },
402
- {
403
- type: 'control',
404
- label: {
405
- en: 'Use product compare-at price'
406
- },
407
- setting: {
408
- id: 'useProductCompareAtPrice'
409
- }
410
- },
411
- {
412
- type: 'control',
413
- label: {
414
- en: 'Hide no-discount items'
415
- },
416
- setting: {
417
- id: 'hideNoDiscountItem'
418
- }
419
- },
420
- {
421
- type: 'group',
422
- label: {
423
- en: ''
424
- },
425
- controls: [
426
- {
427
- type: 'control',
428
- label: {
429
- en: 'Pre-selected item'
430
- },
431
- setting: {
432
- id: 'hasPreSelectItem'
433
- },
434
- options: {
435
- label: 'large',
436
- styleControl: {
437
- width: 'auto'
438
- }
439
- }
440
- },
441
- {
442
- type: 'control',
443
- condition: 'hasPreSelectItem == true',
444
- layout: 'vertical',
445
- setting: {
446
- id: 'selectItemDefault'
447
- },
448
- options: {
449
- styleControl: {
450
- 'max-width': '100%'
451
- }
452
- }
453
- }
454
- ]
455
- },
456
- {
457
- type: 'group',
458
- controls: [
459
- {
460
- type: 'control',
461
- label: {
462
- en: 'Icon'
463
- },
464
- options: {
465
- label: 'large'
466
- },
467
- setting: {
468
- id: 'enableIcon'
469
- }
470
- },
471
- {
472
- type: 'control',
473
- condition: 'enableIcon == true && layout == "vertical-layout"',
474
- label: {
475
- en: 'Icon position'
476
- },
477
- setting: {
478
- id: 'iconPosition'
479
- }
480
- },
481
- {
482
- type: 'control',
483
- condition: 'enableIcon == true && layout == "horizontal-layout"',
484
- label: {
485
- en: 'Icon position'
486
- },
487
- setting: {
488
- id: 'iconHorizontalPosition'
489
- }
490
- },
491
- {
492
- type: 'control',
493
- condition: 'enableIcon == true',
494
- label: {
495
- en: 'Icon size'
496
- },
497
- setting: {
498
- id: 'iconSize'
499
- }
500
- },
501
- {
502
- type: 'control',
503
- condition: 'enableIcon == true',
504
- label: {
505
- en: 'Icon spacing'
506
- },
507
- setting: {
508
- id: 'iconSpacing'
509
- }
510
- }
511
- ]
512
- },
513
- {
514
- label: {
515
- en: 'Size'
516
- },
517
- type: 'group',
518
- controls: [
519
- {
520
- type: 'control',
521
- setting: {
522
- id: 'size'
523
- },
524
- options: {
525
- noGap: true
526
- }
527
- }
528
- ]
529
- },
530
- {
531
- type: 'group',
532
- label: {
533
- en: 'Item states'
534
- },
535
- options: {
536
- labelSpacing: 'small'
537
- },
538
- controls: [
539
- {
540
- type: 'tab',
541
- controls: [
542
- {
543
- type: 'group',
544
- label: {
545
- en: 'Default'
546
- },
547
- controls: [
548
- {
549
- type: 'control',
550
- label: {
551
- en: 'Icon'
552
- },
553
- setting: {
554
- id: 'iconColor',
555
- state: 'normal'
556
- }
557
- },
558
- {
559
- type: 'control',
560
- label: {
561
- en: 'Background'
562
- },
563
- setting: {
564
- id: 'backgroundColor',
565
- state: 'normal'
566
- }
567
- },
568
- {
569
- type: 'control',
570
- options: {
571
- labelPosition: 'start'
572
- },
573
- label: {
574
- en: 'Border'
575
- },
576
- setting: {
577
- id: 'borderBundle',
578
- state: 'normal'
579
- }
580
- },
581
- {
582
- type: 'control',
583
- label: {
584
- en: 'Corner'
585
- },
586
- setting: {
587
- id: 'roundedBundle',
588
- state: 'normal'
589
- }
590
- },
591
- {
592
- type: 'control',
593
- label: {
594
- en: 'Shadow'
595
- },
596
- setting: {
597
- id: 'hasBoxShadowBundle',
598
- state: 'normal'
599
- }
600
- },
601
- {
602
- type: 'group',
603
- condition: 'hasBoxShadowBundle.normal == true',
604
- controls: [
605
- {
606
- type: 'control',
607
- layout: 'vertical',
608
- setting: {
609
- id: 'boxShadowBundle',
610
- state: 'normal'
611
- }
612
- }
613
- ]
614
- }
615
- ]
616
- },
617
- {
618
- type: 'group',
619
- label: {
620
- en: 'Hover'
621
- },
622
- controls: [
623
- {
624
- type: 'control',
625
- label: {
626
- en: 'Icon'
627
- },
628
- setting: {
629
- id: 'iconColor',
630
- state: 'hover'
631
- }
632
- },
633
- {
634
- type: 'control',
635
- label: {
636
- en: 'Background'
637
- },
638
- setting: {
639
- id: 'backgroundColor',
640
- state: 'hover'
641
- }
642
- },
643
- {
644
- type: 'control',
645
- options: {
646
- labelPosition: 'start'
647
- },
648
- label: {
649
- en: 'Border'
650
- },
651
- setting: {
652
- id: 'borderBundle',
653
- state: 'hover'
654
- }
655
- },
656
- {
657
- type: 'control',
658
- label: {
659
- en: 'Corner'
660
- },
661
- setting: {
662
- id: 'roundedBundle',
663
- state: 'hover'
664
- }
665
- },
666
- {
667
- type: 'control',
668
- label: {
669
- en: 'Shadow'
670
- },
671
- setting: {
672
- id: 'hasBoxShadowBundle',
673
- state: 'hover'
674
- }
675
- },
676
- {
677
- type: 'group',
678
- condition: 'hasBoxShadowBundle.hover == true',
679
- controls: [
680
- {
681
- type: 'control',
682
- setting: {
683
- id: 'boxShadowBundle',
684
- state: 'hover'
685
- },
686
- layout: 'vertical'
687
- }
688
- ]
689
- }
690
- ]
691
- },
692
- {
693
- type: 'group',
694
- label: {
695
- en: 'Active'
696
- },
697
- controls: [
698
- {
699
- type: 'control',
700
- label: {
701
- en: 'Icon'
702
- },
703
- setting: {
704
- id: 'iconColor',
705
- state: 'active'
706
- }
707
- },
708
- {
709
- type: 'control',
710
- label: {
711
- en: 'Background'
712
- },
713
- setting: {
714
- id: 'backgroundColor',
715
- state: 'active'
716
- }
717
- },
718
- {
719
- type: 'control',
720
- options: {
721
- labelPosition: 'start'
722
- },
723
- label: {
724
- en: 'Border'
725
- },
726
- setting: {
727
- id: 'borderBundle',
728
- state: 'active'
729
- }
730
- },
731
- {
732
- type: 'control',
733
- label: {
734
- en: 'Corner'
735
- },
736
- setting: {
737
- id: 'roundedBundle',
738
- state: 'active'
739
- }
740
- },
741
- {
742
- type: 'control',
743
- label: {
744
- en: 'Shadow'
745
- },
746
- setting: {
747
- id: 'hasBoxShadowBundle',
748
- state: 'active'
749
- }
750
- },
751
- {
752
- type: 'group',
753
- condition: 'hasBoxShadowBundle.active == true',
754
- controls: [
755
- {
756
- type: 'control',
757
- setting: {
758
- id: 'boxShadowBundle',
759
- state: 'active'
760
- },
761
- layout: 'vertical'
762
- }
763
- ]
764
- }
765
- ]
766
- }
767
- ]
768
- }
769
- ]
770
- },
771
- {
772
- type: 'control',
773
- label: {
774
- en: 'Align'
775
- },
776
- options: {
777
- label: 'large'
778
- },
779
- setting: {
780
- id: 'align'
781
- }
782
- }
783
- ],
414
+ ui: ControlUIV1,
415
+ uiV2: ControlUIV2,
784
416
  editorConfigs: {
785
417
  placeholder: {
786
418
  flowTag: [