@gem-sdk/components 2.0.0-dev.581 → 2.0.0-dev.583
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.
- package/dist/cjs/button/components/Button.js +4 -0
- package/dist/cjs/button/components/Button.liquid.js +1 -1
- package/dist/cjs/button/components/ButtonLabel.js +2 -1
- package/dist/cjs/button/components/common/styles.js +2 -2
- package/dist/cjs/carousel/setting/configs/settingV2.js +2 -3
- package/dist/cjs/carousel/setting/configs/uiV1.js +1 -1
- package/dist/cjs/carousel/setting/configs/uiV2.js +1 -1
- package/dist/cjs/product/components/ProductButton/common/helpers.js +0 -4
- package/dist/cjs/product/components/ProductButton/components/PriceLayout.js +2 -2
- package/dist/cjs/product/components/ProductButton/components/PriceLayout.liquid.js +5 -5
- package/dist/cjs/product/components/ProductButton/components/ProductButtonPrice.js +1 -3
- package/dist/cjs/product/components/ProductButton/components/ProductButtonPrice.liquid.js +1 -3
- package/dist/cjs/product/components/ProductButton/components/Separator.js +1 -0
- package/dist/cjs/product/components/ProductButton/components/Separator.liquid.js +1 -0
- package/dist/cjs/product/components/ProductList/ProductListCarouselItem.liquid.js +28 -0
- package/dist/cjs/product/components/ProductList/ProductListCarouselLayout.liquid.js +4 -2
- package/dist/cjs/product/components/ProductList/ProductListGridLayout.liquid.js +2 -2
- package/dist/cjs/product/setting/product-button/configs/settings.js +17 -20
- package/dist/cjs/product/setting/product-button/configs/uiV2.js +63 -142
- package/dist/cjs/product/setting/product-list/configs/presets.js +10 -4
- package/dist/cjs/product/setting/product-view-more/configs/uiV2.js +71 -66
- package/dist/cjs/sticky/setting/preset-config.js +8 -2
- package/dist/esm/button/components/Button.js +5 -1
- package/dist/esm/button/components/Button.liquid.js +1 -1
- package/dist/esm/button/components/ButtonLabel.js +2 -1
- package/dist/esm/button/components/common/styles.js +2 -3
- package/dist/esm/carousel/setting/configs/settingV2.js +2 -3
- package/dist/esm/carousel/setting/configs/uiV1.js +1 -1
- package/dist/esm/carousel/setting/configs/uiV2.js +1 -1
- package/dist/esm/product/components/ProductButton/common/helpers.js +1 -4
- package/dist/esm/product/components/ProductButton/components/PriceLayout.js +2 -2
- package/dist/esm/product/components/ProductButton/components/PriceLayout.liquid.js +5 -5
- package/dist/esm/product/components/ProductButton/components/ProductButtonPrice.js +2 -4
- package/dist/esm/product/components/ProductButton/components/ProductButtonPrice.liquid.js +2 -4
- package/dist/esm/product/components/ProductButton/components/Separator.js +1 -0
- package/dist/esm/product/components/ProductButton/components/Separator.liquid.js +1 -0
- package/dist/esm/product/components/ProductList/ProductListCarouselItem.liquid.js +24 -0
- package/dist/esm/product/components/ProductList/ProductListCarouselLayout.liquid.js +3 -1
- package/dist/esm/product/components/ProductList/ProductListGridLayout.liquid.js +1 -1
- package/dist/esm/product/setting/product-button/configs/settings.js +17 -20
- package/dist/esm/product/setting/product-button/configs/uiV2.js +63 -142
- package/dist/esm/product/setting/product-list/configs/presets.js +10 -4
- package/dist/esm/product/setting/product-view-more/configs/uiV2.js +71 -66
- package/dist/esm/sticky/setting/preset-config.js +8 -2
- package/package.json +1 -1
- /package/dist/cjs/product/components/ProductList/{ProductListItem.liquid.js → ProductListGridItem.liquid.js} +0 -0
- /package/dist/esm/product/components/ProductList/{ProductListItem.liquid.js → ProductListGridItem.liquid.js} +0 -0
|
@@ -25,18 +25,6 @@ const SettingUIV2 = [
|
|
|
25
25
|
newValue: true
|
|
26
26
|
}
|
|
27
27
|
},
|
|
28
|
-
{
|
|
29
|
-
condition: 'buttonLayout === "cart-full"',
|
|
30
|
-
source: [
|
|
31
|
-
'buttonLayout'
|
|
32
|
-
],
|
|
33
|
-
action: {
|
|
34
|
-
controlId: 'enableTextStyle',
|
|
35
|
-
groupType: 'style',
|
|
36
|
-
controlType: 'style',
|
|
37
|
-
newValue: true
|
|
38
|
-
}
|
|
39
|
-
},
|
|
40
28
|
{
|
|
41
29
|
condition: 'buttonLayout === "cart-full"',
|
|
42
30
|
source: [
|
|
@@ -85,18 +73,6 @@ const SettingUIV2 = [
|
|
|
85
73
|
newValue: true
|
|
86
74
|
}
|
|
87
75
|
},
|
|
88
|
-
{
|
|
89
|
-
condition: 'buttonLayout === "cart-price"',
|
|
90
|
-
source: [
|
|
91
|
-
'buttonLayout'
|
|
92
|
-
],
|
|
93
|
-
action: {
|
|
94
|
-
controlId: 'enableTextStyle',
|
|
95
|
-
groupType: 'style',
|
|
96
|
-
controlType: 'style',
|
|
97
|
-
newValue: true
|
|
98
|
-
}
|
|
99
|
-
},
|
|
100
76
|
{
|
|
101
77
|
condition: 'buttonLayout === "cart-price"',
|
|
102
78
|
source: [
|
|
@@ -145,18 +121,6 @@ const SettingUIV2 = [
|
|
|
145
121
|
newValue: false
|
|
146
122
|
}
|
|
147
123
|
},
|
|
148
|
-
{
|
|
149
|
-
condition: 'buttonLayout === "cart-only"',
|
|
150
|
-
source: [
|
|
151
|
-
'buttonLayout'
|
|
152
|
-
],
|
|
153
|
-
action: {
|
|
154
|
-
controlId: 'enableTextStyle',
|
|
155
|
-
groupType: 'style',
|
|
156
|
-
controlType: 'style',
|
|
157
|
-
newValue: true
|
|
158
|
-
}
|
|
159
|
-
},
|
|
160
124
|
{
|
|
161
125
|
condition: 'buttonLayout === "cart-only"',
|
|
162
126
|
source: [
|
|
@@ -205,18 +169,6 @@ const SettingUIV2 = [
|
|
|
205
169
|
newValue: false
|
|
206
170
|
}
|
|
207
171
|
},
|
|
208
|
-
{
|
|
209
|
-
condition: 'buttonLayout === "cart-price-icon"',
|
|
210
|
-
source: [
|
|
211
|
-
'buttonLayout'
|
|
212
|
-
],
|
|
213
|
-
action: {
|
|
214
|
-
controlId: 'enableTextStyle',
|
|
215
|
-
groupType: 'style',
|
|
216
|
-
controlType: 'style',
|
|
217
|
-
newValue: true
|
|
218
|
-
}
|
|
219
|
-
},
|
|
220
172
|
{
|
|
221
173
|
condition: 'buttonLayout === "cart-price-icon"',
|
|
222
174
|
source: [
|
|
@@ -265,18 +217,6 @@ const SettingUIV2 = [
|
|
|
265
217
|
newValue: false
|
|
266
218
|
}
|
|
267
219
|
},
|
|
268
|
-
{
|
|
269
|
-
condition: 'buttonLayout === "cart-icon"',
|
|
270
|
-
source: [
|
|
271
|
-
'buttonLayout'
|
|
272
|
-
],
|
|
273
|
-
action: {
|
|
274
|
-
controlId: 'enableTextStyle',
|
|
275
|
-
groupType: 'style',
|
|
276
|
-
controlType: 'style',
|
|
277
|
-
newValue: true
|
|
278
|
-
}
|
|
279
|
-
},
|
|
280
220
|
{
|
|
281
221
|
condition: 'buttonLayout === "cart-icon"',
|
|
282
222
|
source: [
|
|
@@ -324,66 +264,6 @@ const SettingUIV2 = [
|
|
|
324
264
|
controlType: 'setting',
|
|
325
265
|
newValue: false
|
|
326
266
|
}
|
|
327
|
-
},
|
|
328
|
-
{
|
|
329
|
-
condition: 'buttonLayout === "icon-only"',
|
|
330
|
-
source: [
|
|
331
|
-
'buttonLayout'
|
|
332
|
-
],
|
|
333
|
-
action: {
|
|
334
|
-
controlId: 'enableTextStyle',
|
|
335
|
-
groupType: 'style',
|
|
336
|
-
controlType: 'style',
|
|
337
|
-
newValue: false
|
|
338
|
-
}
|
|
339
|
-
},
|
|
340
|
-
{
|
|
341
|
-
condition: 'buttonLayout === "icon-only"',
|
|
342
|
-
source: [
|
|
343
|
-
'buttonLayout'
|
|
344
|
-
],
|
|
345
|
-
action: {
|
|
346
|
-
controlId: 'enableIcon',
|
|
347
|
-
groupType: 'style',
|
|
348
|
-
controlType: 'style',
|
|
349
|
-
newValue: true
|
|
350
|
-
}
|
|
351
|
-
},
|
|
352
|
-
{
|
|
353
|
-
condition: 'buttonLayout === "icon-only"',
|
|
354
|
-
source: [
|
|
355
|
-
'buttonLayout'
|
|
356
|
-
],
|
|
357
|
-
action: {
|
|
358
|
-
controlId: 'enableSeparator',
|
|
359
|
-
groupType: 'style',
|
|
360
|
-
controlType: 'style',
|
|
361
|
-
newValue: false
|
|
362
|
-
}
|
|
363
|
-
},
|
|
364
|
-
{
|
|
365
|
-
condition: 'buttonLayout === "icon-only"',
|
|
366
|
-
source: [
|
|
367
|
-
'buttonLayout'
|
|
368
|
-
],
|
|
369
|
-
action: {
|
|
370
|
-
controlId: 'enablePrice',
|
|
371
|
-
groupType: 'style',
|
|
372
|
-
controlType: 'style',
|
|
373
|
-
newValue: false
|
|
374
|
-
}
|
|
375
|
-
},
|
|
376
|
-
{
|
|
377
|
-
condition: 'buttonLayout === "icon-only"',
|
|
378
|
-
source: [
|
|
379
|
-
'buttonLayout'
|
|
380
|
-
],
|
|
381
|
-
action: {
|
|
382
|
-
controlId: 'shouldClearSpace',
|
|
383
|
-
groupType: 'setting',
|
|
384
|
-
controlType: 'setting',
|
|
385
|
-
newValue: true
|
|
386
|
-
}
|
|
387
267
|
}
|
|
388
268
|
],
|
|
389
269
|
options: {
|
|
@@ -614,7 +494,7 @@ const SettingUIV2 = [
|
|
|
614
494
|
setting: {
|
|
615
495
|
id: 'iconAlign'
|
|
616
496
|
},
|
|
617
|
-
conditionDisplay: 'enableIcon === true
|
|
497
|
+
conditionDisplay: 'enableIcon === true'
|
|
618
498
|
},
|
|
619
499
|
{
|
|
620
500
|
type: 'control',
|
|
@@ -624,36 +504,39 @@ const SettingUIV2 = [
|
|
|
624
504
|
setting: {
|
|
625
505
|
id: 'iconSpacing'
|
|
626
506
|
},
|
|
627
|
-
conditionDisplay: 'enableIcon === true
|
|
507
|
+
conditionDisplay: 'enableIcon === true'
|
|
628
508
|
}
|
|
629
509
|
]
|
|
630
510
|
},
|
|
631
511
|
{
|
|
512
|
+
label: {
|
|
513
|
+
en: 'Text'
|
|
514
|
+
},
|
|
632
515
|
controls: [
|
|
633
516
|
{
|
|
517
|
+
type: 'combo',
|
|
634
518
|
label: {
|
|
635
|
-
en: '
|
|
636
|
-
},
|
|
637
|
-
setting: {
|
|
638
|
-
id: 'enableTextStyle'
|
|
519
|
+
en: 'Content'
|
|
639
520
|
},
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
521
|
+
iconName: 'polaris-text-block',
|
|
522
|
+
fixedValue: 'Add to cart',
|
|
523
|
+
getValueFromSettingID: 'label',
|
|
524
|
+
isHideClear: true,
|
|
525
|
+
controls: [
|
|
526
|
+
{
|
|
527
|
+
label: {
|
|
528
|
+
en: 'Content'
|
|
529
|
+
},
|
|
530
|
+
setting: {
|
|
531
|
+
id: 'label'
|
|
532
|
+
}
|
|
533
|
+
}
|
|
534
|
+
]
|
|
644
535
|
},
|
|
645
536
|
{
|
|
646
|
-
label: {
|
|
647
|
-
en: 'Text'
|
|
648
|
-
},
|
|
649
537
|
setting: {
|
|
650
538
|
id: 'typo'
|
|
651
539
|
},
|
|
652
|
-
conditionDisplay: 'enableTextStyle === true',
|
|
653
|
-
options: {
|
|
654
|
-
hideLabel: true,
|
|
655
|
-
fullWidth: true
|
|
656
|
-
},
|
|
657
540
|
layout: 'vertical'
|
|
658
541
|
}
|
|
659
542
|
]
|
|
@@ -699,12 +582,15 @@ const SettingUIV2 = [
|
|
|
699
582
|
},
|
|
700
583
|
{
|
|
701
584
|
label: {
|
|
702
|
-
en: '
|
|
585
|
+
en: 'Product price'
|
|
703
586
|
},
|
|
704
587
|
conditionDisplay: 'enablePrice === true',
|
|
705
588
|
type: 'combo',
|
|
706
589
|
fixedValue: 'Edit',
|
|
707
590
|
iconName: 'polaris-text-title',
|
|
591
|
+
popoverLabel: {
|
|
592
|
+
en: 'Price text style'
|
|
593
|
+
},
|
|
708
594
|
isHideClear: true,
|
|
709
595
|
controls: [
|
|
710
596
|
{
|
|
@@ -717,12 +603,15 @@ const SettingUIV2 = [
|
|
|
717
603
|
},
|
|
718
604
|
{
|
|
719
605
|
label: {
|
|
720
|
-
en: '
|
|
606
|
+
en: 'Compare-at'
|
|
721
607
|
},
|
|
722
608
|
conditionDisplay: 'enablePrice === true',
|
|
723
609
|
type: 'combo',
|
|
724
610
|
fixedValue: 'Edit',
|
|
725
611
|
iconName: 'polaris-text-title',
|
|
612
|
+
popoverLabel: {
|
|
613
|
+
en: 'Price text style'
|
|
614
|
+
},
|
|
726
615
|
isHideClear: true,
|
|
727
616
|
controls: [
|
|
728
617
|
{
|
|
@@ -961,8 +850,11 @@ const SettingUIV2 = [
|
|
|
961
850
|
conditionDisplay: "enableMessage === true && actionEffect === 'continue-shopping'",
|
|
962
851
|
type: 'combo',
|
|
963
852
|
getValueFromSettingID: 'successMessage',
|
|
964
|
-
iconName: 'polaris-
|
|
853
|
+
iconName: 'polaris-check-circle',
|
|
965
854
|
isHideClear: true,
|
|
855
|
+
popoverLabel: {
|
|
856
|
+
en: 'Success message'
|
|
857
|
+
},
|
|
966
858
|
controls: [
|
|
967
859
|
{
|
|
968
860
|
label: {
|
|
@@ -987,10 +879,39 @@ const SettingUIV2 = [
|
|
|
987
879
|
conditionDisplay: "enableMessage === true && actionEffect === 'continue-shopping'",
|
|
988
880
|
type: 'combo',
|
|
989
881
|
fixedValue: 'Edit',
|
|
990
|
-
iconName: 'polaris-
|
|
882
|
+
iconName: 'polaris-alert-bubble',
|
|
991
883
|
getValueFromSettingID: 'errorMessage',
|
|
992
884
|
isHideClear: true,
|
|
885
|
+
popoverLabel: {
|
|
886
|
+
en: 'Error message'
|
|
887
|
+
},
|
|
993
888
|
controls: [
|
|
889
|
+
{
|
|
890
|
+
label: {
|
|
891
|
+
en: 'Source'
|
|
892
|
+
},
|
|
893
|
+
setting: {
|
|
894
|
+
id: 'errorType'
|
|
895
|
+
}
|
|
896
|
+
},
|
|
897
|
+
{
|
|
898
|
+
label: {
|
|
899
|
+
en: 'Add failed'
|
|
900
|
+
},
|
|
901
|
+
conditionDisplay: "errorType === 'custom'",
|
|
902
|
+
setting: {
|
|
903
|
+
id: 'errorMessage'
|
|
904
|
+
}
|
|
905
|
+
},
|
|
906
|
+
{
|
|
907
|
+
label: {
|
|
908
|
+
en: 'Not select variant'
|
|
909
|
+
},
|
|
910
|
+
conditionDisplay: "errorType === 'custom'",
|
|
911
|
+
setting: {
|
|
912
|
+
id: 'variantSelectionRequiredMessage'
|
|
913
|
+
}
|
|
914
|
+
},
|
|
994
915
|
{
|
|
995
916
|
label: {
|
|
996
917
|
en: 'Content'
|
|
@@ -360,7 +360,7 @@ const ProductListPreset = [
|
|
|
360
360
|
},
|
|
361
361
|
settings: {
|
|
362
362
|
actionEffect: 'open-cart-drawer',
|
|
363
|
-
label: 'Add
|
|
363
|
+
label: 'Add to cart',
|
|
364
364
|
outOfStockLabel: 'Out Of Stock',
|
|
365
365
|
successMessage: 'Add product to cart successfully',
|
|
366
366
|
errorMessage: 'Cannot add product to cart',
|
|
@@ -373,7 +373,10 @@ const ProductListPreset = [
|
|
|
373
373
|
desktop: {
|
|
374
374
|
width: '100%'
|
|
375
375
|
}
|
|
376
|
-
}
|
|
376
|
+
},
|
|
377
|
+
enableIcon: true,
|
|
378
|
+
enablePrice: false,
|
|
379
|
+
enableSeparator: false
|
|
377
380
|
}
|
|
378
381
|
}
|
|
379
382
|
]
|
|
@@ -751,7 +754,7 @@ const ProductListPreset = [
|
|
|
751
754
|
},
|
|
752
755
|
settings: {
|
|
753
756
|
actionEffect: 'open-cart-drawer',
|
|
754
|
-
label: 'Add
|
|
757
|
+
label: 'Add to cart',
|
|
755
758
|
outOfStockLabel: 'Out Of Stock',
|
|
756
759
|
successMessage: 'Add product to cart successfully',
|
|
757
760
|
errorMessage: 'Cannot add product to cart',
|
|
@@ -764,7 +767,10 @@ const ProductListPreset = [
|
|
|
764
767
|
desktop: {
|
|
765
768
|
width: '100%'
|
|
766
769
|
}
|
|
767
|
-
}
|
|
770
|
+
},
|
|
771
|
+
enableIcon: true,
|
|
772
|
+
enablePrice: false,
|
|
773
|
+
enableSeparator: false
|
|
768
774
|
}
|
|
769
775
|
}
|
|
770
776
|
]
|
|
@@ -358,79 +358,84 @@ const SettingUIV2 = [
|
|
|
358
358
|
id: 'textColorHover',
|
|
359
359
|
state: 'hover'
|
|
360
360
|
}
|
|
361
|
-
}
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
},
|
|
375
|
-
setting: {
|
|
376
|
-
id: 'roundedBtnV2',
|
|
377
|
-
state: 'hover'
|
|
378
|
-
}
|
|
379
|
-
},
|
|
380
|
-
{
|
|
381
|
-
label: {
|
|
382
|
-
en: 'Shadow'
|
|
383
|
-
},
|
|
384
|
-
setting: {
|
|
385
|
-
id: 'boxShadowBtnV2',
|
|
386
|
-
state: 'hover'
|
|
361
|
+
}
|
|
362
|
+
],
|
|
363
|
+
moreSettings: {
|
|
364
|
+
type: 'collapse',
|
|
365
|
+
controls: [
|
|
366
|
+
{
|
|
367
|
+
label: {
|
|
368
|
+
en: 'Border'
|
|
369
|
+
},
|
|
370
|
+
setting: {
|
|
371
|
+
id: 'borderBtnV2',
|
|
372
|
+
state: 'hover'
|
|
373
|
+
}
|
|
387
374
|
},
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
375
|
+
{
|
|
376
|
+
label: {
|
|
377
|
+
en: 'Corner'
|
|
378
|
+
},
|
|
379
|
+
setting: {
|
|
380
|
+
id: 'roundedBtnV2',
|
|
381
|
+
state: 'hover'
|
|
382
|
+
}
|
|
396
383
|
},
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
384
|
+
{
|
|
385
|
+
label: {
|
|
386
|
+
en: 'Shadow'
|
|
387
|
+
},
|
|
388
|
+
setting: {
|
|
389
|
+
id: 'boxShadowBtnV2',
|
|
390
|
+
state: 'hover'
|
|
391
|
+
},
|
|
392
|
+
options: {
|
|
393
|
+
updateFields: [
|
|
394
|
+
{
|
|
395
|
+
field: 'enable',
|
|
396
|
+
settingId: 'hasBoxShadowBtn',
|
|
397
|
+
state: 'hover'
|
|
411
398
|
}
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
399
|
+
]
|
|
400
|
+
},
|
|
401
|
+
controlChangeTrigger: {
|
|
402
|
+
settings: [
|
|
403
|
+
{
|
|
404
|
+
condition: `boxShadowBtnV2.hover.enable === true`,
|
|
405
|
+
source: [
|
|
406
|
+
'boxShadowBtnV2',
|
|
407
|
+
'hasBoxShadowBtn'
|
|
408
|
+
],
|
|
409
|
+
action: {
|
|
410
|
+
controlId: 'hasBoxShadowBtn',
|
|
411
|
+
groupType: 'advanced',
|
|
412
|
+
controlType: 'advanced',
|
|
413
|
+
state: 'hover',
|
|
414
|
+
newValue: true
|
|
415
|
+
}
|
|
416
|
+
},
|
|
417
|
+
{
|
|
418
|
+
condition: `boxShadowBtnV2.normal.enable === false`,
|
|
419
|
+
source: [
|
|
420
|
+
'boxShadowBtnV2',
|
|
421
|
+
'hasBoxShadowBtn'
|
|
422
|
+
],
|
|
423
|
+
action: {
|
|
424
|
+
controlId: 'hasBoxShadowBtn',
|
|
425
|
+
groupType: 'advanced',
|
|
426
|
+
controlType: 'advanced',
|
|
427
|
+
state: 'normal',
|
|
428
|
+
newValue: false
|
|
429
|
+
}
|
|
425
430
|
}
|
|
431
|
+
],
|
|
432
|
+
options: {
|
|
433
|
+
noRecordHistory: true
|
|
426
434
|
}
|
|
427
|
-
],
|
|
428
|
-
options: {
|
|
429
|
-
noRecordHistory: true
|
|
430
435
|
}
|
|
431
436
|
}
|
|
432
|
-
|
|
433
|
-
|
|
437
|
+
]
|
|
438
|
+
}
|
|
434
439
|
},
|
|
435
440
|
{
|
|
436
441
|
label: {
|
|
@@ -886,7 +886,10 @@ const StickyPreset = {
|
|
|
886
886
|
desktop: {
|
|
887
887
|
width: '100%'
|
|
888
888
|
}
|
|
889
|
-
}
|
|
889
|
+
},
|
|
890
|
+
enableIcon: false,
|
|
891
|
+
enablePrice: false,
|
|
892
|
+
enableSeparator: false
|
|
890
893
|
},
|
|
891
894
|
advanced: {
|
|
892
895
|
'spacing-setting': {
|
|
@@ -2015,7 +2018,10 @@ const StickyPresetProduct = {
|
|
|
2015
2018
|
desktop: {
|
|
2016
2019
|
width: '100%'
|
|
2017
2020
|
}
|
|
2018
|
-
}
|
|
2021
|
+
},
|
|
2022
|
+
enableIcon: false,
|
|
2023
|
+
enablePrice: false,
|
|
2024
|
+
enableSeparator: false
|
|
2019
2025
|
},
|
|
2020
2026
|
advanced: {
|
|
2021
2027
|
'spacing-setting': {
|
|
@@ -3,7 +3,7 @@ import { jsx, jsxs } from 'react/jsx-runtime';
|
|
|
3
3
|
import { useEditorMode, globalEvent } from '@gem-sdk/core';
|
|
4
4
|
import { createStyle, createClass, createAttr, If } from '@gem-sdk/system';
|
|
5
5
|
import { getButtonAttributes } from './common/attributes.js';
|
|
6
|
-
import { getButtonStyles, getButtonIconStyles, getButtonWrapperStyles } from './common/styles.js';
|
|
6
|
+
import { getButtonStyles, getTypoStyles, getButtonIconStyles, getButtonWrapperStyles } from './common/styles.js';
|
|
7
7
|
import { getButtonClasses, getButtonIconClasses, getButtonLabelClasses, getButtonWrapperClasses, getButtonContentWrapperClasses } from './common/classes.js';
|
|
8
8
|
import ButtonIcon from './ButtonIcon.js';
|
|
9
9
|
import ButtonLabel from './ButtonLabel.js';
|
|
@@ -26,6 +26,9 @@ const Button = (props)=>{
|
|
|
26
26
|
const buttonStyles = createStyle({
|
|
27
27
|
...getButtonStyles(styles)
|
|
28
28
|
});
|
|
29
|
+
const buttonLabelStyles = createStyle({
|
|
30
|
+
...getTypoStyles(styles)
|
|
31
|
+
});
|
|
29
32
|
const buttonIconStyles = createStyle({
|
|
30
33
|
...getButtonIconStyles(styles, setting)
|
|
31
34
|
});
|
|
@@ -105,6 +108,7 @@ const Button = (props)=>{
|
|
|
105
108
|
})),
|
|
106
109
|
If(enableTextStyle && checkIsShowLabel(), /*#__PURE__*/ jsx(ButtonLabel, {
|
|
107
110
|
label: getLabelToDisplay(),
|
|
111
|
+
styles: buttonLabelStyles,
|
|
108
112
|
classes: buttonLabelClasses
|
|
109
113
|
}))
|
|
110
114
|
]
|
|
@@ -95,7 +95,7 @@ const Button = (props)=>{
|
|
|
95
95
|
style="${buttonStyles}"
|
|
96
96
|
class="${buttonClasses}"
|
|
97
97
|
>
|
|
98
|
-
${If(loading, ButtonLoadingIndicator, '')}
|
|
98
|
+
${If(loading, ButtonLoadingIndicator(), '')}
|
|
99
99
|
<div class="${buttonContentWrapperClasses}">
|
|
100
100
|
${If(isShowIcon, ButtonIcon({
|
|
101
101
|
iconSvg: iconSvg ?? '',
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { jsx } from 'react/jsx-runtime';
|
|
2
2
|
import 'react';
|
|
3
3
|
|
|
4
|
-
const ButtonLabel = ({ label, classes })=>{
|
|
4
|
+
const ButtonLabel = ({ label, styles, classes })=>{
|
|
5
5
|
return /*#__PURE__*/ jsx("div", {
|
|
6
6
|
"data-gp-text": true,
|
|
7
|
+
style: styles,
|
|
7
8
|
className: classes,
|
|
8
9
|
dangerouslySetInnerHTML: {
|
|
9
10
|
__html: label
|
|
@@ -12,8 +12,7 @@ const getButtonStyles = (styles)=>({
|
|
|
12
12
|
...getSizeStyles(styles),
|
|
13
13
|
...getRadiusStyles(styles),
|
|
14
14
|
...getShadowStyles(styles),
|
|
15
|
-
...getBackgroundStyles(styles)
|
|
16
|
-
...getTypoStyles(styles)
|
|
15
|
+
...getBackgroundStyles(styles)
|
|
17
16
|
});
|
|
18
17
|
const getButtonIconStyles = (styles, settings)=>{
|
|
19
18
|
return {
|
|
@@ -195,4 +194,4 @@ const generateBorderCornerStyles = ({ uid, device, borderBtn, roundedBtn, builde
|
|
|
195
194
|
};
|
|
196
195
|
};
|
|
197
196
|
|
|
198
|
-
export { generateBorderCornerStyles, getButtonIconStyles, getButtonStyles, getButtonWrapperStyles, getCustomCssStyles, getRadiusStyles, getShadowStyles, processDeviceHoverColor, processResponsiveHoverColors };
|
|
197
|
+
export { generateBorderCornerStyles, getButtonIconStyles, getButtonStyles, getButtonWrapperStyles, getCustomCssStyles, getRadiusStyles, getShadowStyles, getTypoStyles, processDeviceHoverColor, processResponsiveHoverColors };
|
|
@@ -19,7 +19,7 @@ const CarouselSettingsV2Setting = [
|
|
|
19
19
|
},
|
|
20
20
|
{
|
|
21
21
|
id: 'sneakPeak',
|
|
22
|
-
label: 'Sneak
|
|
22
|
+
label: 'Sneak peek',
|
|
23
23
|
type: 'sneak-peak',
|
|
24
24
|
devices: {
|
|
25
25
|
desktop: {
|
|
@@ -247,8 +247,7 @@ const CarouselSettingsV2Setting = [
|
|
|
247
247
|
{
|
|
248
248
|
id: 'arrowCustom',
|
|
249
249
|
type: 'icon',
|
|
250
|
-
|
|
251
|
-
hideLabel: true,
|
|
250
|
+
isHideClear: true,
|
|
252
251
|
default: `<svg data-name="arrow" width="20" height="20" viewBox="0 0 20 20" fill="currentColor" xmlns="http://www.w3.org/2000/svg">
|
|
253
252
|
<path fill-rule="evenodd" clip-rule="evenodd" d="M7.62204 5.13313C7.78476 4.95562 8.04858 4.95562 8.21129 5.13313L12.378 9.67859C12.5407 9.8561 12.5407 10.1439 12.378 10.3214L8.21129 14.8669C8.04858 15.0444 7.78476 15.0444 7.62204 14.8669C7.45932 14.6894 7.45932 14.4016 7.62204 14.224L11.4941 10L7.62204 5.77596C7.45932 5.59845 7.45932 5.31064 7.62204 5.13313Z"/>
|
|
254
253
|
</svg>
|
|
@@ -3,9 +3,6 @@ import { SUPPORT_COMPARE_PRICE_LAYOUTS, SEPARATOR } from './constants.js';
|
|
|
3
3
|
const checkIconVisibility = (styles)=>{
|
|
4
4
|
return styles?.enableIcon === true;
|
|
5
5
|
};
|
|
6
|
-
const shouldRenderPrice = (styles)=>{
|
|
7
|
-
return styles?.enablePrice;
|
|
8
|
-
};
|
|
9
6
|
const getRenderRegularPriceSettings = (setting)=>{
|
|
10
7
|
return {
|
|
11
8
|
lineThrough: false,
|
|
@@ -61,4 +58,4 @@ const isLayoutSupportComparePrice = (buttonLayout)=>{
|
|
|
61
58
|
return buttonLayout ? SUPPORT_COMPARE_PRICE_LAYOUTS.includes(buttonLayout) : false;
|
|
62
59
|
};
|
|
63
60
|
|
|
64
|
-
export { checkIconVisibility, getGPProductButtonState, getRenderComparePriceSettings, getRenderRegularPriceSettings, isLayoutSupportComparePrice, renderSeparator
|
|
61
|
+
export { checkIconVisibility, getGPProductButtonState, getRenderComparePriceSettings, getRenderRegularPriceSettings, isLayoutSupportComparePrice, renderSeparator };
|