@gem-sdk/components 2.0.0-dev.477 → 2.0.0-dev.479
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/coupon/setting/config/settings.js +2 -2
- package/dist/cjs/product/components/ProductSKU/Sku.liquid.js +2 -1
- package/dist/cjs/product/components/ProductVariants/common/base/styles.js +13 -1
- package/dist/cjs/product/setting/product-variant/configs/settings.js +1 -1
- package/dist/cjs/sticky/components/Sticky.js +1 -2
- package/dist/cjs/sticky/components/Sticky.liquid.js +0 -1
- package/dist/esm/coupon/setting/config/settings.js +2 -2
- package/dist/esm/product/components/ProductSKU/Sku.liquid.js +2 -1
- package/dist/esm/product/components/ProductVariants/common/base/styles.js +14 -2
- package/dist/esm/product/setting/product-variant/configs/settings.js +1 -1
- package/dist/esm/sticky/components/Sticky.js +1 -2
- package/dist/esm/sticky/components/Sticky.liquid.js +0 -1
- package/package.json +2 -2
|
@@ -16,12 +16,12 @@ const CouponSettings = [
|
|
|
16
16
|
{
|
|
17
17
|
label: 'Secondary',
|
|
18
18
|
value: 'none',
|
|
19
|
-
iconName: 'coupon-code-layout'
|
|
19
|
+
iconName: 'gp-coupon-code-layout'
|
|
20
20
|
},
|
|
21
21
|
{
|
|
22
22
|
label: 'Icon',
|
|
23
23
|
value: 'icon',
|
|
24
|
-
iconName: 'coupon-code-no-icon-layout'
|
|
24
|
+
iconName: 'gp-coupon-code-no-icon-layout'
|
|
25
25
|
}
|
|
26
26
|
]
|
|
27
27
|
},
|
|
@@ -25,7 +25,8 @@ const ProductSku = ({ setting, styles, advanced, builderProps })=>{
|
|
|
25
25
|
setting: {
|
|
26
26
|
...setting,
|
|
27
27
|
text: `{% if currentVariant.sku.size > 0 %} ${labelContent} {{ currentVariant.sku }} {% endif %}`,
|
|
28
|
-
excludeFlex: true
|
|
28
|
+
excludeFlex: true,
|
|
29
|
+
isForceValue: true
|
|
29
30
|
},
|
|
30
31
|
advanced: advanced,
|
|
31
32
|
builderProps,
|
|
@@ -54,9 +54,21 @@ const getWrapperStyleNormalAndHover = (props)=>{
|
|
|
54
54
|
const isColorType = typeOfOption === 'color';
|
|
55
55
|
const isUploadImageType = typeOfOption === 'image' || typeOfOption === 'image_shopify';
|
|
56
56
|
const appendTypoStyle = core.composeTypographyStyle(optionTypo, optionTypography);
|
|
57
|
+
const composeShadow = [
|
|
58
|
+
'normal',
|
|
59
|
+
'hover'
|
|
60
|
+
].reduce((acc, state)=>({
|
|
61
|
+
...acc,
|
|
62
|
+
...core.getStyleShadow({
|
|
63
|
+
value: optionShadow?.[state],
|
|
64
|
+
state,
|
|
65
|
+
styleAppliedFor: 'box-shadow',
|
|
66
|
+
isEnableShadow: optionHasShadow?.[state]
|
|
67
|
+
})
|
|
68
|
+
}), {});
|
|
57
69
|
return helpers.filterTruthyObject({
|
|
58
70
|
...core.composeRadius(optionRounded),
|
|
59
|
-
...
|
|
71
|
+
...composeShadow,
|
|
60
72
|
...!isColorType && core.getGlobalColorStateStyle('bg', optionBgColor),
|
|
61
73
|
...!isColorType && core.handleConvertBorderStyle(optionBorder),
|
|
62
74
|
...!isColorType && core.handleConvertBorderWidth(optionBorder),
|
|
@@ -16,10 +16,9 @@ var classes = require('./common/classes.js');
|
|
|
16
16
|
|
|
17
17
|
const Sticky = ({ children, builderAttrs, setting, style, builderProps, advanced })=>{
|
|
18
18
|
const { background, preloadBgImage, width, isScrollToTop } = setting ?? {};
|
|
19
|
-
const {
|
|
19
|
+
const { positionStyle, displayStyle } = useSticky.default(setting);
|
|
20
20
|
const computedContainerStyles = system.createStyle({
|
|
21
21
|
margin: '0 auto',
|
|
22
|
-
...w,
|
|
23
22
|
...displayStyle,
|
|
24
23
|
...styles.getStylePadding(style),
|
|
25
24
|
...positionStyle,
|
|
@@ -12,7 +12,6 @@ const Sticky = ({ children, builderAttrs, setting, style, builderProps, advanced
|
|
|
12
12
|
const { width, position, display, preloadBgImage, background, isScrollToTop } = setting ?? {};
|
|
13
13
|
const advancedDisplay = advanced?.d;
|
|
14
14
|
const computedContainerStyles = system.createStyle(styles.getContainerStyles({
|
|
15
|
-
width,
|
|
16
15
|
position,
|
|
17
16
|
style,
|
|
18
17
|
display
|
|
@@ -14,12 +14,12 @@ const CouponSettings = [
|
|
|
14
14
|
{
|
|
15
15
|
label: 'Secondary',
|
|
16
16
|
value: 'none',
|
|
17
|
-
iconName: 'coupon-code-layout'
|
|
17
|
+
iconName: 'gp-coupon-code-layout'
|
|
18
18
|
},
|
|
19
19
|
{
|
|
20
20
|
label: 'Icon',
|
|
21
21
|
value: 'icon',
|
|
22
|
-
iconName: 'coupon-code-no-icon-layout'
|
|
22
|
+
iconName: 'gp-coupon-code-no-icon-layout'
|
|
23
23
|
}
|
|
24
24
|
]
|
|
25
25
|
},
|
|
@@ -21,7 +21,8 @@ const ProductSku = ({ setting, styles, advanced, builderProps })=>{
|
|
|
21
21
|
setting: {
|
|
22
22
|
...setting,
|
|
23
23
|
text: `{% if currentVariant.sku.size > 0 %} ${labelContent} {{ currentVariant.sku }} {% endif %}`,
|
|
24
|
-
excludeFlex: true
|
|
24
|
+
excludeFlex: true,
|
|
25
|
+
isForceValue: true
|
|
25
26
|
},
|
|
26
27
|
advanced: advanced,
|
|
27
28
|
builderProps,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { composeTypographyStyle, getRadiusStyleActiveState, getStyleShadow, makeStyle, getSingleColorVariable, composeRadius,
|
|
1
|
+
import { composeTypographyStyle, getRadiusStyleActiveState, getStyleShadow, makeStyle, getSingleColorVariable, composeRadius, getGlobalColorStateStyle, handleConvertBorderStyle, handleConvertBorderWidth, handleConvertBorderColor } from '@gem-sdk/core';
|
|
2
2
|
import { filterTruthyObject } from '../../../../../helpers.js';
|
|
3
3
|
|
|
4
4
|
const getWrapperStyleActive = (props)=>{
|
|
@@ -52,9 +52,21 @@ const getWrapperStyleNormalAndHover = (props)=>{
|
|
|
52
52
|
const isColorType = typeOfOption === 'color';
|
|
53
53
|
const isUploadImageType = typeOfOption === 'image' || typeOfOption === 'image_shopify';
|
|
54
54
|
const appendTypoStyle = composeTypographyStyle(optionTypo, optionTypography);
|
|
55
|
+
const composeShadow = [
|
|
56
|
+
'normal',
|
|
57
|
+
'hover'
|
|
58
|
+
].reduce((acc, state)=>({
|
|
59
|
+
...acc,
|
|
60
|
+
...getStyleShadow({
|
|
61
|
+
value: optionShadow?.[state],
|
|
62
|
+
state,
|
|
63
|
+
styleAppliedFor: 'box-shadow',
|
|
64
|
+
isEnableShadow: optionHasShadow?.[state]
|
|
65
|
+
})
|
|
66
|
+
}), {});
|
|
55
67
|
return filterTruthyObject({
|
|
56
68
|
...composeRadius(optionRounded),
|
|
57
|
-
...
|
|
69
|
+
...composeShadow,
|
|
58
70
|
...!isColorType && getGlobalColorStateStyle('bg', optionBgColor),
|
|
59
71
|
...!isColorType && handleConvertBorderStyle(optionBorder),
|
|
60
72
|
...!isColorType && handleConvertBorderWidth(optionBorder),
|
|
@@ -12,10 +12,9 @@ import { getContainerClasses } from './common/classes.js';
|
|
|
12
12
|
|
|
13
13
|
const Sticky = ({ children, builderAttrs, setting, style, builderProps, advanced })=>{
|
|
14
14
|
const { background, preloadBgImage, width, isScrollToTop } = setting ?? {};
|
|
15
|
-
const {
|
|
15
|
+
const { positionStyle, displayStyle } = useSticky(setting);
|
|
16
16
|
const computedContainerStyles = createStyle({
|
|
17
17
|
margin: '0 auto',
|
|
18
|
-
...w,
|
|
19
18
|
...displayStyle,
|
|
20
19
|
...getStylePadding(style),
|
|
21
20
|
...positionStyle,
|
|
@@ -8,7 +8,6 @@ const Sticky = ({ children, builderAttrs, setting, style, builderProps, advanced
|
|
|
8
8
|
const { width, position, display, preloadBgImage, background, isScrollToTop } = setting ?? {};
|
|
9
9
|
const advancedDisplay = advanced?.d;
|
|
10
10
|
const computedContainerStyles = createStyle(getContainerStyles({
|
|
11
|
-
width,
|
|
12
11
|
position,
|
|
13
12
|
style,
|
|
14
13
|
display
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gem-sdk/components",
|
|
3
|
-
"version": "2.0.0-dev.
|
|
3
|
+
"version": "2.0.0-dev.479",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"main": "dist/cjs/index.js",
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"update-img-src-3rd": "node ./scripts/update-img-src-3rd.js"
|
|
24
24
|
},
|
|
25
25
|
"devDependencies": {
|
|
26
|
-
"@gem-sdk/core": "2.0.0-dev.
|
|
26
|
+
"@gem-sdk/core": "2.0.0-dev.479",
|
|
27
27
|
"@gem-sdk/styles": "2.0.0-dev.464",
|
|
28
28
|
"@gem-sdk/system": "2.0.0-dev.464",
|
|
29
29
|
"@types/react-transition-group": "^4.4.5"
|