carbon-react 104.58.2 → 104.58.3

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.
@@ -109,6 +109,8 @@ const MenuItem = ({
109
109
 
110
110
  const getTitle = title => maxWidth && typeof title === "string" ? title : "";
111
111
 
112
+ const itemMaxWidth = !inFullscreenView ? maxWidth : undefined;
113
+
112
114
  if (submenu) {
113
115
  const asPassiveItem = !(onClick || href);
114
116
  return /*#__PURE__*/React.createElement(StyledMenuItem, _extends({
@@ -116,7 +118,7 @@ const MenuItem = ({
116
118
  menuType: menuContext.menuType,
117
119
  display: "inline-block",
118
120
  title: getTitle(submenu),
119
- maxWidth: maxWidth,
121
+ maxWidth: itemMaxWidth,
120
122
  onClick: updateFocusOnClick
121
123
  }, rest, {
122
124
  inFullscreenView: inFullscreenView
@@ -140,7 +142,7 @@ const MenuItem = ({
140
142
  inSubmenu: submenuContext.handleKeyDown !== undefined,
141
143
  display: "inline-block",
142
144
  title: getTitle(children),
143
- maxWidth: maxWidth
145
+ maxWidth: itemMaxWidth
144
146
  }, rest, {
145
147
  inFullscreenView: inFullscreenView && !Object.keys(submenuContext).length,
146
148
  menuOpen: menuOpen
@@ -136,6 +136,8 @@ const MenuItem = ({
136
136
 
137
137
  const getTitle = title => maxWidth && typeof title === "string" ? title : "";
138
138
 
139
+ const itemMaxWidth = !inFullscreenView ? maxWidth : undefined;
140
+
139
141
  if (submenu) {
140
142
  const asPassiveItem = !(onClick || href);
141
143
  return /*#__PURE__*/_react.default.createElement(_menu2.StyledMenuItem, _extends({
@@ -143,7 +145,7 @@ const MenuItem = ({
143
145
  menuType: menuContext.menuType,
144
146
  display: "inline-block",
145
147
  title: getTitle(submenu),
146
- maxWidth: maxWidth,
148
+ maxWidth: itemMaxWidth,
147
149
  onClick: updateFocusOnClick
148
150
  }, rest, {
149
151
  inFullscreenView: inFullscreenView
@@ -167,7 +169,7 @@ const MenuItem = ({
167
169
  inSubmenu: submenuContext.handleKeyDown !== undefined,
168
170
  display: "inline-block",
169
171
  title: getTitle(children),
170
- maxWidth: maxWidth
172
+ maxWidth: itemMaxWidth
171
173
  }, rest, {
172
174
  inFullscreenView: inFullscreenView && !Object.keys(submenuContext).length,
173
175
  menuOpen: menuOpen
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "carbon-react",
3
- "version": "104.58.2",
3
+ "version": "104.58.3",
4
4
  "description": "A library of reusable React components for easily building user interfaces.",
5
5
  "engineStrict": true,
6
6
  "engines": {