@elliemae/ds-card-v2 3.60.0-next.38 → 3.60.0-next.39

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.
@@ -36,19 +36,27 @@ var React = __toESM(require("react"));
36
36
  var import_jsx_runtime = require("react/jsx-runtime");
37
37
  var import_ds_props_helpers = require("@elliemae/ds-props-helpers");
38
38
  var import_ds_truncated_tooltip_text = require("@elliemae/ds-truncated-tooltip-text");
39
- var import_ds_legacy_header = require("@elliemae/ds-legacy-header");
39
+ var import_ds_typography = require("@elliemae/ds-typography");
40
+ var import_ds_system = require("@elliemae/ds-system");
40
41
  var import_react_desc_prop_types = require("./react-desc-prop-types.js");
41
42
  var import_useCardV2 = require("./config/useCardV2.js");
42
43
  var import_constants = require("./constants/index.js");
43
44
  var import_styles = require("./styles.js");
44
- const getCol = (rightAddon) => {
45
+ const getCols = (rightAddon, isSmall) => {
46
+ if (isSmall) return ["1fr"];
45
47
  if (!rightAddon) return ["1fr"];
46
- return ["1fr", "auto"];
48
+ return ["auto", "minmax(0, 1fr)", "auto"];
49
+ };
50
+ const getRows = (isSmall) => {
51
+ if (isSmall) return ["auto", "auto", "auto"];
52
+ return ["auto"];
47
53
  };
48
54
  const DSCardV2 = (props) => {
49
55
  const { propsWithDefault, globalProps, xstyledProps } = (0, import_useCardV2.useCardV2)(props);
50
- const { hasBorder, title, leftAddon, rightAddon, description } = propsWithDefault;
56
+ const { hasBorder, title, leftAddon, rightAddon, description, wrapText } = propsWithDefault;
51
57
  const { getOwnerProps, getOwnerPropsArguments } = (0, import_ds_props_helpers.useOwnerProps)(propsWithDefault);
58
+ const layoutMode = (0, import_ds_system.useGetLayoutMode)();
59
+ const isSmall = layoutMode === "s" || layoutMode === "xs";
52
60
  return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_truncated_tooltip_text.TooltipTextProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
53
61
  import_styles.CardContainer,
54
62
  {
@@ -57,43 +65,67 @@ const DSCardV2 = (props) => {
57
65
  ...globalProps,
58
66
  ...xstyledProps,
59
67
  hasBorder,
60
- cols: getCol(rightAddon),
68
+ cols: getCols(rightAddon, isSmall),
69
+ rows: getRows(isSmall),
61
70
  getOwnerProps,
62
71
  getOwnerPropsArguments,
63
72
  children: [
64
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_styles.LeftSection, { children: [
65
- leftAddon && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_styles.LeftAddon, { getOwnerProps, getOwnerPropsArguments, children: leftAddon }),
66
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
67
- import_styles.MainSection,
68
- {
69
- style: {
70
- maxWidth: leftAddon ? "calc(100% - 40px)" : "100%"
71
- },
72
- getOwnerProps,
73
- getOwnerPropsArguments,
74
- children: [
75
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
76
- import_ds_legacy_header.DSHeader,
77
- {
78
- "data-testid": import_constants.CARD_V2_DATA_TESTID.CARD_HEADER,
79
- fontSize: "16px",
80
- fontWeight: "regular",
81
- color: "neutral.800",
82
- text: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_truncated_tooltip_text.DSTruncatedTooltipText, { value: title })
83
- }
84
- ),
85
- description && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_styles.Description, { getOwnerProps, getOwnerPropsArguments, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_truncated_tooltip_text.DSTruncatedTooltipText, { value: description }) })
86
- ]
87
- }
88
- )
89
- ] }),
90
- Array.isArray(rightAddon) && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_styles.RightAddonSection, { getOwnerProps, getOwnerPropsArguments, children: [
91
- rightAddon[0] ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_styles.RightAddon, { getOwnerProps, getOwnerPropsArguments, children: rightAddon[0] }) : null,
92
- rightAddon[1] ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
93
- rightAddon.length > 1 && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_styles.Separator, { getOwnerProps, getOwnerPropsArguments }),
94
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_styles.RightAddon, { getOwnerProps, getOwnerPropsArguments, children: rightAddon[1] })
95
- ] }) : null
96
- ] })
73
+ leftAddon && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
74
+ import_styles.LeftAddon,
75
+ {
76
+ style: {
77
+ gridColumn: isSmall ? "1" : "1",
78
+ gridRow: isSmall ? "1" : "1",
79
+ justifySelf: isSmall ? "center" : "start"
80
+ },
81
+ getOwnerProps,
82
+ getOwnerPropsArguments,
83
+ children: leftAddon
84
+ }
85
+ ),
86
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
87
+ import_styles.MainSection,
88
+ {
89
+ style: {
90
+ gridColumn: isSmall ? "1" : "2",
91
+ gridRow: isSmall ? "2" : "1",
92
+ textAlign: isSmall ? "center" : "left"
93
+ },
94
+ getOwnerProps,
95
+ getOwnerPropsArguments,
96
+ children: [
97
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
98
+ import_styles.Title,
99
+ {
100
+ "data-testid": import_constants.CARD_V2_DATA_TESTID.CARD_HEADER,
101
+ getOwnerProps,
102
+ getOwnerPropsArguments,
103
+ children: wrapText ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_typography.DSTypography, { variant: import_ds_typography.TYPOGRAPHY_VARIANTS.B1, as: "span", children: title }) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_truncated_tooltip_text.DSTruncatedTooltipText, { value: title })
104
+ }
105
+ ),
106
+ description && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_styles.Description, { getOwnerProps, getOwnerPropsArguments, children: wrapText ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_typography.DSTypography, { variant: import_ds_typography.TYPOGRAPHY_VARIANTS.B1, as: "span", children: description }) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_truncated_tooltip_text.DSTruncatedTooltipText, { value: description }) })
107
+ ]
108
+ }
109
+ ),
110
+ Array.isArray(rightAddon) && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
111
+ import_styles.RightAddonSection,
112
+ {
113
+ style: {
114
+ gridColumn: isSmall ? "1" : "3",
115
+ gridRow: isSmall ? "3" : "1",
116
+ justifySelf: isSmall ? "center" : "end"
117
+ },
118
+ getOwnerProps,
119
+ getOwnerPropsArguments,
120
+ children: [
121
+ rightAddon[0] ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_styles.RightAddon, { getOwnerProps, getOwnerPropsArguments, children: rightAddon[0] }) : null,
122
+ rightAddon[1] ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
123
+ rightAddon.length > 1 && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_styles.Separator, { getOwnerProps, getOwnerPropsArguments }),
124
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_styles.RightAddon, { getOwnerProps, getOwnerPropsArguments, children: rightAddon[1] })
125
+ ] }) : null
126
+ ]
127
+ }
128
+ )
97
129
  ]
98
130
  }
99
131
  ) });
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/DSCardV2.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["import React from 'react';\nimport { describe, useOwnerProps } from '@elliemae/ds-props-helpers';\nimport { DSTruncatedTooltipText, TooltipTextProvider } from '@elliemae/ds-truncated-tooltip-text';\nimport { DSHeader } from '@elliemae/ds-legacy-header';\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 {\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 const { getOwnerProps, getOwnerPropsArguments } = useOwnerProps(propsWithDefault);\n return (\n <TooltipTextProvider>\n <CardContainer\n data-component-selector=\"ds-card-v2\"\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 getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n >\n <LeftSection>\n {leftAddon && (\n <LeftAddon getOwnerProps={getOwnerProps} getOwnerPropsArguments={getOwnerPropsArguments}>\n {leftAddon}\n </LeftAddon>\n )}\n <MainSection\n style={{\n maxWidth: leftAddon ? 'calc(100% - 40px)' : '100%',\n }}\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\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 getOwnerProps={getOwnerProps} getOwnerPropsArguments={getOwnerPropsArguments}>\n <DSTruncatedTooltipText value={description} />\n </Description>\n )}\n </MainSection>\n </LeftSection>\n {Array.isArray(rightAddon) && (\n <RightAddonSection getOwnerProps={getOwnerProps} getOwnerPropsArguments={getOwnerPropsArguments}>\n {rightAddon[0] ? (\n <RightAddon getOwnerProps={getOwnerProps} getOwnerPropsArguments={getOwnerPropsArguments}>\n {rightAddon[0]}\n </RightAddon>\n ) : null}\n {rightAddon[1] ? (\n <>\n {rightAddon.length > 1 && (\n <Separator getOwnerProps={getOwnerProps} getOwnerPropsArguments={getOwnerPropsArguments} />\n )}\n <RightAddon getOwnerProps={getOwnerProps} getOwnerPropsArguments={getOwnerPropsArguments}>\n {rightAddon[1]}\n </RightAddon>\n </>\n ) : null}\n </RightAddonSection>\n )}\n </CardContainer>\n </TooltipTextProvider>\n );\n};\n\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;ADyCX;AAxCZ,8BAAwC;AACxC,uCAA4D;AAC5D,8BAAyB;AACzB,mCAAwD;AACxD,uBAA0B;AAC1B,uBAAkD;AAClD,oBASO;AAEP,MAAM,SAAS,CAAC,eAAsD;AACpE,MAAI,CAAC,WAAY,QAAO,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,QAAM,EAAE,eAAe,uBAAuB,QAAI,uCAAc,gBAAgB;AAChF,SACE,4CAAC,wDACC;AAAA,IAAC;AAAA;AAAA,MACC,2BAAwB;AAAA,MACxB,eAAa,qCAAoB;AAAA,MAChC,GAAG;AAAA,MACH,GAAG;AAAA,MACJ;AAAA,MACA,MAAM,OAAO,UAAU;AAAA,MACvB;AAAA,MACA;AAAA,MAEA;AAAA,qDAAC,6BACE;AAAA,uBACC,4CAAC,2BAAU,eAA8B,wBACtC,qBACH;AAAA,UAEF;AAAA,YAAC;AAAA;AAAA,cACC,OAAO;AAAA,gBACL,UAAU,YAAY,sBAAsB;AAAA,cAC9C;AAAA,cACA;AAAA,cACA;AAAA,cAEA;AAAA;AAAA,kBAAC;AAAA;AAAA,oBACC,eAAa,qCAAoB;AAAA,oBACjC,UAAS;AAAA,oBACT,YAAW;AAAA,oBACX,OAAM;AAAA,oBACN,MAAM,4CAAC,2DAAuB,OAAO,OAAO;AAAA;AAAA,gBAC9C;AAAA,gBACC,eACC,4CAAC,6BAAY,eAA8B,wBACzC,sDAAC,2DAAuB,OAAO,aAAa,GAC9C;AAAA;AAAA;AAAA,UAEJ;AAAA,WACF;AAAA,QACC,MAAM,QAAQ,UAAU,KACvB,6CAAC,mCAAkB,eAA8B,wBAC9C;AAAA,qBAAW,CAAC,IACX,4CAAC,4BAAW,eAA8B,wBACvC,qBAAW,CAAC,GACf,IACE;AAAA,UACH,WAAW,CAAC,IACX,4EACG;AAAA,uBAAW,SAAS,KACnB,4CAAC,2BAAU,eAA8B,wBAAgD;AAAA,YAE3F,4CAAC,4BAAW,eAA8B,wBACvC,qBAAW,CAAC,GACf;AAAA,aACF,IACE;AAAA,WACN;AAAA;AAAA;AAAA,EAEJ,GACF;AAEJ;AAEA,SAAS,cAAc;AACvB,MAAM,yBAAqB,kCAAS,QAAQ;AAC5C,mBAAmB,YAAY;",
4
+ "sourcesContent": ["import React from 'react';\nimport { describe, useOwnerProps } from '@elliemae/ds-props-helpers';\nimport { DSTruncatedTooltipText, TooltipTextProvider } from '@elliemae/ds-truncated-tooltip-text';\nimport { DSTypography, TYPOGRAPHY_VARIANTS } from '@elliemae/ds-typography';\nimport { useGetLayoutMode } from '@elliemae/ds-system';\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 {\n CardContainer,\n LeftAddon,\n MainSection,\n Description,\n RightAddonSection,\n RightAddon,\n Separator,\n Title,\n} from './styles.js';\n\nconst getCols = (rightAddon: DSCardV2T.OptionalProps['rightAddon'], isSmall: boolean) => {\n if (isSmall) return ['1fr'];\n if (!rightAddon) return ['1fr'];\n return ['auto', 'minmax(0, 1fr)', 'auto'];\n};\n\nconst getRows = (isSmall: boolean) => {\n if (isSmall) return ['auto', 'auto', 'auto'];\n return ['auto'];\n};\n// eslint-disable-next-line complexity\nconst DSCardV2: React.ComponentType<DSCardV2T.Props> = (props) => {\n const { propsWithDefault, globalProps, xstyledProps } = useCardV2(props);\n const { hasBorder, title, leftAddon, rightAddon, description, wrapText } = propsWithDefault;\n const { getOwnerProps, getOwnerPropsArguments } = useOwnerProps(propsWithDefault);\n const layoutMode = useGetLayoutMode();\n const isSmall = layoutMode === 's' || layoutMode === 'xs';\n\n return (\n <TooltipTextProvider>\n <CardContainer\n data-component-selector=\"ds-card-v2\"\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={getCols(rightAddon, isSmall)}\n rows={getRows(isSmall)}\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n >\n {leftAddon && (\n <LeftAddon\n style={{\n gridColumn: isSmall ? '1' : '1',\n gridRow: isSmall ? '1' : '1',\n justifySelf: isSmall ? 'center' : 'start',\n }}\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n >\n {leftAddon}\n </LeftAddon>\n )}\n <MainSection\n style={{\n gridColumn: isSmall ? '1' : '2',\n gridRow: isSmall ? '2' : '1',\n textAlign: isSmall ? 'center' : 'left',\n }}\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n >\n <Title\n data-testid={CARD_V2_DATA_TESTID.CARD_HEADER}\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n >\n {wrapText ? (\n <DSTypography variant={TYPOGRAPHY_VARIANTS.B1} as=\"span\">\n {title}\n </DSTypography>\n ) : (\n <DSTruncatedTooltipText value={title} />\n )}\n </Title>\n {description && (\n <Description getOwnerProps={getOwnerProps} getOwnerPropsArguments={getOwnerPropsArguments}>\n {wrapText ? (\n <DSTypography variant={TYPOGRAPHY_VARIANTS.B1} as=\"span\">\n {description}\n </DSTypography>\n ) : (\n <DSTruncatedTooltipText value={description} />\n )}\n </Description>\n )}\n </MainSection>\n\n {Array.isArray(rightAddon) && (\n <RightAddonSection\n style={{\n gridColumn: isSmall ? '1' : '3',\n gridRow: isSmall ? '3' : '1',\n justifySelf: isSmall ? 'center' : 'end',\n }}\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n >\n {rightAddon[0] ? (\n <RightAddon getOwnerProps={getOwnerProps} getOwnerPropsArguments={getOwnerPropsArguments}>\n {rightAddon[0]}\n </RightAddon>\n ) : null}\n {rightAddon[1] ? (\n <>\n {rightAddon.length > 1 && (\n <Separator getOwnerProps={getOwnerProps} getOwnerPropsArguments={getOwnerPropsArguments} />\n )}\n <RightAddon getOwnerProps={getOwnerProps} getOwnerPropsArguments={getOwnerPropsArguments}>\n {rightAddon[1]}\n </RightAddon>\n </>\n ) : null}\n </RightAddonSection>\n )}\n </CardContainer>\n </TooltipTextProvider>\n );\n};\n\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;ADmDb;AAlDV,8BAAwC;AACxC,uCAA4D;AAC5D,2BAAkD;AAClD,uBAAiC;AACjC,mCAAwD;AACxD,uBAA0B;AAC1B,uBAAkD;AAClD,oBASO;AAEP,MAAM,UAAU,CAAC,YAAmD,YAAqB;AACvF,MA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AAS,yCAAoB,IAAI,IAAG,QAC/C,iBACH,IAEA,4CAAC,2DAAuB,OAAO,OAAO;AAAA;AAAA,cAE1C;AAAA,cACC,eACC,4CAAC,6BAAY,eAA8B,wBACxC,qBACC,4CAAC,qCAAa,SAAS,yCAAoB,IAAI,IAAG,QAC/C,uBACH,IAEA,4CAAC,2DAAuB,OAAO,aAAa,GAEhD;AAAA;AAAA;AAAA,QAEJ;AAAA,QAEC,MAAM,QAAQ,UAAU,KACvB;AAAA,UAAC;AAAA;AAAA,YACC,OAAO;AAAA,cACL,YAAY,UAAU,MAAM;AAAA,cAC5B,SAAS,UAAU,MAAM;AAAA,cACzB,aAAa,UAAU,WAAW;AAAA,YACpC;AAAA,YACA;AAAA,YACA;AAAA,YAEC;AAAA,yBAAW,CAAC,IACX,4CAAC,4BAAW,eAA8B,wBACvC,qBAAW,CAAC,GACf,IACE;AAAA,cACH,WAAW,CAAC,IACX,4EACG;AAAA,2BAAW,SAAS,KACnB,4CAAC,2BAAU,eAA8B,wBAAgD;AAAA,gBAE3F,4CAAC,4BAAW,eAA8B,wBACvC,qBAAW,CAAC,GACf;AAAA,iBACF,IACE;AAAA;AAAA;AAAA,QACN;AAAA;AAAA;AAAA,EAEJ,GACF;AAEJ;AAEA,SAAS,cAAc;AACvB,MAAM,yBAAqB,kCAAS,QAAQ;AAC5C,mBAAmB,YAAY;",
6
6
  "names": []
7
7
  }
@@ -44,7 +44,8 @@ const CARD_V2_SLOTS = {
44
44
  RIGHT_ADDON_SECTION: "right-addon-section",
45
45
  SEPARATOR: "separator",
46
46
  MAIN_SECTION: "main-section",
47
- DESCRIPTION: "description"
47
+ DESCRIPTION: "description",
48
+ TITLE: "title"
48
49
  };
49
50
  const CARD_V2_DATA_TESTID = {
50
51
  ...(0, import_ds_system.slotObjectToDataTestIds)(DSCardV2Name, CARD_V2_SLOTS),
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
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 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,aAAa;AACf;AAGO,MAAM,sBAAsB;AAAA,EACjC,OAAG,0CAAwB,cAAc,aAAa;AAAA,EACtD,gBAAgB;AAAA,EAChB,aAAa;AACf;",
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 DESCRIPTION: 'description',\n TITLE: 'title',\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,aAAa;AAAA,EACb,OAAO;AACT;AAGO,MAAM,sBAAsB;AAAA,EACjC,OAAG,0CAAwB,cAAc,aAAa;AAAA,EACtD,gBAAgB;AAAA,EAChB,aAAa;AACf;",
6
6
  "names": []
7
7
  }
@@ -36,7 +36,8 @@ module.exports = __toCommonJS(react_desc_prop_types_exports);
36
36
  var React = __toESM(require("react"));
37
37
  var import_ds_props_helpers = require("@elliemae/ds-props-helpers");
38
38
  const defaultProps = {
39
- hasBorder: false
39
+ hasBorder: false,
40
+ wrapText: true
40
41
  };
41
42
  const DSCardV2PropTypes = {
42
43
  ...import_ds_props_helpers.globalAttributesPropTypes,
@@ -60,7 +61,11 @@ const DSCardV2PropTypes = {
60
61
  /**
61
62
  * Wheter if the card has border or not
62
63
  */
63
- hasBorder: import_ds_props_helpers.PropTypes.bool.description("Wheter if the card has border or not").defaultValue(false)
64
+ hasBorder: import_ds_props_helpers.PropTypes.bool.description("Wheter if the card has border or not").defaultValue(false),
65
+ /**
66
+ * Whether title and description wrap instead of truncating with tooltip
67
+ */
68
+ wrapText: import_ds_props_helpers.PropTypes.bool.description("Whether title and description wrap instead of truncating with tooltip").defaultValue(true)
64
69
  };
65
70
  const DSCardV2PropTypesSchema = DSCardV2PropTypes;
66
71
  //# sourceMappingURL=react-desc-prop-types.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/react-desc-prop-types.ts", "../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["import type { WeakValidationMap } from 'react';\nimport type { GlobalAttributesT, XstyledProps, DSPropTypesSchema } from '@elliemae/ds-props-helpers';\nimport { PropTypes, globalAttributesPropTypes, xstyledPropTypes } from '@elliemae/ds-props-helpers';\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,8BAAuE;AAsChE,MAAM,eAAuC;AAAA,EAClD,WAAW;AACb;AAEO,MAAM,oBAAwD;AAAA,EACnE,GAAG;AAAA,EACH,GAAG;AAAA;AAAA;AAAA;AAAA,EAIH,OAAO,kCAAU,OAAO,WAAW,YAAY,8BAA8B;AAAA;AAAA;AAAA;AAAA,EAI7E,aAAa,kCAAU,OAAO,YAAY,wCAAwC;AAAA;AAAA;AAAA;AAAA,EAIlF,WAAW,kCAAU,QAAQ,YAAY,YAAY;AAAA;AAAA;AAAA;AAAA,EAIrD,YAAY,kCAAU,MAAM,YAAY,oCAAoC;AAAA;AAAA;AAAA;AAAA,EAI5E,WAAW,kCAAU,KAAK,YAAY,sCAAsC,EAAE,aAAa,KAAK;AAClG;AAEO,MAAM,0BAA0B;",
4
+ "sourcesContent": ["import type { WeakValidationMap } from 'react';\nimport type { GlobalAttributesT, XstyledProps, DSPropTypesSchema } from '@elliemae/ds-props-helpers';\nimport { PropTypes, globalAttributesPropTypes, xstyledPropTypes } from '@elliemae/ds-props-helpers';\n\nexport declare namespace DSCardV2T {\n export interface RequiredProps {\n title: string;\n }\n\n export interface DefaultProps {\n hasBorder?: boolean;\n wrapText?: 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 wrapText: true,\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 * Whether title and description wrap instead of truncating with tooltip\n */\n wrapText: PropTypes.bool\n .description('Whether title and description wrap instead of truncating with tooltip')\n .defaultValue(true),\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,8BAAuE;AAuChE,MAAM,eAAuC;AAAA,EAClD,WAAW;AAAA,EACX,UAAU;AACZ;AAEO,MAAM,oBAAwD;AAAA,EACnE,GAAG;AAAA,EACH,GAAG;AAAA;AAAA;AAAA;AAAA,EAIH,OAAO,kCAAU,OAAO,WAAW,YAAY,8BAA8B;AAAA;AAAA;AAAA;AAAA,EAI7E,aAAa,kCAAU,OAAO,YAAY,wCAAwC;AAAA;AAAA;AAAA;AAAA,EAIlF,WAAW,kCAAU,QAAQ,YAAY,YAAY;AAAA;AAAA;AAAA;AAAA,EAIrD,YAAY,kCAAU,MAAM,YAAY,oCAAoC;AAAA;AAAA;AAAA;AAAA,EAI5E,WAAW,kCAAU,KAAK,YAAY,sCAAsC,EAAE,aAAa,KAAK;AAAA;AAAA;AAAA;AAAA,EAIhG,UAAU,kCAAU,KACjB,YAAY,uEAAuE,EACnF,aAAa,IAAI;AACtB;AAEO,MAAM,0BAA0B;",
6
6
  "names": []
7
7
  }
@@ -31,11 +31,11 @@ __export(styles_exports, {
31
31
  CardContainer: () => CardContainer,
32
32
  Description: () => Description,
33
33
  LeftAddon: () => LeftAddon,
34
- LeftSection: () => LeftSection,
35
34
  MainSection: () => MainSection,
36
35
  RightAddon: () => RightAddon,
37
36
  RightAddonSection: () => RightAddonSection,
38
- Separator: () => Separator
37
+ Separator: () => Separator,
38
+ Title: () => Title
39
39
  });
40
40
  module.exports = __toCommonJS(styles_exports);
41
41
  var React = __toESM(require("react"));
@@ -46,7 +46,7 @@ const CardContainer = (0, import_ds_system.styled)(import_ds_grid.Grid, { name:
46
46
  align-items: center;
47
47
  justify-content: space-between;
48
48
  width: 100%;
49
- height: 56px;
49
+ min-height: 56px;
50
50
  padding: 8px 16px;
51
51
  position: relative;
52
52
  border: ${({ theme, hasBorder }) => hasBorder ? `1px solid ${theme.colors.neutral["100"]}` : ""};
@@ -63,10 +63,6 @@ const CardContainer = (0, import_ds_system.styled)(import_ds_grid.Grid, { name:
63
63
  }
64
64
  ${import_ds_system.xStyledCommonProps}
65
65
  `;
66
- const LeftSection = (0, import_ds_system.styled)("div", { name: import_constants.DSCardV2Name, slot: import_constants.CARD_V2_SLOTS.LEFT_SECTION })`
67
- display: flex;
68
- align-items: center;
69
- `;
70
66
  const LeftAddon = (0, import_ds_system.styled)("div", { name: import_constants.DSCardV2Name, slot: import_constants.CARD_V2_SLOTS.LEFT_ADDON })`
71
67
  height: fit-content;
72
68
  width: fit-content;
@@ -92,6 +88,15 @@ const Separator = (0, import_ds_system.styled)("div", { name: import_constants.D
92
88
  const MainSection = (0, import_ds_system.styled)("div", { name: import_constants.DSCardV2Name, slot: import_constants.CARD_V2_SLOTS.MAIN_SECTION })`
93
89
  display: flex;
94
90
  flex-direction: column;
91
+ min-width: 0;
92
+ `;
93
+ const Title = (0, import_ds_system.styled)("h3", { name: import_constants.DSCardV2Name, slot: import_constants.CARD_V2_SLOTS.TITLE })`
94
+ margin: 0;
95
+ padding: 0;
96
+ font-size: 16px;
97
+ font-weight: ${({ theme }) => theme.fontWeights.regular};
98
+ color: ${({ theme }) => theme.colors.neutral["800"]};
99
+ line-height: 1;
95
100
  `;
96
101
  const Description = (0, import_ds_system.styled)("p", { name: import_constants.DSCardV2Name, slot: import_constants.CARD_V2_SLOTS.DESCRIPTION })`
97
102
  margin: 0;
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
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 Description = styled('p', { name: DSCardV2Name, slot: CARD_V2_SLOTS.DESCRIPTION })`\n margin: 0;\n color: ${(props) => props.theme.colors.neutral['600']};\n`;\n\nexport { CardContainer, LeftSection, LeftAddon, RightAddonSection, RightAddon, Separator, MainSection, Description };\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;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,CAAC,KAAK,EAAG;AAAA;AAAA;AAAA,+BAGpE,CAAC,UAAU,MAAM,MAAM,OAAO,QAAQ,KAAK,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IASvE,mCAAkB;AAAA;AAGtB,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,CAAC;AAAA;AAAA;AAIxE,MAAM,kBAAc,yBAAO,OAAO,EAAE,MAAM,+BAAc,MAAM,+BAAc,aAAa,CAAC;AAAA;AAAA;AAAA;AAK1F,MAAM,kBAAc,yBAAO,KAAK,EAAE,MAAM,+BAAc,MAAM,+BAAc,YAAY,CAAC;AAAA;AAAA,WAE5E,CAAC,UAAU,MAAM,MAAM,OAAO,QAAQ,KAAK,CAAC;AAAA;",
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 min-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 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 min-width: 0;\n`;\n\nconst Title = styled('h3', { name: DSCardV2Name, slot: CARD_V2_SLOTS.TITLE })`\n margin: 0;\n padding: 0;\n font-size: 16px;\n font-weight: ${({ theme }) => theme.fontWeights.regular};\n color: ${({ theme }) => theme.colors.neutral['800']};\n line-height: 1;\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 { CardContainer, LeftAddon, RightAddonSection, RightAddon, Separator, MainSection, Title, Description };\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;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rD,MAAM,kBAAc,yBAAO,KAAK,EAAE,MAAM,+BAAc,MAAM,+BAAc,YAAY,CAAC;AAAA;AAAA,WAE5E,CAAC,UAAU,MAAM,MAAM,OAAO,QAAQ,KAAK,CAAC;AAAA;",
6
6
  "names": []
7
7
  }
@@ -2,28 +2,36 @@ import * as React from "react";
2
2
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
3
3
  import { describe, useOwnerProps } from "@elliemae/ds-props-helpers";
4
4
  import { DSTruncatedTooltipText, TooltipTextProvider } from "@elliemae/ds-truncated-tooltip-text";
5
- import { DSHeader } from "@elliemae/ds-legacy-header";
5
+ import { DSTypography, TYPOGRAPHY_VARIANTS } from "@elliemae/ds-typography";
6
+ import { useGetLayoutMode } from "@elliemae/ds-system";
6
7
  import { DSCardV2PropTypesSchema } from "./react-desc-prop-types.js";
7
8
  import { useCardV2 } from "./config/useCardV2.js";
8
9
  import { DSCardV2Name, CARD_V2_DATA_TESTID } from "./constants/index.js";
9
10
  import {
10
11
  CardContainer,
11
- LeftSection,
12
12
  LeftAddon,
13
13
  MainSection,
14
14
  Description,
15
15
  RightAddonSection,
16
16
  RightAddon,
17
- Separator
17
+ Separator,
18
+ Title
18
19
  } from "./styles.js";
19
- const getCol = (rightAddon) => {
20
+ const getCols = (rightAddon, isSmall) => {
21
+ if (isSmall) return ["1fr"];
20
22
  if (!rightAddon) return ["1fr"];
21
- return ["1fr", "auto"];
23
+ return ["auto", "minmax(0, 1fr)", "auto"];
24
+ };
25
+ const getRows = (isSmall) => {
26
+ if (isSmall) return ["auto", "auto", "auto"];
27
+ return ["auto"];
22
28
  };
23
29
  const DSCardV2 = (props) => {
24
30
  const { propsWithDefault, globalProps, xstyledProps } = useCardV2(props);
25
- const { hasBorder, title, leftAddon, rightAddon, description } = propsWithDefault;
31
+ const { hasBorder, title, leftAddon, rightAddon, description, wrapText } = propsWithDefault;
26
32
  const { getOwnerProps, getOwnerPropsArguments } = useOwnerProps(propsWithDefault);
33
+ const layoutMode = useGetLayoutMode();
34
+ const isSmall = layoutMode === "s" || layoutMode === "xs";
27
35
  return /* @__PURE__ */ jsx(TooltipTextProvider, { children: /* @__PURE__ */ jsxs(
28
36
  CardContainer,
29
37
  {
@@ -32,43 +40,67 @@ const DSCardV2 = (props) => {
32
40
  ...globalProps,
33
41
  ...xstyledProps,
34
42
  hasBorder,
35
- cols: getCol(rightAddon),
43
+ cols: getCols(rightAddon, isSmall),
44
+ rows: getRows(isSmall),
36
45
  getOwnerProps,
37
46
  getOwnerPropsArguments,
38
47
  children: [
39
- /* @__PURE__ */ jsxs(LeftSection, { children: [
40
- leftAddon && /* @__PURE__ */ jsx(LeftAddon, { getOwnerProps, getOwnerPropsArguments, children: leftAddon }),
41
- /* @__PURE__ */ jsxs(
42
- MainSection,
43
- {
44
- style: {
45
- maxWidth: leftAddon ? "calc(100% - 40px)" : "100%"
46
- },
47
- getOwnerProps,
48
- getOwnerPropsArguments,
49
- children: [
50
- /* @__PURE__ */ jsx(
51
- DSHeader,
52
- {
53
- "data-testid": CARD_V2_DATA_TESTID.CARD_HEADER,
54
- fontSize: "16px",
55
- fontWeight: "regular",
56
- color: "neutral.800",
57
- text: /* @__PURE__ */ jsx(DSTruncatedTooltipText, { value: title })
58
- }
59
- ),
60
- description && /* @__PURE__ */ jsx(Description, { getOwnerProps, getOwnerPropsArguments, children: /* @__PURE__ */ jsx(DSTruncatedTooltipText, { value: description }) })
61
- ]
62
- }
63
- )
64
- ] }),
65
- Array.isArray(rightAddon) && /* @__PURE__ */ jsxs(RightAddonSection, { getOwnerProps, getOwnerPropsArguments, children: [
66
- rightAddon[0] ? /* @__PURE__ */ jsx(RightAddon, { getOwnerProps, getOwnerPropsArguments, children: rightAddon[0] }) : null,
67
- rightAddon[1] ? /* @__PURE__ */ jsxs(Fragment, { children: [
68
- rightAddon.length > 1 && /* @__PURE__ */ jsx(Separator, { getOwnerProps, getOwnerPropsArguments }),
69
- /* @__PURE__ */ jsx(RightAddon, { getOwnerProps, getOwnerPropsArguments, children: rightAddon[1] })
70
- ] }) : null
71
- ] })
48
+ leftAddon && /* @__PURE__ */ jsx(
49
+ LeftAddon,
50
+ {
51
+ style: {
52
+ gridColumn: isSmall ? "1" : "1",
53
+ gridRow: isSmall ? "1" : "1",
54
+ justifySelf: isSmall ? "center" : "start"
55
+ },
56
+ getOwnerProps,
57
+ getOwnerPropsArguments,
58
+ children: leftAddon
59
+ }
60
+ ),
61
+ /* @__PURE__ */ jsxs(
62
+ MainSection,
63
+ {
64
+ style: {
65
+ gridColumn: isSmall ? "1" : "2",
66
+ gridRow: isSmall ? "2" : "1",
67
+ textAlign: isSmall ? "center" : "left"
68
+ },
69
+ getOwnerProps,
70
+ getOwnerPropsArguments,
71
+ children: [
72
+ /* @__PURE__ */ jsx(
73
+ Title,
74
+ {
75
+ "data-testid": CARD_V2_DATA_TESTID.CARD_HEADER,
76
+ getOwnerProps,
77
+ getOwnerPropsArguments,
78
+ children: wrapText ? /* @__PURE__ */ jsx(DSTypography, { variant: TYPOGRAPHY_VARIANTS.B1, as: "span", children: title }) : /* @__PURE__ */ jsx(DSTruncatedTooltipText, { value: title })
79
+ }
80
+ ),
81
+ description && /* @__PURE__ */ jsx(Description, { getOwnerProps, getOwnerPropsArguments, children: wrapText ? /* @__PURE__ */ jsx(DSTypography, { variant: TYPOGRAPHY_VARIANTS.B1, as: "span", children: description }) : /* @__PURE__ */ jsx(DSTruncatedTooltipText, { value: description }) })
82
+ ]
83
+ }
84
+ ),
85
+ Array.isArray(rightAddon) && /* @__PURE__ */ jsxs(
86
+ RightAddonSection,
87
+ {
88
+ style: {
89
+ gridColumn: isSmall ? "1" : "3",
90
+ gridRow: isSmall ? "3" : "1",
91
+ justifySelf: isSmall ? "center" : "end"
92
+ },
93
+ getOwnerProps,
94
+ getOwnerPropsArguments,
95
+ children: [
96
+ rightAddon[0] ? /* @__PURE__ */ jsx(RightAddon, { getOwnerProps, getOwnerPropsArguments, children: rightAddon[0] }) : null,
97
+ rightAddon[1] ? /* @__PURE__ */ jsxs(Fragment, { children: [
98
+ rightAddon.length > 1 && /* @__PURE__ */ jsx(Separator, { getOwnerProps, getOwnerPropsArguments }),
99
+ /* @__PURE__ */ jsx(RightAddon, { getOwnerProps, getOwnerPropsArguments, children: rightAddon[1] })
100
+ ] }) : null
101
+ ]
102
+ }
103
+ )
72
104
  ]
73
105
  }
74
106
  ) });
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
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, useOwnerProps } from '@elliemae/ds-props-helpers';\nimport { DSTruncatedTooltipText, TooltipTextProvider } from '@elliemae/ds-truncated-tooltip-text';\nimport { DSHeader } from '@elliemae/ds-legacy-header';\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 {\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 const { getOwnerProps, getOwnerPropsArguments } = useOwnerProps(propsWithDefault);\n return (\n <TooltipTextProvider>\n <CardContainer\n data-component-selector=\"ds-card-v2\"\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 getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n >\n <LeftSection>\n {leftAddon && (\n <LeftAddon getOwnerProps={getOwnerProps} getOwnerPropsArguments={getOwnerPropsArguments}>\n {leftAddon}\n </LeftAddon>\n )}\n <MainSection\n style={{\n maxWidth: leftAddon ? 'calc(100% - 40px)' : '100%',\n }}\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\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 getOwnerProps={getOwnerProps} getOwnerPropsArguments={getOwnerPropsArguments}>\n <DSTruncatedTooltipText value={description} />\n </Description>\n )}\n </MainSection>\n </LeftSection>\n {Array.isArray(rightAddon) && (\n <RightAddonSection getOwnerProps={getOwnerProps} getOwnerPropsArguments={getOwnerPropsArguments}>\n {rightAddon[0] ? (\n <RightAddon getOwnerProps={getOwnerProps} getOwnerPropsArguments={getOwnerPropsArguments}>\n {rightAddon[0]}\n </RightAddon>\n ) : null}\n {rightAddon[1] ? (\n <>\n {rightAddon.length > 1 && (\n <Separator getOwnerProps={getOwnerProps} getOwnerPropsArguments={getOwnerPropsArguments} />\n )}\n <RightAddon getOwnerProps={getOwnerProps} getOwnerPropsArguments={getOwnerPropsArguments}>\n {rightAddon[1]}\n </RightAddon>\n </>\n ) : null}\n </RightAddonSection>\n )}\n </CardContainer>\n </TooltipTextProvider>\n );\n};\n\nDSCardV2.displayName = DSCardV2Name;\nconst DSCardV2WithSchema = describe(DSCardV2);\nDSCardV2WithSchema.propTypes = DSCardV2PropTypesSchema;\n\nexport { DSCardV2, DSCardV2WithSchema };\n"],
5
- "mappings": "AAAA,YAAY,WAAW;ACyCX,SAiCE,UAjCF,KAIF,YAJE;AAxCZ,SAAS,UAAU,qBAAqB;AACxC,SAAS,wBAAwB,2BAA2B;AAC5D,SAAS,gBAAgB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BAAW,CAAC,IACX,oBAAC,cAAW,eAA8B,wBACvC,qBAAW,CAAC,GACf,IACE;AAAA,UACH,WAAW,CAAC,IACX,iCACG;AAAA,uBAAW,SAAS,KACnB,oBAAC,aAAU,eAA8B,wBAAgD;AAAA,YAE3F,oBAAC,cAAW,eAA8B,wBACvC,qBAAW,CAAC,GACf;AAAA,aACF,IACE;AAAA,WACN;AAAA;AAAA;AAAA,EAEJ,GACF;AAEJ;AAEA,SAAS,cAAc;AACvB,MAAM,qBAAqB,SAAS,QAAQ;AAC5C,mBAAmB,YAAY;",
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { describe, useOwnerProps } from '@elliemae/ds-props-helpers';\nimport { DSTruncatedTooltipText, TooltipTextProvider } from '@elliemae/ds-truncated-tooltip-text';\nimport { DSTypography, TYPOGRAPHY_VARIANTS } from '@elliemae/ds-typography';\nimport { useGetLayoutMode } from '@elliemae/ds-system';\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 {\n CardContainer,\n LeftAddon,\n MainSection,\n Description,\n RightAddonSection,\n RightAddon,\n Separator,\n Title,\n} from './styles.js';\n\nconst getCols = (rightAddon: DSCardV2T.OptionalProps['rightAddon'], isSmall: boolean) => {\n if (isSmall) return ['1fr'];\n if (!rightAddon) return ['1fr'];\n return ['auto', 'minmax(0, 1fr)', 'auto'];\n};\n\nconst getRows = (isSmall: boolean) => {\n if (isSmall) return ['auto', 'auto', 'auto'];\n return ['auto'];\n};\n// eslint-disable-next-line complexity\nconst DSCardV2: React.ComponentType<DSCardV2T.Props> = (props) => {\n const { propsWithDefault, globalProps, xstyledProps } = useCardV2(props);\n const { hasBorder, title, leftAddon, rightAddon, description, wrapText } = propsWithDefault;\n const { getOwnerProps, getOwnerPropsArguments } = useOwnerProps(propsWithDefault);\n const layoutMode = useGetLayoutMode();\n const isSmall = layoutMode === 's' || layoutMode === 'xs';\n\n return (\n <TooltipTextProvider>\n <CardContainer\n data-component-selector=\"ds-card-v2\"\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={getCols(rightAddon, isSmall)}\n rows={getRows(isSmall)}\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n >\n {leftAddon && (\n <LeftAddon\n style={{\n gridColumn: isSmall ? '1' : '1',\n gridRow: isSmall ? '1' : '1',\n justifySelf: isSmall ? 'center' : 'start',\n }}\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n >\n {leftAddon}\n </LeftAddon>\n )}\n <MainSection\n style={{\n gridColumn: isSmall ? '1' : '2',\n gridRow: isSmall ? '2' : '1',\n textAlign: isSmall ? 'center' : 'left',\n }}\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n >\n <Title\n data-testid={CARD_V2_DATA_TESTID.CARD_HEADER}\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n >\n {wrapText ? (\n <DSTypography variant={TYPOGRAPHY_VARIANTS.B1} as=\"span\">\n {title}\n </DSTypography>\n ) : (\n <DSTruncatedTooltipText value={title} />\n )}\n </Title>\n {description && (\n <Description getOwnerProps={getOwnerProps} getOwnerPropsArguments={getOwnerPropsArguments}>\n {wrapText ? (\n <DSTypography variant={TYPOGRAPHY_VARIANTS.B1} as=\"span\">\n {description}\n </DSTypography>\n ) : (\n <DSTruncatedTooltipText value={description} />\n )}\n </Description>\n )}\n </MainSection>\n\n {Array.isArray(rightAddon) && (\n <RightAddonSection\n style={{\n gridColumn: isSmall ? '1' : '3',\n gridRow: isSmall ? '3' : '1',\n justifySelf: isSmall ? 'center' : 'end',\n }}\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n >\n {rightAddon[0] ? (\n <RightAddon getOwnerProps={getOwnerProps} getOwnerPropsArguments={getOwnerPropsArguments}>\n {rightAddon[0]}\n </RightAddon>\n ) : null}\n {rightAddon[1] ? (\n <>\n {rightAddon.length > 1 && (\n <Separator getOwnerProps={getOwnerProps} getOwnerPropsArguments={getOwnerPropsArguments} />\n )}\n <RightAddon getOwnerProps={getOwnerProps} getOwnerPropsArguments={getOwnerPropsArguments}>\n {rightAddon[1]}\n </RightAddon>\n </>\n ) : null}\n </RightAddonSection>\n )}\n </CardContainer>\n </TooltipTextProvider>\n );\n};\n\nDSCardV2.displayName = DSCardV2Name;\nconst DSCardV2WithSchema = describe(DSCardV2);\nDSCardV2WithSchema.propTypes = DSCardV2PropTypesSchema;\n\nexport { DSCardV2, DSCardV2WithSchema };\n"],
5
+ "mappings": "AAAA,YAAY,WAAW;ACmDb,SA+DI,UA/DJ,KAYF,YAZE;AAlDV,SAAS,UAAU,qBAAqB;AACxC,SAAS,wBAAwB,2BAA2B;AAC5D,SAAS,cAAc,2BAA2B;AAClD,SAAS,wBAAwB;AACjC,SAAyB,+BAA+B;AACxD,SAAS,iBAAiB;AAC1B,SAAS,cAAc,2BAA2B;AAClD;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAEP,MAAM,UAAU,CAAC,YAAmD,YAAqB;AACvF,MAAI,QAAS,QAAO,CAAC,KAAK;AAC1B,MAAI,CAAC,WAAY,QAAO,CAAC,KAAK;AAC9B,SAAO,CAAC,QAAQ,kBAAkB,MAAM;AAC1C;AAEA,MAAM,UAAU,CAAC,YAAqB;AACpC,MAAI,QAAS,QAAO,CAAC,QAAQ,QAAQ,MAAM;AAC3C,SAAO,CAAC,MAAM;AAChB;AAEA,MAAM,WAAiD,CAAC,UAAU;AAChE,QAAM,EAAE,kBAAkB,aAAa,aAAa,IAAI,UAAU,KAAK;AACvE,QA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;AAAA,cACL,YAAY,UAAU,MAAM;AAAA,cAC5B,SAAS,UAAU,MAAM;AAAA,cACzB,aAAa,UAAU,WAAW;AAAA,YACpC;AAAA,YACA;AAAA,YACA;AAAA,YAEC;AAAA,yBAAW,CAAC,IACX,oBAAC,cAAW,eAA8B,wBACvC,qBAAW,CAAC,GACf,IACE;AAAA,cACH,WAAW,CAAC,IACX,iCACG;AAAA,2BAAW,SAAS,KACnB,oBAAC,aAAU,eAA8B,wBAAgD;AAAA,gBAE3F,oBAAC,cAAW,eAA8B,wBACvC,qBAAW,CAAC,GACf;AAAA,iBACF,IACE;AAAA;AAAA;AAAA,QACN;AAAA;AAAA;AAAA,EAEJ,GACF;AAEJ;AAEA,SAAS,cAAc;AACvB,MAAM,qBAAqB,SAAS,QAAQ;AAC5C,mBAAmB,YAAY;",
6
6
  "names": []
7
7
  }
@@ -9,7 +9,8 @@ const CARD_V2_SLOTS = {
9
9
  RIGHT_ADDON_SECTION: "right-addon-section",
10
10
  SEPARATOR: "separator",
11
11
  MAIN_SECTION: "main-section",
12
- DESCRIPTION: "description"
12
+ DESCRIPTION: "description",
13
+ TITLE: "title"
13
14
  };
14
15
  const CARD_V2_DATA_TESTID = {
15
16
  ...slotObjectToDataTestIds(DSCardV2Name, CARD_V2_SLOTS),
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../src/constants/index.ts"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { slotObjectToDataTestIds } from '@elliemae/ds-system';\n\nexport const 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 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,aAAa;AACf;AAGO,MAAM,sBAAsB;AAAA,EACjC,GAAG,wBAAwB,cAAc,aAAa;AAAA,EACtD,gBAAgB;AAAA,EAChB,aAAa;AACf;",
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 DESCRIPTION: 'description',\n TITLE: 'title',\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,aAAa;AAAA,EACb,OAAO;AACT;AAGO,MAAM,sBAAsB;AAAA,EACjC,GAAG,wBAAwB,cAAc,aAAa;AAAA,EACtD,gBAAgB;AAAA,EAChB,aAAa;AACf;",
6
6
  "names": []
7
7
  }
@@ -1,7 +1,8 @@
1
1
  import * as React from "react";
2
2
  import { PropTypes, globalAttributesPropTypes, xstyledPropTypes } from "@elliemae/ds-props-helpers";
3
3
  const defaultProps = {
4
- hasBorder: false
4
+ hasBorder: false,
5
+ wrapText: true
5
6
  };
6
7
  const DSCardV2PropTypes = {
7
8
  ...globalAttributesPropTypes,
@@ -25,7 +26,11 @@ const DSCardV2PropTypes = {
25
26
  /**
26
27
  * Wheter if the card has border or not
27
28
  */
28
- hasBorder: PropTypes.bool.description("Wheter if the card has border or not").defaultValue(false)
29
+ hasBorder: PropTypes.bool.description("Wheter if the card has border or not").defaultValue(false),
30
+ /**
31
+ * Whether title and description wrap instead of truncating with tooltip
32
+ */
33
+ wrapText: PropTypes.bool.description("Whether title and description wrap instead of truncating with tooltip").defaultValue(true)
29
34
  };
30
35
  const DSCardV2PropTypesSchema = DSCardV2PropTypes;
31
36
  export {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../src/react-desc-prop-types.ts"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import type { WeakValidationMap } from 'react';\nimport type { GlobalAttributesT, XstyledProps, DSPropTypesSchema } from '@elliemae/ds-props-helpers';\nimport { PropTypes, globalAttributesPropTypes, xstyledPropTypes } from '@elliemae/ds-props-helpers';\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;",
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import type { WeakValidationMap } from 'react';\nimport type { GlobalAttributesT, XstyledProps, DSPropTypesSchema } from '@elliemae/ds-props-helpers';\nimport { PropTypes, globalAttributesPropTypes, xstyledPropTypes } from '@elliemae/ds-props-helpers';\n\nexport declare namespace DSCardV2T {\n export interface RequiredProps {\n title: string;\n }\n\n export interface DefaultProps {\n hasBorder?: boolean;\n wrapText?: 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 wrapText: true,\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 * Whether title and description wrap instead of truncating with tooltip\n */\n wrapText: PropTypes.bool\n .description('Whether title and description wrap instead of truncating with tooltip')\n .defaultValue(true),\n};\n\nexport const DSCardV2PropTypesSchema = DSCardV2PropTypes as unknown as WeakValidationMap<DSCardV2T.Props>;\n"],
5
+ "mappings": "AAAA,YAAY,WAAW;ACEvB,SAAS,WAAW,2BAA2B,wBAAwB;AAuChE,MAAM,eAAuC;AAAA,EAClD,WAAW;AAAA,EACX,UAAU;AACZ;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;AAAA;AAAA;AAAA;AAAA,EAIhG,UAAU,UAAU,KACjB,YAAY,uEAAuE,EACnF,aAAa,IAAI;AACtB;AAEO,MAAM,0BAA0B;",
6
6
  "names": []
7
7
  }
@@ -6,7 +6,7 @@ const CardContainer = styled(Grid, { name: DSCardV2Name, slot: CARD_V2_SLOTS.CAR
6
6
  align-items: center;
7
7
  justify-content: space-between;
8
8
  width: 100%;
9
- height: 56px;
9
+ min-height: 56px;
10
10
  padding: 8px 16px;
11
11
  position: relative;
12
12
  border: ${({ theme, hasBorder }) => hasBorder ? `1px solid ${theme.colors.neutral["100"]}` : ""};
@@ -23,10 +23,6 @@ const CardContainer = styled(Grid, { name: DSCardV2Name, slot: CARD_V2_SLOTS.CAR
23
23
  }
24
24
  ${xStyledCommonProps}
25
25
  `;
26
- const LeftSection = styled("div", { name: DSCardV2Name, slot: CARD_V2_SLOTS.LEFT_SECTION })`
27
- display: flex;
28
- align-items: center;
29
- `;
30
26
  const LeftAddon = styled("div", { name: DSCardV2Name, slot: CARD_V2_SLOTS.LEFT_ADDON })`
31
27
  height: fit-content;
32
28
  width: fit-content;
@@ -52,6 +48,15 @@ const Separator = styled("div", { name: DSCardV2Name, slot: CARD_V2_SLOTS.SEPARA
52
48
  const MainSection = styled("div", { name: DSCardV2Name, slot: CARD_V2_SLOTS.MAIN_SECTION })`
53
49
  display: flex;
54
50
  flex-direction: column;
51
+ min-width: 0;
52
+ `;
53
+ const Title = styled("h3", { name: DSCardV2Name, slot: CARD_V2_SLOTS.TITLE })`
54
+ margin: 0;
55
+ padding: 0;
56
+ font-size: 16px;
57
+ font-weight: ${({ theme }) => theme.fontWeights.regular};
58
+ color: ${({ theme }) => theme.colors.neutral["800"]};
59
+ line-height: 1;
55
60
  `;
56
61
  const Description = styled("p", { name: DSCardV2Name, slot: CARD_V2_SLOTS.DESCRIPTION })`
57
62
  margin: 0;
@@ -61,10 +66,10 @@ export {
61
66
  CardContainer,
62
67
  Description,
63
68
  LeftAddon,
64
- LeftSection,
65
69
  MainSection,
66
70
  RightAddon,
67
71
  RightAddonSection,
68
- Separator
72
+ Separator,
73
+ Title
69
74
  };
70
75
  //# sourceMappingURL=styles.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
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 Description = styled('p', { name: DSCardV2Name, slot: CARD_V2_SLOTS.DESCRIPTION })`\n margin: 0;\n color: ${(props) => props.theme.colors.neutral['600']};\n`;\n\nexport { CardContainer, LeftSection, LeftAddon, RightAddonSection, RightAddon, Separator, MainSection, Description };\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,CAAC,KAAK,EAAG;AAAA;AAAA;AAAA,+BAGpE,CAAC,UAAU,MAAM,MAAM,OAAO,QAAQ,KAAK,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IASvE,kBAAkB;AAAA;AAGtB,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,CAAC;AAAA;AAAA;AAIxE,MAAM,cAAc,OAAO,OAAO,EAAE,MAAM,cAAc,MAAM,cAAc,aAAa,CAAC;AAAA;AAAA;AAAA;AAK1F,MAAM,cAAc,OAAO,KAAK,EAAE,MAAM,cAAc,MAAM,cAAc,YAAY,CAAC;AAAA;AAAA,WAE5E,CAAC,UAAU,MAAM,MAAM,OAAO,QAAQ,KAAK,CAAC;AAAA;",
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 min-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 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 min-width: 0;\n`;\n\nconst Title = styled('h3', { name: DSCardV2Name, slot: CARD_V2_SLOTS.TITLE })`\n margin: 0;\n padding: 0;\n font-size: 16px;\n font-weight: ${({ theme }) => theme.fontWeights.regular};\n color: ${({ theme }) => theme.colors.neutral['800']};\n line-height: 1;\n`;\n\nconst Description = styled('p', { name: DSCardV2Name, slot: CARD_V2_SLOTS.DESCRIPTION })`\n margin: 0;\n color: ${(props) => props.theme.colors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MAAM,MAAM,YAAY,OAAO;AAAA,WAC9C,CAAC,EAAE,MAAM,MAAM,MAAM,OAAO,QAAQ,KAAK,CAAC;AAAA;AAAA;AAIrD,MAAM,cAAc,OAAO,KAAK,EAAE,MAAM,cAAc,MAAM,cAAc,YAAY,CAAC;AAAA;AAAA,WAE5E,CAAC,UAAU,MAAM,MAAM,OAAO,QAAQ,KAAK,CAAC;AAAA;",
6
6
  "names": []
7
7
  }
@@ -8,6 +8,7 @@ export declare const CARD_V2_SLOTS: {
8
8
  readonly SEPARATOR: "separator";
9
9
  readonly MAIN_SECTION: "main-section";
10
10
  readonly DESCRIPTION: "description";
11
+ readonly TITLE: "title";
11
12
  };
12
13
  export declare const CARD_V2_DATA_TESTID: {
13
14
  CARD_CONTAINER: string;
@@ -19,4 +20,5 @@ export declare const CARD_V2_DATA_TESTID: {
19
20
  SEPARATOR: "ds-cardv2-separator";
20
21
  MAIN_SECTION: "ds-cardv2-main-section";
21
22
  DESCRIPTION: "ds-cardv2-description";
23
+ TITLE: "ds-cardv2-title";
22
24
  };
@@ -6,6 +6,7 @@ export declare namespace DSCardV2T {
6
6
  }
7
7
  interface DefaultProps {
8
8
  hasBorder?: boolean;
9
+ wrapText?: boolean;
9
10
  }
10
11
  interface OptionalProps {
11
12
  description?: string;
@@ -1,11 +1,11 @@
1
1
  declare const CardContainer: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("@elliemae/ds-grid").DSGridT.Props & import("react").RefAttributes<HTMLDivElement>>, import("@elliemae/ds-system").Theme, {
2
2
  hasBorder?: boolean;
3
3
  } & import("@elliemae/ds-system").OwnerInterface & import("@elliemae/ds-system").InnerRefInterface<import("react").ForwardRefExoticComponent<import("@elliemae/ds-grid").DSGridT.Props & import("react").RefAttributes<HTMLDivElement>>>, never>;
4
- declare const LeftSection: import("styled-components").StyledComponent<"div", import("@elliemae/ds-system").Theme, object & import("@elliemae/ds-system").OwnerInterface & import("@elliemae/ds-system").InnerRefInterface<"div">, never>;
5
4
  declare const LeftAddon: import("styled-components").StyledComponent<"div", import("@elliemae/ds-system").Theme, object & import("@elliemae/ds-system").OwnerInterface & import("@elliemae/ds-system").InnerRefInterface<"div">, never>;
6
5
  declare const RightAddonSection: import("styled-components").StyledComponent<"div", import("@elliemae/ds-system").Theme, object & import("@elliemae/ds-system").OwnerInterface & import("@elliemae/ds-system").InnerRefInterface<"div">, never>;
7
6
  declare const RightAddon: import("styled-components").StyledComponent<"div", import("@elliemae/ds-system").Theme, object & import("@elliemae/ds-system").OwnerInterface & import("@elliemae/ds-system").InnerRefInterface<"div">, never>;
8
7
  declare const Separator: import("styled-components").StyledComponent<"div", import("@elliemae/ds-system").Theme, object & import("@elliemae/ds-system").OwnerInterface & import("@elliemae/ds-system").InnerRefInterface<"div">, never>;
9
8
  declare const MainSection: import("styled-components").StyledComponent<"div", import("@elliemae/ds-system").Theme, object & import("@elliemae/ds-system").OwnerInterface & import("@elliemae/ds-system").InnerRefInterface<"div">, never>;
9
+ declare const Title: import("styled-components").StyledComponent<"h3", import("@elliemae/ds-system").Theme, object & import("@elliemae/ds-system").OwnerInterface & import("@elliemae/ds-system").InnerRefInterface<"h3">, never>;
10
10
  declare const Description: import("styled-components").StyledComponent<"p", import("@elliemae/ds-system").Theme, object & import("@elliemae/ds-system").OwnerInterface & import("@elliemae/ds-system").InnerRefInterface<"p">, never>;
11
- export { CardContainer, LeftSection, LeftAddon, RightAddonSection, RightAddon, Separator, MainSection, Description };
11
+ export { CardContainer, LeftAddon, RightAddonSection, RightAddon, Separator, MainSection, Title, Description };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elliemae/ds-card-v2",
3
- "version": "3.60.0-next.38",
3
+ "version": "3.60.0-next.39",
4
4
  "license": "MIT",
5
5
  "description": "ICE MT - Dimsum - Card V2",
6
6
  "files": [
@@ -39,17 +39,17 @@
39
39
  "@elliemae/ds-legacy-header": "1.0.16",
40
40
  "lodash-es": "^4.17.21",
41
41
  "uid": "^2.0.2",
42
- "@elliemae/ds-grid": "3.60.0-next.38",
43
- "@elliemae/ds-props-helpers": "3.60.0-next.38",
44
- "@elliemae/ds-system": "3.60.0-next.38",
45
- "@elliemae/ds-truncated-tooltip-text": "3.60.0-next.38"
42
+ "@elliemae/ds-grid": "3.60.0-next.39",
43
+ "@elliemae/ds-system": "3.60.0-next.39",
44
+ "@elliemae/ds-props-helpers": "3.60.0-next.39",
45
+ "@elliemae/ds-truncated-tooltip-text": "3.60.0-next.39"
46
46
  },
47
47
  "devDependencies": {
48
48
  "@xstyled/system": "~3.8.1",
49
49
  "jest": "^30.0.0",
50
50
  "styled-components": "~5.3.9",
51
- "@elliemae/ds-icons": "3.60.0-next.38",
52
- "@elliemae/ds-monorepo-devops": "3.60.0-next.38"
51
+ "@elliemae/ds-monorepo-devops": "3.60.0-next.39",
52
+ "@elliemae/ds-icons": "3.60.0-next.39"
53
53
  },
54
54
  "peerDependencies": {
55
55
  "lodash-es": "^4.17.21",