@gem-sdk/core 1.23.0-staging.228 → 1.23.0-staging.230

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.
@@ -14,13 +14,13 @@ const composeSpacing = ({ source, spacing, type, suffix = '' })=>{
14
14
  if (bottom) source[`--${type}b${suffix}`] = bottom;
15
15
  if (right) source[`--${type}r${suffix}`] = right;
16
16
  };
17
- const composeSpacingV2 = ({ source, spacing, suffix = '' })=>{
17
+ const composeSpacingV2 = ({ source, spacing, suffix = '', tag = '' })=>{
18
18
  if (spacing && spacing.margin) {
19
19
  const { top, left, bottom, right } = spacing.margin;
20
20
  if (top) source[`--mt${suffix}`] = top;
21
- if (left) source[`--ml${suffix}`] = left === '0px' ? 'auto' : left;
21
+ if (left) source[`--ml${suffix}`] = constant.layoutComponent.includes(tag) && left === '0px' ? 'auto' : left;
22
22
  if (bottom) source[`--mb${suffix}`] = bottom;
23
- if (right) source[`--mr${suffix}`] = right === '0px' ? 'auto' : right;
23
+ if (right) source[`--mr${suffix}`] = constant.layoutComponent.includes(tag) && right === '0px' ? 'auto' : right;
24
24
  }
25
25
  if (spacing && spacing.padding) {
26
26
  const { top, left, bottom, right } = spacing.padding;
@@ -93,7 +93,8 @@ function composeAdvanceStyle(data, tag) {
93
93
  case 'spacing-setting':
94
94
  composeSpacingV2({
95
95
  source: styles,
96
- spacing: deviceValue
96
+ spacing: deviceValue,
97
+ tag
97
98
  });
98
99
  break;
99
100
  case 'm':
@@ -125,7 +126,8 @@ function composeAdvanceStyle(data, tag) {
125
126
  composeSpacingV2({
126
127
  source: styles,
127
128
  spacing: deviceValue,
128
- suffix: `-${composeAttr}`
129
+ suffix: `-${composeAttr}`,
130
+ tag
129
131
  });
130
132
  break;
131
133
  case 'm':
@@ -12,13 +12,13 @@ const composeSpacing = ({ source, spacing, type, suffix = '' })=>{
12
12
  if (bottom) source[`--${type}b${suffix}`] = bottom;
13
13
  if (right) source[`--${type}r${suffix}`] = right;
14
14
  };
15
- const composeSpacingV2 = ({ source, spacing, suffix = '' })=>{
15
+ const composeSpacingV2 = ({ source, spacing, suffix = '', tag = '' })=>{
16
16
  if (spacing && spacing.margin) {
17
17
  const { top, left, bottom, right } = spacing.margin;
18
18
  if (top) source[`--mt${suffix}`] = top;
19
- if (left) source[`--ml${suffix}`] = left === '0px' ? 'auto' : left;
19
+ if (left) source[`--ml${suffix}`] = layoutComponent.includes(tag) && left === '0px' ? 'auto' : left;
20
20
  if (bottom) source[`--mb${suffix}`] = bottom;
21
- if (right) source[`--mr${suffix}`] = right === '0px' ? 'auto' : right;
21
+ if (right) source[`--mr${suffix}`] = layoutComponent.includes(tag) && right === '0px' ? 'auto' : right;
22
22
  }
23
23
  if (spacing && spacing.padding) {
24
24
  const { top, left, bottom, right } = spacing.padding;
@@ -91,7 +91,8 @@ function composeAdvanceStyle(data, tag) {
91
91
  case 'spacing-setting':
92
92
  composeSpacingV2({
93
93
  source: styles,
94
- spacing: deviceValue
94
+ spacing: deviceValue,
95
+ tag
95
96
  });
96
97
  break;
97
98
  case 'm':
@@ -123,7 +124,8 @@ function composeAdvanceStyle(data, tag) {
123
124
  composeSpacingV2({
124
125
  source: styles,
125
126
  spacing: deviceValue,
126
- suffix: `-${composeAttr}`
127
+ suffix: `-${composeAttr}`,
128
+ tag
127
129
  });
128
130
  break;
129
131
  case 'm':
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gem-sdk/core",
3
- "version": "1.23.0-staging.228",
3
+ "version": "1.23.0-staging.230",
4
4
  "license": "MIT",
5
5
  "sideEffects": false,
6
6
  "main": "dist/cjs/index.js",