@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
|
@@ -3,21 +3,20 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
var Grid = require('@elliemae/ds-grid');
|
|
6
|
-
var
|
|
6
|
+
var dsIcons = require('@elliemae/ds-icons');
|
|
7
7
|
var styled = require('styled-components');
|
|
8
8
|
|
|
9
9
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
10
10
|
|
|
11
11
|
var Grid__default = /*#__PURE__*/_interopDefaultLegacy(Grid);
|
|
12
|
-
var ChevronLeft__default = /*#__PURE__*/_interopDefaultLegacy(ChevronLeft);
|
|
13
12
|
var styled__default = /*#__PURE__*/_interopDefaultLegacy(styled);
|
|
14
13
|
|
|
15
14
|
const StyledLabel = /*#__PURE__*/styled__default["default"](Grid__default["default"]).withConfig({
|
|
16
15
|
componentId: "sc-1hegp8y-0"
|
|
17
16
|
})(["font-size:14px;color:", ";word-break:", ";"], props => props.theme.colors.neutral[800], props => props.labelOverflow === 'wrapAll' ? 'break-all' : 'normal');
|
|
18
|
-
const StyledChevronLeft = /*#__PURE__*/styled__default["default"](
|
|
17
|
+
const StyledChevronLeft = /*#__PURE__*/styled__default["default"](dsIcons.ChevronSmallLeft).withConfig({
|
|
19
18
|
componentId: "sc-1hegp8y-1"
|
|
20
|
-
})(["cursor:pointer;:focus{outline:
|
|
19
|
+
})(["cursor:pointer;:focus{outline:2px solid ", ";}"], props => props.theme.colors.brand[700]);
|
|
21
20
|
|
|
22
21
|
exports.StyledChevronLeft = StyledChevronLeft;
|
|
23
22
|
exports.StyledLabel = StyledLabel;
|
|
@@ -2,20 +2,20 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
+
require('core-js/modules/esnext.async-iterator.filter.js');
|
|
6
|
+
require('core-js/modules/esnext.iterator.constructor.js');
|
|
7
|
+
require('core-js/modules/esnext.iterator.filter.js');
|
|
8
|
+
require('core-js/modules/esnext.async-iterator.for-each.js');
|
|
9
|
+
require('core-js/modules/esnext.iterator.for-each.js');
|
|
5
10
|
var _jsx = require('@babel/runtime/helpers/jsx');
|
|
6
11
|
var _defineProperty = require('@babel/runtime/helpers/defineProperty');
|
|
7
12
|
require('react');
|
|
8
13
|
var dsTruncatedTooltipText = require('@elliemae/ds-truncated-tooltip-text');
|
|
9
14
|
var index = require('../../exported-related/ItemRenderer/index.js');
|
|
10
|
-
require('@elliemae/ds-icons
|
|
15
|
+
require('@elliemae/ds-icons');
|
|
11
16
|
require('react/jsx-runtime');
|
|
12
|
-
require('@elliemae/ds-icons/Notifications');
|
|
13
|
-
require('@elliemae/ds-icons/ExceptionsSmallFill');
|
|
14
|
-
require('@elliemae/ds-icons/AlertsSmallFill');
|
|
15
|
-
require('@elliemae/ds-icons/MessagesSmallFill');
|
|
16
17
|
require('styled-components');
|
|
17
18
|
require('@elliemae/ds-grid');
|
|
18
|
-
require('@elliemae/ds-icons/OpenWindow');
|
|
19
19
|
var styled = require('./styled.js');
|
|
20
20
|
|
|
21
21
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
@@ -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,12 +54,13 @@ 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,
|
|
60
61
|
labelColor: labelColor,
|
|
61
|
-
mr: "xxs2"
|
|
62
|
+
mr: "xxs2",
|
|
63
|
+
pb: "xxxs"
|
|
62
64
|
}, void 0, labelOverflow === 'truncate' ? /*#__PURE__*/_jsx__default["default"](dsTruncatedTooltipText.SimpleTruncatedTooltipText, {
|
|
63
65
|
value: label,
|
|
64
66
|
placement: "bottom-start"
|
|
@@ -12,9 +12,12 @@ var Grid__default = /*#__PURE__*/_interopDefaultLegacy(Grid);
|
|
|
12
12
|
|
|
13
13
|
const StyledLabel = /*#__PURE__*/styled__default["default"](Grid__default["default"]).withConfig({
|
|
14
14
|
componentId: "sc-1v26p1i-0"
|
|
15
|
-
})(["font-size:13px;font-weight:", ";color:", ";line-height:14px;word-break:", ";"], props => props.labelBold ? props.theme.fontWeights.semibold : props.theme.fontWeights.regular,
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
15
|
+
})(["font-size:13px;font-weight:", ";color:", ";line-height:14px;word-break:", ";"], props => props.labelBold ? props.theme.fontWeights.semibold : props.theme.fontWeights.regular, _ref => {
|
|
16
|
+
let {
|
|
17
|
+
labelColor,
|
|
18
|
+
theme
|
|
19
|
+
} = _ref;
|
|
20
|
+
return labelColor ? theme.colors[labelColor[0]][labelColor[1]] : theme.colors.neutral[800];
|
|
21
|
+
}, props => props.labelOverflow === 'wrapAll' ? 'break-all' : 'normal');
|
|
19
22
|
|
|
20
23
|
exports.StyledLabel = StyledLabel;
|
|
@@ -4,21 +4,22 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
var _jsx = require('@babel/runtime/helpers/jsx');
|
|
6
6
|
var _defineProperty = require('@babel/runtime/helpers/defineProperty');
|
|
7
|
+
require('core-js/modules/web.dom-collections.iterator.js');
|
|
8
|
+
require('core-js/modules/esnext.async-iterator.map.js');
|
|
9
|
+
require('core-js/modules/esnext.iterator.map.js');
|
|
10
|
+
require('core-js/modules/esnext.async-iterator.filter.js');
|
|
11
|
+
require('core-js/modules/esnext.iterator.constructor.js');
|
|
12
|
+
require('core-js/modules/esnext.iterator.filter.js');
|
|
13
|
+
require('core-js/modules/esnext.async-iterator.for-each.js');
|
|
14
|
+
require('core-js/modules/esnext.iterator.for-each.js');
|
|
7
15
|
var React = require('react');
|
|
8
16
|
var Grid = require('@elliemae/ds-grid');
|
|
9
17
|
var dsTruncatedTooltipText = require('@elliemae/ds-truncated-tooltip-text');
|
|
10
|
-
var
|
|
11
|
-
var ArrowheadDown = require('@elliemae/ds-icons/ArrowheadDown');
|
|
18
|
+
var dsIcons = require('@elliemae/ds-icons');
|
|
12
19
|
var constants = require('../../exported-related/constants.js');
|
|
13
20
|
var index$3 = require('../../exported-related/ItemRenderer/index.js');
|
|
14
|
-
require('@elliemae/ds-icons/ChevronSmallRight');
|
|
15
21
|
require('react/jsx-runtime');
|
|
16
|
-
require('@elliemae/ds-icons/Notifications');
|
|
17
|
-
require('@elliemae/ds-icons/ExceptionsSmallFill');
|
|
18
|
-
require('@elliemae/ds-icons/AlertsSmallFill');
|
|
19
|
-
require('@elliemae/ds-icons/MessagesSmallFill');
|
|
20
22
|
require('styled-components');
|
|
21
|
-
require('@elliemae/ds-icons/OpenWindow');
|
|
22
23
|
var styled = require('./styled.js');
|
|
23
24
|
var index = require('../ItemSeparator/index.js');
|
|
24
25
|
var index$1 = require('../ItemWithDate/index.js');
|
|
@@ -29,8 +30,6 @@ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'defau
|
|
|
29
30
|
var _jsx__default = /*#__PURE__*/_interopDefaultLegacy(_jsx);
|
|
30
31
|
var _defineProperty__default = /*#__PURE__*/_interopDefaultLegacy(_defineProperty);
|
|
31
32
|
var Grid__default = /*#__PURE__*/_interopDefaultLegacy(Grid);
|
|
32
|
-
var ArrowheadRight__default = /*#__PURE__*/_interopDefaultLegacy(ArrowheadRight);
|
|
33
|
-
var ArrowheadDown__default = /*#__PURE__*/_interopDefaultLegacy(ArrowheadDown);
|
|
34
33
|
|
|
35
34
|
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; }
|
|
36
35
|
|
|
@@ -53,10 +52,10 @@ const OutOfTheBoxMapSubitem = props => {
|
|
|
53
52
|
} = props;
|
|
54
53
|
|
|
55
54
|
if (typeof type === 'string' && !!outOfTheBoxSubitemsComponents[type]) {
|
|
56
|
-
var _item$itemOpts;
|
|
55
|
+
var _item$itemOpts$indent, _item$itemOpts;
|
|
57
56
|
|
|
58
57
|
const OutOfTheBoxComponent = outOfTheBoxSubitemsComponents[type];
|
|
59
|
-
const currentIndent = ((_item$itemOpts = item.itemOpts) === null || _item$itemOpts === void 0 ? void 0 : _item$itemOpts.indent)
|
|
58
|
+
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;
|
|
60
59
|
|
|
61
60
|
const newItem = _objectSpread(_objectSpread({}, item), {}, {
|
|
62
61
|
itemOpts: _objectSpread(_objectSpread({}, item.itemOpts), {}, {
|
|
@@ -90,7 +89,8 @@ const ItemUncontrolledDrilldown = props => {
|
|
|
90
89
|
labelBold,
|
|
91
90
|
labelColor,
|
|
92
91
|
startOpened,
|
|
93
|
-
items
|
|
92
|
+
items,
|
|
93
|
+
labelDataTestId
|
|
94
94
|
}
|
|
95
95
|
},
|
|
96
96
|
ctx,
|
|
@@ -109,7 +109,7 @@ const ItemUncontrolledDrilldown = props => {
|
|
|
109
109
|
const opened = openedDrilldowns.includes(dsId);
|
|
110
110
|
const labelOverflow = itemLabelOverflow || leftNavLabelOverflow;
|
|
111
111
|
const arrowIcon = React.useMemo(() => {
|
|
112
|
-
const Component = opened ?
|
|
112
|
+
const Component = opened ? dsIcons.ArrowheadDown : dsIcons.ArrowheadRight;
|
|
113
113
|
return /*#__PURE__*/_jsx__default["default"](Component, {
|
|
114
114
|
width: "24px",
|
|
115
115
|
height: "18px",
|
|
@@ -147,7 +147,7 @@ const ItemUncontrolledDrilldown = props => {
|
|
|
147
147
|
mt: "-2px"
|
|
148
148
|
}, void 0, arrowIcon), /*#__PURE__*/_jsx__default["default"](styled.StyledLabel, {
|
|
149
149
|
pb: "xxxs",
|
|
150
|
-
"data-testid":
|
|
150
|
+
"data-testid": labelDataTestId || 'leftnav-list-item-label',
|
|
151
151
|
labelOverflow: labelOverflow,
|
|
152
152
|
labelBold: labelBold,
|
|
153
153
|
labelColor: labelColor
|
|
@@ -12,10 +12,13 @@ var Grid__default = /*#__PURE__*/_interopDefaultLegacy(Grid);
|
|
|
12
12
|
|
|
13
13
|
const StyledLabel = /*#__PURE__*/styled__default["default"](Grid__default["default"]).withConfig({
|
|
14
14
|
componentId: "sc-17rk89j-0"
|
|
15
|
-
})(["font-size:13px;font-weight:", ";color:", ";line-height:14px;word-break:", ";"], props => props.labelBold ? props.theme.fontWeights.semibold : props.theme.fontWeights.regular,
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
15
|
+
})(["font-size:13px;font-weight:", ";color:", ";line-height:14px;word-break:", ";"], props => props.labelBold ? props.theme.fontWeights.semibold : props.theme.fontWeights.regular, _ref => {
|
|
16
|
+
let {
|
|
17
|
+
labelColor,
|
|
18
|
+
theme
|
|
19
|
+
} = _ref;
|
|
20
|
+
return labelColor ? theme.colors[labelColor[0]][labelColor[1]] : theme.colors.neutral[800];
|
|
21
|
+
}, props => props.labelOverflow === 'wrapAll' ? 'break-all' : 'normal');
|
|
19
22
|
const StyledDate = /*#__PURE__*/styled__default["default"](Grid__default["default"]).withConfig({
|
|
20
23
|
componentId: "sc-17rk89j-1"
|
|
21
24
|
})(["font-size:12px;color:", ";line-height:14px;"], props => props.theme.colors.neutral[600]);
|
|
@@ -2,20 +2,20 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
+
require('core-js/modules/esnext.async-iterator.filter.js');
|
|
6
|
+
require('core-js/modules/esnext.iterator.constructor.js');
|
|
7
|
+
require('core-js/modules/esnext.iterator.filter.js');
|
|
8
|
+
require('core-js/modules/esnext.async-iterator.for-each.js');
|
|
9
|
+
require('core-js/modules/esnext.iterator.for-each.js');
|
|
5
10
|
var _jsx = require('@babel/runtime/helpers/jsx');
|
|
6
11
|
var _defineProperty = require('@babel/runtime/helpers/defineProperty');
|
|
7
12
|
require('react');
|
|
8
13
|
var Grid = require('@elliemae/ds-grid');
|
|
9
14
|
var dsTruncatedTooltipText = require('@elliemae/ds-truncated-tooltip-text');
|
|
10
15
|
var index = require('../../exported-related/ItemRenderer/index.js');
|
|
11
|
-
require('@elliemae/ds-icons
|
|
16
|
+
require('@elliemae/ds-icons');
|
|
12
17
|
require('react/jsx-runtime');
|
|
13
|
-
require('@elliemae/ds-icons/Notifications');
|
|
14
|
-
require('@elliemae/ds-icons/ExceptionsSmallFill');
|
|
15
|
-
require('@elliemae/ds-icons/AlertsSmallFill');
|
|
16
|
-
require('@elliemae/ds-icons/MessagesSmallFill');
|
|
17
18
|
require('styled-components');
|
|
18
|
-
require('@elliemae/ds-icons/OpenWindow');
|
|
19
19
|
var styled = require('./styled.js');
|
|
20
20
|
|
|
21
21
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
@@ -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
|
|
@@ -12,10 +12,13 @@ var Grid__default = /*#__PURE__*/_interopDefaultLegacy(Grid);
|
|
|
12
12
|
|
|
13
13
|
const StyledLabel = /*#__PURE__*/styled__default["default"](Grid__default["default"]).withConfig({
|
|
14
14
|
componentId: "sc-govmsc-0"
|
|
15
|
-
})(["font-size:13px;font-weight:", ";color:", ";line-height:14px;word-break:", ";"], props => props.labelBold ? props.theme.fontWeights.semibold : props.theme.fontWeights.regular,
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
15
|
+
})(["font-size:13px;font-weight:", ";color:", ";line-height:14px;word-break:", ";"], props => props.labelBold ? props.theme.fontWeights.semibold : props.theme.fontWeights.regular, _ref => {
|
|
16
|
+
let {
|
|
17
|
+
labelColor,
|
|
18
|
+
theme
|
|
19
|
+
} = _ref;
|
|
20
|
+
return labelColor ? theme.colors[labelColor[0]][labelColor[1]] : theme.colors.neutral[800];
|
|
21
|
+
}, props => props.labelOverflow === 'wrapAll' ? 'break-all' : 'normal');
|
|
19
22
|
const StyledDate = /*#__PURE__*/styled__default["default"](Grid__default["default"]).withConfig({
|
|
20
23
|
componentId: "sc-govmsc-1"
|
|
21
24
|
})(["font-size:12px;color:", ";line-height:14px;"], props => props.theme.colors.neutral[600]);
|
package/cjs/outOfTheBox/index.js
CHANGED
|
@@ -7,14 +7,14 @@ require('@babel/runtime/helpers/jsx');
|
|
|
7
7
|
require('react');
|
|
8
8
|
require('@elliemae/ds-grid');
|
|
9
9
|
require('styled-components');
|
|
10
|
+
require('core-js/modules/esnext.async-iterator.filter.js');
|
|
11
|
+
require('core-js/modules/esnext.iterator.constructor.js');
|
|
12
|
+
require('core-js/modules/esnext.iterator.filter.js');
|
|
13
|
+
require('core-js/modules/esnext.async-iterator.for-each.js');
|
|
14
|
+
require('core-js/modules/esnext.iterator.for-each.js');
|
|
10
15
|
require('@babel/runtime/helpers/defineProperty');
|
|
11
16
|
require('react/jsx-runtime');
|
|
12
|
-
require('@elliemae/ds-icons
|
|
13
|
-
require('@elliemae/ds-icons/Notifications');
|
|
14
|
-
require('@elliemae/ds-icons/ExceptionsSmallFill');
|
|
15
|
-
require('@elliemae/ds-icons/AlertsSmallFill');
|
|
16
|
-
require('@elliemae/ds-icons/MessagesSmallFill');
|
|
17
|
-
require('@elliemae/ds-icons/OpenWindow');
|
|
17
|
+
require('@elliemae/ds-icons');
|
|
18
18
|
var index = require('./ItemControlledDrilldown/index.js');
|
|
19
19
|
var index$1 = require('./ItemUncontrolledDrilldown/index.js');
|
|
20
20
|
var index$2 = require('./ItemHeader/index.js');
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var _jsx = require('@babel/runtime/helpers/jsx');
|
|
4
|
+
require('core-js/modules/esnext.async-iterator.map.js');
|
|
5
|
+
require('core-js/modules/esnext.iterator.map.js');
|
|
4
6
|
var React = require('react');
|
|
5
7
|
var LeftNavigationContext = require('../../LeftNavigationContext.js');
|
|
6
8
|
var index$1 = require('../LeftNavFooterItem/index.js');
|
|
@@ -24,7 +26,8 @@ const LeftNavInnerContent = () => {
|
|
|
24
26
|
HeaderComponent,
|
|
25
27
|
BodyHeaderComponent,
|
|
26
28
|
openedItem,
|
|
27
|
-
items
|
|
29
|
+
items,
|
|
30
|
+
withoutBodyShadow
|
|
28
31
|
},
|
|
29
32
|
selectedItem
|
|
30
33
|
} = React__default["default"].useContext(LeftNavigationContext.LeftNavContext);
|
|
@@ -40,7 +43,7 @@ const LeftNavInnerContent = () => {
|
|
|
40
43
|
}, void 0, BodyHeaderComponent ? /*#__PURE__*/_jsx__default["default"](OutOfTheBoxMapItem.OutOfTheBoxMapItem, {
|
|
41
44
|
item: BodyHeaderComponent
|
|
42
45
|
}) : null), /*#__PURE__*/_jsx__default["default"](styled.StyledLeftNavBodyItemsArea, {
|
|
43
|
-
selected: openedItem !== null,
|
|
46
|
+
selected: !withoutBodyShadow && openedItem !== null,
|
|
44
47
|
"data-testid": "leftnav-body-items-area",
|
|
45
48
|
tabIndex: -1
|
|
46
49
|
}, void 0, /*#__PURE__*/_jsx__default["default"](index$2.LeftNavContentWithScrollbar, {}, void 0, items.map(item => /*#__PURE__*/_jsx__default["default"](OutOfTheBoxMapItem.OutOfTheBoxMapItem, {
|
|
@@ -8,23 +8,18 @@ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'defau
|
|
|
8
8
|
|
|
9
9
|
var styled__default = /*#__PURE__*/_interopDefaultLegacy(styled);
|
|
10
10
|
|
|
11
|
-
const getLeftShadowStyles =
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
box-shadow: inset 4px 0 0 0
|
|
20
|
-
}
|
|
21
|
-
:active {
|
|
22
|
-
box-shadow: inset 4px 0 0 0 ${theme.colors.brand[400]};
|
|
23
|
-
}
|
|
24
|
-
`;
|
|
11
|
+
const getLeftShadowStyles = _ref => {
|
|
12
|
+
let {
|
|
13
|
+
selected,
|
|
14
|
+
selectedParent,
|
|
15
|
+
theme
|
|
16
|
+
} = _ref;
|
|
17
|
+
|
|
18
|
+
if (!selected && !selectedParent) {
|
|
19
|
+
return "\n box-shadow: inset 4px 0 0 0 transparent;\n :hover {\n box-shadow: inset 4px 0 0 0 ".concat(theme.colors.brand[300], ";\n }\n :active {\n box-shadow: inset 4px 0 0 0 ").concat(theme.colors.brand[400], ";\n }\n ");
|
|
25
20
|
}
|
|
26
21
|
|
|
27
|
-
return
|
|
22
|
+
return "box-shadow: inset 4px 0 0 0 ".concat(theme.colors.brand[400], ";");
|
|
28
23
|
};
|
|
29
24
|
|
|
30
25
|
const StyledLeftNavExpandAnimationWrapper = /*#__PURE__*/styled__default["default"].nav.withConfig({
|
|
@@ -32,7 +27,7 @@ const StyledLeftNavExpandAnimationWrapper = /*#__PURE__*/styled__default["defaul
|
|
|
32
27
|
})(["width:", ";transition:width ", " 350ms;box-shadow:-1px 0 0 0 ", ";border:1px solid ", ";overflow:hidden;height:100%;position:relative;"], props => props.expanded ? props.expandedWidth : '48px', props => props.expanded ? 'ease-out' : 'ease-in', props => props.theme.colors.neutral[100], props => props.theme.colors.neutral[100]);
|
|
33
28
|
const StyledLeftNavAreasContainer = /*#__PURE__*/styled__default["default"].div.withConfig({
|
|
34
29
|
componentId: "sc-1hvvtkb-1"
|
|
35
|
-
})(["position:absolute;width:", ";height:100%;display:grid;grid-template-columns:1fr;grid-template-rows:auto 1fr auto;grid-template-areas:'left-nav-header' 'left-nav-body' 'left-nav-footer';"], props => props.expanded ?
|
|
30
|
+
})(["position:absolute;width:", ";height:100%;display:grid;grid-template-columns:1fr;grid-template-rows:auto 1fr auto;grid-template-areas:'left-nav-header' 'left-nav-body' 'left-nav-footer';"], props => props.expanded ? "calc(".concat(props.expandedWidth, " - 2px)") : '46px');
|
|
36
31
|
const StyledLeftNavHeaderArea = /*#__PURE__*/styled__default["default"].div.withConfig({
|
|
37
32
|
componentId: "sc-1hvvtkb-2"
|
|
38
33
|
})(["grid-area:left-nav-header;", ""], getLeftShadowStyles);
|
|
@@ -4,7 +4,14 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
var _jsx = require('@babel/runtime/helpers/jsx');
|
|
6
6
|
var _defineProperty = require('@babel/runtime/helpers/defineProperty');
|
|
7
|
+
require('core-js/modules/web.dom-collections.iterator.js');
|
|
8
|
+
require('core-js/modules/esnext.async-iterator.filter.js');
|
|
9
|
+
require('core-js/modules/esnext.iterator.constructor.js');
|
|
10
|
+
require('core-js/modules/esnext.iterator.filter.js');
|
|
11
|
+
require('core-js/modules/esnext.async-iterator.for-each.js');
|
|
12
|
+
require('core-js/modules/esnext.iterator.for-each.js');
|
|
7
13
|
var React = require('react');
|
|
14
|
+
require('overlayscrollbars/css/OverlayScrollbars.css');
|
|
8
15
|
var OverlayScrollbars = require('overlayscrollbars');
|
|
9
16
|
var styled = require('styled-components');
|
|
10
17
|
var jsxRuntime = require('react/jsx-runtime');
|
|
@@ -4,7 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
var _jsx = require('@babel/runtime/helpers/jsx');
|
|
6
6
|
var React = require('react');
|
|
7
|
-
var
|
|
7
|
+
var dsIcons = require('@elliemae/ds-icons');
|
|
8
8
|
var Grid = require('@elliemae/ds-grid');
|
|
9
9
|
var dsTruncatedTooltipText = require('@elliemae/ds-truncated-tooltip-text');
|
|
10
10
|
var styled = require('./styled.js');
|
|
@@ -16,7 +16,6 @@ var jsxRuntime = require('react/jsx-runtime');
|
|
|
16
16
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
17
17
|
|
|
18
18
|
var _jsx__default = /*#__PURE__*/_interopDefaultLegacy(_jsx);
|
|
19
|
-
var MenuExpand__default = /*#__PURE__*/_interopDefaultLegacy(MenuExpand);
|
|
20
19
|
var Grid__default = /*#__PURE__*/_interopDefaultLegacy(Grid);
|
|
21
20
|
|
|
22
21
|
var _StyledSeparator;
|
|
@@ -33,9 +32,7 @@ const LeftNavFooterItem = props => {
|
|
|
33
32
|
},
|
|
34
33
|
expandedForAnimation,
|
|
35
34
|
setSelectedItem,
|
|
36
|
-
focusedItem,
|
|
37
35
|
setFocusedItem,
|
|
38
|
-
focusedByKey,
|
|
39
36
|
visibleItemsRefs
|
|
40
37
|
} = React.useContext(LeftNavigationContext.LeftNavContext);
|
|
41
38
|
const id = constants.FOOTER_DS_ID;
|
|
@@ -64,13 +61,11 @@ const LeftNavFooterItem = props => {
|
|
|
64
61
|
cols: expandedForAnimation ? ['auto', '1fr', 'auto'] : ['38px'],
|
|
65
62
|
onClick: expandedForAnimation ? () => null : handleOnClick,
|
|
66
63
|
onKeyDown: onKeyDown,
|
|
67
|
-
focused: focusedItem === id,
|
|
68
|
-
focusedByKey: focusedByKey,
|
|
69
64
|
onFocus: () => setFocusedItem(id),
|
|
70
65
|
"data-testid": "leftnav-item-container",
|
|
71
66
|
role: "menuitem",
|
|
72
|
-
"aria-label": expandedForAnimation ?
|
|
73
|
-
children: !expandedForAnimation ? /*#__PURE__*/_jsx__default["default"](
|
|
67
|
+
"aria-label": expandedForAnimation ? "Footer, ".concat(footerLabel) : "Expand left navigation",
|
|
68
|
+
children: !expandedForAnimation ? /*#__PURE__*/_jsx__default["default"](dsIcons.MenuExpand, {
|
|
74
69
|
size: "m",
|
|
75
70
|
color: ['brand-primary', 800],
|
|
76
71
|
"data-testid": "leftnav-footer-btn"
|
|
@@ -93,13 +88,9 @@ const LeftNavFooterItem = props => {
|
|
|
93
88
|
size: "m",
|
|
94
89
|
color: ['brand-primary', 800],
|
|
95
90
|
onClick: e => {
|
|
96
|
-
if (openedItem) setSelectedItem(openedItem);
|
|
97
91
|
e.stopPropagation();
|
|
98
92
|
handleOnClick(e);
|
|
99
93
|
},
|
|
100
|
-
onKeyDown: e => {
|
|
101
|
-
if (['Space', 'Enter'].includes(e.code) && openedItem) setSelectedItem(openedItem);
|
|
102
|
-
},
|
|
103
94
|
"data-testid": "leftnav-footer-btn",
|
|
104
95
|
tabIndex: 0,
|
|
105
96
|
onFocus: e => {
|
|
@@ -3,9 +3,8 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
var styled = require('styled-components');
|
|
6
|
-
var
|
|
6
|
+
var Grid = require('@elliemae/ds-grid');
|
|
7
7
|
var dsIcons = require('@elliemae/ds-icons');
|
|
8
|
-
var getFocusedByKeyboardStyle = require('../../common/getFocusedByKeyboardStyle.js');
|
|
9
8
|
var getItemBackgroundStyle = require('../../common/getItemBackgroundStyle.js');
|
|
10
9
|
var getLeftBorderStyle = require('../../common/getLeftBorderStyle.js');
|
|
11
10
|
|
|
@@ -13,24 +12,24 @@ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'defau
|
|
|
13
12
|
|
|
14
13
|
var styled__default = /*#__PURE__*/_interopDefaultLegacy(styled);
|
|
15
14
|
|
|
16
|
-
const StyledFooterMenu = /*#__PURE__*/styled__default["default"](
|
|
15
|
+
const StyledFooterMenu = /*#__PURE__*/styled__default["default"](Grid.Grid).withConfig({
|
|
17
16
|
componentId: "sc-1mcbjxr-0"
|
|
18
17
|
})(["width:100%;margin-top:auto;background:", ";", " border-top:1px solid ", ";"], props => props.theme.colors.neutral['000'], getLeftBorderStyle.getLeftBorderStyle, props => props.theme.colors.neutral[100]);
|
|
19
|
-
const StyledItemWrapper = /*#__PURE__*/styled__default["default"](
|
|
18
|
+
const StyledItemWrapper = /*#__PURE__*/styled__default["default"](Grid.Grid).withConfig({
|
|
20
19
|
componentId: "sc-1mcbjxr-1"
|
|
21
20
|
})(["position:relative;padding-left:", ";"], props => props.theme.space.xxxs);
|
|
22
|
-
const StyledItem = /*#__PURE__*/styled__default["default"](
|
|
21
|
+
const StyledItem = /*#__PURE__*/styled__default["default"](Grid.Grid).withConfig({
|
|
23
22
|
componentId: "sc-1mcbjxr-2"
|
|
24
|
-
})(["min-height:48px;cursor:", ";", " outline:none;", ""], props => props.expanded ? 'auto' : 'pointer', getItemBackgroundStyle.getItemBackgroundStyle,
|
|
25
|
-
const StyledLabel = /*#__PURE__*/styled__default["default"](
|
|
23
|
+
})(["min-height:48px;cursor:", ";", " outline:none;:focus{&:before{content:'';position:absolute;height:100%;width:100%;top:0;left:0px;border:2px solid ", ";pointer-events:none;}}"], props => props.expanded ? 'auto' : 'pointer', getItemBackgroundStyle.getItemBackgroundStyle, props => props.theme.colors.brand[600]);
|
|
24
|
+
const StyledLabel = /*#__PURE__*/styled__default["default"](Grid.Grid).withConfig({
|
|
26
25
|
componentId: "sc-1mcbjxr-3"
|
|
27
26
|
})(["font-size:11px;color:", ";line-height:14px;word-break:", ";"], props => props.theme.colors.neutral[500], props => props.labelOverflow === 'wrapAll' ? 'break-all' : 'normal');
|
|
28
|
-
const StyledSeparator = /*#__PURE__*/styled__default["default"](
|
|
27
|
+
const StyledSeparator = /*#__PURE__*/styled__default["default"](Grid.Grid).withConfig({
|
|
29
28
|
componentId: "sc-1mcbjxr-4"
|
|
30
29
|
})(["height:16px;width:1px;background-color:", ";"], props => props.theme.colors.neutral[100]);
|
|
31
30
|
const StyledMenuCollapse = /*#__PURE__*/styled__default["default"](dsIcons.MenuCollapse).withConfig({
|
|
32
31
|
componentId: "sc-1mcbjxr-5"
|
|
33
|
-
})(["cursor:pointer;:focus{outline:
|
|
32
|
+
})(["cursor:pointer;:focus{outline:2px solid ", ";}"], props => props.theme.colors.brand[700]);
|
|
34
33
|
|
|
35
34
|
exports.StyledFooterMenu = StyledFooterMenu;
|
|
36
35
|
exports.StyledItem = StyledItem;
|
|
@@ -4,7 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
var _jsx = require('@babel/runtime/helpers/jsx');
|
|
6
6
|
require('react');
|
|
7
|
-
var DSCircularProgressIndicator = require('@elliemae/ds-
|
|
7
|
+
var DSCircularProgressIndicator = require('@elliemae/ds-circular-progress-indicator');
|
|
8
8
|
var Grid = require('@elliemae/ds-grid');
|
|
9
9
|
var styled = require('styled-components');
|
|
10
10
|
|
|
@@ -18,14 +18,17 @@ var styled__default = /*#__PURE__*/_interopDefaultLegacy(styled);
|
|
|
18
18
|
const StyledLoaderWrapper = /*#__PURE__*/styled__default["default"](Grid__default["default"]).withConfig({
|
|
19
19
|
componentId: "sc-mqgtxd-0"
|
|
20
20
|
})(["grid-area:left-nav-body;height:100%;place-items:center;z-index:0;background-color:white;"]);
|
|
21
|
-
const LeftNavLoading =
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
21
|
+
const LeftNavLoading = _ref => {
|
|
22
|
+
let {
|
|
23
|
+
expanded
|
|
24
|
+
} = _ref;
|
|
25
|
+
return /*#__PURE__*/_jsx__default["default"](StyledLoaderWrapper, {}, void 0, /*#__PURE__*/_jsx__default["default"](DSCircularProgressIndicator__default["default"], {
|
|
26
|
+
size: expanded ? 'xl' : 'm',
|
|
27
|
+
loading: true,
|
|
28
|
+
showLabel: expanded,
|
|
29
|
+
waiting: false,
|
|
30
|
+
showTooltip: !expanded
|
|
31
|
+
}));
|
|
32
|
+
};
|
|
30
33
|
|
|
31
34
|
exports.LeftNavLoading = LeftNavLoading;
|
|
@@ -2,6 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
+
require('core-js/modules/esnext.async-iterator.filter.js');
|
|
6
|
+
require('core-js/modules/esnext.iterator.constructor.js');
|
|
7
|
+
require('core-js/modules/esnext.iterator.filter.js');
|
|
8
|
+
require('core-js/modules/esnext.async-iterator.for-each.js');
|
|
9
|
+
require('core-js/modules/esnext.iterator.for-each.js');
|
|
5
10
|
var _jsx = require('@babel/runtime/helpers/jsx');
|
|
6
11
|
var _defineProperty = require('@babel/runtime/helpers/defineProperty');
|
|
7
12
|
var React = require('react');
|
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;
|
|
@@ -19,12 +19,8 @@ const defaultContext = {
|
|
|
19
19
|
leftNavProps: defaultProps,
|
|
20
20
|
selectedItem: null,
|
|
21
21
|
setSelectedItem: () => null,
|
|
22
|
-
selectedSubitem: null,
|
|
23
|
-
setSelectedSubitem: () => null,
|
|
24
22
|
focusedItem: null,
|
|
25
23
|
setFocusedItem: () => null,
|
|
26
|
-
focusedByKey: false,
|
|
27
|
-
setFocusedByKey: () => null,
|
|
28
24
|
expandedForAnimation: true,
|
|
29
25
|
openedDrilldowns: [],
|
|
30
26
|
setOpenedDrilldowns: () => null,
|
|
@@ -1,15 +1,4 @@
|
|
|
1
|
-
const commonItemBackgroundStyle = (color, hoverColor, activeColor) =>
|
|
2
|
-
|
|
3
|
-
background: ${color};
|
|
4
|
-
|
|
5
|
-
:hover {
|
|
6
|
-
background: ${hoverColor};
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
:active {
|
|
10
|
-
background: ${activeColor};
|
|
11
|
-
}
|
|
12
|
-
`;
|
|
1
|
+
const commonItemBackgroundStyle = (color, hoverColor, activeColor) => "\n\n background: ".concat(color, ";\n\n :hover {\n background: ").concat(hoverColor, ";\n }\n\n :active {\n background: ").concat(activeColor, ";\n }\n");
|
|
13
2
|
|
|
14
3
|
const getItemBackgroundStyle = props => {
|
|
15
4
|
if (props.selected && !props.opened) return commonItemBackgroundStyle(props.theme.colors.brand[200], props.theme.colors.brand[200], props.theme.colors.brand[200]);
|
|
@@ -1,22 +1,8 @@
|
|
|
1
|
-
const commonLeftBorderStyle = (color, hoverColor, activeColor) =>
|
|
2
|
-
|
|
3
|
-
-webkit-box-shadow: inset 4px 0 0 0 ${color};
|
|
4
|
-
box-shadow: inset 4px 0 0 0 ${color};
|
|
5
|
-
|
|
6
|
-
:hover {
|
|
7
|
-
-webkit-box-shadow: inset 4px 0 0 0 ${hoverColor};
|
|
8
|
-
box-shadow: inset 4px 0 0 0 ${hoverColor};
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
:active {
|
|
12
|
-
-webkit-box-shadow: inset 4px 0 0 0 ${activeColor};
|
|
13
|
-
box-shadow: inset 4px 0 0 0 ${activeColor};
|
|
14
|
-
}
|
|
15
|
-
`;
|
|
1
|
+
const commonLeftBorderStyle = (color, hoverColor, activeColor) => "\n\n -webkit-box-shadow: inset 4px 0 0 0 ".concat(color, ";\n box-shadow: inset 4px 0 0 0 ").concat(color, ";\n\n :hover {\n -webkit-box-shadow: inset 4px 0 0 0 ").concat(hoverColor, ";\n box-shadow: inset 4px 0 0 0 ").concat(hoverColor, ";\n }\n\n :active {\n -webkit-box-shadow: inset 4px 0 0 0 ").concat(activeColor, ";\n box-shadow: inset 4px 0 0 0 ").concat(activeColor, ";\n }\n");
|
|
16
2
|
|
|
17
3
|
const getLeftBorderStyle = props => {
|
|
18
|
-
if (props.selected) return commonLeftBorderStyle(props.theme.colors.brand[400], props.theme.colors.brand[400], props.theme.colors.brand[400]);
|
|
19
|
-
return commonLeftBorderStyle(props.theme.colors.neutral['000'], props.theme.colors.
|
|
4
|
+
if (props.selected || props.selectedParent) return commonLeftBorderStyle(props.theme.colors.brand[400], props.theme.colors.brand[400], props.theme.colors.brand[400]);
|
|
5
|
+
return commonLeftBorderStyle(props.theme.colors.neutral['000'], props.theme.colors.brand[300], props.theme.colors.brand[400]);
|
|
20
6
|
};
|
|
21
7
|
|
|
22
8
|
export { getLeftBorderStyle };
|
|
@@ -1,26 +1,3 @@
|
|
|
1
|
-
const getScrolbarStyle = () =>
|
|
2
|
-
::-webkit-scrollbar {
|
|
3
|
-
width: 14px;
|
|
4
|
-
}
|
|
5
|
-
::-webkit-scrollbar-thumb {
|
|
6
|
-
height: 6px;
|
|
7
|
-
border: 4px solid rgba(0, 0, 0, 0);
|
|
8
|
-
|
|
9
|
-
background-clip: padding-box;
|
|
10
|
-
|
|
11
|
-
background-color: rgba(105, 116, 137, 0.5);
|
|
12
|
-
|
|
13
|
-
border-radius: 7px;
|
|
14
|
-
-webkit-border-radius: 7px;
|
|
15
|
-
}
|
|
16
|
-
::-webkit-scrollbar-button {
|
|
17
|
-
width: 0;
|
|
18
|
-
height: 0;
|
|
19
|
-
display: none;
|
|
20
|
-
}
|
|
21
|
-
::-webkit-scrollbar-corner {
|
|
22
|
-
background-color: transparent;
|
|
23
|
-
}
|
|
24
|
-
`;
|
|
1
|
+
const getScrolbarStyle = () => "\n ::-webkit-scrollbar {\n width: 14px;\n }\n ::-webkit-scrollbar-thumb {\n height: 6px;\n border: 4px solid rgba(0, 0, 0, 0);\n\n background-clip: padding-box;\n\n background-color: rgba(105, 116, 137, 0.5);\n\n border-radius: 7px;\n -webkit-border-radius: 7px;\n }\n ::-webkit-scrollbar-button {\n width: 0;\n height: 0;\n display: none;\n }\n ::-webkit-scrollbar-corner {\n background-color: transparent;\n }\n";
|
|
25
2
|
|
|
26
3
|
export { getScrolbarStyle };
|
package/esm/common/index.js
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
export { getFocusedByKeyboardBorderStyle } from './getFocusedByKeyboardStyle.js';
|
|
2
1
|
export { getItemBackgroundStyle } from './getItemBackgroundStyle.js';
|
|
3
2
|
export { getLeftBorderStyle } from './getLeftBorderStyle.js';
|
|
4
3
|
export { getScrolbarStyle } from './getScrollbarStyle.js';
|