@instructure/ui-flex 8.56.2-pr-snapshot-1721749364069 → 8.56.2
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/CHANGELOG.md +1 -1
- package/lib/Flex/Item/index.js +4 -4
- package/lib/Flex/index.js +8 -5
- package/package.json +9 -9
package/CHANGELOG.md
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
-
## [8.56.2
|
|
6
|
+
## [8.56.2](https://github.com/instructure/instructure-ui/compare/v8.56.1...v8.56.2) (2024-08-06)
|
|
7
7
|
|
|
8
8
|
**Note:** Version bump only for package @instructure/ui-flex
|
|
9
9
|
|
package/lib/Flex/Item/index.js
CHANGED
|
@@ -6,8 +6,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
});
|
|
7
7
|
exports.default = exports.Item = void 0;
|
|
8
8
|
var _react = require("react");
|
|
9
|
-
var
|
|
10
|
-
var
|
|
9
|
+
var _omitProps = require("@instructure/ui-react-utils/lib/omitProps.js");
|
|
10
|
+
var _View = require("@instructure/ui-view/lib/View");
|
|
11
11
|
var _emotion = require("@instructure/emotion");
|
|
12
12
|
var _styles = _interopRequireDefault(require("./styles"));
|
|
13
13
|
var _props = require("./props");
|
|
@@ -63,7 +63,7 @@ let Item = exports.Item = (_dec = (0, _emotion.withStyle)(_styles.default, null)
|
|
|
63
63
|
(_this$props$makeStyle2 = (_this$props2 = this.props).makeStyles) === null || _this$props$makeStyle2 === void 0 ? void 0 : _this$props$makeStyle2.call(_this$props2);
|
|
64
64
|
}
|
|
65
65
|
render() {
|
|
66
|
-
const props = (0,
|
|
66
|
+
const props = (0, _omitProps.omitProps)(this.props, Item.allowedProps);
|
|
67
67
|
const _this$props3 = this.props,
|
|
68
68
|
as = _this$props3.as,
|
|
69
69
|
children = _this$props3.children,
|
|
@@ -78,7 +78,7 @@ let Item = exports.Item = (_dec = (0, _emotion.withStyle)(_styles.default, null)
|
|
|
78
78
|
styles = _this$props3.styles;
|
|
79
79
|
const dirColumn = direction === 'column';
|
|
80
80
|
const dirRow = direction === 'row';
|
|
81
|
-
return (0, _emotion.jsx)(
|
|
81
|
+
return (0, _emotion.jsx)(_View.View, Object.assign({}, props, {
|
|
82
82
|
css: styles === null || styles === void 0 ? void 0 : styles.flexItem,
|
|
83
83
|
elementRef: this.handleRef,
|
|
84
84
|
as: as,
|
package/lib/Flex/index.js
CHANGED
|
@@ -14,8 +14,11 @@ Object.defineProperty(exports, "FlexItem", {
|
|
|
14
14
|
});
|
|
15
15
|
exports.default = void 0;
|
|
16
16
|
var _react = _interopRequireWildcard(require("react"));
|
|
17
|
-
var
|
|
18
|
-
var
|
|
17
|
+
var _safeCloneElement = require("@instructure/ui-react-utils/lib/safeCloneElement.js");
|
|
18
|
+
var _passthroughProps = require("@instructure/ui-react-utils/lib/passthroughProps.js");
|
|
19
|
+
var _matchComponentTypes = require("@instructure/ui-react-utils/lib/matchComponentTypes.js");
|
|
20
|
+
var _callRenderProp = require("@instructure/ui-react-utils/lib/callRenderProp.js");
|
|
21
|
+
var _View = require("@instructure/ui-view/lib/View");
|
|
19
22
|
var _emotion = require("@instructure/emotion");
|
|
20
23
|
var _Item = require("./Item");
|
|
21
24
|
var _styles = _interopRequireDefault(require("./styles"));
|
|
@@ -78,7 +81,7 @@ let Flex = exports.Flex = (_dec = (0, _emotion.withStyle)(_styles.default, _them
|
|
|
78
81
|
if (!child) {
|
|
79
82
|
return null;
|
|
80
83
|
}
|
|
81
|
-
return (0,
|
|
84
|
+
return (0, _matchComponentTypes.matchComponentTypes)(child, ['Item']) ? (0, _safeCloneElement.safeCloneElement)(child, {
|
|
82
85
|
// child withVisualDebug prop should override parent
|
|
83
86
|
withVisualDebug: this.props.withVisualDebug,
|
|
84
87
|
...child.props,
|
|
@@ -99,11 +102,11 @@ let Flex = exports.Flex = (_dec = (0, _emotion.withStyle)(_styles.default, _them
|
|
|
99
102
|
styles = _this$props3.styles,
|
|
100
103
|
gap = _this$props3.gap,
|
|
101
104
|
wrap = _this$props3.wrap;
|
|
102
|
-
const children = (0,
|
|
105
|
+
const children = (0, _callRenderProp.callRenderProp)(this.props.children);
|
|
103
106
|
const gapValuesArray = gap === null || gap === void 0 ? void 0 : gap.split(' ');
|
|
104
107
|
if (gapValuesArray.length > 1 && wrap === 'no-wrap') {}
|
|
105
108
|
if (children && _react.Children.count(children) > 0) {
|
|
106
|
-
return (0, _emotion.jsx)(
|
|
109
|
+
return (0, _emotion.jsx)(_View.View, Object.assign({}, (0, _passthroughProps.passthroughProps)(this.props), {
|
|
107
110
|
css: styles === null || styles === void 0 ? void 0 : styles.flex,
|
|
108
111
|
elementRef: this.handleRef,
|
|
109
112
|
as: as,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@instructure/ui-flex",
|
|
3
|
-
"version": "8.56.2
|
|
3
|
+
"version": "8.56.2",
|
|
4
4
|
"description": "A component that makes it easy to align content using flexbox CSS",
|
|
5
5
|
"author": "Instructure, Inc. Engineering and Product Design",
|
|
6
6
|
"module": "./es/index.js",
|
|
@@ -24,17 +24,17 @@
|
|
|
24
24
|
"license": "MIT",
|
|
25
25
|
"dependencies": {
|
|
26
26
|
"@babel/runtime": "^7.23.2",
|
|
27
|
-
"@instructure/console": "8.56.2
|
|
28
|
-
"@instructure/emotion": "8.56.2
|
|
29
|
-
"@instructure/shared-types": "8.56.2
|
|
30
|
-
"@instructure/ui-react-utils": "8.56.2
|
|
31
|
-
"@instructure/ui-view": "8.56.2
|
|
27
|
+
"@instructure/console": "8.56.2",
|
|
28
|
+
"@instructure/emotion": "8.56.2",
|
|
29
|
+
"@instructure/shared-types": "8.56.2",
|
|
30
|
+
"@instructure/ui-react-utils": "8.56.2",
|
|
31
|
+
"@instructure/ui-view": "8.56.2",
|
|
32
32
|
"prop-types": "^15.8.1"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
35
|
-
"@instructure/ui-babel-preset": "8.56.2
|
|
36
|
-
"@instructure/ui-test-utils": "8.56.2
|
|
37
|
-
"@instructure/ui-themes": "8.56.2
|
|
35
|
+
"@instructure/ui-babel-preset": "8.56.2",
|
|
36
|
+
"@instructure/ui-test-utils": "8.56.2",
|
|
37
|
+
"@instructure/ui-themes": "8.56.2"
|
|
38
38
|
},
|
|
39
39
|
"peerDependencies": {
|
|
40
40
|
"react": ">=16.8 <=18"
|