@elliemae/ds-left-navigation 2.2.1 → 2.3.0-alpha.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cjs/LeftNavigation.js +49 -27
- package/cjs/LeftNavigation.js.map +7 -0
- package/cjs/LeftNavigationContext.js +44 -18
- package/cjs/LeftNavigationContext.js.map +7 -0
- package/cjs/common/getItemBackgroundStyle.js +47 -8
- package/cjs/common/getItemBackgroundStyle.js.map +7 -0
- package/cjs/common/getLeftBorderStyle.js +50 -8
- package/cjs/common/getLeftBorderStyle.js.map +7 -0
- package/cjs/common/getScrollbarStyle.js +55 -4
- package/cjs/common/getScrollbarStyle.js.map +7 -0
- package/cjs/common/index.js +30 -13
- package/cjs/common/index.js.map +7 -0
- package/cjs/configs/index.js +38 -10
- package/cjs/configs/index.js.map +7 -0
- package/cjs/configs/useLeftNavConfig.js +80 -72
- package/cjs/configs/useLeftNavConfig.js.map +7 -0
- package/cjs/configs/useLeftNavItems.js +66 -64
- package/cjs/configs/useLeftNavItems.js.map +7 -0
- package/cjs/configs/useLeftNavSmoothExpand.js +48 -27
- package/cjs/configs/useLeftNavSmoothExpand.js.map +7 -0
- package/cjs/exported-related/ChevronItem/index.js +42 -27
- package/cjs/exported-related/ChevronItem/index.js.map +7 -0
- package/cjs/exported-related/Icon/index.js +51 -34
- package/cjs/exported-related/Icon/index.js.map +7 -0
- package/cjs/exported-related/ItemRenderer/index.js +99 -94
- package/cjs/exported-related/ItemRenderer/index.js.map +7 -0
- package/cjs/exported-related/ItemRenderer/styled.js +83 -51
- package/cjs/exported-related/ItemRenderer/styled.js.map +7 -0
- package/cjs/exported-related/ItemRenderer/usePropsWithDefaults.js +57 -45
- package/cjs/exported-related/ItemRenderer/usePropsWithDefaults.js.map +7 -0
- package/cjs/exported-related/Notifications/index.js +81 -61
- package/cjs/exported-related/Notifications/index.js.map +7 -0
- package/cjs/exported-related/OpenWindowItem/index.js +49 -32
- package/cjs/exported-related/OpenWindowItem/index.js.map +7 -0
- package/cjs/exported-related/constants.js +53 -25
- package/cjs/exported-related/constants.js.map +7 -0
- package/cjs/exported-related/index.js +33 -23
- package/cjs/exported-related/index.js.map +7 -0
- package/cjs/hooks/index.js +30 -13
- package/cjs/hooks/index.js.map +7 -0
- package/cjs/hooks/useExpandableOnClickHandler.js +55 -26
- package/cjs/hooks/useExpandableOnClickHandler.js.map +7 -0
- package/cjs/hooks/useKeyboardNavigation.js +62 -54
- package/cjs/hooks/useKeyboardNavigation.js.map +7 -0
- package/cjs/hooks/useOpenableOnClickHandler.js +55 -26
- package/cjs/hooks/useOpenableOnClickHandler.js.map +7 -0
- package/cjs/hooks/useSelectFirstBodyItem.js +46 -30
- package/cjs/hooks/useSelectFirstBodyItem.js.map +7 -0
- package/cjs/index.d.js +27 -2
- package/cjs/index.d.js.map +7 -0
- package/cjs/index.js +41 -30
- package/cjs/index.js.map +7 -0
- package/cjs/outOfTheBox/ItemControlledDrilldown/index.js +97 -103
- package/cjs/outOfTheBox/ItemControlledDrilldown/index.js.map +7 -0
- package/cjs/outOfTheBox/ItemControlledDrilldown/styled.js +49 -27
- package/cjs/outOfTheBox/ItemControlledDrilldown/styled.js.map +7 -0
- package/cjs/outOfTheBox/ItemHeader/index.js +96 -91
- package/cjs/outOfTheBox/ItemHeader/index.js.map +7 -0
- package/cjs/outOfTheBox/ItemHeader/styled.js +49 -22
- package/cjs/outOfTheBox/ItemHeader/styled.js.map +7 -0
- package/cjs/outOfTheBox/ItemLink/index.js +76 -65
- package/cjs/outOfTheBox/ItemLink/index.js.map +7 -0
- package/cjs/outOfTheBox/ItemLink/styled.js +41 -17
- package/cjs/outOfTheBox/ItemLink/styled.js.map +7 -0
- package/cjs/outOfTheBox/ItemSection/index.js +59 -63
- package/cjs/outOfTheBox/ItemSection/index.js.map +7 -0
- package/cjs/outOfTheBox/ItemSection/styled.js +53 -23
- package/cjs/outOfTheBox/ItemSection/styled.js.map +7 -0
- package/cjs/outOfTheBox/ItemSeparator/index.js +56 -45
- package/cjs/outOfTheBox/ItemSeparator/index.js.map +7 -0
- package/cjs/outOfTheBox/ItemSubmenu/index.js +96 -90
- package/cjs/outOfTheBox/ItemSubmenu/index.js.map +7 -0
- package/cjs/outOfTheBox/ItemSubmenu/styled.js +49 -22
- package/cjs/outOfTheBox/ItemSubmenu/styled.js.map +7 -0
- package/cjs/outOfTheBox/ItemTextLabel/index.js +51 -52
- package/cjs/outOfTheBox/ItemTextLabel/index.js.map +7 -0
- package/cjs/outOfTheBox/ItemTextLabel/styled.js +43 -23
- package/cjs/outOfTheBox/ItemTextLabel/styled.js.map +7 -0
- package/cjs/outOfTheBox/ItemUncontrolledDrilldown/index.js +107 -113
- package/cjs/outOfTheBox/ItemUncontrolledDrilldown/index.js.map +7 -0
- package/cjs/outOfTheBox/ItemUncontrolledDrilldown/styled.js +49 -27
- package/cjs/outOfTheBox/ItemUncontrolledDrilldown/styled.js.map +7 -0
- package/cjs/outOfTheBox/ItemWithDate/index.js +59 -54
- package/cjs/outOfTheBox/ItemWithDate/index.js.map +7 -0
- package/cjs/outOfTheBox/ItemWithDate/styled.js +49 -27
- package/cjs/outOfTheBox/ItemWithDate/styled.js.map +7 -0
- package/cjs/outOfTheBox/index.js +65 -50
- package/cjs/outOfTheBox/index.js.map +7 -0
- package/cjs/parts/LeftNavContent/index.js +75 -71
- package/cjs/parts/LeftNavContent/index.js.map +7 -0
- package/cjs/parts/LeftNavContent/styled.js +110 -50
- package/cjs/parts/LeftNavContent/styled.js.map +7 -0
- package/cjs/parts/LeftNavContentWithScrollbar/index.js +89 -79
- package/cjs/parts/LeftNavContentWithScrollbar/index.js.map +7 -0
- package/cjs/parts/LeftNavFooterItem/index.js +97 -80
- package/cjs/parts/LeftNavFooterItem/index.js.map +7 -0
- package/cjs/parts/LeftNavFooterItem/styled.js +89 -34
- package/cjs/parts/LeftNavFooterItem/styled.js.map +7 -0
- package/cjs/parts/LeftNavLoading/index.js +51 -33
- package/cjs/parts/LeftNavLoading/index.js.map +7 -0
- package/cjs/parts/OutOfTheBoxMapItem.js +49 -46
- package/cjs/parts/OutOfTheBoxMapItem.js.map +7 -0
- package/cjs/prop-types.js +58 -39
- package/cjs/prop-types.js.map +7 -0
- package/esm/LeftNavigation.js +17 -15
- package/esm/LeftNavigation.js.map +7 -0
- package/esm/LeftNavigationContext.js +15 -11
- package/esm/LeftNavigationContext.js.map +7 -0
- package/esm/common/getItemBackgroundStyle.js +20 -6
- package/esm/common/getItemBackgroundStyle.js.map +7 -0
- package/esm/common/getLeftBorderStyle.js +23 -6
- package/esm/common/getLeftBorderStyle.js.map +7 -0
- package/esm/common/getScrollbarStyle.js +28 -2
- package/esm/common/getScrollbarStyle.js.map +7 -0
- package/esm/common/index.js +5 -3
- package/esm/common/index.js.map +7 -0
- package/esm/configs/index.js +9 -2
- package/esm/configs/index.js.map +7 -0
- package/esm/configs/useLeftNavConfig.js +51 -63
- package/esm/configs/useLeftNavConfig.js.map +7 -0
- package/esm/configs/useLeftNavItems.js +33 -55
- package/esm/configs/useLeftNavItems.js.map +7 -0
- package/esm/configs/useLeftNavSmoothExpand.js +19 -18
- package/esm/configs/useLeftNavSmoothExpand.js.map +7 -0
- package/esm/exported-related/ChevronItem/index.js +13 -18
- package/esm/exported-related/ChevronItem/index.js.map +7 -0
- package/esm/exported-related/Icon/index.js +21 -24
- package/esm/exported-related/Icon/index.js.map +7 -0
- package/esm/exported-related/ItemRenderer/index.js +65 -80
- package/esm/exported-related/ItemRenderer/index.js.map +7 -0
- package/esm/exported-related/ItemRenderer/styled.js +56 -42
- package/esm/exported-related/ItemRenderer/styled.js.map +7 -0
- package/esm/exported-related/ItemRenderer/usePropsWithDefaults.js +27 -36
- package/esm/exported-related/ItemRenderer/usePropsWithDefaults.js.map +7 -0
- package/esm/exported-related/Notifications/index.js +57 -50
- package/esm/exported-related/Notifications/index.js.map +7 -0
- package/esm/exported-related/OpenWindowItem/index.js +20 -22
- package/esm/exported-related/OpenWindowItem/index.js.map +7 -0
- package/esm/exported-related/constants.js +24 -17
- package/esm/exported-related/constants.js.map +7 -0
- package/esm/exported-related/index.js +8 -6
- package/esm/exported-related/index.js.map +7 -0
- package/esm/hooks/index.js +5 -3
- package/esm/hooks/index.js.map +7 -0
- package/esm/hooks/useExpandableOnClickHandler.js +26 -22
- package/esm/hooks/useExpandableOnClickHandler.js.map +7 -0
- package/esm/hooks/useKeyboardNavigation.js +30 -47
- package/esm/hooks/useKeyboardNavigation.js.map +7 -0
- package/esm/hooks/useOpenableOnClickHandler.js +26 -22
- package/esm/hooks/useOpenableOnClickHandler.js.map +7 -0
- package/esm/hooks/useSelectFirstBodyItem.js +17 -26
- package/esm/hooks/useSelectFirstBodyItem.js.map +7 -0
- package/esm/index.d.js +2 -1
- package/esm/index.d.js.map +7 -0
- package/esm/index.js +12 -8
- package/esm/index.js.map +7 -0
- package/esm/outOfTheBox/ItemControlledDrilldown/index.js +62 -87
- package/esm/outOfTheBox/ItemControlledDrilldown/index.js.map +7 -0
- package/esm/outOfTheBox/ItemControlledDrilldown/styled.js +20 -17
- package/esm/outOfTheBox/ItemControlledDrilldown/styled.js.map +7 -0
- package/esm/outOfTheBox/ItemHeader/index.js +66 -80
- package/esm/outOfTheBox/ItemHeader/index.js.map +7 -0
- package/esm/outOfTheBox/ItemHeader/styled.js +20 -12
- package/esm/outOfTheBox/ItemHeader/styled.js.map +7 -0
- package/esm/outOfTheBox/ItemLink/index.js +47 -55
- package/esm/outOfTheBox/ItemLink/index.js.map +7 -0
- package/esm/outOfTheBox/ItemLink/styled.js +12 -8
- package/esm/outOfTheBox/ItemLink/styled.js.map +7 -0
- package/esm/outOfTheBox/ItemSection/index.js +30 -53
- package/esm/outOfTheBox/ItemSection/index.js.map +7 -0
- package/esm/outOfTheBox/ItemSection/styled.js +24 -13
- package/esm/outOfTheBox/ItemSection/styled.js.map +7 -0
- package/esm/outOfTheBox/ItemSeparator/index.js +27 -35
- package/esm/outOfTheBox/ItemSeparator/index.js.map +7 -0
- package/esm/outOfTheBox/ItemSubmenu/index.js +66 -79
- package/esm/outOfTheBox/ItemSubmenu/index.js.map +7 -0
- package/esm/outOfTheBox/ItemSubmenu/styled.js +20 -12
- package/esm/outOfTheBox/ItemSubmenu/styled.js.map +7 -0
- package/esm/outOfTheBox/ItemTextLabel/index.js +22 -43
- package/esm/outOfTheBox/ItemTextLabel/index.js.map +7 -0
- package/esm/outOfTheBox/ItemTextLabel/styled.js +14 -14
- package/esm/outOfTheBox/ItemTextLabel/styled.js.map +7 -0
- package/esm/outOfTheBox/ItemUncontrolledDrilldown/index.js +70 -95
- package/esm/outOfTheBox/ItemUncontrolledDrilldown/index.js.map +7 -0
- package/esm/outOfTheBox/ItemUncontrolledDrilldown/styled.js +20 -17
- package/esm/outOfTheBox/ItemUncontrolledDrilldown/styled.js.map +7 -0
- package/esm/outOfTheBox/ItemWithDate/index.js +30 -44
- package/esm/outOfTheBox/ItemWithDate/index.js.map +7 -0
- package/esm/outOfTheBox/ItemWithDate/styled.js +20 -17
- package/esm/outOfTheBox/ItemWithDate/styled.js.map +7 -0
- package/esm/outOfTheBox/index.js +25 -34
- package/esm/outOfTheBox/index.js.map +7 -0
- package/esm/parts/LeftNavContent/index.js +54 -64
- package/esm/parts/LeftNavContent/index.js.map +7 -0
- package/esm/parts/LeftNavContent/styled.js +81 -36
- package/esm/parts/LeftNavContent/styled.js.map +7 -0
- package/esm/parts/LeftNavContentWithScrollbar/index.js +56 -64
- package/esm/parts/LeftNavContentWithScrollbar/index.js.map +7 -0
- package/esm/parts/LeftNavFooterItem/index.js +73 -68
- package/esm/parts/LeftNavFooterItem/index.js.map +7 -0
- package/esm/parts/LeftNavFooterItem/styled.js +63 -24
- package/esm/parts/LeftNavFooterItem/styled.js.map +7 -0
- package/esm/parts/LeftNavLoading/index.js +22 -22
- package/esm/parts/LeftNavLoading/index.js.map +7 -0
- package/esm/parts/OutOfTheBoxMapItem.js +19 -35
- package/esm/parts/OutOfTheBoxMapItem.js.map +7 -0
- package/esm/prop-types.js +26 -29
- package/esm/prop-types.js.map +7 -0
- package/package.json +6 -6
- package/types/LeftNavigationContext.d.ts +4 -4
- package/types/configs/useLeftNavSmoothExpand.d.ts +3 -3
- package/types/hooks/useSelectFirstBodyItem.d.ts +1 -1
- package/types/index.d.d.ts +5 -2
|
@@ -1,72 +1,42 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import { useEffect, useMemo, useCallback } from 'react';
|
|
12
|
-
import Grid from '@elliemae/ds-grid';
|
|
13
|
-
import { SimpleTruncatedTooltipText } from '@elliemae/ds-truncated-tooltip-text';
|
|
14
|
-
import { ArrowheadDown, ArrowheadRight } from '@elliemae/ds-icons';
|
|
15
|
-
import { ITEM_TYPES } from '../../exported-related/constants.js';
|
|
16
|
-
import { ItemRenderer } from '../../exported-related/ItemRenderer/index.js';
|
|
17
|
-
import 'react/jsx-runtime';
|
|
18
|
-
import 'styled-components';
|
|
19
|
-
import { StyledLabel, StyledDate } from './styled.js';
|
|
20
|
-
import { ItemSeparator } from '../ItemSeparator/index.js';
|
|
21
|
-
import { ItemWithDate } from '../ItemWithDate/index.js';
|
|
22
|
-
import { ItemTextLabel } from '../ItemTextLabel/index.js';
|
|
23
|
-
|
|
24
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
25
|
-
|
|
26
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
27
|
-
// Subitem mapping
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import React2, { useMemo, useCallback, useEffect } from "react";
|
|
3
|
+
import Grid from "@elliemae/ds-grid";
|
|
4
|
+
import { SimpleTruncatedTooltipText } from "@elliemae/ds-truncated-tooltip-text";
|
|
5
|
+
import { ArrowheadDown, ArrowheadRight } from "@elliemae/ds-icons";
|
|
6
|
+
import { ItemRenderer, ITEM_TYPES } from "../../exported-related/index";
|
|
7
|
+
import { StyledLabel, StyledDate } from "./styled";
|
|
8
|
+
import { ItemSeparator } from "../ItemSeparator";
|
|
9
|
+
import { ItemWithDate } from "../ItemWithDate";
|
|
10
|
+
import { ItemTextLabel } from "../ItemTextLabel";
|
|
28
11
|
const outOfTheBoxSubitemsComponents = {
|
|
29
12
|
[ITEM_TYPES.LEFT_NAV_ITEM_SEPARATOR]: ItemSeparator,
|
|
30
13
|
[ITEM_TYPES.LEFT_NAV_ITEM_WITH_DATE]: ItemWithDate,
|
|
31
14
|
[ITEM_TYPES.LEFT_NAV_ITEM_TEXT_LABEL]: ItemTextLabel
|
|
32
15
|
};
|
|
33
|
-
|
|
34
|
-
const OutOfTheBoxMapSubitem = props => {
|
|
16
|
+
const OutOfTheBoxMapSubitem = (props) => {
|
|
35
17
|
const {
|
|
36
18
|
item,
|
|
37
|
-
item: {
|
|
38
|
-
type,
|
|
39
|
-
Component
|
|
40
|
-
},
|
|
19
|
+
item: { type, Component },
|
|
41
20
|
ctx
|
|
42
21
|
} = props;
|
|
43
|
-
|
|
44
|
-
if (typeof type === 'string' && !!outOfTheBoxSubitemsComponents[type]) {
|
|
45
|
-
var _item$itemOpts$indent, _item$itemOpts;
|
|
46
|
-
|
|
22
|
+
if (typeof type === "string" && !!outOfTheBoxSubitemsComponents[type]) {
|
|
47
23
|
const OutOfTheBoxComponent = outOfTheBoxSubitemsComponents[type];
|
|
48
|
-
const currentIndent =
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
itemOpts:
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
});
|
|
55
|
-
|
|
56
|
-
return /*#__PURE__*/_jsx(OutOfTheBoxComponent, {
|
|
24
|
+
const currentIndent = item.itemOpts?.indent ?? 0;
|
|
25
|
+
const newItem = {
|
|
26
|
+
...item,
|
|
27
|
+
itemOpts: { ...item.itemOpts, indent: currentIndent + 44 }
|
|
28
|
+
};
|
|
29
|
+
return /* @__PURE__ */ React2.createElement(OutOfTheBoxComponent, {
|
|
57
30
|
item: newItem,
|
|
58
|
-
ctx
|
|
31
|
+
ctx
|
|
59
32
|
});
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
item: item,
|
|
65
|
-
ctx: ctx
|
|
33
|
+
}
|
|
34
|
+
return /* @__PURE__ */ React2.createElement(Component, {
|
|
35
|
+
item,
|
|
36
|
+
ctx
|
|
66
37
|
});
|
|
67
38
|
};
|
|
68
|
-
|
|
69
|
-
const ItemUncontrolledDrilldown = props => {
|
|
39
|
+
const ItemUncontrolledDrilldown = (props) => {
|
|
70
40
|
const {
|
|
71
41
|
item,
|
|
72
42
|
item: {
|
|
@@ -85,78 +55,83 @@ const ItemUncontrolledDrilldown = props => {
|
|
|
85
55
|
},
|
|
86
56
|
ctx,
|
|
87
57
|
ctx: {
|
|
88
|
-
leftNavProps: {
|
|
89
|
-
labelOverflow: leftNavLabelOverflow
|
|
90
|
-
},
|
|
58
|
+
leftNavProps: { labelOverflow: leftNavLabelOverflow },
|
|
91
59
|
openedDrilldowns,
|
|
92
60
|
setOpenedDrilldowns
|
|
93
61
|
}
|
|
94
|
-
} = props;
|
|
95
|
-
|
|
62
|
+
} = props;
|
|
96
63
|
useEffect(() => {
|
|
97
|
-
if (startOpened)
|
|
64
|
+
if (startOpened)
|
|
65
|
+
setOpenedDrilldowns([...openedDrilldowns, dsId]);
|
|
98
66
|
}, []);
|
|
99
67
|
const opened = openedDrilldowns.includes(dsId);
|
|
100
68
|
const labelOverflow = itemLabelOverflow || leftNavLabelOverflow;
|
|
101
69
|
const arrowIcon = useMemo(() => {
|
|
102
70
|
const Component = opened ? ArrowheadDown : ArrowheadRight;
|
|
103
|
-
return
|
|
71
|
+
return /* @__PURE__ */ React2.createElement(Component, {
|
|
104
72
|
width: "24px",
|
|
105
73
|
height: "18px",
|
|
106
|
-
color: [
|
|
74
|
+
color: ["brand-primary", "800"]
|
|
107
75
|
});
|
|
108
|
-
}, [opened]);
|
|
109
|
-
|
|
76
|
+
}, [opened]);
|
|
110
77
|
const subitems = useMemo(() => {
|
|
111
|
-
if (!opened || !items)
|
|
112
|
-
|
|
78
|
+
if (!opened || !items)
|
|
79
|
+
return [];
|
|
80
|
+
return items.map((subitem) => /* @__PURE__ */ React2.createElement(OutOfTheBoxMapSubitem, {
|
|
113
81
|
item: subitem,
|
|
114
|
-
ctx
|
|
115
|
-
|
|
82
|
+
ctx,
|
|
83
|
+
key: subitem.dsId
|
|
84
|
+
}));
|
|
116
85
|
}, [items, opened]);
|
|
117
86
|
const handleOnClick = useCallback(() => {
|
|
118
|
-
if (opened)
|
|
87
|
+
if (opened)
|
|
88
|
+
setOpenedDrilldowns(openedDrilldowns.filter((openedDrilldown) => openedDrilldown !== dsId));
|
|
89
|
+
else
|
|
90
|
+
setOpenedDrilldowns([...openedDrilldowns, dsId]);
|
|
119
91
|
}, [opened, setOpenedDrilldowns, openedDrilldowns]);
|
|
120
|
-
return
|
|
121
|
-
item:
|
|
122
|
-
|
|
92
|
+
return /* @__PURE__ */ React2.createElement(ItemRenderer, {
|
|
93
|
+
item: {
|
|
94
|
+
...item,
|
|
95
|
+
itemOpts: {
|
|
123
96
|
ariaExpanded: opened,
|
|
124
|
-
ariaRole:
|
|
125
|
-
|
|
97
|
+
ariaRole: "menuitem",
|
|
98
|
+
...item.itemOpts,
|
|
126
99
|
openable: !opened,
|
|
127
100
|
closable: opened
|
|
128
|
-
}
|
|
101
|
+
},
|
|
129
102
|
CollapsedComponent: null
|
|
130
|
-
}
|
|
131
|
-
subitems
|
|
103
|
+
},
|
|
104
|
+
subitems,
|
|
132
105
|
minHeight: "32px",
|
|
133
106
|
paddingTop: "8px",
|
|
134
107
|
onClick: handleOnClick
|
|
135
|
-
},
|
|
108
|
+
}, /* @__PURE__ */ React2.createElement(Grid, {
|
|
136
109
|
pl: "xxs",
|
|
137
110
|
mt: "-2px"
|
|
138
|
-
},
|
|
111
|
+
}, arrowIcon), /* @__PURE__ */ React2.createElement(StyledLabel, {
|
|
139
112
|
pb: "xxxs",
|
|
140
|
-
"data-testid": labelDataTestId ||
|
|
141
|
-
labelOverflow
|
|
142
|
-
labelBold
|
|
143
|
-
labelColor
|
|
144
|
-
},
|
|
113
|
+
"data-testid": labelDataTestId || "leftnav-list-item-label",
|
|
114
|
+
labelOverflow,
|
|
115
|
+
labelBold,
|
|
116
|
+
labelColor
|
|
117
|
+
}, labelOverflow === "truncate" ? /* @__PURE__ */ React2.createElement(SimpleTruncatedTooltipText, {
|
|
145
118
|
value: label,
|
|
146
119
|
placement: "bottom-start"
|
|
147
|
-
}) : label),
|
|
120
|
+
}) : label), /* @__PURE__ */ React2.createElement(Grid, {
|
|
148
121
|
pr: "xxs2",
|
|
149
|
-
cols: [
|
|
122
|
+
cols: ["auto", "auto"],
|
|
150
123
|
alignItems: "center"
|
|
151
|
-
},
|
|
124
|
+
}, /* @__PURE__ */ React2.createElement(StyledDate, {
|
|
152
125
|
ml: "xxs",
|
|
153
126
|
"data-testid": "leftnav-list-item-date"
|
|
154
|
-
},
|
|
155
|
-
pl: RightComponent ?
|
|
156
|
-
},
|
|
157
|
-
ctx
|
|
158
|
-
item
|
|
127
|
+
}, labelRightSection), /* @__PURE__ */ React2.createElement(Grid, {
|
|
128
|
+
pl: RightComponent ? "xxs" : "0px"
|
|
129
|
+
}, RightComponent && /* @__PURE__ */ React2.createElement(RightComponent, {
|
|
130
|
+
ctx,
|
|
131
|
+
item
|
|
159
132
|
}))));
|
|
160
133
|
};
|
|
161
|
-
|
|
162
|
-
|
|
134
|
+
export {
|
|
135
|
+
ItemUncontrolledDrilldown
|
|
136
|
+
};
|
|
137
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/outOfTheBox/ItemUncontrolledDrilldown/index.tsx"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable max-lines */\nimport React, { useMemo, useCallback, useEffect } from 'react';\nimport Grid from '@elliemae/ds-grid';\nimport { SimpleTruncatedTooltipText } from '@elliemae/ds-truncated-tooltip-text';\nimport { ArrowheadDown, ArrowheadRight } from '@elliemae/ds-icons';\nimport { ItemRenderer, ITEM_TYPES } from '../../exported-related/index';\nimport { StyledLabel, StyledDate } from './styled';\nimport { ItemSeparator } from '../ItemSeparator';\nimport { ItemWithDate } from '../ItemWithDate';\nimport { ItemTextLabel } from '../ItemTextLabel';\nimport type { ComponentProps } from '../../index.d';\n\n// Subitem mapping\nconst outOfTheBoxSubitemsComponents: Record<string, React.ComponentType<ComponentProps>> = {\n [ITEM_TYPES.LEFT_NAV_ITEM_SEPARATOR]: ItemSeparator,\n [ITEM_TYPES.LEFT_NAV_ITEM_WITH_DATE]: ItemWithDate,\n [ITEM_TYPES.LEFT_NAV_ITEM_TEXT_LABEL]: ItemTextLabel,\n};\n\nconst OutOfTheBoxMapSubitem = (props: ComponentProps): JSX.Element => {\n const {\n item,\n item: { type, Component },\n ctx,\n } = props;\n\n if (typeof type === 'string' && !!outOfTheBoxSubitemsComponents[type]) {\n const OutOfTheBoxComponent = outOfTheBoxSubitemsComponents[type];\n const currentIndent = item.itemOpts?.indent ?? 0;\n const newItem = {\n ...item,\n itemOpts: { ...item.itemOpts, indent: currentIndent + 44 },\n };\n return <OutOfTheBoxComponent item={newItem} ctx={ctx} />;\n }\n // we expect an error to be threw if Component is not defined and type is not a valid out-of-the-box...\n return <Component item={item} ctx={ctx} />;\n};\n\nexport const ItemUncontrolledDrilldown = (props: ComponentProps): JSX.Element => {\n const {\n item,\n item: {\n dsId,\n itemOpts: {\n label,\n RightComponent,\n labelRightSection,\n labelOverflow: itemLabelOverflow,\n labelBold,\n labelColor,\n startOpened,\n items,\n labelDataTestId,\n },\n },\n ctx,\n ctx: {\n leftNavProps: { labelOverflow: leftNavLabelOverflow },\n openedDrilldowns,\n setOpenedDrilldowns,\n },\n } = props;\n\n // Start opened functionality\n useEffect(() => {\n if (startOpened) setOpenedDrilldowns([...openedDrilldowns, dsId]);\n }, []);\n\n const opened = openedDrilldowns.includes(dsId);\n\n const labelOverflow = itemLabelOverflow || leftNavLabelOverflow;\n\n const arrowIcon = useMemo(() => {\n const Component = opened ? ArrowheadDown : ArrowheadRight;\n return <Component width=\"24px\" height=\"18px\" color={['brand-primary', '800']} />;\n }, [opened]);\n\n // Array of subitems\n const subitems = useMemo(() => {\n if (!opened || !items) return [];\n return items.map((subitem) => <OutOfTheBoxMapSubitem item={subitem} ctx={ctx} key={subitem.dsId} />);\n }, [items, opened]);\n\n const handleOnClick = useCallback(() => {\n if (opened) setOpenedDrilldowns(openedDrilldowns.filter((openedDrilldown) => openedDrilldown !== dsId));\n else setOpenedDrilldowns([...openedDrilldowns, dsId]);\n }, [opened, setOpenedDrilldowns, openedDrilldowns]);\n\n return (\n <ItemRenderer\n item={{\n ...item,\n itemOpts: {\n ariaExpanded: opened,\n ariaRole: 'menuitem',\n ...item.itemOpts,\n openable: !opened,\n closable: opened,\n },\n CollapsedComponent: null,\n }}\n subitems={subitems}\n minHeight=\"32px\"\n paddingTop=\"8px\"\n onClick={handleOnClick}\n >\n <Grid pl=\"xxs\" mt=\"-2px\">\n {arrowIcon}\n </Grid>\n <StyledLabel\n pb=\"xxxs\"\n data-testid={labelDataTestId || 'leftnav-list-item-label'}\n labelOverflow={labelOverflow}\n labelBold={labelBold}\n labelColor={labelColor}\n >\n {labelOverflow === 'truncate' ? <SimpleTruncatedTooltipText value={label} placement=\"bottom-start\" /> : label}\n </StyledLabel>\n <Grid pr=\"xxs2\" cols={['auto', 'auto']} alignItems=\"center\">\n <StyledDate ml=\"xxs\" data-testid=\"leftnav-list-item-date\">\n {labelRightSection}\n </StyledDate>\n <Grid pl={RightComponent ? 'xxs' : '0px'}>{RightComponent && <RightComponent ctx={ctx} item={item} />}</Grid>\n </Grid>\n </ItemRenderer>\n );\n};\n"],
|
|
5
|
+
"mappings": "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",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -1,17 +1,20 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
const StyledLabel =
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import styled from "styled-components";
|
|
3
|
+
import Grid from "@elliemae/ds-grid";
|
|
4
|
+
const StyledLabel = styled(Grid)`
|
|
5
|
+
font-size: 13px;
|
|
6
|
+
font-weight: ${(props) => props.labelBold ? props.theme.fontWeights.semibold : props.theme.fontWeights.regular};
|
|
7
|
+
color: ${({ labelColor, theme }) => labelColor ? theme.colors[labelColor[0]][labelColor[1]] : theme.colors.neutral[800]};
|
|
8
|
+
line-height: 14px;
|
|
9
|
+
word-break: ${(props) => props.labelOverflow === "wrapAll" ? "break-all" : "normal"};
|
|
10
|
+
`;
|
|
11
|
+
const StyledDate = styled(Grid)`
|
|
12
|
+
font-size: 12px;
|
|
13
|
+
color: ${(props) => props.theme.colors.neutral[600]};
|
|
14
|
+
line-height: 14px;
|
|
15
|
+
`;
|
|
16
|
+
export {
|
|
17
|
+
StyledDate,
|
|
18
|
+
StyledLabel
|
|
19
|
+
};
|
|
20
|
+
//# sourceMappingURL=styled.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/outOfTheBox/ItemUncontrolledDrilldown/styled.tsx"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import styled from 'styled-components';\nimport Grid from '@elliemae/ds-grid';\n\nexport const StyledLabel = styled(Grid)<{ labelBold: boolean }>`\n font-size: 13px;\n font-weight: ${(props) =>\n props.labelBold\n ? props.theme.fontWeights.semibold\n : props.theme.fontWeights.regular};\n color: ${({ labelColor, theme }) =>\n labelColor\n ? theme.colors[labelColor[0]][labelColor[1]]\n : theme.colors.neutral[800]};\n line-height: 14px;\n word-break: ${(props) =>\n props.labelOverflow === 'wrapAll' ? 'break-all' : 'normal'};\n`;\n\nexport const StyledDate = styled(Grid)`\n font-size: 12px;\n color: ${(props) => props.theme.colors.neutral[600]};\n line-height: 14px;\n`;\n"],
|
|
5
|
+
"mappings": "AAAA;ACAA;AACA;AAEO,MAAM,cAAc,OAAO;AAAA;AAAA,iBAEjB,CAAC,UACd,MAAM,YACF,MAAM,MAAM,YAAY,WACxB,MAAM,MAAM,YAAY;AAAA,WACrB,CAAC,EAAE,YAAY,YACtB,aACI,MAAM,OAAO,WAAW,IAAI,WAAW,MACvC,MAAM,OAAO,QAAQ;AAAA;AAAA,gBAEb,CAAC,UACb,MAAM,kBAAkB,YAAY,cAAc;AAAA;AAG/C,MAAM,aAAa,OAAO;AAAA;AAAA,WAEtB,CAAC,UAAU,MAAM,MAAM,OAAO,QAAQ;AAAA;AAAA;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -1,25 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
|
|
8
|
-
import 'react';
|
|
9
|
-
import Grid from '@elliemae/ds-grid';
|
|
10
|
-
import { SimpleTruncatedTooltipText } from '@elliemae/ds-truncated-tooltip-text';
|
|
11
|
-
import { ItemRenderer } from '../../exported-related/ItemRenderer/index.js';
|
|
12
|
-
import '@elliemae/ds-icons';
|
|
13
|
-
import 'react/jsx-runtime';
|
|
14
|
-
import 'styled-components';
|
|
15
|
-
import { StyledLabel, StyledDate } from './styled.js';
|
|
16
|
-
|
|
17
|
-
var _div;
|
|
18
|
-
|
|
19
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
20
|
-
|
|
21
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
22
|
-
const ItemWithDate = props => {
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import React2 from "react";
|
|
3
|
+
import Grid from "@elliemae/ds-grid";
|
|
4
|
+
import { SimpleTruncatedTooltipText } from "@elliemae/ds-truncated-tooltip-text";
|
|
5
|
+
import { ItemRenderer } from "../../exported-related/index";
|
|
6
|
+
import { StyledLabel, StyledDate } from "./styled";
|
|
7
|
+
const ItemWithDate = (props) => {
|
|
23
8
|
const {
|
|
24
9
|
item,
|
|
25
10
|
item: {
|
|
@@ -35,42 +20,43 @@ const ItemWithDate = props => {
|
|
|
35
20
|
},
|
|
36
21
|
ctx,
|
|
37
22
|
ctx: {
|
|
38
|
-
leftNavProps: {
|
|
39
|
-
labelOverflow: leftNavLabelOverflow
|
|
40
|
-
}
|
|
23
|
+
leftNavProps: { labelOverflow: leftNavLabelOverflow }
|
|
41
24
|
}
|
|
42
25
|
} = props;
|
|
43
26
|
const labelOverflow = itemLabelOverflow || leftNavLabelOverflow;
|
|
44
|
-
return
|
|
45
|
-
item:
|
|
27
|
+
return /* @__PURE__ */ React2.createElement(ItemRenderer, {
|
|
28
|
+
item: {
|
|
29
|
+
...item,
|
|
46
30
|
CollapsedComponent: null
|
|
47
|
-
}
|
|
31
|
+
},
|
|
48
32
|
minHeight: "32px",
|
|
49
33
|
paddingTop: "8px"
|
|
50
|
-
},
|
|
34
|
+
}, " ", /* @__PURE__ */ React2.createElement("div", null), /* @__PURE__ */ React2.createElement(StyledLabel, {
|
|
51
35
|
pl: "xxs",
|
|
52
36
|
pb: "xxxs",
|
|
53
|
-
"data-testid": labelDataTestId ||
|
|
54
|
-
labelOverflow
|
|
55
|
-
labelBold
|
|
56
|
-
labelColor
|
|
57
|
-
},
|
|
37
|
+
"data-testid": labelDataTestId || "leftnav-list-item-label",
|
|
38
|
+
labelOverflow,
|
|
39
|
+
labelBold,
|
|
40
|
+
labelColor
|
|
41
|
+
}, labelOverflow === "truncate" ? /* @__PURE__ */ React2.createElement(SimpleTruncatedTooltipText, {
|
|
58
42
|
value: label,
|
|
59
43
|
placement: "bottom-start"
|
|
60
|
-
}) : label),
|
|
44
|
+
}) : label), /* @__PURE__ */ React2.createElement(Grid, {
|
|
61
45
|
pr: "xxs2",
|
|
62
|
-
cols: [
|
|
46
|
+
cols: ["auto", "auto"],
|
|
63
47
|
alignItems: "center"
|
|
64
|
-
},
|
|
48
|
+
}, /* @__PURE__ */ React2.createElement(StyledDate, {
|
|
65
49
|
ml: "xxs",
|
|
66
50
|
"data-testid": "leftnav-list-item-date"
|
|
67
|
-
},
|
|
68
|
-
pl: RightComponent ?
|
|
51
|
+
}, labelRightSection), /* @__PURE__ */ React2.createElement(Grid, {
|
|
52
|
+
pl: RightComponent ? "xxs" : "0px",
|
|
69
53
|
"data-testid": "leftnav-right-component"
|
|
70
|
-
},
|
|
71
|
-
ctx
|
|
72
|
-
item
|
|
54
|
+
}, RightComponent && /* @__PURE__ */ React2.createElement(RightComponent, {
|
|
55
|
+
ctx,
|
|
56
|
+
item
|
|
73
57
|
}))));
|
|
74
58
|
};
|
|
75
|
-
|
|
76
|
-
|
|
59
|
+
export {
|
|
60
|
+
ItemWithDate
|
|
61
|
+
};
|
|
62
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/outOfTheBox/ItemWithDate/index.tsx"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport Grid from '@elliemae/ds-grid';\nimport { SimpleTruncatedTooltipText } from '@elliemae/ds-truncated-tooltip-text';\nimport { ItemRenderer } from '../../exported-related/index';\nimport type { ComponentProps } from '../../index.d';\nimport { StyledLabel, StyledDate } from './styled';\n\nexport const ItemWithDate = (props: ComponentProps): JSX.Element => {\n const {\n item,\n item: {\n itemOpts: {\n label,\n RightComponent,\n labelRightSection,\n labelOverflow: itemLabelOverflow,\n labelBold,\n labelColor,\n labelDataTestId,\n },\n },\n ctx,\n ctx: {\n leftNavProps: { labelOverflow: leftNavLabelOverflow },\n },\n } = props;\n\n const labelOverflow = itemLabelOverflow || leftNavLabelOverflow;\n\n return (\n <ItemRenderer\n item={{\n ...item,\n CollapsedComponent: null,\n }}\n minHeight=\"32px\"\n paddingTop=\"8px\"\n >\n {/* Empty LeftComponent */} <div />\n <StyledLabel\n pl=\"xxs\"\n pb=\"xxxs\"\n data-testid={labelDataTestId || 'leftnav-list-item-label'}\n labelOverflow={labelOverflow}\n labelBold={labelBold}\n labelColor={labelColor}\n >\n {labelOverflow === 'truncate' ? <SimpleTruncatedTooltipText value={label} placement=\"bottom-start\" /> : label}\n </StyledLabel>\n <Grid pr=\"xxs2\" cols={['auto', 'auto']} alignItems=\"center\">\n <StyledDate ml=\"xxs\" data-testid=\"leftnav-list-item-date\">\n {labelRightSection}\n </StyledDate>\n <Grid pl={RightComponent ? 'xxs' : '0px'} data-testid=\"leftnav-right-component\">\n {RightComponent && <RightComponent ctx={ctx} item={item} />}\n </Grid>\n </Grid>\n </ItemRenderer>\n );\n};\n"],
|
|
5
|
+
"mappings": "AAAA;ACAA;AACA;AACA;AACA;AAEA;AAEO,MAAM,eAAe,CAAC,UAAuC;AAClE,QAAM;AAAA,IACJ;AAAA,IACA,MAAM;AAAA,MACJ,UAAU;AAAA,QACR;AAAA,QACA;AAAA,QACA;AAAA,QACA,eAAe;AAAA,QACf;AAAA,QACA;AAAA,QACA;AAAA;AAAA;AAAA,IAGJ;AAAA,IACA,KAAK;AAAA,MACH,cAAc,EAAE,eAAe;AAAA;AAAA,MAE/B;AAEJ,QAAM,gBAAgB,qBAAqB;AAE3C,SACE,qCAAC,cAAD;AAAA,IACE,MAAM;AAAA,SACD;AAAA,MACH,oBAAoB;AAAA;AAAA,IAEtB,WAAU;AAAA,IACV,YAAW;AAAA,KAEgB,KAAC,qCAAC,OAAD,OAC5B,qCAAC,aAAD;AAAA,IACE,IAAG;AAAA,IACH,IAAG;AAAA,IACH,eAAa,mBAAmB;AAAA,IAChC;AAAA,IACA;AAAA,IACA;AAAA,KAEC,kBAAkB,aAAa,qCAAC,4BAAD;AAAA,IAA4B,OAAO;AAAA,IAAO,WAAU;AAAA,OAAoB,QAE1G,qCAAC,MAAD;AAAA,IAAM,IAAG;AAAA,IAAO,MAAM,CAAC,QAAQ;AAAA,IAAS,YAAW;AAAA,KACjD,qCAAC,YAAD;AAAA,IAAY,IAAG;AAAA,IAAM,eAAY;AAAA,KAC9B,oBAEH,qCAAC,MAAD;AAAA,IAAM,IAAI,iBAAiB,QAAQ;AAAA,IAAO,eAAY;AAAA,KACnD,kBAAkB,qCAAC,gBAAD;AAAA,IAAgB;AAAA,IAAU;AAAA;AAAA;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -1,17 +1,20 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
const StyledLabel =
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import styled from "styled-components";
|
|
3
|
+
import Grid from "@elliemae/ds-grid";
|
|
4
|
+
const StyledLabel = styled(Grid)`
|
|
5
|
+
font-size: 13px;
|
|
6
|
+
font-weight: ${(props) => props.labelBold ? props.theme.fontWeights.semibold : props.theme.fontWeights.regular};
|
|
7
|
+
color: ${({ labelColor, theme }) => labelColor ? theme.colors[labelColor[0]][labelColor[1]] : theme.colors.neutral[800]};
|
|
8
|
+
line-height: 14px;
|
|
9
|
+
word-break: ${(props) => props.labelOverflow === "wrapAll" ? "break-all" : "normal"};
|
|
10
|
+
`;
|
|
11
|
+
const StyledDate = styled(Grid)`
|
|
12
|
+
font-size: 12px;
|
|
13
|
+
color: ${(props) => props.theme.colors.neutral[600]};
|
|
14
|
+
line-height: 14px;
|
|
15
|
+
`;
|
|
16
|
+
export {
|
|
17
|
+
StyledDate,
|
|
18
|
+
StyledLabel
|
|
19
|
+
};
|
|
20
|
+
//# sourceMappingURL=styled.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/outOfTheBox/ItemWithDate/styled.tsx"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import styled from 'styled-components';\nimport Grid from '@elliemae/ds-grid';\n\nexport const StyledLabel = styled(Grid)<{ labelBold: boolean }>`\n font-size: 13px;\n font-weight: ${(props) =>\n props.labelBold\n ? props.theme.fontWeights.semibold\n : props.theme.fontWeights.regular};\n color: ${({ labelColor, theme }) =>\n labelColor\n ? theme.colors[labelColor[0]][labelColor[1]]\n : theme.colors.neutral[800]};\n line-height: 14px;\n word-break: ${(props) =>\n props.labelOverflow === 'wrapAll' ? 'break-all' : 'normal'};\n`;\n\nexport const StyledDate = styled(Grid)`\n font-size: 12px;\n color: ${(props) => props.theme.colors.neutral[600]};\n line-height: 14px;\n`;\n"],
|
|
5
|
+
"mappings": "AAAA;ACAA;AACA;AAEO,MAAM,cAAc,OAAO;AAAA;AAAA,iBAEjB,CAAC,UACd,MAAM,YACF,MAAM,MAAM,YAAY,WACxB,MAAM,MAAM,YAAY;AAAA,WACrB,CAAC,EAAE,YAAY,YACtB,aACI,MAAM,OAAO,WAAW,IAAI,WAAW,MACvC,MAAM,OAAO,QAAQ;AAAA;AAAA,gBAEb,CAAC,UACb,MAAM,kBAAkB,YAAY,cAAc;AAAA;AAG/C,MAAM,aAAa,OAAO;AAAA;AAAA,WAEtB,CAAC,UAAU,MAAM,MAAM,OAAO,QAAQ;AAAA;AAAA;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
package/esm/outOfTheBox/index.js
CHANGED
|
@@ -1,35 +1,23 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
export
|
|
16
|
-
|
|
17
|
-
export
|
|
18
|
-
|
|
19
|
-
export
|
|
20
|
-
|
|
21
|
-
export { ItemLink } from './ItemLink/index.js';
|
|
22
|
-
import { ItemSection } from './ItemSection/index.js';
|
|
23
|
-
export { ItemSection } from './ItemSection/index.js';
|
|
24
|
-
import { ItemSeparator } from './ItemSeparator/index.js';
|
|
25
|
-
export { ItemSeparator } from './ItemSeparator/index.js';
|
|
26
|
-
import { ItemSubmenu } from './ItemSubmenu/index.js';
|
|
27
|
-
export { ItemSubmenu } from './ItemSubmenu/index.js';
|
|
28
|
-
import { ItemTextLabel } from './ItemTextLabel/index.js';
|
|
29
|
-
export { ItemTextLabel } from './ItemTextLabel/index.js';
|
|
30
|
-
import { ItemWithDate } from './ItemWithDate/index.js';
|
|
31
|
-
export { ItemWithDate } from './ItemWithDate/index.js';
|
|
32
|
-
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { ITEM_TYPES } from "../exported-related";
|
|
3
|
+
import { ItemControlledDrilldown } from "./ItemControlledDrilldown";
|
|
4
|
+
import { ItemUncontrolledDrilldown } from "./ItemUncontrolledDrilldown";
|
|
5
|
+
import { ItemHeader } from "./ItemHeader";
|
|
6
|
+
import { ItemLink } from "./ItemLink";
|
|
7
|
+
import { ItemSection } from "./ItemSection";
|
|
8
|
+
import { ItemSeparator } from "./ItemSeparator";
|
|
9
|
+
import { ItemSubmenu } from "./ItemSubmenu";
|
|
10
|
+
import { ItemTextLabel } from "./ItemTextLabel";
|
|
11
|
+
import { ItemWithDate } from "./ItemWithDate";
|
|
12
|
+
export * from "./ItemControlledDrilldown";
|
|
13
|
+
export * from "./ItemUncontrolledDrilldown";
|
|
14
|
+
export * from "./ItemHeader";
|
|
15
|
+
export * from "./ItemLink";
|
|
16
|
+
export * from "./ItemSection";
|
|
17
|
+
export * from "./ItemSeparator";
|
|
18
|
+
export * from "./ItemSubmenu";
|
|
19
|
+
export * from "./ItemTextLabel";
|
|
20
|
+
export * from "./ItemWithDate";
|
|
33
21
|
const outOfTheBoxTypes = Object.values(ITEM_TYPES);
|
|
34
22
|
const {
|
|
35
23
|
LEFT_NAV_ITEM_CONTROLLED_DRILLDOWN,
|
|
@@ -53,5 +41,8 @@ const outOfTheBoxComponents = {
|
|
|
53
41
|
[LEFT_NAV_ITEM_TEXT_LABEL]: ItemTextLabel,
|
|
54
42
|
[LEFT_NAV_ITEM_WITH_DATE]: ItemWithDate
|
|
55
43
|
};
|
|
56
|
-
|
|
57
|
-
|
|
44
|
+
export {
|
|
45
|
+
outOfTheBoxComponents,
|
|
46
|
+
outOfTheBoxTypes
|
|
47
|
+
};
|
|
48
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/outOfTheBox/index.tsx"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { ComponentProps } from '../index.d';\nimport { ITEM_TYPES } from '../exported-related';\nimport { ItemControlledDrilldown } from './ItemControlledDrilldown';\nimport { ItemUncontrolledDrilldown } from './ItemUncontrolledDrilldown';\nimport { ItemHeader } from './ItemHeader';\nimport { ItemLink } from './ItemLink';\nimport { ItemSection } from './ItemSection';\nimport { ItemSeparator } from './ItemSeparator';\nimport { ItemSubmenu } from './ItemSubmenu';\nimport { ItemTextLabel } from './ItemTextLabel';\nimport { ItemWithDate } from './ItemWithDate';\n\nexport * from './ItemControlledDrilldown';\nexport * from './ItemUncontrolledDrilldown';\nexport * from './ItemHeader';\nexport * from './ItemLink';\nexport * from './ItemSection';\nexport * from './ItemSeparator';\nexport * from './ItemSubmenu';\nexport * from './ItemTextLabel';\nexport * from './ItemWithDate';\n\nexport const outOfTheBoxTypes = Object.values(ITEM_TYPES);\nconst {\n LEFT_NAV_ITEM_CONTROLLED_DRILLDOWN,\n LEFT_NAV_ITEM_UNCONTROLLED_DRILLDOWN,\n LEFT_NAV_ITEM_HEADER,\n LEFT_NAV_ITEM_LINK,\n LEFT_NAV_ITEM_SECTION,\n LEFT_NAV_ITEM_SEPARATOR,\n LEFT_NAV_ITEM_SUBMENU,\n LEFT_NAV_ITEM_TEXT_LABEL,\n LEFT_NAV_ITEM_WITH_DATE,\n} = ITEM_TYPES;\n\nexport const outOfTheBoxComponents: Record<\n string,\n React.ComponentType<ComponentProps>\n> = {\n [LEFT_NAV_ITEM_CONTROLLED_DRILLDOWN]: ItemControlledDrilldown,\n [LEFT_NAV_ITEM_UNCONTROLLED_DRILLDOWN]: ItemUncontrolledDrilldown,\n [LEFT_NAV_ITEM_HEADER]: ItemHeader,\n [LEFT_NAV_ITEM_LINK]: ItemLink,\n [LEFT_NAV_ITEM_SECTION]: ItemSection,\n [LEFT_NAV_ITEM_SEPARATOR]: ItemSeparator,\n [LEFT_NAV_ITEM_SUBMENU]: ItemSubmenu,\n [LEFT_NAV_ITEM_TEXT_LABEL]: ItemTextLabel,\n [LEFT_NAV_ITEM_WITH_DATE]: ItemWithDate,\n};\n"],
|
|
5
|
+
"mappings": "AAAA;ACEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEO,MAAM,mBAAmB,OAAO,OAAO;AAC9C,MAAM;AAAA,EACJ;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,IACE;AAEG,MAAM,wBAGT;AAAA,GACD,qCAAqC;AAAA,GACrC,uCAAuC;AAAA,GACvC,uBAAuB;AAAA,GACvB,qBAAqB;AAAA,GACrB,wBAAwB;AAAA,GACxB,0BAA0B;AAAA,GAC1B,wBAAwB;AAAA,GACxB,2BAA2B;AAAA,GAC3B,0BAA0B;AAAA;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|