@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.
Files changed (55) hide show
  1. package/cjs/ActionItem.js +9 -15
  2. package/cjs/Actions.js +15 -27
  3. package/cjs/DSGroupBox.js +63 -74
  4. package/cjs/GroupBoxLabel.js +18 -42
  5. package/cjs/LabelElement.js +9 -15
  6. package/cjs/components/GroupHeader.js +25 -30
  7. package/cjs/components/blocks.js +42 -36
  8. package/cjs/constants.js +2 -3
  9. package/cjs/index.js +1 -18
  10. package/esm/ActionItem.js +8 -13
  11. package/esm/Actions.js +13 -24
  12. package/esm/DSGroupBox.js +57 -68
  13. package/esm/GroupBoxLabel.js +17 -40
  14. package/esm/LabelElement.js +8 -13
  15. package/esm/components/GroupHeader.js +24 -29
  16. package/esm/components/blocks.js +42 -32
  17. package/esm/constants.js +2 -3
  18. package/esm/index.js +0 -17
  19. package/package.json +66 -14
  20. package/types/ActionItem.d.ts +11 -0
  21. package/types/Actions.d.ts +16 -0
  22. package/types/DSGroupBox.d.ts +129 -0
  23. package/types/GroupBoxLabel.d.ts +21 -0
  24. package/types/LabelElement.d.ts +11 -0
  25. package/types/components/GroupHeader.d.ts +13 -0
  26. package/types/components/blocks.d.ts +4 -0
  27. package/types/constants.d.ts +5 -0
  28. package/types/index.d.ts +3 -0
  29. package/types/tests/DSGroupBox.test.d.ts +1 -0
  30. package/ActionItem/package.json +0 -10
  31. package/Actions/package.json +0 -10
  32. package/DSGroupBox/package.json +0 -10
  33. package/GroupBoxLabel/package.json +0 -10
  34. package/LabelElement/package.json +0 -10
  35. package/cjs/ActionItem.js.map +0 -1
  36. package/cjs/Actions.js.map +0 -1
  37. package/cjs/DSGroupBox.js.map +0 -1
  38. package/cjs/GroupBoxLabel.js.map +0 -1
  39. package/cjs/LabelElement.js.map +0 -1
  40. package/cjs/components/GroupHeader.js.map +0 -1
  41. package/cjs/components/blocks.js.map +0 -1
  42. package/cjs/constants.js.map +0 -1
  43. package/cjs/index.js.map +0 -1
  44. package/components/GroupHeader/package.json +0 -10
  45. package/components/blocks/package.json +0 -10
  46. package/constants/package.json +0 -10
  47. package/esm/ActionItem.js.map +0 -1
  48. package/esm/Actions.js.map +0 -1
  49. package/esm/DSGroupBox.js.map +0 -1
  50. package/esm/GroupBoxLabel.js.map +0 -1
  51. package/esm/LabelElement.js.map +0 -1
  52. package/esm/components/GroupHeader.js.map +0 -1
  53. package/esm/components/blocks.js.map +0 -1
  54. package/esm/constants.js.map +0 -1
  55. package/esm/index.js.map +0 -1
package/esm/ActionItem.js CHANGED
@@ -1,22 +1,17 @@
1
- import React from 'react';
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
- var ActionItemNode = /*#__PURE__*/styled.div.withConfig({
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;}"], function (props) {
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
- var children = _ref.children;
14
- return /*#__PURE__*/React.createElement(ActionItemNode, null, children);
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 React from 'react';
2
- import PropTypes from 'prop-types';
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
- /* eslint-disable react/forbid-prop-types */
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;", ""], function (props) {
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
- var _ref$actions = _ref.actions,
17
- actions = _ref$actions === void 0 ? [] : _ref$actions,
18
- centerActions = _ref.centerActions,
19
- rightActions = _ref.rightActions;
15
+ let {
16
+ actions = [],
17
+ centerActions,
18
+ rightActions
19
+ } = _ref;
20
20
  if (actions.length < 1) return null;
21
- return /*#__PURE__*/React.createElement(ActionsNode, {
21
+ return /*#__PURE__*/_jsx(ActionsNode, {
22
22
  marginLeft: !!rightActions && 'auto',
23
23
  marginRight: !!centerActions && 'auto'
24
- }, actions.map(function (action, key) {
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 '@elliemae/ds-classnames';
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
- var DSGroupBox = function DSGroupBox(_ref) {
24
- var _ref$containerProps = _ref.containerProps,
25
- containerProps = _ref$containerProps === void 0 ? {} : _ref$containerProps,
26
- _ref$labelProps = _ref.labelProps,
27
- labelProps = _ref$labelProps === void 0 ? {
28
- labelText: '',
29
- borderBottom: false,
30
- id: 'ds-group-box__header'
31
- } : _ref$labelProps,
32
- _ref$rightActions = _ref.rightActions,
33
- rightActions = _ref$rightActions === void 0 ? [] : _ref$rightActions,
34
- _ref$centerActions = _ref.centerActions,
35
- centerActions = _ref$centerActions === void 0 ? [] : _ref$centerActions,
36
- _ref$type = _ref.type,
37
- type = _ref$type === void 0 ? BOX_TYPES.CATEGORY : _ref$type,
38
- _ref$asRow = _ref.asRow,
39
- asRow = _ref$asRow === void 0 ? false : _ref$asRow,
40
- _ref$onlyHeader = _ref.onlyHeader,
41
- onlyHeader = _ref$onlyHeader === void 0 ? false : _ref$onlyHeader,
42
- _ref$noBorder = _ref.noBorder,
43
- noBorder = _ref$noBorder === void 0 ? true : _ref$noBorder,
44
- _ref$noPadding = _ref.noPadding,
45
- noPadding = _ref$noPadding === void 0 ? false : _ref$noPadding,
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: 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
- type: type,
56
- isMain: isMain
57
- }
58
- }), labelText && /*#__PURE__*/React.createElement(DSGroupBoxHeader, {
59
- centerActions: centerActions,
60
- isMain: isMain,
61
- labelProps: labelProps,
62
- noBorder: noBorder,
63
- rightActions: rightActions,
64
- type: type
65
- }), /*#__PURE__*/React.createElement(GroupBoxContent, {
66
- classProps: {
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
- }, null) : components));
68
+ })), null) : components)]
69
+ }));
79
70
  };
80
71
 
81
- var props = {
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
- DSGroupBox.propTypes = props;
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
@@ -1,56 +1,33 @@
1
- import React from 'react';
2
- import PropTypes from 'prop-types';
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
- var borderBase200 = function borderBase200(props) {
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
- var categoryBoxStyles = "\n width: 100%;\n height: 36px;\n padding:0 0;\n color: ".concat(function (props) {
12
- return props.theme.colors.neutral[800];
13
- }, ";\n display: flex;\n flex-direction: row;\n align-items: center;\n border-bottom: ").concat(borderBase200, "\n");
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
- })(["", " ", " ", " ", ""], function (props) {
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
- var borderBottom = _ref.borderBottom,
31
- children = _ref.children,
32
- noBorder = _ref.noBorder,
33
- isMain = _ref.isMain,
34
- type = _ref.type,
35
- id = _ref.id;
36
- return /*#__PURE__*/React.createElement(GroupBoxLabelNode, {
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
@@ -1,22 +1,17 @@
1
- import React from 'react';
2
- import PropTypes from 'prop-types';
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
- var LabelElementNode = /*#__PURE__*/styled.div.withConfig({
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;"], function (props) {
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
- var children = _ref.children;
14
- return /*#__PURE__*/React.createElement(LabelElementNode, null, children);
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 React from 'react';
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
- var DSGroupBoxHeader = function DSGroupBoxHeader(_ref) {
14
- var _ref$labelProps = _ref.labelProps,
15
- labelProps = _ref$labelProps === void 0 ? {
16
- labelText: '',
17
- borderBottom: false,
18
- id: 'ds-group-box__header'
19
- } : _ref$labelProps,
20
- _ref$rightActions = _ref.rightActions,
21
- rightActions = _ref$rightActions === void 0 ? [] : _ref$rightActions,
22
- _ref$centerActions = _ref.centerActions,
23
- centerActions = _ref$centerActions === void 0 ? [] : _ref$centerActions,
24
- _ref$type = _ref.type,
25
- type = _ref$type === void 0 ? BOX_TYPES.CATEGORY : _ref$type,
26
- noBorder = _ref.noBorder,
27
- isMain = _ref.isMain;
28
- var labelText = labelProps.labelText,
29
- borderBottom = labelProps.borderBottom,
30
- id = labelProps.id;
31
- return /*#__PURE__*/React.createElement(GroupBoxLabel, {
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__*/React.createElement(LabelElement, null, /*#__PURE__*/React.createElement(DSTruncatedTooltipText, {
33
+ }, void 0, /*#__PURE__*/_jsx(LabelElement, {}, void 0, /*#__PURE__*/_jsx(DSTruncatedTooltipText, {
38
34
  value: labelText
39
- })), /*#__PURE__*/React.createElement(Actions, {
35
+ })), /*#__PURE__*/_jsx(Actions, {
40
36
  actions: centerActions,
41
37
  centerActions: centerActions.length > 0
42
- }), /*#__PURE__*/React.createElement(Actions, {
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
@@ -1,40 +1,50 @@
1
- import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
2
1
  import { aggregatedClasses } from '@elliemae/ds-classnames';
3
2
 
4
- var blockName = 'group-box';
5
- var GroupBoxWrapper = aggregatedClasses('div')(blockName, 'wrapper', function (_ref) {
6
- var _ref2;
7
-
8
- var onlyHeader = _ref.onlyHeader,
9
- noBorder = _ref.noBorder,
10
- type = _ref.type,
11
- isMain = _ref.isMain;
12
- return _ref2 = {
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
- }, _defineProperty(_ref2, type, type), _defineProperty(_ref2, 'main-box', isMain), _defineProperty(_ref2, 'nested-box', !isMain), _ref2;
13
+ 'no-border': noBorder,
14
+ [type]: type,
15
+ 'main-box': isMain,
16
+ 'nested-box': !isMain
17
+ };
16
18
  });
17
- var GroupBoxContent = aggregatedClasses('div')(blockName, 'content', function (_ref3) {
18
- var _ref4;
19
-
20
- var type = _ref3.type,
21
- asRow = _ref3.asRow,
22
- onlyHeader = _ref3.onlyHeader,
23
- noPadding = _ref3.noPadding,
24
- noBorder = _ref3.noBorder,
25
- noBorderTop = _ref3.noBorderTop;
26
- return _ref4 = {}, _defineProperty(_ref4, type, type), _defineProperty(_ref4, 'as-row', asRow), _defineProperty(_ref4, 'only-header', onlyHeader), _defineProperty(_ref4, 'no-padding', noPadding), _defineProperty(_ref4, 'no-border', noBorder), _defineProperty(_ref4, 'no-border-top', noBorderTop), _ref4;
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
- var Label = aggregatedClasses('div')(blockName, 'label', function (_ref5) {
29
- var _ref6;
30
-
31
- var borderBottom = _ref5.borderBottom,
32
- type = _ref5.type,
33
- noBorder = _ref5.noBorder;
34
- return _ref6 = {
35
- 'border-bottom': borderBottom
36
- }, _defineProperty(_ref6, type, type), _defineProperty(_ref6, 'no-border', noBorder), _ref6;
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
- var BOX_TYPES = {
1
+ const BOX_TYPES = {
2
2
  CATEGORY: 'category-box',
3
3
  GROUP: 'group-box'
4
4
  };
5
- var BOX_TYPES_ARRAY = [BOX_TYPES.CATEGORY, BOX_TYPES.GROUP];
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": "1.60.0",
3
+ "version": "2.0.0-alpha.12",
4
4
  "license": "MIT",
5
- "description": "Ellie Mae - Dim Sum - Group Box",
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": "1.60.0",
20
- "@elliemae/ds-system": "1.60.0",
21
- "@elliemae/ds-truncated-tooltip-text": "1.60.0",
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": "^4.1.2",
24
- "styled-system": "~5.1.5"
71
+ "react-desc": "~4.1.3"
25
72
  },
26
73
  "devDependencies": {
27
- "styled-components": "~5.3.0"
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.1",
31
- "react-dom": "^17.0.1",
32
- "styled-components": "^5.3.0"
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;