@elliemae/ds-card 3.4.2 → 3.4.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/DSCard.js +17 -9
- package/dist/cjs/DSCard.js.map +2 -2
- package/dist/cjs/DSCardBody.js +9 -5
- package/dist/cjs/DSCardBody.js.map +1 -1
- package/dist/cjs/DSCardHeader.js +22 -11
- package/dist/cjs/DSCardHeader.js.map +1 -1
- package/dist/cjs/detail/DetailCard.js +104 -63
- package/dist/cjs/detail/DetailCard.js.map +2 -2
- package/dist/cjs/detail/styled.js +4 -1
- package/dist/cjs/detail/styled.js.map +1 -1
- package/dist/cjs/index.js +4 -1
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/v2/ActionAddon.js +7 -4
- package/dist/cjs/v2/ActionAddon.js.map +2 -2
- package/dist/cjs/v2/Card.js +62 -22
- package/dist/cjs/v2/Card.js.map +2 -2
- package/dist/cjs/v2/Group.js +21 -5
- package/dist/cjs/v2/Group.js.map +2 -2
- package/dist/cjs/v2/components.js +4 -1
- package/dist/cjs/v2/components.js.map +1 -1
- package/dist/esm/DSCard.js +13 -8
- package/dist/esm/DSCard.js.map +1 -1
- package/dist/esm/DSCardBody.js +5 -4
- package/dist/esm/DSCardBody.js.map +1 -1
- package/dist/esm/DSCardHeader.js +18 -10
- package/dist/esm/DSCardHeader.js.map +1 -1
- package/dist/esm/detail/DetailCard.js +100 -62
- package/dist/esm/detail/DetailCard.js.map +1 -1
- package/dist/esm/detail/styled.js.map +1 -1
- package/dist/esm/index.js.map +2 -2
- package/dist/esm/v2/ActionAddon.js +3 -3
- package/dist/esm/v2/ActionAddon.js.map +1 -1
- package/dist/esm/v2/Card.js +58 -21
- package/dist/esm/v2/Card.js.map +1 -1
- package/dist/esm/v2/Group.js +17 -4
- package/dist/esm/v2/Group.js.map +1 -1
- package/dist/esm/v2/components.js.map +1 -1
- package/package.json +11 -11
package/dist/cjs/DSCard.js
CHANGED
|
@@ -17,7 +17,10 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
17
17
|
}
|
|
18
18
|
return to;
|
|
19
19
|
};
|
|
20
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
22
|
+
mod
|
|
23
|
+
));
|
|
21
24
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
22
25
|
var DSCard_exports = {};
|
|
23
26
|
__export(DSCard_exports, {
|
|
@@ -27,7 +30,7 @@ __export(DSCard_exports, {
|
|
|
27
30
|
});
|
|
28
31
|
module.exports = __toCommonJS(DSCard_exports);
|
|
29
32
|
var React = __toESM(require("react"));
|
|
30
|
-
var
|
|
33
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
31
34
|
var import_ds_utilities = require("@elliemae/ds-utilities");
|
|
32
35
|
var import_ds_classnames = require("@elliemae/ds-classnames");
|
|
33
36
|
var import_DSCardBody = __toESM(require("./DSCardBody"));
|
|
@@ -39,20 +42,25 @@ const DSCard = ({
|
|
|
39
42
|
...otherProps
|
|
40
43
|
}) => {
|
|
41
44
|
const { cssClassName } = (0, import_ds_classnames.convertPropToCssClassName)("card");
|
|
42
|
-
return /* @__PURE__ */
|
|
45
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
43
46
|
"data-testid": "card",
|
|
44
47
|
...containerProps,
|
|
45
48
|
ref: innerRef,
|
|
46
49
|
className: cssClassName,
|
|
47
|
-
...otherProps
|
|
48
|
-
|
|
50
|
+
...otherProps,
|
|
51
|
+
children
|
|
52
|
+
});
|
|
49
53
|
};
|
|
50
54
|
const cardProps = {
|
|
51
|
-
containerProps: import_ds_utilities.PropTypes.object.description(
|
|
55
|
+
containerProps: import_ds_utilities.PropTypes.object.description(
|
|
56
|
+
"inject props to component wrapper"
|
|
57
|
+
),
|
|
52
58
|
innerRef: import_ds_utilities.PropTypes.string.description("Get reference for the button"),
|
|
53
|
-
children: import_ds_utilities.PropTypes.arrayOf(
|
|
54
|
-
|
|
55
|
-
|
|
59
|
+
children: import_ds_utilities.PropTypes.arrayOf(
|
|
60
|
+
import_ds_utilities.PropTypes.shape({
|
|
61
|
+
type: import_ds_utilities.PropTypes.oneOf([import_DSCardHeader.default, import_DSCardBody.default])
|
|
62
|
+
})
|
|
63
|
+
).description("DSCardBody and DSCardHeader")
|
|
56
64
|
};
|
|
57
65
|
DSCard.propTypes = cardProps;
|
|
58
66
|
DSCard.displayName = "DSCard";
|
package/dist/cjs/DSCard.js.map
CHANGED
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/DSCard.tsx", "../../../../scripts/build/transpile/react-shim.js"],
|
|
4
4
|
"sourcesContent": ["import React from 'react';\nimport { PropTypes, describe } from '@elliemae/ds-utilities';\nimport { convertPropToCssClassName } from '@elliemae/ds-classnames';\nimport DSCardBody from './DSCardBody';\nimport DSCardHeader from './DSCardHeader';\n\nconst DSCard = ({\n innerRef = undefined,\n children = null,\n containerProps = {},\n ...otherProps\n}) => {\n const { cssClassName } = convertPropToCssClassName('card');\n\n return (\n <div\n data-testid=\"card\"\n {...containerProps}\n ref={innerRef}\n className={cssClassName}\n {...otherProps}\n >\n {children}\n </div>\n );\n};\n\nconst cardProps = {\n /** inject props to component wrapper */\n containerProps: PropTypes.object.description(\n 'inject props to component wrapper',\n ),\n /**\n * Get reference for the button\n */\n innerRef: PropTypes.string.description('Get reference for the button'),\n /**\n * DSCardBody and DSCardHeader\n */\n children: PropTypes.arrayOf(\n PropTypes.shape({\n type: PropTypes.oneOf([DSCardHeader, DSCardBody]),\n }),\n ).description('DSCardBody and DSCardHeader'),\n};\n\nDSCard.propTypes = cardProps;\nDSCard.displayName = 'DSCard';\nconst DSCardWithSchema = describe(DSCard);\nDSCardWithSchema.propTypes = cardProps;\n\nexport { DSCard, DSCardWithSchema };\nexport default DSCard;\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
-
"mappings": "
|
|
6
|
-
"names": []
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB;AACA,0BAAoC;AACpC,2BAA0C;AAC1C,wBAAuB;AACvB,0BAAyB;AAEzB,MAAM,SAAS,CAAC;AAAA,EACd,WAAW;AAAA,EACX,WAAW;AAAA,EACX,iBAAiB,CAAC;AAAA,KACf;AACL,MAAM;AACJ,QAAM,EAAE,aAAa,QAAI,gDAA0B,MAAM;AAEzD,SACE,4CAAC;AAAA,IACC,eAAY;AAAA,IACX,GAAG;AAAA,IACJ,KAAK;AAAA,IACL,WAAW;AAAA,IACV,GAAG;AAAA,IAEH;AAAA,GACH;AAEJ;AAEA,MAAM,YAAY;AAAA,EAEhB,gBAAgB,8BAAU,OAAO;AAAA,IAC/B;AAAA,EACF;AAAA,EAIA,UAAU,8BAAU,OAAO,YAAY,8BAA8B;AAAA,EAIrE,UAAU,8BAAU;AAAA,IAClB,8BAAU,MAAM;AAAA,MACd,MAAM,8BAAU,MAAM,CAAC,oBAAAA,SAAc,kBAAAC,OAAU,CAAC;AAAA,IAClD,CAAC;AAAA,EACH,EAAE,YAAY,6BAA6B;AAC7C;AAEA,OAAO,YAAY;AACnB,OAAO,cAAc;AACrB,MAAM,uBAAmB,8BAAS,MAAM;AACxC,iBAAiB,YAAY;AAG7B,IAAO,iBAAQ;",
|
|
6
|
+
"names": ["DSCardHeader", "DSCardBody"]
|
|
7
7
|
}
|
package/dist/cjs/DSCardBody.js
CHANGED
|
@@ -17,7 +17,10 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
17
17
|
}
|
|
18
18
|
return to;
|
|
19
19
|
};
|
|
20
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
22
|
+
mod
|
|
23
|
+
));
|
|
21
24
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
22
25
|
var DSCardBody_exports = {};
|
|
23
26
|
__export(DSCardBody_exports, {
|
|
@@ -27,12 +30,13 @@ __export(DSCardBody_exports, {
|
|
|
27
30
|
});
|
|
28
31
|
module.exports = __toCommonJS(DSCardBody_exports);
|
|
29
32
|
var React = __toESM(require("react"));
|
|
30
|
-
var
|
|
33
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
31
34
|
var import_ds_utilities = require("@elliemae/ds-utilities");
|
|
32
|
-
const DSCardBody = ({ children }) => /* @__PURE__ */
|
|
35
|
+
const DSCardBody = ({ children }) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
33
36
|
className: "em-ds-card-body",
|
|
34
|
-
"data-testid": "card-body"
|
|
35
|
-
|
|
37
|
+
"data-testid": "card-body",
|
|
38
|
+
children
|
|
39
|
+
});
|
|
36
40
|
const bodyProps = {
|
|
37
41
|
children: import_ds_utilities.PropTypes.element.description("children")
|
|
38
42
|
};
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/DSCardBody.tsx", "../../../../scripts/build/transpile/react-shim.js"],
|
|
4
4
|
"sourcesContent": ["import React from 'react';\nimport { PropTypes, describe } from '@elliemae/ds-utilities';\n\nconst DSCardBody = ({ children }) => (\n <div className=\"em-ds-card-body\" data-testid=\"card-body\">\n {children}\n </div>\n);\n\nconst bodyProps = {\n /** children */\n children: PropTypes.element.description('children'),\n};\n\nDSCardBody.propTypes = bodyProps;\nDSCardBody.displayName = 'DSCardBody';\nconst DSCardBodyWithSchema = describe(DSCardBody);\nDSCardBodyWithSchema.propTypes = bodyProps;\n\nexport { DSCardBody, DSCardBodyWithSchema };\nexport default DSCardBody;\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
-
"mappings": "
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB;AACA,0BAAoC;AAEpC,MAAM,aAAa,CAAC,EAAE,SAAS,MAC7B,4CAAC;AAAA,EAAI,WAAU;AAAA,EAAkB,eAAY;AAAA,EAC1C;AAAA,CACH;AAGF,MAAM,YAAY;AAAA,EAEhB,UAAU,8BAAU,QAAQ,YAAY,UAAU;AACpD;AAEA,WAAW,YAAY;AACvB,WAAW,cAAc;AACzB,MAAM,2BAAuB,8BAAS,UAAU;AAChD,qBAAqB,YAAY;AAGjC,IAAO,qBAAQ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/dist/cjs/DSCardHeader.js
CHANGED
|
@@ -17,7 +17,10 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
17
17
|
}
|
|
18
18
|
return to;
|
|
19
19
|
};
|
|
20
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
22
|
+
mod
|
|
23
|
+
));
|
|
21
24
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
22
25
|
var DSCardHeader_exports = {};
|
|
23
26
|
__export(DSCardHeader_exports, {
|
|
@@ -27,20 +30,28 @@ __export(DSCardHeader_exports, {
|
|
|
27
30
|
});
|
|
28
31
|
module.exports = __toCommonJS(DSCardHeader_exports);
|
|
29
32
|
var React = __toESM(require("react"));
|
|
30
|
-
var
|
|
33
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
31
34
|
var import_ds_utilities = require("@elliemae/ds-utilities");
|
|
32
35
|
var import_ds_classnames = require("@elliemae/ds-classnames");
|
|
33
36
|
const DSCardHeader = ({ title, action }) => {
|
|
34
|
-
const { cssClassName, classNameElement } = (0, import_ds_classnames.convertPropToCssClassName)(
|
|
35
|
-
|
|
37
|
+
const { cssClassName, classNameElement } = (0, import_ds_classnames.convertPropToCssClassName)(
|
|
38
|
+
"card-header"
|
|
39
|
+
);
|
|
40
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
36
41
|
className: cssClassName,
|
|
37
|
-
"data-testid": "card-header"
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
42
|
+
"data-testid": "card-header",
|
|
43
|
+
children: [
|
|
44
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
|
|
45
|
+
className: classNameElement("heading"),
|
|
46
|
+
children: title
|
|
47
|
+
}),
|
|
48
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
49
|
+
className: classNameElement("pull-right"),
|
|
50
|
+
"data-testid": "ds-card_header-action",
|
|
51
|
+
children: action
|
|
52
|
+
})
|
|
53
|
+
]
|
|
54
|
+
});
|
|
44
55
|
};
|
|
45
56
|
const cardHeader = {
|
|
46
57
|
title: import_ds_utilities.PropTypes.string.description("card header title"),
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/DSCardHeader.tsx", "../../../../scripts/build/transpile/react-shim.js"],
|
|
4
4
|
"sourcesContent": ["import React from 'react';\nimport { PropTypes, describe } from '@elliemae/ds-utilities';\nimport { convertPropToCssClassName } from '@elliemae/ds-classnames';\n\nconst DSCardHeader = ({ title, action }) => {\n const { cssClassName, classNameElement } = convertPropToCssClassName(\n 'card-header',\n );\n return (\n <div className={cssClassName} data-testid=\"card-header\">\n <span className={classNameElement('heading')}>{title}</span>\n <div\n className={classNameElement('pull-right')}\n data-testid=\"ds-card_header-action\"\n >\n {action}\n </div>\n </div>\n );\n};\n\nconst cardHeader = {\n /** card header title */\n title: PropTypes.string.description('card header title'),\n /** action */\n action: PropTypes.node.description('action'),\n};\n\nDSCardHeader.propTypes = cardHeader;\nDSCardHeader.displayName = 'DSCardHeader';\nconst DSCardHeaderWithSchema = describe(DSCardHeader);\nDSCardHeaderWithSchema.propTypes = cardHeader;\n\nexport { DSCardHeader, DSCardHeaderWithSchema };\nexport default DSCardHeader;\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
-
"mappings": "
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB;AACA,0BAAoC;AACpC,2BAA0C;AAE1C,MAAM,eAAe,CAAC,EAAE,OAAO,OAAO,MAAM;AAC1C,QAAM,EAAE,cAAc,iBAAiB,QAAI;AAAA,IACzC;AAAA,EACF;AACA,SACE,6CAAC;AAAA,IAAI,WAAW;AAAA,IAAc,eAAY;AAAA,IACxC;AAAA,kDAAC;AAAA,QAAK,WAAW,iBAAiB,SAAS;AAAA,QAAI;AAAA,OAAM;AAAA,MACrD,4CAAC;AAAA,QACC,WAAW,iBAAiB,YAAY;AAAA,QACxC,eAAY;AAAA,QAEX;AAAA,OACH;AAAA;AAAA,GACF;AAEJ;AAEA,MAAM,aAAa;AAAA,EAEjB,OAAO,8BAAU,OAAO,YAAY,mBAAmB;AAAA,EAEvD,QAAQ,8BAAU,KAAK,YAAY,QAAQ;AAC7C;AAEA,aAAa,YAAY;AACzB,aAAa,cAAc;AAC3B,MAAM,6BAAyB,8BAAS,YAAY;AACpD,uBAAuB,YAAY;AAGnC,IAAO,uBAAQ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -17,7 +17,10 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
17
17
|
}
|
|
18
18
|
return to;
|
|
19
19
|
};
|
|
20
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
22
|
+
mod
|
|
23
|
+
));
|
|
21
24
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
22
25
|
var DetailCard_exports = {};
|
|
23
26
|
__export(DetailCard_exports, {
|
|
@@ -27,7 +30,7 @@ __export(DetailCard_exports, {
|
|
|
27
30
|
});
|
|
28
31
|
module.exports = __toCommonJS(DetailCard_exports);
|
|
29
32
|
var React = __toESM(require("react"));
|
|
30
|
-
var
|
|
33
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
31
34
|
var import_lodash = require("lodash");
|
|
32
35
|
var import_ds_utilities = require("@elliemae/ds-utilities");
|
|
33
36
|
var import_ds_icons = require("@elliemae/ds-icons");
|
|
@@ -64,67 +67,105 @@ const DetailCard = ({
|
|
|
64
67
|
topWrapperCols.unshift("20px");
|
|
65
68
|
if (selectable)
|
|
66
69
|
topWrapperCols.unshift(theme.space.s);
|
|
67
|
-
return /* @__PURE__ */
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
70
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_jsx_runtime.Fragment, {
|
|
71
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_styled.Container, {
|
|
72
|
+
disabled: disabled || readOnly,
|
|
73
|
+
active: selectable && isSelected,
|
|
74
|
+
"data-testid": "card-detail-container",
|
|
75
|
+
children: [
|
|
76
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_ds_grid.Grid, {
|
|
77
|
+
cols: topWrapperCols,
|
|
78
|
+
alignItems: !description ? "center" : void 0,
|
|
79
|
+
children: [
|
|
80
|
+
selectable && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_grid.Grid, {
|
|
81
|
+
pt: description && "9px",
|
|
82
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_form.DSCheckbox, {
|
|
83
|
+
checked: isSelected,
|
|
84
|
+
onChange: onSelect,
|
|
85
|
+
readOnly,
|
|
86
|
+
disabled,
|
|
87
|
+
"data-testid": "card-checkbox"
|
|
88
|
+
})
|
|
89
|
+
}),
|
|
90
|
+
expandable && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_grid.Grid, {
|
|
91
|
+
height: "16px",
|
|
92
|
+
pt: description && "xxs",
|
|
93
|
+
mt: !description && "-5px",
|
|
94
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_button.default, {
|
|
95
|
+
size: "s",
|
|
96
|
+
buttonType: "text",
|
|
97
|
+
containerProps: {
|
|
98
|
+
"data-testid": "expand-button"
|
|
99
|
+
},
|
|
100
|
+
onClick: onExpand,
|
|
101
|
+
icon: isExpanded ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_icons.ArrowheadDown, {
|
|
102
|
+
color: ["neutral", "500"],
|
|
103
|
+
size: "s"
|
|
104
|
+
}) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_icons.ArrowheadRight, {
|
|
105
|
+
color: ["neutral", "500"],
|
|
106
|
+
size: "s"
|
|
107
|
+
}),
|
|
108
|
+
disabled
|
|
109
|
+
})
|
|
110
|
+
}),
|
|
111
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_ds_grid.Grid, {
|
|
112
|
+
pr: "24px",
|
|
113
|
+
children: [
|
|
114
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_styled.Title, {
|
|
115
|
+
children: title
|
|
116
|
+
}),
|
|
117
|
+
description && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_styled.Description, {
|
|
118
|
+
descriptionColor,
|
|
119
|
+
children: description
|
|
120
|
+
})
|
|
121
|
+
]
|
|
122
|
+
}),
|
|
123
|
+
hasRightPosition && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_ds_grid.Grid, {
|
|
124
|
+
cols: (0, import_lodash.compact)([hasRightPosition && "auto", rightAddon && "auto"]),
|
|
125
|
+
children: [
|
|
126
|
+
hasRightLegend && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_ds_grid.Grid, {
|
|
127
|
+
pr: "24px",
|
|
128
|
+
rows: ["auto", "auto", 1],
|
|
129
|
+
children: [
|
|
130
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_styled.RightDescription, {
|
|
131
|
+
justifyContent: "flex-end",
|
|
132
|
+
children: rightDescription
|
|
133
|
+
}),
|
|
134
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_styled.RightValue, {
|
|
135
|
+
justifyContent: "flex-end",
|
|
136
|
+
children: rightValue
|
|
137
|
+
}),
|
|
138
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_grid.Grid, {})
|
|
139
|
+
]
|
|
140
|
+
}),
|
|
141
|
+
rightAddon && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_styled.RightAddon, {
|
|
142
|
+
cols: ["auto", "auto"],
|
|
143
|
+
gutter: "2px",
|
|
144
|
+
children: rightAddon
|
|
145
|
+
})
|
|
146
|
+
]
|
|
147
|
+
})
|
|
148
|
+
]
|
|
149
|
+
}),
|
|
150
|
+
expandContent && isExpanded && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_ds_grid.Grid, {
|
|
151
|
+
ml: selectable && "s",
|
|
152
|
+
mr: rightAddon && "xs",
|
|
153
|
+
children: [
|
|
154
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_separator.default, {
|
|
155
|
+
dashed: true,
|
|
156
|
+
position: "initial",
|
|
157
|
+
margin: "none"
|
|
158
|
+
}),
|
|
159
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_grid.Grid, {
|
|
160
|
+
pt: "xxs",
|
|
161
|
+
"data-testid": "detail-card-expanded-content",
|
|
162
|
+
children: expandContent
|
|
163
|
+
})
|
|
164
|
+
]
|
|
165
|
+
})
|
|
166
|
+
]
|
|
167
|
+
})
|
|
168
|
+
});
|
|
128
169
|
};
|
|
129
170
|
const detailProps = {
|
|
130
171
|
title: import_ds_utilities.PropTypes.string.isRequired.description("Title of the card."),
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/detail/DetailCard.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
4
|
"sourcesContent": ["/* eslint-disable max-lines */\n/* eslint-disable jsx-a11y/click-events-have-key-events */\n/* eslint-disable complexity */\nimport React from 'react';\nimport { compact, noop } from 'lodash';\nimport { PropTypes, describe } from '@elliemae/ds-utilities';\nimport { ArrowheadDown, ArrowheadRight } from '@elliemae/ds-icons';\nimport { useTheme } from '@elliemae/ds-system';\nimport DSButton from '@elliemae/ds-button';\nimport DSSeparator from '@elliemae/ds-separator';\nimport { Grid } from '@elliemae/ds-grid';\nimport { DSCheckbox } from '@elliemae/ds-form';\nimport { Container, Title, Description, RightAddon, RightDescription, RightValue } from './styled';\n\nconst DetailCard = ({\n title,\n description,\n descriptionColor = 'neutral',\n rightValue,\n rightDescription,\n rightAddon,\n // select props\n selectable = false,\n isSelected = false,\n onSelect = noop,\n // expand props\n expandable = false,\n isExpanded = false,\n onExpand = noop,\n expandContent,\n // state props\n readOnly = false,\n disabled = false,\n}) => {\n const theme = useTheme();\n const hasRightLegend = rightValue && rightDescription;\n const hasRightPosition = hasRightLegend || rightAddon;\n const topWrapperCols = ['1fr'];\n if (hasRightPosition) topWrapperCols.push('auto');\n if (expandable) topWrapperCols.unshift('20px');\n if (selectable) topWrapperCols.unshift(theme.space.s);\n return (\n <>\n <Container disabled={disabled || readOnly} active={selectable && isSelected} data-testid=\"card-detail-container\">\n <Grid cols={topWrapperCols} alignItems={!description ? 'center' : undefined}>\n {selectable && (\n <Grid pt={description && '9px'}>\n <DSCheckbox\n checked={isSelected}\n onChange={onSelect}\n readOnly={readOnly}\n disabled={disabled}\n data-testid=\"card-checkbox\"\n />\n </Grid>\n )}\n {expandable && (\n <Grid height=\"16px\" pt={description && 'xxs'} mt={!description && '-5px'}>\n <DSButton\n size=\"s\"\n buttonType=\"text\"\n containerProps={{\n 'data-testid': 'expand-button',\n }}\n onClick={onExpand}\n icon={\n isExpanded ? (\n <ArrowheadDown color={['neutral', '500']} size=\"s\" />\n ) : (\n <ArrowheadRight color={['neutral', '500']} size=\"s\" />\n )\n }\n disabled={disabled}\n />\n </Grid>\n )}\n <Grid pr=\"24px\">\n <Title>{title}</Title>\n {description && <Description descriptionColor={descriptionColor}>{description}</Description>}\n </Grid>\n {hasRightPosition && (\n <Grid cols={compact([hasRightPosition && 'auto', rightAddon && 'auto'])}>\n {hasRightLegend && (\n <Grid pr=\"24px\" rows={['auto', 'auto', 1]}>\n <RightDescription justifyContent=\"flex-end\">{rightDescription}</RightDescription>\n <RightValue justifyContent=\"flex-end\">{rightValue}</RightValue>\n <Grid />\n </Grid>\n )}\n {rightAddon && (\n <RightAddon cols={['auto', 'auto']} gutter=\"2px\">\n {rightAddon}\n </RightAddon>\n )}\n </Grid>\n )}\n </Grid>\n {expandContent && isExpanded && (\n <Grid ml={selectable && 's'} mr={rightAddon && 'xs'}>\n <DSSeparator dashed position=\"initial\" margin=\"none\" />\n <Grid pt=\"xxs\" data-testid=\"detail-card-expanded-content\">\n {expandContent}\n </Grid>\n </Grid>\n )}\n </Container>\n </>\n );\n};\n\nconst detailProps = {\n /**\n * Title of the card.\n */\n title: PropTypes.string.isRequired.description('Title of the card.'),\n /**\n * Description of the card.\n */\n description: PropTypes.string.description('Description of the card.'),\n /**\n * Description color.\n */\n descriptionColor: PropTypes.oneOf(['primary', 'neutral']).description('Description color.'),\n /**\n * Right value (should be used with `rightDescription`)\n */\n rightValue: PropTypes.string.description('Right value (should be used with `rightDescription`)'),\n /**\n * Right description (should be used with `rightValue`)\n */\n rightDescription: PropTypes.string.description('Right description (should be used with `rightValue`)'),\n /**\n * Right addon array, max elements: 2\n */\n rightAddon: PropTypes.element.description('Right addon array, max elements: 2'),\n /**\n * Whether if the card is selectable or not\n */\n selectable: PropTypes.bool.description('Whether if the card is selectable or not'),\n /**\n * Whether if the card is selected or not\n */\n isSelected: PropTypes.bool.description('Whether if the card is selected or not'),\n /**\n * Callback on selection\n */\n onSelect: PropTypes.func.description('Callback on selection'),\n /**\n * Whether if the card is expandable or not\n */\n expandable: PropTypes.bool.description('Whether if the card is expandable or not'),\n /**\n * Whether if the card is expanded or not\n */\n isExpanded: PropTypes.bool.description('Whether if the card is expanded or not'),\n /**\n * Callback on expand\n */\n onExpand: PropTypes.func.description('Callback on expand'),\n /**\n * Content\n */\n expandContent: PropTypes.element.description('Content'),\n /**\n * Read only\n */\n readOnly: PropTypes.bool.description('Read only'),\n /**\n * Disabled\n */\n disabled: PropTypes.bool.description('Disabled'),\n};\n\nDetailCard.propTypes = detailProps;\nDetailCard.displayName = 'DetailCard';\nconst DSCardDetailWithSchema = describe(DetailCard);\nDSCardDetailWithSchema.propTypes = detailProps;\n\nexport { DetailCard, DSCardDetailWithSchema };\nexport default DetailCard;\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
-
"mappings": "
|
|
6
|
-
"names": []
|
|
5
|
+
"mappings": "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",
|
|
6
|
+
"names": ["DSButton", "DSSeparator"]
|
|
7
7
|
}
|
|
@@ -17,7 +17,10 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
17
17
|
}
|
|
18
18
|
return to;
|
|
19
19
|
};
|
|
20
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
22
|
+
mod
|
|
23
|
+
));
|
|
21
24
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
22
25
|
var styled_exports = {};
|
|
23
26
|
__export(styled_exports, {
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/detail/styled.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
4
|
"sourcesContent": ["import { styled } from '@elliemae/ds-system';\nimport { Grid } from '@elliemae/ds-grid';\n\nexport const Separator = styled.div`\n width: 100%;\n height: 24px;\n border-right: 1px solid ${(props) => props.theme.colors.neutral['300']};\n margin: 0 8px;\n`;\n\nexport const Title = styled.h3`\n margin: 0;\n font-size: 16px;\n min-height: 20px;\n font-weight: ${(props) => props.theme.fontWeights.semibold};\n color: ${(props) => props.theme.colors.neutral['700']};\n`;\n\nexport const Description = styled.p`\n margin: 0;\n font-size: 12px;\n min-height: 18px;\n display: flex;\n align-items: center;\n color: ${(props) =>\n props.descriptionColor === 'neutral'\n ? props.theme.colors.neutral['600']\n : props.theme.colors.brand['600']};\n`;\n\nexport const RightAddon = styled(Grid)`\n margin: 0;\n white-space: nowrap;\n`;\n\nexport const RightDescription = styled(Grid)`\n margin: 0;\n white-space: nowrap;\n font-size: 12px;\n color: ${(props) => props.theme.colors.neutral['600']};\n`;\nexport const RightValue = styled(Grid)`\n margin: 0;\n white-space: nowrap;\n font-size: 14px;\n color: ${(props) => props.theme.colors.neutral['800']};\n`;\n\nexport const ExpandContent = styled.div`\n font-size: 12px;\n`;\n\nconst border = ({ active, theme }) =>\n active ? theme.colors.brand['600'] : theme.colors.neutral['200'];\nconst background = ({ active, theme }) =>\n active ? theme.colors.brand['100'] : theme.colors.neutral['000'];\n\nexport const Container = styled(Grid)`\n width: 100%;\n min-height: 52px;\n min-width: 244px;\n padding: 6px 8px 6px 12px;\n position: relative;\n border-top: 1px solid ${border};\n border-bottom: 1px solid ${border};\n background: ${background};\n ${(props) =>\n props.disabled\n ? `\n ${Title}, ${Description}, ${RightDescription}, ${RightValue} {\n color: ${props.theme.colors.neutral['500']};\n }\n `\n : ''}\n &:hover {\n box-shadow: 0 2px 4px 0 rgba(53, 60, 70, 0.5);\n z-index: 1;\n }\n`;\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
-
"mappings": "
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,uBAAuB;AACvB,qBAAqB;AAEd,MAAM,YAAY,wBAAO;AAAA;AAAA;AAAA,4BAGJ,CAAC,UAAU,MAAM,MAAM,OAAO,QAAQ;AAAA;AAAA;AAI3D,MAAM,QAAQ,wBAAO;AAAA;AAAA;AAAA;AAAA,iBAIX,CAAC,UAAU,MAAM,MAAM,YAAY;AAAA,WACzC,CAAC,UAAU,MAAM,MAAM,OAAO,QAAQ;AAAA;AAG1C,MAAM,cAAc,wBAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,WAMvB,CAAC,UACR,MAAM,qBAAqB,YACvB,MAAM,MAAM,OAAO,QAAQ,SAC3B,MAAM,MAAM,OAAO,MAAM;AAAA;AAG1B,MAAM,iBAAa,yBAAO,mBAAI;AAAA;AAAA;AAAA;AAK9B,MAAM,uBAAmB,yBAAO,mBAAI;AAAA;AAAA;AAAA;AAAA,WAIhC,CAAC,UAAU,MAAM,MAAM,OAAO,QAAQ;AAAA;AAE1C,MAAM,iBAAa,yBAAO,mBAAI;AAAA;AAAA;AAAA;AAAA,WAI1B,CAAC,UAAU,MAAM,MAAM,OAAO,QAAQ;AAAA;AAG1C,MAAM,gBAAgB,wBAAO;AAAA;AAAA;AAIpC,MAAM,SAAS,CAAC,EAAE,QAAQ,MAAM,MAC9B,SAAS,MAAM,OAAO,MAAM,SAAS,MAAM,OAAO,QAAQ;AAC5D,MAAM,aAAa,CAAC,EAAE,QAAQ,MAAM,MAClC,SAAS,MAAM,OAAO,MAAM,SAAS,MAAM,OAAO,QAAQ;AAErD,MAAM,gBAAY,yBAAO,mBAAI;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,0BAMV;AAAA,6BACG;AAAA,gBACb;AAAA,IACZ,CAAC,UACD,MAAM,WACF;AAAA,MACF,UAAU,gBAAgB,qBAAqB;AAAA,eACtC,MAAM,MAAM,OAAO,QAAQ;AAAA;AAAA,MAGlC;AAAA;AAAA;AAAA;AAAA;AAAA;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/dist/cjs/index.js
CHANGED
|
@@ -18,7 +18,10 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
18
18
|
return to;
|
|
19
19
|
};
|
|
20
20
|
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
21
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
22
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
23
|
+
mod
|
|
24
|
+
));
|
|
22
25
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
23
26
|
var src_exports = {};
|
|
24
27
|
__export(src_exports, {
|
package/dist/cjs/index.js.map
CHANGED
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/index.tsx", "../../../../scripts/build/transpile/react-shim.js"],
|
|
4
4
|
"sourcesContent": ["export * from './DSCard';\nexport * from './DSCardHeader';\nexport * from './DSCardBody';\nexport * from './v2/Card';\nexport * from './v2/Group';\nexport * from './v2/ActionAddon';\nexport * from './detail/DetailCard';\n\nexport { default } from './DSCard';\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
-
"mappings": "
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,wBAAc,qBAAd;AACA,wBAAc,2BADd;AAEA,wBAAc,yBAFd;AAGA,wBAAc,sBAHd;AAIA,wBAAc,uBAJd;AAKA,wBAAc,6BALd;AAMA,wBAAc,gCANd;AAQA,oBAAwB;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -17,7 +17,10 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
17
17
|
}
|
|
18
18
|
return to;
|
|
19
19
|
};
|
|
20
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
22
|
+
mod
|
|
23
|
+
));
|
|
21
24
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
22
25
|
var ActionAddon_exports = {};
|
|
23
26
|
__export(ActionAddon_exports, {
|
|
@@ -27,7 +30,7 @@ __export(ActionAddon_exports, {
|
|
|
27
30
|
});
|
|
28
31
|
module.exports = __toCommonJS(ActionAddon_exports);
|
|
29
32
|
var React = __toESM(require("react"));
|
|
30
|
-
var
|
|
33
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
31
34
|
var import_ds_utilities = require("@elliemae/ds-utilities");
|
|
32
35
|
var import_ds_system = require("@elliemae/ds-system");
|
|
33
36
|
var import_ds_icons = require("@elliemae/ds-icons");
|
|
@@ -48,10 +51,10 @@ const Addon = (0, import_ds_system.styled)(import_ds_button.default)`
|
|
|
48
51
|
border: none !important; /* needed */
|
|
49
52
|
}
|
|
50
53
|
`;
|
|
51
|
-
const ActionAddon = ({ label, onClick, icon }) => /* @__PURE__ */
|
|
54
|
+
const ActionAddon = ({ label, onClick, icon }) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Addon, {
|
|
52
55
|
onClick,
|
|
53
56
|
labelText: label,
|
|
54
|
-
icon: icon || /* @__PURE__ */
|
|
57
|
+
icon: icon || /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_icons.ChevronSmallDown, {
|
|
55
58
|
color: ["brand-primary", 700]
|
|
56
59
|
})
|
|
57
60
|
});
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/v2/ActionAddon.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
4
|
"sourcesContent": ["import React from 'react';\nimport { PropTypes, describe } from '@elliemae/ds-utilities';\nimport { styled } from '@elliemae/ds-system';\nimport { ChevronSmallDown } from '@elliemae/ds-icons';\nimport Button from '@elliemae/ds-button';\n\nconst Addon = styled(Button)`\n background-color: transparent;\n padding-right: 4px;\n height: 100%;\n border: none;\n font-size: 12px;\n font-weight: ${(props) => props.theme.fontWeights.semibold};\n color: ${(props) => props.theme.colors.brand['700']};\n cursor: pointer;\n &:focus,\n &::after {\n background-color: transparent;\n box-shadow: none !important; /* needed */\n border: none !important; /* needed */\n }\n`;\n\nconst ActionAddon = ({ label, onClick, icon }) => (\n <Addon onClick={onClick} labelText={label} icon={icon || <ChevronSmallDown color={['brand-primary', 700]} />} />\n);\n\nconst actionProps = {\n /**\n * Addon label\n */\n label: PropTypes.string.description('Addon label'),\n /**\n * On click callback\n */\n onClick: PropTypes.func.description('On click callback'),\n /**\n * Icon to display after the label\n */\n icon: PropTypes.element.description('Icon to display after the label'),\n};\n\nActionAddon.propTypes = actionProps;\nActionAddon.displayName = 'ActionAddon';\nconst DSCardActionAddonWithSchema = describe(ActionAddon);\nDSCardActionAddonWithSchema.propTypes = actionProps;\n\nexport { ActionAddon, DSCardActionAddonWithSchema };\nexport default ActionAddon;\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
-
"mappings": "
|
|
6
|
-
"names": []
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB;AACA,0BAAoC;AACpC,uBAAuB;AACvB,sBAAiC;AACjC,uBAAmB;AAEnB,MAAM,YAAQ,yBAAO,iBAAAA,OAAM;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,iBAMV,CAAC,UAAU,MAAM,MAAM,YAAY;AAAA,WACzC,CAAC,UAAU,MAAM,MAAM,OAAO,MAAM;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAU/C,MAAM,cAAc,CAAC,EAAE,OAAO,SAAS,KAAK,MAC1C,4CAAC;AAAA,EAAM;AAAA,EAAkB,WAAW;AAAA,EAAO,MAAM,QAAQ,4CAAC;AAAA,IAAiB,OAAO,CAAC,iBAAiB,GAAG;AAAA,GAAG;AAAA,CAAI;AAGhH,MAAM,cAAc;AAAA,EAIlB,OAAO,8BAAU,OAAO,YAAY,aAAa;AAAA,EAIjD,SAAS,8BAAU,KAAK,YAAY,mBAAmB;AAAA,EAIvD,MAAM,8BAAU,QAAQ,YAAY,iCAAiC;AACvE;AAEA,YAAY,YAAY;AACxB,YAAY,cAAc;AAC1B,MAAM,kCAA8B,8BAAS,WAAW;AACxD,4BAA4B,YAAY;AAGxC,IAAO,sBAAQ;",
|
|
6
|
+
"names": ["Button"]
|
|
7
7
|
}
|