@elliemae/ds-card-v2 3.60.0-next.9 → 3.61.0-rc.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/DSCardV2.js +73 -36
- package/dist/cjs/DSCardV2.js.map +2 -2
- package/dist/cjs/constants/index.js +2 -2
- package/dist/cjs/constants/index.js.map +2 -2
- package/dist/cjs/index.js +2 -0
- package/dist/cjs/index.js.map +2 -2
- package/dist/cjs/package.json +1 -4
- package/dist/cjs/react-desc-prop-types.js +7 -2
- package/dist/cjs/react-desc-prop-types.js.map +2 -2
- package/dist/cjs/styles.js +6 -8
- package/dist/cjs/styles.js.map +2 -2
- package/dist/esm/DSCardV2.js +76 -39
- package/dist/esm/DSCardV2.js.map +2 -2
- package/dist/esm/constants/index.js +2 -2
- package/dist/esm/constants/index.js.map +2 -2
- package/dist/esm/index.js +3 -1
- package/dist/esm/index.js.map +2 -2
- package/dist/esm/package.json +1 -4
- package/dist/esm/react-desc-prop-types.js +7 -2
- package/dist/esm/react-desc-prop-types.js.map +2 -2
- package/dist/esm/styles.js +6 -8
- package/dist/esm/styles.js.map +2 -2
- package/dist/types/constants/index.d.ts +2 -2
- package/dist/types/index.d.ts +1 -1
- package/dist/types/react-desc-prop-types.d.ts +1 -0
- package/dist/types/styles.d.ts +1 -2
- package/package.json +25 -30
package/dist/cjs/DSCardV2.js
CHANGED
|
@@ -36,18 +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
|
|
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
|
|
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;
|
|
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";
|
|
51
60
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_truncated_tooltip_text.TooltipTextProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
52
61
|
import_styles.CardContainer,
|
|
53
62
|
{
|
|
@@ -56,39 +65,67 @@ const DSCardV2 = (props) => {
|
|
|
56
65
|
...globalProps,
|
|
57
66
|
...xstyledProps,
|
|
58
67
|
hasBorder,
|
|
59
|
-
cols:
|
|
68
|
+
cols: getCols(rightAddon, isSmall),
|
|
69
|
+
rows: getRows(isSmall),
|
|
70
|
+
getOwnerProps,
|
|
71
|
+
getOwnerPropsArguments,
|
|
60
72
|
children: [
|
|
61
|
-
/* @__PURE__ */ (0, import_jsx_runtime.
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
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
|
+
)
|
|
92
129
|
]
|
|
93
130
|
}
|
|
94
131
|
) });
|
package/dist/cjs/DSCardV2.js.map
CHANGED
|
@@ -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 } from '@elliemae/ds-props-helpers';\nimport { DSTruncatedTooltipText, TooltipTextProvider } from '@elliemae/ds-truncated-tooltip-text';\nimport {
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;
|
|
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,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,QAAI,4BAAU,KAAK;AACvE,QAAM,EAAE,WAAW,OAAO,WAAW,YAAY,aAAa,SAAS,IAAI;AAC3E,QAAM,EAAE,eAAe,uBAAuB,QAAI,uCAAc,gBAAgB;AAChF,QAAM,iBAAa,mCAAiB;AACpC,QAAM,UAAU,eAAe,OAAO,eAAe;AAErD,SACE,4CAAC,wDACC;AAAA,IAAC;AAAA;AAAA,MACC,2BAAwB;AAAA,MACxB,eAAa,qCAAoB;AAAA,MAChC,GAAG;AAAA,MACH,GAAG;AAAA,MACJ;AAAA,MACA,MAAM,QAAQ,YAAY,OAAO;AAAA,MACjC,MAAM,QAAQ,OAAO;AAAA,MACrB;AAAA,MACA;AAAA,MAEC;AAAA,qBACC;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;AAAA,QACH;AAAA,QAEF;AAAA,UAAC;AAAA;AAAA,YACC,OAAO;AAAA,cACL,YAAY,UAAU,MAAM;AAAA,cAC5B,SAAS,UAAU,MAAM;AAAA,cACzB,WAAW,UAAU,WAAW;AAAA,YAClC;AAAA,YACA;AAAA,YACA;AAAA,YAEA;AAAA;AAAA,gBAAC;AAAA;AAAA,kBACC,eAAa,qCAAoB;AAAA,kBACjC;AAAA,kBACA;AAAA,kBAEC,qBACC,4CAAC,qCAAa,SAAS,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,8 +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
|
-
|
|
48
|
-
|
|
47
|
+
DESCRIPTION: "description",
|
|
48
|
+
TITLE: "title"
|
|
49
49
|
};
|
|
50
50
|
const CARD_V2_DATA_TESTID = {
|
|
51
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
|
|
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,
|
|
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
|
}
|
package/dist/cjs/index.js
CHANGED
|
@@ -29,9 +29,11 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
29
29
|
var index_exports = {};
|
|
30
30
|
__export(index_exports, {
|
|
31
31
|
CARD_V2_DATA_TESTID: () => import_constants.CARD_V2_DATA_TESTID,
|
|
32
|
+
CARD_V2_SLOTS: () => import_constants.CARD_V2_SLOTS,
|
|
32
33
|
CustomCard: () => import_DSCardV2.DSCardV2,
|
|
33
34
|
DSCardCustomWithSchema: () => import_DSCardV2.DSCardV2WithSchema,
|
|
34
35
|
DSCardV2: () => import_DSCardV2.DSCardV2,
|
|
36
|
+
DSCardV2Name: () => import_constants.DSCardV2Name,
|
|
35
37
|
DSCardV2WithSchema: () => import_DSCardV2.DSCardV2WithSchema
|
|
36
38
|
});
|
|
37
39
|
module.exports = __toCommonJS(index_exports);
|
package/dist/cjs/index.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
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;AAEP,
|
|
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, CARD_V2_SLOTS, DSCardV2Name } from './constants/index.js';\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADGvB,sBAKO;AAEP,uBAAiE;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/dist/cjs/package.json
CHANGED
|
@@ -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;
|
|
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
|
}
|
package/dist/cjs/styles.js
CHANGED
|
@@ -31,7 +31,6 @@ __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,
|
|
@@ -47,7 +46,7 @@ const CardContainer = (0, import_ds_system.styled)(import_ds_grid.Grid, { name:
|
|
|
47
46
|
align-items: center;
|
|
48
47
|
justify-content: space-between;
|
|
49
48
|
width: 100%;
|
|
50
|
-
height: 56px;
|
|
49
|
+
min-height: 56px;
|
|
51
50
|
padding: 8px 16px;
|
|
52
51
|
position: relative;
|
|
53
52
|
border: ${({ theme, hasBorder }) => hasBorder ? `1px solid ${theme.colors.neutral["100"]}` : ""};
|
|
@@ -64,10 +63,6 @@ const CardContainer = (0, import_ds_system.styled)(import_ds_grid.Grid, { name:
|
|
|
64
63
|
}
|
|
65
64
|
${import_ds_system.xStyledCommonProps}
|
|
66
65
|
`;
|
|
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
66
|
const LeftAddon = (0, import_ds_system.styled)("div", { name: import_constants.DSCardV2Name, slot: import_constants.CARD_V2_SLOTS.LEFT_ADDON })`
|
|
72
67
|
height: fit-content;
|
|
73
68
|
width: fit-content;
|
|
@@ -93,12 +88,15 @@ const Separator = (0, import_ds_system.styled)("div", { name: import_constants.D
|
|
|
93
88
|
const MainSection = (0, import_ds_system.styled)("div", { name: import_constants.DSCardV2Name, slot: import_constants.CARD_V2_SLOTS.MAIN_SECTION })`
|
|
94
89
|
display: flex;
|
|
95
90
|
flex-direction: column;
|
|
91
|
+
min-width: 0;
|
|
96
92
|
`;
|
|
97
93
|
const Title = (0, import_ds_system.styled)("h3", { name: import_constants.DSCardV2Name, slot: import_constants.CARD_V2_SLOTS.TITLE })`
|
|
98
94
|
margin: 0;
|
|
95
|
+
padding: 0;
|
|
99
96
|
font-size: 16px;
|
|
100
|
-
font-weight: ${(
|
|
101
|
-
color: ${(
|
|
97
|
+
font-weight: ${({ theme }) => theme.fontWeights.regular};
|
|
98
|
+
color: ${({ theme }) => theme.colors.neutral["800"]};
|
|
99
|
+
line-height: 1;
|
|
102
100
|
`;
|
|
103
101
|
const Description = (0, import_ds_system.styled)("p", { name: import_constants.DSCardV2Name, slot: import_constants.CARD_V2_SLOTS.DESCRIPTION })`
|
|
104
102
|
margin: 0;
|
package/dist/cjs/styles.js.map
CHANGED
|
@@ -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
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;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;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,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;AAAA;AAM1F,MAAM,YAAQ,yBAAO,MAAM,EAAE,MAAM,+BAAc,MAAM,+BAAc,MAAM,CAAC;AAAA;AAAA;AAAA;AAAA,iBAI3D,CAAC,EAAE,MAAM,MAAM,MAAM,YAAY,OAAO;AAAA,WAC9C,CAAC,EAAE,MAAM,MAAM,MAAM,OAAO,QAAQ,KAAK,CAAC;AAAA;AAAA;AAIrD,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
|
}
|
package/dist/esm/DSCardV2.js
CHANGED
|
@@ -1,28 +1,37 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
-
import { describe } from "@elliemae/ds-props-helpers";
|
|
3
|
+
import { describe, useOwnerProps } from "@elliemae/ds-props-helpers";
|
|
4
4
|
import { DSTruncatedTooltipText, TooltipTextProvider } from "@elliemae/ds-truncated-tooltip-text";
|
|
5
|
-
import {
|
|
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
|
|
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;
|
|
32
|
+
const { getOwnerProps, getOwnerPropsArguments } = useOwnerProps(propsWithDefault);
|
|
33
|
+
const layoutMode = useGetLayoutMode();
|
|
34
|
+
const isSmall = layoutMode === "s" || layoutMode === "xs";
|
|
26
35
|
return /* @__PURE__ */ jsx(TooltipTextProvider, { children: /* @__PURE__ */ jsxs(
|
|
27
36
|
CardContainer,
|
|
28
37
|
{
|
|
@@ -31,39 +40,67 @@ const DSCardV2 = (props) => {
|
|
|
31
40
|
...globalProps,
|
|
32
41
|
...xstyledProps,
|
|
33
42
|
hasBorder,
|
|
34
|
-
cols:
|
|
43
|
+
cols: getCols(rightAddon, isSmall),
|
|
44
|
+
rows: getRows(isSmall),
|
|
45
|
+
getOwnerProps,
|
|
46
|
+
getOwnerPropsArguments,
|
|
35
47
|
children: [
|
|
36
|
-
/* @__PURE__ */
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
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
|
+
)
|
|
67
104
|
]
|
|
68
105
|
}
|
|
69
106
|
) });
|
package/dist/esm/DSCardV2.js.map
CHANGED
|
@@ -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 } from '@elliemae/ds-props-helpers';\nimport { DSTruncatedTooltipText, TooltipTextProvider } from '@elliemae/ds-truncated-tooltip-text';\nimport {
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;
|
|
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": "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",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -9,8 +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
|
-
|
|
13
|
-
|
|
12
|
+
DESCRIPTION: "description",
|
|
13
|
+
TITLE: "title"
|
|
14
14
|
};
|
|
15
15
|
const CARD_V2_DATA_TESTID = {
|
|
16
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
|
|
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,
|
|
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
|
}
|
package/dist/esm/index.js
CHANGED
|
@@ -5,12 +5,14 @@ import {
|
|
|
5
5
|
DSCardV2WithSchema,
|
|
6
6
|
DSCardV2WithSchema as DSCardV2WithSchema2
|
|
7
7
|
} from "./DSCardV2.js";
|
|
8
|
-
import { CARD_V2_DATA_TESTID } from "./constants/index.js";
|
|
8
|
+
import { CARD_V2_DATA_TESTID, CARD_V2_SLOTS, DSCardV2Name } from "./constants/index.js";
|
|
9
9
|
export {
|
|
10
10
|
CARD_V2_DATA_TESTID,
|
|
11
|
+
CARD_V2_SLOTS,
|
|
11
12
|
DSCardV22 as CustomCard,
|
|
12
13
|
DSCardV2WithSchema2 as DSCardCustomWithSchema,
|
|
13
14
|
DSCardV2,
|
|
15
|
+
DSCardV2Name,
|
|
14
16
|
DSCardV2WithSchema
|
|
15
17
|
};
|
|
16
18
|
//# sourceMappingURL=index.js.map
|
package/dist/esm/index.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../src/index.ts"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "// this is a workaround to typescript error TS2742\n// https://github.com/microsoft/TypeScript/issues/47663\nimport 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;AAEP,SAAS,
|
|
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, CARD_V2_SLOTS, DSCardV2Name } from './constants/index.js';\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACGvB;AAAA,EACE;AAAA,EACY,YAAZA;AAAA,EACA;AAAA,EACsB,sBAAtBC;AAAA,OACK;AAEP,SAAS,qBAAqB,eAAe,oBAAoB;",
|
|
6
6
|
"names": ["DSCardV2", "DSCardV2WithSchema"]
|
|
7
7
|
}
|
package/dist/esm/package.json
CHANGED
|
@@ -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;
|
|
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
|
}
|
package/dist/esm/styles.js
CHANGED
|
@@ -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,12 +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;
|
|
55
52
|
`;
|
|
56
53
|
const Title = styled("h3", { name: DSCardV2Name, slot: CARD_V2_SLOTS.TITLE })`
|
|
57
54
|
margin: 0;
|
|
55
|
+
padding: 0;
|
|
58
56
|
font-size: 16px;
|
|
59
|
-
font-weight: ${(
|
|
60
|
-
color: ${(
|
|
57
|
+
font-weight: ${({ theme }) => theme.fontWeights.regular};
|
|
58
|
+
color: ${({ theme }) => theme.colors.neutral["800"]};
|
|
59
|
+
line-height: 1;
|
|
61
60
|
`;
|
|
62
61
|
const Description = styled("p", { name: DSCardV2Name, slot: CARD_V2_SLOTS.DESCRIPTION })`
|
|
63
62
|
margin: 0;
|
|
@@ -67,7 +66,6 @@ export {
|
|
|
67
66
|
CardContainer,
|
|
68
67
|
Description,
|
|
69
68
|
LeftAddon,
|
|
70
|
-
LeftSection,
|
|
71
69
|
MainSection,
|
|
72
70
|
RightAddon,
|
|
73
71
|
RightAddonSection,
|
package/dist/esm/styles.js.map
CHANGED
|
@@ -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
|
|
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,
|
|
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.neutral['600']};\n`;\n\nexport { CardContainer, LeftAddon, RightAddonSection, RightAddon, Separator, MainSection, Title, 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,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;AAAA;AAM1F,MAAM,QAAQ,OAAO,MAAM,EAAE,MAAM,cAAc,MAAM,cAAc,MAAM,CAAC;AAAA;AAAA;AAAA;AAAA,iBAI3D,CAAC,EAAE,MAAM,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
|
}
|
|
@@ -7,8 +7,8 @@ export declare const CARD_V2_SLOTS: {
|
|
|
7
7
|
readonly RIGHT_ADDON_SECTION: "right-addon-section";
|
|
8
8
|
readonly SEPARATOR: "separator";
|
|
9
9
|
readonly MAIN_SECTION: "main-section";
|
|
10
|
-
readonly TITLE: "title";
|
|
11
10
|
readonly DESCRIPTION: "description";
|
|
11
|
+
readonly TITLE: "title";
|
|
12
12
|
};
|
|
13
13
|
export declare const CARD_V2_DATA_TESTID: {
|
|
14
14
|
CARD_CONTAINER: string;
|
|
@@ -19,6 +19,6 @@ export declare const CARD_V2_DATA_TESTID: {
|
|
|
19
19
|
RIGHT_ADDON_SECTION: "ds-cardv2-right-addon-section";
|
|
20
20
|
SEPARATOR: "ds-cardv2-separator";
|
|
21
21
|
MAIN_SECTION: "ds-cardv2-main-section";
|
|
22
|
-
TITLE: "ds-cardv2-title";
|
|
23
22
|
DESCRIPTION: "ds-cardv2-description";
|
|
23
|
+
TITLE: "ds-cardv2-title";
|
|
24
24
|
};
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export { DSCardV2, DSCardV2 as CustomCard, DSCardV2WithSchema, DSCardV2WithSchema as DSCardCustomWithSchema, } from './DSCardV2.js';
|
|
2
2
|
export { type DSCardV2T } from './react-desc-prop-types.js';
|
|
3
|
-
export { CARD_V2_DATA_TESTID } from './constants/index.js';
|
|
3
|
+
export { CARD_V2_DATA_TESTID, CARD_V2_SLOTS, DSCardV2Name } from './constants/index.js';
|
package/dist/types/styles.d.ts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
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>;
|
|
@@ -9,4 +8,4 @@ declare const Separator: import("styled-components").StyledComponent<"div", impo
|
|
|
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>;
|
|
10
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>;
|
|
11
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>;
|
|
12
|
-
export { CardContainer,
|
|
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.
|
|
3
|
+
"version": "3.61.0-rc.2",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "ICE MT - Dimsum - Card V2",
|
|
6
6
|
"files": [
|
|
@@ -35,42 +35,37 @@
|
|
|
35
35
|
"reportFile": "tests.xml",
|
|
36
36
|
"indent": 4
|
|
37
37
|
},
|
|
38
|
-
"scripts": {
|
|
39
|
-
"dev": "cross-env NODE_ENV=development node ../../../scripts/build/build.mjs --watch",
|
|
40
|
-
"test": "pui-cli test --passWithNoTests --coverage=\"false\"",
|
|
41
|
-
"lint": "node ../../../scripts/lint.mjs --fix",
|
|
42
|
-
"lint:strict": "node ../../../scripts/lint-strict.mjs",
|
|
43
|
-
"dts": "node ../../../scripts/dts.mjs",
|
|
44
|
-
"build": "cross-env NODE_ENV=production node ../../../scripts/build/build.mjs",
|
|
45
|
-
"checkDeps": "npm exec ../../util/ds-codemods -- check-missing-packages --projectFolderPath=\"./\" --ignorePackagesGlobPattern=\"\" --ignoreFilesGlobPattern=\"**/test-ables/*,**/tests/*\""
|
|
46
|
-
},
|
|
47
38
|
"dependencies": {
|
|
48
|
-
"@elliemae/ds-
|
|
49
|
-
"
|
|
50
|
-
"@elliemae/ds-
|
|
51
|
-
"@elliemae/ds-
|
|
52
|
-
"@elliemae/ds-
|
|
53
|
-
"
|
|
54
|
-
"uid": "catalog:"
|
|
39
|
+
"@elliemae/ds-legacy-header": "1.0.16",
|
|
40
|
+
"uid": "^2.0.2",
|
|
41
|
+
"@elliemae/ds-grid": "3.61.0-rc.2",
|
|
42
|
+
"@elliemae/ds-truncated-tooltip-text": "3.61.0-rc.2",
|
|
43
|
+
"@elliemae/ds-props-helpers": "3.61.0-rc.2",
|
|
44
|
+
"@elliemae/ds-system": "3.61.0-rc.2"
|
|
55
45
|
},
|
|
56
46
|
"devDependencies": {
|
|
57
|
-
"@
|
|
58
|
-
"
|
|
59
|
-
"
|
|
60
|
-
"@elliemae/
|
|
61
|
-
"@
|
|
62
|
-
"jest": "catalog:",
|
|
63
|
-
"styled-components": "catalog:"
|
|
47
|
+
"@xstyled/system": "~3.8.1",
|
|
48
|
+
"jest": "^30.0.0",
|
|
49
|
+
"styled-components": "~5.3.9",
|
|
50
|
+
"@elliemae/ds-icons": "3.61.0-rc.2",
|
|
51
|
+
"@elliemae/ds-monorepo-devops": "3.61.0-rc.2"
|
|
64
52
|
},
|
|
65
53
|
"peerDependencies": {
|
|
66
|
-
"
|
|
67
|
-
"react": "
|
|
68
|
-
"
|
|
69
|
-
"styled-components": "catalog:"
|
|
54
|
+
"react": "^18.3.1",
|
|
55
|
+
"react-dom": "^18.3.1",
|
|
56
|
+
"styled-components": "~5.3.9"
|
|
70
57
|
},
|
|
71
58
|
"publishConfig": {
|
|
72
59
|
"access": "public",
|
|
73
60
|
"typeSafety": false
|
|
74
61
|
},
|
|
75
|
-
"
|
|
76
|
-
|
|
62
|
+
"scripts": {
|
|
63
|
+
"dev": "cross-env NODE_ENV=development node ../../../scripts/build/build.mjs --watch",
|
|
64
|
+
"test": "ds-monorepo-devops test --passWithNoTests --coverage=\"false\"",
|
|
65
|
+
"lint": "node ../../../scripts/lint.mjs --fix",
|
|
66
|
+
"lint:strict": "node ../../../scripts/lint-strict.mjs",
|
|
67
|
+
"dts": "node ../../../scripts/dts.mjs",
|
|
68
|
+
"build": "cross-env NODE_ENV=production node ../../../scripts/build/build.mjs",
|
|
69
|
+
"checkDeps": "npx -yes ../../util/ds-codemods check-missing-packages --projectFolderPath=\"./\" --ignorePackagesGlobPattern=\"\" --ignoreFilesGlobPattern=\"**/test-ables/*,**/tests/*\""
|
|
70
|
+
}
|
|
71
|
+
}
|