@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.
@@ -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
- ...core.getStyleShadowState(optionShadow, 'box-shadow', optionHasShadow),
71
+ ...composeShadow,
60
72
  ...!isColorType && core.getGlobalColorStateStyle('bg', optionBgColor),
61
73
  ...!isColorType && core.handleConvertBorderStyle(optionBorder),
62
74
  ...!isColorType && core.handleConvertBorderWidth(optionBorder),
@@ -22,7 +22,7 @@ const ProductVariantSettings = [
22
22
  default: 'singleOption',
23
23
  options: [
24
24
  {
25
- label: 'Separate',
25
+ label: 'Separated',
26
26
  value: 'singleOption'
27
27
  },
28
28
  {
@@ -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 { w, positionStyle, displayStyle } = useSticky.default(setting);
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, getStyleShadowState, getGlobalColorStateStyle, handleConvertBorderStyle, handleConvertBorderWidth, handleConvertBorderColor } from '@gem-sdk/core';
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
- ...getStyleShadowState(optionShadow, 'box-shadow', optionHasShadow),
69
+ ...composeShadow,
58
70
  ...!isColorType && getGlobalColorStateStyle('bg', optionBgColor),
59
71
  ...!isColorType && handleConvertBorderStyle(optionBorder),
60
72
  ...!isColorType && handleConvertBorderWidth(optionBorder),
@@ -20,7 +20,7 @@ const ProductVariantSettings = [
20
20
  default: 'singleOption',
21
21
  options: [
22
22
  {
23
- label: 'Separate',
23
+ label: 'Separated',
24
24
  value: 'singleOption'
25
25
  },
26
26
  {
@@ -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 { w, positionStyle, displayStyle } = useSticky(setting);
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.477",
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.474",
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"