@carbon-labs/react-ui-shell 0.86.0 → 0.88.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/HeaderContainer.js +2 -2
- package/es/components/HeaderDivider.js +2 -2
- package/es/components/HeaderOverflowPanel.js +5 -5
- package/es/components/HeaderPopover.js +6 -6
- package/es/components/Link.js +2 -2
- package/es/components/Profile.js +17 -17
- package/es/components/SharkFinIcon.js +6 -6
- package/es/components/SideNav.js +10 -10
- package/es/components/SideNavFlyoutMenu.js +9 -9
- package/es/components/SideNavItems.js +5 -5
- package/es/components/SideNavLink.js +7 -7
- package/es/components/SideNavLinkPopover.js +2 -2
- package/es/components/SideNavMenu.js +24 -24
- package/es/components/SideNavMenuItem.js +7 -7
- package/es/components/SideNavSlot.js +4 -4
- package/es/components/SideNavTitle.js +3 -3
- package/es/components/SideNavToggle.js +7 -7
- package/es/components/TrialCountdown.js +3 -3
- package/es/internal/useId.js +2 -2
- package/es/internal/useIdPrefix.js +3 -3
- package/es/internal/usePrefix.js +3 -3
- package/lib/components/HeaderContainer.js +10 -10
- package/lib/components/HeaderDivider.js +2 -2
- package/lib/components/HeaderOverflowPanel.js +5 -5
- package/lib/components/HeaderPopover.js +9 -9
- package/lib/components/Link.js +3 -3
- package/lib/components/Profile.js +17 -17
- package/lib/components/SharkFinIcon.js +6 -6
- package/lib/components/SideNav.js +23 -23
- package/lib/components/SideNavFlyoutMenu.js +22 -22
- package/lib/components/SideNavItems.js +8 -8
- package/lib/components/SideNavLink.js +9 -9
- package/lib/components/SideNavLinkPopover.js +2 -2
- package/lib/components/SideNavMenu.js +42 -42
- package/lib/components/SideNavMenuItem.js +8 -8
- package/lib/components/SideNavSlot.js +4 -4
- package/lib/components/SideNavTitle.js +3 -3
- package/lib/components/SideNavToggle.js +9 -9
- package/lib/components/TrialCountdown.js +3 -3
- package/lib/es/components/HeaderContainer.d.ts +2 -2
- package/lib/es/components/HeaderDivider.d.ts +2 -2
- package/lib/es/components/HeaderOverflowPanel.d.ts +2 -2
- package/lib/es/components/HeaderPopover.d.ts +4 -4
- package/lib/es/components/Link.d.ts +3 -3
- package/lib/es/components/Profile.d.ts +7 -7
- package/lib/es/components/SharkFinIcon.d.ts +2 -2
- package/lib/es/components/SideNav.d.ts +4 -4
- package/lib/es/components/SideNavFlyoutMenu.d.ts +2 -2
- package/lib/es/components/SideNavItems.d.ts +2 -2
- package/lib/es/components/SideNavLink.d.ts +2 -2
- package/lib/es/components/SideNavLinkPopover.d.ts +2 -2
- package/lib/es/components/SideNavMenu.d.ts +2 -2
- package/lib/es/components/SideNavMenuItem.d.ts +2 -2
- package/lib/es/components/SideNavSlot.d.ts +2 -2
- package/lib/es/components/SideNavTitle.d.ts +3 -3
- package/lib/es/components/SideNavToggle.d.ts +2 -2
- package/lib/es/components/TrialCountdown.d.ts +2 -2
- package/lib/es/internal/useIdPrefix.d.ts +2 -2
- package/lib/es/internal/usePrefix.d.ts +2 -2
- package/lib/internal/useDelayedState.js +5 -5
- package/lib/internal/useEvent.js +4 -4
- package/lib/internal/useId.js +5 -5
- package/lib/internal/useIdPrefix.js +3 -3
- package/lib/internal/useMatchMedia.js +3 -3
- package/lib/internal/useMergedRefs.js +2 -2
- package/lib/internal/usePrefix.js +3 -3
- package/package.json +4 -6
- package/scss/styles/_header-divider.scss +1 -0
- package/scss/styles/_header.scss +13 -1
- package/scss/styles/_profile.scss +4 -1
- package/LICENSE +0 -201
- package/es/node_modules/@carbon/ibm-products/es/_virtual/_commonjsHelpers.js +0 -12
- package/es/node_modules/@carbon/ibm-products/es/_virtual/_rollupPluginBabelHelpers.js +0 -18
- package/es/node_modules/@carbon/ibm-products/es/_virtual/index.js +0 -14
- package/es/node_modules/@carbon/ibm-products/es/_virtual/index2.js +0 -12
- package/es/node_modules/@carbon/ibm-products/es/components/TooltipTrigger/TooltipTrigger.js +0 -62
- package/es/node_modules/@carbon/ibm-products/es/components/UserAvatar/UserAvatar.js +0 -161
- package/es/node_modules/@carbon/ibm-products/es/components/_Canary/Canary.js +0 -49
- package/es/node_modules/@carbon/ibm-products/es/global/js/package-settings.js +0 -246
- package/es/node_modules/@carbon/ibm-products/es/global/js/utils/devtools.js +0 -16
- package/es/node_modules/@carbon/ibm-products/es/global/js/utils/pconsole.js +0 -35
- package/es/node_modules/@carbon/ibm-products/es/node_modules/object-assign/index.js +0 -89
- package/es/node_modules/@carbon/ibm-products/es/node_modules/prop-types/checkPropTypes.js +0 -95
- package/es/node_modules/@carbon/ibm-products/es/node_modules/prop-types/factoryWithThrowingShims.js +0 -64
- package/es/node_modules/@carbon/ibm-products/es/node_modules/prop-types/factoryWithTypeCheckers.js +0 -561
- package/es/node_modules/@carbon/ibm-products/es/node_modules/prop-types/index.js +0 -32
- package/es/node_modules/@carbon/ibm-products/es/node_modules/prop-types/lib/ReactPropTypesSecret.js +0 -18
- package/es/node_modules/@carbon/ibm-products/es/node_modules/prop-types/lib/has.js +0 -17
- package/es/node_modules/@carbon/ibm-products/es/settings.js +0 -84
- package/lib/node_modules/@carbon/ibm-products/es/_virtual/_commonjsHelpers.js +0 -14
- package/lib/node_modules/@carbon/ibm-products/es/_virtual/_rollupPluginBabelHelpers.js +0 -20
- package/lib/node_modules/@carbon/ibm-products/es/_virtual/index.js +0 -19
- package/lib/node_modules/@carbon/ibm-products/es/_virtual/index2.js +0 -14
- package/lib/node_modules/@carbon/ibm-products/es/components/TooltipTrigger/TooltipTrigger.js +0 -64
- package/lib/node_modules/@carbon/ibm-products/es/components/UserAvatar/UserAvatar.js +0 -163
- package/lib/node_modules/@carbon/ibm-products/es/components/_Canary/Canary.js +0 -51
- package/lib/node_modules/@carbon/ibm-products/es/global/js/package-settings.js +0 -252
- package/lib/node_modules/@carbon/ibm-products/es/global/js/utils/devtools.js +0 -20
- package/lib/node_modules/@carbon/ibm-products/es/global/js/utils/pconsole.js +0 -45
- package/lib/node_modules/@carbon/ibm-products/es/node_modules/object-assign/index.js +0 -91
- package/lib/node_modules/@carbon/ibm-products/es/node_modules/prop-types/checkPropTypes.js +0 -97
- package/lib/node_modules/@carbon/ibm-products/es/node_modules/prop-types/factoryWithThrowingShims.js +0 -66
- package/lib/node_modules/@carbon/ibm-products/es/node_modules/prop-types/factoryWithTypeCheckers.js +0 -563
- package/lib/node_modules/@carbon/ibm-products/es/node_modules/prop-types/index.js +0 -34
- package/lib/node_modules/@carbon/ibm-products/es/node_modules/prop-types/lib/ReactPropTypesSecret.js +0 -20
- package/lib/node_modules/@carbon/ibm-products/es/node_modules/prop-types/lib/has.js +0 -19
- package/lib/node_modules/@carbon/ibm-products/es/settings.js +0 -86
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
|
|
8
8
|
import { extends as _extends } from '../_virtual/_rollupPluginBabelHelpers.js';
|
|
9
9
|
import PropTypes from 'prop-types';
|
|
10
|
-
import
|
|
10
|
+
import React, { useState, useCallback, useLayoutEffect, useEffect } from 'react';
|
|
11
11
|
import { Escape } from '../internal/keyboard/keys.js';
|
|
12
12
|
import { match } from '../internal/keyboard/match.js';
|
|
13
13
|
import { useWindowEvent } from '../internal/useEvent.js';
|
|
@@ -62,7 +62,7 @@ function HeaderContainer({
|
|
|
62
62
|
document.removeEventListener('focusin', handleProfileClosing);
|
|
63
63
|
};
|
|
64
64
|
}, []);
|
|
65
|
-
return /*#__PURE__*/
|
|
65
|
+
return /*#__PURE__*/React.createElement(Children, _extends({}, rest, {
|
|
66
66
|
isSideNavExpanded: isSideNavExpandedState,
|
|
67
67
|
isSwitcherExpanded: isSwitcherExpandedState,
|
|
68
68
|
isProfileExpanded: isProfileExpandedState,
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
|
|
8
8
|
import cx from 'classnames';
|
|
9
9
|
import PropTypes from 'prop-types';
|
|
10
|
-
import
|
|
10
|
+
import React from 'react';
|
|
11
11
|
import { usePrefix } from '../internal/usePrefix.js';
|
|
12
12
|
|
|
13
13
|
const HeaderDivider = ({
|
|
@@ -15,7 +15,7 @@ const HeaderDivider = ({
|
|
|
15
15
|
}) => {
|
|
16
16
|
const prefix = usePrefix();
|
|
17
17
|
const classNames = cx(`${prefix}--header__divider`, className);
|
|
18
|
-
return /*#__PURE__*/
|
|
18
|
+
return /*#__PURE__*/React.createElement("span", {
|
|
19
19
|
className: classNames
|
|
20
20
|
});
|
|
21
21
|
};
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
import { extends as _extends } from '../_virtual/_rollupPluginBabelHelpers.js';
|
|
9
9
|
import cx from 'classnames';
|
|
10
10
|
import PropTypes from 'prop-types';
|
|
11
|
-
import
|
|
11
|
+
import React from 'react';
|
|
12
12
|
import { usePrefix } from '../internal/usePrefix.js';
|
|
13
13
|
import { HeaderPopover, HeaderPopoverButton, HeaderPopoverContent } from './HeaderPopover.js';
|
|
14
14
|
import { OverflowMenuVertical } from '@carbon/icons-react';
|
|
@@ -17,7 +17,7 @@ import { breakpoints } from '../node_modules/@carbon/layout/es/index.js';
|
|
|
17
17
|
|
|
18
18
|
var _OverflowMenuVertical;
|
|
19
19
|
const mdMediaQuery = `(max-width: ${breakpoints.md.width})`;
|
|
20
|
-
const HeaderOverflowPanel = /*#__PURE__*/
|
|
20
|
+
const HeaderOverflowPanel = /*#__PURE__*/React.forwardRef(function HeaderOverflowPanel({
|
|
21
21
|
className: customClassName,
|
|
22
22
|
children,
|
|
23
23
|
label,
|
|
@@ -29,14 +29,14 @@ const HeaderOverflowPanel = /*#__PURE__*/React__default.forwardRef(function Head
|
|
|
29
29
|
[customClassName]: !!customClassName
|
|
30
30
|
});
|
|
31
31
|
const isMd = useMatchMedia(mdMediaQuery);
|
|
32
|
-
return /*#__PURE__*/
|
|
32
|
+
return /*#__PURE__*/React.createElement(HeaderPopover, _extends({
|
|
33
33
|
ref: ref,
|
|
34
34
|
align: "bottom-end",
|
|
35
35
|
className: className
|
|
36
|
-
}, rest), /*#__PURE__*/
|
|
36
|
+
}, rest), /*#__PURE__*/React.createElement(HeaderPopoverButton, {
|
|
37
37
|
align: isMd ? 'bottom-end' : 'bottom',
|
|
38
38
|
label: label
|
|
39
|
-
}, _OverflowMenuVertical || (_OverflowMenuVertical = /*#__PURE__*/
|
|
39
|
+
}, _OverflowMenuVertical || (_OverflowMenuVertical = /*#__PURE__*/React.createElement(OverflowMenuVertical, null))), /*#__PURE__*/React.createElement(HeaderPopoverContent, null, /*#__PURE__*/React.createElement("ul", null, children)));
|
|
40
40
|
});
|
|
41
41
|
HeaderOverflowPanel.propTypes = {
|
|
42
42
|
/**
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
import { extends as _extends } from '../_virtual/_rollupPluginBabelHelpers.js';
|
|
9
9
|
import cx from 'classnames';
|
|
10
10
|
import PropTypes from 'prop-types';
|
|
11
|
-
import
|
|
11
|
+
import React, { useRef, useState, useContext } from 'react';
|
|
12
12
|
import { Popover, IconButton, ToggletipContent, ToggletipActions } from '@carbon/react';
|
|
13
13
|
import { Escape } from '../internal/keyboard/keys.js';
|
|
14
14
|
import { match } from '../internal/keyboard/match.js';
|
|
@@ -18,7 +18,7 @@ import { usePrefix } from '../internal/usePrefix.js';
|
|
|
18
18
|
|
|
19
19
|
// Used to coordinate accessibility props between button and content along with
|
|
20
20
|
// the actions to open and close the toggletip
|
|
21
|
-
const HeaderPopoverContext = /*#__PURE__*/
|
|
21
|
+
const HeaderPopoverContext = /*#__PURE__*/React.createContext(undefined);
|
|
22
22
|
function useToggletip() {
|
|
23
23
|
return useContext(HeaderPopoverContext);
|
|
24
24
|
}
|
|
@@ -99,9 +99,9 @@ function HeaderPopover({
|
|
|
99
99
|
actions.close();
|
|
100
100
|
}
|
|
101
101
|
});
|
|
102
|
-
return /*#__PURE__*/
|
|
102
|
+
return /*#__PURE__*/React.createElement(HeaderPopoverContext.Provider, {
|
|
103
103
|
value: value
|
|
104
|
-
}, /*#__PURE__*/
|
|
104
|
+
}, /*#__PURE__*/React.createElement(Popover, _extends({
|
|
105
105
|
align: align,
|
|
106
106
|
autoAlign: autoAlign,
|
|
107
107
|
as: as,
|
|
@@ -168,7 +168,7 @@ function HeaderPopoverButton({
|
|
|
168
168
|
[`${prefix}--header-action__button`]: true
|
|
169
169
|
});
|
|
170
170
|
const ComponentToggle = BaseComponent ?? IconButton;
|
|
171
|
-
return /*#__PURE__*/
|
|
171
|
+
return /*#__PURE__*/React.createElement(ComponentToggle, _extends({}, toggletip?.onClick, {
|
|
172
172
|
className: className,
|
|
173
173
|
kind: BaseComponent ? null : 'ghost',
|
|
174
174
|
label: label,
|
|
@@ -202,7 +202,7 @@ function HeaderPopoverContent({
|
|
|
202
202
|
...rest
|
|
203
203
|
}) {
|
|
204
204
|
const prefix = usePrefix();
|
|
205
|
-
return /*#__PURE__*/
|
|
205
|
+
return /*#__PURE__*/React.createElement(ToggletipContent, _extends({
|
|
206
206
|
className: cx(className, {
|
|
207
207
|
[`${prefix}--header-action__content`]: true
|
|
208
208
|
})
|
package/es/components/Link.js
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
|
|
8
8
|
import { extends as _extends } from '../_virtual/_rollupPluginBabelHelpers.js';
|
|
9
9
|
import PropTypes from 'prop-types';
|
|
10
|
-
import
|
|
10
|
+
import React, { forwardRef } from 'react';
|
|
11
11
|
import deprecate from '../prop-types/deprecate.js';
|
|
12
12
|
|
|
13
13
|
// Note: Maybe we should use `as` instead of `element`? `as` appears to be
|
|
@@ -22,7 +22,7 @@ function LinkRenderFunction({
|
|
|
22
22
|
...rest
|
|
23
23
|
}, ref) {
|
|
24
24
|
const BaseComponentAsAny = BaseComponent ?? element ?? 'a';
|
|
25
|
-
return /*#__PURE__*/
|
|
25
|
+
return /*#__PURE__*/React.createElement(BaseComponentAsAny, _extends({
|
|
26
26
|
ref: ref
|
|
27
27
|
}, rest));
|
|
28
28
|
}
|
package/es/components/Profile.js
CHANGED
|
@@ -8,12 +8,12 @@
|
|
|
8
8
|
import { extends as _extends } from '../_virtual/_rollupPluginBabelHelpers.js';
|
|
9
9
|
import cx from 'classnames';
|
|
10
10
|
import PropTypes from 'prop-types';
|
|
11
|
-
import
|
|
11
|
+
import React from 'react';
|
|
12
12
|
import { usePrefix } from '../internal/usePrefix.js';
|
|
13
13
|
import { HeaderPopover, HeaderPopoverButton, HeaderPopoverContent } from './HeaderPopover.js';
|
|
14
|
-
import { UserAvatar } from '
|
|
14
|
+
import { UserAvatar } from '@carbon/ibm-products';
|
|
15
15
|
|
|
16
|
-
const Profile = /*#__PURE__*/
|
|
16
|
+
const Profile = /*#__PURE__*/React.forwardRef(function Profile({
|
|
17
17
|
className: customClassName,
|
|
18
18
|
label,
|
|
19
19
|
children,
|
|
@@ -25,14 +25,14 @@ const Profile = /*#__PURE__*/React__default.forwardRef(function Profile({
|
|
|
25
25
|
[`${prefix}--profile`]: true,
|
|
26
26
|
[customClassName]: !!customClassName
|
|
27
27
|
});
|
|
28
|
-
return /*#__PURE__*/
|
|
28
|
+
return /*#__PURE__*/React.createElement(HeaderPopover, _extends({
|
|
29
29
|
ref: ref,
|
|
30
30
|
align: "bottom-end",
|
|
31
31
|
className: className
|
|
32
|
-
}, rest), /*#__PURE__*/
|
|
32
|
+
}, rest), /*#__PURE__*/React.createElement(HeaderPopoverButton, {
|
|
33
33
|
align: "bottom-end",
|
|
34
34
|
label: label
|
|
35
|
-
}, IconElement), /*#__PURE__*/
|
|
35
|
+
}, IconElement), /*#__PURE__*/React.createElement(HeaderPopoverContent, null, children));
|
|
36
36
|
});
|
|
37
37
|
Profile.displayName = 'Profile';
|
|
38
38
|
Profile.propTypes = {
|
|
@@ -54,7 +54,7 @@ Profile.propTypes = {
|
|
|
54
54
|
// @ts-expect-error - PropTypes are unable to cover this case.
|
|
55
55
|
renderIcon: PropTypes.oneOfType([PropTypes.func, PropTypes.object])
|
|
56
56
|
};
|
|
57
|
-
const ProfileUserInfo = /*#__PURE__*/
|
|
57
|
+
const ProfileUserInfo = /*#__PURE__*/React.forwardRef(function ProfileUserInfo({
|
|
58
58
|
className: customClassName,
|
|
59
59
|
name,
|
|
60
60
|
email,
|
|
@@ -65,17 +65,17 @@ const ProfileUserInfo = /*#__PURE__*/React__default.forwardRef(function ProfileU
|
|
|
65
65
|
[`${prefix}--profile-user-info`]: true,
|
|
66
66
|
[customClassName]: !!customClassName
|
|
67
67
|
});
|
|
68
|
-
return /*#__PURE__*/
|
|
68
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
69
69
|
ref: ref,
|
|
70
70
|
className: className
|
|
71
|
-
}, /*#__PURE__*/
|
|
71
|
+
}, /*#__PURE__*/React.createElement(UserAvatar, _extends({
|
|
72
72
|
size: "lg",
|
|
73
73
|
name: name
|
|
74
|
-
}, rest)), /*#__PURE__*/
|
|
74
|
+
}, rest)), /*#__PURE__*/React.createElement("div", {
|
|
75
75
|
className: `${prefix}--profile-user-info__text-wrapper`
|
|
76
|
-
}, /*#__PURE__*/
|
|
76
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
77
77
|
className: `${prefix}--profile-user-info__name`
|
|
78
|
-
}, name), /*#__PURE__*/
|
|
78
|
+
}, name), /*#__PURE__*/React.createElement("div", {
|
|
79
79
|
className: `${prefix}--profile-user-info__email`
|
|
80
80
|
}, email)));
|
|
81
81
|
});
|
|
@@ -94,7 +94,7 @@ ProfileUserInfo.propTypes = {
|
|
|
94
94
|
*/
|
|
95
95
|
name: PropTypes.string.isRequired
|
|
96
96
|
};
|
|
97
|
-
const ProfileReadOnly = /*#__PURE__*/
|
|
97
|
+
const ProfileReadOnly = /*#__PURE__*/React.forwardRef(function ProfileReadOnly({
|
|
98
98
|
className: customClassName,
|
|
99
99
|
items
|
|
100
100
|
}, ref) {
|
|
@@ -103,15 +103,15 @@ const ProfileReadOnly = /*#__PURE__*/React__default.forwardRef(function ProfileR
|
|
|
103
103
|
[`${prefix}--profile-read-only`]: true,
|
|
104
104
|
[customClassName]: !!customClassName
|
|
105
105
|
});
|
|
106
|
-
return /*#__PURE__*/
|
|
106
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
107
107
|
ref: ref,
|
|
108
108
|
className: className
|
|
109
|
-
}, items?.map((item, index) => /*#__PURE__*/
|
|
109
|
+
}, items?.map((item, index) => /*#__PURE__*/React.createElement("div", {
|
|
110
110
|
className: `${prefix}--profile-read-only__items`,
|
|
111
111
|
key: index
|
|
112
|
-
}, /*#__PURE__*/
|
|
112
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
113
113
|
className: `${prefix}--profile-read-only__label`
|
|
114
|
-
}, item.label), /*#__PURE__*/
|
|
114
|
+
}, item.label), /*#__PURE__*/React.createElement("div", {
|
|
115
115
|
className: `${prefix}--profile-read-only__title`
|
|
116
116
|
}, item.title))));
|
|
117
117
|
});
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
|
|
8
8
|
import cx from 'classnames';
|
|
9
9
|
import PropTypes from 'prop-types';
|
|
10
|
-
import
|
|
10
|
+
import React from 'react';
|
|
11
11
|
import { usePrefix } from '../internal/usePrefix.js';
|
|
12
12
|
|
|
13
13
|
var _g, _defs;
|
|
@@ -20,20 +20,20 @@ const SharkFinIcon = ({
|
|
|
20
20
|
[`${prefix}--shark-fin__icon`]: true,
|
|
21
21
|
[customClassName]: !!customClassName
|
|
22
22
|
});
|
|
23
|
-
return /*#__PURE__*/
|
|
23
|
+
return /*#__PURE__*/React.createElement("svg", {
|
|
24
24
|
className: className,
|
|
25
25
|
width: "4",
|
|
26
26
|
height: "4",
|
|
27
27
|
viewBox: "0 0 4 4",
|
|
28
28
|
fill: "none",
|
|
29
29
|
xmlns: "http://www.w3.org/2000/svg"
|
|
30
|
-
}, _g || (_g = /*#__PURE__*/
|
|
30
|
+
}, _g || (_g = /*#__PURE__*/React.createElement("g", {
|
|
31
31
|
"clip-path": "url(#clip0_519_52879)"
|
|
32
|
-
}, /*#__PURE__*/
|
|
32
|
+
}, /*#__PURE__*/React.createElement("path", {
|
|
33
33
|
d: "M2 2L4 0V4H0L2 2Z"
|
|
34
|
-
}))), _defs || (_defs = /*#__PURE__*/
|
|
34
|
+
}))), _defs || (_defs = /*#__PURE__*/React.createElement("defs", null, /*#__PURE__*/React.createElement("clipPath", {
|
|
35
35
|
id: "clip0_519_52879"
|
|
36
|
-
}, /*#__PURE__*/
|
|
36
|
+
}, /*#__PURE__*/React.createElement("rect", {
|
|
37
37
|
width: "4",
|
|
38
38
|
height: "4",
|
|
39
39
|
fill: "white"
|
package/es/components/SideNav.js
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
8
|
import { extends as _extends } from '../_virtual/_rollupPluginBabelHelpers.js';
|
|
9
|
-
import
|
|
9
|
+
import React, { createContext, useState, useRef, isValidElement, useCallback, useEffect } from 'react';
|
|
10
10
|
import cx from 'classnames';
|
|
11
11
|
import PropTypes from 'prop-types';
|
|
12
12
|
import { AriaLabelPropType } from '../prop-types/AriaPropTypes.js';
|
|
@@ -121,13 +121,13 @@ function SideNavRenderFunction({
|
|
|
121
121
|
let childrenToRender = children;
|
|
122
122
|
|
|
123
123
|
// Pass the expansion state as a prop, so children can update themselves to match
|
|
124
|
-
childrenToRender =
|
|
124
|
+
childrenToRender = React.Children.map(children, child => {
|
|
125
125
|
// if we are controlled, check for if we have hovered over or the expanded state, else just use the expanded state (uncontrolled)
|
|
126
126
|
const currentExpansionState = controlled ? expandedViaHoverState || expanded : expanded;
|
|
127
127
|
if (/*#__PURE__*/isValidElement(child)) {
|
|
128
128
|
const childJsxElement = child;
|
|
129
129
|
// avoid spreading `isSideNavExpanded` to non-Carbon UI Shell children
|
|
130
|
-
return /*#__PURE__*/
|
|
130
|
+
return /*#__PURE__*/React.cloneElement(childJsxElement, {
|
|
131
131
|
...(CARBON_SIDENAV_ITEMS.includes(childJsxElement.type?.displayName ?? childJsxElement.type?.name) ? {
|
|
132
132
|
isSideNavExpanded: currentExpansionState,
|
|
133
133
|
...(childJsxElement.type?.displayName === 'SideNavItems' && {
|
|
@@ -410,7 +410,7 @@ function SideNavRenderFunction({
|
|
|
410
410
|
setExpandedState(!autoExpand);
|
|
411
411
|
setAutoExpand(!autoExpand);
|
|
412
412
|
};
|
|
413
|
-
return /*#__PURE__*/
|
|
413
|
+
return /*#__PURE__*/React.createElement(SideNavContext.Provider, {
|
|
414
414
|
value: {
|
|
415
415
|
autoExpand,
|
|
416
416
|
expanded,
|
|
@@ -425,27 +425,27 @@ function SideNavRenderFunction({
|
|
|
425
425
|
}, isFixedNav || hideOverlay || navType === SIDE_NAV_TYPE.RAIL_PANEL ? null :
|
|
426
426
|
/*#__PURE__*/
|
|
427
427
|
// eslint-disable-next-line jsx-a11y/click-events-have-key-events, jsx-a11y/no-static-element-interactions
|
|
428
|
-
|
|
428
|
+
React.createElement("div", {
|
|
429
429
|
className: overlayClassName,
|
|
430
430
|
onClick: onOverlayClick
|
|
431
|
-
}), /*#__PURE__*/
|
|
431
|
+
}), /*#__PURE__*/React.createElement("nav", _extends({
|
|
432
432
|
role: 'navigation',
|
|
433
433
|
tabIndex: -1,
|
|
434
434
|
ref: navRef,
|
|
435
435
|
className: `${prefix}--side-nav__navigation ${className}`,
|
|
436
436
|
inert: !isRail && navType !== SIDE_NAV_TYPE.RAIL_PANEL && !(expanded || isLg) ? -1 : undefined
|
|
437
|
-
}, accessibilityLabel, eventHandlers, other), childrenToRender, navType === SIDE_NAV_TYPE.RAIL_PANEL && /*#__PURE__*/
|
|
437
|
+
}, accessibilityLabel, eventHandlers, other), childrenToRender, navType === SIDE_NAV_TYPE.RAIL_PANEL && /*#__PURE__*/React.createElement("ul", {
|
|
438
438
|
className: `${prefix}--side-nav__toggle-container`
|
|
439
|
-
}, _SideNavDivider || (_SideNavDivider = /*#__PURE__*/
|
|
439
|
+
}, _SideNavDivider || (_SideNavDivider = /*#__PURE__*/React.createElement(SideNavDivider, null)), /*#__PURE__*/React.createElement(SideNavToggle, {
|
|
440
440
|
onClick: handlePinClick,
|
|
441
441
|
renderIcon: pinned ? PinFilled : Pin
|
|
442
|
-
}, pinText), /*#__PURE__*/
|
|
442
|
+
}, pinText), /*#__PURE__*/React.createElement(SideNavToggle, {
|
|
443
443
|
disabled: pinned,
|
|
444
444
|
renderIcon: expandedState ? SidePanelClose : SidePanelOpen,
|
|
445
445
|
onClick: handleAutoExpand
|
|
446
446
|
}, autoExpandText))));
|
|
447
447
|
}
|
|
448
|
-
const SideNav = /*#__PURE__*/
|
|
448
|
+
const SideNav = /*#__PURE__*/React.forwardRef(SideNavRenderFunction);
|
|
449
449
|
SideNav.displayName = 'SideNav';
|
|
450
450
|
SideNav.propTypes = {
|
|
451
451
|
/**
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
import { extends as _extends } from '../_virtual/_rollupPluginBabelHelpers.js';
|
|
9
9
|
import cx from 'classnames';
|
|
10
10
|
import PropTypes from 'prop-types';
|
|
11
|
-
import
|
|
11
|
+
import React, { useRef, useState, useCallback, useEffect } from 'react';
|
|
12
12
|
import { Popover, PopoverContent, FormLabel } from '@carbon/react';
|
|
13
13
|
import { Escape, Enter, Space } from '../internal/keyboard/keys.js';
|
|
14
14
|
import { match } from '../internal/keyboard/match.js';
|
|
@@ -43,15 +43,15 @@ function SideNavFlyoutMenu({
|
|
|
43
43
|
const [isPointerIntersecting, setIsPointerIntersecting] = useState(false);
|
|
44
44
|
const id = useId('tooltip');
|
|
45
45
|
const prefix = usePrefix();
|
|
46
|
-
const child =
|
|
46
|
+
const child = React.Children.only(children);
|
|
47
47
|
const menuButton = useRef();
|
|
48
48
|
const [clickMode, setClickMode] = useState(false);
|
|
49
49
|
const isFocusedInsideRef = useRef(false);
|
|
50
50
|
const popoverMenuLinks = useRef(null);
|
|
51
51
|
const [isButtonFocused, setIsButtonFocused] = useState(false);
|
|
52
|
-
const flyoutMenuItems =
|
|
53
|
-
if (/*#__PURE__*/
|
|
54
|
-
return /*#__PURE__*/
|
|
52
|
+
const flyoutMenuItems = React.Children.map(menuContent, child => {
|
|
53
|
+
if (/*#__PURE__*/React.isValidElement(child)) {
|
|
54
|
+
return /*#__PURE__*/React.cloneElement(child, {
|
|
55
55
|
...{
|
|
56
56
|
isFlyoutMenuItem: true
|
|
57
57
|
}
|
|
@@ -240,7 +240,7 @@ function SideNavFlyoutMenu({
|
|
|
240
240
|
return (
|
|
241
241
|
/*#__PURE__*/
|
|
242
242
|
// @ts-ignore-error Popover throws a TS error everytime is imported
|
|
243
|
-
|
|
243
|
+
React.createElement(Popover, _extends({
|
|
244
244
|
ref: popoverRef
|
|
245
245
|
}, rest, {
|
|
246
246
|
align: isButtonFocused ? 'right' : align,
|
|
@@ -256,10 +256,10 @@ function SideNavFlyoutMenu({
|
|
|
256
256
|
onKeyDown: onKeyDown,
|
|
257
257
|
onMouseLeave: onMouseLeave,
|
|
258
258
|
open: open
|
|
259
|
-
}), child !== undefined ? /*#__PURE__*/
|
|
259
|
+
}), child !== undefined ? /*#__PURE__*/React.cloneElement(child, {
|
|
260
260
|
...triggerProps,
|
|
261
261
|
...getChildEventHandlers(child.props)
|
|
262
|
-
}) : null, /*#__PURE__*/
|
|
262
|
+
}) : null, /*#__PURE__*/React.createElement(PopoverContent, {
|
|
263
263
|
"aria-hidden": open ? 'false' : 'true',
|
|
264
264
|
className: cx({
|
|
265
265
|
[`${prefix}--side-nav-menu--popover-content`]: !isButtonFocused,
|
|
@@ -268,7 +268,7 @@ function SideNavFlyoutMenu({
|
|
|
268
268
|
id: id,
|
|
269
269
|
onMouseEnter: onMouseEnter,
|
|
270
270
|
role: "tooltip"
|
|
271
|
-
}, !isButtonFocused ? /*#__PURE__*/
|
|
271
|
+
}, !isButtonFocused ? /*#__PURE__*/React.createElement(FormLabel, null, title) : title, /*#__PURE__*/React.createElement("div", {
|
|
272
272
|
style: {
|
|
273
273
|
display: isButtonFocused ? 'none' : 'block'
|
|
274
274
|
}
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
import { extends as _extends } from '../_virtual/_rollupPluginBabelHelpers.js';
|
|
9
9
|
import cx from 'classnames';
|
|
10
10
|
import PropTypes from 'prop-types';
|
|
11
|
-
import
|
|
11
|
+
import React, { useContext, useRef, useEffect } from 'react';
|
|
12
12
|
import { CARBON_SIDENAV_ITEMS } from './_utils.js';
|
|
13
13
|
import { usePrefix } from '../internal/usePrefix.js';
|
|
14
14
|
import { SideNavContext } from './SideNav.js';
|
|
@@ -26,14 +26,14 @@ const SideNavItems = ({
|
|
|
26
26
|
const listRef = useRef(null); // Adjust type if necessary
|
|
27
27
|
const prefix = usePrefix();
|
|
28
28
|
const className = cx([`${prefix}--side-nav__items`], customClassName);
|
|
29
|
-
const childrenWithExpandedState =
|
|
30
|
-
if (/*#__PURE__*/
|
|
29
|
+
const childrenWithExpandedState = React.Children.map(children, child => {
|
|
30
|
+
if (/*#__PURE__*/React.isValidElement(child)) {
|
|
31
31
|
// avoid spreading `isSideNavExpanded` to non-Carbon UI Shell children
|
|
32
32
|
const childJsxElement = child;
|
|
33
33
|
const childDisplayName = childJsxElement.type?.displayName ?? childJsxElement.type?.name;
|
|
34
34
|
const isCarbonSideNavItem = CARBON_SIDENAV_ITEMS.includes(childDisplayName);
|
|
35
35
|
const isSideNavMenu = childDisplayName === 'SideNavMenu';
|
|
36
|
-
return /*#__PURE__*/
|
|
36
|
+
return /*#__PURE__*/React.cloneElement(child, {
|
|
37
37
|
...(isCarbonSideNavItem && {
|
|
38
38
|
isSideNavExpanded: isSideNavExpanded
|
|
39
39
|
}),
|
|
@@ -54,7 +54,7 @@ const SideNavItems = ({
|
|
|
54
54
|
});
|
|
55
55
|
}
|
|
56
56
|
}, [isTreeview]);
|
|
57
|
-
return /*#__PURE__*/
|
|
57
|
+
return /*#__PURE__*/React.createElement("ul", _extends({}, isTreeview && accessibilityLabel, {
|
|
58
58
|
ref: listRef,
|
|
59
59
|
className: className,
|
|
60
60
|
tabIndex: currentPrimaryMenu ? -1 : undefined,
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
import { extends as _extends } from '../_virtual/_rollupPluginBabelHelpers.js';
|
|
9
9
|
import cx from 'classnames';
|
|
10
10
|
import PropTypes from 'prop-types';
|
|
11
|
-
import
|
|
11
|
+
import React, { forwardRef, useContext } from 'react';
|
|
12
12
|
import Link, { LinkPropTypes } from './Link.js';
|
|
13
13
|
import { SideNavItem, SideNavLinkText, SideNavIcon } from '@carbon/react';
|
|
14
14
|
import { usePrefix } from '../internal/usePrefix.js';
|
|
@@ -36,22 +36,22 @@ const SideNavLink = /*#__PURE__*/forwardRef(function SideNavLink({
|
|
|
36
36
|
[`${prefix}--side-nav__link--current`]: isActive,
|
|
37
37
|
[customClassName]: !!customClassName
|
|
38
38
|
});
|
|
39
|
-
const SideNavLinkIcon = IconElement && /*#__PURE__*/
|
|
39
|
+
const SideNavLinkIcon = IconElement && /*#__PURE__*/React.createElement(SideNavIcon, {
|
|
40
40
|
small: true
|
|
41
|
-
}, /*#__PURE__*/
|
|
41
|
+
}, /*#__PURE__*/React.createElement(IconElement, null));
|
|
42
42
|
if (!expanded && navType === SIDE_NAV_TYPE.RAIL_PANEL) {
|
|
43
|
-
return /*#__PURE__*/
|
|
43
|
+
return /*#__PURE__*/React.createElement(SideNavLinkPopover, _extends({
|
|
44
44
|
align: "right",
|
|
45
45
|
label: children
|
|
46
46
|
}, rest), SideNavLinkIcon);
|
|
47
47
|
}
|
|
48
|
-
return /*#__PURE__*/
|
|
48
|
+
return /*#__PURE__*/React.createElement(SideNavItem, {
|
|
49
49
|
large: large
|
|
50
|
-
}, /*#__PURE__*/
|
|
50
|
+
}, /*#__PURE__*/React.createElement(Link, _extends({}, rest, {
|
|
51
51
|
className: className,
|
|
52
52
|
ref: ref,
|
|
53
53
|
tabIndex: tabIndex === undefined ? !isSideNavExpanded && !isRail ? -1 : 0 : tabIndex
|
|
54
|
-
}), SideNavLinkIcon, /*#__PURE__*/
|
|
54
|
+
}), SideNavLinkIcon, /*#__PURE__*/React.createElement(SideNavLinkText, null, children)));
|
|
55
55
|
});
|
|
56
56
|
SideNavLink.displayName = 'SideNavLink';
|
|
57
57
|
SideNavLink.propTypes = {
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
import { extends as _extends } from '../_virtual/_rollupPluginBabelHelpers.js';
|
|
9
9
|
import cx from 'classnames';
|
|
10
10
|
import PropTypes from 'prop-types';
|
|
11
|
-
import
|
|
11
|
+
import React from 'react';
|
|
12
12
|
import { IconButton } from '@carbon/react';
|
|
13
13
|
import { usePrefix } from '../internal/usePrefix.js';
|
|
14
14
|
|
|
@@ -18,7 +18,7 @@ function SideNavLinkPopover({
|
|
|
18
18
|
...rest
|
|
19
19
|
}) {
|
|
20
20
|
const prefix = usePrefix();
|
|
21
|
-
return /*#__PURE__*/
|
|
21
|
+
return /*#__PURE__*/React.createElement(IconButton, _extends({
|
|
22
22
|
className: cx(className, `${prefix}--side-nav-link-popover`),
|
|
23
23
|
dropShadow: true,
|
|
24
24
|
highContrast: false,
|
|
@@ -10,7 +10,7 @@ import { SideNavIcon, Layer, Button } from '@carbon/react';
|
|
|
10
10
|
import { breakpoints } from '../node_modules/@carbon/layout/es/index.js';
|
|
11
11
|
import cx from 'classnames';
|
|
12
12
|
import PropTypes from 'prop-types';
|
|
13
|
-
import
|
|
13
|
+
import React, { useContext, useState, useRef, useCallback, useMemo, useEffect } from 'react';
|
|
14
14
|
import { CARBON_SIDENAV_ITEMS } from './_utils.js';
|
|
15
15
|
import { useId } from '../internal/useId.js';
|
|
16
16
|
import { Escape, Tab, ArrowLeft as ArrowLeft$1, ArrowRight } from '../internal/keyboard/keys.js';
|
|
@@ -26,8 +26,8 @@ import { useMatchMedia } from '../internal/useMatchMedia.js';
|
|
|
26
26
|
var _ArrowLeft, _SharkFinIcon, _ChevronRight, _ChevronDown;
|
|
27
27
|
const smMediaQuery = `(max-width: ${breakpoints.md.width})`;
|
|
28
28
|
const mdMediaQuery = `(max-width: ${breakpoints.lg.width})`;
|
|
29
|
-
const SideNavMenu = /*#__PURE__*/
|
|
30
|
-
backButtonRenderIcon = () => _ArrowLeft || (_ArrowLeft = /*#__PURE__*/
|
|
29
|
+
const SideNavMenu = /*#__PURE__*/React.forwardRef(function SideNavMenu({
|
|
30
|
+
backButtonRenderIcon = () => _ArrowLeft || (_ArrowLeft = /*#__PURE__*/React.createElement(ArrowLeft, {
|
|
31
31
|
size: 16
|
|
32
32
|
})),
|
|
33
33
|
backButtonTitle = 'My products',
|
|
@@ -77,7 +77,7 @@ const SideNavMenu = /*#__PURE__*/React__default.forwardRef(function SideNavMenu(
|
|
|
77
77
|
const hasActiveDescendantInner = useCallback(children => {
|
|
78
78
|
if (Array.isArray(children)) {
|
|
79
79
|
return children.some(child => {
|
|
80
|
-
if (! /*#__PURE__*/
|
|
80
|
+
if (! /*#__PURE__*/React.isValidElement(child)) {
|
|
81
81
|
// setActive(false);
|
|
82
82
|
return false;
|
|
83
83
|
}
|
|
@@ -96,7 +96,7 @@ const SideNavMenu = /*#__PURE__*/React__default.forwardRef(function SideNavMenu(
|
|
|
96
96
|
|
|
97
97
|
// We use React.isValidElement(child) to check if the child is a valid React element before accessing its props
|
|
98
98
|
|
|
99
|
-
if (/*#__PURE__*/
|
|
99
|
+
if (/*#__PURE__*/React.isValidElement(children)) {
|
|
100
100
|
const props = children.props;
|
|
101
101
|
if (props.isActive === true || props['aria-current']) {
|
|
102
102
|
return true;
|
|
@@ -155,12 +155,12 @@ const SideNavMenu = /*#__PURE__*/React__default.forwardRef(function SideNavMenu(
|
|
|
155
155
|
let childrenToRender = children;
|
|
156
156
|
|
|
157
157
|
// modify nested SideNavMenus
|
|
158
|
-
childrenToRender =
|
|
159
|
-
if (/*#__PURE__*/
|
|
158
|
+
childrenToRender = React.Children.map(children, child => {
|
|
159
|
+
if (/*#__PURE__*/React.isValidElement(child)) {
|
|
160
160
|
const childJsxElement = child;
|
|
161
161
|
const childDisplayName = childJsxElement.type?.displayName ?? childJsxElement.type?.name;
|
|
162
162
|
const isCarbonSideNavItem = CARBON_SIDENAV_ITEMS.includes(childDisplayName);
|
|
163
|
-
return /*#__PURE__*/
|
|
163
|
+
return /*#__PURE__*/React.cloneElement(child, {
|
|
164
164
|
...(isCarbonSideNavItem && {
|
|
165
165
|
isSideNavExpanded: !isSideNavCollapsed
|
|
166
166
|
}),
|
|
@@ -300,7 +300,7 @@ const SideNavMenu = /*#__PURE__*/React__default.forwardRef(function SideNavMenu(
|
|
|
300
300
|
setIsExpanded(true);
|
|
301
301
|
}
|
|
302
302
|
}, [sideNavExpanded]);
|
|
303
|
-
const [openPopover, setOpenPopover] =
|
|
303
|
+
const [openPopover, setOpenPopover] = React.useState(false);
|
|
304
304
|
const query = !headerOverflowPanel ? smMediaQuery : mdMediaQuery;
|
|
305
305
|
const isSm = useMatchMedia(query);
|
|
306
306
|
|
|
@@ -313,14 +313,14 @@ const SideNavMenu = /*#__PURE__*/React__default.forwardRef(function SideNavMenu(
|
|
|
313
313
|
const content =
|
|
314
314
|
/*#__PURE__*/
|
|
315
315
|
// eslint-disable-next-line jsx-a11y/no-noninteractive-element-interactions
|
|
316
|
-
|
|
316
|
+
React.createElement("li", {
|
|
317
317
|
role: isTreeview ? 'treeitem' : undefined,
|
|
318
318
|
"aria-expanded": isExpanded,
|
|
319
319
|
className: className,
|
|
320
320
|
ref: listRef,
|
|
321
321
|
onKeyDown: handleKeyDown,
|
|
322
322
|
id: uniqueId
|
|
323
|
-
}, /*#__PURE__*/
|
|
323
|
+
}, /*#__PURE__*/React.createElement("button", {
|
|
324
324
|
"aria-expanded": isExpanded,
|
|
325
325
|
className: buttonClassName,
|
|
326
326
|
onClick: () => {
|
|
@@ -342,46 +342,46 @@ const SideNavMenu = /*#__PURE__*/React__default.forwardRef(function SideNavMenu(
|
|
|
342
342
|
ref: menuRef,
|
|
343
343
|
type: "button",
|
|
344
344
|
tabIndex: isTreeview ? -1 : 0
|
|
345
|
-
}, IconElement && /*#__PURE__*/
|
|
345
|
+
}, IconElement && /*#__PURE__*/React.createElement(SideNavIcon, null, /*#__PURE__*/React.createElement(IconElement, null)), !autoExpand && !sideNavExpanded && navType == SIDE_NAV_TYPE.RAIL_PANEL && /*#__PURE__*/React.createElement("div", {
|
|
346
346
|
className: `${prefix}--side-nav--panel-submenu-caret-container`
|
|
347
|
-
}, /*#__PURE__*/
|
|
347
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
348
348
|
className: `${prefix}--side-nav--panel-submenu-caret`
|
|
349
|
-
}, _SharkFinIcon || (_SharkFinIcon = /*#__PURE__*/
|
|
349
|
+
}, _SharkFinIcon || (_SharkFinIcon = /*#__PURE__*/React.createElement(SharkFinIcon, null)))), /*#__PURE__*/React.createElement("span", {
|
|
350
350
|
className: `${prefix}--side-nav__submenu-title`
|
|
351
|
-
}, title), /*#__PURE__*/
|
|
351
|
+
}, title), /*#__PURE__*/React.createElement(SideNavIcon, {
|
|
352
352
|
className: `${prefix}--side-nav__submenu-chevron`,
|
|
353
353
|
small: true
|
|
354
|
-
}, primary ? _ChevronRight || (_ChevronRight = /*#__PURE__*/
|
|
354
|
+
}, primary ? _ChevronRight || (_ChevronRight = /*#__PURE__*/React.createElement(ChevronRight, {
|
|
355
355
|
size: 20
|
|
356
|
-
})) : _ChevronDown || (_ChevronDown = /*#__PURE__*/
|
|
356
|
+
})) : _ChevronDown || (_ChevronDown = /*#__PURE__*/React.createElement(ChevronDown, {
|
|
357
357
|
size: 20
|
|
358
|
-
})))), primary ? /*#__PURE__*/
|
|
358
|
+
})))), primary ? /*#__PURE__*/React.createElement(Layer, null, /*#__PURE__*/React.createElement("div", {
|
|
359
359
|
className: secondaryClassNames
|
|
360
|
-
}, !headerOverflowPanel ? /*#__PURE__*/
|
|
360
|
+
}, !headerOverflowPanel ? /*#__PURE__*/React.createElement(SideNavItems, {
|
|
361
361
|
accessibilityLabel: {
|
|
362
362
|
'aria-label': `${title} submenu`
|
|
363
363
|
}
|
|
364
|
-
}, isSm && /*#__PURE__*/
|
|
364
|
+
}, isSm && /*#__PURE__*/React.createElement(Button, {
|
|
365
365
|
ref: backButtonRef,
|
|
366
366
|
kind: "ghost",
|
|
367
367
|
size: "md",
|
|
368
368
|
onClick: handleOnBackButtonClick,
|
|
369
369
|
className: `${prefix}--side-nav__back-button`,
|
|
370
370
|
renderIcon: backButtonRenderIcon
|
|
371
|
-
}, backButtonTitle), childrenToRender) : /*#__PURE__*/
|
|
371
|
+
}, backButtonTitle), childrenToRender) : /*#__PURE__*/React.createElement("div", {
|
|
372
372
|
className: `${prefix}--header-overflow-panel-secondary-container`
|
|
373
|
-
}, /*#__PURE__*/
|
|
373
|
+
}, /*#__PURE__*/React.createElement(Button, {
|
|
374
374
|
ref: backButtonRef,
|
|
375
375
|
kind: "ghost",
|
|
376
376
|
size: "md",
|
|
377
377
|
onClick: handleOnBackButtonClick,
|
|
378
378
|
className: `${prefix}--side-nav__back-button`,
|
|
379
379
|
renderIcon: backButtonRenderIcon
|
|
380
|
-
}, backButtonTitle), childrenToRender))) : /*#__PURE__*/
|
|
380
|
+
}, backButtonTitle), childrenToRender))) : /*#__PURE__*/React.createElement("ul", {
|
|
381
381
|
className: `${prefix}--side-nav__menu`,
|
|
382
382
|
role: "group"
|
|
383
383
|
}, childrenToRender));
|
|
384
|
-
return navType == SIDE_NAV_TYPE.RAIL_PANEL && !sideNavExpanded ? /*#__PURE__*/
|
|
384
|
+
return navType == SIDE_NAV_TYPE.RAIL_PANEL && !sideNavExpanded ? /*#__PURE__*/React.createElement(SideNavFlyoutMenu, {
|
|
385
385
|
selected: active,
|
|
386
386
|
className: `${prefix}--side-nav-flyout-menu`,
|
|
387
387
|
title: title,
|