@elliemae/ds-card 2.1.0-rc.7 → 2.2.0-alpha.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/cjs/DSCard.js +62 -67
- package/cjs/DSCard.js.map +7 -0
- package/cjs/DSCardBody.js +45 -28
- package/cjs/DSCardBody.js.map +7 -0
- package/cjs/DSCardHeader.js +52 -39
- package/cjs/DSCardHeader.js.map +7 -0
- package/cjs/detail/DetailCard.js +150 -194
- package/cjs/detail/DetailCard.js.map +7 -0
- package/cjs/detail/styled.js +105 -59
- package/cjs/detail/styled.js.map +7 -0
- package/cjs/index.js +42 -29
- package/cjs/index.js.map +7 -0
- package/cjs/v2/ActionAddon.js +69 -54
- package/cjs/v2/ActionAddon.js.map +7 -0
- package/cjs/v2/Card.js +77 -83
- package/cjs/v2/Card.js.map +7 -0
- package/cjs/v2/Group.js +77 -64
- package/cjs/v2/Group.js.map +7 -0
- package/cjs/v2/components.js +104 -54
- package/cjs/v2/components.js.map +7 -0
- package/esm/DSCard.js +30 -53
- package/esm/DSCard.js.map +7 -0
- package/esm/DSCardBody.js +16 -18
- package/esm/DSCardBody.js.map +7 -0
- package/esm/DSCardHeader.js +22 -28
- package/esm/DSCardHeader.js.map +7 -0
- package/esm/detail/DetailCard.js +119 -180
- package/esm/detail/DetailCard.js.map +7 -0
- package/esm/detail/styled.js +77 -45
- package/esm/detail/styled.js.map +7 -0
- package/esm/index.js +13 -7
- package/esm/index.js.map +7 -0
- package/esm/v2/ActionAddon.js +40 -42
- package/esm/v2/ActionAddon.js.map +7 -0
- package/esm/v2/Card.js +59 -72
- package/esm/v2/Card.js.map +7 -0
- package/esm/v2/Group.js +48 -53
- package/esm/v2/Group.js.map +7 -0
- package/esm/v2/components.js +75 -38
- package/esm/v2/components.js.map +7 -0
- package/package.json +10 -10
package/cjs/v2/components.js
CHANGED
|
@@ -1,54 +1,104 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
var
|
|
6
|
-
var
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __reExport = (target, module2, copyDefault, desc) => {
|
|
13
|
+
if (module2 && typeof module2 === "object" || typeof module2 === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(module2))
|
|
15
|
+
if (!__hasOwnProp.call(target, key) && (copyDefault || key !== "default"))
|
|
16
|
+
__defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return target;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (module2, isNodeMode) => {
|
|
21
|
+
return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", !isNodeMode && module2 && module2.__esModule ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2);
|
|
22
|
+
};
|
|
23
|
+
var __toCommonJS = /* @__PURE__ */ ((cache) => {
|
|
24
|
+
return (module2, temp) => {
|
|
25
|
+
return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
|
|
26
|
+
};
|
|
27
|
+
})(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
|
|
28
|
+
var components_exports = {};
|
|
29
|
+
__export(components_exports, {
|
|
30
|
+
CardContainer: () => CardContainer,
|
|
31
|
+
Description: () => Description,
|
|
32
|
+
LeftAddon: () => LeftAddon,
|
|
33
|
+
LeftSection: () => LeftSection,
|
|
34
|
+
MainSection: () => MainSection,
|
|
35
|
+
RightAddon: () => RightAddon,
|
|
36
|
+
RightAddonSection: () => RightAddonSection,
|
|
37
|
+
Separator: () => Separator,
|
|
38
|
+
Title: () => Title
|
|
39
|
+
});
|
|
40
|
+
var React = __toESM(require("react"));
|
|
41
|
+
var import_styled_components = __toESM(require("styled-components"));
|
|
42
|
+
var import_ds_grid = __toESM(require("@elliemae/ds-grid"));
|
|
43
|
+
const CardContainer = (0, import_styled_components.default)(import_ds_grid.Grid)`
|
|
44
|
+
align-items: center;
|
|
45
|
+
justify-content: space-between;
|
|
46
|
+
width: 100%;
|
|
47
|
+
height: 56px;
|
|
48
|
+
padding: 8px 16px;
|
|
49
|
+
position: relative;
|
|
50
|
+
border: ${({ theme, hasBorder }) => hasBorder ? `1px solid ${theme.colors.neutral["100"]}` : ""};
|
|
51
|
+
&:before {
|
|
52
|
+
content: '';
|
|
53
|
+
border-bottom: 1px solid ${(props) => props.theme.colors.neutral["100"]};
|
|
54
|
+
position: absolute;
|
|
55
|
+
margin: 0 auto;
|
|
56
|
+
width: 90%;
|
|
57
|
+
bottom: 0;
|
|
58
|
+
}
|
|
59
|
+
&:last-child::before {
|
|
60
|
+
content: none;
|
|
61
|
+
}
|
|
62
|
+
`;
|
|
63
|
+
const LeftSection = import_styled_components.default.div`
|
|
64
|
+
display: flex;
|
|
65
|
+
align-items: center;
|
|
66
|
+
`;
|
|
67
|
+
const LeftAddon = import_styled_components.default.div`
|
|
68
|
+
height: fit-content;
|
|
69
|
+
width: fit-content;
|
|
70
|
+
margin-right: 16px;
|
|
71
|
+
cursor: pointer;
|
|
72
|
+
`;
|
|
73
|
+
const RightAddonSection = import_styled_components.default.div`
|
|
74
|
+
display: flex;
|
|
75
|
+
align-items: center;
|
|
76
|
+
width: fit-content;
|
|
77
|
+
`;
|
|
78
|
+
const RightAddon = import_styled_components.default.div`
|
|
79
|
+
height: fit-content;
|
|
80
|
+
width: fit-content;
|
|
81
|
+
cursor: pointer;
|
|
82
|
+
`;
|
|
83
|
+
const Separator = import_styled_components.default.div`
|
|
84
|
+
width: 0px;
|
|
85
|
+
height: 24px;
|
|
86
|
+
border-right: 1px solid ${(props) => props.theme.colors.neutral["300"]};
|
|
87
|
+
margin: 0 8px;
|
|
88
|
+
`;
|
|
89
|
+
const MainSection = import_styled_components.default.div`
|
|
90
|
+
display: flex;
|
|
91
|
+
flex-direction: column;
|
|
92
|
+
`;
|
|
93
|
+
const Title = import_styled_components.default.h3`
|
|
94
|
+
margin: 0;
|
|
95
|
+
font-size: 16px;
|
|
96
|
+
font-weight: ${(props) => props.theme.fontWeights.regular};
|
|
97
|
+
color: ${(props) => props.theme.colors.neutral["800"]};
|
|
98
|
+
`;
|
|
99
|
+
const Description = import_styled_components.default.p`
|
|
100
|
+
margin: 0;
|
|
101
|
+
color: ${(props) => props.theme.colors.neutral["600"]};
|
|
102
|
+
`;
|
|
103
|
+
module.exports = __toCommonJS(components_exports);
|
|
104
|
+
//# sourceMappingURL=components.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/v2/components.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
+
"sourcesContent": ["import styled from 'styled-components';\nimport { Grid } from '@elliemae/ds-grid';\n\nconst CardContainer = styled(Grid)`\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 }) =>\n 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`;\n\nconst LeftSection = styled.div`\n display: flex;\n align-items: center;\n`;\n\nconst LeftAddon = styled.div`\n height: fit-content;\n width: fit-content;\n margin-right: 16px;\n cursor: pointer;\n`;\n\nconst RightAddonSection = styled.div`\n display: flex;\n align-items: center;\n width: fit-content;\n`;\n\nconst RightAddon = styled.div`\n height: fit-content;\n width: fit-content;\n cursor: pointer;\n`;\n\nconst Separator = styled.div`\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`\n display: flex;\n flex-direction: column;\n`;\n\nconst Title = styled.h3`\n margin: 0;\n font-size: 16px;\n font-weight: ${(props) => props.theme.fontWeights.regular};\n color: ${(props) => props.theme.colors.neutral['800']};\n`;\n\nconst Description = styled.p`\n margin: 0;\n color: ${(props) => props.theme.colors.neutral['600']};\n`;\n\nexport {\n CardContainer,\n LeftSection,\n LeftAddon,\n RightAddonSection,\n RightAddon,\n Separator,\n MainSection,\n Title,\n Description,\n};\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,+BAAmB;AACnB,qBAAqB;AAErB,MAAM,gBAAgB,sCAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,YAOjB,CAAC,EAAE,OAAO,gBAClB,YAAY,aAAa,MAAM,OAAO,QAAQ,WAAW;AAAA;AAAA;AAAA,+BAG9B,CAAC,UAAU,MAAM,MAAM,OAAO,QAAQ;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAWrE,MAAM,cAAc,iCAAO;AAAA;AAAA;AAAA;AAK3B,MAAM,YAAY,iCAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAOzB,MAAM,oBAAoB,iCAAO;AAAA;AAAA;AAAA;AAAA;AAMjC,MAAM,aAAa,iCAAO;AAAA;AAAA;AAAA;AAAA;AAM1B,MAAM,YAAY,iCAAO;AAAA;AAAA;AAAA,4BAGG,CAAC,UAAU,MAAM,MAAM,OAAO,QAAQ;AAAA;AAAA;AAIlE,MAAM,cAAc,iCAAO;AAAA;AAAA;AAAA;AAK3B,MAAM,QAAQ,iCAAO;AAAA;AAAA;AAAA,iBAGJ,CAAC,UAAU,MAAM,MAAM,YAAY;AAAA,WACzC,CAAC,UAAU,MAAM,MAAM,OAAO,QAAQ;AAAA;AAGjD,MAAM,cAAc,iCAAO;AAAA;AAAA,WAEhB,CAAC,UAAU,MAAM,MAAM,OAAO,QAAQ;AAAA;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
package/esm/DSCard.js
CHANGED
|
@@ -1,61 +1,38 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
18
|
-
|
|
19
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
20
|
-
|
|
21
|
-
const DSCard = _ref => {
|
|
22
|
-
let {
|
|
23
|
-
innerRef = undefined,
|
|
24
|
-
children = null,
|
|
25
|
-
containerProps = {}
|
|
26
|
-
} = _ref,
|
|
27
|
-
otherProps = _objectWithoutProperties(_ref, _excluded);
|
|
28
|
-
|
|
29
|
-
const {
|
|
30
|
-
cssClassName
|
|
31
|
-
} = convertPropToCssClassName('card');
|
|
32
|
-
return /*#__PURE__*/jsx("div", _objectSpread(_objectSpread(_objectSpread({
|
|
33
|
-
"data-testid": "card"
|
|
34
|
-
}, containerProps), {}, {
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import React2 from "react";
|
|
3
|
+
import { PropTypes, describe } from "react-desc";
|
|
4
|
+
import { convertPropToCssClassName } from "@elliemae/ds-classnames";
|
|
5
|
+
import DSCardBody from "./DSCardBody";
|
|
6
|
+
import DSCardHeader from "./DSCardHeader";
|
|
7
|
+
const DSCard = ({
|
|
8
|
+
innerRef = void 0,
|
|
9
|
+
children = null,
|
|
10
|
+
containerProps = {},
|
|
11
|
+
...otherProps
|
|
12
|
+
}) => {
|
|
13
|
+
const { cssClassName } = convertPropToCssClassName("card");
|
|
14
|
+
return /* @__PURE__ */ React2.createElement("div", {
|
|
15
|
+
"data-testid": "card",
|
|
16
|
+
...containerProps,
|
|
35
17
|
ref: innerRef,
|
|
36
|
-
className: cssClassName
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
}));
|
|
18
|
+
className: cssClassName,
|
|
19
|
+
...otherProps
|
|
20
|
+
}, children);
|
|
40
21
|
};
|
|
41
|
-
|
|
42
22
|
const cardProps = {
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
/**
|
|
47
|
-
* Get reference for the button
|
|
48
|
-
*/
|
|
49
|
-
innerRef: PropTypes.string.description('Get reference for the button'),
|
|
50
|
-
|
|
51
|
-
/**
|
|
52
|
-
* DSCardBody and DSCardHeader
|
|
53
|
-
*/
|
|
23
|
+
containerProps: PropTypes.object.description("inject props to component wrapper"),
|
|
24
|
+
innerRef: PropTypes.string.description("Get reference for the button"),
|
|
54
25
|
children: PropTypes.arrayOf(PropTypes.shape({
|
|
55
26
|
type: PropTypes.oneOf([DSCardHeader, DSCardBody])
|
|
56
|
-
})).description(
|
|
27
|
+
})).description("DSCardBody and DSCardHeader")
|
|
57
28
|
};
|
|
29
|
+
DSCard.propTypes = cardProps;
|
|
58
30
|
const DSCardWithSchema = describe(DSCard);
|
|
59
31
|
DSCardWithSchema.propTypes = cardProps;
|
|
60
|
-
|
|
61
|
-
export {
|
|
32
|
+
var DSCard_default = DSCard;
|
|
33
|
+
export {
|
|
34
|
+
DSCard,
|
|
35
|
+
DSCardWithSchema,
|
|
36
|
+
DSCard_default as default
|
|
37
|
+
};
|
|
38
|
+
//# sourceMappingURL=DSCard.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../scripts/build/transpile/react-shim.js", "../../src/DSCard.tsx"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { PropTypes, describe } from 'react-desc';\nimport { convertPropToCssClassName } from '@elliemae/ds-classnames';\nimport DSCardBody from './DSCardBody';\nimport DSCardHeader from './DSCardHeader';\n\nconst DSCard = ({\n innerRef = undefined,\n children = null,\n containerProps = {},\n ...otherProps\n}) => {\n const { cssClassName } = convertPropToCssClassName('card');\n\n return (\n <div\n data-testid=\"card\"\n {...containerProps}\n ref={innerRef}\n className={cssClassName}\n {...otherProps}\n >\n {children}\n </div>\n );\n};\n\nconst cardProps = {\n /** inject props to component wrapper */\n containerProps: PropTypes.object.description(\n 'inject props to component wrapper',\n ),\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;\nconst DSCardWithSchema = describe(DSCard);\nDSCardWithSchema.propTypes = cardProps;\n\nexport { DSCard, DSCardWithSchema };\nexport default DSCard;\n"],
|
|
5
|
+
"mappings": "AAAA;ACAA;AACA;AACA;AACA;AACA;AAEA,MAAM,SAAS,CAAC;AAAA,EACd,WAAW;AAAA,EACX,WAAW;AAAA,EACX,iBAAiB;AAAA,KACd;AAAA,MACC;AACJ,QAAM,EAAE,iBAAiB,0BAA0B;AAEnD,SACE,qCAAC,OAAD;AAAA,IACE,eAAY;AAAA,OACR;AAAA,IACJ,KAAK;AAAA,IACL,WAAW;AAAA,OACP;AAAA,KAEH;AAAA;AAKP,MAAM,YAAY;AAAA,EAEhB,gBAAgB,UAAU,OAAO,YAC/B;AAAA,EAKF,UAAU,UAAU,OAAO,YAAY;AAAA,EAIvC,UAAU,UAAU,QAClB,UAAU,MAAM;AAAA,IACd,MAAM,UAAU,MAAM,CAAC,cAAc;AAAA,MAEvC,YAAY;AAAA;AAGhB,OAAO,YAAY;AACnB,MAAM,mBAAmB,SAAS;AAClC,iBAAiB,YAAY;AAG7B,IAAO,iBAAQ;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
package/esm/DSCardBody.js
CHANGED
|
@@ -1,22 +1,20 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import { PropTypes, describe } from
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
} = _ref;
|
|
9
|
-
return /*#__PURE__*/_jsx("div", {
|
|
10
|
-
className: "em-ds-card-body",
|
|
11
|
-
"data-testid": "card-body"
|
|
12
|
-
}, void 0, children);
|
|
13
|
-
};
|
|
14
|
-
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import React2 from "react";
|
|
3
|
+
import { PropTypes, describe } from "react-desc";
|
|
4
|
+
const DSCardBody = ({ children }) => /* @__PURE__ */ React2.createElement("div", {
|
|
5
|
+
className: "em-ds-card-body",
|
|
6
|
+
"data-testid": "card-body"
|
|
7
|
+
}, children);
|
|
15
8
|
const bodyProps = {
|
|
16
|
-
|
|
17
|
-
children: PropTypes.element.description('children')
|
|
9
|
+
children: PropTypes.element.description("children")
|
|
18
10
|
};
|
|
11
|
+
DSCardBody.propTypes = bodyProps;
|
|
19
12
|
const DSCardBodyWithSchema = describe(DSCardBody);
|
|
20
13
|
DSCardBodyWithSchema.propTypes = bodyProps;
|
|
21
|
-
|
|
22
|
-
export {
|
|
14
|
+
var DSCardBody_default = DSCardBody;
|
|
15
|
+
export {
|
|
16
|
+
DSCardBody,
|
|
17
|
+
DSCardBodyWithSchema,
|
|
18
|
+
DSCardBody_default as default
|
|
19
|
+
};
|
|
20
|
+
//# sourceMappingURL=DSCardBody.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../scripts/build/transpile/react-shim.js", "../../src/DSCardBody.tsx"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { PropTypes, describe } from 'react-desc';\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;\nconst DSCardBodyWithSchema = describe(DSCardBody);\nDSCardBodyWithSchema.propTypes = bodyProps;\n\nexport { DSCardBody, DSCardBodyWithSchema };\nexport default DSCardBody;\n"],
|
|
5
|
+
"mappings": "AAAA;ACAA;AACA;AAEA,MAAM,aAAa,CAAC,EAAE,eACpB,qCAAC,OAAD;AAAA,EAAK,WAAU;AAAA,EAAkB,eAAY;AAAA,GAC1C;AAIL,MAAM,YAAY;AAAA,EAEhB,UAAU,UAAU,QAAQ,YAAY;AAAA;AAG1C,WAAW,YAAY;AACvB,MAAM,uBAAuB,SAAS;AACtC,qBAAqB,YAAY;AAGjC,IAAO,qBAAQ;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
package/esm/DSCardHeader.js
CHANGED
|
@@ -1,36 +1,30 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import { PropTypes, describe } from
|
|
4
|
-
import { convertPropToCssClassName } from
|
|
5
|
-
|
|
6
|
-
const
|
|
7
|
-
|
|
8
|
-
title,
|
|
9
|
-
action
|
|
10
|
-
} = _ref;
|
|
11
|
-
const {
|
|
12
|
-
cssClassName,
|
|
13
|
-
classNameElement
|
|
14
|
-
} = convertPropToCssClassName('card-header');
|
|
15
|
-
return /*#__PURE__*/_jsx("div", {
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import React2 from "react";
|
|
3
|
+
import { PropTypes, describe } from "react-desc";
|
|
4
|
+
import { convertPropToCssClassName } from "@elliemae/ds-classnames";
|
|
5
|
+
const DSCardHeader = ({ title, action }) => {
|
|
6
|
+
const { cssClassName, classNameElement } = convertPropToCssClassName("card-header");
|
|
7
|
+
return /* @__PURE__ */ React2.createElement("div", {
|
|
16
8
|
className: cssClassName,
|
|
17
9
|
"data-testid": "card-header"
|
|
18
|
-
},
|
|
19
|
-
className: classNameElement(
|
|
20
|
-
},
|
|
21
|
-
className: classNameElement(
|
|
10
|
+
}, /* @__PURE__ */ React2.createElement("span", {
|
|
11
|
+
className: classNameElement("heading")
|
|
12
|
+
}, title), /* @__PURE__ */ React2.createElement("div", {
|
|
13
|
+
className: classNameElement("pull-right"),
|
|
22
14
|
"data-testid": "ds-card_header-action"
|
|
23
|
-
},
|
|
15
|
+
}, action));
|
|
24
16
|
};
|
|
25
|
-
|
|
26
17
|
const cardHeader = {
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
/** action */
|
|
31
|
-
action: PropTypes.node.description('action')
|
|
18
|
+
title: PropTypes.string.description("card header title"),
|
|
19
|
+
action: PropTypes.node.description("action")
|
|
32
20
|
};
|
|
21
|
+
DSCardHeader.propTypes = cardHeader;
|
|
33
22
|
const DSCardHeaderWithSchema = describe(DSCardHeader);
|
|
34
23
|
DSCardHeaderWithSchema.propTypes = cardHeader;
|
|
35
|
-
|
|
36
|
-
export {
|
|
24
|
+
var DSCardHeader_default = DSCardHeader;
|
|
25
|
+
export {
|
|
26
|
+
DSCardHeader,
|
|
27
|
+
DSCardHeaderWithSchema,
|
|
28
|
+
DSCardHeader_default as default
|
|
29
|
+
};
|
|
30
|
+
//# sourceMappingURL=DSCardHeader.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../scripts/build/transpile/react-shim.js", "../../src/DSCardHeader.tsx"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { PropTypes, describe } from 'react-desc';\nimport { convertPropToCssClassName } from '@elliemae/ds-classnames';\n\nconst DSCardHeader = ({ title, action }) => {\n const { cssClassName, classNameElement } = convertPropToCssClassName(\n 'card-header',\n );\n return (\n <div className={cssClassName} data-testid=\"card-header\">\n <span className={classNameElement('heading')}>{title}</span>\n <div\n className={classNameElement('pull-right')}\n data-testid=\"ds-card_header-action\"\n >\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;\nconst DSCardHeaderWithSchema = describe(DSCardHeader);\nDSCardHeaderWithSchema.propTypes = cardHeader;\n\nexport { DSCardHeader, DSCardHeaderWithSchema };\nexport default DSCardHeader;\n"],
|
|
5
|
+
"mappings": "AAAA;ACAA;AACA;AACA;AAEA,MAAM,eAAe,CAAC,EAAE,OAAO,aAAa;AAC1C,QAAM,EAAE,cAAc,qBAAqB,0BACzC;AAEF,SACE,qCAAC,OAAD;AAAA,IAAK,WAAW;AAAA,IAAc,eAAY;AAAA,KACxC,qCAAC,QAAD;AAAA,IAAM,WAAW,iBAAiB;AAAA,KAAa,QAC/C,qCAAC,OAAD;AAAA,IACE,WAAW,iBAAiB;AAAA,IAC5B,eAAY;AAAA,KAEX;AAAA;AAMT,MAAM,aAAa;AAAA,EAEjB,OAAO,UAAU,OAAO,YAAY;AAAA,EAEpC,QAAQ,UAAU,KAAK,YAAY;AAAA;AAGrC,aAAa,YAAY;AACzB,MAAM,yBAAyB,SAAS;AACxC,uBAAuB,YAAY;AAGnC,IAAO,uBAAQ;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|