@elliemae/ds-card-navigation 3.0.0-next.2 → 3.0.0-next.6
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/DSCardNavigation.js +120 -0
- package/dist/cjs/DSCardNavigation.js.map +7 -0
- package/dist/cjs/components/types.js +42 -0
- package/dist/cjs/components/types.js.map +7 -0
- package/dist/cjs/index.js +36 -0
- package/dist/cjs/index.js.map +7 -0
- package/dist/cjs/style.js +134 -0
- package/dist/cjs/style.js.map +7 -0
- package/dist/esm/DSCardNavigation.js +103 -0
- package/dist/esm/DSCardNavigation.js.map +7 -0
- package/dist/esm/components/types.js +13 -0
- package/dist/esm/components/types.js.map +7 -0
- package/dist/esm/index.js +7 -0
- package/dist/esm/index.js.map +7 -0
- package/dist/esm/style.js +105 -0
- package/dist/esm/style.js.map +7 -0
- package/package.json +36 -27
- package/cjs/DSCardNavigation.js +0 -114
- package/cjs/components/types.js +0 -14
- package/cjs/index.js +0 -13
- package/cjs/style.js +0 -53
- package/esm/DSCardNavigation.js +0 -101
- package/esm/components/types.js +0 -9
- package/esm/index.js +0 -2
- package/esm/style.js +0 -37
- package/types/DSCardNavigation.d.ts +0 -77
- package/types/components/types.d.ts +0 -7
- package/types/index.d.ts +0 -2
- package/types/style.d.ts +0 -9
- package/types/tests/DSCardNavigation.test.d.ts +0 -1
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __defProps = Object.defineProperties;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
6
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
7
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
8
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
9
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
10
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
11
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
12
|
+
var __spreadValues = (a, b) => {
|
|
13
|
+
for (var prop in b || (b = {}))
|
|
14
|
+
if (__hasOwnProp.call(b, prop))
|
|
15
|
+
__defNormalProp(a, prop, b[prop]);
|
|
16
|
+
if (__getOwnPropSymbols)
|
|
17
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
18
|
+
if (__propIsEnum.call(b, prop))
|
|
19
|
+
__defNormalProp(a, prop, b[prop]);
|
|
20
|
+
}
|
|
21
|
+
return a;
|
|
22
|
+
};
|
|
23
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
24
|
+
var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
|
|
25
|
+
var __objRest = (source, exclude) => {
|
|
26
|
+
var target = {};
|
|
27
|
+
for (var prop in source)
|
|
28
|
+
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
29
|
+
target[prop] = source[prop];
|
|
30
|
+
if (source != null && __getOwnPropSymbols)
|
|
31
|
+
for (var prop of __getOwnPropSymbols(source)) {
|
|
32
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
|
|
33
|
+
target[prop] = source[prop];
|
|
34
|
+
}
|
|
35
|
+
return target;
|
|
36
|
+
};
|
|
37
|
+
var __export = (target, all) => {
|
|
38
|
+
for (var name in all)
|
|
39
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
40
|
+
};
|
|
41
|
+
var __reExport = (target, module2, copyDefault, desc) => {
|
|
42
|
+
if (module2 && typeof module2 === "object" || typeof module2 === "function") {
|
|
43
|
+
for (let key of __getOwnPropNames(module2))
|
|
44
|
+
if (!__hasOwnProp.call(target, key) && (copyDefault || key !== "default"))
|
|
45
|
+
__defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable });
|
|
46
|
+
}
|
|
47
|
+
return target;
|
|
48
|
+
};
|
|
49
|
+
var __toESM = (module2, isNodeMode) => {
|
|
50
|
+
return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", !isNodeMode && module2 && module2.__esModule ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2);
|
|
51
|
+
};
|
|
52
|
+
var __toCommonJS = /* @__PURE__ */ ((cache) => {
|
|
53
|
+
return (module2, temp) => {
|
|
54
|
+
return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
|
|
55
|
+
};
|
|
56
|
+
})(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
|
|
57
|
+
var DSCardNavigation_exports = {};
|
|
58
|
+
__export(DSCardNavigation_exports, {
|
|
59
|
+
CardNavigationTypes: () => import_types.CardNavigationTypes,
|
|
60
|
+
CardNavigationTypesValues: () => import_types.CardNavigationTypesValues,
|
|
61
|
+
DSCardNavigationWithSchema: () => DSCardNavigationWithSchema,
|
|
62
|
+
default: () => DSCardNavigation_default
|
|
63
|
+
});
|
|
64
|
+
var React = __toESM(require("react"));
|
|
65
|
+
var import_react = __toESM(require("react"));
|
|
66
|
+
var import_react_desc = require("react-desc");
|
|
67
|
+
var import_ds_truncated_tooltip_text = require("@elliemae/ds-truncated-tooltip-text");
|
|
68
|
+
var import_ds_icons = require("@elliemae/ds-icons");
|
|
69
|
+
var import_ds_button = __toESM(require("@elliemae/ds-button"));
|
|
70
|
+
var import_style = require("./style");
|
|
71
|
+
var import_types = require("./components/types");
|
|
72
|
+
const DSCardNavigation = (_a) => {
|
|
73
|
+
var _b = _a, { containerProps = {}, title = "", description = "", type, Icon, actions = [] } = _b, rest = __objRest(_b, ["containerProps", "title", "description", "type", "Icon", "actions"]);
|
|
74
|
+
return /* @__PURE__ */ import_react.default.createElement(import_ds_truncated_tooltip_text.TooltipTextProvider, null, /* @__PURE__ */ import_react.default.createElement(import_style.StyledCardNavigationBoxWrapper, __spreadValues(__spreadValues({
|
|
75
|
+
role: "button",
|
|
76
|
+
tabIndex: 0
|
|
77
|
+
}, rest), containerProps), /* @__PURE__ */ import_react.default.createElement(import_style.StyledCardNavigationIcon, {
|
|
78
|
+
type
|
|
79
|
+
}, /* @__PURE__ */ import_react.default.createElement(Icon, {
|
|
80
|
+
size: "l"
|
|
81
|
+
})), /* @__PURE__ */ import_react.default.createElement(import_style.StyledCardNavigationCentralContent, null, /* @__PURE__ */ import_react.default.createElement(import_style.StyledCardNavigationContent, null, /* @__PURE__ */ import_react.default.createElement(import_style.StyledCardNavigationContentTitleWrapper, null, /* @__PURE__ */ import_react.default.createElement(import_style.StyledCardNavigationContentTitle, null, /* @__PURE__ */ import_react.default.createElement(import_ds_truncated_tooltip_text.DSTruncatedTooltipText, {
|
|
82
|
+
value: title
|
|
83
|
+
})), /* @__PURE__ */ import_react.default.createElement(import_style.StyledCardNavigationContentDescription, null, /* @__PURE__ */ import_react.default.createElement(import_ds_truncated_tooltip_text.DSTruncatedTooltipText, {
|
|
84
|
+
value: description,
|
|
85
|
+
"data-testid": "ds-card-navigation--description"
|
|
86
|
+
})))), actions.length > 0 && /* @__PURE__ */ import_react.default.createElement(import_style.StyledCardNavigationActions, null, actions.map((_a2, key) => {
|
|
87
|
+
var _b2 = _a2, { icon = /* @__PURE__ */ import_react.default.createElement(import_ds_icons.MoreOptionsVert, {
|
|
88
|
+
"aria-label": "More options"
|
|
89
|
+
}) } = _b2, otherProps = __objRest(_b2, ["icon"]);
|
|
90
|
+
return /* @__PURE__ */ import_react.default.createElement(import_style.StyledCardNavigationAction, {
|
|
91
|
+
key
|
|
92
|
+
}, /* @__PURE__ */ import_react.default.createElement(import_ds_button.default, __spreadProps(__spreadValues({
|
|
93
|
+
icon
|
|
94
|
+
}, otherProps), {
|
|
95
|
+
buttonType: import_ds_button.BUTTON_TYPE.TEXT,
|
|
96
|
+
size: import_ds_button.BUTTON_SIZE.L
|
|
97
|
+
})));
|
|
98
|
+
})))));
|
|
99
|
+
};
|
|
100
|
+
DSCardNavigation.defaultProps = {
|
|
101
|
+
type: import_types.CardNavigationTypes.BORROWER,
|
|
102
|
+
Icon: import_ds_icons.LoanProducts
|
|
103
|
+
};
|
|
104
|
+
const props = {
|
|
105
|
+
containerProps: import_react_desc.PropTypes.object.description("props to inject to card navigation wrapper"),
|
|
106
|
+
title: import_react_desc.PropTypes.string.description("card navigation title"),
|
|
107
|
+
Icon: import_react_desc.PropTypes.node.description("card navigation main icon"),
|
|
108
|
+
description: import_react_desc.PropTypes.string.description("card navigation description"),
|
|
109
|
+
type: import_react_desc.PropTypes.oneOf(import_types.CardNavigationTypesValues).description("card navigation type"),
|
|
110
|
+
actions: import_react_desc.PropTypes.arrayOf(import_react_desc.PropTypes.shape({
|
|
111
|
+
icon: import_react_desc.PropTypes.element,
|
|
112
|
+
onClick: import_react_desc.PropTypes.func
|
|
113
|
+
})).description("card navigation actions array")
|
|
114
|
+
};
|
|
115
|
+
DSCardNavigation.propTypes = props;
|
|
116
|
+
const DSCardNavigationWithSchema = (0, import_react_desc.describe)(DSCardNavigation);
|
|
117
|
+
DSCardNavigationWithSchema.propTypes = props;
|
|
118
|
+
var DSCardNavigation_default = DSCardNavigation;
|
|
119
|
+
module.exports = __toCommonJS(DSCardNavigation_exports);
|
|
120
|
+
//# sourceMappingURL=DSCardNavigation.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/DSCardNavigation.tsx", "../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
+
"sourcesContent": ["import React from 'react';\nimport { PropTypes, describe } from 'react-desc';\nimport { DSTruncatedTooltipText, TooltipTextProvider } from '@elliemae/ds-truncated-tooltip-text';\nimport { MoreOptionsVert, LoanProducts } from '@elliemae/ds-icons';\nimport DSButton, { BUTTON_SIZE, BUTTON_TYPE } from '@elliemae/ds-button';\nimport {\n StyledCardNavigationContentTitle,\n StyledCardNavigationContentDescription,\n StyledCardNavigationContentTitleWrapper,\n StyledCardNavigationContent,\n StyledCardNavigationCentralContent,\n StyledCardNavigationBoxWrapper,\n StyledCardNavigationIcon,\n StyledCardNavigationAction,\n StyledCardNavigationActions,\n} from './style';\nimport { CardNavigationTypes, CardNavigationTypesValues } from './components/types';\n\nconst DSCardNavigation = ({ containerProps = {}, title = '', description = '', type, Icon, actions = [], ...rest }) => (\n <TooltipTextProvider>\n <StyledCardNavigationBoxWrapper role=\"button\" tabIndex={0} {...rest} {...containerProps}>\n <StyledCardNavigationIcon type={type}>\n <Icon size=\"l\" />\n </StyledCardNavigationIcon>\n <StyledCardNavigationCentralContent>\n <StyledCardNavigationContent>\n <StyledCardNavigationContentTitleWrapper>\n <StyledCardNavigationContentTitle>\n <DSTruncatedTooltipText value={title} />\n </StyledCardNavigationContentTitle>\n <StyledCardNavigationContentDescription>\n <DSTruncatedTooltipText value={description} data-testid=\"ds-card-navigation--description\" />\n </StyledCardNavigationContentDescription>\n </StyledCardNavigationContentTitleWrapper>\n </StyledCardNavigationContent>\n {actions.length > 0 && (\n <StyledCardNavigationActions>\n {actions.map(({ icon = <MoreOptionsVert aria-label=\"More options\" />, ...otherProps }, key) => (\n <StyledCardNavigationAction key={key}>\n <DSButton icon={icon} {...otherProps} buttonType={BUTTON_TYPE.TEXT} size={BUTTON_SIZE.L} />\n </StyledCardNavigationAction>\n ))}\n </StyledCardNavigationActions>\n )}\n </StyledCardNavigationCentralContent>\n </StyledCardNavigationBoxWrapper>\n </TooltipTextProvider>\n);\n\nDSCardNavigation.defaultProps = {\n type: CardNavigationTypes.BORROWER,\n Icon: LoanProducts,\n};\n\nconst props = {\n /** props to inject to card navigation wrapper */\n containerProps: PropTypes.object.description('props to inject to card navigation wrapper'),\n /** card navigation title */\n title: PropTypes.string.description('card navigation title'),\n /** card navigation main icon */\n Icon: PropTypes.node.description('card navigation main icon'),\n /** card navigation description */\n description: PropTypes.string.description('card navigation description'),\n /** card navigation type */\n type: PropTypes.oneOf(CardNavigationTypesValues).description('card navigation type'),\n /** card navigation actions array */\n actions: PropTypes.arrayOf(\n PropTypes.shape({\n icon: PropTypes.element,\n onClick: PropTypes.func,\n }),\n ).description('card navigation actions array'),\n};\n\nDSCardNavigation.propTypes = props;\n\nconst DSCardNavigationWithSchema = describe(DSCardNavigation);\nDSCardNavigationWithSchema.propTypes = props;\n\nexport { CardNavigationTypes, CardNavigationTypesValues, DSCardNavigationWithSchema };\n\nexport default DSCardNavigation;\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,mBAAkB;AAClB,wBAAoC;AACpC,uCAA4D;AAC5D,sBAA8C;AAC9C,uBAAmD;AACnD,mBAUO;AACP,mBAA+D;AAE/D,MAAM,mBAAmB,CAAC,OAA0F;AAA1F,eAAE,mBAAiB,IAAI,QAAQ,IAAI,cAAc,IAAI,MAAM,MAAM,UAAU,OAA3E,IAAkF,iBAAlF,IAAkF,CAAhF,kBAAqB,SAAY,eAAkB,QAAM,QAAM;AACzF,4DAAC,sDAAD,MACE,mDAAC,6CAAD;AAAA,IAAgC,MAAK;AAAA,IAAS,UAAU;AAAA,KAAO,OAAU,iBACvE,mDAAC,uCAAD;AAAA,IAA0B;AAAA,KACxB,mDAAC,MAAD;AAAA,IAAM,MAAK;AAAA,OAEb,mDAAC,iDAAD,MACE,mDAAC,0CAAD,MACE,mDAAC,sDAAD,MACE,mDAAC,+CAAD,MACE,mDAAC,yDAAD;AAAA,IAAwB,OAAO;AAAA,OAEjC,mDAAC,qDAAD,MACE,mDAAC,yDAAD;AAAA,IAAwB,OAAO;AAAA,IAAa,eAAY;AAAA,SAI7D,QAAQ,SAAS,KAChB,mDAAC,0CAAD,MACG,QAAQ,IAAI,CAAC,KAAyE,QAAK;AAA9E,mBAAE,SAAO,mDAAC,iCAAD;AAAA,MAAiB,cAAW;AAAA,WAArC,KAA2D,uBAA3D,KAA2D,CAAzD;AACd,8DAAC,yCAAD;AAAA,MAA4B;AAAA,OAC1B,mDAAC,0BAAD;AAAA,MAAU;AAAA,OAAgB,aAA1B;AAAA,MAAsC,YAAY,6BAAY;AAAA,MAAM,MAAM,6BAAY;AAAA;AAAA;AAAA;AAUtG,iBAAiB,eAAe;AAAA,EAC9B,MAAM,iCAAoB;AAAA,EAC1B,MAAM;AAAA;AAGR,MAAM,QAAQ;AAAA,EAEZ,gBAAgB,4BAAU,OAAO,YAAY;AAAA,EAE7C,OAAO,4BAAU,OAAO,YAAY;AAAA,EAEpC,MAAM,4BAAU,KAAK,YAAY;AAAA,EAEjC,aAAa,4BAAU,OAAO,YAAY;AAAA,EAE1C,MAAM,4BAAU,MAAM,wCAA2B,YAAY;AAAA,EAE7D,SAAS,4BAAU,QACjB,4BAAU,MAAM;AAAA,IACd,MAAM,4BAAU;AAAA,IAChB,SAAS,4BAAU;AAAA,MAErB,YAAY;AAAA;AAGhB,iBAAiB,YAAY;AAE7B,MAAM,6BAA6B,gCAAS;AAC5C,2BAA2B,YAAY;AAIvC,IAAO,2BAAQ;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __reExport = (target, module2, copyDefault, desc) => {
|
|
13
|
+
if (module2 && typeof module2 === "object" || typeof module2 === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(module2))
|
|
15
|
+
if (!__hasOwnProp.call(target, key) && (copyDefault || key !== "default"))
|
|
16
|
+
__defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return target;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (module2, isNodeMode) => {
|
|
21
|
+
return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", !isNodeMode && module2 && module2.__esModule ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2);
|
|
22
|
+
};
|
|
23
|
+
var __toCommonJS = /* @__PURE__ */ ((cache) => {
|
|
24
|
+
return (module2, temp) => {
|
|
25
|
+
return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
|
|
26
|
+
};
|
|
27
|
+
})(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
|
|
28
|
+
var types_exports = {};
|
|
29
|
+
__export(types_exports, {
|
|
30
|
+
CardNavigationTypes: () => CardNavigationTypes,
|
|
31
|
+
CardNavigationTypesValues: () => CardNavigationTypesValues
|
|
32
|
+
});
|
|
33
|
+
var React = __toESM(require("react"));
|
|
34
|
+
const CardNavigationTypes = {
|
|
35
|
+
BORROWER: "borrower",
|
|
36
|
+
FINANCIAL: "financial",
|
|
37
|
+
LOAN: "loan",
|
|
38
|
+
REGULATORY: "regulatory"
|
|
39
|
+
};
|
|
40
|
+
const CardNavigationTypesValues = Object.values(CardNavigationTypes);
|
|
41
|
+
module.exports = __toCommonJS(types_exports);
|
|
42
|
+
//# sourceMappingURL=types.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/components/types.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
+
"sourcesContent": ["export const CardNavigationTypes = {\n BORROWER: 'borrower',\n FINANCIAL: 'financial',\n LOAN: 'loan',\n REGULATORY: 'regulatory',\n};\n\nexport const CardNavigationTypesValues = Object.values(CardNavigationTypes);\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAhB,MAAM,sBAAsB;AAAA,EACjC,UAAU;AAAA,EACV,WAAW;AAAA,EACX,MAAM;AAAA,EACN,YAAY;AAAA;AAGP,MAAM,4BAA4B,OAAO,OAAO;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __reExport = (target, module2, copyDefault, desc) => {
|
|
13
|
+
if (module2 && typeof module2 === "object" || typeof module2 === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(module2))
|
|
15
|
+
if (!__hasOwnProp.call(target, key) && (copyDefault || key !== "default"))
|
|
16
|
+
__defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return target;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (module2, isNodeMode) => {
|
|
21
|
+
return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", !isNodeMode && module2 && module2.__esModule ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2);
|
|
22
|
+
};
|
|
23
|
+
var __toCommonJS = /* @__PURE__ */ ((cache) => {
|
|
24
|
+
return (module2, temp) => {
|
|
25
|
+
return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
|
|
26
|
+
};
|
|
27
|
+
})(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
|
|
28
|
+
var src_exports = {};
|
|
29
|
+
__export(src_exports, {
|
|
30
|
+
default: () => import_DSCardNavigation.default
|
|
31
|
+
});
|
|
32
|
+
var React = __toESM(require("react"));
|
|
33
|
+
var import_DSCardNavigation = __toESM(require("./DSCardNavigation"));
|
|
34
|
+
__reExport(src_exports, require("./DSCardNavigation"));
|
|
35
|
+
module.exports = __toCommonJS(src_exports);
|
|
36
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/index.tsx", "../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
+
"sourcesContent": ["export { default } from './DSCardNavigation';\nexport * from './DSCardNavigation';\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,8BAAwB;AACxB,wBAAc;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __reExport = (target, module2, copyDefault, desc) => {
|
|
13
|
+
if (module2 && typeof module2 === "object" || typeof module2 === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(module2))
|
|
15
|
+
if (!__hasOwnProp.call(target, key) && (copyDefault || key !== "default"))
|
|
16
|
+
__defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return target;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (module2, isNodeMode) => {
|
|
21
|
+
return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", !isNodeMode && module2 && module2.__esModule ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2);
|
|
22
|
+
};
|
|
23
|
+
var __toCommonJS = /* @__PURE__ */ ((cache) => {
|
|
24
|
+
return (module2, temp) => {
|
|
25
|
+
return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
|
|
26
|
+
};
|
|
27
|
+
})(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
|
|
28
|
+
var style_exports = {};
|
|
29
|
+
__export(style_exports, {
|
|
30
|
+
StyledCardNavigationAction: () => StyledCardNavigationAction,
|
|
31
|
+
StyledCardNavigationActions: () => StyledCardNavigationActions,
|
|
32
|
+
StyledCardNavigationBoxWrapper: () => StyledCardNavigationBoxWrapper,
|
|
33
|
+
StyledCardNavigationCentralContent: () => StyledCardNavigationCentralContent,
|
|
34
|
+
StyledCardNavigationContent: () => StyledCardNavigationContent,
|
|
35
|
+
StyledCardNavigationContentDescription: () => StyledCardNavigationContentDescription,
|
|
36
|
+
StyledCardNavigationContentTitle: () => StyledCardNavigationContentTitle,
|
|
37
|
+
StyledCardNavigationContentTitleWrapper: () => StyledCardNavigationContentTitleWrapper,
|
|
38
|
+
StyledCardNavigationIcon: () => StyledCardNavigationIcon
|
|
39
|
+
});
|
|
40
|
+
var React = __toESM(require("react"));
|
|
41
|
+
var import_styled_components = __toESM(require("styled-components"));
|
|
42
|
+
var import_types = require("./components/types");
|
|
43
|
+
const StyledCardNavigationContentTitle = import_styled_components.default.div`
|
|
44
|
+
padding-top: ${(props) => props.theme.space.xxs};
|
|
45
|
+
font-weight: ${(props) => props.theme.fontWeights.semibold};
|
|
46
|
+
font-size: 18px;
|
|
47
|
+
color: ${(props) => props.theme.colors.neutral["700"]};
|
|
48
|
+
`;
|
|
49
|
+
const StyledCardNavigationContentDescription = import_styled_components.default.div`
|
|
50
|
+
color: ${(props) => props.theme.colors.neutral["500"]};
|
|
51
|
+
font-size: 12px;
|
|
52
|
+
`;
|
|
53
|
+
const StyledCardNavigationContentTitleWrapper = import_styled_components.default.div`
|
|
54
|
+
width: 100%;
|
|
55
|
+
`;
|
|
56
|
+
const StyledCardNavigationContent = import_styled_components.default.div`
|
|
57
|
+
padding-right: ${(props) => props.theme.space.xs};
|
|
58
|
+
padding-left: ${(props) => props.theme.space.xs};
|
|
59
|
+
display: flex;
|
|
60
|
+
align-items: center;
|
|
61
|
+
flex: 1;
|
|
62
|
+
overflow: hidden;
|
|
63
|
+
`;
|
|
64
|
+
const StyledCardNavigationCentralContent = import_styled_components.default.div`
|
|
65
|
+
width: 273px;
|
|
66
|
+
display: flex;
|
|
67
|
+
@media (max-width: ${(props) => props.theme.breakpoints.small}) {
|
|
68
|
+
width: 336px;
|
|
69
|
+
}
|
|
70
|
+
`;
|
|
71
|
+
const StyledCardNavigationBoxWrapper = import_styled_components.default.div`
|
|
72
|
+
width: 337px;
|
|
73
|
+
display: flex;
|
|
74
|
+
flex-direction: row;
|
|
75
|
+
flex-wrap: nowrap;
|
|
76
|
+
box-shadow: 0 1px 4px 0px rgba(37, 41, 47, 0.5);
|
|
77
|
+
border-radius: 2px;
|
|
78
|
+
position: relative;
|
|
79
|
+
outline: none;
|
|
80
|
+
${(props) => props.fluid ? "width: 100%" : ""};
|
|
81
|
+
@media (max-width: ${(props) => props.theme.breakpoints.small}) {
|
|
82
|
+
width: ${(props) => props.fluid ? "width: 100%" : "414px"};
|
|
83
|
+
}
|
|
84
|
+
:after {
|
|
85
|
+
display: block;
|
|
86
|
+
content: '';
|
|
87
|
+
position: absolute;
|
|
88
|
+
height: 100%;
|
|
89
|
+
width: 100%;
|
|
90
|
+
top: 0;
|
|
91
|
+
left: 0;
|
|
92
|
+
border: solid ${(props) => props.theme.space.xxs} transparent;
|
|
93
|
+
border-radius: 2px;
|
|
94
|
+
pointer-events: none;
|
|
95
|
+
}
|
|
96
|
+
&:hover,
|
|
97
|
+
&:focus {
|
|
98
|
+
box-shadow: 0 3px 8px 0px rgba(37, 41, 47, 0.4);
|
|
99
|
+
}
|
|
100
|
+
`;
|
|
101
|
+
const StyledCardNavigationIcon = import_styled_components.default.div`
|
|
102
|
+
width: 64px;
|
|
103
|
+
height: 64px;
|
|
104
|
+
background-color: #32aad1;
|
|
105
|
+
border-top-left-radius: 2px;
|
|
106
|
+
border-bottom-left-radius: 2px;
|
|
107
|
+
padding: ${(props) => props.theme.space.xxs};
|
|
108
|
+
display: flex;
|
|
109
|
+
align-items: center;
|
|
110
|
+
justify-content: center;
|
|
111
|
+
fill: #ffffff;
|
|
112
|
+
/* fill: color(neutral, 0); */
|
|
113
|
+
background-color: ${({ type }) => type === import_types.CardNavigationTypes.BORROWER && "#32aad1" || type === import_types.CardNavigationTypes.FINANCIAL && "#1ba88d" || type === import_types.CardNavigationTypes.LOAN && "#8e49b2" || type === import_types.CardNavigationTypes.REGULATORY && "#db5575"};
|
|
114
|
+
`;
|
|
115
|
+
const StyledCardNavigationActions = import_styled_components.default.div`
|
|
116
|
+
display: flex;
|
|
117
|
+
flex-direction: row;
|
|
118
|
+
align-items: center;
|
|
119
|
+
padding-right: ${(props) => props.theme.space.xxs};
|
|
120
|
+
`;
|
|
121
|
+
const StyledCardNavigationAction = import_styled_components.default.div`
|
|
122
|
+
margin-left: ${(props) => props.theme.space.xxs};
|
|
123
|
+
span {
|
|
124
|
+
height: ${(props) => props.theme.space.s};
|
|
125
|
+
width: ${(props) => props.theme.space.s};
|
|
126
|
+
svg {
|
|
127
|
+
fill: ${(props) => props.theme.colors.neutral[500]};
|
|
128
|
+
height: ${(props) => props.theme.space.s};
|
|
129
|
+
width: ${(props) => props.theme.space.s};
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
`;
|
|
133
|
+
module.exports = __toCommonJS(style_exports);
|
|
134
|
+
//# sourceMappingURL=style.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/style.tsx", "../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
+
"sourcesContent": ["import styled from 'styled-components';\nimport { CardNavigationTypes } from './components/types';\n\nexport const StyledCardNavigationContentTitle = styled.div`\n padding-top: ${(props) => props.theme.space.xxs};\n font-weight: ${(props) => props.theme.fontWeights.semibold};\n font-size: 18px;\n color: ${(props) => props.theme.colors.neutral['700']};\n`;\n\nexport const StyledCardNavigationContentDescription = styled.div`\n color: ${(props) => props.theme.colors.neutral['500']};\n font-size: 12px;\n`;\n\nexport const StyledCardNavigationContentTitleWrapper = styled.div`\n width: 100%;\n`;\n\nexport const StyledCardNavigationContent = styled.div`\n padding-right: ${(props) => props.theme.space.xs};\n padding-left: ${(props) => props.theme.space.xs};\n display: flex;\n align-items: center;\n flex: 1;\n overflow: hidden;\n`;\n\nexport const StyledCardNavigationCentralContent = styled.div`\n width: 273px;\n display: flex;\n @media (max-width: ${(props) => props.theme.breakpoints.small}) {\n width: 336px;\n }\n`;\n\nexport const StyledCardNavigationBoxWrapper = styled.div`\n width: 337px;\n display: flex;\n flex-direction: row;\n flex-wrap: nowrap;\n box-shadow: 0 1px 4px 0px rgba(37, 41, 47, 0.5);\n border-radius: 2px;\n position: relative;\n outline: none;\n ${(props) => (props.fluid ? 'width: 100%' : '')};\n @media (max-width: ${(props) => props.theme.breakpoints.small}) {\n width: ${(props) => (props.fluid ? 'width: 100%' : '414px')};\n }\n :after {\n display: block;\n content: '';\n position: absolute;\n height: 100%;\n width: 100%;\n top: 0;\n left: 0;\n border: solid ${(props) => props.theme.space.xxs} transparent;\n border-radius: 2px;\n pointer-events: none;\n }\n &:hover,\n &:focus {\n box-shadow: 0 3px 8px 0px rgba(37, 41, 47, 0.4);\n }\n`;\n\nexport const StyledCardNavigationIcon = styled.div`\n width: 64px;\n height: 64px;\n background-color: #32aad1;\n border-top-left-radius: 2px;\n border-bottom-left-radius: 2px;\n padding: ${(props) => props.theme.space.xxs};\n display: flex;\n align-items: center;\n justify-content: center;\n fill: #ffffff;\n /* fill: color(neutral, 0); */\n background-color: ${({ type }) =>\n (type === CardNavigationTypes.BORROWER && '#32aad1') ||\n (type === CardNavigationTypes.FINANCIAL && '#1ba88d') ||\n (type === CardNavigationTypes.LOAN && '#8e49b2') ||\n (type === CardNavigationTypes.REGULATORY && '#db5575')};\n`;\n\nexport const StyledCardNavigationActions = styled.div`\n display: flex;\n flex-direction: row;\n align-items: center;\n padding-right: ${(props) => props.theme.space.xxs};\n`;\n\nexport const StyledCardNavigationAction = styled.div`\n margin-left: ${(props) => props.theme.space.xxs};\n span {\n height: ${(props) => props.theme.space.s};\n width: ${(props) => props.theme.space.s};\n svg {\n fill: ${(props) => props.theme.colors.neutral[500]};\n height: ${(props) => props.theme.space.s};\n width: ${(props) => props.theme.space.s};\n }\n }\n`;\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,+BAAmB;AACnB,mBAAoC;AAE7B,MAAM,mCAAmC,iCAAO;AAAA,iBACtC,CAAC,UAAU,MAAM,MAAM,MAAM;AAAA,iBAC7B,CAAC,UAAU,MAAM,MAAM,YAAY;AAAA;AAAA,WAEzC,CAAC,UAAU,MAAM,MAAM,OAAO,QAAQ;AAAA;AAG1C,MAAM,yCAAyC,iCAAO;AAAA,WAClD,CAAC,UAAU,MAAM,MAAM,OAAO,QAAQ;AAAA;AAAA;AAI1C,MAAM,0CAA0C,iCAAO;AAAA;AAAA;AAIvD,MAAM,8BAA8B,iCAAO;AAAA,mBAC/B,CAAC,UAAU,MAAM,MAAM,MAAM;AAAA,kBAC9B,CAAC,UAAU,MAAM,MAAM,MAAM;AAAA;AAAA;AAAA;AAAA;AAAA;AAOxC,MAAM,qCAAqC,iCAAO;AAAA;AAAA;AAAA,uBAGlC,CAAC,UAAU,MAAM,MAAM,YAAY;AAAA;AAAA;AAAA;AAKnD,MAAM,iCAAiC,iCAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IASjD,CAAC,UAAW,MAAM,QAAQ,gBAAgB;AAAA,uBACvB,CAAC,UAAU,MAAM,MAAM,YAAY;AAAA,aAC7C,CAAC,UAAW,MAAM,QAAQ,gBAAgB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,oBAUnC,CAAC,UAAU,MAAM,MAAM,MAAM;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAU1C,MAAM,2BAA2B,iCAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,aAMlC,CAAC,UAAU,MAAM,MAAM,MAAM;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,sBAMpB,CAAC,EAAE,WACpB,SAAS,iCAAoB,YAAY,aACzC,SAAS,iCAAoB,aAAa,aAC1C,SAAS,iCAAoB,QAAQ,aACrC,SAAS,iCAAoB,cAAc;AAAA;AAGzC,MAAM,8BAA8B,iCAAO;AAAA;AAAA;AAAA;AAAA,mBAI/B,CAAC,UAAU,MAAM,MAAM,MAAM;AAAA;AAGzC,MAAM,6BAA6B,iCAAO;AAAA,iBAChC,CAAC,UAAU,MAAM,MAAM,MAAM;AAAA;AAAA,cAEhC,CAAC,UAAU,MAAM,MAAM,MAAM;AAAA,aAC9B,CAAC,UAAU,MAAM,MAAM,MAAM;AAAA;AAAA,cAE5B,CAAC,UAAU,MAAM,MAAM,OAAO,QAAQ;AAAA,gBACpC,CAAC,UAAU,MAAM,MAAM,MAAM;AAAA,eAC9B,CAAC,UAAU,MAAM,MAAM,MAAM;AAAA;AAAA;AAAA;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __defProps = Object.defineProperties;
|
|
3
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
4
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
7
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
8
|
+
var __spreadValues = (a, b) => {
|
|
9
|
+
for (var prop in b || (b = {}))
|
|
10
|
+
if (__hasOwnProp.call(b, prop))
|
|
11
|
+
__defNormalProp(a, prop, b[prop]);
|
|
12
|
+
if (__getOwnPropSymbols)
|
|
13
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
14
|
+
if (__propIsEnum.call(b, prop))
|
|
15
|
+
__defNormalProp(a, prop, b[prop]);
|
|
16
|
+
}
|
|
17
|
+
return a;
|
|
18
|
+
};
|
|
19
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
|
+
var __objRest = (source, exclude) => {
|
|
21
|
+
var target = {};
|
|
22
|
+
for (var prop in source)
|
|
23
|
+
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
24
|
+
target[prop] = source[prop];
|
|
25
|
+
if (source != null && __getOwnPropSymbols)
|
|
26
|
+
for (var prop of __getOwnPropSymbols(source)) {
|
|
27
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
|
|
28
|
+
target[prop] = source[prop];
|
|
29
|
+
}
|
|
30
|
+
return target;
|
|
31
|
+
};
|
|
32
|
+
import * as React from "react";
|
|
33
|
+
import React2 from "react";
|
|
34
|
+
import { PropTypes, describe } from "react-desc";
|
|
35
|
+
import { DSTruncatedTooltipText, TooltipTextProvider } from "@elliemae/ds-truncated-tooltip-text";
|
|
36
|
+
import { MoreOptionsVert, LoanProducts } from "@elliemae/ds-icons";
|
|
37
|
+
import DSButton, { BUTTON_SIZE, BUTTON_TYPE } from "@elliemae/ds-button";
|
|
38
|
+
import {
|
|
39
|
+
StyledCardNavigationContentTitle,
|
|
40
|
+
StyledCardNavigationContentDescription,
|
|
41
|
+
StyledCardNavigationContentTitleWrapper,
|
|
42
|
+
StyledCardNavigationContent,
|
|
43
|
+
StyledCardNavigationCentralContent,
|
|
44
|
+
StyledCardNavigationBoxWrapper,
|
|
45
|
+
StyledCardNavigationIcon,
|
|
46
|
+
StyledCardNavigationAction,
|
|
47
|
+
StyledCardNavigationActions
|
|
48
|
+
} from "./style";
|
|
49
|
+
import { CardNavigationTypes, CardNavigationTypesValues } from "./components/types";
|
|
50
|
+
const DSCardNavigation = (_a) => {
|
|
51
|
+
var _b = _a, { containerProps = {}, title = "", description = "", type, Icon, actions = [] } = _b, rest = __objRest(_b, ["containerProps", "title", "description", "type", "Icon", "actions"]);
|
|
52
|
+
return /* @__PURE__ */ React2.createElement(TooltipTextProvider, null, /* @__PURE__ */ React2.createElement(StyledCardNavigationBoxWrapper, __spreadValues(__spreadValues({
|
|
53
|
+
role: "button",
|
|
54
|
+
tabIndex: 0
|
|
55
|
+
}, rest), containerProps), /* @__PURE__ */ React2.createElement(StyledCardNavigationIcon, {
|
|
56
|
+
type
|
|
57
|
+
}, /* @__PURE__ */ React2.createElement(Icon, {
|
|
58
|
+
size: "l"
|
|
59
|
+
})), /* @__PURE__ */ React2.createElement(StyledCardNavigationCentralContent, null, /* @__PURE__ */ React2.createElement(StyledCardNavigationContent, null, /* @__PURE__ */ React2.createElement(StyledCardNavigationContentTitleWrapper, null, /* @__PURE__ */ React2.createElement(StyledCardNavigationContentTitle, null, /* @__PURE__ */ React2.createElement(DSTruncatedTooltipText, {
|
|
60
|
+
value: title
|
|
61
|
+
})), /* @__PURE__ */ React2.createElement(StyledCardNavigationContentDescription, null, /* @__PURE__ */ React2.createElement(DSTruncatedTooltipText, {
|
|
62
|
+
value: description,
|
|
63
|
+
"data-testid": "ds-card-navigation--description"
|
|
64
|
+
})))), actions.length > 0 && /* @__PURE__ */ React2.createElement(StyledCardNavigationActions, null, actions.map((_a2, key) => {
|
|
65
|
+
var _b2 = _a2, { icon = /* @__PURE__ */ React2.createElement(MoreOptionsVert, {
|
|
66
|
+
"aria-label": "More options"
|
|
67
|
+
}) } = _b2, otherProps = __objRest(_b2, ["icon"]);
|
|
68
|
+
return /* @__PURE__ */ React2.createElement(StyledCardNavigationAction, {
|
|
69
|
+
key
|
|
70
|
+
}, /* @__PURE__ */ React2.createElement(DSButton, __spreadProps(__spreadValues({
|
|
71
|
+
icon
|
|
72
|
+
}, otherProps), {
|
|
73
|
+
buttonType: BUTTON_TYPE.TEXT,
|
|
74
|
+
size: BUTTON_SIZE.L
|
|
75
|
+
})));
|
|
76
|
+
})))));
|
|
77
|
+
};
|
|
78
|
+
DSCardNavigation.defaultProps = {
|
|
79
|
+
type: CardNavigationTypes.BORROWER,
|
|
80
|
+
Icon: LoanProducts
|
|
81
|
+
};
|
|
82
|
+
const props = {
|
|
83
|
+
containerProps: PropTypes.object.description("props to inject to card navigation wrapper"),
|
|
84
|
+
title: PropTypes.string.description("card navigation title"),
|
|
85
|
+
Icon: PropTypes.node.description("card navigation main icon"),
|
|
86
|
+
description: PropTypes.string.description("card navigation description"),
|
|
87
|
+
type: PropTypes.oneOf(CardNavigationTypesValues).description("card navigation type"),
|
|
88
|
+
actions: PropTypes.arrayOf(PropTypes.shape({
|
|
89
|
+
icon: PropTypes.element,
|
|
90
|
+
onClick: PropTypes.func
|
|
91
|
+
})).description("card navigation actions array")
|
|
92
|
+
};
|
|
93
|
+
DSCardNavigation.propTypes = props;
|
|
94
|
+
const DSCardNavigationWithSchema = describe(DSCardNavigation);
|
|
95
|
+
DSCardNavigationWithSchema.propTypes = props;
|
|
96
|
+
var DSCardNavigation_default = DSCardNavigation;
|
|
97
|
+
export {
|
|
98
|
+
CardNavigationTypes,
|
|
99
|
+
CardNavigationTypesValues,
|
|
100
|
+
DSCardNavigationWithSchema,
|
|
101
|
+
DSCardNavigation_default as default
|
|
102
|
+
};
|
|
103
|
+
//# sourceMappingURL=DSCardNavigation.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../scripts/build/transpile/react-shim.js", "../../src/DSCardNavigation.tsx"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { PropTypes, describe } from 'react-desc';\nimport { DSTruncatedTooltipText, TooltipTextProvider } from '@elliemae/ds-truncated-tooltip-text';\nimport { MoreOptionsVert, LoanProducts } from '@elliemae/ds-icons';\nimport DSButton, { BUTTON_SIZE, BUTTON_TYPE } from '@elliemae/ds-button';\nimport {\n StyledCardNavigationContentTitle,\n StyledCardNavigationContentDescription,\n StyledCardNavigationContentTitleWrapper,\n StyledCardNavigationContent,\n StyledCardNavigationCentralContent,\n StyledCardNavigationBoxWrapper,\n StyledCardNavigationIcon,\n StyledCardNavigationAction,\n StyledCardNavigationActions,\n} from './style';\nimport { CardNavigationTypes, CardNavigationTypesValues } from './components/types';\n\nconst DSCardNavigation = ({ containerProps = {}, title = '', description = '', type, Icon, actions = [], ...rest }) => (\n <TooltipTextProvider>\n <StyledCardNavigationBoxWrapper role=\"button\" tabIndex={0} {...rest} {...containerProps}>\n <StyledCardNavigationIcon type={type}>\n <Icon size=\"l\" />\n </StyledCardNavigationIcon>\n <StyledCardNavigationCentralContent>\n <StyledCardNavigationContent>\n <StyledCardNavigationContentTitleWrapper>\n <StyledCardNavigationContentTitle>\n <DSTruncatedTooltipText value={title} />\n </StyledCardNavigationContentTitle>\n <StyledCardNavigationContentDescription>\n <DSTruncatedTooltipText value={description} data-testid=\"ds-card-navigation--description\" />\n </StyledCardNavigationContentDescription>\n </StyledCardNavigationContentTitleWrapper>\n </StyledCardNavigationContent>\n {actions.length > 0 && (\n <StyledCardNavigationActions>\n {actions.map(({ icon = <MoreOptionsVert aria-label=\"More options\" />, ...otherProps }, key) => (\n <StyledCardNavigationAction key={key}>\n <DSButton icon={icon} {...otherProps} buttonType={BUTTON_TYPE.TEXT} size={BUTTON_SIZE.L} />\n </StyledCardNavigationAction>\n ))}\n </StyledCardNavigationActions>\n )}\n </StyledCardNavigationCentralContent>\n </StyledCardNavigationBoxWrapper>\n </TooltipTextProvider>\n);\n\nDSCardNavigation.defaultProps = {\n type: CardNavigationTypes.BORROWER,\n Icon: LoanProducts,\n};\n\nconst props = {\n /** props to inject to card navigation wrapper */\n containerProps: PropTypes.object.description('props to inject to card navigation wrapper'),\n /** card navigation title */\n title: PropTypes.string.description('card navigation title'),\n /** card navigation main icon */\n Icon: PropTypes.node.description('card navigation main icon'),\n /** card navigation description */\n description: PropTypes.string.description('card navigation description'),\n /** card navigation type */\n type: PropTypes.oneOf(CardNavigationTypesValues).description('card navigation type'),\n /** card navigation actions array */\n actions: PropTypes.arrayOf(\n PropTypes.shape({\n icon: PropTypes.element,\n onClick: PropTypes.func,\n }),\n ).description('card navigation actions array'),\n};\n\nDSCardNavigation.propTypes = props;\n\nconst DSCardNavigationWithSchema = describe(DSCardNavigation);\nDSCardNavigationWithSchema.propTypes = props;\n\nexport { CardNavigationTypes, CardNavigationTypesValues, DSCardNavigationWithSchema };\n\nexport default DSCardNavigation;\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;ACAA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAWA;AAEA,MAAM,mBAAmB,CAAC,OAA0F;AAA1F,eAAE,mBAAiB,IAAI,QAAQ,IAAI,cAAc,IAAI,MAAM,MAAM,UAAU,OAA3E,IAAkF,iBAAlF,IAAkF,CAAhF,kBAAqB,SAAY,eAAkB,QAAM,QAAM;AACzF,8CAAC,qBAAD,MACE,qCAAC,gCAAD;AAAA,IAAgC,MAAK;AAAA,IAAS,UAAU;AAAA,KAAO,OAAU,iBACvE,qCAAC,0BAAD;AAAA,IAA0B;AAAA,KACxB,qCAAC,MAAD;AAAA,IAAM,MAAK;AAAA,OAEb,qCAAC,oCAAD,MACE,qCAAC,6BAAD,MACE,qCAAC,yCAAD,MACE,qCAAC,kCAAD,MACE,qCAAC,wBAAD;AAAA,IAAwB,OAAO;AAAA,OAEjC,qCAAC,wCAAD,MACE,qCAAC,wBAAD;AAAA,IAAwB,OAAO;AAAA,IAAa,eAAY;AAAA,SAI7D,QAAQ,SAAS,KAChB,qCAAC,6BAAD,MACG,QAAQ,IAAI,CAAC,KAAyE,QAAK;AAA9E,mBAAE,SAAO,qCAAC,iBAAD;AAAA,MAAiB,cAAW;AAAA,WAArC,KAA2D,uBAA3D,KAA2D,CAAzD;AACd,gDAAC,4BAAD;AAAA,MAA4B;AAAA,OAC1B,qCAAC,UAAD;AAAA,MAAU;AAAA,OAAgB,aAA1B;AAAA,MAAsC,YAAY,YAAY;AAAA,MAAM,MAAM,YAAY;AAAA;AAAA;AAAA;AAUtG,iBAAiB,eAAe;AAAA,EAC9B,MAAM,oBAAoB;AAAA,EAC1B,MAAM;AAAA;AAGR,MAAM,QAAQ;AAAA,EAEZ,gBAAgB,UAAU,OAAO,YAAY;AAAA,EAE7C,OAAO,UAAU,OAAO,YAAY;AAAA,EAEpC,MAAM,UAAU,KAAK,YAAY;AAAA,EAEjC,aAAa,UAAU,OAAO,YAAY;AAAA,EAE1C,MAAM,UAAU,MAAM,2BAA2B,YAAY;AAAA,EAE7D,SAAS,UAAU,QACjB,UAAU,MAAM;AAAA,IACd,MAAM,UAAU;AAAA,IAChB,SAAS,UAAU;AAAA,MAErB,YAAY;AAAA;AAGhB,iBAAiB,YAAY;AAE7B,MAAM,6BAA6B,SAAS;AAC5C,2BAA2B,YAAY;AAIvC,IAAO,2BAAQ;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
const CardNavigationTypes = {
|
|
3
|
+
BORROWER: "borrower",
|
|
4
|
+
FINANCIAL: "financial",
|
|
5
|
+
LOAN: "loan",
|
|
6
|
+
REGULATORY: "regulatory"
|
|
7
|
+
};
|
|
8
|
+
const CardNavigationTypesValues = Object.values(CardNavigationTypes);
|
|
9
|
+
export {
|
|
10
|
+
CardNavigationTypes,
|
|
11
|
+
CardNavigationTypesValues
|
|
12
|
+
};
|
|
13
|
+
//# sourceMappingURL=types.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/components/types.tsx"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "export const CardNavigationTypes = {\n BORROWER: 'borrower',\n FINANCIAL: 'financial',\n LOAN: 'loan',\n REGULATORY: 'regulatory',\n};\n\nexport const CardNavigationTypesValues = Object.values(CardNavigationTypes);\n"],
|
|
5
|
+
"mappings": "AAAA;ACAO,MAAM,sBAAsB;AAAA,EACjC,UAAU;AAAA,EACV,WAAW;AAAA,EACX,MAAM;AAAA,EACN,YAAY;AAAA;AAGP,MAAM,4BAA4B,OAAO,OAAO;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../scripts/build/transpile/react-shim.js", "../../src/index.tsx"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "export { default } from './DSCardNavigation';\nexport * from './DSCardNavigation';\n"],
|
|
5
|
+
"mappings": "AAAA;ACAA;AACA;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import styled from "styled-components";
|
|
3
|
+
import { CardNavigationTypes } from "./components/types";
|
|
4
|
+
const StyledCardNavigationContentTitle = styled.div`
|
|
5
|
+
padding-top: ${(props) => props.theme.space.xxs};
|
|
6
|
+
font-weight: ${(props) => props.theme.fontWeights.semibold};
|
|
7
|
+
font-size: 18px;
|
|
8
|
+
color: ${(props) => props.theme.colors.neutral["700"]};
|
|
9
|
+
`;
|
|
10
|
+
const StyledCardNavigationContentDescription = styled.div`
|
|
11
|
+
color: ${(props) => props.theme.colors.neutral["500"]};
|
|
12
|
+
font-size: 12px;
|
|
13
|
+
`;
|
|
14
|
+
const StyledCardNavigationContentTitleWrapper = styled.div`
|
|
15
|
+
width: 100%;
|
|
16
|
+
`;
|
|
17
|
+
const StyledCardNavigationContent = styled.div`
|
|
18
|
+
padding-right: ${(props) => props.theme.space.xs};
|
|
19
|
+
padding-left: ${(props) => props.theme.space.xs};
|
|
20
|
+
display: flex;
|
|
21
|
+
align-items: center;
|
|
22
|
+
flex: 1;
|
|
23
|
+
overflow: hidden;
|
|
24
|
+
`;
|
|
25
|
+
const StyledCardNavigationCentralContent = styled.div`
|
|
26
|
+
width: 273px;
|
|
27
|
+
display: flex;
|
|
28
|
+
@media (max-width: ${(props) => props.theme.breakpoints.small}) {
|
|
29
|
+
width: 336px;
|
|
30
|
+
}
|
|
31
|
+
`;
|
|
32
|
+
const StyledCardNavigationBoxWrapper = styled.div`
|
|
33
|
+
width: 337px;
|
|
34
|
+
display: flex;
|
|
35
|
+
flex-direction: row;
|
|
36
|
+
flex-wrap: nowrap;
|
|
37
|
+
box-shadow: 0 1px 4px 0px rgba(37, 41, 47, 0.5);
|
|
38
|
+
border-radius: 2px;
|
|
39
|
+
position: relative;
|
|
40
|
+
outline: none;
|
|
41
|
+
${(props) => props.fluid ? "width: 100%" : ""};
|
|
42
|
+
@media (max-width: ${(props) => props.theme.breakpoints.small}) {
|
|
43
|
+
width: ${(props) => props.fluid ? "width: 100%" : "414px"};
|
|
44
|
+
}
|
|
45
|
+
:after {
|
|
46
|
+
display: block;
|
|
47
|
+
content: '';
|
|
48
|
+
position: absolute;
|
|
49
|
+
height: 100%;
|
|
50
|
+
width: 100%;
|
|
51
|
+
top: 0;
|
|
52
|
+
left: 0;
|
|
53
|
+
border: solid ${(props) => props.theme.space.xxs} transparent;
|
|
54
|
+
border-radius: 2px;
|
|
55
|
+
pointer-events: none;
|
|
56
|
+
}
|
|
57
|
+
&:hover,
|
|
58
|
+
&:focus {
|
|
59
|
+
box-shadow: 0 3px 8px 0px rgba(37, 41, 47, 0.4);
|
|
60
|
+
}
|
|
61
|
+
`;
|
|
62
|
+
const StyledCardNavigationIcon = styled.div`
|
|
63
|
+
width: 64px;
|
|
64
|
+
height: 64px;
|
|
65
|
+
background-color: #32aad1;
|
|
66
|
+
border-top-left-radius: 2px;
|
|
67
|
+
border-bottom-left-radius: 2px;
|
|
68
|
+
padding: ${(props) => props.theme.space.xxs};
|
|
69
|
+
display: flex;
|
|
70
|
+
align-items: center;
|
|
71
|
+
justify-content: center;
|
|
72
|
+
fill: #ffffff;
|
|
73
|
+
/* fill: color(neutral, 0); */
|
|
74
|
+
background-color: ${({ type }) => type === CardNavigationTypes.BORROWER && "#32aad1" || type === CardNavigationTypes.FINANCIAL && "#1ba88d" || type === CardNavigationTypes.LOAN && "#8e49b2" || type === CardNavigationTypes.REGULATORY && "#db5575"};
|
|
75
|
+
`;
|
|
76
|
+
const StyledCardNavigationActions = styled.div`
|
|
77
|
+
display: flex;
|
|
78
|
+
flex-direction: row;
|
|
79
|
+
align-items: center;
|
|
80
|
+
padding-right: ${(props) => props.theme.space.xxs};
|
|
81
|
+
`;
|
|
82
|
+
const StyledCardNavigationAction = styled.div`
|
|
83
|
+
margin-left: ${(props) => props.theme.space.xxs};
|
|
84
|
+
span {
|
|
85
|
+
height: ${(props) => props.theme.space.s};
|
|
86
|
+
width: ${(props) => props.theme.space.s};
|
|
87
|
+
svg {
|
|
88
|
+
fill: ${(props) => props.theme.colors.neutral[500]};
|
|
89
|
+
height: ${(props) => props.theme.space.s};
|
|
90
|
+
width: ${(props) => props.theme.space.s};
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
`;
|
|
94
|
+
export {
|
|
95
|
+
StyledCardNavigationAction,
|
|
96
|
+
StyledCardNavigationActions,
|
|
97
|
+
StyledCardNavigationBoxWrapper,
|
|
98
|
+
StyledCardNavigationCentralContent,
|
|
99
|
+
StyledCardNavigationContent,
|
|
100
|
+
StyledCardNavigationContentDescription,
|
|
101
|
+
StyledCardNavigationContentTitle,
|
|
102
|
+
StyledCardNavigationContentTitleWrapper,
|
|
103
|
+
StyledCardNavigationIcon
|
|
104
|
+
};
|
|
105
|
+
//# sourceMappingURL=style.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../scripts/build/transpile/react-shim.js", "../../src/style.tsx"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import styled from 'styled-components';\nimport { CardNavigationTypes } from './components/types';\n\nexport const StyledCardNavigationContentTitle = styled.div`\n padding-top: ${(props) => props.theme.space.xxs};\n font-weight: ${(props) => props.theme.fontWeights.semibold};\n font-size: 18px;\n color: ${(props) => props.theme.colors.neutral['700']};\n`;\n\nexport const StyledCardNavigationContentDescription = styled.div`\n color: ${(props) => props.theme.colors.neutral['500']};\n font-size: 12px;\n`;\n\nexport const StyledCardNavigationContentTitleWrapper = styled.div`\n width: 100%;\n`;\n\nexport const StyledCardNavigationContent = styled.div`\n padding-right: ${(props) => props.theme.space.xs};\n padding-left: ${(props) => props.theme.space.xs};\n display: flex;\n align-items: center;\n flex: 1;\n overflow: hidden;\n`;\n\nexport const StyledCardNavigationCentralContent = styled.div`\n width: 273px;\n display: flex;\n @media (max-width: ${(props) => props.theme.breakpoints.small}) {\n width: 336px;\n }\n`;\n\nexport const StyledCardNavigationBoxWrapper = styled.div`\n width: 337px;\n display: flex;\n flex-direction: row;\n flex-wrap: nowrap;\n box-shadow: 0 1px 4px 0px rgba(37, 41, 47, 0.5);\n border-radius: 2px;\n position: relative;\n outline: none;\n ${(props) => (props.fluid ? 'width: 100%' : '')};\n @media (max-width: ${(props) => props.theme.breakpoints.small}) {\n width: ${(props) => (props.fluid ? 'width: 100%' : '414px')};\n }\n :after {\n display: block;\n content: '';\n position: absolute;\n height: 100%;\n width: 100%;\n top: 0;\n left: 0;\n border: solid ${(props) => props.theme.space.xxs} transparent;\n border-radius: 2px;\n pointer-events: none;\n }\n &:hover,\n &:focus {\n box-shadow: 0 3px 8px 0px rgba(37, 41, 47, 0.4);\n }\n`;\n\nexport const StyledCardNavigationIcon = styled.div`\n width: 64px;\n height: 64px;\n background-color: #32aad1;\n border-top-left-radius: 2px;\n border-bottom-left-radius: 2px;\n padding: ${(props) => props.theme.space.xxs};\n display: flex;\n align-items: center;\n justify-content: center;\n fill: #ffffff;\n /* fill: color(neutral, 0); */\n background-color: ${({ type }) =>\n (type === CardNavigationTypes.BORROWER && '#32aad1') ||\n (type === CardNavigationTypes.FINANCIAL && '#1ba88d') ||\n (type === CardNavigationTypes.LOAN && '#8e49b2') ||\n (type === CardNavigationTypes.REGULATORY && '#db5575')};\n`;\n\nexport const StyledCardNavigationActions = styled.div`\n display: flex;\n flex-direction: row;\n align-items: center;\n padding-right: ${(props) => props.theme.space.xxs};\n`;\n\nexport const StyledCardNavigationAction = styled.div`\n margin-left: ${(props) => props.theme.space.xxs};\n span {\n height: ${(props) => props.theme.space.s};\n width: ${(props) => props.theme.space.s};\n svg {\n fill: ${(props) => props.theme.colors.neutral[500]};\n height: ${(props) => props.theme.space.s};\n width: ${(props) => props.theme.space.s};\n }\n }\n`;\n"],
|
|
5
|
+
"mappings": "AAAA;ACAA;AACA;AAEO,MAAM,mCAAmC,OAAO;AAAA,iBACtC,CAAC,UAAU,MAAM,MAAM,MAAM;AAAA,iBAC7B,CAAC,UAAU,MAAM,MAAM,YAAY;AAAA;AAAA,WAEzC,CAAC,UAAU,MAAM,MAAM,OAAO,QAAQ;AAAA;AAG1C,MAAM,yCAAyC,OAAO;AAAA,WAClD,CAAC,UAAU,MAAM,MAAM,OAAO,QAAQ;AAAA;AAAA;AAI1C,MAAM,0CAA0C,OAAO;AAAA;AAAA;AAIvD,MAAM,8BAA8B,OAAO;AAAA,mBAC/B,CAAC,UAAU,MAAM,MAAM,MAAM;AAAA,kBAC9B,CAAC,UAAU,MAAM,MAAM,MAAM;AAAA;AAAA;AAAA;AAAA;AAAA;AAOxC,MAAM,qCAAqC,OAAO;AAAA;AAAA;AAAA,uBAGlC,CAAC,UAAU,MAAM,MAAM,YAAY;AAAA;AAAA;AAAA;AAKnD,MAAM,iCAAiC,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IASjD,CAAC,UAAW,MAAM,QAAQ,gBAAgB;AAAA,uBACvB,CAAC,UAAU,MAAM,MAAM,YAAY;AAAA,aAC7C,CAAC,UAAW,MAAM,QAAQ,gBAAgB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,oBAUnC,CAAC,UAAU,MAAM,MAAM,MAAM;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAU1C,MAAM,2BAA2B,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,aAMlC,CAAC,UAAU,MAAM,MAAM,MAAM;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,sBAMpB,CAAC,EAAE,WACpB,SAAS,oBAAoB,YAAY,aACzC,SAAS,oBAAoB,aAAa,aAC1C,SAAS,oBAAoB,QAAQ,aACrC,SAAS,oBAAoB,cAAc;AAAA;AAGzC,MAAM,8BAA8B,OAAO;AAAA;AAAA;AAAA;AAAA,mBAI/B,CAAC,UAAU,MAAM,MAAM,MAAM;AAAA;AAGzC,MAAM,6BAA6B,OAAO;AAAA,iBAChC,CAAC,UAAU,MAAM,MAAM,MAAM;AAAA;AAAA,cAEhC,CAAC,UAAU,MAAM,MAAM,MAAM;AAAA,aAC9B,CAAC,UAAU,MAAM,MAAM,MAAM;AAAA;AAAA,cAE5B,CAAC,UAAU,MAAM,MAAM,OAAO,QAAQ;AAAA,gBACpC,CAAC,UAAU,MAAM,MAAM,MAAM;AAAA,eAC9B,CAAC,UAAU,MAAM,MAAM,MAAM;AAAA;AAAA;AAAA;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
package/package.json
CHANGED
|
@@ -1,27 +1,30 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elliemae/ds-card-navigation",
|
|
3
|
-
"version": "3.0.0-next.
|
|
3
|
+
"version": "3.0.0-next.6",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "ICE MT - Dimsum - Card Navigation",
|
|
6
|
-
"
|
|
7
|
-
|
|
8
|
-
|
|
6
|
+
"files": [
|
|
7
|
+
"dist"
|
|
8
|
+
],
|
|
9
|
+
"module": "./dist/esm/index.js",
|
|
10
|
+
"main": "./dist/cjs/index.js",
|
|
11
|
+
"types": "./dist/types/index.d.ts",
|
|
9
12
|
"exports": {
|
|
10
13
|
".": {
|
|
11
|
-
"import": "./esm/index.js",
|
|
12
|
-
"require": "./cjs/index.js"
|
|
14
|
+
"import": "./dist/esm/index.js",
|
|
15
|
+
"require": "./dist/cjs/index.js"
|
|
13
16
|
},
|
|
14
17
|
"./style": {
|
|
15
|
-
"import": "./esm/style.js",
|
|
16
|
-
"require": "./cjs/style.js"
|
|
18
|
+
"import": "./dist/esm/style.js",
|
|
19
|
+
"require": "./dist/cjs/style.js"
|
|
17
20
|
},
|
|
18
21
|
"./DSCardNavigation": {
|
|
19
|
-
"import": "./esm/DSCardNavigation.js",
|
|
20
|
-
"require": "./cjs/DSCardNavigation.js"
|
|
22
|
+
"import": "./dist/esm/DSCardNavigation.js",
|
|
23
|
+
"require": "./dist/cjs/DSCardNavigation.js"
|
|
21
24
|
},
|
|
22
25
|
"./components/types": {
|
|
23
|
-
"import": "./esm/components/types.js",
|
|
24
|
-
"require": "./cjs/components/types.js"
|
|
26
|
+
"import": "./dist/esm/components/types.js",
|
|
27
|
+
"require": "./dist/cjs/components/types.js"
|
|
25
28
|
}
|
|
26
29
|
},
|
|
27
30
|
"sideEffects": [
|
|
@@ -33,27 +36,27 @@
|
|
|
33
36
|
"url": "https://git.elliemae.io/platform-ui/dimsum.git"
|
|
34
37
|
},
|
|
35
38
|
"engines": {
|
|
36
|
-
"
|
|
37
|
-
"node": ">=
|
|
39
|
+
"pnpm": ">=6",
|
|
40
|
+
"node": ">=16"
|
|
38
41
|
},
|
|
39
42
|
"author": "ICE MT",
|
|
40
|
-
"
|
|
41
|
-
"
|
|
42
|
-
"
|
|
43
|
-
"
|
|
44
|
-
"
|
|
43
|
+
"jestSonar": {
|
|
44
|
+
"sonar56x": true,
|
|
45
|
+
"reportPath": "reports",
|
|
46
|
+
"reportFile": "tests.xml",
|
|
47
|
+
"indent": 4
|
|
45
48
|
},
|
|
46
49
|
"dependencies": {
|
|
47
|
-
"@elliemae/ds-button": "3.0.0-next.
|
|
48
|
-
"@elliemae/ds-icons": "3.0.0-next.
|
|
49
|
-
"@elliemae/ds-truncated-tooltip-text": "3.0.0-next.
|
|
50
|
+
"@elliemae/ds-button": "3.0.0-next.6",
|
|
51
|
+
"@elliemae/ds-icons": "3.0.0-next.6",
|
|
52
|
+
"@elliemae/ds-truncated-tooltip-text": "3.0.0-next.6",
|
|
50
53
|
"react-desc": "~4.1.3"
|
|
51
54
|
},
|
|
52
55
|
"devDependencies": {
|
|
53
|
-
"@elliemae/pui-theme": "~2.
|
|
54
|
-
"@testing-library/jest-dom": "~5.15.
|
|
56
|
+
"@elliemae/pui-theme": "~2.3.0",
|
|
57
|
+
"@testing-library/jest-dom": "~5.15.1",
|
|
55
58
|
"@testing-library/react": "~12.1.2",
|
|
56
|
-
"styled-components": "~5.3.
|
|
59
|
+
"styled-components": "~5.3.3"
|
|
57
60
|
},
|
|
58
61
|
"peerDependencies": {
|
|
59
62
|
"@elliemae/pui-theme": "^2.2.5",
|
|
@@ -64,7 +67,13 @@
|
|
|
64
67
|
},
|
|
65
68
|
"publishConfig": {
|
|
66
69
|
"access": "public",
|
|
67
|
-
"
|
|
68
|
-
|
|
70
|
+
"typeSafety": false
|
|
71
|
+
},
|
|
72
|
+
"scripts": {
|
|
73
|
+
"dev": "cross-env NODE_ENV=development node ../../scripts/build/build.mjs --watch",
|
|
74
|
+
"test": "node ../../scripts/testing/test.mjs",
|
|
75
|
+
"lint": "node ../../scripts/lint.mjs",
|
|
76
|
+
"dts": "node ../../scripts/dts.mjs",
|
|
77
|
+
"build": "cross-env NODE_ENV=production node ../../scripts/build/build.mjs"
|
|
69
78
|
}
|
|
70
79
|
}
|
package/cjs/DSCardNavigation.js
DELETED
|
@@ -1,114 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
var _defineProperty = require('@babel/runtime/helpers/defineProperty');
|
|
6
|
-
var _jsx = require('@babel/runtime/helpers/jsx');
|
|
7
|
-
var _objectWithoutProperties = require('@babel/runtime/helpers/objectWithoutProperties');
|
|
8
|
-
require('core-js/modules/esnext.async-iterator.map.js');
|
|
9
|
-
require('core-js/modules/esnext.iterator.map.js');
|
|
10
|
-
require('core-js/modules/esnext.async-iterator.filter.js');
|
|
11
|
-
require('core-js/modules/esnext.iterator.constructor.js');
|
|
12
|
-
require('core-js/modules/esnext.iterator.filter.js');
|
|
13
|
-
require('core-js/modules/esnext.async-iterator.for-each.js');
|
|
14
|
-
require('core-js/modules/esnext.iterator.for-each.js');
|
|
15
|
-
require('react');
|
|
16
|
-
var reactDesc = require('react-desc');
|
|
17
|
-
var dsTruncatedTooltipText = require('@elliemae/ds-truncated-tooltip-text');
|
|
18
|
-
var dsIcons = require('@elliemae/ds-icons');
|
|
19
|
-
var DSButton = require('@elliemae/ds-button');
|
|
20
|
-
var style = require('./style.js');
|
|
21
|
-
var types = require('./components/types.js');
|
|
22
|
-
var jsxRuntime = require('react/jsx-runtime');
|
|
23
|
-
|
|
24
|
-
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
25
|
-
|
|
26
|
-
var _defineProperty__default = /*#__PURE__*/_interopDefaultLegacy(_defineProperty);
|
|
27
|
-
var _jsx__default = /*#__PURE__*/_interopDefaultLegacy(_jsx);
|
|
28
|
-
var _objectWithoutProperties__default = /*#__PURE__*/_interopDefaultLegacy(_objectWithoutProperties);
|
|
29
|
-
var DSButton__default = /*#__PURE__*/_interopDefaultLegacy(DSButton);
|
|
30
|
-
|
|
31
|
-
var _MoreOptionsVert;
|
|
32
|
-
|
|
33
|
-
const _excluded = ["containerProps", "title", "description", "type", "Icon", "actions"],
|
|
34
|
-
_excluded2 = ["icon"];
|
|
35
|
-
|
|
36
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
37
|
-
|
|
38
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty__default["default"](target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
39
|
-
|
|
40
|
-
const DSCardNavigation = _ref => {
|
|
41
|
-
let {
|
|
42
|
-
containerProps = {},
|
|
43
|
-
title = '',
|
|
44
|
-
description = '',
|
|
45
|
-
type,
|
|
46
|
-
Icon,
|
|
47
|
-
actions = []
|
|
48
|
-
} = _ref,
|
|
49
|
-
rest = _objectWithoutProperties__default["default"](_ref, _excluded);
|
|
50
|
-
|
|
51
|
-
return /*#__PURE__*/_jsx__default["default"](dsTruncatedTooltipText.TooltipTextProvider, {}, void 0, /*#__PURE__*/jsxRuntime.jsxs(style.StyledCardNavigationBoxWrapper, _objectSpread(_objectSpread(_objectSpread({
|
|
52
|
-
role: "button",
|
|
53
|
-
tabIndex: 0
|
|
54
|
-
}, rest), containerProps), {}, {
|
|
55
|
-
children: [/*#__PURE__*/_jsx__default["default"](style.StyledCardNavigationIcon, {
|
|
56
|
-
type: type
|
|
57
|
-
}, void 0, /*#__PURE__*/_jsx__default["default"](Icon, {
|
|
58
|
-
size: "l"
|
|
59
|
-
})), /*#__PURE__*/_jsx__default["default"](style.StyledCardNavigationCentralContent, {}, void 0, /*#__PURE__*/_jsx__default["default"](style.StyledCardNavigationContent, {}, void 0, /*#__PURE__*/_jsx__default["default"](style.StyledCardNavigationContentTitleWrapper, {}, void 0, /*#__PURE__*/_jsx__default["default"](style.StyledCardNavigationContentTitle, {}, void 0, /*#__PURE__*/_jsx__default["default"](dsTruncatedTooltipText.DSTruncatedTooltipText, {
|
|
60
|
-
value: title
|
|
61
|
-
})), /*#__PURE__*/_jsx__default["default"](style.StyledCardNavigationContentDescription, {}, void 0, /*#__PURE__*/_jsx__default["default"](dsTruncatedTooltipText.DSTruncatedTooltipText, {
|
|
62
|
-
value: description,
|
|
63
|
-
"data-testid": "ds-card-navigation--description"
|
|
64
|
-
})))), actions.length > 0 && /*#__PURE__*/_jsx__default["default"](style.StyledCardNavigationActions, {}, void 0, actions.map((_ref2, key) => {
|
|
65
|
-
let {
|
|
66
|
-
icon = _MoreOptionsVert || (_MoreOptionsVert = /*#__PURE__*/_jsx__default["default"](dsIcons.MoreOptionsVert, {
|
|
67
|
-
"aria-label": "More options"
|
|
68
|
-
}))
|
|
69
|
-
} = _ref2,
|
|
70
|
-
otherProps = _objectWithoutProperties__default["default"](_ref2, _excluded2);
|
|
71
|
-
|
|
72
|
-
return /*#__PURE__*/_jsx__default["default"](style.StyledCardNavigationAction, {}, key, /*#__PURE__*/jsxRuntime.jsx(DSButton__default["default"], _objectSpread(_objectSpread({
|
|
73
|
-
icon: icon
|
|
74
|
-
}, otherProps), {}, {
|
|
75
|
-
buttonType: DSButton.BUTTON_TYPE.TEXT,
|
|
76
|
-
size: DSButton.BUTTON_SIZE.L
|
|
77
|
-
})));
|
|
78
|
-
})))]
|
|
79
|
-
})));
|
|
80
|
-
};
|
|
81
|
-
|
|
82
|
-
DSCardNavigation.defaultProps = {
|
|
83
|
-
type: types.CardNavigationTypes.BORROWER,
|
|
84
|
-
Icon: dsIcons.LoanProducts
|
|
85
|
-
};
|
|
86
|
-
const props = {
|
|
87
|
-
/** props to inject to card navigation wrapper */
|
|
88
|
-
containerProps: reactDesc.PropTypes.object.description('props to inject to card navigation wrapper'),
|
|
89
|
-
|
|
90
|
-
/** card navigation title */
|
|
91
|
-
title: reactDesc.PropTypes.string.description('card navigation title'),
|
|
92
|
-
|
|
93
|
-
/** card navigation main icon */
|
|
94
|
-
Icon: reactDesc.PropTypes.node.description('card navigation main icon'),
|
|
95
|
-
|
|
96
|
-
/** card navigation description */
|
|
97
|
-
description: reactDesc.PropTypes.string.description('card navigation description'),
|
|
98
|
-
|
|
99
|
-
/** card navigation type */
|
|
100
|
-
type: reactDesc.PropTypes.oneOf(types.CardNavigationTypesValues).description('card navigation type'),
|
|
101
|
-
|
|
102
|
-
/** card navigation actions array */
|
|
103
|
-
actions: reactDesc.PropTypes.arrayOf(reactDesc.PropTypes.shape({
|
|
104
|
-
icon: reactDesc.PropTypes.element,
|
|
105
|
-
onClick: reactDesc.PropTypes.func
|
|
106
|
-
})).description('card navigation actions array')
|
|
107
|
-
};
|
|
108
|
-
const DSCardNavigationWithSchema = reactDesc.describe(DSCardNavigation);
|
|
109
|
-
DSCardNavigationWithSchema.propTypes = props;
|
|
110
|
-
|
|
111
|
-
exports.CardNavigationTypes = types.CardNavigationTypes;
|
|
112
|
-
exports.CardNavigationTypesValues = types.CardNavigationTypesValues;
|
|
113
|
-
exports.DSCardNavigationWithSchema = DSCardNavigationWithSchema;
|
|
114
|
-
exports["default"] = DSCardNavigation;
|
package/cjs/components/types.js
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
const CardNavigationTypes = {
|
|
6
|
-
BORROWER: 'borrower',
|
|
7
|
-
FINANCIAL: 'financial',
|
|
8
|
-
LOAN: 'loan',
|
|
9
|
-
REGULATORY: 'regulatory'
|
|
10
|
-
};
|
|
11
|
-
const CardNavigationTypesValues = Object.values(CardNavigationTypes);
|
|
12
|
-
|
|
13
|
-
exports.CardNavigationTypes = CardNavigationTypes;
|
|
14
|
-
exports.CardNavigationTypesValues = CardNavigationTypesValues;
|
package/cjs/index.js
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
var DSCardNavigation = require('./DSCardNavigation.js');
|
|
6
|
-
var types = require('./components/types.js');
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
exports.DSCardNavigationWithSchema = DSCardNavigation.DSCardNavigationWithSchema;
|
|
11
|
-
exports["default"] = DSCardNavigation["default"];
|
|
12
|
-
exports.CardNavigationTypes = types.CardNavigationTypes;
|
|
13
|
-
exports.CardNavigationTypesValues = types.CardNavigationTypesValues;
|
package/cjs/style.js
DELETED
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
var styled = require('styled-components');
|
|
6
|
-
var types = require('./components/types.js');
|
|
7
|
-
|
|
8
|
-
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
9
|
-
|
|
10
|
-
var styled__default = /*#__PURE__*/_interopDefaultLegacy(styled);
|
|
11
|
-
|
|
12
|
-
const StyledCardNavigationContentTitle = /*#__PURE__*/styled__default["default"].div.withConfig({
|
|
13
|
-
componentId: "sc-jb13pp-0"
|
|
14
|
-
})(["padding-top:", ";font-weight:", ";font-size:18px;color:", ";"], props => props.theme.space.xxs, props => props.theme.fontWeights.semibold, props => props.theme.colors.neutral['700']);
|
|
15
|
-
const StyledCardNavigationContentDescription = /*#__PURE__*/styled__default["default"].div.withConfig({
|
|
16
|
-
componentId: "sc-jb13pp-1"
|
|
17
|
-
})(["color:", ";font-size:12px;"], props => props.theme.colors.neutral['500']);
|
|
18
|
-
const StyledCardNavigationContentTitleWrapper = /*#__PURE__*/styled__default["default"].div.withConfig({
|
|
19
|
-
componentId: "sc-jb13pp-2"
|
|
20
|
-
})(["width:100%;"]);
|
|
21
|
-
const StyledCardNavigationContent = /*#__PURE__*/styled__default["default"].div.withConfig({
|
|
22
|
-
componentId: "sc-jb13pp-3"
|
|
23
|
-
})(["padding-right:", ";padding-left:", ";display:flex;align-items:center;flex:1;overflow:hidden;"], props => props.theme.space.xs, props => props.theme.space.xs);
|
|
24
|
-
const StyledCardNavigationCentralContent = /*#__PURE__*/styled__default["default"].div.withConfig({
|
|
25
|
-
componentId: "sc-jb13pp-4"
|
|
26
|
-
})(["width:273px;display:flex;@media (max-width:", "){width:336px;}"], props => props.theme.breakpoints.small);
|
|
27
|
-
const StyledCardNavigationBoxWrapper = /*#__PURE__*/styled__default["default"].div.withConfig({
|
|
28
|
-
componentId: "sc-jb13pp-5"
|
|
29
|
-
})(["width:337px;display:flex;flex-direction:row;flex-wrap:nowrap;box-shadow:0 1px 4px 0px rgba(37,41,47,0.5);border-radius:2px;position:relative;outline:none;", ";@media (max-width:", "){width:", ";}:after{display:block;content:'';position:absolute;height:100%;width:100%;top:0;left:0;border:solid ", " transparent;border-radius:2px;pointer-events:none;}&:hover,&:focus{box-shadow:0 3px 8px 0px rgba(37,41,47,0.4);}"], props => props.fluid ? 'width: 100%' : '', props => props.theme.breakpoints.small, props => props.fluid ? 'width: 100%' : '414px', props => props.theme.space.xxs);
|
|
30
|
-
const StyledCardNavigationIcon = /*#__PURE__*/styled__default["default"].div.withConfig({
|
|
31
|
-
componentId: "sc-jb13pp-6"
|
|
32
|
-
})(["width:64px;height:64px;background-color:#32aad1;border-top-left-radius:2px;border-bottom-left-radius:2px;padding:", ";display:flex;align-items:center;justify-content:center;fill:#ffffff;background-color:", ";"], props => props.theme.space.xxs, _ref => {
|
|
33
|
-
let {
|
|
34
|
-
type
|
|
35
|
-
} = _ref;
|
|
36
|
-
return type === types.CardNavigationTypes.BORROWER && '#32aad1' || type === types.CardNavigationTypes.FINANCIAL && '#1ba88d' || type === types.CardNavigationTypes.LOAN && '#8e49b2' || type === types.CardNavigationTypes.REGULATORY && '#db5575';
|
|
37
|
-
});
|
|
38
|
-
const StyledCardNavigationActions = /*#__PURE__*/styled__default["default"].div.withConfig({
|
|
39
|
-
componentId: "sc-jb13pp-7"
|
|
40
|
-
})(["display:flex;flex-direction:row;align-items:center;padding-right:", ";"], props => props.theme.space.xxs);
|
|
41
|
-
const StyledCardNavigationAction = /*#__PURE__*/styled__default["default"].div.withConfig({
|
|
42
|
-
componentId: "sc-jb13pp-8"
|
|
43
|
-
})(["margin-left:", ";span{height:", ";width:", ";svg{fill:", ";height:", ";width:", ";}}"], props => props.theme.space.xxs, props => props.theme.space.s, props => props.theme.space.s, props => props.theme.colors.neutral[500], props => props.theme.space.s, props => props.theme.space.s);
|
|
44
|
-
|
|
45
|
-
exports.StyledCardNavigationAction = StyledCardNavigationAction;
|
|
46
|
-
exports.StyledCardNavigationActions = StyledCardNavigationActions;
|
|
47
|
-
exports.StyledCardNavigationBoxWrapper = StyledCardNavigationBoxWrapper;
|
|
48
|
-
exports.StyledCardNavigationCentralContent = StyledCardNavigationCentralContent;
|
|
49
|
-
exports.StyledCardNavigationContent = StyledCardNavigationContent;
|
|
50
|
-
exports.StyledCardNavigationContentDescription = StyledCardNavigationContentDescription;
|
|
51
|
-
exports.StyledCardNavigationContentTitle = StyledCardNavigationContentTitle;
|
|
52
|
-
exports.StyledCardNavigationContentTitleWrapper = StyledCardNavigationContentTitleWrapper;
|
|
53
|
-
exports.StyledCardNavigationIcon = StyledCardNavigationIcon;
|
package/esm/DSCardNavigation.js
DELETED
|
@@ -1,101 +0,0 @@
|
|
|
1
|
-
import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
|
|
2
|
-
import _jsx from '@babel/runtime/helpers/esm/jsx';
|
|
3
|
-
import _objectWithoutProperties from '@babel/runtime/helpers/esm/objectWithoutProperties';
|
|
4
|
-
import 'core-js/modules/esnext.async-iterator.map.js';
|
|
5
|
-
import 'core-js/modules/esnext.iterator.map.js';
|
|
6
|
-
import 'core-js/modules/esnext.async-iterator.filter.js';
|
|
7
|
-
import 'core-js/modules/esnext.iterator.constructor.js';
|
|
8
|
-
import 'core-js/modules/esnext.iterator.filter.js';
|
|
9
|
-
import 'core-js/modules/esnext.async-iterator.for-each.js';
|
|
10
|
-
import 'core-js/modules/esnext.iterator.for-each.js';
|
|
11
|
-
import 'react';
|
|
12
|
-
import { PropTypes, describe } from 'react-desc';
|
|
13
|
-
import { TooltipTextProvider, DSTruncatedTooltipText } from '@elliemae/ds-truncated-tooltip-text';
|
|
14
|
-
import { LoanProducts, MoreOptionsVert } from '@elliemae/ds-icons';
|
|
15
|
-
import DSButton, { BUTTON_TYPE, BUTTON_SIZE } from '@elliemae/ds-button';
|
|
16
|
-
import { StyledCardNavigationBoxWrapper, StyledCardNavigationIcon, StyledCardNavigationCentralContent, StyledCardNavigationContent, StyledCardNavigationContentTitleWrapper, StyledCardNavigationContentTitle, StyledCardNavigationContentDescription, StyledCardNavigationActions, StyledCardNavigationAction } from './style.js';
|
|
17
|
-
import { CardNavigationTypes, CardNavigationTypesValues } from './components/types.js';
|
|
18
|
-
export { CardNavigationTypes, CardNavigationTypesValues } from './components/types.js';
|
|
19
|
-
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
20
|
-
|
|
21
|
-
var _MoreOptionsVert;
|
|
22
|
-
|
|
23
|
-
const _excluded = ["containerProps", "title", "description", "type", "Icon", "actions"],
|
|
24
|
-
_excluded2 = ["icon"];
|
|
25
|
-
|
|
26
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
27
|
-
|
|
28
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
29
|
-
|
|
30
|
-
const DSCardNavigation = _ref => {
|
|
31
|
-
let {
|
|
32
|
-
containerProps = {},
|
|
33
|
-
title = '',
|
|
34
|
-
description = '',
|
|
35
|
-
type,
|
|
36
|
-
Icon,
|
|
37
|
-
actions = []
|
|
38
|
-
} = _ref,
|
|
39
|
-
rest = _objectWithoutProperties(_ref, _excluded);
|
|
40
|
-
|
|
41
|
-
return /*#__PURE__*/_jsx(TooltipTextProvider, {}, void 0, /*#__PURE__*/jsxs(StyledCardNavigationBoxWrapper, _objectSpread(_objectSpread(_objectSpread({
|
|
42
|
-
role: "button",
|
|
43
|
-
tabIndex: 0
|
|
44
|
-
}, rest), containerProps), {}, {
|
|
45
|
-
children: [/*#__PURE__*/_jsx(StyledCardNavigationIcon, {
|
|
46
|
-
type: type
|
|
47
|
-
}, void 0, /*#__PURE__*/_jsx(Icon, {
|
|
48
|
-
size: "l"
|
|
49
|
-
})), /*#__PURE__*/_jsx(StyledCardNavigationCentralContent, {}, void 0, /*#__PURE__*/_jsx(StyledCardNavigationContent, {}, void 0, /*#__PURE__*/_jsx(StyledCardNavigationContentTitleWrapper, {}, void 0, /*#__PURE__*/_jsx(StyledCardNavigationContentTitle, {}, void 0, /*#__PURE__*/_jsx(DSTruncatedTooltipText, {
|
|
50
|
-
value: title
|
|
51
|
-
})), /*#__PURE__*/_jsx(StyledCardNavigationContentDescription, {}, void 0, /*#__PURE__*/_jsx(DSTruncatedTooltipText, {
|
|
52
|
-
value: description,
|
|
53
|
-
"data-testid": "ds-card-navigation--description"
|
|
54
|
-
})))), actions.length > 0 && /*#__PURE__*/_jsx(StyledCardNavigationActions, {}, void 0, actions.map((_ref2, key) => {
|
|
55
|
-
let {
|
|
56
|
-
icon = _MoreOptionsVert || (_MoreOptionsVert = /*#__PURE__*/_jsx(MoreOptionsVert, {
|
|
57
|
-
"aria-label": "More options"
|
|
58
|
-
}))
|
|
59
|
-
} = _ref2,
|
|
60
|
-
otherProps = _objectWithoutProperties(_ref2, _excluded2);
|
|
61
|
-
|
|
62
|
-
return /*#__PURE__*/_jsx(StyledCardNavigationAction, {}, key, /*#__PURE__*/jsx(DSButton, _objectSpread(_objectSpread({
|
|
63
|
-
icon: icon
|
|
64
|
-
}, otherProps), {}, {
|
|
65
|
-
buttonType: BUTTON_TYPE.TEXT,
|
|
66
|
-
size: BUTTON_SIZE.L
|
|
67
|
-
})));
|
|
68
|
-
})))]
|
|
69
|
-
})));
|
|
70
|
-
};
|
|
71
|
-
|
|
72
|
-
DSCardNavigation.defaultProps = {
|
|
73
|
-
type: CardNavigationTypes.BORROWER,
|
|
74
|
-
Icon: LoanProducts
|
|
75
|
-
};
|
|
76
|
-
const props = {
|
|
77
|
-
/** props to inject to card navigation wrapper */
|
|
78
|
-
containerProps: PropTypes.object.description('props to inject to card navigation wrapper'),
|
|
79
|
-
|
|
80
|
-
/** card navigation title */
|
|
81
|
-
title: PropTypes.string.description('card navigation title'),
|
|
82
|
-
|
|
83
|
-
/** card navigation main icon */
|
|
84
|
-
Icon: PropTypes.node.description('card navigation main icon'),
|
|
85
|
-
|
|
86
|
-
/** card navigation description */
|
|
87
|
-
description: PropTypes.string.description('card navigation description'),
|
|
88
|
-
|
|
89
|
-
/** card navigation type */
|
|
90
|
-
type: PropTypes.oneOf(CardNavigationTypesValues).description('card navigation type'),
|
|
91
|
-
|
|
92
|
-
/** card navigation actions array */
|
|
93
|
-
actions: PropTypes.arrayOf(PropTypes.shape({
|
|
94
|
-
icon: PropTypes.element,
|
|
95
|
-
onClick: PropTypes.func
|
|
96
|
-
})).description('card navigation actions array')
|
|
97
|
-
};
|
|
98
|
-
const DSCardNavigationWithSchema = describe(DSCardNavigation);
|
|
99
|
-
DSCardNavigationWithSchema.propTypes = props;
|
|
100
|
-
|
|
101
|
-
export { DSCardNavigationWithSchema, DSCardNavigation as default };
|
package/esm/components/types.js
DELETED
package/esm/index.js
DELETED
package/esm/style.js
DELETED
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import styled from 'styled-components';
|
|
2
|
-
import { CardNavigationTypes } from './components/types.js';
|
|
3
|
-
|
|
4
|
-
const StyledCardNavigationContentTitle = /*#__PURE__*/styled.div.withConfig({
|
|
5
|
-
componentId: "sc-jb13pp-0"
|
|
6
|
-
})(["padding-top:", ";font-weight:", ";font-size:18px;color:", ";"], props => props.theme.space.xxs, props => props.theme.fontWeights.semibold, props => props.theme.colors.neutral['700']);
|
|
7
|
-
const StyledCardNavigationContentDescription = /*#__PURE__*/styled.div.withConfig({
|
|
8
|
-
componentId: "sc-jb13pp-1"
|
|
9
|
-
})(["color:", ";font-size:12px;"], props => props.theme.colors.neutral['500']);
|
|
10
|
-
const StyledCardNavigationContentTitleWrapper = /*#__PURE__*/styled.div.withConfig({
|
|
11
|
-
componentId: "sc-jb13pp-2"
|
|
12
|
-
})(["width:100%;"]);
|
|
13
|
-
const StyledCardNavigationContent = /*#__PURE__*/styled.div.withConfig({
|
|
14
|
-
componentId: "sc-jb13pp-3"
|
|
15
|
-
})(["padding-right:", ";padding-left:", ";display:flex;align-items:center;flex:1;overflow:hidden;"], props => props.theme.space.xs, props => props.theme.space.xs);
|
|
16
|
-
const StyledCardNavigationCentralContent = /*#__PURE__*/styled.div.withConfig({
|
|
17
|
-
componentId: "sc-jb13pp-4"
|
|
18
|
-
})(["width:273px;display:flex;@media (max-width:", "){width:336px;}"], props => props.theme.breakpoints.small);
|
|
19
|
-
const StyledCardNavigationBoxWrapper = /*#__PURE__*/styled.div.withConfig({
|
|
20
|
-
componentId: "sc-jb13pp-5"
|
|
21
|
-
})(["width:337px;display:flex;flex-direction:row;flex-wrap:nowrap;box-shadow:0 1px 4px 0px rgba(37,41,47,0.5);border-radius:2px;position:relative;outline:none;", ";@media (max-width:", "){width:", ";}:after{display:block;content:'';position:absolute;height:100%;width:100%;top:0;left:0;border:solid ", " transparent;border-radius:2px;pointer-events:none;}&:hover,&:focus{box-shadow:0 3px 8px 0px rgba(37,41,47,0.4);}"], props => props.fluid ? 'width: 100%' : '', props => props.theme.breakpoints.small, props => props.fluid ? 'width: 100%' : '414px', props => props.theme.space.xxs);
|
|
22
|
-
const StyledCardNavigationIcon = /*#__PURE__*/styled.div.withConfig({
|
|
23
|
-
componentId: "sc-jb13pp-6"
|
|
24
|
-
})(["width:64px;height:64px;background-color:#32aad1;border-top-left-radius:2px;border-bottom-left-radius:2px;padding:", ";display:flex;align-items:center;justify-content:center;fill:#ffffff;background-color:", ";"], props => props.theme.space.xxs, _ref => {
|
|
25
|
-
let {
|
|
26
|
-
type
|
|
27
|
-
} = _ref;
|
|
28
|
-
return type === CardNavigationTypes.BORROWER && '#32aad1' || type === CardNavigationTypes.FINANCIAL && '#1ba88d' || type === CardNavigationTypes.LOAN && '#8e49b2' || type === CardNavigationTypes.REGULATORY && '#db5575';
|
|
29
|
-
});
|
|
30
|
-
const StyledCardNavigationActions = /*#__PURE__*/styled.div.withConfig({
|
|
31
|
-
componentId: "sc-jb13pp-7"
|
|
32
|
-
})(["display:flex;flex-direction:row;align-items:center;padding-right:", ";"], props => props.theme.space.xxs);
|
|
33
|
-
const StyledCardNavigationAction = /*#__PURE__*/styled.div.withConfig({
|
|
34
|
-
componentId: "sc-jb13pp-8"
|
|
35
|
-
})(["margin-left:", ";span{height:", ";width:", ";svg{fill:", ";height:", ";width:", ";}}"], props => props.theme.space.xxs, props => props.theme.space.s, props => props.theme.space.s, props => props.theme.colors.neutral[500], props => props.theme.space.s, props => props.theme.space.s);
|
|
36
|
-
|
|
37
|
-
export { StyledCardNavigationAction, StyledCardNavigationActions, StyledCardNavigationBoxWrapper, StyledCardNavigationCentralContent, StyledCardNavigationContent, StyledCardNavigationContentDescription, StyledCardNavigationContentTitle, StyledCardNavigationContentTitleWrapper, StyledCardNavigationIcon };
|
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
/// <reference path="../../../../shared/typings/react-desc.d.ts" />
|
|
2
|
-
/// <reference types="react" />
|
|
3
|
-
import { CardNavigationTypes, CardNavigationTypesValues } from './components/types';
|
|
4
|
-
declare const DSCardNavigation: {
|
|
5
|
-
({ containerProps, title, description, type, Icon, actions, ...rest }: {
|
|
6
|
-
[x: string]: any;
|
|
7
|
-
containerProps?: {} | undefined;
|
|
8
|
-
title?: string | undefined;
|
|
9
|
-
description?: string | undefined;
|
|
10
|
-
type: any;
|
|
11
|
-
Icon: any;
|
|
12
|
-
actions?: never[] | undefined;
|
|
13
|
-
}): JSX.Element;
|
|
14
|
-
defaultProps: {
|
|
15
|
-
type: string;
|
|
16
|
-
Icon: (rest: any) => JSX.Element;
|
|
17
|
-
};
|
|
18
|
-
propTypes: {
|
|
19
|
-
/** props to inject to card navigation wrapper */
|
|
20
|
-
containerProps: {
|
|
21
|
-
defaultValue(arg: import("react-desc").ReactDescPossibleDefaultValues): {
|
|
22
|
-
deprecated: import("react-desc").PropTypesDescValidator;
|
|
23
|
-
};
|
|
24
|
-
isRequired: import("react-desc").PropTypesDescValue;
|
|
25
|
-
};
|
|
26
|
-
/** card navigation title */
|
|
27
|
-
title: {
|
|
28
|
-
defaultValue(arg: import("react-desc").ReactDescPossibleDefaultValues): {
|
|
29
|
-
deprecated: import("react-desc").PropTypesDescValidator;
|
|
30
|
-
};
|
|
31
|
-
isRequired: import("react-desc").PropTypesDescValue;
|
|
32
|
-
};
|
|
33
|
-
/** card navigation main icon */
|
|
34
|
-
Icon: {
|
|
35
|
-
defaultValue(arg: import("react-desc").ReactDescPossibleDefaultValues): {
|
|
36
|
-
deprecated: import("react-desc").PropTypesDescValidator;
|
|
37
|
-
};
|
|
38
|
-
isRequired: import("react-desc").PropTypesDescValue;
|
|
39
|
-
};
|
|
40
|
-
/** card navigation description */
|
|
41
|
-
description: {
|
|
42
|
-
defaultValue(arg: import("react-desc").ReactDescPossibleDefaultValues): {
|
|
43
|
-
deprecated: import("react-desc").PropTypesDescValidator;
|
|
44
|
-
};
|
|
45
|
-
isRequired: import("react-desc").PropTypesDescValue;
|
|
46
|
-
};
|
|
47
|
-
/** card navigation type */
|
|
48
|
-
type: {
|
|
49
|
-
defaultValue(arg: import("react-desc").ReactDescPossibleDefaultValues): {
|
|
50
|
-
deprecated: import("react-desc").PropTypesDescValidator;
|
|
51
|
-
};
|
|
52
|
-
isRequired: import("react-desc").PropTypesDescValue;
|
|
53
|
-
};
|
|
54
|
-
/** card navigation actions array */
|
|
55
|
-
actions: {
|
|
56
|
-
defaultValue(arg: import("react-desc").ReactDescPossibleDefaultValues): {
|
|
57
|
-
deprecated: import("react-desc").PropTypesDescValidator;
|
|
58
|
-
};
|
|
59
|
-
isRequired: import("react-desc").PropTypesDescValue;
|
|
60
|
-
};
|
|
61
|
-
};
|
|
62
|
-
};
|
|
63
|
-
declare const DSCardNavigationWithSchema: {
|
|
64
|
-
(props?: {
|
|
65
|
-
[x: string]: any;
|
|
66
|
-
containerProps?: {} | undefined;
|
|
67
|
-
title?: string | undefined;
|
|
68
|
-
description?: string | undefined;
|
|
69
|
-
type: any;
|
|
70
|
-
Icon: any;
|
|
71
|
-
actions?: never[] | undefined;
|
|
72
|
-
} | undefined): JSX.Element;
|
|
73
|
-
propTypes: unknown;
|
|
74
|
-
toTypescript: () => import("react-desc").TypescriptSchema;
|
|
75
|
-
};
|
|
76
|
-
export { CardNavigationTypes, CardNavigationTypesValues, DSCardNavigationWithSchema };
|
|
77
|
-
export default DSCardNavigation;
|
package/types/index.d.ts
DELETED
package/types/style.d.ts
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
export declare const StyledCardNavigationContentTitle: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
2
|
-
export declare const StyledCardNavigationContentDescription: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
3
|
-
export declare const StyledCardNavigationContentTitleWrapper: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
4
|
-
export declare const StyledCardNavigationContent: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
5
|
-
export declare const StyledCardNavigationCentralContent: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
6
|
-
export declare const StyledCardNavigationBoxWrapper: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
7
|
-
export declare const StyledCardNavigationIcon: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
8
|
-
export declare const StyledCardNavigationActions: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
9
|
-
export declare const StyledCardNavigationAction: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|