@gem-sdk/components 2.0.0-dev.402 → 2.0.0-dev.404

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.
@@ -12,10 +12,21 @@ const getRowStyle = (rowProps)=>{
12
12
  const { isSection, layout, horizontalAlign, responsive, inlineAlignment } = setting ?? {};
13
13
  const { width, columnGap, rowGap, fullWidth, background, verticalGutter, verticalGutterMobile, enablePagePadding } = styles ?? {};
14
14
  const innerRadius = getInnerRadius.getInnerRadiusExcludeBorder(advanced?.border, advanced?.rounded);
15
+ const checkHasRadius = (corner)=>{
16
+ const cornerNormal = corner?.normal;
17
+ if (!cornerNormal) return false;
18
+ if (cornerNormal.radiusType === 'square' || cornerNormal.radiusType === 'none') return false;
19
+ for(const key in cornerNormal){
20
+ if (Object.hasOwn(cornerNormal, key)) {
21
+ if (cornerNormal[key] !== '0px') return true;
22
+ }
23
+ }
24
+ return false;
25
+ };
15
26
  const overFlowStyle = core.makeStyleResponsive('of', {
16
- desktop: innerRadius.desktop ? 'hidden' : undefined,
17
- tablet: innerRadius.tablet ? 'hidden' : undefined,
18
- mobile: innerRadius.mobile ? 'hidden' : undefined
27
+ desktop: checkHasRadius(innerRadius.desktop) ? 'hidden' : undefined,
28
+ tablet: checkHasRadius(innerRadius.tablet) ? 'hidden' : undefined,
29
+ mobile: checkHasRadius(innerRadius.mobile) ? 'hidden' : undefined
19
30
  });
20
31
  const childHasChildren = builderProps?.builderData?.childrens?.length;
21
32
  const bgVideoAspectRatioStyle = {
@@ -40,7 +51,7 @@ const getRowStyle = (rowProps)=>{
40
51
  ...core.makeStyleResponsive('rg', verticalGutterMobile),
41
52
  ...layout ? core.composeGridLayout(layout) : core.makeStyleResponsive('gtc', responsive),
42
53
  ...core.makeStyleResponsive('w', sizeStyles.content),
43
- ...overFlowStyle
54
+ ...isSection ? {} : overFlowStyle
44
55
  };
45
56
  };
46
57
  const getPostPurchaseStyle = ()=>{
@@ -258,7 +258,7 @@ const SettingUIV2 = [
258
258
  },
259
259
  {
260
260
  label: {
261
- en: 'Align'
261
+ en: 'Align column'
262
262
  },
263
263
  conditionDisplay: `pageType != "POST_PURCHASE" && (layout.display !== 'fill' || (!!layout.cols && layout.cols.length > 1))`,
264
264
  controls: [
@@ -60,7 +60,7 @@ const ProductProperties = ({ setting, styles, builderProps, advanced, pageContex
60
60
  style="${wrapperStyles}"
61
61
  >
62
62
  ${core.RenderIf(isDisplayLabel, core.template`<div class="${labelWrapperClasses}">
63
- <label htmlFor="${uniqId}-${name}" class="${labelClasses}" style="${labelStyles}}">
63
+ <label htmlFor="${uniqId}-${name}" class="${labelClasses}" style="${labelStyles}">
64
64
  ${displayLabel}
65
65
  <span style="${labelContentStyles}">${labelContent}</span>
66
66
  </label>
@@ -10,10 +10,21 @@ const getRowStyle = (rowProps)=>{
10
10
  const { isSection, layout, horizontalAlign, responsive, inlineAlignment } = setting ?? {};
11
11
  const { width, columnGap, rowGap, fullWidth, background, verticalGutter, verticalGutterMobile, enablePagePadding } = styles ?? {};
12
12
  const innerRadius = getInnerRadiusExcludeBorder(advanced?.border, advanced?.rounded);
13
+ const checkHasRadius = (corner)=>{
14
+ const cornerNormal = corner?.normal;
15
+ if (!cornerNormal) return false;
16
+ if (cornerNormal.radiusType === 'square' || cornerNormal.radiusType === 'none') return false;
17
+ for(const key in cornerNormal){
18
+ if (Object.hasOwn(cornerNormal, key)) {
19
+ if (cornerNormal[key] !== '0px') return true;
20
+ }
21
+ }
22
+ return false;
23
+ };
13
24
  const overFlowStyle = makeStyleResponsive('of', {
14
- desktop: innerRadius.desktop ? 'hidden' : undefined,
15
- tablet: innerRadius.tablet ? 'hidden' : undefined,
16
- mobile: innerRadius.mobile ? 'hidden' : undefined
25
+ desktop: checkHasRadius(innerRadius.desktop) ? 'hidden' : undefined,
26
+ tablet: checkHasRadius(innerRadius.tablet) ? 'hidden' : undefined,
27
+ mobile: checkHasRadius(innerRadius.mobile) ? 'hidden' : undefined
17
28
  });
18
29
  const childHasChildren = builderProps?.builderData?.childrens?.length;
19
30
  const bgVideoAspectRatioStyle = {
@@ -38,7 +49,7 @@ const getRowStyle = (rowProps)=>{
38
49
  ...makeStyleResponsive('rg', verticalGutterMobile),
39
50
  ...layout ? composeGridLayout(layout) : makeStyleResponsive('gtc', responsive),
40
51
  ...makeStyleResponsive('w', sizeStyles.content),
41
- ...overFlowStyle
52
+ ...isSection ? {} : overFlowStyle
42
53
  };
43
54
  };
44
55
  const getPostPurchaseStyle = ()=>{
@@ -256,7 +256,7 @@ const SettingUIV2 = [
256
256
  },
257
257
  {
258
258
  label: {
259
- en: 'Align'
259
+ en: 'Align column'
260
260
  },
261
261
  conditionDisplay: `pageType != "POST_PURCHASE" && (layout.display !== 'fill' || (!!layout.cols && layout.cols.length > 1))`,
262
262
  controls: [
@@ -56,7 +56,7 @@ const ProductProperties = ({ setting, styles, builderProps, advanced, pageContex
56
56
  style="${wrapperStyles}"
57
57
  >
58
58
  ${RenderIf(isDisplayLabel, template`<div class="${labelWrapperClasses}">
59
- <label htmlFor="${uniqId}-${name}" class="${labelClasses}" style="${labelStyles}}">
59
+ <label htmlFor="${uniqId}-${name}" class="${labelClasses}" style="${labelStyles}">
60
60
  ${displayLabel}
61
61
  <span style="${labelContentStyles}">${labelContent}</span>
62
62
  </label>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gem-sdk/components",
3
- "version": "2.0.0-dev.402",
3
+ "version": "2.0.0-dev.404",
4
4
  "license": "MIT",
5
5
  "sideEffects": false,
6
6
  "main": "dist/cjs/index.js",
@@ -22,7 +22,7 @@
22
22
  "relationship": "rollup -c ./scripts/rollup.config.settings.mjs && node ./scripts/get-control-relationship.js && node ./scripts/get-element-relationship.js"
23
23
  },
24
24
  "devDependencies": {
25
- "@gem-sdk/core": "2.0.0-dev.402",
25
+ "@gem-sdk/core": "2.0.0-dev.403",
26
26
  "@gem-sdk/styles": "2.0.0-dev.381",
27
27
  "@gem-sdk/system": "2.0.0-dev.371",
28
28
  "@types/react-transition-group": "^4.4.5"