@carbon/react 1.70.0-rc.0 → 1.70.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/.playwright/INTERNAL_AVT_REPORT_DO_NOT_USE.json +829 -829
- package/es/components/CheckboxGroup/CheckboxGroup.js +1 -1
- package/es/components/ComboBox/ComboBox.js +16 -8
- package/es/components/ComposedModal/ComposedModal.js +6 -2
- package/es/components/DataTable/Table.d.ts +9 -1
- package/es/components/DataTable/Table.js +7 -2
- package/es/components/DatePicker/DatePicker.js +0 -8
- package/es/components/DatePicker/plugins/appendToPlugin.js +2 -2
- package/es/components/DatePicker/plugins/fixEventsPlugin.js +2 -2
- package/es/components/DatePicker/plugins/rangePlugin.js +2 -2
- package/es/components/OverflowMenu/OverflowMenu.js +1 -1
- package/es/components/Pagination/Pagination.js +1 -1
- package/es/components/Pagination/experimental/PageSelector.js +1 -1
- package/es/components/Popover/index.js +2 -2
- package/es/components/SkeletonText/SkeletonText.js +1 -1
- package/es/components/TreeView/TreeNode.js +1 -1
- package/es/components/TreeView/TreeView.js +1 -1
- package/es/components/UIShell/HeaderMenu.js +1 -1
- package/es/components/UIShell/SideNav.js +1 -1
- package/es/components/UIShell/SideNavItems.js +1 -1
- package/es/components/UIShell/SideNavMenu.js +1 -1
- package/es/components/UIShell/Switcher.js +1 -1
- package/lib/components/CheckboxGroup/CheckboxGroup.js +1 -1
- package/lib/components/ComboBox/ComboBox.js +17 -8
- package/lib/components/ComposedModal/ComposedModal.js +6 -2
- package/lib/components/DataTable/Table.d.ts +9 -1
- package/lib/components/DataTable/Table.js +7 -2
- package/lib/components/DatePicker/DatePicker.js +0 -8
- package/lib/components/DatePicker/plugins/appendToPlugin.js +2 -2
- package/lib/components/DatePicker/plugins/fixEventsPlugin.js +2 -2
- package/lib/components/DatePicker/plugins/rangePlugin.js +2 -2
- package/lib/components/OverflowMenu/OverflowMenu.js +1 -1
- package/lib/components/Pagination/Pagination.js +1 -1
- package/lib/components/Pagination/experimental/PageSelector.js +1 -1
- package/lib/components/Popover/index.js +2 -2
- package/lib/components/SkeletonText/SkeletonText.js +1 -1
- package/lib/components/TreeView/TreeNode.js +1 -1
- package/lib/components/TreeView/TreeView.js +1 -1
- package/lib/components/UIShell/HeaderMenu.js +1 -1
- package/lib/components/UIShell/SideNav.js +1 -1
- package/lib/components/UIShell/SideNavItems.js +1 -1
- package/lib/components/UIShell/SideNavMenu.js +1 -1
- package/lib/components/UIShell/Switcher.js +1 -1
- package/package.json +4 -4
|
@@ -73,7 +73,7 @@ const TreeNode = /*#__PURE__*/React__default["default"].forwardRef((_ref, forwar
|
|
|
73
73
|
}
|
|
74
74
|
};
|
|
75
75
|
const nodesWithProps = React__default["default"].Children.map(children, node => {
|
|
76
|
-
if (
|
|
76
|
+
if (/*#__PURE__*/React__default["default"].isValidElement(node)) {
|
|
77
77
|
return /*#__PURE__*/React__default["default"].cloneElement(node, {
|
|
78
78
|
active,
|
|
79
79
|
depth: depth + 1,
|
|
@@ -131,7 +131,7 @@ const TreeView = _ref => {
|
|
|
131
131
|
sharedNodeProps.tabIndex = 0;
|
|
132
132
|
focusTarget = true;
|
|
133
133
|
}
|
|
134
|
-
if (
|
|
134
|
+
if (/*#__PURE__*/React__default["default"].isValidElement(node)) {
|
|
135
135
|
return /*#__PURE__*/React__default["default"].cloneElement(node, sharedNodeProps);
|
|
136
136
|
}
|
|
137
137
|
});
|
|
@@ -134,7 +134,7 @@ class HeaderMenu extends React__default["default"].Component {
|
|
|
134
134
|
* sequence when they might not want to go through all the items.
|
|
135
135
|
*/
|
|
136
136
|
_rollupPluginBabelHelpers.defineProperty(this, "_renderMenuItem", (item, index) => {
|
|
137
|
-
if (
|
|
137
|
+
if (/*#__PURE__*/React__default["default"].isValidElement(item)) {
|
|
138
138
|
return /*#__PURE__*/React__default["default"].cloneElement(item, {
|
|
139
139
|
ref: this.handleItemRef(index)
|
|
140
140
|
});
|
|
@@ -106,7 +106,7 @@ function SideNavRenderFunction(_ref, ref) {
|
|
|
106
106
|
childrenToRender = React__default["default"].Children.map(children, child => {
|
|
107
107
|
// if we are controlled, check for if we have hovered over or the expanded state, else just use the expanded state (uncontrolled)
|
|
108
108
|
const currentExpansionState = controlled ? expandedViaHoverState || expanded : expanded;
|
|
109
|
-
if (
|
|
109
|
+
if (/*#__PURE__*/React.isValidElement(child)) {
|
|
110
110
|
const childJsxElement = child;
|
|
111
111
|
// avoid spreading `isSideNavExpanded` to non-Carbon UI Shell children
|
|
112
112
|
return /*#__PURE__*/React__default["default"].cloneElement(childJsxElement, {
|
|
@@ -30,7 +30,7 @@ const SideNavItems = _ref => {
|
|
|
30
30
|
const prefix = usePrefix.usePrefix();
|
|
31
31
|
const className = cx__default["default"]([`${prefix}--side-nav__items`], customClassName);
|
|
32
32
|
const childrenWithExpandedState = React__default["default"].Children.map(children, child => {
|
|
33
|
-
if (
|
|
33
|
+
if (/*#__PURE__*/React__default["default"].isValidElement(child)) {
|
|
34
34
|
// avoid spreading `isSideNavExpanded` to non-Carbon UI Shell children
|
|
35
35
|
const childDisplayName = child.type?.displayName;
|
|
36
36
|
return /*#__PURE__*/React__default["default"].cloneElement(child, {
|
|
@@ -158,7 +158,7 @@ function hasActiveDescendant(children) {
|
|
|
158
158
|
|
|
159
159
|
// We use React.isValidElement(child) to check if the child is a valid React element before accessing its props
|
|
160
160
|
|
|
161
|
-
if (
|
|
161
|
+
if (/*#__PURE__*/React__default["default"].isValidElement(children)) {
|
|
162
162
|
const props = children.props;
|
|
163
163
|
if (props.isActive === true || props['aria-current']) {
|
|
164
164
|
return true;
|
|
@@ -72,7 +72,7 @@ const Switcher = /*#__PURE__*/React.forwardRef(function Switcher(props, forwardR
|
|
|
72
72
|
};
|
|
73
73
|
const childrenWithProps = React__default["default"].Children.toArray(children).map((child, index) => {
|
|
74
74
|
// only setup click handlers if onChange event is passed
|
|
75
|
-
if (
|
|
75
|
+
if (/*#__PURE__*/React__default["default"].isValidElement(child) && child.type && getDisplayName["default"](child.type) === 'Switcher') {
|
|
76
76
|
return /*#__PURE__*/React__default["default"].cloneElement(child, {
|
|
77
77
|
handleSwitcherItemFocus,
|
|
78
78
|
index,
|
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.70.0
|
|
4
|
+
"version": "1.70.0",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"main": "lib/index.js",
|
|
7
7
|
"module": "es/index.js",
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
"@carbon/feature-flags": "^0.24.0",
|
|
53
53
|
"@carbon/icons-react": "^11.52.0",
|
|
54
54
|
"@carbon/layout": "^11.28.0",
|
|
55
|
-
"@carbon/styles": "^1.69.0
|
|
55
|
+
"@carbon/styles": "^1.69.0",
|
|
56
56
|
"@floating-ui/react": "^0.26.0",
|
|
57
57
|
"@ibm/telemetry-js": "^1.5.0",
|
|
58
58
|
"classnames": "2.5.1",
|
|
@@ -82,7 +82,7 @@
|
|
|
82
82
|
"@babel/preset-typescript": "^7.24.7",
|
|
83
83
|
"@carbon/test-utils": "^10.34.0",
|
|
84
84
|
"@carbon/themes": "^11.43.0",
|
|
85
|
-
"@figma/code-connect": "^1.1
|
|
85
|
+
"@figma/code-connect": "^1.2.1",
|
|
86
86
|
"@rollup/plugin-babel": "^6.0.0",
|
|
87
87
|
"@rollup/plugin-commonjs": "^28.0.0",
|
|
88
88
|
"@rollup/plugin-node-resolve": "^15.0.0",
|
|
@@ -146,5 +146,5 @@
|
|
|
146
146
|
"**/*.scss",
|
|
147
147
|
"**/*.css"
|
|
148
148
|
],
|
|
149
|
-
"gitHead": "
|
|
149
|
+
"gitHead": "aa67ac9b298f921c558984fa6abbb90c33e9ef93"
|
|
150
150
|
}
|