@elliemae/ds-card-v2-group 3.21.0-next.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/DSCardV2Group.js +67 -0
- package/dist/cjs/DSCardV2Group.js.map +7 -0
- package/dist/cjs/config/useCardV2Group.js +65 -0
- package/dist/cjs/config/useCardV2Group.js.map +7 -0
- package/dist/cjs/config/useValidateProps.js +40 -0
- package/dist/cjs/config/useValidateProps.js.map +7 -0
- package/dist/cjs/constants/index.js +46 -0
- package/dist/cjs/constants/index.js.map +7 -0
- package/dist/cjs/index.js +41 -0
- package/dist/cjs/index.js.map +7 -0
- package/dist/cjs/package.json +7 -0
- package/dist/cjs/react-desc-prop-types.js +56 -0
- package/dist/cjs/react-desc-prop-types.js.map +7 -0
- package/dist/cjs/styles.js +69 -0
- package/dist/cjs/styles.js.map +7 -0
- package/dist/esm/DSCardV2Group.js +37 -0
- package/dist/esm/DSCardV2Group.js.map +7 -0
- package/dist/esm/config/useCardV2Group.js +35 -0
- package/dist/esm/config/useCardV2Group.js.map +7 -0
- package/dist/esm/config/useValidateProps.js +10 -0
- package/dist/esm/config/useValidateProps.js.map +7 -0
- package/dist/esm/constants/index.js +16 -0
- package/dist/esm/constants/index.js.map +7 -0
- package/dist/esm/index.js +15 -0
- package/dist/esm/index.js.map +7 -0
- package/dist/esm/package.json +7 -0
- package/dist/esm/react-desc-prop-types.js +26 -0
- package/dist/esm/react-desc-prop-types.js.map +7 -0
- package/dist/esm/styles.js +39 -0
- package/dist/esm/styles.js.map +7 -0
- package/dist/types/config/useCardV2Group.d.ts +15 -0
- package/dist/types/config/useValidateProps.d.ts +3 -0
- package/dist/types/constants/index.d.ts +8 -0
- package/dist/types/index.d.ts +3 -0
- package/dist/types/react-desc-prop-types.d.ts +20 -0
- package/dist/types/styles.d.ts +12 -0
- package/dist/types/tests/DSCardGroupV2.axe.test.d.ts +1 -0
- package/dist/types/tests/DSCardGroupV2.test.d.ts +1 -0
- package/package.json +83 -0
|
@@ -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 DSCardV2Group_exports = {};
|
|
30
|
+
__export(DSCardV2Group_exports, {
|
|
31
|
+
DSCardV2Group: () => DSCardV2Group,
|
|
32
|
+
DSCardV2GroupWithSchema: () => DSCardV2GroupWithSchema
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(DSCardV2Group_exports);
|
|
35
|
+
var React = __toESM(require("react"));
|
|
36
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
37
|
+
var import_ds_utilities = require("@elliemae/ds-utilities");
|
|
38
|
+
var import_react_desc_prop_types = require("./react-desc-prop-types.js");
|
|
39
|
+
var import_useCardV2Group = require("./config/useCardV2Group.js");
|
|
40
|
+
var import_styles = require("./styles.js");
|
|
41
|
+
var import_constants = require("./constants/index.js");
|
|
42
|
+
const DSCardV2Group = (props) => {
|
|
43
|
+
const { propsWithDefault, globalProps, xstyledProps } = (0, import_useCardV2Group.useCardV2Group)(props);
|
|
44
|
+
const { children, title, action } = propsWithDefault;
|
|
45
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
46
|
+
import_styles.Group,
|
|
47
|
+
{
|
|
48
|
+
withTopBorder: !title,
|
|
49
|
+
getOwnerProps: () => propsWithDefault,
|
|
50
|
+
getOwnerPropsArguments: () => ({}),
|
|
51
|
+
...globalProps,
|
|
52
|
+
...xstyledProps,
|
|
53
|
+
children: [
|
|
54
|
+
!!title && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_styles.TitleWrapper, { children: [
|
|
55
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_styles.GroupTitle, { children: title }),
|
|
56
|
+
action
|
|
57
|
+
] }),
|
|
58
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_styles.Items, { children })
|
|
59
|
+
]
|
|
60
|
+
}
|
|
61
|
+
);
|
|
62
|
+
};
|
|
63
|
+
DSCardV2Group.propTypes = import_react_desc_prop_types.DSCardV2GroupPropTypesSchema;
|
|
64
|
+
DSCardV2Group.displayName = import_constants.DSCardV2GroupName;
|
|
65
|
+
const DSCardV2GroupWithSchema = (0, import_ds_utilities.describe)(DSCardV2Group);
|
|
66
|
+
DSCardV2GroupWithSchema.propTypes = import_react_desc_prop_types.DSCardV2GroupPropTypesSchema;
|
|
67
|
+
//# sourceMappingURL=DSCardV2Group.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/DSCardV2Group.tsx", "../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
+
"sourcesContent": ["import React from 'react';\nimport { describe } from '@elliemae/ds-utilities';\nimport { type DSCardV2GroupT, DSCardV2GroupPropTypesSchema } from './react-desc-prop-types.js';\nimport { useCardV2Group } from './config/useCardV2Group.js';\nimport { Group, TitleWrapper, GroupTitle, Items } from './styles.js';\nimport { DSCardV2GroupName } from './constants/index.js';\n\nconst DSCardV2Group: React.ComponentType<DSCardV2GroupT.Props> = (props) => {\n const { propsWithDefault, globalProps, xstyledProps } = useCardV2Group(props);\n const { children, title, action } = propsWithDefault;\n return (\n <Group\n withTopBorder={!title}\n getOwnerProps={() => propsWithDefault}\n getOwnerPropsArguments={() => ({})}\n {...globalProps}\n {...xstyledProps}\n >\n {!!title && (\n <TitleWrapper>\n <GroupTitle>{title}</GroupTitle>\n {action}\n </TitleWrapper>\n )}\n <Items>{children}</Items>\n </Group>\n );\n};\n\nDSCardV2Group.propTypes = DSCardV2GroupPropTypesSchema;\nDSCardV2Group.displayName = DSCardV2GroupName;\nconst DSCardV2GroupWithSchema = describe(DSCardV2Group);\nDSCardV2GroupWithSchema.propTypes = DSCardV2GroupPropTypesSchema;\n\nexport { DSCardV2Group, DSCardV2GroupWithSchema };\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADmBf;AAlBR,0BAAyB;AACzB,mCAAkE;AAClE,4BAA+B;AAC/B,oBAAuD;AACvD,uBAAkC;AAElC,MAAM,gBAA2D,CAAC,UAAU;AAC1E,QAAM,EAAE,kBAAkB,aAAa,aAAa,QAAI,sCAAe,KAAK;AAC5E,QAAM,EAAE,UAAU,OAAO,OAAO,IAAI;AACpC,SACE;AAAA,IAAC;AAAA;AAAA,MACC,eAAe,CAAC;AAAA,MAChB,eAAe,MAAM;AAAA,MACrB,wBAAwB,OAAO,CAAC;AAAA,MAC/B,GAAG;AAAA,MACH,GAAG;AAAA,MAEH;AAAA,SAAC,CAAC,SACD,6CAAC,8BACC;AAAA,sDAAC,4BAAY,iBAAM;AAAA,UAClB;AAAA,WACH;AAAA,QAEF,4CAAC,uBAAO,UAAS;AAAA;AAAA;AAAA,EACnB;AAEJ;AAEA,cAAc,YAAY;AAC1B,cAAc,cAAc;AAC5B,MAAM,8BAA0B,8BAAS,aAAa;AACtD,wBAAwB,YAAY;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,65 @@
|
|
|
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 useCardV2Group_exports = {};
|
|
30
|
+
__export(useCardV2Group_exports, {
|
|
31
|
+
useCardV2Group: () => useCardV2Group
|
|
32
|
+
});
|
|
33
|
+
module.exports = __toCommonJS(useCardV2Group_exports);
|
|
34
|
+
var React = __toESM(require("react"));
|
|
35
|
+
var import_react = __toESM(require("react"));
|
|
36
|
+
var import_lodash = require("lodash");
|
|
37
|
+
var import_ds_utilities = require("@elliemae/ds-utilities");
|
|
38
|
+
var import_uid = require("uid");
|
|
39
|
+
var import_react_desc_prop_types = require("../react-desc-prop-types.js");
|
|
40
|
+
var import_useValidateProps = require("./useValidateProps.js");
|
|
41
|
+
const useCardV2Group = (propsFromUser) => {
|
|
42
|
+
const propsWithDefault = (0, import_ds_utilities.useMemoMergePropsWithDefault)(propsFromUser, import_react_desc_prop_types.defaultProps);
|
|
43
|
+
(0, import_useValidateProps.useValidateProps)(propsWithDefault, import_react_desc_prop_types.DSCardV2GroupPropTypes);
|
|
44
|
+
const globalProps = (0, import_lodash.omit)((0, import_ds_utilities.useGetGlobalAttributes)(propsWithDefault), ["cols", "rows", "wrap"]);
|
|
45
|
+
const xstyledProps = (0, import_ds_utilities.useGetXstyledProps)(propsWithDefault);
|
|
46
|
+
const { id } = propsWithDefault;
|
|
47
|
+
const instanceUid = import_react.default.useMemo(() => id || (0, import_uid.uid)(5), [id]);
|
|
48
|
+
return import_react.default.useMemo(
|
|
49
|
+
() => ({
|
|
50
|
+
propsWithDefault,
|
|
51
|
+
globalProps,
|
|
52
|
+
xstyledProps,
|
|
53
|
+
instanceUid
|
|
54
|
+
// ...eventHandlers,
|
|
55
|
+
}),
|
|
56
|
+
[
|
|
57
|
+
propsWithDefault,
|
|
58
|
+
globalProps,
|
|
59
|
+
xstyledProps,
|
|
60
|
+
instanceUid
|
|
61
|
+
// eventHandlers,
|
|
62
|
+
]
|
|
63
|
+
);
|
|
64
|
+
};
|
|
65
|
+
//# sourceMappingURL=useCardV2Group.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/config/useCardV2Group.ts", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
+
"sourcesContent": ["import React from 'react';\nimport { omit } from 'lodash';\nimport { useGetGlobalAttributes, useGetXstyledProps, useMemoMergePropsWithDefault } from '@elliemae/ds-utilities';\nimport { uid } from 'uid';\nimport { type DSCardV2GroupT, DSCardV2GroupPropTypes, defaultProps } from '../react-desc-prop-types.js';\nimport { useValidateProps } from './useValidateProps.js';\n\nexport interface CardV2GroupCTX {\n propsWithDefault: DSCardV2GroupT.InternalProps;\n globalProps: ReturnType<typeof useGetGlobalAttributes>;\n xstyledProps: ReturnType<typeof useGetXstyledProps>;\n instanceUid: string;\n}\n\nexport const useCardV2Group = (propsFromUser: DSCardV2GroupT.Props) => {\n // =============================================================================\n // MERGE WITH DEFAULT AND VALIDATE PROPS\n // =============================================================================\n const propsWithDefault = useMemoMergePropsWithDefault<DSCardV2GroupT.InternalProps>(propsFromUser, defaultProps);\n useValidateProps(propsWithDefault, DSCardV2GroupPropTypes);\n // =============================================================================\n // GLOBAL ATTRIBUTES & XSTYLED PROPS\n // =============================================================================\n const globalProps = omit(useGetGlobalAttributes<DSCardV2GroupT.InternalProps>(propsWithDefault), ['cols', 'rows', 'wrap']);\n const xstyledProps = useGetXstyledProps(propsWithDefault);\n // =============================================================================\n // AD HOC PER COMPONENT LOGIC\n // =============================================================================\n // custom code goes here, this is an example\n const { id } = propsWithDefault;\n const instanceUid = React.useMemo(() => id || uid(5), [id]);\n // =============================================================================\n // HELPERS HOOKS CONFIGS\n // =============================================================================\n // const eventHandlers = useEventHandlers({ propsWithDefault, instanceUid }); // <-- complex logic should be made atomics this way\n\n return React.useMemo(\n () => ({\n propsWithDefault,\n globalProps,\n xstyledProps,\n instanceUid,\n // ...eventHandlers,\n }),\n [\n propsWithDefault,\n globalProps,\n xstyledProps,\n instanceUid,\n // eventHandlers,\n ],\n );\n};\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,mBAAkB;AAClB,oBAAqB;AACrB,0BAAyF;AACzF,iBAAoB;AACpB,mCAA0E;AAC1E,8BAAiC;AAS1B,MAAM,iBAAiB,CAAC,kBAAwC;AAIrE,QAAM,uBAAmB,kDAA2D,eAAe,yCAAY;AAC/G,gDAAiB,kBAAkB,mDAAsB;AAIzD,QAAM,kBAAc,wBAAK,4CAAqD,gBAAgB,GAAG,CAAC,QAAQ,QAAQ,MAAM,CAAC;AACzH,QAAM,mBAAe,wCAAmB,gBAAgB;AAKxD,QAAM,EAAE,GAAG,IAAI;AACf,QAAM,cAAc,aAAAA,QAAM,QAAQ,MAAM,UAAM,gBAAI,CAAC,GAAG,CAAC,EAAE,CAAC;AAM1D,SAAO,aAAAA,QAAM;AAAA,IACX,OAAO;AAAA,MACL;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA;AAAA,IAEF;AAAA,IACA;AAAA,MACE;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA;AAAA,IAEF;AAAA,EACF;AACF;",
|
|
6
|
+
"names": ["React"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
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 useValidateProps_exports = {};
|
|
30
|
+
__export(useValidateProps_exports, {
|
|
31
|
+
useValidateProps: () => useValidateProps
|
|
32
|
+
});
|
|
33
|
+
module.exports = __toCommonJS(useValidateProps_exports);
|
|
34
|
+
var React = __toESM(require("react"));
|
|
35
|
+
var import_ds_utilities = require("@elliemae/ds-utilities");
|
|
36
|
+
var import_constants = require("../constants/index.js");
|
|
37
|
+
const useValidateProps = (props, propTypes) => {
|
|
38
|
+
(0, import_ds_utilities.useValidateTypescriptPropTypes)(props, propTypes, import_constants.DSCardV2GroupName);
|
|
39
|
+
};
|
|
40
|
+
//# sourceMappingURL=useValidateProps.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/config/useValidateProps.ts", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
+
"sourcesContent": ["import { useValidateTypescriptPropTypes } from '@elliemae/ds-utilities';\nimport type { WeakValidationMap } from 'react';\nimport { type DSCardV2GroupT } from '../react-desc-prop-types.js';\nimport { DSCardV2GroupName } from '../constants/index.js';\n\nexport const useValidateProps = (props: DSCardV2GroupT.InternalProps, propTypes: WeakValidationMap<unknown>): void => {\n // we validate the \"required if\" via 'isRequiredIf from our custom PropTypes\n useValidateTypescriptPropTypes(props, propTypes, DSCardV2GroupName);\n};\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,0BAA+C;AAG/C,uBAAkC;AAE3B,MAAM,mBAAmB,CAAC,OAAqC,cAAgD;AAEpH,0DAA+B,OAAO,WAAW,kCAAiB;AACpE;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
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
|
+
CARD_V2_GROUP_DATA_TESTID: () => CARD_V2_GROUP_DATA_TESTID,
|
|
32
|
+
CARD_V2_GROUP_SLOTS: () => CARD_V2_GROUP_SLOTS,
|
|
33
|
+
DSCardV2GroupName: () => DSCardV2GroupName
|
|
34
|
+
});
|
|
35
|
+
module.exports = __toCommonJS(constants_exports);
|
|
36
|
+
var React = __toESM(require("react"));
|
|
37
|
+
var import_ds_system = require("@elliemae/ds-system");
|
|
38
|
+
const DSCardV2GroupName = "DSCardV2Group";
|
|
39
|
+
const CARD_V2_GROUP_SLOTS = {
|
|
40
|
+
GROUP: "group",
|
|
41
|
+
GROUP_TITLE: "group-title",
|
|
42
|
+
TITLE_WRAPPER: "title-wrapper",
|
|
43
|
+
ITEMS: "items"
|
|
44
|
+
};
|
|
45
|
+
const CARD_V2_GROUP_DATA_TESTID = (0, import_ds_system.slotObjectToDataTestIds)(DSCardV2GroupName, CARD_V2_GROUP_SLOTS);
|
|
46
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/constants/index.ts", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
+
"sourcesContent": ["import { slotObjectToDataTestIds } from '@elliemae/ds-system';\n\nexport const DSCardV2GroupName = 'DSCardV2Group';\n\n// we are giving \"component_name_slots\" to avoid errors on duplicate exports variables in aggregators \nexport const CARD_V2_GROUP_SLOTS = {\n GROUP: 'group',\n GROUP_TITLE: 'group-title',\n TITLE_WRAPPER: 'title-wrapper',\n ITEMS: 'items',\n} as const;\n\n// we are giving \"component_name_data_testid\" to avoid errors on duplicate exports variables in aggregators\nexport const CARD_V2_GROUP_DATA_TESTID = slotObjectToDataTestIds(DSCardV2GroupName, CARD_V2_GROUP_SLOTS);\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,uBAAwC;AAEjC,MAAM,oBAAoB;AAG1B,MAAM,sBAAsB;AAAA,EACjC,OAAO;AAAA,EACP,aAAa;AAAA,EACb,eAAe;AAAA,EACf,OAAO;AACT;AAGO,MAAM,gCAA4B,0CAAwB,mBAAmB,mBAAmB;",
|
|
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 src_exports = {};
|
|
30
|
+
__export(src_exports, {
|
|
31
|
+
CARD_V2_GROUP_DATA_TESTID: () => import_constants.CARD_V2_GROUP_DATA_TESTID,
|
|
32
|
+
DSCardGroupWithSchema: () => import_DSCardV2Group.DSCardV2GroupWithSchema,
|
|
33
|
+
DSCardV2Group: () => import_DSCardV2Group.DSCardV2Group,
|
|
34
|
+
DSCardV2GroupWithSchema: () => import_DSCardV2Group.DSCardV2GroupWithSchema
|
|
35
|
+
});
|
|
36
|
+
module.exports = __toCommonJS(src_exports);
|
|
37
|
+
var React = __toESM(require("react"));
|
|
38
|
+
var import_DSCardV2Group = require("./DSCardV2Group.js");
|
|
39
|
+
var import_react_desc_prop_types = require("./react-desc-prop-types.js");
|
|
40
|
+
var import_constants = require("./constants/index.js");
|
|
41
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/index.ts", "../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
+
"sourcesContent": ["// this is a workaround to typescript error TS2742\n// https://github.com/microsoft/TypeScript/issues/47663\nimport type {} from '@xstyled/system';\nexport {\n DSCardV2Group,\n DSCardV2GroupWithSchema,\n DSCardV2GroupWithSchema as DSCardGroupWithSchema,\n} from './DSCardV2Group.js';\nexport { type DSCardV2GroupT } from './react-desc-prop-types.js';\nexport { CARD_V2_GROUP_DATA_TESTID } from './constants/index.js';\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADGvB,2BAIO;AACP,mCAAoC;AACpC,uBAA0C;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,56 @@
|
|
|
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 react_desc_prop_types_exports = {};
|
|
30
|
+
__export(react_desc_prop_types_exports, {
|
|
31
|
+
DSCardV2GroupPropTypes: () => DSCardV2GroupPropTypes,
|
|
32
|
+
DSCardV2GroupPropTypesSchema: () => DSCardV2GroupPropTypesSchema,
|
|
33
|
+
defaultProps: () => defaultProps
|
|
34
|
+
});
|
|
35
|
+
module.exports = __toCommonJS(react_desc_prop_types_exports);
|
|
36
|
+
var React = __toESM(require("react"));
|
|
37
|
+
var import_ds_utilities = require("@elliemae/ds-utilities");
|
|
38
|
+
const defaultProps = {};
|
|
39
|
+
const DSCardV2GroupPropTypes = {
|
|
40
|
+
...import_ds_utilities.globalAttributesPropTypes,
|
|
41
|
+
...import_ds_utilities.xstyledPropTypes,
|
|
42
|
+
/**
|
|
43
|
+
* Card items
|
|
44
|
+
*/
|
|
45
|
+
children: import_ds_utilities.PropTypes.element.isRequired.description("Card items"),
|
|
46
|
+
/**
|
|
47
|
+
* Title of the group
|
|
48
|
+
*/
|
|
49
|
+
title: import_ds_utilities.PropTypes.string.isRequired.description("Title of the group"),
|
|
50
|
+
/**
|
|
51
|
+
* Right addon action
|
|
52
|
+
*/
|
|
53
|
+
action: import_ds_utilities.PropTypes.element.description("Right addon action")
|
|
54
|
+
};
|
|
55
|
+
const DSCardV2GroupPropTypesSchema = DSCardV2GroupPropTypes;
|
|
56
|
+
//# sourceMappingURL=react-desc-prop-types.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/react-desc-prop-types.ts", "../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
+
"sourcesContent": ["/* eslint-disable @typescript-eslint/no-empty-interface */\nimport type { WeakValidationMap } from 'react';\nimport type { GlobalAttributesT, XstyledProps, DSPropTypesSchema } from '@elliemae/ds-utilities';\nimport { PropTypes, globalAttributesPropTypes, xstyledPropTypes } from '@elliemae/ds-utilities';\n\nexport declare namespace DSCardV2GroupT {\n export interface RequiredProps {\n children: React.ReactElement<[]>;\n title: string;\n }\n\n export interface DefaultProps {}\n\n export interface OptionalProps {\n action: React.ReactElement<[]>;\n }\n\n export interface Props\n extends Partial<DefaultProps>,\n OptionalProps,\n Omit<\n GlobalAttributesT<HTMLButtonElement>,\n keyof DefaultProps | keyof OptionalProps | keyof RequiredProps | keyof XstyledProps\n >,\n XstyledProps,\n RequiredProps {}\n\n export interface InternalProps\n extends DefaultProps,\n OptionalProps,\n Omit<\n GlobalAttributesT<HTMLButtonElement>,\n keyof DefaultProps | keyof OptionalProps | keyof RequiredProps | keyof XstyledProps\n >,\n XstyledProps,\n RequiredProps {}\n}\n\nexport const defaultProps: DSCardV2GroupT.DefaultProps = {};\n\nexport const DSCardV2GroupPropTypes: DSPropTypesSchema<DSCardV2GroupT.Props> = {\n ...globalAttributesPropTypes,\n ...xstyledPropTypes,\n /**\n * Card items\n */\n children: PropTypes.element.isRequired.description('Card items'),\n /**\n * Title of the group\n */\n title: PropTypes.string.isRequired.description('Title of the group'),\n /**\n * Right addon action\n */\n action: PropTypes.element.description('Right addon action'),\n};\n\nexport const DSCardV2GroupPropTypesSchema =\n DSCardV2GroupPropTypes as unknown as WeakValidationMap<DSCardV2GroupT.Props>;\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADGvB,0BAAuE;AAmChE,MAAM,eAA4C,CAAC;AAEnD,MAAM,yBAAkE;AAAA,EAC7E,GAAG;AAAA,EACH,GAAG;AAAA;AAAA;AAAA;AAAA,EAIH,UAAU,8BAAU,QAAQ,WAAW,YAAY,YAAY;AAAA;AAAA;AAAA;AAAA,EAI/D,OAAO,8BAAU,OAAO,WAAW,YAAY,oBAAoB;AAAA;AAAA;AAAA;AAAA,EAInE,QAAQ,8BAAU,QAAQ,YAAY,oBAAoB;AAC5D;AAEO,MAAM,+BACX;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,69 @@
|
|
|
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 styles_exports = {};
|
|
30
|
+
__export(styles_exports, {
|
|
31
|
+
Group: () => Group,
|
|
32
|
+
GroupTitle: () => GroupTitle,
|
|
33
|
+
Items: () => Items,
|
|
34
|
+
TitleWrapper: () => TitleWrapper
|
|
35
|
+
});
|
|
36
|
+
module.exports = __toCommonJS(styles_exports);
|
|
37
|
+
var React = __toESM(require("react"));
|
|
38
|
+
var import_ds_system = require("@elliemae/ds-system");
|
|
39
|
+
var import_ds_card_v2 = require("@elliemae/ds-card-v2");
|
|
40
|
+
var import_constants = require("./constants/index.js");
|
|
41
|
+
const Group = (0, import_ds_system.styled)("div", { name: import_constants.DSCardV2GroupName, slot: import_constants.CARD_V2_GROUP_SLOTS.GROUP })`
|
|
42
|
+
display: flex;
|
|
43
|
+
flex-direction: column;
|
|
44
|
+
width: 100%;
|
|
45
|
+
max-width: 100%;
|
|
46
|
+
${import_ds_card_v2.DSCardV2} {
|
|
47
|
+
border-top: none;
|
|
48
|
+
}
|
|
49
|
+
${({ theme, withTopBorder }) => withTopBorder ? `border-top: ${theme.colors.neutral["100"]}` : ""}
|
|
50
|
+
`;
|
|
51
|
+
const GroupTitle = (0, import_ds_system.styled)("span", { name: import_constants.DSCardV2GroupName, slot: import_constants.CARD_V2_GROUP_SLOTS.GROUP_TITLE })`
|
|
52
|
+
${(0, import_ds_system.truncate)()}
|
|
53
|
+
`;
|
|
54
|
+
const TitleWrapper = (0, import_ds_system.styled)("div", { name: import_constants.DSCardV2GroupName, slot: import_constants.CARD_V2_GROUP_SLOTS.TITLE_WRAPPER })`
|
|
55
|
+
display: flex;
|
|
56
|
+
justify-content: space-between;
|
|
57
|
+
padding: 0 ${(props) => props.theme.space.xs};
|
|
58
|
+
font-size: 12px;
|
|
59
|
+
${(0, import_ds_system.color)("neutral", "700")};
|
|
60
|
+
font-weight: ${(props) => props.theme.fontWeights.semibold};
|
|
61
|
+
background-color: ${(props) => props.theme.colors.neutral["080"]};
|
|
62
|
+
border-top: ${(props) => (0, import_ds_system.border)(props.theme.colors.neutral["080"])};
|
|
63
|
+
line-height: 24px;
|
|
64
|
+
`;
|
|
65
|
+
const Items = (0, import_ds_system.styled)("div", { name: import_constants.DSCardV2GroupName, slot: import_constants.CARD_V2_GROUP_SLOTS.ITEMS })`
|
|
66
|
+
display: flex;
|
|
67
|
+
flex-direction: column;
|
|
68
|
+
`;
|
|
69
|
+
//# sourceMappingURL=styles.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/styles.tsx", "../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
+
"sourcesContent": ["import { color, border, truncate, styled } from '@elliemae/ds-system';\nimport { DSCardV2 } from '@elliemae/ds-card-v2';\nimport { CARD_V2_GROUP_SLOTS, DSCardV2GroupName } from './constants/index.js';\nimport type { DSCardV2GroupT } from './react-desc-prop-types.js';\n\nconst Group = styled('div', { name: DSCardV2GroupName, slot: CARD_V2_GROUP_SLOTS.GROUP })<\n DSCardV2GroupT.Props & { withTopBorder: boolean }\n>`\n display: flex;\n flex-direction: column;\n width: 100%;\n max-width: 100%;\n ${DSCardV2} {\n border-top: none;\n }\n ${({ theme, withTopBorder }) => (withTopBorder ? `border-top: ${theme.colors.neutral['100']}` : '')}\n`;\n\nconst GroupTitle = styled('span', { name: DSCardV2GroupName, slot: CARD_V2_GROUP_SLOTS.GROUP_TITLE })`\n ${truncate()}\n`;\n\nconst TitleWrapper = styled('div', { name: DSCardV2GroupName, slot: CARD_V2_GROUP_SLOTS.TITLE_WRAPPER })`\n display: flex;\n justify-content: space-between;\n padding: 0 ${(props) => props.theme.space.xs};\n font-size: 12px;\n ${color('neutral', '700')};\n font-weight: ${(props) => props.theme.fontWeights.semibold};\n background-color: ${(props) => props.theme.colors.neutral['080']};\n border-top: ${(props) => border(props.theme.colors.neutral['080'])};\n line-height: 24px;\n`;\n\nconst Items = styled('div', { name: DSCardV2GroupName, slot: CARD_V2_GROUP_SLOTS.ITEMS })`\n display: flex;\n flex-direction: column;\n`;\n\nexport { Group, GroupTitle, TitleWrapper, Items };\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,uBAAgD;AAChD,wBAAyB;AACzB,uBAAuD;AAGvD,MAAM,YAAQ,yBAAO,OAAO,EAAE,MAAM,oCAAmB,MAAM,qCAAoB,MAAM,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA,IAOpF;AAAA;AAAA;AAAA,IAGA,CAAC,EAAE,OAAO,cAAc,MAAO,gBAAgB,eAAe,MAAM,OAAO,QAAQ,KAAK,MAAM;AAAA;AAGlG,MAAM,iBAAa,yBAAO,QAAQ,EAAE,MAAM,oCAAmB,MAAM,qCAAoB,YAAY,CAAC;AAAA,QAChG,2BAAS;AAAA;AAGb,MAAM,mBAAe,yBAAO,OAAO,EAAE,MAAM,oCAAmB,MAAM,qCAAoB,cAAc,CAAC;AAAA;AAAA;AAAA,eAGxF,CAAC,UAAU,MAAM,MAAM,MAAM;AAAA;AAAA,QAExC,wBAAM,WAAW,KAAK;AAAA,iBACT,CAAC,UAAU,MAAM,MAAM,YAAY;AAAA,sBAC9B,CAAC,UAAU,MAAM,MAAM,OAAO,QAAQ,KAAK;AAAA,gBACjD,CAAC,cAAU,yBAAO,MAAM,MAAM,OAAO,QAAQ,KAAK,CAAC;AAAA;AAAA;AAInE,MAAM,YAAQ,yBAAO,OAAO,EAAE,MAAM,oCAAmB,MAAM,qCAAoB,MAAM,CAAC;AAAA;AAAA;AAAA;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { describe } from "@elliemae/ds-utilities";
|
|
4
|
+
import { DSCardV2GroupPropTypesSchema } from "./react-desc-prop-types.js";
|
|
5
|
+
import { useCardV2Group } from "./config/useCardV2Group.js";
|
|
6
|
+
import { Group, TitleWrapper, GroupTitle, Items } from "./styles.js";
|
|
7
|
+
import { DSCardV2GroupName } from "./constants/index.js";
|
|
8
|
+
const DSCardV2Group = (props) => {
|
|
9
|
+
const { propsWithDefault, globalProps, xstyledProps } = useCardV2Group(props);
|
|
10
|
+
const { children, title, action } = propsWithDefault;
|
|
11
|
+
return /* @__PURE__ */ jsxs(
|
|
12
|
+
Group,
|
|
13
|
+
{
|
|
14
|
+
withTopBorder: !title,
|
|
15
|
+
getOwnerProps: () => propsWithDefault,
|
|
16
|
+
getOwnerPropsArguments: () => ({}),
|
|
17
|
+
...globalProps,
|
|
18
|
+
...xstyledProps,
|
|
19
|
+
children: [
|
|
20
|
+
!!title && /* @__PURE__ */ jsxs(TitleWrapper, { children: [
|
|
21
|
+
/* @__PURE__ */ jsx(GroupTitle, { children: title }),
|
|
22
|
+
action
|
|
23
|
+
] }),
|
|
24
|
+
/* @__PURE__ */ jsx(Items, { children })
|
|
25
|
+
]
|
|
26
|
+
}
|
|
27
|
+
);
|
|
28
|
+
};
|
|
29
|
+
DSCardV2Group.propTypes = DSCardV2GroupPropTypesSchema;
|
|
30
|
+
DSCardV2Group.displayName = DSCardV2GroupName;
|
|
31
|
+
const DSCardV2GroupWithSchema = describe(DSCardV2Group);
|
|
32
|
+
DSCardV2GroupWithSchema.propTypes = DSCardV2GroupPropTypesSchema;
|
|
33
|
+
export {
|
|
34
|
+
DSCardV2Group,
|
|
35
|
+
DSCardV2GroupWithSchema
|
|
36
|
+
};
|
|
37
|
+
//# sourceMappingURL=DSCardV2Group.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../scripts/build/transpile/react-shim.js", "../../src/DSCardV2Group.tsx"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { describe } from '@elliemae/ds-utilities';\nimport { type DSCardV2GroupT, DSCardV2GroupPropTypesSchema } from './react-desc-prop-types.js';\nimport { useCardV2Group } from './config/useCardV2Group.js';\nimport { Group, TitleWrapper, GroupTitle, Items } from './styles.js';\nimport { DSCardV2GroupName } from './constants/index.js';\n\nconst DSCardV2Group: React.ComponentType<DSCardV2GroupT.Props> = (props) => {\n const { propsWithDefault, globalProps, xstyledProps } = useCardV2Group(props);\n const { children, title, action } = propsWithDefault;\n return (\n <Group\n withTopBorder={!title}\n getOwnerProps={() => propsWithDefault}\n getOwnerPropsArguments={() => ({})}\n {...globalProps}\n {...xstyledProps}\n >\n {!!title && (\n <TitleWrapper>\n <GroupTitle>{title}</GroupTitle>\n {action}\n </TitleWrapper>\n )}\n <Items>{children}</Items>\n </Group>\n );\n};\n\nDSCardV2Group.propTypes = DSCardV2GroupPropTypesSchema;\nDSCardV2Group.displayName = DSCardV2GroupName;\nconst DSCardV2GroupWithSchema = describe(DSCardV2Group);\nDSCardV2GroupWithSchema.propTypes = DSCardV2GroupPropTypesSchema;\n\nexport { DSCardV2Group, DSCardV2GroupWithSchema };\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACmBf,SACE,KADF;AAlBR,SAAS,gBAAgB;AACzB,SAA8B,oCAAoC;AAClE,SAAS,sBAAsB;AAC/B,SAAS,OAAO,cAAc,YAAY,aAAa;AACvD,SAAS,yBAAyB;AAElC,MAAM,gBAA2D,CAAC,UAAU;AAC1E,QAAM,EAAE,kBAAkB,aAAa,aAAa,IAAI,eAAe,KAAK;AAC5E,QAAM,EAAE,UAAU,OAAO,OAAO,IAAI;AACpC,SACE;AAAA,IAAC;AAAA;AAAA,MACC,eAAe,CAAC;AAAA,MAChB,eAAe,MAAM;AAAA,MACrB,wBAAwB,OAAO,CAAC;AAAA,MAC/B,GAAG;AAAA,MACH,GAAG;AAAA,MAEH;AAAA,SAAC,CAAC,SACD,qBAAC,gBACC;AAAA,8BAAC,cAAY,iBAAM;AAAA,UAClB;AAAA,WACH;AAAA,QAEF,oBAAC,SAAO,UAAS;AAAA;AAAA;AAAA,EACnB;AAEJ;AAEA,cAAc,YAAY;AAC1B,cAAc,cAAc;AAC5B,MAAM,0BAA0B,SAAS,aAAa;AACtD,wBAAwB,YAAY;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import React2 from "react";
|
|
3
|
+
import { omit } from "lodash";
|
|
4
|
+
import { useGetGlobalAttributes, useGetXstyledProps, useMemoMergePropsWithDefault } from "@elliemae/ds-utilities";
|
|
5
|
+
import { uid } from "uid";
|
|
6
|
+
import { DSCardV2GroupPropTypes, defaultProps } from "../react-desc-prop-types.js";
|
|
7
|
+
import { useValidateProps } from "./useValidateProps.js";
|
|
8
|
+
const useCardV2Group = (propsFromUser) => {
|
|
9
|
+
const propsWithDefault = useMemoMergePropsWithDefault(propsFromUser, defaultProps);
|
|
10
|
+
useValidateProps(propsWithDefault, DSCardV2GroupPropTypes);
|
|
11
|
+
const globalProps = omit(useGetGlobalAttributes(propsWithDefault), ["cols", "rows", "wrap"]);
|
|
12
|
+
const xstyledProps = useGetXstyledProps(propsWithDefault);
|
|
13
|
+
const { id } = propsWithDefault;
|
|
14
|
+
const instanceUid = React2.useMemo(() => id || uid(5), [id]);
|
|
15
|
+
return React2.useMemo(
|
|
16
|
+
() => ({
|
|
17
|
+
propsWithDefault,
|
|
18
|
+
globalProps,
|
|
19
|
+
xstyledProps,
|
|
20
|
+
instanceUid
|
|
21
|
+
// ...eventHandlers,
|
|
22
|
+
}),
|
|
23
|
+
[
|
|
24
|
+
propsWithDefault,
|
|
25
|
+
globalProps,
|
|
26
|
+
xstyledProps,
|
|
27
|
+
instanceUid
|
|
28
|
+
// eventHandlers,
|
|
29
|
+
]
|
|
30
|
+
);
|
|
31
|
+
};
|
|
32
|
+
export {
|
|
33
|
+
useCardV2Group
|
|
34
|
+
};
|
|
35
|
+
//# sourceMappingURL=useCardV2Group.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/config/useCardV2Group.ts"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { omit } from 'lodash';\nimport { useGetGlobalAttributes, useGetXstyledProps, useMemoMergePropsWithDefault } from '@elliemae/ds-utilities';\nimport { uid } from 'uid';\nimport { type DSCardV2GroupT, DSCardV2GroupPropTypes, defaultProps } from '../react-desc-prop-types.js';\nimport { useValidateProps } from './useValidateProps.js';\n\nexport interface CardV2GroupCTX {\n propsWithDefault: DSCardV2GroupT.InternalProps;\n globalProps: ReturnType<typeof useGetGlobalAttributes>;\n xstyledProps: ReturnType<typeof useGetXstyledProps>;\n instanceUid: string;\n}\n\nexport const useCardV2Group = (propsFromUser: DSCardV2GroupT.Props) => {\n // =============================================================================\n // MERGE WITH DEFAULT AND VALIDATE PROPS\n // =============================================================================\n const propsWithDefault = useMemoMergePropsWithDefault<DSCardV2GroupT.InternalProps>(propsFromUser, defaultProps);\n useValidateProps(propsWithDefault, DSCardV2GroupPropTypes);\n // =============================================================================\n // GLOBAL ATTRIBUTES & XSTYLED PROPS\n // =============================================================================\n const globalProps = omit(useGetGlobalAttributes<DSCardV2GroupT.InternalProps>(propsWithDefault), ['cols', 'rows', 'wrap']);\n const xstyledProps = useGetXstyledProps(propsWithDefault);\n // =============================================================================\n // AD HOC PER COMPONENT LOGIC\n // =============================================================================\n // custom code goes here, this is an example\n const { id } = propsWithDefault;\n const instanceUid = React.useMemo(() => id || uid(5), [id]);\n // =============================================================================\n // HELPERS HOOKS CONFIGS\n // =============================================================================\n // const eventHandlers = useEventHandlers({ propsWithDefault, instanceUid }); // <-- complex logic should be made atomics this way\n\n return React.useMemo(\n () => ({\n propsWithDefault,\n globalProps,\n xstyledProps,\n instanceUid,\n // ...eventHandlers,\n }),\n [\n propsWithDefault,\n globalProps,\n xstyledProps,\n instanceUid,\n // eventHandlers,\n ],\n );\n};\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACAvB,OAAOA,YAAW;AAClB,SAAS,YAAY;AACrB,SAAS,wBAAwB,oBAAoB,oCAAoC;AACzF,SAAS,WAAW;AACpB,SAA8B,wBAAwB,oBAAoB;AAC1E,SAAS,wBAAwB;AAS1B,MAAM,iBAAiB,CAAC,kBAAwC;AAIrE,QAAM,mBAAmB,6BAA2D,eAAe,YAAY;AAC/G,mBAAiB,kBAAkB,sBAAsB;AAIzD,QAAM,cAAc,KAAK,uBAAqD,gBAAgB,GAAG,CAAC,QAAQ,QAAQ,MAAM,CAAC;AACzH,QAAM,eAAe,mBAAmB,gBAAgB;AAKxD,QAAM,EAAE,GAAG,IAAI;AACf,QAAM,cAAcA,OAAM,QAAQ,MAAM,MAAM,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC;AAM1D,SAAOA,OAAM;AAAA,IACX,OAAO;AAAA,MACL;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA;AAAA,IAEF;AAAA,IACA;AAAA,MACE;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA;AAAA,IAEF;AAAA,EACF;AACF;",
|
|
6
|
+
"names": ["React"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { useValidateTypescriptPropTypes } from "@elliemae/ds-utilities";
|
|
3
|
+
import { DSCardV2GroupName } from "../constants/index.js";
|
|
4
|
+
const useValidateProps = (props, propTypes) => {
|
|
5
|
+
useValidateTypescriptPropTypes(props, propTypes, DSCardV2GroupName);
|
|
6
|
+
};
|
|
7
|
+
export {
|
|
8
|
+
useValidateProps
|
|
9
|
+
};
|
|
10
|
+
//# sourceMappingURL=useValidateProps.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/config/useValidateProps.ts"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { useValidateTypescriptPropTypes } from '@elliemae/ds-utilities';\nimport type { WeakValidationMap } from 'react';\nimport { type DSCardV2GroupT } from '../react-desc-prop-types.js';\nimport { DSCardV2GroupName } from '../constants/index.js';\n\nexport const useValidateProps = (props: DSCardV2GroupT.InternalProps, propTypes: WeakValidationMap<unknown>): void => {\n // we validate the \"required if\" via 'isRequiredIf from our custom PropTypes\n useValidateTypescriptPropTypes(props, propTypes, DSCardV2GroupName);\n};\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,sCAAsC;AAG/C,SAAS,yBAAyB;AAE3B,MAAM,mBAAmB,CAAC,OAAqC,cAAgD;AAEpH,iCAA+B,OAAO,WAAW,iBAAiB;AACpE;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { slotObjectToDataTestIds } from "@elliemae/ds-system";
|
|
3
|
+
const DSCardV2GroupName = "DSCardV2Group";
|
|
4
|
+
const CARD_V2_GROUP_SLOTS = {
|
|
5
|
+
GROUP: "group",
|
|
6
|
+
GROUP_TITLE: "group-title",
|
|
7
|
+
TITLE_WRAPPER: "title-wrapper",
|
|
8
|
+
ITEMS: "items"
|
|
9
|
+
};
|
|
10
|
+
const CARD_V2_GROUP_DATA_TESTID = slotObjectToDataTestIds(DSCardV2GroupName, CARD_V2_GROUP_SLOTS);
|
|
11
|
+
export {
|
|
12
|
+
CARD_V2_GROUP_DATA_TESTID,
|
|
13
|
+
CARD_V2_GROUP_SLOTS,
|
|
14
|
+
DSCardV2GroupName
|
|
15
|
+
};
|
|
16
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/constants/index.ts"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { slotObjectToDataTestIds } from '@elliemae/ds-system';\n\nexport const DSCardV2GroupName = 'DSCardV2Group';\n\n// we are giving \"component_name_slots\" to avoid errors on duplicate exports variables in aggregators \nexport const CARD_V2_GROUP_SLOTS = {\n GROUP: 'group',\n GROUP_TITLE: 'group-title',\n TITLE_WRAPPER: 'title-wrapper',\n ITEMS: 'items',\n} as const;\n\n// we are giving \"component_name_data_testid\" to avoid errors on duplicate exports variables in aggregators\nexport const CARD_V2_GROUP_DATA_TESTID = slotObjectToDataTestIds(DSCardV2GroupName, CARD_V2_GROUP_SLOTS);\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,+BAA+B;AAEjC,MAAM,oBAAoB;AAG1B,MAAM,sBAAsB;AAAA,EACjC,OAAO;AAAA,EACP,aAAa;AAAA,EACb,eAAe;AAAA,EACf,OAAO;AACT;AAGO,MAAM,4BAA4B,wBAAwB,mBAAmB,mBAAmB;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import {
|
|
3
|
+
DSCardV2Group,
|
|
4
|
+
DSCardV2GroupWithSchema,
|
|
5
|
+
DSCardV2GroupWithSchema as DSCardV2GroupWithSchema2
|
|
6
|
+
} from "./DSCardV2Group.js";
|
|
7
|
+
import {} from "./react-desc-prop-types.js";
|
|
8
|
+
import { CARD_V2_GROUP_DATA_TESTID } from "./constants/index.js";
|
|
9
|
+
export {
|
|
10
|
+
CARD_V2_GROUP_DATA_TESTID,
|
|
11
|
+
DSCardV2GroupWithSchema2 as DSCardGroupWithSchema,
|
|
12
|
+
DSCardV2Group,
|
|
13
|
+
DSCardV2GroupWithSchema
|
|
14
|
+
};
|
|
15
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../scripts/build/transpile/react-shim.js", "../../src/index.ts"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "// this is a workaround to typescript error TS2742\n// https://github.com/microsoft/TypeScript/issues/47663\nimport type {} from '@xstyled/system';\nexport {\n DSCardV2Group,\n DSCardV2GroupWithSchema,\n DSCardV2GroupWithSchema as DSCardGroupWithSchema,\n} from './DSCardV2Group.js';\nexport { type DSCardV2GroupT } from './react-desc-prop-types.js';\nexport { CARD_V2_GROUP_DATA_TESTID } from './constants/index.js';\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACGvB;AAAA,EACE;AAAA,EACA;AAAA,EAC2B,2BAA3BA;AAAA,OACK;AACP,eAAoC;AACpC,SAAS,iCAAiC;",
|
|
6
|
+
"names": ["DSCardV2GroupWithSchema"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { PropTypes, globalAttributesPropTypes, xstyledPropTypes } from "@elliemae/ds-utilities";
|
|
3
|
+
const defaultProps = {};
|
|
4
|
+
const DSCardV2GroupPropTypes = {
|
|
5
|
+
...globalAttributesPropTypes,
|
|
6
|
+
...xstyledPropTypes,
|
|
7
|
+
/**
|
|
8
|
+
* Card items
|
|
9
|
+
*/
|
|
10
|
+
children: PropTypes.element.isRequired.description("Card items"),
|
|
11
|
+
/**
|
|
12
|
+
* Title of the group
|
|
13
|
+
*/
|
|
14
|
+
title: PropTypes.string.isRequired.description("Title of the group"),
|
|
15
|
+
/**
|
|
16
|
+
* Right addon action
|
|
17
|
+
*/
|
|
18
|
+
action: PropTypes.element.description("Right addon action")
|
|
19
|
+
};
|
|
20
|
+
const DSCardV2GroupPropTypesSchema = DSCardV2GroupPropTypes;
|
|
21
|
+
export {
|
|
22
|
+
DSCardV2GroupPropTypes,
|
|
23
|
+
DSCardV2GroupPropTypesSchema,
|
|
24
|
+
defaultProps
|
|
25
|
+
};
|
|
26
|
+
//# sourceMappingURL=react-desc-prop-types.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../scripts/build/transpile/react-shim.js", "../../src/react-desc-prop-types.ts"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable @typescript-eslint/no-empty-interface */\nimport type { WeakValidationMap } from 'react';\nimport type { GlobalAttributesT, XstyledProps, DSPropTypesSchema } from '@elliemae/ds-utilities';\nimport { PropTypes, globalAttributesPropTypes, xstyledPropTypes } from '@elliemae/ds-utilities';\n\nexport declare namespace DSCardV2GroupT {\n export interface RequiredProps {\n children: React.ReactElement<[]>;\n title: string;\n }\n\n export interface DefaultProps {}\n\n export interface OptionalProps {\n action: React.ReactElement<[]>;\n }\n\n export interface Props\n extends Partial<DefaultProps>,\n OptionalProps,\n Omit<\n GlobalAttributesT<HTMLButtonElement>,\n keyof DefaultProps | keyof OptionalProps | keyof RequiredProps | keyof XstyledProps\n >,\n XstyledProps,\n RequiredProps {}\n\n export interface InternalProps\n extends DefaultProps,\n OptionalProps,\n Omit<\n GlobalAttributesT<HTMLButtonElement>,\n keyof DefaultProps | keyof OptionalProps | keyof RequiredProps | keyof XstyledProps\n >,\n XstyledProps,\n RequiredProps {}\n}\n\nexport const defaultProps: DSCardV2GroupT.DefaultProps = {};\n\nexport const DSCardV2GroupPropTypes: DSPropTypesSchema<DSCardV2GroupT.Props> = {\n ...globalAttributesPropTypes,\n ...xstyledPropTypes,\n /**\n * Card items\n */\n children: PropTypes.element.isRequired.description('Card items'),\n /**\n * Title of the group\n */\n title: PropTypes.string.isRequired.description('Title of the group'),\n /**\n * Right addon action\n */\n action: PropTypes.element.description('Right addon action'),\n};\n\nexport const DSCardV2GroupPropTypesSchema =\n DSCardV2GroupPropTypes as unknown as WeakValidationMap<DSCardV2GroupT.Props>;\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACGvB,SAAS,WAAW,2BAA2B,wBAAwB;AAmChE,MAAM,eAA4C,CAAC;AAEnD,MAAM,yBAAkE;AAAA,EAC7E,GAAG;AAAA,EACH,GAAG;AAAA;AAAA;AAAA;AAAA,EAIH,UAAU,UAAU,QAAQ,WAAW,YAAY,YAAY;AAAA;AAAA;AAAA;AAAA,EAI/D,OAAO,UAAU,OAAO,WAAW,YAAY,oBAAoB;AAAA;AAAA;AAAA;AAAA,EAInE,QAAQ,UAAU,QAAQ,YAAY,oBAAoB;AAC5D;AAEO,MAAM,+BACX;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { color, border, truncate, styled } from "@elliemae/ds-system";
|
|
3
|
+
import { DSCardV2 } from "@elliemae/ds-card-v2";
|
|
4
|
+
import { CARD_V2_GROUP_SLOTS, DSCardV2GroupName } from "./constants/index.js";
|
|
5
|
+
const Group = styled("div", { name: DSCardV2GroupName, slot: CARD_V2_GROUP_SLOTS.GROUP })`
|
|
6
|
+
display: flex;
|
|
7
|
+
flex-direction: column;
|
|
8
|
+
width: 100%;
|
|
9
|
+
max-width: 100%;
|
|
10
|
+
${DSCardV2} {
|
|
11
|
+
border-top: none;
|
|
12
|
+
}
|
|
13
|
+
${({ theme, withTopBorder }) => withTopBorder ? `border-top: ${theme.colors.neutral["100"]}` : ""}
|
|
14
|
+
`;
|
|
15
|
+
const GroupTitle = styled("span", { name: DSCardV2GroupName, slot: CARD_V2_GROUP_SLOTS.GROUP_TITLE })`
|
|
16
|
+
${truncate()}
|
|
17
|
+
`;
|
|
18
|
+
const TitleWrapper = styled("div", { name: DSCardV2GroupName, slot: CARD_V2_GROUP_SLOTS.TITLE_WRAPPER })`
|
|
19
|
+
display: flex;
|
|
20
|
+
justify-content: space-between;
|
|
21
|
+
padding: 0 ${(props) => props.theme.space.xs};
|
|
22
|
+
font-size: 12px;
|
|
23
|
+
${color("neutral", "700")};
|
|
24
|
+
font-weight: ${(props) => props.theme.fontWeights.semibold};
|
|
25
|
+
background-color: ${(props) => props.theme.colors.neutral["080"]};
|
|
26
|
+
border-top: ${(props) => border(props.theme.colors.neutral["080"])};
|
|
27
|
+
line-height: 24px;
|
|
28
|
+
`;
|
|
29
|
+
const Items = styled("div", { name: DSCardV2GroupName, slot: CARD_V2_GROUP_SLOTS.ITEMS })`
|
|
30
|
+
display: flex;
|
|
31
|
+
flex-direction: column;
|
|
32
|
+
`;
|
|
33
|
+
export {
|
|
34
|
+
Group,
|
|
35
|
+
GroupTitle,
|
|
36
|
+
Items,
|
|
37
|
+
TitleWrapper
|
|
38
|
+
};
|
|
39
|
+
//# sourceMappingURL=styles.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../scripts/build/transpile/react-shim.js", "../../src/styles.tsx"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { color, border, truncate, styled } from '@elliemae/ds-system';\nimport { DSCardV2 } from '@elliemae/ds-card-v2';\nimport { CARD_V2_GROUP_SLOTS, DSCardV2GroupName } from './constants/index.js';\nimport type { DSCardV2GroupT } from './react-desc-prop-types.js';\n\nconst Group = styled('div', { name: DSCardV2GroupName, slot: CARD_V2_GROUP_SLOTS.GROUP })<\n DSCardV2GroupT.Props & { withTopBorder: boolean }\n>`\n display: flex;\n flex-direction: column;\n width: 100%;\n max-width: 100%;\n ${DSCardV2} {\n border-top: none;\n }\n ${({ theme, withTopBorder }) => (withTopBorder ? `border-top: ${theme.colors.neutral['100']}` : '')}\n`;\n\nconst GroupTitle = styled('span', { name: DSCardV2GroupName, slot: CARD_V2_GROUP_SLOTS.GROUP_TITLE })`\n ${truncate()}\n`;\n\nconst TitleWrapper = styled('div', { name: DSCardV2GroupName, slot: CARD_V2_GROUP_SLOTS.TITLE_WRAPPER })`\n display: flex;\n justify-content: space-between;\n padding: 0 ${(props) => props.theme.space.xs};\n font-size: 12px;\n ${color('neutral', '700')};\n font-weight: ${(props) => props.theme.fontWeights.semibold};\n background-color: ${(props) => props.theme.colors.neutral['080']};\n border-top: ${(props) => border(props.theme.colors.neutral['080'])};\n line-height: 24px;\n`;\n\nconst Items = styled('div', { name: DSCardV2GroupName, slot: CARD_V2_GROUP_SLOTS.ITEMS })`\n display: flex;\n flex-direction: column;\n`;\n\nexport { Group, GroupTitle, TitleWrapper, Items };\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,OAAO,QAAQ,UAAU,cAAc;AAChD,SAAS,gBAAgB;AACzB,SAAS,qBAAqB,yBAAyB;AAGvD,MAAM,QAAQ,OAAO,OAAO,EAAE,MAAM,mBAAmB,MAAM,oBAAoB,MAAM,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA,IAOpF;AAAA;AAAA;AAAA,IAGA,CAAC,EAAE,OAAO,cAAc,MAAO,gBAAgB,eAAe,MAAM,OAAO,QAAQ,KAAK,MAAM;AAAA;AAGlG,MAAM,aAAa,OAAO,QAAQ,EAAE,MAAM,mBAAmB,MAAM,oBAAoB,YAAY,CAAC;AAAA,IAChG,SAAS;AAAA;AAGb,MAAM,eAAe,OAAO,OAAO,EAAE,MAAM,mBAAmB,MAAM,oBAAoB,cAAc,CAAC;AAAA;AAAA;AAAA,eAGxF,CAAC,UAAU,MAAM,MAAM,MAAM;AAAA;AAAA,IAExC,MAAM,WAAW,KAAK;AAAA,iBACT,CAAC,UAAU,MAAM,MAAM,YAAY;AAAA,sBAC9B,CAAC,UAAU,MAAM,MAAM,OAAO,QAAQ,KAAK;AAAA,gBACjD,CAAC,UAAU,OAAO,MAAM,MAAM,OAAO,QAAQ,KAAK,CAAC;AAAA;AAAA;AAInE,MAAM,QAAQ,OAAO,OAAO,EAAE,MAAM,mBAAmB,MAAM,oBAAoB,MAAM,CAAC;AAAA;AAAA;AAAA;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/// <reference types="lodash" />
|
|
2
|
+
import { useGetGlobalAttributes, useGetXstyledProps } from '@elliemae/ds-utilities';
|
|
3
|
+
import { type DSCardV2GroupT } from '../react-desc-prop-types.js';
|
|
4
|
+
export interface CardV2GroupCTX {
|
|
5
|
+
propsWithDefault: DSCardV2GroupT.InternalProps;
|
|
6
|
+
globalProps: ReturnType<typeof useGetGlobalAttributes>;
|
|
7
|
+
xstyledProps: ReturnType<typeof useGetXstyledProps>;
|
|
8
|
+
instanceUid: string;
|
|
9
|
+
}
|
|
10
|
+
export declare const useCardV2Group: (propsFromUser: DSCardV2GroupT.Props) => {
|
|
11
|
+
propsWithDefault: DSCardV2GroupT.InternalProps;
|
|
12
|
+
globalProps: import("lodash").Omit<import("@elliemae/ds-utilities").GlobalAttributesT<Element>, "cols" | "rows" | "wrap">;
|
|
13
|
+
xstyledProps: import("@elliemae/ds-utilities").XstyledProps;
|
|
14
|
+
instanceUid: string;
|
|
15
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export declare const DSCardV2GroupName = "DSCardV2Group";
|
|
2
|
+
export declare const CARD_V2_GROUP_SLOTS: {
|
|
3
|
+
readonly GROUP: "group";
|
|
4
|
+
readonly GROUP_TITLE: "group-title";
|
|
5
|
+
readonly TITLE_WRAPPER: "title-wrapper";
|
|
6
|
+
readonly ITEMS: "items";
|
|
7
|
+
};
|
|
8
|
+
export declare const CARD_V2_GROUP_DATA_TESTID: Record<string, string>;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { WeakValidationMap } from 'react';
|
|
2
|
+
import type { GlobalAttributesT, XstyledProps, DSPropTypesSchema } from '@elliemae/ds-utilities';
|
|
3
|
+
export declare namespace DSCardV2GroupT {
|
|
4
|
+
interface RequiredProps {
|
|
5
|
+
children: React.ReactElement<[]>;
|
|
6
|
+
title: string;
|
|
7
|
+
}
|
|
8
|
+
interface DefaultProps {
|
|
9
|
+
}
|
|
10
|
+
interface OptionalProps {
|
|
11
|
+
action: React.ReactElement<[]>;
|
|
12
|
+
}
|
|
13
|
+
interface Props extends Partial<DefaultProps>, OptionalProps, Omit<GlobalAttributesT<HTMLButtonElement>, keyof DefaultProps | keyof OptionalProps | keyof RequiredProps | keyof XstyledProps>, XstyledProps, RequiredProps {
|
|
14
|
+
}
|
|
15
|
+
interface InternalProps extends DefaultProps, OptionalProps, Omit<GlobalAttributesT<HTMLButtonElement>, keyof DefaultProps | keyof OptionalProps | keyof RequiredProps | keyof XstyledProps>, XstyledProps, RequiredProps {
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
export declare const defaultProps: DSCardV2GroupT.DefaultProps;
|
|
19
|
+
export declare const DSCardV2GroupPropTypes: DSPropTypesSchema<DSCardV2GroupT.Props>;
|
|
20
|
+
export declare const DSCardV2GroupPropTypesSchema: WeakValidationMap<DSCardV2GroupT.Props>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { DSCardV2GroupT } from './react-desc-prop-types.js';
|
|
2
|
+
declare const Group: import("styled-components").StyledComponent<"div", import("@elliemae/ds-system").Theme, DSCardV2GroupT.Props & {
|
|
3
|
+
withTopBorder: boolean;
|
|
4
|
+
} & import("@elliemae/ds-system").OwnerInterface, never>;
|
|
5
|
+
declare const GroupTitle: import("styled-components").StyledComponent<"span", import("@elliemae/ds-system").Theme, {
|
|
6
|
+
width?: string | undefined;
|
|
7
|
+
} & {
|
|
8
|
+
theme: import("@elliemae/pui-theme").Theme;
|
|
9
|
+
} & import("@elliemae/ds-system").OwnerInterface, never>;
|
|
10
|
+
declare const TitleWrapper: import("styled-components").StyledComponent<"div", import("@elliemae/ds-system").Theme, object & import("@elliemae/ds-system").OwnerInterface, never>;
|
|
11
|
+
declare const Items: import("styled-components").StyledComponent<"div", import("@elliemae/ds-system").Theme, object & import("@elliemae/ds-system").OwnerInterface, never>;
|
|
12
|
+
export { Group, GroupTitle, TitleWrapper, Items };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/package.json
ADDED
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@elliemae/ds-card-v2-group",
|
|
3
|
+
"version": "3.21.0-next.1",
|
|
4
|
+
"license": "MIT",
|
|
5
|
+
"description": "ICE MT - Dimsum - Card V2 Group",
|
|
6
|
+
"files": [
|
|
7
|
+
"dist"
|
|
8
|
+
],
|
|
9
|
+
"module": "./dist/esm/index.js",
|
|
10
|
+
"main": "./dist/cjs/index.js",
|
|
11
|
+
"types": "./dist/types/index.d.ts",
|
|
12
|
+
"exports": {
|
|
13
|
+
".": {
|
|
14
|
+
"import": "./dist/esm/index.js",
|
|
15
|
+
"require": "./dist/cjs/index.js"
|
|
16
|
+
},
|
|
17
|
+
"./styles": {
|
|
18
|
+
"import": "./dist/esm/styles.js",
|
|
19
|
+
"require": "./dist/cjs/styles.js"
|
|
20
|
+
},
|
|
21
|
+
"./propTypes": {
|
|
22
|
+
"import": "./dist/esm/propTypes.js",
|
|
23
|
+
"require": "./dist/cjs/propTypes.js"
|
|
24
|
+
},
|
|
25
|
+
"./DSCardV2Group": {
|
|
26
|
+
"import": "./dist/esm/DSCardV2Group.js",
|
|
27
|
+
"require": "./dist/cjs/DSCardV2Group.js"
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
"sideEffects": [
|
|
31
|
+
"*.css",
|
|
32
|
+
"*.scss"
|
|
33
|
+
],
|
|
34
|
+
"repository": {
|
|
35
|
+
"type": "git",
|
|
36
|
+
"url": "https://git.elliemae.io/platform-ui/dimsum.git"
|
|
37
|
+
},
|
|
38
|
+
"engines": {
|
|
39
|
+
"pnpm": ">=6",
|
|
40
|
+
"node": ">=16"
|
|
41
|
+
},
|
|
42
|
+
"author": "ICE MT",
|
|
43
|
+
"jestSonar": {
|
|
44
|
+
"sonar56x": true,
|
|
45
|
+
"reportPath": "reports",
|
|
46
|
+
"reportFile": "tests.xml",
|
|
47
|
+
"indent": 4
|
|
48
|
+
},
|
|
49
|
+
"dependencies": {
|
|
50
|
+
"@elliemae/ds-button": "3.21.0-next.1",
|
|
51
|
+
"@elliemae/ds-card-v2": "3.21.0-next.1",
|
|
52
|
+
"@elliemae/ds-grid": "3.21.0-next.1",
|
|
53
|
+
"@elliemae/ds-system": "3.21.0-next.1",
|
|
54
|
+
"@elliemae/ds-utilities": "3.21.0-next.1"
|
|
55
|
+
},
|
|
56
|
+
"devDependencies": {
|
|
57
|
+
"styled-components": "~5.3.9"
|
|
58
|
+
},
|
|
59
|
+
"peerDependencies": {
|
|
60
|
+
"@testing-library/jest-dom": "~5.16.4",
|
|
61
|
+
"@testing-library/react": "~12.1.3",
|
|
62
|
+
"@testing-library/user-event": "~13.5.0",
|
|
63
|
+
"react": "^17.0.2",
|
|
64
|
+
"react-dom": "^17.0.2",
|
|
65
|
+
"styled-components": "~5.3.9"
|
|
66
|
+
},
|
|
67
|
+
"publishConfig": {
|
|
68
|
+
"access": "public",
|
|
69
|
+
"typeSafety": false
|
|
70
|
+
},
|
|
71
|
+
"scripts": {
|
|
72
|
+
"dev": "cross-env NODE_ENV=development node ../../scripts/build/build.mjs --watch",
|
|
73
|
+
"test": "node ../../scripts/testing/test.mjs",
|
|
74
|
+
"lint": "node ../../scripts/lint.mjs --fix",
|
|
75
|
+
"eslint:fix": "eslint --ext='.js,.jsx,.test.js,.ts,.tsx' --fix --config='../../.eslintrc.js' src/",
|
|
76
|
+
"dts": "node ../../scripts/dts.mjs",
|
|
77
|
+
"dts:withdeps": "pnpm --filter {.}... dts",
|
|
78
|
+
"build": "cross-env NODE_ENV=production node ../../scripts/build/build.mjs",
|
|
79
|
+
"dev:build": "pnpm --filter {.}... build",
|
|
80
|
+
"dev:install": "pnpm --filter {.}... i --no-lockfile && pnpm run dev:build",
|
|
81
|
+
"checkDeps": "npx -yes ../ds-codemods check-missing-packages --projectFolderPath=\"./\" --ignorePackagesGlobPattern=\"\" --ignoreFilesGlobPattern=\"**/test-ables/*,**/tests/*\""
|
|
82
|
+
}
|
|
83
|
+
}
|