@elliemae/ds-legacy-group-box 1.0.0-rc.1
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/ActionItem.js +53 -0
- package/dist/cjs/ActionItem.js.map +7 -0
- package/dist/cjs/Actions.js +58 -0
- package/dist/cjs/Actions.js.map +7 -0
- package/dist/cjs/DSGroupBox.js +148 -0
- package/dist/cjs/DSGroupBox.js.map +7 -0
- package/dist/cjs/GroupBoxLabel.js +82 -0
- package/dist/cjs/GroupBoxLabel.js.map +7 -0
- package/dist/cjs/LabelElement.js +50 -0
- package/dist/cjs/LabelElement.js.map +7 -0
- package/dist/cjs/components/GroupHeader.js +60 -0
- package/dist/cjs/components/GroupHeader.js.map +7 -0
- package/dist/cjs/components/blocks.js +67 -0
- package/dist/cjs/components/blocks.js.map +7 -0
- package/dist/cjs/constants.js +41 -0
- package/dist/cjs/constants.js.map +7 -0
- package/dist/cjs/index.js +39 -0
- package/dist/cjs/index.js.map +7 -0
- package/dist/cjs/package.json +7 -0
- package/dist/esm/ActionItem.js +23 -0
- package/dist/esm/ActionItem.js.map +7 -0
- package/dist/esm/Actions.js +28 -0
- package/dist/esm/Actions.js.map +7 -0
- package/dist/esm/DSGroupBox.js +118 -0
- package/dist/esm/DSGroupBox.js.map +7 -0
- package/dist/esm/GroupBoxLabel.js +52 -0
- package/dist/esm/GroupBoxLabel.js.map +7 -0
- package/dist/esm/LabelElement.js +20 -0
- package/dist/esm/LabelElement.js.map +7 -0
- package/dist/esm/components/GroupHeader.js +30 -0
- package/dist/esm/components/GroupHeader.js.map +7 -0
- package/dist/esm/components/blocks.js +37 -0
- package/dist/esm/components/blocks.js.map +7 -0
- package/dist/esm/constants.js +11 -0
- package/dist/esm/constants.js.map +7 -0
- package/dist/esm/index.js +8 -0
- package/dist/esm/index.js.map +7 -0
- package/dist/esm/package.json +7 -0
- package/dist/types/ActionItem.d.ts +10 -0
- package/dist/types/Actions.d.ts +15 -0
- package/dist/types/DSGroupBox.d.ts +79 -0
- package/dist/types/GroupBoxLabel.d.ts +20 -0
- package/dist/types/LabelElement.d.ts +10 -0
- package/dist/types/components/GroupHeader.d.ts +12 -0
- package/dist/types/components/blocks.d.ts +4 -0
- package/dist/types/constants.d.ts +5 -0
- package/dist/types/index.d.ts +3 -0
- package/dist/types/tests/DSGroupBox.test.d.ts +1 -0
- package/package.json +102 -0
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
+
mod
|
|
27
|
+
));
|
|
28
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
+
var ActionItem_exports = {};
|
|
30
|
+
__export(ActionItem_exports, {
|
|
31
|
+
default: () => ActionItem_default
|
|
32
|
+
});
|
|
33
|
+
module.exports = __toCommonJS(ActionItem_exports);
|
|
34
|
+
var React = __toESM(require("react"));
|
|
35
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
36
|
+
var import_ds_legacy_system = require("@elliemae/ds-legacy-system");
|
|
37
|
+
var import_prop_types = __toESM(require("prop-types"));
|
|
38
|
+
const ActionItemNode = import_ds_legacy_system.styled.div`
|
|
39
|
+
padding-right: ${(props) => (0, import_ds_legacy_system.__UNSAFE_SPACE_TO_DIMSUM)(props.theme.space.xs)};
|
|
40
|
+
font-weight: 300;
|
|
41
|
+
overflow: hidden;
|
|
42
|
+
align-items: center;
|
|
43
|
+
display: flex;
|
|
44
|
+
&:last-child {
|
|
45
|
+
padding-right: 0;
|
|
46
|
+
}
|
|
47
|
+
`;
|
|
48
|
+
const ActionItem = ({ children }) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ActionItemNode, { children });
|
|
49
|
+
ActionItem.propTypes = {
|
|
50
|
+
children: import_prop_types.default.node.isRequired
|
|
51
|
+
};
|
|
52
|
+
var ActionItem_default = ActionItem;
|
|
53
|
+
//# sourceMappingURL=ActionItem.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/ActionItem.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
+
"sourcesContent": ["import React from 'react';\nimport { styled, __UNSAFE_SPACE_TO_DIMSUM } from '@elliemae/ds-legacy-system';\nimport PropTypes from 'prop-types';\n\nconst ActionItemNode = styled.div`\n padding-right: ${(props) => __UNSAFE_SPACE_TO_DIMSUM(props.theme.space.xs)};\n font-weight: 300;\n overflow: hidden;\n align-items: center;\n display: flex;\n &:last-child {\n padding-right: 0;\n }\n`;\n\nconst ActionItem = ({ children }) => <ActionItemNode>{children}</ActionItemNode>;\n\nActionItem.propTypes = {\n children: PropTypes.node.isRequired,\n};\n\nexport default ActionItem;\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADec;AAdrC,8BAAiD;AACjD,wBAAsB;AAEtB,MAAM,iBAAiB,+BAAO;AAAA,mBACX,CAAC,cAAU,kDAAyB,MAAM,MAAM,MAAM,EAAE;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAU3E,MAAM,aAAa,CAAC,EAAE,SAAS,MAAM,4CAAC,kBAAgB,UAAS;AAE/D,WAAW,YAAY;AAAA,EACrB,UAAU,kBAAAA,QAAU,KAAK;AAC3B;AAEA,IAAO,qBAAQ;",
|
|
6
|
+
"names": ["PropTypes"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
+
mod
|
|
27
|
+
));
|
|
28
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
+
var Actions_exports = {};
|
|
30
|
+
__export(Actions_exports, {
|
|
31
|
+
Actions: () => Actions,
|
|
32
|
+
default: () => Actions_default
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(Actions_exports);
|
|
35
|
+
var React = __toESM(require("react"));
|
|
36
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
37
|
+
var import_prop_types = __toESM(require("prop-types"));
|
|
38
|
+
var import_ds_legacy_system = require("@elliemae/ds-legacy-system");
|
|
39
|
+
var import_ActionItem = __toESM(require("./ActionItem.js"));
|
|
40
|
+
const ActionsNode = import_ds_legacy_system.styled.div`
|
|
41
|
+
display: flex;
|
|
42
|
+
flex-direction: row;
|
|
43
|
+
padding-left: ${(props) => (0, import_ds_legacy_system.__UNSAFE_SPACE_TO_DIMSUM)(props.theme.space.m)};
|
|
44
|
+
overflow: hidden;
|
|
45
|
+
${import_ds_legacy_system.space}
|
|
46
|
+
`;
|
|
47
|
+
const Actions = ({ actions = [], centerActions, rightActions }) => {
|
|
48
|
+
if (actions.length < 1)
|
|
49
|
+
return null;
|
|
50
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ActionsNode, { marginLeft: !!rightActions && "auto", marginRight: !!centerActions && "auto", children: actions.map((action, key) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ActionItem.default, { children: action }, key)) });
|
|
51
|
+
};
|
|
52
|
+
Actions.propTypes = {
|
|
53
|
+
actions: import_prop_types.default.array,
|
|
54
|
+
centerActions: import_prop_types.default.bool,
|
|
55
|
+
rightActions: import_prop_types.default.bool
|
|
56
|
+
};
|
|
57
|
+
var Actions_default = Actions;
|
|
58
|
+
//# sourceMappingURL=Actions.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 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-legacy-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
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADmBf;AAjBR,wBAAsB;AACtB,8BAAwD;AACxD,wBAAuB;AAEvB,MAAM,cAAc,+BAAO;AAAA;AAAA;AAAA,kBAGT,CAAC,cAAU,kDAAyB,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
|
+
"names": ["ActionItem", "PropTypes"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
+
mod
|
|
27
|
+
));
|
|
28
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
+
var DSGroupBox_exports = {};
|
|
30
|
+
__export(DSGroupBox_exports, {
|
|
31
|
+
DSGroupBox: () => DSGroupBox,
|
|
32
|
+
DSGroupBoxWithSchema: () => DSGroupBoxWithSchema,
|
|
33
|
+
default: () => DSGroupBox_default
|
|
34
|
+
});
|
|
35
|
+
module.exports = __toCommonJS(DSGroupBox_exports);
|
|
36
|
+
var React = __toESM(require("react"));
|
|
37
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
38
|
+
var import_react = __toESM(require("react"));
|
|
39
|
+
var import_ds_legacy_props_helpers = require("@elliemae/ds-legacy-props-helpers");
|
|
40
|
+
var import_blocks = require("./components/blocks.js");
|
|
41
|
+
var import_GroupHeader = require("./components/GroupHeader.js");
|
|
42
|
+
var import_constants = require("./constants.js");
|
|
43
|
+
const DSGroupBox = ({
|
|
44
|
+
containerProps = {},
|
|
45
|
+
labelProps = {
|
|
46
|
+
labelText: "",
|
|
47
|
+
borderBottom: false,
|
|
48
|
+
id: "ds-group-box__header"
|
|
49
|
+
},
|
|
50
|
+
rightActions = [],
|
|
51
|
+
centerActions = [],
|
|
52
|
+
type = import_constants.BOX_TYPES.CATEGORY,
|
|
53
|
+
asRow = false,
|
|
54
|
+
onlyHeader = false,
|
|
55
|
+
noBorder = true,
|
|
56
|
+
noPadding = false,
|
|
57
|
+
children: components = [],
|
|
58
|
+
// eslint-disable-next-line react/prop-types
|
|
59
|
+
isMain = true
|
|
60
|
+
}) => {
|
|
61
|
+
const { labelText } = labelProps;
|
|
62
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_blocks.GroupBoxWrapper, { ...containerProps, classProps: { onlyHeader, noBorder, type, isMain }, children: [
|
|
63
|
+
labelText && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
64
|
+
import_GroupHeader.DSGroupBoxHeader,
|
|
65
|
+
{
|
|
66
|
+
centerActions,
|
|
67
|
+
isMain,
|
|
68
|
+
labelProps,
|
|
69
|
+
noBorder,
|
|
70
|
+
rightActions,
|
|
71
|
+
type
|
|
72
|
+
}
|
|
73
|
+
),
|
|
74
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
75
|
+
import_blocks.GroupBoxContent,
|
|
76
|
+
{
|
|
77
|
+
classProps: {
|
|
78
|
+
type,
|
|
79
|
+
asRow,
|
|
80
|
+
onlyHeader,
|
|
81
|
+
noPadding,
|
|
82
|
+
noBorder,
|
|
83
|
+
noBorderTop: !!labelText
|
|
84
|
+
},
|
|
85
|
+
children: components && components.props ? import_react.default.Children.map(
|
|
86
|
+
components,
|
|
87
|
+
(component) => import_react.default.cloneElement(component, {
|
|
88
|
+
...component.props,
|
|
89
|
+
isMain: false
|
|
90
|
+
}),
|
|
91
|
+
null
|
|
92
|
+
) : components
|
|
93
|
+
}
|
|
94
|
+
)
|
|
95
|
+
] });
|
|
96
|
+
};
|
|
97
|
+
const props = {
|
|
98
|
+
/** props to inject to wrapper */
|
|
99
|
+
containerProps: import_ds_legacy_props_helpers.PropTypes.object.description("props to inject to wrapper"),
|
|
100
|
+
/**
|
|
101
|
+
* Label attributes to be rendered
|
|
102
|
+
*/
|
|
103
|
+
labelProps: import_ds_legacy_props_helpers.PropTypes.shape({
|
|
104
|
+
labelText: import_ds_legacy_props_helpers.PropTypes.oneOfType([import_ds_legacy_props_helpers.PropTypes.string, import_ds_legacy_props_helpers.PropTypes.element]),
|
|
105
|
+
borderBottom: import_ds_legacy_props_helpers.PropTypes.bool,
|
|
106
|
+
id: import_ds_legacy_props_helpers.PropTypes.string
|
|
107
|
+
}).description("Label attributes to be rendered"),
|
|
108
|
+
/**
|
|
109
|
+
* ['category-box', 'group-box']
|
|
110
|
+
*/
|
|
111
|
+
type: import_ds_legacy_props_helpers.PropTypes.oneOf(import_constants.BOX_TYPES_ARRAY).description(import_constants.BOX_TYPES_ARRAY.toString()),
|
|
112
|
+
/**
|
|
113
|
+
* Components to be rendered inside the box
|
|
114
|
+
*/
|
|
115
|
+
children: import_ds_legacy_props_helpers.PropTypes.oneOfType([import_ds_legacy_props_helpers.PropTypes.element, import_ds_legacy_props_helpers.PropTypes.arrayOf(import_ds_legacy_props_helpers.PropTypes.element)]).isRequired.description(
|
|
116
|
+
"Components to be rendered inside the box"
|
|
117
|
+
),
|
|
118
|
+
/**
|
|
119
|
+
* Actions on the right side of the label
|
|
120
|
+
*/
|
|
121
|
+
rightActions: import_ds_legacy_props_helpers.PropTypes.arrayOf(import_ds_legacy_props_helpers.PropTypes.element).description("Actions on the right side of the label"),
|
|
122
|
+
/**
|
|
123
|
+
* Actions on the next to the label
|
|
124
|
+
*/
|
|
125
|
+
centerActions: import_ds_legacy_props_helpers.PropTypes.arrayOf(import_ds_legacy_props_helpers.PropTypes.element).description("Actions on the next to the label"),
|
|
126
|
+
/**
|
|
127
|
+
* Display the content of the group box with flex direction row
|
|
128
|
+
*/
|
|
129
|
+
asRow: import_ds_legacy_props_helpers.PropTypes.bool.description("Display the content of the group box with flex direction row"),
|
|
130
|
+
/**
|
|
131
|
+
* Show border only on the header
|
|
132
|
+
*/
|
|
133
|
+
onlyHeader: import_ds_legacy_props_helpers.PropTypes.bool.description("Show border only on the header"),
|
|
134
|
+
/**
|
|
135
|
+
* Remove the wrapper border
|
|
136
|
+
*/
|
|
137
|
+
noBorder: import_ds_legacy_props_helpers.PropTypes.bool.description("Remove the wrapper border"),
|
|
138
|
+
/**
|
|
139
|
+
* Remove the top and bottom padding from the content
|
|
140
|
+
*/
|
|
141
|
+
noPadding: import_ds_legacy_props_helpers.PropTypes.bool.description("Remove the top and bottom padding from the content")
|
|
142
|
+
};
|
|
143
|
+
DSGroupBox.propTypes = props;
|
|
144
|
+
DSGroupBox.displayName = "DSGroupBox";
|
|
145
|
+
const DSGroupBoxWithSchema = (0, import_ds_legacy_props_helpers.describe)(DSGroupBox);
|
|
146
|
+
DSGroupBoxWithSchema.propTypes = props;
|
|
147
|
+
var DSGroupBox_default = DSGroupBox;
|
|
148
|
+
//# sourceMappingURL=DSGroupBox.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/DSGroupBox.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
+
"sourcesContent": ["import React from 'react';\nimport { PropTypes, describe } from '@elliemae/ds-legacy-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,qCAAoC;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;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;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA;AAAA,IACF;AAAA,IAGF;AAAA,MAAC;AAAA;AAAA,QACC,YAAY;AAAA,UACV;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACA,aAAa,CAAC,CAAC;AAAA,QACjB;AAAA,QAEC,wBAAc,WAAW,QACtB,aAAAA,QAAM,SAAS;AAAA,UACb;AAAA,UACA,CAAC,cACC,aAAAA,QAAM,aAAa,WAAW;AAAA,YAC5B,GAAG,UAAU;AAAA,YACb,QAAQ;AAAA,UACV,CAAC;AAAA,UACH;AAAA,QACF,IACA;AAAA;AAAA,IACN;AAAA,KACF;AAEJ;AAEA,MAAM,QAAQ;AAAA;AAAA,EAEZ,gBAAgB,yCAAU,OAAO,YAAY,4BAA4B;AAAA;AAAA;AAAA;AAAA,EAIzE,YAAY,yCAAU,MAAM;AAAA,IAC1B,WAAW,yCAAU,UAAU,CAAC,yCAAU,QAAQ,yCAAU,OAAO,CAAC;AAAA,IACpE,cAAc,yCAAU;AAAA,IACxB,IAAI,yCAAU;AAAA,EAChB,CAAC,EAAE,YAAY,iCAAiC;AAAA;AAAA;AAAA;AAAA,EAIhD,MAAM,yCAAU,MAAM,gCAAe,EAAE,YAAY,iCAAgB,SAAS,CAAC;AAAA;AAAA;AAAA;AAAA,EAI7E,UAAU,yCAAU,UAAU,CAAC,yCAAU,SAAS,yCAAU,QAAQ,yCAAU,OAAO,CAAC,CAAC,EAAE,WAAW;AAAA,IAClG;AAAA,EACF;AAAA;AAAA;AAAA;AAAA,EAIA,cAAc,yCAAU,QAAQ,yCAAU,OAAO,EAAE,YAAY,wCAAwC;AAAA;AAAA;AAAA;AAAA,EAIvG,eAAe,yCAAU,QAAQ,yCAAU,OAAO,EAAE,YAAY,kCAAkC;AAAA;AAAA;AAAA;AAAA,EAIlG,OAAO,yCAAU,KAAK,YAAY,8DAA8D;AAAA;AAAA;AAAA;AAAA,EAIhG,YAAY,yCAAU,KAAK,YAAY,gCAAgC;AAAA;AAAA;AAAA;AAAA,EAIvE,UAAU,yCAAU,KAAK,YAAY,2BAA2B;AAAA;AAAA;AAAA;AAAA,EAIhE,WAAW,yCAAU,KAAK,YAAY,oDAAoD;AAC5F;AAEA,WAAW,YAAY;AACvB,WAAW,cAAc;AACzB,MAAM,2BAAuB,yCAAS,UAAU;AAEhD,qBAAqB,YAAY;AAGjC,IAAO,qBAAQ;",
|
|
6
|
+
"names": ["React"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
+
mod
|
|
27
|
+
));
|
|
28
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
+
var GroupBoxLabel_exports = {};
|
|
30
|
+
__export(GroupBoxLabel_exports, {
|
|
31
|
+
default: () => GroupBoxLabel_default
|
|
32
|
+
});
|
|
33
|
+
module.exports = __toCommonJS(GroupBoxLabel_exports);
|
|
34
|
+
var React = __toESM(require("react"));
|
|
35
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
36
|
+
var import_prop_types = __toESM(require("prop-types"));
|
|
37
|
+
var import_ds_legacy_system = require("@elliemae/ds-legacy-system");
|
|
38
|
+
var import_constants = require("./constants.js");
|
|
39
|
+
const borderBase200 = (props) => `1px solid ${props.theme.colors.neutral[200]};`;
|
|
40
|
+
const categoryBoxStyles = `
|
|
41
|
+
width: 100%;
|
|
42
|
+
height: 36px;
|
|
43
|
+
padding:0 0;
|
|
44
|
+
color: ${(props) => props.theme.colors.neutral[800]};
|
|
45
|
+
display: flex;
|
|
46
|
+
flex-direction: row;
|
|
47
|
+
align-items: center;
|
|
48
|
+
border-bottom: ${borderBase200}
|
|
49
|
+
`;
|
|
50
|
+
const groupBoxStyles = `
|
|
51
|
+
border: unset;
|
|
52
|
+
font-size: ${(props) => (0, import_ds_legacy_system.toMobile)(props.theme.fontSizes.title[500])};
|
|
53
|
+
padding: 12px 0;
|
|
54
|
+
`;
|
|
55
|
+
const GroupBoxLabelNode = import_ds_legacy_system.styled.div`
|
|
56
|
+
${(props) => props.nodeType === "category-box" ? categoryBoxStyles : groupBoxStyles}
|
|
57
|
+
${(props) => props.noBorder ? "border: none;" : ""}
|
|
58
|
+
${(props) => props.borderBottom ? `border-bottom: ${borderBase200(props)}` : ""}
|
|
59
|
+
${(props) => props.isMain ? `padding-right: ${(0, import_ds_legacy_system.__UNSAFE_SPACE_TO_DIMSUM)(props.theme.space.xs)};` : ""}
|
|
60
|
+
`;
|
|
61
|
+
const GroupBoxLabel = ({ borderBottom, children, noBorder, isMain, type, id }) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
62
|
+
GroupBoxLabelNode,
|
|
63
|
+
{
|
|
64
|
+
borderBottom,
|
|
65
|
+
"data-testid": "ds-group-box__header",
|
|
66
|
+
isMain,
|
|
67
|
+
noBorder,
|
|
68
|
+
nodeType: type,
|
|
69
|
+
id,
|
|
70
|
+
children
|
|
71
|
+
}
|
|
72
|
+
);
|
|
73
|
+
GroupBoxLabel.propTypes = {
|
|
74
|
+
children: import_prop_types.default.oneOfType([import_prop_types.default.arrayOf(import_prop_types.default.node), import_prop_types.default.node]).isRequired,
|
|
75
|
+
type: import_prop_types.default.oneOf(import_constants.BOX_TYPES_ARRAY),
|
|
76
|
+
borderBottom: import_prop_types.default.bool,
|
|
77
|
+
isMain: import_prop_types.default.bool.isRequired,
|
|
78
|
+
noBorder: import_prop_types.default.bool,
|
|
79
|
+
id: import_prop_types.default.string
|
|
80
|
+
};
|
|
81
|
+
var GroupBoxLabel_default = GroupBoxLabel;
|
|
82
|
+
//# sourceMappingURL=GroupBoxLabel.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 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-legacy-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
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;AD+BrB;AA9BF,wBAAsB;AACtB,8BAA2D;AAC3D,uBAAgC;AAEhC,MAAM,gBAAgB,CAAC,UAAU,aAAa,MAAM,MAAM,OAAO,QAAQ,GAAG;AAE5E,MAAM,oBAAoB;AAAA;AAAA;AAAA;AAAA,WAIf,CAAC,UAAU,MAAM,MAAM,OAAO,QAAQ,GAAG;AAAA;AAAA;AAAA;AAAA,mBAIjC;AAAA;AAGnB,MAAM,iBAAiB;AAAA;AAAA,eAER,CAAC,cAAU,kCAAS,MAAM,MAAM,UAAU,MAAM,GAAG,CAAC;AAAA;AAAA;AAInE,MAAM,oBAAoB,+BAAO;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,kDAAyB,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
|
+
"names": ["PropTypes"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
+
mod
|
|
27
|
+
));
|
|
28
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
+
var LabelElement_exports = {};
|
|
30
|
+
__export(LabelElement_exports, {
|
|
31
|
+
default: () => LabelElement_default
|
|
32
|
+
});
|
|
33
|
+
module.exports = __toCommonJS(LabelElement_exports);
|
|
34
|
+
var React = __toESM(require("react"));
|
|
35
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
36
|
+
var import_prop_types = __toESM(require("prop-types"));
|
|
37
|
+
var import_ds_legacy_system = require("@elliemae/ds-legacy-system");
|
|
38
|
+
const LabelElementNode = import_ds_legacy_system.styled.div`
|
|
39
|
+
overflow: hidden;
|
|
40
|
+
display: flex;
|
|
41
|
+
align-items: center;
|
|
42
|
+
font-size: ${(props) => (0, import_ds_legacy_system.toMobile)(props.theme.fontSizes.title[700])};
|
|
43
|
+
font-weight: 400;
|
|
44
|
+
`;
|
|
45
|
+
const LabelElement = ({ children }) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(LabelElementNode, { children });
|
|
46
|
+
LabelElement.propTypes = {
|
|
47
|
+
children: import_prop_types.default.oneOfType([import_prop_types.default.string, import_prop_types.default.node]).isRequired
|
|
48
|
+
};
|
|
49
|
+
var LabelElement_default = LabelElement;
|
|
50
|
+
//# sourceMappingURL=LabelElement.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/LabelElement.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
+
"sourcesContent": ["import React from 'react';\nimport PropTypes from 'prop-types';\nimport { styled, toMobile } from '@elliemae/ds-legacy-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\nconst LabelElement = ({ children }) => <LabelElementNode>{children}</LabelElementNode>;\n\nLabelElement.propTypes = {\n children: PropTypes.oneOfType([PropTypes.string, PropTypes.node]).isRequired,\n};\n\nexport default LabelElement;\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADYgB;AAXvC,wBAAsB;AACtB,8BAAiC;AAEjC,MAAM,mBAAmB,+BAAO;AAAA;AAAA;AAAA;AAAA,eAIjB,CAAC,cAAU,kCAAS,MAAM,MAAM,UAAU,MAAM,GAAG,CAAC;AAAA;AAAA;AAInE,MAAM,eAAe,CAAC,EAAE,SAAS,MAAM,4CAAC,oBAAkB,UAAS;AAEnE,aAAa,YAAY;AAAA,EACvB,UAAU,kBAAAA,QAAU,UAAU,CAAC,kBAAAA,QAAU,QAAQ,kBAAAA,QAAU,IAAI,CAAC,EAAE;AACpE;AAEA,IAAO,uBAAQ;",
|
|
6
|
+
"names": ["PropTypes"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
+
mod
|
|
27
|
+
));
|
|
28
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
+
var GroupHeader_exports = {};
|
|
30
|
+
__export(GroupHeader_exports, {
|
|
31
|
+
DSGroupBoxHeader: () => DSGroupBoxHeader
|
|
32
|
+
});
|
|
33
|
+
module.exports = __toCommonJS(GroupHeader_exports);
|
|
34
|
+
var React = __toESM(require("react"));
|
|
35
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
36
|
+
var import_ds_legacy_truncated_tooltip_text = __toESM(require("@elliemae/ds-legacy-truncated-tooltip-text"));
|
|
37
|
+
var import_constants = require("../constants.js");
|
|
38
|
+
var import_Actions = __toESM(require("../Actions.js"));
|
|
39
|
+
var import_LabelElement = __toESM(require("../LabelElement.js"));
|
|
40
|
+
var import_GroupBoxLabel = __toESM(require("../GroupBoxLabel.js"));
|
|
41
|
+
const DSGroupBoxHeader = ({
|
|
42
|
+
labelProps = {
|
|
43
|
+
labelText: "",
|
|
44
|
+
borderBottom: false,
|
|
45
|
+
id: "ds-group-box__header"
|
|
46
|
+
},
|
|
47
|
+
rightActions = [],
|
|
48
|
+
centerActions = [],
|
|
49
|
+
type = import_constants.BOX_TYPES.CATEGORY,
|
|
50
|
+
noBorder,
|
|
51
|
+
isMain
|
|
52
|
+
}) => {
|
|
53
|
+
const { labelText, borderBottom, id } = labelProps;
|
|
54
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_GroupBoxLabel.default, { borderBottom, isMain, noBorder, type, id, children: [
|
|
55
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_LabelElement.default, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_legacy_truncated_tooltip_text.default, { value: labelText }) }),
|
|
56
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_Actions.default, { actions: centerActions, centerActions: centerActions.length > 0 }),
|
|
57
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_Actions.default, { actions: rightActions, rightActions: rightActions.length > 0 })
|
|
58
|
+
] });
|
|
59
|
+
};
|
|
60
|
+
//# sourceMappingURL=GroupHeader.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/components/GroupHeader.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
+
"sourcesContent": ["import React from 'react';\nimport DSTruncatedTooltipText from '@elliemae/ds-legacy-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
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADqBnB;AApBJ,8CAAmC;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,wCAAAC,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
|
+
"names": ["Label", "LabelElement", "DSTruncatedTooltipText", "Actions"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
+
mod
|
|
27
|
+
));
|
|
28
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
+
var blocks_exports = {};
|
|
30
|
+
__export(blocks_exports, {
|
|
31
|
+
GroupBoxContent: () => GroupBoxContent,
|
|
32
|
+
GroupBoxWrapper: () => GroupBoxWrapper,
|
|
33
|
+
Label: () => Label
|
|
34
|
+
});
|
|
35
|
+
module.exports = __toCommonJS(blocks_exports);
|
|
36
|
+
var React = __toESM(require("react"));
|
|
37
|
+
var import_ds_legacy_classnames = require("@elliemae/ds-legacy-classnames");
|
|
38
|
+
const blockName = "group-box";
|
|
39
|
+
const GroupBoxWrapper = (0, import_ds_legacy_classnames.aggregatedClasses)("div")(
|
|
40
|
+
blockName,
|
|
41
|
+
"wrapper",
|
|
42
|
+
({ onlyHeader, noBorder, type, isMain }) => ({
|
|
43
|
+
"only-header": onlyHeader,
|
|
44
|
+
"no-border": noBorder,
|
|
45
|
+
[type]: type,
|
|
46
|
+
"main-box": isMain,
|
|
47
|
+
"nested-box": !isMain
|
|
48
|
+
})
|
|
49
|
+
);
|
|
50
|
+
const GroupBoxContent = (0, import_ds_legacy_classnames.aggregatedClasses)("div")(
|
|
51
|
+
blockName,
|
|
52
|
+
"content",
|
|
53
|
+
({ type, asRow, onlyHeader, noPadding, noBorder, noBorderTop }) => ({
|
|
54
|
+
[type]: type,
|
|
55
|
+
"as-row": asRow,
|
|
56
|
+
"only-header": onlyHeader,
|
|
57
|
+
"no-padding": noPadding,
|
|
58
|
+
"no-border": noBorder,
|
|
59
|
+
"no-border-top": noBorderTop
|
|
60
|
+
})
|
|
61
|
+
);
|
|
62
|
+
const Label = (0, import_ds_legacy_classnames.aggregatedClasses)("div")(blockName, "label", ({ borderBottom, type, noBorder }) => ({
|
|
63
|
+
"border-bottom": borderBottom,
|
|
64
|
+
[type]: type,
|
|
65
|
+
"no-border": noBorder
|
|
66
|
+
}));
|
|
67
|
+
//# sourceMappingURL=blocks.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/components/blocks.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
+
"sourcesContent": ["import { aggregatedClasses } from '@elliemae/ds-legacy-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')(blockName, 'label', ({ borderBottom, type, noBorder }) => ({\n 'border-bottom': borderBottom,\n [type]: type,\n 'no-border': noBorder,\n}));\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,kCAAkC;AAElC,MAAM,YAAY;AAEX,MAAM,sBAAkB,+CAAkB,KAAK;AAAA,EACpD;AAAA,EACA;AAAA,EACA,CAAC,EAAE,YAAY,UAAU,MAAM,OAAO,OAAO;AAAA,IAC3C,eAAe;AAAA,IACf,aAAa;AAAA,IACb,CAAC,IAAI,GAAG;AAAA,IACR,YAAY;AAAA,IACZ,cAAc,CAAC;AAAA,EACjB;AACF;AAEO,MAAM,sBAAkB,+CAAkB,KAAK;AAAA,EACpD;AAAA,EACA;AAAA,EACA,CAAC,EAAE,MAAM,OAAO,YAAY,WAAW,UAAU,YAAY,OAAO;AAAA,IAClE,CAAC,IAAI,GAAG;AAAA,IACR,UAAU;AAAA,IACV,eAAe;AAAA,IACf,cAAc;AAAA,IACd,aAAa;AAAA,IACb,iBAAiB;AAAA,EACnB;AACF;AAEO,MAAM,YAAQ,+CAAkB,KAAK,EAAE,WAAW,SAAS,CAAC,EAAE,cAAc,MAAM,SAAS,OAAO;AAAA,EACvG,iBAAiB;AAAA,EACjB,CAAC,IAAI,GAAG;AAAA,EACR,aAAa;AACf,EAAE;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
+
mod
|
|
27
|
+
));
|
|
28
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
+
var constants_exports = {};
|
|
30
|
+
__export(constants_exports, {
|
|
31
|
+
BOX_TYPES: () => BOX_TYPES,
|
|
32
|
+
BOX_TYPES_ARRAY: () => BOX_TYPES_ARRAY
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(constants_exports);
|
|
35
|
+
var React = __toESM(require("react"));
|
|
36
|
+
const BOX_TYPES = {
|
|
37
|
+
CATEGORY: "category-box",
|
|
38
|
+
GROUP: "group-box"
|
|
39
|
+
};
|
|
40
|
+
const BOX_TYPES_ARRAY = [BOX_TYPES.CATEGORY, BOX_TYPES.GROUP];
|
|
41
|
+
//# sourceMappingURL=constants.js.map
|