@elliemae/ds-left-navigation 2.2.0-alpha.4 → 3.0.0-next.2
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/cjs/LeftNavigation.js +27 -49
- package/cjs/LeftNavigationContext.js +18 -44
- package/cjs/common/getItemBackgroundStyle.js +8 -47
- package/cjs/common/getLeftBorderStyle.js +8 -50
- package/cjs/common/getScrollbarStyle.js +4 -55
- package/cjs/common/index.js +13 -30
- package/cjs/configs/index.js +10 -38
- package/cjs/configs/useLeftNavConfig.js +76 -76
- package/cjs/configs/useLeftNavItems.js +64 -66
- package/cjs/configs/useLeftNavSmoothExpand.js +25 -43
- package/cjs/exported-related/ChevronItem/index.js +27 -42
- package/cjs/exported-related/Icon/index.js +34 -51
- package/cjs/exported-related/ItemRenderer/index.js +94 -99
- package/cjs/exported-related/ItemRenderer/styled.js +51 -83
- package/cjs/exported-related/ItemRenderer/usePropsWithDefaults.js +45 -57
- package/cjs/exported-related/Notifications/index.js +61 -81
- package/cjs/exported-related/OpenWindowItem/index.js +32 -49
- package/cjs/exported-related/constants.js +25 -53
- package/cjs/exported-related/index.js +23 -33
- package/cjs/hooks/index.js +13 -30
- package/cjs/hooks/useExpandableOnClickHandler.js +26 -55
- package/cjs/hooks/useKeyboardNavigation.js +54 -62
- package/cjs/hooks/useOpenableOnClickHandler.js +26 -55
- package/cjs/hooks/useSelectFirstBodyItem.js +34 -47
- package/cjs/index.d.js +2 -27
- package/cjs/index.js +30 -41
- package/cjs/outOfTheBox/ItemControlledDrilldown/index.js +103 -97
- package/cjs/outOfTheBox/ItemControlledDrilldown/styled.js +27 -49
- package/cjs/outOfTheBox/ItemHeader/index.js +93 -95
- package/cjs/outOfTheBox/ItemHeader/styled.js +22 -49
- package/cjs/outOfTheBox/ItemLink/index.js +67 -75
- package/cjs/outOfTheBox/ItemLink/styled.js +17 -41
- package/cjs/outOfTheBox/ItemSection/index.js +63 -59
- package/cjs/outOfTheBox/ItemSection/styled.js +23 -53
- package/cjs/outOfTheBox/ItemSeparator/index.js +45 -56
- package/cjs/outOfTheBox/ItemSubmenu/index.js +92 -95
- package/cjs/outOfTheBox/ItemSubmenu/styled.js +22 -49
- package/cjs/outOfTheBox/ItemTextLabel/index.js +52 -51
- package/cjs/outOfTheBox/ItemTextLabel/styled.js +23 -43
- package/cjs/outOfTheBox/ItemUncontrolledDrilldown/index.js +113 -107
- package/cjs/outOfTheBox/ItemUncontrolledDrilldown/styled.js +27 -49
- package/cjs/outOfTheBox/ItemWithDate/index.js +54 -59
- package/cjs/outOfTheBox/ItemWithDate/styled.js +27 -49
- package/cjs/outOfTheBox/index.js +50 -65
- package/cjs/parts/LeftNavContent/index.js +71 -75
- package/cjs/parts/LeftNavContent/styled.js +50 -110
- package/cjs/parts/LeftNavContentWithScrollbar/index.js +79 -89
- package/cjs/parts/LeftNavFooterItem/index.js +80 -97
- package/cjs/parts/LeftNavFooterItem/styled.js +34 -89
- package/cjs/parts/LeftNavLoading/index.js +33 -51
- package/cjs/parts/OutOfTheBoxMapItem.js +46 -49
- package/cjs/prop-types.js +39 -58
- package/esm/LeftNavigation.js +15 -17
- package/esm/LeftNavigationContext.js +11 -15
- package/esm/common/getItemBackgroundStyle.js +6 -20
- package/esm/common/getLeftBorderStyle.js +6 -23
- package/esm/common/getScrollbarStyle.js +2 -28
- package/esm/common/index.js +3 -5
- package/esm/configs/index.js +2 -9
- package/esm/configs/useLeftNavConfig.js +67 -47
- package/esm/configs/useLeftNavItems.js +55 -33
- package/esm/configs/useLeftNavSmoothExpand.js +16 -14
- package/esm/exported-related/ChevronItem/index.js +18 -13
- package/esm/exported-related/Icon/index.js +24 -21
- package/esm/exported-related/ItemRenderer/index.js +80 -65
- package/esm/exported-related/ItemRenderer/styled.js +42 -56
- package/esm/exported-related/ItemRenderer/usePropsWithDefaults.js +36 -27
- package/esm/exported-related/Notifications/index.js +50 -57
- package/esm/exported-related/OpenWindowItem/index.js +22 -20
- package/esm/exported-related/constants.js +17 -24
- package/esm/exported-related/index.js +6 -8
- package/esm/hooks/index.js +3 -5
- package/esm/hooks/useExpandableOnClickHandler.js +22 -26
- package/esm/hooks/useKeyboardNavigation.js +47 -30
- package/esm/hooks/useOpenableOnClickHandler.js +22 -26
- package/esm/hooks/useSelectFirstBodyItem.js +30 -18
- package/esm/index.d.js +1 -2
- package/esm/index.js +8 -12
- package/esm/outOfTheBox/ItemControlledDrilldown/index.js +87 -62
- package/esm/outOfTheBox/ItemControlledDrilldown/styled.js +17 -20
- package/esm/outOfTheBox/ItemHeader/index.js +82 -65
- package/esm/outOfTheBox/ItemHeader/styled.js +12 -20
- package/esm/outOfTheBox/ItemLink/index.js +57 -46
- package/esm/outOfTheBox/ItemLink/styled.js +8 -12
- package/esm/outOfTheBox/ItemSection/index.js +53 -30
- package/esm/outOfTheBox/ItemSection/styled.js +13 -24
- package/esm/outOfTheBox/ItemSeparator/index.js +35 -27
- package/esm/outOfTheBox/ItemSubmenu/index.js +81 -65
- package/esm/outOfTheBox/ItemSubmenu/styled.js +12 -20
- package/esm/outOfTheBox/ItemTextLabel/index.js +43 -22
- package/esm/outOfTheBox/ItemTextLabel/styled.js +14 -14
- package/esm/outOfTheBox/ItemUncontrolledDrilldown/index.js +95 -70
- package/esm/outOfTheBox/ItemUncontrolledDrilldown/styled.js +17 -20
- package/esm/outOfTheBox/ItemWithDate/index.js +44 -30
- package/esm/outOfTheBox/ItemWithDate/styled.js +17 -20
- package/esm/outOfTheBox/index.js +34 -25
- package/esm/parts/LeftNavContent/index.js +64 -54
- package/esm/parts/LeftNavContent/styled.js +36 -81
- package/esm/parts/LeftNavContentWithScrollbar/index.js +64 -56
- package/esm/parts/LeftNavFooterItem/index.js +68 -73
- package/esm/parts/LeftNavFooterItem/styled.js +24 -63
- package/esm/parts/LeftNavLoading/index.js +22 -22
- package/esm/parts/OutOfTheBoxMapItem.js +35 -19
- package/esm/prop-types.js +29 -26
- package/package.json +6 -6
- package/types/LeftNavigationContext.d.ts +4 -4
- package/types/configs/useLeftNavSmoothExpand.d.ts +3 -3
- package/types/hooks/useSelectFirstBodyItem.d.ts +1 -1
- package/types/index.d.d.ts +5 -2
- package/cjs/LeftNavigation.js.map +0 -7
- package/cjs/LeftNavigationContext.js.map +0 -7
- package/cjs/common/getItemBackgroundStyle.js.map +0 -7
- package/cjs/common/getLeftBorderStyle.js.map +0 -7
- package/cjs/common/getScrollbarStyle.js.map +0 -7
- package/cjs/common/index.js.map +0 -7
- package/cjs/configs/index.js.map +0 -7
- package/cjs/configs/useLeftNavConfig.js.map +0 -7
- package/cjs/configs/useLeftNavItems.js.map +0 -7
- package/cjs/configs/useLeftNavSmoothExpand.js.map +0 -7
- package/cjs/exported-related/ChevronItem/index.js.map +0 -7
- package/cjs/exported-related/Icon/index.js.map +0 -7
- package/cjs/exported-related/ItemRenderer/index.js.map +0 -7
- package/cjs/exported-related/ItemRenderer/styled.js.map +0 -7
- package/cjs/exported-related/ItemRenderer/usePropsWithDefaults.js.map +0 -7
- package/cjs/exported-related/Notifications/index.js.map +0 -7
- package/cjs/exported-related/OpenWindowItem/index.js.map +0 -7
- package/cjs/exported-related/constants.js.map +0 -7
- package/cjs/exported-related/index.js.map +0 -7
- package/cjs/hooks/index.js.map +0 -7
- package/cjs/hooks/useExpandableOnClickHandler.js.map +0 -7
- package/cjs/hooks/useKeyboardNavigation.js.map +0 -7
- package/cjs/hooks/useOpenableOnClickHandler.js.map +0 -7
- package/cjs/hooks/useSelectFirstBodyItem.js.map +0 -7
- package/cjs/index.d.js.map +0 -7
- package/cjs/index.js.map +0 -7
- package/cjs/outOfTheBox/ItemControlledDrilldown/index.js.map +0 -7
- package/cjs/outOfTheBox/ItemControlledDrilldown/styled.js.map +0 -7
- package/cjs/outOfTheBox/ItemHeader/index.js.map +0 -7
- package/cjs/outOfTheBox/ItemHeader/styled.js.map +0 -7
- package/cjs/outOfTheBox/ItemLink/index.js.map +0 -7
- package/cjs/outOfTheBox/ItemLink/styled.js.map +0 -7
- package/cjs/outOfTheBox/ItemSection/index.js.map +0 -7
- package/cjs/outOfTheBox/ItemSection/styled.js.map +0 -7
- package/cjs/outOfTheBox/ItemSeparator/index.js.map +0 -7
- package/cjs/outOfTheBox/ItemSubmenu/index.js.map +0 -7
- package/cjs/outOfTheBox/ItemSubmenu/styled.js.map +0 -7
- package/cjs/outOfTheBox/ItemTextLabel/index.js.map +0 -7
- package/cjs/outOfTheBox/ItemTextLabel/styled.js.map +0 -7
- package/cjs/outOfTheBox/ItemUncontrolledDrilldown/index.js.map +0 -7
- package/cjs/outOfTheBox/ItemUncontrolledDrilldown/styled.js.map +0 -7
- package/cjs/outOfTheBox/ItemWithDate/index.js.map +0 -7
- package/cjs/outOfTheBox/ItemWithDate/styled.js.map +0 -7
- package/cjs/outOfTheBox/index.js.map +0 -7
- package/cjs/parts/LeftNavContent/index.js.map +0 -7
- package/cjs/parts/LeftNavContent/styled.js.map +0 -7
- package/cjs/parts/LeftNavContentWithScrollbar/index.js.map +0 -7
- package/cjs/parts/LeftNavFooterItem/index.js.map +0 -7
- package/cjs/parts/LeftNavFooterItem/styled.js.map +0 -7
- package/cjs/parts/LeftNavLoading/index.js.map +0 -7
- package/cjs/parts/OutOfTheBoxMapItem.js.map +0 -7
- package/cjs/prop-types.js.map +0 -7
- package/esm/LeftNavigation.js.map +0 -7
- package/esm/LeftNavigationContext.js.map +0 -7
- package/esm/common/getItemBackgroundStyle.js.map +0 -7
- package/esm/common/getLeftBorderStyle.js.map +0 -7
- package/esm/common/getScrollbarStyle.js.map +0 -7
- package/esm/common/index.js.map +0 -7
- package/esm/configs/index.js.map +0 -7
- package/esm/configs/useLeftNavConfig.js.map +0 -7
- package/esm/configs/useLeftNavItems.js.map +0 -7
- package/esm/configs/useLeftNavSmoothExpand.js.map +0 -7
- package/esm/exported-related/ChevronItem/index.js.map +0 -7
- package/esm/exported-related/Icon/index.js.map +0 -7
- package/esm/exported-related/ItemRenderer/index.js.map +0 -7
- package/esm/exported-related/ItemRenderer/styled.js.map +0 -7
- package/esm/exported-related/ItemRenderer/usePropsWithDefaults.js.map +0 -7
- package/esm/exported-related/Notifications/index.js.map +0 -7
- package/esm/exported-related/OpenWindowItem/index.js.map +0 -7
- package/esm/exported-related/constants.js.map +0 -7
- package/esm/exported-related/index.js.map +0 -7
- package/esm/hooks/index.js.map +0 -7
- package/esm/hooks/useExpandableOnClickHandler.js.map +0 -7
- package/esm/hooks/useKeyboardNavigation.js.map +0 -7
- package/esm/hooks/useOpenableOnClickHandler.js.map +0 -7
- package/esm/hooks/useSelectFirstBodyItem.js.map +0 -7
- package/esm/index.d.js.map +0 -7
- package/esm/index.js.map +0 -7
- package/esm/outOfTheBox/ItemControlledDrilldown/index.js.map +0 -7
- package/esm/outOfTheBox/ItemControlledDrilldown/styled.js.map +0 -7
- package/esm/outOfTheBox/ItemHeader/index.js.map +0 -7
- package/esm/outOfTheBox/ItemHeader/styled.js.map +0 -7
- package/esm/outOfTheBox/ItemLink/index.js.map +0 -7
- package/esm/outOfTheBox/ItemLink/styled.js.map +0 -7
- package/esm/outOfTheBox/ItemSection/index.js.map +0 -7
- package/esm/outOfTheBox/ItemSection/styled.js.map +0 -7
- package/esm/outOfTheBox/ItemSeparator/index.js.map +0 -7
- package/esm/outOfTheBox/ItemSubmenu/index.js.map +0 -7
- package/esm/outOfTheBox/ItemSubmenu/styled.js.map +0 -7
- package/esm/outOfTheBox/ItemTextLabel/index.js.map +0 -7
- package/esm/outOfTheBox/ItemTextLabel/styled.js.map +0 -7
- package/esm/outOfTheBox/ItemUncontrolledDrilldown/index.js.map +0 -7
- package/esm/outOfTheBox/ItemUncontrolledDrilldown/styled.js.map +0 -7
- package/esm/outOfTheBox/ItemWithDate/index.js.map +0 -7
- package/esm/outOfTheBox/ItemWithDate/styled.js.map +0 -7
- package/esm/outOfTheBox/index.js.map +0 -7
- package/esm/parts/LeftNavContent/index.js.map +0 -7
- package/esm/parts/LeftNavContent/styled.js.map +0 -7
- package/esm/parts/LeftNavContentWithScrollbar/index.js.map +0 -7
- package/esm/parts/LeftNavFooterItem/index.js.map +0 -7
- package/esm/parts/LeftNavFooterItem/styled.js.map +0 -7
- package/esm/parts/LeftNavLoading/index.js.map +0 -7
- package/esm/parts/OutOfTheBoxMapItem.js.map +0 -7
- package/esm/prop-types.js.map +0 -7
|
@@ -1,84 +1,39 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
const getLeftShadowStyles =
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
import styled from 'styled-components';
|
|
2
|
+
|
|
3
|
+
const getLeftShadowStyles = _ref => {
|
|
4
|
+
let {
|
|
5
|
+
selected,
|
|
6
|
+
selectedParent,
|
|
7
|
+
theme
|
|
8
|
+
} = _ref;
|
|
9
|
+
|
|
8
10
|
if (!selected && !selectedParent) {
|
|
9
|
-
return
|
|
10
|
-
box-shadow: inset 4px 0 0 0 transparent;
|
|
11
|
-
:hover {
|
|
12
|
-
box-shadow: inset 4px 0 0 0 ${theme.colors.brand[300]};
|
|
13
|
-
}
|
|
14
|
-
:active {
|
|
15
|
-
box-shadow: inset 4px 0 0 0 ${theme.colors.brand[400]};
|
|
16
|
-
}
|
|
17
|
-
`;
|
|
11
|
+
return "\n box-shadow: inset 4px 0 0 0 transparent;\n :hover {\n box-shadow: inset 4px 0 0 0 ".concat(theme.colors.brand[300], ";\n }\n :active {\n box-shadow: inset 4px 0 0 0 ").concat(theme.colors.brand[400], ";\n }\n ");
|
|
18
12
|
}
|
|
19
|
-
|
|
13
|
+
|
|
14
|
+
return "box-shadow: inset 4px 0 0 0 ".concat(theme.colors.brand[400], ";");
|
|
20
15
|
};
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
`;
|
|
46
|
-
const StyledLeftNavBodyAreasContainer = styled.div`
|
|
47
|
-
position: absolute;
|
|
48
|
-
width: 100%;
|
|
49
|
-
height: 100%;
|
|
50
|
-
display: grid;
|
|
51
|
-
grid-template-columns: 1fr;
|
|
52
|
-
grid-template-rows: auto 1fr;
|
|
53
|
-
grid-template-areas:
|
|
54
|
-
'left-nav-body-header'
|
|
55
|
-
'left-nav-body-body';
|
|
56
|
-
grid-area: left-nav-body;
|
|
57
|
-
`;
|
|
58
|
-
const StyledLeftNavBodyHeaderArea = styled.div`
|
|
59
|
-
width: 100%;
|
|
60
|
-
grid-area: left-nav-body-header;
|
|
61
|
-
${getLeftShadowStyles}
|
|
62
|
-
`;
|
|
63
|
-
const StyledLeftNavBodyItemsArea = styled.div`
|
|
64
|
-
width: 100%;
|
|
65
|
-
grid-area: left-nav-body-body;
|
|
66
|
-
max-height: 100%;
|
|
67
|
-
overflow-y: hidden;
|
|
68
|
-
overflow-x: hidden;
|
|
69
|
-
box-shadow: inset 4px 0 0 0 ${(props) => props.selected ? props.theme.colors.brand[400] : "transparent"};
|
|
70
|
-
`;
|
|
71
|
-
const StyledLeftNavFooterArea = styled.div`
|
|
72
|
-
width: 100%;
|
|
73
|
-
grid-area: left-nav-footer;
|
|
74
|
-
`;
|
|
75
|
-
export {
|
|
76
|
-
StyledLeftNavAreasContainer,
|
|
77
|
-
StyledLeftNavBodyAreasContainer,
|
|
78
|
-
StyledLeftNavBodyHeaderArea,
|
|
79
|
-
StyledLeftNavBodyItemsArea,
|
|
80
|
-
StyledLeftNavExpandAnimationWrapper,
|
|
81
|
-
StyledLeftNavFooterArea,
|
|
82
|
-
StyledLeftNavHeaderArea
|
|
83
|
-
};
|
|
84
|
-
//# sourceMappingURL=styled.js.map
|
|
16
|
+
|
|
17
|
+
const StyledLeftNavExpandAnimationWrapper = /*#__PURE__*/styled.nav.withConfig({
|
|
18
|
+
componentId: "sc-1hvvtkb-0"
|
|
19
|
+
})(["width:", ";transition:width ", " 350ms;box-shadow:-1px 0 0 0 ", ";border:1px solid ", ";overflow:hidden;height:100%;position:relative;"], props => props.expanded ? props.expandedWidth : '48px', props => props.expanded ? 'ease-out' : 'ease-in', props => props.theme.colors.neutral[100], props => props.theme.colors.neutral[100]);
|
|
20
|
+
const StyledLeftNavAreasContainer = /*#__PURE__*/styled.div.withConfig({
|
|
21
|
+
componentId: "sc-1hvvtkb-1"
|
|
22
|
+
})(["position:absolute;width:", ";height:100%;display:grid;grid-template-columns:1fr;grid-template-rows:auto 1fr auto;grid-template-areas:'left-nav-header' 'left-nav-body' 'left-nav-footer';"], props => props.expanded ? "calc(".concat(props.expandedWidth, " - 2px)") : '46px');
|
|
23
|
+
const StyledLeftNavHeaderArea = /*#__PURE__*/styled.div.withConfig({
|
|
24
|
+
componentId: "sc-1hvvtkb-2"
|
|
25
|
+
})(["grid-area:left-nav-header;", ""], getLeftShadowStyles);
|
|
26
|
+
const StyledLeftNavBodyAreasContainer = /*#__PURE__*/styled.div.withConfig({
|
|
27
|
+
componentId: "sc-1hvvtkb-3"
|
|
28
|
+
})(["position:absolute;width:100%;height:100%;display:grid;grid-template-columns:1fr;grid-template-rows:auto 1fr;grid-template-areas:'left-nav-body-header' 'left-nav-body-body';grid-area:left-nav-body;"]);
|
|
29
|
+
const StyledLeftNavBodyHeaderArea = /*#__PURE__*/styled.div.withConfig({
|
|
30
|
+
componentId: "sc-1hvvtkb-4"
|
|
31
|
+
})(["width:100%;grid-area:left-nav-body-header;", ""], getLeftShadowStyles);
|
|
32
|
+
const StyledLeftNavBodyItemsArea = /*#__PURE__*/styled.div.withConfig({
|
|
33
|
+
componentId: "sc-1hvvtkb-5"
|
|
34
|
+
})(["width:100%;grid-area:left-nav-body-body;max-height:100%;overflow-y:hidden;overflow-x:hidden;box-shadow:inset 4px 0 0 0 ", ";"], props => props.selected ? props.theme.colors.brand[400] : 'transparent');
|
|
35
|
+
const StyledLeftNavFooterArea = /*#__PURE__*/styled.div.withConfig({
|
|
36
|
+
componentId: "sc-1hvvtkb-6"
|
|
37
|
+
})(["width:100%;grid-area:left-nav-footer;"]);
|
|
38
|
+
|
|
39
|
+
export { StyledLeftNavAreasContainer, StyledLeftNavBodyAreasContainer, StyledLeftNavBodyHeaderArea, StyledLeftNavBodyItemsArea, StyledLeftNavExpandAnimationWrapper, StyledLeftNavFooterArea, StyledLeftNavHeaderArea };
|
|
@@ -1,72 +1,80 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
1
|
+
import 'core-js/modules/esnext.async-iterator.filter.js';
|
|
2
|
+
import 'core-js/modules/esnext.iterator.constructor.js';
|
|
3
|
+
import 'core-js/modules/esnext.iterator.filter.js';
|
|
4
|
+
import 'core-js/modules/esnext.async-iterator.for-each.js';
|
|
5
|
+
import 'core-js/modules/esnext.iterator.for-each.js';
|
|
6
|
+
import _jsx from '@babel/runtime/helpers/esm/jsx';
|
|
7
|
+
import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
|
|
8
|
+
import 'core-js/modules/web.dom-collections.iterator.js';
|
|
9
|
+
import { useState, useRef, useEffect } from 'react';
|
|
10
|
+
import 'overlayscrollbars/css/OverlayScrollbars.css';
|
|
11
|
+
import OverlayScrollbars from 'overlayscrollbars';
|
|
12
|
+
import styled from 'styled-components';
|
|
13
|
+
import { jsxs } from 'react/jsx-runtime';
|
|
11
14
|
|
|
12
|
-
|
|
13
|
-
background-color: rgba(105, 116, 137, 0.7) !important;
|
|
14
|
-
}
|
|
15
|
+
var _div, _div2, _div3, _div4;
|
|
15
16
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
17
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
18
|
+
|
|
19
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
20
|
+
const StyledHandle = /*#__PURE__*/styled.div.withConfig({
|
|
21
|
+
componentId: "sc-yn7jj3-0"
|
|
22
|
+
})(["width:6px;border:1px solid rgba(0,0,0,0);background-color:rgba(105,116,137,0.5) !important;border-radius:7px;:hover{background-color:rgba(105,116,137,0.7) !important;}:active{background-color:rgba(105,116,137,0.7) !important;}"]);
|
|
20
23
|
const options = {
|
|
21
|
-
className:
|
|
24
|
+
className: 'os-theme-dark',
|
|
22
25
|
scrollbars: {
|
|
23
|
-
autoHide:
|
|
26
|
+
autoHide: 'leave',
|
|
24
27
|
autoHideDelay: 0
|
|
25
28
|
}
|
|
26
29
|
};
|
|
27
|
-
const LeftNavContentWithScrollbar =
|
|
28
|
-
const {
|
|
29
|
-
|
|
30
|
+
const LeftNavContentWithScrollbar = props => {
|
|
31
|
+
const {
|
|
32
|
+
children
|
|
33
|
+
} = props;
|
|
34
|
+
const inheritBoxShadow = {
|
|
35
|
+
boxShadow: 'inherit'
|
|
36
|
+
};
|
|
30
37
|
const [osInstance, setOsInstance] = useState();
|
|
31
38
|
const osTargetRef = useRef(null);
|
|
32
39
|
useEffect(() => {
|
|
33
40
|
const nextOsInstance = OverlayScrollbars(osTargetRef.current, options);
|
|
34
41
|
setOsInstance(nextOsInstance);
|
|
35
42
|
}, [osInstance]);
|
|
36
|
-
return
|
|
43
|
+
return /*#__PURE__*/jsxs("div", {
|
|
37
44
|
className: "os-host",
|
|
38
|
-
style: {
|
|
45
|
+
style: _objectSpread({
|
|
46
|
+
height: '100%'
|
|
47
|
+
}, inheritBoxShadow),
|
|
39
48
|
tabIndex: -1,
|
|
40
|
-
ref: osTargetRef
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
49
|
+
ref: osTargetRef,
|
|
50
|
+
children: [_div || (_div = /*#__PURE__*/_jsx("div", {
|
|
51
|
+
className: "os-resize-observer-host"
|
|
52
|
+
})), /*#__PURE__*/_jsx("div", {
|
|
53
|
+
className: "os-padding",
|
|
54
|
+
style: inheritBoxShadow
|
|
55
|
+
}, void 0, /*#__PURE__*/_jsx("div", {
|
|
56
|
+
className: "os-viewport",
|
|
57
|
+
style: inheritBoxShadow
|
|
58
|
+
}, void 0, /*#__PURE__*/_jsx("div", {
|
|
59
|
+
className: "os-content",
|
|
60
|
+
style: inheritBoxShadow,
|
|
61
|
+
"aria-hidden": true
|
|
62
|
+
}, void 0, children))), _div2 || (_div2 = /*#__PURE__*/_jsx("div", {
|
|
63
|
+
className: "os-scrollbar os-scrollbar-horizontal "
|
|
64
|
+
}, void 0, /*#__PURE__*/_jsx("div", {
|
|
65
|
+
className: "os-scrollbar-track"
|
|
66
|
+
}, void 0, /*#__PURE__*/_jsx("div", {
|
|
67
|
+
className: "os-scrollbar-handle"
|
|
68
|
+
})))), _div3 || (_div3 = /*#__PURE__*/_jsx("div", {
|
|
69
|
+
className: "os-scrollbar os-scrollbar-vertical"
|
|
70
|
+
}, void 0, /*#__PURE__*/_jsx("div", {
|
|
71
|
+
className: "os-scrollbar-track"
|
|
72
|
+
}, void 0, /*#__PURE__*/_jsx(StyledHandle, {
|
|
73
|
+
className: "os-scrollbar-handle"
|
|
74
|
+
})))), _div4 || (_div4 = /*#__PURE__*/_jsx("div", {
|
|
75
|
+
className: "os-scrollbar-corner"
|
|
76
|
+
}))]
|
|
77
|
+
});
|
|
68
78
|
};
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
};
|
|
72
|
-
//# sourceMappingURL=index.js.map
|
|
79
|
+
|
|
80
|
+
export { LeftNavContentWithScrollbar };
|
|
@@ -1,29 +1,31 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import { MenuExpand } from
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
} from "./styled";
|
|
15
|
-
import { useKeyboardNavigation } from "../../hooks";
|
|
16
|
-
import LeftNavigationContext from "../../LeftNavigationContext";
|
|
17
|
-
import { FOOTER_DS_ID, FOOTER_MENU_CLOSE_DS_ID } from "../../exported-related/constants";
|
|
18
|
-
const LeftNavFooterItem = (props) => {
|
|
19
|
-
const { footerLabel, onFooterExpand = () => null, onFooterClose = () => null } = props;
|
|
1
|
+
import _jsx from '@babel/runtime/helpers/esm/jsx';
|
|
2
|
+
import { useContext } from 'react';
|
|
3
|
+
import { MenuExpand } from '@elliemae/ds-icons';
|
|
4
|
+
import Grid from '@elliemae/ds-grid';
|
|
5
|
+
import { SimpleTruncatedTooltipText } from '@elliemae/ds-truncated-tooltip-text';
|
|
6
|
+
import { StyledFooterMenu, StyledItemWrapper, StyledItem, StyledLabel, StyledSeparator, StyledMenuCollapse } from './styled.js';
|
|
7
|
+
import { LeftNavContext } from '../../LeftNavigationContext.js';
|
|
8
|
+
import { useKeyboardNavigation } from '../../hooks/useKeyboardNavigation.js';
|
|
9
|
+
import { FOOTER_MENU_CLOSE_DS_ID, FOOTER_DS_ID } from '../../exported-related/constants.js';
|
|
10
|
+
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
11
|
+
|
|
12
|
+
var _StyledSeparator;
|
|
13
|
+
const LeftNavFooterItem = props => {
|
|
20
14
|
const {
|
|
21
|
-
|
|
15
|
+
footerLabel,
|
|
16
|
+
onFooterExpand = () => null,
|
|
17
|
+
onFooterClose = () => null
|
|
18
|
+
} = props;
|
|
19
|
+
const {
|
|
20
|
+
leftNavProps: {
|
|
21
|
+
labelOverflow,
|
|
22
|
+
openedItem
|
|
23
|
+
},
|
|
22
24
|
expandedForAnimation,
|
|
23
25
|
setSelectedItem,
|
|
24
26
|
setFocusedItem,
|
|
25
27
|
visibleItemsRefs
|
|
26
|
-
} = useContext(
|
|
28
|
+
} = useContext(LeftNavContext);
|
|
27
29
|
const id = FOOTER_DS_ID;
|
|
28
30
|
const handleOnClick = expandedForAnimation ? onFooterClose : onFooterExpand;
|
|
29
31
|
const onKeyDown = useKeyboardNavigation({
|
|
@@ -37,67 +39,60 @@ const LeftNavFooterItem = (props) => {
|
|
|
37
39
|
},
|
|
38
40
|
onClick: handleOnClick
|
|
39
41
|
});
|
|
40
|
-
return
|
|
41
|
-
key: id,
|
|
42
|
+
return /*#__PURE__*/_jsx(StyledFooterMenu, {
|
|
42
43
|
"data-testid": "leftnav-container"
|
|
43
|
-
},
|
|
44
|
+
}, id, /*#__PURE__*/_jsx(StyledItemWrapper, {}, void 0, /*#__PURE__*/jsx(StyledItem, {
|
|
44
45
|
ref: visibleItemsRefs.current[id],
|
|
45
46
|
tabIndex: expandedForAnimation ? -1 : 0,
|
|
46
47
|
expanded: expandedForAnimation,
|
|
47
48
|
pt: "xxs2",
|
|
48
|
-
height: expandedForAnimation ?
|
|
49
|
+
height: expandedForAnimation ? 'auto' : '48px',
|
|
49
50
|
alignItems: "flex-start",
|
|
50
51
|
pl: "xxs",
|
|
51
|
-
cols: expandedForAnimation ? [
|
|
52
|
+
cols: expandedForAnimation ? ['auto', '1fr', 'auto'] : ['38px'],
|
|
52
53
|
onClick: expandedForAnimation ? () => null : handleOnClick,
|
|
53
|
-
onKeyDown,
|
|
54
|
+
onKeyDown: onKeyDown,
|
|
54
55
|
onFocus: () => setFocusedItem(id),
|
|
55
56
|
"data-testid": "leftnav-item-container",
|
|
56
57
|
role: "menuitem",
|
|
57
|
-
"aria-label": expandedForAnimation ?
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
onFooterExpand: PropTypes.func,
|
|
96
|
-
onFooterClose: PropTypes.func
|
|
97
|
-
};
|
|
98
|
-
var LeftNavFooterItem_default = LeftNavFooterItem;
|
|
99
|
-
export {
|
|
100
|
-
LeftNavFooterItem,
|
|
101
|
-
LeftNavFooterItem_default as default
|
|
58
|
+
"aria-label": expandedForAnimation ? "Footer, ".concat(footerLabel) : "Expand left navigation",
|
|
59
|
+
children: !expandedForAnimation ? /*#__PURE__*/_jsx(MenuExpand, {
|
|
60
|
+
size: "m",
|
|
61
|
+
color: ['brand-primary', 800],
|
|
62
|
+
"data-testid": "leftnav-footer-btn"
|
|
63
|
+
}) : /*#__PURE__*/jsxs(Fragment, {
|
|
64
|
+
children: [/*#__PURE__*/_jsx(StyledLabel, {
|
|
65
|
+
mt: "5px",
|
|
66
|
+
mr: "12px",
|
|
67
|
+
mb: "16px",
|
|
68
|
+
"data-testid": "leftnav-itemlabel",
|
|
69
|
+
labelOverflow: labelOverflow,
|
|
70
|
+
"aria-live": "polite"
|
|
71
|
+
}, void 0, labelOverflow === 'truncate' ? /*#__PURE__*/_jsx(SimpleTruncatedTooltipText, {
|
|
72
|
+
value: footerLabel,
|
|
73
|
+
placement: "bottom-start"
|
|
74
|
+
}) : footerLabel), _StyledSeparator || (_StyledSeparator = /*#__PURE__*/_jsx(StyledSeparator, {
|
|
75
|
+
mt: "xxxs"
|
|
76
|
+
})), /*#__PURE__*/_jsx(Grid, {
|
|
77
|
+
m: "0 12px"
|
|
78
|
+
}, void 0, /*#__PURE__*/_jsx(StyledMenuCollapse, {
|
|
79
|
+
size: "m",
|
|
80
|
+
color: ['brand-primary', 800],
|
|
81
|
+
onClick: e => {
|
|
82
|
+
e.stopPropagation();
|
|
83
|
+
handleOnClick(e);
|
|
84
|
+
},
|
|
85
|
+
"data-testid": "leftnav-footer-btn",
|
|
86
|
+
tabIndex: 0,
|
|
87
|
+
onFocus: e => {
|
|
88
|
+
e.stopPropagation();
|
|
89
|
+
setFocusedItem(FOOTER_MENU_CLOSE_DS_ID);
|
|
90
|
+
},
|
|
91
|
+
role: "button",
|
|
92
|
+
"aria-label": "Collapse left navigation"
|
|
93
|
+
}))]
|
|
94
|
+
})
|
|
95
|
+
})));
|
|
102
96
|
};
|
|
103
|
-
|
|
97
|
+
|
|
98
|
+
export { LeftNavFooterItem, LeftNavFooterItem as default };
|
|
@@ -1,65 +1,26 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { getLeftBorderStyle
|
|
6
|
-
const StyledFooterMenu = styled(Grid)`
|
|
7
|
-
width: 100%;
|
|
8
|
-
margin-top: auto;
|
|
9
|
-
background: ${(props) => props.theme.colors.neutral["000"]};
|
|
1
|
+
import styled from 'styled-components';
|
|
2
|
+
import { Grid } from '@elliemae/ds-grid';
|
|
3
|
+
import { MenuCollapse } from '@elliemae/ds-icons';
|
|
4
|
+
import { getItemBackgroundStyle } from '../../common/getItemBackgroundStyle.js';
|
|
5
|
+
import { getLeftBorderStyle } from '../../common/getLeftBorderStyle.js';
|
|
10
6
|
|
|
11
|
-
|
|
7
|
+
const StyledFooterMenu = /*#__PURE__*/styled(Grid).withConfig({
|
|
8
|
+
componentId: "sc-1mcbjxr-0"
|
|
9
|
+
})(["width:100%;margin-top:auto;background:", ";", " border-top:1px solid ", ";"], props => props.theme.colors.neutral['000'], getLeftBorderStyle, props => props.theme.colors.neutral[100]);
|
|
10
|
+
const StyledItemWrapper = /*#__PURE__*/styled(Grid).withConfig({
|
|
11
|
+
componentId: "sc-1mcbjxr-1"
|
|
12
|
+
})(["position:relative;padding-left:", ";"], props => props.theme.space.xxxs);
|
|
13
|
+
const StyledItem = /*#__PURE__*/styled(Grid).withConfig({
|
|
14
|
+
componentId: "sc-1mcbjxr-2"
|
|
15
|
+
})(["min-height:48px;cursor:", ";", " outline:none;:focus{&:before{content:'';position:absolute;height:100%;width:100%;top:0;left:0px;border:2px solid ", ";pointer-events:none;}}"], props => props.expanded ? 'auto' : 'pointer', getItemBackgroundStyle, props => props.theme.colors.brand[600]);
|
|
16
|
+
const StyledLabel = /*#__PURE__*/styled(Grid).withConfig({
|
|
17
|
+
componentId: "sc-1mcbjxr-3"
|
|
18
|
+
})(["font-size:11px;color:", ";line-height:14px;word-break:", ";"], props => props.theme.colors.neutral[500], props => props.labelOverflow === 'wrapAll' ? 'break-all' : 'normal');
|
|
19
|
+
const StyledSeparator = /*#__PURE__*/styled(Grid).withConfig({
|
|
20
|
+
componentId: "sc-1mcbjxr-4"
|
|
21
|
+
})(["height:16px;width:1px;background-color:", ";"], props => props.theme.colors.neutral[100]);
|
|
22
|
+
const StyledMenuCollapse = /*#__PURE__*/styled(MenuCollapse).withConfig({
|
|
23
|
+
componentId: "sc-1mcbjxr-5"
|
|
24
|
+
})(["cursor:pointer;:focus{outline:2px solid ", ";}"], props => props.theme.colors.brand[700]);
|
|
12
25
|
|
|
13
|
-
|
|
14
|
-
`;
|
|
15
|
-
const StyledItemWrapper = styled(Grid)`
|
|
16
|
-
position: relative;
|
|
17
|
-
padding-left: ${(props) => props.theme.space.xxxs};
|
|
18
|
-
`;
|
|
19
|
-
const StyledItem = styled(Grid)`
|
|
20
|
-
min-height: 48px;
|
|
21
|
-
cursor: ${(props) => props.expanded ? "auto" : "pointer"};
|
|
22
|
-
|
|
23
|
-
${getItemBackgroundStyle}
|
|
24
|
-
|
|
25
|
-
outline: none;
|
|
26
|
-
|
|
27
|
-
:focus {
|
|
28
|
-
&:before {
|
|
29
|
-
content: '';
|
|
30
|
-
position: absolute;
|
|
31
|
-
height: 100%;
|
|
32
|
-
width: 100%;
|
|
33
|
-
top: 0;
|
|
34
|
-
left: 0px;
|
|
35
|
-
border: 2px solid ${(props) => props.theme.colors.brand[600]};
|
|
36
|
-
pointer-events: none;
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
`;
|
|
40
|
-
const StyledLabel = styled(Grid)`
|
|
41
|
-
font-size: 11px;
|
|
42
|
-
color: ${(props) => props.theme.colors.neutral[500]};
|
|
43
|
-
line-height: 14px;
|
|
44
|
-
word-break: ${(props) => props.labelOverflow === "wrapAll" ? "break-all" : "normal"};
|
|
45
|
-
`;
|
|
46
|
-
const StyledSeparator = styled(Grid)`
|
|
47
|
-
height: 16px;
|
|
48
|
-
width: 1px;
|
|
49
|
-
background-color: ${(props) => props.theme.colors.neutral[100]};
|
|
50
|
-
`;
|
|
51
|
-
const StyledMenuCollapse = styled(MenuCollapse)`
|
|
52
|
-
cursor: pointer;
|
|
53
|
-
:focus {
|
|
54
|
-
outline: 2px solid ${(props) => props.theme.colors.brand[700]};
|
|
55
|
-
}
|
|
56
|
-
`;
|
|
57
|
-
export {
|
|
58
|
-
StyledFooterMenu,
|
|
59
|
-
StyledItem,
|
|
60
|
-
StyledItemWrapper,
|
|
61
|
-
StyledLabel,
|
|
62
|
-
StyledMenuCollapse,
|
|
63
|
-
StyledSeparator
|
|
64
|
-
};
|
|
65
|
-
//# sourceMappingURL=styled.js.map
|
|
26
|
+
export { StyledFooterMenu, StyledItem, StyledItemWrapper, StyledLabel, StyledMenuCollapse, StyledSeparator };
|
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import DSCircularProgressIndicator from
|
|
4
|
-
import Grid from
|
|
5
|
-
import styled from
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
LeftNavLoading
|
|
1
|
+
import _jsx from '@babel/runtime/helpers/esm/jsx';
|
|
2
|
+
import 'react';
|
|
3
|
+
import DSCircularProgressIndicator from '@elliemae/ds-circular-progress-indicator';
|
|
4
|
+
import Grid from '@elliemae/ds-grid';
|
|
5
|
+
import styled from 'styled-components';
|
|
6
|
+
|
|
7
|
+
const StyledLoaderWrapper = /*#__PURE__*/styled(Grid).withConfig({
|
|
8
|
+
componentId: "sc-mqgtxd-0"
|
|
9
|
+
})(["grid-area:left-nav-body;height:100%;place-items:center;z-index:0;background-color:white;"]);
|
|
10
|
+
const LeftNavLoading = _ref => {
|
|
11
|
+
let {
|
|
12
|
+
expanded
|
|
13
|
+
} = _ref;
|
|
14
|
+
return /*#__PURE__*/_jsx(StyledLoaderWrapper, {}, void 0, /*#__PURE__*/_jsx(DSCircularProgressIndicator, {
|
|
15
|
+
size: expanded ? 'xl' : 'm',
|
|
16
|
+
loading: true,
|
|
17
|
+
showLabel: expanded,
|
|
18
|
+
waiting: false,
|
|
19
|
+
showTooltip: !expanded
|
|
20
|
+
}));
|
|
22
21
|
};
|
|
23
|
-
|
|
22
|
+
|
|
23
|
+
export { LeftNavLoading };
|
|
@@ -1,26 +1,42 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
|
|
1
|
+
import 'core-js/modules/esnext.async-iterator.filter.js';
|
|
2
|
+
import 'core-js/modules/esnext.iterator.constructor.js';
|
|
3
|
+
import 'core-js/modules/esnext.iterator.filter.js';
|
|
4
|
+
import 'core-js/modules/esnext.async-iterator.for-each.js';
|
|
5
|
+
import 'core-js/modules/esnext.iterator.for-each.js';
|
|
6
|
+
import _jsx from '@babel/runtime/helpers/esm/jsx';
|
|
7
|
+
import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
|
|
8
|
+
import React from 'react';
|
|
9
|
+
import { outOfTheBoxComponents } from '../outOfTheBox/index.js';
|
|
10
|
+
import { LeftNavContext } from '../LeftNavigationContext.js';
|
|
11
|
+
|
|
12
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
13
|
+
|
|
14
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
15
|
+
const OutOfTheBoxMapItem = props => {
|
|
6
16
|
const {
|
|
7
17
|
item,
|
|
8
|
-
item: {
|
|
18
|
+
item: {
|
|
19
|
+
type,
|
|
20
|
+
Component
|
|
21
|
+
}
|
|
9
22
|
} = props;
|
|
10
|
-
const ctx =
|
|
11
|
-
|
|
23
|
+
const ctx = React.useContext(LeftNavContext);
|
|
24
|
+
|
|
25
|
+
if (typeof type === 'string' && !!outOfTheBoxComponents[type]) {
|
|
12
26
|
const OutOfTheBoxComponent = outOfTheBoxComponents[type];
|
|
13
|
-
return
|
|
14
|
-
item: {
|
|
15
|
-
|
|
27
|
+
return /*#__PURE__*/_jsx(OutOfTheBoxComponent, {
|
|
28
|
+
item: _objectSpread({
|
|
29
|
+
itemOpts: {}
|
|
30
|
+
}, item),
|
|
31
|
+
ctx: ctx
|
|
16
32
|
});
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
33
|
+
} // we expect an error to be threw if Component is not defined and type is not a valid out-of-the-box...
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
return /*#__PURE__*/_jsx(Component, {
|
|
37
|
+
item: item,
|
|
38
|
+
ctx: ctx
|
|
21
39
|
});
|
|
22
40
|
};
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
};
|
|
26
|
-
//# sourceMappingURL=OutOfTheBoxMapItem.js.map
|
|
41
|
+
|
|
42
|
+
export { OutOfTheBoxMapItem };
|