@elliemae/ds-left-navigation 3.60.0-next.6 → 3.60.0-next.60
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 +3 -3
- package/dist/cjs/LeftNavigation.js.map +2 -2
- package/dist/cjs/LeftNavigationContext.js +3 -19
- package/dist/cjs/LeftNavigationContext.js.map +2 -2
- package/dist/cjs/{configs → config}/index.js +5 -5
- package/dist/cjs/{configs → config}/index.js.map +2 -2
- package/dist/cjs/{configs → config}/useLeftNavConfig.js +4 -4
- package/dist/cjs/config/useLeftNavConfig.js.map +7 -0
- package/dist/cjs/{configs → config}/useLeftNavItems.js +4 -5
- package/dist/cjs/config/useLeftNavItems.js.map +7 -0
- package/dist/cjs/{configs → config}/useLeftNavSmoothExpand.js.map +1 -1
- package/dist/cjs/constants/{constants.js → index.js} +41 -2
- package/dist/cjs/constants/{constants.js.map → index.js.map} +3 -3
- package/dist/cjs/exported-related/ItemRenderer/index.js +12 -3
- package/dist/cjs/exported-related/ItemRenderer/index.js.map +3 -3
- package/dist/cjs/exported-related/ItemRenderer/styled.js +1 -1
- package/dist/cjs/exported-related/ItemRenderer/styled.js.map +1 -1
- package/dist/cjs/exported-related/Notifications/index.js +60 -42
- package/dist/cjs/exported-related/Notifications/index.js.map +3 -3
- package/dist/cjs/exported-related/index.js +16 -7
- package/dist/cjs/exported-related/index.js.map +2 -2
- package/dist/cjs/hooks/useKeyboardNavigation.js +1 -1
- package/dist/cjs/hooks/useKeyboardNavigation.js.map +1 -1
- package/dist/cjs/hooks/useSelectFirstBodyItem.js +1 -1
- package/dist/cjs/hooks/useSelectFirstBodyItem.js.map +2 -2
- package/dist/cjs/index.js +16 -4
- package/dist/cjs/index.js.map +2 -2
- package/dist/cjs/outOfTheBox/ItemControlledDrilldown/index.js +16 -5
- package/dist/cjs/outOfTheBox/ItemControlledDrilldown/index.js.map +3 -3
- package/dist/cjs/outOfTheBox/ItemHeader/index.js +20 -8
- package/dist/cjs/outOfTheBox/ItemHeader/index.js.map +3 -3
- package/dist/cjs/outOfTheBox/ItemLink/index.js +11 -2
- package/dist/cjs/outOfTheBox/ItemLink/index.js.map +3 -3
- package/dist/cjs/outOfTheBox/ItemSection/index.js +23 -4
- package/dist/cjs/outOfTheBox/ItemSection/index.js.map +3 -3
- package/dist/cjs/outOfTheBox/ItemSeparator/index.js +11 -3
- package/dist/cjs/outOfTheBox/ItemSeparator/index.js.map +3 -3
- package/dist/cjs/outOfTheBox/ItemSkeleton/index.js +11 -2
- package/dist/cjs/outOfTheBox/ItemSkeleton/index.js.map +3 -3
- package/dist/cjs/outOfTheBox/ItemSubmenu/index.js +17 -5
- package/dist/cjs/outOfTheBox/ItemSubmenu/index.js.map +3 -3
- package/dist/cjs/outOfTheBox/ItemTextLabel/index.js +7 -1
- package/dist/cjs/outOfTheBox/ItemTextLabel/index.js.map +3 -3
- package/dist/cjs/outOfTheBox/ItemUncontrolledDrilldown/index.js +16 -5
- package/dist/cjs/outOfTheBox/ItemUncontrolledDrilldown/index.js.map +3 -3
- package/dist/cjs/outOfTheBox/ItemWithDate/index.js +11 -1
- package/dist/cjs/outOfTheBox/ItemWithDate/index.js.map +3 -3
- package/dist/cjs/outOfTheBox/index.js +6 -8
- package/dist/cjs/outOfTheBox/index.js.map +2 -2
- package/dist/cjs/outOfTheBox/styled.js +1 -1
- package/dist/cjs/outOfTheBox/styled.js.map +1 -1
- package/dist/cjs/parts/LeftNavContent/index.js +24 -3
- package/dist/cjs/parts/LeftNavContent/index.js.map +2 -2
- package/dist/cjs/parts/LeftNavContent/styled.js +1 -1
- package/dist/cjs/parts/LeftNavContent/styled.js.map +1 -1
- package/dist/cjs/parts/LeftNavFooterItem/index.js +13 -13
- package/dist/cjs/parts/LeftNavFooterItem/index.js.map +3 -3
- package/dist/cjs/parts/LeftNavFooterItem/styled.js +1 -1
- package/dist/cjs/parts/LeftNavFooterItem/styled.js.map +1 -1
- package/dist/cjs/parts/LeftNavLoading/index.js +26 -10
- package/dist/cjs/parts/LeftNavLoading/index.js.map +3 -3
- package/dist/cjs/react-desc-prop-types.js +52 -22
- package/dist/cjs/react-desc-prop-types.js.map +2 -2
- package/dist/cjs/typescript-testing/slot-props.js +94 -0
- package/dist/cjs/typescript-testing/slot-props.js.map +7 -0
- package/dist/cjs/typescript-testing/typescript-left-navigation-valid.js +1 -1
- package/dist/cjs/typescript-testing/typescript-left-navigation-valid.js.map +1 -1
- package/dist/esm/LeftNavigation.js +4 -4
- package/dist/esm/LeftNavigation.js.map +2 -2
- package/dist/esm/LeftNavigationContext.js +2 -18
- package/dist/esm/LeftNavigationContext.js.map +2 -2
- package/dist/esm/{configs → config}/index.js +2 -2
- package/dist/esm/{configs → config}/index.js.map +2 -2
- package/dist/esm/{configs → config}/useLeftNavConfig.js +3 -3
- package/dist/esm/config/useLeftNavConfig.js.map +7 -0
- package/dist/esm/{configs → config}/useLeftNavItems.js +1 -2
- package/dist/esm/config/useLeftNavItems.js.map +7 -0
- package/dist/esm/{configs → config}/useLeftNavSmoothExpand.js.map +1 -1
- package/dist/esm/constants/{constants.js → index.js} +41 -2
- package/dist/esm/constants/{constants.js.map → index.js.map} +3 -3
- package/dist/esm/exported-related/ItemRenderer/index.js +12 -3
- package/dist/esm/exported-related/ItemRenderer/index.js.map +3 -3
- package/dist/esm/exported-related/ItemRenderer/styled.js +1 -1
- package/dist/esm/exported-related/ItemRenderer/styled.js.map +1 -1
- package/dist/esm/exported-related/Notifications/index.js +60 -42
- package/dist/esm/exported-related/Notifications/index.js.map +3 -3
- package/dist/esm/exported-related/index.js +12 -6
- package/dist/esm/exported-related/index.js.map +2 -2
- package/dist/esm/hooks/useKeyboardNavigation.js +1 -1
- package/dist/esm/hooks/useKeyboardNavigation.js.map +1 -1
- package/dist/esm/hooks/useSelectFirstBodyItem.js +1 -1
- package/dist/esm/hooks/useSelectFirstBodyItem.js.map +2 -2
- package/dist/esm/index.js +31 -7
- package/dist/esm/index.js.map +2 -2
- package/dist/esm/outOfTheBox/ItemControlledDrilldown/index.js +14 -3
- package/dist/esm/outOfTheBox/ItemControlledDrilldown/index.js.map +3 -3
- package/dist/esm/outOfTheBox/ItemHeader/index.js +18 -6
- package/dist/esm/outOfTheBox/ItemHeader/index.js.map +3 -3
- package/dist/esm/outOfTheBox/ItemLink/index.js +11 -2
- package/dist/esm/outOfTheBox/ItemLink/index.js.map +3 -3
- package/dist/esm/outOfTheBox/ItemSection/index.js +27 -8
- package/dist/esm/outOfTheBox/ItemSection/index.js.map +3 -3
- package/dist/esm/outOfTheBox/ItemSeparator/index.js +11 -3
- package/dist/esm/outOfTheBox/ItemSeparator/index.js.map +3 -3
- package/dist/esm/outOfTheBox/ItemSkeleton/index.js +11 -2
- package/dist/esm/outOfTheBox/ItemSkeleton/index.js.map +3 -3
- package/dist/esm/outOfTheBox/ItemSubmenu/index.js +16 -4
- package/dist/esm/outOfTheBox/ItemSubmenu/index.js.map +3 -3
- package/dist/esm/outOfTheBox/ItemTextLabel/index.js +7 -1
- package/dist/esm/outOfTheBox/ItemTextLabel/index.js.map +3 -3
- package/dist/esm/outOfTheBox/ItemUncontrolledDrilldown/index.js +14 -3
- package/dist/esm/outOfTheBox/ItemUncontrolledDrilldown/index.js.map +3 -3
- package/dist/esm/outOfTheBox/ItemWithDate/index.js +11 -1
- package/dist/esm/outOfTheBox/ItemWithDate/index.js.map +3 -3
- package/dist/esm/outOfTheBox/index.js +5 -7
- package/dist/esm/outOfTheBox/index.js.map +2 -2
- package/dist/esm/outOfTheBox/styled.js +1 -1
- package/dist/esm/outOfTheBox/styled.js.map +1 -1
- package/dist/esm/parts/LeftNavContent/index.js +24 -3
- package/dist/esm/parts/LeftNavContent/index.js.map +2 -2
- package/dist/esm/parts/LeftNavContent/styled.js +1 -1
- package/dist/esm/parts/LeftNavContent/styled.js.map +1 -1
- package/dist/esm/parts/LeftNavFooterItem/index.js +11 -11
- package/dist/esm/parts/LeftNavFooterItem/index.js.map +2 -2
- package/dist/esm/parts/LeftNavFooterItem/styled.js +1 -1
- package/dist/esm/parts/LeftNavFooterItem/styled.js.map +1 -1
- package/dist/esm/parts/LeftNavLoading/index.js +26 -10
- package/dist/esm/parts/LeftNavLoading/index.js.map +3 -3
- package/dist/esm/react-desc-prop-types.js +59 -23
- package/dist/esm/react-desc-prop-types.js.map +2 -2
- package/dist/esm/typescript-testing/slot-props.js +71 -0
- package/dist/esm/typescript-testing/slot-props.js.map +7 -0
- package/dist/esm/typescript-testing/typescript-left-navigation-valid.js +1 -1
- package/dist/esm/typescript-testing/typescript-left-navigation-valid.js.map +1 -1
- package/dist/types/LeftNavigationContext.d.ts +1 -2
- package/dist/types/constants/{constants.d.ts → index.d.ts} +32 -0
- package/dist/types/exported-related/index.d.ts +5 -6
- package/dist/types/index.d.ts +3 -3
- package/dist/types/outOfTheBox/ItemSkeleton/index.d.ts +1 -1
- package/dist/types/outOfTheBox/index.d.ts +1 -2
- package/dist/types/react-desc-prop-types.d.ts +47 -13
- package/dist/types/tests/LeftNavigation.exports.test.d.ts +1 -0
- package/dist/types/typescript-testing/slot-props.d.ts +1 -0
- package/package.json +27 -29
- package/dist/cjs/configs/useLeftNavConfig.js.map +0 -7
- package/dist/cjs/configs/useLeftNavItems.js.map +0 -7
- package/dist/cjs/exported-related/constants.js +0 -71
- package/dist/cjs/exported-related/constants.js.map +0 -7
- package/dist/esm/configs/useLeftNavConfig.js.map +0 -7
- package/dist/esm/configs/useLeftNavItems.js.map +0 -7
- package/dist/esm/exported-related/constants.js +0 -41
- package/dist/esm/exported-related/constants.js.map +0 -7
- package/dist/types/exported-related/constants.d.ts +0 -31
- /package/dist/cjs/{configs → config}/useLeftNavSmoothExpand.js +0 -0
- /package/dist/esm/{configs → config}/useLeftNavSmoothExpand.js +0 -0
- /package/dist/types/{configs → config}/index.d.ts +0 -0
- /package/dist/types/{configs → config}/useLeftNavConfig.d.ts +0 -0
- /package/dist/types/{configs → config}/useLeftNavItems.d.ts +0 -0
- /package/dist/types/{configs → config}/useLeftNavSmoothExpand.d.ts +0 -0
|
@@ -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 { ChevronSmallLeft } from '@elliemae/ds-icons';\nimport type { Theme } from '@elliemae/ds-system';\nimport { SimpleTruncatedTooltipText } from '@elliemae/ds-truncated-tooltip-text';\nimport React
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;
|
|
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 { ChevronSmallLeft } from '@elliemae/ds-icons';\nimport type { Theme } from '@elliemae/ds-system';\nimport { SimpleTruncatedTooltipText } from '@elliemae/ds-truncated-tooltip-text';\nimport React from 'react';\nimport { CHEVRON_BACK_DS_ID, LEFT_NAVIGATION_DATA_TESTID } from '../../constants/index.js';\nimport { ItemRenderer } from '../../exported-related/index.js';\nimport type { DSLeftNavigationT } from '../../react-desc-prop-types.js';\nimport {\n StyledBottomContainer,\n StyledChevronLeft,\n StyledItemLabel,\n StyledLeftContainer,\n StyledRightContainer,\n} from '../styled.js';\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: DSLeftNavigationT.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,\n leftNavProps: { openedItem, labelOverflow: leftNavLabelOverflow, onItemClick },\n expandedForAnimation,\n selectedItem,\n selectedParent,\n setFocusedItem,\n },\n } = props;\n const getOwnerProps = React.useCallback(() => leftNavProps, [leftNavProps]);\n const getOwnerPropsArguments = React.useCallback(() => ({}), []);\n\n const labelOverflow = itemLabelOverflow || leftNavLabelOverflow;\n\n const opened = openedItem === dsId;\n\n const isSelected = selectedItem === dsId;\n\n const shadowStyle = React.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}, category` : 'category');\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={LEFT_NAVIGATION_DATA_TESTID.LEFT_CONTAINER} // https://jira.elliemae.io/browse/PUI-15589\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n >\n {opened && (\n <StyledChevronLeft\n buttonType=\"raw\"\n onClick={(e: React.MouseEvent<HTMLElement> | React.KeyboardEvent<HTMLElement>) => {\n if (onItemClick) onItemClick(item, e as React.MouseEvent<HTMLElement>);\n }}\n tabIndex={0}\n onFocus={(e: React.FocusEvent) => {\n e.stopPropagation();\n setFocusedItem(CHEVRON_BACK_DS_ID);\n }}\n aria-label={`Close ${ariaLabel}`}\n data-testid={LEFT_NAVIGATION_DATA_TESTID.ITEM_CHEVRON_BACK} // https://jira.elliemae.io/browse/PUI-15589\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n >\n <ChevronSmallLeft size=\"m\" color={['brand-primary', '800']} />\n </StyledChevronLeft>\n )}\n {CollapsedComponent && <CollapsedComponent item={item} ctx={ctx} />}\n </StyledLeftContainer>\n <StyledItemLabel\n ml={opened ? 'xxs' : '1px'}\n mt=\"xxxs\"\n mb=\"15px\"\n labelOverflow={labelOverflow}\n data-testid={labelDataTestId || LEFT_NAVIGATION_DATA_TESTID.ITEM_LABEL}\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\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: React.FocusEvent) => {\n e.stopPropagation();\n setFocusedItem(null);\n }}\n onKeyDown={(e: React.KeyboardEvent) => e.stopPropagation()}\n onClick={(e: React.MouseEvent) => openedItem === dsId && e.stopPropagation()}\n data-testid={LEFT_NAVIGATION_DATA_TESTID.RIGHT_CONTAINER} // https://jira.elliemae.io/browse/PUI-15589\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\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: React.FocusEvent) => {\n e.stopPropagation();\n setFocusedItem(null);\n }}\n onKeyDown={(e: React.KeyboardEvent) => e.stopPropagation()}\n onClick={(e: React.MouseEvent) => openedItem && e.stopPropagation()}\n data-testid={LEFT_NAVIGATION_DATA_TESTID.BOTTOM_CONTAINER} // https://jira.elliemae.io/browse/PUI-15589\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n >\n <BottomComponent ctx={ctx} item={item} />\n </StyledBottomContainer>\n )}\n </ItemRenderer>\n );\n};\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACqFjB,SAyBM,KAzBN;AAlFN,SAAS,wBAAwB;AAEjC,SAAS,kCAAkC;AAC3C,OAAOA,YAAW;AAClB,SAAS,oBAAoB,mCAAmC;AAChE,SAAS,oBAAoB;AAE7B;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,GAAG,IAAI,aAAa;AAAA;AAAA;AAAA,kCAGlD,aAAa,MAAM,OAAO,MAAM,GAAG,IAAI,MAAM,OAAO,MAAM,GAAG,CAAC;AAAA;AAAA;AAAA;AAAA,kCAI9D,MAAM,OAAO,MAAM,GAAG,CAAC;AAAA;AAAA;AAIlD,MAAM,cAAc,CAAC,UAAyD;AACnF,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;AAAA,MACA,cAAc,EAAE,YAAY,eAAe,sBAAsB,YAAY;AAAA,MAC7E;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAAA,EACF,IAAI;AACJ,QAAM,gBAAgBA,OAAM,YAAY,MAAM,cAAc,CAAC,YAAY,CAAC;AAC1E,QAAM,yBAAyBA,OAAM,YAAY,OAAO,CAAC,IAAI,CAAC,CAAC;AAE/D,QAAM,gBAAgB,qBAAqB;AAE3C,QAAM,SAAS,e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x-runtime";
|
|
3
3
|
import { SimpleTruncatedTooltipText } from "@elliemae/ds-truncated-tooltip-text";
|
|
4
|
+
import React2 from "react";
|
|
5
|
+
import { LEFT_NAVIGATION_DATA_TESTID } from "../../constants/index.js";
|
|
4
6
|
import { ItemRenderer } from "../../exported-related/index.js";
|
|
5
7
|
import { StyledLabel } from "../styled.js";
|
|
6
|
-
import { LEFT_NAVIGATION_DATA_TESTID } from "../../constants/constants.js";
|
|
7
8
|
const ItemTextLabel = (props) => {
|
|
8
9
|
const {
|
|
9
10
|
item,
|
|
@@ -11,9 +12,12 @@ const ItemTextLabel = (props) => {
|
|
|
11
12
|
itemOpts: { label, labelOverflow: itemLabelOverflow, labelBold, labelColor, labelDataTestId }
|
|
12
13
|
},
|
|
13
14
|
ctx: {
|
|
15
|
+
leftNavProps,
|
|
14
16
|
leftNavProps: { labelOverflow: leftNavLabelOverflow }
|
|
15
17
|
}
|
|
16
18
|
} = props;
|
|
19
|
+
const getOwnerProps = React2.useCallback(() => leftNavProps, [leftNavProps]);
|
|
20
|
+
const getOwnerPropsArguments = React2.useCallback(() => ({}), []);
|
|
17
21
|
const labelOverflow = itemLabelOverflow || leftNavLabelOverflow;
|
|
18
22
|
return /* @__PURE__ */ jsxs(
|
|
19
23
|
ItemRenderer,
|
|
@@ -37,6 +41,8 @@ const ItemTextLabel = (props) => {
|
|
|
37
41
|
mr: "xxs2",
|
|
38
42
|
pb: "xxxs",
|
|
39
43
|
"data-testid": labelDataTestId || LEFT_NAVIGATION_DATA_TESTID.LIST_ITEM_LABEL_ID_EXCEPTION,
|
|
44
|
+
getOwnerProps,
|
|
45
|
+
getOwnerPropsArguments,
|
|
40
46
|
children: labelOverflow === "truncate" ? /* @__PURE__ */ jsx(SimpleTruncatedTooltipText, { value: label, placement: "bottom-start" }) : label
|
|
41
47
|
}
|
|
42
48
|
)
|
|
@@ -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
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;
|
|
6
|
-
"names": []
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { SimpleTruncatedTooltipText } from '@elliemae/ds-truncated-tooltip-text';\nimport React from 'react';\nimport { LEFT_NAVIGATION_DATA_TESTID } from '../../constants/index.js';\nimport { ItemRenderer } from '../../exported-related/index.js';\nimport type { DSLeftNavigationT } from '../../react-desc-prop-types.js';\nimport { StyledLabel } from '../styled.js';\n\nexport const ItemTextLabel = (props: DSLeftNavigationT.ComponentProps): JSX.Element => {\n const {\n item,\n item: {\n itemOpts: { label, labelOverflow: itemLabelOverflow, labelBold, labelColor, labelDataTestId },\n },\n ctx: {\n leftNavProps,\n leftNavProps: { labelOverflow: leftNavLabelOverflow },\n },\n } = props;\n const getOwnerProps = React.useCallback(() => leftNavProps, [leftNavProps]);\n const getOwnerPropsArguments = React.useCallback(() => ({}), []);\n\n const labelOverflow = itemLabelOverflow || leftNavLabelOverflow;\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=\"24px\"\n labelOverflow={labelOverflow}\n labelBold={labelBold}\n labelColor={labelColor}\n mr=\"xxs2\"\n pb=\"xxxs\"\n data-testid={labelDataTestId || LEFT_NAVIGATION_DATA_TESTID.LIST_ITEM_LABEL_ID_EXCEPTION}\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n >\n {labelOverflow === 'truncate' ? <SimpleTruncatedTooltipText value={label} placement=\"bottom-start\" /> : label}\n </StyledLabel>\n </ItemRenderer>\n );\n};\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACuBnB,SAQ8B,KAR9B;AAvBJ,SAAS,kCAAkC;AAC3C,OAAOA,YAAW;AAClB,SAAS,mCAAmC;AAC5C,SAAS,oBAAoB;AAE7B,SAAS,mBAAmB;AAErB,MAAM,gBAAgB,CAAC,UAAyD;AACrF,QAAM;AAAA,IACJ;AAAA,IACA,MAAM;AAAA,MACJ,UAAU,EAAE,OAAO,eAAe,mBAAmB,WAAW,YAAY,gBAAgB;AAAA,IAC9F;AAAA,IACA,KAAK;AAAA,MACH;AAAA,MACA,cAAc,EAAE,eAAe,qBAAqB;AAAA,IACtD;AAAA,EACF,IAAI;AACJ,QAAM,gBAAgBA,OAAM,YAAY,MAAM,cAAc,CAAC,YAAY,CAAC;AAC1E,QAAM,yBAAyBA,OAAM,YAAY,OAAO,CAAC,IAAI,CAAC,CAAC;AAE/D,QAAM,gBAAgB,qBAAqB;AAC3C,SACE;AAAA,IAAC;AAAA;AAAA,MACC,MAAM;AAAA,QACJ,GAAG;AAAA,QACH,oBAAoB;AAAA,MACtB;AAAA,MACA,WAAU;AAAA,MACV,YAAW;AAAA,MAEgB;AAAA;AAAA,QAAC,oBAAC,SAAI;AAAA,QACjC;AAAA,UAAC;AAAA;AAAA,YACC,IAAG;AAAA,YACH;AAAA,YACA;AAAA,YACA;AAAA,YACA,IAAG;AAAA,YACH,IAAG;AAAA,YACH,eAAa,mBAAmB,4BAA4B;AAAA,YAC5D;AAAA,YACA;AAAA,YAEC,4BAAkB,aAAa,oBAAC,8BAA2B,OAAO,OAAO,WAAU,gBAAe,IAAK;AAAA;AAAA,QAC1G;AAAA;AAAA;AAAA,EACF;AAEJ;",
|
|
6
|
+
"names": ["React"]
|
|
7
7
|
}
|
|
@@ -2,9 +2,9 @@ import * as React from "react";
|
|
|
2
2
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
3
|
import { ArrowheadDown, ArrowheadRight } from "@elliemae/ds-icons";
|
|
4
4
|
import { SimpleTruncatedTooltipText } from "@elliemae/ds-truncated-tooltip-text";
|
|
5
|
-
import { useCallback, useEffect, useMemo } from "react";
|
|
6
|
-
import { LEFT_NAVIGATION_DATA_TESTID } from "../../constants/
|
|
7
|
-
import {
|
|
5
|
+
import React2, { useCallback, useEffect, useMemo } from "react";
|
|
6
|
+
import { ITEM_TYPES, LEFT_NAVIGATION_DATA_TESTID } from "../../constants/index.js";
|
|
7
|
+
import { ItemRenderer } from "../../exported-related/index.js";
|
|
8
8
|
import { ItemSeparator } from "../ItemSeparator/index.js";
|
|
9
9
|
import { ItemTextLabel } from "../ItemTextLabel/index.js";
|
|
10
10
|
import { ItemWithDate } from "../ItemWithDate/index.js";
|
|
@@ -51,11 +51,14 @@ const ItemUncontrolledDrilldown = (props) => {
|
|
|
51
51
|
},
|
|
52
52
|
ctx,
|
|
53
53
|
ctx: {
|
|
54
|
+
leftNavProps,
|
|
54
55
|
leftNavProps: { labelOverflow: leftNavLabelOverflow },
|
|
55
56
|
openedDrilldowns,
|
|
56
57
|
setOpenedDrilldowns
|
|
57
58
|
}
|
|
58
59
|
} = props;
|
|
60
|
+
const getOwnerProps = React2.useCallback(() => leftNavProps, [leftNavProps]);
|
|
61
|
+
const getOwnerPropsArguments = React2.useCallback(() => ({}), []);
|
|
59
62
|
useEffect(() => {
|
|
60
63
|
if (startOpened) setOpenedDrilldowns([...openedDrilldowns, dsId]);
|
|
61
64
|
}, []);
|
|
@@ -98,6 +101,8 @@ const ItemUncontrolledDrilldown = (props) => {
|
|
|
98
101
|
pl: "xxs",
|
|
99
102
|
mt: "-2px",
|
|
100
103
|
"data-testid": LEFT_NAVIGATION_DATA_TESTID.ARROW_CONTAINER,
|
|
104
|
+
getOwnerProps,
|
|
105
|
+
getOwnerPropsArguments,
|
|
101
106
|
children: arrowIcon
|
|
102
107
|
}
|
|
103
108
|
),
|
|
@@ -109,6 +114,8 @@ const ItemUncontrolledDrilldown = (props) => {
|
|
|
109
114
|
labelBold,
|
|
110
115
|
labelColor,
|
|
111
116
|
"data-testid": labelDataTestId || LEFT_NAVIGATION_DATA_TESTID.LIST_ITEM_LABEL_ID_EXCEPTION,
|
|
117
|
+
getOwnerProps,
|
|
118
|
+
getOwnerPropsArguments,
|
|
112
119
|
children: labelOverflow === "truncate" ? /* @__PURE__ */ jsx(SimpleTruncatedTooltipText, { value: label, placement: "bottom-start" }) : label
|
|
113
120
|
}
|
|
114
121
|
),
|
|
@@ -120,12 +127,16 @@ const ItemUncontrolledDrilldown = (props) => {
|
|
|
120
127
|
alignItems: "center",
|
|
121
128
|
gutter: "xxs",
|
|
122
129
|
"data-testid": LEFT_NAVIGATION_DATA_TESTID.RIGHT_CONTAINER,
|
|
130
|
+
getOwnerProps,
|
|
131
|
+
getOwnerPropsArguments,
|
|
123
132
|
children: [
|
|
124
133
|
/* @__PURE__ */ jsx(
|
|
125
134
|
StyledDate,
|
|
126
135
|
{
|
|
127
136
|
ml: "xxs",
|
|
128
137
|
"data-testid": LEFT_NAVIGATION_DATA_TESTID.ITEM_DATE,
|
|
138
|
+
getOwnerProps,
|
|
139
|
+
getOwnerPropsArguments,
|
|
129
140
|
children: labelRightSection
|
|
130
141
|
}
|
|
131
142
|
),
|
|
@@ -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 { ArrowheadDown, ArrowheadRight } from '@elliemae/ds-icons';\nimport { SimpleTruncatedTooltipText } from '@elliemae/ds-truncated-tooltip-text';\nimport React, { useCallback, useEffect, useMemo } from 'react';\nimport { LEFT_NAVIGATION_DATA_TESTID } from '../../constants/
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;ACiCZ,
|
|
6
|
-
"names": []
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable max-lines */\nimport { ArrowheadDown, ArrowheadRight } from '@elliemae/ds-icons';\nimport { SimpleTruncatedTooltipText } from '@elliemae/ds-truncated-tooltip-text';\nimport React, { useCallback, useEffect, useMemo } from 'react';\nimport { ITEM_TYPES, LEFT_NAVIGATION_DATA_TESTID } from '../../constants/index.js';\nimport { ItemRenderer } from '../../exported-related/index.js';\nimport type { DSLeftNavigationT } from '../../react-desc-prop-types.js';\nimport { ItemSeparator } from '../ItemSeparator/index.js';\nimport { ItemTextLabel } from '../ItemTextLabel/index.js';\nimport { ItemWithDate } from '../ItemWithDate/index.js';\nimport { StyledArrowContainer, StyledDate, StyledLabel, StyledRightContainer } from '../styled.js';\n\n// Subitem mapping\nconst outOfTheBoxSubitemsComponents: Record<string, React.ComponentType<DSLeftNavigationT.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<DSLeftNavigationT.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: DSLeftNavigationT.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,\n leftNavProps: { labelOverflow: leftNavLabelOverflow },\n openedDrilldowns,\n setOpenedDrilldowns,\n },\n } = props;\n const getOwnerProps = React.useCallback(() => leftNavProps, [leftNavProps]);\n const getOwnerPropsArguments = React.useCallback(() => ({}), []);\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\n pl=\"xxs\"\n mt=\"-2px\"\n data-testid={LEFT_NAVIGATION_DATA_TESTID.ARROW_CONTAINER} // https://jira.elliemae.io/browse/PUI-15589\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n >\n {arrowIcon}\n </StyledArrowContainer>\n <StyledLabel\n pb=\"xxxs\"\n labelOverflow={labelOverflow}\n labelBold={labelBold}\n labelColor={labelColor}\n data-testid={labelDataTestId || LEFT_NAVIGATION_DATA_TESTID.LIST_ITEM_LABEL_ID_EXCEPTION}\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\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={LEFT_NAVIGATION_DATA_TESTID.RIGHT_CONTAINER} // https://jira.elliemae.io/browse/PUI-15589\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n >\n <StyledDate\n ml=\"xxs\"\n data-testid={LEFT_NAVIGATION_DATA_TESTID.ITEM_DATE} // https://jira.elliemae.io/browse/PUI-15589\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n >\n {labelRightSection}\n </StyledDate>\n {RightComponent && <RightComponent ctx={ctx} item={item} />}\n </StyledRightContainer>\n </ItemRenderer>\n );\n};\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACiCZ,cAmGL,YAnGK;AAhCX,SAAS,eAAe,sBAAsB;AAC9C,SAAS,kCAAkC;AAC3C,OAAOA,UAAS,aAAa,WAAW,eAAe;AACvD,SAAS,YAAY,mCAAmC;AACxD,SAAS,oBAAoB;AAE7B,SAAS,qBAAqB;AAC9B,SAAS,qBAAqB;AAC9B,SAAS,oBAAoB;AAC7B,SAAS,sBAAsB,YAAY,aAAa,4BAA4B;AAGpF,MAAM,gCAAuG;AAAA,EAC3G,CAAC,WAAW,uBAAuB,GAAG;AAAA,EACtC,CAAC,WAAW,uBAAuB,GAAG;AAAA,EACtC,CAAC,WAAW,wBAAwB,GAAG;AACzC;AAEA,MAAM,wBAA+E,CAAC,UAAU;AAC9F,QAAM;AAAA,IACJ;AAAA,IACA,MAAM,EAAE,MAAM,UAAU;A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QAAO;AAAA,YACP,eAAa,4BAA4B;AAAA,YACzC;AAAA,YACA;AAAA,YAEA;AAAA;AAAA,gBAAC;AAAA;AAAA,kBACC,IAAG;AAAA,kBACH,eAAa,4BAA4B;AAAA,kBACzC;AAAA,kBACA;AAAA,kBAEC;AAAA;AAAA,cACH;AAAA,cACC,kBAAkB,oBAAC,kBAAe,KAAU,MAAY;AAAA;AAAA;AAAA,QAC3D;AAAA;AAAA;AAAA,EACF;AAEJ;",
|
|
6
|
+
"names": ["React"]
|
|
7
7
|
}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
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
|
-
import
|
|
4
|
+
import React2 from "react";
|
|
5
|
+
import { LEFT_NAVIGATION_DATA_TESTID } from "../../constants/index.js";
|
|
5
6
|
import { ItemRenderer } from "../../exported-related/index.js";
|
|
6
7
|
import { StyledDate, StyledLabel, StyledRightContainer } from "../styled.js";
|
|
7
8
|
const ItemWithDate = (props) => {
|
|
@@ -20,9 +21,12 @@ const ItemWithDate = (props) => {
|
|
|
20
21
|
},
|
|
21
22
|
ctx,
|
|
22
23
|
ctx: {
|
|
24
|
+
leftNavProps,
|
|
23
25
|
leftNavProps: { labelOverflow: leftNavLabelOverflow }
|
|
24
26
|
}
|
|
25
27
|
} = props;
|
|
28
|
+
const getOwnerProps = React2.useCallback(() => leftNavProps, [leftNavProps]);
|
|
29
|
+
const getOwnerPropsArguments = React2.useCallback(() => ({}), []);
|
|
26
30
|
const labelOverflow = itemLabelOverflow || leftNavLabelOverflow;
|
|
27
31
|
return /* @__PURE__ */ jsxs(
|
|
28
32
|
ItemRenderer,
|
|
@@ -45,6 +49,8 @@ const ItemWithDate = (props) => {
|
|
|
45
49
|
labelBold,
|
|
46
50
|
labelColor,
|
|
47
51
|
"data-testid": labelDataTestId || LEFT_NAVIGATION_DATA_TESTID.LIST_ITEM_LABEL_ID_EXCEPTION,
|
|
52
|
+
getOwnerProps,
|
|
53
|
+
getOwnerPropsArguments,
|
|
48
54
|
children: labelOverflow === "truncate" && label ? /* @__PURE__ */ jsx(SimpleTruncatedTooltipText, { value: label, placement: "bottom-start" }) : label
|
|
49
55
|
}
|
|
50
56
|
),
|
|
@@ -56,12 +62,16 @@ const ItemWithDate = (props) => {
|
|
|
56
62
|
alignItems: "center",
|
|
57
63
|
gutter: "xxs",
|
|
58
64
|
"data-testid": LEFT_NAVIGATION_DATA_TESTID.RIGHT_CONTAINER,
|
|
65
|
+
getOwnerProps,
|
|
66
|
+
getOwnerPropsArguments,
|
|
59
67
|
children: [
|
|
60
68
|
/* @__PURE__ */ jsx(
|
|
61
69
|
StyledDate,
|
|
62
70
|
{
|
|
63
71
|
ml: "xxs",
|
|
64
72
|
"data-testid": LEFT_NAVIGATION_DATA_TESTID.ITEM_DATE,
|
|
73
|
+
getOwnerProps,
|
|
74
|
+
getOwnerPropsArguments,
|
|
65
75
|
children: labelRightSection
|
|
66
76
|
}
|
|
67
77
|
),
|
|
@@ -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 { SimpleTruncatedTooltipText } from '@elliemae/ds-truncated-tooltip-text';\nimport { LEFT_NAVIGATION_DATA_TESTID } from '../../constants/
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;
|
|
6
|
-
"names": []
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { SimpleTruncatedTooltipText } from '@elliemae/ds-truncated-tooltip-text';\nimport React from 'react';\nimport { LEFT_NAVIGATION_DATA_TESTID } from '../../constants/index.js';\nimport { ItemRenderer } from '../../exported-related/index.js';\nimport type { DSLeftNavigationT } from '../../react-desc-prop-types.js';\nimport { StyledDate, StyledLabel, StyledRightContainer } from '../styled.js';\n\nexport const ItemWithDate = (props: DSLeftNavigationT.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,\n leftNavProps: { labelOverflow: leftNavLabelOverflow },\n },\n } = props;\n const getOwnerProps = React.useCallback(() => leftNavProps, [leftNavProps]);\n const getOwnerPropsArguments = React.useCallback(() => ({}), []);\n\n const labelOverflow = itemLabelOverflow || leftNavLabelOverflow;\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 labelOverflow={labelOverflow}\n labelBold={labelBold}\n labelColor={labelColor}\n data-testid={labelDataTestId || LEFT_NAVIGATION_DATA_TESTID.LIST_ITEM_LABEL_ID_EXCEPTION}\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n >\n {labelOverflow === 'truncate' && label ? (\n <SimpleTruncatedTooltipText value={label} placement=\"bottom-start\" />\n ) : (\n label\n )}\n </StyledLabel>\n <StyledRightContainer\n pr=\"xxs2\"\n cols={['auto', 'auto']}\n alignItems=\"center\"\n gutter=\"xxs\"\n data-testid={LEFT_NAVIGATION_DATA_TESTID.RIGHT_CONTAINER} // https://jira.elliemae.io/browse/PUI-15589\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n >\n <StyledDate\n ml=\"xxs\"\n data-testid={LEFT_NAVIGATION_DATA_TESTID.ITEM_DATE} // https://jira.elliemae.io/browse/PUI-15589\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n >\n {labelRightSection}\n </StyledDate>\n {RightCom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AW;AAAA,YACX,QAAO;AAAA,YACP,eAAa,4BAA4B;AAAA,YACzC;AAAA,YACA;AAAA,YAEA;AAAA;AAAA,gBAAC;AAAA;AAAA,kBACC,IAAG;AAAA,kBACH,eAAa,4BAA4B;AAAA,kBACzC;AAAA,kBACA;AAAA,kBAEC;AAAA;AAAA,cACH;AAAA,cACC,kBAAkB,oBAAC,kBAAe,KAAU,MAAY;AAAA;AAAA;AAAA,QAC3D;AAAA;AAAA;AAAA,EACF;AAEJ;",
|
|
6
|
+
"names": ["React"]
|
|
7
7
|
}
|
|
@@ -1,17 +1,16 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
import { ITEM_TYPES } from "../
|
|
2
|
+
import { ITEM_TYPES } from "../constants/index.js";
|
|
3
3
|
import { ItemControlledDrilldown } from "./ItemControlledDrilldown/index.js";
|
|
4
|
-
import { ItemUncontrolledDrilldown } from "./ItemUncontrolledDrilldown/index.js";
|
|
5
4
|
import { ItemHeader } from "./ItemHeader/index.js";
|
|
6
5
|
import { ItemLink } from "./ItemLink/index.js";
|
|
7
6
|
import { ItemSection } from "./ItemSection/index.js";
|
|
8
7
|
import { ItemSeparator } from "./ItemSeparator/index.js";
|
|
8
|
+
import { ItemSkeleton } from "./ItemSkeleton/index.js";
|
|
9
9
|
import { ItemSubmenu } from "./ItemSubmenu/index.js";
|
|
10
10
|
import { ItemTextLabel } from "./ItemTextLabel/index.js";
|
|
11
|
+
import { ItemUncontrolledDrilldown } from "./ItemUncontrolledDrilldown/index.js";
|
|
11
12
|
import { ItemWithDate } from "./ItemWithDate/index.js";
|
|
12
|
-
import { ItemSkeleton } from "./ItemSkeleton/index.js";
|
|
13
13
|
export * from "./ItemControlledDrilldown/index.js";
|
|
14
|
-
export * from "./ItemUncontrolledDrilldown/index.js";
|
|
15
14
|
export * from "./ItemHeader/index.js";
|
|
16
15
|
export * from "./ItemLink/index.js";
|
|
17
16
|
export * from "./ItemSection/index.js";
|
|
@@ -19,8 +18,8 @@ export * from "./ItemSeparator/index.js";
|
|
|
19
18
|
export * from "./ItemSkeleton/index.js";
|
|
20
19
|
export * from "./ItemSubmenu/index.js";
|
|
21
20
|
export * from "./ItemTextLabel/index.js";
|
|
21
|
+
export * from "./ItemUncontrolledDrilldown/index.js";
|
|
22
22
|
export * from "./ItemWithDate/index.js";
|
|
23
|
-
const outOfTheBoxTypes = Object.values(ITEM_TYPES);
|
|
24
23
|
const {
|
|
25
24
|
LEFT_NAV_ITEM_CONTROLLED_DRILLDOWN,
|
|
26
25
|
LEFT_NAV_ITEM_UNCONTROLLED_DRILLDOWN,
|
|
@@ -46,7 +45,6 @@ const outOfTheBoxComponents = {
|
|
|
46
45
|
[LEFT_NAV_ITEM_WITH_DATE]: ItemWithDate
|
|
47
46
|
};
|
|
48
47
|
export {
|
|
49
|
-
outOfTheBoxComponents
|
|
50
|
-
outOfTheBoxTypes
|
|
48
|
+
outOfTheBoxComponents
|
|
51
49
|
};
|
|
52
50
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../src/outOfTheBox/index.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import type React from 'react';\nimport
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import type React from 'react';\nimport { ITEM_TYPES } from '../constants/index.js';\nimport type { DSLeftNavigationT } from '../react-desc-prop-types.js';\nimport { ItemControlledDrilldown } from './ItemControlledDrilldown/index.js';\nimport { ItemHeader } from './ItemHeader/index.js';\nimport { ItemLink } from './ItemLink/index.js';\nimport { ItemSection } from './ItemSection/index.js';\nimport { ItemSeparator } from './ItemSeparator/index.js';\nimport { ItemSkeleton } from './ItemSkeleton/index.js';\nimport { ItemSubmenu } from './ItemSubmenu/index.js';\nimport { ItemTextLabel } from './ItemTextLabel/index.js';\nimport { ItemUncontrolledDrilldown } from './ItemUncontrolledDrilldown/index.js';\nimport { ItemWithDate } from './ItemWithDate/index.js';\n\nexport * from './ItemControlledDrilldown/index.js';\nexport * from './ItemHeader/index.js';\nexport * from './ItemLink/index.js';\nexport * from './ItemSection/index.js';\nexport * from './ItemSeparator/index.js';\nexport * from './ItemSkeleton/index.js';\nexport * from './ItemSubmenu/index.js';\nexport * from './ItemTextLabel/index.js';\nexport * from './ItemUncontrolledDrilldown/index.js';\nexport * from './ItemWithDate/index.js';\n\nconst {\n LEFT_NAV_ITEM_CONTROLLED_DRILLDOWN,\n LEFT_NAV_ITEM_UNCONTROLLED_DRILLDOWN,\n LEFT_NAV_ITEM_HEADER,\n LEFT_NAV_ITEM_LINK,\n LEFT_NAV_ITEM_SECTION,\n LEFT_NAV_ITEM_SEPARATOR,\n LEFT_NAV_ITEM_SKELETON,\n LEFT_NAV_ITEM_SUBMENU,\n LEFT_NAV_ITEM_TEXT_LABEL,\n LEFT_NAV_ITEM_WITH_DATE,\n} = ITEM_TYPES;\n\nexport const outOfTheBoxComponents: Record<string, React.ComponentType<DSLeftNavigationT.ComponentProps>> = {\n [LEFT_NAV_ITEM_CONTROLLED_DRILLDOWN]: ItemControlledDrilldown,\n [LEFT_NAV_ITEM_UNCONTROLLED_DRILLDOWN]: ItemUncontrolledDrilldown,\n [LEFT_NAV_ITEM_HEADER]: ItemHeader,\n [LEFT_NAV_ITEM_LINK]: ItemLink,\n [LEFT_NAV_ITEM_SECTION]: ItemSection,\n [LEFT_NAV_ITEM_SEPARATOR]: ItemSeparator,\n [LEFT_NAV_ITEM_SKELETON]: ItemSkeleton,\n [LEFT_NAV_ITEM_SUBMENU]: ItemSubmenu,\n [LEFT_NAV_ITEM_TEXT_LABEL]: ItemTextLabel,\n [LEFT_NAV_ITEM_WITH_DATE]: ItemWithDate,\n};\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACCvB,SAAS,kBAAkB;AAE3B,SAAS,+BAA+B;AACxC,SAAS,kBAAkB;AAC3B,SAAS,gBAAgB;AACzB,SAAS,mBAAmB;AAC5B,SAAS,qBAAqB;AAC9B,SAAS,oBAAoB;AAC7B,SAAS,mBAAmB;AAC5B,SAAS,qBAAqB;AAC9B,SAAS,iCAAiC;AAC1C,SAAS,oBAAoB;AAE7B,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AAEd,MAAM;AAAA,EACJ;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,IAAI;AAEG,MAAM,wBAA+F;AAAA,EAC1G,CAAC,kCAAkC,GAAG;AAAA,EACtC,CAAC,oCAAoC,GAAG;AAAA,EACxC,CAAC,oBAAoB,GAAG;AAAA,EACxB,CAAC,kBAAkB,GAAG;AAAA,EACtB,CAAC,qBAAqB,GAAG;AAAA,EACzB,CAAC,uBAAuB,GAAG;AAAA,EAC3B,CAAC,sBAAsB,GAAG;AAAA,EAC1B,CAAC,qBAAqB,GAAG;AAAA,EACzB,CAAC,wBAAwB,GAAG;AAAA,EAC5B,CAAC,uBAAuB,GAAG;AAC7B;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -2,7 +2,7 @@ import * as React from "react";
|
|
|
2
2
|
import { styled } from "@elliemae/ds-system";
|
|
3
3
|
import { Grid } from "@elliemae/ds-grid";
|
|
4
4
|
import { DSButtonV2 } from "@elliemae/ds-button-v2";
|
|
5
|
-
import { DSLeftNavigationName, LEFT_NAVIGATION_SLOTS } from "../constants/
|
|
5
|
+
import { DSLeftNavigationName, LEFT_NAVIGATION_SLOTS } from "../constants/index.js";
|
|
6
6
|
const StyledLabel = styled(Grid, {
|
|
7
7
|
name: DSLeftNavigationName,
|
|
8
8
|
slot: LEFT_NAVIGATION_SLOTS.ITEM_LABEL
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../src/outOfTheBox/styled.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable @typescript-eslint/no-unsafe-return */\nimport { styled, type Theme } from '@elliemae/ds-system';\nimport { Grid } from '@elliemae/ds-grid';\nimport { DSButtonV2 } from '@elliemae/ds-button-v2';\nimport { DSLeftNavigationName, LEFT_NAVIGATION_SLOTS } from '../constants/
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable @typescript-eslint/no-unsafe-return */\nimport { styled, type Theme } from '@elliemae/ds-system';\nimport { Grid } from '@elliemae/ds-grid';\nimport { DSButtonV2 } from '@elliemae/ds-button-v2';\nimport { DSLeftNavigationName, LEFT_NAVIGATION_SLOTS } from '../constants/index.js';\nimport type { DSLeftNavigationT } from '../react-desc-prop-types.js';\ntype ColorsKey = keyof Theme['colors'];\n\ninterface StyledLabelT {\n labelBold?: boolean;\n labelOverflow?: string;\n labelColor?: [ColorsKey, keyof Theme['colors'][ColorsKey]];\n}\n\nexport const StyledLabel = styled(Grid, {\n name: DSLeftNavigationName,\n slot: LEFT_NAVIGATION_SLOTS.ITEM_LABEL,\n})<StyledLabelT>`\n font-size: 1rem; // 13px -> 13/13 = 1rem;\n font-weight: ${(props) => (props.labelBold ? props.theme.fontWeights.semibold : props.theme.fontWeights.regular)};\n color: ${({ labelColor, theme }) =>\n labelColor ? theme.colors[labelColor[0]][labelColor[1]] : theme.colors.neutral[800]};\n line-height: 1.0769rem; // 14px -> 14/13 = 1.0769rem\n word-break: ${(props) => (props.labelOverflow === 'wrapAll' ? 'break-all' : 'normal')};\n @media (max-width: ${({ theme }) => theme.breakpoints.small}) {\n font-size: 0.8125rem; // 16px -> 13/16 = 0.8125\n line-height: 0.875rem; // 14px -> 14/16 = 0.875rem\n }\n`;\n\nexport const StyledDate = styled(Grid, { name: DSLeftNavigationName, slot: LEFT_NAVIGATION_SLOTS.ITEM_DATE })`\n font-size: 0.923rem; // 12px -> 12/13 = 0.9230rem\n color: ${(props) => props.theme.colors.neutral[600]};\n line-height: 1.0769rem; // 14px -> 14/13 = 1.0769rem\n @media (max-width: ${({ theme }) => theme.breakpoints.small}) {\n font-size: 0.75rem; // 12px -> 12/16 = 0.75rem\n line-height: 0.875rem; // 14px -> 14/16 = 0.875rem\n }\n`;\n\nexport const StyledArrowContainer = styled(Grid, {\n name: DSLeftNavigationName,\n slot: LEFT_NAVIGATION_SLOTS.ARROW_CONTAINER,\n})``;\n\nexport const StyledRightContainer = styled(Grid, {\n name: DSLeftNavigationName,\n slot: LEFT_NAVIGATION_SLOTS.RIGHT_CONTAINER,\n})``;\n\nexport const StyledSectionLabel = styled('span', {\n name: DSLeftNavigationName,\n slot: LEFT_NAVIGATION_SLOTS.SECTION_LABEL,\n})`\n font-size: 1rem; // 13px -> 13/13 = 1rem\n color: ${(props) => props.theme.colors.neutral[700]};\n margin-left: ${(props) => props.theme.space.xxs};\n line-height: 1rem; // 13px -> 13/13 = 1rem\n @media (max-width: ${({ theme }) => theme.breakpoints.small}) {\n font-size: 0.8125rem; // 13px -> 13/16 = 0.8125rem\n line-height: 0.8125rem; // 13px -> 13/16 = 0.8125rem\n }\n`;\n\nexport const StyledVerticalSeparator = styled('div', {\n name: DSLeftNavigationName,\n slot: LEFT_NAVIGATION_SLOTS.VERTICAL_SEPARATOR,\n})`\n margin: 0 ${(props) => props.theme.space.xxs};\n width: 1px;\n height: 13px;\n background: ${(props) => props.theme.colors.neutral[600]};\n`;\n\nexport const StyledRightLabel = styled('span', {\n name: DSLeftNavigationName,\n slot: LEFT_NAVIGATION_SLOTS.SECTION_RIGHT_LABEL,\n})`\n font-size: 0.923rem; // 12px -> 12/13 = 0.9230rem;\n line-height: 1rem; // 13px -> 13/13 = 1rem\n @media (max-width: ${({ theme }) => theme.breakpoints.small}) {\n font-size: 0.75rem; // 12px -> 12/16 = 0.75rem\n line-height: 0.8125rem; // 13px -> 13/16 = 0.8125rem\n }\n`;\n\nexport const StyledSectionContainer = styled(Grid, {\n name: DSLeftNavigationName,\n slot: LEFT_NAVIGATION_SLOTS.SECTION_CONTAINER,\n})``;\n\nexport const StyledBottomContainer = styled(Grid, {\n name: DSLeftNavigationName,\n slot: LEFT_NAVIGATION_SLOTS.BOTTOM_CONTAINER,\n})`\n grid-column: span 3;\n`;\n\nexport const StyledLeftContainer = styled(Grid, {\n name: DSLeftNavigationName,\n slot: LEFT_NAVIGATION_SLOTS.LEFT_CONTAINER,\n})``;\n\nexport const StyledItemLabel = styled(Grid, { name: DSLeftNavigationName, slot: LEFT_NAVIGATION_SLOTS.ITEM_LABEL })<{\n labelOverflow?: DSLeftNavigationT.LabelOveflowT;\n}>`\n font-size: 1.0769rem; // 14px -> 14/13 = 1.0769rem\n color: ${(props) => props.theme.colors.neutral[800]};\n word-break: ${(props) => (props.labelOverflow === 'wrapAll' ? 'break-all' : 'normal')};\n @media (max-width: ${({ theme }) => theme.breakpoints.small}) {\n font-size: 0.875rem; // 14px -> 14/16 = 0.875rem\n }\n`;\n\nexport const StyledChevronLeft = styled(DSButtonV2, {\n name: DSLeftNavigationName,\n slot: LEFT_NAVIGATION_SLOTS.ITEM_CHEVRON_BACK,\n})`\n padding: 0;\n :focus {\n outline: 2px solid ${(props) => props.theme.colors.brand[800]};\n }\n`;\n"],
|
|
5
5
|
"mappings": "AAAA,YAAY,WAAW;ACCvB,SAAS,cAA0B;AACnC,SAAS,YAAY;AACrB,SAAS,kBAAkB;AAC3B,SAAS,sBAAsB,6BAA6B;AAUrD,MAAM,cAAc,OAAO,MAAM;AAAA,EACtC,MAAM;AAAA,EACN,MAAM,sBAAsB;AAC9B,CAAC;AAAA;AAAA,iBAEgB,CAAC,UAAW,MAAM,YAAY,MAAM,MAAM,YAAY,WAAW,MAAM,MAAM,YAAY,OAAQ;AAAA,WACvG,CA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;AAAA,EAC7C,MAAM;AAAA,EACN,MAAM,sBAAsB;AAC9B,CAAC;AAAA;AAAA;AAAA,uBAGsB,CAAC,EAAE,MAAM,MAAM,MAAM,YAAY,KAAK;AAAA;AAAA;AAAA;AAAA;AAMtD,MAAM,yBAAyB,OAAO,MAAM;AAAA,EACjD,MAAM;AAAA,EACN,MAAM,sBAAsB;AAC9B,CAAC;AAEM,MAAM,wBAAwB,OAAO,MAAM;AAAA,EAChD,MAAM;AAAA,EACN,MAAM,sBAAsB;AAC9B,CAAC;AAAA;AAAA;AAIM,MAAM,sBAAsB,OAAO,MAAM;AAAA,EAC9C,MAAM;AAAA,EACN,MAAM,sBAAsB;AAC9B,CAAC;AAEM,MAAM,kBAAkB,OAAO,MAAM,EAAE,MAAM,sBAAsB,MAAM,sBAAsB,WAAW,CAAC;AAAA;AAAA,WAIvG,CAAC,UAAU,MAAM,MAAM,OAAO,QAAQ,GAAG,CAAC;AAAA,gBACrC,CAAC,UAAW,MAAM,kBAAkB,YAAY,cAAc,QAAS;AAAA,uBAChE,CAAC,EAAE,MAAM,MAAM,MAAM,YAAY,KAAK;AAAA;AAAA;AAAA;AAKtD,MAAM,oBAAoB,OAAO,YAAY;AAAA,EAClD,MAAM;AAAA,EACN,MAAM,sBAAsB;AAC9B,CAAC;AAAA;AAAA;AAAA,yBAGwB,CAAC,UAAU,MAAM,MAAM,OAAO,MAAM,GAAG,CAAC;AAAA;AAAA;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -3,7 +3,7 @@ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
|
3
3
|
import { useGetGlobalAttributes } from "@elliemae/ds-props-helpers";
|
|
4
4
|
import React2 from "react";
|
|
5
5
|
import { LeftNavContext } from "../../LeftNavigationContext.js";
|
|
6
|
-
import { LEFT_NAVIGATION_DATA_TESTID } from "../../constants/
|
|
6
|
+
import { LEFT_NAVIGATION_DATA_TESTID } from "../../constants/index.js";
|
|
7
7
|
import { ItemSkeleton } from "../../outOfTheBox/ItemSkeleton/index.js";
|
|
8
8
|
import { LeftNavFooterItem } from "../LeftNavFooterItem/index.js";
|
|
9
9
|
import { LeftNavLoading } from "../LeftNavLoading/index.js";
|
|
@@ -18,10 +18,14 @@ import {
|
|
|
18
18
|
} from "./styled.js";
|
|
19
19
|
const leftNavScreenReaderInstructions = "Left Navigation. You can navigate through the items using the Up/Down arrows. To expand or select an item, use the Enter/Return or Space keys. Expandable items can also be opened/closed with the Right/Left arrows. The Home and End keys will take you to the first and last item respectively.";
|
|
20
20
|
const LeftNavInnerContent = () => {
|
|
21
|
+
const ctx = React2.useContext(LeftNavContext);
|
|
21
22
|
const {
|
|
23
|
+
leftNavProps,
|
|
22
24
|
leftNavProps: { HeaderComponent, BodyHeaderComponent, openedItem, items, withoutBodyShadow, isSkeleton },
|
|
23
25
|
selectedItem
|
|
24
|
-
} =
|
|
26
|
+
} = ctx;
|
|
27
|
+
const getOwnerProps = React2.useCallback(() => leftNavProps, [leftNavProps]);
|
|
28
|
+
const getOwnerPropsArguments = React2.useCallback(() => ({}), []);
|
|
25
29
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
26
30
|
/* @__PURE__ */ jsx(
|
|
27
31
|
StyledLeftNavHeaderArea,
|
|
@@ -29,7 +33,16 @@ const LeftNavInnerContent = () => {
|
|
|
29
33
|
selected: !!HeaderComponent && [selectedItem, openedItem].includes(HeaderComponent.dsId),
|
|
30
34
|
"data-testid": LEFT_NAVIGATION_DATA_TESTID.HEADER_AREA,
|
|
31
35
|
role: "group",
|
|
32
|
-
|
|
36
|
+
getOwnerProps,
|
|
37
|
+
getOwnerPropsArguments,
|
|
38
|
+
children: isSkeleton ? /* @__PURE__ */ jsx(
|
|
39
|
+
ItemSkeleton,
|
|
40
|
+
{
|
|
41
|
+
ctx,
|
|
42
|
+
item: { dsId: "header-skeleton", itemOpts: { skeletonVariant: "item" } },
|
|
43
|
+
hasBorderBottom: true
|
|
44
|
+
}
|
|
45
|
+
) : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
33
46
|
" ",
|
|
34
47
|
HeaderComponent ? /* @__PURE__ */ jsx(OutOfTheBoxMapItem, { item: HeaderComponent }) : null
|
|
35
48
|
] })
|
|
@@ -42,6 +55,8 @@ const LeftNavInnerContent = () => {
|
|
|
42
55
|
rows: ["auto", "1fr"],
|
|
43
56
|
role: "group",
|
|
44
57
|
"data-testid": LEFT_NAVIGATION_DATA_TESTID.BODY_AREAS_CONTAINER,
|
|
58
|
+
getOwnerProps,
|
|
59
|
+
getOwnerPropsArguments,
|
|
45
60
|
children: [
|
|
46
61
|
/* @__PURE__ */ jsxs(
|
|
47
62
|
StyledLeftNavBodyHeaderArea,
|
|
@@ -50,10 +65,13 @@ const LeftNavInnerContent = () => {
|
|
|
50
65
|
role: "group",
|
|
51
66
|
isSkeleton,
|
|
52
67
|
"data-testid": LEFT_NAVIGATION_DATA_TESTID.BODY_HEADER_AREA,
|
|
68
|
+
getOwnerProps,
|
|
69
|
+
getOwnerPropsArguments,
|
|
53
70
|
children: [
|
|
54
71
|
isSkeleton ? /* @__PURE__ */ jsx(
|
|
55
72
|
ItemSkeleton,
|
|
56
73
|
{
|
|
74
|
+
ctx,
|
|
57
75
|
item: {
|
|
58
76
|
dsId: "body-header-skeleton",
|
|
59
77
|
itemOpts: {
|
|
@@ -74,9 +92,12 @@ const LeftNavInnerContent = () => {
|
|
|
74
92
|
role: "group",
|
|
75
93
|
isSkeleton,
|
|
76
94
|
"data-testid": LEFT_NAVIGATION_DATA_TESTID.BODY_ITEMS_AREA,
|
|
95
|
+
getOwnerProps,
|
|
96
|
+
getOwnerPropsArguments,
|
|
77
97
|
children: isSkeleton ? /* @__PURE__ */ jsx(
|
|
78
98
|
ItemSkeleton,
|
|
79
99
|
{
|
|
100
|
+
ctx,
|
|
80
101
|
item: {
|
|
81
102
|
dsId: "action-items-skeleton",
|
|
82
103
|
itemOpts: {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/parts/LeftNavContent/index.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { useGetGlobalAttributes } from '@elliemae/ds-props-helpers';\nimport React from 'react';\nimport { LeftNavContext } from '../../LeftNavigationContext.js';\nimport { LEFT_NAVIGATION_DATA_TESTID } from '../../constants/
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { useGetGlobalAttributes } from '@elliemae/ds-props-helpers';\nimport React from 'react';\nimport { LeftNavContext } from '../../LeftNavigationContext.js';\nimport { LEFT_NAVIGATION_DATA_TESTID } from '../../constants/index.js';\nimport { ItemSkeleton } from '../../outOfTheBox/ItemSkeleton/index.js';\nimport { LeftNavFooterItem } from '../LeftNavFooterItem/index.js';\nimport { LeftNavLoading } from '../LeftNavLoading/index.js';\nimport { OutOfTheBoxMapItem } from '../OutOfTheBoxMapItem.js';\nimport {\n StyledLeftNavAreasContainer,\n StyledLeftNavBodyAreasContainer,\n StyledLeftNavBodyHeaderArea,\n StyledLeftNavBodyItemsArea,\n StyledLeftNavExpandAnimationWrapper,\n StyledLeftNavHeaderArea,\n} from './styled.js';\nconst leftNavScreenReaderInstructions =\n 'Left Navigation. You can navigate through the items using the Up/Down arrows. ' +\n 'To expand or select an item, use the Enter/Return or Space keys. ' +\n 'Expandable items can also be opened/closed with the Right/Left arrows. ' +\n 'The Home and End keys will take you to the first and last item respectively.';\n\nconst LeftNavInnerContent = () => {\n const ctx = React.useContext(LeftNavContext);\n const {\n leftNavProps,\n leftNavProps: { HeaderComponent, BodyHeaderComponent, openedItem, items, withoutBodyShadow, isSkeleton },\n selectedItem,\n } = ctx;\n const getOwnerProps = React.useCallback(() => leftNavProps, [leftNavProps]);\n const getOwnerPropsArguments = React.useCallback(() => ({}), []);\n return (\n <>\n <StyledLeftNavHeaderArea\n selected={!!HeaderComponent && [selectedItem, openedItem].includes(HeaderComponent.dsId as string)}\n data-testid={LEFT_NAVIGATION_DATA_TESTID.HEADER_AREA} // https://jira.elliemae.io/browse/PUI-15589\n role=\"group\"\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n >\n {isSkeleton ? (\n <ItemSkeleton\n ctx={ctx}\n item={{ dsId: 'header-skeleton', itemOpts: { skeletonVariant: 'item' } }}\n hasBorderBottom\n />\n ) : (\n <> {HeaderComponent ? <OutOfTheBoxMapItem item={HeaderComponent} /> : null}</>\n )}\n </StyledLeftNavHeaderArea>\n <StyledLeftNavBodyAreasContainer\n cols={['1fr']}\n rows={['auto', '1fr']}\n role=\"group\"\n data-testid={LEFT_NAVIGATION_DATA_TESTID.BODY_AREAS_CONTAINER} // https://jira.elliemae.io/browse/PUI-15589\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n >\n <StyledLeftNavBodyHeaderArea\n selected={!!BodyHeaderComponent && [selectedItem, openedItem].includes(BodyHeaderComponent.dsId as string)}\n role=\"group\"\n isSkeleton={isSkeleton}\n data-testid={LEFT_NAVIGATION_DATA_TESTID.BODY_HEADER_AREA} // https://jira.elliemae.io/browse/PUI-15589\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n >\n {isSkeleton ? (\n <ItemSkeleton\n ctx={ctx}\n item={{\n dsId: 'body-header-skeleton',\n itemOpts: {\n skeletonVariant: 'item',\n },\n }}\n />\n ) : null}\n {!isSkeleton && BodyHeaderComponent ? <OutOfTheBoxMapItem item={BodyHeaderComponent} /> : null}\n </StyledLeftNavBodyHeaderArea>\n <StyledLeftNavBodyItemsArea\n selected={!withoutBodyShadow && openedItem !== null}\n tabIndex={-1}\n role=\"group\"\n isSkeleton={isSkeleton}\n data-testid={LEFT_NAVIGATION_DATA_TESTID.BODY_ITEMS_AREA} // https://jira.elliemae.io/browse/PUI-15589\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n >\n {isSkeleton ? (\n <ItemSkeleton\n ctx={ctx}\n item={{\n dsId: 'action-items-skeleton',\n itemOpts: {\n skeletonVariant: 'subitem',\n },\n }}\n />\n ) : (\n <>\n {items.map((item) => (\n <OutOfTheBoxMapItem item={item} key={item.dsId} />\n ))}\n </>\n )}\n </StyledLeftNavBodyItemsArea>\n </StyledLeftNavBodyAreasContainer>\n </>\n );\n};\n\n// original props from previous dev\nconst LeftNavContent: React.ComponentType = () => {\n const {\n expandedForAnimation,\n leftNavProps: {\n expanded,\n expandedWidth,\n FooterLabelComponent,\n footerLabel,\n onFooterExpand,\n onFooterClose,\n loading,\n },\n leftNavProps,\n } = React.useContext(LeftNavContext);\n\n const getOwnerProps = React.useCallback(() => leftNavProps, [leftNavProps]);\n\n const getOwnerPropsArguments = React.useCallback(() => ({}), []);\n\n const globalProps = useGetGlobalAttributes(leftNavProps);\n\n return (\n <StyledLeftNavExpandAnimationWrapper\n expandedWidth={expandedWidth}\n expanded={expanded}\n aria-label={leftNavScreenReaderInstructions}\n data-testid={LEFT_NAVIGATION_DATA_TESTID.ROOT} // https://jira.elliemae.io/browse/PUI-15589\n {...globalProps}\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n >\n <StyledLeftNavAreasContainer\n expandedWidth={expandedWidth}\n expanded={expandedForAnimation}\n rows={loading ? ['1fr', 'auto'] : ['auto', '1fr', 'auto']}\n cols={['1fr']}\n role=\"menu\"\n data-testid={LEFT_NAVIGATION_DATA_TESTID.AREAS_CONTAINER} // https://jira.elliemae.io/browse/PUI-15589\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n >\n {loading && <LeftNavLoading expanded={expandedForAnimation} />}\n {!loading && <LeftNavInnerContent />}\n <LeftNavFooterItem\n footerLabel={footerLabel}\n FooterLabelComponent={FooterLabelComponent}\n onFooterExpand={onFooterExpand}\n onFooterClose={onFooterClose}\n />\n </StyledLeftNavAreasContainer>\n </StyledLeftNavExpandAnimationWrapper>\n );\n};\n\nexport default LeftNavContent;\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACyCb,SAMA,UANA,KAMA,YANA;AAzCV,SAAS,8BAA8B;AACvC,OAAOA,YAAW;AAClB,SAAS,sBAAsB;AAC/B,SAAS,mCAAmC;AAC5C,SAAS,oBAAoB;AAC7B,SAAS,yBAAyB;AAClC,SAAS,sBAAsB;AAC/B,SAAS,0BAA0B;AACnC;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,MAAM,kCACJ;AAKF,MAAM,sBAAsB,MAAM;AAChC,QAAM,MAAMA,OAAM,WAAW,cAAc;AAC3C,QAAM;AAAA,IACJ;AAAA,IACA,cAAc,EAAE,iBAAiB,qBAAqB,YAAY,OAAO,mBAAmB,WAAW;AAAA,IACvG;AAAA,EACF,IAAI;AACJ,QAAM,gBAAgBA,OAAM,YAAY,MAAM,cAAc,CAAC,YAAY,CAAC;AAC1E,QAAM,yBAAyBA,OAAM,YAAY,OAAO,CAAC,IAAI,CAAC,CAAC;AAC/D,SACE,iCACE;AAAA;AAAA,MAAC;AAAA;AAAA,QACC,UAAU,CAAC,CAAC,mBAAmB,CAAC,cAAc,UAAU,EAAE,SAAS,gBAAgB,IAAc;AAAA,QACjG,eAAa,4BAA4B;AAAA,QACzC,MAAK;AAAA,QACL;AAAA,QACA;AAAA,QAEC,uBACC;AAAA,UAAC;AAAA;AAAA,YACC;AAAA,YACA,MAAM,EAAE,MAAM,mBAAmB,UAAU,EAAE,iBAAiB,OAAO,EAAE;AAAA,YACvE,iBAAe;AAAA;AAAA,QACjB,IAEA,iCAAE;AAAA;AAAA,UAAE,kBAAkB,oBAAC,sBAAmB,MAAM,iBAAiB,IAAK;AAAA,WAAK;AAAA;AAAA,IAE/E;AAAA,IACA;AAAA,MAAC;AAAA;AAAA,QACC,MAA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,IAAIA,OAAM,WAAW,cAAc;AAEnC,QAAM,gBAAgBA,OAAM,YAAY,MAAM,cAAc,CAAC,YAAY,CAAC;AAE1E,QAAM,yBAAyBA,OAAM,YAAY,OAAO,CAAC,IAAI,CAAC,CAAC;AAE/D,QAAM,cAAc,uBAAuB,YAAY;AAEvD,SACE;AAAA,IAAC;AAAA;AAAA,MACC;AAAA,MACA;AAAA,MACA,cAAY;AAAA,MACZ,eAAa,4BAA4B;AAAA,MACxC,GAAG;AAAA,MACJ;AAAA,MACA;AAAA,MAEA;AAAA,QAAC;AAAA;AAAA,UACC;AAAA,UACA,UAAU;AAAA,UACV,MAAM,UAAU,CAAC,OAAO,MAAM,IAAI,CAAC,QAAQ,OAAO,MAAM;AAAA,UACxD,MAAM,CAAC,KAAK;AAAA,UACZ,MAAK;AAAA,UACL,eAAa,4BAA4B;AAAA,UACzC;AAAA,UACA;AAAA,UAEC;AAAA,uBAAW,oBAAC,kBAAe,UAAU,sBAAsB;AAAA,YAC3D,CAAC,WAAW,oBAAC,uBAAoB;AAAA,YAClC;AAAA,cAAC;AAAA;AAAA,gBACC;AAAA,gBACA;AAAA,gBACA;AAAA,gBACA;AAAA;AAAA,YACF;AAAA;AAAA;AAAA,MACF;AAAA;AAAA,EACF;AAEJ;AAEA,IAAO,yBAAQ;",
|
|
6
6
|
"names": ["React"]
|
|
7
7
|
}
|
|
@@ -1,7 +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, LEFT_NAVIGATION_SLOTS } from "../../constants/
|
|
4
|
+
import { DSLeftNavigationName, LEFT_NAVIGATION_SLOTS } from "../../constants/index.js";
|
|
5
5
|
const getLeftShadowStyles = ({
|
|
6
6
|
selected,
|
|
7
7
|
selectedParent,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/parts/LeftNavContent/styled.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { Grid } from '@elliemae/ds-grid';\nimport type { Theme } from '@elliemae/ds-system';\nimport { styled } from '@elliemae/ds-system';\nimport { DSLeftNavigationName, LEFT_NAVIGATION_SLOTS } from '../../constants/
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { Grid } from '@elliemae/ds-grid';\nimport type { Theme } from '@elliemae/ds-system';\nimport { styled } from '@elliemae/ds-system';\nimport { DSLeftNavigationName, LEFT_NAVIGATION_SLOTS } from '../../constants/index.js';\n\ntype LeftNavProps = {\n expanded: boolean;\n expandedWidth: string;\n};\n\nconst getLeftShadowStyles = ({\n selected,\n selectedParent,\n theme,\n}: {\n selected: boolean;\n selectedParent?: boolean;\n theme: Theme;\n}) => {\n if (!selected && !selectedParent) {\n return `\n box-shadow: inset 4px 0 0 0 transparent;\n :hover {\n box-shadow: inset 4px 0 0 0 ${theme.colors.brand[300]};\n }\n :active {\n box-shadow: inset 4px 0 0 0 ${theme.colors.brand[400]};\n }\n `;\n }\n return `box-shadow: inset 4px 0 0 0 ${theme.colors.brand[400]};`;\n};\n\nexport const StyledLeftNavExpandAnimationWrapper = styled('nav', {\n name: DSLeftNavigationName,\n slot: LEFT_NAVIGATION_SLOTS.ROOT,\n})<LeftNavProps>`\n width: ${(props) => (props.expanded ? props.expandedWidth : '48px')};\n transition: width ${(props) => (props.expanded ? 'ease-out' : 'ease-in')} 350ms;\n box-shadow: -1px 0 0 0 ${(props) => props.theme.colors.neutral[100]};\n border: 1px solid ${(props) => props.theme.colors.neutral[100]};\n overflow: hidden;\n height: 100%;\n position: relative;\n`;\n\nexport const StyledLeftNavAreasContainer = styled(Grid, {\n name: DSLeftNavigationName,\n slot: LEFT_NAVIGATION_SLOTS.AREAS_CONTAINER,\n})<LeftNavProps>`\n width: ${(props) => (props.expanded ? `calc(${props.expandedWidth} - 2px)` : '46px')};\n height: 100%;\n`;\n\nexport const StyledLeftNavHeaderArea = styled('div', {\n name: DSLeftNavigationName,\n slot: LEFT_NAVIGATION_SLOTS.HEADER_AREA,\n})<{ selected: boolean; selectedParent?: boolean }>`\n ${getLeftShadowStyles}\n`;\n\nexport const StyledLeftNavBodyAreasContainer = styled(Grid, {\n name: DSLeftNavigationName,\n slot: LEFT_NAVIGATION_SLOTS.BODY_AREAS_CONTAINER,\n})`\n width: 100%;\n`;\n\nexport const StyledLeftNavBodyHeaderArea = styled('div', {\n name: DSLeftNavigationName,\n slot: LEFT_NAVIGATION_SLOTS.BODY_HEADER_AREA,\n})<{ selected: boolean; selectedParent?: boolean; isSkeleton: boolean }>`\n width: 100%;\n ${({ isSkeleton }) => (!isSkeleton ? getLeftShadowStyles : '')}\n`;\n\nexport const StyledLeftNavBodyItemsArea = styled('div', {\n name: DSLeftNavigationName,\n slot: LEFT_NAVIGATION_SLOTS.BODY_ITEMS_AREA,\n})<{ selected: boolean; isSkeleton: boolean }>`\n width: 100%;\n overflow: auto;\n box-shadow: ${({ isSkeleton, selected, theme }) =>\n !isSkeleton ? `inset 4px 0 0 0 ${selected ? theme.colors.brand[400] : 'transparent'}` : ''};\n`;\n"],
|
|
5
5
|
"mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,YAAY;AAErB,SAAS,cAAc;AACvB,SAAS,sBAAsB,6BAA6B;AAO5D,MAAM,sBAAsB,CAAC;AAAA,EAC3B;AAAA,EACA;AAAA,EACA;AACF,MAIM;AACJ,MAAI,CAAC,YAAY,CAAC,gBAAgB;AAChC,WAAO;AAAA;AAAA;AAAA,sCAG2B,MAAM,OAAO,MAAM,GAAG,CAAC;AAAA;AAAA;AAAA,sCAGvB,MAAM,OAAO,MAAM,GAAG,CAAC;AAAA;AAAA;AAAA,EAG3D;AACA,SAAO,+BAA+B,MAAM,OAAO,MAAM,GAAG,CAAC;AAC/D;AAEO,MAAM,sCAAsC,OA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