@carbon/ibm-products 2.11.1 → 2.11.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -75,6 +75,7 @@ var CustomizeColumnsTearsheet = function CustomizeColumnsTearsheet(_ref) {
75
75
  isDirty = _useState10[0],
76
76
  setIsDirty = _useState10[1];
77
77
  var onRequestClose = function onRequestClose() {
78
+ setColumnObjects(columnDefinitions);
78
79
  setIsTearsheetOpen(false);
79
80
  };
80
81
  var onRequestSubmit = function onRequestSubmit() {
@@ -39,7 +39,7 @@ export var Saving = /*#__PURE__*/forwardRef(function (_ref, ref) {
39
39
  text: defaultText,
40
40
  iconDescription: defaultIconDescription,
41
41
  icon: function icon(props) {
42
- return /*#__PURE__*/React.createElement(CheckmarkOutline, _extends({
42
+ return /*#__PURE__*/React.createElement(Save, _extends({
43
43
  size: 16
44
44
  }, props));
45
45
  }
@@ -56,7 +56,7 @@ export var Saving = /*#__PURE__*/forwardRef(function (_ref, ref) {
56
56
  text: successText,
57
57
  iconDescription: successIconDescription,
58
58
  icon: function icon(props) {
59
- return /*#__PURE__*/React.createElement(Save, _extends({
59
+ return /*#__PURE__*/React.createElement(CheckmarkOutline, _extends({
60
60
  size: 16
61
61
  }, props));
62
62
  }
@@ -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: PropTypes.instanceOf(Element),
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: PropTypes.instanceOf(Element),
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: PropTypes.instanceOf(Element),
389
+ portalTarget: portalType,
389
390
  /**
390
391
  * Specifies the width of the tearsheet, 'narrow' or 'wide'.
391
392
  */
@@ -82,6 +82,7 @@ var CustomizeColumnsTearsheet = function CustomizeColumnsTearsheet(_ref) {
82
82
  isDirty = _useState10[0],
83
83
  setIsDirty = _useState10[1];
84
84
  var onRequestClose = function onRequestClose() {
85
+ setColumnObjects(columnDefinitions);
85
86
  setIsTearsheetOpen(false);
86
87
  };
87
88
  var onRequestSubmit = function onRequestSubmit() {
@@ -48,7 +48,7 @@ var Saving = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
48
48
  text: defaultText,
49
49
  iconDescription: defaultIconDescription,
50
50
  icon: function icon(props) {
51
- return /*#__PURE__*/_react.default.createElement(_icons.CheckmarkOutline, (0, _extends2.default)({
51
+ return /*#__PURE__*/_react.default.createElement(_icons.Save, (0, _extends2.default)({
52
52
  size: 16
53
53
  }, props));
54
54
  }
@@ -65,7 +65,7 @@ var Saving = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
65
65
  text: successText,
66
66
  iconDescription: successIconDescription,
67
67
  icon: function icon(props) {
68
- return /*#__PURE__*/_react.default.createElement(_icons.Save, (0, _extends2.default)({
68
+ return /*#__PURE__*/_react.default.createElement(_icons.CheckmarkOutline, (0, _extends2.default)({
69
69
  size: 16
70
70
  }, props));
71
71
  }
@@ -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: _propTypes.default.instanceOf(Element),
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: _propTypes.default.instanceOf(Element),
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: _propTypes.default.instanceOf(Element),
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.1",
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": "7764b5a83d2878931c637c3a76e04c857f0aeb19"
99
+ "gitHead": "484cd1d6cf10c2774d1da47e3f392acf0a1aa183"
100
100
  }