@elliemae/ds-group-box 3.16.0-next.2 → 3.16.0-next.3
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
|
@@ -32,7 +32,7 @@ module.exports = __toCommonJS(DSGroupBox_exports);
|
|
|
32
32
|
var React = __toESM(require("react"));
|
|
33
33
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
34
34
|
var import_react = __toESM(require("react"));
|
|
35
|
-
var
|
|
35
|
+
var import_ds_props_helpers = require("@elliemae/ds-props-helpers");
|
|
36
36
|
var import_blocks = require("./components/blocks");
|
|
37
37
|
var import_GroupHeader = require("./components/GroupHeader");
|
|
38
38
|
var import_constants = require("./constants");
|
|
@@ -90,26 +90,26 @@ const DSGroupBox = ({
|
|
|
90
90
|
] });
|
|
91
91
|
};
|
|
92
92
|
const props = {
|
|
93
|
-
containerProps:
|
|
94
|
-
labelProps:
|
|
95
|
-
labelText:
|
|
96
|
-
borderBottom:
|
|
97
|
-
id:
|
|
93
|
+
containerProps: import_ds_props_helpers.PropTypes.object.description("props to inject to wrapper"),
|
|
94
|
+
labelProps: import_ds_props_helpers.PropTypes.shape({
|
|
95
|
+
labelText: import_ds_props_helpers.PropTypes.oneOfType([import_ds_props_helpers.PropTypes.string, import_ds_props_helpers.PropTypes.element]),
|
|
96
|
+
borderBottom: import_ds_props_helpers.PropTypes.bool,
|
|
97
|
+
id: import_ds_props_helpers.PropTypes.string
|
|
98
98
|
}).description("Label attributes to be rendered"),
|
|
99
|
-
type:
|
|
100
|
-
children:
|
|
99
|
+
type: import_ds_props_helpers.PropTypes.oneOf(import_constants.BOX_TYPES_ARRAY).description(import_constants.BOX_TYPES_ARRAY.toString()),
|
|
100
|
+
children: import_ds_props_helpers.PropTypes.oneOfType([import_ds_props_helpers.PropTypes.element, import_ds_props_helpers.PropTypes.arrayOf(import_ds_props_helpers.PropTypes.element)]).isRequired.description(
|
|
101
101
|
"Components to be rendered inside the box"
|
|
102
102
|
),
|
|
103
|
-
rightActions:
|
|
104
|
-
centerActions:
|
|
105
|
-
asRow:
|
|
106
|
-
onlyHeader:
|
|
107
|
-
noBorder:
|
|
108
|
-
noPadding:
|
|
103
|
+
rightActions: import_ds_props_helpers.PropTypes.arrayOf(import_ds_props_helpers.PropTypes.element).description("Actions on the right side of the label"),
|
|
104
|
+
centerActions: import_ds_props_helpers.PropTypes.arrayOf(import_ds_props_helpers.PropTypes.element).description("Actions on the next to the label"),
|
|
105
|
+
asRow: import_ds_props_helpers.PropTypes.bool.description("Display the content of the group box with flex direction row"),
|
|
106
|
+
onlyHeader: import_ds_props_helpers.PropTypes.bool.description("Show border only on the header"),
|
|
107
|
+
noBorder: import_ds_props_helpers.PropTypes.bool.description("Remove the wrapper border"),
|
|
108
|
+
noPadding: import_ds_props_helpers.PropTypes.bool.description("Remove the top and bottom padding from the content")
|
|
109
109
|
};
|
|
110
110
|
DSGroupBox.propTypes = props;
|
|
111
111
|
DSGroupBox.displayName = "DSGroupBox";
|
|
112
|
-
const DSGroupBoxWithSchema = (0,
|
|
112
|
+
const DSGroupBoxWithSchema = (0, import_ds_props_helpers.describe)(DSGroupBox);
|
|
113
113
|
DSGroupBoxWithSchema.propTypes = props;
|
|
114
114
|
var DSGroupBox_default = DSGroupBox;
|
|
115
115
|
//# sourceMappingURL=DSGroupBox.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/DSGroupBox.tsx", "../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["import React from 'react';\nimport { PropTypes, describe } from '@elliemae/ds-
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;AD0BnB;AA1BJ,mBAAkB;AAClB,
|
|
4
|
+
"sourcesContent": ["import React from 'react';\nimport { PropTypes, describe } from '@elliemae/ds-props-helpers';\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 {...containerProps} classProps={{ onlyHeader, noBorder, type, isMain }}>\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(BOX_TYPES_ARRAY.toString()),\n /**\n * Components to be rendered inside the box\n */\n children: PropTypes.oneOfType([PropTypes.element, PropTypes.arrayOf(PropTypes.element)]).isRequired.description(\n 'Components to be rendered inside the box',\n ),\n /**\n * Actions on the right side of the label\n */\n rightActions: PropTypes.arrayOf(PropTypes.element).description('Actions on the right side of the label'),\n /**\n * Actions on the next to the label\n */\n centerActions: PropTypes.arrayOf(PropTypes.element).description('Actions on the next to the label'),\n /**\n * Display the content of the group box with flex direction row\n */\n asRow: PropTypes.bool.description('Display the content of the group box with flex direction row'),\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('Remove the top and bottom padding from the content'),\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": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;AD0BnB;AA1BJ,mBAAkB;AAClB,8BAAoC;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;AACX,MAAM;AACJ,QAAM,EAAE,UAAU,IAAI;AACtB,SACE,6CAAC,iCAAiB,GAAG,gBAAgB,YAAY,EAAE,YAAY,UAAU,MAAM,OAAO,GACnF;AAAA,iBACC;AAAA,MAAC;AAAA;AAAA,QACC;AAAA,QACA;AAAA,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;AACvB,WAAW,cAAc;AACzB,MAAM,2BAAuB,kCAAS,UAAU;AAEhD,qBAAqB,YAAY;AAGjC,IAAO,qBAAQ;",
|
|
6
6
|
"names": ["React"]
|
|
7
7
|
}
|
package/dist/esm/DSGroupBox.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
3
|
import React2 from "react";
|
|
4
|
-
import { PropTypes, describe } from "@elliemae/ds-
|
|
4
|
+
import { PropTypes, describe } from "@elliemae/ds-props-helpers";
|
|
5
5
|
import { GroupBoxWrapper, GroupBoxContent } from "./components/blocks";
|
|
6
6
|
import { DSGroupBoxHeader } from "./components/GroupHeader";
|
|
7
7
|
import { BOX_TYPES, BOX_TYPES_ARRAY } from "./constants";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../scripts/build/transpile/react-shim.js", "../../src/DSGroupBox.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { PropTypes, describe } from '@elliemae/ds-
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { PropTypes, describe } from '@elliemae/ds-props-helpers';\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 {...containerProps} classProps={{ onlyHeader, noBorder, type, isMain }}>\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(BOX_TYPES_ARRAY.toString()),\n /**\n * Components to be rendered inside the box\n */\n children: PropTypes.oneOfType([PropTypes.element, PropTypes.arrayOf(PropTypes.element)]).isRequired.description(\n 'Components to be rendered inside the box',\n ),\n /**\n * Actions on the right side of the label\n */\n rightActions: PropTypes.arrayOf(PropTypes.element).description('Actions on the right side of the label'),\n /**\n * Actions on the next to the label\n */\n centerActions: PropTypes.arrayOf(PropTypes.element).description('Actions on the next to the label'),\n /**\n * Display the content of the group box with flex direction row\n */\n asRow: PropTypes.bool.description('Display the content of the group box with flex direction row'),\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('Remove the top and bottom padding from the content'),\n};\n\nDSGroupBox.propTypes = props;\nDSGroupBox.displayName = 'DSGroupBox';\nconst DSGroupBoxWithSchema = describe(DSGroupBox);\n\nDS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,YAAY,4BAA4B;AAAA,EAIzE,YAAY,UAAU,MAAM;AAAA,IAC1B,WAAW,UAAU,UAAU,CAAC,UAAU,QAAQ,UAAU,OAAO,CAAC;AAAA,IACpE,cAAc,UAAU;AAAA,IACxB,IAAI,UAAU;AAAA,EAChB,CAAC,EAAE,YAAY,iCAAiC;AAAA,EAIhD,MAAM,UAAU,MAAM,eAAe,EAAE,YAAY,gBAAgB,SAAS,CAAC;AAAA,EAI7E,UAAU,UAAU,UAAU,CAAC,UAAU,SAAS,UAAU,QAAQ,UAAU,OAAO,CAAC,CAAC,EAAE,WAAW;AAAA,IAClG;AAAA,EACF;AAAA,EAIA,cAAc,UAAU,QAAQ,UAAU,OAAO,EAAE,YAAY,wCAAwC;AAAA,EAIvG,eAAe,UAAU,QAAQ,UAAU,OAAO,EAAE,YAAY,kCAAkC;AAAA,EAIlG,OAAO,UAAU,KAAK,YAAY,8DAA8D;AAAA,EAIhG,YAAY,UAAU,KAAK,YAAY,gCAAgC;AAAA,EAIvE,UAAU,UAAU,KAAK,YAAY,2BAA2B;AAAA,EAIhE,WAAW,UAAU,KAAK,YAAY,oDAAoD;AAC5F;AAEA,WAAW,YAAY;AACvB,WAAW,cAAc;AACzB,MAAM,uBAAuB,SAAS,UAAU;AAEhD,qBAAqB,YAAY;AAGjC,IAAO,qBAAQ;",
|
|
6
6
|
"names": ["React"]
|
|
7
7
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elliemae/ds-group-box",
|
|
3
|
-
"version": "3.16.0-next.
|
|
3
|
+
"version": "3.16.0-next.3",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "ICE MT - Dimsum - Group Box",
|
|
6
6
|
"files": [
|
|
@@ -68,10 +68,11 @@
|
|
|
68
68
|
},
|
|
69
69
|
"dependencies": {
|
|
70
70
|
"prop-types": "~15.8.1",
|
|
71
|
-
"@elliemae/ds-classnames": "3.16.0-next.
|
|
72
|
-
"@elliemae/ds-
|
|
73
|
-
"@elliemae/ds-
|
|
74
|
-
"@elliemae/ds-
|
|
71
|
+
"@elliemae/ds-classnames": "3.16.0-next.3",
|
|
72
|
+
"@elliemae/ds-props-helpers": "3.16.0-next.3",
|
|
73
|
+
"@elliemae/ds-system": "3.16.0-next.3",
|
|
74
|
+
"@elliemae/ds-truncated-tooltip-text": "3.16.0-next.3",
|
|
75
|
+
"@elliemae/ds-utilities": "3.16.0-next.3"
|
|
75
76
|
},
|
|
76
77
|
"devDependencies": {
|
|
77
78
|
"@testing-library/jest-dom": "~5.16.4",
|
|
@@ -95,7 +96,7 @@
|
|
|
95
96
|
"eslint:fix": "eslint --ext='.js,.jsx,.test.js,.ts,.tsx' --fix --config='../../.eslintrc.js' src/",
|
|
96
97
|
"dts": "node ../../scripts/dts.mjs",
|
|
97
98
|
"build": "cross-env NODE_ENV=production node ../../scripts/build/build.mjs",
|
|
98
|
-
"dev:build": "pnpm --filter {.}... build
|
|
99
|
+
"dev:build": "pnpm --filter {.}... build",
|
|
99
100
|
"dev:install": "pnpm --filter {.}... i --no-lockfile && pnpm run dev:build",
|
|
100
101
|
"checkDeps": "npx -yes ../ds-codemods check-missing-packages --projectFolderPath=\"./\" --ignorePackagesGlobPattern=\"\" --ignoreFilesGlobPattern=\"**/test-ables/*,**/tests/*\""
|
|
101
102
|
}
|