@elliemae/ds-card-navigation 3.55.0-next.7 → 3.55.0-next.9
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/DSCardNavigation.js +41 -40
- package/dist/cjs/DSCardNavigation.js.map +2 -2
- package/dist/cjs/config/useCardNavigation.js +19 -4
- package/dist/cjs/config/useCardNavigation.js.map +2 -2
- package/dist/cjs/parts/ActionsRegion.js +63 -0
- package/dist/cjs/parts/ActionsRegion.js.map +7 -0
- package/dist/cjs/{style.js → parts/style.js} +51 -34
- package/dist/cjs/parts/style.js.map +7 -0
- package/dist/cjs/parts/text-region/IconAndTextsRegion.js +101 -0
- package/dist/cjs/parts/text-region/IconAndTextsRegion.js.map +7 -0
- package/dist/cjs/parts/text-region/IconAndTextsRegionContent.js +88 -0
- package/dist/cjs/parts/text-region/IconAndTextsRegionContent.js.map +7 -0
- package/dist/cjs/react-desc-prop-types.js +3 -3
- package/dist/cjs/react-desc-prop-types.js.map +2 -2
- package/dist/esm/DSCardNavigation.js +42 -49
- package/dist/esm/DSCardNavigation.js.map +2 -2
- package/dist/esm/config/useCardNavigation.js +20 -5
- package/dist/esm/config/useCardNavigation.js.map +2 -2
- package/dist/esm/parts/ActionsRegion.js +33 -0
- package/dist/esm/parts/ActionsRegion.js.map +7 -0
- package/dist/esm/{style.js → parts/style.js} +51 -34
- package/dist/esm/parts/style.js.map +7 -0
- package/dist/esm/parts/text-region/IconAndTextsRegion.js +71 -0
- package/dist/esm/parts/text-region/IconAndTextsRegion.js.map +7 -0
- package/dist/esm/parts/text-region/IconAndTextsRegionContent.js +67 -0
- package/dist/esm/parts/text-region/IconAndTextsRegionContent.js.map +7 -0
- package/dist/esm/react-desc-prop-types.js +3 -3
- package/dist/esm/react-desc-prop-types.js.map +2 -2
- package/dist/types/DSCardNavigation.d.ts +1 -1
- package/dist/types/config/useCardNavigation.d.ts +7 -6
- package/dist/types/parts/ActionsRegion.d.ts +8 -0
- package/dist/types/{style.d.ts → parts/style.d.ts} +9 -4
- package/dist/types/parts/text-region/IconAndTextsRegion.d.ts +13 -0
- package/dist/types/parts/text-region/IconAndTextsRegionContent.d.ts +15 -0
- package/dist/types/tests/tooltip-tests/DSCardNavigation.tooltip.wrapText.interdependecy.test.playwright.d.ts +1 -0
- package/dist/types/tests/tooltip-tests/DSCardNavigationTooltipTestRenderer.d.ts +1 -0
- package/package.json +11 -11
- package/dist/cjs/DescriptionComponent.js +0 -79
- package/dist/cjs/DescriptionComponent.js.map +0 -7
- package/dist/cjs/TitleComponent.js +0 -51
- package/dist/cjs/TitleComponent.js.map +0 -7
- package/dist/cjs/style.js.map +0 -7
- package/dist/esm/DescriptionComponent.js +0 -49
- package/dist/esm/DescriptionComponent.js.map +0 -7
- package/dist/esm/TitleComponent.js +0 -21
- package/dist/esm/TitleComponent.js.map +0 -7
- package/dist/esm/style.js.map +0 -7
- package/dist/types/DescriptionComponent.d.ts +0 -4
- package/dist/types/TitleComponent.d.ts +0 -4
- package/dist/types/tests/overflow/DSCardNavigationOverflowTestRenderer.d.ts +0 -2
- package/dist/types/tests/wraptext/DSCardNavigationWrapTextTestRenderer.d.ts +0 -2
- /package/dist/types/tests/{overflow/DSCardNavigation.overflow.test.playwright.d.ts → tooltip-tests/DSCardNavigation.tooltip.hover.test.playwright.d.ts} +0 -0
- /package/dist/types/tests/{wraptext/DSCardNavigation.wrapText.test.playwright.d.ts → tooltip-tests/DSCardNavigation.tooltip.keyboard.test.playwright.d.ts} +0 -0
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { Grid } from "@elliemae/ds-grid";
|
|
4
|
+
import { useOnOverflowChange } from "@elliemae/ds-hooks-on-overflow-change";
|
|
5
|
+
import { DSTooltipV3 } from "@elliemae/ds-tooltip-v3";
|
|
6
|
+
import { DSTypography, TYPOGRAPHY_VARIANTS } from "@elliemae/ds-typography";
|
|
7
|
+
import React2 from "react";
|
|
8
|
+
import { IconAndTextsRegionContent } from "./IconAndTextsRegionContent.js";
|
|
9
|
+
const TooltipText = ({ title, description }) => /* @__PURE__ */ jsxs(Grid, { children: [
|
|
10
|
+
/* @__PURE__ */ jsx(DSTypography, { variant: TYPOGRAPHY_VARIANTS.H5_ARTICLE, children: title }),
|
|
11
|
+
/* @__PURE__ */ jsx(DSTypography, { variant: TYPOGRAPHY_VARIANTS.B1, children: description })
|
|
12
|
+
] });
|
|
13
|
+
const IconAndTextsRegion = ({
|
|
14
|
+
title,
|
|
15
|
+
description,
|
|
16
|
+
wrapText,
|
|
17
|
+
type,
|
|
18
|
+
Icon,
|
|
19
|
+
showFocusRingAroundAll,
|
|
20
|
+
hideFocusRingAroundAll
|
|
21
|
+
}) => {
|
|
22
|
+
const [isTitleTruncating, setIsTitleTruncating] = React2.useState(false);
|
|
23
|
+
const [isDescriptionTruncating, setIsDescriptionTruncating] = React2.useState(false);
|
|
24
|
+
const AnyOverFlow = isTitleTruncating || isDescriptionTruncating;
|
|
25
|
+
const { handleRef: titleHandleRef } = useOnOverflowChange({
|
|
26
|
+
onOverflowStateChange: setIsTitleTruncating
|
|
27
|
+
});
|
|
28
|
+
const { handleRef: descriptionHandleRef } = useOnOverflowChange({
|
|
29
|
+
onOverflowStateChange: setIsDescriptionTruncating
|
|
30
|
+
});
|
|
31
|
+
const TooltipTextProps = React2.useMemo(
|
|
32
|
+
() => ({
|
|
33
|
+
title,
|
|
34
|
+
description
|
|
35
|
+
}),
|
|
36
|
+
[title, description]
|
|
37
|
+
);
|
|
38
|
+
if (AnyOverFlow)
|
|
39
|
+
return /* @__PURE__ */ jsx(DSTooltipV3, { Text: TooltipText, textProps: TooltipTextProps, children: /* @__PURE__ */ jsx(
|
|
40
|
+
IconAndTextsRegionContent,
|
|
41
|
+
{
|
|
42
|
+
title,
|
|
43
|
+
description,
|
|
44
|
+
wrapText,
|
|
45
|
+
type,
|
|
46
|
+
Icon,
|
|
47
|
+
titleHandleRef,
|
|
48
|
+
descriptionHandleRef,
|
|
49
|
+
showFocusRingAroundAll,
|
|
50
|
+
hideFocusRingAroundAll
|
|
51
|
+
}
|
|
52
|
+
) });
|
|
53
|
+
return /* @__PURE__ */ jsx(
|
|
54
|
+
IconAndTextsRegionContent,
|
|
55
|
+
{
|
|
56
|
+
title,
|
|
57
|
+
description,
|
|
58
|
+
wrapText,
|
|
59
|
+
type,
|
|
60
|
+
Icon,
|
|
61
|
+
titleHandleRef,
|
|
62
|
+
descriptionHandleRef,
|
|
63
|
+
showFocusRingAroundAll,
|
|
64
|
+
hideFocusRingAroundAll
|
|
65
|
+
}
|
|
66
|
+
);
|
|
67
|
+
};
|
|
68
|
+
export {
|
|
69
|
+
IconAndTextsRegion
|
|
70
|
+
};
|
|
71
|
+
//# sourceMappingURL=IconAndTextsRegion.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/parts/text-region/IconAndTextsRegion.tsx"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { Grid } from '@elliemae/ds-grid';\nimport { useOnOverflowChange } from '@elliemae/ds-hooks-on-overflow-change';\nimport type { DSTooltipV3T } from '@elliemae/ds-tooltip-v3';\nimport { DSTooltipV3 } from '@elliemae/ds-tooltip-v3';\nimport { DSTypography, TYPOGRAPHY_VARIANTS } from '@elliemae/ds-typography';\nimport React from 'react';\nimport type { DSCardNavigationT } from '../../react-desc-prop-types.js';\nimport { IconAndTextsRegionContent } from './IconAndTextsRegionContent.js';\n\ntype TooltipTextProps = DSTooltipV3T.CustomInterface<{\n title: string;\n description: string;\n}>;\n\nconst TooltipText: React.ComponentType<TooltipTextProps> = ({ title, description }) => (\n <Grid>\n <DSTypography variant={TYPOGRAPHY_VARIANTS.H5_ARTICLE}>{title}</DSTypography>\n <DSTypography variant={TYPOGRAPHY_VARIANTS.B1}>{description}</DSTypography>\n </Grid>\n);\n\ninterface IconAndTextsRegionProps {\n title: DSCardNavigationT.InternalProps['title'];\n description: DSCardNavigationT.InternalProps['description'];\n wrapText: DSCardNavigationT.InternalProps['wrapText'];\n type: DSCardNavigationT.InternalProps['type'];\n Icon: DSCardNavigationT.InternalProps['Icon'];\n showFocusRingAroundAll: React.FocusEventHandler<HTMLDivElement>;\n hideFocusRingAroundAll: React.FocusEventHandler<HTMLDivElement>;\n}\n\nexport const IconAndTextsRegion: React.ComponentType<IconAndTextsRegionProps> = ({\n title,\n description,\n wrapText,\n type,\n Icon,\n showFocusRingAroundAll,\n hideFocusRingAroundAll,\n}) => {\n const [isTitleTruncating, setIsTitleTruncating] = React.useState(false);\n const [isDescriptionTruncating, setIsDescriptionTruncating] = React.useState(false);\n\n const AnyOverFlow = isTitleTruncating || isDescriptionTruncating;\n\n const { handleRef: titleHandleRef } = useOnOverflowChange({\n onOverflowStateChange: setIsTitleTruncating,\n });\n\n const { handleRef: descriptionHandleRef } = useOnOverflowChange({\n onOverflowStateChange: setIsDescriptionTruncating,\n });\n const TooltipTextProps = React.useMemo(\n () => ({\n title,\n description,\n }),\n [title, description],\n );\n\n if (AnyOverFlow)\n return (\n <DSTooltipV3<TooltipTextProps> Text={TooltipText} textProps={TooltipTextProps}>\n <IconAndTextsRegionContent\n title={title}\n description={description}\n wrapText={wrapText}\n type={type}\n Icon={Icon}\n titleHandleRef={titleHandleRef}\n descriptionHandleRef={descriptionHandleRef}\n showFocusRingAroundAll={showFocusRingAroundAll}\n hideFocusRingAroundAll={hideFocusRingAroundAll}\n />\n </DSTooltipV3>\n );\n return (\n <IconAndTextsRegionContent\n title={title}\n description={description}\n wrapText={wrapText}\n type={type}\n Icon={Icon}\n titleHandleRef={titleHandleRef}\n descriptionHandleRef={descriptionHandleRef}\n showFocusRingAroundAll={showFocusRingAroundAll}\n hideFocusRingAroundAll={hideFocusRingAroundAll}\n />\n );\n};\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACerB,SACE,KADF;AAfF,SAAS,YAAY;AACrB,SAAS,2BAA2B;AAEpC,SAAS,mBAAmB;AAC5B,SAAS,cAAc,2BAA2B;AAClD,OAAOA,YAAW;AAElB,SAAS,iCAAiC;AAO1C,MAAM,cAAqD,CAAC,EAAE,OAAO,YAAY,MAC/E,qBAAC,QACC;AAAA,sBAAC,gBAAa,SAAS,oBAAoB,YAAa,iBAAM;AAAA,EAC9D,oBAAC,gBAAa,SAAS,oBAAoB,IAAK,uBAAY;AAAA,GAC9D;AAaK,MAAM,qBAAmE,CAAC;AAAA,EAC/E;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,MAAM;AACJ,QAAM,CAAC,mBAAmB,oBAAoB,IAAIA,OAAM,SAAS,KAAK;AACtE,QAAM,CAAC,yBAAyB,0BAA0B,IAAIA,OAAM,SAAS,KAAK;AAElF,QAAM,cAAc,qBAAqB;AAEzC,QAAM,EAAE,WAAW,eAAe,IAAI,oBAAoB;AAAA,IACxD,uBAAuB;AAAA,EACzB,CAAC;AAED,QAAM,EAAE,WAAW,qBAAqB,IAAI,oBAAoB;AAAA,IAC9D,uBAAuB;AAAA,EACzB,CAAC;AACD,QAAM,mBAAmBA,OAAM;AAAA,IAC7B,OAAO;AAAA,MACL;AAAA,MACA;AAAA,IACF;AAAA,IACA,CAAC,OAAO,WAAW;AAAA,EACrB;AAEA,MAAI;AACF,WACE,oBAAC,eAA8B,MAAM,aAAa,WAAW,kBAC3D;AAAA,MAAC;AAAA;AAAA,QACC;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA;AAAA,IACF,GACF;AAEJ,SACE;AAAA,IAAC;AAAA;AAAA,MACC;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA;AAAA,EACF;AAEJ;",
|
|
6
|
+
"names": ["React"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { TYPOGRAPHY_VARIANTS } from "@elliemae/ds-typography";
|
|
4
|
+
import React2 from "react";
|
|
5
|
+
import { CARD_NAVIGATION_DATA_TESTID } from "../../constants/index.js";
|
|
6
|
+
import {
|
|
7
|
+
StyledCardNavigationCentralContent,
|
|
8
|
+
StyledCardNavigationContent,
|
|
9
|
+
StyledCardNavigationContentTitle,
|
|
10
|
+
StyledCardNavigationContentTitleWrapper,
|
|
11
|
+
StyledCardNavigationIcon,
|
|
12
|
+
StyledDescriptionTypography,
|
|
13
|
+
StyledGridTextContainer,
|
|
14
|
+
StyledTitleTypography
|
|
15
|
+
} from "../style.js";
|
|
16
|
+
const mainIconColor = ["neutral", "0"];
|
|
17
|
+
const cols = ["1fr"];
|
|
18
|
+
const IconAndTextsRegionContent = React2.memo((props) => {
|
|
19
|
+
const {
|
|
20
|
+
title,
|
|
21
|
+
description,
|
|
22
|
+
wrapText,
|
|
23
|
+
titleHandleRef,
|
|
24
|
+
descriptionHandleRef,
|
|
25
|
+
type,
|
|
26
|
+
Icon,
|
|
27
|
+
showFocusRingAroundAll,
|
|
28
|
+
hideFocusRingAroundAll
|
|
29
|
+
} = props;
|
|
30
|
+
return /* @__PURE__ */ jsxs(
|
|
31
|
+
StyledGridTextContainer,
|
|
32
|
+
{
|
|
33
|
+
role: "button",
|
|
34
|
+
tabIndex: 0,
|
|
35
|
+
onFocus: showFocusRingAroundAll,
|
|
36
|
+
onBlur: hideFocusRingAroundAll,
|
|
37
|
+
children: [
|
|
38
|
+
/* @__PURE__ */ jsx(StyledCardNavigationIcon, { $type: type, "data-type": type, role: "presentation", children: /* @__PURE__ */ jsx(Icon, { size: "l", color: mainIconColor }) }),
|
|
39
|
+
/* @__PURE__ */ jsx(StyledCardNavigationCentralContent, { cols, children: /* @__PURE__ */ jsx(StyledCardNavigationContent, { children: /* @__PURE__ */ jsxs(StyledCardNavigationContentTitleWrapper, { children: [
|
|
40
|
+
/* @__PURE__ */ jsx(StyledCardNavigationContentTitle, { children: /* @__PURE__ */ jsx(
|
|
41
|
+
StyledTitleTypography,
|
|
42
|
+
{
|
|
43
|
+
innerRef: titleHandleRef,
|
|
44
|
+
truncateWithEllipsis: !wrapText,
|
|
45
|
+
variant: TYPOGRAPHY_VARIANTS.B1,
|
|
46
|
+
children: title
|
|
47
|
+
}
|
|
48
|
+
) }),
|
|
49
|
+
/* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
|
|
50
|
+
StyledDescriptionTypography,
|
|
51
|
+
{
|
|
52
|
+
innerRef: descriptionHandleRef,
|
|
53
|
+
truncateWithEllipsis: !wrapText,
|
|
54
|
+
variant: TYPOGRAPHY_VARIANTS.B1,
|
|
55
|
+
"data-testid": CARD_NAVIGATION_DATA_TESTID.DESCRIPTION_TEXT,
|
|
56
|
+
children: description
|
|
57
|
+
}
|
|
58
|
+
) })
|
|
59
|
+
] }) }) })
|
|
60
|
+
]
|
|
61
|
+
}
|
|
62
|
+
);
|
|
63
|
+
});
|
|
64
|
+
export {
|
|
65
|
+
IconAndTextsRegionContent
|
|
66
|
+
};
|
|
67
|
+
//# sourceMappingURL=IconAndTextsRegionContent.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/parts/text-region/IconAndTextsRegionContent.tsx"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import type { SvgIconT } from '@elliemae/ds-icons';\nimport { TYPOGRAPHY_VARIANTS } from '@elliemae/ds-typography';\nimport React from 'react';\nimport { CARD_NAVIGATION_DATA_TESTID } from '../../constants/index.js';\nimport type { DSCardNavigationT } from '../../react-desc-prop-types.js';\nimport {\n StyledCardNavigationCentralContent,\n StyledCardNavigationContent,\n StyledCardNavigationContentTitle,\n StyledCardNavigationContentTitleWrapper,\n StyledCardNavigationIcon,\n StyledDescriptionTypography,\n StyledGridTextContainer,\n StyledTitleTypography,\n} from '../style.js';\n\nconst mainIconColor = ['neutral', '0'] as SvgIconT.ColorType;\nconst cols = ['1fr'];\n\ninterface IconAndTextsRegionContentProps {\n title: DSCardNavigationT.InternalProps['title'];\n description: DSCardNavigationT.InternalProps['description'];\n wrapText: DSCardNavigationT.InternalProps['wrapText'];\n type: DSCardNavigationT.InternalProps['type'];\n Icon: DSCardNavigationT.InternalProps['Icon'];\n\n titleHandleRef: (node: HTMLElement | null) => void;\n descriptionHandleRef: (node: HTMLElement | null) => void;\n showFocusRingAroundAll: React.FocusEventHandler<HTMLDivElement>;\n hideFocusRingAroundAll: React.FocusEventHandler<HTMLDivElement>;\n}\n\nexport const IconAndTextsRegionContent = React.memo((props: IconAndTextsRegionContentProps) => {\n const {\n title,\n description,\n wrapText,\n titleHandleRef,\n descriptionHandleRef,\n type,\n Icon,\n showFocusRingAroundAll,\n hideFocusRingAroundAll,\n } = props;\n\n return (\n <StyledGridTextContainer\n role=\"button\"\n tabIndex={0}\n onFocus={showFocusRingAroundAll}\n onBlur={hideFocusRingAroundAll}\n >\n <StyledCardNavigationIcon $type={type} data-type={type} role=\"presentation\">\n <Icon size=\"l\" color={mainIconColor} />\n </StyledCardNavigationIcon>\n\n <StyledCardNavigationCentralContent cols={cols}>\n <StyledCardNavigationContent>\n <StyledCardNavigationContentTitleWrapper>\n <StyledCardNavigationContentTitle>\n <StyledTitleTypography\n innerRef={titleHandleRef}\n truncateWithEllipsis={!wrapText}\n variant={TYPOGRAPHY_VARIANTS.B1}\n >\n {title}\n </StyledTitleTypography>\n </StyledCardNavigationContentTitle>\n <div>\n <StyledDescriptionTypography\n innerRef={descriptionHandleRef}\n truncateWithEllipsis={!wrapText}\n variant={TYPOGRAPHY_VARIANTS.B1}\n data-testid={CARD_NAVIGATION_DATA_TESTID.DESCRIPTION_TEXT}\n >\n {description}\n </StyledDescriptionTypography>\n </div>\n </StyledCardNavigationContentTitleWrapper>\n </StyledCardNavigationContent>\n </StyledCardNavigationCentralContent>\n </StyledGridTextContainer>\n );\n});\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACqDf,cAKE,YALF;AApDR,SAAS,2BAA2B;AACpC,OAAOA,YAAW;AAClB,SAAS,mCAAmC;AAE5C;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAEP,MAAM,gBAAgB,CAAC,WAAW,GAAG;AACrC,MAAM,OAAO,CAAC,KAAK;AAeZ,MAAM,4BAA4BA,OAAM,KAAK,CAAC,UAA0C;AAC7F,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,IAAI;AAEJ,SACE;AAAA,IAAC;AAAA;AAAA,MACC,MAAK;AAAA,MACL,UAAU;AAAA,MACV,SAAS;AAAA,MACT,QAAQ;AAAA,MAER;AAAA,4BAAC,4BAAyB,OAAO,MAAM,aAAW,MAAM,MAAK,gBAC3D,8BAAC,QAAK,MAAK,KAAI,OAAO,eAAe,GACvC;AAAA,QAEA,oBAAC,sCAAmC,MAClC,8BAAC,+BACC,+BAAC,2CACC;AAAA,8BAAC,oCACC;AAAA,YAAC;AAAA;AAAA,cACC,UAAU;AAAA,cACV,sBAAsB,CAAC;AAAA,cACvB,SAAS,oBAAoB;AAAA,cAE5B;AAAA;AAAA,UACH,GACF;AAAA,UACA,oBAAC,SACC;AAAA,YAAC;AAAA;AAAA,cACC,UAAU;AAAA,cACV,sBAAsB,CAAC;AAAA,cACvB,SAAS,oBAAoB;AAAA,cAC7B,eAAa,4BAA4B;AAAA,cAExC;AAAA;AAAA,UACH,GACF;AAAA,WACF,GACF,GACF;AAAA;AAAA;AAAA,EACF;AAEJ,CAAC;",
|
|
6
|
+
"names": ["React"]
|
|
7
|
+
}
|
|
@@ -27,9 +27,9 @@ const DSCardNavigationPropTypes = {
|
|
|
27
27
|
Icon: PropTypes.func.description("component that will be used to render the icon").defaultValue('()=><LoanProducts size="l" color={["neutral", 0]} />'),
|
|
28
28
|
actions: PropTypes.arrayOf(
|
|
29
29
|
PropTypes.shape({
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
30
|
+
onClick: PropTypes.func.isRequired,
|
|
31
|
+
icon: PropTypes.element,
|
|
32
|
+
Icon: PropTypes.func
|
|
33
33
|
})
|
|
34
34
|
).description("card navigation actions array").defaultValue("[]"),
|
|
35
35
|
wrapText: PropTypes.bool.description("wrap text in the card navigation").defaultValue(false)
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../src/react-desc-prop-types.ts"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable @typescript-eslint/no-empty-interface */\nimport type React from 'react';\nimport type { GlobalAttributesT, XstyledProps, DSPropTypesSchema, ValidationMap } from '@elliemae/ds-props-helpers';\nimport {\n PropTypes,\n getPropsPerSlotPropTypes,\n globalAttributesPropTypes,\n xstyledPropTypes,\n} from '@elliemae/ds-props-helpers';\nimport { LoanProducts } from '@elliemae/ds-icons';\nimport { type TypescriptHelpersT } from '@elliemae/ds-typescript-helpers';\nimport { type SvgIconT } from '@elliemae/ds-icons';\nimport { DSCardNavigationName, CARD_NAVIGATION_SLOTS, CardNavigationTypesValues } from './constants/index.js';\n\nexport declare namespace DSCardNavigationT {\n export interface Action {\n icon?: React.ReactNode;\n Icon?: React.ComponentType<Record<string, never>>;\n onClick?: (e: React.KeyboardEvent<HTMLButtonElement> | React.MouseEvent<HTMLButtonElement, MouseEvent>) => void;\n }\n\n export type TypeValues = (typeof CardNavigationTypesValues)[number];\n\n export interface RequiredProps {}\n\n export interface DefaultProps {\n containerProps: object;\n title: string;\n description: string;\n type: TypeValues;\n Icon: React.ComponentType<SvgIconT.Props>;\n actions: Array<Action> | ReadonlyArray<Action>;\n wrapText: boolean;\n }\n\n export interface OptionalProps\n extends TypescriptHelpersT.PropsForGlobalOnSlots<typeof DSCardNavigationName, typeof CARD_NAVIGATION_SLOTS> {}\n\n export interface Props\n extends Partial<DefaultProps>,\n OptionalProps,\n Omit<GlobalAttributesT<HTMLElement>, keyof DefaultProps | keyof XstyledProps>,\n XstyledProps,\n RequiredProps {}\n\n export interface InternalProps\n extends DefaultProps,\n OptionalProps,\n Omit<GlobalAttributesT<HTMLElement>, keyof DefaultProps | keyof XstyledProps>,\n XstyledProps,\n RequiredProps {}\n}\n\nexport const defaultProps: DSCardNavigationT.DefaultProps = {\n containerProps: {},\n title: '',\n description: '',\n type: CardNavigationTypesValues[0],\n Icon: LoanProducts,\n actions: [],\n wrapText: false,\n};\n\nexport const DSCardNavigationPropTypes: DSPropTypesSchema<DSCardNavigationT.Props> = {\n ...getPropsPerSlotPropTypes(DSCardNavigationName, CARD_NAVIGATION_SLOTS),\n ...globalAttributesPropTypes,\n ...xstyledPropTypes,\n\n containerProps: PropTypes.object.description('props to inject to card navigation wrapper').defaultValue('{}'),\n title: PropTypes.string.description('card navigation title').defaultValue(''),\n description: PropTypes.string.description('card navigation description').defaultValue(''),\n type: PropTypes.oneOf(CardNavigationTypesValues).description('card navigation type').defaultValue(''),\n\n Icon: PropTypes.func\n .description('component that will be used to render the icon')\n .defaultValue('()=><LoanProducts size=\"l\" color={[\"neutral\", 0]} />'),\n\n actions: PropTypes.arrayOf(\n PropTypes.shape({\n
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;ACGvB;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAS,oBAAoB;AAG7B,SAAS,sBAAsB,uBAAuB,iCAAiC;AAyChF,MAAM,eAA+C;AAAA,EAC1D,gBAAgB,CAAC;AAAA,EACjB,OAAO;AAAA,EACP,aAAa;AAAA,EACb,MAAM,0BAA0B,CAAC;AAAA,EACjC,MAAM;AAAA,EACN,SAAS,CAAC;AAAA,EACV,UAAU;AACZ;AAEO,MAAM,4BAAwE;AAAA,EACnF,GAAG,yBAAyB,sBAAsB,qBAAqB;AAAA,EACvE,GAAG;AAAA,EACH,GAAG;AAAA,EAEH,gBAAgB,UAAU,OAAO,YAAY,4CAA4C,EAAE,aAAa,IAAI;AAAA,EAC5G,OAAO,UAAU,OAAO,YAAY,uBAAuB,EAAE,aAAa,EAAE;AAAA,EAC5E,aAAa,UAAU,OAAO,YAAY,6BAA6B,EAAE,aAAa,EAAE;AAAA,EACxF,MAAM,UAAU,MAAM,yBAAyB,EAAE,YAAY,sBAAsB,EAAE,aAAa,EAAE;AAAA,EAEpG,MAAM,UAAU,KACb,YAAY,gDAAgD,EAC5D,aAAa,sDAAsD;AAAA,EAEtE,SAAS,UAAU;AAAA,IACjB,UAAU,MAAM;AAAA,MACd,
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable @typescript-eslint/no-empty-interface */\nimport type React from 'react';\nimport type { GlobalAttributesT, XstyledProps, DSPropTypesSchema, ValidationMap } from '@elliemae/ds-props-helpers';\nimport {\n PropTypes,\n getPropsPerSlotPropTypes,\n globalAttributesPropTypes,\n xstyledPropTypes,\n} from '@elliemae/ds-props-helpers';\nimport { LoanProducts } from '@elliemae/ds-icons';\nimport { type TypescriptHelpersT } from '@elliemae/ds-typescript-helpers';\nimport { type SvgIconT } from '@elliemae/ds-icons';\nimport { DSCardNavigationName, CARD_NAVIGATION_SLOTS, CardNavigationTypesValues } from './constants/index.js';\n\nexport declare namespace DSCardNavigationT {\n export interface Action {\n icon?: React.ReactNode;\n Icon?: React.ComponentType<Record<string, never>>;\n onClick?: (e: React.KeyboardEvent<HTMLButtonElement> | React.MouseEvent<HTMLButtonElement, MouseEvent>) => void;\n }\n\n export type TypeValues = (typeof CardNavigationTypesValues)[number];\n\n export interface RequiredProps {}\n\n export interface DefaultProps {\n containerProps: object;\n title: string;\n description: string;\n type: TypeValues;\n Icon: React.ComponentType<SvgIconT.Props>;\n actions: Array<Action> | ReadonlyArray<Action>;\n wrapText: boolean;\n }\n\n export interface OptionalProps\n extends TypescriptHelpersT.PropsForGlobalOnSlots<typeof DSCardNavigationName, typeof CARD_NAVIGATION_SLOTS> {}\n\n export interface Props\n extends Partial<DefaultProps>,\n OptionalProps,\n Omit<GlobalAttributesT<HTMLElement>, keyof DefaultProps | keyof XstyledProps>,\n XstyledProps,\n RequiredProps {}\n\n export interface InternalProps\n extends DefaultProps,\n OptionalProps,\n Omit<GlobalAttributesT<HTMLElement>, keyof DefaultProps | keyof XstyledProps>,\n XstyledProps,\n RequiredProps {}\n}\n\nexport const defaultProps: DSCardNavigationT.DefaultProps = {\n containerProps: {},\n title: '',\n description: '',\n type: CardNavigationTypesValues[0],\n Icon: LoanProducts,\n actions: [],\n wrapText: false,\n};\n\nexport const DSCardNavigationPropTypes: DSPropTypesSchema<DSCardNavigationT.Props> = {\n ...getPropsPerSlotPropTypes(DSCardNavigationName, CARD_NAVIGATION_SLOTS),\n ...globalAttributesPropTypes,\n ...xstyledPropTypes,\n\n containerProps: PropTypes.object.description('props to inject to card navigation wrapper').defaultValue('{}'),\n title: PropTypes.string.description('card navigation title').defaultValue(''),\n description: PropTypes.string.description('card navigation description').defaultValue(''),\n type: PropTypes.oneOf(CardNavigationTypesValues).description('card navigation type').defaultValue(''),\n\n Icon: PropTypes.func\n .description('component that will be used to render the icon')\n .defaultValue('()=><LoanProducts size=\"l\" color={[\"neutral\", 0]} />'),\n\n actions: PropTypes.arrayOf(\n PropTypes.shape({\n onClick: PropTypes.func.isRequired,\n icon: PropTypes.element,\n Icon: PropTypes.func,\n }),\n )\n .description('card navigation actions array')\n .defaultValue('[]'),\n\n wrapText: PropTypes.bool.description('wrap text in the card navigation').defaultValue(false),\n};\n\nexport const DSCardNavigationPropTypesSchema =\n DSCardNavigationPropTypes as unknown as ValidationMap<DSCardNavigationT.Props>;\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACGvB;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAS,oBAAoB;AAG7B,SAAS,sBAAsB,uBAAuB,iCAAiC;AAyChF,MAAM,eAA+C;AAAA,EAC1D,gBAAgB,CAAC;AAAA,EACjB,OAAO;AAAA,EACP,aAAa;AAAA,EACb,MAAM,0BAA0B,CAAC;AAAA,EACjC,MAAM;AAAA,EACN,SAAS,CAAC;AAAA,EACV,UAAU;AACZ;AAEO,MAAM,4BAAwE;AAAA,EACnF,GAAG,yBAAyB,sBAAsB,qBAAqB;AAAA,EACvE,GAAG;AAAA,EACH,GAAG;AAAA,EAEH,gBAAgB,UAAU,OAAO,YAAY,4CAA4C,EAAE,aAAa,IAAI;AAAA,EAC5G,OAAO,UAAU,OAAO,YAAY,uBAAuB,EAAE,aAAa,EAAE;AAAA,EAC5E,aAAa,UAAU,OAAO,YAAY,6BAA6B,EAAE,aAAa,EAAE;AAAA,EACxF,MAAM,UAAU,MAAM,yBAAyB,EAAE,YAAY,sBAAsB,EAAE,aAAa,EAAE;AAAA,EAEpG,MAAM,UAAU,KACb,YAAY,gDAAgD,EAC5D,aAAa,sDAAsD;AAAA,EAEtE,SAAS,UAAU;AAAA,IACjB,UAAU,MAAM;AAAA,MACd,SAAS,UAAU,KAAK;AAAA,MACxB,MAAM,UAAU;AAAA,MAChB,MAAM,UAAU;AAAA,IAClB,CAAC;AAAA,EACH,EACG,YAAY,+BAA+B,EAC3C,aAAa,IAAI;AAAA,EAEpB,UAAU,UAAU,KAAK,YAAY,kCAAkC,EAAE,aAAa,KAAK;AAC7F;AAEO,MAAM,kCACX;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { type DSCardNavigationT } from './react-desc-prop-types.js';
|
|
3
|
-
declare const DSCardNavigation: React.
|
|
3
|
+
declare const DSCardNavigation: React.ComponentType<DSCardNavigationT.Props>;
|
|
4
4
|
declare const DSCardNavigationWithSchema: import("@elliemae/ds-props-helpers/dist/types/propTypes/types.js").DocumentedReactComponent<DSCardNavigationT.Props>;
|
|
5
5
|
export { DSCardNavigation, DSCardNavigationWithSchema };
|
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { useGetXstyledProps, useGetGlobalAttributes } from '@elliemae/ds-props-helpers';
|
|
2
3
|
import { type DSCardNavigationT } from '../react-desc-prop-types.js';
|
|
3
4
|
export interface CardNavigationCTX {
|
|
4
5
|
propsWithDefault: DSCardNavigationT.InternalProps;
|
|
5
6
|
xstyledProps: ReturnType<typeof useGetXstyledProps>;
|
|
7
|
+
globalProps: ReturnType<typeof useGetGlobalAttributes>;
|
|
6
8
|
instanceUid: string;
|
|
9
|
+
iconAndTextsRegionIsFocused: boolean;
|
|
10
|
+
showFocusRingAroundAll: React.FocusEventHandler<HTMLDivElement>;
|
|
11
|
+
hideFocusRingAroundAll: React.FocusEventHandler<HTMLDivElement>;
|
|
7
12
|
}
|
|
8
|
-
export declare const useCardNavigation: (propsFromUser: DSCardNavigationT.Props) =>
|
|
9
|
-
propsWithDefault: DSCardNavigationT.InternalProps;
|
|
10
|
-
xstyledProps: import("@elliemae/ds-props-helpers").XstyledProps;
|
|
11
|
-
instanceUid: string;
|
|
12
|
-
};
|
|
13
|
+
export declare const useCardNavigation: (propsFromUser: DSCardNavigationT.Props) => CardNavigationCTX;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { DSCardNavigationT } from '../react-desc-prop-types.js';
|
|
3
|
+
interface ActionRegionProps {
|
|
4
|
+
actions: DSCardNavigationT.InternalProps['actions'];
|
|
5
|
+
instanceUid: string;
|
|
6
|
+
}
|
|
7
|
+
export declare const ActionsRegion: React.ComponentType<ActionRegionProps>;
|
|
8
|
+
export {};
|
|
@@ -1,21 +1,26 @@
|
|
|
1
|
-
import { CardNavigationTypes } from '
|
|
1
|
+
import { CardNavigationTypes } from '../constants/index.js';
|
|
2
2
|
export declare const StyledCardNavigationContentTitle: import("styled-components").StyledComponent<"div", import("@elliemae/ds-system").Theme, object & import("@elliemae/ds-system").OwnerInterface & import("@elliemae/ds-system").InnerRefInterface<"div">, never>;
|
|
3
3
|
export declare const StyledTitleTypography: import("styled-components").StyledComponent<import("react").FC<import("@elliemae/ds-typography").DSTypographyT.Props>, import("@elliemae/ds-system").Theme, object & import("@elliemae/ds-system").OwnerInterface & import("@elliemae/ds-system").InnerRefInterface<import("react").FC<import("@elliemae/ds-typography").DSTypographyT.Props>>, never>;
|
|
4
|
-
export declare const StyledCardNavigationContentDescription: import("styled-components").StyledComponent<"div", import("@elliemae/ds-system").Theme, object & import("@elliemae/ds-system").OwnerInterface & import("@elliemae/ds-system").InnerRefInterface<"div">, never>;
|
|
5
4
|
export declare const StyledDescriptionTypography: import("styled-components").StyledComponent<import("react").FC<import("@elliemae/ds-typography").DSTypographyT.Props>, import("@elliemae/ds-system").Theme, object & import("@elliemae/ds-system").OwnerInterface & import("@elliemae/ds-system").InnerRefInterface<import("react").FC<import("@elliemae/ds-typography").DSTypographyT.Props>>, never>;
|
|
6
5
|
export declare const StyledCardNavigationContentTitleWrapper: import("styled-components").StyledComponent<"div", import("@elliemae/ds-system").Theme, object & import("@elliemae/ds-system").OwnerInterface & import("@elliemae/ds-system").InnerRefInterface<"div">, never>;
|
|
7
6
|
export declare const StyledCardNavigationContent: import("styled-components").StyledComponent<"div", import("@elliemae/ds-system").Theme, {
|
|
8
7
|
wrapText?: boolean;
|
|
9
8
|
} & import("@elliemae/ds-system").OwnerInterface & import("@elliemae/ds-system").InnerRefInterface<"div">, never>;
|
|
10
|
-
export declare const StyledCardNavigationCentralContent: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("@elliemae/ds-grid").DSGridT.Props & import("react").RefAttributes<HTMLDivElement>>, import("@elliemae/ds-system").Theme,
|
|
9
|
+
export declare const StyledCardNavigationCentralContent: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("@elliemae/ds-grid").DSGridT.Props & import("react").RefAttributes<HTMLDivElement>>, import("@elliemae/ds-system").Theme, {
|
|
10
|
+
wrapText?: boolean;
|
|
11
|
+
AnyOverFlow?: boolean;
|
|
12
|
+
} & import("@elliemae/ds-system").OwnerInterface & import("@elliemae/ds-system").InnerRefInterface<import("react").ForwardRefExoticComponent<import("@elliemae/ds-grid").DSGridT.Props & import("react").RefAttributes<HTMLDivElement>>>, never>;
|
|
11
13
|
interface StyledCardNavigationBoxWrapperProps {
|
|
12
14
|
fluid?: boolean;
|
|
13
15
|
}
|
|
14
|
-
export declare const StyledCardNavigationBoxWrapper: import("styled-components").StyledComponent<"div", import("@elliemae/ds-system").Theme, StyledCardNavigationBoxWrapperProps &
|
|
16
|
+
export declare const StyledCardNavigationBoxWrapper: import("styled-components").StyledComponent<"div", import("@elliemae/ds-system").Theme, StyledCardNavigationBoxWrapperProps & {
|
|
17
|
+
$isIconAndTextsRegionFocused?: boolean;
|
|
18
|
+
} & import("@elliemae/ds-system").OwnerInterface & import("@elliemae/ds-system").InnerRefInterface<"div">, never>;
|
|
15
19
|
interface StyledCardNavigationIconProps {
|
|
16
20
|
$type: (typeof CardNavigationTypes)[keyof typeof CardNavigationTypes];
|
|
17
21
|
}
|
|
18
22
|
export declare const StyledCardNavigationIcon: import("styled-components").StyledComponent<"div", import("@elliemae/ds-system").Theme, StyledCardNavigationIconProps & import("@elliemae/ds-system").OwnerInterface & import("@elliemae/ds-system").InnerRefInterface<"div">, never>;
|
|
19
23
|
export declare const StyledCardNavigationActions: import("styled-components").StyledComponent<"div", import("@elliemae/ds-system").Theme, object & import("@elliemae/ds-system").OwnerInterface & import("@elliemae/ds-system").InnerRefInterface<"div">, never>;
|
|
20
24
|
export declare const StyledCardNavigationAction: import("styled-components").StyledComponent<"div", import("@elliemae/ds-system").Theme, object & import("@elliemae/ds-system").OwnerInterface & import("@elliemae/ds-system").InnerRefInterface<"div">, never>;
|
|
25
|
+
export declare const StyledGridTextContainer: import("styled-components").StyledComponent<"div", import("@elliemae/ds-system").Theme, object & import("@elliemae/ds-system").OwnerInterface & import("@elliemae/ds-system").InnerRefInterface<"div">, never>;
|
|
21
26
|
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { DSCardNavigationT } from '../../react-desc-prop-types.js';
|
|
3
|
+
interface IconAndTextsRegionProps {
|
|
4
|
+
title: DSCardNavigationT.InternalProps['title'];
|
|
5
|
+
description: DSCardNavigationT.InternalProps['description'];
|
|
6
|
+
wrapText: DSCardNavigationT.InternalProps['wrapText'];
|
|
7
|
+
type: DSCardNavigationT.InternalProps['type'];
|
|
8
|
+
Icon: DSCardNavigationT.InternalProps['Icon'];
|
|
9
|
+
showFocusRingAroundAll: React.FocusEventHandler<HTMLDivElement>;
|
|
10
|
+
hideFocusRingAroundAll: React.FocusEventHandler<HTMLDivElement>;
|
|
11
|
+
}
|
|
12
|
+
export declare const IconAndTextsRegion: React.ComponentType<IconAndTextsRegionProps>;
|
|
13
|
+
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { DSCardNavigationT } from '../../react-desc-prop-types.js';
|
|
3
|
+
interface IconAndTextsRegionContentProps {
|
|
4
|
+
title: DSCardNavigationT.InternalProps['title'];
|
|
5
|
+
description: DSCardNavigationT.InternalProps['description'];
|
|
6
|
+
wrapText: DSCardNavigationT.InternalProps['wrapText'];
|
|
7
|
+
type: DSCardNavigationT.InternalProps['type'];
|
|
8
|
+
Icon: DSCardNavigationT.InternalProps['Icon'];
|
|
9
|
+
titleHandleRef: (node: HTMLElement | null) => void;
|
|
10
|
+
descriptionHandleRef: (node: HTMLElement | null) => void;
|
|
11
|
+
showFocusRingAroundAll: React.FocusEventHandler<HTMLDivElement>;
|
|
12
|
+
hideFocusRingAroundAll: React.FocusEventHandler<HTMLDivElement>;
|
|
13
|
+
}
|
|
14
|
+
export declare const IconAndTextsRegionContent: React.MemoExoticComponent<(props: IconAndTextsRegionContentProps) => import("react/jsx-runtime.js").JSX.Element>;
|
|
15
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const DSCardNavigationTooltipTestRenderer: import("react").FunctionComponent<import("react").JSX.IntrinsicAttributes>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elliemae/ds-card-navigation",
|
|
3
|
-
"version": "3.55.0-next.
|
|
3
|
+
"version": "3.55.0-next.9",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "ICE MT - Dimsum - Card Navigation",
|
|
6
6
|
"files": [
|
|
@@ -37,22 +37,22 @@
|
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
39
|
"@xstyled/styled-components": "~3.7.3",
|
|
40
|
-
"@elliemae/ds-grid": "3.55.0-next.
|
|
41
|
-
"@elliemae/ds-hooks-on-blur-out": "3.55.0-next.
|
|
42
|
-
"@elliemae/ds-
|
|
43
|
-
"@elliemae/ds-
|
|
44
|
-
"@elliemae/ds-
|
|
45
|
-
"@elliemae/ds-
|
|
40
|
+
"@elliemae/ds-grid": "3.55.0-next.9",
|
|
41
|
+
"@elliemae/ds-hooks-on-blur-out": "3.55.0-next.9",
|
|
42
|
+
"@elliemae/ds-hooks-on-overflow-change": "3.55.0-next.9",
|
|
43
|
+
"@elliemae/ds-props-helpers": "3.55.0-next.9",
|
|
44
|
+
"@elliemae/ds-system": "3.55.0-next.9",
|
|
45
|
+
"@elliemae/ds-icons": "3.55.0-next.9"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
48
|
"@elliemae/pui-cli": "9.0.0-next.65",
|
|
49
49
|
"@playwright/experimental-ct-react": "^1.51.1",
|
|
50
50
|
"jest": "~29.7.0",
|
|
51
51
|
"styled-components": "~5.3.9",
|
|
52
|
-
"@elliemae/ds-
|
|
53
|
-
"@elliemae/ds-icons": "3.55.0-next.
|
|
54
|
-
"@elliemae/ds-
|
|
55
|
-
"@elliemae/ds-
|
|
52
|
+
"@elliemae/ds-typescript-helpers": "3.55.0-next.9",
|
|
53
|
+
"@elliemae/ds-icons": "3.55.0-next.9",
|
|
54
|
+
"@elliemae/ds-test-utils": "3.55.0-next.9",
|
|
55
|
+
"@elliemae/ds-monorepo-devops": "3.55.0-next.9"
|
|
56
56
|
},
|
|
57
57
|
"peerDependencies": {
|
|
58
58
|
"@testing-library/jest-dom": "^6.6.3",
|
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __create = Object.create;
|
|
3
|
-
var __defProp = Object.defineProperty;
|
|
4
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
-
var __export = (target, all) => {
|
|
9
|
-
for (var name in all)
|
|
10
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
-
};
|
|
12
|
-
var __copyProps = (to, from, except, desc) => {
|
|
13
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
-
for (let key of __getOwnPropNames(from))
|
|
15
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
-
}
|
|
18
|
-
return to;
|
|
19
|
-
};
|
|
20
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
-
mod
|
|
27
|
-
));
|
|
28
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
-
var DescriptionComponent_exports = {};
|
|
30
|
-
__export(DescriptionComponent_exports, {
|
|
31
|
-
DescriptionComponent: () => DescriptionComponent
|
|
32
|
-
});
|
|
33
|
-
module.exports = __toCommonJS(DescriptionComponent_exports);
|
|
34
|
-
var React = __toESM(require("react"));
|
|
35
|
-
var import_jsx_runtime = require("react/jsx-runtime");
|
|
36
|
-
var import_ds_hooks_on_overflow_change = require("@elliemae/ds-hooks-on-overflow-change");
|
|
37
|
-
var import_ds_tooltip_v3 = require("@elliemae/ds-tooltip-v3");
|
|
38
|
-
var import_ds_typography = require("@elliemae/ds-typography");
|
|
39
|
-
var import_react = require("react");
|
|
40
|
-
var import_constants = require("./constants/index.js");
|
|
41
|
-
var import_style = require("./style.js");
|
|
42
|
-
const DescriptionComponent = (props) => {
|
|
43
|
-
const { description, wrapText } = props;
|
|
44
|
-
const [isDescriptionTruncating, setIsDescriptionTruncating] = (0, import_react.useState)(false);
|
|
45
|
-
const { handleRef: descriptionHandleRef } = (0, import_ds_hooks_on_overflow_change.useOnOverflowChange)({
|
|
46
|
-
onOverflowStateChange: setIsDescriptionTruncating
|
|
47
|
-
});
|
|
48
|
-
if (wrapText)
|
|
49
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_style.StyledCardNavigationContentDescription, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
50
|
-
import_style.StyledDescriptionTypography,
|
|
51
|
-
{
|
|
52
|
-
innerRef: descriptionHandleRef,
|
|
53
|
-
truncateWithEllipsis: true,
|
|
54
|
-
variant: import_ds_typography.TYPOGRAPHY_VARIANTS.B1,
|
|
55
|
-
"data-testid": import_constants.CARD_NAVIGATION_DATA_TESTID.DESCRIPTION_TEXT,
|
|
56
|
-
children: description
|
|
57
|
-
}
|
|
58
|
-
) });
|
|
59
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_style.StyledCardNavigationContentDescription, { children: isDescriptionTruncating ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_tooltip_v3.DSTooltipV3, { text: description, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
60
|
-
import_style.StyledDescriptionTypography,
|
|
61
|
-
{
|
|
62
|
-
innerRef: descriptionHandleRef,
|
|
63
|
-
truncateWithEllipsis: true,
|
|
64
|
-
variant: import_ds_typography.TYPOGRAPHY_VARIANTS.B1,
|
|
65
|
-
"data-testid": import_constants.CARD_NAVIGATION_DATA_TESTID.DESCRIPTION_TEXT,
|
|
66
|
-
children: description
|
|
67
|
-
}
|
|
68
|
-
) }) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
69
|
-
import_style.StyledDescriptionTypography,
|
|
70
|
-
{
|
|
71
|
-
innerRef: descriptionHandleRef,
|
|
72
|
-
truncateWithEllipsis: true,
|
|
73
|
-
variant: import_ds_typography.TYPOGRAPHY_VARIANTS.B1,
|
|
74
|
-
"data-testid": import_constants.CARD_NAVIGATION_DATA_TESTID.DESCRIPTION_TEXT,
|
|
75
|
-
children: description
|
|
76
|
-
}
|
|
77
|
-
) });
|
|
78
|
-
};
|
|
79
|
-
//# sourceMappingURL=DescriptionComponent.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/DescriptionComponent.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["import { useOnOverflowChange } from '@elliemae/ds-hooks-on-overflow-change';\nimport { DSTooltipV3 } from '@elliemae/ds-tooltip-v3';\nimport { TYPOGRAPHY_VARIANTS } from '@elliemae/ds-typography';\nimport { useState } from 'react';\nimport { CARD_NAVIGATION_DATA_TESTID } from './constants/index.js';\nimport { StyledCardNavigationContentDescription, StyledDescriptionTypography } from './style.js';\n\nexport const DescriptionComponent = (props: { description: string; wrapText?: boolean }) => {\n const { description, wrapText } = props;\n\n const [isDescriptionTruncating, setIsDescriptionTruncating] = useState(false);\n\n const { handleRef: descriptionHandleRef } = useOnOverflowChange({\n onOverflowStateChange: setIsDescriptionTruncating,\n });\n\n if (wrapText)\n return (\n <StyledCardNavigationContentDescription>\n <StyledDescriptionTypography\n innerRef={descriptionHandleRef}\n truncateWithEllipsis\n variant={TYPOGRAPHY_VARIANTS.B1}\n data-testid={CARD_NAVIGATION_DATA_TESTID.DESCRIPTION_TEXT}\n >\n {description}\n </StyledDescriptionTypography>\n </StyledCardNavigationContentDescription>\n );\n\n return (\n <StyledCardNavigationContentDescription>\n {isDescriptionTruncating ? (\n <DSTooltipV3 text={description}>\n <StyledDescriptionTypography\n innerRef={descriptionHandleRef}\n truncateWithEllipsis\n variant={TYPOGRAPHY_VARIANTS.B1}\n data-testid={CARD_NAVIGATION_DATA_TESTID.DESCRIPTION_TEXT}\n >\n {description}\n </StyledDescriptionTypography>\n </DSTooltipV3>\n ) : (\n <StyledDescriptionTypography\n innerRef={descriptionHandleRef}\n truncateWithEllipsis\n variant={TYPOGRAPHY_VARIANTS.B1}\n data-testid={CARD_NAVIGATION_DATA_TESTID.DESCRIPTION_TEXT}\n >\n {description}\n </StyledDescriptionTypography>\n )}\n </StyledCardNavigationContentDescription>\n );\n};\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADmBf;AAnBR,yCAAoC;AACpC,2BAA4B;AAC5B,2BAAoC;AACpC,mBAAyB;AACzB,uBAA4C;AAC5C,mBAAoF;AAE7E,MAAM,uBAAuB,CAAC,UAAuD;AAC1F,QAAM,EAAE,aAAa,SAAS,IAAI;AAElC,QAAM,CAAC,yBAAyB,0BAA0B,QAAI,uBAAS,KAAK;AAE5E,QAAM,EAAE,WAAW,qBAAqB,QAAI,wDAAoB;AAAA,IAC9D,uBAAuB;AAAA,EACzB,CAAC;AAED,MAAI;AACF,WACE,4CAAC,uDACC;AAAA,MAAC;AAAA;AAAA,QACC,UAAU;AAAA,QACV,sBAAoB;AAAA,QACpB,SAAS,yCAAoB;AAAA,QAC7B,eAAa,6CAA4B;AAAA,QAExC;AAAA;AAAA,IACH,GACF;AAGJ,SACE,4CAAC,uDACE,oCACC,4CAAC,oCAAY,MAAM,aACjB;AAAA,IAAC;AAAA;AAAA,MACC,UAAU;AAAA,MACV,sBAAoB;AAAA,MACpB,SAAS,yCAAoB;AAAA,MAC7B,eAAa,6CAA4B;AAAA,MAExC;AAAA;AAAA,EACH,GACF,IAEA;AAAA,IAAC;AAAA;AAAA,MACC,UAAU;AAAA,MACV,sBAAoB;AAAA,MACpB,SAAS,yCAAoB;AAAA,MAC7B,eAAa,6CAA4B;AAAA,MAExC;AAAA;AAAA,EACH,GAEJ;AAEJ;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __create = Object.create;
|
|
3
|
-
var __defProp = Object.defineProperty;
|
|
4
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
-
var __export = (target, all) => {
|
|
9
|
-
for (var name in all)
|
|
10
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
-
};
|
|
12
|
-
var __copyProps = (to, from, except, desc) => {
|
|
13
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
-
for (let key of __getOwnPropNames(from))
|
|
15
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
-
}
|
|
18
|
-
return to;
|
|
19
|
-
};
|
|
20
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
-
mod
|
|
27
|
-
));
|
|
28
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
-
var TitleComponent_exports = {};
|
|
30
|
-
__export(TitleComponent_exports, {
|
|
31
|
-
TitleComponent: () => TitleComponent
|
|
32
|
-
});
|
|
33
|
-
module.exports = __toCommonJS(TitleComponent_exports);
|
|
34
|
-
var React = __toESM(require("react"));
|
|
35
|
-
var import_jsx_runtime = require("react/jsx-runtime");
|
|
36
|
-
var import_ds_hooks_on_overflow_change = require("@elliemae/ds-hooks-on-overflow-change");
|
|
37
|
-
var import_ds_tooltip_v3 = require("@elliemae/ds-tooltip-v3");
|
|
38
|
-
var import_ds_typography = require("@elliemae/ds-typography");
|
|
39
|
-
var import_react = require("react");
|
|
40
|
-
var import_style = require("./style.js");
|
|
41
|
-
const TitleComponent = (props) => {
|
|
42
|
-
const { title, wrapText } = props;
|
|
43
|
-
const [isTitleTruncating, setIsTitleTruncating] = (0, import_react.useState)(false);
|
|
44
|
-
const { handleRef: titleHandleRef } = (0, import_ds_hooks_on_overflow_change.useOnOverflowChange)({
|
|
45
|
-
onOverflowStateChange: setIsTitleTruncating
|
|
46
|
-
});
|
|
47
|
-
if (wrapText)
|
|
48
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_style.StyledCardNavigationContentTitle, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_style.StyledTitleTypography, { innerRef: titleHandleRef, truncateWithEllipsis: true, variant: import_ds_typography.TYPOGRAPHY_VARIANTS.B1, children: title }) });
|
|
49
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_style.StyledCardNavigationContentTitle, { children: isTitleTruncating ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_tooltip_v3.DSTooltipV3, { text: title, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_style.StyledTitleTypography, { innerRef: titleHandleRef, truncateWithEllipsis: true, variant: import_ds_typography.TYPOGRAPHY_VARIANTS.B1, children: title }) }) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_style.StyledTitleTypography, { innerRef: titleHandleRef, truncateWithEllipsis: true, variant: import_ds_typography.TYPOGRAPHY_VARIANTS.B1, children: title }) });
|
|
50
|
-
};
|
|
51
|
-
//# sourceMappingURL=TitleComponent.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/TitleComponent.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["import { useOnOverflowChange } from '@elliemae/ds-hooks-on-overflow-change';\nimport { DSTooltipV3 } from '@elliemae/ds-tooltip-v3';\nimport { TYPOGRAPHY_VARIANTS } from '@elliemae/ds-typography';\nimport { useState } from 'react';\nimport { StyledCardNavigationContentTitle, StyledTitleTypography } from './style.js';\n\nexport const TitleComponent = (props: { title: string; wrapText?: boolean }) => {\n const { title, wrapText } = props;\n\n const [isTitleTruncating, setIsTitleTruncating] = useState(false);\n\n const { handleRef: titleHandleRef } = useOnOverflowChange({\n onOverflowStateChange: setIsTitleTruncating,\n });\n\n if (wrapText)\n return (\n <StyledCardNavigationContentTitle>\n <StyledTitleTypography innerRef={titleHandleRef} truncateWithEllipsis variant={TYPOGRAPHY_VARIANTS.B1}>\n {title}\n </StyledTitleTypography>\n </StyledCardNavigationContentTitle>\n );\n\n return (\n <StyledCardNavigationContentTitle>\n {isTitleTruncating ? (\n <DSTooltipV3 text={title}>\n <StyledTitleTypography innerRef={titleHandleRef} truncateWithEllipsis variant={TYPOGRAPHY_VARIANTS.B1}>\n {title}\n </StyledTitleTypography>\n </DSTooltipV3>\n ) : (\n <StyledTitleTypography innerRef={titleHandleRef} truncateWithEllipsis variant={TYPOGRAPHY_VARIANTS.B1}>\n {title}\n </StyledTitleTypography>\n )}\n </StyledCardNavigationContentTitle>\n );\n};\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADkBf;AAlBR,yCAAoC;AACpC,2BAA4B;AAC5B,2BAAoC;AACpC,mBAAyB;AACzB,mBAAwE;AAEjE,MAAM,iBAAiB,CAAC,UAAiD;AAC9E,QAAM,EAAE,OAAO,SAAS,IAAI;AAE5B,QAAM,CAAC,mBAAmB,oBAAoB,QAAI,uBAAS,KAAK;AAEhE,QAAM,EAAE,WAAW,eAAe,QAAI,wDAAoB;AAAA,IACxD,uBAAuB;AAAA,EACzB,CAAC;AAED,MAAI;AACF,WACE,4CAAC,iDACC,sDAAC,sCAAsB,UAAU,gBAAgB,sBAAoB,MAAC,SAAS,yCAAoB,IAChG,iBACH,GACF;AAGJ,SACE,4CAAC,iDACE,8BACC,4CAAC,oCAAY,MAAM,OACjB,sDAAC,sCAAsB,UAAU,gBAAgB,sBAAoB,MAAC,SAAS,yCAAoB,IAChG,iBACH,GACF,IAEA,4CAAC,sCAAsB,UAAU,gBAAgB,sBAAoB,MAAC,SAAS,yCAAoB,IAChG,iBACH,GAEJ;AAEJ;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
package/dist/cjs/style.js.map
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/style.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["import { DSTypography } from '@elliemae/ds-typography';\nimport { styled } from '@elliemae/ds-system';\nimport { Grid } from '@elliemae/ds-grid';\nimport { DSCardNavigationName, CARD_NAVIGATION_SLOTS, CardNavigationTypes } from './constants/index.js';\n\nexport const StyledCardNavigationContentTitle = styled('div', {\n name: DSCardNavigationName,\n slot: CARD_NAVIGATION_SLOTS.TITLE,\n})`\n padding-top: ${(props) => props.theme.space.xxs};\n`;\n\nexport const StyledTitleTypography = styled(DSTypography)`\n color: ${(props) => props.theme.colors.neutral['700']};\n font-weight: ${(props) => props.theme.fontWeights.semibold};\n font-size: 18px;\n`;\n\nexport const StyledCardNavigationContentDescription = styled.div``;\n\nexport const StyledDescriptionTypography = styled(DSTypography)`\n color: ${(props) => props.theme.colors.neutral['500']};\n font-size: 12px;\n`;\n\nexport const StyledCardNavigationContentTitleWrapper = styled.div`\n width: 100%;\n`;\n\nexport const StyledCardNavigationContent = styled.div<{ wrapText?: boolean }>`\n padding-right: ${(props) => props.theme.space.xs};\n padding-left: ${(props) => props.theme.space.xs};\n display: flex;\n align-items: center;\n flex: 1;\n width: 100%;\n`;\n\nexport const StyledCardNavigationCentralContent = styled(Grid, {\n slot: CARD_NAVIGATION_SLOTS.CENTRAL_CONTENT,\n name: DSCardNavigationName,\n})`\n min-width: 273px;\n @media (max-width: ${(props) => props.theme.breakpoints.small}) {\n min-width: 336px;\n }\n`;\ninterface StyledCardNavigationBoxWrapperProps {\n fluid?: boolean;\n}\n\nexport const StyledCardNavigationBoxWrapper = styled('div', {\n name: DSCardNavigationName,\n slot: CARD_NAVIGATION_SLOTS.ROOT,\n})<StyledCardNavigationBoxWrapperProps>`\n width: 337px;\n display: flex;\n flex-direction: row;\n flex-wrap: nowrap;\n box-shadow: 0 1px 4px 0px rgba(37, 41, 47, 0.5);\n border-radius: 2px;\n position: relative;\n outline: none;\n ${(props) => (props.fluid ? 'width: 100%' : '')};\n @media (max-width: ${(props) => props.theme.breakpoints.small}) {\n width: ${(props) => (props.fluid ? 'width: 100%' : '414px')};\n }\n :after {\n display: block;\n content: '';\n position: absolute;\n height: 100%;\n width: 100%;\n top: 0;\n left: 0;\n border: solid ${(props) => props.theme.space.xxs} transparent;\n border-radius: 2px;\n pointer-events: none;\n }\n &:hover,\n &:focus {\n box-shadow: 0 3px 8px 0px rgba(37, 41, 47, 0.4);\n }\n`;\ninterface StyledCardNavigationIconProps {\n $type: (typeof CardNavigationTypes)[keyof typeof CardNavigationTypes];\n}\n\nexport const StyledCardNavigationIcon = styled('div', {\n name: DSCardNavigationName,\n slot: CARD_NAVIGATION_SLOTS.TYPE,\n})<StyledCardNavigationIconProps>`\n width: 64px;\n height: 64px;\n background-color: #32aad1;\n border-top-left-radius: 2px;\n border-bottom-left-radius: 2px;\n padding: ${(props) => props.theme.space.xxs};\n display: flex;\n align-items: center;\n justify-content: center;\n fill: #ffffff;\n background-color: ${({ $type }) =>\n ($type === CardNavigationTypes.BORROWER && '#32aad1') ||\n ($type === CardNavigationTypes.FINANCIAL && '#1ba88d') ||\n ($type === CardNavigationTypes.LOAN && '#8e49b2') ||\n ($type === CardNavigationTypes.REGULATORY && '#db5575') ||\n '#32aad1'}; // Default color\n`;\n\nexport const StyledCardNavigationActions = styled('div', {\n name: DSCardNavigationName,\n slot: CARD_NAVIGATION_SLOTS.ACTIONS,\n})`\n display: flex;\n flex-direction: row;\n align-items: center;\n padding-right: ${(props) => props.theme.space.xxs};\n`;\n\nexport const StyledCardNavigationAction = styled.div`\n margin-left: ${(props) => props.theme.space.xxs};\n span {\n height: ${(props) => props.theme.space.s};\n width: ${(props) => props.theme.space.s};\n svg {\n fill: ${(props) => props.theme.colors.neutral[500]};\n height: ${(props) => props.theme.space.s};\n width: ${(props) => props.theme.space.s};\n }\n }\n`;\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,2BAA6B;AAC7B,uBAAuB;AACvB,qBAAqB;AACrB,uBAAiF;AAE1E,MAAM,uCAAmC,yBAAO,OAAO;AAAA,EAC5D,MAAM;AAAA,EACN,MAAM,uCAAsB;AAC9B,CAAC;AAAA,iBACgB,CAAC,UAAU,MAAM,MAAM,MAAM,GAAG;AAAA;AAG1C,MAAM,4BAAwB,yBAAO,iCAAY;AAAA,WAC7C,CAAC,UAAU,MAAM,MAAM,OAAO,QAAQ,KAAK,CAAC;AAAA,iBACtC,CAAC,UAAU,MAAM,MAAM,YAAY,QAAQ;AAAA;AAAA;AAIrD,MAAM,yCAAyC,wBAAO;AAEtD,MAAM,kCAA8B,yBAAO,iCAAY;AAAA,WACnD,CAAC,UAAU,MAAM,MAAM,OAAO,QAAQ,KAAK,CAAC;AAAA;AAAA;AAIhD,MAAM,0CAA0C,wBAAO;AAAA;AAAA;AAIvD,MAAM,8BAA8B,wBAAO;AAAA,mBAC/B,CAAC,UAAU,MAAM,MAAM,MAAM,EAAE;AAAA,kBAChC,CAAC,UAAU,MAAM,MAAM,MAAM,EAAE;AAAA;AAAA;AAAA;AAAA;AAAA;AAO1C,MAAM,yCAAqC,yBAAO,qBAAM;AAAA,EAC7D,MAAM,uCAAsB;AAAA,EAC5B,MAAM;AACR,CAAC;AAAA;AAAA,uBAEsB,CAAC,UAAU,MAAM,MAAM,YAAY,KAAK;AAAA;AAAA;AAAA;AAQxD,MAAM,qCAAiC,yBAAO,OAAO;AAAA,EAC1D,MAAM;AAAA,EACN,MAAM,uCAAsB;AAC9B,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IASG,CAAC,UAAW,MAAM,QAAQ,gBAAgB,EAAG;AAAA,uBAC1B,CAAC,UAAU,MAAM,MAAM,YAAY,KAAK;AAAA,aAClD,CAAC,UAAW,MAAM,QAAQ,gBAAgB,OAAQ;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,oBAU3C,CAAC,UAAU,MAAM,MAAM,MAAM,GAAG;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAa7C,MAAM,+BAA2B,yBAAO,OAAO;AAAA,EACpD,MAAM;AAAA,EACN,MAAM,uCAAsB;AAC9B,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,aAMY,CAAC,UAAU,MAAM,MAAM,MAAM,GAAG;AAAA;AAAA;AAAA;AAAA;AAAA,sBAKvB,CAAC,EAAE,MAAM,MAC1B,UAAU,qCAAoB,YAAY,aAC1C,UAAU,qCAAoB,aAAa,aAC3C,UAAU,qCAAoB,QAAQ,aACtC,UAAU,qCAAoB,cAAc,aAC7C,SAAS;AAAA;AAGN,MAAM,kCAA8B,yBAAO,OAAO;AAAA,EACvD,MAAM;AAAA,EACN,MAAM,uCAAsB;AAC9B,CAAC;AAAA;AAAA;AAAA;AAAA,mBAIkB,CAAC,UAAU,MAAM,MAAM,MAAM,GAAG;AAAA;AAG5C,MAAM,6BAA6B,wBAAO;AAAA,iBAChC,CAAC,UAAU,MAAM,MAAM,MAAM,GAAG;AAAA;AAAA,cAEnC,CAAC,UAAU,MAAM,MAAM,MAAM,CAAC;AAAA,aAC/B,CAAC,UAAU,MAAM,MAAM,MAAM,CAAC;AAAA;AAAA,cAE7B,CAAC,UAAU,MAAM,MAAM,OAAO,QAAQ,GAAG,CAAC;AAAA,gBACxC,CAAC,UAAU,MAAM,MAAM,MAAM,CAAC;AAAA,eAC/B,CAAC,UAAU,MAAM,MAAM,MAAM,CAAC;AAAA;AAAA;AAAA;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import { jsx } from "react/jsx-runtime";
|
|
3
|
-
import { useOnOverflowChange } from "@elliemae/ds-hooks-on-overflow-change";
|
|
4
|
-
import { DSTooltipV3 } from "@elliemae/ds-tooltip-v3";
|
|
5
|
-
import { TYPOGRAPHY_VARIANTS } from "@elliemae/ds-typography";
|
|
6
|
-
import { useState } from "react";
|
|
7
|
-
import { CARD_NAVIGATION_DATA_TESTID } from "./constants/index.js";
|
|
8
|
-
import { StyledCardNavigationContentDescription, StyledDescriptionTypography } from "./style.js";
|
|
9
|
-
const DescriptionComponent = (props) => {
|
|
10
|
-
const { description, wrapText } = props;
|
|
11
|
-
const [isDescriptionTruncating, setIsDescriptionTruncating] = useState(false);
|
|
12
|
-
const { handleRef: descriptionHandleRef } = useOnOverflowChange({
|
|
13
|
-
onOverflowStateChange: setIsDescriptionTruncating
|
|
14
|
-
});
|
|
15
|
-
if (wrapText)
|
|
16
|
-
return /* @__PURE__ */ jsx(StyledCardNavigationContentDescription, { children: /* @__PURE__ */ jsx(
|
|
17
|
-
StyledDescriptionTypography,
|
|
18
|
-
{
|
|
19
|
-
innerRef: descriptionHandleRef,
|
|
20
|
-
truncateWithEllipsis: true,
|
|
21
|
-
variant: TYPOGRAPHY_VARIANTS.B1,
|
|
22
|
-
"data-testid": CARD_NAVIGATION_DATA_TESTID.DESCRIPTION_TEXT,
|
|
23
|
-
children: description
|
|
24
|
-
}
|
|
25
|
-
) });
|
|
26
|
-
return /* @__PURE__ */ jsx(StyledCardNavigationContentDescription, { children: isDescriptionTruncating ? /* @__PURE__ */ jsx(DSTooltipV3, { text: description, children: /* @__PURE__ */ jsx(
|
|
27
|
-
StyledDescriptionTypography,
|
|
28
|
-
{
|
|
29
|
-
innerRef: descriptionHandleRef,
|
|
30
|
-
truncateWithEllipsis: true,
|
|
31
|
-
variant: TYPOGRAPHY_VARIANTS.B1,
|
|
32
|
-
"data-testid": CARD_NAVIGATION_DATA_TESTID.DESCRIPTION_TEXT,
|
|
33
|
-
children: description
|
|
34
|
-
}
|
|
35
|
-
) }) : /* @__PURE__ */ jsx(
|
|
36
|
-
StyledDescriptionTypography,
|
|
37
|
-
{
|
|
38
|
-
innerRef: descriptionHandleRef,
|
|
39
|
-
truncateWithEllipsis: true,
|
|
40
|
-
variant: TYPOGRAPHY_VARIANTS.B1,
|
|
41
|
-
"data-testid": CARD_NAVIGATION_DATA_TESTID.DESCRIPTION_TEXT,
|
|
42
|
-
children: description
|
|
43
|
-
}
|
|
44
|
-
) });
|
|
45
|
-
};
|
|
46
|
-
export {
|
|
47
|
-
DescriptionComponent
|
|
48
|
-
};
|
|
49
|
-
//# sourceMappingURL=DescriptionComponent.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../src/DescriptionComponent.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { useOnOverflowChange } from '@elliemae/ds-hooks-on-overflow-change';\nimport { DSTooltipV3 } from '@elliemae/ds-tooltip-v3';\nimport { TYPOGRAPHY_VARIANTS } from '@elliemae/ds-typography';\nimport { useState } from 'react';\nimport { CARD_NAVIGATION_DATA_TESTID } from './constants/index.js';\nimport { StyledCardNavigationContentDescription, StyledDescriptionTypography } from './style.js';\n\nexport const DescriptionComponent = (props: { description: string; wrapText?: boolean }) => {\n const { description, wrapText } = props;\n\n const [isDescriptionTruncating, setIsDescriptionTruncating] = useState(false);\n\n const { handleRef: descriptionHandleRef } = useOnOverflowChange({\n onOverflowStateChange: setIsDescriptionTruncating,\n });\n\n if (wrapText)\n return (\n <StyledCardNavigationContentDescription>\n <StyledDescriptionTypography\n innerRef={descriptionHandleRef}\n truncateWithEllipsis\n variant={TYPOGRAPHY_VARIANTS.B1}\n data-testid={CARD_NAVIGATION_DATA_TESTID.DESCRIPTION_TEXT}\n >\n {description}\n </StyledDescriptionTypography>\n </StyledCardNavigationContentDescription>\n );\n\n return (\n <StyledCardNavigationContentDescription>\n {isDescriptionTruncating ? (\n <DSTooltipV3 text={description}>\n <StyledDescriptionTypography\n innerRef={descriptionHandleRef}\n truncateWithEllipsis\n variant={TYPOGRAPHY_VARIANTS.B1}\n data-testid={CARD_NAVIGATION_DATA_TESTID.DESCRIPTION_TEXT}\n >\n {description}\n </StyledDescriptionTypography>\n </DSTooltipV3>\n ) : (\n <StyledDescriptionTypography\n innerRef={descriptionHandleRef}\n truncateWithEllipsis\n variant={TYPOGRAPHY_VARIANTS.B1}\n data-testid={CARD_NAVIGATION_DATA_TESTID.DESCRIPTION_TEXT}\n >\n {description}\n </StyledDescriptionTypography>\n )}\n </StyledCardNavigationContentDescription>\n );\n};\n"],
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;ACmBf;AAnBR,SAAS,2BAA2B;AACpC,SAAS,mBAAmB;AAC5B,SAAS,2BAA2B;AACpC,SAAS,gBAAgB;AACzB,SAAS,mCAAmC;AAC5C,SAAS,wCAAwC,mCAAmC;AAE7E,MAAM,uBAAuB,CAAC,UAAuD;AAC1F,QAAM,EAAE,aAAa,SAAS,IAAI;AAElC,QAAM,CAAC,yBAAyB,0BAA0B,IAAI,SAAS,KAAK;AAE5E,QAAM,EAAE,WAAW,qBAAqB,IAAI,oBAAoB;AAAA,IAC9D,uBAAuB;AAAA,EACzB,CAAC;AAED,MAAI;AACF,WACE,oBAAC,0CACC;AAAA,MAAC;AAAA;AAAA,QACC,UAAU;AAAA,QACV,sBAAoB;AAAA,QACpB,SAAS,oBAAoB;AAAA,QAC7B,eAAa,4BAA4B;AAAA,QAExC;AAAA;AAAA,IACH,GACF;AAGJ,SACE,oBAAC,0CACE,oCACC,oBAAC,eAAY,MAAM,aACjB;AAAA,IAAC;AAAA;AAAA,MACC,UAAU;AAAA,MACV,sBAAoB;AAAA,MACpB,SAAS,oBAAoB;AAAA,MAC7B,eAAa,4BAA4B;AAAA,MAExC;AAAA;AAAA,EACH,GACF,IAEA;AAAA,IAAC;AAAA;AAAA,MACC,UAAU;AAAA,MACV,sBAAoB;AAAA,MACpB,SAAS,oBAAoB;AAAA,MAC7B,eAAa,4BAA4B;AAAA,MAExC;AAAA;AAAA,EACH,GAEJ;AAEJ;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|