@elliemae/ds-card 2.2.0-alpha.4 → 3.0.0-next.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 +67 -62
- package/cjs/DSCardBody.js +28 -45
- package/cjs/DSCardHeader.js +39 -52
- package/cjs/detail/DetailCard.js +194 -150
- package/cjs/detail/styled.js +59 -105
- package/cjs/index.js +29 -42
- package/cjs/v2/ActionAddon.js +54 -69
- package/cjs/v2/Card.js +83 -77
- package/cjs/v2/Group.js +64 -77
- package/cjs/v2/components.js +54 -104
- package/esm/DSCard.js +53 -30
- package/esm/DSCardBody.js +18 -16
- package/esm/DSCardHeader.js +28 -22
- package/esm/detail/DetailCard.js +180 -119
- package/esm/detail/styled.js +45 -77
- package/esm/index.js +7 -13
- package/esm/v2/ActionAddon.js +42 -40
- package/esm/v2/Card.js +72 -59
- package/esm/v2/Group.js +53 -48
- package/esm/v2/components.js +38 -75
- package/package.json +10 -10
- package/cjs/DSCard.js.map +0 -7
- package/cjs/DSCardBody.js.map +0 -7
- package/cjs/DSCardHeader.js.map +0 -7
- package/cjs/detail/DetailCard.js.map +0 -7
- package/cjs/detail/styled.js.map +0 -7
- package/cjs/index.js.map +0 -7
- package/cjs/v2/ActionAddon.js.map +0 -7
- package/cjs/v2/Card.js.map +0 -7
- package/cjs/v2/Group.js.map +0 -7
- package/cjs/v2/components.js.map +0 -7
- package/esm/DSCard.js.map +0 -7
- package/esm/DSCardBody.js.map +0 -7
- package/esm/DSCardHeader.js.map +0 -7
- package/esm/detail/DetailCard.js.map +0 -7
- package/esm/detail/styled.js.map +0 -7
- package/esm/index.js.map +0 -7
- package/esm/v2/ActionAddon.js.map +0 -7
- package/esm/v2/Card.js.map +0 -7
- package/esm/v2/Group.js.map +0 -7
- package/esm/v2/components.js.map +0 -7
package/cjs/v2/ActionAddon.js
CHANGED
|
@@ -1,73 +1,58 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
var
|
|
6
|
-
|
|
7
|
-
var
|
|
8
|
-
var
|
|
9
|
-
|
|
10
|
-
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var _jsx = require('@babel/runtime/helpers/jsx');
|
|
6
|
+
require('react');
|
|
7
|
+
var reactDesc = require('react-desc');
|
|
8
|
+
var styled = require('styled-components');
|
|
9
|
+
var dsIcons = require('@elliemae/ds-icons');
|
|
10
|
+
var DSButton = require('@elliemae/ds-button');
|
|
11
|
+
|
|
12
|
+
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
13
|
+
|
|
14
|
+
var _jsx__default = /*#__PURE__*/_interopDefaultLegacy(_jsx);
|
|
15
|
+
var styled__default = /*#__PURE__*/_interopDefaultLegacy(styled);
|
|
16
|
+
var DSButton__default = /*#__PURE__*/_interopDefaultLegacy(DSButton);
|
|
17
|
+
|
|
18
|
+
const Addon = /*#__PURE__*/styled__default["default"](DSButton__default["default"]).withConfig({
|
|
19
|
+
componentId: "sc-1pazs35-0"
|
|
20
|
+
})(["background-color:transparent;padding-right:4px;height:100%;border:none;font-size:12px;font-weight:", ";color:", ";cursor:pointer;&:focus,&::after{background-color:transparent;box-shadow:none !important;border:none !important;}"], props => props.theme.fontWeights.semibold, props => props.theme.colors.brand['700']);
|
|
21
|
+
|
|
22
|
+
const ActionAddon = _ref => {
|
|
23
|
+
let {
|
|
24
|
+
label,
|
|
25
|
+
onClick,
|
|
26
|
+
icon
|
|
27
|
+
} = _ref;
|
|
28
|
+
return /*#__PURE__*/_jsx__default["default"](Addon, {
|
|
29
|
+
onClick: onClick,
|
|
30
|
+
labelText: label,
|
|
31
|
+
icon: icon || /*#__PURE__*/_jsx__default["default"](dsIcons.ChevronSmallDown, {
|
|
32
|
+
color: ['brand-primary', 700]
|
|
33
|
+
})
|
|
34
|
+
});
|
|
11
35
|
};
|
|
12
|
-
|
|
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 ActionAddon_exports = {};
|
|
29
|
-
__export(ActionAddon_exports, {
|
|
30
|
-
ActionAddon: () => ActionAddon,
|
|
31
|
-
DSCardActionAddonWithSchema: () => DSCardActionAddonWithSchema,
|
|
32
|
-
default: () => ActionAddon_default
|
|
33
|
-
});
|
|
34
|
-
var React = __toESM(require("react"));
|
|
35
|
-
var import_react = __toESM(require("react"));
|
|
36
|
-
var import_react_desc = require("react-desc");
|
|
37
|
-
var import_styled_components = __toESM(require("styled-components"));
|
|
38
|
-
var import_ds_icons = require("@elliemae/ds-icons");
|
|
39
|
-
var import_ds_button = __toESM(require("@elliemae/ds-button"));
|
|
40
|
-
const Addon = (0, import_styled_components.default)(import_ds_button.default)`
|
|
41
|
-
background-color: transparent;
|
|
42
|
-
padding-right: 4px;
|
|
43
|
-
height: 100%;
|
|
44
|
-
border: none;
|
|
45
|
-
font-size: 12px;
|
|
46
|
-
font-weight: ${(props) => props.theme.fontWeights.semibold};
|
|
47
|
-
color: ${(props) => props.theme.colors.brand["700"]};
|
|
48
|
-
cursor: pointer;
|
|
49
|
-
&:focus,
|
|
50
|
-
&::after {
|
|
51
|
-
background-color: transparent;
|
|
52
|
-
box-shadow: none !important; /* needed */
|
|
53
|
-
border: none !important; /* needed */
|
|
54
|
-
}
|
|
55
|
-
`;
|
|
56
|
-
const ActionAddon = ({ label, onClick, icon }) => /* @__PURE__ */ import_react.default.createElement(Addon, {
|
|
57
|
-
onClick,
|
|
58
|
-
labelText: label,
|
|
59
|
-
icon: icon || /* @__PURE__ */ import_react.default.createElement(import_ds_icons.ChevronSmallDown, {
|
|
60
|
-
color: ["brand-primary", 700]
|
|
61
|
-
})
|
|
62
|
-
});
|
|
36
|
+
|
|
63
37
|
const actionProps = {
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
38
|
+
/**
|
|
39
|
+
* Addon label
|
|
40
|
+
*/
|
|
41
|
+
label: reactDesc.PropTypes.string.description('Addon label'),
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* On click callback
|
|
45
|
+
*/
|
|
46
|
+
onClick: reactDesc.PropTypes.func.description('On click callback'),
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* Icon to display after the label
|
|
50
|
+
*/
|
|
51
|
+
icon: reactDesc.PropTypes.element.description('Icon to display after the label')
|
|
67
52
|
};
|
|
68
|
-
|
|
69
|
-
const DSCardActionAddonWithSchema = (0, import_react_desc.describe)(ActionAddon);
|
|
53
|
+
const DSCardActionAddonWithSchema = reactDesc.describe(ActionAddon);
|
|
70
54
|
DSCardActionAddonWithSchema.propTypes = actionProps;
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
55
|
+
|
|
56
|
+
exports.ActionAddon = ActionAddon;
|
|
57
|
+
exports.DSCardActionAddonWithSchema = DSCardActionAddonWithSchema;
|
|
58
|
+
exports["default"] = ActionAddon;
|
package/cjs/v2/Card.js
CHANGED
|
@@ -1,82 +1,88 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
var
|
|
6
|
-
|
|
7
|
-
var
|
|
8
|
-
var
|
|
9
|
-
|
|
10
|
-
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var _jsx = require('@babel/runtime/helpers/jsx');
|
|
6
|
+
require('react');
|
|
7
|
+
var reactDesc = require('react-desc');
|
|
8
|
+
var dsHeader = require('@elliemae/ds-header');
|
|
9
|
+
var DSTruncatedTooltipText = require('@elliemae/ds-truncated-tooltip-text');
|
|
10
|
+
var components = require('./components.js');
|
|
11
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
12
|
+
|
|
13
|
+
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
14
|
+
|
|
15
|
+
var _jsx__default = /*#__PURE__*/_interopDefaultLegacy(_jsx);
|
|
16
|
+
var DSTruncatedTooltipText__default = /*#__PURE__*/_interopDefaultLegacy(DSTruncatedTooltipText);
|
|
17
|
+
|
|
18
|
+
var _Separator;
|
|
19
|
+
|
|
20
|
+
const getCol = rightAddon => {
|
|
21
|
+
if (!rightAddon) return [1];
|
|
22
|
+
return [1, 'auto'];
|
|
11
23
|
};
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
24
|
+
|
|
25
|
+
const CustomCard = _ref => {
|
|
26
|
+
let {
|
|
27
|
+
title,
|
|
28
|
+
description,
|
|
29
|
+
leftAddon,
|
|
30
|
+
rightAddon,
|
|
31
|
+
// array. max 2 elements
|
|
32
|
+
hasBorder = false
|
|
33
|
+
} = _ref;
|
|
34
|
+
return /*#__PURE__*/_jsx__default["default"](DSTruncatedTooltipText.TooltipTextProvider, {}, void 0, /*#__PURE__*/_jsx__default["default"](components.CardContainer, {
|
|
35
|
+
hasBorder: hasBorder,
|
|
36
|
+
cols: getCol(rightAddon),
|
|
37
|
+
"data-testid": "em-ds-card"
|
|
38
|
+
}, void 0, /*#__PURE__*/_jsx__default["default"](components.LeftSection, {}, void 0, leftAddon && /*#__PURE__*/_jsx__default["default"](components.LeftAddon, {}, void 0, leftAddon), /*#__PURE__*/_jsx__default["default"](components.MainSection, {
|
|
39
|
+
style: {
|
|
40
|
+
maxWidth: leftAddon ? 'calc(100% - 40px)' : '100%'
|
|
41
|
+
}
|
|
42
|
+
}, void 0, /*#__PURE__*/_jsx__default["default"](dsHeader.DSHeader, {
|
|
43
|
+
fontSize: "16px",
|
|
44
|
+
"data-testid": "em-ds-card-header",
|
|
45
|
+
fontWeight: "regular",
|
|
46
|
+
color: "neutral.800",
|
|
47
|
+
text: /*#__PURE__*/_jsx__default["default"](DSTruncatedTooltipText__default["default"], {
|
|
48
|
+
value: title
|
|
49
|
+
})
|
|
50
|
+
}), description && /*#__PURE__*/_jsx__default["default"](components.Description, {}, void 0, /*#__PURE__*/_jsx__default["default"](DSTruncatedTooltipText__default["default"], {
|
|
51
|
+
value: description
|
|
52
|
+
})))), rightAddon && /*#__PURE__*/_jsx__default["default"](components.RightAddonSection, {}, void 0, rightAddon[0] && /*#__PURE__*/_jsx__default["default"](components.RightAddon, {}, void 0, rightAddon[0]), rightAddon[1] && /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
53
|
+
children: [rightAddon.length > 1 && (_Separator || (_Separator = /*#__PURE__*/_jsx__default["default"](components.Separator, {}))), /*#__PURE__*/_jsx__default["default"](components.RightAddon, {}, void 0, rightAddon[1])]
|
|
54
|
+
}))));
|
|
19
55
|
};
|
|
20
|
-
|
|
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 Card_exports = {};
|
|
29
|
-
__export(Card_exports, {
|
|
30
|
-
CustomCard: () => CustomCard,
|
|
31
|
-
DSCardCustomWithSchema: () => DSCardCustomWithSchema,
|
|
32
|
-
default: () => Card_default
|
|
33
|
-
});
|
|
34
|
-
var React = __toESM(require("react"));
|
|
35
|
-
var import_react = __toESM(require("react"));
|
|
36
|
-
var import_react_desc = require("react-desc");
|
|
37
|
-
var import_ds_header = require("@elliemae/ds-header");
|
|
38
|
-
var import_ds_truncated_tooltip_text = __toESM(require("@elliemae/ds-truncated-tooltip-text"));
|
|
39
|
-
var import_components = require("./components");
|
|
40
|
-
const getCol = (rightAddon) => {
|
|
41
|
-
if (!rightAddon)
|
|
42
|
-
return [1];
|
|
43
|
-
return [1, "auto"];
|
|
44
|
-
};
|
|
45
|
-
const CustomCard = ({
|
|
46
|
-
title,
|
|
47
|
-
description,
|
|
48
|
-
leftAddon,
|
|
49
|
-
rightAddon,
|
|
50
|
-
hasBorder = false
|
|
51
|
-
}) => /* @__PURE__ */ import_react.default.createElement(import_ds_truncated_tooltip_text.TooltipTextProvider, null, /* @__PURE__ */ import_react.default.createElement(import_components.CardContainer, {
|
|
52
|
-
hasBorder,
|
|
53
|
-
cols: getCol(rightAddon),
|
|
54
|
-
"data-testid": "em-ds-card"
|
|
55
|
-
}, /* @__PURE__ */ import_react.default.createElement(import_components.LeftSection, null, leftAddon && /* @__PURE__ */ import_react.default.createElement(import_components.LeftAddon, null, leftAddon), /* @__PURE__ */ import_react.default.createElement(import_components.MainSection, {
|
|
56
|
-
style: {
|
|
57
|
-
maxWidth: leftAddon ? "calc(100% - 40px)" : "100%"
|
|
58
|
-
}
|
|
59
|
-
}, /* @__PURE__ */ import_react.default.createElement(import_ds_header.DSHeader, {
|
|
60
|
-
fontSize: "16px",
|
|
61
|
-
"data-testid": "em-ds-card-header",
|
|
62
|
-
fontWeight: "regular",
|
|
63
|
-
color: "neutral.800",
|
|
64
|
-
text: /* @__PURE__ */ import_react.default.createElement(import_ds_truncated_tooltip_text.default, {
|
|
65
|
-
value: title
|
|
66
|
-
})
|
|
67
|
-
}), description && /* @__PURE__ */ import_react.default.createElement(import_components.Description, null, /* @__PURE__ */ import_react.default.createElement(import_ds_truncated_tooltip_text.default, {
|
|
68
|
-
value: description
|
|
69
|
-
})))), rightAddon && /* @__PURE__ */ import_react.default.createElement(import_components.RightAddonSection, null, rightAddon[0] && /* @__PURE__ */ import_react.default.createElement(import_components.RightAddon, null, rightAddon[0]), rightAddon[1] && /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, rightAddon.length > 1 && /* @__PURE__ */ import_react.default.createElement(import_components.Separator, null), /* @__PURE__ */ import_react.default.createElement(import_components.RightAddon, null, rightAddon[1])))));
|
|
56
|
+
|
|
70
57
|
const cardProps = {
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
58
|
+
/**
|
|
59
|
+
* Title of the card. requiered
|
|
60
|
+
*/
|
|
61
|
+
title: reactDesc.PropTypes.string.isRequired.description('Title of the card. requiered'),
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* Description of the card. not requiered
|
|
65
|
+
*/
|
|
66
|
+
description: reactDesc.PropTypes.string.description('Description of the card. not requiered'),
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* Left Addon
|
|
70
|
+
*/
|
|
71
|
+
leftAddon: reactDesc.PropTypes.element.description('Left Addon'),
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* Right addon array, max elements: 2
|
|
75
|
+
*/
|
|
76
|
+
rightAddon: reactDesc.PropTypes.array.description('Right addon array, max elements: 2'),
|
|
77
|
+
|
|
78
|
+
/**
|
|
79
|
+
* Wheter if the card has border or not
|
|
80
|
+
*/
|
|
81
|
+
hasBorder: reactDesc.PropTypes.bool.description('Wheter if the card has border or not')
|
|
76
82
|
};
|
|
77
|
-
|
|
78
|
-
const DSCardCustomWithSchema = (0, import_react_desc.describe)(CustomCard);
|
|
83
|
+
const DSCardCustomWithSchema = reactDesc.describe(CustomCard);
|
|
79
84
|
DSCardCustomWithSchema.propTypes = cardProps;
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
85
|
+
|
|
86
|
+
exports.CustomCard = CustomCard;
|
|
87
|
+
exports.DSCardCustomWithSchema = DSCardCustomWithSchema;
|
|
88
|
+
exports["default"] = CustomCard;
|
package/cjs/v2/Group.js
CHANGED
|
@@ -1,81 +1,68 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
var
|
|
6
|
-
|
|
7
|
-
var
|
|
8
|
-
var
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
};
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
return (
|
|
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 Group_exports = {};
|
|
29
|
-
__export(Group_exports, {
|
|
30
|
-
CardGroup: () => CardGroup,
|
|
31
|
-
DSCardGroupWithSchema: () => DSCardGroupWithSchema,
|
|
32
|
-
default: () => Group_default
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var _jsx = require('@babel/runtime/helpers/jsx');
|
|
6
|
+
require('react');
|
|
7
|
+
var reactDesc = require('react-desc');
|
|
8
|
+
var styled = require('styled-components');
|
|
9
|
+
var dsSystem = require('@elliemae/ds-system');
|
|
10
|
+
var Card = require('./Card.js');
|
|
11
|
+
|
|
12
|
+
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
13
|
+
|
|
14
|
+
var _jsx__default = /*#__PURE__*/_interopDefaultLegacy(_jsx);
|
|
15
|
+
var styled__default = /*#__PURE__*/_interopDefaultLegacy(styled);
|
|
16
|
+
|
|
17
|
+
const Group = /*#__PURE__*/styled__default["default"].div.withConfig({
|
|
18
|
+
componentId: "sc-1y2lfoo-0"
|
|
19
|
+
})(["display:flex;flex-direction:column;width:100%;max-width:100%;", "{border-top:none;}", ""], Card.CustomCard, _ref => {
|
|
20
|
+
let {
|
|
21
|
+
theme,
|
|
22
|
+
withTopBorder
|
|
23
|
+
} = _ref;
|
|
24
|
+
return withTopBorder ? "border-top: ".concat(theme.colors.neutral['100']) : '';
|
|
33
25
|
});
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
const
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
justify-content: space-between;
|
|
56
|
-
padding: 0 ${(props) => props.theme.space.xs};
|
|
57
|
-
font-size: 12px;
|
|
58
|
-
${(0, import_ds_system.color)("neutral", "700")};
|
|
59
|
-
font-weight: ${(props) => props.theme.fontWeights.semibold};
|
|
60
|
-
background-color: ${(props) => props.theme.colors.neutral["080"]};
|
|
61
|
-
border-top: ${(props) => (0, import_ds_system.border)(props.theme.colors.neutral["080"])};
|
|
62
|
-
line-height: 24px;
|
|
63
|
-
`;
|
|
64
|
-
const Items = import_styled_components.default.div`
|
|
65
|
-
display: flex;
|
|
66
|
-
flex-direction: column;
|
|
67
|
-
`;
|
|
68
|
-
const CardGroup = ({ children, title, action }) => /* @__PURE__ */ import_react.default.createElement(Group, {
|
|
69
|
-
withTopBorder: !title
|
|
70
|
-
}, !!title && /* @__PURE__ */ import_react.default.createElement(TitleWrapper, null, /* @__PURE__ */ import_react.default.createElement(GroupTitle, null, title), action), /* @__PURE__ */ import_react.default.createElement(Items, null, children));
|
|
26
|
+
const GroupTitle = /*#__PURE__*/styled__default["default"].span.withConfig({
|
|
27
|
+
componentId: "sc-1y2lfoo-1"
|
|
28
|
+
})(["", ""], dsSystem.truncate());
|
|
29
|
+
const TitleWrapper = /*#__PURE__*/styled__default["default"].div.withConfig({
|
|
30
|
+
componentId: "sc-1y2lfoo-2"
|
|
31
|
+
})(["display:flex;justify-content:space-between;padding:0 ", ";font-size:12px;", ";font-weight:", ";background-color:", ";border-top:", ";line-height:24px;"], props => props.theme.space.xs, dsSystem.color('neutral', '700'), props => props.theme.fontWeights.semibold, props => props.theme.colors.neutral['080'], props => dsSystem.border(props.theme.colors.neutral['080']));
|
|
32
|
+
const Items = /*#__PURE__*/styled__default["default"].div.withConfig({
|
|
33
|
+
componentId: "sc-1y2lfoo-3"
|
|
34
|
+
})(["display:flex;flex-direction:column;"]);
|
|
35
|
+
|
|
36
|
+
const CardGroup = _ref2 => {
|
|
37
|
+
let {
|
|
38
|
+
children,
|
|
39
|
+
title,
|
|
40
|
+
action
|
|
41
|
+
} = _ref2;
|
|
42
|
+
return /*#__PURE__*/_jsx__default["default"](Group, {
|
|
43
|
+
withTopBorder: !title
|
|
44
|
+
}, void 0, !!title && /*#__PURE__*/_jsx__default["default"](TitleWrapper, {}, void 0, /*#__PURE__*/_jsx__default["default"](GroupTitle, {}, void 0, title), action), /*#__PURE__*/_jsx__default["default"](Items, {}, void 0, children));
|
|
45
|
+
};
|
|
46
|
+
|
|
71
47
|
const cardgroupProps = {
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
48
|
+
/**
|
|
49
|
+
* Card items
|
|
50
|
+
*/
|
|
51
|
+
children: reactDesc.PropTypes.element.isRequired.description('Card items'),
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* Title of the group
|
|
55
|
+
*/
|
|
56
|
+
title: reactDesc.PropTypes.string.isRequired.description('Title of the group'),
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* Right addon action
|
|
60
|
+
*/
|
|
61
|
+
action: reactDesc.PropTypes.element.description('Right addon action')
|
|
75
62
|
};
|
|
76
|
-
|
|
77
|
-
const DSCardGroupWithSchema = (0, import_react_desc.describe)(CardGroup);
|
|
63
|
+
const DSCardGroupWithSchema = reactDesc.describe(CardGroup);
|
|
78
64
|
DSCardGroupWithSchema.propTypes = cardgroupProps;
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
65
|
+
|
|
66
|
+
exports.CardGroup = CardGroup;
|
|
67
|
+
exports.DSCardGroupWithSchema = DSCardGroupWithSchema;
|
|
68
|
+
exports["default"] = CardGroup;
|
package/cjs/v2/components.js
CHANGED
|
@@ -1,104 +1,54 @@
|
|
|
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
|
-
|
|
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
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var styled = require('styled-components');
|
|
6
|
+
var dsGrid = require('@elliemae/ds-grid');
|
|
7
|
+
|
|
8
|
+
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
9
|
+
|
|
10
|
+
var styled__default = /*#__PURE__*/_interopDefaultLegacy(styled);
|
|
11
|
+
|
|
12
|
+
const CardContainer = /*#__PURE__*/styled__default["default"](dsGrid.Grid).withConfig({
|
|
13
|
+
componentId: "sc-1cjakml-0"
|
|
14
|
+
})(["align-items:center;justify-content:space-between;width:100%;height:56px;padding:8px 16px;position:relative;border:", ";&:before{content:'';border-bottom:1px solid ", ";position:absolute;margin:0 auto;width:90%;bottom:0;}&:last-child::before{content:none;}"], _ref => {
|
|
15
|
+
let {
|
|
16
|
+
theme,
|
|
17
|
+
hasBorder
|
|
18
|
+
} = _ref;
|
|
19
|
+
return hasBorder ? "1px solid ".concat(theme.colors.neutral['100']) : '';
|
|
20
|
+
}, props => props.theme.colors.neutral['100']);
|
|
21
|
+
const LeftSection = /*#__PURE__*/styled__default["default"].div.withConfig({
|
|
22
|
+
componentId: "sc-1cjakml-1"
|
|
23
|
+
})(["display:flex;align-items:center;"]);
|
|
24
|
+
const LeftAddon = /*#__PURE__*/styled__default["default"].div.withConfig({
|
|
25
|
+
componentId: "sc-1cjakml-2"
|
|
26
|
+
})(["height:fit-content;width:fit-content;margin-right:16px;cursor:pointer;"]);
|
|
27
|
+
const RightAddonSection = /*#__PURE__*/styled__default["default"].div.withConfig({
|
|
28
|
+
componentId: "sc-1cjakml-3"
|
|
29
|
+
})(["display:flex;align-items:center;width:fit-content;"]);
|
|
30
|
+
const RightAddon = /*#__PURE__*/styled__default["default"].div.withConfig({
|
|
31
|
+
componentId: "sc-1cjakml-4"
|
|
32
|
+
})(["height:fit-content;width:fit-content;cursor:pointer;"]);
|
|
33
|
+
const Separator = /*#__PURE__*/styled__default["default"].div.withConfig({
|
|
34
|
+
componentId: "sc-1cjakml-5"
|
|
35
|
+
})(["width:0px;height:24px;border-right:1px solid ", ";margin:0 8px;"], props => props.theme.colors.neutral['300']);
|
|
36
|
+
const MainSection = /*#__PURE__*/styled__default["default"].div.withConfig({
|
|
37
|
+
componentId: "sc-1cjakml-6"
|
|
38
|
+
})(["display:flex;flex-direction:column;"]);
|
|
39
|
+
const Title = /*#__PURE__*/styled__default["default"].h3.withConfig({
|
|
40
|
+
componentId: "sc-1cjakml-7"
|
|
41
|
+
})(["margin:0;font-size:16px;font-weight:", ";color:", ";"], props => props.theme.fontWeights.regular, props => props.theme.colors.neutral['800']);
|
|
42
|
+
const Description = /*#__PURE__*/styled__default["default"].p.withConfig({
|
|
43
|
+
componentId: "sc-1cjakml-8"
|
|
44
|
+
})(["margin:0;color:", ";"], props => props.theme.colors.neutral['600']);
|
|
45
|
+
|
|
46
|
+
exports.CardContainer = CardContainer;
|
|
47
|
+
exports.Description = Description;
|
|
48
|
+
exports.LeftAddon = LeftAddon;
|
|
49
|
+
exports.LeftSection = LeftSection;
|
|
50
|
+
exports.MainSection = MainSection;
|
|
51
|
+
exports.RightAddon = RightAddon;
|
|
52
|
+
exports.RightAddonSection = RightAddonSection;
|
|
53
|
+
exports.Separator = Separator;
|
|
54
|
+
exports.Title = Title;
|