@gem-sdk/core 1.23.0-staging.220 → 1.23.0-staging.224
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/components/constant.js +2 -1
- package/dist/cjs/components/resize/Spacing.js +10 -3
- package/dist/cjs/helpers/compose-advance-style.js +2 -2
- package/dist/esm/components/constant.js +2 -1
- package/dist/esm/components/resize/Spacing.js +10 -3
- package/dist/esm/helpers/compose-advance-style.js +2 -2
- package/package.json +1 -1
|
@@ -123,11 +123,18 @@ function Spacing(props) {
|
|
|
123
123
|
const toolbar = $component && getChildrenByAttrSelector($component, 'data-toolbar');
|
|
124
124
|
const isActive = toolbar && toolbar.getAttribute('data-toolbar-active');
|
|
125
125
|
if (isActive && detail?.marginBottom) {
|
|
126
|
-
const currentValue =
|
|
126
|
+
const currentValue = parseInt(detail?.marginBottom);
|
|
127
127
|
const newValue = `${currentValue}px`;
|
|
128
128
|
if ($bottomDrag.current && $bottomBg.current) {
|
|
129
|
-
|
|
130
|
-
|
|
129
|
+
if (currentValue < 0) {
|
|
130
|
+
$bottomBg.current.style.display = 'none';
|
|
131
|
+
$bottomDrag.current.style.display = 'none';
|
|
132
|
+
} else {
|
|
133
|
+
$bottomBg.current.style.display = 'block';
|
|
134
|
+
$bottomDrag.current.style.display = 'block';
|
|
135
|
+
$bottomBg.current.style.height = newValue;
|
|
136
|
+
$bottomDrag.current.style.top = newValue;
|
|
137
|
+
}
|
|
131
138
|
}
|
|
132
139
|
}
|
|
133
140
|
}, []);
|
|
@@ -18,9 +18,9 @@ const composeSpacingV2 = ({ source, spacing, suffix = '' })=>{
|
|
|
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;
|
|
21
|
+
if (left) source[`--ml${suffix}`] = left === '0px' ? 'auto' : left;
|
|
22
22
|
if (bottom) source[`--mb${suffix}`] = bottom;
|
|
23
|
-
if (right) source[`--mr${suffix}`] = right;
|
|
23
|
+
if (right) source[`--mr${suffix}`] = right === '0px' ? 'auto' : right;
|
|
24
24
|
}
|
|
25
25
|
if (spacing && spacing.padding) {
|
|
26
26
|
const { top, left, bottom, right } = spacing.padding;
|
|
@@ -119,11 +119,18 @@ function Spacing(props) {
|
|
|
119
119
|
const toolbar = $component && getChildrenByAttrSelector($component, 'data-toolbar');
|
|
120
120
|
const isActive = toolbar && toolbar.getAttribute('data-toolbar-active');
|
|
121
121
|
if (isActive && detail?.marginBottom) {
|
|
122
|
-
const currentValue =
|
|
122
|
+
const currentValue = parseInt(detail?.marginBottom);
|
|
123
123
|
const newValue = `${currentValue}px`;
|
|
124
124
|
if ($bottomDrag.current && $bottomBg.current) {
|
|
125
|
-
|
|
126
|
-
|
|
125
|
+
if (currentValue < 0) {
|
|
126
|
+
$bottomBg.current.style.display = 'none';
|
|
127
|
+
$bottomDrag.current.style.display = 'none';
|
|
128
|
+
} else {
|
|
129
|
+
$bottomBg.current.style.display = 'block';
|
|
130
|
+
$bottomDrag.current.style.display = 'block';
|
|
131
|
+
$bottomBg.current.style.height = newValue;
|
|
132
|
+
$bottomDrag.current.style.top = newValue;
|
|
133
|
+
}
|
|
127
134
|
}
|
|
128
135
|
}
|
|
129
136
|
}, []);
|
|
@@ -16,9 +16,9 @@ const composeSpacingV2 = ({ source, spacing, suffix = '' })=>{
|
|
|
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;
|
|
19
|
+
if (left) source[`--ml${suffix}`] = left === '0px' ? 'auto' : left;
|
|
20
20
|
if (bottom) source[`--mb${suffix}`] = bottom;
|
|
21
|
-
if (right) source[`--mr${suffix}`] = right;
|
|
21
|
+
if (right) source[`--mr${suffix}`] = right === '0px' ? 'auto' : right;
|
|
22
22
|
}
|
|
23
23
|
if (spacing && spacing.padding) {
|
|
24
24
|
const { top, left, bottom, right } = spacing.padding;
|