@elliemae/ds-left-navigation 3.12.0-rc.2 → 3.12.0-rc.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/LeftNavigation.js +1 -4
- package/dist/cjs/LeftNavigation.js.map +1 -1
- package/dist/cjs/exported-related/ChevronItem/index.js +1 -5
- package/dist/cjs/exported-related/ChevronItem/index.js.map +1 -1
- package/dist/cjs/exported-related/Icon/index.js +1 -5
- package/dist/cjs/exported-related/Icon/index.js.map +1 -1
- package/dist/cjs/exported-related/ItemRenderer/index.js +10 -19
- package/dist/cjs/exported-related/ItemRenderer/index.js.map +1 -1
- package/dist/cjs/exported-related/Notifications/index.js +8 -46
- package/dist/cjs/exported-related/Notifications/index.js.map +1 -1
- package/dist/cjs/exported-related/OpenWindowItem/index.js +1 -5
- package/dist/cjs/exported-related/OpenWindowItem/index.js.map +1 -1
- package/dist/cjs/outOfTheBox/ItemControlledDrilldown/index.js +50 -68
- package/dist/cjs/outOfTheBox/ItemControlledDrilldown/index.js.map +1 -1
- package/dist/cjs/outOfTheBox/ItemHeader/index.js +87 -81
- package/dist/cjs/outOfTheBox/ItemHeader/index.js.map +1 -1
- package/dist/cjs/outOfTheBox/ItemLink/index.js +30 -44
- package/dist/cjs/outOfTheBox/ItemLink/index.js.map +1 -1
- package/dist/cjs/outOfTheBox/ItemSection/index.js +34 -44
- package/dist/cjs/outOfTheBox/ItemSection/index.js.map +1 -1
- package/dist/cjs/outOfTheBox/ItemSeparator/index.js +16 -15
- package/dist/cjs/outOfTheBox/ItemSeparator/index.js.map +1 -1
- package/dist/cjs/outOfTheBox/ItemSubmenu/index.js +90 -84
- package/dist/cjs/outOfTheBox/ItemSubmenu/index.js.map +1 -1
- package/dist/cjs/outOfTheBox/ItemTextLabel/index.js +28 -25
- package/dist/cjs/outOfTheBox/ItemTextLabel/index.js.map +1 -1
- package/dist/cjs/outOfTheBox/ItemUncontrolledDrilldown/index.js +51 -69
- package/dist/cjs/outOfTheBox/ItemUncontrolledDrilldown/index.js.map +1 -1
- package/dist/cjs/outOfTheBox/ItemWithDate/index.js +41 -42
- package/dist/cjs/outOfTheBox/ItemWithDate/index.js.map +1 -1
- package/dist/cjs/parts/LeftNavContent/index.js +51 -54
- package/dist/cjs/parts/LeftNavContent/index.js.map +1 -1
- package/dist/cjs/parts/LeftNavFooterItem/index.js +19 -24
- package/dist/cjs/parts/LeftNavFooterItem/index.js.map +1 -1
- package/dist/cjs/parts/LeftNavLoading/index.js +5 -4
- package/dist/cjs/parts/LeftNavLoading/index.js.map +1 -1
- package/dist/cjs/parts/OutOfTheBoxMapItem.js +2 -8
- package/dist/cjs/parts/OutOfTheBoxMapItem.js.map +1 -1
- package/dist/esm/LeftNavigation.js +1 -4
- package/dist/esm/LeftNavigation.js.map +1 -1
- package/dist/esm/exported-related/ChevronItem/index.js +1 -5
- package/dist/esm/exported-related/ChevronItem/index.js.map +1 -1
- package/dist/esm/exported-related/Icon/index.js +1 -5
- package/dist/esm/exported-related/Icon/index.js.map +1 -1
- package/dist/esm/exported-related/ItemRenderer/index.js +10 -19
- package/dist/esm/exported-related/ItemRenderer/index.js.map +1 -1
- package/dist/esm/exported-related/Notifications/index.js +8 -46
- package/dist/esm/exported-related/Notifications/index.js.map +1 -1
- package/dist/esm/exported-related/OpenWindowItem/index.js +1 -5
- package/dist/esm/exported-related/OpenWindowItem/index.js.map +1 -1
- package/dist/esm/outOfTheBox/ItemControlledDrilldown/index.js +50 -68
- package/dist/esm/outOfTheBox/ItemControlledDrilldown/index.js.map +1 -1
- package/dist/esm/outOfTheBox/ItemHeader/index.js +87 -81
- package/dist/esm/outOfTheBox/ItemHeader/index.js.map +1 -1
- package/dist/esm/outOfTheBox/ItemLink/index.js +30 -44
- package/dist/esm/outOfTheBox/ItemLink/index.js.map +1 -1
- package/dist/esm/outOfTheBox/ItemSection/index.js +34 -44
- package/dist/esm/outOfTheBox/ItemSection/index.js.map +1 -1
- package/dist/esm/outOfTheBox/ItemSeparator/index.js +16 -15
- package/dist/esm/outOfTheBox/ItemSeparator/index.js.map +1 -1
- package/dist/esm/outOfTheBox/ItemSubmenu/index.js +90 -84
- package/dist/esm/outOfTheBox/ItemSubmenu/index.js.map +1 -1
- package/dist/esm/outOfTheBox/ItemTextLabel/index.js +28 -25
- package/dist/esm/outOfTheBox/ItemTextLabel/index.js.map +1 -1
- package/dist/esm/outOfTheBox/ItemUncontrolledDrilldown/index.js +51 -69
- package/dist/esm/outOfTheBox/ItemUncontrolledDrilldown/index.js.map +1 -1
- package/dist/esm/outOfTheBox/ItemWithDate/index.js +41 -42
- package/dist/esm/outOfTheBox/ItemWithDate/index.js.map +1 -1
- package/dist/esm/parts/LeftNavContent/index.js +51 -54
- package/dist/esm/parts/LeftNavContent/index.js.map +1 -1
- package/dist/esm/parts/LeftNavFooterItem/index.js +19 -24
- package/dist/esm/parts/LeftNavFooterItem/index.js.map +1 -1
- package/dist/esm/parts/LeftNavLoading/index.js +5 -4
- package/dist/esm/parts/LeftNavLoading/index.js.map +1 -1
- package/dist/esm/parts/OutOfTheBoxMapItem.js +2 -8
- package/dist/esm/parts/OutOfTheBoxMapItem.js.map +1 -1
- package/package.json +7 -7
|
@@ -36,50 +36,36 @@ const ItemLink = (props) => {
|
|
|
36
36
|
(opened_) => (theme) => !opened_ ? notOpenedShadowStyle(isSelected)(theme) : `box-shadow: inset 4px 0 0 0 #52A6EC`,
|
|
37
37
|
[isSelected]
|
|
38
38
|
);
|
|
39
|
-
return /* @__PURE__ */ jsxs(
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
gutter: "1px",
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
"data-testid":
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
placement: "bottom-start"
|
|
70
|
-
}) : label
|
|
71
|
-
}),
|
|
72
|
-
/* @__PURE__ */ jsx(StyledRightContainer, {
|
|
73
|
-
mt: "xxxs",
|
|
74
|
-
pr: "xxs2",
|
|
75
|
-
"data-testid": "leftnav-right-component",
|
|
76
|
-
children: RightComponent && /* @__PURE__ */ jsx(RightComponent, {
|
|
77
|
-
ctx,
|
|
78
|
-
item
|
|
79
|
-
})
|
|
80
|
-
})
|
|
81
|
-
]
|
|
82
|
-
});
|
|
39
|
+
return /* @__PURE__ */ jsxs(
|
|
40
|
+
ItemRenderer,
|
|
41
|
+
{
|
|
42
|
+
item: {
|
|
43
|
+
...item,
|
|
44
|
+
itemOpts: {
|
|
45
|
+
ariaLabel: typeof label === "string" ? label : "",
|
|
46
|
+
ariaRole: "link",
|
|
47
|
+
...item.itemOpts,
|
|
48
|
+
selectable: true
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
shadowStyle,
|
|
52
|
+
children: [
|
|
53
|
+
/* @__PURE__ */ jsx(StyledLeftContainer, { cols: ["38px"], gutter: "1px", justifyItems: "center", "data-testid": "leftnav-leftcomponent", children: CollapsedComponent && /* @__PURE__ */ jsx(CollapsedComponent, { item, ctx }) }),
|
|
54
|
+
/* @__PURE__ */ jsx(
|
|
55
|
+
StyledItemLabel,
|
|
56
|
+
{
|
|
57
|
+
ml: "1px",
|
|
58
|
+
mt: "xxxs",
|
|
59
|
+
mb: "15px",
|
|
60
|
+
"data-testid": labelDataTestId || "leftnav-itemlabel",
|
|
61
|
+
labelOverflow,
|
|
62
|
+
children: labelOverflow === "truncate" ? /* @__PURE__ */ jsx(SimpleTruncatedTooltipText, { value: label, placement: "bottom-start" }) : label
|
|
63
|
+
}
|
|
64
|
+
),
|
|
65
|
+
/* @__PURE__ */ jsx(StyledRightContainer, { mt: "xxxs", pr: "xxs2", "data-testid": "leftnav-right-component", children: RightComponent && /* @__PURE__ */ jsx(RightComponent, { ctx, item }) })
|
|
66
|
+
]
|
|
67
|
+
}
|
|
68
|
+
);
|
|
83
69
|
};
|
|
84
70
|
export {
|
|
85
71
|
ItemLink
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/outOfTheBox/ItemLink/index.tsx"],
|
|
4
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 type { 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;ACgDnB,SAa2B,KAb3B;AA/CJ,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;AAC9D,QAAM;AAAA,IACJ;AAAA,IACA,MAAM;AAAA,MACJ;AAAA,MACA,UAAU,EAAE,OAAO,gBAAgB,iBAAiB,eAAe,kBAAkB;AAAA,MACrF,qBAAqB,MAAM;AAAA,IAC7B;AAAA,IACA;AAAA,IACA,KAAK;AAAA,MACH,cAAc,EAAE,e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AM;AAAA,QACJ,GAAG;AAAA,QACH,UAAU;AAAA,UACR,WAAW,OAAO,UAAU,WAAW,QAAQ;AAAA,UAC/C,UAAU;AAAA,UACV,GAAG,KAAK;AAAA,UACR,YAAY;AAAA,QACd;AAAA,MACF;AAAA,MACA;AAAA,MAEA;AAAA,4BAAC,uBAAoB,MAAM,CAAC,MAAM,GAAG,QAAO,OAAM,cAAa,UAAS,eAAY,yBACjF,gCAAsB,oBAAC,sBAAmB,MAAY,KAAU,GACnE;AAAA,QACA;AAAA,UAAC;AAAA;AAAA,YACC,IAAG;AAAA,YACH,IAAG;AAAA,YACH,IAAG;AAAA,YACH,eAAa,mBAAmB;AAAA,YAChC;AAAA,YAEC,4BAAkB,aAAa,oBAAC,8BAA2B,OAAO,OAAO,WAAU,gBAAe,IAAK;AAAA;AAAA,QAC1G;AAAA,QACA,oBAAC,wBAAqB,IAAG,QAAO,IAAG,QAAO,eAAY,2BACnD,4BAAkB,oBAAC,kBAAe,KAAU,MAAY,GAC3D;AAAA;AAAA;AAAA,EACF;AAEJ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -17,51 +17,41 @@ const ItemSection = (props) => {
|
|
|
17
17
|
ctx,
|
|
18
18
|
ctx: { setFocusedItem }
|
|
19
19
|
} = props;
|
|
20
|
-
return /* @__PURE__ */ jsxs(
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
pl: "xxs",
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
LeftComponent ? /* @__PURE__ */ jsx(LeftComponent, {
|
|
35
|
-
ctx,
|
|
36
|
-
item
|
|
37
|
-
}) : /* @__PURE__ */ jsx("div", {}),
|
|
38
|
-
/* @__PURE__ */ jsx(StyledSectionLabel, {
|
|
39
|
-
"data-testid": labelDataTestId || "leftnav-section-item-label",
|
|
40
|
-
children: label
|
|
41
|
-
}),
|
|
20
|
+
return /* @__PURE__ */ jsxs(
|
|
21
|
+
ItemRenderer,
|
|
22
|
+
{
|
|
23
|
+
item: {
|
|
24
|
+
...item,
|
|
25
|
+
itemOpts: { ...item.itemOpts, selectable: false, focuseable: false },
|
|
26
|
+
CollapsedComponent: null
|
|
27
|
+
},
|
|
28
|
+
minHeight: "32px",
|
|
29
|
+
paddingTop: "8px",
|
|
30
|
+
children: [
|
|
31
|
+
/* @__PURE__ */ jsxs(StyledSectionContainer, { cols: ["min-content", "auto", "min-content", "auto"], pl: "xxs", alignItems: "center", children: [
|
|
32
|
+
LeftComponent ? /* @__PURE__ */ jsx(LeftComponent, { ctx, item }) : /* @__PURE__ */ jsx("div", {}),
|
|
33
|
+
/* @__PURE__ */ jsx(StyledSectionLabel, { "data-testid": labelDataTestId || "leftnav-section-item-label", children: label }),
|
|
42
34
|
/* @__PURE__ */ jsx(StyledVerticalSeparator, {}),
|
|
43
|
-
/* @__PURE__ */ jsx(StyledRightLabel, {
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
]
|
|
64
|
-
});
|
|
35
|
+
/* @__PURE__ */ jsx(StyledRightLabel, { children: labelRightSection })
|
|
36
|
+
] }),
|
|
37
|
+
/* @__PURE__ */ jsx(
|
|
38
|
+
StyledRightContainer,
|
|
39
|
+
{
|
|
40
|
+
ml: "auto",
|
|
41
|
+
onFocus: (e) => {
|
|
42
|
+
setFocusedItem(null);
|
|
43
|
+
e.stopPropagation();
|
|
44
|
+
},
|
|
45
|
+
onKeyDown: (e) => e.stopPropagation(),
|
|
46
|
+
pr: "xxs2",
|
|
47
|
+
alignItems: "center",
|
|
48
|
+
"data-testid": "leftnav-right-component",
|
|
49
|
+
children: RightComponent && /* @__PURE__ */ jsx(RightComponent, { ctx, item })
|
|
50
|
+
}
|
|
51
|
+
)
|
|
52
|
+
]
|
|
53
|
+
}
|
|
54
|
+
);
|
|
65
55
|
};
|
|
66
56
|
export {
|
|
67
57
|
ItemSection
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/outOfTheBox/ItemSection/index.tsx"],
|
|
4
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} />}\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B,6BAAkB;AAAA,WACvC;AAAA,QACA;AAAA,UAAC;AAAA;AAAA,YACC,IAAG;AAAA,YACH,SAAS,CAAC,MAAM;AACd,6BAAe,IAAI;AACnB,gBAAE,gBAAgB;AAAA,YACpB;AAAA,YACA,WAAW,CAAC,MAAM,EAAE,gBAAgB;AAAA,YACpC,IAAG;AAAA,YACH,YAAW;AAAA,YACX,eAAY;AAAA,YAEX,4BAAkB,oBAAC,kBAAe,KAAU,MAAY;AAAA;AAAA,QAC3D;AAAA;AAAA;AAAA,EACF;AAEJ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -13,22 +13,23 @@ const StyledSeparator = styled("div", { name: DSLeftNavigationName, slot: DSLeft
|
|
|
13
13
|
`;
|
|
14
14
|
const ItemSeparator = (props) => {
|
|
15
15
|
const { item } = props;
|
|
16
|
-
return /* @__PURE__ */ jsx(
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
...item
|
|
21
|
-
|
|
22
|
-
|
|
16
|
+
return /* @__PURE__ */ jsx(
|
|
17
|
+
ItemRenderer,
|
|
18
|
+
{
|
|
19
|
+
item: {
|
|
20
|
+
...item,
|
|
21
|
+
itemOpts: {
|
|
22
|
+
...item.itemOpts,
|
|
23
|
+
selectable: false,
|
|
24
|
+
focuseable: false
|
|
25
|
+
},
|
|
26
|
+
CollapsedComponent: null
|
|
23
27
|
},
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
"data-testid": "leftnav-separator-subitem"
|
|
30
|
-
})
|
|
31
|
-
});
|
|
28
|
+
minHeight: "1px",
|
|
29
|
+
paddingTop: "0px",
|
|
30
|
+
children: /* @__PURE__ */ jsx(StyledSeparator, { "data-testid": "leftnav-separator-subitem" })
|
|
31
|
+
}
|
|
32
|
+
);
|
|
32
33
|
};
|
|
33
34
|
export {
|
|
34
35
|
ItemSeparator
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/outOfTheBox/ItemSeparator/index.tsx"],
|
|
4
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;AC+BjB;AA9BN,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,
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;AC+BjB;AA9BN,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;AAAA,IAAC;AAAA;AAAA,MACC,MAAM;AAAA,QACJ,GAAG;AAAA,QACH,UAAU;AAAA,UACR,GAAG,KAAK;AAAA,UACR,YAAY;AAAA,UACZ,YAAY;AAAA,QACd;AAAA,QACA,oBAAoB;AAAA,MACtB;AAAA,MACA,WAAU;AAAA,MACV,YAAW;AAAA,MAEX,8BAAC,mBAAgB,eAAY,6BAA4B;AAAA;AAAA,EAC3D;AAEJ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -47,94 +47,100 @@ const ItemSubmenu = (props) => {
|
|
|
47
47
|
[dsId, isSelected, selectedParent]
|
|
48
48
|
);
|
|
49
49
|
const ariaLabel = item.itemOpts.ariaLabel ?? (typeof label === "string" ? label : "menuitem");
|
|
50
|
-
return /* @__PURE__ */ jsxs(
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
...item
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
50
|
+
return /* @__PURE__ */ jsxs(
|
|
51
|
+
ItemRenderer,
|
|
52
|
+
{
|
|
53
|
+
item: {
|
|
54
|
+
...item,
|
|
55
|
+
itemOpts: {
|
|
56
|
+
...item.itemOpts,
|
|
57
|
+
ariaLabel,
|
|
58
|
+
ariaExpanded: opened,
|
|
59
|
+
openable: expandedForAnimation && !opened,
|
|
60
|
+
closable: expandedForAnimation && opened,
|
|
61
|
+
selectable: !opened
|
|
62
|
+
}
|
|
63
|
+
},
|
|
64
|
+
shadowStyle,
|
|
65
|
+
hasBorderBottom: opened,
|
|
66
|
+
borderBottomMr: "12px",
|
|
67
|
+
children: [
|
|
68
|
+
/* @__PURE__ */ jsxs(
|
|
69
|
+
StyledLeftContainer,
|
|
70
|
+
{
|
|
71
|
+
cols: opened ? ["auto", "auto"] : ["38px"],
|
|
72
|
+
gutter: "1px",
|
|
73
|
+
pl: opened ? "xxs" : 0,
|
|
74
|
+
justifyItems: "center",
|
|
75
|
+
"data-testid": "leftnav-leftcomponent",
|
|
76
|
+
children: [
|
|
77
|
+
opened && /* @__PURE__ */ jsx(
|
|
78
|
+
StyledChevronLeft,
|
|
79
|
+
{
|
|
80
|
+
size: "m",
|
|
81
|
+
color: ["brand-primary", 800],
|
|
82
|
+
onClick: (e) => {
|
|
83
|
+
onItemClick(item, e);
|
|
84
|
+
},
|
|
85
|
+
"data-testid": "leftnav-leftcomponent-chevron",
|
|
86
|
+
tabIndex: 0,
|
|
87
|
+
onFocus: (e) => {
|
|
88
|
+
e.stopPropagation();
|
|
89
|
+
setFocusedItem(CHEVRON_BACK_DS_ID);
|
|
90
|
+
},
|
|
91
|
+
role: "button",
|
|
92
|
+
"aria-label": `Close ${ariaLabel}`
|
|
93
|
+
}
|
|
94
|
+
),
|
|
95
|
+
CollapsedComponent && /* @__PURE__ */ jsx(CollapsedComponent, { item, ctx })
|
|
96
|
+
]
|
|
97
|
+
}
|
|
98
|
+
),
|
|
99
|
+
/* @__PURE__ */ jsx(
|
|
100
|
+
StyledItemLabel,
|
|
101
|
+
{
|
|
102
|
+
ml: opened ? "xxs" : "1px",
|
|
103
|
+
mt: "xxxs",
|
|
104
|
+
mb: "15px",
|
|
105
|
+
"data-testid": labelDataTestId || "leftnav-itemlabel",
|
|
106
|
+
labelOverflow,
|
|
107
|
+
children: labelOverflow === "truncate" ? /* @__PURE__ */ jsx(SimpleTruncatedTooltipText, { value: label, placement: "bottom-start" }) : label
|
|
108
|
+
}
|
|
109
|
+
),
|
|
110
|
+
/* @__PURE__ */ jsx(
|
|
111
|
+
StyledRightContainer,
|
|
112
|
+
{
|
|
113
|
+
pl: "xs",
|
|
114
|
+
pr: opened ? "xxs2" : "xxs",
|
|
115
|
+
onFocus: (e) => {
|
|
116
|
+
e.stopPropagation();
|
|
117
|
+
setFocusedItem(null);
|
|
78
118
|
},
|
|
79
|
-
|
|
80
|
-
|
|
119
|
+
onKeyDown: (e) => e.stopPropagation(),
|
|
120
|
+
onClick: (e) => openedItem === dsId && e.stopPropagation(),
|
|
121
|
+
"data-testid": "leftnav-right-component",
|
|
122
|
+
children: RightComponent && /* @__PURE__ */ jsx(RightComponent, { ctx, item })
|
|
123
|
+
}
|
|
124
|
+
),
|
|
125
|
+
BottomComponent && /* @__PURE__ */ jsx(
|
|
126
|
+
StyledBottomContainer,
|
|
127
|
+
{
|
|
128
|
+
style: { gridColumn: "span 3" },
|
|
129
|
+
pb: "xxxs",
|
|
130
|
+
pl: "xxs",
|
|
131
|
+
pr: "xxs",
|
|
81
132
|
onFocus: (e) => {
|
|
82
133
|
e.stopPropagation();
|
|
83
|
-
setFocusedItem(
|
|
134
|
+
setFocusedItem(null);
|
|
84
135
|
},
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
}),
|
|
94
|
-
/* @__PURE__ */ jsx(StyledItemLabel, {
|
|
95
|
-
ml: opened ? "xxs" : "1px",
|
|
96
|
-
mt: "xxxs",
|
|
97
|
-
mb: "15px",
|
|
98
|
-
"data-testid": labelDataTestId || "leftnav-itemlabel",
|
|
99
|
-
labelOverflow,
|
|
100
|
-
children: labelOverflow === "truncate" ? /* @__PURE__ */ jsx(SimpleTruncatedTooltipText, {
|
|
101
|
-
value: label,
|
|
102
|
-
placement: "bottom-start"
|
|
103
|
-
}) : label
|
|
104
|
-
}),
|
|
105
|
-
/* @__PURE__ */ jsx(StyledRightContainer, {
|
|
106
|
-
pl: "xs",
|
|
107
|
-
pr: opened ? "xxs2" : "xxs",
|
|
108
|
-
onFocus: (e) => {
|
|
109
|
-
e.stopPropagation();
|
|
110
|
-
setFocusedItem(null);
|
|
111
|
-
},
|
|
112
|
-
onKeyDown: (e) => e.stopPropagation(),
|
|
113
|
-
onClick: (e) => openedItem === dsId && e.stopPropagation(),
|
|
114
|
-
"data-testid": "leftnav-right-component",
|
|
115
|
-
children: RightComponent && /* @__PURE__ */ jsx(RightComponent, {
|
|
116
|
-
ctx,
|
|
117
|
-
item
|
|
118
|
-
})
|
|
119
|
-
}),
|
|
120
|
-
BottomComponent && /* @__PURE__ */ jsx(StyledBottomContainer, {
|
|
121
|
-
style: { gridColumn: "span 3" },
|
|
122
|
-
pb: "xxxs",
|
|
123
|
-
pl: "xxs",
|
|
124
|
-
pr: "xxs",
|
|
125
|
-
onFocus: (e) => {
|
|
126
|
-
e.stopPropagation();
|
|
127
|
-
setFocusedItem(null);
|
|
128
|
-
},
|
|
129
|
-
onKeyDown: (e) => e.stopPropagation(),
|
|
130
|
-
onClick: (e) => openedItem && e.stopPropagation(),
|
|
131
|
-
children: /* @__PURE__ */ jsx(BottomComponent, {
|
|
132
|
-
ctx,
|
|
133
|
-
item
|
|
134
|
-
})
|
|
135
|
-
})
|
|
136
|
-
]
|
|
137
|
-
});
|
|
136
|
+
onKeyDown: (e) => e.stopPropagation(),
|
|
137
|
+
onClick: (e) => openedItem && e.stopPropagation(),
|
|
138
|
+
children: /* @__PURE__ */ jsx(BottomComponent, { ctx, item })
|
|
139
|
+
}
|
|
140
|
+
)
|
|
141
|
+
]
|
|
142
|
+
}
|
|
143
|
+
);
|
|
138
144
|
};
|
|
139
145
|
export {
|
|
140
146
|
ItemSubmenu
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/outOfTheBox/ItemSubmenu/index.tsx"],
|
|
4
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 type { 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,WAAW;ACiFjB,SAQI,KARJ;AA9EN,SAAgB,mBAAmB;AACnC,SAAS,kCAAkC;AAE3C,SAAS,oBAAoB;AAE7B,SAAS,0BAA0B;AACnC;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAEP,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,cAAc,CAAC,UAAuC;AACjE,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,aAAa,iBAAiB;AAEpC,QAAM,c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YACC,IAAG;AAAA,YACH,IAAI,SAAS,SAAS;AAAA,YACtB,SAAS,CAAC,MAAM;AACd,gBAAE,gBAAgB;AAClB,6BAAe,IAAI;AAAA,YACrB;AAAA,YACA,WAAW,CAAC,MAAM,EAAE,gBAAgB;AAAA,YACpC,SAAS,CAAC,MAAM,eAAe,QAAQ,EAAE,gBAAgB;AAAA,YACzD,eAAY;AAAA,YAEX,4BAAkB,oBAAC,kBAAe,KAAU,MAAY;AAAA;AAAA,QAC3D;AAAA,QACC,mBACC;AAAA,UAAC;AAAA;AAAA,YACC,OAAO,EAAE,YAAY,SAAS;AAAA,YAC9B,IAAG;AAAA,YACH,IAAG;AAAA,YACH,IAAG;AAAA,YACH,SAAS,CAAC,MAAM;AACd,gBAAE,gBAAgB;AAClB,6BAAe,IAAI;AAAA,YACrB;AAAA,YACA,WAAW,CAAC,MAAM,EAAE,gBAAgB;AAAA,YACpC,SAAS,CAAC,MAAM,cAAc,EAAE,gBAAgB;AAAA,YAEhD,8BAAC,mBAAgB,KAAU,MAAY;AAAA;AAAA,QACzC;AAAA;AAAA;AAAA,EAEJ;AAEJ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -14,31 +14,34 @@ const ItemTextLabel = (props) => {
|
|
|
14
14
|
}
|
|
15
15
|
} = props;
|
|
16
16
|
const labelOverflow = itemLabelOverflow || leftNavLabelOverflow;
|
|
17
|
-
return /* @__PURE__ */ jsxs(
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
17
|
+
return /* @__PURE__ */ jsxs(
|
|
18
|
+
ItemRenderer,
|
|
19
|
+
{
|
|
20
|
+
item: {
|
|
21
|
+
...item,
|
|
22
|
+
CollapsedComponent: null
|
|
23
|
+
},
|
|
24
|
+
minHeight: "32px",
|
|
25
|
+
paddingTop: "8px",
|
|
26
|
+
children: [
|
|
27
|
+
" ",
|
|
28
|
+
/* @__PURE__ */ jsx("div", {}),
|
|
29
|
+
/* @__PURE__ */ jsx(
|
|
30
|
+
StyledLabel,
|
|
31
|
+
{
|
|
32
|
+
"data-testid": labelDataTestId || "leftnav-list-item-label",
|
|
33
|
+
pl: "24px",
|
|
34
|
+
labelOverflow,
|
|
35
|
+
labelBold,
|
|
36
|
+
labelColor,
|
|
37
|
+
mr: "xxs2",
|
|
38
|
+
pb: "xxxs",
|
|
39
|
+
children: labelOverflow === "truncate" ? /* @__PURE__ */ jsx(SimpleTruncatedTooltipText, { value: label, placement: "bottom-start" }) : label
|
|
40
|
+
}
|
|
41
|
+
)
|
|
42
|
+
]
|
|
43
|
+
}
|
|
44
|
+
);
|
|
42
45
|
};
|
|
43
46
|
export {
|
|
44
47
|
ItemTextLabel
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/outOfTheBox/ItemTextLabel/index.tsx"],
|
|
4
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
|
-
"mappings": "AAAA,YAAY,WAAW;ACoBnB,SAQ8B,KAR9B;AAnBJ,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,
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACoBnB,SAQ8B,KAR9B;AAnBJ,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;AAAA,IAAC;AAAA;AAAA,MACC,MAAM;AAAA,QACJ,GAAG;AAAA,QACH,oBAAoB;AAAA,MACtB;AAAA,MACA,WA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