@carbon-labs/react-ui-shell 0.11.0 → 0.12.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/SideNav.js
CHANGED
|
@@ -296,7 +296,11 @@ function SideNavRenderFunction(_ref, ref) {
|
|
|
296
296
|
const lgMediaQuery = `(min-width: ${breakpoints.lg.width})`;
|
|
297
297
|
const isLg = useMatchMedia(lgMediaQuery);
|
|
298
298
|
function resetNodeTabIndices() {
|
|
299
|
-
|
|
299
|
+
const items = sideNavRef?.current?.querySelectorAll('[tabIndex="0"]') ?? [];
|
|
300
|
+
items.forEach(item => {
|
|
301
|
+
if (item.classList.contains(`${prefix}--side-nav__toggle`)) {
|
|
302
|
+
return;
|
|
303
|
+
}
|
|
300
304
|
item.tabIndex = -1;
|
|
301
305
|
});
|
|
302
306
|
}
|
|
@@ -315,7 +319,7 @@ function SideNavRenderFunction(_ref, ref) {
|
|
|
315
319
|
tabIndex: -1,
|
|
316
320
|
ref: navRef,
|
|
317
321
|
className: `${prefix}--side-nav__navigation ${className}`,
|
|
318
|
-
inert: !isRail
|
|
322
|
+
inert: !isRail && navType !== SIDE_NAV_TYPE.PANEL && !(expanded || isLg) ? -1 : undefined
|
|
319
323
|
}, accessibilityLabel, eventHandlers, other), childrenToRender, navType === SIDE_NAV_TYPE.PANEL && /*#__PURE__*/React.createElement(SideNavToggle, {
|
|
320
324
|
renderIcon: expandedState ? SidePanelClose : SidePanelOpen,
|
|
321
325
|
onClick: () => setExpandedState(!expandedState)
|
|
@@ -317,7 +317,11 @@ function SideNavRenderFunction(_ref, ref) {
|
|
|
317
317
|
const lgMediaQuery = `(min-width: ${index$1.breakpoints.lg.width})`;
|
|
318
318
|
const isLg = useMatchMedia.useMatchMedia(lgMediaQuery);
|
|
319
319
|
function resetNodeTabIndices() {
|
|
320
|
-
|
|
320
|
+
const items = sideNavRef?.current?.querySelectorAll('[tabIndex="0"]') ?? [];
|
|
321
|
+
items.forEach(item => {
|
|
322
|
+
if (item.classList.contains(`${prefix}--side-nav__toggle`)) {
|
|
323
|
+
return;
|
|
324
|
+
}
|
|
321
325
|
item.tabIndex = -1;
|
|
322
326
|
});
|
|
323
327
|
}
|
|
@@ -336,7 +340,7 @@ function SideNavRenderFunction(_ref, ref) {
|
|
|
336
340
|
tabIndex: -1,
|
|
337
341
|
ref: navRef,
|
|
338
342
|
className: `${prefix}--side-nav__navigation ${className}`,
|
|
339
|
-
inert: !isRail
|
|
343
|
+
inert: !isRail && navType !== SIDE_NAV_TYPE.PANEL && !(expanded || isLg) ? -1 : undefined
|
|
340
344
|
}, accessibilityLabel, eventHandlers, other), childrenToRender, navType === SIDE_NAV_TYPE.PANEL && /*#__PURE__*/React.createElement(SideNavToggle.SideNavToggle, {
|
|
341
345
|
renderIcon: expandedState ? bucket15.SidePanelClose : bucket15.SidePanelOpen,
|
|
342
346
|
onClick: () => setExpandedState(!expandedState)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@carbon-labs/react-ui-shell",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.12.0",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public",
|
|
6
6
|
"provenance": true
|
|
@@ -33,5 +33,5 @@
|
|
|
33
33
|
"dependencies": {
|
|
34
34
|
"@ibm/telemetry-js": "^1.9.1"
|
|
35
35
|
},
|
|
36
|
-
"gitHead": "
|
|
36
|
+
"gitHead": "e79eaa2160768d192cac006f6c533a35ab6f298e"
|
|
37
37
|
}
|