@elliemae/ds-card 2.2.0-alpha.5 → 2.2.0-beta.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.
Files changed (48) hide show
  1. package/cjs/DSCard.js +67 -62
  2. package/cjs/DSCardBody.js +28 -45
  3. package/cjs/DSCardHeader.js +39 -52
  4. package/cjs/detail/DetailCard.js +194 -150
  5. package/cjs/detail/styled.js +59 -105
  6. package/cjs/index.js +29 -42
  7. package/cjs/v2/ActionAddon.js +54 -69
  8. package/cjs/v2/Card.js +83 -77
  9. package/cjs/v2/Group.js +64 -77
  10. package/cjs/v2/components.js +54 -104
  11. package/esm/DSCard.js +53 -30
  12. package/esm/DSCardBody.js +18 -16
  13. package/esm/DSCardHeader.js +28 -22
  14. package/esm/detail/DetailCard.js +180 -119
  15. package/esm/detail/styled.js +45 -77
  16. package/esm/index.js +7 -13
  17. package/esm/v2/ActionAddon.js +42 -40
  18. package/esm/v2/Card.js +72 -59
  19. package/esm/v2/Group.js +53 -48
  20. package/esm/v2/components.js +38 -75
  21. package/package.json +10 -10
  22. package/types/DSCard.d.ts +1 -6
  23. package/types/DSCardBody.d.ts +1 -3
  24. package/types/DSCardHeader.d.ts +1 -4
  25. package/types/detail/DetailCard.d.ts +1 -17
  26. package/types/v2/ActionAddon.d.ts +1 -5
  27. package/types/v2/Card.d.ts +1 -7
  28. package/types/v2/Group.d.ts +1 -5
  29. package/cjs/DSCard.js.map +0 -7
  30. package/cjs/DSCardBody.js.map +0 -7
  31. package/cjs/DSCardHeader.js.map +0 -7
  32. package/cjs/detail/DetailCard.js.map +0 -7
  33. package/cjs/detail/styled.js.map +0 -7
  34. package/cjs/index.js.map +0 -7
  35. package/cjs/v2/ActionAddon.js.map +0 -7
  36. package/cjs/v2/Card.js.map +0 -7
  37. package/cjs/v2/Group.js.map +0 -7
  38. package/cjs/v2/components.js.map +0 -7
  39. package/esm/DSCard.js.map +0 -7
  40. package/esm/DSCardBody.js.map +0 -7
  41. package/esm/DSCardHeader.js.map +0 -7
  42. package/esm/detail/DetailCard.js.map +0 -7
  43. package/esm/detail/styled.js.map +0 -7
  44. package/esm/index.js.map +0 -7
  45. package/esm/v2/ActionAddon.js.map +0 -7
  46. package/esm/v2/Card.js.map +0 -7
  47. package/esm/v2/Group.js.map +0 -7
  48. package/esm/v2/components.js.map +0 -7
@@ -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.5",
3
+ "version": "2.2.0-beta.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.5",
72
- "@elliemae/ds-classnames": "2.2.0-alpha.5",
73
- "@elliemae/ds-form": "2.2.0-alpha.5",
74
- "@elliemae/ds-grid": "2.2.0-alpha.5",
75
- "@elliemae/ds-header": "2.2.0-alpha.5",
76
- "@elliemae/ds-icons": "2.2.0-alpha.5",
77
- "@elliemae/ds-separator": "2.2.0-alpha.5",
78
- "@elliemae/ds-system": "2.2.0-alpha.5",
79
- "@elliemae/ds-truncated-tooltip-text": "2.2.0-alpha.5",
71
+ "@elliemae/ds-button": "2.2.0-beta.0",
72
+ "@elliemae/ds-classnames": "2.2.0-beta.0",
73
+ "@elliemae/ds-form": "2.2.0-beta.0",
74
+ "@elliemae/ds-grid": "2.2.0-beta.0",
75
+ "@elliemae/ds-header": "2.2.0-beta.0",
76
+ "@elliemae/ds-icons": "2.2.0-beta.0",
77
+ "@elliemae/ds-separator": "2.2.0-beta.0",
78
+ "@elliemae/ds-system": "2.2.0-beta.0",
79
+ "@elliemae/ds-truncated-tooltip-text": "2.2.0-beta.0",
80
80
  "react-desc": "~4.1.3"
81
81
  },
82
82
  "devDependencies": {
package/types/DSCard.d.ts CHANGED
@@ -36,12 +36,7 @@ declare const DSCard: {
36
36
  };
37
37
  };
38
38
  declare const DSCardWithSchema: {
39
- (props?: {
40
- [x: string]: any;
41
- innerRef?: undefined;
42
- children?: null | undefined;
43
- containerProps?: {} | undefined;
44
- } | undefined): JSX.Element;
39
+ (props?: unknown): JSX.Element;
45
40
  propTypes: unknown;
46
41
  toTypescript: () => import("react-desc").TypescriptSchema;
47
42
  };
@@ -15,9 +15,7 @@ declare const DSCardBody: {
15
15
  };
16
16
  };
17
17
  declare const DSCardBodyWithSchema: {
18
- (props?: {
19
- children: any;
20
- } | undefined): JSX.Element;
18
+ (props?: unknown): JSX.Element;
21
19
  propTypes: unknown;
22
20
  toTypescript: () => import("react-desc").TypescriptSchema;
23
21
  };
@@ -23,10 +23,7 @@ declare const DSCardHeader: {
23
23
  };
24
24
  };
25
25
  declare const DSCardHeaderWithSchema: {
26
- (props?: {
27
- title: any;
28
- action: any;
29
- } | undefined): JSX.Element;
26
+ (props?: unknown): JSX.Element;
30
27
  propTypes: unknown;
31
28
  toTypescript: () => import("react-desc").TypescriptSchema;
32
29
  };
@@ -152,23 +152,7 @@ declare const DetailCard: {
152
152
  };
153
153
  };
154
154
  declare const DSCardDetailWithSchema: {
155
- (props?: {
156
- title: any;
157
- description: any;
158
- descriptionColor?: string | undefined;
159
- rightValue: any;
160
- rightDescription: any;
161
- rightAddon: any;
162
- selectable?: boolean | undefined;
163
- isSelected?: boolean | undefined;
164
- onSelect?: ((...args: any[]) => void) | undefined;
165
- expandable?: boolean | undefined;
166
- isExpanded?: boolean | undefined;
167
- onExpand?: ((...args: any[]) => void) | undefined;
168
- expandContent: any;
169
- readOnly?: boolean | undefined;
170
- disabled?: boolean | undefined;
171
- } | undefined): JSX.Element;
155
+ (props?: unknown): JSX.Element;
172
156
  propTypes: unknown;
173
157
  toTypescript: () => import("react-desc").TypescriptSchema;
174
158
  };
@@ -37,11 +37,7 @@ declare const ActionAddon: {
37
37
  };
38
38
  };
39
39
  declare const DSCardActionAddonWithSchema: {
40
- (props?: {
41
- label: any;
42
- onClick: any;
43
- icon: any;
44
- } | undefined): JSX.Element;
40
+ (props?: unknown): JSX.Element;
45
41
  propTypes: unknown;
46
42
  toTypescript: () => import("react-desc").TypescriptSchema;
47
43
  };
@@ -52,13 +52,7 @@ declare const CustomCard: {
52
52
  };
53
53
  };
54
54
  declare const DSCardCustomWithSchema: {
55
- (props?: {
56
- title: any;
57
- description: any;
58
- leftAddon: any;
59
- rightAddon: any;
60
- hasBorder?: boolean | undefined;
61
- } | undefined): JSX.Element;
55
+ (props?: unknown): JSX.Element;
62
56
  propTypes: unknown;
63
57
  toTypescript: () => import("react-desc").TypescriptSchema;
64
58
  };
@@ -27,11 +27,7 @@ declare const CardGroup: {
27
27
  };
28
28
  };
29
29
  declare const DSCardGroupWithSchema: {
30
- (props?: {
31
- children: any;
32
- title: any;
33
- action: any;
34
- } | undefined): JSX.Element;
30
+ (props?: unknown): JSX.Element;
35
31
  propTypes: unknown;
36
32
  toTypescript: () => import("react-desc").TypescriptSchema;
37
33
  };
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
- }