@gem-sdk/components 2.0.0-dev.384 → 2.0.0-dev.386
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/icon/setting/configs/settings.js +5 -2
- package/dist/cjs/icon-list-hoz/components/common/getStyle.js +5 -0
- package/dist/cjs/icon-list-hoz/setting/configs/settings.js +1 -1
- package/dist/cjs/icon-list-hoz/setting/configs/uiV2.js +44 -0
- package/dist/cjs/product/components/ProductBadge/common/getStyles.js +3 -2
- package/dist/cjs/product/components/ProductProperties/ProductProperties.liquid.js +1 -1
- package/dist/cjs/product/components/ProductProperties/ProductPropertyInput/common/getStyles.js +2 -2
- package/dist/cjs/product/components/ProductProperties/ProductPropertySelect/common/getStyles.js +2 -2
- package/dist/cjs/product/components/ProductProperties/common/getAttrs.js +2 -2
- package/dist/cjs/product/components/ProductQuantity/common/getStyles.js +19 -16
- package/dist/cjs/product/components/ProductQuantity/index.js +5 -3
- package/dist/cjs/product/setting/product-badge/configs/settings.js +8 -4
- package/dist/cjs/product/setting/product-badge/configs/uiV2.js +3 -3
- package/dist/cjs/product/setting/product-properties/configs/settingsV2.js +5 -20
- package/dist/cjs/product/setting/product-properties/configs/uiV2.js +169 -6
- package/dist/cjs/product/setting/product-quantity/configs/settings.js +48 -28
- package/dist/cjs/product/setting/product-quantity/configs/uiV2.js +54 -19
- package/dist/esm/icon/setting/configs/settings.js +5 -2
- package/dist/esm/icon-list-hoz/components/common/getStyle.js +6 -1
- package/dist/esm/icon-list-hoz/setting/configs/settings.js +1 -1
- package/dist/esm/icon-list-hoz/setting/configs/uiV2.js +44 -0
- package/dist/esm/product/components/ProductBadge/common/getStyles.js +3 -2
- package/dist/esm/product/components/ProductProperties/ProductProperties.liquid.js +1 -1
- package/dist/esm/product/components/ProductProperties/ProductPropertyInput/common/getStyles.js +3 -3
- package/dist/esm/product/components/ProductProperties/ProductPropertySelect/common/getStyles.js +3 -3
- package/dist/esm/product/components/ProductProperties/common/getAttrs.js +2 -2
- package/dist/esm/product/components/ProductQuantity/common/getStyles.js +20 -17
- package/dist/esm/product/components/ProductQuantity/index.js +5 -3
- package/dist/esm/product/setting/product-badge/configs/settings.js +8 -4
- package/dist/esm/product/setting/product-badge/configs/uiV2.js +3 -3
- package/dist/esm/product/setting/product-properties/configs/settingsV2.js +5 -20
- package/dist/esm/product/setting/product-properties/configs/uiV2.js +169 -6
- package/dist/esm/product/setting/product-quantity/configs/settings.js +48 -28
- package/dist/esm/product/setting/product-quantity/configs/uiV2.js +54 -19
- package/dist/types/index.d.ts +4 -3
- package/package.json +2 -2
|
@@ -216,37 +216,32 @@ const ProductQuantitySettings = [
|
|
|
216
216
|
id: 'typo',
|
|
217
217
|
type: 'typography-v2',
|
|
218
218
|
default: {
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
219
|
+
type: 'paragraph-1',
|
|
220
|
+
attrs: {
|
|
221
|
+
color: '#121212'
|
|
222
|
+
},
|
|
223
|
+
custom: {
|
|
224
|
+
fontSize: {
|
|
225
|
+
desktop: '16px',
|
|
226
|
+
tablet: '16px',
|
|
227
|
+
mobile: '14px'
|
|
228
|
+
},
|
|
229
|
+
lineHeight: {
|
|
230
|
+
desktop: '120%',
|
|
231
|
+
tablet: '180%',
|
|
232
|
+
mobile: '180%'
|
|
233
|
+
},
|
|
234
|
+
fontWeight: '400',
|
|
235
|
+
fontFamily: {
|
|
236
|
+
value: 'Assistant',
|
|
237
|
+
type: 'google'
|
|
223
238
|
},
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
tablet: '16px',
|
|
228
|
-
mobile: '14px'
|
|
229
|
-
},
|
|
230
|
-
lineHeight: {
|
|
231
|
-
desktop: '120%',
|
|
232
|
-
tablet: '180%',
|
|
233
|
-
mobile: '180%'
|
|
234
|
-
},
|
|
235
|
-
fontWeight: '400',
|
|
236
|
-
fontFamily: {
|
|
237
|
-
value: 'Assistant',
|
|
238
|
-
type: 'google'
|
|
239
|
-
},
|
|
240
|
-
textShadow: {
|
|
241
|
-
type: 'none'
|
|
242
|
-
}
|
|
239
|
+
hasShadowText: false,
|
|
240
|
+
textShadow: {
|
|
241
|
+
enable: false
|
|
243
242
|
}
|
|
244
243
|
}
|
|
245
244
|
},
|
|
246
|
-
state: {
|
|
247
|
-
normal: true,
|
|
248
|
-
hover: true
|
|
249
|
-
},
|
|
250
245
|
ignoreReRender: true,
|
|
251
246
|
hiddenSetting: {
|
|
252
247
|
transform: true,
|
|
@@ -413,7 +408,32 @@ const ProductQuantitySettings = [
|
|
|
413
408
|
}
|
|
414
409
|
},
|
|
415
410
|
{
|
|
416
|
-
id: '
|
|
411
|
+
id: 'buttonBoxShadow',
|
|
412
|
+
type: 'shadow-v2',
|
|
413
|
+
devices: {
|
|
414
|
+
desktop: {
|
|
415
|
+
default: {
|
|
416
|
+
normal: {}
|
|
417
|
+
}
|
|
418
|
+
}
|
|
419
|
+
},
|
|
420
|
+
compoDefaultValue: {
|
|
421
|
+
desktop: {
|
|
422
|
+
default: {
|
|
423
|
+
normal: {
|
|
424
|
+
type: 'shadow-1',
|
|
425
|
+
distance: '4px',
|
|
426
|
+
blur: '4px',
|
|
427
|
+
spread: '0px',
|
|
428
|
+
color: '#121212',
|
|
429
|
+
angle: 90
|
|
430
|
+
}
|
|
431
|
+
}
|
|
432
|
+
}
|
|
433
|
+
}
|
|
434
|
+
},
|
|
435
|
+
{
|
|
436
|
+
id: 'inputBoxShadow',
|
|
417
437
|
type: 'shadow-v2',
|
|
418
438
|
devices: {
|
|
419
439
|
desktop: {
|
|
@@ -273,7 +273,7 @@ const SettingUIV2 = [
|
|
|
273
273
|
en: 'Shadow'
|
|
274
274
|
},
|
|
275
275
|
setting: {
|
|
276
|
-
id: '
|
|
276
|
+
id: 'buttonBoxShadow',
|
|
277
277
|
state: 'hover'
|
|
278
278
|
}
|
|
279
279
|
}
|
|
@@ -307,15 +307,14 @@ const SettingUIV2 = [
|
|
|
307
307
|
controls: [
|
|
308
308
|
{
|
|
309
309
|
setting: {
|
|
310
|
-
id: 'typo'
|
|
311
|
-
state: 'normal'
|
|
310
|
+
id: 'typo'
|
|
312
311
|
},
|
|
313
312
|
layout: 'vertical',
|
|
314
313
|
options: {
|
|
315
314
|
updateFields: [
|
|
316
315
|
{
|
|
317
316
|
field: 'attrs.color',
|
|
318
|
-
settingId: '
|
|
317
|
+
settingId: 'textColor',
|
|
319
318
|
state: 'normal'
|
|
320
319
|
}
|
|
321
320
|
]
|
|
@@ -324,7 +323,7 @@ const SettingUIV2 = [
|
|
|
324
323
|
settings: [
|
|
325
324
|
{
|
|
326
325
|
action: {
|
|
327
|
-
controlId: '
|
|
326
|
+
controlId: 'textColor',
|
|
328
327
|
valueFromField: 'attrs.color',
|
|
329
328
|
groupType: 'style',
|
|
330
329
|
controlType: 'style',
|
|
@@ -394,13 +393,9 @@ const SettingUIV2 = [
|
|
|
394
393
|
label: {
|
|
395
394
|
en: 'Text color'
|
|
396
395
|
},
|
|
397
|
-
|
|
398
|
-
id: '
|
|
399
|
-
|
|
400
|
-
linkWithSetting: {
|
|
401
|
-
name: 'typo',
|
|
402
|
-
field: 'hover.attrs.color'
|
|
403
|
-
}
|
|
396
|
+
setting: {
|
|
397
|
+
id: 'textColor',
|
|
398
|
+
state: 'hover'
|
|
404
399
|
}
|
|
405
400
|
},
|
|
406
401
|
{
|
|
@@ -436,13 +431,9 @@ const SettingUIV2 = [
|
|
|
436
431
|
label: {
|
|
437
432
|
en: 'Shadow'
|
|
438
433
|
},
|
|
439
|
-
|
|
440
|
-
id: '
|
|
441
|
-
|
|
442
|
-
linkWithSetting: {
|
|
443
|
-
name: 'typo',
|
|
444
|
-
field: 'hover.attrs.textShadow'
|
|
445
|
-
}
|
|
434
|
+
setting: {
|
|
435
|
+
id: 'inputBoxShadow',
|
|
436
|
+
state: 'hover'
|
|
446
437
|
}
|
|
447
438
|
}
|
|
448
439
|
]
|
|
@@ -531,6 +522,50 @@ const SettingUIV2 = [
|
|
|
531
522
|
setting: {
|
|
532
523
|
id: 'boxShadow',
|
|
533
524
|
state: 'normal'
|
|
525
|
+
},
|
|
526
|
+
options: {
|
|
527
|
+
updateFields: [
|
|
528
|
+
{
|
|
529
|
+
field: 'normal.enable',
|
|
530
|
+
settingId: 'advanced.hasBoxShadow',
|
|
531
|
+
state: 'normal'
|
|
532
|
+
}
|
|
533
|
+
]
|
|
534
|
+
},
|
|
535
|
+
controlChangeTrigger: {
|
|
536
|
+
settings: [
|
|
537
|
+
{
|
|
538
|
+
condition: `boxShadow.normal.enable === true`,
|
|
539
|
+
source: [
|
|
540
|
+
'boxShadow',
|
|
541
|
+
'hasBoxShadow'
|
|
542
|
+
],
|
|
543
|
+
action: {
|
|
544
|
+
controlId: 'hasBoxShadow',
|
|
545
|
+
groupType: 'advanced',
|
|
546
|
+
controlType: 'advanced',
|
|
547
|
+
state: 'normal',
|
|
548
|
+
newValue: true
|
|
549
|
+
}
|
|
550
|
+
},
|
|
551
|
+
{
|
|
552
|
+
condition: `boxShadow.normal.enable === false`,
|
|
553
|
+
source: [
|
|
554
|
+
'boxShadow',
|
|
555
|
+
'hasBoxShadow'
|
|
556
|
+
],
|
|
557
|
+
action: {
|
|
558
|
+
controlId: 'hasBoxShadow',
|
|
559
|
+
groupType: 'advanced',
|
|
560
|
+
controlType: 'advanced',
|
|
561
|
+
state: 'normal',
|
|
562
|
+
newValue: false
|
|
563
|
+
}
|
|
564
|
+
}
|
|
565
|
+
],
|
|
566
|
+
options: {
|
|
567
|
+
noRecordHistory: true
|
|
568
|
+
}
|
|
534
569
|
}
|
|
535
570
|
}
|
|
536
571
|
]
|
|
@@ -114,7 +114,9 @@ const IconSettings = [
|
|
|
114
114
|
type: 'shadow-v2',
|
|
115
115
|
devices: {
|
|
116
116
|
desktop: {
|
|
117
|
-
default: {
|
|
117
|
+
default: {
|
|
118
|
+
enable: false
|
|
119
|
+
}
|
|
118
120
|
}
|
|
119
121
|
},
|
|
120
122
|
compoDefaultValue: {
|
|
@@ -125,7 +127,8 @@ const IconSettings = [
|
|
|
125
127
|
blur: '12px',
|
|
126
128
|
spread: '0px',
|
|
127
129
|
color: 'rgba(18, 18, 18, 0.2)',
|
|
128
|
-
angle: 45
|
|
130
|
+
angle: 45,
|
|
131
|
+
enable: true
|
|
129
132
|
}
|
|
130
133
|
}
|
|
131
134
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { getStyleBackgroundByDevice, makeStyle, makeStyleResponsive } from '@gem-sdk/core';
|
|
1
|
+
import { getStyleBackgroundByDevice, getGradientBgrStyleByDevice, makeStyle, makeStyleResponsive } from '@gem-sdk/core';
|
|
2
2
|
|
|
3
3
|
function filterTruthyStyles(styles) {
|
|
4
4
|
return Object.fromEntries(Object.entries(styles || {}).filter(([, value])=>!!value));
|
|
@@ -8,6 +8,11 @@ const getWrapperStyle = (style, background)=>{
|
|
|
8
8
|
...style,
|
|
9
9
|
...getStyleBackgroundByDevice(background, {
|
|
10
10
|
liquid: true
|
|
11
|
+
}),
|
|
12
|
+
...getGradientBgrStyleByDevice(background, {
|
|
13
|
+
desktop: true,
|
|
14
|
+
tablet: true,
|
|
15
|
+
mobile: true
|
|
11
16
|
})
|
|
12
17
|
};
|
|
13
18
|
return filterTruthyStyles(composeStyles);
|
|
@@ -77,6 +77,50 @@ const SettingUIV2 = [
|
|
|
77
77
|
setting: {
|
|
78
78
|
id: 'boxShadow',
|
|
79
79
|
state: 'normal'
|
|
80
|
+
},
|
|
81
|
+
options: {
|
|
82
|
+
updateFields: [
|
|
83
|
+
{
|
|
84
|
+
field: 'enable',
|
|
85
|
+
settingId: 'advanced.hasBoxShadow',
|
|
86
|
+
state: 'normal'
|
|
87
|
+
}
|
|
88
|
+
]
|
|
89
|
+
},
|
|
90
|
+
controlChangeTrigger: {
|
|
91
|
+
settings: [
|
|
92
|
+
{
|
|
93
|
+
condition: `boxShadow.normal.enable === true`,
|
|
94
|
+
source: [
|
|
95
|
+
'boxShadow',
|
|
96
|
+
'hasBoxShadow'
|
|
97
|
+
],
|
|
98
|
+
action: {
|
|
99
|
+
controlId: 'hasBoxShadow',
|
|
100
|
+
groupType: 'advanced',
|
|
101
|
+
controlType: 'advanced',
|
|
102
|
+
state: 'normal',
|
|
103
|
+
newValue: true
|
|
104
|
+
}
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
condition: `boxShadow.normal.enable === false`,
|
|
108
|
+
source: [
|
|
109
|
+
'boxShadow',
|
|
110
|
+
'hasBoxShadow'
|
|
111
|
+
],
|
|
112
|
+
action: {
|
|
113
|
+
controlId: 'hasBoxShadow',
|
|
114
|
+
groupType: 'advanced',
|
|
115
|
+
controlType: 'advanced',
|
|
116
|
+
state: 'normal',
|
|
117
|
+
newValue: false
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
],
|
|
121
|
+
options: {
|
|
122
|
+
noRecordHistory: true
|
|
123
|
+
}
|
|
80
124
|
}
|
|
81
125
|
}
|
|
82
126
|
]
|
|
@@ -52,7 +52,7 @@ const getTextContentStyle = ({ styles, setting })=>{
|
|
|
52
52
|
...getStyleShadow({
|
|
53
53
|
value: styles?.typo?.custom?.textShadow,
|
|
54
54
|
styleAppliedFor: 'text-shadow',
|
|
55
|
-
isEnableShadow: styles?.typo?.custom?.
|
|
55
|
+
isEnableShadow: styles?.typo?.custom?.hasShadowText
|
|
56
56
|
}),
|
|
57
57
|
...getStyleBackground(!!shape?.backgroundColorInText, styles?.badgeColorV2),
|
|
58
58
|
...textBadgePadding
|
|
@@ -85,7 +85,8 @@ const getTextBadgeWrapperStyles = ({ styles, setting })=>{
|
|
|
85
85
|
...cornerStyles,
|
|
86
86
|
...composeShapeStyleByPosition(shape, styles?.position, isDropOutsideProductImage),
|
|
87
87
|
...getStyleBackground(!shape?.backgroundColorInText, styles?.badgeColorV2),
|
|
88
|
-
...paddingShape
|
|
88
|
+
...paddingShape,
|
|
89
|
+
height: shape?.ratio === 1 ? '0px' : '100%'
|
|
89
90
|
};
|
|
90
91
|
};
|
|
91
92
|
const getImageContainerStyles = ({ styles, setting })=>{
|
|
@@ -55,7 +55,7 @@ const ProductProperties = ({ setting, styles, builderProps, advanced, pageContex
|
|
|
55
55
|
}} class="${liquidTagClasses}"
|
|
56
56
|
style="${wrapperStyles}"
|
|
57
57
|
>
|
|
58
|
-
${RenderIf(isDisplayLabel, `<div class="${labelWrapperClasses}">
|
|
58
|
+
${RenderIf(isDisplayLabel, template`<div class="${labelWrapperClasses}">
|
|
59
59
|
<label htmlFor="${uniqId}-${name}" class="${labelClasses}" style="${labelStyles}}">
|
|
60
60
|
${displayLabel}
|
|
61
61
|
<span style="${labelContentStyles}">${labelContent}</span>
|
package/dist/esm/product/components/ProductProperties/ProductPropertyInput/common/getStyles.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { composeTypographyStyle, makeStyleResponsive, makeWidth, handleConvertBorderStyle, handleConvertBorderWidth, handleConvertBorderColor, getGlobalColorStateResponsiveStyle, getGlobalColorStateStyle, composeRadius,
|
|
1
|
+
import { composeTypographyStyle, makeStyleResponsive, makeWidth, handleConvertBorderStyle, handleConvertBorderWidth, handleConvertBorderColor, getGlobalColorStateResponsiveStyle, getGlobalColorStateStyle, composeRadius, getStyleShadowState } from '@gem-sdk/core';
|
|
2
2
|
|
|
3
3
|
const getStyles = (styles)=>{
|
|
4
|
-
const { valueBgColor, valueTextColor, valueTypography, valueTypo, fullWidth, width, height, borderInput, borderRadius, shadowInput } = styles ?? {};
|
|
4
|
+
const { valueBgColor, valueTextColor, valueTypography, valueTypo, fullWidth, width, height, borderInput, borderRadius, hasShadowInput, shadowInput } = styles ?? {};
|
|
5
5
|
const appendTypoStyle = composeTypographyStyle(valueTypo, valueTypography);
|
|
6
6
|
const widthStyle = makeStyleResponsive('w', makeWidth(width, fullWidth));
|
|
7
7
|
const heightStyle = height ? makeStyleResponsive('h', height) : {};
|
|
@@ -14,7 +14,7 @@ const getStyles = (styles)=>{
|
|
|
14
14
|
...getGlobalColorStateStyle('c', valueTextColor),
|
|
15
15
|
...heightStyle,
|
|
16
16
|
...composeRadius(borderRadius),
|
|
17
|
-
...
|
|
17
|
+
...getStyleShadowState(shadowInput, 'box-shadow', hasShadowInput),
|
|
18
18
|
...appendTypoStyle
|
|
19
19
|
};
|
|
20
20
|
};
|
package/dist/esm/product/components/ProductProperties/ProductPropertySelect/common/getStyles.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { makeStyleResponsive, makeWidth, handleConvertBorderStyle, handleConvertBorderWidth, handleConvertBorderColor, composeRadius,
|
|
1
|
+
import { makeStyleResponsive, makeWidth, handleConvertBorderStyle, handleConvertBorderWidth, handleConvertBorderColor, composeRadius, getStyleShadowState, composeTypographyStyle, getGlobalColorStateResponsiveStyle, getGlobalColorStateStyle } from '@gem-sdk/core';
|
|
2
2
|
|
|
3
3
|
const getSelectStyles = (styles)=>{
|
|
4
|
-
const { fullWidth, width, height, borderInput, borderRadius, shadowInput } = styles ?? {};
|
|
4
|
+
const { fullWidth, width, height, borderInput, borderRadius, hasShadowInput, shadowInput } = styles ?? {};
|
|
5
5
|
const widthStyle = makeStyleResponsive('w', makeWidth(width, fullWidth));
|
|
6
6
|
const heightStyle = height ? makeStyleResponsive('h', height) : {};
|
|
7
7
|
return {
|
|
@@ -11,7 +11,7 @@ const getSelectStyles = (styles)=>{
|
|
|
11
11
|
...handleConvertBorderWidth(borderInput),
|
|
12
12
|
...handleConvertBorderColor(borderInput),
|
|
13
13
|
...composeRadius(borderRadius),
|
|
14
|
-
...
|
|
14
|
+
...getStyleShadowState(shadowInput, 'box-shadow', hasShadowInput)
|
|
15
15
|
};
|
|
16
16
|
};
|
|
17
17
|
const getOptionStyles = (styles)=>{
|
|
@@ -5,13 +5,13 @@ const getWrapperLiquidAttrs = (uniqId, pageContext, setting)=>{
|
|
|
5
5
|
return {
|
|
6
6
|
'data-id': uniqId ?? '',
|
|
7
7
|
'data-invalid': false,
|
|
8
|
-
'data-gp-setting': JSON.stringify(setting).replaceAll("
|
|
8
|
+
'data-gp-setting': JSON.stringify(setting).replaceAll(`"`, '"'),
|
|
9
9
|
'data-translate-setting': JSON.stringify({
|
|
10
10
|
requiredMessage: requiredMessageDisplay,
|
|
11
11
|
invalidEmailMessage: invalidEmailMessageDisplay,
|
|
12
12
|
invalidLengthMessage: invalidLengthMessageDisplay,
|
|
13
13
|
invalidNumberMessage: invalidNumberMessageDisplay
|
|
14
|
-
})
|
|
14
|
+
}).replaceAll(`"`, '"')
|
|
15
15
|
};
|
|
16
16
|
};
|
|
17
17
|
const getWrapperTSXAttrs = (uniqId, currentProductId)=>{
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { composeTypographyStyle,
|
|
1
|
+
import { composeTypographyStyle, getResponsiveStyleShadow, makeStyle, getGlobalColorStateStyle, handleConvertBorderStyle, handleConvertInputBorderWidth, handleConvertInputBorderColor, getStyleShadow, makeStyleResponsive, handleConvertBorderWidth, handleConvertBorderColor, composeRadius, makeStyleResponsiveState } from '@gem-sdk/core';
|
|
2
2
|
|
|
3
3
|
const addPxToValues = (input)=>Object.fromEntries(Object.entries(input).map(([device, states])=>[
|
|
4
4
|
device,
|
|
@@ -34,16 +34,19 @@ const getInputBorderRadius = ({ qtyStyle, corner })=>{
|
|
|
34
34
|
};
|
|
35
35
|
const getInputStyle = (props)=>{
|
|
36
36
|
const { styles, setting } = props;
|
|
37
|
-
const { borderBtn, inputBackgroundColor, textColor, dividerColor, dividerStroke, corner } = styles ?? {};
|
|
37
|
+
const { borderBtn, inputBackgroundColor, textColor, dividerColor, dividerStroke, corner, inputBoxShadow } = styles ?? {};
|
|
38
38
|
const { qtyStyle } = setting ?? {};
|
|
39
|
-
const appendTypoStyle = composeTypographyStyle(styles?.typo
|
|
40
|
-
const appendTypoHover = composeTypoHover(styles?.typo?.hover?.attrs);
|
|
39
|
+
const appendTypoStyle = composeTypographyStyle(styles?.typo, styles?.typography);
|
|
41
40
|
const dividerWidth = getDividerWidth(dividerStroke);
|
|
42
41
|
const dividerColorStyle = getDividerColorStyle(dividerColor);
|
|
42
|
+
const styleShadow = getResponsiveStyleShadow(inputBoxShadow, 'box-shadow', {
|
|
43
|
+
desktop: inputBoxShadow?.desktop ?? {},
|
|
44
|
+
tablet: inputBoxShadow?.tablet ?? inputBoxShadow?.desktop ?? {},
|
|
45
|
+
mobile: inputBoxShadow?.mobile ?? inputBoxShadow?.tablet ?? inputBoxShadow?.desktop ?? {}
|
|
46
|
+
});
|
|
43
47
|
return {
|
|
44
48
|
...makeStyle({}),
|
|
45
49
|
...appendTypoStyle,
|
|
46
|
-
...appendTypoHover,
|
|
47
50
|
...getGlobalColorStateStyle('bg', inputBackgroundColor),
|
|
48
51
|
...getGlobalColorStateStyle('c', textColor),
|
|
49
52
|
...handleConvertBorderStyle(borderBtn),
|
|
@@ -52,21 +55,15 @@ const getInputStyle = (props)=>{
|
|
|
52
55
|
...qtyStyle === 'standard' ? dividerWidth : {},
|
|
53
56
|
...dividerColorStyle,
|
|
54
57
|
...getStyleShadow({
|
|
55
|
-
value: styles?.typo?.
|
|
58
|
+
value: styles?.typo?.custom?.textShadow,
|
|
56
59
|
styleAppliedFor: 'text-shadow',
|
|
57
|
-
isEnableShadow: styles?.typo?.
|
|
58
|
-
state: 'normal'
|
|
59
|
-
}),
|
|
60
|
-
...getStyleShadow({
|
|
61
|
-
value: styles?.typo?.hover?.attrs?.textShadow,
|
|
62
|
-
styleAppliedFor: 'text-shadow',
|
|
63
|
-
isEnableShadow: styles?.typo?.normal?.custom?.textShadow?.type !== 'none',
|
|
64
|
-
state: 'hover'
|
|
60
|
+
isEnableShadow: styles?.typo?.custom?.hasShadowText
|
|
65
61
|
}),
|
|
66
62
|
...getInputBorderRadius({
|
|
67
63
|
qtyStyle,
|
|
68
64
|
corner
|
|
69
|
-
})
|
|
65
|
+
}),
|
|
66
|
+
...styleShadow
|
|
70
67
|
};
|
|
71
68
|
};
|
|
72
69
|
const getDeviceRadius = (device, buttonSide, corner)=>{
|
|
@@ -91,7 +88,12 @@ const getDeviceRadius = (device, buttonSide, corner)=>{
|
|
|
91
88
|
}
|
|
92
89
|
};
|
|
93
90
|
};
|
|
94
|
-
const getButtonStyle = ({ borderBtn, buttonWidth, buttonBackgroundColor, iconColor, corner, buttonSide })=>{
|
|
91
|
+
const getButtonStyle = ({ borderBtn, buttonWidth, buttonBackgroundColor, iconColor, corner, buttonSide, buttonBoxShadow })=>{
|
|
92
|
+
const styleShadow = getResponsiveStyleShadow(buttonBoxShadow, 'box-shadow', {
|
|
93
|
+
desktop: buttonBoxShadow?.desktop ?? {},
|
|
94
|
+
tablet: buttonBoxShadow?.tablet ?? buttonBoxShadow?.desktop ?? {},
|
|
95
|
+
mobile: buttonBoxShadow?.mobile ?? buttonBoxShadow?.tablet ?? buttonBoxShadow?.desktop ?? {}
|
|
96
|
+
});
|
|
95
97
|
return {
|
|
96
98
|
...makeStyleResponsive('w', buttonWidth),
|
|
97
99
|
...getGlobalColorStateStyle('bg', buttonBackgroundColor),
|
|
@@ -103,7 +105,8 @@ const getButtonStyle = ({ borderBtn, buttonWidth, buttonBackgroundColor, iconCol
|
|
|
103
105
|
...getDeviceRadius('desktop', buttonSide, corner),
|
|
104
106
|
...getDeviceRadius('tablet', buttonSide, corner),
|
|
105
107
|
...getDeviceRadius('mobile', buttonSide, corner)
|
|
106
|
-
})
|
|
108
|
+
}),
|
|
109
|
+
...styleShadow
|
|
107
110
|
};
|
|
108
111
|
};
|
|
109
112
|
const getContainerStyles = ({ inputHeight, align })=>{
|
|
@@ -15,7 +15,7 @@ const ProductQuantity = (props)=>{
|
|
|
15
15
|
const { isInStock, ref } = useProductQuantity(props);
|
|
16
16
|
const { qtyStyle, plusIcon, minusIcon } = setting;
|
|
17
17
|
const defaultQty = setting.defaultQtyValue || 1;
|
|
18
|
-
const { inputHeight, buttonBackgroundColor, backgroundColor, iconColor, inputBackgroundColor, textColor, align, borderBtn, buttonWidth, iconSizeCustom, corner } = styles;
|
|
18
|
+
const { inputHeight, buttonBackgroundColor, backgroundColor, iconColor, inputBackgroundColor, textColor, align, borderBtn, buttonWidth, iconSizeCustom, corner, buttonBoxShadow } = styles;
|
|
19
19
|
const containerAttrs = createAttr({
|
|
20
20
|
...getContainerAttrs({
|
|
21
21
|
isDisabled: !isInStock,
|
|
@@ -76,7 +76,8 @@ const ProductQuantity = (props)=>{
|
|
|
76
76
|
buttonBackgroundColor,
|
|
77
77
|
iconColor,
|
|
78
78
|
corner,
|
|
79
|
-
buttonSide: 'left'
|
|
79
|
+
buttonSide: 'left',
|
|
80
|
+
buttonBoxShadow
|
|
80
81
|
})
|
|
81
82
|
});
|
|
82
83
|
const buttonLeftAttrs = createAttr({
|
|
@@ -100,7 +101,8 @@ const ProductQuantity = (props)=>{
|
|
|
100
101
|
buttonBackgroundColor,
|
|
101
102
|
iconColor,
|
|
102
103
|
corner,
|
|
103
|
-
buttonSide: 'right'
|
|
104
|
+
buttonSide: 'right',
|
|
105
|
+
buttonBoxShadow
|
|
104
106
|
})
|
|
105
107
|
});
|
|
106
108
|
const buttonRightAttrs = createAttr({
|
|
@@ -103,6 +103,7 @@ const ProductBadgeSettings = [
|
|
|
103
103
|
default: 'Sale {percent_discount} off',
|
|
104
104
|
minHeight: 72,
|
|
105
105
|
inputClass: '!pr-36',
|
|
106
|
+
isFallback: true,
|
|
106
107
|
autoHeight: true,
|
|
107
108
|
showPlusBtn: true,
|
|
108
109
|
defaultRows: 1,
|
|
@@ -159,8 +160,9 @@ const ProductBadgeSettings = [
|
|
|
159
160
|
},
|
|
160
161
|
fontWeight: '400',
|
|
161
162
|
fontFamily: 'Assistant',
|
|
163
|
+
hasShadowText: false,
|
|
162
164
|
textShadow: {
|
|
163
|
-
|
|
165
|
+
enable: false
|
|
164
166
|
}
|
|
165
167
|
},
|
|
166
168
|
attrs: {
|
|
@@ -462,6 +464,7 @@ const ProductBadgeSettings = [
|
|
|
462
464
|
{
|
|
463
465
|
id: 'imageSizeV2',
|
|
464
466
|
type: 'size-setting',
|
|
467
|
+
hiddenShowMore: true,
|
|
465
468
|
disableShapeLinkedTooltip: 'Use other badge shape to resize without proportions',
|
|
466
469
|
devices: {
|
|
467
470
|
desktop: {
|
|
@@ -469,7 +472,8 @@ const ProductBadgeSettings = [
|
|
|
469
472
|
width: '20%',
|
|
470
473
|
height: 'auto',
|
|
471
474
|
shapeLinked: true,
|
|
472
|
-
|
|
475
|
+
hiddenShape: true,
|
|
476
|
+
shape: 'custom',
|
|
473
477
|
disableShapeLinked: true
|
|
474
478
|
}
|
|
475
479
|
}
|
|
@@ -504,9 +508,9 @@ const ProductBadgeSettings = [
|
|
|
504
508
|
}
|
|
505
509
|
},
|
|
506
510
|
hiddenSettings: [
|
|
507
|
-
'shape',
|
|
508
511
|
'gap',
|
|
509
|
-
'padding'
|
|
512
|
+
'padding',
|
|
513
|
+
'proportion'
|
|
510
514
|
]
|
|
511
515
|
},
|
|
512
516
|
{
|
|
@@ -70,9 +70,9 @@ const SettingUIV2 = [
|
|
|
70
70
|
{
|
|
71
71
|
id: 'content-badge',
|
|
72
72
|
type: 'combo',
|
|
73
|
-
iconName: 'polaris-
|
|
73
|
+
iconName: 'polaris-edit',
|
|
74
74
|
isHideClear: true,
|
|
75
|
-
fixedValue: '
|
|
75
|
+
fixedValue: 'Add...',
|
|
76
76
|
popoverLabel: {
|
|
77
77
|
en: 'Content'
|
|
78
78
|
},
|
|
@@ -356,7 +356,7 @@ const SettingUIV2 = [
|
|
|
356
356
|
en: 'Position'
|
|
357
357
|
},
|
|
358
358
|
label: {
|
|
359
|
-
en: '
|
|
359
|
+
en: 'Choose'
|
|
360
360
|
},
|
|
361
361
|
layout: 'vertical',
|
|
362
362
|
controls: [
|
|
@@ -282,7 +282,7 @@ const ProductPropertiesSettingsV2 = [
|
|
|
282
282
|
placeholder: 'Auto',
|
|
283
283
|
devices: {
|
|
284
284
|
desktop: {
|
|
285
|
-
default: '
|
|
285
|
+
default: '100%'
|
|
286
286
|
}
|
|
287
287
|
},
|
|
288
288
|
hide: true
|
|
@@ -475,25 +475,10 @@ const ProductPropertiesSettingsV2 = [
|
|
|
475
475
|
{
|
|
476
476
|
id: 'shadowInput',
|
|
477
477
|
type: 'shadow-v2',
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
}
|
|
483
|
-
}
|
|
484
|
-
},
|
|
485
|
-
compoDefaultValue: {
|
|
486
|
-
desktop: {
|
|
487
|
-
default: {
|
|
488
|
-
normal: {
|
|
489
|
-
type: 'shadow-1',
|
|
490
|
-
distance: '4px',
|
|
491
|
-
blur: '4px',
|
|
492
|
-
spread: '0px',
|
|
493
|
-
color: '#121212',
|
|
494
|
-
angle: 45
|
|
495
|
-
}
|
|
496
|
-
}
|
|
478
|
+
default: {
|
|
479
|
+
normal: {
|
|
480
|
+
type: 'shadow-1',
|
|
481
|
+
enable: false
|
|
497
482
|
}
|
|
498
483
|
}
|
|
499
484
|
},
|