@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/esm/ActionItem.js
CHANGED
|
@@ -1,22 +1,17 @@
|
|
|
1
|
-
import
|
|
1
|
+
import _jsx from '@babel/runtime/helpers/esm/jsx';
|
|
2
|
+
import 'react';
|
|
2
3
|
import styled from 'styled-components';
|
|
3
4
|
import { __UNSAFE_SPACE_TO_DIMSUM } from '@elliemae/ds-system';
|
|
4
|
-
import PropTypes from 'prop-types';
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
const ActionItemNode = /*#__PURE__*/styled.div.withConfig({
|
|
7
7
|
componentId: "sc-1ysc0gb-0"
|
|
8
|
-
})(["padding-right:", ";font-weight:300;overflow:hidden;align-items:center;display:flex;&:last-child{padding-right:0;}"],
|
|
9
|
-
return __UNSAFE_SPACE_TO_DIMSUM(props.theme.space.xs);
|
|
10
|
-
});
|
|
8
|
+
})(["padding-right:", ";font-weight:300;overflow:hidden;align-items:center;display:flex;&:last-child{padding-right:0;}"], props => __UNSAFE_SPACE_TO_DIMSUM(props.theme.space.xs));
|
|
11
9
|
|
|
12
10
|
function ActionItem(_ref) {
|
|
13
|
-
|
|
14
|
-
|
|
11
|
+
let {
|
|
12
|
+
children
|
|
13
|
+
} = _ref;
|
|
14
|
+
return /*#__PURE__*/_jsx(ActionItemNode, {}, void 0, children);
|
|
15
15
|
}
|
|
16
16
|
|
|
17
|
-
ActionItem.propTypes = {
|
|
18
|
-
children: PropTypes.node.isRequired
|
|
19
|
-
};
|
|
20
|
-
|
|
21
17
|
export { ActionItem as default };
|
|
22
|
-
//# sourceMappingURL=ActionItem.js.map
|
package/esm/Actions.js
CHANGED
|
@@ -1,38 +1,27 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
1
|
+
import _jsx from '@babel/runtime/helpers/esm/jsx';
|
|
2
|
+
import 'core-js/modules/esnext.async-iterator.map.js';
|
|
3
|
+
import 'core-js/modules/esnext.iterator.map.js';
|
|
4
|
+
import 'react';
|
|
3
5
|
import styled from 'styled-components';
|
|
4
6
|
import { margin } from 'styled-system';
|
|
5
7
|
import { __UNSAFE_SPACE_TO_DIMSUM } from '@elliemae/ds-system';
|
|
6
8
|
import ActionItem from './ActionItem.js';
|
|
7
9
|
|
|
8
|
-
|
|
9
|
-
var ActionsNode = /*#__PURE__*/styled.div.withConfig({
|
|
10
|
+
const ActionsNode = /*#__PURE__*/styled.div.withConfig({
|
|
10
11
|
componentId: "sc-1umfb8g-0"
|
|
11
|
-
})(["display:flex;flex-direction:row;padding-left:", ";overflow:hidden;", ""],
|
|
12
|
-
return __UNSAFE_SPACE_TO_DIMSUM(props.theme.space.m);
|
|
13
|
-
}, margin);
|
|
12
|
+
})(["display:flex;flex-direction:row;padding-left:", ";overflow:hidden;", ""], props => __UNSAFE_SPACE_TO_DIMSUM(props.theme.space.m), margin);
|
|
14
13
|
|
|
15
14
|
function Actions(_ref) {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
15
|
+
let {
|
|
16
|
+
actions = [],
|
|
17
|
+
centerActions,
|
|
18
|
+
rightActions
|
|
19
|
+
} = _ref;
|
|
20
20
|
if (actions.length < 1) return null;
|
|
21
|
-
return /*#__PURE__*/
|
|
21
|
+
return /*#__PURE__*/_jsx(ActionsNode, {
|
|
22
22
|
marginLeft: !!rightActions && 'auto',
|
|
23
23
|
marginRight: !!centerActions && 'auto'
|
|
24
|
-
}, actions.map(
|
|
25
|
-
return /*#__PURE__*/React.createElement(ActionItem, {
|
|
26
|
-
key: key
|
|
27
|
-
}, action);
|
|
28
|
-
}));
|
|
24
|
+
}, void 0, actions.map((action, key) => /*#__PURE__*/_jsx(ActionItem, {}, key, action)));
|
|
29
25
|
}
|
|
30
26
|
|
|
31
|
-
Actions.propTypes = {
|
|
32
|
-
actions: PropTypes.array,
|
|
33
|
-
centerActions: PropTypes.bool,
|
|
34
|
-
rightActions: PropTypes.bool
|
|
35
|
-
};
|
|
36
|
-
|
|
37
27
|
export { Actions, Actions as default };
|
|
38
|
-
//# sourceMappingURL=Actions.js.map
|
package/esm/DSGroupBox.js
CHANGED
|
@@ -1,84 +1,75 @@
|
|
|
1
|
-
import _extends from '@babel/runtime/helpers/esm/extends';
|
|
2
1
|
import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
|
|
2
|
+
import _jsx from '@babel/runtime/helpers/esm/jsx';
|
|
3
|
+
import 'core-js/modules/esnext.async-iterator.map.js';
|
|
4
|
+
import 'core-js/modules/esnext.iterator.map.js';
|
|
5
|
+
import 'core-js/modules/esnext.async-iterator.filter.js';
|
|
6
|
+
import 'core-js/modules/esnext.iterator.constructor.js';
|
|
7
|
+
import 'core-js/modules/esnext.iterator.filter.js';
|
|
8
|
+
import 'core-js/modules/esnext.async-iterator.for-each.js';
|
|
9
|
+
import 'core-js/modules/esnext.iterator.for-each.js';
|
|
3
10
|
import React from 'react';
|
|
4
11
|
import { PropTypes, describe } from 'react-desc';
|
|
5
12
|
import { GroupBoxWrapper, GroupBoxContent } from './components/blocks.js';
|
|
6
13
|
import { DSGroupBoxHeader } from './components/GroupHeader.js';
|
|
7
14
|
import { BOX_TYPES_ARRAY, BOX_TYPES } from './constants.js';
|
|
8
|
-
import '
|
|
9
|
-
import '@elliemae/ds-truncated-tooltip-text';
|
|
10
|
-
import './Actions.js';
|
|
11
|
-
import 'prop-types';
|
|
12
|
-
import 'styled-components';
|
|
13
|
-
import 'styled-system';
|
|
14
|
-
import '@elliemae/ds-system';
|
|
15
|
-
import './ActionItem.js';
|
|
16
|
-
import './LabelElement.js';
|
|
17
|
-
import './GroupBoxLabel.js';
|
|
15
|
+
import { jsxs } from 'react/jsx-runtime';
|
|
18
16
|
|
|
19
17
|
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; }
|
|
20
18
|
|
|
21
19
|
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(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; }
|
|
22
20
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
_ref$children = _ref.children,
|
|
47
|
-
components = _ref$children === void 0 ? [] : _ref$children,
|
|
48
|
-
_ref$isMain = _ref.isMain,
|
|
49
|
-
isMain = _ref$isMain === void 0 ? true : _ref$isMain;
|
|
50
|
-
var labelText = labelProps.labelText;
|
|
51
|
-
return /*#__PURE__*/React.createElement(GroupBoxWrapper, _extends({}, containerProps, {
|
|
21
|
+
const DSGroupBox = _ref => {
|
|
22
|
+
let {
|
|
23
|
+
containerProps = {},
|
|
24
|
+
labelProps = {
|
|
25
|
+
labelText: '',
|
|
26
|
+
borderBottom: false,
|
|
27
|
+
id: 'ds-group-box__header'
|
|
28
|
+
},
|
|
29
|
+
rightActions = [],
|
|
30
|
+
centerActions = [],
|
|
31
|
+
type = BOX_TYPES.CATEGORY,
|
|
32
|
+
asRow = false,
|
|
33
|
+
onlyHeader = false,
|
|
34
|
+
noBorder = true,
|
|
35
|
+
noPadding = false,
|
|
36
|
+
children: components = [],
|
|
37
|
+
// eslint-disable-next-line react/prop-types
|
|
38
|
+
isMain = true
|
|
39
|
+
} = _ref;
|
|
40
|
+
const {
|
|
41
|
+
labelText
|
|
42
|
+
} = labelProps;
|
|
43
|
+
return /*#__PURE__*/jsxs(GroupBoxWrapper, _objectSpread(_objectSpread({}, containerProps), {}, {
|
|
52
44
|
classProps: {
|
|
53
|
-
onlyHeader
|
|
45
|
+
onlyHeader,
|
|
46
|
+
noBorder,
|
|
47
|
+
type,
|
|
48
|
+
isMain
|
|
49
|
+
},
|
|
50
|
+
children: [labelText && /*#__PURE__*/_jsx(DSGroupBoxHeader, {
|
|
51
|
+
centerActions: centerActions,
|
|
52
|
+
isMain: isMain,
|
|
53
|
+
labelProps: labelProps,
|
|
54
54
|
noBorder: noBorder,
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
type: type,
|
|
68
|
-
asRow: asRow,
|
|
69
|
-
onlyHeader: onlyHeader,
|
|
70
|
-
noPadding: noPadding,
|
|
71
|
-
noBorder: noBorder,
|
|
72
|
-
noBorderTop: !!labelText
|
|
73
|
-
}
|
|
74
|
-
}, components && components.props ? React.Children.map(components, function (component) {
|
|
75
|
-
return /*#__PURE__*/React.cloneElement(component, _objectSpread(_objectSpread({}, component.props), {}, {
|
|
55
|
+
rightActions: rightActions,
|
|
56
|
+
type: type
|
|
57
|
+
}), /*#__PURE__*/_jsx(GroupBoxContent, {
|
|
58
|
+
classProps: {
|
|
59
|
+
type,
|
|
60
|
+
asRow,
|
|
61
|
+
onlyHeader,
|
|
62
|
+
noPadding,
|
|
63
|
+
noBorder,
|
|
64
|
+
noBorderTop: !!labelText
|
|
65
|
+
}
|
|
66
|
+
}, void 0, components && components.props ? React.Children.map(components, component => /*#__PURE__*/React.cloneElement(component, _objectSpread(_objectSpread({}, component.props), {}, {
|
|
76
67
|
isMain: false
|
|
77
|
-
}))
|
|
78
|
-
}
|
|
68
|
+
})), null) : components)]
|
|
69
|
+
}));
|
|
79
70
|
};
|
|
80
71
|
|
|
81
|
-
|
|
72
|
+
const props = {
|
|
82
73
|
/** props to inject to wrapper */
|
|
83
74
|
containerProps: PropTypes.object.description('props to inject to wrapper'),
|
|
84
75
|
|
|
@@ -131,9 +122,7 @@ var props = {
|
|
|
131
122
|
*/
|
|
132
123
|
noPadding: PropTypes.bool.description('Remove the top and bottom padding from the content')
|
|
133
124
|
};
|
|
134
|
-
|
|
135
|
-
var DSGroupBoxWithSchema = describe(DSGroupBox);
|
|
125
|
+
const DSGroupBoxWithSchema = describe(DSGroupBox);
|
|
136
126
|
DSGroupBoxWithSchema.propTypes = props;
|
|
137
127
|
|
|
138
128
|
export { DSGroupBox, DSGroupBoxWithSchema, DSGroupBox as default };
|
|
139
|
-
//# sourceMappingURL=DSGroupBox.js.map
|
package/esm/GroupBoxLabel.js
CHANGED
|
@@ -1,56 +1,33 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
1
|
+
import _jsx from '@babel/runtime/helpers/esm/jsx';
|
|
2
|
+
import 'react';
|
|
3
3
|
import styled from 'styled-components';
|
|
4
4
|
import { __UNSAFE_SPACE_TO_DIMSUM, toMobile } from '@elliemae/ds-system';
|
|
5
|
-
import { BOX_TYPES_ARRAY } from './constants.js';
|
|
6
5
|
|
|
7
|
-
|
|
8
|
-
return "1px solid ".concat(props.theme.colors.neutral[200], ";");
|
|
9
|
-
};
|
|
6
|
+
const borderBase200 = props => "1px solid ".concat(props.theme.colors.neutral[200], ";");
|
|
10
7
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
var groupBoxStyles = "\n border: unset;\n font-size: ".concat(function (props) {
|
|
15
|
-
return toMobile(props.theme.fontSizes.title[500]);
|
|
16
|
-
}, ";\n padding: 12px 0;\n");
|
|
17
|
-
var GroupBoxLabelNode = /*#__PURE__*/styled.div.withConfig({
|
|
8
|
+
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");
|
|
9
|
+
const groupBoxStyles = "\n border: unset;\n font-size: ".concat(props => toMobile(props.theme.fontSizes.title[500]), ";\n padding: 12px 0;\n");
|
|
10
|
+
const GroupBoxLabelNode = /*#__PURE__*/styled.div.withConfig({
|
|
18
11
|
componentId: "sc-141ikkh-0"
|
|
19
|
-
})(["", " ", " ", " ", ""],
|
|
20
|
-
return props.nodeType === 'category-box' ? categoryBoxStyles : groupBoxStyles;
|
|
21
|
-
}, function (props) {
|
|
22
|
-
return props.noBorder ? 'border: none;' : '';
|
|
23
|
-
}, function (props) {
|
|
24
|
-
return props.borderBottom ? "border-bottom: ".concat(borderBase200(props)) : '';
|
|
25
|
-
}, function (props) {
|
|
26
|
-
return props.isMain ? "padding-right: ".concat(__UNSAFE_SPACE_TO_DIMSUM(props.theme.space.xs), ";") : '';
|
|
27
|
-
});
|
|
12
|
+
})(["", " ", " ", " ", ""], 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(__UNSAFE_SPACE_TO_DIMSUM(props.theme.space.xs), ";") : '');
|
|
28
13
|
|
|
29
14
|
function GroupBoxLabel(_ref) {
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
15
|
+
let {
|
|
16
|
+
borderBottom,
|
|
17
|
+
children,
|
|
18
|
+
noBorder,
|
|
19
|
+
isMain,
|
|
20
|
+
type,
|
|
21
|
+
id
|
|
22
|
+
} = _ref;
|
|
23
|
+
return /*#__PURE__*/_jsx(GroupBoxLabelNode, {
|
|
37
24
|
borderBottom: borderBottom,
|
|
38
25
|
"data-testid": "ds-group-box__header",
|
|
39
26
|
isMain: isMain,
|
|
40
27
|
noBorder: noBorder,
|
|
41
28
|
nodeType: type,
|
|
42
29
|
id: id
|
|
43
|
-
}, children);
|
|
30
|
+
}, void 0, children);
|
|
44
31
|
}
|
|
45
32
|
|
|
46
|
-
GroupBoxLabel.propTypes = {
|
|
47
|
-
children: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.node), PropTypes.node]).isRequired,
|
|
48
|
-
type: PropTypes.oneOf(BOX_TYPES_ARRAY),
|
|
49
|
-
borderBottom: PropTypes.bool,
|
|
50
|
-
isMain: PropTypes.bool.isRequired,
|
|
51
|
-
noBorder: PropTypes.bool,
|
|
52
|
-
id: PropTypes.string
|
|
53
|
-
};
|
|
54
|
-
|
|
55
33
|
export { GroupBoxLabel as default };
|
|
56
|
-
//# sourceMappingURL=GroupBoxLabel.js.map
|
package/esm/LabelElement.js
CHANGED
|
@@ -1,22 +1,17 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
1
|
+
import _jsx from '@babel/runtime/helpers/esm/jsx';
|
|
2
|
+
import 'react';
|
|
3
3
|
import styled from 'styled-components';
|
|
4
4
|
import { toMobile } from '@elliemae/ds-system';
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
const LabelElementNode = /*#__PURE__*/styled.div.withConfig({
|
|
7
7
|
componentId: "sc-nu03bl-0"
|
|
8
|
-
})(["overflow:hidden;display:flex;align-items:center;font-size:", ";font-weight:400;"],
|
|
9
|
-
return toMobile(props.theme.fontSizes.title[700]);
|
|
10
|
-
});
|
|
8
|
+
})(["overflow:hidden;display:flex;align-items:center;font-size:", ";font-weight:400;"], props => toMobile(props.theme.fontSizes.title[700]));
|
|
11
9
|
|
|
12
10
|
function LabelElement(_ref) {
|
|
13
|
-
|
|
14
|
-
|
|
11
|
+
let {
|
|
12
|
+
children
|
|
13
|
+
} = _ref;
|
|
14
|
+
return /*#__PURE__*/_jsx(LabelElementNode, {}, void 0, children);
|
|
15
15
|
}
|
|
16
16
|
|
|
17
|
-
LabelElement.propTypes = {
|
|
18
|
-
children: PropTypes.oneOfType([PropTypes.string, PropTypes.node]).isRequired
|
|
19
|
-
};
|
|
20
|
-
|
|
21
17
|
export { LabelElement as default };
|
|
22
|
-
//# sourceMappingURL=LabelElement.js.map
|
|
@@ -1,49 +1,44 @@
|
|
|
1
|
-
import
|
|
1
|
+
import _jsx from '@babel/runtime/helpers/esm/jsx';
|
|
2
|
+
import 'react';
|
|
2
3
|
import DSTruncatedTooltipText from '@elliemae/ds-truncated-tooltip-text';
|
|
3
4
|
import { BOX_TYPES } from '../constants.js';
|
|
4
5
|
import { Actions } from '../Actions.js';
|
|
5
6
|
import LabelElement from '../LabelElement.js';
|
|
6
7
|
import GroupBoxLabel from '../GroupBoxLabel.js';
|
|
7
|
-
import 'prop-types';
|
|
8
|
-
import 'styled-components';
|
|
9
|
-
import 'styled-system';
|
|
10
|
-
import '@elliemae/ds-system';
|
|
11
|
-
import '../ActionItem.js';
|
|
12
8
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
return /*#__PURE__*/
|
|
9
|
+
const DSGroupBoxHeader = _ref => {
|
|
10
|
+
let {
|
|
11
|
+
labelProps = {
|
|
12
|
+
labelText: '',
|
|
13
|
+
borderBottom: false,
|
|
14
|
+
id: 'ds-group-box__header'
|
|
15
|
+
},
|
|
16
|
+
rightActions = [],
|
|
17
|
+
centerActions = [],
|
|
18
|
+
type = BOX_TYPES.CATEGORY,
|
|
19
|
+
noBorder,
|
|
20
|
+
isMain
|
|
21
|
+
} = _ref;
|
|
22
|
+
const {
|
|
23
|
+
labelText,
|
|
24
|
+
borderBottom,
|
|
25
|
+
id
|
|
26
|
+
} = labelProps;
|
|
27
|
+
return /*#__PURE__*/_jsx(GroupBoxLabel, {
|
|
32
28
|
borderBottom: borderBottom,
|
|
33
29
|
isMain: isMain,
|
|
34
30
|
noBorder: noBorder,
|
|
35
31
|
type: type,
|
|
36
32
|
id: id
|
|
37
|
-
}, /*#__PURE__*/
|
|
33
|
+
}, void 0, /*#__PURE__*/_jsx(LabelElement, {}, void 0, /*#__PURE__*/_jsx(DSTruncatedTooltipText, {
|
|
38
34
|
value: labelText
|
|
39
|
-
})), /*#__PURE__*/
|
|
35
|
+
})), /*#__PURE__*/_jsx(Actions, {
|
|
40
36
|
actions: centerActions,
|
|
41
37
|
centerActions: centerActions.length > 0
|
|
42
|
-
}), /*#__PURE__*/
|
|
38
|
+
}), /*#__PURE__*/_jsx(Actions, {
|
|
43
39
|
actions: rightActions,
|
|
44
40
|
rightActions: rightActions.length > 0
|
|
45
41
|
}));
|
|
46
42
|
};
|
|
47
43
|
|
|
48
44
|
export { DSGroupBoxHeader };
|
|
49
|
-
//# sourceMappingURL=GroupHeader.js.map
|
package/esm/components/blocks.js
CHANGED
|
@@ -1,40 +1,50 @@
|
|
|
1
|
-
import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
|
|
2
1
|
import { aggregatedClasses } from '@elliemae/ds-classnames';
|
|
3
2
|
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
return
|
|
3
|
+
const blockName = 'group-box';
|
|
4
|
+
const GroupBoxWrapper = aggregatedClasses('div')(blockName, 'wrapper', _ref => {
|
|
5
|
+
let {
|
|
6
|
+
onlyHeader,
|
|
7
|
+
noBorder,
|
|
8
|
+
type,
|
|
9
|
+
isMain
|
|
10
|
+
} = _ref;
|
|
11
|
+
return {
|
|
13
12
|
'only-header': onlyHeader,
|
|
14
|
-
'no-border': noBorder
|
|
15
|
-
|
|
13
|
+
'no-border': noBorder,
|
|
14
|
+
[type]: type,
|
|
15
|
+
'main-box': isMain,
|
|
16
|
+
'nested-box': !isMain
|
|
17
|
+
};
|
|
16
18
|
});
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
return
|
|
19
|
+
const GroupBoxContent = aggregatedClasses('div')(blockName, 'content', _ref2 => {
|
|
20
|
+
let {
|
|
21
|
+
type,
|
|
22
|
+
asRow,
|
|
23
|
+
onlyHeader,
|
|
24
|
+
noPadding,
|
|
25
|
+
noBorder,
|
|
26
|
+
noBorderTop
|
|
27
|
+
} = _ref2;
|
|
28
|
+
return {
|
|
29
|
+
[type]: type,
|
|
30
|
+
'as-row': asRow,
|
|
31
|
+
'only-header': onlyHeader,
|
|
32
|
+
'no-padding': noPadding,
|
|
33
|
+
'no-border': noBorder,
|
|
34
|
+
'no-border-top': noBorderTop
|
|
35
|
+
};
|
|
27
36
|
});
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
return
|
|
35
|
-
'border-bottom': borderBottom
|
|
36
|
-
|
|
37
|
+
const Label = aggregatedClasses('div')(blockName, 'label', _ref3 => {
|
|
38
|
+
let {
|
|
39
|
+
borderBottom,
|
|
40
|
+
type,
|
|
41
|
+
noBorder
|
|
42
|
+
} = _ref3;
|
|
43
|
+
return {
|
|
44
|
+
'border-bottom': borderBottom,
|
|
45
|
+
[type]: type,
|
|
46
|
+
'no-border': noBorder
|
|
47
|
+
};
|
|
37
48
|
});
|
|
38
49
|
|
|
39
50
|
export { GroupBoxContent, GroupBoxWrapper, Label };
|
|
40
|
-
//# sourceMappingURL=blocks.js.map
|
package/esm/constants.js
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
const BOX_TYPES = {
|
|
2
2
|
CATEGORY: 'category-box',
|
|
3
3
|
GROUP: 'group-box'
|
|
4
4
|
};
|
|
5
|
-
|
|
5
|
+
const BOX_TYPES_ARRAY = [BOX_TYPES.CATEGORY, BOX_TYPES.GROUP];
|
|
6
6
|
|
|
7
7
|
export { BOX_TYPES, BOX_TYPES_ARRAY };
|
|
8
|
-
//# sourceMappingURL=constants.js.map
|
package/esm/index.js
CHANGED
|
@@ -1,19 +1,2 @@
|
|
|
1
1
|
export { DSGroupBox, DSGroupBoxWithSchema, DSGroupBox as default } from './DSGroupBox.js';
|
|
2
2
|
export { BOX_TYPES, BOX_TYPES_ARRAY } from './constants.js';
|
|
3
|
-
import '@babel/runtime/helpers/esm/extends';
|
|
4
|
-
import '@babel/runtime/helpers/esm/defineProperty';
|
|
5
|
-
import 'react';
|
|
6
|
-
import 'react-desc';
|
|
7
|
-
import './components/blocks.js';
|
|
8
|
-
import '@elliemae/ds-classnames';
|
|
9
|
-
import './components/GroupHeader.js';
|
|
10
|
-
import '@elliemae/ds-truncated-tooltip-text';
|
|
11
|
-
import './Actions.js';
|
|
12
|
-
import 'prop-types';
|
|
13
|
-
import 'styled-components';
|
|
14
|
-
import 'styled-system';
|
|
15
|
-
import '@elliemae/ds-system';
|
|
16
|
-
import './ActionItem.js';
|
|
17
|
-
import './LabelElement.js';
|
|
18
|
-
import './GroupBoxLabel.js';
|
|
19
|
-
//# sourceMappingURL=index.js.map
|
package/package.json
CHANGED
|
@@ -1,14 +1,62 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elliemae/ds-group-box",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.0-alpha.12",
|
|
4
4
|
"license": "MIT",
|
|
5
|
-
"description": "
|
|
6
|
-
"module": "esm/index.js",
|
|
7
|
-
"main": "cjs/index.js",
|
|
5
|
+
"description": "ICE MT - Dimsum - Group Box",
|
|
6
|
+
"module": "./esm/index.js",
|
|
7
|
+
"main": "./cjs/index.js",
|
|
8
|
+
"types": "./types/index.d.ts",
|
|
9
|
+
"exports": {
|
|
10
|
+
".": {
|
|
11
|
+
"import": "./esm/index.js",
|
|
12
|
+
"require": "./cjs/index.js"
|
|
13
|
+
},
|
|
14
|
+
"./LabelElement": {
|
|
15
|
+
"import": "./esm/LabelElement.js",
|
|
16
|
+
"require": "./cjs/LabelElement.js"
|
|
17
|
+
},
|
|
18
|
+
"./GroupBoxLabel": {
|
|
19
|
+
"import": "./esm/GroupBoxLabel.js",
|
|
20
|
+
"require": "./cjs/GroupBoxLabel.js"
|
|
21
|
+
},
|
|
22
|
+
"./DSGroupBox": {
|
|
23
|
+
"import": "./esm/DSGroupBox.js",
|
|
24
|
+
"require": "./cjs/DSGroupBox.js"
|
|
25
|
+
},
|
|
26
|
+
"./constants": {
|
|
27
|
+
"import": "./esm/constants.js",
|
|
28
|
+
"require": "./cjs/constants.js"
|
|
29
|
+
},
|
|
30
|
+
"./components/GroupHeader": {
|
|
31
|
+
"import": "./esm/components/GroupHeader.js",
|
|
32
|
+
"require": "./cjs/components/GroupHeader.js"
|
|
33
|
+
},
|
|
34
|
+
"./components/blocks": {
|
|
35
|
+
"import": "./esm/components/blocks.js",
|
|
36
|
+
"require": "./cjs/components/blocks.js"
|
|
37
|
+
},
|
|
38
|
+
"./Actions": {
|
|
39
|
+
"import": "./esm/Actions.js",
|
|
40
|
+
"require": "./cjs/Actions.js"
|
|
41
|
+
},
|
|
42
|
+
"./ActionItem": {
|
|
43
|
+
"import": "./esm/ActionItem.js",
|
|
44
|
+
"require": "./cjs/ActionItem.js"
|
|
45
|
+
}
|
|
46
|
+
},
|
|
8
47
|
"sideEffects": [
|
|
9
48
|
"*.css",
|
|
10
49
|
"*.scss"
|
|
11
50
|
],
|
|
51
|
+
"repository": {
|
|
52
|
+
"type": "git",
|
|
53
|
+
"url": "https://git.elliemae.io/platform-ui/dimsum.git"
|
|
54
|
+
},
|
|
55
|
+
"engines": {
|
|
56
|
+
"npm": ">=7",
|
|
57
|
+
"node": ">=14"
|
|
58
|
+
},
|
|
59
|
+
"author": "ICE MT",
|
|
12
60
|
"scripts": {
|
|
13
61
|
"dev": "cross-env NODE_ENV=development && node ../../scripts/build/build.js -w",
|
|
14
62
|
"prebuild": "exit 0",
|
|
@@ -16,23 +64,27 @@
|
|
|
16
64
|
"build": "node ../../scripts/build/build.js"
|
|
17
65
|
},
|
|
18
66
|
"dependencies": {
|
|
19
|
-
"@elliemae/ds-classnames": "
|
|
20
|
-
"@elliemae/ds-system": "
|
|
21
|
-
"@elliemae/ds-truncated-tooltip-text": "
|
|
67
|
+
"@elliemae/ds-classnames": "2.0.0-alpha.12",
|
|
68
|
+
"@elliemae/ds-system": "2.0.0-alpha.12",
|
|
69
|
+
"@elliemae/ds-truncated-tooltip-text": "2.0.0-alpha.12",
|
|
22
70
|
"prop-types": "~15.7.2",
|
|
23
|
-
"react-desc": "
|
|
24
|
-
"styled-system": "~5.1.5"
|
|
71
|
+
"react-desc": "~4.1.3"
|
|
25
72
|
},
|
|
26
73
|
"devDependencies": {
|
|
27
|
-
"
|
|
74
|
+
"@testing-library/jest-dom": "~5.15.0",
|
|
75
|
+
"@testing-library/react": "~12.1.2",
|
|
76
|
+
"styled-components": "~5.3.3",
|
|
77
|
+
"styled-system": "~5.1.5"
|
|
28
78
|
},
|
|
29
79
|
"peerDependencies": {
|
|
30
|
-
"react": "^17.0.
|
|
31
|
-
"react-dom": "^17.0.
|
|
32
|
-
"styled-components": "^5.3.
|
|
80
|
+
"react": "^17.0.2",
|
|
81
|
+
"react-dom": "^17.0.2",
|
|
82
|
+
"styled-components": "^5.3.3",
|
|
83
|
+
"styled-system": "^5.1.5"
|
|
33
84
|
},
|
|
34
85
|
"publishConfig": {
|
|
35
86
|
"access": "public",
|
|
36
|
-
"directory": "dist"
|
|
87
|
+
"directory": "dist",
|
|
88
|
+
"generateSubmodules": true
|
|
37
89
|
}
|
|
38
90
|
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import PropTypes from 'prop-types';
|
|
3
|
+
declare function ActionItem({ children }: {
|
|
4
|
+
children: any;
|
|
5
|
+
}): JSX.Element;
|
|
6
|
+
declare namespace ActionItem {
|
|
7
|
+
var propTypes: {
|
|
8
|
+
children: PropTypes.Validator<string | number | boolean | {} | PropTypes.ReactElementLike | PropTypes.ReactNodeArray>;
|
|
9
|
+
};
|
|
10
|
+
}
|
|
11
|
+
export default ActionItem;
|