@carbon/ibm-products 2.11.2 → 2.11.3
Sign up to get free protection for your applications and to get access to all the features.
- package/es/components/Tearsheet/Tearsheet.js +2 -1
- package/es/components/Tearsheet/TearsheetNarrow.js +2 -1
- package/es/components/Tearsheet/TearsheetShell.js +2 -1
- package/lib/components/Tearsheet/Tearsheet.js +1 -1
- package/lib/components/Tearsheet/TearsheetNarrow.js +1 -1
- package/lib/components/Tearsheet/TearsheetShell.js +4 -2
- package/package.json +2 -2
@@ -23,6 +23,7 @@ import { pkg } from '../../settings';
|
|
23
23
|
import { Button } from '@carbon/react';
|
24
24
|
import { ActionSet } from '../ActionSet';
|
25
25
|
import { tearsheetHasCloseIcon, TearsheetShell } from './TearsheetShell';
|
26
|
+
import { portalType } from './TearsheetShell';
|
26
27
|
var componentName = 'Tearsheet';
|
27
28
|
|
28
29
|
// NOTE: the component SCSS is not imported here: it is rolled up separately.
|
@@ -178,7 +179,7 @@ Tearsheet.propTypes = _objectSpread({
|
|
178
179
|
/**
|
179
180
|
* The DOM element that the tearsheet should be rendered within. Defaults to document.body.
|
180
181
|
*/
|
181
|
-
portalTarget:
|
182
|
+
portalTarget: portalType,
|
182
183
|
/**
|
183
184
|
* Specify a CSS selector that matches the DOM element that should be focused when the Modal opens
|
184
185
|
*/
|
@@ -23,6 +23,7 @@ import { pkg } from '../../settings';
|
|
23
23
|
import { Button } from '@carbon/react';
|
24
24
|
import { ActionSet } from '../ActionSet';
|
25
25
|
import { tearsheetHasCloseIcon, TearsheetShell, tearsheetShellWideProps as blocked } from './TearsheetShell';
|
26
|
+
import { portalType } from './TearsheetShell';
|
26
27
|
var componentName = 'TearsheetNarrow';
|
27
28
|
|
28
29
|
// NOTE: the component SCSS is not imported here: it is rolled up separately.
|
@@ -144,7 +145,7 @@ TearsheetNarrow.propTypes = _objectSpread({
|
|
144
145
|
/**
|
145
146
|
* The DOM element that the tearsheet should be rendered within. Defaults to document.body.
|
146
147
|
*/
|
147
|
-
portalTarget:
|
148
|
+
portalTarget: portalType,
|
148
149
|
/**
|
149
150
|
* The main title of the tearsheet, displayed in the header area.
|
150
151
|
*/
|
@@ -262,6 +262,7 @@ export var TearsheetShell = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
262
262
|
// The display name of the component, used by React. Note that displayName
|
263
263
|
// is used in preference to relying on function.name.
|
264
264
|
TearsheetShell.displayName = componentName;
|
265
|
+
export var portalType = typeof Element === 'undefined' ? PropTypes.object : PropTypes.instanceOf(Element);
|
265
266
|
export var deprecatedProps = {
|
266
267
|
/**
|
267
268
|
* **Deprecated**
|
@@ -385,7 +386,7 @@ TearsheetShell.propTypes = _objectSpread({
|
|
385
386
|
/**
|
386
387
|
* The DOM element that the tearsheet should be rendered within. Defaults to document.body.
|
387
388
|
*/
|
388
|
-
portalTarget:
|
389
|
+
portalTarget: portalType,
|
389
390
|
/**
|
390
391
|
* Specifies the width of the tearsheet, 'narrow' or 'wide'.
|
391
392
|
*/
|
@@ -184,7 +184,7 @@ Tearsheet.propTypes = _objectSpread({
|
|
184
184
|
/**
|
185
185
|
* The DOM element that the tearsheet should be rendered within. Defaults to document.body.
|
186
186
|
*/
|
187
|
-
portalTarget:
|
187
|
+
portalTarget: _TearsheetShell.portalType,
|
188
188
|
/**
|
189
189
|
* Specify a CSS selector that matches the DOM element that should be focused when the Modal opens
|
190
190
|
*/
|
@@ -150,7 +150,7 @@ TearsheetNarrow.propTypes = _objectSpread({
|
|
150
150
|
/**
|
151
151
|
* The DOM element that the tearsheet should be rendered within. Defaults to document.body.
|
152
152
|
*/
|
153
|
-
portalTarget:
|
153
|
+
portalTarget: _TearsheetShell.portalType,
|
154
154
|
/**
|
155
155
|
* The main title of the tearsheet, displayed in the header area.
|
156
156
|
*/
|
@@ -5,7 +5,7 @@ var _typeof = require("@babel/runtime/helpers/typeof");
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
6
6
|
value: true
|
7
7
|
});
|
8
|
-
exports.tearsheetShellWideProps = exports.tearsheetIsPassive = exports.tearsheetHasCloseIcon = exports.deprecatedProps = exports.TearsheetShell = void 0;
|
8
|
+
exports.tearsheetShellWideProps = exports.tearsheetIsPassive = exports.tearsheetHasCloseIcon = exports.portalType = exports.deprecatedProps = exports.TearsheetShell = void 0;
|
9
9
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
10
10
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
11
11
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
@@ -272,6 +272,8 @@ var TearsheetShell = /*#__PURE__*/_react.default.forwardRef(function (_ref, ref)
|
|
272
272
|
// is used in preference to relying on function.name.
|
273
273
|
exports.TearsheetShell = TearsheetShell;
|
274
274
|
TearsheetShell.displayName = componentName;
|
275
|
+
var portalType = typeof Element === 'undefined' ? _propTypes.default.object : _propTypes.default.instanceOf(Element);
|
276
|
+
exports.portalType = portalType;
|
275
277
|
var deprecatedProps = {
|
276
278
|
/**
|
277
279
|
* **Deprecated**
|
@@ -396,7 +398,7 @@ TearsheetShell.propTypes = _objectSpread({
|
|
396
398
|
/**
|
397
399
|
* The DOM element that the tearsheet should be rendered within. Defaults to document.body.
|
398
400
|
*/
|
399
|
-
portalTarget:
|
401
|
+
portalTarget: portalType,
|
400
402
|
/**
|
401
403
|
* Specifies the width of the tearsheet, 'narrow' or 'wide'.
|
402
404
|
*/
|
package/package.json
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"name": "@carbon/ibm-products",
|
3
3
|
"description": "Carbon for IBM Products",
|
4
|
-
"version": "2.11.
|
4
|
+
"version": "2.11.3",
|
5
5
|
"license": "Apache-2.0",
|
6
6
|
"main": "lib/index.js",
|
7
7
|
"module": "es/index.js",
|
@@ -96,5 +96,5 @@
|
|
96
96
|
"react": "^16.8.6 || ^17.0.1 || ^18.2.0",
|
97
97
|
"react-dom": "^16.8.6 || ^17.0.1 || ^18.2.0"
|
98
98
|
},
|
99
|
-
"gitHead": "
|
99
|
+
"gitHead": "484cd1d6cf10c2774d1da47e3f392acf0a1aa183"
|
100
100
|
}
|