@carbon/react 1.15.0-rc.0 → 1.15.0
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/es/components/DataTable/TableExpandHeader.js +10 -2
- package/es/components/DataTable/TableExpandRow.js +2 -4
- package/es/components/ModalWrapper/ModalWrapper.js +8 -0
- package/lib/components/DataTable/TableExpandHeader.js +10 -2
- package/lib/components/DataTable/TableExpandRow.js +2 -4
- package/lib/components/ModalWrapper/ModalWrapper.js +8 -0
- package/package.json +4 -4
|
@@ -14,13 +14,15 @@ import React__default from 'react';
|
|
|
14
14
|
import { ChevronRight } from '@carbon/icons-react';
|
|
15
15
|
import { usePrefix } from '../../internal/usePrefix.js';
|
|
16
16
|
|
|
17
|
-
var _excluded = ["ariaLabel", "className", "enableExpando", "enableToggle", "isExpanded", "onExpand", "expandIconDescription", "children"];
|
|
17
|
+
var _excluded = ["ariaLabel", "className", "enableExpando", "enableToggle", "id", "isExpanded", "onExpand", "expandIconDescription", "children"];
|
|
18
18
|
|
|
19
19
|
var TableExpandHeader = function TableExpandHeader(_ref) {
|
|
20
20
|
var ariaLabel = _ref.ariaLabel,
|
|
21
21
|
headerClassName = _ref.className,
|
|
22
22
|
enableExpando = _ref.enableExpando,
|
|
23
23
|
enableToggle = _ref.enableToggle,
|
|
24
|
+
_ref$id = _ref.id,
|
|
25
|
+
id = _ref$id === void 0 ? 'expand' : _ref$id,
|
|
24
26
|
isExpanded = _ref.isExpanded,
|
|
25
27
|
onExpand = _ref.onExpand,
|
|
26
28
|
expandIconDescription = _ref.expandIconDescription,
|
|
@@ -33,7 +35,8 @@ var TableExpandHeader = function TableExpandHeader(_ref) {
|
|
|
33
35
|
return /*#__PURE__*/React__default.createElement("th", _extends({
|
|
34
36
|
scope: "col",
|
|
35
37
|
className: className,
|
|
36
|
-
"data-previous-value": previousValue
|
|
38
|
+
"data-previous-value": previousValue,
|
|
39
|
+
id: id
|
|
37
40
|
}, rest), enableExpando || enableToggle ? /*#__PURE__*/React__default.createElement("button", {
|
|
38
41
|
type: "button",
|
|
39
42
|
className: "".concat(prefix, "--table-expand__button"),
|
|
@@ -70,6 +73,11 @@ TableExpandHeader.propTypes = {
|
|
|
70
73
|
*/
|
|
71
74
|
expandIconDescription: PropTypes.string,
|
|
72
75
|
|
|
76
|
+
/**
|
|
77
|
+
* Supply an id to the th element.
|
|
78
|
+
*/
|
|
79
|
+
id: PropTypes.string,
|
|
80
|
+
|
|
73
81
|
/**
|
|
74
82
|
* Specify whether this row is expanded or not. This helps coordinate data
|
|
75
83
|
* attributes so that `TableExpandRow` and `TableExpandedRow` work together
|
|
@@ -25,7 +25,8 @@ var TableExpandRow = function TableExpandRow(_ref) {
|
|
|
25
25
|
onExpand = _ref.onExpand,
|
|
26
26
|
expandIconDescription = _ref.expandIconDescription,
|
|
27
27
|
isSelected = _ref.isSelected,
|
|
28
|
-
expandHeader = _ref.expandHeader,
|
|
28
|
+
_ref$expandHeader = _ref.expandHeader,
|
|
29
|
+
expandHeader = _ref$expandHeader === void 0 ? 'expand' : _ref$expandHeader,
|
|
29
30
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
30
31
|
|
|
31
32
|
var prefix = usePrefix();
|
|
@@ -85,9 +86,6 @@ TableExpandRow.propTypes = {
|
|
|
85
86
|
*/
|
|
86
87
|
onExpand: PropTypes.func.isRequired
|
|
87
88
|
};
|
|
88
|
-
TableExpandRow.defaultProps = {
|
|
89
|
-
expandHeader: 'expand'
|
|
90
|
-
};
|
|
91
89
|
var TableExpandRow$1 = TableExpandRow;
|
|
92
90
|
|
|
93
91
|
export { TableExpandRow$1 as default };
|
|
@@ -11,8 +11,10 @@ import React__default from 'react';
|
|
|
11
11
|
import Modal from '../Modal/Modal.js';
|
|
12
12
|
import Button from '../Button/Button.js';
|
|
13
13
|
import { ButtonKinds } from '../../prop-types/types.js';
|
|
14
|
+
import { warning } from '../../internal/warning.js';
|
|
14
15
|
|
|
15
16
|
var _excluded = ["children", "onKeyDown", "buttonTriggerText", "buttonTriggerClassName", "renderTriggerButtonIcon", "triggerButtonIconDescription", "triggerButtonKind", "disabled", "handleSubmit", "shouldCloseAfterSubmit", "selectorPrimaryFocus", "preventCloseOnClickOutside"];
|
|
17
|
+
var didWarnAboutDeprecation = false;
|
|
16
18
|
|
|
17
19
|
var ModalWrapper = /*#__PURE__*/function (_React$Component) {
|
|
18
20
|
_inherits(ModalWrapper, _React$Component);
|
|
@@ -76,6 +78,12 @@ var ModalWrapper = /*#__PURE__*/function (_React$Component) {
|
|
|
76
78
|
}
|
|
77
79
|
|
|
78
80
|
_createClass(ModalWrapper, [{
|
|
81
|
+
key: "if",
|
|
82
|
+
value: function _if(__DEV__) {
|
|
83
|
+
process.env.NODE_ENV !== "production" ? warning(didWarnAboutDeprecation, '`<ModalWrapper>` has been deprecated in favor of `<ComposedModal/>` and will be removed in the next major version, `@carbon/react@v2.x`') : void 0;
|
|
84
|
+
didWarnAboutDeprecation = true;
|
|
85
|
+
}
|
|
86
|
+
}, {
|
|
79
87
|
key: "render",
|
|
80
88
|
value: function render() {
|
|
81
89
|
var _this2 = this;
|
|
@@ -24,13 +24,15 @@ var cx__default = /*#__PURE__*/_interopDefaultLegacy(cx);
|
|
|
24
24
|
var PropTypes__default = /*#__PURE__*/_interopDefaultLegacy(PropTypes);
|
|
25
25
|
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
26
26
|
|
|
27
|
-
var _excluded = ["ariaLabel", "className", "enableExpando", "enableToggle", "isExpanded", "onExpand", "expandIconDescription", "children"];
|
|
27
|
+
var _excluded = ["ariaLabel", "className", "enableExpando", "enableToggle", "id", "isExpanded", "onExpand", "expandIconDescription", "children"];
|
|
28
28
|
|
|
29
29
|
var TableExpandHeader = function TableExpandHeader(_ref) {
|
|
30
30
|
var ariaLabel = _ref.ariaLabel,
|
|
31
31
|
headerClassName = _ref.className,
|
|
32
32
|
enableExpando = _ref.enableExpando,
|
|
33
33
|
enableToggle = _ref.enableToggle,
|
|
34
|
+
_ref$id = _ref.id,
|
|
35
|
+
id = _ref$id === void 0 ? 'expand' : _ref$id,
|
|
34
36
|
isExpanded = _ref.isExpanded,
|
|
35
37
|
onExpand = _ref.onExpand,
|
|
36
38
|
expandIconDescription = _ref.expandIconDescription,
|
|
@@ -43,7 +45,8 @@ var TableExpandHeader = function TableExpandHeader(_ref) {
|
|
|
43
45
|
return /*#__PURE__*/React__default["default"].createElement("th", _rollupPluginBabelHelpers["extends"]({
|
|
44
46
|
scope: "col",
|
|
45
47
|
className: className,
|
|
46
|
-
"data-previous-value": previousValue
|
|
48
|
+
"data-previous-value": previousValue,
|
|
49
|
+
id: id
|
|
47
50
|
}, rest), enableExpando || enableToggle ? /*#__PURE__*/React__default["default"].createElement("button", {
|
|
48
51
|
type: "button",
|
|
49
52
|
className: "".concat(prefix, "--table-expand__button"),
|
|
@@ -80,6 +83,11 @@ TableExpandHeader.propTypes = {
|
|
|
80
83
|
*/
|
|
81
84
|
expandIconDescription: PropTypes__default["default"].string,
|
|
82
85
|
|
|
86
|
+
/**
|
|
87
|
+
* Supply an id to the th element.
|
|
88
|
+
*/
|
|
89
|
+
id: PropTypes__default["default"].string,
|
|
90
|
+
|
|
83
91
|
/**
|
|
84
92
|
* Specify whether this row is expanded or not. This helps coordinate data
|
|
85
93
|
* attributes so that `TableExpandRow` and `TableExpandedRow` work together
|
|
@@ -35,7 +35,8 @@ var TableExpandRow = function TableExpandRow(_ref) {
|
|
|
35
35
|
onExpand = _ref.onExpand,
|
|
36
36
|
expandIconDescription = _ref.expandIconDescription,
|
|
37
37
|
isSelected = _ref.isSelected,
|
|
38
|
-
expandHeader = _ref.expandHeader,
|
|
38
|
+
_ref$expandHeader = _ref.expandHeader,
|
|
39
|
+
expandHeader = _ref$expandHeader === void 0 ? 'expand' : _ref$expandHeader,
|
|
39
40
|
rest = _rollupPluginBabelHelpers.objectWithoutProperties(_ref, _excluded);
|
|
40
41
|
|
|
41
42
|
var prefix = usePrefix.usePrefix();
|
|
@@ -95,9 +96,6 @@ TableExpandRow.propTypes = {
|
|
|
95
96
|
*/
|
|
96
97
|
onExpand: PropTypes__default["default"].func.isRequired
|
|
97
98
|
};
|
|
98
|
-
TableExpandRow.defaultProps = {
|
|
99
|
-
expandHeader: 'expand'
|
|
100
|
-
};
|
|
101
99
|
var TableExpandRow$1 = TableExpandRow;
|
|
102
100
|
|
|
103
101
|
exports["default"] = TableExpandRow$1;
|
|
@@ -15,6 +15,7 @@ var React = require('react');
|
|
|
15
15
|
var Modal = require('../Modal/Modal.js');
|
|
16
16
|
var Button = require('../Button/Button.js');
|
|
17
17
|
var types = require('../../prop-types/types.js');
|
|
18
|
+
var warning = require('../../internal/warning.js');
|
|
18
19
|
|
|
19
20
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
20
21
|
|
|
@@ -22,6 +23,7 @@ var PropTypes__default = /*#__PURE__*/_interopDefaultLegacy(PropTypes);
|
|
|
22
23
|
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
23
24
|
|
|
24
25
|
var _excluded = ["children", "onKeyDown", "buttonTriggerText", "buttonTriggerClassName", "renderTriggerButtonIcon", "triggerButtonIconDescription", "triggerButtonKind", "disabled", "handleSubmit", "shouldCloseAfterSubmit", "selectorPrimaryFocus", "preventCloseOnClickOutside"];
|
|
26
|
+
var didWarnAboutDeprecation = false;
|
|
25
27
|
|
|
26
28
|
var ModalWrapper = /*#__PURE__*/function (_React$Component) {
|
|
27
29
|
_rollupPluginBabelHelpers.inherits(ModalWrapper, _React$Component);
|
|
@@ -85,6 +87,12 @@ var ModalWrapper = /*#__PURE__*/function (_React$Component) {
|
|
|
85
87
|
}
|
|
86
88
|
|
|
87
89
|
_rollupPluginBabelHelpers.createClass(ModalWrapper, [{
|
|
90
|
+
key: "if",
|
|
91
|
+
value: function _if(__DEV__) {
|
|
92
|
+
process.env.NODE_ENV !== "production" ? warning.warning(didWarnAboutDeprecation, '`<ModalWrapper>` has been deprecated in favor of `<ComposedModal/>` and will be removed in the next major version, `@carbon/react@v2.x`') : void 0;
|
|
93
|
+
didWarnAboutDeprecation = true;
|
|
94
|
+
}
|
|
95
|
+
}, {
|
|
88
96
|
key: "render",
|
|
89
97
|
value: function render() {
|
|
90
98
|
var _this2 = this;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@carbon/react",
|
|
3
3
|
"description": "React components for the Carbon Design System",
|
|
4
|
-
"version": "1.15.0
|
|
4
|
+
"version": "1.15.0",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"main": "lib/index.js",
|
|
7
7
|
"module": "es/index.js",
|
|
@@ -44,9 +44,9 @@
|
|
|
44
44
|
"dependencies": {
|
|
45
45
|
"@babel/runtime": "^7.18.3",
|
|
46
46
|
"@carbon/feature-flags": "^0.9.0",
|
|
47
|
-
"@carbon/icons-react": "^11.10.0
|
|
47
|
+
"@carbon/icons-react": "^11.10.0",
|
|
48
48
|
"@carbon/layout": "^11.7.0",
|
|
49
|
-
"@carbon/styles": "^1.15.0
|
|
49
|
+
"@carbon/styles": "^1.15.0",
|
|
50
50
|
"@carbon/telemetry": "0.1.0",
|
|
51
51
|
"classnames": "2.3.2",
|
|
52
52
|
"copy-to-clipboard": "^3.3.1",
|
|
@@ -131,5 +131,5 @@
|
|
|
131
131
|
"**/*.scss",
|
|
132
132
|
"**/*.css"
|
|
133
133
|
],
|
|
134
|
-
"gitHead": "
|
|
134
|
+
"gitHead": "054a150b280bdebff03047535ffe48353d7d5008"
|
|
135
135
|
}
|