@elliemae/ds-card 2.2.0-alpha.4 → 3.0.0-next.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cjs/DSCard.js +67 -62
- package/cjs/DSCardBody.js +28 -45
- package/cjs/DSCardHeader.js +39 -52
- package/cjs/detail/DetailCard.js +194 -150
- package/cjs/detail/styled.js +59 -105
- package/cjs/index.js +29 -42
- package/cjs/v2/ActionAddon.js +54 -69
- package/cjs/v2/Card.js +83 -77
- package/cjs/v2/Group.js +64 -77
- package/cjs/v2/components.js +54 -104
- package/esm/DSCard.js +53 -30
- package/esm/DSCardBody.js +18 -16
- package/esm/DSCardHeader.js +28 -22
- package/esm/detail/DetailCard.js +180 -119
- package/esm/detail/styled.js +45 -77
- package/esm/index.js +7 -13
- package/esm/v2/ActionAddon.js +42 -40
- package/esm/v2/Card.js +72 -59
- package/esm/v2/Group.js +53 -48
- package/esm/v2/components.js +38 -75
- package/package.json +10 -10
- package/cjs/DSCard.js.map +0 -7
- package/cjs/DSCardBody.js.map +0 -7
- package/cjs/DSCardHeader.js.map +0 -7
- package/cjs/detail/DetailCard.js.map +0 -7
- package/cjs/detail/styled.js.map +0 -7
- package/cjs/index.js.map +0 -7
- package/cjs/v2/ActionAddon.js.map +0 -7
- package/cjs/v2/Card.js.map +0 -7
- package/cjs/v2/Group.js.map +0 -7
- package/cjs/v2/components.js.map +0 -7
- package/esm/DSCard.js.map +0 -7
- package/esm/DSCardBody.js.map +0 -7
- package/esm/DSCardHeader.js.map +0 -7
- package/esm/detail/DetailCard.js.map +0 -7
- package/esm/detail/styled.js.map +0 -7
- package/esm/index.js.map +0 -7
- package/esm/v2/ActionAddon.js.map +0 -7
- package/esm/v2/Card.js.map +0 -7
- package/esm/v2/Group.js.map +0 -7
- package/esm/v2/components.js.map +0 -7
package/cjs/detail/DetailCard.js
CHANGED
|
@@ -1,156 +1,200 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
var
|
|
6
|
-
|
|
7
|
-
var
|
|
8
|
-
var
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
var
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
var
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
descriptionColor = "neutral",
|
|
49
|
-
rightValue,
|
|
50
|
-
rightDescription,
|
|
51
|
-
rightAddon,
|
|
52
|
-
selectable = false,
|
|
53
|
-
isSelected = false,
|
|
54
|
-
onSelect = import_lodash.noop,
|
|
55
|
-
expandable = false,
|
|
56
|
-
isExpanded = false,
|
|
57
|
-
onExpand = import_lodash.noop,
|
|
58
|
-
expandContent,
|
|
59
|
-
readOnly = false,
|
|
60
|
-
disabled = false
|
|
61
|
-
}) => {
|
|
62
|
-
const theme = (0, import_ds_system.useTheme)();
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var _jsx = require('@babel/runtime/helpers/jsx');
|
|
6
|
+
require('react');
|
|
7
|
+
var lodash = require('lodash');
|
|
8
|
+
var reactDesc = require('react-desc');
|
|
9
|
+
var dsIcons = require('@elliemae/ds-icons');
|
|
10
|
+
var dsSystem = require('@elliemae/ds-system');
|
|
11
|
+
var DSButton = require('@elliemae/ds-button');
|
|
12
|
+
var DSSeparator = require('@elliemae/ds-separator');
|
|
13
|
+
var dsGrid = require('@elliemae/ds-grid');
|
|
14
|
+
var dsForm = require('@elliemae/ds-form');
|
|
15
|
+
var styled = require('./styled.js');
|
|
16
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
17
|
+
|
|
18
|
+
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
19
|
+
|
|
20
|
+
var _jsx__default = /*#__PURE__*/_interopDefaultLegacy(_jsx);
|
|
21
|
+
var DSButton__default = /*#__PURE__*/_interopDefaultLegacy(DSButton);
|
|
22
|
+
var DSSeparator__default = /*#__PURE__*/_interopDefaultLegacy(DSSeparator);
|
|
23
|
+
|
|
24
|
+
var _Grid, _DSSeparator;
|
|
25
|
+
|
|
26
|
+
const DetailCard = _ref => {
|
|
27
|
+
let {
|
|
28
|
+
title,
|
|
29
|
+
description,
|
|
30
|
+
descriptionColor = 'neutral',
|
|
31
|
+
rightValue,
|
|
32
|
+
rightDescription,
|
|
33
|
+
rightAddon,
|
|
34
|
+
// select props
|
|
35
|
+
selectable = false,
|
|
36
|
+
isSelected = false,
|
|
37
|
+
onSelect = lodash.noop,
|
|
38
|
+
// expand props
|
|
39
|
+
expandable = false,
|
|
40
|
+
isExpanded = false,
|
|
41
|
+
onExpand = lodash.noop,
|
|
42
|
+
expandContent,
|
|
43
|
+
// state props
|
|
44
|
+
readOnly = false,
|
|
45
|
+
disabled = false
|
|
46
|
+
} = _ref;
|
|
47
|
+
const theme = dsSystem.useTheme();
|
|
63
48
|
const hasRightLegend = rightValue && rightDescription;
|
|
64
49
|
const hasRightPosition = hasRightLegend || rightAddon;
|
|
65
|
-
const topWrapperCols = [
|
|
66
|
-
if (hasRightPosition)
|
|
67
|
-
|
|
68
|
-
if (
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
}),
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
}, expandContent))));
|
|
50
|
+
const topWrapperCols = ['1fr'];
|
|
51
|
+
if (hasRightPosition) topWrapperCols.push('auto');
|
|
52
|
+
if (expandable) topWrapperCols.unshift('20px');
|
|
53
|
+
if (selectable) topWrapperCols.unshift(theme.space.s);
|
|
54
|
+
return /*#__PURE__*/jsxRuntime.jsx(jsxRuntime.Fragment, {
|
|
55
|
+
children: /*#__PURE__*/_jsx__default["default"](styled.Container, {
|
|
56
|
+
disabled: disabled || readOnly,
|
|
57
|
+
active: selectable && isSelected,
|
|
58
|
+
"data-testid": "card-detail-container"
|
|
59
|
+
}, void 0, /*#__PURE__*/_jsx__default["default"](dsGrid.Grid, {
|
|
60
|
+
cols: topWrapperCols,
|
|
61
|
+
alignItems: !description && 'center'
|
|
62
|
+
}, void 0, selectable && /*#__PURE__*/_jsx__default["default"](dsGrid.Grid, {
|
|
63
|
+
pt: description && '9px'
|
|
64
|
+
}, void 0, /*#__PURE__*/_jsx__default["default"](dsForm.DSCheckbox, {
|
|
65
|
+
checked: isSelected,
|
|
66
|
+
onChange: onSelect,
|
|
67
|
+
readOnly: readOnly,
|
|
68
|
+
disabled: disabled,
|
|
69
|
+
"data-testid": "card-checkbox"
|
|
70
|
+
})), expandable && /*#__PURE__*/_jsx__default["default"](dsGrid.Grid, {
|
|
71
|
+
height: "16px",
|
|
72
|
+
pt: description && 'xxs',
|
|
73
|
+
mt: !description && '-5px'
|
|
74
|
+
}, void 0, /*#__PURE__*/_jsx__default["default"](DSButton__default["default"], {
|
|
75
|
+
size: "s",
|
|
76
|
+
buttonType: "text",
|
|
77
|
+
containerProps: {
|
|
78
|
+
'data-testid': 'expand-button'
|
|
79
|
+
},
|
|
80
|
+
onClick: onExpand,
|
|
81
|
+
icon: isExpanded ? /*#__PURE__*/_jsx__default["default"](dsIcons.ArrowheadDown, {
|
|
82
|
+
color: ['neutral', 500],
|
|
83
|
+
size: "s"
|
|
84
|
+
}) : /*#__PURE__*/_jsx__default["default"](dsIcons.ArrowheadRight, {
|
|
85
|
+
color: ['neutral', 500],
|
|
86
|
+
size: "s"
|
|
87
|
+
}),
|
|
88
|
+
disabled: disabled
|
|
89
|
+
})), /*#__PURE__*/_jsx__default["default"](dsGrid.Grid, {
|
|
90
|
+
pr: "24px"
|
|
91
|
+
}, void 0, /*#__PURE__*/_jsx__default["default"](styled.Title, {}, void 0, title), description && /*#__PURE__*/_jsx__default["default"](styled.Description, {
|
|
92
|
+
descriptionColor: descriptionColor
|
|
93
|
+
}, void 0, description)), hasRightPosition && /*#__PURE__*/_jsx__default["default"](dsGrid.Grid, {
|
|
94
|
+
cols: lodash.compact([hasRightPosition && 'auto', rightAddon && 'auto'])
|
|
95
|
+
}, void 0, hasRightLegend && /*#__PURE__*/_jsx__default["default"](dsGrid.Grid, {
|
|
96
|
+
pr: "24px",
|
|
97
|
+
rows: ['auto', 'auto', 1]
|
|
98
|
+
}, void 0, /*#__PURE__*/_jsx__default["default"](styled.RightDescription, {
|
|
99
|
+
justifyContent: "flex-end"
|
|
100
|
+
}, void 0, rightDescription), /*#__PURE__*/_jsx__default["default"](styled.RightValue, {
|
|
101
|
+
justifyContent: "flex-end"
|
|
102
|
+
}, void 0, rightValue), _Grid || (_Grid = /*#__PURE__*/_jsx__default["default"](dsGrid.Grid, {}))), rightAddon && /*#__PURE__*/_jsx__default["default"](styled.RightAddon, {
|
|
103
|
+
cols: ['auto', 'auto'],
|
|
104
|
+
gutter: "2px"
|
|
105
|
+
}, void 0, rightAddon))), expandContent && isExpanded && /*#__PURE__*/_jsx__default["default"](dsGrid.Grid, {
|
|
106
|
+
ml: selectable && 's',
|
|
107
|
+
mr: rightAddon && 'xs'
|
|
108
|
+
}, void 0, _DSSeparator || (_DSSeparator = /*#__PURE__*/_jsx__default["default"](DSSeparator__default["default"], {
|
|
109
|
+
dashed: true,
|
|
110
|
+
position: "initial",
|
|
111
|
+
margin: "none"
|
|
112
|
+
})), /*#__PURE__*/_jsx__default["default"](dsGrid.Grid, {
|
|
113
|
+
pt: "xxs",
|
|
114
|
+
"data-testid": "detail-card-expanded-content"
|
|
115
|
+
}, void 0, expandContent)))
|
|
116
|
+
});
|
|
133
117
|
};
|
|
118
|
+
|
|
134
119
|
const detailProps = {
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
120
|
+
/**
|
|
121
|
+
* Title of the card.
|
|
122
|
+
*/
|
|
123
|
+
title: reactDesc.PropTypes.string.isRequired.description('Title of the card.'),
|
|
124
|
+
|
|
125
|
+
/**
|
|
126
|
+
* Description of the card.
|
|
127
|
+
*/
|
|
128
|
+
description: reactDesc.PropTypes.string.description('Description of the card.'),
|
|
129
|
+
|
|
130
|
+
/**
|
|
131
|
+
* Description color.
|
|
132
|
+
*/
|
|
133
|
+
descriptionColor: reactDesc.PropTypes.oneOf(['primary', 'neutral']).description('Description color.'),
|
|
134
|
+
|
|
135
|
+
/**
|
|
136
|
+
* Right value (should be used with `rightDescription`)
|
|
137
|
+
*/
|
|
138
|
+
rightValue: reactDesc.PropTypes.string.description('Right value (should be used with `rightDescription`)'),
|
|
139
|
+
|
|
140
|
+
/**
|
|
141
|
+
* Right description (should be used with `rightValue`)
|
|
142
|
+
*/
|
|
143
|
+
rightDescription: reactDesc.PropTypes.string.description('Right description (should be used with `rightValue`)'),
|
|
144
|
+
|
|
145
|
+
/**
|
|
146
|
+
* Right addon array, max elements: 2
|
|
147
|
+
*/
|
|
148
|
+
rightAddon: reactDesc.PropTypes.element.description('Right addon array, max elements: 2'),
|
|
149
|
+
|
|
150
|
+
/**
|
|
151
|
+
* Whether if the card is selectable or not
|
|
152
|
+
*/
|
|
153
|
+
selectable: reactDesc.PropTypes.bool.description('Whether if the card is selectable or not'),
|
|
154
|
+
|
|
155
|
+
/**
|
|
156
|
+
* Whether if the card is selected or not
|
|
157
|
+
*/
|
|
158
|
+
isSelected: reactDesc.PropTypes.bool.description('Whether if the card is selected or not'),
|
|
159
|
+
|
|
160
|
+
/**
|
|
161
|
+
* Callback on selection
|
|
162
|
+
*/
|
|
163
|
+
onSelect: reactDesc.PropTypes.func.description('Callback on selection'),
|
|
164
|
+
|
|
165
|
+
/**
|
|
166
|
+
* Whether if the card is expandable or not
|
|
167
|
+
*/
|
|
168
|
+
expandable: reactDesc.PropTypes.bool.description('Whether if the card is expandable or not'),
|
|
169
|
+
|
|
170
|
+
/**
|
|
171
|
+
* Whether if the card is expanded or not
|
|
172
|
+
*/
|
|
173
|
+
isExpanded: reactDesc.PropTypes.bool.description('Whether if the card is expanded or not'),
|
|
174
|
+
|
|
175
|
+
/**
|
|
176
|
+
* Callback on expand
|
|
177
|
+
*/
|
|
178
|
+
onExpand: reactDesc.PropTypes.func.description('Callback on expand'),
|
|
179
|
+
|
|
180
|
+
/**
|
|
181
|
+
* Content
|
|
182
|
+
*/
|
|
183
|
+
expandContent: reactDesc.PropTypes.element.description('Content'),
|
|
184
|
+
|
|
185
|
+
/**
|
|
186
|
+
* Read only
|
|
187
|
+
*/
|
|
188
|
+
readOnly: reactDesc.PropTypes.bool.description('Read only'),
|
|
189
|
+
|
|
190
|
+
/**
|
|
191
|
+
* Disabled
|
|
192
|
+
*/
|
|
193
|
+
disabled: reactDesc.PropTypes.bool.description('Disabled')
|
|
150
194
|
};
|
|
151
|
-
|
|
152
|
-
const DSCardDetailWithSchema = (0, import_react_desc.describe)(DetailCard);
|
|
195
|
+
const DSCardDetailWithSchema = reactDesc.describe(DetailCard);
|
|
153
196
|
DSCardDetailWithSchema.propTypes = detailProps;
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
197
|
+
|
|
198
|
+
exports.DSCardDetailWithSchema = DSCardDetailWithSchema;
|
|
199
|
+
exports.DetailCard = DetailCard;
|
|
200
|
+
exports["default"] = DetailCard;
|
package/cjs/detail/styled.js
CHANGED
|
@@ -1,107 +1,61 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
var
|
|
6
|
-
var
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var styled = require('styled-components');
|
|
6
|
+
var dsGrid = require('@elliemae/ds-grid');
|
|
7
|
+
|
|
8
|
+
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
9
|
+
|
|
10
|
+
var styled__default = /*#__PURE__*/_interopDefaultLegacy(styled);
|
|
11
|
+
|
|
12
|
+
const Separator = /*#__PURE__*/styled__default["default"].div.withConfig({
|
|
13
|
+
componentId: "sc-nx8lwv-0"
|
|
14
|
+
})(["width:100%;height:24px;border-right:1px solid ", ";margin:0 8px;"], props => props.theme.colors.neutral['300']);
|
|
15
|
+
const Title = /*#__PURE__*/styled__default["default"].h3.withConfig({
|
|
16
|
+
componentId: "sc-nx8lwv-1"
|
|
17
|
+
})(["margin:0;font-size:16px;min-height:20px;font-weight:", ";color:", ";"], props => props.theme.fontWeights.semibold, props => props.theme.colors.neutral['700']);
|
|
18
|
+
const Description = /*#__PURE__*/styled__default["default"].p.withConfig({
|
|
19
|
+
componentId: "sc-nx8lwv-2"
|
|
20
|
+
})(["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']);
|
|
21
|
+
const RightAddon = /*#__PURE__*/styled__default["default"](dsGrid.Grid).withConfig({
|
|
22
|
+
componentId: "sc-nx8lwv-3"
|
|
23
|
+
})(["margin:0;white-space:nowrap;"]);
|
|
24
|
+
const RightDescription = /*#__PURE__*/styled__default["default"](dsGrid.Grid).withConfig({
|
|
25
|
+
componentId: "sc-nx8lwv-4"
|
|
26
|
+
})(["margin:0;white-space:nowrap;font-size:12px;color:", ";"], props => props.theme.colors.neutral['600']);
|
|
27
|
+
const RightValue = /*#__PURE__*/styled__default["default"](dsGrid.Grid).withConfig({
|
|
28
|
+
componentId: "sc-nx8lwv-5"
|
|
29
|
+
})(["margin:0;white-space:nowrap;font-size:14px;color:", ";"], props => props.theme.colors.neutral['800']);
|
|
30
|
+
const ExpandContent = /*#__PURE__*/styled__default["default"].div.withConfig({
|
|
31
|
+
componentId: "sc-nx8lwv-6"
|
|
32
|
+
})(["font-size:12px;"]);
|
|
33
|
+
|
|
34
|
+
const border = _ref => {
|
|
35
|
+
let {
|
|
36
|
+
active,
|
|
37
|
+
theme
|
|
38
|
+
} = _ref;
|
|
39
|
+
return active ? theme.colors.brand['600'] : theme.colors.neutral['200'];
|
|
11
40
|
};
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
}
|
|
18
|
-
return
|
|
41
|
+
|
|
42
|
+
const background = _ref2 => {
|
|
43
|
+
let {
|
|
44
|
+
active,
|
|
45
|
+
theme
|
|
46
|
+
} = _ref2;
|
|
47
|
+
return active ? theme.colors.brand['100'] : theme.colors.neutral['000'];
|
|
19
48
|
};
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
RightAddon: () => RightAddon,
|
|
34
|
-
RightDescription: () => RightDescription,
|
|
35
|
-
RightValue: () => RightValue,
|
|
36
|
-
Separator: () => Separator,
|
|
37
|
-
Title: () => Title
|
|
38
|
-
});
|
|
39
|
-
var React = __toESM(require("react"));
|
|
40
|
-
var import_styled_components = __toESM(require("styled-components"));
|
|
41
|
-
var import_ds_grid = require("@elliemae/ds-grid");
|
|
42
|
-
const Separator = import_styled_components.default.div`
|
|
43
|
-
width: 100%;
|
|
44
|
-
height: 24px;
|
|
45
|
-
border-right: 1px solid ${(props) => props.theme.colors.neutral["300"]};
|
|
46
|
-
margin: 0 8px;
|
|
47
|
-
`;
|
|
48
|
-
const Title = import_styled_components.default.h3`
|
|
49
|
-
margin: 0;
|
|
50
|
-
font-size: 16px;
|
|
51
|
-
min-height: 20px;
|
|
52
|
-
font-weight: ${(props) => props.theme.fontWeights.semibold};
|
|
53
|
-
color: ${(props) => props.theme.colors.neutral["700"]};
|
|
54
|
-
`;
|
|
55
|
-
const Description = import_styled_components.default.p`
|
|
56
|
-
margin: 0;
|
|
57
|
-
font-size: 12px;
|
|
58
|
-
min-height: 18px;
|
|
59
|
-
display: flex;
|
|
60
|
-
align-items: center;
|
|
61
|
-
color: ${(props) => props.descriptionColor === "neutral" ? props.theme.colors.neutral["600"] : props.theme.colors.brand["600"]};
|
|
62
|
-
`;
|
|
63
|
-
const RightAddon = (0, import_styled_components.default)(import_ds_grid.Grid)`
|
|
64
|
-
margin: 0;
|
|
65
|
-
white-space: nowrap;
|
|
66
|
-
`;
|
|
67
|
-
const RightDescription = (0, import_styled_components.default)(import_ds_grid.Grid)`
|
|
68
|
-
margin: 0;
|
|
69
|
-
white-space: nowrap;
|
|
70
|
-
font-size: 12px;
|
|
71
|
-
color: ${(props) => props.theme.colors.neutral["600"]};
|
|
72
|
-
`;
|
|
73
|
-
const RightValue = (0, import_styled_components.default)(import_ds_grid.Grid)`
|
|
74
|
-
margin: 0;
|
|
75
|
-
white-space: nowrap;
|
|
76
|
-
font-size: 14px;
|
|
77
|
-
color: ${(props) => props.theme.colors.neutral["800"]};
|
|
78
|
-
`;
|
|
79
|
-
const ExpandContent = import_styled_components.default.div`
|
|
80
|
-
font-size: 12px;
|
|
81
|
-
`;
|
|
82
|
-
const border = ({ active, theme }) => active ? theme.colors.brand["600"] : theme.colors.neutral["200"];
|
|
83
|
-
const background = ({ active, theme }) => active ? theme.colors.brand["100"] : theme.colors.neutral["000"];
|
|
84
|
-
const Container = (0, import_styled_components.default)(import_ds_grid.Grid)`
|
|
85
|
-
width: 100%;
|
|
86
|
-
min-height: 52px;
|
|
87
|
-
min-width: 244px;
|
|
88
|
-
padding: 6px 8px 6px 12px;
|
|
89
|
-
position: relative;
|
|
90
|
-
border-top: 1px solid ${border};
|
|
91
|
-
border-bottom: 1px solid ${border};
|
|
92
|
-
background: ${background};
|
|
93
|
-
${(props) => props.disabled ? `
|
|
94
|
-
${Title}, ${Description}, ${RightDescription}, ${RightValue} {
|
|
95
|
-
color: ${props.theme.colors.neutral["500"]};
|
|
96
|
-
}
|
|
97
|
-
` : ""}
|
|
98
|
-
&:hover {
|
|
99
|
-
box-shadow: 0 2px 4px 0 rgba(53, 60, 70, 0.5);
|
|
100
|
-
z-index: 1;
|
|
101
|
-
}
|
|
102
|
-
/* & + ${Container} {
|
|
103
|
-
border-top-color: blue;
|
|
104
|
-
} */
|
|
105
|
-
`;
|
|
106
|
-
module.exports = __toCommonJS(styled_exports);
|
|
107
|
-
//# sourceMappingURL=styled.js.map
|
|
49
|
+
|
|
50
|
+
const Container = /*#__PURE__*/styled__default["default"](dsGrid.Grid).withConfig({
|
|
51
|
+
componentId: "sc-nx8lwv-7"
|
|
52
|
+
})(["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 ") : '');
|
|
53
|
+
|
|
54
|
+
exports.Container = Container;
|
|
55
|
+
exports.Description = Description;
|
|
56
|
+
exports.ExpandContent = ExpandContent;
|
|
57
|
+
exports.RightAddon = RightAddon;
|
|
58
|
+
exports.RightDescription = RightDescription;
|
|
59
|
+
exports.RightValue = RightValue;
|
|
60
|
+
exports.Separator = Separator;
|
|
61
|
+
exports.Title = Title;
|
package/cjs/index.js
CHANGED
|
@@ -1,42 +1,29 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
var
|
|
6
|
-
var
|
|
7
|
-
var
|
|
8
|
-
var
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
default: () => import_DSCard.default
|
|
31
|
-
});
|
|
32
|
-
var React = __toESM(require("react"));
|
|
33
|
-
__reExport(src_exports, require("./DSCard"));
|
|
34
|
-
__reExport(src_exports, require("./DSCardHeader"));
|
|
35
|
-
__reExport(src_exports, require("./DSCardBody"));
|
|
36
|
-
__reExport(src_exports, require("./v2/Card"));
|
|
37
|
-
__reExport(src_exports, require("./v2/Group"));
|
|
38
|
-
__reExport(src_exports, require("./v2/ActionAddon"));
|
|
39
|
-
__reExport(src_exports, require("./detail/DetailCard"));
|
|
40
|
-
var import_DSCard = require("./DSCard");
|
|
41
|
-
module.exports = __toCommonJS(src_exports);
|
|
42
|
-
//# sourceMappingURL=index.js.map
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var DSCard = require('./DSCard.js');
|
|
6
|
+
var DSCardHeader = require('./DSCardHeader.js');
|
|
7
|
+
var DSCardBody = require('./DSCardBody.js');
|
|
8
|
+
var Card = require('./v2/Card.js');
|
|
9
|
+
var Group = require('./v2/Group.js');
|
|
10
|
+
var ActionAddon = require('./v2/ActionAddon.js');
|
|
11
|
+
var DetailCard = require('./detail/DetailCard.js');
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
exports.DSCard = DSCard.DSCard;
|
|
16
|
+
exports.DSCardWithSchema = DSCard.DSCardWithSchema;
|
|
17
|
+
exports["default"] = DSCard.DSCard;
|
|
18
|
+
exports.DSCardHeader = DSCardHeader.DSCardHeader;
|
|
19
|
+
exports.DSCardHeaderWithSchema = DSCardHeader.DSCardHeaderWithSchema;
|
|
20
|
+
exports.DSCardBody = DSCardBody.DSCardBody;
|
|
21
|
+
exports.DSCardBodyWithSchema = DSCardBody.DSCardBodyWithSchema;
|
|
22
|
+
exports.CustomCard = Card.CustomCard;
|
|
23
|
+
exports.DSCardCustomWithSchema = Card.DSCardCustomWithSchema;
|
|
24
|
+
exports.CardGroup = Group.CardGroup;
|
|
25
|
+
exports.DSCardGroupWithSchema = Group.DSCardGroupWithSchema;
|
|
26
|
+
exports.ActionAddon = ActionAddon.ActionAddon;
|
|
27
|
+
exports.DSCardActionAddonWithSchema = ActionAddon.DSCardActionAddonWithSchema;
|
|
28
|
+
exports.DSCardDetailWithSchema = DetailCard.DSCardDetailWithSchema;
|
|
29
|
+
exports.DetailCard = DetailCard.DetailCard;
|