@elliemae/ds-left-navigation 3.80.0-next.30 → 3.80.0-next.35
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/TruncatedTooltipText.js +25 -4
- package/dist/cjs/TruncatedTooltipText.js.map +2 -2
- package/dist/cjs/constants/index.js +4 -0
- package/dist/cjs/constants/index.js.map +2 -2
- package/dist/cjs/exported-related/Icon/index.js +24 -3
- package/dist/cjs/exported-related/Icon/index.js.map +3 -3
- package/dist/cjs/exported-related/OpenWindowItem/index.js +23 -2
- package/dist/cjs/exported-related/OpenWindowItem/index.js.map +3 -3
- package/dist/cjs/outOfTheBox/ItemHeader/index.js +1 -1
- package/dist/cjs/outOfTheBox/ItemHeader/index.js.map +2 -2
- package/dist/cjs/outOfTheBox/ItemLink/index.js +1 -1
- package/dist/cjs/outOfTheBox/ItemLink/index.js.map +2 -2
- package/dist/cjs/outOfTheBox/ItemSubmenu/index.js +1 -1
- package/dist/cjs/outOfTheBox/ItemSubmenu/index.js.map +2 -2
- package/dist/cjs/outOfTheBox/ItemTextLabel/index.js +1 -1
- package/dist/cjs/outOfTheBox/ItemTextLabel/index.js.map +2 -2
- package/dist/cjs/outOfTheBox/ItemUncontrolledDrilldown/index.js +1 -1
- package/dist/cjs/outOfTheBox/ItemUncontrolledDrilldown/index.js.map +2 -2
- package/dist/cjs/outOfTheBox/ItemWithDate/index.js +1 -1
- package/dist/cjs/outOfTheBox/ItemWithDate/index.js.map +2 -2
- package/dist/cjs/parts/LeftNavFooterItem/index.js +2 -3
- package/dist/cjs/parts/LeftNavFooterItem/index.js.map +2 -2
- package/dist/cjs/react-desc-prop-types.js +58 -1
- package/dist/cjs/react-desc-prop-types.js.map +2 -2
- package/dist/cjs/typescript-testing/slot-props.js +8 -0
- package/dist/cjs/typescript-testing/slot-props.js.map +2 -2
- package/dist/esm/TruncatedTooltipText.js +26 -5
- package/dist/esm/TruncatedTooltipText.js.map +2 -2
- package/dist/esm/constants/index.js +4 -0
- package/dist/esm/constants/index.js.map +2 -2
- package/dist/esm/exported-related/Icon/index.js +24 -3
- package/dist/esm/exported-related/Icon/index.js.map +3 -3
- package/dist/esm/exported-related/OpenWindowItem/index.js +23 -2
- package/dist/esm/exported-related/OpenWindowItem/index.js.map +3 -3
- package/dist/esm/outOfTheBox/ItemHeader/index.js +1 -1
- package/dist/esm/outOfTheBox/ItemHeader/index.js.map +2 -2
- package/dist/esm/outOfTheBox/ItemLink/index.js +1 -1
- package/dist/esm/outOfTheBox/ItemLink/index.js.map +2 -2
- package/dist/esm/outOfTheBox/ItemSubmenu/index.js +1 -1
- package/dist/esm/outOfTheBox/ItemSubmenu/index.js.map +2 -2
- package/dist/esm/outOfTheBox/ItemTextLabel/index.js +1 -1
- package/dist/esm/outOfTheBox/ItemTextLabel/index.js.map +2 -2
- package/dist/esm/outOfTheBox/ItemUncontrolledDrilldown/index.js +1 -1
- package/dist/esm/outOfTheBox/ItemUncontrolledDrilldown/index.js.map +2 -2
- package/dist/esm/outOfTheBox/ItemWithDate/index.js +1 -1
- package/dist/esm/outOfTheBox/ItemWithDate/index.js.map +2 -2
- package/dist/esm/parts/LeftNavFooterItem/index.js +2 -3
- package/dist/esm/parts/LeftNavFooterItem/index.js.map +2 -2
- package/dist/esm/react-desc-prop-types.js +58 -1
- package/dist/esm/react-desc-prop-types.js.map +2 -2
- package/dist/esm/typescript-testing/slot-props.js +8 -0
- package/dist/esm/typescript-testing/slot-props.js.map +2 -2
- package/dist/types/constants/index.d.ts +12 -0
- package/dist/types/exported-related/Icon/index.d.ts +4 -0
- package/dist/types/react-desc-prop-types.d.ts +4 -0
- package/package.json +14 -12
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/exported-related/Icon/index.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { styled } from '@elliemae/ds-system';\nimport { type SvgIconT } from '@elliemae/ds-icons';\n\nconst AugmentedIcon = (Icon: React.ComponentType<{ color: unknown; tabIndex: number }>) => styled(Icon)`\n cursor: pointer;\n\n outline: 0;\n :focus,\n :active {\n outline: 1px solid #1e79c2;\n }\n`;\n\nexport const Icon = (IconComponent: React.ComponentType<{ color: unknown; tabIndex: number }>)
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;
|
|
6
|
-
"names": ["Icon"]
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { styled } from '@elliemae/ds-system';\nimport { type SvgIconT } from '@elliemae/ds-icons';\nimport { DSLeftNavigationName, LEFT_NAVIGATION_SLOTS } from '../../constants/index.js';\nimport { LeftNavContext } from '../../LeftNavigationContext.js';\n\n/**\n * preserveLegacyDataTestId keeps the ds-icons generated data-testid on the svg wrapper,\n * the left-nav slot must not override a data-testid QA may already rely on.\n */\nconst AugmentedIcon = (Icon: React.ComponentType<{ color: unknown; tabIndex: number }>) => styled(Icon, {\n name: DSLeftNavigationName,\n slot: LEFT_NAVIGATION_SLOTS.ICON,\n preserveLegacyDataTestId: true,\n})`\n cursor: pointer;\n\n outline: 0;\n :focus,\n :active {\n outline: 1px solid #1e79c2;\n }\n`;\n\n/**\n * The styled component is created once per Icon() call, not per render:\n * a new component type on every render would remount the icon and drop its focus.\n */\nexport const Icon = (IconComponent: React.ComponentType<{ color: unknown; tabIndex: number }>) => {\n const StyledComponent = AugmentedIcon(IconComponent);\n return function LeftNavIcon(props?: SvgIconT.Props): JSX.Element {\n const { leftNavProps } = React.useContext(LeftNavContext);\n const getOwnerProps = React.useCallback(() => leftNavProps, [leftNavProps]);\n const getOwnerPropsArguments = React.useCallback(() => ({}), []);\n return (\n <StyledComponent\n color={['brand-primary', '800']}\n tabIndex={0}\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n {...props}\n />\n );\n };\n};\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACmCjB;AAnCN,OAAOA,YAAW;AAClB,SAAS,cAAc;AAEvB,SAAS,sBAAsB,6BAA6B;AAC5D,SAAS,sBAAsB;AAM/B,MAAM,gBAAgB,CAACC,UAAoE,OAAOA,OAAM;AAAA,EACtG,MAAM;AAAA,EACN,MAAM,sBAAsB;AAAA,EAC5B,0BAA0B;AAC5B,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAcM,MAAM,OAAO,CAAC,kBAA6E;AAChG,QAAM,kBAAkB,cAAc,aAAa;AACnD,SAAO,SAAS,YAAY,OAAqC;AAC/D,UAAM,EAAE,aAAa,IAAID,OAAM,WAAW,cAAc;AACxD,UAAM,gBAAgBA,OAAM,YAAY,MAAM,cAAc,CAAC,YAAY,CAAC;AAC1E,UAAM,yBAAyBA,OAAM,YAAY,OAAO,CAAC,IAAI,CAAC,CAAC;AAC/D,WACE;AAAA,MAAC;AAAA;AAAA,QACC,OAAO,CAAC,iBAAiB,KAAK;AAAA,QAC9B,UAAU;AAAA,QACV;AAAA,QACA;AAAA,QACC,GAAG;AAAA;AAAA,IACN;AAAA,EAEJ;AACF;",
|
|
6
|
+
"names": ["React", "Icon"]
|
|
7
7
|
}
|
|
@@ -1,14 +1,35 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
import React2 from "react";
|
|
3
4
|
import { styled } from "@elliemae/ds-system";
|
|
4
5
|
import { OpenWindow as OpenWindowIcon } from "@elliemae/ds-icons";
|
|
5
|
-
|
|
6
|
+
import { DSLeftNavigationName, LEFT_NAVIGATION_SLOTS } from "../../constants/index.js";
|
|
7
|
+
import { LeftNavContext } from "../../LeftNavigationContext.js";
|
|
8
|
+
const StyledOpenWindow = styled(OpenWindowIcon, {
|
|
9
|
+
name: DSLeftNavigationName,
|
|
10
|
+
slot: LEFT_NAVIGATION_SLOTS.OPEN_WINDOW_ICON,
|
|
11
|
+
preserveLegacyDataTestId: true
|
|
12
|
+
})`
|
|
6
13
|
cursor: pointer;
|
|
7
14
|
:focus {
|
|
8
15
|
outline: 1px solid ${(props) => props.theme.colors.brand[800]};
|
|
9
16
|
}
|
|
10
17
|
`;
|
|
11
|
-
const OpenWindow = (props) =>
|
|
18
|
+
const OpenWindow = (props) => {
|
|
19
|
+
const { leftNavProps } = React2.useContext(LeftNavContext);
|
|
20
|
+
const getOwnerProps = React2.useCallback(() => leftNavProps, [leftNavProps]);
|
|
21
|
+
const getOwnerPropsArguments = React2.useCallback(() => ({}), []);
|
|
22
|
+
return /* @__PURE__ */ jsx(
|
|
23
|
+
StyledOpenWindow,
|
|
24
|
+
{
|
|
25
|
+
size: "s",
|
|
26
|
+
color: ["brand-primary", "800"],
|
|
27
|
+
getOwnerProps,
|
|
28
|
+
getOwnerPropsArguments,
|
|
29
|
+
...props
|
|
30
|
+
}
|
|
31
|
+
);
|
|
32
|
+
};
|
|
12
33
|
var OpenWindowItem_default = OpenWindow;
|
|
13
34
|
export {
|
|
14
35
|
OpenWindow,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/exported-related/OpenWindowItem/index.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { styled } from '@elliemae/ds-system';\nimport { OpenWindow as OpenWindowIcon, type SvgIconT } from '@elliemae/ds-icons';\n\nconst StyledOpenWindow = styled(OpenWindowIcon)`\n cursor: pointer;\n :focus {\n outline: 1px solid ${(props) => props.theme.colors.brand[800]};\n }\n`;\n\nexport const OpenWindow = (props: SvgIconT.Props): JSX.Element => (\n
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;
|
|
6
|
-
"names": []
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { styled } from '@elliemae/ds-system';\nimport { OpenWindow as OpenWindowIcon, type SvgIconT } from '@elliemae/ds-icons';\nimport { DSLeftNavigationName, LEFT_NAVIGATION_SLOTS } from '../../constants/index.js';\nimport { LeftNavContext } from '../../LeftNavigationContext.js';\n\n/**\n * preserveLegacyDataTestId keeps the ds-icons generated data-testid on the svg wrapper,\n * the left-nav slot must not override a data-testid QA may already rely on.\n */\nconst StyledOpenWindow = styled(OpenWindowIcon, {\n name: DSLeftNavigationName,\n slot: LEFT_NAVIGATION_SLOTS.OPEN_WINDOW_ICON,\n preserveLegacyDataTestId: true,\n})`\n cursor: pointer;\n :focus {\n outline: 1px solid ${(props) => props.theme.colors.brand[800]};\n }\n`;\n\nexport const OpenWindow = (props: SvgIconT.Props): JSX.Element => {\n const { leftNavProps } = React.useContext(LeftNavContext);\n const getOwnerProps = React.useCallback(() => leftNavProps, [leftNavProps]);\n const getOwnerPropsArguments = React.useCallback(() => ({}), []);\n return (\n <StyledOpenWindow\n size=\"s\"\n color={['brand-primary', '800']}\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n {...props}\n />\n );\n};\n\nexport default OpenWindow;\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;AC0BnB;AA1BJ,OAAOA,YAAW;AAClB,SAAS,cAAc;AACvB,SAAS,cAAc,sBAAqC;AAC5D,SAAS,sBAAsB,6BAA6B;AAC5D,SAAS,sBAAsB;AAM/B,MAAM,mBAAmB,OAAO,gBAAgB;AAAA,EAC9C,MAAM;AAAA,EACN,MAAM,sBAAsB;AAAA,EAC5B,0BAA0B;AAC5B,CAAC;AAAA;AAAA;AAAA,yBAGwB,CAAC,UAAU,MAAM,MAAM,OAAO,MAAM,GAAG,CAAC;AAAA;AAAA;AAI1D,MAAM,aAAa,CAAC,UAAuC;AAChE,QAAM,EAAE,aAAa,IAAIA,OAAM,WAAW,cAAc;AACxD,QAAM,gBAAgBA,OAAM,YAAY,MAAM,cAAc,CAAC,YAAY,CAAC;AAC1E,QAAM,yBAAyBA,OAAM,YAAY,OAAO,CAAC,IAAI,CAAC,CAAC;AAC/D,SACE;AAAA,IAAC;AAAA;AAAA,MACC,MAAK;AAAA,MACL,OAAO,CAAC,iBAAiB,KAAK;AAAA,MAC9B;AAAA,MACA;AAAA,MACC,GAAG;AAAA;AAAA,EACN;AAEJ;AAEA,IAAO,yBAAQ;",
|
|
6
|
+
"names": ["React"]
|
|
7
7
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
3
|
import { ChevronSmallLeft } from "@elliemae/ds-icons";
|
|
4
|
-
import { TruncatedTooltipText } from "../../TruncatedTooltipText.js";
|
|
5
4
|
import React2, { useCallback } from "react";
|
|
5
|
+
import { TruncatedTooltipText } from "../../TruncatedTooltipText.js";
|
|
6
6
|
import { CHEVRON_BACK_DS_ID, LEFT_NAVIGATION_DATA_TESTID } from "../../constants/index.js";
|
|
7
7
|
import { ItemRenderer } from "../../exported-related/index.js";
|
|
8
8
|
import {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/outOfTheBox/ItemHeader/index.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable @typescript-eslint/no-unsafe-assignment */\n/* eslint-disable @typescript-eslint/no-unused-vars */\n/* eslint-disable max-lines */\n/* eslint-disable complexity */\nimport { ChevronSmallLeft } from '@elliemae/ds-icons';\nimport type { Theme } from '@elliemae/ds-system';\nimport {
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;ACoFjB,SAwBM,KAxBN;AAhFN,SAAS,wBAAwB;AAEjC,
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable @typescript-eslint/no-unsafe-assignment */\n/* eslint-disable @typescript-eslint/no-unused-vars */\n/* eslint-disable max-lines */\n/* eslint-disable complexity */\nimport { ChevronSmallLeft } from '@elliemae/ds-icons';\nimport type { Theme } from '@elliemae/ds-system';\nimport React, { useCallback } from 'react';\nimport { TruncatedTooltipText } from '../../TruncatedTooltipText.js';\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 ItemHeader = (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 setFocusedItem,\n selectedItem,\n selectedParent,\n },\n } = props;\n\n const getOwnerProps = React.useCallback(() => leftNavProps, [leftNavProps]);\n const getOwnerPropsArguments = React.useCallback(() => ({}), []);\n const labelOverflow = itemLabelOverflow || leftNavLabelOverflow;\n\n const opened = openedItem === dsId;\n\n const ariaLabel = item.itemOpts.ariaLabel ?? (typeof label === 'string' ? `${label}, category` : 'category');\n\n const isSelected = selectedItem === dsId || selectedParent === dsId;\n\n const shadowStyle = useCallback(\n (opened_: boolean) => (theme: Theme) =>\n !opened_ ? notOpenedShadowStyle(isSelected)(theme) : `box-shadow: inset 4px 0 0 0 #52A6EC`,\n [isSelected],\n );\n\n return (\n <ItemRenderer\n item={{\n ...item,\n itemOpts: {\n ariaLabel,\n ariaExpanded: opened,\n ...item.itemOpts,\n openable: expandedForAnimation && !opened,\n closable: expandedForAnimation && opened,\n selectable: !opened,\n },\n }}\n hasBorderBottom\n borderBottomMr={opened ? '12px' : '0px'}\n shadowStyle={shadowStyle}\n >\n <StyledLeftContainer\n cols={opened ? ['auto', 'auto'] : ['38px']}\n gutter=\"1px\"\n pl={opened ? 'xxs' : 0}\n justifyItems=\"center\"\n data-testid={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 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' ? <TruncatedTooltipText value={label} placement=\"bottom-start\" /> : label}\n </StyledItemLabel>\n <StyledRightContainer\n pl=\"xs\"\n pr={opened ? 'xxs2' : 'xxs'}\n onFocus={(e: React.FocusEvent) => {\n setFocusedItem(null);\n e.stopPropagation();\n }}\n onKeyDown={(e: React.KeyboardEvent) => 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 pb=\"xxxs\"\n pl=\"xxs\"\n pr=\"xxs\"\n onFocus={(e: React.FocusEvent) => {\n setFocusedItem(null);\n e.stopPropagation();\n }}\n onKeyDown={(e: React.KeyboardEvent) => 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;ACoFjB,SAwBM,KAxBN;AAhFN,SAAS,wBAAwB;AAEjC,OAAOA,UAAS,mBAAmB;AACnC,SAAS,4BAA4B;AACrC,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;AA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YACH,IAAG;AAAA,YACH,IAAG;AAAA,YACH,SAAS,CAAC,MAAwB;AAChC,6BAAe,IAAI;AACnB,gBAAE,gBAAgB;AAAA,YACpB;AAAA,YACA,WAAW,CAAC,MAA2B,EAAE,gBAAgB;AAAA,YACzD,eAAa,4BAA4B;AAAA,YACzC;AAAA,YACA;AAAA,YAEA,8BAAC,mBAAgB,KAAU,MAAY;AAAA;AAAA,QACzC;AAAA;AAAA;AAAA,EAEJ;AAEJ;",
|
|
6
6
|
"names": ["React"]
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
-
import { TruncatedTooltipText } from "../../TruncatedTooltipText.js";
|
|
4
3
|
import React2, { useCallback } from "react";
|
|
4
|
+
import { TruncatedTooltipText } from "../../TruncatedTooltipText.js";
|
|
5
5
|
import { LEFT_NAVIGATION_DATA_TESTID } from "../../constants/index.js";
|
|
6
6
|
import { ItemRenderer } from "../../exported-related/index.js";
|
|
7
7
|
import { StyledItemLabel, StyledLeftContainer, StyledRightContainer } from "../styled.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/outOfTheBox/ItemLink/index.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable indent */\nimport type { Theme } from '@elliemae/ds-system';\nimport {
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;ACoDnB,SAmB2B,KAnB3B;AAlDJ,
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable indent */\nimport type { Theme } from '@elliemae/ds-system';\nimport React, { useCallback } from 'react';\nimport { TruncatedTooltipText } from '../../TruncatedTooltipText.js';\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 { StyledItemLabel, StyledLeftContainer, StyledRightContainer } 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 ItemLink = (props: DSLeftNavigationT.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,\n leftNavProps: { labelOverflow: leftNavLabelOverflow },\n selectedItem,\n selectedParent,\n },\n } = props;\n\n const getOwnerProps = React.useCallback(() => leftNavProps, [leftNavProps]);\n const getOwnerPropsArguments = React.useCallback(() => ({}), []);\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 ...item.itemOpts,\n selectable: true,\n },\n }}\n shadowStyle={shadowStyle}\n >\n <StyledLeftContainer\n cols={['38px']}\n gutter=\"1px\"\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 {CollapsedComponent && <CollapsedComponent item={item} ctx={ctx} />}\n </StyledLeftContainer>\n <StyledItemLabel\n ml=\"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' ? <TruncatedTooltipText value={label} placement=\"bottom-start\" /> : label}\n </StyledItemLabel>\n <StyledRightContainer\n mt=\"xxxs\"\n pr=\"xxs2\"\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 </ItemRenderer>\n );\n};\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACoDnB,SAmB2B,KAnB3B;AAlDJ,OAAOA,UAAS,mBAAmB;AACnC,SAAS,4BAA4B;AACrC,SAAS,mCAAmC;AAC5C,SAAS,oBAAoB;AAE7B,SAAS,iBAAiB,qBAAqB,4BAA4B;AAE3E,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,WAAW,CAAC,UAAyD;AAChF,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;AAAA,MACA,cAAc,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C3D;AAAA;AAAA;AAAA,EACF;AAEJ;",
|
|
6
6
|
"names": ["React"]
|
|
7
7
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
3
|
import { ChevronSmallLeft } from "@elliemae/ds-icons";
|
|
4
|
-
import { TruncatedTooltipText } from "../../TruncatedTooltipText.js";
|
|
5
4
|
import React2 from "react";
|
|
5
|
+
import { TruncatedTooltipText } from "../../TruncatedTooltipText.js";
|
|
6
6
|
import { CHEVRON_BACK_DS_ID, LEFT_NAVIGATION_DATA_TESTID } from "../../constants/index.js";
|
|
7
7
|
import { ItemRenderer } from "../../exported-related/index.js";
|
|
8
8
|
import {
|
|
@@ -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 { TruncatedTooltipText } from '../../TruncatedTooltipText.js';\nimport
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;ACqFjB,SAyBM,KAzBN;AAlFN,SAAS,wBAAwB;AAEjC,
|
|
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 React from 'react';\nimport { TruncatedTooltipText } from '../../TruncatedTooltipText.js';\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' ? <TruncatedTooltipText 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,OAAOA,YAAW;AAClB,SAAS,4BAA4B;AACrC,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,UA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YACH,SAAS,CAAC,MAAwB;AAChC,gBAAE,gBAAgB;AAClB,6BAAe,IAAI;AAAA,YACrB;AAAA,YACA,WAAW,CAAC,MAA2B,EAAE,gBAAgB;AAAA,YACzD,SAAS,CAAC,MAAwB,cAAc,EAAE,gBAAgB;AAAA,YAClE,eAAa,4BAA4B;AAAA,YACzC;AAAA,YACA;AAAA,YAEA,8BAAC,mBAAgB,KAAU,MAAY;AAAA;AAAA,QACzC;AAAA;AAAA;AAAA,EAEJ;AAEJ;",
|
|
6
6
|
"names": ["React"]
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
-
import { TruncatedTooltipText } from "../../TruncatedTooltipText.js";
|
|
4
3
|
import React2 from "react";
|
|
4
|
+
import { TruncatedTooltipText } from "../../TruncatedTooltipText.js";
|
|
5
5
|
import { LEFT_NAVIGATION_DATA_TESTID } from "../../constants/index.js";
|
|
6
6
|
import { ItemRenderer } from "../../exported-related/index.js";
|
|
7
7
|
import { StyledLabel } from "../styled.js";
|
|
@@ -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 { TruncatedTooltipText } from '../../TruncatedTooltipText.js';\nimport
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;ACuBnB,SAQ8B,KAR9B;AAvBJ,
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { TruncatedTooltipText } from '../../TruncatedTooltipText.js';\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' ? <TruncatedTooltipText value={label} placement=\"bottom-start\" /> : label}\n </StyledLabel>\n </ItemRenderer>\n );\n};\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACuBnB,SAQ8B,KAR9B;AAvBJ,OAAOA,YAAW;AAClB,SAAS,4BAA4B;AACrC,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,wBAAqB,OAAO,OAAO,WAAU,gBAAe,IAAK;AAAA;AAAA,QACpG;AAAA;AAAA;AAAA,EACF;AAEJ;",
|
|
6
6
|
"names": ["React"]
|
|
7
7
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
3
|
import { ArrowheadDown, ArrowheadRight } from "@elliemae/ds-icons";
|
|
4
|
-
import { TruncatedTooltipText } from "../../TruncatedTooltipText.js";
|
|
5
4
|
import React2, { useCallback, useEffect, useMemo } from "react";
|
|
5
|
+
import { TruncatedTooltipText } from "../../TruncatedTooltipText.js";
|
|
6
6
|
import { ITEM_TYPES, LEFT_NAVIGATION_DATA_TESTID } from "../../constants/index.js";
|
|
7
7
|
import { ItemRenderer } from "../../exported-related/index.js";
|
|
8
8
|
import { ItemSeparator } from "../ItemSeparator/index.js";
|
|
@@ -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 {
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;ACiCZ,cAmGL,YAnGK;AAhCX,SAAS,eAAe,sBAAsB;AAC9C,
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable max-lines */\nimport { ArrowheadDown, ArrowheadRight } from '@elliemae/ds-icons';\nimport React, { useCallback, useEffect, useMemo } from 'react';\nimport { TruncatedTooltipText } from '../../TruncatedTooltipText.js';\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' ? <TruncatedTooltipText 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,OAAOA,UAAS,aAAa,WAAW,eAAe;AACvD,SAAS,4BAA4B;AACrC,SAAS,YAAY,mCAAmC;AACxD,SAAS,oBAAoB;AAE7B,SAAS,qBAAqB;AAC9B,SAAS,qBAAqB;AAC9B,SAAS,oBAAoB;AAC7B,SAAS,sBAAsB,Y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A,YACA,eAAa,mBAAmB,4BAA4B;AAAA,YAC5D;AAAA,YACA;AAAA,YAEC,4BAAkB,aAAa,oBAAC,wBAAqB,OAAO,OAAO,WAAU,gBAAe,IAAK;AAAA;AAAA,QACpG;AAAA,QACA;AAAA,UAAC;AAAA;AAAA,YACC,IAAG;AAAA,YACH,MAAM,CAAC,QAAQ,MAAM;AAAA,YACrB,YAAW;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
6
|
"names": ["React"]
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
-
import { TruncatedTooltipText } from "../../TruncatedTooltipText.js";
|
|
4
3
|
import React2 from "react";
|
|
4
|
+
import { TruncatedTooltipText } from "../../TruncatedTooltipText.js";
|
|
5
5
|
import { LEFT_NAVIGATION_DATA_TESTID } from "../../constants/index.js";
|
|
6
6
|
import { ItemRenderer } from "../../exported-related/index.js";
|
|
7
7
|
import { StyledDate, StyledLabel, StyledRightContainer } from "../styled.js";
|
|
@@ -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 { TruncatedTooltipText } from '../../TruncatedTooltipText.js';\nimport
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;ACwCW,cAiB5B,YAjB4B;AAxClC,
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { TruncatedTooltipText } from '../../TruncatedTooltipText.js';\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 <TruncatedTooltipText 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 {RightComponent && <RightComponent ctx={ctx} item={item} />}\n </StyledRightContainer>\n </ItemRenderer>\n );\n};\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACwCW,cAiB5B,YAjB4B;AAxClC,OAAOA,YAAW;AAClB,SAAS,4BAA4B;AACrC,SAAS,mCAAmC;AAC5C,SAAS,oBAAoB;AAE7B,SAAS,YAAY,aAAa,4BAA4B;AAEvD,MAAM,eAAe,CAAC,UAAyD;AACpF,QAAM;AAAA,IACJ;AAAA,IACA,MAAM;AAAA,MACJ,UAAU;AAAA,QACR;AAAA,QACA;AAAA,QACA;AAAA,QACA,eAAe;AAAA,QACf;AAAA,QACA;AAAA,QACA;AAAA,MACF;AAAA,IACF;AAAA,IACA;AAAA,IACA,KAAK;AAAA,MACH;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,IAAG;AAAA,YACH;AAAA,YACA;AAAA,YACA;AAAA,YACA,eAAa,mBAAmB,4BAA4B;AAAA,YAC5D;AAAA,YACA;AAAA,YAEC,4BAAkB,cAAc,QAC/B,oBAAC,wBAAqB,OAAO,OAAO,WAAU,gBAAe,IAE7D;AAAA;AAAA,QAEJ;AAAA,QACA;AAAA,UAAC;AAAA;AAAA,YACC,IAAG;AAAA,YACH,MAAM,CAAC,QAAQ,MAAM;AAAA,YACrB,YAAW;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
6
|
"names": ["React"]
|
|
7
7
|
}
|
|
@@ -3,8 +3,8 @@ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
|
3
3
|
import { Grid } from "@elliemae/ds-grid";
|
|
4
4
|
import { MenuCollapse, MenuExpand } from "@elliemae/ds-icons";
|
|
5
5
|
import { DSSkeleton } from "@elliemae/ds-skeleton";
|
|
6
|
-
import { TruncatedTooltipText } from "../../TruncatedTooltipText.js";
|
|
7
6
|
import React2, { useCallback, useContext, useMemo } from "react";
|
|
7
|
+
import { TruncatedTooltipText } from "../../TruncatedTooltipText.js";
|
|
8
8
|
import LeftNavigationContext from "../../LeftNavigationContext.js";
|
|
9
9
|
import { FOOTER_DS_ID, FOOTER_MENU_CLOSE_DS_ID, LEFT_NAVIGATION_DATA_TESTID } from "../../constants/index.js";
|
|
10
10
|
import { useKeyboardNavigation } from "../../hooks/index.js";
|
|
@@ -50,8 +50,7 @@ const LeftNavFooterItem = (props) => {
|
|
|
50
50
|
);
|
|
51
51
|
const label = useMemo(() => {
|
|
52
52
|
if (FooterLabelComponent) return /* @__PURE__ */ jsx(FooterLabelComponent, {});
|
|
53
|
-
if (labelOverflow === "truncate")
|
|
54
|
-
return /* @__PURE__ */ jsx(TruncatedTooltipText, { value: footerLabel, placement: "bottom-start" });
|
|
53
|
+
if (labelOverflow === "truncate") return /* @__PURE__ */ jsx(TruncatedTooltipText, { value: footerLabel, placement: "bottom-start" });
|
|
55
54
|
return footerLabel;
|
|
56
55
|
}, [footerLabel, FooterLabelComponent, labelOverflow]);
|
|
57
56
|
const postAnimationButtonFocusHandler = useCallback(
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/parts/LeftNavFooterItem/index.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable react-hooks/rules-of-hooks */\n/* eslint-disable max-lines */\nimport { Grid } from '@elliemae/ds-grid';\nimport { MenuCollapse, MenuExpand } from '@elliemae/ds-icons';\nimport { DSSkeleton } from '@elliemae/ds-skeleton';\nimport {
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;ACgEc,
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable react-hooks/rules-of-hooks */\n/* eslint-disable max-lines */\nimport { Grid } from '@elliemae/ds-grid';\nimport { MenuCollapse, MenuExpand } from '@elliemae/ds-icons';\nimport { DSSkeleton } from '@elliemae/ds-skeleton';\nimport React, { useCallback, useContext, useMemo } from 'react';\nimport { TruncatedTooltipText } from '../../TruncatedTooltipText.js';\nimport LeftNavigationContext from '../../LeftNavigationContext.js';\nimport { FOOTER_DS_ID, FOOTER_MENU_CLOSE_DS_ID, LEFT_NAVIGATION_DATA_TESTID } from '../../constants/index.js';\nimport { useKeyboardNavigation } from '../../hooks/index.js';\nimport {\n StyledFooterItem,\n StyledFooterLabel,\n StyledFooterMenu,\n StyledFooterSeparator,\n StyledMenuCollapse,\n} from './styled.js';\n\ntype LeftNavFooterItemProps = {\n footerLabel: string;\n FooterLabelComponent?: React.ComponentType<unknown>;\n onFooterExpand: React.MouseEventHandler & React.KeyboardEventHandler;\n onFooterClose: React.MouseEventHandler & React.KeyboardEventHandler;\n};\n\n// eslint-disable-next-line complexity\nexport const LeftNavFooterItem: React.ComponentType<LeftNavFooterItemProps> = (props) => {\n const { footerLabel, FooterLabelComponent, onFooterExpand = () => null, onFooterClose = () => null } = props;\n const {\n leftNavProps: { labelOverflow, isSkeleton, hideFooterPipe, expanded },\n expandedForAnimation,\n setFocusedItem,\n focusedItem,\n visibleItemsRefs,\n leftNavProps,\n } = useContext(LeftNavigationContext);\n const getOwnerProps = React.useCallback(() => leftNavProps, [leftNavProps]);\n const getOwnerPropsArguments = React.useCallback(() => ({}), []);\n const id = FOOTER_DS_ID;\n\n const handleOnClick = expandedForAnimation ? onFooterClose : onFooterExpand;\n\n const onKeyDown = useKeyboardNavigation({\n item: {\n dsId: id,\n itemOpts: {\n selectable: !expandedForAnimation,\n openable: false,\n closable: false,\n },\n },\n onClick: handleOnClick,\n });\n\n const handleMenuCollapseClick = useCallback(\n (e: React.MouseEvent<HTMLButtonElement, MouseEvent> | React.KeyboardEvent<HTMLButtonElement>) => {\n e.stopPropagation();\n handleOnClick(e as React.MouseEvent<HTMLButtonElement, MouseEvent>);\n setFocusedItem(id);\n },\n [handleOnClick, id, setFocusedItem],\n );\n\n const label = useMemo(() => {\n if (FooterLabelComponent) return <FooterLabelComponent />;\n if (labelOverflow === 'truncate') return <TruncatedTooltipText value={footerLabel} placement=\"bottom-start\" />;\n return footerLabel;\n }, [footerLabel, FooterLabelComponent, labelOverflow]);\n\n const postAnimationButtonFocusHandler = useCallback(\n (newHTMLNode: HTMLButtonElement | null) => {\n if (newHTMLNode === null || !expanded) {\n return;\n }\n if (focusedItem === id) {\n newHTMLNode.focus();\n }\n },\n [focusedItem, id, expanded],\n );\n\n if (isSkeleton) {\n return (\n <StyledFooterMenu\n key={id}\n data-testid={LEFT_NAVIGATION_DATA_TESTID.FOOTER_MENU} // https://jira.elliemae.io/browse/PUI-15589\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n >\n <Grid height=\"48px\" justifyContent=\"center\" alignItems=\"center\" cols={['1fr']} p=\"xxs\">\n <DSSkeleton variant=\"rectangular\" height=\"24px\" />\n </Grid>\n </StyledFooterMenu>\n );\n }\n\n return (\n <StyledFooterMenu\n key={id}\n data-testid={LEFT_NAVIGATION_DATA_TESTID.FOOTER_MENU} // https://jira.elliemae.io/browse/PUI-15589\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n >\n <StyledFooterItem\n innerRef={visibleItemsRefs.current[id]}\n tabIndex={expandedForAnimation ? -1 : 0}\n expanded={expandedForAnimation}\n pt=\"xxs2\"\n height={expandedForAnimation ? 'auto' : '48px'}\n alignItems=\"flex-start\"\n pl=\"xxs2\"\n cols={expandedForAnimation ? ['auto', '1fr', 'auto'] : ['38px']}\n onClick={expandedForAnimation ? () => null : handleOnClick}\n onKeyDown={onKeyDown}\n onFocus={() => setFocusedItem(id)}\n role=\"menuitem\"\n aria-label={\n expandedForAnimation\n ? `Footer, ${typeof footerLabel === 'string' ? footerLabel : ''}`\n : `Expand left navigation`\n }\n data-testid={LEFT_NAVIGATION_DATA_TESTID.FOOTER_ITEM} // https://jira.elliemae.io/browse/PUI-15589\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n >\n {!expandedForAnimation ? (\n <MenuExpand\n size=\"m\"\n color={['brand-primary', '800']}\n // https://jira.elliemae.io/browse/PUI-15589\n // VERY SPECIAL CASE, THE SLOT FOOTER_BTN GOES TO THE ICON WHEN COLLAPSED, TO THE BTN WHEN EXPANDED\n data-testid={LEFT_NAVIGATION_DATA_TESTID.FOOTER_BTN}\n />\n ) : (\n <>\n <StyledFooterLabel\n mt=\"5px\"\n mr=\"12px\"\n mb=\"16px\"\n labelOverflow={labelOverflow}\n aria-live=\"polite\"\n data-testid={LEFT_NAVIGATION_DATA_TESTID.ITEM_LABEL} // https://jira.elliemae.io/browse/PUI-15589\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n >\n {label}\n </StyledFooterLabel>\n {!hideFooterPipe ? (\n <StyledFooterSeparator\n mt=\"xxxs\"\n data-testid={LEFT_NAVIGATION_DATA_TESTID.FOOTER_SEPARATOR} // https://jira.elliemae.io/browse/PUI-15589\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n />\n ) : (\n <div></div>\n )}\n <StyledMenuCollapse\n innerRef={postAnimationButtonFocusHandler}\n buttonType=\"raw\"\n onClick={handleMenuCollapseClick}\n tabIndex={0}\n onFocus={(e: React.FocusEvent) => {\n e.stopPropagation();\n setFocusedItem(FOOTER_MENU_CLOSE_DS_ID);\n }}\n role=\"button\"\n aria-label=\"Collapse left navigation\"\n // VERY SPECIAL CASE, THE SLOT FOOTER_BTN GOES TO THE ICON WHEN COLLAPSED, TO THE BTN WHEN EXPANDED\n data-testid={LEFT_NAVIGATION_DATA_TESTID.FOOTER_BTN}\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n >\n <MenuCollapse size=\"m\" color={['brand-primary', '800']} />\n </StyledMenuCollapse>\n </>\n )}\n </StyledFooterItem>\n </StyledFooterMenu>\n );\n};\n\nexport default LeftNavFooterItem;\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACgEc,SAsE3B,UAtE2B,KAsE3B,YAtE2B;AA9DrC,SAAS,YAAY;AACrB,SAAS,cAAc,kBAAkB;AACzC,SAAS,kBAAkB;AAC3B,OAAOA,UAAS,aAAa,YAAY,eAAe;AACxD,SAAS,4BAA4B;AACrC,OAAO,2BAA2B;AAClC,SAAS,cAAc,yBAAyB,mCAAmC;AACnF,SAAS,6BAA6B;AACtC;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAUA,MAAM,oBAA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AAA,gBACC,IAAG;AAAA,gBACH,eAAa,4BAA4B;AAAA,gBACzC;AAAA,gBACA;AAAA;AAAA,YACF,IAEA,oBAAC,SAAI;AAAA,YAEP;AAAA,cAAC;AAAA;AAAA,gBACC,UAAU;AAAA,gBACV,YAAW;AAAA,gBACX,SAAS;AAAA,gBACT,UAAU;AAAA,gBACV,SAAS,CAAC,MAAwB;AAChC,oBAAE,gBAAgB;AAClB,iCAAe,uBAAuB;AAAA,gBACxC;AAAA,gBACA,MAAK;AAAA,gBACL,cAAW;AAAA,gBAEX,eAAa,4BAA4B;AAAA,gBACzC;AAAA,gBACA;AAAA,gBAEA,8BAAC,gBAAa,MAAK,KAAI,OAAO,CAAC,iBAAiB,KAAK,GAAG;AAAA;AAAA,YAC1D;AAAA,aACF;AAAA;AAAA,MAEJ;AAAA;AAAA,IA/EK;AAAA,EAgFP;AAEJ;AAEA,IAAO,4BAAQ;",
|
|
6
6
|
"names": ["React"]
|
|
7
7
|
}
|
|
@@ -61,6 +61,63 @@ const DSLeftNavigationItemPropTypes = {
|
|
|
61
61
|
itemOpts: PropTypes.object.description("Item options")
|
|
62
62
|
};
|
|
63
63
|
const DSLeftNavigationItemPropTypesSchema = DSLeftNavigationItemPropTypes;
|
|
64
|
+
const DSLeftNavigationItemOptionsPropTypes = {
|
|
65
|
+
label: PropTypes.oneOfType([PropTypes.string, PropTypes.node]).description(
|
|
66
|
+
"Text or element rendered as the item label"
|
|
67
|
+
),
|
|
68
|
+
labelBold: PropTypes.bool.description(
|
|
69
|
+
"Text label, with date and drilldown items only: whether the label is rendered with semibold font weight"
|
|
70
|
+
),
|
|
71
|
+
labelColor: PropTypes.array.description(
|
|
72
|
+
'Text label, with date and drilldown items only: theme color tuple for the label, e.g. ["neutral", "800"]'
|
|
73
|
+
),
|
|
74
|
+
labelOverflow: PropTypes.oneOf(["wrap", "wrapAll", "truncate"]).description(
|
|
75
|
+
"How the label handles overflow, falls back to the left navigation labelOverflow prop when not set. Not applied by section items"
|
|
76
|
+
),
|
|
77
|
+
labelRightSection: PropTypes.oneOfType([PropTypes.string, PropTypes.node]).description(
|
|
78
|
+
"Section, with date and drilldown items only: content rendered on the right side of the label, e.g. a date or an unread count"
|
|
79
|
+
),
|
|
80
|
+
selectable: PropTypes.bool.description(
|
|
81
|
+
"Whether clicking the item, or pressing Enter or Space on it, selects it. Header, submenu, link, section, separator and skeleton items set it themselves"
|
|
82
|
+
),
|
|
83
|
+
focuseable: PropTypes.bool.description(
|
|
84
|
+
"Whether the item can receive keyboard focus. Section, separator and skeleton items are never focusable"
|
|
85
|
+
),
|
|
86
|
+
startOpened: PropTypes.bool.description("Uncontrolled drilldown items only: whether the drilldown starts opened"),
|
|
87
|
+
isOpened: PropTypes.bool.description("Controlled drilldown items only: whether the drilldown is opened"),
|
|
88
|
+
openable: PropTypes.bool.description(
|
|
89
|
+
"Whether the ArrowRight key triggers the item, as a click does. Header, submenu and drilldown items set it from their opened state"
|
|
90
|
+
),
|
|
91
|
+
closable: PropTypes.bool.description(
|
|
92
|
+
"Whether the ArrowLeft key triggers the item, as a click does, and keeps focus on it. Header, submenu and drilldown items set it from their opened state"
|
|
93
|
+
),
|
|
94
|
+
indent: PropTypes.number.description("Left padding of the item, in pixels"),
|
|
95
|
+
LeftComponent: PropTypes.func.description(
|
|
96
|
+
"Section items only: component rendered on the left side of the item, receives { item, ctx }"
|
|
97
|
+
),
|
|
98
|
+
RightComponent: PropTypes.func.description(
|
|
99
|
+
"Header, submenu, link, section, with date and drilldown items only: component rendered on the right side of the item, receives { item, ctx }"
|
|
100
|
+
),
|
|
101
|
+
BottomComponent: PropTypes.func.description(
|
|
102
|
+
"Header and submenu items only: component rendered below the label, receives { item, ctx }"
|
|
103
|
+
),
|
|
104
|
+
ariaLabel: PropTypes.string.description("aria-label applied to the item"),
|
|
105
|
+
ariaRole: PropTypes.string.description(
|
|
106
|
+
"role applied to the item. Separator, skeleton and drilldown items set their own role"
|
|
107
|
+
),
|
|
108
|
+
ariaLive: PropTypes.string.description("Not applied by the out-of-the-box item types"),
|
|
109
|
+
ariaExpanded: PropTypes.bool.description(
|
|
110
|
+
"aria-expanded applied to the item. Header, submenu and drilldown items set it from their opened state"
|
|
111
|
+
),
|
|
112
|
+
ariaDescribedBy: PropTypes.string.description("aria-describedby applied to the item"),
|
|
113
|
+
items: PropTypes.arrayOf(PropTypes.object).description("Drilldown items only: the subitems to render"),
|
|
114
|
+
labelDataTestId: PropTypes.string.description(
|
|
115
|
+
"Overrides the data-testid of the item label. Not applied by controlled drilldown items"
|
|
116
|
+
),
|
|
117
|
+
skeletonVariant: PropTypes.oneOf(["item", "subitem"]).description(
|
|
118
|
+
"Skeleton shape used when the item renders as a skeleton"
|
|
119
|
+
)
|
|
120
|
+
};
|
|
64
121
|
const LeftNavItemProps = () => null;
|
|
65
122
|
LeftNavItemProps.displayName = "LeftNavItemProps";
|
|
66
123
|
const LeftNavItemPropsSchema = describe(LeftNavItemProps);
|
|
@@ -68,7 +125,7 @@ LeftNavItemPropsSchema.propTypes = DSLeftNavigationItemPropTypes;
|
|
|
68
125
|
const LeftNavItemOptions = () => null;
|
|
69
126
|
LeftNavItemOptions.displayName = "LeftNavItemOptions";
|
|
70
127
|
const LeftNavItemOptionsSchema = describe(LeftNavItemOptions);
|
|
71
|
-
LeftNavItemOptionsSchema.propTypes =
|
|
128
|
+
LeftNavItemOptionsSchema.propTypes = DSLeftNavigationItemOptionsPropTypes;
|
|
72
129
|
export {
|
|
73
130
|
DSLeftNavigationItemPropTypes,
|
|
74
131
|
DSLeftNavigationItemPropTypesSchema,
|