@elliemae/ds-card 2.2.0-next.3 → 2.3.0-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cjs/DSCard.js +62 -67
- package/cjs/DSCard.js.map +7 -0
- package/cjs/DSCardBody.js +45 -28
- package/cjs/DSCardBody.js.map +7 -0
- package/cjs/DSCardHeader.js +52 -39
- package/cjs/DSCardHeader.js.map +7 -0
- package/cjs/detail/DetailCard.js +150 -194
- package/cjs/detail/DetailCard.js.map +7 -0
- package/cjs/detail/styled.js +105 -59
- package/cjs/detail/styled.js.map +7 -0
- package/cjs/index.js +42 -29
- package/cjs/index.js.map +7 -0
- package/cjs/v2/ActionAddon.js +69 -54
- package/cjs/v2/ActionAddon.js.map +7 -0
- package/cjs/v2/Card.js +77 -83
- package/cjs/v2/Card.js.map +7 -0
- package/cjs/v2/Group.js +77 -64
- package/cjs/v2/Group.js.map +7 -0
- package/cjs/v2/components.js +104 -54
- package/cjs/v2/components.js.map +7 -0
- package/esm/DSCard.js +30 -53
- package/esm/DSCard.js.map +7 -0
- package/esm/DSCardBody.js +16 -18
- package/esm/DSCardBody.js.map +7 -0
- package/esm/DSCardHeader.js +22 -28
- package/esm/DSCardHeader.js.map +7 -0
- package/esm/detail/DetailCard.js +119 -180
- package/esm/detail/DetailCard.js.map +7 -0
- package/esm/detail/styled.js +77 -45
- package/esm/detail/styled.js.map +7 -0
- package/esm/index.js +13 -7
- package/esm/index.js.map +7 -0
- package/esm/v2/ActionAddon.js +40 -42
- package/esm/v2/ActionAddon.js.map +7 -0
- package/esm/v2/Card.js +59 -72
- package/esm/v2/Card.js.map +7 -0
- package/esm/v2/Group.js +48 -53
- package/esm/v2/Group.js.map +7 -0
- package/esm/v2/components.js +75 -38
- package/esm/v2/components.js.map +7 -0
- package/package.json +10 -10
- package/types/DSCard.d.ts +1 -6
- package/types/DSCardBody.d.ts +1 -3
- package/types/DSCardHeader.d.ts +1 -4
- package/types/detail/DetailCard.d.ts +1 -17
- package/types/v2/ActionAddon.d.ts +1 -5
- package/types/v2/Card.d.ts +1 -7
- package/types/v2/Group.d.ts +1 -5
package/esm/v2/Card.js
CHANGED
|
@@ -1,77 +1,64 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import { PropTypes, describe } from
|
|
4
|
-
import { DSHeader } from
|
|
5
|
-
import DSTruncatedTooltipText, {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
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"];
|
|
14
22
|
};
|
|
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
|
-
}), 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
|
-
|
|
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])))));
|
|
48
48
|
const cardProps = {
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
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')
|
|
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")
|
|
73
54
|
};
|
|
55
|
+
CustomCard.propTypes = cardProps;
|
|
74
56
|
const DSCardCustomWithSchema = describe(CustomCard);
|
|
75
57
|
DSCardCustomWithSchema.propTypes = cardProps;
|
|
76
|
-
|
|
77
|
-
export {
|
|
58
|
+
var Card_default = CustomCard;
|
|
59
|
+
export {
|
|
60
|
+
CustomCard,
|
|
61
|
+
DSCardCustomWithSchema,
|
|
62
|
+
Card_default as default
|
|
63
|
+
};
|
|
64
|
+
//# sourceMappingURL=Card.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/v2/Card.tsx"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "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"],
|
|
5
|
+
"mappings": "AAAA;ACAA;AACA;AACA;AACA;AAAA;AAAA;AAGA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAWA,MAAM,SAAS,CAAC,eAAe;AAC7B,MAAI,CAAC;AAAY,WAAO,CAAC;AACzB,SAAO,CAAC,GAAG;AAAA;AAGb,MAAM,aAAa,CAAC;AAAA,EAClB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,YAAY;AAAA,MAEZ,qCAAC,qBAAD,MACE,qCAAC,eAAD;AAAA,EACE;AAAA,EACA,MAAM,OAAO;AAAA,EACb,eAAY;AAAA,GAEZ,qCAAC,aAAD,MACG,aAAa,qCAAC,WAAD,MAAY,YAC1B,qCAAC,aAAD;AAAA,EACE,OAAO;AAAA,IACL,UAAU,YAAY,sBAAsB;AAAA;AAAA,GAG9C,qCAAC,UAAD;AAAA,EACE,UAAS;AAAA,EACT,eAAY;AAAA,EACZ,YAAW;AAAA,EACX,OAAM;AAAA,EACN,MAAM,qCAAC,wBAAD;AAAA,IAAwB,OAAO;AAAA;AAAA,IAEtC,eACC,qCAAC,aAAD,MACE,qCAAC,wBAAD;AAAA,EAAwB,OAAO;AAAA,OAKtC,cACC,qCAAC,mBAAD,MACG,WAAW,MAAM,qCAAC,YAAD,MAAa,WAAW,KACzC,WAAW,MACV,4DACG,WAAW,SAAS,KAAK,qCAAC,WAAD,OAC1B,qCAAC,YAAD,MAAa,WAAW;AAStC,MAAM,YAAY;AAAA,EAIhB,OAAO,UAAU,OAAO,WAAW,YACjC;AAAA,EAKF,aAAa,UAAU,OAAO,YAC5B;AAAA,EAKF,WAAW,UAAU,QAAQ,YAAY;AAAA,EAIzC,YAAY,UAAU,MAAM,YAAY;AAAA,EAIxC,WAAW,UAAU,KAAK,YAAY;AAAA;AAGxC,WAAW,YAAY;AACvB,MAAM,yBAAyB,SAAS;AACxC,uBAAuB,YAAY;AAGnC,IAAO,eAAQ;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
package/esm/v2/Group.js
CHANGED
|
@@ -1,57 +1,52 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import { PropTypes, describe } from
|
|
4
|
-
import styled from
|
|
5
|
-
import {
|
|
6
|
-
import
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
const GroupTitle =
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
const TitleWrapper =
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
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));
|
|
38
38
|
const cardgroupProps = {
|
|
39
|
-
|
|
40
|
-
|
|
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')
|
|
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")
|
|
53
42
|
};
|
|
43
|
+
CardGroup.propTypes = cardgroupProps;
|
|
54
44
|
const DSCardGroupWithSchema = describe(CardGroup);
|
|
55
45
|
DSCardGroupWithSchema.propTypes = cardgroupProps;
|
|
56
|
-
|
|
57
|
-
export {
|
|
46
|
+
var Group_default = CardGroup;
|
|
47
|
+
export {
|
|
48
|
+
CardGroup,
|
|
49
|
+
DSCardGroupWithSchema,
|
|
50
|
+
Group_default as default
|
|
51
|
+
};
|
|
52
|
+
//# sourceMappingURL=Group.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/v2/Group.tsx"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "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"],
|
|
5
|
+
"mappings": "AAAA;ACAA;AACA;AACA;AACA;AACA;AAEA,MAAM,QAAQ,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA,IAKjB;AAAA;AAAA;AAAA,IAGA,CAAC,EAAE,OAAO,oBACV,gBAAgB,eAAe,MAAM,OAAO,QAAQ,WAAW;AAAA;AAGnE,MAAM,aAAa,OAAO;AAAA,IACtB;AAAA;AAGJ,MAAM,eAAe,OAAO;AAAA;AAAA;AAAA,eAGb,CAAC,UAAU,MAAM,MAAM,MAAM;AAAA;AAAA,IAExC,MAAM,WAAW;AAAA,iBACJ,CAAC,UAAU,MAAM,MAAM,YAAY;AAAA,sBAC9B,CAAC,UAAU,MAAM,MAAM,OAAO,QAAQ;AAAA,gBAC5C,CAAC,UAAU,OAAO,MAAM,MAAM,OAAO,QAAQ;AAAA;AAAA;AAI7D,MAAM,QAAQ,OAAO;AAAA;AAAA;AAAA;AAKrB,MAAM,YAAY,CAAC,EAAE,UAAU,OAAO,aACpC,qCAAC,OAAD;AAAA,EAAO,eAAe,CAAC;AAAA,GACpB,CAAC,CAAC,SACD,qCAAC,cAAD,MACE,qCAAC,YAAD,MAAa,QACZ,SAGL,qCAAC,OAAD,MAAQ;AAIZ,MAAM,iBAAiB;AAAA,EAIrB,UAAU,UAAU,QAAQ,WAAW,YAAY;AAAA,EAInD,OAAO,UAAU,OAAO,WAAW,YAAY;AAAA,EAI/C,QAAQ,UAAU,QAAQ,YAAY;AAAA;AAGxC,UAAU,YAAY;AACtB,MAAM,wBAAwB,SAAS;AACvC,sBAAsB,YAAY;AAGlC,IAAO,gBAAQ;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
package/esm/v2/components.js
CHANGED
|
@@ -1,38 +1,75 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
const CardContainer =
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
const
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
const
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
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
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/v2/components.tsx"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import styled from 'styled-components';\nimport { Grid } from '@elliemae/ds-grid';\n\nconst CardContainer = styled(Grid)`\n align-items: center;\n justify-content: space-between;\n width: 100%;\n height: 56px;\n padding: 8px 16px;\n position: relative;\n border: ${({ theme, hasBorder }) =>\n hasBorder ? `1px solid ${theme.colors.neutral['100']}` : ''};\n &:before {\n content: '';\n border-bottom: 1px solid ${(props) => props.theme.colors.neutral['100']};\n position: absolute;\n margin: 0 auto;\n width: 90%;\n bottom: 0;\n }\n &:last-child::before {\n content: none;\n }\n`;\n\nconst LeftSection = styled.div`\n display: flex;\n align-items: center;\n`;\n\nconst LeftAddon = styled.div`\n height: fit-content;\n width: fit-content;\n margin-right: 16px;\n cursor: pointer;\n`;\n\nconst RightAddonSection = styled.div`\n display: flex;\n align-items: center;\n width: fit-content;\n`;\n\nconst RightAddon = styled.div`\n height: fit-content;\n width: fit-content;\n cursor: pointer;\n`;\n\nconst Separator = styled.div`\n width: 0px;\n height: 24px;\n border-right: 1px solid ${(props) => props.theme.colors.neutral['300']};\n margin: 0 8px;\n`;\n\nconst MainSection = styled.div`\n display: flex;\n flex-direction: column;\n`;\n\nconst Title = styled.h3`\n margin: 0;\n font-size: 16px;\n font-weight: ${(props) => props.theme.fontWeights.regular};\n color: ${(props) => props.theme.colors.neutral['800']};\n`;\n\nconst Description = styled.p`\n margin: 0;\n color: ${(props) => props.theme.colors.neutral['600']};\n`;\n\nexport {\n CardContainer,\n LeftSection,\n LeftAddon,\n RightAddonSection,\n RightAddon,\n Separator,\n MainSection,\n Title,\n Description,\n};\n"],
|
|
5
|
+
"mappings": "AAAA;ACAA;AACA;AAEA,MAAM,gBAAgB,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,YAOjB,CAAC,EAAE,OAAO,gBAClB,YAAY,aAAa,MAAM,OAAO,QAAQ,WAAW;AAAA;AAAA;AAAA,+BAG9B,CAAC,UAAU,MAAM,MAAM,OAAO,QAAQ;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAWrE,MAAM,cAAc,OAAO;AAAA;AAAA;AAAA;AAK3B,MAAM,YAAY,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAOzB,MAAM,oBAAoB,OAAO;AAAA;AAAA;AAAA;AAAA;AAMjC,MAAM,aAAa,OAAO;AAAA;AAAA;AAAA;AAAA;AAM1B,MAAM,YAAY,OAAO;AAAA;AAAA;AAAA,4BAGG,CAAC,UAAU,MAAM,MAAM,OAAO,QAAQ;AAAA;AAAA;AAIlE,MAAM,cAAc,OAAO;AAAA;AAAA;AAAA;AAK3B,MAAM,QAAQ,OAAO;AAAA;AAAA;AAAA,iBAGJ,CAAC,UAAU,MAAM,MAAM,YAAY;AAAA,WACzC,CAAC,UAAU,MAAM,MAAM,OAAO,QAAQ;AAAA;AAGjD,MAAM,cAAc,OAAO;AAAA;AAAA,WAEhB,CAAC,UAAU,MAAM,MAAM,OAAO,QAAQ;AAAA;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elliemae/ds-card",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.3.0-alpha.1",
|
|
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.
|
|
72
|
-
"@elliemae/ds-classnames": "2.
|
|
73
|
-
"@elliemae/ds-form": "2.
|
|
74
|
-
"@elliemae/ds-grid": "2.
|
|
75
|
-
"@elliemae/ds-header": "2.
|
|
76
|
-
"@elliemae/ds-icons": "2.
|
|
77
|
-
"@elliemae/ds-separator": "2.
|
|
78
|
-
"@elliemae/ds-system": "2.
|
|
79
|
-
"@elliemae/ds-truncated-tooltip-text": "2.
|
|
71
|
+
"@elliemae/ds-button": "2.3.0-alpha.1",
|
|
72
|
+
"@elliemae/ds-classnames": "2.3.0-alpha.1",
|
|
73
|
+
"@elliemae/ds-form": "2.3.0-alpha.1",
|
|
74
|
+
"@elliemae/ds-grid": "2.3.0-alpha.1",
|
|
75
|
+
"@elliemae/ds-header": "2.3.0-alpha.1",
|
|
76
|
+
"@elliemae/ds-icons": "2.3.0-alpha.1",
|
|
77
|
+
"@elliemae/ds-separator": "2.3.0-alpha.1",
|
|
78
|
+
"@elliemae/ds-system": "2.3.0-alpha.1",
|
|
79
|
+
"@elliemae/ds-truncated-tooltip-text": "2.3.0-alpha.1",
|
|
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
|
};
|
package/types/DSCardBody.d.ts
CHANGED
|
@@ -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
|
};
|
package/types/DSCardHeader.d.ts
CHANGED
|
@@ -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
|
};
|
package/types/v2/Card.d.ts
CHANGED
|
@@ -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
|
};
|
package/types/v2/Group.d.ts
CHANGED
|
@@ -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
|
};
|