@elliemae/ds-card 2.2.0-alpha.3 → 3.0.0-next.0

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.
@@ -1,44 +1,46 @@
1
- import * as React from "react";
2
- import React2 from "react";
3
- import { PropTypes, describe } from "react-desc";
4
- import styled from "styled-components";
5
- import { ChevronSmallDown } from "@elliemae/ds-icons";
6
- import Button from "@elliemae/ds-button";
7
- const Addon = styled(Button)`
8
- background-color: transparent;
9
- padding-right: 4px;
10
- height: 100%;
11
- border: none;
12
- font-size: 12px;
13
- font-weight: ${(props) => props.theme.fontWeights.semibold};
14
- color: ${(props) => props.theme.colors.brand["700"]};
15
- cursor: pointer;
16
- &:focus,
17
- &::after {
18
- background-color: transparent;
19
- box-shadow: none !important; /* needed */
20
- border: none !important; /* needed */
21
- }
22
- `;
23
- const ActionAddon = ({ label, onClick, icon }) => /* @__PURE__ */ React2.createElement(Addon, {
24
- onClick,
25
- labelText: label,
26
- icon: icon || /* @__PURE__ */ React2.createElement(ChevronSmallDown, {
27
- color: ["brand-primary", 700]
28
- })
29
- });
1
+ import _jsx from '@babel/runtime/helpers/esm/jsx';
2
+ import 'react';
3
+ import { PropTypes, describe } from 'react-desc';
4
+ import styled from 'styled-components';
5
+ import { ChevronSmallDown } from '@elliemae/ds-icons';
6
+ import DSButton from '@elliemae/ds-button';
7
+
8
+ const Addon = /*#__PURE__*/styled(DSButton).withConfig({
9
+ componentId: "sc-1pazs35-0"
10
+ })(["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']);
11
+
12
+ const ActionAddon = _ref => {
13
+ let {
14
+ label,
15
+ onClick,
16
+ icon
17
+ } = _ref;
18
+ return /*#__PURE__*/_jsx(Addon, {
19
+ onClick: onClick,
20
+ labelText: label,
21
+ icon: icon || /*#__PURE__*/_jsx(ChevronSmallDown, {
22
+ color: ['brand-primary', 700]
23
+ })
24
+ });
25
+ };
26
+
30
27
  const actionProps = {
31
- label: PropTypes.string.description("Addon label"),
32
- onClick: PropTypes.func.description("On click callback"),
33
- icon: PropTypes.element.description("Icon to display after the label")
28
+ /**
29
+ * Addon label
30
+ */
31
+ label: PropTypes.string.description('Addon label'),
32
+
33
+ /**
34
+ * On click callback
35
+ */
36
+ onClick: PropTypes.func.description('On click callback'),
37
+
38
+ /**
39
+ * Icon to display after the label
40
+ */
41
+ icon: PropTypes.element.description('Icon to display after the label')
34
42
  };
35
- ActionAddon.propTypes = actionProps;
36
43
  const DSCardActionAddonWithSchema = describe(ActionAddon);
37
44
  DSCardActionAddonWithSchema.propTypes = actionProps;
38
- var ActionAddon_default = ActionAddon;
39
- export {
40
- ActionAddon,
41
- DSCardActionAddonWithSchema,
42
- ActionAddon_default as default
43
- };
44
- //# sourceMappingURL=ActionAddon.js.map
45
+
46
+ export { ActionAddon, DSCardActionAddonWithSchema, ActionAddon as default };
package/esm/v2/Card.js CHANGED
@@ -1,64 +1,77 @@
1
- import * as React from "react";
2
- import React2 from "react";
3
- import { PropTypes, describe } from "react-desc";
4
- import { DSHeader } from "@elliemae/ds-header";
5
- import DSTruncatedTooltipText, {
6
- TooltipTextProvider
7
- } from "@elliemae/ds-truncated-tooltip-text";
8
- import {
9
- CardContainer,
10
- LeftSection,
11
- LeftAddon,
12
- RightAddonSection,
13
- RightAddon,
14
- Separator,
15
- MainSection,
16
- Description
17
- } from "./components";
18
- const getCol = (rightAddon) => {
19
- if (!rightAddon)
20
- return [1];
21
- return [1, "auto"];
1
+ import _jsx from '@babel/runtime/helpers/esm/jsx';
2
+ import 'react';
3
+ import { PropTypes, describe } from 'react-desc';
4
+ import { DSHeader } from '@elliemae/ds-header';
5
+ import DSTruncatedTooltipText, { TooltipTextProvider } from '@elliemae/ds-truncated-tooltip-text';
6
+ import { CardContainer, LeftSection, LeftAddon, MainSection, Description, RightAddonSection, RightAddon, Separator } from './components.js';
7
+ import { jsxs, Fragment } from 'react/jsx-runtime';
8
+
9
+ var _Separator;
10
+
11
+ const getCol = rightAddon => {
12
+ if (!rightAddon) return [1];
13
+ return [1, 'auto'];
22
14
  };
23
- const CustomCard = ({
24
- title,
25
- description,
26
- leftAddon,
27
- rightAddon,
28
- hasBorder = false
29
- }) => /* @__PURE__ */ React2.createElement(TooltipTextProvider, null, /* @__PURE__ */ React2.createElement(CardContainer, {
30
- hasBorder,
31
- cols: getCol(rightAddon),
32
- "data-testid": "em-ds-card"
33
- }, /* @__PURE__ */ React2.createElement(LeftSection, null, leftAddon && /* @__PURE__ */ React2.createElement(LeftAddon, null, leftAddon), /* @__PURE__ */ React2.createElement(MainSection, {
34
- style: {
35
- maxWidth: leftAddon ? "calc(100% - 40px)" : "100%"
36
- }
37
- }, /* @__PURE__ */ React2.createElement(DSHeader, {
38
- fontSize: "16px",
39
- "data-testid": "em-ds-card-header",
40
- fontWeight: "regular",
41
- color: "neutral.800",
42
- text: /* @__PURE__ */ React2.createElement(DSTruncatedTooltipText, {
43
- value: title
44
- })
45
- }), description && /* @__PURE__ */ React2.createElement(Description, null, /* @__PURE__ */ React2.createElement(DSTruncatedTooltipText, {
46
- value: description
47
- })))), rightAddon && /* @__PURE__ */ React2.createElement(RightAddonSection, null, rightAddon[0] && /* @__PURE__ */ React2.createElement(RightAddon, null, rightAddon[0]), rightAddon[1] && /* @__PURE__ */ React2.createElement(React2.Fragment, null, rightAddon.length > 1 && /* @__PURE__ */ React2.createElement(Separator, null), /* @__PURE__ */ React2.createElement(RightAddon, null, rightAddon[1])))));
15
+
16
+ const CustomCard = _ref => {
17
+ let {
18
+ title,
19
+ description,
20
+ leftAddon,
21
+ rightAddon,
22
+ // array. max 2 elements
23
+ hasBorder = false
24
+ } = _ref;
25
+ return /*#__PURE__*/_jsx(TooltipTextProvider, {}, void 0, /*#__PURE__*/_jsx(CardContainer, {
26
+ hasBorder: hasBorder,
27
+ cols: getCol(rightAddon),
28
+ "data-testid": "em-ds-card"
29
+ }, void 0, /*#__PURE__*/_jsx(LeftSection, {}, void 0, leftAddon && /*#__PURE__*/_jsx(LeftAddon, {}, void 0, leftAddon), /*#__PURE__*/_jsx(MainSection, {
30
+ style: {
31
+ maxWidth: leftAddon ? 'calc(100% - 40px)' : '100%'
32
+ }
33
+ }, void 0, /*#__PURE__*/_jsx(DSHeader, {
34
+ fontSize: "16px",
35
+ "data-testid": "em-ds-card-header",
36
+ fontWeight: "regular",
37
+ color: "neutral.800",
38
+ text: /*#__PURE__*/_jsx(DSTruncatedTooltipText, {
39
+ value: title
40
+ })
41
+ }), description && /*#__PURE__*/_jsx(Description, {}, void 0, /*#__PURE__*/_jsx(DSTruncatedTooltipText, {
42
+ value: description
43
+ })))), rightAddon && /*#__PURE__*/_jsx(RightAddonSection, {}, void 0, rightAddon[0] && /*#__PURE__*/_jsx(RightAddon, {}, void 0, rightAddon[0]), rightAddon[1] && /*#__PURE__*/jsxs(Fragment, {
44
+ children: [rightAddon.length > 1 && (_Separator || (_Separator = /*#__PURE__*/_jsx(Separator, {}))), /*#__PURE__*/_jsx(RightAddon, {}, void 0, rightAddon[1])]
45
+ }))));
46
+ };
47
+
48
48
  const cardProps = {
49
- title: PropTypes.string.isRequired.description("Title of the card. requiered"),
50
- description: PropTypes.string.description("Description of the card. not requiered"),
51
- leftAddon: PropTypes.element.description("Left Addon"),
52
- rightAddon: PropTypes.array.description("Right addon array, max elements: 2"),
53
- hasBorder: PropTypes.bool.description("Wheter if the card has border or not")
49
+ /**
50
+ * Title of the card. requiered
51
+ */
52
+ title: PropTypes.string.isRequired.description('Title of the card. requiered'),
53
+
54
+ /**
55
+ * Description of the card. not requiered
56
+ */
57
+ description: PropTypes.string.description('Description of the card. not requiered'),
58
+
59
+ /**
60
+ * Left Addon
61
+ */
62
+ leftAddon: PropTypes.element.description('Left Addon'),
63
+
64
+ /**
65
+ * Right addon array, max elements: 2
66
+ */
67
+ rightAddon: PropTypes.array.description('Right addon array, max elements: 2'),
68
+
69
+ /**
70
+ * Wheter if the card has border or not
71
+ */
72
+ hasBorder: PropTypes.bool.description('Wheter if the card has border or not')
54
73
  };
55
- CustomCard.propTypes = cardProps;
56
74
  const DSCardCustomWithSchema = describe(CustomCard);
57
75
  DSCardCustomWithSchema.propTypes = cardProps;
58
- var Card_default = CustomCard;
59
- export {
60
- CustomCard,
61
- DSCardCustomWithSchema,
62
- Card_default as default
63
- };
64
- //# sourceMappingURL=Card.js.map
76
+
77
+ export { CustomCard, DSCardCustomWithSchema, CustomCard as default };
package/esm/v2/Group.js CHANGED
@@ -1,52 +1,57 @@
1
- import * as React from "react";
2
- import React2 from "react";
3
- import { PropTypes, describe } from "react-desc";
4
- import styled from "styled-components";
5
- import { color, border, truncate } from "@elliemae/ds-system";
6
- import Card from "./Card";
7
- const Group = styled.div`
8
- display: flex;
9
- flex-direction: column;
10
- width: 100%;
11
- max-width: 100%;
12
- ${Card} {
13
- border-top: none;
14
- }
15
- ${({ theme, withTopBorder }) => withTopBorder ? `border-top: ${theme.colors.neutral["100"]}` : ""}
16
- `;
17
- const GroupTitle = styled.span`
18
- ${truncate()}
19
- `;
20
- const TitleWrapper = styled.div`
21
- display: flex;
22
- justify-content: space-between;
23
- padding: 0 ${(props) => props.theme.space.xs};
24
- font-size: 12px;
25
- ${color("neutral", "700")};
26
- font-weight: ${(props) => props.theme.fontWeights.semibold};
27
- background-color: ${(props) => props.theme.colors.neutral["080"]};
28
- border-top: ${(props) => border(props.theme.colors.neutral["080"])};
29
- line-height: 24px;
30
- `;
31
- const Items = styled.div`
32
- display: flex;
33
- flex-direction: column;
34
- `;
35
- const CardGroup = ({ children, title, action }) => /* @__PURE__ */ React2.createElement(Group, {
36
- withTopBorder: !title
37
- }, !!title && /* @__PURE__ */ React2.createElement(TitleWrapper, null, /* @__PURE__ */ React2.createElement(GroupTitle, null, title), action), /* @__PURE__ */ React2.createElement(Items, null, children));
1
+ import _jsx from '@babel/runtime/helpers/esm/jsx';
2
+ import 'react';
3
+ import { PropTypes, describe } from 'react-desc';
4
+ import styled from 'styled-components';
5
+ import { truncate, color, border } from '@elliemae/ds-system';
6
+ import { CustomCard } from './Card.js';
7
+
8
+ const Group = /*#__PURE__*/styled.div.withConfig({
9
+ componentId: "sc-1y2lfoo-0"
10
+ })(["display:flex;flex-direction:column;width:100%;max-width:100%;", "{border-top:none;}", ""], CustomCard, _ref => {
11
+ let {
12
+ theme,
13
+ withTopBorder
14
+ } = _ref;
15
+ return withTopBorder ? "border-top: ".concat(theme.colors.neutral['100']) : '';
16
+ });
17
+ const GroupTitle = /*#__PURE__*/styled.span.withConfig({
18
+ componentId: "sc-1y2lfoo-1"
19
+ })(["", ""], truncate());
20
+ const TitleWrapper = /*#__PURE__*/styled.div.withConfig({
21
+ componentId: "sc-1y2lfoo-2"
22
+ })(["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, color('neutral', '700'), props => props.theme.fontWeights.semibold, props => props.theme.colors.neutral['080'], props => border(props.theme.colors.neutral['080']));
23
+ const Items = /*#__PURE__*/styled.div.withConfig({
24
+ componentId: "sc-1y2lfoo-3"
25
+ })(["display:flex;flex-direction:column;"]);
26
+
27
+ const CardGroup = _ref2 => {
28
+ let {
29
+ children,
30
+ title,
31
+ action
32
+ } = _ref2;
33
+ return /*#__PURE__*/_jsx(Group, {
34
+ withTopBorder: !title
35
+ }, void 0, !!title && /*#__PURE__*/_jsx(TitleWrapper, {}, void 0, /*#__PURE__*/_jsx(GroupTitle, {}, void 0, title), action), /*#__PURE__*/_jsx(Items, {}, void 0, children));
36
+ };
37
+
38
38
  const cardgroupProps = {
39
- children: PropTypes.element.isRequired.description("Card items"),
40
- title: PropTypes.string.isRequired.description("Title of the group"),
41
- action: PropTypes.element.description("Right addon action")
39
+ /**
40
+ * Card items
41
+ */
42
+ children: PropTypes.element.isRequired.description('Card items'),
43
+
44
+ /**
45
+ * Title of the group
46
+ */
47
+ title: PropTypes.string.isRequired.description('Title of the group'),
48
+
49
+ /**
50
+ * Right addon action
51
+ */
52
+ action: PropTypes.element.description('Right addon action')
42
53
  };
43
- CardGroup.propTypes = cardgroupProps;
44
54
  const DSCardGroupWithSchema = describe(CardGroup);
45
55
  DSCardGroupWithSchema.propTypes = cardgroupProps;
46
- var Group_default = CardGroup;
47
- export {
48
- CardGroup,
49
- DSCardGroupWithSchema,
50
- Group_default as default
51
- };
52
- //# sourceMappingURL=Group.js.map
56
+
57
+ export { CardGroup, DSCardGroupWithSchema, CardGroup as default };
@@ -1,75 +1,38 @@
1
- import * as React from "react";
2
- import styled from "styled-components";
3
- import { Grid } from "@elliemae/ds-grid";
4
- const CardContainer = styled(Grid)`
5
- align-items: center;
6
- justify-content: space-between;
7
- width: 100%;
8
- height: 56px;
9
- padding: 8px 16px;
10
- position: relative;
11
- border: ${({ theme, hasBorder }) => hasBorder ? `1px solid ${theme.colors.neutral["100"]}` : ""};
12
- &:before {
13
- content: '';
14
- border-bottom: 1px solid ${(props) => props.theme.colors.neutral["100"]};
15
- position: absolute;
16
- margin: 0 auto;
17
- width: 90%;
18
- bottom: 0;
19
- }
20
- &:last-child::before {
21
- content: none;
22
- }
23
- `;
24
- const LeftSection = styled.div`
25
- display: flex;
26
- align-items: center;
27
- `;
28
- const LeftAddon = styled.div`
29
- height: fit-content;
30
- width: fit-content;
31
- margin-right: 16px;
32
- cursor: pointer;
33
- `;
34
- const RightAddonSection = styled.div`
35
- display: flex;
36
- align-items: center;
37
- width: fit-content;
38
- `;
39
- const RightAddon = styled.div`
40
- height: fit-content;
41
- width: fit-content;
42
- cursor: pointer;
43
- `;
44
- const Separator = styled.div`
45
- width: 0px;
46
- height: 24px;
47
- border-right: 1px solid ${(props) => props.theme.colors.neutral["300"]};
48
- margin: 0 8px;
49
- `;
50
- const MainSection = styled.div`
51
- display: flex;
52
- flex-direction: column;
53
- `;
54
- const Title = styled.h3`
55
- margin: 0;
56
- font-size: 16px;
57
- font-weight: ${(props) => props.theme.fontWeights.regular};
58
- color: ${(props) => props.theme.colors.neutral["800"]};
59
- `;
60
- const Description = styled.p`
61
- margin: 0;
62
- color: ${(props) => props.theme.colors.neutral["600"]};
63
- `;
64
- export {
65
- CardContainer,
66
- Description,
67
- LeftAddon,
68
- LeftSection,
69
- MainSection,
70
- RightAddon,
71
- RightAddonSection,
72
- Separator,
73
- Title
74
- };
75
- //# sourceMappingURL=components.js.map
1
+ import styled from 'styled-components';
2
+ import { Grid } from '@elliemae/ds-grid';
3
+
4
+ const CardContainer = /*#__PURE__*/styled(Grid).withConfig({
5
+ componentId: "sc-1cjakml-0"
6
+ })(["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 => {
7
+ let {
8
+ theme,
9
+ hasBorder
10
+ } = _ref;
11
+ return hasBorder ? "1px solid ".concat(theme.colors.neutral['100']) : '';
12
+ }, props => props.theme.colors.neutral['100']);
13
+ const LeftSection = /*#__PURE__*/styled.div.withConfig({
14
+ componentId: "sc-1cjakml-1"
15
+ })(["display:flex;align-items:center;"]);
16
+ const LeftAddon = /*#__PURE__*/styled.div.withConfig({
17
+ componentId: "sc-1cjakml-2"
18
+ })(["height:fit-content;width:fit-content;margin-right:16px;cursor:pointer;"]);
19
+ const RightAddonSection = /*#__PURE__*/styled.div.withConfig({
20
+ componentId: "sc-1cjakml-3"
21
+ })(["display:flex;align-items:center;width:fit-content;"]);
22
+ const RightAddon = /*#__PURE__*/styled.div.withConfig({
23
+ componentId: "sc-1cjakml-4"
24
+ })(["height:fit-content;width:fit-content;cursor:pointer;"]);
25
+ const Separator = /*#__PURE__*/styled.div.withConfig({
26
+ componentId: "sc-1cjakml-5"
27
+ })(["width:0px;height:24px;border-right:1px solid ", ";margin:0 8px;"], props => props.theme.colors.neutral['300']);
28
+ const MainSection = /*#__PURE__*/styled.div.withConfig({
29
+ componentId: "sc-1cjakml-6"
30
+ })(["display:flex;flex-direction:column;"]);
31
+ const Title = /*#__PURE__*/styled.h3.withConfig({
32
+ componentId: "sc-1cjakml-7"
33
+ })(["margin:0;font-size:16px;font-weight:", ";color:", ";"], props => props.theme.fontWeights.regular, props => props.theme.colors.neutral['800']);
34
+ const Description = /*#__PURE__*/styled.p.withConfig({
35
+ componentId: "sc-1cjakml-8"
36
+ })(["margin:0;color:", ";"], props => props.theme.colors.neutral['600']);
37
+
38
+ export { CardContainer, Description, LeftAddon, LeftSection, MainSection, RightAddon, RightAddonSection, Separator, Title };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elliemae/ds-card",
3
- "version": "2.2.0-alpha.3",
3
+ "version": "3.0.0-next.0",
4
4
  "license": "MIT",
5
5
  "description": "ICE MT - Dimsum - Card",
6
6
  "module": "./esm/index.js",
@@ -68,15 +68,15 @@
68
68
  "build": "node ../../scripts/build/build.js"
69
69
  },
70
70
  "dependencies": {
71
- "@elliemae/ds-button": "2.2.0-alpha.3",
72
- "@elliemae/ds-classnames": "2.2.0-alpha.3",
73
- "@elliemae/ds-form": "2.2.0-alpha.3",
74
- "@elliemae/ds-grid": "2.2.0-alpha.3",
75
- "@elliemae/ds-header": "2.2.0-alpha.3",
76
- "@elliemae/ds-icons": "2.2.0-alpha.3",
77
- "@elliemae/ds-separator": "2.2.0-alpha.3",
78
- "@elliemae/ds-system": "2.2.0-alpha.3",
79
- "@elliemae/ds-truncated-tooltip-text": "2.2.0-alpha.3",
71
+ "@elliemae/ds-button": "3.0.0-next.0",
72
+ "@elliemae/ds-classnames": "3.0.0-next.0",
73
+ "@elliemae/ds-form": "3.0.0-next.0",
74
+ "@elliemae/ds-grid": "3.0.0-next.0",
75
+ "@elliemae/ds-header": "3.0.0-next.0",
76
+ "@elliemae/ds-icons": "3.0.0-next.0",
77
+ "@elliemae/ds-separator": "3.0.0-next.0",
78
+ "@elliemae/ds-system": "3.0.0-next.0",
79
+ "@elliemae/ds-truncated-tooltip-text": "3.0.0-next.0",
80
80
  "react-desc": "~4.1.3"
81
81
  },
82
82
  "devDependencies": {
package/cjs/DSCard.js.map DELETED
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../src/DSCard.tsx", "../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["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", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,mBAAkB;AAClB,wBAAoC;AACpC,2BAA0C;AAC1C,wBAAuB;AACvB,0BAAyB;AAEzB,MAAM,SAAS,CAAC;AAAA,EACd,WAAW;AAAA,EACX,WAAW;AAAA,EACX,iBAAiB;AAAA,KACd;AAAA,MACC;AACJ,QAAM,EAAE,iBAAiB,oDAA0B;AAEnD,SACE,mDAAC,OAAD;AAAA,IACE,eAAY;AAAA,OACR;AAAA,IACJ,KAAK;AAAA,IACL,WAAW;AAAA,OACP;AAAA,KAEH;AAAA;AAKP,MAAM,YAAY;AAAA,EAEhB,gBAAgB,4BAAU,OAAO,YAC/B;AAAA,EAKF,UAAU,4BAAU,OAAO,YAAY;AAAA,EAIvC,UAAU,4BAAU,QAClB,4BAAU,MAAM;AAAA,IACd,MAAM,4BAAU,MAAM,CAAC,6BAAc;AAAA,MAEvC,YAAY;AAAA;AAGhB,OAAO,YAAY;AACnB,MAAM,mBAAmB,gCAAS;AAClC,iBAAiB,YAAY;AAG7B,IAAO,iBAAQ;",
6
- "names": []
7
- }
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../src/DSCardBody.tsx", "../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["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", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,mBAAkB;AAClB,wBAAoC;AAEpC,MAAM,aAAa,CAAC,EAAE,eACpB,mDAAC,OAAD;AAAA,EAAK,WAAU;AAAA,EAAkB,eAAY;AAAA,GAC1C;AAIL,MAAM,YAAY;AAAA,EAEhB,UAAU,4BAAU,QAAQ,YAAY;AAAA;AAG1C,WAAW,YAAY;AACvB,MAAM,uBAAuB,gCAAS;AACtC,qBAAqB,YAAY;AAGjC,IAAO,qBAAQ;",
6
- "names": []
7
- }
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../src/DSCardHeader.tsx", "../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["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", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,mBAAkB;AAClB,wBAAoC;AACpC,2BAA0C;AAE1C,MAAM,eAAe,CAAC,EAAE,OAAO,aAAa;AAC1C,QAAM,EAAE,cAAc,qBAAqB,oDACzC;AAEF,SACE,mDAAC,OAAD;AAAA,IAAK,WAAW;AAAA,IAAc,eAAY;AAAA,KACxC,mDAAC,QAAD;AAAA,IAAM,WAAW,iBAAiB;AAAA,KAAa,QAC/C,mDAAC,OAAD;AAAA,IACE,WAAW,iBAAiB;AAAA,IAC5B,eAAY;AAAA,KAEX;AAAA;AAMT,MAAM,aAAa;AAAA,EAEjB,OAAO,4BAAU,OAAO,YAAY;AAAA,EAEpC,QAAQ,4BAAU,KAAK,YAAY;AAAA;AAGrC,aAAa,YAAY;AACzB,MAAM,yBAAyB,gCAAS;AACxC,uBAAuB,YAAY;AAGnC,IAAO,uBAAQ;",
6
- "names": []
7
- }
@@ -1,7 +0,0 @@
1
- {
2
- "version": 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 'react-desc';\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';\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'}>\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;\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": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADGvB,mBAAkB;AAClB,oBAA8B;AAC9B,wBAAoC;AACpC,sBAA8C;AAC9C,uBAAyB;AACzB,uBAAqB;AACrB,0BAAwB;AACxB,qBAAqB;AACrB,qBAA2B;AAC3B,oBAAwF;AAExF,MAAM,aAAa,CAAC;AAAA,EAClB;AAAA,EACA;AAAA,EACA,mBAAmB;AAAA,EACnB;AAAA,EACA;AAAA,EACA;AAAA,EAEA,aAAa;AAAA,EACb,aAAa;AAAA,EACb,WAAW;AAAA,EAEX,aAAa;AAAA,EACb,aAAa;AAAA,EACb,WAAW;AAAA,EACX;AAAA,EAEA,WAAW;AAAA,EACX,WAAW;AAAA,MACP;AACJ,QAAM,QAAQ;AACd,QAAM,iBAAiB,cAAc;AACrC,QAAM,mBAAmB,kBAAkB;AAC3C,QAAM,iBAAiB,CAAC;AACxB,M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BAAe;AAAA,KAAY,aACvC,mDAAC,qBAAD,QAGH,cACC,mDAAC,0BAAD;AAAA,IAAY,MAAM,CAAC,QAAQ;AAAA,IAAS,QAAO;AAAA,KACxC,eAMV,iBAAiB,cAChB,mDAAC,qBAAD;AAAA,IAAM,IAAI,cAAc;AAAA,IAAK,IAAI,cAAc;AAAA,KAC7C,mDAAC,6BAAD;AAAA,IAAa,QAAM;AAAA,IAAC,UAAS;AAAA,IAAU,QAAO;AAAA,MAC9C,mDAAC,qBAAD;AAAA,IAAM,IAAG;AAAA,IAAM,eAAY;AAAA,KACxB;AAAA;AASf,MAAM,cAAc;AAAA,EAIlB,OAAO,4BAAU,OAAO,WAAW,YAAY;AAAA,EAI/C,aAAa,4BAAU,OAAO,YAAY;AAAA,EAI1C,kBAAkB,4BAAU,MAAM,CAAC,WAAW,YAAY,YAAY;AAAA,EAItE,YAAY,4BAAU,OAAO,YAAY;AAAA,EAIzC,kBAAkB,4BAAU,OAAO,YAAY;AAAA,EAI/C,YAAY,4BAAU,QAAQ,YAAY;AAAA,EAI1C,YAAY,4BAAU,KAAK,YAAY;AAAA,EAIvC,YAAY,4BAAU,KAAK,YAAY;AAAA,EAIvC,UAAU,4BAAU,KAAK,YAAY;AAAA,EAIrC,YAAY,4BAAU,KAAK,YAAY;AAAA,EAIvC,YAAY,4BAAU,KAAK,YAAY;AAAA,EAIvC,UAAU,4BAAU,KAAK,YAAY;AAAA,EAIrC,eAAe,4BAAU,QAAQ,YAAY;AAAA,EAI7C,UAAU,4BAAU,KAAK,YAAY;AAAA,EAIrC,UAAU,4BAAU,KAAK,YAAY;AAAA;AAGvC,WAAW,YAAY;AACvB,MAAM,yBAAyB,gCAAS;AACxC,uBAAuB,YAAY;AAGnC,IAAO,qBAAQ;",
6
- "names": []
7
- }
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../src/detail/styled.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["import styled from 'styled-components';\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'\n ? props.theme.colors.neutral['600']\n : 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 }) =>\n active ? theme.colors.brand['600'] : theme.colors.neutral['200'];\nconst background = ({ active, theme }) =>\n 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 /* & + ${Container} {\n border-top-color: blue;\n } */\n`;\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;A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AA;AAAA;",
6
- "names": []
7
- }
package/cjs/index.js.map DELETED
@@ -1,7 +0,0 @@
1
- {
2
- "version": 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": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,wBAAc;AACd,wBAAc;AACd,wBAAc;AACd,wBAAc;AACd,wBAAc;AACd,wBAAc;AACd,wBAAc;AAEd,oBAAwB;",
6
- "names": []
7
- }
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../src/v2/ActionAddon.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["import React from 'react';\nimport { PropTypes, describe } from 'react-desc';\nimport styled from 'styled-components';\nimport { ChevronSmallDown } from '@elliemae/ds-icons';\nimport Button from '@elliemae/ds-button';\n\nconst Addon = styled(Button)`\n background-color: transparent;\n padding-right: 4px;\n height: 100%;\n border: none;\n font-size: 12px;\n font-weight: ${(props) => props.theme.fontWeights.semibold};\n color: ${(props) => props.theme.colors.brand['700']};\n cursor: pointer;\n &:focus,\n &::after {\n background-color: transparent;\n box-shadow: none !important; /* needed */\n border: none !important; /* needed */\n }\n`;\n\nconst ActionAddon = ({ label, onClick, icon }) => (\n <Addon onClick={onClick} labelText={label} icon={icon || <ChevronSmallDown color={['brand-primary', 700]} />} />\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};\n\nActionAddon.propTypes = actionProps;\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;ACAA,YAAuB;ADAvB,mBAAkB;AAClB,wBAAoC;AACpC,+BAAmB;AACnB,sBAAiC;AACjC,uBAAmB;AAEnB,MAAM,QAAQ,sCAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,iBAMJ,CAAC,UAAU,MAAM,MAAM,YAAY;AAAA,WACzC,CAAC,UAAU,MAAM,MAAM,OAAO,MAAM;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAU/C,MAAM,cAAc,CAAC,EAAE,OAAO,SAAS,WACrC,mDAAC,OAAD;AAAA,EAAO;AAAA,EAAkB,WAAW;AAAA,EAAO,MAAM,QAAQ,mDAAC,kCAAD;AAAA,IAAkB,OAAO,CAAC,iBAAiB;AAAA;AAAA;AAGtG,MAAM,cAAc;AAAA,EAIlB,OAAO,4BAAU,OAAO,YAAY;AAAA,EAIpC,SAAS,4BAAU,KAAK,YAAY;AAAA,EAIpC,MAAM,4BAAU,QAAQ,YAAY;AAAA;AAGtC,YAAY,YAAY;AACxB,MAAM,8BAA8B,gCAAS;AAC7C,4BAA4B,YAAY;AAGxC,IAAO,sBAAQ;",
6
- "names": []
7
- }
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../src/v2/Card.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["import React from 'react';\nimport { PropTypes, describe } from 'react-desc';\nimport { DSHeader } from '@elliemae/ds-header';\nimport DSTruncatedTooltipText, {\n TooltipTextProvider,\n} from '@elliemae/ds-truncated-tooltip-text';\nimport {\n CardContainer,\n LeftSection,\n LeftAddon,\n RightAddonSection,\n RightAddon,\n Separator,\n MainSection,\n Description,\n} from './components';\n\nconst getCol = (rightAddon) => {\n if (!rightAddon) return [1];\n return [1, 'auto'];\n};\n\nconst CustomCard = ({\n title,\n description,\n leftAddon,\n rightAddon, // array. max 2 elements\n hasBorder = false,\n}) => (\n <TooltipTextProvider>\n <CardContainer\n hasBorder={hasBorder}\n cols={getCol(rightAddon)}\n data-testid=\"em-ds-card\"\n >\n <LeftSection>\n {leftAddon && <LeftAddon>{leftAddon}</LeftAddon>}\n <MainSection\n style={{\n maxWidth: leftAddon ? 'calc(100% - 40px)' : '100%',\n }}\n >\n <DSHeader\n fontSize=\"16px\"\n data-testid=\"em-ds-card-header\"\n fontWeight=\"regular\"\n color=\"neutral.800\"\n text={<DSTruncatedTooltipText value={title} />}\n />\n {description && (\n <Description>\n <DSTruncatedTooltipText value={description} />\n </Description>\n )}\n </MainSection>\n </LeftSection>\n {rightAddon && (\n <RightAddonSection>\n {rightAddon[0] && <RightAddon>{rightAddon[0]}</RightAddon>}\n {rightAddon[1] && (\n <>\n {rightAddon.length > 1 && <Separator />}\n <RightAddon>{rightAddon[1]}</RightAddon>\n </>\n )}\n </RightAddonSection>\n )}\n </CardContainer>\n </TooltipTextProvider>\n);\n\nconst cardProps = {\n /**\n * Title of the card. requiered\n */\n title: PropTypes.string.isRequired.description(\n 'Title of the card. requiered',\n ),\n /**\n * Description of the card. not requiered\n */\n description: PropTypes.string.description(\n 'Description of the card. not requiered',\n ),\n /**\n * Left Addon\n */\n leftAddon: PropTypes.element.description('Left Addon'),\n /**\n * Right addon array, max elements: 2\n */\n rightAddon: PropTypes.array.description('Right addon array, max elements: 2'),\n /**\n * Wheter if the card has border or not\n */\n hasBorder: PropTypes.bool.description('Wheter if the card has border or not'),\n};\n\nCustomCard.propTypes = cardProps;\nconst DSCardCustomWithSchema = describe(CustomCard);\nDSCardCustomWithSchema.propTypes = cardProps;\n\nexport { CustomCard, DSCardCustomWithSchema };\nexport default CustomCard;\n", "import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ACvB,MAAM,yBAAyB,gCAAS;AACxC,uBAAuB,YAAY;AAGnC,IAAO,eAAQ;",
6
- "names": []
7
- }
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../src/v2/Group.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["import React from 'react';\nimport { PropTypes, describe } from 'react-desc';\nimport styled from 'styled-components';\nimport { color, border, truncate } from '@elliemae/ds-system';\nimport Card from './Card';\n\nconst Group = styled.div`\n display: flex;\n flex-direction: column;\n width: 100%;\n max-width: 100%;\n ${Card} {\n border-top: none;\n }\n ${({ theme, withTopBorder }) =>\n withTopBorder ? `border-top: ${theme.colors.neutral['100']}` : ''}\n`;\n\nconst GroupTitle = styled.span`\n ${truncate()}\n`;\n\nconst TitleWrapper = styled.div`\n display: flex;\n justify-content: space-between;\n padding: 0 ${(props) => props.theme.space.xs};\n font-size: 12px;\n ${color('neutral', '700')};\n font-weight: ${(props) => props.theme.fontWeights.semibold};\n background-color: ${(props) => props.theme.colors.neutral['080']};\n border-top: ${(props) => border(props.theme.colors.neutral['080'])};\n line-height: 24px;\n`;\n\nconst Items = styled.div`\n display: flex;\n flex-direction: column;\n`;\n\nconst CardGroup = ({ children, title, action }) => (\n <Group withTopBorder={!title}>\n {!!title && (\n <TitleWrapper>\n <GroupTitle>{title}</GroupTitle>\n {action}\n </TitleWrapper>\n )}\n <Items>{children}</Items>\n </Group>\n);\n\nconst cardgroupProps = {\n /**\n * Card items\n */\n children: PropTypes.element.isRequired.description('Card items'),\n /**\n * Title of the group\n */\n title: PropTypes.string.isRequired.description('Title of the group'),\n /**\n * Right addon action\n */\n action: PropTypes.element.description('Right addon action'),\n};\n\nCardGroup.propTypes = cardgroupProps;\nconst DSCardGroupWithSchema = describe(CardGroup);\nDSCardGroupWithSchema.propTypes = cardgroupProps;\n\nexport { CardGroup, DSCardGroupWithSchema };\nexport default CardGroup;\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,mBAAkB;AAClB,wBAAoC;AACpC,+BAAmB;AACnB,uBAAwC;AACxC,kBAAiB;AAEjB,MAAM,QAAQ,iCAAO;AAAA;AAAA;AAAA;AAAA;AAAA,IAKjB;AAAA;AAAA;AAAA,IAGA,CAAC,EAAE,OAAO,oBACV,gBAAgB,eAAe,MAAM,OAAO,QAAQ,WAAW;AAAA;AAGnE,MAAM,aAAa,iCAAO;AAAA,IACtB;AAAA;AAGJ,MAAM,eAAe,iCAAO;AAAA;AAAA;AAAA,eAGb,CAAC,UAAU,MAAM,MAAM,MAAM;AAAA;AAAA,IAExC,4BAAM,WAAW;AAAA,iBACJ,CAAC,UAAU,MAAM,MAAM,YAAY;AAAA,sBAC9B,CAAC,UAAU,MAAM,MAAM,OAAO,QAAQ;AAAA,gBAC5C,CAAC,UAAU,6BAAO,MAAM,MAAM,OAAO,QAAQ;AAAA;AAAA;AAI7D,MAAM,QAAQ,iCAAO;AAAA;AAAA;AAAA;AAKrB,MAAM,YAAY,CAAC,EAAE,UAAU,OAAO,aACpC,mDAAC,OAAD;AAAA,EAAO,eAAe,CAAC;AAAA,GACpB,CAAC,CAAC,SACD,mDAAC,cAAD,MACE,mDAAC,YAAD,MAAa,QACZ,SAGL,mDAAC,OAAD,MAAQ;AAIZ,MAAM,iBAAiB;AAAA,EAIrB,UAAU,4BAAU,QAAQ,WAAW,YAAY;AAAA,EAInD,OAAO,4BAAU,OAAO,WAAW,YAAY;AAAA,EAI/C,QAAQ,4BAAU,QAAQ,YAAY;AAAA;AAGxC,UAAU,YAAY;AACtB,MAAM,wBAAwB,gCAAS;AACvC,sBAAsB,YAAY;AAGlC,IAAO,gBAAQ;",
6
- "names": []
7
- }