@gem-sdk/components 2.0.0-dev.580 → 2.0.0-dev.582
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/image/setting/configs/settings.js +1 -1
- package/dist/cjs/image/setting/configs/uiV2.js +58 -0
- 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/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/image/setting/configs/settings.js +1 -1
- package/dist/esm/image/setting/configs/uiV2.js +58 -0
- 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/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
|
@@ -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 };
|
|
@@ -91,6 +91,64 @@ const SettingUIV2 = [
|
|
|
91
91
|
},
|
|
92
92
|
controls: [
|
|
93
93
|
{
|
|
94
|
+
conditionDisplay: 'isAdaptive === false',
|
|
95
|
+
setting: {
|
|
96
|
+
id: 'image'
|
|
97
|
+
},
|
|
98
|
+
layout: 'vertical',
|
|
99
|
+
options: {
|
|
100
|
+
updateFields: [
|
|
101
|
+
{
|
|
102
|
+
field: 'preload',
|
|
103
|
+
settingId: 'priority'
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
field: 'altText',
|
|
107
|
+
settingId: 'alt'
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
field: 'imageTitle',
|
|
111
|
+
settingId: 'title'
|
|
112
|
+
}
|
|
113
|
+
]
|
|
114
|
+
},
|
|
115
|
+
controlChangeTrigger: {
|
|
116
|
+
settings: [
|
|
117
|
+
{
|
|
118
|
+
action: {
|
|
119
|
+
controlId: 'priority',
|
|
120
|
+
valueFromField: 'preload',
|
|
121
|
+
groupType: 'setting',
|
|
122
|
+
controlType: 'setting',
|
|
123
|
+
removeDevice: true
|
|
124
|
+
}
|
|
125
|
+
},
|
|
126
|
+
{
|
|
127
|
+
action: {
|
|
128
|
+
controlId: 'alt',
|
|
129
|
+
valueFromField: 'altText',
|
|
130
|
+
groupType: 'setting',
|
|
131
|
+
controlType: 'setting',
|
|
132
|
+
removeDevice: true
|
|
133
|
+
}
|
|
134
|
+
},
|
|
135
|
+
{
|
|
136
|
+
action: {
|
|
137
|
+
controlId: 'title',
|
|
138
|
+
valueFromField: 'imageTitle',
|
|
139
|
+
groupType: 'setting',
|
|
140
|
+
controlType: 'setting',
|
|
141
|
+
removeDevice: true
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
],
|
|
145
|
+
options: {
|
|
146
|
+
noRecordHistory: true
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
},
|
|
150
|
+
{
|
|
151
|
+
conditionDisplay: 'isAdaptive === true',
|
|
94
152
|
setting: {
|
|
95
153
|
id: 'srcSet'
|
|
96
154
|
},
|
|
@@ -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 };
|
|
@@ -4,14 +4,14 @@ import { If } from '@gem-sdk/system';
|
|
|
4
4
|
import Separator from './Separator.js';
|
|
5
5
|
import BlankSpace from './BlankSpace.js';
|
|
6
6
|
|
|
7
|
-
const PriceLayout = ({ components, showSeparator, separator })=>{
|
|
7
|
+
const PriceLayout = ({ components, showPrice, showSeparator, separator })=>{
|
|
8
8
|
const separatorComponent = If(showSeparator, /*#__PURE__*/ jsx(Separator, {
|
|
9
9
|
separator: separator
|
|
10
10
|
}), /*#__PURE__*/ jsx(BlankSpace, {}));
|
|
11
11
|
return /*#__PURE__*/ jsxs(Fragment, {
|
|
12
12
|
children: [
|
|
13
13
|
separatorComponent,
|
|
14
|
-
components.map((component, index)=>/*#__PURE__*/ jsxs(React.Fragment, {
|
|
14
|
+
showPrice && components.map((component, index)=>/*#__PURE__*/ jsxs(React.Fragment, {
|
|
15
15
|
children: [
|
|
16
16
|
component,
|
|
17
17
|
index < components.length - 1 && /*#__PURE__*/ jsx(BlankSpace, {})
|
|
@@ -3,16 +3,16 @@ import Separator from './Separator.liquid.js';
|
|
|
3
3
|
import BlankSpace from './BlankSpace.liquid.js';
|
|
4
4
|
import { template } from '@gem-sdk/core';
|
|
5
5
|
|
|
6
|
-
const PriceLayout = ({ components, separator, showSeparator })=>{
|
|
6
|
+
const PriceLayout = ({ components, separator, showPrice, showSeparator })=>{
|
|
7
7
|
const separatorComponent = If(showSeparator, Separator({
|
|
8
8
|
separator
|
|
9
9
|
}), BlankSpace());
|
|
10
10
|
return template`
|
|
11
11
|
${separatorComponent}
|
|
12
|
-
${components.map((component, index)=>template`
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
12
|
+
${showPrice && components.map((component, index)=>template`
|
|
13
|
+
${component()}
|
|
14
|
+
${index < components.length - 1 ? BlankSpace() : ''}
|
|
15
|
+
`).join('')}
|
|
16
16
|
`;
|
|
17
17
|
};
|
|
18
18
|
|
|
@@ -2,14 +2,11 @@
|
|
|
2
2
|
import { jsx } from 'react/jsx-runtime';
|
|
3
3
|
import { PriceType } from '../common/types.js';
|
|
4
4
|
import 'react';
|
|
5
|
-
import {
|
|
5
|
+
import { getRenderRegularPriceSettings, getRenderComparePriceSettings, isLayoutSupportComparePrice } from '../common/helpers.js';
|
|
6
6
|
import PriceLayout from './PriceLayout.js';
|
|
7
7
|
import PriceComponent from './PriceComponent.js';
|
|
8
8
|
|
|
9
9
|
const ProductButtonPrice = ({ setting, styles })=>{
|
|
10
|
-
if (!shouldRenderPrice(styles)) {
|
|
11
|
-
return null;
|
|
12
|
-
}
|
|
13
10
|
const createPriceComponents = ({ includeCompare })=>{
|
|
14
11
|
const components = [
|
|
15
12
|
/*#__PURE__*/ jsx(PriceComponent, {
|
|
@@ -31,6 +28,7 @@ const ProductButtonPrice = ({ setting, styles })=>{
|
|
|
31
28
|
return /*#__PURE__*/ jsx(PriceLayout, {
|
|
32
29
|
components: components,
|
|
33
30
|
separator: setting?.separator,
|
|
31
|
+
showPrice: !!styles?.enablePrice,
|
|
34
32
|
showSeparator: !!styles?.enableSeparator
|
|
35
33
|
});
|
|
36
34
|
};
|
|
@@ -1,13 +1,10 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { PriceType } from '../common/types.js';
|
|
3
|
-
import {
|
|
3
|
+
import { getRenderComparePriceSettings, isLayoutSupportComparePrice, getRenderRegularPriceSettings } from '../common/helpers.js';
|
|
4
4
|
import PriceLayout from './PriceLayout.liquid.js';
|
|
5
5
|
import PriceComponent from './PriceComponent.liquid.js';
|
|
6
6
|
|
|
7
7
|
const ProductButtonPrice = ({ setting, styles })=>{
|
|
8
|
-
if (!shouldRenderPrice(styles)) {
|
|
9
|
-
return '';
|
|
10
|
-
}
|
|
11
8
|
const createPriceComponents = ({ includeCompare })=>{
|
|
12
9
|
const components = [
|
|
13
10
|
()=>PriceComponent({
|
|
@@ -29,6 +26,7 @@ const ProductButtonPrice = ({ setting, styles })=>{
|
|
|
29
26
|
return PriceLayout({
|
|
30
27
|
components,
|
|
31
28
|
separator: setting?.separator,
|
|
29
|
+
showPrice: !!styles?.enablePrice,
|
|
32
30
|
showSeparator: !!styles?.enableSeparator
|
|
33
31
|
});
|
|
34
32
|
};
|
|
@@ -4,6 +4,7 @@ import { getSeparatorStyle } from '../common/styles.js';
|
|
|
4
4
|
|
|
5
5
|
const Separator = ({ separator })=>{
|
|
6
6
|
return /*#__PURE__*/ jsx("div", {
|
|
7
|
+
className: "group-data-[state=loading]:gp-invisible data-[hidden=true]:gp-hidden",
|
|
7
8
|
style: getSeparatorStyle(),
|
|
8
9
|
dangerouslySetInnerHTML: {
|
|
9
10
|
__html: renderSeparator(separator)
|
|
@@ -61,12 +61,6 @@ const ProductButtonSettings = [
|
|
|
61
61
|
value: 'cart-icon',
|
|
62
62
|
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>`,
|
|
63
63
|
icon: true
|
|
64
|
-
},
|
|
65
|
-
{
|
|
66
|
-
id: 'icon-only',
|
|
67
|
-
value: 'icon-only',
|
|
68
|
-
name: `<div class="h-40 w-[200px] rounded-medium bg-dark-200 p-10 flex items-center justify-center gap-4">${cartIcon}</div>`,
|
|
69
|
-
icon: true
|
|
70
64
|
}
|
|
71
65
|
]
|
|
72
66
|
},
|
|
@@ -176,16 +170,16 @@ const ProductButtonSettings = [
|
|
|
176
170
|
{
|
|
177
171
|
id: 'successMessage',
|
|
178
172
|
type: 'textarea',
|
|
179
|
-
label: 'Success
|
|
180
|
-
minHeight:
|
|
173
|
+
label: 'Success',
|
|
174
|
+
minHeight: 58,
|
|
181
175
|
default: 'Add product to cart successfully',
|
|
182
176
|
autoHeight: true
|
|
183
177
|
},
|
|
184
178
|
{
|
|
185
179
|
id: 'errorMessage',
|
|
186
180
|
type: 'textarea',
|
|
187
|
-
label: 'Error
|
|
188
|
-
minHeight:
|
|
181
|
+
label: 'Error',
|
|
182
|
+
minHeight: 58,
|
|
189
183
|
default: 'Cannot add product to cart',
|
|
190
184
|
autoHeight: true
|
|
191
185
|
},
|
|
@@ -193,7 +187,7 @@ const ProductButtonSettings = [
|
|
|
193
187
|
id: 'variantSelectionRequiredMessage',
|
|
194
188
|
type: 'textarea',
|
|
195
189
|
label: 'Error Message',
|
|
196
|
-
minHeight:
|
|
190
|
+
minHeight: 78,
|
|
197
191
|
default: 'Please select a variant to add product to cart',
|
|
198
192
|
autoHeight: true
|
|
199
193
|
}
|
|
@@ -539,14 +533,14 @@ const ProductButtonSettings = [
|
|
|
539
533
|
devices: {
|
|
540
534
|
desktop: {
|
|
541
535
|
default: {
|
|
542
|
-
hover: '
|
|
536
|
+
hover: 'text-3'
|
|
543
537
|
}
|
|
544
538
|
}
|
|
545
539
|
},
|
|
546
540
|
compoDefaultValue: {
|
|
547
541
|
desktop: {
|
|
548
542
|
default: {
|
|
549
|
-
hover: '
|
|
543
|
+
hover: 'text-3'
|
|
550
544
|
}
|
|
551
545
|
}
|
|
552
546
|
}
|
|
@@ -578,14 +572,14 @@ const ProductButtonSettings = [
|
|
|
578
572
|
devices: {
|
|
579
573
|
desktop: {
|
|
580
574
|
default: {
|
|
581
|
-
normal: '
|
|
575
|
+
normal: 'text-3'
|
|
582
576
|
}
|
|
583
577
|
}
|
|
584
578
|
},
|
|
585
579
|
compoDefaultValue: {
|
|
586
580
|
desktop: {
|
|
587
581
|
default: {
|
|
588
|
-
normal: '
|
|
582
|
+
normal: 'text-3'
|
|
589
583
|
}
|
|
590
584
|
}
|
|
591
585
|
}
|
|
@@ -720,19 +714,22 @@ const ProductButtonSettings = [
|
|
|
720
714
|
label: 'Left',
|
|
721
715
|
value: 'left',
|
|
722
716
|
type: 'align',
|
|
723
|
-
tooltip: 'Align left'
|
|
717
|
+
tooltip: 'Align left',
|
|
718
|
+
iconName: 'gp-align-left'
|
|
724
719
|
},
|
|
725
720
|
{
|
|
726
721
|
label: 'Center',
|
|
727
722
|
value: 'center',
|
|
728
723
|
type: 'align',
|
|
729
|
-
tooltip: 'Align center'
|
|
724
|
+
tooltip: 'Align center',
|
|
725
|
+
iconName: 'gp-align-center'
|
|
730
726
|
},
|
|
731
727
|
{
|
|
732
728
|
label: 'Right',
|
|
733
729
|
value: 'right',
|
|
734
730
|
type: 'align',
|
|
735
|
-
tooltip: 'Align right'
|
|
731
|
+
tooltip: 'Align right',
|
|
732
|
+
iconName: 'gp-align-right'
|
|
736
733
|
}
|
|
737
734
|
],
|
|
738
735
|
devices: {
|
|
@@ -764,12 +761,12 @@ const ProductButtonSettings = [
|
|
|
764
761
|
{
|
|
765
762
|
id: 'enablePrice',
|
|
766
763
|
type: 'toggle',
|
|
767
|
-
default:
|
|
764
|
+
default: false
|
|
768
765
|
},
|
|
769
766
|
{
|
|
770
767
|
id: 'enableSeparator',
|
|
771
768
|
type: 'toggle',
|
|
772
|
-
default:
|
|
769
|
+
default: false
|
|
773
770
|
},
|
|
774
771
|
{
|
|
775
772
|
id: 'enableTextStyle',
|