@instructure/ui-portal 11.7.8 → 11.7.9-snapshot-1
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 +8 -0
- package/lib/Portal/index.js +10 -10
- package/package.json +7 -7
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,14 @@
|
|
|
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
|
+
## [11.7.9-snapshot-1](https://github.com/instructure/instructure-ui/compare/v11.7.8...v11.7.9-snapshot-1) (2026-10-06)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @instructure/ui-portal
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
6
14
|
## [11.7.8](https://github.com/instructure/instructure-ui/compare/v11.7.7...v11.7.8) (2026-10-02)
|
|
7
15
|
|
|
8
16
|
**Note:** Version bump only for package @instructure/ui-portal
|
package/lib/Portal/index.js
CHANGED
|
@@ -7,9 +7,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
exports.default = exports.Portal = void 0;
|
|
8
8
|
var _react = require("react");
|
|
9
9
|
var _reactDom = _interopRequireDefault(require("react-dom"));
|
|
10
|
-
var
|
|
11
|
-
var
|
|
12
|
-
var
|
|
10
|
+
var _uiReactUtils = require("@instructure/ui-react-utils");
|
|
11
|
+
var _uiI18n = require("@instructure/ui-i18n");
|
|
12
|
+
var _uiDomUtils = require("@instructure/ui-dom-utils");
|
|
13
13
|
var _props = require("./props.js");
|
|
14
14
|
var _dec, _class;
|
|
15
15
|
/*
|
|
@@ -41,7 +41,7 @@ category: components/Util Components
|
|
|
41
41
|
---
|
|
42
42
|
@module Portal
|
|
43
43
|
**/
|
|
44
|
-
let Portal = exports.Portal = (_dec = (0,
|
|
44
|
+
let Portal = exports.Portal = (_dec = (0, _uiI18n.textDirectionContextConsumer)(), _dec(_class = class Portal extends _react.Component {
|
|
45
45
|
static displayName = 'Portal';
|
|
46
46
|
static allowedProps = _props.allowedProps;
|
|
47
47
|
static defaultProps = {
|
|
@@ -55,7 +55,7 @@ let Portal = exports.Portal = (_dec = (0, _textDirectionContextConsumer.textDire
|
|
|
55
55
|
};
|
|
56
56
|
constructor(props) {
|
|
57
57
|
super(props);
|
|
58
|
-
if (!
|
|
58
|
+
if (!_uiDomUtils.canUseDOM) {
|
|
59
59
|
return;
|
|
60
60
|
}
|
|
61
61
|
this.state = {
|
|
@@ -75,7 +75,7 @@ let Portal = exports.Portal = (_dec = (0, _textDirectionContextConsumer.textDire
|
|
|
75
75
|
}
|
|
76
76
|
};
|
|
77
77
|
componentDidMount() {
|
|
78
|
-
if (!
|
|
78
|
+
if (!_uiDomUtils.canUseDOM) {
|
|
79
79
|
return;
|
|
80
80
|
}
|
|
81
81
|
|
|
@@ -89,7 +89,7 @@ let Portal = exports.Portal = (_dec = (0, _textDirectionContextConsumer.textDire
|
|
|
89
89
|
}
|
|
90
90
|
}
|
|
91
91
|
componentDidUpdate(prevProps) {
|
|
92
|
-
if (!
|
|
92
|
+
if (!_uiDomUtils.canUseDOM) {
|
|
93
93
|
return;
|
|
94
94
|
}
|
|
95
95
|
const mountNode = this.findMountNode(this.props);
|
|
@@ -111,7 +111,7 @@ let Portal = exports.Portal = (_dec = (0, _textDirectionContextConsumer.textDire
|
|
|
111
111
|
}
|
|
112
112
|
}
|
|
113
113
|
componentWillUnmount() {
|
|
114
|
-
if (!
|
|
114
|
+
if (!_uiDomUtils.canUseDOM) {
|
|
115
115
|
return;
|
|
116
116
|
}
|
|
117
117
|
this.removeNode();
|
|
@@ -144,7 +144,7 @@ let Portal = exports.Portal = (_dec = (0, _textDirectionContextConsumer.textDire
|
|
|
144
144
|
if (!this.DOMNode) {
|
|
145
145
|
const node = document.createElement('span');
|
|
146
146
|
const attributes = {
|
|
147
|
-
...(0,
|
|
147
|
+
...(0, _uiReactUtils.passthroughProps)(props),
|
|
148
148
|
dir
|
|
149
149
|
};
|
|
150
150
|
Object.keys(attributes).forEach(name => {
|
|
@@ -183,7 +183,7 @@ let Portal = exports.Portal = (_dec = (0, _textDirectionContextConsumer.textDire
|
|
|
183
183
|
children,
|
|
184
184
|
open
|
|
185
185
|
} = this.props;
|
|
186
|
-
if (!
|
|
186
|
+
if (!_uiDomUtils.canUseDOM && open) {
|
|
187
187
|
return children;
|
|
188
188
|
}
|
|
189
189
|
return open && _react.Children.count(children) > 0 ? /*#__PURE__*/_reactDom.default.createPortal(children, this.insertNode()) : null;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@instructure/ui-portal",
|
|
3
|
-
"version": "11.7.
|
|
3
|
+
"version": "11.7.9-snapshot-1",
|
|
4
4
|
"description": "A UI component library made by Instructure Inc.",
|
|
5
5
|
"author": "Instructure, Inc. Engineering and Product Design",
|
|
6
6
|
"module": "./es/index.js",
|
|
@@ -15,15 +15,15 @@
|
|
|
15
15
|
"license": "MIT",
|
|
16
16
|
"dependencies": {
|
|
17
17
|
"@babel/runtime": "^7.29.7",
|
|
18
|
-
"@instructure/shared-types": "11.7.
|
|
19
|
-
"@instructure/ui-dom-utils": "11.7.
|
|
20
|
-
"@instructure/ui-
|
|
21
|
-
"@instructure/ui-
|
|
18
|
+
"@instructure/shared-types": "11.7.9-snapshot-1",
|
|
19
|
+
"@instructure/ui-dom-utils": "11.7.9-snapshot-1",
|
|
20
|
+
"@instructure/ui-i18n": "11.7.9-snapshot-1",
|
|
21
|
+
"@instructure/ui-react-utils": "11.7.9-snapshot-1"
|
|
22
22
|
},
|
|
23
23
|
"devDependencies": {
|
|
24
24
|
"vitest": "^5.0.0",
|
|
25
|
-
"@instructure/ui-axe-check": "11.7.
|
|
26
|
-
"@instructure/ui-babel-preset": "11.7.
|
|
25
|
+
"@instructure/ui-axe-check": "11.7.9-snapshot-1",
|
|
26
|
+
"@instructure/ui-babel-preset": "11.7.9-snapshot-1"
|
|
27
27
|
},
|
|
28
28
|
"peerDependencies": {
|
|
29
29
|
"react": ">=18 <=19",
|