@elliemae/ds-left-navigation 3.11.0-next.1 → 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,10 +1,9 @@
|
|
|
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 { StyledItemLabel, StyledLeftContainer, StyledRightContainer } from "../styled";
|
|
8
7
|
const notOpenedShadowStyle = (isSelected) => (theme) => `
|
|
9
8
|
box-shadow: inset 4px 0 0 0 ${isSelected ? theme.colors.brand[400] : "transparent"};
|
|
10
9
|
|
|
@@ -26,7 +25,7 @@ const ItemLink = (props) => {
|
|
|
26
25
|
},
|
|
27
26
|
ctx,
|
|
28
27
|
ctx: {
|
|
29
|
-
leftNavProps: { labelOverflow: leftNavLabelOverflow
|
|
28
|
+
leftNavProps: { labelOverflow: leftNavLabelOverflow },
|
|
30
29
|
selectedItem,
|
|
31
30
|
selectedParent
|
|
32
31
|
}
|
|
@@ -34,8 +33,8 @@ const ItemLink = (props) => {
|
|
|
34
33
|
const labelOverflow = itemLabelOverflow || leftNavLabelOverflow;
|
|
35
34
|
const isSelected = selectedItem === dsId || selectedParent === dsId;
|
|
36
35
|
const shadowStyle = useCallback(
|
|
37
|
-
(
|
|
38
|
-
[isSelected
|
|
36
|
+
(opened_) => (theme) => !opened_ ? notOpenedShadowStyle(isSelected)(theme) : `box-shadow: inset 4px 0 0 0 #52A6EC`,
|
|
37
|
+
[isSelected]
|
|
39
38
|
);
|
|
40
39
|
return /* @__PURE__ */ jsxs(ItemRenderer, {
|
|
41
40
|
item: {
|
|
@@ -49,18 +48,17 @@ const ItemLink = (props) => {
|
|
|
49
48
|
},
|
|
50
49
|
shadowStyle,
|
|
51
50
|
children: [
|
|
52
|
-
/* @__PURE__ */ jsx(
|
|
51
|
+
/* @__PURE__ */ jsx(StyledLeftContainer, {
|
|
53
52
|
cols: ["38px"],
|
|
54
53
|
gutter: "1px",
|
|
55
|
-
pl: 0,
|
|
56
54
|
justifyItems: "center",
|
|
57
55
|
"data-testid": "leftnav-leftcomponent",
|
|
58
|
-
children: /* @__PURE__ */ jsx(CollapsedComponent, {
|
|
56
|
+
children: CollapsedComponent && /* @__PURE__ */ jsx(CollapsedComponent, {
|
|
59
57
|
item,
|
|
60
58
|
ctx
|
|
61
59
|
})
|
|
62
60
|
}),
|
|
63
|
-
/* @__PURE__ */ jsx(
|
|
61
|
+
/* @__PURE__ */ jsx(StyledItemLabel, {
|
|
64
62
|
ml: "1px",
|
|
65
63
|
mt: "xxxs",
|
|
66
64
|
mb: "15px",
|
|
@@ -71,7 +69,7 @@ const ItemLink = (props) => {
|
|
|
71
69
|
placement: "bottom-start"
|
|
72
70
|
}) : label
|
|
73
71
|
}),
|
|
74
|
-
/* @__PURE__ */ jsx(
|
|
72
|
+
/* @__PURE__ */ jsx(StyledRightContainer, {
|
|
75
73
|
mt: "xxxs",
|
|
76
74
|
pr: "xxs2",
|
|
77
75
|
"data-testid": "leftnav-right-component",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/outOfTheBox/ItemLink/index.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable indent */\nimport React, { useCallback } from 'react';\nimport
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;ACAvB;AACA,SAAgB,mBAAmB;AACnC,
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable indent */\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 { StyledItemLabel, StyledLeftContainer, StyledRightContainer } from '../styled';\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 ItemLink = (props: ComponentProps): JSX.Element => {\n const {\n item,\n item: {\n dsId,\n itemOpts: { label, RightComponent, labelDataTestId, labelOverflow: itemLabelOverflow },\n CollapsedComponent = () => null,\n },\n ctx,\n ctx: {\n leftNavProps: { labelOverflow: leftNavLabelOverflow },\n selectedItem,\n selectedParent,\n },\n } = props;\n\n const labelOverflow = itemLabelOverflow || leftNavLabelOverflow;\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: typeof label === 'string' ? label : '',\n ariaRole: 'link',\n ...item.itemOpts,\n selectable: true,\n },\n }}\n shadowStyle={shadowStyle}\n >\n <StyledLeftContainer cols={['38px']} gutter=\"1px\" justifyItems=\"center\" data-testid=\"leftnav-leftcomponent\">\n {CollapsedComponent && <CollapsedComponent item={item} ctx={ctx} />}\n </StyledLeftContainer>\n <StyledItemLabel\n ml=\"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 mt=\"xxxs\" pr=\"xxs2\" data-testid=\"leftnav-right-component\">\n {RightComponent && <RightComponent ctx={ctx} item={item} />}\n </StyledRightContainer>\n </ItemRenderer>\n );\n};\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACAvB;AACA,SAAgB,mBAAmB;AACnC,SAAS,kCAAkC;AAE3C,SAAS,oBAAoB;AAE7B,SAAS,iBAAiB,qBAAqB,4BAA4B;AAE3E,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,WAAW,CAAC,UAAuC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AA;AAAA,GACF;AAEJ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,8 +1,13 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
-
import Grid from "@elliemae/ds-grid";
|
|
4
3
|
import { ItemRenderer } from "../../exported-related/index";
|
|
5
|
-
import {
|
|
4
|
+
import {
|
|
5
|
+
StyledSectionLabel,
|
|
6
|
+
StyledRightLabel,
|
|
7
|
+
StyledVerticalSeparator,
|
|
8
|
+
StyledRightContainer,
|
|
9
|
+
StyledSectionContainer
|
|
10
|
+
} from "../styled";
|
|
6
11
|
const ItemSection = (props) => {
|
|
7
12
|
const {
|
|
8
13
|
item,
|
|
@@ -21,7 +26,7 @@ const ItemSection = (props) => {
|
|
|
21
26
|
minHeight: "32px",
|
|
22
27
|
paddingTop: "8px",
|
|
23
28
|
children: [
|
|
24
|
-
/* @__PURE__ */ jsxs(
|
|
29
|
+
/* @__PURE__ */ jsxs(StyledSectionContainer, {
|
|
25
30
|
cols: ["min-content", "auto", "min-content", "auto"],
|
|
26
31
|
pl: "xxs",
|
|
27
32
|
alignItems: "center",
|
|
@@ -30,7 +35,7 @@ const ItemSection = (props) => {
|
|
|
30
35
|
ctx,
|
|
31
36
|
item
|
|
32
37
|
}) : /* @__PURE__ */ jsx("div", {}),
|
|
33
|
-
/* @__PURE__ */ jsx(
|
|
38
|
+
/* @__PURE__ */ jsx(StyledSectionLabel, {
|
|
34
39
|
"data-testid": labelDataTestId || "leftnav-section-item-label",
|
|
35
40
|
children: label
|
|
36
41
|
}),
|
|
@@ -40,7 +45,7 @@ const ItemSection = (props) => {
|
|
|
40
45
|
})
|
|
41
46
|
]
|
|
42
47
|
}),
|
|
43
|
-
/* @__PURE__ */ jsx(
|
|
48
|
+
/* @__PURE__ */ jsx(StyledRightContainer, {
|
|
44
49
|
ml: "auto",
|
|
45
50
|
onFocus: (e) => {
|
|
46
51
|
setFocusedItem(null);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/outOfTheBox/ItemSection/index.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;ACAvB;AACA,
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { ItemRenderer } from '../../exported-related/index';\nimport type { ComponentProps } from '../../index.d';\nimport {\n StyledSectionLabel,\n StyledRightLabel,\n StyledVerticalSeparator,\n StyledRightContainer,\n StyledSectionContainer,\n} from '../styled';\n\nexport const ItemSection = (props: ComponentProps): JSX.Element => {\n const {\n item,\n item: {\n itemOpts: { label, LeftComponent, RightComponent, labelRightSection, labelDataTestId },\n },\n ctx,\n ctx: { setFocusedItem },\n } = props;\n\n return (\n <ItemRenderer\n item={{\n ...item,\n itemOpts: { ...item.itemOpts, selectable: false, focuseable: false },\n CollapsedComponent: null,\n }}\n minHeight=\"32px\"\n paddingTop=\"8px\"\n >\n <StyledSectionContainer cols={['min-content', 'auto', 'min-content', 'auto']} pl=\"xxs\" alignItems=\"center\">\n {LeftComponent ? <LeftComponent ctx={ctx} item={item} /> : <div />}\n <StyledSectionLabel data-testid={labelDataTestId || 'leftnav-section-item-label'}>{label}</StyledSectionLabel>\n <StyledVerticalSeparator />\n <StyledRightLabel>{labelRightSection}</StyledRightLabel>\n </StyledSectionContainer>\n <StyledRightContainer\n ml=\"auto\"\n onFocus={(e) => {\n setFocusedItem(null);\n e.stopPropagation();\n }}\n onKeyDown={(e) => e.stopPropagation()}\n pr=\"xxs2\"\n alignItems=\"center\"\n data-testid=\"leftnav-right-component\"\n >\n {RightComponent && <RightComponent ctx={ctx} item={item} />}\n </StyledRightContainer>\n </ItemRenderer>\n );\n};\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,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React from "react";
|
|
|
2
2
|
import { jsx } from "react/jsx-runtime";
|
|
3
3
|
import { styled } from "@elliemae/ds-system";
|
|
4
4
|
import { ItemRenderer } from "../../exported-related/index";
|
|
5
|
-
|
|
5
|
+
import { DSLeftNavigationName, DSLeftNavigationSlots } from "../../constants";
|
|
6
|
+
const StyledSeparator = styled("div", { name: DSLeftNavigationName, slot: DSLeftNavigationSlots.ITEM_SEPARATOR })`
|
|
6
7
|
height: 1px;
|
|
7
8
|
background-color: ${(props) => props.theme.colors.neutral[100]};
|
|
8
9
|
width: auto;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/outOfTheBox/ItemSeparator/index.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { styled } from '@elliemae/ds-system';\nimport { ItemRenderer } from '../../exported-related/index';\nimport type { ComponentProps } from '../../index.d';\n\nconst StyledSeparator = styled.
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;ACAvB;AACA,SAAS,cAAc;AACvB,SAAS,oBAAoB;
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { styled } from '@elliemae/ds-system';\nimport { ItemRenderer } from '../../exported-related/index';\nimport { DSLeftNavigationName, DSLeftNavigationSlots } from '../../constants';\nimport type { ComponentProps } from '../../index.d';\n\nconst StyledSeparator = styled('div', { name: DSLeftNavigationName, slot: DSLeftNavigationSlots.ITEM_SEPARATOR })`\n height: 1px;\n background-color: ${(props) => props.theme.colors.neutral[100]};\n width: auto;\n margin: ${(props) => props.theme.space.xxxs} 0;\n margin-left: ${(props) => props.theme.space.xxxs};\n grid-column: span 3;\n`;\n\nexport const ItemSeparator = (props: ComponentProps): JSX.Element => {\n const { item } = props;\n return (\n <ItemRenderer\n item={{\n ...item,\n itemOpts: {\n ...item.itemOpts,\n selectable: false,\n focuseable: false,\n },\n CollapsedComponent: null,\n }}\n minHeight=\"1px\"\n paddingTop=\"0px\"\n >\n <StyledSeparator data-testid=\"leftnav-separator-subitem\" />\n </ItemRenderer>\n );\n};\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACAvB;AACA,SAAS,cAAc;AACvB,SAAS,oBAAoB;AAC7B,SAAS,sBAAsB,6BAA6B;AAG5D,MAAM,kBAAkB,OAAO,OAAO,EAAE,MAAM,sBAAsB,MAAM,sBAAsB,eAAe,CAAC;AAAA;AAAA,sBAE1F,CAAC,UAAU,MAAM,MAAM,OAAO,QAAQ;AAAA;AAAA,YAEhD,CAAC,UAAU,MAAM,MAAM,MAAM;AAAA,iBACxB,CAAC,UAAU,MAAM,MAAM,MAAM;AAAA;AAAA;AAIvC,MAAM,gBAAgB,CAAC,UAAuC;AACnE,QAAM,EAAE,KAAK,IAAI;AACjB,SACE,oBAAC;AAAA,IACC,MAAM;AAAA,MACJ,GAAG;AAAA,MACH,UAAU;AAAA,QACR,GAAG,KAAK;AAAA,QACR,YAAY;AAAA,QACZ,YAAY;AAAA,MACd;AAAA,MACA,oBAAoB;AAAA,IACtB;AAAA,IACA,WAAU;AAAA,IACV,YAAW;AAAA,IAEX,8BAAC;AAAA,MAAgB,eAAY;AAAA,KAA4B;AAAA,GAC3D;AAEJ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,11 +1,16 @@
|
|
|
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 { StyledLabel, StyledChevronLeft } from "./styled";
|
|
8
6
|
import { CHEVRON_BACK_DS_ID } from "../../exported-related/constants";
|
|
7
|
+
import {
|
|
8
|
+
StyledLeftContainer,
|
|
9
|
+
StyledChevronLeft,
|
|
10
|
+
StyledItemLabel,
|
|
11
|
+
StyledBottomContainer,
|
|
12
|
+
StyledRightContainer
|
|
13
|
+
} from "../styled";
|
|
9
14
|
const notOpenedShadowStyle = (isSelected) => (theme) => `
|
|
10
15
|
box-shadow: inset 4px 0 0 0 ${isSelected ? theme.colors.brand[400] : "transparent"};
|
|
11
16
|
|
|
@@ -38,8 +43,8 @@ const ItemSubmenu = (props) => {
|
|
|
38
43
|
const opened = openedItem === dsId;
|
|
39
44
|
const isSelected = selectedItem === dsId;
|
|
40
45
|
const shadowStyle = useCallback(
|
|
41
|
-
(
|
|
42
|
-
[dsId, isSelected,
|
|
46
|
+
(opened_) => (theme) => !opened_ ? notOpenedShadowStyle(isSelected || selectedParent === dsId)(theme) : `box-shadow: inset 4px 0 0 0 #52A6EC`,
|
|
47
|
+
[dsId, isSelected, selectedParent]
|
|
43
48
|
);
|
|
44
49
|
const ariaLabel = item.itemOpts.ariaLabel ?? (typeof label === "string" ? label : "menuitem");
|
|
45
50
|
return /* @__PURE__ */ jsxs(ItemRenderer, {
|
|
@@ -58,7 +63,7 @@ const ItemSubmenu = (props) => {
|
|
|
58
63
|
hasBorderBottom: opened,
|
|
59
64
|
borderBottomMr: "12px",
|
|
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 ItemSubmenu = (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 ItemSubmenu = (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) => {
|
|
@@ -112,7 +117,7 @@ const ItemSubmenu = (props) => {
|
|
|
112
117
|
item
|
|
113
118
|
})
|
|
114
119
|
}),
|
|
115
|
-
BottomComponent && /* @__PURE__ */ jsx(
|
|
120
|
+
BottomComponent && /* @__PURE__ */ jsx(StyledBottomContainer, {
|
|
116
121
|
style: { gridColumn: "span 3" },
|
|
117
122
|
pb: "xxxs",
|
|
118
123
|
pl: "xxs",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/outOfTheBox/ItemSubmenu/index.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable max-lines */\n/* eslint-disable complexity */\n/* eslint-disable indent */\nimport React, { useCallback } from 'react';\nimport
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;ACAvB;AAGA,SAAgB,mBAAmB;AACnC,
|
|
6
|
-
"names": [
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable max-lines */\n/* eslint-disable complexity */\n/* eslint-disable indent */\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 { CHEVRON_BACK_DS_ID } from '../../exported-related/constants';\nimport {\n StyledLeftContainer,\n StyledChevronLeft,\n StyledItemLabel,\n StyledBottomContainer,\n StyledRightContainer,\n} from '../styled';\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 ItemSubmenu = (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 selectedItem,\n selectedParent,\n setFocusedItem,\n },\n } = props;\n\n const labelOverflow = itemLabelOverflow || leftNavLabelOverflow;\n\n const opened = openedItem === dsId;\n\n const isSelected = selectedItem === dsId;\n\n const shadowStyle = useCallback(\n (opened_: boolean) => (theme: Theme) =>\n !opened_\n ? notOpenedShadowStyle(isSelected || selectedParent === dsId)(theme)\n : `box-shadow: inset 4px 0 0 0 #52A6EC`,\n [dsId, isSelected, selectedParent],\n );\n\n const ariaLabel = item.itemOpts.ariaLabel ?? (typeof label === 'string' ? label : 'menuitem');\n\n return (\n <ItemRenderer\n item={{\n ...item,\n itemOpts: {\n ...item.itemOpts,\n ariaLabel,\n ariaExpanded: opened,\n openable: expandedForAnimation && !opened,\n closable: expandedForAnimation && opened,\n selectable: !opened,\n },\n }}\n shadowStyle={shadowStyle}\n hasBorderBottom={opened}\n borderBottomMr=\"12px\"\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 e.stopPropagation();\n setFocusedItem(null);\n }}\n onKeyDown={(e) => e.stopPropagation()}\n onClick={(e) => openedItem === dsId && e.stopPropagation()}\n data-testid=\"leftnav-right-component\"\n >\n {RightComponent && <RightComponent ctx={ctx} item={item} />}\n </StyledRightContainer>\n {BottomComponent && (\n <StyledBottomContainer\n style={{ gridColumn: 'span 3' }}\n pb=\"xxxs\"\n pl=\"xxs\"\n pr=\"xxs\"\n onFocus={(e) => {\n e.stopPropagation();\n setFocusedItem(null);\n }}\n onKeyDown={(e) => e.stopPropagation()}\n onClick={(e) => openedItem && e.stopPropagation()}\n >\n <BottomComponent ctx={ctx} item={item} />\n </StyledBottomContainer>\n )}\n </ItemRenderer>\n );\n};\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAA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MACC,mBACC,oBAAC;AAAA,QACC,OAAO,EAAE,YAAY,SAAS;AAAA,QAC9B,IAAG;AAAA,QACH,IAAG;AAAA,QACH,IAAG;AAAA,QACH,SAAS,CAAC,MAAM;AACd,YAAE,gBAAgB;AAClB,yBAAe,IAAI;AAAA,QACrB;AAAA,QACA,WAAW,CAAC,MAAM,EAAE,gBAAgB;AAAA,QACpC,SAAS,CAAC,MAAM,cAAc,EAAE,gBAAgB;AAAA,QAEhD,8BAAC;AAAA,UAAgB;AAAA,UAAU;AAAA,SAAY;AAAA,OACzC;AAAA;AAAA,GAEJ;AAEJ;",
|
|
6
|
+
"names": []
|
|
7
7
|
}
|
|
@@ -2,7 +2,7 @@ import * as React from "react";
|
|
|
2
2
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
3
|
import { SimpleTruncatedTooltipText } from "@elliemae/ds-truncated-tooltip-text";
|
|
4
4
|
import { ItemRenderer } from "../../exported-related/index";
|
|
5
|
-
import { StyledLabel } from "
|
|
5
|
+
import { StyledLabel } from "../styled";
|
|
6
6
|
const ItemTextLabel = (props) => {
|
|
7
7
|
const {
|
|
8
8
|
item,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/outOfTheBox/ItemTextLabel/index.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { SimpleTruncatedTooltipText } from '@elliemae/ds-truncated-tooltip-text';\nimport { ItemRenderer } from '../../exported-related/index';\nimport type { ComponentProps } from '../../index.d';\nimport { StyledLabel } from '
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { SimpleTruncatedTooltipText } from '@elliemae/ds-truncated-tooltip-text';\nimport { ItemRenderer } from '../../exported-related/index';\nimport type { ComponentProps } from '../../index.d';\nimport { StyledLabel } from '../styled';\n\nexport const ItemTextLabel = (props: ComponentProps): JSX.Element => {\n const {\n item,\n item: {\n itemOpts: { label, labelOverflow: itemLabelOverflow, labelBold, labelColor, labelDataTestId },\n },\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 data-testid={labelDataTestId || 'leftnav-list-item-label'}\n pl=\"24px\"\n labelOverflow={labelOverflow}\n labelBold={labelBold}\n labelColor={labelColor}\n mr=\"xxs2\"\n pb=\"xxxs\"\n >\n {labelOverflow === 'truncate' ? <SimpleTruncatedTooltipText value={label} placement=\"bottom-start\" /> : label}\n </StyledLabel>\n </ItemRenderer>\n );\n};\n"],
|
|
5
5
|
"mappings": "AAAA,YAAY,WAAW;ACAvB;AACA,SAAS,kCAAkC;AAC3C,SAAS,oBAAoB;AAE7B,SAAS,mBAAmB;AAErB,MAAM,gBAAgB,CAAC,UAAuC;AACnE,QAAM;AAAA,IACJ;AAAA,IACA,MAAM;AAAA,MACJ,UAAU,EAAE,OAAO,eAAe,mBAAmB,WAAW,YAAY,gBAAgB;AAAA,IAC9F;AAAA,IACA,KAAK;AAAA,MACH,cAAc,EAAE,eAAe,qBAAqB;AAAA,IACtD;AAAA,EACF,IAAI;AAEJ,QAAM,gBAAgB,qBAAqB;AAE3C,SACE,qBAAC;AAAA,IACC,MAAM;AAAA,MACJ,GAAG;AAAA,MACH,oBAAoB;AAAA,IACtB;AAAA,IACA,WAAU;AAAA,IACV,YAAW;AAAA,IAEgB;AAAA;AAAA,MAAC,oBAAC,SAAI;AAAA,MACjC,oBAAC;AAAA,QACC,eAAa,mBAAmB;AAAA,QAChC,IAAG;AAAA,QACH;AAAA,QACA;AAAA,QACA;AAAA,QACA,IAAG;AAAA,QACH,IAAG;AAAA,QAEF,4BAAkB,aAAa,oBAAC;AAAA,UAA2B,OAAO;AAAA,UAAO,WAAU;AAAA,SAAe,IAAK;AAAA,OAC1G;AAAA;AAAA,GACF;AAEJ;",
|
|
6
6
|
"names": []
|
|
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, useCallback, useEffect } 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, StyledRightContainer, StyledArrowContainer } 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
|
|
@@ -82,13 +83,13 @@ const ItemUncontrolledDrilldown = (props) => {
|
|
|
82
83
|
item: subitem,
|
|
83
84
|
ctx
|
|
84
85
|
}, subitem.dsId));
|
|
85
|
-
}, [items, opened]);
|
|
86
|
+
}, [ctx, items, opened]);
|
|
86
87
|
const handleOnClick = useCallback(() => {
|
|
87
88
|
if (opened)
|
|
88
89
|
setOpenedDrilldowns(openedDrilldowns.filter((openedDrilldown) => openedDrilldown !== dsId));
|
|
89
90
|
else
|
|
90
91
|
setOpenedDrilldowns([...openedDrilldowns, dsId]);
|
|
91
|
-
}, [opened, setOpenedDrilldowns, openedDrilldowns]);
|
|
92
|
+
}, [opened, setOpenedDrilldowns, openedDrilldowns, dsId]);
|
|
92
93
|
return /* @__PURE__ */ jsxs(ItemRenderer, {
|
|
93
94
|
item: {
|
|
94
95
|
...item,
|
|
@@ -106,7 +107,7 @@ const ItemUncontrolledDrilldown = (props) => {
|
|
|
106
107
|
paddingTop: "8px",
|
|
107
108
|
onClick: handleOnClick,
|
|
108
109
|
children: [
|
|
109
|
-
/* @__PURE__ */ jsx(
|
|
110
|
+
/* @__PURE__ */ jsx(StyledArrowContainer, {
|
|
110
111
|
pl: "xxs",
|
|
111
112
|
mt: "-2px",
|
|
112
113
|
children: arrowIcon
|
|
@@ -122,22 +123,21 @@ const ItemUncontrolledDrilldown = (props) => {
|
|
|
122
123
|
placement: "bottom-start"
|
|
123
124
|
}) : label
|
|
124
125
|
}),
|
|
125
|
-
/* @__PURE__ */ jsxs(
|
|
126
|
+
/* @__PURE__ */ jsxs(StyledRightContainer, {
|
|
126
127
|
pr: "xxs2",
|
|
127
128
|
cols: ["auto", "auto"],
|
|
128
129
|
alignItems: "center",
|
|
130
|
+
gutter: "xxs",
|
|
131
|
+
"data-testid": "leftnav-right-component",
|
|
129
132
|
children: [
|
|
130
133
|
/* @__PURE__ */ jsx(StyledDate, {
|
|
131
134
|
ml: "xxs",
|
|
132
135
|
"data-testid": "leftnav-list-item-date",
|
|
133
136
|
children: labelRightSection
|
|
134
137
|
}),
|
|
135
|
-
/* @__PURE__ */ jsx(
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
ctx,
|
|
139
|
-
item
|
|
140
|
-
})
|
|
138
|
+
RightComponent && /* @__PURE__ */ jsx(RightComponent, {
|
|
139
|
+
ctx,
|
|
140
|
+
item
|
|
141
141
|
})
|
|
142
142
|
]
|
|
143
143
|
})
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
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
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;ACAvB;AACA,SAAgB,SAAS,aAAa,iBAAiB;AACvD,
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable max-lines */\nimport React, { useMemo, useCallback, useEffect } 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, StyledRightContainer, StyledArrowContainer } 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: 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 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 as string]);\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n\n const opened = openedDrilldowns.includes(dsId as string);\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 }, [ctx, items, opened]);\n\n const handleOnClick = useCallback(() => {\n if (opened) setOpenedDrilldowns(openedDrilldowns.filter((openedDrilldown) => openedDrilldown !== dsId));\n else setOpenedDrilldowns([...openedDrilldowns, dsId as string]);\n }, [opened, setOpenedDrilldowns, openedDrilldowns, dsId]);\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 <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;AACA,SAAgB,SAAS,aAAa,iBAAiB;AACvD,SAAS,kCAAkC;AAC3C,SAAS,eAAe,sBAAsB;AAC9C,SAAS,cAAc,kBAAkB;AACzC,SAAS,aAAa,YAAY,sBAAsB,4BAA4B;AACpF,SAAS,qBAAqB;AAC9B,SAAS,oBAAoB;AAC7B,SAAS,qBAAqB;AAI9B,MAAM,gCAAqF;AAAA,EACzF,CAAC,WAAW,0BAA0B;AAAA,EACtC,CAAC,WAAW,0BAA0B;AAAA,EACtC,CAAC,WAAW,2BAA2B;AACzC;AAEA,MAAM,wBAA6D,CAAC,UAAU;AAC5E,QAAM;AAAA,IACJ;AAAA,IACA,MAAM,EAAE,MAAM,UAAU;AAAA,IACxB;AAAA,EACF,IAAI;AAEJ,MAAI,OAAO,SAAS,YAAY,CAAC,CAAC,8BAA8B,OAAO;AACrE,UAAM,uBAAuB,8BAA8B;AAC3D,UAAM,gBAAgB,KAAK,UAAU,UAAU;AAC/C,UAAM,UAAU;AAAA,MACd,GAAG;AAAA,MACH,UAAU,EAAE,GAAG,KAAK,UAAU,QAAQ,gBAAgB,GAAG;AAAA,IAC3D;AACA,WAAO,oBAAC;AAAA,MAAqB,MAAM;AAAA,MAAS;AAAA,KAAU;AAAA,EACxD;AACA,MAAI,CAAC;AAAW,WAA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AqB,kBAAkB,IAAI,CAAC;AAExD,SACE,qBAAC;AAAA,IACC,MAAM;AAAA,MACJ,GAAG;AAAA,MACH,UAAU;AAAA,QACR,cAAc;AAAA,QACd,UAAU;AAAA,QACV,GAAG,KAAK;AAAA,QACR,UAAU,CAAC;AAAA,QACX,UAAU;AAAA,MACZ;AAAA,MACA,oBAAoB;AAAA,IACtB;AAAA,IACA;AAAA,IACA,WAAU;AAAA,IACV,YAAW;AAAA,IACX,SAAS;AAAA,IAET;AAAA,0BAAC;AAAA,QAAqB,IAAG;AAAA,QAAM,IAAG;AAAA,QAC/B;AAAA,OACH;AAAA,MACA,oBAAC;AAAA,QACC,IAAG;AAAA,QACH,eAAa,mBAAmB;AAAA,QAChC;AAAA,QACA;AAAA,QACA;AAAA,QAEC,4BAAkB,aAAa,oBAAC;AAAA,UAA2B,OAAO;AAAA,UAAO,WAAU;AAAA,SAAe,IAAK;AAAA,OAC1G;AAAA,MACA,qBAAC;AAAA,QACC,IAAG;AAAA,QACH,MAAM,CAAC,QAAQ,MAAM;AAAA,QACrB,YAAW;AAAA,QACX,QAAO;AAAA,QACP,eAAY;AAAA,QAEZ;AAAA,8BAAC;AAAA,YAAW,IAAG;AAAA,YAAM,eAAY;AAAA,YAC9B;AAAA,WACH;AAAA,UACC,kBAAkB,oBAAC;AAAA,YAAe;AAAA,YAAU;AAAA,WAAY;AAAA;AAAA,OAC3D;AAAA;AAAA,GACF;AAEJ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
-
import Grid from "@elliemae/ds-grid";
|
|
4
3
|
import { SimpleTruncatedTooltipText } from "@elliemae/ds-truncated-tooltip-text";
|
|
5
4
|
import { ItemRenderer } from "../../exported-related/index";
|
|
6
|
-
import { StyledLabel, StyledDate } from "
|
|
5
|
+
import { StyledRightContainer, StyledLabel, StyledDate } from "../styled";
|
|
7
6
|
const ItemWithDate = (props) => {
|
|
8
7
|
const {
|
|
9
8
|
item,
|
|
@@ -46,23 +45,21 @@ const ItemWithDate = (props) => {
|
|
|
46
45
|
placement: "bottom-start"
|
|
47
46
|
}) : label
|
|
48
47
|
}),
|
|
49
|
-
/* @__PURE__ */ jsxs(
|
|
48
|
+
/* @__PURE__ */ jsxs(StyledRightContainer, {
|
|
50
49
|
pr: "xxs2",
|
|
51
50
|
cols: ["auto", "auto"],
|
|
52
51
|
alignItems: "center",
|
|
52
|
+
gutter: "xxs",
|
|
53
|
+
"data-testid": "leftnav-right-component",
|
|
53
54
|
children: [
|
|
54
55
|
/* @__PURE__ */ jsx(StyledDate, {
|
|
55
56
|
ml: "xxs",
|
|
56
57
|
"data-testid": "leftnav-list-item-date",
|
|
57
58
|
children: labelRightSection
|
|
58
59
|
}),
|
|
59
|
-
/* @__PURE__ */ jsx(
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
children: RightComponent && /* @__PURE__ */ jsx(RightComponent, {
|
|
63
|
-
ctx,
|
|
64
|
-
item
|
|
65
|
-
})
|
|
60
|
+
RightComponent && /* @__PURE__ */ jsx(RightComponent, {
|
|
61
|
+
ctx,
|
|
62
|
+
item
|
|
66
63
|
})
|
|
67
64
|
]
|
|
68
65
|
})
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
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
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;ACAvB;AACA,
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { SimpleTruncatedTooltipText } from '@elliemae/ds-truncated-tooltip-text';\nimport { ItemRenderer } from '../../exported-related/index';\nimport type { ComponentProps } from '../../index.d';\nimport { StyledRightContainer, 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 <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;AACA,SAAS,kCAAkC;AAC3C,SAAS,oBAAoB;AAE7B,SAAS,sBAAsB,aAAa,kBAAkB;AAEvD,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,MACF;AAAA,IACF;AAAA,IACA;AAAA,IACA,KAAK;AAAA,MACH,cAAc,EAAE,eAAe,qBAAqB;AAAA,IACtD;AAAA,EACF,IAAI;AAEJ,QAAM,gBAAgB,qBAAqB;AAE3C,SACE,qBAAC;AAAA,IACC,MAAM;AAAA,MACJ,GAAG;AAAA,MACH,oBAAoB;AAAA,IACtB;AAAA,IACA,WAAU;AAAA,IACV,YAAW;AAAA,IAEgB;AAAA;AAAA,MAAC,oBAAC,SAAI;AAAA,MACjC,oBAAC;AAAA,QACC,IAAG;AAAA,QACH,IAAG;AAAA,QACH,eAAa,mBAAmB;AAAA,QAChC;AAAA,QACA;AAAA,QACA;AAAA,QAEC,4BAAkB,aAAa,oBAAC;AAAA,UAA2B,OAAO;AAAA,UAAO,WAAU;AAAA,SAAe,IAAK;AAAA,OAC1G;AAAA,MACA,qBAAC;AAAA,QACC,IAAG;AAAA,QACH,MAAM,CAAC,QAAQ,MAAM;AAAA,QACrB,YAAW;AAAA,QACX,QAAO;AAAA,QACP,eAAY;AAAA,QAEZ;AAAA,8BAAC;AAAA,YAAW,IAAG;AAAA,YAAM,eAAY;AAAA,YAC9B;AAAA,WACH;AAAA,UACC,kBAAkB,oBAAC;AAAA,YAAe;AAAA,YAAU;AAAA,WAAY;AAAA;AAAA,OAC3D;AAAA;AAAA,GACF;AAEJ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { styled } from "@elliemae/ds-system";
|
|
3
|
+
import { Grid } from "@elliemae/ds-grid";
|
|
4
|
+
import { ChevronSmallLeft } from "@elliemae/ds-icons";
|
|
5
|
+
import { DSLeftNavigationName, DSLeftNavigationSlots } from "../constants";
|
|
6
|
+
const StyledLabel = styled(Grid, {
|
|
7
|
+
name: DSLeftNavigationName,
|
|
8
|
+
slot: DSLeftNavigationSlots.ITEM_LABEL
|
|
9
|
+
})`
|
|
10
|
+
font-size: 13px;
|
|
11
|
+
font-weight: ${(props) => props.labelBold ? props.theme.fontWeights.semibold : props.theme.fontWeights.regular};
|
|
12
|
+
color: ${({ labelColor, theme }) => labelColor ? theme.colors[labelColor[0]][labelColor[1]] : theme.colors.neutral[800]};
|
|
13
|
+
line-height: 14px;
|
|
14
|
+
word-break: ${(props) => props.labelOverflow === "wrapAll" ? "break-all" : "normal"};
|
|
15
|
+
`;
|
|
16
|
+
const StyledDate = styled(Grid, { name: DSLeftNavigationName, slot: DSLeftNavigationSlots.ITEM_DATE })`
|
|
17
|
+
font-size: 12px;
|
|
18
|
+
color: ${(props) => props.theme.colors.neutral[600]};
|
|
19
|
+
line-height: 14px;
|
|
20
|
+
`;
|
|
21
|
+
const StyledArrowContainer = styled(Grid, {
|
|
22
|
+
name: DSLeftNavigationName,
|
|
23
|
+
slot: DSLeftNavigationSlots.ARROW_CONTAINER
|
|
24
|
+
})``;
|
|
25
|
+
const StyledRightContainer = styled(Grid, {
|
|
26
|
+
name: DSLeftNavigationName,
|
|
27
|
+
slot: DSLeftNavigationSlots.RIGHT_CONTAINER
|
|
28
|
+
})``;
|
|
29
|
+
const StyledSectionLabel = styled("span", {
|
|
30
|
+
name: DSLeftNavigationName,
|
|
31
|
+
slot: DSLeftNavigationSlots.SECTION_LABEL
|
|
32
|
+
})`
|
|
33
|
+
font-size: 13px;
|
|
34
|
+
color: ${(props) => props.theme.colors.neutral[700]};
|
|
35
|
+
margin-left: ${(props) => props.theme.space.xxs};
|
|
36
|
+
line-height: 13px;
|
|
37
|
+
`;
|
|
38
|
+
const StyledVerticalSeparator = styled("div", {
|
|
39
|
+
name: DSLeftNavigationName,
|
|
40
|
+
slot: DSLeftNavigationSlots.VERTICAL_SEPARATOR
|
|
41
|
+
})`
|
|
42
|
+
margin: 0 ${(props) => props.theme.space.xxs};
|
|
43
|
+
width: 1px;
|
|
44
|
+
height: 13px;
|
|
45
|
+
background: ${(props) => props.theme.colors.neutral[600]};
|
|
46
|
+
`;
|
|
47
|
+
const StyledRightLabel = styled("span", {
|
|
48
|
+
name: DSLeftNavigationName,
|
|
49
|
+
slot: DSLeftNavigationSlots.SECTION_RIGHT_LABEL
|
|
50
|
+
})`
|
|
51
|
+
font-size: 12px;
|
|
52
|
+
line-height: 13px;
|
|
53
|
+
`;
|
|
54
|
+
const StyledSectionContainer = styled(Grid, {
|
|
55
|
+
name: DSLeftNavigationName,
|
|
56
|
+
slot: DSLeftNavigationSlots.SECTION_CONTAINER
|
|
57
|
+
})``;
|
|
58
|
+
const StyledBottomContainer = styled(Grid, {
|
|
59
|
+
name: DSLeftNavigationName,
|
|
60
|
+
slot: DSLeftNavigationSlots.BOTTOM_CONTAINER
|
|
61
|
+
})`
|
|
62
|
+
grid-column: span 3;
|
|
63
|
+
`;
|
|
64
|
+
const StyledLeftContainer = styled(Grid, {
|
|
65
|
+
name: DSLeftNavigationName,
|
|
66
|
+
slot: DSLeftNavigationSlots.LEFT_CONTAINER
|
|
67
|
+
})``;
|
|
68
|
+
const StyledItemLabel = styled(Grid, { name: DSLeftNavigationName, slot: DSLeftNavigationSlots.ITEM_LABEL })`
|
|
69
|
+
font-size: 14px;
|
|
70
|
+
color: ${(props) => props.theme.colors.neutral[800]};
|
|
71
|
+
word-break: ${(props) => props.labelOverflow === "wrapAll" ? "break-all" : "normal"};
|
|
72
|
+
`;
|
|
73
|
+
const StyledChevronLeft = styled(ChevronSmallLeft, {
|
|
74
|
+
name: DSLeftNavigationName,
|
|
75
|
+
slot: DSLeftNavigationSlots.ITEM_CHEVRON_BACK
|
|
76
|
+
})`
|
|
77
|
+
cursor: pointer;
|
|
78
|
+
:focus {
|
|
79
|
+
outline: 2px solid ${(props) => props.theme.colors.brand[800]};
|
|
80
|
+
}
|
|
81
|
+
`;
|
|
82
|
+
export {
|
|
83
|
+
StyledArrowContainer,
|
|
84
|
+
StyledBottomContainer,
|
|
85
|
+
StyledChevronLeft,
|
|
86
|
+
StyledDate,
|
|
87
|
+
StyledItemLabel,
|
|
88
|
+
StyledLabel,
|
|
89
|
+
StyledLeftContainer,
|
|
90
|
+
StyledRightContainer,
|
|
91
|
+
StyledRightLabel,
|
|
92
|
+
StyledSectionContainer,
|
|
93
|
+
StyledSectionLabel,
|
|
94
|
+
StyledVerticalSeparator
|
|
95
|
+
};
|
|
96
|
+
//# sourceMappingURL=styled.js.map
|