@elliemae/ds-card-navigation 3.55.1 → 3.57.0-next.1

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.
Files changed (64) hide show
  1. package/dist/cjs/DSCardNavigation.js +50 -39
  2. package/dist/cjs/DSCardNavigation.js.map +2 -2
  3. package/dist/cjs/config/useCardNavigation.js +19 -4
  4. package/dist/cjs/config/useCardNavigation.js.map +2 -2
  5. package/dist/cjs/constants/index.js +11 -2
  6. package/dist/cjs/constants/index.js.map +2 -2
  7. package/dist/cjs/index.js +1 -0
  8. package/dist/cjs/index.js.map +2 -2
  9. package/dist/cjs/parts/ActionsRegion.js +72 -0
  10. package/dist/cjs/parts/ActionsRegion.js.map +7 -0
  11. package/dist/cjs/{style.js → parts/style.js} +83 -38
  12. package/dist/cjs/parts/style.js.map +7 -0
  13. package/dist/cjs/parts/text-region/IconAndTextsRegion.js +107 -0
  14. package/dist/cjs/parts/text-region/IconAndTextsRegion.js.map +7 -0
  15. package/dist/cjs/parts/text-region/IconAndTextsRegionContent.js +128 -0
  16. package/dist/cjs/parts/text-region/IconAndTextsRegionContent.js.map +7 -0
  17. package/dist/cjs/react-desc-prop-types.js +3 -3
  18. package/dist/cjs/react-desc-prop-types.js.map +2 -2
  19. package/dist/esm/DSCardNavigation.js +51 -48
  20. package/dist/esm/DSCardNavigation.js.map +2 -2
  21. package/dist/esm/config/useCardNavigation.js +20 -5
  22. package/dist/esm/config/useCardNavigation.js.map +2 -2
  23. package/dist/esm/constants/index.js +11 -2
  24. package/dist/esm/constants/index.js.map +2 -2
  25. package/dist/esm/index.js +3 -1
  26. package/dist/esm/index.js.map +2 -2
  27. package/dist/esm/parts/ActionsRegion.js +46 -0
  28. package/dist/esm/parts/ActionsRegion.js.map +7 -0
  29. package/dist/esm/parts/style.js +170 -0
  30. package/dist/esm/parts/style.js.map +7 -0
  31. package/dist/esm/parts/text-region/IconAndTextsRegion.js +77 -0
  32. package/dist/esm/parts/text-region/IconAndTextsRegion.js.map +7 -0
  33. package/dist/esm/parts/text-region/IconAndTextsRegionContent.js +107 -0
  34. package/dist/esm/parts/text-region/IconAndTextsRegionContent.js.map +7 -0
  35. package/dist/esm/react-desc-prop-types.js +3 -3
  36. package/dist/esm/react-desc-prop-types.js.map +2 -2
  37. package/dist/types/DSCardNavigation.d.ts +1 -1
  38. package/dist/types/config/useCardNavigation.d.ts +7 -6
  39. package/dist/types/constants/index.d.ts +13 -0
  40. package/dist/types/index.d.ts +1 -1
  41. package/dist/types/parts/ActionsRegion.d.ts +10 -0
  42. package/dist/types/{style.d.ts → parts/style.d.ts} +11 -5
  43. package/dist/types/parts/text-region/IconAndTextsRegion.d.ts +15 -0
  44. package/dist/types/parts/text-region/IconAndTextsRegionContent.d.ts +17 -0
  45. package/dist/types/tests/tooltip-tests/DSCardNavigation.tooltip.wrapText.interdependecy.test.playwright.d.ts +1 -0
  46. package/dist/types/tests/tooltip-tests/DSCardNavigationTooltipTestRenderer.d.ts +1 -0
  47. package/package.json +16 -11
  48. package/dist/cjs/DescriptionComponent.js +0 -79
  49. package/dist/cjs/DescriptionComponent.js.map +0 -7
  50. package/dist/cjs/TitleComponent.js +0 -51
  51. package/dist/cjs/TitleComponent.js.map +0 -7
  52. package/dist/cjs/style.js.map +0 -7
  53. package/dist/esm/DescriptionComponent.js +0 -49
  54. package/dist/esm/DescriptionComponent.js.map +0 -7
  55. package/dist/esm/TitleComponent.js +0 -21
  56. package/dist/esm/TitleComponent.js.map +0 -7
  57. package/dist/esm/style.js +0 -125
  58. package/dist/esm/style.js.map +0 -7
  59. package/dist/types/DescriptionComponent.d.ts +0 -4
  60. package/dist/types/TitleComponent.d.ts +0 -4
  61. package/dist/types/tests/overflow/DSCardNavigationOverflowTestRenderer.d.ts +0 -2
  62. package/dist/types/tests/wraptext/DSCardNavigationWrapTextTestRenderer.d.ts +0 -2
  63. /package/dist/types/tests/{overflow/DSCardNavigation.overflow.test.playwright.d.ts → tooltip-tests/DSCardNavigation.tooltip.hover.test.playwright.d.ts} +0 -0
  64. /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,107 @@
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 IconAndTextsRegion_exports = {};
30
+ __export(IconAndTextsRegion_exports, {
31
+ IconAndTextsRegion: () => IconAndTextsRegion
32
+ });
33
+ module.exports = __toCommonJS(IconAndTextsRegion_exports);
34
+ var React = __toESM(require("react"));
35
+ var import_jsx_runtime = require("react/jsx-runtime");
36
+ var import_ds_grid = require("@elliemae/ds-grid");
37
+ var import_ds_hooks_on_overflow_change = require("@elliemae/ds-hooks-on-overflow-change");
38
+ var import_ds_tooltip_v3 = require("@elliemae/ds-tooltip-v3");
39
+ var import_ds_typography = require("@elliemae/ds-typography");
40
+ var import_react = __toESM(require("react"));
41
+ var import_IconAndTextsRegionContent = require("./IconAndTextsRegionContent.js");
42
+ const TooltipText = ({ title, description }) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_ds_grid.Grid, { children: [
43
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_typography.DSTypography, { variant: import_ds_typography.TYPOGRAPHY_VARIANTS.H5_ARTICLE, children: title }),
44
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_typography.DSTypography, { variant: import_ds_typography.TYPOGRAPHY_VARIANTS.B1, children: description })
45
+ ] });
46
+ const IconAndTextsRegion = ({
47
+ title,
48
+ description,
49
+ wrapText,
50
+ type,
51
+ Icon,
52
+ showFocusRingAroundAll,
53
+ hideFocusRingAroundAll,
54
+ getOwnerProps,
55
+ getOwnerPropsArguments
56
+ }) => {
57
+ const [isTitleTruncating, setIsTitleTruncating] = import_react.default.useState(false);
58
+ const [isDescriptionTruncating, setIsDescriptionTruncating] = import_react.default.useState(false);
59
+ const AnyOverFlow = isTitleTruncating || isDescriptionTruncating;
60
+ const { handleRef: titleHandleRef } = (0, import_ds_hooks_on_overflow_change.useOnOverflowChange)({
61
+ onOverflowStateChange: setIsTitleTruncating
62
+ });
63
+ const { handleRef: descriptionHandleRef } = (0, import_ds_hooks_on_overflow_change.useOnOverflowChange)({
64
+ onOverflowStateChange: setIsDescriptionTruncating
65
+ });
66
+ const TooltipTextProps = import_react.default.useMemo(
67
+ () => ({
68
+ title,
69
+ description
70
+ }),
71
+ [title, description]
72
+ );
73
+ if (AnyOverFlow)
74
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_tooltip_v3.DSTooltipV3, { Text: TooltipText, textProps: TooltipTextProps, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
75
+ import_IconAndTextsRegionContent.IconAndTextsRegionContent,
76
+ {
77
+ title,
78
+ description,
79
+ wrapText,
80
+ type,
81
+ Icon,
82
+ titleHandleRef,
83
+ descriptionHandleRef,
84
+ showFocusRingAroundAll,
85
+ hideFocusRingAroundAll,
86
+ getOwnerProps,
87
+ getOwnerPropsArguments
88
+ }
89
+ ) });
90
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
91
+ import_IconAndTextsRegionContent.IconAndTextsRegionContent,
92
+ {
93
+ title,
94
+ description,
95
+ wrapText,
96
+ type,
97
+ Icon,
98
+ titleHandleRef,
99
+ descriptionHandleRef,
100
+ showFocusRingAroundAll,
101
+ hideFocusRingAroundAll,
102
+ getOwnerProps,
103
+ getOwnerPropsArguments
104
+ }
105
+ );
106
+ };
107
+ //# sourceMappingURL=IconAndTextsRegion.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../src/parts/text-region/IconAndTextsRegion.tsx", "../../../../../../../scripts/build/transpile/react-shim.js"],
4
+ "sourcesContent": ["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 getOwnerProps?: () => object;\n getOwnerPropsArguments?: () => object;\n}\n\nexport const IconAndTextsRegion: React.ComponentType<IconAndTextsRegionProps> = ({\n title,\n description,\n wrapText,\n type,\n Icon,\n showFocusRingAroundAll,\n hideFocusRingAroundAll,\n getOwnerProps,\n getOwnerPropsArguments,\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 getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\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 getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n />\n );\n};\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADerB;AAfF,qBAAqB;AACrB,yCAAoC;AAEpC,2BAA4B;AAC5B,2BAAkD;AAClD,mBAAkB;AAElB,uCAA0C;AAO1C,MAAM,cAAqD,CAAC,EAAE,OAAO,YAAY,MAC/E,6CAAC,uBACC;AAAA,8CAAC,qCAAa,SAAS,yCAAoB,YAAa,iBAAM;AAAA,EAC9D,4CAAC,qCAAa,SAAS,yCAAoB,IAAK,uBAAY;AAAA,GAC9D;AAeK,MAAM,qBAAmE,CAAC;AAAA,EAC/E;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,MAAM;AACJ,QAAM,CAAC,mBAAmB,oBAAoB,IAAI,aAAAA,QAAM,SAAS,KAAK;AACtE,QAAM,CAAC,yBAAyB,0BAA0B,IAAI,aAAAA,QAAM,SAAS,KAAK;AAElF,QAAM,cAAc,qBAAqB;AAEzC,QAAM,EAAE,WAAW,eAAe,QAAI,wDAAoB;AAAA,IACxD,uBAAuB;AAAA,EACzB,CAAC;AAED,QAAM,EAAE,WAAW,qBAAqB,QAAI,wDAAoB;AAAA,IAC9D,uBAAuB;AAAA,EACzB,CAAC;AACD,QAAM,mBAAmB,aAAAA,QAAM;AAAA,IAC7B,OAAO;AAAA,MACL;AAAA,MACA;AAAA,IACF;AAAA,IACA,CAAC,OAAO,WAAW;AAAA,EACrB;AAEA,MAAI;AACF,WACE,4CAAC,oCAA8B,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,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,MACA;AAAA,MACA;AAAA;AAAA,EACF;AAEJ;",
6
+ "names": ["React"]
7
+ }
@@ -0,0 +1,128 @@
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 IconAndTextsRegionContent_exports = {};
30
+ __export(IconAndTextsRegionContent_exports, {
31
+ IconAndTextsRegionContent: () => IconAndTextsRegionContent
32
+ });
33
+ module.exports = __toCommonJS(IconAndTextsRegionContent_exports);
34
+ var React = __toESM(require("react"));
35
+ var import_jsx_runtime = require("react/jsx-runtime");
36
+ var import_ds_typography = require("@elliemae/ds-typography");
37
+ var import_react = __toESM(require("react"));
38
+ var import_constants = require("../../constants/index.js");
39
+ var import_style = require("../style.js");
40
+ const mainIconColor = ["neutral", "0"];
41
+ const cols = ["1fr"];
42
+ const IconAndTextsRegionContent = import_react.default.memo((props) => {
43
+ const {
44
+ title,
45
+ description,
46
+ wrapText,
47
+ titleHandleRef,
48
+ descriptionHandleRef,
49
+ type,
50
+ Icon,
51
+ showFocusRingAroundAll,
52
+ hideFocusRingAroundAll,
53
+ getOwnerProps,
54
+ getOwnerPropsArguments
55
+ } = props;
56
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
57
+ import_style.StyledGridTextContainer,
58
+ {
59
+ "data-type": type,
60
+ role: "button",
61
+ tabIndex: 0,
62
+ onFocus: showFocusRingAroundAll,
63
+ onBlur: hideFocusRingAroundAll,
64
+ getOwnerProps,
65
+ getOwnerPropsArguments,
66
+ children: [
67
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
68
+ import_style.StyledCardNavigationIcon,
69
+ {
70
+ $type: type,
71
+ role: "presentation",
72
+ getOwnerProps,
73
+ getOwnerPropsArguments,
74
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Icon, { size: "l", color: mainIconColor })
75
+ }
76
+ ),
77
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
78
+ import_style.StyledCardNavigationCentralContent,
79
+ {
80
+ cols,
81
+ getOwnerProps,
82
+ getOwnerPropsArguments,
83
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_style.StyledCardNavigationContent, { getOwnerProps, getOwnerPropsArguments, children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
84
+ import_style.StyledCardNavigationContentTitleWrapper,
85
+ {
86
+ getOwnerProps,
87
+ getOwnerPropsArguments,
88
+ children: [
89
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
90
+ import_style.StyledCardNavigationContentTitle,
91
+ {
92
+ getOwnerProps,
93
+ getOwnerPropsArguments,
94
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
95
+ import_style.StyledTitleTypography,
96
+ {
97
+ innerRef: titleHandleRef,
98
+ truncateWithEllipsis: !wrapText,
99
+ variant: import_ds_typography.TYPOGRAPHY_VARIANTS.B1,
100
+ getOwnerProps,
101
+ getOwnerPropsArguments,
102
+ children: title
103
+ }
104
+ )
105
+ }
106
+ ),
107
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
108
+ import_style.StyledDescriptionTypography,
109
+ {
110
+ innerRef: descriptionHandleRef,
111
+ truncateWithEllipsis: !wrapText,
112
+ variant: import_ds_typography.TYPOGRAPHY_VARIANTS.B1,
113
+ "data-testid": import_constants.CARD_NAVIGATION_DATA_TESTID.DESCRIPTION_TEXT,
114
+ getOwnerProps,
115
+ getOwnerPropsArguments,
116
+ children: description
117
+ }
118
+ ) })
119
+ ]
120
+ }
121
+ ) })
122
+ }
123
+ )
124
+ ]
125
+ }
126
+ );
127
+ });
128
+ //# sourceMappingURL=IconAndTextsRegionContent.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../src/parts/text-region/IconAndTextsRegionContent.tsx", "../../../../../../../scripts/build/transpile/react-shim.js"],
4
+ "sourcesContent": ["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 getOwnerProps?: () => object;\n getOwnerPropsArguments?: () => object;\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 getOwnerProps,\n getOwnerPropsArguments,\n } = props;\n\n return (\n <StyledGridTextContainer\n data-type={type}\n role=\"button\"\n tabIndex={0}\n onFocus={showFocusRingAroundAll}\n onBlur={hideFocusRingAroundAll}\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n >\n <StyledCardNavigationIcon\n $type={type}\n role=\"presentation\"\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n >\n <Icon size=\"l\" color={mainIconColor} />\n </StyledCardNavigationIcon>\n\n <StyledCardNavigationCentralContent\n cols={cols}\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n >\n <StyledCardNavigationContent getOwnerProps={getOwnerProps} getOwnerPropsArguments={getOwnerPropsArguments}>\n <StyledCardNavigationContentTitleWrapper\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n >\n <StyledCardNavigationContentTitle\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n >\n <StyledTitleTypography\n innerRef={titleHandleRef}\n truncateWithEllipsis={!wrapText}\n variant={TYPOGRAPHY_VARIANTS.B1}\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\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 getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n >\n {description}\n </StyledDescriptionTypography>\n </div>\n </StyledCardNavigationContentTitleWrapper>\n </StyledCardNavigationContent>\n </StyledCardNavigationCentralContent>\n </StyledGridTextContainer>\n );\n});\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADiEf;AAhER,2BAAoC;AACpC,mBAAkB;AAClB,uBAA4C;AAE5C,mBASO;AAEP,MAAM,gBAAgB,CAAC,WAAW,GAAG;AACrC,MAAM,OAAO,CAAC,KAAK;AAiBZ,MAAM,4BAA4B,aAAAA,QAAM,KAAK,CAAC,UAA0C;AAC7F,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA;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,aAAW;AAAA,MACX,MAAK;AAAA,MACL,UAAU;AAAA,MACV,SAAS;AAAA,MACT,QAAQ;AAAA,MACR;AAAA,MACA;AAAA,MAEA;AAAA;AAAA,UAAC;AAAA;AAAA,YACC,OAAO;AAAA,YACP,MAAK;AAAA,YACL;AAAA,YACA;AAAA,YAEA,sDAAC,QAAK,MAAK,KAAI,OAAO,eAAe;AAAA;AAAA,QACvC;AAAA,QAEA;AAAA,UAAC;AAAA;AAAA,YACC;AAAA,YACA;AAAA,YACA;AAAA,YAEA,sDAAC,4CAA4B,eAA8B,wBACzD;AAAA,cAAC;AAAA;AAAA,gBACC;AAAA,gBACA;AAAA,gBAEA;AAAA;AAAA,oBAAC;AAAA;AAAA,sBACC;AAAA,sBACA;AAAA,sBAEA;AAAA,wBAAC;AAAA;AAAA,0BACC,UAAU;AAAA,0BACV,sBAAsB,CAAC;AAAA,0BACvB,SAAS,yCAAoB;AAAA,0BAC7B;AAAA,0BACA;AAAA,0BAEC;AAAA;AAAA,sBACH;AAAA;AAAA,kBACF;AAAA,kBACA,4CAAC,SACC;AAAA,oBAAC;AAAA;AAAA,sBACC,UAAU;AAAA,sBACV,sBAAsB,CAAC;AAAA,sBACvB,SAAS,yCAAoB;AAAA,sBAC7B,eAAa,6CAA4B;AAAA,sBACzC;AAAA,sBACA;AAAA,sBAEC;AAAA;AAAA,kBACH,GACF;AAAA;AAAA;AAAA,YACF,GACF;AAAA;AAAA,QACF;AAAA;AAAA;AAAA,EACF;AAEJ,CAAC;",
6
+ "names": ["React"]
7
+ }
@@ -57,9 +57,9 @@ const DSCardNavigationPropTypes = {
57
57
  Icon: import_ds_props_helpers.PropTypes.func.description("component that will be used to render the icon").defaultValue('()=><LoanProducts size="l" color={["neutral", 0]} />'),
58
58
  actions: import_ds_props_helpers.PropTypes.arrayOf(
59
59
  import_ds_props_helpers.PropTypes.shape({
60
- icon: import_ds_props_helpers.PropTypes.element.deprecated({ version: "3.x" }),
61
- Icon: import_ds_props_helpers.PropTypes.func.description(""),
62
- onClick: import_ds_props_helpers.PropTypes.func
60
+ onClick: import_ds_props_helpers.PropTypes.func.isRequired,
61
+ icon: import_ds_props_helpers.PropTypes.element,
62
+ Icon: import_ds_props_helpers.PropTypes.func
63
63
  })
64
64
  ).description("card navigation actions array").defaultValue("[]"),
65
65
  wrapText: import_ds_props_helpers.PropTypes.bool.description("wrap text in the card navigation").defaultValue(false)
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/react-desc-prop-types.ts", "../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["/* 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 icon: PropTypes.element.deprecated({ version: '3.x' }),\n Icon: PropTypes.func.description(''),\n onClick: 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", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADGvB,8BAKO;AACP,sBAA6B;AAG7B,uBAAuF;AAyChF,MAAM,eAA+C;AAAA,EAC1D,gBAAgB,CAAC;AAAA,EACjB,OAAO;AAAA,EACP,aAAa;AAAA,EACb,MAAM,2CAA0B,CAAC;AAAA,EACjC,MAAM;AAAA,EACN,SAAS,CAAC;AAAA,EACV,UAAU;AACZ;AAEO,MAAM,4BAAwE;AAAA,EACnF,OAAG,kDAAyB,uCAAsB,sCAAqB;AAAA,EACvE,GAAG;AAAA,EACH,GAAG;AAAA,EAEH,gBAAgB,kCAAU,OAAO,YAAY,4CAA4C,EAAE,aAAa,IAAI;AAAA,EAC5G,OAAO,kCAAU,OAAO,YAAY,uBAAuB,EAAE,aAAa,EAAE;AAAA,EAC5E,aAAa,kCAAU,OAAO,YAAY,6BAA6B,EAAE,aAAa,EAAE;AAAA,EACxF,MAAM,kCAAU,MAAM,0CAAyB,EAAE,YAAY,sBAAsB,EAAE,aAAa,EAAE;AAAA,EAEpG,MAAM,kCAAU,KACb,YAAY,gDAAgD,EAC5D,aAAa,sDAAsD;AAAA,EAEtE,SAAS,kCAAU;AAAA,IACjB,kCAAU,MAAM;AAAA,MACd,MAAM,kCAAU,QAAQ,WAAW,EAAE,SAAS,MAAM,CAAC;AAAA,MACrD,MAAM,kCAAU,KAAK,YAAY,EAAE;AAAA,MACnC,SAAS,kCAAU;AAAA,IACrB,CAAC;AAAA,EACH,EACG,YAAY,+BAA+B,EAC3C,aAAa,IAAI;AAAA,EAEpB,UAAU,kCAAU,KAAK,YAAY,kCAAkC,EAAE,aAAa,KAAK;AAC7F;AAEO,MAAM,kCACX;",
4
+ "sourcesContent": ["/* 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", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADGvB,8BAKO;AACP,sBAA6B;AAG7B,uBAAuF;AAyChF,MAAM,eAA+C;AAAA,EAC1D,gBAAgB,CAAC;AAAA,EACjB,OAAO;AAAA,EACP,aAAa;AAAA,EACb,MAAM,2CAA0B,CAAC;AAAA,EACjC,MAAM;AAAA,EACN,SAAS,CAAC;AAAA,EACV,UAAU;AACZ;AAEO,MAAM,4BAAwE;AAAA,EACnF,OAAG,kDAAyB,uCAAsB,sCAAqB;AAAA,EACvE,GAAG;AAAA,EACH,GAAG;AAAA,EAEH,gBAAgB,kCAAU,OAAO,YAAY,4CAA4C,EAAE,aAAa,IAAI;AAAA,EAC5G,OAAO,kCAAU,OAAO,YAAY,uBAAuB,EAAE,aAAa,EAAE;AAAA,EAC5E,aAAa,kCAAU,OAAO,YAAY,6BAA6B,EAAE,aAAa,EAAE;AAAA,EACxF,MAAM,kCAAU,MAAM,0CAAyB,EAAE,YAAY,sBAAsB,EAAE,aAAa,EAAE;AAAA,EAEpG,MAAM,kCAAU,KACb,YAAY,gDAAgD,EAC5D,aAAa,sDAAsD;AAAA,EAEtE,SAAS,kCAAU;AAAA,IACjB,kCAAU,MAAM;AAAA,MACd,SAAS,kCAAU,KAAK;AAAA,MACxB,MAAM,kCAAU;AAAA,MAChB,MAAM,kCAAU;AAAA,IAClB,CAAC;AAAA,EACH,EACG,YAAY,+BAA+B,EAC3C,aAAa,IAAI;AAAA,EAEpB,UAAU,kCAAU,KAAK,YAAY,kCAAkC,EAAE,aAAa,KAAK;AAC7F;AAEO,MAAM,kCACX;",
6
6
  "names": []
7
7
  }
@@ -1,58 +1,61 @@
1
1
  import * as React from "react";
2
2
  import { jsx, jsxs } from "react/jsx-runtime";
3
- import { BUTTON_SIZES, BUTTON_TYPES, DSButtonV2 } from "@elliemae/ds-button-v2";
4
- import { MoreOptionsVert } from "@elliemae/ds-icons";
5
- import { describe } from "@elliemae/ds-props-helpers";
6
- import { useMemo } from "react";
3
+ import { describe, useOwnerProps } from "@elliemae/ds-props-helpers";
7
4
  import { useCardNavigation } from "./config/useCardNavigation.js";
8
5
  import { DSCardNavigationName } from "./constants/index.js";
9
6
  import { DSCardNavigationPropTypesSchema } from "./react-desc-prop-types.js";
10
- import {
11
- StyledCardNavigationAction,
12
- StyledCardNavigationActions,
13
- StyledCardNavigationBoxWrapper,
14
- StyledCardNavigationCentralContent,
15
- StyledCardNavigationContent,
16
- StyledCardNavigationContentTitleWrapper,
17
- StyledCardNavigationIcon
18
- } from "./style.js";
19
- import { TitleComponent } from "./TitleComponent.js";
20
- import { DescriptionComponent } from "./DescriptionComponent.js";
21
- const mainIconColor = ["neutral", "0"];
7
+ import { StyledCardNavigationBoxWrapper } from "./parts/style.js";
8
+ import { IconAndTextsRegion } from "./parts/text-region/IconAndTextsRegion.js";
9
+ import { ActionsRegion } from "./parts/ActionsRegion.js";
22
10
  const DSCardNavigation = (props) => {
23
- const { propsWithDefault, xstyledProps, instanceUid } = useCardNavigation(props);
24
- const { containerProps, title, description, type, Icon, actions, wrapText, ...rest } = propsWithDefault;
25
- const cols = useMemo(() => actions.length > 0 ? ["1fr", "min-content"] : ["1fr"], [actions.length]);
26
- return /* @__PURE__ */ jsxs(StyledCardNavigationBoxWrapper, { tabIndex: 0, ...rest, ...xstyledProps, ...containerProps, children: [
27
- /* @__PURE__ */ jsx(StyledCardNavigationIcon, { role: "button", "aria-label": title, $type: type, "data-type": type, children: /* @__PURE__ */ jsx(Icon, { size: "l", color: [...mainIconColor] }) }),
28
- /* @__PURE__ */ jsxs(StyledCardNavigationCentralContent, { cols, children: [
29
- /* @__PURE__ */ jsx(StyledCardNavigationContent, { children: /* @__PURE__ */ jsxs(StyledCardNavigationContentTitleWrapper, { children: [
30
- /* @__PURE__ */ jsx(TitleComponent, { title, wrapText }),
31
- /* @__PURE__ */ jsx(DescriptionComponent, { description, wrapText })
32
- ] }) }),
33
- actions.length > 0 && /* @__PURE__ */ jsx(StyledCardNavigationActions, { children: actions.map(
34
- ({
35
- icon = /* @__PURE__ */ jsx(MoreOptionsVert, { "aria-label": "More options" }),
36
- Icon: ActionIcon,
37
- onClick,
38
- ...unexpectedButPreviouslySupportedOtherProps
39
- }, index) => (
40
- // eslint-disable-next-line react/no-array-index-key
41
- /* @__PURE__ */ jsx(StyledCardNavigationAction, { children: /* @__PURE__ */ jsx(
42
- DSButtonV2,
43
- {
44
- onClick,
45
- "aria-label": "More options",
46
- ...unexpectedButPreviouslySupportedOtherProps,
47
- buttonType: BUTTON_TYPES.ICON,
48
- size: BUTTON_SIZES.L,
49
- children: ActionIcon ? /* @__PURE__ */ jsx(ActionIcon, {}) : icon
50
- }
51
- ) }, `${instanceUid}-${index}`)
11
+ const cardNavigationConfig = useCardNavigation(props);
12
+ const {
13
+ propsWithDefault,
14
+ xstyledProps,
15
+ globalProps,
16
+ iconAndTextsRegionIsFocused,
17
+ showFocusRingAroundAll,
18
+ hideFocusRingAroundAll,
19
+ instanceUid
20
+ } = cardNavigationConfig;
21
+ const { containerProps, title, description, type, Icon, actions, wrapText } = propsWithDefault;
22
+ const { getOwnerProps, getOwnerPropsArguments } = useOwnerProps(propsWithDefault);
23
+ return /* @__PURE__ */ jsxs(
24
+ StyledCardNavigationBoxWrapper,
25
+ {
26
+ ...globalProps,
27
+ ...xstyledProps,
28
+ ...containerProps,
29
+ getOwnerProps,
30
+ getOwnerPropsArguments,
31
+ $isIconAndTextsRegionFocused: iconAndTextsRegionIsFocused,
32
+ children: [
33
+ /* @__PURE__ */ jsx(
34
+ IconAndTextsRegion,
35
+ {
36
+ getOwnerProps,
37
+ getOwnerPropsArguments,
38
+ title,
39
+ description,
40
+ wrapText,
41
+ type,
42
+ Icon,
43
+ showFocusRingAroundAll,
44
+ hideFocusRingAroundAll
45
+ }
46
+ ),
47
+ /* @__PURE__ */ jsx(
48
+ ActionsRegion,
49
+ {
50
+ getOwnerProps,
51
+ getOwnerPropsArguments,
52
+ actions,
53
+ instanceUid
54
+ }
52
55
  )
53
- ) })
54
- ] })
55
- ] });
56
+ ]
57
+ }
58
+ );
56
59
  };
57
60
  DSCardNavigation.displayName = DSCardNavigationName;
58
61
  const DSCardNavigationWithSchema = describe(DSCardNavigation);
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../src/DSCardNavigation.tsx"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { BUTTON_SIZES, BUTTON_TYPES, DSButtonV2 } from '@elliemae/ds-button-v2';\nimport { MoreOptionsVert } from '@elliemae/ds-icons';\nimport { describe } from '@elliemae/ds-props-helpers';\nimport React, { useMemo } from 'react';\nimport { useCardNavigation } from './config/useCardNavigation.js';\nimport { DSCardNavigationName } from './constants/index.js';\nimport { type DSCardNavigationT, DSCardNavigationPropTypesSchema } from './react-desc-prop-types.js';\nimport {\n StyledCardNavigationAction,\n StyledCardNavigationActions,\n StyledCardNavigationBoxWrapper,\n StyledCardNavigationCentralContent,\n StyledCardNavigationContent,\n StyledCardNavigationContentTitleWrapper,\n StyledCardNavigationIcon,\n} from './style.js';\nimport { TitleComponent } from './TitleComponent.js';\nimport { DescriptionComponent } from './DescriptionComponent.js';\n\nconst mainIconColor = ['neutral', '0'] as const;\n\nconst DSCardNavigation: React.FC<DSCardNavigationT.Props> = (props) => {\n const { propsWithDefault, xstyledProps, instanceUid } = useCardNavigation(props);\n const { containerProps, title, description, type, Icon, actions, wrapText, ...rest } = propsWithDefault;\n\n const cols = useMemo(() => (actions.length > 0 ? ['1fr', 'min-content'] : ['1fr']), [actions.length]);\n\n return (\n <StyledCardNavigationBoxWrapper tabIndex={0} {...rest} {...xstyledProps} {...containerProps}>\n <StyledCardNavigationIcon role=\"button\" aria-label={title} $type={type} data-type={type}>\n <Icon size=\"l\" color={[...mainIconColor]} />\n </StyledCardNavigationIcon>\n\n <StyledCardNavigationCentralContent cols={cols}>\n <StyledCardNavigationContent>\n <StyledCardNavigationContentTitleWrapper>\n <TitleComponent title={title} wrapText={wrapText} />\n <DescriptionComponent description={description} wrapText={wrapText} />\n </StyledCardNavigationContentTitleWrapper>\n </StyledCardNavigationContent>\n\n {actions.length > 0 && (\n <StyledCardNavigationActions>\n {actions.map(\n (\n {\n icon = <MoreOptionsVert aria-label=\"More options\" />,\n Icon: ActionIcon,\n onClick,\n ...unexpectedButPreviouslySupportedOtherProps\n },\n index,\n ) => (\n // eslint-disable-next-line react/no-array-index-key\n <StyledCardNavigationAction key={`${instanceUid}-${index}`}>\n <DSButtonV2\n onClick={onClick}\n aria-label=\"More options\"\n {...unexpectedButPreviouslySupportedOtherProps}\n buttonType={BUTTON_TYPES.ICON}\n size={BUTTON_SIZES.L}\n >\n {ActionIcon ? <ActionIcon /> : icon}\n </DSButtonV2>\n </StyledCardNavigationAction>\n ),\n )}\n </StyledCardNavigationActions>\n )}\n </StyledCardNavigationCentralContent>\n </StyledCardNavigationBoxWrapper>\n );\n};\n\nDSCardNavigation.displayName = DSCardNavigationName;\nconst DSCardNavigationWithSchema = describe(DSCardNavigation);\nDSCardNavigationWithSchema.propTypes = DSCardNavigationPropTypesSchema;\n\nexport { DSCardNavigation, DSCardNavigationWithSchema };\n"],
5
- "mappings": "AAAA,YAAY,WAAW;AC8Bf,cAKE,YALF;AA9BR,SAAS,cAAc,cAAc,kBAAkB;AACvD,SAAS,uBAAuB;AAChC,SAAS,gBAAgB;AACzB,SAAgB,eAAe;AAC/B,SAAS,yBAAyB;AAClC,SAAS,4BAA4B;AACrC,SAAiC,uCAAuC;AACxE;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAS,sBAAsB;AAC/B,SAAS,4BAA4B;AAErC,MAAM,gBAAgB,CAAC,WAAW,GAAG;AAErC,MAAM,mBAAsD,CAAC,UAAU;AACrE,QAAM,EAAE,kBAAkB,cAAc,YAAY,IAAI,kBAAkB,KAAK;AAC/E,QAAM,EAAE,gBAAgB,OAAO,aAAa,MAAM,MAAM,SAAS,UAAU,GAAG,KAAK,IAAI;AAEvF,QAAM,OAAO,QAAQ,MAAO,QAAQ,SAAS,IAAI,CAAC,OAAO,aAAa,IAAI,CAAC,KAAK,GAAI,CAAC,QAAQ,MAAM,CAAC;AAEpG,SACE,qBAAC,kCAA+B,UAAU,GAAI,GAAG,MAAO,GAAG,cAAe,GAAG,gBAC3E;AAAA,wBAAC,4BAAyB,MAAK,UAAS,cAAY,OAAO,OAAO,MAAM,aAAW,MACjF,8BAAC,QAAK,MAAK,KAAI,OAAO,CAAC,GAAG,aAAa,GAAG,GAC5C;AAAA,IAEA,qBAAC,sCAAmC,MAClC;AAAA,0BAAC,+BACC,+BAAC,2CACC;AAAA,4BAAC,kBAAe,OAAc,UAAoB;AAAA,QAClD,oBAAC,wBAAqB,aAA0B,UAAoB;AAAA,SACtE,GACF;AAAA,MAEC,QAAQ,SAAS,KAChB,oBAAC,+BACE,kBAAQ;AAAA,QACP,CACE;AAAA,UACE,OAAO,oBAAC,mBAAgB,cAAW,gBAAe;AAAA,UAClD,MAAM;AAAA,UACN;AAAA,UACA,GAAG;AAAA,QACL,GACA;AAAA;AAAA,UAGA,oBAAC,8BACC;AAAA,YAAC;AAAA;AAAA,cACC;AAAA,cACA,cAAW;AAAA,cACV,GAAG;AAAA,cACJ,YAAY,aAAa;AAAA,cACzB,MAAM,aAAa;AAAA,cAElB,uBAAa,oBAAC,cAAW,IAAK;AAAA;AAAA,UACjC,KAT+B,GAAG,WAAW,IAAI,KAAK,EAUxD;AAAA;AAAA,MAEJ,GACF;AAAA,OAEJ;AAAA,KACF;AAEJ;AAEA,iBAAiB,cAAc;AAC/B,MAAM,6BAA6B,SAAS,gBAAgB;AAC5D,2BAA2B,YAAY;",
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { describe, useOwnerProps } from '@elliemae/ds-props-helpers';\nimport React from 'react';\nimport { useCardNavigation } from './config/useCardNavigation.js';\nimport { DSCardNavigationName } from './constants/index.js';\nimport { type DSCardNavigationT, DSCardNavigationPropTypesSchema } from './react-desc-prop-types.js';\nimport { StyledCardNavigationBoxWrapper } from './parts/style.js';\nimport { IconAndTextsRegion } from './parts/text-region/IconAndTextsRegion.js';\nimport { ActionsRegion } from './parts/ActionsRegion.js';\n\nconst DSCardNavigation: React.ComponentType<DSCardNavigationT.Props> = (props) => {\n const cardNavigationConfig = useCardNavigation(props);\n const {\n propsWithDefault,\n xstyledProps,\n globalProps,\n iconAndTextsRegionIsFocused,\n showFocusRingAroundAll,\n hideFocusRingAroundAll,\n instanceUid,\n } = cardNavigationConfig;\n const { containerProps, title, description, type, Icon, actions, wrapText } = propsWithDefault;\n\n const { getOwnerProps, getOwnerPropsArguments } = useOwnerProps<DSCardNavigationT.Props>(propsWithDefault);\n\n return (\n <StyledCardNavigationBoxWrapper\n {...globalProps}\n {...xstyledProps}\n {...containerProps}\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n $isIconAndTextsRegionFocused={iconAndTextsRegionIsFocused}\n >\n <IconAndTextsRegion\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n title={title}\n description={description}\n wrapText={wrapText}\n type={type}\n Icon={Icon}\n showFocusRingAroundAll={showFocusRingAroundAll}\n hideFocusRingAroundAll={hideFocusRingAroundAll}\n />\n <ActionsRegion\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n actions={actions}\n instanceUid={instanceUid}\n />\n </StyledCardNavigationBoxWrapper>\n );\n};\n\nDSCardNavigation.displayName = DSCardNavigationName;\nconst DSCardNavigationWithSchema = describe(DSCardNavigation);\nDSCardNavigationWithSchema.propTypes = DSCardNavigationPropTypesSchema;\n\nexport { DSCardNavigation, DSCardNavigationWithSchema };\n"],
5
+ "mappings": "AAAA,YAAY,WAAW;ACyBnB,SAQE,KARF;AAzBJ,SAAS,UAAU,qBAAqB;AAExC,SAAS,yBAAyB;AAClC,SAAS,4BAA4B;AACrC,SAAiC,uCAAuC;AACxE,SAAS,sCAAsC;AAC/C,SAAS,0BAA0B;AACnC,SAAS,qBAAqB;AAE9B,MAAM,mBAAiE,CAAC,UAAU;AAChF,QAAM,uBAAuB,kBAAkB,KAAK;AACpD,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,IAAI;AACJ,QAAM,EAAE,gBAAgB,OAAO,aAAa,MAAM,MAAM,SAAS,SAAS,IAAI;AAE9E,QAAM,EAAE,eAAe,uBAAuB,IAAI,cAAuC,gBAAgB;AAEzG,SACE;AAAA,IAAC;AAAA;AAAA,MACE,GAAG;AAAA,MACH,GAAG;AAAA,MACH,GAAG;AAAA,MACJ;AAAA,MACA;AAAA,MACA,8BAA8B;AAAA,MAE9B;AAAA;AAAA,UAAC;AAAA;AAAA,YACC;AAAA,YACA;AAAA,YACA;AAAA,YACA;AAAA,YACA;AAAA,YACA;AAAA,YACA;AAAA,YACA;AAAA,YACA;AAAA;AAAA,QACF;AAAA,QACA;AAAA,UAAC;AAAA;AAAA,YACC;AAAA,YACA;AAAA,YACA;AAAA,YACA;AAAA;AAAA,QACF;AAAA;AAAA;AAAA,EACF;AAEJ;AAEA,iBAAiB,cAAc;AAC/B,MAAM,6BAA6B,SAAS,gBAAgB;AAC5D,2BAA2B,YAAY;",
6
6
  "names": []
7
7
  }
@@ -1,26 +1,41 @@
1
1
  import * as React from "react";
2
2
  import React2 from "react";
3
- import { useGetXstyledProps, useMemoMergePropsWithDefault } from "@elliemae/ds-props-helpers";
3
+ import { useGetXstyledProps, useMemoMergePropsWithDefault, useGetGlobalAttributes } from "@elliemae/ds-props-helpers";
4
4
  import { uid } from "uid";
5
5
  import { DSCardNavigationPropTypes, defaultProps } from "../react-desc-prop-types.js";
6
6
  import { useValidateProps } from "./useValidateProps.js";
7
7
  const useCardNavigation = (propsFromUser) => {
8
8
  const propsWithDefault = useMemoMergePropsWithDefault(propsFromUser, defaultProps);
9
9
  useValidateProps(propsWithDefault, DSCardNavigationPropTypes);
10
+ const { title, type, ...globalPropsWithoutReusedReservedKeywords } = propsWithDefault;
11
+ const globalProps = useGetGlobalAttributes(globalPropsWithoutReusedReservedKeywords);
10
12
  const xstyledProps = useGetXstyledProps(propsWithDefault);
11
13
  const instanceUid = React2.useMemo(() => `ds-card-navigation-${uid(5)}`, []);
14
+ const [iconAndTextsRegionIsFocused, setIconAndTextsRegionIsFocused] = React2.useState(false);
15
+ const showFocusRingAroundAll = React2.useCallback(() => {
16
+ setIconAndTextsRegionIsFocused(true);
17
+ }, []);
18
+ const hideFocusRingAroundAll = React2.useCallback(() => {
19
+ setIconAndTextsRegionIsFocused(false);
20
+ }, []);
12
21
  return React2.useMemo(
13
22
  () => ({
14
23
  propsWithDefault,
15
24
  xstyledProps,
16
- instanceUid
17
- // ...eventHandlers,
25
+ globalProps,
26
+ instanceUid,
27
+ iconAndTextsRegionIsFocused,
28
+ showFocusRingAroundAll,
29
+ hideFocusRingAroundAll
18
30
  }),
19
31
  [
20
32
  propsWithDefault,
21
33
  xstyledProps,
22
- instanceUid
23
- // eventHandlers,
34
+ globalProps,
35
+ instanceUid,
36
+ iconAndTextsRegionIsFocused,
37
+ showFocusRingAroundAll,
38
+ hideFocusRingAroundAll
24
39
  ]
25
40
  );
26
41
  };
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../src/config/useCardNavigation.ts"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { useGetXstyledProps, useMemoMergePropsWithDefault } from '@elliemae/ds-props-helpers';\nimport { uid } from 'uid';\nimport { type DSCardNavigationT, DSCardNavigationPropTypes, defaultProps } from '../react-desc-prop-types.js';\nimport { useValidateProps } from './useValidateProps.js';\n\nexport interface CardNavigationCTX {\n propsWithDefault: DSCardNavigationT.InternalProps;\n xstyledProps: ReturnType<typeof useGetXstyledProps>;\n instanceUid: string;\n}\n\nexport const useCardNavigation = (propsFromUser: DSCardNavigationT.Props) => {\n // =============================================================================\n // MERGE WITH DEFAULT AND VALIDATE PROPS\n // =============================================================================\n const propsWithDefault = useMemoMergePropsWithDefault<DSCardNavigationT.InternalProps>(propsFromUser, defaultProps);\n useValidateProps(propsWithDefault, DSCardNavigationPropTypes);\n // =============================================================================\n // XSTYLED PROPS\n // =============================================================================\n const xstyledProps = useGetXstyledProps(propsWithDefault);\n // =============================================================================\n // AD HOC PER COMPONENT LOGIC\n // =============================================================================\n // custom code goes here, this is an example\n const instanceUid = React.useMemo(() => `ds-card-navigation-${uid(5)}`, []);\n // =============================================================================\n // HELPERS HOOKS CONFIGS\n // =============================================================================\n // const eventHandlers = useEventHandlers({ propsWithDefault, instanceUid }); // <-- complex logic should be made atomics this way\n\n return React.useMemo(\n () => ({\n propsWithDefault,\n xstyledProps,\n instanceUid,\n // ...eventHandlers,\n }),\n [\n propsWithDefault,\n xstyledProps,\n instanceUid,\n // eventHandlers,\n ],\n );\n};\n"],
5
- "mappings": "AAAA,YAAY,WAAW;ACAvB,OAAOA,YAAW;AAClB,SAAS,oBAAoB,oCAAoC;AACjE,SAAS,WAAW;AACpB,SAAiC,2BAA2B,oBAAoB;AAChF,SAAS,wBAAwB;AAQ1B,MAAM,oBAAoB,CAAC,kBAA2C;AAI3E,QAAM,mBAAmB,6BAA8D,eAAe,YAAY;AAClH,mBAAiB,kBAAkB,yBAAyB;AAI5D,QAAM,eAAe,mBAAmB,gBAAgB;AAKxD,QAAM,cAAcA,OAAM,QAAQ,MAAM,sBAAsB,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC;AAM1E,SAAOA,OAAM;AAAA,IACX,OAAO;AAAA,MACL;AAAA,MACA;AAAA,MACA;AAAA;AAAA,IAEF;AAAA,IACA;AAAA,MACE;AAAA,MACA;AAAA,MACA;AAAA;AAAA,IAEF;AAAA,EACF;AACF;",
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { useGetXstyledProps, useMemoMergePropsWithDefault, useGetGlobalAttributes } from '@elliemae/ds-props-helpers';\nimport { uid } from 'uid';\nimport { type DSCardNavigationT, DSCardNavigationPropTypes, defaultProps } from '../react-desc-prop-types.js';\nimport { useValidateProps } from './useValidateProps.js';\n\nexport interface CardNavigationCTX {\n propsWithDefault: DSCardNavigationT.InternalProps;\n xstyledProps: ReturnType<typeof useGetXstyledProps>;\n globalProps: ReturnType<typeof useGetGlobalAttributes>;\n instanceUid: string;\n iconAndTextsRegionIsFocused: boolean;\n showFocusRingAroundAll: React.FocusEventHandler<HTMLDivElement>;\n hideFocusRingAroundAll: React.FocusEventHandler<HTMLDivElement>;\n}\n\nexport const useCardNavigation = (propsFromUser: DSCardNavigationT.Props): CardNavigationCTX => {\n // =============================================================================\n // MERGE WITH DEFAULT AND VALIDATE PROPS\n // =============================================================================\n const propsWithDefault = useMemoMergePropsWithDefault<DSCardNavigationT.InternalProps>(propsFromUser, defaultProps);\n useValidateProps(propsWithDefault, DSCardNavigationPropTypes);\n // =============================================================================\n // GLOBAL ATTRIBUTES & XSTYLED PROPS\n // =============================================================================\n // exclude `title` AND `type` as they are reused reserved keyword from global props,\n // we intend to \"consume\" those props, not \"spread\" in the html\n const { title, type, ...globalPropsWithoutReusedReservedKeywords } = propsWithDefault;\n const globalProps = useGetGlobalAttributes(globalPropsWithoutReusedReservedKeywords);\n const xstyledProps = useGetXstyledProps(propsWithDefault);\n // =============================================================================\n // AD HOC PER COMPONENT LOGIC\n // =============================================================================\n const instanceUid = React.useMemo(() => `ds-card-navigation-${uid(5)}`, []);\n const [iconAndTextsRegionIsFocused, setIconAndTextsRegionIsFocused] = React.useState(false);\n const showFocusRingAroundAll = React.useCallback<React.FocusEventHandler<HTMLDivElement>>(() => {\n setIconAndTextsRegionIsFocused(true);\n }, []);\n const hideFocusRingAroundAll = React.useCallback<React.FocusEventHandler<HTMLDivElement>>(() => {\n setIconAndTextsRegionIsFocused(false);\n }, []);\n\n return React.useMemo(\n () => ({\n propsWithDefault,\n xstyledProps,\n globalProps,\n instanceUid,\n iconAndTextsRegionIsFocused,\n showFocusRingAroundAll,\n hideFocusRingAroundAll,\n }),\n [\n propsWithDefault,\n xstyledProps,\n globalProps,\n instanceUid,\n iconAndTextsRegionIsFocused,\n showFocusRingAroundAll,\n hideFocusRingAroundAll,\n ],\n );\n};\n"],
5
+ "mappings": "AAAA,YAAY,WAAW;ACAvB,OAAOA,YAAW;AAClB,SAAS,oBAAoB,8BAA8B,8BAA8B;AACzF,SAAS,WAAW;AACpB,SAAiC,2BAA2B,oBAAoB;AAChF,SAAS,wBAAwB;AAY1B,MAAM,oBAAoB,CAAC,kBAA8D;AAI9F,QAAM,mBAAmB,6BAA8D,eAAe,YAAY;AAClH,mBAAiB,kBAAkB,yBAAyB;AAM5D,QAAM,EAAE,OAAO,MAAM,GAAG,yCAAyC,IAAI;AACrE,QAAM,cAAc,uBAAuB,wCAAwC;AACnF,QAAM,eAAe,mBAAmB,gBAAgB;AAIxD,QAAM,cAAcA,OAAM,QAAQ,MAAM,sBAAsB,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC;AAC1E,QAAM,CAAC,6BAA6B,8BAA8B,IAAIA,OAAM,SAAS,KAAK;AAC1F,QAAM,yBAAyBA,OAAM,YAAqD,MAAM;AAC9F,mCAA+B,IAAI;AAAA,EACrC,GAAG,CAAC,CAAC;AACL,QAAM,yBAAyBA,OAAM,YAAqD,MAAM;AAC9F,mCAA+B,KAAK;AAAA,EACtC,GAAG,CAAC,CAAC;AAEL,SAAOA,OAAM;AAAA,IACX,OAAO;AAAA,MACL;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAAA,IACA;AAAA,MACE;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAAA,EACF;AACF;",
6
6
  "names": ["React"]
7
7
  }
@@ -6,11 +6,20 @@ const CARD_NAVIGATION_SLOTS = {
6
6
  TITLE: "title",
7
7
  ACTIONS: "actions",
8
8
  TYPE: "type",
9
- CENTRAL_CONTENT: "central-content"
9
+ CENTRAL_CONTENT: "central-content",
10
+ INTERACTIVE_ELEMENT_REGION: "interactive-element-region",
11
+ DESCRIPTION_TEXT: "description-text",
12
+ TITLE_TYPOGRAPHY: "title-typography",
13
+ TITLE_WRAPPER: "title-wrapper",
14
+ CONTENT: "content",
15
+ BUTTON_WRAPPER: "button-wrapper",
16
+ ACTION_BUTTON: "action-button"
10
17
  };
11
18
  const CARD_NAVIGATION_DATA_TESTID = {
12
19
  ...slotObjectToDataTestIds(DSCardNavigationName, CARD_NAVIGATION_SLOTS),
13
- DESCRIPTION_TEXT: "ds-card-navigation--description"
20
+ DESCRIPTION_TEXT: "ds-card-navigation--description",
21
+ TITLE_TYPOGRAPHY: "ds-typography-element",
22
+ ACTION_BUTTON: "ds-button"
14
23
  };
15
24
  const CardNavigationTypes = {
16
25
  BORROWER: "borrower",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../src/constants/index.ts"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { slotObjectToDataTestIds } from '@elliemae/ds-system';\n\nexport const DSCardNavigationName = 'DSCardnavigation';\n\n// we are naming this with the ${component_name}_slots convention to namespace & avoid errors on duplicate exports variables in aggregators\nexport const CARD_NAVIGATION_SLOTS = {\n ROOT: 'root',\n TITLE: 'title',\n ACTIONS: 'actions',\n TYPE: 'type',\n CENTRAL_CONTENT: 'central-content',\n} as const;\n\n// we are naming this with the ${component_name}_data_testid convention to namespace & avoid errors on duplicate exports variables in aggregators\nexport const CARD_NAVIGATION_DATA_TESTID = {\n ...slotObjectToDataTestIds(DSCardNavigationName, CARD_NAVIGATION_SLOTS),\n DESCRIPTION_TEXT: 'ds-card-navigation--description',\n};\n\nexport const CardNavigationTypes = {\n BORROWER: 'borrower',\n FINANCIAL: 'financial',\n LOAN: 'loan',\n REGULATORY: 'regulatory',\n} as const;\n\nexport const CardNavigationTypesValues = Object.values(CardNavigationTypes);\n"],
5
- "mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,+BAA+B;AAEjC,MAAM,uBAAuB;AAG7B,MAAM,wBAAwB;AAAA,EACnC,MAAM;AAAA,EACN,OAAO;AAAA,EACP,SAAS;AAAA,EACT,MAAM;AAAA,EACN,iBAAiB;AACnB;AAGO,MAAM,8BAA8B;AAAA,EACzC,GAAG,wBAAwB,sBAAsB,qBAAqB;AAAA,EACtE,kBAAkB;AACpB;AAEO,MAAM,sBAAsB;AAAA,EACjC,UAAU;AAAA,EACV,WAAW;AAAA,EACX,MAAM;AAAA,EACN,YAAY;AACd;AAEO,MAAM,4BAA4B,OAAO,OAAO,mBAAmB;",
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { slotObjectToDataTestIds } from '@elliemae/ds-system';\n\nexport const DSCardNavigationName = 'DSCardnavigation';\n\n// we are naming this with the ${component_name}_slots convention to namespace & avoid errors on duplicate exports variables in aggregators\nexport const CARD_NAVIGATION_SLOTS = {\n ROOT: 'root',\n TITLE: 'title',\n ACTIONS: 'actions',\n TYPE: 'type',\n CENTRAL_CONTENT: 'central-content',\n INTERACTIVE_ELEMENT_REGION: 'interactive-element-region',\n DESCRIPTION_TEXT: 'description-text',\n TITLE_TYPOGRAPHY: 'title-typography',\n TITLE_WRAPPER: 'title-wrapper',\n CONTENT: 'content',\n BUTTON_WRAPPER: 'button-wrapper',\n ACTION_BUTTON: 'action-button',\n} as const;\n\n// we are naming this with the ${component_name}_data_testid convention to namespace & avoid errors on duplicate exports variables in aggregators\nexport const CARD_NAVIGATION_DATA_TESTID = {\n ...slotObjectToDataTestIds(DSCardNavigationName, CARD_NAVIGATION_SLOTS),\n DESCRIPTION_TEXT: 'ds-card-navigation--description',\n TITLE_TYPOGRAPHY: 'ds-typography-element',\n ACTION_BUTTON: 'ds-button',\n};\n\nexport const CardNavigationTypes = {\n BORROWER: 'borrower',\n FINANCIAL: 'financial',\n LOAN: 'loan',\n REGULATORY: 'regulatory',\n} as const;\n\nexport const CardNavigationTypesValues = Object.values(CardNavigationTypes);\n"],
5
+ "mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,+BAA+B;AAEjC,MAAM,uBAAuB;AAG7B,MAAM,wBAAwB;AAAA,EACnC,MAAM;AAAA,EACN,OAAO;AAAA,EACP,SAAS;AAAA,EACT,MAAM;AAAA,EACN,iBAAiB;AAAA,EACjB,4BAA4B;AAAA,EAC5B,kBAAkB;AAAA,EAClB,kBAAkB;AAAA,EAClB,eAAe;AAAA,EACf,SAAS;AAAA,EACT,gBAAgB;AAAA,EAChB,eAAe;AACjB;AAGO,MAAM,8BAA8B;AAAA,EACzC,GAAG,wBAAwB,sBAAsB,qBAAqB;AAAA,EACtE,kBAAkB;AAAA,EAClB,kBAAkB;AAAA,EAClB,eAAe;AACjB;AAEO,MAAM,sBAAsB;AAAA,EACjC,UAAU;AAAA,EACV,WAAW;AAAA,EACX,MAAM;AAAA,EACN,YAAY;AACd;AAEO,MAAM,4BAA4B,OAAO,OAAO,mBAAmB;",
6
6
  "names": []
7
7
  }
package/dist/esm/index.js CHANGED
@@ -5,7 +5,8 @@ import {
5
5
  CARD_NAVIGATION_SLOTS,
6
6
  CARD_NAVIGATION_DATA_TESTID,
7
7
  CardNavigationTypesValues,
8
- CardNavigationTypes
8
+ CardNavigationTypes,
9
+ DSCardNavigationName
9
10
  } from "./constants/index.js";
10
11
  var index_default = DSCardNavigation;
11
12
  export {
@@ -14,6 +15,7 @@ export {
14
15
  CardNavigationTypes,
15
16
  CardNavigationTypesValues,
16
17
  DSCardNavigation2 as DSCardNavigation,
18
+ DSCardNavigationName,
17
19
  DSCardNavigationWithSchema,
18
20
  index_default as default
19
21
  };
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../src/index.ts"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "// this is a workaround to typescript error TS2742\n// https://github.com/microsoft/TypeScript/issues/47663\nimport { DSCardNavigation } from './DSCardNavigation.js';\nimport type {} from '@xstyled/system';\nexport { DSCardNavigation, DSCardNavigationWithSchema } from './DSCardNavigation.js';\nexport { type DSCardNavigationT } from './react-desc-prop-types.js';\nexport {\n CARD_NAVIGATION_SLOTS,\n CARD_NAVIGATION_DATA_TESTID,\n CardNavigationTypesValues,\n CardNavigationTypes,\n} from './constants/index.js';\n\nexport default DSCardNavigation;\n"],
5
- "mappings": "AAAA,YAAY,WAAW;ACEvB,SAAS,wBAAwB;AAEjC,SAAS,oBAAAA,mBAAkB,kCAAkC;AAE7D;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAEP,IAAO,gBAAQ;",
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "// this is a workaround to typescript error TS2742\n// https://github.com/microsoft/TypeScript/issues/47663\nimport { DSCardNavigation } from './DSCardNavigation.js';\nimport type {} from '@xstyled/system';\nexport { DSCardNavigation, DSCardNavigationWithSchema } from './DSCardNavigation.js';\nexport { type DSCardNavigationT } from './react-desc-prop-types.js';\nexport {\n CARD_NAVIGATION_SLOTS,\n CARD_NAVIGATION_DATA_TESTID,\n CardNavigationTypesValues,\n CardNavigationTypes,\n DSCardNavigationName,\n} from './constants/index.js';\n\nexport default DSCardNavigation;\n"],
5
+ "mappings": "AAAA,YAAY,WAAW;ACEvB,SAAS,wBAAwB;AAEjC,SAAS,oBAAAA,mBAAkB,kCAAkC;AAE7D;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAEP,IAAO,gBAAQ;",
6
6
  "names": ["DSCardNavigation"]
7
7
  }