@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.
package/esm/DSCard.js CHANGED
@@ -1,38 +1,61 @@
1
- import * as React from "react";
2
- import React2 from "react";
3
- import { PropTypes, describe } from "react-desc";
4
- import { convertPropToCssClassName } from "@elliemae/ds-classnames";
5
- import DSCardBody from "./DSCardBody";
6
- import DSCardHeader from "./DSCardHeader";
7
- const DSCard = ({
8
- innerRef = void 0,
9
- children = null,
10
- containerProps = {},
11
- ...otherProps
12
- }) => {
13
- const { cssClassName } = convertPropToCssClassName("card");
14
- return /* @__PURE__ */ React2.createElement("div", {
15
- "data-testid": "card",
16
- ...containerProps,
1
+ import 'core-js/modules/esnext.async-iterator.filter.js';
2
+ import 'core-js/modules/esnext.iterator.constructor.js';
3
+ import 'core-js/modules/esnext.iterator.filter.js';
4
+ import 'core-js/modules/esnext.async-iterator.for-each.js';
5
+ import 'core-js/modules/esnext.iterator.for-each.js';
6
+ import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
7
+ import _objectWithoutProperties from '@babel/runtime/helpers/esm/objectWithoutProperties';
8
+ import 'react';
9
+ import { PropTypes, describe } from 'react-desc';
10
+ import { convertPropToCssClassName } from '@elliemae/ds-classnames';
11
+ import { DSCardBody } from './DSCardBody.js';
12
+ import { DSCardHeader } from './DSCardHeader.js';
13
+ import { jsx } from 'react/jsx-runtime';
14
+
15
+ const _excluded = ["innerRef", "children", "containerProps"];
16
+
17
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
18
+
19
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
20
+
21
+ const DSCard = _ref => {
22
+ let {
23
+ innerRef = undefined,
24
+ children = null,
25
+ containerProps = {}
26
+ } = _ref,
27
+ otherProps = _objectWithoutProperties(_ref, _excluded);
28
+
29
+ const {
30
+ cssClassName
31
+ } = convertPropToCssClassName('card');
32
+ return /*#__PURE__*/jsx("div", _objectSpread(_objectSpread(_objectSpread({
33
+ "data-testid": "card"
34
+ }, containerProps), {}, {
17
35
  ref: innerRef,
18
- className: cssClassName,
19
- ...otherProps
20
- }, children);
36
+ className: cssClassName
37
+ }, otherProps), {}, {
38
+ children: children
39
+ }));
21
40
  };
41
+
22
42
  const cardProps = {
23
- containerProps: PropTypes.object.description("inject props to component wrapper"),
24
- innerRef: PropTypes.string.description("Get reference for the button"),
43
+ /** inject props to component wrapper */
44
+ containerProps: PropTypes.object.description('inject props to component wrapper'),
45
+
46
+ /**
47
+ * Get reference for the button
48
+ */
49
+ innerRef: PropTypes.string.description('Get reference for the button'),
50
+
51
+ /**
52
+ * DSCardBody and DSCardHeader
53
+ */
25
54
  children: PropTypes.arrayOf(PropTypes.shape({
26
55
  type: PropTypes.oneOf([DSCardHeader, DSCardBody])
27
- })).description("DSCardBody and DSCardHeader")
56
+ })).description('DSCardBody and DSCardHeader')
28
57
  };
29
- DSCard.propTypes = cardProps;
30
58
  const DSCardWithSchema = describe(DSCard);
31
59
  DSCardWithSchema.propTypes = cardProps;
32
- var DSCard_default = DSCard;
33
- export {
34
- DSCard,
35
- DSCardWithSchema,
36
- DSCard_default as default
37
- };
38
- //# sourceMappingURL=DSCard.js.map
60
+
61
+ export { DSCard, DSCardWithSchema, DSCard as default };
package/esm/DSCardBody.js CHANGED
@@ -1,20 +1,22 @@
1
- import * as React from "react";
2
- import React2 from "react";
3
- import { PropTypes, describe } from "react-desc";
4
- const DSCardBody = ({ children }) => /* @__PURE__ */ React2.createElement("div", {
5
- className: "em-ds-card-body",
6
- "data-testid": "card-body"
7
- }, children);
1
+ import _jsx from '@babel/runtime/helpers/esm/jsx';
2
+ import 'react';
3
+ import { PropTypes, describe } from 'react-desc';
4
+
5
+ const DSCardBody = _ref => {
6
+ let {
7
+ children
8
+ } = _ref;
9
+ return /*#__PURE__*/_jsx("div", {
10
+ className: "em-ds-card-body",
11
+ "data-testid": "card-body"
12
+ }, void 0, children);
13
+ };
14
+
8
15
  const bodyProps = {
9
- children: PropTypes.element.description("children")
16
+ /** children */
17
+ children: PropTypes.element.description('children')
10
18
  };
11
- DSCardBody.propTypes = bodyProps;
12
19
  const DSCardBodyWithSchema = describe(DSCardBody);
13
20
  DSCardBodyWithSchema.propTypes = bodyProps;
14
- var DSCardBody_default = DSCardBody;
15
- export {
16
- DSCardBody,
17
- DSCardBodyWithSchema,
18
- DSCardBody_default as default
19
- };
20
- //# sourceMappingURL=DSCardBody.js.map
21
+
22
+ export { DSCardBody, DSCardBodyWithSchema, DSCardBody as default };
@@ -1,30 +1,36 @@
1
- import * as React from "react";
2
- import React2 from "react";
3
- import { PropTypes, describe } from "react-desc";
4
- import { convertPropToCssClassName } from "@elliemae/ds-classnames";
5
- const DSCardHeader = ({ title, action }) => {
6
- const { cssClassName, classNameElement } = convertPropToCssClassName("card-header");
7
- return /* @__PURE__ */ React2.createElement("div", {
1
+ import _jsx from '@babel/runtime/helpers/esm/jsx';
2
+ import 'react';
3
+ import { PropTypes, describe } from 'react-desc';
4
+ import { convertPropToCssClassName } from '@elliemae/ds-classnames';
5
+
6
+ const DSCardHeader = _ref => {
7
+ let {
8
+ title,
9
+ action
10
+ } = _ref;
11
+ const {
12
+ cssClassName,
13
+ classNameElement
14
+ } = convertPropToCssClassName('card-header');
15
+ return /*#__PURE__*/_jsx("div", {
8
16
  className: cssClassName,
9
17
  "data-testid": "card-header"
10
- }, /* @__PURE__ */ React2.createElement("span", {
11
- className: classNameElement("heading")
12
- }, title), /* @__PURE__ */ React2.createElement("div", {
13
- className: classNameElement("pull-right"),
18
+ }, void 0, /*#__PURE__*/_jsx("span", {
19
+ className: classNameElement('heading')
20
+ }, void 0, title), /*#__PURE__*/_jsx("div", {
21
+ className: classNameElement('pull-right'),
14
22
  "data-testid": "ds-card_header-action"
15
- }, action));
23
+ }, void 0, action));
16
24
  };
25
+
17
26
  const cardHeader = {
18
- title: PropTypes.string.description("card header title"),
19
- action: PropTypes.node.description("action")
27
+ /** card header title */
28
+ title: PropTypes.string.description('card header title'),
29
+
30
+ /** action */
31
+ action: PropTypes.node.description('action')
20
32
  };
21
- DSCardHeader.propTypes = cardHeader;
22
33
  const DSCardHeaderWithSchema = describe(DSCardHeader);
23
34
  DSCardHeaderWithSchema.propTypes = cardHeader;
24
- var DSCardHeader_default = DSCardHeader;
25
- export {
26
- DSCardHeader,
27
- DSCardHeaderWithSchema,
28
- DSCardHeader_default as default
29
- };
30
- //# sourceMappingURL=DSCardHeader.js.map
35
+
36
+ export { DSCardHeader, DSCardHeaderWithSchema, DSCardHeader as default };
@@ -1,127 +1,188 @@
1
- import * as React from "react";
2
- import React2 from "react";
3
- import { compact, noop } from "lodash";
4
- import { PropTypes, describe } from "react-desc";
5
- import { ArrowheadDown, ArrowheadRight } from "@elliemae/ds-icons";
6
- import { useTheme } from "@elliemae/ds-system";
7
- import DSButton from "@elliemae/ds-button";
8
- import DSSeparator from "@elliemae/ds-separator";
9
- import { Grid } from "@elliemae/ds-grid";
10
- import { DSCheckbox } from "@elliemae/ds-form";
11
- import { Container, Title, Description, RightAddon, RightDescription, RightValue } from "./styled";
12
- const DetailCard = ({
13
- title,
14
- description,
15
- descriptionColor = "neutral",
16
- rightValue,
17
- rightDescription,
18
- rightAddon,
19
- selectable = false,
20
- isSelected = false,
21
- onSelect = noop,
22
- expandable = false,
23
- isExpanded = false,
24
- onExpand = noop,
25
- expandContent,
26
- readOnly = false,
27
- disabled = false
28
- }) => {
1
+ import _jsx from '@babel/runtime/helpers/esm/jsx';
2
+ import 'react';
3
+ import { compact, noop } from 'lodash';
4
+ import { PropTypes, describe } from 'react-desc';
5
+ import { ArrowheadDown, ArrowheadRight } from '@elliemae/ds-icons';
6
+ import { useTheme } from '@elliemae/ds-system';
7
+ import DSButton from '@elliemae/ds-button';
8
+ import DSSeparator from '@elliemae/ds-separator';
9
+ import { Grid } from '@elliemae/ds-grid';
10
+ import { DSCheckbox } from '@elliemae/ds-form';
11
+ import { Container, Title, Description, RightDescription, RightValue, RightAddon } from './styled.js';
12
+ import { jsx, Fragment } from 'react/jsx-runtime';
13
+
14
+ var _Grid, _DSSeparator;
15
+
16
+ const DetailCard = _ref => {
17
+ let {
18
+ title,
19
+ description,
20
+ descriptionColor = 'neutral',
21
+ rightValue,
22
+ rightDescription,
23
+ rightAddon,
24
+ // select props
25
+ selectable = false,
26
+ isSelected = false,
27
+ onSelect = noop,
28
+ // expand props
29
+ expandable = false,
30
+ isExpanded = false,
31
+ onExpand = noop,
32
+ expandContent,
33
+ // state props
34
+ readOnly = false,
35
+ disabled = false
36
+ } = _ref;
29
37
  const theme = useTheme();
30
38
  const hasRightLegend = rightValue && rightDescription;
31
39
  const hasRightPosition = hasRightLegend || rightAddon;
32
- const topWrapperCols = ["1fr"];
33
- if (hasRightPosition)
34
- topWrapperCols.push("auto");
35
- if (expandable)
36
- topWrapperCols.unshift("20px");
37
- if (selectable)
38
- topWrapperCols.unshift(theme.space.s);
39
- return /* @__PURE__ */ React2.createElement(React2.Fragment, null, /* @__PURE__ */ React2.createElement(Container, {
40
- disabled: disabled || readOnly,
41
- active: selectable && isSelected,
42
- "data-testid": "card-detail-container"
43
- }, /* @__PURE__ */ React2.createElement(Grid, {
44
- cols: topWrapperCols,
45
- alignItems: !description && "center"
46
- }, selectable && /* @__PURE__ */ React2.createElement(Grid, {
47
- pt: description && "9px"
48
- }, /* @__PURE__ */ React2.createElement(DSCheckbox, {
49
- checked: isSelected,
50
- onChange: onSelect,
51
- readOnly,
52
- disabled,
53
- "data-testid": "card-checkbox"
54
- })), expandable && /* @__PURE__ */ React2.createElement(Grid, {
55
- height: "16px",
56
- pt: description && "xxs",
57
- mt: !description && "-5px"
58
- }, /* @__PURE__ */ React2.createElement(DSButton, {
59
- size: "s",
60
- buttonType: "text",
61
- containerProps: {
62
- "data-testid": "expand-button"
63
- },
64
- onClick: onExpand,
65
- icon: isExpanded ? /* @__PURE__ */ React2.createElement(ArrowheadDown, {
66
- color: ["neutral", 500],
67
- size: "s"
68
- }) : /* @__PURE__ */ React2.createElement(ArrowheadRight, {
69
- color: ["neutral", 500],
70
- size: "s"
71
- }),
72
- disabled
73
- })), /* @__PURE__ */ React2.createElement(Grid, {
74
- pr: "24px"
75
- }, /* @__PURE__ */ React2.createElement(Title, null, title), description && /* @__PURE__ */ React2.createElement(Description, {
76
- descriptionColor
77
- }, description)), hasRightPosition && /* @__PURE__ */ React2.createElement(Grid, {
78
- cols: compact([hasRightPosition && "auto", rightAddon && "auto"])
79
- }, hasRightLegend && /* @__PURE__ */ React2.createElement(Grid, {
80
- pr: "24px",
81
- rows: ["auto", "auto", 1]
82
- }, /* @__PURE__ */ React2.createElement(RightDescription, {
83
- justifyContent: "flex-end"
84
- }, rightDescription), /* @__PURE__ */ React2.createElement(RightValue, {
85
- justifyContent: "flex-end"
86
- }, rightValue), /* @__PURE__ */ React2.createElement(Grid, null)), rightAddon && /* @__PURE__ */ React2.createElement(RightAddon, {
87
- cols: ["auto", "auto"],
88
- gutter: "2px"
89
- }, rightAddon))), expandContent && isExpanded && /* @__PURE__ */ React2.createElement(Grid, {
90
- ml: selectable && "s",
91
- mr: rightAddon && "xs"
92
- }, /* @__PURE__ */ React2.createElement(DSSeparator, {
93
- dashed: true,
94
- position: "initial",
95
- margin: "none"
96
- }), /* @__PURE__ */ React2.createElement(Grid, {
97
- pt: "xxs",
98
- "data-testid": "detail-card-expanded-content"
99
- }, expandContent))));
40
+ const topWrapperCols = ['1fr'];
41
+ if (hasRightPosition) topWrapperCols.push('auto');
42
+ if (expandable) topWrapperCols.unshift('20px');
43
+ if (selectable) topWrapperCols.unshift(theme.space.s);
44
+ return /*#__PURE__*/jsx(Fragment, {
45
+ children: /*#__PURE__*/_jsx(Container, {
46
+ disabled: disabled || readOnly,
47
+ active: selectable && isSelected,
48
+ "data-testid": "card-detail-container"
49
+ }, void 0, /*#__PURE__*/_jsx(Grid, {
50
+ cols: topWrapperCols,
51
+ alignItems: !description && 'center'
52
+ }, void 0, selectable && /*#__PURE__*/_jsx(Grid, {
53
+ pt: description && '9px'
54
+ }, void 0, /*#__PURE__*/_jsx(DSCheckbox, {
55
+ checked: isSelected,
56
+ onChange: onSelect,
57
+ readOnly: readOnly,
58
+ disabled: disabled,
59
+ "data-testid": "card-checkbox"
60
+ })), expandable && /*#__PURE__*/_jsx(Grid, {
61
+ height: "16px",
62
+ pt: description && 'xxs',
63
+ mt: !description && '-5px'
64
+ }, void 0, /*#__PURE__*/_jsx(DSButton, {
65
+ size: "s",
66
+ buttonType: "text",
67
+ containerProps: {
68
+ 'data-testid': 'expand-button'
69
+ },
70
+ onClick: onExpand,
71
+ icon: isExpanded ? /*#__PURE__*/_jsx(ArrowheadDown, {
72
+ color: ['neutral', 500],
73
+ size: "s"
74
+ }) : /*#__PURE__*/_jsx(ArrowheadRight, {
75
+ color: ['neutral', 500],
76
+ size: "s"
77
+ }),
78
+ disabled: disabled
79
+ })), /*#__PURE__*/_jsx(Grid, {
80
+ pr: "24px"
81
+ }, void 0, /*#__PURE__*/_jsx(Title, {}, void 0, title), description && /*#__PURE__*/_jsx(Description, {
82
+ descriptionColor: descriptionColor
83
+ }, void 0, description)), hasRightPosition && /*#__PURE__*/_jsx(Grid, {
84
+ cols: compact([hasRightPosition && 'auto', rightAddon && 'auto'])
85
+ }, void 0, hasRightLegend && /*#__PURE__*/_jsx(Grid, {
86
+ pr: "24px",
87
+ rows: ['auto', 'auto', 1]
88
+ }, void 0, /*#__PURE__*/_jsx(RightDescription, {
89
+ justifyContent: "flex-end"
90
+ }, void 0, rightDescription), /*#__PURE__*/_jsx(RightValue, {
91
+ justifyContent: "flex-end"
92
+ }, void 0, rightValue), _Grid || (_Grid = /*#__PURE__*/_jsx(Grid, {}))), rightAddon && /*#__PURE__*/_jsx(RightAddon, {
93
+ cols: ['auto', 'auto'],
94
+ gutter: "2px"
95
+ }, void 0, rightAddon))), expandContent && isExpanded && /*#__PURE__*/_jsx(Grid, {
96
+ ml: selectable && 's',
97
+ mr: rightAddon && 'xs'
98
+ }, void 0, _DSSeparator || (_DSSeparator = /*#__PURE__*/_jsx(DSSeparator, {
99
+ dashed: true,
100
+ position: "initial",
101
+ margin: "none"
102
+ })), /*#__PURE__*/_jsx(Grid, {
103
+ pt: "xxs",
104
+ "data-testid": "detail-card-expanded-content"
105
+ }, void 0, expandContent)))
106
+ });
100
107
  };
108
+
101
109
  const detailProps = {
102
- title: PropTypes.string.isRequired.description("Title of the card."),
103
- description: PropTypes.string.description("Description of the card."),
104
- descriptionColor: PropTypes.oneOf(["primary", "neutral"]).description("Description color."),
105
- rightValue: PropTypes.string.description("Right value (should be used with `rightDescription`)"),
106
- rightDescription: PropTypes.string.description("Right description (should be used with `rightValue`)"),
107
- rightAddon: PropTypes.element.description("Right addon array, max elements: 2"),
108
- selectable: PropTypes.bool.description("Whether if the card is selectable or not"),
109
- isSelected: PropTypes.bool.description("Whether if the card is selected or not"),
110
- onSelect: PropTypes.func.description("Callback on selection"),
111
- expandable: PropTypes.bool.description("Whether if the card is expandable or not"),
112
- isExpanded: PropTypes.bool.description("Whether if the card is expanded or not"),
113
- onExpand: PropTypes.func.description("Callback on expand"),
114
- expandContent: PropTypes.element.description("Content"),
115
- readOnly: PropTypes.bool.description("Read only"),
116
- disabled: PropTypes.bool.description("Disabled")
110
+ /**
111
+ * Title of the card.
112
+ */
113
+ title: PropTypes.string.isRequired.description('Title of the card.'),
114
+
115
+ /**
116
+ * Description of the card.
117
+ */
118
+ description: PropTypes.string.description('Description of the card.'),
119
+
120
+ /**
121
+ * Description color.
122
+ */
123
+ descriptionColor: PropTypes.oneOf(['primary', 'neutral']).description('Description color.'),
124
+
125
+ /**
126
+ * Right value (should be used with `rightDescription`)
127
+ */
128
+ rightValue: PropTypes.string.description('Right value (should be used with `rightDescription`)'),
129
+
130
+ /**
131
+ * Right description (should be used with `rightValue`)
132
+ */
133
+ rightDescription: PropTypes.string.description('Right description (should be used with `rightValue`)'),
134
+
135
+ /**
136
+ * Right addon array, max elements: 2
137
+ */
138
+ rightAddon: PropTypes.element.description('Right addon array, max elements: 2'),
139
+
140
+ /**
141
+ * Whether if the card is selectable or not
142
+ */
143
+ selectable: PropTypes.bool.description('Whether if the card is selectable or not'),
144
+
145
+ /**
146
+ * Whether if the card is selected or not
147
+ */
148
+ isSelected: PropTypes.bool.description('Whether if the card is selected or not'),
149
+
150
+ /**
151
+ * Callback on selection
152
+ */
153
+ onSelect: PropTypes.func.description('Callback on selection'),
154
+
155
+ /**
156
+ * Whether if the card is expandable or not
157
+ */
158
+ expandable: PropTypes.bool.description('Whether if the card is expandable or not'),
159
+
160
+ /**
161
+ * Whether if the card is expanded or not
162
+ */
163
+ isExpanded: PropTypes.bool.description('Whether if the card is expanded or not'),
164
+
165
+ /**
166
+ * Callback on expand
167
+ */
168
+ onExpand: PropTypes.func.description('Callback on expand'),
169
+
170
+ /**
171
+ * Content
172
+ */
173
+ expandContent: PropTypes.element.description('Content'),
174
+
175
+ /**
176
+ * Read only
177
+ */
178
+ readOnly: PropTypes.bool.description('Read only'),
179
+
180
+ /**
181
+ * Disabled
182
+ */
183
+ disabled: PropTypes.bool.description('Disabled')
117
184
  };
118
- DetailCard.propTypes = detailProps;
119
185
  const DSCardDetailWithSchema = describe(DetailCard);
120
186
  DSCardDetailWithSchema.propTypes = detailProps;
121
- var DetailCard_default = DetailCard;
122
- export {
123
- DSCardDetailWithSchema,
124
- DetailCard,
125
- DetailCard_default as default
126
- };
127
- //# sourceMappingURL=DetailCard.js.map
187
+
188
+ export { DSCardDetailWithSchema, DetailCard, DetailCard as default };
@@ -1,78 +1,46 @@
1
- import * as React from "react";
2
- import styled from "styled-components";
3
- import { Grid } from "@elliemae/ds-grid";
4
- const Separator = styled.div`
5
- width: 100%;
6
- height: 24px;
7
- border-right: 1px solid ${(props) => props.theme.colors.neutral["300"]};
8
- margin: 0 8px;
9
- `;
10
- const Title = styled.h3`
11
- margin: 0;
12
- font-size: 16px;
13
- min-height: 20px;
14
- font-weight: ${(props) => props.theme.fontWeights.semibold};
15
- color: ${(props) => props.theme.colors.neutral["700"]};
16
- `;
17
- const Description = styled.p`
18
- margin: 0;
19
- font-size: 12px;
20
- min-height: 18px;
21
- display: flex;
22
- align-items: center;
23
- color: ${(props) => props.descriptionColor === "neutral" ? props.theme.colors.neutral["600"] : props.theme.colors.brand["600"]};
24
- `;
25
- const RightAddon = styled(Grid)`
26
- margin: 0;
27
- white-space: nowrap;
28
- `;
29
- const RightDescription = styled(Grid)`
30
- margin: 0;
31
- white-space: nowrap;
32
- font-size: 12px;
33
- color: ${(props) => props.theme.colors.neutral["600"]};
34
- `;
35
- const RightValue = styled(Grid)`
36
- margin: 0;
37
- white-space: nowrap;
38
- font-size: 14px;
39
- color: ${(props) => props.theme.colors.neutral["800"]};
40
- `;
41
- const ExpandContent = styled.div`
42
- font-size: 12px;
43
- `;
44
- const border = ({ active, theme }) => active ? theme.colors.brand["600"] : theme.colors.neutral["200"];
45
- const background = ({ active, theme }) => active ? theme.colors.brand["100"] : theme.colors.neutral["000"];
46
- const Container = styled(Grid)`
47
- width: 100%;
48
- min-height: 52px;
49
- min-width: 244px;
50
- padding: 6px 8px 6px 12px;
51
- position: relative;
52
- border-top: 1px solid ${border};
53
- border-bottom: 1px solid ${border};
54
- background: ${background};
55
- ${(props) => props.disabled ? `
56
- ${Title}, ${Description}, ${RightDescription}, ${RightValue} {
57
- color: ${props.theme.colors.neutral["500"]};
58
- }
59
- ` : ""}
60
- &:hover {
61
- box-shadow: 0 2px 4px 0 rgba(53, 60, 70, 0.5);
62
- z-index: 1;
63
- }
64
- /* & + ${Container} {
65
- border-top-color: blue;
66
- } */
67
- `;
68
- export {
69
- Container,
70
- Description,
71
- ExpandContent,
72
- RightAddon,
73
- RightDescription,
74
- RightValue,
75
- Separator,
76
- Title
1
+ import styled from 'styled-components';
2
+ import { Grid } from '@elliemae/ds-grid';
3
+
4
+ const Separator = /*#__PURE__*/styled.div.withConfig({
5
+ componentId: "sc-nx8lwv-0"
6
+ })(["width:100%;height:24px;border-right:1px solid ", ";margin:0 8px;"], props => props.theme.colors.neutral['300']);
7
+ const Title = /*#__PURE__*/styled.h3.withConfig({
8
+ componentId: "sc-nx8lwv-1"
9
+ })(["margin:0;font-size:16px;min-height:20px;font-weight:", ";color:", ";"], props => props.theme.fontWeights.semibold, props => props.theme.colors.neutral['700']);
10
+ const Description = /*#__PURE__*/styled.p.withConfig({
11
+ componentId: "sc-nx8lwv-2"
12
+ })(["margin:0;font-size:12px;min-height:18px;display:flex;align-items:center;color:", ";"], props => props.descriptionColor === 'neutral' ? props.theme.colors.neutral['600'] : props.theme.colors.brand['600']);
13
+ const RightAddon = /*#__PURE__*/styled(Grid).withConfig({
14
+ componentId: "sc-nx8lwv-3"
15
+ })(["margin:0;white-space:nowrap;"]);
16
+ const RightDescription = /*#__PURE__*/styled(Grid).withConfig({
17
+ componentId: "sc-nx8lwv-4"
18
+ })(["margin:0;white-space:nowrap;font-size:12px;color:", ";"], props => props.theme.colors.neutral['600']);
19
+ const RightValue = /*#__PURE__*/styled(Grid).withConfig({
20
+ componentId: "sc-nx8lwv-5"
21
+ })(["margin:0;white-space:nowrap;font-size:14px;color:", ";"], props => props.theme.colors.neutral['800']);
22
+ const ExpandContent = /*#__PURE__*/styled.div.withConfig({
23
+ componentId: "sc-nx8lwv-6"
24
+ })(["font-size:12px;"]);
25
+
26
+ const border = _ref => {
27
+ let {
28
+ active,
29
+ theme
30
+ } = _ref;
31
+ return active ? theme.colors.brand['600'] : theme.colors.neutral['200'];
77
32
  };
78
- //# sourceMappingURL=styled.js.map
33
+
34
+ const background = _ref2 => {
35
+ let {
36
+ active,
37
+ theme
38
+ } = _ref2;
39
+ return active ? theme.colors.brand['100'] : theme.colors.neutral['000'];
40
+ };
41
+
42
+ const Container = /*#__PURE__*/styled(Grid).withConfig({
43
+ componentId: "sc-nx8lwv-7"
44
+ })(["width:100%;min-height:52px;min-width:244px;padding:6px 8px 6px 12px;position:relative;border-top:1px solid ", ";border-bottom:1px solid ", ";background:", ";", " &:hover{box-shadow:0 2px 4px 0 rgba(53,60,70,0.5);z-index:1;}"], border, border, background, props => props.disabled ? "\n ".concat(Title, ", ").concat(Description, ", ").concat(RightDescription, ", ").concat(RightValue, " {\n color: ").concat(props.theme.colors.neutral['500'], ";\n }\n ") : '');
45
+
46
+ export { Container, Description, ExpandContent, RightAddon, RightDescription, RightValue, Separator, Title };
package/esm/index.js CHANGED
@@ -1,13 +1,7 @@
1
- import * as React from "react";
2
- export * from "./DSCard";
3
- export * from "./DSCardHeader";
4
- export * from "./DSCardBody";
5
- export * from "./v2/Card";
6
- export * from "./v2/Group";
7
- export * from "./v2/ActionAddon";
8
- export * from "./detail/DetailCard";
9
- import { default as default2 } from "./DSCard";
10
- export {
11
- default2 as default
12
- };
13
- //# sourceMappingURL=index.js.map
1
+ export { DSCard, DSCardWithSchema, DSCard as default } from './DSCard.js';
2
+ export { DSCardHeader, DSCardHeaderWithSchema } from './DSCardHeader.js';
3
+ export { DSCardBody, DSCardBodyWithSchema } from './DSCardBody.js';
4
+ export { CustomCard, DSCardCustomWithSchema } from './v2/Card.js';
5
+ export { CardGroup, DSCardGroupWithSchema } from './v2/Group.js';
6
+ export { ActionAddon, DSCardActionAddonWithSchema } from './v2/ActionAddon.js';
7
+ export { DSCardDetailWithSchema, DetailCard } from './detail/DetailCard.js';