@elliemae/ds-left-navigation 2.0.0-rc.1 → 2.0.0-rc.13
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/configs/useLeftNavConfig.js +1 -1
- package/cjs/exported-related/ItemRenderer/index.js +4 -2
- package/cjs/exported-related/ItemRenderer/usePropsWithDefaults.js +3 -2
- package/cjs/exported-related/Notifications/index.js +8 -4
- package/cjs/hooks/useSelectFirstBodyItem.js +3 -3
- package/cjs/outOfTheBox/ItemControlledDrilldown/index.js +8 -5
- package/cjs/outOfTheBox/ItemHeader/index.js +4 -3
- package/cjs/outOfTheBox/ItemLink/index.js +4 -3
- package/cjs/outOfTheBox/ItemSubmenu/index.js +4 -3
- package/cjs/outOfTheBox/ItemTextLabel/index.js +3 -2
- package/cjs/outOfTheBox/ItemUncontrolledDrilldown/index.js +3 -2
- package/cjs/outOfTheBox/ItemWithDate/index.js +3 -2
- package/cjs/parts/LeftNavContent/index.js +3 -2
- package/cjs/prop-types.js +2 -1
- package/esm/configs/useLeftNavConfig.js +1 -1
- package/esm/exported-related/ItemRenderer/index.js +4 -2
- package/esm/exported-related/ItemRenderer/usePropsWithDefaults.js +3 -2
- package/esm/exported-related/Notifications/index.js +8 -4
- package/esm/hooks/useSelectFirstBodyItem.js +3 -3
- package/esm/outOfTheBox/ItemControlledDrilldown/index.js +6 -3
- package/esm/outOfTheBox/ItemHeader/index.js +4 -3
- package/esm/outOfTheBox/ItemLink/index.js +4 -3
- package/esm/outOfTheBox/ItemSubmenu/index.js +4 -3
- package/esm/outOfTheBox/ItemTextLabel/index.js +3 -2
- package/esm/outOfTheBox/ItemUncontrolledDrilldown/index.js +3 -2
- package/esm/outOfTheBox/ItemWithDate/index.js +3 -2
- package/esm/parts/LeftNavContent/index.js +3 -2
- package/esm/prop-types.js +2 -1
- package/package.json +8 -6
- package/types/LeftNavigation.d.ts +46 -11
- package/types/exported-related/ItemRenderer/styled.d.ts +2 -2
- package/types/hooks/useSelectFirstBodyItem.d.ts +1 -1
- package/types/index.d.d.ts +3 -0
- package/types/outOfTheBox/ItemControlledDrilldown/styled.d.ts +2 -2
- package/types/outOfTheBox/ItemHeader/styled.d.ts +2 -2
- package/types/outOfTheBox/ItemLink/styled.d.ts +1 -1
- package/types/outOfTheBox/ItemSection/styled.d.ts +3 -3
- package/types/outOfTheBox/ItemSubmenu/styled.d.ts +2 -2
- package/types/outOfTheBox/ItemTextLabel/styled.d.ts +1 -1
- package/types/outOfTheBox/ItemUncontrolledDrilldown/styled.d.ts +2 -2
- package/types/outOfTheBox/ItemWithDate/styled.d.ts +2 -2
- package/types/parts/LeftNavContent/styled.d.ts +7 -7
- package/types/parts/LeftNavFooterItem/styled.d.ts +6 -6
- package/types/prop-types.d.ts +87 -18
|
@@ -57,7 +57,7 @@ const useLeftNavConfig = props => {
|
|
|
57
57
|
React__default["default"].useEffect(() => {
|
|
58
58
|
onFocusChange(focusedItem);
|
|
59
59
|
}, [focusedItem, onFocusChange]);
|
|
60
|
-
useSelectFirstBodyItem.useSelectFirstBodyItem(items, openedItem, props.selectedItem !== undefined ? props.selectedItem : selectedItem, setSelectedItem); // -----------------------------------------------------------------------------
|
|
60
|
+
useSelectFirstBodyItem.useSelectFirstBodyItem(items, openedItem, props.selectedItem !== undefined ? props.selectedItem : selectedItem, setSelectedItem, props.disableDefaultSelection); // -----------------------------------------------------------------------------
|
|
61
61
|
// ************************** ------------ **************************
|
|
62
62
|
// * ITEMS MANAGEMENT *
|
|
63
63
|
// ************************** ------------ **************************
|
|
@@ -79,14 +79,14 @@ const ItemRenderer = props => {
|
|
|
79
79
|
|
|
80
80
|
return /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
81
81
|
children: [/*#__PURE__*/_jsx__default["default"](styled.StyledItemWrapper, {
|
|
82
|
-
shadowStyle: shadowStyle,
|
|
82
|
+
shadowStyle: shadowStyle(opened, item.type),
|
|
83
83
|
"data-testid": "leftnav-item-wrapper"
|
|
84
84
|
}, void 0, /*#__PURE__*/jsxRuntime.jsx(styled.StyledItem, {
|
|
85
85
|
ref: visibleItemsRefs.current[dsId],
|
|
86
86
|
pt: paddingTop,
|
|
87
87
|
pl: indent === undefined ? 'xxxs' : "".concat(indent, "px"),
|
|
88
88
|
minHeight: minHeight,
|
|
89
|
-
shadowStyle: shadowStyle,
|
|
89
|
+
shadowStyle: shadowStyle(opened, item.type),
|
|
90
90
|
alignItems: "flex-start",
|
|
91
91
|
cols: cols,
|
|
92
92
|
onClick: !opened ? handleOnClick : () => null,
|
|
@@ -101,6 +101,8 @@ const ItemRenderer = props => {
|
|
|
101
101
|
"aria-describedby": ariaDescribedBy,
|
|
102
102
|
"aria-expanded": ariaExpanded,
|
|
103
103
|
role: ariaRole,
|
|
104
|
+
"data-selected": isSelected,
|
|
105
|
+
"data-selectedparent": selectedParent === dsId,
|
|
104
106
|
"aria-label": ariaLabel,
|
|
105
107
|
"aria-hidden": !focuseable,
|
|
106
108
|
"aria-live": ariaLive,
|
|
@@ -29,7 +29,8 @@ const itemDefaultProps = {
|
|
|
29
29
|
ariaLive: 'off',
|
|
30
30
|
ariaExpanded: undefined,
|
|
31
31
|
ariaDescribedBy: undefined
|
|
32
|
-
};
|
|
32
|
+
};
|
|
33
|
+
const itemWithoutShadows = ['ds-left-nav-item-header', 'ds-left-nav-item-link', 'ds-left-nav-item-submenu']; // Make use Item props with defaults
|
|
33
34
|
|
|
34
35
|
const usePropsWithDefaults = props => {
|
|
35
36
|
const propsWithDefault = React.useMemo(() => {
|
|
@@ -43,7 +44,7 @@ const usePropsWithDefaults = props => {
|
|
|
43
44
|
minHeight: '48px',
|
|
44
45
|
paddingTop: '12px',
|
|
45
46
|
subitems: [],
|
|
46
|
-
shadowStyle: () =>
|
|
47
|
+
shadowStyle: (opened, type) => theme => "box-shadow: ".concat(opened || !itemWithoutShadows.includes(type) ? 'inset 4px 0 0 0 #52A6EC' : 'inset 4px 0 0 0 white'),
|
|
47
48
|
hasBorderBottom: false,
|
|
48
49
|
borderBottomMr: '0px'
|
|
49
50
|
}, props), {}, {
|
|
@@ -25,28 +25,32 @@ const Notifications = _ref => {
|
|
|
25
25
|
} = _ref;
|
|
26
26
|
return /*#__PURE__*/_jsx__default["default"](StyledIcon, {}, void 0, /*#__PURE__*/_jsx__default["default"](dsIcons.Notifications, {
|
|
27
27
|
size: "m",
|
|
28
|
-
color: ['brand-primary', 800]
|
|
28
|
+
color: ['brand-primary', 800],
|
|
29
|
+
"data-testid": "left-nav-notifications-icon"
|
|
29
30
|
}), (exceptions || alerts || messages) && /*#__PURE__*/_jsx__default["default"](Grid__default["default"], {
|
|
30
31
|
cols: ['1fr', '1fr', '1fr'],
|
|
31
32
|
gutter: "xxxs",
|
|
32
33
|
mt: "2px"
|
|
33
34
|
}, void 0, /*#__PURE__*/_jsx__default["default"](Grid__default["default"], {
|
|
34
35
|
width: "6px",
|
|
35
|
-
height: "6px"
|
|
36
|
+
height: "6px",
|
|
37
|
+
"data-testid": "left-nav-exceptions-icon"
|
|
36
38
|
}, void 0, exceptions && /*#__PURE__*/_jsx__default["default"](dsIcons.ExceptionsSmallFill, {
|
|
37
39
|
width: "6px",
|
|
38
40
|
height: "6px",
|
|
39
41
|
color: ['warning', 900]
|
|
40
42
|
})), /*#__PURE__*/_jsx__default["default"](Grid__default["default"], {
|
|
41
43
|
width: "6px",
|
|
42
|
-
height: "6px"
|
|
44
|
+
height: "6px",
|
|
45
|
+
"data-testid": "left-nav-alerts-icon"
|
|
43
46
|
}, void 0, alerts && /*#__PURE__*/_jsx__default["default"](dsIcons.AlertsSmallFill, {
|
|
44
47
|
width: "6px",
|
|
45
48
|
height: "6px",
|
|
46
49
|
color: ['danger', 900]
|
|
47
50
|
})), /*#__PURE__*/_jsx__default["default"](Grid__default["default"], {
|
|
48
51
|
width: "6px",
|
|
49
|
-
height: "6px"
|
|
52
|
+
height: "6px",
|
|
53
|
+
"data-testid": "left-nav-messages-icon"
|
|
50
54
|
}, void 0, messages && /*#__PURE__*/_jsx__default["default"](dsIcons.MessagesSmallFill, {
|
|
51
55
|
width: "6px",
|
|
52
56
|
height: "6px",
|
|
@@ -23,14 +23,14 @@ const isItemInsideTheTree = (item, itemID) => {
|
|
|
23
23
|
return item.dsId === itemID || (item === null || item === void 0 ? void 0 : (_item$itemOpts = item.itemOpts) === null || _item$itemOpts === void 0 ? void 0 : (_item$itemOpts$items = _item$itemOpts.items) === null || _item$itemOpts$items === void 0 ? void 0 : _item$itemOpts$items.some(it => isItemInsideTheTree(it, itemID)));
|
|
24
24
|
};
|
|
25
25
|
|
|
26
|
-
const useSelectFirstBodyItem = (items, openedItem, selectedItem, setSelectedItem) => {
|
|
26
|
+
const useSelectFirstBodyItem = (items, openedItem, selectedItem, setSelectedItem, disableDefaultSelection) => {
|
|
27
27
|
React.useEffect(() => {
|
|
28
|
-
if (items && items.length && openedItem) {
|
|
28
|
+
if (!disableDefaultSelection && items && items.length && openedItem) {
|
|
29
29
|
const index = items.findIndex(elem => isSelectableOutOfTheBox(elem) || isSelectableCustom(elem));
|
|
30
30
|
const isItemInside = items.some(it => isItemInsideTheTree(it, selectedItem));
|
|
31
31
|
if (isItemInside) setSelectedItem(selectedItem);else if (index !== -1) setSelectedItem(items[index].dsId);
|
|
32
32
|
}
|
|
33
|
-
}, [openedItem, setSelectedItem]);
|
|
33
|
+
}, [openedItem, setSelectedItem, disableDefaultSelection]);
|
|
34
34
|
};
|
|
35
35
|
|
|
36
36
|
exports.useSelectFirstBodyItem = useSelectFirstBodyItem;
|
|
@@ -16,12 +16,13 @@ var Grid = require('@elliemae/ds-grid');
|
|
|
16
16
|
var dsTruncatedTooltipText = require('@elliemae/ds-truncated-tooltip-text');
|
|
17
17
|
var dsIcons = require('@elliemae/ds-icons');
|
|
18
18
|
var constants = require('../../exported-related/constants.js');
|
|
19
|
-
var index$
|
|
19
|
+
var index$3 = require('../../exported-related/ItemRenderer/index.js');
|
|
20
20
|
require('react/jsx-runtime');
|
|
21
21
|
require('styled-components');
|
|
22
22
|
var styled = require('./styled.js');
|
|
23
23
|
var index = require('../ItemSeparator/index.js');
|
|
24
24
|
var index$1 = require('../ItemWithDate/index.js');
|
|
25
|
+
var index$2 = require('../ItemTextLabel/index.js');
|
|
25
26
|
|
|
26
27
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
27
28
|
|
|
@@ -34,7 +35,8 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (O
|
|
|
34
35
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty__default["default"](target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
35
36
|
const outOfTheBoxSubitemsComponents = {
|
|
36
37
|
[constants.ITEM_TYPES.LEFT_NAV_ITEM_SEPARATOR]: index.ItemSeparator,
|
|
37
|
-
[constants.ITEM_TYPES.LEFT_NAV_ITEM_WITH_DATE]: index$1.ItemWithDate
|
|
38
|
+
[constants.ITEM_TYPES.LEFT_NAV_ITEM_WITH_DATE]: index$1.ItemWithDate,
|
|
39
|
+
[constants.ITEM_TYPES.LEFT_NAV_ITEM_TEXT_LABEL]: index$2.ItemTextLabel
|
|
38
40
|
};
|
|
39
41
|
|
|
40
42
|
const OutOfTheBoxMapSubitem = props => {
|
|
@@ -84,7 +86,8 @@ const ItemControlledDrilldown = props => {
|
|
|
84
86
|
labelBold,
|
|
85
87
|
labelColor,
|
|
86
88
|
isOpened,
|
|
87
|
-
items
|
|
89
|
+
items,
|
|
90
|
+
labelDataTestId
|
|
88
91
|
}
|
|
89
92
|
},
|
|
90
93
|
ctx,
|
|
@@ -110,7 +113,7 @@ const ItemControlledDrilldown = props => {
|
|
|
110
113
|
ctx: ctx
|
|
111
114
|
}, subitem.dsId));
|
|
112
115
|
}, [items, isOpened]);
|
|
113
|
-
return /*#__PURE__*/_jsx__default["default"](index$
|
|
116
|
+
return /*#__PURE__*/_jsx__default["default"](index$3.ItemRenderer, {
|
|
114
117
|
item: _objectSpread(_objectSpread({}, item), {}, {
|
|
115
118
|
itemOpts: _objectSpread(_objectSpread({
|
|
116
119
|
ariaExpanded: isOpened,
|
|
@@ -129,7 +132,7 @@ const ItemControlledDrilldown = props => {
|
|
|
129
132
|
mt: "-2px"
|
|
130
133
|
}, void 0, arrowIcon), /*#__PURE__*/_jsx__default["default"](styled.StyledLabel, {
|
|
131
134
|
pb: "xxxs",
|
|
132
|
-
"data-testid":
|
|
135
|
+
"data-testid": labelDataTestId || 'leftnav-list-item-label',
|
|
133
136
|
labelOverflow: labelOverflow,
|
|
134
137
|
labelBold: labelBold,
|
|
135
138
|
labelColor: labelColor
|
|
@@ -41,7 +41,8 @@ const ItemHeader = props => {
|
|
|
41
41
|
itemOpts: {
|
|
42
42
|
label,
|
|
43
43
|
RightComponent,
|
|
44
|
-
BottomComponent
|
|
44
|
+
BottomComponent,
|
|
45
|
+
labelDataTestId
|
|
45
46
|
},
|
|
46
47
|
CollapsedComponent = () => null
|
|
47
48
|
},
|
|
@@ -61,7 +62,7 @@ const ItemHeader = props => {
|
|
|
61
62
|
const opened = openedItem === dsId;
|
|
62
63
|
const ariaLabel = (_item$itemOpts$ariaLa = item.itemOpts.ariaLabel) !== null && _item$itemOpts$ariaLa !== void 0 ? _item$itemOpts$ariaLa : typeof label === 'string' ? label : 'menuitem';
|
|
63
64
|
const isSelected = selectedItem === dsId || selectedParent === dsId;
|
|
64
|
-
const shadowStyle = React.useCallback(theme => !
|
|
65
|
+
const shadowStyle = React.useCallback(opened => theme => !opened ? notOpenedShadowStyle(isSelected)(theme) : "box-shadow: inset 4px 0 0 0 #52A6EC", [isSelected, openedItem]);
|
|
65
66
|
return /*#__PURE__*/_jsx__default["default"](index.ItemRenderer, {
|
|
66
67
|
item: _objectSpread(_objectSpread({}, item), {}, {
|
|
67
68
|
itemOpts: _objectSpread(_objectSpread({
|
|
@@ -103,7 +104,7 @@ const ItemHeader = props => {
|
|
|
103
104
|
ml: opened ? 'xxs' : '1px',
|
|
104
105
|
mt: "xxxs",
|
|
105
106
|
mb: "15px",
|
|
106
|
-
"data-testid":
|
|
107
|
+
"data-testid": labelDataTestId || 'leftnav-itemlabel',
|
|
107
108
|
labelOverflow: labelOverflow
|
|
108
109
|
}, void 0, labelOverflow === 'truncate' ? /*#__PURE__*/_jsx__default["default"](dsTruncatedTooltipText.SimpleTruncatedTooltipText, {
|
|
109
110
|
value: label,
|
|
@@ -37,7 +37,8 @@ const ItemLink = props => {
|
|
|
37
37
|
dsId,
|
|
38
38
|
itemOpts: {
|
|
39
39
|
label,
|
|
40
|
-
RightComponent
|
|
40
|
+
RightComponent,
|
|
41
|
+
labelDataTestId
|
|
41
42
|
},
|
|
42
43
|
CollapsedComponent = () => null
|
|
43
44
|
},
|
|
@@ -52,7 +53,7 @@ const ItemLink = props => {
|
|
|
52
53
|
}
|
|
53
54
|
} = props;
|
|
54
55
|
const isSelected = selectedItem === dsId || selectedParent === dsId;
|
|
55
|
-
const shadowStyle = React.useCallback(theme => !
|
|
56
|
+
const shadowStyle = React.useCallback(opened => theme => !opened ? notOpenedShadowStyle(isSelected)(theme) : "box-shadow: inset 4px 0 0 0 #52A6EC", [isSelected, openedItem]);
|
|
56
57
|
return /*#__PURE__*/_jsx__default["default"](index.ItemRenderer, {
|
|
57
58
|
item: _objectSpread(_objectSpread({}, item), {}, {
|
|
58
59
|
itemOpts: _objectSpread(_objectSpread({
|
|
@@ -76,7 +77,7 @@ const ItemLink = props => {
|
|
|
76
77
|
ml: "1px",
|
|
77
78
|
mt: "xxxs",
|
|
78
79
|
mb: "15px",
|
|
79
|
-
"data-testid":
|
|
80
|
+
"data-testid": labelDataTestId || 'leftnav-itemlabel',
|
|
80
81
|
labelOverflow: labelOverflow
|
|
81
82
|
}, void 0, labelOverflow === 'truncate' ? /*#__PURE__*/_jsx__default["default"](dsTruncatedTooltipText.SimpleTruncatedTooltipText, {
|
|
82
83
|
value: label,
|
|
@@ -41,7 +41,8 @@ const ItemSubmenu = props => {
|
|
|
41
41
|
itemOpts: {
|
|
42
42
|
label,
|
|
43
43
|
RightComponent,
|
|
44
|
-
BottomComponent
|
|
44
|
+
BottomComponent,
|
|
45
|
+
labelDataTestId
|
|
45
46
|
},
|
|
46
47
|
CollapsedComponent = () => null
|
|
47
48
|
},
|
|
@@ -60,7 +61,7 @@ const ItemSubmenu = props => {
|
|
|
60
61
|
} = props;
|
|
61
62
|
const opened = openedItem === dsId;
|
|
62
63
|
const isSelected = selectedItem === dsId;
|
|
63
|
-
const shadowStyle = React.useCallback(theme => !
|
|
64
|
+
const shadowStyle = React.useCallback(opened => theme => !opened ? notOpenedShadowStyle(isSelected || selectedParent === dsId)(theme) : "box-shadow: inset 4px 0 0 0 #52A6EC", [dsId, isSelected, openedItem, selectedParent]);
|
|
64
65
|
const ariaLabel = (_item$itemOpts$ariaLa = item.itemOpts.ariaLabel) !== null && _item$itemOpts$ariaLa !== void 0 ? _item$itemOpts$ariaLa : typeof label === 'string' ? label : 'menuitem';
|
|
65
66
|
return /*#__PURE__*/_jsx__default["default"](index.ItemRenderer, {
|
|
66
67
|
item: _objectSpread(_objectSpread({}, item), {}, {
|
|
@@ -102,7 +103,7 @@ const ItemSubmenu = props => {
|
|
|
102
103
|
ml: opened ? 'xxs' : '1px',
|
|
103
104
|
mt: "xxxs",
|
|
104
105
|
mb: "15px",
|
|
105
|
-
"data-testid":
|
|
106
|
+
"data-testid": labelDataTestId || 'leftnav-itemlabel',
|
|
106
107
|
labelOverflow: labelOverflow
|
|
107
108
|
}, void 0, labelOverflow === 'truncate' ? /*#__PURE__*/_jsx__default["default"](dsTruncatedTooltipText.SimpleTruncatedTooltipText, {
|
|
108
109
|
value: label,
|
|
@@ -36,7 +36,8 @@ const ItemTextLabel = props => {
|
|
|
36
36
|
label,
|
|
37
37
|
labelOverflow: itemLabelOverflow,
|
|
38
38
|
labelBold,
|
|
39
|
-
labelColor
|
|
39
|
+
labelColor,
|
|
40
|
+
labelDataTestId
|
|
40
41
|
}
|
|
41
42
|
},
|
|
42
43
|
ctx: {
|
|
@@ -53,7 +54,7 @@ const ItemTextLabel = props => {
|
|
|
53
54
|
minHeight: "32px",
|
|
54
55
|
paddingTop: "8px"
|
|
55
56
|
}, void 0, " ", _div || (_div = /*#__PURE__*/_jsx__default["default"]("div", {})), /*#__PURE__*/_jsx__default["default"](styled.StyledLabel, {
|
|
56
|
-
"data-testid":
|
|
57
|
+
"data-testid": labelDataTestId || 'leftnav-list-item-label',
|
|
57
58
|
pl: "24px",
|
|
58
59
|
labelOverflow: labelOverflow,
|
|
59
60
|
labelBold: labelBold,
|
|
@@ -89,7 +89,8 @@ const ItemUncontrolledDrilldown = props => {
|
|
|
89
89
|
labelBold,
|
|
90
90
|
labelColor,
|
|
91
91
|
startOpened,
|
|
92
|
-
items
|
|
92
|
+
items,
|
|
93
|
+
labelDataTestId
|
|
93
94
|
}
|
|
94
95
|
},
|
|
95
96
|
ctx,
|
|
@@ -146,7 +147,7 @@ const ItemUncontrolledDrilldown = props => {
|
|
|
146
147
|
mt: "-2px"
|
|
147
148
|
}, void 0, arrowIcon), /*#__PURE__*/_jsx__default["default"](styled.StyledLabel, {
|
|
148
149
|
pb: "xxxs",
|
|
149
|
-
"data-testid":
|
|
150
|
+
"data-testid": labelDataTestId || 'leftnav-list-item-label',
|
|
150
151
|
labelOverflow: labelOverflow,
|
|
151
152
|
labelBold: labelBold,
|
|
152
153
|
labelColor: labelColor
|
|
@@ -39,7 +39,8 @@ const ItemWithDate = props => {
|
|
|
39
39
|
labelRightSection,
|
|
40
40
|
labelOverflow: itemLabelOverflow,
|
|
41
41
|
labelBold,
|
|
42
|
-
labelColor
|
|
42
|
+
labelColor,
|
|
43
|
+
labelDataTestId
|
|
43
44
|
}
|
|
44
45
|
},
|
|
45
46
|
ctx,
|
|
@@ -59,7 +60,7 @@ const ItemWithDate = props => {
|
|
|
59
60
|
}, void 0, " ", _div || (_div = /*#__PURE__*/_jsx__default["default"]("div", {})), /*#__PURE__*/_jsx__default["default"](styled.StyledLabel, {
|
|
60
61
|
pl: "xxs",
|
|
61
62
|
pb: "xxxs",
|
|
62
|
-
"data-testid":
|
|
63
|
+
"data-testid": labelDataTestId || 'leftnav-list-item-label',
|
|
63
64
|
labelOverflow: labelOverflow,
|
|
64
65
|
labelBold: labelBold,
|
|
65
66
|
labelColor: labelColor
|
|
@@ -26,7 +26,8 @@ const LeftNavInnerContent = () => {
|
|
|
26
26
|
HeaderComponent,
|
|
27
27
|
BodyHeaderComponent,
|
|
28
28
|
openedItem,
|
|
29
|
-
items
|
|
29
|
+
items,
|
|
30
|
+
withoutBodyShadow
|
|
30
31
|
},
|
|
31
32
|
selectedItem
|
|
32
33
|
} = React__default["default"].useContext(LeftNavigationContext.LeftNavContext);
|
|
@@ -42,7 +43,7 @@ const LeftNavInnerContent = () => {
|
|
|
42
43
|
}, void 0, BodyHeaderComponent ? /*#__PURE__*/_jsx__default["default"](OutOfTheBoxMapItem.OutOfTheBoxMapItem, {
|
|
43
44
|
item: BodyHeaderComponent
|
|
44
45
|
}) : null), /*#__PURE__*/_jsx__default["default"](styled.StyledLeftNavBodyItemsArea, {
|
|
45
|
-
selected: openedItem !== null,
|
|
46
|
+
selected: !withoutBodyShadow && openedItem !== null,
|
|
46
47
|
"data-testid": "leftnav-body-items-area",
|
|
47
48
|
tabIndex: -1
|
|
48
49
|
}, void 0, /*#__PURE__*/_jsx__default["default"](index$2.LeftNavContentWithScrollbar, {}, void 0, items.map(item => /*#__PURE__*/_jsx__default["default"](OutOfTheBoxMapItem.OutOfTheBoxMapItem, {
|
package/cjs/prop-types.js
CHANGED
|
@@ -27,7 +27,8 @@ const leftNavigationProps = {
|
|
|
27
27
|
onFooterClose: reactDesc.PropTypes.func.description('The function to call when the left-nav is closed via the footer'),
|
|
28
28
|
onSelectedChange: reactDesc.PropTypes.func.description('A callback which triggers when the selected item changes').defaultValue(() => null),
|
|
29
29
|
onFocusChange: reactDesc.PropTypes.func.description('A callback which triggers when the focused item changes').defaultValue(() => null),
|
|
30
|
-
items: reactDesc.PropTypes.arrayOf(reactDesc.PropTypes.object).description('The array of items you want to render inside the left nav').defaultValue([])
|
|
30
|
+
items: reactDesc.PropTypes.arrayOf(reactDesc.PropTypes.object).description('The array of items you want to render inside the left nav').defaultValue([]),
|
|
31
|
+
disableDefaultSelection: reactDesc.PropTypes.bool.description('Whether you do not want to automatically select the first body item').defaultValue(false)
|
|
31
32
|
};
|
|
32
33
|
|
|
33
34
|
const LeftNavItemProps = () => null;
|
|
@@ -49,7 +49,7 @@ const useLeftNavConfig = props => {
|
|
|
49
49
|
React.useEffect(() => {
|
|
50
50
|
onFocusChange(focusedItem);
|
|
51
51
|
}, [focusedItem, onFocusChange]);
|
|
52
|
-
useSelectFirstBodyItem(items, openedItem, props.selectedItem !== undefined ? props.selectedItem : selectedItem, setSelectedItem); // -----------------------------------------------------------------------------
|
|
52
|
+
useSelectFirstBodyItem(items, openedItem, props.selectedItem !== undefined ? props.selectedItem : selectedItem, setSelectedItem, props.disableDefaultSelection); // -----------------------------------------------------------------------------
|
|
53
53
|
// ************************** ------------ **************************
|
|
54
54
|
// * ITEMS MANAGEMENT *
|
|
55
55
|
// ************************** ------------ **************************
|
|
@@ -70,14 +70,14 @@ const ItemRenderer = props => {
|
|
|
70
70
|
|
|
71
71
|
return /*#__PURE__*/jsxs(Fragment, {
|
|
72
72
|
children: [/*#__PURE__*/_jsx(StyledItemWrapper, {
|
|
73
|
-
shadowStyle: shadowStyle,
|
|
73
|
+
shadowStyle: shadowStyle(opened, item.type),
|
|
74
74
|
"data-testid": "leftnav-item-wrapper"
|
|
75
75
|
}, void 0, /*#__PURE__*/jsx(StyledItem, {
|
|
76
76
|
ref: visibleItemsRefs.current[dsId],
|
|
77
77
|
pt: paddingTop,
|
|
78
78
|
pl: indent === undefined ? 'xxxs' : "".concat(indent, "px"),
|
|
79
79
|
minHeight: minHeight,
|
|
80
|
-
shadowStyle: shadowStyle,
|
|
80
|
+
shadowStyle: shadowStyle(opened, item.type),
|
|
81
81
|
alignItems: "flex-start",
|
|
82
82
|
cols: cols,
|
|
83
83
|
onClick: !opened ? handleOnClick : () => null,
|
|
@@ -92,6 +92,8 @@ const ItemRenderer = props => {
|
|
|
92
92
|
"aria-describedby": ariaDescribedBy,
|
|
93
93
|
"aria-expanded": ariaExpanded,
|
|
94
94
|
role: ariaRole,
|
|
95
|
+
"data-selected": isSelected,
|
|
96
|
+
"data-selectedparent": selectedParent === dsId,
|
|
95
97
|
"aria-label": ariaLabel,
|
|
96
98
|
"aria-hidden": !focuseable,
|
|
97
99
|
"aria-live": ariaLive,
|
|
@@ -21,7 +21,8 @@ const itemDefaultProps = {
|
|
|
21
21
|
ariaLive: 'off',
|
|
22
22
|
ariaExpanded: undefined,
|
|
23
23
|
ariaDescribedBy: undefined
|
|
24
|
-
};
|
|
24
|
+
};
|
|
25
|
+
const itemWithoutShadows = ['ds-left-nav-item-header', 'ds-left-nav-item-link', 'ds-left-nav-item-submenu']; // Make use Item props with defaults
|
|
25
26
|
|
|
26
27
|
const usePropsWithDefaults = props => {
|
|
27
28
|
const propsWithDefault = useMemo(() => {
|
|
@@ -35,7 +36,7 @@ const usePropsWithDefaults = props => {
|
|
|
35
36
|
minHeight: '48px',
|
|
36
37
|
paddingTop: '12px',
|
|
37
38
|
subitems: [],
|
|
38
|
-
shadowStyle: () =>
|
|
39
|
+
shadowStyle: (opened, type) => theme => "box-shadow: ".concat(opened || !itemWithoutShadows.includes(type) ? 'inset 4px 0 0 0 #52A6EC' : 'inset 4px 0 0 0 white'),
|
|
39
40
|
hasBorderBottom: false,
|
|
40
41
|
borderBottomMr: '0px'
|
|
41
42
|
}, props), {}, {
|
|
@@ -15,28 +15,32 @@ const Notifications = _ref => {
|
|
|
15
15
|
} = _ref;
|
|
16
16
|
return /*#__PURE__*/_jsx(StyledIcon, {}, void 0, /*#__PURE__*/_jsx(Notifications$1, {
|
|
17
17
|
size: "m",
|
|
18
|
-
color: ['brand-primary', 800]
|
|
18
|
+
color: ['brand-primary', 800],
|
|
19
|
+
"data-testid": "left-nav-notifications-icon"
|
|
19
20
|
}), (exceptions || alerts || messages) && /*#__PURE__*/_jsx(Grid, {
|
|
20
21
|
cols: ['1fr', '1fr', '1fr'],
|
|
21
22
|
gutter: "xxxs",
|
|
22
23
|
mt: "2px"
|
|
23
24
|
}, void 0, /*#__PURE__*/_jsx(Grid, {
|
|
24
25
|
width: "6px",
|
|
25
|
-
height: "6px"
|
|
26
|
+
height: "6px",
|
|
27
|
+
"data-testid": "left-nav-exceptions-icon"
|
|
26
28
|
}, void 0, exceptions && /*#__PURE__*/_jsx(ExceptionsSmallFill, {
|
|
27
29
|
width: "6px",
|
|
28
30
|
height: "6px",
|
|
29
31
|
color: ['warning', 900]
|
|
30
32
|
})), /*#__PURE__*/_jsx(Grid, {
|
|
31
33
|
width: "6px",
|
|
32
|
-
height: "6px"
|
|
34
|
+
height: "6px",
|
|
35
|
+
"data-testid": "left-nav-alerts-icon"
|
|
33
36
|
}, void 0, alerts && /*#__PURE__*/_jsx(AlertsSmallFill, {
|
|
34
37
|
width: "6px",
|
|
35
38
|
height: "6px",
|
|
36
39
|
color: ['danger', 900]
|
|
37
40
|
})), /*#__PURE__*/_jsx(Grid, {
|
|
38
41
|
width: "6px",
|
|
39
|
-
height: "6px"
|
|
42
|
+
height: "6px",
|
|
43
|
+
"data-testid": "left-nav-messages-icon"
|
|
40
44
|
}, void 0, messages && /*#__PURE__*/_jsx(MessagesSmallFill, {
|
|
41
45
|
width: "6px",
|
|
42
46
|
height: "6px",
|
|
@@ -19,14 +19,14 @@ const isItemInsideTheTree = (item, itemID) => {
|
|
|
19
19
|
return item.dsId === itemID || (item === null || item === void 0 ? void 0 : (_item$itemOpts = item.itemOpts) === null || _item$itemOpts === void 0 ? void 0 : (_item$itemOpts$items = _item$itemOpts.items) === null || _item$itemOpts$items === void 0 ? void 0 : _item$itemOpts$items.some(it => isItemInsideTheTree(it, itemID)));
|
|
20
20
|
};
|
|
21
21
|
|
|
22
|
-
const useSelectFirstBodyItem = (items, openedItem, selectedItem, setSelectedItem) => {
|
|
22
|
+
const useSelectFirstBodyItem = (items, openedItem, selectedItem, setSelectedItem, disableDefaultSelection) => {
|
|
23
23
|
useEffect(() => {
|
|
24
|
-
if (items && items.length && openedItem) {
|
|
24
|
+
if (!disableDefaultSelection && items && items.length && openedItem) {
|
|
25
25
|
const index = items.findIndex(elem => isSelectableOutOfTheBox(elem) || isSelectableCustom(elem));
|
|
26
26
|
const isItemInside = items.some(it => isItemInsideTheTree(it, selectedItem));
|
|
27
27
|
if (isItemInside) setSelectedItem(selectedItem);else if (index !== -1) setSelectedItem(items[index].dsId);
|
|
28
28
|
}
|
|
29
|
-
}, [openedItem, setSelectedItem]);
|
|
29
|
+
}, [openedItem, setSelectedItem, disableDefaultSelection]);
|
|
30
30
|
};
|
|
31
31
|
|
|
32
32
|
export { useSelectFirstBodyItem };
|
|
@@ -18,13 +18,15 @@ import 'styled-components';
|
|
|
18
18
|
import { StyledLabel, StyledDate } from './styled.js';
|
|
19
19
|
import { ItemSeparator } from '../ItemSeparator/index.js';
|
|
20
20
|
import { ItemWithDate } from '../ItemWithDate/index.js';
|
|
21
|
+
import { ItemTextLabel } from '../ItemTextLabel/index.js';
|
|
21
22
|
|
|
22
23
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
|
|
23
24
|
|
|
24
25
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
25
26
|
const outOfTheBoxSubitemsComponents = {
|
|
26
27
|
[ITEM_TYPES.LEFT_NAV_ITEM_SEPARATOR]: ItemSeparator,
|
|
27
|
-
[ITEM_TYPES.LEFT_NAV_ITEM_WITH_DATE]: ItemWithDate
|
|
28
|
+
[ITEM_TYPES.LEFT_NAV_ITEM_WITH_DATE]: ItemWithDate,
|
|
29
|
+
[ITEM_TYPES.LEFT_NAV_ITEM_TEXT_LABEL]: ItemTextLabel
|
|
28
30
|
};
|
|
29
31
|
|
|
30
32
|
const OutOfTheBoxMapSubitem = props => {
|
|
@@ -74,7 +76,8 @@ const ItemControlledDrilldown = props => {
|
|
|
74
76
|
labelBold,
|
|
75
77
|
labelColor,
|
|
76
78
|
isOpened,
|
|
77
|
-
items
|
|
79
|
+
items,
|
|
80
|
+
labelDataTestId
|
|
78
81
|
}
|
|
79
82
|
},
|
|
80
83
|
ctx,
|
|
@@ -119,7 +122,7 @@ const ItemControlledDrilldown = props => {
|
|
|
119
122
|
mt: "-2px"
|
|
120
123
|
}, void 0, arrowIcon), /*#__PURE__*/_jsx(StyledLabel, {
|
|
121
124
|
pb: "xxxs",
|
|
122
|
-
"data-testid":
|
|
125
|
+
"data-testid": labelDataTestId || 'leftnav-list-item-label',
|
|
123
126
|
labelOverflow: labelOverflow,
|
|
124
127
|
labelBold: labelBold,
|
|
125
128
|
labelColor: labelColor
|
|
@@ -31,7 +31,8 @@ const ItemHeader = props => {
|
|
|
31
31
|
itemOpts: {
|
|
32
32
|
label,
|
|
33
33
|
RightComponent,
|
|
34
|
-
BottomComponent
|
|
34
|
+
BottomComponent,
|
|
35
|
+
labelDataTestId
|
|
35
36
|
},
|
|
36
37
|
CollapsedComponent = () => null
|
|
37
38
|
},
|
|
@@ -51,7 +52,7 @@ const ItemHeader = props => {
|
|
|
51
52
|
const opened = openedItem === dsId;
|
|
52
53
|
const ariaLabel = (_item$itemOpts$ariaLa = item.itemOpts.ariaLabel) !== null && _item$itemOpts$ariaLa !== void 0 ? _item$itemOpts$ariaLa : typeof label === 'string' ? label : 'menuitem';
|
|
53
54
|
const isSelected = selectedItem === dsId || selectedParent === dsId;
|
|
54
|
-
const shadowStyle = useCallback(theme => !
|
|
55
|
+
const shadowStyle = useCallback(opened => theme => !opened ? notOpenedShadowStyle(isSelected)(theme) : "box-shadow: inset 4px 0 0 0 #52A6EC", [isSelected, openedItem]);
|
|
55
56
|
return /*#__PURE__*/_jsx(ItemRenderer, {
|
|
56
57
|
item: _objectSpread(_objectSpread({}, item), {}, {
|
|
57
58
|
itemOpts: _objectSpread(_objectSpread({
|
|
@@ -93,7 +94,7 @@ const ItemHeader = props => {
|
|
|
93
94
|
ml: opened ? 'xxs' : '1px',
|
|
94
95
|
mt: "xxxs",
|
|
95
96
|
mb: "15px",
|
|
96
|
-
"data-testid":
|
|
97
|
+
"data-testid": labelDataTestId || 'leftnav-itemlabel',
|
|
97
98
|
labelOverflow: labelOverflow
|
|
98
99
|
}, void 0, labelOverflow === 'truncate' ? /*#__PURE__*/_jsx(SimpleTruncatedTooltipText, {
|
|
99
100
|
value: label,
|
|
@@ -27,7 +27,8 @@ const ItemLink = props => {
|
|
|
27
27
|
dsId,
|
|
28
28
|
itemOpts: {
|
|
29
29
|
label,
|
|
30
|
-
RightComponent
|
|
30
|
+
RightComponent,
|
|
31
|
+
labelDataTestId
|
|
31
32
|
},
|
|
32
33
|
CollapsedComponent = () => null
|
|
33
34
|
},
|
|
@@ -42,7 +43,7 @@ const ItemLink = props => {
|
|
|
42
43
|
}
|
|
43
44
|
} = props;
|
|
44
45
|
const isSelected = selectedItem === dsId || selectedParent === dsId;
|
|
45
|
-
const shadowStyle = useCallback(theme => !
|
|
46
|
+
const shadowStyle = useCallback(opened => theme => !opened ? notOpenedShadowStyle(isSelected)(theme) : "box-shadow: inset 4px 0 0 0 #52A6EC", [isSelected, openedItem]);
|
|
46
47
|
return /*#__PURE__*/_jsx(ItemRenderer, {
|
|
47
48
|
item: _objectSpread(_objectSpread({}, item), {}, {
|
|
48
49
|
itemOpts: _objectSpread(_objectSpread({
|
|
@@ -66,7 +67,7 @@ const ItemLink = props => {
|
|
|
66
67
|
ml: "1px",
|
|
67
68
|
mt: "xxxs",
|
|
68
69
|
mb: "15px",
|
|
69
|
-
"data-testid":
|
|
70
|
+
"data-testid": labelDataTestId || 'leftnav-itemlabel',
|
|
70
71
|
labelOverflow: labelOverflow
|
|
71
72
|
}, void 0, labelOverflow === 'truncate' ? /*#__PURE__*/_jsx(SimpleTruncatedTooltipText, {
|
|
72
73
|
value: label,
|
|
@@ -31,7 +31,8 @@ const ItemSubmenu = props => {
|
|
|
31
31
|
itemOpts: {
|
|
32
32
|
label,
|
|
33
33
|
RightComponent,
|
|
34
|
-
BottomComponent
|
|
34
|
+
BottomComponent,
|
|
35
|
+
labelDataTestId
|
|
35
36
|
},
|
|
36
37
|
CollapsedComponent = () => null
|
|
37
38
|
},
|
|
@@ -50,7 +51,7 @@ const ItemSubmenu = props => {
|
|
|
50
51
|
} = props;
|
|
51
52
|
const opened = openedItem === dsId;
|
|
52
53
|
const isSelected = selectedItem === dsId;
|
|
53
|
-
const shadowStyle = useCallback(theme => !
|
|
54
|
+
const shadowStyle = useCallback(opened => theme => !opened ? notOpenedShadowStyle(isSelected || selectedParent === dsId)(theme) : "box-shadow: inset 4px 0 0 0 #52A6EC", [dsId, isSelected, openedItem, selectedParent]);
|
|
54
55
|
const ariaLabel = (_item$itemOpts$ariaLa = item.itemOpts.ariaLabel) !== null && _item$itemOpts$ariaLa !== void 0 ? _item$itemOpts$ariaLa : typeof label === 'string' ? label : 'menuitem';
|
|
55
56
|
return /*#__PURE__*/_jsx(ItemRenderer, {
|
|
56
57
|
item: _objectSpread(_objectSpread({}, item), {}, {
|
|
@@ -92,7 +93,7 @@ const ItemSubmenu = props => {
|
|
|
92
93
|
ml: opened ? 'xxs' : '1px',
|
|
93
94
|
mt: "xxxs",
|
|
94
95
|
mb: "15px",
|
|
95
|
-
"data-testid":
|
|
96
|
+
"data-testid": labelDataTestId || 'leftnav-itemlabel',
|
|
96
97
|
labelOverflow: labelOverflow
|
|
97
98
|
}, void 0, labelOverflow === 'truncate' ? /*#__PURE__*/_jsx(SimpleTruncatedTooltipText, {
|
|
98
99
|
value: label,
|
|
@@ -27,7 +27,8 @@ const ItemTextLabel = props => {
|
|
|
27
27
|
label,
|
|
28
28
|
labelOverflow: itemLabelOverflow,
|
|
29
29
|
labelBold,
|
|
30
|
-
labelColor
|
|
30
|
+
labelColor,
|
|
31
|
+
labelDataTestId
|
|
31
32
|
}
|
|
32
33
|
},
|
|
33
34
|
ctx: {
|
|
@@ -44,7 +45,7 @@ const ItemTextLabel = props => {
|
|
|
44
45
|
minHeight: "32px",
|
|
45
46
|
paddingTop: "8px"
|
|
46
47
|
}, void 0, " ", _div || (_div = /*#__PURE__*/_jsx("div", {})), /*#__PURE__*/_jsx(StyledLabel, {
|
|
47
|
-
"data-testid":
|
|
48
|
+
"data-testid": labelDataTestId || 'leftnav-list-item-label',
|
|
48
49
|
pl: "24px",
|
|
49
50
|
labelOverflow: labelOverflow,
|
|
50
51
|
labelBold: labelBold,
|
|
@@ -79,7 +79,8 @@ const ItemUncontrolledDrilldown = props => {
|
|
|
79
79
|
labelBold,
|
|
80
80
|
labelColor,
|
|
81
81
|
startOpened,
|
|
82
|
-
items
|
|
82
|
+
items,
|
|
83
|
+
labelDataTestId
|
|
83
84
|
}
|
|
84
85
|
},
|
|
85
86
|
ctx,
|
|
@@ -136,7 +137,7 @@ const ItemUncontrolledDrilldown = props => {
|
|
|
136
137
|
mt: "-2px"
|
|
137
138
|
}, void 0, arrowIcon), /*#__PURE__*/_jsx(StyledLabel, {
|
|
138
139
|
pb: "xxxs",
|
|
139
|
-
"data-testid":
|
|
140
|
+
"data-testid": labelDataTestId || 'leftnav-list-item-label',
|
|
140
141
|
labelOverflow: labelOverflow,
|
|
141
142
|
labelBold: labelBold,
|
|
142
143
|
labelColor: labelColor
|
|
@@ -29,7 +29,8 @@ const ItemWithDate = props => {
|
|
|
29
29
|
labelRightSection,
|
|
30
30
|
labelOverflow: itemLabelOverflow,
|
|
31
31
|
labelBold,
|
|
32
|
-
labelColor
|
|
32
|
+
labelColor,
|
|
33
|
+
labelDataTestId
|
|
33
34
|
}
|
|
34
35
|
},
|
|
35
36
|
ctx,
|
|
@@ -49,7 +50,7 @@ const ItemWithDate = props => {
|
|
|
49
50
|
}, void 0, " ", _div || (_div = /*#__PURE__*/_jsx("div", {})), /*#__PURE__*/_jsx(StyledLabel, {
|
|
50
51
|
pl: "xxs",
|
|
51
52
|
pb: "xxxs",
|
|
52
|
-
"data-testid":
|
|
53
|
+
"data-testid": labelDataTestId || 'leftnav-list-item-label',
|
|
53
54
|
labelOverflow: labelOverflow,
|
|
54
55
|
labelBold: labelBold,
|
|
55
56
|
labelColor: labelColor
|
|
@@ -19,7 +19,8 @@ const LeftNavInnerContent = () => {
|
|
|
19
19
|
HeaderComponent,
|
|
20
20
|
BodyHeaderComponent,
|
|
21
21
|
openedItem,
|
|
22
|
-
items
|
|
22
|
+
items,
|
|
23
|
+
withoutBodyShadow
|
|
23
24
|
},
|
|
24
25
|
selectedItem
|
|
25
26
|
} = React.useContext(LeftNavContext);
|
|
@@ -35,7 +36,7 @@ const LeftNavInnerContent = () => {
|
|
|
35
36
|
}, void 0, BodyHeaderComponent ? /*#__PURE__*/_jsx(OutOfTheBoxMapItem, {
|
|
36
37
|
item: BodyHeaderComponent
|
|
37
38
|
}) : null), /*#__PURE__*/_jsx(StyledLeftNavBodyItemsArea, {
|
|
38
|
-
selected: openedItem !== null,
|
|
39
|
+
selected: !withoutBodyShadow && openedItem !== null,
|
|
39
40
|
"data-testid": "leftnav-body-items-area",
|
|
40
41
|
tabIndex: -1
|
|
41
42
|
}, void 0, /*#__PURE__*/_jsx(LeftNavContentWithScrollbar, {}, void 0, items.map(item => /*#__PURE__*/_jsx(OutOfTheBoxMapItem, {
|
package/esm/prop-types.js
CHANGED
|
@@ -23,7 +23,8 @@ const leftNavigationProps = {
|
|
|
23
23
|
onFooterClose: PropTypes.func.description('The function to call when the left-nav is closed via the footer'),
|
|
24
24
|
onSelectedChange: PropTypes.func.description('A callback which triggers when the selected item changes').defaultValue(() => null),
|
|
25
25
|
onFocusChange: PropTypes.func.description('A callback which triggers when the focused item changes').defaultValue(() => null),
|
|
26
|
-
items: PropTypes.arrayOf(PropTypes.object).description('The array of items you want to render inside the left nav').defaultValue([])
|
|
26
|
+
items: PropTypes.arrayOf(PropTypes.object).description('The array of items you want to render inside the left nav').defaultValue([]),
|
|
27
|
+
disableDefaultSelection: PropTypes.bool.description('Whether you do not want to automatically select the first body item').defaultValue(false)
|
|
27
28
|
};
|
|
28
29
|
|
|
29
30
|
const LeftNavItemProps = () => null;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elliemae/ds-left-navigation",
|
|
3
|
-
"version": "2.0.0-rc.
|
|
3
|
+
"version": "2.0.0-rc.13",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "ICE MT - Dimsum - Left Navigation",
|
|
6
6
|
"module": "./esm/index.js",
|
|
@@ -233,16 +233,18 @@
|
|
|
233
233
|
"generateSubmodules": true
|
|
234
234
|
},
|
|
235
235
|
"dependencies": {
|
|
236
|
-
"@elliemae/ds-
|
|
237
|
-
"@elliemae/ds-grid": "2.0.0-rc.
|
|
238
|
-
"@elliemae/ds-icons": "2.0.0-rc.
|
|
239
|
-
"@elliemae/ds-system": "2.0.0-rc.
|
|
240
|
-
"@elliemae/ds-truncated-tooltip-text": "2.0.0-rc.
|
|
236
|
+
"@elliemae/ds-circular-progress-indicator": "2.0.0-rc.13",
|
|
237
|
+
"@elliemae/ds-grid": "2.0.0-rc.13",
|
|
238
|
+
"@elliemae/ds-icons": "2.0.0-rc.13",
|
|
239
|
+
"@elliemae/ds-system": "2.0.0-rc.13",
|
|
240
|
+
"@elliemae/ds-truncated-tooltip-text": "2.0.0-rc.13",
|
|
241
241
|
"overlayscrollbars": "1.13.1",
|
|
242
242
|
"prop-types": "~15.7.2",
|
|
243
243
|
"react-desc": "~4.1.3"
|
|
244
244
|
},
|
|
245
245
|
"devDependencies": {
|
|
246
|
+
"@testing-library/react": "~12.1.2",
|
|
247
|
+
"@testing-library/user-event": "~13.5.0",
|
|
246
248
|
"styled-components": "~5.3.3"
|
|
247
249
|
},
|
|
248
250
|
"peerDependencies": {
|
|
@@ -1,19 +1,54 @@
|
|
|
1
|
+
/// <reference path="../../../../shared/typings/react-desc.d.ts" />
|
|
1
2
|
/// <reference types="react" />
|
|
2
3
|
import type { LeftNavProps } from './index.d';
|
|
3
4
|
export declare const LeftNavigation: {
|
|
4
5
|
(props: LeftNavProps): JSX.Element;
|
|
5
6
|
propTypes: {
|
|
6
|
-
containerProps:
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
7
|
+
containerProps: {
|
|
8
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
9
|
+
};
|
|
10
|
+
expanded: {
|
|
11
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
12
|
+
};
|
|
13
|
+
loading: {
|
|
14
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
15
|
+
};
|
|
16
|
+
tabIndex: {
|
|
17
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
18
|
+
};
|
|
19
|
+
openedItem: {
|
|
20
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
21
|
+
};
|
|
22
|
+
footerLabel: {
|
|
23
|
+
defaultValue<T = unknown>(arg: T): {
|
|
24
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
25
|
+
};
|
|
26
|
+
isRequired: import("react-desc").PropTypesDescValidator;
|
|
27
|
+
};
|
|
28
|
+
onFooterExpand: {
|
|
29
|
+
defaultValue<T = unknown>(arg: T): {
|
|
30
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
31
|
+
};
|
|
32
|
+
isRequired: import("react-desc").PropTypesDescValidator;
|
|
33
|
+
};
|
|
34
|
+
onFooterClose: {
|
|
35
|
+
defaultValue<T = unknown>(arg: T): {
|
|
36
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
37
|
+
};
|
|
38
|
+
isRequired: import("react-desc").PropTypesDescValidator;
|
|
39
|
+
};
|
|
40
|
+
onSelectedChange: {
|
|
41
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
42
|
+
};
|
|
43
|
+
onFocusChange: {
|
|
44
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
45
|
+
};
|
|
46
|
+
items: {
|
|
47
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
48
|
+
};
|
|
49
|
+
disableDefaultSelection: {
|
|
50
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
51
|
+
};
|
|
17
52
|
};
|
|
18
53
|
defaultProps: LeftNavProps;
|
|
19
54
|
};
|
|
@@ -7,10 +7,10 @@ interface ItemProps {
|
|
|
7
7
|
shadowStyle: (theme: any) => string;
|
|
8
8
|
}
|
|
9
9
|
export declare const borderOutside: (color: any, weight?: number) => string;
|
|
10
|
-
export declare const StyledItemWrapper: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("@elliemae/ds-grid/types/types").GridPropsT & import("react").RefAttributes<HTMLDivElement>>,
|
|
10
|
+
export declare const StyledItemWrapper: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("@elliemae/ds-grid/types/types").GridPropsT & import("react").RefAttributes<HTMLDivElement>>, import("styled-components").DefaultTheme, {
|
|
11
11
|
shadowStyle: (theme: any) => string;
|
|
12
12
|
}, never>;
|
|
13
|
-
export declare const StyledItem: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("@elliemae/ds-grid/types/types").GridPropsT & import("react").RefAttributes<HTMLDivElement>>,
|
|
13
|
+
export declare const StyledItem: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("@elliemae/ds-grid/types/types").GridPropsT & import("react").RefAttributes<HTMLDivElement>>, import("styled-components").DefaultTheme, {
|
|
14
14
|
minHeight: string;
|
|
15
15
|
} & ItemProps, never>;
|
|
16
16
|
export {};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { GenericItemItemProps } from '../index.d';
|
|
3
|
-
export declare const useSelectFirstBodyItem: (items: GenericItemItemProps[], openedItem: string, selectedItem: string, setSelectedItem: React.Dispatch<React.SetStateAction<string
|
|
3
|
+
export declare const useSelectFirstBodyItem: (items: GenericItemItemProps[], openedItem: string, selectedItem: string, setSelectedItem: React.Dispatch<React.SetStateAction<string>>, disableDefaultSelection: boolean) => void;
|
package/types/index.d.d.ts
CHANGED
|
@@ -19,6 +19,8 @@ export interface LeftNavProps {
|
|
|
19
19
|
loading: boolean;
|
|
20
20
|
selectedItem?: string;
|
|
21
21
|
selectedParent?: string;
|
|
22
|
+
disableDefaultSelection?: boolean;
|
|
23
|
+
withoutBodyShadow?: boolean;
|
|
22
24
|
}
|
|
23
25
|
export declare type OutOfTheBoxT = 'ds-left-nav-item-header' | 'ds-left-nav-item-link' | 'ds-left-nav-item-submenu' | 'ds-left-nav-item-controlled-drilldown' | 'ds-left-nav-item-uncontrolled-drilldown' | 'ds-left-nav-item-section' | 'ds-left-nav-item-separator' | 'ds-left-nav-item-text-label' | 'ds-left-nav-item-with-date';
|
|
24
26
|
export interface itemOptsT {
|
|
@@ -43,6 +45,7 @@ export interface itemOptsT {
|
|
|
43
45
|
ariaExpanded?: boolean;
|
|
44
46
|
ariaDescribedBy?: string;
|
|
45
47
|
items?: GenericItemItemProps[];
|
|
48
|
+
labelDataTestId?: string;
|
|
46
49
|
}
|
|
47
50
|
export interface ComponentProps {
|
|
48
51
|
item: GenericItemItemProps;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
export declare const StyledLabel: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("@elliemae/ds-grid/types/types").GridPropsT & import("react").RefAttributes<HTMLDivElement>>,
|
|
2
|
+
export declare const StyledLabel: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("@elliemae/ds-grid/types/types").GridPropsT & import("react").RefAttributes<HTMLDivElement>>, import("styled-components").DefaultTheme, {
|
|
3
3
|
labelBold: boolean;
|
|
4
4
|
}, never>;
|
|
5
|
-
export declare const StyledDate: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("@elliemae/ds-grid/types/types").GridPropsT & import("react").RefAttributes<HTMLDivElement>>,
|
|
5
|
+
export declare const StyledDate: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("@elliemae/ds-grid/types/types").GridPropsT & import("react").RefAttributes<HTMLDivElement>>, import("styled-components").DefaultTheme, {}, never>;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
export declare const StyledLabel: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("@elliemae/ds-grid/types/types").GridPropsT & import("react").RefAttributes<HTMLDivElement>>,
|
|
3
|
-
export declare const StyledChevronLeft: import("styled-components").StyledComponent<(rest: any) => JSX.Element,
|
|
2
|
+
export declare const StyledLabel: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("@elliemae/ds-grid/types/types").GridPropsT & import("react").RefAttributes<HTMLDivElement>>, import("styled-components").DefaultTheme, {}, never>;
|
|
3
|
+
export declare const StyledChevronLeft: import("styled-components").StyledComponent<(rest: any) => JSX.Element, import("styled-components").DefaultTheme, {}, never>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
export declare const StyledLabel: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("@elliemae/ds-grid/types/types").GridPropsT & import("react").RefAttributes<HTMLDivElement>>,
|
|
2
|
+
export declare const StyledLabel: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("@elliemae/ds-grid/types/types").GridPropsT & import("react").RefAttributes<HTMLDivElement>>, import("styled-components").DefaultTheme, {}, never>;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export declare const StyledLabel: import("styled-components").StyledComponent<"span",
|
|
2
|
-
export declare const StyledVerticalSeparator: import("styled-components").StyledComponent<"div",
|
|
3
|
-
export declare const StyledRightLabel: import("styled-components").StyledComponent<"span",
|
|
1
|
+
export declare const StyledLabel: import("styled-components").StyledComponent<"span", import("styled-components").DefaultTheme, {}, never>;
|
|
2
|
+
export declare const StyledVerticalSeparator: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
3
|
+
export declare const StyledRightLabel: import("styled-components").StyledComponent<"span", import("styled-components").DefaultTheme, {}, never>;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
export declare const StyledLabel: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("@elliemae/ds-grid/types/types").GridPropsT & import("react").RefAttributes<HTMLDivElement>>,
|
|
3
|
-
export declare const StyledChevronLeft: import("styled-components").StyledComponent<(rest: any) => JSX.Element,
|
|
2
|
+
export declare const StyledLabel: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("@elliemae/ds-grid/types/types").GridPropsT & import("react").RefAttributes<HTMLDivElement>>, import("styled-components").DefaultTheme, {}, never>;
|
|
3
|
+
export declare const StyledChevronLeft: import("styled-components").StyledComponent<(rest: any) => JSX.Element, import("styled-components").DefaultTheme, {}, never>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
export declare const StyledLabel: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("@elliemae/ds-grid/types/types").GridPropsT & import("react").RefAttributes<HTMLDivElement>>,
|
|
2
|
+
export declare const StyledLabel: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("@elliemae/ds-grid/types/types").GridPropsT & import("react").RefAttributes<HTMLDivElement>>, import("styled-components").DefaultTheme, {}, never>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
export declare const StyledLabel: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("@elliemae/ds-grid/types/types").GridPropsT & import("react").RefAttributes<HTMLDivElement>>,
|
|
2
|
+
export declare const StyledLabel: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("@elliemae/ds-grid/types/types").GridPropsT & import("react").RefAttributes<HTMLDivElement>>, import("styled-components").DefaultTheme, {
|
|
3
3
|
labelBold: boolean;
|
|
4
4
|
}, never>;
|
|
5
|
-
export declare const StyledDate: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("@elliemae/ds-grid/types/types").GridPropsT & import("react").RefAttributes<HTMLDivElement>>,
|
|
5
|
+
export declare const StyledDate: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("@elliemae/ds-grid/types/types").GridPropsT & import("react").RefAttributes<HTMLDivElement>>, import("styled-components").DefaultTheme, {}, never>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
export declare const StyledLabel: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("@elliemae/ds-grid/types/types").GridPropsT & import("react").RefAttributes<HTMLDivElement>>,
|
|
2
|
+
export declare const StyledLabel: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("@elliemae/ds-grid/types/types").GridPropsT & import("react").RefAttributes<HTMLDivElement>>, import("styled-components").DefaultTheme, {
|
|
3
3
|
labelBold: boolean;
|
|
4
4
|
}, never>;
|
|
5
|
-
export declare const StyledDate: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("@elliemae/ds-grid/types/types").GridPropsT & import("react").RefAttributes<HTMLDivElement>>,
|
|
5
|
+
export declare const StyledDate: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("@elliemae/ds-grid/types/types").GridPropsT & import("react").RefAttributes<HTMLDivElement>>, import("styled-components").DefaultTheme, {}, never>;
|
|
@@ -2,13 +2,13 @@ declare type LeftNavProps = {
|
|
|
2
2
|
expanded: boolean;
|
|
3
3
|
expandedWidth: string;
|
|
4
4
|
};
|
|
5
|
-
export declare const StyledLeftNavExpandAnimationWrapper: import("styled-components").StyledComponent<"nav",
|
|
6
|
-
export declare const StyledLeftNavAreasContainer: import("styled-components").StyledComponent<"div",
|
|
7
|
-
export declare const StyledLeftNavHeaderArea: import("styled-components").StyledComponent<"div",
|
|
8
|
-
export declare const StyledLeftNavBodyAreasContainer: import("styled-components").StyledComponent<"div",
|
|
9
|
-
export declare const StyledLeftNavBodyHeaderArea: import("styled-components").StyledComponent<"div",
|
|
10
|
-
export declare const StyledLeftNavBodyItemsArea: import("styled-components").StyledComponent<"div",
|
|
5
|
+
export declare const StyledLeftNavExpandAnimationWrapper: import("styled-components").StyledComponent<"nav", import("styled-components").DefaultTheme, LeftNavProps, never>;
|
|
6
|
+
export declare const StyledLeftNavAreasContainer: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, LeftNavProps, never>;
|
|
7
|
+
export declare const StyledLeftNavHeaderArea: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
8
|
+
export declare const StyledLeftNavBodyAreasContainer: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
9
|
+
export declare const StyledLeftNavBodyHeaderArea: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
10
|
+
export declare const StyledLeftNavBodyItemsArea: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {
|
|
11
11
|
selected: boolean;
|
|
12
12
|
}, never>;
|
|
13
|
-
export declare const StyledLeftNavFooterArea: import("styled-components").StyledComponent<"div",
|
|
13
|
+
export declare const StyledLeftNavFooterArea: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
14
14
|
export {};
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
export declare const StyledFooterMenu: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("@elliemae/ds-grid/types/types").GridPropsT & import("react").RefAttributes<HTMLDivElement>>,
|
|
2
|
+
export declare const StyledFooterMenu: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("@elliemae/ds-grid/types/types").GridPropsT & import("react").RefAttributes<HTMLDivElement>>, import("styled-components").DefaultTheme, {
|
|
3
3
|
theme: any;
|
|
4
4
|
selected: boolean;
|
|
5
5
|
}, never>;
|
|
6
|
-
export declare const StyledItemWrapper: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("@elliemae/ds-grid/types/types").GridPropsT & import("react").RefAttributes<HTMLDivElement>>,
|
|
7
|
-
export declare const StyledItem: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("@elliemae/ds-grid/types/types").GridPropsT & import("react").RefAttributes<HTMLDivElement>>,
|
|
6
|
+
export declare const StyledItemWrapper: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("@elliemae/ds-grid/types/types").GridPropsT & import("react").RefAttributes<HTMLDivElement>>, import("styled-components").DefaultTheme, {}, never>;
|
|
7
|
+
export declare const StyledItem: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("@elliemae/ds-grid/types/types").GridPropsT & import("react").RefAttributes<HTMLDivElement>>, import("styled-components").DefaultTheme, {
|
|
8
8
|
theme: any;
|
|
9
9
|
selected: boolean;
|
|
10
10
|
opened: boolean;
|
|
11
11
|
}, never>;
|
|
12
|
-
export declare const StyledLabel: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("@elliemae/ds-grid/types/types").GridPropsT & import("react").RefAttributes<HTMLDivElement>>,
|
|
13
|
-
export declare const StyledSeparator: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("@elliemae/ds-grid/types/types").GridPropsT & import("react").RefAttributes<HTMLDivElement>>,
|
|
14
|
-
export declare const StyledMenuCollapse: import("styled-components").StyledComponent<(rest: any) => JSX.Element,
|
|
12
|
+
export declare const StyledLabel: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("@elliemae/ds-grid/types/types").GridPropsT & import("react").RefAttributes<HTMLDivElement>>, import("styled-components").DefaultTheme, {}, never>;
|
|
13
|
+
export declare const StyledSeparator: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("@elliemae/ds-grid/types/types").GridPropsT & import("react").RefAttributes<HTMLDivElement>>, import("styled-components").DefaultTheme, {}, never>;
|
|
14
|
+
export declare const StyledMenuCollapse: import("styled-components").StyledComponent<(rest: any) => JSX.Element, import("styled-components").DefaultTheme, {}, never>;
|
package/types/prop-types.d.ts
CHANGED
|
@@ -1,22 +1,91 @@
|
|
|
1
|
+
/// <reference path="../../../../shared/typings/react-desc.d.ts" />
|
|
2
|
+
/// <reference types="react" />
|
|
1
3
|
export declare const leftNavItemProps: {
|
|
2
|
-
type:
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
type: {
|
|
5
|
+
defaultValue<T = unknown>(arg: T): {
|
|
6
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
7
|
+
};
|
|
8
|
+
isRequired: import("react-desc").PropTypesDescValidator;
|
|
9
|
+
};
|
|
10
|
+
dsId: {
|
|
11
|
+
defaultValue<T = unknown>(arg: T): {
|
|
12
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
13
|
+
};
|
|
14
|
+
isRequired: import("react-desc").PropTypesDescValidator;
|
|
15
|
+
};
|
|
16
|
+
Component: {
|
|
17
|
+
defaultValue<T = unknown>(arg: T): {
|
|
18
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
19
|
+
};
|
|
20
|
+
isRequired: import("react-desc").PropTypesDescValidator;
|
|
21
|
+
};
|
|
22
|
+
CollapsedComponent: {
|
|
23
|
+
defaultValue<T = unknown>(arg: T): {
|
|
24
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
25
|
+
};
|
|
26
|
+
isRequired: import("react-desc").PropTypesDescValidator;
|
|
27
|
+
};
|
|
28
|
+
itemOpts: {
|
|
29
|
+
defaultValue<T = unknown>(arg: T): {
|
|
30
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
31
|
+
};
|
|
32
|
+
isRequired: import("react-desc").PropTypesDescValidator;
|
|
33
|
+
};
|
|
7
34
|
};
|
|
8
35
|
export declare const leftNavigationProps: {
|
|
9
|
-
containerProps:
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
36
|
+
containerProps: {
|
|
37
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
38
|
+
};
|
|
39
|
+
expanded: {
|
|
40
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
41
|
+
};
|
|
42
|
+
loading: {
|
|
43
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
44
|
+
};
|
|
45
|
+
tabIndex: {
|
|
46
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
47
|
+
};
|
|
48
|
+
openedItem: {
|
|
49
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
50
|
+
};
|
|
51
|
+
footerLabel: {
|
|
52
|
+
defaultValue<T = unknown>(arg: T): {
|
|
53
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
54
|
+
};
|
|
55
|
+
isRequired: import("react-desc").PropTypesDescValidator;
|
|
56
|
+
};
|
|
57
|
+
onFooterExpand: {
|
|
58
|
+
defaultValue<T = unknown>(arg: T): {
|
|
59
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
60
|
+
};
|
|
61
|
+
isRequired: import("react-desc").PropTypesDescValidator;
|
|
62
|
+
};
|
|
63
|
+
onFooterClose: {
|
|
64
|
+
defaultValue<T = unknown>(arg: T): {
|
|
65
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
66
|
+
};
|
|
67
|
+
isRequired: import("react-desc").PropTypesDescValidator;
|
|
68
|
+
};
|
|
69
|
+
onSelectedChange: {
|
|
70
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
71
|
+
};
|
|
72
|
+
onFocusChange: {
|
|
73
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
74
|
+
};
|
|
75
|
+
items: {
|
|
76
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
77
|
+
};
|
|
78
|
+
disableDefaultSelection: {
|
|
79
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
80
|
+
};
|
|
81
|
+
};
|
|
82
|
+
export declare const LeftNavItemPropsSchema: {
|
|
83
|
+
(props?: unknown): JSX.Element;
|
|
84
|
+
propTypes: unknown;
|
|
85
|
+
toTypescript: () => import("react-desc").TypescriptSchema;
|
|
86
|
+
};
|
|
87
|
+
export declare const LeftNavItemOptionsSchema: {
|
|
88
|
+
(props?: unknown): JSX.Element;
|
|
89
|
+
propTypes: unknown;
|
|
90
|
+
toTypescript: () => import("react-desc").TypescriptSchema;
|
|
20
91
|
};
|
|
21
|
-
export declare const LeftNavItemPropsSchema: any;
|
|
22
|
-
export declare const LeftNavItemOptionsSchema: any;
|