@micromag/element-layout 0.3.307 → 0.3.318
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/assets/css/styles.css +1 -1
- package/es/index.js +9 -17
- package/lib/index.js +9 -17
- package/package.json +5 -5
package/assets/css/styles.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.micromag-element-layout-container.micromag-element-layout-fullscreen{position:absolute;top:0;
|
|
1
|
+
.micromag-element-layout-container.micromag-element-layout-fullscreen{height:100%;left:0;position:absolute;top:0;width:100%}.micromag-element-layout-container{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}.micromag-element-layout-container .micromag-element-layout-horizontal{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row}
|
package/es/index.js
CHANGED
|
@@ -18,8 +18,8 @@ var propTypes = {
|
|
|
18
18
|
className: PropTypes.string,
|
|
19
19
|
children: PropTypes.node,
|
|
20
20
|
style: PropTypes.object // eslint-disable-line
|
|
21
|
-
|
|
22
21
|
};
|
|
22
|
+
|
|
23
23
|
var defaultProps = {
|
|
24
24
|
width: null,
|
|
25
25
|
height: null,
|
|
@@ -31,21 +31,18 @@ var defaultProps = {
|
|
|
31
31
|
children: null,
|
|
32
32
|
style: null
|
|
33
33
|
};
|
|
34
|
-
|
|
35
34
|
var Layout = function Layout(_ref) {
|
|
36
35
|
var _ref2;
|
|
37
|
-
|
|
38
36
|
var width = _ref.width,
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
37
|
+
height = _ref.height,
|
|
38
|
+
horizontalAlign = _ref.horizontalAlign,
|
|
39
|
+
verticalAlign = _ref.verticalAlign,
|
|
40
|
+
distribution = _ref.distribution,
|
|
41
|
+
fullscreen = _ref.fullscreen,
|
|
42
|
+
className = _ref.className,
|
|
43
|
+
children = _ref.children,
|
|
44
|
+
style = _ref.style;
|
|
47
45
|
var justifyContent = null;
|
|
48
|
-
|
|
49
46
|
if (distribution !== null) {
|
|
50
47
|
justifyContent = "space-".concat(distribution);
|
|
51
48
|
} else if (verticalAlign === 'middle') {
|
|
@@ -53,22 +50,18 @@ var Layout = function Layout(_ref) {
|
|
|
53
50
|
} else if (verticalAlign === 'bottom') {
|
|
54
51
|
justifyContent = 'flex-end';
|
|
55
52
|
}
|
|
56
|
-
|
|
57
53
|
var alignItems = null;
|
|
58
|
-
|
|
59
54
|
if (horizontalAlign === 'center') {
|
|
60
55
|
alignItems = 'center';
|
|
61
56
|
} else if (horizontalAlign === 'right') {
|
|
62
57
|
alignItems = 'flex-end';
|
|
63
58
|
}
|
|
64
|
-
|
|
65
59
|
var finalStyle = _objectSpread({
|
|
66
60
|
width: width,
|
|
67
61
|
height: height,
|
|
68
62
|
justifyContent: justifyContent,
|
|
69
63
|
alignItems: alignItems
|
|
70
64
|
}, style);
|
|
71
|
-
|
|
72
65
|
return /*#__PURE__*/React.createElement(StackProvider, {
|
|
73
66
|
direction: "vertical"
|
|
74
67
|
}, /*#__PURE__*/React.createElement("div", {
|
|
@@ -76,7 +69,6 @@ var Layout = function Layout(_ref) {
|
|
|
76
69
|
style: finalStyle
|
|
77
70
|
}, children));
|
|
78
71
|
};
|
|
79
|
-
|
|
80
72
|
Layout.propTypes = propTypes;
|
|
81
73
|
Layout.defaultProps = defaultProps;
|
|
82
74
|
|
package/lib/index.js
CHANGED
|
@@ -29,8 +29,8 @@ var propTypes = {
|
|
|
29
29
|
className: PropTypes__default["default"].string,
|
|
30
30
|
children: PropTypes__default["default"].node,
|
|
31
31
|
style: PropTypes__default["default"].object // eslint-disable-line
|
|
32
|
-
|
|
33
32
|
};
|
|
33
|
+
|
|
34
34
|
var defaultProps = {
|
|
35
35
|
width: null,
|
|
36
36
|
height: null,
|
|
@@ -42,21 +42,18 @@ var defaultProps = {
|
|
|
42
42
|
children: null,
|
|
43
43
|
style: null
|
|
44
44
|
};
|
|
45
|
-
|
|
46
45
|
var Layout = function Layout(_ref) {
|
|
47
46
|
var _ref2;
|
|
48
|
-
|
|
49
47
|
var width = _ref.width,
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
48
|
+
height = _ref.height,
|
|
49
|
+
horizontalAlign = _ref.horizontalAlign,
|
|
50
|
+
verticalAlign = _ref.verticalAlign,
|
|
51
|
+
distribution = _ref.distribution,
|
|
52
|
+
fullscreen = _ref.fullscreen,
|
|
53
|
+
className = _ref.className,
|
|
54
|
+
children = _ref.children,
|
|
55
|
+
style = _ref.style;
|
|
58
56
|
var justifyContent = null;
|
|
59
|
-
|
|
60
57
|
if (distribution !== null) {
|
|
61
58
|
justifyContent = "space-".concat(distribution);
|
|
62
59
|
} else if (verticalAlign === 'middle') {
|
|
@@ -64,22 +61,18 @@ var Layout = function Layout(_ref) {
|
|
|
64
61
|
} else if (verticalAlign === 'bottom') {
|
|
65
62
|
justifyContent = 'flex-end';
|
|
66
63
|
}
|
|
67
|
-
|
|
68
64
|
var alignItems = null;
|
|
69
|
-
|
|
70
65
|
if (horizontalAlign === 'center') {
|
|
71
66
|
alignItems = 'center';
|
|
72
67
|
} else if (horizontalAlign === 'right') {
|
|
73
68
|
alignItems = 'flex-end';
|
|
74
69
|
}
|
|
75
|
-
|
|
76
70
|
var finalStyle = _objectSpread__default["default"]({
|
|
77
71
|
width: width,
|
|
78
72
|
height: height,
|
|
79
73
|
justifyContent: justifyContent,
|
|
80
74
|
alignItems: alignItems
|
|
81
75
|
}, style);
|
|
82
|
-
|
|
83
76
|
return /*#__PURE__*/React__default["default"].createElement(elementStack.StackProvider, {
|
|
84
77
|
direction: "vertical"
|
|
85
78
|
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
@@ -87,7 +80,6 @@ var Layout = function Layout(_ref) {
|
|
|
87
80
|
style: finalStyle
|
|
88
81
|
}, children));
|
|
89
82
|
};
|
|
90
|
-
|
|
91
83
|
Layout.propTypes = propTypes;
|
|
92
84
|
Layout.defaultProps = defaultProps;
|
|
93
85
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@micromag/element-layout",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.318",
|
|
4
4
|
"description": "",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"javascript"
|
|
@@ -49,16 +49,16 @@
|
|
|
49
49
|
},
|
|
50
50
|
"dependencies": {
|
|
51
51
|
"@babel/runtime": "^7.13.10",
|
|
52
|
-
"@micromag/core": "^0.3.
|
|
53
|
-
"@micromag/element-stack": "^0.3.
|
|
52
|
+
"@micromag/core": "^0.3.318",
|
|
53
|
+
"@micromag/element-stack": "^0.3.318",
|
|
54
54
|
"classnames": "^2.2.6",
|
|
55
55
|
"lodash": "^4.17.21",
|
|
56
56
|
"prop-types": "^15.7.2",
|
|
57
57
|
"react-intl": "^5.12.1",
|
|
58
|
-
"uuid": "^
|
|
58
|
+
"uuid": "^9.0.0"
|
|
59
59
|
},
|
|
60
60
|
"publishConfig": {
|
|
61
61
|
"access": "public"
|
|
62
62
|
},
|
|
63
|
-
"gitHead": "
|
|
63
|
+
"gitHead": "7d1a296e0c0d410e1225279e1f19e3a7715bfa96"
|
|
64
64
|
}
|