@elliemae/ds-card-v2 3.21.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 (39) hide show
  1. package/dist/cjs/DSCardV2.js +100 -0
  2. package/dist/cjs/DSCardV2.js.map +7 -0
  3. package/dist/cjs/config/useCardV2.js +65 -0
  4. package/dist/cjs/config/useCardV2.js.map +7 -0
  5. package/dist/cjs/config/useValidateProps.js +40 -0
  6. package/dist/cjs/config/useValidateProps.js.map +7 -0
  7. package/dist/cjs/constants/index.js +55 -0
  8. package/dist/cjs/constants/index.js.map +7 -0
  9. package/dist/cjs/index.js +42 -0
  10. package/dist/cjs/index.js.map +7 -0
  11. package/dist/cjs/package.json +7 -0
  12. package/dist/cjs/react-desc-prop-types.js +66 -0
  13. package/dist/cjs/react-desc-prop-types.js.map +7 -0
  14. package/dist/cjs/styles.js +107 -0
  15. package/dist/cjs/styles.js.map +7 -0
  16. package/dist/esm/DSCardV2.js +79 -0
  17. package/dist/esm/DSCardV2.js.map +7 -0
  18. package/dist/esm/config/useCardV2.js +35 -0
  19. package/dist/esm/config/useCardV2.js.map +7 -0
  20. package/dist/esm/config/useValidateProps.js +10 -0
  21. package/dist/esm/config/useValidateProps.js.map +7 -0
  22. package/dist/esm/constants/index.js +25 -0
  23. package/dist/esm/constants/index.js.map +7 -0
  24. package/dist/esm/index.js +17 -0
  25. package/dist/esm/index.js.map +7 -0
  26. package/dist/esm/package.json +7 -0
  27. package/dist/esm/react-desc-prop-types.js +36 -0
  28. package/dist/esm/react-desc-prop-types.js.map +7 -0
  29. package/dist/esm/styles.js +77 -0
  30. package/dist/esm/styles.js.map +7 -0
  31. package/dist/types/config/useCardV2.d.ts +15 -0
  32. package/dist/types/config/useValidateProps.d.ts +3 -0
  33. package/dist/types/constants/index.d.ts +16 -0
  34. package/dist/types/index.d.ts +3 -0
  35. package/dist/types/react-desc-prop-types.d.ts +22 -0
  36. package/dist/types/styles.d.ts +13 -0
  37. package/dist/types/tests/DSCardV2.axe.test.d.ts +1 -0
  38. package/dist/types/tests/DSCardV2.test.d.ts +1 -0
  39. package/package.json +85 -0
@@ -0,0 +1,100 @@
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 DSCardV2_exports = {};
30
+ __export(DSCardV2_exports, {
31
+ DSCardV2: () => DSCardV2,
32
+ DSCardV2WithSchema: () => DSCardV2WithSchema
33
+ });
34
+ module.exports = __toCommonJS(DSCardV2_exports);
35
+ var React = __toESM(require("react"));
36
+ var import_jsx_runtime = require("react/jsx-runtime");
37
+ var import_ds_utilities = require("@elliemae/ds-utilities");
38
+ var import_react_desc_prop_types = require("./react-desc-prop-types.js");
39
+ var import_useCardV2 = require("./config/useCardV2.js");
40
+ var import_constants = require("./constants/index.js");
41
+ var import_ds_truncated_tooltip_text = __toESM(require("@elliemae/ds-truncated-tooltip-text"));
42
+ var import_ds_header = require("@elliemae/ds-header");
43
+ var import_styles = require("./styles.js");
44
+ const getCol = (rightAddon) => {
45
+ if (!rightAddon)
46
+ return ["1fr"];
47
+ return ["1fr", "auto"];
48
+ };
49
+ const DSCardV2 = (props) => {
50
+ const { propsWithDefault, globalProps, xstyledProps } = (0, import_useCardV2.useCardV2)(props);
51
+ const { hasBorder, title, leftAddon, rightAddon, description } = propsWithDefault;
52
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_truncated_tooltip_text.TooltipTextProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
53
+ import_styles.CardContainer,
54
+ {
55
+ "data-testid": import_constants.CARD_V2_DATA_TESTID.CARD_CONTAINER,
56
+ ...globalProps,
57
+ ...xstyledProps,
58
+ hasBorder,
59
+ cols: getCol(rightAddon),
60
+ children: [
61
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_styles.LeftSection, { children: [
62
+ leftAddon && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_styles.LeftAddon, { children: leftAddon }),
63
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
64
+ import_styles.MainSection,
65
+ {
66
+ style: {
67
+ maxWidth: leftAddon ? "calc(100% - 40px)" : "100%"
68
+ },
69
+ children: [
70
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
71
+ import_ds_header.DSHeader,
72
+ {
73
+ "data-testid": import_constants.CARD_V2_DATA_TESTID.CARD_HEADER,
74
+ fontSize: "16px",
75
+ fontWeight: "regular",
76
+ color: "neutral.800",
77
+ text: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_truncated_tooltip_text.default, { value: title })
78
+ }
79
+ ),
80
+ description && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_styles.Description, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_truncated_tooltip_text.default, { value: description }) })
81
+ ]
82
+ }
83
+ )
84
+ ] }),
85
+ Array.isArray(rightAddon) && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_styles.RightAddonSection, { children: [
86
+ rightAddon[0] ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_styles.RightAddon, { children: rightAddon[0] }) : null,
87
+ rightAddon[1] ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
88
+ rightAddon.length > 1 && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_styles.Separator, {}),
89
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_styles.RightAddon, { children: rightAddon[1] })
90
+ ] }) : null
91
+ ] })
92
+ ]
93
+ }
94
+ ) });
95
+ };
96
+ DSCardV2.propTypes = import_react_desc_prop_types.DSCardV2PropTypesSchema;
97
+ DSCardV2.displayName = import_constants.DSCardV2Name;
98
+ const DSCardV2WithSchema = (0, import_ds_utilities.describe)(DSCardV2);
99
+ DSCardV2WithSchema.propTypes = import_react_desc_prop_types.DSCardV2PropTypesSchema;
100
+ //# sourceMappingURL=DSCardV2.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/DSCardV2.tsx", "../../../../scripts/build/transpile/react-shim.js"],
4
+ "sourcesContent": ["import React from 'react';\nimport { describe } from '@elliemae/ds-utilities';\nimport { type DSCardV2T, DSCardV2PropTypesSchema } from './react-desc-prop-types.js';\nimport { useCardV2 } from './config/useCardV2.js';\nimport { DSCardV2Name, CARD_V2_DATA_TESTID } from './constants/index.js';\nimport DSTruncatedTooltipText, { TooltipTextProvider } from '@elliemae/ds-truncated-tooltip-text';\nimport { DSHeader } from '@elliemae/ds-header';\nimport {\n CardContainer,\n LeftSection,\n LeftAddon,\n MainSection,\n Description,\n RightAddonSection,\n RightAddon,\n Separator,\n} from './styles.js';\n\nconst getCol = (rightAddon: DSCardV2T.OptionalProps['rightAddon']) => {\n if (!rightAddon) return ['1fr'];\n return ['1fr', 'auto'];\n};\n\nconst DSCardV2: React.ComponentType<DSCardV2T.Props> = (props) => {\n const { propsWithDefault, globalProps, xstyledProps } = useCardV2(props);\n const { hasBorder, title, leftAddon, rightAddon, description } = propsWithDefault;\n return (\n <TooltipTextProvider>\n <CardContainer\n data-testid={CARD_V2_DATA_TESTID.CARD_CONTAINER} //we must keep this explicit to avoid the breaking changes\n {...globalProps}\n {...xstyledProps}\n hasBorder={hasBorder}\n cols={getCol(rightAddon)}\n >\n <LeftSection>\n {leftAddon && <LeftAddon>{leftAddon}</LeftAddon>}\n <MainSection\n style={{\n maxWidth: leftAddon ? 'calc(100% - 40px)' : '100%',\n }}\n >\n <DSHeader\n data-testid={CARD_V2_DATA_TESTID.CARD_HEADER} //we must keep this explicit to avoid the breaking changes\n fontSize=\"16px\"\n fontWeight=\"regular\"\n color=\"neutral.800\"\n text={<DSTruncatedTooltipText value={title} />}\n />\n {description && (\n <Description>\n <DSTruncatedTooltipText value={description} />\n </Description>\n )}\n </MainSection>\n </LeftSection>\n {Array.isArray(rightAddon) && (\n <RightAddonSection>\n {rightAddon[0] ? <RightAddon>{rightAddon[0]}</RightAddon> : null}\n {rightAddon[1] ? (\n <>\n {rightAddon.length > 1 && <Separator />}\n <RightAddon>{rightAddon[1]}</RightAddon>\n </>\n ) : null}\n </RightAddonSection>\n )}\n </CardContainer>\n </TooltipTextProvider>\n );\n};\n\nDSCardV2.propTypes = DSCardV2PropTypesSchema;\nDSCardV2.displayName = DSCardV2Name;\nconst DSCardV2WithSchema = describe(DSCardV2);\nDSCardV2WithSchema.propTypes = DSCardV2PropTypesSchema;\n\nexport { DSCardV2, DSCardV2WithSchema };\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADoCC;AAnCxB,0BAAyB;AACzB,mCAAwD;AACxD,uBAA0B;AAC1B,uBAAkD;AAClD,uCAA4D;AAC5D,uBAAyB;AACzB,oBASO;AAEP,MAAM,SAAS,CAAC,eAAsD;AACpE,MAAI,CAAC;AAAY,WAAO,CAAC,KAAK;AAC9B,SAAO,CAAC,OAAO,MAAM;AACvB;AAEA,MAAM,WAAiD,CAAC,UAAU;AAChE,QAAM,EAAE,kBAAkB,aAAa,aAAa,QAAI,4BAAU,KAAK;AACvE,QAAM,EAAE,WAAW,OAAO,WAAW,YAAY,YAAY,IAAI;AACjE,SACE,4CAAC,wDACC;AAAA,IAAC;AAAA;AAAA,MACC,eAAa,qCAAoB;AAAA,MAChC,GAAG;AAAA,MACH,GAAG;AAAA,MACJ;AAAA,MACA,MAAM,OAAO,UAAU;AAAA,MAEvB;AAAA,qDAAC,6BACE;AAAA,uBAAa,4CAAC,2BAAW,qBAAU;AAAA,UACpC;AAAA,YAAC;AAAA;AAAA,cACC,OAAO;AAAA,gBACL,UAAU,YAAY,sBAAsB;AAAA,cAC9C;AAAA,cAEA;AAAA;AAAA,kBAAC;AAAA;AAAA,oBACC,eAAa,qCAAoB;AAAA,oBACjC,UAAS;AAAA,oBACT,YAAW;AAAA,oBACX,OAAM;AAAA,oBACN,MAAM,4CAAC,iCAAAA,SAAA,EAAuB,OAAO,OAAO;AAAA;AAAA,gBAC9C;AAAA,gBACC,eACC,4CAAC,6BACC,sDAAC,iCAAAA,SAAA,EAAuB,OAAO,aAAa,GAC9C;AAAA;AAAA;AAAA,UAEJ;AAAA,WACF;AAAA,QACC,MAAM,QAAQ,UAAU,KACvB,6CAAC,mCACE;AAAA,qBAAW,CAAC,IAAI,4CAAC,4BAAY,qBAAW,CAAC,GAAE,IAAgB;AAAA,UAC3D,WAAW,CAAC,IACX,4EACG;AAAA,uBAAW,SAAS,KAAK,4CAAC,2BAAU;AAAA,YACrC,4CAAC,4BAAY,qBAAW,CAAC,GAAE;AAAA,aAC7B,IACE;AAAA,WACN;AAAA;AAAA;AAAA,EAEJ,GACF;AAEJ;AAEA,SAAS,YAAY;AACrB,SAAS,cAAc;AACvB,MAAM,yBAAqB,8BAAS,QAAQ;AAC5C,mBAAmB,YAAY;",
6
+ "names": ["DSTruncatedTooltipText"]
7
+ }
@@ -0,0 +1,65 @@
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 useCardV2_exports = {};
30
+ __export(useCardV2_exports, {
31
+ useCardV2: () => useCardV2
32
+ });
33
+ module.exports = __toCommonJS(useCardV2_exports);
34
+ var React = __toESM(require("react"));
35
+ var import_react = __toESM(require("react"));
36
+ var import_lodash = require("lodash");
37
+ var import_ds_utilities = require("@elliemae/ds-utilities");
38
+ var import_uid = require("uid");
39
+ var import_react_desc_prop_types = require("../react-desc-prop-types.js");
40
+ var import_useValidateProps = require("./useValidateProps.js");
41
+ const useCardV2 = (propsFromUser) => {
42
+ const propsWithDefault = (0, import_ds_utilities.useMemoMergePropsWithDefault)(propsFromUser, import_react_desc_prop_types.defaultProps);
43
+ (0, import_useValidateProps.useValidateProps)(propsWithDefault, import_react_desc_prop_types.DSCardV2PropTypes);
44
+ const globalProps = (0, import_lodash.omit)((0, import_ds_utilities.useGetGlobalAttributes)(propsWithDefault), ["cols", "rows", "wrap"]);
45
+ const xstyledProps = (0, import_ds_utilities.useGetXstyledProps)(propsWithDefault);
46
+ const { id } = propsWithDefault;
47
+ const instanceUid = import_react.default.useMemo(() => id || (0, import_uid.uid)(5), [id]);
48
+ return import_react.default.useMemo(
49
+ () => ({
50
+ propsWithDefault,
51
+ globalProps,
52
+ xstyledProps,
53
+ instanceUid
54
+ // ...eventHandlers,
55
+ }),
56
+ [
57
+ propsWithDefault,
58
+ globalProps,
59
+ xstyledProps,
60
+ instanceUid
61
+ // eventHandlers,
62
+ ]
63
+ );
64
+ };
65
+ //# sourceMappingURL=useCardV2.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/config/useCardV2.ts", "../../../../../scripts/build/transpile/react-shim.js"],
4
+ "sourcesContent": ["import React from 'react';\nimport { omit } from 'lodash';\nimport { useGetGlobalAttributes, useGetXstyledProps, useMemoMergePropsWithDefault } from '@elliemae/ds-utilities';\nimport { uid } from 'uid';\nimport { type DSCardV2T, DSCardV2PropTypes, defaultProps } from '../react-desc-prop-types.js';\nimport { useValidateProps } from './useValidateProps.js';\n\nexport interface CardV2CTX {\n propsWithDefault: DSCardV2T.InternalProps;\n globalProps: ReturnType<typeof useGetGlobalAttributes>;\n xstyledProps: ReturnType<typeof useGetXstyledProps>;\n instanceUid: string;\n}\n\nexport const useCardV2 = (propsFromUser: DSCardV2T.Props) => {\n // =============================================================================\n // MERGE WITH DEFAULT AND VALIDATE PROPS\n // =============================================================================\n const propsWithDefault = useMemoMergePropsWithDefault<DSCardV2T.InternalProps>(propsFromUser, defaultProps);\n useValidateProps(propsWithDefault, DSCardV2PropTypes);\n // =============================================================================\n // GLOBAL ATTRIBUTES & XSTYLED PROPS\n // =============================================================================\n const globalProps = omit(useGetGlobalAttributes<DSCardV2T.InternalProps>(propsWithDefault), ['cols', 'rows', 'wrap']);\n const xstyledProps = useGetXstyledProps(propsWithDefault);\n // =============================================================================\n // AD HOC PER COMPONENT LOGIC\n // =============================================================================\n // custom code goes here, this is an example\n const { id } = propsWithDefault;\n const instanceUid = React.useMemo(() => id || uid(5), [id]);\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 globalProps,\n xstyledProps,\n instanceUid,\n // ...eventHandlers,\n }),\n [\n propsWithDefault,\n globalProps,\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,oBAAqB;AACrB,0BAAyF;AACzF,iBAAoB;AACpB,mCAAgE;AAChE,8BAAiC;AAS1B,MAAM,YAAY,CAAC,kBAAmC;AAI3D,QAAM,uBAAmB,kDAAsD,eAAe,yCAAY;AAC1G,gDAAiB,kBAAkB,8CAAiB;AAIpD,QAAM,kBAAc,wBAAK,4CAAgD,gBAAgB,GAAG,CAAC,QAAQ,QAAQ,MAAM,CAAC;AACpH,QAAM,mBAAe,wCAAmB,gBAAgB;AAKxD,QAAM,EAAE,GAAG,IAAI;AACf,QAAM,cAAc,aAAAA,QAAM,QAAQ,MAAM,UAAM,gBAAI,CAAC,GAAG,CAAC,EAAE,CAAC;AAM1D,SAAO,aAAAA,QAAM;AAAA,IACX,OAAO;AAAA,MACL;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA;AAAA,IAEF;AAAA,IACA;AAAA,MACE;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA;AAAA,IAEF;AAAA,EACF;AACF;",
6
+ "names": ["React"]
7
+ }
@@ -0,0 +1,40 @@
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 useValidateProps_exports = {};
30
+ __export(useValidateProps_exports, {
31
+ useValidateProps: () => useValidateProps
32
+ });
33
+ module.exports = __toCommonJS(useValidateProps_exports);
34
+ var React = __toESM(require("react"));
35
+ var import_ds_utilities = require("@elliemae/ds-utilities");
36
+ var import_constants = require("../constants/index.js");
37
+ const useValidateProps = (props, propTypes) => {
38
+ (0, import_ds_utilities.useValidateTypescriptPropTypes)(props, propTypes, import_constants.DSCardV2Name);
39
+ };
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-utilities';\nimport type { WeakValidationMap } from 'react';\nimport { type DSCardV2T } from '../react-desc-prop-types.js';\nimport { DSCardV2Name } from '../constants/index.js';\n\nexport const useValidateProps = (props: DSCardV2T.InternalProps, propTypes: WeakValidationMap<unknown>): void => {\n // we validate the \"required if\" via 'isRequiredIf from our custom PropTypes\n useValidateTypescriptPropTypes(props, propTypes, DSCardV2Name);\n};\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,0BAA+C;AAG/C,uBAA6B;AAEtB,MAAM,mBAAmB,CAAC,OAAgC,cAAgD;AAE/G,0DAA+B,OAAO,WAAW,6BAAY;AAC/D;",
6
+ "names": []
7
+ }
@@ -0,0 +1,55 @@
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_V2_DATA_TESTID: () => CARD_V2_DATA_TESTID,
32
+ CARD_V2_SLOTS: () => CARD_V2_SLOTS,
33
+ DSCardV2Name: () => DSCardV2Name
34
+ });
35
+ module.exports = __toCommonJS(constants_exports);
36
+ var React = __toESM(require("react"));
37
+ var import_ds_system = require("@elliemae/ds-system");
38
+ const DSCardV2Name = "DSCardV2";
39
+ const CARD_V2_SLOTS = {
40
+ CARD_CONTAINER: "container",
41
+ LEFT_SECTION: "left-section",
42
+ LEFT_ADDON: "left-addon",
43
+ RIGHT_ADDON: "right-addon",
44
+ RIGHT_ADDON_SECTION: "right-addon-section",
45
+ SEPARATOR: "separator",
46
+ MAIN_SECTION: "main-section",
47
+ TITLE: "title",
48
+ DESCRIPTION: "description"
49
+ };
50
+ const CARD_V2_DATA_TESTID = {
51
+ ...(0, import_ds_system.slotObjectToDataTestIds)(DSCardV2Name, CARD_V2_SLOTS),
52
+ CARD_CONTAINER: "em-ds-card",
53
+ CARD_HEADER: "em-ds-card-header"
54
+ };
55
+ //# 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 DSCardV2Name = 'DSCardV2';\n\n// we are giving \"component_name_slots\" to avoid errors on duplicate exports variables in aggregators\nexport const CARD_V2_SLOTS = {\n CARD_CONTAINER: 'container',\n LEFT_SECTION: 'left-section',\n LEFT_ADDON: 'left-addon',\n RIGHT_ADDON: 'right-addon',\n RIGHT_ADDON_SECTION: 'right-addon-section',\n SEPARATOR: 'separator',\n MAIN_SECTION: 'main-section',\n TITLE: 'title',\n DESCRIPTION: 'description',\n} as const;\n\n// we are giving \"component_name_data_testid\" to avoid errors on duplicate exports variables in aggregators\nexport const CARD_V2_DATA_TESTID = {\n ...slotObjectToDataTestIds(DSCardV2Name, CARD_V2_SLOTS),\n CARD_CONTAINER: 'em-ds-card',\n CARD_HEADER: 'em-ds-card-header',\n};\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,uBAAwC;AAEjC,MAAM,eAAe;AAGrB,MAAM,gBAAgB;AAAA,EAC3B,gBAAgB;AAAA,EAChB,cAAc;AAAA,EACd,YAAY;AAAA,EACZ,aAAa;AAAA,EACb,qBAAqB;AAAA,EACrB,WAAW;AAAA,EACX,cAAc;AAAA,EACd,OAAO;AAAA,EACP,aAAa;AACf;AAGO,MAAM,sBAAsB;AAAA,EACjC,OAAG,0CAAwB,cAAc,aAAa;AAAA,EACtD,gBAAgB;AAAA,EAChB,aAAa;AACf;",
6
+ "names": []
7
+ }
@@ -0,0 +1,42 @@
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 src_exports = {};
30
+ __export(src_exports, {
31
+ CARD_V2_DATA_TESTID: () => import_constants.CARD_V2_DATA_TESTID,
32
+ CustomCard: () => import_DSCardV2.DSCardV2,
33
+ DSCardCustomWithSchema: () => import_DSCardV2.DSCardV2WithSchema,
34
+ DSCardV2: () => import_DSCardV2.DSCardV2,
35
+ DSCardV2WithSchema: () => import_DSCardV2.DSCardV2WithSchema
36
+ });
37
+ module.exports = __toCommonJS(src_exports);
38
+ var React = __toESM(require("react"));
39
+ var import_DSCardV2 = require("./DSCardV2.js");
40
+ var import_react_desc_prop_types = require("./react-desc-prop-types.js");
41
+ var import_constants = require("./constants/index.js");
42
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
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 type {} from '@xstyled/system';\nexport {\n DSCardV2,\n DSCardV2 as CustomCard,\n DSCardV2WithSchema,\n DSCardV2WithSchema as DSCardCustomWithSchema,\n} from './DSCardV2.js';\nexport { type DSCardV2T } from './react-desc-prop-types.js';\nexport { CARD_V2_DATA_TESTID } from './constants/index.js';\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADGvB,sBAKO;AACP,mCAA+B;AAC/B,uBAAoC;",
6
+ "names": []
7
+ }
@@ -0,0 +1,7 @@
1
+ {
2
+ "type": "commonjs",
3
+ "sideEffects": [
4
+ "*.css",
5
+ "*.scss"
6
+ ]
7
+ }
@@ -0,0 +1,66 @@
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 react_desc_prop_types_exports = {};
30
+ __export(react_desc_prop_types_exports, {
31
+ DSCardV2PropTypes: () => DSCardV2PropTypes,
32
+ DSCardV2PropTypesSchema: () => DSCardV2PropTypesSchema,
33
+ defaultProps: () => defaultProps
34
+ });
35
+ module.exports = __toCommonJS(react_desc_prop_types_exports);
36
+ var React = __toESM(require("react"));
37
+ var import_ds_utilities = require("@elliemae/ds-utilities");
38
+ const defaultProps = {
39
+ hasBorder: false
40
+ };
41
+ const DSCardV2PropTypes = {
42
+ ...import_ds_utilities.globalAttributesPropTypes,
43
+ ...import_ds_utilities.xstyledPropTypes,
44
+ /**
45
+ * Title of the card. requiered
46
+ */
47
+ title: import_ds_utilities.PropTypes.string.isRequired.description("Title of the card. requiered"),
48
+ /**
49
+ * Description of the card. not requiered
50
+ */
51
+ description: import_ds_utilities.PropTypes.string.description("Description of the card. not requiered"),
52
+ /**
53
+ * Left Addon
54
+ */
55
+ leftAddon: import_ds_utilities.PropTypes.element.description("Left Addon"),
56
+ /**
57
+ * Right addon array, max elements: 2
58
+ */
59
+ rightAddon: import_ds_utilities.PropTypes.array.description("Right addon array, max elements: 2"),
60
+ /**
61
+ * Wheter if the card has border or not
62
+ */
63
+ hasBorder: import_ds_utilities.PropTypes.bool.description("Wheter if the card has border or not").defaultValue(false)
64
+ };
65
+ const DSCardV2PropTypesSchema = DSCardV2PropTypes;
66
+ //# sourceMappingURL=react-desc-prop-types.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/react-desc-prop-types.ts", "../../../../scripts/build/transpile/react-shim.js"],
4
+ "sourcesContent": ["import type { WeakValidationMap } from 'react';\nimport type { GlobalAttributesT, XstyledProps, DSPropTypesSchema } from '@elliemae/ds-utilities';\nimport { PropTypes, globalAttributesPropTypes, xstyledPropTypes } from '@elliemae/ds-utilities';\n\nexport declare namespace DSCardV2T {\n export interface RequiredProps {\n title: string;\n }\n\n export interface DefaultProps {\n hasBorder?: boolean;\n }\n\n export interface OptionalProps {\n description: string;\n leftAddon: JSX.Element;\n rightAddon: JSX.Element | JSX.Element[];\n }\n\n export interface Props\n extends Partial<DefaultProps>,\n OptionalProps,\n Omit<\n GlobalAttributesT<HTMLButtonElement>,\n keyof DefaultProps | keyof OptionalProps | keyof RequiredProps | keyof XstyledProps\n >,\n XstyledProps,\n RequiredProps {}\n\n export interface InternalProps\n extends DefaultProps,\n OptionalProps,\n Omit<\n GlobalAttributesT<HTMLButtonElement>,\n keyof DefaultProps | keyof OptionalProps | keyof RequiredProps | keyof XstyledProps\n >,\n XstyledProps,\n RequiredProps {}\n}\n\nexport const defaultProps: DSCardV2T.DefaultProps = {\n hasBorder: false,\n};\n\nexport const DSCardV2PropTypes: DSPropTypesSchema<DSCardV2T.Props> = {\n ...globalAttributesPropTypes,\n ...xstyledPropTypes,\n /**\n * Title of the card. requiered\n */\n title: PropTypes.string.isRequired.description('Title of the card. requiered'),\n /**\n * Description of the card. not requiered\n */\n description: PropTypes.string.description('Description of the card. not requiered'),\n /**\n * Left Addon\n */\n leftAddon: PropTypes.element.description('Left Addon'),\n /**\n * Right addon array, max elements: 2\n */\n rightAddon: PropTypes.array.description('Right addon array, max elements: 2'),\n /**\n * Wheter if the card has border or not\n */\n hasBorder: PropTypes.bool.description('Wheter if the card has border or not').defaultValue(false),\n};\n\nexport const DSCardV2PropTypesSchema = DSCardV2PropTypes as unknown as WeakValidationMap<DSCardV2T.Props>;\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADEvB,0BAAuE;AAsChE,MAAM,eAAuC;AAAA,EAClD,WAAW;AACb;AAEO,MAAM,oBAAwD;AAAA,EACnE,GAAG;AAAA,EACH,GAAG;AAAA;AAAA;AAAA;AAAA,EAIH,OAAO,8BAAU,OAAO,WAAW,YAAY,8BAA8B;AAAA;AAAA;AAAA;AAAA,EAI7E,aAAa,8BAAU,OAAO,YAAY,wCAAwC;AAAA;AAAA;AAAA;AAAA,EAIlF,WAAW,8BAAU,QAAQ,YAAY,YAAY;AAAA;AAAA;AAAA;AAAA,EAIrD,YAAY,8BAAU,MAAM,YAAY,oCAAoC;AAAA;AAAA;AAAA;AAAA,EAI5E,WAAW,8BAAU,KAAK,YAAY,sCAAsC,EAAE,aAAa,KAAK;AAClG;AAEO,MAAM,0BAA0B;",
6
+ "names": []
7
+ }
@@ -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 styles_exports = {};
30
+ __export(styles_exports, {
31
+ CardContainer: () => CardContainer,
32
+ Description: () => Description,
33
+ LeftAddon: () => LeftAddon,
34
+ LeftSection: () => LeftSection,
35
+ MainSection: () => MainSection,
36
+ RightAddon: () => RightAddon,
37
+ RightAddonSection: () => RightAddonSection,
38
+ Separator: () => Separator,
39
+ Title: () => Title
40
+ });
41
+ module.exports = __toCommonJS(styles_exports);
42
+ var React = __toESM(require("react"));
43
+ var import_ds_system = require("@elliemae/ds-system");
44
+ var import_ds_grid = require("@elliemae/ds-grid");
45
+ var import_constants = require("./constants/index.js");
46
+ const CardContainer = (0, import_ds_system.styled)(import_ds_grid.Grid, { name: import_constants.DSCardV2Name, slot: import_constants.CARD_V2_SLOTS.CARD_CONTAINER })`
47
+ align-items: center;
48
+ justify-content: space-between;
49
+ width: 100%;
50
+ height: 56px;
51
+ padding: 8px 16px;
52
+ position: relative;
53
+ border: ${({ theme, hasBorder }) => hasBorder ? `1px solid ${theme.colors.neutral["100"]}` : ""};
54
+ &:before {
55
+ content: '';
56
+ border-bottom: 1px solid ${(props) => props.theme.colors.neutral["100"]};
57
+ position: absolute;
58
+ margin: 0 auto;
59
+ width: 90%;
60
+ bottom: 0;
61
+ }
62
+ &:last-child::before {
63
+ content: none;
64
+ }
65
+ ${import_ds_system.xStyledCommonProps}
66
+ `;
67
+ const LeftSection = (0, import_ds_system.styled)("div", { name: import_constants.DSCardV2Name, slot: import_constants.CARD_V2_SLOTS.LEFT_SECTION })`
68
+ display: flex;
69
+ align-items: center;
70
+ `;
71
+ const LeftAddon = (0, import_ds_system.styled)("div", { name: import_constants.DSCardV2Name, slot: import_constants.CARD_V2_SLOTS.LEFT_ADDON })`
72
+ height: fit-content;
73
+ width: fit-content;
74
+ margin-right: 16px;
75
+ cursor: pointer;
76
+ `;
77
+ const RightAddonSection = (0, import_ds_system.styled)("div", { name: import_constants.DSCardV2Name, slot: import_constants.CARD_V2_SLOTS.RIGHT_ADDON_SECTION })`
78
+ display: flex;
79
+ align-items: center;
80
+ width: fit-content;
81
+ `;
82
+ const RightAddon = (0, import_ds_system.styled)("div", { name: import_constants.DSCardV2Name, slot: import_constants.CARD_V2_SLOTS.RIGHT_ADDON })`
83
+ height: fit-content;
84
+ width: fit-content;
85
+ cursor: pointer;
86
+ `;
87
+ const Separator = (0, import_ds_system.styled)("div", { name: import_constants.DSCardV2Name, slot: import_constants.CARD_V2_SLOTS.SEPARATOR })`
88
+ width: 0px;
89
+ height: 24px;
90
+ border-right: 1px solid ${(props) => props.theme.colors.neutral["300"]};
91
+ margin: 0 8px;
92
+ `;
93
+ const MainSection = (0, import_ds_system.styled)("div", { name: import_constants.DSCardV2Name, slot: import_constants.CARD_V2_SLOTS.MAIN_SECTION })`
94
+ display: flex;
95
+ flex-direction: column;
96
+ `;
97
+ const Title = (0, import_ds_system.styled)("h3", { name: import_constants.DSCardV2Name, slot: import_constants.CARD_V2_SLOTS.TITLE })`
98
+ margin: 0;
99
+ font-size: 16px;
100
+ font-weight: ${(props) => props.theme.fontWeights.regular};
101
+ color: ${(props) => props.theme.colors.neutral["800"]};
102
+ `;
103
+ const Description = (0, import_ds_system.styled)("p", { name: import_constants.DSCardV2Name, slot: import_constants.CARD_V2_SLOTS.DESCRIPTION })`
104
+ margin: 0;
105
+ color: ${(props) => props.theme.colors.neutral["600"]};
106
+ `;
107
+ //# sourceMappingURL=styles.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/styles.tsx", "../../../../scripts/build/transpile/react-shim.js"],
4
+ "sourcesContent": ["import { styled, xStyledCommonProps } from '@elliemae/ds-system';\nimport { Grid } from '@elliemae/ds-grid';\nimport { DSCardV2Name, CARD_V2_SLOTS } from './constants/index.js';\n\nconst CardContainer = styled(Grid, { name: DSCardV2Name, slot: CARD_V2_SLOTS.CARD_CONTAINER })<{ hasBorder?: boolean }>`\n align-items: center;\n justify-content: space-between;\n width: 100%;\n height: 56px;\n padding: 8px 16px;\n position: relative;\n border: ${({ theme, hasBorder }) => (hasBorder ? `1px solid ${theme.colors.neutral['100']}` : '')};\n &:before {\n content: '';\n border-bottom: 1px solid ${(props) => props.theme.colors.neutral['100']};\n position: absolute;\n margin: 0 auto;\n width: 90%;\n bottom: 0;\n }\n &:last-child::before {\n content: none;\n }\n ${xStyledCommonProps}\n`;\n\nconst LeftSection = styled('div', { name: DSCardV2Name, slot: CARD_V2_SLOTS.LEFT_SECTION })`\n display: flex;\n align-items: center;\n`;\n\nconst LeftAddon = styled('div', { name: DSCardV2Name, slot: CARD_V2_SLOTS.LEFT_ADDON })`\n height: fit-content;\n width: fit-content;\n margin-right: 16px;\n cursor: pointer;\n`;\n\nconst RightAddonSection = styled('div', { name: DSCardV2Name, slot: CARD_V2_SLOTS.RIGHT_ADDON_SECTION })`\n display: flex;\n align-items: center;\n width: fit-content;\n`;\n\nconst RightAddon = styled('div', { name: DSCardV2Name, slot: CARD_V2_SLOTS.RIGHT_ADDON })`\n height: fit-content;\n width: fit-content;\n cursor: pointer;\n`;\n\nconst Separator = styled('div', { name: DSCardV2Name, slot: CARD_V2_SLOTS.SEPARATOR })`\n width: 0px;\n height: 24px;\n border-right: 1px solid ${(props) => props.theme.colors.neutral['300']};\n margin: 0 8px;\n`;\n\nconst MainSection = styled('div', { name: DSCardV2Name, slot: CARD_V2_SLOTS.MAIN_SECTION })`\n display: flex;\n flex-direction: column;\n`;\n\nconst Title = styled('h3', { name: DSCardV2Name, slot: CARD_V2_SLOTS.TITLE })`\n margin: 0;\n font-size: 16px;\n font-weight: ${(props) => props.theme.fontWeights.regular};\n color: ${(props) => props.theme.colors.neutral['800']};\n`;\n\nconst Description = styled('p', { name: DSCardV2Name, slot: CARD_V2_SLOTS.DESCRIPTION })`\n margin: 0;\n color: ${(props) => props.theme.colors.neutral['600']};\n`;\n\nexport {\n CardContainer,\n LeftSection,\n LeftAddon,\n RightAddonSection,\n RightAddon,\n Separator,\n MainSection,\n Title,\n Description,\n};\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,uBAA2C;AAC3C,qBAAqB;AACrB,uBAA4C;AAE5C,MAAM,oBAAgB,yBAAO,qBAAM,EAAE,MAAM,+BAAc,MAAM,+BAAc,eAAe,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,YAOjF,CAAC,EAAE,OAAO,UAAU,MAAO,YAAY,aAAa,MAAM,OAAO,QAAQ,KAAK,MAAM;AAAA;AAAA;AAAA,+BAGjE,CAAC,UAAU,MAAM,MAAM,OAAO,QAAQ,KAAK;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAStE;AAAA;AAGJ,MAAM,kBAAc,yBAAO,OAAO,EAAE,MAAM,+BAAc,MAAM,+BAAc,aAAa,CAAC;AAAA;AAAA;AAAA;AAK1F,MAAM,gBAAY,yBAAO,OAAO,EAAE,MAAM,+BAAc,MAAM,+BAAc,WAAW,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA;AAOtF,MAAM,wBAAoB,yBAAO,OAAO,EAAE,MAAM,+BAAc,MAAM,+BAAc,oBAAoB,CAAC;AAAA;AAAA;AAAA;AAAA;AAMvG,MAAM,iBAAa,yBAAO,OAAO,EAAE,MAAM,+BAAc,MAAM,+BAAc,YAAY,CAAC;AAAA;AAAA;AAAA;AAAA;AAMxF,MAAM,gBAAY,yBAAO,OAAO,EAAE,MAAM,+BAAc,MAAM,+BAAc,UAAU,CAAC;AAAA;AAAA;AAAA,4BAGzD,CAAC,UAAU,MAAM,MAAM,OAAO,QAAQ,KAAK;AAAA;AAAA;AAIvE,MAAM,kBAAc,yBAAO,OAAO,EAAE,MAAM,+BAAc,MAAM,+BAAc,aAAa,CAAC;AAAA;AAAA;AAAA;AAK1F,MAAM,YAAQ,yBAAO,MAAM,EAAE,MAAM,+BAAc,MAAM,+BAAc,MAAM,CAAC;AAAA;AAAA;AAAA,iBAG3D,CAAC,UAAU,MAAM,MAAM,YAAY;AAAA,WACzC,CAAC,UAAU,MAAM,MAAM,OAAO,QAAQ,KAAK;AAAA;AAGtD,MAAM,kBAAc,yBAAO,KAAK,EAAE,MAAM,+BAAc,MAAM,+BAAc,YAAY,CAAC;AAAA;AAAA,WAE5E,CAAC,UAAU,MAAM,MAAM,OAAO,QAAQ,KAAK;AAAA;",
6
+ "names": []
7
+ }
@@ -0,0 +1,79 @@
1
+ import * as React from "react";
2
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
3
+ import { describe } from "@elliemae/ds-utilities";
4
+ import { DSCardV2PropTypesSchema } from "./react-desc-prop-types.js";
5
+ import { useCardV2 } from "./config/useCardV2.js";
6
+ import { DSCardV2Name, CARD_V2_DATA_TESTID } from "./constants/index.js";
7
+ import DSTruncatedTooltipText, { TooltipTextProvider } from "@elliemae/ds-truncated-tooltip-text";
8
+ import { DSHeader } from "@elliemae/ds-header";
9
+ import {
10
+ CardContainer,
11
+ LeftSection,
12
+ LeftAddon,
13
+ MainSection,
14
+ Description,
15
+ RightAddonSection,
16
+ RightAddon,
17
+ Separator
18
+ } from "./styles.js";
19
+ const getCol = (rightAddon) => {
20
+ if (!rightAddon)
21
+ return ["1fr"];
22
+ return ["1fr", "auto"];
23
+ };
24
+ const DSCardV2 = (props) => {
25
+ const { propsWithDefault, globalProps, xstyledProps } = useCardV2(props);
26
+ const { hasBorder, title, leftAddon, rightAddon, description } = propsWithDefault;
27
+ return /* @__PURE__ */ jsx(TooltipTextProvider, { children: /* @__PURE__ */ jsxs(
28
+ CardContainer,
29
+ {
30
+ "data-testid": CARD_V2_DATA_TESTID.CARD_CONTAINER,
31
+ ...globalProps,
32
+ ...xstyledProps,
33
+ hasBorder,
34
+ cols: getCol(rightAddon),
35
+ children: [
36
+ /* @__PURE__ */ jsxs(LeftSection, { children: [
37
+ leftAddon && /* @__PURE__ */ jsx(LeftAddon, { children: leftAddon }),
38
+ /* @__PURE__ */ jsxs(
39
+ MainSection,
40
+ {
41
+ style: {
42
+ maxWidth: leftAddon ? "calc(100% - 40px)" : "100%"
43
+ },
44
+ children: [
45
+ /* @__PURE__ */ jsx(
46
+ DSHeader,
47
+ {
48
+ "data-testid": CARD_V2_DATA_TESTID.CARD_HEADER,
49
+ fontSize: "16px",
50
+ fontWeight: "regular",
51
+ color: "neutral.800",
52
+ text: /* @__PURE__ */ jsx(DSTruncatedTooltipText, { value: title })
53
+ }
54
+ ),
55
+ description && /* @__PURE__ */ jsx(Description, { children: /* @__PURE__ */ jsx(DSTruncatedTooltipText, { value: description }) })
56
+ ]
57
+ }
58
+ )
59
+ ] }),
60
+ Array.isArray(rightAddon) && /* @__PURE__ */ jsxs(RightAddonSection, { children: [
61
+ rightAddon[0] ? /* @__PURE__ */ jsx(RightAddon, { children: rightAddon[0] }) : null,
62
+ rightAddon[1] ? /* @__PURE__ */ jsxs(Fragment, { children: [
63
+ rightAddon.length > 1 && /* @__PURE__ */ jsx(Separator, {}),
64
+ /* @__PURE__ */ jsx(RightAddon, { children: rightAddon[1] })
65
+ ] }) : null
66
+ ] })
67
+ ]
68
+ }
69
+ ) });
70
+ };
71
+ DSCardV2.propTypes = DSCardV2PropTypesSchema;
72
+ DSCardV2.displayName = DSCardV2Name;
73
+ const DSCardV2WithSchema = describe(DSCardV2);
74
+ DSCardV2WithSchema.propTypes = DSCardV2PropTypesSchema;
75
+ export {
76
+ DSCardV2,
77
+ DSCardV2WithSchema
78
+ };
79
+ //# sourceMappingURL=DSCardV2.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../scripts/build/transpile/react-shim.js", "../../src/DSCardV2.tsx"],
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { describe } from '@elliemae/ds-utilities';\nimport { type DSCardV2T, DSCardV2PropTypesSchema } from './react-desc-prop-types.js';\nimport { useCardV2 } from './config/useCardV2.js';\nimport { DSCardV2Name, CARD_V2_DATA_TESTID } from './constants/index.js';\nimport DSTruncatedTooltipText, { TooltipTextProvider } from '@elliemae/ds-truncated-tooltip-text';\nimport { DSHeader } from '@elliemae/ds-header';\nimport {\n CardContainer,\n LeftSection,\n LeftAddon,\n MainSection,\n Description,\n RightAddonSection,\n RightAddon,\n Separator,\n} from './styles.js';\n\nconst getCol = (rightAddon: DSCardV2T.OptionalProps['rightAddon']) => {\n if (!rightAddon) return ['1fr'];\n return ['1fr', 'auto'];\n};\n\nconst DSCardV2: React.ComponentType<DSCardV2T.Props> = (props) => {\n const { propsWithDefault, globalProps, xstyledProps } = useCardV2(props);\n const { hasBorder, title, leftAddon, rightAddon, description } = propsWithDefault;\n return (\n <TooltipTextProvider>\n <CardContainer\n data-testid={CARD_V2_DATA_TESTID.CARD_CONTAINER} //we must keep this explicit to avoid the breaking changes\n {...globalProps}\n {...xstyledProps}\n hasBorder={hasBorder}\n cols={getCol(rightAddon)}\n >\n <LeftSection>\n {leftAddon && <LeftAddon>{leftAddon}</LeftAddon>}\n <MainSection\n style={{\n maxWidth: leftAddon ? 'calc(100% - 40px)' : '100%',\n }}\n >\n <DSHeader\n data-testid={CARD_V2_DATA_TESTID.CARD_HEADER} //we must keep this explicit to avoid the breaking changes\n fontSize=\"16px\"\n fontWeight=\"regular\"\n color=\"neutral.800\"\n text={<DSTruncatedTooltipText value={title} />}\n />\n {description && (\n <Description>\n <DSTruncatedTooltipText value={description} />\n </Description>\n )}\n </MainSection>\n </LeftSection>\n {Array.isArray(rightAddon) && (\n <RightAddonSection>\n {rightAddon[0] ? <RightAddon>{rightAddon[0]}</RightAddon> : null}\n {rightAddon[1] ? (\n <>\n {rightAddon.length > 1 && <Separator />}\n <RightAddon>{rightAddon[1]}</RightAddon>\n </>\n ) : null}\n </RightAddonSection>\n )}\n </CardContainer>\n </TooltipTextProvider>\n );\n};\n\nDSCardV2.propTypes = DSCardV2PropTypesSchema;\nDSCardV2.displayName = DSCardV2Name;\nconst DSCardV2WithSchema = describe(DSCardV2);\nDSCardV2WithSchema.propTypes = DSCardV2PropTypesSchema;\n\nexport { DSCardV2, DSCardV2WithSchema };\n"],
5
+ "mappings": "AAAA,YAAY,WAAW;ACoCC,SAwBV,UAxBU,KACd,YADc;AAnCxB,SAAS,gBAAgB;AACzB,SAAyB,+BAA+B;AACxD,SAAS,iBAAiB;AAC1B,SAAS,cAAc,2BAA2B;AAClD,OAAO,0BAA0B,2BAA2B;AAC5D,SAAS,gBAAgB;AACzB;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAEP,MAAM,SAAS,CAAC,eAAsD;AACpE,MAAI,CAAC;AAAY,WAAO,CAAC,KAAK;AAC9B,SAAO,CAAC,OAAO,MAAM;AACvB;AAEA,MAAM,WAAiD,CAAC,UAAU;AAChE,QAAM,EAAE,kBAAkB,aAAa,aAAa,IAAI,UAAU,KAAK;AACvE,QAAM,EAAE,WAAW,OAAO,WAAW,YAAY,YAAY,IAAI;AACjE,SACE,oBAAC,uBACC;AAAA,IAAC;AAAA;AAAA,MACC,eAAa,oBAAoB;AAAA,MAChC,GAAG;AAAA,MACH,GAAG;AAAA,MACJ;AAAA,MACA,MAAM,OAAO,UAAU;AAAA,MAEvB;AAAA,6BAAC,eACE;AAAA,uBAAa,oBAAC,aAAW,qBAAU;AAAA,UACpC;AAAA,YAAC;AAAA;AAAA,cACC,OAAO;AAAA,gBACL,UAAU,YAAY,sBAAsB;AAAA,cAC9C;AAAA,cAEA;AAAA;AAAA,kBAAC;AAAA;AAAA,oBACC,eAAa,oBAAoB;AAAA,oBACjC,UAAS;AAAA,oBACT,YAAW;AAAA,oBACX,OAAM;AAAA,oBACN,MAAM,oBAAC,0BAAuB,OAAO,OAAO;AAAA;AAAA,gBAC9C;AAAA,gBACC,eACC,oBAAC,eACC,8BAAC,0BAAuB,OAAO,aAAa,GAC9C;AAAA;AAAA;AAAA,UAEJ;AAAA,WACF;AAAA,QACC,MAAM,QAAQ,UAAU,KACvB,qBAAC,qBACE;AAAA,qBAAW,CAAC,IAAI,oBAAC,cAAY,qBAAW,CAAC,GAAE,IAAgB;AAAA,UAC3D,WAAW,CAAC,IACX,iCACG;AAAA,uBAAW,SAAS,KAAK,oBAAC,aAAU;AAAA,YACrC,oBAAC,cAAY,qBAAW,CAAC,GAAE;AAAA,aAC7B,IACE;AAAA,WACN;AAAA;AAAA;AAAA,EAEJ,GACF;AAEJ;AAEA,SAAS,YAAY;AACrB,SAAS,cAAc;AACvB,MAAM,qBAAqB,SAAS,QAAQ;AAC5C,mBAAmB,YAAY;",
6
+ "names": []
7
+ }
@@ -0,0 +1,35 @@
1
+ import * as React from "react";
2
+ import React2 from "react";
3
+ import { omit } from "lodash";
4
+ import { useGetGlobalAttributes, useGetXstyledProps, useMemoMergePropsWithDefault } from "@elliemae/ds-utilities";
5
+ import { uid } from "uid";
6
+ import { DSCardV2PropTypes, defaultProps } from "../react-desc-prop-types.js";
7
+ import { useValidateProps } from "./useValidateProps.js";
8
+ const useCardV2 = (propsFromUser) => {
9
+ const propsWithDefault = useMemoMergePropsWithDefault(propsFromUser, defaultProps);
10
+ useValidateProps(propsWithDefault, DSCardV2PropTypes);
11
+ const globalProps = omit(useGetGlobalAttributes(propsWithDefault), ["cols", "rows", "wrap"]);
12
+ const xstyledProps = useGetXstyledProps(propsWithDefault);
13
+ const { id } = propsWithDefault;
14
+ const instanceUid = React2.useMemo(() => id || uid(5), [id]);
15
+ return React2.useMemo(
16
+ () => ({
17
+ propsWithDefault,
18
+ globalProps,
19
+ xstyledProps,
20
+ instanceUid
21
+ // ...eventHandlers,
22
+ }),
23
+ [
24
+ propsWithDefault,
25
+ globalProps,
26
+ xstyledProps,
27
+ instanceUid
28
+ // eventHandlers,
29
+ ]
30
+ );
31
+ };
32
+ export {
33
+ useCardV2
34
+ };
35
+ //# sourceMappingURL=useCardV2.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/config/useCardV2.ts"],
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { omit } from 'lodash';\nimport { useGetGlobalAttributes, useGetXstyledProps, useMemoMergePropsWithDefault } from '@elliemae/ds-utilities';\nimport { uid } from 'uid';\nimport { type DSCardV2T, DSCardV2PropTypes, defaultProps } from '../react-desc-prop-types.js';\nimport { useValidateProps } from './useValidateProps.js';\n\nexport interface CardV2CTX {\n propsWithDefault: DSCardV2T.InternalProps;\n globalProps: ReturnType<typeof useGetGlobalAttributes>;\n xstyledProps: ReturnType<typeof useGetXstyledProps>;\n instanceUid: string;\n}\n\nexport const useCardV2 = (propsFromUser: DSCardV2T.Props) => {\n // =============================================================================\n // MERGE WITH DEFAULT AND VALIDATE PROPS\n // =============================================================================\n const propsWithDefault = useMemoMergePropsWithDefault<DSCardV2T.InternalProps>(propsFromUser, defaultProps);\n useValidateProps(propsWithDefault, DSCardV2PropTypes);\n // =============================================================================\n // GLOBAL ATTRIBUTES & XSTYLED PROPS\n // =============================================================================\n const globalProps = omit(useGetGlobalAttributes<DSCardV2T.InternalProps>(propsWithDefault), ['cols', 'rows', 'wrap']);\n const xstyledProps = useGetXstyledProps(propsWithDefault);\n // =============================================================================\n // AD HOC PER COMPONENT LOGIC\n // =============================================================================\n // custom code goes here, this is an example\n const { id } = propsWithDefault;\n const instanceUid = React.useMemo(() => id || uid(5), [id]);\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 globalProps,\n xstyledProps,\n instanceUid,\n // ...eventHandlers,\n }),\n [\n propsWithDefault,\n globalProps,\n xstyledProps,\n instanceUid,\n // eventHandlers,\n ],\n );\n};\n"],
5
+ "mappings": "AAAA,YAAY,WAAW;ACAvB,OAAOA,YAAW;AAClB,SAAS,YAAY;AACrB,SAAS,wBAAwB,oBAAoB,oCAAoC;AACzF,SAAS,WAAW;AACpB,SAAyB,mBAAmB,oBAAoB;AAChE,SAAS,wBAAwB;AAS1B,MAAM,YAAY,CAAC,kBAAmC;AAI3D,QAAM,mBAAmB,6BAAsD,eAAe,YAAY;AAC1G,mBAAiB,kBAAkB,iBAAiB;AAIpD,QAAM,cAAc,KAAK,uBAAgD,gBAAgB,GAAG,CAAC,QAAQ,QAAQ,MAAM,CAAC;AACpH,QAAM,eAAe,mBAAmB,gBAAgB;AAKxD,QAAM,EAAE,GAAG,IAAI;AACf,QAAM,cAAcA,OAAM,QAAQ,MAAM,MAAM,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC;AAM1D,SAAOA,OAAM;AAAA,IACX,OAAO;AAAA,MACL;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA;AAAA,IAEF;AAAA,IACA;AAAA,MACE;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA;AAAA,IAEF;AAAA,EACF;AACF;",
6
+ "names": ["React"]
7
+ }
@@ -0,0 +1,10 @@
1
+ import * as React from "react";
2
+ import { useValidateTypescriptPropTypes } from "@elliemae/ds-utilities";
3
+ import { DSCardV2Name } from "../constants/index.js";
4
+ const useValidateProps = (props, propTypes) => {
5
+ useValidateTypescriptPropTypes(props, propTypes, DSCardV2Name);
6
+ };
7
+ export {
8
+ useValidateProps
9
+ };
10
+ //# sourceMappingURL=useValidateProps.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/config/useValidateProps.ts"],
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { useValidateTypescriptPropTypes } from '@elliemae/ds-utilities';\nimport type { WeakValidationMap } from 'react';\nimport { type DSCardV2T } from '../react-desc-prop-types.js';\nimport { DSCardV2Name } from '../constants/index.js';\n\nexport const useValidateProps = (props: DSCardV2T.InternalProps, propTypes: WeakValidationMap<unknown>): void => {\n // we validate the \"required if\" via 'isRequiredIf from our custom PropTypes\n useValidateTypescriptPropTypes(props, propTypes, DSCardV2Name);\n};\n"],
5
+ "mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,sCAAsC;AAG/C,SAAS,oBAAoB;AAEtB,MAAM,mBAAmB,CAAC,OAAgC,cAAgD;AAE/G,iCAA+B,OAAO,WAAW,YAAY;AAC/D;",
6
+ "names": []
7
+ }
@@ -0,0 +1,25 @@
1
+ import * as React from "react";
2
+ import { slotObjectToDataTestIds } from "@elliemae/ds-system";
3
+ const DSCardV2Name = "DSCardV2";
4
+ const CARD_V2_SLOTS = {
5
+ CARD_CONTAINER: "container",
6
+ LEFT_SECTION: "left-section",
7
+ LEFT_ADDON: "left-addon",
8
+ RIGHT_ADDON: "right-addon",
9
+ RIGHT_ADDON_SECTION: "right-addon-section",
10
+ SEPARATOR: "separator",
11
+ MAIN_SECTION: "main-section",
12
+ TITLE: "title",
13
+ DESCRIPTION: "description"
14
+ };
15
+ const CARD_V2_DATA_TESTID = {
16
+ ...slotObjectToDataTestIds(DSCardV2Name, CARD_V2_SLOTS),
17
+ CARD_CONTAINER: "em-ds-card",
18
+ CARD_HEADER: "em-ds-card-header"
19
+ };
20
+ export {
21
+ CARD_V2_DATA_TESTID,
22
+ CARD_V2_SLOTS,
23
+ DSCardV2Name
24
+ };
25
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 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 DSCardV2Name = 'DSCardV2';\n\n// we are giving \"component_name_slots\" to avoid errors on duplicate exports variables in aggregators\nexport const CARD_V2_SLOTS = {\n CARD_CONTAINER: 'container',\n LEFT_SECTION: 'left-section',\n LEFT_ADDON: 'left-addon',\n RIGHT_ADDON: 'right-addon',\n RIGHT_ADDON_SECTION: 'right-addon-section',\n SEPARATOR: 'separator',\n MAIN_SECTION: 'main-section',\n TITLE: 'title',\n DESCRIPTION: 'description',\n} as const;\n\n// we are giving \"component_name_data_testid\" to avoid errors on duplicate exports variables in aggregators\nexport const CARD_V2_DATA_TESTID = {\n ...slotObjectToDataTestIds(DSCardV2Name, CARD_V2_SLOTS),\n CARD_CONTAINER: 'em-ds-card',\n CARD_HEADER: 'em-ds-card-header',\n};\n"],
5
+ "mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,+BAA+B;AAEjC,MAAM,eAAe;AAGrB,MAAM,gBAAgB;AAAA,EAC3B,gBAAgB;AAAA,EAChB,cAAc;AAAA,EACd,YAAY;AAAA,EACZ,aAAa;AAAA,EACb,qBAAqB;AAAA,EACrB,WAAW;AAAA,EACX,cAAc;AAAA,EACd,OAAO;AAAA,EACP,aAAa;AACf;AAGO,MAAM,sBAAsB;AAAA,EACjC,GAAG,wBAAwB,cAAc,aAAa;AAAA,EACtD,gBAAgB;AAAA,EAChB,aAAa;AACf;",
6
+ "names": []
7
+ }
@@ -0,0 +1,17 @@
1
+ import * as React from "react";
2
+ import {
3
+ DSCardV2,
4
+ DSCardV2 as DSCardV22,
5
+ DSCardV2WithSchema,
6
+ DSCardV2WithSchema as DSCardV2WithSchema2
7
+ } from "./DSCardV2.js";
8
+ import {} from "./react-desc-prop-types.js";
9
+ import { CARD_V2_DATA_TESTID } from "./constants/index.js";
10
+ export {
11
+ CARD_V2_DATA_TESTID,
12
+ DSCardV22 as CustomCard,
13
+ DSCardV2WithSchema2 as DSCardCustomWithSchema,
14
+ DSCardV2,
15
+ DSCardV2WithSchema
16
+ };
17
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 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 type {} from '@xstyled/system';\nexport {\n DSCardV2,\n DSCardV2 as CustomCard,\n DSCardV2WithSchema,\n DSCardV2WithSchema as DSCardCustomWithSchema,\n} from './DSCardV2.js';\nexport { type DSCardV2T } from './react-desc-prop-types.js';\nexport { CARD_V2_DATA_TESTID } from './constants/index.js';\n"],
5
+ "mappings": "AAAA,YAAY,WAAW;ACGvB;AAAA,EACE;AAAA,EACY,YAAZA;AAAA,EACA;AAAA,EACsB,sBAAtBC;AAAA,OACK;AACP,eAA+B;AAC/B,SAAS,2BAA2B;",
6
+ "names": ["DSCardV2", "DSCardV2WithSchema"]
7
+ }
@@ -0,0 +1,7 @@
1
+ {
2
+ "type": "module",
3
+ "sideEffects": [
4
+ "*.css",
5
+ "*.scss"
6
+ ]
7
+ }
@@ -0,0 +1,36 @@
1
+ import * as React from "react";
2
+ import { PropTypes, globalAttributesPropTypes, xstyledPropTypes } from "@elliemae/ds-utilities";
3
+ const defaultProps = {
4
+ hasBorder: false
5
+ };
6
+ const DSCardV2PropTypes = {
7
+ ...globalAttributesPropTypes,
8
+ ...xstyledPropTypes,
9
+ /**
10
+ * Title of the card. requiered
11
+ */
12
+ title: PropTypes.string.isRequired.description("Title of the card. requiered"),
13
+ /**
14
+ * Description of the card. not requiered
15
+ */
16
+ description: PropTypes.string.description("Description of the card. not requiered"),
17
+ /**
18
+ * Left Addon
19
+ */
20
+ leftAddon: PropTypes.element.description("Left Addon"),
21
+ /**
22
+ * Right addon array, max elements: 2
23
+ */
24
+ rightAddon: PropTypes.array.description("Right addon array, max elements: 2"),
25
+ /**
26
+ * Wheter if the card has border or not
27
+ */
28
+ hasBorder: PropTypes.bool.description("Wheter if the card has border or not").defaultValue(false)
29
+ };
30
+ const DSCardV2PropTypesSchema = DSCardV2PropTypes;
31
+ export {
32
+ DSCardV2PropTypes,
33
+ DSCardV2PropTypesSchema,
34
+ defaultProps
35
+ };
36
+ //# sourceMappingURL=react-desc-prop-types.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../scripts/build/transpile/react-shim.js", "../../src/react-desc-prop-types.ts"],
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import type { WeakValidationMap } from 'react';\nimport type { GlobalAttributesT, XstyledProps, DSPropTypesSchema } from '@elliemae/ds-utilities';\nimport { PropTypes, globalAttributesPropTypes, xstyledPropTypes } from '@elliemae/ds-utilities';\n\nexport declare namespace DSCardV2T {\n export interface RequiredProps {\n title: string;\n }\n\n export interface DefaultProps {\n hasBorder?: boolean;\n }\n\n export interface OptionalProps {\n description: string;\n leftAddon: JSX.Element;\n rightAddon: JSX.Element | JSX.Element[];\n }\n\n export interface Props\n extends Partial<DefaultProps>,\n OptionalProps,\n Omit<\n GlobalAttributesT<HTMLButtonElement>,\n keyof DefaultProps | keyof OptionalProps | keyof RequiredProps | keyof XstyledProps\n >,\n XstyledProps,\n RequiredProps {}\n\n export interface InternalProps\n extends DefaultProps,\n OptionalProps,\n Omit<\n GlobalAttributesT<HTMLButtonElement>,\n keyof DefaultProps | keyof OptionalProps | keyof RequiredProps | keyof XstyledProps\n >,\n XstyledProps,\n RequiredProps {}\n}\n\nexport const defaultProps: DSCardV2T.DefaultProps = {\n hasBorder: false,\n};\n\nexport const DSCardV2PropTypes: DSPropTypesSchema<DSCardV2T.Props> = {\n ...globalAttributesPropTypes,\n ...xstyledPropTypes,\n /**\n * Title of the card. requiered\n */\n title: PropTypes.string.isRequired.description('Title of the card. requiered'),\n /**\n * Description of the card. not requiered\n */\n description: PropTypes.string.description('Description of the card. not requiered'),\n /**\n * Left Addon\n */\n leftAddon: PropTypes.element.description('Left Addon'),\n /**\n * Right addon array, max elements: 2\n */\n rightAddon: PropTypes.array.description('Right addon array, max elements: 2'),\n /**\n * Wheter if the card has border or not\n */\n hasBorder: PropTypes.bool.description('Wheter if the card has border or not').defaultValue(false),\n};\n\nexport const DSCardV2PropTypesSchema = DSCardV2PropTypes as unknown as WeakValidationMap<DSCardV2T.Props>;\n"],
5
+ "mappings": "AAAA,YAAY,WAAW;ACEvB,SAAS,WAAW,2BAA2B,wBAAwB;AAsChE,MAAM,eAAuC;AAAA,EAClD,WAAW;AACb;AAEO,MAAM,oBAAwD;AAAA,EACnE,GAAG;AAAA,EACH,GAAG;AAAA;AAAA;AAAA;AAAA,EAIH,OAAO,UAAU,OAAO,WAAW,YAAY,8BAA8B;AAAA;AAAA;AAAA;AAAA,EAI7E,aAAa,UAAU,OAAO,YAAY,wCAAwC;AAAA;AAAA;AAAA;AAAA,EAIlF,WAAW,UAAU,QAAQ,YAAY,YAAY;AAAA;AAAA;AAAA;AAAA,EAIrD,YAAY,UAAU,MAAM,YAAY,oCAAoC;AAAA;AAAA;AAAA;AAAA,EAI5E,WAAW,UAAU,KAAK,YAAY,sCAAsC,EAAE,aAAa,KAAK;AAClG;AAEO,MAAM,0BAA0B;",
6
+ "names": []
7
+ }
@@ -0,0 +1,77 @@
1
+ import * as React from "react";
2
+ import { styled, xStyledCommonProps } from "@elliemae/ds-system";
3
+ import { Grid } from "@elliemae/ds-grid";
4
+ import { DSCardV2Name, CARD_V2_SLOTS } from "./constants/index.js";
5
+ const CardContainer = styled(Grid, { name: DSCardV2Name, slot: CARD_V2_SLOTS.CARD_CONTAINER })`
6
+ align-items: center;
7
+ justify-content: space-between;
8
+ width: 100%;
9
+ height: 56px;
10
+ padding: 8px 16px;
11
+ position: relative;
12
+ border: ${({ theme, hasBorder }) => hasBorder ? `1px solid ${theme.colors.neutral["100"]}` : ""};
13
+ &:before {
14
+ content: '';
15
+ border-bottom: 1px solid ${(props) => props.theme.colors.neutral["100"]};
16
+ position: absolute;
17
+ margin: 0 auto;
18
+ width: 90%;
19
+ bottom: 0;
20
+ }
21
+ &:last-child::before {
22
+ content: none;
23
+ }
24
+ ${xStyledCommonProps}
25
+ `;
26
+ const LeftSection = styled("div", { name: DSCardV2Name, slot: CARD_V2_SLOTS.LEFT_SECTION })`
27
+ display: flex;
28
+ align-items: center;
29
+ `;
30
+ const LeftAddon = styled("div", { name: DSCardV2Name, slot: CARD_V2_SLOTS.LEFT_ADDON })`
31
+ height: fit-content;
32
+ width: fit-content;
33
+ margin-right: 16px;
34
+ cursor: pointer;
35
+ `;
36
+ const RightAddonSection = styled("div", { name: DSCardV2Name, slot: CARD_V2_SLOTS.RIGHT_ADDON_SECTION })`
37
+ display: flex;
38
+ align-items: center;
39
+ width: fit-content;
40
+ `;
41
+ const RightAddon = styled("div", { name: DSCardV2Name, slot: CARD_V2_SLOTS.RIGHT_ADDON })`
42
+ height: fit-content;
43
+ width: fit-content;
44
+ cursor: pointer;
45
+ `;
46
+ const Separator = styled("div", { name: DSCardV2Name, slot: CARD_V2_SLOTS.SEPARATOR })`
47
+ width: 0px;
48
+ height: 24px;
49
+ border-right: 1px solid ${(props) => props.theme.colors.neutral["300"]};
50
+ margin: 0 8px;
51
+ `;
52
+ const MainSection = styled("div", { name: DSCardV2Name, slot: CARD_V2_SLOTS.MAIN_SECTION })`
53
+ display: flex;
54
+ flex-direction: column;
55
+ `;
56
+ const Title = styled("h3", { name: DSCardV2Name, slot: CARD_V2_SLOTS.TITLE })`
57
+ margin: 0;
58
+ font-size: 16px;
59
+ font-weight: ${(props) => props.theme.fontWeights.regular};
60
+ color: ${(props) => props.theme.colors.neutral["800"]};
61
+ `;
62
+ const Description = styled("p", { name: DSCardV2Name, slot: CARD_V2_SLOTS.DESCRIPTION })`
63
+ margin: 0;
64
+ color: ${(props) => props.theme.colors.neutral["600"]};
65
+ `;
66
+ export {
67
+ CardContainer,
68
+ Description,
69
+ LeftAddon,
70
+ LeftSection,
71
+ MainSection,
72
+ RightAddon,
73
+ RightAddonSection,
74
+ Separator,
75
+ Title
76
+ };
77
+ //# sourceMappingURL=styles.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../scripts/build/transpile/react-shim.js", "../../src/styles.tsx"],
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { styled, xStyledCommonProps } from '@elliemae/ds-system';\nimport { Grid } from '@elliemae/ds-grid';\nimport { DSCardV2Name, CARD_V2_SLOTS } from './constants/index.js';\n\nconst CardContainer = styled(Grid, { name: DSCardV2Name, slot: CARD_V2_SLOTS.CARD_CONTAINER })<{ hasBorder?: boolean }>`\n align-items: center;\n justify-content: space-between;\n width: 100%;\n height: 56px;\n padding: 8px 16px;\n position: relative;\n border: ${({ theme, hasBorder }) => (hasBorder ? `1px solid ${theme.colors.neutral['100']}` : '')};\n &:before {\n content: '';\n border-bottom: 1px solid ${(props) => props.theme.colors.neutral['100']};\n position: absolute;\n margin: 0 auto;\n width: 90%;\n bottom: 0;\n }\n &:last-child::before {\n content: none;\n }\n ${xStyledCommonProps}\n`;\n\nconst LeftSection = styled('div', { name: DSCardV2Name, slot: CARD_V2_SLOTS.LEFT_SECTION })`\n display: flex;\n align-items: center;\n`;\n\nconst LeftAddon = styled('div', { name: DSCardV2Name, slot: CARD_V2_SLOTS.LEFT_ADDON })`\n height: fit-content;\n width: fit-content;\n margin-right: 16px;\n cursor: pointer;\n`;\n\nconst RightAddonSection = styled('div', { name: DSCardV2Name, slot: CARD_V2_SLOTS.RIGHT_ADDON_SECTION })`\n display: flex;\n align-items: center;\n width: fit-content;\n`;\n\nconst RightAddon = styled('div', { name: DSCardV2Name, slot: CARD_V2_SLOTS.RIGHT_ADDON })`\n height: fit-content;\n width: fit-content;\n cursor: pointer;\n`;\n\nconst Separator = styled('div', { name: DSCardV2Name, slot: CARD_V2_SLOTS.SEPARATOR })`\n width: 0px;\n height: 24px;\n border-right: 1px solid ${(props) => props.theme.colors.neutral['300']};\n margin: 0 8px;\n`;\n\nconst MainSection = styled('div', { name: DSCardV2Name, slot: CARD_V2_SLOTS.MAIN_SECTION })`\n display: flex;\n flex-direction: column;\n`;\n\nconst Title = styled('h3', { name: DSCardV2Name, slot: CARD_V2_SLOTS.TITLE })`\n margin: 0;\n font-size: 16px;\n font-weight: ${(props) => props.theme.fontWeights.regular};\n color: ${(props) => props.theme.colors.neutral['800']};\n`;\n\nconst Description = styled('p', { name: DSCardV2Name, slot: CARD_V2_SLOTS.DESCRIPTION })`\n margin: 0;\n color: ${(props) => props.theme.colors.neutral['600']};\n`;\n\nexport {\n CardContainer,\n LeftSection,\n LeftAddon,\n RightAddonSection,\n RightAddon,\n Separator,\n MainSection,\n Title,\n Description,\n};\n"],
5
+ "mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,QAAQ,0BAA0B;AAC3C,SAAS,YAAY;AACrB,SAAS,cAAc,qBAAqB;AAE5C,MAAM,gBAAgB,OAAO,MAAM,EAAE,MAAM,cAAc,MAAM,cAAc,eAAe,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,YAOjF,CAAC,EAAE,OAAO,UAAU,MAAO,YAAY,aAAa,MAAM,OAAO,QAAQ,KAAK,MAAM;AAAA;AAAA;AAAA,+BAGjE,CAAC,UAAU,MAAM,MAAM,OAAO,QAAQ,KAAK;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAStE;AAAA;AAGJ,MAAM,cAAc,OAAO,OAAO,EAAE,MAAM,cAAc,MAAM,cAAc,aAAa,CAAC;AAAA;AAAA;AAAA;AAK1F,MAAM,YAAY,OAAO,OAAO,EAAE,MAAM,cAAc,MAAM,cAAc,WAAW,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA;AAOtF,MAAM,oBAAoB,OAAO,OAAO,EAAE,MAAM,cAAc,MAAM,cAAc,oBAAoB,CAAC;AAAA;AAAA;AAAA;AAAA;AAMvG,MAAM,aAAa,OAAO,OAAO,EAAE,MAAM,cAAc,MAAM,cAAc,YAAY,CAAC;AAAA;AAAA;AAAA;AAAA;AAMxF,MAAM,YAAY,OAAO,OAAO,EAAE,MAAM,cAAc,MAAM,cAAc,UAAU,CAAC;AAAA;AAAA;AAAA,4BAGzD,CAAC,UAAU,MAAM,MAAM,OAAO,QAAQ,KAAK;AAAA;AAAA;AAIvE,MAAM,cAAc,OAAO,OAAO,EAAE,MAAM,cAAc,MAAM,cAAc,aAAa,CAAC;AAAA;AAAA;AAAA;AAK1F,MAAM,QAAQ,OAAO,MAAM,EAAE,MAAM,cAAc,MAAM,cAAc,MAAM,CAAC;AAAA;AAAA;AAAA,iBAG3D,CAAC,UAAU,MAAM,MAAM,YAAY;AAAA,WACzC,CAAC,UAAU,MAAM,MAAM,OAAO,QAAQ,KAAK;AAAA;AAGtD,MAAM,cAAc,OAAO,KAAK,EAAE,MAAM,cAAc,MAAM,cAAc,YAAY,CAAC;AAAA;AAAA,WAE5E,CAAC,UAAU,MAAM,MAAM,OAAO,QAAQ,KAAK;AAAA;",
6
+ "names": []
7
+ }
@@ -0,0 +1,15 @@
1
+ /// <reference types="lodash" />
2
+ import { useGetGlobalAttributes, useGetXstyledProps } from '@elliemae/ds-utilities';
3
+ import { type DSCardV2T } from '../react-desc-prop-types.js';
4
+ export interface CardV2CTX {
5
+ propsWithDefault: DSCardV2T.InternalProps;
6
+ globalProps: ReturnType<typeof useGetGlobalAttributes>;
7
+ xstyledProps: ReturnType<typeof useGetXstyledProps>;
8
+ instanceUid: string;
9
+ }
10
+ export declare const useCardV2: (propsFromUser: DSCardV2T.Props) => {
11
+ propsWithDefault: DSCardV2T.InternalProps;
12
+ globalProps: import("lodash").Omit<import("@elliemae/ds-utilities").GlobalAttributesT<Element>, "cols" | "rows" | "wrap">;
13
+ xstyledProps: import("@elliemae/ds-utilities").XstyledProps;
14
+ instanceUid: string;
15
+ };
@@ -0,0 +1,3 @@
1
+ import type { WeakValidationMap } from 'react';
2
+ import { type DSCardV2T } from '../react-desc-prop-types.js';
3
+ export declare const useValidateProps: (props: DSCardV2T.InternalProps, propTypes: WeakValidationMap<unknown>) => void;
@@ -0,0 +1,16 @@
1
+ export declare const DSCardV2Name = "DSCardV2";
2
+ export declare const CARD_V2_SLOTS: {
3
+ readonly CARD_CONTAINER: "container";
4
+ readonly LEFT_SECTION: "left-section";
5
+ readonly LEFT_ADDON: "left-addon";
6
+ readonly RIGHT_ADDON: "right-addon";
7
+ readonly RIGHT_ADDON_SECTION: "right-addon-section";
8
+ readonly SEPARATOR: "separator";
9
+ readonly MAIN_SECTION: "main-section";
10
+ readonly TITLE: "title";
11
+ readonly DESCRIPTION: "description";
12
+ };
13
+ export declare const CARD_V2_DATA_TESTID: {
14
+ CARD_CONTAINER: string;
15
+ CARD_HEADER: string;
16
+ };
@@ -0,0 +1,3 @@
1
+ export { DSCardV2, DSCardV2 as CustomCard, DSCardV2WithSchema, DSCardV2WithSchema as DSCardCustomWithSchema, } from './DSCardV2.js';
2
+ export { type DSCardV2T } from './react-desc-prop-types.js';
3
+ export { CARD_V2_DATA_TESTID } from './constants/index.js';
@@ -0,0 +1,22 @@
1
+ import type { WeakValidationMap } from 'react';
2
+ import type { GlobalAttributesT, XstyledProps, DSPropTypesSchema } from '@elliemae/ds-utilities';
3
+ export declare namespace DSCardV2T {
4
+ interface RequiredProps {
5
+ title: string;
6
+ }
7
+ interface DefaultProps {
8
+ hasBorder?: boolean;
9
+ }
10
+ interface OptionalProps {
11
+ description: string;
12
+ leftAddon: JSX.Element;
13
+ rightAddon: JSX.Element | JSX.Element[];
14
+ }
15
+ interface Props extends Partial<DefaultProps>, OptionalProps, Omit<GlobalAttributesT<HTMLButtonElement>, keyof DefaultProps | keyof OptionalProps | keyof RequiredProps | keyof XstyledProps>, XstyledProps, RequiredProps {
16
+ }
17
+ interface InternalProps extends DefaultProps, OptionalProps, Omit<GlobalAttributesT<HTMLButtonElement>, keyof DefaultProps | keyof OptionalProps | keyof RequiredProps | keyof XstyledProps>, XstyledProps, RequiredProps {
18
+ }
19
+ }
20
+ export declare const defaultProps: DSCardV2T.DefaultProps;
21
+ export declare const DSCardV2PropTypes: DSPropTypesSchema<DSCardV2T.Props>;
22
+ export declare const DSCardV2PropTypesSchema: WeakValidationMap<DSCardV2T.Props>;
@@ -0,0 +1,13 @@
1
+ /// <reference types="react" />
2
+ declare const CardContainer: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("@elliemae/ds-grid/dist/types/react-desc-prop-types.js").DSGridT.Props & import("react").RefAttributes<HTMLDivElement>>, import("@elliemae/ds-system").Theme, {
3
+ hasBorder?: boolean | undefined;
4
+ } & import("@elliemae/ds-system").OwnerInterface, never>;
5
+ declare const LeftSection: import("styled-components").StyledComponent<"div", import("@elliemae/ds-system").Theme, object & import("@elliemae/ds-system").OwnerInterface, never>;
6
+ declare const LeftAddon: import("styled-components").StyledComponent<"div", import("@elliemae/ds-system").Theme, object & import("@elliemae/ds-system").OwnerInterface, never>;
7
+ declare const RightAddonSection: import("styled-components").StyledComponent<"div", import("@elliemae/ds-system").Theme, object & import("@elliemae/ds-system").OwnerInterface, never>;
8
+ declare const RightAddon: import("styled-components").StyledComponent<"div", import("@elliemae/ds-system").Theme, object & import("@elliemae/ds-system").OwnerInterface, never>;
9
+ declare const Separator: import("styled-components").StyledComponent<"div", import("@elliemae/ds-system").Theme, object & import("@elliemae/ds-system").OwnerInterface, never>;
10
+ declare const MainSection: import("styled-components").StyledComponent<"div", import("@elliemae/ds-system").Theme, object & import("@elliemae/ds-system").OwnerInterface, never>;
11
+ declare const Title: import("styled-components").StyledComponent<"h3", import("@elliemae/ds-system").Theme, object & import("@elliemae/ds-system").OwnerInterface, never>;
12
+ declare const Description: import("styled-components").StyledComponent<"p", import("@elliemae/ds-system").Theme, object & import("@elliemae/ds-system").OwnerInterface, never>;
13
+ export { CardContainer, LeftSection, LeftAddon, RightAddonSection, RightAddon, Separator, MainSection, Title, Description, };
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
package/package.json ADDED
@@ -0,0 +1,85 @@
1
+ {
2
+ "name": "@elliemae/ds-card-v2",
3
+ "version": "3.21.0-next.1",
4
+ "license": "MIT",
5
+ "description": "ICE MT - Dimsum - Card V2",
6
+ "files": [
7
+ "dist"
8
+ ],
9
+ "module": "./dist/esm/index.js",
10
+ "main": "./dist/cjs/index.js",
11
+ "types": "./dist/types/index.d.ts",
12
+ "exports": {
13
+ ".": {
14
+ "import": "./dist/esm/index.js",
15
+ "require": "./dist/cjs/index.js"
16
+ },
17
+ "./styles": {
18
+ "import": "./dist/esm/styles.js",
19
+ "require": "./dist/cjs/styles.js"
20
+ },
21
+ "./propTypes": {
22
+ "import": "./dist/esm/propTypes.js",
23
+ "require": "./dist/cjs/propTypes.js"
24
+ },
25
+ "./DSCardV2": {
26
+ "import": "./dist/esm/DSCardV2.js",
27
+ "require": "./dist/cjs/DSCardV2.js"
28
+ }
29
+ },
30
+ "sideEffects": [
31
+ "*.css",
32
+ "*.scss"
33
+ ],
34
+ "repository": {
35
+ "type": "git",
36
+ "url": "https://git.elliemae.io/platform-ui/dimsum.git"
37
+ },
38
+ "engines": {
39
+ "pnpm": ">=6",
40
+ "node": ">=16"
41
+ },
42
+ "author": "ICE MT",
43
+ "jestSonar": {
44
+ "sonar56x": true,
45
+ "reportPath": "reports",
46
+ "reportFile": "tests.xml",
47
+ "indent": 4
48
+ },
49
+ "dependencies": {
50
+ "@elliemae/ds-button": "3.21.0-next.1",
51
+ "@elliemae/ds-header": "3.21.0-next.1",
52
+ "@elliemae/ds-grid": "3.21.0-next.1",
53
+ "@elliemae/ds-system": "3.21.0-next.1",
54
+ "@elliemae/ds-utilities": "3.21.0-next.1",
55
+ "@elliemae/ds-separator": "3.21.0-next.1",
56
+ "@elliemae/ds-truncated-tooltip-text": "3.21.0-next.1"
57
+ },
58
+ "devDependencies": {
59
+ "styled-components": "~5.3.9"
60
+ },
61
+ "peerDependencies": {
62
+ "@testing-library/jest-dom": "~5.16.4",
63
+ "@testing-library/react": "~12.1.3",
64
+ "@testing-library/user-event": "~13.5.0",
65
+ "react": "^17.0.2",
66
+ "react-dom": "^17.0.2",
67
+ "styled-components": "~5.3.9"
68
+ },
69
+ "publishConfig": {
70
+ "access": "public",
71
+ "typeSafety": false
72
+ },
73
+ "scripts": {
74
+ "dev": "cross-env NODE_ENV=development node ../../scripts/build/build.mjs --watch",
75
+ "test": "node ../../scripts/testing/test.mjs",
76
+ "lint": "node ../../scripts/lint.mjs --fix",
77
+ "eslint:fix": "eslint --ext='.js,.jsx,.test.js,.ts,.tsx' --fix --config='../../.eslintrc.js' src/",
78
+ "dts": "node ../../scripts/dts.mjs",
79
+ "dts:withdeps": "pnpm --filter {.}... dts",
80
+ "build": "cross-env NODE_ENV=production node ../../scripts/build/build.mjs",
81
+ "dev:build": "pnpm --filter {.}... build",
82
+ "dev:install": "pnpm --filter {.}... i --no-lockfile && pnpm run dev:build",
83
+ "checkDeps": "npx -yes ../ds-codemods check-missing-packages --projectFolderPath=\"./\" --ignorePackagesGlobPattern=\"\" --ignoreFilesGlobPattern=\"**/test-ables/*,**/tests/*\""
84
+ }
85
+ }