@elliemae/ds-group-box 3.3.0-next.3 → 3.3.0-next.6
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/dist/cjs/DSGroupBox.js
CHANGED
|
@@ -1,27 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var __create = Object.create;
|
|
3
3
|
var __defProp = Object.defineProperty;
|
|
4
|
-
var __defProps = Object.defineProperties;
|
|
5
4
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
6
|
-
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
7
5
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
8
|
-
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
9
6
|
var __getProtoOf = Object.getPrototypeOf;
|
|
10
7
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
11
|
-
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
12
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
13
|
-
var __spreadValues = (a, b) => {
|
|
14
|
-
for (var prop in b || (b = {}))
|
|
15
|
-
if (__hasOwnProp.call(b, prop))
|
|
16
|
-
__defNormalProp(a, prop, b[prop]);
|
|
17
|
-
if (__getOwnPropSymbols)
|
|
18
|
-
for (var prop of __getOwnPropSymbols(b)) {
|
|
19
|
-
if (__propIsEnum.call(b, prop))
|
|
20
|
-
__defNormalProp(a, prop, b[prop]);
|
|
21
|
-
}
|
|
22
|
-
return a;
|
|
23
|
-
};
|
|
24
|
-
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
25
8
|
var __export = (target, all) => {
|
|
26
9
|
for (var name in all)
|
|
27
10
|
__defProp(target, name, { get: all[name], enumerable: true });
|
|
@@ -67,9 +50,10 @@ const DSGroupBox = ({
|
|
|
67
50
|
isMain = true
|
|
68
51
|
}) => {
|
|
69
52
|
const { labelText } = labelProps;
|
|
70
|
-
return /* @__PURE__ */ import_react.default.createElement(import_blocks.GroupBoxWrapper,
|
|
53
|
+
return /* @__PURE__ */ import_react.default.createElement(import_blocks.GroupBoxWrapper, {
|
|
54
|
+
...containerProps,
|
|
71
55
|
classProps: { onlyHeader, noBorder, type, isMain }
|
|
72
|
-
}
|
|
56
|
+
}, labelText && /* @__PURE__ */ import_react.default.createElement(import_GroupHeader.DSGroupBoxHeader, {
|
|
73
57
|
centerActions,
|
|
74
58
|
isMain,
|
|
75
59
|
labelProps,
|
|
@@ -85,9 +69,10 @@ const DSGroupBox = ({
|
|
|
85
69
|
noBorder,
|
|
86
70
|
noBorderTop: !!labelText
|
|
87
71
|
}
|
|
88
|
-
}, components && components.props ? import_react.default.Children.map(components, (component) => import_react.default.cloneElement(component,
|
|
72
|
+
}, components && components.props ? import_react.default.Children.map(components, (component) => import_react.default.cloneElement(component, {
|
|
73
|
+
...component.props,
|
|
89
74
|
isMain: false
|
|
90
|
-
})
|
|
75
|
+
}), null) : components));
|
|
91
76
|
};
|
|
92
77
|
const props = {
|
|
93
78
|
containerProps: import_ds_utilities.PropTypes.object.description("props to inject to wrapper"),
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/DSGroupBox.tsx", "../../../../scripts/build/transpile/react-shim.js"],
|
|
4
4
|
"sourcesContent": ["import React from 'react';\nimport { PropTypes, describe } from '@elliemae/ds-utilities';\nimport { GroupBoxWrapper, GroupBoxContent } from './components/blocks';\nimport { DSGroupBoxHeader } from './components/GroupHeader';\nimport { BOX_TYPES, BOX_TYPES_ARRAY } from './constants';\n\nconst DSGroupBox = ({\n containerProps = {},\n labelProps = {\n labelText: '',\n borderBottom: false,\n id: 'ds-group-box__header',\n },\n rightActions = [],\n centerActions = [],\n type = BOX_TYPES.CATEGORY,\n asRow = false,\n onlyHeader = false,\n noBorder = true,\n noPadding = false,\n children: components = [],\n // eslint-disable-next-line react/prop-types\n isMain = true,\n}) => {\n const { labelText } = labelProps;\n return (\n <GroupBoxWrapper\n {...containerProps}\n classProps={{ onlyHeader, noBorder, type, isMain }}\n >\n {labelText && (\n <DSGroupBoxHeader\n centerActions={centerActions}\n isMain={isMain}\n labelProps={labelProps}\n noBorder={noBorder}\n rightActions={rightActions}\n type={type}\n />\n )}\n\n <GroupBoxContent\n classProps={{\n type,\n asRow,\n onlyHeader,\n noPadding,\n noBorder,\n noBorderTop: !!labelText,\n }}\n >\n {components && components.props\n ? React.Children.map(\n components,\n (component) =>\n React.cloneElement(component, {\n ...component.props,\n isMain: false,\n }),\n null,\n )\n : components}\n </GroupBoxContent>\n </GroupBoxWrapper>\n );\n};\n\nconst props = {\n /** props to inject to wrapper */\n containerProps: PropTypes.object.description('props to inject to wrapper'),\n /**\n * Label attributes to be rendered\n */\n labelProps: PropTypes.shape({\n labelText: PropTypes.oneOfType([PropTypes.string, PropTypes.element]),\n borderBottom: PropTypes.bool,\n id: PropTypes.string,\n }).description('Label attributes to be rendered'),\n /**\n * ['category-box', 'group-box']\n */\n type: PropTypes.oneOf(BOX_TYPES_ARRAY).description(\n BOX_TYPES_ARRAY.toString(),\n ),\n /**\n * Components to be rendered inside the box\n */\n children: PropTypes.oneOfType([\n PropTypes.element,\n PropTypes.arrayOf(PropTypes.element),\n ]).isRequired.description('Components to be rendered inside the box'),\n /**\n * Actions on the right side of the label\n */\n rightActions: PropTypes.arrayOf(PropTypes.element).description(\n 'Actions on the right side of the label',\n ),\n /**\n * Actions on the next to the label\n */\n centerActions: PropTypes.arrayOf(PropTypes.element).description(\n 'Actions on the next to the label',\n ),\n /**\n * Display the content of the group box with flex direction row\n */\n asRow: PropTypes.bool.description(\n 'Display the content of the group box with flex direction row',\n ),\n /**\n * Show border only on the header\n */\n onlyHeader: PropTypes.bool.description('Show border only on the header'),\n /**\n * Remove the wrapper border\n */\n noBorder: PropTypes.bool.description('Remove the wrapper border'),\n /**\n * Remove the top and bottom padding from the content\n */\n noPadding: PropTypes.bool.description(\n 'Remove the top and bottom padding from the content',\n ),\n};\n\nDSGroupBox.propTypes = props;\nDSGroupBox.displayName = 'DSGroupBox';\nconst DSGroupBoxWithSchema = describe(DSGroupBox);\n\nDSGroupBoxWithSchema.propTypes = props;\n\nexport { DSGroupBox, DSGroupBoxWithSchema };\nexport default DSGroupBox;\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
-
"mappings": "
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,mBAAkB;AAClB,0BAAoC;AACpC,oBAAiD;AACjD,yBAAiC;AACjC,uBAA2C;AAE3C,MAAM,aAAa,CAAC;AAAA,EAClB,iBAAiB,CAAC;AAAA,EAClB,aAAa;AAAA,IACX,WAAW;AAAA,IACX,cAAc;AAAA,IACd,IAAI;AAAA,EACN;AAAA,EACA,eAAe,CAAC;AAAA,EAChB,gBAAgB,CAAC;AAAA,EACjB,OAAO,2BAAU;AAAA,EACjB,QAAQ;AAAA,EACR,aAAa;AAAA,EACb,WAAW;AAAA,EACX,YAAY;AAAA,EACZ,UAAU,aAAa,CAAC;AAAA,EAExB,SAAS;AAAA,MACL;AACJ,QAAM,EAAE,cAAc;AACtB,SACE,mDAAC;AAAA,IACE,GAAG;AAAA,IACJ,YAAY,EAAE,YAAY,UAAU,MAAM,OAAO;AAAA,KAEhD,aACC,mDAAC;AAAA,IACC;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,GACF,GAGF,mDAAC;AAAA,IACC,YAAY;AAAA,MACV;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA,aAAa,CAAC,CAAC;AAAA,IACjB;AAAA,KAEC,cAAc,WAAW,QACtB,qBAAM,SAAS,IACb,YACA,CAAC,cACC,qBAAM,aAAa,WAAW;AAAA,IAC5B,GAAG,UAAU;AAAA,IACb,QAAQ;AAAA,EACV,CAAC,GACH,IACF,IACA,UACN,CACF;AAEJ;AAEA,MAAM,QAAQ;AAAA,EAEZ,gBAAgB,8BAAU,OAAO,YAAY,4BAA4B;AAAA,EAIzE,YAAY,8BAAU,MAAM;AAAA,IAC1B,WAAW,8BAAU,UAAU,CAAC,8BAAU,QAAQ,8BAAU,OAAO,CAAC;AAAA,IACpE,cAAc,8BAAU;AAAA,IACxB,IAAI,8BAAU;AAAA,EAChB,CAAC,EAAE,YAAY,iCAAiC;AAAA,EAIhD,MAAM,8BAAU,MAAM,gCAAe,EAAE,YACrC,iCAAgB,SAAS,CAC3B;AAAA,EAIA,UAAU,8BAAU,UAAU;AAAA,IAC5B,8BAAU;AAAA,IACV,8BAAU,QAAQ,8BAAU,OAAO;AAAA,EACrC,CAAC,EAAE,WAAW,YAAY,0CAA0C;AAAA,EAIpE,cAAc,8BAAU,QAAQ,8BAAU,OAAO,EAAE,YACjD,wCACF;AAAA,EAIA,eAAe,8BAAU,QAAQ,8BAAU,OAAO,EAAE,YAClD,kCACF;AAAA,EAIA,OAAO,8BAAU,KAAK,YACpB,8DACF;AAAA,EAIA,YAAY,8BAAU,KAAK,YAAY,gCAAgC;AAAA,EAIvE,UAAU,8BAAU,KAAK,YAAY,2BAA2B;AAAA,EAIhE,WAAW,8BAAU,KAAK,YACxB,oDACF;AACF;AAEA,WAAW,YAAY;AACvB,WAAW,cAAc;AACzB,MAAM,uBAAuB,kCAAS,UAAU;AAEhD,qBAAqB,YAAY;AAGjC,IAAO,qBAAQ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/dist/esm/DSGroupBox.js
CHANGED
|
@@ -1,23 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __defProps = Object.defineProperties;
|
|
4
|
-
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
5
|
-
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
6
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
-
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
8
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
9
|
-
var __spreadValues = (a, b) => {
|
|
10
|
-
for (var prop in b || (b = {}))
|
|
11
|
-
if (__hasOwnProp.call(b, prop))
|
|
12
|
-
__defNormalProp(a, prop, b[prop]);
|
|
13
|
-
if (__getOwnPropSymbols)
|
|
14
|
-
for (var prop of __getOwnPropSymbols(b)) {
|
|
15
|
-
if (__propIsEnum.call(b, prop))
|
|
16
|
-
__defNormalProp(a, prop, b[prop]);
|
|
17
|
-
}
|
|
18
|
-
return a;
|
|
19
|
-
};
|
|
20
|
-
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
21
2
|
import * as React from "react";
|
|
22
3
|
import React2 from "react";
|
|
23
4
|
import { PropTypes, describe } from "@elliemae/ds-utilities";
|
|
@@ -42,9 +23,10 @@ const DSGroupBox = ({
|
|
|
42
23
|
isMain = true
|
|
43
24
|
}) => {
|
|
44
25
|
const { labelText } = labelProps;
|
|
45
|
-
return /* @__PURE__ */ React2.createElement(GroupBoxWrapper,
|
|
26
|
+
return /* @__PURE__ */ React2.createElement(GroupBoxWrapper, {
|
|
27
|
+
...containerProps,
|
|
46
28
|
classProps: { onlyHeader, noBorder, type, isMain }
|
|
47
|
-
}
|
|
29
|
+
}, labelText && /* @__PURE__ */ React2.createElement(DSGroupBoxHeader, {
|
|
48
30
|
centerActions,
|
|
49
31
|
isMain,
|
|
50
32
|
labelProps,
|
|
@@ -60,9 +42,10 @@ const DSGroupBox = ({
|
|
|
60
42
|
noBorder,
|
|
61
43
|
noBorderTop: !!labelText
|
|
62
44
|
}
|
|
63
|
-
}, components && components.props ? React2.Children.map(components, (component) => React2.cloneElement(component,
|
|
45
|
+
}, components && components.props ? React2.Children.map(components, (component) => React2.cloneElement(component, {
|
|
46
|
+
...component.props,
|
|
64
47
|
isMain: false
|
|
65
|
-
})
|
|
48
|
+
}), null) : components));
|
|
66
49
|
};
|
|
67
50
|
const props = {
|
|
68
51
|
containerProps: PropTypes.object.description("props to inject to wrapper"),
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../scripts/build/transpile/react-shim.js", "../../src/DSGroupBox.tsx"],
|
|
4
4
|
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { PropTypes, describe } from '@elliemae/ds-utilities';\nimport { GroupBoxWrapper, GroupBoxContent } from './components/blocks';\nimport { DSGroupBoxHeader } from './components/GroupHeader';\nimport { BOX_TYPES, BOX_TYPES_ARRAY } from './constants';\n\nconst DSGroupBox = ({\n containerProps = {},\n labelProps = {\n labelText: '',\n borderBottom: false,\n id: 'ds-group-box__header',\n },\n rightActions = [],\n centerActions = [],\n type = BOX_TYPES.CATEGORY,\n asRow = false,\n onlyHeader = false,\n noBorder = true,\n noPadding = false,\n children: components = [],\n // eslint-disable-next-line react/prop-types\n isMain = true,\n}) => {\n const { labelText } = labelProps;\n return (\n <GroupBoxWrapper\n {...containerProps}\n classProps={{ onlyHeader, noBorder, type, isMain }}\n >\n {labelText && (\n <DSGroupBoxHeader\n centerActions={centerActions}\n isMain={isMain}\n labelProps={labelProps}\n noBorder={noBorder}\n rightActions={rightActions}\n type={type}\n />\n )}\n\n <GroupBoxContent\n classProps={{\n type,\n asRow,\n onlyHeader,\n noPadding,\n noBorder,\n noBorderTop: !!labelText,\n }}\n >\n {components && components.props\n ? React.Children.map(\n components,\n (component) =>\n React.cloneElement(component, {\n ...component.props,\n isMain: false,\n }),\n null,\n )\n : components}\n </GroupBoxContent>\n </GroupBoxWrapper>\n );\n};\n\nconst props = {\n /** props to inject to wrapper */\n containerProps: PropTypes.object.description('props to inject to wrapper'),\n /**\n * Label attributes to be rendered\n */\n labelProps: PropTypes.shape({\n labelText: PropTypes.oneOfType([PropTypes.string, PropTypes.element]),\n borderBottom: PropTypes.bool,\n id: PropTypes.string,\n }).description('Label attributes to be rendered'),\n /**\n * ['category-box', 'group-box']\n */\n type: PropTypes.oneOf(BOX_TYPES_ARRAY).description(\n BOX_TYPES_ARRAY.toString(),\n ),\n /**\n * Components to be rendered inside the box\n */\n children: PropTypes.oneOfType([\n PropTypes.element,\n PropTypes.arrayOf(PropTypes.element),\n ]).isRequired.description('Components to be rendered inside the box'),\n /**\n * Actions on the right side of the label\n */\n rightActions: PropTypes.arrayOf(PropTypes.element).description(\n 'Actions on the right side of the label',\n ),\n /**\n * Actions on the next to the label\n */\n centerActions: PropTypes.arrayOf(PropTypes.element).description(\n 'Actions on the next to the label',\n ),\n /**\n * Display the content of the group box with flex direction row\n */\n asRow: PropTypes.bool.description(\n 'Display the content of the group box with flex direction row',\n ),\n /**\n * Show border only on the header\n */\n onlyHeader: PropTypes.bool.description('Show border only on the header'),\n /**\n * Remove the wrapper border\n */\n noBorder: PropTypes.bool.description('Remove the wrapper border'),\n /**\n * Remove the top and bottom padding from the content\n */\n noPadding: PropTypes.bool.description(\n 'Remove the top and bottom padding from the content',\n ),\n};\n\nDSGroupBox.propTypes = props;\nDSGroupBox.displayName = 'DSGroupBox';\nconst DSGroupBoxWithSchema = describe(DSGroupBox);\n\nDSGroupBoxWithSchema.propTypes = props;\n\nexport { DSGroupBox, DSGroupBoxWithSchema };\nexport default DSGroupBox;\n"],
|
|
5
|
-
"mappings": "
|
|
5
|
+
"mappings": ";AAAA;ACAA;AACA;AACA;AACA;AACA;AAEA,MAAM,aAAa,CAAC;AAAA,EAClB,iBAAiB,CAAC;AAAA,EAClB,aAAa;AAAA,IACX,WAAW;AAAA,IACX,cAAc;AAAA,IACd,IAAI;AAAA,EACN;AAAA,EACA,eAAe,CAAC;AAAA,EAChB,gBAAgB,CAAC;AAAA,EACjB,OAAO,UAAU;AAAA,EACjB,QAAQ;AAAA,EACR,aAAa;AAAA,EACb,WAAW;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YAAY,gCAAgC;AAAA,EAIvE,UAAU,UAAU,KAAK,YAAY,2BAA2B;AAAA,EAIhE,WAAW,UAAU,KAAK,YACxB,oDACF;AACF;AAEA,WAAW,YAAY;AACvB,WAAW,cAAc;AACzB,MAAM,uBAAuB,SAAS,UAAU;AAEhD,qBAAqB,YAAY;AAGjC,IAAO,qBAAQ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elliemae/ds-group-box",
|
|
3
|
-
"version": "3.3.0-next.
|
|
3
|
+
"version": "3.3.0-next.6",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "ICE MT - Dimsum - Group Box",
|
|
6
6
|
"files": [
|
|
@@ -67,10 +67,10 @@
|
|
|
67
67
|
"indent": 4
|
|
68
68
|
},
|
|
69
69
|
"dependencies": {
|
|
70
|
-
"@elliemae/ds-classnames": "3.3.0-next.
|
|
71
|
-
"@elliemae/ds-system": "3.3.0-next.
|
|
72
|
-
"@elliemae/ds-truncated-tooltip-text": "3.3.0-next.
|
|
73
|
-
"@elliemae/ds-utilities": "3.3.0-next.
|
|
70
|
+
"@elliemae/ds-classnames": "3.3.0-next.6",
|
|
71
|
+
"@elliemae/ds-system": "3.3.0-next.6",
|
|
72
|
+
"@elliemae/ds-truncated-tooltip-text": "3.3.0-next.6",
|
|
73
|
+
"@elliemae/ds-utilities": "3.3.0-next.6",
|
|
74
74
|
"prop-types": "~15.8.1"
|
|
75
75
|
},
|
|
76
76
|
"devDependencies": {
|