@elliemae/ds-card 3.16.0-next.2 → 3.16.0-next.21
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/DSCard.js +20 -9
- package/dist/cjs/DSCard.js.map +2 -2
- package/dist/cjs/DSCardBody.js +8 -3
- package/dist/cjs/DSCardBody.js.map +2 -2
- package/dist/cjs/DSCardHeader.js +10 -4
- package/dist/cjs/DSCardHeader.js.map +2 -2
- package/dist/cjs/detail/DetailCard.js +70 -18
- package/dist/cjs/detail/DetailCard.js.map +2 -2
- package/dist/cjs/detail/styled.js +4 -0
- package/dist/cjs/detail/styled.js.map +1 -1
- package/dist/cjs/index.js +12 -8
- package/dist/cjs/index.js.map +2 -2
- package/dist/cjs/package.json +7 -0
- package/dist/cjs/v2/ActionAddon.js +19 -6
- package/dist/cjs/v2/ActionAddon.js.map +2 -2
- package/dist/cjs/v2/Card.js +28 -8
- package/dist/cjs/v2/Card.js.map +2 -2
- package/dist/cjs/v2/Group.js +19 -6
- package/dist/cjs/v2/Group.js.map +2 -2
- package/dist/cjs/v2/components.js +4 -0
- package/dist/cjs/v2/components.js.map +1 -1
- package/dist/esm/DSCard.js +10 -3
- package/dist/esm/DSCard.js.map +2 -2
- package/dist/esm/DSCardBody.js +2 -1
- package/dist/esm/DSCardBody.js.map +2 -2
- package/dist/esm/DSCardHeader.js +3 -1
- package/dist/esm/DSCardHeader.js.map +2 -2
- package/dist/esm/detail/DetailCard.js +50 -2
- package/dist/esm/detail/DetailCard.js.map +2 -2
- package/dist/esm/detail/styled.js.map +1 -1
- package/dist/esm/index.js +8 -8
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/package.json +7 -0
- package/dist/esm/v2/ActionAddon.js +10 -1
- package/dist/esm/v2/ActionAddon.js.map +2 -2
- package/dist/esm/v2/Card.js +18 -2
- package/dist/esm/v2/Card.js.map +2 -2
- package/dist/esm/v2/Group.js +11 -2
- package/dist/esm/v2/Group.js.map +2 -2
- package/dist/esm/v2/components.js.map +1 -1
- package/dist/types/DSCard.d.ts +4 -4
- package/dist/types/DSCardBody.d.ts +2 -2
- package/dist/types/DSCardHeader.d.ts +3 -3
- package/dist/types/detail/DetailCard.d.ts +16 -16
- package/dist/types/index.d.ts +8 -8
- package/dist/types/v2/ActionAddon.d.ts +5 -5
- package/dist/types/v2/Card.d.ts +6 -6
- package/dist/types/v2/Group.d.ts +4 -4
- package/package.json +15 -14
package/dist/cjs/DSCard.js
CHANGED
|
@@ -18,6 +18,10 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
18
18
|
return to;
|
|
19
19
|
};
|
|
20
20
|
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
21
25
|
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
22
26
|
mod
|
|
23
27
|
));
|
|
@@ -31,26 +35,33 @@ __export(DSCard_exports, {
|
|
|
31
35
|
module.exports = __toCommonJS(DSCard_exports);
|
|
32
36
|
var React = __toESM(require("react"));
|
|
33
37
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
34
|
-
var
|
|
38
|
+
var import_ds_props_helpers = require("@elliemae/ds-props-helpers");
|
|
35
39
|
var import_ds_classnames = require("@elliemae/ds-classnames");
|
|
36
|
-
var import_DSCardBody = __toESM(require("./DSCardBody"));
|
|
37
|
-
var import_DSCardHeader = __toESM(require("./DSCardHeader"));
|
|
40
|
+
var import_DSCardBody = __toESM(require("./DSCardBody.js"));
|
|
41
|
+
var import_DSCardHeader = __toESM(require("./DSCardHeader.js"));
|
|
38
42
|
const DSCard = ({ innerRef = void 0, children = null, containerProps = {}, ...otherProps }) => {
|
|
39
43
|
const { cssClassName } = (0, import_ds_classnames.convertPropToCssClassName)("card");
|
|
40
44
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { "data-testid": "card", ...containerProps, ref: innerRef, className: cssClassName, ...otherProps, children });
|
|
41
45
|
};
|
|
42
46
|
const cardProps = {
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
47
|
+
/** inject props to component wrapper */
|
|
48
|
+
containerProps: import_ds_props_helpers.PropTypes.object.description("inject props to component wrapper"),
|
|
49
|
+
/**
|
|
50
|
+
* Get reference for the button
|
|
51
|
+
*/
|
|
52
|
+
innerRef: import_ds_props_helpers.PropTypes.string.description("Get reference for the button"),
|
|
53
|
+
/**
|
|
54
|
+
* DSCardBody and DSCardHeader
|
|
55
|
+
*/
|
|
56
|
+
children: import_ds_props_helpers.PropTypes.arrayOf(
|
|
57
|
+
import_ds_props_helpers.PropTypes.shape({
|
|
58
|
+
type: import_ds_props_helpers.PropTypes.oneOf([import_DSCardHeader.default, import_DSCardBody.default])
|
|
48
59
|
})
|
|
49
60
|
).description("DSCardBody and DSCardHeader")
|
|
50
61
|
};
|
|
51
62
|
DSCard.propTypes = cardProps;
|
|
52
63
|
DSCard.displayName = "DSCard";
|
|
53
|
-
const DSCardWithSchema = (0,
|
|
64
|
+
const DSCardWithSchema = (0, import_ds_props_helpers.describe)(DSCard);
|
|
54
65
|
DSCardWithSchema.propTypes = cardProps;
|
|
55
66
|
var DSCard_default = DSCard;
|
|
56
67
|
//# sourceMappingURL=DSCard.js.map
|
package/dist/cjs/DSCard.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/DSCard.tsx", "../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["import React from 'react';\nimport { PropTypes, describe } from '@elliemae/ds-
|
|
5
|
-
"mappings": "
|
|
4
|
+
"sourcesContent": ["import React from 'react';\nimport { PropTypes, describe } from '@elliemae/ds-props-helpers';\nimport { convertPropToCssClassName } from '@elliemae/ds-classnames';\nimport DSCardBody from './DSCardBody.js';\nimport DSCardHeader from './DSCardHeader.js';\n\nconst DSCard = ({ innerRef = undefined, children = null, containerProps = {}, ...otherProps }) => {\n const { cssClassName } = convertPropToCssClassName('card');\n\n return (\n <div data-testid=\"card\" {...containerProps} ref={innerRef} className={cssClassName} {...otherProps}>\n {children}\n </div>\n );\n};\n\nconst cardProps = {\n /** inject props to component wrapper */\n containerProps: PropTypes.object.description('inject props to component wrapper'),\n /**\n * Get reference for the button\n */\n innerRef: PropTypes.string.description('Get reference for the button'),\n /**\n * DSCardBody and DSCardHeader\n */\n children: PropTypes.arrayOf(\n PropTypes.shape({\n type: PropTypes.oneOf([DSCardHeader, DSCardBody]),\n }),\n ).description('DSCardBody and DSCardHeader'),\n};\n\nDSCard.propTypes = cardProps;\nDSCard.displayName = 'DSCard';\nconst DSCardWithSchema = describe(DSCard);\nDSCardWithSchema.propTypes = cardProps;\n\nexport { DSCard, DSCardWithSchema };\nexport default DSCard;\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADUnB;AATJ,8BAAoC;AACpC,2BAA0C;AAC1C,wBAAuB;AACvB,0BAAyB;AAEzB,MAAM,SAAS,CAAC,EAAE,WAAW,QAAW,WAAW,MAAM,iBAAiB,CAAC,GAAG,GAAG,WAAW,MAAM;AAChG,QAAM,EAAE,aAAa,QAAI,gDAA0B,MAAM;AAEzD,SACE,4CAAC,SAAI,eAAY,QAAQ,GAAG,gBAAgB,KAAK,UAAU,WAAW,cAAe,GAAG,YACrF,UACH;AAEJ;AAEA,MAAM,YAAY;AAAA;AAAA,EAEhB,gBAAgB,kCAAU,OAAO,YAAY,mCAAmC;AAAA;AAAA;AAAA;AAAA,EAIhF,UAAU,kCAAU,OAAO,YAAY,8BAA8B;AAAA;AAAA;AAAA;AAAA,EAIrE,UAAU,kCAAU;AAAA,IAClB,kCAAU,MAAM;AAAA,MACd,MAAM,kCAAU,MAAM,CAAC,oBAAAA,SAAc,kBAAAC,OAAU,CAAC;AAAA,IAClD,CAAC;AAAA,EACH,EAAE,YAAY,6BAA6B;AAC7C;AAEA,OAAO,YAAY;AACnB,OAAO,cAAc;AACrB,MAAM,uBAAmB,kCAAS,MAAM;AACxC,iBAAiB,YAAY;AAG7B,IAAO,iBAAQ;",
|
|
6
6
|
"names": ["DSCardHeader", "DSCardBody"]
|
|
7
7
|
}
|
package/dist/cjs/DSCardBody.js
CHANGED
|
@@ -18,6 +18,10 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
18
18
|
return to;
|
|
19
19
|
};
|
|
20
20
|
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
21
25
|
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
22
26
|
mod
|
|
23
27
|
));
|
|
@@ -31,14 +35,15 @@ __export(DSCardBody_exports, {
|
|
|
31
35
|
module.exports = __toCommonJS(DSCardBody_exports);
|
|
32
36
|
var React = __toESM(require("react"));
|
|
33
37
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
34
|
-
var
|
|
38
|
+
var import_ds_props_helpers = require("@elliemae/ds-props-helpers");
|
|
35
39
|
const DSCardBody = ({ children }) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "em-ds-card-body", "data-testid": "card-body", children });
|
|
36
40
|
const bodyProps = {
|
|
37
|
-
children
|
|
41
|
+
/** children */
|
|
42
|
+
children: import_ds_props_helpers.PropTypes.element.description("children")
|
|
38
43
|
};
|
|
39
44
|
DSCardBody.propTypes = bodyProps;
|
|
40
45
|
DSCardBody.displayName = "DSCardBody";
|
|
41
|
-
const DSCardBodyWithSchema = (0,
|
|
46
|
+
const DSCardBodyWithSchema = (0, import_ds_props_helpers.describe)(DSCardBody);
|
|
42
47
|
DSCardBodyWithSchema.propTypes = bodyProps;
|
|
43
48
|
var DSCardBody_default = DSCardBody;
|
|
44
49
|
//# sourceMappingURL=DSCardBody.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/DSCardBody.tsx", "../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["import React from 'react';\nimport { PropTypes, describe } from '@elliemae/ds-
|
|
5
|
-
"mappings": "
|
|
4
|
+
"sourcesContent": ["import React from 'react';\nimport { PropTypes, describe } from '@elliemae/ds-props-helpers';\n\nconst DSCardBody = ({ children }) => (\n <div className=\"em-ds-card-body\" data-testid=\"card-body\">\n {children}\n </div>\n);\n\nconst bodyProps = {\n /** children */\n children: PropTypes.element.description('children'),\n};\n\nDSCardBody.propTypes = bodyProps;\nDSCardBody.displayName = 'DSCardBody';\nconst DSCardBodyWithSchema = describe(DSCardBody);\nDSCardBodyWithSchema.propTypes = bodyProps;\n\nexport { DSCardBody, DSCardBodyWithSchema };\nexport default DSCardBody;\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADIrB;AAHF,8BAAoC;AAEpC,MAAM,aAAa,CAAC,EAAE,SAAS,MAC7B,4CAAC,SAAI,WAAU,mBAAkB,eAAY,aAC1C,UACH;AAGF,MAAM,YAAY;AAAA;AAAA,EAEhB,UAAU,kCAAU,QAAQ,YAAY,UAAU;AACpD;AAEA,WAAW,YAAY;AACvB,WAAW,cAAc;AACzB,MAAM,2BAAuB,kCAAS,UAAU;AAChD,qBAAqB,YAAY;AAGjC,IAAO,qBAAQ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/dist/cjs/DSCardHeader.js
CHANGED
|
@@ -18,6 +18,10 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
18
18
|
return to;
|
|
19
19
|
};
|
|
20
20
|
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
21
25
|
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
22
26
|
mod
|
|
23
27
|
));
|
|
@@ -31,7 +35,7 @@ __export(DSCardHeader_exports, {
|
|
|
31
35
|
module.exports = __toCommonJS(DSCardHeader_exports);
|
|
32
36
|
var React = __toESM(require("react"));
|
|
33
37
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
34
|
-
var
|
|
38
|
+
var import_ds_props_helpers = require("@elliemae/ds-props-helpers");
|
|
35
39
|
var import_ds_classnames = require("@elliemae/ds-classnames");
|
|
36
40
|
const DSCardHeader = ({ title, action }) => {
|
|
37
41
|
const { cssClassName, classNameElement } = (0, import_ds_classnames.convertPropToCssClassName)("card-header");
|
|
@@ -41,12 +45,14 @@ const DSCardHeader = ({ title, action }) => {
|
|
|
41
45
|
] });
|
|
42
46
|
};
|
|
43
47
|
const cardHeader = {
|
|
44
|
-
|
|
45
|
-
|
|
48
|
+
/** card header title */
|
|
49
|
+
title: import_ds_props_helpers.PropTypes.string.description("card header title"),
|
|
50
|
+
/** action */
|
|
51
|
+
action: import_ds_props_helpers.PropTypes.node.description("action")
|
|
46
52
|
};
|
|
47
53
|
DSCardHeader.propTypes = cardHeader;
|
|
48
54
|
DSCardHeader.displayName = "DSCardHeader";
|
|
49
|
-
const DSCardHeaderWithSchema = (0,
|
|
55
|
+
const DSCardHeaderWithSchema = (0, import_ds_props_helpers.describe)(DSCardHeader);
|
|
50
56
|
DSCardHeaderWithSchema.propTypes = cardHeader;
|
|
51
57
|
var DSCardHeader_default = DSCardHeader;
|
|
52
58
|
//# sourceMappingURL=DSCardHeader.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/DSCardHeader.tsx", "../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["import React from 'react';\nimport { PropTypes, describe } from '@elliemae/ds-
|
|
5
|
-
"mappings": "
|
|
4
|
+
"sourcesContent": ["import React from 'react';\nimport { PropTypes, describe } from '@elliemae/ds-props-helpers';\nimport { convertPropToCssClassName } from '@elliemae/ds-classnames';\n\nconst DSCardHeader = ({ title, action }) => {\n const { cssClassName, classNameElement } = convertPropToCssClassName('card-header');\n return (\n <div className={cssClassName} data-testid=\"card-header\">\n <span className={classNameElement('heading')}>{title}</span>\n <div className={classNameElement('pull-right')} data-testid=\"ds-card_header-action\">\n {action}\n </div>\n </div>\n );\n};\n\nconst cardHeader = {\n /** card header title */\n title: PropTypes.string.description('card header title'),\n /** action */\n action: PropTypes.node.description('action'),\n};\n\nDSCardHeader.propTypes = cardHeader;\nDSCardHeader.displayName = 'DSCardHeader';\nconst DSCardHeaderWithSchema = describe(DSCardHeader);\nDSCardHeaderWithSchema.propTypes = cardHeader;\n\nexport { DSCardHeader, DSCardHeaderWithSchema };\nexport default DSCardHeader;\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADOnB;AANJ,8BAAoC;AACpC,2BAA0C;AAE1C,MAAM,eAAe,CAAC,EAAE,OAAO,OAAO,MAAM;AAC1C,QAAM,EAAE,cAAc,iBAAiB,QAAI,gDAA0B,aAAa;AAClF,SACE,6CAAC,SAAI,WAAW,cAAc,eAAY,eACxC;AAAA,gDAAC,UAAK,WAAW,iBAAiB,SAAS,GAAI,iBAAM;AAAA,IACrD,4CAAC,SAAI,WAAW,iBAAiB,YAAY,GAAG,eAAY,yBACzD,kBACH;AAAA,KACF;AAEJ;AAEA,MAAM,aAAa;AAAA;AAAA,EAEjB,OAAO,kCAAU,OAAO,YAAY,mBAAmB;AAAA;AAAA,EAEvD,QAAQ,kCAAU,KAAK,YAAY,QAAQ;AAC7C;AAEA,aAAa,YAAY;AACzB,aAAa,cAAc;AAC3B,MAAM,6BAAyB,kCAAS,YAAY;AACpD,uBAAuB,YAAY;AAGnC,IAAO,uBAAQ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -18,6 +18,10 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
18
18
|
return to;
|
|
19
19
|
};
|
|
20
20
|
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
21
25
|
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
22
26
|
mod
|
|
23
27
|
));
|
|
@@ -32,14 +36,14 @@ module.exports = __toCommonJS(DetailCard_exports);
|
|
|
32
36
|
var React = __toESM(require("react"));
|
|
33
37
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
34
38
|
var import_lodash = require("lodash");
|
|
35
|
-
var
|
|
39
|
+
var import_ds_props_helpers = require("@elliemae/ds-props-helpers");
|
|
36
40
|
var import_ds_icons = require("@elliemae/ds-icons");
|
|
37
41
|
var import_ds_system = require("@elliemae/ds-system");
|
|
38
42
|
var import_ds_button = __toESM(require("@elliemae/ds-button"));
|
|
39
43
|
var import_ds_separator = __toESM(require("@elliemae/ds-separator"));
|
|
40
44
|
var import_ds_grid = require("@elliemae/ds-grid");
|
|
41
45
|
var import_ds_form = require("@elliemae/ds-form");
|
|
42
|
-
var import_styled = require("./styled");
|
|
46
|
+
var import_styled = require("./styled.js");
|
|
43
47
|
const DetailCard = ({
|
|
44
48
|
title,
|
|
45
49
|
description,
|
|
@@ -47,13 +51,16 @@ const DetailCard = ({
|
|
|
47
51
|
rightValue,
|
|
48
52
|
rightDescription,
|
|
49
53
|
rightAddon,
|
|
54
|
+
// select props
|
|
50
55
|
selectable = false,
|
|
51
56
|
isSelected = false,
|
|
52
57
|
onSelect = import_lodash.noop,
|
|
58
|
+
// expand props
|
|
53
59
|
expandable = false,
|
|
54
60
|
isExpanded = false,
|
|
55
61
|
onExpand = import_lodash.noop,
|
|
56
62
|
expandContent,
|
|
63
|
+
// state props
|
|
57
64
|
readOnly = false,
|
|
58
65
|
disabled = false
|
|
59
66
|
}) => {
|
|
@@ -112,25 +119,70 @@ const DetailCard = ({
|
|
|
112
119
|
] }) });
|
|
113
120
|
};
|
|
114
121
|
const detailProps = {
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
122
|
+
/**
|
|
123
|
+
* Title of the card.
|
|
124
|
+
*/
|
|
125
|
+
title: import_ds_props_helpers.PropTypes.string.isRequired.description("Title of the card."),
|
|
126
|
+
/**
|
|
127
|
+
* Description of the card.
|
|
128
|
+
*/
|
|
129
|
+
description: import_ds_props_helpers.PropTypes.string.description("Description of the card."),
|
|
130
|
+
/**
|
|
131
|
+
* Description color.
|
|
132
|
+
*/
|
|
133
|
+
descriptionColor: import_ds_props_helpers.PropTypes.oneOf(["primary", "neutral"]).description("Description color."),
|
|
134
|
+
/**
|
|
135
|
+
* Right value (should be used with `rightDescription`)
|
|
136
|
+
*/
|
|
137
|
+
rightValue: import_ds_props_helpers.PropTypes.string.description("Right value (should be used with `rightDescription`)"),
|
|
138
|
+
/**
|
|
139
|
+
* Right description (should be used with `rightValue`)
|
|
140
|
+
*/
|
|
141
|
+
rightDescription: import_ds_props_helpers.PropTypes.string.description("Right description (should be used with `rightValue`)"),
|
|
142
|
+
/**
|
|
143
|
+
* Right addon array, max elements: 2
|
|
144
|
+
*/
|
|
145
|
+
rightAddon: import_ds_props_helpers.PropTypes.element.description("Right addon array, max elements: 2"),
|
|
146
|
+
/**
|
|
147
|
+
* Whether if the card is selectable or not
|
|
148
|
+
*/
|
|
149
|
+
selectable: import_ds_props_helpers.PropTypes.bool.description("Whether if the card is selectable or not"),
|
|
150
|
+
/**
|
|
151
|
+
* Whether if the card is selected or not
|
|
152
|
+
*/
|
|
153
|
+
isSelected: import_ds_props_helpers.PropTypes.bool.description("Whether if the card is selected or not"),
|
|
154
|
+
/**
|
|
155
|
+
* Callback on selection
|
|
156
|
+
*/
|
|
157
|
+
onSelect: import_ds_props_helpers.PropTypes.func.description("Callback on selection"),
|
|
158
|
+
/**
|
|
159
|
+
* Whether if the card is expandable or not
|
|
160
|
+
*/
|
|
161
|
+
expandable: import_ds_props_helpers.PropTypes.bool.description("Whether if the card is expandable or not"),
|
|
162
|
+
/**
|
|
163
|
+
* Whether if the card is expanded or not
|
|
164
|
+
*/
|
|
165
|
+
isExpanded: import_ds_props_helpers.PropTypes.bool.description("Whether if the card is expanded or not"),
|
|
166
|
+
/**
|
|
167
|
+
* Callback on expand
|
|
168
|
+
*/
|
|
169
|
+
onExpand: import_ds_props_helpers.PropTypes.func.description("Callback on expand"),
|
|
170
|
+
/**
|
|
171
|
+
* Content
|
|
172
|
+
*/
|
|
173
|
+
expandContent: import_ds_props_helpers.PropTypes.element.description("Content"),
|
|
174
|
+
/**
|
|
175
|
+
* Read only
|
|
176
|
+
*/
|
|
177
|
+
readOnly: import_ds_props_helpers.PropTypes.bool.description("Read only"),
|
|
178
|
+
/**
|
|
179
|
+
* Disabled
|
|
180
|
+
*/
|
|
181
|
+
disabled: import_ds_props_helpers.PropTypes.bool.description("Disabled")
|
|
130
182
|
};
|
|
131
183
|
DetailCard.propTypes = detailProps;
|
|
132
184
|
DetailCard.displayName = "DetailCard";
|
|
133
|
-
const DSCardDetailWithSchema = (0,
|
|
185
|
+
const DSCardDetailWithSchema = (0, import_ds_props_helpers.describe)(DetailCard);
|
|
134
186
|
DSCardDetailWithSchema.propTypes = detailProps;
|
|
135
187
|
var DetailCard_default = DetailCard;
|
|
136
188
|
//# sourceMappingURL=DetailCard.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/detail/DetailCard.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["/* eslint-disable max-lines */\n/* eslint-disable jsx-a11y/click-events-have-key-events */\n/* eslint-disable complexity */\nimport React from 'react';\nimport { compact, noop } from 'lodash';\nimport { PropTypes, describe } from '@elliemae/ds-
|
|
5
|
-
"mappings": "
|
|
4
|
+
"sourcesContent": ["/* eslint-disable max-lines */\n/* eslint-disable jsx-a11y/click-events-have-key-events */\n/* eslint-disable complexity */\nimport React from 'react';\nimport { compact, noop } from 'lodash';\nimport { PropTypes, describe } from '@elliemae/ds-props-helpers';\nimport { ArrowheadDown, ArrowheadRight } from '@elliemae/ds-icons';\nimport { useTheme } from '@elliemae/ds-system';\nimport DSButton from '@elliemae/ds-button';\nimport DSSeparator from '@elliemae/ds-separator';\nimport { Grid } from '@elliemae/ds-grid';\nimport { DSCheckbox } from '@elliemae/ds-form';\nimport { Container, Title, Description, RightAddon, RightDescription, RightValue } from './styled.js';\n\nconst DetailCard = ({\n title,\n description,\n descriptionColor = 'neutral',\n rightValue,\n rightDescription,\n rightAddon,\n // select props\n selectable = false,\n isSelected = false,\n onSelect = noop,\n // expand props\n expandable = false,\n isExpanded = false,\n onExpand = noop,\n expandContent,\n // state props\n readOnly = false,\n disabled = false,\n}) => {\n const theme = useTheme();\n const hasRightLegend = rightValue && rightDescription;\n const hasRightPosition = hasRightLegend || rightAddon;\n const topWrapperCols = ['1fr'];\n if (hasRightPosition) topWrapperCols.push('auto');\n if (expandable) topWrapperCols.unshift('20px');\n if (selectable) topWrapperCols.unshift(theme.space.s);\n return (\n <>\n <Container disabled={disabled || readOnly} active={selectable && isSelected} data-testid=\"card-detail-container\">\n <Grid cols={topWrapperCols} alignItems={!description ? 'center' : undefined}>\n {selectable && (\n <Grid pt={description && '9px'}>\n <DSCheckbox\n checked={isSelected}\n onChange={onSelect}\n readOnly={readOnly}\n disabled={disabled}\n data-testid=\"card-checkbox\"\n />\n </Grid>\n )}\n {expandable && (\n <Grid height=\"16px\" pt={description && 'xxs'} mt={!description && '-5px'}>\n <DSButton\n size=\"s\"\n buttonType=\"text\"\n containerProps={{\n 'data-testid': 'expand-button',\n }}\n onClick={onExpand}\n icon={\n isExpanded ? (\n <ArrowheadDown color={['neutral', '500']} size=\"s\" />\n ) : (\n <ArrowheadRight color={['neutral', '500']} size=\"s\" />\n )\n }\n disabled={disabled}\n />\n </Grid>\n )}\n <Grid pr=\"24px\">\n <Title>{title}</Title>\n {description && <Description descriptionColor={descriptionColor}>{description}</Description>}\n </Grid>\n {hasRightPosition && (\n <Grid cols={compact([hasRightPosition && 'auto', rightAddon && 'auto'])}>\n {hasRightLegend && (\n <Grid pr=\"24px\" rows={['auto', 'auto', 1]}>\n <RightDescription justifyContent=\"flex-end\">{rightDescription}</RightDescription>\n <RightValue justifyContent=\"flex-end\">{rightValue}</RightValue>\n <Grid />\n </Grid>\n )}\n {rightAddon && (\n <RightAddon cols={['auto', 'auto']} gutter=\"2px\">\n {rightAddon}\n </RightAddon>\n )}\n </Grid>\n )}\n </Grid>\n {expandContent && isExpanded && (\n <Grid ml={selectable && 's'} mr={rightAddon && 'xs'}>\n <DSSeparator dashed position=\"initial\" margin=\"none\" />\n <Grid pt=\"xxs\" data-testid=\"detail-card-expanded-content\">\n {expandContent}\n </Grid>\n </Grid>\n )}\n </Container>\n </>\n );\n};\n\nconst detailProps = {\n /**\n * Title of the card.\n */\n title: PropTypes.string.isRequired.description('Title of the card.'),\n /**\n * Description of the card.\n */\n description: PropTypes.string.description('Description of the card.'),\n /**\n * Description color.\n */\n descriptionColor: PropTypes.oneOf(['primary', 'neutral']).description('Description color.'),\n /**\n * Right value (should be used with `rightDescription`)\n */\n rightValue: PropTypes.string.description('Right value (should be used with `rightDescription`)'),\n /**\n * Right description (should be used with `rightValue`)\n */\n rightDescription: PropTypes.string.description('Right description (should be used with `rightValue`)'),\n /**\n * Right addon array, max elements: 2\n */\n rightAddon: PropTypes.element.description('Right addon array, max elements: 2'),\n /**\n * Whether if the card is selectable or not\n */\n selectable: PropTypes.bool.description('Whether if the card is selectable or not'),\n /**\n * Whether if the card is selected or not\n */\n isSelected: PropTypes.bool.description('Whether if the card is selected or not'),\n /**\n * Callback on selection\n */\n onSelect: PropTypes.func.description('Callback on selection'),\n /**\n * Whether if the card is expandable or not\n */\n expandable: PropTypes.bool.description('Whether if the card is expandable or not'),\n /**\n * Whether if the card is expanded or not\n */\n isExpanded: PropTypes.bool.description('Whether if the card is expanded or not'),\n /**\n * Callback on expand\n */\n onExpand: PropTypes.func.description('Callback on expand'),\n /**\n * Content\n */\n expandContent: PropTypes.element.description('Content'),\n /**\n * Read only\n */\n readOnly: PropTypes.bool.description('Read only'),\n /**\n * Disabled\n */\n disabled: PropTypes.bool.description('Disabled'),\n};\n\nDetailCard.propTypes = detailProps;\nDetailCard.displayName = 'DetailCard';\nconst DSCardDetailWithSchema = describe(DetailCard);\nDSCardDetailWithSchema.propTypes = detailProps;\n\nexport { DetailCard, DSCardDetailWithSchema };\nexport default DetailCard;\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": "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",
|
|
6
6
|
"names": ["DSButton", "DSSeparator"]
|
|
7
7
|
}
|
|
@@ -18,6 +18,10 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
18
18
|
return to;
|
|
19
19
|
};
|
|
20
20
|
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
21
25
|
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
22
26
|
mod
|
|
23
27
|
));
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/detail/styled.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
4
|
"sourcesContent": ["import { styled } from '@elliemae/ds-system';\nimport { Grid } from '@elliemae/ds-grid';\n\nexport const Separator = styled.div`\n width: 100%;\n height: 24px;\n border-right: 1px solid ${(props) => props.theme.colors.neutral['300']};\n margin: 0 8px;\n`;\n\nexport const Title = styled.h3`\n margin: 0;\n font-size: 16px;\n min-height: 20px;\n font-weight: ${(props) => props.theme.fontWeights.semibold};\n color: ${(props) => props.theme.colors.neutral['700']};\n`;\n\nexport const Description = styled.p`\n margin: 0;\n font-size: 12px;\n min-height: 18px;\n display: flex;\n align-items: center;\n color: ${(props) =>\n props.descriptionColor === 'neutral' ? props.theme.colors.neutral['600'] : props.theme.colors.brand['600']};\n`;\n\nexport const RightAddon = styled(Grid)`\n margin: 0;\n white-space: nowrap;\n`;\n\nexport const RightDescription = styled(Grid)`\n margin: 0;\n white-space: nowrap;\n font-size: 12px;\n color: ${(props) => props.theme.colors.neutral['600']};\n`;\nexport const RightValue = styled(Grid)`\n margin: 0;\n white-space: nowrap;\n font-size: 14px;\n color: ${(props) => props.theme.colors.neutral['800']};\n`;\n\nexport const ExpandContent = styled.div`\n font-size: 12px;\n`;\n\nconst border = ({ active, theme }) => (active ? theme.colors.brand['600'] : theme.colors.neutral['200']);\nconst background = ({ active, theme }) => (active ? theme.colors.brand['100'] : theme.colors.neutral['000']);\n\nexport const Container = styled(Grid)`\n width: 100%;\n min-height: 52px;\n min-width: 244px;\n padding: 6px 8px 6px 12px;\n position: relative;\n border-top: 1px solid ${border};\n border-bottom: 1px solid ${border};\n background: ${background};\n ${(props) =>\n props.disabled\n ? `\n ${Title}, ${Description}, ${RightDescription}, ${RightValue} {\n color: ${props.theme.colors.neutral['500']};\n }\n `\n : ''}\n &:hover {\n box-shadow: 0 2px 4px 0 rgba(53, 60, 70, 0.5);\n z-index: 1;\n }\n`;\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
-
"mappings": "
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,uBAAuB;AACvB,qBAAqB;AAEd,MAAM,YAAY,wBAAO;AAAA;AAAA;AAAA,4BAGJ,CAAC,UAAU,MAAM,MAAM,OAAO,QAAQ,KAAK;AAAA;AAAA;AAIhE,MAAM,QAAQ,wBAAO;AAAA;AAAA;AAAA;AAAA,iBAIX,CAAC,UAAU,MAAM,MAAM,YAAY;AAAA,WACzC,CAAC,UAAU,MAAM,MAAM,OAAO,QAAQ,KAAK;AAAA;AAG/C,MAAM,cAAc,wBAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,WAMvB,CAAC,UACR,MAAM,qBAAqB,YAAY,MAAM,MAAM,OAAO,QAAQ,KAAK,IAAI,MAAM,MAAM,OAAO,MAAM,KAAK;AAAA;AAGtG,MAAM,iBAAa,yBAAO,mBAAI;AAAA;AAAA;AAAA;AAK9B,MAAM,uBAAmB,yBAAO,mBAAI;AAAA;AAAA;AAAA;AAAA,WAIhC,CAAC,UAAU,MAAM,MAAM,OAAO,QAAQ,KAAK;AAAA;AAE/C,MAAM,iBAAa,yBAAO,mBAAI;AAAA;AAAA;AAAA;AAAA,WAI1B,CAAC,UAAU,MAAM,MAAM,OAAO,QAAQ,KAAK;AAAA;AAG/C,MAAM,gBAAgB,wBAAO;AAAA;AAAA;AAIpC,MAAM,SAAS,CAAC,EAAE,QAAQ,MAAM,MAAO,SAAS,MAAM,OAAO,MAAM,KAAK,IAAI,MAAM,OAAO,QAAQ,KAAK;AACtG,MAAM,aAAa,CAAC,EAAE,QAAQ,MAAM,MAAO,SAAS,MAAM,OAAO,MAAM,KAAK,IAAI,MAAM,OAAO,QAAQ,KAAK;AAEnG,MAAM,gBAAY,yBAAO,mBAAI;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,0BAMV;AAAA,6BACG;AAAA,gBACb;AAAA,IACZ,CAAC,UACD,MAAM,WACF;AAAA,MACF,UAAU,gBAAgB,qBAAqB;AAAA,eACtC,MAAM,MAAM,OAAO,QAAQ,KAAK;AAAA;AAAA,MAGvC;AAAA;AAAA;AAAA;AAAA;AAAA;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/dist/cjs/index.js
CHANGED
|
@@ -19,6 +19,10 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
19
19
|
};
|
|
20
20
|
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
21
21
|
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
22
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
23
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
24
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
25
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
22
26
|
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
23
27
|
mod
|
|
24
28
|
));
|
|
@@ -29,12 +33,12 @@ __export(src_exports, {
|
|
|
29
33
|
});
|
|
30
34
|
module.exports = __toCommonJS(src_exports);
|
|
31
35
|
var React = __toESM(require("react"));
|
|
32
|
-
__reExport(src_exports, require("./DSCard"), module.exports);
|
|
33
|
-
__reExport(src_exports, require("./DSCardHeader"), module.exports);
|
|
34
|
-
__reExport(src_exports, require("./DSCardBody"), module.exports);
|
|
35
|
-
__reExport(src_exports, require("./v2/Card"), module.exports);
|
|
36
|
-
__reExport(src_exports, require("./v2/Group"), module.exports);
|
|
37
|
-
__reExport(src_exports, require("./v2/ActionAddon"), module.exports);
|
|
38
|
-
__reExport(src_exports, require("./detail/DetailCard"), module.exports);
|
|
39
|
-
var import_DSCard = __toESM(require("./DSCard"));
|
|
36
|
+
__reExport(src_exports, require("./DSCard.js"), module.exports);
|
|
37
|
+
__reExport(src_exports, require("./DSCardHeader.js"), module.exports);
|
|
38
|
+
__reExport(src_exports, require("./DSCardBody.js"), module.exports);
|
|
39
|
+
__reExport(src_exports, require("./v2/Card.js"), module.exports);
|
|
40
|
+
__reExport(src_exports, require("./v2/Group.js"), module.exports);
|
|
41
|
+
__reExport(src_exports, require("./v2/ActionAddon.js"), module.exports);
|
|
42
|
+
__reExport(src_exports, require("./detail/DetailCard.js"), module.exports);
|
|
43
|
+
var import_DSCard = __toESM(require("./DSCard.js"));
|
|
40
44
|
//# sourceMappingURL=index.js.map
|
package/dist/cjs/index.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/index.tsx", "../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["export * from './DSCard';\nexport * from './DSCardHeader';\nexport * from './DSCardBody';\nexport * from './v2/Card';\nexport * from './v2/Group';\nexport * from './v2/ActionAddon';\nexport * from './detail/DetailCard';\n\nexport { default } from './DSCard';\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
-
"mappings": "
|
|
4
|
+
"sourcesContent": ["export * from './DSCard.js';\nexport * from './DSCardHeader.js';\nexport * from './DSCardBody.js';\nexport * from './v2/Card.js';\nexport * from './v2/Group.js';\nexport * from './v2/ActionAddon.js';\nexport * from './detail/DetailCard.js';\n\nexport { default } from './DSCard.js';\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,wBAAc,wBAAd;AACA,wBAAc,8BADd;AAEA,wBAAc,4BAFd;AAGA,wBAAc,yBAHd;AAIA,wBAAc,0BAJd;AAKA,wBAAc,gCALd;AAMA,wBAAc,mCANd;AAQA,oBAAwB;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -18,6 +18,10 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
18
18
|
return to;
|
|
19
19
|
};
|
|
20
20
|
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
21
25
|
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
22
26
|
mod
|
|
23
27
|
));
|
|
@@ -31,7 +35,7 @@ __export(ActionAddon_exports, {
|
|
|
31
35
|
module.exports = __toCommonJS(ActionAddon_exports);
|
|
32
36
|
var React = __toESM(require("react"));
|
|
33
37
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
34
|
-
var
|
|
38
|
+
var import_ds_props_helpers = require("@elliemae/ds-props-helpers");
|
|
35
39
|
var import_ds_system = require("@elliemae/ds-system");
|
|
36
40
|
var import_ds_icons = require("@elliemae/ds-icons");
|
|
37
41
|
var import_ds_button = require("@elliemae/ds-button");
|
|
@@ -50,14 +54,23 @@ const ActionAddon = ({ innerRef, label, onClick, icon }) => /* @__PURE__ */ (0,
|
|
|
50
54
|
icon || /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_icons.ChevronSmallDown, { color: ["brand-primary", 700] })
|
|
51
55
|
] });
|
|
52
56
|
const actionProps = {
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
+
/**
|
|
58
|
+
* Addon label
|
|
59
|
+
*/
|
|
60
|
+
label: import_ds_props_helpers.PropTypes.string.description("Addon label"),
|
|
61
|
+
/**
|
|
62
|
+
* On click callback
|
|
63
|
+
*/
|
|
64
|
+
onClick: import_ds_props_helpers.PropTypes.func.description("On click callback"),
|
|
65
|
+
/**
|
|
66
|
+
* Icon to display after the label
|
|
67
|
+
*/
|
|
68
|
+
icon: import_ds_props_helpers.PropTypes.element.description("Icon to display after the label"),
|
|
69
|
+
innerRef: import_ds_props_helpers.PropTypes.func.description("Ref to the action button")
|
|
57
70
|
};
|
|
58
71
|
ActionAddon.propTypes = actionProps;
|
|
59
72
|
ActionAddon.displayName = "ActionAddon";
|
|
60
|
-
const DSCardActionAddonWithSchema = (0,
|
|
73
|
+
const DSCardActionAddonWithSchema = (0, import_ds_props_helpers.describe)(ActionAddon);
|
|
61
74
|
DSCardActionAddonWithSchema.propTypes = actionProps;
|
|
62
75
|
var ActionAddon_default = ActionAddon;
|
|
63
76
|
//# sourceMappingURL=ActionAddon.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/v2/ActionAddon.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["import React from 'react';\nimport { PropTypes, describe } from '@elliemae/ds-
|
|
5
|
-
"mappings": "
|
|
4
|
+
"sourcesContent": ["import React from 'react';\nimport { PropTypes, describe } from '@elliemae/ds-props-helpers';\nimport { styled } from '@elliemae/ds-system';\nimport { ChevronSmallDown } from '@elliemae/ds-icons';\nimport { DSButtonV2 } from '@elliemae/ds-button';\n\nconst Addon = styled(DSButtonV2)`\n background-color: transparent;\n padding: 4px;\n height: 100%;\n border: none;\n font-size: 13px;\n font-weight: ${(props) => props.theme.fontWeights.semibold};\n color: ${(props) => props.theme.colors.brand['700']};\n cursor: pointer;\n`;\n\nconst ActionAddon = ({ innerRef, label, onClick, icon }) => (\n <Addon innerRef={innerRef} onClick={onClick} buttonType=\"icon\">\n {label}\n {icon || <ChevronSmallDown color={['brand-primary', 700]} />}\n </Addon>\n);\n\nconst actionProps = {\n /**\n * Addon label\n */\n label: PropTypes.string.description('Addon label'),\n /**\n * On click callback\n */\n onClick: PropTypes.func.description('On click callback'),\n /**\n * Icon to display after the label\n */\n icon: PropTypes.element.description('Icon to display after the label'),\n innerRef: PropTypes.func.description('Ref to the action button'),\n};\n\nActionAddon.propTypes = actionProps;\nActionAddon.displayName = 'ActionAddon';\nconst DSCardActionAddonWithSchema = describe(ActionAddon);\nDSCardActionAddonWithSchema.propTypes = actionProps;\n\nexport { ActionAddon, DSCardActionAddonWithSchema };\nexport default ActionAddon;\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADkBrB;AAjBF,8BAAoC;AACpC,uBAAuB;AACvB,sBAAiC;AACjC,uBAA2B;AAE3B,MAAM,YAAQ,yBAAO,2BAAU;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,iBAMd,CAAC,UAAU,MAAM,MAAM,YAAY;AAAA,WACzC,CAAC,UAAU,MAAM,MAAM,OAAO,MAAM,KAAK;AAAA;AAAA;AAIpD,MAAM,cAAc,CAAC,EAAE,UAAU,OAAO,SAAS,KAAK,MACpD,6CAAC,SAAM,UAAoB,SAAkB,YAAW,QACrD;AAAA;AAAA,EACA,QAAQ,4CAAC,oCAAiB,OAAO,CAAC,iBAAiB,GAAG,GAAG;AAAA,GAC5D;AAGF,MAAM,cAAc;AAAA;AAAA;AAAA;AAAA,EAIlB,OAAO,kCAAU,OAAO,YAAY,aAAa;AAAA;AAAA;AAAA;AAAA,EAIjD,SAAS,kCAAU,KAAK,YAAY,mBAAmB;AAAA;AAAA;AAAA;AAAA,EAIvD,MAAM,kCAAU,QAAQ,YAAY,iCAAiC;AAAA,EACrE,UAAU,kCAAU,KAAK,YAAY,0BAA0B;AACjE;AAEA,YAAY,YAAY;AACxB,YAAY,cAAc;AAC1B,MAAM,kCAA8B,kCAAS,WAAW;AACxD,4BAA4B,YAAY;AAGxC,IAAO,sBAAQ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/dist/cjs/v2/Card.js
CHANGED
|
@@ -18,6 +18,10 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
18
18
|
return to;
|
|
19
19
|
};
|
|
20
20
|
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
21
25
|
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
22
26
|
mod
|
|
23
27
|
));
|
|
@@ -31,10 +35,10 @@ __export(Card_exports, {
|
|
|
31
35
|
module.exports = __toCommonJS(Card_exports);
|
|
32
36
|
var React = __toESM(require("react"));
|
|
33
37
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
34
|
-
var
|
|
38
|
+
var import_ds_props_helpers = require("@elliemae/ds-props-helpers");
|
|
35
39
|
var import_ds_header = require("@elliemae/ds-header");
|
|
36
40
|
var import_ds_truncated_tooltip_text = __toESM(require("@elliemae/ds-truncated-tooltip-text"));
|
|
37
|
-
var import_components = require("./components");
|
|
41
|
+
var import_components = require("./components.js");
|
|
38
42
|
const getCol = (rightAddon) => {
|
|
39
43
|
if (!rightAddon)
|
|
40
44
|
return [1];
|
|
@@ -45,6 +49,7 @@ const CustomCard = ({
|
|
|
45
49
|
description,
|
|
46
50
|
leftAddon,
|
|
47
51
|
rightAddon,
|
|
52
|
+
// array. max 2 elements
|
|
48
53
|
hasBorder = false
|
|
49
54
|
}) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_truncated_tooltip_text.TooltipTextProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_components.CardContainer, { hasBorder, cols: getCol(rightAddon), "data-testid": "em-ds-card", children: [
|
|
50
55
|
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_components.LeftSection, { children: [
|
|
@@ -80,15 +85,30 @@ const CustomCard = ({
|
|
|
80
85
|
] })
|
|
81
86
|
] }) });
|
|
82
87
|
const cardProps = {
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
+
/**
|
|
89
|
+
* Title of the card. requiered
|
|
90
|
+
*/
|
|
91
|
+
title: import_ds_props_helpers.PropTypes.string.isRequired.description("Title of the card. requiered"),
|
|
92
|
+
/**
|
|
93
|
+
* Description of the card. not requiered
|
|
94
|
+
*/
|
|
95
|
+
description: import_ds_props_helpers.PropTypes.string.description("Description of the card. not requiered"),
|
|
96
|
+
/**
|
|
97
|
+
* Left Addon
|
|
98
|
+
*/
|
|
99
|
+
leftAddon: import_ds_props_helpers.PropTypes.element.description("Left Addon"),
|
|
100
|
+
/**
|
|
101
|
+
* Right addon array, max elements: 2
|
|
102
|
+
*/
|
|
103
|
+
rightAddon: import_ds_props_helpers.PropTypes.array.description("Right addon array, max elements: 2"),
|
|
104
|
+
/**
|
|
105
|
+
* Wheter if the card has border or not
|
|
106
|
+
*/
|
|
107
|
+
hasBorder: import_ds_props_helpers.PropTypes.bool.description("Wheter if the card has border or not")
|
|
88
108
|
};
|
|
89
109
|
CustomCard.propTypes = cardProps;
|
|
90
110
|
CustomCard.displayName = "CustomCard";
|
|
91
|
-
const DSCardCustomWithSchema = (0,
|
|
111
|
+
const DSCardCustomWithSchema = (0, import_ds_props_helpers.describe)(CustomCard);
|
|
92
112
|
DSCardCustomWithSchema.propTypes = cardProps;
|
|
93
113
|
var Card_default = CustomCard;
|
|
94
114
|
//# sourceMappingURL=Card.js.map
|