@elliemae/ds-group-box 3.16.0-next.1 → 3.16.0-next.11

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.
@@ -32,7 +32,7 @@ var React = __toESM(require("react"));
32
32
  var import_jsx_runtime = require("react/jsx-runtime");
33
33
  var import_prop_types = __toESM(require("prop-types"));
34
34
  var import_ds_system = require("@elliemae/ds-system");
35
- var import_ActionItem = __toESM(require("./ActionItem"));
35
+ var import_ActionItem = __toESM(require("./ActionItem.js"));
36
36
  const ActionsNode = import_ds_system.styled.div`
37
37
  display: flex;
38
38
  flex-direction: row;
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/Actions.tsx", "../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["/* eslint-disable react/forbid-prop-types */\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport { styled, space, __UNSAFE_SPACE_TO_DIMSUM } from '@elliemae/ds-system';\nimport ActionItem from './ActionItem';\n\nconst ActionsNode = styled.div`\n display: flex;\n flex-direction: row;\n padding-left: ${(props) => __UNSAFE_SPACE_TO_DIMSUM(props.theme.space.m)};\n overflow: hidden;\n ${space}\n`;\n\nconst Actions = ({ actions = [], centerActions, rightActions }) => {\n if (actions.length < 1) return null;\n return (\n <ActionsNode marginLeft={!!rightActions && 'auto'} marginRight={!!centerActions && 'auto'}>\n {actions.map((action, key) => (\n <ActionItem key={key}>{action}</ActionItem>\n ))}\n </ActionsNode>\n );\n};\n\nActions.propTypes = {\n actions: PropTypes.array,\n centerActions: PropTypes.bool,\n rightActions: PropTypes.bool,\n};\n\nexport { Actions };\nexport default Actions;\n", "import * as React from 'react';\nexport { React };\n"],
4
+ "sourcesContent": ["/* eslint-disable react/forbid-prop-types */\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport { styled, space, __UNSAFE_SPACE_TO_DIMSUM } from '@elliemae/ds-system';\nimport ActionItem from './ActionItem.js';\n\nconst ActionsNode = styled.div`\n display: flex;\n flex-direction: row;\n padding-left: ${(props) => __UNSAFE_SPACE_TO_DIMSUM(props.theme.space.m)};\n overflow: hidden;\n ${space}\n`;\n\nconst Actions = ({ actions = [], centerActions, rightActions }) => {\n if (actions.length < 1) return null;\n return (\n <ActionsNode marginLeft={!!rightActions && 'auto'} marginRight={!!centerActions && 'auto'}>\n {actions.map((action, key) => (\n <ActionItem key={key}>{action}</ActionItem>\n ))}\n </ActionsNode>\n );\n};\n\nActions.propTypes = {\n actions: PropTypes.array,\n centerActions: PropTypes.bool,\n rightActions: PropTypes.bool,\n};\n\nexport { Actions };\nexport default Actions;\n", "import * as React from 'react';\nexport { React };\n"],
5
5
  "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADmBf;AAjBR,wBAAsB;AACtB,uBAAwD;AACxD,wBAAuB;AAEvB,MAAM,cAAc,wBAAO;AAAA;AAAA;AAAA,kBAGT,CAAC,cAAU,2CAAyB,MAAM,MAAM,MAAM,CAAC;AAAA;AAAA,IAErE;AAAA;AAGJ,MAAM,UAAU,CAAC,EAAE,UAAU,CAAC,GAAG,eAAe,aAAa,MAAM;AACjE,MAAI,QAAQ,SAAS;AAAG,WAAO;AAC/B,SACE,4CAAC,eAAY,YAAY,CAAC,CAAC,gBAAgB,QAAQ,aAAa,CAAC,CAAC,iBAAiB,QAChF,kBAAQ,IAAI,CAAC,QAAQ,QACpB,4CAAC,kBAAAA,SAAA,EAAsB,oBAAN,GAAa,CAC/B,GACH;AAEJ;AAEA,QAAQ,YAAY;AAAA,EAClB,SAAS,kBAAAC,QAAU;AAAA,EACnB,eAAe,kBAAAA,QAAU;AAAA,EACzB,cAAc,kBAAAA,QAAU;AAC1B;AAGA,IAAO,kBAAQ;",
6
6
  "names": ["ActionItem", "PropTypes"]
7
7
  }
@@ -32,10 +32,10 @@ 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 import_ds_utilities = require("@elliemae/ds-utilities");
36
- var import_blocks = require("./components/blocks");
37
- var import_GroupHeader = require("./components/GroupHeader");
38
- var import_constants = require("./constants");
35
+ var import_ds_props_helpers = require("@elliemae/ds-props-helpers");
36
+ var import_blocks = require("./components/blocks.js");
37
+ var import_GroupHeader = require("./components/GroupHeader.js");
38
+ var import_constants = require("./constants.js");
39
39
  const DSGroupBox = ({
40
40
  containerProps = {},
41
41
  labelProps = {
@@ -90,26 +90,26 @@ const DSGroupBox = ({
90
90
  ] });
91
91
  };
92
92
  const props = {
93
- containerProps: import_ds_utilities.PropTypes.object.description("props to inject to wrapper"),
94
- labelProps: import_ds_utilities.PropTypes.shape({
95
- labelText: import_ds_utilities.PropTypes.oneOfType([import_ds_utilities.PropTypes.string, import_ds_utilities.PropTypes.element]),
96
- borderBottom: import_ds_utilities.PropTypes.bool,
97
- id: import_ds_utilities.PropTypes.string
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: import_ds_utilities.PropTypes.oneOf(import_constants.BOX_TYPES_ARRAY).description(import_constants.BOX_TYPES_ARRAY.toString()),
100
- children: import_ds_utilities.PropTypes.oneOfType([import_ds_utilities.PropTypes.element, import_ds_utilities.PropTypes.arrayOf(import_ds_utilities.PropTypes.element)]).isRequired.description(
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: import_ds_utilities.PropTypes.arrayOf(import_ds_utilities.PropTypes.element).description("Actions on the right side of the label"),
104
- centerActions: import_ds_utilities.PropTypes.arrayOf(import_ds_utilities.PropTypes.element).description("Actions on the next to the label"),
105
- asRow: import_ds_utilities.PropTypes.bool.description("Display the content of the group box with flex direction row"),
106
- onlyHeader: import_ds_utilities.PropTypes.bool.description("Show border only on the header"),
107
- noBorder: import_ds_utilities.PropTypes.bool.description("Remove the wrapper border"),
108
- noPadding: import_ds_utilities.PropTypes.bool.description("Remove the top and bottom padding from the content")
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, import_ds_utilities.describe)(DSGroupBox);
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-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 {...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,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;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,QACA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vB,WAAW,cAAc;AACzB,MAAM,2BAAuB,8BAAS,UAAU;AAEhD,qBAAqB,YAAY;AAGjC,IAAO,qBAAQ;",
4
+ "sourcesContent": ["import React from 'react';\nimport { PropTypes, describe } from '@elliemae/ds-props-helpers';\nimport { GroupBoxWrapper, GroupBoxContent } from './components/blocks.js';\nimport { DSGroupBoxHeader } from './components/GroupHeader.js';\nimport { BOX_TYPES, BOX_TYPES_ARRAY } from './constants.js';\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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AAY,gCAAgC;AAAA,EAIvE,UAAU,kCAAU,KAAK,YAAY,2BAA2B;AAAA,EAIhE,WAAW,kCAAU,KAAK,YAAY,oDAAoD;AAC5F;AAEA,WAAW,YAAY;AACvB,WAAW,cAAc;AACzB,MAAM,2BAAuB,kCAAS,UAAU;AAEhD,qBAAqB,YAAY;AAGjC,IAAO,qBAAQ;",
6
6
  "names": ["React"]
7
7
  }
@@ -31,7 +31,7 @@ var React = __toESM(require("react"));
31
31
  var import_jsx_runtime = require("react/jsx-runtime");
32
32
  var import_prop_types = __toESM(require("prop-types"));
33
33
  var import_ds_system = require("@elliemae/ds-system");
34
- var import_constants = require("./constants");
34
+ var import_constants = require("./constants.js");
35
35
  const borderBase200 = (props) => `1px solid ${props.theme.colors.neutral[200]};`;
36
36
  const categoryBoxStyles = `
37
37
  width: 100%;
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/GroupBoxLabel.tsx", "../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["import React from 'react';\nimport PropTypes from 'prop-types';\nimport { styled, __UNSAFE_SPACE_TO_DIMSUM, toMobile } from '@elliemae/ds-system';\nimport { BOX_TYPES_ARRAY } from './constants';\n\nconst borderBase200 = (props) => `1px solid ${props.theme.colors.neutral[200]};`;\n\nconst categoryBoxStyles = `\n width: 100%;\n height: 36px;\n padding:0 0;\n color: ${(props) => props.theme.colors.neutral[800]};\n display: flex;\n flex-direction: row;\n align-items: center;\n border-bottom: ${borderBase200}\n`;\n\nconst groupBoxStyles = `\n border: unset;\n font-size: ${(props) => toMobile(props.theme.fontSizes.title[500])};\n padding: 12px 0;\n`;\n\nconst GroupBoxLabelNode = styled.div`\n ${(props) => (props.nodeType === 'category-box' ? categoryBoxStyles : groupBoxStyles)}\n ${(props) => (props.noBorder ? 'border: none;' : '')}\n ${(props) => (props.borderBottom ? `border-bottom: ${borderBase200(props)}` : '')}\n ${(props) => (props.isMain ? `padding-right: ${__UNSAFE_SPACE_TO_DIMSUM(props.theme.space.xs)};` : '')}\n`;\nconst GroupBoxLabel = ({ borderBottom, children, noBorder, isMain, type, id }) => (\n <GroupBoxLabelNode\n borderBottom={borderBottom}\n data-testid=\"ds-group-box__header\"\n isMain={isMain}\n noBorder={noBorder}\n nodeType={type}\n id={id}\n >\n {children}\n </GroupBoxLabelNode>\n);\n\nGroupBoxLabel.propTypes = {\n children: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.node), PropTypes.node]).isRequired,\n type: PropTypes.oneOf(BOX_TYPES_ARRAY),\n borderBottom: PropTypes.bool,\n isMain: PropTypes.bool.isRequired,\n noBorder: PropTypes.bool,\n id: PropTypes.string,\n};\n\nexport default GroupBoxLabel;\n", "import * as React from 'react';\nexport { React };\n"],
4
+ "sourcesContent": ["import React from 'react';\nimport PropTypes from 'prop-types';\nimport { styled, __UNSAFE_SPACE_TO_DIMSUM, toMobile } from '@elliemae/ds-system';\nimport { BOX_TYPES_ARRAY } from './constants.js';\n\nconst borderBase200 = (props) => `1px solid ${props.theme.colors.neutral[200]};`;\n\nconst categoryBoxStyles = `\n width: 100%;\n height: 36px;\n padding:0 0;\n color: ${(props) => props.theme.colors.neutral[800]};\n display: flex;\n flex-direction: row;\n align-items: center;\n border-bottom: ${borderBase200}\n`;\n\nconst groupBoxStyles = `\n border: unset;\n font-size: ${(props) => toMobile(props.theme.fontSizes.title[500])};\n padding: 12px 0;\n`;\n\nconst GroupBoxLabelNode = styled.div`\n ${(props) => (props.nodeType === 'category-box' ? categoryBoxStyles : groupBoxStyles)}\n ${(props) => (props.noBorder ? 'border: none;' : '')}\n ${(props) => (props.borderBottom ? `border-bottom: ${borderBase200(props)}` : '')}\n ${(props) => (props.isMain ? `padding-right: ${__UNSAFE_SPACE_TO_DIMSUM(props.theme.space.xs)};` : '')}\n`;\nconst GroupBoxLabel = ({ borderBottom, children, noBorder, isMain, type, id }) => (\n <GroupBoxLabelNode\n borderBottom={borderBottom}\n data-testid=\"ds-group-box__header\"\n isMain={isMain}\n noBorder={noBorder}\n nodeType={type}\n id={id}\n >\n {children}\n </GroupBoxLabelNode>\n);\n\nGroupBoxLabel.propTypes = {\n children: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.node), PropTypes.node]).isRequired,\n type: PropTypes.oneOf(BOX_TYPES_ARRAY),\n borderBottom: PropTypes.bool,\n isMain: PropTypes.bool.isRequired,\n noBorder: PropTypes.bool,\n id: PropTypes.string,\n};\n\nexport default GroupBoxLabel;\n", "import * as React from 'react';\nexport { React };\n"],
5
5
  "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;AD+BrB;AA9BF,wBAAsB;AACtB,uBAA2D;AAC3D,uBAAgC;AAEhC,MAAM,gBAAgB,CAAC,UAAU,aAAa,MAAM,MAAM,OAAO,QAAQ;AAEzE,MAAM,oBAAoB;AAAA;AAAA;AAAA;AAAA,WAIf,CAAC,UAAU,MAAM,MAAM,OAAO,QAAQ;AAAA;AAAA;AAAA;AAAA,mBAI9B;AAAA;AAGnB,MAAM,iBAAiB;AAAA;AAAA,eAER,CAAC,cAAU,2BAAS,MAAM,MAAM,UAAU,MAAM,IAAI;AAAA;AAAA;AAInE,MAAM,oBAAoB,wBAAO;AAAA,IAC7B,CAAC,UAAW,MAAM,aAAa,iBAAiB,oBAAoB;AAAA,IACpE,CAAC,UAAW,MAAM,WAAW,kBAAkB;AAAA,IAC/C,CAAC,UAAW,MAAM,eAAe,kBAAkB,cAAc,KAAK,MAAM;AAAA,IAC5E,CAAC,UAAW,MAAM,SAAS,sBAAkB,2CAAyB,MAAM,MAAM,MAAM,EAAE,OAAO;AAAA;AAErG,MAAM,gBAAgB,CAAC,EAAE,cAAc,UAAU,UAAU,QAAQ,MAAM,GAAG,MAC1E;AAAA,EAAC;AAAA;AAAA,IACC;AAAA,IACA,eAAY;AAAA,IACZ;AAAA,IACA;AAAA,IACA,UAAU;AAAA,IACV;AAAA,IAEC;AAAA;AACH;AAGF,cAAc,YAAY;AAAA,EACxB,UAAU,kBAAAA,QAAU,UAAU,CAAC,kBAAAA,QAAU,QAAQ,kBAAAA,QAAU,IAAI,GAAG,kBAAAA,QAAU,IAAI,CAAC,EAAE;AAAA,EACnF,MAAM,kBAAAA,QAAU,MAAM,gCAAe;AAAA,EACrC,cAAc,kBAAAA,QAAU;AAAA,EACxB,QAAQ,kBAAAA,QAAU,KAAK;AAAA,EACvB,UAAU,kBAAAA,QAAU;AAAA,EACpB,IAAI,kBAAAA,QAAU;AAChB;AAEA,IAAO,wBAAQ;",
6
6
  "names": ["PropTypes"]
7
7
  }
@@ -30,10 +30,10 @@ module.exports = __toCommonJS(GroupHeader_exports);
30
30
  var React = __toESM(require("react"));
31
31
  var import_jsx_runtime = require("react/jsx-runtime");
32
32
  var import_ds_truncated_tooltip_text = __toESM(require("@elliemae/ds-truncated-tooltip-text"));
33
- var import_constants = require("../constants");
34
- var import_Actions = __toESM(require("../Actions"));
35
- var import_LabelElement = __toESM(require("../LabelElement"));
36
- var import_GroupBoxLabel = __toESM(require("../GroupBoxLabel"));
33
+ var import_constants = require("../constants.js");
34
+ var import_Actions = __toESM(require("../Actions.js"));
35
+ var import_LabelElement = __toESM(require("../LabelElement.js"));
36
+ var import_GroupBoxLabel = __toESM(require("../GroupBoxLabel.js"));
37
37
  const DSGroupBoxHeader = ({
38
38
  labelProps = {
39
39
  labelText: "",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/components/GroupHeader.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["import React from 'react';\nimport DSTruncatedTooltipText from '@elliemae/ds-truncated-tooltip-text';\nimport { BOX_TYPES } from '../constants';\nimport Actions from '../Actions';\nimport LabelElement from '../LabelElement';\nimport Label from '../GroupBoxLabel';\n\nexport const DSGroupBoxHeader = ({\n labelProps = {\n labelText: '',\n borderBottom: false,\n id: 'ds-group-box__header',\n },\n rightActions = [],\n centerActions = [],\n type = BOX_TYPES.CATEGORY,\n noBorder,\n isMain,\n}) => {\n const { labelText, borderBottom, id } = labelProps;\n return (\n <Label borderBottom={borderBottom} isMain={isMain} noBorder={noBorder} type={type} id={id}>\n <LabelElement>\n <DSTruncatedTooltipText value={labelText} />\n </LabelElement>\n <Actions actions={centerActions} centerActions={centerActions.length > 0} />\n <Actions actions={rightActions} rightActions={rightActions.length > 0} />\n </Label>\n );\n};\n", "import * as React from 'react';\nexport { React };\n"],
4
+ "sourcesContent": ["import React from 'react';\nimport DSTruncatedTooltipText from '@elliemae/ds-truncated-tooltip-text';\nimport { BOX_TYPES } from '../constants.js';\nimport Actions from '../Actions.js';\nimport LabelElement from '../LabelElement.js';\nimport Label from '../GroupBoxLabel.js';\n\nexport const DSGroupBoxHeader = ({\n labelProps = {\n labelText: '',\n borderBottom: false,\n id: 'ds-group-box__header',\n },\n rightActions = [],\n centerActions = [],\n type = BOX_TYPES.CATEGORY,\n noBorder,\n isMain,\n}) => {\n const { labelText, borderBottom, id } = labelProps;\n return (\n <Label borderBottom={borderBottom} isMain={isMain} noBorder={noBorder} type={type} id={id}>\n <LabelElement>\n <DSTruncatedTooltipText value={labelText} />\n </LabelElement>\n <Actions actions={centerActions} centerActions={centerActions.length > 0} />\n <Actions actions={rightActions} rightActions={rightActions.length > 0} />\n </Label>\n );\n};\n", "import * as React from 'react';\nexport { React };\n"],
5
5
  "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADqBnB;AApBJ,uCAAmC;AACnC,uBAA0B;AAC1B,qBAAoB;AACpB,0BAAyB;AACzB,2BAAkB;AAEX,MAAM,mBAAmB,CAAC;AAAA,EAC/B,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;AAAA,EACA;AACF,MAAM;AACJ,QAAM,EAAE,WAAW,cAAc,GAAG,IAAI;AACxC,SACE,6CAAC,qBAAAA,SAAA,EAAM,cAA4B,QAAgB,UAAoB,MAAY,IACjF;AAAA,gDAAC,oBAAAC,SAAA,EACC,sDAAC,iCAAAC,SAAA,EAAuB,OAAO,WAAW,GAC5C;AAAA,IACA,4CAAC,eAAAC,SAAA,EAAQ,SAAS,eAAe,eAAe,cAAc,SAAS,GAAG;AAAA,IAC1E,4CAAC,eAAAA,SAAA,EAAQ,SAAS,cAAc,cAAc,aAAa,SAAS,GAAG;AAAA,KACzE;AAEJ;",
6
6
  "names": ["Label", "LabelElement", "DSTruncatedTooltipText", "Actions"]
7
7
  }
package/dist/cjs/index.js CHANGED
@@ -29,7 +29,7 @@ __export(src_exports, {
29
29
  });
30
30
  module.exports = __toCommonJS(src_exports);
31
31
  var React = __toESM(require("react"));
32
- __reExport(src_exports, require("./DSGroupBox"), module.exports);
33
- __reExport(src_exports, require("./constants"), module.exports);
34
- var import_DSGroupBox = __toESM(require("./DSGroupBox"));
32
+ __reExport(src_exports, require("./DSGroupBox.js"), module.exports);
33
+ __reExport(src_exports, require("./constants.js"), module.exports);
34
+ var import_DSGroupBox = __toESM(require("./DSGroupBox.js"));
35
35
  //# sourceMappingURL=index.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/index.tsx", "../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["export * from './DSGroupBox';\nexport * from './constants';\nexport { default } from './DSGroupBox';\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,wBAAc,yBAAd;AACA,wBAAc,wBADd;AAEA,wBAAwB;",
4
+ "sourcesContent": ["export * from './DSGroupBox.js';\nexport * from './constants.js';\nexport { default } from './DSGroupBox.js';\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,wBAAc,4BAAd;AACA,wBAAc,2BADd;AAEA,wBAAwB;",
6
6
  "names": []
7
7
  }
@@ -0,0 +1,7 @@
1
+ {
2
+ "type": "commonjs",
3
+ "sideEffects": [
4
+ "*.css",
5
+ "*.scss"
6
+ ]
7
+ }
@@ -2,7 +2,7 @@ import * as React from "react";
2
2
  import { jsx } from "react/jsx-runtime";
3
3
  import PropTypes from "prop-types";
4
4
  import { styled, space, __UNSAFE_SPACE_TO_DIMSUM } from "@elliemae/ds-system";
5
- import ActionItem from "./ActionItem";
5
+ import ActionItem from "./ActionItem.js";
6
6
  const ActionsNode = styled.div`
7
7
  display: flex;
8
8
  flex-direction: row;
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../scripts/build/transpile/react-shim.js", "../../src/Actions.tsx"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable react/forbid-prop-types */\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport { styled, space, __UNSAFE_SPACE_TO_DIMSUM } from '@elliemae/ds-system';\nimport ActionItem from './ActionItem';\n\nconst ActionsNode = styled.div`\n display: flex;\n flex-direction: row;\n padding-left: ${(props) => __UNSAFE_SPACE_TO_DIMSUM(props.theme.space.m)};\n overflow: hidden;\n ${space}\n`;\n\nconst Actions = ({ actions = [], centerActions, rightActions }) => {\n if (actions.length < 1) return null;\n return (\n <ActionsNode marginLeft={!!rightActions && 'auto'} marginRight={!!centerActions && 'auto'}>\n {actions.map((action, key) => (\n <ActionItem key={key}>{action}</ActionItem>\n ))}\n </ActionsNode>\n );\n};\n\nActions.propTypes = {\n actions: PropTypes.array,\n centerActions: PropTypes.bool,\n rightActions: PropTypes.bool,\n};\n\nexport { Actions };\nexport default Actions;\n"],
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable react/forbid-prop-types */\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport { styled, space, __UNSAFE_SPACE_TO_DIMSUM } from '@elliemae/ds-system';\nimport ActionItem from './ActionItem.js';\n\nconst ActionsNode = styled.div`\n display: flex;\n flex-direction: row;\n padding-left: ${(props) => __UNSAFE_SPACE_TO_DIMSUM(props.theme.space.m)};\n overflow: hidden;\n ${space}\n`;\n\nconst Actions = ({ actions = [], centerActions, rightActions }) => {\n if (actions.length < 1) return null;\n return (\n <ActionsNode marginLeft={!!rightActions && 'auto'} marginRight={!!centerActions && 'auto'}>\n {actions.map((action, key) => (\n <ActionItem key={key}>{action}</ActionItem>\n ))}\n </ActionsNode>\n );\n};\n\nActions.propTypes = {\n actions: PropTypes.array,\n centerActions: PropTypes.bool,\n rightActions: PropTypes.bool,\n};\n\nexport { Actions };\nexport default Actions;\n"],
5
5
  "mappings": "AAAA,YAAY,WAAW;ACmBf;AAjBR,OAAO,eAAe;AACtB,SAAS,QAAQ,OAAO,gCAAgC;AACxD,OAAO,gBAAgB;AAEvB,MAAM,cAAc,OAAO;AAAA;AAAA;AAAA,kBAGT,CAAC,UAAU,yBAAyB,MAAM,MAAM,MAAM,CAAC;AAAA;AAAA,IAErE;AAAA;AAGJ,MAAM,UAAU,CAAC,EAAE,UAAU,CAAC,GAAG,eAAe,aAAa,MAAM;AACjE,MAAI,QAAQ,SAAS;AAAG,WAAO;AAC/B,SACE,oBAAC,eAAY,YAAY,CAAC,CAAC,gBAAgB,QAAQ,aAAa,CAAC,CAAC,iBAAiB,QAChF,kBAAQ,IAAI,CAAC,QAAQ,QACpB,oBAAC,cAAsB,oBAAN,GAAa,CAC/B,GACH;AAEJ;AAEA,QAAQ,YAAY;AAAA,EAClB,SAAS,UAAU;AAAA,EACnB,eAAe,UAAU;AAAA,EACzB,cAAc,UAAU;AAC1B;AAGA,IAAO,kBAAQ;",
6
6
  "names": []
7
7
  }
@@ -1,10 +1,10 @@
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-utilities";
5
- import { GroupBoxWrapper, GroupBoxContent } from "./components/blocks";
6
- import { DSGroupBoxHeader } from "./components/GroupHeader";
7
- import { BOX_TYPES, BOX_TYPES_ARRAY } from "./constants";
4
+ import { PropTypes, describe } from "@elliemae/ds-props-helpers";
5
+ import { GroupBoxWrapper, GroupBoxContent } from "./components/blocks.js";
6
+ import { DSGroupBoxHeader } from "./components/GroupHeader.js";
7
+ import { BOX_TYPES, BOX_TYPES_ARRAY } from "./constants.js";
8
8
  const DSGroupBox = ({
9
9
  containerProps = {},
10
10
  labelProps = {
@@ -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-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 {...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"],
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.js';\nimport { DSGroupBoxHeader } from './components/GroupHeader.js';\nimport { BOX_TYPES, BOX_TYPES_ARRAY } from './constants.js';\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"],
5
5
  "mappings": "AAAA,YAAY,WAAW;AC0BnB,SAEI,KAFJ;AA1BJ,OAAOA,YAAW;AAClB,SAAS,WAAW,gBAAgB;AACpC,SAAS,iBAAiB,uBAAuB;AACjD,SAAS,wBAAwB;AACjC,SAAS,WAAW,uBAAuB;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,UAAU;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,qBAAC,mBAAiB,GAAG,gBAAgB,YAAY,EAAE,YAAY,UAAU,MAAM,OAAO,GACnF;AAAA,iBACC;AAAA,MAAC;AAAA;AAAA,QACC;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA;AAAA,IACF;AAAA,IAGF;AAAA,MAAC;AAAA;AAAA,QAC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7 +2,7 @@ import * as React from "react";
2
2
  import { jsx } from "react/jsx-runtime";
3
3
  import PropTypes from "prop-types";
4
4
  import { styled, __UNSAFE_SPACE_TO_DIMSUM, toMobile } from "@elliemae/ds-system";
5
- import { BOX_TYPES_ARRAY } from "./constants";
5
+ import { BOX_TYPES_ARRAY } from "./constants.js";
6
6
  const borderBase200 = (props) => `1px solid ${props.theme.colors.neutral[200]};`;
7
7
  const categoryBoxStyles = `
8
8
  width: 100%;
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../scripts/build/transpile/react-shim.js", "../../src/GroupBoxLabel.tsx"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport PropTypes from 'prop-types';\nimport { styled, __UNSAFE_SPACE_TO_DIMSUM, toMobile } from '@elliemae/ds-system';\nimport { BOX_TYPES_ARRAY } from './constants';\n\nconst borderBase200 = (props) => `1px solid ${props.theme.colors.neutral[200]};`;\n\nconst categoryBoxStyles = `\n width: 100%;\n height: 36px;\n padding:0 0;\n color: ${(props) => props.theme.colors.neutral[800]};\n display: flex;\n flex-direction: row;\n align-items: center;\n border-bottom: ${borderBase200}\n`;\n\nconst groupBoxStyles = `\n border: unset;\n font-size: ${(props) => toMobile(props.theme.fontSizes.title[500])};\n padding: 12px 0;\n`;\n\nconst GroupBoxLabelNode = styled.div`\n ${(props) => (props.nodeType === 'category-box' ? categoryBoxStyles : groupBoxStyles)}\n ${(props) => (props.noBorder ? 'border: none;' : '')}\n ${(props) => (props.borderBottom ? `border-bottom: ${borderBase200(props)}` : '')}\n ${(props) => (props.isMain ? `padding-right: ${__UNSAFE_SPACE_TO_DIMSUM(props.theme.space.xs)};` : '')}\n`;\nconst GroupBoxLabel = ({ borderBottom, children, noBorder, isMain, type, id }) => (\n <GroupBoxLabelNode\n borderBottom={borderBottom}\n data-testid=\"ds-group-box__header\"\n isMain={isMain}\n noBorder={noBorder}\n nodeType={type}\n id={id}\n >\n {children}\n </GroupBoxLabelNode>\n);\n\nGroupBoxLabel.propTypes = {\n children: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.node), PropTypes.node]).isRequired,\n type: PropTypes.oneOf(BOX_TYPES_ARRAY),\n borderBottom: PropTypes.bool,\n isMain: PropTypes.bool.isRequired,\n noBorder: PropTypes.bool,\n id: PropTypes.string,\n};\n\nexport default GroupBoxLabel;\n"],
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport PropTypes from 'prop-types';\nimport { styled, __UNSAFE_SPACE_TO_DIMSUM, toMobile } from '@elliemae/ds-system';\nimport { BOX_TYPES_ARRAY } from './constants.js';\n\nconst borderBase200 = (props) => `1px solid ${props.theme.colors.neutral[200]};`;\n\nconst categoryBoxStyles = `\n width: 100%;\n height: 36px;\n padding:0 0;\n color: ${(props) => props.theme.colors.neutral[800]};\n display: flex;\n flex-direction: row;\n align-items: center;\n border-bottom: ${borderBase200}\n`;\n\nconst groupBoxStyles = `\n border: unset;\n font-size: ${(props) => toMobile(props.theme.fontSizes.title[500])};\n padding: 12px 0;\n`;\n\nconst GroupBoxLabelNode = styled.div`\n ${(props) => (props.nodeType === 'category-box' ? categoryBoxStyles : groupBoxStyles)}\n ${(props) => (props.noBorder ? 'border: none;' : '')}\n ${(props) => (props.borderBottom ? `border-bottom: ${borderBase200(props)}` : '')}\n ${(props) => (props.isMain ? `padding-right: ${__UNSAFE_SPACE_TO_DIMSUM(props.theme.space.xs)};` : '')}\n`;\nconst GroupBoxLabel = ({ borderBottom, children, noBorder, isMain, type, id }) => (\n <GroupBoxLabelNode\n borderBottom={borderBottom}\n data-testid=\"ds-group-box__header\"\n isMain={isMain}\n noBorder={noBorder}\n nodeType={type}\n id={id}\n >\n {children}\n </GroupBoxLabelNode>\n);\n\nGroupBoxLabel.propTypes = {\n children: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.node), PropTypes.node]).isRequired,\n type: PropTypes.oneOf(BOX_TYPES_ARRAY),\n borderBott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;AAChB;AAEA,IAAO,wBAAQ;",
6
6
  "names": []
7
7
  }
@@ -1,10 +1,10 @@
1
1
  import * as React from "react";
2
2
  import { jsx, jsxs } from "react/jsx-runtime";
3
3
  import DSTruncatedTooltipText from "@elliemae/ds-truncated-tooltip-text";
4
- import { BOX_TYPES } from "../constants";
5
- import Actions from "../Actions";
6
- import LabelElement from "../LabelElement";
7
- import Label from "../GroupBoxLabel";
4
+ import { BOX_TYPES } from "../constants.js";
5
+ import Actions from "../Actions.js";
6
+ import LabelElement from "../LabelElement.js";
7
+ import Label from "../GroupBoxLabel.js";
8
8
  const DSGroupBoxHeader = ({
9
9
  labelProps = {
10
10
  labelText: "",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/components/GroupHeader.tsx"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport DSTruncatedTooltipText from '@elliemae/ds-truncated-tooltip-text';\nimport { BOX_TYPES } from '../constants';\nimport Actions from '../Actions';\nimport LabelElement from '../LabelElement';\nimport Label from '../GroupBoxLabel';\n\nexport const DSGroupBoxHeader = ({\n labelProps = {\n labelText: '',\n borderBottom: false,\n id: 'ds-group-box__header',\n },\n rightActions = [],\n centerActions = [],\n type = BOX_TYPES.CATEGORY,\n noBorder,\n isMain,\n}) => {\n const { labelText, borderBottom, id } = labelProps;\n return (\n <Label borderBottom={borderBottom} isMain={isMain} noBorder={noBorder} type={type} id={id}>\n <LabelElement>\n <DSTruncatedTooltipText value={labelText} />\n </LabelElement>\n <Actions actions={centerActions} centerActions={centerActions.length > 0} />\n <Actions actions={rightActions} rightActions={rightActions.length > 0} />\n </Label>\n );\n};\n"],
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport DSTruncatedTooltipText from '@elliemae/ds-truncated-tooltip-text';\nimport { BOX_TYPES } from '../constants.js';\nimport Actions from '../Actions.js';\nimport LabelElement from '../LabelElement.js';\nimport Label from '../GroupBoxLabel.js';\n\nexport const DSGroupBoxHeader = ({\n labelProps = {\n labelText: '',\n borderBottom: false,\n id: 'ds-group-box__header',\n },\n rightActions = [],\n centerActions = [],\n type = BOX_TYPES.CATEGORY,\n noBorder,\n isMain,\n}) => {\n const { labelText, borderBottom, id } = labelProps;\n return (\n <Label borderBottom={borderBottom} isMain={isMain} noBorder={noBorder} type={type} id={id}>\n <LabelElement>\n <DSTruncatedTooltipText value={labelText} />\n </LabelElement>\n <Actions actions={centerActions} centerActions={centerActions.length > 0} />\n <Actions actions={rightActions} rightActions={rightActions.length > 0} />\n </Label>\n );\n};\n"],
5
5
  "mappings": "AAAA,YAAY,WAAW;ACqBnB,SAEI,KAFJ;AApBJ,OAAO,4BAA4B;AACnC,SAAS,iBAAiB;AAC1B,OAAO,aAAa;AACpB,OAAO,kBAAkB;AACzB,OAAO,WAAW;AAEX,MAAM,mBAAmB,CAAC;AAAA,EAC/B,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;AAAA,EACA;AACF,MAAM;AACJ,QAAM,EAAE,WAAW,cAAc,GAAG,IAAI;AACxC,SACE,qBAAC,SAAM,cAA4B,QAAgB,UAAoB,MAAY,IACjF;AAAA,wBAAC,gBACC,8BAAC,0BAAuB,OAAO,WAAW,GAC5C;AAAA,IACA,oBAAC,WAAQ,SAAS,eAAe,eAAe,cAAc,SAAS,GAAG;AAAA,IAC1E,oBAAC,WAAQ,SAAS,cAAc,cAAc,aAAa,SAAS,GAAG;AAAA,KACzE;AAEJ;",
6
6
  "names": []
7
7
  }
package/dist/esm/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import * as React from "react";
2
- export * from "./DSGroupBox";
3
- export * from "./constants";
4
- import { default as default2 } from "./DSGroupBox";
2
+ export * from "./DSGroupBox.js";
3
+ export * from "./constants.js";
4
+ import { default as default2 } from "./DSGroupBox.js";
5
5
  export {
6
6
  default2 as default
7
7
  };
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../scripts/build/transpile/react-shim.js", "../../src/index.tsx"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "export * from './DSGroupBox';\nexport * from './constants';\nexport { default } from './DSGroupBox';\n"],
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "export * from './DSGroupBox.js';\nexport * from './constants.js';\nexport { default } from './DSGroupBox.js';\n"],
5
5
  "mappings": "AAAA,YAAY,WAAW;ACAvB,cAAc;AACd,cAAc;AACd,SAAS,WAAAA,gBAAe;",
6
6
  "names": ["default"]
7
7
  }
@@ -0,0 +1,7 @@
1
+ {
2
+ "type": "module",
3
+ "sideEffects": [
4
+ "*.css",
5
+ "*.scss"
6
+ ]
7
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elliemae/ds-group-box",
3
- "version": "3.16.0-next.1",
3
+ "version": "3.16.0-next.11",
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.1",
72
- "@elliemae/ds-system": "3.16.0-next.1",
73
- "@elliemae/ds-truncated-tooltip-text": "3.16.0-next.1",
74
- "@elliemae/ds-utilities": "3.16.0-next.1"
71
+ "@elliemae/ds-classnames": "3.16.0-next.11",
72
+ "@elliemae/ds-props-helpers": "3.16.0-next.11",
73
+ "@elliemae/ds-system": "3.16.0-next.11",
74
+ "@elliemae/ds-truncated-tooltip-text": "3.16.0-next.11",
75
+ "@elliemae/ds-utilities": "3.16.0-next.11"
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 && pnpm --filter {.}... dts",
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
  }