@elliemae/ds-left-navigation 3.11.0-next.2 → 3.11.0-next.3
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/dist/cjs/LeftNavigationContext.js +2 -1
- package/dist/cjs/LeftNavigationContext.js.map +2 -2
- package/dist/cjs/common/getItemBackgroundStyle.js.map +2 -2
- package/dist/cjs/common/getLeftBorderStyle.js +1 -5
- package/dist/cjs/common/getLeftBorderStyle.js.map +2 -2
- package/dist/cjs/constants/constants.js +65 -0
- package/dist/cjs/constants/constants.js.map +7 -0
- package/dist/cjs/{outOfTheBox/ItemLink/styled.js → constants/index.js} +5 -17
- package/dist/cjs/constants/index.js.map +7 -0
- package/dist/cjs/exported-related/ItemRenderer/index.js +36 -44
- package/dist/cjs/exported-related/ItemRenderer/index.js.map +3 -3
- package/dist/cjs/exported-related/ItemRenderer/styled.js +24 -9
- package/dist/cjs/exported-related/ItemRenderer/styled.js.map +2 -2
- package/dist/cjs/exported-related/ItemRenderer/usePropsWithDefaults.js +1 -1
- package/dist/cjs/exported-related/ItemRenderer/usePropsWithDefaults.js.map +2 -2
- package/dist/cjs/exported-related/Notifications/index.js +9 -5
- package/dist/cjs/exported-related/Notifications/index.js.map +2 -2
- package/dist/cjs/index.d.js.map +1 -1
- package/dist/cjs/index.js +7 -4
- package/dist/cjs/index.js.map +3 -3
- package/dist/cjs/outOfTheBox/ItemControlledDrilldown/index.js +11 -12
- package/dist/cjs/outOfTheBox/ItemControlledDrilldown/index.js.map +3 -3
- package/dist/cjs/outOfTheBox/ItemHeader/index.js +8 -10
- package/dist/cjs/outOfTheBox/ItemHeader/index.js.map +3 -3
- package/dist/cjs/outOfTheBox/ItemLink/index.js +8 -10
- package/dist/cjs/outOfTheBox/ItemLink/index.js.map +3 -3
- package/dist/cjs/outOfTheBox/ItemSection/index.js +4 -5
- package/dist/cjs/outOfTheBox/ItemSection/index.js.map +3 -3
- package/dist/cjs/outOfTheBox/ItemSeparator/index.js +2 -1
- package/dist/cjs/outOfTheBox/ItemSeparator/index.js.map +2 -2
- package/dist/cjs/outOfTheBox/ItemSubmenu/index.js +8 -9
- package/dist/cjs/outOfTheBox/ItemSubmenu/index.js.map +3 -3
- package/dist/cjs/outOfTheBox/ItemTextLabel/index.js +1 -1
- package/dist/cjs/outOfTheBox/ItemTextLabel/index.js.map +1 -1
- package/dist/cjs/outOfTheBox/ItemUncontrolledDrilldown/index.js +12 -12
- package/dist/cjs/outOfTheBox/ItemUncontrolledDrilldown/index.js.map +3 -3
- package/dist/cjs/outOfTheBox/ItemWithDate/index.js +7 -10
- package/dist/cjs/outOfTheBox/ItemWithDate/index.js.map +3 -3
- package/dist/cjs/outOfTheBox/styled.js +122 -0
- package/dist/cjs/outOfTheBox/styled.js.map +7 -0
- package/dist/cjs/parts/LeftNavContent/index.js +14 -7
- package/dist/cjs/parts/LeftNavContent/index.js.map +2 -2
- package/dist/cjs/parts/LeftNavContent/styled.js +32 -43
- package/dist/cjs/parts/LeftNavContent/styled.js.map +2 -2
- package/dist/cjs/parts/LeftNavFooterItem/index.js +54 -67
- package/dist/cjs/parts/LeftNavFooterItem/index.js.map +3 -3
- package/dist/cjs/parts/LeftNavFooterItem/styled.js +22 -15
- package/dist/cjs/parts/LeftNavFooterItem/styled.js.map +2 -2
- package/dist/cjs/parts/LeftNavLoading/index.js +2 -1
- package/dist/cjs/parts/LeftNavLoading/index.js.map +2 -2
- package/dist/cjs/parts/OutOfTheBoxMapItem.js +2 -0
- package/dist/cjs/parts/OutOfTheBoxMapItem.js.map +2 -2
- package/dist/cjs/prop-types.js +0 -1
- package/dist/cjs/prop-types.js.map +2 -2
- package/dist/esm/LeftNavigationContext.js +2 -1
- package/dist/esm/LeftNavigationContext.js.map +2 -2
- package/dist/esm/common/getItemBackgroundStyle.js.map +2 -2
- package/dist/esm/common/getLeftBorderStyle.js +1 -5
- package/dist/esm/common/getLeftBorderStyle.js.map +2 -2
- package/dist/esm/constants/constants.js +39 -0
- package/dist/esm/constants/constants.js.map +7 -0
- package/dist/esm/constants/index.js +3 -0
- package/dist/esm/constants/index.js.map +7 -0
- package/dist/esm/exported-related/ItemRenderer/index.js +37 -45
- package/dist/esm/exported-related/ItemRenderer/index.js.map +2 -2
- package/dist/esm/exported-related/ItemRenderer/styled.js +24 -9
- package/dist/esm/exported-related/ItemRenderer/styled.js.map +2 -2
- package/dist/esm/exported-related/ItemRenderer/usePropsWithDefaults.js +1 -1
- package/dist/esm/exported-related/ItemRenderer/usePropsWithDefaults.js.map +2 -2
- package/dist/esm/exported-related/Notifications/index.js +9 -5
- package/dist/esm/exported-related/Notifications/index.js.map +2 -2
- package/dist/esm/index.js +6 -3
- package/dist/esm/index.js.map +2 -2
- package/dist/esm/outOfTheBox/ItemControlledDrilldown/index.js +11 -12
- package/dist/esm/outOfTheBox/ItemControlledDrilldown/index.js.map +2 -2
- package/dist/esm/outOfTheBox/ItemHeader/index.js +14 -10
- package/dist/esm/outOfTheBox/ItemHeader/index.js.map +3 -3
- package/dist/esm/outOfTheBox/ItemLink/index.js +8 -10
- package/dist/esm/outOfTheBox/ItemLink/index.js.map +2 -2
- package/dist/esm/outOfTheBox/ItemSection/index.js +10 -5
- package/dist/esm/outOfTheBox/ItemSection/index.js.map +2 -2
- package/dist/esm/outOfTheBox/ItemSeparator/index.js +2 -1
- package/dist/esm/outOfTheBox/ItemSeparator/index.js.map +2 -2
- package/dist/esm/outOfTheBox/ItemSubmenu/index.js +14 -9
- package/dist/esm/outOfTheBox/ItemSubmenu/index.js.map +3 -3
- package/dist/esm/outOfTheBox/ItemTextLabel/index.js +1 -1
- package/dist/esm/outOfTheBox/ItemTextLabel/index.js.map +1 -1
- package/dist/esm/outOfTheBox/ItemUncontrolledDrilldown/index.js +12 -12
- package/dist/esm/outOfTheBox/ItemUncontrolledDrilldown/index.js.map +2 -2
- package/dist/esm/outOfTheBox/ItemWithDate/index.js +7 -10
- package/dist/esm/outOfTheBox/ItemWithDate/index.js.map +2 -2
- package/dist/esm/outOfTheBox/styled.js +96 -0
- package/dist/esm/outOfTheBox/styled.js.map +7 -0
- package/dist/esm/parts/LeftNavContent/index.js +14 -8
- package/dist/esm/parts/LeftNavContent/index.js.map +2 -2
- package/dist/esm/parts/LeftNavContent/styled.js +33 -48
- package/dist/esm/parts/LeftNavContent/styled.js.map +2 -2
- package/dist/esm/parts/LeftNavFooterItem/index.js +57 -71
- package/dist/esm/parts/LeftNavFooterItem/index.js.map +2 -2
- package/dist/esm/parts/LeftNavFooterItem/styled.js +22 -15
- package/dist/esm/parts/LeftNavFooterItem/styled.js.map +2 -2
- package/dist/esm/parts/LeftNavLoading/index.js +2 -1
- package/dist/esm/parts/LeftNavLoading/index.js.map +2 -2
- package/dist/esm/parts/OutOfTheBoxMapItem.js +2 -0
- package/dist/esm/parts/OutOfTheBoxMapItem.js.map +2 -2
- package/dist/esm/prop-types.js +0 -1
- package/dist/esm/prop-types.js.map +2 -2
- package/package.json +8 -8
- package/dist/cjs/outOfTheBox/ItemControlledDrilldown/styled.js +0 -46
- package/dist/cjs/outOfTheBox/ItemControlledDrilldown/styled.js.map +0 -7
- package/dist/cjs/outOfTheBox/ItemHeader/styled.js +0 -46
- package/dist/cjs/outOfTheBox/ItemHeader/styled.js.map +0 -7
- package/dist/cjs/outOfTheBox/ItemLink/styled.js.map +0 -7
- package/dist/cjs/outOfTheBox/ItemSection/styled.js +0 -50
- package/dist/cjs/outOfTheBox/ItemSection/styled.js.map +0 -7
- package/dist/cjs/outOfTheBox/ItemSubmenu/styled.js +0 -46
- package/dist/cjs/outOfTheBox/ItemSubmenu/styled.js.map +0 -7
- package/dist/cjs/outOfTheBox/ItemTextLabel/styled.js +0 -40
- package/dist/cjs/outOfTheBox/ItemTextLabel/styled.js.map +0 -7
- package/dist/cjs/outOfTheBox/ItemUncontrolledDrilldown/styled.js +0 -46
- package/dist/cjs/outOfTheBox/ItemUncontrolledDrilldown/styled.js.map +0 -7
- package/dist/cjs/outOfTheBox/ItemWithDate/styled.js +0 -46
- package/dist/cjs/outOfTheBox/ItemWithDate/styled.js.map +0 -7
- package/dist/esm/outOfTheBox/ItemControlledDrilldown/styled.js +0 -20
- package/dist/esm/outOfTheBox/ItemControlledDrilldown/styled.js.map +0 -7
- package/dist/esm/outOfTheBox/ItemHeader/styled.js +0 -20
- package/dist/esm/outOfTheBox/ItemHeader/styled.js.map +0 -7
- package/dist/esm/outOfTheBox/ItemLink/styled.js +0 -12
- package/dist/esm/outOfTheBox/ItemLink/styled.js.map +0 -7
- package/dist/esm/outOfTheBox/ItemSection/styled.js +0 -24
- package/dist/esm/outOfTheBox/ItemSection/styled.js.map +0 -7
- package/dist/esm/outOfTheBox/ItemSubmenu/styled.js +0 -20
- package/dist/esm/outOfTheBox/ItemSubmenu/styled.js.map +0 -7
- package/dist/esm/outOfTheBox/ItemTextLabel/styled.js +0 -14
- package/dist/esm/outOfTheBox/ItemTextLabel/styled.js.map +0 -7
- package/dist/esm/outOfTheBox/ItemUncontrolledDrilldown/styled.js +0 -20
- package/dist/esm/outOfTheBox/ItemUncontrolledDrilldown/styled.js.map +0 -7
- package/dist/esm/outOfTheBox/ItemWithDate/styled.js +0 -20
- package/dist/esm/outOfTheBox/ItemWithDate/styled.js.map +0 -7
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
3
3
|
import { useContext, useMemo, useCallback } from "react";
|
|
4
|
-
import
|
|
5
|
-
import { StyledItemWrapper, StyledItem } from "./styled";
|
|
4
|
+
import { StyledItem, StyledCollapsedContainer, StyledBorderBottom } from "./styled";
|
|
6
5
|
import { LeftNavContext } from "../../LeftNavigationContext";
|
|
7
6
|
import { usePropsWithDefaults } from "./usePropsWithDefaults";
|
|
8
7
|
import { useKeyboardNavigation } from "../../hooks";
|
|
@@ -60,52 +59,45 @@ const ItemRenderer = (props) => {
|
|
|
60
59
|
}
|
|
61
60
|
return /* @__PURE__ */ jsxs(Fragment, {
|
|
62
61
|
children: [
|
|
63
|
-
/* @__PURE__ */ jsxs(
|
|
62
|
+
/* @__PURE__ */ jsxs(StyledItem, {
|
|
63
|
+
ref: visibleItemsRefs.current[dsId],
|
|
64
|
+
pt: paddingTop,
|
|
65
|
+
pl: indent === void 0 ? "xxxs" : `${indent}px`,
|
|
66
|
+
minHeight,
|
|
64
67
|
shadowStyle: shadowStyle(opened, item.type),
|
|
65
|
-
|
|
68
|
+
alignItems: "flex-start",
|
|
69
|
+
cols,
|
|
70
|
+
onClick: !opened ? handleOnClick : () => null,
|
|
71
|
+
onKeyDown,
|
|
72
|
+
selectable,
|
|
73
|
+
selected: isSelected,
|
|
74
|
+
selectedParent: selectedParent === dsId,
|
|
75
|
+
opened,
|
|
76
|
+
onFocus: handleFocus,
|
|
77
|
+
"data-testid": "leftnav-item-container",
|
|
78
|
+
tabIndex: focuseable ? 0 : -1,
|
|
79
|
+
"aria-describedby": ariaDescribedBy,
|
|
80
|
+
"aria-expanded": ariaExpanded,
|
|
81
|
+
role: ariaRole,
|
|
82
|
+
"data-selected": isSelected,
|
|
83
|
+
"data-selectedparent": selectedParent === dsId,
|
|
84
|
+
"data-opened": opened,
|
|
85
|
+
"data-type": item.type,
|
|
86
|
+
"aria-label": ariaLabel,
|
|
87
|
+
"aria-hidden": !focuseable,
|
|
88
|
+
"aria-live": ariaLive,
|
|
66
89
|
children: [
|
|
67
|
-
/* @__PURE__ */ jsx(
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
onKeyDown,
|
|
77
|
-
selectable,
|
|
78
|
-
selected: isSelected,
|
|
79
|
-
selectedParent: selectedParent === dsId,
|
|
90
|
+
!expandedForAnimation ? /* @__PURE__ */ jsx(StyledCollapsedContainer, {
|
|
91
|
+
"data-testid": "leftnav-leftcomponent",
|
|
92
|
+
justifyContent: "center",
|
|
93
|
+
children: CollapsedComponent && /* @__PURE__ */ jsx(CollapsedComponent, {
|
|
94
|
+
item,
|
|
95
|
+
ctx
|
|
96
|
+
})
|
|
97
|
+
}) : children,
|
|
98
|
+
hasBorderBottom && /* @__PURE__ */ jsx(StyledBorderBottom, {
|
|
80
99
|
opened,
|
|
81
|
-
|
|
82
|
-
"data-testid": "leftnav-item-container",
|
|
83
|
-
tabIndex: focuseable ? 0 : -1,
|
|
84
|
-
"aria-describedby": ariaDescribedBy,
|
|
85
|
-
"aria-expanded": ariaExpanded,
|
|
86
|
-
role: ariaRole,
|
|
87
|
-
"data-selected": isSelected,
|
|
88
|
-
"data-selectedparent": selectedParent === dsId,
|
|
89
|
-
"aria-label": ariaLabel,
|
|
90
|
-
"aria-hidden": !focuseable,
|
|
91
|
-
"aria-live": ariaLive,
|
|
92
|
-
children: !expandedForAnimation ? /* @__PURE__ */ jsx(Grid, {
|
|
93
|
-
"data-testid": "leftnav-leftcomponent",
|
|
94
|
-
justifyContent: "center",
|
|
95
|
-
children: /* @__PURE__ */ jsx(CollapsedComponent, {
|
|
96
|
-
item,
|
|
97
|
-
ctx
|
|
98
|
-
})
|
|
99
|
-
}) : children
|
|
100
|
-
}),
|
|
101
|
-
hasBorderBottom && /* @__PURE__ */ jsx("div", {
|
|
102
|
-
style: {
|
|
103
|
-
marginLeft: opened ? "16px" : "0px",
|
|
104
|
-
marginRight: borderBottomMr,
|
|
105
|
-
height: "1px",
|
|
106
|
-
width: `calc(100% - ${borderBottomMr} - ${opened ? "16px" : "0px"})`,
|
|
107
|
-
backgroundColor: "#E0E3E8"
|
|
108
|
-
}
|
|
100
|
+
borderBottomMr
|
|
109
101
|
})
|
|
110
102
|
]
|
|
111
103
|
}),
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/exported-related/ItemRenderer/index.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable complexity */\n/* eslint-disable max-lines */\nimport React, { useContext, useMemo, useCallback } from 'react';\nimport
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;ACAvB;AAEA,SAAgB,YAAY,SAAS,mBAAmB;AACxD,
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable complexity */\n/* eslint-disable max-lines */\nimport React, { useContext, useMemo, useCallback } from 'react';\nimport { StyledItem, StyledCollapsedContainer, StyledBorderBottom } from './styled';\n\nimport { ItemRendererT } from '../../index.d';\nimport { LeftNavContext } from '../../LeftNavigationContext';\nimport { usePropsWithDefaults } from './usePropsWithDefaults';\nimport { useKeyboardNavigation } from '../../hooks';\n\nexport const ItemRenderer: React.ComponentType<ItemRendererT> = (props) => {\n const propsWithDefault = usePropsWithDefaults(props);\n const {\n item,\n item: {\n dsId,\n itemOpts: { selectable, focuseable, indent, ariaLabel, ariaRole, ariaLive, ariaExpanded, ariaDescribedBy },\n CollapsedComponent,\n },\n subitems,\n minHeight,\n paddingTop,\n onClick,\n shadowStyle,\n hasBorderBottom,\n borderBottomMr,\n children,\n } = propsWithDefault;\n\n const ctx = useContext(LeftNavContext);\n const {\n leftNavProps: { onItemClick, openedItem },\n expandedForAnimation,\n selectedParent,\n selectedItem,\n setSelectedItem,\n setFocusedItem,\n visibleItemsRefs,\n } = ctx;\n\n const opened = dsId === openedItem;\n\n const handleOnClick = useCallback(\n (e: React.MouseEvent<HTMLElement>) => {\n if (onClick) onClick(); // used by uncontrolled drilldowns\n onItemClick(item, e);\n if (selectable) setSelectedItem(item.dsId as string);\n },\n [onItemClick, item, setSelectedItem, selectable, onClick],\n );\n\n const handleFocus = useCallback(() => {\n if (focuseable) setFocusedItem(dsId as string);\n }, [dsId, setFocusedItem, focuseable]);\n\n const onKeyDown = useKeyboardNavigation({\n item,\n onClick: handleOnClick,\n });\n\n const cols = useMemo(() => (expandedForAnimation ? ['auto', '1fr', 'auto'] : ['38px']), [expandedForAnimation]);\n const isSelected = useMemo(() => selectedItem === dsId, [selectedItem, dsId]);\n\n if (!expandedForAnimation && !CollapsedComponent) {\n return null;\n }\n\n return (\n <>\n <StyledItem\n ref={visibleItemsRefs.current[dsId]}\n pt={paddingTop}\n pl={indent === undefined ? 'xxxs' : `${indent}px`}\n minHeight={minHeight}\n shadowStyle={shadowStyle(opened, item.type)}\n alignItems=\"flex-start\"\n cols={cols}\n onClick={!opened ? handleOnClick : () => null}\n onKeyDown={onKeyDown}\n selectable={selectable}\n selected={isSelected}\n selectedParent={selectedParent === dsId}\n opened={opened}\n onFocus={handleFocus}\n data-testid=\"leftnav-item-container\"\n tabIndex={focuseable ? 0 : -1}\n aria-describedby={ariaDescribedBy}\n aria-expanded={ariaExpanded}\n role={ariaRole}\n data-selected={isSelected}\n data-selectedparent={selectedParent === dsId}\n data-opened={opened}\n data-type={item.type}\n aria-label={ariaLabel}\n aria-hidden={!focuseable}\n aria-live={ariaLive}\n >\n {!expandedForAnimation ? (\n <StyledCollapsedContainer data-testid=\"leftnav-leftcomponent\" justifyContent=\"center\">\n {CollapsedComponent && <CollapsedComponent item={item} ctx={ctx} />}\n </StyledCollapsedContainer>\n ) : (\n children\n )}\n {hasBorderBottom && <StyledBorderBottom opened={opened} borderBottomMr={borderBottomMr} />}\n </StyledItem>\n {subitems}\n </>\n );\n};\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACAvB;AAEA,SAAgB,YAAY,SAAS,mBAAmB;AACxD,SAAS,YAAY,0BAA0B,0BAA0B;AAGzE,SAAS,sBAAsB;AAC/B,SAAS,4BAA4B;AACrC,SAAS,6BAA6B;AAE/B,MAAM,eAAmD,CAAC,UAAU;AACzE,QAAM,mBAAmB,qBAAqB,KAAK;AACnD,QAAM;AAAA,IACJ;AAAA,IACA,MAAM;AAAA,MACJ;AAAA,MACA,UAAU,EAAE,YAAY,YAAY,QAAQ,WAAW,UAAU,UAAU,cAAc,gBAAgB;AAAA,MACzG;AAAA,IACF;A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QACV,gBAAgB,mBAAmB;AAAA,QACnC;AAAA,QACA,SAAS;AAAA,QACT,eAAY;AAAA,QACZ,UAAU,aAAa,IAAI;AAAA,QAC3B,oBAAkB;AAAA,QAClB,iBAAe;AAAA,QACf,MAAM;AAAA,QACN,iBAAe;AAAA,QACf,uBAAqB,mBAAmB;AAAA,QACxC,eAAa;AAAA,QACb,aAAW,KAAK;AAAA,QAChB,cAAY;AAAA,QACZ,eAAa,CAAC;AAAA,QACd,aAAW;AAAA,QAEV;AAAA,WAAC,uBACA,oBAAC;AAAA,YAAyB,eAAY;AAAA,YAAwB,gBAAe;AAAA,YAC1E,gCAAsB,oBAAC;AAAA,cAAmB;AAAA,cAAY;AAAA,aAAU;AAAA,WACnE,IAEA;AAAA,UAED,mBAAmB,oBAAC;AAAA,YAAmB;AAAA,YAAgB;AAAA,WAAgC;AAAA;AAAA,OAC1F;AAAA,MACC;AAAA;AAAA,GACH;AAEJ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import Grid from "@elliemae/ds-grid";
|
|
3
3
|
import { styled } from "@elliemae/ds-system";
|
|
4
|
+
import { DSLeftNavigationName, DSLeftNavigationSlots } from "../../constants";
|
|
4
5
|
const borderOutside = (color, weight = 2) => `&:before {
|
|
5
6
|
content: '';
|
|
6
7
|
position: absolute;
|
|
@@ -11,10 +12,6 @@ const borderOutside = (color, weight = 2) => `&:before {
|
|
|
11
12
|
border: ${weight}px solid ${color};
|
|
12
13
|
pointer-events: none;
|
|
13
14
|
}`;
|
|
14
|
-
const StyledItemWrapper = styled(Grid)`
|
|
15
|
-
position: relative;
|
|
16
|
-
${(props) => props.shadowStyle(props.theme)}
|
|
17
|
-
`;
|
|
18
15
|
const getItemBackground = ({ selectable, opened, selected, theme }) => {
|
|
19
16
|
if (!selectable)
|
|
20
17
|
return "white";
|
|
@@ -29,7 +26,8 @@ const getItemHoverBackground = ({ selectable, opened, selected, theme }) => {
|
|
|
29
26
|
return theme.colors.brand[200];
|
|
30
27
|
return theme.colors.brand["200"];
|
|
31
28
|
};
|
|
32
|
-
const StyledItem = styled(Grid)`
|
|
29
|
+
const StyledItem = styled(Grid, { name: DSLeftNavigationName, slot: DSLeftNavigationSlots.ITEM })`
|
|
30
|
+
position: relative;
|
|
33
31
|
cursor: ${(props) => props.selectable && !props.opened ? "pointer" : "auto"};
|
|
34
32
|
min-height: ${(props) => props.minHeight};
|
|
35
33
|
|
|
@@ -49,13 +47,30 @@ const StyledItem = styled(Grid)`
|
|
|
49
47
|
|
|
50
48
|
outline: none;
|
|
51
49
|
|
|
52
|
-
|
|
53
|
-
${borderOutside(props.theme.colors.brand[700])}
|
|
54
|
-
|
|
50
|
+
:focus {
|
|
51
|
+
${(props) => borderOutside(props.theme.colors.brand[700])}
|
|
52
|
+
}
|
|
53
|
+
`;
|
|
54
|
+
const StyledCollapsedContainer = styled(Grid, {
|
|
55
|
+
name: DSLeftNavigationName,
|
|
56
|
+
slot: DSLeftNavigationSlots.COLLAPSED_CONTAINER
|
|
57
|
+
})``;
|
|
58
|
+
const StyledBorderBottom = styled("div", {
|
|
59
|
+
name: DSLeftNavigationName,
|
|
60
|
+
slot: DSLeftNavigationSlots.ITEM_BORDER_BOTTOM
|
|
61
|
+
})`
|
|
62
|
+
margin-left: ${({ opened }) => opened ? "16px" : "0px"};
|
|
63
|
+
margin-right: ${({ borderBottomMr }) => borderBottomMr};
|
|
64
|
+
height: 1px;
|
|
65
|
+
width: calc(100% - ${({ borderBottomMr }) => borderBottomMr} - ${({ opened }) => opened ? "16px" : "0px"});
|
|
66
|
+
background-color: #e0e3e8;
|
|
67
|
+
grid-column: span 3;
|
|
68
|
+
align-self: end;
|
|
55
69
|
`;
|
|
56
70
|
export {
|
|
71
|
+
StyledBorderBottom,
|
|
72
|
+
StyledCollapsedContainer,
|
|
57
73
|
StyledItem,
|
|
58
|
-
StyledItemWrapper,
|
|
59
74
|
borderOutside
|
|
60
75
|
};
|
|
61
76
|
//# sourceMappingURL=styled.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/exported-related/ItemRenderer/styled.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable indent */\
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable indent */\nimport Grid from '@elliemae/ds-grid';\nimport { styled, type Theme } from '@elliemae/ds-system';\nimport { DSLeftNavigationName, DSLeftNavigationSlots } from '../../constants';\n\ninterface ItemProps {\n selected: boolean;\n selectable: boolean;\n opened: boolean;\n theme: Theme;\n shadowStyle: (theme: Theme) => string;\n}\n\nexport const borderOutside = (color: string, weight = 2): string => `&:before {\n content: '';\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n border: ${weight}px solid ${color};\n pointer-events: none;\n}`;\n\nconst getItemBackground = ({ selectable, opened, selected, theme }: ItemProps) => {\n if (!selectable) return 'white';\n if (selected && !opened) return theme.colors.brand[200];\n return theme.colors.neutral['000'];\n};\n\nconst getItemHoverBackground = ({ selectable, opened, selected, theme }: ItemProps) => {\n if (!selectable) return 'white';\n if (selected && !opened) return theme.colors.brand[200];\n return theme.colors.brand['200'];\n};\n\nexport const StyledItem = styled(Grid, { name: DSLeftNavigationName, slot: DSLeftNavigationSlots.ITEM })<\n { minHeight: string } & ItemProps\n>`\n position: relative;\n cursor: ${(props) => (props.selectable && !props.opened ? 'pointer' : 'auto')};\n min-height: ${(props) => props.minHeight};\n\n background: ${getItemBackground};\n\n ${(props) => (props.selected && !props.opened ? borderOutside(props.theme.colors.brand[500], 1) : '')}\n\n :hover {\n background: ${getItemHoverBackground};\n }\n\n :active {\n background: ${({ selectable, theme }) => (selectable ? theme.colors.brand[200] : 'white')};\n }\n\n ${(props) => props.shadowStyle(props.theme)};\n\n outline: none;\n\n :focus {\n ${(props) => borderOutside(props.theme.colors.brand[700])}\n }\n`;\n\nexport const StyledCollapsedContainer = styled(Grid, {\n name: DSLeftNavigationName,\n slot: DSLeftNavigationSlots.COLLAPSED_CONTAINER,\n})``;\n\nexport const StyledBorderBottom = styled('div', {\n name: DSLeftNavigationName,\n slot: DSLeftNavigationSlots.ITEM_BORDER_BOTTOM,\n})<{ opened: boolean; borderBottomMr?: string }>`\n margin-left: ${({ opened }) => (opened ? '16px' : '0px')};\n margin-right: ${({ borderBottomMr }) => borderBottomMr};\n height: 1px;\n width: calc(100% - ${({ borderBottomMr }) => borderBottomMr} - ${({ opened }) => (opened ? '16px' : '0px')});\n background-color: #e0e3e8;\n grid-column: span 3;\n align-self: end;\n`;\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACCvB,OAAO,UAAU;AACjB,SAAS,cAA0B;AACnC,SAAS,sBAAsB,6BAA6B;AAUrD,MAAM,gBAAgB,CAAC,OAAe,SAAS,MAAc;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,YAOxD,kBAAkB;AAAA;AAAA;AAI9B,MAAM,oBAAoB,CAAC,EAAE,YAAY,QAAQ,UAAU,MAAM,MAAiB;AAChF,MAAI,CAAC;AAAY,WAAO;AACxB,MAAI,YAAY,CAAC;AAAQ,WAAO,MAAM,OAAO,MAAM;AACnD,SAAO,MAAM,OAAO,QAAQ;AAC9B;AAEA,MAAM,yBAAyB,CAAC,EAAE,YAAY,QAAQ,UAAU,MAAM,MAAiB;AACrF,MAAI,CAAC;AAAY,WAAO;AACxB,MAAI,YAAY,CAAC;AAAQ,WAAO,MAAM,OAAO,MAAM;AACnD,SAAO,MAAM,OAAO,MAAM;AAC5B;AAEO,MAAM,aAAa,OAAO,MAAM,EAAE,MAAM,sBAAsB,MAAM,sBAAsB,KAAK,CAAC;AAAA;AAAA,YAI3F,CAAC,UAAW,MAAM,cAAc,CAAC,MAAM,SAAS,YAAY;AAAA,gBACxD,CAAC,UAAU,MAAM;AAAA;AAAA,gBAEjB;AAAA;AAAA,IAEZ,CAAC,UAAW,MAAM,YAAY,CAAC,MAAM,SAAS,cAAc,MAAM,MAAM,OAAO,MAAM,MAAM,CAAC,IAAI;AAAA;AAAA;AAAA,kBAGlF;AAAA;AAAA;AAAA;AAAA,kBAIA,CAAC,EAAE,YAAY,MAAM,MAAO,aAAa,MAAM,OAAO,MAAM,OAAO;AAAA;AAAA;AAAA,IAGjF,CAAC,UAAU,MAAM,YAAY,MAAM,KAAK;AAAA;AAAA;AAAA;AAAA;AAAA,MAKtC,CAAC,UAAU,cAAc,MAAM,MAAM,OAAO,MAAM,IAAI;AAAA;AAAA;AAIrD,MAAM,2BAA2B,OAAO,MAAM;AAAA,EACnD,MAAM;AAAA,EACN,MAAM,sBAAsB;AAC9B,CAAC;AAEM,MAAM,qBAAqB,OAAO,OAAO;AAAA,EAC9C,MAAM;AAAA,EACN,MAAM,sBAAsB;AAC9B,CAAC;AAAA,iBACgB,CAAC,EAAE,OAAO,MAAO,SAAS,SAAS;AAAA,kBAClC,CAAC,EAAE,eAAe,MAAM;AAAA;AAAA,uBAEnB,CAAC,EAAE,eAAe,MAAM,oBAAoB,CAAC,EAAE,OAAO,MAAO,SAAS,SAAS;AAAA;AAAA;AAAA;AAAA;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -25,7 +25,7 @@ const usePropsWithDefaults = (props) => {
|
|
|
25
25
|
minHeight: "48px",
|
|
26
26
|
paddingTop: "12px",
|
|
27
27
|
subitems: [],
|
|
28
|
-
shadowStyle: (opened, type) => (
|
|
28
|
+
shadowStyle: (opened, type) => () => `box-shadow: ${opened || !itemWithoutShadows.includes(type) ? "inset 4px 0 0 0 #52A6EC" : "inset 4px 0 0 0 white"}`,
|
|
29
29
|
hasBorderBottom: false,
|
|
30
30
|
borderBottomMr: "0px",
|
|
31
31
|
...props,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/exported-related/ItemRenderer/usePropsWithDefaults.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { useMemo } from 'react';\nimport {
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,eAAe;AAGxB,MAAM,mBAA8B;AAAA,EAClC,OAAO;AAAA,EACP,eAAe;AAAA,EACf,YAAY;AAAA,EACZ,YAAY;AAAA,EACZ,UAAU;AAAA,EACV,UAAU;AAAA,EACV,WAAW;AAAA,EACX,UAAU;AAAA,EACV,UAAU;AAAA,EACV,cAAc;AAAA,EACd,iBAAiB;AACnB;AAEA,MAAM,qBAAqB,CAAC,2BAA2B,yBAAyB,0BAA0B;AAGnG,MAAM,uBAAuB,CAAC,
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { useMemo } from 'react';\nimport { ItemOptsT, ItemRendererT } from '../../index.d';\n\nconst itemDefaultProps: ItemOptsT = {\n label: '',\n labelOverflow: 'truncate',\n selectable: true,\n focuseable: true,\n openable: false,\n closable: false,\n ariaLabel: '',\n ariaRole: 'menuitem',\n ariaLive: 'off',\n ariaExpanded: undefined,\n ariaDescribedBy: undefined,\n};\n\nconst itemWithoutShadows = ['ds-left-nav-item-header', 'ds-left-nav-item-link', 'ds-left-nav-item-submenu'];\n\n// Make use Item props with defaults\nexport const usePropsWithDefaults = (props: ItemRendererT): Required<ItemRendererT> => {\n const propsWithDefault = useMemo(() => {\n const itemWithDefaults = {\n CollapsedComponent: () => null,\n ...props.item,\n itemOpts: { ...itemDefaultProps, ...props.item.itemOpts },\n };\n return {\n minHeight: '48px',\n paddingTop: '12px',\n subitems: [],\n shadowStyle: (opened: boolean, type: string) => () =>\n `box-shadow: ${\n opened || !itemWithoutShadows.includes(type) ? 'inset 4px 0 0 0 #52A6EC' : 'inset 4px 0 0 0 white'\n }`,\n hasBorderBottom: false,\n borderBottomMr: '0px',\n ...props,\n item: itemWithDefaults,\n };\n }, [props]);\n\n return propsWithDefault as Required<ItemRendererT>;\n};\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,eAAe;AAGxB,MAAM,mBAA8B;AAAA,EAClC,OAAO;AAAA,EACP,eAAe;AAAA,EACf,YAAY;AAAA,EACZ,YAAY;AAAA,EACZ,UAAU;AAAA,EACV,UAAU;AAAA,EACV,WAAW;AAAA,EACX,UAAU;AAAA,EACV,UAAU;AAAA,EACV,cAAc;AAAA,EACd,iBAAiB;AACnB;AAEA,MAAM,qBAAqB,CAAC,2BAA2B,yBAAyB,0BAA0B;AAGnG,MAAM,uBAAuB,CAAC,UAAkD;AACrF,QAAM,mBAAmB,QAAQ,MAAM;AACrC,UAAM,mBAAmB;AAAA,MACvB,oBAAoB,MAAM;AAAA,MAC1B,GAAG,MAAM;AAAA,MACT,UAAU,EAAE,GAAG,kBAAkB,GAAG,MAAM,KAAK,SAAS;AAAA,IAC1D;AACA,WAAO;AAAA,MACL,WAAW;AAAA,MACX,YAAY;AAAA,MACZ,UAAU,CAAC;AAAA,MACX,aAAa,CAAC,QAAiB,SAAiB,MAC9C,eACE,UAAU,CAAC,mBAAmB,SAAS,IAAI,IAAI,4BAA4B;AAAA,MAE/E,iBAAiB;AAAA,MACjB,gBAAgB;AAAA,MAChB,GAAG;AAAA,MACH,MAAM;AAAA,IACR;AAAA,EACF,GAAG,CAAC,KAAK,CAAC;AAEV,SAAO;AACT;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -8,7 +8,11 @@ import {
|
|
|
8
8
|
} from "@elliemae/ds-icons";
|
|
9
9
|
import { styled } from "@elliemae/ds-system";
|
|
10
10
|
import Grid from "@elliemae/ds-grid";
|
|
11
|
-
|
|
11
|
+
import { DSLeftNavigationName, DSLeftNavigationSlots } from "../../constants";
|
|
12
|
+
const StyledIconContainer = styled("div", {
|
|
13
|
+
name: DSLeftNavigationName,
|
|
14
|
+
slot: DSLeftNavigationSlots.NOTIFICATIONS_CONTAINER
|
|
15
|
+
})`
|
|
12
16
|
display: flex;
|
|
13
17
|
flex-direction: column;
|
|
14
18
|
align-items: center;
|
|
@@ -17,7 +21,7 @@ const Notifications = ({
|
|
|
17
21
|
exceptions = false,
|
|
18
22
|
alerts = false,
|
|
19
23
|
messages = false
|
|
20
|
-
}) => /* @__PURE__ */ jsxs(
|
|
24
|
+
}) => /* @__PURE__ */ jsxs(StyledIconContainer, {
|
|
21
25
|
children: [
|
|
22
26
|
/* @__PURE__ */ jsx(InternalNotifications, {
|
|
23
27
|
size: "m",
|
|
@@ -36,7 +40,7 @@ const Notifications = ({
|
|
|
36
40
|
children: exceptions && /* @__PURE__ */ jsx(ExceptionsSmallFill, {
|
|
37
41
|
width: "6px",
|
|
38
42
|
height: "6px",
|
|
39
|
-
color: ["warning", 900]
|
|
43
|
+
color: ["warning", "900"]
|
|
40
44
|
})
|
|
41
45
|
}),
|
|
42
46
|
/* @__PURE__ */ jsx(Grid, {
|
|
@@ -46,7 +50,7 @@ const Notifications = ({
|
|
|
46
50
|
children: alerts && /* @__PURE__ */ jsx(AlertsSmallFill, {
|
|
47
51
|
width: "6px",
|
|
48
52
|
height: "6px",
|
|
49
|
-
color: ["danger", 900]
|
|
53
|
+
color: ["danger", "900"]
|
|
50
54
|
})
|
|
51
55
|
}),
|
|
52
56
|
/* @__PURE__ */ jsx(Grid, {
|
|
@@ -56,7 +60,7 @@ const Notifications = ({
|
|
|
56
60
|
children: messages && /* @__PURE__ */ jsx(MessagesSmallFill, {
|
|
57
61
|
width: "6px",
|
|
58
62
|
height: "6px",
|
|
59
|
-
color: ["success", 900]
|
|
63
|
+
color: ["success", "900"]
|
|
60
64
|
})
|
|
61
65
|
})
|
|
62
66
|
]
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/exported-related/Notifications/index.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport {\n AlertsSmallFill,\n Notifications as InternalNotifications,\n ExceptionsSmallFill,\n MessagesSmallFill,\n} from '@elliemae/ds-icons';\nimport { styled } from '@elliemae/ds-system';\nimport Grid from '@elliemae/ds-grid';\n\nconst
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;ACAvB;AACA;AAAA,EACE;AAAA,EACA,iBAAiB;AAAA,EACjB;AAAA,EACA;AAAA,OACK;AACP,SAAS,cAAc;AACvB,OAAO,UAAU;
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport {\n AlertsSmallFill,\n Notifications as InternalNotifications,\n ExceptionsSmallFill,\n MessagesSmallFill,\n} from '@elliemae/ds-icons';\nimport { styled } from '@elliemae/ds-system';\nimport Grid from '@elliemae/ds-grid';\nimport { DSLeftNavigationName, DSLeftNavigationSlots } from '../../constants';\n\nconst StyledIconContainer = styled('div', {\n name: DSLeftNavigationName,\n slot: DSLeftNavigationSlots.NOTIFICATIONS_CONTAINER,\n})`\n display: flex;\n flex-direction: column;\n align-items: center;\n`;\n\ntype NotificationsProps = {\n exceptions?: boolean;\n alerts?: boolean;\n messages?: boolean;\n};\n\nexport const Notifications = ({\n exceptions = false,\n alerts = false,\n messages = false,\n}: NotificationsProps): JSX.Element => (\n <StyledIconContainer>\n <InternalNotifications size=\"m\" color={['brand-primary', 800]} data-testid=\"left-nav-notifications-icon\" />\n {(exceptions || alerts || messages) && (\n <Grid cols={['1fr', '1fr', '1fr']} gutter=\"xxxs\" mt=\"2px\">\n <Grid width=\"6px\" height=\"6px\" data-testid=\"left-nav-exceptions-icon\">\n {exceptions && <ExceptionsSmallFill width=\"6px\" height=\"6px\" color={['warning', '900']} />}\n </Grid>\n <Grid width=\"6px\" height=\"6px\" data-testid=\"left-nav-alerts-icon\">\n {alerts && <AlertsSmallFill width=\"6px\" height=\"6px\" color={['danger', '900']} />}\n </Grid>\n <Grid width=\"6px\" height=\"6px\" data-testid=\"left-nav-messages-icon\">\n {messages && <MessagesSmallFill width=\"6px\" height=\"6px\" color={['success', '900']} />}\n </Grid>\n </Grid>\n )}\n </StyledIconContainer>\n);\n\nexport default Notifications;\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACAvB;AACA;AAAA,EACE;AAAA,EACA,iBAAiB;AAAA,EACjB;AAAA,EACA;AAAA,OACK;AACP,SAAS,cAAc;AACvB,OAAO,UAAU;AACjB,SAAS,sBAAsB,6BAA6B;AAE5D,MAAM,sBAAsB,OAAO,OAAO;AAAA,EACxC,MAAM;AAAA,EACN,MAAM,sBAAsB;AAC9B,CAAC;AAAA;AAAA;AAAA;AAAA;AAYM,MAAM,gBAAgB,CAAC;AAAA,EAC5B,aAAa;AAAA,EACb,SAAS;AAAA,EACT,WAAW;AACb,MACE,qBAAC;AAAA,EACC;AAAA,wBAAC;AAAA,MAAsB,MAAK;AAAA,MAAI,OAAO,CAAC,iBAAiB,GAAG;AAAA,MAAG,eAAY;AAAA,KAA8B;AAAA,KACvG,cAAc,UAAU,aACxB,qBAAC;AAAA,MAAK,MAAM,CAAC,OAAO,OAAO,KAAK;AAAA,MAAG,QAAO;AAAA,MAAO,IAAG;AAAA,MAClD;AAAA,4BAAC;AAAA,UAAK,OAAM;AAAA,UAAM,QAAO;AAAA,UAAM,eAAY;AAAA,UACxC,wBAAc,oBAAC;AAAA,YAAoB,OAAM;AAAA,YAAM,QAAO;AAAA,YAAM,OAAO,CAAC,WAAW,KAAK;AAAA,WAAG;AAAA,SAC1F;AAAA,QACA,oBAAC;AAAA,UAAK,OAAM;AAAA,UAAM,QAAO;AAAA,UAAM,eAAY;AAAA,UACxC,oBAAU,oBAAC;AAAA,YAAgB,OAAM;AAAA,YAAM,QAAO;AAAA,YAAM,OAAO,CAAC,UAAU,KAAK;AAAA,WAAG;AAAA,SACjF;AAAA,QACA,oBAAC;AAAA,UAAK,OAAM;AAAA,UAAM,QAAO;AAAA,UAAM,eAAY;AAAA,UACxC,sBAAY,oBAAC;AAAA,YAAkB,OAAM;AAAA,YAAM,QAAO;AAAA,YAAM,OAAO,CAAC,WAAW,KAAK;AAAA,WAAG;AAAA,SACtF;AAAA;AAAA,KACF;AAAA;AAAA,CAEJ;AAGF,IAAO,wBAAQ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/dist/esm/index.js
CHANGED
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
+
import { LeftNavigation } from "./LeftNavigation";
|
|
3
|
+
var src_default = LeftNavigation;
|
|
2
4
|
import { LeftNavItemPropsSchema, LeftNavItemOptionsSchema } from "./prop-types";
|
|
3
|
-
import { LeftNavigation
|
|
5
|
+
import { LeftNavigation as LeftNavigation2, LeftNavigationWithSchema } from "./LeftNavigation";
|
|
4
6
|
export * from "./exported-related";
|
|
7
|
+
export * from "./constants";
|
|
5
8
|
export {
|
|
6
9
|
LeftNavItemOptionsSchema,
|
|
7
10
|
LeftNavItemPropsSchema,
|
|
8
|
-
LeftNavigation,
|
|
11
|
+
LeftNavigation2 as LeftNavigation,
|
|
9
12
|
LeftNavigationWithSchema,
|
|
10
|
-
|
|
13
|
+
src_default as default
|
|
11
14
|
};
|
|
12
15
|
//# sourceMappingURL=index.js.map
|
package/dist/esm/index.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../scripts/build/transpile/react-shim.js", "../../src/index.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,wBAAwB,gCAAgC;AACjE,SAAS,
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { LeftNavigation } from './LeftNavigation';\n\nexport default LeftNavigation;\nexport { LeftNavItemPropsSchema, LeftNavItemOptionsSchema } from './prop-types';\nexport { LeftNavigation, LeftNavigationWithSchema } from './LeftNavigation';\nexport * from './exported-related';\nexport * from './constants';\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,sBAAsB;AAE/B,IAAO,cAAQ;AACf,SAAS,wBAAwB,gCAAgC;AACjE,SAAS,kBAAAA,iBAAgB,gCAAgC;AACzD,cAAc;AACd,cAAc;",
|
|
6
6
|
"names": ["LeftNavigation"]
|
|
7
7
|
}
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
3
|
import { useMemo } from "react";
|
|
4
|
-
import Grid from "@elliemae/ds-grid";
|
|
5
4
|
import { SimpleTruncatedTooltipText } from "@elliemae/ds-truncated-tooltip-text";
|
|
6
5
|
import { ArrowheadDown, ArrowheadRight } from "@elliemae/ds-icons";
|
|
7
6
|
import { ItemRenderer, ITEM_TYPES } from "../../exported-related/index";
|
|
8
|
-
import { StyledLabel, StyledDate } from "
|
|
7
|
+
import { StyledLabel, StyledDate, StyledArrowContainer, StyledRightContainer } from "../styled";
|
|
9
8
|
import { ItemSeparator } from "../ItemSeparator";
|
|
10
9
|
import { ItemWithDate } from "../ItemWithDate";
|
|
11
10
|
import { ItemTextLabel } from "../ItemTextLabel";
|
|
@@ -32,6 +31,8 @@ const OutOfTheBoxMapSubitem = (props) => {
|
|
|
32
31
|
ctx
|
|
33
32
|
});
|
|
34
33
|
}
|
|
34
|
+
if (!Component)
|
|
35
|
+
return null;
|
|
35
36
|
return /* @__PURE__ */ jsx(Component, {
|
|
36
37
|
item,
|
|
37
38
|
ctx
|
|
@@ -74,7 +75,7 @@ const ItemControlledDrilldown = (props) => {
|
|
|
74
75
|
item: subitem,
|
|
75
76
|
ctx
|
|
76
77
|
}, subitem.dsId));
|
|
77
|
-
}, [items,
|
|
78
|
+
}, [isOpened, items, ctx]);
|
|
78
79
|
return /* @__PURE__ */ jsxs(ItemRenderer, {
|
|
79
80
|
item: {
|
|
80
81
|
...item,
|
|
@@ -91,7 +92,7 @@ const ItemControlledDrilldown = (props) => {
|
|
|
91
92
|
minHeight: "32px",
|
|
92
93
|
paddingTop: "8px",
|
|
93
94
|
children: [
|
|
94
|
-
/* @__PURE__ */ jsx(
|
|
95
|
+
/* @__PURE__ */ jsx(StyledArrowContainer, {
|
|
95
96
|
pl: "xxs",
|
|
96
97
|
mt: "-2px",
|
|
97
98
|
children: arrowIcon
|
|
@@ -107,23 +108,21 @@ const ItemControlledDrilldown = (props) => {
|
|
|
107
108
|
placement: "bottom-start"
|
|
108
109
|
}) : label
|
|
109
110
|
}),
|
|
110
|
-
/* @__PURE__ */ jsxs(
|
|
111
|
+
/* @__PURE__ */ jsxs(StyledRightContainer, {
|
|
111
112
|
pr: "xxs2",
|
|
112
113
|
cols: ["auto", "auto"],
|
|
113
114
|
alignItems: "center",
|
|
115
|
+
gutter: "xxs",
|
|
116
|
+
"data-testid": "leftnav-right-component",
|
|
114
117
|
children: [
|
|
115
118
|
/* @__PURE__ */ jsx(StyledDate, {
|
|
116
119
|
ml: "xxs",
|
|
117
120
|
"data-testid": "leftnav-list-item-date",
|
|
118
121
|
children: labelRightSection
|
|
119
122
|
}),
|
|
120
|
-
/* @__PURE__ */ jsx(
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
children: RightComponent && /* @__PURE__ */ jsx(RightComponent, {
|
|
124
|
-
ctx,
|
|
125
|
-
item
|
|
126
|
-
})
|
|
123
|
+
RightComponent && /* @__PURE__ */ jsx(RightComponent, {
|
|
124
|
+
ctx,
|
|
125
|
+
item
|
|
127
126
|
})
|
|
128
127
|
]
|
|
129
128
|
})
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/outOfTheBox/ItemControlledDrilldown/index.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React, { useMemo } from 'react';\nimport
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;ACAvB;AAAA,SAAgB,eAAe;AAC/B,
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React, { useMemo } from 'react';\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, StyledArrowContainer, StyledRightContainer } from '../styled';\nimport { ItemSeparator } from '../ItemSeparator';\nimport { ItemWithDate } from '../ItemWithDate';\nimport { ItemTextLabel } from '../ItemTextLabel';\nimport type { ComponentProps } from '../../index.d';\n\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: React.ComponentType<ComponentProps> = (props) => {\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 if (!Component) return null;\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 ItemControlledDrilldown = (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 isOpened,\n items,\n labelDataTestId,\n },\n },\n ctx,\n ctx: {\n leftNavProps: { labelOverflow: leftNavLabelOverflow },\n },\n } = props;\n\n const labelOverflow = itemLabelOverflow || leftNavLabelOverflow;\n\n const arrowIcon = useMemo(() => {\n const Component = isOpened ? ArrowheadDown : ArrowheadRight;\n return <Component width=\"24px\" height=\"18px\" color={['brand-primary', '800']} />;\n }, [isOpened]);\n\n const subitems = useMemo(() => {\n if (!isOpened || !items) return [];\n return items.map((subitem) => <OutOfTheBoxMapSubitem item={subitem} ctx={ctx} key={subitem.dsId} />);\n }, [isOpened, items, ctx]);\n\n return (\n <ItemRenderer\n item={{\n ...item,\n itemOpts: {\n ariaExpanded: isOpened,\n ariaRole: 'menuitem',\n ...item.itemOpts,\n openable: !isOpened,\n closable: isOpened,\n },\n CollapsedComponent: null,\n }}\n subitems={subitems}\n minHeight=\"32px\"\n paddingTop=\"8px\"\n >\n <StyledArrowContainer pl=\"xxs\" mt=\"-2px\">\n {arrowIcon}\n </StyledArrowContainer>\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 <StyledRightContainer\n pr=\"xxs2\"\n cols={['auto', 'auto']}\n alignItems=\"center\"\n gutter=\"xxs\"\n data-testid=\"leftnav-right-component\"\n >\n <StyledDate ml=\"xxs\" data-testid=\"leftnav-list-item-date\">\n {labelRightSection}\n </StyledDate>\n {RightComponent && <RightComponent ctx={ctx} item={item} />}\n </StyledRightContainer>\n </ItemRenderer>\n );\n};\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACAvB;AAAA,SAAgB,eAAe;AAC/B,SAAS,kCAAkC;AAC3C,SAAS,eAAe,sBAAsB;AAC9C,SAAS,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15 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
3
|
import { useCallback } from "react";
|
|
4
|
-
import Grid from "@elliemae/ds-grid";
|
|
5
4
|
import { SimpleTruncatedTooltipText } from "@elliemae/ds-truncated-tooltip-text";
|
|
6
5
|
import { ItemRenderer } from "../../exported-related/index";
|
|
7
|
-
import {
|
|
6
|
+
import {
|
|
7
|
+
StyledItemLabel,
|
|
8
|
+
StyledChevronLeft,
|
|
9
|
+
StyledBottomContainer,
|
|
10
|
+
StyledLeftContainer,
|
|
11
|
+
StyledRightContainer
|
|
12
|
+
} from "../styled";
|
|
8
13
|
import { CHEVRON_BACK_DS_ID } from "../../exported-related/constants";
|
|
9
14
|
const notOpenedShadowStyle = (isSelected) => (theme) => `
|
|
10
15
|
box-shadow: inset 4px 0 0 0 ${isSelected ? theme.colors.brand[400] : "transparent"};
|
|
@@ -39,8 +44,8 @@ const ItemHeader = (props) => {
|
|
|
39
44
|
const ariaLabel = item.itemOpts.ariaLabel ?? (typeof label === "string" ? label : "menuitem");
|
|
40
45
|
const isSelected = selectedItem === dsId || selectedParent === dsId;
|
|
41
46
|
const shadowStyle = useCallback(
|
|
42
|
-
(
|
|
43
|
-
[isSelected
|
|
47
|
+
(opened_) => (theme) => !opened_ ? notOpenedShadowStyle(isSelected)(theme) : `box-shadow: inset 4px 0 0 0 #52A6EC`,
|
|
48
|
+
[isSelected]
|
|
44
49
|
);
|
|
45
50
|
return /* @__PURE__ */ jsxs(ItemRenderer, {
|
|
46
51
|
item: {
|
|
@@ -58,7 +63,7 @@ const ItemHeader = (props) => {
|
|
|
58
63
|
borderBottomMr: opened ? "12px" : "0px",
|
|
59
64
|
shadowStyle,
|
|
60
65
|
children: [
|
|
61
|
-
/* @__PURE__ */ jsxs(
|
|
66
|
+
/* @__PURE__ */ jsxs(StyledLeftContainer, {
|
|
62
67
|
cols: opened ? ["auto", "auto"] : ["38px"],
|
|
63
68
|
gutter: "1px",
|
|
64
69
|
pl: opened ? "xxs" : 0,
|
|
@@ -80,13 +85,13 @@ const ItemHeader = (props) => {
|
|
|
80
85
|
role: "button",
|
|
81
86
|
"aria-label": `Close ${ariaLabel}`
|
|
82
87
|
}),
|
|
83
|
-
/* @__PURE__ */ jsx(CollapsedComponent, {
|
|
88
|
+
CollapsedComponent && /* @__PURE__ */ jsx(CollapsedComponent, {
|
|
84
89
|
item,
|
|
85
90
|
ctx
|
|
86
91
|
})
|
|
87
92
|
]
|
|
88
93
|
}),
|
|
89
|
-
/* @__PURE__ */ jsx(
|
|
94
|
+
/* @__PURE__ */ jsx(StyledItemLabel, {
|
|
90
95
|
ml: opened ? "xxs" : "1px",
|
|
91
96
|
mt: "xxxs",
|
|
92
97
|
mb: "15px",
|
|
@@ -97,7 +102,7 @@ const ItemHeader = (props) => {
|
|
|
97
102
|
placement: "bottom-start"
|
|
98
103
|
}) : label
|
|
99
104
|
}),
|
|
100
|
-
/* @__PURE__ */ jsx(
|
|
105
|
+
/* @__PURE__ */ jsx(StyledRightContainer, {
|
|
101
106
|
pl: "xs",
|
|
102
107
|
pr: opened ? "xxs2" : "xxs",
|
|
103
108
|
onFocus: (e) => {
|
|
@@ -111,8 +116,7 @@ const ItemHeader = (props) => {
|
|
|
111
116
|
item
|
|
112
117
|
})
|
|
113
118
|
}),
|
|
114
|
-
BottomComponent && /* @__PURE__ */ jsx(
|
|
115
|
-
style: { gridColumn: "span 3" },
|
|
119
|
+
BottomComponent && /* @__PURE__ */ jsx(StyledBottomContainer, {
|
|
116
120
|
pb: "xxxs",
|
|
117
121
|
pl: "xxs",
|
|
118
122
|
pr: "xxs",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/outOfTheBox/ItemHeader/index.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable max-lines */\n/* eslint-disable complexity */\nimport React, { useCallback } from 'react';\nimport
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;ACAvB;AAEA,SAAgB,mBAAmB;AACnC,
|
|
6
|
-
"names": [
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable max-lines */\n/* eslint-disable complexity */\nimport React, { useCallback } from 'react';\nimport { SimpleTruncatedTooltipText } from '@elliemae/ds-truncated-tooltip-text';\nimport { Theme } from '@elliemae/ds-system';\nimport { ItemRenderer } from '../../exported-related/index';\nimport type { ComponentProps } from '../../index.d';\nimport {\n StyledItemLabel,\n StyledChevronLeft,\n StyledBottomContainer,\n StyledLeftContainer,\n StyledRightContainer,\n} from '../styled';\nimport { CHEVRON_BACK_DS_ID } from '../../exported-related/constants';\n\nconst notOpenedShadowStyle = (isSelected: boolean) => (theme: Theme) =>\n `\n box-shadow: inset 4px 0 0 0 ${isSelected ? theme.colors.brand[400] : 'transparent'};\n\n :hover {\n box-shadow: inset 4px 0 0 0 ${isSelected ? theme.colors.brand[400] : theme.colors.brand[300]};\n }\n\n :active {\n box-shadow: inset 4px 0 0 0 ${theme.colors.brand[400]};\n }\n`;\n\nexport const ItemHeader = (props: ComponentProps): JSX.Element => {\n const {\n item,\n item: {\n dsId,\n itemOpts: { label, RightComponent, BottomComponent, labelDataTestId, labelOverflow: itemLabelOverflow },\n CollapsedComponent = () => null,\n },\n ctx,\n ctx: {\n leftNavProps: { openedItem, labelOverflow: leftNavLabelOverflow, onItemClick },\n expandedForAnimation,\n setFocusedItem,\n selectedItem,\n selectedParent,\n },\n } = props;\n\n const labelOverflow = itemLabelOverflow || leftNavLabelOverflow;\n\n const opened = openedItem === dsId;\n\n const ariaLabel = item.itemOpts.ariaLabel ?? (typeof label === 'string' ? label : 'menuitem');\n\n const isSelected = selectedItem === dsId || selectedParent === dsId;\n\n const shadowStyle = useCallback(\n (opened_: boolean) => (theme: Theme) =>\n !opened_ ? notOpenedShadowStyle(isSelected)(theme) : `box-shadow: inset 4px 0 0 0 #52A6EC`,\n [isSelected],\n );\n\n return (\n <ItemRenderer\n item={{\n ...item,\n itemOpts: {\n ariaLabel,\n ariaExpanded: opened,\n ...item.itemOpts,\n openable: expandedForAnimation && !opened,\n closable: expandedForAnimation && opened,\n selectable: !opened,\n },\n }}\n hasBorderBottom\n borderBottomMr={opened ? '12px' : '0px'}\n shadowStyle={shadowStyle}\n >\n <StyledLeftContainer\n cols={opened ? ['auto', 'auto'] : ['38px']}\n gutter=\"1px\"\n pl={opened ? 'xxs' : 0}\n justifyItems=\"center\"\n data-testid=\"leftnav-leftcomponent\"\n >\n {opened && (\n <StyledChevronLeft\n size=\"m\"\n color={['brand-primary', 800]}\n onClick={(e: React.MouseEvent<HTMLElement>) => {\n onItemClick(item, e);\n }}\n data-testid=\"leftnav-leftcomponent-chevron\"\n tabIndex={0}\n onFocus={(e: React.FocusEvent) => {\n e.stopPropagation();\n setFocusedItem(CHEVRON_BACK_DS_ID);\n }}\n role=\"button\"\n aria-label={`Close ${ariaLabel}`}\n />\n )}\n {CollapsedComponent && <CollapsedComponent item={item} ctx={ctx} />}\n </StyledLeftContainer>\n <StyledItemLabel\n ml={opened ? 'xxs' : '1px'}\n mt=\"xxxs\"\n mb=\"15px\"\n data-testid={labelDataTestId || 'leftnav-itemlabel'}\n labelOverflow={labelOverflow}\n >\n {labelOverflow === 'truncate' ? <SimpleTruncatedTooltipText value={label} placement=\"bottom-start\" /> : label}\n </StyledItemLabel>\n <StyledRightContainer\n pl=\"xs\"\n pr={opened ? 'xxs2' : 'xxs'}\n onFocus={(e) => {\n setFocusedItem(null);\n e.stopPropagation();\n }}\n onKeyDown={(e) => e.stopPropagation()}\n data-testid=\"leftnav-right-component\"\n >\n {RightComponent && <RightComponent ctx={ctx} item={item} />}\n </StyledRightContainer>\n {BottomComponent && (\n <StyledBottomContainer\n pb=\"xxxs\"\n pl=\"xxs\"\n pr=\"xxs\"\n onFocus={(e) => {\n setFocusedItem(null);\n e.stopPropagation();\n }}\n onKeyDown={(e) => e.stopPropagation()}\n >\n <BottomComponent ctx={ctx} item={item} />\n </StyledBottomContainer>\n )}\n </ItemRenderer>\n );\n};\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACAvB;AAEA,SAAgB,mBAAmB;AACnC,SAAS,kCAAkC;AAE3C,SAAS,oBAAoB;AAE7B;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAS,0BAA0B;AAEnC,MAAM,uBAAuB,CAAC,eAAwB,CAAC,UACrD;AAAA,gCAC8B,aAAa,MAAM,OAAO,MAAM,OAAO;AAAA;AAAA;AAAA,kCAGrC,aAAa,MAAM,OAAO,MAAM,OAAO,MAAM,OAAO,MAAM;AAAA;AAAA;AAAA;AAAA,kCAI1D,MAAM,OAAO,MAAM;AAAA;AAAA;AAI9C,MAAM,aAAa,CAAC,UAAuC;AAChE,QAAM;AAAA,IACJ;AAAA,IACA,MAAM;AAAA,MACJ;AAAA,MACA,UAAU,EAAE,OAAO,gBAAgB,iBAAiB,iBAAiB,eAAe,kBAAkB;AAAA,MACtG,qBAAqB,MAAM;AAAA,IAC7B;AAAA,IACA;AAAA,IACA,KAAK;AAAA,MACH,cAAc,EAAE,YAAY,eAAe,sBAAsB,YAAY;AAAA,MAC7E;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAAA,EACF,IAAI;AAEJ,QAAM,gBAAgB,qBAAqB;AAE3C,QAAM,SAAS,eAAe;AAE9B,QAAM,YAAY,KAAK,SAAS,cAAc,OAAO,UAAU,WAAW,QAAQ;AAElF,QAAM,aAAa,iBAAiB,QAAQ,mBAAmB;AAE/D,QAAM,cAAc;AAAA,IAClB,CAAC,YAAqB,CAAC,UACrB,CAAC,UAAU,qBAAqB,UAAU,EAAE,KAAK,IAAI;AAAA,IACvD,CAAC,UAAU;AAAA,EACb;AAEA,SACE,qBAAC;AAAA,IACC,MAAM;AAAA,MAC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