@elliemae/ds-card-navigation 3.52.0-rc.9 → 3.52.0
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 +46 -52
- package/dist/cjs/DSCardNavigation.js.map +2 -2
- package/dist/cjs/DescriptionComponent.js +79 -0
- package/dist/cjs/DescriptionComponent.js.map +7 -0
- package/dist/cjs/TitleComponent.js +51 -0
- package/dist/cjs/TitleComponent.js.map +7 -0
- package/dist/cjs/config/useCardNavigation.js +60 -0
- package/dist/cjs/config/useCardNavigation.js.map +7 -0
- package/dist/cjs/{components/types.js → config/useValidateProps.js} +9 -12
- package/dist/cjs/config/useValidateProps.js.map +7 -0
- package/dist/cjs/constants/index.js +59 -0
- package/dist/cjs/constants/index.js.map +7 -0
- package/dist/cjs/index.js +17 -2
- package/dist/cjs/index.js.map +4 -4
- package/dist/cjs/react-desc-prop-types.js +68 -0
- package/dist/cjs/react-desc-prop-types.js.map +7 -0
- package/dist/cjs/style.js +35 -15
- package/dist/cjs/style.js.map +2 -2
- package/dist/cjs/tests/overflow/DSCardNavigation.overflow.test.playwright.js +75 -0
- package/dist/cjs/tests/overflow/DSCardNavigation.overflow.test.playwright.js.map +7 -0
- package/dist/cjs/tests/overflow/DSCardNavigationOverflowTestRenderer.js +49 -0
- package/dist/cjs/tests/overflow/DSCardNavigationOverflowTestRenderer.js.map +7 -0
- package/dist/cjs/tests/wraptext/DSCardNavigation.wrapText.test.playwright.js +63 -0
- package/dist/cjs/tests/wraptext/DSCardNavigation.wrapText.test.playwright.js.map +7 -0
- package/dist/cjs/tests/wraptext/DSCardNavigationWrapTextTestRenderer.js +47 -0
- package/dist/cjs/tests/wraptext/DSCardNavigationWrapTextTestRenderer.js.map +7 -0
- package/dist/cjs/typescript-testing/typescript-card-navigation-valid.js +192 -0
- package/dist/cjs/typescript-testing/typescript-card-navigation-valid.js.map +7 -0
- package/dist/esm/DSCardNavigation.js +53 -61
- package/dist/esm/DSCardNavigation.js.map +2 -2
- package/dist/esm/DescriptionComponent.js +49 -0
- package/dist/esm/DescriptionComponent.js.map +7 -0
- package/dist/esm/TitleComponent.js +21 -0
- package/dist/esm/TitleComponent.js.map +7 -0
- package/dist/esm/config/useCardNavigation.js +30 -0
- package/dist/esm/config/useCardNavigation.js.map +7 -0
- package/dist/esm/config/useValidateProps.js +10 -0
- package/dist/esm/config/useValidateProps.js.map +7 -0
- package/dist/esm/constants/index.js +29 -0
- package/dist/esm/constants/index.js.map +7 -0
- package/dist/esm/index.js +18 -1
- package/dist/esm/index.js.map +4 -4
- package/dist/esm/react-desc-prop-types.js +43 -0
- package/dist/esm/react-desc-prop-types.js.map +7 -0
- package/dist/esm/style.js +35 -15
- package/dist/esm/style.js.map +2 -2
- package/dist/esm/tests/overflow/DSCardNavigation.overflow.test.playwright.js +52 -0
- package/dist/esm/tests/overflow/DSCardNavigation.overflow.test.playwright.js.map +7 -0
- package/dist/esm/tests/overflow/DSCardNavigationOverflowTestRenderer.js +19 -0
- package/dist/esm/tests/overflow/DSCardNavigationOverflowTestRenderer.js.map +7 -0
- package/dist/esm/tests/wraptext/DSCardNavigation.wrapText.test.playwright.js +40 -0
- package/dist/esm/tests/wraptext/DSCardNavigation.wrapText.test.playwright.js.map +7 -0
- package/dist/esm/tests/wraptext/DSCardNavigationWrapTextTestRenderer.js +17 -0
- package/dist/esm/tests/wraptext/DSCardNavigationWrapTextTestRenderer.js.map +7 -0
- package/dist/esm/typescript-testing/typescript-card-navigation-valid.js +162 -0
- package/dist/esm/typescript-testing/typescript-card-navigation-valid.js.map +7 -0
- package/dist/types/DSCardNavigation.d.ts +5 -28
- package/dist/types/DescriptionComponent.d.ts +4 -0
- package/dist/types/TitleComponent.d.ts +4 -0
- package/dist/types/config/useCardNavigation.d.ts +12 -0
- package/dist/types/config/useValidateProps.d.ts +3 -0
- package/dist/types/constants/index.d.ts +18 -0
- package/dist/types/index.d.ts +5 -1
- package/dist/types/react-desc-prop-types.d.ts +34 -0
- package/dist/types/style.d.ts +17 -4
- package/dist/types/tests/DSCardNavigation.data-testId.test.d.ts +1 -0
- package/dist/types/tests/DSCardNavigation.defaultProps.test.d.ts +1 -0
- package/dist/types/tests/DSCardNavigation.events.test.d.ts +1 -0
- package/dist/types/tests/DSCardNavigation.exports.test.d.ts +1 -0
- package/dist/types/tests/DSCardNavigation.keyboard.test.d.ts +1 -0
- package/dist/types/tests/DSCardNavigation.pui-enumaratedTypes.test.d.ts +1 -0
- package/dist/types/tests/overflow/DSCardNavigation.overflow.test.playwright.d.ts +1 -0
- package/dist/types/tests/overflow/DSCardNavigationOverflowTestRenderer.d.ts +2 -0
- package/dist/types/tests/wraptext/DSCardNavigation.wrapText.test.playwright.d.ts +1 -0
- package/dist/types/tests/wraptext/DSCardNavigationWrapTextTestRenderer.d.ts +2 -0
- package/dist/types/typescript-testing/typescript-card-navigation-valid.d.ts +2 -0
- package/package.json +19 -14
- package/dist/cjs/components/types.js.map +0 -7
- package/dist/esm/components/types.js +0 -13
- package/dist/esm/components/types.js.map +0 -7
- package/dist/types/components/types.d.ts +0 -7
- /package/dist/types/tests/{DSCardNavigation.axe.test.d.ts → DSCardNavigation.a11y.test.d.ts} +0 -0
- /package/dist/types/tests/{DSCardNavigation.test.d.ts → DSCardNavigation.api.test.d.ts} +0 -0
|
@@ -28,65 +28,59 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
28
28
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
29
|
var DSCardNavigation_exports = {};
|
|
30
30
|
__export(DSCardNavigation_exports, {
|
|
31
|
-
CardNavigationTypes: () => import_types.CardNavigationTypes,
|
|
32
|
-
CardNavigationTypesValues: () => import_types.CardNavigationTypesValues,
|
|
33
31
|
DSCardNavigation: () => DSCardNavigation,
|
|
34
|
-
DSCardNavigationWithSchema: () => DSCardNavigationWithSchema
|
|
35
|
-
default: () => DSCardNavigation_default
|
|
32
|
+
DSCardNavigationWithSchema: () => DSCardNavigationWithSchema
|
|
36
33
|
});
|
|
37
34
|
module.exports = __toCommonJS(DSCardNavigation_exports);
|
|
38
35
|
var React = __toESM(require("react"));
|
|
39
36
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
40
|
-
var import_ds_props_helpers = require("@elliemae/ds-props-helpers");
|
|
41
|
-
var import_ds_truncated_tooltip_text = require("@elliemae/ds-truncated-tooltip-text");
|
|
42
|
-
var import_ds_icons = require("@elliemae/ds-icons");
|
|
43
37
|
var import_ds_button_v2 = require("@elliemae/ds-button-v2");
|
|
38
|
+
var import_ds_icons = require("@elliemae/ds-icons");
|
|
39
|
+
var import_ds_props_helpers = require("@elliemae/ds-props-helpers");
|
|
40
|
+
var import_react = require("react");
|
|
41
|
+
var import_useCardNavigation = require("./config/useCardNavigation.js");
|
|
42
|
+
var import_constants = require("./constants/index.js");
|
|
43
|
+
var import_react_desc_prop_types = require("./react-desc-prop-types.js");
|
|
44
44
|
var import_style = require("./style.js");
|
|
45
|
-
var
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
{
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
import_ds_props_helpers.PropTypes.shape({
|
|
83
|
-
icon: import_ds_props_helpers.PropTypes.element,
|
|
84
|
-
onClick: import_ds_props_helpers.PropTypes.func
|
|
85
|
-
})
|
|
86
|
-
).description("card navigation actions array")
|
|
45
|
+
var import_TitleComponent = require("./TitleComponent.js");
|
|
46
|
+
var import_DescriptionComponent = require("./DescriptionComponent.js");
|
|
47
|
+
const mainIconColor = ["neutral", "0"];
|
|
48
|
+
const DSCardNavigation = (props) => {
|
|
49
|
+
const { propsWithDefault, xstyledProps, instanceUid } = (0, import_useCardNavigation.useCardNavigation)(props);
|
|
50
|
+
const { containerProps, title, description, type, Icon, actions, wrapText, ...rest } = propsWithDefault;
|
|
51
|
+
const cols = (0, import_react.useMemo)(() => actions.length > 0 ? ["1fr", "min-content"] : ["1fr"], [actions.length]);
|
|
52
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_style.StyledCardNavigationBoxWrapper, { tabIndex: 0, ...rest, ...xstyledProps, ...containerProps, children: [
|
|
53
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_style.StyledCardNavigationIcon, { role: "button", "aria-label": title, $type: type, "data-type": type, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Icon, { size: "l", color: [...mainIconColor] }) }),
|
|
54
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_style.StyledCardNavigationCentralContent, { cols, children: [
|
|
55
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_style.StyledCardNavigationContent, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_style.StyledCardNavigationContentTitleWrapper, { children: [
|
|
56
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_TitleComponent.TitleComponent, { title, wrapText }),
|
|
57
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_DescriptionComponent.DescriptionComponent, { description, wrapText })
|
|
58
|
+
] }) }),
|
|
59
|
+
actions.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_style.StyledCardNavigationActions, { children: actions.map(
|
|
60
|
+
({
|
|
61
|
+
icon = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_icons.MoreOptionsVert, { "aria-label": "More options" }),
|
|
62
|
+
Icon: ActionIcon,
|
|
63
|
+
onClick,
|
|
64
|
+
...unexpectedButPreviouslySupportedOtherProps
|
|
65
|
+
}, index) => (
|
|
66
|
+
// eslint-disable-next-line react/no-array-index-key
|
|
67
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_style.StyledCardNavigationAction, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
68
|
+
import_ds_button_v2.DSButtonV2,
|
|
69
|
+
{
|
|
70
|
+
onClick,
|
|
71
|
+
"aria-label": "More options",
|
|
72
|
+
...unexpectedButPreviouslySupportedOtherProps,
|
|
73
|
+
buttonType: import_ds_button_v2.BUTTON_TYPES.ICON,
|
|
74
|
+
size: import_ds_button_v2.BUTTON_SIZES.L,
|
|
75
|
+
children: ActionIcon ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ActionIcon, {}) : icon
|
|
76
|
+
}
|
|
77
|
+
) }, `${instanceUid}-${index}`)
|
|
78
|
+
)
|
|
79
|
+
) })
|
|
80
|
+
] })
|
|
81
|
+
] });
|
|
87
82
|
};
|
|
88
|
-
DSCardNavigation.displayName =
|
|
83
|
+
DSCardNavigation.displayName = import_constants.DSCardNavigationName;
|
|
89
84
|
const DSCardNavigationWithSchema = (0, import_ds_props_helpers.describe)(DSCardNavigation);
|
|
90
|
-
DSCardNavigationWithSchema.propTypes =
|
|
91
|
-
var DSCardNavigation_default = DSCardNavigation;
|
|
85
|
+
DSCardNavigationWithSchema.propTypes = import_react_desc_prop_types.DSCardNavigationPropTypesSchema;
|
|
92
86
|
//# sourceMappingURL=DSCardNavigation.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/DSCardNavigation.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["import
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;
|
|
4
|
+
"sourcesContent": ["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", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;AD8Bf;AA9BR,0BAAuD;AACvD,sBAAgC;AAChC,8BAAyB;AACzB,mBAA+B;AAC/B,+BAAkC;AAClC,uBAAqC;AACrC,mCAAwE;AACxE,mBAQO;AACP,4BAA+B;AAC/B,kCAAqC;AAErC,MAAM,gBAAgB,CAAC,WAAW,GAAG;AAErC,MAAM,mBAAsD,CAAC,UAAU;AACrE,QAAM,EAAE,kBAAkB,cAAc,YAAY,QAAI,4CAAkB,KAAK;AAC/E,QAAM,EAAE,gBAAgB,OAAO,aAAa,MAAM,MAAM,SAAS,UAAU,GAAG,KAAK,IAAI;AAEvF,QAAM,WAAO,sBAAQ,MAAO,QAAQ,SAAS,IAAI,CAAC,OAAO,aAAa,IAAI,CAAC,KAAK,GAAI,CAAC,QAAQ,MAAM,CAAC;AAEpG,SACE,6CAAC,+CAA+B,UAAU,GAAI,GAAG,MAAO,GAAG,cAAe,GAAG,gBAC3E;AAAA,gDAAC,yCAAyB,MAAK,UAAS,cAAY,OAAO,OAAO,MAAM,aAAW,MACjF,sDAAC,QAAK,MAAK,KAAI,OAAO,CAAC,GAAG,aAAa,GAAG,GAC5C;AAAA,IAEA,6CAAC,mDAAmC,MAClC;AAAA,kDAAC,4CACC,uDAAC,wDACC;AAAA,oDAAC,wCAAe,OAAc,UAAoB;AAAA,QAClD,4CAAC,oDAAqB,aAA0B,UAAoB;AAAA,SACtE,GACF;AAAA,MAEC,QAAQ,SAAS,KAChB,4CAAC,4CACE,kBAAQ;AAAA,QACP,CACE;AAAA,UACE,OAAO,4CAAC,mCAAgB,cAAW,gBAAe;AAAA,UAClD,MAAM;AAAA,UACN;AAAA,UACA,GAAG;AAAA,QACL,GACA;AAAA;AAAA,UAGA,4CAAC,2CACC;AAAA,YAAC;AAAA;AAAA,cACC;AAAA,cACA,cAAW;AAAA,cACV,GAAG;AAAA,cACJ,YAAY,iCAAa;AAAA,cACzB,MAAM,iCAAa;AAAA,cAElB,uBAAa,4CAAC,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,iCAA6B,kCAAS,gBAAgB;AAC5D,2BAA2B,YAAY;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -0,0 +1,79 @@
|
|
|
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
|
|
@@ -0,0 +1,7 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
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
|
|
@@ -0,0 +1,7 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1,60 @@
|
|
|
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 useCardNavigation_exports = {};
|
|
30
|
+
__export(useCardNavigation_exports, {
|
|
31
|
+
useCardNavigation: () => useCardNavigation
|
|
32
|
+
});
|
|
33
|
+
module.exports = __toCommonJS(useCardNavigation_exports);
|
|
34
|
+
var React = __toESM(require("react"));
|
|
35
|
+
var import_react = __toESM(require("react"));
|
|
36
|
+
var import_ds_props_helpers = require("@elliemae/ds-props-helpers");
|
|
37
|
+
var import_uid = require("uid");
|
|
38
|
+
var import_react_desc_prop_types = require("../react-desc-prop-types.js");
|
|
39
|
+
var import_useValidateProps = require("./useValidateProps.js");
|
|
40
|
+
const useCardNavigation = (propsFromUser) => {
|
|
41
|
+
const propsWithDefault = (0, import_ds_props_helpers.useMemoMergePropsWithDefault)(propsFromUser, import_react_desc_prop_types.defaultProps);
|
|
42
|
+
(0, import_useValidateProps.useValidateProps)(propsWithDefault, import_react_desc_prop_types.DSCardNavigationPropTypes);
|
|
43
|
+
const xstyledProps = (0, import_ds_props_helpers.useGetXstyledProps)(propsWithDefault);
|
|
44
|
+
const instanceUid = import_react.default.useMemo(() => `ds-card-navigation-${(0, import_uid.uid)(5)}`, []);
|
|
45
|
+
return import_react.default.useMemo(
|
|
46
|
+
() => ({
|
|
47
|
+
propsWithDefault,
|
|
48
|
+
xstyledProps,
|
|
49
|
+
instanceUid
|
|
50
|
+
// ...eventHandlers,
|
|
51
|
+
}),
|
|
52
|
+
[
|
|
53
|
+
propsWithDefault,
|
|
54
|
+
xstyledProps,
|
|
55
|
+
instanceUid
|
|
56
|
+
// eventHandlers,
|
|
57
|
+
]
|
|
58
|
+
);
|
|
59
|
+
};
|
|
60
|
+
//# sourceMappingURL=useCardNavigation.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/config/useCardNavigation.ts", "../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
+
"sourcesContent": ["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", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,mBAAkB;AAClB,8BAAiE;AACjE,iBAAoB;AACpB,mCAAgF;AAChF,8BAAiC;AAQ1B,MAAM,oBAAoB,CAAC,kBAA2C;AAI3E,QAAM,uBAAmB,sDAA8D,eAAe,yCAAY;AAClH,gDAAiB,kBAAkB,sDAAyB;AAI5D,QAAM,mBAAe,4CAAmB,gBAAgB;AAKxD,QAAM,cAAc,aAAAA,QAAM,QAAQ,MAAM,0BAAsB,gBAAI,CAAC,CAAC,IAAI,CAAC,CAAC;AAM1E,SAAO,aAAAA,QAAM;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;",
|
|
6
|
+
"names": ["React"]
|
|
7
|
+
}
|
|
@@ -26,18 +26,15 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
26
26
|
mod
|
|
27
27
|
));
|
|
28
28
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
-
var
|
|
30
|
-
__export(
|
|
31
|
-
|
|
32
|
-
CardNavigationTypesValues: () => CardNavigationTypesValues
|
|
29
|
+
var useValidateProps_exports = {};
|
|
30
|
+
__export(useValidateProps_exports, {
|
|
31
|
+
useValidateProps: () => useValidateProps
|
|
33
32
|
});
|
|
34
|
-
module.exports = __toCommonJS(
|
|
33
|
+
module.exports = __toCommonJS(useValidateProps_exports);
|
|
35
34
|
var React = __toESM(require("react"));
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
REGULATORY: "regulatory"
|
|
35
|
+
var import_ds_props_helpers = require("@elliemae/ds-props-helpers");
|
|
36
|
+
var import_constants = require("../constants/index.js");
|
|
37
|
+
const useValidateProps = (props, propTypes) => {
|
|
38
|
+
(0, import_ds_props_helpers.useValidateTypescriptPropTypes)(props, propTypes, import_constants.DSCardNavigationName);
|
|
41
39
|
};
|
|
42
|
-
|
|
43
|
-
//# sourceMappingURL=types.js.map
|
|
40
|
+
//# sourceMappingURL=useValidateProps.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/config/useValidateProps.ts", "../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
+
"sourcesContent": ["import { useValidateTypescriptPropTypes } from '@elliemae/ds-props-helpers';\nimport type { ValidationMap } from '@elliemae/ds-props-helpers';\nimport { type DSCardNavigationT } from '../react-desc-prop-types.js';\nimport { DSCardNavigationName } from '../constants/index.js';\n\nexport const useValidateProps = (props: DSCardNavigationT.InternalProps, propTypes: ValidationMap<unknown>): void => {\n // we validate the \"required if\" via 'isRequiredIf from our custom PropTypes\n useValidateTypescriptPropTypes(props, propTypes, DSCardNavigationName);\n};\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,8BAA+C;AAG/C,uBAAqC;AAE9B,MAAM,mBAAmB,CAAC,OAAwC,cAA4C;AAEnH,8DAA+B,OAAO,WAAW,qCAAoB;AACvE;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,59 @@
|
|
|
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 constants_exports = {};
|
|
30
|
+
__export(constants_exports, {
|
|
31
|
+
CARD_NAVIGATION_DATA_TESTID: () => CARD_NAVIGATION_DATA_TESTID,
|
|
32
|
+
CARD_NAVIGATION_SLOTS: () => CARD_NAVIGATION_SLOTS,
|
|
33
|
+
CardNavigationTypes: () => CardNavigationTypes,
|
|
34
|
+
CardNavigationTypesValues: () => CardNavigationTypesValues,
|
|
35
|
+
DSCardNavigationName: () => DSCardNavigationName
|
|
36
|
+
});
|
|
37
|
+
module.exports = __toCommonJS(constants_exports);
|
|
38
|
+
var React = __toESM(require("react"));
|
|
39
|
+
var import_ds_system = require("@elliemae/ds-system");
|
|
40
|
+
const DSCardNavigationName = "DSCardnavigation";
|
|
41
|
+
const CARD_NAVIGATION_SLOTS = {
|
|
42
|
+
ROOT: "root",
|
|
43
|
+
TITLE: "title",
|
|
44
|
+
ACTIONS: "actions",
|
|
45
|
+
TYPE: "type",
|
|
46
|
+
CENTRAL_CONTENT: "central-content"
|
|
47
|
+
};
|
|
48
|
+
const CARD_NAVIGATION_DATA_TESTID = {
|
|
49
|
+
...(0, import_ds_system.slotObjectToDataTestIds)(DSCardNavigationName, CARD_NAVIGATION_SLOTS),
|
|
50
|
+
DESCRIPTION_TEXT: "ds-card-navigation--description"
|
|
51
|
+
};
|
|
52
|
+
const CardNavigationTypes = {
|
|
53
|
+
BORROWER: "borrower",
|
|
54
|
+
FINANCIAL: "financial",
|
|
55
|
+
LOAN: "loan",
|
|
56
|
+
REGULATORY: "regulatory"
|
|
57
|
+
};
|
|
58
|
+
const CardNavigationTypesValues = Object.values(CardNavigationTypes);
|
|
59
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/constants/index.ts", "../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
+
"sourcesContent": ["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", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,uBAAwC;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,OAAG,0CAAwB,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;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
package/dist/cjs/index.js
CHANGED
|
@@ -5,6 +5,10 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
|
5
5
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
6
|
var __getProtoOf = Object.getPrototypeOf;
|
|
7
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
|
+
};
|
|
8
12
|
var __copyProps = (to, from, except, desc) => {
|
|
9
13
|
if (from && typeof from === "object" || typeof from === "function") {
|
|
10
14
|
for (let key of __getOwnPropNames(from))
|
|
@@ -13,7 +17,6 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
13
17
|
}
|
|
14
18
|
return to;
|
|
15
19
|
};
|
|
16
|
-
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
17
20
|
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
18
21
|
// If the importer is in node compatibility mode or this is not an ESM
|
|
19
22
|
// file that has been converted to a CommonJS file using a Babel-
|
|
@@ -24,7 +27,19 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
24
27
|
));
|
|
25
28
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
26
29
|
var index_exports = {};
|
|
30
|
+
__export(index_exports, {
|
|
31
|
+
CARD_NAVIGATION_DATA_TESTID: () => import_constants.CARD_NAVIGATION_DATA_TESTID,
|
|
32
|
+
CARD_NAVIGATION_SLOTS: () => import_constants.CARD_NAVIGATION_SLOTS,
|
|
33
|
+
CardNavigationTypes: () => import_constants.CardNavigationTypes,
|
|
34
|
+
CardNavigationTypesValues: () => import_constants.CardNavigationTypesValues,
|
|
35
|
+
DSCardNavigation: () => import_DSCardNavigation2.DSCardNavigation,
|
|
36
|
+
DSCardNavigationWithSchema: () => import_DSCardNavigation2.DSCardNavigationWithSchema,
|
|
37
|
+
default: () => index_default
|
|
38
|
+
});
|
|
27
39
|
module.exports = __toCommonJS(index_exports);
|
|
28
40
|
var React = __toESM(require("react"));
|
|
29
|
-
|
|
41
|
+
var import_DSCardNavigation = require("./DSCardNavigation.js");
|
|
42
|
+
var import_DSCardNavigation2 = require("./DSCardNavigation.js");
|
|
43
|
+
var import_constants = require("./constants/index.js");
|
|
44
|
+
var index_default = import_DSCardNavigation.DSCardNavigation;
|
|
30
45
|
//# sourceMappingURL=index.js.map
|
package/dist/cjs/index.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../../src/index.
|
|
4
|
-
"sourcesContent": ["
|
|
5
|
-
"mappings": "
|
|
6
|
-
"names": []
|
|
3
|
+
"sources": ["../../src/index.ts", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
+
"sourcesContent": ["// 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", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADEvB,8BAAiC;AAEjC,IAAAA,2BAA6D;AAE7D,uBAKO;AAEP,IAAO,gBAAQ;",
|
|
6
|
+
"names": ["import_DSCardNavigation"]
|
|
7
7
|
}
|