@elliemae/ds-left-navigation 2.0.0-alpha.10 → 2.0.0-alpha.14
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/LeftNavigationContext.js +0 -4
- package/cjs/common/getItemBackgroundStyle.js +1 -12
- package/cjs/common/getLeftBorderStyle.js +3 -17
- package/cjs/common/getScrollbarStyle.js +1 -24
- package/cjs/common/index.js +0 -2
- package/cjs/configs/useLeftNavConfig.js +14 -21
- package/cjs/configs/useLeftNavItems.js +11 -11
- package/cjs/exported-related/ChevronItem/index.js +7 -3
- package/cjs/exported-related/Icon/index.js +5 -0
- package/cjs/exported-related/ItemRenderer/index.js +11 -10
- package/cjs/exported-related/ItemRenderer/styled.js +27 -27
- package/cjs/exported-related/ItemRenderer/usePropsWithDefaults.js +10 -3
- package/cjs/exported-related/Notifications/index.js +41 -41
- package/cjs/exported-related/OpenWindowItem/index.js +7 -3
- package/cjs/hooks/useExpandableOnClickHandler.js +7 -6
- package/cjs/hooks/useKeyboardNavigation.js +7 -7
- package/cjs/hooks/useOpenableOnClickHandler.js +8 -7
- package/cjs/hooks/useSelectFirstBodyItem.js +14 -4
- package/cjs/index.js +0 -1
- package/cjs/outOfTheBox/ItemControlledDrilldown/index.js +19 -18
- package/cjs/outOfTheBox/ItemControlledDrilldown/styled.js +7 -4
- package/cjs/outOfTheBox/ItemHeader/index.js +24 -15
- package/cjs/outOfTheBox/ItemHeader/styled.js +3 -4
- package/cjs/outOfTheBox/ItemLink/index.js +18 -24
- package/cjs/outOfTheBox/ItemSection/index.js +12 -10
- package/cjs/outOfTheBox/ItemSeparator/index.js +6 -6
- package/cjs/outOfTheBox/ItemSubmenu/index.js +17 -25
- package/cjs/outOfTheBox/ItemSubmenu/styled.js +3 -4
- package/cjs/outOfTheBox/ItemTextLabel/index.js +11 -9
- package/cjs/outOfTheBox/ItemTextLabel/styled.js +7 -4
- package/cjs/outOfTheBox/ItemUncontrolledDrilldown/index.js +15 -15
- package/cjs/outOfTheBox/ItemUncontrolledDrilldown/styled.js +7 -4
- package/cjs/outOfTheBox/ItemWithDate/index.js +9 -8
- package/cjs/outOfTheBox/ItemWithDate/styled.js +7 -4
- package/cjs/outOfTheBox/index.js +6 -6
- package/cjs/parts/LeftNavContent/index.js +5 -2
- package/cjs/parts/LeftNavContent/styled.js +11 -16
- package/cjs/parts/LeftNavContentWithScrollbar/index.js +7 -0
- package/cjs/parts/LeftNavFooterItem/index.js +3 -12
- package/cjs/parts/LeftNavFooterItem/styled.js +8 -9
- package/cjs/parts/LeftNavLoading/index.js +13 -10
- package/cjs/parts/OutOfTheBoxMapItem.js +5 -0
- package/cjs/prop-types.js +2 -1
- package/esm/LeftNavigationContext.js +0 -4
- package/esm/common/getItemBackgroundStyle.js +1 -12
- package/esm/common/getLeftBorderStyle.js +3 -17
- package/esm/common/getScrollbarStyle.js +1 -24
- package/esm/common/index.js +0 -1
- package/esm/configs/useLeftNavConfig.js +14 -21
- package/esm/configs/useLeftNavItems.js +11 -11
- package/esm/exported-related/ChevronItem/index.js +7 -2
- package/esm/exported-related/Icon/index.js +5 -0
- package/esm/exported-related/ItemRenderer/index.js +11 -10
- package/esm/exported-related/ItemRenderer/styled.js +27 -28
- package/esm/exported-related/ItemRenderer/usePropsWithDefaults.js +10 -3
- package/esm/exported-related/Notifications/index.js +41 -37
- package/esm/exported-related/OpenWindowItem/index.js +7 -2
- package/esm/hooks/useExpandableOnClickHandler.js +7 -6
- package/esm/hooks/useKeyboardNavigation.js +7 -7
- package/esm/hooks/useOpenableOnClickHandler.js +8 -7
- package/esm/hooks/useSelectFirstBodyItem.js +14 -4
- package/esm/index.js +0 -1
- package/esm/outOfTheBox/ItemControlledDrilldown/index.js +16 -13
- package/esm/outOfTheBox/ItemControlledDrilldown/styled.js +7 -4
- package/esm/outOfTheBox/ItemHeader/index.js +24 -15
- package/esm/outOfTheBox/ItemHeader/styled.js +3 -3
- package/esm/outOfTheBox/ItemLink/index.js +18 -24
- package/esm/outOfTheBox/ItemSection/index.js +12 -10
- package/esm/outOfTheBox/ItemSeparator/index.js +6 -6
- package/esm/outOfTheBox/ItemSubmenu/index.js +17 -25
- package/esm/outOfTheBox/ItemSubmenu/styled.js +3 -3
- package/esm/outOfTheBox/ItemTextLabel/index.js +11 -9
- package/esm/outOfTheBox/ItemTextLabel/styled.js +7 -4
- package/esm/outOfTheBox/ItemUncontrolledDrilldown/index.js +14 -12
- package/esm/outOfTheBox/ItemUncontrolledDrilldown/styled.js +7 -4
- package/esm/outOfTheBox/ItemWithDate/index.js +9 -8
- package/esm/outOfTheBox/ItemWithDate/styled.js +7 -4
- package/esm/outOfTheBox/index.js +6 -6
- package/esm/parts/LeftNavContent/index.js +5 -2
- package/esm/parts/LeftNavContent/styled.js +11 -16
- package/esm/parts/LeftNavContentWithScrollbar/index.js +7 -0
- package/esm/parts/LeftNavFooterItem/index.js +2 -10
- package/esm/parts/LeftNavFooterItem/styled.js +3 -4
- package/esm/parts/LeftNavLoading/index.js +13 -10
- package/esm/parts/OutOfTheBoxMapItem.js +5 -0
- package/esm/prop-types.js +2 -1
- package/package.json +12 -16
- package/types/LeftNavigation.d.ts +46 -11
- package/types/LeftNavigationContext.d.ts +0 -4
- package/types/common/index.d.ts +0 -1
- package/types/exported-related/ItemRenderer/styled.d.ts +3 -2
- package/types/hooks/useKeyboardNavigation.d.ts +1 -1
- package/types/hooks/useSelectFirstBodyItem.d.ts +1 -1
- package/types/index.d.d.ts +8 -2
- package/types/index.d.ts +1 -2
- 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 -11
- package/types/parts/LeftNavContentWithScrollbar/index.d.ts +1 -0
- package/types/parts/LeftNavFooterItem/styled.d.ts +10 -6
- package/types/prop-types.d.ts +87 -18
- package/cjs/common/getFocusedByKeyboardStyle.js +0 -23
- package/cjs/configs/useGlobalKeyListeners.js +0 -31
- package/cjs/package.json +0 -4
- package/esm/common/getFocusedByKeyboardStyle.js +0 -19
- package/esm/configs/useGlobalKeyListeners.js +0 -22
- package/esm/package.json +0 -4
- package/types/common/getFocusedByKeyboardStyle.d.ts +0 -4
- package/types/configs/useGlobalKeyListeners.d.ts +0 -6
|
@@ -1,30 +1,32 @@
|
|
|
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';
|
|
1
6
|
import _jsx from '@babel/runtime/helpers/esm/jsx';
|
|
2
7
|
import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
|
|
8
|
+
import 'core-js/modules/esnext.async-iterator.map.js';
|
|
9
|
+
import 'core-js/modules/esnext.iterator.map.js';
|
|
3
10
|
import { useMemo } from 'react';
|
|
4
11
|
import Grid from '@elliemae/ds-grid';
|
|
5
12
|
import { SimpleTruncatedTooltipText } from '@elliemae/ds-truncated-tooltip-text';
|
|
6
|
-
import ArrowheadRight from '@elliemae/ds-icons
|
|
7
|
-
import ArrowheadDown from '@elliemae/ds-icons/ArrowheadDown';
|
|
13
|
+
import { ArrowheadDown, ArrowheadRight } from '@elliemae/ds-icons';
|
|
8
14
|
import { ITEM_TYPES } from '../../exported-related/constants.js';
|
|
9
15
|
import { ItemRenderer } from '../../exported-related/ItemRenderer/index.js';
|
|
10
|
-
import '@elliemae/ds-icons/ChevronSmallRight';
|
|
11
16
|
import 'react/jsx-runtime';
|
|
12
|
-
import '@elliemae/ds-icons/Notifications';
|
|
13
|
-
import '@elliemae/ds-icons/ExceptionsSmallFill';
|
|
14
|
-
import '@elliemae/ds-icons/AlertsSmallFill';
|
|
15
|
-
import '@elliemae/ds-icons/MessagesSmallFill';
|
|
16
17
|
import 'styled-components';
|
|
17
|
-
import '@elliemae/ds-icons/OpenWindow';
|
|
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 => {
|
|
@@ -38,10 +40,10 @@ const OutOfTheBoxMapSubitem = props => {
|
|
|
38
40
|
} = props;
|
|
39
41
|
|
|
40
42
|
if (typeof type === 'string' && !!outOfTheBoxSubitemsComponents[type]) {
|
|
41
|
-
var _item$itemOpts;
|
|
43
|
+
var _item$itemOpts$indent, _item$itemOpts;
|
|
42
44
|
|
|
43
45
|
const OutOfTheBoxComponent = outOfTheBoxSubitemsComponents[type];
|
|
44
|
-
const currentIndent = ((_item$itemOpts = item.itemOpts) === null || _item$itemOpts === void 0 ? void 0 : _item$itemOpts.indent)
|
|
46
|
+
const currentIndent = (_item$itemOpts$indent = (_item$itemOpts = item.itemOpts) === null || _item$itemOpts === void 0 ? void 0 : _item$itemOpts.indent) !== null && _item$itemOpts$indent !== void 0 ? _item$itemOpts$indent : 0;
|
|
45
47
|
|
|
46
48
|
const newItem = _objectSpread(_objectSpread({}, item), {}, {
|
|
47
49
|
itemOpts: _objectSpread(_objectSpread({}, item.itemOpts), {}, {
|
|
@@ -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
|
|
@@ -3,10 +3,13 @@ import Grid from '@elliemae/ds-grid';
|
|
|
3
3
|
|
|
4
4
|
const StyledLabel = /*#__PURE__*/styled(Grid).withConfig({
|
|
5
5
|
componentId: "sc-1tjij7e-0"
|
|
6
|
-
})(["font-size:13px;font-weight:", ";color:", ";line-height:14px;word-break:", ";"], props => props.labelBold ? props.theme.fontWeights.semibold : props.theme.fontWeights.regular,
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
6
|
+
})(["font-size:13px;font-weight:", ";color:", ";line-height:14px;word-break:", ";"], props => props.labelBold ? props.theme.fontWeights.semibold : props.theme.fontWeights.regular, _ref => {
|
|
7
|
+
let {
|
|
8
|
+
labelColor,
|
|
9
|
+
theme
|
|
10
|
+
} = _ref;
|
|
11
|
+
return labelColor ? theme.colors[labelColor[0]][labelColor[1]] : theme.colors.neutral[800];
|
|
12
|
+
}, props => props.labelOverflow === 'wrapAll' ? 'break-all' : 'normal');
|
|
10
13
|
const StyledDate = /*#__PURE__*/styled(Grid).withConfig({
|
|
11
14
|
componentId: "sc-1tjij7e-1"
|
|
12
15
|
})(["font-size:12px;color:", ";line-height:14px;"], props => props.theme.colors.neutral[600]);
|
|
@@ -1,24 +1,29 @@
|
|
|
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';
|
|
1
6
|
import _jsx from '@babel/runtime/helpers/esm/jsx';
|
|
2
7
|
import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
|
|
3
|
-
import 'react';
|
|
8
|
+
import { useCallback } from 'react';
|
|
4
9
|
import Grid from '@elliemae/ds-grid';
|
|
5
10
|
import { SimpleTruncatedTooltipText } from '@elliemae/ds-truncated-tooltip-text';
|
|
6
11
|
import { CHEVRON_BACK_DS_ID } from '../../exported-related/constants.js';
|
|
7
12
|
import { ItemRenderer } from '../../exported-related/ItemRenderer/index.js';
|
|
8
|
-
import '@elliemae/ds-icons
|
|
13
|
+
import '@elliemae/ds-icons';
|
|
9
14
|
import 'react/jsx-runtime';
|
|
10
|
-
import '@elliemae/ds-icons/Notifications';
|
|
11
|
-
import '@elliemae/ds-icons/ExceptionsSmallFill';
|
|
12
|
-
import '@elliemae/ds-icons/AlertsSmallFill';
|
|
13
|
-
import '@elliemae/ds-icons/MessagesSmallFill';
|
|
14
15
|
import 'styled-components';
|
|
15
|
-
import '@elliemae/ds-icons/OpenWindow';
|
|
16
16
|
import { StyledChevronLeft, StyledLabel } from './styled.js';
|
|
17
17
|
|
|
18
18
|
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; }
|
|
19
19
|
|
|
20
20
|
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; }
|
|
21
|
+
|
|
22
|
+
const notOpenedShadowStyle = isSelected => theme => "\n box-shadow: inset 4px 0 0 0 ".concat(isSelected ? theme.colors.brand[400] : 'transparent', ";\n\n :hover {\n box-shadow: inset 4px 0 0 0 ").concat(isSelected ? theme.colors.brand[400] : theme.colors.brand[300], ";\n }\n\n :active {\n box-shadow: inset 4px 0 0 0 ").concat(theme.colors.brand[400], ";\n }\n");
|
|
23
|
+
|
|
21
24
|
const ItemHeader = props => {
|
|
25
|
+
var _item$itemOpts$ariaLa;
|
|
26
|
+
|
|
22
27
|
const {
|
|
23
28
|
item,
|
|
24
29
|
item: {
|
|
@@ -26,7 +31,8 @@ const ItemHeader = props => {
|
|
|
26
31
|
itemOpts: {
|
|
27
32
|
label,
|
|
28
33
|
RightComponent,
|
|
29
|
-
BottomComponent
|
|
34
|
+
BottomComponent,
|
|
35
|
+
labelDataTestId
|
|
30
36
|
},
|
|
31
37
|
CollapsedComponent = () => null
|
|
32
38
|
},
|
|
@@ -38,12 +44,15 @@ const ItemHeader = props => {
|
|
|
38
44
|
onItemClick
|
|
39
45
|
},
|
|
40
46
|
expandedForAnimation,
|
|
41
|
-
|
|
42
|
-
|
|
47
|
+
setFocusedItem,
|
|
48
|
+
selectedItem,
|
|
49
|
+
selectedParent
|
|
43
50
|
}
|
|
44
51
|
} = props;
|
|
45
52
|
const opened = openedItem === dsId;
|
|
46
|
-
const ariaLabel = item.itemOpts.ariaLabel
|
|
53
|
+
const ariaLabel = (_item$itemOpts$ariaLa = item.itemOpts.ariaLabel) !== null && _item$itemOpts$ariaLa !== void 0 ? _item$itemOpts$ariaLa : typeof label === 'string' ? label : 'menuitem';
|
|
54
|
+
const isSelected = selectedItem === dsId || selectedParent === dsId;
|
|
55
|
+
const shadowStyle = useCallback(opened => theme => !opened ? notOpenedShadowStyle(isSelected)(theme) : "box-shadow: inset 4px 0 0 0 #52A6EC", [isSelected, openedItem]);
|
|
47
56
|
return /*#__PURE__*/_jsx(ItemRenderer, {
|
|
48
57
|
item: _objectSpread(_objectSpread({}, item), {}, {
|
|
49
58
|
itemOpts: _objectSpread(_objectSpread({
|
|
@@ -56,7 +65,8 @@ const ItemHeader = props => {
|
|
|
56
65
|
})
|
|
57
66
|
}),
|
|
58
67
|
hasBorderBottom: true,
|
|
59
|
-
borderBottomMr: opened ? '12px' : '0px'
|
|
68
|
+
borderBottomMr: opened ? '12px' : '0px',
|
|
69
|
+
shadowStyle: shadowStyle
|
|
60
70
|
}, void 0, /*#__PURE__*/_jsx(Grid, {
|
|
61
71
|
cols: opened ? ['auto', 'auto'] : ['38px'],
|
|
62
72
|
gutter: "1px",
|
|
@@ -68,7 +78,6 @@ const ItemHeader = props => {
|
|
|
68
78
|
color: ['brand-primary', 800],
|
|
69
79
|
onClick: e => {
|
|
70
80
|
onItemClick(item, e);
|
|
71
|
-
setSelectedItem(dsId);
|
|
72
81
|
},
|
|
73
82
|
"data-testid": "leftnav-leftcomponent-chevron",
|
|
74
83
|
tabIndex: 0,
|
|
@@ -77,7 +86,7 @@ const ItemHeader = props => {
|
|
|
77
86
|
setFocusedItem(CHEVRON_BACK_DS_ID);
|
|
78
87
|
},
|
|
79
88
|
role: "button",
|
|
80
|
-
"aria-label":
|
|
89
|
+
"aria-label": "Close ".concat(ariaLabel)
|
|
81
90
|
}), /*#__PURE__*/_jsx(CollapsedComponent, {
|
|
82
91
|
item: item,
|
|
83
92
|
ctx: ctx
|
|
@@ -85,7 +94,7 @@ const ItemHeader = props => {
|
|
|
85
94
|
ml: opened ? 'xxs' : '1px',
|
|
86
95
|
mt: "xxxs",
|
|
87
96
|
mb: "15px",
|
|
88
|
-
"data-testid":
|
|
97
|
+
"data-testid": labelDataTestId || 'leftnav-itemlabel',
|
|
89
98
|
labelOverflow: labelOverflow
|
|
90
99
|
}, void 0, labelOverflow === 'truncate' ? /*#__PURE__*/_jsx(SimpleTruncatedTooltipText, {
|
|
91
100
|
value: label,
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import Grid from '@elliemae/ds-grid';
|
|
2
|
-
import
|
|
2
|
+
import { ChevronSmallLeft } from '@elliemae/ds-icons';
|
|
3
3
|
import styled from 'styled-components';
|
|
4
4
|
|
|
5
5
|
const StyledLabel = /*#__PURE__*/styled(Grid).withConfig({
|
|
6
6
|
componentId: "sc-m5k4h8-0"
|
|
7
7
|
})(["font-size:14px;color:", ";word-break:", ";"], props => props.theme.colors.neutral[800], props => props.labelOverflow === 'wrapAll' ? 'break-all' : 'normal');
|
|
8
|
-
const StyledChevronLeft = /*#__PURE__*/styled(
|
|
8
|
+
const StyledChevronLeft = /*#__PURE__*/styled(ChevronSmallLeft).withConfig({
|
|
9
9
|
componentId: "sc-m5k4h8-1"
|
|
10
|
-
})(["cursor:pointer;:focus{outline:
|
|
10
|
+
})(["cursor:pointer;:focus{outline:2px solid ", ";}"], props => props.theme.colors.brand[800]);
|
|
11
11
|
|
|
12
12
|
export { StyledChevronLeft, StyledLabel };
|
|
@@ -1,34 +1,24 @@
|
|
|
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';
|
|
1
6
|
import _jsx from '@babel/runtime/helpers/esm/jsx';
|
|
2
7
|
import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
|
|
3
8
|
import { useCallback } from 'react';
|
|
4
9
|
import Grid from '@elliemae/ds-grid';
|
|
5
10
|
import { SimpleTruncatedTooltipText } from '@elliemae/ds-truncated-tooltip-text';
|
|
6
11
|
import { ItemRenderer } from '../../exported-related/ItemRenderer/index.js';
|
|
7
|
-
import '@elliemae/ds-icons
|
|
12
|
+
import '@elliemae/ds-icons';
|
|
8
13
|
import 'react/jsx-runtime';
|
|
9
|
-
import '@elliemae/ds-icons/Notifications';
|
|
10
|
-
import '@elliemae/ds-icons/ExceptionsSmallFill';
|
|
11
|
-
import '@elliemae/ds-icons/AlertsSmallFill';
|
|
12
|
-
import '@elliemae/ds-icons/MessagesSmallFill';
|
|
13
14
|
import 'styled-components';
|
|
14
|
-
import '@elliemae/ds-icons/OpenWindow';
|
|
15
15
|
import { StyledLabel } from './styled.js';
|
|
16
16
|
|
|
17
17
|
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; }
|
|
18
18
|
|
|
19
19
|
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; }
|
|
20
20
|
|
|
21
|
-
const notOpenedShadowStyle = isSelected => theme =>
|
|
22
|
-
box-shadow: inset 4px 0 0 0 ${isSelected ? theme.colors.brand[400] : 'transparent'};
|
|
23
|
-
|
|
24
|
-
:hover {
|
|
25
|
-
box-shadow: inset 4px 0 0 0 ${isSelected ? theme.colors.brand[400] : theme.colors.neutral[300]};
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
:active {
|
|
29
|
-
box-shadow: inset 4px 0 0 0 ${theme.colors.brand[400]};
|
|
30
|
-
}
|
|
31
|
-
`;
|
|
21
|
+
const notOpenedShadowStyle = isSelected => theme => "\n box-shadow: inset 4px 0 0 0 ".concat(isSelected ? theme.colors.brand[400] : 'transparent', ";\n\n :hover {\n box-shadow: inset 4px 0 0 0 ").concat(isSelected ? theme.colors.brand[400] : theme.colors.brand[300], ";\n }\n\n :active {\n box-shadow: inset 4px 0 0 0 ").concat(theme.colors.brand[400], ";\n }\n");
|
|
32
22
|
|
|
33
23
|
const ItemLink = props => {
|
|
34
24
|
const {
|
|
@@ -37,7 +27,8 @@ const ItemLink = props => {
|
|
|
37
27
|
dsId,
|
|
38
28
|
itemOpts: {
|
|
39
29
|
label,
|
|
40
|
-
RightComponent
|
|
30
|
+
RightComponent,
|
|
31
|
+
labelDataTestId
|
|
41
32
|
},
|
|
42
33
|
CollapsedComponent = () => null
|
|
43
34
|
},
|
|
@@ -47,17 +38,20 @@ const ItemLink = props => {
|
|
|
47
38
|
labelOverflow,
|
|
48
39
|
openedItem
|
|
49
40
|
},
|
|
50
|
-
selectedItem
|
|
41
|
+
selectedItem,
|
|
42
|
+
selectedParent
|
|
51
43
|
}
|
|
52
44
|
} = props;
|
|
53
|
-
const isSelected = selectedItem === dsId;
|
|
54
|
-
const shadowStyle = useCallback(theme => !
|
|
45
|
+
const isSelected = selectedItem === dsId || selectedParent === dsId;
|
|
46
|
+
const shadowStyle = useCallback(opened => theme => !opened ? notOpenedShadowStyle(isSelected)(theme) : "box-shadow: inset 4px 0 0 0 #52A6EC", [isSelected, openedItem]);
|
|
55
47
|
return /*#__PURE__*/_jsx(ItemRenderer, {
|
|
56
48
|
item: _objectSpread(_objectSpread({}, item), {}, {
|
|
57
|
-
itemOpts: _objectSpread({
|
|
49
|
+
itemOpts: _objectSpread(_objectSpread({
|
|
58
50
|
ariaLabel: typeof label === 'string' ? label : '',
|
|
59
51
|
ariaRole: 'link'
|
|
60
|
-
}, item.itemOpts)
|
|
52
|
+
}, item.itemOpts), {}, {
|
|
53
|
+
selectable: true
|
|
54
|
+
})
|
|
61
55
|
}),
|
|
62
56
|
shadowStyle: shadowStyle
|
|
63
57
|
}, void 0, /*#__PURE__*/_jsx(Grid, {
|
|
@@ -73,7 +67,7 @@ const ItemLink = props => {
|
|
|
73
67
|
ml: "1px",
|
|
74
68
|
mt: "xxxs",
|
|
75
69
|
mb: "15px",
|
|
76
|
-
"data-testid":
|
|
70
|
+
"data-testid": labelDataTestId || 'leftnav-itemlabel',
|
|
77
71
|
labelOverflow: labelOverflow
|
|
78
72
|
}, void 0, labelOverflow === 'truncate' ? /*#__PURE__*/_jsx(SimpleTruncatedTooltipText, {
|
|
79
73
|
value: label,
|
|
@@ -1,16 +1,16 @@
|
|
|
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';
|
|
1
6
|
import _jsx from '@babel/runtime/helpers/esm/jsx';
|
|
2
7
|
import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
|
|
3
8
|
import 'react';
|
|
4
9
|
import Grid from '@elliemae/ds-grid';
|
|
5
10
|
import { ItemRenderer } from '../../exported-related/ItemRenderer/index.js';
|
|
6
|
-
import '@elliemae/ds-icons
|
|
11
|
+
import '@elliemae/ds-icons';
|
|
7
12
|
import 'react/jsx-runtime';
|
|
8
|
-
import '@elliemae/ds-icons/Notifications';
|
|
9
|
-
import '@elliemae/ds-icons/ExceptionsSmallFill';
|
|
10
|
-
import '@elliemae/ds-icons/AlertsSmallFill';
|
|
11
|
-
import '@elliemae/ds-icons/MessagesSmallFill';
|
|
12
13
|
import 'styled-components';
|
|
13
|
-
import '@elliemae/ds-icons/OpenWindow';
|
|
14
14
|
import { StyledLabel, StyledVerticalSeparator, StyledRightLabel } from './styled.js';
|
|
15
15
|
|
|
16
16
|
var _div, _StyledVerticalSepara;
|
|
@@ -26,7 +26,8 @@ const ItemSection = props => {
|
|
|
26
26
|
label,
|
|
27
27
|
LeftComponent,
|
|
28
28
|
RightComponent,
|
|
29
|
-
labelRightSection
|
|
29
|
+
labelRightSection,
|
|
30
|
+
labelDataTestId
|
|
30
31
|
}
|
|
31
32
|
},
|
|
32
33
|
ctx,
|
|
@@ -38,8 +39,7 @@ const ItemSection = props => {
|
|
|
38
39
|
item: _objectSpread(_objectSpread({}, item), {}, {
|
|
39
40
|
itemOpts: _objectSpread(_objectSpread({}, item.itemOpts), {}, {
|
|
40
41
|
selectable: false,
|
|
41
|
-
focuseable: false
|
|
42
|
-
ariaLive: 'polite'
|
|
42
|
+
focuseable: false
|
|
43
43
|
}),
|
|
44
44
|
CollapsedComponent: null
|
|
45
45
|
}),
|
|
@@ -52,7 +52,9 @@ const ItemSection = props => {
|
|
|
52
52
|
}, void 0, LeftComponent ? /*#__PURE__*/_jsx(LeftComponent, {
|
|
53
53
|
ctx: ctx,
|
|
54
54
|
item: item
|
|
55
|
-
}) : _div || (_div = /*#__PURE__*/_jsx("div", {})), /*#__PURE__*/_jsx(StyledLabel, {
|
|
55
|
+
}) : _div || (_div = /*#__PURE__*/_jsx("div", {})), /*#__PURE__*/_jsx(StyledLabel, {
|
|
56
|
+
"data-testid": labelDataTestId || 'leftnav-section-item-label'
|
|
57
|
+
}, void 0, label), _StyledVerticalSepara || (_StyledVerticalSepara = /*#__PURE__*/_jsx(StyledVerticalSeparator, {})), /*#__PURE__*/_jsx(StyledRightLabel, {}, void 0, labelRightSection)), /*#__PURE__*/_jsx(Grid, {
|
|
56
58
|
ml: "auto",
|
|
57
59
|
onFocus: e => {
|
|
58
60
|
setFocusedItem(null);
|
|
@@ -1,16 +1,16 @@
|
|
|
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';
|
|
1
6
|
import _jsx from '@babel/runtime/helpers/esm/jsx';
|
|
2
7
|
import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
|
|
3
8
|
import 'react';
|
|
4
9
|
import styled from 'styled-components';
|
|
5
10
|
import { ItemRenderer } from '../../exported-related/ItemRenderer/index.js';
|
|
6
|
-
import '@elliemae/ds-icons
|
|
11
|
+
import '@elliemae/ds-icons';
|
|
7
12
|
import 'react/jsx-runtime';
|
|
8
|
-
import '@elliemae/ds-icons/Notifications';
|
|
9
|
-
import '@elliemae/ds-icons/ExceptionsSmallFill';
|
|
10
|
-
import '@elliemae/ds-icons/AlertsSmallFill';
|
|
11
|
-
import '@elliemae/ds-icons/MessagesSmallFill';
|
|
12
13
|
import '@elliemae/ds-grid';
|
|
13
|
-
import '@elliemae/ds-icons/OpenWindow';
|
|
14
14
|
|
|
15
15
|
var _StyledSeparator;
|
|
16
16
|
|
|
@@ -1,3 +1,8 @@
|
|
|
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';
|
|
1
6
|
import _jsx from '@babel/runtime/helpers/esm/jsx';
|
|
2
7
|
import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
|
|
3
8
|
import { useCallback } from 'react';
|
|
@@ -5,33 +10,20 @@ import Grid from '@elliemae/ds-grid';
|
|
|
5
10
|
import { SimpleTruncatedTooltipText } from '@elliemae/ds-truncated-tooltip-text';
|
|
6
11
|
import { CHEVRON_BACK_DS_ID } from '../../exported-related/constants.js';
|
|
7
12
|
import { ItemRenderer } from '../../exported-related/ItemRenderer/index.js';
|
|
8
|
-
import '@elliemae/ds-icons
|
|
13
|
+
import '@elliemae/ds-icons';
|
|
9
14
|
import 'react/jsx-runtime';
|
|
10
|
-
import '@elliemae/ds-icons/Notifications';
|
|
11
|
-
import '@elliemae/ds-icons/ExceptionsSmallFill';
|
|
12
|
-
import '@elliemae/ds-icons/AlertsSmallFill';
|
|
13
|
-
import '@elliemae/ds-icons/MessagesSmallFill';
|
|
14
15
|
import 'styled-components';
|
|
15
|
-
import '@elliemae/ds-icons/OpenWindow';
|
|
16
16
|
import { StyledChevronLeft, StyledLabel } from './styled.js';
|
|
17
17
|
|
|
18
18
|
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; }
|
|
19
19
|
|
|
20
20
|
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; }
|
|
21
21
|
|
|
22
|
-
const notOpenedShadowStyle = isSelected => theme =>
|
|
23
|
-
box-shadow: inset 4px 0 0 0 ${isSelected ? theme.colors.brand[400] : 'transparent'};
|
|
24
|
-
|
|
25
|
-
:hover {
|
|
26
|
-
box-shadow: inset 4px 0 0 0 ${isSelected ? theme.colors.brand[400] : theme.colors.neutral[300]};
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
:active {
|
|
30
|
-
box-shadow: inset 4px 0 0 0 ${theme.colors.brand[400]};
|
|
31
|
-
}
|
|
32
|
-
`;
|
|
22
|
+
const notOpenedShadowStyle = isSelected => theme => "\n box-shadow: inset 4px 0 0 0 ".concat(isSelected ? theme.colors.brand[400] : 'transparent', ";\n\n :hover {\n box-shadow: inset 4px 0 0 0 ").concat(isSelected ? theme.colors.brand[400] : theme.colors.brand[300], ";\n }\n\n :active {\n box-shadow: inset 4px 0 0 0 ").concat(theme.colors.brand[400], ";\n }\n");
|
|
33
23
|
|
|
34
24
|
const ItemSubmenu = props => {
|
|
25
|
+
var _item$itemOpts$ariaLa;
|
|
26
|
+
|
|
35
27
|
const {
|
|
36
28
|
item,
|
|
37
29
|
item: {
|
|
@@ -39,7 +31,8 @@ const ItemSubmenu = props => {
|
|
|
39
31
|
itemOpts: {
|
|
40
32
|
label,
|
|
41
33
|
RightComponent,
|
|
42
|
-
BottomComponent
|
|
34
|
+
BottomComponent,
|
|
35
|
+
labelDataTestId
|
|
43
36
|
},
|
|
44
37
|
CollapsedComponent = () => null
|
|
45
38
|
},
|
|
@@ -52,14 +45,14 @@ const ItemSubmenu = props => {
|
|
|
52
45
|
},
|
|
53
46
|
expandedForAnimation,
|
|
54
47
|
selectedItem,
|
|
55
|
-
|
|
48
|
+
selectedParent,
|
|
56
49
|
setFocusedItem
|
|
57
50
|
}
|
|
58
51
|
} = props;
|
|
59
52
|
const opened = openedItem === dsId;
|
|
60
53
|
const isSelected = selectedItem === dsId;
|
|
61
|
-
const shadowStyle = useCallback(theme => !
|
|
62
|
-
const ariaLabel = item.itemOpts.ariaLabel
|
|
54
|
+
const shadowStyle = useCallback(opened => theme => !opened ? notOpenedShadowStyle(isSelected || selectedParent === dsId)(theme) : "box-shadow: inset 4px 0 0 0 #52A6EC", [dsId, isSelected, openedItem, selectedParent]);
|
|
55
|
+
const ariaLabel = (_item$itemOpts$ariaLa = item.itemOpts.ariaLabel) !== null && _item$itemOpts$ariaLa !== void 0 ? _item$itemOpts$ariaLa : typeof label === 'string' ? label : 'menuitem';
|
|
63
56
|
return /*#__PURE__*/_jsx(ItemRenderer, {
|
|
64
57
|
item: _objectSpread(_objectSpread({}, item), {}, {
|
|
65
58
|
itemOpts: _objectSpread(_objectSpread({}, item.itemOpts), {}, {
|
|
@@ -84,7 +77,6 @@ const ItemSubmenu = props => {
|
|
|
84
77
|
color: ['brand-primary', 800],
|
|
85
78
|
onClick: e => {
|
|
86
79
|
onItemClick(item, e);
|
|
87
|
-
setSelectedItem(dsId);
|
|
88
80
|
},
|
|
89
81
|
"data-testid": "leftnav-leftcomponent-chevron",
|
|
90
82
|
tabIndex: 0,
|
|
@@ -93,7 +85,7 @@ const ItemSubmenu = props => {
|
|
|
93
85
|
setFocusedItem(CHEVRON_BACK_DS_ID);
|
|
94
86
|
},
|
|
95
87
|
role: "button",
|
|
96
|
-
"aria-label":
|
|
88
|
+
"aria-label": "Close ".concat(ariaLabel)
|
|
97
89
|
}), /*#__PURE__*/_jsx(CollapsedComponent, {
|
|
98
90
|
item: item,
|
|
99
91
|
ctx: ctx
|
|
@@ -101,7 +93,7 @@ const ItemSubmenu = props => {
|
|
|
101
93
|
ml: opened ? 'xxs' : '1px',
|
|
102
94
|
mt: "xxxs",
|
|
103
95
|
mb: "15px",
|
|
104
|
-
"data-testid":
|
|
96
|
+
"data-testid": labelDataTestId || 'leftnav-itemlabel',
|
|
105
97
|
labelOverflow: labelOverflow
|
|
106
98
|
}, void 0, labelOverflow === 'truncate' ? /*#__PURE__*/_jsx(SimpleTruncatedTooltipText, {
|
|
107
99
|
value: label,
|
|
@@ -114,7 +106,7 @@ const ItemSubmenu = props => {
|
|
|
114
106
|
setFocusedItem(null);
|
|
115
107
|
},
|
|
116
108
|
onKeyDown: e => e.stopPropagation(),
|
|
117
|
-
onClick: e => openedItem && e.stopPropagation(),
|
|
109
|
+
onClick: e => openedItem === dsId && e.stopPropagation(),
|
|
118
110
|
"data-testid": "leftnav-right-component"
|
|
119
111
|
}, void 0, RightComponent && /*#__PURE__*/_jsx(RightComponent, {
|
|
120
112
|
ctx: ctx,
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import Grid from '@elliemae/ds-grid';
|
|
2
|
-
import
|
|
2
|
+
import { ChevronSmallLeft } from '@elliemae/ds-icons';
|
|
3
3
|
import styled from 'styled-components';
|
|
4
4
|
|
|
5
5
|
const StyledLabel = /*#__PURE__*/styled(Grid).withConfig({
|
|
6
6
|
componentId: "sc-1hegp8y-0"
|
|
7
7
|
})(["font-size:14px;color:", ";word-break:", ";"], props => props.theme.colors.neutral[800], props => props.labelOverflow === 'wrapAll' ? 'break-all' : 'normal');
|
|
8
|
-
const StyledChevronLeft = /*#__PURE__*/styled(
|
|
8
|
+
const StyledChevronLeft = /*#__PURE__*/styled(ChevronSmallLeft).withConfig({
|
|
9
9
|
componentId: "sc-1hegp8y-1"
|
|
10
|
-
})(["cursor:pointer;:focus{outline:
|
|
10
|
+
})(["cursor:pointer;:focus{outline:2px solid ", ";}"], props => props.theme.colors.brand[700]);
|
|
11
11
|
|
|
12
12
|
export { StyledChevronLeft, StyledLabel };
|
|
@@ -1,17 +1,17 @@
|
|
|
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';
|
|
1
6
|
import _jsx from '@babel/runtime/helpers/esm/jsx';
|
|
2
7
|
import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
|
|
3
8
|
import 'react';
|
|
4
9
|
import { SimpleTruncatedTooltipText } from '@elliemae/ds-truncated-tooltip-text';
|
|
5
10
|
import { ItemRenderer } from '../../exported-related/ItemRenderer/index.js';
|
|
6
|
-
import '@elliemae/ds-icons
|
|
11
|
+
import '@elliemae/ds-icons';
|
|
7
12
|
import 'react/jsx-runtime';
|
|
8
|
-
import '@elliemae/ds-icons/Notifications';
|
|
9
|
-
import '@elliemae/ds-icons/ExceptionsSmallFill';
|
|
10
|
-
import '@elliemae/ds-icons/AlertsSmallFill';
|
|
11
|
-
import '@elliemae/ds-icons/MessagesSmallFill';
|
|
12
13
|
import 'styled-components';
|
|
13
14
|
import '@elliemae/ds-grid';
|
|
14
|
-
import '@elliemae/ds-icons/OpenWindow';
|
|
15
15
|
import { StyledLabel } from './styled.js';
|
|
16
16
|
|
|
17
17
|
var _div;
|
|
@@ -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,12 +45,13 @@ 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,
|
|
51
52
|
labelColor: labelColor,
|
|
52
|
-
mr: "xxs2"
|
|
53
|
+
mr: "xxs2",
|
|
54
|
+
pb: "xxxs"
|
|
53
55
|
}, void 0, labelOverflow === 'truncate' ? /*#__PURE__*/_jsx(SimpleTruncatedTooltipText, {
|
|
54
56
|
value: label,
|
|
55
57
|
placement: "bottom-start"
|
|
@@ -3,9 +3,12 @@ import Grid from '@elliemae/ds-grid';
|
|
|
3
3
|
|
|
4
4
|
const StyledLabel = /*#__PURE__*/styled(Grid).withConfig({
|
|
5
5
|
componentId: "sc-1v26p1i-0"
|
|
6
|
-
})(["font-size:13px;font-weight:", ";color:", ";line-height:14px;word-break:", ";"], props => props.labelBold ? props.theme.fontWeights.semibold : props.theme.fontWeights.regular,
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
6
|
+
})(["font-size:13px;font-weight:", ";color:", ";line-height:14px;word-break:", ";"], props => props.labelBold ? props.theme.fontWeights.semibold : props.theme.fontWeights.regular, _ref => {
|
|
7
|
+
let {
|
|
8
|
+
labelColor,
|
|
9
|
+
theme
|
|
10
|
+
} = _ref;
|
|
11
|
+
return labelColor ? theme.colors[labelColor[0]][labelColor[1]] : theme.colors.neutral[800];
|
|
12
|
+
}, props => props.labelOverflow === 'wrapAll' ? 'break-all' : 'normal');
|
|
10
13
|
|
|
11
14
|
export { StyledLabel };
|
|
@@ -1,20 +1,21 @@
|
|
|
1
|
+
import 'core-js/modules/esnext.async-iterator.for-each.js';
|
|
2
|
+
import 'core-js/modules/esnext.iterator.for-each.js';
|
|
1
3
|
import _jsx from '@babel/runtime/helpers/esm/jsx';
|
|
2
4
|
import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
|
|
5
|
+
import 'core-js/modules/web.dom-collections.iterator.js';
|
|
6
|
+
import 'core-js/modules/esnext.async-iterator.map.js';
|
|
7
|
+
import 'core-js/modules/esnext.iterator.map.js';
|
|
8
|
+
import 'core-js/modules/esnext.async-iterator.filter.js';
|
|
9
|
+
import 'core-js/modules/esnext.iterator.constructor.js';
|
|
10
|
+
import 'core-js/modules/esnext.iterator.filter.js';
|
|
3
11
|
import { useEffect, useMemo, useCallback } from 'react';
|
|
4
12
|
import Grid from '@elliemae/ds-grid';
|
|
5
13
|
import { SimpleTruncatedTooltipText } from '@elliemae/ds-truncated-tooltip-text';
|
|
6
|
-
import ArrowheadRight from '@elliemae/ds-icons
|
|
7
|
-
import ArrowheadDown from '@elliemae/ds-icons/ArrowheadDown';
|
|
14
|
+
import { ArrowheadDown, ArrowheadRight } from '@elliemae/ds-icons';
|
|
8
15
|
import { ITEM_TYPES } from '../../exported-related/constants.js';
|
|
9
16
|
import { ItemRenderer } from '../../exported-related/ItemRenderer/index.js';
|
|
10
|
-
import '@elliemae/ds-icons/ChevronSmallRight';
|
|
11
17
|
import 'react/jsx-runtime';
|
|
12
|
-
import '@elliemae/ds-icons/Notifications';
|
|
13
|
-
import '@elliemae/ds-icons/ExceptionsSmallFill';
|
|
14
|
-
import '@elliemae/ds-icons/AlertsSmallFill';
|
|
15
|
-
import '@elliemae/ds-icons/MessagesSmallFill';
|
|
16
18
|
import 'styled-components';
|
|
17
|
-
import '@elliemae/ds-icons/OpenWindow';
|
|
18
19
|
import { StyledLabel, StyledDate } from './styled.js';
|
|
19
20
|
import { ItemSeparator } from '../ItemSeparator/index.js';
|
|
20
21
|
import { ItemWithDate } from '../ItemWithDate/index.js';
|
|
@@ -41,10 +42,10 @@ const OutOfTheBoxMapSubitem = props => {
|
|
|
41
42
|
} = props;
|
|
42
43
|
|
|
43
44
|
if (typeof type === 'string' && !!outOfTheBoxSubitemsComponents[type]) {
|
|
44
|
-
var _item$itemOpts;
|
|
45
|
+
var _item$itemOpts$indent, _item$itemOpts;
|
|
45
46
|
|
|
46
47
|
const OutOfTheBoxComponent = outOfTheBoxSubitemsComponents[type];
|
|
47
|
-
const currentIndent = ((_item$itemOpts = item.itemOpts) === null || _item$itemOpts === void 0 ? void 0 : _item$itemOpts.indent)
|
|
48
|
+
const currentIndent = (_item$itemOpts$indent = (_item$itemOpts = item.itemOpts) === null || _item$itemOpts === void 0 ? void 0 : _item$itemOpts.indent) !== null && _item$itemOpts$indent !== void 0 ? _item$itemOpts$indent : 0;
|
|
48
49
|
|
|
49
50
|
const newItem = _objectSpread(_objectSpread({}, item), {}, {
|
|
50
51
|
itemOpts: _objectSpread(_objectSpread({}, item.itemOpts), {}, {
|
|
@@ -78,7 +79,8 @@ const ItemUncontrolledDrilldown = props => {
|
|
|
78
79
|
labelBold,
|
|
79
80
|
labelColor,
|
|
80
81
|
startOpened,
|
|
81
|
-
items
|
|
82
|
+
items,
|
|
83
|
+
labelDataTestId
|
|
82
84
|
}
|
|
83
85
|
},
|
|
84
86
|
ctx,
|
|
@@ -135,7 +137,7 @@ const ItemUncontrolledDrilldown = props => {
|
|
|
135
137
|
mt: "-2px"
|
|
136
138
|
}, void 0, arrowIcon), /*#__PURE__*/_jsx(StyledLabel, {
|
|
137
139
|
pb: "xxxs",
|
|
138
|
-
"data-testid":
|
|
140
|
+
"data-testid": labelDataTestId || 'leftnav-list-item-label',
|
|
139
141
|
labelOverflow: labelOverflow,
|
|
140
142
|
labelBold: labelBold,
|
|
141
143
|
labelColor: labelColor
|