@elliemae/ds-group-box 2.2.0 → 2.3.0-alpha.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/esm/DSGroupBox.js CHANGED
@@ -1,128 +1,77 @@
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';
10
- import React from 'react';
11
- import { PropTypes, describe } from 'react-desc';
12
- import { GroupBoxWrapper, GroupBoxContent } from './components/blocks.js';
13
- import { DSGroupBoxHeader } from './components/GroupHeader.js';
14
- import { BOX_TYPES_ARRAY, BOX_TYPES } from './constants.js';
15
- import { jsxs } from 'react/jsx-runtime';
16
-
17
- function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
18
-
19
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
20
-
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), {}, {
1
+ import * as React from "react";
2
+ import React2 from "react";
3
+ import { PropTypes, describe } from "react-desc";
4
+ import { GroupBoxWrapper, GroupBoxContent } from "./components/blocks";
5
+ import { DSGroupBoxHeader } from "./components/GroupHeader";
6
+ import { BOX_TYPES, BOX_TYPES_ARRAY } from "./constants";
7
+ const DSGroupBox = ({
8
+ containerProps = {},
9
+ labelProps = {
10
+ labelText: "",
11
+ borderBottom: false,
12
+ id: "ds-group-box__header"
13
+ },
14
+ rightActions = [],
15
+ centerActions = [],
16
+ type = BOX_TYPES.CATEGORY,
17
+ asRow = false,
18
+ onlyHeader = false,
19
+ noBorder = true,
20
+ noPadding = false,
21
+ children: components = [],
22
+ isMain = true
23
+ }) => {
24
+ const { labelText } = labelProps;
25
+ return /* @__PURE__ */ React2.createElement(GroupBoxWrapper, {
26
+ ...containerProps,
27
+ classProps: { onlyHeader, noBorder, type, isMain }
28
+ }, labelText && /* @__PURE__ */ React2.createElement(DSGroupBoxHeader, {
29
+ centerActions,
30
+ isMain,
31
+ labelProps,
32
+ noBorder,
33
+ rightActions,
34
+ type
35
+ }), /* @__PURE__ */ React2.createElement(GroupBoxContent, {
44
36
  classProps: {
37
+ type,
38
+ asRow,
45
39
  onlyHeader,
40
+ noPadding,
46
41
  noBorder,
47
- type,
48
- isMain
49
- },
50
- children: [labelText && /*#__PURE__*/_jsx(DSGroupBoxHeader, {
51
- centerActions: centerActions,
52
- isMain: isMain,
53
- labelProps: labelProps,
54
- noBorder: noBorder,
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), {}, {
67
- isMain: false
68
- })), null) : components)]
69
- }));
42
+ noBorderTop: !!labelText
43
+ }
44
+ }, components && components.props ? React2.Children.map(components, (component) => React2.cloneElement(component, {
45
+ ...component.props,
46
+ isMain: false
47
+ }), null) : components));
70
48
  };
71
-
72
49
  const props = {
73
- /** props to inject to wrapper */
74
- containerProps: PropTypes.object.description('props to inject to wrapper'),
75
-
76
- /**
77
- * Label attributes to be rendered
78
- */
50
+ containerProps: PropTypes.object.description("props to inject to wrapper"),
79
51
  labelProps: PropTypes.shape({
80
52
  labelText: PropTypes.oneOfType([PropTypes.string, PropTypes.element]),
81
53
  borderBottom: PropTypes.bool,
82
54
  id: PropTypes.string
83
- }).description('Label attributes to be rendered'),
84
-
85
- /**
86
- * ['category-box', 'group-box']
87
- */
55
+ }).description("Label attributes to be rendered"),
88
56
  type: PropTypes.oneOf(BOX_TYPES_ARRAY).description(BOX_TYPES_ARRAY.toString()),
89
-
90
- /**
91
- * Components to be rendered inside the box
92
- */
93
- children: PropTypes.oneOfType([PropTypes.element, PropTypes.arrayOf(PropTypes.element)]).isRequired.description('Components to be rendered inside the box'),
94
-
95
- /**
96
- * Actions on the right side of the label
97
- */
98
- rightActions: PropTypes.arrayOf(PropTypes.element).description('Actions on the right side of the label'),
99
-
100
- /**
101
- * Actions on the next to the label
102
- */
103
- centerActions: PropTypes.arrayOf(PropTypes.element).description('Actions on the next to the label'),
104
-
105
- /**
106
- * Display the content of the group box with flex direction row
107
- */
108
- asRow: PropTypes.bool.description('Display the content of the group box with flex direction row'),
109
-
110
- /**
111
- * Show border only on the header
112
- */
113
- onlyHeader: PropTypes.bool.description('Show border only on the header'),
114
-
115
- /**
116
- * Remove the wrapper border
117
- */
118
- noBorder: PropTypes.bool.description('Remove the wrapper border'),
119
-
120
- /**
121
- * Remove the top and bottom padding from the content
122
- */
123
- noPadding: PropTypes.bool.description('Remove the top and bottom padding from the content')
57
+ children: PropTypes.oneOfType([
58
+ PropTypes.element,
59
+ PropTypes.arrayOf(PropTypes.element)
60
+ ]).isRequired.description("Components to be rendered inside the box"),
61
+ rightActions: PropTypes.arrayOf(PropTypes.element).description("Actions on the right side of the label"),
62
+ centerActions: PropTypes.arrayOf(PropTypes.element).description("Actions on the next to the label"),
63
+ asRow: PropTypes.bool.description("Display the content of the group box with flex direction row"),
64
+ onlyHeader: PropTypes.bool.description("Show border only on the header"),
65
+ noBorder: PropTypes.bool.description("Remove the wrapper border"),
66
+ noPadding: PropTypes.bool.description("Remove the top and bottom padding from the content")
124
67
  };
68
+ DSGroupBox.propTypes = props;
125
69
  const DSGroupBoxWithSchema = describe(DSGroupBox);
126
70
  DSGroupBoxWithSchema.propTypes = props;
127
-
128
- export { DSGroupBox, DSGroupBoxWithSchema, DSGroupBox as default };
71
+ var DSGroupBox_default = DSGroupBox;
72
+ export {
73
+ DSGroupBox,
74
+ DSGroupBoxWithSchema,
75
+ DSGroupBox_default as default
76
+ };
77
+ //# sourceMappingURL=DSGroupBox.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 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 'react-desc';\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;\nconst DSGroupBoxWithSchema = describe(DSGroupBox);\n\nDSGroupBoxWithSchema.propTypes = props;\n\nexport { DSGroupBox, DSGroupBoxWithSchema };\nexport default DSGroupBox;\n"],
5
+ "mappings": "AAAA;ACAA;AACA;AACA;AACA;AACA;AAEA,MAAM,aAAa,CAAC;AAAA,EAClB,iBAAiB;AAAA,EACjB,aAAa;AAAA,IACX,WAAW;AAAA,IACX,cAAc;AAAA,IACd,IAAI;AAAA;AAAA,EAEN,eAAe;AAAA,EACf,gBAAgB;AAAA,EAChB,OAAO,UAAU;AAAA,EACjB,QAAQ;AAAA,EACR,aAAa;AAAA,EACb,WAAW;AAAA,EACX,YAAY;AAAA,EACZ,UAAU,aAAa;AAAA,EAEvB,SAAS;AAAA,MACL;AACJ,QAAM,EAAE,cAAc;AACtB,SACE,qCAAC,iBAAD;AAAA,OACM;AAAA,IACJ,YAAY,EAAE,YAAY,UAAU,MAAM;AAAA,KAEzC,aACC,qCAAC,kBAAD;AAAA,IACE;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,MAIJ,qCAAC,iBAAD;AAAA,IACE,YAAY;AAAA,MACV;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA,aAAa,CAAC,CAAC;AAAA;AAAA,KAGhB,cAAc,WAAW,QACtB,OAAM,SAAS,IACb,YACA,CAAC,cACC,OAAM,aAAa,WAAW;AAAA,OACzB,UAAU;AAAA,IACb,QAAQ;AAAA,MAEZ,QAEF;AAAA;AAMZ,MAAM,QAAQ;AAAA,EAEZ,gBAAgB,UAAU,OAAO,YAAY;AAAA,EAI7C,YAAY,UAAU,MAAM;AAAA,IAC1B,WAAW,UAAU,UAAU,CAAC,UAAU,QAAQ,UAAU;AAAA,IAC5D,cAAc,UAAU;AAAA,IACxB,IAAI,UAAU;AAAA,KACb,YAAY;AAAA,EAIf,MAAM,UAAU,MAAM,iBAAiB,YACrC,gBAAgB;AAAA,EAKlB,UAAU,UAAU,UAAU;AAAA,IAC5B,UAAU;AAAA,IACV,UAAU,QAAQ,UAAU;AAAA,KAC3B,WAAW,YAAY;AAAA,EAI1B,cAAc,UAAU,QAAQ,UAAU,SAAS,YACjD;AAAA,EAKF,eAAe,UAAU,QAAQ,UAAU,SAAS,YAClD;AAAA,EAKF,OAAO,UAAU,KAAK,YACpB;AAAA,EAKF,YAAY,UAAU,KAAK,YAAY;AAAA,EAIvC,UAAU,UAAU,KAAK,YAAY;AAAA,EAIrC,WAAW,UAAU,KAAK,YACxB;AAAA;AAIJ,WAAW,YAAY;AACvB,MAAM,uBAAuB,SAAS;AAEtC,qBAAqB,YAAY;AAGjC,IAAO,qBAAQ;",
6
+ "names": []
7
+ }
@@ -1,33 +1,54 @@
1
- import _jsx from '@babel/runtime/helpers/esm/jsx';
2
- import 'react';
3
- import styled from 'styled-components';
4
- import { __UNSAFE_SPACE_TO_DIMSUM, toMobile } from '@elliemae/ds-system';
5
-
6
- const borderBase200 = props => "1px solid ".concat(props.theme.colors.neutral[200], ";");
7
-
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({
11
- componentId: "sc-141ikkh-0"
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), ";") : '');
13
-
14
- function GroupBoxLabel(_ref) {
15
- let {
1
+ import * as React from "react";
2
+ import React2 from "react";
3
+ import PropTypes from "prop-types";
4
+ import styled from "styled-components";
5
+ import { __UNSAFE_SPACE_TO_DIMSUM, toMobile } from "@elliemae/ds-system";
6
+ import { BOX_TYPES_ARRAY } from "./constants";
7
+ const borderBase200 = (props) => `1px solid ${props.theme.colors.neutral[200]};`;
8
+ const categoryBoxStyles = `
9
+ width: 100%;
10
+ height: 36px;
11
+ padding:0 0;
12
+ color: ${(props) => props.theme.colors.neutral[800]};
13
+ display: flex;
14
+ flex-direction: row;
15
+ align-items: center;
16
+ border-bottom: ${borderBase200}
17
+ `;
18
+ const groupBoxStyles = `
19
+ border: unset;
20
+ font-size: ${(props) => toMobile(props.theme.fontSizes.title[500])};
21
+ padding: 12px 0;
22
+ `;
23
+ const GroupBoxLabelNode = styled.div`
24
+ ${(props) => props.nodeType === "category-box" ? categoryBoxStyles : groupBoxStyles}
25
+ ${(props) => props.noBorder ? "border: none;" : ""}
26
+ ${(props) => props.borderBottom ? `border-bottom: ${borderBase200(props)}` : ""}
27
+ ${(props) => props.isMain ? `padding-right: ${__UNSAFE_SPACE_TO_DIMSUM(props.theme.space.xs)};` : ""}
28
+ `;
29
+ function GroupBoxLabel({ borderBottom, children, noBorder, isMain, type, id }) {
30
+ return /* @__PURE__ */ React2.createElement(GroupBoxLabelNode, {
16
31
  borderBottom,
17
- children,
18
- noBorder,
19
- isMain,
20
- type,
21
- id
22
- } = _ref;
23
- return /*#__PURE__*/_jsx(GroupBoxLabelNode, {
24
- borderBottom: borderBottom,
25
32
  "data-testid": "ds-group-box__header",
26
- isMain: isMain,
27
- noBorder: noBorder,
33
+ isMain,
34
+ noBorder,
28
35
  nodeType: type,
29
- id: id
30
- }, void 0, children);
36
+ id
37
+ }, children);
31
38
  }
32
-
33
- export { GroupBoxLabel as default };
39
+ GroupBoxLabel.propTypes = {
40
+ children: PropTypes.oneOfType([
41
+ PropTypes.arrayOf(PropTypes.node),
42
+ PropTypes.node
43
+ ]).isRequired,
44
+ type: PropTypes.oneOf(BOX_TYPES_ARRAY),
45
+ borderBottom: PropTypes.bool,
46
+ isMain: PropTypes.bool.isRequired,
47
+ noBorder: PropTypes.bool,
48
+ id: PropTypes.string
49
+ };
50
+ var GroupBoxLabel_default = GroupBoxLabel;
51
+ export {
52
+ GroupBoxLabel_default as default
53
+ };
54
+ //# sourceMappingURL=GroupBoxLabel.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 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 from 'styled-components';\nimport { __UNSAFE_SPACE_TO_DIMSUM, toMobile } from '@elliemae/ds-system';\nimport { BOX_TYPES_ARRAY } from './constants';\n\nconst borderBase200 = (props) =>\n `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) =>\n props.nodeType === 'category-box' ? categoryBoxStyles : groupBoxStyles}\n ${(props) => (props.noBorder ? 'border: none;' : '')}\n ${(props) =>\n props.borderBottom ? `border-bottom: ${borderBase200(props)}` : ''}\n ${(props) =>\n props.isMain\n ? `padding-right: ${__UNSAFE_SPACE_TO_DIMSUM(props.theme.space.xs)};`\n : ''}\n`;\nfunction GroupBoxLabel({ borderBottom, children, noBorder, isMain, type, id }) {\n return (\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}\n\nGroupBoxLabel.propTypes = {\n children: PropTypes.oneOfType([\n PropTypes.arrayOf(PropTypes.node),\n PropTypes.node,\n ]).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"],
5
+ "mappings": "AAAA;ACAA;AACA;AACA;AACA;AACA;AAEA,MAAM,gBAAgB,CAAC,UACrB,aAAa,MAAM,MAAM,OAAO,QAAQ;AAE1C,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,UAAU,SAAS,MAAM,MAAM,UAAU,MAAM;AAAA;AAAA;AAI/D,MAAM,oBAAoB,OAAO;AAAA,IAC7B,CAAC,UACD,MAAM,aAAa,iBAAiB,oBAAoB;AAAA,IACxD,CAAC,UAAW,MAAM,WAAW,kBAAkB;AAAA,IAC/C,CAAC,UACD,MAAM,eAAe,kBAAkB,cAAc,WAAW;AAAA,IAChE,CAAC,UACD,MAAM,SACF,kBAAkB,yBAAyB,MAAM,MAAM,MAAM,SAC7D;AAAA;AAER,uBAAuB,EAAE,cAAc,UAAU,UAAU,QAAQ,MAAM,MAAM;AAC7E,SACE,qCAAC,mBAAD;AAAA,IACE;AAAA,IACA,eAAY;AAAA,IACZ;AAAA,IACA;AAAA,IACA,UAAU;AAAA,IACV;AAAA,KAEC;AAAA;AAKP,cAAc,YAAY;AAAA,EACxB,UAAU,UAAU,UAAU;AAAA,IAC5B,UAAU,QAAQ,UAAU;AAAA,IAC5B,UAAU;AAAA,KACT;AAAA,EACH,MAAM,UAAU,MAAM;AAAA,EACtB,cAAc,UAAU;AAAA,EACxB,QAAQ,UAAU,KAAK;AAAA,EACvB,UAAU,UAAU;AAAA,EACpB,IAAI,UAAU;AAAA;AAGhB,IAAO,wBAAQ;",
6
+ "names": []
7
+ }
@@ -1,17 +1,23 @@
1
- import _jsx from '@babel/runtime/helpers/esm/jsx';
2
- import 'react';
3
- import styled from 'styled-components';
4
- import { toMobile } from '@elliemae/ds-system';
5
-
6
- const LabelElementNode = /*#__PURE__*/styled.div.withConfig({
7
- componentId: "sc-nu03bl-0"
8
- })(["overflow:hidden;display:flex;align-items:center;font-size:", ";font-weight:400;"], props => toMobile(props.theme.fontSizes.title[700]));
9
-
10
- function LabelElement(_ref) {
11
- let {
12
- children
13
- } = _ref;
14
- return /*#__PURE__*/_jsx(LabelElementNode, {}, void 0, children);
1
+ import * as React from "react";
2
+ import React2 from "react";
3
+ import PropTypes from "prop-types";
4
+ import styled from "styled-components";
5
+ import { toMobile } from "@elliemae/ds-system";
6
+ const LabelElementNode = styled.div`
7
+ overflow: hidden;
8
+ display: flex;
9
+ align-items: center;
10
+ font-size: ${(props) => toMobile(props.theme.fontSizes.title[700])};
11
+ font-weight: 400;
12
+ `;
13
+ function LabelElement({ children }) {
14
+ return /* @__PURE__ */ React2.createElement(LabelElementNode, null, children);
15
15
  }
16
-
17
- export { LabelElement as default };
16
+ LabelElement.propTypes = {
17
+ children: PropTypes.oneOfType([PropTypes.string, PropTypes.node]).isRequired
18
+ };
19
+ var LabelElement_default = LabelElement;
20
+ export {
21
+ LabelElement_default as default
22
+ };
23
+ //# sourceMappingURL=LabelElement.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../scripts/build/transpile/react-shim.js", "../../src/LabelElement.tsx"],
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport PropTypes from 'prop-types';\nimport styled from 'styled-components';\nimport { toMobile } from '@elliemae/ds-system';\n\nconst LabelElementNode = styled.div`\n overflow: hidden;\n display: flex;\n align-items: center;\n font-size: ${(props) => toMobile(props.theme.fontSizes.title[700])};\n font-weight: 400;\n`;\n\nfunction LabelElement({ children }) {\n return <LabelElementNode>{children}</LabelElementNode>;\n}\n\nLabelElement.propTypes = {\n children: PropTypes.oneOfType([PropTypes.string, PropTypes.node]).isRequired,\n};\n\nexport default LabelElement;\n"],
5
+ "mappings": "AAAA;ACAA;AACA;AACA;AACA;AAEA,MAAM,mBAAmB,OAAO;AAAA;AAAA;AAAA;AAAA,eAIjB,CAAC,UAAU,SAAS,MAAM,MAAM,UAAU,MAAM;AAAA;AAAA;AAI/D,sBAAsB,EAAE,YAAY;AAClC,SAAO,qCAAC,kBAAD,MAAmB;AAAA;AAG5B,aAAa,YAAY;AAAA,EACvB,UAAU,UAAU,UAAU,CAAC,UAAU,QAAQ,UAAU,OAAO;AAAA;AAGpE,IAAO,uBAAQ;",
6
+ "names": []
7
+ }
@@ -1,44 +1,40 @@
1
- import _jsx from '@babel/runtime/helpers/esm/jsx';
2
- import 'react';
3
- import DSTruncatedTooltipText from '@elliemae/ds-truncated-tooltip-text';
4
- import { BOX_TYPES } from '../constants.js';
5
- import { Actions } from '../Actions.js';
6
- import LabelElement from '../LabelElement.js';
7
- import GroupBoxLabel from '../GroupBoxLabel.js';
8
-
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,
1
+ import * as React from "react";
2
+ import React2 from "react";
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";
8
+ const DSGroupBoxHeader = ({
9
+ labelProps = {
10
+ labelText: "",
11
+ borderBottom: false,
12
+ id: "ds-group-box__header"
13
+ },
14
+ rightActions = [],
15
+ centerActions = [],
16
+ type = BOX_TYPES.CATEGORY,
17
+ noBorder,
18
+ isMain
19
+ }) => {
20
+ const { labelText, borderBottom, id } = labelProps;
21
+ return /* @__PURE__ */ React2.createElement(Label, {
24
22
  borderBottom,
23
+ isMain,
24
+ noBorder,
25
+ type,
25
26
  id
26
- } = labelProps;
27
- return /*#__PURE__*/_jsx(GroupBoxLabel, {
28
- borderBottom: borderBottom,
29
- isMain: isMain,
30
- noBorder: noBorder,
31
- type: type,
32
- id: id
33
- }, void 0, /*#__PURE__*/_jsx(LabelElement, {}, void 0, /*#__PURE__*/_jsx(DSTruncatedTooltipText, {
27
+ }, /* @__PURE__ */ React2.createElement(LabelElement, null, /* @__PURE__ */ React2.createElement(DSTruncatedTooltipText, {
34
28
  value: labelText
35
- })), /*#__PURE__*/_jsx(Actions, {
29
+ })), /* @__PURE__ */ React2.createElement(Actions, {
36
30
  actions: centerActions,
37
31
  centerActions: centerActions.length > 0
38
- }), /*#__PURE__*/_jsx(Actions, {
32
+ }), /* @__PURE__ */ React2.createElement(Actions, {
39
33
  actions: rightActions,
40
34
  rightActions: rightActions.length > 0
41
35
  }));
42
36
  };
43
-
44
- export { DSGroupBoxHeader };
37
+ export {
38
+ DSGroupBoxHeader
39
+ };
40
+ //# sourceMappingURL=GroupHeader.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 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\n borderBottom={borderBottom}\n isMain={isMain}\n noBorder={noBorder}\n type={type}\n id={id}\n >\n <LabelElement>\n <DSTruncatedTooltipText value={labelText} />\n </LabelElement>\n <Actions\n actions={centerActions}\n centerActions={centerActions.length > 0}\n />\n <Actions actions={rightActions} rightActions={rightActions.length > 0} />\n </Label>\n );\n};\n"],
5
+ "mappings": "AAAA;ACAA;AACA;AACA;AACA;AACA;AACA;AAEO,MAAM,mBAAmB,CAAC;AAAA,EAC/B,aAAa;AAAA,IACX,WAAW;AAAA,IACX,cAAc;AAAA,IACd,IAAI;AAAA;AAAA,EAEN,eAAe;AAAA,EACf,gBAAgB;AAAA,EAChB,OAAO,UAAU;AAAA,EACjB;AAAA,EACA;AAAA,MACI;AACJ,QAAM,EAAE,WAAW,cAAc,OAAO;AACxC,SACE,qCAAC,OAAD;AAAA,IACE;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,KAEA,qCAAC,cAAD,MACE,qCAAC,wBAAD;AAAA,IAAwB,OAAO;AAAA,OAEjC,qCAAC,SAAD;AAAA,IACE,SAAS;AAAA,IACT,eAAe,cAAc,SAAS;AAAA,MAExC,qCAAC,SAAD;AAAA,IAAS,SAAS;AAAA,IAAc,cAAc,aAAa,SAAS;AAAA;AAAA;",
6
+ "names": []
7
+ }
@@ -1,50 +1,29 @@
1
- import { aggregatedClasses } from '@elliemae/ds-classnames';
2
-
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 {
12
- 'only-header': onlyHeader,
13
- 'no-border': noBorder,
14
- [type]: type,
15
- 'main-box': isMain,
16
- 'nested-box': !isMain
17
- };
18
- });
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
- };
36
- });
37
- const Label = aggregatedClasses('div')(blockName, 'label', _ref3 => {
38
- let {
39
- borderBottom,
40
- type,
41
- noBorder
42
- } = _ref3;
43
- return {
44
- 'border-bottom': borderBottom,
45
- [type]: type,
46
- 'no-border': noBorder
47
- };
48
- });
49
-
50
- export { GroupBoxContent, GroupBoxWrapper, Label };
1
+ import * as React from "react";
2
+ import { aggregatedClasses } from "@elliemae/ds-classnames";
3
+ const blockName = "group-box";
4
+ const GroupBoxWrapper = aggregatedClasses("div")(blockName, "wrapper", ({ onlyHeader, noBorder, type, isMain }) => ({
5
+ "only-header": onlyHeader,
6
+ "no-border": noBorder,
7
+ [type]: type,
8
+ "main-box": isMain,
9
+ "nested-box": !isMain
10
+ }));
11
+ const GroupBoxContent = aggregatedClasses("div")(blockName, "content", ({ type, asRow, onlyHeader, noPadding, noBorder, noBorderTop }) => ({
12
+ [type]: type,
13
+ "as-row": asRow,
14
+ "only-header": onlyHeader,
15
+ "no-padding": noPadding,
16
+ "no-border": noBorder,
17
+ "no-border-top": noBorderTop
18
+ }));
19
+ const Label = aggregatedClasses("div")(blockName, "label", ({ borderBottom, type, noBorder }) => ({
20
+ "border-bottom": borderBottom,
21
+ [type]: type,
22
+ "no-border": noBorder
23
+ }));
24
+ export {
25
+ GroupBoxContent,
26
+ GroupBoxWrapper,
27
+ Label
28
+ };
29
+ //# sourceMappingURL=blocks.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/components/blocks.tsx"],
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { aggregatedClasses } from '@elliemae/ds-classnames';\n\nconst blockName = 'group-box';\n\nexport const GroupBoxWrapper = aggregatedClasses('div')(\n blockName,\n 'wrapper',\n ({ onlyHeader, noBorder, type, isMain }) => ({\n 'only-header': onlyHeader,\n 'no-border': noBorder,\n [type]: type,\n 'main-box': isMain,\n 'nested-box': !isMain,\n }),\n);\n\nexport const GroupBoxContent = aggregatedClasses('div')(\n blockName,\n 'content',\n ({ type, asRow, onlyHeader, noPadding, noBorder, noBorderTop }) => ({\n [type]: type,\n 'as-row': asRow,\n 'only-header': onlyHeader,\n 'no-padding': noPadding,\n 'no-border': noBorder,\n 'no-border-top': noBorderTop,\n }),\n);\n\nexport const Label = aggregatedClasses('div')(\n blockName,\n 'label',\n ({ borderBottom, type, noBorder }) => ({\n 'border-bottom': borderBottom,\n [type]: type,\n 'no-border': noBorder,\n }),\n);\n"],
5
+ "mappings": "AAAA;ACAA;AAEA,MAAM,YAAY;AAEX,MAAM,kBAAkB,kBAAkB,OAC/C,WACA,WACA,CAAC,EAAE,YAAY,UAAU,MAAM,aAAc;AAAA,EAC3C,eAAe;AAAA,EACf,aAAa;AAAA,GACZ,OAAO;AAAA,EACR,YAAY;AAAA,EACZ,cAAc,CAAC;AAAA;AAIZ,MAAM,kBAAkB,kBAAkB,OAC/C,WACA,WACA,CAAC,EAAE,MAAM,OAAO,YAAY,WAAW,UAAU,kBAAmB;AAAA,GACjE,OAAO;AAAA,EACR,UAAU;AAAA,EACV,eAAe;AAAA,EACf,cAAc;AAAA,EACd,aAAa;AAAA,EACb,iBAAiB;AAAA;AAId,MAAM,QAAQ,kBAAkB,OACrC,WACA,SACA,CAAC,EAAE,cAAc,MAAM,eAAgB;AAAA,EACrC,iBAAiB;AAAA,GAChB,OAAO;AAAA,EACR,aAAa;AAAA;",
6
+ "names": []
7
+ }
package/esm/constants.js CHANGED
@@ -1,7 +1,11 @@
1
+ import * as React from "react";
1
2
  const BOX_TYPES = {
2
- CATEGORY: 'category-box',
3
- GROUP: 'group-box'
3
+ CATEGORY: "category-box",
4
+ GROUP: "group-box"
4
5
  };
5
6
  const BOX_TYPES_ARRAY = [BOX_TYPES.CATEGORY, BOX_TYPES.GROUP];
6
-
7
- export { BOX_TYPES, BOX_TYPES_ARRAY };
7
+ export {
8
+ BOX_TYPES,
9
+ BOX_TYPES_ARRAY
10
+ };
11
+ //# sourceMappingURL=constants.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../scripts/build/transpile/react-shim.js", "../../src/constants.tsx"],
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "export const BOX_TYPES = {\n CATEGORY: 'category-box',\n GROUP: 'group-box',\n};\nexport const BOX_TYPES_ARRAY = [BOX_TYPES.CATEGORY, BOX_TYPES.GROUP];\n"],
5
+ "mappings": "AAAA;ACAO,MAAM,YAAY;AAAA,EACvB,UAAU;AAAA,EACV,OAAO;AAAA;AAEF,MAAM,kBAAkB,CAAC,UAAU,UAAU,UAAU;",
6
+ "names": []
7
+ }
package/esm/index.js CHANGED
@@ -1,2 +1,8 @@
1
- export { DSGroupBox, DSGroupBoxWithSchema, DSGroupBox as default } from './DSGroupBox.js';
2
- export { BOX_TYPES, BOX_TYPES_ARRAY } from './constants.js';
1
+ import * as React from "react";
2
+ export * from "./DSGroupBox";
3
+ export * from "./constants";
4
+ import { default as default2 } from "./DSGroupBox";
5
+ export {
6
+ default2 as default
7
+ };
8
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 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"],
5
+ "mappings": "AAAA;ACAA;AACA;AACA;",
6
+ "names": []
7
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elliemae/ds-group-box",
3
- "version": "2.2.0",
3
+ "version": "2.3.0-alpha.3",
4
4
  "license": "MIT",
5
5
  "description": "ICE MT - Dimsum - Group Box",
6
6
  "module": "./esm/index.js",
@@ -64,9 +64,9 @@
64
64
  "build": "node ../../scripts/build/build.js"
65
65
  },
66
66
  "dependencies": {
67
- "@elliemae/ds-classnames": "2.2.0",
68
- "@elliemae/ds-system": "2.2.0",
69
- "@elliemae/ds-truncated-tooltip-text": "2.2.0",
67
+ "@elliemae/ds-classnames": "2.3.0-alpha.3",
68
+ "@elliemae/ds-system": "2.3.0-alpha.3",
69
+ "@elliemae/ds-truncated-tooltip-text": "2.3.0-alpha.3",
70
70
  "@xstyled/styled-components": "~3.1.1",
71
71
  "prop-types": "~15.7.2",
72
72
  "react-desc": "~4.1.3"