@elliemae/ds-group-box 1.60.0 → 2.0.0-alpha.12
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/ActionItem.js +9 -15
- package/cjs/Actions.js +15 -27
- package/cjs/DSGroupBox.js +63 -74
- package/cjs/GroupBoxLabel.js +18 -42
- package/cjs/LabelElement.js +9 -15
- package/cjs/components/GroupHeader.js +25 -30
- package/cjs/components/blocks.js +42 -36
- package/cjs/constants.js +2 -3
- package/cjs/index.js +1 -18
- package/esm/ActionItem.js +8 -13
- package/esm/Actions.js +13 -24
- package/esm/DSGroupBox.js +57 -68
- package/esm/GroupBoxLabel.js +17 -40
- package/esm/LabelElement.js +8 -13
- package/esm/components/GroupHeader.js +24 -29
- package/esm/components/blocks.js +42 -32
- package/esm/constants.js +2 -3
- package/esm/index.js +0 -17
- package/package.json +66 -14
- package/types/ActionItem.d.ts +11 -0
- package/types/Actions.d.ts +16 -0
- package/types/DSGroupBox.d.ts +129 -0
- package/types/GroupBoxLabel.d.ts +21 -0
- package/types/LabelElement.d.ts +11 -0
- package/types/components/GroupHeader.d.ts +13 -0
- package/types/components/blocks.d.ts +4 -0
- package/types/constants.d.ts +5 -0
- package/types/index.d.ts +3 -0
- package/types/tests/DSGroupBox.test.d.ts +1 -0
- package/ActionItem/package.json +0 -10
- package/Actions/package.json +0 -10
- package/DSGroupBox/package.json +0 -10
- package/GroupBoxLabel/package.json +0 -10
- package/LabelElement/package.json +0 -10
- package/cjs/ActionItem.js.map +0 -1
- package/cjs/Actions.js.map +0 -1
- package/cjs/DSGroupBox.js.map +0 -1
- package/cjs/GroupBoxLabel.js.map +0 -1
- package/cjs/LabelElement.js.map +0 -1
- package/cjs/components/GroupHeader.js.map +0 -1
- package/cjs/components/blocks.js.map +0 -1
- package/cjs/constants.js.map +0 -1
- package/cjs/index.js.map +0 -1
- package/components/GroupHeader/package.json +0 -10
- package/components/blocks/package.json +0 -10
- package/constants/package.json +0 -10
- package/esm/ActionItem.js.map +0 -1
- package/esm/Actions.js.map +0 -1
- package/esm/DSGroupBox.js.map +0 -1
- package/esm/GroupBoxLabel.js.map +0 -1
- package/esm/LabelElement.js.map +0 -1
- package/esm/components/GroupHeader.js.map +0 -1
- package/esm/components/blocks.js.map +0 -1
- package/esm/constants.js.map +0 -1
- package/esm/index.js.map +0 -1
package/cjs/ActionItem.js
CHANGED
|
@@ -1,30 +1,24 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _jsx = require('@babel/runtime/helpers/jsx');
|
|
4
|
+
require('react');
|
|
4
5
|
var styled = require('styled-components');
|
|
5
6
|
var dsSystem = require('@elliemae/ds-system');
|
|
6
|
-
var PropTypes = require('prop-types');
|
|
7
7
|
|
|
8
8
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
9
9
|
|
|
10
|
-
var
|
|
10
|
+
var _jsx__default = /*#__PURE__*/_interopDefaultLegacy(_jsx);
|
|
11
11
|
var styled__default = /*#__PURE__*/_interopDefaultLegacy(styled);
|
|
12
|
-
var PropTypes__default = /*#__PURE__*/_interopDefaultLegacy(PropTypes);
|
|
13
12
|
|
|
14
|
-
|
|
13
|
+
const ActionItemNode = /*#__PURE__*/styled__default["default"].div.withConfig({
|
|
15
14
|
componentId: "sc-1ysc0gb-0"
|
|
16
|
-
})(["padding-right:", ";font-weight:300;overflow:hidden;align-items:center;display:flex;&:last-child{padding-right:0;}"],
|
|
17
|
-
return dsSystem.__UNSAFE_SPACE_TO_DIMSUM(props.theme.space.xs);
|
|
18
|
-
});
|
|
15
|
+
})(["padding-right:", ";font-weight:300;overflow:hidden;align-items:center;display:flex;&:last-child{padding-right:0;}"], props => dsSystem.__UNSAFE_SPACE_TO_DIMSUM(props.theme.space.xs));
|
|
19
16
|
|
|
20
17
|
function ActionItem(_ref) {
|
|
21
|
-
|
|
22
|
-
|
|
18
|
+
let {
|
|
19
|
+
children
|
|
20
|
+
} = _ref;
|
|
21
|
+
return /*#__PURE__*/_jsx__default["default"](ActionItemNode, {}, void 0, children);
|
|
23
22
|
}
|
|
24
23
|
|
|
25
|
-
ActionItem.propTypes = {
|
|
26
|
-
children: PropTypes__default['default'].node.isRequired
|
|
27
|
-
};
|
|
28
|
-
|
|
29
24
|
module.exports = ActionItem;
|
|
30
|
-
//# sourceMappingURL=ActionItem.js.map
|
package/cjs/Actions.js
CHANGED
|
@@ -2,8 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var
|
|
6
|
-
|
|
5
|
+
var _jsx = require('@babel/runtime/helpers/jsx');
|
|
6
|
+
require('core-js/modules/esnext.async-iterator.map.js');
|
|
7
|
+
require('core-js/modules/esnext.iterator.map.js');
|
|
8
|
+
require('react');
|
|
7
9
|
var styled = require('styled-components');
|
|
8
10
|
var styledSystem = require('styled-system');
|
|
9
11
|
var dsSystem = require('@elliemae/ds-system');
|
|
@@ -11,39 +13,25 @@ var ActionItem = require('./ActionItem.js');
|
|
|
11
13
|
|
|
12
14
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
13
15
|
|
|
14
|
-
var
|
|
15
|
-
var PropTypes__default = /*#__PURE__*/_interopDefaultLegacy(PropTypes);
|
|
16
|
+
var _jsx__default = /*#__PURE__*/_interopDefaultLegacy(_jsx);
|
|
16
17
|
var styled__default = /*#__PURE__*/_interopDefaultLegacy(styled);
|
|
17
18
|
|
|
18
|
-
|
|
19
|
-
var ActionsNode = /*#__PURE__*/styled__default['default'].div.withConfig({
|
|
19
|
+
const ActionsNode = /*#__PURE__*/styled__default["default"].div.withConfig({
|
|
20
20
|
componentId: "sc-1umfb8g-0"
|
|
21
|
-
})(["display:flex;flex-direction:row;padding-left:", ";overflow:hidden;", ""],
|
|
22
|
-
return dsSystem.__UNSAFE_SPACE_TO_DIMSUM(props.theme.space.m);
|
|
23
|
-
}, styledSystem.margin);
|
|
21
|
+
})(["display:flex;flex-direction:row;padding-left:", ";overflow:hidden;", ""], props => dsSystem.__UNSAFE_SPACE_TO_DIMSUM(props.theme.space.m), styledSystem.margin);
|
|
24
22
|
|
|
25
23
|
function Actions(_ref) {
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
24
|
+
let {
|
|
25
|
+
actions = [],
|
|
26
|
+
centerActions,
|
|
27
|
+
rightActions
|
|
28
|
+
} = _ref;
|
|
30
29
|
if (actions.length < 1) return null;
|
|
31
|
-
return /*#__PURE__*/
|
|
30
|
+
return /*#__PURE__*/_jsx__default["default"](ActionsNode, {
|
|
32
31
|
marginLeft: !!rightActions && 'auto',
|
|
33
32
|
marginRight: !!centerActions && 'auto'
|
|
34
|
-
}, actions.map(
|
|
35
|
-
return /*#__PURE__*/React__default['default'].createElement(ActionItem, {
|
|
36
|
-
key: key
|
|
37
|
-
}, action);
|
|
38
|
-
}));
|
|
33
|
+
}, void 0, actions.map((action, key) => /*#__PURE__*/_jsx__default["default"](ActionItem, {}, key, action)));
|
|
39
34
|
}
|
|
40
35
|
|
|
41
|
-
Actions.propTypes = {
|
|
42
|
-
actions: PropTypes__default['default'].array,
|
|
43
|
-
centerActions: PropTypes__default['default'].bool,
|
|
44
|
-
rightActions: PropTypes__default['default'].bool
|
|
45
|
-
};
|
|
46
|
-
|
|
47
36
|
exports.Actions = Actions;
|
|
48
|
-
exports[
|
|
49
|
-
//# sourceMappingURL=Actions.js.map
|
|
37
|
+
exports["default"] = Actions;
|
package/cjs/DSGroupBox.js
CHANGED
|
@@ -2,93 +2,84 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var _extends = require('@babel/runtime/helpers/extends');
|
|
6
5
|
var _defineProperty = require('@babel/runtime/helpers/defineProperty');
|
|
6
|
+
var _jsx = require('@babel/runtime/helpers/jsx');
|
|
7
|
+
require('core-js/modules/esnext.async-iterator.map.js');
|
|
8
|
+
require('core-js/modules/esnext.iterator.map.js');
|
|
9
|
+
require('core-js/modules/esnext.async-iterator.filter.js');
|
|
10
|
+
require('core-js/modules/esnext.iterator.constructor.js');
|
|
11
|
+
require('core-js/modules/esnext.iterator.filter.js');
|
|
12
|
+
require('core-js/modules/esnext.async-iterator.for-each.js');
|
|
13
|
+
require('core-js/modules/esnext.iterator.for-each.js');
|
|
7
14
|
var React = require('react');
|
|
8
15
|
var reactDesc = require('react-desc');
|
|
9
|
-
var
|
|
10
|
-
var
|
|
16
|
+
var blocks = require('./components/blocks.js');
|
|
17
|
+
var GroupHeader = require('./components/GroupHeader.js');
|
|
11
18
|
var constants = require('./constants.js');
|
|
12
|
-
require('
|
|
13
|
-
require('@elliemae/ds-truncated-tooltip-text');
|
|
14
|
-
require('./Actions.js');
|
|
15
|
-
require('prop-types');
|
|
16
|
-
require('styled-components');
|
|
17
|
-
require('styled-system');
|
|
18
|
-
require('@elliemae/ds-system');
|
|
19
|
-
require('./ActionItem.js');
|
|
20
|
-
require('./LabelElement.js');
|
|
21
|
-
require('./GroupBoxLabel.js');
|
|
19
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
22
20
|
|
|
23
21
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
24
22
|
|
|
25
|
-
var _extends__default = /*#__PURE__*/_interopDefaultLegacy(_extends);
|
|
26
23
|
var _defineProperty__default = /*#__PURE__*/_interopDefaultLegacy(_defineProperty);
|
|
24
|
+
var _jsx__default = /*#__PURE__*/_interopDefaultLegacy(_jsx);
|
|
27
25
|
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
28
26
|
|
|
29
27
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
|
|
30
28
|
|
|
31
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty__default[
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
_ref$children = _ref.children,
|
|
57
|
-
components = _ref$children === void 0 ? [] : _ref$children,
|
|
58
|
-
_ref$isMain = _ref.isMain,
|
|
59
|
-
isMain = _ref$isMain === void 0 ? true : _ref$isMain;
|
|
60
|
-
var labelText = labelProps.labelText;
|
|
61
|
-
return /*#__PURE__*/React__default['default'].createElement(components_blocks.GroupBoxWrapper, _extends__default['default']({}, containerProps, {
|
|
29
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty__default["default"](target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
30
|
+
|
|
31
|
+
const DSGroupBox = _ref => {
|
|
32
|
+
let {
|
|
33
|
+
containerProps = {},
|
|
34
|
+
labelProps = {
|
|
35
|
+
labelText: '',
|
|
36
|
+
borderBottom: false,
|
|
37
|
+
id: 'ds-group-box__header'
|
|
38
|
+
},
|
|
39
|
+
rightActions = [],
|
|
40
|
+
centerActions = [],
|
|
41
|
+
type = constants.BOX_TYPES.CATEGORY,
|
|
42
|
+
asRow = false,
|
|
43
|
+
onlyHeader = false,
|
|
44
|
+
noBorder = true,
|
|
45
|
+
noPadding = false,
|
|
46
|
+
children: components = [],
|
|
47
|
+
// eslint-disable-next-line react/prop-types
|
|
48
|
+
isMain = true
|
|
49
|
+
} = _ref;
|
|
50
|
+
const {
|
|
51
|
+
labelText
|
|
52
|
+
} = labelProps;
|
|
53
|
+
return /*#__PURE__*/jsxRuntime.jsxs(blocks.GroupBoxWrapper, _objectSpread(_objectSpread({}, containerProps), {}, {
|
|
62
54
|
classProps: {
|
|
63
|
-
onlyHeader
|
|
55
|
+
onlyHeader,
|
|
56
|
+
noBorder,
|
|
57
|
+
type,
|
|
58
|
+
isMain
|
|
59
|
+
},
|
|
60
|
+
children: [labelText && /*#__PURE__*/_jsx__default["default"](GroupHeader.DSGroupBoxHeader, {
|
|
61
|
+
centerActions: centerActions,
|
|
62
|
+
isMain: isMain,
|
|
63
|
+
labelProps: labelProps,
|
|
64
64
|
noBorder: noBorder,
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
type: type,
|
|
78
|
-
asRow: asRow,
|
|
79
|
-
onlyHeader: onlyHeader,
|
|
80
|
-
noPadding: noPadding,
|
|
81
|
-
noBorder: noBorder,
|
|
82
|
-
noBorderTop: !!labelText
|
|
83
|
-
}
|
|
84
|
-
}, components && components.props ? React__default['default'].Children.map(components, function (component) {
|
|
85
|
-
return /*#__PURE__*/React__default['default'].cloneElement(component, _objectSpread(_objectSpread({}, component.props), {}, {
|
|
65
|
+
rightActions: rightActions,
|
|
66
|
+
type: type
|
|
67
|
+
}), /*#__PURE__*/_jsx__default["default"](blocks.GroupBoxContent, {
|
|
68
|
+
classProps: {
|
|
69
|
+
type,
|
|
70
|
+
asRow,
|
|
71
|
+
onlyHeader,
|
|
72
|
+
noPadding,
|
|
73
|
+
noBorder,
|
|
74
|
+
noBorderTop: !!labelText
|
|
75
|
+
}
|
|
76
|
+
}, void 0, components && components.props ? React__default["default"].Children.map(components, component => /*#__PURE__*/React__default["default"].cloneElement(component, _objectSpread(_objectSpread({}, component.props), {}, {
|
|
86
77
|
isMain: false
|
|
87
|
-
}))
|
|
88
|
-
}
|
|
78
|
+
})), null) : components)]
|
|
79
|
+
}));
|
|
89
80
|
};
|
|
90
81
|
|
|
91
|
-
|
|
82
|
+
const props = {
|
|
92
83
|
/** props to inject to wrapper */
|
|
93
84
|
containerProps: reactDesc.PropTypes.object.description('props to inject to wrapper'),
|
|
94
85
|
|
|
@@ -141,11 +132,9 @@ var props = {
|
|
|
141
132
|
*/
|
|
142
133
|
noPadding: reactDesc.PropTypes.bool.description('Remove the top and bottom padding from the content')
|
|
143
134
|
};
|
|
144
|
-
|
|
145
|
-
var DSGroupBoxWithSchema = reactDesc.describe(DSGroupBox);
|
|
135
|
+
const DSGroupBoxWithSchema = reactDesc.describe(DSGroupBox);
|
|
146
136
|
DSGroupBoxWithSchema.propTypes = props;
|
|
147
137
|
|
|
148
138
|
exports.DSGroupBox = DSGroupBox;
|
|
149
139
|
exports.DSGroupBoxWithSchema = DSGroupBoxWithSchema;
|
|
150
|
-
exports[
|
|
151
|
-
//# sourceMappingURL=DSGroupBox.js.map
|
|
140
|
+
exports["default"] = DSGroupBox;
|
package/cjs/GroupBoxLabel.js
CHANGED
|
@@ -1,64 +1,40 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
|
|
3
|
+
var _jsx = require('@babel/runtime/helpers/jsx');
|
|
4
|
+
require('react');
|
|
5
5
|
var styled = require('styled-components');
|
|
6
6
|
var dsSystem = require('@elliemae/ds-system');
|
|
7
|
-
var constants = require('./constants.js');
|
|
8
7
|
|
|
9
8
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
10
9
|
|
|
11
|
-
var
|
|
12
|
-
var PropTypes__default = /*#__PURE__*/_interopDefaultLegacy(PropTypes);
|
|
10
|
+
var _jsx__default = /*#__PURE__*/_interopDefaultLegacy(_jsx);
|
|
13
11
|
var styled__default = /*#__PURE__*/_interopDefaultLegacy(styled);
|
|
14
12
|
|
|
15
|
-
|
|
16
|
-
return "1px solid ".concat(props.theme.colors.neutral[200], ";");
|
|
17
|
-
};
|
|
13
|
+
const borderBase200 = props => "1px solid ".concat(props.theme.colors.neutral[200], ";");
|
|
18
14
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
var groupBoxStyles = "\n border: unset;\n font-size: ".concat(function (props) {
|
|
23
|
-
return dsSystem.toMobile(props.theme.fontSizes.title[500]);
|
|
24
|
-
}, ";\n padding: 12px 0;\n");
|
|
25
|
-
var GroupBoxLabelNode = /*#__PURE__*/styled__default['default'].div.withConfig({
|
|
15
|
+
const categoryBoxStyles = "\n width: 100%;\n height: 36px;\n padding:0 0;\n color: ".concat(props => props.theme.colors.neutral[800], ";\n display: flex;\n flex-direction: row;\n align-items: center;\n border-bottom: ").concat(borderBase200, "\n");
|
|
16
|
+
const groupBoxStyles = "\n border: unset;\n font-size: ".concat(props => dsSystem.toMobile(props.theme.fontSizes.title[500]), ";\n padding: 12px 0;\n");
|
|
17
|
+
const GroupBoxLabelNode = /*#__PURE__*/styled__default["default"].div.withConfig({
|
|
26
18
|
componentId: "sc-141ikkh-0"
|
|
27
|
-
})(["", " ", " ", " ", ""],
|
|
28
|
-
return props.nodeType === 'category-box' ? categoryBoxStyles : groupBoxStyles;
|
|
29
|
-
}, function (props) {
|
|
30
|
-
return props.noBorder ? 'border: none;' : '';
|
|
31
|
-
}, function (props) {
|
|
32
|
-
return props.borderBottom ? "border-bottom: ".concat(borderBase200(props)) : '';
|
|
33
|
-
}, function (props) {
|
|
34
|
-
return props.isMain ? "padding-right: ".concat(dsSystem.__UNSAFE_SPACE_TO_DIMSUM(props.theme.space.xs), ";") : '';
|
|
35
|
-
});
|
|
19
|
+
})(["", " ", " ", " ", ""], props => props.nodeType === 'category-box' ? categoryBoxStyles : groupBoxStyles, props => props.noBorder ? 'border: none;' : '', props => props.borderBottom ? "border-bottom: ".concat(borderBase200(props)) : '', props => props.isMain ? "padding-right: ".concat(dsSystem.__UNSAFE_SPACE_TO_DIMSUM(props.theme.space.xs), ";") : '');
|
|
36
20
|
|
|
37
21
|
function GroupBoxLabel(_ref) {
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
22
|
+
let {
|
|
23
|
+
borderBottom,
|
|
24
|
+
children,
|
|
25
|
+
noBorder,
|
|
26
|
+
isMain,
|
|
27
|
+
type,
|
|
28
|
+
id
|
|
29
|
+
} = _ref;
|
|
30
|
+
return /*#__PURE__*/_jsx__default["default"](GroupBoxLabelNode, {
|
|
45
31
|
borderBottom: borderBottom,
|
|
46
32
|
"data-testid": "ds-group-box__header",
|
|
47
33
|
isMain: isMain,
|
|
48
34
|
noBorder: noBorder,
|
|
49
35
|
nodeType: type,
|
|
50
36
|
id: id
|
|
51
|
-
}, children);
|
|
37
|
+
}, void 0, children);
|
|
52
38
|
}
|
|
53
39
|
|
|
54
|
-
GroupBoxLabel.propTypes = {
|
|
55
|
-
children: PropTypes__default['default'].oneOfType([PropTypes__default['default'].arrayOf(PropTypes__default['default'].node), PropTypes__default['default'].node]).isRequired,
|
|
56
|
-
type: PropTypes__default['default'].oneOf(constants.BOX_TYPES_ARRAY),
|
|
57
|
-
borderBottom: PropTypes__default['default'].bool,
|
|
58
|
-
isMain: PropTypes__default['default'].bool.isRequired,
|
|
59
|
-
noBorder: PropTypes__default['default'].bool,
|
|
60
|
-
id: PropTypes__default['default'].string
|
|
61
|
-
};
|
|
62
|
-
|
|
63
40
|
module.exports = GroupBoxLabel;
|
|
64
|
-
//# sourceMappingURL=GroupBoxLabel.js.map
|
package/cjs/LabelElement.js
CHANGED
|
@@ -1,30 +1,24 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
|
|
3
|
+
var _jsx = require('@babel/runtime/helpers/jsx');
|
|
4
|
+
require('react');
|
|
5
5
|
var styled = require('styled-components');
|
|
6
6
|
var dsSystem = require('@elliemae/ds-system');
|
|
7
7
|
|
|
8
8
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
9
9
|
|
|
10
|
-
var
|
|
11
|
-
var PropTypes__default = /*#__PURE__*/_interopDefaultLegacy(PropTypes);
|
|
10
|
+
var _jsx__default = /*#__PURE__*/_interopDefaultLegacy(_jsx);
|
|
12
11
|
var styled__default = /*#__PURE__*/_interopDefaultLegacy(styled);
|
|
13
12
|
|
|
14
|
-
|
|
13
|
+
const LabelElementNode = /*#__PURE__*/styled__default["default"].div.withConfig({
|
|
15
14
|
componentId: "sc-nu03bl-0"
|
|
16
|
-
})(["overflow:hidden;display:flex;align-items:center;font-size:", ";font-weight:400;"],
|
|
17
|
-
return dsSystem.toMobile(props.theme.fontSizes.title[700]);
|
|
18
|
-
});
|
|
15
|
+
})(["overflow:hidden;display:flex;align-items:center;font-size:", ";font-weight:400;"], props => dsSystem.toMobile(props.theme.fontSizes.title[700]));
|
|
19
16
|
|
|
20
17
|
function LabelElement(_ref) {
|
|
21
|
-
|
|
22
|
-
|
|
18
|
+
let {
|
|
19
|
+
children
|
|
20
|
+
} = _ref;
|
|
21
|
+
return /*#__PURE__*/_jsx__default["default"](LabelElementNode, {}, void 0, children);
|
|
23
22
|
}
|
|
24
23
|
|
|
25
|
-
LabelElement.propTypes = {
|
|
26
|
-
children: PropTypes__default['default'].oneOfType([PropTypes__default['default'].string, PropTypes__default['default'].node]).isRequired
|
|
27
|
-
};
|
|
28
|
-
|
|
29
24
|
module.exports = LabelElement;
|
|
30
|
-
//# sourceMappingURL=LabelElement.js.map
|
|
@@ -2,57 +2,52 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var
|
|
5
|
+
var _jsx = require('@babel/runtime/helpers/jsx');
|
|
6
|
+
require('react');
|
|
6
7
|
var DSTruncatedTooltipText = require('@elliemae/ds-truncated-tooltip-text');
|
|
7
8
|
var constants = require('../constants.js');
|
|
8
9
|
var Actions = require('../Actions.js');
|
|
9
10
|
var LabelElement = require('../LabelElement.js');
|
|
10
11
|
var GroupBoxLabel = require('../GroupBoxLabel.js');
|
|
11
|
-
require('prop-types');
|
|
12
|
-
require('styled-components');
|
|
13
|
-
require('styled-system');
|
|
14
|
-
require('@elliemae/ds-system');
|
|
15
|
-
require('../ActionItem.js');
|
|
16
12
|
|
|
17
13
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
18
14
|
|
|
19
|
-
var
|
|
15
|
+
var _jsx__default = /*#__PURE__*/_interopDefaultLegacy(_jsx);
|
|
20
16
|
var DSTruncatedTooltipText__default = /*#__PURE__*/_interopDefaultLegacy(DSTruncatedTooltipText);
|
|
21
17
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
return /*#__PURE__*/
|
|
18
|
+
const DSGroupBoxHeader = _ref => {
|
|
19
|
+
let {
|
|
20
|
+
labelProps = {
|
|
21
|
+
labelText: '',
|
|
22
|
+
borderBottom: false,
|
|
23
|
+
id: 'ds-group-box__header'
|
|
24
|
+
},
|
|
25
|
+
rightActions = [],
|
|
26
|
+
centerActions = [],
|
|
27
|
+
type = constants.BOX_TYPES.CATEGORY,
|
|
28
|
+
noBorder,
|
|
29
|
+
isMain
|
|
30
|
+
} = _ref;
|
|
31
|
+
const {
|
|
32
|
+
labelText,
|
|
33
|
+
borderBottom,
|
|
34
|
+
id
|
|
35
|
+
} = labelProps;
|
|
36
|
+
return /*#__PURE__*/_jsx__default["default"](GroupBoxLabel, {
|
|
41
37
|
borderBottom: borderBottom,
|
|
42
38
|
isMain: isMain,
|
|
43
39
|
noBorder: noBorder,
|
|
44
40
|
type: type,
|
|
45
41
|
id: id
|
|
46
|
-
}, /*#__PURE__*/
|
|
42
|
+
}, void 0, /*#__PURE__*/_jsx__default["default"](LabelElement, {}, void 0, /*#__PURE__*/_jsx__default["default"](DSTruncatedTooltipText__default["default"], {
|
|
47
43
|
value: labelText
|
|
48
|
-
})), /*#__PURE__*/
|
|
44
|
+
})), /*#__PURE__*/_jsx__default["default"](Actions.Actions, {
|
|
49
45
|
actions: centerActions,
|
|
50
46
|
centerActions: centerActions.length > 0
|
|
51
|
-
}), /*#__PURE__*/
|
|
47
|
+
}), /*#__PURE__*/_jsx__default["default"](Actions.Actions, {
|
|
52
48
|
actions: rightActions,
|
|
53
49
|
rightActions: rightActions.length > 0
|
|
54
50
|
}));
|
|
55
51
|
};
|
|
56
52
|
|
|
57
53
|
exports.DSGroupBoxHeader = DSGroupBoxHeader;
|
|
58
|
-
//# sourceMappingURL=GroupHeader.js.map
|
package/cjs/components/blocks.js
CHANGED
|
@@ -2,49 +2,55 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var _defineProperty = require('@babel/runtime/helpers/defineProperty');
|
|
6
5
|
var dsClassnames = require('@elliemae/ds-classnames');
|
|
7
6
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
noBorder = _ref.noBorder,
|
|
18
|
-
type = _ref.type,
|
|
19
|
-
isMain = _ref.isMain;
|
|
20
|
-
return _ref2 = {
|
|
7
|
+
const blockName = 'group-box';
|
|
8
|
+
const GroupBoxWrapper = dsClassnames.aggregatedClasses('div')(blockName, 'wrapper', _ref => {
|
|
9
|
+
let {
|
|
10
|
+
onlyHeader,
|
|
11
|
+
noBorder,
|
|
12
|
+
type,
|
|
13
|
+
isMain
|
|
14
|
+
} = _ref;
|
|
15
|
+
return {
|
|
21
16
|
'only-header': onlyHeader,
|
|
22
|
-
'no-border': noBorder
|
|
23
|
-
|
|
17
|
+
'no-border': noBorder,
|
|
18
|
+
[type]: type,
|
|
19
|
+
'main-box': isMain,
|
|
20
|
+
'nested-box': !isMain
|
|
21
|
+
};
|
|
24
22
|
});
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
return
|
|
23
|
+
const GroupBoxContent = dsClassnames.aggregatedClasses('div')(blockName, 'content', _ref2 => {
|
|
24
|
+
let {
|
|
25
|
+
type,
|
|
26
|
+
asRow,
|
|
27
|
+
onlyHeader,
|
|
28
|
+
noPadding,
|
|
29
|
+
noBorder,
|
|
30
|
+
noBorderTop
|
|
31
|
+
} = _ref2;
|
|
32
|
+
return {
|
|
33
|
+
[type]: type,
|
|
34
|
+
'as-row': asRow,
|
|
35
|
+
'only-header': onlyHeader,
|
|
36
|
+
'no-padding': noPadding,
|
|
37
|
+
'no-border': noBorder,
|
|
38
|
+
'no-border-top': noBorderTop
|
|
39
|
+
};
|
|
35
40
|
});
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
return
|
|
43
|
-
'border-bottom': borderBottom
|
|
44
|
-
|
|
41
|
+
const Label = dsClassnames.aggregatedClasses('div')(blockName, 'label', _ref3 => {
|
|
42
|
+
let {
|
|
43
|
+
borderBottom,
|
|
44
|
+
type,
|
|
45
|
+
noBorder
|
|
46
|
+
} = _ref3;
|
|
47
|
+
return {
|
|
48
|
+
'border-bottom': borderBottom,
|
|
49
|
+
[type]: type,
|
|
50
|
+
'no-border': noBorder
|
|
51
|
+
};
|
|
45
52
|
});
|
|
46
53
|
|
|
47
54
|
exports.GroupBoxContent = GroupBoxContent;
|
|
48
55
|
exports.GroupBoxWrapper = GroupBoxWrapper;
|
|
49
56
|
exports.Label = Label;
|
|
50
|
-
//# sourceMappingURL=blocks.js.map
|
package/cjs/constants.js
CHANGED
|
@@ -2,12 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
const BOX_TYPES = {
|
|
6
6
|
CATEGORY: 'category-box',
|
|
7
7
|
GROUP: 'group-box'
|
|
8
8
|
};
|
|
9
|
-
|
|
9
|
+
const BOX_TYPES_ARRAY = [BOX_TYPES.CATEGORY, BOX_TYPES.GROUP];
|
|
10
10
|
|
|
11
11
|
exports.BOX_TYPES = BOX_TYPES;
|
|
12
12
|
exports.BOX_TYPES_ARRAY = BOX_TYPES_ARRAY;
|
|
13
|
-
//# sourceMappingURL=constants.js.map
|
package/cjs/index.js
CHANGED
|
@@ -4,28 +4,11 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
var DSGroupBox = require('./DSGroupBox.js');
|
|
6
6
|
var constants = require('./constants.js');
|
|
7
|
-
require('@babel/runtime/helpers/extends');
|
|
8
|
-
require('@babel/runtime/helpers/defineProperty');
|
|
9
|
-
require('react');
|
|
10
|
-
require('react-desc');
|
|
11
|
-
require('./components/blocks.js');
|
|
12
|
-
require('@elliemae/ds-classnames');
|
|
13
|
-
require('./components/GroupHeader.js');
|
|
14
|
-
require('@elliemae/ds-truncated-tooltip-text');
|
|
15
|
-
require('./Actions.js');
|
|
16
|
-
require('prop-types');
|
|
17
|
-
require('styled-components');
|
|
18
|
-
require('styled-system');
|
|
19
|
-
require('@elliemae/ds-system');
|
|
20
|
-
require('./ActionItem.js');
|
|
21
|
-
require('./LabelElement.js');
|
|
22
|
-
require('./GroupBoxLabel.js');
|
|
23
7
|
|
|
24
8
|
|
|
25
9
|
|
|
26
10
|
exports.DSGroupBox = DSGroupBox.DSGroupBox;
|
|
27
11
|
exports.DSGroupBoxWithSchema = DSGroupBox.DSGroupBoxWithSchema;
|
|
28
|
-
exports
|
|
12
|
+
exports["default"] = DSGroupBox.DSGroupBox;
|
|
29
13
|
exports.BOX_TYPES = constants.BOX_TYPES;
|
|
30
14
|
exports.BOX_TYPES_ARRAY = constants.BOX_TYPES_ARRAY;
|
|
31
|
-
//# sourceMappingURL=index.js.map
|